ss-component-new 1.3.402 → 1.3.404

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 (42) hide show
  1. package/dist/{array-C-bgn64n.cjs → array-BR1PvQbX.cjs} +1 -1
  2. package/dist/{array-BYQfa7vv.js → array-Dkd68Hfk.js} +2 -2
  3. package/dist/{index-zc1dvgTu.js → index-2HM6BvdU.js} +1 -1
  4. package/dist/{index-DiBilDot.cjs → index-B0j2jqYn.cjs} +1 -1
  5. package/dist/{index-CEpymaIL.js → index-BH7WlmUQ.js} +2 -2
  6. package/dist/{index-CCajeP_X.cjs → index-BKCCOPpB.cjs} +1 -1
  7. package/dist/{index-Cxhj38Aj.cjs → index-BKoKDhkv.cjs} +1 -1
  8. package/dist/{index-PbDMJK-o.cjs → index-BZIF3k0W.cjs} +1 -1
  9. package/dist/{index-C7c2mLkS.cjs → index-B_TGjgjf.cjs} +1 -1
  10. package/dist/{index-AQhXfUph.js → index-BfaF67CC.js} +1 -1
  11. package/dist/{index-D3mhwS_3.js → index-C1sf_nKp.js} +591 -581
  12. package/dist/{index-slZuD5GM.js → index-CNNN2Kly.js} +3 -3
  13. package/dist/{index-BPoFpZN-.cjs → index-CPGL_tAZ.cjs} +1 -1
  14. package/dist/{index-TZzhnk4H.js → index-Ca6pn0hs.js} +1 -1
  15. package/dist/{index-DFzc2kxS.js → index-CgNm8ddO.js} +7 -7
  16. package/dist/{index-DNN0q7du.cjs → index-Cp3vz6X2.cjs} +1 -1
  17. package/dist/{index-D_vT18Ok.js → index-D7uaKz8r.js} +2 -2
  18. package/dist/{index-DoF_X4V4.cjs → index-DC-6ALBb.cjs} +1 -1
  19. package/dist/{index-BhNlUli5.cjs → index-DID5DB-R.cjs} +1 -1
  20. package/dist/{index-CDtaNtsv.js → index-DPgQdbLU.js} +1 -1
  21. package/dist/{index-BXX6PW4q.js → index-DbRuTUMM.js} +2 -2
  22. package/dist/{index-BUo9VCVy.cjs → index-FZRnyOVE.cjs} +1 -1
  23. package/dist/{index-Dx8o9peq.cjs → index-HVeKksFe.cjs} +8 -8
  24. package/dist/{index-D2LwuXIC.cjs → index-KdYepyaQ.cjs} +1 -1
  25. package/dist/{index-BRm-yTLr.js → index-Na0leadT.js} +1 -1
  26. package/dist/{index-CRoP1M1c.js → index-qBHeFDcV.js} +1 -1
  27. package/dist/{main-6QFYrXlY.cjs → main-CYf_FJPb.cjs} +1 -1
  28. package/dist/{main-Df9HkpZV.js → main-DN0lMAmK.js} +2 -2
  29. package/dist/ss-component.cjs +1 -1
  30. package/dist/ss-component.css +1 -1
  31. package/dist/ss-component.js +5 -5
  32. package/dist/ss-component2.cjs +1 -1
  33. package/dist/ss-component2.js +8 -8
  34. package/dist/{threeModel-DYG6eSPX.js → threeModel-BfIl6r0Q.js} +1 -1
  35. package/dist/{threeModel-CGog9fq9.cjs → threeModel-D5dkRAQF.cjs} +1 -1
  36. package/dist/{threeSceneView-RqFWnzHH.cjs → threeSceneView-B3_VZ1CT.cjs} +1 -1
  37. package/dist/{threeSceneView-B-FF__hv.js → threeSceneView-CLiPMDNF.js} +3 -3
  38. package/dist/{threeSceneViewForCPMPIP-j9BsLVDR.cjs → threeSceneViewForCPMPIP-CEkjEwsI.cjs} +1 -1
  39. package/dist/{threeSceneViewForCPMPIP-Dg28VsSK.js → threeSceneViewForCPMPIP-Ceh95-ef.js} +1 -1
  40. package/dist/{threeViewerHost-ClqHAdKi.cjs → threeViewerHost-C5RcAXq8.cjs} +1 -1
  41. package/dist/{threeViewerHost-7vwQRs2b.js → threeViewerHost-Dh8m0tZW.js} +1 -1
  42. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
- "use strict";var Au=Object.defineProperty;var zu=(a,l,n)=>l in a?Au(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var en=(a,l,n)=>zu(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),Ua=require("./request-Dl8yi2iS.cjs"),A=require("./index-Pve69buQ.cjs"),nl=require("./index-C7c2mLkS.cjs"),ce=require("./index-BszVYrt4.cjs"),Xl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BB3g-g6w.cjs"),Br=require("./index-BOkUwKV5.cjs"),So=require("./threeViewerHost-ClqHAdKi.cjs"),Mr=require("./index-DmwxzDGW.cjs"),ls=require("./index-BUo9VCVy.cjs"),Ys=require("./index-DBxrIHI8.cjs");;/* empty css */const Eo=require("./isString-CGrvcmBw.cjs"),rs=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Js=require("./index-BVaHwt5f.cjs"),Mu=require("./index-BRyEcXsJ.cjs"),Mn=require("./MTLLoader-B0vEDLTb.cjs"),Iu=require("./URDFLoader-g-0sln-a.cjs");var Ou="[object Boolean]";function Xs(a){return a===!0||a===!1||Ua.isObjectLike(a)&&Ua.baseGetTag(a)==Ou}function Lu(a){return a===void 0}const Ru=a=>a.match(/\((.*)\)/)[1],$u={__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(a){const l=a,n=e.ref(null),r=e.ref(!1),o=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>o.value,()=>{e.nextTick(()=>{var s,h;(h=(s=n.value)==null?void 0:s.updatePopper)==null||h.call(s)})},{deep:!0,immediate:!0}),(s,h)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":h[0]||(h[0]=d=>r.value=d),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:o})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Vu=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var d,m,b,u,C,M;const r=l.value??"";let o=(d=l==null?void 0:l.columnContent)==null?void 0:d.filter;if(o=(m=ce.analyzeSplitToContent(o,","))==null?void 0:m.map(k=>((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)),o=o==null?void 0:o.find(k=>(k==null?void 0:k[0])==="("),(o==null?void 0:o[0])==="("&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=o==null?void 0:o.split("||"),!o)return{backgroundColor:void 0,color:void 0};let s=(u=(b=l==null?void 0:l.columnContent)==null?void 0:b.options)==null?void 0:u.findIndex(k=>(k==null?void 0:k.value)===r);s=o==null?void 0:o[s],s=ce.analyzeSplitToContent(s,","),s=s==null?void 0:s.map(k=>((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));let h=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextBackRGBA"));h?h=ce.rgbaToColor((C=h==null?void 0:h.split("="))==null?void 0:C[1]):h=void 0;let c=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextRGBA"));return c?c=ce.rgbaToColor((M=c==null?void 0:c.split("="))==null?void 0:M[1]):c=void 0,{backgroundColor:h,color:c}});return(r,o)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),Pu=Xl._export_sfc(Vu,[["__scopeId","data-v-3290070b"]]);function Fu(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const o=a.getContext("2d");if(!o)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:h=2,fillOpacity:c=.2}=r,d=a.getBoundingClientRect(),m=l.getBoundingClientRect(),b=l.naturalWidth,u=l.naturalHeight,C=m.width/b,M=m.height/u,k=Math.min(C,M),W=b*k,I=u*k,j=(d.width-W)/2,L=(d.height-I)/2,E=n.map(([w,g])=>{const S=j+w*W,$=L+g*I;return{x:S,y:$}});o.clearRect(0,0,a.width,a.height),o.beginPath(),o.moveTo(E[0].x,E[0].y);for(let w=1;w<E.length;w++)o.lineTo(E[w].x,E[w].y);o.closePath();const x=s.replace(/[\d.]+\)$/,`${c})`);o.fillStyle=x,o.fill(),o.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),o.lineWidth=h,o.stroke()}function xi(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ns(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const ju={key:0,class:"ocr-img-preview-root"},Hu={class:"ocr-img-preview-window"},Uu={key:0,class:"img-preview-body"},qu={class:"img-preview-header"},Wu={class:"img-header-left"},Ku={class:"img-name"},Gu={key:0,class:"img-header-right"},Yu={class:"img-index"},Ju={key:0,class:"img-thumb-list"},Xu=["onClick"],Zu={key:1,class:"thumb-placeholder"},Qu={class:"thumb-name"},ed={class:"img-preview-container"},ad={key:0,class:"img-placeholder"},ld={key:2,class:"img-placeholder"},rd={key:0},nd={key:1},id={key:1,class:"img-placeholder"},od=e.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(a,{emit:l}){const n=a,r=l,o=e.computed({get:()=>n.visible,set:N=>r("update:visible",N)});let s=!1,h="",c=0,d=0,m=0,b=0,u=0,C=0,M=null;const k=N=>{var U,De;const oe=(De=(U=N==null?void 0:N.target)==null?void 0:U.closest)==null?void 0:De.call(U,".ocr-img-preview-window");return oe||document.querySelector(".ocr-img-preview-window")},W=N=>{if(!N||N==="none")return{tx:0,ty:0};let oe=N.match(/matrix\(([^)]+)\)/);if(oe){const U=oe[1].split(",").map(De=>Number(De.trim()));return{tx:(U==null?void 0:U[4])||0,ty:(U==null?void 0:U[5])||0}}if(oe=N.match(/matrix3d\(([^)]+)\)/),oe){const U=oe[1].split(",").map(De=>Number(De.trim()));return{tx:(U==null?void 0:U[12])||0,ty:(U==null?void 0:U[13])||0}}return oe=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),oe?{tx:Number(oe[1])||0,ty:Number(oe[2])||0}:{tx:0,ty:0}},I=(N,oe,U)=>{N.style.transform=`translate(${oe}px, ${U}px)`},j=N=>{const oe=k(N);if(!oe)return;s=!0,M=oe,h="move",c=N.clientX,d=N.clientY;const U=window.getComputedStyle(oe),{tx:De,ty:Ie}=W(U.transform);u=De,C=Ie,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},L=(N,oe)=>{const U=k(N);if(!U)return;s=!0,M=U,h=oe,c=N.clientX,d=N.clientY;const De=U.getBoundingClientRect();m=De.width,b=De.height;const Ie=window.getComputedStyle(U),{tx:je,ty:la}=W(Ie.transform);u=je,C=la,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},E=N=>{if(!s||!M)return;const oe=N.clientX-c,U=N.clientY-d,De=360,Ie=420;let je=m,la=b,Ta=u,ee=C;if(h==="move"){Ta=u+oe,ee=C+U,I(M,Ta,ee);return}if(h.includes("right")&&(je=Math.max(De,m+oe)),h.includes("bottom")&&(la=Math.max(Ie,b+U)),h.includes("left")){const ca=m-oe;ca<De?(je=De,Ta=u+(m-De)):(je=ca,Ta=u+oe)}if(h.includes("top")){const ca=b-U;ca<Ie?(la=Ie,ee=C+(b-Ie)):(la=ca,ee=C+U)}M.style.width=`${je}px`,M.style.height=`${la}px`,I(M,Ta,ee)},x=()=>{s=!1,h="",M=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)},w=e.ref([]),g=e.ref(!1);e.watch(()=>n.images,async N=>{if(!Array.isArray(N)||N.length===0){w.value=[];return}g.value=!0;const oe=[];for(const U of N)if(U.url&&!U.url.startsWith("blob:")&&!U.url.startsWith("http"))try{const De=await Tl.downloadFile(U.url),Ie=URL.createObjectURL(De);oe.push({...U,blobUrl:Ie})}catch(De){console.error(`Failed to load image for preview: ${U.url}`,De),oe.push({...U,blobUrl:""})}else oe.push({...U,blobUrl:U.url});w.value=oe,g.value=!1},{deep:!0,immediate:!0});const S=e.ref(0),$=e.ref(null),V=e.ref(null),ae=e.computed(()=>w.value[S.value]||null),Z=()=>{if(!w.value.length){S.value=0;return}if(n.defaultImageName){const N=w.value.findIndex(oe=>(oe==null?void 0:oe.name)===n.defaultImageName);S.value=N>=0?N:0}else S.value=0},ge=N=>{if(!w.value.length)return;const oe=Math.max(0,Math.min(N,w.value.length-1));S.value=oe},ze=()=>ge(S.value-1),F=()=>ge(S.value+1),ne=N=>{if(!N)return;const oe=w.value.findIndex(U=>(U==null?void 0:U.name)===N);oe>=0&&(S.value=oe)},J=()=>{if(!V.value)return;const N=V.value.parentElement;if(!N)return;const oe=N.getBoundingClientRect();V.value.width=oe.width,V.value.height=oe.height},se=()=>{var De,Ie;if(!V.value||!$.value||!n.focusedFieldName){V.value&&xi(V.value);return}const N=(De=$.value.$el)==null?void 0:De.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{se()})};return}const oe=((Ie=ae.value)==null?void 0:Ie.name)||"",U=ns(n.fieldMeta,n.focusedFieldName);if(!U){xi(V.value);return}if(U.imageName!==oe){xi(V.value);return}J(),Fu(V.value,N,U.bboxNorm)},Be=()=>{e.nextTick(()=>{J(),se()})};e.watch(()=>n.focusedFieldName,()=>{if(!o.value)return;const N=ns(n.fieldMeta,n.focusedFieldName);N!=null&&N.imageName&&ne(N.imageName),e.nextTick(()=>{se()})}),e.watch(()=>{var N;return(N=ae.value)==null?void 0:N.name},()=>{o.value&&e.nextTick(()=>{V.value&&xi(V.value),se()})}),e.watch(()=>n.visible,N=>{N?(Z(),e.nextTick(()=>{J(),se()})):V.value&&xi(V.value)}),e.watch(()=>n.defaultImageName,()=>{o.value&&Z()});let $e=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&($e=new ResizeObserver(()=>{J(),e.nextTick(()=>{se()})}),(N=V.value)!=null&&N.parentElement&&$e.observe(V.value.parentElement))}),e.onUnmounted(()=>{$e&&($e.disconnect(),$e=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)});const fe=()=>{V.value&&xi(V.value),r("update:visible",!1),r("close")};return(N,oe)=>{var la,Ta;const U=e.resolveComponent("el-button"),De=e.resolveComponent("el-image"),Ie=e.resolveComponent("Loading"),je=e.resolveComponent("el-icon");return o.value?(e.openBlock(),e.createElementBlock("div",ju,[oe[12]||(oe[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",Hu,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(j,["stop"])},[oe[8]||(oe[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:fe},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:oe[0]||(oe[0]=e.withModifiers(ee=>L(ee,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:oe[1]||(oe[1]=e.withModifiers(ee=>L(ee,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:oe[2]||(oe[2]=e.withModifiers(ee=>L(ee,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:oe[3]||(oe[3]=e.withModifiers(ee=>L(ee,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:oe[4]||(oe[4]=e.withModifiers(ee=>L(ee,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:oe[5]||(oe[5]=e.withModifiers(ee=>L(ee,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:oe[6]||(oe[6]=e.withModifiers(ee=>L(ee,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:oe[7]||(oe[7]=e.withModifiers(ee=>L(ee,"bottom-right"),["stop"]))},null,32),ae.value?(e.openBlock(),e.createElementBlock("div",Uu,[e.createElementVNode("div",qu,[e.createElementVNode("div",Wu,[e.createElementVNode("span",Ku,e.toDisplayString(ae.value.name?ae.value.name+(ae.value.url&&ae.value.url.lastIndexOf(".")!==-1?ae.value.url.substring(ae.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Gu,[e.createVNode(U,{size:"small",disabled:S.value===0,onClick:ze},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Yu,e.toDisplayString(S.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(U,{size:"small",disabled:S.value===w.value.length-1,onClick:F},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Ju,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ee,ca)=>(e.openBlock(),e.createElementBlock("div",{key:(ee.name||"")+"-"+ca,class:e.normalizeClass(["img-thumb-item",{active:ca===S.value}]),onClick:ue=>ge(ca)},[ee!=null&&ee.blobUrl?(e.openBlock(),e.createBlock(De,{key:0,src:ee.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ee.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Zu,"加载失败")),e.createElementVNode("div",Qu,e.toDisplayString(ee.name||"-"),1)],10,Xu))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ed,[g.value?(e.openBlock(),e.createElementBlock("div",ad,[e.createVNode(je,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Ie)]),_:1}),oe[11]||(oe[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(la=ae.value)!=null&&la.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(De,{ref_key:"imageRef",ref:$,src:ae.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[ae.value.blobUrl],onLoad:Be},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:V,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",ld,[(Ta=ae.value)!=null&&Ta.url?(e.openBlock(),e.createElementBlock("span",rd,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",nd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",id,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),td=Xl._export_sfc(od,[["__scopeId","data-v-48a4ecb1"]]),sd={class:"cert-preview-body"},cd={key:0,class:"pdf-preview-container"},ud={class:"thumbs"},dd=["onClick"],pd={class:"thumb-img"},fd=["src"],hd={key:1,class:"thumb-loading"},vd={class:"thumb-title"},md={class:"viewer"},yd={key:0,class:"viewer-img-wrap"},gd=["src"],bd={key:1,class:"viewer-loading"},kd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(""),s=e.ref(""),h=e.computed(()=>(n.versions||[]).find(k=>String(k.versionId)===String(o.value))),c=e.ref({}),d=e.ref(""),m=e.ref("证书附件.pdf"),b=()=>{try{Object.values(c.value||{}).forEach(k=>{k&&URL.revokeObjectURL(k)}),d.value&&URL.revokeObjectURL(d.value)}catch{}c.value={},d.value=""},u=async k=>{if(!k||k.fileType==="pdf")return;const W=Array.isArray(k.images)?k.images:[];for(const I of W){const j=I==null?void 0:I.url;if(!(!j||c.value[j]))try{const L=await A.platformDownloadFile({url:j}),E=URL.createObjectURL(L.data);c.value={...c.value,[j]:E}}catch{}}},C=async k=>{var I;if(!k||k.fileType!=="pdf"){d.value="";return}const W=k.sourceUrl||"";if(!W){d.value="";return}if(d.value){try{URL.revokeObjectURL(d.value)}catch{}d.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:W,versionId:k==null?void 0:k.versionId,certNo:k==null?void 0:k.certNo});const j=await A.platformDownloadFile({url:W});console.log("[CertificatePreview] PDF响应:",{url:W,status:j==null?void 0:j.status,size:(I=j==null?void 0:j.data)==null?void 0:I.size});const L=URL.createObjectURL(j.data);d.value=L;const E=k.certNo?String(k.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(j){console.error("[CertificatePreview] PDF加载失败:",{url:W,error:j}),d.value=""}};e.watch(()=>n.visible,async k=>{var I;if(!k){b();return}const W=(I=n.versions)==null?void 0:I[0];o.value=(W==null?void 0:W.versionId)||"",await u(W),await C(W)},{immediate:!0}),e.watch(()=>o.value,async()=>{var W,I;const k=h.value;if(!k){s.value="",d.value="";return}if(k.fileType==="pdf"){s.value="",await C(k);return}d.value="",s.value=((I=(W=k.images)==null?void 0:W[0])==null?void 0:I.url)||"",await u(k)},{immediate:!0});const M=()=>{r("update:visible",!1),b()};return e.onBeforeUnmount(()=>{b()}),(k,W)=>{const I=e.resolveComponent("el-empty"),j=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(x,{"model-value":k.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:M},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:M},{default:e.withCtx(()=>W[1]||(W[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[k.versions&&k.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:o.value,"onUpdate:modelValue":W[0]||(W[0]=w=>o.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.versions,w=>(e.openBlock(),e.createBlock(j,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",sd,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",cd,[d.value?(e.openBlock(),e.createBlock(nl.SsFilePreview,{key:1,fileName:m.value,blobUrl:d.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(I,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ud,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.images||[],g=>(e.openBlock(),e.createElementBlock("div",{key:g.url,class:e.normalizeClass(["thumb",{active:g.url===s.value}]),onClick:S=>s.value=g.url},[e.createElementVNode("div",pd,[c.value[g.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[g.url]},null,8,fd)):(e.openBlock(),e.createElementBlock("div",hd,"加载中"))]),e.createElementVNode("div",vd,e.toDisplayString(g.name),1)],10,dd))),128))]),e.createElementVNode("div",md,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[s.value]?(e.openBlock(),e.createElementBlock("div",yd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[s.value]},null,8,gd)])):(e.openBlock(),e.createElementBlock("div",bd,"加载中"))],64)):(e.openBlock(),e.createBlock(I,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),xd=Xl._export_sfc(kd,[["__scopeId","data-v-220703c0"]]),wd={class:"ocr-candidate-wrap"},_d={class:"ocr-candidate-left"},Sd={key:1},Ed={key:0},Cd={key:1},Dd={key:2},Bd={key:3},Td={key:0,class:"ocr-candidate-right"},Nd={class:"ocr-candidate-actions"},Ad={key:1},zd={class:"dialog-footer"},Md={__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(a,{emit:l}){const n=(S=[])=>{const $=[],V=ae=>{(ae||[]).forEach(Z=>{if(!Z)return;const ge=Z.children||Z.childrens||Z.columns;Array.isArray(ge)&&ge.length>0?V(ge):$.push(Z)})};return V(S),$},r=a,o=l,s=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowAdd)!==!1}),h=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowReplace)!==!1}),c=S=>{if(!S)return[];if(Array.isArray(S))return S;if(typeof S=="string")try{const $=JSON.parse(S);return Array.isArray($)?$:[]}catch{return[]}return[]},d=S=>{o("preview-file",S)},m=e.ref([]),b=e.ref(0),u=e.ref("");e.watch(()=>r.candidates,S=>{var $,V;m.value=(S||[]).map(ae=>({...ae,...(ae==null?void 0:ae.ocrRow)||{},selectedTargetId:(ae==null?void 0:ae.selectedTargetId)||"",__decision:ae==null?void 0:ae.__decision})),b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,S=>{var $,V;S&&(b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||"")});const C=e.computed(()=>{var $;const S=Number(b.value||0);return(($=m.value||[])==null?void 0:$[S])||null}),M=e.computed(()=>(n(r.columns||[])||[]).filter(V=>V&&V.prop).filter(V=>V.type!=="operate"&&V.label!=="操作"&&V.prop!=="operate")),k=e.computed(()=>M.value.filter(S=>S.label!=="证书附件"&&S.prop!=="证书附件")),W=S=>{if(!S)return;const $=(m.value||[]).findIndex(V=>(V==null?void 0:V.idx)===(S==null?void 0:S.idx));$>-1&&(b.value=$,u.value=(S==null?void 0:S.selectedTargetId)||"")},I=S=>{if(!S){u.value="";return}u.value=String((S==null?void 0:S.id)??"")},j=(S,$="")=>{const V=Number(b.value||0),ae=m.value||[],Z=ae[V];Z&&(Z.__decision=S,Z.selectedTargetId=$,u.value=$,m.value=[...ae])},L=()=>j("skip",""),E=()=>j("add",""),x=()=>{if(!u.value){Ua.ElMessage.warning("请先选择要替换的目标记录");return}j("replace",u.value)},w=()=>{o("update:visible",!1)},g=()=>{const S=m.value||[];if(S.find(V=>(V==null?void 0:V.__decision)==="replace"&&!(V!=null&&V.selectedTargetId))){Ua.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}o("submit",S),o("update:visible",!1)};return(S,$)=>{const V=e.resolveComponent("el-table-column"),ae=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-table"),ge=e.resolveComponent("el-button"),ze=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var F,ne;return[e.createElementVNode("div",wd,[e.createElementVNode("div",_d,[$[0]||($[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Z,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:W},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:se})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(se==null?void 0:se[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Be=>d({row:se,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Sd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((se==null?void 0:se[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(V,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:J})=>[e.createTextVNode(e.toDisplayString(((J==null?void 0:J.candidates)||[]).length),1)]),_:1}),e.createVNode(V,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:J})=>[(J==null?void 0:J.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Ed,"替换")):(J==null?void 0:J.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Cd,"新增")):(J==null?void 0:J.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Dd,"跳过")):(e.openBlock(),e.createElementBlock("span",Bd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Td,[$[4]||($[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Nd,[e.createVNode(ge,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(ge,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>$[2]||($[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ge,{class:"ok-button",id:"themeButton",onClick:x,disabled:!h.value||!u.value},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((F=C.value)==null?void 0:F.candidates)||[]).length===0?(e.openBlock(),e.createBlock(ze,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Z,{data:((ne=C.value)==null?void 0:ne.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:I,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:se})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(se==null?void 0:se[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Be=>d({row:se,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Ad,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((se==null?void 0:se[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",zd,[e.createVNode(ge,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>$[5]||($[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(ge,{class:"ok-button",id:"themeButton",onClick:g},{default:e.withCtx(()=>$[6]||($[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Id=Xl._export_sfc(Md,[["__scopeId","data-v-89e0489c"]]),Od={class:"ocr-preview-content"},Ld={class:"ocr-preview-tip"},Rd={class:"ocr-preview-table"},$d={style:{display:"flex","align-items":"center",gap:"8px"}},Vd={class:"dialog-footer"},Pd={__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(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref([]),h=e.ref([]);e.watch(()=>n.visible,M=>{M&&(o.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),h.value=[...n.ocrSelectedFields])});const c=(M,k)=>{const W=[...h.value];if(k)W.includes(M)||W.push(M);else{const I=W.indexOf(M);I>-1&&W.splice(I,1)}h.value=W,r("update:ocrSelectedFields",W)},d=(M,k,W)=>{r("fieldChange",{rowIndex:M,prop:k,value:W})},m=()=>{r("update:ocrPreviewData",o.value),r("confirm",o.value),r("update:visible",!1)},b=()=>{r("update:visible",!1)},u=M=>typeof M!="number"?"-":`${(M*100).toFixed(1)}%`,C=M=>typeof M!="number"?"#606266":M>=.9?"#67c23a":M>=.7?"#e6a23c":"#f56c6c";return(M,k)=>{const W=e.resolveComponent("el-alert"),I=e.resolveComponent("el-table-column"),j=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),x=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:b,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Od,[e.createElementVNode("div",Ld,[e.createVNode(W,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Rd,[e.createVNode(E,{data:o.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(I,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",$d,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j,{key:0,"model-value":h.value.includes(w.prop),onChange:g=>c(w.prop,g),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:g,$index:S})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:C(g[w.prop]),fontWeight:500})},e.toDisplayString(u(g[w.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:g[w.prop],"onUpdate:modelValue":$=>g[w.prop]=$,size:"small",placeholder:"请输入"+w.label,onChange:$=>d(S,w.prop,$)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Vd,[e.createVNode(x,{onClick:b,id:"themeBorderButton"},{default:e.withCtx(()=>k[1]||(k[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(x,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Fd=Xl._export_sfc(Pd,[["__scopeId","data-v-df66eb1f"]]),ni=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=ce.analyzeSplitToContent(l,","))==null?void 0:r.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),pn(o)));return n=n==null?void 0:n.join(","),n};function Zs(a){return Ua.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function jd(a){return Ua.axios.get(a,{responseType:"blob"})}let Kl="$R",Hd="http://222.92.178.198:55002/AIRobot",st=["Form","BarChart","FormText","FormBlock"];const Qs=a=>{var n,r;let l=(r=ce.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=ce.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(st!=null&&st.some(o=>l==null?void 0:l.includes(o)))},Ud=async(a,l,n,r)=>{var s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca;let o=a;if(Qs(o==null?void 0:o[0])){let ue=Xd(o),ta=(s=ue==null?void 0:ue.filter)==null?void 0:s.join(","),Se=[];(h=ue==null?void 0:ue.hideContents)==null||h.forEach(We=>{if(We){const sa=We;sa&&Se.push(`(HideGroup=Yes, prop=${sa})`)}});let te=(c=ue==null?void 0:ue.formContents)==null?void 0:c.filter(We=>{var sa;return(sa=We==null?void 0:We.filters)==null?void 0:sa.includes("@ShowHide=Hide")});(te==null?void 0:te.length)>0&&(te==null||te.forEach(We=>{if(We){const sa=We==null?void 0:We.prop;sa&&Se.push(`(Hide=Yes, prop=${sa})`)}}));let Ne=(r==null?void 0:r.menuFilter)??[];return Array.isArray(Ne)||(Ne=Ne?[Ne]:[]),Ne=[...Ne,...Se],{key:"Form",name:ue==null?void 0:ue.groupName,value:ue==null?void 0:ue.formContents,contents:Array.isArray((d=ue==null?void 0:ue.contents)==null?void 0:d[0])&&((b=(m=ue==null?void 0:ue.contents)==null?void 0:m[0])!=null&&b.every(We=>Array.isArray(We)))?[(C=(u=ue==null?void 0:ue.contents)==null?void 0:u[0])==null?void 0:C[n]]:[ue==null?void 0:ue.contents],filter:"("+ta+")",menuFilter:Ne,groupFilter:ue==null?void 0:ue.groupFilters}}else if(((M=o==null?void 0:o[0])==null?void 0:M[0])!=="&"){let ue=lc(o,r),ta="";(k=ue==null?void 0:ue.tableFilter)!=null&&k.includes(Kl)?ue.tableFilter=(W=ue==null?void 0:ue.tableFilter)==null?void 0:W.replace(Kl,""):ta=(L=(j=(I=ue==null?void 0:ue.tableFilter)==null?void 0:I.replace("(",Kl))==null?void 0:j.split(Kl))==null?void 0:L[0];let Se=[];ue!=null&&ue.tableFilter&&((E=ce.analyzeSplitToContent(ue==null?void 0:ue.tableFilter,","))==null||E.forEach(Ne=>{Ne!=null&&Ne.includes("@ShowHide=Hide")&&Se.push("HideGroup=Yes")}));let te=(r==null?void 0:r.menuFilter)??[];return Array.isArray(te)||(te=te?[te]:[]),te=[...te,...Se],{key:"Table",name:ue==null?void 0:ue.groupName,tableColumns:ue==null?void 0:ue.tableColumns,assistColumn:ue==null?void 0:ue.columns,tableContents:l===1?ue==null?void 0:ue.tableContents:(w=(x=ue==null?void 0:ue.tableContents)==null?void 0:x[n])!=null&&w.every(Ne=>Array.isArray(Ne))?(g=ue==null?void 0:ue.tableContents)==null?void 0:g[n]:[(S=ue==null?void 0:ue.tableContents)==null?void 0:S[n]],filter:ue==null?void 0:ue.tableFilter,menuFilter:te,quotePage:ta!==""?((ae=(V=($=ta==null?void 0:ta.replace("*",Kl))==null?void 0:$.split(Kl))==null?void 0:V[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:ta!==""?((se=(J=(ne=(F=(ze=(ge=(Z=ta==null?void 0:ta.replace("*",Kl))==null?void 0:Z.split(Kl))==null?void 0:ge[1])==null?void 0:ze.replace("{",Kl))==null?void 0:F.split(Kl))==null?void 0:ne[0])==null?void 0:J.split(":"))==null?void 0:se.filter(Ne=>Ne!==""))??[]:[],relatedQuotes:ue==null?void 0:ue.relatedQuotes,fatherSyncContents:ue==null?void 0:ue.fatherSyncContents,sonSyncContents:ue==null?void 0:ue.sonSyncContents}}else{let ue=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ta=o==null?void 0:o[0];ta=ta==null?void 0:ta.slice(1,ta==null?void 0:ta.length),ta=ce.analyzeSplitToContent(ta,":"),ta=ta==null?void 0:ta[(ta==null?void 0:ta.length)-1];let Se=[];Se.push("1");let te=ta==null?void 0:ta.replace("(",Kl);te=(Be=te==null?void 0:te.split(Kl))==null?void 0:Be[0],Se.push(te);let Ne=ta==null?void 0:ta.replace("(",Kl);if(Ne=($e=Ne==null?void 0:Ne.split(Kl))==null?void 0:$e[1],Ne=(N=(fe=Ne==null?void 0:Ne.replace(")",Kl))==null?void 0:fe.split(Kl))==null?void 0:N[0],(U=(oe=Ne==null?void 0:Ne.replace(",",Kl))==null?void 0:oe.split(Kl))==null||U.forEach(We=>{Se.push(We)}),Se.push(""),Se.push(""),(De=Se==null?void 0:Se[2])!=null&&De.includes(".xlsx")||(Ie=Se==null?void 0:Se[2])!=null&&Ie.includes(".xls"))try{let We=Hd+"/"+(Se==null?void 0:Se[2]),sa=await jd(We),Ya=`生成js函数名称为${Se==null?void 0:Se[1]}的函数,规则为:`+(Se==null?void 0:Se[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((sa==null?void 0:sa.status)===200){let R=sa==null?void 0:sa.data;const H=new FormData;H.append("file",R,Se==null?void 0:Se[2]),H.append("query",Ya);let X=await Zs(H);X=(Ta=(la=(je=X==null?void 0:X.data)==null?void 0:je.data)==null?void 0:la.response)==null?void 0:Ta.replace("generateResult",Se==null?void 0:Se[1]),Se[Se.length-2]=X,Se[Se.length-1]=[{name:(ca=(ee=Se==null?void 0:Se[2])==null?void 0:ee.split("."))==null?void 0:ca[0],url:We}]}}catch{}return Se=[Se],{key:"Method",name:[],tableContents:Se,tableColumns:ue}}},qd=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se;let n=(o=(r=ce.analyzeSplitToContent(a,"="))==null?void 0:r.filter(te=>te!=="="))==null?void 0:o.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));if(Qs(n==null?void 0:n[1])){let te=Jd(n),Ne=(c=(h=(s=te==null?void 0:te.filter)==null?void 0:s.replace("@",Kl))==null?void 0:h.split(Kl))==null?void 0:c[0],We=(b=(m=(d=te==null?void 0:te.filter)==null?void 0:d.replace("(",Kl))==null?void 0:m.split(Kl))==null?void 0:b[1],sa=(M=(C=(u=te==null?void 0:te.filter)==null?void 0:u.replace("(",Kl))==null?void 0:C.split(Kl))==null?void 0:M[0];sa="@"+((k=sa==null?void 0:sa.split("@"))==null?void 0:k[1]),We=We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1),We=(I=(W=ce.analyzeSplitToContent(We,","))==null?void 0:W.map(R=>(R=sa+R,R)))==null?void 0:I.join("");let Ya=Ne+"("+We+")";return{key:"Form",name:te==null?void 0:te.group,filter:Ya,formPage:((E=(L=(j=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:j.split(Kl))==null?void 0:L[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((ae=(V=($=(S=(g=(w=(x=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:x.split(Kl))==null?void 0:w[1])==null?void 0:g.replace("{",Kl))==null?void 0:S.split(Kl))==null?void 0:$[0])==null?void 0:V.split(":"))==null?void 0:ae.filter(R=>R!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let te=lc(n,l,n==null?void 0:n[1]),Ne="";(Z=te==null?void 0:te.tableFilter)!=null&&Z.includes(Kl)?te.tableFilter=(ge=te==null?void 0:te.tableFilter)==null?void 0:ge.replace(Kl,""):Ne=(ne=(F=(ze=te==null?void 0:te.tableFilter)==null?void 0:ze.replace("(",Kl))==null?void 0:F.split(Kl))==null?void 0:ne[0];let We=(Be=(se=(J=te==null?void 0:te.tableFilter)==null?void 0:J.replace("(",Kl))==null?void 0:se.split(Kl))==null?void 0:Be[0];We=[{menus:(fe=($e=We==null?void 0:We.split("*"))==null?void 0:$e[0])==null?void 0:fe.replaceAll(":","/"),groups:((oe=(N=We==null?void 0:We.split("*"))==null?void 0:N[1])==null?void 0:oe.split(":"))??[]}];let sa=(Ie=(De=(U=te==null?void 0:te.tableFilter)==null?void 0:U.replace("(",Kl))==null?void 0:De.split(Kl))==null?void 0:Ie[1];(sa==null?void 0:sa[(sa==null?void 0:sa.length)-1])===")"&&(sa=sa==null?void 0:sa.slice(0,(sa==null?void 0:sa.length)-1));let Ya=[];te!=null&&te.tableFilter&&((je=ce.analyzeSplitToContent(te==null?void 0:te.tableFilter,","))==null||je.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ya.push("HideGroup=Yes")}));let R=(l==null?void 0:l.menuFilter)??[];return Array.isArray(R)||(R=R?[R]:[]),R=[...R,...Ya],{key:"Table",name:te==null?void 0:te.groupName,filter:te==null?void 0:te.tableFilter,tableColumns:te==null?void 0:te.tableColumns,quotePage:Ne!==""?((ee=(Ta=(la=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:la.split(Kl))==null?void 0:Ta[0])==null?void 0:ee.replaceAll(":","/"))??"":void 0,quoteGroup:Ne!==""?((Se=(ta=(ue=(ca=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:ca.split(Kl))==null?void 0:ue[1])==null?void 0:ta.split(":"))==null?void 0:Se.filter(H=>H!==""))??[]:[],menuFilter:R,relatedQuotes:We,fatherSyncContents:(te==null?void 0:te.fatherSyncContents)??[],sonSyncContents:(te==null?void 0:te.sonSyncContents)??[]}}},Wd=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(o,s)=>{let h=[];o=o==null?void 0:o.map(async c=>{var d,m;if(h.push(c),((d=ce.analyzeSplitToContent(a,"="))==null?void 0:d.length)<=2){if(((m=ce.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const b=await Ud(ce.analyzeSplitToContent(a,"="),r,s,c);h.push(b)}}else h.push(qd(a,c))}),await Promise.all(o),n.push(h)}),await Promise.all(l),n};let Fi="/",Kd="$",kn="$R";const ec=a=>{var n,r,o;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((h,c)=>c!==0);s=s==null?void 0:s.join(""),s=ce.analyzerSplitToWord(s,")"),(s==null?void 0:s.length)!==1?(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"?s=s==null?void 0:s.join(""):s=(n=s==null?void 0:s.filter((h,c)=>c!==(s==null?void 0:s.length)-1))==null?void 0:n.join(""):s=s==null?void 0:s[0],l="("+s,((o=a==null?void 0:a[0])==null?void 0:o[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},ac=(a,l=[])=>{let n=(a==null?void 0:a.map(s=>{var h,c;return(c=s==null?void 0:s.key)==null?void 0:c.slice(1,(h=s==null?void 0:s.key)==null?void 0:h.length)}))??[],r=[];n==null||n.forEach(s=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Kd)){let ze="",F=!0,ne=ce.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(ze="("+((h=ce.analyzerSplitToWord(ne==null?void 0:ne[1],")"))==null?void 0:h[0]),((d=ne==null?void 0:ne[0])==null?void 0:d[((c=ne==null?void 0:ne[0])==null?void 0:c.length)-2])==="@"&&(ze="@"+ze));let J=s;J=J==null?void 0:J.replace(ze,""),ze=pn(ze),ze=(m=ce.analyzeSplitToContent(ze,","))==null?void 0:m.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe)),ze!=null&&ze.includes("@ShowHide=Hide")&&(F=!1);let se=(b=J==null?void 0:J.replace("$",kn))==null?void 0:b.split(kn),Be=se==null?void 0:se[1],$e=se==null?void 0:se[0];$e!=null&&$e.includes("[")&&($e=(C=(u=$e==null?void 0:$e.replace("[",kn))==null?void 0:u.split(kn))==null?void 0:C[0],Be=Be+":["+((W=(k=(M=se==null?void 0:se[0])==null?void 0:M.replace("[",kn))==null?void 0:k.split(kn))==null?void 0:W[1])),$e=(j=(I=$e==null?void 0:$e.replaceAll(":","/"))==null?void 0:I.replaceAll("{",""))==null?void 0:j.replaceAll("}",""),($e==null?void 0:$e[($e==null?void 0:$e.length)-1])!=="/"&&($e=$e+"/"),Be=((L=$e==null?void 0:$e.split("/"))==null?void 0:L[0])+":"+Be;let N="";if(!(Be!=null&&Be.includes("[")))N=Be==null?void 0:Be.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:ze,fatherPath:$e});else{let oe=(x=(E=Be==null?void 0:Be.replace("[",kn))==null?void 0:E.split(kn))==null?void 0:x[1];oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1),oe=(w=ce.analyzeSplitToContent(oe,","))==null?void 0:w.map(U=>((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)),U)),oe==null||oe.forEach(U=>{var De,Ie;N=((Ie=(De=Be==null?void 0:Be.replace("[",kn))==null?void 0:De.split(kn))==null?void 0:Ie[0])+U,N=N==null?void 0:N.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:ze,fatherPath:$e})})}}else{let ze="",F=!0,ne=ce.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(ze=(g=ec(ne))==null?void 0:g.filter);let J=s;if(J=J==null?void 0:J.replace(ze,""),(ze==null?void 0:ze[0])==="("){ze=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1);let Be=[];(S=ce.analyzeSplitToContent(ze,","))==null||S.forEach($e=>{($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==null?void 0:$e[0])==="("&&($e=$e==null?void 0:$e.slice(1,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])!=="@"&&($e="@"+$e),Be.push(pn($e))}),ze=Be==null?void 0:Be.join(",")}else ze=pn(ze);ze=($=ce.analyzeSplitToContent(ze,","))==null?void 0:$.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)),ze!=null&&ze.includes("@ShowHide=Hide")&&(F=!1),(J==null?void 0:J[(J==null?void 0:J.length)-1])==="}"&&(J=J+":"),J=(V=J==null?void 0:J.replaceAll("{",""))==null?void 0:V.replaceAll("}","");let se="";if(J!=null&&J.includes("[")){let Be=(ae=J==null?void 0:J.replace("[",kn))==null?void 0:ae.split(kn),$e=Be==null?void 0:Be[1];$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),(ge=(Z=ce.analyzeSplitToContent($e,","))==null?void 0:Z.map(fe=>((fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])===","&&(fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1)),fe)))==null||ge.forEach(fe=>{se=(Be==null?void 0:Be[0])+fe,se=se==null?void 0:se.replaceAll(":","/"),r==null||r.push({path:se,isShow:F,filter:ze})})}else se=J==null?void 0:J.replaceAll(":","/"),r==null||r.push({path:se,isShow:F,filter:ze})}});let o=A.cloneDeep(r);return(l==null?void 0:l.length)>0&&(o=l),o=o==null?void 0:o.filter(s=>{var h,c,d,m;return!(s!=null&&s.fatherPath)&&((c=(h=s==null?void 0:s.path)==null?void 0:h.split(Fi))==null?void 0:c.length)>1&&((m=(d=s==null?void 0:s.path)==null?void 0:d.split(Fi))==null?void 0:m[1])===""}),o=o==null?void 0:o.map(s=>{var h;return s.path=(h=s.path)==null?void 0:h.replace(Fi,""),s.path}),(o==null?void 0:o.length)>0&&(r=r==null?void 0:r.map(s=>{var c,d,m,b,u,C,M;let h=o==null?void 0:o.find(k=>{var W;return(W=s==null?void 0:s.path)==null?void 0:W.includes(k)});return!(s!=null&&s.fatherPath)&&h&&!((c=s==null?void 0:s.path)!=null&&c.includes(Fi))&&!(o!=null&&o.find(k=>(s==null?void 0:s.path)===k))&&(s.path=h+Fi+((M=(m=(d=s==null?void 0:s.path)==null?void 0:d.split(h))==null?void 0:m[1])==null?void 0:M.slice(1,(C=(u=(b=s==null?void 0:s.path)==null?void 0:b.split(h))==null?void 0:u[1])==null?void 0:C.length))),s})),r},Gd=(a,l)=>ac([{key:a}],l),Yd=async(a,l)=>{const n=[],r=Gd(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(s=>{n.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await Wd(a==null?void 0:a.value,n)};let gl="$R",Hi="[Any]";const Jd=a=>{var h,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let o=a==null?void 0:a[1],s;return o!=null&&o.includes("{")?s=(c=(h=o==null?void 0:o.replaceAll("{",""))==null?void 0:h.replaceAll("}",""))==null?void 0:c.replaceAll(Hi,""):s=o==null?void 0:o.replaceAll(Hi,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},Xd=a=>{var C,M,k,W,I,j;let l=[],n=[],r=[],o=[],s=[],h=[],c="",d=a==null?void 0:a[0];(d==null?void 0:d[0])==="*"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length));let m=ce.analyzeSplitToContent(d,":");(C=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||C.forEach(L=>{var x,w,g;(L==null?void 0:L[(L==null?void 0:L.length)-1])===":"&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1));let E=ce.analyzerSplitToWord(L,"(");if((E==null?void 0:E.length)>1){c=(x=ec(E))==null?void 0:x.filter;let S=L==null?void 0:L.replace(c,"");if(r.push(S),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let $=[];(w=ce.analyzeSplitToContent(c,","))==null||w.forEach(V=>{(V==null?void 0:V[(V==null?void 0:V.length)-1])===","&&(V=V==null?void 0:V.slice(0,(V==null?void 0:V.length)-1)),(V==null?void 0:V[0])==="("&&(V=V==null?void 0:V.slice(1,(V==null?void 0:V.length)-1)),(V==null?void 0:V[0])!=="@"&&(V="@"+V),$.push(pn(V))}),c=$==null?void 0:$.join(",")}else c=pn(c);c=(g=ce.analyzeSplitToContent(c,","))==null?void 0:g.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$)),c!=null&&c.includes("@ShowHide=Hide")&&h.push(S),o=[...o,...c]}else r.push(E==null?void 0:E[0])});let b=(M=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:M[0],u=(k=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:k[0];return l=Di(u??""),l!=null&&l.every(L=>Array.isArray(L))&&(l=[l]),(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)),s=(W=ce.analyzeSplitToContent(b,"@"))==null?void 0:W[1],s="@"+s,b=b==null?void 0:b.replace(s,""),s=pn(s),s=(I=ce.analyzeSplitToContent(s,","))==null?void 0:I.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),(b==null?void 0:b[0])==="{"&&(b=b==null?void 0:b.slice(1,(b==null?void 0:b.length)-1)),b=(j=ce.analyzeSplitToContent(b,","))==null?void 0:j.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),b==null||b.forEach((L,E)=>{var se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa;let x=[],w=[],g=[],S="",$="",V=!1,ae,Z=[],ge=[],ze=[],F="Input",ne=[],J=[];if(L!=null&&L.includes("==")){ae=(se=L==null?void 0:L.split("=="))==null?void 0:se[0];let Ca=(Be=L==null?void 0:L.split("=="))==null?void 0:Be[1],Ae="";(($e=ce.analyzeSplitToContent(Ca,"$"))==null?void 0:$e.length)>1&&((fe=ce.analyzeSplitToContent(Ca,"$"))==null?void 0:fe[0])!=="$"?(Ae=(N=ce.analyzeSplitToContent(Ca,"$"))==null?void 0:N[0],Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1)):((oe=ce.analyzeSplitToContent(Ca,"}"))==null?void 0:oe.length)>1&&(Ae=(U=ce.analyzeSplitToContent(Ca,"}"))==null?void 0:U[1]);let he=Ca==null?void 0:Ca.replace(Ae,"");if((Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),(De=ce.analyzeSplitToContent(Ae,","))==null||De.forEach(Y=>{var me;(Y==null?void 0:Y[0])!=="@"&&(Y="@"+Y),(Y==null?void 0:Y[(Y==null?void 0:Y.length)-1])===","&&(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1));let xe=pn(Y);(me=ce.analyzeSplitToContent(xe,","))==null||me.forEach(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)),x.push(qe)})}),(he==null?void 0:he[0])==="$"&&(he=he==null?void 0:he.slice(1,he==null?void 0:he.length)),he!=null&&he.includes("&")){let Y=he;if((he==null?void 0:he[0])==="("){let me=(Ie=ce.analyzeSplitToContent(he,"&"))==null?void 0:Ie.map(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));Y=me==null?void 0:me[1],me=me==null?void 0:me[0],(me==null?void 0:me[0])!=="@"&&(me="@"+me),S=pn(me)}(Y==null?void 0:Y[0])==="&"&&(Y=Y==null?void 0:Y.slice(1,Y==null?void 0:Y.length)),$=(la=(je=Y==null?void 0:Y.replace("(",gl))==null?void 0:je.split(gl))==null?void 0:la[0],g=(ee=(Ta=Y==null?void 0:Y.replace("(",gl))==null?void 0:Ta.split(gl))==null?void 0:ee[1],g=[g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)],F="Input"}else{let Y=(ca=he==null?void 0:he.replace("*",gl))==null?void 0:ca.split(gl);Z=(ue=Y==null?void 0:Y[0])==null?void 0:ue.split(":"),ge=(Se=(ta=ce.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:ta.filter((xe,me)=>{var qe,da;return me!==((da=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:da.length)-1}))==null?void 0:Se.map(xe=>((xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===":"&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe)),ze=(Ne=(te=ce.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:te.filter((xe,me)=>{var qe,da;return me===((da=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:da.length)-1}))==null?void 0:Ne[0],ze=(sa=(We=ze==null?void 0:ze.replaceAll("{",""))==null?void 0:We.replaceAll("}",""))==null?void 0:sa.split(":"),F="Select"}}else if(((Ya=ce.analyzeSplitToContent(L,"="))==null?void 0:Ya.length)>1)if(F="Select",ae=(H=(R=L==null?void 0:L.replace("=",gl))==null?void 0:R.split(gl))==null?void 0:H[0],!(L!=null&&L.includes("If")))ne=(ve=(X=L==null?void 0:L.replace("=",gl))==null?void 0:X.split(gl))==null?void 0:ve[1],ne=ne==null?void 0:ne.split("||");else{let Ca=(va=(de=L==null?void 0:L.replace("=",gl))==null?void 0:de.split(gl))==null?void 0:va[1];J=(na=ce.analyzeSplitToContent(Ca,")"))==null?void 0:na.filter(Ae=>!(Ae!=null&&Ae.includes("If"))),J=J==null?void 0:J.map(Ae=>((Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),Ae=Ae==null?void 0:Ae.split("||"),Ae)),w=(Pe=ce.analyzeSplitToContent(Ca,")"))==null?void 0:Pe.filter(Ae=>Ae==null?void 0:Ae.includes("If")),w=w==null?void 0:w.map(Ae=>((Ae==null?void 0:Ae[0])==="|"&&(Ae=Ae==null?void 0:Ae.slice(2,Ae==null?void 0:Ae.length)),(Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),(Ae==null?void 0:Ae[0])!=="@"&&(Ae="@"+Ae),Ae))}else if(((xa=ce.analyzeSplitToContent(L,"@"))==null?void 0:xa.length)>1){ae=(Me=ce.analyzeSplitToContent(L,"@"))==null?void 0:Me[0],(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));let Ca="@"+((ma=ce.analyzeSplitToContent(L,"@"))==null?void 0:ma[1]);Ca=pn(Ca),x=(Oa=ce.analyzeSplitToContent(Ca,","))==null?void 0:Oa.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)),x!=null&&x.find(Ae=>Ae==null?void 0:Ae.includes("@Type"))&&(F=(pa=(za=x==null?void 0:x.find(Ae=>Ae==null?void 0:Ae.includes("@Type")))==null?void 0:za.split("="))==null?void 0:pa[1])}else ae=L;x!=null&&x.includes("@ShowHide=Hide")&&(V=!0),n.push({prop:ae,label:ae,value:"",menuPath:Z,groups:ge,columns:ze,type:F,options:ne,allContents:J,filters:x,width:b==null?void 0:b.length,isFormColHidden:V,filterContents:w,functionName:$,functionRelatedWords:g,calculatorFilter:S})}),{groupName:r,groupFilters:o,formContents:n,contents:l,filter:s,hideContents:h}},Di=a=>{var r,o;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=ce.analyzeSplitToContent(n,","))==null||r.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),l.push(s??"")});else{let s=[];(o=ce.analyzeSplitToContent(n,","))==null||o.forEach(h=>{(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)),s.push(Di(h))}),l=s}return l},ht=(a,l)=>{var j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da;let n,r=[],o=[],s=[],h=[],c=[],d=[],m=[],b="Input",u,C="",M="",k="",W=[],I="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],u=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],b="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(x=(E=a==null?void 0:a.replace("=",gl))==null?void 0:E.split(gl))==null?void 0:x[1])!=null&&w.includes("If")))if(n=ce.analyzeSplitToContent(a,"@"),n=n==null?void 0:n[0],(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=(S=(g=n==null?void 0:n.replace("=",gl))==null?void 0:g.split(gl))==null?void 0:S[0],n!=null&&n.includes("&")&&(n=(V=($=n==null?void 0:n.replace("&",gl))==null?void 0:$.split(gl))==null?void 0:V[0]),u=n,((ae=ce.analyzeSplitToContent(a,"@"))==null?void 0:ae.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Ke=(Z=ce.analyzeSplitToContent(a,"@"))==null?void 0:Z[1];if((Ke==null?void 0:Ke[0])!=="@"&&(Ke="@"+Ke),Ke=pn(Ke),M=Ke,M!=null&&M.includes("@Type")){let aa=ce.analyzeSplitToContent(M,",");aa=aa==null?void 0:aa.map(Ve=>((Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),Ve)),aa=(ge=aa==null?void 0:aa.filter(Ve=>Ve==null?void 0:Ve.includes("@Type")))==null?void 0:ge[0],b=(ze=aa==null?void 0:aa.split("="))==null?void 0:ze[1]}else b="Input"}}else if(a!=null&&a.includes("||")){let Ke=[];r=(J=(ne=(F=ce.analyzeSplitToContent(a,"="))==null?void 0:F[1])==null?void 0:ne.split("||"))==null?void 0:J.map(Ve=>{var pe,Sa,ya,vl;let ye=Ve;if(ye!=null&&ye.includes("@")){let Nl="@"+((Sa=(pe=ye==null?void 0:ye.replace("@",gl))==null?void 0:pe.split(gl))==null?void 0:Sa[1]);ye=(vl=(ya=ye==null?void 0:ye.replace("@",gl))==null?void 0:ya.split(gl))==null?void 0:vl[0],Nl=ni(Nl),Ke.push(Nl)}return{label:ye==null?void 0:ye.replaceAll("'",""),value:ye==null?void 0:ye.replaceAll("'","")}}),(Ke==null?void 0:Ke.length)>0&&(M="("+(Ke==null?void 0:Ke.join("||"))+")");let aa=(se=ce.analyzeSplitToContent(a,"="))==null?void 0:se[0];if(aa!=null&&aa.includes("@")){(aa==null?void 0:aa[(aa==null?void 0:aa.length)-1])==="="&&(aa=aa==null?void 0:aa.slice(0,(aa==null?void 0:aa.length)-1));let Ve=(Be=ce.analyzeSplitToContent(aa,"@"))==null?void 0:Be[1];Ve="@"+Ve,Ve=ni(Ve),M=M===""?Ve:Ve+","+M}}else b="Input",C=(N=(fe=($e=a==null?void 0:a.replace("=",gl))==null?void 0:$e.split(gl))==null?void 0:fe[1])==null?void 0:N.replaceAll("'","");else if((U=(oe=ce.analyzeSplitToContent(a,"="))==null?void 0:oe[1])!=null&&U.includes("||")){let Ke=(De=ce.analyzeSplitToContent(a,"="))==null?void 0:De[0];if((Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])==="="&&(Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1)),Ke!=null&&Ke.includes("@")){let pe=(Ie=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:Ie[1];pe="@"+pe,M=ni(pe),n=(ee=(je=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:je[0])==null?void 0:ee.slice(0,((Ta=(la=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:la[0])==null?void 0:Ta.length)-1),u=(Se=(ca=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:ca[0])==null?void 0:Se.slice(0,((ta=(ue=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:ue[0])==null?void 0:ta.length)-1)}else n=Ke,u=Ke;let aa=(te=ce.analyzeSplitToContent(a,"="))==null?void 0:te[1];aa=ce.analyzeSplitToContent(aa,")");let Ve=aa==null?void 0:aa.filter(pe=>!(pe!=null&&pe.includes("If")));Ve==null||Ve.forEach(pe=>{(pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),o==null||o.push(pe==null?void 0:pe.split("||"))});let ye=aa==null?void 0:aa.filter(pe=>pe==null?void 0:pe.includes("If"));ye=ye==null?void 0:ye.map(pe=>((pe==null?void 0:pe[0])==="|"&&(pe==null?void 0:pe[1])==="|"&&(pe=pe==null?void 0:pe.slice(2,pe==null?void 0:pe.length)),(pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),(pe==null?void 0:pe[0])!=="@"&&(pe="@"+pe),pe)),s=ye}else{let Ke=a==null?void 0:a.split("=="),aa=(Ne=Ke==null?void 0:Ke.filter(Ve=>(Ve==null?void 0:Ve.includes("$"))&&(Ve==null?void 0:Ve[0])!=="{"))==null?void 0:Ne[0];if(aa&&!(aa!=null&&aa.includes("&"))){let Ve=(We=aa==null?void 0:aa.replace("*",gl))==null?void 0:We.split(gl),ye=(Ve==null?void 0:Ve[0])===""?l==null?void 0:l.value:Ve==null?void 0:Ve[0];(ye==null?void 0:ye[0])==="("&&(ye=(sa=ce.analyzeSplitToContent(ye,")"))==null?void 0:sa[1]),ye=(R=(Ya=ye==null?void 0:ye.replaceAll("{",""))==null?void 0:Ya.replaceAll("}",""))==null?void 0:R.replaceAll(Hi,""),(ye==null?void 0:ye[0])==="$"&&(ye=(H=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length))==null?void 0:H.replaceAll(":","/")),h=ye==null?void 0:ye.split("/");let pe=(ve=(X=Ve==null?void 0:Ve[1])==null?void 0:X.replace("{",gl))==null?void 0:ve.split(gl),Sa=pe==null?void 0:pe[0];(Sa==null?void 0:Sa[(Sa==null?void 0:Sa.length)-1])===":"&&(Sa=Sa==null?void 0:Sa.slice(0,(Sa==null?void 0:Sa.length)-1)),c=Sa==null?void 0:Sa.split(":"),d=(Pe=(na=(va=(de=pe==null?void 0:pe[1])==null?void 0:de.replace("}",gl))==null?void 0:va.split(gl))==null?void 0:na[0])==null?void 0:Pe.split(":");let ya="";((xa=ce.analyzeSplitToContent(aa,")"))==null?void 0:xa.length)>1&&(ya=(Me=ce.analyzeSplitToContent(aa,")"))==null?void 0:Me[0]),ya&&ya!==""&&((ya==null?void 0:ya[0])!=="@"&&(ya="@"+ya),M=ni(ya))}if(Ke!=null&&Ke.some(Ve=>(Ve==null?void 0:Ve[0])==="&")){let Ve=(ma=Ke==null?void 0:Ke.filter(Sa=>(Sa==null?void 0:Sa[0])==="&"))==null?void 0:ma[0];(Ve==null?void 0:Ve[0])==="&"&&(Ve=Ve==null?void 0:Ve.slice(1,Ve==null?void 0:Ve.length)),k=(za=(Oa=Ve==null?void 0:Ve.replace("(",gl))==null?void 0:Oa.split(gl))==null?void 0:za[0];let ye=(pa=ce.analyzeSplitToContent(Ve,")"))==null?void 0:pa[0];ye=(Ae=(Ca=ye==null?void 0:ye.replace("(",gl))==null?void 0:Ca.split(gl))==null?void 0:Ae[1],ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1),(ye==null?void 0:ye[0])==="{"&&(ye=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length)),(ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])==="}"&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),W=ye==null?void 0:ye.split(",");let pe=(he=ce.analyzeSplitToContent(Ve,")"))==null?void 0:he[1];pe&&pe!==""&&(I=ni(pe))}else if(!aa&&((Y=Ke==null?void 0:Ke.filter(Ve=>(Ve==null?void 0:Ve[0])==="{"))==null?void 0:Y.length)>0){let Ve=Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1];Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=ce.analyzeSplitToContent(Ve,","),Ve=Ve==null?void 0:Ve.map(ye=>((ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])===","&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),ye)),Ve=Ve==null?void 0:Ve.map(ye=>{var pe,Sa,ya,vl;if(ye=ye==null?void 0:ye.replaceAll("$",""),ye!=null&&ye.includes("{")){let Nl="";ye=ye==null?void 0:ye.replaceAll("{","");let pl=ye==null?void 0:ye.split("}");Nl=((Sa=(pe=pl==null?void 0:pl[0])==null?void 0:pe.split(":"))==null?void 0:Sa[0])+":"+(pl==null?void 0:pl[1]),ye=Nl,ye=ye+":"}if(ye!=null&&ye.includes(Hi)){let Nl="",pl=ye==null?void 0:ye.split(Hi);Nl=((vl=(ya=pl==null?void 0:pl[0])==null?void 0:ya.split(":"))==null?void 0:vl[0])+":"+(pl==null?void 0:pl[1]),ye=Nl,ye=ye+":"}return ye=ye==null?void 0:ye.replaceAll(":","/"),ye}),m=Ve}else!((xe=Ke==null?void 0:Ke[1])!=null&&xe.includes("$"))&&((me=Ke==null?void 0:Ke[1])==null?void 0:me[0])!=="("&&d.push(Ke==null?void 0:Ke[1])}else n=(qe=a==null?void 0:a.split("&"))==null?void 0:qe[0],u=(da=a==null?void 0:a.split("&"))==null?void 0:da[0];return{label:n,prop:u,options:r,allContents:o,filterContents:s,menus:h,groups:c,words:d,align:"center",formType:b,filter:M,functionName:k,functionRelatedWords:W,calculatorFilter:I,relatedPages:m,value:C}},Co=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((h=(s=(o=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",gl))==null?void 0:o.split(gl))==null?void 0:s[0])!=null&&h.includes(","))){let se=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),Be=(c=se==null?void 0:se.replace(":",gl))==null?void 0:c.split(gl);if(((d=ce.analyzeSplitToContent(Be==null?void 0:Be[1],"="))==null?void 0:d.length)===1){let $e=Be==null?void 0:Be[0],fe=[];(u=ce.analyzeSplitToContent((b=Be==null?void 0:Be[1])==null?void 0:b.slice(1,((m=Be==null?void 0:Be[1])==null?void 0:m.length)-1),","))==null||u.forEach(N=>{var oe,U;((oe=ce.analyzeSplitToContent(N,"="))==null?void 0:oe.length)>1?((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)),fe=[...fe,...Co(N,l)]):((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)),fe.push((U=Co(N,l))==null?void 0:U[0]))}),n==null||n.push({label:$e,prop:$e,children:fe,align:"center"})}else{let $e=[];if(((C=ce.analyzeSplitToContent(se,"="))==null?void 0:C.length)>=2){let N=(M=ce.analyzeSplitToContent(se,"="))==null?void 0:M[1],oe=(k=ce.analyzeSplitToContent(N,"/"))==null?void 0:k.map(U=>((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)),U));$e=oe==null?void 0:oe.map(U=>(U=Di(U),U))}let fe=(x=(E=(L=(j=(I=(W=se==null?void 0:se.replace("{",gl))==null?void 0:W.split(gl))==null?void 0:I[1])==null?void 0:j.replace("}",gl))==null?void 0:L.split(gl))==null?void 0:E[0])==null?void 0:x.split(",");fe==null||fe.forEach((N,oe)=>{($e==null?void 0:$e.length)>0&&oe===0?n==null||n.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:$e==null?void 0:$e.map(U=>{let De={};return fe==null||fe.forEach((Ie,je)=>{De[Ie]=U==null?void 0:U[je]}),De}),options:$e==null?void 0:$e.map(U=>({label:U==null?void 0:U[0],value:U==null?void 0:U[0]})),mainKey:!0}):n==null||n.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=ce.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((S=(g=ce.analyzeSplitToContent(a,"="))==null?void 0:g[1])==null?void 0:S[0])==="["){let se=[];if((($=ce.analyzeSplitToContent(a,"="))==null?void 0:$.length)>=2){let $e=(V=ce.analyzeSplitToContent(a,"="))==null?void 0:V[1],fe=(Z=(ae=ce.analyzeSplitToContent($e,"|"))==null?void 0:ae.filter(N=>N!=="|"))==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));se=fe==null?void 0:fe.map(N=>(N=Di(N),N))}let Be=(ze=(ge=a==null?void 0:a.replace("}",gl))==null?void 0:ge.split(gl))==null?void 0:ze[0];Be=(F=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length))==null?void 0:F.split(","),Be==null||Be.forEach(($e,fe)=>{(se==null?void 0:se.length)>0&&fe===0?n==null||n.push({label:$e,prop:$e,align:"center",formType:"Select",relatedContents:se==null?void 0:se.map(N=>{let oe={};return Be==null||Be.forEach((U,De)=>{oe[U]=N==null?void 0:N[De]}),oe}),options:se==null?void 0:se.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):n==null||n.push({label:$e,prop:$e,align:"center"})})}else(ne=ce.analyzeSplitToContent(a,","))==null||ne.forEach(se=>{var Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae;if((se==null?void 0:se[(se==null?void 0:se.length)-1])===","&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),(se==null?void 0:se[0])==="{"){let he=ce.analyzeSplitToContent(se,"="),Y=he==null?void 0:he[(he==null?void 0:he.length)-1],xe=[],me=[],qe=[],da="",Ke="",aa=[],Ve=[],ye=(Be=Y==null?void 0:Y.replace("*",gl))==null?void 0:Be.split(gl),pe=(ye==null?void 0:ye[0])===""?l==null?void 0:l.value:ye==null?void 0:ye[0];pe=ce.analyzeSplitToContent(pe,")");let Sa="";if((pe==null?void 0:pe.length)>1&&(($e=pe==null?void 0:pe[0])==null?void 0:$e[0])!=="&"&&(Sa=pe==null?void 0:pe[0],(Sa==null?void 0:Sa[0])!=="@"&&(Sa="@"+Sa),Ke=Sa??""),pe=(fe=pe==null?void 0:pe.filter(pl=>(pl==null?void 0:pl[0])==="$"))==null?void 0:fe[0],((N=ce.analyzeSplitToContent(pe,"}"))==null?void 0:N.length)>1&&((U=(oe=ce.analyzeSplitToContent(pe,"}"))==null?void 0:oe[1])==null?void 0:U[0])==="("&&(Sa=(De=ce.analyzeSplitToContent(pe,"}"))==null?void 0:De[1],(Sa==null?void 0:Sa[0])!=="@"&&(Sa="@"+Sa),Ke!==""&&(Ke=Ke+","),Ke=Ke+Sa),(Ie=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1))!=null&&Ie.includes("$")||(pe=(je=ce.analyzeSplitToContent(pe,"}"))==null?void 0:je[0]),(pe==null?void 0:pe[0])==="$"&&(pe=(la=pe==null?void 0:pe.replace("{",""))==null?void 0:la.replace("}",":"),pe=(Ta=pe==null?void 0:pe.slice(1,pe==null?void 0:pe.length))==null?void 0:Ta.replaceAll(":","/")),pe!=null&&pe.includes("$")){let pl=(ee=pe==null?void 0:pe.split("$"))==null?void 0:ee[0];pl=(ca=pl==null?void 0:pl.split("/"))==null?void 0:ca[0],pe=pl+"/"+((ue=pe==null?void 0:pe.split("$"))==null?void 0:ue[1])+"/"}xe=(pe==null?void 0:pe.split("/"))??[];let ya=(Se=(ta=ye==null?void 0:ye[1])==null?void 0:ta.replace("{",gl))==null?void 0:Se.split(gl);if((We=(Ne=(te=ye==null?void 0:ye[1])==null?void 0:te.split("(@"))==null?void 0:Ne[0])!=null&&We.includes("&&")||(R=(Ya=(sa=ye==null?void 0:ye[1])==null?void 0:sa.split("@"))==null?void 0:Ya[0])!=null&&R.includes("&&")){let pl=(H=ye==null?void 0:ye[1])!=null&&H.includes("(@")?(de=(ve=(X=ye==null?void 0:ye[1])==null?void 0:X.split("(@"))==null?void 0:ve[0])==null?void 0:de.split("&&"):(Pe=(na=(va=ye==null?void 0:ye[1])==null?void 0:va.split("@"))==null?void 0:na[0])==null?void 0:Pe.split("&&");aa=pl==null?void 0:pl.map(ja=>{var jl,Rl;return(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=(Rl=(jl=ja==null?void 0:ja.replace("{",gl))==null?void 0:jl.split(gl))==null?void 0:Rl[0],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])===":"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(":"),ja});let Fl=[];pl==null||pl.forEach((ja,jl)=>{var Rl,Da;(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=(Da=(Rl=ja==null?void 0:ja.replace("{",gl))==null?void 0:Rl.split(gl))==null?void 0:Da[1],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])==="}"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(","),Fl.push(jl===0?(ja==null?void 0:ja.length)-1:ja==null?void 0:ja.length),Ve=[...Ve,...ja]}),Fl=(xa=ce.prefixSum(Fl))==null?void 0:xa.map(ja=>ja==null?void 0:ja.total),aa=aa==null?void 0:aa.map((ja,jl)=>({number:Fl==null?void 0:Fl[jl],contents:ja}))}let vl=ya==null?void 0:ya[0];(vl==null?void 0:vl[(vl==null?void 0:vl.length)-1])===":"&&(vl=vl==null?void 0:vl.slice(0,(vl==null?void 0:vl.length)-1)),me=(vl==null?void 0:vl.split(":"))??[],qe=((za=(Oa=(ma=(Me=ya==null?void 0:ya[1])==null?void 0:Me.replace("}",gl))==null?void 0:ma.split(gl))==null?void 0:Oa[0])==null?void 0:za.split(","))??[];let Nl=(Ca=he==null?void 0:he[0])==null?void 0:Ca.slice(1,((pa=he==null?void 0:he[0])==null?void 0:pa.length)-2);Ke&&Ke!==""&&(da=ni(Ke)),(Ae=Nl==null?void 0:Nl.split(","))==null||Ae.forEach((pl,Fl)=>{var ja,jl,Rl,Da,al;((ja=ce.analyzeSplitToContent(pl,"@"))==null?void 0:ja.length)>1&&(pl=(jl=ce.analyzeSplitToContent(pl,"@"))==null?void 0:jl[0],(pl==null?void 0:pl[(pl==null?void 0:pl.length)-1])==="@"&&(pl=pl==null?void 0:pl.slice(0,(pl==null?void 0:pl.length)-1))),n.push({label:pl,prop:pl,align:"center",menus:xe,groups:(aa==null?void 0:aa.length)===0?me:(Rl=aa==null?void 0:aa.find(dl=>(dl==null?void 0:dl.number)>=Fl))==null?void 0:Rl.contents,words:(Ve==null?void 0:Ve.length)===0?(Da=qe==null?void 0:qe[Fl])==null?void 0:Da.split(":"):(al=Ve==null?void 0:Ve[Fl])==null?void 0:al.split(":"),formType:(xe==null?void 0:xe.length)>0?"Select":"Input",mainKey:Fl===0,filter:da,isMainPath:(aa==null?void 0:aa.findIndex(dl=>(dl==null?void 0:dl.number)>=Fl))===0})})}else n.push({label:se,prop:se,align:"center"})});else{let se=(J=ce.analyzeSplitToContent(a,","))==null?void 0:J.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));se==null||se.forEach(Be=>{n.push(ht(Be,l))})}return n},Zd=(a,l)=>{var h,c,d,m,b;let n=a;if(!a)return;let r="";((h=ce.analyzeSplitToContent(a,"}"))==null?void 0:h.length)>1&&(n=(c=ce.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(d=ce.analyzeSplitToContent(a,"}"))==null?void 0:d[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let o=[],s=[];return o.push({label:"排序",prop:"sort"}),o.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=ce.analyzeSplitToContent(n,","))==null||m.forEach(u=>{var C;(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)),(u==null?void 0:u[0])==="{"?(C=Co(u,l))==null||C.forEach(M=>{o.push(M)}):o.push(ht(u,l))}),o!=null&&o.some(u=>{var C;return(C=u==null?void 0:u.prop)==null?void 0:C.includes("@")})&&(o=o==null?void 0:o.filter(u=>{var C;return!((C=u==null?void 0:u.prop)!=null&&C.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(b=ce.analyzeSplitToContent(r,","))==null||b.forEach(u=>{var C;(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)),(u==null?void 0:u[0])==="{"?(C=Co(u,l))==null||C.forEach(M=>{s.push(M)}):s.push(ht(u,l))})),{columns:o,secondColumns:s}},pn=a=>{var l,n,r,o,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let h=(n=(l=a==null?void 0:a.replace("(",gl))==null?void 0:l.split(gl))==null?void 0:n[1],c=(o=(r=a==null?void 0:a.replace("(",gl))==null?void 0:r.split(gl))==null?void 0:o[0];return h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h=(s=ce.analyzeSplitToContent(h,","))==null?void 0:s.map(d=>((d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1)),c+d)),h=h==null?void 0:h.join(","),a!=null&&a.includes("@Quote")&&(h!=null&&h.includes("@QuoteType")||(h=h===""?h+"@QuoteType=Manual":h+",@QuoteType=Manual"),h!=null&&h.includes("@QuoteSonSync")||(h=h===""?h+"@QuoteSonSync=No":h+",@QuoteSonSync=No"),h!=null&&h.includes("@QuoteFatherSync")||(h=h===""?h+"@QuoteFatherSync=Yes":h+",@QuoteFatherSync=Yes")),h}},is=a=>{let l=a==null?void 0:a.map(n=>{var r,o;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+gl+((o=n==null?void 0:n.groups)==null?void 0:o.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,o;return{menus:(r=n==null?void 0:n.split(gl))==null?void 0:r[0],groups:((o=n==null?void 0:n.split(gl))==null?void 0:o[1])??[]}}),l},os=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=ce.analyzeSplitToContent(l,","))==null?void 0:n.map(r=>((r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])!=="@"&&(r="@"+r),r=pn(r),r)),l==null?void 0:l.join(",")},lc=(a,l,n="")=>{var L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae;let r=[],o=[],s=[],h="",c="",d="",m=[],b=[],u=[],C="";if(((L=a==null?void 0:a[0])==null?void 0:L[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((w=a==null?void 0:a[0])==null?void 0:w[0])!=="*"&&((g=a==null?void 0:a[0])==null?void 0:g[0])!=="$"&&(h=(S=ce.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:S[0],(h==null?void 0:h[0])!=="@"&&(h="@"+h),h=ni(h),d=($=ce.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:$[1],(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=d==null?void 0:d.replaceAll(":","/"));let k=ce.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(V=k==null?void 0:k.filter(he=>(he==null?void 0:he[0])!=="{"&&(he==null?void 0:he[0])!=="["))==null?void 0:V.join(""),c=(ae=a==null?void 0:a[0])==null?void 0:ae.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),C=(Z=k==null?void 0:k.filter(he=>(he==null?void 0:he[0])!=="["))==null?void 0:Z.join(""),C=(ge=a==null?void 0:a[0])==null?void 0:ge.replace(C,""),c=c==null?void 0:c.replace(C,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),((ze=ce.analyzeSplitToContent(c,"@"))==null?void 0:ze.length)>1&&(h=(F=ce.analyzeSplitToContent(c,"@"))==null?void 0:F[1],(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)),h="@"+h,h=pn(h),c=(ne=ce.analyzeSplitToContent(c,"@"))==null?void 0:ne[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((J=ce.analyzeSplitToContent(r,"@"))==null?void 0:J.length)>1){h!==""&&(h=h+",");let he=(se=ce.analyzeSplitToContent(r,"@"))==null?void 0:se[1];he="@"+he,he=pn(he),h=h+he,r=(Be=ce.analyzeSplitToContent(r,"@"))==null?void 0:Be[0]}if((r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=r===""?[]:r==null?void 0:r.split(":"),(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)),n!==""){let he=($e=ce.analyzeSplitToContent(n,")"))==null?void 0:$e[0],Y=(fe=ce.analyzeSplitToContent(n,"@"))==null?void 0:fe[1];d=(oe=(N=ce.analyzeSplitToContent(n,"@"))==null?void 0:N[0])==null?void 0:oe.replace(he,""),(d==null?void 0:d[(d==null?void 0:d.length)-1])==="@"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),he=os(he),Y=os(Y);let xe=he??"";if(xe!==""&&(xe=xe+","),xe=xe+Y,(xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===","&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe!==""&&h!==""&&(h=h+","),h=h+xe,(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=(U=ce.analyzeSplitToContent(d,":"))==null?void 0:U.filter((me,qe)=>{var da;return!((me==null?void 0:me[0])==="{"&&qe===((da=ce.analyzeSplitToContent(d,":"))==null?void 0:da.length)-1)}),d=d==null?void 0:d.join(""),(d==null?void 0:d[(d==null?void 0:d.length)-1])===":"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),h!=null&&h.includes("@Sync")||(h=h===""?h+"@Sync=(Yes,Yes)":h+",@Sync=(Yes,Yes)"),d!=null&&d.includes("$")){let me=(Ie=(De=d==null?void 0:d.replace("*",gl))==null?void 0:De.split(gl))==null?void 0:Ie[1],qe=(la=(je=d==null?void 0:d.replace("*",gl))==null?void 0:je.split(gl))==null?void 0:la[0];qe=qe==null?void 0:qe.split("$"),qe=((ee=(Ta=qe==null?void 0:qe[0])==null?void 0:Ta.split(":"))==null?void 0:ee[0])+":"+(qe==null?void 0:qe[1])+":",d=qe+"*"+me}else d=(ca=d==null?void 0:d.replaceAll("{",""))==null?void 0:ca.replaceAll("}","")}h!==""&&h&&(h="("+h+")"),h=d+h,((ue=ce.analyzeSplitToContent(c,"}"))==null?void 0:ue.length)>1&&(c=(ta=ce.analyzeSplitToContent(c,"}"))==null?void 0:ta.filter(he=>(he==null?void 0:he[0])!=="@"),c=c==null?void 0:c.join(""));let W=Zd(c,l);s=c===""?[]:(W==null?void 0:W.columns)??[],u=ce.getColumnChild(s);let I=ce.getColumnChild(s);s!=null&&s.some(he=>{var Y;return Array.isArray(he==null?void 0:he.children)&&((Y=he==null?void 0:he.children)==null?void 0:Y.length)>0})&&(s=[s]),o=C?Di(C):[],!(o!=null&&o.every(he=>Array.isArray(he)))&&(o==null?void 0:o.length)>0&&(o=[o]),(o==null?void 0:o.length)>0&&(Array.isArray(o==null?void 0:o[0])&&((Se=o==null?void 0:o[0])!=null&&Se.every(he=>Array.isArray(he)))?o=o==null?void 0:o.map((he,Y)=>(he=he.map((xe,me)=>(xe.unshift("{}"),xe.unshift((me+1).toString()),xe)),he)):o=o==null?void 0:o.map((he,Y)=>(he.unshift("{}"),he.unshift((Y+1).toString()),he))),W!=null&&W.secondColumns&&((te=W==null?void 0:W.secondColumns)==null?void 0:te.length)>0&&((o==null?void 0:o.length)>0?o=o==null?void 0:o.map((he,Y)=>{var xe,me;return Array.isArray(he==null?void 0:he[0])?he=he==null?void 0:he.map((qe,da)=>{var Ke,aa;return qe.unshift((aa=(Ke=W==null?void 0:W.secondColumns)==null?void 0:Ke[da])==null?void 0:aa.prop),qe}):he.unshift((me=(xe=W==null?void 0:W.secondColumns)==null?void 0:xe[Y])==null?void 0:me.prop),he}):o=(Ne=W==null?void 0:W.secondColumns)==null?void 0:Ne.map((he,Y)=>(he=[he==null?void 0:he.label],he.push(Y),he)),s.unshift({label:"",prop:"disabled",sortable:!1})),u=u==null?void 0:u.map(he=>{var Y,xe;return{menus:he==null?void 0:he.menus,content:((Y=he==null?void 0:he.menus)==null?void 0:Y.join("/"))+gl+((xe=he==null?void 0:he.groups)==null?void 0:xe.join("/"))}});let j=[];if(((sa=(We=h==null?void 0:h.replace("(",gl))==null?void 0:We.split(gl))==null?void 0:sa[0])!==""&&(j=(R=(Ya=h==null?void 0:h.replace("(",gl))==null?void 0:Ya.split(gl))==null?void 0:R[0],j=[j],j=j==null?void 0:j.map(he=>{var xe,me,qe;let Y=he==null?void 0:he.split("*");return{menus:(xe=Y==null?void 0:Y[0])==null?void 0:xe.split(":"),content:((me=Y==null?void 0:Y[0])==null?void 0:me.replaceAll(":","/"))+gl+((qe=Y==null?void 0:Y[1])==null?void 0:qe.replaceAll(":","/"))}}),u=[...u,...j]),u=u==null?void 0:u.filter(he=>{var Y;return(he==null?void 0:he.menus)&&((Y=he==null?void 0:he.menus)==null?void 0:Y.length)>0}),u=u==null?void 0:u.map(he=>he==null?void 0:he.content),u=[...new Set(u)],u=u==null?void 0:u.map(he=>{var Y,xe;return{menus:(Y=he==null?void 0:he.split(gl))==null?void 0:Y[0],groups:((xe=he==null?void 0:he.split(gl))==null?void 0:xe[1])??[]}}),m=I==null?void 0:I.filter(he=>{var Y;return(he==null?void 0:he.filter)&&((Y=he==null?void 0:he.filter)==null?void 0:Y.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(he=>{var Y,xe,me,qe;return(qe=(me=(xe=(Y=ce.analyzeSplitToContent(he==null?void 0:he.filter,","))==null?void 0:Y.find(da=>da==null?void 0:da.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:me[0])==null?void 0:qe.includes("Yes")}),m=is(m)),b=I==null?void 0:I.filter(he=>{var Y;return(he==null?void 0:he.filter)&&((Y=he==null?void 0:he.filter)==null?void 0:Y.includes("@Sync"))}),(b==null?void 0:b.length)>0&&(b=b==null?void 0:b.filter(he=>{var Y,xe,me,qe;return(qe=(me=(xe=(Y=ce.analyzeSplitToContent(he==null?void 0:he.filter,","))==null?void 0:Y.find(da=>da==null?void 0:da.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:me[1])==null?void 0:qe.includes("Yes")}),b=is(b)),h!==""&&(h!=null&&h.includes("@Sync"))&&(h==null?void 0:h[0])!=="("){let he=(H=h==null?void 0:h.replace("(",gl))==null?void 0:H.split(gl),Y=he==null?void 0:he[1];if(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1),Y=ce.analyzeSplitToContent(Y,","),(de=(ve=(X=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:X.split(","))==null?void 0:ve[0])!=null&&de.includes("Yes")){let xe=he==null?void 0:he[0];xe=[{menus:(na=(va=xe==null?void 0:xe.split("*"))==null?void 0:va[0])==null?void 0:na.replaceAll(":","/"),groups:((xa=(Pe=xe==null?void 0:xe.split("*"))==null?void 0:Pe[1])==null?void 0:xa.split(":"))??[]}],m=[...m,...xe]}if((Oa=(ma=(Me=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:Me.split(","))==null?void 0:ma[1])!=null&&Oa.includes("Yes")){let xe=he==null?void 0:he[0];xe=[{menus:(pa=(za=xe==null?void 0:xe.split("*"))==null?void 0:za[0])==null?void 0:pa.replaceAll(":","/"),groups:((Ae=(Ca=xe==null?void 0:xe.split("*"))==null?void 0:Ca[1])==null?void 0:Ae.split(":"))??[]}],b=[...b,...xe]}}return{groupName:r,tableColumns:s,tableFilter:h,tableContents:o,columns:(W==null?void 0:W.secondColumns)??[],relatedQuotes:u,fatherSyncContents:m,sonSyncContents:b}},rc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var o,s,h,c;if(Array.isArray(n))n=n==null?void 0:n.map(d=>{var m,b,u,C;return d!=null&&d.isMainPath||(((m=d==null?void 0:d.children)==null?void 0:m.length)>0?d.children=rc(d.children,l):((b=d==null?void 0:d.menus)==null?void 0:b.length)>0&&!((u=n==null?void 0:n[0])!=null&&u.isMainPath)&&(d.menus=(C=d.menus)==null?void 0:C.map((M,k)=>{var W,I;return((W=d.menus)==null?void 0:W.length)-1===k&&M===""&&(l==null?void 0:l.parentContent)+"/"!==((I=d.menus)==null?void 0:I.join("/"))&&(M=l==null?void 0:l.value),d}),d.bindMenus=d.menus)),d});else{if(r===0&&((o=n.menus)==null?void 0:o.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((s=n.menus)==null?void 0:s.length)>0&&!((h=a==null?void 0:a[0])!=null&&h.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((d,m)=>{var b,u;return((b=n.menus)==null?void 0:b.length)-1===m&&d===""&&(l==null?void 0:l.parentContent)+"/"!==((u=n.menus)==null?void 0:u.join("/"))&&(d=l==null?void 0:l.value),d}),n.bindMenus=n.menus)}return n}),a),Qd=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=rc(n.contents,l)),n)),a),vt=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=vt(r,l),r)):n=n==null?void 0:n.map(r=>{var o,s;return r!=null&&r.children&&((o=r==null?void 0:r.children)==null?void 0:o.length)>0?r.children=vt(r==null?void 0:r.children,l):r!=null&&r.words&&((s=r==null?void 0:r.words)==null?void 0:s.length)>0&&(l!=null&&l.find(h=>{var c,d,m,b;return((b=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:b[((m=(d=r==null?void 0:r.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])===h}))&&(r.mainKey=!0),r}),n};let wr="$R";const ep=A.useUnit(A.pinia),{selectTitle:nn}=A.storeToRefs(ep),ap=A.useMenuState(A.pinia),{localFiles:lp}=A.storeToRefs(ap),xn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixColumn",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},{key:"@BackGround",value:"onBackGround",order:1}];var ri=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(ri||{});const rp=a=>{var l,n,r,o,s;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let h=a==null?void 0:a.contents,c=a==null?void 0:a.filter;(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(l=ce.analyzeSplitToContent(c,","))==null?void 0:l.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=ce.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));let d=(s=(o=(r=lp.value)==null?void 0:r.filter(m=>{var b;return(m==null?void 0:m.path)===((b=a==null?void 0:a.groupName)==null?void 0:b[0])}))==null?void 0:o[0])==null?void 0:s.children;return d=(d==null?void 0:d.filter(m=>c==null?void 0:c.find(b=>b===(m==null?void 0:m.name))))??[],h.push({key:"backGround",contents:d}),h}return a==null?void 0:a.contents},np=a=>{const l=ic(a==null?void 0:a.filter);return l?oc(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},ip=a=>{const l=ic(a==null?void 0:a.filter);return l?oc(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},op=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},tp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},sp=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var o;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(o=r.contents)==null?void 0:o.slice(0,parseInt(a==null?void 0:a.filter))),r})},cp=async a=>{var l,n,r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(J=>((J==null?void 0:J.key)==="tableContents"&&(J.contents=ce.shuffle(J.contents)),J));if((a==null?void 0:a.filter)==="Auto"){let ne=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:r.contents;Array.isArray(ne==null?void 0:ne[0])&&(ne=ne==null?void 0:ne[0]),ne=ce.getColumnChild(ne);let J=ne==null?void 0:ne.filter(De=>(De==null?void 0:De.filter)&&(De==null?void 0:De.filter)!==""),se=new Map,Be=[];J==null||J.forEach(De=>{var Ie,je;se.get((Ie=De==null?void 0:De.menus)==null?void 0:Ie.join("/"))||(se.set((je=De==null?void 0:De.menus)==null?void 0:je.join("/"),De),Be.push(De))});let $e=(s=(o=nn==null?void 0:nn.value)==null?void 0:o.find(De=>(De==null?void 0:De.condition)==="child"))==null?void 0:s.value,fe=Be==null?void 0:Be.map(De=>{var Ie,je,la;return De=(Ie=De==null?void 0:De.menus)==null?void 0:Ie.join("/"),(De==null?void 0:De[(De==null?void 0:De.length)-1])==="/"&&((la=(je=nn==null?void 0:nn.value)==null?void 0:je.find(Ta=>(Ta==null?void 0:Ta.condition)==="child"))==null?void 0:la.parentContent)+"/"!==De?De=De+$e:(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}),N=Be==null?void 0:Be.map(De=>De==null?void 0:De.groups),oe=fe==null?void 0:fe.map(async De=>{let Ie=await Gr(De,!1);return{path:De,contents:Ie}});oe=await Promise.all(oe);let U=oe==null?void 0:oe.map((De,Ie)=>{var la,Ta,ee,ca,ue,ta,Se;let je=(la=De==null?void 0:De.contents)==null?void 0:la.filter(te=>{var Ne,We;return(te==null?void 0:te.name)===((We=N==null?void 0:N[Ie])==null?void 0:We[((Ne=N==null?void 0:N[Ie])==null?void 0:Ne.length)-1])});return je=(ca=(ee=(Ta=je==null?void 0:je[0])==null?void 0:Ta.compData)==null?void 0:ee.find(te=>(te==null?void 0:te.key)==="tableContents"))==null?void 0:ca.contents,(De==null?void 0:De.path)===((ta=(ue=nn==null?void 0:nn.value)==null?void 0:ue.find(te=>(te==null?void 0:te.condition)==="child"))==null?void 0:ta.parentContent)&&(je=((Se=je==null?void 0:je.map(te=>{for(let Ne in te)if(te[Ne]===$e)return te}))==null?void 0:Se.filter(te=>te))??[]),je??[]});if(U=U==null?void 0:U.map(De=>(De=De==null?void 0:De.map(Ie=>{var la;let je={};for(let Ta in Ie)if(J!=null&&J.find(ee=>{var ca,ue;return((ue=(ca=ee==null?void 0:ee.words)==null?void 0:ca[0])==null?void 0:ue.replaceAll("'",""))===Ta})){let ee=(la=J==null?void 0:J.find(ca=>{var ue,ta;return((ta=(ue=ca==null?void 0:ca.words)==null?void 0:ue[0])==null?void 0:ta.replaceAll("'",""))===Ta}))==null?void 0:la.prop;je[ee]=Ie==null?void 0:Ie[Ta]}return je}),De)),U=ce.cartesianProduct(U),Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),(U==null?void 0:U.length)>0&&((u=(c=(h=J==null?void 0:J[0])==null?void 0:h.menus)==null?void 0:c.join("/"))==null?void 0:u[((b=(m=(d=J==null?void 0:J[0])==null?void 0:d.menus)==null?void 0:m.join("/"))==null?void 0:b.length)-1])==="/")return(C=a==null?void 0:a.contents)==null?void 0:C.map(Ie=>{var je;return(Ie==null?void 0:Ie.key)==="tableContents"&&(U==null?void 0:U.length)>0&&(Ie.contents=((je=Ie.contents)==null?void 0:je.length)>0?Ie.contents:U),Ie})}if((a==null?void 0:a.filter)==="Manual"){let ne=[],J=[],se=(k=(M=a==null?void 0:a.contents)==null?void 0:M.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:k.contents;(se==null?void 0:se[(se==null?void 0:se.length)-1])===")"?se=(I=(W=se==null?void 0:se.replace("(",wr))==null?void 0:W.split(wr))==null?void 0:I[0]:se="",se!==""&&(ne=((L=(j=se==null?void 0:se.split("*"))==null?void 0:j[0])==null?void 0:L.split(":"))??[],J=((S=(g=(w=(x=(E=se==null?void 0:se.split("*"))==null?void 0:E[1])==null?void 0:x.replace("{",wr))==null?void 0:w.split(wr))==null?void 0:g[0])==null?void 0:S.split(":"))??[]);let Be=(V=($=a==null?void 0:a.contents)==null?void 0:$.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:V.contents;Be=(Z=(ae=Be==null?void 0:Be.replace("(",wr))==null?void 0:ae.split(wr))==null?void 0:Z[1],Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1);let $e=(ge=a==null?void 0:a.contents)==null?void 0:ge.map(N=>{var oe,U,De,Ie,je,la,Ta,ee,ca;return(N==null?void 0:N.key)==="header"&&((oe=N==null?void 0:N.contents)!=null&&oe.every(ue=>(ue==null?void 0:ue.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((U=N==null?void 0:N.contents)==null?void 0:U[0])?N.contents=(De=N==null?void 0:N.contents)==null?void 0:De.map((ue,ta)=>{var Se,te,Ne;return ue!=null&&ue.isMainPath||(ta===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((te=ue.words)==null?void 0:te.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Be,(!(ue!=null&&ue.menus)||((Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.length)===0)&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}):Array.isArray((Ie=N==null?void 0:N.contents)==null?void 0:Ie[0])&&((Ta=(la=(je=N==null?void 0:N.contents)==null?void 0:je[0])==null?void 0:la.filter(()=>(ne==null?void 0:ne.length)>0))==null?void 0:Ta.length)>0&&(N.contents[0]=(ca=(ee=N==null?void 0:N.contents)==null?void 0:ee[0])==null?void 0:ca.map((ue,ta)=>{var Se,te,Ne;return ue!=null&&ue.isMainPath||(ta===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((te=ue.words)==null?void 0:te.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Be,(!(ue!=null&&ue.menus)||Array.isArray(ue==null?void 0:ue.menus)&&((Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.length)===0)&&(ne==null?void 0:ne.length)>0&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}))),N}),fe=(ze=$e==null?void 0:$e.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:ze.contents;if(Array.isArray(fe==null?void 0:fe[0])&&(fe=fe==null?void 0:fe[0]),fe=ce.getColumnChild(fe),fe!=null&&fe.some(N=>{var oe,U;return((U=N==null?void 0:N.menus)==null?void 0:U[((oe=N==null?void 0:N.menus)==null?void 0:oe.length)-1])===""})){let N=(F=nn==null?void 0:nn.value)==null?void 0:F.find(oe=>(oe==null?void 0:oe.condition)==="child");$e=Qd($e,N)}return $e}if((a==null?void 0:a.filter)==="Chart"){let ne=a==null?void 0:a.contents;return ne.push({key:"newType",contents:"Chart"}),ne}return a==null?void 0:a.contents},up=async a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}if((a==null?void 0:a.filter)==="Bar"||(a==null?void 0:a.filter)==="Pie"||(a==null?void 0:a.filter)==="Line"||(a==null?void 0:a.filter)==="Histogram"||(a==null?void 0:a.filter)==="Scatter"){let l=a==null?void 0:a.contents;return l.push({key:"ChartType",contents:{type:a==null?void 0:a.filter,title:""}}),l}return a==null?void 0:a.contents},dp=a=>{var r,o,s,h,c,d,m,b,u,C,M,k;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((o=(r=l==null?void 0:l.replace(":",wr))==null?void 0:r.split(wr))==null?void 0:o[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(c=(h=l==null?void 0:l.split("="))==null?void 0:h[1])!=null&&c.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let W=(d=l==null?void 0:l.split("="))==null?void 0:d[0],I=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(b=I==null?void 0:I.slice(1,I==null?void 0:I.length))!=null&&b.includes("$")&&(I=(M=(C=(u=nn==null?void 0:nn.value)==null?void 0:u.filter(j=>(j==null?void 0:j.condition)==="child"))==null?void 0:C[0])==null?void 0:M.value),l=W+"="+I}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=ce.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let W=[];return n==null||n.forEach(j=>{let L={};for(let E in j){let x=E;x!=null&&x.includes("[")||(L[x]=j[E])}W.push(L)}),(k=a==null?void 0:a.contents)==null?void 0:k.map(j=>{var E,x,w;let L=(x=(E=a==null?void 0:a.contents)==null?void 0:E.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:x.contents;if(L=(w=ce.getEqualChild(L))==null?void 0:w.filter(g=>(g==null?void 0:g.label)!=="操作"),(j==null?void 0:j.key)==="tableContents"){let S=ce.tableToForm(j==null?void 0:j.contents,L);W==null||W.forEach($=>{var V,ae;for(let Z in $)!((V=S==null?void 0:S[0])!=null&&V.find(ge=>{var ze;return(ge==null?void 0:ge.key)===Z||((ze=ge==null?void 0:ge.key)==null?void 0:ze.includes(Z))}))&&!(S!=null&&S.find(ge=>{var ze;return(ge==null?void 0:ge.key)===Z||((ze=ge==null?void 0:ge.key)==null?void 0:ze.includes(Z))}))||(((ae=$[Z])==null?void 0:ae[0])!=="!"?S=S==null?void 0:S.filter(ge=>{var ze,F;return((ze=ge==null?void 0:ge.find(ne=>{var J;return(ne==null?void 0:ne.key)===Z||((J=ne==null?void 0:ne.key)==null?void 0:J.includes(Z))}))==null?void 0:ze.value)===$[Z]||Array.isArray($==null?void 0:$[Z])&&((F=$==null?void 0:$[Z])==null?void 0:F.find(ne=>{var J;return((J=ge==null?void 0:ge.find(se=>{var Be;return(se==null?void 0:se.key)===Z||((Be=se==null?void 0:se.key)==null?void 0:Be.includes(Z))}))==null?void 0:J.value)===ne}))}):S=S==null?void 0:S.filter(ge=>{var ze;return((ze=ge==null?void 0:ge.find(F=>{var ne;return(F==null?void 0:F.key)===Z||((ne=F==null?void 0:F.key)==null?void 0:ne.includes(Z))}))==null?void 0:ze.value)!==$[Z]}))}),(S==null?void 0:S.length)===0?j.contents=[]:j.contents=S==null?void 0:S.map($=>{let V={};return $==null||$.forEach(ae=>{V[ae==null?void 0:ae.key]=ae==null?void 0:ae.value}),V})}return j})}return a==null?void 0:a.contents},pp=a=>a==null?void 0:a.contents,fp=a=>a==null?void 0:a.contents,hp=a=>{var l,n,r,o;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(o=a==null?void 0:a.contents)==null?void 0:o.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=vt(c.contents,s)),c))}return a==null?void 0:a.contents},vp=a=>{var n,r,o,s,h;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",wr))==null?void 0:n.split(wr))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(o=ce.analyzeSplitToContent(c,","))==null?void 0:o.map(u=>((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)),u));let d=c==null?void 0:c[0];(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1));let m=(c==null?void 0:c[1])??"Up",b=(s=a==null?void 0:a.contents)==null?void 0:s.map(u=>{var C,M;if(m==="Up"){if((u==null?void 0:u.key)==="extraButton"){let k=(C=d==null?void 0:d.split(","))==null?void 0:C.map(W=>({label:W,prop:W}));u.contents=[...k,...u.contents]}}else if(m==="Line"&&(u==null?void 0:u.key)==="rowButton"){let k=(M=d==null?void 0:d.split(","))==null?void 0:M.map(W=>({label:W,prop:W}));u.contents=[...k,...u.contents]}return u});if(m==="Bottom"||m==="Down"){let u=(h=d==null?void 0:d.split(","))==null?void 0:h.map(C=>({label:C,prop:C}));b.push({key:"bottomButton",contents:u})}return b}return a==null?void 0:a.contents},mp=a=>a==null?void 0:a.contents,yp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.key)==="rowButton"&&(o.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(h=>({label:h,prop:h}))),o}):a==null?void 0:a.contents},gp=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,o=(n=l==null?void 0:l.split(","))==null?void 0:n.map(s=>({label:s,prop:s}));return r.push({key:"bottomButton",contents:o}),r}return a==null?void 0:a.contents},bp=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(o=>(o.isNoClick=!0,o))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},kp=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s;return(o==null?void 0:o.key)==="formContent"&&(o.contents=(s=o.contents)==null?void 0:s.map(h=>(h.width=n,h))),o})}return a==null?void 0:a.contents},xp=a=>{var l,n,r,o;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(c=>{var d;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(d=c.contents)==null?void 0:d.map(m=>(m.width=s,m))),c})}if(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let s=Di(a==null?void 0:a.filter),h=Array.isArray(s)?s.map(d=>parseInt(d)).filter(d=>!!d&&!Number.isNaN(d)):[];return h.length?(o=a==null?void 0:a.contents)==null?void 0:o.map(d=>{if((d==null?void 0:d.key)==="formContent"){const m=d.contents??[];d.contents=m.map((b,u)=>{const C=u+1;let M=0,k=0;for(let I=0;I<h.length;I++){if(k+=h[I],C<=k){M=I;break}I===h.length-1&&(M=h.length-1)}const W=h[M]||h[h.length-1]||1;return b.width=W,b})}return d}):a==null?void 0:a.contents}return a==null?void 0:a.contents},wp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.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(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s,h,c;return(o==null?void 0:o.key)==="header"&&(Array.isArray((s=o==null?void 0:o.contents)==null?void 0:s[0])?o.contents[0]=(c=o.contents[0])==null?void 0:c.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d)):o.contents=(h=o.contents)==null?void 0:h.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d))),o})}return a==null?void 0:a.contents},_p=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.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 r=s=>(n!=null&&n.find(h=>h===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(h=>r(h))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var h,c,d;return(s==null?void 0:s.key)==="header"&&(Array.isArray((h=s==null?void 0:s.contents)==null?void 0:h[0])?s.contents[0]=(d=s.contents[0])==null?void 0:d.map(m=>r(m)):s.contents=(c=s.contents)==null?void 0:c.map(m=>r(m))),s})}return a==null?void 0:a.contents},Sp=async a=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;const l=A.useUnit(A.pinia),{chooseTitle:n}=A.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let x=await Gr(((o=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:o.parentContent)??((h=(s=n==null?void 0:n.value)==null?void 0:s[0])==null?void 0:h.relatedContent),!1),w=(d=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:d.value;(b=(m=x==null?void 0:x[0])==null?void 0:m.compData)!=null&&b.find(V=>(V==null?void 0:V.key)==="header")?x=(u=x==null?void 0:x[0])==null?void 0:u.compData:x=(M=(C=x==null?void 0:x.filter(V=>{var ae;return(ae=V==null?void 0:V.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="header")}))==null?void 0:C[0])==null?void 0:M.compData;let g=(k=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:k.contents;Array.isArray(g==null?void 0:g[0])&&(g=g==null?void 0:g[0]),g=((W=g==null?void 0:g.find(V=>V==null?void 0:V.isMainKey))==null?void 0:W.prop)??((I=g==null?void 0:g[0])==null?void 0:I.prop);let S=(L=(j=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:L.find(V=>(V==null?void 0:V[g])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map(V=>{var ae;return(V==null?void 0:V.key)==="formContent"&&(V.contents=(ae=V.contents)==null?void 0:ae.map(Z=>(Z.value=S==null?void 0:S[Z==null?void 0:Z.prop],Z))),V})}return a==null?void 0:a.contents},Ep=a=>{var l,n,r,o,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let h=a==null?void 0:a.filter;if(h!=null&&h.includes("*")&&(h="({"+((r=(n=h==null?void 0:h.replace("{",wr))==null?void 0:n.split(wr))==null?void 0:r[1])),h=(o=h==null?void 0:h.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(h==null?void 0:h[0])!=="("&&(h="("+h+")"),h.slice(1,(h==null?void 0:h.length)-1)==="undefined")return a==null?void 0:a.contents;let c=ce.calculatorAndToOr(h),d=c==null?void 0:c[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,b=[];for(let u in d)(d==null?void 0:d[u])===(m==null?void 0:m[u])?b.push(!0):b.push(!1);return b!=null&&b.every(u=>u===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Cp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Dp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"choice",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Bp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"fixType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Tp=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=(l=ce.analyzeSplitToContent(r,","))==null?void 0:l.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o)),n.push({key:"stepName",contents:r}),n}return a==null?void 0:a.contents},Np=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},nc={onNumSlice:sp,onRandomContents:cp,onConditionContents:dp,onFatherPaceContents:pp,onPaceContents:fp,onMainTagContents:hp,onButtonContents:vp,onPamButtonContents:mp,onRowButtonContents:yp,onRelated:Sp,onRowNum:xp,onFixRow:wp,onReqItem:_p,onBottomButtonContents:gp,onConditionContent:Ep,onTabs:Cp,onSinChoice:Dp,onTextSize:op,onTextRGBA:tp,onPosition:np,onSize:ip,onShowType:Bp,onStepName:Tp,onStep:Np,onInterfaceTypeContents:up,onBackGround:rp,onMaxColumn:kp,onEditRead:bp},Ap=async(a,l,n="")=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r="";if(((h=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:h.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(m=(d=r==null?void 0:r.replace("(",wr))==null?void 0:d.split(wr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(b=ce.analyzeSplitToContent(r,","))==null?void 0:b.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L!=null&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),s=a;for(let L in o){let E,x="";E=(M=(C=(u=o==null?void 0:o[L])==null?void 0:u.replace("=",wr))==null?void 0:C.split(wr))==null?void 0:M[0],x=(I=(W=(k=o==null?void 0:o[L])==null?void 0:k.replace("=",wr))==null?void 0:W.split(wr))==null?void 0:I[1];let w=(j=xn==null?void 0:xn.find(g=>(g==null?void 0:g.key)===E))==null?void 0:j.value;if(w){const g=nc[w];s=await g({contents:s,filter:x,extra:l,groupName:n})}}return s},Oo=async(a,l,n="")=>{var c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae;let r="";if(((c=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(d=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:d.contents),r===""||!r)return a;(r==null?void 0:r[0])===","&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(b=(m=r==null?void 0:r.replace("(",wr))==null?void 0:m.split(wr))==null?void 0:b[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(u=ce.analyzeSplitToContent(r,","))==null?void 0:u.map(Z=>((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&&Z.includes("(")||(Z=Z==null?void 0:Z.replaceAll(":","=")),Z)),s=a,h=new Map;o==null||o.forEach(Z=>{var ze,F,ne;let ge=(ze=Z==null?void 0:Z.split("="))==null?void 0:ze[0];if(ge==="@MainPam"&&h.get(ge)){let J=h.get(ge);J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1);let se=(ne=(F=Z==null?void 0:Z.replace("{",wr))==null?void 0:F.split(wr))==null?void 0:ne[1];se=J+","+se,h.set(ge,se)}else ge==="@Button"&&h.get(ge)?h.set(Z,Z):h.set(ge,Z)}),o=Array.from(h.values()),o=o==null?void 0:o.sort((Z,ge)=>{var ze,F;return((ze=xn==null?void 0:xn.find(ne=>ge==null?void 0:ge.includes(ne==null?void 0:ne.key)))==null?void 0:ze.order)-((F=xn==null?void 0:xn.find(ne=>Z==null?void 0:Z.includes(ne==null?void 0:ne.key)))==null?void 0:F.order)});for(let Z in o){let ge,ze="";(C=o==null?void 0:o[Z])!=null&&C.includes("(")&&((M=o==null?void 0:o[Z])!=null&&M.includes("@If"))?(ge=(I=(W=(k=o==null?void 0:o[Z])==null?void 0:k.replace("(",wr))==null?void 0:W.split(wr))==null?void 0:I[0],ze="("+((E=(L=(j=o==null?void 0:o[Z])==null?void 0:j.replace("(",wr))==null?void 0:L.split(wr))==null?void 0:E[1])):(ge=(g=(w=(x=o==null?void 0:o[Z])==null?void 0:x.replace("=",wr))==null?void 0:w.split(wr))==null?void 0:g[0],ze=(V=($=(S=o==null?void 0:o[Z])==null?void 0:S.replace("=",wr))==null?void 0:$.split(wr))==null?void 0:V[1]);let F=(ae=xn==null?void 0:xn.find(ne=>(ne==null?void 0:ne.key)===ge))==null?void 0:ae.value;if(F){const ne=nc[F];s=await ne({contents:s,filter:ze,extra:l,groupName:n})}}return s},ic=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},oc=(a,l)=>{var W,I,j,L,E;const n=Array.isArray(a)?a:[],r=n.find(x=>(x==null?void 0:x.key)==="formContent"),o=Array.isArray(r==null?void 0:r.contents)?r.contents:[],s=((W=n.find(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"))==null?void 0:W.contents)??{},h=(o==null?void 0:o[0])??{};let c=((I=l==null?void 0:l.position)==null?void 0:I[0])??(s==null?void 0:s._positionStartRow)??(h==null?void 0:h._positionStartRow),d=((j=l==null?void 0:l.position)==null?void 0:j[1])??(s==null?void 0:s._positionRowSpan)??(h==null?void 0:h._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!d||Number.isNaN(d)||d<1)&&(d=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(s==null?void 0:s._sizeStart)??(h==null?void 0:h._sizeStart),b=((E=l==null?void 0:l.size)==null?void 0:E[1])??(s==null?void 0:s._sizeEnd)??(h==null?void 0:h._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(b===void 0||Number.isNaN(b))&&(b=1),m=Math.max(0,Math.min(1,m)),b=Math.max(0,Math.min(1,b)),b<=m&&(m=0,b=1);const u=b-m,C=Math.max(1,Math.round(1/u));let M=n.map(x=>{if((x==null?void 0:x.key)!=="formContent")return x;const w=Array.isArray(x==null?void 0:x.contents)?x.contents:[];return{...x,contents:w.map(g=>({...g,width:C,_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b}))}});const k={_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b};return M.some(x=>(x==null?void 0:x.key)==="_gridLayoutMeta")?M=M.map(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"?{...x,contents:k}:x):M.push({key:"_gridLayoutMeta",contents:k}),M};let po="$R";const zp=A.useUnit(A.pinia),{selectTitle:Mp}=A.storeToRefs(zp);let Ip=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Op=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Lp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Rp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ts=async(a,l,n=!0)=>{let r=[],o=a==null?void 0:a.map(async s=>{var u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll;let h=(k=(M=(C=(u=s==null?void 0:s.contents)==null?void 0:u.find(Te=>{var Ma;return(Ma=Te==null?void 0:Te.key)==null?void 0:Ma.includes("struct")}))==null?void 0:C.value)==null?void 0:M[0])==null?void 0:k.类型,c=Object.values(s==null?void 0:s.name);c=c==null?void 0:c.reverse();let d=(W=s==null?void 0:s.contents)==null?void 0:W.map(Te=>Te==null?void 0:Te.key),m={comp:h,isShow:s==null?void 0:s.is_show,name:c==null?void 0:c[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:d,menuFilter:(I=s==null?void 0:s.filter)==null?void 0:I.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(j=s==null?void 0:s.filter)==null?void 0:j.fatherSyncs,relatedQuotes:(L=s==null?void 0:s.filter)==null?void 0:L.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(x=A.cloneDeep(c))==null?void 0:x.reverse()};for(let Te in c)parseInt(Te)>=1&&(m[`name${parseInt(Te)-1}`]=c[Te]);let b=Array.isArray((w=s==null?void 0:s.filter)==null?void 0:w.menuFilter)?(g=s==null?void 0:s.filter)==null?void 0:g.menuFilter:[];if(((S=b==null?void 0:b.filter(Te=>Te==null?void 0:Te.includes("@Filter")))==null?void 0:S.length)>0){let Te=b==null?void 0:b.filter(Ze=>Ze==null?void 0:Ze.includes("@Filter"));Te=Te==null?void 0:Te[0],Te=(V=($=Te==null?void 0:Te.replace("(",po))==null?void 0:$.split(po))==null?void 0:V[1],Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1),Te!=null&&Te.includes("*")&&(Te=(Z=(ae=Te==null?void 0:Te.replace("{",po))==null?void 0:ae.split(po))==null?void 0:Z[1],Te=Te==null?void 0:Te.replace("}","")),Te=ce.calculatorAndToOr(Te);let Ma=(l==null?void 0:l.originPath)??"";(Ma==null?void 0:Ma[(Ma==null?void 0:Ma.length)-1])==="/"&&(Ma=Ma==null?void 0:Ma.slice(0,(Ma==null?void 0:Ma.length)-1));let Je=await Gr(Ma,!1),ie=(ge=Je==null?void 0:Je.filter(Ze=>(Ze==null?void 0:Ze.comp)==="Table"))==null?void 0:ge[0];ie=(F=(ze=ie==null?void 0:ie.compData)==null?void 0:ze.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:F.contents;let Xe=(J=(ne=Mp.value)==null?void 0:ne.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:J.value;ie=(se=ie==null?void 0:ie.map(Ze=>{for(let ka in Ze)if((Ze==null?void 0:Ze[ka])===Xe)return Ze}))==null?void 0:se.filter(Ze=>Ze),ie=ie==null?void 0:ie[0],Te=Te==null?void 0:Te[0];let Aa=[];for(let Ze in Te){let ka="";Ua.isObject(ie)&&(ka=($e=(Be=Object.keys(ie))==null?void 0:Be.filter(Va=>Va==null?void 0:Va.includes("."+Ze)))==null?void 0:$e[0]),ka!==""&&(ie!=null&&ie[ka])&&(Te==null?void 0:Te[Ze])===(ie==null?void 0:ie[ka])||ie!=null&&ie[Ze]&&(Te==null?void 0:Te[Ze])===(ie==null?void 0:ie[Ze])?Aa.push(!0):Aa.push(!1)}if(Aa!=null&&Aa.some(Ze=>Ze===!1)&&((N=l==null?void 0:l.originPath)==null?void 0:N[((fe=l==null?void 0:l.originPath)==null?void 0:fe.length)-1])!=="/")return}if(h==="Table"||h==="Method"){!n&&((oe=m==null?void 0:m.fatherSyncContents)==null?void 0:oe.length)>0;let Te=((U=s==null?void 0:s.contents)==null?void 0:U.find(Ue=>{var fa;return(fa=Ue==null?void 0:Ue.key)==null?void 0:fa.includes("content")}))||[],Ma=[];m.comp="Table",Te.value=(De=Te==null?void 0:Te.value)==null?void 0:De.sort((Ue,fa)=>parseInt(Ue==null?void 0:Ue.id)-parseInt(fa==null?void 0:fa.id)),Te.value=(Ie=Te==null?void 0:Te.value)==null?void 0:Ie.map(Ue=>{let fa={};for(let oa in Ue)JSON.stringify(Ue==null?void 0:Ue[oa])==="{}"?fa[oa]="":fa[oa]=Ue==null?void 0:Ue[oa];return fa}),Ma.push({key:"tableContents",contents:Te==null?void 0:Te.value});let Je=(ca=(ee=(Ta=(la=(je=s==null?void 0:s.contents)==null?void 0:je.find(Ue=>{var fa;return(fa=Ue==null?void 0:Ue.key)==null?void 0:fa.includes("struct")}))==null?void 0:la.value)==null?void 0:Ta[0])==null?void 0:ee.结构)==null?void 0:ca.contents;Array.isArray(Je==null?void 0:Je[0])?Je[0]=(ue=Je==null?void 0:Je[0])==null?void 0:ue.filter(Ue=>(Ue==null?void 0:Ue.prop)!=="sort"&&(Ue==null?void 0:Ue.prop)!=="relatedId"):Je=Je==null?void 0:Je.filter(Ue=>(Ue==null?void 0:Ue.prop)!=="sort"&&(Ue==null?void 0:Ue.prop)!=="relatedId"),Ma.push({key:"header",contents:Je}),Ma.push({key:"filter",contents:(We=(Ne=(te=(Se=(ta=s==null?void 0:s.contents)==null?void 0:ta.find(Ue=>{var fa;return(fa=Ue==null?void 0:Ue.key)==null?void 0:fa.includes("struct")}))==null?void 0:Se.value)==null?void 0:te[0])==null?void 0:Ne.引用)==null?void 0:We.contents});let ie=Ip,Xe=A.cloneDeep(Op);h==="Method"&&Xe.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Je==null?void 0:Je[0])&&((sa=Je==null?void 0:Je[0])==null?void 0:sa.prop)==="disabled"&&(ie=Lp,Xe=Rp);const Aa=["推力","真空","压力","温度","流量"],Ze=m.name;Ze&&Aa.includes(Ze)&&(ie=[...ie],ie.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let ka=[];if(!Array.isArray(Je==null?void 0:Je[0])&&(Je!=null&&Je.some(Ue=>{var fa;return(Ue==null?void 0:Ue.calculatorFilter)&&((fa=Ue==null?void 0:Ue.calculatorFilter)==null?void 0:fa.includes("Manual"))}))){let Ue=(Ya=Je==null?void 0:Je.map(fa=>fa==null?void 0:fa.calculatorFilter))==null?void 0:Ya.filter(fa=>fa&&(fa==null?void 0:fa.includes("Manual")));Ue==null||Ue.forEach(fa=>{var il;let oa=ce.analyzeSplitToContent(fa,",");if(oa=oa==null?void 0:oa.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)),oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=oa==null?void 0:oa.find(Pa=>Pa==null?void 0:Pa.includes("@FunctionButton"));Le=(il=Le==null?void 0:Le.split("="))==null?void 0:il[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],ka.push(Le)}}),ka=[...new Set(ka)],ka=ka==null?void 0:ka.map(fa=>({label:fa,prop:fa,type:"methodButton"}))}else if(Array.isArray(Je==null?void 0:Je[0])&&((R=ce.getColumnChild(Je==null?void 0:Je[0]))!=null&&R.some(Ue=>{var fa;return(Ue==null?void 0:Ue.calculatorFilter)&&((fa=Ue==null?void 0:Ue.calculatorFilter)==null?void 0:fa.includes("Manual"))}))){let Ue=(X=(H=ce.getColumnChild(Je==null?void 0:Je[0]))==null?void 0:H.map(fa=>fa==null?void 0:fa.calculatorFilter))==null?void 0:X.filter(fa=>fa&&(fa==null?void 0:fa.includes("Manual")));Ue==null||Ue.forEach(fa=>{var il;let oa=ce.analyzeSplitToContent(fa,",");if(oa=oa==null?void 0:oa.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)),oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=oa==null?void 0:oa.find(Pa=>Pa==null?void 0:Pa.includes("@FunctionButton"));Le=(il=Le==null?void 0:Le.split("="))==null?void 0:il[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],ka.push(Le)}}),ka=[...new Set(ka)],ka=ka==null?void 0:ka.map(fa=>({label:fa,prop:fa,type:"methodButton"}))}if(Ma.push({key:"extraButton",contents:ie}),Ma.push({key:"rowButton",contents:[...Xe,...ka]}),m.compData=await Oo(Ma,l,m==null?void 0:m.nameContents),(ve=m.compData)!=null&&ve.find(Ue=>(Ue==null?void 0:Ue.key)==="tab")&&(m.tab=(va=(de=m.compData)==null?void 0:de.find(Ue=>(Ue==null?void 0:Ue.key)==="tab"))==null?void 0:va.contents),(na=m.compData)!=null&&na.find(Ue=>(Ue==null?void 0:Ue.key)==="step")&&(m.step=(xa=(Pe=m.compData)==null?void 0:Pe.find(Ue=>(Ue==null?void 0:Ue.key)==="step"))==null?void 0:xa.contents),(Me=m.compData)!=null&&Me.find(Ue=>(Ue==null?void 0:Ue.key)==="choice")&&(m.choice=(Oa=(ma=m.compData)==null?void 0:ma.find(Ue=>(Ue==null?void 0:Ue.key)==="choice"))==null?void 0:Oa.contents),(za=m.compData)!=null&&za.find(Ue=>(Ue==null?void 0:Ue.key)==="newType")){let Ue=(Ca=(pa=m.compData)==null?void 0:pa.find(fa=>(fa==null?void 0:fa.key)==="newType"))==null?void 0:Ca.contents;m.comp=Ue,m.compData=(Ae=m.compData)==null?void 0:Ae.filter(fa=>(fa==null?void 0:fa.key)!=="newType")}let Va="",Ja=(he=m==null?void 0:m.compData)==null?void 0:he.filter(Ue=>(Ue==null?void 0:Ue.key)==="fixType");(Ja==null?void 0:Ja.length)>0&&n&&(Va=(Y=Ja==null?void 0:Ja[0])==null?void 0:Y.contents,m.comp=Va)}else if(h==="Form"){let Te=[],Ma=(qe=(me=(xe=s==null?void 0:s.contents)==null?void 0:xe.find(Ze=>{var ka;return(ka=Ze==null?void 0:Ze.key)==null?void 0:ka.includes("content")}))==null?void 0:me.value)==null?void 0:qe[0],Je=[],ie=Array.isArray((da=s==null?void 0:s.filter)==null?void 0:da.menuFilter)?(Ke=s==null?void 0:s.filter)==null?void 0:Ke.menuFilter:[];ie==null||ie.forEach(Ze=>{if(Ze!=null&&Ze.includes("@Param(Hide=Yes, prop=")||Ze!=null&&Ze.includes("(Hide=Yes, prop=")){const ka=Ze==null?void 0:Ze.match(/prop=([^,)]+)/);ka!=null&&ka[1]&&Je.push(ka==null?void 0:ka[1])}});let Xe=(Sa=(pe=(ye=(Ve=(aa=s==null?void 0:s.contents)==null?void 0:aa.find(Ze=>{var ka;return(ka=Ze==null?void 0:Ze.key)==null?void 0:ka.includes("struct")}))==null?void 0:Ve.value)==null?void 0:ye[0])==null?void 0:pe.结构)==null?void 0:Sa.contents,Aa=(ya=Xe==null?void 0:Xe.map(Ze=>(Ze.value=Ma==null?void 0:Ma[Ze==null?void 0:Ze.prop],Ze)))==null?void 0:ya.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="sort"&&(Ze==null?void 0:Ze.prop)!=="relatedId");Aa=Aa==null?void 0:Aa.map(Ze=>(Je!=null&&Je.includes(Ze==null?void 0:Ze.prop)&&(Ze.isHideInForm=!0),Ze)),Te.push({key:"filter",contents:(ja=(Fl=(pl=(Nl=(vl=s==null?void 0:s.contents)==null?void 0:vl.find(Ze=>{var ka;return(ka=Ze==null?void 0:Ze.key)==null?void 0:ka.includes("struct")}))==null?void 0:Nl.value)==null?void 0:pl[0])==null?void 0:Fl.引用)==null?void 0:ja.contents}),Te.push({key:"formContent",contents:Aa}),Te.push({key:"paramHideProps",contents:Je}),m.compData=await Ap(Te,l,m==null?void 0:m.nameContents),(jl=m.compData)!=null&&jl.find(Ze=>(Ze==null?void 0:Ze.key)==="tab")&&(m.tab=(Da=(Rl=m.compData)==null?void 0:Rl.find(Ze=>(Ze==null?void 0:Ze.key)==="tab"))==null?void 0:Da.contents),(al=m.compData)!=null&&al.find(Ze=>(Ze==null?void 0:Ze.key)==="step")&&(m.step=(ol=(dl=m.compData)==null?void 0:dl.find(Ze=>(Ze==null?void 0:Ze.key)==="step"))==null?void 0:ol.contents),($a=m.compData)!=null&&$a.find(Ze=>(Ze==null?void 0:Ze.key)==="choice")&&(m.choice=(ll=(tl=m.compData)==null?void 0:tl.find(Ze=>(Ze==null?void 0:Ze.key)==="choice"))==null?void 0:ll.contents)}return m});return r=await Promise.all(o),r},$p=A.useLoginState(A.pinia),{loginUserInfo:wi}=A.storeToRefs($p),Vp=async(a,l="Manual",n=[])=>{var h;let r=a;r=r==null?void 0:r.filter(c=>c==null?void 0:c.functionName);let o=(h=r==null?void 0:r.filter(c=>{var d;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((d=c==null?void 0:c.calculatorFilter)==null?void 0:d.includes(l))||l!=="Manual")}))==null?void 0:h.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),s=r==null?void 0:r.map(async c=>{let d=o==null?void 0:o.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await tc(c,d,r,l,r,n),c});return s=await Promise.all(s),s},mt=async(a,l,n="Manual",r=[])=>{var d;let o=a,s;Array.isArray(l==null?void 0:l[0])?s=ce.getColumnChild(l==null?void 0:l[0]):s=l;let h=(d=s==null?void 0:s.filter(m=>{var b;return(m==null?void 0:m.calculatorFilter)&&((b=m==null?void 0:m.calculatorFilter)==null?void 0:b.includes(n))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:d.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})),c=o==null?void 0:o.map(async m=>(m=await tc(m,h,s,n,o,r),m));return c=await Promise.all(c),c},Pp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(h=>{var c;if(l!=null&&l[h]){let d=l==null?void 0:l[h];s=s?d?Tl.isEqual(d.toString(),s.toString()):void 0:d}else{let d=(c=o==null?void 0:o.find(b=>(b==null?void 0:b.label)===h))==null?void 0:c.prop,m=(l==null?void 0:l[d])??0;s=s?m?Tl.isEqual(m.toString(),s.toString()):void 0:m}}),l[r]=s===void 0?void 0:s?1:0,l},Cr=a=>{const[l,n,r]=A.cloneDeep(a).split(":").map(Number);let o=+a;return!a||!(a!=null&&a.includes(":"))?o:(l??0)*3600+(n??0)*60+(r??0)},Fn=a=>{const l=s=>s.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),o=a%60;return`${l(n)}:${l(r)}:${parseInt(l(o))}`},Fp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W,I,j;if(l!=null&&l[d]){if(s==="Row")if(!((b=((m=l==null?void 0:l[d])==null?void 0:m.toString())??"")!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let L=+(l==null?void 0:l[d]);c=c+L}else c=Cr(c.toString())+Cr((C=l==null?void 0:l[d])==null?void 0:C.toString()),c=Fn(c)}else if(s==="Row"){let L=(M=o==null?void 0:o.find(E=>(E==null?void 0:E.label)===d))==null?void 0:M.prop;if(!((W=Number.isNaN(l==null?void 0:l[L])?"":(k=l==null?void 0:l[L])==null?void 0:k.toString())!=null&&W.includes(":"))&&!((I=c==null?void 0:c.toString())!=null&&I.includes(":"))){let E=+((l==null?void 0:l[L])??0);c=c+E}else c=Cr(c==null?void 0:c.toString())+Cr((j=(l==null?void 0:l[L])??0)==null?void 0:j.toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u+C},0)}return l[r]=c,l},jp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c-I}else c=c===0?Cr(c.toString())+Cr(l==null?void 0:l[d].toString()):Cr(c.toString())-Cr(l==null?void 0:l[d].toString()),c=Fn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c-j}else c=c===0?Cr(c.toString())+Cr(((l==null?void 0:l[I])??0).toString()):Cr(c.toString())-Cr(((l==null?void 0:l[I])??0).toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u-C},0)}return l[r]=c,l},Hp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c*I}else c=c===0?Cr(c.toString())+Cr(l==null?void 0:l[d].toString()):Cr(c.toString())*Cr(l==null?void 0:l[d].toString()),c=Fn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!(l!=null&&l[I]))c=void 0;else if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c*j}else c=c===0?Cr(c.toString())+Cr(((l==null?void 0:l[I])??0).toString()):Cr(c.toString())*Cr(((l==null?void 0:l[I])??0).toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u*C},0)}return l[r]=c,l},Up=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c/I}else c=c===0?Cr(c.toString())+Cr(l==null?void 0:l[d].toString()):Cr(c.toString())/Cr(l==null?void 0:l[d].toString()),c=Fn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c/j}else c=c===0?Cr(c.toString())+Cr(((l==null?void 0:l[I])??0).toString()):Cr(c.toString())/Cr(((l==null?void 0:l[I])??0).toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u/C},0)}return l[r]=c.toFixed(2),l},qp=async a=>{var s,h,c,d,m,b,u,C,M,k,W;let l=(s=a==null?void 0:a.valueString)==null?void 0:s[0],n=(h=a==null?void 0:a.contents)==null?void 0:h.calculatorFilter,r=0,o=a==null?void 0:a.contents;if(l!=null&&l.includes("$")&&!(l!=null&&l.includes("{"))){(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let I=(d=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:d.replaceAll(":","/"),j=await Gr(I,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(j=(b=j==null?void 0:j.filter(E=>(E==null?void 0:E.name)===L))==null?void 0:b[0],n!==""){let E=j.compData;E=E==null?void 0:E.filter(x=>(x==null?void 0:x.key)!=="filter"),E.push({key:"filter",contents:"("+n+")"}),E=await Oo(E,{}),r=(C=(u=E==null?void 0:E.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:C.length}else r=(W=(k=(M=j==null?void 0:j.compData)==null?void 0:M.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:W.length}return o.value=r,o},fo={Sum:Fp,Substract:jp,Multiple:Hp,Divide:Up,Compare:Pp,VecDimCount:qp},tc=async(a,l,n,r="Auto",o,s=[])=>{var b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F;let h=a,c=[],d=await A.getPageDataApi({platId:parseInt((b=wi==null?void 0:wi.value)==null?void 0:b.plat_id),pageName:"menu"});d=(M=(C=(u=d==null?void 0:d.data)==null?void 0:u.result)==null?void 0:C.filter(ne=>(ne==null?void 0:ne.property_name)===""))==null?void 0:M[0];let m=[];if(d!=null&&d.object_name){d=d==null?void 0:d.object_name;let ne=await A.getPageDataApi({platId:parseInt((k=wi==null?void 0:wi.value)==null?void 0:k.plat_id),pageName:d});ne=(E=(L=(j=(I=(W=ne==null?void 0:ne.data)==null?void 0:W.result)==null?void 0:I[0])==null?void 0:j.contents)==null?void 0:L.find(J=>{var se;return(se=J==null?void 0:J.key)==null?void 0:se.includes("content")}))==null?void 0:E.value,c=(x=ne==null?void 0:ne.map(J=>({functionName:J==null?void 0:J.函数名称,functionContent:J==null?void 0:J.输出值})))==null?void 0:x.filter(J=>(J==null?void 0:J.functionContent)!==""),c==null||c.forEach(J=>{m.push(J.functionName),fo[J.functionName]=new Function("return "+J.functionContent)()})}if((l==null?void 0:l.length)===0)return h;for(let ne in l){let J=(w=l==null?void 0:l[ne])==null?void 0:w.functionName;const se=fo==null?void 0:fo[J];let Be=(g=l==null?void 0:l[ne])==null?void 0:g.methods;if(Be=ce.analyzeSplitToContent(Be,","),console.log(Be),(S=Be==null?void 0:Be.find($e=>$e==null?void 0:$e.includes("@FunctionType")))!=null&&S.includes(r)||r==="Auto"||(Be==null?void 0:Be.length)===0){let $e=((ae=(V=($=Be==null?void 0:Be.find(fe=>fe==null?void 0:fe.includes("@FunctionExtent")))==null?void 0:$.replace(":","="))==null?void 0:V.split("="))==null?void 0:ae[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(fe=>fe===J)){let fe="";try{let oe=(Z=l==null?void 0:l[ne])==null?void 0:Z.functionRelatedWords,U=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Ie=>{var je;return Ie==null?void 0:Ie[(je=l==null?void 0:l[ne])==null?void 0:je.prop]}):["0"];U=U==null?void 0:U.map(Ie=>Ie==null?void 0:Ie.slice((Ie==null?void 0:Ie.length)-5,Ie==null?void 0:Ie.length)),U=U==null?void 0:U.map(Ie=>ce.isNumber(parseInt(Ie))&&parseInt(Ie)?parseInt(Ie):0);let De=Math.max(...U);oe=oe==null?void 0:oe.map(Ie=>{if(Ie!=null&&Ie.includes("'"))return Ie==null?void 0:Ie.replaceAll("'","");if(Ie!=null&&Ie.includes("@"))return De+1;{let je=Object.keys(h);return Ie=(h==null?void 0:h[Ie])??(h==null?void 0:h[je==null?void 0:je.find(la=>la==null?void 0:la.includes("."+Ie))]),Ie}}),fe=se(...oe)}catch(oe){Ua.ElMessage.warning("关联数据出现错误,"+oe.message)}let N=(ge=l==null?void 0:l[ne])==null?void 0:ge.prop;h[N]=fe}else h=await se({contents:h,valueString:(ze=l==null?void 0:l[ne])==null?void 0:ze.functionRelatedWords,prop:(F=l==null?void 0:l[ne])==null?void 0:F.prop,headers:n,typeString:$e,allContents:o})}}return h},Wp=A.useLoginState(A.pinia),{loginUserInfo:on}=A.storeToRefs(Wp),Kp=A.useMenuState(A.pinia),{activeMenuPath:ss,currentMenuPath:ho}=A.storeToRefs(Kp),sc=A.useUnit(A.pinia);let cs="$R";const{selectTitle:Ei}=A.storeToRefs(sc),cc=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L;let n=ss.value,r="",o=((h=Ei==null?void 0:Ei.value)==null?void 0:h.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(d=a==null?void 0:a[0])==null?void 0:d.father_name);let s=[];if(r!==""){let E=r;(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));let x=await Gr(E,!1);x=(m=x==null?void 0:x[0])==null?void 0:m.compData;let w=(b=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:b.contents;w=((u=w==null?void 0:w.find(S=>S==null?void 0:S.isMainKey))==null?void 0:u.prop)??((C=w==null?void 0:w[0])==null?void 0:C.prop);let g=(k=(M=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:k.map(S=>({label:S==null?void 0:S[w],value:S==null?void 0:S[w]}));s=(W=r==null?void 0:r.split("/"))==null?void 0:W.map(S=>(S===""?o?(o.isShow=!0,S=o):S={value:S,condition:"child",options:g,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:S={condition:"parent",value:S.trim(),isShow:!0},S))}if(n!==""){let E=(I=n==null?void 0:n.split("/"))==null?void 0:I.map(x=>(x={condition:"normal",value:x.trim(),isShow:!0},x));((j=E==null?void 0:E[0])==null?void 0:j.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(E=E==null?void 0:E.filter((x,w)=>w!==0)),s=[...s??[],...E??[]]}r===""&&o&&((o==null?void 0:o.parentContent)!==ss.value&&(o.isShow=!1),(o==null?void 0:o.value)!==""&&s.push(o)),sc.setSelectTitle(s)},Gp=async a=>{var s,h,c,d,m,b,u,C,M;let l=await A.getPageDataApi({platId:parseInt((s=on==null?void 0:on.value)==null?void 0:s.plat_id),pageName:"menu"}),n=(h=l==null?void 0:l.data)==null?void 0:h.result,r=(b=(m=(d=(c=a==null?void 0:a.filter(k=>(k==null?void 0:k.comp)==="Table"))==null?void 0:c[0])==null?void 0:d.compData)==null?void 0:m.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:b.contents;r=(M=(C=(u=r==null?void 0:r.replace("(",cs))==null?void 0:u.split(cs))==null?void 0:C[0])==null?void 0:M.replaceAll(":","/");let o=n==null?void 0:n.filter(k=>{var W;return(k==null?void 0:k.object_name)===ho.value+"/"||((W=ho.value)==null?void 0:W.includes(r))&&r+"/"===(k==null?void 0:k.object_name)});return(o==null?void 0:o.length)>0&&(a=a==null?void 0:a.map(k=>{var W;return(k==null?void 0:k.comp)==="Table"&&(k.compData=(W=k==null?void 0:k.compData)==null?void 0:W.map(I=>{var j,L,E;return(I==null?void 0:I.key)==="header"&&(Array.isArray((j=I.contents)==null?void 0:j[0])?I.contents[0]=(E=I.contents[0])==null?void 0:E.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,(g=ho.value)!=null&&g.includes(r)&&(x.fatherPath=r)),x}):I.contents=(L=I.contents)==null?void 0:L.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,(g=ho.value)!=null&&g.includes(r)&&(x.fatherPath=r)),x})),I})),k})),a},Gr=async(a,l,n={})=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r=await A.getPageDataApi({platId:parseInt((h=on==null?void 0:on.value)==null?void 0:h.plat_id),pageName:a}),o=(c=r==null?void 0:r.data)==null?void 0:c.result;if((o==null?void 0:o.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await A.getPageDataApi({platId:parseInt((d=on==null?void 0:on.value)==null?void 0:d.plat_id),pageName:n==null?void 0:n.originPath});if(((b=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:b.length)>0){let E=await ts((u=L==null?void 0:L.data)==null?void 0:u.result,n,!1);E=E==null?void 0:E.map(async g=>{var V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya;let S=[],$=(V=Object.keys(g))==null?void 0:V.filter(R=>(R==null?void 0:R.includes("name"))&&R!=="nameContents");for(let R in g)$!=null&&$.find(H=>H===R)&&S.push(g==null?void 0:g[R]);if(S=S.reverse(),(g==null?void 0:g.comp)==="Table"){let R=(ge=(Z=(ae=g==null?void 0:g.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:Z.contents)==null?void 0:ge.map(X=>{let ve={};for(let de in X)de!=="id"&&de!=="create_time"&&de!=="update_time"&&de!=="sort"&&de!=="create_user_id"&&de!=="update_user_id"&&de!=="department_id"&&de!=="relatedId"&&(ve[de]=X==null?void 0:X[de]);return X=Object.values(ve),X}),H=(F=(ze=g==null?void 0:g.compData)==null?void 0:ze.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:F.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ne=H[0])!=null&&ne.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H[0]=(J=H[0])==null?void 0:J.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H=H==null?void 0:H.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(X=>{var ve;return(X==null?void 0:X.calculatorFilter)&&((ve=X==null?void 0:X.calculatorFilter)==null?void 0:ve.includes("Auto"))})&&(R=await mt(R,H,"Auto"),R=R==null?void 0:R.map(X=>Object.values(X))),g!=null&&g.fatherSyncContents){Array.isArray((se=g==null?void 0:g.fatherSyncContents)==null?void 0:se[0])&&(g.fatherSyncContents=(Be=g==null?void 0:g.fatherSyncContents)==null?void 0:Be[0]);let X=($e=Ei.value)==null?void 0:$e.find(ve=>(ve==null?void 0:ve.condition)==="child");g.fatherSyncContents=(fe=g==null?void 0:g.fatherSyncContents)==null?void 0:fe.map(ve=>{var de,va,na,Pe,xa,Me;return((va=ve==null?void 0:ve.menus)==null?void 0:va[((de=ve==null?void 0:ve.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(X==null?void 0:X.value):((Pe=ve==null?void 0:ve.menus)==null?void 0:Pe[((na=ve==null?void 0:ve.menus)==null?void 0:na.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Me=ve.menus)==null?void 0:Me.slice(0,((xa=ve.menus)==null?void 0:xa.length)-1)),ve})}if(g!=null&&g.sonSyncContents){Array.isArray((N=g==null?void 0:g.sonSyncContents)==null?void 0:N[0])&&(g.sonSyncContents=(oe=g==null?void 0:g.sonSyncContents)==null?void 0:oe[0]);let X=(U=Ei.value)==null?void 0:U.find(ve=>(ve==null?void 0:ve.condition)==="child");g.sonSyncContents=(De=g==null?void 0:g.sonSyncContents)==null?void 0:De.map(ve=>{var de,va,na,Pe,xa,Me;return((va=ve==null?void 0:ve.menus)==null?void 0:va[((de=ve==null?void 0:ve.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(X==null?void 0:X.value):((Pe=ve==null?void 0:ve.menus)==null?void 0:Pe[((na=ve==null?void 0:ve.menus)==null?void 0:na.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Me=ve.menus)==null?void 0:Me.slice(0,((xa=ve.menus)==null?void 0:xa.length)-1)),ve})}if(g!=null&&g.relatedQuotes){Array.isArray((Ie=g==null?void 0:g.relatedQuotes)==null?void 0:Ie[0])&&(g.relatedQuotes=(je=g==null?void 0:g.relatedQuotes)==null?void 0:je[0]);let X=(la=Ei.value)==null?void 0:la.find(ve=>(ve==null?void 0:ve.condition)==="child");g.relatedQuotes=(Ta=g==null?void 0:g.relatedQuotes)==null?void 0:Ta.map(ve=>{var de,va,na,Pe,xa,Me;return((va=ve==null?void 0:ve.menus)==null?void 0:va[((de=ve==null?void 0:ve.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(X==null?void 0:X.value):((Pe=ve==null?void 0:ve.menus)==null?void 0:Pe[((na=ve==null?void 0:ve.menus)==null?void 0:na.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Me=ve.menus)==null?void 0:Me.slice(0,((xa=ve.menus)==null?void 0:xa.length)-1)),ve})}g={filter:(ca=(ee=g==null?void 0:g.compData)==null?void 0:ee.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:ca.contents,key:g==null?void 0:g.comp,name:S,tableColumns:H,tableContents:R,menuFilter:g==null?void 0:g.menuFilter,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}else{let R=(Se=(ta=(ue=g==null?void 0:g.compData)==null?void 0:ue.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:ta.contents)==null?void 0:Se.map(X=>(X==null?void 0:X.value)??"");R=[R];let H=(We=(Ne=(te=g==null?void 0:g.compData)==null?void 0:te.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:Ne.contents)==null?void 0:We.map(X=>(X.value="",X));g={contents:R,filter:(Ya=(sa=g==null?void 0:g.compData)==null?void 0:sa.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:Ya.contents,key:g==null?void 0:g.comp,name:S,value:H,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}return g.isShow=!1,g}),E=await Promise.all(E);let x=[{key:"menuPath",contents:[{path:a,fatherPath:(k=(M=(C=L==null?void 0:L.data)==null?void 0:C.result)==null?void 0:M[0])==null?void 0:k.father_name,isShow:!1}]},{key:a,contents:E}];await A.createPlatFormDataApi({platId:parseInt((W=on==null?void 0:on.value)==null?void 0:W.plat_id),changeData:x});let w=await A.getPageDataApi({platId:parseInt((I=on==null?void 0:on.value)==null?void 0:I.plat_id),pageName:a});o=(j=w==null?void 0:w.data)==null?void 0:j.result}}l&&await cc(o,!!(n!=null&&n.originPath));let s=await ts(o,n);return l&&(s=await Gp(s)),s==null?void 0:s.filter(L=>L)},us=async a=>{var r,o,s,h,c,d,m,b,u,C,M;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(o=a.value)==null?void 0:o.split(" "))==null?void 0:s[0]));let n=await Gr(l,!1);if(n=(h=n==null?void 0:n.filter(k=>{var W,I;return(k==null?void 0:k.name)===((I=a==null?void 0:a.groups)==null?void 0:I[((W=a==null?void 0:a.groups)==null?void 0:W.length)-1])}))==null?void 0:h[0],(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="tableContents"))!=null&&d.contents){n=(b=(m=n==null?void 0:n.compData)==null?void 0:m.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:b.contents;let k=((u=a==null?void 0:a.words)==null?void 0:u[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(W=>{var I,j,L,E;return(W==null?void 0:W[a!=null&&a.endChildMenu?k:(I=a==null?void 0:a.words)==null?void 0:I[0]])===(a!=null&&a.relatedWords&&((j=a==null?void 0:a.relatedWords)==null?void 0:j.length)>0?(E=(L=a.value)==null?void 0:L.split(" "))==null?void 0:E[0]:a.value)}),n==null?void 0:n[0]}else{let k=(M=(C=n==null?void 0:n.compData)==null?void 0:C.find(I=>(I==null?void 0:I.key)==="formContent"))==null?void 0:M.contents,W={};return k==null||k.forEach(I=>{W[I.prop]=I.value}),W}},Yp={key:0,class:"extra-button-content"},Jp={class:"table-operator-wrap"},Xp={key:0,class:"extra-button-filter"},Zp={key:1,class:"extra-header"},Qp=["onClick"],ef={class:"table-op-text"},af={class:"table-op-text"},lf={class:"drop-menu",style:{width:"120px"}},rf=["onClick"],nf={key:0},of={key:1},tf=["onClick"],sf={class:"table-op-text"},cf={key:1,class:"extra-button-content tabs-button-wrapper"},uf={class:"table-operator-wrap"},df={class:"extra-button-filter"},pf={key:0,class:"extra-header"},ff={class:"table-op-action"},hf={class:"table-op-text"},vf={class:"drop-menu",style:{width:"120px"}},mf={key:0},yf={key:1},gf=["onClick"],bf={class:"table-op-text"},kf={__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:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const n=l,r=a,o=()=>{const $=(r==null?void 0:r.menuFilter)||[];return Array.isArray($)&&($==null?void 0:$.some(V=>{const ae=typeof V=="string"?V:JSON.stringify(V);return ae==null?void 0:ae.includes("HideGroup=Yes")}))},s=e.ref(""),h=e.ref(!1),c=e.ref(!1),d=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),b=[{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 u($,V){return $.map(ae=>{const Z={...ae};return V.forEach(ge=>{delete Z[ge]}),Z})}function C($){if(!$||$.t!=="n")return($==null?void 0:$.v)??"";const V=$.v;if($.z){const ae=String($.z).toLowerCase(),Z=["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 F of Z)if(ae.includes(F))return M(V);const ge=/[ymdhms]/.test(ae),ze=/^[0#\.\,\s]+$/.test(ae.replace(/[\\\/\-:]/g,""));if(ge&&!ze)return M(V)}if(V>=1&&V<=73050){if(V<5e3)return V;if(V>=5e3&&V<4e4){const ae=Math.floor((V-25569)/365.25)+1970;return ae>=1970&&ae<=2e3&&$.z&&/[ymd]/.test(String($.z).toLowerCase())?M(V):V}if(V>=4e4)return M(V)}return V}function M($){if(typeof $!="number")return $;try{const V=new Date(($-25569)*86400*1e3);if(isNaN(V.getTime()))return $;const ae=V.getFullYear(),Z=String(V.getMonth()+1).padStart(2,"0"),ge=String(V.getDate()).padStart(2,"0");return`${ae}-${Z}-${ge}`}catch{return $}}const k=$=>{const V=$.raw;if(!V)return;const ae=new FileReader;ae.onload=Z=>{try{const ge=new Uint8Array(Z.target.result),ze=ce.readSync(ge,{type:"array"}),F=ze.SheetNames[0],ne=ze.Sheets[F],se=ce.utils.decode_range(ne["!ref"]).e.c+1,Be=new Array(se).fill(""),$e=[];for(const De in ne){if(De[0]==="!")continue;const{r:Ie,c:je}=ce.utils.decode_cell(De),la=ne[De];let Ta=C(la);if((Ta==null||Ta==="")&&(Ta=""),Ie===0)Be[je]=Ta;else{if(!$e[Ie-1]){$e[Ie-1]={};for(let ee=0;ee<se;ee++)$e[Ie-1][`col_${ee}`]=""}$e[Ie-1][`col_${je}`]=Ta}}for(let De=0;De<se;De++)Be[De]===void 0&&(Be[De]="");const fe=[];for(let De=0;De<Be.length;De++)(!Be[De]||Be[De].toString().trim()==="")&&fe.push(De);let N,oe;(fe==null?void 0:fe.length)>0?(Ua.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),N=Be.filter((De,Ie)=>!fe.includes(Ie)),oe=u($e,fe==null?void 0:fe.map(De=>`col_${De}`))):(N=Be,oe=$e);const U=$e==null?void 0:$e[0];if(!(U!=null&&U.hasOwnProperty("col_0")))return Ua.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",N,oe)}catch(ge){throw Ua.ElMessage.error(ge.message),new Error(ge.message)}},ae.readAsArrayBuffer(V)},W=$=>{var ae;const V=(ae=d.value)==null?void 0:ae.reduce((Z,ge,ze)=>(ze===0?Z[ge.label]=$:Z[ge.label]=ge==null?void 0:ge.value,Z),{});n("filter",V,$,!0)},I=($,V={})=>{n("buttonClick",$,"",V)},j=$=>{var V,ae;d.value=(ae=(V=ce.getColumnChild(A.cloneDeep($)))==null?void 0:V.filter(Z=>(Z==null?void 0:Z.label)!==""&&(Z==null?void 0:Z.label)!=="操作"))==null?void 0:ae.map(Z=>({label:(Z==null?void 0:Z.label)??"",value:"",name:(Z==null?void 0:Z.prop)??"",isFormColHidden:Z==null?void 0:Z.isTableColHidden,width:2,prop:(Z==null?void 0:Z.prop)??""}))},L=e.ref(!1),E=$=>{var V;if(($==null?void 0:$.buttonName)==="确认"&&(n("filter",$==null?void 0:$.content),L.value=($==null?void 0:$.content)&&Object.values($==null?void 0:$.content).length>0),($==null?void 0:$.buttonName)==="清空"){const ae=A.cloneDeep($==null?void 0:$.content);for(const Z in ae)ae[Z]="";d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""})),n("filter",ae),L.value=!1}h.value=!1},x=()=>{h.value=!h.value,c.value=!0},w=()=>{var V,ae;d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""}));const $=(ae=d.value)==null?void 0:ae.reduce((Z,ge)=>(Z[ge.label]=ge.value,Z),{});n("filter",$)},g=e.ref(null);let S;return S=$=>{var ge;if(!h.value)return;const V=(ge=g==null?void 0:g.value)==null?void 0:ge.$el,ae=V==null?void 0:V.contains($.target);let Z=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(ze=>{ze.contains($.target)&&(Z=!0)}),!ae&&!Z&&(h.value=!1)},e.onMounted(()=>{document.addEventListener("click",S),j(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",S)}),e.watch(()=>r.columns,()=>{j(r.columns)},{deep:!0,immediate:!0}),($,V)=>{var ne,J,se,Be,$e,fe,N,oe;const ae=e.resolveComponent("el-icon"),Z=e.resolveComponent("svg-icon"),ge=e.resolveComponent("el-input"),ze=e.resolveComponent("el-upload"),F=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Yp,[o()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Jp,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",Xp,[e.createVNode($u,{trigger:"contextmenu",ref_key:"popOverRef",ref:g,title:"",width:800,placement:"bottom-start",isVisible:h.value,"onUpdate:isVisible":V[4]||(V[4]=U=>h.value=U)},{reference:e.withCtx(()=>{var U,De,Ie,je;return[e.createVNode(ge,{modelValue:s.value,"onUpdate:modelValue":V[0]||(V[0]=la=>s.value=la),style:{"min-width":"80px"},placeholder:L.value?(Ie=(De=(U=a.filterValues)==null?void 0:U.filter(la=>la))==null?void 0:De.slice(0,3))==null?void 0:Ie.join("/"):"搜索","prefix-icon":e.unref(Ua.search_default),clearable:"",onInput:W,disabled:((je=d.value)==null?void 0:je.length)===0},{suffix:e.withCtx(()=>{var la,Ta;return[!s.value&&((Ta=(la=a.filterValues)==null?void 0:la.filter(ee=>ee))!=null&&Ta.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-content-value",onKeydown:V[1]||(V[1]=e.withModifiers(()=>{},["stop"])),onKeyup:V[2]||(V[2]=e.withModifiers(()=>{},["stop"])),onKeypress:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:E},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((ne=a.buttons)==null?void 0:ne.length)>0?(e.openBlock(),e.createElementBlock("div",Zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=a.buttons)==null?void 0:J.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,De)=>{var Ie;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:De},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var je;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:la=>I(U==null?void 0:U.label)},[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"]),e.createElementVNode("span",ef,e.toDisplayString(U==null?void 0:U.label),1)],10,Qp)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(nl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var je;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"]),e.createElementVNode("span",af,e.toDisplayString(U==null?void 0:U.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",lf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,je=>{var la,Ta;return e.openBlock(),e.createElementBlock("div",{key:je==null?void 0:je.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ee=>!a.lockingPage&&I(je==null?void 0:je.label)},[e.createTextVNode(e.toDisplayString(je==null?void 0:je.label),1),(la=je==null?void 0:je.label)!=null&&la.includes("选中")?(e.openBlock(),e.createElementBlock("span",nf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=je==null?void 0:je.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",of,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,rf)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:je=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:((Ie=b==null?void 0:b.find(je=>(je==null?void 0:je.label)===(U==null?void 0:U.label)))==null?void 0:Ie.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",sf,e.toDisplayString(U==null?void 0:U.label),1)],10,tf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",cf,[e.createElementVNode("div",uf,[e.createElementVNode("div",df,[e.createVNode(ge,{modelValue:s.value,"onUpdate:modelValue":V[5]||(V[5]=U=>s.value=U),style:{"min-width":"80px"},placeholder:L.value?($e=(Be=(se=a.filterValues)==null?void 0:se.filter(U=>U))==null?void 0:Be.slice(0,3))==null?void 0:$e.join("/"):"搜索","prefix-icon":e.unref(Ua.search_default),clearable:"",onInput:W,disabled:((fe=d.value)==null?void 0:fe.length)===0},{suffix:e.withCtx(()=>{var U,De;return[!s.value&&((De=(U=a.filterValues)==null?void 0:U.filter(Ie=>Ie))!=null&&De.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((N=a.buttons)==null?void 0:N.length)>0?(e.openBlock(),e.createElementBlock("div",pf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=a.buttons)==null?void 0:oe.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,De)=>{var Ie;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:De},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var je;return[e.createElementVNode("div",ff,[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"]),e.createElementVNode("span",hf,e.toDisplayString(U==null?void 0:U.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(nl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(F,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var je;return[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",vf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,je=>(e.openBlock(),e.createBlock(F,{key:je==null?void 0:je.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:la=>I(je==null?void 0:je.label)},{default:e.withCtx(()=>{var la,Ta;return[e.createTextVNode(e.toDisplayString(je==null?void 0:je.label),1),(la=je==null?void 0:je.label)!=null&&la.includes("选中")?(e.openBlock(),e.createElementBlock("span",mf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=je==null?void 0:je.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",yf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:je=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:(Ie=b==null?void 0:b.find(je=>(je==null?void 0:je.label)===(U==null?void 0:U.label)))==null?void 0:Ie.icon},null,8,["name"]),e.createElementVNode("span",bf,e.toDisplayString(U==null?void 0:U.label),1)],10,gf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},xf=Xl._export_sfc(kf,[["__scopeId","data-v-44a17652"]]),wf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=e.resolveComponent("el-table-column"),o=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(o,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var h;return e.openBlock(),e.createBlock(r,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((h=s==null?void 0:s.label)==null?void 0:h.length)*2||4)*27)},{default:e.withCtx(c=>[e.renderSlot(l.$slots,"content",{row:c.row,column:c.column,$index:c.$index,scope:c}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(d,m)=>(e.openBlock(),e.createBlock(nl._sfc_main$2,{key:m,column:d,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(b,u)=>({name:u,fn:e.withCtx(({row:C,slotData:M,item:k,column:W})=>[e.renderSlot(l.$slots,u,e.mergeProps({ref_for:!0},M??C,{item:k??d,slotData:M??C,row:C,column:W,columnProp:d}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class _f extends Tl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,o){const s=this,h=new Tl.FileLoader(s.manager);h.setPath(s.path),h.setResponseType("arraybuffer"),h.setRequestHeader(s.requestHeader),h.setWithCredentials(s.withCredentials),h.load(l,function(c){try{n(s.parse(c))}catch(d){o?o(d):console.error(d),s.manager.itemError(l)}},r,o)}_getDataView(l,n,r,o){switch(r){case"F":return o===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return o===1?l.getInt8(n):o===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return o===1?l.getUint8(n):o===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(M,k){const W=M.length,I=new Uint8Array(k);let j=0,L=0,E,x,w;do if(E=M[j++],E<32){if(E++,L+E>k)throw new Error("Output buffer is not large enough");if(j+E>W)throw new Error("Invalid compressed data");do I[L++]=M[j++];while(--E)}else{if(x=E>>5,w=L-((E&31)<<8)-1,j>=W)throw new Error("Invalid compressed data");if(x===7&&(x+=M[j++],j>=W))throw new Error("Invalid compressed data");if(w-=M[j++],L+x+2>k)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=L)throw new Error("Invalid compressed data");do I[L++]=I[w++];while(--x+2)}while(j<W);return I}function r(M){const k={},W=new Uint8Array(M);let I="",j="",L=0,E=!1;const x=W.length;for(;L<x&&E===!1;){const $=String.fromCharCode(W[L++]);$===`
1
+ "use strict";var Au=Object.defineProperty;var zu=(a,l,n)=>l in a?Au(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var en=(a,l,n)=>zu(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),Ua=require("./request-Dl8yi2iS.cjs"),A=require("./index-Pve69buQ.cjs"),nl=require("./index-B_TGjgjf.cjs"),ce=require("./index-BszVYrt4.cjs"),Xl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BB3g-g6w.cjs"),Br=require("./index-BOkUwKV5.cjs"),So=require("./threeViewerHost-C5RcAXq8.cjs"),Mr=require("./index-DmwxzDGW.cjs"),ls=require("./index-FZRnyOVE.cjs"),Ys=require("./index-DBxrIHI8.cjs");;/* empty css */const Eo=require("./isString-CGrvcmBw.cjs"),rs=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Js=require("./index-BVaHwt5f.cjs"),Mu=require("./index-BRyEcXsJ.cjs"),Mn=require("./MTLLoader-B0vEDLTb.cjs"),Iu=require("./URDFLoader-g-0sln-a.cjs");var Ou="[object Boolean]";function Xs(a){return a===!0||a===!1||Ua.isObjectLike(a)&&Ua.baseGetTag(a)==Ou}function Lu(a){return a===void 0}const Ru=a=>a.match(/\((.*)\)/)[1],$u={__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(a){const l=a,n=e.ref(null),r=e.ref(!1),o=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>o.value,()=>{e.nextTick(()=>{var s,h;(h=(s=n.value)==null?void 0:s.updatePopper)==null||h.call(s)})},{deep:!0,immediate:!0}),(s,h)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":h[0]||(h[0]=d=>r.value=d),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:o})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Vu=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var d,m,b,u,C,M;const r=l.value??"";let o=(d=l==null?void 0:l.columnContent)==null?void 0:d.filter;if(o=(m=ce.analyzeSplitToContent(o,","))==null?void 0:m.map(k=>((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)),o=o==null?void 0:o.find(k=>(k==null?void 0:k[0])==="("),(o==null?void 0:o[0])==="("&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=o==null?void 0:o.split("||"),!o)return{backgroundColor:void 0,color:void 0};let s=(u=(b=l==null?void 0:l.columnContent)==null?void 0:b.options)==null?void 0:u.findIndex(k=>(k==null?void 0:k.value)===r);s=o==null?void 0:o[s],s=ce.analyzeSplitToContent(s,","),s=s==null?void 0:s.map(k=>((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));let h=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextBackRGBA"));h?h=ce.rgbaToColor((C=h==null?void 0:h.split("="))==null?void 0:C[1]):h=void 0;let c=s==null?void 0:s.find(k=>k==null?void 0:k.includes("@TextRGBA"));return c?c=ce.rgbaToColor((M=c==null?void 0:c.split("="))==null?void 0:M[1]):c=void 0,{backgroundColor:h,color:c}});return(r,o)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),Pu=Xl._export_sfc(Vu,[["__scopeId","data-v-3290070b"]]);function Fu(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const o=a.getContext("2d");if(!o)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:h=2,fillOpacity:c=.2}=r,d=a.getBoundingClientRect(),m=l.getBoundingClientRect(),b=l.naturalWidth,u=l.naturalHeight,C=m.width/b,M=m.height/u,k=Math.min(C,M),W=b*k,I=u*k,j=(d.width-W)/2,L=(d.height-I)/2,E=n.map(([w,g])=>{const S=j+w*W,$=L+g*I;return{x:S,y:$}});o.clearRect(0,0,a.width,a.height),o.beginPath(),o.moveTo(E[0].x,E[0].y);for(let w=1;w<E.length;w++)o.lineTo(E[w].x,E[w].y);o.closePath();const x=s.replace(/[\d.]+\)$/,`${c})`);o.fillStyle=x,o.fill(),o.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),o.lineWidth=h,o.stroke()}function xi(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ns(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const ju={key:0,class:"ocr-img-preview-root"},Hu={class:"ocr-img-preview-window"},Uu={key:0,class:"img-preview-body"},qu={class:"img-preview-header"},Wu={class:"img-header-left"},Ku={class:"img-name"},Gu={key:0,class:"img-header-right"},Yu={class:"img-index"},Ju={key:0,class:"img-thumb-list"},Xu=["onClick"],Zu={key:1,class:"thumb-placeholder"},Qu={class:"thumb-name"},ed={class:"img-preview-container"},ad={key:0,class:"img-placeholder"},ld={key:2,class:"img-placeholder"},rd={key:0},nd={key:1},id={key:1,class:"img-placeholder"},od=e.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(a,{emit:l}){const n=a,r=l,o=e.computed({get:()=>n.visible,set:N=>r("update:visible",N)});let s=!1,h="",c=0,d=0,m=0,b=0,u=0,C=0,M=null;const k=N=>{var U,De;const oe=(De=(U=N==null?void 0:N.target)==null?void 0:U.closest)==null?void 0:De.call(U,".ocr-img-preview-window");return oe||document.querySelector(".ocr-img-preview-window")},W=N=>{if(!N||N==="none")return{tx:0,ty:0};let oe=N.match(/matrix\(([^)]+)\)/);if(oe){const U=oe[1].split(",").map(De=>Number(De.trim()));return{tx:(U==null?void 0:U[4])||0,ty:(U==null?void 0:U[5])||0}}if(oe=N.match(/matrix3d\(([^)]+)\)/),oe){const U=oe[1].split(",").map(De=>Number(De.trim()));return{tx:(U==null?void 0:U[12])||0,ty:(U==null?void 0:U[13])||0}}return oe=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),oe?{tx:Number(oe[1])||0,ty:Number(oe[2])||0}:{tx:0,ty:0}},I=(N,oe,U)=>{N.style.transform=`translate(${oe}px, ${U}px)`},j=N=>{const oe=k(N);if(!oe)return;s=!0,M=oe,h="move",c=N.clientX,d=N.clientY;const U=window.getComputedStyle(oe),{tx:De,ty:Ie}=W(U.transform);u=De,C=Ie,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},L=(N,oe)=>{const U=k(N);if(!U)return;s=!0,M=U,h=oe,c=N.clientX,d=N.clientY;const De=U.getBoundingClientRect();m=De.width,b=De.height;const Ie=window.getComputedStyle(U),{tx:je,ty:la}=W(Ie.transform);u=je,C=la,document.addEventListener("mousemove",E),document.addEventListener("mouseup",x)},E=N=>{if(!s||!M)return;const oe=N.clientX-c,U=N.clientY-d,De=360,Ie=420;let je=m,la=b,Ta=u,ee=C;if(h==="move"){Ta=u+oe,ee=C+U,I(M,Ta,ee);return}if(h.includes("right")&&(je=Math.max(De,m+oe)),h.includes("bottom")&&(la=Math.max(Ie,b+U)),h.includes("left")){const ca=m-oe;ca<De?(je=De,Ta=u+(m-De)):(je=ca,Ta=u+oe)}if(h.includes("top")){const ca=b-U;ca<Ie?(la=Ie,ee=C+(b-Ie)):(la=ca,ee=C+U)}M.style.width=`${je}px`,M.style.height=`${la}px`,I(M,Ta,ee)},x=()=>{s=!1,h="",M=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)},w=e.ref([]),g=e.ref(!1);e.watch(()=>n.images,async N=>{if(!Array.isArray(N)||N.length===0){w.value=[];return}g.value=!0;const oe=[];for(const U of N)if(U.url&&!U.url.startsWith("blob:")&&!U.url.startsWith("http"))try{const De=await Tl.downloadFile(U.url),Ie=URL.createObjectURL(De);oe.push({...U,blobUrl:Ie})}catch(De){console.error(`Failed to load image for preview: ${U.url}`,De),oe.push({...U,blobUrl:""})}else oe.push({...U,blobUrl:U.url});w.value=oe,g.value=!1},{deep:!0,immediate:!0});const S=e.ref(0),$=e.ref(null),V=e.ref(null),ae=e.computed(()=>w.value[S.value]||null),Z=()=>{if(!w.value.length){S.value=0;return}if(n.defaultImageName){const N=w.value.findIndex(oe=>(oe==null?void 0:oe.name)===n.defaultImageName);S.value=N>=0?N:0}else S.value=0},be=N=>{if(!w.value.length)return;const oe=Math.max(0,Math.min(N,w.value.length-1));S.value=oe},ze=()=>be(S.value-1),F=()=>be(S.value+1),ne=N=>{if(!N)return;const oe=w.value.findIndex(U=>(U==null?void 0:U.name)===N);oe>=0&&(S.value=oe)},J=()=>{if(!V.value)return;const N=V.value.parentElement;if(!N)return;const oe=N.getBoundingClientRect();V.value.width=oe.width,V.value.height=oe.height},se=()=>{var De,Ie;if(!V.value||!$.value||!n.focusedFieldName){V.value&&xi(V.value);return}const N=(De=$.value.$el)==null?void 0:De.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{se()})};return}const oe=((Ie=ae.value)==null?void 0:Ie.name)||"",U=ns(n.fieldMeta,n.focusedFieldName);if(!U){xi(V.value);return}if(U.imageName!==oe){xi(V.value);return}J(),Fu(V.value,N,U.bboxNorm)},Be=()=>{e.nextTick(()=>{J(),se()})};e.watch(()=>n.focusedFieldName,()=>{if(!o.value)return;const N=ns(n.fieldMeta,n.focusedFieldName);N!=null&&N.imageName&&ne(N.imageName),e.nextTick(()=>{se()})}),e.watch(()=>{var N;return(N=ae.value)==null?void 0:N.name},()=>{o.value&&e.nextTick(()=>{V.value&&xi(V.value),se()})}),e.watch(()=>n.visible,N=>{N?(Z(),e.nextTick(()=>{J(),se()})):V.value&&xi(V.value)}),e.watch(()=>n.defaultImageName,()=>{o.value&&Z()});let $e=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&($e=new ResizeObserver(()=>{J(),e.nextTick(()=>{se()})}),(N=V.value)!=null&&N.parentElement&&$e.observe(V.value.parentElement))}),e.onUnmounted(()=>{$e&&($e.disconnect(),$e=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",x)});const fe=()=>{V.value&&xi(V.value),r("update:visible",!1),r("close")};return(N,oe)=>{var la,Ta;const U=e.resolveComponent("el-button"),De=e.resolveComponent("el-image"),Ie=e.resolveComponent("Loading"),je=e.resolveComponent("el-icon");return o.value?(e.openBlock(),e.createElementBlock("div",ju,[oe[12]||(oe[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",Hu,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(j,["stop"])},[oe[8]||(oe[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:fe},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:oe[0]||(oe[0]=e.withModifiers(ee=>L(ee,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:oe[1]||(oe[1]=e.withModifiers(ee=>L(ee,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:oe[2]||(oe[2]=e.withModifiers(ee=>L(ee,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:oe[3]||(oe[3]=e.withModifiers(ee=>L(ee,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:oe[4]||(oe[4]=e.withModifiers(ee=>L(ee,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:oe[5]||(oe[5]=e.withModifiers(ee=>L(ee,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:oe[6]||(oe[6]=e.withModifiers(ee=>L(ee,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:oe[7]||(oe[7]=e.withModifiers(ee=>L(ee,"bottom-right"),["stop"]))},null,32),ae.value?(e.openBlock(),e.createElementBlock("div",Uu,[e.createElementVNode("div",qu,[e.createElementVNode("div",Wu,[e.createElementVNode("span",Ku,e.toDisplayString(ae.value.name?ae.value.name+(ae.value.url&&ae.value.url.lastIndexOf(".")!==-1?ae.value.url.substring(ae.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Gu,[e.createVNode(U,{size:"small",disabled:S.value===0,onClick:ze},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Yu,e.toDisplayString(S.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(U,{size:"small",disabled:S.value===w.value.length-1,onClick:F},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Ju,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ee,ca)=>(e.openBlock(),e.createElementBlock("div",{key:(ee.name||"")+"-"+ca,class:e.normalizeClass(["img-thumb-item",{active:ca===S.value}]),onClick:ue=>be(ca)},[ee!=null&&ee.blobUrl?(e.openBlock(),e.createBlock(De,{key:0,src:ee.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ee.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Zu,"加载失败")),e.createElementVNode("div",Qu,e.toDisplayString(ee.name||"-"),1)],10,Xu))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ed,[g.value?(e.openBlock(),e.createElementBlock("div",ad,[e.createVNode(je,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Ie)]),_:1}),oe[11]||(oe[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(la=ae.value)!=null&&la.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(De,{ref_key:"imageRef",ref:$,src:ae.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[ae.value.blobUrl],onLoad:Be},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:V,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",ld,[(Ta=ae.value)!=null&&Ta.url?(e.openBlock(),e.createElementBlock("span",rd,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",nd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",id,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),td=Xl._export_sfc(od,[["__scopeId","data-v-48a4ecb1"]]),sd={class:"cert-preview-body"},cd={key:0,class:"pdf-preview-container"},ud={class:"thumbs"},dd=["onClick"],pd={class:"thumb-img"},fd=["src"],hd={key:1,class:"thumb-loading"},vd={class:"thumb-title"},md={class:"viewer"},yd={key:0,class:"viewer-img-wrap"},gd=["src"],bd={key:1,class:"viewer-loading"},kd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(""),s=e.ref(""),h=e.computed(()=>(n.versions||[]).find(k=>String(k.versionId)===String(o.value))),c=e.ref({}),d=e.ref(""),m=e.ref("证书附件.pdf"),b=()=>{try{Object.values(c.value||{}).forEach(k=>{k&&URL.revokeObjectURL(k)}),d.value&&URL.revokeObjectURL(d.value)}catch{}c.value={},d.value=""},u=async k=>{if(!k||k.fileType==="pdf")return;const W=Array.isArray(k.images)?k.images:[];for(const I of W){const j=I==null?void 0:I.url;if(!(!j||c.value[j]))try{const L=await A.platformDownloadFile({url:j}),E=URL.createObjectURL(L.data);c.value={...c.value,[j]:E}}catch{}}},C=async k=>{var I;if(!k||k.fileType!=="pdf"){d.value="";return}const W=k.sourceUrl||"";if(!W){d.value="";return}if(d.value){try{URL.revokeObjectURL(d.value)}catch{}d.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:W,versionId:k==null?void 0:k.versionId,certNo:k==null?void 0:k.certNo});const j=await A.platformDownloadFile({url:W});console.log("[CertificatePreview] PDF响应:",{url:W,status:j==null?void 0:j.status,size:(I=j==null?void 0:j.data)==null?void 0:I.size});const L=URL.createObjectURL(j.data);d.value=L;const E=k.certNo?String(k.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(j){console.error("[CertificatePreview] PDF加载失败:",{url:W,error:j}),d.value=""}};e.watch(()=>n.visible,async k=>{var I;if(!k){b();return}const W=(I=n.versions)==null?void 0:I[0];o.value=(W==null?void 0:W.versionId)||"",await u(W),await C(W)},{immediate:!0}),e.watch(()=>o.value,async()=>{var W,I;const k=h.value;if(!k){s.value="",d.value="";return}if(k.fileType==="pdf"){s.value="",await C(k);return}d.value="",s.value=((I=(W=k.images)==null?void 0:W[0])==null?void 0:I.url)||"",await u(k)},{immediate:!0});const M=()=>{r("update:visible",!1),b()};return e.onBeforeUnmount(()=>{b()}),(k,W)=>{const I=e.resolveComponent("el-empty"),j=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),x=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(x,{"model-value":k.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:M},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:M},{default:e.withCtx(()=>W[1]||(W[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[k.versions&&k.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:o.value,"onUpdate:modelValue":W[0]||(W[0]=w=>o.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.versions,w=>(e.openBlock(),e.createBlock(j,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",sd,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",cd,[d.value?(e.openBlock(),e.createBlock(nl.SsFilePreview,{key:1,fileName:m.value,blobUrl:d.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(I,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ud,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.images||[],g=>(e.openBlock(),e.createElementBlock("div",{key:g.url,class:e.normalizeClass(["thumb",{active:g.url===s.value}]),onClick:S=>s.value=g.url},[e.createElementVNode("div",pd,[c.value[g.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[g.url]},null,8,fd)):(e.openBlock(),e.createElementBlock("div",hd,"加载中"))]),e.createElementVNode("div",vd,e.toDisplayString(g.name),1)],10,dd))),128))]),e.createElementVNode("div",md,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[s.value]?(e.openBlock(),e.createElementBlock("div",yd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[s.value]},null,8,gd)])):(e.openBlock(),e.createElementBlock("div",bd,"加载中"))],64)):(e.openBlock(),e.createBlock(I,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(I,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),xd=Xl._export_sfc(kd,[["__scopeId","data-v-220703c0"]]),wd={class:"ocr-candidate-wrap"},_d={class:"ocr-candidate-left"},Sd={key:1},Ed={key:0},Cd={key:1},Dd={key:2},Bd={key:3},Td={key:0,class:"ocr-candidate-right"},Nd={class:"ocr-candidate-actions"},Ad={key:1},zd={class:"dialog-footer"},Md={__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(a,{emit:l}){const n=(S=[])=>{const $=[],V=ae=>{(ae||[]).forEach(Z=>{if(!Z)return;const be=Z.children||Z.childrens||Z.columns;Array.isArray(be)&&be.length>0?V(be):$.push(Z)})};return V(S),$},r=a,o=l,s=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowAdd)!==!1}),h=e.computed(()=>{var S;return((S=C.value)==null?void 0:S.allowReplace)!==!1}),c=S=>{if(!S)return[];if(Array.isArray(S))return S;if(typeof S=="string")try{const $=JSON.parse(S);return Array.isArray($)?$:[]}catch{return[]}return[]},d=S=>{o("preview-file",S)},m=e.ref([]),b=e.ref(0),u=e.ref("");e.watch(()=>r.candidates,S=>{var $,V;m.value=(S||[]).map(ae=>({...ae,...(ae==null?void 0:ae.ocrRow)||{},selectedTargetId:(ae==null?void 0:ae.selectedTargetId)||"",__decision:ae==null?void 0:ae.__decision})),b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,S=>{var $,V;S&&(b.value=0,u.value=((V=($=m.value)==null?void 0:$[0])==null?void 0:V.selectedTargetId)||"")});const C=e.computed(()=>{var $;const S=Number(b.value||0);return(($=m.value||[])==null?void 0:$[S])||null}),M=e.computed(()=>(n(r.columns||[])||[]).filter(V=>V&&V.prop).filter(V=>V.type!=="operate"&&V.label!=="操作"&&V.prop!=="operate")),k=e.computed(()=>M.value.filter(S=>S.label!=="证书附件"&&S.prop!=="证书附件")),W=S=>{if(!S)return;const $=(m.value||[]).findIndex(V=>(V==null?void 0:V.idx)===(S==null?void 0:S.idx));$>-1&&(b.value=$,u.value=(S==null?void 0:S.selectedTargetId)||"")},I=S=>{if(!S){u.value="";return}u.value=String((S==null?void 0:S.id)??"")},j=(S,$="")=>{const V=Number(b.value||0),ae=m.value||[],Z=ae[V];Z&&(Z.__decision=S,Z.selectedTargetId=$,u.value=$,m.value=[...ae])},L=()=>j("skip",""),E=()=>j("add",""),x=()=>{if(!u.value){Ua.ElMessage.warning("请先选择要替换的目标记录");return}j("replace",u.value)},w=()=>{o("update:visible",!1)},g=()=>{const S=m.value||[];if(S.find(V=>(V==null?void 0:V.__decision)==="replace"&&!(V!=null&&V.selectedTargetId))){Ua.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}o("submit",S),o("update:visible",!1)};return(S,$)=>{const V=e.resolveComponent("el-table-column"),ae=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-table"),be=e.resolveComponent("el-button"),ze=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var F,ne;return[e.createElementVNode("div",wd,[e.createElementVNode("div",_d,[$[0]||($[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Z,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:W},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:se})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(se==null?void 0:se[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Be=>d({row:se,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Sd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((se==null?void 0:se[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(V,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:J})=>[e.createTextVNode(e.toDisplayString(((J==null?void 0:J.candidates)||[]).length),1)]),_:1}),e.createVNode(V,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:J})=>[(J==null?void 0:J.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Ed,"替换")):(J==null?void 0:J.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Cd,"新增")):(J==null?void 0:J.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Dd,"跳过")):(e.openBlock(),e.createElementBlock("span",Bd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Td,[$[4]||($[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Nd,[e.createVNode(be,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>$[1]||($[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(be,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>$[2]||($[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(be,{class:"ok-button",id:"themeButton",onClick:x,disabled:!h.value||!u.value},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((F=C.value)==null?void 0:F.candidates)||[]).length===0?(e.openBlock(),e.createBlock(ze,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Z,{data:((ne=C.value)==null?void 0:ne.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:I,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(V,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,J=>(e.openBlock(),e.createBlock(V,{key:J.prop,label:J.label,prop:J.prop,"min-width":J.minWidth||160},{default:e.withCtx(({row:se})=>[J.label==="证书附件"||J.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(se==null?void 0:se[J.prop]).length>0?(e.openBlock(),e.createBlock(ae,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Be=>d({row:se,prop:J.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Ad,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((se==null?void 0:se[J.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",zd,[e.createVNode(be,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>$[5]||($[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(be,{class:"ok-button",id:"themeButton",onClick:g},{default:e.withCtx(()=>$[6]||($[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Id=Xl._export_sfc(Md,[["__scopeId","data-v-89e0489c"]]),Od={class:"ocr-preview-content"},Ld={class:"ocr-preview-tip"},Rd={class:"ocr-preview-table"},$d={style:{display:"flex","align-items":"center",gap:"8px"}},Vd={class:"dialog-footer"},Pd={__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(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref([]),h=e.ref([]);e.watch(()=>n.visible,M=>{M&&(o.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),h.value=[...n.ocrSelectedFields])});const c=(M,k)=>{const W=[...h.value];if(k)W.includes(M)||W.push(M);else{const I=W.indexOf(M);I>-1&&W.splice(I,1)}h.value=W,r("update:ocrSelectedFields",W)},d=(M,k,W)=>{r("fieldChange",{rowIndex:M,prop:k,value:W})},m=()=>{r("update:ocrPreviewData",o.value),r("confirm",o.value),r("update:visible",!1)},b=()=>{r("update:visible",!1)},u=M=>typeof M!="number"?"-":`${(M*100).toFixed(1)}%`,C=M=>typeof M!="number"?"#606266":M>=.9?"#67c23a":M>=.7?"#e6a23c":"#f56c6c";return(M,k)=>{const W=e.resolveComponent("el-alert"),I=e.resolveComponent("el-table-column"),j=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),x=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Br.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:b,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Od,[e.createElementVNode("div",Ld,[e.createVNode(W,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Rd,[e.createVNode(E,{data:o.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(I,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",$d,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(j,{key:0,"model-value":h.value.includes(w.prop),onChange:g=>c(w.prop,g),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:g,$index:S})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:C(g[w.prop]),fontWeight:500})},e.toDisplayString(u(g[w.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:g[w.prop],"onUpdate:modelValue":$=>g[w.prop]=$,size:"small",placeholder:"请输入"+w.label,onChange:$=>d(S,w.prop,$)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Vd,[e.createVNode(x,{onClick:b,id:"themeBorderButton"},{default:e.withCtx(()=>k[1]||(k[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(x,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>k[2]||(k[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Fd=Xl._export_sfc(Pd,[["__scopeId","data-v-df66eb1f"]]),ni=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=ce.analyzeSplitToContent(l,","))==null?void 0:r.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),pn(o)));return n=n==null?void 0:n.join(","),n};function Zs(a){return Ua.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function jd(a){return Ua.axios.get(a,{responseType:"blob"})}let Kl="$R",Hd="http://222.92.178.198:55002/AIRobot",st=["Form","BarChart","FormText","FormBlock"];const Qs=a=>{var n,r;let l=(r=ce.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=ce.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(st!=null&&st.some(o=>l==null?void 0:l.includes(o)))},Ud=async(a,l,n,r)=>{var s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca;let o=a;if(Qs(o==null?void 0:o[0])){let ue=Xd(o),ta=(s=ue==null?void 0:ue.filter)==null?void 0:s.join(","),Se=[];(h=ue==null?void 0:ue.hideContents)==null||h.forEach(We=>{if(We){const sa=We;sa&&Se.push(`(HideGroup=Yes, prop=${sa})`)}});let te=(c=ue==null?void 0:ue.formContents)==null?void 0:c.filter(We=>{var sa;return(sa=We==null?void 0:We.filters)==null?void 0:sa.includes("@ShowHide=Hide")});(te==null?void 0:te.length)>0&&(te==null||te.forEach(We=>{if(We){const sa=We==null?void 0:We.prop;sa&&Se.push(`(Hide=Yes, prop=${sa})`)}}));let Ne=(r==null?void 0:r.menuFilter)??[];return Array.isArray(Ne)||(Ne=Ne?[Ne]:[]),Ne=[...Ne,...Se],{key:"Form",name:ue==null?void 0:ue.groupName,value:ue==null?void 0:ue.formContents,contents:Array.isArray((d=ue==null?void 0:ue.contents)==null?void 0:d[0])&&((b=(m=ue==null?void 0:ue.contents)==null?void 0:m[0])!=null&&b.every(We=>Array.isArray(We)))?[(C=(u=ue==null?void 0:ue.contents)==null?void 0:u[0])==null?void 0:C[n]]:[ue==null?void 0:ue.contents],filter:"("+ta+")",menuFilter:Ne,groupFilter:ue==null?void 0:ue.groupFilters}}else if(((M=o==null?void 0:o[0])==null?void 0:M[0])!=="&"){let ue=lc(o,r),ta="";(k=ue==null?void 0:ue.tableFilter)!=null&&k.includes(Kl)?ue.tableFilter=(W=ue==null?void 0:ue.tableFilter)==null?void 0:W.replace(Kl,""):ta=(L=(j=(I=ue==null?void 0:ue.tableFilter)==null?void 0:I.replace("(",Kl))==null?void 0:j.split(Kl))==null?void 0:L[0];let Se=[];ue!=null&&ue.tableFilter&&((E=ce.analyzeSplitToContent(ue==null?void 0:ue.tableFilter,","))==null||E.forEach(Ne=>{Ne!=null&&Ne.includes("@ShowHide=Hide")&&Se.push("HideGroup=Yes")}));let te=(r==null?void 0:r.menuFilter)??[];return Array.isArray(te)||(te=te?[te]:[]),te=[...te,...Se],{key:"Table",name:ue==null?void 0:ue.groupName,tableColumns:ue==null?void 0:ue.tableColumns,assistColumn:ue==null?void 0:ue.columns,tableContents:l===1?ue==null?void 0:ue.tableContents:(w=(x=ue==null?void 0:ue.tableContents)==null?void 0:x[n])!=null&&w.every(Ne=>Array.isArray(Ne))?(g=ue==null?void 0:ue.tableContents)==null?void 0:g[n]:[(S=ue==null?void 0:ue.tableContents)==null?void 0:S[n]],filter:ue==null?void 0:ue.tableFilter,menuFilter:te,quotePage:ta!==""?((ae=(V=($=ta==null?void 0:ta.replace("*",Kl))==null?void 0:$.split(Kl))==null?void 0:V[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:ta!==""?((se=(J=(ne=(F=(ze=(be=(Z=ta==null?void 0:ta.replace("*",Kl))==null?void 0:Z.split(Kl))==null?void 0:be[1])==null?void 0:ze.replace("{",Kl))==null?void 0:F.split(Kl))==null?void 0:ne[0])==null?void 0:J.split(":"))==null?void 0:se.filter(Ne=>Ne!==""))??[]:[],relatedQuotes:ue==null?void 0:ue.relatedQuotes,fatherSyncContents:ue==null?void 0:ue.fatherSyncContents,sonSyncContents:ue==null?void 0:ue.sonSyncContents}}else{let ue=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ta=o==null?void 0:o[0];ta=ta==null?void 0:ta.slice(1,ta==null?void 0:ta.length),ta=ce.analyzeSplitToContent(ta,":"),ta=ta==null?void 0:ta[(ta==null?void 0:ta.length)-1];let Se=[];Se.push("1");let te=ta==null?void 0:ta.replace("(",Kl);te=(Be=te==null?void 0:te.split(Kl))==null?void 0:Be[0],Se.push(te);let Ne=ta==null?void 0:ta.replace("(",Kl);if(Ne=($e=Ne==null?void 0:Ne.split(Kl))==null?void 0:$e[1],Ne=(N=(fe=Ne==null?void 0:Ne.replace(")",Kl))==null?void 0:fe.split(Kl))==null?void 0:N[0],(U=(oe=Ne==null?void 0:Ne.replace(",",Kl))==null?void 0:oe.split(Kl))==null||U.forEach(We=>{Se.push(We)}),Se.push(""),Se.push(""),(De=Se==null?void 0:Se[2])!=null&&De.includes(".xlsx")||(Ie=Se==null?void 0:Se[2])!=null&&Ie.includes(".xls"))try{let We=Hd+"/"+(Se==null?void 0:Se[2]),sa=await jd(We),Ya=`生成js函数名称为${Se==null?void 0:Se[1]}的函数,规则为:`+(Se==null?void 0:Se[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((sa==null?void 0:sa.status)===200){let R=sa==null?void 0:sa.data;const H=new FormData;H.append("file",R,Se==null?void 0:Se[2]),H.append("query",Ya);let X=await Zs(H);X=(Ta=(la=(je=X==null?void 0:X.data)==null?void 0:je.data)==null?void 0:la.response)==null?void 0:Ta.replace("generateResult",Se==null?void 0:Se[1]),Se[Se.length-2]=X,Se[Se.length-1]=[{name:(ca=(ee=Se==null?void 0:Se[2])==null?void 0:ee.split("."))==null?void 0:ca[0],url:We}]}}catch{}return Se=[Se],{key:"Method",name:[],tableContents:Se,tableColumns:ue}}},qd=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se;let n=(o=(r=ce.analyzeSplitToContent(a,"="))==null?void 0:r.filter(te=>te!=="="))==null?void 0:o.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));if(Qs(n==null?void 0:n[1])){let te=Jd(n),Ne=(c=(h=(s=te==null?void 0:te.filter)==null?void 0:s.replace("@",Kl))==null?void 0:h.split(Kl))==null?void 0:c[0],We=(b=(m=(d=te==null?void 0:te.filter)==null?void 0:d.replace("(",Kl))==null?void 0:m.split(Kl))==null?void 0:b[1],sa=(M=(C=(u=te==null?void 0:te.filter)==null?void 0:u.replace("(",Kl))==null?void 0:C.split(Kl))==null?void 0:M[0];sa="@"+((k=sa==null?void 0:sa.split("@"))==null?void 0:k[1]),We=We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1),We=(I=(W=ce.analyzeSplitToContent(We,","))==null?void 0:W.map(R=>(R=sa+R,R)))==null?void 0:I.join("");let Ya=Ne+"("+We+")";return{key:"Form",name:te==null?void 0:te.group,filter:Ya,formPage:((E=(L=(j=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:j.split(Kl))==null?void 0:L[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((ae=(V=($=(S=(g=(w=(x=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:x.split(Kl))==null?void 0:w[1])==null?void 0:g.replace("{",Kl))==null?void 0:S.split(Kl))==null?void 0:$[0])==null?void 0:V.split(":"))==null?void 0:ae.filter(R=>R!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let te=lc(n,l,n==null?void 0:n[1]),Ne="";(Z=te==null?void 0:te.tableFilter)!=null&&Z.includes(Kl)?te.tableFilter=(be=te==null?void 0:te.tableFilter)==null?void 0:be.replace(Kl,""):Ne=(ne=(F=(ze=te==null?void 0:te.tableFilter)==null?void 0:ze.replace("(",Kl))==null?void 0:F.split(Kl))==null?void 0:ne[0];let We=(Be=(se=(J=te==null?void 0:te.tableFilter)==null?void 0:J.replace("(",Kl))==null?void 0:se.split(Kl))==null?void 0:Be[0];We=[{menus:(fe=($e=We==null?void 0:We.split("*"))==null?void 0:$e[0])==null?void 0:fe.replaceAll(":","/"),groups:((oe=(N=We==null?void 0:We.split("*"))==null?void 0:N[1])==null?void 0:oe.split(":"))??[]}];let sa=(Ie=(De=(U=te==null?void 0:te.tableFilter)==null?void 0:U.replace("(",Kl))==null?void 0:De.split(Kl))==null?void 0:Ie[1];(sa==null?void 0:sa[(sa==null?void 0:sa.length)-1])===")"&&(sa=sa==null?void 0:sa.slice(0,(sa==null?void 0:sa.length)-1));let Ya=[];te!=null&&te.tableFilter&&((je=ce.analyzeSplitToContent(te==null?void 0:te.tableFilter,","))==null||je.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ya.push("HideGroup=Yes")}));let R=(l==null?void 0:l.menuFilter)??[];return Array.isArray(R)||(R=R?[R]:[]),R=[...R,...Ya],{key:"Table",name:te==null?void 0:te.groupName,filter:te==null?void 0:te.tableFilter,tableColumns:te==null?void 0:te.tableColumns,quotePage:Ne!==""?((ee=(Ta=(la=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:la.split(Kl))==null?void 0:Ta[0])==null?void 0:ee.replaceAll(":","/"))??"":void 0,quoteGroup:Ne!==""?((Se=(ta=(ue=(ca=Ne==null?void 0:Ne.replace("*",Kl))==null?void 0:ca.split(Kl))==null?void 0:ue[1])==null?void 0:ta.split(":"))==null?void 0:Se.filter(H=>H!==""))??[]:[],menuFilter:R,relatedQuotes:We,fatherSyncContents:(te==null?void 0:te.fatherSyncContents)??[],sonSyncContents:(te==null?void 0:te.sonSyncContents)??[]}}},Wd=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(o,s)=>{let h=[];o=o==null?void 0:o.map(async c=>{var d,m;if(h.push(c),((d=ce.analyzeSplitToContent(a,"="))==null?void 0:d.length)<=2){if(((m=ce.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const b=await Ud(ce.analyzeSplitToContent(a,"="),r,s,c);h.push(b)}}else h.push(qd(a,c))}),await Promise.all(o),n.push(h)}),await Promise.all(l),n};let Fi="/",Kd="$",kn="$R";const ec=a=>{var n,r,o;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((h,c)=>c!==0);s=s==null?void 0:s.join(""),s=ce.analyzerSplitToWord(s,")"),(s==null?void 0:s.length)!==1?(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"?s=s==null?void 0:s.join(""):s=(n=s==null?void 0:s.filter((h,c)=>c!==(s==null?void 0:s.length)-1))==null?void 0:n.join(""):s=s==null?void 0:s[0],l="("+s,((o=a==null?void 0:a[0])==null?void 0:o[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},ac=(a,l=[])=>{let n=(a==null?void 0:a.map(s=>{var h,c;return(c=s==null?void 0:s.key)==null?void 0:c.slice(1,(h=s==null?void 0:s.key)==null?void 0:h.length)}))??[],r=[];n==null||n.forEach(s=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Kd)){let ze="",F=!0,ne=ce.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(ze="("+((h=ce.analyzerSplitToWord(ne==null?void 0:ne[1],")"))==null?void 0:h[0]),((d=ne==null?void 0:ne[0])==null?void 0:d[((c=ne==null?void 0:ne[0])==null?void 0:c.length)-2])==="@"&&(ze="@"+ze));let J=s;J=J==null?void 0:J.replace(ze,""),ze=pn(ze),ze=(m=ce.analyzeSplitToContent(ze,","))==null?void 0:m.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe)),ze!=null&&ze.includes("@ShowHide=Hide")&&(F=!1);let se=(b=J==null?void 0:J.replace("$",kn))==null?void 0:b.split(kn),Be=se==null?void 0:se[1],$e=se==null?void 0:se[0];$e!=null&&$e.includes("[")&&($e=(C=(u=$e==null?void 0:$e.replace("[",kn))==null?void 0:u.split(kn))==null?void 0:C[0],Be=Be+":["+((W=(k=(M=se==null?void 0:se[0])==null?void 0:M.replace("[",kn))==null?void 0:k.split(kn))==null?void 0:W[1])),$e=(j=(I=$e==null?void 0:$e.replaceAll(":","/"))==null?void 0:I.replaceAll("{",""))==null?void 0:j.replaceAll("}",""),($e==null?void 0:$e[($e==null?void 0:$e.length)-1])!=="/"&&($e=$e+"/"),Be=((L=$e==null?void 0:$e.split("/"))==null?void 0:L[0])+":"+Be;let N="";if(!(Be!=null&&Be.includes("[")))N=Be==null?void 0:Be.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:ze,fatherPath:$e});else{let oe=(x=(E=Be==null?void 0:Be.replace("[",kn))==null?void 0:E.split(kn))==null?void 0:x[1];oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1),oe=(w=ce.analyzeSplitToContent(oe,","))==null?void 0:w.map(U=>((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)),U)),oe==null||oe.forEach(U=>{var De,Ie;N=((Ie=(De=Be==null?void 0:Be.replace("[",kn))==null?void 0:De.split(kn))==null?void 0:Ie[0])+U,N=N==null?void 0:N.replaceAll(":","/"),r==null||r.push({path:N,isShow:F,filter:ze,fatherPath:$e})})}}else{let ze="",F=!0,ne=ce.analyzerSplitToWord(s,"(");(ne==null?void 0:ne.length)>1&&(ze=(g=ec(ne))==null?void 0:g.filter);let J=s;if(J=J==null?void 0:J.replace(ze,""),(ze==null?void 0:ze[0])==="("){ze=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1);let Be=[];(S=ce.analyzeSplitToContent(ze,","))==null||S.forEach($e=>{($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==null?void 0:$e[0])==="("&&($e=$e==null?void 0:$e.slice(1,($e==null?void 0:$e.length)-1)),($e==null?void 0:$e[0])!=="@"&&($e="@"+$e),Be.push(pn($e))}),ze=Be==null?void 0:Be.join(",")}else ze=pn(ze);ze=($=ce.analyzeSplitToContent(ze,","))==null?void 0:$.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)),ze!=null&&ze.includes("@ShowHide=Hide")&&(F=!1),(J==null?void 0:J[(J==null?void 0:J.length)-1])==="}"&&(J=J+":"),J=(V=J==null?void 0:J.replaceAll("{",""))==null?void 0:V.replaceAll("}","");let se="";if(J!=null&&J.includes("[")){let Be=(ae=J==null?void 0:J.replace("[",kn))==null?void 0:ae.split(kn),$e=Be==null?void 0:Be[1];$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),(be=(Z=ce.analyzeSplitToContent($e,","))==null?void 0:Z.map(fe=>((fe==null?void 0:fe[(fe==null?void 0:fe.length)-1])===","&&(fe=fe==null?void 0:fe.slice(0,(fe==null?void 0:fe.length)-1)),fe)))==null||be.forEach(fe=>{se=(Be==null?void 0:Be[0])+fe,se=se==null?void 0:se.replaceAll(":","/"),r==null||r.push({path:se,isShow:F,filter:ze})})}else se=J==null?void 0:J.replaceAll(":","/"),r==null||r.push({path:se,isShow:F,filter:ze})}});let o=A.cloneDeep(r);return(l==null?void 0:l.length)>0&&(o=l),o=o==null?void 0:o.filter(s=>{var h,c,d,m;return!(s!=null&&s.fatherPath)&&((c=(h=s==null?void 0:s.path)==null?void 0:h.split(Fi))==null?void 0:c.length)>1&&((m=(d=s==null?void 0:s.path)==null?void 0:d.split(Fi))==null?void 0:m[1])===""}),o=o==null?void 0:o.map(s=>{var h;return s.path=(h=s.path)==null?void 0:h.replace(Fi,""),s.path}),(o==null?void 0:o.length)>0&&(r=r==null?void 0:r.map(s=>{var c,d,m,b,u,C,M;let h=o==null?void 0:o.find(k=>{var W;return(W=s==null?void 0:s.path)==null?void 0:W.includes(k)});return!(s!=null&&s.fatherPath)&&h&&!((c=s==null?void 0:s.path)!=null&&c.includes(Fi))&&!(o!=null&&o.find(k=>(s==null?void 0:s.path)===k))&&(s.path=h+Fi+((M=(m=(d=s==null?void 0:s.path)==null?void 0:d.split(h))==null?void 0:m[1])==null?void 0:M.slice(1,(C=(u=(b=s==null?void 0:s.path)==null?void 0:b.split(h))==null?void 0:u[1])==null?void 0:C.length))),s})),r},Gd=(a,l)=>ac([{key:a}],l),Yd=async(a,l)=>{const n=[],r=Gd(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(s=>{n.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await Wd(a==null?void 0:a.value,n)};let gl="$R",Hi="[Any]";const Jd=a=>{var h,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let o=a==null?void 0:a[1],s;return o!=null&&o.includes("{")?s=(c=(h=o==null?void 0:o.replaceAll("{",""))==null?void 0:h.replaceAll("}",""))==null?void 0:c.replaceAll(Hi,""):s=o==null?void 0:o.replaceAll(Hi,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},Xd=a=>{var C,M,k,W,I,j;let l=[],n=[],r=[],o=[],s=[],h=[],c="",d=a==null?void 0:a[0];(d==null?void 0:d[0])==="*"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length));let m=ce.analyzeSplitToContent(d,":");(C=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||C.forEach(L=>{var x,w,g;(L==null?void 0:L[(L==null?void 0:L.length)-1])===":"&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1));let E=ce.analyzerSplitToWord(L,"(");if((E==null?void 0:E.length)>1){c=(x=ec(E))==null?void 0:x.filter;let S=L==null?void 0:L.replace(c,"");if(r.push(S),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let $=[];(w=ce.analyzeSplitToContent(c,","))==null||w.forEach(V=>{(V==null?void 0:V[(V==null?void 0:V.length)-1])===","&&(V=V==null?void 0:V.slice(0,(V==null?void 0:V.length)-1)),(V==null?void 0:V[0])==="("&&(V=V==null?void 0:V.slice(1,(V==null?void 0:V.length)-1)),(V==null?void 0:V[0])!=="@"&&(V="@"+V),$.push(pn(V))}),c=$==null?void 0:$.join(",")}else c=pn(c);c=(g=ce.analyzeSplitToContent(c,","))==null?void 0:g.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$)),c!=null&&c.includes("@ShowHide=Hide")&&h.push(S),o=[...o,...c]}else r.push(E==null?void 0:E[0])});let b=(M=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:M[0],u=(k=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:k[0];return l=Di(u??""),l!=null&&l.every(L=>Array.isArray(L))&&(l=[l]),(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)),s=(W=ce.analyzeSplitToContent(b,"@"))==null?void 0:W[1],s="@"+s,b=b==null?void 0:b.replace(s,""),s=pn(s),s=(I=ce.analyzeSplitToContent(s,","))==null?void 0:I.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),(b==null?void 0:b[0])==="{"&&(b=b==null?void 0:b.slice(1,(b==null?void 0:b.length)-1)),b=(j=ce.analyzeSplitToContent(b,","))==null?void 0:j.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),b==null||b.forEach((L,E)=>{var se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa;let x=[],w=[],g=[],S="",$="",V=!1,ae,Z=[],be=[],ze=[],F="Input",ne=[],J=[];if(L!=null&&L.includes("==")){ae=(se=L==null?void 0:L.split("=="))==null?void 0:se[0];let Ca=(Be=L==null?void 0:L.split("=="))==null?void 0:Be[1],Ae="";(($e=ce.analyzeSplitToContent(Ca,"$"))==null?void 0:$e.length)>1&&((fe=ce.analyzeSplitToContent(Ca,"$"))==null?void 0:fe[0])!=="$"?(Ae=(N=ce.analyzeSplitToContent(Ca,"$"))==null?void 0:N[0],Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1)):((oe=ce.analyzeSplitToContent(Ca,"}"))==null?void 0:oe.length)>1&&(Ae=(U=ce.analyzeSplitToContent(Ca,"}"))==null?void 0:U[1]);let he=Ca==null?void 0:Ca.replace(Ae,"");if((Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),(De=ce.analyzeSplitToContent(Ae,","))==null||De.forEach(Y=>{var me;(Y==null?void 0:Y[0])!=="@"&&(Y="@"+Y),(Y==null?void 0:Y[(Y==null?void 0:Y.length)-1])===","&&(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1));let xe=pn(Y);(me=ce.analyzeSplitToContent(xe,","))==null||me.forEach(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)),x.push(qe)})}),(he==null?void 0:he[0])==="$"&&(he=he==null?void 0:he.slice(1,he==null?void 0:he.length)),he!=null&&he.includes("&")){let Y=he;if((he==null?void 0:he[0])==="("){let me=(Ie=ce.analyzeSplitToContent(he,"&"))==null?void 0:Ie.map(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));Y=me==null?void 0:me[1],me=me==null?void 0:me[0],(me==null?void 0:me[0])!=="@"&&(me="@"+me),S=pn(me)}(Y==null?void 0:Y[0])==="&"&&(Y=Y==null?void 0:Y.slice(1,Y==null?void 0:Y.length)),$=(la=(je=Y==null?void 0:Y.replace("(",gl))==null?void 0:je.split(gl))==null?void 0:la[0],g=(ee=(Ta=Y==null?void 0:Y.replace("(",gl))==null?void 0:Ta.split(gl))==null?void 0:ee[1],g=[g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)],F="Input"}else{let Y=(ca=he==null?void 0:he.replace("*",gl))==null?void 0:ca.split(gl);Z=(ue=Y==null?void 0:Y[0])==null?void 0:ue.split(":"),be=(Se=(ta=ce.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:ta.filter((xe,me)=>{var qe,da;return me!==((da=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:da.length)-1}))==null?void 0:Se.map(xe=>((xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===":"&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe)),ze=(Ne=(te=ce.analyzeSplitToContent(Y==null?void 0:Y[1],":"))==null?void 0:te.filter((xe,me)=>{var qe,da;return me===((da=(qe=Y==null?void 0:Y[1])==null?void 0:qe.split(":"))==null?void 0:da.length)-1}))==null?void 0:Ne[0],ze=(sa=(We=ze==null?void 0:ze.replaceAll("{",""))==null?void 0:We.replaceAll("}",""))==null?void 0:sa.split(":"),F="Select"}}else if(((Ya=ce.analyzeSplitToContent(L,"="))==null?void 0:Ya.length)>1)if(F="Select",ae=(H=(R=L==null?void 0:L.replace("=",gl))==null?void 0:R.split(gl))==null?void 0:H[0],!(L!=null&&L.includes("If")))ne=(ve=(X=L==null?void 0:L.replace("=",gl))==null?void 0:X.split(gl))==null?void 0:ve[1],ne=ne==null?void 0:ne.split("||");else{let Ca=(va=(de=L==null?void 0:L.replace("=",gl))==null?void 0:de.split(gl))==null?void 0:va[1];J=(na=ce.analyzeSplitToContent(Ca,")"))==null?void 0:na.filter(Ae=>!(Ae!=null&&Ae.includes("If"))),J=J==null?void 0:J.map(Ae=>((Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),Ae=Ae==null?void 0:Ae.split("||"),Ae)),w=(Pe=ce.analyzeSplitToContent(Ca,")"))==null?void 0:Pe.filter(Ae=>Ae==null?void 0:Ae.includes("If")),w=w==null?void 0:w.map(Ae=>((Ae==null?void 0:Ae[0])==="|"&&(Ae=Ae==null?void 0:Ae.slice(2,Ae==null?void 0:Ae.length)),(Ae==null?void 0:Ae[0])==="("&&(Ae=Ae==null?void 0:Ae.slice(1,(Ae==null?void 0:Ae.length)-1)),(Ae==null?void 0:Ae[0])!=="@"&&(Ae="@"+Ae),Ae))}else if(((wa=ce.analyzeSplitToContent(L,"@"))==null?void 0:wa.length)>1){ae=(Me=ce.analyzeSplitToContent(L,"@"))==null?void 0:Me[0],(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));let Ca="@"+((ma=ce.analyzeSplitToContent(L,"@"))==null?void 0:ma[1]);Ca=pn(Ca),x=(Oa=ce.analyzeSplitToContent(Ca,","))==null?void 0:Oa.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)),x!=null&&x.find(Ae=>Ae==null?void 0:Ae.includes("@Type"))&&(F=(pa=(za=x==null?void 0:x.find(Ae=>Ae==null?void 0:Ae.includes("@Type")))==null?void 0:za.split("="))==null?void 0:pa[1])}else ae=L;x!=null&&x.includes("@ShowHide=Hide")&&(V=!0),n.push({prop:ae,label:ae,value:"",menuPath:Z,groups:be,columns:ze,type:F,options:ne,allContents:J,filters:x,width:b==null?void 0:b.length,isFormColHidden:V,filterContents:w,functionName:$,functionRelatedWords:g,calculatorFilter:S})}),{groupName:r,groupFilters:o,formContents:n,contents:l,filter:s,hideContents:h}},Di=a=>{var r,o;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=ce.analyzeSplitToContent(n,","))==null||r.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),l.push(s??"")});else{let s=[];(o=ce.analyzeSplitToContent(n,","))==null||o.forEach(h=>{(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)),s.push(Di(h))}),l=s}return l},ht=(a,l)=>{var j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da;let n,r=[],o=[],s=[],h=[],c=[],d=[],m=[],b="Input",u,C="",M="",k="",W=[],I="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],u=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],b="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(x=(E=a==null?void 0:a.replace("=",gl))==null?void 0:E.split(gl))==null?void 0:x[1])!=null&&w.includes("If")))if(n=ce.analyzeSplitToContent(a,"@"),n=n==null?void 0:n[0],(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=(S=(g=n==null?void 0:n.replace("=",gl))==null?void 0:g.split(gl))==null?void 0:S[0],n!=null&&n.includes("&")&&(n=(V=($=n==null?void 0:n.replace("&",gl))==null?void 0:$.split(gl))==null?void 0:V[0]),u=n,((ae=ce.analyzeSplitToContent(a,"@"))==null?void 0:ae.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Ke=(Z=ce.analyzeSplitToContent(a,"@"))==null?void 0:Z[1];if((Ke==null?void 0:Ke[0])!=="@"&&(Ke="@"+Ke),Ke=pn(Ke),M=Ke,M!=null&&M.includes("@Type")){let aa=ce.analyzeSplitToContent(M,",");aa=aa==null?void 0:aa.map(Ve=>((Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),Ve)),aa=(be=aa==null?void 0:aa.filter(Ve=>Ve==null?void 0:Ve.includes("@Type")))==null?void 0:be[0],b=(ze=aa==null?void 0:aa.split("="))==null?void 0:ze[1]}else b="Input"}}else if(a!=null&&a.includes("||")){let Ke=[];r=(J=(ne=(F=ce.analyzeSplitToContent(a,"="))==null?void 0:F[1])==null?void 0:ne.split("||"))==null?void 0:J.map(Ve=>{var pe,Sa,ya,vl;let ye=Ve;if(ye!=null&&ye.includes("@")){let Nl="@"+((Sa=(pe=ye==null?void 0:ye.replace("@",gl))==null?void 0:pe.split(gl))==null?void 0:Sa[1]);ye=(vl=(ya=ye==null?void 0:ye.replace("@",gl))==null?void 0:ya.split(gl))==null?void 0:vl[0],Nl=ni(Nl),Ke.push(Nl)}return{label:ye==null?void 0:ye.replaceAll("'",""),value:ye==null?void 0:ye.replaceAll("'","")}}),(Ke==null?void 0:Ke.length)>0&&(M="("+(Ke==null?void 0:Ke.join("||"))+")");let aa=(se=ce.analyzeSplitToContent(a,"="))==null?void 0:se[0];if(aa!=null&&aa.includes("@")){(aa==null?void 0:aa[(aa==null?void 0:aa.length)-1])==="="&&(aa=aa==null?void 0:aa.slice(0,(aa==null?void 0:aa.length)-1));let Ve=(Be=ce.analyzeSplitToContent(aa,"@"))==null?void 0:Be[1];Ve="@"+Ve,Ve=ni(Ve),M=M===""?Ve:Ve+","+M}}else b="Input",C=(N=(fe=($e=a==null?void 0:a.replace("=",gl))==null?void 0:$e.split(gl))==null?void 0:fe[1])==null?void 0:N.replaceAll("'","");else if((U=(oe=ce.analyzeSplitToContent(a,"="))==null?void 0:oe[1])!=null&&U.includes("||")){let Ke=(De=ce.analyzeSplitToContent(a,"="))==null?void 0:De[0];if((Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])==="="&&(Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1)),Ke!=null&&Ke.includes("@")){let pe=(Ie=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:Ie[1];pe="@"+pe,M=ni(pe),n=(ee=(je=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:je[0])==null?void 0:ee.slice(0,((Ta=(la=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:la[0])==null?void 0:Ta.length)-1),u=(Se=(ca=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:ca[0])==null?void 0:Se.slice(0,((ta=(ue=ce.analyzeSplitToContent(Ke,"@"))==null?void 0:ue[0])==null?void 0:ta.length)-1)}else n=Ke,u=Ke;let aa=(te=ce.analyzeSplitToContent(a,"="))==null?void 0:te[1];aa=ce.analyzeSplitToContent(aa,")");let Ve=aa==null?void 0:aa.filter(pe=>!(pe!=null&&pe.includes("If")));Ve==null||Ve.forEach(pe=>{(pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),o==null||o.push(pe==null?void 0:pe.split("||"))});let ye=aa==null?void 0:aa.filter(pe=>pe==null?void 0:pe.includes("If"));ye=ye==null?void 0:ye.map(pe=>((pe==null?void 0:pe[0])==="|"&&(pe==null?void 0:pe[1])==="|"&&(pe=pe==null?void 0:pe.slice(2,pe==null?void 0:pe.length)),(pe==null?void 0:pe[0])==="("&&(pe=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1)),(pe==null?void 0:pe[0])!=="@"&&(pe="@"+pe),pe)),s=ye}else{let Ke=a==null?void 0:a.split("=="),aa=(Ne=Ke==null?void 0:Ke.filter(Ve=>(Ve==null?void 0:Ve.includes("$"))&&(Ve==null?void 0:Ve[0])!=="{"))==null?void 0:Ne[0];if(aa&&!(aa!=null&&aa.includes("&"))){let Ve=(We=aa==null?void 0:aa.replace("*",gl))==null?void 0:We.split(gl),ye=(Ve==null?void 0:Ve[0])===""?l==null?void 0:l.value:Ve==null?void 0:Ve[0];(ye==null?void 0:ye[0])==="("&&(ye=(sa=ce.analyzeSplitToContent(ye,")"))==null?void 0:sa[1]),ye=(R=(Ya=ye==null?void 0:ye.replaceAll("{",""))==null?void 0:Ya.replaceAll("}",""))==null?void 0:R.replaceAll(Hi,""),(ye==null?void 0:ye[0])==="$"&&(ye=(H=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length))==null?void 0:H.replaceAll(":","/")),h=ye==null?void 0:ye.split("/");let pe=(ve=(X=Ve==null?void 0:Ve[1])==null?void 0:X.replace("{",gl))==null?void 0:ve.split(gl),Sa=pe==null?void 0:pe[0];(Sa==null?void 0:Sa[(Sa==null?void 0:Sa.length)-1])===":"&&(Sa=Sa==null?void 0:Sa.slice(0,(Sa==null?void 0:Sa.length)-1)),c=Sa==null?void 0:Sa.split(":"),d=(Pe=(na=(va=(de=pe==null?void 0:pe[1])==null?void 0:de.replace("}",gl))==null?void 0:va.split(gl))==null?void 0:na[0])==null?void 0:Pe.split(":");let ya="";((wa=ce.analyzeSplitToContent(aa,")"))==null?void 0:wa.length)>1&&(ya=(Me=ce.analyzeSplitToContent(aa,")"))==null?void 0:Me[0]),ya&&ya!==""&&((ya==null?void 0:ya[0])!=="@"&&(ya="@"+ya),M=ni(ya))}if(Ke!=null&&Ke.some(Ve=>(Ve==null?void 0:Ve[0])==="&")){let Ve=(ma=Ke==null?void 0:Ke.filter(Sa=>(Sa==null?void 0:Sa[0])==="&"))==null?void 0:ma[0];(Ve==null?void 0:Ve[0])==="&"&&(Ve=Ve==null?void 0:Ve.slice(1,Ve==null?void 0:Ve.length)),k=(za=(Oa=Ve==null?void 0:Ve.replace("(",gl))==null?void 0:Oa.split(gl))==null?void 0:za[0];let ye=(pa=ce.analyzeSplitToContent(Ve,")"))==null?void 0:pa[0];ye=(Ae=(Ca=ye==null?void 0:ye.replace("(",gl))==null?void 0:Ca.split(gl))==null?void 0:Ae[1],ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1),(ye==null?void 0:ye[0])==="{"&&(ye=ye==null?void 0:ye.slice(1,ye==null?void 0:ye.length)),(ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])==="}"&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),W=ye==null?void 0:ye.split(",");let pe=(he=ce.analyzeSplitToContent(Ve,")"))==null?void 0:he[1];pe&&pe!==""&&(I=ni(pe))}else if(!aa&&((Y=Ke==null?void 0:Ke.filter(Ve=>(Ve==null?void 0:Ve[0])==="{"))==null?void 0:Y.length)>0){let Ve=Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1];Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=ce.analyzeSplitToContent(Ve,","),Ve=Ve==null?void 0:Ve.map(ye=>((ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])===","&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),ye)),Ve=Ve==null?void 0:Ve.map(ye=>{var pe,Sa,ya,vl;if(ye=ye==null?void 0:ye.replaceAll("$",""),ye!=null&&ye.includes("{")){let Nl="";ye=ye==null?void 0:ye.replaceAll("{","");let pl=ye==null?void 0:ye.split("}");Nl=((Sa=(pe=pl==null?void 0:pl[0])==null?void 0:pe.split(":"))==null?void 0:Sa[0])+":"+(pl==null?void 0:pl[1]),ye=Nl,ye=ye+":"}if(ye!=null&&ye.includes(Hi)){let Nl="",pl=ye==null?void 0:ye.split(Hi);Nl=((vl=(ya=pl==null?void 0:pl[0])==null?void 0:ya.split(":"))==null?void 0:vl[0])+":"+(pl==null?void 0:pl[1]),ye=Nl,ye=ye+":"}return ye=ye==null?void 0:ye.replaceAll(":","/"),ye}),m=Ve}else!((xe=Ke==null?void 0:Ke[1])!=null&&xe.includes("$"))&&((me=Ke==null?void 0:Ke[1])==null?void 0:me[0])!=="("&&d.push(Ke==null?void 0:Ke[1])}else n=(qe=a==null?void 0:a.split("&"))==null?void 0:qe[0],u=(da=a==null?void 0:a.split("&"))==null?void 0:da[0];return{label:n,prop:u,options:r,allContents:o,filterContents:s,menus:h,groups:c,words:d,align:"center",formType:b,filter:M,functionName:k,functionRelatedWords:W,calculatorFilter:I,relatedPages:m,value:C}},Co=(a,l)=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((h=(s=(o=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",gl))==null?void 0:o.split(gl))==null?void 0:s[0])!=null&&h.includes(","))){let se=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),Be=(c=se==null?void 0:se.replace(":",gl))==null?void 0:c.split(gl);if(((d=ce.analyzeSplitToContent(Be==null?void 0:Be[1],"="))==null?void 0:d.length)===1){let $e=Be==null?void 0:Be[0],fe=[];(u=ce.analyzeSplitToContent((b=Be==null?void 0:Be[1])==null?void 0:b.slice(1,((m=Be==null?void 0:Be[1])==null?void 0:m.length)-1),","))==null||u.forEach(N=>{var oe,U;((oe=ce.analyzeSplitToContent(N,"="))==null?void 0:oe.length)>1?((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)),fe=[...fe,...Co(N,l)]):((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)),fe.push((U=Co(N,l))==null?void 0:U[0]))}),n==null||n.push({label:$e,prop:$e,children:fe,align:"center"})}else{let $e=[];if(((C=ce.analyzeSplitToContent(se,"="))==null?void 0:C.length)>=2){let N=(M=ce.analyzeSplitToContent(se,"="))==null?void 0:M[1],oe=(k=ce.analyzeSplitToContent(N,"/"))==null?void 0:k.map(U=>((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)),U));$e=oe==null?void 0:oe.map(U=>(U=Di(U),U))}let fe=(x=(E=(L=(j=(I=(W=se==null?void 0:se.replace("{",gl))==null?void 0:W.split(gl))==null?void 0:I[1])==null?void 0:j.replace("}",gl))==null?void 0:L.split(gl))==null?void 0:E[0])==null?void 0:x.split(",");fe==null||fe.forEach((N,oe)=>{($e==null?void 0:$e.length)>0&&oe===0?n==null||n.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:$e==null?void 0:$e.map(U=>{let De={};return fe==null||fe.forEach((Ie,je)=>{De[Ie]=U==null?void 0:U[je]}),De}),options:$e==null?void 0:$e.map(U=>({label:U==null?void 0:U[0],value:U==null?void 0:U[0]})),mainKey:!0}):n==null||n.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=ce.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((S=(g=ce.analyzeSplitToContent(a,"="))==null?void 0:g[1])==null?void 0:S[0])==="["){let se=[];if((($=ce.analyzeSplitToContent(a,"="))==null?void 0:$.length)>=2){let $e=(V=ce.analyzeSplitToContent(a,"="))==null?void 0:V[1],fe=(Z=(ae=ce.analyzeSplitToContent($e,"|"))==null?void 0:ae.filter(N=>N!=="|"))==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));se=fe==null?void 0:fe.map(N=>(N=Di(N),N))}let Be=(ze=(be=a==null?void 0:a.replace("}",gl))==null?void 0:be.split(gl))==null?void 0:ze[0];Be=(F=Be==null?void 0:Be.slice(1,Be==null?void 0:Be.length))==null?void 0:F.split(","),Be==null||Be.forEach(($e,fe)=>{(se==null?void 0:se.length)>0&&fe===0?n==null||n.push({label:$e,prop:$e,align:"center",formType:"Select",relatedContents:se==null?void 0:se.map(N=>{let oe={};return Be==null||Be.forEach((U,De)=>{oe[U]=N==null?void 0:N[De]}),oe}),options:se==null?void 0:se.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):n==null||n.push({label:$e,prop:$e,align:"center"})})}else(ne=ce.analyzeSplitToContent(a,","))==null||ne.forEach(se=>{var Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae;if((se==null?void 0:se[(se==null?void 0:se.length)-1])===","&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),(se==null?void 0:se[0])==="{"){let he=ce.analyzeSplitToContent(se,"="),Y=he==null?void 0:he[(he==null?void 0:he.length)-1],xe=[],me=[],qe=[],da="",Ke="",aa=[],Ve=[],ye=(Be=Y==null?void 0:Y.replace("*",gl))==null?void 0:Be.split(gl),pe=(ye==null?void 0:ye[0])===""?l==null?void 0:l.value:ye==null?void 0:ye[0];pe=ce.analyzeSplitToContent(pe,")");let Sa="";if((pe==null?void 0:pe.length)>1&&(($e=pe==null?void 0:pe[0])==null?void 0:$e[0])!=="&"&&(Sa=pe==null?void 0:pe[0],(Sa==null?void 0:Sa[0])!=="@"&&(Sa="@"+Sa),Ke=Sa??""),pe=(fe=pe==null?void 0:pe.filter(pl=>(pl==null?void 0:pl[0])==="$"))==null?void 0:fe[0],((N=ce.analyzeSplitToContent(pe,"}"))==null?void 0:N.length)>1&&((U=(oe=ce.analyzeSplitToContent(pe,"}"))==null?void 0:oe[1])==null?void 0:U[0])==="("&&(Sa=(De=ce.analyzeSplitToContent(pe,"}"))==null?void 0:De[1],(Sa==null?void 0:Sa[0])!=="@"&&(Sa="@"+Sa),Ke!==""&&(Ke=Ke+","),Ke=Ke+Sa),(Ie=pe==null?void 0:pe.slice(1,(pe==null?void 0:pe.length)-1))!=null&&Ie.includes("$")||(pe=(je=ce.analyzeSplitToContent(pe,"}"))==null?void 0:je[0]),(pe==null?void 0:pe[0])==="$"&&(pe=(la=pe==null?void 0:pe.replace("{",""))==null?void 0:la.replace("}",":"),pe=(Ta=pe==null?void 0:pe.slice(1,pe==null?void 0:pe.length))==null?void 0:Ta.replaceAll(":","/")),pe!=null&&pe.includes("$")){let pl=(ee=pe==null?void 0:pe.split("$"))==null?void 0:ee[0];pl=(ca=pl==null?void 0:pl.split("/"))==null?void 0:ca[0],pe=pl+"/"+((ue=pe==null?void 0:pe.split("$"))==null?void 0:ue[1])+"/"}xe=(pe==null?void 0:pe.split("/"))??[];let ya=(Se=(ta=ye==null?void 0:ye[1])==null?void 0:ta.replace("{",gl))==null?void 0:Se.split(gl);if((We=(Ne=(te=ye==null?void 0:ye[1])==null?void 0:te.split("(@"))==null?void 0:Ne[0])!=null&&We.includes("&&")||(R=(Ya=(sa=ye==null?void 0:ye[1])==null?void 0:sa.split("@"))==null?void 0:Ya[0])!=null&&R.includes("&&")){let pl=(H=ye==null?void 0:ye[1])!=null&&H.includes("(@")?(de=(ve=(X=ye==null?void 0:ye[1])==null?void 0:X.split("(@"))==null?void 0:ve[0])==null?void 0:de.split("&&"):(Pe=(na=(va=ye==null?void 0:ye[1])==null?void 0:va.split("@"))==null?void 0:na[0])==null?void 0:Pe.split("&&");aa=pl==null?void 0:pl.map(ja=>{var jl,Rl;return(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=(Rl=(jl=ja==null?void 0:ja.replace("{",gl))==null?void 0:jl.split(gl))==null?void 0:Rl[0],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])===":"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(":"),ja});let Fl=[];pl==null||pl.forEach((ja,jl)=>{var Rl,Da;(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=(Da=(Rl=ja==null?void 0:ja.replace("{",gl))==null?void 0:Rl.split(gl))==null?void 0:Da[1],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])==="}"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(","),Fl.push(jl===0?(ja==null?void 0:ja.length)-1:ja==null?void 0:ja.length),Ve=[...Ve,...ja]}),Fl=(wa=ce.prefixSum(Fl))==null?void 0:wa.map(ja=>ja==null?void 0:ja.total),aa=aa==null?void 0:aa.map((ja,jl)=>({number:Fl==null?void 0:Fl[jl],contents:ja}))}let vl=ya==null?void 0:ya[0];(vl==null?void 0:vl[(vl==null?void 0:vl.length)-1])===":"&&(vl=vl==null?void 0:vl.slice(0,(vl==null?void 0:vl.length)-1)),me=(vl==null?void 0:vl.split(":"))??[],qe=((za=(Oa=(ma=(Me=ya==null?void 0:ya[1])==null?void 0:Me.replace("}",gl))==null?void 0:ma.split(gl))==null?void 0:Oa[0])==null?void 0:za.split(","))??[];let Nl=(Ca=he==null?void 0:he[0])==null?void 0:Ca.slice(1,((pa=he==null?void 0:he[0])==null?void 0:pa.length)-2);Ke&&Ke!==""&&(da=ni(Ke)),(Ae=Nl==null?void 0:Nl.split(","))==null||Ae.forEach((pl,Fl)=>{var ja,jl,Rl,Da,al;((ja=ce.analyzeSplitToContent(pl,"@"))==null?void 0:ja.length)>1&&(pl=(jl=ce.analyzeSplitToContent(pl,"@"))==null?void 0:jl[0],(pl==null?void 0:pl[(pl==null?void 0:pl.length)-1])==="@"&&(pl=pl==null?void 0:pl.slice(0,(pl==null?void 0:pl.length)-1))),n.push({label:pl,prop:pl,align:"center",menus:xe,groups:(aa==null?void 0:aa.length)===0?me:(Rl=aa==null?void 0:aa.find(dl=>(dl==null?void 0:dl.number)>=Fl))==null?void 0:Rl.contents,words:(Ve==null?void 0:Ve.length)===0?(Da=qe==null?void 0:qe[Fl])==null?void 0:Da.split(":"):(al=Ve==null?void 0:Ve[Fl])==null?void 0:al.split(":"),formType:(xe==null?void 0:xe.length)>0?"Select":"Input",mainKey:Fl===0,filter:da,isMainPath:(aa==null?void 0:aa.findIndex(dl=>(dl==null?void 0:dl.number)>=Fl))===0})})}else n.push({label:se,prop:se,align:"center"})});else{let se=(J=ce.analyzeSplitToContent(a,","))==null?void 0:J.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));se==null||se.forEach(Be=>{n.push(ht(Be,l))})}return n},Zd=(a,l)=>{var h,c,d,m,b;let n=a;if(!a)return;let r="";((h=ce.analyzeSplitToContent(a,"}"))==null?void 0:h.length)>1&&(n=(c=ce.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(d=ce.analyzeSplitToContent(a,"}"))==null?void 0:d[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let o=[],s=[];return o.push({label:"排序",prop:"sort"}),o.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=ce.analyzeSplitToContent(n,","))==null||m.forEach(u=>{var C;(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)),(u==null?void 0:u[0])==="{"?(C=Co(u,l))==null||C.forEach(M=>{o.push(M)}):o.push(ht(u,l))}),o!=null&&o.some(u=>{var C;return(C=u==null?void 0:u.prop)==null?void 0:C.includes("@")})&&(o=o==null?void 0:o.filter(u=>{var C;return!((C=u==null?void 0:u.prop)!=null&&C.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(b=ce.analyzeSplitToContent(r,","))==null||b.forEach(u=>{var C;(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)),(u==null?void 0:u[0])==="{"?(C=Co(u,l))==null||C.forEach(M=>{s.push(M)}):s.push(ht(u,l))})),{columns:o,secondColumns:s}},pn=a=>{var l,n,r,o,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let h=(n=(l=a==null?void 0:a.replace("(",gl))==null?void 0:l.split(gl))==null?void 0:n[1],c=(o=(r=a==null?void 0:a.replace("(",gl))==null?void 0:r.split(gl))==null?void 0:o[0];return h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h=(s=ce.analyzeSplitToContent(h,","))==null?void 0:s.map(d=>((d==null?void 0:d[(d==null?void 0:d.length)-1])===","&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1)),c+d)),h=h==null?void 0:h.join(","),a!=null&&a.includes("@Quote")&&(h!=null&&h.includes("@QuoteType")||(h=h===""?h+"@QuoteType=Manual":h+",@QuoteType=Manual"),h!=null&&h.includes("@QuoteSonSync")||(h=h===""?h+"@QuoteSonSync=No":h+",@QuoteSonSync=No"),h!=null&&h.includes("@QuoteFatherSync")||(h=h===""?h+"@QuoteFatherSync=Yes":h+",@QuoteFatherSync=Yes")),h}},is=a=>{let l=a==null?void 0:a.map(n=>{var r,o;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+gl+((o=n==null?void 0:n.groups)==null?void 0:o.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,o;return{menus:(r=n==null?void 0:n.split(gl))==null?void 0:r[0],groups:((o=n==null?void 0:n.split(gl))==null?void 0:o[1])??[]}}),l},os=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=ce.analyzeSplitToContent(l,","))==null?void 0:n.map(r=>((r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])!=="@"&&(r="@"+r),(r==null?void 0:r[1])==="("&&(r=pn(r)),r)),l==null?void 0:l.join(",")},lc=(a,l,n="")=>{var L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae;let r=[],o=[],s=[],h="",c="",d="",m=[],b=[],u=[],C="";if(((L=a==null?void 0:a[0])==null?void 0:L[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((w=a==null?void 0:a[0])==null?void 0:w[0])!=="*"&&((g=a==null?void 0:a[0])==null?void 0:g[0])!=="$"&&(h=(S=ce.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:S[0],(h==null?void 0:h[0])!=="@"&&(h="@"+h),h=ni(h),d=($=ce.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:$[1],(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=d==null?void 0:d.replaceAll(":","/"));let k=ce.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(V=k==null?void 0:k.filter(he=>(he==null?void 0:he[0])!=="{"&&(he==null?void 0:he[0])!=="["))==null?void 0:V.join(""),c=(ae=a==null?void 0:a[0])==null?void 0:ae.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),C=(Z=k==null?void 0:k.filter(he=>(he==null?void 0:he[0])!=="["))==null?void 0:Z.join(""),C=(be=a==null?void 0:a[0])==null?void 0:be.replace(C,""),c=c==null?void 0:c.replace(C,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),((ze=ce.analyzeSplitToContent(c,"@"))==null?void 0:ze.length)>1&&(h=(F=ce.analyzeSplitToContent(c,"@"))==null?void 0:F[1],(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)),h="@"+h,h=pn(h),c=(ne=ce.analyzeSplitToContent(c,"@"))==null?void 0:ne[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((J=ce.analyzeSplitToContent(r,"@"))==null?void 0:J.length)>1){h!==""&&(h=h+",");let he=(se=ce.analyzeSplitToContent(r,"@"))==null?void 0:se[1];he="@"+he,he=pn(he),h=h+he,r=(Be=ce.analyzeSplitToContent(r,"@"))==null?void 0:Be[0]}if((r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=r===""?[]:r==null?void 0:r.split(":"),(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)),n!==""){let he=($e=ce.analyzeSplitToContent(n,")"))==null?void 0:$e[0],Y=(fe=ce.analyzeSplitToContent(n,"@"))==null?void 0:fe[1];d=(oe=(N=ce.analyzeSplitToContent(n,"@"))==null?void 0:N[0])==null?void 0:oe.replace(he,""),(d==null?void 0:d[(d==null?void 0:d.length)-1])==="@"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),he=os(he),Y=os(Y);let xe=he??"";if(xe!==""&&(xe=xe+","),xe=xe+Y,(xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===","&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),xe!==""&&h!==""&&(h=h+","),h=h+xe,(d==null?void 0:d[0])==="$"&&(d=d==null?void 0:d.slice(1,d==null?void 0:d.length)),d=(U=ce.analyzeSplitToContent(d,":"))==null?void 0:U.filter((me,qe)=>{var da;return!((me==null?void 0:me[0])==="{"&&qe===((da=ce.analyzeSplitToContent(d,":"))==null?void 0:da.length)-1)}),d=d==null?void 0:d.join(""),(d==null?void 0:d[(d==null?void 0:d.length)-1])===":"&&(d=d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)),h!=null&&h.includes("@Sync")||(h=h===""?h+"@Sync=(Yes,Yes)":h+",@Sync=(Yes,Yes)"),d!=null&&d.includes("$")){let me=(Ie=(De=d==null?void 0:d.replace("*",gl))==null?void 0:De.split(gl))==null?void 0:Ie[1],qe=(la=(je=d==null?void 0:d.replace("*",gl))==null?void 0:je.split(gl))==null?void 0:la[0];qe=qe==null?void 0:qe.split("$"),qe=((ee=(Ta=qe==null?void 0:qe[0])==null?void 0:Ta.split(":"))==null?void 0:ee[0])+":"+(qe==null?void 0:qe[1])+":",d=qe+"*"+me}else d=(ca=d==null?void 0:d.replaceAll("{",""))==null?void 0:ca.replaceAll("}","")}h!==""&&h&&(h="("+h+")"),h=d+h,((ue=ce.analyzeSplitToContent(c,"}"))==null?void 0:ue.length)>1&&(c=(ta=ce.analyzeSplitToContent(c,"}"))==null?void 0:ta.filter(he=>(he==null?void 0:he[0])!=="@"),c=c==null?void 0:c.join(""));let W=Zd(c,l);s=c===""?[]:(W==null?void 0:W.columns)??[],u=ce.getColumnChild(s);let I=ce.getColumnChild(s);s!=null&&s.some(he=>{var Y;return Array.isArray(he==null?void 0:he.children)&&((Y=he==null?void 0:he.children)==null?void 0:Y.length)>0})&&(s=[s]),o=C?Di(C):[],!(o!=null&&o.every(he=>Array.isArray(he)))&&(o==null?void 0:o.length)>0&&(o=[o]),(o==null?void 0:o.length)>0&&(Array.isArray(o==null?void 0:o[0])&&((Se=o==null?void 0:o[0])!=null&&Se.every(he=>Array.isArray(he)))?o=o==null?void 0:o.map((he,Y)=>(he=he.map((xe,me)=>(xe.unshift("{}"),xe.unshift((me+1).toString()),xe)),he)):o=o==null?void 0:o.map((he,Y)=>(he.unshift("{}"),he.unshift((Y+1).toString()),he))),W!=null&&W.secondColumns&&((te=W==null?void 0:W.secondColumns)==null?void 0:te.length)>0&&((o==null?void 0:o.length)>0?o=o==null?void 0:o.map((he,Y)=>{var xe,me;return Array.isArray(he==null?void 0:he[0])?he=he==null?void 0:he.map((qe,da)=>{var Ke,aa;return qe.unshift((aa=(Ke=W==null?void 0:W.secondColumns)==null?void 0:Ke[da])==null?void 0:aa.prop),qe}):he.unshift((me=(xe=W==null?void 0:W.secondColumns)==null?void 0:xe[Y])==null?void 0:me.prop),he}):o=(Ne=W==null?void 0:W.secondColumns)==null?void 0:Ne.map((he,Y)=>(he=[he==null?void 0:he.label],he.push(Y),he)),s.unshift({label:"",prop:"disabled",sortable:!1})),u=u==null?void 0:u.map(he=>{var Y,xe;return{menus:he==null?void 0:he.menus,content:((Y=he==null?void 0:he.menus)==null?void 0:Y.join("/"))+gl+((xe=he==null?void 0:he.groups)==null?void 0:xe.join("/"))}});let j=[];if(((sa=(We=h==null?void 0:h.replace("(",gl))==null?void 0:We.split(gl))==null?void 0:sa[0])!==""&&(j=(R=(Ya=h==null?void 0:h.replace("(",gl))==null?void 0:Ya.split(gl))==null?void 0:R[0],j=[j],j=j==null?void 0:j.map(he=>{var xe,me,qe;let Y=he==null?void 0:he.split("*");return{menus:(xe=Y==null?void 0:Y[0])==null?void 0:xe.split(":"),content:((me=Y==null?void 0:Y[0])==null?void 0:me.replaceAll(":","/"))+gl+((qe=Y==null?void 0:Y[1])==null?void 0:qe.replaceAll(":","/"))}}),u=[...u,...j]),u=u==null?void 0:u.filter(he=>{var Y;return(he==null?void 0:he.menus)&&((Y=he==null?void 0:he.menus)==null?void 0:Y.length)>0}),u=u==null?void 0:u.map(he=>he==null?void 0:he.content),u=[...new Set(u)],u=u==null?void 0:u.map(he=>{var Y,xe;return{menus:(Y=he==null?void 0:he.split(gl))==null?void 0:Y[0],groups:((xe=he==null?void 0:he.split(gl))==null?void 0:xe[1])??[]}}),m=I==null?void 0:I.filter(he=>{var Y;return(he==null?void 0:he.filter)&&((Y=he==null?void 0:he.filter)==null?void 0:Y.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(he=>{var Y,xe,me,qe;return(qe=(me=(xe=(Y=ce.analyzeSplitToContent(he==null?void 0:he.filter,","))==null?void 0:Y.find(da=>da==null?void 0:da.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:me[0])==null?void 0:qe.includes("Yes")}),m=is(m)),b=I==null?void 0:I.filter(he=>{var Y;return(he==null?void 0:he.filter)&&((Y=he==null?void 0:he.filter)==null?void 0:Y.includes("@Sync"))}),(b==null?void 0:b.length)>0&&(b=b==null?void 0:b.filter(he=>{var Y,xe,me,qe;return(qe=(me=(xe=(Y=ce.analyzeSplitToContent(he==null?void 0:he.filter,","))==null?void 0:Y.find(da=>da==null?void 0:da.includes("@Sync")))==null?void 0:xe.split(","))==null?void 0:me[1])==null?void 0:qe.includes("Yes")}),b=is(b)),h!==""&&(h!=null&&h.includes("@Sync"))&&(h==null?void 0:h[0])!=="("){let he=(H=h==null?void 0:h.replace("(",gl))==null?void 0:H.split(gl),Y=he==null?void 0:he[1];if(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1),Y=ce.analyzeSplitToContent(Y,","),(de=(ve=(X=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:X.split(","))==null?void 0:ve[0])!=null&&de.includes("Yes")){let xe=he==null?void 0:he[0];xe=[{menus:(na=(va=xe==null?void 0:xe.split("*"))==null?void 0:va[0])==null?void 0:na.replaceAll(":","/"),groups:((wa=(Pe=xe==null?void 0:xe.split("*"))==null?void 0:Pe[1])==null?void 0:wa.split(":"))??[]}],m=[...m,...xe]}if((Oa=(ma=(Me=Y==null?void 0:Y.find(xe=>xe==null?void 0:xe.includes("@Sync")))==null?void 0:Me.split(","))==null?void 0:ma[1])!=null&&Oa.includes("Yes")){let xe=he==null?void 0:he[0];xe=[{menus:(pa=(za=xe==null?void 0:xe.split("*"))==null?void 0:za[0])==null?void 0:pa.replaceAll(":","/"),groups:((Ae=(Ca=xe==null?void 0:xe.split("*"))==null?void 0:Ca[1])==null?void 0:Ae.split(":"))??[]}],b=[...b,...xe]}}return{groupName:r,tableColumns:s,tableFilter:h,tableContents:o,columns:(W==null?void 0:W.secondColumns)??[],relatedQuotes:u,fatherSyncContents:m,sonSyncContents:b}},rc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var o,s,h,c;if(Array.isArray(n))n=n==null?void 0:n.map(d=>{var m,b,u,C;return d!=null&&d.isMainPath||(((m=d==null?void 0:d.children)==null?void 0:m.length)>0?d.children=rc(d.children,l):((b=d==null?void 0:d.menus)==null?void 0:b.length)>0&&!((u=n==null?void 0:n[0])!=null&&u.isMainPath)&&(d.menus=(C=d.menus)==null?void 0:C.map((M,k)=>{var W,I;return((W=d.menus)==null?void 0:W.length)-1===k&&M===""&&(l==null?void 0:l.parentContent)+"/"!==((I=d.menus)==null?void 0:I.join("/"))&&(M=l==null?void 0:l.value),d}),d.bindMenus=d.menus)),d});else{if(r===0&&((o=n.menus)==null?void 0:o.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((s=n.menus)==null?void 0:s.length)>0&&!((h=a==null?void 0:a[0])!=null&&h.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((d,m)=>{var b,u;return((b=n.menus)==null?void 0:b.length)-1===m&&d===""&&(l==null?void 0:l.parentContent)+"/"!==((u=n.menus)==null?void 0:u.join("/"))&&(d=l==null?void 0:l.value),d}),n.bindMenus=n.menus)}return n}),a),Qd=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=rc(n.contents,l)),n)),a),vt=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=vt(r,l),r)):n=n==null?void 0:n.map(r=>{var o,s;return r!=null&&r.children&&((o=r==null?void 0:r.children)==null?void 0:o.length)>0?r.children=vt(r==null?void 0:r.children,l):r!=null&&r.words&&((s=r==null?void 0:r.words)==null?void 0:s.length)>0&&(l!=null&&l.find(h=>{var c,d,m,b;return((b=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:b[((m=(d=r==null?void 0:r.prop)==null?void 0:d.split("."))==null?void 0:m.length)-1])===h}))&&(r.mainKey=!0),r}),n};let wr="$R";const ep=A.useUnit(A.pinia),{selectTitle:nn}=A.storeToRefs(ep),ap=A.useMenuState(A.pinia),{localFiles:lp}=A.storeToRefs(ap),xn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixColumn",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},{key:"@BackGround",value:"onBackGround",order:1}];var ri=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(ri||{});const rp=a=>{var l,n,r,o,s;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let h=a==null?void 0:a.contents,c=a==null?void 0:a.filter;(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(l=ce.analyzeSplitToContent(c,","))==null?void 0:l.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=ce.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));let d=(s=(o=(r=lp.value)==null?void 0:r.filter(m=>{var b;return(m==null?void 0:m.path)===((b=a==null?void 0:a.groupName)==null?void 0:b[0])}))==null?void 0:o[0])==null?void 0:s.children;return d=(d==null?void 0:d.filter(m=>c==null?void 0:c.find(b=>b===(m==null?void 0:m.name))))??[],h.push({key:"backGround",contents:d}),h}return a==null?void 0:a.contents},np=a=>{const l=ic(a==null?void 0:a.filter);return l?oc(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},ip=a=>{const l=ic(a==null?void 0:a.filter);return l?oc(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},op=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},tp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},sp=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var o;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(o=r.contents)==null?void 0:o.slice(0,parseInt(a==null?void 0:a.filter))),r})},cp=async a=>{var l,n,r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(J=>((J==null?void 0:J.key)==="tableContents"&&(J.contents=ce.shuffle(J.contents)),J));if((a==null?void 0:a.filter)==="Auto"){let ne=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:r.contents;Array.isArray(ne==null?void 0:ne[0])&&(ne=ne==null?void 0:ne[0]),ne=ce.getColumnChild(ne);let J=ne==null?void 0:ne.filter(De=>(De==null?void 0:De.filter)&&(De==null?void 0:De.filter)!==""),se=new Map,Be=[];J==null||J.forEach(De=>{var Ie,je;se.get((Ie=De==null?void 0:De.menus)==null?void 0:Ie.join("/"))||(se.set((je=De==null?void 0:De.menus)==null?void 0:je.join("/"),De),Be.push(De))});let $e=(s=(o=nn==null?void 0:nn.value)==null?void 0:o.find(De=>(De==null?void 0:De.condition)==="child"))==null?void 0:s.value,fe=Be==null?void 0:Be.map(De=>{var Ie,je,la;return De=(Ie=De==null?void 0:De.menus)==null?void 0:Ie.join("/"),(De==null?void 0:De[(De==null?void 0:De.length)-1])==="/"&&((la=(je=nn==null?void 0:nn.value)==null?void 0:je.find(Ta=>(Ta==null?void 0:Ta.condition)==="child"))==null?void 0:la.parentContent)+"/"!==De?De=De+$e:(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}),N=Be==null?void 0:Be.map(De=>De==null?void 0:De.groups),oe=fe==null?void 0:fe.map(async De=>{let Ie=await Gr(De,!1);return{path:De,contents:Ie}});oe=await Promise.all(oe);let U=oe==null?void 0:oe.map((De,Ie)=>{var la,Ta,ee,ca,ue,ta,Se;let je=(la=De==null?void 0:De.contents)==null?void 0:la.filter(te=>{var Ne,We;return(te==null?void 0:te.name)===((We=N==null?void 0:N[Ie])==null?void 0:We[((Ne=N==null?void 0:N[Ie])==null?void 0:Ne.length)-1])});return je=(ca=(ee=(Ta=je==null?void 0:je[0])==null?void 0:Ta.compData)==null?void 0:ee.find(te=>(te==null?void 0:te.key)==="tableContents"))==null?void 0:ca.contents,(De==null?void 0:De.path)===((ta=(ue=nn==null?void 0:nn.value)==null?void 0:ue.find(te=>(te==null?void 0:te.condition)==="child"))==null?void 0:ta.parentContent)&&(je=((Se=je==null?void 0:je.map(te=>{for(let Ne in te)if(te[Ne]===$e)return te}))==null?void 0:Se.filter(te=>te))??[]),je??[]});if(U=U==null?void 0:U.map(De=>(De=De==null?void 0:De.map(Ie=>{var la;let je={};for(let Ta in Ie)if(J!=null&&J.find(ee=>{var ca,ue;return((ue=(ca=ee==null?void 0:ee.words)==null?void 0:ca[0])==null?void 0:ue.replaceAll("'",""))===Ta})){let ee=(la=J==null?void 0:J.find(ca=>{var ue,ta;return((ta=(ue=ca==null?void 0:ca.words)==null?void 0:ue[0])==null?void 0:ta.replaceAll("'",""))===Ta}))==null?void 0:la.prop;je[ee]=Ie==null?void 0:Ie[Ta]}return je}),De)),U=ce.cartesianProduct(U),Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),(U==null?void 0:U.length)>0&&((u=(c=(h=J==null?void 0:J[0])==null?void 0:h.menus)==null?void 0:c.join("/"))==null?void 0:u[((b=(m=(d=J==null?void 0:J[0])==null?void 0:d.menus)==null?void 0:m.join("/"))==null?void 0:b.length)-1])==="/")return(C=a==null?void 0:a.contents)==null?void 0:C.map(Ie=>{var je;return(Ie==null?void 0:Ie.key)==="tableContents"&&(U==null?void 0:U.length)>0&&(Ie.contents=((je=Ie.contents)==null?void 0:je.length)>0?Ie.contents:U),Ie})}if((a==null?void 0:a.filter)==="Manual"){let ne=[],J=[],se=(k=(M=a==null?void 0:a.contents)==null?void 0:M.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:k.contents;(se==null?void 0:se[(se==null?void 0:se.length)-1])===")"?se=(I=(W=se==null?void 0:se.replace("(",wr))==null?void 0:W.split(wr))==null?void 0:I[0]:se="",se!==""&&(ne=((L=(j=se==null?void 0:se.split("*"))==null?void 0:j[0])==null?void 0:L.split(":"))??[],J=((S=(g=(w=(x=(E=se==null?void 0:se.split("*"))==null?void 0:E[1])==null?void 0:x.replace("{",wr))==null?void 0:w.split(wr))==null?void 0:g[0])==null?void 0:S.split(":"))??[]);let Be=(V=($=a==null?void 0:a.contents)==null?void 0:$.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:V.contents;Be=(Z=(ae=Be==null?void 0:Be.replace("(",wr))==null?void 0:ae.split(wr))==null?void 0:Z[1],Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1);let $e=(be=a==null?void 0:a.contents)==null?void 0:be.map(N=>{var oe,U,De,Ie,je,la,Ta,ee,ca;return(N==null?void 0:N.key)==="header"&&((oe=N==null?void 0:N.contents)!=null&&oe.every(ue=>(ue==null?void 0:ue.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((U=N==null?void 0:N.contents)==null?void 0:U[0])?N.contents=(De=N==null?void 0:N.contents)==null?void 0:De.map((ue,ta)=>{var Se,te,Ne;return ue!=null&&ue.isMainPath||(ta===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((te=ue.words)==null?void 0:te.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Be,(!(ue!=null&&ue.menus)||((Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.length)===0)&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}):Array.isArray((Ie=N==null?void 0:N.contents)==null?void 0:Ie[0])&&((Ta=(la=(je=N==null?void 0:N.contents)==null?void 0:je[0])==null?void 0:la.filter(()=>(ne==null?void 0:ne.length)>0))==null?void 0:Ta.length)>0&&(N.contents[0]=(ca=(ee=N==null?void 0:N.contents)==null?void 0:ee[0])==null?void 0:ca.map((ue,ta)=>{var Se,te,Ne;return ue!=null&&ue.isMainPath||(ta===0?(ue.mainKey=!0,ue.formType="Select",ue.bindMenus=ne,ue.groups=((Se=ue.groups)==null?void 0:Se.length)===0?J:ue.groups,ue.words=((te=ue.words)==null?void 0:te.length)===0?[ue==null?void 0:ue.prop]:ue.words,ue.filter=Be,(!(ue!=null&&ue.menus)||Array.isArray(ue==null?void 0:ue.menus)&&((Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.length)===0)&&(ne==null?void 0:ne.length)>0&&(ue.menus=ne)):(ue.mainKey=!1,ue.bindMenus=ne)),ue}))),N}),fe=(ze=$e==null?void 0:$e.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:ze.contents;if(Array.isArray(fe==null?void 0:fe[0])&&(fe=fe==null?void 0:fe[0]),fe=ce.getColumnChild(fe),fe!=null&&fe.some(N=>{var oe,U;return((U=N==null?void 0:N.menus)==null?void 0:U[((oe=N==null?void 0:N.menus)==null?void 0:oe.length)-1])===""})){let N=(F=nn==null?void 0:nn.value)==null?void 0:F.find(oe=>(oe==null?void 0:oe.condition)==="child");$e=Qd($e,N)}return $e}if((a==null?void 0:a.filter)==="Chart"){let ne=a==null?void 0:a.contents;return ne.push({key:"newType",contents:"Chart"}),ne}return a==null?void 0:a.contents},up=async a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}if((a==null?void 0:a.filter)==="Bar"||(a==null?void 0:a.filter)==="Pie"||(a==null?void 0:a.filter)==="Line"||(a==null?void 0:a.filter)==="Histogram"||(a==null?void 0:a.filter)==="Scatter"){let l=a==null?void 0:a.contents;return l.push({key:"ChartType",contents:{type:a==null?void 0:a.filter,title:""}}),l}return a==null?void 0:a.contents},dp=a=>{var r,o,s,h,c,d,m,b,u,C,M,k;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((o=(r=l==null?void 0:l.replace(":",wr))==null?void 0:r.split(wr))==null?void 0:o[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(c=(h=l==null?void 0:l.split("="))==null?void 0:h[1])!=null&&c.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let W=(d=l==null?void 0:l.split("="))==null?void 0:d[0],I=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(b=I==null?void 0:I.slice(1,I==null?void 0:I.length))!=null&&b.includes("$")&&(I=(M=(C=(u=nn==null?void 0:nn.value)==null?void 0:u.filter(j=>(j==null?void 0:j.condition)==="child"))==null?void 0:C[0])==null?void 0:M.value),l=W+"="+I}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=ce.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let W=[];return n==null||n.forEach(j=>{let L={};for(let E in j){let x=E;x!=null&&x.includes("[")||(L[x]=j[E])}W.push(L)}),(k=a==null?void 0:a.contents)==null?void 0:k.map(j=>{var E,x,w;let L=(x=(E=a==null?void 0:a.contents)==null?void 0:E.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:x.contents;if(L=(w=ce.getEqualChild(L))==null?void 0:w.filter(g=>(g==null?void 0:g.label)!=="操作"),(j==null?void 0:j.key)==="tableContents"){let S=ce.tableToForm(j==null?void 0:j.contents,L);W==null||W.forEach($=>{var V,ae;for(let Z in $)!((V=S==null?void 0:S[0])!=null&&V.find(be=>{var ze;return(be==null?void 0:be.key)===Z||((ze=be==null?void 0:be.key)==null?void 0:ze.includes(Z))}))&&!(S!=null&&S.find(be=>{var ze;return(be==null?void 0:be.key)===Z||((ze=be==null?void 0:be.key)==null?void 0:ze.includes(Z))}))||(((ae=$[Z])==null?void 0:ae[0])!=="!"?S=S==null?void 0:S.filter(be=>{var ze,F;return((ze=be==null?void 0:be.find(ne=>{var J;return(ne==null?void 0:ne.key)===Z||((J=ne==null?void 0:ne.key)==null?void 0:J.includes(Z))}))==null?void 0:ze.value)===$[Z]||Array.isArray($==null?void 0:$[Z])&&((F=$==null?void 0:$[Z])==null?void 0:F.find(ne=>{var J;return((J=be==null?void 0:be.find(se=>{var Be;return(se==null?void 0:se.key)===Z||((Be=se==null?void 0:se.key)==null?void 0:Be.includes(Z))}))==null?void 0:J.value)===ne}))}):S=S==null?void 0:S.filter(be=>{var ze;return((ze=be==null?void 0:be.find(F=>{var ne;return(F==null?void 0:F.key)===Z||((ne=F==null?void 0:F.key)==null?void 0:ne.includes(Z))}))==null?void 0:ze.value)!==$[Z]}))}),(S==null?void 0:S.length)===0?j.contents=[]:j.contents=S==null?void 0:S.map($=>{let V={};return $==null||$.forEach(ae=>{V[ae==null?void 0:ae.key]=ae==null?void 0:ae.value}),V})}return j})}return a==null?void 0:a.contents},pp=a=>a==null?void 0:a.contents,fp=a=>a==null?void 0:a.contents,hp=a=>{var l,n,r,o;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(o=a==null?void 0:a.contents)==null?void 0:o.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=vt(c.contents,s)),c))}return a==null?void 0:a.contents},vp=a=>{var n,r,o,s,h;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",wr))==null?void 0:n.split(wr))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(o=ce.analyzeSplitToContent(c,","))==null?void 0:o.map(u=>((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)),u));let d=c==null?void 0:c[0];(d==null?void 0:d[0])==="("&&(d=d==null?void 0:d.slice(1,(d==null?void 0:d.length)-1));let m=(c==null?void 0:c[1])??"Up",b=(s=a==null?void 0:a.contents)==null?void 0:s.map(u=>{var C,M;if(m==="Up"){if((u==null?void 0:u.key)==="extraButton"){let k=(C=d==null?void 0:d.split(","))==null?void 0:C.map(W=>({label:W,prop:W}));u.contents=[...k??[],...u.contents]}}else if(m==="Line"&&(u==null?void 0:u.key)==="rowButton"){let k=(M=d==null?void 0:d.split(","))==null?void 0:M.map(W=>({label:W,prop:W}));u.contents=[...k??[],...u.contents]}return u});if(m==="Bottom"||m==="Down"){let u=(h=d==null?void 0:d.split(","))==null?void 0:h.map(C=>({label:C,prop:C}));b.push({key:"bottomButton",contents:u})}return b}return a==null?void 0:a.contents},mp=a=>a==null?void 0:a.contents,yp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.key)==="rowButton"&&(o.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(h=>({label:h,prop:h}))),o}):a==null?void 0:a.contents},gp=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,o=(n=l==null?void 0:l.split(","))==null?void 0:n.map(s=>({label:s,prop:s}));return r.push({key:"bottomButton",contents:o}),r}return a==null?void 0:a.contents},bp=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(o=>(o.isNoClick=!0,o))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},kp=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s;return(o==null?void 0:o.key)==="formContent"&&(o.contents=(s=o.contents)==null?void 0:s.map(h=>(h.width=n,h))),o})}return a==null?void 0:a.contents},xp=a=>{var l,n,r,o;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(c=>{var d;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(d=c.contents)==null?void 0:d.map(m=>(m.width=s,m))),c})}if(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let s=Di(a==null?void 0:a.filter),h=Array.isArray(s)?s.map(d=>parseInt(d)).filter(d=>!!d&&!Number.isNaN(d)):[];return h.length?(o=a==null?void 0:a.contents)==null?void 0:o.map(d=>{if((d==null?void 0:d.key)==="formContent"){const m=d.contents??[];d.contents=m.map((b,u)=>{const C=u+1;let M=0,k=0;for(let I=0;I<h.length;I++){if(k+=h[I],C<=k){M=I;break}I===h.length-1&&(M=h.length-1)}const W=h[M]||h[h.length-1]||1;return b.width=W,b})}return d}):a==null?void 0:a.contents}return a==null?void 0:a.contents},wp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.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(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var s,h,c;return(o==null?void 0:o.key)==="header"&&(Array.isArray((s=o==null?void 0:o.contents)==null?void 0:s[0])?o.contents[0]=(c=o.contents[0])==null?void 0:c.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d)):o.contents=(h=o.contents)==null?void 0:h.map(d=>(n!=null&&n.find(m=>m===(d==null?void 0:d.prop))&&(d.fixed="left"),d))),o})}return a==null?void 0:a.contents},_p=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.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 r=s=>(n!=null&&n.find(h=>h===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(h=>r(h))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var h,c,d;return(s==null?void 0:s.key)==="header"&&(Array.isArray((h=s==null?void 0:s.contents)==null?void 0:h[0])?s.contents[0]=(d=s.contents[0])==null?void 0:d.map(m=>r(m)):s.contents=(c=s.contents)==null?void 0:c.map(m=>r(m))),s})}return a==null?void 0:a.contents},Sp=async a=>{var r,o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;const l=A.useUnit(A.pinia),{chooseTitle:n}=A.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let x=await Gr(((o=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:o.parentContent)??((h=(s=n==null?void 0:n.value)==null?void 0:s[0])==null?void 0:h.relatedContent),!1),w=(d=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:d.value;(b=(m=x==null?void 0:x[0])==null?void 0:m.compData)!=null&&b.find(V=>(V==null?void 0:V.key)==="header")?x=(u=x==null?void 0:x[0])==null?void 0:u.compData:x=(M=(C=x==null?void 0:x.filter(V=>{var ae;return(ae=V==null?void 0:V.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="header")}))==null?void 0:C[0])==null?void 0:M.compData;let g=(k=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:k.contents;Array.isArray(g==null?void 0:g[0])&&(g=g==null?void 0:g[0]),g=((W=g==null?void 0:g.find(V=>V==null?void 0:V.isMainKey))==null?void 0:W.prop)??((I=g==null?void 0:g[0])==null?void 0:I.prop);let S=(L=(j=x==null?void 0:x.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:j.contents)==null?void 0:L.find(V=>(V==null?void 0:V[g])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map(V=>{var ae;return(V==null?void 0:V.key)==="formContent"&&(V.contents=(ae=V.contents)==null?void 0:ae.map(Z=>(Z.value=S==null?void 0:S[Z==null?void 0:Z.prop],Z))),V})}return a==null?void 0:a.contents},Ep=a=>{var l,n,r,o,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let h=a==null?void 0:a.filter;if(h!=null&&h.includes("*")&&(h="({"+((r=(n=h==null?void 0:h.replace("{",wr))==null?void 0:n.split(wr))==null?void 0:r[1])),h=(o=h==null?void 0:h.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(h==null?void 0:h[0])!=="("&&(h="("+h+")"),h.slice(1,(h==null?void 0:h.length)-1)==="undefined")return a==null?void 0:a.contents;let c=ce.calculatorAndToOr(h),d=c==null?void 0:c[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,b=[];for(let u in d)(d==null?void 0:d[u])===(m==null?void 0:m[u])?b.push(!0):b.push(!1);return b!=null&&b.every(u=>u===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Cp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Dp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"choice",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Bp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"fixType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Tp=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=(l=ce.analyzeSplitToContent(r,","))==null?void 0:l.map(o=>((o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o)),n.push({key:"stepName",contents:r}),n}return a==null?void 0:a.contents},Np=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},nc={onNumSlice:sp,onRandomContents:cp,onConditionContents:dp,onFatherPaceContents:pp,onPaceContents:fp,onMainTagContents:hp,onButtonContents:vp,onPamButtonContents:mp,onRowButtonContents:yp,onRelated:Sp,onRowNum:xp,onFixRow:wp,onReqItem:_p,onBottomButtonContents:gp,onConditionContent:Ep,onTabs:Cp,onSinChoice:Dp,onTextSize:op,onTextRGBA:tp,onPosition:np,onSize:ip,onShowType:Bp,onStepName:Tp,onStep:Np,onInterfaceTypeContents:up,onBackGround:rp,onMaxColumn:kp,onEditRead:bp},Ap=async(a,l,n="")=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r="";if(((h=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:h.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(m=(d=r==null?void 0:r.replace("(",wr))==null?void 0:d.split(wr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(b=ce.analyzeSplitToContent(r,","))==null?void 0:b.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L!=null&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),s=a;for(let L in o){let E,x="";E=(M=(C=(u=o==null?void 0:o[L])==null?void 0:u.replace("=",wr))==null?void 0:C.split(wr))==null?void 0:M[0],x=(I=(W=(k=o==null?void 0:o[L])==null?void 0:k.replace("=",wr))==null?void 0:W.split(wr))==null?void 0:I[1];let w=(j=xn==null?void 0:xn.find(g=>(g==null?void 0:g.key)===E))==null?void 0:j.value;if(w){const g=nc[w];s=await g({contents:s,filter:x,extra:l,groupName:n})}}return s},Oo=async(a,l,n="")=>{var c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae;let r="";if(((c=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(d=a==null?void 0:a.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:d.contents),r===""||!r)return a;(r==null?void 0:r[0])===","&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(b=(m=r==null?void 0:r.replace("(",wr))==null?void 0:m.split(wr))==null?void 0:b[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(u=ce.analyzeSplitToContent(r,","))==null?void 0:u.map(Z=>((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&&Z.includes("(")||(Z=Z==null?void 0:Z.replaceAll(":","=")),Z)),s=a,h=new Map;o==null||o.forEach(Z=>{var ze,F,ne;let be=(ze=Z==null?void 0:Z.split("="))==null?void 0:ze[0];if(be==="@MainPam"&&h.get(be)){let J=h.get(be);J=J==null?void 0:J.slice(0,(J==null?void 0:J.length)-1);let se=(ne=(F=Z==null?void 0:Z.replace("{",wr))==null?void 0:F.split(wr))==null?void 0:ne[1];se=J+","+se,h.set(be,se)}else be==="@Button"&&h.get(be)?h.set(Z,Z):h.set(be,Z)}),o=Array.from(h.values()),o=o==null?void 0:o.sort((Z,be)=>{var ze,F;return((ze=xn==null?void 0:xn.find(ne=>be==null?void 0:be.includes(ne==null?void 0:ne.key)))==null?void 0:ze.order)-((F=xn==null?void 0:xn.find(ne=>Z==null?void 0:Z.includes(ne==null?void 0:ne.key)))==null?void 0:F.order)});for(let Z in o){let be,ze="";(C=o==null?void 0:o[Z])!=null&&C.includes("(")&&((M=o==null?void 0:o[Z])!=null&&M.includes("@If"))?(be=(I=(W=(k=o==null?void 0:o[Z])==null?void 0:k.replace("(",wr))==null?void 0:W.split(wr))==null?void 0:I[0],ze="("+((E=(L=(j=o==null?void 0:o[Z])==null?void 0:j.replace("(",wr))==null?void 0:L.split(wr))==null?void 0:E[1])):(be=(g=(w=(x=o==null?void 0:o[Z])==null?void 0:x.replace("=",wr))==null?void 0:w.split(wr))==null?void 0:g[0],ze=(V=($=(S=o==null?void 0:o[Z])==null?void 0:S.replace("=",wr))==null?void 0:$.split(wr))==null?void 0:V[1]);let F=(ae=xn==null?void 0:xn.find(ne=>(ne==null?void 0:ne.key)===be))==null?void 0:ae.value;if(F){const ne=nc[F];s=await ne({contents:s,filter:ze,extra:l,groupName:n})}}return s},ic=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},oc=(a,l)=>{var W,I,j,L,E;const n=Array.isArray(a)?a:[],r=n.find(x=>(x==null?void 0:x.key)==="formContent"),o=Array.isArray(r==null?void 0:r.contents)?r.contents:[],s=((W=n.find(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"))==null?void 0:W.contents)??{},h=(o==null?void 0:o[0])??{};let c=((I=l==null?void 0:l.position)==null?void 0:I[0])??(s==null?void 0:s._positionStartRow)??(h==null?void 0:h._positionStartRow),d=((j=l==null?void 0:l.position)==null?void 0:j[1])??(s==null?void 0:s._positionRowSpan)??(h==null?void 0:h._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!d||Number.isNaN(d)||d<1)&&(d=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(s==null?void 0:s._sizeStart)??(h==null?void 0:h._sizeStart),b=((E=l==null?void 0:l.size)==null?void 0:E[1])??(s==null?void 0:s._sizeEnd)??(h==null?void 0:h._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(b===void 0||Number.isNaN(b))&&(b=1),m=Math.max(0,Math.min(1,m)),b=Math.max(0,Math.min(1,b)),b<=m&&(m=0,b=1);const u=b-m,C=Math.max(1,Math.round(1/u));let M=n.map(x=>{if((x==null?void 0:x.key)!=="formContent")return x;const w=Array.isArray(x==null?void 0:x.contents)?x.contents:[];return{...x,contents:w.map(g=>({...g,width:C,_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b}))}});const k={_positionStartRow:c,_positionRowSpan:d,_sizeStart:m,_sizeEnd:b};return M.some(x=>(x==null?void 0:x.key)==="_gridLayoutMeta")?M=M.map(x=>(x==null?void 0:x.key)==="_gridLayoutMeta"?{...x,contents:k}:x):M.push({key:"_gridLayoutMeta",contents:k}),M};let po="$R";const zp=A.useUnit(A.pinia),{selectTitle:Mp}=A.storeToRefs(zp);let Ip=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Op=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Lp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Rp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ts=async(a,l,n=!0)=>{let r=[],o=a==null?void 0:a.map(async s=>{var u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll;let h=(k=(M=(C=(u=s==null?void 0:s.contents)==null?void 0:u.find(Te=>{var Ma;return(Ma=Te==null?void 0:Te.key)==null?void 0:Ma.includes("struct")}))==null?void 0:C.value)==null?void 0:M[0])==null?void 0:k.类型,c=Object.values(s==null?void 0:s.name);c=c==null?void 0:c.reverse();let d=(W=s==null?void 0:s.contents)==null?void 0:W.map(Te=>Te==null?void 0:Te.key),m={comp:h,isShow:s==null?void 0:s.is_show,name:c==null?void 0:c[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:d,menuFilter:(I=s==null?void 0:s.filter)==null?void 0:I.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(j=s==null?void 0:s.filter)==null?void 0:j.fatherSyncs,relatedQuotes:(L=s==null?void 0:s.filter)==null?void 0:L.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(x=A.cloneDeep(c))==null?void 0:x.reverse()};for(let Te in c)parseInt(Te)>=1&&(m[`name${parseInt(Te)-1}`]=c[Te]);let b=Array.isArray((w=s==null?void 0:s.filter)==null?void 0:w.menuFilter)?(g=s==null?void 0:s.filter)==null?void 0:g.menuFilter:[];if(((S=b==null?void 0:b.filter(Te=>Te==null?void 0:Te.includes("@Filter")))==null?void 0:S.length)>0){let Te=b==null?void 0:b.filter(Ze=>Ze==null?void 0:Ze.includes("@Filter"));Te=Te==null?void 0:Te[0],Te=(V=($=Te==null?void 0:Te.replace("(",po))==null?void 0:$.split(po))==null?void 0:V[1],Te=Te==null?void 0:Te.slice(0,(Te==null?void 0:Te.length)-1),Te!=null&&Te.includes("*")&&(Te=(Z=(ae=Te==null?void 0:Te.replace("{",po))==null?void 0:ae.split(po))==null?void 0:Z[1],Te=Te==null?void 0:Te.replace("}","")),Te=ce.calculatorAndToOr(Te);let Ma=(l==null?void 0:l.originPath)??"";(Ma==null?void 0:Ma[(Ma==null?void 0:Ma.length)-1])==="/"&&(Ma=Ma==null?void 0:Ma.slice(0,(Ma==null?void 0:Ma.length)-1));let Je=await Gr(Ma,!1),ie=(be=Je==null?void 0:Je.filter(Ze=>(Ze==null?void 0:Ze.comp)==="Table"))==null?void 0:be[0];ie=(F=(ze=ie==null?void 0:ie.compData)==null?void 0:ze.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:F.contents;let Xe=(J=(ne=Mp.value)==null?void 0:ne.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:J.value;ie=(se=ie==null?void 0:ie.map(Ze=>{for(let xa in Ze)if((Ze==null?void 0:Ze[xa])===Xe)return Ze}))==null?void 0:se.filter(Ze=>Ze),ie=ie==null?void 0:ie[0],Te=Te==null?void 0:Te[0];let Aa=[];for(let Ze in Te){let xa="";Ua.isObject(ie)&&(xa=($e=(Be=Object.keys(ie))==null?void 0:Be.filter(Va=>Va==null?void 0:Va.includes("."+Ze)))==null?void 0:$e[0]),xa!==""&&(ie!=null&&ie[xa])&&(Te==null?void 0:Te[Ze])===(ie==null?void 0:ie[xa])||ie!=null&&ie[Ze]&&(Te==null?void 0:Te[Ze])===(ie==null?void 0:ie[Ze])?Aa.push(!0):Aa.push(!1)}if(Aa!=null&&Aa.some(Ze=>Ze===!1)&&((N=l==null?void 0:l.originPath)==null?void 0:N[((fe=l==null?void 0:l.originPath)==null?void 0:fe.length)-1])!=="/")return}if(h==="Table"||h==="Method"){!n&&((oe=m==null?void 0:m.fatherSyncContents)==null?void 0:oe.length)>0;let Te=((U=s==null?void 0:s.contents)==null?void 0:U.find(Ue=>{var fa;return(fa=Ue==null?void 0:Ue.key)==null?void 0:fa.includes("content")}))||[],Ma=[];m.comp="Table",Te.value=(De=Te==null?void 0:Te.value)==null?void 0:De.sort((Ue,fa)=>parseInt(Ue==null?void 0:Ue.id)-parseInt(fa==null?void 0:fa.id)),Te.value=(Ie=Te==null?void 0:Te.value)==null?void 0:Ie.map(Ue=>{let fa={};for(let oa in Ue)JSON.stringify(Ue==null?void 0:Ue[oa])==="{}"?fa[oa]="":fa[oa]=Ue==null?void 0:Ue[oa];return fa}),Ma.push({key:"tableContents",contents:Te==null?void 0:Te.value});let Je=(ca=(ee=(Ta=(la=(je=s==null?void 0:s.contents)==null?void 0:je.find(Ue=>{var fa;return(fa=Ue==null?void 0:Ue.key)==null?void 0:fa.includes("struct")}))==null?void 0:la.value)==null?void 0:Ta[0])==null?void 0:ee.结构)==null?void 0:ca.contents;Array.isArray(Je==null?void 0:Je[0])?Je[0]=(ue=Je==null?void 0:Je[0])==null?void 0:ue.filter(Ue=>(Ue==null?void 0:Ue.prop)!=="sort"&&(Ue==null?void 0:Ue.prop)!=="relatedId"):Je=Je==null?void 0:Je.filter(Ue=>(Ue==null?void 0:Ue.prop)!=="sort"&&(Ue==null?void 0:Ue.prop)!=="relatedId"),Ma.push({key:"header",contents:Je}),Ma.push({key:"filter",contents:(We=(Ne=(te=(Se=(ta=s==null?void 0:s.contents)==null?void 0:ta.find(Ue=>{var fa;return(fa=Ue==null?void 0:Ue.key)==null?void 0:fa.includes("struct")}))==null?void 0:Se.value)==null?void 0:te[0])==null?void 0:Ne.引用)==null?void 0:We.contents});let ie=Ip,Xe=A.cloneDeep(Op);h==="Method"&&Xe.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Je==null?void 0:Je[0])&&((sa=Je==null?void 0:Je[0])==null?void 0:sa.prop)==="disabled"&&(ie=Lp,Xe=Rp);const Aa=["推力","真空","压力","温度","流量"],Ze=m.name;Ze&&Aa.includes(Ze)&&(ie=[...ie],ie.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let xa=[];if(!Array.isArray(Je==null?void 0:Je[0])&&(Je!=null&&Je.some(Ue=>{var fa;return(Ue==null?void 0:Ue.calculatorFilter)&&((fa=Ue==null?void 0:Ue.calculatorFilter)==null?void 0:fa.includes("Manual"))}))){let Ue=(Ya=Je==null?void 0:Je.map(fa=>fa==null?void 0:fa.calculatorFilter))==null?void 0:Ya.filter(fa=>fa&&(fa==null?void 0:fa.includes("Manual")));Ue==null||Ue.forEach(fa=>{var il;let oa=ce.analyzeSplitToContent(fa,",");if(oa=oa==null?void 0:oa.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)),oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=oa==null?void 0:oa.find(Pa=>Pa==null?void 0:Pa.includes("@FunctionButton"));Le=(il=Le==null?void 0:Le.split("="))==null?void 0:il[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],xa.push(Le)}}),xa=[...new Set(xa)],xa=xa==null?void 0:xa.map(fa=>({label:fa,prop:fa,type:"methodButton"}))}else if(Array.isArray(Je==null?void 0:Je[0])&&((R=ce.getColumnChild(Je==null?void 0:Je[0]))!=null&&R.some(Ue=>{var fa;return(Ue==null?void 0:Ue.calculatorFilter)&&((fa=Ue==null?void 0:Ue.calculatorFilter)==null?void 0:fa.includes("Manual"))}))){let Ue=(X=(H=ce.getColumnChild(Je==null?void 0:Je[0]))==null?void 0:H.map(fa=>fa==null?void 0:fa.calculatorFilter))==null?void 0:X.filter(fa=>fa&&(fa==null?void 0:fa.includes("Manual")));Ue==null||Ue.forEach(fa=>{var il;let oa=ce.analyzeSplitToContent(fa,",");if(oa=oa==null?void 0:oa.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)),oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Extent"))&&(Le==null?void 0:Le.includes("Row")))&&(oa!=null&&oa.find(Le=>(Le==null?void 0:Le.includes("Button"))&&(Le==null?void 0:Le.includes(","))))){let Le=oa==null?void 0:oa.find(Pa=>Pa==null?void 0:Pa.includes("@FunctionButton"));Le=(il=Le==null?void 0:Le.split("="))==null?void 0:il[1],Le=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1),Le=Le==null?void 0:Le.split(","),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1],xa.push(Le)}}),xa=[...new Set(xa)],xa=xa==null?void 0:xa.map(fa=>({label:fa,prop:fa,type:"methodButton"}))}if(Ma.push({key:"extraButton",contents:ie}),Ma.push({key:"rowButton",contents:[...Xe,...xa]}),m.compData=await Oo(Ma,l,m==null?void 0:m.nameContents),(ve=m.compData)!=null&&ve.find(Ue=>(Ue==null?void 0:Ue.key)==="tab")&&(m.tab=(va=(de=m.compData)==null?void 0:de.find(Ue=>(Ue==null?void 0:Ue.key)==="tab"))==null?void 0:va.contents),(na=m.compData)!=null&&na.find(Ue=>(Ue==null?void 0:Ue.key)==="step")&&(m.step=(wa=(Pe=m.compData)==null?void 0:Pe.find(Ue=>(Ue==null?void 0:Ue.key)==="step"))==null?void 0:wa.contents),(Me=m.compData)!=null&&Me.find(Ue=>(Ue==null?void 0:Ue.key)==="choice")&&(m.choice=(Oa=(ma=m.compData)==null?void 0:ma.find(Ue=>(Ue==null?void 0:Ue.key)==="choice"))==null?void 0:Oa.contents),(za=m.compData)!=null&&za.find(Ue=>(Ue==null?void 0:Ue.key)==="newType")){let Ue=(Ca=(pa=m.compData)==null?void 0:pa.find(fa=>(fa==null?void 0:fa.key)==="newType"))==null?void 0:Ca.contents;m.comp=Ue,m.compData=(Ae=m.compData)==null?void 0:Ae.filter(fa=>(fa==null?void 0:fa.key)!=="newType")}let Va="",Ja=(he=m==null?void 0:m.compData)==null?void 0:he.filter(Ue=>(Ue==null?void 0:Ue.key)==="fixType");(Ja==null?void 0:Ja.length)>0&&n&&(Va=(Y=Ja==null?void 0:Ja[0])==null?void 0:Y.contents,m.comp=Va)}else if(h==="Form"){let Te=[],Ma=(qe=(me=(xe=s==null?void 0:s.contents)==null?void 0:xe.find(Ze=>{var xa;return(xa=Ze==null?void 0:Ze.key)==null?void 0:xa.includes("content")}))==null?void 0:me.value)==null?void 0:qe[0],Je=[],ie=Array.isArray((da=s==null?void 0:s.filter)==null?void 0:da.menuFilter)?(Ke=s==null?void 0:s.filter)==null?void 0:Ke.menuFilter:[];ie==null||ie.forEach(Ze=>{if(Ze!=null&&Ze.includes("@Param(Hide=Yes, prop=")||Ze!=null&&Ze.includes("(Hide=Yes, prop=")){const xa=Ze==null?void 0:Ze.match(/prop=([^,)]+)/);xa!=null&&xa[1]&&Je.push(xa==null?void 0:xa[1])}});let Xe=(Sa=(pe=(ye=(Ve=(aa=s==null?void 0:s.contents)==null?void 0:aa.find(Ze=>{var xa;return(xa=Ze==null?void 0:Ze.key)==null?void 0:xa.includes("struct")}))==null?void 0:Ve.value)==null?void 0:ye[0])==null?void 0:pe.结构)==null?void 0:Sa.contents,Aa=(ya=Xe==null?void 0:Xe.map(Ze=>(Ze.value=Ma==null?void 0:Ma[Ze==null?void 0:Ze.prop],Ze)))==null?void 0:ya.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="sort"&&(Ze==null?void 0:Ze.prop)!=="relatedId");Aa=Aa==null?void 0:Aa.map(Ze=>(Je!=null&&Je.includes(Ze==null?void 0:Ze.prop)&&(Ze.isHideInForm=!0),Ze)),Te.push({key:"filter",contents:(ja=(Fl=(pl=(Nl=(vl=s==null?void 0:s.contents)==null?void 0:vl.find(Ze=>{var xa;return(xa=Ze==null?void 0:Ze.key)==null?void 0:xa.includes("struct")}))==null?void 0:Nl.value)==null?void 0:pl[0])==null?void 0:Fl.引用)==null?void 0:ja.contents}),Te.push({key:"formContent",contents:Aa}),Te.push({key:"paramHideProps",contents:Je}),m.compData=await Ap(Te,l,m==null?void 0:m.nameContents),(jl=m.compData)!=null&&jl.find(Ze=>(Ze==null?void 0:Ze.key)==="tab")&&(m.tab=(Da=(Rl=m.compData)==null?void 0:Rl.find(Ze=>(Ze==null?void 0:Ze.key)==="tab"))==null?void 0:Da.contents),(al=m.compData)!=null&&al.find(Ze=>(Ze==null?void 0:Ze.key)==="step")&&(m.step=(ol=(dl=m.compData)==null?void 0:dl.find(Ze=>(Ze==null?void 0:Ze.key)==="step"))==null?void 0:ol.contents),($a=m.compData)!=null&&$a.find(Ze=>(Ze==null?void 0:Ze.key)==="choice")&&(m.choice=(ll=(tl=m.compData)==null?void 0:tl.find(Ze=>(Ze==null?void 0:Ze.key)==="choice"))==null?void 0:ll.contents)}return m});return r=await Promise.all(o),r},$p=A.useLoginState(A.pinia),{loginUserInfo:wi}=A.storeToRefs($p),Vp=async(a,l="Manual",n=[])=>{var h;let r=a;r=r==null?void 0:r.filter(c=>c==null?void 0:c.functionName);let o=(h=r==null?void 0:r.filter(c=>{var d;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((d=c==null?void 0:c.calculatorFilter)==null?void 0:d.includes(l))||l!=="Manual")}))==null?void 0:h.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),s=r==null?void 0:r.map(async c=>{let d=o==null?void 0:o.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await tc(c,d,r,l,r,n),c});return s=await Promise.all(s),s},mt=async(a,l,n="Manual",r=[])=>{var d;let o=a,s;Array.isArray(l==null?void 0:l[0])?s=ce.getColumnChild(l==null?void 0:l[0]):s=l;let h=(d=s==null?void 0:s.filter(m=>{var b;return(m==null?void 0:m.calculatorFilter)&&((b=m==null?void 0:m.calculatorFilter)==null?void 0:b.includes(n))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:d.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})),c=o==null?void 0:o.map(async m=>(m=await tc(m,h,s,n,o,r),m));return c=await Promise.all(c),c},Pp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(h=>{var c;if(l!=null&&l[h]){let d=l==null?void 0:l[h];s=s?d?Tl.isEqual(d.toString(),s.toString()):void 0:d}else{let d=(c=o==null?void 0:o.find(b=>(b==null?void 0:b.label)===h))==null?void 0:c.prop,m=(l==null?void 0:l[d])??0;s=s?m?Tl.isEqual(m.toString(),s.toString()):void 0:m}}),l[r]=s===void 0?void 0:s?1:0,l},Cr=a=>{const[l,n,r]=A.cloneDeep(a).split(":").map(Number);let o=+a;return!a||!(a!=null&&a.includes(":"))?o:(l??0)*3600+(n??0)*60+(r??0)},Fn=a=>{const l=s=>s.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),o=a%60;return`${l(n)}:${l(r)}:${parseInt(l(o))}`},Fp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W,I,j;if(l!=null&&l[d]){if(s==="Row")if(!((b=((m=l==null?void 0:l[d])==null?void 0:m.toString())??"")!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let L=+(l==null?void 0:l[d]);c=c+L}else c=Cr(c.toString())+Cr((C=l==null?void 0:l[d])==null?void 0:C.toString()),c=Fn(c)}else if(s==="Row"){let L=(M=o==null?void 0:o.find(E=>(E==null?void 0:E.label)===d))==null?void 0:M.prop;if(!((W=Number.isNaN(l==null?void 0:l[L])?"":(k=l==null?void 0:l[L])==null?void 0:k.toString())!=null&&W.includes(":"))&&!((I=c==null?void 0:c.toString())!=null&&I.includes(":"))){let E=+((l==null?void 0:l[L])??0);c=c+E}else c=Cr(c==null?void 0:c.toString())+Cr((j=(l==null?void 0:l[L])??0)==null?void 0:j.toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u+C},0)}return l[r]=c,l},jp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c-I}else c=c===0?Cr(c.toString())+Cr(l==null?void 0:l[d].toString()):Cr(c.toString())-Cr(l==null?void 0:l[d].toString()),c=Fn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c-j}else c=c===0?Cr(c.toString())+Cr(((l==null?void 0:l[I])??0).toString()):Cr(c.toString())-Cr(((l==null?void 0:l[I])??0).toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u-C},0)}return l[r]=c,l},Hp=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c*I}else c=c===0?Cr(c.toString())+Cr(l==null?void 0:l[d].toString()):Cr(c.toString())*Cr(l==null?void 0:l[d].toString()),c=Fn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!(l!=null&&l[I]))c=void 0;else if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c*j}else c=c===0?Cr(c.toString())+Cr(((l==null?void 0:l[I])??0).toString()):Cr(c.toString())*Cr(((l==null?void 0:l[I])??0).toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u*C},0)}return l[r]=c,l},Up=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,o=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,h=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ce.getValueToObjectValue(l,ce.getColumnContents(o))),n==null||n.forEach(d=>{var m,b,u,C,M,k,W;if(l!=null&&l[d]){if(s==="Row")if(!((b=(m=l==null?void 0:l[d])==null?void 0:m.toString())!=null&&b.includes(":"))&&!((u=c==null?void 0:c.toString())!=null&&u.includes(":"))){let I=+(l==null?void 0:l[d]);c=c===0?c+I:c/I}else c=c===0?Cr(c.toString())+Cr(l==null?void 0:l[d].toString()):Cr(c.toString())/Cr(l==null?void 0:l[d].toString()),c=Fn(c)}else if(s==="Row"){let I=(C=o==null?void 0:o.find(j=>(j==null?void 0:j.label)===d))==null?void 0:C.prop;if(!((k=Number.isNaN(l==null?void 0:l[I])?"":(M=l==null?void 0:l[I])==null?void 0:M.toString())!=null&&k.includes(":"))&&!((W=c==null?void 0:c.toString())!=null&&W.includes(":"))){let j=+((l==null?void 0:l[I])??0);c=c===0?c+j:c/j}else c=c===0?Cr(c.toString())+Cr(((l==null?void 0:l[I])??0).toString()):Cr(c.toString())/Cr(((l==null?void 0:l[I])??0).toString()),c=Fn(c)}}),s==="Column"){let d=[];n==null||n.forEach(m=>{let b=h==null?void 0:h.map(u=>{var C;return(u==null?void 0:u[m])??(u==null?void 0:u[(C=o==null?void 0:o.find(M=>(M==null?void 0:M.label)===m))==null?void 0:C.prop])});d=[...d,...b]}),c=d.reduce((m,b)=>{let u=0;Number.isNaN(m)||(u=+m);let C=0;return Number.isNaN(b)||(C=+b),u/C},0)}return l[r]=c.toFixed(2),l},qp=async a=>{var s,h,c,d,m,b,u,C,M,k,W;let l=(s=a==null?void 0:a.valueString)==null?void 0:s[0],n=(h=a==null?void 0:a.contents)==null?void 0:h.calculatorFilter,r=0,o=a==null?void 0:a.contents;if(l!=null&&l.includes("$")&&!(l!=null&&l.includes("{"))){(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let I=(d=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:d.replaceAll(":","/"),j=await Gr(I,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(j=(b=j==null?void 0:j.filter(E=>(E==null?void 0:E.name)===L))==null?void 0:b[0],n!==""){let E=j.compData;E=E==null?void 0:E.filter(x=>(x==null?void 0:x.key)!=="filter"),E.push({key:"filter",contents:"("+n+")"}),E=await Oo(E,{}),r=(C=(u=E==null?void 0:E.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:C.length}else r=(W=(k=(M=j==null?void 0:j.compData)==null?void 0:M.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:W.length}return o.value=r,o},fo={Sum:Fp,Substract:jp,Multiple:Hp,Divide:Up,Compare:Pp,VecDimCount:qp},tc=async(a,l,n,r="Auto",o,s=[])=>{var b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F;let h=a,c=[],d=await A.getPageDataApi({platId:parseInt((b=wi==null?void 0:wi.value)==null?void 0:b.plat_id),pageName:"menu"});d=(M=(C=(u=d==null?void 0:d.data)==null?void 0:u.result)==null?void 0:C.filter(ne=>(ne==null?void 0:ne.property_name)===""))==null?void 0:M[0];let m=[];if(d!=null&&d.object_name){d=d==null?void 0:d.object_name;let ne=await A.getPageDataApi({platId:parseInt((k=wi==null?void 0:wi.value)==null?void 0:k.plat_id),pageName:d});ne=(E=(L=(j=(I=(W=ne==null?void 0:ne.data)==null?void 0:W.result)==null?void 0:I[0])==null?void 0:j.contents)==null?void 0:L.find(J=>{var se;return(se=J==null?void 0:J.key)==null?void 0:se.includes("content")}))==null?void 0:E.value,c=(x=ne==null?void 0:ne.map(J=>({functionName:J==null?void 0:J.函数名称,functionContent:J==null?void 0:J.输出值})))==null?void 0:x.filter(J=>(J==null?void 0:J.functionContent)!==""),c==null||c.forEach(J=>{m.push(J.functionName),fo[J.functionName]=new Function("return "+J.functionContent)()})}if((l==null?void 0:l.length)===0)return h;for(let ne in l){let J=(w=l==null?void 0:l[ne])==null?void 0:w.functionName;const se=fo==null?void 0:fo[J];let Be=(g=l==null?void 0:l[ne])==null?void 0:g.methods;if(Be=ce.analyzeSplitToContent(Be,","),(S=Be==null?void 0:Be.find($e=>$e==null?void 0:$e.includes("@FunctionType")))!=null&&S.includes(r)||r==="Auto"||(Be==null?void 0:Be.length)===0){let $e=((ae=(V=($=Be==null?void 0:Be.find(fe=>fe==null?void 0:fe.includes("@FunctionExtent")))==null?void 0:$.replace(":","="))==null?void 0:V.split("="))==null?void 0:ae[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(fe=>fe===J)){let fe="";try{let oe=(Z=l==null?void 0:l[ne])==null?void 0:Z.functionRelatedWords,U=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Ie=>{var je;return Ie==null?void 0:Ie[(je=l==null?void 0:l[ne])==null?void 0:je.prop]}):["0"];U=U==null?void 0:U.map(Ie=>Ie==null?void 0:Ie.slice((Ie==null?void 0:Ie.length)-5,Ie==null?void 0:Ie.length)),U=U==null?void 0:U.map(Ie=>ce.isNumber(parseInt(Ie))&&parseInt(Ie)?parseInt(Ie):0);let De=Math.max(...U);oe=oe==null?void 0:oe.map(Ie=>{if(Ie!=null&&Ie.includes("'"))return Ie==null?void 0:Ie.replaceAll("'","");if(Ie!=null&&Ie.includes("@"))return De+1;{let je=Object.keys(h);return Ie=(h==null?void 0:h[Ie])??(h==null?void 0:h[je==null?void 0:je.find(la=>la==null?void 0:la.includes("."+Ie))]),Ie}}),fe=se(...oe)}catch(oe){Ua.ElMessage.warning("关联数据出现错误,"+oe.message)}let N=(be=l==null?void 0:l[ne])==null?void 0:be.prop;h[N]=fe}else h=await se({contents:h,valueString:(ze=l==null?void 0:l[ne])==null?void 0:ze.functionRelatedWords,prop:(F=l==null?void 0:l[ne])==null?void 0:F.prop,headers:n,typeString:$e,allContents:o})}}return h},Wp=A.useLoginState(A.pinia),{loginUserInfo:on}=A.storeToRefs(Wp),Kp=A.useMenuState(A.pinia),{activeMenuPath:ss,currentMenuPath:ho}=A.storeToRefs(Kp),sc=A.useUnit(A.pinia);let cs="$R";const{selectTitle:Ei}=A.storeToRefs(sc),cc=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L;let n=ss.value,r="",o=((h=Ei==null?void 0:Ei.value)==null?void 0:h.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(d=a==null?void 0:a[0])==null?void 0:d.father_name);let s=[];if(r!==""){let E=r;(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));let x=await Gr(E,!1);x=(m=x==null?void 0:x[0])==null?void 0:m.compData;let w=(b=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:b.contents;w=((u=w==null?void 0:w.find(S=>S==null?void 0:S.isMainKey))==null?void 0:u.prop)??((C=w==null?void 0:w[0])==null?void 0:C.prop);let g=(k=(M=x==null?void 0:x.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:M.contents)==null?void 0:k.map(S=>({label:S==null?void 0:S[w],value:S==null?void 0:S[w]}));s=(W=r==null?void 0:r.split("/"))==null?void 0:W.map(S=>(S===""?o?(o.isShow=!0,S=o):S={value:S,condition:"child",options:g,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:S={condition:"parent",value:S.trim(),isShow:!0},S))}if(n!==""){let E=(I=n==null?void 0:n.split("/"))==null?void 0:I.map(x=>(x={condition:"normal",value:x.trim(),isShow:!0},x));((j=E==null?void 0:E[0])==null?void 0:j.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(E=E==null?void 0:E.filter((x,w)=>w!==0)),s=[...s??[],...E??[]]}r===""&&o&&((o==null?void 0:o.parentContent)!==ss.value&&(o.isShow=!1),(o==null?void 0:o.value)!==""&&s.push(o)),sc.setSelectTitle(s)},Gp=async a=>{var s,h,c,d,m,b,u,C,M;let l=await A.getPageDataApi({platId:parseInt((s=on==null?void 0:on.value)==null?void 0:s.plat_id),pageName:"menu"}),n=(h=l==null?void 0:l.data)==null?void 0:h.result,r=(b=(m=(d=(c=a==null?void 0:a.filter(k=>(k==null?void 0:k.comp)==="Table"))==null?void 0:c[0])==null?void 0:d.compData)==null?void 0:m.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:b.contents;r=(M=(C=(u=r==null?void 0:r.replace("(",cs))==null?void 0:u.split(cs))==null?void 0:C[0])==null?void 0:M.replaceAll(":","/");let o=n==null?void 0:n.filter(k=>{var W;return(k==null?void 0:k.object_name)===ho.value+"/"||((W=ho.value)==null?void 0:W.includes(r))&&r+"/"===(k==null?void 0:k.object_name)});return(o==null?void 0:o.length)>0&&(a=a==null?void 0:a.map(k=>{var W;return(k==null?void 0:k.comp)==="Table"&&(k.compData=(W=k==null?void 0:k.compData)==null?void 0:W.map(I=>{var j,L,E;return(I==null?void 0:I.key)==="header"&&(Array.isArray((j=I.contents)==null?void 0:j[0])?I.contents[0]=(E=I.contents[0])==null?void 0:E.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,(g=ho.value)!=null&&g.includes(r)&&(x.fatherPath=r)),x}):I.contents=(L=I.contents)==null?void 0:L.map((x,w)=>{var g;return w===0&&(x.isExistChild=!0,(g=ho.value)!=null&&g.includes(r)&&(x.fatherPath=r)),x})),I})),k})),a},Gr=async(a,l,n={})=>{var h,c,d,m,b,u,C,M,k,W,I,j;let r=await A.getPageDataApi({platId:parseInt((h=on==null?void 0:on.value)==null?void 0:h.plat_id),pageName:a}),o=(c=r==null?void 0:r.data)==null?void 0:c.result;if((o==null?void 0:o.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await A.getPageDataApi({platId:parseInt((d=on==null?void 0:on.value)==null?void 0:d.plat_id),pageName:n==null?void 0:n.originPath});if(((b=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:b.length)>0){let E=await ts((u=L==null?void 0:L.data)==null?void 0:u.result,n,!1);E=E==null?void 0:E.map(async g=>{var V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya;let S=[],$=(V=Object.keys(g))==null?void 0:V.filter(R=>(R==null?void 0:R.includes("name"))&&R!=="nameContents");for(let R in g)$!=null&&$.find(H=>H===R)&&S.push(g==null?void 0:g[R]);if(S=S.reverse(),(g==null?void 0:g.comp)==="Table"){let R=(be=(Z=(ae=g==null?void 0:g.compData)==null?void 0:ae.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:Z.contents)==null?void 0:be.map(X=>{let ve={};for(let de in X)de!=="id"&&de!=="create_time"&&de!=="update_time"&&de!=="sort"&&de!=="create_user_id"&&de!=="update_user_id"&&de!=="department_id"&&de!=="relatedId"&&(ve[de]=X==null?void 0:X[de]);return X=Object.values(ve),X}),H=(F=(ze=g==null?void 0:g.compData)==null?void 0:ze.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:F.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ne=H[0])!=null&&ne.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H[0]=(J=H[0])==null?void 0:J.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(X=>(X==null?void 0:X.prop)==="disabled")&&(H=H==null?void 0:H.filter(X=>(X==null?void 0:X.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(X=>{var ve;return(X==null?void 0:X.calculatorFilter)&&((ve=X==null?void 0:X.calculatorFilter)==null?void 0:ve.includes("Auto"))})&&(R=await mt(R,H,"Auto"),R=R==null?void 0:R.map(X=>Object.values(X))),g!=null&&g.fatherSyncContents){Array.isArray((se=g==null?void 0:g.fatherSyncContents)==null?void 0:se[0])&&(g.fatherSyncContents=(Be=g==null?void 0:g.fatherSyncContents)==null?void 0:Be[0]);let X=($e=Ei.value)==null?void 0:$e.find(ve=>(ve==null?void 0:ve.condition)==="child");g.fatherSyncContents=(fe=g==null?void 0:g.fatherSyncContents)==null?void 0:fe.map(ve=>{var de,va,na,Pe,wa,Me;return((va=ve==null?void 0:ve.menus)==null?void 0:va[((de=ve==null?void 0:ve.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(X==null?void 0:X.value):((Pe=ve==null?void 0:ve.menus)==null?void 0:Pe[((na=ve==null?void 0:ve.menus)==null?void 0:na.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Me=ve.menus)==null?void 0:Me.slice(0,((wa=ve.menus)==null?void 0:wa.length)-1)),ve})}if(g!=null&&g.sonSyncContents){Array.isArray((N=g==null?void 0:g.sonSyncContents)==null?void 0:N[0])&&(g.sonSyncContents=(oe=g==null?void 0:g.sonSyncContents)==null?void 0:oe[0]);let X=(U=Ei.value)==null?void 0:U.find(ve=>(ve==null?void 0:ve.condition)==="child");g.sonSyncContents=(De=g==null?void 0:g.sonSyncContents)==null?void 0:De.map(ve=>{var de,va,na,Pe,wa,Me;return((va=ve==null?void 0:ve.menus)==null?void 0:va[((de=ve==null?void 0:ve.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(X==null?void 0:X.value):((Pe=ve==null?void 0:ve.menus)==null?void 0:Pe[((na=ve==null?void 0:ve.menus)==null?void 0:na.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Me=ve.menus)==null?void 0:Me.slice(0,((wa=ve.menus)==null?void 0:wa.length)-1)),ve})}if(g!=null&&g.relatedQuotes){Array.isArray((Ie=g==null?void 0:g.relatedQuotes)==null?void 0:Ie[0])&&(g.relatedQuotes=(je=g==null?void 0:g.relatedQuotes)==null?void 0:je[0]);let X=(la=Ei.value)==null?void 0:la.find(ve=>(ve==null?void 0:ve.condition)==="child");g.relatedQuotes=(Ta=g==null?void 0:g.relatedQuotes)==null?void 0:Ta.map(ve=>{var de,va,na,Pe,wa,Me;return((va=ve==null?void 0:ve.menus)==null?void 0:va[((de=ve==null?void 0:ve.menus)==null?void 0:de.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"!==(ve==null?void 0:ve.menus)?ve.menus=(ve==null?void 0:ve.menus)+(X==null?void 0:X.value):((Pe=ve==null?void 0:ve.menus)==null?void 0:Pe[((na=ve==null?void 0:ve.menus)==null?void 0:na.length)-1])==="/"&&(X==null?void 0:X.parentContent)+"/"===(ve==null?void 0:ve.menus)&&(ve.menus=(Me=ve.menus)==null?void 0:Me.slice(0,((wa=ve.menus)==null?void 0:wa.length)-1)),ve})}g={filter:(ca=(ee=g==null?void 0:g.compData)==null?void 0:ee.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:ca.contents,key:g==null?void 0:g.comp,name:S,tableColumns:H,tableContents:R,menuFilter:g==null?void 0:g.menuFilter,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}else{let R=(Se=(ta=(ue=g==null?void 0:g.compData)==null?void 0:ue.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:ta.contents)==null?void 0:Se.map(X=>(X==null?void 0:X.value)??"");R=[R];let H=(We=(Ne=(te=g==null?void 0:g.compData)==null?void 0:te.find(X=>(X==null?void 0:X.key)==="formContent"))==null?void 0:Ne.contents)==null?void 0:We.map(X=>(X.value="",X));g={contents:R,filter:(Ya=(sa=g==null?void 0:g.compData)==null?void 0:sa.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:Ya.contents,key:g==null?void 0:g.comp,name:S,value:H,fatherSyncContents:g==null?void 0:g.fatherSyncContents,relatedQuotes:g==null?void 0:g.relatedQuotes,sonSyncContents:g==null?void 0:g.sonSyncContents}}return g.isShow=!1,g}),E=await Promise.all(E);let x=[{key:"menuPath",contents:[{path:a,fatherPath:(k=(M=(C=L==null?void 0:L.data)==null?void 0:C.result)==null?void 0:M[0])==null?void 0:k.father_name,isShow:!1}]},{key:a,contents:E}];await A.createPlatFormDataApi({platId:parseInt((W=on==null?void 0:on.value)==null?void 0:W.plat_id),changeData:x});let w=await A.getPageDataApi({platId:parseInt((I=on==null?void 0:on.value)==null?void 0:I.plat_id),pageName:a});o=(j=w==null?void 0:w.data)==null?void 0:j.result}}l&&await cc(o,!!(n!=null&&n.originPath));let s=await ts(o,n);return l&&(s=await Gp(s)),s==null?void 0:s.filter(L=>L)},us=async a=>{var r,o,s,h,c,d,m,b,u,C,M;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(o=a.value)==null?void 0:o.split(" "))==null?void 0:s[0]));let n=await Gr(l,!1);if(n=(h=n==null?void 0:n.filter(k=>{var W,I;return(k==null?void 0:k.name)===((I=a==null?void 0:a.groups)==null?void 0:I[((W=a==null?void 0:a.groups)==null?void 0:W.length)-1])}))==null?void 0:h[0],(d=(c=n==null?void 0:n.compData)==null?void 0:c.find(k=>(k==null?void 0:k.key)==="tableContents"))!=null&&d.contents){n=(b=(m=n==null?void 0:n.compData)==null?void 0:m.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:b.contents;let k=((u=a==null?void 0:a.words)==null?void 0:u[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(W=>{var I,j,L,E;return(W==null?void 0:W[a!=null&&a.endChildMenu?k:(I=a==null?void 0:a.words)==null?void 0:I[0]])===(a!=null&&a.relatedWords&&((j=a==null?void 0:a.relatedWords)==null?void 0:j.length)>0?(E=(L=a.value)==null?void 0:L.split(" "))==null?void 0:E[0]:a.value)}),n==null?void 0:n[0]}else{let k=(M=(C=n==null?void 0:n.compData)==null?void 0:C.find(I=>(I==null?void 0:I.key)==="formContent"))==null?void 0:M.contents,W={};return k==null||k.forEach(I=>{W[I.prop]=I.value}),W}},Yp={key:0,class:"extra-button-content"},Jp={class:"table-operator-wrap"},Xp={key:0,class:"extra-button-filter"},Zp={key:1,class:"extra-header"},Qp=["onClick"],ef={class:"table-op-text"},af={class:"table-op-text"},lf={class:"drop-menu",style:{width:"120px"}},rf=["onClick"],nf={key:0},of={key:1},tf=["onClick"],sf={class:"table-op-text"},cf={key:1,class:"extra-button-content tabs-button-wrapper"},uf={class:"table-operator-wrap"},df={class:"extra-button-filter"},pf={key:0,class:"extra-header"},ff={class:"table-op-action"},hf={class:"table-op-text"},vf={class:"drop-menu",style:{width:"120px"}},mf={key:0},yf={key:1},gf=["onClick"],bf={class:"table-op-text"},kf={__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:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const n=l,r=a,o=()=>{const $=(r==null?void 0:r.menuFilter)||[];return Array.isArray($)&&($==null?void 0:$.some(V=>{const ae=typeof V=="string"?V:JSON.stringify(V);return ae==null?void 0:ae.includes("HideGroup=Yes")}))},s=e.ref(""),h=e.ref(!1),c=e.ref(!1),d=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),b=[{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 u($,V){return $.map(ae=>{const Z={...ae};return V.forEach(be=>{delete Z[be]}),Z})}function C($){if(!$||$.t!=="n")return($==null?void 0:$.v)??"";const V=$.v;if($.z){const ae=String($.z).toLowerCase(),Z=["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 F of Z)if(ae.includes(F))return M(V);const be=/[ymdhms]/.test(ae),ze=/^[0#\.\,\s]+$/.test(ae.replace(/[\\\/\-:]/g,""));if(be&&!ze)return M(V)}if(V>=1&&V<=73050){if(V<5e3)return V;if(V>=5e3&&V<4e4){const ae=Math.floor((V-25569)/365.25)+1970;return ae>=1970&&ae<=2e3&&$.z&&/[ymd]/.test(String($.z).toLowerCase())?M(V):V}if(V>=4e4)return M(V)}return V}function M($){if(typeof $!="number")return $;try{const V=new Date(($-25569)*86400*1e3);if(isNaN(V.getTime()))return $;const ae=V.getFullYear(),Z=String(V.getMonth()+1).padStart(2,"0"),be=String(V.getDate()).padStart(2,"0");return`${ae}-${Z}-${be}`}catch{return $}}const k=$=>{const V=$.raw;if(!V)return;const ae=new FileReader;ae.onload=Z=>{try{const be=new Uint8Array(Z.target.result),ze=ce.readSync(be,{type:"array"}),F=ze.SheetNames[0],ne=ze.Sheets[F],se=ce.utils.decode_range(ne["!ref"]).e.c+1,Be=new Array(se).fill(""),$e=[];for(const De in ne){if(De[0]==="!")continue;const{r:Ie,c:je}=ce.utils.decode_cell(De),la=ne[De];let Ta=C(la);if((Ta==null||Ta==="")&&(Ta=""),Ie===0)Be[je]=Ta;else{if(!$e[Ie-1]){$e[Ie-1]={};for(let ee=0;ee<se;ee++)$e[Ie-1][`col_${ee}`]=""}$e[Ie-1][`col_${je}`]=Ta}}for(let De=0;De<se;De++)Be[De]===void 0&&(Be[De]="");const fe=[];for(let De=0;De<Be.length;De++)(!Be[De]||Be[De].toString().trim()==="")&&fe.push(De);let N,oe;(fe==null?void 0:fe.length)>0?(Ua.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),N=Be.filter((De,Ie)=>!fe.includes(Ie)),oe=u($e,fe==null?void 0:fe.map(De=>`col_${De}`))):(N=Be,oe=$e);const U=$e==null?void 0:$e[0];if(!(U!=null&&U.hasOwnProperty("col_0")))return Ua.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",N,oe)}catch(be){throw Ua.ElMessage.error(be.message),new Error(be.message)}},ae.readAsArrayBuffer(V)},W=$=>{var ae;const V=(ae=d.value)==null?void 0:ae.reduce((Z,be,ze)=>(ze===0?Z[be.label]=$:Z[be.label]=be==null?void 0:be.value,Z),{});n("filter",V,$,!0)},I=($,V={})=>{n("buttonClick",$,"",V)},j=$=>{var V,ae;d.value=(ae=(V=ce.getColumnChild(A.cloneDeep($)))==null?void 0:V.filter(Z=>(Z==null?void 0:Z.label)!==""&&(Z==null?void 0:Z.label)!=="操作"))==null?void 0:ae.map(Z=>({label:(Z==null?void 0:Z.label)??"",value:"",name:(Z==null?void 0:Z.prop)??"",isFormColHidden:Z==null?void 0:Z.isTableColHidden,width:2,prop:(Z==null?void 0:Z.prop)??""}))},L=e.ref(!1),E=$=>{var V;if(($==null?void 0:$.buttonName)==="确认"&&(n("filter",$==null?void 0:$.content),L.value=($==null?void 0:$.content)&&Object.values($==null?void 0:$.content).length>0),($==null?void 0:$.buttonName)==="清空"){const ae=A.cloneDeep($==null?void 0:$.content);for(const Z in ae)ae[Z]="";d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""})),n("filter",ae),L.value=!1}h.value=!1},x=()=>{h.value=!h.value,c.value=!0},w=()=>{var V,ae;d.value=(V=d.value)==null?void 0:V.map(Z=>({...Z,value:""}));const $=(ae=d.value)==null?void 0:ae.reduce((Z,be)=>(Z[be.label]=be.value,Z),{});n("filter",$)},g=e.ref(null);let S;return S=$=>{var be;if(!h.value)return;const V=(be=g==null?void 0:g.value)==null?void 0:be.$el,ae=V==null?void 0:V.contains($.target);let Z=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(ze=>{ze.contains($.target)&&(Z=!0)}),!ae&&!Z&&(h.value=!1)},e.onMounted(()=>{document.addEventListener("click",S),j(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",S)}),e.watch(()=>r.columns,()=>{j(r.columns)},{deep:!0,immediate:!0}),($,V)=>{var ne,J,se,Be,$e,fe,N,oe;const ae=e.resolveComponent("el-icon"),Z=e.resolveComponent("svg-icon"),be=e.resolveComponent("el-input"),ze=e.resolveComponent("el-upload"),F=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Yp,[o()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Jp,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",Xp,[e.createVNode($u,{trigger:"contextmenu",ref_key:"popOverRef",ref:g,title:"",width:800,placement:"bottom-start",isVisible:h.value,"onUpdate:isVisible":V[4]||(V[4]=U=>h.value=U)},{reference:e.withCtx(()=>{var U,De,Ie,je;return[e.createVNode(be,{modelValue:s.value,"onUpdate:modelValue":V[0]||(V[0]=la=>s.value=la),style:{"min-width":"80px"},placeholder:L.value?(Ie=(De=(U=a.filterValues)==null?void 0:U.filter(la=>la))==null?void 0:De.slice(0,3))==null?void 0:Ie.join("/"):"搜索","prefix-icon":e.unref(Ua.search_default),clearable:"",onInput:W,disabled:((je=d.value)==null?void 0:je.length)===0},{suffix:e.withCtx(()=>{var la,Ta;return[!s.value&&((Ta=(la=a.filterValues)==null?void 0:la.filter(ee=>ee))!=null&&Ta.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-content-value",onKeydown:V[1]||(V[1]=e.withModifiers(()=>{},["stop"])),onKeyup:V[2]||(V[2]=e.withModifiers(()=>{},["stop"])),onKeypress:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:E},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((ne=a.buttons)==null?void 0:ne.length)>0?(e.openBlock(),e.createElementBlock("div",Zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=a.buttons)==null?void 0:J.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,De)=>{var Ie;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:De},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var je;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:la=>I(U==null?void 0:U.label)},[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"]),e.createElementVNode("span",ef,e.toDisplayString(U==null?void 0:U.label),1)],10,Qp)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(nl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var je;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"]),e.createElementVNode("span",af,e.toDisplayString(U==null?void 0:U.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",lf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,je=>{var la,Ta;return e.openBlock(),e.createElementBlock("div",{key:je==null?void 0:je.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ee=>!a.lockingPage&&I(je==null?void 0:je.label)},[e.createTextVNode(e.toDisplayString(je==null?void 0:je.label),1),(la=je==null?void 0:je.label)!=null&&la.includes("选中")?(e.openBlock(),e.createElementBlock("span",nf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=je==null?void 0:je.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",of,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,rf)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:je=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:((Ie=b==null?void 0:b.find(je=>(je==null?void 0:je.label)===(U==null?void 0:U.label)))==null?void 0:Ie.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",sf,e.toDisplayString(U==null?void 0:U.label),1)],10,tf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",cf,[e.createElementVNode("div",uf,[e.createElementVNode("div",df,[e.createVNode(be,{modelValue:s.value,"onUpdate:modelValue":V[5]||(V[5]=U=>s.value=U),style:{"min-width":"80px"},placeholder:L.value?($e=(Be=(se=a.filterValues)==null?void 0:se.filter(U=>U))==null?void 0:Be.slice(0,3))==null?void 0:$e.join("/"):"搜索","prefix-icon":e.unref(Ua.search_default),clearable:"",onInput:W,disabled:((fe=d.value)==null?void 0:fe.length)===0},{suffix:e.withCtx(()=>{var U,De;return[!s.value&&((De=(U=a.filterValues)==null?void 0:U.filter(Ie=>Ie))!=null&&De.join("/"))?(e.openBlock(),e.createBlock(ae,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(x,["stop"])},[e.createVNode(Z,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((N=a.buttons)==null?void 0:N.length)>0?(e.openBlock(),e.createElementBlock("div",pf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=a.buttons)==null?void 0:oe.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,De)=>{var Ie;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:De},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":k,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var je;return[e.createElementVNode("div",ff,[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"]),e.createElementVNode("span",hf,e.toDisplayString(U==null?void 0:U.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(nl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(F,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var je;return[e.createVNode(Z,{class:"table-op-icon",name:(je=b==null?void 0:b.find(la=>(la==null?void 0:la.label)===(U==null?void 0:U.label)))==null?void 0:je.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",vf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,je=>(e.openBlock(),e.createBlock(F,{key:je==null?void 0:je.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:la=>I(je==null?void 0:je.label)},{default:e.withCtx(()=>{var la,Ta;return[e.createTextVNode(e.toDisplayString(je==null?void 0:je.label),1),(la=je==null?void 0:je.label)!=null&&la.includes("选中")?(e.openBlock(),e.createElementBlock("span",mf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ta=je==null?void 0:je.label)!=null&&Ta.includes("全部")?(e.openBlock(),e.createElementBlock("span",yf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:je=>!a.lockingPage&&I(U==null?void 0:U.label,U)},[e.createVNode(Z,{class:"table-op-icon",name:(Ie=b==null?void 0:b.find(je=>(je==null?void 0:je.label)===(U==null?void 0:U.label)))==null?void 0:Ie.icon},null,8,["name"]),e.createElementVNode("span",bf,e.toDisplayString(U==null?void 0:U.label),1)],10,gf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},xf=Xl._export_sfc(kf,[["__scopeId","data-v-44a17652"]]),wf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=e.resolveComponent("el-table-column"),o=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(o,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var h;return e.openBlock(),e.createBlock(r,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((h=s==null?void 0:s.label)==null?void 0:h.length)*2||4)*27)},{default:e.withCtx(c=>[e.renderSlot(l.$slots,"content",{row:c.row,column:c.column,$index:c.$index,scope:c}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(d,m)=>(e.openBlock(),e.createBlock(nl._sfc_main$2,{key:m,column:d,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(b,u)=>({name:u,fn:e.withCtx(({row:C,slotData:M,item:k,column:W})=>[e.renderSlot(l.$slots,u,e.mergeProps({ref_for:!0},M??C,{item:k??d,slotData:M??C,row:C,column:W,columnProp:d}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class _f extends Tl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,o){const s=this,h=new Tl.FileLoader(s.manager);h.setPath(s.path),h.setResponseType("arraybuffer"),h.setRequestHeader(s.requestHeader),h.setWithCredentials(s.withCredentials),h.load(l,function(c){try{n(s.parse(c))}catch(d){o?o(d):console.error(d),s.manager.itemError(l)}},r,o)}_getDataView(l,n,r,o){switch(r){case"F":return o===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return o===1?l.getInt8(n):o===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return o===1?l.getUint8(n):o===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(M,k){const W=M.length,I=new Uint8Array(k);let j=0,L=0,E,x,w;do if(E=M[j++],E<32){if(E++,L+E>k)throw new Error("Output buffer is not large enough");if(j+E>W)throw new Error("Invalid compressed data");do I[L++]=M[j++];while(--E)}else{if(x=E>>5,w=L-((E&31)<<8)-1,j>=W)throw new Error("Invalid compressed data");if(x===7&&(x+=M[j++],j>=W))throw new Error("Invalid compressed data");if(w-=M[j++],L+x+2>k)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=L)throw new Error("Invalid compressed data");do I[L++]=I[w++];while(--x+2)}while(j<W);return I}function r(M){const k={},W=new Uint8Array(M);let I="",j="",L=0,E=!1;const x=W.length;for(;L<x&&E===!1;){const $=String.fromCharCode(W[L++]);$===`
2
2
  `||$==="\r"?(j.trim().toLowerCase().startsWith("data")&&(E=!0),j=""):j+=$,I+=$}const w=I.search(/[\r\n]DATA\s(\S*)\s/i),g=/[\r\n]DATA\s(\S*)\s/i.exec(I.slice(w-1));if(k.data=g[1],k.headerLen=g[0].length+w,k.str=I.slice(0,k.headerLen),k.str=k.str.replace(/#.*/gi,""),k.version=/^VERSION (.*)/im.exec(k.str),k.fields=/^FIELDS (.*)/im.exec(k.str),k.size=/^SIZE (.*)/im.exec(k.str),k.type=/^TYPE (.*)/im.exec(k.str),k.count=/^COUNT (.*)/im.exec(k.str),k.width=/^WIDTH (.*)/im.exec(k.str),k.height=/^HEIGHT (.*)/im.exec(k.str),k.viewpoint=/^VIEWPOINT (.*)/im.exec(k.str),k.points=/^POINTS (.*)/im.exec(k.str),k.version!==null&&(k.version=parseFloat(k.version[1])),k.fields=k.fields!==null?k.fields[1].split(" "):[],k.type!==null&&(k.type=k.type[1].split(" ")),k.width!==null&&(k.width=parseInt(k.width[1])),k.height!==null&&(k.height=parseInt(k.height[1])),k.viewpoint!==null&&(k.viewpoint=k.viewpoint[1]),k.points!==null&&(k.points=parseInt(k.points[1],10)),k.points===null&&(k.points=k.width*k.height),k.size!==null&&(k.size=k.size[1].split(" ").map(function($){return parseInt($,10)})),k.count!==null)k.count=k.count[1].split(" ").map(function($){return parseInt($,10)});else{k.count=[];for(let $=0,V=k.fields.length;$<V;$++)k.count.push(1)}k.offset={};let S=0;for(let $=0,V=k.fields.length;$<V;$++)k.data==="ascii"?k.offset[k.fields[$]]=$:(k.offset[k.fields[$]]=S,S+=k.size[$]*k.count[$]);return k.rowSize=S,k}const o=r(l),s=[],h=[],c=[],d=[],m=[],b=new Tl.Color;if(o.data==="ascii"){const M=o.offset,I=new TextDecoder().decode(l).slice(o.headerLen).split(`
3
- `);for(let j=0,L=I.length;j<L;j++){if(I[j]==="")continue;const E=I[j].split(" ");if(M.x!==void 0&&(s.push(parseFloat(E[M.x])),s.push(parseFloat(E[M.y])),s.push(parseFloat(E[M.z]))),M.rgb!==void 0){const x=o.fields.findIndex(Z=>Z==="rgb"),w=o.type[x],g=parseFloat(E[M.rgb]);let S=g;if(w==="F"){const Z=new Float32Array(1);Z[0]=g,S=new Int32Array(Z.buffer)[0]}const $=(S>>16&255)/255,V=(S>>8&255)/255,ae=(S>>0&255)/255;b.setRGB($,V,ae,Tl.SRGBColorSpace),c.push(b.r,b.g,b.b)}M.normal_x!==void 0&&(h.push(parseFloat(E[M.normal_x])),h.push(parseFloat(E[M.normal_y])),h.push(parseFloat(E[M.normal_z]))),M.intensity!==void 0&&d.push(parseFloat(E[M.intensity])),M.label!==void 0&&m.push(parseInt(E[M.label]))}}if(o.data==="binary_compressed"){const M=new Uint32Array(l.slice(o.headerLen,o.headerLen+8)),k=M[0],W=M[1],I=n(new Uint8Array(l,o.headerLen+8,k),W),j=new DataView(I.buffer),L=o.offset;for(let E=0;E<o.points;E++){if(L.x!==void 0){const x=o.fields.indexOf("x"),w=o.fields.indexOf("y"),g=o.fields.indexOf("z");s.push(this._getDataView(j,o.points*L.x+o.size[x]*E,o.type[x],o.size[x])),s.push(this._getDataView(j,o.points*L.y+o.size[w]*E,o.type[w],o.size[w])),s.push(this._getDataView(j,o.points*L.z+o.size[g]*E,o.type[g],o.size[g]))}if(L.rgb!==void 0){const x=o.fields.indexOf("rgb"),w=j.getUint8(o.points*L.rgb+o.size[x]*E+2)/255,g=j.getUint8(o.points*L.rgb+o.size[x]*E+1)/255,S=j.getUint8(o.points*L.rgb+o.size[x]*E+0)/255;b.setRGB(w,g,S,Tl.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(L.normal_x!==void 0){const x=o.fields.indexOf("normal_x"),w=o.fields.indexOf("normal_y"),g=o.fields.indexOf("normal_z");h.push(this._getDataView(j,o.points*L.normal_x+o.size[x]*E,o.type[x],o.size[x])),h.push(this._getDataView(j,o.points*L.normal_y+o.size[w]*E,o.type[w],o.size[w])),h.push(this._getDataView(j,o.points*L.normal_z+o.size[g]*E,o.type[g],o.size[g]))}if(L.intensity!==void 0){const x=o.fields.indexOf("intensity");d.push(this._getDataView(j,o.points*L.intensity+o.size[x]*E,o.type[x],o.size[x]))}if(L.label!==void 0){const x=o.fields.indexOf("label");m.push(j.getInt32(o.points*L.label+o.size[x]*E,this.littleEndian))}}}if(o.data==="binary"){const M=new DataView(l,o.headerLen),k=o.offset;for(let W=0,I=0;W<o.points;W++,I+=o.rowSize){if(k.x!==void 0){const j=o.fields.indexOf("x"),L=o.fields.indexOf("y"),E=o.fields.indexOf("z");s.push(this._getDataView(M,I+k.x,o.type[j],o.size[j])),s.push(this._getDataView(M,I+k.y,o.type[L],o.size[L])),s.push(this._getDataView(M,I+k.z,o.type[E],o.size[E]))}if(k.rgb!==void 0){const j=M.getUint8(I+k.rgb+2)/255,L=M.getUint8(I+k.rgb+1)/255,E=M.getUint8(I+k.rgb+0)/255;b.setRGB(j,L,E,Tl.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(k.normal_x!==void 0){const j=o.fields.indexOf("normal_x"),L=o.fields.indexOf("normal_y"),E=o.fields.indexOf("normal_z");h.push(this._getDataView(M,I+k.normal_x,o.type[j],o.size[j])),h.push(this._getDataView(M,I+k.normal_y,o.type[L],o.size[L])),h.push(this._getDataView(M,I+k.normal_z,o.type[E],o.size[E]))}if(k.intensity!==void 0){const j=o.fields.indexOf("intensity");d.push(this._getDataView(M,I+k.intensity,o.type[j],o.size[j]))}k.label!==void 0&&m.push(M.getInt32(I+k.label,this.littleEndian))}}const u=new Tl.BufferGeometry;s.length>0&&u.setAttribute("position",new Tl.Float32BufferAttribute(s,3)),h.length>0&&u.setAttribute("normal",new Tl.Float32BufferAttribute(h,3)),c.length>0&&u.setAttribute("color",new Tl.Float32BufferAttribute(c,3)),d.length>0&&u.setAttribute("intensity",new Tl.Float32BufferAttribute(d,1)),m.length>0&&u.setAttribute("label",new Tl.Int32BufferAttribute(m,1)),u.computeBoundingSphere();const C=new Tl.PointsMaterial({size:.005});return c.length>0&&(C.vertexColors=!0),new Tl.Points(u,C)}}const Sf=A.useModelComp(A.pinia),{systemPath:ds}=A.storeToRefs(Sf),vo=e.ref(),ps=new WeakMap;function Ef(a,l,n,r,o){const s=async C=>{try{const M=await A.platformDownloadFile({url:C});if(M.status!==200)throw new Error(`下载失败: ${M.status}`);return M.data}catch(M){throw console.error("addModelFromUrl失败:",M),M}},h=C=>new Promise((M,k)=>{const W=new FileReader;W.onload=I=>{try{const j=I.target.result,E=new Mn.MTLLoader().parse(j);E.preload(),M(E)}catch(j){k(j)}},W.onerror=()=>{k(new Error("MTL文件读取失败"))},W.readAsText(C)}),c=async C=>{const M={materials:{},create:function(k){return this.materials[k]?this.materials[k]:(console.warn(`Material '${k}' not found, using default material`),new Tl.MeshPhongMaterial({color:8947848,side:Tl.DoubleSide}))},getAsArray:function(){const k=[];for(const W in this.materials)k.push(this.materials[W]);return k},preload:function(){for(const k in this.materials)this.materials[k].map&&(this.materials[k].map.needsUpdate=!0)}};for(const k of C){const W=await h(k);Object.assign(M.materials,W.materials)}return M.preload(),M},d=async(C,M=[])=>new Promise((k,W)=>{const I=new FileReader;I.onload=async j=>{try{const L=j.target.result;let E=null;M&&M.length>0&&(M.length===1?E=await h(M[0]):E=await c(M));const x=new Mn.OBJLoader;E&&x.setMaterials(E);const w=x.parse(L);E||w.traverse(g=>{g.isMesh&&(g.material=new Tl.MeshPhongMaterial({color:8947848,side:Tl.DoubleSide}))}),k(w)}catch(L){W(L)}},I.onerror=()=>{W(new Error("OBJ文件读取失败"))},I.readAsText(C)}),m=async C=>{var M;try{n.value=!0;const{scene:k}=a();if(!k)throw new Error("Scene not initialized");o();const W=[];for(let I=0;I<C.length;I++){const j=C[I];r.value=`正在加载模型 ${I+1}/${C.length}...`;const L=await s(j.objUrl),E=((M=j.objUrl)==null?void 0:M.split("/").pop())||`model_${I}.obj`,x=new File([L],E,{type:L.type});let w=[];if(j.mtlUrls){const S=Array.isArray(j.mtlUrls)?j.mtlUrls:[j.mtlUrls];for(let $=0;$<S.length;$++){const V=S[$],ae=await s(V),Z=(V==null?void 0:V.split("/").pop())||`material_${I}_${$}.mtl`,ge=new File([ae],Z,{type:ae.type});w.push(ge)}}const g=await d(x,w);k.add(g),l.value.push(g),W.push(g)}return n.value=!1,W}catch(k){throw console.error("加载模型失败:",k),n.value=!1,k}},b=async(C,M,k=[],W=[])=>{let I;const j=C.toLowerCase();switch(j){case".txt":case".cpt":case".obj":const L=await M.text();if(j===".txt"||j===".cpt"){const ee=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,ue=[...L.matchAll(ee)].map(te=>({x:parseFloat(te[1]),y:parseFloat(te[2]),z:parseFloat(te[3])})),ta=new Tl.BufferGeometry,Se=ue.flatMap(te=>[te.x,te.y,te.z]);if(ta.setAttribute("position",new Tl.Float32BufferAttribute(Se,3)),j===".txt"){const te=new Tl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});I=new Tl.Points(ta,te)}else if(j===".cpt"){const te=new Tl.LineBasicMaterial({color:"#5B5C99",linewidth:100});I=new Tl.Line(ta,te)}}else if(j===".obj"){const ee=new Mn.OBJLoader;if(k&&k.length>0){const ca=new Mn.MTLLoader;for(const ue of k){const ta=await ue.text(),Se=ca.parse(ta);Se.preload(),ee.setMaterials(Se);break}}I=ee.parse(L),(!k||k.length===0)&&I.traverse(ca=>{ca.isMesh&&(ca.material=new Tl.MeshPhongMaterial({color:"#B3B3D4"})),ca instanceof Tl.Mesh&&(ca.material.side=Tl.DoubleSide)})}break;case".stl":const E=await M.arrayBuffer(),w=new Mn.STLLoader().parse(E),g=new Tl.MeshPhongMaterial({color:"#B3B3D4",side:Tl.DoubleSide});I=new Tl.Mesh(w,g);break;case".nc":const S=["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)"},V=new Tl.Group,ae=S.map(ee=>new Promise((ca,ue)=>{new Mn.STLLoader().load(ds.value===""?`/model/${ee}`:`${ds.value}\\${ee}`,Se=>{const te=new Tl.MeshPhongMaterial({color:$[ee]||"#B3B3D4",side:Tl.DoubleSide}),Ne=new Tl.Mesh(Se,te);ca(Ne)},void 0,ue)}));try{(await Promise.all(ae)).forEach(ca=>V.add(ca)),I=V}catch(ee){throw console.error("加载NC文件对应的STL文件失败:",ee),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const Z=new _f,ge=new Tl.Group;try{const ee=await Ua.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ca=new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),ue=await Ua.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ta=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"}),Se=await new Promise((Ne,We)=>{const sa=URL.createObjectURL(ca);Z.load(sa,Ya=>{const R=new Float32Array(Ya.geometry.attributes.position.count*3);for(let H=0;H<Ya.geometry.attributes.position.count;H++)R[H*3]=1,R[H*3+1]=0,R[H*3+2]=0;Ya.geometry.setAttribute("color",new Tl.BufferAttribute(R,3)),Ya.material.vertexColors=!0,Ya.scale.set(.3,.3,.3),URL.revokeObjectURL(sa),Ne(Ya)},void 0,We)}),te=await new Promise((Ne,We)=>{const sa=URL.createObjectURL(ta);Z.load(sa,Ya=>{const R=new Float32Array(Ya.geometry.attributes.position.count*3);for(let H=0;H<Ya.geometry.attributes.position.count;H++)R[H*3]=0,R[H*3+1]=1,R[H*3+2]=0;Ya.geometry.setAttribute("color",new Tl.BufferAttribute(R,3)),Ya.material.vertexColors=!0,Ya.scale.set(.3,.3,.3),URL.revokeObjectURL(sa),Ne(Ya)},void 0,We)});ge.add(Se),ge.add(te),I=ge}catch(ee){throw console.error("PCD文件加载失败:",ee),new Error("无法加载PCD文件")}break;case".urdf":const ze=URL.createObjectURL(M),F=new Iu.URDFLoader,ne="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",J={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},se=new WeakMap,Be=new WeakMap,$e=new WeakMap,fe=async ee=>{if(se.has(ee))return console.log(`从缓存加载: ${ee}`),se.get(ee);try{const ca=await Ua.axios.get(`${ne}/${ee}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),ue=new Blob([ca.data],{type:"application/octet-stream;charset=UTF-8"});return J.enableCache&&se.set(ee,ue),ue}catch(ca){throw console.error(`加载文件失败: ${ee}`,ca),new Error(`无法加载文件: ${ee}`)}},N=(ee="default")=>{if(Be.has(ee))return Be.get(ee);const ca=new Tl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Tl.FrontSide});return Be.set(ee,ca),ca},oe=ee=>{try{ee.isBufferGeometry&&ee.mergeVertices&&ee.mergeVertices(),ee.computeVertexNormals&&ee.computeVertexNormals(),ee.computeBoundingSphere&&ee.computeBoundingSphere(),ee.deleteAttribute&&ee.deleteAttribute("uv2")}catch(ca){console.warn("几何体优化失败,使用原始几何体:",ca)}return ee},U=async(ee,ca,ue)=>{const ta=`stl_${ca}`;if($e.has(ta)){const We=$e.get(ta);return new Tl.Mesh(We,N())}const Se=await ee.arrayBuffer();let Ne=new Mn.STLLoader(ue).parse(Se);return Ne=oe(Ne),$e.set(ta,Ne),new Tl.Mesh(Ne,N())},De=async(ee,ca,ue)=>{const ta=`obj_${ca}`;if(se.has(ta))return se.get(ta).clone();const Se=await ee.text(),te=new Mn.OBJLoader(ue),Ne=ca.replace(".obj",".mtl");try{const Ya=await(await fe(Ne)).text(),H=new Mn.MTLLoader(ue).parse(Ya);H.preload(),te.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Ne}`)}const We=te.parse(Se);return We.traverse(sa=>{sa.isMesh&&(sa.geometry=oe(sa.geometry),sa.castShadow=!0,sa.receiveShadow=!0,sa.renderOrder=1)}),se.set(ta,We),We},Ie=(ee,ca)=>{const ue=new Tl.LOD;if(ue.addLevel(ee,0),ee.geometry){const ta=ee.geometry.clone(),Se=new Tl.Mesh(ta,ee.material);ue.addLevel(Se,50)}return ue};let je=0,la=0;const Ta=[];F.loadMeshCb=async(ee,ca,ue,ta,Se)=>{const te=ee.split("/").pop(),Ne=ue||(()=>{});je++;const We=new Promise(async(sa,Ya)=>{try{const R=await fe(te);if(!R||R.size===0)throw new Error(`文件为空: ${te}`);const H=te.split(".").pop().toLowerCase();let X;switch(H){case"stl":X=await U(R,te,ca);break;case"obj":X=await De(R,te,ca);break;default:throw new Error(`不支持的文件格式: ${H}`)}J.enableLOD&&X.isMesh&&(X=Ie(X,te)),Ne(X),la++,ta&&ta({loaded:la,total:je,progress:la/je}),sa(X)}catch(R){console.error(`mesh文件加载失败: ${te}`,R);const H=new Tl.Group;Ne(H),sa(H);const X=new Tl.BoxGeometry(.1,.1,.1),ve=new Tl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Tl.Mesh(X,ve)}});Ta.push(We)};try{if(!ze){vo.value=void 0;break}if(I=await F.loadAsync(ze),console.log(`URDF文件加载完成,等待${je}个mesh文件加载...`),Ta.length>0)try{await Promise.allSettled(Ta),console.log(`所有mesh文件处理完成,成功加载: ${la}/${je}`)}catch(ue){console.warn("部分mesh文件加载失败,但继续显示模型",ue)}I.traverse(ue=>{ue.isMesh&&(ue.castShadow=!0,ue.receiveShadow=!0,ue.renderOrder=1,ue.material&&(ue.material.needsUpdate=!0))}),console.time("计算包围盒");const ee=new Tl.Box3;ee.expandByObject(I);const ca=`urdf_${Date.now()}`;I.userData.boundingBox=ee.clone(),I.userData.modelId=ca,ps.set(ca,{box:ee.clone(),center:ee.getCenter(new Tl.Vector3),size:ee.getSize(new Tl.Vector3),maxSize:Math.max(...ee.getSize(new Tl.Vector3).toArray())}),vo.value=I,console.log("URDF模型加载完成并优化")}catch(ee){console.error("URDF加载失败:",ee),vo.value=void 0}finally{ze&&URL.revokeObjectURL(ze)}break;default:throw new Error(`不支持的文件格式: ${C}`)}return I};return{addModelsFromUrls:m,loadModelByDefaultPath:async C=>{console.log(C);try{n.value=!0,r.value="正在加载模型...";const{scene:M}=a();if(!M)throw new Error("Scene not initialized");o(),await new Promise(W=>setTimeout(W,100));const k=[];for(let W=0;W<C.length;W++){const I=C[W],j=await b(I.suffix,I.blob,I.mtlBlobs||[],I.meshFiles||[]);j&&(M.add(j),l.value.push(j),k.push(j))}return n.value=!1,r.value="",k}catch(M){throw console.error("加载模型失败:",M),n.value=!1,r.value="",M}},urdfModel:vo,modelBoundingBoxes:ps}}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>',(a=>{var l=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,o,s,h,c,d=function(u,C){C.parentNode.insertBefore(u,C)};if(l&&!a.__iconfont__svg__cssinject__){a.__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(u){console&&console.log(u)}}r=function(){var u,C=document.createElement("div");C.innerHTML=a._iconfont_svg_string_4827314,(C=C.getElementsByTagName("svg")[0])&&(C.setAttribute("aria-hidden","true"),C.style.position="absolute",C.style.width=0,C.style.height=0,C.style.overflow="hidden",C=C,(u=document.body).firstChild?d(C,u.firstChild):u.appendChild(C))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),r()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(s=r,h=a.document,c=!1,b(),h.onreadystatechange=function(){h.readyState=="complete"&&(h.onreadystatechange=null,m())})}function m(){c||(c=!0,s())}function b(){try{h.documentElement.doScroll("left")}catch{return void setTimeout(b,50)}m()}})(window);const Cf=["onClick"],Df=e.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:""}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(null),s=e.ref(null),h=e.computed(()=>{const x=Number(n==null?void 0:n.textSize),w=ce.rgbaToColor(n==null?void 0:n.textColor),g={},S={};return!Number.isNaN(x)&&x&&(g.fontSize=`${x}px`,S.fontSize=`${x}px`),w&&(g.color=w,S.color=w),{label:g,value:S}}),c=e.ref(""),d=e.ref(""),m=e.ref(!1),b=async x=>{if(x){d.value&&(URL.revokeObjectURL(d.value),d.value="");try{const w=await A.platformDownloadFile({url:x}),g=new Blob([w==null?void 0:w.data],{type:(w==null?void 0:w.headers["content-type"])||"image/*"});d.value=URL.createObjectURL(g)}catch{d.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,x=>{x&&(c.value=x)},{immediate:!0}),e.watch(c,x=>{b(x)},{immediate:!0});const u=()=>{var x;(x=s.value)==null||x.click()},C=async x=>{var S,$,V;const w=x.target,g=(S=w==null?void 0:w.files)==null?void 0:S[0];if(!g){w.value="";return}m.value=!0;try{const ae=new FormData;ae.append("file",g);const Z=await A.platformUploadFile(ae),ge=(V=($=Z==null?void 0:Z.data)==null?void 0:$.result)==null?void 0:V.url;ge?(c.value=ge,r("update:backGroundImage",ge),b(ge),Ua.ElMessage.success("背景图片上传成功")):Ua.ElMessage.error("背景图片上传失败")}catch{Ua.ElMessage.error("背景图片上传失败")}finally{m.value=!1,w.value=""}},M=e.computed(()=>{var x;return d.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(x=n==null?void 0:n.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),k=x=>nl.getComponent(x),W=x=>{if(!x)return;const w=x.querySelector("input, textarea, .el-input__inner");w&&typeof w.focus=="function"&&w.focus()},I=(x,w,g)=>{n.disabled||x.field&&(o.value=w,e.nextTick(()=>{W(g.currentTarget)}))},j=()=>{o.value=null},L=x=>{var g;const w=((g=x==null?void 0:x.field)==null?void 0:g.value)??(x==null?void 0:x.value);return w==null||w===""?"-":w},E=x=>{const w=x!=null&&x.width&&x.width>0?x.width:1,S=`calc((100% - ${(w-1)*16}px) / ${w})`;return{flex:`0 0 ${S}`,maxWidth:S,minWidth:"140px",boxSizing:"border-box"}};return(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(M.value),onClick:w[2]||(w[2]=g=>(n==null?void 0:n.backGround)&&u())},[n!=null&&n.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:w[0]||(w[0]=e.withModifiers(g=>u(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:C},null,544),w[3]||(w[3]=e.createElementVNode("img",{src:nl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.items,(g,S)=>{var $,V,ae,Z,ge,ze,F,ne;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:S,style:e.normalizeStyle(E(g)),onClick:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(h.value.label)},e.toDisplayString(g==null?void 0:g.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(h.value.value),onClick:J=>{var se;return(se=g.field)!=null&&se.isNoClick?null:I(g,S,J)}},[o.value===S&&g.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k((($=g.field)==null?void 0:$.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":J=>g.field.value=J,isEdit:!0,disabled:(V=g.field)==null?void 0:V.disabled,content:((ae=g.field)==null?void 0:ae.contents)??[],optionUrl:g.field,originalValue:(Z=g.field)==null?void 0:Z.value,config:(ge=g.field)==null?void 0:ge.config,configModel:((ze=g.field)==null?void 0:ze.prop)??((F=g.field)==null?void 0:F.name),selectedTagList:((ne=g.field)==null?void 0:ne.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(L(g)),1)],64))],12,Cf)],4)}),128))],4))}}),Bf=Xl._export_sfc(Df,[["__scopeId","data-v-af63fc22"]]),uc=A.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Tf={class:"calculator-content"},Nf={class:"calculator-child"},Af={class:"calculator-child"},zf=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),n=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(r,o)=>(e.openBlock(),e.createElementBlock("div",Tf,[e.createElementVNode("div",Nf,[e.createVNode(nl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Af,[e.createVNode(nl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Mf=Xl._export_sfc(zf,[["__scopeId","data-v-73db0fe7"]]),yt=(a,l)=>{let n=a,r=l;return Array.isArray(n)&&(n=n==null?void 0:n.map((o,s)=>{if(Array.isArray(o)){let h={};return o=o==null?void 0:o.forEach((c,d)=>{var m;(m=r==null?void 0:r[d])!=null&&m.prop?h[r[d].prop]=c:Array.isArray(c)&&(h.children=yt(c,r))}),Object.assign(h,{id:s})}else return o})),n},dc=(a,l,n)=>{let r=a,o=l;return r=r==null?void 0:r.map((s,h)=>{var c,d;return!Array.isArray(s)||!((c=o==null?void 0:o[h])!=null&&c.label)&&!n||(s.unshift(((d=o==null?void 0:o[h])==null?void 0:d.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var b;return Array.isArray(m)&&(m=dc(m,(b=o==null?void 0:o[h])==null?void 0:b.children,n)),m}))),s}),r},If=(a,l,n)=>{if(l==="")return a==null?void 0:a.filter(r=>(r==null?void 0:r.id)!==n);{const r=l.split("-");return Of(a,r,n)}},Of=(a,l,n)=>{let r=a,o=l;return(o==null?void 0:o.length)===0?r=r==null?void 0:r.filter(s=>s.id!==n):r=r==null?void 0:r.map(s=>(s.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),s=pc(s,o,n)),s)),r},pc=(a,l,n)=>{var s,h;let r=a,o=l;return(o==null?void 0:o.length)===0?r.children=(s=r.children)==null?void 0:s.filter(c=>c.id!==n):r.children=(h=r.children)==null?void 0:h.map(c=>(c.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),c=pc(c,o,n)),c)),r},Lf=(a,l,n)=>{if(l==="")return n;{const r=l.split("-");return Rf(a,r,n)}},Rf=(a,l,n)=>{let r=a,o=l;return(o==null?void 0:o.length)===0?r=n:r=r==null?void 0:r.map(s=>(s.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),s=fc(s,o,n)),s)),r},fc=(a,l,n)=>{var s;let r=a,o=l;return(o==null?void 0:o.length)===0?r.children=n:r.children=(s=r.children)==null?void 0:s.map(h=>(h.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),h=fc(h,o,n)),h)),r};class $f{constructor(l={}){en(this,"url");en(this,"heartbeatInterval");en(this,"socket",null);en(this,"isConnected",!1);en(this,"heartTimer",null);en(this,"canvas",null);en(this,"ctx",null);en(this,"mainCamCutMode",0);en(this,"pMainShowStartX",0);en(this,"pMainShowStartY",0);en(this,"onLog");en(this,"onDevCount");en(this,"onResolution");en(this,"onCameraStatus");en(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,n,r){var h;(h=this.canvas)!=null&&h.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const o=document.createElement("canvas");o.style.border="solid 1px #A0A0A0",o.id="MainCamCanvas",o.width=n,o.height=r;const s=o.getContext("2d");if(!s)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(o),this.canvas=o,this.ctx=s}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,n)=>{const r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>{this.socket=r,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},r.onerror=o=>{this.isConnected=!1,this.log("socket.onerror"),n(o)},r.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},r.onmessage=o=>{this.handleMessage(o)}})}destroy(){var l;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,(l=this.canvas)!=null&&l.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(l=0){this.sendBytes(new Uint8Array([119,136,81,l]))}chooseResolution(l){if(!Array.isArray(l)||l.length===0)return null;const n=l.find(o=>o.width===2592&&o.height===1944);return n||[...l].sort((o,s)=>s.width*s.height-o.width*o.height)[0]||null}openCamera(l=0,n=1280,r=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const o=new Uint8Array(12);o[0]=119,o[1]=136,o[2]=1,o[3]=l,o[4]=this.canvas.width>>8&255,o[5]=this.canvas.width&255,o[6]=this.canvas.height>>8&255,o[7]=this.canvas.height&255,o[8]=n>>8&255,o[9]=n&255,o[10]=r>>8&255,o[11]=r&255,this.sendBytes(o)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const o=new Uint8Array(12);o[0]=119,o[1]=136,o[2]=16,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=0,this.sendBytes(o)}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(l){var n;(n=this.onLog)==null||n.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var o,s,h,c,d,m;const n=new Uint8Array(l.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 r=n[2];if(r===80){const b=n[3],u=n.length-4,C=new Uint8Array(u);for(let W=0;W<u;W++)C[W]=n[4+W];const k=decodeURIComponent(this.byteToString(C)).split("|");(o=this.onDevCount)==null||o.call(this,b,k);return}if(r===81){const b=n[3]||0,u=[];for(let C=0;C<b;C++){const M=(n[4+C*4+0]||0)*256+(n[4+C*4+1]||0),k=(n[4+C*4+2]||0)*256+(n[4+C*4+3]||0);u.push({width:M,height:k,text:`${M}*${k}`})}(s=this.onResolution)==null||s.call(this,b,u);return}if(r===1){n[3]===1&&((h=this.onCameraStatus)==null||h.call(this,"opened")),n[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(r===16){if(n[3]===1){const u=n[4]*256+n[5],C=n[6]*65536+n[7]*256+n[8];let M="";if(u>0){const I=new Uint8Array(u);for(let j=0;j<u;j++)I[j]=n[9+j];M=decodeURIComponent(this.byteToString(I))}const k=new Uint8Array(C);for(let I=0;I<C;I++)k[I]=n[9+u+I];const W=this.uint8ArrayToString(k);(d=this.onPhoto)==null||d.call(this,{flag:0,imgPath:M,base64:W})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(r===204){if(!this.canvas||!this.ctx)return;const b=n[3]*256+n[4],u=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 C=this.ctx.createImageData(b,u);let M=11;for(let k=0;k<C.data.length;k+=4)C.data[k+0]=n[M],C.data[k+1]=n[M+1],C.data[k+2]=n[M+2],C.data[k+3]=255,M+=3;this.ctx.putImageData(C,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}byteToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}}const Vf={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"}},jf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Hf={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"}},Uf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},qf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},Wf=["src","onClick"],Kf=["onClick"],Gf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},Yf={class:"dialog-footer"},Jf=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(null),s=e.ref(!1),h=e.ref([]),c=e.ref(""),d=e.ref(!1),m=e.ref([]),b=new $f({url:"ws://127.0.0.1:22225"});function u(V,ae){var J;const Z=V.split(","),ge=((J=Z[0].match(/:(.*?);/))==null?void 0:J[1])??"image/jpeg",ze=atob(Z[1]);let F=ze.length;const ne=new Uint8Array(F);for(;F--;)ne[F]=ze.charCodeAt(F);return new File([ne],ae,{type:ge})}function C(){b.onLog=V=>{console.log("[GPY]",V)},b.onDevCount=(V,ae)=>{if(c.value+=`设备数量=${V},设备=${ae.join(",")}
3
+ `);for(let j=0,L=I.length;j<L;j++){if(I[j]==="")continue;const E=I[j].split(" ");if(M.x!==void 0&&(s.push(parseFloat(E[M.x])),s.push(parseFloat(E[M.y])),s.push(parseFloat(E[M.z]))),M.rgb!==void 0){const x=o.fields.findIndex(Z=>Z==="rgb"),w=o.type[x],g=parseFloat(E[M.rgb]);let S=g;if(w==="F"){const Z=new Float32Array(1);Z[0]=g,S=new Int32Array(Z.buffer)[0]}const $=(S>>16&255)/255,V=(S>>8&255)/255,ae=(S>>0&255)/255;b.setRGB($,V,ae,Tl.SRGBColorSpace),c.push(b.r,b.g,b.b)}M.normal_x!==void 0&&(h.push(parseFloat(E[M.normal_x])),h.push(parseFloat(E[M.normal_y])),h.push(parseFloat(E[M.normal_z]))),M.intensity!==void 0&&d.push(parseFloat(E[M.intensity])),M.label!==void 0&&m.push(parseInt(E[M.label]))}}if(o.data==="binary_compressed"){const M=new Uint32Array(l.slice(o.headerLen,o.headerLen+8)),k=M[0],W=M[1],I=n(new Uint8Array(l,o.headerLen+8,k),W),j=new DataView(I.buffer),L=o.offset;for(let E=0;E<o.points;E++){if(L.x!==void 0){const x=o.fields.indexOf("x"),w=o.fields.indexOf("y"),g=o.fields.indexOf("z");s.push(this._getDataView(j,o.points*L.x+o.size[x]*E,o.type[x],o.size[x])),s.push(this._getDataView(j,o.points*L.y+o.size[w]*E,o.type[w],o.size[w])),s.push(this._getDataView(j,o.points*L.z+o.size[g]*E,o.type[g],o.size[g]))}if(L.rgb!==void 0){const x=o.fields.indexOf("rgb"),w=j.getUint8(o.points*L.rgb+o.size[x]*E+2)/255,g=j.getUint8(o.points*L.rgb+o.size[x]*E+1)/255,S=j.getUint8(o.points*L.rgb+o.size[x]*E+0)/255;b.setRGB(w,g,S,Tl.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(L.normal_x!==void 0){const x=o.fields.indexOf("normal_x"),w=o.fields.indexOf("normal_y"),g=o.fields.indexOf("normal_z");h.push(this._getDataView(j,o.points*L.normal_x+o.size[x]*E,o.type[x],o.size[x])),h.push(this._getDataView(j,o.points*L.normal_y+o.size[w]*E,o.type[w],o.size[w])),h.push(this._getDataView(j,o.points*L.normal_z+o.size[g]*E,o.type[g],o.size[g]))}if(L.intensity!==void 0){const x=o.fields.indexOf("intensity");d.push(this._getDataView(j,o.points*L.intensity+o.size[x]*E,o.type[x],o.size[x]))}if(L.label!==void 0){const x=o.fields.indexOf("label");m.push(j.getInt32(o.points*L.label+o.size[x]*E,this.littleEndian))}}}if(o.data==="binary"){const M=new DataView(l,o.headerLen),k=o.offset;for(let W=0,I=0;W<o.points;W++,I+=o.rowSize){if(k.x!==void 0){const j=o.fields.indexOf("x"),L=o.fields.indexOf("y"),E=o.fields.indexOf("z");s.push(this._getDataView(M,I+k.x,o.type[j],o.size[j])),s.push(this._getDataView(M,I+k.y,o.type[L],o.size[L])),s.push(this._getDataView(M,I+k.z,o.type[E],o.size[E]))}if(k.rgb!==void 0){const j=M.getUint8(I+k.rgb+2)/255,L=M.getUint8(I+k.rgb+1)/255,E=M.getUint8(I+k.rgb+0)/255;b.setRGB(j,L,E,Tl.SRGBColorSpace),c.push(b.r,b.g,b.b)}if(k.normal_x!==void 0){const j=o.fields.indexOf("normal_x"),L=o.fields.indexOf("normal_y"),E=o.fields.indexOf("normal_z");h.push(this._getDataView(M,I+k.normal_x,o.type[j],o.size[j])),h.push(this._getDataView(M,I+k.normal_y,o.type[L],o.size[L])),h.push(this._getDataView(M,I+k.normal_z,o.type[E],o.size[E]))}if(k.intensity!==void 0){const j=o.fields.indexOf("intensity");d.push(this._getDataView(M,I+k.intensity,o.type[j],o.size[j]))}k.label!==void 0&&m.push(M.getInt32(I+k.label,this.littleEndian))}}const u=new Tl.BufferGeometry;s.length>0&&u.setAttribute("position",new Tl.Float32BufferAttribute(s,3)),h.length>0&&u.setAttribute("normal",new Tl.Float32BufferAttribute(h,3)),c.length>0&&u.setAttribute("color",new Tl.Float32BufferAttribute(c,3)),d.length>0&&u.setAttribute("intensity",new Tl.Float32BufferAttribute(d,1)),m.length>0&&u.setAttribute("label",new Tl.Int32BufferAttribute(m,1)),u.computeBoundingSphere();const C=new Tl.PointsMaterial({size:.005});return c.length>0&&(C.vertexColors=!0),new Tl.Points(u,C)}}const Sf=A.useModelComp(A.pinia),{systemPath:ds}=A.storeToRefs(Sf),vo=e.ref(),ps=new WeakMap;function Ef(a,l,n,r,o){const s=async C=>{try{const M=await A.platformDownloadFile({url:C});if(M.status!==200)throw new Error(`下载失败: ${M.status}`);return M.data}catch(M){throw console.error("addModelFromUrl失败:",M),M}},h=C=>new Promise((M,k)=>{const W=new FileReader;W.onload=I=>{try{const j=I.target.result,E=new Mn.MTLLoader().parse(j);E.preload(),M(E)}catch(j){k(j)}},W.onerror=()=>{k(new Error("MTL文件读取失败"))},W.readAsText(C)}),c=async C=>{const M={materials:{},create:function(k){return this.materials[k]?this.materials[k]:(console.warn(`Material '${k}' not found, using default material`),new Tl.MeshPhongMaterial({color:8947848,side:Tl.DoubleSide}))},getAsArray:function(){const k=[];for(const W in this.materials)k.push(this.materials[W]);return k},preload:function(){for(const k in this.materials)this.materials[k].map&&(this.materials[k].map.needsUpdate=!0)}};for(const k of C){const W=await h(k);Object.assign(M.materials,W.materials)}return M.preload(),M},d=async(C,M=[])=>new Promise((k,W)=>{const I=new FileReader;I.onload=async j=>{try{const L=j.target.result;let E=null;M&&M.length>0&&(M.length===1?E=await h(M[0]):E=await c(M));const x=new Mn.OBJLoader;E&&x.setMaterials(E);const w=x.parse(L);E||w.traverse(g=>{g.isMesh&&(g.material=new Tl.MeshPhongMaterial({color:8947848,side:Tl.DoubleSide}))}),k(w)}catch(L){W(L)}},I.onerror=()=>{W(new Error("OBJ文件读取失败"))},I.readAsText(C)}),m=async C=>{var M;try{n.value=!0;const{scene:k}=a();if(!k)throw new Error("Scene not initialized");o();const W=[];for(let I=0;I<C.length;I++){const j=C[I];r.value=`正在加载模型 ${I+1}/${C.length}...`;const L=await s(j.objUrl),E=((M=j.objUrl)==null?void 0:M.split("/").pop())||`model_${I}.obj`,x=new File([L],E,{type:L.type});let w=[];if(j.mtlUrls){const S=Array.isArray(j.mtlUrls)?j.mtlUrls:[j.mtlUrls];for(let $=0;$<S.length;$++){const V=S[$],ae=await s(V),Z=(V==null?void 0:V.split("/").pop())||`material_${I}_${$}.mtl`,be=new File([ae],Z,{type:ae.type});w.push(be)}}const g=await d(x,w);k.add(g),l.value.push(g),W.push(g)}return n.value=!1,W}catch(k){throw console.error("加载模型失败:",k),n.value=!1,k}},b=async(C,M,k=[],W=[])=>{let I;const j=C.toLowerCase();switch(j){case".txt":case".cpt":case".obj":const L=await M.text();if(j===".txt"||j===".cpt"){const ee=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,ue=[...L.matchAll(ee)].map(te=>({x:parseFloat(te[1]),y:parseFloat(te[2]),z:parseFloat(te[3])})),ta=new Tl.BufferGeometry,Se=ue.flatMap(te=>[te.x,te.y,te.z]);if(ta.setAttribute("position",new Tl.Float32BufferAttribute(Se,3)),j===".txt"){const te=new Tl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});I=new Tl.Points(ta,te)}else if(j===".cpt"){const te=new Tl.LineBasicMaterial({color:"#5B5C99",linewidth:100});I=new Tl.Line(ta,te)}}else if(j===".obj"){const ee=new Mn.OBJLoader;if(k&&k.length>0){const ca=new Mn.MTLLoader;for(const ue of k){const ta=await ue.text(),Se=ca.parse(ta);Se.preload(),ee.setMaterials(Se);break}}I=ee.parse(L),(!k||k.length===0)&&I.traverse(ca=>{ca.isMesh&&(ca.material=new Tl.MeshPhongMaterial({color:"#B3B3D4"})),ca instanceof Tl.Mesh&&(ca.material.side=Tl.DoubleSide)})}break;case".stl":const E=await M.arrayBuffer(),w=new Mn.STLLoader().parse(E),g=new Tl.MeshPhongMaterial({color:"#B3B3D4",side:Tl.DoubleSide});I=new Tl.Mesh(w,g);break;case".nc":const S=["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)"},V=new Tl.Group,ae=S.map(ee=>new Promise((ca,ue)=>{new Mn.STLLoader().load(ds.value===""?`/model/${ee}`:`${ds.value}\\${ee}`,Se=>{const te=new Tl.MeshPhongMaterial({color:$[ee]||"#B3B3D4",side:Tl.DoubleSide}),Ne=new Tl.Mesh(Se,te);ca(Ne)},void 0,ue)}));try{(await Promise.all(ae)).forEach(ca=>V.add(ca)),I=V}catch(ee){throw console.error("加载NC文件对应的STL文件失败:",ee),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const Z=new _f,be=new Tl.Group;try{const ee=await Ua.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ca=new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),ue=await Ua.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ta=new Blob([ue.data],{type:"application/octet-stream;charset=UTF-8"}),Se=await new Promise((Ne,We)=>{const sa=URL.createObjectURL(ca);Z.load(sa,Ya=>{const R=new Float32Array(Ya.geometry.attributes.position.count*3);for(let H=0;H<Ya.geometry.attributes.position.count;H++)R[H*3]=1,R[H*3+1]=0,R[H*3+2]=0;Ya.geometry.setAttribute("color",new Tl.BufferAttribute(R,3)),Ya.material.vertexColors=!0,Ya.scale.set(.3,.3,.3),URL.revokeObjectURL(sa),Ne(Ya)},void 0,We)}),te=await new Promise((Ne,We)=>{const sa=URL.createObjectURL(ta);Z.load(sa,Ya=>{const R=new Float32Array(Ya.geometry.attributes.position.count*3);for(let H=0;H<Ya.geometry.attributes.position.count;H++)R[H*3]=0,R[H*3+1]=1,R[H*3+2]=0;Ya.geometry.setAttribute("color",new Tl.BufferAttribute(R,3)),Ya.material.vertexColors=!0,Ya.scale.set(.3,.3,.3),URL.revokeObjectURL(sa),Ne(Ya)},void 0,We)});be.add(Se),be.add(te),I=be}catch(ee){throw console.error("PCD文件加载失败:",ee),new Error("无法加载PCD文件")}break;case".urdf":const ze=URL.createObjectURL(M),F=new Iu.URDFLoader,ne="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",J={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},se=new WeakMap,Be=new WeakMap,$e=new WeakMap,fe=async ee=>{if(se.has(ee))return console.log(`从缓存加载: ${ee}`),se.get(ee);try{const ca=await Ua.axios.get(`${ne}/${ee}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),ue=new Blob([ca.data],{type:"application/octet-stream;charset=UTF-8"});return J.enableCache&&se.set(ee,ue),ue}catch(ca){throw console.error(`加载文件失败: ${ee}`,ca),new Error(`无法加载文件: ${ee}`)}},N=(ee="default")=>{if(Be.has(ee))return Be.get(ee);const ca=new Tl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Tl.FrontSide});return Be.set(ee,ca),ca},oe=ee=>{try{ee.isBufferGeometry&&ee.mergeVertices&&ee.mergeVertices(),ee.computeVertexNormals&&ee.computeVertexNormals(),ee.computeBoundingSphere&&ee.computeBoundingSphere(),ee.deleteAttribute&&ee.deleteAttribute("uv2")}catch(ca){console.warn("几何体优化失败,使用原始几何体:",ca)}return ee},U=async(ee,ca,ue)=>{const ta=`stl_${ca}`;if($e.has(ta)){const We=$e.get(ta);return new Tl.Mesh(We,N())}const Se=await ee.arrayBuffer();let Ne=new Mn.STLLoader(ue).parse(Se);return Ne=oe(Ne),$e.set(ta,Ne),new Tl.Mesh(Ne,N())},De=async(ee,ca,ue)=>{const ta=`obj_${ca}`;if(se.has(ta))return se.get(ta).clone();const Se=await ee.text(),te=new Mn.OBJLoader(ue),Ne=ca.replace(".obj",".mtl");try{const Ya=await(await fe(Ne)).text(),H=new Mn.MTLLoader(ue).parse(Ya);H.preload(),te.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Ne}`)}const We=te.parse(Se);return We.traverse(sa=>{sa.isMesh&&(sa.geometry=oe(sa.geometry),sa.castShadow=!0,sa.receiveShadow=!0,sa.renderOrder=1)}),se.set(ta,We),We},Ie=(ee,ca)=>{const ue=new Tl.LOD;if(ue.addLevel(ee,0),ee.geometry){const ta=ee.geometry.clone(),Se=new Tl.Mesh(ta,ee.material);ue.addLevel(Se,50)}return ue};let je=0,la=0;const Ta=[];F.loadMeshCb=async(ee,ca,ue,ta,Se)=>{const te=ee.split("/").pop(),Ne=ue||(()=>{});je++;const We=new Promise(async(sa,Ya)=>{try{const R=await fe(te);if(!R||R.size===0)throw new Error(`文件为空: ${te}`);const H=te.split(".").pop().toLowerCase();let X;switch(H){case"stl":X=await U(R,te,ca);break;case"obj":X=await De(R,te,ca);break;default:throw new Error(`不支持的文件格式: ${H}`)}J.enableLOD&&X.isMesh&&(X=Ie(X,te)),Ne(X),la++,ta&&ta({loaded:la,total:je,progress:la/je}),sa(X)}catch(R){console.error(`mesh文件加载失败: ${te}`,R);const H=new Tl.Group;Ne(H),sa(H);const X=new Tl.BoxGeometry(.1,.1,.1),ve=new Tl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Tl.Mesh(X,ve)}});Ta.push(We)};try{if(!ze){vo.value=void 0;break}if(I=await F.loadAsync(ze),console.log(`URDF文件加载完成,等待${je}个mesh文件加载...`),Ta.length>0)try{await Promise.allSettled(Ta),console.log(`所有mesh文件处理完成,成功加载: ${la}/${je}`)}catch(ue){console.warn("部分mesh文件加载失败,但继续显示模型",ue)}I.traverse(ue=>{ue.isMesh&&(ue.castShadow=!0,ue.receiveShadow=!0,ue.renderOrder=1,ue.material&&(ue.material.needsUpdate=!0))}),console.time("计算包围盒");const ee=new Tl.Box3;ee.expandByObject(I);const ca=`urdf_${Date.now()}`;I.userData.boundingBox=ee.clone(),I.userData.modelId=ca,ps.set(ca,{box:ee.clone(),center:ee.getCenter(new Tl.Vector3),size:ee.getSize(new Tl.Vector3),maxSize:Math.max(...ee.getSize(new Tl.Vector3).toArray())}),vo.value=I,console.log("URDF模型加载完成并优化")}catch(ee){console.error("URDF加载失败:",ee),vo.value=void 0}finally{ze&&URL.revokeObjectURL(ze)}break;default:throw new Error(`不支持的文件格式: ${C}`)}return I};return{addModelsFromUrls:m,loadModelByDefaultPath:async C=>{console.log(C);try{n.value=!0,r.value="正在加载模型...";const{scene:M}=a();if(!M)throw new Error("Scene not initialized");o(),await new Promise(W=>setTimeout(W,100));const k=[];for(let W=0;W<C.length;W++){const I=C[W],j=await b(I.suffix,I.blob,I.mtlBlobs||[],I.meshFiles||[]);j&&(M.add(j),l.value.push(j),k.push(j))}return n.value=!1,r.value="",k}catch(M){throw console.error("加载模型失败:",M),n.value=!1,r.value="",M}},urdfModel:vo,modelBoundingBoxes:ps}}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>',(a=>{var l=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,o,s,h,c,d=function(u,C){C.parentNode.insertBefore(u,C)};if(l&&!a.__iconfont__svg__cssinject__){a.__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(u){console&&console.log(u)}}r=function(){var u,C=document.createElement("div");C.innerHTML=a._iconfont_svg_string_4827314,(C=C.getElementsByTagName("svg")[0])&&(C.setAttribute("aria-hidden","true"),C.style.position="absolute",C.style.width=0,C.style.height=0,C.style.overflow="hidden",C=C,(u=document.body).firstChild?d(C,u.firstChild):u.appendChild(C))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),r()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(s=r,h=a.document,c=!1,b(),h.onreadystatechange=function(){h.readyState=="complete"&&(h.onreadystatechange=null,m())})}function m(){c||(c=!0,s())}function b(){try{h.documentElement.doScroll("left")}catch{return void setTimeout(b,50)}m()}})(window);const Cf=["onClick"],Df=e.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:""}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(null),s=e.ref(null),h=e.computed(()=>{const x=Number(n==null?void 0:n.textSize),w=ce.rgbaToColor(n==null?void 0:n.textColor),g={},S={};return!Number.isNaN(x)&&x&&(g.fontSize=`${x}px`,S.fontSize=`${x}px`),w&&(g.color=w,S.color=w),{label:g,value:S}}),c=e.ref(""),d=e.ref(""),m=e.ref(!1),b=async x=>{if(x){d.value&&(URL.revokeObjectURL(d.value),d.value="");try{const w=await A.platformDownloadFile({url:x}),g=new Blob([w==null?void 0:w.data],{type:(w==null?void 0:w.headers["content-type"])||"image/*"});d.value=URL.createObjectURL(g)}catch{d.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,x=>{x&&(c.value=x)},{immediate:!0}),e.watch(c,x=>{b(x)},{immediate:!0});const u=()=>{var x;(x=s.value)==null||x.click()},C=async x=>{var S,$,V;const w=x.target,g=(S=w==null?void 0:w.files)==null?void 0:S[0];if(!g){w.value="";return}m.value=!0;try{const ae=new FormData;ae.append("file",g);const Z=await A.platformUploadFile(ae),be=(V=($=Z==null?void 0:Z.data)==null?void 0:$.result)==null?void 0:V.url;be?(c.value=be,r("update:backGroundImage",be),b(be),Ua.ElMessage.success("背景图片上传成功")):Ua.ElMessage.error("背景图片上传失败")}catch{Ua.ElMessage.error("背景图片上传失败")}finally{m.value=!1,w.value=""}},M=e.computed(()=>{var x;return d.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(x=n==null?void 0:n.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),k=x=>nl.getComponent(x),W=x=>{if(!x)return;const w=x.querySelector("input, textarea, .el-input__inner");w&&typeof w.focus=="function"&&w.focus()},I=(x,w,g)=>{n.disabled||x.field&&(o.value=w,e.nextTick(()=>{W(g.currentTarget)}))},j=()=>{o.value=null},L=x=>{var g;const w=((g=x==null?void 0:x.field)==null?void 0:g.value)??(x==null?void 0:x.value);return w==null||w===""?"-":w},E=x=>{const w=x!=null&&x.width&&x.width>0?x.width:1,S=`calc((100% - ${(w-1)*16}px) / ${w})`;return{flex:`0 0 ${S}`,maxWidth:S,minWidth:"140px",boxSizing:"border-box"}};return(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(M.value),onClick:w[2]||(w[2]=g=>(n==null?void 0:n.backGround)&&u())},[n!=null&&n.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:w[0]||(w[0]=e.withModifiers(g=>u(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:C},null,544),w[3]||(w[3]=e.createElementVNode("img",{src:nl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.items,(g,S)=>{var $,V,ae,Z,be,ze,F,ne;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:S,style:e.normalizeStyle(E(g)),onClick:w[1]||(w[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(h.value.label)},e.toDisplayString(g==null?void 0:g.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(h.value.value),onClick:J=>{var se;return(se=g.field)!=null&&se.isNoClick?null:I(g,S,J)}},[o.value===S&&g.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k((($=g.field)==null?void 0:$.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":J=>g.field.value=J,isEdit:!0,disabled:(V=g.field)==null?void 0:V.disabled,content:((ae=g.field)==null?void 0:ae.contents)??[],optionUrl:g.field,originalValue:(Z=g.field)==null?void 0:Z.value,config:(be=g.field)==null?void 0:be.config,configModel:((ze=g.field)==null?void 0:ze.prop)??((F=g.field)==null?void 0:F.name),selectedTagList:((ne=g.field)==null?void 0:ne.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(L(g)),1)],64))],12,Cf)],4)}),128))],4))}}),Bf=Xl._export_sfc(Df,[["__scopeId","data-v-af63fc22"]]),uc=A.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Tf={class:"calculator-content"},Nf={class:"calculator-child"},Af={class:"calculator-child"},zf=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),n=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(r,o)=>(e.openBlock(),e.createElementBlock("div",Tf,[e.createElementVNode("div",Nf,[e.createVNode(nl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Af,[e.createVNode(nl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Mf=Xl._export_sfc(zf,[["__scopeId","data-v-73db0fe7"]]),yt=(a,l)=>{let n=a,r=l;return Array.isArray(n)&&(n=n==null?void 0:n.map((o,s)=>{if(Array.isArray(o)){let h={};return o=o==null?void 0:o.forEach((c,d)=>{var m;(m=r==null?void 0:r[d])!=null&&m.prop?h[r[d].prop]=c:Array.isArray(c)&&(h.children=yt(c,r))}),Object.assign(h,{id:s})}else return o})),n},dc=(a,l,n)=>{let r=a,o=l;return r=r==null?void 0:r.map((s,h)=>{var c,d;return!Array.isArray(s)||!((c=o==null?void 0:o[h])!=null&&c.label)&&!n||(s.unshift(((d=o==null?void 0:o[h])==null?void 0:d.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var b;return Array.isArray(m)&&(m=dc(m,(b=o==null?void 0:o[h])==null?void 0:b.children,n)),m}))),s}),r},If=(a,l,n)=>{if(l==="")return a==null?void 0:a.filter(r=>(r==null?void 0:r.id)!==n);{const r=l.split("-");return Of(a,r,n)}},Of=(a,l,n)=>{let r=a,o=l;return(o==null?void 0:o.length)===0?r=r==null?void 0:r.filter(s=>s.id!==n):r=r==null?void 0:r.map(s=>(s.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),s=pc(s,o,n)),s)),r},pc=(a,l,n)=>{var s,h;let r=a,o=l;return(o==null?void 0:o.length)===0?r.children=(s=r.children)==null?void 0:s.filter(c=>c.id!==n):r.children=(h=r.children)==null?void 0:h.map(c=>(c.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),c=pc(c,o,n)),c)),r},Lf=(a,l,n)=>{if(l==="")return n;{const r=l.split("-");return Rf(a,r,n)}},Rf=(a,l,n)=>{let r=a,o=l;return(o==null?void 0:o.length)===0?r=n:r=r==null?void 0:r.map(s=>(s.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),s=fc(s,o,n)),s)),r},fc=(a,l,n)=>{var s;let r=a,o=l;return(o==null?void 0:o.length)===0?r.children=n:r.children=(s=r.children)==null?void 0:s.map(h=>(h.id.toString()===(o==null?void 0:o[0])&&(o==null||o.shift(),h=fc(h,o,n)),h)),r};class $f{constructor(l={}){en(this,"url");en(this,"heartbeatInterval");en(this,"socket",null);en(this,"isConnected",!1);en(this,"heartTimer",null);en(this,"canvas",null);en(this,"ctx",null);en(this,"mainCamCutMode",0);en(this,"pMainShowStartX",0);en(this,"pMainShowStartY",0);en(this,"onLog");en(this,"onDevCount");en(this,"onResolution");en(this,"onCameraStatus");en(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,n,r){var h;(h=this.canvas)!=null&&h.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const o=document.createElement("canvas");o.style.border="solid 1px #A0A0A0",o.id="MainCamCanvas",o.width=n,o.height=r;const s=o.getContext("2d");if(!s)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(o),this.canvas=o,this.ctx=s}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,n)=>{const r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>{this.socket=r,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},r.onerror=o=>{this.isConnected=!1,this.log("socket.onerror"),n(o)},r.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},r.onmessage=o=>{this.handleMessage(o)}})}destroy(){var l;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,(l=this.canvas)!=null&&l.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(l=0){this.sendBytes(new Uint8Array([119,136,81,l]))}chooseResolution(l){if(!Array.isArray(l)||l.length===0)return null;const n=l.find(o=>o.width===2592&&o.height===1944);return n||[...l].sort((o,s)=>s.width*s.height-o.width*o.height)[0]||null}openCamera(l=0,n=1280,r=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const o=new Uint8Array(12);o[0]=119,o[1]=136,o[2]=1,o[3]=l,o[4]=this.canvas.width>>8&255,o[5]=this.canvas.width&255,o[6]=this.canvas.height>>8&255,o[7]=this.canvas.height&255,o[8]=n>>8&255,o[9]=n&255,o[10]=r>>8&255,o[11]=r&255,this.sendBytes(o)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const o=new Uint8Array(12);o[0]=119,o[1]=136,o[2]=16,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o[9]=0,o[10]=0,o[11]=0,this.sendBytes(o)}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(l){var n;(n=this.onLog)==null||n.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var o,s,h,c,d,m;const n=new Uint8Array(l.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 r=n[2];if(r===80){const b=n[3],u=n.length-4,C=new Uint8Array(u);for(let W=0;W<u;W++)C[W]=n[4+W];const k=decodeURIComponent(this.byteToString(C)).split("|");(o=this.onDevCount)==null||o.call(this,b,k);return}if(r===81){const b=n[3]||0,u=[];for(let C=0;C<b;C++){const M=(n[4+C*4+0]||0)*256+(n[4+C*4+1]||0),k=(n[4+C*4+2]||0)*256+(n[4+C*4+3]||0);u.push({width:M,height:k,text:`${M}*${k}`})}(s=this.onResolution)==null||s.call(this,b,u);return}if(r===1){n[3]===1&&((h=this.onCameraStatus)==null||h.call(this,"opened")),n[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(r===16){if(n[3]===1){const u=n[4]*256+n[5],C=n[6]*65536+n[7]*256+n[8];let M="";if(u>0){const I=new Uint8Array(u);for(let j=0;j<u;j++)I[j]=n[9+j];M=decodeURIComponent(this.byteToString(I))}const k=new Uint8Array(C);for(let I=0;I<C;I++)k[I]=n[9+u+I];const W=this.uint8ArrayToString(k);(d=this.onPhoto)==null||d.call(this,{flag:0,imgPath:M,base64:W})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(r===204){if(!this.canvas||!this.ctx)return;const b=n[3]*256+n[4],u=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 C=this.ctx.createImageData(b,u);let M=11;for(let k=0;k<C.data.length;k+=4)C.data[k+0]=n[M],C.data[k+1]=n[M+1],C.data[k+2]=n[M+2],C.data[k+3]=255,M+=3;this.ctx.putImageData(C,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}byteToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}}const Vf={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"}},jf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Hf={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"}},Uf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},qf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},Wf=["src","onClick"],Kf=["onClick"],Gf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},Yf={class:"dialog-footer"},Jf=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(null),s=e.ref(!1),h=e.ref([]),c=e.ref(""),d=e.ref(!1),m=e.ref([]),b=new $f({url:"ws://127.0.0.1:22225"});function u(V,ae){var J;const Z=V.split(","),be=((J=Z[0].match(/:(.*?);/))==null?void 0:J[1])??"image/jpeg",ze=atob(Z[1]);let F=ze.length;const ne=new Uint8Array(F);for(;F--;)ne[F]=ze.charCodeAt(F);return new File([ne],ae,{type:be})}function C(){b.onLog=V=>{console.log("[GPY]",V)},b.onDevCount=(V,ae)=>{if(c.value+=`设备数量=${V},设备=${ae.join(",")}
4
4
  `,V>0){c.value+=`检测到设备,正在获取分辨率...
5
5
  `;try{b.getResolution(0)}catch(Z){c.value+=`获取分辨率失败:${(Z==null?void 0:Z.message)??Z}
6
6
  `}}else c.value+=`未检测到高拍仪设备!
7
7
  `},b.onResolution=(V,ae)=>{if(V<=0||!Array.isArray(ae)||ae.length===0){c.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
8
- `;try{b.openCamera(0,1280,720)}catch(ge){c.value+=`打开摄像头失败:${(ge==null?void 0:ge.message)??ge}
8
+ `;try{b.openCamera(0,1280,720)}catch(be){c.value+=`打开摄像头失败:${(be==null?void 0:be.message)??be}
9
9
  `}return}const Z=b.chooseResolution(ae);if(!Z){c.value+=`分辨率选择失败,回退使用 1280*720 打开...
10
- `;try{b.openCamera(0,1280,720)}catch(ge){c.value+=`打开摄像头失败:${(ge==null?void 0:ge.message)??ge}
10
+ `;try{b.openCamera(0,1280,720)}catch(be){c.value+=`打开摄像头失败:${(be==null?void 0:be.message)??be}
11
11
  `}return}c.value+=`获取分辨率 ${Z.text}成功,打开摄像头...
12
- `;try{b.closeCamera(),setTimeout(()=>{try{b.openCamera(0,Z.width,Z.height)}catch(ge){c.value+=`打开摄像头失败:${(ge==null?void 0:ge.message)??ge}
13
- `}},100)}catch{try{b.openCamera(0,Z.width,Z.height)}catch(ge){c.value+=`打开摄像头失败:${(ge==null?void 0:ge.message)??ge}
12
+ `;try{b.closeCamera(),setTimeout(()=>{try{b.openCamera(0,Z.width,Z.height)}catch(be){c.value+=`打开摄像头失败:${(be==null?void 0:be.message)??be}
13
+ `}},100)}catch{try{b.openCamera(0,Z.width,Z.height)}catch(be){c.value+=`打开摄像头失败:${(be==null?void 0:be.message)??be}
14
14
  `}}},b.onCameraStatus=V=>{V==="opened"?(s.value=!0,c.value+=`摄像头已打开
15
15
  `):(s.value=!1,c.value+=`摄像头已关闭
16
16
  `)},b.onPhoto=V=>{if(V.flag===0&&V.base64){const ae=`data:image/jpeg;base64,${V.base64}`,Z=u(ae,`gpy-capture-${Date.now()}.jpg`);h.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:ae,file:Z}),c.value+=`拍照完成,已接收图片(当前 ${h.value.length} 张)
@@ -20,6 +20,6 @@
20
20
  `,b.getDevCount()},k=()=>{try{b.destroy()}catch(V){console.error(V)}s.value=!1,h.value=[],c.value="",d.value=!1,m.value=[]};e.watch(()=>n.visible,V=>{V?M():k()});const W=()=>{try{b.bestSize()}catch(V){console.error(V)}},I=()=>{try{b.rotateLeft()}catch(V){console.error(V)}},j=()=>{try{b.rotateRight()}catch(V){console.error(V)}},L=()=>{try{b.focus()}catch(V){console.error(V)}},E=()=>{c.value+=`正在拍照...
21
21
  `;try{b.photo()}catch(V){c.value+=`拍照调用失败:${(V==null?void 0:V.message)??V}
22
22
  `}},x=()=>{h.value.length>0?r("confirm",h.value.map(V=>V.file)):r("confirm",[])},w=V=>{V<0||V>=h.value.length||(h.value.splice(V,1),c.value+=`已删除一张图片(剩余 ${h.value.length} 张)
23
- `)},g=V=>{if(!V)return;const ae=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:ae,blobUrl:V}],d.value=!0},S=()=>{d.value=!1},$=()=>{k(),r("cancel")};return(V,ae)=>{const Z=e.resolveComponent("el-input"),ge=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Br.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:$,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vf,[e.createElementVNode("div",{ref_key:"cameraBox",ref:o,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)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Pf,"初始化摄像头..."))],512),e.createElementVNode("div",Ff,[e.createElementVNode("div",jf,[ae[0]||(ae[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Hf,[h.value.length===0?(e.openBlock(),e.createElementBlock("div",Uf,"暂无图片")):(e.openBlock(),e.createElementBlock("div",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(ze,F)=>(e.openBlock(),e.createElementBlock("div",{key:ze.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:ze.url,onClick:ne=>g(ze.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Wf),e.createElementVNode("div",{onClick:ne=>w(F),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,Kf)]))),128))]))],512)]),e.createElementVNode("div",Gf,[ae[1]||(ae[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Z,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yf,[e.createVNode(ge,{onClick:W,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[2]||(ae[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ge,{onClick:I,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(ge,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[4]||(ae[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(ge,{onClick:L,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(ge,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>ae[6]||(ae[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),ae[9]||(ae[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(ge,{onClick:x,disabled:h.value.length===0,id:"themeButton"},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(ge,{onClick:$,id:"themeBorderButton"},{default:e.withCtx(()=>ae[8]||(ae[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),d.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:S},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Xf=Xl._export_sfc(Jf,[["__scopeId","data-v-24a2050a"]]),fs=A.useMenuState(A.pinia),Zf=async a=>{var s,h,c,d,m,b;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(s=l==null?void 0:l[0])==null?void 0:s.url,o="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){fs.setContentLoading(!0);const u=await A.platformDownloadFile({url:r});let C=u==null?void 0:u.data;const M=new FormData;M.append("file",C,((h=l==null?void 0:l[0])==null?void 0:h.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),M.append("query",n);let k=await Zs(M);k=(b=(m=(d=k==null?void 0:k.data)==null?void 0:d.data)==null?void 0:m.response)==null?void 0:b.replace("generateResult",a==null?void 0:a.函数名称),o=k,fs.setContentLoading(!1)}return o},Ct=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),Qf=A.useModelComp(A.pinia),{extraContents:uv}=A.storeToRefs(Qf),e0=A.useLoginState(A.pinia),{extraUrl:ii}=A.storeToRefs(e0);let hc=ii.value===""||!ii.value?"http://139.196.154.85:20015":ii.value;e.watch(()=>ii.value,()=>{hc=ii.value===""||!ii.value?"http://139.196.154.85:20015":ii.value},{deep:!0,immediate:!0});const Do={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},hs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:hc+"/api/public/paddleOCR"};class a0{constructor(l){en(this,"config");this.config={...hs,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Ua.Local.get(Ua.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),o=this.buildOCRRequest(l,n),s=this.config.apiUrl||hs.apiUrl||"";return(await Ua.axios.post(s,o,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return Do[l]?Do[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,o=h=>{const c=h==null?void 0:h.label;return!(!c||c==="操作"||c===this.config.columnName||(h==null?void 0:h.type)==="operate"||(h==null?void 0:h.prop)==="operate")},s=h=>{(h||[]).forEach(c=>{if(!c)return;const d=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(d)&&d.length>0){s(d);return}if(o(c)){const m=c.label;if(!r.has(m)){r.add(m);const b=this.getFieldAliases(m);n.push(b)}}})};return s(l||[]),n}}function vc(a){return new a0(a)}vc();const gt=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g;let n=(c=(h=A.cloneDeep(a))==null?void 0:h.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(S=>{});let o="",s=await ce.menuToParent(n);if(s==null||s.forEach(S=>{var $,V,ae,Z;(S==null?void 0:S.name)===(((Z=(ae=(V=($=A.cloneDeep(a))==null?void 0:$.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ae[0])==null?void 0:Z.replaceAll("'",""))??"")&&(o=S==null?void 0:S.id)}),l){o=l;const S=await Mr.getInsofDataApi({id:o}),$=(u=(b=(m=(d=S==null?void 0:S.data)==null?void 0:d.result)==null?void 0:m[0])==null?void 0:b.key)==null?void 0:u.pageKey;s=await ce.getItemData($,sessionStorage.getItem("systemKey"),"")}if(o!==""){let S;l?S=(C=s==null?void 0:s.find(ae=>(ae==null?void 0:ae.id)===l))==null?void 0:C.compData:S=(M=s==null?void 0:s.find(ae=>{var Z,ge,ze,F;return(ae==null?void 0:ae.name)===(((ge=(Z=a==null?void 0:a.groupSelect)==null?void 0:Z.split(":"))==null?void 0:ge[0])||((F=(ze=a==null?void 0:a.optionUrl)==null?void 0:ze.groupSelect)==null?void 0:F[0]))}))==null?void 0:M.compData;let $=(W=(k=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:k.contents)==null?void 0:W.map(ae=>ae==null?void 0:ae.label);(j=(I=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:I.contents)!=null&&j.every(ae=>Array.isArray(ae))&&($=(x=ce.getColumnChild((E=(L=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0]))==null?void 0:x.map(ae=>ae==null?void 0:ae.prop));let V=(g=(w=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:g.map(ae=>{if(Array.isArray(ae))ae=ae==null?void 0:ae.filter(Z=>!(Z!=null&&Z.id));else{let Z={};for(let ge in ae)ge!=="id"&&(Z[ge]=ae==null?void 0:ae[ge]);ae=Z}return ae});V==null||V.forEach(ae=>{Array.isArray(ae)?r.push(ce.getValueToObjectValue(ae,$)):r.push(ae)})}return r},l0=A.useMenuState(A.pinia),{activeMenuPath:dv}=A.storeToRefs(l0),r0=A.useUnit(A.pinia),{chooseTitle:pv}=A.storeToRefs(r0),n0="col-operate",mc=a=>`${n0}-${a}`,i0=(a,l)=>{const n=new Map;a.forEach(o=>{const{prop:s}=o;n.set(s,o)});const r=o=>{Array.isArray(o)&&o.forEach(s=>{const{prop:h}=s||{},c=n.get(h);o0(c,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&r(s.children)})};return r(l),l},o0=(a,l)=>(a&&(l.sortable=a==null?void 0:a.sortable,l.filterable=a==null?void 0:a.filterable,l.showSummary=a==null?void 0:a.showSummary,l.operable=a==null?void 0:a.operable,l.fixed=a==null?void 0:a.fixed),l),t0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:o=!1,operable:s=!1,fixed:h=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:o,operable:s,fixed:h}},s0=async a=>{var s,h;if(!a)return;const l=mc(a),n=await Mr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(s=n==null?void 0:n.data)==null?void 0:s.code,o=(h=n==null?void 0:n.data)==null?void 0:h.result;if(r==200)return o==null?void 0:o[0]},c0=async a=>{if(a)return[]},u0=async(a,l)=>{if(!a||!l)return;const n=mc(a);return await Mr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},d0=async(a,l)=>!a||!l?void 0:await Mr.updateInsofDataApi({id:a,value:{columns:l}}),vs=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await s0(a);return r?await d0(r==null?void 0:r.id,l):await u0(a,l)};var xo={exports:{}},p0=xo.exports,ms;function f0(){return ms||(ms=1,function(a,l){(function(n,r){r()})(p0,function(){function n(m,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.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 r(m,b,u){var C=new XMLHttpRequest;C.open("GET",m),C.responseType="blob",C.onload=function(){d(C.response,b,u)},C.onerror=function(){console.error("could not download file")},C.send()}function o(m){var b=new XMLHttpRequest;b.open("HEAD",m,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(b)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof A.commonjsGlobal=="object"&&A.commonjsGlobal.global===A.commonjsGlobal?A.commonjsGlobal:void 0,c=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,b,u){var C=h.URL||h.webkitURL,M=document.createElement("a");b=b||m.name||"download",M.download=b,M.rel="noopener",typeof m=="string"?(M.href=m,M.origin===location.origin?s(M):o(M.href)?r(m,b,u):s(M,M.target="_blank")):(M.href=C.createObjectURL(m),setTimeout(function(){C.revokeObjectURL(M.href)},4e4),setTimeout(function(){s(M)},0))}:"msSaveOrOpenBlob"in navigator?function(m,b,u){if(b=b||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,u),b);else if(o(m))r(m,b,u);else{var C=document.createElement("a");C.href=m,C.target="_blank",setTimeout(function(){s(C)})}}:function(m,b,u,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof m=="string")return r(m,b,u);var M=m.type==="application/octet-stream",k=/constructor/i.test(h.HTMLElement)||h.safari,W=/CriOS\/[\d]+/.test(navigator.userAgent);if((W||M&&k||c)&&typeof FileReader<"u"){var I=new FileReader;I.onloadend=function(){var E=I.result;E=W?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=E:location=E,C=null},I.readAsDataURL(m)}else{var j=h.URL||h.webkitURL,L=j.createObjectURL(m);C?C.location=L:location.href=L,C=null,setTimeout(function(){j.revokeObjectURL(L)},4e4)}});h.saveAs=d.saveAs=d,a.exports=d})}(xo)),xo.exports}f0();const Hn=A.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(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a},setSelectTab(a){this.selectTab=a}}}),h0=A.useLoginState(A.pinia),{loginUserInfo:ct}=A.storeToRefs(h0),v0=async a=>{var r,o,s;let l=await A.getAllTables({platId:parseInt((r=ct==null?void 0:ct.value)==null?void 0:r.plat_id),tableNames:[a]});return l=(s=(o=l==null?void 0:l.data)==null?void 0:o.result)==null?void 0:s[0],await cc(l,!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:l}]}]},m0=A.useLoginState(),{loginUserInfo:yl}=A.storeToRefs(m0);let mo="$R";const zr=A.useModelComp(A.pinia),yc=e.ref(!1),{itemData:y0,itemGridData:li,curStructureCompIds:ys,isSubmitCurStructure:g0,routeToChildPath:b0,pageMapState:bt,itemExtendData:yo,refreshTable:gs}=A.storeToRefs(zr),Lo=Hn(A.pinia),$r=A.useMenuState(A.pinia),cr=e.shallowRef([]),{asideMenus:k0,activeTopMenuPath:x0,activeMenuPath:xl,platform:fv,buttonTriggerType:w0,currentMenuPath:tn}=A.storeToRefs($r),gn=A.useUnit(A.pinia),{selectTitle:Pn,chooseTitle:Bo}=A.storeToRefs(gn);e.ref();const Bi=e.ref(!0),jn=e.ref(0),kt=e.ref([]);e.ref(!1);const Dt=e.ref(!1),Ki=e.ref(),gc=e.ref(),bc=e.ref(),_0=()=>{zr.setItemGridData([]),zr.setIsEdit("edit"),zr.setSubmitCurStructure(xl.value!=="/平台管理/菜单管理")},S0=()=>{zr.setIsEdit("view"),zr.setRefreshCurStructure(!0)},E0=async a=>{var o;let l=Pn.value,n=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((s,h)=>h<=n);gn.setSelectTitle(nl.safeClone(r)),r=(o=r==null?void 0:r.map(s=>s==null?void 0:s.value))==null?void 0:o.join("/"),$r.setActiveMenuPath(null),$r.setActiveMenuPath(r)},ut=async(a,l,n,r="contentConfig")=>{var o;try{if(!Array.isArray(a))return;let s,h;l==="create"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Mr.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{id:d==null?void 0:d.id,value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Mr.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},h=Mr.batchDeleteInsofDataApi);const c=await h(s);if(((o=c==null?void 0:c.data)==null?void 0:o.code)===200)return c.data.result;throw Ua.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ua.ElMessage.error("保存响应失败")}},bs=async(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k;try{const W=(s=(o=a==null?void 0:a.results)==null?void 0:o.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:w}})),I=(c=(h=a==null?void 0:a.results)==null?void 0:h.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:c.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),j=JSON.parse(JSON.stringify(a)),L=(d=j==null?void 0:j.results)==null?void 0:d.map(w=>w.id);let E;n?E=(u=(b=(m=bt.value)==null?void 0:m[xl.value])==null?void 0:b.filter(w=>{var g,S,$;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l&&(($=(S=w==null?void 0:w.key)==null?void 0:S.relatedInfo)==null?void 0:$.target)===r}))==null?void 0:u.map(w=>w==null?void 0:w.id):E=(k=(M=(C=bt.value)==null?void 0:C[xl.value])==null?void 0:M.filter(w=>{var g;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l}))==null?void 0:k.map(w=>w==null?void 0:w.id);const x=E==null?void 0:E.filter(w=>!(L!=null&&L.includes(w))&&typeof w=="number");(W==null?void 0:W.length)>0&&await Mr.batchAddInsofDataApi({dataList:W}),(I==null?void 0:I.length)>0&&await Mr.batchUpdateInsofDataApi({dataList:I}),(x==null?void 0:x.length)>0&&await Mr.batchDeleteInsofDataApi({ids:x})}catch(W){throw new Error(W)}},C0=async a=>{var m,b,u,C,M,k,W,I,j,L;$r.setContentLoading(!0);const l=JSON.parse(JSON.stringify(y0.value));if(!g0.value)return $r.setCacheStructures({key:w0.value,data:l}),Ua.ElMessage.success("已暂存");const n=l==null?void 0:l.map(E=>E.id),r=n.filter(E=>{var x;return!((x=ys.value)!=null&&x.includes(E))}),o=(m=ys.value)==null?void 0:m.filter(E=>!n.includes(E)),s=[...r,...o].filter(E=>typeof E!==null&&typeof E<"u"),h=l==null?void 0:l.filter(E=>!E.id),c=l==null?void 0:l.filter(E=>E.id);let d=[];if(s&&(s==null?void 0:s.length)>0&&d.push(ut(s,"delete",a)),h&&(h==null?void 0:h.length)>0&&d.push(ut(h,"create",a)),c&&(c==null?void 0:c.length)>0&&d.push(ut(c,"update",a)),li.value&&((b=li.value)!=null&&b.isDelete&&((C=(u=li.value)==null?void 0:u.results)==null?void 0:C.length)>0&&((k=(M=li.value)==null?void 0:M.results)!=null&&k.every(E=>typeof E=="number"))?await Mr.batchDeleteInsofDataApi({ids:(W=li.value)==null?void 0:W.results}):(console.log("itemGridData.value",li.value),d.push(await bs(li.value,"gridLayout")))),yo.value)for(const E in yo.value)d.push(await bs((I=yo.value)==null?void 0:I[E],"extend",{target:E,compId:(L=(j=yo.value)==null?void 0:j[E])==null?void 0:L.compId},E));await Promise.all(d).then(()=>{Ua.ElMessage.success("保存成功"),zr.setRefreshCurStructure(!0)}).catch(E=>{Ua.ElMessage.success(E)}),$r.setContentLoading(!1)},Gi=a=>Ti(a),D0=e.computed(()=>{var a;return(a=cr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),kc=e.computed(()=>{var a;return(a=cr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),xc=e.ref(0),wc=e.ref(null),B0="ocr_committed_temp_ids_v1",T0=(a,l)=>`${B0}:${String(a??"")}:${String(l??"")}`,N0=(a,l,n)=>{try{const r=T0(a,l),o=sessionStorage.getItem(r),s=o?JSON.parse(o):[],h=Array.isArray(s)?s:[],c=Array.from(new Set([...h,...n||[]].map(d=>String(d)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},To=async(a,l="data",n)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja,jl,Rl;let r=((h=(s=(o=Pn.value)==null?void 0:o.filter(Da=>(Da==null?void 0:Da.condition)==="child"))==null?void 0:s[0])==null?void 0:h.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Da=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(Te=>{let Ma={};for(let Je in Te)Array.isArray(Te==null?void 0:Te[Je])?Ma[Je]=JSON.stringify(Te==null?void 0:Te[Je]):Ma[Je]=Te==null?void 0:Te[Je];return Ma}),al=await A.quoteApi({platId:parseInt((d=yl==null?void 0:yl.value)==null?void 0:d.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});al=(m=al==null?void 0:al.data)==null?void 0:m.result,al=al==null?void 0:al.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let dl=al==null?void 0:al.map(Te=>{var Xe,Aa;let Ma={},Je=Da==null?void 0:Da[0],ie;return Array.isArray((Xe=Te==null?void 0:Te.struct)==null?void 0:Xe[0])?ie=ce.getColumnChild((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0]):ie=Te==null?void 0:Te.struct,ie=ie==null?void 0:ie.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="relatedId"),ie==null||ie.forEach(Ze=>{var ka,Va;Ma[Ze.prop]=((ka=Ze==null?void 0:Ze.words)!=null&&ka[0]?(Je==null?void 0:Je[(Va=Ze==null?void 0:Ze.words)==null?void 0:Va[0]])??(Je==null?void 0:Je[Ze==null?void 0:Ze.prop]):Je==null?void 0:Je[Ze==null?void 0:Ze.prop])??""}),Ma.id="1",Ma.relatedId=`[${Ma.id}]`,delete Ma.sort,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ma]}}),ol=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:Da}];ol=[...ol,...dl];let $a=await A.quoteApi({platId:parseInt((u=yl==null?void 0:yl.value)==null?void 0:u.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});$a=(M=(C=$a==null?void 0:$a.data)==null?void 0:C.result)==null?void 0:M.filter(Te=>!(ol!=null&&ol.find(Ma=>(Ma==null?void 0:Ma.tableName)==="content_"+(Te==null?void 0:Te.id)))),$a=$a==null?void 0:$a.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let tl=$a==null?void 0:$a.map(Te=>{var Xe,Aa,Ze,ka,Va,Ja,Ue;let Ma={},Je=Da==null?void 0:Da[0],ie;return Array.isArray((Xe=Te==null?void 0:Te.struct)==null?void 0:Xe[0])?ie=ce.getColumnChild((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0]):ie=Te==null?void 0:Te.struct,ie=ie==null?void 0:ie.filter(fa=>(fa==null?void 0:fa.prop)!=="relatedId"),((ka=(Ze=ie==null?void 0:ie[0])==null?void 0:Ze.words)!=null&&ka[0]?Je!=null&&Je[(Ja=(Va=ie==null?void 0:ie[0])==null?void 0:Va.words)==null?void 0:Ja[0]]:Je!=null&&Je[(Ue=ie==null?void 0:ie[0])==null?void 0:Ue.prop])?(ie==null||ie.forEach(fa=>{var oa,il;Ma[fa.prop]=((oa=fa==null?void 0:fa.words)!=null&&oa[0]?(Je==null?void 0:Je[(il=fa==null?void 0:fa.words)==null?void 0:il[0]])??(Je==null?void 0:Je[fa==null?void 0:fa.prop]):Je==null?void 0:Je[fa==null?void 0:fa.prop])??""}),Ma.id="1",Ma.relatedId=`[${Ma.id}]`,delete Ma.sort):Ma=void 0,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ma]}});tl=tl==null?void 0:tl.filter(Te=>{var Ma;return!((Ma=Te==null?void 0:Te.tableContents)!=null&&Ma.every(Je=>Je===void 0))}),ol=[...ol,...tl],await A.pageBatchAddApi({platId:parseInt((k=yl==null?void 0:yl.value)==null?void 0:k.plat_id),changeContents:ol});let ll=[];ol==null||ol.forEach(Te=>{var Ma;(Ma=Te==null?void 0:Te.tableContents)==null||Ma.forEach(Je=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((W=yl==null?void 0:yl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:ll}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Da=((a==null?void 0:a.ocrRows)||[]).map($a=>$a==null?void 0:$a.id).filter($a=>$a!=null),al=((a==null?void 0:a.ocrRows)||[]).map($a=>{const tl={...$a};return delete tl._isOCRRow,delete tl._ocrTableId,Object.keys(tl).forEach(ll=>{/(^|\.)证书附件$/.test(ll)&&Array.isArray(tl[ll])&&(tl[ll]=JSON.stringify(tl[ll].map(Te=>({url:(Te==null?void 0:Te.url)||"",name:(Te==null?void 0:Te.name)||(Te==null?void 0:Te.fileName)||"",fileName:(Te==null?void 0:Te.fileName)||(Te==null?void 0:Te.name)||""})).filter(Te=>Te.url||Te.name)))}),tl});let dl=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find($a=>$a==null?void 0:$a.includes("content")),tableContents:al}];await A.pageBatchAddApi({platId:parseInt((j=yl==null?void 0:yl.value)==null?void 0:j.plat_id),changeContents:dl});let ol=[];dl==null||dl.forEach($a=>{var tl;(tl=$a==null?void 0:$a.tableContents)==null||tl.forEach(ll=>{ol.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ll),request_result:"{}",is_delete:!1,request_table:$a==null?void 0:$a.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:[{tableName:"log",tableContents:ol}]}),N0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Da)}if((a==null?void 0:a.buttonName)==="编辑"){const al=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(ie=>{const Xe={...ie};return delete Xe._isOCRRow,delete Xe._ocrTableId,delete Xe._isTemp,delete Xe.tableEditType,delete Xe.index,Xe});let dl=al==null?void 0:al.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),ol=await A.quoteApi({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});ol=(x=ol==null?void 0:ol.data)==null?void 0:x.result,ol=ol==null?void 0:ol.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))});let $a=(w=dl==null?void 0:dl[0])==null?void 0:w.id,tl=[{tableName:(g=a==null?void 0:a.relatedContents)==null?void 0:g.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:dl}],ll=(S=ol==null?void 0:ol.map(ie=>{var Aa,Ze,ka,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa,oa;return JSON.stringify(Ue==null?void 0:Ue.relatedId)!=="{}"&&(Ue==null?void 0:Ue.relatedId)!==""&&(Ue!=null&&Ue.relatedId)?(fa=Ue==null?void 0:Ue.relatedId)==null?void 0:fa.includes(parseInt($a)):(Ue==null?void 0:Ue.sort)===((oa=dl==null?void 0:dl[0])==null?void 0:oa.sort)});if((Xe==null?void 0:Xe.length)>0){let Ue=dl==null?void 0:dl[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((ka=ie==null?void 0:ie.struct)==null?void 0:ka[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var Pa,sl;fa[Le.prop]=((Pa=Le==null?void 0:Le.words)!=null&&Pa[0]?(oa==null?void 0:oa[(sl=Le==null?void 0:Le.words)==null?void 0:sl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa==null?void 0:oa[Le==null?void 0:Le.prop])??""}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,delete fa.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:S.filter(ie=>ie);tl=[...tl,...ll];let Te=await A.quoteApi({platId:parseInt(($=yl==null?void 0:yl.value)==null?void 0:$.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});Te=(ae=(V=Te==null?void 0:Te.data)==null?void 0:V.result)==null?void 0:ae.filter(ie=>!(tl!=null&&tl.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),Te=Te==null?void 0:Te.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))});let Ma=(Z=Te==null?void 0:Te.map(ie=>{var Aa,Ze,ka,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa,oa,il;return JSON.stringify(Ue==null?void 0:Ue.relatedId)!=="{}"&&(Ue==null?void 0:Ue.relatedId)!==""&&(Ue!=null&&Ue.relatedId)?(fa=Ue==null?void 0:Ue.relatedId)==null?void 0:fa.includes(parseInt($a)):(Ue==null?void 0:Ue.sort)===((oa=dl==null?void 0:dl[0])==null?void 0:oa.sort)||(Ue==null?void 0:Ue.sort)===(parseInt(((il=dl==null?void 0:dl[0])==null?void 0:il.sort)??"0")+1).toString()});if((Xe==null?void 0:Xe.length)>0){let Ue=dl==null?void 0:dl[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((ka=ie==null?void 0:ie.struct)==null?void 0:ka[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var Pa,sl,fr,ur;((Pa=Le==null?void 0:Le.words)!=null&&Pa[0]?(oa==null?void 0:oa[(sl=Le==null?void 0:Le.words)==null?void 0:sl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa!=null&&oa[Le==null?void 0:Le.prop])&&(fa[Le.prop]=((fr=Le==null?void 0:Le.words)!=null&&fr[0]?(oa==null?void 0:oa[(ur=Le==null?void 0:Le.words)==null?void 0:ur[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa==null?void 0:oa[Le==null?void 0:Le.prop])??"")}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,delete fa.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:Z.filter(ie=>ie);tl=[...tl,...Ma],await A.pageBatchUpdateApi({platId:parseInt((ge=yl==null?void 0:yl.value)==null?void 0:ge.plat_id),changeContents:tl});let Je=[];tl==null||tl.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((ze=yl==null?void 0:yl.value)==null?void 0:ze.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}if((a==null?void 0:a.buttonName)==="删除"){let Da=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:a==null?void 0:a.fixContent}],al=await A.quoteApi({platId:parseInt((ne=yl==null?void 0:yl.value)==null?void 0:ne.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});al=(J=al==null?void 0:al.data)==null?void 0:J.result,al=al==null?void 0:al.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let dl=(Be=(se=a==null?void 0:a.fixContent)==null?void 0:se[0])==null?void 0:Be.id,ol=($e=al==null?void 0:al.map(Te=>{var Je,ie,Xe,Aa,Ze,ka;let Ma=(Je=Te==null?void 0:Te.contents)==null?void 0:Je.filter(Va=>{var Ja,Ue,fa;return JSON.stringify(Va==null?void 0:Va.relatedId)!=="{}"&&(Va==null?void 0:Va.relatedId)!==""&&(Va!=null&&Va.relatedId)?(Ja=Va==null?void 0:Va.relatedId)==null?void 0:Ja.includes(parseInt(dl)):(Va==null?void 0:Va.sort)===((fa=(Ue=a==null?void 0:a.fixContent)==null?void 0:Ue[0])==null?void 0:fa.sort)});if((Ma==null?void 0:Ma.length)>0){let Va=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Va={...Va,id:(Xe=Ma==null?void 0:Ma[0])==null?void 0:Xe.id};let Ja={},Ue=Va,fa;return Array.isArray((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0])?fa=ce.getColumnChild((Ze=Te==null?void 0:Te.struct)==null?void 0:Ze[0]):fa=Te==null?void 0:Te.struct,fa=fa==null?void 0:fa.filter(oa=>(oa==null?void 0:oa.prop)!=="relatedId"),fa==null||fa.forEach(oa=>{var il,Le;Ja[oa.prop]=((il=oa==null?void 0:oa.words)!=null&&il[0]?(Ue==null?void 0:Ue[(Le=oa==null?void 0:oa.words)==null?void 0:Le[0]])??(Ue==null?void 0:Ue[oa==null?void 0:oa.prop]):Ue==null?void 0:Ue[oa==null?void 0:oa.prop])??""}),Ja.id=(ka=Ma==null?void 0:Ma[0])==null?void 0:ka.id,delete Ja.sort,delete Ja.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ja]}}else return}))==null?void 0:$e.filter(Te=>Te);Da=[...Da,...ol];let $a=await A.quoteApi({platId:parseInt((fe=yl==null?void 0:yl.value)==null?void 0:fe.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});$a=(oe=(N=$a==null?void 0:$a.data)==null?void 0:N.result)==null?void 0:oe.filter(Te=>!(Da!=null&&Da.find(Ma=>(Ma==null?void 0:Ma.tableName)==="content_"+(Te==null?void 0:Te.id)))),$a=$a==null?void 0:$a.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let tl=(U=$a==null?void 0:$a.map(Te=>{var Je,ie,Xe,Aa,Ze,ka;let Ma=(Je=Te==null?void 0:Te.contents)==null?void 0:Je.filter(Va=>{var Ja,Ue,fa;return JSON.stringify(Va==null?void 0:Va.relatedId)!=="{}"&&(Va==null?void 0:Va.relatedId)!==""&&(Va!=null&&Va.relatedId)?(Ja=Va==null?void 0:Va.relatedId)==null?void 0:Ja.includes(parseInt(dl)):(Va==null?void 0:Va.sort)===((fa=(Ue=a==null?void 0:a.fixContent)==null?void 0:Ue[0])==null?void 0:fa.sort)});if((Ma==null?void 0:Ma.length)>0){let Va=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Va={...Va,id:(Xe=Ma==null?void 0:Ma[0])==null?void 0:Xe.id};let Ja={},Ue=Va,fa;return Array.isArray((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0])?fa=ce.getColumnChild((Ze=Te==null?void 0:Te.struct)==null?void 0:Ze[0]):fa=Te==null?void 0:Te.struct,fa=fa==null?void 0:fa.filter(oa=>(oa==null?void 0:oa.prop)!=="relatedId"),fa==null||fa.forEach(oa=>{var il,Le;Ja[oa.prop]=((il=oa==null?void 0:oa.words)!=null&&il[0]?(Ue==null?void 0:Ue[(Le=oa==null?void 0:oa.words)==null?void 0:Le[0]])??(Ue==null?void 0:Ue[oa==null?void 0:oa.prop]):Ue==null?void 0:Ue[oa==null?void 0:oa.prop])??""}),Ja.id=(ka=Ma==null?void 0:Ma[0])==null?void 0:ka.id,delete Ja.sort,delete Ja.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ja]}}else return}))==null?void 0:U.filter(Te=>Te);Da=[...Da,...tl],await A.pageBatchDeleteApi({platId:parseInt((De=yl==null?void 0:yl.value)==null?void 0:De.plat_id),changeContents:Da});let ll=[];Da==null||Da.forEach(Te=>{var Ma;(Ma=Te==null?void 0:Te.tableContents)==null||Ma.forEach(Je=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((Ie=yl==null?void 0:yl.value)==null?void 0:Ie.plat_id),changeContents:[{tableName:"log",tableContents:ll}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Da=await A.getPageDataApi({platId:parseInt((je=yl==null?void 0:yl.value)==null?void 0:je.plat_id),pageName:"menu"});if(Da=(la=Da==null?void 0:Da.data)==null?void 0:la.result,Da!=null&&Da.find(al=>(al==null?void 0:al.father_name)===xl.value+"/")){bc.value=a,gc.value=Da==null?void 0:Da.filter(ol=>(ol==null?void 0:ol.father_name)===xl.value+"/");let al=(ee=(Ta=a==null?void 0:a.columns)==null?void 0:Ta.find(ol=>ol==null?void 0:ol.mainKey))==null?void 0:ee.prop,dl=(ue=(ca=a==null?void 0:a.fixContent)==null?void 0:ca[0])==null?void 0:ue[al];Dt.value=!0,Ki.value=[{prop:al,label:al,name:al,value:dl}]}else{let al=(ta=a==null?void 0:a.fixContent)==null?void 0:ta.map($a=>{let tl={};for(let ll in $a)Array.isArray($a==null?void 0:$a[ll])?tl[ll]=JSON.stringify($a==null?void 0:$a[ll]):tl[ll]=$a==null?void 0:$a[ll];return tl.relatedId="",tl}),dl=[{tableName:(Se=a==null?void 0:a.relatedContents)==null?void 0:Se.find($a=>$a==null?void 0:$a.includes("content")),tableContents:al}];await A.pageBatchAddApi({platId:parseInt((te=yl==null?void 0:yl.value)==null?void 0:te.plat_id),changeContents:dl});let ol=[];dl==null||dl.forEach($a=>{var tl;(tl=$a==null?void 0:$a.tableContents)==null||tl.forEach(ll=>{ol.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ll),request_result:"{}",is_delete:!1,request_table:$a==null?void 0:$a.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((Ne=yl==null?void 0:yl.value)==null?void 0:Ne.plat_id),changeContents:[{tableName:"log",tableContents:ol}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Da=((Ya=(sa=(We=a==null?void 0:a.columns)==null?void 0:We.map(ie=>ie==null?void 0:ie.filter))==null?void 0:sa.filter(ie=>ie!==""))==null?void 0:Ya[0])??"";Da=ce.analyzeSplitToContent(Da,","),Da=(Da==null?void 0:Da.find(ie=>ie==null?void 0:ie.includes("@Filter")))??"";let al=(R=a==null?void 0:a.fixContent)==null?void 0:R.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),dl=await A.quoteApi({platId:parseInt((H=yl==null?void 0:yl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});dl=(X=dl==null?void 0:dl.data)==null?void 0:X.result,dl=dl==null?void 0:dl.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))});let ol=(de=(ve=a==null?void 0:a.columns)==null?void 0:ve[0])==null?void 0:de.prop,$a=(va=al==null?void 0:al[0])==null?void 0:va[ol],tl=[{tableName:(na=a==null?void 0:a.relatedContents)==null?void 0:na.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:al}],ll=(Pe=dl==null?void 0:dl.map(ie=>{var Aa,Ze,ka,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa;return(fa=Object.values(Ue))==null?void 0:fa.find(oa=>oa===$a)});if((Xe==null?void 0:Xe.length)>0){let Ue=al==null?void 0:al[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((ka=ie==null?void 0:ie.struct)==null?void 0:ka[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var Pa,sl;fa[Le.prop]=((Pa=Le==null?void 0:Le.words)!=null&&Pa[0]?(oa==null?void 0:oa[(sl=Le==null?void 0:Le.words)==null?void 0:sl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa==null?void 0:oa[Le==null?void 0:Le.prop])??""}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:Pe.filter(ie=>ie);tl=[...tl,...ll];let Te=await A.quoteApi({platId:parseInt((xa=yl==null?void 0:yl.value)==null?void 0:xa.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});if(Te=(ma=(Me=Te==null?void 0:Te.data)==null?void 0:Me.result)==null?void 0:ma.filter(ie=>!(tl!=null&&tl.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),Te=Te==null?void 0:Te.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))}),Da&&Da!==""){(Da==null?void 0:Da[(Da==null?void 0:Da.length)-1])===","&&(Da=Da==null?void 0:Da.slice(0,(Da==null?void 0:Da.length)-1)),Da=(za=(Oa=Da==null?void 0:Da.replace("(",mo))==null?void 0:Oa.split(mo))==null?void 0:za[1],Da=Da==null?void 0:Da.slice(0,(Da==null?void 0:Da.length)-1),(Da==null?void 0:Da[0])==="*"&&(Da="{"+((Ca=(pa=Da==null?void 0:Da.replace("{",mo))==null?void 0:pa.split(mo))==null?void 0:Ca[1])),Da=(Ae=Da==null?void 0:Da.replaceAll("{",""))==null?void 0:Ae.replaceAll("}","");let ie=ce.calculatorAndToOr(Da);ie=ie==null?void 0:ie[0];let Xe;if((he=Object.values(ie))!=null&&he.some(Aa=>(Aa==null?void 0:Aa[0])==="*")){let Aa=(xe=(Y=Pn.value)==null?void 0:Y.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))!=null&&xe.value?(tn==null?void 0:tn.value)+"/"+((qe=(me=Pn.value)==null?void 0:me.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:qe.value):tn==null?void 0:tn.value;Xe=await Gr(Aa,!1)}for(let Aa in ie)if(((da=ie==null?void 0:ie[Aa])==null?void 0:da[0])==="*"){let Ze=(ye=(Ve=(aa=ie[Aa])==null?void 0:aa.slice(1,(Ke=ie[Aa])==null?void 0:Ke.length))==null?void 0:Ve.split(":"))==null?void 0:ye[0],ka=(Sa=(pe=ie[Aa])==null?void 0:pe.split(":"))==null?void 0:Sa[1],Va=(ya=Xe==null?void 0:Xe.filter(Ja=>(Ja==null?void 0:Ja.name)===Ze))==null?void 0:ya[0];Va=(Nl=(vl=Va==null?void 0:Va.compData)==null?void 0:vl.find(Ja=>(Ja==null?void 0:Ja.key)==="tableContents"))==null?void 0:Nl.contents,Va=(pl=Va==null?void 0:Va[0])==null?void 0:pl[ka],ie[Aa]=Va}Da=((Fl=Object.values(ie))==null?void 0:Fl[0])??""}let Ma=(ja=Te==null?void 0:Te.map(ie=>{var Aa,Ze,ka,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa;return(fa=Object.values(Ue))==null?void 0:fa.find(oa=>oa===(Da===""?$a:Da))});if((Xe==null?void 0:Xe.length)>0){let Ue=al==null?void 0:al[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((ka=ie==null?void 0:ie.struct)==null?void 0:ka[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var sl,fr,ur,Zl;let Pa=(sl=a==null?void 0:a.columns)==null?void 0:sl.find(rr=>{var dr,yr,Oe;return((yr=(dr=rr==null?void 0:rr.words)==null?void 0:dr[0])==null?void 0:yr.replaceAll("'",""))===(Le==null?void 0:Le.prop)&&((Oe=rr==null?void 0:rr.functionRelatedWords)==null?void 0:Oe.length)>0});Pa=(fr=Pa==null?void 0:Pa.prop)==null?void 0:fr.replaceAll("'",""),fa[Le.prop]=((ur=Le==null?void 0:Le.words)!=null&&ur[0]?(oa==null?void 0:oa[(Zl=Le==null?void 0:Le.words)==null?void 0:Zl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop])??(oa==null?void 0:oa[Pa]):(oa==null?void 0:oa[Le==null?void 0:Le.prop])??(oa==null?void 0:oa[Pa]))??void 0}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:ja.filter(ie=>ie);tl=[...tl,...Ma],await A.pageBatchUpdateApi({platId:parseInt((jl=yl==null?void 0:yl.value)==null?void 0:jl.plat_id),changeContents:tl});let Je=[];tl==null||tl.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt((Rl=yl==null?void 0:yl.value)==null?void 0:Rl.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}zr.setRefreshCurStructure(!0),await wt(a)},xt=async(a,l,n)=>{var o;let r=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(r){let s=(o=r.compData)==null?void 0:o.map(h=>{var c;if((h==null?void 0:h.key)==="tableContents"){let d={...h,contents:n};return d.contents=(c=(d==null?void 0:d.contents)??[])==null?void 0:c.map(m=>{let b={};for(let u in m)JSON.stringify(m==null?void 0:m[u])==="{}"?b[u]="":b[u]=m==null?void 0:m[u];return b}),d}return h});return r.compData=await Oo(s,{}),a=a==null?void 0:a.map(h=>((h==null?void 0:h.id)===(r==null?void 0:r.id)&&(h=r),h)),a}else{let s=a==null?void 0:a.filter(c=>{var d;return(c==null?void 0:c.children)&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0||(c==null?void 0:c.comp)==="Tabs"}),h=s==null?void 0:s.map(async c=>{var d;return c!=null&&c.children&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0?c.children=await xt(c==null?void 0:c.children,l,n):c.compData=await xt(c==null?void 0:c.compData,l,n),c});return s=await Promise.all(h),s}},wt=async a=>{var s,h,c,d,m,b,u;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(C=>C==null?void 0:C.includes("content_"));if(!l)return;let n=await A.getAllTables({platId:parseInt((h=yl==null?void 0:yl.value)==null?void 0:h.plat_id),tableNames:l??[]});if(n=(d=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:d[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(C=>{C==null||delete C.source_table;const M={};for(let k in C){const W=C==null?void 0:C[k],I=W&&Object.prototype.toString.call(W)==="[object Object]"&&Object.keys(W).length===0,j=Array.isArray(W)&&W.length===0;W==null||W==="{}"||I||j?M[k]="":M[k]=W}return M});let r=(b=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:b[1],o=await xt(cr.value,r,n);cr.value=(u=cr.value)==null?void 0:u.map(C=>{var M,k;return(M=o==null?void 0:o[0])!=null&&M.tabInform&&((k=o==null?void 0:o[0])==null?void 0:k.tabInform)===(C==null?void 0:C.tabInform)?C=o==null?void 0:o[0]:(C!=null&&C.name?(C==null?void 0:C.name)===(o==null?void 0:o.name):(C==null?void 0:C.id)===(o==null?void 0:o.id))&&(C=o),C})},A0=a=>{let l=Ki.value;Ki.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},z0=async()=>{var C,M,k,W,I,j,L,E,x,w;let a=bc.value,l=gc.value,n=(M=(C=a==null?void 0:a.columns)==null?void 0:C.find(g=>g==null?void 0:g.mainKey))==null?void 0:M.prop,r=(W=(k=Ki.value)==null?void 0:k[0])==null?void 0:W.value,o=(I=a==null?void 0:a.fixContent)==null?void 0:I.map(g=>{var $;let S={};for(let V in g)Array.isArray(g==null?void 0:g[V])?S[V]=JSON.stringify(g==null?void 0:g[V]):S[V]=g==null?void 0:g[V];return($=a==null?void 0:a.columns)==null||$.forEach(V=>{(V==null?void 0:V.formType)==="Upload"&&(S==null?void 0:S[V==null?void 0:V.prop])===""&&(S[V==null?void 0:V.prop]="{}")}),S[n]=r,S}),s=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(g=>g==null?void 0:g.includes("content")),tableContents:o}];await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:s}),l=l==null?void 0:l.filter(g=>{var S,$,V;return(V=g==null?void 0:g.object_name)==null?void 0:V.includes(($=(S=a==null?void 0:a.fixContent)==null?void 0:S[0])==null?void 0:$[n])});let h=[],c=new Map;l==null||l.forEach(g=>{h.push(`content_${g==null?void 0:g.object_id}`),h.push(`struct_${g==null?void 0:g.object_id}`),c.set(g==null?void 0:g.object_id,g)});let d=await A.getAllTables({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),tableNames:h??[]});d=(x=d==null?void 0:d.data)==null?void 0:x.result;let m=[],b=[];d=ce.chunk(d,2),d==null||d.forEach(g=>{var V,ae,Z,ge,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee;let S=c.get((ge=(Z=(ae=(V=g==null?void 0:g[1])==null?void 0:V[0])==null?void 0:ae.source_table)==null?void 0:Z.split("_"))==null?void 0:ge[1]),$=(ne=(F=(ze=S==null?void 0:S.object_name)==null?void 0:ze.split("/"))==null?void 0:F.filter((ca,ue)=>{var ta,Se;return((Se=(ta=S==null?void 0:S.object_name)==null?void 0:ta.split("/"))==null?void 0:Se.length)-1!==ue}))==null?void 0:ne.join("/");if($=$+"/"+r,b!=null&&b.find(ca=>(ca==null?void 0:ca.path)===$)||b.push({fatherPath:S==null?void 0:S.father_name,isShow:S==null?void 0:S.is_show,path:$}),((se=(J=g==null?void 0:g[1])==null?void 0:J[0])==null?void 0:se.类型)==="Table"){let ca=((fe=($e=(Be=g==null?void 0:g[1])==null?void 0:Be[0])==null?void 0:$e.结构)==null?void 0:fe.contents)??[],ue=nl.safeClone(ca);Array.isArray(ue==null?void 0:ue[0])&&(ue=ce.getColumnChild(ue==null?void 0:ue[0]));let ta=[];if(((N=g==null?void 0:g[0])==null?void 0:N.length)>0&&(ta=(oe=g==null?void 0:g[0])==null?void 0:oe.map(Se=>ue==null?void 0:ue.map(Ne=>(Ne=(Se==null?void 0:Se[Ne==null?void 0:Ne.prop])??"",Ne)))),m!=null&&m.find(Se=>(Se==null?void 0:Se.key)===$)){let Se=(U=m==null?void 0:m.find(Ne=>(Ne==null?void 0:Ne.key)===$))==null?void 0:U.contents;Se.push({isShow:S==null?void 0:S.is_show,filter:((je=(Ie=(De=g==null?void 0:g[1])==null?void 0:De[0])==null?void 0:Ie.引用)==null?void 0:je.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:ca,tableContents:ta});let te=m==null?void 0:m.findIndex(Ne=>(Ne==null?void 0:Ne.key)===$);m[te].contents=Se}else m.push({key:$,contents:[{isShow:S==null?void 0:S.is_show,filter:((ee=(Ta=(la=g==null?void 0:g[1])==null?void 0:la[0])==null?void 0:Ta.引用)==null?void 0:ee.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:ca,tableContents:ta}]})}});let u=[];u.push({key:"menuPath",contents:b}),u=[...u,...m],await A.createPlatFormDataApi({platId:parseInt((w=yl==null?void 0:yl.value)==null?void 0:w.plat_id),changeData:u}),Dt.value=!1,zr.setRefreshTable(!0)},No=async(a,l)=>{},Ao=async a=>{cr.value=await ce.getDeepDiffItems(a),zr.setItemData(cr.value),zr.setOriginalData(cr.value)};e.ref();const M0=e.ref(null),I0=()=>{var a,l;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(l=(a=xl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},_c=e.ref([]),O0=e.computed(()=>{var a,l;return(l=(a=bt.value)==null?void 0:a[xl.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[x0.value],()=>{gn.setSelectTitle([]),gn.setChooseTitle([])},{deep:!0});e.watch(()=>Bo.value,async(a,l)=>{var r,o,s,h,c,d;let n=(r=Bo.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==tn.value);if((n==null?void 0:n.length)>0){$r.setContentLoading(!0);let m=((o=n==null?void 0:n[0])==null?void 0:o.relatedContent)??(xl==null?void 0:xl.value),b=m+"/"+((s=n==null?void 0:n[0])==null?void 0:s.value),u=!!((h=n==null?void 0:n[0])!=null&&h.parentContent),C=await Gr(b,u,{originPath:m});C=(c=C==null?void 0:C.filter(W=>W))==null?void 0:c.map(W=>(W.isShow=!0,W)),console.log(C,"loadingContents");let M=await ce.getDeepDiffItems(C),k=M==null?void 0:M.filter(W=>W==null?void 0:W.choice);Lo.setSelectTab((d=k==null?void 0:k[0])==null?void 0:d.choiceName),M=M==null?void 0:M.filter(W=>{var I;return!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===((I=k==null?void 0:k[0])==null?void 0:I.choiceName)}),cr.value=M,$r.setContentLoading(!1)}});const L0=(a,l)=>{setTimeout(async()=>{var c,d,m;let n=(c=Bo.value)==null?void 0:c.filter(b=>(b==null?void 0:b.condition)==="child"&&(b==null?void 0:b.value)!==""&&(b==null?void 0:b.parentContent)!==tn.value),r=xl==null?void 0:xl.value,o=xl==null?void 0:xl.value;(n==null?void 0:n.length)>0&&(o=((d=n==null?void 0:n[0])==null?void 0:d.relatedContent)??(xl==null?void 0:xl.value),r=o+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let s=await Gr(r,!1,{originPath:o});s=s==null?void 0:s.map(b=>(b.isShow=!0,b));let h=await ce.getDeepDiffItems(s);cr.value=h==null?void 0:h.filter(b=>!(b!=null&&b.step)||(b==null?void 0:b.step)===(a==null?void 0:a.title))},10)},R0=a=>{setTimeout(async()=>{var h,c,d;let l=(h=Bo.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==tn.value),n=xl==null?void 0:xl.value,r=xl==null?void 0:xl.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(xl==null?void 0:xl.value),n=r+"/"+((d=l==null?void 0:l[0])==null?void 0:d.value));let o=await Gr(n,!1,{originPath:r});o=o==null?void 0:o.map(m=>(m.isShow=!0,m)),Lo.setSelectTab(a);let s=await ce.getDeepDiffItems(o);cr.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>k0.value,a=>{a!=null&&a.length||(cr.value=[])},{immediate:!0});e.watch(()=>[xl.value],async a=>{var s,h,c,d;if(!xl.value)return;if(xl.value==="/"){cr.value=[];return}$r.setCurrentMenuPath(xl.value),zr.setLockingPage(""),cr.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Bi.value=!1,$r.setContentLoading(!0),yc.value=!0;let n=a==null?void 0:a[0],r=n,o=(h=Pn.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==xl.value&&!(m!=null&&m.relatedContent));if((o==null?void 0:o.length)>0&&(n=n+"/"+((c=o==null?void 0:o[0])==null?void 0:c.value)),n==="系统管理/日志管理")cr.value=await v0("log");else{let m=await Gr(n,!0,{originPath:r});m=m==null?void 0:m.map(C=>(C.isShow=!0,C));let b=await ce.getDeepDiffItems(m),u=b==null?void 0:b.filter(C=>C==null?void 0:C.choice);Lo.setSelectTab((d=u==null?void 0:u[0])==null?void 0:d.choiceName),cr.value=b==null?void 0:b.filter(C=>{var M;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((M=u==null?void 0:u[0])==null?void 0:M.choiceName)})}$r.setContentLoading(!1),zr.setExtraContents([]),gn.setSelectIndex(""),gn.setSelectMenu(""),zr.setItemData(cr.value),zr.setOriginalData(cr.value),zr.setRefreshTable(!1),e.nextTick(()=>{jn.value=jn.value++,Bi.value=!0})},{immediate:!0});e.watch(()=>[gs.value],async()=>{var a,l,n,r;if(gs.value){cr.value=[];let o=e.getCurrentInstance();(a=o==null?void 0:o.scope)==null||a.stop(),o=null,Bi.value=!1,$r.setContentLoading(!0),yc.value=!0;let s=tn==null?void 0:tn.value,h=s,c=(l=Pn.value)==null?void 0:l.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==(tn==null?void 0:tn.value));(c==null?void 0:c.length)>0&&(s=s+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let d=await Gr(s,!0,{originPath:h});d=d==null?void 0:d.map(u=>(u.isShow=!0,u));let m=await ce.getDeepDiffItems(d),b=m==null?void 0:m.filter(u=>u==null?void 0:u.choice);if(Lo.setSelectTab((r=b==null?void 0:b[0])==null?void 0:r.choiceName),cr.value=m==null?void 0:m.filter(u=>{var C;return!(u!=null&&u.choiceName)||(u==null?void 0:u.choiceName)===((C=b==null?void 0:b[0])==null?void 0:C.choiceName)}),$r.setContentLoading(!1),zr.setExtraContents([]),gn.setSelectIndex(""),gn.setSelectMenu(""),zr.setItemData(cr.value),zr.setOriginalData(cr.value),zr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let u=[...Pn.value,...c];gn.setSelectTitle(u)}e.nextTick(()=>{jn.value=jn.value++,Bi.value=!0})}},{immediate:!0,deep:!0});const $0=async()=>{$r.setLinkMenuInfo(null),$r.setActiveMenuPath(b0.value),cr.value=null,zr.setRouteToChildPath(""),$r.setChildMenu("")},V0=a=>new RegExp("button","i").test(a),P0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Sc=a=>{if(P0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&$r.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Ec=async(a,l,n)=>{var C,M,k,W,I,j,L,E,x,w,g,S;let r="",o="";for(let $ in l)(l==null?void 0:l[$])===a&&(o=$);n==null||n.forEach($=>{($==null?void 0:$.prop)===o&&(r=$==null?void 0:$.fatherPath)});let s=r===""?xl.value:r;r!==""&&$r.setCurrentMenuPath(s),$r.setCurrentMenuPath(s+"/"+a),$r.setContentLoading(!0),cr.value=await Gr(s+"/"+a,!0,{originPath:s+"/",row:l});let h=await Gr(s,!1),c=(C=h==null?void 0:h.filter($=>($==null?void 0:$.comp)==="Table"))==null?void 0:C[0],d=((I=(W=(k=(M=c==null?void 0:c.compData)==null?void 0:M.find($=>($==null?void 0:$.key)==="header"))==null?void 0:k.contents)==null?void 0:W[0])==null?void 0:I.prop)??((w=(x=(E=(L=(j=c==null?void 0:c.compData)==null?void 0:j.find($=>($==null?void 0:$.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0])==null?void 0:x[0])==null?void 0:w.prop),m=(S=(g=c==null?void 0:c.compData)==null?void 0:g.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:S.contents;m=m==null?void 0:m.map($=>({label:$==null?void 0:$[d],value:$==null?void 0:$[d]}));let b=Pn.value,u={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};b=b==null?void 0:b.filter($=>($==null?void 0:$.condition)!=="child"),b.push(u),gn.setSelectTitle(b),gn.setChooseTitle([u]),$r.setContentLoading(!1),zr.setExtraContents([]),gn.setSelectIndex(""),gn.setSelectMenu(""),zr.setItemData(cr.value),zr.setOriginalData(cr.value)},F0=a=>{xc.value=a},Si=e.reactive({index:0,comp:null}),j0=e.computed(()=>{var a;return(a=cr.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:H0(l,n)}))}),Cc=(a,l)=>{var d,m,b,u,C;const n=l?a:a-2,r=(d=cr.value)==null?void 0:d[n],o=(b=(m=r==null?void 0:r.compData)==null?void 0:m.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:b.contents,s=o==null?void 0:o.findIndex(M=>(M==null?void 0:M.isMainKey)&&(M==null?void 0:M.label)!=="操作"),h=s===-1?0:s,c=(C=(u=r==null?void 0:r.compData)==null?void 0:u.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:C.contents;return{valid:c==null?void 0:c.every(M=>M==null?void 0:M[h+1]),length:(c==null?void 0:c.length)||0}},H0=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:o,length:s}=Cc(l,!0);Si.index===l?n="process":s===0?n="wait":n=o?"success":"error"}return n},Dc=a=>{var n,r,o,s,h;const l=a+1;if(l>1&&((o=(r=(n=cr.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:c}=Cc(l);c?(Si.index=l,Si.comp=(s=cr.value)==null?void 0:s[a]):Ua.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Si.index=l,Si.comp=(h=cr.value)==null?void 0:h[a]},Bc=e.computed(()=>{var a,l;return(l=(a=kc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Bc.value,a=>{a&&Dc(0)},{immediate:!0});const U0={class:"table-content"},q0={class:"menu-config-wrap"},W0=["onClick"],K0={key:0,class:"viewport-wrap"},G0=["onClick"],Y0={title:"选择显示列信息"},J0={key:0,class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},X0=["title"],Z0={class:"col-operate-wrap"},Q0={key:0,class:"col-operate-radio-wrapper"},e3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},a3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},l3={class:"pop-view"},r3={class:"pop-wrapper"},n3={class:"file-list-pop"},i3=["title","onClick"],o3=["onClick"],t3=["onClick"],s3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},c3={class:"form-content"},u3={key:0,class:"dialog-footer"},d3={class:"dialog-footer"},p3={class:"ocr-dialog-content"},f3={class:"ocr-steps"},h3={key:0,class:"ocr-action-buttons"},v3={key:1,class:"ocr-preview-area"},m3={class:"ocr-file-grid"},y3={class:"file-thumbnail"},g3=["src"],b3={key:1,class:"thumbnail-placeholder"},k3={class:"progress-svg",viewBox:"0 0 36 36"},x3=["stroke","stroke-width","stroke-dasharray"],w3={key:0,class:"progress-icon"},_3={key:1,class:"progress-icon"},S3=["onClick"],E3={class:"file-name"},C3={key:0,class:"ocr-recognize-button"},D3={key:2,class:"ocr-progress-section"},B3={key:3,class:"ocr-confirm-area"},T3={class:"ocr-preview-tip"},N3={class:"ocr-preview-table"},A3={style:{display:"flex","align-items":"center",gap:"8px"}},z3={key:0},M3={key:4,class:"ocr-success-area"},I3={key:0,class:"ocr-dialog-footer"},O3={class:"form-content"},L3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},R3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},$3={style:{display:"flex"}},ks="ss-ocr-upload-history",V3="ss-ocr-cert-history-v1",P3={__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},groupNames:{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(a,{emit:l}){var Vt;const n=e.ref([]),r=Ct(A.pinia),o=e.ref(null),s=e.ref(new Set),h=e.ref(new Map),c=e.ref(!1),d=e.ref(new Map),m=new Map,b=e.ref(new Map),u=a,C=e.ref((u==null?void 0:u.allowSelect)??!0),M=e.ref(((Vt=u==null?void 0:u.config)==null?void 0:Vt.showIndex)??!0),k=e.ref(),W=e.ref(!0),I=e.ref(!1),j=e.ref([]),L={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=e.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"}]}]),x=ce.useOriginalState(A.pinia);let w="$R";const{originalPath:g}=A.storeToRefs(x),S=g.value,$=e.computed(()=>{var v;const p=(v=ce.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(B=>(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate");return p.length>0?p.every(B=>!!(B!=null&&B.sortable)):!1});e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(B=>B==null?void 0:B.filterable)}),e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(B=>B==null?void 0:B.operable)});const V=e.ref(!0),ae=e.ref([]),Z=e.reactive({column:{},status:!1,text:"合计"}),ge=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),ze=l,F=e.ref([]),ne=e.ref([]),J=e.ref([]),se=e.reactive({prop:"",order:null}),Be=e.ref([]),$e=e.ref(!1),fe=e.ref(!1),N=e.ref(null),{isUseBackdrop:oe,initTrackFileType:U,getFileExtension:De,setData:Ie,getFileInfo:je,getFilesInfo:la}=So.useThreeSystem(),Ta=e.ref([]),ee=e.ref(!1),ca=e.ref(),ue=A.useMenuState(),{importLoading:ta,activeMenuPath:Se,contentLoading:te,linkMenuInfo:Ne}=A.storeToRefs(ue),We=ce.useTableComp(A.pinia),sa=A.useModelComp(A.pinia),Ya=Hn(A.pinia),{extraContents:R,cacheUpdatingData:H,tableViewContents:X,tableLoading:ve,pageMapState:de,lockingPage:va}=A.storeToRefs(sa),{selectTab:na}=A.storeToRefs(Ya),{compType:Pe,hasEditable:xa}=Ys.useRole(),Me=e.ref([]),ma=e.ref([]),Oa=e.ref(new Map);e.ref(!1);const za=e.ref("");e.ref();const pa=e.ref(!0),Ca=e.ref(0),Ae=e.ref(!0),he=e.ref(""),Y=e.ref(!1),xe=e.ref(null);e.ref([]);const me=e.ref({label:"查看三维模型"}),qe=e.ref(!1),da=e.ref(),Ke=e.ref([]),aa=e.ref([]),Ve=e.ref(!1),ye=e.ref([]),pe=e.ref([]),Sa=e.ref([]),ya=e.ref([]),vl=e.ref([]),Nl=()=>{try{const p=localStorage.getItem(ks),v=p?JSON.parse(p):[];vl.value=Array.isArray(v)?v:[]}catch{vl.value=[]}},pl=()=>{try{localStorage.setItem(ks,JSON.stringify(vl.value||[]))}catch{}},Fl=p=>{var re,le,q;if(!p)return;const v=p.url||((re=p==null?void 0:p.uploadResult)==null?void 0:re.url)||"",B=p.name||((le=p==null?void 0:p.uploadResult)==null?void 0:le.name)||((q=p==null?void 0:p.uploadResult)==null?void 0:q.fileName)||"";if(!v&&!B)return;const z={name:B,url:v,ts:Date.now()},P=String(z.name||"").trim().toLowerCase(),D=(vl.value||[]).findIndex(we=>String((we==null?void 0:we.name)||"").trim().toLowerCase()===P);D>-1&&vl.value.splice(D,1),vl.value.unshift(z),vl.value.length>20&&(vl.value=vl.value.slice(0,20)),pl()};Nl();const ja=(p,v)=>`${V3}:${String(p??"")}:${String(v??"")}`,jl=(p,v)=>{try{const B=sessionStorage.getItem(ja(p,v)),z=B?JSON.parse(B):[];return Array.isArray(z)?z:[]}catch{return[]}},Rl=(p,v,B)=>{try{sessionStorage.setItem(ja(p,v),JSON.stringify(Array.isArray(B)?B:[]))}catch{}},Da=(p,v,B)=>{if(!v)return;const z=jl(p,v),P=[B,...z||[]].filter(Boolean).slice(0,1);return Rl(p,v,P),P},al=(p,v,B)=>{if(!v||!B)return;const z=ja(p,v),P=ja(p,B);try{const D=sessionStorage.getItem(z);if(!D)return;const re=(()=>{try{const we=JSON.parse(D);return Array.isArray(we)?we:[]}catch{return[]}})(),le=jl(p,B),q=[...re,...le||[]].filter(Boolean).sort((we,Ee)=>Number((Ee==null?void 0:Ee.ts)||0)-Number((we==null?void 0:we.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(q)),sessionStorage.removeItem(z)}catch{}},dl=e.ref(!1),ol=e.ref(!1),$a=e.ref([]),tl=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const ll=e.ref(!1),Te=e.ref([]),Ma=e.ref(1),Je=e.ref(new Map),ie=e.ref(new Map),Xe=e.ref(0),Aa=e.ref(!1),Ze=e.ref([]),ka=e.ref([]),Va=p=>{var v;try{const B=(v=ce.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(B==null?void 0:B.find(z=>(z==null?void 0:z.prop)===p||(z==null?void 0:z.label)===p))||null}catch{return null}},Ja=p=>{const v=Va(p),B=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return nl.getComponent(B)||nl.getComponent("Input")},Ue=e.ref([]),fa=e.ref(null),oa=e.ref([]),il=e.ref(null),Le=e.ref(""),Pa=e.ref(!1),sl=e.ref([]),fr=e.ref(""),ur=e.ref(!1),Zl=e.ref([]),rr=e.ref([]),dr=e.ref([]),yr=e.ref(null),Oe=e.ref([]),Ql=e.ref("");e.computed(()=>{var p;try{const v=(p=ce.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("编号")||""}catch{return""}});const _r=e.computed(()=>{var p;try{const v=(p=ce.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("名称")||""}catch{return""}}),Nr=e.computed(()=>{var p;try{const v=(p=ce.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("制造厂")||""}catch{return""}}),Al=()=>{ur.value=!1,Zl.value=[],rr.value=[],dr.value=[],yr.value=null,Oe.value=[],Ql.value=""},Tr=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,Pr=(p,v)=>{const B=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(B))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Tr(B[P])&&(v[P]=B[P]);const z=ma.value.find(P=>P.id===v.id);if(z)for(const P of Object.keys(B))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Tr(B[P])&&(z[P]=B[P]);Oa.value&&Oa.value.set(v.id,v),Da(u==null?void 0:u.index,v.id,p==null?void 0:p.versionItem),rr.value=[...rr.value||[],JSON.parse(JSON.stringify(v))]},Wl=async(p,v=null)=>{var B,z,P,D,re,le,q;try{const we=(B=ce.getAllLeafNodes(F.value)||[])==null?void 0:B.filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),Ee=new Map;we==null||we.forEach(wa=>{wa!=null&&wa.label&&(wa!=null&&wa.prop)&&Ee.set(wa.label,wa.prop)});const Ge=Ee.get("系统编号")||Ee.get("编号");if(!Ge){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Fe=v||yr.value;if((Array.isArray(Fe==null?void 0:Fe.result)?Fe.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let wa=0;wa<p.length;wa++){const La=p[wa],Ia=La[Ge];if(!Ia){console.warn(`第 ${wa+1} 条匹配行缺少系统编号,跳过`);continue}const ea=`设备管理/试验设备/${Ia}`,Za=await A.getPageDataApi({platId:parseInt((z=ml.value)==null?void 0:z.plat_id),pageName:ea});if(!((P=Za==null?void 0:Za.data)!=null&&P.result)||!Array.isArray(Za.data.result)){console.warn(`未找到详情页数据: ${ea}`);continue}const ba=Za.data.result.find(ia=>(ia==null?void 0:ia.property_name)==="校检记录");if(!ba){console.warn(`详情页 ${ea} 中未找到校检记录表`);continue}const Qa=(D=ba.contents)==null?void 0:D.find(ia=>(ia==null?void 0:ia.key)&&ia.key.startsWith("content_"));if(!Qa||!Qa.key){console.warn("校检记录表中未找到 content item");continue}const be=Qa.key,Ra=Array.isArray(Qa.value)?Qa.value:[];if(Ra.length>=5){const _e=[...Ra].sort((ua,Na)=>{const rl=Number((ua==null?void 0:ua.create_time)||0),qa=Number((Na==null?void 0:Na.create_time)||0);return rl-qa})[0];_e!=null&&_e.id&&await A.pageBatchDeleteApi({platId:parseInt((re=ml.value)==null?void 0:re.plat_id),changeContents:[{tableName:be,tableContents:[{id:_e.id}]}]})}const ga=(le=we==null?void 0:we.find(ia=>(ia==null?void 0:ia.label)==="证书附件"))==null?void 0:le.prop,Ea=String(Date.now()),_a={id:Ea},T=Ra[0]||{},G=new Date().toISOString().split("T")[0];if(Object.keys(T||{}).forEach(ia=>{if(ia!=="id"){if(ia==="证书附件"){_a[ia]="";return}if(ia==="校检日期"||ia==="检校日期"){_a[ia]=La[ia]||La.校检日期||La.检校日期||G;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ia)){_a[ia]=La[ia]??"";return}_a[ia]=La[ia]??""}}),ga&&La[ga]){const ia=La[ga];if(Array.isArray(ia)&&ia.length>0)_a.证书附件=JSON.stringify(ia.map(_e=>({url:(_e==null?void 0:_e.url)||"",name:(_e==null?void 0:_e.name)||(_e==null?void 0:_e.fileName)||"",fileName:(_e==null?void 0:_e.fileName)||(_e==null?void 0:_e.name)||""})).filter(_e=>_e.url||_e.name));else if(typeof ia=="string")try{const _e=JSON.parse(ia);_a.证书附件=ia}catch{_a.证书附件=JSON.stringify([{url:ia,name:ia,fileName:ia}])}}console.log(be,"tableName","inspectionRecordRow",_a),await A.pageBatchAddApi({platId:parseInt((q=ml.value)==null?void 0:q.plat_id),changeContents:[{tableName:be,tableContents:[_a]}]});const Re=ba==null?void 0:ba.object_id;if(Re&&Ea){const ia=ga&&La[ga]?La[ga]:null;let _e=[],ua="",Na=!1;if(Array.isArray(ia)&&ia.length>0){_e=ia.map(hl=>({name:(hl==null?void 0:hl.name)||(hl==null?void 0:hl.fileName)||"",url:(hl==null?void 0:hl.url)||""})).filter(hl=>hl.url||hl.name);const qa=ia[0];ua=(qa==null?void 0:qa.url)||"";const fl=(qa==null?void 0:qa.name)||(qa==null?void 0:qa.fileName)||"";Na=String(fl).toLowerCase().endsWith(".pdf")||String(ua).toLowerCase().endsWith(".pdf")}else if(typeof ia=="string")try{const qa=JSON.parse(ia);Array.isArray(qa)?(_e=qa.map(fl=>({name:(fl==null?void 0:fl.name)||(fl==null?void 0:fl.fileName)||"",url:(fl==null?void 0:fl.url)||""})).filter(fl=>fl.url||fl.name),_e.length>0&&(ua=_e[0].url||"",Na=String(_e[0].name).toLowerCase().endsWith(".pdf")||String(ua).toLowerCase().endsWith(".pdf"))):(ua=ia,Na=String(ia).toLowerCase().endsWith(".pdf"))}catch{ua=ia,Na=String(ia).toLowerCase().endsWith(".pdf")}const rl={ts:Date.now(),versionId:String(Date.now())+"_"+String(wa),label:new Date().toLocaleString(),certType:La.证书类型||"",certNo:La.证书编号||"",fileType:Na?"pdf":"image",sourceUrl:Na?ua:"",images:_e};Da(Re,Ea,rl)}}}catch(we){console.error("向校检记录表插入OCR识别结果失败:",we),Ua.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},gr=p=>{const v=Array.isArray(p)?p:Zl.value||[];if(v.length===0){Al();return}if(v.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){Ua.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(D=>{var le;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){Da(u==null?void 0:u.index,(le=D==null?void 0:D.ocrRow)==null?void 0:le.id,D==null?void 0:D.versionItem),dr.value=[...dr.value||[],D.ocrRow];return}if(re==="replace"){const q=D==null?void 0:D.selectedTargetId,we=(Me.value||[]).find(Ee=>String(Ee==null?void 0:Ee.id)===String(q));if(!we)return;Pr(D,we)}}}),(rr.value||[]).length>0&&(Me.value=[...Me.value||[]]),(dr.value||[]).length>0&&(Me.value=[...Me.value||[],...dr.value||[]],ma.value=[...ma.value||[],...dr.value||[]],(dr.value||[]).forEach(D=>{var re,le;return(le=(re=Oa.value)==null?void 0:re.set)==null?void 0:le.call(re,D.id,D)})),Vr.value=Me.value;const z=rr.value||[],P=dr.value||[];if(z.length>0&&(ze("change",{buttonName:"编辑",singleContent:z,content:Me.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:F.value,name:u==null?void 0:u.compName}),Wl(z)),P.length>0){const D=yr.value;ze("change",{buttonName:"OCR批量新增",content:Me.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:F.value,ocrRows:P,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(le=>({url:(le==null?void 0:le.url)||"",name:(le==null?void 0:le.name)||"",fileName:(le==null?void 0:le.name)||""})).filter(le=>le.url)),ocrResult:D,matchedCount:(z||[]).length,newCount:(P||[]).length})}Ua.ElMessage.success("已提交候选处理结果"),Al()},Ir=vc(),Rr=e.computed(()=>Ir.getConfig()),Vl=e.ref(),ar=e.ref(),Fr=uc(A.pinia),Vr=e.ref(),Or=e.ref(0),jr=A.useUnit(A.pinia),{selectIndex:Yr,selectMenu:sn,selectTitle:Yl}=A.storeToRefs(jr),{selectString:hr}=A.storeToRefs(Fr),qr=A.useLoginState(A.pinia),{loginUserInfo:ml}=A.storeToRefs(qr),nr=e.ref(720),Ll=e.ref(!1),Sr=e.ref(!1),Hl=e.ref([]),vr=e.ref(),er=e.ref(!0),Wr=e.ref(!0);e.ref([]);const an=e.inject("contentRef");e.provide("contentRef",an),e.provide("getSuggestListForCell",Su),e.provide("getSuggestLoadingForCell",(p,v)=>{const B=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return b.value.get(B)||!1}),e.watch(()=>{var p;return(p=Me.value)==null?void 0:p.length},p=>{ge.total=p}),e.watch(()=>X.value,async()=>{var v,B,z,P,D,re,le,q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea;if(((v=X.value)==null?void 0:v.length)===0||!((B=u==null?void 0:u.itemData)!=null&&B.find(Za=>(Za==null?void 0:Za.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(Za=>(Za==null?void 0:Za.key)==="pageColumn")))return;let p=(we=(q=(le=(re=(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:le[1])==null?void 0:q.split("]"))==null?void 0:we[0];((Qe=(Fe=(Ge=(Ee=u==null?void 0:u.itemData)==null?void 0:Ee.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:Ge.contents)==null?void 0:Fe.split("["))==null?void 0:Qe[0])+((La=(wa=X.value)==null?void 0:wa.find(Za=>(Za==null?void 0:Za.key)===p))==null?void 0:La.value),(ea=(Ia=u==null?void 0:u.itemData)==null?void 0:Ia.find(Za=>(Za==null?void 0:Za.key)==="pageGroup"))==null||ea.contents,$t(compData,u.allMapContents)},{deep:!0});const _n=p=>{var B,z,P,D,re;const v=(z=(B=F.value)==null?void 0:B.filter(le=>le==null?void 0:le.mainKey))==null?void 0:z.map(le=>le==null?void 0:le.prop);if(v.length===0){const le=(P=F.value)==null?void 0:P.map(q=>q==null?void 0:q.prop);return(D=le==null?void 0:le.map(q=>p==null?void 0:p[q]))==null?void 0:D.join("|")}return(re=v==null?void 0:v.map(le=>p==null?void 0:p[le]))==null?void 0:re.join("|")},Un=p=>{var le,q,we,Ee,Ge;const v=(q=(le=F.value)==null?void 0:le.filter(Fe=>Fe==null?void 0:Fe.required))==null?void 0:q.map(Fe=>Fe==null?void 0:Fe.prop),B=[];if(p==null||p.forEach(Fe=>{v==null||v.forEach(Qe=>{const wa=Fe[Qe];(wa==null||wa==="")&&(B.includes(Qe)||B.push(Qe))})}),B.length>0)return Ua.ElMessage.warning(`请填写必填项:${B.join("、")}`);const z=new Map,P=new Map;(we=Me.value)==null||we.forEach(Fe=>{const Qe=_n(Fe);z.set(Qe,Fe)}),p==null||p.forEach(Fe=>{const Qe=_n(Fe);P.set(Qe,Fe)});const D=p==null?void 0:p.filter(Fe=>z.has(_n(Fe))),re=(Ee=Me.value)==null?void 0:Ee.filter(Fe=>P.has(_n(Fe)));return(D==null?void 0:D.length)>0&&(y.columns=(Ge=F.value)==null?void 0:Ge.filter(Fe=>(Fe==null?void 0:Fe.label)!=="操作"),y.existRows=re,y.tableData=D,y.show=!0),y.newRows=p==null?void 0:p.filter(Fe=>{const Qe=_n(Fe);return!z.has(Qe)}),y.newRows},Ln=e.ref(""),Sn=e.ref(null),An=async()=>{var p,v,B,z,P,D;try{const re=await A.quoteApi({related:[{menus:Se.value,groups:u==null?void 0:u.compName}],platId:parseInt((p=ml.value)==null?void 0:p.plat_id)});if(((v=re==null?void 0:re.data)==null?void 0:v.code)===200){Sn.value=(B=re==null?void 0:re.data)==null?void 0:B.result;const le=(z=F.value)==null?void 0:z.map(Ee=>(Ee==null?void 0:Ee.prop)||(Ee==null?void 0:Ee.label)),q=Rn(le,(P=re==null?void 0:re.data)==null?void 0:P.result),we=q==null?void 0:q.flatMap(Ee=>Ee==null?void 0:Ee.quote);(we==null?void 0:we.length)>0&&(Ln.value=(D=we==null?void 0:we.map(Ee=>Ee==null?void 0:Ee.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function Rn(p,v){var B;return(B=v.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(D=>p.includes(D)):!1):!1))==null?void 0:B.map(z=>{const P={...z};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>p.includes(re)):!1)),P})}const cn=async(p,v)=>{var B,z;try{Sn.value||await An();const P=v==null?void 0:v.map(re=>{const le=Object.keys(re),q={};return le.forEach((we,Ee)=>{q[p[Ee]]=re[we]}),q}),D=Un(P);if(!D||(D==null?void 0:D.length)===0)return;y.show||await O(D)}catch(P){throw Ua.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((B=ml==null?void 0:ml.value)==null?void 0:B.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(P),is_delete:!1,request_table:(z=u==null?void 0:u.related)==null?void 0:z.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(P)}},zn=async p=>{var D,re,le,q,we,Ee,Ge;let v=J.value;v!=null&&v.find(Fe=>(p==null?void 0:p.key)===(Fe==null?void 0:Fe.key))&&(v=v==null?void 0:v.filter(Fe=>(p==null?void 0:p.key)!==(Fe==null?void 0:Fe.key))),v.push({key:p==null?void 0:p.key,value:[(re=p==null?void 0:p.value)==null?void 0:re[((D=p==null?void 0:p.value)==null?void 0:D.length)-1]]});let B=ya.value;B=B==null?void 0:B.map(Fe=>{var Qe,wa;return(Fe==null?void 0:Fe.type)==="Select"&&(p==null?void 0:p.key)===(Fe==null?void 0:Fe.prop)&&Array.isArray(Fe.value)&&(Qe=Fe.value)!=null&&Qe.every(La=>typeof La=="string")&&(Fe.selectValue=(wa=v==null?void 0:v.find(La=>(La==null?void 0:La.key)===(Fe==null?void 0:Fe.prop)))==null?void 0:wa.value),Fe});let z=(q=(le=B==null?void 0:B.find(Fe=>(Fe==null?void 0:Fe.prop)===(p==null?void 0:p.key)))==null?void 0:le.optionUrl)==null?void 0:q.menuId,P=B==null?void 0:B.find(Fe=>(Fe==null?void 0:Fe.prop)===(p==null?void 0:p.key));if(z){let Fe=await gt(P==null?void 0:P.optionUrl,z),Qe,wa=ae.value,La=(Ge=(Ee=(we=ya.value)==null?void 0:we.find(Ia=>{var ea;return(ea=P==null?void 0:P.optionUrl)==null?void 0:ea.menuId}))==null?void 0:Ee.selectValue)==null?void 0:Ge[0];if(Fe==null||Fe.forEach(Ia=>{var ea,Za,ba,Qa,be,Ra,ga,Ea,_a,T;if(z){let G=(Za=(ea=ya.value)==null?void 0:ea.find(ia=>{var _e,ua;return((_e=P==null?void 0:P.optionUrl)==null?void 0:_e.menuId)===((ua=ia==null?void 0:ia.optionUrl)==null?void 0:ua.menuId)}))==null?void 0:Za.prop,Re=(Qa=(ba=B==null?void 0:B.find(ia=>(ia==null?void 0:ia.prop)===G))==null?void 0:ba.selectValue)==null?void 0:Qa[0];G!=null&&G.includes("·")&&(G=(be=G==null?void 0:G.split("·"))==null?void 0:be[0],Re=(_a=(Ea=(ga=p==null?void 0:p.value)==null?void 0:ga[((Ra=p==null?void 0:p.value)==null?void 0:Ra.length)-1])==null?void 0:Ea.split(" "))==null?void 0:_a[0]),wa!=null&&wa.find(ia=>(ia==null?void 0:ia.value)===La)?Qe=(T=wa==null?void 0:wa.find(ia=>(ia==null?void 0:ia.value)===La))==null?void 0:T.objectValue:Ia[G]===Re&&(Qe=Ia)}}),Qe){let Ia=B;Ia=Ia==null?void 0:Ia.map(ea=>{var Za,ba,Qa,be,Ra,ga;return z&&(Qe!=null&&Qe[ea==null?void 0:ea.prop])&&he.value==="新增"&&(ea==null?void 0:ea.prop)!==(P==null?void 0:P.prop)?ea.value=(Qe==null?void 0:Qe[ea==null?void 0:ea.prop])||(Qe==null?void 0:Qe[(be=(Qa=(ba=(Za=ea==null?void 0:ea.optionUrl)==null?void 0:Za.groupSelect)==null?void 0:ba[1])==null?void 0:Qa.replaceAll("[",""))==null?void 0:be.replaceAll("]","")]):ea.value=(ga=(Ra=ya.value)==null?void 0:Ra.find(Ea=>(Ea==null?void 0:Ea.prop)===(ea==null?void 0:ea.prop)))==null?void 0:ga.value,ea}),ya.value=Ia}}J.value=v},qn=async(p,v)=>{var B,z,P,D,re;if((B=p==null?void 0:p.toString())!=null&&B.includes(".txt")||(z=p==null?void 0:p.toString())!=null&&z.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const le=await Ua.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),q=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"});let we=URL.createObjectURL(q);ca.value=[{name:(re=p==null?void 0:p.split("/"))==null?void 0:re[((D=p==null?void 0:p.split("/"))==null?void 0:D.length)-1],blobUrl:we}],ee.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&ze("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{Wr.value=!1;let p=Or.value;Or.value=p+1});const Hr=e.reactive({prop:"",order:null}),Wn=e.computed(()=>{const p=(Me.value??[]).slice(),v=Hr.prop||se.prop,B=Hr.order||se.order;if(!v||!B)return p;const z=B==="ascending",P=re=>{if(v)return re&&Object.prototype.hasOwnProperty.call(re,v)?re[v]:v.includes(".")?v.split(".").reduce((le,q)=>le==null?le:le[q],re):re==null?void 0:re[v]},D=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const le=String(re).trim();if(le==="")return{ok:!1,value:NaN};const q=le.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(q))return{ok:!1,value:NaN};const we=Number(q);return{ok:Number.isFinite(we),value:we}};return p.sort((re,le)=>{const q=P(re),we=P(le);if(q==null&&we==null)return 0;if(q==null)return z?-1:1;if(we==null)return z?1:-1;const Ee=D(q),Ge=D(we);if(Ee.ok&&Ge.ok)return z?Ee.value-Ge.value:Ge.value-Ee.value;const Fe=be=>{if(be==null)return{ok:!1,value:NaN};const Ra=String(be).trim();if(Ra==="")return{ok:!1,value:NaN};const ga=Ra.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ga)return{ok:!1,value:NaN};const Ea=ga[1]?-1:1,_a=Number(ga[2]),T=Number(ga[3]),G=Number(ga[4]);return[_a,T,G].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:T>=60||G>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(_a*3600+T*60+G)}},Qe=Fe(q),wa=Fe(we);if(Qe.ok&&wa.ok)return z?Qe.value-wa.value:wa.value-Qe.value;const La=new Date(q).getTime(),Ia=new Date(we).getTime(),ea=!Number.isNaN(La),Za=!Number.isNaN(Ia);if(ea&&Za)return z?La-Ia:Ia-La;const ba=String(q),Qa=String(we);return z?ba.localeCompare(Qa):Qa.localeCompare(ba)})}),bn=e.computed(()=>{var B;const p=(ge.currentPage-1)*ge.pageSize,v=p+ge.pageSize;return ze("getSliceContLength",ge),(B=Wn.value)==null?void 0:B.slice(p,v)}),Ni=p=>{ge.currentPage=p,ze("getSliceContLength",ge)},Ro=p=>{var z;ge.pageSize=p;const v=((z=Me.value)==null?void 0:z.length)??0,B=p>0?Math.ceil(v/p):1;ge.currentPage>B&&(ge.currentPage=B||1,Ua.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),ze("getSliceContLength",ge)},$o=({prop:p,order:v})=>{Hr.prop=p,Hr.order=v,ge.currentPage=1};function Dn(p){const v=[];function B(z,P=""){z.forEach(D=>{D.children&&D.children.length>0?B(D.children,D.prop):v.push(D.prop)})}return B(p),v}const Vo=(p,v)=>{var le,q,we,Ee;let B=(q=(le=F.value)==null?void 0:le.map(Ge=>Ge==null?void 0:Ge.prop))==null?void 0:q.filter(Ge=>Ge!=="operate");((we=F.value)==null?void 0:we.some(Ge=>{var Fe;return((Fe=Ge==null?void 0:Ge.children)==null?void 0:Fe.length)>0}))&&(B=Dn((Ee=F.value)==null?void 0:Ee.filter(Ge=>(Ge==null?void 0:Ge.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(B==null?void 0:B.length)?p:p.slice(0,B==null?void 0:B.length),!(P==null?void 0:P.every(Ge=>B==null?void 0:B.find(Fe=>Ge===Fe))))return Ua.ElMessage.error("导入的数据表头不匹配");cn(P,v)},Po=(p,v)=>{var P;const B=p==null?void 0:p.filter(D=>D!=="序号"),z=v==null?void 0:v.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});sa.setRefreshCurStructure(!1),((P=F.value)==null?void 0:P.length)===0||Vo(B,z)},Fo=(p,v,B,z)=>{const P=[],D=[],re=we=>Object.keys(we).length;for(const we in p)if(p[we]!==void 0){const Ee=p[we],Ge=[];for(const[Fe,Qe]of Object.entries(Ee))Ge.push(Qe),D.length<re(Ee)&&D.push(Fe);P.push(Ge)}P.unshift(D);const le=ce.utils.aoa_to_sheet(P),q=ce.utils.book_new();ce.utils.book_append_sheet(q,le,z),ce.writeFileSync(q,`${v}.xlsx`),Hl.value=[]},Ai=async(p,v,B,z=!1,P)=>{try{sa.setRefreshCurStructure(!1)}catch(D){Ua.ElMessage.error(D)}},Ji=async(p,v)=>{await Ai()},Jr=async(p,v)=>{await Ai("columnType",v,p,!1)},jo=async({newRow:p,targetIndex:v})=>{var P;if(!xa(u.config,{type:Pe.TABLE}))return;const z=(ge.currentPage-1)*ge.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=Xn(z,Me.value||[]))}catch{}Me.value.splice(z,0,p),await e.nextTick(),h.value.has(p.id)||h.value.set(p.id,A.cloneDeep(p)),Me.value=(P=Me.value)==null?void 0:P.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===p.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),s.value.add(p.id),Ll.value=!0},Ho=(p,v,B,z=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const D=P==null?void 0:P.prop;if(!D)return;let re=p==null?void 0:p[D];if(re==null||String(re).trim()==="")return;re=String(re);const le=new Set([...(Array.isArray(B)?B:[]).filter(Ee=>(Ee==null?void 0:Ee.id)!==(p==null?void 0:p.id)).map(Ee=>Ee==null?void 0:Ee[D]).filter(Ee=>Ee!=null).map(Ee=>String(Ee)),...(Array.isArray(z)?z:[]).map(Ee=>Ee==null?void 0:Ee[D]).filter(Ee=>Ee!=null).map(Ee=>String(Ee))]);if(!le.has(re))return;let q=1,we="";for(;we=`${re}(${q})`,!!le.has(we);)q++;p[D]=we}),p),zi=async()=>{var P,D,re,le,q,we,Ee,Ge;const p=Array.from(s.value||[]);if(p.length===0)return;const v=(D=ce.getColumnChild((P=A.cloneDeep(F.value))==null?void 0:P.filter(Fe=>(Fe==null?void 0:Fe.label)!=="操作")))==null?void 0:D.filter(Fe=>(Fe==null?void 0:Fe.required)===!0);if((v==null?void 0:v.length)>0)for(let Fe=0;Fe<p.length;Fe++){const Qe=p[Fe],wa=(re=Me.value)==null?void 0:re.find(La=>(La==null?void 0:La.id)===Qe);if(wa)for(let La=0;La<v.length;La++){const Ia=v[La],ea=Ia==null?void 0:Ia.prop,Za=(Ia==null?void 0:Ia.label)??ea,ba=wa==null?void 0:wa[ea];if(ba===""||ba===null||ba===void 0||Array.isArray(ba)&&ba.length===0){Ua.ElMessage.error(`${Za}不能为空`);return}}}const B=[],z=[];if(p.forEach(Fe=>{var Za;const Qe=(Za=Me.value)==null?void 0:Za.find(ba=>(ba==null?void 0:ba.id)===Fe);if(!Qe)return;if(Qe!=null&&Qe._isTemp){const Qa=(ce.getAllLeafNodes(F.value)||[]).filter(T=>(T==null?void 0:T.mainKey)===!0||(T==null?void 0:T.isMainKey)===!0),be=Me.value.findIndex(T=>(T==null?void 0:T.id)===Fe),Ra=be>=0?be+1:Me.value.length+1;Ho(Qe,Qa,Me.value,B);const ga={id:Ra.toString()};(Qe==null?void 0:Qe.sort)!==void 0&&(Qe==null?void 0:Qe.sort)!==null&&String(Qe.sort).trim()!==""?ga.sort=String(Qe.sort):ga.sort=Xn(be>=0?be:Me.value.length-1,Me.value||[]),(ce.getAllLeafNodes(F.value)||[]).filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate").forEach(T=>{const G=T==null?void 0:T.prop;if(G){const Re=Qe[G];Re!==void 0?ga[G]=Re??"":ga[G]=""}}),B.push(ga);return}const La=(ce.getAllLeafNodes(F.value)||[]).filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),Ia=new Set(La.map(ba=>ba==null?void 0:ba.prop).filter(Boolean)),ea={};for(const ba of Ia)Object.prototype.hasOwnProperty.call(Qe,ba)&&(ea[ba]=Qe[ba]);z.push({id:Qe.id,value:{tableData:ea}})}),sa.setTableLoading(u==null?void 0:u.index),z.length>0){const Fe=z.map(wa=>{const La={id:wa.id,...wa.value.tableData};return delete La._isOCRRow,delete La._ocrTableId,delete La._isTemp,delete La.tableEditType,delete La.index,La}),Qe=[{tableName:((le=u==null?void 0:u.related)==null?void 0:le.find(wa=>wa==null?void 0:wa.includes("content")))??"content_"+(u==null?void 0:u.index),tableContents:Fe}];try{await A.pageBatchUpdateApi({platId:parseInt((q=ml.value)==null?void 0:q.plat_id),changeContents:Qe})}catch(wa){Ua.ElMessage.error(((Ee=(we=wa==null?void 0:wa.response)==null?void 0:we.data)==null?void 0:Ee.message)||(wa==null?void 0:wa.message)||"保存失败"),sa.setTableLoading(!1);return}}if(B.length>0){const Fe={fixContent:B,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};ze("change",Fe)}Ua.ElMessage.success("保存成功"),s.value.clear(),h.value.clear(),Me.value=(Ge=Me.value)==null?void 0:Ge.map(Fe=>({...Fe,tableEditType:"text"})),Ll.value=!1,sa.setRefreshCurStructure(!0)},Uo=()=>{var v;const p=Array.from(s.value||[]);if(p.length===0){Ll.value=!1;return}p.forEach(B=>{var D,re;const z=h.value.get(B),P=(D=Me.value)==null?void 0:D.find(le=>(le==null?void 0:le.id)===B);if(P!=null&&P._isTemp){Me.value=Me.value.filter(le=>(le==null?void 0:le.id)!==P.id);return}if(z){const le=(re=Me.value)==null?void 0:re.findIndex(q=>(q==null?void 0:q.id)===B);le!==-1&&(Me.value[le]={...Me.value[le],...z})}}),s.value.clear(),h.value.clear(),Me.value=(v=Me.value)==null?void 0:v.map(B=>({...B,tableEditType:"text"})),Ll.value=!1},Mi=e.ref(!1),Xi=async p=>{var P,D,re,le;if(!Ll.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((D=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:D.call(P))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(v)||((re=v==null?void 0:v.blur)==null||re.call(v),(le=p.preventDefault)==null||le.call(p),await e.nextTick(),await Zi())},Zi=async()=>{if(H.value){Ll.value=!1;return}if(!Mi.value){Mi.value=!0;try{Array.from(s.value||[]).length>0?await zi():Ll.value=!1}finally{Promise.resolve().then(()=>{Mi.value=!1})}}},qo=p=>{Hl.value=p},Qi=(p,v)=>{vr.value===v?er.value=!1:er.value=!0,vr.value=v==null?void 0:v.changeProp},ci=p=>{if(!p)return;const{item:v,value:B}=p,z=ya.value.find(P=>P.prop==v.prop);z&&z.contents.push({label:B,value:B})},fn=e.computed(()=>{var B,z,P;const p=(B=F.value)==null?void 0:B.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(z=F.value)==null?void 0:z.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:P.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Kn=async(p,v,B)=>{const z=A.cloneDeep(F.value);await e.nextTick();const P=z==null?void 0:z.map(re=>(B==null?void 0:B.label)===(re==null?void 0:re.label)?{...re,[v]:p}:re),D=Ii(P);await vs(u.index,D),F.value=P,ne.value=D},Ii=p=>{var P;const v=p||[];return((P=ce.getAllLeafNodes(v)||[])==null?void 0:P.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return t0(re,D)})},eo=async p=>{let v=await c0(u.index);v||(v=Ii(p)),ne.value=v},ao=async(p,v)=>{const B=A.cloneDeep(F.value),z=re=>Array.isArray(re)?re.map(le=>{const q=Array.isArray(le==null?void 0:le.children)&&le.children.length>0,we={...le};return(we==null?void 0:we.prop)==="operate"||(we==null?void 0:we.label)==="操作"||(we==null?void 0:we.type)==="operate"?(we.sortable=!1,we.filterable=!1,we.operable=!1):we.sortable=q?!1:!!p,q&&(we.children=z(we.children)),we}):re,P=z(B),D=Ii(P);await vs(u.index,D),F.value=P,ne.value=D,await e.nextTick(),Or.value=Or.value+1},lo=()=>{Y.value=!1},Gn=p=>{ze("clickTrigger",p)},ro=async p=>{var D,re,le,q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za,ba;const v=p==null?void 0:p.row,B=p==null?void 0:p.rowData,z=p==null?void 0:p.suffix;if((D=v==null?void 0:v.toString())!=null&&D.includes(".urdf")||p!=null&&p.isUrdf||z!=null&&z.includes(".urdf")){if(v.includes(",")){Ua.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(oe(v)){const be={files:[je(v)],data:{}};Ie(be);return}ye.value=[{url:v,extension:De(v)}],fe.value=!0,N.value={data:A.cloneDeep(B)},$e.value=!0;return}let P=[];if((re=v==null?void 0:v.toString())!=null&&re.includes(".stl")||(le=v==null?void 0:v.toString())!=null&&le.includes(".STL")||(q=v==null?void 0:v.toString())!=null&&q.includes(".obj")||(we=v==null?void 0:v.toString())!=null&&we.includes(".mtl")){const Qa=(Ee=v==null?void 0:v.toString())==null?void 0:Ee.split(","),be=la(Qa),Ra=be==null?void 0:be[0];if(oe(Ra==null?void 0:Ra.extension)){Ie({files:be,data:{}});return}ye.value=be,fe.value=!1,$e.value=!0;return}if((Ge=v==null?void 0:v.toString())!=null&&Ge.includes(".stl")||(Fe=v==null?void 0:v.toString())!=null&&Fe.includes(".STL")||(Qe=v==null?void 0:v.toString())!=null&&Qe.includes(".obj")||(wa=v==null?void 0:v.toString())!=null&&wa.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let Qa,be=[],Ra={};if(Array.isArray(v)?Qa=v:Qa=v==null?void 0:v.split(","),Qa==null||Qa.forEach(ga=>{ga.includes(".mtl")?be.push(ga):Ra.blob=Ra.blob?Ra.blob+","+ga:ga}),(be==null?void 0:be.length)>0&&(Ra.mtlBlobs=be),z&&(Ra.suffix=z),(Ia=(La=Object.values(Ra))==null?void 0:La[0])!=null&&Ia.includes("http:"))P.push(Ra);else{const ga=new Blob([Ra.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(ga),_a="";(ea=v==null?void 0:v.split("/"))==null||ea.forEach((T,G)=>{var Re;G===((Re=v==null?void 0:v.split("/"))==null?void 0:Re.length)-1&&(_a=T)}),(Za=Ra.blob)!=null&&Za.includes(".stl")&&(_a=(_a==null?void 0:_a.replaceAll(">",""))+".urdf"),ca.value=[{name:_a,blobUrl:Ea}],ee.value=!0}}else{const Qa=await Ua.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),be=new Blob([Qa.data],{type:"application/octet-stream;charset=UTF-8"});let Ra=URL.createObjectURL(be),ga="";if((ba=v==null?void 0:v.split("/"))==null||ba.forEach((Ea,_a)=>{var T;_a===((T=v==null?void 0:v.split("/"))==null?void 0:T.length)-1&&(ga=Ea)}),oe(ga)){const Ea=U(ga),_a=je(v);Ie({files:[_a],data:{trackFileType:Ea}});return}ca.value=[{name:ga,blobUrl:Ra}],ee.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},Yn=p=>{var z,P,D,re;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(re=(z=p==null?void 0:p.url)==null?void 0:z.split("."))==null?void 0:re[((D=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:D.length)-1];return(p==null?void 0:p.name)+"."+v},no=p=>{if(!p)return"未知文件";try{const z=Yn(p);if(typeof z=="string"&&z.includes("."))return z}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",B=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${B}`},io=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const B=Number(v[1]),z=Number(v[2]);return!Number.isFinite(B)||!Number.isFinite(z)?p:String(B*1e3+z)},Jn=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const B=Number(v);return Number.isFinite(B)?B:null},Wo=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const B=v.includes("T")?v:v.replace(" ","T"),z=Date.parse(B);return Number.isFinite(z)?z:null},ui=(p,v=[])=>{const B=Array.isArray(p)?p.slice():[];if(B.length<=1)return B;const z=new Map((v||[]).map((re,le)=>[String(re),le])),P=B.some(re=>Jn(re==null?void 0:re.sort)!==null),D=B.map((re,le)=>({r:re,idx:le,id:String((re==null?void 0:re.id)??""),sortVal:Jn(re==null?void 0:re.sort),createTimeMs:Wo(re==null?void 0:re.create_time),prevIdx:z.has(String(re==null?void 0:re.id))?z.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,le)=>{if(P){const Ee=re.sortVal,Ge=le.sortVal;if(Ee===null&&Ge!==null)return 1;if(Ee!==null&&Ge===null)return-1;if(Ee!==null&&Ge!==null&&Ee!==Ge)return Ee-Ge}const q=re.createTimeMs,we=le.createTimeMs;return q!==null&&we!==null&&q!==we?we-q:q!==null&&we===null?-1:q===null&&we!==null?1:re.prevIdx!==le.prevIdx?re.prevIdx-le.prevIdx:re.idx-le.idx}),D.map(re=>re.r)},Xn=(p,v=[])=>{const B=v==null?void 0:v[p-1],z=v==null?void 0:v[p],P=Jn(B==null?void 0:B.sort),D=Jn(z==null?void 0:z.sort);let re=null;P!==null&&D!==null&&D>P?re=(P+D)/2:P!==null?re=P+1:D!==null?re=Math.max(D-1,0):re=(p??0)+1;const le=Number(re.toFixed(6));return String(Number.isFinite(le)?le:re)},di=async p=>{let v=null,B=null;if(p!=null&&p.id){const P=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),B=no(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await pi(),D=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await Ua.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),B=p==null?void 0:p.name}else{const P=await A.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),B=Yn(p)):v=p==null?void 0:p.url}if(oe(v)){const P={row:`${v}`,suffix:De(B)};ro(P);return}const z={name:B,blobUrl:v};ca.value=[z],ee.value=!0},Ko=async p=>{let v=null,B=null;if(p!=null&&p.id){const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),B=no(p)}else if(p!=null&&p.downloadUrl){const D=await pi(),re=await Ua.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:D,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),B=p==null?void 0:p.name}else{const D=await A.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(D.data),B=Yn(p)}const z={name:B,blobUrl:v},P=document.createElement("a");P.href=z.blobUrl,P.download=z.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},Oi=(p,v)=>{var z;if(Object.values(v).length===0)return;let B=p;return Object.values(v).find(P=>{var D,re,le;return((D=P==null?void 0:P.toString())==null?void 0:D.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((le=P==null?void 0:P.toString())==null?void 0:le.includes(".obj"))})?B=[...p,me.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(B=[...p,{label:"迁移"}]),B},Go=()=>{I.value=!0},Yo=e.ref([]),oo=async(p,v,B=!1)=>{var re,le,q,we;if(!p)return;if(B){Me.value=[...Oa.value.values()].filter(Ee=>Object.values(Ee).some(Ge=>typeof Ge=="string"?Ge==null?void 0:Ge.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let z={};for(let Ee in p)(p==null?void 0:p[Ee])!==""&&(z[Ee]=p==null?void 0:p[Ee]);if(JSON.stringify(z)==="{}"){Me.value=Array.from(((re=Oa.value)==null?void 0:re.values())??[]);return}let P=(le=u==null?void 0:u.related)==null?void 0:le.find(Ee=>Ee==null?void 0:Ee.includes("content_")),D=await A.getFillFind({platId:parseInt((q=ml==null?void 0:ml.value)==null?void 0:q.plat_id),tableName:P,params:z});D=(we=D==null?void 0:D.data)==null?void 0:we.result,Me.value=D,sa.setTableLoading(!1)},Zn=e.computed(()=>{var v,B;return((B=(v=u==null?void 0:u.itemData)==null?void 0:v.find(z=>(z==null?void 0:z.key)==="isEdit"))==null?void 0:B.contents)??!0}),Bn=async p=>{var z,P,D,re;if(!xa(u.config,{type:Pe.TABLE})||!(((P=(z=u==null?void 0:u.itemData)==null?void 0:z.find(le=>(le==null?void 0:le.key)==="isEdit"))==null?void 0:P.contents)??!0)||!p)return;((D=Array.from(s.value))==null?void 0:D.length)>0&&await zi();const B=p==null?void 0:p.id;B!=null&&(s.value.clear(),h.value.clear(),h.value.has(B)||h.value.set(B,A.cloneDeep(p)),Me.value=(re=Me.value)==null?void 0:re.map(le=>({...le,tableEditType:(le==null?void 0:le.id)===B?"edit":"text"})),s.value.add(B),Ll.value=!0)},Li=async(p,v,B,z)=>{z!=null&&z.isExistChild&&ze("clickMainKey",p,B,F.value)},Ri=()=>{ee.value=!1},Jo=p=>{ze("rowClick",p)};e.watch(()=>u.changedContent,()=>{var B,z;if(!u.changedContent)return;let p=(B=Me.value)==null?void 0:B.map(P=>{var D;return P.id===((D=u.changedContent)==null?void 0:D.id)&&(P={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete P.newId),P});const v=(z=u.itemData)==null?void 0:z.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));Me.value=p,ze("contentChange",{contents:v,index:u.index}),ze("change",{content:p,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Xo=()=>{},Zo=async()=>{const p=Se.value,v=sessionStorage.getItem("systemKey"),B=await ce.getItemData(p,v,""),z=(B==null?void 0:B.find(le=>(le==null?void 0:le.name)==="方法明细"))||(B==null?void 0:B[0]),P=(z==null?void 0:z.compData)||[],D=P==null?void 0:P.find(le=>{const q=le==null?void 0:le.key;return q==="formContent"||q==="tableContents"});return D==null?void 0:D.contents},pi=async()=>{const v=Ua.Local.get("access-token");return v?`Bearer ${v}`:""},Qo=async(p,{token:v,inputData:B}={})=>await Ua.axios.post(p,B,{headers:{Authorization:v}}).catch(P=>(ue.setImportLoading(!1),Promise.reject(P))),et=p=>{var z;let v={};const B=[];return v.form={},(z=A.cloneDeep(p))==null||z.forEach((P,D)=>{var re,le,q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za,ba;if((P==null?void 0:P.comp)==="Table"){(le=(re=P==null?void 0:P.compData)==null?void 0:re.find(ga=>(ga==null?void 0:ga.key)==="header"))==null||le.contents;let Qa=(Ee=(we=(q=P==null?void 0:P.compData)==null?void 0:q.find(ga=>(ga==null?void 0:ga.key)==="tableContents"))==null?void 0:we.contents)==null?void 0:Ee.map(ga=>ga.slice(1));(La=(wa=(Qe=(Fe=(Ge=P==null?void 0:P.compData)==null?void 0:Ge.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:Fe.contents)==null?void 0:Qe[0])==null?void 0:wa[0])==null||La.label;let be=(ea=(Ia=P==null?void 0:P.compData)==null?void 0:Ia.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:ea.contents,Ra=[];Qa==null||Qa.forEach(ga=>{let Ea=[];ga==null||ga.forEach((_a,T)=>{var Re;let G={};((Re=be[T])==null?void 0:Re.label)!=="操作"&&(G[be[T].label]=_a,Ea.push(G))}),Ra.push(Ea)}),v[P.name]=Ra}else{const Qa=(ba=(Za=P.compData)==null?void 0:Za.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:ba.contents;Qa==null||Qa.forEach(be=>{var Ra,ga;if(be.prop!==""){let Ea=be==null?void 0:be.value;Array.isArray(Ea)?Ea=((Ra=Ea==null?void 0:Ea[0])==null?void 0:Ra.oldUrl)||"http://222.92.178.198:62001/"+((ga=Ea==null?void 0:Ea[0])==null?void 0:ga.url):Ea=Ea.toString(),be={key:(be==null?void 0:be.prop)??(be==null?void 0:be.label),value:Ea},B.push(be)}})}}),v.form=ce.getFormContents(B),v},at=p=>{const v=[],B=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(B):v.push(z)};return B(p),v},lt=async(p,v,B)=>{var be,Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl;ue.setImportLoading(!0),sa.setFreshContent(!1);let z=await Zo().catch(Ha=>(ue.setImportLoading(!1),Promise.reject(Ha)));z=z==null?void 0:z.filter(Ha=>{var kl;return((kl=Ha==null?void 0:Ha.find(Fa=>Fa==null?void 0:Fa.id))==null?void 0:kl.id)===(v==null?void 0:v.id)});let P=ce.getEqualChild([(be=F.value)==null?void 0:be.filter(Ha=>(Ha==null?void 0:Ha.label)!=="操作")]);const D=(ga=(Ra=ce.tableToForm(z,P))==null?void 0:Ra[0])==null?void 0:ga.find(Ha=>{const kl=Ha==null?void 0:Ha.key;return kl==="Interface"||kl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),ue.setImportLoading(!1);return}const le=F.value?ce.getEqualChild([F.value]):[],q=le.find(Ha=>{const kl=Ha==null?void 0:Ha.prop;return kl==="Input1"||kl==="输入数据.输入1"||kl==="样本输入数据"}),we=q==null?void 0:q.prop;let Ee=v==null?void 0:v[we];const Ge=await pi().catch(Ha=>(ue.setImportLoading(!1),Promise.reject(Ha)));let Fe=!0,Qe="";(Ea=F.value)==null||Ea.forEach(Ha=>{(Ha==null?void 0:Ha.prop)===we&&(Fe=!!(Ha!=null&&Ha.childPath),Qe=Ha==null?void 0:Ha.childPath)});let wa="";if(Fe){let Ha=(T=(_a=F.value)==null?void 0:_a.find(ul=>(ul==null?void 0:ul.isMainKey)===!0))==null?void 0:T.prop;wa=v==null?void 0:v[Ha];let kl=Qe==null?void 0:Qe.split(S),Fa=[];kl==null||kl.forEach((ul,Sl)=>{(kl==null?void 0:kl.length)-1===Sl&&Fa.push(wa),Fa.push(ul)}),Fa=Fa==null?void 0:Fa[0];let cl=await ce.getItemData(Fa,sessionStorage.getItem("systemKey"),""),Ka=cl==null?void 0:cl.filter(ul=>(ul==null?void 0:ul.name)===we);Ka=Ka==null?void 0:Ka.map(ul=>{var Sl;return ul.compData=(Sl=ul==null?void 0:ul.compData)==null?void 0:Sl.map(Bl=>{var Dr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(Dr=Bl==null?void 0:Bl.contents)==null?void 0:Dr.filter($l=>($l==null?void 0:$l[1])===(v==null?void 0:v[we]))),Bl}),ul}),(!Ka||(Ka==null?void 0:Ka.length)===0)&&(Ka=cl,Ka=Ka==null?void 0:Ka.map(ul=>{var Sl;return ul.compData=(Sl=ul==null?void 0:ul.compData)==null?void 0:Sl.map(Bl=>{var Dr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(Dr=Bl==null?void 0:Bl.contents)==null?void 0:Dr.filter($l=>{var wl,Ml;return($l==null?void 0:$l[1])===(v==null?void 0:v[(Ml=(wl=F==null?void 0:F.value)==null?void 0:wl[0])==null?void 0:Ml.prop])})),Bl}),ul})),Ee=et(Ka)}const La=await Qo(re,{token:Ge,inputData:Ee}).catch(Ha=>(ue.setImportLoading(!1),Promise.reject(Ha))),Ia=(G=La==null?void 0:La.data)==null?void 0:G.data,ea=le.find(Ha=>(Ha==null?void 0:Ha.prop)==="Output1"),Za=ea==null?void 0:ea.prop;let ba=[],Qa=[];if(Ia&&((Re=Object.values(Ia))==null?void 0:Re.length)>0){let Ha=[];const kl=new FormData,Fa=(ia=at(Ia))==null?void 0:ia.map(async Ka=>{var ul,Sl;if(!Array.isArray(Ka)&&(Ka!=null&&Ka.includes("http"))){let Bl=await Ua.axios.get(Ka,{responseType:"blob"}),Dr=(Sl=Ka==null?void 0:Ka.split("/"))==null?void 0:Sl[((ul=Ka==null?void 0:Ka.split("/"))==null?void 0:ul.length)-1];kl.append("files",Bl.data,Dr)}else Ha.push(Ka)});if(await Promise.all(Fa),!ce.isFormDataEmpty(kl)){let Ka=await A.uploadAmountApi(kl),ul=(ua=(_e=Ka==null?void 0:Ka.data)==null?void 0:_e.result)==null?void 0:ua.map(Sl=>{var Bl,Dr,$l,wl,Ml,Jl;return{name:(Jl=(Ml=(wl=(Bl=Sl==null?void 0:Sl.url)==null?void 0:Bl.split("/"))==null?void 0:wl[(($l=(Dr=Sl==null?void 0:Sl.url)==null?void 0:Dr.split("/"))==null?void 0:$l.length)-1])==null?void 0:Ml.split("."))==null?void 0:Jl[0],url:Sl==null?void 0:Sl.url}});Ha=[...Ha,...ul]}let cl={};for(let Ka in v)Ka!=="id"&&(cl[Ka]=v[Ka]);cl[Za]=Ha,Qa.push({id:v==null?void 0:v.id,value:{tableData:cl}})}if((Qa==null?void 0:Qa.length)>0){const Ha=Qa.map(Fa=>{const cl={id:Fa.id,...Fa.value.tableData};return delete cl._isOCRRow,delete cl._ocrTableId,delete cl._isTemp,delete cl.tableEditType,delete cl.index,cl}),kl=[{tableName:(Na=u==null?void 0:u.related)==null?void 0:Na.find(Fa=>Fa==null?void 0:Fa.includes("content")),tableContents:Ha}];await A.pageBatchUpdateApi({platId:parseInt((rl=ml.value)==null?void 0:rl.plat_id),changeContents:kl})}if((ba==null?void 0:ba.length)>0)try{await A.pageBatchAddApi({platId:parseInt((qa=ml.value)==null?void 0:qa.plat_id),changeContents:[{tableName:(fl=u==null?void 0:u.related)==null?void 0:fl.find(Ha=>Ha==null?void 0:Ha.includes("content")),tableContents:ba.map(Ha=>{var Fa,cl,Ka;const kl={id:((Fa=Ha==null?void 0:Ha.key)==null?void 0:Fa.id)??((cl=Ha==null?void 0:Ha.key)==null?void 0:cl.rowId)??(Ha==null?void 0:Ha.id),...((Ka=Ha==null?void 0:Ha.value)==null?void 0:Ka.tableData)||{}};return delete kl._isOCRRow,delete kl._ocrTableId,delete kl._isTemp,delete kl.tableEditType,delete kl.index,Object.keys(kl).forEach(ul=>{ul==="证书附件"&&Array.isArray(kl[ul])&&(kl[ul]=JSON.stringify(kl[ul]))}),kl})}]})}catch(Ha){Ua.ElMessage.error(((Pl=(hl=Ha==null?void 0:Ha.response)==null?void 0:hl.data)==null?void 0:Pl.message)||(Ha==null?void 0:Ha.message)||"保存失败"),sa.setTableLoading(!1);return}Pi(!0),ue.setImportLoading(!1),sa.setFreshContent(!0)},to=(p,v)=>(p=p==null?void 0:p.map(B=>{var z,P;return B!=null&&B.children&&((z=B.children)!=null&&z.find(D=>D.id===(v==null?void 0:v.id))?B.children=(P=B.children)==null?void 0:P.filter(D=>(D==null?void 0:D.id)!==(v==null?void 0:v.id)):B.children=to(B.children,v)),B}),p),fi=e.ref(!1),t=()=>{fi.value=!0},i=async p=>{var B,z,P,D;fi.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const re of v){const le={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};$a.value.push(le),ir(le,"uploading"),Il(le,0);try{const q=new FormData;q.append("file",re,le.name);const we=await A.platformUploadFile(q);le.uploadResult=((B=we==null?void 0:we.data)==null?void 0:B.result)||{name:le.name,url:"",fileName:le.name},Fl({name:((z=le.uploadResult)==null?void 0:z.name)||le.name,url:((P=le.uploadResult)==null?void 0:P.url)||"",id:(D=le.uploadResult)==null?void 0:D.id}),ir(le,"uploaded"),Il(le,100)}catch(q){console.error("文件上传失败:",q),Ua.ElMessage.error(`文件 ${le.name} 上传失败,请重试`),ir(le,"pending"),Il(le,0);const we=$a.value.findIndex(Ee=>Ee.uid===le.uid);we>-1&&$a.value.splice(we,1)}}},f=e.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:(p,v,B)=>{v===(u==null?void 0:u.index)?B(new Error("选择源不能和目标源一致")):B()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),y=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],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:""}),_=()=>{y.show=!1},O=async p=>{var v,B,z,P,D,re,le,q;try{const we=[];let Ee=(v=Me.value||[])==null?void 0:v.slice();(p||[]).forEach(La=>{const Ia={...La};try{Ia.sort=Xn(0,Ee)}catch{}we.push(Ia),Ee.unshift(Ia)});let Ge=await A.quoteApi({platId:parseInt((B=ml==null?void 0:ml.value)==null?void 0:B.plat_id),type:"fatherSyncs",related:[{menus:Se.value,groups:""},{menus:Se.value,groups:u==null?void 0:u.compName}]});Ge=(z=Ge==null?void 0:Ge.data)==null?void 0:z.result;let Fe=Ge==null?void 0:Ge.map(La=>({tableName:"content_"+(La==null?void 0:La.id),tableContents:we==null?void 0:we.map((Ia,ea)=>({id:ea,...Ia}))})),Qe=[{tableName:(P=u==null?void 0:u.related)==null?void 0:P.find(La=>La==null?void 0:La.includes("content")),tableContents:we==null?void 0:we.map((La,Ia)=>({id:Ia,...La}))}];Qe=[...Qe,...Fe];const wa=await A.pageBatchAddApi({platId:parseInt((D=ml.value)==null?void 0:D.plat_id),changeContents:Qe});if(((re=wa==null?void 0:wa.data)==null?void 0:re.code)===200){const La={buttonName:"新增",columns:F.value,fixContent:we==null?void 0:we.map((ea,Za)=>({id:Za,...ea})),relatedContents:u==null?void 0:u.related};await wt(La),Ua.ElMessage.success("数据导入成功");let Ia=[];Qe==null||Qe.forEach(ea=>{var Za;(Za=ea==null?void 0:ea.tableContents)==null||Za.forEach(ba=>{Ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ba),request_result:"{}",is_delete:!1,request_table:ea==null?void 0:ea.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((le=ml==null?void 0:ml.value)==null?void 0:le.plat_id),changeContents:[{tableName:"log",tableContents:Ia}]})}else{let La=[];Qe==null||Qe.forEach(Ia=>{var ea;(ea=Ia==null?void 0:Ia.tableContents)==null||ea.forEach(Za=>{La.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Za),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((q=ml==null?void 0:ml.value)==null?void 0:q.plat_id),changeContents:[{tableName:"log",tableContents:La}]}),Ua.ElMessage.error("数据导入响应失败")}}catch(we){throw new Error(we)}},K=async p=>{var v,B,z,P,D,re,le,q,we,Ee;try{if(p==="cancel"&&(y.show=!1),p==="replace"&&((v=y==null?void 0:y.existRows)==null?void 0:v.length)>0){await A.pageBatchDeleteApi({platId:parseInt((B=ml.value)==null?void 0:B.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(Fe=>Fe==null?void 0:Fe.includes("content_")))||((P=u==null?void 0:u.related)==null?void 0:P.find(Fe=>Fe==null?void 0:Fe.includes("content"))),tableContents:y==null?void 0:y.existRows}]});const Ge=await A.pageBatchAddApi({platId:parseInt((D=ml.value)==null?void 0:D.plat_id),changeContents:[{tableName:(re=u==null?void 0:u.related)==null?void 0:re.find(Fe=>Fe==null?void 0:Fe.includes("content")),tableContents:(()=>{const Fe=(Me.value||[]).filter(Ia=>!((y==null?void 0:y.existRows)||[]).some(ea=>String(ea==null?void 0:ea.id)===String(Ia==null?void 0:Ia.id))),Qe=(y==null?void 0:y.tableData)||[],wa=[];let La=Fe.slice();return Qe.forEach(Ia=>{const ea={...Ia};try{ea.sort=Xn(0,La)}catch{}wa.push(ea),La.unshift(ea)}),wa.map((Ia,ea)=>({id:ea,...Ia}))})()}]});if(((le=Ge==null?void 0:Ge.data)==null?void 0:le.code)!==200)return;(q=y.newRows)!=null&&q.length&&await O(y.newRows),await wt({buttonName:"新增",columns:F.value,fixContent:(we=y==null?void 0:y.tableData)==null?void 0:we.map((Fe,Qe)=>({id:Qe,...Fe})),relatedContents:u==null?void 0:u.related}),(Ee=y.newRows)!=null&&Ee.length||Ua.ElMessage.success("数据导入成功")}}catch(Ge){throw new Error(Ge)}finally{y.show=!1,y.columns=[],y.tableData=[],y.existRows=[]}},Q=()=>{f.show=!1},ke=p=>{var v,B;if((p==null?void 0:p.buttonName)==="取消")return f.show=!1;f.to=p==null?void 0:p.content,!(!(u!=null&&u.index)||!((v=f.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((B=f.to)==null?void 0:B.groupName)&&(ze("change",{buttonName:"迁移",value:{from:f.from,to:f.to,data:f.selectRow}}),f.show=!1)},He=async p=>{var v,B,z,P;if(p){if(!Ir.validateFileSize(p.raw)){Ua.ElMessage.warning(`文件大小不能超过 ${Rr.value.maxSize}MB`);const D=$a.value.findIndex(re=>re.uid===p.uid);D>-1&&$a.value.splice(D,1),Ce();return}if(!Ir.validateFileType(p.raw)){Ua.ElMessage.warning("请上传图片文件");const D=$a.value.findIndex(re=>re.uid===p.uid);D>-1&&$a.value.splice(D,1),Ce();return}ir(p,"uploading"),Il(p,0);try{const D=new FormData;D.append("file",p.raw,p.name);const re=await A.platformUploadFile(D);p.uploadResult=((v=re==null?void 0:re.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},Fl({name:((B=p.uploadResult)==null?void 0:B.name)||p.name,url:((z=p.uploadResult)==null?void 0:z.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),ir(p,"uploaded"),Il(p,100)}catch(D){console.error("文件上传失败:",D),Ua.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),ir(p,"pending"),Il(p,0);const re=$a.value.findIndex(le=>le.uid===p.uid);re>-1&&$a.value.splice(re,1)}finally{Ce()}}},Ce=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},ra=async()=>{var B,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),$a.value.length===0){Ua.ElMessage.warning("请先选择要上传的图片");return}if($a.value.filter(P=>{const D=Dl(P);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){Ua.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ol.value=!0,Xe.value=0;let v=null;try{$a.value.forEach(ea=>{ir(ea,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{Xe.value<P?Xe.value+=1:clearInterval(v)},50);const D=$a.value.map(ea=>{var Za,ba,Qa;return{name:((Za=ea.uploadResult)==null?void 0:Za.name)||ea.name,url:((ba=ea.uploadResult)==null?void 0:ba.url)||"",fileName:((Qa=ea.uploadResult)==null?void 0:Qa.fileName)||ea.name}}),re=Ir.extractTableHeaders(F.value),le=D.map(ea=>({name:(ea==null?void 0:ea.fileName)||(ea==null?void 0:ea.name),url:(ea==null?void 0:ea.url)||""})),q=await Ir.recognize(le,re);if(console.log(q,"ocrResult"),clearInterval(v),v=null,(q==null?void 0:q.code)===500||(q==null?void 0:q.type)==="error"||!(q!=null&&q.result)){Xe.value=0,$a.value.forEach(ea=>{ir(ea,"failed"),Il(ea,0)}),Ua.ElMessage.error((q==null?void 0:q.message)||"OCR识别失败,请重试"),ol.value=!1;return}Xe.value=P;const we=Array.isArray(q==null?void 0:q.result)?q.result:[];if(we.length===0){Xe.value=0,$a.value.forEach(ea=>{ir(ea,"failed"),Il(ea,0)}),Ua.ElMessage.warning("OCR识别未返回有效数据"),ol.value=!1;return}const Ee=new Set,Ge=[];we.forEach((ea,Za)=>{const ba=ea!=null&&ea.数据&&typeof(ea==null?void 0:ea.数据)=="object"?ea.数据:{},Qa=Array.isArray(ea==null?void 0:ea.图片信息)?ea.图片信息:[],be=new Map;Qa.forEach(ga=>{ga!=null&&ga.name&&be.set(ga.name,ga.url||"")});const Ra={_index:Za,_certType:(ea==null?void 0:ea.证书类型)||"",_certNo:(ea==null?void 0:ea.证书编号)||"",_ocrImages:Qa,__ocrFieldMeta:{}};Object.entries(ba).forEach(([ga,Ea])=>{let _a="",T=0,G=[],Re="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(_a=(Ea==null?void 0:Ea.value)??"",T=(Ea==null?void 0:Ea.score)??0,G=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],Re=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(_a=Ea[0]??"",T=Ea[1]??0):(_a=Ea??"",T=0),Ra[ga]=_a,Ra[`${ga}_accuracy`]=T,Ee.add(ga),Ra.__ocrFieldMeta[ga]={value:_a,score:T,bboxNorm:G,imageName:Re,imageUrl:Re&&be.get(Re)||"",images:Qa}}),Ge.push(Ra)});const Fe=[],Qe=new Set;Ge.forEach(ea=>{ea&&Ee.forEach(Za=>{const ba=ea[`${Za}_accuracy`];(typeof ba=="number"?ba>0:ba!=null&&String(ba).trim()!==""&&String(ba)!=="0")&&Qe.add(Za)})}),Ee.forEach(ea=>{Fe.push({prop:ea,label:ea,editable:!0,minWidth:230}),Qe.has(ea)&&Fe.push({prop:`${ea}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),$a.value.forEach(ea=>{ir(ea,"completed")}),Xe.value=100,ka.value=Fe,Ze.value=Ge,Ue.value=D,fa.value=q;const wa=["出厂编号","设备名称","制造厂"],La=Fe.filter(ea=>ea&&!ea.isAccuracy&&typeof ea.prop=="string").map(ea=>ea.prop),Ia=["出厂编号","设备名称","制造厂"];oa.value=La.filter(ea=>Ia.includes(ea)),console.log("[OCR] 默认勾选字段 props:",oa.value),Ma.value=2,ol.value=!1,Aa.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),Ua.ElMessage.error(((z=(B=P==null?void 0:P.response)==null?void 0:B.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ol.value=!1,Xe.value=0,$a.value.forEach(D=>{ir(D,"pending"),Il(D,0)})}},Ba=p=>{if(p==null)return"";let v=String(p);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,B=>String.fromCharCode(B.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},Xa=()=>{var ea,Za;const p=Ue.value,v=fa.value,B=Ze.value;if(!B||B.length===0){Ua.ElMessage.warning("暂无数据可添加");return}const z=(ea=ce.getAllLeafNodes(F.value)||[])==null?void 0:ea.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),P=new Map,D=new Map,re=(Za=z==null?void 0:z.find(ba=>(ba==null?void 0:ba.label)==="证书附件"))==null?void 0:Za.prop;z==null||z.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&(P.set(ba.label,ba.prop),D.set(ba.prop,ba.label))});const le=Date.now(),q=ba=>String(le*1e3+ba),we=[],Ee=[],Ge=ba=>{const Qa=Do&&Do[ba]||[ba];for(const be of Qa){const Ra=P.get(be);if(Ra)return Ra}return""},Fe=Ge("出厂编号"),Qe=Ge("设备名称"),wa=Ge("制造厂"),La=[],Ia=ba=>{var _a,T;if(!re)return[];const Qa=(Array.isArray(p)?p[ba]:null)||null,be=(Qa==null?void 0:Qa.url)||"",Ra=(Qa==null?void 0:Qa.fileName)||(Qa==null?void 0:Qa.name)||"";return(String(Ra).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf"))&&be?[{url:be,name:Ra,fileName:Ra}]:(Array.isArray((T=(_a=v==null?void 0:v.result)==null?void 0:_a[ba])==null?void 0:T.图片信息)?v.result[ba].图片信息:[]).map(G=>({url:(G==null?void 0:G.url)||"",name:(G==null?void 0:G.name)||"",fileName:(G==null?void 0:G.name)||""})).filter(G=>G.url)};if(B.forEach((ba,Qa)=>{var rl;const be={id:q(Qa),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[qa,fl]of P.entries())Object.prototype.hasOwnProperty.call(ba,qa)&&(be[fl]=ba[qa]);re&&(be[re]=Ia(Qa));const Ra=(Array.isArray(v==null?void 0:v.result)?v.result[Qa]:null)||null,ga=(Array.isArray(p)?p[Qa]:null)||null,Ea=(ga==null?void 0:ga.url)||"",_a=(ga==null?void 0:ga.fileName)||(ga==null?void 0:ga.name)||"",T=String(_a).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),G={ts:Date.now(),versionId:String(Date.now())+"_"+String(Qa),label:new Date().toLocaleString(),certType:(Ra==null?void 0:Ra.证书类型)||"",certNo:(Ra==null?void 0:Ra.证书编号)||"",fileType:T?"pdf":"image",sourceUrl:T?Ea:"",images:Array.isArray(Ra==null?void 0:Ra.图片信息)?Ra.图片信息.map(qa=>({name:(qa==null?void 0:qa.name)||"",url:(qa==null?void 0:qa.url)||""})).filter(qa=>qa.url):[]},Re=qa=>Ba(qa?be==null?void 0:be[qa]:""),ia=Re(Fe),_e=Re(Qe),ua=Re(wa);if(!!(Fe&&Qe&&wa&&ia&&_e&&ua)){const qa=(Me.value||[]).find(fl=>{const hl=Ba(Fe?fl==null?void 0:fl[Fe]:""),Pl=Ba(Qe?fl==null?void 0:fl[Qe]:""),Ha=Ba(wa?fl==null?void 0:fl[wa]:"");return hl&&Pl&&Ha&&hl===ia&&Pl===_e&&Ha===ua});if(qa){La.push({idx:Qa,ocrRow:be,versionItem:G,ocrNo:ia,candidates:[qa],selectedTargetId:String((qa==null?void 0:qa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ia&&Fe){const qa=(Me.value||[]).filter(fl=>{const hl=Ba(Fe?fl==null?void 0:fl[Fe]:"");return hl&&hl===ia});if(qa.length>0){La.push({idx:Qa,ocrRow:be,versionItem:G,ocrNo:ia,candidates:qa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(be.sort===void 0||be.sort===null||String(be.sort).trim()===""){const qa=(Me.value||[]).map(hl=>Jn(hl==null?void 0:hl.sort)).filter(hl=>hl!==null),fl=qa.length>0?Math.max(...qa):((rl=Me.value)==null?void 0:rl.length)??0;be.sort=String(Number((fl+1).toFixed(6)))}}catch{}Da(u==null?void 0:u.index,be.id,G),La.push({idx:Qa,ocrRow:be,versionItem:G,ocrNo:ia,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(La||[]).length>0){Zl.value=(La||[]).map(ba=>({...ba,selectedTargetId:(ba==null?void 0:ba.selectedTargetId)||""})),ur.value=!0,rr.value=Ee,dr.value=we,yr.value=v,Oe.value=p,Ql.value=re||"";return}},Wa=(p,v,B)=>{Ze.value[p]&&(Ze.value[p][v]=B)},el=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,_l=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},bl=p=>{var B,z,P,D;if(il.value===p){il.value=null,Pa.value=!1,Le.value="";return}il.value=p,Le.value="";const v=(B=Ze.value)==null?void 0:B[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){sl.value=v._ocrImages.map(q=>({name:(q==null?void 0:q.name)||"",url:(q==null?void 0:q.url)||""})).filter(q=>q.name||q.url);const re=v.__ocrFieldMeta||{},le=(z=Object.values(re))==null?void 0:z.find(q=>q==null?void 0:q.imageName);fr.value=(le==null?void 0:le.imageName)||((D=(P=sl.value)==null?void 0:P[0])==null?void 0:D.name)||"",Pa.value=sl.value.length>0}else sl.value=[],Pa.value=!1,fr.value=""},Cl=()=>{dl.value=!1,$a.value=[],tl.value=null,Ma.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0,Pa.value=!1},Ul=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",Dl=p=>{const v=p.uid||p.name;return Je.value.get(v)||"pending"},Ol=p=>{const v=p.uid||p.name;return ie.value.get(v)||0},Il=(p,v)=>{const B=p.uid||p.name;ie.value.set(B,Math.min(100,Math.max(0,v)))},Xr=p=>{const v=Dl(p),B=100.53;if(v==="completed"||v==="uploaded")return`${B} ${B}`;if(v==="failed")return`${B} ${B}`;if(v==="uploading"){const z=Ol(p);return`${B*(z/100)} ${B}`}else if(v==="processing")return`${B*.5} ${B}`;return`0 ${B}`},ir=(p,v)=>{const B=p.uid||p.name;Je.value.set(B,v),(v==="completed"||v==="uploaded")&&Il(p,100)},ln=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async B=>{const z=Array.from(B.target.files||[]);for(const P of z){const D={name:P.name,raw:P,uid:Date.now()+Math.random()};$a.value.push(D),await He(D)}B.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},hn=()=>{Ma.value>1&&Ma.value--},En=()=>{Ma.value===1?$a.value.length>0&&!ol.value&&ra():Ma.value===2&&(Xa(),Ma.value=3)},hi=async p=>{await Tt(p==null?void 0:p.row)},Qn=async({row:p,prop:v})=>{!p||!v||await Tt(p,v)},Tt=async(p,v)=>{var P,D;const B=p==null?void 0:p.id;if(!B){Ua.ElMessage.warning("暂无可预览数据");return}let z=jl(u==null?void 0:u.index,B);if(!z||z.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),le=re!==null?Number(re):null;if(le!=null&&le!==""&&!Number.isNaN(le)){const q=jl(le,B);Array.isArray(q)&&q.length>0&&(Rl(u==null?void 0:u.index,B,q),z=q)}}if(!z||z.length===0){const re=(P=ce.getAllLeafNodes(F.value)||[])==null?void 0:P.filter(q=>(q==null?void 0:q.type)!=="operate"&&(q==null?void 0:q.label)!=="操作"&&(q==null?void 0:q.prop)!=="operate"),le=v||((D=re==null?void 0:re.find(q=>(q==null?void 0:q.label)==="证书附件"))==null?void 0:D.prop);if(le&&p[le]){const q=p[le];let we=[],Ee="",Ge=!1;if(typeof q=="string")try{const Fe=JSON.parse(q);Array.isArray(Fe)&&(we=Fe.map(Qe=>({name:(Qe==null?void 0:Qe.name)||(Qe==null?void 0:Qe.fileName)||"",url:(Qe==null?void 0:Qe.url)||""})).filter(Qe=>Qe.url||Qe.name),we.length>0&&(Ee=we[0].url||"",Ge=String(we[0].name).toLowerCase().endsWith(".pdf")||String(Ee).toLowerCase().endsWith(".pdf")))}catch{Ee=q,Ge=String(q).toLowerCase().endsWith(".pdf"),we=[{name:q,url:q}]}else Array.isArray(q)&&(we=q.map(Fe=>({name:(Fe==null?void 0:Fe.name)||(Fe==null?void 0:Fe.fileName)||"",url:(Fe==null?void 0:Fe.url)||""})).filter(Fe=>Fe.url||Fe.name),we.length>0&&(Ee=we[0].url||"",Ge=String(we[0].name).toLowerCase().endsWith(".pdf")||String(Ee).toLowerCase().endsWith(".pdf")));if(we.length>0||Ee){const Fe={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ge?"pdf":"image",sourceUrl:Ge?Ee:"",images:we};z=[Fe],Da(u==null?void 0:u.index,B,Fe)}}}if(!z||z.length===0){Ua.ElMessage.warning("暂无可预览数据");return}Te.value=z,ll.value=!0},iu=p=>{$a.value=$a.value.filter((v,B)=>B!==p)},rt=async(p,v,B)=>{var z,P,D,re,le,q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za,ba,Qa,be,Ra,ga;if(xa(u.config,{type:Pe.TABLE,tableOperate:p})){if(za.value="",Ve.value=!0,pa.value=!0,ze("onButtonClick",p,v),ae.value=[],p==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,_a,T,G;(Ea=Me.value)!=null&&Ea.find(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id))?Me.value=(_a=A.cloneDeep(Me.value))==null?void 0:_a.filter(Re=>(Re==null?void 0:Re.id)!==(v==null?void 0:v.id)):Me.value=to(A.cloneDeep(Me.value),v);try{v!=null&&v.id&&((G=(T=Oa.value)==null?void 0:T.has)!=null&&G.call(T,v==null?void 0:v.id))&&Oa.value.delete(v.id)}catch{}If(Vr.value,sn.value,v==null?void 0:v.id),sa.setTableLoading(u==null?void 0:u.index),ze("change",{content:Me.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:p,columns:F.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(p==="批量删除"){if(((z=Hl.value)==null?void 0:z.length)===0)return Ua.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var T,G,Re,ia,_e;const Ea=(T=Hl.value)==null?void 0:T.map(ua=>ua.id);Me.value=(G=A.cloneDeep(Me.value))==null?void 0:G.filter(ua=>!(Ea!=null&&Ea.includes(ua.id))),sa.setTableLoading(u==null?void 0:u.index),ze("change",{content:Me.value,fixContent:Hl.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:p,relatedContents:u==null?void 0:u.related,columns:F.value});const _a=(Ea||[]).filter(Boolean);if(_a.length>0&&_a.every(ua=>ua!=null&&ua!=="")){const ua=(Hl.value||[]).map(Na=>{const rl={...Na};return delete rl._isOCRRow,delete rl._ocrTableId,delete rl._isTemp,delete rl.tableEditType,delete rl.index,rl});await A.pageBatchDeleteApi({platId:parseInt((Re=ml.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((ia=u==null?void 0:u.related)==null?void 0:ia.find(Na=>Na==null?void 0:Na.includes("content_")))||((_e=u==null?void 0:u.related)==null?void 0:_e.find(Na=>Na==null?void 0:Na.includes("content"))),tableContents:ua}]})}})}else if(p==="复制新增"){he.value="复制新增",A.cloneDeep(v);const Ea=(P=F.value)==null?void 0:P.find(_a=>_a==null?void 0:_a.isMainKey);Ea||((D=F.value)==null||D[0]),ar.value=v,Pi(!0)}else if(p==="新增")he.value="新增",$i(""),Y.value=!0;else if(p==="编辑")he.value="编辑",$i(v),Y.value=!0;else if(p==="查看")he.value="查看",$i(v),Ve.value=!1,pa.value=!1,Y.value=!0;else if(p==="查看三维模型"){const Ea={};for(let T in v)T!=="id"&&(Ea[T]=v[T]);let _a=(re=Object.values(Ea))==null?void 0:re[1];We.setTableShowThree(_a)}else if(p==="切换视图")gu();else if(((le=B==null?void 0:B.extra)==null?void 0:le.type)==="modelExample")he.value=p,qe.value=!0;else if(p==="新建"){let Ea=de.value,_a=[];for(let _e in Ea)_e!=null&&_e.includes(`loading${((q=ml.value)==null?void 0:q.account)||((we=ml.value)==null?void 0:we.账号)}`)&&(_a=[..._a,..._e]);let T=[];for(let _e in Ea)_e!=null&&_e.includes(`updateLoading${((Ee=ml.value)==null?void 0:Ee.account)||((Ge=ml.value)==null?void 0:Ge.账号)}`)&&(T=[...T,..._e]);let G=_a==null?void 0:_a.map(_e=>_e==null?void 0:_e.id);const Re=T==null?void 0:T.map(_e=>_e==null?void 0:_e.id);G=[...A.cloneDeep(G),...Re],(G==null?void 0:G.length)>0&&(G!=null&&G.every(_e=>_e!==null&&_e))&&await Mr.batchDeleteInsofDataApi({ids:G});const ia=(Fe=Sa.value)==null?void 0:Fe.find(_e=>(_e==null?void 0:_e.label)==="新建");await su(!1,ia)}else if(p==="修改模板"){let Ea=A.cloneDeep(Se).value;sa.setRouteToChildPath(Ea),ue.setActiveMenuPath(Ea+S)}else if(p==="执行")lt(p,v);else if(p==="导出paraform"){const Ea=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const _a=["推力","真空","压力","温度","流量"],T=wl=>{var Ml,Jl,zl;return wl?typeof(wl==null?void 0:wl.value)=="string"?wl.value:((zl=(Jl=(Ml=wl==null?void 0:wl._custom)==null?void 0:Ml.value)==null?void 0:Jl.value)==null?void 0:zl.value)||"":""},G=Array.isArray(Yl.value)?Yl.value:[],Re=T(G.find(wl=>(wl==null?void 0:wl.condition)==="child")),ia=String(Re||"").slice(0,8),_e=wl=>{if(wl==null)return"";const Ml=String(wl).trim();if(!Ml)return"";if(/^\d{8}$/.test(Ml))return Ml;const Jl=Ml.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Jl){const Gl=Jl[1],or=Jl[2].padStart(2,"0"),ql=Jl[3].padStart(2,"0");return`${Gl}${or}${ql}`}const zl=Ml.replace(/\D/g,"");return zl.length>=8?zl.slice(0,8):""},ua=async wl=>{var Ml,Jl;if(!wl)return"";try{const zl=await Gr("试验任务/任务管理",!1),Gl=(kr,pr=[])=>{if(!Array.isArray(kr))return pr;for(const mr of kr)(mr==null?void 0:mr.comp)==="Table"&&(mr!=null&&mr.name)&&pr.push(mr),Array.isArray(mr==null?void 0:mr.children)&&Gl(mr.children,pr),Array.isArray(mr==null?void 0:mr.tab)&&Gl(mr.tab,pr),Array.isArray(mr==null?void 0:mr.choice)&&Gl(mr.choice,pr);return pr},ql=Gl(zl||[]).find(kr=>(kr==null?void 0:kr.name)==="任务列表"),br=((Jl=(Ml=ql==null?void 0:ql.compData)==null?void 0:Ml.find(kr=>(kr==null?void 0:kr.key)==="tableContents"))==null?void 0:Jl.contents)||[];if(!Array.isArray(br)||br.length===0)return"";const Qr=br.find(kr=>String((kr==null?void 0:kr["试验代号(名称)"])||"").slice(0,8)===wl);return _e(Qr==null?void 0:Qr.计划试验时间)}catch(zl){return console.warn("获取任务列表计划试验时间失败:",zl),""}},Na=(Se.value||"").replace(/\/+$/,""),rl=Re?`${Na}/${Re}`:Na,qa=await Gr(rl||Se.value,!1),fl=String(na.value||"").trim(),hl=wl=>String(wl||"").trim(),Pl=(wl,Ml=[],Jl="")=>{if(!Array.isArray(wl))return Ml;for(const zl of wl){const Gl=hl((zl==null?void 0:zl.choiceName)||(zl==null?void 0:zl.name0)||Jl);(zl==null?void 0:zl.comp)==="Table"&&(zl==null?void 0:zl.name)&&_a.includes(zl.name)&&(!fl||Gl===fl)&&Ml.push(zl),Array.isArray(zl==null?void 0:zl.children)&&Pl(zl.children,Ml,Gl),Array.isArray(zl==null?void 0:zl.tab)&&Pl(zl.tab,Ml,Gl),Array.isArray(zl==null?void 0:zl.choice)&&Pl(zl.choice,Ml,Gl)}return Ml},Ha=Pl(qa||[]),kl=new Map;for(const wl of Ha)wl!=null&&wl.name&&!kl.has(wl.name)&&kl.set(wl.name,wl);const Fa=_a.map(wl=>kl.get(wl)).filter(Boolean);if(!Fa||Fa.length===0)return Ua.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const cl=wl=>{const Ml=new Map,Jl=(zl,Gl=[])=>{if(Array.isArray(zl))for(const or of zl){const ql=((or==null?void 0:or.label)??"").toString().trim(),br=ql?[...Gl,ql]:[...Gl];if(Array.isArray(or==null?void 0:or.children)&&or.children.length>0)Jl(or.children,br);else{const kr=((or==null?void 0:or.prop)??"").toString();if(!kr)continue;const pr=ql||kr,mr=(br.length>0?[...Gl,pr]:[pr]).join(".");Ml.set(kr,mr)}}};return Jl(wl,[]),Ml},Ka=(wl,Ml)=>{const Jl=cl(wl||[]),Gl=(ce.getAllLeafNodes(wl||[])||[]).filter(ql=>(ql==null?void 0:ql.prop)&&(ql==null?void 0:ql.type)!=="operate"&&(ql==null?void 0:ql.label)!=="操作"&&(ql==null?void 0:ql.prop)!=="operate"),or=Array.isArray(Ml)?Ml:[];return or.length===0?[]:or.map(ql=>{const br={};return Gl.forEach(Qr=>{const kr=String(Qr.prop),pr=Jl.get(kr)||String(Qr.label||Qr.prop);br[pr]=(ql==null?void 0:ql[kr])??""}),br})},ul=Fa.map(wl=>{var or,ql;const Ml=(wl==null?void 0:wl.compData)||[];let Jl=(or=Ml==null?void 0:Ml.find(br=>(br==null?void 0:br.key)==="header"))==null?void 0:or.contents;Array.isArray(Jl==null?void 0:Jl[0])&&(Jl=Jl[0]);const zl=((ql=Ml==null?void 0:Ml.find(br=>(br==null?void 0:br.key)==="tableContents"))==null?void 0:ql.contents)||[];if(!Array.isArray(Jl)||Jl.length===0||!Array.isArray(zl)||zl.length===0)return null;const Gl=Ka(Jl||[],zl||[]);return!Array.isArray(Gl)||Gl.length===0?null:{类型:wl==null?void 0:wl.name,数据:Gl}}).filter(Boolean);if(!ul||ul.length===0)return Ua.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Sl=await ua(ia),Bl={试验代号:ia,试验日期:Sl,ParaForm:ul},Dr=await pi().catch(()=>""),$l=await A.exportParaformApi(Bl,Dr);if(((Qe=$l==null?void 0:$l.data)==null?void 0:Qe.code)===200&&((La=(wa=$l==null?void 0:$l.data)==null?void 0:wa.result)!=null&&La.Excel文件)){const wl=$l.data.result.Excel文件,Ml=await A.platformDownloadFile({url:wl}),Jl=new Blob([Ml.data],{type:"application/vnd.ms-excel"}),zl=URL.createObjectURL(Jl),Gl=A.dayjs().format("YYYYMMDD"),ql=`${(ia||"UNKNOWN").trim()||"UNKNOWN"}_${Gl}_paraform.xls`,br=document.createElement("a");br.href=zl,br.download=ql,br.style.display="none",document.body.appendChild(br),br.click(),setTimeout(()=>{document.body.removeChild(br),URL.revokeObjectURL(zl)},100);const Qr=Array.isArray((ea=(Ia=$l==null?void 0:$l.data)==null?void 0:Ia.result)==null?void 0:ea.warnings)?$l.data.result.warnings:[];if(Qr.length>0){const kr=Qr.map((pr,mr)=>`${mr+1}. ${(pr==null?void 0:pr.field)||"未知字段"}:${(pr==null?void 0:pr.message)||""}`).join(`
23
+ `)},g=V=>{if(!V)return;const ae=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:ae,blobUrl:V}],d.value=!0},S=()=>{d.value=!1},$=()=>{k(),r("cancel")};return(V,ae)=>{const Z=e.resolveComponent("el-input"),be=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Br.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:$,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Vf,[e.createElementVNode("div",{ref_key:"cameraBox",ref:o,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)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Pf,"初始化摄像头..."))],512),e.createElementVNode("div",Ff,[e.createElementVNode("div",jf,[ae[0]||(ae[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Hf,[h.value.length===0?(e.openBlock(),e.createElementBlock("div",Uf,"暂无图片")):(e.openBlock(),e.createElementBlock("div",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(ze,F)=>(e.openBlock(),e.createElementBlock("div",{key:ze.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:ze.url,onClick:ne=>g(ze.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Wf),e.createElementVNode("div",{onClick:ne=>w(F),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,Kf)]))),128))]))],512)]),e.createElementVNode("div",Gf,[ae[1]||(ae[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Z,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yf,[e.createVNode(be,{onClick:W,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[2]||(ae[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(be,{onClick:I,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(be,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[4]||(ae[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(be,{onClick:L,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(be,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>ae[6]||(ae[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),ae[9]||(ae[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(be,{onClick:x,disabled:h.value.length===0,id:"themeButton"},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(be,{onClick:$,id:"themeBorderButton"},{default:e.withCtx(()=>ae[8]||(ae[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),d.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:S},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Xf=Xl._export_sfc(Jf,[["__scopeId","data-v-24a2050a"]]),fs=A.useMenuState(A.pinia),Zf=async a=>{var s,h,c,d,m,b;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(s=l==null?void 0:l[0])==null?void 0:s.url,o="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){fs.setContentLoading(!0);const u=await A.platformDownloadFile({url:r});let C=u==null?void 0:u.data;const M=new FormData;M.append("file",C,((h=l==null?void 0:l[0])==null?void 0:h.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),M.append("query",n);let k=await Zs(M);k=(b=(m=(d=k==null?void 0:k.data)==null?void 0:d.data)==null?void 0:m.response)==null?void 0:b.replace("generateResult",a==null?void 0:a.函数名称),o=k,fs.setContentLoading(!1)}return o},Ct=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),Qf=A.useModelComp(A.pinia),{extraContents:uv}=A.storeToRefs(Qf),e0=A.useLoginState(A.pinia),{extraUrl:ii}=A.storeToRefs(e0);let hc=ii.value===""||!ii.value?"http://139.196.154.85:20015":ii.value;e.watch(()=>ii.value,()=>{hc=ii.value===""||!ii.value?"http://139.196.154.85:20015":ii.value},{deep:!0,immediate:!0});const Do={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},hs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:hc+"/api/public/paddleOCR"};class a0{constructor(l){en(this,"config");this.config={...hs,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Ua.Local.get(Ua.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),o=this.buildOCRRequest(l,n),s=this.config.apiUrl||hs.apiUrl||"";return(await Ua.axios.post(s,o,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return Do[l]?Do[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,o=h=>{const c=h==null?void 0:h.label;return!(!c||c==="操作"||c===this.config.columnName||(h==null?void 0:h.type)==="operate"||(h==null?void 0:h.prop)==="operate")},s=h=>{(h||[]).forEach(c=>{if(!c)return;const d=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(d)&&d.length>0){s(d);return}if(o(c)){const m=c.label;if(!r.has(m)){r.add(m);const b=this.getFieldAliases(m);n.push(b)}}})};return s(l||[]),n}}function vc(a){return new a0(a)}vc();const gt=async(a,l)=>{var h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g;let n=(c=(h=A.cloneDeep(a))==null?void 0:h.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(S=>{});let o="",s=await ce.menuToParent(n);if(s==null||s.forEach(S=>{var $,V,ae,Z;(S==null?void 0:S.name)===(((Z=(ae=(V=($=A.cloneDeep(a))==null?void 0:$.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ae[0])==null?void 0:Z.replaceAll("'",""))??"")&&(o=S==null?void 0:S.id)}),l){o=l;const S=await Mr.getInsofDataApi({id:o}),$=(u=(b=(m=(d=S==null?void 0:S.data)==null?void 0:d.result)==null?void 0:m[0])==null?void 0:b.key)==null?void 0:u.pageKey;s=await ce.getItemData($,sessionStorage.getItem("systemKey"),"")}if(o!==""){let S;l?S=(C=s==null?void 0:s.find(ae=>(ae==null?void 0:ae.id)===l))==null?void 0:C.compData:S=(M=s==null?void 0:s.find(ae=>{var Z,be,ze,F;return(ae==null?void 0:ae.name)===(((be=(Z=a==null?void 0:a.groupSelect)==null?void 0:Z.split(":"))==null?void 0:be[0])||((F=(ze=a==null?void 0:a.optionUrl)==null?void 0:ze.groupSelect)==null?void 0:F[0]))}))==null?void 0:M.compData;let $=(W=(k=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:k.contents)==null?void 0:W.map(ae=>ae==null?void 0:ae.label);(j=(I=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:I.contents)!=null&&j.every(ae=>Array.isArray(ae))&&($=(x=ce.getColumnChild((E=(L=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0]))==null?void 0:x.map(ae=>ae==null?void 0:ae.prop));let V=(g=(w=S==null?void 0:S.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:g.map(ae=>{if(Array.isArray(ae))ae=ae==null?void 0:ae.filter(Z=>!(Z!=null&&Z.id));else{let Z={};for(let be in ae)be!=="id"&&(Z[be]=ae==null?void 0:ae[be]);ae=Z}return ae});V==null||V.forEach(ae=>{Array.isArray(ae)?r.push(ce.getValueToObjectValue(ae,$)):r.push(ae)})}return r},l0=A.useMenuState(A.pinia),{activeMenuPath:dv}=A.storeToRefs(l0),r0=A.useUnit(A.pinia),{chooseTitle:pv}=A.storeToRefs(r0),n0="col-operate",mc=a=>`${n0}-${a}`,i0=(a,l)=>{const n=new Map;a.forEach(o=>{const{prop:s}=o;n.set(s,o)});const r=o=>{Array.isArray(o)&&o.forEach(s=>{const{prop:h}=s||{},c=n.get(h);o0(c,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&r(s.children)})};return r(l),l},o0=(a,l)=>(a&&(l.sortable=a==null?void 0:a.sortable,l.filterable=a==null?void 0:a.filterable,l.showSummary=a==null?void 0:a.showSummary,l.operable=a==null?void 0:a.operable,l.fixed=a==null?void 0:a.fixed),l),t0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:o=!1,operable:s=!1,fixed:h=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:o,operable:s,fixed:h}},s0=async a=>{var s,h;if(!a)return;const l=mc(a),n=await Mr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(s=n==null?void 0:n.data)==null?void 0:s.code,o=(h=n==null?void 0:n.data)==null?void 0:h.result;if(r==200)return o==null?void 0:o[0]},c0=async a=>{if(a)return[]},u0=async(a,l)=>{if(!a||!l)return;const n=mc(a);return await Mr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},d0=async(a,l)=>!a||!l?void 0:await Mr.updateInsofDataApi({id:a,value:{columns:l}}),vs=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await s0(a);return r?await d0(r==null?void 0:r.id,l):await u0(a,l)};var xo={exports:{}},p0=xo.exports,ms;function f0(){return ms||(ms=1,function(a,l){(function(n,r){r()})(p0,function(){function n(m,b){return typeof b>"u"?b={autoBom:!1}:typeof b!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.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 r(m,b,u){var C=new XMLHttpRequest;C.open("GET",m),C.responseType="blob",C.onload=function(){d(C.response,b,u)},C.onerror=function(){console.error("could not download file")},C.send()}function o(m){var b=new XMLHttpRequest;b.open("HEAD",m,!1);try{b.send()}catch{}return 200<=b.status&&299>=b.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(b)}}var h=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof A.commonjsGlobal=="object"&&A.commonjsGlobal.global===A.commonjsGlobal?A.commonjsGlobal:void 0,c=h.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),d=h.saveAs||(typeof window!="object"||window!==h?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,b,u){var C=h.URL||h.webkitURL,M=document.createElement("a");b=b||m.name||"download",M.download=b,M.rel="noopener",typeof m=="string"?(M.href=m,M.origin===location.origin?s(M):o(M.href)?r(m,b,u):s(M,M.target="_blank")):(M.href=C.createObjectURL(m),setTimeout(function(){C.revokeObjectURL(M.href)},4e4),setTimeout(function(){s(M)},0))}:"msSaveOrOpenBlob"in navigator?function(m,b,u){if(b=b||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,u),b);else if(o(m))r(m,b,u);else{var C=document.createElement("a");C.href=m,C.target="_blank",setTimeout(function(){s(C)})}}:function(m,b,u,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof m=="string")return r(m,b,u);var M=m.type==="application/octet-stream",k=/constructor/i.test(h.HTMLElement)||h.safari,W=/CriOS\/[\d]+/.test(navigator.userAgent);if((W||M&&k||c)&&typeof FileReader<"u"){var I=new FileReader;I.onloadend=function(){var E=I.result;E=W?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=E:location=E,C=null},I.readAsDataURL(m)}else{var j=h.URL||h.webkitURL,L=j.createObjectURL(m);C?C.location=L:location.href=L,C=null,setTimeout(function(){j.revokeObjectURL(L)},4e4)}});h.saveAs=d.saveAs=d,a.exports=d})}(xo)),xo.exports}f0();const Hn=A.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(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a},setSelectTab(a){this.selectTab=a}}}),h0=A.useLoginState(A.pinia),{loginUserInfo:ct}=A.storeToRefs(h0),v0=async a=>{var r,o,s;let l=await A.getAllTables({platId:parseInt((r=ct==null?void 0:ct.value)==null?void 0:r.plat_id),tableNames:[a]});return l=(s=(o=l==null?void 0:l.data)==null?void 0:o.result)==null?void 0:s[0],await cc(l,!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:l}]}]},m0=A.useLoginState(),{loginUserInfo:yl}=A.storeToRefs(m0);let mo="$R";const zr=A.useModelComp(A.pinia),yc=e.ref(!1),{itemData:y0,itemGridData:li,curStructureCompIds:ys,isSubmitCurStructure:g0,routeToChildPath:b0,pageMapState:bt,itemExtendData:yo,refreshTable:gs}=A.storeToRefs(zr),Lo=Hn(A.pinia),$r=A.useMenuState(A.pinia),cr=e.shallowRef([]),{asideMenus:k0,activeTopMenuPath:x0,activeMenuPath:xl,platform:fv,buttonTriggerType:w0,currentMenuPath:tn}=A.storeToRefs($r),gn=A.useUnit(A.pinia),{selectTitle:Pn,chooseTitle:Bo}=A.storeToRefs(gn);e.ref();const Bi=e.ref(!0),jn=e.ref(0),kt=e.ref([]);e.ref(!1);const Dt=e.ref(!1),Ki=e.ref(),gc=e.ref(),bc=e.ref(),_0=()=>{zr.setItemGridData([]),zr.setIsEdit("edit"),zr.setSubmitCurStructure(xl.value!=="/平台管理/菜单管理")},S0=()=>{zr.setIsEdit("view"),zr.setRefreshCurStructure(!0)},E0=async a=>{var o;let l=Pn.value,n=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((s,h)=>h<=n);gn.setSelectTitle(nl.safeClone(r)),r=(o=r==null?void 0:r.map(s=>s==null?void 0:s.value))==null?void 0:o.join("/"),$r.setActiveMenuPath(null),$r.setActiveMenuPath(r)},ut=async(a,l,n,r="contentConfig")=>{var o;try{if(!Array.isArray(a))return;let s,h;l==="create"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Mr.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(d=>{var m;return{id:d==null?void 0:d.id,value:{pageData:{...d,compData:(m=d==null?void 0:d.compData)==null?void 0:m.filter(b=>(b==null?void 0:b.key)!=="tableContents")}}}})},h=Mr.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},h=Mr.batchDeleteInsofDataApi);const c=await h(s);if(((o=c==null?void 0:c.data)==null?void 0:o.code)===200)return c.data.result;throw Ua.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ua.ElMessage.error("保存响应失败")}},bs=async(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k;try{const W=(s=(o=a==null?void 0:a.results)==null?void 0:o.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:w}})),I=(c=(h=a==null?void 0:a.results)==null?void 0:h.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:c.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),j=JSON.parse(JSON.stringify(a)),L=(d=j==null?void 0:j.results)==null?void 0:d.map(w=>w.id);let E;n?E=(u=(b=(m=bt.value)==null?void 0:m[xl.value])==null?void 0:b.filter(w=>{var g,S,$;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l&&(($=(S=w==null?void 0:w.key)==null?void 0:S.relatedInfo)==null?void 0:$.target)===r}))==null?void 0:u.map(w=>w==null?void 0:w.id):E=(k=(M=(C=bt.value)==null?void 0:C[xl.value])==null?void 0:M.filter(w=>{var g;return((g=w==null?void 0:w.key)==null?void 0:g.type)===l}))==null?void 0:k.map(w=>w==null?void 0:w.id);const x=E==null?void 0:E.filter(w=>!(L!=null&&L.includes(w))&&typeof w=="number");(W==null?void 0:W.length)>0&&await Mr.batchAddInsofDataApi({dataList:W}),(I==null?void 0:I.length)>0&&await Mr.batchUpdateInsofDataApi({dataList:I}),(x==null?void 0:x.length)>0&&await Mr.batchDeleteInsofDataApi({ids:x})}catch(W){throw new Error(W)}},C0=async a=>{var m,b,u,C,M,k,W,I,j,L;$r.setContentLoading(!0);const l=JSON.parse(JSON.stringify(y0.value));if(!g0.value)return $r.setCacheStructures({key:w0.value,data:l}),Ua.ElMessage.success("已暂存");const n=l==null?void 0:l.map(E=>E.id),r=n.filter(E=>{var x;return!((x=ys.value)!=null&&x.includes(E))}),o=(m=ys.value)==null?void 0:m.filter(E=>!n.includes(E)),s=[...r,...o].filter(E=>typeof E!==null&&typeof E<"u"),h=l==null?void 0:l.filter(E=>!E.id),c=l==null?void 0:l.filter(E=>E.id);let d=[];if(s&&(s==null?void 0:s.length)>0&&d.push(ut(s,"delete",a)),h&&(h==null?void 0:h.length)>0&&d.push(ut(h,"create",a)),c&&(c==null?void 0:c.length)>0&&d.push(ut(c,"update",a)),li.value&&((b=li.value)!=null&&b.isDelete&&((C=(u=li.value)==null?void 0:u.results)==null?void 0:C.length)>0&&((k=(M=li.value)==null?void 0:M.results)!=null&&k.every(E=>typeof E=="number"))?await Mr.batchDeleteInsofDataApi({ids:(W=li.value)==null?void 0:W.results}):(console.log("itemGridData.value",li.value),d.push(await bs(li.value,"gridLayout")))),yo.value)for(const E in yo.value)d.push(await bs((I=yo.value)==null?void 0:I[E],"extend",{target:E,compId:(L=(j=yo.value)==null?void 0:j[E])==null?void 0:L.compId},E));await Promise.all(d).then(()=>{Ua.ElMessage.success("保存成功"),zr.setRefreshCurStructure(!0)}).catch(E=>{Ua.ElMessage.success(E)}),$r.setContentLoading(!1)},Gi=a=>Ti(a),D0=e.computed(()=>{var a;return(a=cr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),kc=e.computed(()=>{var a;return(a=cr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),xc=e.ref(0),wc=e.ref(null),B0="ocr_committed_temp_ids_v1",T0=(a,l)=>`${B0}:${String(a??"")}:${String(l??"")}`,N0=(a,l,n)=>{try{const r=T0(a,l),o=sessionStorage.getItem(r),s=o?JSON.parse(o):[],h=Array.isArray(s)?s:[],c=Array.from(new Set([...h,...n||[]].map(d=>String(d)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},To=async(a,l="data",n)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E,x,w,g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja,jl,Rl;let r=((h=(s=(o=Pn.value)==null?void 0:o.filter(Da=>(Da==null?void 0:Da.condition)==="child"))==null?void 0:s[0])==null?void 0:h.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Da=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(Te=>{let Ma={};for(let Je in Te)Array.isArray(Te==null?void 0:Te[Je])?Ma[Je]=JSON.stringify(Te==null?void 0:Te[Je]):Ma[Je]=Te==null?void 0:Te[Je];return Ma}),al=await A.quoteApi({platId:parseInt((d=yl==null?void 0:yl.value)==null?void 0:d.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});al=(m=al==null?void 0:al.data)==null?void 0:m.result,al=al==null?void 0:al.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let dl=al==null?void 0:al.map(Te=>{var Xe,Aa;let Ma={},Je=Da==null?void 0:Da[0],ie;return Array.isArray((Xe=Te==null?void 0:Te.struct)==null?void 0:Xe[0])?ie=ce.getColumnChild((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0]):ie=Te==null?void 0:Te.struct,ie=ie==null?void 0:ie.filter(Ze=>(Ze==null?void 0:Ze.prop)!=="relatedId"),ie==null||ie.forEach(Ze=>{var xa,Va;Ma[Ze.prop]=((xa=Ze==null?void 0:Ze.words)!=null&&xa[0]?(Je==null?void 0:Je[(Va=Ze==null?void 0:Ze.words)==null?void 0:Va[0]])??(Je==null?void 0:Je[Ze==null?void 0:Ze.prop]):Je==null?void 0:Je[Ze==null?void 0:Ze.prop])??""}),Ma.id="1",Ma.relatedId=`[${Ma.id}]`,delete Ma.sort,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ma]}}),ol=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:Da}];ol=[...ol,...dl];let $a=await A.quoteApi({platId:parseInt((u=yl==null?void 0:yl.value)==null?void 0:u.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});$a=(M=(C=$a==null?void 0:$a.data)==null?void 0:C.result)==null?void 0:M.filter(Te=>!(ol!=null&&ol.find(Ma=>(Ma==null?void 0:Ma.tableName)==="content_"+(Te==null?void 0:Te.id)))),$a=$a==null?void 0:$a.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let tl=$a==null?void 0:$a.map(Te=>{var Xe,Aa,Ze,xa,Va,Ja,Ue;let Ma={},Je=Da==null?void 0:Da[0],ie;return Array.isArray((Xe=Te==null?void 0:Te.struct)==null?void 0:Xe[0])?ie=ce.getColumnChild((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0]):ie=Te==null?void 0:Te.struct,ie=ie==null?void 0:ie.filter(fa=>(fa==null?void 0:fa.prop)!=="relatedId"),((xa=(Ze=ie==null?void 0:ie[0])==null?void 0:Ze.words)!=null&&xa[0]?Je!=null&&Je[(Ja=(Va=ie==null?void 0:ie[0])==null?void 0:Va.words)==null?void 0:Ja[0]]:Je!=null&&Je[(Ue=ie==null?void 0:ie[0])==null?void 0:Ue.prop])?(ie==null||ie.forEach(fa=>{var oa,il;Ma[fa.prop]=((oa=fa==null?void 0:fa.words)!=null&&oa[0]?(Je==null?void 0:Je[(il=fa==null?void 0:fa.words)==null?void 0:il[0]])??(Je==null?void 0:Je[fa==null?void 0:fa.prop]):Je==null?void 0:Je[fa==null?void 0:fa.prop])??""}),Ma.id="1",Ma.relatedId=`[${Ma.id}]`,delete Ma.sort):Ma=void 0,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ma]}});tl=tl==null?void 0:tl.filter(Te=>{var Ma;return!((Ma=Te==null?void 0:Te.tableContents)!=null&&Ma.every(Je=>Je===void 0))}),ol=[...ol,...tl],await A.pageBatchAddApi({platId:parseInt((k=yl==null?void 0:yl.value)==null?void 0:k.plat_id),changeContents:ol});let ll=[];ol==null||ol.forEach(Te=>{var Ma;(Ma=Te==null?void 0:Te.tableContents)==null||Ma.forEach(Je=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((W=yl==null?void 0:yl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:ll}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Da=((a==null?void 0:a.ocrRows)||[]).map($a=>$a==null?void 0:$a.id).filter($a=>$a!=null),al=((a==null?void 0:a.ocrRows)||[]).map($a=>{const tl={...$a};return delete tl._isOCRRow,delete tl._ocrTableId,Object.keys(tl).forEach(ll=>{/(^|\.)证书附件$/.test(ll)&&Array.isArray(tl[ll])&&(tl[ll]=JSON.stringify(tl[ll].map(Te=>({url:(Te==null?void 0:Te.url)||"",name:(Te==null?void 0:Te.name)||(Te==null?void 0:Te.fileName)||"",fileName:(Te==null?void 0:Te.fileName)||(Te==null?void 0:Te.name)||""})).filter(Te=>Te.url||Te.name)))}),tl});let dl=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find($a=>$a==null?void 0:$a.includes("content")),tableContents:al}];await A.pageBatchAddApi({platId:parseInt((j=yl==null?void 0:yl.value)==null?void 0:j.plat_id),changeContents:dl});let ol=[];dl==null||dl.forEach($a=>{var tl;(tl=$a==null?void 0:$a.tableContents)==null||tl.forEach(ll=>{ol.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ll),request_result:"{}",is_delete:!1,request_table:$a==null?void 0:$a.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:[{tableName:"log",tableContents:ol}]}),N0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Da)}if((a==null?void 0:a.buttonName)==="编辑"){const al=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(ie=>{const Xe={...ie};return delete Xe._isOCRRow,delete Xe._ocrTableId,delete Xe._isTemp,delete Xe.tableEditType,delete Xe.index,Xe});let dl=al==null?void 0:al.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),ol=await A.quoteApi({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});ol=(x=ol==null?void 0:ol.data)==null?void 0:x.result,ol=ol==null?void 0:ol.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))});let $a=(w=dl==null?void 0:dl[0])==null?void 0:w.id,tl=[{tableName:(g=a==null?void 0:a.relatedContents)==null?void 0:g.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:dl}],ll=(S=ol==null?void 0:ol.map(ie=>{var Aa,Ze,xa,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa,oa;return JSON.stringify(Ue==null?void 0:Ue.relatedId)!=="{}"&&(Ue==null?void 0:Ue.relatedId)!==""&&(Ue!=null&&Ue.relatedId)?(fa=Ue==null?void 0:Ue.relatedId)==null?void 0:fa.includes(parseInt($a)):(Ue==null?void 0:Ue.sort)===((oa=dl==null?void 0:dl[0])==null?void 0:oa.sort)});if((Xe==null?void 0:Xe.length)>0){let Ue=dl==null?void 0:dl[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((xa=ie==null?void 0:ie.struct)==null?void 0:xa[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var Pa,sl;fa[Le.prop]=((Pa=Le==null?void 0:Le.words)!=null&&Pa[0]?(oa==null?void 0:oa[(sl=Le==null?void 0:Le.words)==null?void 0:sl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa==null?void 0:oa[Le==null?void 0:Le.prop])??""}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,delete fa.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:S.filter(ie=>ie);tl=[...tl,...ll];let Te=await A.quoteApi({platId:parseInt(($=yl==null?void 0:yl.value)==null?void 0:$.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});Te=(ae=(V=Te==null?void 0:Te.data)==null?void 0:V.result)==null?void 0:ae.filter(ie=>!(tl!=null&&tl.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),Te=Te==null?void 0:Te.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))});let Ma=(Z=Te==null?void 0:Te.map(ie=>{var Aa,Ze,xa,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa,oa,il;return JSON.stringify(Ue==null?void 0:Ue.relatedId)!=="{}"&&(Ue==null?void 0:Ue.relatedId)!==""&&(Ue!=null&&Ue.relatedId)?(fa=Ue==null?void 0:Ue.relatedId)==null?void 0:fa.includes(parseInt($a)):(Ue==null?void 0:Ue.sort)===((oa=dl==null?void 0:dl[0])==null?void 0:oa.sort)||(Ue==null?void 0:Ue.sort)===(parseInt(((il=dl==null?void 0:dl[0])==null?void 0:il.sort)??"0")+1).toString()});if((Xe==null?void 0:Xe.length)>0){let Ue=dl==null?void 0:dl[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((xa=ie==null?void 0:ie.struct)==null?void 0:xa[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var Pa,sl,fr,ur;((Pa=Le==null?void 0:Le.words)!=null&&Pa[0]?(oa==null?void 0:oa[(sl=Le==null?void 0:Le.words)==null?void 0:sl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa!=null&&oa[Le==null?void 0:Le.prop])&&(fa[Le.prop]=((fr=Le==null?void 0:Le.words)!=null&&fr[0]?(oa==null?void 0:oa[(ur=Le==null?void 0:Le.words)==null?void 0:ur[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa==null?void 0:oa[Le==null?void 0:Le.prop])??"")}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,delete fa.relatedId,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:Z.filter(ie=>ie);tl=[...tl,...Ma],await A.pageBatchUpdateApi({platId:parseInt((be=yl==null?void 0:yl.value)==null?void 0:be.plat_id),changeContents:tl});let Je=[];tl==null||tl.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((ze=yl==null?void 0:yl.value)==null?void 0:ze.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}if((a==null?void 0:a.buttonName)==="删除"){let Da=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(Te=>Te==null?void 0:Te.includes("content")),tableContents:a==null?void 0:a.fixContent}],al=await A.quoteApi({platId:parseInt((ne=yl==null?void 0:yl.value)==null?void 0:ne.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});al=(J=al==null?void 0:al.data)==null?void 0:J.result,al=al==null?void 0:al.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let dl=(Be=(se=a==null?void 0:a.fixContent)==null?void 0:se[0])==null?void 0:Be.id,ol=($e=al==null?void 0:al.map(Te=>{var Je,ie,Xe,Aa,Ze,xa;let Ma=(Je=Te==null?void 0:Te.contents)==null?void 0:Je.filter(Va=>{var Ja,Ue,fa;return JSON.stringify(Va==null?void 0:Va.relatedId)!=="{}"&&(Va==null?void 0:Va.relatedId)!==""&&(Va!=null&&Va.relatedId)?(Ja=Va==null?void 0:Va.relatedId)==null?void 0:Ja.includes(parseInt(dl)):(Va==null?void 0:Va.sort)===((fa=(Ue=a==null?void 0:a.fixContent)==null?void 0:Ue[0])==null?void 0:fa.sort)});if((Ma==null?void 0:Ma.length)>0){let Va=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Va={...Va,id:(Xe=Ma==null?void 0:Ma[0])==null?void 0:Xe.id};let Ja={},Ue=Va,fa;return Array.isArray((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0])?fa=ce.getColumnChild((Ze=Te==null?void 0:Te.struct)==null?void 0:Ze[0]):fa=Te==null?void 0:Te.struct,fa=fa==null?void 0:fa.filter(oa=>(oa==null?void 0:oa.prop)!=="relatedId"),fa==null||fa.forEach(oa=>{var il,Le;Ja[oa.prop]=((il=oa==null?void 0:oa.words)!=null&&il[0]?(Ue==null?void 0:Ue[(Le=oa==null?void 0:oa.words)==null?void 0:Le[0]])??(Ue==null?void 0:Ue[oa==null?void 0:oa.prop]):Ue==null?void 0:Ue[oa==null?void 0:oa.prop])??""}),Ja.id=(xa=Ma==null?void 0:Ma[0])==null?void 0:xa.id,delete Ja.sort,delete Ja.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ja]}}else return}))==null?void 0:$e.filter(Te=>Te);Da=[...Da,...ol];let $a=await A.quoteApi({platId:parseInt((fe=yl==null?void 0:yl.value)==null?void 0:fe.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});$a=(oe=(N=$a==null?void 0:$a.data)==null?void 0:N.result)==null?void 0:oe.filter(Te=>!(Da!=null&&Da.find(Ma=>(Ma==null?void 0:Ma.tableName)==="content_"+(Te==null?void 0:Te.id)))),$a=$a==null?void 0:$a.filter(Te=>{var Ma,Je;return!((Te==null?void 0:Te.fatherPath)!==""&&((Je=(Ma=Te==null?void 0:Te.quote)==null?void 0:Ma[0])==null?void 0:Je.menus)===(xl==null?void 0:xl.value))});let tl=(U=$a==null?void 0:$a.map(Te=>{var Je,ie,Xe,Aa,Ze,xa;let Ma=(Je=Te==null?void 0:Te.contents)==null?void 0:Je.filter(Va=>{var Ja,Ue,fa;return JSON.stringify(Va==null?void 0:Va.relatedId)!=="{}"&&(Va==null?void 0:Va.relatedId)!==""&&(Va!=null&&Va.relatedId)?(Ja=Va==null?void 0:Va.relatedId)==null?void 0:Ja.includes(parseInt(dl)):(Va==null?void 0:Va.sort)===((fa=(Ue=a==null?void 0:a.fixContent)==null?void 0:Ue[0])==null?void 0:fa.sort)});if((Ma==null?void 0:Ma.length)>0){let Va=(ie=a==null?void 0:a.fixContent)==null?void 0:ie[0];Va={...Va,id:(Xe=Ma==null?void 0:Ma[0])==null?void 0:Xe.id};let Ja={},Ue=Va,fa;return Array.isArray((Aa=Te==null?void 0:Te.struct)==null?void 0:Aa[0])?fa=ce.getColumnChild((Ze=Te==null?void 0:Te.struct)==null?void 0:Ze[0]):fa=Te==null?void 0:Te.struct,fa=fa==null?void 0:fa.filter(oa=>(oa==null?void 0:oa.prop)!=="relatedId"),fa==null||fa.forEach(oa=>{var il,Le;Ja[oa.prop]=((il=oa==null?void 0:oa.words)!=null&&il[0]?(Ue==null?void 0:Ue[(Le=oa==null?void 0:oa.words)==null?void 0:Le[0]])??(Ue==null?void 0:Ue[oa==null?void 0:oa.prop]):Ue==null?void 0:Ue[oa==null?void 0:oa.prop])??""}),Ja.id=(xa=Ma==null?void 0:Ma[0])==null?void 0:xa.id,delete Ja.sort,delete Ja.relatedId,{tableName:"content_"+(Te==null?void 0:Te.id),tableContents:[Ja]}}else return}))==null?void 0:U.filter(Te=>Te);Da=[...Da,...tl],await A.pageBatchDeleteApi({platId:parseInt((De=yl==null?void 0:yl.value)==null?void 0:De.plat_id),changeContents:Da});let ll=[];Da==null||Da.forEach(Te=>{var Ma;(Ma=Te==null?void 0:Te.tableContents)==null||Ma.forEach(Je=>{ll.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Je),request_result:"{}",is_delete:!1,request_table:Te==null?void 0:Te.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((Ie=yl==null?void 0:yl.value)==null?void 0:Ie.plat_id),changeContents:[{tableName:"log",tableContents:ll}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Da=await A.getPageDataApi({platId:parseInt((je=yl==null?void 0:yl.value)==null?void 0:je.plat_id),pageName:"menu"});if(Da=(la=Da==null?void 0:Da.data)==null?void 0:la.result,Da!=null&&Da.find(al=>(al==null?void 0:al.father_name)===xl.value+"/")){bc.value=a,gc.value=Da==null?void 0:Da.filter(ol=>(ol==null?void 0:ol.father_name)===xl.value+"/");let al=(ee=(Ta=a==null?void 0:a.columns)==null?void 0:Ta.find(ol=>ol==null?void 0:ol.mainKey))==null?void 0:ee.prop,dl=(ue=(ca=a==null?void 0:a.fixContent)==null?void 0:ca[0])==null?void 0:ue[al];Dt.value=!0,Ki.value=[{prop:al,label:al,name:al,value:dl}]}else{let al=(ta=a==null?void 0:a.fixContent)==null?void 0:ta.map($a=>{let tl={};for(let ll in $a)Array.isArray($a==null?void 0:$a[ll])?tl[ll]=JSON.stringify($a==null?void 0:$a[ll]):tl[ll]=$a==null?void 0:$a[ll];return tl.relatedId="",tl}),dl=[{tableName:(Se=a==null?void 0:a.relatedContents)==null?void 0:Se.find($a=>$a==null?void 0:$a.includes("content")),tableContents:al}];await A.pageBatchAddApi({platId:parseInt((te=yl==null?void 0:yl.value)==null?void 0:te.plat_id),changeContents:dl});let ol=[];dl==null||dl.forEach($a=>{var tl;(tl=$a==null?void 0:$a.tableContents)==null||tl.forEach(ll=>{ol.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ll),request_result:"{}",is_delete:!1,request_table:$a==null?void 0:$a.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((Ne=yl==null?void 0:yl.value)==null?void 0:Ne.plat_id),changeContents:[{tableName:"log",tableContents:ol}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Da=((Ya=(sa=(We=a==null?void 0:a.columns)==null?void 0:We.map(ie=>ie==null?void 0:ie.filter))==null?void 0:sa.filter(ie=>ie!==""))==null?void 0:Ya[0])??"";Da=ce.analyzeSplitToContent(Da,","),Da=(Da==null?void 0:Da.find(ie=>ie==null?void 0:ie.includes("@Filter")))??"";let al=(R=a==null?void 0:a.fixContent)==null?void 0:R.map(ie=>{let Xe={};for(let Aa in ie)Array.isArray(ie==null?void 0:ie[Aa])?Xe[Aa]=JSON.stringify(ie==null?void 0:ie[Aa]):Xe[Aa]=ie==null?void 0:ie[Aa];return Xe}),dl=await A.quoteApi({platId:parseInt((H=yl==null?void 0:yl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});dl=(X=dl==null?void 0:dl.data)==null?void 0:X.result,dl=dl==null?void 0:dl.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))});let ol=(de=(ve=a==null?void 0:a.columns)==null?void 0:ve[0])==null?void 0:de.prop,$a=(va=al==null?void 0:al[0])==null?void 0:va[ol],tl=[{tableName:(na=a==null?void 0:a.relatedContents)==null?void 0:na.find(ie=>ie==null?void 0:ie.includes("content")),tableContents:al}],ll=(Pe=dl==null?void 0:dl.map(ie=>{var Aa,Ze,xa,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa;return(fa=Object.values(Ue))==null?void 0:fa.find(oa=>oa===$a)});if((Xe==null?void 0:Xe.length)>0){let Ue=al==null?void 0:al[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((xa=ie==null?void 0:ie.struct)==null?void 0:xa[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var Pa,sl;fa[Le.prop]=((Pa=Le==null?void 0:Le.words)!=null&&Pa[0]?(oa==null?void 0:oa[(sl=Le==null?void 0:Le.words)==null?void 0:sl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop]):oa==null?void 0:oa[Le==null?void 0:Le.prop])??""}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:Pe.filter(ie=>ie);tl=[...tl,...ll];let Te=await A.quoteApi({platId:parseInt((wa=yl==null?void 0:yl.value)==null?void 0:wa.plat_id),type:"sonSyncs",related:[{menus:r!==""?xl.value+"/"+r:xl.value,groups:a==null?void 0:a.name}]});if(Te=(ma=(Me=Te==null?void 0:Te.data)==null?void 0:Me.result)==null?void 0:ma.filter(ie=>!(tl!=null&&tl.find(Xe=>(Xe==null?void 0:Xe.tableName)==="content_"+(ie==null?void 0:ie.id)))),Te=Te==null?void 0:Te.filter(ie=>{var Xe,Aa;return!((ie==null?void 0:ie.fatherPath)!==""&&((Aa=(Xe=ie==null?void 0:ie.quote)==null?void 0:Xe[0])==null?void 0:Aa.menus)===(xl==null?void 0:xl.value))}),Da&&Da!==""){(Da==null?void 0:Da[(Da==null?void 0:Da.length)-1])===","&&(Da=Da==null?void 0:Da.slice(0,(Da==null?void 0:Da.length)-1)),Da=(za=(Oa=Da==null?void 0:Da.replace("(",mo))==null?void 0:Oa.split(mo))==null?void 0:za[1],Da=Da==null?void 0:Da.slice(0,(Da==null?void 0:Da.length)-1),(Da==null?void 0:Da[0])==="*"&&(Da="{"+((Ca=(pa=Da==null?void 0:Da.replace("{",mo))==null?void 0:pa.split(mo))==null?void 0:Ca[1])),Da=(Ae=Da==null?void 0:Da.replaceAll("{",""))==null?void 0:Ae.replaceAll("}","");let ie=ce.calculatorAndToOr(Da);ie=ie==null?void 0:ie[0];let Xe;if((he=Object.values(ie))!=null&&he.some(Aa=>(Aa==null?void 0:Aa[0])==="*")){let Aa=(xe=(Y=Pn.value)==null?void 0:Y.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))!=null&&xe.value?(tn==null?void 0:tn.value)+"/"+((qe=(me=Pn.value)==null?void 0:me.find(Ze=>(Ze==null?void 0:Ze.condition)==="child"))==null?void 0:qe.value):tn==null?void 0:tn.value;Xe=await Gr(Aa,!1)}for(let Aa in ie)if(((da=ie==null?void 0:ie[Aa])==null?void 0:da[0])==="*"){let Ze=(ye=(Ve=(aa=ie[Aa])==null?void 0:aa.slice(1,(Ke=ie[Aa])==null?void 0:Ke.length))==null?void 0:Ve.split(":"))==null?void 0:ye[0],xa=(Sa=(pe=ie[Aa])==null?void 0:pe.split(":"))==null?void 0:Sa[1],Va=(ya=Xe==null?void 0:Xe.filter(Ja=>(Ja==null?void 0:Ja.name)===Ze))==null?void 0:ya[0];Va=(Nl=(vl=Va==null?void 0:Va.compData)==null?void 0:vl.find(Ja=>(Ja==null?void 0:Ja.key)==="tableContents"))==null?void 0:Nl.contents,Va=(pl=Va==null?void 0:Va[0])==null?void 0:pl[xa],ie[Aa]=Va}Da=((Fl=Object.values(ie))==null?void 0:Fl[0])??""}let Ma=(ja=Te==null?void 0:Te.map(ie=>{var Aa,Ze,xa,Va,Ja;let Xe=(Aa=ie==null?void 0:ie.contents)==null?void 0:Aa.filter(Ue=>{var fa;return(fa=Object.values(Ue))==null?void 0:fa.find(oa=>oa===(Da===""?$a:Da))});if((Xe==null?void 0:Xe.length)>0){let Ue=al==null?void 0:al[0];Ue={...Ue,id:(Ze=Xe==null?void 0:Xe[0])==null?void 0:Ze.id};let fa={},oa=Ue,il;return Array.isArray((xa=ie==null?void 0:ie.struct)==null?void 0:xa[0])?il=ce.getColumnChild((Va=ie==null?void 0:ie.struct)==null?void 0:Va[0]):il=ie==null?void 0:ie.struct,il=il==null?void 0:il.filter(Le=>(Le==null?void 0:Le.prop)!=="relatedId"),il==null||il.forEach(Le=>{var sl,fr,ur,Zl;let Pa=(sl=a==null?void 0:a.columns)==null?void 0:sl.find(rr=>{var dr,yr,Oe;return((yr=(dr=rr==null?void 0:rr.words)==null?void 0:dr[0])==null?void 0:yr.replaceAll("'",""))===(Le==null?void 0:Le.prop)&&((Oe=rr==null?void 0:rr.functionRelatedWords)==null?void 0:Oe.length)>0});Pa=(fr=Pa==null?void 0:Pa.prop)==null?void 0:fr.replaceAll("'",""),fa[Le.prop]=((ur=Le==null?void 0:Le.words)!=null&&ur[0]?(oa==null?void 0:oa[(Zl=Le==null?void 0:Le.words)==null?void 0:Zl[0]])??(oa==null?void 0:oa[Le==null?void 0:Le.prop])??(oa==null?void 0:oa[Pa]):(oa==null?void 0:oa[Le==null?void 0:Le.prop])??(oa==null?void 0:oa[Pa]))??void 0}),fa.id=(Ja=Xe==null?void 0:Xe[0])==null?void 0:Ja.id,delete fa.sort,{tableName:"content_"+(ie==null?void 0:ie.id),tableContents:[fa]}}else return}))==null?void 0:ja.filter(ie=>ie);tl=[...tl,...Ma],await A.pageBatchUpdateApi({platId:parseInt((jl=yl==null?void 0:yl.value)==null?void 0:jl.plat_id),changeContents:tl});let Je=[];tl==null||tl.forEach(ie=>{var Xe;(Xe=ie==null?void 0:ie.tableContents)==null||Xe.forEach(Aa=>{Je.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Aa),request_result:"{}",is_delete:!1,request_table:ie==null?void 0:ie.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt((Rl=yl==null?void 0:yl.value)==null?void 0:Rl.plat_id),changeContents:[{tableName:"log",tableContents:Je}]})}zr.setRefreshCurStructure(!0),await wt(a)},xt=async(a,l,n)=>{var o;let r=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(r){let s=(o=r.compData)==null?void 0:o.map(h=>{var c;if((h==null?void 0:h.key)==="tableContents"){let d={...h,contents:n};return d.contents=(c=(d==null?void 0:d.contents)??[])==null?void 0:c.map(m=>{let b={};for(let u in m)JSON.stringify(m==null?void 0:m[u])==="{}"?b[u]="":b[u]=m==null?void 0:m[u];return b}),d}return h});return r.compData=await Oo(s,{}),a=a==null?void 0:a.map(h=>((h==null?void 0:h.id)===(r==null?void 0:r.id)&&(h=r),h)),a}else{let s=a==null?void 0:a.filter(c=>{var d;return(c==null?void 0:c.children)&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0||(c==null?void 0:c.comp)==="Tabs"}),h=s==null?void 0:s.map(async c=>{var d;return c!=null&&c.children&&((d=c==null?void 0:c.children)==null?void 0:d.length)>0?c.children=await xt(c==null?void 0:c.children,l,n):c.compData=await xt(c==null?void 0:c.compData,l,n),c});return s=await Promise.all(h),s}},wt=async a=>{var s,h,c,d,m,b,u;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(C=>C==null?void 0:C.includes("content_"));if(!l)return;let n=await A.getAllTables({platId:parseInt((h=yl==null?void 0:yl.value)==null?void 0:h.plat_id),tableNames:l??[]});if(n=(d=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:d[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(C=>{C==null||delete C.source_table;const M={};for(let k in C){const W=C==null?void 0:C[k],I=W&&Object.prototype.toString.call(W)==="[object Object]"&&Object.keys(W).length===0,j=Array.isArray(W)&&W.length===0;W==null||W==="{}"||I||j?M[k]="":M[k]=W}return M});let r=(b=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:b[1],o=await xt(cr.value,r,n);cr.value=(u=cr.value)==null?void 0:u.map(C=>{var M,k;return(M=o==null?void 0:o[0])!=null&&M.tabInform&&((k=o==null?void 0:o[0])==null?void 0:k.tabInform)===(C==null?void 0:C.tabInform)?C=o==null?void 0:o[0]:(C!=null&&C.name?(C==null?void 0:C.name)===(o==null?void 0:o.name):(C==null?void 0:C.id)===(o==null?void 0:o.id))&&(C=o),C})},A0=a=>{let l=Ki.value;Ki.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},z0=async()=>{var C,M,k,W,I,j,L,E,x,w;let a=bc.value,l=gc.value,n=(M=(C=a==null?void 0:a.columns)==null?void 0:C.find(g=>g==null?void 0:g.mainKey))==null?void 0:M.prop,r=(W=(k=Ki.value)==null?void 0:k[0])==null?void 0:W.value,o=(I=a==null?void 0:a.fixContent)==null?void 0:I.map(g=>{var $;let S={};for(let V in g)Array.isArray(g==null?void 0:g[V])?S[V]=JSON.stringify(g==null?void 0:g[V]):S[V]=g==null?void 0:g[V];return($=a==null?void 0:a.columns)==null||$.forEach(V=>{(V==null?void 0:V.formType)==="Upload"&&(S==null?void 0:S[V==null?void 0:V.prop])===""&&(S[V==null?void 0:V.prop]="{}")}),S[n]=r,S}),s=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(g=>g==null?void 0:g.includes("content")),tableContents:o}];await A.pageBatchAddApi({platId:parseInt((L=yl==null?void 0:yl.value)==null?void 0:L.plat_id),changeContents:s}),l=l==null?void 0:l.filter(g=>{var S,$,V;return(V=g==null?void 0:g.object_name)==null?void 0:V.includes(($=(S=a==null?void 0:a.fixContent)==null?void 0:S[0])==null?void 0:$[n])});let h=[],c=new Map;l==null||l.forEach(g=>{h.push(`content_${g==null?void 0:g.object_id}`),h.push(`struct_${g==null?void 0:g.object_id}`),c.set(g==null?void 0:g.object_id,g)});let d=await A.getAllTables({platId:parseInt((E=yl==null?void 0:yl.value)==null?void 0:E.plat_id),tableNames:h??[]});d=(x=d==null?void 0:d.data)==null?void 0:x.result;let m=[],b=[];d=ce.chunk(d,2),d==null||d.forEach(g=>{var V,ae,Z,be,ze,F,ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta,ee;let S=c.get((be=(Z=(ae=(V=g==null?void 0:g[1])==null?void 0:V[0])==null?void 0:ae.source_table)==null?void 0:Z.split("_"))==null?void 0:be[1]),$=(ne=(F=(ze=S==null?void 0:S.object_name)==null?void 0:ze.split("/"))==null?void 0:F.filter((ca,ue)=>{var ta,Se;return((Se=(ta=S==null?void 0:S.object_name)==null?void 0:ta.split("/"))==null?void 0:Se.length)-1!==ue}))==null?void 0:ne.join("/");if($=$+"/"+r,b!=null&&b.find(ca=>(ca==null?void 0:ca.path)===$)||b.push({fatherPath:S==null?void 0:S.father_name,isShow:S==null?void 0:S.is_show,path:$}),((se=(J=g==null?void 0:g[1])==null?void 0:J[0])==null?void 0:se.类型)==="Table"){let ca=((fe=($e=(Be=g==null?void 0:g[1])==null?void 0:Be[0])==null?void 0:$e.结构)==null?void 0:fe.contents)??[],ue=nl.safeClone(ca);Array.isArray(ue==null?void 0:ue[0])&&(ue=ce.getColumnChild(ue==null?void 0:ue[0]));let ta=[];if(((N=g==null?void 0:g[0])==null?void 0:N.length)>0&&(ta=(oe=g==null?void 0:g[0])==null?void 0:oe.map(Se=>ue==null?void 0:ue.map(Ne=>(Ne=(Se==null?void 0:Se[Ne==null?void 0:Ne.prop])??"",Ne)))),m!=null&&m.find(Se=>(Se==null?void 0:Se.key)===$)){let Se=(U=m==null?void 0:m.find(Ne=>(Ne==null?void 0:Ne.key)===$))==null?void 0:U.contents;Se.push({isShow:S==null?void 0:S.is_show,filter:((je=(Ie=(De=g==null?void 0:g[1])==null?void 0:De[0])==null?void 0:Ie.引用)==null?void 0:je.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:ca,tableContents:ta});let te=m==null?void 0:m.findIndex(Ne=>(Ne==null?void 0:Ne.key)===$);m[te].contents=Se}else m.push({key:$,contents:[{isShow:S==null?void 0:S.is_show,filter:((ee=(Ta=(la=g==null?void 0:g[1])==null?void 0:la[0])==null?void 0:Ta.引用)==null?void 0:ee.contents)??"",key:"Table",name:Object.values(S==null?void 0:S.name),tableColumns:ca,tableContents:ta}]})}});let u=[];u.push({key:"menuPath",contents:b}),u=[...u,...m],await A.createPlatFormDataApi({platId:parseInt((w=yl==null?void 0:yl.value)==null?void 0:w.plat_id),changeData:u}),Dt.value=!1,zr.setRefreshTable(!0)},No=async(a,l)=>{},Ao=async a=>{cr.value=await ce.getDeepDiffItems(a),zr.setItemData(cr.value),zr.setOriginalData(cr.value)};e.ref();const M0=e.ref(null),I0=()=>{var a,l;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(l=(a=xl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},_c=e.ref([]),O0=e.computed(()=>{var a,l;return(l=(a=bt.value)==null?void 0:a[xl.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[x0.value],()=>{gn.setSelectTitle([]),gn.setChooseTitle([])},{deep:!0});e.watch(()=>Bo.value,async(a,l)=>{var r,o,s,h,c,d;let n=(r=Bo.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==tn.value);if((n==null?void 0:n.length)>0){$r.setContentLoading(!0);let m=((o=n==null?void 0:n[0])==null?void 0:o.relatedContent)??(xl==null?void 0:xl.value),b=m+"/"+((s=n==null?void 0:n[0])==null?void 0:s.value),u=!!((h=n==null?void 0:n[0])!=null&&h.parentContent),C=await Gr(b,u,{originPath:m});C=(c=C==null?void 0:C.filter(W=>W))==null?void 0:c.map(W=>(W.isShow=!0,W)),console.log(C,"loadingContents");let M=await ce.getDeepDiffItems(C),k=M==null?void 0:M.filter(W=>W==null?void 0:W.choice);Lo.setSelectTab((d=k==null?void 0:k[0])==null?void 0:d.choiceName),M=M==null?void 0:M.filter(W=>{var I;return!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===((I=k==null?void 0:k[0])==null?void 0:I.choiceName)}),cr.value=M,$r.setContentLoading(!1)}});const L0=(a,l)=>{setTimeout(async()=>{var c,d,m;let n=(c=Bo.value)==null?void 0:c.filter(b=>(b==null?void 0:b.condition)==="child"&&(b==null?void 0:b.value)!==""&&(b==null?void 0:b.parentContent)!==tn.value),r=xl==null?void 0:xl.value,o=xl==null?void 0:xl.value;(n==null?void 0:n.length)>0&&(o=((d=n==null?void 0:n[0])==null?void 0:d.relatedContent)??(xl==null?void 0:xl.value),r=o+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let s=await Gr(r,!1,{originPath:o});s=s==null?void 0:s.map(b=>(b.isShow=!0,b));let h=await ce.getDeepDiffItems(s);cr.value=h==null?void 0:h.filter(b=>!(b!=null&&b.step)||(b==null?void 0:b.step)===(a==null?void 0:a.title))},10)},R0=a=>{setTimeout(async()=>{var h,c,d;let l=(h=Bo.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==tn.value),n=xl==null?void 0:xl.value,r=xl==null?void 0:xl.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(xl==null?void 0:xl.value),n=r+"/"+((d=l==null?void 0:l[0])==null?void 0:d.value));let o=await Gr(n,!1,{originPath:r});o=o==null?void 0:o.map(m=>(m.isShow=!0,m)),Lo.setSelectTab(a);let s=await ce.getDeepDiffItems(o);cr.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>k0.value,a=>{a!=null&&a.length||(cr.value=[])},{immediate:!0});e.watch(()=>[xl.value],async a=>{var s,h,c,d;if(!xl.value)return;if(xl.value==="/"){cr.value=[];return}$r.setCurrentMenuPath(xl.value),zr.setLockingPage(""),cr.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Bi.value=!1,$r.setContentLoading(!0),yc.value=!0;let n=a==null?void 0:a[0],r=n,o=(h=Pn.value)==null?void 0:h.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==xl.value&&!(m!=null&&m.relatedContent));if((o==null?void 0:o.length)>0&&(n=n+"/"+((c=o==null?void 0:o[0])==null?void 0:c.value)),n==="系统管理/日志管理")cr.value=await v0("log");else{let m=await Gr(n,!0,{originPath:r});m=m==null?void 0:m.map(C=>(C.isShow=!0,C));let b=await ce.getDeepDiffItems(m),u=b==null?void 0:b.filter(C=>C==null?void 0:C.choice);Lo.setSelectTab((d=u==null?void 0:u[0])==null?void 0:d.choiceName),cr.value=b==null?void 0:b.filter(C=>{var M;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((M=u==null?void 0:u[0])==null?void 0:M.choiceName)})}$r.setContentLoading(!1),zr.setExtraContents([]),gn.setSelectIndex(""),gn.setSelectMenu(""),zr.setItemData(cr.value),zr.setOriginalData(cr.value),zr.setRefreshTable(!1),e.nextTick(()=>{jn.value=jn.value++,Bi.value=!0})},{immediate:!0});e.watch(()=>[gs.value],async()=>{var a,l,n,r;if(gs.value){cr.value=[];let o=e.getCurrentInstance();(a=o==null?void 0:o.scope)==null||a.stop(),o=null,Bi.value=!1,$r.setContentLoading(!0),yc.value=!0;let s=tn==null?void 0:tn.value,h=s,c=(l=Pn.value)==null?void 0:l.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==(tn==null?void 0:tn.value));(c==null?void 0:c.length)>0&&(s=s+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let d=await Gr(s,!0,{originPath:h});d=d==null?void 0:d.map(u=>(u.isShow=!0,u));let m=await ce.getDeepDiffItems(d),b=m==null?void 0:m.filter(u=>u==null?void 0:u.choice);if(Lo.setSelectTab((r=b==null?void 0:b[0])==null?void 0:r.choiceName),cr.value=m==null?void 0:m.filter(u=>{var C;return!(u!=null&&u.choiceName)||(u==null?void 0:u.choiceName)===((C=b==null?void 0:b[0])==null?void 0:C.choiceName)}),$r.setContentLoading(!1),zr.setExtraContents([]),gn.setSelectIndex(""),gn.setSelectMenu(""),zr.setItemData(cr.value),zr.setOriginalData(cr.value),zr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let u=[...Pn.value,...c];gn.setSelectTitle(u)}e.nextTick(()=>{jn.value=jn.value++,Bi.value=!0})}},{immediate:!0,deep:!0});const $0=async()=>{$r.setLinkMenuInfo(null),$r.setActiveMenuPath(b0.value),cr.value=null,zr.setRouteToChildPath(""),$r.setChildMenu("")},V0=a=>new RegExp("button","i").test(a),P0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Sc=a=>{if(P0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&$r.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Ec=async(a,l,n)=>{var C,M,k,W,I,j,L,E,x,w,g,S;let r="",o="";for(let $ in l)(l==null?void 0:l[$])===a&&(o=$);n==null||n.forEach($=>{($==null?void 0:$.prop)===o&&(r=$==null?void 0:$.fatherPath)});let s=r===""?xl.value:r;r!==""&&$r.setCurrentMenuPath(s),$r.setCurrentMenuPath(s+"/"+a),$r.setContentLoading(!0),cr.value=await Gr(s+"/"+a,!0,{originPath:s+"/",row:l});let h=await Gr(s,!1),c=(C=h==null?void 0:h.filter($=>($==null?void 0:$.comp)==="Table"))==null?void 0:C[0],d=((I=(W=(k=(M=c==null?void 0:c.compData)==null?void 0:M.find($=>($==null?void 0:$.key)==="header"))==null?void 0:k.contents)==null?void 0:W[0])==null?void 0:I.prop)??((w=(x=(E=(L=(j=c==null?void 0:c.compData)==null?void 0:j.find($=>($==null?void 0:$.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0])==null?void 0:x[0])==null?void 0:w.prop),m=(S=(g=c==null?void 0:c.compData)==null?void 0:g.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:S.contents;m=m==null?void 0:m.map($=>({label:$==null?void 0:$[d],value:$==null?void 0:$[d]}));let b=Pn.value,u={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};b=b==null?void 0:b.filter($=>($==null?void 0:$.condition)!=="child"),b.push(u),gn.setSelectTitle(b),gn.setChooseTitle([u]),$r.setContentLoading(!1),zr.setExtraContents([]),gn.setSelectIndex(""),gn.setSelectMenu(""),zr.setItemData(cr.value),zr.setOriginalData(cr.value)},F0=a=>{xc.value=a},Si=e.reactive({index:0,comp:null}),j0=e.computed(()=>{var a;return(a=cr.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:H0(l,n)}))}),Cc=(a,l)=>{var d,m,b,u,C;const n=l?a:a-2,r=(d=cr.value)==null?void 0:d[n],o=(b=(m=r==null?void 0:r.compData)==null?void 0:m.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:b.contents,s=o==null?void 0:o.findIndex(M=>(M==null?void 0:M.isMainKey)&&(M==null?void 0:M.label)!=="操作"),h=s===-1?0:s,c=(C=(u=r==null?void 0:r.compData)==null?void 0:u.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:C.contents;return{valid:c==null?void 0:c.every(M=>M==null?void 0:M[h+1]),length:(c==null?void 0:c.length)||0}},H0=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:o,length:s}=Cc(l,!0);Si.index===l?n="process":s===0?n="wait":n=o?"success":"error"}return n},Dc=a=>{var n,r,o,s,h;const l=a+1;if(l>1&&((o=(r=(n=cr.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:c}=Cc(l);c?(Si.index=l,Si.comp=(s=cr.value)==null?void 0:s[a]):Ua.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Si.index=l,Si.comp=(h=cr.value)==null?void 0:h[a]},Bc=e.computed(()=>{var a,l;return(l=(a=kc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Bc.value,a=>{a&&Dc(0)},{immediate:!0});const U0={class:"table-content"},q0={class:"menu-config-wrap"},W0=["onClick"],K0={key:0,class:"viewport-wrap"},G0=["onClick"],Y0={title:"选择显示列信息"},J0={key:0,class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},X0=["title"],Z0={class:"col-operate-wrap"},Q0={key:0,class:"col-operate-radio-wrapper"},e3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},a3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},l3={class:"pop-view"},r3={class:"pop-wrapper"},n3={class:"file-list-pop"},i3=["title","onClick"],o3=["onClick"],t3=["onClick"],s3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},c3={class:"form-content"},u3={key:0,class:"dialog-footer"},d3={class:"dialog-footer"},p3={class:"ocr-dialog-content"},f3={class:"ocr-steps"},h3={key:0,class:"ocr-action-buttons"},v3={key:1,class:"ocr-preview-area"},m3={class:"ocr-file-grid"},y3={class:"file-thumbnail"},g3=["src"],b3={key:1,class:"thumbnail-placeholder"},k3={class:"progress-svg",viewBox:"0 0 36 36"},x3=["stroke","stroke-width","stroke-dasharray"],w3={key:0,class:"progress-icon"},_3={key:1,class:"progress-icon"},S3=["onClick"],E3={class:"file-name"},C3={key:0,class:"ocr-recognize-button"},D3={key:2,class:"ocr-progress-section"},B3={key:3,class:"ocr-confirm-area"},T3={class:"ocr-preview-tip"},N3={class:"ocr-preview-table"},A3={style:{display:"flex","align-items":"center",gap:"8px"}},z3={key:0},M3={key:4,class:"ocr-success-area"},I3={key:0,class:"ocr-dialog-footer"},O3={class:"form-content"},L3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},R3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},$3={style:{display:"flex"}},ks="ss-ocr-upload-history",V3="ss-ocr-cert-history-v1",P3={__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},groupNames:{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(a,{emit:l}){var Vt;const n=e.ref([]),r=Ct(A.pinia),o=e.ref(null),s=e.ref(new Set),h=e.ref(new Map),c=e.ref(!1),d=e.ref(new Map),m=new Map,b=e.ref(new Map),u=a,C=e.ref((u==null?void 0:u.allowSelect)??!0),M=e.ref(((Vt=u==null?void 0:u.config)==null?void 0:Vt.showIndex)??!0),k=e.ref(),W=e.ref(!0),I=e.ref(!1),j=e.ref([]),L={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=e.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"}]}]),x=ce.useOriginalState(A.pinia);let w="$R";const{originalPath:g}=A.storeToRefs(x),S=g.value,$=e.computed(()=>{var v;const p=(v=ce.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(B=>(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate");return p.length>0?p.every(B=>!!(B!=null&&B.sortable)):!1});e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(B=>B==null?void 0:B.filterable)}),e.computed(()=>{var v;return(v=F.value)==null?void 0:v.every(B=>B==null?void 0:B.operable)});const V=e.ref(!0),ae=e.ref([]),Z=e.reactive({column:{},status:!1,text:"合计"}),be=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),ze=l,F=e.ref([]),ne=e.ref([]),J=e.ref([]),se=e.reactive({prop:"",order:null}),Be=e.ref([]),$e=e.ref(!1),fe=e.ref(!1),N=e.ref(null),{isUseBackdrop:oe,initTrackFileType:U,getFileExtension:De,setData:Ie,getFileInfo:je,getFilesInfo:la}=So.useThreeSystem(),Ta=e.ref([]),ee=e.ref(!1),ca=e.ref(),ue=A.useMenuState(),{importLoading:ta,activeMenuPath:Se,contentLoading:te,linkMenuInfo:Ne}=A.storeToRefs(ue),We=ce.useTableComp(A.pinia),sa=A.useModelComp(A.pinia),Ya=Hn(A.pinia),{extraContents:R,cacheUpdatingData:H,tableViewContents:X,tableLoading:ve,pageMapState:de,lockingPage:va}=A.storeToRefs(sa),{selectTab:na}=A.storeToRefs(Ya),{compType:Pe,hasEditable:wa}=Ys.useRole(),Me=e.ref([]),ma=e.ref([]),Oa=e.ref(new Map);e.ref(!1);const za=e.ref("");e.ref();const pa=e.ref(!0),Ca=e.ref(0),Ae=e.ref(!0),he=e.ref(""),Y=e.ref(!1),xe=e.ref(null);e.ref([]);const me=e.ref({label:"查看三维模型"}),qe=e.ref(!1),da=e.ref(),Ke=e.ref([]),aa=e.ref([]),Ve=e.ref(!1),ye=e.ref([]),pe=e.ref([]),Sa=e.ref([]),ya=e.ref([]),vl=e.ref([]),Nl=()=>{try{const p=localStorage.getItem(ks),v=p?JSON.parse(p):[];vl.value=Array.isArray(v)?v:[]}catch{vl.value=[]}},pl=()=>{try{localStorage.setItem(ks,JSON.stringify(vl.value||[]))}catch{}},Fl=p=>{var re,le,q;if(!p)return;const v=p.url||((re=p==null?void 0:p.uploadResult)==null?void 0:re.url)||"",B=p.name||((le=p==null?void 0:p.uploadResult)==null?void 0:le.name)||((q=p==null?void 0:p.uploadResult)==null?void 0:q.fileName)||"";if(!v&&!B)return;const z={name:B,url:v,ts:Date.now()},P=String(z.name||"").trim().toLowerCase(),D=(vl.value||[]).findIndex(we=>String((we==null?void 0:we.name)||"").trim().toLowerCase()===P);D>-1&&vl.value.splice(D,1),vl.value.unshift(z),vl.value.length>20&&(vl.value=vl.value.slice(0,20)),pl()};Nl();const ja=(p,v)=>`${V3}:${String(p??"")}:${String(v??"")}`,jl=(p,v)=>{try{const B=sessionStorage.getItem(ja(p,v)),z=B?JSON.parse(B):[];return Array.isArray(z)?z:[]}catch{return[]}},Rl=(p,v,B)=>{try{sessionStorage.setItem(ja(p,v),JSON.stringify(Array.isArray(B)?B:[]))}catch{}},Da=(p,v,B)=>{if(!v)return;const z=jl(p,v),P=[B,...z||[]].filter(Boolean).slice(0,1);return Rl(p,v,P),P},al=(p,v,B)=>{if(!v||!B)return;const z=ja(p,v),P=ja(p,B);try{const D=sessionStorage.getItem(z);if(!D)return;const re=(()=>{try{const we=JSON.parse(D);return Array.isArray(we)?we:[]}catch{return[]}})(),le=jl(p,B),q=[...re,...le||[]].filter(Boolean).sort((we,Ee)=>Number((Ee==null?void 0:Ee.ts)||0)-Number((we==null?void 0:we.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(q)),sessionStorage.removeItem(z)}catch{}},dl=e.ref(!1),ol=e.ref(!1),$a=e.ref([]),tl=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const ll=e.ref(!1),Te=e.ref([]),Ma=e.ref(1),Je=e.ref(new Map),ie=e.ref(new Map),Xe=e.ref(0),Aa=e.ref(!1),Ze=e.ref([]),xa=e.ref([]),Va=p=>{var v;try{const B=(v=ce.getAllLeafNodes(F.value)||[])==null?void 0:v.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(B==null?void 0:B.find(z=>(z==null?void 0:z.prop)===p||(z==null?void 0:z.label)===p))||null}catch{return null}},Ja=p=>{const v=Va(p),B=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return nl.getComponent(B)||nl.getComponent("Input")},Ue=e.ref([]),fa=e.ref(null),oa=e.ref([]),il=e.ref(null),Le=e.ref(""),Pa=e.ref(!1),sl=e.ref([]),fr=e.ref(""),ur=e.ref(!1),Zl=e.ref([]),rr=e.ref([]),dr=e.ref([]),yr=e.ref(null),Oe=e.ref([]),Ql=e.ref("");e.computed(()=>{var p;try{const v=(p=ce.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("编号")||""}catch{return""}});const _r=e.computed(()=>{var p;try{const v=(p=ce.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("名称")||""}catch{return""}}),Nr=e.computed(()=>{var p;try{const v=(p=ce.getAllLeafNodes(F.value)||[])==null?void 0:p.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("制造厂")||""}catch{return""}}),Al=()=>{ur.value=!1,Zl.value=[],rr.value=[],dr.value=[],yr.value=null,Oe.value=[],Ql.value=""},Tr=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,Pr=(p,v)=>{const B=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(B))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Tr(B[P])&&(v[P]=B[P]);const z=ma.value.find(P=>P.id===v.id);if(z)for(const P of Object.keys(B))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Tr(B[P])&&(z[P]=B[P]);Oa.value&&Oa.value.set(v.id,v),Da(u==null?void 0:u.index,v.id,p==null?void 0:p.versionItem),rr.value=[...rr.value||[],JSON.parse(JSON.stringify(v))]},Wl=async(p,v=null)=>{var B,z,P,D,re,le,q;try{const we=(B=ce.getAllLeafNodes(F.value)||[])==null?void 0:B.filter(ka=>(ka==null?void 0:ka.type)!=="operate"&&(ka==null?void 0:ka.label)!=="操作"&&(ka==null?void 0:ka.prop)!=="operate"),Ee=new Map;we==null||we.forEach(ka=>{ka!=null&&ka.label&&(ka!=null&&ka.prop)&&Ee.set(ka.label,ka.prop)});const Ge=Ee.get("系统编号")||Ee.get("编号");if(!Ge){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Fe=v||yr.value;if((Array.isArray(Fe==null?void 0:Fe.result)?Fe.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ka=0;ka<p.length;ka++){const La=p[ka],Ia=La[Ge];if(!Ia){console.warn(`第 ${ka+1} 条匹配行缺少系统编号,跳过`);continue}const ea=`设备管理/试验设备/${Ia}`,Za=await A.getPageDataApi({platId:parseInt((z=ml.value)==null?void 0:z.plat_id),pageName:ea});if(!((P=Za==null?void 0:Za.data)!=null&&P.result)||!Array.isArray(Za.data.result)){console.warn(`未找到详情页数据: ${ea}`);continue}const ba=Za.data.result.find(ia=>(ia==null?void 0:ia.property_name)==="校检记录");if(!ba){console.warn(`详情页 ${ea} 中未找到校检记录表`);continue}const Qa=(D=ba.contents)==null?void 0:D.find(ia=>(ia==null?void 0:ia.key)&&ia.key.startsWith("content_"));if(!Qa||!Qa.key){console.warn("校检记录表中未找到 content item");continue}const ge=Qa.key,Ra=Array.isArray(Qa.value)?Qa.value:[];if(Ra.length>=5){const _e=[...Ra].sort((ua,Na)=>{const rl=Number((ua==null?void 0:ua.create_time)||0),qa=Number((Na==null?void 0:Na.create_time)||0);return rl-qa})[0];_e!=null&&_e.id&&await A.pageBatchDeleteApi({platId:parseInt((re=ml.value)==null?void 0:re.plat_id),changeContents:[{tableName:ge,tableContents:[{id:_e.id}]}]})}const ga=(le=we==null?void 0:we.find(ia=>(ia==null?void 0:ia.label)==="证书附件"))==null?void 0:le.prop,Ea=String(Date.now()),_a={id:Ea},T=Ra[0]||{},G=new Date().toISOString().split("T")[0];if(Object.keys(T||{}).forEach(ia=>{if(ia!=="id"){if(ia==="证书附件"){_a[ia]="";return}if(ia==="校检日期"||ia==="检校日期"){_a[ia]=La[ia]||La.校检日期||La.检校日期||G;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ia)){_a[ia]=La[ia]??"";return}_a[ia]=La[ia]??""}}),ga&&La[ga]){const ia=La[ga];if(Array.isArray(ia)&&ia.length>0)_a.证书附件=JSON.stringify(ia.map(_e=>({url:(_e==null?void 0:_e.url)||"",name:(_e==null?void 0:_e.name)||(_e==null?void 0:_e.fileName)||"",fileName:(_e==null?void 0:_e.fileName)||(_e==null?void 0:_e.name)||""})).filter(_e=>_e.url||_e.name));else if(typeof ia=="string")try{const _e=JSON.parse(ia);_a.证书附件=ia}catch{_a.证书附件=JSON.stringify([{url:ia,name:ia,fileName:ia}])}}console.log(ge,"tableName","inspectionRecordRow",_a),await A.pageBatchAddApi({platId:parseInt((q=ml.value)==null?void 0:q.plat_id),changeContents:[{tableName:ge,tableContents:[_a]}]});const Re=ba==null?void 0:ba.object_id;if(Re&&Ea){const ia=ga&&La[ga]?La[ga]:null;let _e=[],ua="",Na=!1;if(Array.isArray(ia)&&ia.length>0){_e=ia.map(hl=>({name:(hl==null?void 0:hl.name)||(hl==null?void 0:hl.fileName)||"",url:(hl==null?void 0:hl.url)||""})).filter(hl=>hl.url||hl.name);const qa=ia[0];ua=(qa==null?void 0:qa.url)||"";const fl=(qa==null?void 0:qa.name)||(qa==null?void 0:qa.fileName)||"";Na=String(fl).toLowerCase().endsWith(".pdf")||String(ua).toLowerCase().endsWith(".pdf")}else if(typeof ia=="string")try{const qa=JSON.parse(ia);Array.isArray(qa)?(_e=qa.map(fl=>({name:(fl==null?void 0:fl.name)||(fl==null?void 0:fl.fileName)||"",url:(fl==null?void 0:fl.url)||""})).filter(fl=>fl.url||fl.name),_e.length>0&&(ua=_e[0].url||"",Na=String(_e[0].name).toLowerCase().endsWith(".pdf")||String(ua).toLowerCase().endsWith(".pdf"))):(ua=ia,Na=String(ia).toLowerCase().endsWith(".pdf"))}catch{ua=ia,Na=String(ia).toLowerCase().endsWith(".pdf")}const rl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ka),label:new Date().toLocaleString(),certType:La.证书类型||"",certNo:La.证书编号||"",fileType:Na?"pdf":"image",sourceUrl:Na?ua:"",images:_e};Da(Re,Ea,rl)}}}catch(we){console.error("向校检记录表插入OCR识别结果失败:",we),Ua.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},gr=p=>{const v=Array.isArray(p)?p:Zl.value||[];if(v.length===0){Al();return}if(v.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){Ua.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(D=>{var le;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){Da(u==null?void 0:u.index,(le=D==null?void 0:D.ocrRow)==null?void 0:le.id,D==null?void 0:D.versionItem),dr.value=[...dr.value||[],D.ocrRow];return}if(re==="replace"){const q=D==null?void 0:D.selectedTargetId,we=(Me.value||[]).find(Ee=>String(Ee==null?void 0:Ee.id)===String(q));if(!we)return;Pr(D,we)}}}),(rr.value||[]).length>0&&(Me.value=[...Me.value||[]]),(dr.value||[]).length>0&&(Me.value=[...Me.value||[],...dr.value||[]],ma.value=[...ma.value||[],...dr.value||[]],(dr.value||[]).forEach(D=>{var re,le;return(le=(re=Oa.value)==null?void 0:re.set)==null?void 0:le.call(re,D.id,D)})),Vr.value=Me.value;const z=rr.value||[],P=dr.value||[];if(z.length>0&&(ze("change",{buttonName:"编辑",singleContent:z,content:Me.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:F.value,name:u==null?void 0:u.compName}),Wl(z)),P.length>0){const D=yr.value;ze("change",{buttonName:"OCR批量新增",content:Me.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:F.value,ocrRows:P,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(le=>({url:(le==null?void 0:le.url)||"",name:(le==null?void 0:le.name)||"",fileName:(le==null?void 0:le.name)||""})).filter(le=>le.url)),ocrResult:D,matchedCount:(z||[]).length,newCount:(P||[]).length})}Ua.ElMessage.success("已提交候选处理结果"),Al()},Ir=vc(),Rr=e.computed(()=>Ir.getConfig()),Vl=e.ref(),ar=e.ref(),Fr=uc(A.pinia),Vr=e.ref(),Or=e.ref(0),jr=A.useUnit(A.pinia),{selectIndex:Yr,selectMenu:sn,selectTitle:Yl}=A.storeToRefs(jr),{selectString:hr}=A.storeToRefs(Fr),qr=A.useLoginState(A.pinia),{loginUserInfo:ml}=A.storeToRefs(qr),nr=e.ref(720),Ll=e.ref(!1),Sr=e.ref(!1),Hl=e.ref([]),vr=e.ref(),er=e.ref(!0),Wr=e.ref(!0);e.ref([]);const an=e.inject("contentRef");e.provide("contentRef",an),e.provide("getSuggestListForCell",Su),e.provide("getSuggestLoadingForCell",(p,v)=>{const B=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return b.value.get(B)||!1}),e.watch(()=>{var p;return(p=Me.value)==null?void 0:p.length},p=>{be.total=p}),e.watch(()=>X.value,async()=>{var v,B,z,P,D,re,le,q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea;if(((v=X.value)==null?void 0:v.length)===0||!((B=u==null?void 0:u.itemData)!=null&&B.find(Za=>(Za==null?void 0:Za.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(Za=>(Za==null?void 0:Za.key)==="pageColumn")))return;let p=(we=(q=(le=(re=(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:le[1])==null?void 0:q.split("]"))==null?void 0:we[0];((Qe=(Fe=(Ge=(Ee=u==null?void 0:u.itemData)==null?void 0:Ee.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:Ge.contents)==null?void 0:Fe.split("["))==null?void 0:Qe[0])+((La=(ka=X.value)==null?void 0:ka.find(Za=>(Za==null?void 0:Za.key)===p))==null?void 0:La.value),(ea=(Ia=u==null?void 0:u.itemData)==null?void 0:Ia.find(Za=>(Za==null?void 0:Za.key)==="pageGroup"))==null||ea.contents,$t(compData,u.allMapContents)},{deep:!0});const _n=p=>{var B,z,P,D,re;const v=(z=(B=F.value)==null?void 0:B.filter(le=>le==null?void 0:le.mainKey))==null?void 0:z.map(le=>le==null?void 0:le.prop);if(v.length===0){const le=(P=F.value)==null?void 0:P.map(q=>q==null?void 0:q.prop);return(D=le==null?void 0:le.map(q=>p==null?void 0:p[q]))==null?void 0:D.join("|")}return(re=v==null?void 0:v.map(le=>p==null?void 0:p[le]))==null?void 0:re.join("|")},Un=p=>{var le,q,we,Ee,Ge;const v=(q=(le=F.value)==null?void 0:le.filter(Fe=>Fe==null?void 0:Fe.required))==null?void 0:q.map(Fe=>Fe==null?void 0:Fe.prop),B=[];if(p==null||p.forEach(Fe=>{v==null||v.forEach(Qe=>{const ka=Fe[Qe];(ka==null||ka==="")&&(B.includes(Qe)||B.push(Qe))})}),B.length>0)return Ua.ElMessage.warning(`请填写必填项:${B.join("、")}`);const z=new Map,P=new Map;(we=Me.value)==null||we.forEach(Fe=>{const Qe=_n(Fe);z.set(Qe,Fe)}),p==null||p.forEach(Fe=>{const Qe=_n(Fe);P.set(Qe,Fe)});const D=p==null?void 0:p.filter(Fe=>z.has(_n(Fe))),re=(Ee=Me.value)==null?void 0:Ee.filter(Fe=>P.has(_n(Fe)));return(D==null?void 0:D.length)>0&&(y.columns=(Ge=F.value)==null?void 0:Ge.filter(Fe=>(Fe==null?void 0:Fe.label)!=="操作"),y.existRows=re,y.tableData=D,y.show=!0),y.newRows=p==null?void 0:p.filter(Fe=>{const Qe=_n(Fe);return!z.has(Qe)}),y.newRows},Ln=e.ref(""),Sn=e.ref(null),An=async()=>{var p,v,B,z,P,D;try{const re=await A.quoteApi({related:[{menus:Se.value,groups:u==null?void 0:u.compName}],platId:parseInt((p=ml.value)==null?void 0:p.plat_id)});if(((v=re==null?void 0:re.data)==null?void 0:v.code)===200){Sn.value=(B=re==null?void 0:re.data)==null?void 0:B.result;const le=(z=F.value)==null?void 0:z.map(Ee=>(Ee==null?void 0:Ee.prop)||(Ee==null?void 0:Ee.label)),q=Rn(le,(P=re==null?void 0:re.data)==null?void 0:P.result),we=q==null?void 0:q.flatMap(Ee=>Ee==null?void 0:Ee.quote);(we==null?void 0:we.length)>0&&(Ln.value=(D=we==null?void 0:we.map(Ee=>Ee==null?void 0:Ee.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function Rn(p,v){var B;return(B=v.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(D=>p.includes(D)):!1):!1))==null?void 0:B.map(z=>{const P={...z};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>p.includes(re)):!1)),P})}const cn=async(p,v)=>{var B,z;try{Sn.value||await An();const P=v==null?void 0:v.map(re=>{const le=Object.keys(re),q={};return le.forEach((we,Ee)=>{q[p[Ee]]=re[we]}),q}),D=Un(P);if(!D||(D==null?void 0:D.length)===0)return;y.show||await O(D)}catch(P){throw Ua.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((B=ml==null?void 0:ml.value)==null?void 0:B.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(P),is_delete:!1,request_table:(z=u==null?void 0:u.related)==null?void 0:z.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(P)}},zn=async p=>{var D,re,le,q,we,Ee,Ge;let v=J.value;v!=null&&v.find(Fe=>(p==null?void 0:p.key)===(Fe==null?void 0:Fe.key))&&(v=v==null?void 0:v.filter(Fe=>(p==null?void 0:p.key)!==(Fe==null?void 0:Fe.key))),v.push({key:p==null?void 0:p.key,value:[(re=p==null?void 0:p.value)==null?void 0:re[((D=p==null?void 0:p.value)==null?void 0:D.length)-1]]});let B=ya.value;B=B==null?void 0:B.map(Fe=>{var Qe,ka;return(Fe==null?void 0:Fe.type)==="Select"&&(p==null?void 0:p.key)===(Fe==null?void 0:Fe.prop)&&Array.isArray(Fe.value)&&(Qe=Fe.value)!=null&&Qe.every(La=>typeof La=="string")&&(Fe.selectValue=(ka=v==null?void 0:v.find(La=>(La==null?void 0:La.key)===(Fe==null?void 0:Fe.prop)))==null?void 0:ka.value),Fe});let z=(q=(le=B==null?void 0:B.find(Fe=>(Fe==null?void 0:Fe.prop)===(p==null?void 0:p.key)))==null?void 0:le.optionUrl)==null?void 0:q.menuId,P=B==null?void 0:B.find(Fe=>(Fe==null?void 0:Fe.prop)===(p==null?void 0:p.key));if(z){let Fe=await gt(P==null?void 0:P.optionUrl,z),Qe,ka=ae.value,La=(Ge=(Ee=(we=ya.value)==null?void 0:we.find(Ia=>{var ea;return(ea=P==null?void 0:P.optionUrl)==null?void 0:ea.menuId}))==null?void 0:Ee.selectValue)==null?void 0:Ge[0];if(Fe==null||Fe.forEach(Ia=>{var ea,Za,ba,Qa,ge,Ra,ga,Ea,_a,T;if(z){let G=(Za=(ea=ya.value)==null?void 0:ea.find(ia=>{var _e,ua;return((_e=P==null?void 0:P.optionUrl)==null?void 0:_e.menuId)===((ua=ia==null?void 0:ia.optionUrl)==null?void 0:ua.menuId)}))==null?void 0:Za.prop,Re=(Qa=(ba=B==null?void 0:B.find(ia=>(ia==null?void 0:ia.prop)===G))==null?void 0:ba.selectValue)==null?void 0:Qa[0];G!=null&&G.includes("·")&&(G=(ge=G==null?void 0:G.split("·"))==null?void 0:ge[0],Re=(_a=(Ea=(ga=p==null?void 0:p.value)==null?void 0:ga[((Ra=p==null?void 0:p.value)==null?void 0:Ra.length)-1])==null?void 0:Ea.split(" "))==null?void 0:_a[0]),ka!=null&&ka.find(ia=>(ia==null?void 0:ia.value)===La)?Qe=(T=ka==null?void 0:ka.find(ia=>(ia==null?void 0:ia.value)===La))==null?void 0:T.objectValue:Ia[G]===Re&&(Qe=Ia)}}),Qe){let Ia=B;Ia=Ia==null?void 0:Ia.map(ea=>{var Za,ba,Qa,ge,Ra,ga;return z&&(Qe!=null&&Qe[ea==null?void 0:ea.prop])&&he.value==="新增"&&(ea==null?void 0:ea.prop)!==(P==null?void 0:P.prop)?ea.value=(Qe==null?void 0:Qe[ea==null?void 0:ea.prop])||(Qe==null?void 0:Qe[(ge=(Qa=(ba=(Za=ea==null?void 0:ea.optionUrl)==null?void 0:Za.groupSelect)==null?void 0:ba[1])==null?void 0:Qa.replaceAll("[",""))==null?void 0:ge.replaceAll("]","")]):ea.value=(ga=(Ra=ya.value)==null?void 0:Ra.find(Ea=>(Ea==null?void 0:Ea.prop)===(ea==null?void 0:ea.prop)))==null?void 0:ga.value,ea}),ya.value=Ia}}J.value=v},qn=async(p,v)=>{var B,z,P,D,re;if((B=p==null?void 0:p.toString())!=null&&B.includes(".txt")||(z=p==null?void 0:p.toString())!=null&&z.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const le=await Ua.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),q=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"});let we=URL.createObjectURL(q);ca.value=[{name:(re=p==null?void 0:p.split("/"))==null?void 0:re[((D=p==null?void 0:p.split("/"))==null?void 0:D.length)-1],blobUrl:we}],ee.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&ze("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{Wr.value=!1;let p=Or.value;Or.value=p+1});const Hr=e.reactive({prop:"",order:null}),Wn=e.computed(()=>{const p=(Me.value??[]).slice(),v=Hr.prop||se.prop,B=Hr.order||se.order;if(!v||!B)return p;const z=B==="ascending",P=re=>{if(v)return re&&Object.prototype.hasOwnProperty.call(re,v)?re[v]:v.includes(".")?v.split(".").reduce((le,q)=>le==null?le:le[q],re):re==null?void 0:re[v]},D=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const le=String(re).trim();if(le==="")return{ok:!1,value:NaN};const q=le.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(q))return{ok:!1,value:NaN};const we=Number(q);return{ok:Number.isFinite(we),value:we}};return p.sort((re,le)=>{const q=P(re),we=P(le);if(q==null&&we==null)return 0;if(q==null)return z?-1:1;if(we==null)return z?1:-1;const Ee=D(q),Ge=D(we);if(Ee.ok&&Ge.ok)return z?Ee.value-Ge.value:Ge.value-Ee.value;const Fe=ge=>{if(ge==null)return{ok:!1,value:NaN};const Ra=String(ge).trim();if(Ra==="")return{ok:!1,value:NaN};const ga=Ra.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ga)return{ok:!1,value:NaN};const Ea=ga[1]?-1:1,_a=Number(ga[2]),T=Number(ga[3]),G=Number(ga[4]);return[_a,T,G].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:T>=60||G>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(_a*3600+T*60+G)}},Qe=Fe(q),ka=Fe(we);if(Qe.ok&&ka.ok)return z?Qe.value-ka.value:ka.value-Qe.value;const La=new Date(q).getTime(),Ia=new Date(we).getTime(),ea=!Number.isNaN(La),Za=!Number.isNaN(Ia);if(ea&&Za)return z?La-Ia:Ia-La;const ba=String(q),Qa=String(we);return z?ba.localeCompare(Qa):Qa.localeCompare(ba)})}),bn=e.computed(()=>{var B;const p=(be.currentPage-1)*be.pageSize,v=p+be.pageSize;return ze("getSliceContLength",be),(B=Wn.value)==null?void 0:B.slice(p,v)}),Ni=p=>{be.currentPage=p,ze("getSliceContLength",be)},Ro=p=>{var z;be.pageSize=p;const v=((z=Me.value)==null?void 0:z.length)??0,B=p>0?Math.ceil(v/p):1;be.currentPage>B&&(be.currentPage=B||1,Ua.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),ze("getSliceContLength",be)},$o=({prop:p,order:v})=>{Hr.prop=p,Hr.order=v,be.currentPage=1};function Dn(p){const v=[];function B(z,P=""){z.forEach(D=>{D.children&&D.children.length>0?B(D.children,D.prop):v.push(D.prop)})}return B(p),v}const Vo=(p,v)=>{var le,q,we,Ee;let B=(q=(le=F.value)==null?void 0:le.map(Ge=>Ge==null?void 0:Ge.prop))==null?void 0:q.filter(Ge=>Ge!=="operate");((we=F.value)==null?void 0:we.some(Ge=>{var Fe;return((Fe=Ge==null?void 0:Ge.children)==null?void 0:Fe.length)>0}))&&(B=Dn((Ee=F.value)==null?void 0:Ee.filter(Ge=>(Ge==null?void 0:Ge.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(B==null?void 0:B.length)?p:p.slice(0,B==null?void 0:B.length),!(P==null?void 0:P.every(Ge=>B==null?void 0:B.find(Fe=>Ge===Fe))))return Ua.ElMessage.error("导入的数据表头不匹配");cn(P,v)},Po=(p,v)=>{var P;const B=p==null?void 0:p.filter(D=>D!=="序号"),z=v==null?void 0:v.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});sa.setRefreshCurStructure(!1),((P=F.value)==null?void 0:P.length)===0||Vo(B,z)},Fo=(p,v,B,z)=>{const P=[],D=[],re=we=>Object.keys(we).length;for(const we in p)if(p[we]!==void 0){const Ee=p[we],Ge=[];for(const[Fe,Qe]of Object.entries(Ee))Ge.push(Qe),D.length<re(Ee)&&D.push(Fe);P.push(Ge)}P.unshift(D);const le=ce.utils.aoa_to_sheet(P),q=ce.utils.book_new();ce.utils.book_append_sheet(q,le,z),ce.writeFileSync(q,`${v}.xlsx`),Hl.value=[]},Ai=async(p,v,B,z=!1,P)=>{try{sa.setRefreshCurStructure(!1)}catch(D){Ua.ElMessage.error(D)}},Ji=async(p,v)=>{await Ai()},Jr=async(p,v)=>{await Ai("columnType",v,p,!1)},jo=async({newRow:p,targetIndex:v})=>{var P;if(!wa(u.config,{type:Pe.TABLE}))return;const z=(be.currentPage-1)*be.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=Xn(z,Me.value||[]))}catch{}Me.value.splice(z,0,p),await e.nextTick(),h.value.has(p.id)||h.value.set(p.id,A.cloneDeep(p)),Me.value=(P=Me.value)==null?void 0:P.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===p.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),s.value.add(p.id),Ll.value=!0},Ho=(p,v,B,z=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const D=P==null?void 0:P.prop;if(!D)return;let re=p==null?void 0:p[D];if(re==null||String(re).trim()==="")return;re=String(re);const le=new Set([...(Array.isArray(B)?B:[]).filter(Ee=>(Ee==null?void 0:Ee.id)!==(p==null?void 0:p.id)).map(Ee=>Ee==null?void 0:Ee[D]).filter(Ee=>Ee!=null).map(Ee=>String(Ee)),...(Array.isArray(z)?z:[]).map(Ee=>Ee==null?void 0:Ee[D]).filter(Ee=>Ee!=null).map(Ee=>String(Ee))]);if(!le.has(re))return;let q=1,we="";for(;we=`${re}(${q})`,!!le.has(we);)q++;p[D]=we}),p),zi=async()=>{var P,D,re,le,q,we,Ee,Ge;const p=Array.from(s.value||[]);if(p.length===0)return;const v=(D=ce.getColumnChild((P=A.cloneDeep(F.value))==null?void 0:P.filter(Fe=>(Fe==null?void 0:Fe.label)!=="操作")))==null?void 0:D.filter(Fe=>(Fe==null?void 0:Fe.required)===!0);if((v==null?void 0:v.length)>0)for(let Fe=0;Fe<p.length;Fe++){const Qe=p[Fe],ka=(re=Me.value)==null?void 0:re.find(La=>(La==null?void 0:La.id)===Qe);if(ka)for(let La=0;La<v.length;La++){const Ia=v[La],ea=Ia==null?void 0:Ia.prop,Za=(Ia==null?void 0:Ia.label)??ea,ba=ka==null?void 0:ka[ea];if(ba===""||ba===null||ba===void 0||Array.isArray(ba)&&ba.length===0){Ua.ElMessage.error(`${Za}不能为空`);let ge={};ge.id=ka==null?void 0:ka.id;const Ra={fixContent:[ge],buttonName:"修改",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};ze("change",Ra);return}}}const B=[],z=[];if(p.forEach(Fe=>{var Za;const Qe=(Za=Me.value)==null?void 0:Za.find(ba=>(ba==null?void 0:ba.id)===Fe);if(!Qe)return;if(Qe!=null&&Qe._isTemp){const Qa=(ce.getAllLeafNodes(F.value)||[]).filter(T=>(T==null?void 0:T.mainKey)===!0||(T==null?void 0:T.isMainKey)===!0),ge=Me.value.findIndex(T=>(T==null?void 0:T.id)===Fe),Ra=ge>=0?ge+1:Me.value.length+1;Ho(Qe,Qa,Me.value,B);const ga={id:Ra.toString()};(Qe==null?void 0:Qe.sort)!==void 0&&(Qe==null?void 0:Qe.sort)!==null&&String(Qe.sort).trim()!==""?ga.sort=String(Qe.sort):ga.sort=Xn(ge>=0?ge:Me.value.length-1,Me.value||[]),(ce.getAllLeafNodes(F.value)||[]).filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate").forEach(T=>{const G=T==null?void 0:T.prop;if(G){const Re=Qe[G];Re!==void 0?ga[G]=Re??"":ga[G]=""}}),B.push(ga);return}const La=(ce.getAllLeafNodes(F.value)||[]).filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),Ia=new Set(La.map(ba=>ba==null?void 0:ba.prop).filter(Boolean)),ea={};for(const ba of Ia)Object.prototype.hasOwnProperty.call(Qe,ba)&&(ea[ba]=Qe[ba]);z.push({id:Qe.id,value:{tableData:ea}})}),sa.setTableLoading(u==null?void 0:u.index),z.length>0){const Fe=z.map(ka=>{const La={id:ka.id,...ka.value.tableData};return delete La._isOCRRow,delete La._ocrTableId,delete La._isTemp,delete La.tableEditType,delete La.index,La}),Qe=[{tableName:((le=u==null?void 0:u.related)==null?void 0:le.find(ka=>ka==null?void 0:ka.includes("content")))??"content_"+(u==null?void 0:u.index),tableContents:Fe}];try{await A.pageBatchUpdateApi({platId:parseInt((q=ml.value)==null?void 0:q.plat_id),changeContents:Qe})}catch(ka){Ua.ElMessage.error(((Ee=(we=ka==null?void 0:ka.response)==null?void 0:we.data)==null?void 0:Ee.message)||(ka==null?void 0:ka.message)||"保存失败"),sa.setTableLoading(!1);return}}if(B.length>0){const Fe={fixContent:B,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:F.value};ze("change",Fe)}Ua.ElMessage.success("保存成功"),s.value.clear(),h.value.clear(),Me.value=(Ge=Me.value)==null?void 0:Ge.map(Fe=>({...Fe,tableEditType:"text"})),Ll.value=!1,sa.setRefreshCurStructure(!0)},Uo=()=>{var v;const p=Array.from(s.value||[]);if(p.length===0){Ll.value=!1;return}p.forEach(B=>{var D,re;const z=h.value.get(B),P=(D=Me.value)==null?void 0:D.find(le=>(le==null?void 0:le.id)===B);if(P!=null&&P._isTemp){Me.value=Me.value.filter(le=>(le==null?void 0:le.id)!==P.id);return}if(z){const le=(re=Me.value)==null?void 0:re.findIndex(q=>(q==null?void 0:q.id)===B);le!==-1&&(Me.value[le]={...Me.value[le],...z})}}),s.value.clear(),h.value.clear(),Me.value=(v=Me.value)==null?void 0:v.map(B=>({...B,tableEditType:"text"})),Ll.value=!1},Mi=e.ref(!1),Xi=async p=>{var P,D,re,le;if(!Ll.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((D=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:D.call(P))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(v)||((re=v==null?void 0:v.blur)==null||re.call(v),(le=p.preventDefault)==null||le.call(p),await e.nextTick(),await Zi())},Zi=async()=>{if(H.value){Ll.value=!1;return}if(!Mi.value){Mi.value=!0;try{Array.from(s.value||[]).length>0?await zi():Ll.value=!1}finally{Promise.resolve().then(()=>{Mi.value=!1})}}},qo=p=>{Hl.value=p},Qi=(p,v)=>{vr.value===v?er.value=!1:er.value=!0,vr.value=v==null?void 0:v.changeProp},ci=p=>{if(!p)return;const{item:v,value:B}=p,z=ya.value.find(P=>P.prop==v.prop);z&&z.contents.push({label:B,value:B})},fn=e.computed(()=>{var B,z,P;const p=(B=F.value)==null?void 0:B.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(z=F.value)==null?void 0:z.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:P.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Kn=async(p,v,B)=>{const z=A.cloneDeep(F.value);await e.nextTick();const P=z==null?void 0:z.map(re=>(B==null?void 0:B.label)===(re==null?void 0:re.label)?{...re,[v]:p}:re),D=Ii(P);await vs(u.index,D),F.value=P,ne.value=D},Ii=p=>{var P;const v=p||[];return((P=ce.getAllLeafNodes(v)||[])==null?void 0:P.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return t0(re,D)})},eo=async p=>{let v=await c0(u.index);v||(v=Ii(p)),ne.value=v},ao=async(p,v)=>{const B=A.cloneDeep(F.value),z=re=>Array.isArray(re)?re.map(le=>{const q=Array.isArray(le==null?void 0:le.children)&&le.children.length>0,we={...le};return(we==null?void 0:we.prop)==="operate"||(we==null?void 0:we.label)==="操作"||(we==null?void 0:we.type)==="operate"?(we.sortable=!1,we.filterable=!1,we.operable=!1):we.sortable=q?!1:!!p,q&&(we.children=z(we.children)),we}):re,P=z(B),D=Ii(P);await vs(u.index,D),F.value=P,ne.value=D,await e.nextTick(),Or.value=Or.value+1},lo=()=>{Y.value=!1},Gn=p=>{ze("clickTrigger",p)},ro=async p=>{var D,re,le,q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za,ba;const v=p==null?void 0:p.row,B=p==null?void 0:p.rowData,z=p==null?void 0:p.suffix;if((D=v==null?void 0:v.toString())!=null&&D.includes(".urdf")||p!=null&&p.isUrdf||z!=null&&z.includes(".urdf")){if(v.includes(",")){Ua.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(oe(v)){const ge={files:[je(v)],data:{}};Ie(ge);return}ye.value=[{url:v,extension:De(v)}],fe.value=!0,N.value={data:A.cloneDeep(B)},$e.value=!0;return}let P=[];if((re=v==null?void 0:v.toString())!=null&&re.includes(".stl")||(le=v==null?void 0:v.toString())!=null&&le.includes(".STL")||(q=v==null?void 0:v.toString())!=null&&q.includes(".obj")||(we=v==null?void 0:v.toString())!=null&&we.includes(".mtl")){const Qa=(Ee=v==null?void 0:v.toString())==null?void 0:Ee.split(","),ge=la(Qa),Ra=ge==null?void 0:ge[0];if(oe(Ra==null?void 0:Ra.extension)){Ie({files:ge,data:{}});return}ye.value=ge,fe.value=!1,$e.value=!0;return}if((Ge=v==null?void 0:v.toString())!=null&&Ge.includes(".stl")||(Fe=v==null?void 0:v.toString())!=null&&Fe.includes(".STL")||(Qe=v==null?void 0:v.toString())!=null&&Qe.includes(".obj")||(ka=v==null?void 0:v.toString())!=null&&ka.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let Qa,ge=[],Ra={};if(Array.isArray(v)?Qa=v:Qa=v==null?void 0:v.split(","),Qa==null||Qa.forEach(ga=>{ga.includes(".mtl")?ge.push(ga):Ra.blob=Ra.blob?Ra.blob+","+ga:ga}),(ge==null?void 0:ge.length)>0&&(Ra.mtlBlobs=ge),z&&(Ra.suffix=z),(Ia=(La=Object.values(Ra))==null?void 0:La[0])!=null&&Ia.includes("http:"))P.push(Ra);else{const ga=new Blob([Ra.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(ga),_a="";(ea=v==null?void 0:v.split("/"))==null||ea.forEach((T,G)=>{var Re;G===((Re=v==null?void 0:v.split("/"))==null?void 0:Re.length)-1&&(_a=T)}),(Za=Ra.blob)!=null&&Za.includes(".stl")&&(_a=(_a==null?void 0:_a.replaceAll(">",""))+".urdf"),ca.value=[{name:_a,blobUrl:Ea}],ee.value=!0}}else{const Qa=await Ua.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ge=new Blob([Qa.data],{type:"application/octet-stream;charset=UTF-8"});let Ra=URL.createObjectURL(ge),ga="";if((ba=v==null?void 0:v.split("/"))==null||ba.forEach((Ea,_a)=>{var T;_a===((T=v==null?void 0:v.split("/"))==null?void 0:T.length)-1&&(ga=Ea)}),oe(ga)){const Ea=U(ga),_a=je(v);Ie({files:[_a],data:{trackFileType:Ea}});return}ca.value=[{name:ga,blobUrl:Ra}],ee.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},Yn=p=>{var z,P,D,re;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(re=(z=p==null?void 0:p.url)==null?void 0:z.split("."))==null?void 0:re[((D=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:D.length)-1];return(p==null?void 0:p.name)+"."+v},no=p=>{if(!p)return"未知文件";try{const z=Yn(p);if(typeof z=="string"&&z.includes("."))return z}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",B=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${B}`},io=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const B=Number(v[1]),z=Number(v[2]);return!Number.isFinite(B)||!Number.isFinite(z)?p:String(B*1e3+z)},Jn=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const B=Number(v);return Number.isFinite(B)?B:null},Wo=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const B=v.includes("T")?v:v.replace(" ","T"),z=Date.parse(B);return Number.isFinite(z)?z:null},ui=(p,v=[])=>{const B=Array.isArray(p)?p.slice():[];if(B.length<=1)return B;const z=new Map((v||[]).map((re,le)=>[String(re),le])),P=B.some(re=>Jn(re==null?void 0:re.sort)!==null),D=B.map((re,le)=>({r:re,idx:le,id:String((re==null?void 0:re.id)??""),sortVal:Jn(re==null?void 0:re.sort),createTimeMs:Wo(re==null?void 0:re.create_time),prevIdx:z.has(String(re==null?void 0:re.id))?z.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,le)=>{if(P){const Ee=re.sortVal,Ge=le.sortVal;if(Ee===null&&Ge!==null)return 1;if(Ee!==null&&Ge===null)return-1;if(Ee!==null&&Ge!==null&&Ee!==Ge)return Ee-Ge}const q=re.createTimeMs,we=le.createTimeMs;return q!==null&&we!==null&&q!==we?we-q:q!==null&&we===null?-1:q===null&&we!==null?1:re.prevIdx!==le.prevIdx?re.prevIdx-le.prevIdx:re.idx-le.idx}),D.map(re=>re.r)},Xn=(p,v=[])=>{const B=v==null?void 0:v[p-1],z=v==null?void 0:v[p],P=Jn(B==null?void 0:B.sort),D=Jn(z==null?void 0:z.sort);let re=null;P!==null&&D!==null&&D>P?re=(P+D)/2:P!==null?re=P+1:D!==null?re=Math.max(D-1,0):re=(p??0)+1;const le=Number(re.toFixed(6));return String(Number.isFinite(le)?le:re)},di=async p=>{let v=null,B=null;if(p!=null&&p.id){const P=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),B=no(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await pi(),D=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await Ua.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),B=p==null?void 0:p.name}else{const P=await A.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),B=Yn(p)):v=p==null?void 0:p.url}if(oe(v)){const P={row:`${v}`,suffix:De(B)};ro(P);return}const z={name:B,blobUrl:v};ca.value=[z],ee.value=!0},Ko=async p=>{let v=null,B=null;if(p!=null&&p.id){const D=await A.platformDownloadFile(p);v=URL.createObjectURL(D.data),B=no(p)}else if(p!=null&&p.downloadUrl){const D=await pi(),re=await Ua.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:D,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),le=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(le),B=p==null?void 0:p.name}else{const D=await A.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(D.data),B=Yn(p)}const z={name:B,blobUrl:v},P=document.createElement("a");P.href=z.blobUrl,P.download=z.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},Oi=(p,v)=>{var z;if(Object.values(v).length===0)return;let B=p;return Object.values(v).find(P=>{var D,re,le;return((D=P==null?void 0:P.toString())==null?void 0:D.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((le=P==null?void 0:P.toString())==null?void 0:le.includes(".obj"))})?B=[...p,me.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(B=[...p,{label:"迁移"}]),B},Go=()=>{I.value=!0},Yo=e.ref([]),oo=async(p,v,B=!1)=>{var re,le,q,we;if(!p)return;if(B){Me.value=[...Oa.value.values()].filter(Ee=>Object.values(Ee).some(Ge=>typeof Ge=="string"?Ge==null?void 0:Ge.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let z={};for(let Ee in p)(p==null?void 0:p[Ee])!==""&&(z[Ee]=p==null?void 0:p[Ee]);if(JSON.stringify(z)==="{}"){Me.value=Array.from(((re=Oa.value)==null?void 0:re.values())??[]);return}let P=(le=u==null?void 0:u.related)==null?void 0:le.find(Ee=>Ee==null?void 0:Ee.includes("content_")),D=await A.getFillFind({platId:parseInt((q=ml==null?void 0:ml.value)==null?void 0:q.plat_id),tableName:P,params:z});D=(we=D==null?void 0:D.data)==null?void 0:we.result,Me.value=D,sa.setTableLoading(!1)},Zn=e.computed(()=>{var v,B;return((B=(v=u==null?void 0:u.itemData)==null?void 0:v.find(z=>(z==null?void 0:z.key)==="isEdit"))==null?void 0:B.contents)??!0}),Bn=async p=>{var z,P,D,re;if(!wa(u.config,{type:Pe.TABLE})||!(((P=(z=u==null?void 0:u.itemData)==null?void 0:z.find(le=>(le==null?void 0:le.key)==="isEdit"))==null?void 0:P.contents)??!0)||!p)return;((D=Array.from(s.value))==null?void 0:D.length)>0&&await zi();const B=p==null?void 0:p.id;B!=null&&(s.value.clear(),h.value.clear(),h.value.has(B)||h.value.set(B,A.cloneDeep(p)),Me.value=(re=Me.value)==null?void 0:re.map(le=>({...le,tableEditType:(le==null?void 0:le.id)===B?"edit":"text"})),s.value.add(B),Ll.value=!0)},Li=async(p,v,B,z)=>{z!=null&&z.isExistChild&&ze("clickMainKey",p,B,F.value)},Ri=()=>{ee.value=!1},Jo=p=>{ze("rowClick",p)};e.watch(()=>u.changedContent,()=>{var B,z;if(!u.changedContent)return;let p=(B=Me.value)==null?void 0:B.map(P=>{var D;return P.id===((D=u.changedContent)==null?void 0:D.id)&&(P={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete P.newId),P});const v=(z=u.itemData)==null?void 0:z.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));Me.value=p,ze("contentChange",{contents:v,index:u.index}),ze("change",{content:p,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Xo=()=>{},Zo=async()=>{const p=Se.value,v=sessionStorage.getItem("systemKey"),B=await ce.getItemData(p,v,""),z=(B==null?void 0:B.find(le=>(le==null?void 0:le.name)==="方法明细"))||(B==null?void 0:B[0]),P=(z==null?void 0:z.compData)||[],D=P==null?void 0:P.find(le=>{const q=le==null?void 0:le.key;return q==="formContent"||q==="tableContents"});return D==null?void 0:D.contents},pi=async()=>{const v=Ua.Local.get("access-token");return v?`Bearer ${v}`:""},Qo=async(p,{token:v,inputData:B}={})=>await Ua.axios.post(p,B,{headers:{Authorization:v}}).catch(P=>(ue.setImportLoading(!1),Promise.reject(P))),et=p=>{var z;let v={};const B=[];return v.form={},(z=A.cloneDeep(p))==null||z.forEach((P,D)=>{var re,le,q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za,ba;if((P==null?void 0:P.comp)==="Table"){(le=(re=P==null?void 0:P.compData)==null?void 0:re.find(ga=>(ga==null?void 0:ga.key)==="header"))==null||le.contents;let Qa=(Ee=(we=(q=P==null?void 0:P.compData)==null?void 0:q.find(ga=>(ga==null?void 0:ga.key)==="tableContents"))==null?void 0:we.contents)==null?void 0:Ee.map(ga=>ga.slice(1));(La=(ka=(Qe=(Fe=(Ge=P==null?void 0:P.compData)==null?void 0:Ge.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:Fe.contents)==null?void 0:Qe[0])==null?void 0:ka[0])==null||La.label;let ge=(ea=(Ia=P==null?void 0:P.compData)==null?void 0:Ia.find(ga=>(ga==null?void 0:ga.key)==="header"))==null?void 0:ea.contents,Ra=[];Qa==null||Qa.forEach(ga=>{let Ea=[];ga==null||ga.forEach((_a,T)=>{var Re;let G={};((Re=ge[T])==null?void 0:Re.label)!=="操作"&&(G[ge[T].label]=_a,Ea.push(G))}),Ra.push(Ea)}),v[P.name]=Ra}else{const Qa=(ba=(Za=P.compData)==null?void 0:Za.find(ge=>(ge==null?void 0:ge.key)==="formContent"))==null?void 0:ba.contents;Qa==null||Qa.forEach(ge=>{var Ra,ga;if(ge.prop!==""){let Ea=ge==null?void 0:ge.value;Array.isArray(Ea)?Ea=((Ra=Ea==null?void 0:Ea[0])==null?void 0:Ra.oldUrl)||"http://222.92.178.198:62001/"+((ga=Ea==null?void 0:Ea[0])==null?void 0:ga.url):Ea=Ea.toString(),ge={key:(ge==null?void 0:ge.prop)??(ge==null?void 0:ge.label),value:Ea},B.push(ge)}})}}),v.form=ce.getFormContents(B),v},at=p=>{const v=[],B=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(B):v.push(z)};return B(p),v},lt=async(p,v,B)=>{var ge,Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl;ue.setImportLoading(!0),sa.setFreshContent(!1);let z=await Zo().catch(Ha=>(ue.setImportLoading(!1),Promise.reject(Ha)));z=z==null?void 0:z.filter(Ha=>{var kl;return((kl=Ha==null?void 0:Ha.find(Fa=>Fa==null?void 0:Fa.id))==null?void 0:kl.id)===(v==null?void 0:v.id)});let P=ce.getEqualChild([(ge=F.value)==null?void 0:ge.filter(Ha=>(Ha==null?void 0:Ha.label)!=="操作")]);const D=(ga=(Ra=ce.tableToForm(z,P))==null?void 0:Ra[0])==null?void 0:ga.find(Ha=>{const kl=Ha==null?void 0:Ha.key;return kl==="Interface"||kl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),ue.setImportLoading(!1);return}const le=F.value?ce.getEqualChild([F.value]):[],q=le.find(Ha=>{const kl=Ha==null?void 0:Ha.prop;return kl==="Input1"||kl==="输入数据.输入1"||kl==="样本输入数据"}),we=q==null?void 0:q.prop;let Ee=v==null?void 0:v[we];const Ge=await pi().catch(Ha=>(ue.setImportLoading(!1),Promise.reject(Ha)));let Fe=!0,Qe="";(Ea=F.value)==null||Ea.forEach(Ha=>{(Ha==null?void 0:Ha.prop)===we&&(Fe=!!(Ha!=null&&Ha.childPath),Qe=Ha==null?void 0:Ha.childPath)});let ka="";if(Fe){let Ha=(T=(_a=F.value)==null?void 0:_a.find(ul=>(ul==null?void 0:ul.isMainKey)===!0))==null?void 0:T.prop;ka=v==null?void 0:v[Ha];let kl=Qe==null?void 0:Qe.split(S),Fa=[];kl==null||kl.forEach((ul,Sl)=>{(kl==null?void 0:kl.length)-1===Sl&&Fa.push(ka),Fa.push(ul)}),Fa=Fa==null?void 0:Fa[0];let cl=await ce.getItemData(Fa,sessionStorage.getItem("systemKey"),""),Ka=cl==null?void 0:cl.filter(ul=>(ul==null?void 0:ul.name)===we);Ka=Ka==null?void 0:Ka.map(ul=>{var Sl;return ul.compData=(Sl=ul==null?void 0:ul.compData)==null?void 0:Sl.map(Bl=>{var Dr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(Dr=Bl==null?void 0:Bl.contents)==null?void 0:Dr.filter($l=>($l==null?void 0:$l[1])===(v==null?void 0:v[we]))),Bl}),ul}),(!Ka||(Ka==null?void 0:Ka.length)===0)&&(Ka=cl,Ka=Ka==null?void 0:Ka.map(ul=>{var Sl;return ul.compData=(Sl=ul==null?void 0:ul.compData)==null?void 0:Sl.map(Bl=>{var Dr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(Dr=Bl==null?void 0:Bl.contents)==null?void 0:Dr.filter($l=>{var wl,Ml;return($l==null?void 0:$l[1])===(v==null?void 0:v[(Ml=(wl=F==null?void 0:F.value)==null?void 0:wl[0])==null?void 0:Ml.prop])})),Bl}),ul})),Ee=et(Ka)}const La=await Qo(re,{token:Ge,inputData:Ee}).catch(Ha=>(ue.setImportLoading(!1),Promise.reject(Ha))),Ia=(G=La==null?void 0:La.data)==null?void 0:G.data,ea=le.find(Ha=>(Ha==null?void 0:Ha.prop)==="Output1"),Za=ea==null?void 0:ea.prop;let ba=[],Qa=[];if(Ia&&((Re=Object.values(Ia))==null?void 0:Re.length)>0){let Ha=[];const kl=new FormData,Fa=(ia=at(Ia))==null?void 0:ia.map(async Ka=>{var ul,Sl;if(!Array.isArray(Ka)&&(Ka!=null&&Ka.includes("http"))){let Bl=await Ua.axios.get(Ka,{responseType:"blob"}),Dr=(Sl=Ka==null?void 0:Ka.split("/"))==null?void 0:Sl[((ul=Ka==null?void 0:Ka.split("/"))==null?void 0:ul.length)-1];kl.append("files",Bl.data,Dr)}else Ha.push(Ka)});if(await Promise.all(Fa),!ce.isFormDataEmpty(kl)){let Ka=await A.uploadAmountApi(kl),ul=(ua=(_e=Ka==null?void 0:Ka.data)==null?void 0:_e.result)==null?void 0:ua.map(Sl=>{var Bl,Dr,$l,wl,Ml,Jl;return{name:(Jl=(Ml=(wl=(Bl=Sl==null?void 0:Sl.url)==null?void 0:Bl.split("/"))==null?void 0:wl[(($l=(Dr=Sl==null?void 0:Sl.url)==null?void 0:Dr.split("/"))==null?void 0:$l.length)-1])==null?void 0:Ml.split("."))==null?void 0:Jl[0],url:Sl==null?void 0:Sl.url}});Ha=[...Ha,...ul]}let cl={};for(let Ka in v)Ka!=="id"&&(cl[Ka]=v[Ka]);cl[Za]=Ha,Qa.push({id:v==null?void 0:v.id,value:{tableData:cl}})}if((Qa==null?void 0:Qa.length)>0){const Ha=Qa.map(Fa=>{const cl={id:Fa.id,...Fa.value.tableData};return delete cl._isOCRRow,delete cl._ocrTableId,delete cl._isTemp,delete cl.tableEditType,delete cl.index,cl}),kl=[{tableName:(Na=u==null?void 0:u.related)==null?void 0:Na.find(Fa=>Fa==null?void 0:Fa.includes("content")),tableContents:Ha}];await A.pageBatchUpdateApi({platId:parseInt((rl=ml.value)==null?void 0:rl.plat_id),changeContents:kl})}if((ba==null?void 0:ba.length)>0)try{await A.pageBatchAddApi({platId:parseInt((qa=ml.value)==null?void 0:qa.plat_id),changeContents:[{tableName:(fl=u==null?void 0:u.related)==null?void 0:fl.find(Ha=>Ha==null?void 0:Ha.includes("content")),tableContents:ba.map(Ha=>{var Fa,cl,Ka;const kl={id:((Fa=Ha==null?void 0:Ha.key)==null?void 0:Fa.id)??((cl=Ha==null?void 0:Ha.key)==null?void 0:cl.rowId)??(Ha==null?void 0:Ha.id),...((Ka=Ha==null?void 0:Ha.value)==null?void 0:Ka.tableData)||{}};return delete kl._isOCRRow,delete kl._ocrTableId,delete kl._isTemp,delete kl.tableEditType,delete kl.index,Object.keys(kl).forEach(ul=>{ul==="证书附件"&&Array.isArray(kl[ul])&&(kl[ul]=JSON.stringify(kl[ul]))}),kl})}]})}catch(Ha){Ua.ElMessage.error(((Pl=(hl=Ha==null?void 0:Ha.response)==null?void 0:hl.data)==null?void 0:Pl.message)||(Ha==null?void 0:Ha.message)||"保存失败"),sa.setTableLoading(!1);return}Pi(!0),ue.setImportLoading(!1),sa.setFreshContent(!0)},to=(p,v)=>(p=p==null?void 0:p.map(B=>{var z,P;return B!=null&&B.children&&((z=B.children)!=null&&z.find(D=>D.id===(v==null?void 0:v.id))?B.children=(P=B.children)==null?void 0:P.filter(D=>(D==null?void 0:D.id)!==(v==null?void 0:v.id)):B.children=to(B.children,v)),B}),p),fi=e.ref(!1),t=()=>{fi.value=!0},i=async p=>{var B,z,P,D;fi.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const re of v){const le={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};$a.value.push(le),ir(le,"uploading"),Il(le,0);try{const q=new FormData;q.append("file",re,le.name);const we=await A.platformUploadFile(q);le.uploadResult=((B=we==null?void 0:we.data)==null?void 0:B.result)||{name:le.name,url:"",fileName:le.name},Fl({name:((z=le.uploadResult)==null?void 0:z.name)||le.name,url:((P=le.uploadResult)==null?void 0:P.url)||"",id:(D=le.uploadResult)==null?void 0:D.id}),ir(le,"uploaded"),Il(le,100)}catch(q){console.error("文件上传失败:",q),Ua.ElMessage.error(`文件 ${le.name} 上传失败,请重试`),ir(le,"pending"),Il(le,0);const we=$a.value.findIndex(Ee=>Ee.uid===le.uid);we>-1&&$a.value.splice(we,1)}}},f=e.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:(p,v,B)=>{v===(u==null?void 0:u.index)?B(new Error("选择源不能和目标源一致")):B()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),y=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],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:""}),_=()=>{y.show=!1},O=async p=>{var v,B,z,P,D,re,le,q;try{const we=[];let Ee=(v=Me.value||[])==null?void 0:v.slice();(p||[]).forEach(La=>{const Ia={...La};try{Ia.sort=Xn(0,Ee)}catch{}we.push(Ia),Ee.unshift(Ia)});let Ge=await A.quoteApi({platId:parseInt((B=ml==null?void 0:ml.value)==null?void 0:B.plat_id),type:"fatherSyncs",related:[{menus:Se.value,groups:""},{menus:Se.value,groups:u==null?void 0:u.compName}]});Ge=(z=Ge==null?void 0:Ge.data)==null?void 0:z.result;let Fe=Ge==null?void 0:Ge.map(La=>({tableName:"content_"+(La==null?void 0:La.id),tableContents:we==null?void 0:we.map((Ia,ea)=>({id:ea,...Ia}))})),Qe=[{tableName:(P=u==null?void 0:u.related)==null?void 0:P.find(La=>La==null?void 0:La.includes("content")),tableContents:we==null?void 0:we.map((La,Ia)=>({id:Ia,...La}))}];Qe=[...Qe,...Fe];const ka=await A.pageBatchAddApi({platId:parseInt((D=ml.value)==null?void 0:D.plat_id),changeContents:Qe});if(((re=ka==null?void 0:ka.data)==null?void 0:re.code)===200){const La={buttonName:"新增",columns:F.value,fixContent:we==null?void 0:we.map((ea,Za)=>({id:Za,...ea})),relatedContents:u==null?void 0:u.related};await wt(La),Ua.ElMessage.success("数据导入成功");let Ia=[];Qe==null||Qe.forEach(ea=>{var Za;(Za=ea==null?void 0:ea.tableContents)==null||Za.forEach(ba=>{Ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ba),request_result:"{}",is_delete:!1,request_table:ea==null?void 0:ea.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((le=ml==null?void 0:ml.value)==null?void 0:le.plat_id),changeContents:[{tableName:"log",tableContents:Ia}]})}else{let La=[];Qe==null||Qe.forEach(Ia=>{var ea;(ea=Ia==null?void 0:Ia.tableContents)==null||ea.forEach(Za=>{La.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Za),request_result:"{}",is_delete:!1,request_table:Ia==null?void 0:Ia.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((q=ml==null?void 0:ml.value)==null?void 0:q.plat_id),changeContents:[{tableName:"log",tableContents:La}]}),Ua.ElMessage.error("数据导入响应失败")}}catch(we){throw new Error(we)}},K=async p=>{var v,B,z,P,D,re,le,q,we,Ee;try{if(p==="cancel"&&(y.show=!1),p==="replace"&&((v=y==null?void 0:y.existRows)==null?void 0:v.length)>0){await A.pageBatchDeleteApi({platId:parseInt((B=ml.value)==null?void 0:B.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(Fe=>Fe==null?void 0:Fe.includes("content_")))||((P=u==null?void 0:u.related)==null?void 0:P.find(Fe=>Fe==null?void 0:Fe.includes("content"))),tableContents:y==null?void 0:y.existRows}]});const Ge=await A.pageBatchAddApi({platId:parseInt((D=ml.value)==null?void 0:D.plat_id),changeContents:[{tableName:(re=u==null?void 0:u.related)==null?void 0:re.find(Fe=>Fe==null?void 0:Fe.includes("content")),tableContents:(()=>{const Fe=(Me.value||[]).filter(Ia=>!((y==null?void 0:y.existRows)||[]).some(ea=>String(ea==null?void 0:ea.id)===String(Ia==null?void 0:Ia.id))),Qe=(y==null?void 0:y.tableData)||[],ka=[];let La=Fe.slice();return Qe.forEach(Ia=>{const ea={...Ia};try{ea.sort=Xn(0,La)}catch{}ka.push(ea),La.unshift(ea)}),ka.map((Ia,ea)=>({id:ea,...Ia}))})()}]});if(((le=Ge==null?void 0:Ge.data)==null?void 0:le.code)!==200)return;(q=y.newRows)!=null&&q.length&&await O(y.newRows),await wt({buttonName:"新增",columns:F.value,fixContent:(we=y==null?void 0:y.tableData)==null?void 0:we.map((Fe,Qe)=>({id:Qe,...Fe})),relatedContents:u==null?void 0:u.related}),(Ee=y.newRows)!=null&&Ee.length||Ua.ElMessage.success("数据导入成功")}}catch(Ge){throw new Error(Ge)}finally{y.show=!1,y.columns=[],y.tableData=[],y.existRows=[]}},Q=()=>{f.show=!1},ke=p=>{var v,B;if((p==null?void 0:p.buttonName)==="取消")return f.show=!1;f.to=p==null?void 0:p.content,!(!(u!=null&&u.index)||!((v=f.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((B=f.to)==null?void 0:B.groupName)&&(ze("change",{buttonName:"迁移",value:{from:f.from,to:f.to,data:f.selectRow}}),f.show=!1)},He=async p=>{var v,B,z,P;if(p){if(!Ir.validateFileSize(p.raw)){Ua.ElMessage.warning(`文件大小不能超过 ${Rr.value.maxSize}MB`);const D=$a.value.findIndex(re=>re.uid===p.uid);D>-1&&$a.value.splice(D,1),Ce();return}if(!Ir.validateFileType(p.raw)){Ua.ElMessage.warning("请上传图片文件");const D=$a.value.findIndex(re=>re.uid===p.uid);D>-1&&$a.value.splice(D,1),Ce();return}ir(p,"uploading"),Il(p,0);try{const D=new FormData;D.append("file",p.raw,p.name);const re=await A.platformUploadFile(D);p.uploadResult=((v=re==null?void 0:re.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},Fl({name:((B=p.uploadResult)==null?void 0:B.name)||p.name,url:((z=p.uploadResult)==null?void 0:z.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),ir(p,"uploaded"),Il(p,100)}catch(D){console.error("文件上传失败:",D),Ua.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),ir(p,"pending"),Il(p,0);const re=$a.value.findIndex(le=>le.uid===p.uid);re>-1&&$a.value.splice(re,1)}finally{Ce()}}},Ce=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},ra=async()=>{var B,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),$a.value.length===0){Ua.ElMessage.warning("请先选择要上传的图片");return}if($a.value.filter(P=>{const D=Dl(P);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){Ua.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ol.value=!0,Xe.value=0;let v=null;try{$a.value.forEach(ea=>{ir(ea,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{Xe.value<P?Xe.value+=1:clearInterval(v)},50);const D=$a.value.map(ea=>{var Za,ba,Qa;return{name:((Za=ea.uploadResult)==null?void 0:Za.name)||ea.name,url:((ba=ea.uploadResult)==null?void 0:ba.url)||"",fileName:((Qa=ea.uploadResult)==null?void 0:Qa.fileName)||ea.name}}),re=Ir.extractTableHeaders(F.value),le=D.map(ea=>({name:(ea==null?void 0:ea.fileName)||(ea==null?void 0:ea.name),url:(ea==null?void 0:ea.url)||""})),q=await Ir.recognize(le,re);if(console.log(q,"ocrResult"),clearInterval(v),v=null,(q==null?void 0:q.code)===500||(q==null?void 0:q.type)==="error"||!(q!=null&&q.result)){Xe.value=0,$a.value.forEach(ea=>{ir(ea,"failed"),Il(ea,0)}),Ua.ElMessage.error((q==null?void 0:q.message)||"OCR识别失败,请重试"),ol.value=!1;return}Xe.value=P;const we=Array.isArray(q==null?void 0:q.result)?q.result:[];if(we.length===0){Xe.value=0,$a.value.forEach(ea=>{ir(ea,"failed"),Il(ea,0)}),Ua.ElMessage.warning("OCR识别未返回有效数据"),ol.value=!1;return}const Ee=new Set,Ge=[];we.forEach((ea,Za)=>{const ba=ea!=null&&ea.数据&&typeof(ea==null?void 0:ea.数据)=="object"?ea.数据:{},Qa=Array.isArray(ea==null?void 0:ea.图片信息)?ea.图片信息:[],ge=new Map;Qa.forEach(ga=>{ga!=null&&ga.name&&ge.set(ga.name,ga.url||"")});const Ra={_index:Za,_certType:(ea==null?void 0:ea.证书类型)||"",_certNo:(ea==null?void 0:ea.证书编号)||"",_ocrImages:Qa,__ocrFieldMeta:{}};Object.entries(ba).forEach(([ga,Ea])=>{let _a="",T=0,G=[],Re="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(_a=(Ea==null?void 0:Ea.value)??"",T=(Ea==null?void 0:Ea.score)??0,G=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],Re=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(_a=Ea[0]??"",T=Ea[1]??0):(_a=Ea??"",T=0),Ra[ga]=_a,Ra[`${ga}_accuracy`]=T,Ee.add(ga),Ra.__ocrFieldMeta[ga]={value:_a,score:T,bboxNorm:G,imageName:Re,imageUrl:Re&&ge.get(Re)||"",images:Qa}}),Ge.push(Ra)});const Fe=[],Qe=new Set;Ge.forEach(ea=>{ea&&Ee.forEach(Za=>{const ba=ea[`${Za}_accuracy`];(typeof ba=="number"?ba>0:ba!=null&&String(ba).trim()!==""&&String(ba)!=="0")&&Qe.add(Za)})}),Ee.forEach(ea=>{Fe.push({prop:ea,label:ea,editable:!0,minWidth:230}),Qe.has(ea)&&Fe.push({prop:`${ea}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),$a.value.forEach(ea=>{ir(ea,"completed")}),Xe.value=100,xa.value=Fe,Ze.value=Ge,Ue.value=D,fa.value=q;const ka=["出厂编号","设备名称","制造厂"],La=Fe.filter(ea=>ea&&!ea.isAccuracy&&typeof ea.prop=="string").map(ea=>ea.prop),Ia=["出厂编号","设备名称","制造厂"];oa.value=La.filter(ea=>Ia.includes(ea)),console.log("[OCR] 默认勾选字段 props:",oa.value),Ma.value=2,ol.value=!1,Aa.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),Ua.ElMessage.error(((z=(B=P==null?void 0:P.response)==null?void 0:B.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ol.value=!1,Xe.value=0,$a.value.forEach(D=>{ir(D,"pending"),Il(D,0)})}},Ba=p=>{if(p==null)return"";let v=String(p);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,B=>String.fromCharCode(B.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},Xa=()=>{var ea,Za;const p=Ue.value,v=fa.value,B=Ze.value;if(!B||B.length===0){Ua.ElMessage.warning("暂无数据可添加");return}const z=(ea=ce.getAllLeafNodes(F.value)||[])==null?void 0:ea.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),P=new Map,D=new Map,re=(Za=z==null?void 0:z.find(ba=>(ba==null?void 0:ba.label)==="证书附件"))==null?void 0:Za.prop;z==null||z.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&(P.set(ba.label,ba.prop),D.set(ba.prop,ba.label))});const le=Date.now(),q=ba=>String(le*1e3+ba),we=[],Ee=[],Ge=ba=>{const Qa=Do&&Do[ba]||[ba];for(const ge of Qa){const Ra=P.get(ge);if(Ra)return Ra}return""},Fe=Ge("出厂编号"),Qe=Ge("设备名称"),ka=Ge("制造厂"),La=[],Ia=ba=>{var _a,T;if(!re)return[];const Qa=(Array.isArray(p)?p[ba]:null)||null,ge=(Qa==null?void 0:Qa.url)||"",Ra=(Qa==null?void 0:Qa.fileName)||(Qa==null?void 0:Qa.name)||"";return(String(Ra).toLowerCase().endsWith(".pdf")||String(ge).toLowerCase().endsWith(".pdf"))&&ge?[{url:ge,name:Ra,fileName:Ra}]:(Array.isArray((T=(_a=v==null?void 0:v.result)==null?void 0:_a[ba])==null?void 0:T.图片信息)?v.result[ba].图片信息:[]).map(G=>({url:(G==null?void 0:G.url)||"",name:(G==null?void 0:G.name)||"",fileName:(G==null?void 0:G.name)||""})).filter(G=>G.url)};if(B.forEach((ba,Qa)=>{var rl;const ge={id:q(Qa),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[qa,fl]of P.entries())Object.prototype.hasOwnProperty.call(ba,qa)&&(ge[fl]=ba[qa]);re&&(ge[re]=Ia(Qa));const Ra=(Array.isArray(v==null?void 0:v.result)?v.result[Qa]:null)||null,ga=(Array.isArray(p)?p[Qa]:null)||null,Ea=(ga==null?void 0:ga.url)||"",_a=(ga==null?void 0:ga.fileName)||(ga==null?void 0:ga.name)||"",T=String(_a).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),G={ts:Date.now(),versionId:String(Date.now())+"_"+String(Qa),label:new Date().toLocaleString(),certType:(Ra==null?void 0:Ra.证书类型)||"",certNo:(Ra==null?void 0:Ra.证书编号)||"",fileType:T?"pdf":"image",sourceUrl:T?Ea:"",images:Array.isArray(Ra==null?void 0:Ra.图片信息)?Ra.图片信息.map(qa=>({name:(qa==null?void 0:qa.name)||"",url:(qa==null?void 0:qa.url)||""})).filter(qa=>qa.url):[]},Re=qa=>Ba(qa?ge==null?void 0:ge[qa]:""),ia=Re(Fe),_e=Re(Qe),ua=Re(ka);if(!!(Fe&&Qe&&ka&&ia&&_e&&ua)){const qa=(Me.value||[]).find(fl=>{const hl=Ba(Fe?fl==null?void 0:fl[Fe]:""),Pl=Ba(Qe?fl==null?void 0:fl[Qe]:""),Ha=Ba(ka?fl==null?void 0:fl[ka]:"");return hl&&Pl&&Ha&&hl===ia&&Pl===_e&&Ha===ua});if(qa){La.push({idx:Qa,ocrRow:ge,versionItem:G,ocrNo:ia,candidates:[qa],selectedTargetId:String((qa==null?void 0:qa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ia&&Fe){const qa=(Me.value||[]).filter(fl=>{const hl=Ba(Fe?fl==null?void 0:fl[Fe]:"");return hl&&hl===ia});if(qa.length>0){La.push({idx:Qa,ocrRow:ge,versionItem:G,ocrNo:ia,candidates:qa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ge.sort===void 0||ge.sort===null||String(ge.sort).trim()===""){const qa=(Me.value||[]).map(hl=>Jn(hl==null?void 0:hl.sort)).filter(hl=>hl!==null),fl=qa.length>0?Math.max(...qa):((rl=Me.value)==null?void 0:rl.length)??0;ge.sort=String(Number((fl+1).toFixed(6)))}}catch{}Da(u==null?void 0:u.index,ge.id,G),La.push({idx:Qa,ocrRow:ge,versionItem:G,ocrNo:ia,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(La||[]).length>0){Zl.value=(La||[]).map(ba=>({...ba,selectedTargetId:(ba==null?void 0:ba.selectedTargetId)||""})),ur.value=!0,rr.value=Ee,dr.value=we,yr.value=v,Oe.value=p,Ql.value=re||"";return}},Wa=(p,v,B)=>{Ze.value[p]&&(Ze.value[p][v]=B)},el=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,_l=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},bl=p=>{var B,z,P,D;if(il.value===p){il.value=null,Pa.value=!1,Le.value="";return}il.value=p,Le.value="";const v=(B=Ze.value)==null?void 0:B[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){sl.value=v._ocrImages.map(q=>({name:(q==null?void 0:q.name)||"",url:(q==null?void 0:q.url)||""})).filter(q=>q.name||q.url);const re=v.__ocrFieldMeta||{},le=(z=Object.values(re))==null?void 0:z.find(q=>q==null?void 0:q.imageName);fr.value=(le==null?void 0:le.imageName)||((D=(P=sl.value)==null?void 0:P[0])==null?void 0:D.name)||"",Pa.value=sl.value.length>0}else sl.value=[],Pa.value=!1,fr.value=""},Cl=()=>{dl.value=!1,$a.value=[],tl.value=null,Ma.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0,Pa.value=!1},Ul=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",Dl=p=>{const v=p.uid||p.name;return Je.value.get(v)||"pending"},Ol=p=>{const v=p.uid||p.name;return ie.value.get(v)||0},Il=(p,v)=>{const B=p.uid||p.name;ie.value.set(B,Math.min(100,Math.max(0,v)))},Xr=p=>{const v=Dl(p),B=100.53;if(v==="completed"||v==="uploaded")return`${B} ${B}`;if(v==="failed")return`${B} ${B}`;if(v==="uploading"){const z=Ol(p);return`${B*(z/100)} ${B}`}else if(v==="processing")return`${B*.5} ${B}`;return`0 ${B}`},ir=(p,v)=>{const B=p.uid||p.name;Je.value.set(B,v),(v==="completed"||v==="uploaded")&&Il(p,100)},ln=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async B=>{const z=Array.from(B.target.files||[]);for(const P of z){const D={name:P.name,raw:P,uid:Date.now()+Math.random()};$a.value.push(D),await He(D)}B.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},hn=()=>{Ma.value>1&&Ma.value--},En=()=>{Ma.value===1?$a.value.length>0&&!ol.value&&ra():Ma.value===2&&(Xa(),Ma.value=3)},hi=async p=>{await Tt(p==null?void 0:p.row)},Qn=async({row:p,prop:v})=>{!p||!v||await Tt(p,v)},Tt=async(p,v)=>{var P,D;const B=p==null?void 0:p.id;if(!B){Ua.ElMessage.warning("暂无可预览数据");return}let z=jl(u==null?void 0:u.index,B);if(!z||z.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),le=re!==null?Number(re):null;if(le!=null&&le!==""&&!Number.isNaN(le)){const q=jl(le,B);Array.isArray(q)&&q.length>0&&(Rl(u==null?void 0:u.index,B,q),z=q)}}if(!z||z.length===0){const re=(P=ce.getAllLeafNodes(F.value)||[])==null?void 0:P.filter(q=>(q==null?void 0:q.type)!=="operate"&&(q==null?void 0:q.label)!=="操作"&&(q==null?void 0:q.prop)!=="operate"),le=v||((D=re==null?void 0:re.find(q=>(q==null?void 0:q.label)==="证书附件"))==null?void 0:D.prop);if(le&&p[le]){const q=p[le];let we=[],Ee="",Ge=!1;if(typeof q=="string")try{const Fe=JSON.parse(q);Array.isArray(Fe)&&(we=Fe.map(Qe=>({name:(Qe==null?void 0:Qe.name)||(Qe==null?void 0:Qe.fileName)||"",url:(Qe==null?void 0:Qe.url)||""})).filter(Qe=>Qe.url||Qe.name),we.length>0&&(Ee=we[0].url||"",Ge=String(we[0].name).toLowerCase().endsWith(".pdf")||String(Ee).toLowerCase().endsWith(".pdf")))}catch{Ee=q,Ge=String(q).toLowerCase().endsWith(".pdf"),we=[{name:q,url:q}]}else Array.isArray(q)&&(we=q.map(Fe=>({name:(Fe==null?void 0:Fe.name)||(Fe==null?void 0:Fe.fileName)||"",url:(Fe==null?void 0:Fe.url)||""})).filter(Fe=>Fe.url||Fe.name),we.length>0&&(Ee=we[0].url||"",Ge=String(we[0].name).toLowerCase().endsWith(".pdf")||String(Ee).toLowerCase().endsWith(".pdf")));if(we.length>0||Ee){const Fe={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ge?"pdf":"image",sourceUrl:Ge?Ee:"",images:we};z=[Fe],Da(u==null?void 0:u.index,B,Fe)}}}if(!z||z.length===0){Ua.ElMessage.warning("暂无可预览数据");return}Te.value=z,ll.value=!0},iu=p=>{$a.value=$a.value.filter((v,B)=>B!==p)},rt=async(p,v,B)=>{var z,P,D,re,le,q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za,ba,Qa,ge,Ra,ga;if(wa(u.config,{type:Pe.TABLE,tableOperate:p})){if(za.value="",Ve.value=!0,pa.value=!0,ze("onButtonClick",p,v),ae.value=[],p==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,_a,T,G;(Ea=Me.value)!=null&&Ea.find(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id))?Me.value=(_a=A.cloneDeep(Me.value))==null?void 0:_a.filter(Re=>(Re==null?void 0:Re.id)!==(v==null?void 0:v.id)):Me.value=to(A.cloneDeep(Me.value),v);try{v!=null&&v.id&&((G=(T=Oa.value)==null?void 0:T.has)!=null&&G.call(T,v==null?void 0:v.id))&&Oa.value.delete(v.id)}catch{}If(Vr.value,sn.value,v==null?void 0:v.id),sa.setTableLoading(u==null?void 0:u.index),ze("change",{content:Me.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:p,columns:F.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(p==="批量删除"){if(((z=Hl.value)==null?void 0:z.length)===0)return Ua.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var T,G,Re,ia,_e;const Ea=(T=Hl.value)==null?void 0:T.map(ua=>ua.id);Me.value=(G=A.cloneDeep(Me.value))==null?void 0:G.filter(ua=>!(Ea!=null&&Ea.includes(ua.id))),sa.setTableLoading(u==null?void 0:u.index),ze("change",{content:Me.value,fixContent:Hl.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:p,relatedContents:u==null?void 0:u.related,columns:F.value});const _a=(Ea||[]).filter(Boolean);if(_a.length>0&&_a.every(ua=>ua!=null&&ua!=="")){const ua=(Hl.value||[]).map(Na=>{const rl={...Na};return delete rl._isOCRRow,delete rl._ocrTableId,delete rl._isTemp,delete rl.tableEditType,delete rl.index,rl});await A.pageBatchDeleteApi({platId:parseInt((Re=ml.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((ia=u==null?void 0:u.related)==null?void 0:ia.find(Na=>Na==null?void 0:Na.includes("content_")))||((_e=u==null?void 0:u.related)==null?void 0:_e.find(Na=>Na==null?void 0:Na.includes("content"))),tableContents:ua}]})}})}else if(p==="复制新增"){he.value="复制新增",A.cloneDeep(v);const Ea=(P=F.value)==null?void 0:P.find(_a=>_a==null?void 0:_a.isMainKey);Ea||((D=F.value)==null||D[0]),ar.value=v,Pi(!0)}else if(p==="新增")he.value="新增",$i(""),Y.value=!0;else if(p==="编辑")he.value="编辑",$i(v),Y.value=!0;else if(p==="查看")he.value="查看",$i(v),Ve.value=!1,pa.value=!1,Y.value=!0;else if(p==="查看三维模型"){const Ea={};for(let T in v)T!=="id"&&(Ea[T]=v[T]);let _a=(re=Object.values(Ea))==null?void 0:re[1];We.setTableShowThree(_a)}else if(p==="切换视图")gu();else if(((le=B==null?void 0:B.extra)==null?void 0:le.type)==="modelExample")he.value=p,qe.value=!0;else if(p==="新建"){let Ea=de.value,_a=[];for(let _e in Ea)_e!=null&&_e.includes(`loading${((q=ml.value)==null?void 0:q.account)||((we=ml.value)==null?void 0:we.账号)}`)&&(_a=[..._a,..._e]);let T=[];for(let _e in Ea)_e!=null&&_e.includes(`updateLoading${((Ee=ml.value)==null?void 0:Ee.account)||((Ge=ml.value)==null?void 0:Ge.账号)}`)&&(T=[...T,..._e]);let G=_a==null?void 0:_a.map(_e=>_e==null?void 0:_e.id);const Re=T==null?void 0:T.map(_e=>_e==null?void 0:_e.id);G=[...A.cloneDeep(G),...Re],(G==null?void 0:G.length)>0&&(G!=null&&G.every(_e=>_e!==null&&_e))&&await Mr.batchDeleteInsofDataApi({ids:G});const ia=(Fe=Sa.value)==null?void 0:Fe.find(_e=>(_e==null?void 0:_e.label)==="新建");await su(!1,ia)}else if(p==="修改模板"){let Ea=A.cloneDeep(Se).value;sa.setRouteToChildPath(Ea),ue.setActiveMenuPath(Ea+S)}else if(p==="执行")lt(p,v);else if(p==="导出paraform"){const Ea=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const _a=["推力","真空","压力","温度","流量"],T=wl=>{var Ml,Jl,zl;return wl?typeof(wl==null?void 0:wl.value)=="string"?wl.value:((zl=(Jl=(Ml=wl==null?void 0:wl._custom)==null?void 0:Ml.value)==null?void 0:Jl.value)==null?void 0:zl.value)||"":""},G=Array.isArray(Yl.value)?Yl.value:[],Re=T(G.find(wl=>(wl==null?void 0:wl.condition)==="child")),ia=String(Re||"").slice(0,8),_e=wl=>{if(wl==null)return"";const Ml=String(wl).trim();if(!Ml)return"";if(/^\d{8}$/.test(Ml))return Ml;const Jl=Ml.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Jl){const Gl=Jl[1],or=Jl[2].padStart(2,"0"),ql=Jl[3].padStart(2,"0");return`${Gl}${or}${ql}`}const zl=Ml.replace(/\D/g,"");return zl.length>=8?zl.slice(0,8):""},ua=async wl=>{var Ml,Jl;if(!wl)return"";try{const zl=await Gr("试验任务/任务管理",!1),Gl=(kr,pr=[])=>{if(!Array.isArray(kr))return pr;for(const mr of kr)(mr==null?void 0:mr.comp)==="Table"&&(mr!=null&&mr.name)&&pr.push(mr),Array.isArray(mr==null?void 0:mr.children)&&Gl(mr.children,pr),Array.isArray(mr==null?void 0:mr.tab)&&Gl(mr.tab,pr),Array.isArray(mr==null?void 0:mr.choice)&&Gl(mr.choice,pr);return pr},ql=Gl(zl||[]).find(kr=>(kr==null?void 0:kr.name)==="任务列表"),br=((Jl=(Ml=ql==null?void 0:ql.compData)==null?void 0:Ml.find(kr=>(kr==null?void 0:kr.key)==="tableContents"))==null?void 0:Jl.contents)||[];if(!Array.isArray(br)||br.length===0)return"";const Qr=br.find(kr=>String((kr==null?void 0:kr["试验代号(名称)"])||"").slice(0,8)===wl);return _e(Qr==null?void 0:Qr.计划试验时间)}catch(zl){return console.warn("获取任务列表计划试验时间失败:",zl),""}},Na=(Se.value||"").replace(/\/+$/,""),rl=Re?`${Na}/${Re}`:Na,qa=await Gr(rl||Se.value,!1),fl=String(na.value||"").trim(),hl=wl=>String(wl||"").trim(),Pl=(wl,Ml=[],Jl="")=>{if(!Array.isArray(wl))return Ml;for(const zl of wl){const Gl=hl((zl==null?void 0:zl.choiceName)||(zl==null?void 0:zl.name0)||Jl);(zl==null?void 0:zl.comp)==="Table"&&(zl==null?void 0:zl.name)&&_a.includes(zl.name)&&(!fl||Gl===fl)&&Ml.push(zl),Array.isArray(zl==null?void 0:zl.children)&&Pl(zl.children,Ml,Gl),Array.isArray(zl==null?void 0:zl.tab)&&Pl(zl.tab,Ml,Gl),Array.isArray(zl==null?void 0:zl.choice)&&Pl(zl.choice,Ml,Gl)}return Ml},Ha=Pl(qa||[]),kl=new Map;for(const wl of Ha)wl!=null&&wl.name&&!kl.has(wl.name)&&kl.set(wl.name,wl);const Fa=_a.map(wl=>kl.get(wl)).filter(Boolean);if(!Fa||Fa.length===0)return Ua.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const cl=wl=>{const Ml=new Map,Jl=(zl,Gl=[])=>{if(Array.isArray(zl))for(const or of zl){const ql=((or==null?void 0:or.label)??"").toString().trim(),br=ql?[...Gl,ql]:[...Gl];if(Array.isArray(or==null?void 0:or.children)&&or.children.length>0)Jl(or.children,br);else{const kr=((or==null?void 0:or.prop)??"").toString();if(!kr)continue;const pr=ql||kr,mr=(br.length>0?[...Gl,pr]:[pr]).join(".");Ml.set(kr,mr)}}};return Jl(wl,[]),Ml},Ka=(wl,Ml)=>{const Jl=cl(wl||[]),Gl=(ce.getAllLeafNodes(wl||[])||[]).filter(ql=>(ql==null?void 0:ql.prop)&&(ql==null?void 0:ql.type)!=="operate"&&(ql==null?void 0:ql.label)!=="操作"&&(ql==null?void 0:ql.prop)!=="operate"),or=Array.isArray(Ml)?Ml:[];return or.length===0?[]:or.map(ql=>{const br={};return Gl.forEach(Qr=>{const kr=String(Qr.prop),pr=Jl.get(kr)||String(Qr.label||Qr.prop);br[pr]=(ql==null?void 0:ql[kr])??""}),br})},ul=Fa.map(wl=>{var or,ql;const Ml=(wl==null?void 0:wl.compData)||[];let Jl=(or=Ml==null?void 0:Ml.find(br=>(br==null?void 0:br.key)==="header"))==null?void 0:or.contents;Array.isArray(Jl==null?void 0:Jl[0])&&(Jl=Jl[0]);const zl=((ql=Ml==null?void 0:Ml.find(br=>(br==null?void 0:br.key)==="tableContents"))==null?void 0:ql.contents)||[];if(!Array.isArray(Jl)||Jl.length===0||!Array.isArray(zl)||zl.length===0)return null;const Gl=Ka(Jl||[],zl||[]);return!Array.isArray(Gl)||Gl.length===0?null:{类型:wl==null?void 0:wl.name,数据:Gl}}).filter(Boolean);if(!ul||ul.length===0)return Ua.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Sl=await ua(ia),Bl={试验代号:ia,试验日期:Sl,ParaForm:ul},Dr=await pi().catch(()=>""),$l=await A.exportParaformApi(Bl,Dr);if(((Qe=$l==null?void 0:$l.data)==null?void 0:Qe.code)===200&&((La=(ka=$l==null?void 0:$l.data)==null?void 0:ka.result)!=null&&La.Excel文件)){const wl=$l.data.result.Excel文件,Ml=await A.platformDownloadFile({url:wl}),Jl=new Blob([Ml.data],{type:"application/vnd.ms-excel"}),zl=URL.createObjectURL(Jl),Gl=A.dayjs().format("YYYYMMDD"),ql=`${(ia||"UNKNOWN").trim()||"UNKNOWN"}_${Gl}_paraform.xls`,br=document.createElement("a");br.href=zl,br.download=ql,br.style.display="none",document.body.appendChild(br),br.click(),setTimeout(()=>{document.body.removeChild(br),URL.revokeObjectURL(zl)},100);const Qr=Array.isArray((ea=(Ia=$l==null?void 0:$l.data)==null?void 0:Ia.result)==null?void 0:ea.warnings)?$l.data.result.warnings:[];if(Qr.length>0){const kr=Qr.map((pr,mr)=>`${mr+1}. ${(pr==null?void 0:pr.field)||"未知字段"}:${(pr==null?void 0:pr.message)||""}`).join(`
24
24
  `);Ua.ElMessage.warning({message:`导出成功,但存在以下提示:
25
- ${kr}`,duration:5e3,showClose:!0})}else Ua.ElMessage.success("导出成功")}else Ua.ElMessage.error(((Za=$l==null?void 0:$l.data)==null?void 0:Za.message)||"导出失败")}catch(_a){console.error("导出paraform失败:",_a),Ua.ElMessage.error("导出失败:"+((_a==null?void 0:_a.message)||"未知错误"))}finally{Ea.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((ba=Hl.value)==null?void 0:ba.length)===0)return Ua.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((Qa=Me.value)==null?void 0:Qa.length)===0)return Ua.ElMessage.warning("暂无数据导出");let Ea=["序号",...(Ra=(be=F.value)==null?void 0:be.map(Re=>Re==null?void 0:Re.prop))==null?void 0:Ra.filter(Re=>Re!=="操作")],_a=p==="导出全部"?Me.value:Hl.value;const T=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];_a=_a==null?void 0:_a.map(Re=>Object.fromEntries(Object.entries(Re).filter(([ia])=>!T.includes(ia)))),Ea=["序号",...Ea],_a=_a==null?void 0:_a.map((Re,ia)=>({序号:ia+1,...Re}));let G=(u==null?void 0:u.compName)||"表格信息";Fo(_a,G,Ea,G)}else if(p==="OCR识别")dl.value=!0,$a.value=[],Ma.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0;else if(p==="迁移")f.selectRow=v,f.show=!0;else if(p==="生成方法"){let Ea=await Zf(v),_a;v!==""?_a=[v]:_a=A.cloneDeep(Me.value),_a=_a==null?void 0:_a.map(G=>(G.输出值=Ea,G));const T={fixContent:_a,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};ze("change",T)}else if(((ga=B==null?void 0:B.extra)==null?void 0:ga.type)==="methodButton"){let Ea;v!==""?Ea=[v]:Ea=A.cloneDeep(Me.value);const T={fixContent:await mt(Ea,F==null?void 0:F.value,"Manual",Me.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};ze("change",T)}}},ou=async(p,v)=>{var B,z,P,D,re,le,q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za,ba,Qa,be;try{let Ra,ga;const Ea=(B=de.value[Se.value+S])==null?void 0:B.filter(Na=>{var rl;return((rl=Na==null?void 0:Na.key)==null?void 0:rl.type)==="structureMethod"}),_a=(z=de.value[Se.value+S])==null?void 0:z.filter(Na=>{var rl;return((rl=Na==null?void 0:Na.key)==null?void 0:rl.type)==="structure"}),T=Ea==null?void 0:Ea.find(Na=>{var rl,qa;return((qa=(rl=Na==null?void 0:Na.value)==null?void 0:rl.pageData)==null?void 0:qa.method)==="保存"});if(!T)return;const G=(le=(re=de.value[(D=(P=T==null?void 0:T.value)==null?void 0:P.pageData)==null?void 0:D.path])==null?void 0:re.filter(Na=>{var rl;return((rl=Na==null?void 0:Na.key)==null?void 0:rl.type)==="data"}))==null?void 0:le.find(Na=>{var rl,qa,fl,hl;return((qa=(rl=Na==null?void 0:Na.value)==null?void 0:rl.tableData)==null?void 0:qa.算法名称)===((hl=(fl=T==null?void 0:T.value)==null?void 0:fl.pageData)==null?void 0:hl.method)});if(!G)return;const Re={buttonName:(we=(q=T==null?void 0:T.value)==null?void 0:q.pageData)==null?void 0:we.method,api:(Ge=(Ee=G==null?void 0:G.value)==null?void 0:Ee.tableData)==null?void 0:Ge.算法体,content:_a==null?void 0:_a.map(Na=>{var rl;return(rl=Na==null?void 0:Na.value)==null?void 0:rl.pageData}),extraContent:[],extraValues:(Qe=(Fe=T==null?void 0:T.value)==null?void 0:Fe.pageData)==null?void 0:Qe.data,methodName:(La=(wa=T==null?void 0:T.value)==null?void 0:wa.pageData)==null?void 0:La.path};if(!p)return;const ia={...p,compData:(Ia=p==null?void 0:p.compData)==null?void 0:Ia.map(Na=>{var rl;return(Na==null?void 0:Na.key)==="formContent"?{...Na,contents:(rl=Na==null?void 0:Na.contents)==null?void 0:rl.map(qa=>(qa==null?void 0:qa.prop)===v?{...qa,value:""}:qa)}:Na})},_e={key:{pageKey:Se.value+S,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ia}},ua=await Ua.axios.post(Re.api,_e,{headers:{"Content-Type":"application/json"}});return((ea=ua==null?void 0:ua.data)==null?void 0:ea.code)===200&&(Ra=(ba=(Za=ua==null?void 0:ua.data)==null?void 0:Za.result)==null?void 0:ba.latestReportCode,ga=(be=(Qa=ua==null?void 0:ua.data)==null?void 0:Qa.result)==null?void 0:be.status),{newMainKeyValue:Ra,newStatus:ga}}catch(Ra){throw Ua.ElMessage.error(Ra),new Error(Ra)}},Nt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const tu=async(p,v,B)=>{var q,we;let z=p==null?void 0:p[v==null?void 0:v.prop],P=1,D,re;const le=A.cloneDeep(Se).value+S+z;if(le){Nt.value="",D=(q=de.value[le])==null?void 0:q.filter(Fe=>{var Qe;return((Qe=Fe==null?void 0:Fe.key)==null?void 0:Qe.type)==="structure"});const Ee=D==null?void 0:D.find(Fe=>{var Qe,wa,La;return((La=(wa=(Qe=Fe==null?void 0:Fe.value)==null?void 0:Qe.pageData)==null?void 0:wa.comp)==null?void 0:La.toUpperCase())==="FORM"});re={...(we=Ee==null?void 0:Ee.value)==null?void 0:we.pageData,id:Ee==null?void 0:Ee.id};const Ge=await ou(re,v==null?void 0:v.prop);if(Nt.value=Ge==null?void 0:Ge.newStatus,Ge!=null&&Ge.newMainKeyValue)return Ge==null?void 0:Ge.newMainKeyValue}if(Me.value.some(Ee=>(Ee==null?void 0:Ee[v==null?void 0:v.prop])===z)){const Ee=z;for(;Me.value.some(Ge=>(Ge==null?void 0:Ge[v==null?void 0:v.prop])===`${Ee}(${P})`);)P++;z=`${Ee}(${P})`}return z},su=async(p,v,B)=>{var D,re,le,q;let z,P;if(await tu(B==null?void 0:B.data,B==null?void 0:B.firstCol),z=A.cloneDeep(Se).value+S,P=A.cloneDeep(z)+`loading${((D=ml.value)==null?void 0:D.account)||((re=ml.value)==null?void 0:re.账号)}`,v){const we=(q=(le=de.value[P])==null?void 0:le.filter(Ee=>{var Ge;return((Ge=Ee==null?void 0:Ee.key)==null?void 0:Ge.parentTable)===""}))==null?void 0:q.map(Ee=>{var Ge;return{id:Ee==null?void 0:Ee.id,...(Ge=Ee==null?void 0:Ee.value)==null?void 0:Ge.pageData}});(we==null?void 0:we.length)>0||await ce.loadingConstruct(z,P,null,null,null),sa.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)}else sa.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)},cu=()=>{$e.value=!1,ye.value=[],fe.value=!1},$i=p=>{var D,re,le,q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za,ba,Qa,be,Ra,ga,Ea,_a;const v=[];Be.value=A.cloneDeep(F.value),(re=ce.getColumnChild((D=A.cloneDeep(F.value))==null?void 0:D.filter(T=>(T==null?void 0:T.label)!=="操作")))==null||re.forEach((T,G)=>{var Re,ia,_e;T!=null&&T.formType&&((Re=T==null?void 0:T.formType)==null?void 0:Re.toUpperCase())==="SELECT"||T!=null&&T.menuId?v.push({label:(ia=T==null?void 0:T.prop)!=null&&ia.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",name:(T==null?void 0:T.prop)??"t"+G,prop:T==null?void 0:T.prop,type:"Select",value:(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??G,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,multipleLimit:T==null?void 0:T.multipleLimit,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,relatedValueId:T==null?void 0:T.relatedValueId,disabled:T==null?void 0:T.disabled,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,allSelectionContents:(T==null?void 0:T.allSelectionContents)??[],filterContent:T==null?void 0:T.filterContent,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly}):v.push({label:(_e=T==null?void 0:T.prop)!=null&&_e.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",prop:T==null?void 0:T.prop,name:(T==null?void 0:T.prop)??"t"+G,type:!(T!=null&&T.formType)||(T==null?void 0:T.formType)===""?"Input":T==null?void 0:T.formType,value:(T==null?void 0:T.formType)==="Upload"?(p==null?void 0:p[T==null?void 0:T.prop])??"{}":(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??G,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly})}),p===""||!p||(za.value=(p==null?void 0:p.id)??"");let B=ce.getColumnChild((le=A.cloneDeep(F.value))==null?void 0:le.filter(T=>(T==null?void 0:T.label)!=="操作"));Ke.value&&((q=Ke.value)==null?void 0:q.length)>0&&(Ke.value=(we=A.cloneDeep(Ke).value)==null?void 0:we.map(T=>{var Re;let G=(T==null?void 0:T.prop)||((Re=B==null?void 0:B.find(ia=>(ia==null?void 0:ia.label)===(T==null?void 0:T.label)))==null?void 0:Re.prop);return G&&(T.value=p[G]),T})),ya.value=Ke.value&&((Ee=Ke.value)==null?void 0:Ee.length)>0?ce.getTableFormToForm(Ke.value):v,ya.value=((Ge=ya.value)==null?void 0:Ge.map(T=>({...T,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled})))??ya.value;let z=[],P=((wa=(Qe=(Fe=u.itemData)==null?void 0:Fe.filter(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:Qe[0])==null?void 0:wa.contents)??"";if(P=ce.analyzeSplitToContent(P,","),(P==null?void 0:P.length)>0&&(z=P.flat()),(z==null?void 0:z.length)>0){let T=z==null?void 0:z.filter(ua=>ua==null?void 0:ua.includes("@Type"));if(T=T==null?void 0:T[(T==null?void 0:T.length)-1],(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){let ua=(Ia=(La=T==null?void 0:T.replace("=",w))==null?void 0:La.split(w))==null?void 0:Ia[1];((ea=ua==null?void 0:ua.trim())==null?void 0:ea.toUpperCase())==="MANUAL"&&(u==null||u.index,ya.value=(Za=ya.value)==null?void 0:Za.map((Na,rl)=>Na))}let G=(ba=ya.value)==null?void 0:ba.filter(ua=>ua==null?void 0:ua.mainKey),Re;G==null||G.forEach(ua=>{var rl;if(Re!==void 0)return;let Na=ua==null?void 0:ua.menus;((rl=G==null?void 0:G.filter(qa=>qa==null?void 0:qa.mainKey))==null?void 0:rl.length)>1&&(Re=Na,ua==null||ua.groups)});let ia=[],_e=new Map;if(G==null||G.forEach(ua=>{var Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl;if((Na=ua==null?void 0:ua.prop)!=null&&Na.includes(".")){let Bl=[];_e.get(((qa=(rl=ua==null?void 0:ua.prop)==null?void 0:rl.split("."))==null?void 0:qa[0])+(ua!=null&&ua.isMainPath?0:1)+((fl=ua==null?void 0:ua.groups)==null?void 0:fl[0]))&&(Bl=_e.get(((Pl=(hl=ua==null?void 0:ua.prop)==null?void 0:hl.split("."))==null?void 0:Pl[0])+(ua!=null&&ua.isMainPath?0:1)+((Ha=ua==null?void 0:ua.groups)==null?void 0:Ha[0]))),Bl.push(ua),_e.set(((Fa=(kl=ua==null?void 0:ua.prop)==null?void 0:kl.split("."))==null?void 0:Fa[0])+(ua!=null&&ua.isMainPath?0:1)+((cl=ua==null?void 0:ua.groups)==null?void 0:cl[0]),Bl)}else{let Bl=[];_e.get("normal"+(ua!=null&&ua.isMainPath?0:1)+((Ka=ua==null?void 0:ua.groups)==null?void 0:Ka[0]))&&(Bl=_e.get("normal"+(ua!=null&&ua.isMainPath?0:1)+((ul=ua==null?void 0:ua.groups)==null?void 0:ul[0]))),Bl.push(ua),_e.set("normal"+(ua!=null&&ua.isMainPath?0:1)+((Sl=ua==null?void 0:ua.groups)==null?void 0:Sl[0]),Bl)}}),ia=Array.from(_e.values()),(ia==null?void 0:ia.length)>0)for(let ua in ia){let Na=ia==null?void 0:ia[ua];if((Na==null?void 0:Na.length)!==1){if((Na==null?void 0:Na.length)>1){let rl=Na==null?void 0:Na.map(cl=>cl==null?void 0:cl.prop),qa=Na==null?void 0:Na.map(cl=>cl==null?void 0:cl.label),fl=Na==null?void 0:Na.map(cl=>cl==null?void 0:cl.value),hl=(Qa=A.cloneDeep(Na))==null?void 0:Qa[0],Pl=(be=ya.value)==null?void 0:be.findIndex(cl=>(cl==null?void 0:cl.prop)===(hl==null?void 0:hl.prop)),Ha=(Ra=ya.value)==null?void 0:Ra.slice(0,Pl),kl=(Ea=ya.value)==null?void 0:Ea.slice(Pl,(ga=ya.value)==null?void 0:ga.length);hl.label=qa==null?void 0:qa.join("·"),hl.value=fl==null?void 0:fl.join(" "),hl.value.trim()===""&&(hl.value=""),hl.prop=rl==null?void 0:rl.join("·");let Fa=Na==null?void 0:Na.map(cl=>{var Ka;return(Ka=cl==null?void 0:cl.words)==null?void 0:Ka.join(".")});hl.relatedWords=Fa,hl.usingType="parent",kl.unshift(hl),ya.value=[...Ha,...kl],ya.value=(_a=ya.value)==null?void 0:_a.map(cl=>(rl!=null&&rl.find(Ka=>Ka===(cl==null?void 0:cl.prop))&&(cl.isFormColHidden=!0,cl.relatedWords=Fa),cl))}}}}},uu=()=>{var v;const p=(v=o.value)==null?void 0:v.$el;p&&Tl.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:B=>{var re;const{oldIndex:z,newIndex:P}=B;if(z===P)return;const D=fn.value.splice(z,1)[0];fn.value.splice(P,0,D),F.value=(re=F.value)==null?void 0:re.slice().sort((le,q)=>{if(le.label==="操作")return 1;if(q.label==="操作")return-1;const we=fn.value.findIndex(Ge=>Ge.label===le.label),Ee=fn.value.findIndex(Ge=>Ge.label===q.label);return we-Ee})}})};e.onMounted(()=>{da.value=window.innerWidth-240*2,window.addEventListener("keydown",Xi)});const du=()=>{e.nextTick(()=>{uu()})},pu=()=>{c.value=!0},nt=(p,v)=>{var z;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let B;return p.children=(z=p.children)==null?void 0:z.map(P=>{var D,re;if((P==null?void 0:P.id)===za.value){let le={};for(let q in P){let we=(D=v==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.prop)===q))==null?void 0:D.label;we?le[q]=(re=ar.value)==null?void 0:re[we]:le[q]=P[q]??""}P=Object.assign(le,ar.value),B=P}else{let le=nt(P,v);P=le==null?void 0:le.contents,B=le==null?void 0:le.currentSelectContents}return P}),{contents:p,currentSelectContents:B}},At=(p,v)=>{let B,z;return p!=null&&p.find(P=>(P==null?void 0:P.id)===za.value)?B=p==null?void 0:p.map(P=>{var D,re,le;if((P==null?void 0:P.id)===za.value){let q={};for(let Ee in P){let Ge=(D=v==null?void 0:v.find(Fe=>(Fe==null?void 0:Fe.prop)===Ee))==null?void 0:D.label;Ge?q[Ee]=((re=ar.value)==null?void 0:re[Ge])??"":q[Ee]=P[Ee]??""}let we=ar.value;for(let Ee in q)(le=ar.value)!=null&&le[Ee]||(we[Ee]=(q==null?void 0:q[Ee])??"");P=we,z=P}return P}):B=p==null?void 0:p.map(P=>{var D,re,le,q;if((P==null?void 0:P.id)===za.value){let we={};for(let Ee in P){let Ge=(D=v==null?void 0:v.find(Fe=>(Fe==null?void 0:Fe.prop)===Ee))==null?void 0:D.label;Ge?we[Ee]=(re=ar.value)==null?void 0:re[Ge]:we[Ee]=P[Ee]??""}P=Object.assign(we,ar.value),z=P}else P=(le=nt(P,v))==null?void 0:le.contents,z=(q=nt(P,v))==null?void 0:q.currentSelectContents;return P}),{newContents:B,currentSelectContents:z}},zt=(p,v,B)=>{var z,P;return p[v==null?void 0:v.prop]=B,typeof p.id=="number"&&(p.id=(z=p.id)==null?void 0:z.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(zt)),p},Mt=p=>{var B;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((B=p.children)==null||B.forEach(z=>{v.push(...Mt(z))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(z=>{const P={...z};return delete P.children,P}):[]},so=["Pacific6000数据采集装置.通道号","通道号"],Vi=p=>{if(!p)return"";const v=so.map(B=>p==null?void 0:p[B]).find(B=>B!=null&&String(B).trim()!=="");return v==null?"":String(v).trim()},it=async(p,v=void 0)=>{if(!p)return!1;try{const B=Qe=>{var wa,La,Ia;return Qe?typeof(Qe==null?void 0:Qe.value)=="string"?Qe.value:((Ia=(La=(wa=Qe==null?void 0:Qe._custom)==null?void 0:wa.value)==null?void 0:La.value)==null?void 0:Ia.value)||"":""},z=Array.isArray(Yl.value)?Yl.value:[],P=B(z.find(Qe=>(Qe==null?void 0:Qe.condition)==="child")),D=(Se.value||"").replace(/\/+$/,""),re=P?`${D}/${P}`:D,le=await Gr(re||Se.value,!1),q=String(na.value||"").trim(),we=Qe=>String(Qe||"").trim(),Ee=(Qe,wa=[],La="")=>{if(!Array.isArray(Qe))return wa;for(const Ia of Qe){const ea=we((Ia==null?void 0:Ia.choiceName)||(Ia==null?void 0:Ia.name0)||La);(Ia==null?void 0:Ia.comp)==="Table"&&(!q||ea===q)&&wa.push(Ia),Array.isArray(Ia==null?void 0:Ia.children)&&Ee(Ia.children,wa,ea),Array.isArray(Ia==null?void 0:Ia.tab)&&Ee(Ia.tab,wa,ea),Array.isArray(Ia==null?void 0:Ia.choice)&&Ee(Ia.choice,wa,ea)}return wa},Ge=Ee(le||[]),Fe=String((u==null?void 0:u.compName)||"");return Ge.some(Qe=>{var La,Ia;const wa=((Ia=(La=Qe==null?void 0:Qe.compData)==null?void 0:La.find(ea=>(ea==null?void 0:ea.key)==="tableContents"))==null?void 0:Ia.contents)||[];return!Array.isArray(wa)||wa.length===0?!1:wa.some(ea=>{if(String((Qe==null?void 0:Qe.name)||"")===Fe&&(ea==null?void 0:ea.id)===v)return!1;const ba=Vi(ea);return!!ba&&ba===p})})}catch{return(Me.value||[]).some(z=>{if((z==null?void 0:z.id)===v)return!1;const P=Vi(z);return!!P&&P===p})}},Pi=async(p=!0,v,B)=>{var we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za,ba,Qa,be,Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl;if(ar.value){const Fa=(Ee=ce.getColumnChild((we=A.cloneDeep(F.value))==null?void 0:we.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")))==null?void 0:Ee.filter(Ka=>(Ka==null?void 0:Ka.required)===!0);for(let Ka=0;Ka<((Fa==null?void 0:Fa.length)??0);Ka++){const ul=Fa[Ka],Sl=ul==null?void 0:ul.prop,Bl=(ul==null?void 0:ul.label)??Sl,Dr=(Ge=ar.value)==null?void 0:Ge[Sl];if(Dr===""||Dr===null||Dr===void 0||Array.isArray(Dr)&&Dr.length===0){Ua.ElMessage.error(`${Bl}不能为空`);return}}const cl=Vi(ar.value);if(cl&&await it(cl,za.value||void 0)){Ua.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=ce.getColumnChild((Fe=A.cloneDeep(F.value))==null?void 0:Fe.filter(Fa=>(Fa==null?void 0:Fa.label)!=="操作")),P,D=A.cloneDeep(Me.value);if(!ar.value){Y.value=!1;return}if(za.value===""){Ca.value++;let Fa;Fa={id:Ca.value.toString()};try{Fa.sort=Xn(0,Me.value||[])}catch{}Fa!=null&&Fa.children&&(Fa={...Fa,children:(Qe=Fa.children)==null?void 0:Qe.map(Ka=>zt(Ka,v,B))});const cl=Object.assign(ar.value,Fa);D.unshift(cl),P=cl}else D=(wa=At(D,z))==null?void 0:wa.newContents,P=(La=At(D,z))==null?void 0:La.currentSelectContents;const re=(Ia=u.itemData)==null?void 0:Ia.filter(Fa=>(Fa==null?void 0:Fa.key)==="childTree")[0];if(((ea=re==null?void 0:re.contents)==null?void 0:ea.length)>0){he.value="编辑";const Fa=[];D==null||D.forEach((ul,Sl)=>{var Dr;let Bl={};if(Array.isArray(ul)){let $l=[];ul==null||ul.filter(wl=>!(wl!=null&&wl.id)).forEach((wl,Ml)=>{var Jl,zl,Gl,or,ql,br,Qr;if((zl=(Jl=Vl.value)==null?void 0:Jl[Ml])!=null&&zl.prop&&!Array.isArray(wl)){let kr={};kr[Vl.value[Ml].column]=wl,R!=null&&R.value&&((Gl=R==null?void 0:R.value)==null?void 0:Gl.length)>0&&((or=R==null?void 0:R.value)!=null&&or.find(pr=>JSON.stringify(pr==null?void 0:pr[0])===JSON.stringify(kr)))&&($l=(ql=R==null?void 0:R.value)==null?void 0:ql.find(pr=>JSON.stringify(pr==null?void 0:pr[0])===JSON.stringify(kr))),$l&&$l.length>0?Bl[Vl.value[Ml].prop]=$l!=null&&$l.find(pr=>{var mr;return((mr=Object.keys(pr))==null?void 0:mr[0])===Vl.value[Ml].column})?(br=$l==null?void 0:$l.find(pr=>{var mr;return((mr=Object.keys(pr))==null?void 0:mr[0])===Vl.value[Ml].column}))==null?void 0:br[Vl.value[Ml].column]:wl:Bl[Vl.value[Ml].prop]=wl}else Array.isArray(wl)&&((Qr=Vl.value[Ml])!=null&&Qr.prop?Bl[Vl.value[Ml].prop]=wl:Bl.children=yt(wl,Vl.value))})}else Bl=ul;if(Array.isArray(ul)&&ul.some($l=>$l==null?void 0:$l.id)){const $l=(Dr=ul==null?void 0:ul.find(wl=>wl.id))==null?void 0:Dr.id;Fa.push(Object.assign(Bl,{id:io($l)}))}else Bl.id?Fa.push(Bl):Fa.push(Object.assign(Bl,{id:Sl.toString()}))});const cl=(Me.value||[]).map(ul=>String(ul==null?void 0:ul.id)),Ka=ui(Fa,cl);Me.value=Rt(Ka,re,F.value)}Ot(Me.value),Vr.value=Me.value;const le=Lf(Vr.value,sn.value,D);let q=[];if(H.value?(q=(Za=A.cloneDeep(H).value.singleContent)==null?void 0:Za.filter(Fa=>(Fa==null?void 0:Fa.id)!==(P==null?void 0:P.id)),q.push(P)):q=[P],Ll.value){const Fa={content:le,singleContent:((ba=re==null?void 0:re.contents)==null?void 0:ba.length)>0?q==null?void 0:q.flatMap(Mt):q,index:u==null?void 0:u.index,buttonName:"编辑",column:F.value,parentTableId:u==null?void 0:u.parentTableId};sa.setCacheUpdatingData(Fa)}if((Qa=F.value)==null||Qa.forEach(Fa=>{(Fa==null?void 0:Fa.formType)==="Upload"&&(P[Fa.prop]=P[Fa.prop]===""?"{}":typeof P[Fa.prop]!="string"?JSON.stringify(P[Fa.prop]):P[Fa.prop])}),p){(Ea=(ga=(Ra=(be=u.itemData)==null?void 0:be.find(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType"))==null?void 0:Ra.value)==null?void 0:ga.find(Ka=>(Ka==null?void 0:Ka.value)==="onConditionContents"))==null||Ea.content;let Fa=(_a=u.itemData)==null?void 0:_a.filter(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType");Fa=Array.from(new Map(Fa.filter(Boolean).map((Ka,ul)=>[Ka.value,{...Ka,_idx:ul}])).values()).sort((Ka,ul)=>Ka._idx-ul._idx).map(({_idx:Ka,...ul})=>ul),Fa=(T=Fa==null?void 0:Fa[(Fa==null?void 0:Fa.length)-1])==null?void 0:T.value;const cl={fixContent:[P],buttonName:he.value,relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};sa.setTableLoading(u==null?void 0:u.index),Y.value=!1,ar.value=void 0,ze("change",cl)}if((ia=(Re=(G=ya.value)==null?void 0:G[0])==null?void 0:Re.optionUrl)!=null&&ia.menuId){Y.value=!1;let Fa=(_e=u.itemData)==null?void 0:_e.filter(cl=>(cl==null?void 0:cl.key)==="filterAllType");if((Fa==null?void 0:Fa.length)>0){let cl=Fa==null?void 0:Fa.map(Sl=>Sl==null?void 0:Sl.value),Ka=(rl=(Na=(ua=cl.flat().find(Sl=>{var Bl;return(Bl=Sl==null?void 0:Sl.content)==null?void 0:Bl.includes("@Num")}))==null?void 0:ua.content)==null?void 0:Na.split(":"))==null?void 0:rl[1];((hl=(fl=(qa=cl.flat().find(Sl=>{var Bl;return(Bl=Sl==null?void 0:Sl.content)==null?void 0:Bl.includes("@Type:")}))==null?void 0:qa.content)==null?void 0:fl.split(":"))==null?void 0:hl[1])!=="Manual"&&(Ka=parseInt(Ka),Me.value=(kl=Me.value)==null?void 0:kl.slice(((Pl=Me.value)==null?void 0:Pl.length)-Ka,(Ha=Me.value)==null?void 0:Ha.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",Xi),F.value=[],Me.value=[],Be.value=[],Ta.value=[],Ke.value=[],aa.value=[],ye.value=[],pe.value=[],ya.value=[],Hl.value=[],o.value=null,Ln.value=""});const co=async(p,v,B)=>{var Qe,wa,La,Ia,ea,Za,ba,Qa,be,Ra,ga,Ea,_a;vr.value=(B==null?void 0:B.prop)??(B==null?void 0:B.property);const z=A.cloneDeep(u.itemData),P=((Qe=z==null?void 0:z.find(T=>(T==null?void 0:T.key)==="header"))==null?void 0:Qe.contents)??[];let D=P==null?void 0:P.find((T,G)=>{var Re,ia,_e;return(T==null?void 0:T.prop)===vr.value||(T==null?void 0:T.label)===vr.value||(G==null?void 0:G.toString())===((_e=(ia=(Re=vr.value)==null?void 0:Re.split("a"))==null?void 0:ia[1])==null?void 0:_e.toString())});const re=ce.getColumnChild((wa=A.cloneDeep(F.value))==null?void 0:wa.filter(T=>(T==null?void 0:T.label)!=="操作"));if(D||(D=re==null?void 0:re.find(T=>(T==null?void 0:T.prop)===vr.value||(T==null?void 0:T.label)===vr.value)),D&&!((La=D==null?void 0:D.menus)!=null&&La.length)&&!((Ia=D==null?void 0:D.groups)!=null&&Ia.length)&&!((ea=D==null?void 0:D.words)!=null&&ea.length)){const T=(Za=ya.value)==null?void 0:Za.find(G=>(G==null?void 0:G.prop)===vr.value);T&&(D={...D,menus:(T==null?void 0:T.menus)??(D==null?void 0:D.menus),groups:(T==null?void 0:T.groups)??(D==null?void 0:D.groups),words:(T==null?void 0:T.words)??(D==null?void 0:D.words),bindMenus:(T==null?void 0:T.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(T==null?void 0:T.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(T==null?void 0:T.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(T==null?void 0:T.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((ba=ya==null?void 0:ya.value)==null||ba.forEach(T=>{var G,Re,ia,_e,ua;(T==null?void 0:T.prop)===(D==null?void 0:D.prop)&&(T!=null&&T.endChildMenu)&&((G=D==null?void 0:D.prop)!=null&&G.includes(".")&&((ia=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ia[0])!==((ua=(_e=T==null?void 0:T.prop)==null?void 0:_e.split("."))==null?void 0:ua[0])?D.endChildMenu=T==null?void 0:T.value:D.endChildMenu=T==null?void 0:T.endChildMenu)})),!D)return;const le=vr.value,q=(Qa=Me.value)==null?void 0:Qa.findIndex(T=>(T==null?void 0:T.id)===(v==null?void 0:v.id));q!==-1&&le&&(Me.value[q]={...Me.value[q],[le]:p});const we=T=>{Array.isArray(T)&&T.forEach(G=>{Array.isArray(G==null?void 0:G.allSelectionContents)&&G.allSelectionContents.length>0&&(G.contactValue=Me.value[q]??v),Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&we(G.children)})};we(F.value),D.value=p,D.endChildMenu=D.endChildMenu||"";let Ee=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const Ge=T=>{Array.isArray(T)&&T.forEach(G=>{var ia,_e;if(((G==null?void 0:G.type)==="Select"||(G==null?void 0:G.formType)&&G.formType.toUpperCase()==="SELECT"||(G==null?void 0:G.columnType)&&G.columnType.toUpperCase()==="SELECT")&&Array.isArray(G==null?void 0:G.menus)&&G.menus.length>0&&G.menus[G.menus.length-1]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const ua=(ia=G==null?void 0:G.prop)!=null&&ia.includes(".")?G.prop.split(".")[0]:null,Na=(_e=D==null?void 0:D.prop)!=null&&_e.includes(".")?D.prop.split(".")[0]:null;(!ua||!Na||ua===Na)&&(G.endChildMenu=Ee)}Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&Ge(G.children)})};if(Ge(F.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let T=D!=null&&D.relatedContents&&((be=D==null?void 0:D.relatedContents)==null?void 0:be.length)>0?(Ra=D==null?void 0:D.relatedContents)==null?void 0:Ra.find(G=>{var Re,ia,_e,ua;return(G==null?void 0:G[(ua=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ua[((_e=(ia=D==null?void 0:D.prop)==null?void 0:ia.split("."))==null?void 0:_e.length)-1]])===(D==null?void 0:D.value)}):await us(D);if(T){const G={...v};re==null||re.forEach(Re=>{var ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl;(Re==null?void 0:Re.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((ia=D==null?void 0:D.relatedContents)==null?void 0:ia.length)>0?(_e=Re==null?void 0:Re.prop)!=null&&_e.includes(".")&&((Na=(ua=Re==null?void 0:Re.prop)==null?void 0:ua.split("."))==null?void 0:Na[0])===((qa=(rl=D==null?void 0:D.prop)==null?void 0:rl.split("."))==null?void 0:qa[0])?G[Re.prop]=T[(Ha=(fl=Re==null?void 0:Re.prop)==null?void 0:fl.split("."))==null?void 0:Ha[((Pl=(hl=Re==null?void 0:Re.prop)==null?void 0:hl.split("."))==null?void 0:Pl.length)-1]]??G[Re.prop]:G[Re.prop]=(T==null?void 0:T[Re.prop])??G[Re.prop]:ce.same((D==null?void 0:D.menus)??[],(Re==null?void 0:Re.menus)??[])&&ce.same((D==null?void 0:D.groups)??[],(Re==null?void 0:Re.groups)??[])&&!ce.same((D==null?void 0:D.words)??[],(Re==null?void 0:Re.words)??[])?(kl=Re==null?void 0:Re.prop)!=null&&kl.includes(".")&&((cl=(Fa=Re==null?void 0:Re.prop)==null?void 0:Fa.split("."))==null?void 0:cl[0])!==((ul=(Ka=D==null?void 0:D.prop)==null?void 0:Ka.split("."))==null?void 0:ul[0])||(G[Re.prop]=(T==null?void 0:T[(Sl=Re==null?void 0:Re.words)==null?void 0:Sl.join(".")])??(T==null?void 0:T[Re.prop])??G[Re.prop]):(!(Re!=null&&Re.isMainPath)&&ce.same((D==null?void 0:D.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),G[Re.prop]=(T==null?void 0:T[Re.prop])??G[Re.prop]))}),Me.value=(ga=A.cloneDeep(Me.value))==null?void 0:ga.map(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id)?{...G,id:Re==null?void 0:Re.id}:Re)}}if((Ea=D==null?void 0:D.optionUrl)!=null&&Ea.menuSelect){let T="";re==null||re.forEach(ia=>{var _e,ua,Na,rl,qa;T===""&&((Na=(ua=(_e=ia==null?void 0:ia.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:ua[1])!=null&&Na.includes("["))&&(T=(qa=(rl=ia==null?void 0:ia.optionUrl)==null?void 0:rl.groupSelect)==null?void 0:qa[1])});let G=await gt(D),Re;if(G==null||G.forEach(ia=>{var _e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl;T===((ua=(_e=D==null?void 0:D.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:ua[1])&&((qa=(rl=(Na=D==null?void 0:D.optionUrl)==null?void 0:Na.groupSelect)==null?void 0:rl[1])!=null&&qa.includes("["))&&((kl=A.cloneDeep(ia))==null?void 0:kl[(Ha=(Pl=(hl=(fl=D==null?void 0:D.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])==null?void 0:Pl.replaceAll("[",""))==null?void 0:Ha.replaceAll("]","")])===(D==null?void 0:D.value)&&(Re=ia)}),Re){const ia={...v};re==null||re.forEach(_e=>{var ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl;(Re!=null&&Re[_e==null?void 0:_e.label]||Re!=null&&Re[(qa=(rl=(Na=(ua=_e==null?void 0:_e.optionUrl)==null?void 0:ua.groupSelect)==null?void 0:Na[1])==null?void 0:rl.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])&&((Pl=(hl=(fl=_e==null?void 0:_e.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])!=null&&Pl.includes("["))&&(ia[_e.prop]=(Re==null?void 0:Re[_e==null?void 0:_e.label])||(Re==null?void 0:Re[(cl=(Fa=(kl=(Ha=_e==null?void 0:_e.optionUrl)==null?void 0:Ha.groupSelect)==null?void 0:kl[1])==null?void 0:Fa.replaceAll("[",""))==null?void 0:cl.replaceAll("]","")]))}),Me.value=(_a=A.cloneDeep(Me.value))==null?void 0:_a.map(_e=>(_e==null?void 0:_e.id)===(v==null?void 0:v.id)?{...ia,id:_e==null?void 0:_e.id}:_e)}}},fu=async p=>{var Qe,wa,La,Ia,ea,Za,ba,Qa,be,Ra,ga,Ea,_a,T;if(!p)return;const v=A.cloneDeep(ar.value||{});ar.value=p;const B=Vi(v),z=Vi(ar.value);if(z&&z!==B&&await it(z,za.value||void 0)){Ua.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),so.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(ar.value||{},Re)||Object.prototype.hasOwnProperty.call(v||{},Re)){const ia=(v==null?void 0:v[Re])??"";ar.value[Re]=ia,p[Re]=ia}}),ya.value=(ya.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!so.includes(Re.prop))return Re;const ia=(v==null?void 0:v[Re.prop])??"";return{...Re,value:ia,selectValue:ia===""?[]:[ia]}});return}let P=A.cloneDeep(u.itemData);P==null||P.map(G=>{var Re,ia,_e,ua;return(G==null?void 0:G.key)==="header"&&(Array.isArray((Re=G.contents)==null?void 0:Re[0])?G.contents=(_e=ce.getColumnChild((ia=G.contents)==null?void 0:ia[0]))==null?void 0:_e.map((Na,rl)=>{var qa,fl,hl,Pl,Ha,kl;return((hl=(fl=(qa=ya.value)==null?void 0:qa.find(Fa=>(Fa==null?void 0:Fa.prop)===(Na==null?void 0:Na.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Pl=Object.values(p))==null?void 0:Pl[rl])?Na.value=[(Ha=Object.values(p))==null?void 0:Ha[rl]]:Na.value=(kl=Object.values(p))==null?void 0:kl[rl],Na}):G.contents=(ua=G.contents)==null?void 0:ua.map((Na,rl)=>{var qa,fl,hl,Pl,Ha,kl;return((hl=(fl=(qa=ya.value)==null?void 0:qa.find(Fa=>(Fa==null?void 0:Fa.prop)===(Na==null?void 0:Na.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Pl=Object.values(p))==null?void 0:Pl[rl])?Na.value=[(Ha=Object.values(p))==null?void 0:Ha[rl]]:Na.value=(kl=Object.values(p))==null?void 0:kl[rl],Na})),G});let D=ya.value,re=(Qe=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:Qe.contents;if(vr.value||(D=D==null?void 0:D.map(G=>{var Re;return G.value=G.value??((Re=re==null?void 0:re.find((ia,_e)=>(ia==null?void 0:ia.prop)===(G==null?void 0:G.name)))==null?void 0:Re.value),G})),!er.value)return;let le=A.cloneDeep(vr.value);(wa=vr.value)!=null&&wa.includes("·")&&(vr.value=(Ia=(La=vr.value)==null?void 0:La.split("·"))==null?void 0:Ia[0]);let q=(Za=(ea=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:ea.contents)==null?void 0:Za.find((G,Re)=>(G==null?void 0:G.prop)===vr.value);(ba=ya==null?void 0:ya.value)==null||ba.forEach(G=>{var Re,ia,_e,ua,Na,rl,qa,fl,hl;(G==null?void 0:G.prop)===(q==null?void 0:q.prop)&&(G!=null&&G.endChildMenu)&&((Re=q==null?void 0:q.prop)!=null&&Re.includes(".")&&((_e=(ia=q==null?void 0:q.prop)==null?void 0:ia.split("."))==null?void 0:_e[0])!==((Na=(ua=G==null?void 0:G.prop)==null?void 0:ua.split("."))==null?void 0:Na[0])?q.endChildMenu=(qa=(rl=G==null?void 0:G.value)==null?void 0:rl.split(" "))==null?void 0:qa[0]:q.endChildMenu=(hl=(fl=G==null?void 0:G.endChildMenu)==null?void 0:fl.split(" "))==null?void 0:hl[0])});let we=q!=null&&q.isMainPath&&(q!=null&&q.mainKey)?q==null?void 0:q.value:"",Ee=D,Ge=J.value;if(Ge!=null&&Ge.find(G=>(q==null?void 0:q.prop)===(G==null?void 0:G.key))&&(Ge=Ge==null?void 0:Ge.filter(G=>(q==null?void 0:q.prop)!==(G==null?void 0:G.key))),Ge!=null&&Ge.find(G=>le===(G==null?void 0:G.key))&&(Ge=Ge==null?void 0:Ge.filter(G=>le!==(G==null?void 0:G.key))),(q==null?void 0:q.formType)==="Select"?Ee=Ee==null?void 0:Ee.map(G=>{var Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul;return(G==null?void 0:G.type)==="Select"&&(((Re=G==null?void 0:G.allSelectionContents)==null?void 0:Re.length)>0&&(G.contactValue=p),((q==null?void 0:q.prop)===(G==null?void 0:G.prop)||le===(G==null?void 0:G.prop))&&q&&(Array.isArray(q.value)&&((ia=q.value)==null?void 0:ia.length)>0&&((_e=q.value)!=null&&_e.every(Sl=>typeof Sl=="string"))?(Ge.push({key:G==null?void 0:G.prop,value:[(Na=q.value)==null?void 0:Na[((ua=q.value)==null?void 0:ua.length)-1]]}),G.selectValue=(rl=Ge==null?void 0:Ge.find(Sl=>(Sl==null?void 0:Sl.key)===(G==null?void 0:G.prop)))==null?void 0:rl.value):Array.isArray(q.value)&&((qa=q.value)==null?void 0:qa.length)===0?(Ge=[],G.selectValue=[],p[G==null?void 0:G.prop]=""):Array.isArray(G.value)&&Ge.push({key:G==null?void 0:G.prop,value:[(fl=G.value)==null?void 0:fl[(G==null?void 0:G.length)-1]]})),((Pl=G==null?void 0:G.menus)==null?void 0:Pl[((hl=G==null?void 0:G.menus)==null?void 0:hl.length)-1])===""&&(q!=null&&q.isMainPath)&&(q!=null&&q.mainKey)&&((Ha=G==null?void 0:G.prop)!=null&&Ha.includes(".")&&((Fa=(kl=G==null?void 0:G.prop)==null?void 0:kl.split("."))==null?void 0:Fa[0])!==((Ka=(cl=q==null?void 0:q.prop)==null?void 0:cl.split("."))==null?void 0:Ka[0])||(G.endChildMenu=(ul=we==null?void 0:we.split(" "))==null?void 0:ul[0]))),G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G}):(q==null?void 0:q.formType)!=="Input"&&(Ee=Ee==null?void 0:Ee.map(G=>(G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G))),J.value=Ge,Ee!=null&&Ee.some(G=>(G==null?void 0:G.functionName)&&(G==null?void 0:G.functionName)!=="")){let G=await mt([p],F==null?void 0:F.value,"Auto",Me.value),Re=[];(Qa=Ee==null?void 0:Ee.filter(_e=>(_e==null?void 0:_e.functionName)&&(_e==null?void 0:_e.functionName)!==""))==null||Qa.forEach(_e=>{var ua;((ua=_e==null?void 0:_e.functionRelatedWords)==null?void 0:ua.length)>0&&(Re=[...Re,..._e==null?void 0:_e.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(_e=>(_e==null?void 0:_e[0])!=="@");let ia=[];for(let _e in G==null?void 0:G[0])Re!=null&&Re.find(ua=>_e===ua||(_e==null?void 0:_e.includes("."+ua)))&&ia.push(((be=G==null?void 0:G[0])==null?void 0:be[_e])!=="");(G==null?void 0:G.length)>0&&ia.every(_e=>_e)&&(Ee=Ee==null?void 0:Ee.map(_e=>{var ua;return _e.value=((ua=G==null?void 0:G[0])==null?void 0:ua[_e==null?void 0:_e.prop])??_e.value,_e})),ar.value=G==null?void 0:G[0]}if(ya.value=Ee,q=Object.assign({},q??{},{relatedWords:(ga=(Ra=ya==null?void 0:ya.value)==null?void 0:Ra.find(G=>(G==null?void 0:G.prop)===(q==null?void 0:q.prop)))==null?void 0:ga.relatedWords}),(q==null?void 0:q.mainKey)&&(q!=null&&q.value)&&(q==null?void 0:q.value)!==""){let G=q!=null&&q.relatedContents&&((Ea=q==null?void 0:q.relatedContents)==null?void 0:Ea.length)>0?(_a=q==null?void 0:q.relatedContents)==null?void 0:_a.find(Re=>{var ia,_e,ua,Na;return(Re==null?void 0:Re[(Na=(ia=q==null?void 0:q.prop)==null?void 0:ia.split("."))==null?void 0:Na[((ua=(_e=q==null?void 0:q.prop)==null?void 0:_e.split("."))==null?void 0:ua.length)-1]])===(q==null?void 0:q.value)}):await us(q);if(G&&JSON.stringify(G)!=="{}"){let Re=Ee;Re=Re==null?void 0:Re.map(_e=>{var ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl,Bl,Dr,$l,wl,Ml,Jl,zl;if((q==null?void 0:q.prop)===(_e==null?void 0:_e.prop))_e.value=(G==null?void 0:G[(ua=_e==null?void 0:_e.words)==null?void 0:ua.join(".")])??(G==null?void 0:G[_e==null?void 0:_e.prop])??G[(fl=(Na=_e==null?void 0:_e.prop)==null?void 0:Na.split("."))==null?void 0:fl[((qa=(rl=_e==null?void 0:_e.prop)==null?void 0:rl.split("."))==null?void 0:qa.length)-1]];else if(q!=null&&q.relatedContents&&((hl=q==null?void 0:q.relatedContents)==null?void 0:hl.length)>0)_e.value=(Pl=_e==null?void 0:_e.prop)!=null&&Pl.includes(".")&&((kl=(Ha=_e==null?void 0:_e.prop)==null?void 0:Ha.split("."))==null?void 0:kl[0])===((cl=(Fa=q==null?void 0:q.prop)==null?void 0:Fa.split("."))==null?void 0:cl[0])?G[(Bl=(Ka=_e==null?void 0:_e.prop)==null?void 0:Ka.split("."))==null?void 0:Bl[((Sl=(ul=_e==null?void 0:_e.prop)==null?void 0:ul.split("."))==null?void 0:Sl.length)-1]]:(G==null?void 0:G[_e==null?void 0:_e.prop])??(_e==null?void 0:_e.value);else if(ce.same((q==null?void 0:q.menus)??[],(_e==null?void 0:_e.menus)??[])&&ce.same((q==null?void 0:q.groups)??[],(_e==null?void 0:_e.groups)??[])&&!ce.same((q==null?void 0:q.words)??[],(_e==null?void 0:_e.words)??[]))if((Dr=_e==null?void 0:_e.prop)!=null&&Dr.includes(".")&&((wl=($l=_e==null?void 0:_e.prop)==null?void 0:$l.split("."))==null?void 0:wl[0])!==((Jl=(Ml=q==null?void 0:q.prop)==null?void 0:Ml.split("."))==null?void 0:Jl[0])){let Gl=Object.keys(G);Gl=Gl==null?void 0:Gl.find(or=>{var ql;return or==null?void 0:or.includes("."+((ql=_e==null?void 0:_e.words)==null?void 0:ql.join(".")))}),_e.value=(G==null?void 0:G[Gl])??(G==null?void 0:G[_e==null?void 0:_e.prop])??_e.value}else{let Gl=Object.keys(G);Gl=Gl==null?void 0:Gl.find(or=>{var ql;return or==null?void 0:or.includes("."+((ql=_e==null?void 0:_e.words)==null?void 0:ql.join(".")))}),_e.value=(G==null?void 0:G[(zl=_e==null?void 0:_e.words)==null?void 0:zl.join(".")])??(G==null?void 0:G[Gl])??(G==null?void 0:G[_e==null?void 0:_e.prop])??_e.value}else!(_e!=null&&_e.isMainPath)&&ce.same((q==null?void 0:q.bindMenus)??[],(_e==null?void 0:_e.bindMenus)??[]),_e.value=(G==null?void 0:G[_e==null?void 0:_e.prop])??_e.value;return _e}),ya.value=Re;let ia={};(T=ya.value)==null||T.forEach(_e=>{ia[_e.prop]=_e==null?void 0:_e.value}),ar.value=ia}}er.value=!0,I.value=!1},hu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",vu=p=>{var D,re;const v=(re=(D=Ke.value)==null?void 0:D.find(le=>(le==null?void 0:le.label)===(p==null?void 0:p.label)))==null?void 0:re.multiple,B=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;Me.value.forEach(le=>{const q=le==null?void 0:le[B];v&&Eo.isString(q)&&(le[B]=[q]),!v&&!Eo.isString(q)&&(le[B]="")})},It=(p,v)=>{var B;return v==null||v.forEach(z=>{p[z==null?void 0:z.prop]=z==null?void 0:z.value}),p.children&&((B=p.children)==null?void 0:B.length)>0&&(p.children=p.children.map(z=>It(z,v))),p},ot=p=>{var B,z,P,D,re,le;$i("");const v=(B=ya.value)==null?void 0:B.reduce((q,we)=>(q[we.name]=we.value,q),{});if(((z=Object.keys(v))==null?void 0:z.length)>0){ar.value=v,za.value="",Ca.value=(P=Me.value)==null?void 0:P.length,pe.value=(D=Sa.value)==null?void 0:D.filter(we=>(we==null?void 0:we.label)!=="新增");const q=(le=(re=Be.value)==null?void 0:re.filter(we=>(we==null?void 0:we.label)!=="操作"))==null?void 0:le.map(we=>{var Ge,Fe,Qe;const Ee=(Fe=(Ge=Ke.value)==null?void 0:Ge.find(wa=>(wa==null?void 0:wa.label)===(we==null?void 0:we.label)))==null?void 0:Fe.multiple;return vu(we),{...we,contents:(we==null?void 0:we.options)??[],optionUrl:we!=null&&we.formMenuSelect&&((Qe=we==null?void 0:we.formMenuSelect)==null?void 0:Qe.length)>0?{groupSelect:we==null?void 0:we.groupSelect,menuSelect:we==null?void 0:we.formMenuSelect,selectRelateType:"",type:we==null?void 0:we.formType,multiple:Ee}:null}});F.value=q==null?void 0:q.map(we=>It(we,[{prop:"type",value:"edit"},{prop:"columnType",value:hu(we==null?void 0:we.formType)||(we==null?void 0:we.columnType)}])),p==="createClick"&&(he.value="新增",Pi(!0))}},vi={START:"开始时间",END:"结束时间",HOURS:"工时"},mu=(p,v)=>Number(A.dayjs(v).diff(A.dayjs(p),"day",!0).toFixed(1)),Ot=p=>{var D;const v=u.itemData,B=(D=v==null?void 0:v.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,z=new Map;return B==null||B.forEach((re,le)=>{const{label:q}=re;z.set(q,le)}),!z.has(vi.START)||!z.has(vi.END)||!z.has(vi.HOURS)?p:p==null?void 0:p.map(re=>{const le=re==null?void 0:re[vi.START],q=re==null?void 0:re[vi.END],we=mu(le,q);return le&&q&&(re[vi.HOURS]=`${we}天`),re})},Lt=(p,v,B=0)=>{if(B>((v==null?void 0:v.length)??""))return p;const z=v==null?void 0:v[B],P=new Map;for(const re of p){const le=re[z];P.has(le)||P.set(le,[]),P.get(le)&&P.get(le).push(re)}const D=[];for(const[re,le]of P){const[q,...we]=le,Ee={...q};B+1===((v==null?void 0:v.length)??"")?Ee.children=le==null?void 0:le.map(Ge=>(Ge.level=A.cloneDeep(B)+1,Ge)).filter((Ge,Fe)=>Fe!==0):we.length>0&&(Ee.children=Lt(we,v,B+1)),Ee.level=B,D.push(Ee)}return D},Rt=(p,v,B)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let z=[];return z=Lt(p,v==null?void 0:v.contents,0),z},$t=async(p,v)=>{var Ia,ea,Za,ba,Qa,be,Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl,Bl,Dr,$l,wl,Ml,Jl,zl,Gl,or,ql,br,Qr,kr,pr,mr,Pt,Ft,jt;const B=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="header");p==null||p.filter(ha=>(ha==null?void 0:ha.key)==="tableIndexColumn")[0];const z=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="childTree")[0];let P=!0;if((Za=(ea=(Ia=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:Ia.value)==null?void 0:ea.find(ha=>(ha==null?void 0:ha.value)==="onPamButtonContents"))!=null&&Za.content){let ha=(be=(Qa=(ba=p==null?void 0:p.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:ba.value)==null?void 0:Qa.find(El=>(El==null?void 0:El.value)==="onPamButtonContents"))==null?void 0:be.content;ha=(Ra=ha==null?void 0:ha.split(":"))==null?void 0:Ra[1],ha=(ga=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:ga.split(","),P=!!(ha!=null&&ha.find(El=>El==="操作"))}const D=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="page"),re=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="rowButton"),le=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="extraButton"),q=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="tableContents"),we=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="bottomButton"),Ee=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="tableIndex");Ke.value=(_a=(Ea=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="tableToForm"))==null?void 0:Ea[0])==null?void 0:_a.contents,Ae.value=(D==null?void 0:D.contents)??!0;let Ge=[];hr.value===""?Ge=B==null?void 0:B[0]:Ge=(B==null?void 0:B.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+hr.value+")"))??(B==null?void 0:B.find(ha=>!(ha!=null&&ha.selectLabel)));let Fe=[];hr.value===""?Fe=Ee==null?void 0:Ee[0]:Fe=(Ee==null?void 0:Ee.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+hr.value+")"))??(Ee==null?void 0:Ee.find(ha=>!(ha!=null&&ha.selectLabel)));let Qe=[],wa=[];if(((T=Ge==null?void 0:Ge.contents)==null?void 0:T.length)>0){let ha=[],El=Ge==null?void 0:Ge.contents;if(Array.isArray(El==null?void 0:El[0])&&((G=El==null?void 0:El[0])!=null&&G.every(Ga=>!(Ga!=null&&Ga.children)))&&(El=El==null?void 0:El[0]),El.some(Ga=>Array.isArray(Ga)&&(Ga==null?void 0:Ga.find(Ye=>Ye.children))))ha=(Re=ce.getGradeColumns(El,P))==null?void 0:Re[0],ha!=null&&ha.find(Ga=>(Ga==null?void 0:Ga.label)==="操作")||ha.push({label:"操作",prop:"operate",type:"operate"});else{let Ga=El.some(Ye=>Array.isArray(Ye))?El==null?void 0:El[0]:El;Ga!=null&&Ga.find(Ye=>(Ye==null?void 0:Ye.label)==="操作")||Ga.push({label:"操作",prop:"operate",type:"operate"}),Ga==null||Ga.forEach((Ye,lr)=>{var Lr,Ur,Ar,ai,gi,bi,Er,Cn,$n,ki,dn,Vn,Wt,Kt,Gt,Yt,Jt,Xt,Zt,Qt,es;if((Ur=(Lr=Se.value)==null?void 0:Lr.split("/"))==null||Ur.forEach(tr=>{var xr,Tn,as;tr!==""&&((as=(Tn=(xr=tr==null?void 0:tr.split(S+"updateLoading"))==null?void 0:xr[0])==null?void 0:Tn.split(S+"loading"))==null||as[0])}),Ye!=null&&Ye.methodContent){let tr=(gi=(ai=(Ar=Ye==null?void 0:Ye.methodContent)==null?void 0:Ar.replace("@","%%#"))==null?void 0:ai.split("%%#"))==null?void 0:gi[1];if(tr=tr==null?void 0:tr.slice(0,(tr==null?void 0:tr.length)-1),tr=ce.contentTransArrayToAllNoExtra(tr??"",","),(bi=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("@Button")))!=null&&bi.includes("Prop")&&((Er=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("Type")))!=null&&Er.includes("Manual"))){let xr=($n=(Cn=tr==null?void 0:tr.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Cn.split(":"))==null?void 0:$n[1];xr=((Vn=(dn=(ki=xr==null?void 0:xr.replaceAll("[",""))==null?void 0:ki.replaceAll("]",""))==null?void 0:dn.split(","))==null?void 0:Vn[1])??"算法执行",Qe.push(xr)}else if((Wt=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("@Button")))!=null&&Wt.includes("Row")&&((Kt=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("Type")))!=null&&Kt.includes("Manual"))){let xr=(Yt=(Gt=tr==null?void 0:tr.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Gt.split(":"))==null?void 0:Yt[1];xr=((Zt=(Xt=(Jt=xr==null?void 0:xr.replaceAll("[",""))==null?void 0:Jt.replaceAll("]",""))==null?void 0:Xt.split(","))==null?void 0:Zt[1])??"算法执行",wa.push(xr)}}(Qt=Ke.value)==null||Qt.find(tr=>(tr==null?void 0:tr.prop)===(Ye==null?void 0:Ye.prop));let Kr=((es=Ye==null?void 0:Ye.filter)==null?void 0:es.includes("@EditRead=Read"))??!1;ha.push({label:(Ye==null?void 0:Ye.label)==="操作"?P?"操作":"":(Ye==null?void 0:Ye.label)??"",prop:(Ye==null?void 0:Ye.label)==="操作"?"operate":(Ye==null?void 0:Ye.prop)??"a"+lr,width:Ye!=null&&Ye.width?parseInt(Ye.width):"",fixed:(Ye==null?void 0:Ye.fixed)??void 0,sortable:(Ye==null?void 0:Ye.sortable)??!1,filterable:(Ye==null?void 0:Ye.filterable)??!1,operable:(Ye==null?void 0:Ye.operable)??!1,showSummary:(Ye==null?void 0:Ye.showSummary)??!1,align:(Ye==null?void 0:Ye.align)??"left",showOverflowTooltip:(Ye==null?void 0:Ye.showOverflowTooltip)??!0,isNotDrag:(Ye==null?void 0:Ye.isNotDrag)??!1,isEditCol:(Ye==null?void 0:Ye.isEditCol)??!1,isOperate:(Ye==null?void 0:Ye.isOperate)??!1,id:(Ye==null?void 0:Ye.id)??lr,type:(Ye==null?void 0:Ye.label)==="操作"?"operate":void 0,formType:(Ye==null?void 0:Ye.formType)??(Ye!=null&&Ye.groupSelect?"Select":""),disabled:Ye==null?void 0:Ye.disabled,options:(Ye==null?void 0:Ye.options)??[],value:(Ye==null?void 0:Ye.value)??"",isExistChild:(Ye==null?void 0:Ye.isExistChild)??!1,mainKey:(Ye==null?void 0:Ye.mainKey)??lr===0,allSelectionContents:(Ye==null?void 0:Ye.allContents)??[],filterContent:Ye==null?void 0:Ye.filterContents,menus:Ye==null?void 0:Ye.menus,groups:Ye==null?void 0:Ye.groups,words:Ye==null?void 0:Ye.words,filter:Ye==null?void 0:Ye.filter,bindMenus:Ye==null?void 0:Ye.bindMenus,fatherPath:Ye==null?void 0:Ye.fatherPath,isMainPath:Ye==null?void 0:Ye.isMainPath,required:(Ye==null?void 0:Ye.required)??!1,relatedContents:Ye==null?void 0:Ye.relatedContents,functionName:Ye==null?void 0:Ye.functionName,functionRelatedWords:Ye==null?void 0:Ye.functionRelatedWords,calculatorFilter:Ye==null?void 0:Ye.calculatorFilter,relatedPages:Ye==null?void 0:Ye.relatedPages,multiple:(Ye==null?void 0:Ye.multiple)??!1,multipleLimit:Ye==null?void 0:Ye.multipleLimit,isReadonly:Kr})})}j.value=(ia=we==null?void 0:we[0])==null?void 0:ia.contents;const vn=ce.getNewColumnChild(ha),Ht=Ga=>Array.isArray(Ga)?Ga.map(Ye=>(Array.isArray(Ye==null?void 0:Ye.children)&&Ye.children.length>0?(Ye.sortable=!1,Ht(Ye.children)):(Ye==null?void 0:Ye.prop)==="operate"||(Ye==null?void 0:Ye.label)==="操作"||(Ye==null?void 0:Ye.type)==="operate"||(Ye.sortable=!1),Ye)):Ga;Ht(vn),await eo(vn),i0(ne.value,vn),F.value=vn,Ta.value=vn,n.value=(_e=F.value)==null?void 0:_e.map(Ga=>Ga==null?void 0:Ga.label);let mn=(Na=(ua=ce.getAllLeafNodes(F.value))==null?void 0:ua.filter(Ga=>(Ga==null?void 0:Ga.type)!=="operate"))==null?void 0:Na.map((Ga,Ye)=>({prop:(Ga==null?void 0:Ga.prop)??"a"+Ye,column:Ga.label}));Vl.value=mn;let un=[];hr.value===""?un=q==null?void 0:q[0]:un=(q==null?void 0:q.find(Ga=>(Ga==null?void 0:Ga.selectLabel)==="("+hr.value+")"))??(q==null?void 0:q.find(Ga=>!(Ga!=null&&Ga.selectLabel)));let ei=Array.isArray((rl=un==null?void 0:un.contents)==null?void 0:rl[0])&&((qa=un==null?void 0:un.contents)!=null&&qa[0].every(Ga=>Array.isArray(Ga)))?(fl=un==null?void 0:un.contents)==null?void 0:fl[0]:un==null?void 0:un.contents;Fe!=null&&Fe.contents&&((hl=Fe==null?void 0:Fe.contents)==null?void 0:hl.length)!==0&&(ei=(Pl=A.cloneDeep(ei))==null?void 0:Pl.map((Ga,Ye)=>{if(!Array.isArray(Ga)){let lr={};for(let Kr in Ga)Kr!=="id"&&Kr!=="index"&&(lr[Kr]=Ga[Kr]);Ga=Object.values(lr)}return Ga}));const Tu=!!((Ha=F.value)!=null&&Ha.find(Ga=>Ga.prop==="index"));ei=dc(ei,Fe==null?void 0:Fe.contents,Tu);const mi=[];ei==null||ei.forEach((Ga,Ye)=>{var Kr;let lr={};if(Array.isArray(Ga)){let Lr=[];Ga==null||Ga.filter(Ur=>!(Ur!=null&&Ur.id)).forEach((Ur,Ar)=>{var ai,gi,bi,Er,Cn,$n;if((ai=mn==null?void 0:mn[Ar])!=null&&ai.prop&&!Array.isArray(Ur)){let ki={};ki[mn[Ar].column]=Ur,R!=null&&R.value&&((gi=R==null?void 0:R.value)==null?void 0:gi.length)>0&&((bi=R==null?void 0:R.value)!=null&&bi.find(dn=>JSON.stringify(dn==null?void 0:dn[0])===JSON.stringify(ki)))&&(Lr=(Er=R==null?void 0:R.value)==null?void 0:Er.find(dn=>JSON.stringify(dn==null?void 0:dn[0])===JSON.stringify(ki))),Lr&&Lr.length>0?lr[mn[Ar].prop]=Lr!=null&&Lr.find(dn=>{var Vn;return((Vn=Object.keys(dn))==null?void 0:Vn[0])===mn[Ar].column})?(Cn=Lr==null?void 0:Lr.find(dn=>{var Vn;return((Vn=Object.keys(dn))==null?void 0:Vn[0])===mn[Ar].column}))==null?void 0:Cn[mn[Ar].column]:Ur:lr[mn[Ar].prop]=Ur}else Array.isArray(Ur)&&(($n=mn[Ar])!=null&&$n.prop?lr[mn[Ar].prop]=Ur:lr.children=yt(Ur,mn))})}else lr=Ga;if(Array.isArray(Ga)&&Ga.some(Lr=>Lr==null?void 0:Lr.id)){const Lr=(Kr=Ga==null?void 0:Ga.find(Ur=>Ur.id))==null?void 0:Kr.id;mi.push(Object.assign(lr,{id:io(Lr)}))}else lr.id?mi.push(lr):mi.push(Object.assign(lr,{id:Ye.toString()}))});try{const Ga=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ye=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),lr=Ga==null?void 0:Ga.tableId,Kr=Ga==null?void 0:Ga.compIndex;if(lr&&Array.isArray(Ye)&&Ye.length>0&&String(lr)===String(u==null?void 0:u.parentTableId)&&String(Kr)===String(u==null?void 0:u.index)){const Lr=new Set(mi.map(Ar=>String(Ar==null?void 0:Ar.id))),Ur=Ye.filter(Ar=>!Lr.has(String(Ar)));if(Ur.length>0){const Ar=Ga==null?void 0:Ga.pageKey,ai=Ar!=null&&Ar.startsWith("/")?Ar.substring(1):Ar;((v==null?void 0:v[Ar])||(v==null?void 0:v[ai])||[]).filter(Er=>{var Cn,$n;return((Cn=Er==null?void 0:Er.key)==null?void 0:Cn.type)==="data"&&String(($n=Er==null?void 0:Er.key)==null?void 0:$n.tableId)===String(lr)&&Ur.includes(Er==null?void 0:Er.id)}).forEach(Er=>{var Cn;Lr.has(String(Er==null?void 0:Er.id))||(mi.push({id:Er==null?void 0:Er.id,...((Cn=Er==null?void 0:Er.value)==null?void 0:Cn.tableData)||{}}),Lr.add(String(Er==null?void 0:Er.id)))})}}}catch{}let yi=null;try{const Ga=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ye=JSON.parse(sessionStorage.getItem(Ga)||"null");Array.isArray(Ye)&&Ye.length>0&&(yi=new Set(Ye.map(lr=>String(lr))))}catch{}const Ut=Array.from(((kl=Oa.value)==null?void 0:kl.values())||[]).filter(Ga=>!(!(Ga!=null&&Ga._isOCRRow&&(Ga==null?void 0:Ga._ocrTableId)===(u==null?void 0:u.index))||yi&&yi.has(String(Ga==null?void 0:Ga.id)))),Nu=(Me.value||[]).map(Ga=>String(Ga==null?void 0:Ga.id)),qt=ui(mi,Nu);if(Me.value=Rt(qt,z,F.value),ma.value=qt,(Fa=ma.value)==null||Fa.forEach(Ga=>{var Ye;(Ye=Oa.value)==null||Ye.set(Ga.id,Ga)}),yi&&yi.size>0)try{const Ga=new Set(Array.from(yi.values()));Me.value=(Me.value||[]).filter(Ye=>!Ga.has(String(Ye==null?void 0:Ye.id))),ma.value=(ma.value||[]).filter(Ye=>!Ga.has(String(Ye==null?void 0:Ye.id))),Ga.forEach(Ye=>{var lr,Kr;try{(Kr=(lr=Oa.value)==null?void 0:lr.delete)==null||Kr.call(lr,Ye)}catch{}})}catch{}const uo=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),tt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(uo&&Array.isArray(tt)&&tt.length>0&&String(uo==null?void 0:uo.compIndex)===String(u==null?void 0:u.index)){const Ga=new Set((ma.value||[]).map(Ye=>String(Ye==null?void 0:Ye.id)));tt.filter(Ye=>!Ga.has(String(Ye)))}if(Ut.length>0){const Ga=new Set((Me.value||[]).map(lr=>lr==null?void 0:lr.id)),Ye=Ut.filter(lr=>!Ga.has(lr.id));Ye.length>0&&(Me.value=[...Me.value||[],...Ye],ma.value=[...ma.value||[],...Ye],Ye.forEach(lr=>{var Kr;return(Kr=Oa.value)==null?void 0:Kr.set(lr.id,lr)}))}}else F.value=[],Be.value=[],Me.value=[],ma.value=[],Oa.value=new Map;if(wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(ha=>({label:ha,type:"methodButton"})),((cl=re==null?void 0:re.contents)==null?void 0:cl.length)>0?aa.value=re==null?void 0:re.contents:aa.value=[],aa.value=[...aa.value,...wa],Qe=[...new Set(Qe)],Qe=Qe==null?void 0:Qe.map(ha=>({label:ha,type:"methodButton"})),((Ka=le==null?void 0:le.contents)==null?void 0:Ka.length)>0)if((Bl=(Sl=(ul=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:ul.value)==null?void 0:Sl.find(ha=>(ha==null?void 0:ha.value)==="onButtonContents"))!=null&&Bl.content){let ha=(wl=($l=(Dr=p==null?void 0:p.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:Dr.value)==null?void 0:$l.find(El=>(El==null?void 0:El.value)==="onButtonContents"))==null?void 0:wl.content;if(ha=(Ml=ha==null?void 0:ha.split(":"))==null?void 0:Ml[1],ha=(Jl=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:Jl.split(","),pe.value=(zl=le==null?void 0:le.contents)==null?void 0:zl.filter(El=>ha==null?void 0:ha.find(vn=>vn===(El==null?void 0:El.label))),Sa.value=(Gl=le==null?void 0:le.contents)==null?void 0:Gl.filter(El=>ha==null?void 0:ha.find(vn=>vn===(El==null?void 0:El.label))),(or=le==null?void 0:le.contents)!=null&&or.some(El=>(El==null?void 0:El.label)==="OCR识别")&&!((ql=pe.value)!=null&&ql.some(El=>(El==null?void 0:El.label)==="OCR识别"))){const El=(br=le==null?void 0:le.contents)==null?void 0:br.find(vn=>(vn==null?void 0:vn.label)==="OCR识别");pe.value=[...pe.value,El],Sa.value=[...Sa.value,El]}W.value=!!(ha!=null&&ha.find(El=>El==="搜索")),V.value=!!(ha!=null&&ha.find(El=>El==="块状显示"))}else pe.value=le==null?void 0:le.contents,Sa.value=le==null?void 0:le.contents;else pe.value=[],Sa.value=[];pe.value=[...pe.value,...Qe],Sa.value=[...Sa.value,...Qe],typeof Se.value=="string"&&Se.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((Qr=pe.value)!=null&&Qr.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(pe.value=[...pe.value||[],{label:"OCR识别"}]),(kr=Sa.value)!=null&&kr.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(Sa.value=[...Sa.value||[],{label:"OCR识别"}])):(pe.value=(pe.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别"),Sa.value=(Sa.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别")),(pr=pe.value)!=null&&pr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(pe.value=[...pe.value||[],{label:"切换视图"}]),(mr=Sa.value)!=null&&mr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(Sa.value=[...Sa.value||[],{label:"切换视图"}]),Ca.value=((Pt=Me==null?void 0:Me.value)==null?void 0:Pt.length)??0,Ot(Me.value),Vr.value=Me.value,Ll.value&&(F.value=(jt=(Ft=Be.value)==null?void 0:Ft.filter(ha=>(ha==null?void 0:ha.label)!=="操作"))==null?void 0:jt.map(ha=>{var El;return{...ha,type:"edit",optionUrl:ha!=null&&ha.formMenuSelect&&((El=ha==null?void 0:ha.formMenuSelect)==null?void 0:El.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}}),ot())};e.watch(()=>[u.itemData,hr.value,Yr.value,sn.value,R==null?void 0:R.value],async()=>{var p,v,B,z,P,D;if((p=u==null?void 0:u.itemData)!=null&&p.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((v=X.value)!=null&&v.find(re=>{var le,q;return(re==null?void 0:re.key)===((q=(le=u==null?void 0:u.itemData)==null?void 0:le.find(we=>(we==null?void 0:we.key)==="columnPath"))==null?void 0:q.contents)}))){let re=X.value,le={key:(z=(B=u==null?void 0:u.itemData)==null?void 0:B.find(q=>(q==null?void 0:q.key)==="columnPath"))==null?void 0:z.contents,value:(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(q=>(q==null?void 0:q.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(q=>(q==null?void 0:q.key)===(le==null?void 0:le.key))?re=re==null?void 0:re.map(q=>((q==null?void 0:q.key)===(le==null?void 0:le.key)&&(q.value=le.value),q)):re.push(le),sa.setTableViewContents(re)}await $t(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.operatingForm,p=>{p!=null&&p.form&&($i(p==null?void 0:p.form),he.value=p==null?void 0:p.dialogTitle,Ve.value=!0,Y.value=!0)},{immediate:!0,deep:!0});const yu=()=>{var p;(p=k.value)!=null&&p.includes("read")&&(Ll.value=!Ll.value)},gu=()=>{Sr.value=!Sr.value};e.watch(()=>{var p;return(p=u==null?void 0:u.config)==null?void 0:p.viewport},p=>{var v;k.value=p,(p==null?void 0:p.length)===0?Ll.value=!1:(p!=null&&p.includes("read")||(Ll.value=!0),p!=null&&p.includes("edit")||(Ll.value=!1)),M.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Ll.value},{immediate:!0}),e.watch(()=>Ll.value,p=>{var v;p?(ot("viewChange"),sa.setCacheUpdatingData(null)):(pe.value=Sa.value,F.value=Ta.value,H.value&&(sa.setTableLoading(u==null?void 0:u.index),ze("change",H.value))),M.value=p||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),Hl.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=bn.value)==null?void 0:p.length},p=>{p===0&&(ge.currentPage=1)}),e.watch(()=>u==null?void 0:u.compNames,p=>{f.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const bu=(p,v)=>{var B;ot("createClick"),v===ge.pageSize&&(ge.currentPage=Math.ceil(((B=Me.value)==null?void 0:B.length)/ge.pageSize))},ku=async(p,v,B)=>{var P,D,re,le,q;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(z&&so.includes(z)&&B!==void 0&&B!==null&&String(B).trim()!==""){const we=String(B).trim();if(await it(we,p==null?void 0:p.id)){Ua.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ge=(P=Me.value)==null?void 0:P.findIndex(Qe=>(Qe==null?void 0:Qe.id)===(p==null?void 0:p.id)),Fe=Ge!==-1?(re=(D=Me.value)==null?void 0:D[Ge])==null?void 0:re[z]:void 0;z&&(p[z]=Fe??"");return}}if(Ll.value){const we=p==null?void 0:p.id;we!=null&&(h.value.has(we)||h.value.set(we,A.cloneDeep(p)),s.value.add(we));const Ee=(le=Me.value)==null?void 0:le.findIndex(Ge=>(Ge==null?void 0:Ge.id)===(p==null?void 0:p.id));Ee!==-1&&z&&(Me.value[Ee]={...Me.value[Ee],[z]:B}),co(B,p,v);return}co(B,p,v),ar.value=A.cloneDeep(p),za.value=p==null?void 0:p.id,Ca.value=(q=Me.value)==null?void 0:q.length,he.value=p!=null&&p._isTemp?"新增":"编辑",Pi(!1)},xu=async()=>{var p,v;try{const B=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const P=z.split("_")[1];P&&(B.push(`content_${P}`),B.push(`struct_${P}`))}})),B.length===0&&(u!=null&&u.itemData)){const z=(v=(p=u.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;z&&(B.push(`content_${z}`),B.push(`struct_${z}`))}return B}catch(B){return console.error("获取 tableNames 失败:",B),[]}},wu=async(p,v,B)=>{var D,re;if(!B||typeof B!="string"||B.trim()===""){const le=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=`${p==null?void 0:p.id}:${le}`;d.value.delete(q),b.value.set(q,!1);return}const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${z}`;b.value.set(P,!0);try{const le=await xu();if(le.length===0){console.warn("未找到同名表,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const q=parseInt((D=ml.value)==null?void 0:D.plat_id);if(!q){console.warn("platId 无效,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const we=await A.getAllTables({platId:q,tableNames:le??[]}),Ee=((re=we==null?void 0:we.data)==null?void 0:re.result)||[],Ge=[],Fe=[];for(let Qe=0;Qe<Ee.length;Qe+=2)Qe+1<Ee.length&&Fe.push([Ee[Qe],Ee[Qe+1]]);Fe.forEach(([Qe,wa])=>{var Qa;if(!Array.isArray(Qe)||Qe.length===0||!Array.isArray(wa)||wa.length===0)return;const La=wa[0];let Ia=((Qa=La==null?void 0:La.结构)==null?void 0:Qa.contents)??[];if(!Array.isArray(Ia)||Ia.length===0)return;let ea=A.cloneDeep(Ia);if(Array.isArray(ea==null?void 0:ea[0])&&(ea=ce.getColumnChild(ea[0])),!Array.isArray(ea)||ea.length===0||!ea.some(be=>(be==null?void 0:be.prop)===z))return;[...Qe].sort((be,Ra)=>{const ga=Number((be==null?void 0:be.update_time)??0);return Number((Ra==null?void 0:Ra.update_time)??0)-ga}).slice(0,20).forEach(be=>{const Ra=be[z];if(Ra!=null){const ga=String(Ra);ga.toLowerCase().includes(B.toLowerCase())&&Ge.findIndex(_a=>{var T;return be.id&&((T=_a.rowData)==null?void 0:T.id)===be.id?!0:_a.label===ga})===-1&&Ge.push({label:ga,rowData:A.cloneDeep(be),sourceTable:(La==null?void 0:La.source_table)||""})}})}),d.value.set(P,Ge)}catch(le){console.error("全局搜索建议失败:",le),d.value.delete(P)}finally{b.value.set(P,!1)}},_u=(p,v,B)=>{if(!Ll.value)return;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const D=`${p==null?void 0:p.id}:${z}`;if(m.has(D)&&clearTimeout(m.get(D)),!B||B.trim()===""){d.value.delete(D),b.value.set(D,!1);return}const re=setTimeout(()=>{wu(p,{prop:z,property:z},B),m.delete(D)},300);m.set(D,re)};function Su(p,v){const B=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return d.value.get(B)||[]}const Eu=(p,v,B)=>{var we;if(!B||!B.rowData)return;const z=B.rowData,P=p==null?void 0:p.id,D=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(ce.getAllLeafNodes(F.value)||[]).filter(Ee=>(Ee==null?void 0:Ee.type)!=="operate"&&(Ee==null?void 0:Ee.label)!=="操作"&&(Ee==null?void 0:Ee.prop)!=="operate").forEach(Ee=>{const Ge=Ee==null?void 0:Ee.prop;Ge&&z[Ge]!==void 0&&(p[Ge]=z[Ge])}),(we=Me.value)==null||we.findIndex(Ee=>(Ee==null?void 0:Ee.id)===P),P!=null&&(h.value.has(P)||h.value.set(P,A.cloneDeep(p)),s.value.add(P));const q=`${P}:${D}`;d.value.delete(q),b.value.set(q,!1),co(p[D],p,v)},Zr=p=>{var q,we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za;const{row:v,column:B,item:z,slotData:P}=p;let D=v!=null&&v[B==null?void 0:B.prop]||(v==null?void 0:v[B==null?void 0:B.prop])===0?((we=(q=v==null?void 0:v[B==null?void 0:B.prop])==null?void 0:q[0])==null?void 0:we.contents)??((v==null?void 0:v[B==null?void 0:B.prop])===0?"0":v==null?void 0:v[B==null?void 0:B.prop]):((Ge=(Ee=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ee[0])==null?void 0:Ge.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((Qe=(Fe=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:Fe[0])==null?void 0:Qe.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((Ia=(La=v==null?void 0:v[(wa=z==null?void 0:z.child)==null?void 0:wa.prop])==null?void 0:La[0])==null?void 0:Ia.contents)??(v==null?void 0:v[(ea=z==null?void 0:z.child)==null?void 0:ea.prop]),le=Array.isArray(D)&&!(D!=null&&D.every(ba=>typeof ba=="string"||typeof ba=="number"))?"查看":D;if(le=Array.isArray(le)?le.join(","):le,(B==null?void 0:B.formType)==="Date")if(!le||le===""||le===null||le===void 0)le="";else{const ba=A.dayjs(le,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);le=ba.isValid()?ba.format("YYYYMMDD"):le??""}return Array.isArray(B==null?void 0:B.relatedPages)&&((Za=B==null?void 0:B.relatedPages)==null?void 0:Za.length)>0&&(le="详情页"),le},Cu=p=>{var we,Ee,Ge,Fe,Qe,wa,La,Ia,ea,Za;const{row:v,column:B,item:z,slotData:P}=p;let D=v!=null&&v[B==null?void 0:B.prop]?((Ee=(we=v==null?void 0:v[B==null?void 0:B.prop])==null?void 0:we[0])==null?void 0:Ee.contents)??(v==null?void 0:v[B==null?void 0:B.prop]):((Fe=(Ge=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ge[0])==null?void 0:Fe.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((wa=(Qe=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:Qe[0])==null?void 0:wa.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((ea=(Ia=v==null?void 0:v[(La=z==null?void 0:z.child)==null?void 0:La.prop])==null?void 0:Ia[0])==null?void 0:ea.contents)??(v==null?void 0:v[(Za=z==null?void 0:z.child)==null?void 0:Za.prop]);const le=Array.isArray(D)&&!(D!=null&&D.every(ba=>typeof ba=="string"||typeof ba=="number")),q=Array.isArray(D)&&(D==null?void 0:D.find(ba=>ba==null?void 0:ba.url));return le&&q},Du=p=>{var P,D,re,le;if(!(p!=null&&p.column))return!1;const v=Se.value==="试验任务/任务管理",B=(u==null?void 0:u.compName)==="任务列表",z=((D=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:D.includes("@TextRGBA"))||((le=(re=p==null?void 0:p.column)==null?void 0:re.filter)==null?void 0:le.includes("@TextBackRGBA"));return v&&B&&z},Bu=(p,v)=>p.find(B=>Object.values(B).some(z=>z===v));return e.watch(()=>Ne.value,async p=>{if(p){ue.setContentLoading(!0),await e.nextTick();const v=Bu(Me.value,p==null?void 0:p.data);if(!v)return ue.setContentLoading(!1);await Li(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),ue.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(B=>{var z,P,D,re,le;if(换,String(B==null?void 0:B.compId)===String(u==null?void 0:u.index)&&(B!=null&&B.resId)&&((z=B==null?void 0:B.data)!=null&&z.id)){const q=(P=B==null?void 0:B.data)==null?void 0:P.id,we=B==null?void 0:B.resId;if(Me.value=(D=Me.value)==null?void 0:D.map(Ee=>{if((Ee==null?void 0:Ee.id)===q){const Ge={...Ee,id:we};return delete Ge._isOCRRow,delete Ge._ocrTableId,Ge}return Ee}),(le=(re=Oa.value)==null?void 0:re.has)!=null&&le.call(re,q)){const Ge={...Oa.value.get(q)||{},id:we};delete Ge._isOCRRow,delete Ge._ocrTableId,Oa.value.delete(q),Oa.value.set(we,Ge)}al(u==null?void 0:u.index,q,we)}}):String(p==null?void 0:p.compId)===String(u==null?void 0:u.index)&&(Me.value=(v=Me.value)==null?void 0:v.map(B=>{var z;if((B==null?void 0:B.id)===((z=p==null?void 0:p.data)==null?void 0:z.id)){const P={...B,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return B})))},{immediate:!0,deep:!0}),(p,v)=>{var ea,Za,ba,Qa;const B=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),le=e.resolveComponent("el-radio-group"),q=e.resolveComponent("el-checkbox-group"),we=e.resolveComponent("el-button"),Ee=e.resolveComponent("el-icon"),Ge=e.resolveComponent("el-progress"),Fe=e.resolveComponent("el-alert"),Qe=e.resolveComponent("el-table-column"),wa=e.resolveComponent("el-table"),La=e.resolveComponent("el-upload"),Ia=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",U0,[Wr.value?(e.openBlock(),e.createBlock(nl.ssTable,{id:"excel-table",pageObj:ge,showIndex:M.value,isTree:(ea=a.compItem)==null?void 0:ea.isTree,summaryInfo:Z,columns:F.value,defaultSort:se,isCardViewport:Sr.value,checkedColumns:n.value,key:Or.value+F.value,tableData:bn.value,isEditViewport:Ll.value,isShowPagination:Ae.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:Bn,extraButton:pe.value,rowButton:aa.value,cacheExtraButtons:Sa.value,isClearSelection:((Za=Hl.value)==null?void 0:Za.length)===0,onDoCurrentChange:Ni,onDoSizeChange:Ro,onSortChange:$o,onContentClick:Li,onRowClick:Jo,onSelectChange:qo,onCellChange:ku,onCellInput:_u,onSelectSuggest:Eu,onChange:co,onPreview:ro,onSubmitEditingTable:Zi,onHandleColEditChange:Ji,onHandleColTypeChange:Jr,onClickButton:rt,onAddNewRow:jo,bottomButton:j.value,allowRowAddOrDelete:Zn.value},e.createSlots({headerButton:e.withCtx(be=>{var Ra,ga,Ea,_a;return[a.showHeader?(e.openBlock(),e.createBlock(xf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(va)===e.unref(Se),filterValues:Yo.value,selectNums:(Ra=Hl.value)==null?void 0:Ra.length,dataNums:(ga=Me.value)==null?void 0:ga.length,compName:a.compName,isDevMode:a.isDevMode,buttons:be.buttons,menuFilter:(_a=(Ea=a.compItem)==null?void 0:Ea.component)==null?void 0:_a.menuFilter,onButtonClick:v[1]||(v[1]=(T,G,Re)=>rt(T,G,{extra:Re})),columns:F.value,onFilter:oo,onGetImportData:Po,level:a.level,filterShow:W.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var be,Ra,ga,Ea;return[((be=Me.value)==null?void 0:be.length)>0&&a.allowOperate&&V.value?(e.openBlock(),e.createElementBlock("div",K0,[(Ra=k.value)!=null&&Ra.includes("read")&&((ga=k.value)!=null&&ga.includes("edit"))&&((Ea=aa.value)!=null&&Ea.some(_a=>(_a==null?void 0:_a.label)==="编辑"))&&!Sr.value&&e.unref(va)!==e.unref(Se)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:yu},[e.createVNode(B,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:be,index:Ra})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ga=>bu(be,Ra)},[e.createVNode(B,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,G0)]),operateCol:e.withCtx(()=>[e.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:du,onBeforeEnter:pu},{reference:e.withCtx(()=>[e.createElementVNode("span",Y0,[e.createVNode(B,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",J0,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":$.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=be=>ao(be))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(q,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=be=>n.value=be),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fn.value,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(D,{value:be.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:be.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(be.label),9,X0)]),_:2},1032,["value"]),e.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(B,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Ra;return[e.createElementVNode("div",Z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ra=Object.keys(be))==null?void 0:Ra.filter(ga=>{var Ea;return(Ea=E.value)==null?void 0:Ea.find(_a=>(_a==null?void 0:_a.value)===ga)}),ga=>{var Ea,_a;return e.openBlock(),e.createElementBlock("div",{key:ga},[L[ga]=="radio"?(e.openBlock(),e.createElementBlock("div",Q0,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(le,{"model-value":be==null?void 0:be[ga],onChange:T=>Kn(T,ga,be)},{default:e.withCtx(()=>{var T,G;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=(T=E.value)==null?void 0:T.find(Re=>(Re==null?void 0:Re.value)===ga))==null?void 0:G.options,Re=>(e.openBlock(),e.createBlock(re,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),L[ga]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":be==null?void 0:be[ga],"active-text":(_a=(Ea=E.value)==null?void 0:Ea.find(T=>(T==null?void 0:T.value)===ga))==null?void 0:_a.label,onChange:T=>Kn(T,ga,be)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",e3,[e.createVNode(B,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(be=>{var Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl;return[((Ra=be==null?void 0:be.column)==null?void 0:Ra.label)==="证书附件"||((ga=be==null?void 0:be.column)==null?void 0:ga.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",a3,[e.createVNode(B,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ka=>hi(be),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Cu(be)?(e.openBlock(),e.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",l3,e.toDisplayString(Zr(be)),1)]),default:e.withCtx(()=>{var Ka,ul;return[e.createElementVNode("div",r3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ul=be==null?void 0:be.row)==null?void 0:ul[(Ka=be==null?void 0:be.column)==null?void 0:Ka.prop],Sl=>(e.openBlock(),e.createElementBlock("div",n3,[e.createElementVNode("div",{class:"prop-url",title:Yn(Sl),onClick:Bl=>di(Sl)},e.toDisplayString(Yn(Sl)),9,i3),e.createElementVNode("div",{class:"prop-download",onClick:Bl=>Ko(Sl)}," 下载 ",8,o3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Du(be)?(e.openBlock(),e.createBlock(Pu,{key:0,value:Zr(be),columnContent:be==null?void 0:be.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(Zr(be))&&((_a=(Ea=Zr(be))==null?void 0:Ea.toString())!=null&&_a.includes(".txt")||(G=(T=Zr(be))==null?void 0:T.toString())!=null&&G.includes(".cpt")||(ia=(Re=Zr(be))==null?void 0:Re.toString())!=null&&ia.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Zr(be))&&((ua=(_e=Zr(be))==null?void 0:_e.toString())!=null&&ua.includes(".txt")||(rl=(Na=Zr(be))==null?void 0:Na.toString())!=null&&rl.includes(".cpt")||(fl=(qa=Zr(be))==null?void 0:qa.toString())!=null&&fl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Zr(be))&&((Pl=(hl=Zr(be))==null?void 0:hl.toString())!=null&&Pl.includes(".txt")||(kl=(Ha=Zr(be))==null?void 0:Ha.toString())!=null&&kl.includes(".cpt")||(cl=(Fa=Zr(be))==null?void 0:Fa.toString())!=null&&cl.includes(".cyd"))?"pointer":"",marginLeft:(be==null?void 0:be.colIndex)===0?`${((be==null?void 0:be.level)??0)*20}px`:0}),onClick:Ka=>{var ul;return qn(Zr(be),((ul=be==null?void 0:be.column)==null?void 0:ul.relatedPages)??[])}},e.toDisplayString(Zr(be)===0?"0":Zr(be)),13,t3))],64))]}),_:2},[((ba=aa.value)==null?void 0:ba.length)>0?{name:"actions",fn:e.withCtx(({item:be,fIndex:Ra})=>[e.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(B,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",q0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oi(aa.value,be),(ga,Ea)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:e.withModifiers(_a=>rt(ga==null?void 0:ga.label,be,{extra:ga}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:ga==null?void 0:ga.textColor}),class:"extra-button-label"},e.toDisplayString(ga==null?void 0:ga.label),5)],8,W0))),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","allowRowAddOrDelete"])):e.createCommentVNode("",!0),Ll.value?(e.openBlock(),e.createElementBlock("div",s3,[e.createVNode(we,{id:"themeBorderButton",onClick:Uo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(we,{class:"ok-button",id:"themeButton",onClick:zi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:he.value,visible:Y.value,width:nr.value,onBeforeDestroy:lo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",c3,[e.createVNode(nl.ssForm,{ref_key:"formRef",ref:xe,rowContents:ya.value,showOperator:!1,onChange:fu,isEnableWrap:!1,onFixChangeValue:Go,onClickTrigger:Gn,isEdit:pa.value,onBlurChange:Qi,onCreate:ci,onTagChange:zn},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Ve.value?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(we,{onClick:v[4]||(v[4]=be=>Y.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(we,{class:"ok-button",onClick:v[5]||(v[5]=be=>Pi(!0)),id:"themeButton"},{default:e.withCtx(()=>v[25]||(v[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:he.value,visible:qe.value,width:da.value,onBeforeDestroy:v[7]||(v[7]=be=>qe.value=!1)},{default:e.withCtx(()=>[e.createVNode(Mf)]),footer:e.withCtx(()=>[e.createElementVNode("div",d3,[e.createVNode(we,{onClick:v[6]||(v[6]=be=>qe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(we,{class:"ok-button",onClick:Xo,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ee.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:2,fileDataList:ca.value,onDestroy:Ri},null,8,["fileDataList"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:3,visible:$e.value,onBeforeDestroy:cu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(So.ThreeViewerHost,{files:ye.value,threeData:N.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:"OCR扫描录入",visible:dl.value,"close-on-click-modal":!1,onBeforeDestroy:Cl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[v[38]||(v[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",p3,[e.createElementVNode("div",f3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ma.value===1}])},v[28]||(v[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ma.value===2}])},v[29]||(v[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ma.value===3}])},v[30]||(v[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Ma.value===1?(e.openBlock(),e.createElementBlock("div",h3,[e.createVNode(we,{onClick:t,class:"ocr-action-btn",disabled:ol.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(we,{onClick:ln,class:"ocr-action-btn",disabled:ol.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),Ma.value===1?(e.openBlock(),e.createElementBlock("div",v3,[e.createElementVNode("div",m3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($a.value,(be,Ra)=>{var ga;return e.openBlock(),e.createElementBlock("div",{key:Ra,class:"ocr-file-item"},[e.createElementVNode("div",y3,[be.raw&&((ga=be.raw.type)!=null&&ga.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Ul(be),alt:"预览",class:"thumbnail-image"},null,8,g3)):(e.openBlock(),e.createElementBlock("div",b3,[e.createVNode(Ee,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Dl(be)==="uploading",processing:Dl(be)==="processing",completed:Dl(be)==="completed"||Dl(be)==="uploaded",failed:Dl(be)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",k3,[v[35]||(v[35]=e.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),e.createElementVNode("circle",{class:e.normalizeClass(["progress-ring-fill",{completed:Dl(be)==="completed"||Dl(be)==="uploaded",uploading:Dl(be)==="uploading",processing:Dl(be)==="processing",failed:Dl(be)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Dl(be)==="failed"?"#f56c6c":Dl(be)==="completed"||Dl(be)==="uploaded"?"#67c23a":"#409eff","stroke-width":Dl(be)==="completed"||Dl(be)==="uploaded"||Dl(be)==="failed"?3:2,"stroke-dasharray":Xr(be),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,x3)])),Dl(be)==="completed"||Dl(be)==="uploaded"?(e.openBlock(),e.createElementBlock("div",w3,[e.createVNode(Ee,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.check_default))]),_:1})])):e.createCommentVNode("",!0),Dl(be)==="failed"?(e.openBlock(),e.createElementBlock("div",_3,[e.createVNode(Ee,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>iu(Ra)},[e.createVNode(Ee,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.close_default))]),_:1})],8,S3)]),e.createElementVNode("div",E3,e.toDisplayString(be.name||"文件名123"),1)])}),128))]),$a.value.length>0?(e.openBlock(),e.createElementBlock("div",C3,[e.createVNode(we,{onClick:ra,class:"ocr-start-recognize-btn",disabled:ol.value||$a.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ma.value===1?(e.openBlock(),e.createElementBlock("div",D3,[e.createVNode(Ge,{percentage:Xe.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),Ma.value===2?(e.openBlock(),e.createElementBlock("div",B3,[e.createElementVNode("div",T3,[e.createVNode(Fe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",N3,[e.createVNode(wa,{data:Ze.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Qe,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ka.value,be=>(e.openBlock(),e.createBlock(Qe,{key:be.prop,prop:be.prop,"min-width":be.minWidth||230,"class-name":be.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",A3,[e.createElementVNode("span",null,e.toDisplayString(be.label),1)])]),default:e.withCtx(({row:Ra,$index:ga})=>{var Ea,_a,T;return[be.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:_l(Ra[be.prop]),fontWeight:500})},e.toDisplayString(el(Ra[be.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[il.value!==ga?(e.openBlock(),e.createElementBlock("span",z3,e.toDisplayString(Ra[be.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ja(be.prop)),{key:1,modelValue:Ra[be.prop],"onUpdate:modelValue":G=>Ra[be.prop]=G,size:"small",placeholder:"请输入"+be.label,content:((Ea=Va(be.prop))==null?void 0:Ea.contents)??((_a=Va(be.prop))==null?void 0:_a.options)??[],optionUrl:(T=Va(be.prop))==null?void 0:T.optionUrl,onChange:G=>Wa(ga,be.prop,G),onFocus:G=>Le.value=be.prop,onBlur:v[8]||(v[8]=G=>Le.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Qe,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:be})=>[il.value===be?(e.openBlock(),e.createBlock(Ee,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Ra=>bl(be),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(B,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Ra=>bl(be),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),Ma.value===3?(e.openBlock(),e.createElementBlock("div",M3,[e.createVNode(Ee,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(La,{ref:"ocrUploadRef","file-list":$a.value,"onUpdate:fileList":v[9]||(v[9]=be=>$a.value=be),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":He,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[Ma.value!==3?(e.openBlock(),e.createElementBlock("div",I3,[e.createVNode(we,{onClick:hn,class:"ocr-start-recognize-btn",disabled:Ma.value===1||ol.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(we,{onClick:En,class:"ocr-start-recognize-btn",disabled:ol.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Xf,{visible:fi.value,onConfirm:i,onCancel:v[10]||(v[10]=be=>fi.value=!1)},null,8,["visible"]),e.createVNode(xd,{visible:ll.value,"onUpdate:visible":v[11]||(v[11]=be=>ll.value=be),versions:Te.value},null,8,["visible","versions"]),e.createVNode(td,{visible:Pa.value,"onUpdate:visible":v[12]||(v[12]=be=>Pa.value=be),images:sl.value,"default-image-name":fr.value,"field-meta":il.value!==null?((Qa=Ze.value[il.value])==null?void 0:Qa.__ocrFieldMeta)||{}:{},"focused-field-name":Le.value,onClose:v[13]||(v[13]=be=>Pa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Id,{visible:ur.value,"onUpdate:visible":v[14]||(v[14]=be=>ur.value=be),candidates:Zl.value,"name-prop":_r.value,"mfr-prop":Nr.value,columns:F.value,onSubmit:gr,onPreviewFile:Qn},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Fd,{visible:Aa.value,"onUpdate:visible":v[15]||(v[15]=be=>Aa.value=be),ocrPreviewData:Ze.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=be=>Ze.value=be),ocrSelectedFields:oa.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=be=>oa.value=be),ocrPreviewColumns:ka.value,onConfirm:Xa,onFieldChange:v[18]||(v[18]=({rowIndex:be,prop:Ra,value:ga})=>Wa(be,Ra,ga))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Br.ssDialog,{title:f.title,visible:f.show,width:f.width,onBeforeDestroy:Q},{default:e.withCtx(()=>[e.createElementVNode("div",O3,[e.createVNode(nl.ssForm,{rowContents:f==null?void 0:f.contents,formRules:f==null?void 0:f.formRules,showOperator:!1,buttonValue:f.buttonValue,isEdit:pa.value,isStartJustify:!1,onOnButtonClick:ke},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:"",visible:y.show,width:y.width,alignCenter:!0,onBeforeDestroy:_},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",L3,e.toDisplayString(y.title),1),e.createVNode(Ia,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",R3,[e.createVNode(Ia,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Ln.value||"暂无"),1)]),_:1}),e.createElementVNode("div",$3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y==null?void 0:y.buttonValue,be=>(e.openBlock(),e.createBlock(we,{key:be==null?void 0:be.label,style:e.normalizeStyle({background:be==null?void 0:be.background,color:be==null?void 0:be.color}),onClick:Ra=>K(be==null?void 0:be.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(be==null?void 0:be.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(wf,{columns:y==null?void 0:y.columns,tableData:y==null?void 0:y.tableData},{content:e.withCtx(({row:be,item:Ra,slotData:ga,scope:Ea,column:_a,columnProp:T,$index:G})=>[e.createTextVNode(e.toDisplayString((be==null?void 0:be[_a==null?void 0:_a.prop])||(be==null?void 0:be[_a==null?void 0:_a.label])||(be==null?void 0:be[_a==null?void 0:_a.property])||(ga==null?void 0:ga[_a==null?void 0:_a.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Tc=Xl._export_sfc(P3,[["__scopeId","data-v-8dd3d056"]]),F3={key:1,class:"static-form-body"},j3=["onClick"],H3={key:1},U3=e.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},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=w=>{switch(w){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var $;const w=($=n.itemData)==null?void 0:$.find(V=>(V==null?void 0:V.key)==="formContent"),g=(w==null?void 0:w.contents)||[];return(n.fields&&n.fields.length>0?n.fields:g).filter(V=>(V==null?void 0:V.label)||(V==null?void 0:V.isHideInForm)).map(V=>{let ae=V==null?void 0:V.value;Array.isArray(ae)&&(ae=ae.map(F=>F==null?"":typeof F=="object"?F.label??F.value??F.name??JSON.stringify(F):String(F)).filter(Boolean).join(",")),ae!=null&&typeof ae=="object"&&(ae=ae.label??ae.value??ae.name??JSON.stringify(ae));const Z=V.isHideInForm?"":V.label??"",ge=ae==null||ae===""?"-":String(ae),ze=Z==="使用状态";return{label:Z,value:ge,isStatus:ze,tagType:ze?o(ge):"",width:V.width??1,field:V}})}),h=e.ref(null),c=e.ref(null),d=e.computed(()=>{const w=Number(n==null?void 0:n.textSize),g=ce.rgbaToColor(n==null?void 0:n.textColor),S={},$={},V={},ae={};return!Number.isNaN(w)&&w&&(S.fontSize=`${w}px`,$.fontSize=`${w+1}px`,V.fontSize=`${w}px`,ae.fontSize=`${w}px`),g&&($.color=g,V.color=g,ae.color=g),{item:S,label:$,value:V,empty:ae}}),m=e.ref(""),b=e.ref(""),u=e.ref(!1),C=async w=>{if(w){b.value&&(URL.revokeObjectURL(b.value),b.value="");try{const g=await A.platformDownloadFile({url:w}),S=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});b.value=URL.createObjectURL(S)}catch{b.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,w=>{w&&(m.value=w)},{immediate:!0}),e.watch(m,w=>{C(w)},{immediate:!0});const M=()=>{var w;(w=c.value)==null||w.click()},k=async w=>{var $,V,ae;const g=w.target,S=($=g==null?void 0:g.files)==null?void 0:$[0];if(!S){g.value="";return}u.value=!0;try{const Z=new FormData;Z.append("file",S);const ge=await A.platformUploadFile(Z),ze=(ae=(V=ge==null?void 0:ge.data)==null?void 0:V.result)==null?void 0:ae.url;ze?(m.value=ze,r("update:backGroundImage",ze),C(ze),Ua.ElMessage.success("背景图片上传成功")):Ua.ElMessage.error("背景图片上传失败")}catch{Ua.ElMessage.error("背景图片上传失败")}finally{u.value=!1,g.value=""}},W=e.computed(()=>{var w;return b.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(w=n==null?void 0:n.backgroundUrl)==null?void 0:w.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),I=w=>nl.getComponent(w),j=w=>{if(!w)return;const g=w.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},L=(w,g,S)=>{n.disabled||(h.value=g,e.nextTick(()=>{j(S.currentTarget)}))},E=()=>{h.value=null},x=w=>{const g=w!=null&&w.width&&w.width>0?w.width:1,$=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(w,g)=>{const S=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(W.value),onClick:g[2]||(g[2]=$=>(n==null?void 0:n.backGround)==="Yes"&&M())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=e.withModifiers($=>M(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:k},null,544),g[3]||(g[3]=e.createElementVNode("img",{src:nl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",F3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,($,V)=>{var ae,Z,ge,ze,F,ne,J,se,Be;return e.openBlock(),e.createElementBlock("div",{key:V,class:"static-form-item",style:e.normalizeStyle({...x($),...d.value.item}),onClick:g[1]||(g[1]=e.withModifiers(()=>{},["stop"]))},[$.label&&!((ae=$==null?void 0:$.field)!=null&&ae.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(d.value.label)},e.toDisplayString($.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(d.value.value),onClick:$e=>{var fe;return(fe=$.field)!=null&&fe.isNoClick?null:L($,V,$e)}},[h.value===V&&$.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I(((Z=$.field)==null?void 0:Z.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":$e=>$.field.value=$e,isEdit:!0,disabled:(ge=$.field)==null?void 0:ge.disabled,content:((ze=$.field)==null?void 0:ze.contents)??[],optionUrl:$.field,originalValue:(F=$.field)==null?void 0:F.value,config:(ne=$.field)==null?void 0:ne.config,configModel:((J=$.field)==null?void 0:J.prop)??((se=$.field)==null?void 0:se.name),selectedTagList:((Be=$.field)==null?void 0:Be.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$.isStatus?(e.openBlock(),e.createBlock(S,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",H3,e.toDisplayString($.value??"-"),1))],64))],12,j3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(d.value.empty)}," 暂无数据 ",4))],4)}}}),Nc=Xl._export_sfc(U3,[["__scopeId","data-v-5937a104"]]),q3={class:"form-content"},W3={title:"选择标签"},K3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},G3={class:"col-operate-wrap"},Y3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},J3={__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(a,{emit:l}){const n=()=>{c.value=!1,d.value=!1,m.value=[]},r=a;e.computed(()=>{var me;const Y=(me=la.value)==null?void 0:me.split("/");return(Y==null?void 0:Y.some(qe=>(qe==null?void 0:qe.includes("updateLoading"))||(qe==null?void 0:qe.includes("loading"))))?!1:$e.value==="view"});const o=l,s=e.ref(""),h=e.ref([]),c=e.ref(!1),d=e.ref(!1),m=e.ref([]),{getFileExtension:b}=So.useThreeSystem(),u=e.ref(),C=e.ref(!1),M=e.ref(!1),k=A.useUnit(A.pinia),{chooseTitle:W}=A.storeToRefs(k),I=e.ref([]),j=e.ref(),L=e.ref(!1),E=e.ref([]),x=uc(A.pinia),w=Ct(A.pinia),g=e.ref(!1),S=e.ref(),$=e.ref(),V=e.ref(),ae=e.ref(),Z=e.ref(),ge=A.useLoginState(A.pinia),{loginUserInfo:ze}=A.storeToRefs(ge),F=e.ref(),ne=e.ref(!0),J=A.useModelComp(A.pinia),{tableViewContents:se,itemData:Be,isEdit:$e,routeToChildPath:fe,lockingPage:N,homepageBackgroundTableId:oe}=A.storeToRefs(J),U=e.ref(null),De=e.ref(!1),Ie=e.ref(!1),je=A.useMenuState(),{activeMenuPath:la}=A.storeToRefs(je),Ta=ce.useOriginalState(A.pinia),{originalPath:ee}=A.storeToRefs(Ta),{compType:ca,hasEditable:ue}=Ys.useRole(),ta=()=>!ue(r.config,{type:ca.FORM});e.computed(()=>la.value==="设备管理/试验设备"&&r.compName==="设备概要");const Se=async()=>{var me,qe,da;const Y=oe==null?void 0:oe.value,xe=(me=ze==null?void 0:ze.value)==null?void 0:me.plat_id;if(!(!Y||!xe))try{const Ke=await A.getAllTables({platId:parseInt(xe),tableNames:[`content_${Y}`,`struct_${Y}`],user_unique_id:"0"}),aa=((da=(qe=Ke==null?void 0:Ke.data)==null?void 0:qe.result)==null?void 0:da[0])??[],Ve=String((r==null?void 0:r.index)??""),ye=aa==null?void 0:aa.find(pe=>String(pe==null?void 0:pe.relatedForm_id)===Ve);ye!=null&&ye.backgroundImg_url&&(ae.value=ye.backgroundImg_url)}catch(Ke){console.error("获取首页背景图片表数据失败:",Ke)}},te=e.ref([]),Ne=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),We=async Y=>{Ie.value=Y,await de("disabled",null,Y,!0)},sa=async Y=>{await de("operable",null,Y,!0)};e.watch(()=>la.value,async()=>{h.value=[],m.value=[]},{deep:!0,immediate:!0});const Ya=()=>{e.nextTick(()=>{ve()})},R=Y=>{var xe;h.value=(xe=h.value)==null?void 0:xe.map(me=>({...me,isFormColHidden:!(Y!=null&&Y.includes(me.label))}))};e.onUnmounted(()=>{U.value=null});const H=Y=>{o("clickTrigger",Y)},X=async Y=>{var xe,me,qe,da,Ke,aa;if(Y===""){let Ve="";(xe=h.value)==null||xe.forEach(ya=>{ya!=null&&ya.isMain&&(Ve=ya==null?void 0:ya.value)});let ye=await ce.getItemData(fe.value,sessionStorage.getItem("systemKey"),"");Ve=((aa=(Ke=(da=(qe=(me=ye==null?void 0:ye[0])==null?void 0:me.compData)==null?void 0:qe.find(ya=>(ya==null?void 0:ya.key)==="mainRouters"))==null?void 0:da.contents)==null?void 0:Ke[0])==null?void 0:aa.routerContent)+ee.value+Ve;let Sa=await ce.getItemData(Ve,sessionStorage.getItem("systemKey"),"");L.value=!0,E.value=Sa==null?void 0:Sa.filter(ya=>(ya==null?void 0:ya.comp)!=="methodButton"),o("routeUrl",E.value)}},ve=()=>{var xe;const Y=(xe=U.value)==null?void 0:xe.$el;Y&&Tl.Sortable.create(Y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:me=>{const{oldIndex:qe,newIndex:da}=me;if(qe===da)return;const Ke=h.value.splice(qe,1)[0];h.value.splice(da,0,Ke)}})},de=async(Y,xe,me,qe=!1)=>{try{J.setRefreshCurStructure(!1)}catch{Ua.ElMessage.error("编辑处理失败")}},va=async(Y,xe)=>{await de()},na=async(Y,xe)=>{Y&&await de()},Pe=async(Y,xe,me)=>{await de(xe,me,Y,!1)},xa=(Y,xe)=>{F.value===xe?ne.value=!1:ne.value=!0,F.value=xe==null?void 0:xe.changeProp},Me=async Y=>{var aa;ae.value=Y;const xe=r.itemData,me=xe==null?void 0:xe.find(Ve=>(Ve==null?void 0:Ve.key)==="backGroundImage");me?me.contents=Y:xe==null||xe.push({key:"backGroundImage",contents:Y}),o("change",{key:"backGroundImage",contents:Y});const qe=oe==null?void 0:oe.value,da=r==null?void 0:r.index,Ke=(aa=ze==null?void 0:ze.value)==null?void 0:aa.plat_id;if(!(!qe||!Ke||!da||!Y))try{await A.pageBatchAddApi({platId:parseInt(Ke),changeContents:[{tableName:`content_${qe}`,tableContents:[{backgroundImg_url:Y,relatedForm_id:String(da)}]}],user_unique_id:"0"})}catch(Ve){console.error("保存背景图片记录失败:",Ve),Ua.ElMessage.error("背景图片记录保存失败")}},ma=async Y=>{var me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja;let xe=[];if((me=Y==null?void 0:Y.toString())!=null&&me.includes(".urdf")){if(Y.includes(",")){Ua.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:Y,extension:b(Y)}],d.value=!0,c.value=!0;return}if((qe=Y==null?void 0:Y.toString())!=null&&qe.includes(".stl")||(da=Y==null?void 0:Y.toString())!=null&&da.includes(".STL")||(Ke=Y==null?void 0:Y.toString())!=null&&Ke.includes(".obj")||(aa=Y==null?void 0:Y.toString())!=null&&aa.includes(".mtl")){const Rl=((Ve=Y==null?void 0:Y.toString())==null?void 0:Ve.split(",")).map(Da=>({url:Da,extension:b(Da)}));m.value=Rl,d.value=!1,c.value=!0;return}if((ye=Y==null?void 0:Y.toString())!=null&&ye.includes(".stl")||(pe=Y==null?void 0:Y.toString())!=null&&pe.includes(".STL")||(Sa=Y==null?void 0:Y.toString())!=null&&Sa.includes(".obj")||(ya=Y==null?void 0:Y.toString())!=null&&ya.includes(".mtl")){let jl,Rl=[],Da={};if(Array.isArray(Y)?jl=Y:jl=Y==null?void 0:Y.split(","),jl==null||jl.forEach(al=>{al.includes(".mtl")?Rl.push(al):Da.blob=Da.blob?Da.blob+","+al:al}),(Rl==null?void 0:Rl.length)>0&&(Da.mtlBlobs=Rl),(Nl=(vl=Object.values(Da))==null?void 0:vl[0])!=null&&Nl.includes("http:"))xe.push(Da);else{const al=new Blob([Da.blob],{type:"application/octet-stream;charset=UTF-8"});let dl=URL.createObjectURL(al),ol="";(pl=Y==null?void 0:Y.split("/"))==null||pl.forEach(($a,tl)=>{var ll;tl===((ll=Y==null?void 0:Y.split("/"))==null?void 0:ll.length)-1&&(ol=$a)}),(Fl=Da.blob)!=null&&Fl.includes(".stl")&&(ol=(ol==null?void 0:ol.replaceAll(">",""))+".urdf"),j.value=[{name:ol,blobUrl:dl}],M.value=!0}}else{const jl=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Rl=await Ua.axios.get(Y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{jl.close()}),Da=new Blob([Rl.data],{type:"application/octet-stream;charset=UTF-8"});let al=URL.createObjectURL(Da),dl="";(ja=Y==null?void 0:Y.split("/"))==null||ja.forEach((ol,$a)=>{var tl;$a===((tl=Y==null?void 0:Y.split("/"))==null?void 0:tl.length)-1&&(dl=ol)}),j.value=[{name:dl,blobUrl:al}],M.value=!0}(xe==null?void 0:xe.length)>0&&w.setBlobUrls(xe)},Oa=()=>{M.value=!1},za=Y=>{var Ke,aa,Ve,ye;const xe=(aa=(Ke=nl.safeClone(r.itemData))==null?void 0:Ke.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:aa.contents,me=nl.safeClone(Y.content);let qe={};me&&((Ve=Object.values(me))==null?void 0:Ve.length)>0&&((ye=Object.values(me))==null||ye.forEach((pe,Sa)=>{qe[xe[Sa].key]=pe}));const da={content:qe,index:r==null?void 0:r.index,buttonName:Y==null?void 0:Y.buttonName};o("change",da)};e.computed(()=>"http://222.92.178.198:62001");const pa=async Y=>{var vl,Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll,Te,Ma;if(!Y)return;(Nl=(vl=r==null?void 0:r.itemData)==null?void 0:vl.find(Je=>(Je==null?void 0:Je.key)==="parentFormPath"))==null||Nl.contents;let xe=se.value;(xe==null?void 0:xe.length)>0&&(xe=xe==null?void 0:xe.map(Je=>{var Xe,Aa,Ze,ka;let ie=(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.split("/");return(r==null?void 0:r.compName)===(ie==null?void 0:ie[0])&&(Aa=h.value)!=null&&Aa.find(Va=>(Va==null?void 0:Va.prop)===(ie==null?void 0:ie[1]))&&(Je.value=(ka=(Ze=h.value)==null?void 0:Ze.find(Va=>(Va==null?void 0:Va.prop)===(ie==null?void 0:ie[1])))==null?void 0:ka.value),Je}),J.setTableViewContents(xe));const me=nl.safeClone(r.itemData);let qe=me==null?void 0:me.map(Je=>{var ie;return(Je==null?void 0:Je.key)==="formContent"&&((ie=Je.contents)==null||ie.map((Xe,Aa)=>{var Ze,ka,Va,Ja,Ue,fa,oa,il,Le,Pa,sl,fr,ur,Zl,rr,dr,yr,Oe,Ql,_r,Nr;return Xe.type=(ka=(Ze=h.value)==null?void 0:Ze.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:ka.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((Ue=(Ja=(Va=Xe==null?void 0:Xe.key)==null?void 0:Va.split("$"))==null?void 0:Ja[1])==null?void 0:Ue.length)>0?(Le=(il=Ru((oa=(fa=Xe==null?void 0:Xe.key)==null?void 0:fa.split("$"))==null?void 0:oa[1]))==null?void 0:il.split(","))==null?void 0:Le.map(Al=>({label:Al,value:Al})):[],(Pa=Xe==null?void 0:Xe.key)!=null&&Pa.includes("$")&&(Xe.key=(fr=(sl=Xe==null?void 0:Xe.key)==null?void 0:sl.split("$"))==null?void 0:fr[0]),Xe.signature=(Zl=(ur=h.value)==null?void 0:ur.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Zl.signature,Xe.isLoginUser=(dr=(rr=h.value)==null?void 0:rr.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:dr.isLoginUser,Xe.value=(yr=Object.values(Y))==null?void 0:yr[Aa],Xe.isFormColHidden=(Ql=(Oe=h.value)==null?void 0:Oe.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Ql.isFormColHidden,Xe.isHideInForm=(Nr=(_r=h.value)==null?void 0:_r.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Nr.isHideInForm,Xe})),Je}),da=h.value,Ke=(Fl=(pl=nl.safeClone(qe))==null?void 0:pl.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:Fl.contents;if(da=da==null?void 0:da.map(Je=>{var ie,Xe;return(Je==null?void 0:Je.type)==="Select"&&((ie=Je==null?void 0:Je.allSelectionContents)==null?void 0:ie.length)>0&&(Je.contactValue=Y),Je.value=(Xe=Ke==null?void 0:Ke.find((Aa,Ze)=>((Aa==null?void 0:Aa.id)??Ze)===(Je==null?void 0:Je.id)))==null?void 0:Xe.value,Je}),!ne.value){o("contentChange",{contents:qe,index:r.index});return}let aa="",Ve=(Rl=(jl=(ja=nl.safeClone(qe))==null?void 0:ja.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:jl.contents)==null?void 0:Rl.find((Je,ie)=>{var Xe,Aa,Ze;return(Je==null?void 0:Je.label)===F.value||ie.toString()===((Ze=(Aa=(Xe=F.value)==null?void 0:Xe.split("t"))==null?void 0:Aa[1])==null?void 0:Ze.toString())}),ye=(Da=Ve==null?void 0:Ve.optionUrl)==null?void 0:Da.menuSelect,pe=!0;if((ol=(dl=(al=nl.safeClone(qe))==null?void 0:al.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:dl.contents)==null||ol.forEach(Je=>{var ie,Xe,Aa,Ze,ka,Va;pe&&((Aa=(Xe=(ie=Je==null?void 0:Je.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Xe[1])!=null&&Aa.includes("["))&&(aa=(ka=(Ze=Je==null?void 0:Je.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:ka[1],JSON.stringify(ye)===JSON.stringify((Va=Je==null?void 0:Je.optionUrl)==null?void 0:Va.menuSelect)&&(pe=!1))}),($a=Ve==null?void 0:Ve.optionUrl)!=null&&$a.menuSelect&&ne.value){let Je=await gt(Ve),ie,Xe=(tl=Ve==null?void 0:Ve.optionUrl)==null?void 0:tl.menuSelect;if(Je==null||Je.forEach(Aa=>{var Ze,ka,Va,Ja,Ue,fa,oa,il,Le,Pa;aa===((ka=(Ze=Ve==null?void 0:Ve.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:ka[1])&&((Ue=(Ja=(Va=Ve==null?void 0:Ve.optionUrl)==null?void 0:Va.groupSelect)==null?void 0:Ja[1])!=null&&Ue.includes("["))&&((Pa=nl.safeClone(Aa))==null?void 0:Pa[(Le=(il=(oa=(fa=Ve==null?void 0:Ve.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:oa[1])==null?void 0:il.replaceAll("[",""))==null?void 0:Le.replaceAll("]","")])===(Ve==null?void 0:Ve.value)&&(ie=Aa)}),ie){let Aa=nl.safeClone(da);Aa=Aa==null?void 0:Aa.map(ka=>{var Va,Ja,Ue,fa,oa,il,Le,Pa,sl,fr,ur;return(ie!=null&&ie[ka==null?void 0:ka.label]||ie!=null&&ie[(fa=(Ue=(Ja=(Va=ka==null?void 0:ka.optionUrl)==null?void 0:Va.groupSelect)==null?void 0:Ja[1])==null?void 0:Ue.replaceAll("[",""))==null?void 0:fa.replaceAll("]","")])&&((Le=(il=(oa=ka==null?void 0:ka.optionUrl)==null?void 0:oa.groupSelect)==null?void 0:il[1])!=null&&Le.includes("["))&&Xe!=null&&Xe.every(Zl=>{var rr,dr;return(dr=(rr=ka==null?void 0:ka.optionUrl)==null?void 0:rr.menuSelect)==null?void 0:dr.includes(Zl)})&&(ka.value=(ie==null?void 0:ie[ka==null?void 0:ka.label])||(ie==null?void 0:ie[(ur=(fr=(sl=(Pa=ka==null?void 0:ka.optionUrl)==null?void 0:Pa.groupSelect)==null?void 0:sl[1])==null?void 0:fr.replaceAll("[",""))==null?void 0:ur.replaceAll("]","")]),Array.isArray(ka.value)&&ka.value.every(Zl=>(Zl==null?void 0:Zl.url)&&(Zl==null?void 0:Zl.name))&&(ka.type="Upload")),ka}),Aa=Aa==null?void 0:Aa.map(ka=>{var Va,Ja,Ue;return(Va=ka==null?void 0:ka.optionUrl)!=null&&Va.oldMenuSelect&&(ka.optionUrl.menuSelect=(Ue=(Ja=nl.safeClone(ka))==null?void 0:Ja.optionUrl)==null?void 0:Ue.oldMenuSelect),ka}),h.value=nl.safeClone(Aa);let Ze=nl.safeClone(Aa);Ze=Ze==null?void 0:Ze.map(ka=>{var Va,Ja,Ue,fa,oa,il;return(Ja=(Va=ka==null?void 0:ka.optionUrl)==null?void 0:Va.menuSelect)!=null&&Ja.some(Le=>Le==null?void 0:Le.includes("["))&&(ka.optionUrl.oldMenuSelect=(fa=(Ue=nl.safeClone(ka))==null?void 0:Ue.optionUrl)==null?void 0:fa.menuSelect,ka.optionUrl.menuSelect=(il=(oa=ka==null?void 0:ka.optionUrl)==null?void 0:oa.menuSelect)==null?void 0:il.map(Le=>{var Pa,sl,fr,ur;if(Le!=null&&Le.includes("[")){let Zl=(sl=(Pa=Le==null?void 0:Le.replaceAll("[","").replaceAll("]",""))==null?void 0:Pa.split(":"))==null?void 0:sl[1];Le=(ur=(fr=nl.safeClone(Aa))==null?void 0:fr.find(rr=>(rr==null?void 0:rr.label)===Zl))==null?void 0:ur.value}return Le})),ka}),h.value=Ze}else h.value=da;qe=qe==null?void 0:qe.map(Aa=>{var Ze;return(Aa==null?void 0:Aa.key)==="formContent"&&(Aa.contents=(Ze=Aa.contents)==null?void 0:Ze.map(ka=>{var Va,Ja,Ue,fa;return ka.value=((Ja=(Va=h.value)==null?void 0:Va.find(oa=>(oa==null?void 0:oa.label)===(ka==null?void 0:ka.key)))==null?void 0:Ja.value)??(ka==null?void 0:ka.value),ka.type=((fa=(Ue=h.value)==null?void 0:Ue.find(oa=>(oa==null?void 0:oa.prop)===(ka==null?void 0:ka.key)))==null?void 0:fa.type)??(ka==null?void 0:ka.type),ka})),Aa})}ne.value=!1,o("contentChange",{contents:qe,index:r.index});let Sa=[],ya=[];if((Te=nl.safeClone((ll=qe==null?void 0:qe.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:ll.contents))==null||Te.forEach(Je=>{var ie;Array.isArray(Je==null?void 0:Je.value)&&((ie=Je==null?void 0:Je.value)!=null&&ie.find(Xe=>{var Aa;return(Aa=Xe==null?void 0:Xe.url)==null?void 0:Aa.includes(".obj")}))&&(ya=Je==null?void 0:Je.value)}),(ya==null?void 0:ya.length)>0){const Je=(Ma=nl.safeClone(ya))==null?void 0:Ma.filter(ie=>{var Xe;return(Xe=ie==null?void 0:ie.url)==null?void 0:Xe.includes(".obj")});Je==null||Je.forEach(ie=>{var Aa,Ze,ka,Va;const Xe=(Aa=ya==null?void 0:ya.filter(Ja=>{var Ue;return(Ja==null?void 0:Ja.name)===(ie==null?void 0:ie.name)&&((Ue=Ja==null?void 0:Ja.url)==null?void 0:Ue.includes(".mtl"))}))==null?void 0:Aa.map(Ja=>Ja==null?void 0:Ja.url);Sa.push({objUrl:ie==null?void 0:ie.url,mtlUrls:((Ze=ya==null?void 0:ya.filter(Ja=>{var Ue;return(Ja==null?void 0:Ja.name)===(ie==null?void 0:ie.name)&&((Ue=Ja==null?void 0:Ja.url)==null?void 0:Ue.includes(".mtl"))}))==null?void 0:Ze.length)===1?(Va=(ka=ya==null?void 0:ya.filter(Ja=>{var Ue;return(Ja==null?void 0:Ja.name)===(ie==null?void 0:ie.name)&&((Ue=Ja==null?void 0:Ja.url)==null?void 0:Ue.includes(".mtl"))}))==null?void 0:ka[0])==null?void 0:Va.url:Xe})}),w.setObjUrl(Sa)}},Ca=(Y,xe,me)=>{let qe="";const da=xe==null?void 0:xe.map(Ke=>{var aa;return(aa=Ke==null?void 0:Ke.value)==null?void 0:aa.pageData});return da==null||da.forEach(Ke=>{var aa;(Ke==null?void 0:Ke.name)===(Y==null?void 0:Y[0])&&((aa=Ke==null?void 0:Ke.compData)==null||aa.forEach(Ve=>{var ye;(Ve==null?void 0:Ve.key)==="formContent"&&((ye=Ve==null?void 0:Ve.contents)==null||ye.forEach(pe=>{var Sa;(pe==null?void 0:pe.prop)===(Y==null?void 0:Y[1])&&(qe=(pe==null?void 0:pe.value)===""?ce.judgeContents((Sa=nl.safeClone(pe))==null?void 0:Sa.optionUrl,me):pe==null?void 0:pe.value)}))}))}),qe},Ae=(Y,xe,me,qe)=>{var Ve,ye;let da="",Ke="";(Ve=nl.safeClone(xe))==null||Ve.forEach((pe,Sa)=>{pe!=null&&pe.includes("[")?Ke=Ke+ee.value+Y[Sa]:Ke=Ke===""?Ke+pe:Ke+"/"+pe});let aa=(ye=qe[Ke])==null?void 0:ye.map(pe=>{var Sa;return(Sa=pe==null?void 0:pe.value)==null?void 0:Sa.pageData});return aa==null||aa.forEach(pe=>{var Sa;(pe==null?void 0:pe.name)===(me==null?void 0:me[0])&&((Sa=pe==null?void 0:pe.compData)==null||Sa.forEach(ya=>{var vl;(ya==null?void 0:ya.key)==="formContent"&&((vl=ya==null?void 0:ya.contents)==null||vl.forEach(Nl=>{(Nl==null?void 0:Nl.prop)===(me==null?void 0:me[1])&&(da=Nl==null?void 0:Nl.value)}))}))}),da};e.watch(()=>oe==null?void 0:oe.value,async()=>{await Se()},{immediate:!0});const he=async Y=>await Vp(Y,"Auto");return e.watch(()=>r.itemData,async()=>{var Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll,Te,Ma,Je,ie,Xe,Aa,Ze,ka,Va,Ja,Ue,fa,oa,il,Le;const Y=(Nl=r.itemData)==null?void 0:Nl.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent");let xe=(pl=r.itemData)==null?void 0:pl.find(Pa=>(Pa==null?void 0:Pa.key)==="backGround");xe&&((Fl=xe==null?void 0:xe.contents)==null?void 0:Fl.length)>0&&(s.value=((jl=(ja=xe==null?void 0:xe.contents)==null?void 0:ja[0])==null?void 0:jl.url)??"");const me=(Rl=nl.safeClone(r.itemData))==null?void 0:Rl.find(Pa=>(Pa==null?void 0:Pa.key)==="formButton"),qe=(Da=nl.safeClone(r.itemData))==null?void 0:Da.find(Pa=>(Pa==null?void 0:Pa.key)==="formFlex"),da=(al=nl.safeClone(r.itemData))==null?void 0:al.find(Pa=>(Pa==null?void 0:Pa.key)==="formWrap"),Ke=(dl=nl.safeClone(r.itemData))==null?void 0:dl.find(Pa=>(Pa==null?void 0:Pa.key)==="enableWrap"),aa=(ol=nl.safeClone(r.itemData))==null?void 0:ol.find(Pa=>(Pa==null?void 0:Pa.key)==="textSize"),Ve=($a=nl.safeClone(r.itemData))==null?void 0:$a.find(Pa=>(Pa==null?void 0:Pa.key)==="textRGBA"),ye=(tl=nl.safeClone(r.itemData))==null?void 0:tl.find(Pa=>(Pa==null?void 0:Pa.key)==="backGround"),pe=(ll=nl.safeClone(r.itemData))==null?void 0:ll.find(Pa=>(Pa==null?void 0:Pa.key)==="backGroundImage");(da==null?void 0:da.contents)==="纵向"?C.value=!1:C.value=!0;const Sa=Number(aa==null?void 0:aa.contents);S.value=Number.isNaN(Sa)?void 0:Sa,$.value=Ve==null?void 0:Ve.contents,V.value=ye==null?void 0:ye.contents,ae.value=pe==null?void 0:pe.contents;const ya=Ke==null?void 0:Ke.contents;if(ya===void 0?g.value=ri.BLOCK:typeof ya=="boolean"?g.value=ya?ri.ORDINARY:ri.BLOCK:g.value=ya,Z.value=typeof(qe==null?void 0:qe.contents)!="boolean"?!(!(qe!=null&&qe.contents)===""||((Te=qe==null?void 0:qe.contents)==null?void 0:Te.toUpperCase())==="VERTICAL"):qe==null?void 0:qe.contents,((Ma=Y==null?void 0:Y.contents)==null?void 0:Ma.length)>0&&Array.isArray(Y==null?void 0:Y.contents)){let Pa=r.allMapContents;const sl=(ie=(Je=nl.safeClone(Y))==null?void 0:Je.contents)==null?void 0:ie.map((Oe,Ql)=>{var Or,jr,Yr,sn,Yl,hr,qr,ml,nr,Ll,Sr,Hl,vr;let _r=(Oe==null?void 0:Oe.label)??(Oe==null?void 0:Oe.key)??"";Oe==null||Oe.type;let Nr=(Oe==null?void 0:Oe.options)??[];if((Or=Oe==null?void 0:Oe.key)!=null&&Or.includes("$")&&(_r=(jr=nl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:jr[0],((sn=(Yr=nl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Yr[1])==null?void 0:sn.length)>0)){const[er,Wr]=(hr=(Yl=nl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Yl[1])==null?void 0:hr.split(/[()]/);(qr=ce.FormType.find(an=>(an==null?void 0:an.key)===er))==null||qr.value,((ml=Wr==null?void 0:Wr.split(","))==null?void 0:ml.length)>0&&(Nr=(nr=Wr==null?void 0:Wr.split(","))==null?void 0:nr.map(an=>({label:an,value:an})))}let Al=Oe==null?void 0:Oe.options;((Ll=Oe==null?void 0:Oe.optionUrl)==null?void 0:Ll.selectRelateType)==="自定义绑定"&&(Al=(Hl=(Sr=Oe==null?void 0:Oe.optionUrl)==null?void 0:Sr.defaultSelect)==null?void 0:Hl.map(er=>({label:er,value:er})));let Tr=(Oe==null?void 0:Oe.menuPath)??[],Pr=(Oe==null?void 0:Oe.groups)??[],Wl=(Oe==null?void 0:Oe.columns)??[],gr=!1,Ir=(Oe==null?void 0:Oe.isFormColHidden)??!1,Rr="",Vl=Oe!=null&&Oe.value?Oe.value:(Al==null?void 0:Al.length)>0?(vr=Al==null?void 0:Al[0])==null?void 0:vr.value:(Oe==null?void 0:Oe.value)??"",ar=!1,Fr="Input";return((Al==null?void 0:Al.length)>0||(Tr==null?void 0:Tr.length)>0)&&(Fr="Select"),(Array.isArray(Rr)&&(Rr!=null&&Rr.every(er=>(er==null?void 0:er.name)&&(er==null?void 0:er.url)))||Array.isArray(Vl)&&(Vl!=null&&Vl.every(er=>(er==null?void 0:er.name)&&(er==null?void 0:er.url))))&&(Fr="upload"),Oe!=null&&Oe.isMainUrl&&(Fr="Url"),{label:_r??"",name:_r??"t"+Ql,prop:_r??nl.safeClone(Oe==null?void 0:Oe.key),type:(Oe==null?void 0:Oe.type)??Fr,value:(Oe==null?void 0:Oe.type)==="Date"&&Vl===""?new Date:Vl,id:(Oe==null?void 0:Oe.id)??Ql,contents:(Al==null?void 0:Al.length)>0?Al:Nr??[],width:(Oe==null?void 0:Oe.width)??1,isLoginUser:gr,config:Oe==null?void 0:Oe.config,optionUrl:(Oe==null?void 0:Oe.optionUrl)??Oe,isFormColHidden:Ir,isHideInForm:(Oe==null?void 0:Oe.isHideInForm)??!1,signature:ar,isMain:Oe==null?void 0:Oe.isMain,required:(Oe==null?void 0:Oe.required)??!1,isMainUrl:Oe==null?void 0:Oe.isMainUrl,operable:(Oe==null?void 0:Oe.operable)??!1,disabled:(Oe==null?void 0:Oe.disabled)??!1,isSync:Oe==null?void 0:Oe.isSync,menus:Tr,groups:Pr,words:Wl,allSelectionContents:Oe==null?void 0:Oe.allContents,filterContent:Oe==null?void 0:Oe.filterContents,isNoClick:(Oe==null?void 0:Oe.isNoClick)??!1,functionName:Oe==null?void 0:Oe.functionName,functionRelatedWords:Oe==null?void 0:Oe.functionRelatedWords,calculatorFilter:Oe==null?void 0:Oe.calculatorFilter}}),fr=sl==null?void 0:sl.map(Oe=>Oe==null?void 0:Oe.value);let ur="";fr==null||fr.forEach(Oe=>{Oe!==""&&Oe!==void 0&&(ur=ur===""?Oe:ur+"/"+Oe)}),x.setSelectArray(fr),x.setSelectString(ur);let Zl=(Xe=nl.safeClone(sl))==null?void 0:Xe.map(Oe=>(Oe!=null&&Oe.value&&ce.IsJson(Oe==null?void 0:Oe.value)&&Array.isArray(JSON.parse(Oe==null?void 0:Oe.value))&&(Oe.value=JSON.parse(Oe.value)),Oe)),rr={};Zl==null||Zl.forEach(Oe=>{rr[Oe.label]=Oe==null?void 0:Oe.value}),Zl=Zl==null?void 0:Zl.map(Oe=>{var Ql,_r,Nr,Al,Tr,Pr,Wl,gr,Ir;if((Oe==null?void 0:Oe.type)==="Select"&&((Ql=Oe==null?void 0:Oe.allSelectionContents)==null?void 0:Ql.length)>0&&(Oe.contactValue=rr),(Nr=(_r=Oe==null?void 0:Oe.optionUrl)==null?void 0:_r.menuSelect)!=null&&Nr.some(Rr=>Rr==null?void 0:Rr.includes("["))){let Rr="";Oe.optionUrl.oldMenuSelect=(Tr=(Al=nl.safeClone(Oe))==null?void 0:Al.optionUrl)==null?void 0:Tr.menuSelect,Oe.optionUrl.menuSelect=(Wl=(Pr=Oe==null?void 0:Oe.optionUrl)==null?void 0:Pr.menuSelect)==null?void 0:Wl.map(Vl=>{var ar,Fr,Vr,Or,jr,Yr;if(Vl!=null&&Vl.includes("[")){let sn=(Fr=(ar=Vl==null?void 0:Vl.replaceAll("[","").replaceAll("]",""))==null?void 0:ar.split(":"))==null?void 0:Fr[1];Rr=Ca((Vr=Vl==null?void 0:Vl.replaceAll("[","").replaceAll("]",""))==null?void 0:Vr.split(":"),Pa==null?void 0:Pa[la.value],Pa),Vl=((jr=(Or=nl.safeClone(Zl))==null?void 0:Or.find(Yl=>(Yl==null?void 0:Yl.label)===sn))==null?void 0:jr.value)||Ca((Yr=Vl==null?void 0:Vl.replaceAll("[","").replaceAll("]",""))==null?void 0:Yr.split(":"),Pa==null?void 0:Pa[la.value],Pa)}return Vl}),Rr!==""&&Oe.value===""&&(Oe.value=Ae(Oe.optionUrl.menuSelect,Oe.optionUrl.oldMenuSelect,(gr=Oe==null?void 0:Oe.optionUrl)==null?void 0:gr.groupSelect,Pa),Array.isArray(Oe.value)&&((Ir=Oe.value)!=null&&Ir.every(Vl=>Vl==null?void 0:Vl.url))&&(Oe.type="UPLOAD"))}return Oe}),h.value=Zl,Ie.value=((Aa=h.value)==null?void 0:Aa.every(Oe=>Oe==null?void 0:Oe.disabled))||N.value===la.value,De.value=(Ze=h.value)==null?void 0:Ze.every(Oe=>Oe==null?void 0:Oe.operable),te.value=(ka=h.value)==null?void 0:ka.map(Oe=>Oe==null?void 0:Oe.label);let dr=[],yr=[];if((Va=nl.safeClone(h.value))==null||Va.forEach(Oe=>{var Ql;Array.isArray(Oe==null?void 0:Oe.value)&&((Ql=Oe==null?void 0:Oe.value)!=null&&Ql.find(_r=>{var Nr;return(Nr=_r==null?void 0:_r.url)==null?void 0:Nr.includes(".obj")}))&&(yr=Oe==null?void 0:Oe.value)}),(yr==null?void 0:yr.length)>0){const Oe=(Ja=nl.safeClone(yr))==null?void 0:Ja.filter(Ql=>{var _r;return(_r=Ql==null?void 0:Ql.url)==null?void 0:_r.includes(".obj")});Oe==null||Oe.forEach(Ql=>{var Nr,Al,Tr,Pr;const _r=(Nr=yr==null?void 0:yr.filter(Wl=>{var gr;return(Wl==null?void 0:Wl.name)===(Ql==null?void 0:Ql.name)&&((gr=Wl==null?void 0:Wl.url)==null?void 0:gr.includes(".mtl"))}))==null?void 0:Nr.map(Wl=>Wl==null?void 0:Wl.url);dr.push({objUrl:Ql==null?void 0:Ql.url,mtlUrls:((Al=yr==null?void 0:yr.filter(Wl=>{var gr;return(Wl==null?void 0:Wl.name)===(Ql==null?void 0:Ql.name)&&((gr=Wl==null?void 0:Wl.url)==null?void 0:gr.includes(".mtl"))}))==null?void 0:Al.length)===1?(Pr=(Tr=yr==null?void 0:yr.filter(Wl=>{var gr;return(Wl==null?void 0:Wl.name)===(Ql==null?void 0:Ql.name)&&((gr=Wl==null?void 0:Wl.url)==null?void 0:gr.includes(".mtl"))}))==null?void 0:Tr[0])==null?void 0:Pr.url:_r})}),w.setObjUrl(dr)}(Ue=nl.safeClone(h.value))==null||Ue.forEach(Oe=>{var Ql,_r,Nr,Al,Tr,Pr,Wl,gr,Ir,Rr,Vl,ar,Fr;if((_r=(Ql=Oe==null?void 0:Oe.value)==null?void 0:Ql.toString())!=null&&_r.includes(".stl")||(Al=(Nr=Oe==null?void 0:Oe.value)==null?void 0:Nr.toString())!=null&&Al.includes(".STL")||(Pr=(Tr=Oe==null?void 0:Oe.value)==null?void 0:Tr.toString())!=null&&Pr.includes(".obj")||(gr=(Wl=Oe==null?void 0:Oe.value)==null?void 0:Wl.toString())!=null&&gr.includes(".mtl")||(Rr=(Ir=Oe==null?void 0:Oe.value)==null?void 0:Ir.toString())!=null&&Rr.includes(".urdf")){let Vr={},Or=[],jr;Array.isArray(Oe==null?void 0:Oe.value)?jr=Oe==null?void 0:Oe.value:jr=(Vl=Oe==null?void 0:Oe.value)==null?void 0:Vl.split(","),jr==null||jr.forEach(Yr=>{Yr.includes(".mtl")?Or.push(Yr):Vr.blob=Vr.blob==="undefined"?Yr:Vr.blob+","+Yr}),(Or==null?void 0:Or.length)>0&&(Vr.mtlBlobs=Or),(Fr=(ar=Object.values(Vr))==null?void 0:ar[0])!=null&&Fr.includes("http:")}})}else h.value=[];let vl=se.value;if((vl==null?void 0:vl.length)>0&&(vl=vl==null?void 0:vl.map(Pa=>{var fr,ur,Zl,rr;let sl=(fr=Pa==null?void 0:Pa.key)==null?void 0:fr.split("/");return(r==null?void 0:r.compName)===(sl==null?void 0:sl[0])&&(ur=h.value)!=null&&ur.find(dr=>(dr==null?void 0:dr.prop)===(sl==null?void 0:sl[1]))&&(Pa.value=(rr=(Zl=h.value)==null?void 0:Zl.find(dr=>(dr==null?void 0:dr.prop)===(sl==null?void 0:sl[1])))==null?void 0:rr.value),Pa}),J.setTableViewContents(vl)),r!=null&&r.formRules)u.value=r==null?void 0:r.formRules;else{let Pa={};(fa=nl.safeClone(h).value)==null||fa.forEach(sl=>{((sl==null?void 0:sl.isMain)===!0||(sl==null?void 0:sl.required)===!0)&&(Pa[(sl==null?void 0:sl.prop)??(sl==null?void 0:sl.name)]=[{required:!0,message:`${(sl==null?void 0:sl.label)||(sl==null?void 0:sl.prop)||(sl==null?void 0:sl.name)}不能为空`}])}),u.value=Pa}if(((oa=me==null?void 0:me.contents)==null?void 0:oa.length)>0){const Pa=[];(il=me==null?void 0:me.contents)==null||il.forEach((sl,fr)=>{(sl==null?void 0:sl.label)!==""&&Pa.push({label:(sl==null?void 0:sl.label)??"",id:(sl==null?void 0:sl.id)??fr,type:(sl==null?void 0:sl.type)??"",background:sl==null?void 0:sl.background})}),I.value=Pa}else I.value=[];(Le=h.value)!=null&&Le.some(Pa=>(Pa==null?void 0:Pa.functionName)&&(Pa==null?void 0:Pa.functionName)!=="")&&(h.value=await he(h.value))},{deep:!0,immediate:!0}),e.watch(()=>N.value,Y=>{Ie.value=Y===la.value},{immediate:!0}),(Y,xe)=>{var Ve;const me=e.resolveComponent("svg-icon"),qe=e.resolveComponent("el-switch"),da=e.resolveComponent("el-checkbox"),Ke=e.resolveComponent("el-popover"),aa=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",q3,[g.value===e.unref(ri).TEXT?(e.openBlock(),e.createBlock(Nc,{key:0,itemData:a.itemData,compName:a.compName,fields:h.value,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Ie.value||ta(),"onUpdate:backGroundImage":Me,backgroundUrl:s.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):g.value===e.unref(ri).BLOCK?(e.openBlock(),e.createBlock(Bf,{key:1,items:(Ve=h.value)==null?void 0:Ve.map(ye=>({label:ye!=null&&ye.isHideInForm?"":ye==null?void 0:ye.label,value:ye==null?void 0:ye.value,width:(ye==null?void 0:ye.width)??1,field:ye})),textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Ie.value||ta(),"onUpdate:backGroundImage":Me,backgroundUrl:s.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":g.value===e.unref(ri).ORDINARY})},[e.createVNode(nl.ssForm,{rowContents:h.value,formRules:u.value,buttonValue:I.value,isRowFlex:!1,isEnableWrap:!0,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,onOnButtonClick:za,onChange:pa,formDisabled:Ie.value||ta(),formLabelsOperable:De.value,isButtonRow:C.value,onPreview:ma,onBlurChange:xa,style:e.normalizeStyle({backGroundImage:s.value!==""?`url("${s.value}")`:void 0}),onHandleColEditChange:va,onHandleColTypeChange:na,onRouteUrl:X,onClickTrigger:H,"onUpdate:backGroundImage":Me},{operateCol:e.withCtx(({renderColumns:ye,formDisabled:pe,formLabelsOperable:Sa})=>[e.createVNode(Ke,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ya},{reference:e.withCtx(()=>[e.createElementVNode("span",W3,[e.createVNode(me,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",K3,[xe[1]||(xe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(qe,{"model-value":pe,"active-text":"禁用","inactive-text":"",onChange:We,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(qe,{"model-value":Sa,"active-text":"编辑所有标签","inactive-text":"",onChange:sa},null,8,["model-value"]),xe[2]||(xe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(aa,{modelValue:te.value,"onUpdate:modelValue":xe[0]||(xe[0]=ya=>te.value=ya),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:U,onChange:R},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye,ya=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ya.label},[e.createVNode(da,{value:ya.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ya.label),1)]),_:2},1032,["value"]),e.createVNode(Ke,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(me,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var vl;return[e.createElementVNode("div",G3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((vl=Object.keys(ya))==null?void 0:vl.filter(Nl=>{var pl;return(pl=Ne.value)==null?void 0:pl.find(Fl=>(Fl==null?void 0:Fl.value)===Nl)}),Nl=>{var pl,Fl;return e.openBlock(),e.createElementBlock("div",{key:Nl},[e.createVNode(nl._sfc_main$1,{value:ya==null?void 0:ya[Nl],"active-text":(Fl=(pl=Ne.value)==null?void 0:pl.find(ja=>(ja==null?void 0:ja.value)===Nl))==null?void 0:Fl.label,inactiveText:"",onChange:ja=>Pe(ja,Nl,ya)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Y3,[e.createVNode(me,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow","style"])],2)),M.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:3,fileDataList:j.value,onDestroy:Oa},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(So.ThreeViewerHost,{files:m.value,onGetAnimationData:Y.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},xs=Xl._export_sfc(J3,[["__scopeId","data-v-b52f96ee"]]),zo=e.ref(0),Ac=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=A.cloneDeep(a))==null?void 0:l.map(r=>(zo.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??zo.value,children:Ac(r==null?void 0:r.children)},r))},X3=a=>{var n;return(n=A.cloneDeep(a))==null?void 0:n.map(r=>(zo.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??zo.value,children:Ac(r==null?void 0:r.children)},r))},zc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=A.cloneDeep(a))==null?void 0:n.filter(o=>(o==null?void 0:o.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=zc(r==null?void 0:r.children,l),r)),a)},Mc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o=l),o)):(a=a==null?void 0:a.map(r=>(r.children=Mc(r==null?void 0:r.children,l),r)),a)},Ic=(a,l)=>{var n;return a!=null&&a.find(r=>{var o;return(r==null?void 0:r.id)===((o=l==null?void 0:l.contents)==null?void 0:o.id)})?(n=A.cloneDeep(a))==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(o=l==null?void 0:l.contents),o}):(a=a==null?void 0:a.map(r=>(r.children=Ic(r==null?void 0:r.children,l),r)),a)},Oc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(l.contents)),o)):(a=a==null?void 0:a.map(r=>(r.children=Oc(r==null?void 0:r.children,l),r)),a)},sr=[{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"}],Z3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Q3=[{label:"新增",value:"add"}],In=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Q3},{key:"background",label:"按钮背景色",type:"Color"}],On=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Z3},{key:"textColor",label:"按钮颜色",type:"Color"}],eh={class:"table-header-child"},ah={class:"table-header-child-main"},lh={class:"table-header-child-content"},rh={class:"table-header-child-content-item"},nh={class:"fix-button"},ih={key:0},oh={class:"form-content"},th={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=ce.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h);e.ref(0);const d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{var w;o.value=!0;let x=[];sr==null||sr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},C=E=>{r("fixChange",A.cloneDeep(E))},M=E=>{r("deleteChange",A.cloneDeep(E))},k=E=>{o.value=!0;let x=[];sr==null||sr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},W=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},I=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="id"+c.value,(w=m.value)==null||w.forEach(S=>{const $=sr==null?void 0:sr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},j=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},L=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,x)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",eh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(g,S)=>(e.openBlock(),e.createElementBlock("div",ah,[e.createElementVNode("div",lh,[e.createElementVNode("div",rh,e.toDisplayString(g.label),1),e.createElementVNode("div",nh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>k(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>u(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>L(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",ih,[e.createVNode(Lc,{tableChildContents:g==null?void 0:g.children,onDeleteChange:M,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",oh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:I},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},sh=Xl._export_sfc(th,[["__scopeId","data-v-e0fef72d"]]),ch={class:"table-header-child"},uh={class:"table-header-child-main"},dh={class:"table-header-child-content"},ph={class:"table-header-child-content-item"},fh={class:"fix-button"},hh={key:0},vh={class:"form-content"},mh={class:"dialog-footer"},yh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=ce.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h),d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{r("fixChange",A.cloneDeep(E))},C=E=>{var w;o.value=!0;let x=[];sr==null||sr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},M=E=>{o.value=!0;let x=[];sr==null||sr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},k=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},W=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="idChild"+c.value,(w=m.value)==null||w.forEach(S=>{const $=sr==null?void 0:sr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},I=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},j=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=E=>{r("deleteChange",E)};return(E,x)=>{const w=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ch,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(S,$)=>(e.openBlock(),e.createElementBlock("div",uh,[e.createElementVNode("div",dh,[e.createElementVNode("div",ph,e.toDisplayString(S.label),1),e.createElementVNode("div",fh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>M(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>C(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>j(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",hh,[e.createVNode(sh,{tableChildContents:S==null?void 0:S.children,onDeleteChange:L,onFixChange:u},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:I,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",mh,[e.createVNode(g,{onClick:I,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(g,{class:"ok-button button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Lc=Xl._export_sfc(yh,[["__scopeId","data-v-ebd68fa1"]]),gh={class:"table-operate-content"},bh={class:"table-operate-item"},kh={class:"operate-title"},xh={class:"operate-content"},wh={class:"fix-content"},_h={class:"fix-content-label"},Sh={class:"fix-button"},Eh={key:0},Ch={class:"operate-title"},Dh={class:"operate-content"},Bh={class:"fix-content"},Th={class:"fix-content-label"},Nh={class:"fix-button"},Ah={class:"operate-title"},zh={class:"operate-content"},Mh={class:"fix-content"},Ih={class:"fix-content-label"},Oh={class:"fix-button"},Lh={class:"operate-title"},Rh={class:"operate-content"},$h={class:"fix-content"},Vh={class:"fix-content-label"},Ph={class:"fix-button"},Fh={class:"operate-content"},jh={style:{display:"flex","justify-content":"space-between"}},Hh={class:"form-content"},Uh={class:"dialog-footer"},qh={class:"form-content"},Wh={class:"dialog-footer"},Kh={class:"form-content"},Gh={class:"dialog-footer"},Yh={class:"form-content"},Jh={class:"dialog-footer"},Xh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(!1),c=e.ref([]),d=e.ref(!1),m=e.ref([]),b=e.ref(!1),u=e.ref([]),C=e.ref(""),M=e.ref(""),k=e.ref([]),W=e.ref([]),I=e.ref([]),j=e.ref([]),L=e.ref(!1),E=e.ref([]),x=e.ref([]),w=e.ref(0),g=e.ref([]),S=e.ref([]),$=e.ref([]),V=()=>{L.value=!0;let R=[];In==null||In.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:H==null?void 0:H.options})}),E.value=R,x.value=R},ae=()=>{var H,X,ve;h.value=!0;let R=[];(ve=(X=(H=ce.FormContent)==null?void 0:H.find(de=>(de==null?void 0:de.key)==="Input"))==null?void 0:X.value)==null||ve.forEach(de=>{w.value++,R.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:(de==null?void 0:de.label)==="类型"?"Input":"",id:w.value,contents:de==null?void 0:de.options})}),g.value=R,S.value=R},Z=R=>{R||(g.value=S.value)},ge=async R=>{var H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za;if((R==null?void 0:R.类型)!==((X=(H=S.value)==null?void 0:H.find(pa=>(pa==null?void 0:pa.label)==="类型"))==null?void 0:X.value)){let pa=[],Ca=await((va=(de=(ve=ce.FormContent)==null?void 0:ve.find(Ae=>(Ae==null?void 0:Ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:de.value)==null?void 0:va.value)?await((ma=(Me=(xa=ce.FormContent)==null?void 0:xa.find(Ae=>(Ae==null?void 0:Ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Me.value)==null?void 0:ma.value):(Pe=(na=ce.FormContent)==null?void 0:na.find(Ae=>(Ae==null?void 0:Ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Pe.value;if(Ca==null||Ca.forEach(Ae=>{w.value++,pa.push({label:Ae==null?void 0:Ae.label,name:(Ae==null?void 0:Ae.name)||(Ae==null?void 0:Ae.label),type:Ae.type,value:Ae!=null&&Ae.属性名?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):(R==null?void 0:R[Ae.label])??"",id:w.value,contents:Ae==null?void 0:Ae.options,prop:(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.name)||(Ae==null?void 0:Ae.label)})}),R!=null&&R.菜单选项&&((Oa=R==null?void 0:R.菜单选项)==null?void 0:Oa.length)>0){const Ae=await ce.menuToContentType(R==null?void 0:R.菜单选项);pa=pa==null?void 0:pa.map(he=>((he==null?void 0:he.name)==="组信息选项"&&(he.contents=Ae),he))}S.value=await ce.selectToBase(A.cloneDeep(pa)),g.value=await ce.selectToBase(A.cloneDeep(pa))}else{let pa=A.cloneDeep(g.value);if(pa=pa==null?void 0:pa.map(Ca=>(Ca.value=R==null?void 0:R[Ca.name],Ca)),R!=null&&R.菜单选项&&((za=R==null?void 0:R.菜单选项)==null?void 0:za.length)>0){const Ca=await ce.menuToContentType(R==null?void 0:R.菜单选项);pa=pa==null?void 0:pa.map(Ae=>((Ae==null?void 0:Ae.name)==="组信息选项"&&(Ae.contents=Ca),Ae))}pa=ce.formToOptionsContents(pa),S.value=await ce.selectToBase(A.cloneDeep(pa))}},ze=async R=>{await ge(R),g.value=S.value},F=(R,H)=>{if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="selectRelateType"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.selectRelateType)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="menuSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.menuSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="groupSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.groupSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="originalContent")return(H==null?void 0:H.value)||H[R.key];if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="multiple"){const X=H[R.key];return Xs(X)?X:R.default}return(R==null?void 0:R.label)==="类型"&&H[R.key]===""?"Input":(R==null?void 0:R.key)==="isFormColHidden"&&!H[R.key]?!1:H[R.key]},ne=async R=>{var ve,de,va,na,Pe,xa,Me,ma,Oa;h.value=!0;let H=[];const X=await((va=(de=(ve=ce.FormContent)==null?void 0:ve.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:de.value)==null?void 0:va.value)?await((ma=(Me=(xa=ce.FormContent)==null?void 0:xa.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Me.value)==null?void 0:ma.value):(Pe=(na=ce.FormContent)==null?void 0:na.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Pe.value;if(X==null||X.forEach(za=>{w.value++,H.push({label:za==null?void 0:za.label,name:(za==null?void 0:za.name)||(za==null?void 0:za.label),type:za.type,value:(za==null?void 0:za.label)==="属性名"?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):F(za,R),id:w.value,contents:za==null?void 0:za.options})}),R!=null&&R.menuSelect&&((Oa=R==null?void 0:R.menuSelect)==null?void 0:Oa.length)>0){const za=await ce.menuToContentType(R==null?void 0:R.menuSelect);H=H==null?void 0:H.map(pa=>((pa==null?void 0:pa.name)==="组信息选项"&&(pa.contents=za),pa))}C.value=R==null?void 0:R.id,g.value=await ce.selectToBase(ce.formToOptionsContents(H)),S.value=await ce.selectToBase(ce.formToOptionsContents(H))},J=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;$.value=(H=A.cloneDeep($.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="tableToForm"&&(ve.contents=$.value),ve))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},se=()=>{h.value=!1,g.value=[],C.value=""},Be=async()=>{var ve,de,va,na,Pe,xa,Me,ma,Oa,za;g.value=S.value;let R={};C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value);let H=await((va=(de=(ve=ce.FormContent)==null?void 0:ve.find(pa=>{var Ca,Ae;return(pa==null?void 0:pa.key)===(((Ae=(Ca=g.value)==null?void 0:Ca.find(he=>(he==null?void 0:he.label)==="类型"))==null?void 0:Ae.value)??"label")}))==null?void 0:de.value)==null?void 0:va.value)??((Pe=(na=ce.FormContent)==null?void 0:na.find(pa=>{var Ca,Ae;return(pa==null?void 0:pa.key)===(((Ae=(Ca=g.value)==null?void 0:Ca.find(he=>(he==null?void 0:he.label)==="类型"))==null?void 0:Ae.value)??"label")}))==null?void 0:Pe.value);if((xa=g.value)==null||xa.forEach(pa=>{const Ca=H==null?void 0:H.find(Ae=>(Ae==null?void 0:Ae.label)===(pa==null?void 0:pa.label));Ca&&(R[Ca.key]=pa.value)}),R.name=R.label,(Me=$.value)!=null&&Me.find(pa=>pa.id===R.id))$.value=(ma=$.value)==null?void 0:ma.map(pa=>(pa.id===R.id&&(pa=R),pa));else{let pa=A.cloneDeep($.value);$.value||($.value=[]),pa.push(R),$.value=pa}$.value=$.value.map(({id:pa,...Ca})=>Ca),h.value=!1,C.value="";let X=A.cloneDeep(n.originalItemContents);(Oa=A.cloneDeep(n.originalItemContents))!=null&&Oa.find(pa=>(pa==null?void 0:pa.key)==="tableToForm")?X=(za=A.cloneDeep(n.originalItemContents))==null?void 0:za.map(pa=>((pa==null?void 0:pa.key)==="tableToForm"&&(pa.contents=$.value),pa)):X.push({key:"tableToForm",contents:$.value}),r("change",X)},$e=R=>{L.value=!0;let H=[];In==null||In.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,E.value=H,x.value=H};e.watch(()=>b.value,()=>{var H,X;let R=A.cloneDeep(n.originalItemContents);(H=A.cloneDeep(n.originalItemContents))!=null&&H.find(ve=>(ve==null?void 0:ve.key)==="page")?R=(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="page"&&(ve.contents=b.value),ve)):R.push({key:"page",contents:b.value}),r("change",R)},{deep:!0});const fe=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;W.value=(H=A.cloneDeep(W.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="extraButton"&&(ve.contents=W.value),ve))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var X,ve,de,va,na;E.value=x.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=E.value)==null||X.forEach(Pe=>{const xa=In==null?void 0:In.find(Me=>(Me==null?void 0:Me.label)===(Pe==null?void 0:Pe.label));xa?R[xa.key]=Pe.value:Pe!=null&&Pe.children&&Pe.children.length>0&&(R.children=Pe.children)}),(ve=W.value)!=null&&ve.find(Pe=>Pe.id===R.id))W.value=(de=W.value)==null?void 0:de.map(Pe=>(Pe.id===R.id&&(Pe=R),Pe));else{let Pe=A.cloneDeep(W.value)??[];Pe.push(R),W.value=Pe}L.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(va=A.cloneDeep(n.originalItemContents))!=null&&va.find(Pe=>(Pe==null?void 0:Pe.key)==="extraButton")?H=(na=A.cloneDeep(n.originalItemContents))==null?void 0:na.map(Pe=>((Pe==null?void 0:Pe.key)==="extraButton"&&(Pe.contents=W.value),Pe)):H.push({key:"extraButton",contents:W.value}),r("change",H)},oe=R=>{let H=A.cloneDeep(x.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),x.value=H},U=()=>{L.value=!1,E.value=[],C.value=""},De=R=>{d.value=!0;let H=[];On==null||On.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,I.value=H,j.value=H},Ie=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;k.value=(H=A.cloneDeep(k.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="rowButton"&&(ve.contents=k.value),ve))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},je=()=>{s.value=!0;let R=[];sr==null||sr.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=R,u.value=R},la=()=>{d.value=!0;let R=[];On==null||On.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),I.value=R,j.value=R},Ta=R=>{let H=A.cloneDeep(j.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),j.value=H},ee=()=>{var X,ve,de,va,na;I.value=j.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=I.value)==null||X.forEach(Pe=>{const xa=On==null?void 0:On.find(Me=>(Me==null?void 0:Me.label)===(Pe==null?void 0:Pe.label));xa?R[xa.key]=Pe.value:Pe!=null&&Pe.children&&Pe.children.length>0&&(R.children=Pe.children)}),(ve=k.value)!=null&&ve.find(Pe=>Pe.id===R.id))k.value=(de=k.value)==null?void 0:de.map(Pe=>(Pe.id===R.id&&(Pe=R),Pe));else{let Pe=A.cloneDeep(k.value);Pe.push(R),k.value=Pe}d.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(va=A.cloneDeep(n.originalItemContents))!=null&&va.find(Pe=>(Pe==null?void 0:Pe.key)==="rowButton")?H=(na=A.cloneDeep(n.originalItemContents))==null?void 0:na.map(Pe=>((Pe==null?void 0:Pe.key)==="rowButton"&&(Pe.contents=k.value),Pe)):H.push({key:"rowButton",contents:k.value}),r("change",H)},ca=()=>{d.value=!1,C.value="",j.value=[],I.value=[]},ue=R=>{s.value=!0;let H=[];sr==null||sr.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:w.value,contents:X==null?void 0:X.options})}),m.value=H,M.value=R==null?void 0:R.id,u.value=H},ta=R=>{var H;c.value=zc(A.cloneDeep(c.value),R==null?void 0:R.id),r("change",(H=A.cloneDeep(n.originalItemContents))==null?void 0:H.map(X=>{var ve;return(X==null?void 0:X.key)==="header"&&(X.contents=(ve=c.value)!=null&&ve.some(de=>de==null?void 0:de.children)?[c.value]:c.value),X}))},Se=R=>{var X,ve,de;R.type==="fix"?R.id!==""?c.value=Ic(c.value,R):c.value=Mc(c.value,R==null?void 0:R.contents):c.value=Oc(c.value,R),c.value=(X=c.value)!=null&&X.some(va=>va==null?void 0:va.children)?[c.value]:c.value,C.value="";let H=A.cloneDeep(n.originalItemContents);(ve=A.cloneDeep(n.originalItemContents))!=null&&ve.find(va=>(va==null?void 0:va.key)==="header")?H=(de=A.cloneDeep(n.originalItemContents))==null?void 0:de.map(va=>((va==null?void 0:va.key)==="header"&&(va.contents=c.value),va)):H.push({key:"header",contents:c.value}),r("change",H)},te=R=>{var X;s.value=!0;let H=[];sr==null||sr.forEach(ve=>{w.value++,H.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:R[ve.key],id:w.value,contents:ve==null?void 0:ve.options})}),R!=null&&R.children&&((X=R==null?void 0:R.children)==null?void 0:X.length)>0&&H.push({children:R==null?void 0:R.children,isFormColHidden:!0}),C.value=R==null?void 0:R.id,M.value="",m.value=H,u.value=H},Ne=R=>{let H=A.cloneDeep(u.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),u.value=H},We=()=>{s.value=!1,C.value="",M.value="",u.value=[]},sa=()=>{var X,ve,de,va,na,Pe;m.value=u.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=m.value)==null||X.forEach(xa=>{const Me=sr==null?void 0:sr.find(ma=>(ma==null?void 0:ma.label)===(xa==null?void 0:xa.label));Me?R[Me.key]=xa.value:xa!=null&&xa.children&&xa.children.length>0&&(R.children=xa.children)}),(ve=c.value)!=null&&ve.find(xa=>xa.id===R.id))c.value=(de=c.value)==null?void 0:de.map(xa=>(xa.id===R.id&&(xa=R),xa));else{let xa=A.cloneDeep(c.value)??[];M.value===""?xa.push(R):xa=xa==null?void 0:xa.map(Me=>(Me.id===M.value&&(Me.children||(Me.children=[]),Me.children.push(R)),Me)),c.value=xa}c.value=(va=c.value)!=null&&va.some(xa=>xa==null?void 0:xa.children)?[c.value]:c.value,s.value=!1,C.value="",M.value="";let H=A.cloneDeep(n.originalItemContents);(na=A.cloneDeep(n.originalItemContents))!=null&&na.find(xa=>(xa==null?void 0:xa.key)==="header")?H=(Pe=A.cloneDeep(n.originalItemContents))==null?void 0:Pe.map(xa=>((xa==null?void 0:xa.key)==="header"&&(xa.contents=c.value),xa)):H.push({key:"header",contents:c.value}),r("change",H)},Ya=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;c.value=(H=A.cloneDeep(c.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>{var de;return(ve==null?void 0:ve.key)==="header"&&(ve.contents=(de=c.value)!=null&&de.some(va=>va==null?void 0:va.children)?[c.value]:c.value),ve})),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(o.value=A.cloneDeep(n.originalItemContents),c.value=(H=(R=o.value)==null?void 0:R.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:H.contents,k.value=(ve=(X=o.value)==null?void 0:X.find(me=>(me==null?void 0:me.key)==="rowButton"))==null?void 0:ve.contents,W.value=(va=(de=o.value)==null?void 0:de.find(me=>(me==null?void 0:me.key)==="extraButton"))==null?void 0:va.contents,b.value=(Pe=(na=o.value)==null?void 0:na.find(me=>(me==null?void 0:me.key)==="page"))!=null&&Pe.contents?!!((Me=(xa=o.value)==null?void 0:xa.find(me=>(me==null?void 0:me.key)==="page"))!=null&&Me.contents):!1,$.value=(Oa=(ma=o.value)==null?void 0:ma.find(me=>(me==null?void 0:me.key)==="tableToForm"))==null?void 0:Oa.contents,c.value=(za=c.value)==null?void 0:za.map((me,qe)=>(Array.isArray(me)?me=X3(me):me={label:(me==null?void 0:me.label)??"",prop:(me==null?void 0:me.label)==="操作"?"operate":me==null?void 0:me.prop,width:me!=null&&me.width?parseInt(me.width):"",fixed:(me==null?void 0:me.fixed)??void 0,sortable:(me==null?void 0:me.sortable)??!1,align:(me==null?void 0:me.align)??"left",showOverflowTooltip:(me==null?void 0:me.showOverflowTooltip)??!0,isNotDrag:(me==null?void 0:me.isNotDrag)??!1,isEditCol:(me==null?void 0:me.isEditCol)??!1,isOperate:(me==null?void 0:me.isOperate)??!1,id:(me==null?void 0:me.id)??qe,formMenuSelect:(me==null?void 0:me.formMenuSelect)??void 0,groupSelect:(me==null?void 0:me.groupSelect)??void 0},me)),c.value=(pa=c.value)!=null&&pa.every(me=>Array.isArray(me))?(Ca=c.value)==null?void 0:Ca[0]:c.value,k.value=(Ae=k.value)==null?void 0:Ae.map((me,qe)=>me={label:(me==null?void 0:me.label)??"",type:(me==null?void 0:me.type)??"",textColor:(me==null?void 0:me.textColor)??"#000000",id:(me==null?void 0:me.id)??qe}),W.value=(he=W.value)==null?void 0:he.map((me,qe)=>me={label:(me==null?void 0:me.label)??"",type:(me==null?void 0:me.type)??"",background:(me==null?void 0:me.background)??"var(--ssComponent-primary-color)",id:(me==null?void 0:me.id)??qe}),$.value)$.value=(xe=$.value)==null?void 0:xe.map(me=>{w.value++;let qe=me;return qe.id=w.value,qe});else{let me=[];const qe=(Y=ce.getColumnChild(A.cloneDeep(c.value)))==null?void 0:Y.filter(da=>(da==null?void 0:da.prop)!=="operate");qe==null||qe.forEach(da=>{var Ke;w.value++,me.push({label:da==null?void 0:da.label,name:(da==null?void 0:da.prop)||(da==null?void 0:da.label),type:da!=null&&da.groupSelect?"Select":"Input",value:"",id:w.value,contents:da==null?void 0:da.options,menuSelect:da==null?void 0:da.formMenuSelect,groupSelect:(Ke=da==null?void 0:da.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),$.value=me}},{deep:!0,immediate:!0}),(R,H)=>{const X=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",gh,[e.createElementVNode("div",bh,[e.createElementVNode("div",kh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ve,{class:"icon-content",onClick:je,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",xh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",wh,[e.createElementVNode("div",_h,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Sh,[e.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>ue(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>te(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Ya(de)},null,8,["onClick"])])]),de!=null&&de.children&&de.children.length>0?(e.openBlock(),e.createElementBlock("div",Eh,[e.createVNode(Lc,{tableChildContents:de==null?void 0:de.children,onDeleteChange:ta,onFixChange:Se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ch,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:la},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",Bh,[e.createElementVNode("div",Th,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Nh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>De(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Ie(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ah,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",zh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",Mh,[e.createElementVNode("div",Ih,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Oh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>$e(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>fe(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Lh,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Rh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",$h,[e.createElementVNode("div",Vh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Ph,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>ne(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>J(de)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Fh,[e.createElementVNode("div",jh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(nl._sfc_main$1,{modelValue:b.value,"onUpdate:modelValue":H[0]||(H[0]=de=>b.value=de)},null,8,["modelValue"])])])]),e.createVNode(Br.ssDialog,{visible:s.value,onBeforeDestroy:We,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uh,[e.createVNode(ve,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ve,{class:"ok-button button",onClick:sa,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:d.value,onBeforeDestroy:ca,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:Ta},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(ve,{onClick:ca,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ve,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:L.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gh,[e.createVNode(ve,{onClick:U,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ve,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:h.value,onBeforeDestroy:se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:ge,onChangeVisible:Z,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jh,[e.createVNode(ve,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ve,{class:"ok-button button",onClick:Be,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Zh=Xl._export_sfc(Xh,[["__scopeId","data-v-7a6b87b5"]]),Qh=A.useModelComp(A.pinia),{pageMapState:e2}=A.storeToRefs(Qh),a2=A.useMenuState(A.pinia),{activeMenuPath:l2}=A.storeToRefs(a2),r2=e.ref(24),n2=e.ref(6),i2=e.ref(10),o2=e.ref(70),t2=e.ref(.18),s2=e.ref(45),c2=(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;return{x:((s=(o=a==null?void 0:a.value)==null?void 0:o.tableData)==null?void 0:s.x)||l%2*12,y:((c=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:c.y)||l,w:((m=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:m.w)||r2.value,h:((u=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:u.h)||n,minW:((M=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:M.minW)||n2.value,minH:((W=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:W.minH)||t2.value,maxH:((j=(I=a==null?void 0:a.value)==null?void 0:I.tableData)==null?void 0:j.maxH)||s2.value,i:((E=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},u2=(a,l)=>{var r,o,s,h,c,d,m,b;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((h=(s=(o=a==null?void 0:a.compData)==null?void 0:o.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:h.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((b=(m=(d=a==null?void 0:a.compData)==null?void 0:d.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:m.contents)==null?void 0:b.length)/5);return n*2},Rc=(a,l,n)=>{var h,c;const r=(c=(h=e2.value)==null?void 0:h[l2.value])==null?void 0:c.filter(d=>{var m;return((m=d==null?void 0:d.key)==null?void 0:m.type)==="gridLayout"}),o=r==null?void 0:r.find(d=>{var m,b,u;return((u=(b=(m=d==null?void 0:d.value)==null?void 0:m.tableData)==null?void 0:b.component)==null?void 0:u.id)===a.id}),s=u2(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((d,m)=>Rc(d,m))),{...c2(o,l,s,a)}},d2=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=A.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,o)=>Rc(r,o)):[]},p2=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),f2=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),h2=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]);e.watch(()=>n.compType,c=>{var b;const d=p2(n==null?void 0:n.optionItems),m=c?(b=d[c==null?void 0:c.toUpperCase()])==null?void 0:b[n==null?void 0:n.target]:[];o.value=m==null?void 0:m.map(u=>{for(const[C,M]of Object.entries((n==null?void 0:n.comp)||{}))if((u==null?void 0:u.prop)===C)return{...u,value:M};return u})},{immediate:!0});const s=c=>nl.getComponent(c),h=c=>{var d,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?o.value=(d=o.value)==null?void 0:d.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!0}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!0}:b}):o.value=(m=o.value)==null?void 0:m.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!1}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!1}:b}),r("change",{target:n==null?void 0:n.target,styleConfigs:o.value,prop:c==null?void 0:c.prop})};return(c,d)=>{const m=e.resolveComponent("el-col"),b=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(b,{class:"style-row",key:u==null?void 0:u.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u==null?void 0:u.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(u.type)),{modelValue:u.value,"onUpdate:modelValue":C=>u.value=C,content:u==null?void 0:u.options,optionUrl:u==null?void 0:u.optionUrl,disabled:u==null?void 0:u.disabled,activeText:u==null?void 0:u.activeText,inactiveText:u==null?void 0:u.inactiveText,onChange:C=>h(u)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),v2=Xl._export_sfc(h2,[["__scopeId","data-v-6c233914"]]),m2=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const n=a,r=l,o=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),h=j=>j==null?void 0:j.reduce((L,E)=>(L[E==null?void 0:E.prop]=E==null?void 0:E.rule,L),{}),c=e.computed(()=>({formRules:h(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),d=e.ref([]),m=e.ref(""),b=(j,L,E)=>{var g;let x=[];(n==null?void 0:n.activeTabName)==="任务配置"?(x=[{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:j},{label:"按钮名称",value:"按钮名称",children:L}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"任务名称",rule:o},{prop:"任务关键词",rule:o},{prop:"执行任务",rule:o},{prop:"执行动作",rule:o},{prop:"执行交互",rule:o}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(x=[{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:(g=n==null?void 0:n.relatedData)==null?void 0:g.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:o},{prop:"关联状态",rule:o},{prop:"关联形式",rule:o},{prop:"关联任务集合",rule:o}]);let w;return E&&(E==null?void 0:E.length)>0?w=[...x,...u(j,L,E)]:w=x,w},u=(j,L,E)=>{const x=[{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 E?x==null?void 0:x.filter(w=>E==null?void 0:E.includes(w==null?void 0:w.prop)):x},C=(j,L)=>{var S,$,V,ae,Z,ge,ze,F,ne;const E=((Z=(ae=(V=($=(S=n==null?void 0:n.comp)==null?void 0:S.compData)==null?void 0:$.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:V.contents)==null?void 0:ae.filter(J=>(J==null?void 0:J.label)!=="操作"))==null?void 0:Z.map(J=>({value:J==null?void 0:J.prop,label:J.label})))||[],x=/button/i,w=((ne=(F=(ze=(ge=n==null?void 0:n.comp)==null?void 0:ge.compData)==null?void 0:ze.filter(J=>x.test(J==null?void 0:J.key)))==null?void 0:F.flatMap(J=>J==null?void 0:J.contents))==null?void 0:ne.map(J=>({value:J==null?void 0:J.label,label:J.label})))||[],g=b(E,w,j);d.value=L?f2(g,L):g,j&&(j==null?void 0:j.length)>0&&s.value.push(...j==null?void 0:j.map(J=>({prop:J,rule:o})))};e.onMounted(()=>{C(null,n==null?void 0:n.extendItem)});const M=j=>{const L=j==null?void 0:j[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const E=L==null?void 0:L.join("/");C(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,j)}},k=j=>{r("change",{target:n==null?void 0:n.target,extendConfigs:j})},W=(j,L)=>{m.value=L==null?void 0:L.changeProp,M(j)},I=j=>{r("onButtonClick",j)};return(j,L)=>(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,key:d.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:k,onBlurChange:W,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue"]))}}),y2=Xl._export_sfc(m2,[["__scopeId","data-v-7c660c1f"]]),g2={};function b2(a,l){return null}const k2=Xl._export_sfc(g2,[["render",b2]]),x2={class:"form-operate-content"},w2={class:"form-operate-item"},_2={class:"operate-title"},S2={class:"operate-content"},E2={class:"fix-content"},C2={class:"fix-button"},D2={class:"operate-title"},B2={class:"operate-content"},T2={class:"fix-content"},N2={class:"fix-button"},A2={style:{display:"flex","justify-content":"space-between"}},z2={class:"form-content"},M2={class:"dialog-footer"},I2={class:"form-content"},O2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref([]),h=e.ref([]),c=e.ref(!1),d=e.ref([]),m=e.ref([]),b=e.ref(""),u=e.ref(!1),C=e.ref(0),M=e.ref([]),k=e.ref([]),W=(F,ne)=>{if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="selectRelateType"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.selectRelateType)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="menuSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.menuSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="groupSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.groupSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="originalContent")return(ne==null?void 0:ne.value)||ne[F.key];if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="multiple"){const J=ne[F.key];return Xs(J)?J:F.default}return(F==null?void 0:F.label)==="类型"&&ne[F.key]===""?"Input":(F==null?void 0:F.key)==="isFormColHidden"&&!ne[F.key]?!1:ne[F.key]},I=async F=>{var se,Be,$e,fe,N,oe;o.value=!0;let ne=[];const J=await(($e=(Be=(se=ce.FormContent)==null?void 0:se.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:Be.value)==null?void 0:$e.value)??((N=(fe=ce.FormContent)==null?void 0:fe.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:N.value);if(J==null||J.forEach(U=>{C.value++,ne.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,prop:U==null?void 0:U.prop,value:W(U,F),id:C.value,contents:U==null?void 0:U.options,width:(F==null?void 0:F.width)??1})}),F!=null&&F.menuSelect&&((oe=F==null?void 0:F.menuSelect)==null?void 0:oe.length)>0){const U=await ce.menuToContentType(F==null?void 0:F.menuSelect);ne=ne==null?void 0:ne.map(De=>((De==null?void 0:De.name)==="组信息选项"&&(De.contents=U),De))}b.value=F==null?void 0:F.id,s.value=await ce.selectToBase(ce.formToOptionsContents(ne)),h.value=await ce.selectToBase(ce.formToOptionsContents(ne))},j=F=>{var J;c.value=!0;let ne=[];(J=ce.FormButton)==null||J.forEach(se=>{C.value++,ne.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"&&F[se.key]===""?"normal":F[se.key],id:C.value,contents:se==null?void 0:se.options})}),M.value=ne,k.value=ne,b.value=F==null?void 0:F.id};e.watch(()=>u.value,()=>{var ne,J;let F=A.cloneDeep(n.originalItemContents);(ne=A.cloneDeep(n.originalItemContents))!=null&&ne.find(se=>(se==null?void 0:se.key)==="enableWrap")?F=(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(se=>((se==null?void 0:se.key)==="enableWrap"&&(se.contents=!u.value),se)):F.push({key:"enableWrap",contents:!u.value}),r("change",F)},{deep:!0});const L=()=>{var J,se,Be,$e,fe;M.value=k.value;let F={};if(b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value),(J=M.value)==null||J.forEach(N=>{var U;const oe=(U=ce.FormButton)==null?void 0:U.find(De=>(De==null?void 0:De.label)===(N==null?void 0:N.label));oe&&(F[oe.key]=N.value)}),(se=d.value)!=null&&se.find(N=>N.id===F.id))d.value=(Be=d.value)==null?void 0:Be.map(N=>(N.id===F.id&&(N=F),N));else{let N=A.cloneDeep(d.value);d.value||(d.value=[]),N.push(F),d.value=N}c.value=!1,b.value="";let ne=A.cloneDeep(n.originalItemContents);($e=A.cloneDeep(n.originalItemContents))!=null&&$e.find(N=>(N==null?void 0:N.key)==="formButton")?ne=(fe=A.cloneDeep(n.originalItemContents))==null?void 0:fe.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=d.value),N)):ne.push({key:"formButton",contents:d.value}),r("change",ne)},E=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;m.value=(ne=A.cloneDeep(m.value))==null?void 0:ne.filter(se=>(se==null?void 0:se.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=m.value),se))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;d.value=(ne=A.cloneDeep(d.value))==null?void 0:ne.filter(se=>(se==null?void 0:se.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(se=>((se==null?void 0:se.key)==="formButton"&&(se.contents=d.value),se))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var ne;c.value=!0;let F=[];(ne=ce.FormButton)==null||ne.forEach(J=>{C.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:(J==null?void 0:J.label)==="类型"?"normal":"",id:C.value,contents:J==null?void 0:J.options})}),M.value=F,k.value=F},g=()=>{var ne,J,se;o.value=!0;let F=[];(se=(J=(ne=ce.FormContent)==null?void 0:ne.find(Be=>(Be==null?void 0:Be.key)==="Input"))==null?void 0:J.value)==null||se.forEach(Be=>{C.value++,F.push({label:Be==null?void 0:Be.label,name:Be==null?void 0:Be.label,type:Be.type,value:(Be==null?void 0:Be.label)==="类型"?"Input":"",id:C.value,contents:Be==null?void 0:Be.options})}),s.value=F,h.value=F},S=F=>{let ne=A.cloneDeep(k.value);ne=ne==null?void 0:ne.map(J=>(J.value=F==null?void 0:F[J.name],J)),k.value=ne},$=F=>{const ne=F.find(Be=>(Be==null?void 0:Be.name)==="类型");if((ne==null?void 0:ne.value)!="Select")return;const J=F.find(Be=>(Be==null?void 0:Be.name)==="多选"),se=F.find(Be=>(Be==null?void 0:Be.name)==="初始值");J!=null&&J.value&&Eo.isString(se.value)&&(se.value=[se.value]),!(J!=null&&J.value)&&!Eo.isString(se.value)&&(se.value="")},V=async F=>{var ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je;if((F==null?void 0:F.类型)!==((J=(ne=h.value)==null?void 0:ne.find(la=>(la==null?void 0:la.label)==="类型"))==null?void 0:J.value)){let la=[];const Ta=await(($e=(Be=(se=ce.FormContent)==null?void 0:se.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:Be.value)==null?void 0:$e.value)?await((De=(U=(oe=ce.FormContent)==null?void 0:oe.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:U.value)==null?void 0:De.value):(N=(fe=ce.FormContent)==null?void 0:fe.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:N.value;if(Ta==null||Ta.forEach(ee=>{var ue,ta;C.value++;const ca=Lu(ee==null?void 0:ee.default)?(F==null?void 0:F[ee.label])??ee.value??"":ee==null?void 0:ee.default;la.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:ca,prop:ee==null?void 0:ee.prop,id:C.value,contents:ee==null?void 0:ee.options,width:((ta=(ue=h.value)==null?void 0:ue[0])==null?void 0:ta.width)??1})}),F!=null&&F.菜单选项&&((Ie=F==null?void 0:F.菜单选项)==null?void 0:Ie.length)>0){const ee=await ce.menuToContentType(F==null?void 0:F.菜单选项);la=la==null?void 0:la.map(ca=>((ca==null?void 0:ca.name)==="组信息选项"&&(ca.contents=ee),ca))}$(la),h.value=await ce.selectToBase(A.cloneDeep(la)),s.value=await ce.selectToBase(A.cloneDeep(la))}else{let la=A.cloneDeep(h.value);if(la=la==null?void 0:la.map(Ta=>(Ta.value=F==null?void 0:F[Ta.name],Ta)),F!=null&&F.菜单选项&&((je=F==null?void 0:F.菜单选项)==null?void 0:je.length)>0){const Ta=await ce.menuToContentType(F==null?void 0:F.菜单选项);la=la==null?void 0:la.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=Ta),ee))}la=ce.formToOptionsContents(la),$(la),h.value=await ce.selectToBase(A.cloneDeep(la))}},ae=F=>{F||(s.value=h.value)},Z=async F=>{await V(F),s.value=h.value},ge=Tl.debounce(async()=>{var se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta;s.value=h.value;let F={};F.width=((Be=(se=s.value)==null?void 0:se[0])==null?void 0:Be.width)??1,b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value);let ne=await((N=(fe=($e=ce.FormContent)==null?void 0:$e.find(ee=>{var ca,ue;return(ee==null?void 0:ee.key)===(((ue=(ca=s.value)==null?void 0:ca.find(ta=>(ta==null?void 0:ta.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:fe.value)==null?void 0:N.value)??((U=(oe=ce.FormContent)==null?void 0:oe.find(ee=>{var ca,ue;return(ee==null?void 0:ee.key)===(((ue=(ca=s.value)==null?void 0:ca.find(ta=>(ta==null?void 0:ta.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:U.value);if((De=s.value)==null||De.forEach(ee=>{const ca=ne==null?void 0:ne.find(ue=>(ue==null?void 0:ue.label)===(ee==null?void 0:ee.label));ca&&(F[ca.key]=ee.value)}),F.width=F.width?F.width:1,F.key=F==null?void 0:F.label,F.isFormColHidden=F==null?void 0:F.isFormColHidden,(Ie=m.value)!=null&&Ie.find(ee=>ee.id===F.id))m.value=(je=m.value)==null?void 0:je.map(ee=>(ee.id===F.id&&(ee=F),ee));else{let ee=A.cloneDeep(m.value);ee.push(F),m.value=ee}m.value=m.value.map(({id:ee,...ca})=>ca),o.value=!1,b.value="";let J=A.cloneDeep(n.originalItemContents);(la=A.cloneDeep(n.originalItemContents))!=null&&la.find(ee=>(ee==null?void 0:ee.key)==="formContent")?J=(Ta=A.cloneDeep(n.originalItemContents))==null?void 0:Ta.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee)):J.push({key:"formContent",contents:m.value}),r("change",J)},300),ze=()=>{o.value=!1,c.value=!1,b.value="",h.value=[],k.value=[]};return e.watch(()=>n.originalItemContents,()=>{var ne,J,se,Be,$e,fe;if(!n.originalItemContents||n.originalItemContents.length===0)return;const F=A.cloneDeep(n.originalItemContents);m.value=((ne=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:ne.contents)??[],d.value=((J=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:J.contents)??[],u.value=(se=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&se.contents?!((Be=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&Be.contents):!0,m.value=($e=A.cloneDeep(m.value))==null?void 0:$e.map((N,oe)=>{var De;let U=N;return U.id=(N==null?void 0:N.id)??oe,N!=null&&N.label||(N.label=(N==null?void 0:N.key)??(N==null?void 0:N.label)??""),N!=null&&N.type||(N.type=(N==null?void 0:N.type)??""),N.contents=((De=N==null?void 0:N.options)==null?void 0:De.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,U}),m.value=ce.formToOptionsContents(m.value),d.value=(fe=d.value)==null?void 0:fe.map((N,oe)=>N={label:(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",background:(N==null?void 0:N.background)??"var(--ssComponent-primary-color)",id:oe})},{deep:!0,immediate:!0}),(F,ne)=>{const J=e.resolveComponent("svg-icon"),se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",x2,[e.createElementVNode("div",w2,[e.createElementVNode("div",_2,[ne[2]||(ne[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(se,{class:"icon-content",id:"themeButton",onClick:g},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[1]||(ne[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",S2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Be,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",E2,[e.createElementVNode("div",null,e.toDisplayString(Be.label),1),e.createElementVNode("div",C2,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>I(Be)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>E(Be)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",D2,[ne[4]||(ne[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(se,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[3]||(ne[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",B2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Be,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",T2,[e.createElementVNode("div",null,e.toDisplayString(Be.label),1),e.createElementVNode("div",N2,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>j(Be)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>x(Be)},null,8,["onClick"])])])]))),128))]),ne[6]||(ne[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",A2,[ne[5]||(ne[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(nl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":ne[0]||(ne[0]=Be=>u.value=Be)},null,8,["modelValue"])])]),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",z2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:V,onChangeVisible:ae,onBlurChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M2,[e.createVNode(se,{onClick:ze,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(se,{class:"ok-button button",onClick:e.unref(ge),id:"themeButton"},{default:e.withCtx(()=>ne[8]||(ne[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ze,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ws=Xl._export_sfc(O2,[["__scopeId","data-v-20850524"]]),L2={class:"step-module content"},R2={class:"module-data"},$2={class:"step-module layout"},V2={class:"form-content"},P2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),d=e.ref("create"),m=e.ref({}),b=e.ref([]),u=I=>{var j;m.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=s.value)==null||L.forEach(x=>{x.value=""}),d.value="create",c.visible=!0;break;case"update":(E=s.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),d.value="update",c.visible=!0;break;case"delete":b.value.splice(j,1),d.value="delete";break}},M=I=>{var j,L,E;if((I==null?void 0:I.buttonName)==="确认"){const x=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(x).forEach(w=>{x[w]===""&&delete x[w]}),d.value){case"create":b.value.push({...x,index:((j=b.value)==null?void 0:j.length)+1});break;case"update":b.value=(L=b.value)==null?void 0:L.map(w=>w.index===(x==null?void 0:x.index)?{...w,title:x==null?void 0:x.title,description:x==null?void 0:x.description}:w);break}r("change",(E=k())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},k=()=>({comp:"Step",compData:[{key:"stepList",contents:b.value},{key:"stepConfig",contents:m.value}]}),W=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="stepConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",L2,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",R2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",$2,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(nl.ssForm,{rowContents:o.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:W,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",V2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),F2=Xl._export_sfc(P2,[["__scopeId","data-v-7dbd17f2"]]),j2={class:"step-module content"},H2={class:"module-data"},U2={class:"step-module layout"},q2={class:"form-content"},W2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref("create"),s=e.ref({}),h=e.ref([]),c=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),b=e.reactive({visible:!1,width:"40%",title:"时间线"}),u=I=>{var j;s.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),o.value="create",b.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),o.value="update",b.visible=!0;break;case"delete":h.value.splice(j,1),o.value="delete";break}},M=I=>{var j,L,E,x;if((I==null?void 0:I.buttonName)==="确认"){const w=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(w).forEach(g=>{w[g]===""&&delete w[g]}),o.value){case"create":(L=h.value)==null||L.push({...w,index:((j=h.value)==null?void 0:j.length)+1});break;case"update":h.value=(E=h.value)==null?void 0:E.map(g=>g.index===(w==null?void 0:w.index)?{...g,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:g);break}r("change",(x=k())==null?void 0:x.compData),b.visible=!1}else b.visible=!1},k=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:h.value},{key:"timeLineConfig",contents:s.value}]}),W=()=>{b.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(s.value=((j=I==null?void 0:I.find(E=>E.key==="timeLineConfig"))==null?void 0:j.contents)??{},h.value=((L=I==null?void 0:I.find(E=>E.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",j2,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",H2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",U2,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(nl.ssForm,{rowContents:c.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:b.visible,title:b.title,onBeforeDestroy:W,width:b.width},{default:e.withCtx(()=>[e.createElementVNode("div",q2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),K2=Xl._export_sfc(W2,[["__scopeId","data-v-39ffc861"]]),G2={};function Y2(a,l){return e.openBlock(),e.createElementBlock("div")}const J2=Xl._export_sfc(G2,[["render",Y2]]),X2={class:"extra-content"},Z2={key:0},Q2={key:1},e4={class:"dialog-footer"},a4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),o=e.ref(),s=e.ref(),h=l,c=e.ref(!1),d=e.ref({}),m=e.ref({}),b=e.ref();e.watch(()=>[n.itemData],()=>{var x;const E=A.cloneDeep(n.itemData);o.value=(x=A.cloneDeep(E))==null?void 0:x.map(w=>{var g;if(w.key==="extra"){let S=[];(g=w.value)==null||g.forEach($=>{var V;S.push((V=Object.values($))==null?void 0:V[0])}),w.value=S}return w})},{deep:!0,immediate:!0});const u=(E,x,w,g)=>{var $;let S={};(($=E==null?void 0:E[0])==null?void 0:$.contents)==="详情"&&(c.value=!0,S[x]=E,s.value=E==null?void 0:E.filter(V=>(V==null?void 0:V.key)!=="tableContentName"),d.value=S,m.value=w,b.value=g.id)},C=E=>{var V,ae,Z,ge;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(ze=>(ze==null?void 0:ze.key)==="tableContentName"),w=(ge=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:ge.filter(ze=>(ze==null?void 0:ze.key)!=="tableContentName"),g=w==null?void 0:w.map((ze,F)=>{var ne;return F===E.index&&(ze==null?void 0:ze.comp)==="Table"&&(ze.compData=(ne=ze.compData)==null?void 0:ne.map(J=>{var se,Be;return(J==null?void 0:J.key)==="tableContents"&&(J.contents=(Be=(se=E.content)==null?void 0:se.map($e=>{let fe={};for(let N in $e)N!=="id"&&(fe[N]=$e[N]);return fe}))==null?void 0:Be.map($e=>Object.values($e))),J})),ze});g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let ze in S)$[ze]=g;d.value=$},M=()=>{c.value=!1,d.value={},m.value={},b.value=void 0,r.value++},k=E=>{var V,ae,Z,ge;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(ze=>(ze==null?void 0:ze.key)==="tableContentName"),w=(ge=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:ge.filter(ze=>(ze==null?void 0:ze.key)!=="tableContentName"),g=w==null?void 0:w.map((ze,F)=>(F===E.index&&(ze.compData=E.contents),ze));g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let ze in S)$[ze]=g;d.value=$},W=()=>{var x,w;let E={};for(let g in m.value)g===((x=Object.keys(d.value))==null?void 0:x[0])?E[g]=(w=Object.values(d.value))==null?void 0:w[0]:E[g]=m.value[g];h("change",{buttonName:"编辑",index:b.value,singleContent:E},"methodData"),c.value=!1,d.value={},m.value={},b.value=void 0},I=()=>{c.value=!1,d.value={},m.value={},b.value=void 0},j=E=>{h("change",E,"methodData")},L=E=>Ti(E);return(E,x)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",X2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(g==null?void 0:g.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Z2)):(e.openBlock(),e.createElementBlock("div",Q2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,childItemData:g==null?void 0:g.itemChildData,key:S,index:(g==null?void 0:g.id)??S,onContentClick:u,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,onChange:C,childItemData:g==null?void 0:g.itemChildData,key:S,onContentChange:k,index:(g==null?void 0:g.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",e4,[e.createVNode(w,{class:"cancel-button footer-button",onClick:M,id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},l4=Xl._export_sfc(a4,[["__scopeId","data-v-2d9c5ab2"]]),r4={key:0,class:"method-content"},n4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=ce.useOriginalState(A.pinia),{originalPath:r}=A.storeToRefs(n),o=a,s=e.ref(!1),h=e.ref(),c=ce.useTableComp(A.pinia),{multipleTableConst:d}=A.storeToRefs(c),m=A.useModelComp(A.pinia),b=e.ref(!1),u=A.useMenuState(A.pinia),C=A.useLoginState(A.pinia),{itemData:M,isEdit:k,routeToChildPath:W,tableViewContents:I,lockingPage:j,payloadTypes:L}=A.storeToRefs(m),{activeMenuPath:E,platform:x,childMenu:w}=A.storeToRefs(u),{loginUserInfo:g}=A.storeToRefs(C),S=e.ref(!1),$=async()=>{var fe,N;(fe=l.value)!=null&&fe.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")&&await J((N=l.value)==null?void 0:N.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")),await ce.onSaveBack()};e.watch(()=>M.value,async()=>{k.value==="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{deep:!0});const V=()=>{s.value=!1,h.value=void 0},ae=fe=>fe.map(N=>{const oe={};for(const U in N){const De=N[U];if(U.includes(d.value)){const Ie=U.split(d.value);let je=oe;Ie.forEach((la,Ta)=>{Ta===Ie.length-1?je[la]=De:(je[la]||(je[la]={}),je=je[la])})}else oe[U]=De}return oe}),Z=async(fe,N,oe=[])=>{var De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya;let U=(De=A.cloneDeep(N))==null?void 0:De.filter(R=>(R==null?void 0:R.comp)!=="methodButton");if(fe!=null&&fe.includes("[")){let R=(ee=(Ta=(la=(je=(Ie=A.cloneDeep(fe))==null?void 0:Ie.split("["))==null?void 0:je[1])==null?void 0:la.split("]"))==null?void 0:Ta[0])==null?void 0:ee.split(":"),H="";if(R!=null&&R[0]){let X=(ca=U==null?void 0:U.find(ve=>(ve==null?void 0:ve.name)===(R==null?void 0:R[0])))==null?void 0:ca.compData;if(!X){let ve=(ue=fe==null?void 0:fe.split("["))==null?void 0:ue[0],de=await ce.getItemData(ve,sessionStorage.getItem("systemKey"),"",!1,"","",oe);X=(ta=de==null?void 0:de.find(va=>(va==null?void 0:va.name)===(R==null?void 0:R[0])))==null?void 0:ta.compData}X==null||X.forEach(ve=>{var de,va,na,Pe,xa,Me;if((ve==null?void 0:ve.key)==="formContent")(de=ve==null?void 0:ve.contents)==null||de.forEach(ma=>{var Oa;(ma==null?void 0:ma.key)===(R==null?void 0:R[1])&&(Array.isArray(ma==null?void 0:ma.value)?H=ma==null?void 0:ma.value:H=(Oa=ma==null?void 0:ma.value)==null?void 0:Oa.toString())});else if((ve==null?void 0:ve.key)==="tableContents"){let ma=[],Oa=(va=X==null?void 0:X.find(pa=>(pa==null?void 0:pa.key)==="header"))==null?void 0:va.contents,za=(R==null?void 0:R[1])??"";if(Oa!=null&&Oa.every(pa=>Array.isArray(pa))){let pa=ce.getColumnChild((xa=Oa==null?void 0:Oa[0])==null?void 0:xa.filter(Ca=>(Ca==null?void 0:Ca.label)!=="操作"));(Me=ve.contents)==null||Me.forEach(Ca=>{let Ae={};Ca=Ca==null?void 0:Ca.filter(he=>!(he!=null&&he.id)),pa==null||pa.forEach((he,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===he.prop)&&(Ae[he.prop]=xe)}),ma.push(Ae)}),ma=ae(ma)}else{let pa=(na=Oa==null?void 0:Oa.map(Ca=>Ca==null?void 0:Ca.label))==null?void 0:na.filter(Ca=>Ca!=="操作");(Pe=ve.contents)==null||Pe.forEach(Ca=>{let Ae={};Ca=Ca==null?void 0:Ca.filter(he=>!(he!=null&&he.id)),pa==null||pa.forEach((he,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===he)&&(Ae[he]=xe)}),ma.push(Ae)})}H=ma}})}return H}else if(fe!=null&&fe.includes("/")){let R={};return(Se=A.cloneDeep(U))==null||Se.forEach((H,X)=>{var ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da;if((H==null?void 0:H.comp)==="Table"){let Ke=Array.isArray((va=(de=(ve=H==null?void 0:H.compData)==null?void 0:ve.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:de.contents)==null?void 0:va[0])?(Me=(xa=(Pe=(na=H==null?void 0:H.compData)==null?void 0:na.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Pe.contents)==null?void 0:xa[0])==null?void 0:Me.some(pe=>pe==null?void 0:pe.children):[],aa=(za=(Oa=(ma=H==null?void 0:H.compData)==null?void 0:ma.find(pe=>(pe==null?void 0:pe.key)==="tableContents"))==null?void 0:Oa.contents)==null?void 0:za.map(pe=>(pe!=null&&pe.find(Sa=>Sa==null?void 0:Sa.id)&&(pe=pe.slice(1)),pe)),Ve=(Y=(he=(Ae=(Ca=(pa=H==null?void 0:H.compData)==null?void 0:pa.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Ca.contents)==null?void 0:Ae[0])==null?void 0:he[0])==null?void 0:Y.label,ye=(me=(xe=H==null?void 0:H.compData)==null?void 0:xe.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:me.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?R[H.name]=R!=null&&R[H.name]?R[H.name]:ce.tableToForm(aa,ye):R[Ve]=ce.tableToForm(aa,ye);else{const pe=[];ye=ye.slice(1,ye.length-1),ye==null||ye.forEach((Sa,ya)=>{aa==null||aa.forEach(vl=>{pe.push({key:Sa.label+vl[0],value:vl[ya+1]})})}),R["form"+X]=pe}}else{const Ke=(da=(qe=H.compData)==null?void 0:qe.find(Ve=>(Ve==null?void 0:Ve.key)==="formContent"))==null?void 0:da.contents;R!=null&&R.form||(R.form=[]);const aa=[];Ke==null||Ke.forEach(Ve=>{Ve.key!==""&&(Ve={key:(Ve==null?void 0:Ve.key)??(Ve==null?void 0:Ve.label),value:Ve==null?void 0:Ve.value},aa.push(Ve))}),R.form=[...aa,...A.cloneDeep(R==null?void 0:R.form)]}}),R}else{if(fe==="createInsofDataApi"){let R=(te=A.cloneDeep(N))==null?void 0:te[0];return R={comp:(Ne=A.cloneDeep(R))==null?void 0:Ne.comp,compData:(We=A.cloneDeep(R))==null?void 0:We.compData,name:(sa=A.cloneDeep(R))==null?void 0:sa.name,isShow:(Ya=A.cloneDeep(R))==null?void 0:Ya.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:R}}}return fe}},ge=async(fe,N,oe)=>{var Ie,je,la;let U=await ce.getItemData(N,sessionStorage.getItem("systemKey"),""),De=U==null?void 0:U.find(Ta=>(Ta==null?void 0:Ta.name)===(oe==null?void 0:oe[0]));if(De){if((De==null?void 0:De.comp)==="Table"){let Ta={};for(let Ne in A.cloneDeep(fe))A.cloneDeep(fe)[Ne]!=="loginUser"?Ta[Ne]=A.cloneDeep(fe)[Ne]:Ta[Ne]=((Ie=g.value)==null?void 0:Ie.account)||((je=g.value)==null?void 0:je.账号);let ee=[],ca=Ta;Array.isArray(fe)||(ca=[Ta]),ca==null||ca.forEach(Ne=>{ee.push({[Ne[oe[1]]]:Ne})});let ue=[],ta=ee==null?void 0:ee.map(Ne=>{var We;return(We=Object.keys(Ne))==null?void 0:We[0]});U==null||U.forEach(Ne=>{var We;(Ne==null?void 0:Ne.name)===(oe==null?void 0:oe[0])&&((We=Ne==null?void 0:Ne.compData)==null||We.forEach(sa=>{var Ya;(sa==null?void 0:sa.key)==="tableContents"&&((Ya=sa==null?void 0:sa.contents)==null||Ya.forEach(R=>{R!=null&&R.some(H=>ta.includes(H))&&ue.push({[R.find(H=>H.id).id]:R.find(H=>ta.includes(H))})}))}))});let Se=ue==null?void 0:ue.map(Ne=>{var We;return(We=Object.keys(Ne))==null?void 0:We[0]}),te=[];if(Se==null||Se.forEach(Ne=>{var Ya;let We=(Ya=ue==null?void 0:ue.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0].toString())===Ne.toString()}))==null?void 0:Ya[Ne],sa=ee==null?void 0:ee.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0])===We});te.push({id:parseInt(Ne),value:{tableData:sa[We]}})}),(te==null?void 0:te.length)>0)return te}else if((De==null?void 0:De.comp)==="Form"){let Ta=A.cloneDeep(De);Ta.compData=(la=Ta.compData)==null?void 0:la.map(ue=>{var ta;return(ue==null?void 0:ue.key)==="formContent"&&(ue.contents=(ta=ue.contents)==null?void 0:ta.map(Se=>((Se==null?void 0:Se.key)===(oe==null?void 0:oe[1])&&(Se.value=(fe==null?void 0:fe[Se==null?void 0:Se.prop])||fe),Se))),ue});let ee={};for(let ue in Ta)ue!=="id"&&(ee[ue]=Ta[ue]);let ca=[];if(ca.push({id:De==null?void 0:De.id,keyType:oe==null?void 0:oe[1],value:{pageData:ee}}),(ca==null?void 0:ca.length)>0)return ca}}},ze=async(fe,N,oe)=>{var Ie,je,la,Ta,ee,ca,ue,ta,Se,te;let U=await ce.getItemData(N,sessionStorage.getItem("systemKey"),""),De=U==null?void 0:U.find(Ne=>(Ne==null?void 0:Ne.name)===(oe==null?void 0:oe[0]));if(De){if((De==null?void 0:De.comp)==="Table"){let Ne={};for(let We in A.cloneDeep(fe))A.cloneDeep(fe)[We]!=="loginUser"?Ne[We]=A.cloneDeep(fe)[We]:Ne[We]=((Ie=g.value)==null?void 0:Ie.account)||((je=g.value)==null?void 0:je.账号);await Mr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:De==null?void 0:De.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ne}})}else if((De==null?void 0:De.comp)==="Form"){let Ne=A.cloneDeep(De),We=Object.keys(fe),sa="";(Ta=(la=A.cloneDeep(Ne))==null?void 0:la.compData)==null||Ta.forEach(de=>{var va,na;(de==null?void 0:de.key)==="formContent"&&((na=(va=A.cloneDeep(de))==null?void 0:va.contents)==null||na.forEach(Pe=>{var xa;We.includes(Pe==null?void 0:Pe.key)&&(Pe==null?void 0:Pe.value)===((xa=g.value)==null?void 0:xa.姓名)&&(sa=Pe==null?void 0:Pe.key)}))});let Ya=[];(ee=Object.values(fe[sa]))==null||ee.forEach(de=>{de!=null&&de.includes("(")&&Ya.push(de)}),Ya=[...new Set(Ya)];const R=Ya==null?void 0:Ya.map(async de=>{var Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe;let va="";(Ca=(pa=(za=(Oa=(ma=(Me=A.cloneDeep(de))==null?void 0:Me.split("("))==null?void 0:ma[1])==null?void 0:Oa.split(")"))==null?void 0:za[0])==null?void 0:pa.split(":"))==null||Ca.forEach(da=>{va=va===""?va+da.replaceAll("'",""):va+"/"+da.replaceAll("'","")});let na=[];(qe=(me=(xe=(Y=(he=(Ae=A.cloneDeep(de))==null?void 0:Ae.split("<"))==null?void 0:he[1])==null?void 0:Y.split(">"))==null?void 0:xe[0])==null?void 0:me.split(":"))==null||qe.forEach(da=>{na.push(da.replaceAll("'",""))});const Pe=await ce.getItemData(va,sessionStorage.getItem("systemKey"),"");let xa="";return Pe==null||Pe.forEach(da=>{var Ke;da.name===(na==null?void 0:na[0])&&((Ke=da==null?void 0:da.compData)==null||Ke.forEach(aa=>{var Ve;(aa==null?void 0:aa.key)==="formContent"&&((Ve=aa.contents)==null||Ve.forEach(ye=>{(ye==null?void 0:ye.key)===(na==null?void 0:na[1])&&(xa=ye==null?void 0:ye.value)}))}))}),{[de]:xa}}),H=await Promise.all(R);Ne.compData=(ue=(ca=A.cloneDeep(Ne))==null?void 0:ca.compData)==null?void 0:ue.map(de=>{var va,na;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(na=(va=A.cloneDeep(de))==null?void 0:va.contents)==null?void 0:na.map(Pe=>{var xa,Me,ma,Oa;return(xa=fe[sa])!=null&&xa[Pe==null?void 0:Pe.key]&&(fe[sa][Pe==null?void 0:Pe.key].includes("(")?Pe.value=(Me=H==null?void 0:H.find(za=>{var pa;return((pa=Object.keys(za))==null?void 0:pa[0])===fe[sa][Pe==null?void 0:Pe.key]}))==null?void 0:Me[fe[sa][Pe==null?void 0:Pe.key]]:Pe.value=(Oa=(ma=A.cloneDeep(fe))==null?void 0:ma[sa])==null?void 0:Oa[Pe==null?void 0:Pe.key]),Pe})),de});const X=await Mr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let ve="";((ta=X==null?void 0:X.data)==null?void 0:ta.type)==="success"&&((te=(Se=X==null?void 0:X.data)==null?void 0:Se.result)==null||te.forEach(de=>{var va,na;((na=(va=de==null?void 0:de.value)==null?void 0:va.pageData)==null?void 0:na.name)===(oe==null?void 0:oe[0])&&(ve=de.id)}),await Mr.updateInsofDataApi({id:ve,value:{pageData:Ne}}))}}},F=(fe,N="",oe={})=>{for(const[U,De]of Object.entries(fe)){const Ie=N?`${N}.${U}`:U;De!==null&&typeof De=="object"&&!Array.isArray(De)&&Object.prototype.toString.call(De)!=="[object Date]"?F(De,Ie,oe):oe[Ie]=De}return oe},ne=async(fe,N,oe,U)=>{var je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa;let De=await ce.getItemData(N,sessionStorage.getItem("systemKey"),""),Ie=De==null?void 0:De.find(za=>(za==null?void 0:za.name)===(oe==null?void 0:oe[0]));if(Ie){if(!(oe!=null&&oe[1])&&(Ie==null?void 0:Ie.comp)==="Table"){let za={},pa=[],Ca=(la=(je=Ie==null?void 0:Ie.compData)==null?void 0:je.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:la.contents;Ca!=null&&Ca.every(Y=>Array.isArray(Y))?pa=(ee=ce.getColumnChild((Ta=Ca==null?void 0:Ca[0])==null?void 0:Ta.filter(Y=>(Y==null?void 0:Y.label)!=="操作")))==null?void 0:ee.map(Y=>Y==null?void 0:Y.prop):pa=Ca==null?void 0:Ca.map(Y=>Y==null?void 0:Y.label);for(let Y in A.cloneDeep(fe))if(A.cloneDeep(fe)[Y]!=="loginUser"){let xe=F(A.cloneDeep(fe)[Y]),me={};for(let qe in xe)if(pa!=null&&pa.find(da=>da===qe))me[qe]=xe[qe];else if(pa!=null&&pa.find(da=>(da==null?void 0:da.toUpperCase())===(qe==null?void 0:qe.toUpperCase()))){let da=pa==null?void 0:pa.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(qe==null?void 0:qe.toUpperCase()));me[da]=xe[qe]}za[Y]=me}else za[Y]=((ca=g.value)==null?void 0:ca.account)||((ue=g.value)==null?void 0:ue.账号);let Ae=await Mr.getInsofDataApi({keyLikes:{tableId:Ie==null?void 0:Ie.id}});if(((Se=(ta=Ae==null?void 0:Ae.data)==null?void 0:ta.result)==null?void 0:Se.length)>0){let Y=(Ne=(te=Ae==null?void 0:Ae.data)==null?void 0:te.result)==null?void 0:Ne.map(xe=>xe==null?void 0:xe.id);(Y==null?void 0:Y.length)>0&&await Mr.batchDeleteInsofDataApi({ids:Y})}let he=[];if((We=Ie==null?void 0:Ie.compData)!=null&&We.find(Y=>(Y==null?void 0:Y.key)==="pageColumn")&&((R=(Ya=(sa=Ie==null?void 0:Ie.compData)==null?void 0:sa.find(Y=>(Y==null?void 0:Y.key)==="pageColumn"))==null?void 0:Ya.contents)!=null&&R.includes("["))){const Y=await Mr.getInsofDataApi({id:Ie==null?void 0:Ie.tableId});let xe=((de=(ve=(X=(H=Y==null?void 0:Y.data)==null?void 0:H.result)==null?void 0:X[0])==null?void 0:ve.key)==null?void 0:de.pageKey)??"";(va=Object.values(za))==null||va.forEach(me=>{he.push({key:{type:"data",pageKey:xe,tableId:Ie==null?void 0:Ie.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:me}})})}else(na=Object.values(za))==null||na.forEach(Y=>{he.push({key:{type:"data",pageKey:N,tableId:Ie==null?void 0:Ie.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Y}})});(he==null?void 0:he.length)>0&&await Mr.batchAddInsofDataApi({dataList:he})}else if(!(oe!=null&&oe[1])&&(Ie==null?void 0:Ie.comp)==="Form"){let za=A.cloneDeep(Ie);za.compData=(xa=(Pe=A.cloneDeep(za))==null?void 0:Pe.compData)==null?void 0:xa.map(Ae=>{var he,Y;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Y=(he=A.cloneDeep(Ae))==null?void 0:he.contents)==null?void 0:Y.map(xe=>{var me,qe;return(me=A.cloneDeep(fe))!=null&&me[xe==null?void 0:xe.key]&&(xe.value=(qe=A.cloneDeep(fe))==null?void 0:qe[xe==null?void 0:xe.key]),xe})),Ae});const pa=await Mr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let Ca="";((Me=pa==null?void 0:pa.data)==null?void 0:Me.type)==="success"&&((Oa=(ma=pa==null?void 0:pa.data)==null?void 0:ma.result)==null||Oa.forEach(Ae=>{var he,Y;((Y=(he=Ae==null?void 0:Ae.value)==null?void 0:he.pageData)==null?void 0:Y.name)===(oe==null?void 0:oe[0])&&(Ca=Ae.id)}),await Mr.updateInsofDataApi({id:Ca,value:{pageData:za}}))}}},J=async fe=>{var N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te;u.setImportLoading(!0);try{if(fe.api){let Ne=new WeakMap,We=await ce.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ne),sa="";if(We=We==null?void 0:We.map(na=>{var Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe;if((na==null?void 0:na.comp)==="Form")na.compData=(Pe=na.compData)==null?void 0:Pe.map(me=>{var qe;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(qe=me.contents)==null?void 0:qe.map(da=>{var Ke;if((da==null?void 0:da.value)===""&&(da==null?void 0:da.type)==="Select"){let aa=ce.judgeContents((Ke=A.cloneDeep(da))==null?void 0:Ke.optionUrl,Ne);da.value=da.value||aa}return da})),me});else if((na==null?void 0:na.comp)==="Table"&&(xa=na.compData)!=null&&xa.find(me=>(me==null?void 0:me.key)==="pageColumn")){let me=(ma=(Me=na.compData)==null?void 0:Me.find(aa=>(aa==null?void 0:aa.key)==="pageColumn"))==null?void 0:ma.contents,qe=((za=(Oa=na.compData)==null?void 0:Oa.find(aa=>(aa==null?void 0:aa.key)==="pageGroup"))==null?void 0:za.contents)??"",da=(Ae=(Ca=(pa=me==null?void 0:me.split("["))==null?void 0:pa[1])==null?void 0:Ca.split("]"))==null?void 0:Ae[0];sa=((he=me==null?void 0:me.split("["))==null?void 0:he[0])+((xe=(Y=I.value)==null?void 0:Y.find(aa=>(aa==null?void 0:aa.key)===da))==null?void 0:xe.value)}return na}),!(sa===""||sa==="")){const na=await ce.getItemData(sa,sessionStorage.getItem("systemKey"),"",!1,"","",Ne);We=We==null?void 0:We.map(Pe=>{var xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe;if((Pe==null?void 0:Pe.comp)==="Table"&&(xa=Pe.compData)!=null&&xa.find(da=>(da==null?void 0:da.key)==="pageColumn")){let da=(ma=(Me=Pe.compData)==null?void 0:Me.find(pe=>(pe==null?void 0:pe.key)==="pageColumn"))==null?void 0:ma.contents,Ke=((za=(Oa=Pe.compData)==null?void 0:Oa.find(pe=>(pe==null?void 0:pe.key)==="pageGroup"))==null?void 0:za.contents)??"",aa=(Ae=(Ca=(pa=da==null?void 0:da.split("["))==null?void 0:pa[1])==null?void 0:Ca.split("]"))==null?void 0:Ae[0],Ve=((he=da==null?void 0:da.split("["))==null?void 0:he[0])+((xe=(Y=I.value)==null?void 0:Y.find(pe=>(pe==null?void 0:pe.key)===aa))==null?void 0:xe.value),ye=(me=na==null?void 0:na.find(pe=>(pe==null?void 0:pe.name)===(Ke===""?o==null?void 0:o.compName:Ke)))==null?void 0:me.compData;Pe.compData=(qe=Pe.compData)==null?void 0:qe.map(pe=>{var Sa;return(pe==null?void 0:pe.key)==="tableContents"&&(pe.contents=(Sa=ye==null?void 0:ye.find(ya=>(ya==null?void 0:ya.key)==="tableContents"))==null?void 0:Sa.contents),pe})}return Pe})}let Ya={};if(((oe=(N=fe==null?void 0:fe.extraValues)==null?void 0:N.input)==null?void 0:oe.length)>0){const na=(De=(U=fe==null?void 0:fe.extraValues)==null?void 0:U.input)==null?void 0:De.map(async Pe=>{var xa;se!=null&&se.find(Me=>Me===Pe)?Ya=await Z(Pe,We):Ya[Object.keys(Pe)[0]]=await Z((xa=Object.values(Pe))==null?void 0:xa[0],We,Ne)});await Promise.all(na)}else Ya=await Z("/",We);let R=!1;(je=(Ie=fe==null?void 0:fe.extraValues)==null?void 0:Ie.output)==null||je.forEach(na=>{var Pe,xa;(xa=(Pe=Object.values(na))==null?void 0:Pe[0])!=null&&xa.includes(".doc")&&(R=!0)});let H;if(R){const na=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await Ua.axios.post(fe.api,Ya,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{na.close()})}else H=await Ua.axios.post(fe.api,Ya,{headers:{"Content-Type":"application/json"}});let X=(ca=(ee=(Ta=(la=A.cloneDeep(fe))==null?void 0:la.extraValues)==null?void 0:Ta.output)==null?void 0:ee.map(na=>{var Pe,xa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da,Ke;if(!((xa=(Pe=Object.values(na))==null?void 0:Pe[0])!=null&&xa.includes(".doc"))){let aa=(he=(Ae=(Ca=(ma=A.cloneDeep((Me=Object.values(na))==null?void 0:Me[0]))==null?void 0:ma.split("["))==null?void 0:Ca[((pa=(za=A.cloneDeep((Oa=Object.values(na))==null?void 0:Oa[0]))==null?void 0:za.split("["))==null?void 0:pa.length)-1])==null?void 0:Ae.split("]"))==null?void 0:he[0],Ve=aa==null?void 0:aa.split(":"),ye=(me=A.cloneDeep((Y=Object.values(na))==null?void 0:Y[0]))==null?void 0:me.substring(0,A.cloneDeep((xe=Object.values(na))==null?void 0:xe[0]).lastIndexOf("["));if(ye=(da=A.cloneDeep(ye))==null?void 0:da.slice(0,((qe=A.cloneDeep(ye))==null?void 0:qe.length)-1),ye!=null&&ye.includes("[")){let pe="";if((Ke=ce.contentTransArrayToAll(ye,"/"))==null||Ke.forEach(Sa=>{var ya,vl,Nl,pl,Fl,ja,jl;if(!(Sa!=null&&Sa.includes("[")))pe=pe===""?pe+Sa.replaceAll("/",""):pe+"/"+Sa.replaceAll("/","");else{let Rl=A.cloneDeep(Sa).slice(1,((ya=A.cloneDeep(Sa))==null?void 0:ya.length)-1),Da=(ja=(Fl=(pl=(Nl=(vl=A.cloneDeep(Rl))==null?void 0:vl.split("["))==null?void 0:Nl[1])==null?void 0:pl.split("]"))==null?void 0:Fl[0])==null?void 0:ja.split(":"),al="",dl=(jl=We==null?void 0:We.find(ol=>(ol==null?void 0:ol.name)===(Da==null?void 0:Da[0])))==null?void 0:jl.compData;dl==null||dl.forEach(ol=>{var $a;(ol==null?void 0:ol.key)==="formContent"&&(($a=ol==null?void 0:ol.contents)==null||$a.forEach(tl=>{(tl==null?void 0:tl.key)===(Da==null?void 0:Da[1])&&(al=tl==null?void 0:tl.value)}))}),pe=pe===""?pe+al.replaceAll("/",""):pe+"/"+al.replaceAll("/","")}}),ye=pe,ye[(ye==null?void 0:ye.length)-1]!=="/")return ye}}}))==null?void 0:ca.filter(na=>na);X=[...new Set(A.cloneDeep(X))];let ve=X==null?void 0:X.map(async na=>{let Pe=await ce.getItemData(na,sessionStorage.getItem("systemKey"),"",!1,"","",Ne);if((Pe==null?void 0:Pe.length)===0)return await ce.getParentContents(na)});await Promise.all(ve);let de=[],va=(Se=(ta=(ue=A.cloneDeep(fe))==null?void 0:ue.extraValues)==null?void 0:ta.output)==null?void 0:Se.map(async na=>{var Ca,Ae,he,Y,xe,me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll,Te,Ma,Je,ie,Xe,Aa,Ze,ka,Va,Ja,Ue,fa,oa,il,Le,Pa,sl,fr,ur,Zl,rr,dr,yr,Oe,Ql,_r,Nr,Al,Tr,Pr,Wl,gr,Ir,Rr,Vl,ar,Fr,Vr,Or,jr,Yr;if((Ae=(Ca=Object.values(na))==null?void 0:Ca[0])!=null&&Ae.includes(".doc")){var Pe=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),xa=H.headers["content-disposition"],Me=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ma=Me.exec(xa),Oa=ma==null?void 0:ma[1],za=document.createElement("a"),pa=window.URL.createObjectURL(Pe);h.value=[{name:Oa,blobUrl:pa}],s.value=!0}else{let sn=(aa=(Ke=(da=(Y=A.cloneDeep((he=Object.values(na))==null?void 0:he[0]))==null?void 0:Y.split("["))==null?void 0:da[((qe=(me=A.cloneDeep((xe=Object.values(na))==null?void 0:xe[0]))==null?void 0:me.split("["))==null?void 0:qe.length)-1])==null?void 0:Ke.split("]"))==null?void 0:aa[0],Yl=sn==null?void 0:sn.split(":"),hr=(pe=A.cloneDeep((Ve=Object.values(na))==null?void 0:Ve[0]))==null?void 0:pe.substring(0,A.cloneDeep((ye=Object.values(na))==null?void 0:ye[0]).lastIndexOf("["));if(hr!=null&&hr.includes("[")?hr=(ya=A.cloneDeep(hr))==null?void 0:ya.slice(0,((Sa=A.cloneDeep(hr))==null?void 0:Sa.length)-1):hr===""&&(hr=E.value),hr=hr.replaceAll("<","[").replaceAll(">","]"),hr!=null&&hr.includes("[")){let ml="";(vl=ce.contentTransArrayToAll(hr,"/"))==null||vl.forEach((nr,Ll)=>{var Sr,Hl,vr,er,Wr,an,_n,Un,Ln,Sn,An;if(!(nr!=null&&nr.includes("[")))ml=ml===""?ml+nr.replaceAll("/",""):ml+"/"+nr.replaceAll("/","");else{let Rn="",cn="";(Sr=A.cloneDeep(nr))!=null&&Sr.includes("]")?(Rn=A.cloneDeep(nr).slice(1,((Hl=A.cloneDeep(nr))==null?void 0:Hl.length)-1),cn=(_n=(an=(Wr=(er=(vr=A.cloneDeep(Rn))==null?void 0:vr.split("["))==null?void 0:er[1])==null?void 0:Wr.split("]"))==null?void 0:an[0])==null?void 0:_n.split(":")):(Rn=A.cloneDeep(nr).slice(1,(Un=A.cloneDeep(nr))==null?void 0:Un.length),cn=(Ln=A.cloneDeep(Rn))==null?void 0:Ln.split("/"));let zn="",qn=(Sn=We==null?void 0:We.find(Hr=>(Hr==null?void 0:Hr.name)===(cn==null?void 0:cn[0])))==null?void 0:Sn.compData;qn==null||qn.forEach(Hr=>{var Wn;(Hr==null?void 0:Hr.key)==="formContent"&&((Wn=Hr==null?void 0:Hr.contents)==null||Wn.forEach(bn=>{(bn==null?void 0:bn.key)===(cn==null?void 0:cn[1])&&(zn=bn==null?void 0:bn.value)}))}),((An=ce.contentTransArrayToAll(hr,"/"))==null?void 0:An.length)-1!==Ll?ml=ml===""?ml+zn.replaceAll("/",""):ml+"/"+zn.replaceAll("/",""):ml=ml+r.value+zn.replaceAll("/","")}}),(Nl=E.value)!=null&&Nl.includes(ml)?hr=E.value:hr=ml}let qr=A.cloneDeep((pl=Object.keys(na))==null?void 0:pl[0]);if(((Fl=H==null?void 0:H.data)==null?void 0:Fl.statusCode)===200||((ja=H==null?void 0:H.data)==null?void 0:ja.code)===200){if(((Rl=(jl=H==null?void 0:H.data)==null?void 0:jl.data)!=null&&Rl[qr]||(al=(Da=H==null?void 0:H.data)==null?void 0:Da.result)!=null&&al[qr])&&(Yl==null?void 0:Yl.length)===1)return await ne(((ol=(dl=H==null?void 0:H.data)==null?void 0:dl.data)==null?void 0:ol[qr])||((tl=($a=H==null?void 0:H.data)==null?void 0:$a.result)==null?void 0:tl[qr]),A.cloneDeep(hr),Yl,sa);if((Te=(ll=H==null?void 0:H.data)==null?void 0:ll.data)!=null&&Te[qr]||(Je=(Ma=H==null?void 0:H.data)==null?void 0:Ma.result)!=null&&Je[qr]){let ml=await ge(((Xe=(ie=H==null?void 0:H.data)==null?void 0:ie.data)==null?void 0:Xe[qr])||((Ze=(Aa=H==null?void 0:H.data)==null?void 0:Aa.result)==null?void 0:Ze[qr]),A.cloneDeep(hr),Yl);return ml&&(de=[...de,...ml]),ml}else{if(!((ka=H==null?void 0:H.data)!=null&&ka.data)){let ml=await ce.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ne);ml=ml==null?void 0:ml.map(Ll=>{var Sr;return(Ll==null?void 0:Ll.name)===(Yl==null?void 0:Yl[0])&&(Ll.compData=(Sr=Ll.compData)==null?void 0:Sr.map(Hl=>{var vr;return(Hl==null?void 0:Hl.key)==="formContent"&&(Hl.contents=(vr=Hl.contents)==null?void 0:vr.map(er=>{var Wr,an;return(er==null?void 0:er.key)===(Yl==null?void 0:Yl[1])&&(er.value=(an=(Wr=H==null?void 0:H.data)==null?void 0:Wr.result)==null?void 0:an[qr==null?void 0:qr.replaceAll(":","")]),er})),Hl})),Ll});let nr=[];(Va=ml==null?void 0:ml.filter(Ll=>(Ll==null?void 0:Ll.comp)==="Form"))==null||Va.forEach(async Ll=>{let Sr={};for(let Hl in Ll)Hl!=="id"&&(Sr[Hl]=Ll[Hl]);nr.push({id:Ll==null?void 0:Ll.id,value:{pageData:Sr}})}),(nr==null?void 0:nr.length)>0&&await Mr.batchUpdateInsofDataApi({dataList:nr});return}if((Yl==null?void 0:Yl.length)===1){const ml=(fa=(Ue=(Ja=H==null?void 0:H.data)==null?void 0:Ja.data)==null?void 0:Ue.path)==null?void 0:fa.path;let nr="";(sl=(Pa=(Le=(il=(oa=ml==null?void 0:ml.split("("))==null?void 0:oa[1])==null?void 0:il.split(")"))==null?void 0:Le[0])==null?void 0:Pa.split(":"))==null||sl.forEach(Hl=>{var vr,er;nr=nr===""?nr+((vr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:vr.trim()):nr+"/"+((er=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:er.trim())});let Ll=[(dr=(rr=(Zl=(ur=(fr=ml==null?void 0:ml.split("<"))==null?void 0:fr[1])==null?void 0:ur.split(">"))==null?void 0:Zl[0])==null?void 0:rr.replaceAll("'",""))==null?void 0:dr.trim()],Sr;return(Ql=(Oe=(yr=H==null?void 0:H.data)==null?void 0:yr.data)==null?void 0:Oe.data)!=null&&Ql[Yl==null?void 0:Yl[0]]?Sr=await ne((Al=(Nr=(_r=H==null?void 0:H.data)==null?void 0:_r.data)==null?void 0:Nr.data)==null?void 0:Al[Yl==null?void 0:Yl[0]],nr,Yl,sa):Sr=await ze((Pr=(Tr=H==null?void 0:H.data)==null?void 0:Tr.data)==null?void 0:Pr.data,nr,Ll,Ne),Sr}else{const ml=(Ir=(gr=(Wl=H==null?void 0:H.data)==null?void 0:Wl.data)==null?void 0:gr.path)==null?void 0:Ir.path;let nr="";return(Vr=(Fr=(ar=(Vl=(Rr=ml==null?void 0:ml.split("("))==null?void 0:Rr[1])==null?void 0:Vl.split(")"))==null?void 0:ar[0])==null?void 0:Fr.split(":"))==null||Vr.forEach(Sr=>{var Hl,vr;nr=nr===""?nr+((Hl=Sr==null?void 0:Sr.replaceAll("'",""))==null?void 0:Hl.trim()):nr+"/"+((vr=Sr==null?void 0:Sr.replaceAll("'",""))==null?void 0:vr.trim())}),await ge((Yr=(jr=(Or=H==null?void 0:H.data)==null?void 0:Or.data)==null?void 0:jr.data)==null?void 0:Yr[Yl==null?void 0:Yl[0]],nr,Yl)}}}}});if(await Promise.all(va),(de==null?void 0:de.length)>0){let na=[];de==null||de.forEach(Me=>{na!=null&&na.find(ma=>{var Oa,za,pa,Ca;return((za=(Oa=ma==null?void 0:ma.value)==null?void 0:Oa.pageData)==null?void 0:za.name)===((Ca=(pa=Me==null?void 0:Me.value)==null?void 0:pa.pageData)==null?void 0:Ca.name)})||na.push(Me)});let Pe=[];na==null||na.forEach(Me=>{var za,pa,Ca,Ae;let ma=A.cloneDeep(Me);ma.value.pageData.compData=(za=ma.value.pageData.compData)==null?void 0:za.map(he=>{var Y;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(Y=he.contents)==null?void 0:Y.map(xe=>{var qe,da,Ke,aa;let me=(qe=A.cloneDeep(de))==null?void 0:qe.find(Ve=>(Ve==null?void 0:Ve.keyType)===(xe==null?void 0:xe.key));if(me){let Ve=(aa=(Ke=(da=me.value.pageData.compData)==null?void 0:da.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:aa.find(ye=>(ye==null?void 0:ye.key)===(xe==null?void 0:xe.key));xe.value=Ve==null?void 0:Ve.value}return xe})),he}),Pe.push({id:ma==null?void 0:ma.id,value:ma==null?void 0:ma.value});let Oa=[];(Ae=(Ca=(pa=ma==null?void 0:ma.value)==null?void 0:pa.pageData)==null?void 0:Ca.compData)==null||Ae.forEach(he=>{var Y;(he==null?void 0:he.key)==="formContent"&&((Y=he==null?void 0:he.contents)==null||Y.forEach(xe=>{var me,qe,da,Ke,aa,Ve;if((qe=(me=xe==null?void 0:xe.optionUrl)==null?void 0:me.menuSelect)!=null&&qe.find(ye=>ye==null?void 0:ye.includes("[")))if(Oa!=null&&Oa.find(ye=>{var pe,Sa,ya;return((pe=ye==null?void 0:ye.key)==null?void 0:pe.join(","))===((ya=(Sa=xe==null?void 0:xe.optionUrl)==null?void 0:Sa.menuSelect)==null?void 0:ya.join(","))})){let ye=(da=Oa==null?void 0:Oa.find(pe=>{var Sa,ya,vl;return((Sa=pe==null?void 0:pe.key)==null?void 0:Sa.join(","))===((vl=(ya=xe==null?void 0:xe.optionUrl)==null?void 0:ya.menuSelect)==null?void 0:vl.join(","))}))==null?void 0:da.value;ye.push({key:xe==null?void 0:xe.prop,groups:(Ke=xe==null?void 0:xe.optionUrl)==null?void 0:Ke.groupSelect,value:xe==null?void 0:xe.value}),Oa=Oa==null?void 0:Oa.map(pe=>{var Sa,ya,vl;return((Sa=pe==null?void 0:pe.key)==null?void 0:Sa.join(","))===((vl=(ya=xe==null?void 0:xe.optionUrl)==null?void 0:ya.menuSelect)==null?void 0:vl.join(","))&&(pe.value=ye),pe})}else Oa.push({key:(aa=xe==null?void 0:xe.optionUrl)==null?void 0:aa.menuSelect,value:[{key:xe==null?void 0:xe.prop,groups:(Ve=xe==null?void 0:xe.optionUrl)==null?void 0:Ve.groupSelect,value:xe==null?void 0:xe.value}]})}))}),(Oa==null?void 0:Oa.length)>0&&(Oa=Oa==null?void 0:Oa.map(he=>{var xe;let Y="";return(xe=he==null?void 0:he.key)==null||xe.forEach(me=>{var qe;if(!(me!=null&&me.includes("[")))Y=Y===""?Y+me:Y+"/"+me;else{let da="",Ke=(qe=me==null?void 0:me.replaceAll("[","").replaceAll("]",""))==null?void 0:qe.split(":");We==null||We.forEach(aa=>{var Ve;(aa==null?void 0:aa.name)===(Ke==null?void 0:Ke[0])&&((Ve=aa==null?void 0:aa.compData)==null||Ve.forEach(ye=>{var pe;(ye==null?void 0:ye.key)==="formContent"&&((pe=ye==null?void 0:ye.contents)==null||pe.forEach(Sa=>{(Sa==null?void 0:Sa.prop)===(Ke==null?void 0:Ke[1])&&(da=Sa==null?void 0:Sa.value)}))}))}),Y=Y+r.value+da}}),he.key=Y,he})),Oa==null||Oa.forEach(he=>{var qe,da,Ke;let Y=(qe=Ne[he.key])==null?void 0:qe.find(aa=>{var Ve,ye,pe,Sa,ya,vl,Nl;return((ye=(Ve=aa==null?void 0:aa.value)==null?void 0:Ve.pageData)==null?void 0:ye.name)===((ya=(Sa=(pe=he==null?void 0:he.value)==null?void 0:pe[0])==null?void 0:Sa.groups)==null?void 0:ya[0])&&((Nl=(vl=aa==null?void 0:aa.value)==null?void 0:vl.pageData)==null?void 0:Nl.name)!==void 0}),xe=Y==null?void 0:Y.id,me=(da=Y==null?void 0:Y.value)==null?void 0:da.pageData;me.compData=(Ke=me.compData)==null?void 0:Ke.map(aa=>{var Ve;return(aa==null?void 0:aa.key)==="formContent"&&(aa.contents=(Ve=aa.contents)==null?void 0:Ve.map(ye=>{var Sa;let pe=(Sa=he.value)==null?void 0:Sa.find(ya=>(ya==null?void 0:ya.key)===(ye==null?void 0:ye.prop));return pe&&(ye.value=pe.value),ye})),aa}),Pe.push({id:xe,value:{pageData:me}})})});let xa=(te=A.cloneDeep(de))==null?void 0:te[0];(Pe==null?void 0:Pe.length)>0&&await Mr.batchUpdateInsofDataApi({dataList:Pe})}m.setFreshContent(!0)}u.setImportLoading(!1)}catch{Ua.ElMessage.error("方法执行错误,请查看方法!"),u.setImportLoading(!1)}S.value=!0},se=["createInsofDataApi"],Be=Tl.debounce(async fe=>{J(fe)},100),$e=async fe=>{var je,la,Ta;const N=A.cloneDeep(fe);let oe,U=new WeakMap;fe!=null&&fe[0].path&&(oe=await(N==null?void 0:N.map(async(ee,ca)=>{var Ya,R,H,X,ve,de,va,na,Pe,xa,Me,ma,Oa,za,pa,Ca;const ta=(Ya=U[ee==null?void 0:ee.path])==null?void 0:Ya.filter(Ae=>{var he;return((he=Ae==null?void 0:Ae.key)==null?void 0:he.type)==="data"});let Se="";const te=await ce.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);ta==null||ta.forEach(Ae=>{var he,Y,xe,me,qe;((Y=(he=Ae==null?void 0:Ae.value)==null?void 0:he.tableData)==null?void 0:Y.算法名称)===((xe=N==null?void 0:N[ca])==null?void 0:xe.method)&&(Se=(qe=(me=Ae==null?void 0:Ae.value)==null?void 0:me.tableData)==null?void 0:qe.算法体)});const Ne=await ce.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);let We="",sa=(ve=(X=(H=(R=Ne==null?void 0:Ne[0])==null?void 0:R.compData)==null?void 0:H.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:X.contents)==null?void 0:ve.findIndex(Ae=>(Ae==null?void 0:Ae.prop)==="算法体");return(va=(de=Ne==null?void 0:Ne[0])==null?void 0:de.compData)==null||va.forEach(Ae=>{var he;(Ae==null?void 0:Ae.key)==="tableContents"&&((he=Ae==null?void 0:Ae.contents)==null||he.forEach(Y=>{Y!=null&&Y.find(xe=>xe===(ee==null?void 0:ee.method))&&(We=Y[sa])}))}),{buttonName:((na=N==null?void 0:N[ca])==null?void 0:na.method)||((Me=(xa=(Pe=ta==null?void 0:ta[0])==null?void 0:Pe.value)==null?void 0:xa.tableData)==null?void 0:Me.算法名称),api:(Se===""?(za=(Oa=(ma=ta==null?void 0:ta[0])==null?void 0:ma.value)==null?void 0:Oa.tableData)==null?void 0:za.算法体:Se)||We,content:te==null?void 0:te.filter(Ae=>Ae.comp!=="methodButton"),extraContent:(pa=A.cloneDeep(ee.value))==null?void 0:pa.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(Ca=N==null?void 0:N[ca])==null?void 0:Ca.data}})));const De=N==null?void 0:N.map(async ee=>{var Ne,We,sa,Ya,R,H;const ca=(Ne=resAll.data.result)==null?void 0:Ne.filter(X=>{var ve,de,va;return((ve=X==null?void 0:X.key)==null?void 0:ve.parentTable)===""&&((de=X==null?void 0:X.key)==null?void 0:de.type)==="method"&&((va=X==null?void 0:X.key)==null?void 0:va.methodName)===X.method}),ue=ca==null?void 0:ca[0],ta=(We=resAll.data.result)==null?void 0:We.filter(X=>{var ve,de;return((ve=X==null?void 0:X.key)==null?void 0:ve.type)==="methodData"&&((de=X==null?void 0:X.key)==null?void 0:de.tableId)===(ue==null?void 0:ue.id)}),Se=await ce.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U),te=ta==null?void 0:ta[0];return{buttonName:(sa=ue==null?void 0:ue.key)==null?void 0:sa.methodKey,api:(R=(Ya=te==null?void 0:te.value)==null?void 0:Ya.tableData)==null?void 0:R[0],content:Se==null?void 0:Se.filter(X=>X.comp!=="methodButton"),extraContent:(H=A.cloneDeep(ee.value))==null?void 0:H.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),Ie=(je=fe==null?void 0:fe[0])!=null&&je.path&&((la=fe==null?void 0:fe[0])==null?void 0:la.path)!==""?await Promise.all(oe):await Promise.all(De);l.value=Ie==null?void 0:Ie.filter(ee=>ee==null?void 0:ee.extraContent),(Ta=l.value)==null||Ta.forEach(ee=>{var ca;ee.api===""&&((ca=ee.content)==null||ca.forEach(ue=>{var ta;ue.comp=="Table"&&m.setExtraContents(ce.methodTableToContent(ue.compData,(ta=ee.extraContent)==null?void 0:ta[0]))}))})};return e.watch(()=>o.itemData,async()=>{k.value=="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{immediate:!0,deep:!0}),(fe,N)=>{var oe,U,De;return e.unref(k)!=="edit"?(e.openBlock(),e.createElementBlock("div",r4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=l.value)==null?void 0:oe.filter(Ie=>(Ie==null?void 0:Ie.buttonName)!=="保存"),Ie=>{var je;return e.openBlock(),e.createElementBlock("div",null,[Ie.api!==""?(e.openBlock(),e.createBlock(e.unref(rs._sfc_main),{key:0,disabled:e.unref(j)===e.unref(E)&&!((je=Ie==null?void 0:Ie.buttonName)!=null&&je.includes("预览")),class:"calculator-content",modelValue:Ie.buttonName,onClickTrigger:la=>e.unref(Be)(Ie),loading:b.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(W)!==""&&((De=e.unref(E))==null?void 0:De[((U=e.unref(E))==null?void 0:U.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(rs._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:0,fileDataList:h.value,onDestroy:V},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},i4=Xl._export_sfc(n4,[["__scopeId","data-v-063aa9af"]]),o4={};function t4(a,l){return" 567 "}const s4=Xl._export_sfc(o4,[["render",t4]]),c4={class:"module content"},u4={class:"module data"},d4={class:"module layout"},p4={class:"form-content"},f4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),d=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),m=e.ref({}),b=e.ref([]),u=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:b.value},{key:"signConfig",contents:m.value}]}),C=I=>{var j;m.value=A.cloneDeep(I),r("change",(j=u())==null?void 0:j.compData)},M=I=>{var j,L;if((I==null?void 0:I.buttonName)==="确认"){const E=A.cloneDeep(I==null?void 0:I.content);switch(s.value){case"create":b.value.push({...E,index:((j=b.value)==null?void 0:j.length)+1});break}r("change",(L=u())==null?void 0:L.compData),o.visible=!1}else o.visible=!1},k=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),s.value="create",o.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),s.value="update",o.visible=!0;break;case"delete":b.value.splice(j,1),s.value="delete";break}},W=()=>{o.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="signConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",c4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>k("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",u4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>k("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>k("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",d4,[e.createVNode(nl.ssForm,{rowContents:c.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:W,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",p4,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),h4=Xl._export_sfc(f4,[["__scopeId","data-v-487e0536"]]),v4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(0),s=e.computed(()=>{var u,C;return(u=n==null?void 0:n.stepConfig)!=null&&u.allowTrigger?o.value:(C=n==null?void 0:n.stepConfig)==null?void 0:C.active}),h=(u,C)=>{o.value=C-1,r("clickStep",u,C)};e.onMounted(()=>{var u;r("clickStep",(u=n==null?void 0:n.stepList)==null?void 0:u[0],0)});const c=u=>nl.getComponent(u),d=()=>{var C;const u=(C=n==null?void 0:n.stepList)==null?void 0:C.find((M,k)=>k+1===s.value);return console.log("findStep",u),u?u==null?void 0:u.children:[]},m=u=>{r("clickTrigger",u)},b=u=>{r("changeTrigger",u)};return(u,C)=>{var W,I,j,L,E;const M=e.resolveComponent("el-step"),k=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k,{direction:(W=a.stepConfig)==null?void 0:W.direction,active:s.value,"finish-status":"success",simple:(I=a.stepConfig)==null?void 0:I.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(x,w)=>(e.openBlock(),e.createBlock(M,{key:w,class:"step-item",onClick:g=>h(x,w+1)},{title:e.withCtx(()=>[e.renderSlot(u.$slots,"title",{title:x==null?void 0:x.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(u.$slots,"description",{descriptions:x==null?void 0:x.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(x==null?void 0:x.type)),{modelValue:x.value,"onUpdate:modelValue":g=>x.value=g,onClickTrigger:m,onChangeTrigger:b,content:x==null?void 0:x.content},e.createSlots({_:2},[e.renderList(u.$slots,(g,S)=>({name:S,fn:e.withCtx($=>[e.renderSlot(u.$slots,S,e.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),m4=Xl._export_sfc(v4,[["__scopeId","data-v-fdbd6832"]]),y4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,o=e.ref({}),s=e.ref([]),h=(c,d)=>{r("clickStep",c,d)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var u,C,M,k;o.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let d=((u=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="stepName"))==null?void 0:u.contents)??[],m=[];(M=(C=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:C.contents)==null||M.forEach(W=>{m.push({label:W==null?void 0:W.label,prop:W==null?void 0:W.prop,name:W==null?void 0:W.prop,type:"text",disabled:!0})});let b=((k=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:k.contents)??[];d=d==null?void 0:d.map((W,I)=>{let j=m==null?void 0:m.map(L=>{var E;return{...L,value:(E=b==null?void 0:b[I])==null?void 0:E[L==null?void 0:L.prop]}});return{title:W,description:j}}),s.value=d},{immediate:!0,deep:!0}),(c,d)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(m4,{stepConfig:o.value,stepList:s.value,onClickStep:h},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:b})=>[e.createTextVNode(e.toDisplayString(b),1)]),description:e.withCtx(({descriptions:b})=>[e.createVNode(nl.ssForm,{ref:"formRef",rowContents:b,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),g4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),o=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,h)=>(e.openBlock(),e.createBlock(r,{key:h,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),b4=Xl._export_sfc(g4,[["__scopeId","data-v-4172a886"]]),k4={class:"line-content"},x4={class:"line-time"},w4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,o=>{var s,h;r.value=(s=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:s.contents,n.value=(h=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:h.contents},{immediate:!0}),(o,s)=>(e.openBlock(),e.createBlock(b4,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:h,timestamp:c})=>[e.createElementVNode("span",k4,e.toDisplayString(h),1),e.createElementVNode("span",x4,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),_4=Xl._export_sfc(w4,[["__scopeId","data-v-b4d9deed"]]),S4={class:"tabs-content"},E4=e.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(a,{emit:l}){const n=a,r=l,o=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const s=C=>{r("change",C)},h=(C,M)=>{r("contentChange",C,M)},c=C=>{r("pageChange",C)},d=C=>{r("rowClick",C)},m=(C,M)=>{r("routeUrl",C,M)},b=C=>{r("clickTrigger",C)},u=(C,M)=>{r("clickMainKey",C,M)};return(C,M)=>{var k,W;return e.openBlock(),e.createElementBlock("div",S4,[(k=o.value)!=null&&k.length?(e.openBlock(),e.createBlock(nl.ssTab,{tabsContents:o.value,key:(W=o.value)==null?void 0:W.length},{pane:e.withCtx(({tab:I,index:j})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)(I==null?void 0:I.comp)),{related:I==null?void 0:I.relatedTables,compNames:n==null?void 0:n.compNames,compName:I==null?void 0:I.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,onChange:s,index:(I==null?void 0:I.id)??j,config:{showIndex:I==null?void 0:I.showIndex,allowMove:I==null?void 0:I.allowMove,viewport:I==null?void 0:I.viewport,status:I==null?void 0:I.status},onContentChange:h,onPageChange:c,onRowClick:d,onRouteUrl:m,parentTableId:I==null?void 0:I.tableId,allMapContents:a.allMapContents,children:I==null?void 0:I.children,level:1,onClickTrigger:b,onClickMainKey:u},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),C4=Xl._export_sfc(E4,[["__scopeId","data-v-1ea318b4"]]),D4={class:"type-select"},B4=["onClick"],T4={class:"list-icon"},N4={__name:"modelSelect",setup(a){const l=Hn(A.pinia),{itemData:n}=A.storeToRefs(l),r=o=>{const s=A.cloneDeep(n.value);s.push({comp:o.comp,name:o.name,compData:[]}),l.setItemData(s)};return(o,s)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",D4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(nu),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:d},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",T4,[e.createVNode(h,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,B4)]))),128))])}}},A4=Xl._export_sfc(N4,[["__scopeId","data-v-91799bf8"]]),z4={class:"fill-content"},M4={class:"operate-content"},I4={class:"collapse-title-content"},O4={class:"collapse-title-item"},L4={key:1},R4=["onClick"],$4={class:"icon-content"},V4={key:0,class:"edit-content"},P4=["onClick"],F4={class:"comp-child"},j4={__name:"modelFill",setup(a){const l=Hn(A.pinia),{itemData:n,originalData:r}=A.storeToRefs(l),o=e.ref([]);e.ref([]);const s=e.ref([]),h=e.ref([]),c=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!0),I));h.value=k},d=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!1),I));h.value=k,o.value=A.cloneDeep(n.value)},m=(M,k)=>{var L;let W=(L=A.cloneDeep(h.value))==null?void 0:L.map((E,x)=>(M===x&&(E.content=!1),E));h.value=W;const I=A.cloneDeep(n.value),j=I==null?void 0:I.filter((E,x)=>(x===M&&(E.name=k),E));l.setOriginalData(j),l.setItemData(j)};e.watch(()=>n.value,()=>{var M,k,W;!n.value||((M=n.value)==null?void 0:M.length)===0?o.value=[]:o.value=(k=A.cloneDeep(n.value))==null?void 0:k.filter(I=>(I==null?void 0:I.comp)!=="methodButton"),s.value=o.value,h.value=(W=A.cloneDeep(s.value))==null?void 0:W.map((I,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const b=M=>Ti(M),u=(M,k,W)=>{var j,L;if(!M)return;let I=A.cloneDeep(n.value);I=(j=I==null?void 0:I.map((E,x)=>(x===W&&(E.compData=M),E)))==null?void 0:j.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),h.value=(L=A.cloneDeep(I))==null?void 0:L.map((E,x)=>({id:x,content:!1})),l.setOriginalData(I),l.setItemData(I)},C=M=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const k=A.cloneDeep(n.value),W=k==null?void 0:k.filter((I,j)=>j!==M);l.setOriginalData(W),l.setItemData(W),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(M,k)=>{const W=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",z4,[k[1]||(k[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",M4,[e.createVNode(Js.default,{class:"collapse-content",collapseContents:o.value},{title:e.withCtx(({item:I,index:j})=>{var L,E,x,w,g,S,$,V,ae,Z;return[e.createElementVNode("div",I4,[e.createElementVNode("div",O4,[(E=(L=h.value)==null?void 0:L.find(ge=>ge.id===j))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:I.name&&I.name!==""?"8px":"0px"})},e.toDisplayString(I.name),5)),(w=(x=h.value)==null?void 0:x.find(ge=>ge.id===j))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",L4,[e.createVNode(nl.ssInput,{modelValue:I.name,"onUpdate:modelValue":ge=>I.name=ge,onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(g=h.value)==null?void 0:g.find(ge=>ge.id===j))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ge=>c(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Edit",style:{width:"16px",height:"16px"}})],8,R4))]),e.createElementVNode("div",$4,[(V=($=h.value)==null?void 0:$.find(ge=>ge.id===j))!=null&&V.content?(e.openBlock(),e.createElementBlock("div",V4,[e.createVNode(W,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ge=>d(j),["stop"])},null,8,["onClick"]),e.createVNode(W,{name:"Save",onClick:e.withModifiers(ge=>m(j,I.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Z=(ae=h.value)==null?void 0:ae.find(ge=>ge.id===j))!=null&&Z.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ge=>C(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Delete",style:{width:"16px",height:"16px"}})],8,P4))])])]}),content:e.withCtx(({item:I,index:j})=>{var L,E;return[e.createElementVNode("div",F4,[e.createTextVNode(e.toDisplayString(b(I.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:(E=(L=s.value)==null?void 0:L.find((x,w)=>w===j))==null?void 0:E.compData,onChange:x=>u(x,I,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},H4=Xl._export_sfc(j4,[["__scopeId","data-v-a46a44b9"]]),U4={key:0,class:"show-content"},q4={style:{display:"flex"}},W4={__name:"modelShow",setup(a){const l=Hn(A.pinia),{itemData:n}=A.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var s;!n.value||((s=n.value)==null?void 0:s.length)===0?r.value=[]:r.value=A.cloneDeep(n.value)},{deep:!0,immediate:!0});const o=s=>Ti(s);return(s,h)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",U4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",q4,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},K4=Xl._export_sfc(W4,[["__scopeId","data-v-3f3e863e"]]),G4={class:"tabs-header"},Y4={class:"tabs-list"},J4={class:"tab-name"},X4={class:"tab-actions"},Z4=["onClick"],Q4=["onClick"],e6=["onClick"],a6={class:"model-operate"},l6={class:"model-select",style:{display:"unset"}},r6={class:"existing-components"},n6={class:"component-list"},i6=["onClick"],o6={class:"component-info"},t6={class:"component-type"},s6={class:"component-name"},c6={class:"model-fill"},u6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(""),c=e.ref({title:""}),d=e.ref(-1),m=e.ref(!1),b=e.ref(-1),u=e.ref(new WeakMap),C=e.ref(null),M=Hn(A.pinia),{itemData:k}=A.storeToRefs(M),W=()=>{h.value="新增标签页",c.value.title="",d.value=-1,s.value=!0},I=fe=>{h.value="修改标签页",c.value.title=o.value[fe].title,d.value=fe,s.value=!0},j=fe=>{const N=x(fe);u.value.delete(N),o.value.splice(fe,1),$e()},L=()=>{if(c.value.title.trim()){if(d.value===-1){const fe={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};o.value.push(fe)}else o.value[d.value].title=c.value.title,o.value[d.value].value=c.value.title,o.value[d.value].label=c.value.title;s.value=!1,$e()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,x=fe=>{const N=o.value[fe];return N.id||(N.id=E()),N.id},w=fe=>{var U;b.value=fe;const N=x(fe);C.value=A.cloneDeep(k.value);let oe=u.value.get(N);!oe&&((U=o.value[fe].children)==null?void 0:U.length)>0&&(oe=V(o.value[fe].children)),oe?M.setItemData(A.cloneDeep(oe)):M.setItemData([]),m.value=!0},g=e.computed(()=>{const fe=A.useModelComp(A.pinia),N=A.storeToRefs(fe).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(oe=>{var U;if(oe.comp==="Tabs"&&b.value>=0){const De=x(b.value);if((U=oe.compData)==null?void 0:U.some(je=>{var la;return je.key==="stepList"&&((la=je.contents)==null?void 0:la.some(Ta=>Ta.id===De))}))return!1}return!0})}),S=fe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[fe]||fe,$=fe=>{var N;try{const oe=A.cloneDeep(fe);oe.id=Date.now()+Math.random(),oe.comp==="Tabs"&&((N=oe.compData)==null||N.forEach(De=>{De.key==="stepList"&&De.contents&&De.contents.forEach(Ie=>{Ie.id=E()})}));const U=A.cloneDeep(k.value);U.push(oe),M.setItemData(U)}catch(oe){console.error("添加组件失败:",oe)}},V=fe=>fe.map(N=>{var oe;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:ae(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:Z(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((oe=N.content)==null?void 0:oe.originalData)||[]}}}),ae=fe=>{if(!fe)return[];const N=[];return fe.rowContents&&N.push({key:"formContent",contents:fe.rowContents}),fe.buttonValue&&N.push({key:"formButton",contents:fe.buttonValue}),typeof fe.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:fe.isEnableWrap}),N},Z=fe=>[],ge=()=>{if(b.value>=0&&b.value<o.value.length){const fe=x(b.value);u.value.set(fe,A.cloneDeep(k.value)),o.value[b.value].children=ne(k.value),console.log("保存后的数据",ne(k.value))}m.value=!1,b.value=-1,C.value=null,$e()},ze=()=>{C.value&&M.setItemData(A.cloneDeep(C.value)),m.value=!1,b.value=-1,C.value=null},F=()=>{m.value&&ze()},ne=fe=>{if(!Array.isArray(fe))throw new Error("sourceData must be an array");return fe.map((N,oe)=>{if(!N||typeof N!="object")return N;const{comp:U,name:De,compData:Ie}=N;switch(U){case"Form":return{type:"form",content:J(Ie||[]),value:"表单"};case"Table":return{type:"table",content:se(Ie||[]),value:"表格"};default:return{type:"xxx",content:Be(Ie||[]),value:""}}})},J=fe=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},oe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return fe.forEach((U,De)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${De}:`,U);return}const{key:Ie,contents:je}=U,la=oe[Ie];if(!la){console.warn(`Unknown Form config key: ${Ie}`);return}Ie==="enableWrap"?N[la]=!!je:N[la]=Array.isArray(je)?je:[]}),N},se=fe=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},oe={header:"columns",tableContents:"tableData"};return fe.forEach((U,De)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${De}:`,U);return}const{key:Ie,contents:je}=U,la=oe[Ie];if(!la){console.warn(`Unknown Table config key: ${Ie}`);return}N[la]=Array.isArray(je)?je:[]}),N},Be=fe=>(console.log("Default conversion logic - to be implemented"),{originalData:fe,processed:!1,componentType:"unknown"}),$e=()=>{const fe=[{key:"stepList",contents:o.value}];r("change",fe)};return e.watch(()=>n.itemContents,fe=>{if(fe&&fe.length>0){const N=fe.find(oe=>oe.key==="stepList");N&&N.contents&&(o.value=N.contents.map(oe=>({title:oe.title||"",value:oe.value||oe.title||"",label:oe.label||oe.title||"",children:oe.children||[],id:oe.id||E()})))}},{immediate:!0,deep:!0}),(fe,N)=>{const oe=e.resolveComponent("svg-icon"),U=e.resolveComponent("el-input"),De=e.resolveComponent("el-form-item"),Ie=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",G4,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:W},[e.createVNode(oe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",Y4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(je,la)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:la},[e.createElementVNode("span",J4,e.toDisplayString(je.title),1),e.createElementVNode("div",X4,[e.createElementVNode("button",{onClick:Ta=>I(la)},"修改标题",8,Z4),e.createElementVNode("button",{onClick:Ta=>w(la)},"布局调整",8,Q4),e.createElementVNode("button",{onClick:Ta=>j(la)},"删除",8,e6)])]))),128))]),e.createVNode(Br.ssDialog,{modelValue:s.value,"onUpdate:modelValue":N[2]||(N[2]=je=>s.value=je),title:h.value,onBeforeDestroy:N[3]||(N[3]=je=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=je=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Ie,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(De,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:c.value.title,"onUpdate:modelValue":N[0]||(N[0]=je=>c.value.title=je),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Br.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=je=>m.value=je),title:"布局调整",fullScreen:"",onBeforeDestroy:F},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:ze},"取消"),e.createElementVNode("button",{onClick:ge},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",a6,[e.createElementVNode("div",l6,[e.createVNode(A4),e.createElementVNode("div",r6,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",n6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,je=>(e.openBlock(),e.createElementBlock("div",{key:je.id,class:"component-item",onClick:la=>$(je)},[e.createElementVNode("div",o6,[e.createElementVNode("span",t6,e.toDisplayString(S(je.comp)),1),e.createElementVNode("span",s6,e.toDisplayString(je.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,i6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:fe.innerWidth},[e.createVNode(K4)])),e.createElementVNode("div",c6,[e.createVNode(H4)])])]),_:1},8,["modelValue"])])}}},d6=Xl._export_sfc(u6,[["__scopeId","data-v-9096ed0d"]]);function p6(){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 f6(a){return{type:"line",...a}}function h6(){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:[]},yAxis:[{type:"value"}],series:[]}}function v6(a){return{type:"bar",barWidth:"60%",...a}}function m6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function y6(a){return{type:"pie",radius:"80%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const g6=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),b6=a=>({type:"scatter",symbolSize:20,...a}),wn={Line:{initBaseoptions:p6,initSeries:f6},Bar:{initBaseoptions:h6,initSeries:v6},Pie:{initBaseoptions:m6,initSeries:y6},Scatter:{initBaseoptions:g6,initSeries:b6}},k6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},x6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},w6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(M=>M==null?void 0:M.prop);let b=[];if(m==null||m.forEach(M=>{var k;b.push((k=n==null?void 0:n[0])==null?void 0:k[M])}),!m||!b)return d;const u=[];for(let M=0;M<m.length;M++){const k=m[M],W=b[M];u.push({name:k,value:W})}const C=c({data:u});return d.series.push(C),d},_6=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";let m=[];const b=l==null?void 0:l.map(M=>M==null?void 0:M.prop);if(m=b==null?void 0:b.map(M=>{var W;let k=[];return k.push(M),k.push((W=n==null?void 0:n[0])==null?void 0:W[M]),k}),!m)return d;const C=c({data:m});return d.series.push(C),d},S6=async(a=[])=>{var h,c,d;const l=((h=a==null?void 0:a.find(m=>m.key==="ChartType"))==null?void 0:h.contents)??{},n=((c=a==null?void 0:a.find(m=>m.key==="header"))==null?void 0:c.contents)??[],r=((d=a==null?void 0:a.find(m=>m.key==="tableContents"))==null?void 0:d.contents)??[];let{type:o}=l,s={};return o==="Line"&&(s=await k6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Bar"&&(s=await x6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Pie"&&(s=await w6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Scatter"&&(s=await _6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),s},E6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,n=e.ref({});e.onMounted(async()=>{const o=l==null?void 0:l.itemData;n.value=await S6(o)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Mu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),C6=Xl._export_sfc(E6,[["__scopeId","data-v-d4c081e8"]]),D6={class:"chart-module layout"},B6={class:"chart-module content"},T6={class:"chart-module content"},N6={class:"form-content"},A6={class:"dialog-footer"},z6={class:"form-content"},M6={class:"dialog-footer"},I6={class:"form-content"},O6={class:"dialog-footer"},L6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),h=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],c=e.ref({}),d=()=>{var Se;s.value=h(),(Se=s.value)==null||Se.forEach(te=>{var We;const Ne=te==null?void 0:te.prop;te.value=(We=c==null?void 0:c.value)==null?void 0:We[Ne]}),o.visible=!0},m=Se=>{c.value=Se},b=()=>{var Se;o.visible=!1,r("change",(Se=ue())==null?void 0:Se.compData)},u=e.reactive({visible:!1,width:"840",title:"数据配置"}),C=e.ref([]),M=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),W=()=>{const Se=C.value,te=A.cloneDeep(Se);return te==null||te.forEach(Ne=>{var sa;const We=Ne==null?void 0:Ne.prop;Ne.value=(sa=k.value)==null?void 0:sa[We]}),te},I=Se=>{var Ne;k.value=Se;const te=W();C.value=te,r("change",(Ne=ue())==null?void 0:Ne.compData)},j=async()=>{const Se=await ce.getMenusContent(),te=W();te==null||te.forEach(Ne=>{(Ne==null?void 0:Ne.prop)==="menu"&&(Ne.contents=Se)}),C.value=te,u.visible=!0,await je(k.value.menu),await ee(k.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),E=e.ref([]),x=()=>[{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:[]}],w=e.ref({}),g=()=>{const Se=E.value,te=A.cloneDeep(Se);return te==null||te.forEach(Ne=>{var sa;const We=Ne==null?void 0:Ne.prop;Ne.value=(sa=w.value)==null?void 0:sa[We]}),te},S=Se=>{var Ne;w.value=Se;const te=g();E.value=te,r("change",(Ne=ue())==null?void 0:Ne.compData)},$=async()=>{await F();const Se=A.cloneDeep(V.value),te=g();te==null||te.forEach(Ne=>{var sa;const We=Ne==null?void 0:Ne.prop;Ne.value=(sa=w==null?void 0:w.value)==null?void 0:sa[We],We==="mainKey"&&(Ne.contents=Se)}),E.value=te,L.visible=!0},V=e.ref([]),ae=e.ref([]),Z=e.ref({}),ge=e.ref({}),ze=()=>{const{compData:Se}=U.value||{},te=Se==null?void 0:Se.find(X=>{const{key:ve}=X;return ve==="header"}),Ne=(te==null?void 0:te.contents)||[],We=Ne==null?void 0:Ne.filter((X,ve)=>{const{label:de}=X;return de!=="操作"}),sa=We==null?void 0:We.findIndex((X,ve)=>{const{isMainKey:de}=X;return de});if(sa<0)return[];const Ya=Se==null?void 0:Se.find(X=>{const{key:ve}=X;return ve==="tableContents"}),R=(Ya==null?void 0:Ya.contents)||[];return R==null?void 0:R.map(X=>{const ve=X==null?void 0:X[0];let de=sa;Ua.isObject(ve)&&(ve!=null&&ve.id)&&(de=de+1);const va=X==null?void 0:X[de];return{label:va,value:va}})},F=async()=>{const Se=await ze();V.value=Se},ne=async Se=>{const te=sessionStorage.getItem("systemKey");return await ce.getItemData(Se,te,"")},J=async Se=>{const te=Se;ae.value=te==null?void 0:te.map(Ne=>{const{name:We}=Ne;return Z.value[We]=Ne,{label:We,value:We}})},se=Se=>{const{comp:te,compData:Ne}=ge.value||{};if(te==="Table"){let We=g();We=We.filter(sa=>{const{prop:Ya}=sa;return Ya!=="formItems"}),la(We,Ne),E.value=We}},Be=async()=>{var Ne,We;const Se=(Ne=w==null?void 0:w.value)==null?void 0:Ne.mainKey,te=(We=k==null?void 0:k.value)==null?void 0:We.menu;if(Se){const Ya=`${te==null?void 0:te.join("/")}^${Se}`,R=await ne(Ya);await J(R);const H=g();H==null||H.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=ae.value)}),E.value=H}};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.mainKey},async(Se,te)=>{Se!=te&&Se&&await Be()});const $e=async Se=>{const te=Z.value[Se];ge.value=te,await se()};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.group},async(Se,te)=>{Se!=te&&Se&&$e(Se)});const fe=async()=>{var te;await Be();const Se=(te=w.value)==null?void 0:te.group;await $e(Se)},N=e.ref([]),oe=e.ref({}),U=e.ref({}),De=async Se=>{const te=Se==null?void 0:Se.join("/"),Ne=sessionStorage.getItem("systemKey");return await ce.getItemData(te,Ne,"")},Ie=async Se=>{const te=await De(Se);N.value=te==null?void 0:te.map(Ne=>{const{name:We}=Ne;return oe.value[We]=Ne,{label:We,value:We}})},je=async(Se,te)=>{await Ie(Se);const Ne=W();Ne==null||Ne.forEach(We=>{(We==null?void 0:We.prop)==="group"&&(We.contents=N.value)}),C.value=Ne};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.menu},async(Se,te)=>{const Ne=Se==null?void 0:Se.join("/"),We=te==null?void 0:te.join("/");Ne!=We&&await je(Se)});const la=(Se,te)=>{const Ne=te==null?void 0:te.find(R=>{const{key:H}=R;return H==="header"}),We=(Ne==null?void 0:Ne.contents)||[],sa=We==null?void 0:We.filter((R,H)=>{const{label:X}=R;return X!=="操作"}),Ya=sa==null?void 0:sa.map((R,H)=>{const{label:X}=R;return{label:X,value:H}});Se==null||Se.forEach(R=>{const H=R==null?void 0:R.prop;(H==="nameCol"||H==="valueCol")&&(R.contents=Ya)})},Ta=Se=>{const{comp:te,compData:Ne}=U.value||{};if(te==="Table"){k.value.formItems=[];let We=W();We=We.filter(sa=>{const{prop:Ya}=sa;return Ya!=="formItems"}),la(We,Ne),C.value=We}},ee=async Se=>{const te=oe.value[Se];U.value=te,await Ta()};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.group},async(Se,te)=>{Se!=te&&ee(Se)});const ca=async()=>{var Ne,We;const Se=(Ne=k.value)==null?void 0:Ne.menu;await je(Se);const te=(We=k.value)==null?void 0:We.group;await ee(te)},ue=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:k.value},{key:"chartDetailConfig",contents:w.value}]}),ta=()=>{o.visible=!1,u.visible=!1,L.visible=!1};return e.onMounted(async()=>{var te,Ne,We;C.value=M(),E.value=x();const Se=n==null?void 0:n.itemContents;c.value=((te=Se==null?void 0:Se.find(sa=>sa.key==="chartBaseConfig"))==null?void 0:te.contents)??{},k.value=((Ne=Se==null?void 0:Se.find(sa=>sa.key==="chartDataConfig"))==null?void 0:Ne.contents)??{},await ca(),w.value=((We=Se==null?void 0:Se.find(sa=>sa.key==="chartDetailConfig"))==null?void 0:We.contents)??{},await fe()}),(Se,te)=>{const Ne=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",D6,[te[4]||(te[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Ne,{id:"themeButton",onClick:te[0]||(te[0]=We=>d())},{default:e.withCtx(()=>te[3]||(te[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",B6,[te[6]||(te[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Ne,{id:"themeButton",onClick:te[1]||(te[1]=We=>j())},{default:e.withCtx(()=>te[5]||(te[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",T6,[te[8]||(te[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Ne,{id:"themeButton",onClick:te[2]||(te[2]=We=>$())},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:ta,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",N6,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",A6,[e.createVNode(Ne,{class:"cancel-button button",onClick:ta,id:"themeBorderButton"},{default:e.withCtx(()=>te[9]||(te[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Ne,{class:"ok-button button",onClick:b,id:"themeButton"},{default:e.withCtx(()=>te[10]||(te[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:ta,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(Ne,{class:"cancel-button button",onClick:ta,id:"themeBorderButton"},{default:e.withCtx(()=>te[11]||(te[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Ne,{class:"ok-button button",onClick:ta,id:"themeButton"},{default:e.withCtx(()=>te[12]||(te[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:ta,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(Ne,{class:"cancel-button button",onClick:ta,id:"themeBorderButton"},{default:e.withCtx(()=>te[13]||(te[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Ne,{class:"ok-button button",onClick:ta,id:"themeButton"},{default:e.withCtx(()=>te[14]||(te[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),R6=Xl._export_sfc(L6,[["__scopeId","data-v-fe119645"]]),$6={class:"layout"},V6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const o=e.computed(()=>A.cloneDeep(r==null?void 0:r.itemData)||[]),s=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="baseConfig"});return m==null?void 0:m.contents}),h=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=A.cloneDeep(h.value)||[];const b=m.length;let u=0;const C=[];if(m=m.map(M=>{const k=M.span;return k?(M.span=Number(k),u=u+M.span):C.push(M),M}),u<24){const M=Math.floor((24-u)/b);C.forEach(k=>{k.span=M})}return m}),d=m=>{n("rowClick",m)};return(m,b)=>{var M;const u=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",$6,[e.createVNode(C,{style:e.normalizeStyle({height:(M=s.value)==null?void 0:M.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(k,W)=>(e.openBlock(),e.createBlock(u,{span:k==null?void 0:k.span},{default:e.withCtx(()=>{var I;return[e.unref(Bi)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)(k.comp)),{key:e.unref(jn),compName:k.name,index:(k==null?void 0:k.id)??W,height:(I=s.value)==null?void 0:I.height,itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,onChange:e.unref(To),onContentChange:e.unref(No),onPageChange:e.unref(Ao),onRowClick:d},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),P6=Xl._export_sfc(V6,[["__scopeId","data-v-ab9a36ed"]]),F6={class:"layout-operate"},j6={class:"layout-module"},H6={class:"collapse-title-item"},U6={class:"collapse-title"},q6={class:"icon-content"},W6=["onClick"],K6={class:"comp-child"},G6=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{W()});const o=e.ref({}),s=e.ref({}),h=e.ref([]),c=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],d=w=>{s.value=w,r("change",x(),!0)},m=e.ref([]),b=e.ref([]),u=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],C=e.computed(()=>{const w=n==null?void 0:n.itemContents;return A.cloneDeep(w)}),M=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="baseConfig"});return g==null?void 0:g.contents}),k=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="children"});return g==null?void 0:g.contents}),W=()=>{var w;o.value=C.value||{},m.value=(k==null?void 0:k.value)||[],h.value=c(),h.value=(w=h.value)==null?void 0:w.map(g=>{var $;const{prop:S}=g;return g.value=($=M.value)==null?void 0:$[S],g})};e.watch(()=>{var w;return(w=k==null?void 0:k.value)==null?void 0:w.length},()=>{var w;m.value=(k==null?void 0:k.value)||[],b.value=(w=k.value)==null?void 0:w.map(g=>u(g))},{immediate:!0});const I=(w,g)=>{const S=A.cloneDeep(k==null?void 0:k.value);S[g].span=w.span,m.value=S,r("change",x(),!0)},j=w=>Ti(w),L=(w,g,S)=>{if(!w)return;const $=A.cloneDeep(k==null?void 0:k.value);$[S]&&($[S].compData=w,m.value=$,r("change",x(),!0))},E=w=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let g=A.cloneDeep(k==null?void 0:k.value);g=g==null?void 0:g.filter((S,$)=>w!==$),m.value=g,r("change",x(),!0),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,g)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",F6,[e.createElementVNode("div",j6,[g[1]||(g[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(nl.ssForm,{rowContents:h.value,isEnableWrap:!0,onChange:g[0]||(g[0]=$=>d($))},null,8,["rowContents"])])]),e.createVNode(Js.default,{class:"collapse-content",collapseContents:k.value},{title:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",H6,[e.createElementVNode("div",U6,e.toDisplayString($.name),1),e.createElementVNode("div",q6,[e.createElementVNode("div",{onClick:e.withModifiers(ae=>E(V),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,W6)])])]),content:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",K6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:b.value[V],key:V,isEnableWrap:!0,onChange:ae=>I(ae,V)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:ae=>L(ae,$,V)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Y6=Xl._export_sfc(G6,[["__scopeId","data-v-ba05456e"]]),J6=typeof window<"u";var _s;J6&&((_s=window==null?void 0:window.navigator)!=null&&_s.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function yn(a){return a==null}function $c(){}const X6=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(X6)));function Z6(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(o=>{o(...n)})}}}function Ss(a,l=16){if(typeof a!="function")return $c;const n=(...s)=>{a(...s)};if(l<=0)return Vc(n);let r=0,o;return function(...s){const h=Date.now(),c=h-r;clearTimeout(o),c>=l?(r=h,n(...s)):o=setTimeout(()=>{r=Date.now(),n(...s)},Math.max(0,l-c))}}function Q6(a,l=100){if(typeof a!="function")return $c;const n=(...o)=>{a(...o)};if(l<=0)return Vc(n);let r;return function(...o){clearTimeout(r),r=setTimeout(()=>{n(...o)},l)}}function Vc(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...o){return n=o,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Ui=new Set,Pc=new WeakMap;function e1(){Ui.forEach(a=>{a(...Pc.get(a))}),Ui.clear()}function rn(a,...l){if(typeof a!="function")return a;Pc.set(a,l),!Ui.has(a)&&(Ui.add(a),Ui.size===1&&Promise.resolve().then(e1))}const Fc=Symbol("LAYOUT_KEY"),jc=Symbol("EMITTER_KEY");function a1(a){let l=0,n;for(let r=0,o=a.length;r<o;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function _t(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=l1(a[n]);return l}function l1(a){return{...a}}function Hc(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function _i(a,l,n){const r=qc(a),o=Wc(a),s=Array(a.length);for(let h=0,c=o.length;h<c;h++){let d=o[h];d.static||(d=r1(r,d,l,n),r.push(d)),s[a.findIndex(m=>m.i===d.i)]=d,d.moved=!1}return s}function r1(a,l,n,r){if(n)for(;l.y>0&&!qi(a,l);)l.y--;else if(r){const s=r[l.i].y;for(;l.y>s&&!qi(a,l);)l.y--}let o;for(;o=qi(a,l);)l.y=o.y+o.h;return l}function n1(a,l){const n=qc(a);for(let r=0,o=a.length;r<o;r++){const s=a[r];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)n.push(s);else for(;qi(n,s);)s.y++}return a}function Es(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function qi(a,l){for(let n=0,r=a.length;n<r;n++)if(Hc(a[n],l))return a[n]}function Uc(a,l){return a.filter(n=>Hc(n,l))}function qc(a){return a.filter(l=>l.static)}function St(a,l,n,r,o=!1,s=!1){if(l.static)return a;const h=l.x,c=l.y,d=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=Wc(a);d&&(m=m.reverse());const b=Uc(m,l);if(s&&b.length)return l.x=h,l.y=c,l.moved=!1,a;for(let u=0,C=b.length;u<C;u++){const M=b[u];M.moved||l.y>M.y&&l.y-M.y>M.h/4||(M.static?a=Cs(a,M,l,o):a=Cs(a,l,M,o))}return a}function Cs(a,l,n,r){if(r){const o={x:n.x,y:n.y,w:n.w,h:n.h};if(o.y=Math.max(l.y-n.h,0),!qi(a,o))return St(a,n,void 0,o.y,!1)}return St(a,n,void 0,n.y+1,!1)}function i1(a,l,n,r){const o="translate3d("+l+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function o1(a,l,n,r){const o="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function s1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function c1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function Wc(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function u1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let o=0,s=a.length;o<s;o++){const h=a[o];for(let c=0;c<n.length;c++)if(typeof h[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+o+"]."+n[c]+" must be a number!");if(h.i===void 0||h.i===null)throw new Error("VueGridLayout: "+l+"["+o+"].i cannot be null!");if(typeof h.i!="number"&&typeof h.i!="string")throw new Error("VueGridLayout: "+l+"["+o+"].i must be a string or number!");if(r.indexOf(h.i)>=0)throw new Error("VueGridLayout: "+l+"["+o+"].i must be unique!");if(r.push(h.i),h.static!==void 0&&typeof h.static!="boolean")throw new Error("VueGridLayout: "+l+"["+o+"].static must be a boolean!")}}function d1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,o)=>`${n()}__${r}--${o}`}}function Ds(a){return p1(a)}function p1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),o=a.clientX+n.scrollLeft-r.left,s=a.clientY+n.scrollTop-r.top;return{x:o,y:s}}function Bs(a,l,n,r){return f1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function f1(a){return typeof a=="number"&&!Number.isNaN(a)}function h1(a,l){const n=Gc(a);let r=n[0];for(let o=1,s=n.length;o<s;o++){const h=n[o];l>a[h]&&(r=h)}return r}function Kc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function v1(a,l,n,r,o,s,h){if(l[r])return _t(l[r]);let c=a;const d=Gc(n),m=d.slice(d.indexOf(r));for(let b=0,u=m.length;b<u;b++){const C=m[b];if(l[C]){c=l[C];break}}return c=_t(c||[]),_i(n1(c,{cols:s}),h)}function Gc(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let m1="auto";function y1(){return typeof document<"u"}function Ts(){return y1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):m1}var ji={exports:{}},g1=ji.exports,Ns;function b1(){return Ns||(Ns=1,function(a,l){(function(n,r){a.exports=r()})(g1,function(){function n(t,i){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);i&&(y=y.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),f.push.apply(f,y)}return f}function r(t){for(var i=1;i<arguments.length;i++){var f=arguments[i]!=null?arguments[i]:{};i%2?n(Object(f),!0).forEach(function(y){d(t,y,f[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(f,y))})}return t}function o(t){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},o(t)}function s(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function h(t,i){for(var f=0;f<i.length;f++){var y=i[f];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,W(y.key),y)}}function c(t,i,f){return i&&h(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,i,f){return(i=W(i))in t?Object.defineProperty(t,i,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[i]=f,t}function m(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&u(t,i)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},b(t)}function u(t,i){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,y){return f.__proto__=y,f},u(t,i)}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){var i=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 f,y=b(t);if(i){var _=b(this).constructor;f=Reflect.construct(y,arguments,_)}else f=y.apply(this,arguments);return function(O,K){if(K&&(typeof K=="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(O)}(this,f)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,i,f){var y=function(O,K){for(;!Object.prototype.hasOwnProperty.call(O,K)&&(O=b(O))!==null;);return O}(t,i);if(y){var _=Object.getOwnPropertyDescriptor(y,i);return _.get?_.get.call(arguments.length<3?t:f):_.value}},k.apply(this,arguments)}function W(t){var i=function(f,y){if(typeof f!="object"||f===null)return f;var _=f[Symbol.toPrimitive];if(_!==void 0){var O=_.call(f,y);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof i=="symbol"?i:i+""}var I=function(t){return!(!t||!t.Window)&&t instanceof t.Window},j=void 0,L=void 0;function E(t){j=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(i)===i&&(t=t.wrap(t)),L=t}function x(t){return I(t)?t:(t.ownerDocument||t).defaultView||L.window}typeof window<"u"&&window&&E(window);var w=function(t){return!!t&&o(t)==="object"},g=function(t){return typeof t=="function"},S={window:function(t){return t===L||I(t)},docFrag:function(t){return w(t)&&t.nodeType===11},object:w,func:g,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||o(t)!=="object")return!1;var i=x(t)||L;return/object|function/.test(typeof Element>"u"?"undefined":o(Element))?t instanceof Element||t instanceof i.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return w(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return w(t)&&t.length!==void 0&&g(t.splice)}};function $(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.prepared.axis;f==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):f==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function V(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var y=f.prepared.axis;if(y==="x"||y==="y"){var _=y==="x"?"y":"x";i.page[_]=f.coords.start.page[_],i.client[_]=f.coords.start.client[_],i.delta[_]=0}}}var ae={id:"actions/drag",install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.draggable=ae.draggable,i.map.drag=ae,i.methodDict.drag="draggable",y.actions.drag=ae.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":V,"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.buttons,_=f.options.drag;if(_&&_.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(y&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(t){return S.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):S.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:$,move:V,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},Z=ae,ge={init:function(t){var i=t;ge.document=i.document,ge.DocumentFragment=i.DocumentFragment||ze,ge.SVGElement=i.SVGElement||ze,ge.SVGSVGElement=i.SVGSVGElement||ze,ge.SVGElementInstance=i.SVGElementInstance||ze,ge.Element=i.Element||ze,ge.HTMLElement=i.HTMLElement||ge.Element,ge.Event=i.Event,ge.Touch=i.Touch||ze,ge.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ze(){}var F=ge,ne={init:function(t){var i=F.Element,f=t.navigator||{};ne.supportsTouch="ontouchstart"in t||S.func(t.DocumentTouch)&&F.document instanceof t.DocumentTouch,ne.supportsPointerEvent=f.pointerEnabled!==!1&&!!F.PointerEvent,ne.isIOS=/iP(hone|od|ad)/.test(f.platform),ne.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),ne.isIe9=/MSIE 9/.test(f.userAgent),ne.isOperaMobile=f.appName==="Opera"&&ne.supportsTouch&&/Presto/.test(f.userAgent),ne.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",ne.pEventTypes=ne.supportsPointerEvent?F.PointerEvent===t.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,ne.wheelEvent=F.document&&"onmousewheel"in F.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},J=ne;function se(t,i){if(t.contains)return t.contains(i);for(;i;){if(i===t)return!0;i=i.parentNode}return!1}function Be(t,i){for(;S.element(t);){if(fe(t,i))return t;t=$e(t)}return null}function $e(t){var i=t.parentNode;if(S.docFrag(i)){for(;(i=i.host)&&S.docFrag(i););return i}return i}function fe(t,i){return L!==j&&(i=i.replace(/\/deep\//g," ")),t[J.prefixedMatchesSelector](i)}var N=function(t){return t.parentNode||t.host};function oe(t,i){for(var f,y=[],_=t;(f=N(_))&&_!==i&&f!==_.ownerDocument;)y.unshift(_),_=f;return y}function U(t,i,f){for(;S.element(t);){if(fe(t,i))return!0;if((t=$e(t))===f)return fe(t,i)}return!1}function De(t){return t.correspondingUseElement||t}function Ie(t){var i=t instanceof F.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function je(t){var i,f=Ie(t);if(!J.isIOS7&&f){var y={x:(i=(i=x(t))||L).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};f.left+=y.x,f.right+=y.x,f.top+=y.y,f.bottom+=y.y}return f}function la(t){for(var i=[];t;)i.push(t),t=$e(t);return i}function Ta(t){return!!S.string(t)&&(F.document.querySelector(t),!0)}function ee(t,i){for(var f in i)t[f]=i[f];return t}function ca(t,i,f){return t==="parent"?$e(f):t==="self"?i.getRect(f):Be(f,t)}function ue(t,i,f,y){var _=t;return S.string(_)?_=ca(_,i,f):S.func(_)&&(_=_.apply(void 0,y)),S.element(_)&&(_=je(_)),_}function ta(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Se(t){return!t||"x"in t&&"y"in t||((t=ee({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function te(t,i,f){t.left&&(i.left+=f.x),t.right&&(i.right+=f.x),t.top&&(i.top+=f.y),t.bottom&&(i.bottom+=f.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Ne(t,i,f){var y=f&&t.options[f];return ta(ue(y&&y.origin||t.options.origin,t,i,[t&&i]))||{x:0,y:0}}function We(t,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ke){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},S.string(t)&&t.search(" ")!==-1&&(t=sa(t)),S.array(t))return t.forEach(function(ke){return We(ke,i,f,y)}),y;if(S.object(t)&&(i=t,t=""),S.func(i)&&f(t))y[t]=y[t]||[],y[t].push(i);else if(S.array(i))for(var _=0,O=i;_<O.length;_++){var K=O[_];We(t,K,f,y)}else if(S.object(i))for(var Q in i)We(sa(Q).map(function(ke){return"".concat(t).concat(ke)}),i[Q],f,y);return y}function sa(t){return t.trim().split(/ +/)}var Ya=function(t,i){return Math.sqrt(t*t+i*i)},R=["webkit","moz"];function H(t,i){t.__set||(t.__set={});var f=function(_){if(R.some(function(O){return _.indexOf(O)===0}))return 1;typeof t[_]!="function"&&_!=="__set"&&Object.defineProperty(t,_,{get:function(){return _ in t.__set?t.__set[_]:t.__set[_]=i[_]},set:function(O){t.__set[_]=O},configurable:!0})};for(var y in i)f(y);return t}function X(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp}function ve(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function de(t){return t instanceof F.Event||t instanceof F.Touch}function va(t,i,f){return t=t||"page",(f=f||{}).x=i[t+"X"],f.y=i[t+"Y"],f}function na(t,i){return i=i||{x:0,y:0},J.isOperaMobile&&de(t)?(va("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):va("page",t,i),i}function Pe(t){return S.number(t.pointerId)?t.pointerId:t.identifier}function xa(t,i,f){var y=i.length>1?ma(i):i[0];na(y,t.page),function(_,O){O=O||{},J.isOperaMobile&&de(_)?va("screen",_,O):va("client",_,O)}(y,t.client),t.timeStamp=f}function Me(t){var i=[];return S.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ma(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var y=t[f];for(var _ in i)i[_]+=y[_]}for(var O in i)i[O]/=t.length;return i}function Oa(t){if(!t.length)return null;var i=Me(t),f=Math.min(i[0].pageX,i[1].pageX),y=Math.min(i[0].pageY,i[1].pageY),_=Math.max(i[0].pageX,i[1].pageX),O=Math.max(i[0].pageY,i[1].pageY);return{x:f,y,left:f,top:y,right:_,bottom:O,width:_-f,height:O-y}}function za(t,i){var f=i+"X",y=i+"Y",_=Me(t),O=_[0][f]-_[1][f],K=_[0][y]-_[1][y];return Ya(O,K)}function pa(t,i){var f=i+"X",y=i+"Y",_=Me(t),O=_[1][f]-_[0][f],K=_[1][y]-_[0][y];return 180*Math.atan2(K,O)/Math.PI}function Ca(t){return S.string(t.pointerType)?t.pointerType:S.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof F.Touch?"touch":"mouse"}function Ae(t){var i=S.func(t.composedPath)?t.composedPath():t.path;return[De(i?i[0]:t.target),De(t.currentTarget)]}var he=function(){function t(i){s(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return c(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(he.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Y=function(t,i){for(var f=0;f<i.length;f++){var y=i[f];t.push(y)}return t},xe=function(t){return Y([],t)},me=function(t,i){for(var f=0;f<t.length;f++)if(i(t[f],f,t))return f;return-1},qe=function(t,i){return t[me(t,i)]},da=function(t){m(f,t);var i=M(f);function f(y,_,O){var K;s(this,f),(K=i.call(this,_._interaction)).dropzone=void 0,K.dragEvent=void 0,K.relatedTarget=void 0,K.draggable=void 0,K.propagationStopped=!1,K.immediatePropagationStopped=!1;var Q=O==="dragleave"?y.prev:y.cur,ke=Q.element,He=Q.dropzone;return K.type=O,K.target=ke,K.currentTarget=ke,K.dropzone=He,K.dragEvent=_,K.relatedTarget=_.target,K.draggable=_.interactable,K.timeStamp=_.timeStamp,K}return c(f,[{key:"reject",value:function(){var y=this,_=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&_.cur.dropzone===this.dropzone&&_.cur.element===this.target)if(_.prev.dropzone=this.dropzone,_.prev.element=this.target,_.rejected=!0,_.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var O=_.activeDrops,K=me(O,function(ke){var He=ke.dropzone,Ce=ke.element;return He===y.dropzone&&Ce===y.target});_.activeDrops.splice(K,1);var Q=new f(_,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new f(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(he);function Ke(t,i){for(var f=0,y=t.slice();f<y.length;f++){var _=y[f],O=_.dropzone,K=_.element;i.dropzone=O,i.target=K,O.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function aa(t,i){for(var f=function(O,K){for(var Q=[],ke=0,He=O.interactables.list;ke<He.length;ke++){var Ce=He[ke];if(Ce.options.drop.enabled){var ra=Ce.options.drop.accept;if(!(S.element(ra)&&ra!==K||S.string(ra)&&!fe(K,ra)||S.func(ra)&&!ra({dropzone:Ce,draggableElement:K})))for(var Ba=0,Xa=Ce.getAllElements();Ba<Xa.length;Ba++){var Wa=Xa[Ba];Wa!==K&&Q.push({dropzone:Ce,element:Wa,rect:Ce.getRect(Wa)})}}}return Q}(t,i),y=0;y<f.length;y++){var _=f[y];_.rect=_.dropzone.getRect(_.element)}return f}function Ve(t,i,f){for(var y=t.dropState,_=t.interactable,O=t.element,K=[],Q=0,ke=y.activeDrops;Q<ke.length;Q++){var He=ke[Q],Ce=He.dropzone,ra=He.element,Ba=He.rect,Xa=Ce.dropCheck(i,f,_,O,ra,Ba);K.push(Xa?ra:null)}var Wa=function(el){for(var _l,bl,Cl,Ul=[],Dl=0;Dl<el.length;Dl++){var Ol=el[Dl],Il=el[_l];if(Ol&&Dl!==_l)if(Il){var Xr=N(Ol),ir=N(Il);if(Xr!==Ol.ownerDocument)if(ir!==Ol.ownerDocument)if(Xr!==ir){Ul=Ul.length?Ul:oe(Il);var ln=void 0;if(Il instanceof F.HTMLElement&&Ol instanceof F.SVGElement&&!(Ol instanceof F.SVGSVGElement)){if(Ol===ir)continue;ln=Ol.ownerSVGElement}else ln=Ol;for(var hn=oe(ln,Il.ownerDocument),En=0;hn[En]&&hn[En]===Ul[En];)En++;var hi=[hn[En-1],hn[En],Ul[En]];if(hi[0])for(var Qn=hi[0].lastChild;Qn;){if(Qn===hi[1]){_l=Dl,Ul=hn;break}if(Qn===hi[2])break;Qn=Qn.previousSibling}}else Cl=Il,(parseInt(x(bl=Ol).getComputedStyle(bl).zIndex,10)||0)>=(parseInt(x(Cl).getComputedStyle(Cl).zIndex,10)||0)&&(_l=Dl);else _l=Dl}else _l=Dl}return _l}(K);return y.activeDrops[Wa]||null}function ye(t,i,f){var y=t.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(_.activate=new da(y,f,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),f.type==="dragend"&&(_.deactivate=new da(y,f,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(_.leave=new da(y,f,"dragleave"),f.dragLeave=_.leave.target=y.prev.element,f.prevDropzone=_.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(_.enter=new da(y,f,"dragenter"),f.dragEnter=y.cur.element,f.dropzone=y.cur.dropzone)),f.type==="dragend"&&y.cur.dropzone&&(_.drop=new da(y,f,"drop"),f.dropzone=y.cur.dropzone,f.relatedTarget=y.cur.element),f.type==="dragmove"&&y.cur.dropzone&&(_.move=new da(y,f,"dropmove"),f.dropzone=y.cur.dropzone)),_}function pe(t,i){var f=t.dropState,y=f.activeDrops,_=f.cur,O=f.prev;i.leave&&O.dropzone.fire(i.leave),i.enter&&_.dropzone.fire(i.enter),i.move&&_.dropzone.fire(i.move),i.drop&&_.dropzone.fire(i.drop),i.deactivate&&Ke(y,i.deactivate),f.prev.dropzone=_.dropzone,f.prev.element=_.element}function Sa(t,i){var f=t.interaction,y=t.iEvent,_=t.event;if(y.type==="dragmove"||y.type==="dragend"){var O=f.dropState;i.dynamicDrop&&(O.activeDrops=aa(i,f.element));var K=y,Q=Ve(f,K,_);O.rejected=O.rejected&&!!Q&&Q.dropzone===O.cur.dropzone&&Q.element===O.cur.element,O.cur.dropzone=Q&&Q.dropzone,O.cur.element=Q&&Q.element,O.events=ye(f,0,K)}}var ya={id:"actions/drop",install:function(t){var i=t.actions,f=t.interactStatic,y=t.Interactable,_=t.defaults;t.usePlugin(Z),y.prototype.dropzone=function(O){return function(K,Q){if(S.object(Q)){if(K.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ke=We(Q.listeners),He=Object.keys(ke).reduce(function(ra,Ba){return ra[/^(enter|leave)/.test(Ba)?"drag".concat(Ba):/^(activate|deactivate|move)/.test(Ba)?"drop".concat(Ba):Ba]=ke[Ba],ra},{}),Ce=K.options.drop.listeners;Ce&&K.off(Ce),K.on(He),K.options.drop.listeners=He}return S.func(Q.ondrop)&&K.on("drop",Q.ondrop),S.func(Q.ondropactivate)&&K.on("dropactivate",Q.ondropactivate),S.func(Q.ondropdeactivate)&&K.on("dropdeactivate",Q.ondropdeactivate),S.func(Q.ondragenter)&&K.on("dragenter",Q.ondragenter),S.func(Q.ondragleave)&&K.on("dragleave",Q.ondragleave),S.func(Q.ondropmove)&&K.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?K.options.drop.overlap=Q.overlap:S.number(Q.overlap)&&(K.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(K.options.drop.accept=Q.accept),"checker"in Q&&(K.options.drop.checker=Q.checker),K}return S.bool(Q)?(K.options.drop.enabled=Q,K):K.options.drop}(this,O)},y.prototype.dropCheck=function(O,K,Q,ke,He,Ce){return function(ra,Ba,Xa,Wa,el,_l,bl){var Cl=!1;if(!(bl=bl||ra.getRect(_l)))return!!ra.options.drop.checker&&ra.options.drop.checker(Ba,Xa,Cl,ra,_l,Wa,el);var Ul=ra.options.drop.overlap;if(Ul==="pointer"){var Dl=Ne(Wa,el,"drag"),Ol=na(Ba);Ol.x+=Dl.x,Ol.y+=Dl.y;var Il=Ol.x>bl.left&&Ol.x<bl.right,Xr=Ol.y>bl.top&&Ol.y<bl.bottom;Cl=Il&&Xr}var ir=Wa.getRect(el);if(ir&&Ul==="center"){var ln=ir.left+ir.width/2,hn=ir.top+ir.height/2;Cl=ln>=bl.left&&ln<=bl.right&&hn>=bl.top&&hn<=bl.bottom}return ir&&S.number(Ul)&&(Cl=Math.max(0,Math.min(bl.right,ir.right)-Math.max(bl.left,ir.left))*Math.max(0,Math.min(bl.bottom,ir.bottom)-Math.max(bl.top,ir.top))/(ir.width*ir.height)>=Ul),ra.options.drop.checker&&(Cl=ra.options.drop.checker(Ba,Xa,Cl,ra,_l,Wa,el)),Cl}(this,O,K,Q,ke,He,Ce)},f.dynamicDrop=function(O){return S.bool(O)?(t.dynamicDrop=O,f):t.dynamicDrop},ee(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",t.dynamicDrop=!1,_.actions.drop=ya.defaults},listeners:{"interactions:before-action-start":function(t){var i=t.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,i){var f=t.interaction,y=(t.event,t.iEvent);if(f.prepared.name==="drag"){var _=f.dropState;_.activeDrops=[],_.events={},_.activeDrops=aa(i,f.element),_.events=ye(f,0,y),_.events.activate&&(Ke(_.activeDrops,_.events.activate),i.fire("actions/drop:start",{interaction:f,dragEvent:y}))}},"interactions:action-move":Sa,"interactions:after-action-move":function(t,i){var f=t.interaction,y=t.iEvent;if(f.prepared.name==="drag"){var _=f.dropState;pe(f,_.events),i.fire("actions/drop:move",{interaction:f,dragEvent:y}),_.events={}}},"interactions:action-end":function(t,i){if(t.interaction.prepared.name==="drag"){var f=t.interaction,y=t.iEvent;Sa(t,i),pe(f,f.dropState.events),i.fire("actions/drop:end",{interaction:f,dragEvent:y})}},"interactions:stop":function(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:aa,getDrop:Ve,getDropEvents:ye,fireDropEvents:pe,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},vl=ya;function Nl(t){var i=t.interaction,f=t.iEvent,y=t.phase;if(i.prepared.name==="gesture"){var _=i.pointers.map(function(He){return He.pointer}),O=y==="start",K=y==="end",Q=i.interactable.options.deltaSource;if(f.touches=[_[0],_[1]],O)f.distance=za(_,Q),f.box=Oa(_),f.scale=1,f.ds=0,f.angle=pa(_,Q),f.da=0,i.gesture.startDistance=f.distance,i.gesture.startAngle=f.angle;else if(K||i.pointers.length<2){var ke=i.prevEvent;f.distance=ke.distance,f.box=ke.box,f.scale=ke.scale,f.ds=0,f.angle=ke.angle,f.da=0}else f.distance=za(_,Q),f.box=Oa(_),f.scale=f.distance/i.gesture.startDistance,f.angle=pa(_,Q),f.ds=f.scale-i.gesture.scale,f.da=f.angle-i.gesture.angle;i.gesture.distance=f.distance,i.gesture.angle=f.angle,S.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(i.gesture.scale=f.scale)}}var pl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.gesturable=function(_){return S.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):S.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},i.map.gesture=pl,i.methodDict.gesture="gesturable",y.actions.gesture=pl.defaults},listeners:{"interactions:action-start":Nl,"interactions:action-move":Nl,"interactions:action-end":Nl,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var i=t.interactable.options.gesture;if(i&&i.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Fl=pl;function ja(t,i,f,y,_,O,K){if(!i)return!1;if(i===!0){var Q=S.number(O.width)?O.width:O.right-O.left,ke=S.number(O.height)?O.height:O.bottom-O.top;if(K=Math.min(K,Math.abs((t==="left"||t==="right"?Q:ke)/2)),Q<0&&(t==="left"?t="right":t==="right"&&(t="left")),ke<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var He=Q>=0?O.left:O.right;return f.x<He+K}if(t==="top"){var Ce=ke>=0?O.top:O.bottom;return f.y<Ce+K}if(t==="right")return f.x>(Q>=0?O.right:O.left)-K;if(t==="bottom")return f.y>(ke>=0?O.bottom:O.top)-K}return!!S.element(y)&&(S.element(i)?i===y:U(y,i,_))}function jl(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var y=i;f.interactable.options.resize.square?(f.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=f.resizeAxes,f.resizeAxes==="x"?y.delta.y=0:f.resizeAxes==="y"&&(y.delta.x=0))}}var Rl,Da,al={id:"actions/resize",before:["actions/drag"],install:function(t){var i=t.actions,f=t.browser,y=t.Interactable,_=t.defaults;al.cursors=function(O){return O.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"}}(f),al.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,y.prototype.resizable=function(O){return function(K,Q,ke){return S.object(Q)?(K.options.resize.enabled=Q.enabled!==!1,K.setPerAction("resize",Q),K.setOnEvents("resize",Q),S.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?K.options.resize.axis=Q.axis:Q.axis===null&&(K.options.resize.axis=ke.defaults.actions.resize.axis),S.bool(Q.preserveAspectRatio)?K.options.resize.preserveAspectRatio=Q.preserveAspectRatio:S.bool(Q.square)&&(K.options.resize.square=Q.square),K):S.bool(Q)?(K.options.resize.enabled=Q,K):K.options.resize}(this,O,t)},i.map.resize=al,i.methodDict.resize="resizable",_.actions.resize=al.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.rect;y._rects={start:ee({},O),corrected:ee({},O),previous:ee({},O),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=y.prepared.edges,_.rect=y._rects.corrected,_.deltaRect=y._rects.delta}})(t),jl(t)},"interactions:action-move":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.interactable.options.resize.invert,K=O==="reposition"||O==="negate",Q=y.rect,ke=y._rects,He=ke.start,Ce=ke.corrected,ra=ke.delta,Ba=ke.previous;if(ee(Ba,Ce),K){if(ee(Ce,Q),O==="reposition"){if(Ce.top>Ce.bottom){var Xa=Ce.top;Ce.top=Ce.bottom,Ce.bottom=Xa}if(Ce.left>Ce.right){var Wa=Ce.left;Ce.left=Ce.right,Ce.right=Wa}}}else Ce.top=Math.min(Q.top,He.bottom),Ce.bottom=Math.max(Q.bottom,He.top),Ce.left=Math.min(Q.left,He.right),Ce.right=Math.max(Q.right,He.left);for(var el in Ce.width=Ce.right-Ce.left,Ce.height=Ce.bottom-Ce.top,Ce)ra[el]=Ce[el]-Ba[el];_.edges=y.prepared.edges,_.rect=Ce,_.deltaRect=ra}})(t),jl(t)},"interactions:action-end":function(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var y=i;y.edges=f.prepared.edges,y.rect=f._rects.corrected,y.deltaRect=f._rects.delta}},"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.element,_=t.rect,O=t.buttons;if(_){var K=ee({},i.coords.cur.page),Q=f.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(O&Q.mouseButtons)!=0)){if(S.object(Q.edges)){var ke={left:!1,right:!1,top:!1,bottom:!1};for(var He in ke)ke[He]=ja(He,Q.edges[He],K,i._latestPointer.eventTarget,y,_,Q.margin||al.defaultMargin);ke.left=ke.left&&!ke.right,ke.top=ke.top&&!ke.bottom,(ke.left||ke.right||ke.top||ke.bottom)&&(t.action={name:"resize",edges:ke})}else{var Ce=Q.axis!=="y"&&K.x>_.right-al.defaultMargin,ra=Q.axis!=="x"&&K.y>_.bottom-al.defaultMargin;(Ce||ra)&&(t.action={name:"resize",axes:(Ce?"x":"")+(ra?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var i=t.edges,f=t.axis,y=t.name,_=al.cursors,O=null;if(f)O=_[y+f];else if(i){for(var K="",Q=0,ke=["top","bottom","left","right"];Q<ke.length;Q++){var He=ke[Q];i[He]&&(K+=He)}O=_[K]}return O},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},dl=al,ol={id:"actions",install:function(t){t.usePlugin(Fl),t.usePlugin(dl),t.usePlugin(Z),t.usePlugin(vl)}},$a=0,tl={request:function(t){return Rl(t)},cancel:function(t){return Da(t)},init:function(t){if(Rl=t.requestAnimationFrame,Da=t.cancelAnimationFrame,!Rl)for(var i=["ms","moz","webkit","o"],f=0;f<i.length;f++){var y=i[f];Rl=t["".concat(y,"RequestAnimationFrame")],Da=t["".concat(y,"CancelAnimationFrame")]||t["".concat(y,"CancelRequestAnimationFrame")]}Rl=Rl&&Rl.bind(t),Da=Da&&Da.bind(t),Rl||(Rl=function(_){var O=Date.now(),K=Math.max(0,16-(O-$a)),Q=t.setTimeout(function(){_(O+K)},K);return $a=O+K,Q},Da=function(_){return clearTimeout(_)})}},ll={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(t){ll.isScrolling=!0,tl.cancel(ll.i),t.autoScroll=ll,ll.interaction=t,ll.prevTime=ll.now(),ll.i=tl.request(ll.scroll)},stop:function(){ll.isScrolling=!1,ll.interaction&&(ll.interaction.autoScroll=null),tl.cancel(ll.i)},scroll:function(){var t=ll.interaction,i=t.interactable,f=t.element,y=t.prepared.name,_=i.options[y].autoScroll,O=Te(_.container,i,f),K=ll.now(),Q=(K-ll.prevTime)/1e3,ke=_.speed*Q;if(ke>=1){var He={x:ll.x*ke,y:ll.y*ke};if(He.x||He.y){var Ce=Ma(O);S.window(O)?O.scrollBy(He.x,He.y):O&&(O.scrollLeft+=He.x,O.scrollTop+=He.y);var ra=Ma(O),Ba={x:ra.x-Ce.x,y:ra.y-Ce.y};(Ba.x||Ba.y)&&i.fire({type:"autoscroll",target:f,interactable:i,delta:Ba,interaction:t,container:O})}ll.prevTime=K}ll.isScrolling&&(tl.cancel(ll.i),ll.i=tl.request(ll.scroll))},check:function(t,i){var f;return(f=t.options[i].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var i=t.interaction,f=t.pointer;if(i.interacting()&&ll.check(i.interactable,i.prepared.name))if(i.simulation)ll.x=ll.y=0;else{var y,_,O,K,Q=i.interactable,ke=i.element,He=i.prepared.name,Ce=Q.options[He].autoScroll,ra=Te(Ce.container,Q,ke);if(S.window(ra))K=f.clientX<ll.margin,y=f.clientY<ll.margin,_=f.clientX>ra.innerWidth-ll.margin,O=f.clientY>ra.innerHeight-ll.margin;else{var Ba=Ie(ra);K=f.clientX<Ba.left+ll.margin,y=f.clientY<Ba.top+ll.margin,_=f.clientX>Ba.right-ll.margin,O=f.clientY>Ba.bottom-ll.margin}ll.x=_?1:K?-1:0,ll.y=O?1:y?-1:0,ll.isScrolling||(ll.margin=Ce.margin,ll.speed=Ce.speed,ll.start(i))}}};function Te(t,i,f){return(S.string(t)?ca(t,i,f):t)||x(f)}function Ma(t){return S.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Je={id:"auto-scroll",install:function(t){var i=t.defaults,f=t.actions;t.autoScroll=ll,ll.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=ll.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,ll.stop(),ll.interaction&&(ll.interaction=null)},"interactions:stop":ll.stop,"interactions:action-move":function(t){return ll.onInteractionMove(t)}}},ie=Je;function Xe(t,i){var f=!1;return function(){return f||(L.console.warn(i),f=!0),t.apply(this,arguments)}}function Aa(t,i){return t.name=i.name,t.axis=i.axis,t.edges=i.edges,t}function Ze(t){return S.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function ka(t){return S.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Va={id:"auto-start/interactableMethods",install:function(t){var i=t.Interactable;i.prototype.getAction=function(f,y,_,O){var K=function(Q,ke,He,Ce,ra){var Ba=Q.getRect(Ce),Xa=ke.buttons||{0:1,1:4,3:8,4:16}[ke.button],Wa={action:null,interactable:Q,interaction:He,element:Ce,rect:Ba,buttons:Xa};return ra.fire("auto-start:check",Wa),Wa.action}(this,y,_,O,t);return this.options.actionChecker?this.options.actionChecker(f,y,K,this,O,_):K},i.prototype.ignoreFrom=Xe(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=Xe(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=ka,i.prototype.styleCursor=Ze}};function Ja(t,i,f,y,_){return i.testIgnoreAllow(i.options[t.name],f,y)&&i.options[t.name].enabled&&il(i,f,t,_)?t:null}function Ue(t,i,f,y,_,O,K){for(var Q=0,ke=y.length;Q<ke;Q++){var He=y[Q],Ce=_[Q],ra=He.getAction(i,f,t,Ce);if(ra){var Ba=Ja(ra,He,Ce,O,K);if(Ba)return{action:Ba,interactable:He,element:Ce}}}return{action:null,interactable:null,element:null}}function fa(t,i,f,y,_){var O=[],K=[],Q=y;function ke(Ce){O.push(Ce),K.push(Q)}for(;S.element(Q);){O=[],K=[],_.interactables.forEachMatch(Q,ke);var He=Ue(t,i,f,O,K,y,_);if(He.action&&!He.interactable.options[He.action.name].manualStart)return He;Q=$e(Q)}return{action:null,interactable:null,element:null}}function oa(t,i,f){var y=i.action,_=i.interactable,O=i.element;y=y||{name:null},t.interactable=_,t.element=O,Aa(t.prepared,y),t.rect=_&&y.name?_.getRect(O):null,sl(t,f),f.fire("autoStart:prepared",{interaction:t})}function il(t,i,f,y){var _=t.options,O=_[f.name].max,K=_[f.name].maxPerElement,Q=y.autoStart.maxInteractions,ke=0,He=0,Ce=0;if(!(O&&K&&Q))return!1;for(var ra=0,Ba=y.interactions.list;ra<Ba.length;ra++){var Xa=Ba[ra],Wa=Xa.prepared.name;if(Xa.interacting()&&(++ke>=Q||Xa.interactable===t&&((He+=Wa===f.name?1:0)>=O||Xa.element===i&&(Ce++,Wa===f.name&&Ce>=K))))return!1}return Q>0}function Le(t,i){return S.number(t)?(i.autoStart.maxInteractions=t,this):i.autoStart.maxInteractions}function Pa(t,i,f){var y=f.autoStart.cursorElement;y&&y!==t&&(y.style.cursor=""),t.ownerDocument.documentElement.style.cursor=i,t.style.cursor=i,f.autoStart.cursorElement=i?t:null}function sl(t,i){var f=t.interactable,y=t.element,_=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var O="";if(_.name){var K=f.options[_.name].cursorChecker;O=S.func(K)?K(_,f,y,t._interacting):i.actions.map[_.name].getCursor(_)}Pa(t.element,O||"",i)}else i.autoStart.cursorElement&&Pa(i.autoStart.cursorElement,"",i)}var fr={id:"auto-start/base",before:["actions"],install:function(t){var i=t.interactStatic,f=t.defaults;t.usePlugin(Va),f.base.actionChecker=null,f.base.styleCursor=!0,ee(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(y){return Le(y,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:il,cursorElement:null}},listeners:{"interactions:down":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;f.interacting()||oa(f,fa(f,y,_,O,i),i)},"interactions:move":function(t,i){(function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||oa(_,fa(_,O,K,Q,y),y)})(t,i),function(f,y){var _=f.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){y.fire("autoStart:before-start",f);var O=_.interactable,K=_.prepared.name;K&&O&&(O.options[K].manualStart||!il(O,_.element,_.prepared,y)?_.stop():(_.start(_.prepared,O,_.element),sl(_,y)))}}(t,i)},"interactions:stop":function(t,i){var f=t.interaction,y=f.interactable;y&&y.options.styleCursor&&Pa(f.element,"",i)}},maxInteractions:Le,withinInteractionLimit:il,validateAction:Ja},ur=fr,Zl={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,i){var f=t.interaction,y=t.eventTarget,_=t.dx,O=t.dy;if(f.prepared.name==="drag"){var K=Math.abs(_),Q=Math.abs(O),ke=f.interactable.options.drag,He=ke.startAxis,Ce=K>Q?"x":K<Q?"y":"xy";if(f.prepared.axis=ke.lockAxis==="start"?Ce[0]:ke.lockAxis,Ce!=="xy"&&He!=="xy"&&He!==Ce){f.prepared.name=null;for(var ra=y,Ba=function(Wa){if(Wa!==f.interactable){var el=f.interactable.options.drag;if(!el.manualStart&&Wa.testIgnoreAllow(el,ra,y)){var _l=Wa.getAction(f.downPointer,f.downEvent,f,ra);if(_l&&_l.name==="drag"&&function(bl,Cl){if(!Cl)return!1;var Ul=Cl.options.drag.startAxis;return bl==="xy"||Ul==="xy"||Ul===bl}(Ce,Wa)&&ur.validateAction(_l,Wa,ra,y,i))return Wa}}};S.element(ra);){var Xa=i.interactables.forEachMatch(ra,Ba);if(Xa){f.prepared.name="drag",f.interactable=Xa,f.element=ra;break}ra=$e(ra)}}}}}};function rr(t){var i=t.prepared&&t.prepared.name;if(!i)return null;var f=t.interactable.options;return f[i].hold||f[i].delay}var dr={id:"auto-start/hold",install:function(t){var i=t.defaults;t.usePlugin(ur),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var i=t.interaction,f=rr(i);f>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},f))},"interactions:move":function(t){var i=t.interaction,f=t.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!f&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var i=t.interaction;rr(i)>0&&(i.prepared.name=null)}},getHoldDuration:rr},yr=dr,Oe={id:"auto-start",install:function(t){t.usePlugin(ur),t.usePlugin(yr),t.usePlugin(Zl)}},Ql=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):S.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function _r(t){var i=t.interaction,f=t.event;i.interactable&&i.interactable.checkAndPreventDefault(f)}var Nr={id:"core/interactablePreventDefault",install:function(t){var i=t.Interactable;i.prototype.preventDefault=Ql,i.prototype.checkAndPreventDefault=function(f){return function(y,_,O){var K=y.options.preventDefault;if(K!=="never")if(K!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(O.type)){var Q=x(O.target).document,ke=_.getDocOptions(Q);if(!ke||!ke.events||ke.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(O.type)||S.element(O.target)&&fe(O.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||O.preventDefault()}else O.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var y=0,_=t.interactions.list;y<_.length;y++){var O=_[y];if(O.element&&(O.element===f.target||se(O.element,f.target)))return void O.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,i){return t["interactions:".concat(i)]=_r,t},{})};function Al(t,i){if(i.phaselessTypes[t])return!0;for(var f in i.map)if(t.indexOf(f)===0&&t.substr(f.length)in i.phases)return!0;return!1}function Tr(t){var i={};for(var f in t){var y=t[f];S.plainObject(y)?i[f]=Tr(y):S.array(y)?i[f]=xe(y):i[f]=y}return i}var Pr=function(){function t(i){s(this,t),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=i,this.result=Wl(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(t,[{key:"start",value:function(i,f){var y,_,O=i.phase,K=this.interaction,Q=function(He){var Ce=He.interactable.options[He.prepared.name],ra=Ce.modifiers;return ra&&ra.length?ra:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ba){var Xa=Ce[Ba];return Xa&&Xa.enabled&&{options:Xa,methods:Xa._methods}}).filter(function(Ba){return!!Ba})}(K);this.prepareStates(Q),this.startEdges=ee({},K.edges),this.edges=ee({},this.startEdges),this.startOffset=(y=K.rect,_=f,y?{left:_.x-y.left,top:_.y-y.top,right:y.right-_.x,bottom:y.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ke=this.fillArg({phase:O,pageCoords:f,preEnd:!1});return this.result=Wl(),this.startAll(ke),this.result=this.setAll(ke)}},{key:"fillArg",value:function(i){var f=this.interaction;return i.interaction=f,i.interactable=f.interactable,i.element=f.element,i.rect||(i.rect=f.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var f=0,y=this.states;f<y.length;f++){var _=y[f];_.methods.start&&(i.state=_,_.methods.start(i))}}},{key:"setAll",value:function(i){var f=i.phase,y=i.preEnd,_=i.skipModifiers,O=i.rect,K=i.edges;i.coords=ee({},i.pageCoords),i.rect=ee({},O),i.edges=ee({},K);for(var Q=_?this.states.slice(_):this.states,ke=Wl(i.coords,i.rect),He=0;He<Q.length;He++){var Ce,ra=Q[He],Ba=ra.options,Xa=ee({},i.coords),Wa=null;(Ce=ra.methods)!=null&&Ce.set&&this.shouldDo(Ba,y,f)&&(i.state=ra,Wa=ra.methods.set(i),te(i.edges,i.rect,{x:i.coords.x-Xa.x,y:i.coords.y-Xa.y})),ke.eventProps.push(Wa)}ee(this.edges,i.edges),ke.delta.x=i.coords.x-i.pageCoords.x,ke.delta.y=i.coords.y-i.pageCoords.y,ke.rectDelta.left=i.rect.left-O.left,ke.rectDelta.right=i.rect.right-O.right,ke.rectDelta.top=i.rect.top-O.top,ke.rectDelta.bottom=i.rect.bottom-O.bottom;var el=this.result.coords,_l=this.result.rect;if(el&&_l){var bl=ke.rect.left!==_l.left||ke.rect.right!==_l.right||ke.rect.top!==_l.top||ke.rect.bottom!==_l.bottom;ke.changed=bl||el.x!==ke.coords.x||el.y!==ke.coords.y}return ke}},{key:"applyToInteraction",value:function(i){var f=this.interaction,y=i.phase,_=f.coords.cur,O=f.coords.start,K=this.result,Q=this.startDelta,ke=K.delta;y==="start"&&ee(this.startDelta,K.delta);for(var He=0,Ce=[[O,Q],[_,ke]];He<Ce.length;He++){var ra=Ce[He],Ba=ra[0],Xa=ra[1];Ba.page.x+=Xa.x,Ba.page.y+=Xa.y,Ba.client.x+=Xa.x,Ba.client.y+=Xa.y}var Wa=this.result.rectDelta,el=i.rect||f.rect;el.left+=Wa.left,el.right+=Wa.right,el.top+=Wa.top,el.bottom+=Wa.bottom,el.width=el.right-el.left,el.height=el.bottom-el.top}},{key:"setAndApply",value:function(i){var f=this.interaction,y=i.phase,_=i.preEnd,O=i.skipModifiers,K=this.setAll(this.fillArg({preEnd:_,phase:y,pageCoords:i.modifiedCoords||f.coords.cur.page}));if(this.result=K,!K.changed&&(!O||O<this.states.length)&&f.interacting())return!1;if(i.modifiedCoords){var Q=f.coords.cur.page,ke={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};K.coords.x+=ke.x,K.coords.y+=ke.y,K.delta.x+=ke.x,K.delta.y+=ke.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var f=i.interaction,y=i.event,_=this.states;if(_&&_.length){for(var O=!1,K=0;K<_.length;K++){var Q=_[K];i.state=Q;var ke=Q.options,He=Q.methods,Ce=He.beforeEnd&&He.beforeEnd(i);if(Ce)return this.endResult=Ce,!1;O=O||!O&&this.shouldDo(ke,!0,i.phase,!0)}O&&f.move({event:y,preEnd:!0})}}},{key:"stop",value:function(i){var f=i.interaction;if(this.states&&this.states.length){var y=ee({states:this.states,interactable:f.interactable,element:f.element,rect:null},i);this.fillArg(y);for(var _=0,O=this.states;_<O.length;_++){var K=O[_];y.state=K,K.methods.stop&&K.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var f=0;f<i.length;f++){var y=i[f],_=y.options,O=y.methods,K=y.name;this.states.push({options:_,methods:O,index:f,name:K})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var f=i.interaction,y=f.coords,_=f.rect,O=f.modification;if(O.result){for(var K=O.startDelta,Q=O.result,ke=Q.delta,He=Q.rectDelta,Ce=0,ra=[[y.start,K],[y.cur,ke]];Ce<ra.length;Ce++){var Ba=ra[Ce],Xa=Ba[0],Wa=Ba[1];Xa.page.x-=Wa.x,Xa.page.y-=Wa.y,Xa.client.x-=Wa.x,Xa.client.y-=Wa.y}_.left-=He.left,_.right-=He.right,_.top-=He.top,_.bottom-=He.bottom}}},{key:"shouldDo",value:function(i,f,y,_){return!(!i||i.enabled===!1||_&&!i.endOnly||i.endOnly&&!f||y==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(f){return Tr(f)}),this.result=Wl(ee({},i.result.coords),ee({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),t}();function Wl(t,i){return{rect:i,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function gr(t,i){var f=t.defaults,y={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},_=function(O){var K=O||{};for(var Q in K.enabled=K.enabled!==!1,f)Q in K||(K[Q]=f[Q]);var ke={options:K,methods:y,name:i,enable:function(){return K.enabled=!0,ke},disable:function(){return K.enabled=!1,ke}};return ke};return i&&typeof i=="string"&&(_._defaults=f,_._methods=y),_}function Ir(t){var i=t.iEvent,f=t.interaction.modification.result;f&&(i.modifiers=f.eventProps)}var Rr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var i=t.interaction;i.modification=new Pr(i)},"interactions:before-action-start":function(t){var i=t.interaction,f=t.interaction.modification;f.start(t,i.coords.start.page),i.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var i=t.interaction,f=i.modification,y=f.setAndApply(t);return i.edges=f.edges,y},"interactions:before-action-end":function(t){var i=t.interaction,f=i.modification,y=f.beforeEnd(t);return i.edges=f.startEdges,y},"interactions:action-start":Ir,"interactions:action-move":Ir,"interactions:action-end":Ir,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Vl=Rr,ar={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Fr=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ke,He){var Ce;s(this,f),(Ce=i.call(this,y)).relatedTarget=null,Ce.screenX=void 0,Ce.screenY=void 0,Ce.button=void 0,Ce.buttons=void 0,Ce.ctrlKey=void 0,Ce.shiftKey=void 0,Ce.altKey=void 0,Ce.metaKey=void 0,Ce.page=void 0,Ce.client=void 0,Ce.delta=void 0,Ce.rect=void 0,Ce.x0=void 0,Ce.y0=void 0,Ce.t0=void 0,Ce.dt=void 0,Ce.duration=void 0,Ce.clientX0=void 0,Ce.clientY0=void 0,Ce.velocity=void 0,Ce.speed=void 0,Ce.swipe=void 0,Ce.axes=void 0,Ce.preEnd=void 0,Q=Q||y.element;var ra=y.interactable,Ba=(ra&&ra.options||ar).deltaSource,Xa=Ne(ra,Q,O),Wa=K==="start",el=K==="end",_l=Wa?C(Ce):y.prevEvent,bl=Wa?y.coords.start:el?{page:_l.page,client:_l.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return Ce.page=ee({},bl.page),Ce.client=ee({},bl.client),Ce.rect=ee({},y.rect),Ce.timeStamp=bl.timeStamp,el||(Ce.page.x-=Xa.x,Ce.page.y-=Xa.y,Ce.client.x-=Xa.x,Ce.client.y-=Xa.y),Ce.ctrlKey=_.ctrlKey,Ce.altKey=_.altKey,Ce.shiftKey=_.shiftKey,Ce.metaKey=_.metaKey,Ce.button=_.button,Ce.buttons=_.buttons,Ce.target=Q,Ce.currentTarget=Q,Ce.preEnd=ke,Ce.type=He||O+(K||""),Ce.interactable=ra,Ce.t0=Wa?y.pointers[y.pointers.length-1].downTime:_l.t0,Ce.x0=y.coords.start.page.x-Xa.x,Ce.y0=y.coords.start.page.y-Xa.y,Ce.clientX0=y.coords.start.client.x-Xa.x,Ce.clientY0=y.coords.start.client.y-Xa.y,Ce.delta=Wa||el?{x:0,y:0}:{x:Ce[Ba].x-_l[Ba].x,y:Ce[Ba].y-_l[Ba].y},Ce.dt=y.coords.delta.timeStamp,Ce.duration=Ce.timeStamp-Ce.t0,Ce.velocity=ee({},y.coords.velocity[Ba]),Ce.speed=Ya(Ce.velocity.x,Ce.velocity.y),Ce.swipe=el||K==="inertiastart"?Ce.getSwipe():null,Ce}return c(f,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var O=112.5<=_&&_<247.5,K=202.5<=_&&_<337.5;return{up:K,down:!K&&22.5<=_&&_<157.5,left:O,right:!O&&(292.5<=_||_<67.5),angle:_,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}}]),f}(he);Object.defineProperties(Fr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Vr=c(function t(i,f,y,_,O){s(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=f,this.event=y,this.downTime=_,this.downTarget=O}),Or=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),jr=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Yr=0,sn=function(){function t(i){var f=this,y=i.pointerType,_=i.scopeFire;s(this,t),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=Xe(function(Ce){this.move(Ce)},"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=Yr++,this._scopeFire=_,this.pointerType=y;var O=this;this._proxy={};var K=function(Ce){Object.defineProperty(f._proxy,Ce,{get:function(){return O[Ce]}})};for(var Q in Or)K(Q);var ke=function(Ce){Object.defineProperty(f._proxy,Ce,{value:function(){return O[Ce].apply(O,arguments)}})};for(var He in jr)ke(He);this._scopeFire("interactions:new",{interaction:this})}return c(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,f,y){var _=this.updatePointer(i,f,y,!0),O=this.pointers[_];this._scopeFire("interactions:down",{pointer:i,event:f,eventTarget:y,pointerIndex:_,pointerInfo:O,type:"down",interaction:this})}},{key:"start",value:function(i,f,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!f.options[i.name].enabled)&&(Aa(this.prepared,i),this.interactable=f,this.element=y,this.rect=f.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(i,f,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,f,y,!1);var _,O,K=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&&(_=this.coords.cur.client.x-this.coords.start.client.x,O=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ya(_,O)>this.pointerMoveTolerance);var Q,ke,He,Ce=this.getPointerIndex(i),ra={pointer:i,pointerIndex:Ce,pointerInfo:this.pointers[Ce],event:f,type:"move",eventTarget:y,dx:_,dy:O,duplicate:K,interaction:this};K||(Q=this.coords.velocity,ke=this.coords.delta,He=Math.max(ke.timeStamp/1e3,.001),Q.page.x=ke.page.x/He,Q.page.y=ke.page.y/He,Q.client.x=ke.client.x/He,Q.client.y=ke.client.y/He,Q.timeStamp=He),this._scopeFire("interactions:move",ra),K||this.simulation||(this.interacting()&&(ra.type=null,this.move(ra)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||ve(this.coords.delta),(i=ee({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,f,y,_){var O=this.getPointerIndex(i);O===-1&&(O=this.updatePointer(i,f,y,!1));var K=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(K),{pointer:i,pointerIndex:O,pointerInfo:this.pointers[O],event:f,eventTarget:y,type:K,curEventTarget:_,interaction:this}),this.simulation||this.end(f),this.removePointer(i,f)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var f;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,f===!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(i){var f=Pe(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:me(this.pointers,function(y){return y.id===f})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,f,y,_){var O,K,Q,ke=Pe(i),He=this.getPointerIndex(i),Ce=this.pointers[He];return _=_!==!1&&(_||/(down|start)$/i.test(f.type)),Ce?Ce.pointer=i:(Ce=new Vr(ke,i,f,null,null),He=this.pointers.length,this.pointers.push(Ce)),xa(this.coords.cur,this.pointers.map(function(ra){return ra.pointer}),this._now()),O=this.coords.delta,K=this.coords.prev,Q=this.coords.cur,O.page.x=Q.page.x-K.page.x,O.page.y=Q.page.y-K.page.y,O.client.x=Q.client.x-K.client.x,O.client.y=Q.client.y-K.client.y,O.timeStamp=Q.timeStamp-K.timeStamp,_&&(this.pointerIsDown=!0,Ce.downTime=this.coords.cur.timeStamp,Ce.downTarget=y,H(this.downPointer,i),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(i,f,y),this._scopeFire("interactions:update-pointer",{pointer:i,event:f,eventTarget:y,down:_,pointerInfo:Ce,pointerIndex:He,interaction:this}),He}},{key:"removePointer",value:function(i,f){var y=this.getPointerIndex(i);if(y!==-1){var _=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:i,event:f,eventTarget:null,pointerIndex:y,pointerInfo:_,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,f,y){this._latestPointer.pointer=i,this._latestPointer.event=f,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,f,y,_){return new Fr(this,i,this.prepared.name,f,this.element,y,_)}},{key:"_fireEvent",value:function(i){var f;(f=this.interactable)==null||f.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var f=i.event,y=i.phase,_=i.preEnd,O=i.type,K=this.rect;if(K&&y==="move"&&(te(this.edges,K,this.coords.delta[this.interactable.options.deltaSource]),K.width=K.right-K.left,K.height=K.bottom-K.top),this._scopeFire("interactions:before-action-".concat(y),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(f,y,_,O);return this._scopeFire("interactions:action-".concat(y),i),y==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(y),i),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Yl(t){hr(t.interaction)}function hr(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var i=t.offset.pending;return ml(t.coords.cur,i),ml(t.coords.delta,i),te(t.edges,t.rect,i),i.x=0,i.y=0,!0}function qr(t){var i=t.x,f=t.y;this.offset.pending.x+=i,this.offset.pending.y+=f,this.offset.total.x+=i,this.offset.total.y+=f}function ml(t,i){var f=t.page,y=t.client,_=i.x,O=i.y;f.x+=_,f.y+=O,y.x+=_,y.y+=O}jr.offsetBy="";var nr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=qr},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(i){i.pointerIsDown&&(ml(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Yl,"interactions:before-action-move":Yl,"interactions:before-action-end":function(t){var i=t.interaction;if(hr(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(t){var i=t.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},Ll=nr,Sr=function(){function t(i){s(this,t),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=i}return c(t,[{key:"start",value:function(i){var f=this.interaction,y=Hl(f);if(!y||!y.enabled)return!1;var _=f.coords.velocity.client,O=Ya(_.x,_.y),K=this.modification||(this.modification=new Pr(f));if(K.copyFrom(f.modification),this.t0=f._now(),this.allowResume=y.allowResume,this.v0=O,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=K.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&O>y.minSpeed&&O>y.endSpeed)this.startInertia();else{if(K.result=K.setAll(this.modifierArg),!K.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:i,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,f=this.interaction.coords.velocity.client,y=Hl(this.interaction),_=y.resistance,O=-Math.log(y.endSpeed/this.v0)/_;this.targetOffset={x:(f.x-O)/_,y:(f.y-O)/_},this.te=O,this.lambda_v0=_/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var K=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},K.result=K.setAll(Q),K.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+K.result.delta.x,y:this.targetOffset.y+K.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=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 i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var f=this;this.timeout=tl.request(function(){f.active&&i()})}},{key:"inertiaTick",value:function(){var i,f,y,_,O,K,Q,ke=this,He=this.interaction,Ce=Hl(He).resistance,ra=(He._now()-this.t0)/1e3;if(ra<this.te){var Ba,Xa=1-(Math.exp(-Ce*ra)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,f=0,y=this.targetOffset.x,_=this.targetOffset.y,O=this.modifiedOffset.x,K=this.modifiedOffset.y,Ba={x:er(Q=Xa,i,y,O),y:er(Q,f,_,K)}):Ba={x:this.targetOffset.x*Xa,y:this.targetOffset.y*Xa};var Wa={x:Ba.x-this.currentOffset.x,y:Ba.y-this.currentOffset.y};this.currentOffset.x+=Wa.x,this.currentOffset.y+=Wa.y,He.offsetBy(Wa),He.move(),this.onNextFrame(function(){return ke.inertiaTick()})}else He.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,f=this.interaction,y=f._now()-this.t0,_=Hl(f).smoothEndDuration;if(y<_){var O={x:Wr(y,0,this.targetOffset.x,_),y:Wr(y,0,this.targetOffset.y,_)},K={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=K.x,this.currentOffset.y+=K.y,f.offsetBy(K),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var f=i.pointer,y=i.event,_=i.eventTarget,O=this.interaction;O.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),O.updatePointer(f,y,_,!0),O._doPhase({interaction:O,event:y,phase:"resume"}),X(O.coords.prev,O.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,tl.cancel(this.timeout)}}]),t}();function Hl(t){var i=t.interactable,f=t.prepared;return i&&i.options&&f.name&&i.options[f.name].inertia}var vr={id:"inertia",before:["modifiers","actions"],install:function(t){var i=t.defaults;t.usePlugin(Ll),t.usePlugin(Vl),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var i=t.interaction;i.inertia=new Sr(i)},"interactions:before-action-end":function(t){var i=t.interaction,f=t.event;return(!i._interacting||i.simulation||!i.inertia.start(f))&&null},"interactions:down":function(t){var i=t.interaction,f=t.eventTarget,y=i.inertia;if(y.active)for(var _=f;S.element(_);){if(_===i.element){y.resume(t);break}_=$e(_)}},"interactions:stop":function(t){var i=t.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(t){var i=t.interaction.modification;i.stop(t),i.start(t,t.interaction.coords.cur.page),i.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Ir,"interactions:action-inertiastart":Ir,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function er(t,i,f,y){var _=1-t;return _*_*i+2*_*t*f+t*t*y}function Wr(t,i,f,y){return-f*(t/=y)*(t-2)+i}var an=vr;function _n(t,i){for(var f=0;f<i.length;f++){var y=i[f];if(t.immediatePropagationStopped)break;y(t)}}var Un=function(){function t(i){s(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},i||{})}return c(t,[{key:"fire",value:function(i){var f,y=this.global;(f=this.types[i.type])&&_n(i,f),!i.propagationStopped&&y&&(f=y[i.type])&&_n(i,f)}},{key:"on",value:function(i,f){var y=We(i,f);for(i in y)this.types[i]=Y(this.types[i]||[],y[i])}},{key:"off",value:function(i,f){var y=We(i,f);for(i in y){var _=this.types[i];if(_&&_.length)for(var O=0,K=y[i];O<K.length;O++){var Q=K[O],ke=_.indexOf(Q);ke!==-1&&_.splice(ke,1)}}}},{key:"getRect",value:function(i){return null}}]),t}(),Ln=function(){function t(i){s(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,H(this,i)}return c(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Sn(t){return S.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function An(t,i){return t===i||(typeof t=="boolean"?!!i.capture===t&&!i.passive:!!t.capture==!!i.capture&&!!t.passive==!!i.passive)}var Rn={id:"events",install:function(t){var i,f=[],y={},_=[],O={add:K,remove:Q,addDelegate:function(Ce,ra,Ba,Xa,Wa){var el=Sn(Wa);if(!y[Ba]){y[Ba]=[];for(var _l=0;_l<_.length;_l++){var bl=_[_l];K(bl,Ba,ke),K(bl,Ba,He,!0)}}var Cl=y[Ba],Ul=qe(Cl,function(Dl){return Dl.selector===Ce&&Dl.context===ra});Ul||(Ul={selector:Ce,context:ra,listeners:[]},Cl.push(Ul)),Ul.listeners.push({func:Xa,options:el})},removeDelegate:function(Ce,ra,Ba,Xa,Wa){var el,_l=Sn(Wa),bl=y[Ba],Cl=!1;if(bl)for(el=bl.length-1;el>=0;el--){var Ul=bl[el];if(Ul.selector===Ce&&Ul.context===ra){for(var Dl=Ul.listeners,Ol=Dl.length-1;Ol>=0;Ol--){var Il=Dl[Ol];if(Il.func===Xa&&An(Il.options,_l)){Dl.splice(Ol,1),Dl.length||(bl.splice(el,1),Q(ra,Ba,ke),Q(ra,Ba,He,!0)),Cl=!0;break}}if(Cl)break}}},delegateListener:ke,delegateUseCapture:He,delegatedEvents:y,documents:_,targets:f,supportsOptions:!1,supportsPassive:!1};function K(Ce,ra,Ba,Xa){if(Ce.addEventListener){var Wa=Sn(Xa),el=qe(f,function(_l){return _l.eventTarget===Ce});el||(el={eventTarget:Ce,events:{}},f.push(el)),el.events[ra]||(el.events[ra]=[]),qe(el.events[ra],function(_l){return _l.func===Ba&&An(_l.options,Wa)})||(Ce.addEventListener(ra,Ba,O.supportsOptions?Wa:Wa.capture),el.events[ra].push({func:Ba,options:Wa}))}}function Q(Ce,ra,Ba,Xa){if(Ce.addEventListener&&Ce.removeEventListener){var Wa=me(f,function(Xr){return Xr.eventTarget===Ce}),el=f[Wa];if(el&&el.events)if(ra!=="all"){var _l=!1,bl=el.events[ra];if(bl){if(Ba==="all"){for(var Cl=bl.length-1;Cl>=0;Cl--){var Ul=bl[Cl];Q(Ce,ra,Ul.func,Ul.options)}return}for(var Dl=Sn(Xa),Ol=0;Ol<bl.length;Ol++){var Il=bl[Ol];if(Il.func===Ba&&An(Il.options,Dl)){Ce.removeEventListener(ra,Ba,O.supportsOptions?Dl:Dl.capture),bl.splice(Ol,1),bl.length===0&&(delete el.events[ra],_l=!0);break}}}_l&&!Object.keys(el.events).length&&f.splice(Wa,1)}else for(ra in el.events)el.events.hasOwnProperty(ra)&&Q(Ce,ra,"all")}}function ke(Ce,ra){for(var Ba=Sn(ra),Xa=new Ln(Ce),Wa=y[Ce.type],el=Ae(Ce)[0],_l=el;S.element(_l);){for(var bl=0;bl<Wa.length;bl++){var Cl=Wa[bl],Ul=Cl.selector,Dl=Cl.context;if(fe(_l,Ul)&&se(Dl,el)&&se(Dl,_l)){var Ol=Cl.listeners;Xa.currentTarget=_l;for(var Il=0;Il<Ol.length;Il++){var Xr=Ol[Il];An(Xr.options,Ba)&&Xr.func(Xa)}}}_l=$e(_l)}}function He(Ce){return ke(Ce,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return O.supportsOptions=!0},get passive(){return O.supportsPassive=!0}}),t.events=O,O}},cn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0,f=cn.methodOrder;i<f.length;i++){var y=f[i],_=cn[y](t);if(_)return _}return null},simulationResume:function(t){var i=t.pointerType,f=t.eventType,y=t.eventTarget,_=t.scope;if(!/down|start/i.test(f))return null;for(var O=0,K=_.interactions.list;O<K.length;O++){var Q=K[O],ke=y;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ke;){if(ke===Q.element)return Q;ke=$e(ke)}}return null},mouseOrPen:function(t){var i,f=t.pointerId,y=t.pointerType,_=t.eventType,O=t.scope;if(y!=="mouse"&&y!=="pen")return null;for(var K=0,Q=O.interactions.list;K<Q.length;K++){var ke=Q[K];if(ke.pointerType===y){if(ke.simulation&&!zn(ke,f))continue;if(ke.interacting())return ke;i||(i=ke)}}if(i)return i;for(var He=0,Ce=O.interactions.list;He<Ce.length;He++){var ra=Ce[He];if(!(ra.pointerType!==y||/down/i.test(_)&&ra.simulation))return ra}return null},hasPointer:function(t){for(var i=t.pointerId,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(zn(_,i))return _}return null},idle:function(t){for(var i=t.pointerType,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(_.pointers.length===1){var O=_.interactable;if(O&&(!O.options.gesture||!O.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&i===_.pointerType)return _}return null}};function zn(t,i){return t.pointers.some(function(f){return f.id===i})}var qn=cn,Hr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Wn(t,i){return function(f){var y=i.interactions.list,_=Ca(f),O=Ae(f),K=O[0],Q=O[1],ke=[];if(/^touch/.test(f.type)){i.prevTouchTime=i.now();for(var He=0,Ce=f.changedTouches;He<Ce.length;He++){var ra=Ce[He],Ba={pointer:ra,pointerId:Pe(ra),pointerType:_,eventType:f.type,eventTarget:K,curEventTarget:Q,scope:i},Xa=bn(Ba);ke.push([Ba.pointer,Ba.eventTarget,Ba.curEventTarget,Xa])}}else{var Wa=!1;if(!J.supportsPointerEvent&&/mouse/.test(f.type)){for(var el=0;el<y.length&&!Wa;el++)Wa=y[el].pointerType!=="mouse"&&y[el].pointerIsDown;Wa=Wa||i.now()-i.prevTouchTime<500||f.timeStamp===0}if(!Wa){var _l={pointer:f,pointerId:Pe(f),pointerType:_,eventType:f.type,curEventTarget:Q,eventTarget:K,scope:i},bl=bn(_l);ke.push([_l.pointer,_l.eventTarget,_l.curEventTarget,bl])}}for(var Cl=0;Cl<ke.length;Cl++){var Ul=ke[Cl],Dl=Ul[0],Ol=Ul[1],Il=Ul[2];Ul[3][t](Dl,f,Ol,Il)}}}function bn(t){var i=t.pointerType,f=t.scope,y={interaction:qn.search(t),searchDetails:t};return f.fire("interactions:find",y),y.interaction||f.interactions.new({pointerType:i})}function Ni(t,i){var f=t.doc,y=t.scope,_=t.options,O=y.interactions.docEvents,K=y.events,Q=K[i];for(var ke in y.browser.isIOS&&!_.events&&(_.events={passive:!1}),K.delegatedEvents)Q(f,ke,K.delegateListener),Q(f,ke,K.delegateUseCapture,!0);for(var He=_&&_.events,Ce=0;Ce<O.length;Ce++){var ra=O[Ce];Q(f,ra.type,ra.listener,He)}}var Ro={id:"core/interactions",install:function(t){for(var i={},f=0;f<Hr.length;f++){var y=Hr[f];i[y]=Wn(y,t)}var _,O=J.pEventTypes;function K(){for(var Q=0,ke=t.interactions.list;Q<ke.length;Q++){var He=ke[Q];if(He.pointerIsDown&&He.pointerType==="touch"&&!He._interacting)for(var Ce=function(){var Xa=Ba[ra];t.documents.some(function(Wa){return se(Wa.doc,Xa.downTarget)})||He.removePointer(Xa.pointer,Xa.event)},ra=0,Ba=He.pointers;ra<Ba.length;ra++)Ce()}}(_=F.PointerEvent?[{type:O.down,listener:K},{type:O.down,listener:i.pointerDown},{type:O.move,listener:i.pointerMove},{type:O.up,listener:i.pointerUp},{type:O.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:K},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ke=0,He=t.interactions.list;ke<He.length;ke++)He[ke].documentBlur(Q)}}),t.prevTouchTime=0,t.Interaction=function(Q){m(He,Q);var ke=M(He);function He(){return s(this,He),ke.apply(this,arguments)}return c(He,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Ce){t.interactions.pointerMoveTolerance=Ce}},{key:"_now",value:function(){return t.now()}}]),He}(sn),t.interactions={list:[],new:function(Q){Q.scopeFire=function(He,Ce){return t.fire(He,Ce)};var ke=new t.Interaction(Q);return t.interactions.list.push(ke),ke},listeners:i,docEvents:_,pointerMoveTolerance:1},t.usePlugin(Nr)},listeners:{"scope:add-document":function(t){return Ni(t,"add")},"scope:remove-document":function(t){return Ni(t,"remove")},"interactable:unset":function(t,i){for(var f=t.interactable,y=i.interactions.list.length-1;y>=0;y--){var _=i.interactions.list[y];_.interactable===f&&(_.stop(),i.fire("interactions:destroy",{interaction:_}),_.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(y,1))}}},onDocSignal:Ni,doOnInteractions:Wn,methodNames:Hr},$o=Ro,Dn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Dn||{}),Vo=function(){function t(i,f,y,_){s(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Un,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=i,this._context=f.context||y,this._win=x(Ta(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=_,this.set(f)}return c(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,f){return S.func(f.onstart)&&this.on("".concat(i,"start"),f.onstart),S.func(f.onmove)&&this.on("".concat(i,"move"),f.onmove),S.func(f.onend)&&this.on("".concat(i,"end"),f.onend),S.func(f.oninertiastart)&&this.on("".concat(i,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,f,y){var _,O=this,K=(_=this._actions.map[i])==null?void 0:_.filterEventType,Q=function(ke){return(K==null||K(ke))&&Al(ke,O._actions)};(S.array(f)||S.object(f))&&this._onOff(Dn.Off,i,f,void 0,Q),(S.array(y)||S.object(y))&&this._onOff(Dn.On,i,y,void 0,Q)}},{key:"setPerAction",value:function(i,f){var y=this._defaults;for(var _ in f){var O=_,K=this.options[i],Q=f[O];O==="listeners"&&this.updatePerActionListeners(i,K.listeners,Q),S.array(Q)?K[O]=xe(Q):S.plainObject(Q)?(K[O]=ee(K[O]||{},Tr(Q)),S.object(y.perAction[O])&&"enabled"in y.perAction[O]&&(K[O].enabled=Q.enabled!==!1)):S.bool(Q)&&S.object(y.perAction[O])?K[O].enabled=Q:K[O]=Q}}},{key:"getRect",value:function(i){return i=i||(S.element(this.target)?this.target:null),S.string(this.target)&&(i=i||this._context.querySelector(this.target)),je(i)}},{key:"rectChecker",value:function(i){var f=this;return S.func(i)?(this.getRect=function(y){var _=ee({},i.apply(f,y));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,f){if(Ta(f)||S.object(f)){for(var y in this.options[i]=f,this._actions.map)this.options[y][i]=f;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return S.string(i)?Array.from(this._context.querySelectorAll(i)):S.func(i)&&i.getAllElements?i.getAllElements():S.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||se(this._context,i)}},{key:"testIgnoreAllow",value:function(i,f,y){return!this.testIgnore(i.ignoreFrom,f,y)&&this.testAllow(i.allowFrom,f,y)}},{key:"testAllow",value:function(i,f,y){return!i||!!S.element(y)&&(S.string(i)?U(y,i,f):!!S.element(i)&&se(i,y))}},{key:"testIgnore",value:function(i,f,y){return!(!i||!S.element(y))&&(S.string(i)?U(y,i,f):!!S.element(i)&&se(i,y))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,f,y,_,O){S.object(f)&&!S.array(f)&&(_=y,y=null);var K=We(f,y,O);for(var Q in K){Q==="wheel"&&(Q=J.wheelEvent);for(var ke=0,He=K[Q];ke<He.length;ke++){var Ce=He[ke];Al(Q,this._actions)?this.events[i===Dn.On?"on":"off"](Q,Ce):S.string(this.target)?this._scopeEvents[i===Dn.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Ce,_):this._scopeEvents[i===Dn.On?"add":"remove"](this.target,Q,Ce,_)}}return this}},{key:"on",value:function(i,f,y){return this._onOff(Dn.On,i,f,y)}},{key:"off",value:function(i,f,y){return this._onOff(Dn.Off,i,f,y)}},{key:"set",value:function(i){var f=this._defaults;for(var y in S.object(i)||(i={}),this.options=Tr(f.base),this._actions.methodDict){var _=y,O=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,ee(ee({},f.perAction),f.actions[_])),this[O](i[_])}for(var K in i)K!=="getRect"?S.func(this[K])&&this[K](i[K]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[i],y=f.length-1;y>=0;y--){var _=f[y],O=_.selector,K=_.context,Q=_.listeners;O===this.target&&K===this._context&&f.splice(y,1);for(var ke=Q.length-1;ke>=0;ke--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ke][0],Q[ke][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),Po=function(){function t(i){var f=this;s(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(y){var _=y.interactable,O=_.target,K=S.string(O)?f.selectorMap[O]:O[f.scope.id],Q=me(K,function(ke){return ke===_});K.splice(Q,1)}})}return c(t,[{key:"new",value:function(i,f){f=ee(f||{},{actions:this.scope.actions});var y=new this.scope.Interactable(i,f,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),S.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(y)):(y.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:i,options:f,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(i,f){var y=f&&f.context||this.scope.document,_=S.string(i),O=_?this.selectorMap[i]:i[this.scope.id];if(O)return qe(O,function(K){return K._context===y&&(_||K.inContext(i))})}},{key:"forEachMatch",value:function(i,f){for(var y=0,_=this.list;y<_.length;y++){var O=_[y],K=void 0;if((S.string(O.target)?S.element(i)&&fe(i,O.target):i===O.target)&&O.inContext(i)&&(K=f(O)),K!==void 0)return K}}}]),t}(),Fo=function(){function t(){var i=this;s(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=J,this.defaults=Tr(ar),this.Eventable=Un,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var _=function O(K,Q){var ke=y.interactables.getExisting(K,Q);return ke||((ke=y.interactables.new(K,Q)).events.global=O.globalEvents),ke};return _.getPointerAverage=ma,_.getTouchBBox=Oa,_.getTouchDistance=za,_.getTouchAngle=pa,_.getElementRect=je,_.getElementClientRect=Ie,_.matchesSelector=fe,_.closest=Be,_.globalEvents={},_.version="1.10.27",_.scope=y,_.use=function(O,K){return this.scope.usePlugin(O,K),this},_.isSet=function(O,K){return!!this.scope.interactables.get(O,K&&K.context)},_.on=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ke=0,He=O;ke<He.length;ke++){var Ce=He[ke];this.on(Ce,K,Q)}return this}if(S.object(O)){for(var ra in O)this.on(ra,O[ra],K);return this}return Al(O,this.scope.actions)?this.globalEvents[O]?this.globalEvents[O].push(K):this.globalEvents[O]=[K]:this.scope.events.add(this.scope.document,O,K,{options:Q}),this},"The interact.on() method is being deprecated"),_.off=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ke=0,He=O;ke<He.length;ke++){var Ce=He[ke];this.off(Ce,K,Q)}return this}if(S.object(O)){for(var ra in O)this.off(ra,O[ra],K);return this}var Ba;return Al(O,this.scope.actions)?O in this.globalEvents&&(Ba=this.globalEvents[O].indexOf(K))!==-1&&this.globalEvents[O].splice(Ba,1):this.scope.events.remove(this.scope.document,O,K,Q),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return J.supportsTouch},_.supportsPointerEvent=function(){return J.supportsPointerEvent},_.stop=function(){for(var O=0,K=this.scope.interactions.list;O<K.length;O++)K[O].stop();return this},_.pointerMoveTolerance=function(O){return S.number(O)?(this.scope.interactions.pointerMoveTolerance=O,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(O,K){this.scope.addDocument(O,K)},_.removeDocument=function(O){this.scope.removeDocument(O)},_}(this),this.InteractEvent=Fr,this.Interactable=void 0,this.interactables=new Po(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return i.removeDocument(y.target)};var f=this;this.Interactable=function(y){m(O,y);var _=M(O);function O(){return s(this,O),_.apply(this,arguments)}return c(O,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(K){return k(b(O.prototype),"set",this).call(this,K),f.fire("interactable:set",{options:K,interactable:this}),this}},{key:"unset",value:function(){k(b(O.prototype),"unset",this).call(this);var K=f.interactables.list.indexOf(this);K<0||(f.interactables.list.splice(K,1),f.fire("interactable:unset",{interactable:this}))}}]),O}(Vo)}return c(t,[{key:"addListeners",value:function(i,f){this.listenerMaps.push({id:f,map:i})}},{key:"fire",value:function(i,f){for(var y=0,_=this.listenerMaps;y<_.length;y++){var O=_[y].map[i];if(O&&O(f,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(f,y){return f.isInitialized=!0,S.window(y)&&E(y),F.init(y),J.init(y),tl.init(y),f.window=y,f.document=y.document,f.usePlugin($o),f.usePlugin(Rn),f}(this,i)}},{key:"pluginIsInstalled",value:function(i){var f=i.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,f),i.listeners&&i.before){for(var y=0,_=this.listenerMaps.length,O=i.before.reduce(function(Q,ke){return Q[ke]=!0,Q[Ai(ke)]=!0,Q},{});y<_;y++){var K=this.listenerMaps[y].id;if(K&&(O[K]||O[Ai(K)]))break}this.listenerMaps.splice(y,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,f){if(this.getDocIndex(i)!==-1)return!1;var y=x(i);f=f?ee({},f):{},this.documents.push({doc:i,options:f}),this.events.documents.push(i),i!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:y,scope:this,options:f})}},{key:"removeDocument",value:function(i){var f=this.getDocIndex(i),y=x(i),_=this.documents[f].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:i,window:y,scope:this,options:_})}},{key:"getDocIndex",value:function(i){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===i)return f;return-1}},{key:"getDocOptions",value:function(i){var f=this.getDocIndex(i);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ai(t){return t&&t.replace(/\/.*$/,"")}var Ji=new Fo,Jr=Ji.interactStatic,jo=typeof globalThis<"u"?globalThis:window;Ji.init(jo);var Ho=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var _=y[0],O=y[1];return _ in t||O in t}),f=function(y,_){for(var O=t.range,K=t.limits,Q=K===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:K,ke=t.offset,He=ke===void 0?{x:0,y:0}:ke,Ce={range:O,grid:t,x:null,y:null},ra=0;ra<i.length;ra++){var Ba=i[ra],Xa=Ba[0],Wa=Ba[1],el=Math.round((y-He.x)/t[Xa]),_l=Math.round((_-He.y)/t[Wa]);Ce[Xa]=Math.max(Q.left,Math.min(Q.right,el*t[Xa]+He.x)),Ce[Wa]=Math.max(Q.top,Math.min(Q.bottom,_l*t[Wa]+He.y))}return Ce};return f.grid=t,f.coordFields=i,f}}),zi={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=ee(i.snappers||{},Ho),i.createSnapGrid=i.snappers.grid}},Uo=zi,Mi={start:function(t){var i=t.state,f=t.rect,y=t.edges,_=t.pageCoords,O=i.options,K=O.ratio,Q=O.enabled,ke=i.options,He=ke.equalDelta,Ce=ke.modifiers;K==="preserve"&&(K=f.width/f.height),i.startCoords=ee({},_),i.startRect=ee({},f),i.ratio=K,i.equalDelta=He;var ra=i.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(i.xIsPrimaryAxis=!(!y.left&&!y.right),i.equalDelta){var Ba=(ra.left?1:-1)*(ra.top?1:-1);i.edgeSign={x:Ba,y:Ba}}else i.edgeSign={x:ra.left?-1:1,y:ra.top?-1:1};if(Q!==!1&&ee(y,ra),Ce!=null&&Ce.length){var Xa=new Pr(t.interaction);Xa.copyFrom(t.interaction.modification),Xa.prepareStates(Ce),i.subModification=Xa,Xa.startAll(r({},t))}},set:function(t){var i=t.state,f=t.rect,y=t.coords,_=i.linkedEdges,O=ee({},y),K=i.equalDelta?Xi:Zi;if(ee(t.edges,_),K(i,i.xIsPrimaryAxis,y,f),!i.subModification)return null;var Q=ee({},f);te(_,Q,{x:y.x-O.x,y:y.y-O.y});var ke=i.subModification.setAll(r(r({},t),{},{rect:Q,edges:_,pageCoords:y,prevCoords:y,prevRect:Q})),He=ke.delta;return ke.changed&&(K(i,Math.abs(He.x)>Math.abs(He.y),ke.coords,ke.rect),ee(y,ke.coords)),ke.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Xi(t,i,f){var y=t.startCoords,_=t.edgeSign;i?f.y=y.y+(f.x-y.x)*_.y:f.x=y.x+(f.y-y.y)*_.x}function Zi(t,i,f,y){var _=t.startRect,O=t.startCoords,K=t.ratio,Q=t.edgeSign;if(i){var ke=y.width/K;f.y=O.y+(ke-_.height)*Q.y}else{var He=y.height*K;f.x=O.x+(He-_.width)*Q.x}}var qo=gr(Mi,"aspectRatio"),Qi=function(){};Qi._defaults={};var ci=Qi;function fn(t,i,f){return S.func(t)?ue(t,i.interactable,i.element,[f.x,f.y,i]):ue(t,i.interactable,i.element)}var Kn={start:function(t){var i=t.rect,f=t.startOffset,y=t.state,_=t.interaction,O=t.pageCoords,K=y.options,Q=K.elementRect,ke=ee({left:0,top:0,right:0,bottom:0},K.offset||{});if(i&&Q){var He=fn(K.restriction,_,O);if(He){var Ce=He.right-He.left-i.width,ra=He.bottom-He.top-i.height;Ce<0&&(ke.left+=Ce,ke.right+=Ce),ra<0&&(ke.top+=ra,ke.bottom+=ra)}ke.left+=f.left-i.width*Q.left,ke.top+=f.top-i.height*Q.top,ke.right+=f.right-i.width*(1-Q.right),ke.bottom+=f.bottom-i.height*(1-Q.bottom)}y.offset=ke},set:function(t){var i=t.coords,f=t.interaction,y=t.state,_=y.options,O=y.offset,K=fn(_.restriction,f,i);if(K){var Q=function(ke){return!ke||"left"in ke&&"top"in ke||((ke=ee({},ke)).left=ke.x||0,ke.top=ke.y||0,ke.right=ke.right||ke.left+ke.width,ke.bottom=ke.bottom||ke.top+ke.height),ke}(K);i.x=Math.max(Math.min(Q.right-O.right,i.x),Q.left+O.left),i.y=Math.max(Math.min(Q.bottom-O.bottom,i.y),Q.top+O.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ii=gr(Kn,"restrict"),eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},ao={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function lo(t,i){for(var f=0,y=["top","left","bottom","right"];f<y.length;f++){var _=y[f];_ in t||(t[_]=i[_])}return t}var Gn={noInner:eo,noOuter:ao,start:function(t){var i,f=t.interaction,y=t.startOffset,_=t.state,O=_.options;O&&(i=ta(fn(O.offset,f,f.coords.start.page))),i=i||{x:0,y:0},_.offset={top:i.y+y.top,left:i.x+y.left,bottom:i.y-y.bottom,right:i.x-y.right}},set:function(t){var i=t.coords,f=t.edges,y=t.interaction,_=t.state,O=_.offset,K=_.options;if(f){var Q=ee({},i),ke=fn(K.inner,y,Q)||{},He=fn(K.outer,y,Q)||{};lo(ke,eo),lo(He,ao),f.top?i.y=Math.min(Math.max(He.top+O.top,Q.y),ke.top+O.top):f.bottom&&(i.y=Math.max(Math.min(He.bottom+O.bottom,Q.y),ke.bottom+O.bottom)),f.left?i.x=Math.min(Math.max(He.left+O.left,Q.x),ke.left+O.left):f.right&&(i.x=Math.max(Math.min(He.right+O.right,Q.x),ke.right+O.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ro=gr(Gn,"restrictEdges"),Yn=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Kn.defaults),no=gr({start:Kn.start,set:Kn.set,defaults:Yn},"restrictRect"),io={width:-1/0,height:-1/0},Jn={width:1/0,height:1/0},Wo=gr({start:function(t){return Gn.start(t)},set:function(t){var i=t.interaction,f=t.state,y=t.rect,_=t.edges,O=f.options;if(_){var K=Se(fn(O.min,i,t.coords))||io,Q=Se(fn(O.max,i,t.coords))||Jn;f.options={endOnly:O.endOnly,inner:ee({},Gn.noInner),outer:ee({},Gn.noOuter)},_.top?(f.options.inner.top=y.bottom-K.height,f.options.outer.top=y.bottom-Q.height):_.bottom&&(f.options.inner.bottom=y.top+K.height,f.options.outer.bottom=y.top+Q.height),_.left?(f.options.inner.left=y.right-K.width,f.options.outer.left=y.right-Q.width):_.right&&(f.options.inner.right=y.left+K.width,f.options.outer.right=y.left+Q.width),Gn.set(t),f.options=O}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ui={start:function(t){var i,f=t.interaction,y=t.interactable,_=t.element,O=t.rect,K=t.state,Q=t.startOffset,ke=K.options,He=ke.offsetWithOrigin?function(Ba){var Xa=Ba.interaction.element,Wa=ta(ue(Ba.state.options.origin,null,null,[Xa])),el=Wa||Ne(Ba.interactable,Xa,Ba.interaction.prepared.name);return el}(t):{x:0,y:0};if(ke.offset==="startCoords")i={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Ce=ue(ke.offset,y,_,[f]);(i=ta(Ce)||{x:0,y:0}).x+=He.x,i.y+=He.y}var ra=ke.relativePoints;K.offsets=O&&ra&&ra.length?ra.map(function(Ba,Xa){return{index:Xa,relativePoint:Ba,x:Q.left-O.width*Ba.x+i.x,y:Q.top-O.height*Ba.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(t){var i=t.interaction,f=t.coords,y=t.state,_=y.options,O=y.offsets,K=Ne(i.interactable,i.element,i.prepared.name),Q=ee({},f),ke=[];_.offsetWithOrigin||(Q.x-=K.x,Q.y-=K.y);for(var He=0,Ce=O;He<Ce.length;He++)for(var ra=Ce[He],Ba=Q.x-ra.x,Xa=Q.y-ra.y,Wa=0,el=_.targets.length;Wa<el;Wa++){var _l=_.targets[Wa],bl=void 0;(bl=S.func(_l)?_l(Ba,Xa,i._proxy,ra,Wa):_l)&&ke.push({x:(S.number(bl.x)?bl.x:Ba)+ra.x,y:(S.number(bl.y)?bl.y:Xa)+ra.y,range:S.number(bl.range)?bl.range:_.range,source:_l,index:Wa,offset:ra})}for(var Cl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ul=0;Ul<ke.length;Ul++){var Dl=ke[Ul],Ol=Dl.range,Il=Dl.x-Q.x,Xr=Dl.y-Q.y,ir=Ya(Il,Xr),ln=ir<=Ol;Ol===1/0&&Cl.inRange&&Cl.range!==1/0&&(ln=!1),Cl.target&&!(ln?Cl.inRange&&Ol!==1/0?ir/Ol<Cl.distance/Cl.range:Ol===1/0&&Cl.range!==1/0||ir<Cl.distance:!Cl.inRange&&ir<Cl.distance)||(Cl.target=Dl,Cl.distance=ir,Cl.range=Ol,Cl.inRange=ln,Cl.delta.x=Il,Cl.delta.y=Xr)}return Cl.inRange&&(f.x=Cl.target.x,f.y=Cl.target.y),y.closest=Cl,Cl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Xn=gr(ui,"snap"),di={start:function(t){var i=t.state,f=t.edges,y=i.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],ui.start(t),i.offsets=t.state.offsets,t.state=i},set:function(t){var i=t.interaction,f=t.state,y=t.coords,_=f.options,O=f.offsets,K={x:y.x-O[0].x,y:y.y-O[0].y};f.options=ee({},_),f.options.targets=[];for(var Q=0,ke=_.targets||[];Q<ke.length;Q++){var He=ke[Q],Ce=void 0;if(Ce=S.func(He)?He(K.x,K.y,i):He){for(var ra=0,Ba=f.targetFields;ra<Ba.length;ra++){var Xa=Ba[ra],Wa=Xa[0],el=Xa[1];if(Wa in Ce||el in Ce){Ce.x=Ce[Wa],Ce.y=Ce[el];break}}f.options.targets.push(Ce)}}var _l=ui.set(t);return f.options=_,_l},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ko=gr(di,"snapSize"),Oi={aspectRatio:qo,restrictEdges:ro,restrict:Ii,restrictRect:no,restrictSize:Wo,snapEdges:gr({start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],di.start(t)):null},set:di.set,defaults:ee(Tr(di.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Xn,snapSize:Ko,spring:ci,avoid:ci,transform:ci,rubberband:ci},Go={id:"modifiers",install:function(t){var i=t.interactStatic;for(var f in t.usePlugin(Vl),t.usePlugin(Uo),i.modifiers=Oi,Oi){var y=Oi[f],_=y._defaults,O=y._methods;_._methods=O,t.defaults.perAction[f]=_}}},Yo=Go,oo=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ke){var He;if(s(this,f),H(C(He=i.call(this,Q)),O),O!==_&&H(C(He),_),He.timeStamp=ke,He.originalEvent=O,He.type=y,He.pointerId=Pe(_),He.pointerType=Ca(_),He.target=K,He.currentTarget=null,y==="tap"){var Ce=Q.getPointerIndex(_);He.dt=He.timeStamp-Q.pointers[Ce].downTime;var ra=He.timeStamp-Q.tapTime;He.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===He.target&&ra<500}else y==="doubletap"&&(He.dt=_.timeStamp-Q.tapTime,He.double=!0);return He}return c(f,[{key:"_subtractOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX-=_,this.pageY-=O,this.clientX-=_,this.clientY-=O,this}},{key:"_addOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX+=_,this.pageY+=O,this.clientX+=_,this.clientY+=O,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(he),Zn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Zn,t.defaults.actions.pointerEvents=Zn.defaults,ee(t.actions.phaselessTypes,Zn.types)},listeners:{"interactions:new":function(t){var i=t.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(t){var i=t.down,f=t.pointerInfo;!i&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Ri(t),Bn({interaction:f,pointer:y,event:_,eventTarget:O,type:"move"},i))},"interactions:down":function(t,i){(function(f,y){for(var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget,ke=f.pointerIndex,He=_.pointers[ke].hold,Ce=la(Q),ra={interaction:_,pointer:O,event:K,eventTarget:Q,type:"hold",targets:[],path:Ce,node:null},Ba=0;Ba<Ce.length;Ba++){var Xa=Ce[Ba];ra.node=Xa,y.fire("pointerEvents:collect-targets",ra)}if(ra.targets.length){for(var Wa=1/0,el=0,_l=ra.targets;el<_l.length;el++){var bl=_l[el].eventable.options.holdDuration;bl<Wa&&(Wa=bl)}He.duration=Wa,He.timeout=setTimeout(function(){Bn({interaction:_,eventTarget:Q,pointer:O,event:K,type:"hold"},y)},Wa)}})(t,i),Bn(t,i)},"interactions:up":function(t,i){Ri(t),Bn(t,i),function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerWasMoved||Bn({interaction:_,eventTarget:Q,pointer:O,event:K,type:"tap"},y)}(t,i)},"interactions:cancel":function(t,i){Ri(t),Bn(t,i)}},PointerEvent:oo,fire:Bn,collectEventTargets:Li,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 Bn(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=t.targets,ke=Q===void 0?Li(t,i):Q,He=new oo(K,y,_,O,f,i.now());i.fire("pointerEvents:new",{pointerEvent:He});for(var Ce={interaction:f,pointer:y,event:_,eventTarget:O,targets:ke,type:K,pointerEvent:He},ra=0;ra<ke.length;ra++){var Ba=ke[ra];for(var Xa in Ba.props||{})He[Xa]=Ba.props[Xa];var Wa=Ne(Ba.eventable,Ba.node);if(He._subtractOrigin(Wa),He.eventable=Ba.eventable,He.currentTarget=Ba.node,Ba.eventable.fire(He),He._addOrigin(Wa),He.immediatePropagationStopped||He.propagationStopped&&ra+1<ke.length&&ke[ra+1].node!==He.currentTarget)break}if(i.fire("pointerEvents:fired",Ce),K==="tap"){var el=He.double?Bn({interaction:f,pointer:y,event:_,eventTarget:O,type:"doubletap"},i):He;f.prevTap=el,f.tapTime=el.timeStamp}return He}function Li(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=f.getPointerIndex(y),ke=f.pointers[Q];if(K==="tap"&&(f.pointerWasMoved||!ke||ke.downTarget!==O))return[];for(var He=la(O),Ce={interaction:f,pointer:y,event:_,eventTarget:O,type:K,path:He,targets:[],node:null},ra=0;ra<He.length;ra++){var Ba=He[ra];Ce.node=Ba,i.fire("pointerEvents:collect-targets",Ce)}return K==="hold"&&(Ce.targets=Ce.targets.filter(function(Xa){var Wa,el;return Xa.eventable.options.holdDuration===((Wa=f.pointers[Q])==null||(el=Wa.hold)==null?void 0:el.duration)})),Ce.targets}function Ri(t){var i=t.interaction,f=t.pointerIndex,y=i.pointers[f].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var Jo=Object.freeze({__proto__:null,default:Zn});function Xo(t){var i=t.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var Zo={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Zn);var i=t.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,i){return t["pointerEvents:".concat(i)]=Xo,t},{"pointerEvents:new":function(t){var i=t.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(t,i){var f=t.interaction,y=t.pointerEvent,_=t.eventTarget,O=t.targets;if(y.type==="hold"&&O.length){var K=O[0].eventable.options.holdRepeatInterval;K<=0||(f.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:f,eventTarget:_,type:"hold",pointer:y,event:y},i)},K))}}})},pi=Zo,Qo={id:"pointer-events/interactableTargets",install:function(t){var i=t.Interactable;i.prototype.pointerEvents=function(y){return ee(this.events.options,y),this};var f=i.prototype._backCompatOption;i.prototype._backCompatOption=function(y,_){var O=f.call(this,y,_);return O===this&&(this.events.options[y]=_),O}},listeners:{"pointerEvents:collect-targets":function(t,i){var f=t.targets,y=t.node,_=t.type,O=t.eventTarget;i.interactables.forEachMatch(y,function(K){var Q=K.events,ke=Q.options;Q.types[_]&&Q.types[_].length&&K.testIgnoreAllow(ke,y,O)&&f.push({node:y,eventable:Q,props:{interactable:K}})})},"interactable:new":function(t){var i=t.interactable;i.events.getRect=function(f){return i.getRect(f)}},"interactable:set":function(t,i){var f=t.interactable,y=t.options;ee(f.events.options,i.pointerEvents.defaults),ee(f.events.options,y.pointerEvents||{})}}},et=Qo,at={id:"pointer-events",install:function(t){t.usePlugin(Jo),t.usePlugin(pi),t.usePlugin(et)}},lt=at,to={id:"reflow",install:function(t){var i=t.Interactable;t.actions.phases.reflow=!0,i.prototype.reflow=function(f){return function(y,_,O){for(var K=y.getAllElements(),Q=O.window.Promise,ke=Q?[]:null,He=function(){var ra=K[Ce],Ba=y.getRect(ra);if(!Ba)return 1;var Xa,Wa=qe(O.interactions.list,function(bl){return bl.interacting()&&bl.interactable===y&&bl.element===ra&&bl.prepared.name===_.name});if(Wa)Wa.move(),ke&&(Xa=Wa._reflowPromise||new Q(function(bl){Wa._reflowResolve=bl}));else{var el=Se(Ba),_l=function(bl){return{coords:bl,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:el.x,y:el.y},client:{x:el.x,y:el.y},timeStamp:O.now()});Xa=function(bl,Cl,Ul,Dl,Ol){var Il=bl.interactions.new({pointerType:"reflow"}),Xr={interaction:Il,event:Ol,pointer:Ol,eventTarget:Ul,phase:"reflow"};Il.interactable=Cl,Il.element=Ul,Il.prevEvent=Ol,Il.updatePointer(Ol,Ol,Ul,!0),ve(Il.coords.delta),Aa(Il.prepared,Dl),Il._doPhase(Xr);var ir=bl.window,ln=ir.Promise,hn=ln?new ln(function(En){Il._reflowResolve=En}):void 0;return Il._reflowPromise=hn,Il.start(Dl,Cl,Ul),Il._interacting?(Il.move(Xr),Il.end(Ol)):(Il.stop(),Il._reflowResolve()),Il.removePointer(Ol,Ol),hn}(O,y,ra,_,_l)}ke&&ke.push(Xa)},Ce=0;Ce<K.length&&!He();Ce++);return ke&&Q.all(ke).then(function(){return y})}(this,f,t)}},listeners:{"interactions:stop":function(t,i){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(y,_){y.splice(y.indexOf(_),1)}(i.interactions.list,f))}}},fi=to;if(Jr.use(Nr),Jr.use(Ll),Jr.use(lt),Jr.use(an),Jr.use(Yo),Jr.use(Oe),Jr.use(ol),Jr.use(ie),Jr.use(fi),Jr.default=Jr,o(a)==="object"&&a)try{a.exports=Jr}catch{}return Jr.default=Jr,Jr})}(ji,ji.exports)),ji.exports}var k1=b1();const As=A.getDefaultExportFromCjs(k1),Mo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:n}){const r=a,o=n,s=e.inject(Fc),h=e.inject(jc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),d=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let m=!1,b=!1,u=NaN,C=NaN,M=NaN,k=NaN,W=-1,I=-1,j=-1,L=-1,E=r.x,x=r.y,w=r.w,g=r.h;const S=e.ref(),$=e.reactive({i:e.toRef(r,"i"),state:d,wrapper:S,calcXY:ue});function V(de){We(de)}function ae(){sa()}function Z(de){yn(r.isDraggable)&&(d.draggable=de)}function ge(de){yn(r.isResizable)&&(d.resizable=de)}function ze(de){yn(r.isBounded)&&(d.bounded=de)}function F(de){d.transformScale=de}function ne(de){d.rowHeight=de}function J(de){d.maxRows=de}function se(){d.rtl=Ts()==="rtl",sa()}function Be(de){d.cols=Math.floor(de)}s.increaseItem($),e.onBeforeMount(()=>{d.rtl=Ts()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?d.cols=Kc(s.lastBreakpoint,s.cols):d.cols=s.colNum,d.rowHeight=s.rowHeight,d.containerWidth=s.width!==null?s.width:100,d.margin=s.margin!==void 0?s.margin.map(Number):[10,10],d.maxRows=s.maxRows,yn(r.isDraggable)?d.draggable=s.isDraggable:d.draggable=r.isDraggable,yn(r.isResizable)?d.resizable=s.isResizable:d.resizable=r.isResizable,yn(r.isBounded)?d.bounded=s.isBounded:d.bounded=r.isBounded,d.transformScale=s.transformScale,d.useCssTransforms=s.useCssTransforms,d.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=r.x,x=r.y,g=r.h,w=r.w,rn(je)}),h.on("updateWidth",V),h.on("compact",ae),h.on("setDraggable",Z),h.on("setResizable",ge),h.on("setBounded",ze),h.on("setTransformScale",F),h.on("setRowHeight",ne),h.on("setMaxRows",J),h.on("directionchange",se),h.on("setColNum",Be)}),e.onBeforeUnmount(()=>{h.off("updateWidth",V),h.off("compact",ae),h.off("setDraggable",Z),h.off("setResizable",ge),h.off("setBounded",ze),h.off("setTransformScale",F),h.off("setRowHeight",ne),h.off("setMaxRows",J),h.off("directionchange",se),h.off("setColNum",Be),c.value&&(c.value.unset(),c.value=null),s.decreaseItem($)}),l({state:d,wrapper:S});const $e=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,fe=e.computed(()=>d.resizable&&!r.static),N=e.computed(()=>s.isMirrored?!d.rtl:d.rtl),oe=e.computed(()=>(d.draggable||d.resizable)&&!r.static),U=d1("item"),De=e.computed(()=>({[U.b()]:!0,[U.bm("resizable")]:fe.value,[U.bm("static")]:r.static,[U.bm("resizing")]:d.isResizing,[U.bm("dragging")]:d.isDragging,[U.bm("transform")]:d.useCssTransforms,[U.bm("rtl")]:N.value,[U.bm("no-touch")]:$e&&oe.value})),Ie=e.computed(()=>[U.be("resizer"),N.value&&U.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,de=>{d.draggable=de}),e.watch(()=>r.static,()=>{rn(H),rn(ve)}),e.watch(()=>d.draggable,()=>{rn(H)}),e.watch(()=>r.isResizable,de=>{d.resizable=de}),e.watch(()=>r.isBounded,de=>{d.bounded=de}),e.watch(()=>d.resizable,()=>{rn(ve)}),e.watch(()=>d.rowHeight,()=>{rn(je),rn(la)}),e.watch([()=>d.cols,()=>d.containerWidth],()=>{rn(ve),rn(je),rn(la)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{rn(ve)}),e.watch(N,()=>{rn(ve),rn(je)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const de=s.margin;!de||de[0]===d.margin[0]&&de[1]===d.margin[1]||(d.margin=de.map(Number),rn(je),rn(la))});function je(){r.x+r.w>d.cols?(E=0,w=r.w>d.cols?d.cols:r.w):(E=r.x,w=r.w);const de=ca(E,x,w,g);d.isDragging&&(de.top=d.dragging.top,N.value?de.right=d.dragging.left:de.left=d.dragging.left),d.isResizing&&(de.width=d.resizing.width,de.height=d.resizing.height);let va;d.useCssTransforms?N.value?va=o1(de.top,de.right,de.width,de.height):va=i1(de.top,de.left,de.width,de.height):N.value?va=c1(de.top,de.right,de.width,de.height):va=s1(de.top,de.left,de.width,de.height),d.style=va}function la(){const de={};for(const va of["width","height"]){const na=d.style[va].match(/^(\d+)px$/);if(!na)return;de[va]=na[1]}o("container-resized",r.i,r.h,r.w,de.height,de.width)}function Ta(de){if(r.static)return;const va=de.type;if(va==="resizestart"&&d.isResizing||va!=="resizestart"&&!d.isResizing)return;const na=Ds(de);if(yn(na))return;const{x:Pe,y:xa}=na,Me={width:0,height:0};let ma;switch(va){case"resizestart":{ve(),W=w,I=g,ma=ca(E,x,w,g),Me.width=ma.width,Me.height=ma.height,d.resizing=Me,d.isResizing=!0;break}case"resizemove":{!de.edges.right&&!de.edges.left&&(M=Pe),!de.edges.top&&!de.edges.bottom&&(k=xa);const Oa=Bs(M,k,Pe,xa);N.value?Me.width=d.resizing.width-Oa.deltaX/d.transformScale:Me.width=d.resizing.width+Oa.deltaX/d.transformScale,Me.height=d.resizing.height+Oa.deltaY/d.transformScale,d.resizing=Me;break}case"resizeend":{ma=ca(E,x,w,g),Me.width=ma.width,Me.height=ma.height,d.resizing={width:-1,height:-1},d.isResizing=!1;break}}ma=Ne(Me.height,Me.width),ma.w<r.minW&&(ma.w=r.minW),ma.w>r.maxW&&(ma.w=r.maxW),ma.h<r.minH&&(ma.h=r.minH),ma.h>r.maxH&&(ma.h=r.maxH),ma.h<1&&(ma.h=1),ma.w<1&&(ma.w=1),M=Pe,k=xa,(w!==ma.w||g!==ma.h)&&o("resize",r.i,ma.h,ma.w,Me.height,Me.width),de.type==="resizeend"&&(W!==w||I!==g)&&o("resized",r.i,ma.h,ma.w,Me.height,Me.width),h.emit("resizeEvent",de.type,r.i,E,x,ma.h,ma.w)}function ee(de){if(r.static||d.isResizing)return;const va=de.type;if(va==="dragstart"&&d.isDragging||va!=="dragstart"&&!d.isDragging)return;const na=Ds(de);if(yn(na))return;const{x:Pe,y:xa}=na,Me=de.target;if(!Me.offsetParent)return;const ma={top:0,left:0};switch(va){case"dragstart":{j=E,L=x;const za=Me.offsetParent.getBoundingClientRect(),pa=Me.getBoundingClientRect(),Ca=pa.left/d.transformScale,Ae=za.left/d.transformScale,he=pa.right/d.transformScale,Y=za.right/d.transformScale,xe=pa.top/d.transformScale,me=za.top/d.transformScale;N.value?ma.left=(he-Y)*-1:ma.left=Ca-Ae,ma.top=xe-me,d.dragging=ma,d.isDragging=!0;break}case"dragmove":{const za=Bs(u,C,Pe,xa);if(N.value?ma.left=d.dragging.left-za.deltaX/d.transformScale:ma.left=d.dragging.left+za.deltaX/d.transformScale,ma.top=d.dragging.top+za.deltaY/d.transformScale,d.bounded){const pa=Me.offsetParent.clientHeight-Se(r.h,d.rowHeight,d.margin[1]);ma.top=te(ma.top,0,pa);const Ca=ta(),Ae=d.containerWidth-Se(r.w,Ca,d.margin[0]);ma.left=te(ma.left,0,Ae)}d.dragging=ma;break}case"dragend":{const za=Me.offsetParent.getBoundingClientRect(),pa=Me.getBoundingClientRect(),Ca=pa.left/d.transformScale,Ae=za.left/d.transformScale,he=pa.right/d.transformScale,Y=za.right/d.transformScale,xe=pa.top/d.transformScale,me=za.top/d.transformScale;N.value?ma.left=(he-Y)*-1:ma.left=Ca-Ae,ma.top=xe-me,d.dragging={top:-1,left:-1},d.isDragging=!1;break}}let Oa;N.value,Oa=ue(ma.top,ma.left),u=Pe,C=xa,(E!==Oa.x||x!==Oa.y)&&o("move",r.i,Oa.x,Oa.y),de.type==="dragend"&&(j!==E||L!==x)&&o("moved",r.i,Oa.x,Oa.y),h.emit("dragEvent",de.type,r.i,Oa.x,Oa.y,g,w)}function ca(de,va,na,Pe){const xa=ta();let Me;return N.value?Me={right:Math.round(xa*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*va+(va+1)*d.margin[1]),width:na===1/0?na:Math.round(xa*na+Math.max(0,na-1)*d.margin[0]),height:Pe===1/0?Pe:Math.round(d.rowHeight*Pe+Math.max(0,Pe-1)*d.margin[1])}:Me={left:Math.round(xa*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*va+(va+1)*d.margin[1]),width:na===1/0?na:Math.round(xa*na+Math.max(0,na-1)*d.margin[0]),height:Pe===1/0?Pe:Math.round(d.rowHeight*Pe+Math.max(0,Pe-1)*d.margin[1])},Me}function ue(de,va){const na=ta();let Pe=Math.round((va-d.margin[0])/(na+d.margin[0])),xa=Math.round((de-d.margin[1])/(d.rowHeight+d.margin[1]));return Pe=Math.max(Math.min(Pe,d.cols-w),0),xa=Math.max(Math.min(xa,d.maxRows-g),0),{x:Pe,y:xa}}function ta(){return(d.containerWidth-d.margin[0]*(d.cols+1))/d.cols}function Se(de,va,na){return Number.isFinite(de)?Math.round(va*de+Math.max(0,de-1)*na):de}function te(de,va,na){return Math.max(Math.min(de,na),va)}function Ne(de,va,na=!1){const Pe=ta();let xa=Math.round((va+d.margin[0])/(Pe+d.margin[0])),Me=0;return na?Me=Math.ceil((de+d.margin[1])/(d.rowHeight+d.margin[1])):Me=Math.round((de+d.margin[1])/(d.rowHeight+d.margin[1])),xa=Math.max(Math.min(xa,d.cols-E),0),Me=Math.max(Math.min(Me,d.maxRows-x),0),{w:xa,h:Me}}function We(de,va){d.containerWidth=de}function sa(){je()}function Ya(){!c.value&&S.value&&(c.value=As(S.value),d.useStyleCursor||c.value.styleCursor(!1))}const R=Ss(ee);function H(){if(Ya(),!!c.value)if(d.draggable&&!r.static){const de={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(de),m||(m=!0,c.value.on("dragstart dragmove dragend",va=>{va.type==="dragmove"?R(va):ee(va)}))}else c.value.draggable({enabled:!1})}const X=Ss(Ta);function ve(){if(Ya(),!!c.value)if(d.resizable&&!r.static){const de=ca(0,0,r.maxW,r.maxH),va=ca(0,0,r.minW,r.minH),na={edges:{left:N.value?`.${Ie.value[0]}`:!1,right:N.value?!1:`.${Ie.value[0]}`,bottom:`.${Ie.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:va.height*d.transformScale,width:va.width*d.transformScale},max:{height:de.height*d.transformScale,width:de.width*d.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(na.modifiers=[As.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(na),b||(b=!0,c.value.on("resizestart resizemove resizeend",Pe=>{Pe.type==="resizemove"?X(Pe):Ta(Pe)}))}else c.value.resizable({enabled:!1})}return(de,va)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(De.value),style:e.normalizeStyle(d.style)},[e.renderSlot(de.$slots,"default"),fe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ie.value)},null,2)):e.createCommentVNode("",!0)],6))}}),si=typeof window<"u";var zs;si&&(zs=window==null?void 0:window.navigator)!=null&&zs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ms(a){return a!=null}function Is(){}const x1=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(x1)));const w1=si&&("ontouchstart"in window||S1()>0),_1=w1?"pointerdown":"click";function S1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function E1(a,l,n=window.Event){const{type:r,bubbles:o=!1,cancelable:s=!1,...h}=l;if(!Ms(r)||r==="")return!1;let c;return Ms(n)?c=new n(r,{bubbles:o,cancelable:s}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,o,s)),Object.assign(c,h),a.dispatchEvent(c)}const C1="clickoutside",D1=new Set;si&&document.addEventListener(_1,a=>{const l=a.target,n=a.composedPath&&a.composedPath();D1.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&E1(r,{type:C1})})},!0);const B1=[["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 wo;if(si){for(const a of B1)if(a[1]in document){wo=a;break}}e.computed(()=>!1);const T1=new Set,N1=new WeakMap;if(si&&wo){const a=wo[2],l=wo[4];document.addEventListener(l,()=>{if(T1.forEach(n=>{n.value=!1}),document[a]){const n=N1.get(document[a]);n&&(n.value=!0)}},!1)}const Yc=new Map;Yc.set("x",0);Yc.set("y",0);var oi=[],A1=function(){return oi.some(function(a){return a.activeTargets.length>0})},z1=function(){return oi.some(function(a){return a.skippedTargets.length>0})},Os="ResizeObserver loop completed with undelivered notifications.",M1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Os}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Os),window.dispatchEvent(a)},Yi;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Yi||(Yi={}));var ti=function(a){return Object.freeze(a)},I1=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,ti(this)}return a}(),Jc=function(){function a(l,n,r,o){return this.x=l,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ti(this)}return a.prototype.toJSON=function(){var l=this,n=l.x,r=l.y,o=l.top,s=l.right,h=l.bottom,c=l.left,d=l.width,m=l.height;return{x:n,y:r,top:o,right:s,bottom:h,left:c,width:d,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Bt=function(a){return a instanceof SVGElement&&"getBBox"in a},Xc=function(a){if(Bt(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var o=a,s=o.offsetWidth,h=o.offsetHeight;return!(s||h||a.getClientRects().length)},Ls=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},O1=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Wi=typeof window<"u"?window:{},go=new WeakMap,Rs=/auto|scroll/,L1=/^tb|vertical/,R1=/msie|trident/i.test(Wi.navigator&&Wi.navigator.userAgent),Nn=function(a){return parseFloat(a||"0")},Ci=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new I1((n?l:a)||0,(n?a:l)||0)},$s=ti({devicePixelContentBoxSize:Ci(),borderBoxSize:Ci(),contentBoxSize:Ci(),contentRect:new Jc(0,0,0,0)}),Zc=function(a,l){if(l===void 0&&(l=!1),go.has(a)&&!l)return go.get(a);if(Xc(a))return go.set(a,$s),$s;var n=getComputedStyle(a),r=Bt(a)&&a.ownerSVGElement&&a.getBBox(),o=!R1&&n.boxSizing==="border-box",s=L1.test(n.writingMode||""),h=!r&&Rs.test(n.overflowY||""),c=!r&&Rs.test(n.overflowX||""),d=r?0:Nn(n.paddingTop),m=r?0:Nn(n.paddingRight),b=r?0:Nn(n.paddingBottom),u=r?0:Nn(n.paddingLeft),C=r?0:Nn(n.borderTopWidth),M=r?0:Nn(n.borderRightWidth),k=r?0:Nn(n.borderBottomWidth),W=r?0:Nn(n.borderLeftWidth),I=u+m,j=d+b,L=W+M,E=C+k,x=c?a.offsetHeight-E-a.clientHeight:0,w=h?a.offsetWidth-L-a.clientWidth:0,g=o?I+L:0,S=o?j+E:0,$=r?r.width:Nn(n.width)-g-w,V=r?r.height:Nn(n.height)-S-x,ae=$+I+w+L,Z=V+j+x+E,ge=ti({devicePixelContentBoxSize:Ci(Math.round($*devicePixelRatio),Math.round(V*devicePixelRatio),s),borderBoxSize:Ci(ae,Z,s),contentBoxSize:Ci($,V,s),contentRect:new Jc(u,d,$,V)});return go.set(a,ge),ge},Qc=function(a,l,n){var r=Zc(a,n),o=r.borderBoxSize,s=r.contentBoxSize,h=r.devicePixelContentBoxSize;switch(l){case Yi.DEVICE_PIXEL_CONTENT_BOX:return h;case Yi.BORDER_BOX:return o;default:return s}},$1=function(){function a(l){var n=Zc(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=ti([n.borderBoxSize]),this.contentBoxSize=ti([n.contentBoxSize]),this.devicePixelContentBoxSize=ti([n.devicePixelContentBoxSize])}return a}(),eu=function(a){if(Xc(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},V1=function(){var a=1/0,l=[];oi.forEach(function(s){if(s.activeTargets.length!==0){var h=[];s.activeTargets.forEach(function(c){var d=new $1(c.target),m=eu(c.target);h.push(d),c.lastReportedSize=Qc(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,h,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var o=r[n];o()}return a},Vs=function(a){oi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(eu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},P1=function(){var a=0;for(Vs(a);A1();)a=V1(),Vs(a);return z1()&&M1(),a>0},dt,au=[],F1=function(){return au.splice(0).forEach(function(a){return a()})},j1=function(a){if(!dt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return F1()}).observe(n,r),dt=function(){n.textContent="".concat(l?l--:l++)}}au.push(a),dt()},H1=function(a){j1(function(){requestAnimationFrame(a)})},_o=0,U1=function(){return!!_o},q1=250,W1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ps=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fs=function(a){return a===void 0&&(a=0),Date.now()+a},pt=!1,K1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=q1),!pt){pt=!0;var r=Fs(l);H1(function(){var o=!1;try{o=P1()}finally{if(pt=!1,l=r-Fs(),!U1())return;o?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,W1)};document.body?n():Wi.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ps.forEach(function(n){return Wi.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Ps.forEach(function(n){return Wi.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),Et=new K1,js=function(a){!_o&&a>0&&Et.start(),_o+=a,!_o&&Et.stop()},G1=function(a){return!Bt(a)&&!O1(a)&&getComputedStyle(a).display==="inline"},Y1=function(){function a(l,n){this.target=l,this.observedBox=n||Yi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=Qc(this.target,this.observedBox,!0);return G1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),J1=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),bo=new WeakMap,Hs=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},ko=function(){function a(){}return a.connect=function(l,n){var r=new J1(l,n);bo.set(l,r)},a.observe=function(l,n,r){var o=bo.get(l),s=o.observationTargets.length===0;Hs(o.observationTargets,n)<0&&(s&&oi.push(o),o.observationTargets.push(new Y1(n,r&&r.box)),js(1),Et.schedule())},a.unobserve=function(l,n){var r=bo.get(l),o=Hs(r.observationTargets,n),s=r.observationTargets.length===1;o>=0&&(s&&oi.splice(oi.indexOf(r),1),r.observationTargets.splice(o,1),js(-1))},a.disconnect=function(l){var n=this,r=bo.get(l);r.observationTargets.slice().forEach(function(o){return n.unobserve(l,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),X1=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ko.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ls(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ko.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ls(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ko.unobserve(this,l)},a.prototype.disconnect=function(){ko.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Io=new WeakMap;function Z1(a){var l;for(let n=0,r=a.length;n<r;++n){const o=a[n],s=Io.get(o.target);if(typeof s=="function"){const{inlineSize:h,blockSize:c}=((l=o.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:d,offsetHeight:m}=o.target;s(Object.assign(o,{offsetWidth:d,offsetHeight:m,width:h??d,height:c??m}))}}}const lu=new(si&&window.ResizeObserver||X1)(Z1);function Us(a,l){Io.set(a,l),lu.observe(a)}function qs(a){Io.has(a)&&(lu.unobserve(a),Io.delete(a))}function Q1(a={}){let l=Is;const n=e.watch(()=>e.unref(a.target),o=>{l(),!(!o||typeof a.onResize!="function")&&(Us(o,a.onResize),l=()=>{qs(o),l=Is})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:Us,unobserveResize:qs,unobserve:r}}const ev=e.ref(!1);e.computed(()=>ev.value);const Ws="__theme_style__",ft="__theme_observer__",Ks=e.reactive(new Map),Gs=new Map;e.watch(Ks,()=>{if(!si)return;Gs.clear();const a=document.head.querySelector(`#${Ws}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${ft} { width: 1px }`,r=1;for(const[o,[s,h]]of Ks.entries())n+=` html.${s} .${ft}, .${h} .${ft} { width: ${++r}px }`,Gs.set(r,o);l.textContent=n,l.id=Ws,document.head.appendChild(l)});const ru=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:n}){const r=a,o=n,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),h=new Map,c=e.ref(r.layout),d=e.ref(),{observeResize:m,unobserveResize:b}=Q1(),u=Z6();u.on("resizeEvent",C),u.on("dragEvent",M),e.onBeforeMount(()=>{o("layout-before-mount",c.value)}),e.onMounted(()=>{o("layout-mounted",c.value),e.nextTick(()=>{u1(c.value),s.originalLayout=c.value,e.nextTick(()=>{V(),d.value&&m(d.value,Q6(E,16)),_i(c.value,r.verticalCompact),o("layout-updated",c.value),L(),E()})})}),e.onBeforeUnmount(()=>{u.clearAll(),d.value&&b(d.value)});function C(Z,ge,ze,F,ne,J){S(Z,ge,ze,F,ne,J)}function M(Z,ge,ze,F,ne,J){g(Z,ge,ze,F,ne,J)}e.watch(()=>s.width,(Z,ge)=>{e.nextTick(()=>{u.emit("updateWidth",Z),ge===-1&&e.nextTick(()=>{o("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,j()}),e.watch(()=>r.colNum,Z=>{u.emit("setColNum",Z)}),e.watch(()=>r.rowHeight,Z=>{u.emit("setRowHeight",Z)}),e.watch(()=>r.isDraggable,Z=>{u.emit("setDraggable",Z)}),e.watch(()=>r.isResizable,Z=>{u.emit("setResizable",Z)}),e.watch(()=>r.isBounded,Z=>{u.emit("setBounded",Z)}),e.watch(()=>r.transformScale,Z=>{u.emit("setTransformScale",Z)}),e.watch(()=>r.responsive,Z=>{Z||(o("update:layout",s.originalLayout),u.emit("setColNum",r.colNum)),E()}),e.watch(()=>r.maxRows,Z=>{u.emit("setMaxRows",Z)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(Fc,e.reactive({...e.toRefs(r),...e.toRefs(s),increaseItem:k,decreaseItem:W})),e.provide(jc,u),l({state:s,getItem:I,resizeEvent:S,dragEvent:g,layoutUpdate:j});function k(Z){h.set(Z.i,Z)}function W(Z){h.delete(Z.i)}function I(Z){return h.get(Z)}function j(){if(!yn(c.value)&&!yn(s.originalLayout)){if(c.value.length!==s.originalLayout.length){const Z=ae(c.value,s.originalLayout);if(Z.length>0)if(c.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(Z);else{const ge=new Set(Z.map(ze=>ze.i));s.originalLayout=s.originalLayout.filter(ze=>!ge.has(ze.i))}s.lastLayoutLength=c.value.length,V()}_i(c.value,r.verticalCompact),u.emit("updateWidth",s.width),L(),o("layout-updated",c.value)}}function L(){s.mergedStyle={height:x()}}function E(){d.value&&(s.width=d.value.offsetWidth),u.emit("resizeEvent")}function x(){if(!r.autoSize)return;const Z=parseFloat(r.margin[1]);return a1(c.value)*(r.rowHeight+Z)+Z+"px"}let w;function g(Z,ge,ze,F,ne,J){let se=Es(c.value,ge);yn(se)&&(se={h:0,w:0,x:0,y:0,i:""}),Z==="dragstart"&&!r.verticalCompact&&(w=c.value.reduce((Be,{i:$e,x:fe,y:N})=>({...Be,[$e]:{x:fe,y:N}}),{})),Z==="dragmove"||Z==="dragstart"?(s.placeholder.i=ge,s.placeholder.x=se.x,s.placeholder.y=se.y,s.placeholder.w=J,s.placeholder.h=ne,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),c.value=St(c.value,se,ze,F,!0,r.preventCollision),r.restoreOnDrag?(se.static=!0,_i(c.value,r.verticalCompact,w),se.static=!1):_i(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="dragend"&&(w=void 0,o("layout-updated",c.value))}function S(Z,ge,ze,F,ne,J){let se=Es(c.value,ge);yn(se)&&(se={h:0,w:0,x:0,y:0,i:""});let Be;if(r.preventCollision){const $e=Uc(c.value,{...se,w:J,h:ne}).filter(fe=>fe.i!==se.i);if(Be=$e.length>0,Be){let fe=1/0,N=1/0;$e.forEach(oe=>{oe.x>se.x&&(fe=Math.min(fe,oe.x)),oe.y>se.y&&(N=Math.min(N,oe.y))}),Number.isFinite(fe)&&(se.w=fe-se.x),Number.isFinite(N)&&(se.h=N-se.y)}}Be||(se.w=J,se.h=ne),Z==="resizestart"||Z==="resizemove"?(s.placeholder.i=ge,s.placeholder.x=ze,s.placeholder.y=F,s.placeholder.w=se.w,s.placeholder.h=se.h,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):Z&&e.nextTick(()=>{s.isDragging=!1}),r.responsive&&$(),_i(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="resizeend"&&o("layout-updated",c.value)}function $(){const Z=h1(r.breakpoints,s.width);if(Z===s.lastBreakpoint)return;const ge=Kc(Z,r.cols);!yn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=_t(c.value));const ze=v1(s.originalLayout,s.layouts,r.breakpoints,Z,s.lastBreakpoint,ge,r.verticalCompact);s.layouts[Z]=ze,s.lastBreakpoint!==Z&&o("breakpoint-changed",Z,ze),c.value=ze,o("update:layout",ze),s.lastBreakpoint=Z,u.emit("setColNum",ge)}function V(){s.layouts=Object.assign({},r.responsiveLayouts)}function ae(Z,ge){const ze=new Set(ge.map(se=>se.i)),F=new Set(Z.map(se=>se.i)),ne=Z.filter(se=>!ze.has(se.i)),J=ge.filter(se=>!F.has(se.i));return ne.concat(J)}return(Z,ge)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:d,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[Z.$slots.default?e.renderSlot(Z.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,ze=>(e.openBlock(),e.createBlock(Mo,e.mergeProps({key:ze.i,ref_for:!0},ze),{default:e.withCtx(()=>[e.renderSlot(Z.$slots,"item",{item:ze})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Mo,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const av={key:0,class:"item-view-group"},lv={key:0,class:"item-view-group"},rv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=A.useModelComp(A.pinia),{isEdit:r}=A.storeToRefs(n),o=Hn(A.pinia),s=l,h=a,c=e.ref(""),d=e.computed(()=>h==null?void 0:h.children),m=e.computed(()=>{var L,E,x,w;return((L=h==null?void 0:h.children)==null?void 0:L.length)>0&&((E=h==null?void 0:h.children)!=null&&E.every(g=>g==null?void 0:g.layout))?(w=(x=h==null?void 0:h.children)==null?void 0:x[0])==null?void 0:w.layout:"vertical"}),b=L=>{c.value=L,s("radioChange",L)},u=e.computed(()=>{var L,E;return((E=(L=h==null?void 0:h.children)==null?void 0:L[0])==null?void 0:E.isGridLayout)||!1}),C=e.ref((h==null?void 0:h.level)+1),M=e.computed(()=>{if(!(h!=null&&h.children)||!Array.isArray(h.children)||h.children.length<2)return!1;const L=h.children.some(x=>(x==null?void 0:x.name)==="测量系统配置表"&&(x==null?void 0:x.comp)==="ParentItem"),E=h.children.some(x=>(x==null?void 0:x.name)==="测量系统传递表"&&(x==null?void 0:x.comp)==="ParentItem");return L&&E}),k=e.computed(()=>{var E,x,w,g,S,$;let L=(E=h==null?void 0:h.children)==null?void 0:E.filter(V=>V==null?void 0:V.choice);if(o.setSelectTab((x=L==null?void 0:L[0])==null?void 0:x.choiceName),(c==null?void 0:c.value)!=="")return(w=h==null?void 0:h.children)==null?void 0:w.filter(V=>!(V!=null&&V.choiceName)||(V==null?void 0:V.choiceName)===(c==null?void 0:c.value));{let V=(S=(g=h==null?void 0:h.children)==null?void 0:g.find(ae=>ae==null?void 0:ae.choice))==null?void 0:S.choiceName;return($=h==null?void 0:h.children)==null?void 0:$.filter(ae=>!(ae!=null&&ae.choiceName)||(ae==null?void 0:ae.choiceName)===V)}}),W=L=>{const E=(L==null?void 0:L.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(x=>{const w=typeof x=="string"?x:JSON.stringify(x);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>h==null?void 0:h.children,()=>{M.value},{deep:!0});const I=L=>{s("rowClick",L)},j=(L,E)=>{s("routeUrl",L,E)};return(L,E)=>u.value?(e.openBlock(),e.createBlock(e.unref(ru),{key:0,layout:d.value,"onUpdate:layout":E[0]||(E[0]=x=>d.value=x),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(x,w)=>(e.openBlock(),e.createBlock(e.unref(Mo),{key:x.i,x:x.x,y:x.y,"min-h":x.minH,"max-h":x.maxH,"min-w":x.minW,w:x.w,h:x.h,i:x.i},{default:e.withCtx(()=>{var g,S,$,V,ae,Z,ge,ze,F,ne,J,se,Be,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[(($=(S=x==null?void 0:x.component)==null?void 0:S.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((V=x==null?void 0:x.component)!=null&&V.name)?(e.openBlock(),e.createElementBlock("div",av,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((ae=x==null?void 0:x.component)==null?void 0:ae.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)((Z=x==null?void 0:x.component)==null?void 0:Z.comp)),{pageLayout:m.value,config:{showIndex:(ge=e.unref(cr)[w])==null?void 0:ge.showIndex,allowMove:(ze=e.unref(cr)[w])==null?void 0:ze.allowMove,viewport:(F=e.unref(cr)[w])==null?void 0:F.viewport,status:(ne=e.unref(cr)[w])==null?void 0:ne.status},related:x==null?void 0:x.relatedTables,compName:x==null?void 0:x.component.name,compNames:e.unref(_c),itemData:(J=x==null?void 0:x.component)==null?void 0:J.compData,childItemData:(se=x==null?void 0:x.component)==null?void 0:se.itemChildData,key:e.unref(jn),cacheNewData:e.unref(wc),onChange:e.unref(To),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(No),onPageChange:e.unref(Ao),parentTableId:(Be=x==null?void 0:x.component)==null?void 0:Be.tableId,allMapContents:e.unref(kt),children:($e=x==null?void 0:x.component)==null?void 0:$e.children,level:C.value,onRowClick:I,onRouteUrl:j,onClickTrigger:e.unref(Sc),onClickMainKey:e.unref(Ec),onRadioChange:b},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(k.value,(x,w)=>{var g,S;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(x==null?void 0:x.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(w)===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[((S=x==null?void 0:x.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&x.name?(e.openBlock(),e.createElementBlock("div",lv,[W(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(x.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)(x.comp)),{compName:x.name,groupNames:x==null?void 0:x.nameContents,config:{showIndex:x==null?void 0:x.showIndex,allowMove:x==null?void 0:x.allowMove,viewport:x==null?void 0:x.viewport,status:x==null?void 0:x.status},itemData:x==null?void 0:x.compData,related:x==null?void 0:x.relatedTables,childItemData:x==null?void 0:x.itemChildData,key:e.unref(jn),onChange:e.unref(To),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(No),onPageChange:e.unref(Ao),parentTableId:x==null?void 0:x.tableId,allMapContents:e.unref(kt),children:x==null?void 0:x.children,level:C.value,onRowClick:I,onRouteUrl:j,onRadioChange:b},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),nv=Xl._export_sfc(rv,[["__scopeId","data-v-bafbdd45"]]),iv={class:"radio-group-container"},ov=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(),s=Hn(A.pinia),{selectTab:h}=A.storeToRefs(s);e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=h.value},{immediate:!0,deep:!0});const c=d=>{o.value=d,r("radioChange",o.value)};return(d,m)=>(e.openBlock(),e.createElementBlock("div",iv,[e.createVNode(nl.ssRadio,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=b=>o.value=b),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),tv=Xl._export_sfc(ov,[["__scopeId","data-v-177d64c3"]]),nu=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),sv={TABLE:Tc,FORM:xs,STATICFORM:Nc,TABLEOPERATE:Zh,TABLESTYLE:v2,TABLEEXTEND:y2,TABLEINTERACTION:k2,FORMOPERATE:ws,FOLD:J2,CALCULATOR:l4,METHODBUTTON:i4,AVATARUPLOAD:ls.ssAvatar,SIGNATURE:ls.ssSignature,FORMTOP:xs,STEP:y4,STEPOPERATE:F2,TIMELINE:_4,TIMELINEOPERATE:K2,FORMTOPOPERATE:ws,SIGNATUREOPERATE:h4,AVATARUPLOADOPERATE:s4,TABS:C4,TABSOPERATE:d6,CHART:C6,CHARTOPERATE:R6,LAYOUT:P6,LAYOUTOPERATE:Y6,PARENTITEM:nv,RADIO:tv};function Ti(a){return sv[a==null?void 0:a.toUpperCase()]||null}exports.De=ru;exports.activeStepInfo=Si;exports.addContents=Ki;exports.addVisibleDialog=Dt;exports.affixItems=D0;exports.allMapContents=kt;exports.analyzeMenu=ac;exports.cacheNewData=wc;exports.clickMainKey=Ec;exports.clickSavePage=C0;exports.clickStep=Dc;exports.clickTrigger=Sc;exports.compId=jn;exports.compNames=_c;exports.compShow=Bi;exports.existLayouts=O0;exports.fixChangeValue=Oo;exports.generateLayouts=d2;exports.getComponent=Ti;exports.getComponents=Gi;exports.getPageConstruct=Yd;exports.getPageData=Gr;exports.getSliceContLength=F0;exports.gridRowHeight=o2;exports.gridRowHeightHmPg=i2;exports.isStepLayout=Bc;exports.onBack=S0;exports.onButtonChange=A0;exports.onChange=To;exports.onClick=E0;exports.onClickStep=L0;exports.onContentChange=No;exports.onExtendTaskEnd=I0;exports.onOk=z0;exports.onPageBack=$0;exports.onPageChange=Ao;exports.onSelectFixContent=_0;exports.renderShowItems=kc;exports.showItems=cr;exports.sliceTableLength=xc;exports.slotContent=nu;exports.ssTable=Tc;exports.st=Mo;exports.stepItems=j0;exports.tabChange=R0;exports.toolBar=M0;exports.useFormComp=Ct;exports.useModelLoader=Ef;exports.verifyButton=V0;
25
+ ${kr}`,duration:5e3,showClose:!0})}else Ua.ElMessage.success("导出成功")}else Ua.ElMessage.error(((Za=$l==null?void 0:$l.data)==null?void 0:Za.message)||"导出失败")}catch(_a){console.error("导出paraform失败:",_a),Ua.ElMessage.error("导出失败:"+((_a==null?void 0:_a.message)||"未知错误"))}finally{Ea.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((ba=Hl.value)==null?void 0:ba.length)===0)return Ua.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((Qa=Me.value)==null?void 0:Qa.length)===0)return Ua.ElMessage.warning("暂无数据导出");let Ea=["序号",...(Ra=(ge=F.value)==null?void 0:ge.map(Re=>Re==null?void 0:Re.prop))==null?void 0:Ra.filter(Re=>Re!=="操作")],_a=p==="导出全部"?Me.value:Hl.value;const T=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];_a=_a==null?void 0:_a.map(Re=>Object.fromEntries(Object.entries(Re).filter(([ia])=>!T.includes(ia)))),Ea=["序号",...Ea],_a=_a==null?void 0:_a.map((Re,ia)=>({序号:ia+1,...Re}));let G=(u==null?void 0:u.compName)||"表格信息";Fo(_a,G,Ea,G)}else if(p==="OCR识别")dl.value=!0,$a.value=[],Ma.value=1,Je.value.clear(),ie.value.clear(),Xe.value=0;else if(p==="迁移")f.selectRow=v,f.show=!0;else if(p==="生成方法"){let Ea=await Zf(v),_a;v!==""?_a=[v]:_a=A.cloneDeep(Me.value),_a=_a==null?void 0:_a.map(G=>(G.输出值=Ea,G));const T={fixContent:_a,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};ze("change",T)}else if(((ga=B==null?void 0:B.extra)==null?void 0:ga.type)==="methodButton"){let Ea;v!==""?Ea=[v]:Ea=A.cloneDeep(Me.value);const T={fixContent:await mt(Ea,F==null?void 0:F.value,"Manual",Me.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};ze("change",T)}}},ou=async(p,v)=>{var B,z,P,D,re,le,q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za,ba,Qa,ge;try{let Ra,ga;const Ea=(B=de.value[Se.value+S])==null?void 0:B.filter(Na=>{var rl;return((rl=Na==null?void 0:Na.key)==null?void 0:rl.type)==="structureMethod"}),_a=(z=de.value[Se.value+S])==null?void 0:z.filter(Na=>{var rl;return((rl=Na==null?void 0:Na.key)==null?void 0:rl.type)==="structure"}),T=Ea==null?void 0:Ea.find(Na=>{var rl,qa;return((qa=(rl=Na==null?void 0:Na.value)==null?void 0:rl.pageData)==null?void 0:qa.method)==="保存"});if(!T)return;const G=(le=(re=de.value[(D=(P=T==null?void 0:T.value)==null?void 0:P.pageData)==null?void 0:D.path])==null?void 0:re.filter(Na=>{var rl;return((rl=Na==null?void 0:Na.key)==null?void 0:rl.type)==="data"}))==null?void 0:le.find(Na=>{var rl,qa,fl,hl;return((qa=(rl=Na==null?void 0:Na.value)==null?void 0:rl.tableData)==null?void 0:qa.算法名称)===((hl=(fl=T==null?void 0:T.value)==null?void 0:fl.pageData)==null?void 0:hl.method)});if(!G)return;const Re={buttonName:(we=(q=T==null?void 0:T.value)==null?void 0:q.pageData)==null?void 0:we.method,api:(Ge=(Ee=G==null?void 0:G.value)==null?void 0:Ee.tableData)==null?void 0:Ge.算法体,content:_a==null?void 0:_a.map(Na=>{var rl;return(rl=Na==null?void 0:Na.value)==null?void 0:rl.pageData}),extraContent:[],extraValues:(Qe=(Fe=T==null?void 0:T.value)==null?void 0:Fe.pageData)==null?void 0:Qe.data,methodName:(La=(ka=T==null?void 0:T.value)==null?void 0:ka.pageData)==null?void 0:La.path};if(!p)return;const ia={...p,compData:(Ia=p==null?void 0:p.compData)==null?void 0:Ia.map(Na=>{var rl;return(Na==null?void 0:Na.key)==="formContent"?{...Na,contents:(rl=Na==null?void 0:Na.contents)==null?void 0:rl.map(qa=>(qa==null?void 0:qa.prop)===v?{...qa,value:""}:qa)}:Na})},_e={key:{pageKey:Se.value+S,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ia}},ua=await Ua.axios.post(Re.api,_e,{headers:{"Content-Type":"application/json"}});return((ea=ua==null?void 0:ua.data)==null?void 0:ea.code)===200&&(Ra=(ba=(Za=ua==null?void 0:ua.data)==null?void 0:Za.result)==null?void 0:ba.latestReportCode,ga=(ge=(Qa=ua==null?void 0:ua.data)==null?void 0:Qa.result)==null?void 0:ge.status),{newMainKeyValue:Ra,newStatus:ga}}catch(Ra){throw Ua.ElMessage.error(Ra),new Error(Ra)}},Nt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const tu=async(p,v,B)=>{var q,we;let z=p==null?void 0:p[v==null?void 0:v.prop],P=1,D,re;const le=A.cloneDeep(Se).value+S+z;if(le){Nt.value="",D=(q=de.value[le])==null?void 0:q.filter(Fe=>{var Qe;return((Qe=Fe==null?void 0:Fe.key)==null?void 0:Qe.type)==="structure"});const Ee=D==null?void 0:D.find(Fe=>{var Qe,ka,La;return((La=(ka=(Qe=Fe==null?void 0:Fe.value)==null?void 0:Qe.pageData)==null?void 0:ka.comp)==null?void 0:La.toUpperCase())==="FORM"});re={...(we=Ee==null?void 0:Ee.value)==null?void 0:we.pageData,id:Ee==null?void 0:Ee.id};const Ge=await ou(re,v==null?void 0:v.prop);if(Nt.value=Ge==null?void 0:Ge.newStatus,Ge!=null&&Ge.newMainKeyValue)return Ge==null?void 0:Ge.newMainKeyValue}if(Me.value.some(Ee=>(Ee==null?void 0:Ee[v==null?void 0:v.prop])===z)){const Ee=z;for(;Me.value.some(Ge=>(Ge==null?void 0:Ge[v==null?void 0:v.prop])===`${Ee}(${P})`);)P++;z=`${Ee}(${P})`}return z},su=async(p,v,B)=>{var D,re,le,q;let z,P;if(await tu(B==null?void 0:B.data,B==null?void 0:B.firstCol),z=A.cloneDeep(Se).value+S,P=A.cloneDeep(z)+`loading${((D=ml.value)==null?void 0:D.account)||((re=ml.value)==null?void 0:re.账号)}`,v){const we=(q=(le=de.value[P])==null?void 0:le.filter(Ee=>{var Ge;return((Ge=Ee==null?void 0:Ee.key)==null?void 0:Ge.parentTable)===""}))==null?void 0:q.map(Ee=>{var Ge;return{id:Ee==null?void 0:Ee.id,...(Ge=Ee==null?void 0:Ee.value)==null?void 0:Ge.pageData}});(we==null?void 0:we.length)>0||await ce.loadingConstruct(z,P,null,null,null),sa.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)}else sa.setRouteToChildPath(A.cloneDeep(Se).value),ue.setActiveMenuPath(P)},cu=()=>{$e.value=!1,ye.value=[],fe.value=!1},$i=p=>{var D,re,le,q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za,ba,Qa,ge,Ra,ga,Ea,_a;const v=[];Be.value=A.cloneDeep(F.value),(re=ce.getColumnChild((D=A.cloneDeep(F.value))==null?void 0:D.filter(T=>(T==null?void 0:T.label)!=="操作")))==null||re.forEach((T,G)=>{var Re,ia,_e;T!=null&&T.formType&&((Re=T==null?void 0:T.formType)==null?void 0:Re.toUpperCase())==="SELECT"||T!=null&&T.menuId?v.push({label:(ia=T==null?void 0:T.prop)!=null&&ia.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",name:(T==null?void 0:T.prop)??"t"+G,prop:T==null?void 0:T.prop,type:"Select",value:(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??G,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,multipleLimit:T==null?void 0:T.multipleLimit,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,relatedValueId:T==null?void 0:T.relatedValueId,disabled:T==null?void 0:T.disabled,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,allSelectionContents:(T==null?void 0:T.allSelectionContents)??[],filterContent:T==null?void 0:T.filterContent,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly}):v.push({label:(_e=T==null?void 0:T.prop)!=null&&_e.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",prop:T==null?void 0:T.prop,name:(T==null?void 0:T.prop)??"t"+G,type:!(T!=null&&T.formType)||(T==null?void 0:T.formType)===""?"Input":T==null?void 0:T.formType,value:(T==null?void 0:T.formType)==="Upload"?(p==null?void 0:p[T==null?void 0:T.prop])??"{}":(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??G,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly})}),p===""||!p||(za.value=(p==null?void 0:p.id)??"");let B=ce.getColumnChild((le=A.cloneDeep(F.value))==null?void 0:le.filter(T=>(T==null?void 0:T.label)!=="操作"));Ke.value&&((q=Ke.value)==null?void 0:q.length)>0&&(Ke.value=(we=A.cloneDeep(Ke).value)==null?void 0:we.map(T=>{var Re;let G=(T==null?void 0:T.prop)||((Re=B==null?void 0:B.find(ia=>(ia==null?void 0:ia.label)===(T==null?void 0:T.label)))==null?void 0:Re.prop);return G&&(T.value=p[G]),T})),ya.value=Ke.value&&((Ee=Ke.value)==null?void 0:Ee.length)>0?ce.getTableFormToForm(Ke.value):v,ya.value=((Ge=ya.value)==null?void 0:Ge.map(T=>({...T,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled})))??ya.value;let z=[],P=((ka=(Qe=(Fe=u.itemData)==null?void 0:Fe.filter(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:Qe[0])==null?void 0:ka.contents)??"";if(P=ce.analyzeSplitToContent(P,","),(P==null?void 0:P.length)>0&&(z=P.flat()),(z==null?void 0:z.length)>0){let T=z==null?void 0:z.filter(ua=>ua==null?void 0:ua.includes("@Type"));if(T=T==null?void 0:T[(T==null?void 0:T.length)-1],(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){let ua=(Ia=(La=T==null?void 0:T.replace("=",w))==null?void 0:La.split(w))==null?void 0:Ia[1];((ea=ua==null?void 0:ua.trim())==null?void 0:ea.toUpperCase())==="MANUAL"&&(u==null||u.index,ya.value=(Za=ya.value)==null?void 0:Za.map((Na,rl)=>Na))}let G=(ba=ya.value)==null?void 0:ba.filter(ua=>ua==null?void 0:ua.mainKey),Re;G==null||G.forEach(ua=>{var rl;if(Re!==void 0)return;let Na=ua==null?void 0:ua.menus;((rl=G==null?void 0:G.filter(qa=>qa==null?void 0:qa.mainKey))==null?void 0:rl.length)>1&&(Re=Na,ua==null||ua.groups)});let ia=[],_e=new Map;if(G==null||G.forEach(ua=>{var Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl;if((Na=ua==null?void 0:ua.prop)!=null&&Na.includes(".")){let Bl=[];_e.get(((qa=(rl=ua==null?void 0:ua.prop)==null?void 0:rl.split("."))==null?void 0:qa[0])+(ua!=null&&ua.isMainPath?0:1)+((fl=ua==null?void 0:ua.groups)==null?void 0:fl[0]))&&(Bl=_e.get(((Pl=(hl=ua==null?void 0:ua.prop)==null?void 0:hl.split("."))==null?void 0:Pl[0])+(ua!=null&&ua.isMainPath?0:1)+((Ha=ua==null?void 0:ua.groups)==null?void 0:Ha[0]))),Bl.push(ua),_e.set(((Fa=(kl=ua==null?void 0:ua.prop)==null?void 0:kl.split("."))==null?void 0:Fa[0])+(ua!=null&&ua.isMainPath?0:1)+((cl=ua==null?void 0:ua.groups)==null?void 0:cl[0]),Bl)}else{let Bl=[];_e.get("normal"+(ua!=null&&ua.isMainPath?0:1)+((Ka=ua==null?void 0:ua.groups)==null?void 0:Ka[0]))&&(Bl=_e.get("normal"+(ua!=null&&ua.isMainPath?0:1)+((ul=ua==null?void 0:ua.groups)==null?void 0:ul[0]))),Bl.push(ua),_e.set("normal"+(ua!=null&&ua.isMainPath?0:1)+((Sl=ua==null?void 0:ua.groups)==null?void 0:Sl[0]),Bl)}}),ia=Array.from(_e.values()),(ia==null?void 0:ia.length)>0)for(let ua in ia){let Na=ia==null?void 0:ia[ua];if((Na==null?void 0:Na.length)!==1){if((Na==null?void 0:Na.length)>1){let rl=Na==null?void 0:Na.map(cl=>cl==null?void 0:cl.prop),qa=Na==null?void 0:Na.map(cl=>cl==null?void 0:cl.label),fl=Na==null?void 0:Na.map(cl=>cl==null?void 0:cl.value),hl=(Qa=A.cloneDeep(Na))==null?void 0:Qa[0],Pl=(ge=ya.value)==null?void 0:ge.findIndex(cl=>(cl==null?void 0:cl.prop)===(hl==null?void 0:hl.prop)),Ha=(Ra=ya.value)==null?void 0:Ra.slice(0,Pl),kl=(Ea=ya.value)==null?void 0:Ea.slice(Pl,(ga=ya.value)==null?void 0:ga.length);hl.label=qa==null?void 0:qa.join("·"),hl.value=fl==null?void 0:fl.join(" "),hl.value.trim()===""&&(hl.value=""),hl.prop=rl==null?void 0:rl.join("·");let Fa=Na==null?void 0:Na.map(cl=>{var Ka;return(Ka=cl==null?void 0:cl.words)==null?void 0:Ka.join(".")});hl.relatedWords=Fa,hl.usingType="parent",kl.unshift(hl),ya.value=[...Ha,...kl],ya.value=(_a=ya.value)==null?void 0:_a.map(cl=>(rl!=null&&rl.find(Ka=>Ka===(cl==null?void 0:cl.prop))&&(cl.isFormColHidden=!0,cl.relatedWords=Fa),cl))}}}}},uu=()=>{var v;const p=(v=o.value)==null?void 0:v.$el;p&&Tl.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:B=>{var re;const{oldIndex:z,newIndex:P}=B;if(z===P)return;const D=fn.value.splice(z,1)[0];fn.value.splice(P,0,D),F.value=(re=F.value)==null?void 0:re.slice().sort((le,q)=>{if(le.label==="操作")return 1;if(q.label==="操作")return-1;const we=fn.value.findIndex(Ge=>Ge.label===le.label),Ee=fn.value.findIndex(Ge=>Ge.label===q.label);return we-Ee})}})};e.onMounted(()=>{da.value=window.innerWidth-240*2,window.addEventListener("keydown",Xi)});const du=()=>{e.nextTick(()=>{uu()})},pu=()=>{c.value=!0},nt=(p,v)=>{var z;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let B;return p.children=(z=p.children)==null?void 0:z.map(P=>{var D,re;if((P==null?void 0:P.id)===za.value){let le={};for(let q in P){let we=(D=v==null?void 0:v.find(Ee=>(Ee==null?void 0:Ee.prop)===q))==null?void 0:D.label;we?le[q]=(re=ar.value)==null?void 0:re[we]:le[q]=P[q]??""}P=Object.assign(le,ar.value),B=P}else{let le=nt(P,v);P=le==null?void 0:le.contents,B=le==null?void 0:le.currentSelectContents}return P}),{contents:p,currentSelectContents:B}},At=(p,v)=>{let B,z;return p!=null&&p.find(P=>(P==null?void 0:P.id)===za.value)?B=p==null?void 0:p.map(P=>{var D,re,le;if((P==null?void 0:P.id)===za.value){let q={};for(let Ee in P){let Ge=(D=v==null?void 0:v.find(Fe=>(Fe==null?void 0:Fe.prop)===Ee))==null?void 0:D.label;Ge?q[Ee]=((re=ar.value)==null?void 0:re[Ge])??"":q[Ee]=P[Ee]??""}let we=ar.value;for(let Ee in q)(le=ar.value)!=null&&le[Ee]||(we[Ee]=(q==null?void 0:q[Ee])??"");P=we,z=P}return P}):B=p==null?void 0:p.map(P=>{var D,re,le,q;if((P==null?void 0:P.id)===za.value){let we={};for(let Ee in P){let Ge=(D=v==null?void 0:v.find(Fe=>(Fe==null?void 0:Fe.prop)===Ee))==null?void 0:D.label;Ge?we[Ee]=(re=ar.value)==null?void 0:re[Ge]:we[Ee]=P[Ee]??""}P=Object.assign(we,ar.value),z=P}else P=(le=nt(P,v))==null?void 0:le.contents,z=(q=nt(P,v))==null?void 0:q.currentSelectContents;return P}),{newContents:B,currentSelectContents:z}},zt=(p,v,B)=>{var z,P;return p[v==null?void 0:v.prop]=B,typeof p.id=="number"&&(p.id=(z=p.id)==null?void 0:z.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(zt)),p},Mt=p=>{var B;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((B=p.children)==null||B.forEach(z=>{v.push(...Mt(z))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(z=>{const P={...z};return delete P.children,P}):[]},so=["Pacific6000数据采集装置.通道号","通道号"],Vi=p=>{if(!p)return"";const v=so.map(B=>p==null?void 0:p[B]).find(B=>B!=null&&String(B).trim()!=="");return v==null?"":String(v).trim()},it=async(p,v=void 0)=>{if(!p)return!1;try{const B=Qe=>{var ka,La,Ia;return Qe?typeof(Qe==null?void 0:Qe.value)=="string"?Qe.value:((Ia=(La=(ka=Qe==null?void 0:Qe._custom)==null?void 0:ka.value)==null?void 0:La.value)==null?void 0:Ia.value)||"":""},z=Array.isArray(Yl.value)?Yl.value:[],P=B(z.find(Qe=>(Qe==null?void 0:Qe.condition)==="child")),D=(Se.value||"").replace(/\/+$/,""),re=P?`${D}/${P}`:D,le=await Gr(re||Se.value,!1),q=String(na.value||"").trim(),we=Qe=>String(Qe||"").trim(),Ee=(Qe,ka=[],La="")=>{if(!Array.isArray(Qe))return ka;for(const Ia of Qe){const ea=we((Ia==null?void 0:Ia.choiceName)||(Ia==null?void 0:Ia.name0)||La);(Ia==null?void 0:Ia.comp)==="Table"&&(!q||ea===q)&&ka.push(Ia),Array.isArray(Ia==null?void 0:Ia.children)&&Ee(Ia.children,ka,ea),Array.isArray(Ia==null?void 0:Ia.tab)&&Ee(Ia.tab,ka,ea),Array.isArray(Ia==null?void 0:Ia.choice)&&Ee(Ia.choice,ka,ea)}return ka},Ge=Ee(le||[]),Fe=String((u==null?void 0:u.compName)||"");return Ge.some(Qe=>{var La,Ia;const ka=((Ia=(La=Qe==null?void 0:Qe.compData)==null?void 0:La.find(ea=>(ea==null?void 0:ea.key)==="tableContents"))==null?void 0:Ia.contents)||[];return!Array.isArray(ka)||ka.length===0?!1:ka.some(ea=>{if(String((Qe==null?void 0:Qe.name)||"")===Fe&&(ea==null?void 0:ea.id)===v)return!1;const ba=Vi(ea);return!!ba&&ba===p})})}catch{return(Me.value||[]).some(z=>{if((z==null?void 0:z.id)===v)return!1;const P=Vi(z);return!!P&&P===p})}},Pi=async(p=!0,v,B)=>{var we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za,ba,Qa,ge,Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl;if(ar.value){const Fa=(Ee=ce.getColumnChild((we=A.cloneDeep(F.value))==null?void 0:we.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")))==null?void 0:Ee.filter(Ka=>(Ka==null?void 0:Ka.required)===!0);for(let Ka=0;Ka<((Fa==null?void 0:Fa.length)??0);Ka++){const ul=Fa[Ka],Sl=ul==null?void 0:ul.prop,Bl=(ul==null?void 0:ul.label)??Sl,Dr=(Ge=ar.value)==null?void 0:Ge[Sl];if(Dr===""||Dr===null||Dr===void 0||Array.isArray(Dr)&&Dr.length===0){Ua.ElMessage.error(`${Bl}不能为空`);return}}const cl=Vi(ar.value);if(cl&&await it(cl,za.value||void 0)){Ua.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=ce.getColumnChild((Fe=A.cloneDeep(F.value))==null?void 0:Fe.filter(Fa=>(Fa==null?void 0:Fa.label)!=="操作")),P,D=A.cloneDeep(Me.value);if(!ar.value){Y.value=!1;return}if(za.value===""){Ca.value++;let Fa;Fa={id:Ca.value.toString()};try{Fa.sort=Xn(0,Me.value||[])}catch{}Fa!=null&&Fa.children&&(Fa={...Fa,children:(Qe=Fa.children)==null?void 0:Qe.map(Ka=>zt(Ka,v,B))});const cl=Object.assign(ar.value,Fa);D.unshift(cl),P=cl}else D=(ka=At(D,z))==null?void 0:ka.newContents,P=(La=At(D,z))==null?void 0:La.currentSelectContents;const re=(Ia=u.itemData)==null?void 0:Ia.filter(Fa=>(Fa==null?void 0:Fa.key)==="childTree")[0];if(((ea=re==null?void 0:re.contents)==null?void 0:ea.length)>0){he.value="编辑";const Fa=[];D==null||D.forEach((ul,Sl)=>{var Dr;let Bl={};if(Array.isArray(ul)){let $l=[];ul==null||ul.filter(wl=>!(wl!=null&&wl.id)).forEach((wl,Ml)=>{var Jl,zl,Gl,or,ql,br,Qr;if((zl=(Jl=Vl.value)==null?void 0:Jl[Ml])!=null&&zl.prop&&!Array.isArray(wl)){let kr={};kr[Vl.value[Ml].column]=wl,R!=null&&R.value&&((Gl=R==null?void 0:R.value)==null?void 0:Gl.length)>0&&((or=R==null?void 0:R.value)!=null&&or.find(pr=>JSON.stringify(pr==null?void 0:pr[0])===JSON.stringify(kr)))&&($l=(ql=R==null?void 0:R.value)==null?void 0:ql.find(pr=>JSON.stringify(pr==null?void 0:pr[0])===JSON.stringify(kr))),$l&&$l.length>0?Bl[Vl.value[Ml].prop]=$l!=null&&$l.find(pr=>{var mr;return((mr=Object.keys(pr))==null?void 0:mr[0])===Vl.value[Ml].column})?(br=$l==null?void 0:$l.find(pr=>{var mr;return((mr=Object.keys(pr))==null?void 0:mr[0])===Vl.value[Ml].column}))==null?void 0:br[Vl.value[Ml].column]:wl:Bl[Vl.value[Ml].prop]=wl}else Array.isArray(wl)&&((Qr=Vl.value[Ml])!=null&&Qr.prop?Bl[Vl.value[Ml].prop]=wl:Bl.children=yt(wl,Vl.value))})}else Bl=ul;if(Array.isArray(ul)&&ul.some($l=>$l==null?void 0:$l.id)){const $l=(Dr=ul==null?void 0:ul.find(wl=>wl.id))==null?void 0:Dr.id;Fa.push(Object.assign(Bl,{id:io($l)}))}else Bl.id?Fa.push(Bl):Fa.push(Object.assign(Bl,{id:Sl.toString()}))});const cl=(Me.value||[]).map(ul=>String(ul==null?void 0:ul.id)),Ka=ui(Fa,cl);Me.value=Rt(Ka,re,F.value)}Ot(Me.value),Vr.value=Me.value;const le=Lf(Vr.value,sn.value,D);let q=[];if(H.value?(q=(Za=A.cloneDeep(H).value.singleContent)==null?void 0:Za.filter(Fa=>(Fa==null?void 0:Fa.id)!==(P==null?void 0:P.id)),q.push(P)):q=[P],Ll.value){const Fa={content:le,singleContent:((ba=re==null?void 0:re.contents)==null?void 0:ba.length)>0?q==null?void 0:q.flatMap(Mt):q,index:u==null?void 0:u.index,buttonName:"编辑",column:F.value,parentTableId:u==null?void 0:u.parentTableId};sa.setCacheUpdatingData(Fa)}if((Qa=F.value)==null||Qa.forEach(Fa=>{(Fa==null?void 0:Fa.formType)==="Upload"&&(P[Fa.prop]=P[Fa.prop]===""?"{}":typeof P[Fa.prop]!="string"?JSON.stringify(P[Fa.prop]):P[Fa.prop])}),p){(Ea=(ga=(Ra=(ge=u.itemData)==null?void 0:ge.find(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType"))==null?void 0:Ra.value)==null?void 0:ga.find(Ka=>(Ka==null?void 0:Ka.value)==="onConditionContents"))==null||Ea.content;let Fa=(_a=u.itemData)==null?void 0:_a.filter(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType");Fa=Array.from(new Map(Fa.filter(Boolean).map((Ka,ul)=>[Ka.value,{...Ka,_idx:ul}])).values()).sort((Ka,ul)=>Ka._idx-ul._idx).map(({_idx:Ka,...ul})=>ul),Fa=(T=Fa==null?void 0:Fa[(Fa==null?void 0:Fa.length)-1])==null?void 0:T.value;const cl={fixContent:[P],buttonName:he.value,relatedContents:u==null?void 0:u.related,columns:F.value,name:u==null?void 0:u.groupNames};sa.setTableLoading(u==null?void 0:u.index),Y.value=!1,ar.value=void 0,ze("change",cl)}if((ia=(Re=(G=ya.value)==null?void 0:G[0])==null?void 0:Re.optionUrl)!=null&&ia.menuId){Y.value=!1;let Fa=(_e=u.itemData)==null?void 0:_e.filter(cl=>(cl==null?void 0:cl.key)==="filterAllType");if((Fa==null?void 0:Fa.length)>0){let cl=Fa==null?void 0:Fa.map(Sl=>Sl==null?void 0:Sl.value),Ka=(rl=(Na=(ua=cl.flat().find(Sl=>{var Bl;return(Bl=Sl==null?void 0:Sl.content)==null?void 0:Bl.includes("@Num")}))==null?void 0:ua.content)==null?void 0:Na.split(":"))==null?void 0:rl[1];((hl=(fl=(qa=cl.flat().find(Sl=>{var Bl;return(Bl=Sl==null?void 0:Sl.content)==null?void 0:Bl.includes("@Type:")}))==null?void 0:qa.content)==null?void 0:fl.split(":"))==null?void 0:hl[1])!=="Manual"&&(Ka=parseInt(Ka),Me.value=(kl=Me.value)==null?void 0:kl.slice(((Pl=Me.value)==null?void 0:Pl.length)-Ka,(Ha=Me.value)==null?void 0:Ha.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",Xi),F.value=[],Me.value=[],Be.value=[],Ta.value=[],Ke.value=[],aa.value=[],ye.value=[],pe.value=[],ya.value=[],Hl.value=[],o.value=null,Ln.value=""});const co=async(p,v,B)=>{var Qe,ka,La,Ia,ea,Za,ba,Qa,ge,Ra,ga,Ea,_a;vr.value=(B==null?void 0:B.prop)??(B==null?void 0:B.property);const z=A.cloneDeep(u.itemData),P=((Qe=z==null?void 0:z.find(T=>(T==null?void 0:T.key)==="header"))==null?void 0:Qe.contents)??[];let D=P==null?void 0:P.find((T,G)=>{var Re,ia,_e;return(T==null?void 0:T.prop)===vr.value||(T==null?void 0:T.label)===vr.value||(G==null?void 0:G.toString())===((_e=(ia=(Re=vr.value)==null?void 0:Re.split("a"))==null?void 0:ia[1])==null?void 0:_e.toString())});const re=ce.getColumnChild((ka=A.cloneDeep(F.value))==null?void 0:ka.filter(T=>(T==null?void 0:T.label)!=="操作"));if(D||(D=re==null?void 0:re.find(T=>(T==null?void 0:T.prop)===vr.value||(T==null?void 0:T.label)===vr.value)),D&&!((La=D==null?void 0:D.menus)!=null&&La.length)&&!((Ia=D==null?void 0:D.groups)!=null&&Ia.length)&&!((ea=D==null?void 0:D.words)!=null&&ea.length)){const T=(Za=ya.value)==null?void 0:Za.find(G=>(G==null?void 0:G.prop)===vr.value);T&&(D={...D,menus:(T==null?void 0:T.menus)??(D==null?void 0:D.menus),groups:(T==null?void 0:T.groups)??(D==null?void 0:D.groups),words:(T==null?void 0:T.words)??(D==null?void 0:D.words),bindMenus:(T==null?void 0:T.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(T==null?void 0:T.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(T==null?void 0:T.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(T==null?void 0:T.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((ba=ya==null?void 0:ya.value)==null||ba.forEach(T=>{var G,Re,ia,_e,ua;(T==null?void 0:T.prop)===(D==null?void 0:D.prop)&&(T!=null&&T.endChildMenu)&&((G=D==null?void 0:D.prop)!=null&&G.includes(".")&&((ia=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ia[0])!==((ua=(_e=T==null?void 0:T.prop)==null?void 0:_e.split("."))==null?void 0:ua[0])?D.endChildMenu=T==null?void 0:T.value:D.endChildMenu=T==null?void 0:T.endChildMenu)})),!D)return;const le=vr.value,q=(Qa=Me.value)==null?void 0:Qa.findIndex(T=>(T==null?void 0:T.id)===(v==null?void 0:v.id));q!==-1&&le&&(Me.value[q]={...Me.value[q],[le]:p});const we=T=>{Array.isArray(T)&&T.forEach(G=>{Array.isArray(G==null?void 0:G.allSelectionContents)&&G.allSelectionContents.length>0&&(G.contactValue=Me.value[q]??v),Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&we(G.children)})};we(F.value),D.value=p,D.endChildMenu=D.endChildMenu||"";let Ee=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const Ge=T=>{Array.isArray(T)&&T.forEach(G=>{var ia,_e;if(((G==null?void 0:G.type)==="Select"||(G==null?void 0:G.formType)&&G.formType.toUpperCase()==="SELECT"||(G==null?void 0:G.columnType)&&G.columnType.toUpperCase()==="SELECT")&&Array.isArray(G==null?void 0:G.menus)&&G.menus.length>0&&G.menus[G.menus.length-1]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const ua=(ia=G==null?void 0:G.prop)!=null&&ia.includes(".")?G.prop.split(".")[0]:null,Na=(_e=D==null?void 0:D.prop)!=null&&_e.includes(".")?D.prop.split(".")[0]:null;(!ua||!Na||ua===Na)&&(G.endChildMenu=Ee)}Array.isArray(G==null?void 0:G.children)&&G.children.length>0&&Ge(G.children)})};if(Ge(F.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let T=D!=null&&D.relatedContents&&((ge=D==null?void 0:D.relatedContents)==null?void 0:ge.length)>0?(Ra=D==null?void 0:D.relatedContents)==null?void 0:Ra.find(G=>{var Re,ia,_e,ua;return(G==null?void 0:G[(ua=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ua[((_e=(ia=D==null?void 0:D.prop)==null?void 0:ia.split("."))==null?void 0:_e.length)-1]])===(D==null?void 0:D.value)}):await us(D);if(T){const G={...v};re==null||re.forEach(Re=>{var ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl;(Re==null?void 0:Re.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((ia=D==null?void 0:D.relatedContents)==null?void 0:ia.length)>0?(_e=Re==null?void 0:Re.prop)!=null&&_e.includes(".")&&((Na=(ua=Re==null?void 0:Re.prop)==null?void 0:ua.split("."))==null?void 0:Na[0])===((qa=(rl=D==null?void 0:D.prop)==null?void 0:rl.split("."))==null?void 0:qa[0])?G[Re.prop]=T[(Ha=(fl=Re==null?void 0:Re.prop)==null?void 0:fl.split("."))==null?void 0:Ha[((Pl=(hl=Re==null?void 0:Re.prop)==null?void 0:hl.split("."))==null?void 0:Pl.length)-1]]??G[Re.prop]:G[Re.prop]=(T==null?void 0:T[Re.prop])??G[Re.prop]:ce.same((D==null?void 0:D.menus)??[],(Re==null?void 0:Re.menus)??[])&&ce.same((D==null?void 0:D.groups)??[],(Re==null?void 0:Re.groups)??[])&&!ce.same((D==null?void 0:D.words)??[],(Re==null?void 0:Re.words)??[])?(kl=Re==null?void 0:Re.prop)!=null&&kl.includes(".")&&((cl=(Fa=Re==null?void 0:Re.prop)==null?void 0:Fa.split("."))==null?void 0:cl[0])!==((ul=(Ka=D==null?void 0:D.prop)==null?void 0:Ka.split("."))==null?void 0:ul[0])||(G[Re.prop]=(T==null?void 0:T[(Sl=Re==null?void 0:Re.words)==null?void 0:Sl.join(".")])??(T==null?void 0:T[Re.prop])??G[Re.prop]):(!(Re!=null&&Re.isMainPath)&&ce.same((D==null?void 0:D.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),G[Re.prop]=(T==null?void 0:T[Re.prop])??G[Re.prop]))}),Me.value=(ga=A.cloneDeep(Me.value))==null?void 0:ga.map(Re=>(Re==null?void 0:Re.id)===(v==null?void 0:v.id)?{...G,id:Re==null?void 0:Re.id}:Re)}}if((Ea=D==null?void 0:D.optionUrl)!=null&&Ea.menuSelect){let T="";re==null||re.forEach(ia=>{var _e,ua,Na,rl,qa;T===""&&((Na=(ua=(_e=ia==null?void 0:ia.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:ua[1])!=null&&Na.includes("["))&&(T=(qa=(rl=ia==null?void 0:ia.optionUrl)==null?void 0:rl.groupSelect)==null?void 0:qa[1])});let G=await gt(D),Re;if(G==null||G.forEach(ia=>{var _e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl;T===((ua=(_e=D==null?void 0:D.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:ua[1])&&((qa=(rl=(Na=D==null?void 0:D.optionUrl)==null?void 0:Na.groupSelect)==null?void 0:rl[1])!=null&&qa.includes("["))&&((kl=A.cloneDeep(ia))==null?void 0:kl[(Ha=(Pl=(hl=(fl=D==null?void 0:D.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])==null?void 0:Pl.replaceAll("[",""))==null?void 0:Ha.replaceAll("]","")])===(D==null?void 0:D.value)&&(Re=ia)}),Re){const ia={...v};re==null||re.forEach(_e=>{var ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl;(Re!=null&&Re[_e==null?void 0:_e.label]||Re!=null&&Re[(qa=(rl=(Na=(ua=_e==null?void 0:_e.optionUrl)==null?void 0:ua.groupSelect)==null?void 0:Na[1])==null?void 0:rl.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])&&((Pl=(hl=(fl=_e==null?void 0:_e.optionUrl)==null?void 0:fl.groupSelect)==null?void 0:hl[1])!=null&&Pl.includes("["))&&(ia[_e.prop]=(Re==null?void 0:Re[_e==null?void 0:_e.label])||(Re==null?void 0:Re[(cl=(Fa=(kl=(Ha=_e==null?void 0:_e.optionUrl)==null?void 0:Ha.groupSelect)==null?void 0:kl[1])==null?void 0:Fa.replaceAll("[",""))==null?void 0:cl.replaceAll("]","")]))}),Me.value=(_a=A.cloneDeep(Me.value))==null?void 0:_a.map(_e=>(_e==null?void 0:_e.id)===(v==null?void 0:v.id)?{...ia,id:_e==null?void 0:_e.id}:_e)}}},fu=async p=>{var Qe,ka,La,Ia,ea,Za,ba,Qa,ge,Ra,ga,Ea,_a,T;if(!p)return;const v=A.cloneDeep(ar.value||{});ar.value=p;const B=Vi(v),z=Vi(ar.value);if(z&&z!==B&&await it(z,za.value||void 0)){Ua.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),so.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(ar.value||{},Re)||Object.prototype.hasOwnProperty.call(v||{},Re)){const ia=(v==null?void 0:v[Re])??"";ar.value[Re]=ia,p[Re]=ia}}),ya.value=(ya.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!so.includes(Re.prop))return Re;const ia=(v==null?void 0:v[Re.prop])??"";return{...Re,value:ia,selectValue:ia===""?[]:[ia]}});return}let P=A.cloneDeep(u.itemData);P==null||P.map(G=>{var Re,ia,_e,ua;return(G==null?void 0:G.key)==="header"&&(Array.isArray((Re=G.contents)==null?void 0:Re[0])?G.contents=(_e=ce.getColumnChild((ia=G.contents)==null?void 0:ia[0]))==null?void 0:_e.map((Na,rl)=>{var qa,fl,hl,Pl,Ha,kl;return((hl=(fl=(qa=ya.value)==null?void 0:qa.find(Fa=>(Fa==null?void 0:Fa.prop)===(Na==null?void 0:Na.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Pl=Object.values(p))==null?void 0:Pl[rl])?Na.value=[(Ha=Object.values(p))==null?void 0:Ha[rl]]:Na.value=(kl=Object.values(p))==null?void 0:kl[rl],Na}):G.contents=(ua=G.contents)==null?void 0:ua.map((Na,rl)=>{var qa,fl,hl,Pl,Ha,kl;return((hl=(fl=(qa=ya.value)==null?void 0:qa.find(Fa=>(Fa==null?void 0:Fa.prop)===(Na==null?void 0:Na.prop)))==null?void 0:fl.optionUrl)==null?void 0:hl.multiple)===!0&&!Array.isArray((Pl=Object.values(p))==null?void 0:Pl[rl])?Na.value=[(Ha=Object.values(p))==null?void 0:Ha[rl]]:Na.value=(kl=Object.values(p))==null?void 0:kl[rl],Na})),G});let D=ya.value,re=(Qe=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:Qe.contents;if(vr.value||(D=D==null?void 0:D.map(G=>{var Re;return G.value=G.value??((Re=re==null?void 0:re.find((ia,_e)=>(ia==null?void 0:ia.prop)===(G==null?void 0:G.name)))==null?void 0:Re.value),G})),!er.value)return;let le=A.cloneDeep(vr.value);(ka=vr.value)!=null&&ka.includes("·")&&(vr.value=(Ia=(La=vr.value)==null?void 0:La.split("·"))==null?void 0:Ia[0]);let q=(Za=(ea=P==null?void 0:P.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:ea.contents)==null?void 0:Za.find((G,Re)=>(G==null?void 0:G.prop)===vr.value);(ba=ya==null?void 0:ya.value)==null||ba.forEach(G=>{var Re,ia,_e,ua,Na,rl,qa,fl,hl;(G==null?void 0:G.prop)===(q==null?void 0:q.prop)&&(G!=null&&G.endChildMenu)&&((Re=q==null?void 0:q.prop)!=null&&Re.includes(".")&&((_e=(ia=q==null?void 0:q.prop)==null?void 0:ia.split("."))==null?void 0:_e[0])!==((Na=(ua=G==null?void 0:G.prop)==null?void 0:ua.split("."))==null?void 0:Na[0])?q.endChildMenu=(qa=(rl=G==null?void 0:G.value)==null?void 0:rl.split(" "))==null?void 0:qa[0]:q.endChildMenu=(hl=(fl=G==null?void 0:G.endChildMenu)==null?void 0:fl.split(" "))==null?void 0:hl[0])});let we=q!=null&&q.isMainPath&&(q!=null&&q.mainKey)?q==null?void 0:q.value:"",Ee=D,Ge=J.value;if(Ge!=null&&Ge.find(G=>(q==null?void 0:q.prop)===(G==null?void 0:G.key))&&(Ge=Ge==null?void 0:Ge.filter(G=>(q==null?void 0:q.prop)!==(G==null?void 0:G.key))),Ge!=null&&Ge.find(G=>le===(G==null?void 0:G.key))&&(Ge=Ge==null?void 0:Ge.filter(G=>le!==(G==null?void 0:G.key))),(q==null?void 0:q.formType)==="Select"?Ee=Ee==null?void 0:Ee.map(G=>{var Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul;return(G==null?void 0:G.type)==="Select"&&(((Re=G==null?void 0:G.allSelectionContents)==null?void 0:Re.length)>0&&(G.contactValue=p),((q==null?void 0:q.prop)===(G==null?void 0:G.prop)||le===(G==null?void 0:G.prop))&&q&&(Array.isArray(q.value)&&((ia=q.value)==null?void 0:ia.length)>0&&((_e=q.value)!=null&&_e.every(Sl=>typeof Sl=="string"))?(Ge.push({key:G==null?void 0:G.prop,value:[(Na=q.value)==null?void 0:Na[((ua=q.value)==null?void 0:ua.length)-1]]}),G.selectValue=(rl=Ge==null?void 0:Ge.find(Sl=>(Sl==null?void 0:Sl.key)===(G==null?void 0:G.prop)))==null?void 0:rl.value):Array.isArray(q.value)&&((qa=q.value)==null?void 0:qa.length)===0?(Ge=[],G.selectValue=[],p[G==null?void 0:G.prop]=""):Array.isArray(G.value)&&Ge.push({key:G==null?void 0:G.prop,value:[(fl=G.value)==null?void 0:fl[(G==null?void 0:G.length)-1]]})),((Pl=G==null?void 0:G.menus)==null?void 0:Pl[((hl=G==null?void 0:G.menus)==null?void 0:hl.length)-1])===""&&(q!=null&&q.isMainPath)&&(q!=null&&q.mainKey)&&((Ha=G==null?void 0:G.prop)!=null&&Ha.includes(".")&&((Fa=(kl=G==null?void 0:G.prop)==null?void 0:kl.split("."))==null?void 0:Fa[0])!==((Ka=(cl=q==null?void 0:q.prop)==null?void 0:cl.split("."))==null?void 0:Ka[0])||(G.endChildMenu=(ul=we==null?void 0:we.split(" "))==null?void 0:ul[0]))),G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G}):(q==null?void 0:q.formType)!=="Input"&&(Ee=Ee==null?void 0:Ee.map(G=>(G.value=(p==null?void 0:p[G==null?void 0:G.prop])??(G==null?void 0:G.value),G))),J.value=Ge,Ee!=null&&Ee.some(G=>(G==null?void 0:G.functionName)&&(G==null?void 0:G.functionName)!=="")){let G=await mt([p],F==null?void 0:F.value,"Auto",Me.value),Re=[];(Qa=Ee==null?void 0:Ee.filter(_e=>(_e==null?void 0:_e.functionName)&&(_e==null?void 0:_e.functionName)!==""))==null||Qa.forEach(_e=>{var ua;((ua=_e==null?void 0:_e.functionRelatedWords)==null?void 0:ua.length)>0&&(Re=[...Re,..._e==null?void 0:_e.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(_e=>(_e==null?void 0:_e[0])!=="@");let ia=[];for(let _e in G==null?void 0:G[0])Re!=null&&Re.find(ua=>_e===ua||(_e==null?void 0:_e.includes("."+ua)))&&ia.push(((ge=G==null?void 0:G[0])==null?void 0:ge[_e])!=="");(G==null?void 0:G.length)>0&&ia.every(_e=>_e)&&(Ee=Ee==null?void 0:Ee.map(_e=>{var ua;return _e.value=((ua=G==null?void 0:G[0])==null?void 0:ua[_e==null?void 0:_e.prop])??_e.value,_e})),ar.value=G==null?void 0:G[0]}if(ya.value=Ee,q=Object.assign({},q??{},{relatedWords:(ga=(Ra=ya==null?void 0:ya.value)==null?void 0:Ra.find(G=>(G==null?void 0:G.prop)===(q==null?void 0:q.prop)))==null?void 0:ga.relatedWords}),(q==null?void 0:q.mainKey)&&(q!=null&&q.value)&&(q==null?void 0:q.value)!==""){let G=q!=null&&q.relatedContents&&((Ea=q==null?void 0:q.relatedContents)==null?void 0:Ea.length)>0?(_a=q==null?void 0:q.relatedContents)==null?void 0:_a.find(Re=>{var ia,_e,ua,Na;return(Re==null?void 0:Re[(Na=(ia=q==null?void 0:q.prop)==null?void 0:ia.split("."))==null?void 0:Na[((ua=(_e=q==null?void 0:q.prop)==null?void 0:_e.split("."))==null?void 0:ua.length)-1]])===(q==null?void 0:q.value)}):await us(q);if(G&&JSON.stringify(G)!=="{}"){let Re=Ee;Re=Re==null?void 0:Re.map(_e=>{var ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl,Bl,Dr,$l,wl,Ml,Jl,zl;if((q==null?void 0:q.prop)===(_e==null?void 0:_e.prop))_e.value=(G==null?void 0:G[(ua=_e==null?void 0:_e.words)==null?void 0:ua.join(".")])??(G==null?void 0:G[_e==null?void 0:_e.prop])??G[(fl=(Na=_e==null?void 0:_e.prop)==null?void 0:Na.split("."))==null?void 0:fl[((qa=(rl=_e==null?void 0:_e.prop)==null?void 0:rl.split("."))==null?void 0:qa.length)-1]];else if(q!=null&&q.relatedContents&&((hl=q==null?void 0:q.relatedContents)==null?void 0:hl.length)>0)_e.value=(Pl=_e==null?void 0:_e.prop)!=null&&Pl.includes(".")&&((kl=(Ha=_e==null?void 0:_e.prop)==null?void 0:Ha.split("."))==null?void 0:kl[0])===((cl=(Fa=q==null?void 0:q.prop)==null?void 0:Fa.split("."))==null?void 0:cl[0])?G[(Bl=(Ka=_e==null?void 0:_e.prop)==null?void 0:Ka.split("."))==null?void 0:Bl[((Sl=(ul=_e==null?void 0:_e.prop)==null?void 0:ul.split("."))==null?void 0:Sl.length)-1]]:(G==null?void 0:G[_e==null?void 0:_e.prop])??(_e==null?void 0:_e.value);else if(ce.same((q==null?void 0:q.menus)??[],(_e==null?void 0:_e.menus)??[])&&ce.same((q==null?void 0:q.groups)??[],(_e==null?void 0:_e.groups)??[])&&!ce.same((q==null?void 0:q.words)??[],(_e==null?void 0:_e.words)??[]))if((Dr=_e==null?void 0:_e.prop)!=null&&Dr.includes(".")&&((wl=($l=_e==null?void 0:_e.prop)==null?void 0:$l.split("."))==null?void 0:wl[0])!==((Jl=(Ml=q==null?void 0:q.prop)==null?void 0:Ml.split("."))==null?void 0:Jl[0])){let Gl=Object.keys(G);Gl=Gl==null?void 0:Gl.find(or=>{var ql;return or==null?void 0:or.includes("."+((ql=_e==null?void 0:_e.words)==null?void 0:ql.join(".")))}),_e.value=(G==null?void 0:G[Gl])??(G==null?void 0:G[_e==null?void 0:_e.prop])??_e.value}else{let Gl=Object.keys(G);Gl=Gl==null?void 0:Gl.find(or=>{var ql;return or==null?void 0:or.includes("."+((ql=_e==null?void 0:_e.words)==null?void 0:ql.join(".")))}),_e.value=(G==null?void 0:G[(zl=_e==null?void 0:_e.words)==null?void 0:zl.join(".")])??(G==null?void 0:G[Gl])??(G==null?void 0:G[_e==null?void 0:_e.prop])??_e.value}else!(_e!=null&&_e.isMainPath)&&ce.same((q==null?void 0:q.bindMenus)??[],(_e==null?void 0:_e.bindMenus)??[]),_e.value=(G==null?void 0:G[_e==null?void 0:_e.prop])??_e.value;return _e}),ya.value=Re;let ia={};(T=ya.value)==null||T.forEach(_e=>{ia[_e.prop]=_e==null?void 0:_e.value}),ar.value=ia}}er.value=!0,I.value=!1},hu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",vu=p=>{var D,re;const v=(re=(D=Ke.value)==null?void 0:D.find(le=>(le==null?void 0:le.label)===(p==null?void 0:p.label)))==null?void 0:re.multiple,B=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;Me.value.forEach(le=>{const q=le==null?void 0:le[B];v&&Eo.isString(q)&&(le[B]=[q]),!v&&!Eo.isString(q)&&(le[B]="")})},It=(p,v)=>{var B;return v==null||v.forEach(z=>{p[z==null?void 0:z.prop]=z==null?void 0:z.value}),p.children&&((B=p.children)==null?void 0:B.length)>0&&(p.children=p.children.map(z=>It(z,v))),p},ot=p=>{var B,z,P,D,re,le;$i("");const v=(B=ya.value)==null?void 0:B.reduce((q,we)=>(q[we.name]=we.value,q),{});if(((z=Object.keys(v))==null?void 0:z.length)>0){ar.value=v,za.value="",Ca.value=(P=Me.value)==null?void 0:P.length,pe.value=(D=Sa.value)==null?void 0:D.filter(we=>(we==null?void 0:we.label)!=="新增");const q=(le=(re=Be.value)==null?void 0:re.filter(we=>(we==null?void 0:we.label)!=="操作"))==null?void 0:le.map(we=>{var Ge,Fe,Qe;const Ee=(Fe=(Ge=Ke.value)==null?void 0:Ge.find(ka=>(ka==null?void 0:ka.label)===(we==null?void 0:we.label)))==null?void 0:Fe.multiple;return vu(we),{...we,contents:(we==null?void 0:we.options)??[],optionUrl:we!=null&&we.formMenuSelect&&((Qe=we==null?void 0:we.formMenuSelect)==null?void 0:Qe.length)>0?{groupSelect:we==null?void 0:we.groupSelect,menuSelect:we==null?void 0:we.formMenuSelect,selectRelateType:"",type:we==null?void 0:we.formType,multiple:Ee}:null}});F.value=q==null?void 0:q.map(we=>It(we,[{prop:"type",value:"edit"},{prop:"columnType",value:hu(we==null?void 0:we.formType)||(we==null?void 0:we.columnType)}])),p==="createClick"&&(he.value="新增",Pi(!0))}},vi={START:"开始时间",END:"结束时间",HOURS:"工时"},mu=(p,v)=>Number(A.dayjs(v).diff(A.dayjs(p),"day",!0).toFixed(1)),Ot=p=>{var D;const v=u.itemData,B=(D=v==null?void 0:v.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,z=new Map;return B==null||B.forEach((re,le)=>{const{label:q}=re;z.set(q,le)}),!z.has(vi.START)||!z.has(vi.END)||!z.has(vi.HOURS)?p:p==null?void 0:p.map(re=>{const le=re==null?void 0:re[vi.START],q=re==null?void 0:re[vi.END],we=mu(le,q);return le&&q&&(re[vi.HOURS]=`${we}天`),re})},Lt=(p,v,B=0)=>{if(B>((v==null?void 0:v.length)??""))return p;const z=v==null?void 0:v[B],P=new Map;for(const re of p){const le=re[z];P.has(le)||P.set(le,[]),P.get(le)&&P.get(le).push(re)}const D=[];for(const[re,le]of P){const[q,...we]=le,Ee={...q};B+1===((v==null?void 0:v.length)??"")?Ee.children=le==null?void 0:le.map(Ge=>(Ge.level=A.cloneDeep(B)+1,Ge)).filter((Ge,Fe)=>Fe!==0):we.length>0&&(Ee.children=Lt(we,v,B+1)),Ee.level=B,D.push(Ee)}return D},Rt=(p,v,B)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let z=[];return z=Lt(p,v==null?void 0:v.contents,0),z},$t=async(p,v)=>{var Ia,ea,Za,ba,Qa,ge,Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl,Ka,ul,Sl,Bl,Dr,$l,wl,Ml,Jl,zl,Gl,or,ql,br,Qr,kr,pr,mr,Pt,Ft,jt;const B=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="header");p==null||p.filter(ha=>(ha==null?void 0:ha.key)==="tableIndexColumn")[0];const z=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="childTree")[0];let P=!0;if((Za=(ea=(Ia=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:Ia.value)==null?void 0:ea.find(ha=>(ha==null?void 0:ha.value)==="onPamButtonContents"))!=null&&Za.content){let ha=(ge=(Qa=(ba=p==null?void 0:p.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:ba.value)==null?void 0:Qa.find(El=>(El==null?void 0:El.value)==="onPamButtonContents"))==null?void 0:ge.content;ha=(Ra=ha==null?void 0:ha.split(":"))==null?void 0:Ra[1],ha=(ga=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:ga.split(","),P=!!(ha!=null&&ha.find(El=>El==="操作"))}const D=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="page"),re=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="rowButton"),le=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="extraButton"),q=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="tableContents"),we=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="bottomButton"),Ee=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="tableIndex");Ke.value=(_a=(Ea=p==null?void 0:p.filter(ha=>(ha==null?void 0:ha.key)==="tableToForm"))==null?void 0:Ea[0])==null?void 0:_a.contents,Ae.value=(D==null?void 0:D.contents)??!0;let Ge=[];hr.value===""?Ge=B==null?void 0:B[0]:Ge=(B==null?void 0:B.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+hr.value+")"))??(B==null?void 0:B.find(ha=>!(ha!=null&&ha.selectLabel)));let Fe=[];hr.value===""?Fe=Ee==null?void 0:Ee[0]:Fe=(Ee==null?void 0:Ee.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+hr.value+")"))??(Ee==null?void 0:Ee.find(ha=>!(ha!=null&&ha.selectLabel)));let Qe=[],ka=[];if(((T=Ge==null?void 0:Ge.contents)==null?void 0:T.length)>0){let ha=[],El=Ge==null?void 0:Ge.contents;if(Array.isArray(El==null?void 0:El[0])&&((G=El==null?void 0:El[0])!=null&&G.every(Ga=>!(Ga!=null&&Ga.children)))&&(El=El==null?void 0:El[0]),El.some(Ga=>Array.isArray(Ga)&&(Ga==null?void 0:Ga.find(Ye=>Ye.children))))ha=(Re=ce.getGradeColumns(El,P))==null?void 0:Re[0],ha!=null&&ha.find(Ga=>(Ga==null?void 0:Ga.label)==="操作")||ha.push({label:"操作",prop:"operate",type:"operate"});else{let Ga=El.some(Ye=>Array.isArray(Ye))?El==null?void 0:El[0]:El;Ga!=null&&Ga.find(Ye=>(Ye==null?void 0:Ye.label)==="操作")||Ga.push({label:"操作",prop:"operate",type:"operate"}),Ga==null||Ga.forEach((Ye,lr)=>{var Lr,Ur,Ar,ai,gi,bi,Er,Cn,$n,ki,dn,Vn,Wt,Kt,Gt,Yt,Jt,Xt,Zt,Qt,es;if((Ur=(Lr=Se.value)==null?void 0:Lr.split("/"))==null||Ur.forEach(tr=>{var xr,Tn,as;tr!==""&&((as=(Tn=(xr=tr==null?void 0:tr.split(S+"updateLoading"))==null?void 0:xr[0])==null?void 0:Tn.split(S+"loading"))==null||as[0])}),Ye!=null&&Ye.methodContent){let tr=(gi=(ai=(Ar=Ye==null?void 0:Ye.methodContent)==null?void 0:Ar.replace("@","%%#"))==null?void 0:ai.split("%%#"))==null?void 0:gi[1];if(tr=tr==null?void 0:tr.slice(0,(tr==null?void 0:tr.length)-1),tr=ce.contentTransArrayToAllNoExtra(tr??"",","),(bi=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("@Button")))!=null&&bi.includes("Prop")&&((Er=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("Type")))!=null&&Er.includes("Manual"))){let xr=($n=(Cn=tr==null?void 0:tr.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Cn.split(":"))==null?void 0:$n[1];xr=((Vn=(dn=(ki=xr==null?void 0:xr.replaceAll("[",""))==null?void 0:ki.replaceAll("]",""))==null?void 0:dn.split(","))==null?void 0:Vn[1])??"算法执行",Qe.push(xr)}else if((Wt=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("@Button")))!=null&&Wt.includes("Row")&&((Kt=tr==null?void 0:tr.find(xr=>xr==null?void 0:xr.includes("Type")))!=null&&Kt.includes("Manual"))){let xr=(Yt=(Gt=tr==null?void 0:tr.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Gt.split(":"))==null?void 0:Yt[1];xr=((Zt=(Xt=(Jt=xr==null?void 0:xr.replaceAll("[",""))==null?void 0:Jt.replaceAll("]",""))==null?void 0:Xt.split(","))==null?void 0:Zt[1])??"算法执行",ka.push(xr)}}(Qt=Ke.value)==null||Qt.find(tr=>(tr==null?void 0:tr.prop)===(Ye==null?void 0:Ye.prop));let Kr=((es=Ye==null?void 0:Ye.filter)==null?void 0:es.includes("@EditRead=Read"))??!1;ha.push({label:(Ye==null?void 0:Ye.label)==="操作"?P?"操作":"":(Ye==null?void 0:Ye.label)??"",prop:(Ye==null?void 0:Ye.label)==="操作"?"operate":(Ye==null?void 0:Ye.prop)??"a"+lr,width:Ye!=null&&Ye.width?parseInt(Ye.width):"",fixed:(Ye==null?void 0:Ye.fixed)??void 0,sortable:(Ye==null?void 0:Ye.sortable)??!1,filterable:(Ye==null?void 0:Ye.filterable)??!1,operable:(Ye==null?void 0:Ye.operable)??!1,showSummary:(Ye==null?void 0:Ye.showSummary)??!1,align:(Ye==null?void 0:Ye.align)??"left",showOverflowTooltip:(Ye==null?void 0:Ye.showOverflowTooltip)??!0,isNotDrag:(Ye==null?void 0:Ye.isNotDrag)??!1,isEditCol:(Ye==null?void 0:Ye.isEditCol)??!1,isOperate:(Ye==null?void 0:Ye.isOperate)??!1,id:(Ye==null?void 0:Ye.id)??lr,type:(Ye==null?void 0:Ye.label)==="操作"?"operate":void 0,formType:(Ye==null?void 0:Ye.formType)??(Ye!=null&&Ye.groupSelect?"Select":""),disabled:Ye==null?void 0:Ye.disabled,options:(Ye==null?void 0:Ye.options)??[],value:(Ye==null?void 0:Ye.value)??"",isExistChild:(Ye==null?void 0:Ye.isExistChild)??!1,mainKey:(Ye==null?void 0:Ye.mainKey)??lr===0,allSelectionContents:(Ye==null?void 0:Ye.allContents)??[],filterContent:Ye==null?void 0:Ye.filterContents,menus:Ye==null?void 0:Ye.menus,groups:Ye==null?void 0:Ye.groups,words:Ye==null?void 0:Ye.words,filter:Ye==null?void 0:Ye.filter,bindMenus:Ye==null?void 0:Ye.bindMenus,fatherPath:Ye==null?void 0:Ye.fatherPath,isMainPath:Ye==null?void 0:Ye.isMainPath,required:(Ye==null?void 0:Ye.required)??!1,relatedContents:Ye==null?void 0:Ye.relatedContents,functionName:Ye==null?void 0:Ye.functionName,functionRelatedWords:Ye==null?void 0:Ye.functionRelatedWords,calculatorFilter:Ye==null?void 0:Ye.calculatorFilter,relatedPages:Ye==null?void 0:Ye.relatedPages,multiple:(Ye==null?void 0:Ye.multiple)??!1,multipleLimit:Ye==null?void 0:Ye.multipleLimit,isReadonly:Kr})})}j.value=(ia=we==null?void 0:we[0])==null?void 0:ia.contents;const vn=ce.getNewColumnChild(ha),Ht=Ga=>Array.isArray(Ga)?Ga.map(Ye=>(Array.isArray(Ye==null?void 0:Ye.children)&&Ye.children.length>0?(Ye.sortable=!1,Ht(Ye.children)):(Ye==null?void 0:Ye.prop)==="operate"||(Ye==null?void 0:Ye.label)==="操作"||(Ye==null?void 0:Ye.type)==="operate"||(Ye.sortable=!1),Ye)):Ga;Ht(vn),await eo(vn),i0(ne.value,vn),F.value=vn,Ta.value=vn,n.value=(_e=F.value)==null?void 0:_e.map(Ga=>Ga==null?void 0:Ga.label);let mn=(Na=(ua=ce.getAllLeafNodes(F.value))==null?void 0:ua.filter(Ga=>(Ga==null?void 0:Ga.type)!=="operate"))==null?void 0:Na.map((Ga,Ye)=>({prop:(Ga==null?void 0:Ga.prop)??"a"+Ye,column:Ga.label}));Vl.value=mn;let un=[];hr.value===""?un=q==null?void 0:q[0]:un=(q==null?void 0:q.find(Ga=>(Ga==null?void 0:Ga.selectLabel)==="("+hr.value+")"))??(q==null?void 0:q.find(Ga=>!(Ga!=null&&Ga.selectLabel)));let ei=Array.isArray((rl=un==null?void 0:un.contents)==null?void 0:rl[0])&&((qa=un==null?void 0:un.contents)!=null&&qa[0].every(Ga=>Array.isArray(Ga)))?(fl=un==null?void 0:un.contents)==null?void 0:fl[0]:un==null?void 0:un.contents;Fe!=null&&Fe.contents&&((hl=Fe==null?void 0:Fe.contents)==null?void 0:hl.length)!==0&&(ei=(Pl=A.cloneDeep(ei))==null?void 0:Pl.map((Ga,Ye)=>{if(!Array.isArray(Ga)){let lr={};for(let Kr in Ga)Kr!=="id"&&Kr!=="index"&&(lr[Kr]=Ga[Kr]);Ga=Object.values(lr)}return Ga}));const Tu=!!((Ha=F.value)!=null&&Ha.find(Ga=>Ga.prop==="index"));ei=dc(ei,Fe==null?void 0:Fe.contents,Tu);const mi=[];ei==null||ei.forEach((Ga,Ye)=>{var Kr;let lr={};if(Array.isArray(Ga)){let Lr=[];Ga==null||Ga.filter(Ur=>!(Ur!=null&&Ur.id)).forEach((Ur,Ar)=>{var ai,gi,bi,Er,Cn,$n;if((ai=mn==null?void 0:mn[Ar])!=null&&ai.prop&&!Array.isArray(Ur)){let ki={};ki[mn[Ar].column]=Ur,R!=null&&R.value&&((gi=R==null?void 0:R.value)==null?void 0:gi.length)>0&&((bi=R==null?void 0:R.value)!=null&&bi.find(dn=>JSON.stringify(dn==null?void 0:dn[0])===JSON.stringify(ki)))&&(Lr=(Er=R==null?void 0:R.value)==null?void 0:Er.find(dn=>JSON.stringify(dn==null?void 0:dn[0])===JSON.stringify(ki))),Lr&&Lr.length>0?lr[mn[Ar].prop]=Lr!=null&&Lr.find(dn=>{var Vn;return((Vn=Object.keys(dn))==null?void 0:Vn[0])===mn[Ar].column})?(Cn=Lr==null?void 0:Lr.find(dn=>{var Vn;return((Vn=Object.keys(dn))==null?void 0:Vn[0])===mn[Ar].column}))==null?void 0:Cn[mn[Ar].column]:Ur:lr[mn[Ar].prop]=Ur}else Array.isArray(Ur)&&(($n=mn[Ar])!=null&&$n.prop?lr[mn[Ar].prop]=Ur:lr.children=yt(Ur,mn))})}else lr=Ga;if(Array.isArray(Ga)&&Ga.some(Lr=>Lr==null?void 0:Lr.id)){const Lr=(Kr=Ga==null?void 0:Ga.find(Ur=>Ur.id))==null?void 0:Kr.id;mi.push(Object.assign(lr,{id:io(Lr)}))}else lr.id?mi.push(lr):mi.push(Object.assign(lr,{id:Ye.toString()}))});try{const Ga=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ye=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),lr=Ga==null?void 0:Ga.tableId,Kr=Ga==null?void 0:Ga.compIndex;if(lr&&Array.isArray(Ye)&&Ye.length>0&&String(lr)===String(u==null?void 0:u.parentTableId)&&String(Kr)===String(u==null?void 0:u.index)){const Lr=new Set(mi.map(Ar=>String(Ar==null?void 0:Ar.id))),Ur=Ye.filter(Ar=>!Lr.has(String(Ar)));if(Ur.length>0){const Ar=Ga==null?void 0:Ga.pageKey,ai=Ar!=null&&Ar.startsWith("/")?Ar.substring(1):Ar;((v==null?void 0:v[Ar])||(v==null?void 0:v[ai])||[]).filter(Er=>{var Cn,$n;return((Cn=Er==null?void 0:Er.key)==null?void 0:Cn.type)==="data"&&String(($n=Er==null?void 0:Er.key)==null?void 0:$n.tableId)===String(lr)&&Ur.includes(Er==null?void 0:Er.id)}).forEach(Er=>{var Cn;Lr.has(String(Er==null?void 0:Er.id))||(mi.push({id:Er==null?void 0:Er.id,...((Cn=Er==null?void 0:Er.value)==null?void 0:Cn.tableData)||{}}),Lr.add(String(Er==null?void 0:Er.id)))})}}}catch{}let yi=null;try{const Ga=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ye=JSON.parse(sessionStorage.getItem(Ga)||"null");Array.isArray(Ye)&&Ye.length>0&&(yi=new Set(Ye.map(lr=>String(lr))))}catch{}const Ut=Array.from(((kl=Oa.value)==null?void 0:kl.values())||[]).filter(Ga=>!(!(Ga!=null&&Ga._isOCRRow&&(Ga==null?void 0:Ga._ocrTableId)===(u==null?void 0:u.index))||yi&&yi.has(String(Ga==null?void 0:Ga.id)))),Nu=(Me.value||[]).map(Ga=>String(Ga==null?void 0:Ga.id)),qt=ui(mi,Nu);if(Me.value=Rt(qt,z,F.value),ma.value=qt,(Fa=ma.value)==null||Fa.forEach(Ga=>{var Ye;(Ye=Oa.value)==null||Ye.set(Ga.id,Ga)}),yi&&yi.size>0)try{const Ga=new Set(Array.from(yi.values()));Me.value=(Me.value||[]).filter(Ye=>!Ga.has(String(Ye==null?void 0:Ye.id))),ma.value=(ma.value||[]).filter(Ye=>!Ga.has(String(Ye==null?void 0:Ye.id))),Ga.forEach(Ye=>{var lr,Kr;try{(Kr=(lr=Oa.value)==null?void 0:lr.delete)==null||Kr.call(lr,Ye)}catch{}})}catch{}const uo=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),tt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(uo&&Array.isArray(tt)&&tt.length>0&&String(uo==null?void 0:uo.compIndex)===String(u==null?void 0:u.index)){const Ga=new Set((ma.value||[]).map(Ye=>String(Ye==null?void 0:Ye.id)));tt.filter(Ye=>!Ga.has(String(Ye)))}if(Ut.length>0){const Ga=new Set((Me.value||[]).map(lr=>lr==null?void 0:lr.id)),Ye=Ut.filter(lr=>!Ga.has(lr.id));Ye.length>0&&(Me.value=[...Me.value||[],...Ye],ma.value=[...ma.value||[],...Ye],Ye.forEach(lr=>{var Kr;return(Kr=Oa.value)==null?void 0:Kr.set(lr.id,lr)}))}}else F.value=[],Be.value=[],Me.value=[],ma.value=[],Oa.value=new Map;if(ka=[...new Set(ka)],ka=ka==null?void 0:ka.map(ha=>({label:ha,type:"methodButton"})),((cl=re==null?void 0:re.contents)==null?void 0:cl.length)>0?aa.value=re==null?void 0:re.contents:aa.value=[],aa.value=[...aa.value,...ka],Qe=[...new Set(Qe)],Qe=Qe==null?void 0:Qe.map(ha=>({label:ha,type:"methodButton"})),((Ka=le==null?void 0:le.contents)==null?void 0:Ka.length)>0)if((Bl=(Sl=(ul=p==null?void 0:p.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:ul.value)==null?void 0:Sl.find(ha=>(ha==null?void 0:ha.value)==="onButtonContents"))!=null&&Bl.content){let ha=(wl=($l=(Dr=p==null?void 0:p.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:Dr.value)==null?void 0:$l.find(El=>(El==null?void 0:El.value)==="onButtonContents"))==null?void 0:wl.content;if(ha=(Ml=ha==null?void 0:ha.split(":"))==null?void 0:Ml[1],ha=(Jl=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:Jl.split(","),pe.value=(zl=le==null?void 0:le.contents)==null?void 0:zl.filter(El=>ha==null?void 0:ha.find(vn=>vn===(El==null?void 0:El.label))),Sa.value=(Gl=le==null?void 0:le.contents)==null?void 0:Gl.filter(El=>ha==null?void 0:ha.find(vn=>vn===(El==null?void 0:El.label))),(or=le==null?void 0:le.contents)!=null&&or.some(El=>(El==null?void 0:El.label)==="OCR识别")&&!((ql=pe.value)!=null&&ql.some(El=>(El==null?void 0:El.label)==="OCR识别"))){const El=(br=le==null?void 0:le.contents)==null?void 0:br.find(vn=>(vn==null?void 0:vn.label)==="OCR识别");pe.value=[...pe.value,El],Sa.value=[...Sa.value,El]}W.value=!!(ha!=null&&ha.find(El=>El==="搜索")),V.value=!!(ha!=null&&ha.find(El=>El==="块状显示"))}else pe.value=le==null?void 0:le.contents,Sa.value=le==null?void 0:le.contents;else pe.value=[],Sa.value=[];pe.value=[...pe.value,...Qe],Sa.value=[...Sa.value,...Qe],typeof Se.value=="string"&&Se.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((Qr=pe.value)!=null&&Qr.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(pe.value=[...pe.value||[],{label:"OCR识别"}]),(kr=Sa.value)!=null&&kr.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(Sa.value=[...Sa.value||[],{label:"OCR识别"}])):(pe.value=(pe.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别"),Sa.value=(Sa.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别")),(pr=pe.value)!=null&&pr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(pe.value=[...pe.value||[],{label:"切换视图"}]),(mr=Sa.value)!=null&&mr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(Sa.value=[...Sa.value||[],{label:"切换视图"}]),Ca.value=((Pt=Me==null?void 0:Me.value)==null?void 0:Pt.length)??0,Ot(Me.value),Vr.value=Me.value,Ll.value&&(F.value=(jt=(Ft=Be.value)==null?void 0:Ft.filter(ha=>(ha==null?void 0:ha.label)!=="操作"))==null?void 0:jt.map(ha=>{var El;return{...ha,type:"edit",optionUrl:ha!=null&&ha.formMenuSelect&&((El=ha==null?void 0:ha.formMenuSelect)==null?void 0:El.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}}),ot())};e.watch(()=>[u.itemData,hr.value,Yr.value,sn.value,R==null?void 0:R.value],async()=>{var p,v,B,z,P,D;if((p=u==null?void 0:u.itemData)!=null&&p.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((v=X.value)!=null&&v.find(re=>{var le,q;return(re==null?void 0:re.key)===((q=(le=u==null?void 0:u.itemData)==null?void 0:le.find(we=>(we==null?void 0:we.key)==="columnPath"))==null?void 0:q.contents)}))){let re=X.value,le={key:(z=(B=u==null?void 0:u.itemData)==null?void 0:B.find(q=>(q==null?void 0:q.key)==="columnPath"))==null?void 0:z.contents,value:(D=(P=u==null?void 0:u.itemData)==null?void 0:P.find(q=>(q==null?void 0:q.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(q=>(q==null?void 0:q.key)===(le==null?void 0:le.key))?re=re==null?void 0:re.map(q=>((q==null?void 0:q.key)===(le==null?void 0:le.key)&&(q.value=le.value),q)):re.push(le),sa.setTableViewContents(re)}await $t(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.operatingForm,p=>{p!=null&&p.form&&($i(p==null?void 0:p.form),he.value=p==null?void 0:p.dialogTitle,Ve.value=!0,Y.value=!0)},{immediate:!0,deep:!0});const yu=()=>{var p;(p=k.value)!=null&&p.includes("read")&&(Ll.value=!Ll.value)},gu=()=>{Sr.value=!Sr.value};e.watch(()=>{var p;return(p=u==null?void 0:u.config)==null?void 0:p.viewport},p=>{var v;k.value=p,(p==null?void 0:p.length)===0?Ll.value=!1:(p!=null&&p.includes("read")||(Ll.value=!0),p!=null&&p.includes("edit")||(Ll.value=!1)),M.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Ll.value},{immediate:!0}),e.watch(()=>Ll.value,p=>{var v;p?(ot("viewChange"),sa.setCacheUpdatingData(null)):(pe.value=Sa.value,F.value=Ta.value,H.value&&(sa.setTableLoading(u==null?void 0:u.index),ze("change",H.value))),M.value=p||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),Hl.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=bn.value)==null?void 0:p.length},p=>{p===0&&(be.currentPage=1)}),e.watch(()=>u==null?void 0:u.compNames,p=>{f.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const bu=(p,v)=>{var B;ot("createClick"),v===be.pageSize&&(be.currentPage=Math.ceil(((B=Me.value)==null?void 0:B.length)/be.pageSize))},ku=async(p,v,B)=>{var P,D,re,le,q;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(z&&so.includes(z)&&B!==void 0&&B!==null&&String(B).trim()!==""){const we=String(B).trim();if(await it(we,p==null?void 0:p.id)){Ua.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ge=(P=Me.value)==null?void 0:P.findIndex(Qe=>(Qe==null?void 0:Qe.id)===(p==null?void 0:p.id)),Fe=Ge!==-1?(re=(D=Me.value)==null?void 0:D[Ge])==null?void 0:re[z]:void 0;z&&(p[z]=Fe??"");return}}if(Ll.value){const we=p==null?void 0:p.id;we!=null&&(h.value.has(we)||h.value.set(we,A.cloneDeep(p)),s.value.add(we));const Ee=(le=Me.value)==null?void 0:le.findIndex(Ge=>(Ge==null?void 0:Ge.id)===(p==null?void 0:p.id));Ee!==-1&&z&&(Me.value[Ee]={...Me.value[Ee],[z]:B}),co(B,p,v);return}co(B,p,v),ar.value=A.cloneDeep(p),za.value=p==null?void 0:p.id,Ca.value=(q=Me.value)==null?void 0:q.length,he.value=p!=null&&p._isTemp?"新增":"编辑",Pi(!1)},xu=async()=>{var p,v;try{const B=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const P=z.split("_")[1];P&&(B.push(`content_${P}`),B.push(`struct_${P}`))}})),B.length===0&&(u!=null&&u.itemData)){const z=(v=(p=u.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;z&&(B.push(`content_${z}`),B.push(`struct_${z}`))}return B}catch(B){return console.error("获取 tableNames 失败:",B),[]}},wu=async(p,v,B)=>{var D,re;if(!B||typeof B!="string"||B.trim()===""){const le=(v==null?void 0:v.property)??(v==null?void 0:v.prop),q=`${p==null?void 0:p.id}:${le}`;d.value.delete(q),b.value.set(q,!1);return}const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${z}`;b.value.set(P,!0);try{const le=await xu();if(le.length===0){console.warn("未找到同名表,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const q=parseInt((D=ml.value)==null?void 0:D.plat_id);if(!q){console.warn("platId 无效,跳过全局搜索"),d.value.delete(P),b.value.set(P,!1);return}const we=await A.getAllTables({platId:q,tableNames:le??[]}),Ee=((re=we==null?void 0:we.data)==null?void 0:re.result)||[],Ge=[],Fe=[];for(let Qe=0;Qe<Ee.length;Qe+=2)Qe+1<Ee.length&&Fe.push([Ee[Qe],Ee[Qe+1]]);Fe.forEach(([Qe,ka])=>{var Qa;if(!Array.isArray(Qe)||Qe.length===0||!Array.isArray(ka)||ka.length===0)return;const La=ka[0];let Ia=((Qa=La==null?void 0:La.结构)==null?void 0:Qa.contents)??[];if(!Array.isArray(Ia)||Ia.length===0)return;let ea=A.cloneDeep(Ia);if(Array.isArray(ea==null?void 0:ea[0])&&(ea=ce.getColumnChild(ea[0])),!Array.isArray(ea)||ea.length===0||!ea.some(ge=>(ge==null?void 0:ge.prop)===z))return;[...Qe].sort((ge,Ra)=>{const ga=Number((ge==null?void 0:ge.update_time)??0);return Number((Ra==null?void 0:Ra.update_time)??0)-ga}).slice(0,20).forEach(ge=>{const Ra=ge[z];if(Ra!=null){const ga=String(Ra);ga.toLowerCase().includes(B.toLowerCase())&&Ge.findIndex(_a=>{var T;return ge.id&&((T=_a.rowData)==null?void 0:T.id)===ge.id?!0:_a.label===ga})===-1&&Ge.push({label:ga,rowData:A.cloneDeep(ge),sourceTable:(La==null?void 0:La.source_table)||""})}})}),d.value.set(P,Ge)}catch(le){console.error("全局搜索建议失败:",le),d.value.delete(P)}finally{b.value.set(P,!1)}},_u=(p,v,B)=>{if(!Ll.value)return;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const D=`${p==null?void 0:p.id}:${z}`;if(m.has(D)&&clearTimeout(m.get(D)),!B||B.trim()===""){d.value.delete(D),b.value.set(D,!1);return}const re=setTimeout(()=>{wu(p,{prop:z,property:z},B),m.delete(D)},300);m.set(D,re)};function Su(p,v){const B=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return d.value.get(B)||[]}const Eu=(p,v,B)=>{var we;if(!B||!B.rowData)return;const z=B.rowData,P=p==null?void 0:p.id,D=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(ce.getAllLeafNodes(F.value)||[]).filter(Ee=>(Ee==null?void 0:Ee.type)!=="operate"&&(Ee==null?void 0:Ee.label)!=="操作"&&(Ee==null?void 0:Ee.prop)!=="operate").forEach(Ee=>{const Ge=Ee==null?void 0:Ee.prop;Ge&&z[Ge]!==void 0&&(p[Ge]=z[Ge])}),(we=Me.value)==null||we.findIndex(Ee=>(Ee==null?void 0:Ee.id)===P),P!=null&&(h.value.has(P)||h.value.set(P,A.cloneDeep(p)),s.value.add(P));const q=`${P}:${D}`;d.value.delete(q),b.value.set(q,!1),co(p[D],p,v)},Zr=p=>{var q,we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za;const{row:v,column:B,item:z,slotData:P}=p;let D=v!=null&&v[B==null?void 0:B.prop]||(v==null?void 0:v[B==null?void 0:B.prop])===0?((we=(q=v==null?void 0:v[B==null?void 0:B.prop])==null?void 0:q[0])==null?void 0:we.contents)??((v==null?void 0:v[B==null?void 0:B.prop])===0?"0":v==null?void 0:v[B==null?void 0:B.prop]):((Ge=(Ee=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ee[0])==null?void 0:Ge.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((Qe=(Fe=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:Fe[0])==null?void 0:Qe.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((Ia=(La=v==null?void 0:v[(ka=z==null?void 0:z.child)==null?void 0:ka.prop])==null?void 0:La[0])==null?void 0:Ia.contents)??(v==null?void 0:v[(ea=z==null?void 0:z.child)==null?void 0:ea.prop]),le=Array.isArray(D)&&!(D!=null&&D.every(ba=>typeof ba=="string"||typeof ba=="number"))?"查看":D;if(le=Array.isArray(le)?le.join(","):le,(B==null?void 0:B.formType)==="Date")if(!le||le===""||le===null||le===void 0)le="";else{const ba=A.dayjs(le,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);le=ba.isValid()?ba.format("YYYYMMDD"):le??""}return Array.isArray(B==null?void 0:B.relatedPages)&&((Za=B==null?void 0:B.relatedPages)==null?void 0:Za.length)>0&&(le="详情页"),le},Cu=p=>{var we,Ee,Ge,Fe,Qe,ka,La,Ia,ea,Za;const{row:v,column:B,item:z,slotData:P}=p;let D=v!=null&&v[B==null?void 0:B.prop]?((Ee=(we=v==null?void 0:v[B==null?void 0:B.prop])==null?void 0:we[0])==null?void 0:Ee.contents)??(v==null?void 0:v[B==null?void 0:B.prop]):((Fe=(Ge=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:Ge[0])==null?void 0:Fe.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((ka=(Qe=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:Qe[0])==null?void 0:ka.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((ea=(Ia=v==null?void 0:v[(La=z==null?void 0:z.child)==null?void 0:La.prop])==null?void 0:Ia[0])==null?void 0:ea.contents)??(v==null?void 0:v[(Za=z==null?void 0:z.child)==null?void 0:Za.prop]);const le=Array.isArray(D)&&!(D!=null&&D.every(ba=>typeof ba=="string"||typeof ba=="number")),q=Array.isArray(D)&&(D==null?void 0:D.find(ba=>ba==null?void 0:ba.url));return le&&q},Du=p=>{var P,D,re,le;if(!(p!=null&&p.column))return!1;const v=Se.value==="试验任务/任务管理",B=(u==null?void 0:u.compName)==="任务列表",z=((D=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:D.includes("@TextRGBA"))||((le=(re=p==null?void 0:p.column)==null?void 0:re.filter)==null?void 0:le.includes("@TextBackRGBA"));return v&&B&&z},Bu=(p,v)=>p.find(B=>Object.values(B).some(z=>z===v));return e.watch(()=>Ne.value,async p=>{if(p){ue.setContentLoading(!0),await e.nextTick();const v=Bu(Me.value,p==null?void 0:p.data);if(!v)return ue.setContentLoading(!1);await Li(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),ue.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>u==null?void 0:u.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(B=>{var z,P,D,re,le;if(换,String(B==null?void 0:B.compId)===String(u==null?void 0:u.index)&&(B!=null&&B.resId)&&((z=B==null?void 0:B.data)!=null&&z.id)){const q=(P=B==null?void 0:B.data)==null?void 0:P.id,we=B==null?void 0:B.resId;if(Me.value=(D=Me.value)==null?void 0:D.map(Ee=>{if((Ee==null?void 0:Ee.id)===q){const Ge={...Ee,id:we};return delete Ge._isOCRRow,delete Ge._ocrTableId,Ge}return Ee}),(le=(re=Oa.value)==null?void 0:re.has)!=null&&le.call(re,q)){const Ge={...Oa.value.get(q)||{},id:we};delete Ge._isOCRRow,delete Ge._ocrTableId,Oa.value.delete(q),Oa.value.set(we,Ge)}al(u==null?void 0:u.index,q,we)}}):String(p==null?void 0:p.compId)===String(u==null?void 0:u.index)&&(Me.value=(v=Me.value)==null?void 0:v.map(B=>{var z;if((B==null?void 0:B.id)===((z=p==null?void 0:p.data)==null?void 0:z.id)){const P={...B,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return B})))},{immediate:!0,deep:!0}),(p,v)=>{var ea,Za,ba,Qa;const B=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),le=e.resolveComponent("el-radio-group"),q=e.resolveComponent("el-checkbox-group"),we=e.resolveComponent("el-button"),Ee=e.resolveComponent("el-icon"),Ge=e.resolveComponent("el-progress"),Fe=e.resolveComponent("el-alert"),Qe=e.resolveComponent("el-table-column"),ka=e.resolveComponent("el-table"),La=e.resolveComponent("el-upload"),Ia=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",U0,[Wr.value?(e.openBlock(),e.createBlock(nl.ssTable,{id:"excel-table",pageObj:be,showIndex:M.value,isTree:(ea=a.compItem)==null?void 0:ea.isTree,summaryInfo:Z,columns:F.value,defaultSort:se,isCardViewport:Sr.value,checkedColumns:n.value,key:Or.value+F.value,tableData:bn.value,isEditViewport:Ll.value,isShowPagination:Ae.value,isShowEdit:!1,isShowDelete:!1,allowSelect:C.value,onDbClickRow:Bn,extraButton:pe.value,rowButton:aa.value,cacheExtraButtons:Sa.value,isClearSelection:((Za=Hl.value)==null?void 0:Za.length)===0,onDoCurrentChange:Ni,onDoSizeChange:Ro,onSortChange:$o,onContentClick:Li,onRowClick:Jo,onSelectChange:qo,onCellChange:ku,onCellInput:_u,onSelectSuggest:Eu,onChange:co,onPreview:ro,onSubmitEditingTable:Zi,onHandleColEditChange:Ji,onHandleColTypeChange:Jr,onClickButton:rt,onAddNewRow:jo,bottomButton:j.value,allowRowAddOrDelete:Zn.value},e.createSlots({headerButton:e.withCtx(ge=>{var Ra,ga,Ea,_a;return[a.showHeader?(e.openBlock(),e.createBlock(xf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(va)===e.unref(Se),filterValues:Yo.value,selectNums:(Ra=Hl.value)==null?void 0:Ra.length,dataNums:(ga=Me.value)==null?void 0:ga.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ge.buttons,menuFilter:(_a=(Ea=a.compItem)==null?void 0:Ea.component)==null?void 0:_a.menuFilter,onButtonClick:v[1]||(v[1]=(T,G,Re)=>rt(T,G,{extra:Re})),columns:F.value,onFilter:oo,onGetImportData:Po,level:a.level,filterShow:W.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ge,Ra,ga,Ea;return[((ge=Me.value)==null?void 0:ge.length)>0&&a.allowOperate&&V.value?(e.openBlock(),e.createElementBlock("div",K0,[(Ra=k.value)!=null&&Ra.includes("read")&&((ga=k.value)!=null&&ga.includes("edit"))&&((Ea=aa.value)!=null&&Ea.some(_a=>(_a==null?void 0:_a.label)==="编辑"))&&!Sr.value&&e.unref(va)!==e.unref(Se)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:yu},[e.createVNode(B,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ge,index:Ra})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ga=>bu(ge,Ra)},[e.createVNode(B,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,G0)]),operateCol:e.withCtx(()=>[e.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:du,onBeforeEnter:pu},{reference:e.withCtx(()=>[e.createElementVNode("span",Y0,[e.createVNode(B,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",J0,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":$.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ge=>ao(ge))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(q,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ge=>n.value=ge),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:o},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fn.value,ge=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ge.label},[e.createVNode(D,{value:ge.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:ge.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(ge.label),9,X0)]),_:2},1032,["value"]),e.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(B,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Ra;return[e.createElementVNode("div",Z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ra=Object.keys(ge))==null?void 0:Ra.filter(ga=>{var Ea;return(Ea=E.value)==null?void 0:Ea.find(_a=>(_a==null?void 0:_a.value)===ga)}),ga=>{var Ea,_a;return e.openBlock(),e.createElementBlock("div",{key:ga},[L[ga]=="radio"?(e.openBlock(),e.createElementBlock("div",Q0,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(le,{"model-value":ge==null?void 0:ge[ga],onChange:T=>Kn(T,ga,ge)},{default:e.withCtx(()=>{var T,G;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((G=(T=E.value)==null?void 0:T.find(Re=>(Re==null?void 0:Re.value)===ga))==null?void 0:G.options,Re=>(e.openBlock(),e.createBlock(re,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),L[ga]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ge==null?void 0:ge[ga],"active-text":(_a=(Ea=E.value)==null?void 0:Ea.find(T=>(T==null?void 0:T.value)===ga))==null?void 0:_a.label,onChange:T=>Kn(T,ga,ge)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",e3,[e.createVNode(B,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(ge=>{var Ra,ga,Ea,_a,T,G,Re,ia,_e,ua,Na,rl,qa,fl,hl,Pl,Ha,kl,Fa,cl;return[((Ra=ge==null?void 0:ge.column)==null?void 0:Ra.label)==="证书附件"||((ga=ge==null?void 0:ge.column)==null?void 0:ga.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",a3,[e.createVNode(B,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ka=>hi(ge),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Cu(ge)?(e.openBlock(),e.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",l3,e.toDisplayString(Zr(ge)),1)]),default:e.withCtx(()=>{var Ka,ul;return[e.createElementVNode("div",r3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ul=ge==null?void 0:ge.row)==null?void 0:ul[(Ka=ge==null?void 0:ge.column)==null?void 0:Ka.prop],Sl=>(e.openBlock(),e.createElementBlock("div",n3,[e.createElementVNode("div",{class:"prop-url",title:Yn(Sl),onClick:Bl=>di(Sl)},e.toDisplayString(Yn(Sl)),9,i3),e.createElementVNode("div",{class:"prop-download",onClick:Bl=>Ko(Sl)}," 下载 ",8,o3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Du(ge)?(e.openBlock(),e.createBlock(Pu,{key:0,value:Zr(ge),columnContent:ge==null?void 0:ge.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(Zr(ge))&&((_a=(Ea=Zr(ge))==null?void 0:Ea.toString())!=null&&_a.includes(".txt")||(G=(T=Zr(ge))==null?void 0:T.toString())!=null&&G.includes(".cpt")||(ia=(Re=Zr(ge))==null?void 0:Re.toString())!=null&&ia.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Zr(ge))&&((ua=(_e=Zr(ge))==null?void 0:_e.toString())!=null&&ua.includes(".txt")||(rl=(Na=Zr(ge))==null?void 0:Na.toString())!=null&&rl.includes(".cpt")||(fl=(qa=Zr(ge))==null?void 0:qa.toString())!=null&&fl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Zr(ge))&&((Pl=(hl=Zr(ge))==null?void 0:hl.toString())!=null&&Pl.includes(".txt")||(kl=(Ha=Zr(ge))==null?void 0:Ha.toString())!=null&&kl.includes(".cpt")||(cl=(Fa=Zr(ge))==null?void 0:Fa.toString())!=null&&cl.includes(".cyd"))?"pointer":"",marginLeft:(ge==null?void 0:ge.colIndex)===0?`${((ge==null?void 0:ge.level)??0)*20}px`:0}),onClick:Ka=>{var ul;return qn(Zr(ge),((ul=ge==null?void 0:ge.column)==null?void 0:ul.relatedPages)??[])}},e.toDisplayString(Zr(ge)===0?"0":Zr(ge)),13,t3))],64))]}),_:2},[((ba=aa.value)==null?void 0:ba.length)>0?{name:"actions",fn:e.withCtx(({item:ge,fIndex:Ra})=>[e.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(B,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",q0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Oi(aa.value,ge),(ga,Ea)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:e.withModifiers(_a=>rt(ga==null?void 0:ga.label,ge,{extra:ga}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:ga==null?void 0:ga.textColor}),class:"extra-button-label"},e.toDisplayString(ga==null?void 0:ga.label),5)],8,W0))),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","allowRowAddOrDelete"])):e.createCommentVNode("",!0),Ll.value?(e.openBlock(),e.createElementBlock("div",s3,[e.createVNode(we,{id:"themeBorderButton",onClick:Uo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(we,{class:"ok-button",id:"themeButton",onClick:zi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:he.value,visible:Y.value,width:nr.value,onBeforeDestroy:lo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",c3,[e.createVNode(nl.ssForm,{ref_key:"formRef",ref:xe,rowContents:ya.value,showOperator:!1,onChange:fu,isEnableWrap:!1,onFixChangeValue:Go,onClickTrigger:Gn,isEdit:pa.value,onBlurChange:Qi,onCreate:ci,onTagChange:zn},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Ve.value?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(we,{onClick:v[4]||(v[4]=ge=>Y.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(we,{class:"ok-button",onClick:v[5]||(v[5]=ge=>Pi(!0)),id:"themeButton"},{default:e.withCtx(()=>v[25]||(v[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:he.value,visible:qe.value,width:da.value,onBeforeDestroy:v[7]||(v[7]=ge=>qe.value=!1)},{default:e.withCtx(()=>[e.createVNode(Mf)]),footer:e.withCtx(()=>[e.createElementVNode("div",d3,[e.createVNode(we,{onClick:v[6]||(v[6]=ge=>qe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(we,{class:"ok-button",onClick:Xo,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ee.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:2,fileDataList:ca.value,onDestroy:Ri},null,8,["fileDataList"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:3,visible:$e.value,onBeforeDestroy:cu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(So.ThreeViewerHost,{files:ye.value,threeData:N.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Br.ssDialog,{title:"OCR扫描录入",visible:dl.value,"close-on-click-modal":!1,onBeforeDestroy:Cl,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[v[38]||(v[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",p3,[e.createElementVNode("div",f3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ma.value===1}])},v[28]||(v[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ma.value===2}])},v[29]||(v[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:Ma.value===3}])},v[30]||(v[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),Ma.value===1?(e.openBlock(),e.createElementBlock("div",h3,[e.createVNode(we,{onClick:t,class:"ocr-action-btn",disabled:ol.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(we,{onClick:ln,class:"ocr-action-btn",disabled:ol.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),Ma.value===1?(e.openBlock(),e.createElementBlock("div",v3,[e.createElementVNode("div",m3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($a.value,(ge,Ra)=>{var ga;return e.openBlock(),e.createElementBlock("div",{key:Ra,class:"ocr-file-item"},[e.createElementVNode("div",y3,[ge.raw&&((ga=ge.raw.type)!=null&&ga.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Ul(ge),alt:"预览",class:"thumbnail-image"},null,8,g3)):(e.openBlock(),e.createElementBlock("div",b3,[e.createVNode(Ee,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Dl(ge)==="uploading",processing:Dl(ge)==="processing",completed:Dl(ge)==="completed"||Dl(ge)==="uploaded",failed:Dl(ge)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",k3,[v[35]||(v[35]=e.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),e.createElementVNode("circle",{class:e.normalizeClass(["progress-ring-fill",{completed:Dl(ge)==="completed"||Dl(ge)==="uploaded",uploading:Dl(ge)==="uploading",processing:Dl(ge)==="processing",failed:Dl(ge)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Dl(ge)==="failed"?"#f56c6c":Dl(ge)==="completed"||Dl(ge)==="uploaded"?"#67c23a":"#409eff","stroke-width":Dl(ge)==="completed"||Dl(ge)==="uploaded"||Dl(ge)==="failed"?3:2,"stroke-dasharray":Xr(ge),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,x3)])),Dl(ge)==="completed"||Dl(ge)==="uploaded"?(e.openBlock(),e.createElementBlock("div",w3,[e.createVNode(Ee,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.check_default))]),_:1})])):e.createCommentVNode("",!0),Dl(ge)==="failed"?(e.openBlock(),e.createElementBlock("div",_3,[e.createVNode(Ee,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>iu(Ra)},[e.createVNode(Ee,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.close_default))]),_:1})],8,S3)]),e.createElementVNode("div",E3,e.toDisplayString(ge.name||"文件名123"),1)])}),128))]),$a.value.length>0?(e.openBlock(),e.createElementBlock("div",C3,[e.createVNode(we,{onClick:ra,class:"ocr-start-recognize-btn",disabled:ol.value||$a.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),Ma.value===1?(e.openBlock(),e.createElementBlock("div",D3,[e.createVNode(Ge,{percentage:Xe.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),Ma.value===2?(e.openBlock(),e.createElementBlock("div",B3,[e.createElementVNode("div",T3,[e.createVNode(Fe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",N3,[e.createVNode(ka,{data:Ze.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Qe,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xa.value,ge=>(e.openBlock(),e.createBlock(Qe,{key:ge.prop,prop:ge.prop,"min-width":ge.minWidth||230,"class-name":ge.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",A3,[e.createElementVNode("span",null,e.toDisplayString(ge.label),1)])]),default:e.withCtx(({row:Ra,$index:ga})=>{var Ea,_a,T;return[ge.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:_l(Ra[ge.prop]),fontWeight:500})},e.toDisplayString(el(Ra[ge.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[il.value!==ga?(e.openBlock(),e.createElementBlock("span",z3,e.toDisplayString(Ra[ge.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Ja(ge.prop)),{key:1,modelValue:Ra[ge.prop],"onUpdate:modelValue":G=>Ra[ge.prop]=G,size:"small",placeholder:"请输入"+ge.label,content:((Ea=Va(ge.prop))==null?void 0:Ea.contents)??((_a=Va(ge.prop))==null?void 0:_a.options)??[],optionUrl:(T=Va(ge.prop))==null?void 0:T.optionUrl,onChange:G=>Wa(ga,ge.prop,G),onFocus:G=>Le.value=ge.prop,onBlur:v[8]||(v[8]=G=>Le.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Qe,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ge})=>[il.value===ge?(e.openBlock(),e.createBlock(Ee,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Ra=>bl(ge),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(B,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Ra=>bl(ge),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),Ma.value===3?(e.openBlock(),e.createElementBlock("div",M3,[e.createVNode(Ee,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ua.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(La,{ref:"ocrUploadRef","file-list":$a.value,"onUpdate:fileList":v[9]||(v[9]=ge=>$a.value=ge),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":He,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[Ma.value!==3?(e.openBlock(),e.createElementBlock("div",I3,[e.createVNode(we,{onClick:hn,class:"ocr-start-recognize-btn",disabled:Ma.value===1||ol.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(we,{onClick:En,class:"ocr-start-recognize-btn",disabled:ol.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Xf,{visible:fi.value,onConfirm:i,onCancel:v[10]||(v[10]=ge=>fi.value=!1)},null,8,["visible"]),e.createVNode(xd,{visible:ll.value,"onUpdate:visible":v[11]||(v[11]=ge=>ll.value=ge),versions:Te.value},null,8,["visible","versions"]),e.createVNode(td,{visible:Pa.value,"onUpdate:visible":v[12]||(v[12]=ge=>Pa.value=ge),images:sl.value,"default-image-name":fr.value,"field-meta":il.value!==null?((Qa=Ze.value[il.value])==null?void 0:Qa.__ocrFieldMeta)||{}:{},"focused-field-name":Le.value,onClose:v[13]||(v[13]=ge=>Pa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Id,{visible:ur.value,"onUpdate:visible":v[14]||(v[14]=ge=>ur.value=ge),candidates:Zl.value,"name-prop":_r.value,"mfr-prop":Nr.value,columns:F.value,onSubmit:gr,onPreviewFile:Qn},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Fd,{visible:Aa.value,"onUpdate:visible":v[15]||(v[15]=ge=>Aa.value=ge),ocrPreviewData:Ze.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ge=>Ze.value=ge),ocrSelectedFields:oa.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ge=>oa.value=ge),ocrPreviewColumns:xa.value,onConfirm:Xa,onFieldChange:v[18]||(v[18]=({rowIndex:ge,prop:Ra,value:ga})=>Wa(ge,Ra,ga))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Br.ssDialog,{title:f.title,visible:f.show,width:f.width,onBeforeDestroy:Q},{default:e.withCtx(()=>[e.createElementVNode("div",O3,[e.createVNode(nl.ssForm,{rowContents:f==null?void 0:f.contents,formRules:f==null?void 0:f.formRules,showOperator:!1,buttonValue:f.buttonValue,isEdit:pa.value,isStartJustify:!1,onOnButtonClick:ke},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Br.ssDialog,{title:"",visible:y.show,width:y.width,alignCenter:!0,onBeforeDestroy:_},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",L3,e.toDisplayString(y.title),1),e.createVNode(Ia,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",R3,[e.createVNode(Ia,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Ln.value||"暂无"),1)]),_:1}),e.createElementVNode("div",$3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y==null?void 0:y.buttonValue,ge=>(e.openBlock(),e.createBlock(we,{key:ge==null?void 0:ge.label,style:e.normalizeStyle({background:ge==null?void 0:ge.background,color:ge==null?void 0:ge.color}),onClick:Ra=>K(ge==null?void 0:ge.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ge==null?void 0:ge.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(wf,{columns:y==null?void 0:y.columns,tableData:y==null?void 0:y.tableData},{content:e.withCtx(({row:ge,item:Ra,slotData:ga,scope:Ea,column:_a,columnProp:T,$index:G})=>[e.createTextVNode(e.toDisplayString((ge==null?void 0:ge[_a==null?void 0:_a.prop])||(ge==null?void 0:ge[_a==null?void 0:_a.label])||(ge==null?void 0:ge[_a==null?void 0:_a.property])||(ga==null?void 0:ga[_a==null?void 0:_a.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Tc=Xl._export_sfc(P3,[["__scopeId","data-v-241be7e2"]]),F3={key:1,class:"static-form-body"},j3=["onClick"],H3={key:1},U3=e.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},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,o=w=>{switch(w){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var $;const w=($=n.itemData)==null?void 0:$.find(V=>(V==null?void 0:V.key)==="formContent"),g=(w==null?void 0:w.contents)||[];return(n.fields&&n.fields.length>0?n.fields:g).filter(V=>(V==null?void 0:V.label)||(V==null?void 0:V.isHideInForm)).map(V=>{let ae=V==null?void 0:V.value;Array.isArray(ae)&&(ae=ae.map(F=>F==null?"":typeof F=="object"?F.label??F.value??F.name??JSON.stringify(F):String(F)).filter(Boolean).join(",")),ae!=null&&typeof ae=="object"&&(ae=ae.label??ae.value??ae.name??JSON.stringify(ae));const Z=V.isHideInForm?"":V.label??"",be=ae==null||ae===""?"-":String(ae),ze=Z==="使用状态";return{label:Z,value:be,isStatus:ze,tagType:ze?o(be):"",width:V.width??1,field:V}})}),h=e.ref(null),c=e.ref(null),d=e.computed(()=>{const w=Number(n==null?void 0:n.textSize),g=ce.rgbaToColor(n==null?void 0:n.textColor),S={},$={},V={},ae={};return!Number.isNaN(w)&&w&&(S.fontSize=`${w}px`,$.fontSize=`${w+1}px`,V.fontSize=`${w}px`,ae.fontSize=`${w}px`),g&&($.color=g,V.color=g,ae.color=g),{item:S,label:$,value:V,empty:ae}}),m=e.ref(""),b=e.ref(""),u=e.ref(!1),C=async w=>{if(w){b.value&&(URL.revokeObjectURL(b.value),b.value="");try{const g=await A.platformDownloadFile({url:w}),S=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});b.value=URL.createObjectURL(S)}catch{b.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,w=>{w&&(m.value=w)},{immediate:!0}),e.watch(m,w=>{C(w)},{immediate:!0});const M=()=>{var w;(w=c.value)==null||w.click()},k=async w=>{var $,V,ae;const g=w.target,S=($=g==null?void 0:g.files)==null?void 0:$[0];if(!S){g.value="";return}u.value=!0;try{const Z=new FormData;Z.append("file",S);const be=await A.platformUploadFile(Z),ze=(ae=(V=be==null?void 0:be.data)==null?void 0:V.result)==null?void 0:ae.url;ze?(m.value=ze,r("update:backGroundImage",ze),C(ze),Ua.ElMessage.success("背景图片上传成功")):Ua.ElMessage.error("背景图片上传失败")}catch{Ua.ElMessage.error("背景图片上传失败")}finally{u.value=!1,g.value=""}},W=e.computed(()=>{var w;return b.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(w=n==null?void 0:n.backgroundUrl)==null?void 0:w.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),I=w=>nl.getComponent(w),j=w=>{if(!w)return;const g=w.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},L=(w,g,S)=>{n.disabled||(h.value=g,e.nextTick(()=>{j(S.currentTarget)}))},E=()=>{h.value=null},x=w=>{const g=w!=null&&w.width&&w.width>0?w.width:1,$=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(w,g)=>{const S=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(W.value),onClick:g[2]||(g[2]=$=>(n==null?void 0:n.backGround)==="Yes"&&M())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=e.withModifiers($=>M(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:k},null,544),g[3]||(g[3]=e.createElementVNode("img",{src:nl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",F3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,($,V)=>{var ae,Z,be,ze,F,ne,J,se,Be;return e.openBlock(),e.createElementBlock("div",{key:V,class:"static-form-item",style:e.normalizeStyle({...x($),...d.value.item}),onClick:g[1]||(g[1]=e.withModifiers(()=>{},["stop"]))},[$.label&&!((ae=$==null?void 0:$.field)!=null&&ae.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(d.value.label)},e.toDisplayString($.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(d.value.value),onClick:$e=>{var fe;return(fe=$.field)!=null&&fe.isNoClick?null:L($,V,$e)}},[h.value===V&&$.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I(((Z=$.field)==null?void 0:Z.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":$e=>$.field.value=$e,isEdit:!0,disabled:(be=$.field)==null?void 0:be.disabled,content:((ze=$.field)==null?void 0:ze.contents)??[],optionUrl:$.field,originalValue:(F=$.field)==null?void 0:F.value,config:(ne=$.field)==null?void 0:ne.config,configModel:((J=$.field)==null?void 0:J.prop)??((se=$.field)==null?void 0:se.name),selectedTagList:((Be=$.field)==null?void 0:Be.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[$.isStatus?(e.openBlock(),e.createBlock(S,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",H3,e.toDisplayString($.value??"-"),1))],64))],12,j3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(d.value.empty)}," 暂无数据 ",4))],4)}}}),Nc=Xl._export_sfc(U3,[["__scopeId","data-v-5937a104"]]),q3={class:"form-content"},W3={title:"选择标签"},K3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},G3={class:"col-operate-wrap"},Y3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},J3={__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(a,{emit:l}){const n=()=>{c.value=!1,d.value=!1,m.value=[]},r=a;e.computed(()=>{var me;const Y=(me=la.value)==null?void 0:me.split("/");return(Y==null?void 0:Y.some(qe=>(qe==null?void 0:qe.includes("updateLoading"))||(qe==null?void 0:qe.includes("loading"))))?!1:$e.value==="view"});const o=l,s=e.ref(""),h=e.ref([]),c=e.ref(!1),d=e.ref(!1),m=e.ref([]),{getFileExtension:b}=So.useThreeSystem(),u=e.ref(),C=e.ref(!1),M=e.ref(!1),k=A.useUnit(A.pinia),{chooseTitle:W}=A.storeToRefs(k),I=e.ref([]),j=e.ref(),L=e.ref(!1),E=e.ref([]),x=uc(A.pinia),w=Ct(A.pinia),g=e.ref(!1),S=e.ref(),$=e.ref(),V=e.ref(),ae=e.ref(),Z=e.ref(),be=A.useLoginState(A.pinia),{loginUserInfo:ze}=A.storeToRefs(be),F=e.ref(),ne=e.ref(!0),J=A.useModelComp(A.pinia),{tableViewContents:se,itemData:Be,isEdit:$e,routeToChildPath:fe,lockingPage:N,homepageBackgroundTableId:oe}=A.storeToRefs(J),U=e.ref(null),De=e.ref(!1),Ie=e.ref(!1),je=A.useMenuState(),{activeMenuPath:la}=A.storeToRefs(je),Ta=ce.useOriginalState(A.pinia),{originalPath:ee}=A.storeToRefs(Ta),{compType:ca,hasEditable:ue}=Ys.useRole(),ta=()=>!ue(r.config,{type:ca.FORM});e.computed(()=>la.value==="设备管理/试验设备"&&r.compName==="设备概要");const Se=async()=>{var me,qe,da;const Y=oe==null?void 0:oe.value,xe=(me=ze==null?void 0:ze.value)==null?void 0:me.plat_id;if(!(!Y||!xe))try{const Ke=await A.getAllTables({platId:parseInt(xe),tableNames:[`content_${Y}`,`struct_${Y}`],user_unique_id:"0"}),aa=((da=(qe=Ke==null?void 0:Ke.data)==null?void 0:qe.result)==null?void 0:da[0])??[],Ve=String((r==null?void 0:r.index)??""),ye=aa==null?void 0:aa.find(pe=>String(pe==null?void 0:pe.relatedForm_id)===Ve);ye!=null&&ye.backgroundImg_url&&(ae.value=ye.backgroundImg_url)}catch(Ke){console.error("获取首页背景图片表数据失败:",Ke)}},te=e.ref([]),Ne=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),We=async Y=>{Ie.value=Y,await de("disabled",null,Y,!0)},sa=async Y=>{await de("operable",null,Y,!0)};e.watch(()=>la.value,async()=>{h.value=[],m.value=[]},{deep:!0,immediate:!0});const Ya=()=>{e.nextTick(()=>{ve()})},R=Y=>{var xe;h.value=(xe=h.value)==null?void 0:xe.map(me=>({...me,isFormColHidden:!(Y!=null&&Y.includes(me.label))}))};e.onUnmounted(()=>{U.value=null});const H=Y=>{o("clickTrigger",Y)},X=async Y=>{var xe,me,qe,da,Ke,aa;if(Y===""){let Ve="";(xe=h.value)==null||xe.forEach(ya=>{ya!=null&&ya.isMain&&(Ve=ya==null?void 0:ya.value)});let ye=await ce.getItemData(fe.value,sessionStorage.getItem("systemKey"),"");Ve=((aa=(Ke=(da=(qe=(me=ye==null?void 0:ye[0])==null?void 0:me.compData)==null?void 0:qe.find(ya=>(ya==null?void 0:ya.key)==="mainRouters"))==null?void 0:da.contents)==null?void 0:Ke[0])==null?void 0:aa.routerContent)+ee.value+Ve;let Sa=await ce.getItemData(Ve,sessionStorage.getItem("systemKey"),"");L.value=!0,E.value=Sa==null?void 0:Sa.filter(ya=>(ya==null?void 0:ya.comp)!=="methodButton"),o("routeUrl",E.value)}},ve=()=>{var xe;const Y=(xe=U.value)==null?void 0:xe.$el;Y&&Tl.Sortable.create(Y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:me=>{const{oldIndex:qe,newIndex:da}=me;if(qe===da)return;const Ke=h.value.splice(qe,1)[0];h.value.splice(da,0,Ke)}})},de=async(Y,xe,me,qe=!1)=>{try{J.setRefreshCurStructure(!1)}catch{Ua.ElMessage.error("编辑处理失败")}},va=async(Y,xe)=>{await de()},na=async(Y,xe)=>{Y&&await de()},Pe=async(Y,xe,me)=>{await de(xe,me,Y,!1)},wa=(Y,xe)=>{F.value===xe?ne.value=!1:ne.value=!0,F.value=xe==null?void 0:xe.changeProp},Me=async Y=>{var aa;ae.value=Y;const xe=r.itemData,me=xe==null?void 0:xe.find(Ve=>(Ve==null?void 0:Ve.key)==="backGroundImage");me?me.contents=Y:xe==null||xe.push({key:"backGroundImage",contents:Y}),o("change",{key:"backGroundImage",contents:Y});const qe=oe==null?void 0:oe.value,da=r==null?void 0:r.index,Ke=(aa=ze==null?void 0:ze.value)==null?void 0:aa.plat_id;if(!(!qe||!Ke||!da||!Y))try{await A.pageBatchAddApi({platId:parseInt(Ke),changeContents:[{tableName:`content_${qe}`,tableContents:[{backgroundImg_url:Y,relatedForm_id:String(da)}]}],user_unique_id:"0"})}catch(Ve){console.error("保存背景图片记录失败:",Ve),Ua.ElMessage.error("背景图片记录保存失败")}},ma=async Y=>{var me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja;let xe=[];if((me=Y==null?void 0:Y.toString())!=null&&me.includes(".urdf")){if(Y.includes(",")){Ua.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:Y,extension:b(Y)}],d.value=!0,c.value=!0;return}if((qe=Y==null?void 0:Y.toString())!=null&&qe.includes(".stl")||(da=Y==null?void 0:Y.toString())!=null&&da.includes(".STL")||(Ke=Y==null?void 0:Y.toString())!=null&&Ke.includes(".obj")||(aa=Y==null?void 0:Y.toString())!=null&&aa.includes(".mtl")){const Rl=((Ve=Y==null?void 0:Y.toString())==null?void 0:Ve.split(",")).map(Da=>({url:Da,extension:b(Da)}));m.value=Rl,d.value=!1,c.value=!0;return}if((ye=Y==null?void 0:Y.toString())!=null&&ye.includes(".stl")||(pe=Y==null?void 0:Y.toString())!=null&&pe.includes(".STL")||(Sa=Y==null?void 0:Y.toString())!=null&&Sa.includes(".obj")||(ya=Y==null?void 0:Y.toString())!=null&&ya.includes(".mtl")){let jl,Rl=[],Da={};if(Array.isArray(Y)?jl=Y:jl=Y==null?void 0:Y.split(","),jl==null||jl.forEach(al=>{al.includes(".mtl")?Rl.push(al):Da.blob=Da.blob?Da.blob+","+al:al}),(Rl==null?void 0:Rl.length)>0&&(Da.mtlBlobs=Rl),(Nl=(vl=Object.values(Da))==null?void 0:vl[0])!=null&&Nl.includes("http:"))xe.push(Da);else{const al=new Blob([Da.blob],{type:"application/octet-stream;charset=UTF-8"});let dl=URL.createObjectURL(al),ol="";(pl=Y==null?void 0:Y.split("/"))==null||pl.forEach(($a,tl)=>{var ll;tl===((ll=Y==null?void 0:Y.split("/"))==null?void 0:ll.length)-1&&(ol=$a)}),(Fl=Da.blob)!=null&&Fl.includes(".stl")&&(ol=(ol==null?void 0:ol.replaceAll(">",""))+".urdf"),j.value=[{name:ol,blobUrl:dl}],M.value=!0}}else{const jl=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Rl=await Ua.axios.get(Y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{jl.close()}),Da=new Blob([Rl.data],{type:"application/octet-stream;charset=UTF-8"});let al=URL.createObjectURL(Da),dl="";(ja=Y==null?void 0:Y.split("/"))==null||ja.forEach((ol,$a)=>{var tl;$a===((tl=Y==null?void 0:Y.split("/"))==null?void 0:tl.length)-1&&(dl=ol)}),j.value=[{name:dl,blobUrl:al}],M.value=!0}(xe==null?void 0:xe.length)>0&&w.setBlobUrls(xe)},Oa=()=>{M.value=!1},za=Y=>{var Ke,aa,Ve,ye;const xe=(aa=(Ke=nl.safeClone(r.itemData))==null?void 0:Ke.find(pe=>(pe==null?void 0:pe.key)==="formContent"))==null?void 0:aa.contents,me=nl.safeClone(Y.content);let qe={};me&&((Ve=Object.values(me))==null?void 0:Ve.length)>0&&((ye=Object.values(me))==null||ye.forEach((pe,Sa)=>{qe[xe[Sa].key]=pe}));const da={content:qe,index:r==null?void 0:r.index,buttonName:Y==null?void 0:Y.buttonName};o("change",da)};e.computed(()=>"http://222.92.178.198:62001");const pa=async Y=>{var vl,Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll,Te,Ma;if(!Y)return;(Nl=(vl=r==null?void 0:r.itemData)==null?void 0:vl.find(Je=>(Je==null?void 0:Je.key)==="parentFormPath"))==null||Nl.contents;let xe=se.value;(xe==null?void 0:xe.length)>0&&(xe=xe==null?void 0:xe.map(Je=>{var Xe,Aa,Ze,xa;let ie=(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.split("/");return(r==null?void 0:r.compName)===(ie==null?void 0:ie[0])&&(Aa=h.value)!=null&&Aa.find(Va=>(Va==null?void 0:Va.prop)===(ie==null?void 0:ie[1]))&&(Je.value=(xa=(Ze=h.value)==null?void 0:Ze.find(Va=>(Va==null?void 0:Va.prop)===(ie==null?void 0:ie[1])))==null?void 0:xa.value),Je}),J.setTableViewContents(xe));const me=nl.safeClone(r.itemData);let qe=me==null?void 0:me.map(Je=>{var ie;return(Je==null?void 0:Je.key)==="formContent"&&((ie=Je.contents)==null||ie.map((Xe,Aa)=>{var Ze,xa,Va,Ja,Ue,fa,oa,il,Le,Pa,sl,fr,ur,Zl,rr,dr,yr,Oe,Ql,_r,Nr;return Xe.type=(xa=(Ze=h.value)==null?void 0:Ze.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:xa.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((Ue=(Ja=(Va=Xe==null?void 0:Xe.key)==null?void 0:Va.split("$"))==null?void 0:Ja[1])==null?void 0:Ue.length)>0?(Le=(il=Ru((oa=(fa=Xe==null?void 0:Xe.key)==null?void 0:fa.split("$"))==null?void 0:oa[1]))==null?void 0:il.split(","))==null?void 0:Le.map(Al=>({label:Al,value:Al})):[],(Pa=Xe==null?void 0:Xe.key)!=null&&Pa.includes("$")&&(Xe.key=(fr=(sl=Xe==null?void 0:Xe.key)==null?void 0:sl.split("$"))==null?void 0:fr[0]),Xe.signature=(Zl=(ur=h.value)==null?void 0:ur.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Zl.signature,Xe.isLoginUser=(dr=(rr=h.value)==null?void 0:rr.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:dr.isLoginUser,Xe.value=(yr=Object.values(Y))==null?void 0:yr[Aa],Xe.isFormColHidden=(Ql=(Oe=h.value)==null?void 0:Oe.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Ql.isFormColHidden,Xe.isHideInForm=(Nr=(_r=h.value)==null?void 0:_r.find(Al=>(Al==null?void 0:Al.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Nr.isHideInForm,Xe})),Je}),da=h.value,Ke=(Fl=(pl=nl.safeClone(qe))==null?void 0:pl.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:Fl.contents;if(da=da==null?void 0:da.map(Je=>{var ie,Xe;return(Je==null?void 0:Je.type)==="Select"&&((ie=Je==null?void 0:Je.allSelectionContents)==null?void 0:ie.length)>0&&(Je.contactValue=Y),Je.value=(Xe=Ke==null?void 0:Ke.find((Aa,Ze)=>((Aa==null?void 0:Aa.id)??Ze)===(Je==null?void 0:Je.id)))==null?void 0:Xe.value,Je}),!ne.value){o("contentChange",{contents:qe,index:r.index});return}let aa="",Ve=(Rl=(jl=(ja=nl.safeClone(qe))==null?void 0:ja.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:jl.contents)==null?void 0:Rl.find((Je,ie)=>{var Xe,Aa,Ze;return(Je==null?void 0:Je.label)===F.value||ie.toString()===((Ze=(Aa=(Xe=F.value)==null?void 0:Xe.split("t"))==null?void 0:Aa[1])==null?void 0:Ze.toString())}),ye=(Da=Ve==null?void 0:Ve.optionUrl)==null?void 0:Da.menuSelect,pe=!0;if((ol=(dl=(al=nl.safeClone(qe))==null?void 0:al.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:dl.contents)==null||ol.forEach(Je=>{var ie,Xe,Aa,Ze,xa,Va;pe&&((Aa=(Xe=(ie=Je==null?void 0:Je.optionUrl)==null?void 0:ie.groupSelect)==null?void 0:Xe[1])!=null&&Aa.includes("["))&&(aa=(xa=(Ze=Je==null?void 0:Je.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:xa[1],JSON.stringify(ye)===JSON.stringify((Va=Je==null?void 0:Je.optionUrl)==null?void 0:Va.menuSelect)&&(pe=!1))}),($a=Ve==null?void 0:Ve.optionUrl)!=null&&$a.menuSelect&&ne.value){let Je=await gt(Ve),ie,Xe=(tl=Ve==null?void 0:Ve.optionUrl)==null?void 0:tl.menuSelect;if(Je==null||Je.forEach(Aa=>{var Ze,xa,Va,Ja,Ue,fa,oa,il,Le,Pa;aa===((xa=(Ze=Ve==null?void 0:Ve.optionUrl)==null?void 0:Ze.groupSelect)==null?void 0:xa[1])&&((Ue=(Ja=(Va=Ve==null?void 0:Ve.optionUrl)==null?void 0:Va.groupSelect)==null?void 0:Ja[1])!=null&&Ue.includes("["))&&((Pa=nl.safeClone(Aa))==null?void 0:Pa[(Le=(il=(oa=(fa=Ve==null?void 0:Ve.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:oa[1])==null?void 0:il.replaceAll("[",""))==null?void 0:Le.replaceAll("]","")])===(Ve==null?void 0:Ve.value)&&(ie=Aa)}),ie){let Aa=nl.safeClone(da);Aa=Aa==null?void 0:Aa.map(xa=>{var Va,Ja,Ue,fa,oa,il,Le,Pa,sl,fr,ur;return(ie!=null&&ie[xa==null?void 0:xa.label]||ie!=null&&ie[(fa=(Ue=(Ja=(Va=xa==null?void 0:xa.optionUrl)==null?void 0:Va.groupSelect)==null?void 0:Ja[1])==null?void 0:Ue.replaceAll("[",""))==null?void 0:fa.replaceAll("]","")])&&((Le=(il=(oa=xa==null?void 0:xa.optionUrl)==null?void 0:oa.groupSelect)==null?void 0:il[1])!=null&&Le.includes("["))&&Xe!=null&&Xe.every(Zl=>{var rr,dr;return(dr=(rr=xa==null?void 0:xa.optionUrl)==null?void 0:rr.menuSelect)==null?void 0:dr.includes(Zl)})&&(xa.value=(ie==null?void 0:ie[xa==null?void 0:xa.label])||(ie==null?void 0:ie[(ur=(fr=(sl=(Pa=xa==null?void 0:xa.optionUrl)==null?void 0:Pa.groupSelect)==null?void 0:sl[1])==null?void 0:fr.replaceAll("[",""))==null?void 0:ur.replaceAll("]","")]),Array.isArray(xa.value)&&xa.value.every(Zl=>(Zl==null?void 0:Zl.url)&&(Zl==null?void 0:Zl.name))&&(xa.type="Upload")),xa}),Aa=Aa==null?void 0:Aa.map(xa=>{var Va,Ja,Ue;return(Va=xa==null?void 0:xa.optionUrl)!=null&&Va.oldMenuSelect&&(xa.optionUrl.menuSelect=(Ue=(Ja=nl.safeClone(xa))==null?void 0:Ja.optionUrl)==null?void 0:Ue.oldMenuSelect),xa}),h.value=nl.safeClone(Aa);let Ze=nl.safeClone(Aa);Ze=Ze==null?void 0:Ze.map(xa=>{var Va,Ja,Ue,fa,oa,il;return(Ja=(Va=xa==null?void 0:xa.optionUrl)==null?void 0:Va.menuSelect)!=null&&Ja.some(Le=>Le==null?void 0:Le.includes("["))&&(xa.optionUrl.oldMenuSelect=(fa=(Ue=nl.safeClone(xa))==null?void 0:Ue.optionUrl)==null?void 0:fa.menuSelect,xa.optionUrl.menuSelect=(il=(oa=xa==null?void 0:xa.optionUrl)==null?void 0:oa.menuSelect)==null?void 0:il.map(Le=>{var Pa,sl,fr,ur;if(Le!=null&&Le.includes("[")){let Zl=(sl=(Pa=Le==null?void 0:Le.replaceAll("[","").replaceAll("]",""))==null?void 0:Pa.split(":"))==null?void 0:sl[1];Le=(ur=(fr=nl.safeClone(Aa))==null?void 0:fr.find(rr=>(rr==null?void 0:rr.label)===Zl))==null?void 0:ur.value}return Le})),xa}),h.value=Ze}else h.value=da;qe=qe==null?void 0:qe.map(Aa=>{var Ze;return(Aa==null?void 0:Aa.key)==="formContent"&&(Aa.contents=(Ze=Aa.contents)==null?void 0:Ze.map(xa=>{var Va,Ja,Ue,fa;return xa.value=((Ja=(Va=h.value)==null?void 0:Va.find(oa=>(oa==null?void 0:oa.label)===(xa==null?void 0:xa.key)))==null?void 0:Ja.value)??(xa==null?void 0:xa.value),xa.type=((fa=(Ue=h.value)==null?void 0:Ue.find(oa=>(oa==null?void 0:oa.prop)===(xa==null?void 0:xa.key)))==null?void 0:fa.type)??(xa==null?void 0:xa.type),xa})),Aa})}ne.value=!1,o("contentChange",{contents:qe,index:r.index});let Sa=[],ya=[];if((Te=nl.safeClone((ll=qe==null?void 0:qe.find(Je=>(Je==null?void 0:Je.key)==="formContent"))==null?void 0:ll.contents))==null||Te.forEach(Je=>{var ie;Array.isArray(Je==null?void 0:Je.value)&&((ie=Je==null?void 0:Je.value)!=null&&ie.find(Xe=>{var Aa;return(Aa=Xe==null?void 0:Xe.url)==null?void 0:Aa.includes(".obj")}))&&(ya=Je==null?void 0:Je.value)}),(ya==null?void 0:ya.length)>0){const Je=(Ma=nl.safeClone(ya))==null?void 0:Ma.filter(ie=>{var Xe;return(Xe=ie==null?void 0:ie.url)==null?void 0:Xe.includes(".obj")});Je==null||Je.forEach(ie=>{var Aa,Ze,xa,Va;const Xe=(Aa=ya==null?void 0:ya.filter(Ja=>{var Ue;return(Ja==null?void 0:Ja.name)===(ie==null?void 0:ie.name)&&((Ue=Ja==null?void 0:Ja.url)==null?void 0:Ue.includes(".mtl"))}))==null?void 0:Aa.map(Ja=>Ja==null?void 0:Ja.url);Sa.push({objUrl:ie==null?void 0:ie.url,mtlUrls:((Ze=ya==null?void 0:ya.filter(Ja=>{var Ue;return(Ja==null?void 0:Ja.name)===(ie==null?void 0:ie.name)&&((Ue=Ja==null?void 0:Ja.url)==null?void 0:Ue.includes(".mtl"))}))==null?void 0:Ze.length)===1?(Va=(xa=ya==null?void 0:ya.filter(Ja=>{var Ue;return(Ja==null?void 0:Ja.name)===(ie==null?void 0:ie.name)&&((Ue=Ja==null?void 0:Ja.url)==null?void 0:Ue.includes(".mtl"))}))==null?void 0:xa[0])==null?void 0:Va.url:Xe})}),w.setObjUrl(Sa)}},Ca=(Y,xe,me)=>{let qe="";const da=xe==null?void 0:xe.map(Ke=>{var aa;return(aa=Ke==null?void 0:Ke.value)==null?void 0:aa.pageData});return da==null||da.forEach(Ke=>{var aa;(Ke==null?void 0:Ke.name)===(Y==null?void 0:Y[0])&&((aa=Ke==null?void 0:Ke.compData)==null||aa.forEach(Ve=>{var ye;(Ve==null?void 0:Ve.key)==="formContent"&&((ye=Ve==null?void 0:Ve.contents)==null||ye.forEach(pe=>{var Sa;(pe==null?void 0:pe.prop)===(Y==null?void 0:Y[1])&&(qe=(pe==null?void 0:pe.value)===""?ce.judgeContents((Sa=nl.safeClone(pe))==null?void 0:Sa.optionUrl,me):pe==null?void 0:pe.value)}))}))}),qe},Ae=(Y,xe,me,qe)=>{var Ve,ye;let da="",Ke="";(Ve=nl.safeClone(xe))==null||Ve.forEach((pe,Sa)=>{pe!=null&&pe.includes("[")?Ke=Ke+ee.value+Y[Sa]:Ke=Ke===""?Ke+pe:Ke+"/"+pe});let aa=(ye=qe[Ke])==null?void 0:ye.map(pe=>{var Sa;return(Sa=pe==null?void 0:pe.value)==null?void 0:Sa.pageData});return aa==null||aa.forEach(pe=>{var Sa;(pe==null?void 0:pe.name)===(me==null?void 0:me[0])&&((Sa=pe==null?void 0:pe.compData)==null||Sa.forEach(ya=>{var vl;(ya==null?void 0:ya.key)==="formContent"&&((vl=ya==null?void 0:ya.contents)==null||vl.forEach(Nl=>{(Nl==null?void 0:Nl.prop)===(me==null?void 0:me[1])&&(da=Nl==null?void 0:Nl.value)}))}))}),da};e.watch(()=>oe==null?void 0:oe.value,async()=>{await Se()},{immediate:!0});const he=async Y=>await Vp(Y,"Auto");return e.watch(()=>r.itemData,async()=>{var Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll,Te,Ma,Je,ie,Xe,Aa,Ze,xa,Va,Ja,Ue,fa,oa,il,Le;const Y=(Nl=r.itemData)==null?void 0:Nl.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent");let xe=(pl=r.itemData)==null?void 0:pl.find(Pa=>(Pa==null?void 0:Pa.key)==="backGround");xe&&((Fl=xe==null?void 0:xe.contents)==null?void 0:Fl.length)>0&&(s.value=((jl=(ja=xe==null?void 0:xe.contents)==null?void 0:ja[0])==null?void 0:jl.url)??"");const me=(Rl=nl.safeClone(r.itemData))==null?void 0:Rl.find(Pa=>(Pa==null?void 0:Pa.key)==="formButton"),qe=(Da=nl.safeClone(r.itemData))==null?void 0:Da.find(Pa=>(Pa==null?void 0:Pa.key)==="formFlex"),da=(al=nl.safeClone(r.itemData))==null?void 0:al.find(Pa=>(Pa==null?void 0:Pa.key)==="formWrap"),Ke=(dl=nl.safeClone(r.itemData))==null?void 0:dl.find(Pa=>(Pa==null?void 0:Pa.key)==="enableWrap"),aa=(ol=nl.safeClone(r.itemData))==null?void 0:ol.find(Pa=>(Pa==null?void 0:Pa.key)==="textSize"),Ve=($a=nl.safeClone(r.itemData))==null?void 0:$a.find(Pa=>(Pa==null?void 0:Pa.key)==="textRGBA"),ye=(tl=nl.safeClone(r.itemData))==null?void 0:tl.find(Pa=>(Pa==null?void 0:Pa.key)==="backGround"),pe=(ll=nl.safeClone(r.itemData))==null?void 0:ll.find(Pa=>(Pa==null?void 0:Pa.key)==="backGroundImage");(da==null?void 0:da.contents)==="纵向"?C.value=!1:C.value=!0;const Sa=Number(aa==null?void 0:aa.contents);S.value=Number.isNaN(Sa)?void 0:Sa,$.value=Ve==null?void 0:Ve.contents,V.value=ye==null?void 0:ye.contents,ae.value=pe==null?void 0:pe.contents;const ya=Ke==null?void 0:Ke.contents;if(ya===void 0?g.value=ri.BLOCK:typeof ya=="boolean"?g.value=ya?ri.ORDINARY:ri.BLOCK:g.value=ya,Z.value=typeof(qe==null?void 0:qe.contents)!="boolean"?!(!(qe!=null&&qe.contents)===""||((Te=qe==null?void 0:qe.contents)==null?void 0:Te.toUpperCase())==="VERTICAL"):qe==null?void 0:qe.contents,((Ma=Y==null?void 0:Y.contents)==null?void 0:Ma.length)>0&&Array.isArray(Y==null?void 0:Y.contents)){let Pa=r.allMapContents;const sl=(ie=(Je=nl.safeClone(Y))==null?void 0:Je.contents)==null?void 0:ie.map((Oe,Ql)=>{var Or,jr,Yr,sn,Yl,hr,qr,ml,nr,Ll,Sr,Hl,vr;let _r=(Oe==null?void 0:Oe.label)??(Oe==null?void 0:Oe.key)??"";Oe==null||Oe.type;let Nr=(Oe==null?void 0:Oe.options)??[];if((Or=Oe==null?void 0:Oe.key)!=null&&Or.includes("$")&&(_r=(jr=nl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:jr[0],((sn=(Yr=nl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Yr[1])==null?void 0:sn.length)>0)){const[er,Wr]=(hr=(Yl=nl.safeClone(Oe==null?void 0:Oe.key).split("$"))==null?void 0:Yl[1])==null?void 0:hr.split(/[()]/);(qr=ce.FormType.find(an=>(an==null?void 0:an.key)===er))==null||qr.value,((ml=Wr==null?void 0:Wr.split(","))==null?void 0:ml.length)>0&&(Nr=(nr=Wr==null?void 0:Wr.split(","))==null?void 0:nr.map(an=>({label:an,value:an})))}let Al=Oe==null?void 0:Oe.options;((Ll=Oe==null?void 0:Oe.optionUrl)==null?void 0:Ll.selectRelateType)==="自定义绑定"&&(Al=(Hl=(Sr=Oe==null?void 0:Oe.optionUrl)==null?void 0:Sr.defaultSelect)==null?void 0:Hl.map(er=>({label:er,value:er})));let Tr=(Oe==null?void 0:Oe.menuPath)??[],Pr=(Oe==null?void 0:Oe.groups)??[],Wl=(Oe==null?void 0:Oe.columns)??[],gr=!1,Ir=(Oe==null?void 0:Oe.isFormColHidden)??!1,Rr="",Vl=Oe!=null&&Oe.value?Oe.value:(Al==null?void 0:Al.length)>0?(vr=Al==null?void 0:Al[0])==null?void 0:vr.value:(Oe==null?void 0:Oe.value)??"",ar=!1,Fr="Input";return((Al==null?void 0:Al.length)>0||(Tr==null?void 0:Tr.length)>0)&&(Fr="Select"),(Array.isArray(Rr)&&(Rr!=null&&Rr.every(er=>(er==null?void 0:er.name)&&(er==null?void 0:er.url)))||Array.isArray(Vl)&&(Vl!=null&&Vl.every(er=>(er==null?void 0:er.name)&&(er==null?void 0:er.url))))&&(Fr="upload"),Oe!=null&&Oe.isMainUrl&&(Fr="Url"),{label:_r??"",name:_r??"t"+Ql,prop:_r??nl.safeClone(Oe==null?void 0:Oe.key),type:(Oe==null?void 0:Oe.type)??Fr,value:(Oe==null?void 0:Oe.type)==="Date"&&Vl===""?new Date:Vl,id:(Oe==null?void 0:Oe.id)??Ql,contents:(Al==null?void 0:Al.length)>0?Al:Nr??[],width:(Oe==null?void 0:Oe.width)??1,isLoginUser:gr,config:Oe==null?void 0:Oe.config,optionUrl:(Oe==null?void 0:Oe.optionUrl)??Oe,isFormColHidden:Ir,isHideInForm:(Oe==null?void 0:Oe.isHideInForm)??!1,signature:ar,isMain:Oe==null?void 0:Oe.isMain,required:(Oe==null?void 0:Oe.required)??!1,isMainUrl:Oe==null?void 0:Oe.isMainUrl,operable:(Oe==null?void 0:Oe.operable)??!1,disabled:(Oe==null?void 0:Oe.disabled)??!1,isSync:Oe==null?void 0:Oe.isSync,menus:Tr,groups:Pr,words:Wl,allSelectionContents:Oe==null?void 0:Oe.allContents,filterContent:Oe==null?void 0:Oe.filterContents,isNoClick:(Oe==null?void 0:Oe.isNoClick)??!1,functionName:Oe==null?void 0:Oe.functionName,functionRelatedWords:Oe==null?void 0:Oe.functionRelatedWords,calculatorFilter:Oe==null?void 0:Oe.calculatorFilter}}),fr=sl==null?void 0:sl.map(Oe=>Oe==null?void 0:Oe.value);let ur="";fr==null||fr.forEach(Oe=>{Oe!==""&&Oe!==void 0&&(ur=ur===""?Oe:ur+"/"+Oe)}),x.setSelectArray(fr),x.setSelectString(ur);let Zl=(Xe=nl.safeClone(sl))==null?void 0:Xe.map(Oe=>(Oe!=null&&Oe.value&&ce.IsJson(Oe==null?void 0:Oe.value)&&Array.isArray(JSON.parse(Oe==null?void 0:Oe.value))&&(Oe.value=JSON.parse(Oe.value)),Oe)),rr={};Zl==null||Zl.forEach(Oe=>{rr[Oe.label]=Oe==null?void 0:Oe.value}),Zl=Zl==null?void 0:Zl.map(Oe=>{var Ql,_r,Nr,Al,Tr,Pr,Wl,gr,Ir;if((Oe==null?void 0:Oe.type)==="Select"&&((Ql=Oe==null?void 0:Oe.allSelectionContents)==null?void 0:Ql.length)>0&&(Oe.contactValue=rr),(Nr=(_r=Oe==null?void 0:Oe.optionUrl)==null?void 0:_r.menuSelect)!=null&&Nr.some(Rr=>Rr==null?void 0:Rr.includes("["))){let Rr="";Oe.optionUrl.oldMenuSelect=(Tr=(Al=nl.safeClone(Oe))==null?void 0:Al.optionUrl)==null?void 0:Tr.menuSelect,Oe.optionUrl.menuSelect=(Wl=(Pr=Oe==null?void 0:Oe.optionUrl)==null?void 0:Pr.menuSelect)==null?void 0:Wl.map(Vl=>{var ar,Fr,Vr,Or,jr,Yr;if(Vl!=null&&Vl.includes("[")){let sn=(Fr=(ar=Vl==null?void 0:Vl.replaceAll("[","").replaceAll("]",""))==null?void 0:ar.split(":"))==null?void 0:Fr[1];Rr=Ca((Vr=Vl==null?void 0:Vl.replaceAll("[","").replaceAll("]",""))==null?void 0:Vr.split(":"),Pa==null?void 0:Pa[la.value],Pa),Vl=((jr=(Or=nl.safeClone(Zl))==null?void 0:Or.find(Yl=>(Yl==null?void 0:Yl.label)===sn))==null?void 0:jr.value)||Ca((Yr=Vl==null?void 0:Vl.replaceAll("[","").replaceAll("]",""))==null?void 0:Yr.split(":"),Pa==null?void 0:Pa[la.value],Pa)}return Vl}),Rr!==""&&Oe.value===""&&(Oe.value=Ae(Oe.optionUrl.menuSelect,Oe.optionUrl.oldMenuSelect,(gr=Oe==null?void 0:Oe.optionUrl)==null?void 0:gr.groupSelect,Pa),Array.isArray(Oe.value)&&((Ir=Oe.value)!=null&&Ir.every(Vl=>Vl==null?void 0:Vl.url))&&(Oe.type="UPLOAD"))}return Oe}),h.value=Zl,Ie.value=((Aa=h.value)==null?void 0:Aa.every(Oe=>Oe==null?void 0:Oe.disabled))||N.value===la.value,De.value=(Ze=h.value)==null?void 0:Ze.every(Oe=>Oe==null?void 0:Oe.operable),te.value=(xa=h.value)==null?void 0:xa.map(Oe=>Oe==null?void 0:Oe.label);let dr=[],yr=[];if((Va=nl.safeClone(h.value))==null||Va.forEach(Oe=>{var Ql;Array.isArray(Oe==null?void 0:Oe.value)&&((Ql=Oe==null?void 0:Oe.value)!=null&&Ql.find(_r=>{var Nr;return(Nr=_r==null?void 0:_r.url)==null?void 0:Nr.includes(".obj")}))&&(yr=Oe==null?void 0:Oe.value)}),(yr==null?void 0:yr.length)>0){const Oe=(Ja=nl.safeClone(yr))==null?void 0:Ja.filter(Ql=>{var _r;return(_r=Ql==null?void 0:Ql.url)==null?void 0:_r.includes(".obj")});Oe==null||Oe.forEach(Ql=>{var Nr,Al,Tr,Pr;const _r=(Nr=yr==null?void 0:yr.filter(Wl=>{var gr;return(Wl==null?void 0:Wl.name)===(Ql==null?void 0:Ql.name)&&((gr=Wl==null?void 0:Wl.url)==null?void 0:gr.includes(".mtl"))}))==null?void 0:Nr.map(Wl=>Wl==null?void 0:Wl.url);dr.push({objUrl:Ql==null?void 0:Ql.url,mtlUrls:((Al=yr==null?void 0:yr.filter(Wl=>{var gr;return(Wl==null?void 0:Wl.name)===(Ql==null?void 0:Ql.name)&&((gr=Wl==null?void 0:Wl.url)==null?void 0:gr.includes(".mtl"))}))==null?void 0:Al.length)===1?(Pr=(Tr=yr==null?void 0:yr.filter(Wl=>{var gr;return(Wl==null?void 0:Wl.name)===(Ql==null?void 0:Ql.name)&&((gr=Wl==null?void 0:Wl.url)==null?void 0:gr.includes(".mtl"))}))==null?void 0:Tr[0])==null?void 0:Pr.url:_r})}),w.setObjUrl(dr)}(Ue=nl.safeClone(h.value))==null||Ue.forEach(Oe=>{var Ql,_r,Nr,Al,Tr,Pr,Wl,gr,Ir,Rr,Vl,ar,Fr;if((_r=(Ql=Oe==null?void 0:Oe.value)==null?void 0:Ql.toString())!=null&&_r.includes(".stl")||(Al=(Nr=Oe==null?void 0:Oe.value)==null?void 0:Nr.toString())!=null&&Al.includes(".STL")||(Pr=(Tr=Oe==null?void 0:Oe.value)==null?void 0:Tr.toString())!=null&&Pr.includes(".obj")||(gr=(Wl=Oe==null?void 0:Oe.value)==null?void 0:Wl.toString())!=null&&gr.includes(".mtl")||(Rr=(Ir=Oe==null?void 0:Oe.value)==null?void 0:Ir.toString())!=null&&Rr.includes(".urdf")){let Vr={},Or=[],jr;Array.isArray(Oe==null?void 0:Oe.value)?jr=Oe==null?void 0:Oe.value:jr=(Vl=Oe==null?void 0:Oe.value)==null?void 0:Vl.split(","),jr==null||jr.forEach(Yr=>{Yr.includes(".mtl")?Or.push(Yr):Vr.blob=Vr.blob==="undefined"?Yr:Vr.blob+","+Yr}),(Or==null?void 0:Or.length)>0&&(Vr.mtlBlobs=Or),(Fr=(ar=Object.values(Vr))==null?void 0:ar[0])!=null&&Fr.includes("http:")}})}else h.value=[];let vl=se.value;if((vl==null?void 0:vl.length)>0&&(vl=vl==null?void 0:vl.map(Pa=>{var fr,ur,Zl,rr;let sl=(fr=Pa==null?void 0:Pa.key)==null?void 0:fr.split("/");return(r==null?void 0:r.compName)===(sl==null?void 0:sl[0])&&(ur=h.value)!=null&&ur.find(dr=>(dr==null?void 0:dr.prop)===(sl==null?void 0:sl[1]))&&(Pa.value=(rr=(Zl=h.value)==null?void 0:Zl.find(dr=>(dr==null?void 0:dr.prop)===(sl==null?void 0:sl[1])))==null?void 0:rr.value),Pa}),J.setTableViewContents(vl)),r!=null&&r.formRules)u.value=r==null?void 0:r.formRules;else{let Pa={};(fa=nl.safeClone(h).value)==null||fa.forEach(sl=>{((sl==null?void 0:sl.isMain)===!0||(sl==null?void 0:sl.required)===!0)&&(Pa[(sl==null?void 0:sl.prop)??(sl==null?void 0:sl.name)]=[{required:!0,message:`${(sl==null?void 0:sl.label)||(sl==null?void 0:sl.prop)||(sl==null?void 0:sl.name)}不能为空`}])}),u.value=Pa}if(((oa=me==null?void 0:me.contents)==null?void 0:oa.length)>0){const Pa=[];(il=me==null?void 0:me.contents)==null||il.forEach((sl,fr)=>{(sl==null?void 0:sl.label)!==""&&Pa.push({label:(sl==null?void 0:sl.label)??"",id:(sl==null?void 0:sl.id)??fr,type:(sl==null?void 0:sl.type)??"",background:sl==null?void 0:sl.background})}),I.value=Pa}else I.value=[];(Le=h.value)!=null&&Le.some(Pa=>(Pa==null?void 0:Pa.functionName)&&(Pa==null?void 0:Pa.functionName)!=="")&&(h.value=await he(h.value))},{deep:!0,immediate:!0}),e.watch(()=>N.value,Y=>{Ie.value=Y===la.value},{immediate:!0}),(Y,xe)=>{var Ve;const me=e.resolveComponent("svg-icon"),qe=e.resolveComponent("el-switch"),da=e.resolveComponent("el-checkbox"),Ke=e.resolveComponent("el-popover"),aa=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",q3,[g.value===e.unref(ri).TEXT?(e.openBlock(),e.createBlock(Nc,{key:0,itemData:a.itemData,compName:a.compName,fields:h.value,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Ie.value||ta(),"onUpdate:backGroundImage":Me,backgroundUrl:s.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):g.value===e.unref(ri).BLOCK?(e.openBlock(),e.createBlock(Bf,{key:1,items:(Ve=h.value)==null?void 0:Ve.map(ye=>({label:ye!=null&&ye.isHideInForm?"":ye==null?void 0:ye.label,value:ye==null?void 0:ye.value,width:(ye==null?void 0:ye.width)??1,field:ye})),textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,disabled:Ie.value||ta(),"onUpdate:backGroundImage":Me,backgroundUrl:s.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":g.value===e.unref(ri).ORDINARY})},[e.createVNode(nl.ssForm,{rowContents:h.value,formRules:u.value,buttonValue:I.value,isRowFlex:!1,isEnableWrap:!0,textSize:S.value,textColor:$.value,backGround:V.value,backGroundImage:ae.value,onOnButtonClick:za,onChange:pa,formDisabled:Ie.value||ta(),formLabelsOperable:De.value,isButtonRow:C.value,onPreview:ma,onBlurChange:wa,style:e.normalizeStyle({backGroundImage:s.value!==""?`url("${s.value}")`:void 0}),onHandleColEditChange:va,onHandleColTypeChange:na,onRouteUrl:X,onClickTrigger:H,"onUpdate:backGroundImage":Me},{operateCol:e.withCtx(({renderColumns:ye,formDisabled:pe,formLabelsOperable:Sa})=>[e.createVNode(Ke,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ya},{reference:e.withCtx(()=>[e.createElementVNode("span",W3,[e.createVNode(me,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",K3,[xe[1]||(xe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(qe,{"model-value":pe,"active-text":"禁用","inactive-text":"",onChange:We,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(qe,{"model-value":Sa,"active-text":"编辑所有标签","inactive-text":"",onChange:sa},null,8,["model-value"]),xe[2]||(xe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(aa,{modelValue:te.value,"onUpdate:modelValue":xe[0]||(xe[0]=ya=>te.value=ya),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:U,onChange:R},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye,ya=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ya.label},[e.createVNode(da,{value:ya.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ya.label),1)]),_:2},1032,["value"]),e.createVNode(Ke,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(me,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var vl;return[e.createElementVNode("div",G3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((vl=Object.keys(ya))==null?void 0:vl.filter(Nl=>{var pl;return(pl=Ne.value)==null?void 0:pl.find(Fl=>(Fl==null?void 0:Fl.value)===Nl)}),Nl=>{var pl,Fl;return e.openBlock(),e.createElementBlock("div",{key:Nl},[e.createVNode(nl._sfc_main$1,{value:ya==null?void 0:ya[Nl],"active-text":(Fl=(pl=Ne.value)==null?void 0:pl.find(ja=>(ja==null?void 0:ja.value)===Nl))==null?void 0:Fl.label,inactiveText:"",onChange:ja=>Pe(ja,Nl,ya)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Y3,[e.createVNode(me,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow","style"])],2)),M.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:3,fileDataList:j.value,onDestroy:Oa},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Br.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(So.ThreeViewerHost,{files:m.value,onGetAnimationData:Y.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},xs=Xl._export_sfc(J3,[["__scopeId","data-v-b52f96ee"]]),zo=e.ref(0),Ac=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=A.cloneDeep(a))==null?void 0:l.map(r=>(zo.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??zo.value,children:Ac(r==null?void 0:r.children)},r))},X3=a=>{var n;return(n=A.cloneDeep(a))==null?void 0:n.map(r=>(zo.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??zo.value,children:Ac(r==null?void 0:r.children)},r))},zc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=A.cloneDeep(a))==null?void 0:n.filter(o=>(o==null?void 0:o.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=zc(r==null?void 0:r.children,l),r)),a)},Mc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o=l),o)):(a=a==null?void 0:a.map(r=>(r.children=Mc(r==null?void 0:r.children,l),r)),a)},Ic=(a,l)=>{var n;return a!=null&&a.find(r=>{var o;return(r==null?void 0:r.id)===((o=l==null?void 0:l.contents)==null?void 0:o.id)})?(n=A.cloneDeep(a))==null?void 0:n.map(o=>{var s;return(o==null?void 0:o.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(o=l==null?void 0:l.contents),o}):(a=a==null?void 0:a.map(r=>(r.children=Ic(r==null?void 0:r.children,l),r)),a)},Oc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=A.cloneDeep(a))==null?void 0:n.map(o=>((o==null?void 0:o.id)===(l==null?void 0:l.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(l.contents)),o)):(a=a==null?void 0:a.map(r=>(r.children=Oc(r==null?void 0:r.children,l),r)),a)},sr=[{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"}],Z3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Q3=[{label:"新增",value:"add"}],In=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Q3},{key:"background",label:"按钮背景色",type:"Color"}],On=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Z3},{key:"textColor",label:"按钮颜色",type:"Color"}],eh={class:"table-header-child"},ah={class:"table-header-child-main"},lh={class:"table-header-child-content"},rh={class:"table-header-child-content-item"},nh={class:"fix-button"},ih={key:0},oh={class:"form-content"},th={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=ce.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h);e.ref(0);const d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{var w;o.value=!0;let x=[];sr==null||sr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},C=E=>{r("fixChange",A.cloneDeep(E))},M=E=>{r("deleteChange",A.cloneDeep(E))},k=E=>{o.value=!0;let x=[];sr==null||sr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},W=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},I=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="id"+c.value,(w=m.value)==null||w.forEach(S=>{const $=sr==null?void 0:sr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},j=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},L=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,x)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",eh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(g,S)=>(e.openBlock(),e.createElementBlock("div",ah,[e.createElementVNode("div",lh,[e.createElementVNode("div",rh,e.toDisplayString(g.label),1),e.createElementVNode("div",nh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>k(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>u(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>L(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",ih,[e.createVNode(Lc,{tableChildContents:g==null?void 0:g.children,onDeleteChange:M,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:j,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",oh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:j,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:I},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},sh=Xl._export_sfc(th,[["__scopeId","data-v-e0fef72d"]]),ch={class:"table-header-child"},uh={class:"table-header-child-main"},dh={class:"table-header-child-content"},ph={class:"table-header-child-content-item"},fh={class:"fix-button"},hh={key:0},vh={class:"form-content"},mh={class:"dialog-footer"},yh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref(""),h=ce.useTableComp(A.pinia),{tableIndex:c}=A.storeToRefs(h),d=e.ref(""),m=e.ref([]),b=e.ref([]),u=E=>{r("fixChange",A.cloneDeep(E))},C=E=>{var w;o.value=!0;let x=[];sr==null||sr.forEach(g=>{let S=A.cloneDeep(c.value)+1;h.setTableIndex(S),x.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:E[g.key],id:c.value,contents:g==null?void 0:g.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&x.push({children:E==null?void 0:E.children,isFormColHidden:!0}),d.value=E==null?void 0:E.id,m.value=x,b.value=x},M=E=>{o.value=!0;let x=[];sr==null||sr.forEach(w=>{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),x.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:c.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=x,b.value=x},k=E=>{let x=A.cloneDeep(b.value);x=x==null?void 0:x.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),b.value=x},W=()=>{var x,w;m.value=b.value;let E={};if(d.value!=="")E.id=d.value,(x=m.value)==null||x.forEach(g=>{const S=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));S?E[S.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let g=A.cloneDeep(c.value)+1;h.setTableIndex(g),E.id="idChild"+c.value,(w=m.value)==null||w.forEach(S=>{const $=sr==null?void 0:sr.find(V=>(V==null?void 0:V.label)===(S==null?void 0:S.label));$?E[$.key]=S.value:S!=null&&S.children&&S.children.length>0&&(E.children=S.children)}),o.value=!1,r("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}d.value="",m.value=[],b.value=[]},I=()=>{o.value=!1,d.value="",s.value="",m.value=[],b.value=[]},j=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=E=>{r("deleteChange",E)};return(E,x)=>{const w=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ch,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(S,$)=>(e.openBlock(),e.createElementBlock("div",uh,[e.createElementVNode("div",dh,[e.createElementVNode("div",ph,e.toDisplayString(S.label),1),e.createElementVNode("div",fh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>M(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>C(S)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:V=>j(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",hh,[e.createVNode(sh,{tableChildContents:S==null?void 0:S.children,onDeleteChange:L,onFixChange:u},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:I,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",mh,[e.createVNode(g,{onClick:I,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(g,{class:"ok-button button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Lc=Xl._export_sfc(yh,[["__scopeId","data-v-ebd68fa1"]]),gh={class:"table-operate-content"},bh={class:"table-operate-item"},kh={class:"operate-title"},xh={class:"operate-content"},wh={class:"fix-content"},_h={class:"fix-content-label"},Sh={class:"fix-button"},Eh={key:0},Ch={class:"operate-title"},Dh={class:"operate-content"},Bh={class:"fix-content"},Th={class:"fix-content-label"},Nh={class:"fix-button"},Ah={class:"operate-title"},zh={class:"operate-content"},Mh={class:"fix-content"},Ih={class:"fix-content-label"},Oh={class:"fix-button"},Lh={class:"operate-title"},Rh={class:"operate-content"},$h={class:"fix-content"},Vh={class:"fix-content-label"},Ph={class:"fix-button"},Fh={class:"operate-content"},jh={style:{display:"flex","justify-content":"space-between"}},Hh={class:"form-content"},Uh={class:"dialog-footer"},qh={class:"form-content"},Wh={class:"dialog-footer"},Kh={class:"form-content"},Gh={class:"dialog-footer"},Yh={class:"form-content"},Jh={class:"dialog-footer"},Xh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(!1),c=e.ref([]),d=e.ref(!1),m=e.ref([]),b=e.ref(!1),u=e.ref([]),C=e.ref(""),M=e.ref(""),k=e.ref([]),W=e.ref([]),I=e.ref([]),j=e.ref([]),L=e.ref(!1),E=e.ref([]),x=e.ref([]),w=e.ref(0),g=e.ref([]),S=e.ref([]),$=e.ref([]),V=()=>{L.value=!0;let R=[];In==null||In.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:H==null?void 0:H.options})}),E.value=R,x.value=R},ae=()=>{var H,X,ve;h.value=!0;let R=[];(ve=(X=(H=ce.FormContent)==null?void 0:H.find(de=>(de==null?void 0:de.key)==="Input"))==null?void 0:X.value)==null||ve.forEach(de=>{w.value++,R.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:(de==null?void 0:de.label)==="类型"?"Input":"",id:w.value,contents:de==null?void 0:de.options})}),g.value=R,S.value=R},Z=R=>{R||(g.value=S.value)},be=async R=>{var H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za;if((R==null?void 0:R.类型)!==((X=(H=S.value)==null?void 0:H.find(pa=>(pa==null?void 0:pa.label)==="类型"))==null?void 0:X.value)){let pa=[],Ca=await((va=(de=(ve=ce.FormContent)==null?void 0:ve.find(Ae=>(Ae==null?void 0:Ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:de.value)==null?void 0:va.value)?await((ma=(Me=(wa=ce.FormContent)==null?void 0:wa.find(Ae=>(Ae==null?void 0:Ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Me.value)==null?void 0:ma.value):(Pe=(na=ce.FormContent)==null?void 0:na.find(Ae=>(Ae==null?void 0:Ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Pe.value;if(Ca==null||Ca.forEach(Ae=>{w.value++,pa.push({label:Ae==null?void 0:Ae.label,name:(Ae==null?void 0:Ae.name)||(Ae==null?void 0:Ae.label),type:Ae.type,value:Ae!=null&&Ae.属性名?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):(R==null?void 0:R[Ae.label])??"",id:w.value,contents:Ae==null?void 0:Ae.options,prop:(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.name)||(Ae==null?void 0:Ae.label)})}),R!=null&&R.菜单选项&&((Oa=R==null?void 0:R.菜单选项)==null?void 0:Oa.length)>0){const Ae=await ce.menuToContentType(R==null?void 0:R.菜单选项);pa=pa==null?void 0:pa.map(he=>((he==null?void 0:he.name)==="组信息选项"&&(he.contents=Ae),he))}S.value=await ce.selectToBase(A.cloneDeep(pa)),g.value=await ce.selectToBase(A.cloneDeep(pa))}else{let pa=A.cloneDeep(g.value);if(pa=pa==null?void 0:pa.map(Ca=>(Ca.value=R==null?void 0:R[Ca.name],Ca)),R!=null&&R.菜单选项&&((za=R==null?void 0:R.菜单选项)==null?void 0:za.length)>0){const Ca=await ce.menuToContentType(R==null?void 0:R.菜单选项);pa=pa==null?void 0:pa.map(Ae=>((Ae==null?void 0:Ae.name)==="组信息选项"&&(Ae.contents=Ca),Ae))}pa=ce.formToOptionsContents(pa),S.value=await ce.selectToBase(A.cloneDeep(pa))}},ze=async R=>{await be(R),g.value=S.value},F=(R,H)=>{if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="selectRelateType"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.selectRelateType)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="menuSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.menuSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="groupSelect"){const X=H==null?void 0:H.optionUrl;return(X==null?void 0:X.groupSelect)||H[R.key]}if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="originalContent")return(H==null?void 0:H.value)||H[R.key];if((H==null?void 0:H.type)=="Select"&&(R==null?void 0:R.key)==="multiple"){const X=H[R.key];return Xs(X)?X:R.default}return(R==null?void 0:R.label)==="类型"&&H[R.key]===""?"Input":(R==null?void 0:R.key)==="isFormColHidden"&&!H[R.key]?!1:H[R.key]},ne=async R=>{var ve,de,va,na,Pe,wa,Me,ma,Oa;h.value=!0;let H=[];const X=await((va=(de=(ve=ce.FormContent)==null?void 0:ve.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:de.value)==null?void 0:va.value)?await((ma=(Me=(wa=ce.FormContent)==null?void 0:wa.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Me.value)==null?void 0:ma.value):(Pe=(na=ce.FormContent)==null?void 0:na.find(za=>(za==null?void 0:za.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Pe.value;if(X==null||X.forEach(za=>{w.value++,H.push({label:za==null?void 0:za.label,name:(za==null?void 0:za.name)||(za==null?void 0:za.label),type:za.type,value:(za==null?void 0:za.label)==="属性名"?(R==null?void 0:R.prop)||(R==null?void 0:R.name)||(R==null?void 0:R.label):F(za,R),id:w.value,contents:za==null?void 0:za.options})}),R!=null&&R.menuSelect&&((Oa=R==null?void 0:R.menuSelect)==null?void 0:Oa.length)>0){const za=await ce.menuToContentType(R==null?void 0:R.menuSelect);H=H==null?void 0:H.map(pa=>((pa==null?void 0:pa.name)==="组信息选项"&&(pa.contents=za),pa))}C.value=R==null?void 0:R.id,g.value=await ce.selectToBase(ce.formToOptionsContents(H)),S.value=await ce.selectToBase(ce.formToOptionsContents(H))},J=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;$.value=(H=A.cloneDeep($.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="tableToForm"&&(ve.contents=$.value),ve))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},se=()=>{h.value=!1,g.value=[],C.value=""},Be=async()=>{var ve,de,va,na,Pe,wa,Me,ma,Oa,za;g.value=S.value;let R={};C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value);let H=await((va=(de=(ve=ce.FormContent)==null?void 0:ve.find(pa=>{var Ca,Ae;return(pa==null?void 0:pa.key)===(((Ae=(Ca=g.value)==null?void 0:Ca.find(he=>(he==null?void 0:he.label)==="类型"))==null?void 0:Ae.value)??"label")}))==null?void 0:de.value)==null?void 0:va.value)??((Pe=(na=ce.FormContent)==null?void 0:na.find(pa=>{var Ca,Ae;return(pa==null?void 0:pa.key)===(((Ae=(Ca=g.value)==null?void 0:Ca.find(he=>(he==null?void 0:he.label)==="类型"))==null?void 0:Ae.value)??"label")}))==null?void 0:Pe.value);if((wa=g.value)==null||wa.forEach(pa=>{const Ca=H==null?void 0:H.find(Ae=>(Ae==null?void 0:Ae.label)===(pa==null?void 0:pa.label));Ca&&(R[Ca.key]=pa.value)}),R.name=R.label,(Me=$.value)!=null&&Me.find(pa=>pa.id===R.id))$.value=(ma=$.value)==null?void 0:ma.map(pa=>(pa.id===R.id&&(pa=R),pa));else{let pa=A.cloneDeep($.value);$.value||($.value=[]),pa.push(R),$.value=pa}$.value=$.value.map(({id:pa,...Ca})=>Ca),h.value=!1,C.value="";let X=A.cloneDeep(n.originalItemContents);(Oa=A.cloneDeep(n.originalItemContents))!=null&&Oa.find(pa=>(pa==null?void 0:pa.key)==="tableToForm")?X=(za=A.cloneDeep(n.originalItemContents))==null?void 0:za.map(pa=>((pa==null?void 0:pa.key)==="tableToForm"&&(pa.contents=$.value),pa)):X.push({key:"tableToForm",contents:$.value}),r("change",X)},$e=R=>{L.value=!0;let H=[];In==null||In.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,E.value=H,x.value=H};e.watch(()=>b.value,()=>{var H,X;let R=A.cloneDeep(n.originalItemContents);(H=A.cloneDeep(n.originalItemContents))!=null&&H.find(ve=>(ve==null?void 0:ve.key)==="page")?R=(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="page"&&(ve.contents=b.value),ve)):R.push({key:"page",contents:b.value}),r("change",R)},{deep:!0});const fe=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;W.value=(H=A.cloneDeep(W.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="extraButton"&&(ve.contents=W.value),ve))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var X,ve,de,va,na;E.value=x.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=E.value)==null||X.forEach(Pe=>{const wa=In==null?void 0:In.find(Me=>(Me==null?void 0:Me.label)===(Pe==null?void 0:Pe.label));wa?R[wa.key]=Pe.value:Pe!=null&&Pe.children&&Pe.children.length>0&&(R.children=Pe.children)}),(ve=W.value)!=null&&ve.find(Pe=>Pe.id===R.id))W.value=(de=W.value)==null?void 0:de.map(Pe=>(Pe.id===R.id&&(Pe=R),Pe));else{let Pe=A.cloneDeep(W.value)??[];Pe.push(R),W.value=Pe}L.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(va=A.cloneDeep(n.originalItemContents))!=null&&va.find(Pe=>(Pe==null?void 0:Pe.key)==="extraButton")?H=(na=A.cloneDeep(n.originalItemContents))==null?void 0:na.map(Pe=>((Pe==null?void 0:Pe.key)==="extraButton"&&(Pe.contents=W.value),Pe)):H.push({key:"extraButton",contents:W.value}),r("change",H)},oe=R=>{let H=A.cloneDeep(x.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),x.value=H},U=()=>{L.value=!1,E.value=[],C.value=""},De=R=>{d.value=!0;let H=[];On==null||On.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:R[X.key],id:w.value,contents:X==null?void 0:X.options})}),C.value=R==null?void 0:R.id,I.value=H,j.value=H},Ie=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;k.value=(H=A.cloneDeep(k.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>((ve==null?void 0:ve.key)==="rowButton"&&(ve.contents=k.value),ve))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},je=()=>{s.value=!0;let R=[];sr==null||sr.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=R,u.value=R},la=()=>{d.value=!0;let R=[];On==null||On.forEach(H=>{w.value++,R.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),I.value=R,j.value=R},Ta=R=>{let H=A.cloneDeep(j.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),j.value=H},ee=()=>{var X,ve,de,va,na;I.value=j.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=I.value)==null||X.forEach(Pe=>{const wa=On==null?void 0:On.find(Me=>(Me==null?void 0:Me.label)===(Pe==null?void 0:Pe.label));wa?R[wa.key]=Pe.value:Pe!=null&&Pe.children&&Pe.children.length>0&&(R.children=Pe.children)}),(ve=k.value)!=null&&ve.find(Pe=>Pe.id===R.id))k.value=(de=k.value)==null?void 0:de.map(Pe=>(Pe.id===R.id&&(Pe=R),Pe));else{let Pe=A.cloneDeep(k.value);Pe.push(R),k.value=Pe}d.value=!1,C.value="";let H=A.cloneDeep(n.originalItemContents);(va=A.cloneDeep(n.originalItemContents))!=null&&va.find(Pe=>(Pe==null?void 0:Pe.key)==="rowButton")?H=(na=A.cloneDeep(n.originalItemContents))==null?void 0:na.map(Pe=>((Pe==null?void 0:Pe.key)==="rowButton"&&(Pe.contents=k.value),Pe)):H.push({key:"rowButton",contents:k.value}),r("change",H)},ca=()=>{d.value=!1,C.value="",j.value=[],I.value=[]},ue=R=>{s.value=!0;let H=[];sr==null||sr.forEach(X=>{w.value++,H.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:"",id:w.value,contents:X==null?void 0:X.options})}),m.value=H,M.value=R==null?void 0:R.id,u.value=H},ta=R=>{var H;c.value=zc(A.cloneDeep(c.value),R==null?void 0:R.id),r("change",(H=A.cloneDeep(n.originalItemContents))==null?void 0:H.map(X=>{var ve;return(X==null?void 0:X.key)==="header"&&(X.contents=(ve=c.value)!=null&&ve.some(de=>de==null?void 0:de.children)?[c.value]:c.value),X}))},Se=R=>{var X,ve,de;R.type==="fix"?R.id!==""?c.value=Ic(c.value,R):c.value=Mc(c.value,R==null?void 0:R.contents):c.value=Oc(c.value,R),c.value=(X=c.value)!=null&&X.some(va=>va==null?void 0:va.children)?[c.value]:c.value,C.value="";let H=A.cloneDeep(n.originalItemContents);(ve=A.cloneDeep(n.originalItemContents))!=null&&ve.find(va=>(va==null?void 0:va.key)==="header")?H=(de=A.cloneDeep(n.originalItemContents))==null?void 0:de.map(va=>((va==null?void 0:va.key)==="header"&&(va.contents=c.value),va)):H.push({key:"header",contents:c.value}),r("change",H)},te=R=>{var X;s.value=!0;let H=[];sr==null||sr.forEach(ve=>{w.value++,H.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:R[ve.key],id:w.value,contents:ve==null?void 0:ve.options})}),R!=null&&R.children&&((X=R==null?void 0:R.children)==null?void 0:X.length)>0&&H.push({children:R==null?void 0:R.children,isFormColHidden:!0}),C.value=R==null?void 0:R.id,M.value="",m.value=H,u.value=H},Ne=R=>{let H=A.cloneDeep(u.value);H=H==null?void 0:H.map(X=>(X.children||(X.value=R==null?void 0:R[X.name]),X)),u.value=H},We=()=>{s.value=!1,C.value="",M.value="",u.value=[]},sa=()=>{var X,ve,de,va,na,Pe;m.value=u.value;let R={};if(C.value!==""?R.id=C.value:(w.value++,R.id="id"+w.value),(X=m.value)==null||X.forEach(wa=>{const Me=sr==null?void 0:sr.find(ma=>(ma==null?void 0:ma.label)===(wa==null?void 0:wa.label));Me?R[Me.key]=wa.value:wa!=null&&wa.children&&wa.children.length>0&&(R.children=wa.children)}),(ve=c.value)!=null&&ve.find(wa=>wa.id===R.id))c.value=(de=c.value)==null?void 0:de.map(wa=>(wa.id===R.id&&(wa=R),wa));else{let wa=A.cloneDeep(c.value)??[];M.value===""?wa.push(R):wa=wa==null?void 0:wa.map(Me=>(Me.id===M.value&&(Me.children||(Me.children=[]),Me.children.push(R)),Me)),c.value=wa}c.value=(va=c.value)!=null&&va.some(wa=>wa==null?void 0:wa.children)?[c.value]:c.value,s.value=!1,C.value="",M.value="";let H=A.cloneDeep(n.originalItemContents);(na=A.cloneDeep(n.originalItemContents))!=null&&na.find(wa=>(wa==null?void 0:wa.key)==="header")?H=(Pe=A.cloneDeep(n.originalItemContents))==null?void 0:Pe.map(wa=>((wa==null?void 0:wa.key)==="header"&&(wa.contents=c.value),wa)):H.push({key:"header",contents:c.value}),r("change",H)},Ya=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,X;c.value=(H=A.cloneDeep(c.value))==null?void 0:H.filter(ve=>(ve==null?void 0:ve.id)!==(R==null?void 0:R.id)),r("change",(X=A.cloneDeep(n.originalItemContents))==null?void 0:X.map(ve=>{var de;return(ve==null?void 0:ve.key)==="header"&&(ve.contents=(de=c.value)!=null&&de.some(va=>va==null?void 0:va.children)?[c.value]:c.value),ve})),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(o.value=A.cloneDeep(n.originalItemContents),c.value=(H=(R=o.value)==null?void 0:R.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:H.contents,k.value=(ve=(X=o.value)==null?void 0:X.find(me=>(me==null?void 0:me.key)==="rowButton"))==null?void 0:ve.contents,W.value=(va=(de=o.value)==null?void 0:de.find(me=>(me==null?void 0:me.key)==="extraButton"))==null?void 0:va.contents,b.value=(Pe=(na=o.value)==null?void 0:na.find(me=>(me==null?void 0:me.key)==="page"))!=null&&Pe.contents?!!((Me=(wa=o.value)==null?void 0:wa.find(me=>(me==null?void 0:me.key)==="page"))!=null&&Me.contents):!1,$.value=(Oa=(ma=o.value)==null?void 0:ma.find(me=>(me==null?void 0:me.key)==="tableToForm"))==null?void 0:Oa.contents,c.value=(za=c.value)==null?void 0:za.map((me,qe)=>(Array.isArray(me)?me=X3(me):me={label:(me==null?void 0:me.label)??"",prop:(me==null?void 0:me.label)==="操作"?"operate":me==null?void 0:me.prop,width:me!=null&&me.width?parseInt(me.width):"",fixed:(me==null?void 0:me.fixed)??void 0,sortable:(me==null?void 0:me.sortable)??!1,align:(me==null?void 0:me.align)??"left",showOverflowTooltip:(me==null?void 0:me.showOverflowTooltip)??!0,isNotDrag:(me==null?void 0:me.isNotDrag)??!1,isEditCol:(me==null?void 0:me.isEditCol)??!1,isOperate:(me==null?void 0:me.isOperate)??!1,id:(me==null?void 0:me.id)??qe,formMenuSelect:(me==null?void 0:me.formMenuSelect)??void 0,groupSelect:(me==null?void 0:me.groupSelect)??void 0},me)),c.value=(pa=c.value)!=null&&pa.every(me=>Array.isArray(me))?(Ca=c.value)==null?void 0:Ca[0]:c.value,k.value=(Ae=k.value)==null?void 0:Ae.map((me,qe)=>me={label:(me==null?void 0:me.label)??"",type:(me==null?void 0:me.type)??"",textColor:(me==null?void 0:me.textColor)??"#000000",id:(me==null?void 0:me.id)??qe}),W.value=(he=W.value)==null?void 0:he.map((me,qe)=>me={label:(me==null?void 0:me.label)??"",type:(me==null?void 0:me.type)??"",background:(me==null?void 0:me.background)??"var(--ssComponent-primary-color)",id:(me==null?void 0:me.id)??qe}),$.value)$.value=(xe=$.value)==null?void 0:xe.map(me=>{w.value++;let qe=me;return qe.id=w.value,qe});else{let me=[];const qe=(Y=ce.getColumnChild(A.cloneDeep(c.value)))==null?void 0:Y.filter(da=>(da==null?void 0:da.prop)!=="operate");qe==null||qe.forEach(da=>{var Ke;w.value++,me.push({label:da==null?void 0:da.label,name:(da==null?void 0:da.prop)||(da==null?void 0:da.label),type:da!=null&&da.groupSelect?"Select":"Input",value:"",id:w.value,contents:da==null?void 0:da.options,menuSelect:da==null?void 0:da.formMenuSelect,groupSelect:(Ke=da==null?void 0:da.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),$.value=me}},{deep:!0,immediate:!0}),(R,H)=>{const X=e.resolveComponent("svg-icon"),ve=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",gh,[e.createElementVNode("div",bh,[e.createElementVNode("div",kh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ve,{class:"icon-content",onClick:je,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",xh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",wh,[e.createElementVNode("div",_h,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Sh,[e.createVNode(X,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>ue(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>te(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Ya(de)},null,8,["onClick"])])]),de!=null&&de.children&&de.children.length>0?(e.openBlock(),e.createElementBlock("div",Eh,[e.createVNode(Lc,{tableChildContents:de==null?void 0:de.children,onDeleteChange:ta,onFixChange:Se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ch,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:la},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",Bh,[e.createElementVNode("div",Th,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Nh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>De(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Ie(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ah,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",zh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",Mh,[e.createElementVNode("div",Ih,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Oh,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>$e(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>fe(de)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Lh,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ve,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(X,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Rh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(de,va)=>(e.openBlock(),e.createElementBlock("div",{key:va},[e.createElementVNode("div",$h,[e.createElementVNode("div",Vh,e.toDisplayString(de==null?void 0:de.label),1),e.createElementVNode("div",Ph,[e.createVNode(X,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>ne(de)},null,8,["onClick"]),e.createVNode(X,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>J(de)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Fh,[e.createElementVNode("div",jh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(nl._sfc_main$1,{modelValue:b.value,"onUpdate:modelValue":H[0]||(H[0]=de=>b.value=de)},null,8,["modelValue"])])])]),e.createVNode(Br.ssDialog,{visible:s.value,onBeforeDestroy:We,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uh,[e.createVNode(ve,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ve,{class:"ok-button button",onClick:sa,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:d.value,onBeforeDestroy:ca,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:Ta},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(ve,{onClick:ca,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ve,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:L.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gh,[e.createVNode(ve,{onClick:U,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ve,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:h.value,onBeforeDestroy:se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yh,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:be,onChangeVisible:Z,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jh,[e.createVNode(ve,{onClick:se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ve,{class:"ok-button button",onClick:Be,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Zh=Xl._export_sfc(Xh,[["__scopeId","data-v-7a6b87b5"]]),Qh=A.useModelComp(A.pinia),{pageMapState:e2}=A.storeToRefs(Qh),a2=A.useMenuState(A.pinia),{activeMenuPath:l2}=A.storeToRefs(a2),r2=e.ref(24),n2=e.ref(6),i2=e.ref(10),o2=e.ref(70),t2=e.ref(.18),s2=e.ref(45),c2=(a,l,n,r)=>{var o,s,h,c,d,m,b,u,C,M,k,W,I,j,L,E;return{x:((s=(o=a==null?void 0:a.value)==null?void 0:o.tableData)==null?void 0:s.x)||l%2*12,y:((c=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:c.y)||l,w:((m=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:m.w)||r2.value,h:((u=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:u.h)||n,minW:((M=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:M.minW)||n2.value,minH:((W=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:W.minH)||t2.value,maxH:((j=(I=a==null?void 0:a.value)==null?void 0:I.tableData)==null?void 0:j.maxH)||s2.value,i:((E=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},u2=(a,l)=>{var r,o,s,h,c,d,m,b;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((h=(s=(o=a==null?void 0:a.compData)==null?void 0:o.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:h.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((b=(m=(d=a==null?void 0:a.compData)==null?void 0:d.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:m.contents)==null?void 0:b.length)/5);return n*2},Rc=(a,l,n)=>{var h,c;const r=(c=(h=e2.value)==null?void 0:h[l2.value])==null?void 0:c.filter(d=>{var m;return((m=d==null?void 0:d.key)==null?void 0:m.type)==="gridLayout"}),o=r==null?void 0:r.find(d=>{var m,b,u;return((u=(b=(m=d==null?void 0:d.value)==null?void 0:m.tableData)==null?void 0:b.component)==null?void 0:u.id)===a.id}),s=u2(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((d,m)=>Rc(d,m))),{...c2(o,l,s,a)}},d2=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=A.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,o)=>Rc(r,o)):[]},p2=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),f2=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),h2=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]);e.watch(()=>n.compType,c=>{var b;const d=p2(n==null?void 0:n.optionItems),m=c?(b=d[c==null?void 0:c.toUpperCase()])==null?void 0:b[n==null?void 0:n.target]:[];o.value=m==null?void 0:m.map(u=>{for(const[C,M]of Object.entries((n==null?void 0:n.comp)||{}))if((u==null?void 0:u.prop)===C)return{...u,value:M};return u})},{immediate:!0});const s=c=>nl.getComponent(c),h=c=>{var d,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?o.value=(d=o.value)==null?void 0:d.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!0}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!0}:b}):o.value=(m=o.value)==null?void 0:m.map(b=>{var u;return(b==null?void 0:b.prop)==="isStepLayout"?{...b,options:(u=b==null?void 0:b.options)==null?void 0:u.map(C=>({...C,disabled:!1}))}:(b==null?void 0:b.prop)==="isGridLayout"?{...b,disabled:!1}:b}),r("change",{target:n==null?void 0:n.target,styleConfigs:o.value,prop:c==null?void 0:c.prop})};return(c,d)=>{const m=e.resolveComponent("el-col"),b=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(b,{class:"style-row",key:u==null?void 0:u.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u==null?void 0:u.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(u.type)),{modelValue:u.value,"onUpdate:modelValue":C=>u.value=C,content:u==null?void 0:u.options,optionUrl:u==null?void 0:u.optionUrl,disabled:u==null?void 0:u.disabled,activeText:u==null?void 0:u.activeText,inactiveText:u==null?void 0:u.inactiveText,onChange:C=>h(u)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),v2=Xl._export_sfc(h2,[["__scopeId","data-v-6c233914"]]),m2=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const n=a,r=l,o=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),h=j=>j==null?void 0:j.reduce((L,E)=>(L[E==null?void 0:E.prop]=E==null?void 0:E.rule,L),{}),c=e.computed(()=>({formRules:h(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),d=e.ref([]),m=e.ref(""),b=(j,L,E)=>{var g;let x=[];(n==null?void 0:n.activeTabName)==="任务配置"?(x=[{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:j},{label:"按钮名称",value:"按钮名称",children:L}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"任务名称",rule:o},{prop:"任务关键词",rule:o},{prop:"执行任务",rule:o},{prop:"执行动作",rule:o},{prop:"执行交互",rule:o}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(x=[{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:(g=n==null?void 0:n.relatedData)==null?void 0:g.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:o},{prop:"关联状态",rule:o},{prop:"关联形式",rule:o},{prop:"关联任务集合",rule:o}]);let w;return E&&(E==null?void 0:E.length)>0?w=[...x,...u(j,L,E)]:w=x,w},u=(j,L,E)=>{const x=[{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 E?x==null?void 0:x.filter(w=>E==null?void 0:E.includes(w==null?void 0:w.prop)):x},C=(j,L)=>{var S,$,V,ae,Z,be,ze,F,ne;const E=((Z=(ae=(V=($=(S=n==null?void 0:n.comp)==null?void 0:S.compData)==null?void 0:$.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:V.contents)==null?void 0:ae.filter(J=>(J==null?void 0:J.label)!=="操作"))==null?void 0:Z.map(J=>({value:J==null?void 0:J.prop,label:J.label})))||[],x=/button/i,w=((ne=(F=(ze=(be=n==null?void 0:n.comp)==null?void 0:be.compData)==null?void 0:ze.filter(J=>x.test(J==null?void 0:J.key)))==null?void 0:F.flatMap(J=>J==null?void 0:J.contents))==null?void 0:ne.map(J=>({value:J==null?void 0:J.label,label:J.label})))||[],g=b(E,w,j);d.value=L?f2(g,L):g,j&&(j==null?void 0:j.length)>0&&s.value.push(...j==null?void 0:j.map(J=>({prop:J,rule:o})))};e.onMounted(()=>{C(null,n==null?void 0:n.extendItem)});const M=j=>{const L=j==null?void 0:j[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const E=L==null?void 0:L.join("/");C(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,j)}},k=j=>{r("change",{target:n==null?void 0:n.target,extendConfigs:j})},W=(j,L)=>{m.value=L==null?void 0:L.changeProp,M(j)},I=j=>{r("onButtonClick",j)};return(j,L)=>(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,key:d.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:k,onBlurChange:W,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue"]))}}),y2=Xl._export_sfc(m2,[["__scopeId","data-v-7c660c1f"]]),g2={};function b2(a,l){return null}const k2=Xl._export_sfc(g2,[["render",b2]]),x2={class:"form-operate-content"},w2={class:"form-operate-item"},_2={class:"operate-title"},S2={class:"operate-content"},E2={class:"fix-content"},C2={class:"fix-button"},D2={class:"operate-title"},B2={class:"operate-content"},T2={class:"fix-content"},N2={class:"fix-button"},A2={style:{display:"flex","justify-content":"space-between"}},z2={class:"form-content"},M2={class:"dialog-footer"},I2={class:"form-content"},O2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(!1),s=e.ref([]),h=e.ref([]),c=e.ref(!1),d=e.ref([]),m=e.ref([]),b=e.ref(""),u=e.ref(!1),C=e.ref(0),M=e.ref([]),k=e.ref([]),W=(F,ne)=>{if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="selectRelateType"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.selectRelateType)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="menuSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.menuSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="groupSelect"){const J=ne==null?void 0:ne.optionUrl;return(J==null?void 0:J.groupSelect)||ne[F.key]}if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="originalContent")return(ne==null?void 0:ne.value)||ne[F.key];if((ne==null?void 0:ne.type)=="Select"&&(F==null?void 0:F.key)==="multiple"){const J=ne[F.key];return Xs(J)?J:F.default}return(F==null?void 0:F.label)==="类型"&&ne[F.key]===""?"Input":(F==null?void 0:F.key)==="isFormColHidden"&&!ne[F.key]?!1:ne[F.key]},I=async F=>{var se,Be,$e,fe,N,oe;o.value=!0;let ne=[];const J=await(($e=(Be=(se=ce.FormContent)==null?void 0:se.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:Be.value)==null?void 0:$e.value)??((N=(fe=ce.FormContent)==null?void 0:fe.find(U=>(U==null?void 0:U.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:N.value);if(J==null||J.forEach(U=>{C.value++,ne.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,prop:U==null?void 0:U.prop,value:W(U,F),id:C.value,contents:U==null?void 0:U.options,width:(F==null?void 0:F.width)??1})}),F!=null&&F.menuSelect&&((oe=F==null?void 0:F.menuSelect)==null?void 0:oe.length)>0){const U=await ce.menuToContentType(F==null?void 0:F.menuSelect);ne=ne==null?void 0:ne.map(De=>((De==null?void 0:De.name)==="组信息选项"&&(De.contents=U),De))}b.value=F==null?void 0:F.id,s.value=await ce.selectToBase(ce.formToOptionsContents(ne)),h.value=await ce.selectToBase(ce.formToOptionsContents(ne))},j=F=>{var J;c.value=!0;let ne=[];(J=ce.FormButton)==null||J.forEach(se=>{C.value++,ne.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"&&F[se.key]===""?"normal":F[se.key],id:C.value,contents:se==null?void 0:se.options})}),M.value=ne,k.value=ne,b.value=F==null?void 0:F.id};e.watch(()=>u.value,()=>{var ne,J;let F=A.cloneDeep(n.originalItemContents);(ne=A.cloneDeep(n.originalItemContents))!=null&&ne.find(se=>(se==null?void 0:se.key)==="enableWrap")?F=(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(se=>((se==null?void 0:se.key)==="enableWrap"&&(se.contents=!u.value),se)):F.push({key:"enableWrap",contents:!u.value}),r("change",F)},{deep:!0});const L=()=>{var J,se,Be,$e,fe;M.value=k.value;let F={};if(b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value),(J=M.value)==null||J.forEach(N=>{var U;const oe=(U=ce.FormButton)==null?void 0:U.find(De=>(De==null?void 0:De.label)===(N==null?void 0:N.label));oe&&(F[oe.key]=N.value)}),(se=d.value)!=null&&se.find(N=>N.id===F.id))d.value=(Be=d.value)==null?void 0:Be.map(N=>(N.id===F.id&&(N=F),N));else{let N=A.cloneDeep(d.value);d.value||(d.value=[]),N.push(F),d.value=N}c.value=!1,b.value="";let ne=A.cloneDeep(n.originalItemContents);($e=A.cloneDeep(n.originalItemContents))!=null&&$e.find(N=>(N==null?void 0:N.key)==="formButton")?ne=(fe=A.cloneDeep(n.originalItemContents))==null?void 0:fe.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=d.value),N)):ne.push({key:"formButton",contents:d.value}),r("change",ne)},E=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;m.value=(ne=A.cloneDeep(m.value))==null?void 0:ne.filter(se=>(se==null?void 0:se.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=m.value),se))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ne,J;d.value=(ne=A.cloneDeep(d.value))==null?void 0:ne.filter(se=>(se==null?void 0:se.id)!==(F==null?void 0:F.id)),r("change",(J=A.cloneDeep(n.originalItemContents))==null?void 0:J.map(se=>((se==null?void 0:se.key)==="formButton"&&(se.contents=d.value),se))),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var ne;c.value=!0;let F=[];(ne=ce.FormButton)==null||ne.forEach(J=>{C.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:(J==null?void 0:J.label)==="类型"?"normal":"",id:C.value,contents:J==null?void 0:J.options})}),M.value=F,k.value=F},g=()=>{var ne,J,se;o.value=!0;let F=[];(se=(J=(ne=ce.FormContent)==null?void 0:ne.find(Be=>(Be==null?void 0:Be.key)==="Input"))==null?void 0:J.value)==null||se.forEach(Be=>{C.value++,F.push({label:Be==null?void 0:Be.label,name:Be==null?void 0:Be.label,type:Be.type,value:(Be==null?void 0:Be.label)==="类型"?"Input":"",id:C.value,contents:Be==null?void 0:Be.options})}),s.value=F,h.value=F},S=F=>{let ne=A.cloneDeep(k.value);ne=ne==null?void 0:ne.map(J=>(J.value=F==null?void 0:F[J.name],J)),k.value=ne},$=F=>{const ne=F.find(Be=>(Be==null?void 0:Be.name)==="类型");if((ne==null?void 0:ne.value)!="Select")return;const J=F.find(Be=>(Be==null?void 0:Be.name)==="多选"),se=F.find(Be=>(Be==null?void 0:Be.name)==="初始值");J!=null&&J.value&&Eo.isString(se.value)&&(se.value=[se.value]),!(J!=null&&J.value)&&!Eo.isString(se.value)&&(se.value="")},V=async F=>{var ne,J,se,Be,$e,fe,N,oe,U,De,Ie,je;if((F==null?void 0:F.类型)!==((J=(ne=h.value)==null?void 0:ne.find(la=>(la==null?void 0:la.label)==="类型"))==null?void 0:J.value)){let la=[];const Ta=await(($e=(Be=(se=ce.FormContent)==null?void 0:se.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:Be.value)==null?void 0:$e.value)?await((De=(U=(oe=ce.FormContent)==null?void 0:oe.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:U.value)==null?void 0:De.value):(N=(fe=ce.FormContent)==null?void 0:fe.find(ee=>(ee==null?void 0:ee.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:N.value;if(Ta==null||Ta.forEach(ee=>{var ue,ta;C.value++;const ca=Lu(ee==null?void 0:ee.default)?(F==null?void 0:F[ee.label])??ee.value??"":ee==null?void 0:ee.default;la.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:ca,prop:ee==null?void 0:ee.prop,id:C.value,contents:ee==null?void 0:ee.options,width:((ta=(ue=h.value)==null?void 0:ue[0])==null?void 0:ta.width)??1})}),F!=null&&F.菜单选项&&((Ie=F==null?void 0:F.菜单选项)==null?void 0:Ie.length)>0){const ee=await ce.menuToContentType(F==null?void 0:F.菜单选项);la=la==null?void 0:la.map(ca=>((ca==null?void 0:ca.name)==="组信息选项"&&(ca.contents=ee),ca))}$(la),h.value=await ce.selectToBase(A.cloneDeep(la)),s.value=await ce.selectToBase(A.cloneDeep(la))}else{let la=A.cloneDeep(h.value);if(la=la==null?void 0:la.map(Ta=>(Ta.value=F==null?void 0:F[Ta.name],Ta)),F!=null&&F.菜单选项&&((je=F==null?void 0:F.菜单选项)==null?void 0:je.length)>0){const Ta=await ce.menuToContentType(F==null?void 0:F.菜单选项);la=la==null?void 0:la.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=Ta),ee))}la=ce.formToOptionsContents(la),$(la),h.value=await ce.selectToBase(A.cloneDeep(la))}},ae=F=>{F||(s.value=h.value)},Z=async F=>{await V(F),s.value=h.value},be=Tl.debounce(async()=>{var se,Be,$e,fe,N,oe,U,De,Ie,je,la,Ta;s.value=h.value;let F={};F.width=((Be=(se=s.value)==null?void 0:se[0])==null?void 0:Be.width)??1,b.value!==""?F.id=b.value:(C.value++,F.id="id"+C.value);let ne=await((N=(fe=($e=ce.FormContent)==null?void 0:$e.find(ee=>{var ca,ue;return(ee==null?void 0:ee.key)===(((ue=(ca=s.value)==null?void 0:ca.find(ta=>(ta==null?void 0:ta.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:fe.value)==null?void 0:N.value)??((U=(oe=ce.FormContent)==null?void 0:oe.find(ee=>{var ca,ue;return(ee==null?void 0:ee.key)===(((ue=(ca=s.value)==null?void 0:ca.find(ta=>(ta==null?void 0:ta.label)==="类型"))==null?void 0:ue.value)??"label")}))==null?void 0:U.value);if((De=s.value)==null||De.forEach(ee=>{const ca=ne==null?void 0:ne.find(ue=>(ue==null?void 0:ue.label)===(ee==null?void 0:ee.label));ca&&(F[ca.key]=ee.value)}),F.width=F.width?F.width:1,F.key=F==null?void 0:F.label,F.isFormColHidden=F==null?void 0:F.isFormColHidden,(Ie=m.value)!=null&&Ie.find(ee=>ee.id===F.id))m.value=(je=m.value)==null?void 0:je.map(ee=>(ee.id===F.id&&(ee=F),ee));else{let ee=A.cloneDeep(m.value);ee.push(F),m.value=ee}m.value=m.value.map(({id:ee,...ca})=>ca),o.value=!1,b.value="";let J=A.cloneDeep(n.originalItemContents);(la=A.cloneDeep(n.originalItemContents))!=null&&la.find(ee=>(ee==null?void 0:ee.key)==="formContent")?J=(Ta=A.cloneDeep(n.originalItemContents))==null?void 0:Ta.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee)):J.push({key:"formContent",contents:m.value}),r("change",J)},300),ze=()=>{o.value=!1,c.value=!1,b.value="",h.value=[],k.value=[]};return e.watch(()=>n.originalItemContents,()=>{var ne,J,se,Be,$e,fe;if(!n.originalItemContents||n.originalItemContents.length===0)return;const F=A.cloneDeep(n.originalItemContents);m.value=((ne=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:ne.contents)??[],d.value=((J=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:J.contents)??[],u.value=(se=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&se.contents?!((Be=F==null?void 0:F.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&Be.contents):!0,m.value=($e=A.cloneDeep(m.value))==null?void 0:$e.map((N,oe)=>{var De;let U=N;return U.id=(N==null?void 0:N.id)??oe,N!=null&&N.label||(N.label=(N==null?void 0:N.key)??(N==null?void 0:N.label)??""),N!=null&&N.type||(N.type=(N==null?void 0:N.type)??""),N.contents=((De=N==null?void 0:N.options)==null?void 0:De.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,U}),m.value=ce.formToOptionsContents(m.value),d.value=(fe=d.value)==null?void 0:fe.map((N,oe)=>N={label:(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",background:(N==null?void 0:N.background)??"var(--ssComponent-primary-color)",id:oe})},{deep:!0,immediate:!0}),(F,ne)=>{const J=e.resolveComponent("svg-icon"),se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",x2,[e.createElementVNode("div",w2,[e.createElementVNode("div",_2,[ne[2]||(ne[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(se,{class:"icon-content",id:"themeButton",onClick:g},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[1]||(ne[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",S2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Be,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",E2,[e.createElementVNode("div",null,e.toDisplayString(Be.label),1),e.createElementVNode("div",C2,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>I(Be)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>E(Be)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",D2,[ne[4]||(ne[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(se,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(J,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ne[3]||(ne[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",B2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(Be,$e)=>(e.openBlock(),e.createElementBlock("div",{key:$e},[e.createElementVNode("div",T2,[e.createElementVNode("div",null,e.toDisplayString(Be.label),1),e.createElementVNode("div",N2,[e.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>j(Be)},null,8,["onClick"]),e.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:fe=>x(Be)},null,8,["onClick"])])])]))),128))]),ne[6]||(ne[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",A2,[ne[5]||(ne[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(nl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":ne[0]||(ne[0]=Be=>u.value=Be)},null,8,["modelValue"])])]),e.createVNode(Br.ssDialog,{visible:o.value,onBeforeDestroy:ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",z2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:V,onChangeVisible:ae,onBlurChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M2,[e.createVNode(se,{onClick:ze,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ne[7]||(ne[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(se,{class:"ok-button button",onClick:e.unref(be),id:"themeButton"},{default:e.withCtx(()=>ne[8]||(ne[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:ze,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ze,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ws=Xl._export_sfc(O2,[["__scopeId","data-v-20850524"]]),L2={class:"step-module content"},R2={class:"module-data"},$2={class:"step-module layout"},V2={class:"form-content"},P2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),d=e.ref("create"),m=e.ref({}),b=e.ref([]),u=I=>{var j;m.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=s.value)==null||L.forEach(x=>{x.value=""}),d.value="create",c.visible=!0;break;case"update":(E=s.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),d.value="update",c.visible=!0;break;case"delete":b.value.splice(j,1),d.value="delete";break}},M=I=>{var j,L,E;if((I==null?void 0:I.buttonName)==="确认"){const x=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(x).forEach(w=>{x[w]===""&&delete x[w]}),d.value){case"create":b.value.push({...x,index:((j=b.value)==null?void 0:j.length)+1});break;case"update":b.value=(L=b.value)==null?void 0:L.map(w=>w.index===(x==null?void 0:x.index)?{...w,title:x==null?void 0:x.title,description:x==null?void 0:x.description}:w);break}r("change",(E=k())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},k=()=>({comp:"Step",compData:[{key:"stepList",contents:b.value},{key:"stepConfig",contents:m.value}]}),W=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="stepConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",L2,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",R2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",$2,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(nl.ssForm,{rowContents:o.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:W,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",V2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),F2=Xl._export_sfc(P2,[["__scopeId","data-v-7dbd17f2"]]),j2={class:"step-module content"},H2={class:"module-data"},U2={class:"step-module layout"},q2={class:"form-content"},W2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref("create"),s=e.ref({}),h=e.ref([]),c=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),b=e.reactive({visible:!1,width:"40%",title:"时间线"}),u=I=>{var j;s.value=I,r("change",(j=k())==null?void 0:j.compData)},C=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),o.value="create",b.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),o.value="update",b.visible=!0;break;case"delete":h.value.splice(j,1),o.value="delete";break}},M=I=>{var j,L,E,x;if((I==null?void 0:I.buttonName)==="确认"){const w=A.cloneDeep(I==null?void 0:I.content);switch(Object.keys(w).forEach(g=>{w[g]===""&&delete w[g]}),o.value){case"create":(L=h.value)==null||L.push({...w,index:((j=h.value)==null?void 0:j.length)+1});break;case"update":h.value=(E=h.value)==null?void 0:E.map(g=>g.index===(w==null?void 0:w.index)?{...g,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:g);break}r("change",(x=k())==null?void 0:x.compData),b.visible=!1}else b.visible=!1},k=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:h.value},{key:"timeLineConfig",contents:s.value}]}),W=()=>{b.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(s.value=((j=I==null?void 0:I.find(E=>E.key==="timeLineConfig"))==null?void 0:j.contents)??{},h.value=((L=I==null?void 0:I.find(E=>E.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",j2,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",H2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>C("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>C("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",U2,[j[5]||(j[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(nl.ssForm,{rowContents:c.value,onChange:u},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:b.visible,title:b.title,onBeforeDestroy:W,width:b.width},{default:e.withCtx(()=>[e.createElementVNode("div",q2,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),K2=Xl._export_sfc(W2,[["__scopeId","data-v-39ffc861"]]),G2={};function Y2(a,l){return e.openBlock(),e.createElementBlock("div")}const J2=Xl._export_sfc(G2,[["render",Y2]]),X2={class:"extra-content"},Z2={key:0},Q2={key:1},e4={class:"dialog-footer"},a4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),o=e.ref(),s=e.ref(),h=l,c=e.ref(!1),d=e.ref({}),m=e.ref({}),b=e.ref();e.watch(()=>[n.itemData],()=>{var x;const E=A.cloneDeep(n.itemData);o.value=(x=A.cloneDeep(E))==null?void 0:x.map(w=>{var g;if(w.key==="extra"){let S=[];(g=w.value)==null||g.forEach($=>{var V;S.push((V=Object.values($))==null?void 0:V[0])}),w.value=S}return w})},{deep:!0,immediate:!0});const u=(E,x,w,g)=>{var $;let S={};(($=E==null?void 0:E[0])==null?void 0:$.contents)==="详情"&&(c.value=!0,S[x]=E,s.value=E==null?void 0:E.filter(V=>(V==null?void 0:V.key)!=="tableContentName"),d.value=S,m.value=w,b.value=g.id)},C=E=>{var V,ae,Z,be;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(ze=>(ze==null?void 0:ze.key)==="tableContentName"),w=(be=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:be.filter(ze=>(ze==null?void 0:ze.key)!=="tableContentName"),g=w==null?void 0:w.map((ze,F)=>{var ne;return F===E.index&&(ze==null?void 0:ze.comp)==="Table"&&(ze.compData=(ne=ze.compData)==null?void 0:ne.map(J=>{var se,Be;return(J==null?void 0:J.key)==="tableContents"&&(J.contents=(Be=(se=E.content)==null?void 0:se.map($e=>{let fe={};for(let N in $e)N!=="id"&&(fe[N]=$e[N]);return fe}))==null?void 0:Be.map($e=>Object.values($e))),J})),ze});g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let ze in S)$[ze]=g;d.value=$},M=()=>{c.value=!1,d.value={},m.value={},b.value=void 0,r.value++},k=E=>{var V,ae,Z,be;const x=(ae=(V=Object.values(A.cloneDeep(d.value)))==null?void 0:V[0])==null?void 0:ae.filter(ze=>(ze==null?void 0:ze.key)==="tableContentName"),w=(be=(Z=Object.values(A.cloneDeep(d.value)))==null?void 0:Z[0])==null?void 0:be.filter(ze=>(ze==null?void 0:ze.key)!=="tableContentName"),g=w==null?void 0:w.map((ze,F)=>(F===E.index&&(ze.compData=E.contents),ze));g.unshift(x==null?void 0:x[0]);let S=A.cloneDeep(d.value),$={};for(let ze in S)$[ze]=g;d.value=$},W=()=>{var x,w;let E={};for(let g in m.value)g===((x=Object.keys(d.value))==null?void 0:x[0])?E[g]=(w=Object.values(d.value))==null?void 0:w[0]:E[g]=m.value[g];h("change",{buttonName:"编辑",index:b.value,singleContent:E},"methodData"),c.value=!1,d.value={},m.value={},b.value=void 0},I=()=>{c.value=!1,d.value={},m.value={},b.value=void 0},j=E=>{h("change",E,"methodData")},L=E=>Ti(E);return(E,x)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",X2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(g==null?void 0:g.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Z2)):(e.openBlock(),e.createElementBlock("div",Q2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,childItemData:g==null?void 0:g.itemChildData,key:S,index:(g==null?void 0:g.id)??S,onContentClick:u,onChange:j},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Br.ssDialog,{visible:c.value,onBeforeDestroy:I},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(g.comp)),{itemData:g==null?void 0:g.compData,onChange:C,childItemData:g==null?void 0:g.itemChildData,key:S,onContentChange:k,index:(g==null?void 0:g.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",e4,[e.createVNode(w,{class:"cancel-button footer-button",onClick:M,id:"themeBorderButton"},{default:e.withCtx(()=>x[0]||(x[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:W,id:"themeButton"},{default:e.withCtx(()=>x[1]||(x[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},l4=Xl._export_sfc(a4,[["__scopeId","data-v-2d9c5ab2"]]),r4={key:0,class:"method-content"},n4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=ce.useOriginalState(A.pinia),{originalPath:r}=A.storeToRefs(n),o=a,s=e.ref(!1),h=e.ref(),c=ce.useTableComp(A.pinia),{multipleTableConst:d}=A.storeToRefs(c),m=A.useModelComp(A.pinia),b=e.ref(!1),u=A.useMenuState(A.pinia),C=A.useLoginState(A.pinia),{itemData:M,isEdit:k,routeToChildPath:W,tableViewContents:I,lockingPage:j,payloadTypes:L}=A.storeToRefs(m),{activeMenuPath:E,platform:x,childMenu:w}=A.storeToRefs(u),{loginUserInfo:g}=A.storeToRefs(C),S=e.ref(!1),$=async()=>{var fe,N;(fe=l.value)!=null&&fe.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")&&await J((N=l.value)==null?void 0:N.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")),await ce.onSaveBack()};e.watch(()=>M.value,async()=>{k.value==="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{deep:!0});const V=()=>{s.value=!1,h.value=void 0},ae=fe=>fe.map(N=>{const oe={};for(const U in N){const De=N[U];if(U.includes(d.value)){const Ie=U.split(d.value);let je=oe;Ie.forEach((la,Ta)=>{Ta===Ie.length-1?je[la]=De:(je[la]||(je[la]={}),je=je[la])})}else oe[U]=De}return oe}),Z=async(fe,N,oe=[])=>{var De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya;let U=(De=A.cloneDeep(N))==null?void 0:De.filter(R=>(R==null?void 0:R.comp)!=="methodButton");if(fe!=null&&fe.includes("[")){let R=(ee=(Ta=(la=(je=(Ie=A.cloneDeep(fe))==null?void 0:Ie.split("["))==null?void 0:je[1])==null?void 0:la.split("]"))==null?void 0:Ta[0])==null?void 0:ee.split(":"),H="";if(R!=null&&R[0]){let X=(ca=U==null?void 0:U.find(ve=>(ve==null?void 0:ve.name)===(R==null?void 0:R[0])))==null?void 0:ca.compData;if(!X){let ve=(ue=fe==null?void 0:fe.split("["))==null?void 0:ue[0],de=await ce.getItemData(ve,sessionStorage.getItem("systemKey"),"",!1,"","",oe);X=(ta=de==null?void 0:de.find(va=>(va==null?void 0:va.name)===(R==null?void 0:R[0])))==null?void 0:ta.compData}X==null||X.forEach(ve=>{var de,va,na,Pe,wa,Me;if((ve==null?void 0:ve.key)==="formContent")(de=ve==null?void 0:ve.contents)==null||de.forEach(ma=>{var Oa;(ma==null?void 0:ma.key)===(R==null?void 0:R[1])&&(Array.isArray(ma==null?void 0:ma.value)?H=ma==null?void 0:ma.value:H=(Oa=ma==null?void 0:ma.value)==null?void 0:Oa.toString())});else if((ve==null?void 0:ve.key)==="tableContents"){let ma=[],Oa=(va=X==null?void 0:X.find(pa=>(pa==null?void 0:pa.key)==="header"))==null?void 0:va.contents,za=(R==null?void 0:R[1])??"";if(Oa!=null&&Oa.every(pa=>Array.isArray(pa))){let pa=ce.getColumnChild((wa=Oa==null?void 0:Oa[0])==null?void 0:wa.filter(Ca=>(Ca==null?void 0:Ca.label)!=="操作"));(Me=ve.contents)==null||Me.forEach(Ca=>{let Ae={};Ca=Ca==null?void 0:Ca.filter(he=>!(he!=null&&he.id)),pa==null||pa.forEach((he,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===he.prop)&&(Ae[he.prop]=xe)}),ma.push(Ae)}),ma=ae(ma)}else{let pa=(na=Oa==null?void 0:Oa.map(Ca=>Ca==null?void 0:Ca.label))==null?void 0:na.filter(Ca=>Ca!=="操作");(Pe=ve.contents)==null||Pe.forEach(Ca=>{let Ae={};Ca=Ca==null?void 0:Ca.filter(he=>!(he!=null&&he.id)),pa==null||pa.forEach((he,Y)=>{let xe=Ca[Y];typeof Ca[Y]=="number"&&(xe=Ca[Y].toString()),(za===""||za===he)&&(Ae[he]=xe)}),ma.push(Ae)})}H=ma}})}return H}else if(fe!=null&&fe.includes("/")){let R={};return(Se=A.cloneDeep(U))==null||Se.forEach((H,X)=>{var ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da;if((H==null?void 0:H.comp)==="Table"){let Ke=Array.isArray((va=(de=(ve=H==null?void 0:H.compData)==null?void 0:ve.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:de.contents)==null?void 0:va[0])?(Me=(wa=(Pe=(na=H==null?void 0:H.compData)==null?void 0:na.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Pe.contents)==null?void 0:wa[0])==null?void 0:Me.some(pe=>pe==null?void 0:pe.children):[],aa=(za=(Oa=(ma=H==null?void 0:H.compData)==null?void 0:ma.find(pe=>(pe==null?void 0:pe.key)==="tableContents"))==null?void 0:Oa.contents)==null?void 0:za.map(pe=>(pe!=null&&pe.find(Sa=>Sa==null?void 0:Sa.id)&&(pe=pe.slice(1)),pe)),Ve=(Y=(he=(Ae=(Ca=(pa=H==null?void 0:H.compData)==null?void 0:pa.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Ca.contents)==null?void 0:Ae[0])==null?void 0:he[0])==null?void 0:Y.label,ye=(me=(xe=H==null?void 0:H.compData)==null?void 0:xe.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:me.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?R[H.name]=R!=null&&R[H.name]?R[H.name]:ce.tableToForm(aa,ye):R[Ve]=ce.tableToForm(aa,ye);else{const pe=[];ye=ye.slice(1,ye.length-1),ye==null||ye.forEach((Sa,ya)=>{aa==null||aa.forEach(vl=>{pe.push({key:Sa.label+vl[0],value:vl[ya+1]})})}),R["form"+X]=pe}}else{const Ke=(da=(qe=H.compData)==null?void 0:qe.find(Ve=>(Ve==null?void 0:Ve.key)==="formContent"))==null?void 0:da.contents;R!=null&&R.form||(R.form=[]);const aa=[];Ke==null||Ke.forEach(Ve=>{Ve.key!==""&&(Ve={key:(Ve==null?void 0:Ve.key)??(Ve==null?void 0:Ve.label),value:Ve==null?void 0:Ve.value},aa.push(Ve))}),R.form=[...aa,...A.cloneDeep(R==null?void 0:R.form)]}}),R}else{if(fe==="createInsofDataApi"){let R=(te=A.cloneDeep(N))==null?void 0:te[0];return R={comp:(Ne=A.cloneDeep(R))==null?void 0:Ne.comp,compData:(We=A.cloneDeep(R))==null?void 0:We.compData,name:(sa=A.cloneDeep(R))==null?void 0:sa.name,isShow:(Ya=A.cloneDeep(R))==null?void 0:Ya.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:R}}}return fe}},be=async(fe,N,oe)=>{var Ie,je,la;let U=await ce.getItemData(N,sessionStorage.getItem("systemKey"),""),De=U==null?void 0:U.find(Ta=>(Ta==null?void 0:Ta.name)===(oe==null?void 0:oe[0]));if(De){if((De==null?void 0:De.comp)==="Table"){let Ta={};for(let Ne in A.cloneDeep(fe))A.cloneDeep(fe)[Ne]!=="loginUser"?Ta[Ne]=A.cloneDeep(fe)[Ne]:Ta[Ne]=((Ie=g.value)==null?void 0:Ie.account)||((je=g.value)==null?void 0:je.账号);let ee=[],ca=Ta;Array.isArray(fe)||(ca=[Ta]),ca==null||ca.forEach(Ne=>{ee.push({[Ne[oe[1]]]:Ne})});let ue=[],ta=ee==null?void 0:ee.map(Ne=>{var We;return(We=Object.keys(Ne))==null?void 0:We[0]});U==null||U.forEach(Ne=>{var We;(Ne==null?void 0:Ne.name)===(oe==null?void 0:oe[0])&&((We=Ne==null?void 0:Ne.compData)==null||We.forEach(sa=>{var Ya;(sa==null?void 0:sa.key)==="tableContents"&&((Ya=sa==null?void 0:sa.contents)==null||Ya.forEach(R=>{R!=null&&R.some(H=>ta.includes(H))&&ue.push({[R.find(H=>H.id).id]:R.find(H=>ta.includes(H))})}))}))});let Se=ue==null?void 0:ue.map(Ne=>{var We;return(We=Object.keys(Ne))==null?void 0:We[0]}),te=[];if(Se==null||Se.forEach(Ne=>{var Ya;let We=(Ya=ue==null?void 0:ue.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0].toString())===Ne.toString()}))==null?void 0:Ya[Ne],sa=ee==null?void 0:ee.find(R=>{var H;return((H=Object.keys(R))==null?void 0:H[0])===We});te.push({id:parseInt(Ne),value:{tableData:sa[We]}})}),(te==null?void 0:te.length)>0)return te}else if((De==null?void 0:De.comp)==="Form"){let Ta=A.cloneDeep(De);Ta.compData=(la=Ta.compData)==null?void 0:la.map(ue=>{var ta;return(ue==null?void 0:ue.key)==="formContent"&&(ue.contents=(ta=ue.contents)==null?void 0:ta.map(Se=>((Se==null?void 0:Se.key)===(oe==null?void 0:oe[1])&&(Se.value=(fe==null?void 0:fe[Se==null?void 0:Se.prop])||fe),Se))),ue});let ee={};for(let ue in Ta)ue!=="id"&&(ee[ue]=Ta[ue]);let ca=[];if(ca.push({id:De==null?void 0:De.id,keyType:oe==null?void 0:oe[1],value:{pageData:ee}}),(ca==null?void 0:ca.length)>0)return ca}}},ze=async(fe,N,oe)=>{var Ie,je,la,Ta,ee,ca,ue,ta,Se,te;let U=await ce.getItemData(N,sessionStorage.getItem("systemKey"),""),De=U==null?void 0:U.find(Ne=>(Ne==null?void 0:Ne.name)===(oe==null?void 0:oe[0]));if(De){if((De==null?void 0:De.comp)==="Table"){let Ne={};for(let We in A.cloneDeep(fe))A.cloneDeep(fe)[We]!=="loginUser"?Ne[We]=A.cloneDeep(fe)[We]:Ne[We]=((Ie=g.value)==null?void 0:Ie.account)||((je=g.value)==null?void 0:je.账号);await Mr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:De==null?void 0:De.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ne}})}else if((De==null?void 0:De.comp)==="Form"){let Ne=A.cloneDeep(De),We=Object.keys(fe),sa="";(Ta=(la=A.cloneDeep(Ne))==null?void 0:la.compData)==null||Ta.forEach(de=>{var va,na;(de==null?void 0:de.key)==="formContent"&&((na=(va=A.cloneDeep(de))==null?void 0:va.contents)==null||na.forEach(Pe=>{var wa;We.includes(Pe==null?void 0:Pe.key)&&(Pe==null?void 0:Pe.value)===((wa=g.value)==null?void 0:wa.姓名)&&(sa=Pe==null?void 0:Pe.key)}))});let Ya=[];(ee=Object.values(fe[sa]))==null||ee.forEach(de=>{de!=null&&de.includes("(")&&Ya.push(de)}),Ya=[...new Set(Ya)];const R=Ya==null?void 0:Ya.map(async de=>{var Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe;let va="";(Ca=(pa=(za=(Oa=(ma=(Me=A.cloneDeep(de))==null?void 0:Me.split("("))==null?void 0:ma[1])==null?void 0:Oa.split(")"))==null?void 0:za[0])==null?void 0:pa.split(":"))==null||Ca.forEach(da=>{va=va===""?va+da.replaceAll("'",""):va+"/"+da.replaceAll("'","")});let na=[];(qe=(me=(xe=(Y=(he=(Ae=A.cloneDeep(de))==null?void 0:Ae.split("<"))==null?void 0:he[1])==null?void 0:Y.split(">"))==null?void 0:xe[0])==null?void 0:me.split(":"))==null||qe.forEach(da=>{na.push(da.replaceAll("'",""))});const Pe=await ce.getItemData(va,sessionStorage.getItem("systemKey"),"");let wa="";return Pe==null||Pe.forEach(da=>{var Ke;da.name===(na==null?void 0:na[0])&&((Ke=da==null?void 0:da.compData)==null||Ke.forEach(aa=>{var Ve;(aa==null?void 0:aa.key)==="formContent"&&((Ve=aa.contents)==null||Ve.forEach(ye=>{(ye==null?void 0:ye.key)===(na==null?void 0:na[1])&&(wa=ye==null?void 0:ye.value)}))}))}),{[de]:wa}}),H=await Promise.all(R);Ne.compData=(ue=(ca=A.cloneDeep(Ne))==null?void 0:ca.compData)==null?void 0:ue.map(de=>{var va,na;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(na=(va=A.cloneDeep(de))==null?void 0:va.contents)==null?void 0:na.map(Pe=>{var wa,Me,ma,Oa;return(wa=fe[sa])!=null&&wa[Pe==null?void 0:Pe.key]&&(fe[sa][Pe==null?void 0:Pe.key].includes("(")?Pe.value=(Me=H==null?void 0:H.find(za=>{var pa;return((pa=Object.keys(za))==null?void 0:pa[0])===fe[sa][Pe==null?void 0:Pe.key]}))==null?void 0:Me[fe[sa][Pe==null?void 0:Pe.key]]:Pe.value=(Oa=(ma=A.cloneDeep(fe))==null?void 0:ma[sa])==null?void 0:Oa[Pe==null?void 0:Pe.key]),Pe})),de});const X=await Mr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let ve="";((ta=X==null?void 0:X.data)==null?void 0:ta.type)==="success"&&((te=(Se=X==null?void 0:X.data)==null?void 0:Se.result)==null||te.forEach(de=>{var va,na;((na=(va=de==null?void 0:de.value)==null?void 0:va.pageData)==null?void 0:na.name)===(oe==null?void 0:oe[0])&&(ve=de.id)}),await Mr.updateInsofDataApi({id:ve,value:{pageData:Ne}}))}}},F=(fe,N="",oe={})=>{for(const[U,De]of Object.entries(fe)){const Ie=N?`${N}.${U}`:U;De!==null&&typeof De=="object"&&!Array.isArray(De)&&Object.prototype.toString.call(De)!=="[object Date]"?F(De,Ie,oe):oe[Ie]=De}return oe},ne=async(fe,N,oe,U)=>{var je,la,Ta,ee,ca,ue,ta,Se,te,Ne,We,sa,Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa;let De=await ce.getItemData(N,sessionStorage.getItem("systemKey"),""),Ie=De==null?void 0:De.find(za=>(za==null?void 0:za.name)===(oe==null?void 0:oe[0]));if(Ie){if(!(oe!=null&&oe[1])&&(Ie==null?void 0:Ie.comp)==="Table"){let za={},pa=[],Ca=(la=(je=Ie==null?void 0:Ie.compData)==null?void 0:je.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:la.contents;Ca!=null&&Ca.every(Y=>Array.isArray(Y))?pa=(ee=ce.getColumnChild((Ta=Ca==null?void 0:Ca[0])==null?void 0:Ta.filter(Y=>(Y==null?void 0:Y.label)!=="操作")))==null?void 0:ee.map(Y=>Y==null?void 0:Y.prop):pa=Ca==null?void 0:Ca.map(Y=>Y==null?void 0:Y.label);for(let Y in A.cloneDeep(fe))if(A.cloneDeep(fe)[Y]!=="loginUser"){let xe=F(A.cloneDeep(fe)[Y]),me={};for(let qe in xe)if(pa!=null&&pa.find(da=>da===qe))me[qe]=xe[qe];else if(pa!=null&&pa.find(da=>(da==null?void 0:da.toUpperCase())===(qe==null?void 0:qe.toUpperCase()))){let da=pa==null?void 0:pa.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(qe==null?void 0:qe.toUpperCase()));me[da]=xe[qe]}za[Y]=me}else za[Y]=((ca=g.value)==null?void 0:ca.account)||((ue=g.value)==null?void 0:ue.账号);let Ae=await Mr.getInsofDataApi({keyLikes:{tableId:Ie==null?void 0:Ie.id}});if(((Se=(ta=Ae==null?void 0:Ae.data)==null?void 0:ta.result)==null?void 0:Se.length)>0){let Y=(Ne=(te=Ae==null?void 0:Ae.data)==null?void 0:te.result)==null?void 0:Ne.map(xe=>xe==null?void 0:xe.id);(Y==null?void 0:Y.length)>0&&await Mr.batchDeleteInsofDataApi({ids:Y})}let he=[];if((We=Ie==null?void 0:Ie.compData)!=null&&We.find(Y=>(Y==null?void 0:Y.key)==="pageColumn")&&((R=(Ya=(sa=Ie==null?void 0:Ie.compData)==null?void 0:sa.find(Y=>(Y==null?void 0:Y.key)==="pageColumn"))==null?void 0:Ya.contents)!=null&&R.includes("["))){const Y=await Mr.getInsofDataApi({id:Ie==null?void 0:Ie.tableId});let xe=((de=(ve=(X=(H=Y==null?void 0:Y.data)==null?void 0:H.result)==null?void 0:X[0])==null?void 0:ve.key)==null?void 0:de.pageKey)??"";(va=Object.values(za))==null||va.forEach(me=>{he.push({key:{type:"data",pageKey:xe,tableId:Ie==null?void 0:Ie.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:me}})})}else(na=Object.values(za))==null||na.forEach(Y=>{he.push({key:{type:"data",pageKey:N,tableId:Ie==null?void 0:Ie.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Y}})});(he==null?void 0:he.length)>0&&await Mr.batchAddInsofDataApi({dataList:he})}else if(!(oe!=null&&oe[1])&&(Ie==null?void 0:Ie.comp)==="Form"){let za=A.cloneDeep(Ie);za.compData=(wa=(Pe=A.cloneDeep(za))==null?void 0:Pe.compData)==null?void 0:wa.map(Ae=>{var he,Y;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(Y=(he=A.cloneDeep(Ae))==null?void 0:he.contents)==null?void 0:Y.map(xe=>{var me,qe;return(me=A.cloneDeep(fe))!=null&&me[xe==null?void 0:xe.key]&&(xe.value=(qe=A.cloneDeep(fe))==null?void 0:qe[xe==null?void 0:xe.key]),xe})),Ae});const pa=await Mr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let Ca="";((Me=pa==null?void 0:pa.data)==null?void 0:Me.type)==="success"&&((Oa=(ma=pa==null?void 0:pa.data)==null?void 0:ma.result)==null||Oa.forEach(Ae=>{var he,Y;((Y=(he=Ae==null?void 0:Ae.value)==null?void 0:he.pageData)==null?void 0:Y.name)===(oe==null?void 0:oe[0])&&(Ca=Ae.id)}),await Mr.updateInsofDataApi({id:Ca,value:{pageData:za}}))}}},J=async fe=>{var N,oe,U,De,Ie,je,la,Ta,ee,ca,ue,ta,Se,te;u.setImportLoading(!0);try{if(fe.api){let Ne=new WeakMap,We=await ce.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ne),sa="";if(We=We==null?void 0:We.map(na=>{var Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe;if((na==null?void 0:na.comp)==="Form")na.compData=(Pe=na.compData)==null?void 0:Pe.map(me=>{var qe;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(qe=me.contents)==null?void 0:qe.map(da=>{var Ke;if((da==null?void 0:da.value)===""&&(da==null?void 0:da.type)==="Select"){let aa=ce.judgeContents((Ke=A.cloneDeep(da))==null?void 0:Ke.optionUrl,Ne);da.value=da.value||aa}return da})),me});else if((na==null?void 0:na.comp)==="Table"&&(wa=na.compData)!=null&&wa.find(me=>(me==null?void 0:me.key)==="pageColumn")){let me=(ma=(Me=na.compData)==null?void 0:Me.find(aa=>(aa==null?void 0:aa.key)==="pageColumn"))==null?void 0:ma.contents,qe=((za=(Oa=na.compData)==null?void 0:Oa.find(aa=>(aa==null?void 0:aa.key)==="pageGroup"))==null?void 0:za.contents)??"",da=(Ae=(Ca=(pa=me==null?void 0:me.split("["))==null?void 0:pa[1])==null?void 0:Ca.split("]"))==null?void 0:Ae[0];sa=((he=me==null?void 0:me.split("["))==null?void 0:he[0])+((xe=(Y=I.value)==null?void 0:Y.find(aa=>(aa==null?void 0:aa.key)===da))==null?void 0:xe.value)}return na}),!(sa===""||sa==="")){const na=await ce.getItemData(sa,sessionStorage.getItem("systemKey"),"",!1,"","",Ne);We=We==null?void 0:We.map(Pe=>{var wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe;if((Pe==null?void 0:Pe.comp)==="Table"&&(wa=Pe.compData)!=null&&wa.find(da=>(da==null?void 0:da.key)==="pageColumn")){let da=(ma=(Me=Pe.compData)==null?void 0:Me.find(pe=>(pe==null?void 0:pe.key)==="pageColumn"))==null?void 0:ma.contents,Ke=((za=(Oa=Pe.compData)==null?void 0:Oa.find(pe=>(pe==null?void 0:pe.key)==="pageGroup"))==null?void 0:za.contents)??"",aa=(Ae=(Ca=(pa=da==null?void 0:da.split("["))==null?void 0:pa[1])==null?void 0:Ca.split("]"))==null?void 0:Ae[0],Ve=((he=da==null?void 0:da.split("["))==null?void 0:he[0])+((xe=(Y=I.value)==null?void 0:Y.find(pe=>(pe==null?void 0:pe.key)===aa))==null?void 0:xe.value),ye=(me=na==null?void 0:na.find(pe=>(pe==null?void 0:pe.name)===(Ke===""?o==null?void 0:o.compName:Ke)))==null?void 0:me.compData;Pe.compData=(qe=Pe.compData)==null?void 0:qe.map(pe=>{var Sa;return(pe==null?void 0:pe.key)==="tableContents"&&(pe.contents=(Sa=ye==null?void 0:ye.find(ya=>(ya==null?void 0:ya.key)==="tableContents"))==null?void 0:Sa.contents),pe})}return Pe})}let Ya={};if(((oe=(N=fe==null?void 0:fe.extraValues)==null?void 0:N.input)==null?void 0:oe.length)>0){const na=(De=(U=fe==null?void 0:fe.extraValues)==null?void 0:U.input)==null?void 0:De.map(async Pe=>{var wa;se!=null&&se.find(Me=>Me===Pe)?Ya=await Z(Pe,We):Ya[Object.keys(Pe)[0]]=await Z((wa=Object.values(Pe))==null?void 0:wa[0],We,Ne)});await Promise.all(na)}else Ya=await Z("/",We);let R=!1;(je=(Ie=fe==null?void 0:fe.extraValues)==null?void 0:Ie.output)==null||je.forEach(na=>{var Pe,wa;(wa=(Pe=Object.values(na))==null?void 0:Pe[0])!=null&&wa.includes(".doc")&&(R=!0)});let H;if(R){const na=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await Ua.axios.post(fe.api,Ya,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{na.close()})}else H=await Ua.axios.post(fe.api,Ya,{headers:{"Content-Type":"application/json"}});let X=(ca=(ee=(Ta=(la=A.cloneDeep(fe))==null?void 0:la.extraValues)==null?void 0:Ta.output)==null?void 0:ee.map(na=>{var Pe,wa,Me,ma,Oa,za,pa,Ca,Ae,he,Y,xe,me,qe,da,Ke;if(!((wa=(Pe=Object.values(na))==null?void 0:Pe[0])!=null&&wa.includes(".doc"))){let aa=(he=(Ae=(Ca=(ma=A.cloneDeep((Me=Object.values(na))==null?void 0:Me[0]))==null?void 0:ma.split("["))==null?void 0:Ca[((pa=(za=A.cloneDeep((Oa=Object.values(na))==null?void 0:Oa[0]))==null?void 0:za.split("["))==null?void 0:pa.length)-1])==null?void 0:Ae.split("]"))==null?void 0:he[0],Ve=aa==null?void 0:aa.split(":"),ye=(me=A.cloneDeep((Y=Object.values(na))==null?void 0:Y[0]))==null?void 0:me.substring(0,A.cloneDeep((xe=Object.values(na))==null?void 0:xe[0]).lastIndexOf("["));if(ye=(da=A.cloneDeep(ye))==null?void 0:da.slice(0,((qe=A.cloneDeep(ye))==null?void 0:qe.length)-1),ye!=null&&ye.includes("[")){let pe="";if((Ke=ce.contentTransArrayToAll(ye,"/"))==null||Ke.forEach(Sa=>{var ya,vl,Nl,pl,Fl,ja,jl;if(!(Sa!=null&&Sa.includes("[")))pe=pe===""?pe+Sa.replaceAll("/",""):pe+"/"+Sa.replaceAll("/","");else{let Rl=A.cloneDeep(Sa).slice(1,((ya=A.cloneDeep(Sa))==null?void 0:ya.length)-1),Da=(ja=(Fl=(pl=(Nl=(vl=A.cloneDeep(Rl))==null?void 0:vl.split("["))==null?void 0:Nl[1])==null?void 0:pl.split("]"))==null?void 0:Fl[0])==null?void 0:ja.split(":"),al="",dl=(jl=We==null?void 0:We.find(ol=>(ol==null?void 0:ol.name)===(Da==null?void 0:Da[0])))==null?void 0:jl.compData;dl==null||dl.forEach(ol=>{var $a;(ol==null?void 0:ol.key)==="formContent"&&(($a=ol==null?void 0:ol.contents)==null||$a.forEach(tl=>{(tl==null?void 0:tl.key)===(Da==null?void 0:Da[1])&&(al=tl==null?void 0:tl.value)}))}),pe=pe===""?pe+al.replaceAll("/",""):pe+"/"+al.replaceAll("/","")}}),ye=pe,ye[(ye==null?void 0:ye.length)-1]!=="/")return ye}}}))==null?void 0:ca.filter(na=>na);X=[...new Set(A.cloneDeep(X))];let ve=X==null?void 0:X.map(async na=>{let Pe=await ce.getItemData(na,sessionStorage.getItem("systemKey"),"",!1,"","",Ne);if((Pe==null?void 0:Pe.length)===0)return await ce.getParentContents(na)});await Promise.all(ve);let de=[],va=(Se=(ta=(ue=A.cloneDeep(fe))==null?void 0:ue.extraValues)==null?void 0:ta.output)==null?void 0:Se.map(async na=>{var Ca,Ae,he,Y,xe,me,qe,da,Ke,aa,Ve,ye,pe,Sa,ya,vl,Nl,pl,Fl,ja,jl,Rl,Da,al,dl,ol,$a,tl,ll,Te,Ma,Je,ie,Xe,Aa,Ze,xa,Va,Ja,Ue,fa,oa,il,Le,Pa,sl,fr,ur,Zl,rr,dr,yr,Oe,Ql,_r,Nr,Al,Tr,Pr,Wl,gr,Ir,Rr,Vl,ar,Fr,Vr,Or,jr,Yr;if((Ae=(Ca=Object.values(na))==null?void 0:Ca[0])!=null&&Ae.includes(".doc")){var Pe=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),wa=H.headers["content-disposition"],Me=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ma=Me.exec(wa),Oa=ma==null?void 0:ma[1],za=document.createElement("a"),pa=window.URL.createObjectURL(Pe);h.value=[{name:Oa,blobUrl:pa}],s.value=!0}else{let sn=(aa=(Ke=(da=(Y=A.cloneDeep((he=Object.values(na))==null?void 0:he[0]))==null?void 0:Y.split("["))==null?void 0:da[((qe=(me=A.cloneDeep((xe=Object.values(na))==null?void 0:xe[0]))==null?void 0:me.split("["))==null?void 0:qe.length)-1])==null?void 0:Ke.split("]"))==null?void 0:aa[0],Yl=sn==null?void 0:sn.split(":"),hr=(pe=A.cloneDeep((Ve=Object.values(na))==null?void 0:Ve[0]))==null?void 0:pe.substring(0,A.cloneDeep((ye=Object.values(na))==null?void 0:ye[0]).lastIndexOf("["));if(hr!=null&&hr.includes("[")?hr=(ya=A.cloneDeep(hr))==null?void 0:ya.slice(0,((Sa=A.cloneDeep(hr))==null?void 0:Sa.length)-1):hr===""&&(hr=E.value),hr=hr.replaceAll("<","[").replaceAll(">","]"),hr!=null&&hr.includes("[")){let ml="";(vl=ce.contentTransArrayToAll(hr,"/"))==null||vl.forEach((nr,Ll)=>{var Sr,Hl,vr,er,Wr,an,_n,Un,Ln,Sn,An;if(!(nr!=null&&nr.includes("[")))ml=ml===""?ml+nr.replaceAll("/",""):ml+"/"+nr.replaceAll("/","");else{let Rn="",cn="";(Sr=A.cloneDeep(nr))!=null&&Sr.includes("]")?(Rn=A.cloneDeep(nr).slice(1,((Hl=A.cloneDeep(nr))==null?void 0:Hl.length)-1),cn=(_n=(an=(Wr=(er=(vr=A.cloneDeep(Rn))==null?void 0:vr.split("["))==null?void 0:er[1])==null?void 0:Wr.split("]"))==null?void 0:an[0])==null?void 0:_n.split(":")):(Rn=A.cloneDeep(nr).slice(1,(Un=A.cloneDeep(nr))==null?void 0:Un.length),cn=(Ln=A.cloneDeep(Rn))==null?void 0:Ln.split("/"));let zn="",qn=(Sn=We==null?void 0:We.find(Hr=>(Hr==null?void 0:Hr.name)===(cn==null?void 0:cn[0])))==null?void 0:Sn.compData;qn==null||qn.forEach(Hr=>{var Wn;(Hr==null?void 0:Hr.key)==="formContent"&&((Wn=Hr==null?void 0:Hr.contents)==null||Wn.forEach(bn=>{(bn==null?void 0:bn.key)===(cn==null?void 0:cn[1])&&(zn=bn==null?void 0:bn.value)}))}),((An=ce.contentTransArrayToAll(hr,"/"))==null?void 0:An.length)-1!==Ll?ml=ml===""?ml+zn.replaceAll("/",""):ml+"/"+zn.replaceAll("/",""):ml=ml+r.value+zn.replaceAll("/","")}}),(Nl=E.value)!=null&&Nl.includes(ml)?hr=E.value:hr=ml}let qr=A.cloneDeep((pl=Object.keys(na))==null?void 0:pl[0]);if(((Fl=H==null?void 0:H.data)==null?void 0:Fl.statusCode)===200||((ja=H==null?void 0:H.data)==null?void 0:ja.code)===200){if(((Rl=(jl=H==null?void 0:H.data)==null?void 0:jl.data)!=null&&Rl[qr]||(al=(Da=H==null?void 0:H.data)==null?void 0:Da.result)!=null&&al[qr])&&(Yl==null?void 0:Yl.length)===1)return await ne(((ol=(dl=H==null?void 0:H.data)==null?void 0:dl.data)==null?void 0:ol[qr])||((tl=($a=H==null?void 0:H.data)==null?void 0:$a.result)==null?void 0:tl[qr]),A.cloneDeep(hr),Yl,sa);if((Te=(ll=H==null?void 0:H.data)==null?void 0:ll.data)!=null&&Te[qr]||(Je=(Ma=H==null?void 0:H.data)==null?void 0:Ma.result)!=null&&Je[qr]){let ml=await be(((Xe=(ie=H==null?void 0:H.data)==null?void 0:ie.data)==null?void 0:Xe[qr])||((Ze=(Aa=H==null?void 0:H.data)==null?void 0:Aa.result)==null?void 0:Ze[qr]),A.cloneDeep(hr),Yl);return ml&&(de=[...de,...ml]),ml}else{if(!((xa=H==null?void 0:H.data)!=null&&xa.data)){let ml=await ce.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ne);ml=ml==null?void 0:ml.map(Ll=>{var Sr;return(Ll==null?void 0:Ll.name)===(Yl==null?void 0:Yl[0])&&(Ll.compData=(Sr=Ll.compData)==null?void 0:Sr.map(Hl=>{var vr;return(Hl==null?void 0:Hl.key)==="formContent"&&(Hl.contents=(vr=Hl.contents)==null?void 0:vr.map(er=>{var Wr,an;return(er==null?void 0:er.key)===(Yl==null?void 0:Yl[1])&&(er.value=(an=(Wr=H==null?void 0:H.data)==null?void 0:Wr.result)==null?void 0:an[qr==null?void 0:qr.replaceAll(":","")]),er})),Hl})),Ll});let nr=[];(Va=ml==null?void 0:ml.filter(Ll=>(Ll==null?void 0:Ll.comp)==="Form"))==null||Va.forEach(async Ll=>{let Sr={};for(let Hl in Ll)Hl!=="id"&&(Sr[Hl]=Ll[Hl]);nr.push({id:Ll==null?void 0:Ll.id,value:{pageData:Sr}})}),(nr==null?void 0:nr.length)>0&&await Mr.batchUpdateInsofDataApi({dataList:nr});return}if((Yl==null?void 0:Yl.length)===1){const ml=(fa=(Ue=(Ja=H==null?void 0:H.data)==null?void 0:Ja.data)==null?void 0:Ue.path)==null?void 0:fa.path;let nr="";(sl=(Pa=(Le=(il=(oa=ml==null?void 0:ml.split("("))==null?void 0:oa[1])==null?void 0:il.split(")"))==null?void 0:Le[0])==null?void 0:Pa.split(":"))==null||sl.forEach(Hl=>{var vr,er;nr=nr===""?nr+((vr=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:vr.trim()):nr+"/"+((er=Hl==null?void 0:Hl.replaceAll("'",""))==null?void 0:er.trim())});let Ll=[(dr=(rr=(Zl=(ur=(fr=ml==null?void 0:ml.split("<"))==null?void 0:fr[1])==null?void 0:ur.split(">"))==null?void 0:Zl[0])==null?void 0:rr.replaceAll("'",""))==null?void 0:dr.trim()],Sr;return(Ql=(Oe=(yr=H==null?void 0:H.data)==null?void 0:yr.data)==null?void 0:Oe.data)!=null&&Ql[Yl==null?void 0:Yl[0]]?Sr=await ne((Al=(Nr=(_r=H==null?void 0:H.data)==null?void 0:_r.data)==null?void 0:Nr.data)==null?void 0:Al[Yl==null?void 0:Yl[0]],nr,Yl,sa):Sr=await ze((Pr=(Tr=H==null?void 0:H.data)==null?void 0:Tr.data)==null?void 0:Pr.data,nr,Ll,Ne),Sr}else{const ml=(Ir=(gr=(Wl=H==null?void 0:H.data)==null?void 0:Wl.data)==null?void 0:gr.path)==null?void 0:Ir.path;let nr="";return(Vr=(Fr=(ar=(Vl=(Rr=ml==null?void 0:ml.split("("))==null?void 0:Rr[1])==null?void 0:Vl.split(")"))==null?void 0:ar[0])==null?void 0:Fr.split(":"))==null||Vr.forEach(Sr=>{var Hl,vr;nr=nr===""?nr+((Hl=Sr==null?void 0:Sr.replaceAll("'",""))==null?void 0:Hl.trim()):nr+"/"+((vr=Sr==null?void 0:Sr.replaceAll("'",""))==null?void 0:vr.trim())}),await be((Yr=(jr=(Or=H==null?void 0:H.data)==null?void 0:Or.data)==null?void 0:jr.data)==null?void 0:Yr[Yl==null?void 0:Yl[0]],nr,Yl)}}}}});if(await Promise.all(va),(de==null?void 0:de.length)>0){let na=[];de==null||de.forEach(Me=>{na!=null&&na.find(ma=>{var Oa,za,pa,Ca;return((za=(Oa=ma==null?void 0:ma.value)==null?void 0:Oa.pageData)==null?void 0:za.name)===((Ca=(pa=Me==null?void 0:Me.value)==null?void 0:pa.pageData)==null?void 0:Ca.name)})||na.push(Me)});let Pe=[];na==null||na.forEach(Me=>{var za,pa,Ca,Ae;let ma=A.cloneDeep(Me);ma.value.pageData.compData=(za=ma.value.pageData.compData)==null?void 0:za.map(he=>{var Y;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(Y=he.contents)==null?void 0:Y.map(xe=>{var qe,da,Ke,aa;let me=(qe=A.cloneDeep(de))==null?void 0:qe.find(Ve=>(Ve==null?void 0:Ve.keyType)===(xe==null?void 0:xe.key));if(me){let Ve=(aa=(Ke=(da=me.value.pageData.compData)==null?void 0:da.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:aa.find(ye=>(ye==null?void 0:ye.key)===(xe==null?void 0:xe.key));xe.value=Ve==null?void 0:Ve.value}return xe})),he}),Pe.push({id:ma==null?void 0:ma.id,value:ma==null?void 0:ma.value});let Oa=[];(Ae=(Ca=(pa=ma==null?void 0:ma.value)==null?void 0:pa.pageData)==null?void 0:Ca.compData)==null||Ae.forEach(he=>{var Y;(he==null?void 0:he.key)==="formContent"&&((Y=he==null?void 0:he.contents)==null||Y.forEach(xe=>{var me,qe,da,Ke,aa,Ve;if((qe=(me=xe==null?void 0:xe.optionUrl)==null?void 0:me.menuSelect)!=null&&qe.find(ye=>ye==null?void 0:ye.includes("[")))if(Oa!=null&&Oa.find(ye=>{var pe,Sa,ya;return((pe=ye==null?void 0:ye.key)==null?void 0:pe.join(","))===((ya=(Sa=xe==null?void 0:xe.optionUrl)==null?void 0:Sa.menuSelect)==null?void 0:ya.join(","))})){let ye=(da=Oa==null?void 0:Oa.find(pe=>{var Sa,ya,vl;return((Sa=pe==null?void 0:pe.key)==null?void 0:Sa.join(","))===((vl=(ya=xe==null?void 0:xe.optionUrl)==null?void 0:ya.menuSelect)==null?void 0:vl.join(","))}))==null?void 0:da.value;ye.push({key:xe==null?void 0:xe.prop,groups:(Ke=xe==null?void 0:xe.optionUrl)==null?void 0:Ke.groupSelect,value:xe==null?void 0:xe.value}),Oa=Oa==null?void 0:Oa.map(pe=>{var Sa,ya,vl;return((Sa=pe==null?void 0:pe.key)==null?void 0:Sa.join(","))===((vl=(ya=xe==null?void 0:xe.optionUrl)==null?void 0:ya.menuSelect)==null?void 0:vl.join(","))&&(pe.value=ye),pe})}else Oa.push({key:(aa=xe==null?void 0:xe.optionUrl)==null?void 0:aa.menuSelect,value:[{key:xe==null?void 0:xe.prop,groups:(Ve=xe==null?void 0:xe.optionUrl)==null?void 0:Ve.groupSelect,value:xe==null?void 0:xe.value}]})}))}),(Oa==null?void 0:Oa.length)>0&&(Oa=Oa==null?void 0:Oa.map(he=>{var xe;let Y="";return(xe=he==null?void 0:he.key)==null||xe.forEach(me=>{var qe;if(!(me!=null&&me.includes("[")))Y=Y===""?Y+me:Y+"/"+me;else{let da="",Ke=(qe=me==null?void 0:me.replaceAll("[","").replaceAll("]",""))==null?void 0:qe.split(":");We==null||We.forEach(aa=>{var Ve;(aa==null?void 0:aa.name)===(Ke==null?void 0:Ke[0])&&((Ve=aa==null?void 0:aa.compData)==null||Ve.forEach(ye=>{var pe;(ye==null?void 0:ye.key)==="formContent"&&((pe=ye==null?void 0:ye.contents)==null||pe.forEach(Sa=>{(Sa==null?void 0:Sa.prop)===(Ke==null?void 0:Ke[1])&&(da=Sa==null?void 0:Sa.value)}))}))}),Y=Y+r.value+da}}),he.key=Y,he})),Oa==null||Oa.forEach(he=>{var qe,da,Ke;let Y=(qe=Ne[he.key])==null?void 0:qe.find(aa=>{var Ve,ye,pe,Sa,ya,vl,Nl;return((ye=(Ve=aa==null?void 0:aa.value)==null?void 0:Ve.pageData)==null?void 0:ye.name)===((ya=(Sa=(pe=he==null?void 0:he.value)==null?void 0:pe[0])==null?void 0:Sa.groups)==null?void 0:ya[0])&&((Nl=(vl=aa==null?void 0:aa.value)==null?void 0:vl.pageData)==null?void 0:Nl.name)!==void 0}),xe=Y==null?void 0:Y.id,me=(da=Y==null?void 0:Y.value)==null?void 0:da.pageData;me.compData=(Ke=me.compData)==null?void 0:Ke.map(aa=>{var Ve;return(aa==null?void 0:aa.key)==="formContent"&&(aa.contents=(Ve=aa.contents)==null?void 0:Ve.map(ye=>{var Sa;let pe=(Sa=he.value)==null?void 0:Sa.find(ya=>(ya==null?void 0:ya.key)===(ye==null?void 0:ye.prop));return pe&&(ye.value=pe.value),ye})),aa}),Pe.push({id:xe,value:{pageData:me}})})});let wa=(te=A.cloneDeep(de))==null?void 0:te[0];(Pe==null?void 0:Pe.length)>0&&await Mr.batchUpdateInsofDataApi({dataList:Pe})}m.setFreshContent(!0)}u.setImportLoading(!1)}catch{Ua.ElMessage.error("方法执行错误,请查看方法!"),u.setImportLoading(!1)}S.value=!0},se=["createInsofDataApi"],Be=Tl.debounce(async fe=>{J(fe)},100),$e=async fe=>{var je,la,Ta;const N=A.cloneDeep(fe);let oe,U=new WeakMap;fe!=null&&fe[0].path&&(oe=await(N==null?void 0:N.map(async(ee,ca)=>{var Ya,R,H,X,ve,de,va,na,Pe,wa,Me,ma,Oa,za,pa,Ca;const ta=(Ya=U[ee==null?void 0:ee.path])==null?void 0:Ya.filter(Ae=>{var he;return((he=Ae==null?void 0:Ae.key)==null?void 0:he.type)==="data"});let Se="";const te=await ce.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);ta==null||ta.forEach(Ae=>{var he,Y,xe,me,qe;((Y=(he=Ae==null?void 0:Ae.value)==null?void 0:he.tableData)==null?void 0:Y.算法名称)===((xe=N==null?void 0:N[ca])==null?void 0:xe.method)&&(Se=(qe=(me=Ae==null?void 0:Ae.value)==null?void 0:me.tableData)==null?void 0:qe.算法体)});const Ne=await ce.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,U);let We="",sa=(ve=(X=(H=(R=Ne==null?void 0:Ne[0])==null?void 0:R.compData)==null?void 0:H.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:X.contents)==null?void 0:ve.findIndex(Ae=>(Ae==null?void 0:Ae.prop)==="算法体");return(va=(de=Ne==null?void 0:Ne[0])==null?void 0:de.compData)==null||va.forEach(Ae=>{var he;(Ae==null?void 0:Ae.key)==="tableContents"&&((he=Ae==null?void 0:Ae.contents)==null||he.forEach(Y=>{Y!=null&&Y.find(xe=>xe===(ee==null?void 0:ee.method))&&(We=Y[sa])}))}),{buttonName:((na=N==null?void 0:N[ca])==null?void 0:na.method)||((Me=(wa=(Pe=ta==null?void 0:ta[0])==null?void 0:Pe.value)==null?void 0:wa.tableData)==null?void 0:Me.算法名称),api:(Se===""?(za=(Oa=(ma=ta==null?void 0:ta[0])==null?void 0:ma.value)==null?void 0:Oa.tableData)==null?void 0:za.算法体:Se)||We,content:te==null?void 0:te.filter(Ae=>Ae.comp!=="methodButton"),extraContent:(pa=A.cloneDeep(ee.value))==null?void 0:pa.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(Ca=N==null?void 0:N[ca])==null?void 0:Ca.data}})));const De=N==null?void 0:N.map(async ee=>{var Ne,We,sa,Ya,R,H;const ca=(Ne=resAll.data.result)==null?void 0:Ne.filter(X=>{var ve,de,va;return((ve=X==null?void 0:X.key)==null?void 0:ve.parentTable)===""&&((de=X==null?void 0:X.key)==null?void 0:de.type)==="method"&&((va=X==null?void 0:X.key)==null?void 0:va.methodName)===X.method}),ue=ca==null?void 0:ca[0],ta=(We=resAll.data.result)==null?void 0:We.filter(X=>{var ve,de;return((ve=X==null?void 0:X.key)==null?void 0:ve.type)==="methodData"&&((de=X==null?void 0:X.key)==null?void 0:de.tableId)===(ue==null?void 0:ue.id)}),Se=await ce.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,U),te=ta==null?void 0:ta[0];return{buttonName:(sa=ue==null?void 0:ue.key)==null?void 0:sa.methodKey,api:(R=(Ya=te==null?void 0:te.value)==null?void 0:Ya.tableData)==null?void 0:R[0],content:Se==null?void 0:Se.filter(X=>X.comp!=="methodButton"),extraContent:(H=A.cloneDeep(ee.value))==null?void 0:H.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),Ie=(je=fe==null?void 0:fe[0])!=null&&je.path&&((la=fe==null?void 0:fe[0])==null?void 0:la.path)!==""?await Promise.all(oe):await Promise.all(De);l.value=Ie==null?void 0:Ie.filter(ee=>ee==null?void 0:ee.extraContent),(Ta=l.value)==null||Ta.forEach(ee=>{var ca;ee.api===""&&((ca=ee.content)==null||ca.forEach(ue=>{var ta;ue.comp=="Table"&&m.setExtraContents(ce.methodTableToContent(ue.compData,(ta=ee.extraContent)==null?void 0:ta[0]))}))})};return e.watch(()=>o.itemData,async()=>{k.value=="view"&&!S.value&&await $e(A.cloneDeep(o.itemData)),S.value=!1},{immediate:!0,deep:!0}),(fe,N)=>{var oe,U,De;return e.unref(k)!=="edit"?(e.openBlock(),e.createElementBlock("div",r4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=l.value)==null?void 0:oe.filter(Ie=>(Ie==null?void 0:Ie.buttonName)!=="保存"),Ie=>{var je;return e.openBlock(),e.createElementBlock("div",null,[Ie.api!==""?(e.openBlock(),e.createBlock(e.unref(rs._sfc_main),{key:0,disabled:e.unref(j)===e.unref(E)&&!((je=Ie==null?void 0:Ie.buttonName)!=null&&je.includes("预览")),class:"calculator-content",modelValue:Ie.buttonName,onClickTrigger:la=>e.unref(Be)(Ie),loading:b.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(W)!==""&&((De=e.unref(E))==null?void 0:De[((U=e.unref(E))==null?void 0:U.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(rs._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(nl.ssFilePreview,{key:0,fileDataList:h.value,onDestroy:V},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},i4=Xl._export_sfc(n4,[["__scopeId","data-v-063aa9af"]]),o4={};function t4(a,l){return" 567 "}const s4=Xl._export_sfc(o4,[["render",t4]]),c4={class:"module content"},u4={class:"module data"},d4={class:"module layout"},p4={class:"form-content"},f4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),h=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),d=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),m=e.ref({}),b=e.ref([]),u=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:b.value},{key:"signConfig",contents:m.value}]}),C=I=>{var j;m.value=A.cloneDeep(I),r("change",(j=u())==null?void 0:j.compData)},M=I=>{var j,L;if((I==null?void 0:I.buttonName)==="确认"){const E=A.cloneDeep(I==null?void 0:I.content);switch(s.value){case"create":b.value.push({...E,index:((j=b.value)==null?void 0:j.length)+1});break}r("change",(L=u())==null?void 0:L.compData),o.visible=!1}else o.visible=!1},k=(I,j)=>{var L,E;switch(I){case"create":(L=d.value)==null||L.forEach(x=>{x.value=""}),s.value="create",o.visible=!0;break;case"update":(E=d.value)==null||E.forEach(x=>{x.value=j[x==null?void 0:x.prop]}),s.value="update",o.visible=!0;break;case"delete":b.value.splice(j,1),s.value="delete";break}},W=()=>{o.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,I=>{var j,L;I&&(m.value=((j=I==null?void 0:I.find(E=>E.key==="signConfig"))==null?void 0:j.contents)??{},b.value=((L=I==null?void 0:I.find(E=>E.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(I,j)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",c4,[j[2]||(j[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:j[0]||(j[0]=x=>k("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",u4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(x,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:g=>k("update",{...x,index:w+1})},{default:e.withCtx(()=>j[3]||(j[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:g=>k("delete",w)},{default:e.withCtx(()=>j[4]||(j[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",d4,[e.createVNode(nl.ssForm,{rowContents:c.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:W,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",p4,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:h.value,onOnButtonClick:M},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),h4=Xl._export_sfc(f4,[["__scopeId","data-v-487e0536"]]),v4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(0),s=e.computed(()=>{var u,C;return(u=n==null?void 0:n.stepConfig)!=null&&u.allowTrigger?o.value:(C=n==null?void 0:n.stepConfig)==null?void 0:C.active}),h=(u,C)=>{o.value=C-1,r("clickStep",u,C)};e.onMounted(()=>{var u;r("clickStep",(u=n==null?void 0:n.stepList)==null?void 0:u[0],0)});const c=u=>nl.getComponent(u),d=()=>{var C;const u=(C=n==null?void 0:n.stepList)==null?void 0:C.find((M,k)=>k+1===s.value);return console.log("findStep",u),u?u==null?void 0:u.children:[]},m=u=>{r("clickTrigger",u)},b=u=>{r("changeTrigger",u)};return(u,C)=>{var W,I,j,L,E;const M=e.resolveComponent("el-step"),k=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(k,{direction:(W=a.stepConfig)==null?void 0:W.direction,active:s.value,"finish-status":"success",simple:(I=a.stepConfig)==null?void 0:I.simple,"align-center":((j=a.stepConfig)==null?void 0:j.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(x,w)=>(e.openBlock(),e.createBlock(M,{key:w,class:"step-item",onClick:g=>h(x,w+1)},{title:e.withCtx(()=>[e.renderSlot(u.$slots,"title",{title:x==null?void 0:x.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(u.$slots,"description",{descriptions:x==null?void 0:x.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(d(),(x,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(x==null?void 0:x.type)),{modelValue:x.value,"onUpdate:modelValue":g=>x.value=g,onClickTrigger:m,onChangeTrigger:b,content:x==null?void 0:x.content},e.createSlots({_:2},[e.renderList(u.$slots,(g,S)=>({name:S,fn:e.withCtx($=>[e.renderSlot(u.$slots,S,e.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),m4=Xl._export_sfc(v4,[["__scopeId","data-v-fdbd6832"]]),y4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,o=e.ref({}),s=e.ref([]),h=(c,d)=>{r("clickStep",c,d)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var u,C,M,k;o.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let d=((u=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="stepName"))==null?void 0:u.contents)??[],m=[];(M=(C=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:C.contents)==null||M.forEach(W=>{m.push({label:W==null?void 0:W.label,prop:W==null?void 0:W.prop,name:W==null?void 0:W.prop,type:"text",disabled:!0})});let b=((k=c==null?void 0:c.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:k.contents)??[];d=d==null?void 0:d.map((W,I)=>{let j=m==null?void 0:m.map(L=>{var E;return{...L,value:(E=b==null?void 0:b[I])==null?void 0:E[L==null?void 0:L.prop]}});return{title:W,description:j}}),s.value=d},{immediate:!0,deep:!0}),(c,d)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(m4,{stepConfig:o.value,stepList:s.value,onClickStep:h},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:b})=>[e.createTextVNode(e.toDisplayString(b),1)]),description:e.withCtx(({descriptions:b})=>[e.createVNode(nl.ssForm,{ref:"formRef",rowContents:b,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),g4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),o=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,h)=>(e.openBlock(),e.createBlock(r,{key:h,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),b4=Xl._export_sfc(g4,[["__scopeId","data-v-4172a886"]]),k4={class:"line-content"},x4={class:"line-time"},w4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,o=>{var s,h;r.value=(s=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:s.contents,n.value=(h=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:h.contents},{immediate:!0}),(o,s)=>(e.openBlock(),e.createBlock(b4,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:h,timestamp:c})=>[e.createElementVNode("span",k4,e.toDisplayString(h),1),e.createElementVNode("span",x4,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),_4=Xl._export_sfc(w4,[["__scopeId","data-v-b4d9deed"]]),S4={class:"tabs-content"},E4=e.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(a,{emit:l}){const n=a,r=l,o=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const s=C=>{r("change",C)},h=(C,M)=>{r("contentChange",C,M)},c=C=>{r("pageChange",C)},d=C=>{r("rowClick",C)},m=(C,M)=>{r("routeUrl",C,M)},b=C=>{r("clickTrigger",C)},u=(C,M)=>{r("clickMainKey",C,M)};return(C,M)=>{var k,W;return e.openBlock(),e.createElementBlock("div",S4,[(k=o.value)!=null&&k.length?(e.openBlock(),e.createBlock(nl.ssTab,{tabsContents:o.value,key:(W=o.value)==null?void 0:W.length},{pane:e.withCtx(({tab:I,index:j})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)(I==null?void 0:I.comp)),{related:I==null?void 0:I.relatedTables,compNames:n==null?void 0:n.compNames,compName:I==null?void 0:I.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,onChange:s,index:(I==null?void 0:I.id)??j,config:{showIndex:I==null?void 0:I.showIndex,allowMove:I==null?void 0:I.allowMove,viewport:I==null?void 0:I.viewport,status:I==null?void 0:I.status},onContentChange:h,onPageChange:c,onRowClick:d,onRouteUrl:m,parentTableId:I==null?void 0:I.tableId,allMapContents:a.allMapContents,children:I==null?void 0:I.children,level:1,onClickTrigger:b,onClickMainKey:u},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),C4=Xl._export_sfc(E4,[["__scopeId","data-v-1ea318b4"]]),D4={class:"type-select"},B4=["onClick"],T4={class:"list-icon"},N4={__name:"modelSelect",setup(a){const l=Hn(A.pinia),{itemData:n}=A.storeToRefs(l),r=o=>{const s=A.cloneDeep(n.value);s.push({comp:o.comp,name:o.name,compData:[]}),l.setItemData(s)};return(o,s)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",D4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(nu),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:d},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",T4,[e.createVNode(h,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,B4)]))),128))])}}},A4=Xl._export_sfc(N4,[["__scopeId","data-v-91799bf8"]]),z4={class:"fill-content"},M4={class:"operate-content"},I4={class:"collapse-title-content"},O4={class:"collapse-title-item"},L4={key:1},R4=["onClick"],$4={class:"icon-content"},V4={key:0,class:"edit-content"},P4=["onClick"],F4={class:"comp-child"},j4={__name:"modelFill",setup(a){const l=Hn(A.pinia),{itemData:n,originalData:r}=A.storeToRefs(l),o=e.ref([]);e.ref([]);const s=e.ref([]),h=e.ref([]),c=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!0),I));h.value=k},d=M=>{var W;let k=(W=A.cloneDeep(h.value))==null?void 0:W.map((I,j)=>(M===j&&(I.content=!1),I));h.value=k,o.value=A.cloneDeep(n.value)},m=(M,k)=>{var L;let W=(L=A.cloneDeep(h.value))==null?void 0:L.map((E,x)=>(M===x&&(E.content=!1),E));h.value=W;const I=A.cloneDeep(n.value),j=I==null?void 0:I.filter((E,x)=>(x===M&&(E.name=k),E));l.setOriginalData(j),l.setItemData(j)};e.watch(()=>n.value,()=>{var M,k,W;!n.value||((M=n.value)==null?void 0:M.length)===0?o.value=[]:o.value=(k=A.cloneDeep(n.value))==null?void 0:k.filter(I=>(I==null?void 0:I.comp)!=="methodButton"),s.value=o.value,h.value=(W=A.cloneDeep(s.value))==null?void 0:W.map((I,j)=>({id:j,content:!1}))},{deep:!0,immediate:!0});const b=M=>Ti(M),u=(M,k,W)=>{var j,L;if(!M)return;let I=A.cloneDeep(n.value);I=(j=I==null?void 0:I.map((E,x)=>(x===W&&(E.compData=M),E)))==null?void 0:j.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),h.value=(L=A.cloneDeep(I))==null?void 0:L.map((E,x)=>({id:x,content:!1})),l.setOriginalData(I),l.setItemData(I)},C=M=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const k=A.cloneDeep(n.value),W=k==null?void 0:k.filter((I,j)=>j!==M);l.setOriginalData(W),l.setItemData(W),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(M,k)=>{const W=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",z4,[k[1]||(k[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",M4,[e.createVNode(Js.default,{class:"collapse-content",collapseContents:o.value},{title:e.withCtx(({item:I,index:j})=>{var L,E,x,w,g,S,$,V,ae,Z;return[e.createElementVNode("div",I4,[e.createElementVNode("div",O4,[(E=(L=h.value)==null?void 0:L.find(be=>be.id===j))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:I.name&&I.name!==""?"8px":"0px"})},e.toDisplayString(I.name),5)),(w=(x=h.value)==null?void 0:x.find(be=>be.id===j))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",L4,[e.createVNode(nl.ssInput,{modelValue:I.name,"onUpdate:modelValue":be=>I.name=be,onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(g=h.value)==null?void 0:g.find(be=>be.id===j))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(be=>c(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Edit",style:{width:"16px",height:"16px"}})],8,R4))]),e.createElementVNode("div",$4,[(V=($=h.value)==null?void 0:$.find(be=>be.id===j))!=null&&V.content?(e.openBlock(),e.createElementBlock("div",V4,[e.createVNode(W,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(be=>d(j),["stop"])},null,8,["onClick"]),e.createVNode(W,{name:"Save",onClick:e.withModifiers(be=>m(j,I.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Z=(ae=h.value)==null?void 0:ae.find(be=>be.id===j))!=null&&Z.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(be=>C(j),["stop"]),class:"icon-content"},[e.createVNode(W,{name:"Delete",style:{width:"16px",height:"16px"}})],8,P4))])])]}),content:e.withCtx(({item:I,index:j})=>{var L,E;return[e.createElementVNode("div",F4,[e.createTextVNode(e.toDisplayString(b(I.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:(E=(L=s.value)==null?void 0:L.find((x,w)=>w===j))==null?void 0:E.compData,onChange:x=>u(x,I,j)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},H4=Xl._export_sfc(j4,[["__scopeId","data-v-a46a44b9"]]),U4={key:0,class:"show-content"},q4={style:{display:"flex"}},W4={__name:"modelShow",setup(a){const l=Hn(A.pinia),{itemData:n}=A.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var s;!n.value||((s=n.value)==null?void 0:s.length)===0?r.value=[]:r.value=A.cloneDeep(n.value)},{deep:!0,immediate:!0});const o=s=>Ti(s);return(s,h)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",U4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(d,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",q4,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},K4=Xl._export_sfc(W4,[["__scopeId","data-v-3f3e863e"]]),G4={class:"tabs-header"},Y4={class:"tabs-list"},J4={class:"tab-name"},X4={class:"tab-actions"},Z4=["onClick"],Q4=["onClick"],e6=["onClick"],a6={class:"model-operate"},l6={class:"model-select",style:{display:"unset"}},r6={class:"existing-components"},n6={class:"component-list"},i6=["onClick"],o6={class:"component-info"},t6={class:"component-type"},s6={class:"component-name"},c6={class:"model-fill"},u6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.ref([]),s=e.ref(!1),h=e.ref(""),c=e.ref({title:""}),d=e.ref(-1),m=e.ref(!1),b=e.ref(-1),u=e.ref(new WeakMap),C=e.ref(null),M=Hn(A.pinia),{itemData:k}=A.storeToRefs(M),W=()=>{h.value="新增标签页",c.value.title="",d.value=-1,s.value=!0},I=fe=>{h.value="修改标签页",c.value.title=o.value[fe].title,d.value=fe,s.value=!0},j=fe=>{const N=x(fe);u.value.delete(N),o.value.splice(fe,1),$e()},L=()=>{if(c.value.title.trim()){if(d.value===-1){const fe={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};o.value.push(fe)}else o.value[d.value].title=c.value.title,o.value[d.value].value=c.value.title,o.value[d.value].label=c.value.title;s.value=!1,$e()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,x=fe=>{const N=o.value[fe];return N.id||(N.id=E()),N.id},w=fe=>{var U;b.value=fe;const N=x(fe);C.value=A.cloneDeep(k.value);let oe=u.value.get(N);!oe&&((U=o.value[fe].children)==null?void 0:U.length)>0&&(oe=V(o.value[fe].children)),oe?M.setItemData(A.cloneDeep(oe)):M.setItemData([]),m.value=!0},g=e.computed(()=>{const fe=A.useModelComp(A.pinia),N=A.storeToRefs(fe).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(oe=>{var U;if(oe.comp==="Tabs"&&b.value>=0){const De=x(b.value);if((U=oe.compData)==null?void 0:U.some(je=>{var la;return je.key==="stepList"&&((la=je.contents)==null?void 0:la.some(Ta=>Ta.id===De))}))return!1}return!0})}),S=fe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[fe]||fe,$=fe=>{var N;try{const oe=A.cloneDeep(fe);oe.id=Date.now()+Math.random(),oe.comp==="Tabs"&&((N=oe.compData)==null||N.forEach(De=>{De.key==="stepList"&&De.contents&&De.contents.forEach(Ie=>{Ie.id=E()})}));const U=A.cloneDeep(k.value);U.push(oe),M.setItemData(U)}catch(oe){console.error("添加组件失败:",oe)}},V=fe=>fe.map(N=>{var oe;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:ae(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:Z(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((oe=N.content)==null?void 0:oe.originalData)||[]}}}),ae=fe=>{if(!fe)return[];const N=[];return fe.rowContents&&N.push({key:"formContent",contents:fe.rowContents}),fe.buttonValue&&N.push({key:"formButton",contents:fe.buttonValue}),typeof fe.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:fe.isEnableWrap}),N},Z=fe=>[],be=()=>{if(b.value>=0&&b.value<o.value.length){const fe=x(b.value);u.value.set(fe,A.cloneDeep(k.value)),o.value[b.value].children=ne(k.value),console.log("保存后的数据",ne(k.value))}m.value=!1,b.value=-1,C.value=null,$e()},ze=()=>{C.value&&M.setItemData(A.cloneDeep(C.value)),m.value=!1,b.value=-1,C.value=null},F=()=>{m.value&&ze()},ne=fe=>{if(!Array.isArray(fe))throw new Error("sourceData must be an array");return fe.map((N,oe)=>{if(!N||typeof N!="object")return N;const{comp:U,name:De,compData:Ie}=N;switch(U){case"Form":return{type:"form",content:J(Ie||[]),value:"表单"};case"Table":return{type:"table",content:se(Ie||[]),value:"表格"};default:return{type:"xxx",content:Be(Ie||[]),value:""}}})},J=fe=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},oe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return fe.forEach((U,De)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${De}:`,U);return}const{key:Ie,contents:je}=U,la=oe[Ie];if(!la){console.warn(`Unknown Form config key: ${Ie}`);return}Ie==="enableWrap"?N[la]=!!je:N[la]=Array.isArray(je)?je:[]}),N},se=fe=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},oe={header:"columns",tableContents:"tableData"};return fe.forEach((U,De)=>{if(!U||typeof U!="object"){console.warn(`Invalid config at index ${De}:`,U);return}const{key:Ie,contents:je}=U,la=oe[Ie];if(!la){console.warn(`Unknown Table config key: ${Ie}`);return}N[la]=Array.isArray(je)?je:[]}),N},Be=fe=>(console.log("Default conversion logic - to be implemented"),{originalData:fe,processed:!1,componentType:"unknown"}),$e=()=>{const fe=[{key:"stepList",contents:o.value}];r("change",fe)};return e.watch(()=>n.itemContents,fe=>{if(fe&&fe.length>0){const N=fe.find(oe=>oe.key==="stepList");N&&N.contents&&(o.value=N.contents.map(oe=>({title:oe.title||"",value:oe.value||oe.title||"",label:oe.label||oe.title||"",children:oe.children||[],id:oe.id||E()})))}},{immediate:!0,deep:!0}),(fe,N)=>{const oe=e.resolveComponent("svg-icon"),U=e.resolveComponent("el-input"),De=e.resolveComponent("el-form-item"),Ie=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",G4,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:W},[e.createVNode(oe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",Y4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(je,la)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:la},[e.createElementVNode("span",J4,e.toDisplayString(je.title),1),e.createElementVNode("div",X4,[e.createElementVNode("button",{onClick:Ta=>I(la)},"修改标题",8,Z4),e.createElementVNode("button",{onClick:Ta=>w(la)},"布局调整",8,Q4),e.createElementVNode("button",{onClick:Ta=>j(la)},"删除",8,e6)])]))),128))]),e.createVNode(Br.ssDialog,{modelValue:s.value,"onUpdate:modelValue":N[2]||(N[2]=je=>s.value=je),title:h.value,onBeforeDestroy:N[3]||(N[3]=je=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=je=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Ie,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(De,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(U,{modelValue:c.value.title,"onUpdate:modelValue":N[0]||(N[0]=je=>c.value.title=je),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Br.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=je=>m.value=je),title:"布局调整",fullScreen:"",onBeforeDestroy:F},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:ze},"取消"),e.createElementVNode("button",{onClick:be},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",a6,[e.createElementVNode("div",l6,[e.createVNode(A4),e.createElementVNode("div",r6,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",n6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,je=>(e.openBlock(),e.createElementBlock("div",{key:je.id,class:"component-item",onClick:la=>$(je)},[e.createElementVNode("div",o6,[e.createElementVNode("span",t6,e.toDisplayString(S(je.comp)),1),e.createElementVNode("span",s6,e.toDisplayString(je.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,i6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:fe.innerWidth},[e.createVNode(K4)])),e.createElementVNode("div",c6,[e.createVNode(H4)])])]),_:1},8,["modelValue"])])}}},d6=Xl._export_sfc(u6,[["__scopeId","data-v-9096ed0d"]]);function p6(){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 f6(a){return{type:"line",...a}}function h6(){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:[]},yAxis:[{type:"value"}],series:[]}}function v6(a){return{type:"bar",barWidth:"60%",...a}}function m6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function y6(a){return{type:"pie",radius:"80%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const g6=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),b6=a=>({type:"scatter",symbolSize:20,...a}),wn={Line:{initBaseoptions:p6,initSeries:f6},Bar:{initBaseoptions:h6,initSeries:v6},Pie:{initBaseoptions:m6,initSeries:y6},Scatter:{initBaseoptions:g6,initSeries:b6}},k6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},x6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(C=>C==null?void 0:C.prop);let b=[];if(m==null||m.forEach(C=>{var M;b.push((M=n==null?void 0:n[0])==null?void 0:M[C])}),!m||!b)return d;d.xAxis.data=m;const u=c({data:b});return d.series.push(u),d},w6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";const m=l==null?void 0:l.map(M=>M==null?void 0:M.prop);let b=[];if(m==null||m.forEach(M=>{var k;b.push((k=n==null?void 0:n[0])==null?void 0:k[M])}),!m||!b)return d;const u=[];for(let M=0;M<m.length;M++){const k=m[M],W=b[M];u.push({name:k,value:W})}const C=c({data:u});return d.series.push(C),d},_6=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:o}=a||{},s=wn==null?void 0:wn[r];if(!s)return;const{initBaseoptions:h,initSeries:c}=s,d=h();d.title.text=o??"";let m=[];const b=l==null?void 0:l.map(M=>M==null?void 0:M.prop);if(m=b==null?void 0:b.map(M=>{var W;let k=[];return k.push(M),k.push((W=n==null?void 0:n[0])==null?void 0:W[M]),k}),!m)return d;const C=c({data:m});return d.series.push(C),d},S6=async(a=[])=>{var h,c,d;const l=((h=a==null?void 0:a.find(m=>m.key==="ChartType"))==null?void 0:h.contents)??{},n=((c=a==null?void 0:a.find(m=>m.key==="header"))==null?void 0:c.contents)??[],r=((d=a==null?void 0:a.find(m=>m.key==="tableContents"))==null?void 0:d.contents)??[];let{type:o}=l,s={};return o==="Line"&&(s=await k6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Bar"&&(s=await x6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Pie"&&(s=await w6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Scatter"&&(s=await _6({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),s},E6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,n=e.ref({});e.onMounted(async()=>{const o=l==null?void 0:l.itemData;n.value=await S6(o)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Mu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),C6=Xl._export_sfc(E6,[["__scopeId","data-v-d4c081e8"]]),D6={class:"chart-module layout"},B6={class:"chart-module content"},T6={class:"chart-module content"},N6={class:"form-content"},A6={class:"dialog-footer"},z6={class:"form-content"},M6={class:"dialog-footer"},I6={class:"form-content"},O6={class:"dialog-footer"},L6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,o=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),h=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],c=e.ref({}),d=()=>{var Se;s.value=h(),(Se=s.value)==null||Se.forEach(te=>{var We;const Ne=te==null?void 0:te.prop;te.value=(We=c==null?void 0:c.value)==null?void 0:We[Ne]}),o.visible=!0},m=Se=>{c.value=Se},b=()=>{var Se;o.visible=!1,r("change",(Se=ue())==null?void 0:Se.compData)},u=e.reactive({visible:!1,width:"840",title:"数据配置"}),C=e.ref([]),M=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],k=e.ref({}),W=()=>{const Se=C.value,te=A.cloneDeep(Se);return te==null||te.forEach(Ne=>{var sa;const We=Ne==null?void 0:Ne.prop;Ne.value=(sa=k.value)==null?void 0:sa[We]}),te},I=Se=>{var Ne;k.value=Se;const te=W();C.value=te,r("change",(Ne=ue())==null?void 0:Ne.compData)},j=async()=>{const Se=await ce.getMenusContent(),te=W();te==null||te.forEach(Ne=>{(Ne==null?void 0:Ne.prop)==="menu"&&(Ne.contents=Se)}),C.value=te,u.visible=!0,await je(k.value.menu),await ee(k.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),E=e.ref([]),x=()=>[{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:[]}],w=e.ref({}),g=()=>{const Se=E.value,te=A.cloneDeep(Se);return te==null||te.forEach(Ne=>{var sa;const We=Ne==null?void 0:Ne.prop;Ne.value=(sa=w.value)==null?void 0:sa[We]}),te},S=Se=>{var Ne;w.value=Se;const te=g();E.value=te,r("change",(Ne=ue())==null?void 0:Ne.compData)},$=async()=>{await F();const Se=A.cloneDeep(V.value),te=g();te==null||te.forEach(Ne=>{var sa;const We=Ne==null?void 0:Ne.prop;Ne.value=(sa=w==null?void 0:w.value)==null?void 0:sa[We],We==="mainKey"&&(Ne.contents=Se)}),E.value=te,L.visible=!0},V=e.ref([]),ae=e.ref([]),Z=e.ref({}),be=e.ref({}),ze=()=>{const{compData:Se}=U.value||{},te=Se==null?void 0:Se.find(X=>{const{key:ve}=X;return ve==="header"}),Ne=(te==null?void 0:te.contents)||[],We=Ne==null?void 0:Ne.filter((X,ve)=>{const{label:de}=X;return de!=="操作"}),sa=We==null?void 0:We.findIndex((X,ve)=>{const{isMainKey:de}=X;return de});if(sa<0)return[];const Ya=Se==null?void 0:Se.find(X=>{const{key:ve}=X;return ve==="tableContents"}),R=(Ya==null?void 0:Ya.contents)||[];return R==null?void 0:R.map(X=>{const ve=X==null?void 0:X[0];let de=sa;Ua.isObject(ve)&&(ve!=null&&ve.id)&&(de=de+1);const va=X==null?void 0:X[de];return{label:va,value:va}})},F=async()=>{const Se=await ze();V.value=Se},ne=async Se=>{const te=sessionStorage.getItem("systemKey");return await ce.getItemData(Se,te,"")},J=async Se=>{const te=Se;ae.value=te==null?void 0:te.map(Ne=>{const{name:We}=Ne;return Z.value[We]=Ne,{label:We,value:We}})},se=Se=>{const{comp:te,compData:Ne}=be.value||{};if(te==="Table"){let We=g();We=We.filter(sa=>{const{prop:Ya}=sa;return Ya!=="formItems"}),la(We,Ne),E.value=We}},Be=async()=>{var Ne,We;const Se=(Ne=w==null?void 0:w.value)==null?void 0:Ne.mainKey,te=(We=k==null?void 0:k.value)==null?void 0:We.menu;if(Se){const Ya=`${te==null?void 0:te.join("/")}^${Se}`,R=await ne(Ya);await J(R);const H=g();H==null||H.forEach(X=>{(X==null?void 0:X.prop)==="group"&&(X.contents=ae.value)}),E.value=H}};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.mainKey},async(Se,te)=>{Se!=te&&Se&&await Be()});const $e=async Se=>{const te=Z.value[Se];be.value=te,await se()};e.watch(()=>{var Se;return(Se=w==null?void 0:w.value)==null?void 0:Se.group},async(Se,te)=>{Se!=te&&Se&&$e(Se)});const fe=async()=>{var te;await Be();const Se=(te=w.value)==null?void 0:te.group;await $e(Se)},N=e.ref([]),oe=e.ref({}),U=e.ref({}),De=async Se=>{const te=Se==null?void 0:Se.join("/"),Ne=sessionStorage.getItem("systemKey");return await ce.getItemData(te,Ne,"")},Ie=async Se=>{const te=await De(Se);N.value=te==null?void 0:te.map(Ne=>{const{name:We}=Ne;return oe.value[We]=Ne,{label:We,value:We}})},je=async(Se,te)=>{await Ie(Se);const Ne=W();Ne==null||Ne.forEach(We=>{(We==null?void 0:We.prop)==="group"&&(We.contents=N.value)}),C.value=Ne};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.menu},async(Se,te)=>{const Ne=Se==null?void 0:Se.join("/"),We=te==null?void 0:te.join("/");Ne!=We&&await je(Se)});const la=(Se,te)=>{const Ne=te==null?void 0:te.find(R=>{const{key:H}=R;return H==="header"}),We=(Ne==null?void 0:Ne.contents)||[],sa=We==null?void 0:We.filter((R,H)=>{const{label:X}=R;return X!=="操作"}),Ya=sa==null?void 0:sa.map((R,H)=>{const{label:X}=R;return{label:X,value:H}});Se==null||Se.forEach(R=>{const H=R==null?void 0:R.prop;(H==="nameCol"||H==="valueCol")&&(R.contents=Ya)})},Ta=Se=>{const{comp:te,compData:Ne}=U.value||{};if(te==="Table"){k.value.formItems=[];let We=W();We=We.filter(sa=>{const{prop:Ya}=sa;return Ya!=="formItems"}),la(We,Ne),C.value=We}},ee=async Se=>{const te=oe.value[Se];U.value=te,await Ta()};e.watch(()=>{var Se;return(Se=k==null?void 0:k.value)==null?void 0:Se.group},async(Se,te)=>{Se!=te&&ee(Se)});const ca=async()=>{var Ne,We;const Se=(Ne=k.value)==null?void 0:Ne.menu;await je(Se);const te=(We=k.value)==null?void 0:We.group;await ee(te)},ue=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:k.value},{key:"chartDetailConfig",contents:w.value}]}),ta=()=>{o.visible=!1,u.visible=!1,L.visible=!1};return e.onMounted(async()=>{var te,Ne,We;C.value=M(),E.value=x();const Se=n==null?void 0:n.itemContents;c.value=((te=Se==null?void 0:Se.find(sa=>sa.key==="chartBaseConfig"))==null?void 0:te.contents)??{},k.value=((Ne=Se==null?void 0:Se.find(sa=>sa.key==="chartDataConfig"))==null?void 0:Ne.contents)??{},await ca(),w.value=((We=Se==null?void 0:Se.find(sa=>sa.key==="chartDetailConfig"))==null?void 0:We.contents)??{},await fe()}),(Se,te)=>{const Ne=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",D6,[te[4]||(te[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Ne,{id:"themeButton",onClick:te[0]||(te[0]=We=>d())},{default:e.withCtx(()=>te[3]||(te[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",B6,[te[6]||(te[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Ne,{id:"themeButton",onClick:te[1]||(te[1]=We=>j())},{default:e.withCtx(()=>te[5]||(te[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",T6,[te[8]||(te[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Ne,{id:"themeButton",onClick:te[2]||(te[2]=We=>$())},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Br.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:ta,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",N6,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",A6,[e.createVNode(Ne,{class:"cancel-button button",onClick:ta,id:"themeBorderButton"},{default:e.withCtx(()=>te[9]||(te[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Ne,{class:"ok-button button",onClick:b,id:"themeButton"},{default:e.withCtx(()=>te[10]||(te[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:ta,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(Ne,{class:"cancel-button button",onClick:ta,id:"themeBorderButton"},{default:e.withCtx(()=>te[11]||(te[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Ne,{class:"ok-button button",onClick:ta,id:"themeButton"},{default:e.withCtx(()=>te[12]||(te[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Br.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:ta,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(Ne,{class:"cancel-button button",onClick:ta,id:"themeBorderButton"},{default:e.withCtx(()=>te[13]||(te[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Ne,{class:"ok-button button",onClick:ta,id:"themeButton"},{default:e.withCtx(()=>te[14]||(te[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),R6=Xl._export_sfc(L6,[["__scopeId","data-v-fe119645"]]),$6={class:"layout"},V6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const o=e.computed(()=>A.cloneDeep(r==null?void 0:r.itemData)||[]),s=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="baseConfig"});return m==null?void 0:m.contents}),h=e.computed(()=>{var b;const m=(b=o==null?void 0:o.value)==null?void 0:b.find(u=>{const{key:C}=u;return C==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=A.cloneDeep(h.value)||[];const b=m.length;let u=0;const C=[];if(m=m.map(M=>{const k=M.span;return k?(M.span=Number(k),u=u+M.span):C.push(M),M}),u<24){const M=Math.floor((24-u)/b);C.forEach(k=>{k.span=M})}return m}),d=m=>{n("rowClick",m)};return(m,b)=>{var M;const u=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",$6,[e.createVNode(C,{style:e.normalizeStyle({height:(M=s.value)==null?void 0:M.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(k,W)=>(e.openBlock(),e.createBlock(u,{span:k==null?void 0:k.span},{default:e.withCtx(()=>{var I;return[e.unref(Bi)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)(k.comp)),{key:e.unref(jn),compName:k.name,index:(k==null?void 0:k.id)??W,height:(I=s.value)==null?void 0:I.height,itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,onChange:e.unref(To),onContentChange:e.unref(No),onPageChange:e.unref(Ao),onRowClick:d},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),P6=Xl._export_sfc(V6,[["__scopeId","data-v-ab9a36ed"]]),F6={class:"layout-operate"},j6={class:"layout-module"},H6={class:"collapse-title-item"},U6={class:"collapse-title"},q6={class:"icon-content"},W6=["onClick"],K6={class:"comp-child"},G6=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{W()});const o=e.ref({}),s=e.ref({}),h=e.ref([]),c=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],d=w=>{s.value=w,r("change",x(),!0)},m=e.ref([]),b=e.ref([]),u=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],C=e.computed(()=>{const w=n==null?void 0:n.itemContents;return A.cloneDeep(w)}),M=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="baseConfig"});return g==null?void 0:g.contents}),k=e.computed(()=>{const w=C==null?void 0:C.value,g=w==null?void 0:w.find(S=>{const{key:$}=S;return $==="children"});return g==null?void 0:g.contents}),W=()=>{var w;o.value=C.value||{},m.value=(k==null?void 0:k.value)||[],h.value=c(),h.value=(w=h.value)==null?void 0:w.map(g=>{var $;const{prop:S}=g;return g.value=($=M.value)==null?void 0:$[S],g})};e.watch(()=>{var w;return(w=k==null?void 0:k.value)==null?void 0:w.length},()=>{var w;m.value=(k==null?void 0:k.value)||[],b.value=(w=k.value)==null?void 0:w.map(g=>u(g))},{immediate:!0});const I=(w,g)=>{const S=A.cloneDeep(k==null?void 0:k.value);S[g].span=w.span,m.value=S,r("change",x(),!0)},j=w=>Ti(w),L=(w,g,S)=>{if(!w)return;const $=A.cloneDeep(k==null?void 0:k.value);$[S]&&($[S].compData=w,m.value=$,r("change",x(),!0))},E=w=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let g=A.cloneDeep(k==null?void 0:k.value);g=g==null?void 0:g.filter((S,$)=>w!==$),m.value=g,r("change",x(),!0),Ua.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,g)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",F6,[e.createElementVNode("div",j6,[g[1]||(g[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(nl.ssForm,{rowContents:h.value,isEnableWrap:!0,onChange:g[0]||(g[0]=$=>d($))},null,8,["rowContents"])])]),e.createVNode(Js.default,{class:"collapse-content",collapseContents:k.value},{title:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",H6,[e.createElementVNode("div",U6,e.toDisplayString($.name),1),e.createElementVNode("div",q6,[e.createElementVNode("div",{onClick:e.withModifiers(ae=>E(V),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,W6)])])]),content:e.withCtx(({item:$,index:V})=>[e.createElementVNode("div",K6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(nl.ssForm,{rowContents:b.value[V],key:V,isEnableWrap:!0,onChange:ae=>I(ae,V)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:ae=>L(ae,$,V)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Y6=Xl._export_sfc(G6,[["__scopeId","data-v-ba05456e"]]),J6=typeof window<"u";var _s;J6&&((_s=window==null?void 0:window.navigator)!=null&&_s.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function yn(a){return a==null}function $c(){}const X6=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(X6)));function Z6(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(o=>{o(...n)})}}}function Ss(a,l=16){if(typeof a!="function")return $c;const n=(...s)=>{a(...s)};if(l<=0)return Vc(n);let r=0,o;return function(...s){const h=Date.now(),c=h-r;clearTimeout(o),c>=l?(r=h,n(...s)):o=setTimeout(()=>{r=Date.now(),n(...s)},Math.max(0,l-c))}}function Q6(a,l=100){if(typeof a!="function")return $c;const n=(...o)=>{a(...o)};if(l<=0)return Vc(n);let r;return function(...o){clearTimeout(r),r=setTimeout(()=>{n(...o)},l)}}function Vc(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...o){return n=o,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Ui=new Set,Pc=new WeakMap;function e1(){Ui.forEach(a=>{a(...Pc.get(a))}),Ui.clear()}function rn(a,...l){if(typeof a!="function")return a;Pc.set(a,l),!Ui.has(a)&&(Ui.add(a),Ui.size===1&&Promise.resolve().then(e1))}const Fc=Symbol("LAYOUT_KEY"),jc=Symbol("EMITTER_KEY");function a1(a){let l=0,n;for(let r=0,o=a.length;r<o;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function _t(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=l1(a[n]);return l}function l1(a){return{...a}}function Hc(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function _i(a,l,n){const r=qc(a),o=Wc(a),s=Array(a.length);for(let h=0,c=o.length;h<c;h++){let d=o[h];d.static||(d=r1(r,d,l,n),r.push(d)),s[a.findIndex(m=>m.i===d.i)]=d,d.moved=!1}return s}function r1(a,l,n,r){if(n)for(;l.y>0&&!qi(a,l);)l.y--;else if(r){const s=r[l.i].y;for(;l.y>s&&!qi(a,l);)l.y--}let o;for(;o=qi(a,l);)l.y=o.y+o.h;return l}function n1(a,l){const n=qc(a);for(let r=0,o=a.length;r<o;r++){const s=a[r];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)n.push(s);else for(;qi(n,s);)s.y++}return a}function Es(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function qi(a,l){for(let n=0,r=a.length;n<r;n++)if(Hc(a[n],l))return a[n]}function Uc(a,l){return a.filter(n=>Hc(n,l))}function qc(a){return a.filter(l=>l.static)}function St(a,l,n,r,o=!1,s=!1){if(l.static)return a;const h=l.x,c=l.y,d=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=Wc(a);d&&(m=m.reverse());const b=Uc(m,l);if(s&&b.length)return l.x=h,l.y=c,l.moved=!1,a;for(let u=0,C=b.length;u<C;u++){const M=b[u];M.moved||l.y>M.y&&l.y-M.y>M.h/4||(M.static?a=Cs(a,M,l,o):a=Cs(a,l,M,o))}return a}function Cs(a,l,n,r){if(r){const o={x:n.x,y:n.y,w:n.w,h:n.h};if(o.y=Math.max(l.y-n.h,0),!qi(a,o))return St(a,n,void 0,o.y,!1)}return St(a,n,void 0,n.y+1,!1)}function i1(a,l,n,r){const o="translate3d("+l+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function o1(a,l,n,r){const o="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:n+"px",height:r+"px",position:"absolute"}}function s1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function c1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function Wc(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function u1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let o=0,s=a.length;o<s;o++){const h=a[o];for(let c=0;c<n.length;c++)if(typeof h[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+o+"]."+n[c]+" must be a number!");if(h.i===void 0||h.i===null)throw new Error("VueGridLayout: "+l+"["+o+"].i cannot be null!");if(typeof h.i!="number"&&typeof h.i!="string")throw new Error("VueGridLayout: "+l+"["+o+"].i must be a string or number!");if(r.indexOf(h.i)>=0)throw new Error("VueGridLayout: "+l+"["+o+"].i must be unique!");if(r.push(h.i),h.static!==void 0&&typeof h.static!="boolean")throw new Error("VueGridLayout: "+l+"["+o+"].static must be a boolean!")}}function d1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,o)=>`${n()}__${r}--${o}`}}function Ds(a){return p1(a)}function p1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),o=a.clientX+n.scrollLeft-r.left,s=a.clientY+n.scrollTop-r.top;return{x:o,y:s}}function Bs(a,l,n,r){return f1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function f1(a){return typeof a=="number"&&!Number.isNaN(a)}function h1(a,l){const n=Gc(a);let r=n[0];for(let o=1,s=n.length;o<s;o++){const h=n[o];l>a[h]&&(r=h)}return r}function Kc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function v1(a,l,n,r,o,s,h){if(l[r])return _t(l[r]);let c=a;const d=Gc(n),m=d.slice(d.indexOf(r));for(let b=0,u=m.length;b<u;b++){const C=m[b];if(l[C]){c=l[C];break}}return c=_t(c||[]),_i(n1(c,{cols:s}),h)}function Gc(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let m1="auto";function y1(){return typeof document<"u"}function Ts(){return y1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):m1}var ji={exports:{}},g1=ji.exports,Ns;function b1(){return Ns||(Ns=1,function(a,l){(function(n,r){a.exports=r()})(g1,function(){function n(t,i){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(t);i&&(y=y.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),f.push.apply(f,y)}return f}function r(t){for(var i=1;i<arguments.length;i++){var f=arguments[i]!=null?arguments[i]:{};i%2?n(Object(f),!0).forEach(function(y){d(t,y,f[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(y){Object.defineProperty(t,y,Object.getOwnPropertyDescriptor(f,y))})}return t}function o(t){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},o(t)}function s(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function h(t,i){for(var f=0;f<i.length;f++){var y=i[f];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(t,W(y.key),y)}}function c(t,i,f){return i&&h(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function d(t,i,f){return(i=W(i))in t?Object.defineProperty(t,i,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[i]=f,t}function m(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&u(t,i)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},b(t)}function u(t,i){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,y){return f.__proto__=y,f},u(t,i)}function C(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function M(t){var i=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 f,y=b(t);if(i){var _=b(this).constructor;f=Reflect.construct(y,arguments,_)}else f=y.apply(this,arguments);return function(O,K){if(K&&(typeof K=="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(O)}(this,f)}}function k(){return k=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,i,f){var y=function(O,K){for(;!Object.prototype.hasOwnProperty.call(O,K)&&(O=b(O))!==null;);return O}(t,i);if(y){var _=Object.getOwnPropertyDescriptor(y,i);return _.get?_.get.call(arguments.length<3?t:f):_.value}},k.apply(this,arguments)}function W(t){var i=function(f,y){if(typeof f!="object"||f===null)return f;var _=f[Symbol.toPrimitive];if(_!==void 0){var O=_.call(f,y);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof i=="symbol"?i:i+""}var I=function(t){return!(!t||!t.Window)&&t instanceof t.Window},j=void 0,L=void 0;function E(t){j=t;var i=t.document.createTextNode("");i.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(i)===i&&(t=t.wrap(t)),L=t}function x(t){return I(t)?t:(t.ownerDocument||t).defaultView||L.window}typeof window<"u"&&window&&E(window);var w=function(t){return!!t&&o(t)==="object"},g=function(t){return typeof t=="function"},S={window:function(t){return t===L||I(t)},docFrag:function(t){return w(t)&&t.nodeType===11},object:w,func:g,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||o(t)!=="object")return!1;var i=x(t)||L;return/object|function/.test(typeof Element>"u"?"undefined":o(Element))?t instanceof Element||t instanceof i.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return w(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return w(t)&&t.length!==void 0&&g(t.splice)}};function $(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.prepared.axis;f==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):f==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function V(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var y=f.prepared.axis;if(y==="x"||y==="y"){var _=y==="x"?"y":"x";i.page[_]=f.coords.start.page[_],i.client[_]=f.coords.start.client[_],i.delta[_]=0}}}var ae={id:"actions/drag",install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.draggable=ae.draggable,i.map.drag=ae,i.methodDict.drag="draggable",y.actions.drag=ae.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":V,"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.buttons,_=f.options.drag;if(_&&_.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(y&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(t){return S.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):S.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:$,move:V,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},Z=ae,be={init:function(t){var i=t;be.document=i.document,be.DocumentFragment=i.DocumentFragment||ze,be.SVGElement=i.SVGElement||ze,be.SVGSVGElement=i.SVGSVGElement||ze,be.SVGElementInstance=i.SVGElementInstance||ze,be.Element=i.Element||ze,be.HTMLElement=i.HTMLElement||be.Element,be.Event=i.Event,be.Touch=i.Touch||ze,be.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ze(){}var F=be,ne={init:function(t){var i=F.Element,f=t.navigator||{};ne.supportsTouch="ontouchstart"in t||S.func(t.DocumentTouch)&&F.document instanceof t.DocumentTouch,ne.supportsPointerEvent=f.pointerEnabled!==!1&&!!F.PointerEvent,ne.isIOS=/iP(hone|od|ad)/.test(f.platform),ne.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),ne.isIe9=/MSIE 9/.test(f.userAgent),ne.isOperaMobile=f.appName==="Opera"&&ne.supportsTouch&&/Presto/.test(f.userAgent),ne.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",ne.pEventTypes=ne.supportsPointerEvent?F.PointerEvent===t.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,ne.wheelEvent=F.document&&"onmousewheel"in F.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},J=ne;function se(t,i){if(t.contains)return t.contains(i);for(;i;){if(i===t)return!0;i=i.parentNode}return!1}function Be(t,i){for(;S.element(t);){if(fe(t,i))return t;t=$e(t)}return null}function $e(t){var i=t.parentNode;if(S.docFrag(i)){for(;(i=i.host)&&S.docFrag(i););return i}return i}function fe(t,i){return L!==j&&(i=i.replace(/\/deep\//g," ")),t[J.prefixedMatchesSelector](i)}var N=function(t){return t.parentNode||t.host};function oe(t,i){for(var f,y=[],_=t;(f=N(_))&&_!==i&&f!==_.ownerDocument;)y.unshift(_),_=f;return y}function U(t,i,f){for(;S.element(t);){if(fe(t,i))return!0;if((t=$e(t))===f)return fe(t,i)}return!1}function De(t){return t.correspondingUseElement||t}function Ie(t){var i=t instanceof F.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function je(t){var i,f=Ie(t);if(!J.isIOS7&&f){var y={x:(i=(i=x(t))||L).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};f.left+=y.x,f.right+=y.x,f.top+=y.y,f.bottom+=y.y}return f}function la(t){for(var i=[];t;)i.push(t),t=$e(t);return i}function Ta(t){return!!S.string(t)&&(F.document.querySelector(t),!0)}function ee(t,i){for(var f in i)t[f]=i[f];return t}function ca(t,i,f){return t==="parent"?$e(f):t==="self"?i.getRect(f):Be(f,t)}function ue(t,i,f,y){var _=t;return S.string(_)?_=ca(_,i,f):S.func(_)&&(_=_.apply(void 0,y)),S.element(_)&&(_=je(_)),_}function ta(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Se(t){return!t||"x"in t&&"y"in t||((t=ee({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function te(t,i,f){t.left&&(i.left+=f.x),t.right&&(i.right+=f.x),t.top&&(i.top+=f.y),t.bottom&&(i.bottom+=f.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Ne(t,i,f){var y=f&&t.options[f];return ta(ue(y&&y.origin||t.options.origin,t,i,[t&&i]))||{x:0,y:0}}function We(t,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ke){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},S.string(t)&&t.search(" ")!==-1&&(t=sa(t)),S.array(t))return t.forEach(function(ke){return We(ke,i,f,y)}),y;if(S.object(t)&&(i=t,t=""),S.func(i)&&f(t))y[t]=y[t]||[],y[t].push(i);else if(S.array(i))for(var _=0,O=i;_<O.length;_++){var K=O[_];We(t,K,f,y)}else if(S.object(i))for(var Q in i)We(sa(Q).map(function(ke){return"".concat(t).concat(ke)}),i[Q],f,y);return y}function sa(t){return t.trim().split(/ +/)}var Ya=function(t,i){return Math.sqrt(t*t+i*i)},R=["webkit","moz"];function H(t,i){t.__set||(t.__set={});var f=function(_){if(R.some(function(O){return _.indexOf(O)===0}))return 1;typeof t[_]!="function"&&_!=="__set"&&Object.defineProperty(t,_,{get:function(){return _ in t.__set?t.__set[_]:t.__set[_]=i[_]},set:function(O){t.__set[_]=O},configurable:!0})};for(var y in i)f(y);return t}function X(t,i){t.page=t.page||{},t.page.x=i.page.x,t.page.y=i.page.y,t.client=t.client||{},t.client.x=i.client.x,t.client.y=i.client.y,t.timeStamp=i.timeStamp}function ve(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function de(t){return t instanceof F.Event||t instanceof F.Touch}function va(t,i,f){return t=t||"page",(f=f||{}).x=i[t+"X"],f.y=i[t+"Y"],f}function na(t,i){return i=i||{x:0,y:0},J.isOperaMobile&&de(t)?(va("screen",t,i),i.x+=window.scrollX,i.y+=window.scrollY):va("page",t,i),i}function Pe(t){return S.number(t.pointerId)?t.pointerId:t.identifier}function wa(t,i,f){var y=i.length>1?ma(i):i[0];na(y,t.page),function(_,O){O=O||{},J.isOperaMobile&&de(_)?va("screen",_,O):va("client",_,O)}(y,t.client),t.timeStamp=f}function Me(t){var i=[];return S.array(t)?(i[0]=t[0],i[1]=t[1]):t.type==="touchend"?t.touches.length===1?(i[0]=t.touches[0],i[1]=t.changedTouches[0]):t.touches.length===0&&(i[0]=t.changedTouches[0],i[1]=t.changedTouches[1]):(i[0]=t.touches[0],i[1]=t.touches[1]),i}function ma(t){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var y=t[f];for(var _ in i)i[_]+=y[_]}for(var O in i)i[O]/=t.length;return i}function Oa(t){if(!t.length)return null;var i=Me(t),f=Math.min(i[0].pageX,i[1].pageX),y=Math.min(i[0].pageY,i[1].pageY),_=Math.max(i[0].pageX,i[1].pageX),O=Math.max(i[0].pageY,i[1].pageY);return{x:f,y,left:f,top:y,right:_,bottom:O,width:_-f,height:O-y}}function za(t,i){var f=i+"X",y=i+"Y",_=Me(t),O=_[0][f]-_[1][f],K=_[0][y]-_[1][y];return Ya(O,K)}function pa(t,i){var f=i+"X",y=i+"Y",_=Me(t),O=_[1][f]-_[0][f],K=_[1][y]-_[0][y];return 180*Math.atan2(K,O)/Math.PI}function Ca(t){return S.string(t.pointerType)?t.pointerType:S.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof F.Touch?"touch":"mouse"}function Ae(t){var i=S.func(t.composedPath)?t.composedPath():t.path;return[De(i?i[0]:t.target),De(t.currentTarget)]}var he=function(){function t(i){s(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return c(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(he.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var Y=function(t,i){for(var f=0;f<i.length;f++){var y=i[f];t.push(y)}return t},xe=function(t){return Y([],t)},me=function(t,i){for(var f=0;f<t.length;f++)if(i(t[f],f,t))return f;return-1},qe=function(t,i){return t[me(t,i)]},da=function(t){m(f,t);var i=M(f);function f(y,_,O){var K;s(this,f),(K=i.call(this,_._interaction)).dropzone=void 0,K.dragEvent=void 0,K.relatedTarget=void 0,K.draggable=void 0,K.propagationStopped=!1,K.immediatePropagationStopped=!1;var Q=O==="dragleave"?y.prev:y.cur,ke=Q.element,He=Q.dropzone;return K.type=O,K.target=ke,K.currentTarget=ke,K.dropzone=He,K.dragEvent=_,K.relatedTarget=_.target,K.draggable=_.interactable,K.timeStamp=_.timeStamp,K}return c(f,[{key:"reject",value:function(){var y=this,_=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&_.cur.dropzone===this.dropzone&&_.cur.element===this.target)if(_.prev.dropzone=this.dropzone,_.prev.element=this.target,_.rejected=!0,_.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var O=_.activeDrops,K=me(O,function(ke){var He=ke.dropzone,Ce=ke.element;return He===y.dropzone&&Ce===y.target});_.activeDrops.splice(K,1);var Q=new f(_,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new f(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(he);function Ke(t,i){for(var f=0,y=t.slice();f<y.length;f++){var _=y[f],O=_.dropzone,K=_.element;i.dropzone=O,i.target=K,O.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function aa(t,i){for(var f=function(O,K){for(var Q=[],ke=0,He=O.interactables.list;ke<He.length;ke++){var Ce=He[ke];if(Ce.options.drop.enabled){var ra=Ce.options.drop.accept;if(!(S.element(ra)&&ra!==K||S.string(ra)&&!fe(K,ra)||S.func(ra)&&!ra({dropzone:Ce,draggableElement:K})))for(var Ba=0,Xa=Ce.getAllElements();Ba<Xa.length;Ba++){var Wa=Xa[Ba];Wa!==K&&Q.push({dropzone:Ce,element:Wa,rect:Ce.getRect(Wa)})}}}return Q}(t,i),y=0;y<f.length;y++){var _=f[y];_.rect=_.dropzone.getRect(_.element)}return f}function Ve(t,i,f){for(var y=t.dropState,_=t.interactable,O=t.element,K=[],Q=0,ke=y.activeDrops;Q<ke.length;Q++){var He=ke[Q],Ce=He.dropzone,ra=He.element,Ba=He.rect,Xa=Ce.dropCheck(i,f,_,O,ra,Ba);K.push(Xa?ra:null)}var Wa=function(el){for(var _l,bl,Cl,Ul=[],Dl=0;Dl<el.length;Dl++){var Ol=el[Dl],Il=el[_l];if(Ol&&Dl!==_l)if(Il){var Xr=N(Ol),ir=N(Il);if(Xr!==Ol.ownerDocument)if(ir!==Ol.ownerDocument)if(Xr!==ir){Ul=Ul.length?Ul:oe(Il);var ln=void 0;if(Il instanceof F.HTMLElement&&Ol instanceof F.SVGElement&&!(Ol instanceof F.SVGSVGElement)){if(Ol===ir)continue;ln=Ol.ownerSVGElement}else ln=Ol;for(var hn=oe(ln,Il.ownerDocument),En=0;hn[En]&&hn[En]===Ul[En];)En++;var hi=[hn[En-1],hn[En],Ul[En]];if(hi[0])for(var Qn=hi[0].lastChild;Qn;){if(Qn===hi[1]){_l=Dl,Ul=hn;break}if(Qn===hi[2])break;Qn=Qn.previousSibling}}else Cl=Il,(parseInt(x(bl=Ol).getComputedStyle(bl).zIndex,10)||0)>=(parseInt(x(Cl).getComputedStyle(Cl).zIndex,10)||0)&&(_l=Dl);else _l=Dl}else _l=Dl}return _l}(K);return y.activeDrops[Wa]||null}function ye(t,i,f){var y=t.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(_.activate=new da(y,f,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),f.type==="dragend"&&(_.deactivate=new da(y,f,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(_.leave=new da(y,f,"dragleave"),f.dragLeave=_.leave.target=y.prev.element,f.prevDropzone=_.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(_.enter=new da(y,f,"dragenter"),f.dragEnter=y.cur.element,f.dropzone=y.cur.dropzone)),f.type==="dragend"&&y.cur.dropzone&&(_.drop=new da(y,f,"drop"),f.dropzone=y.cur.dropzone,f.relatedTarget=y.cur.element),f.type==="dragmove"&&y.cur.dropzone&&(_.move=new da(y,f,"dropmove"),f.dropzone=y.cur.dropzone)),_}function pe(t,i){var f=t.dropState,y=f.activeDrops,_=f.cur,O=f.prev;i.leave&&O.dropzone.fire(i.leave),i.enter&&_.dropzone.fire(i.enter),i.move&&_.dropzone.fire(i.move),i.drop&&_.dropzone.fire(i.drop),i.deactivate&&Ke(y,i.deactivate),f.prev.dropzone=_.dropzone,f.prev.element=_.element}function Sa(t,i){var f=t.interaction,y=t.iEvent,_=t.event;if(y.type==="dragmove"||y.type==="dragend"){var O=f.dropState;i.dynamicDrop&&(O.activeDrops=aa(i,f.element));var K=y,Q=Ve(f,K,_);O.rejected=O.rejected&&!!Q&&Q.dropzone===O.cur.dropzone&&Q.element===O.cur.element,O.cur.dropzone=Q&&Q.dropzone,O.cur.element=Q&&Q.element,O.events=ye(f,0,K)}}var ya={id:"actions/drop",install:function(t){var i=t.actions,f=t.interactStatic,y=t.Interactable,_=t.defaults;t.usePlugin(Z),y.prototype.dropzone=function(O){return function(K,Q){if(S.object(Q)){if(K.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ke=We(Q.listeners),He=Object.keys(ke).reduce(function(ra,Ba){return ra[/^(enter|leave)/.test(Ba)?"drag".concat(Ba):/^(activate|deactivate|move)/.test(Ba)?"drop".concat(Ba):Ba]=ke[Ba],ra},{}),Ce=K.options.drop.listeners;Ce&&K.off(Ce),K.on(He),K.options.drop.listeners=He}return S.func(Q.ondrop)&&K.on("drop",Q.ondrop),S.func(Q.ondropactivate)&&K.on("dropactivate",Q.ondropactivate),S.func(Q.ondropdeactivate)&&K.on("dropdeactivate",Q.ondropdeactivate),S.func(Q.ondragenter)&&K.on("dragenter",Q.ondragenter),S.func(Q.ondragleave)&&K.on("dragleave",Q.ondragleave),S.func(Q.ondropmove)&&K.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?K.options.drop.overlap=Q.overlap:S.number(Q.overlap)&&(K.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(K.options.drop.accept=Q.accept),"checker"in Q&&(K.options.drop.checker=Q.checker),K}return S.bool(Q)?(K.options.drop.enabled=Q,K):K.options.drop}(this,O)},y.prototype.dropCheck=function(O,K,Q,ke,He,Ce){return function(ra,Ba,Xa,Wa,el,_l,bl){var Cl=!1;if(!(bl=bl||ra.getRect(_l)))return!!ra.options.drop.checker&&ra.options.drop.checker(Ba,Xa,Cl,ra,_l,Wa,el);var Ul=ra.options.drop.overlap;if(Ul==="pointer"){var Dl=Ne(Wa,el,"drag"),Ol=na(Ba);Ol.x+=Dl.x,Ol.y+=Dl.y;var Il=Ol.x>bl.left&&Ol.x<bl.right,Xr=Ol.y>bl.top&&Ol.y<bl.bottom;Cl=Il&&Xr}var ir=Wa.getRect(el);if(ir&&Ul==="center"){var ln=ir.left+ir.width/2,hn=ir.top+ir.height/2;Cl=ln>=bl.left&&ln<=bl.right&&hn>=bl.top&&hn<=bl.bottom}return ir&&S.number(Ul)&&(Cl=Math.max(0,Math.min(bl.right,ir.right)-Math.max(bl.left,ir.left))*Math.max(0,Math.min(bl.bottom,ir.bottom)-Math.max(bl.top,ir.top))/(ir.width*ir.height)>=Ul),ra.options.drop.checker&&(Cl=ra.options.drop.checker(Ba,Xa,Cl,ra,_l,Wa,el)),Cl}(this,O,K,Q,ke,He,Ce)},f.dynamicDrop=function(O){return S.bool(O)?(t.dynamicDrop=O,f):t.dynamicDrop},ee(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",t.dynamicDrop=!1,_.actions.drop=ya.defaults},listeners:{"interactions:before-action-start":function(t){var i=t.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,i){var f=t.interaction,y=(t.event,t.iEvent);if(f.prepared.name==="drag"){var _=f.dropState;_.activeDrops=[],_.events={},_.activeDrops=aa(i,f.element),_.events=ye(f,0,y),_.events.activate&&(Ke(_.activeDrops,_.events.activate),i.fire("actions/drop:start",{interaction:f,dragEvent:y}))}},"interactions:action-move":Sa,"interactions:after-action-move":function(t,i){var f=t.interaction,y=t.iEvent;if(f.prepared.name==="drag"){var _=f.dropState;pe(f,_.events),i.fire("actions/drop:move",{interaction:f,dragEvent:y}),_.events={}}},"interactions:action-end":function(t,i){if(t.interaction.prepared.name==="drag"){var f=t.interaction,y=t.iEvent;Sa(t,i),pe(f,f.dropState.events),i.fire("actions/drop:end",{interaction:f,dragEvent:y})}},"interactions:stop":function(t){var i=t.interaction;if(i.prepared.name==="drag"){var f=i.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:aa,getDrop:Ve,getDropEvents:ye,fireDropEvents:pe,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},vl=ya;function Nl(t){var i=t.interaction,f=t.iEvent,y=t.phase;if(i.prepared.name==="gesture"){var _=i.pointers.map(function(He){return He.pointer}),O=y==="start",K=y==="end",Q=i.interactable.options.deltaSource;if(f.touches=[_[0],_[1]],O)f.distance=za(_,Q),f.box=Oa(_),f.scale=1,f.ds=0,f.angle=pa(_,Q),f.da=0,i.gesture.startDistance=f.distance,i.gesture.startAngle=f.angle;else if(K||i.pointers.length<2){var ke=i.prevEvent;f.distance=ke.distance,f.box=ke.box,f.scale=ke.scale,f.ds=0,f.angle=ke.angle,f.da=0}else f.distance=za(_,Q),f.box=Oa(_),f.scale=f.distance/i.gesture.startDistance,f.angle=pa(_,Q),f.ds=f.scale-i.gesture.scale,f.da=f.angle-i.gesture.angle;i.gesture.distance=f.distance,i.gesture.angle=f.angle,S.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(i.gesture.scale=f.scale)}}var pl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var i=t.actions,f=t.Interactable,y=t.defaults;f.prototype.gesturable=function(_){return S.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):S.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},i.map.gesture=pl,i.methodDict.gesture="gesturable",y.actions.gesture=pl.defaults},listeners:{"interactions:action-start":Nl,"interactions:action-move":Nl,"interactions:action-end":Nl,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var i=t.interactable.options.gesture;if(i&&i.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Fl=pl;function ja(t,i,f,y,_,O,K){if(!i)return!1;if(i===!0){var Q=S.number(O.width)?O.width:O.right-O.left,ke=S.number(O.height)?O.height:O.bottom-O.top;if(K=Math.min(K,Math.abs((t==="left"||t==="right"?Q:ke)/2)),Q<0&&(t==="left"?t="right":t==="right"&&(t="left")),ke<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var He=Q>=0?O.left:O.right;return f.x<He+K}if(t==="top"){var Ce=ke>=0?O.top:O.bottom;return f.y<Ce+K}if(t==="right")return f.x>(Q>=0?O.right:O.left)-K;if(t==="bottom")return f.y>(ke>=0?O.bottom:O.top)-K}return!!S.element(y)&&(S.element(i)?i===y:U(y,i,_))}function jl(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var y=i;f.interactable.options.resize.square?(f.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=f.resizeAxes,f.resizeAxes==="x"?y.delta.y=0:f.resizeAxes==="y"&&(y.delta.x=0))}}var Rl,Da,al={id:"actions/resize",before:["actions/drag"],install:function(t){var i=t.actions,f=t.browser,y=t.Interactable,_=t.defaults;al.cursors=function(O){return O.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"}}(f),al.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,y.prototype.resizable=function(O){return function(K,Q,ke){return S.object(Q)?(K.options.resize.enabled=Q.enabled!==!1,K.setPerAction("resize",Q),K.setOnEvents("resize",Q),S.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?K.options.resize.axis=Q.axis:Q.axis===null&&(K.options.resize.axis=ke.defaults.actions.resize.axis),S.bool(Q.preserveAspectRatio)?K.options.resize.preserveAspectRatio=Q.preserveAspectRatio:S.bool(Q.square)&&(K.options.resize.square=Q.square),K):S.bool(Q)?(K.options.resize.enabled=Q,K):K.options.resize}(this,O,t)},i.map.resize=al,i.methodDict.resize="resizable",_.actions.resize=al.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.rect;y._rects={start:ee({},O),corrected:ee({},O),previous:ee({},O),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=y.prepared.edges,_.rect=y._rects.corrected,_.deltaRect=y._rects.delta}})(t),jl(t)},"interactions:action-move":function(t){(function(i){var f=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var _=f,O=y.interactable.options.resize.invert,K=O==="reposition"||O==="negate",Q=y.rect,ke=y._rects,He=ke.start,Ce=ke.corrected,ra=ke.delta,Ba=ke.previous;if(ee(Ba,Ce),K){if(ee(Ce,Q),O==="reposition"){if(Ce.top>Ce.bottom){var Xa=Ce.top;Ce.top=Ce.bottom,Ce.bottom=Xa}if(Ce.left>Ce.right){var Wa=Ce.left;Ce.left=Ce.right,Ce.right=Wa}}}else Ce.top=Math.min(Q.top,He.bottom),Ce.bottom=Math.max(Q.bottom,He.top),Ce.left=Math.min(Q.left,He.right),Ce.right=Math.max(Q.right,He.left);for(var el in Ce.width=Ce.right-Ce.left,Ce.height=Ce.bottom-Ce.top,Ce)ra[el]=Ce[el]-Ba[el];_.edges=y.prepared.edges,_.rect=Ce,_.deltaRect=ra}})(t),jl(t)},"interactions:action-end":function(t){var i=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var y=i;y.edges=f.prepared.edges,y.rect=f._rects.corrected,y.deltaRect=f._rects.delta}},"auto-start:check":function(t){var i=t.interaction,f=t.interactable,y=t.element,_=t.rect,O=t.buttons;if(_){var K=ee({},i.coords.cur.page),Q=f.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(O&Q.mouseButtons)!=0)){if(S.object(Q.edges)){var ke={left:!1,right:!1,top:!1,bottom:!1};for(var He in ke)ke[He]=ja(He,Q.edges[He],K,i._latestPointer.eventTarget,y,_,Q.margin||al.defaultMargin);ke.left=ke.left&&!ke.right,ke.top=ke.top&&!ke.bottom,(ke.left||ke.right||ke.top||ke.bottom)&&(t.action={name:"resize",edges:ke})}else{var Ce=Q.axis!=="y"&&K.x>_.right-al.defaultMargin,ra=Q.axis!=="x"&&K.y>_.bottom-al.defaultMargin;(Ce||ra)&&(t.action={name:"resize",axes:(Ce?"x":"")+(ra?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var i=t.edges,f=t.axis,y=t.name,_=al.cursors,O=null;if(f)O=_[y+f];else if(i){for(var K="",Q=0,ke=["top","bottom","left","right"];Q<ke.length;Q++){var He=ke[Q];i[He]&&(K+=He)}O=_[K]}return O},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},dl=al,ol={id:"actions",install:function(t){t.usePlugin(Fl),t.usePlugin(dl),t.usePlugin(Z),t.usePlugin(vl)}},$a=0,tl={request:function(t){return Rl(t)},cancel:function(t){return Da(t)},init:function(t){if(Rl=t.requestAnimationFrame,Da=t.cancelAnimationFrame,!Rl)for(var i=["ms","moz","webkit","o"],f=0;f<i.length;f++){var y=i[f];Rl=t["".concat(y,"RequestAnimationFrame")],Da=t["".concat(y,"CancelAnimationFrame")]||t["".concat(y,"CancelRequestAnimationFrame")]}Rl=Rl&&Rl.bind(t),Da=Da&&Da.bind(t),Rl||(Rl=function(_){var O=Date.now(),K=Math.max(0,16-(O-$a)),Q=t.setTimeout(function(){_(O+K)},K);return $a=O+K,Q},Da=function(_){return clearTimeout(_)})}},ll={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(t){ll.isScrolling=!0,tl.cancel(ll.i),t.autoScroll=ll,ll.interaction=t,ll.prevTime=ll.now(),ll.i=tl.request(ll.scroll)},stop:function(){ll.isScrolling=!1,ll.interaction&&(ll.interaction.autoScroll=null),tl.cancel(ll.i)},scroll:function(){var t=ll.interaction,i=t.interactable,f=t.element,y=t.prepared.name,_=i.options[y].autoScroll,O=Te(_.container,i,f),K=ll.now(),Q=(K-ll.prevTime)/1e3,ke=_.speed*Q;if(ke>=1){var He={x:ll.x*ke,y:ll.y*ke};if(He.x||He.y){var Ce=Ma(O);S.window(O)?O.scrollBy(He.x,He.y):O&&(O.scrollLeft+=He.x,O.scrollTop+=He.y);var ra=Ma(O),Ba={x:ra.x-Ce.x,y:ra.y-Ce.y};(Ba.x||Ba.y)&&i.fire({type:"autoscroll",target:f,interactable:i,delta:Ba,interaction:t,container:O})}ll.prevTime=K}ll.isScrolling&&(tl.cancel(ll.i),ll.i=tl.request(ll.scroll))},check:function(t,i){var f;return(f=t.options[i].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var i=t.interaction,f=t.pointer;if(i.interacting()&&ll.check(i.interactable,i.prepared.name))if(i.simulation)ll.x=ll.y=0;else{var y,_,O,K,Q=i.interactable,ke=i.element,He=i.prepared.name,Ce=Q.options[He].autoScroll,ra=Te(Ce.container,Q,ke);if(S.window(ra))K=f.clientX<ll.margin,y=f.clientY<ll.margin,_=f.clientX>ra.innerWidth-ll.margin,O=f.clientY>ra.innerHeight-ll.margin;else{var Ba=Ie(ra);K=f.clientX<Ba.left+ll.margin,y=f.clientY<Ba.top+ll.margin,_=f.clientX>Ba.right-ll.margin,O=f.clientY>Ba.bottom-ll.margin}ll.x=_?1:K?-1:0,ll.y=O?1:y?-1:0,ll.isScrolling||(ll.margin=Ce.margin,ll.speed=Ce.speed,ll.start(i))}}};function Te(t,i,f){return(S.string(t)?ca(t,i,f):t)||x(f)}function Ma(t){return S.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Je={id:"auto-scroll",install:function(t){var i=t.defaults,f=t.actions;t.autoScroll=ll,ll.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=ll.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,ll.stop(),ll.interaction&&(ll.interaction=null)},"interactions:stop":ll.stop,"interactions:action-move":function(t){return ll.onInteractionMove(t)}}},ie=Je;function Xe(t,i){var f=!1;return function(){return f||(L.console.warn(i),f=!0),t.apply(this,arguments)}}function Aa(t,i){return t.name=i.name,t.axis=i.axis,t.edges=i.edges,t}function Ze(t){return S.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function xa(t){return S.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Va={id:"auto-start/interactableMethods",install:function(t){var i=t.Interactable;i.prototype.getAction=function(f,y,_,O){var K=function(Q,ke,He,Ce,ra){var Ba=Q.getRect(Ce),Xa=ke.buttons||{0:1,1:4,3:8,4:16}[ke.button],Wa={action:null,interactable:Q,interaction:He,element:Ce,rect:Ba,buttons:Xa};return ra.fire("auto-start:check",Wa),Wa.action}(this,y,_,O,t);return this.options.actionChecker?this.options.actionChecker(f,y,K,this,O,_):K},i.prototype.ignoreFrom=Xe(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=Xe(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=xa,i.prototype.styleCursor=Ze}};function Ja(t,i,f,y,_){return i.testIgnoreAllow(i.options[t.name],f,y)&&i.options[t.name].enabled&&il(i,f,t,_)?t:null}function Ue(t,i,f,y,_,O,K){for(var Q=0,ke=y.length;Q<ke;Q++){var He=y[Q],Ce=_[Q],ra=He.getAction(i,f,t,Ce);if(ra){var Ba=Ja(ra,He,Ce,O,K);if(Ba)return{action:Ba,interactable:He,element:Ce}}}return{action:null,interactable:null,element:null}}function fa(t,i,f,y,_){var O=[],K=[],Q=y;function ke(Ce){O.push(Ce),K.push(Q)}for(;S.element(Q);){O=[],K=[],_.interactables.forEachMatch(Q,ke);var He=Ue(t,i,f,O,K,y,_);if(He.action&&!He.interactable.options[He.action.name].manualStart)return He;Q=$e(Q)}return{action:null,interactable:null,element:null}}function oa(t,i,f){var y=i.action,_=i.interactable,O=i.element;y=y||{name:null},t.interactable=_,t.element=O,Aa(t.prepared,y),t.rect=_&&y.name?_.getRect(O):null,sl(t,f),f.fire("autoStart:prepared",{interaction:t})}function il(t,i,f,y){var _=t.options,O=_[f.name].max,K=_[f.name].maxPerElement,Q=y.autoStart.maxInteractions,ke=0,He=0,Ce=0;if(!(O&&K&&Q))return!1;for(var ra=0,Ba=y.interactions.list;ra<Ba.length;ra++){var Xa=Ba[ra],Wa=Xa.prepared.name;if(Xa.interacting()&&(++ke>=Q||Xa.interactable===t&&((He+=Wa===f.name?1:0)>=O||Xa.element===i&&(Ce++,Wa===f.name&&Ce>=K))))return!1}return Q>0}function Le(t,i){return S.number(t)?(i.autoStart.maxInteractions=t,this):i.autoStart.maxInteractions}function Pa(t,i,f){var y=f.autoStart.cursorElement;y&&y!==t&&(y.style.cursor=""),t.ownerDocument.documentElement.style.cursor=i,t.style.cursor=i,f.autoStart.cursorElement=i?t:null}function sl(t,i){var f=t.interactable,y=t.element,_=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var O="";if(_.name){var K=f.options[_.name].cursorChecker;O=S.func(K)?K(_,f,y,t._interacting):i.actions.map[_.name].getCursor(_)}Pa(t.element,O||"",i)}else i.autoStart.cursorElement&&Pa(i.autoStart.cursorElement,"",i)}var fr={id:"auto-start/base",before:["actions"],install:function(t){var i=t.interactStatic,f=t.defaults;t.usePlugin(Va),f.base.actionChecker=null,f.base.styleCursor=!0,ee(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(y){return Le(y,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:il,cursorElement:null}},listeners:{"interactions:down":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;f.interacting()||oa(f,fa(f,y,_,O,i),i)},"interactions:move":function(t,i){(function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||oa(_,fa(_,O,K,Q,y),y)})(t,i),function(f,y){var _=f.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){y.fire("autoStart:before-start",f);var O=_.interactable,K=_.prepared.name;K&&O&&(O.options[K].manualStart||!il(O,_.element,_.prepared,y)?_.stop():(_.start(_.prepared,O,_.element),sl(_,y)))}}(t,i)},"interactions:stop":function(t,i){var f=t.interaction,y=f.interactable;y&&y.options.styleCursor&&Pa(f.element,"",i)}},maxInteractions:Le,withinInteractionLimit:il,validateAction:Ja},ur=fr,Zl={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,i){var f=t.interaction,y=t.eventTarget,_=t.dx,O=t.dy;if(f.prepared.name==="drag"){var K=Math.abs(_),Q=Math.abs(O),ke=f.interactable.options.drag,He=ke.startAxis,Ce=K>Q?"x":K<Q?"y":"xy";if(f.prepared.axis=ke.lockAxis==="start"?Ce[0]:ke.lockAxis,Ce!=="xy"&&He!=="xy"&&He!==Ce){f.prepared.name=null;for(var ra=y,Ba=function(Wa){if(Wa!==f.interactable){var el=f.interactable.options.drag;if(!el.manualStart&&Wa.testIgnoreAllow(el,ra,y)){var _l=Wa.getAction(f.downPointer,f.downEvent,f,ra);if(_l&&_l.name==="drag"&&function(bl,Cl){if(!Cl)return!1;var Ul=Cl.options.drag.startAxis;return bl==="xy"||Ul==="xy"||Ul===bl}(Ce,Wa)&&ur.validateAction(_l,Wa,ra,y,i))return Wa}}};S.element(ra);){var Xa=i.interactables.forEachMatch(ra,Ba);if(Xa){f.prepared.name="drag",f.interactable=Xa,f.element=ra;break}ra=$e(ra)}}}}}};function rr(t){var i=t.prepared&&t.prepared.name;if(!i)return null;var f=t.interactable.options;return f[i].hold||f[i].delay}var dr={id:"auto-start/hold",install:function(t){var i=t.defaults;t.usePlugin(ur),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var i=t.interaction,f=rr(i);f>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},f))},"interactions:move":function(t){var i=t.interaction,f=t.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!f&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var i=t.interaction;rr(i)>0&&(i.prepared.name=null)}},getHoldDuration:rr},yr=dr,Oe={id:"auto-start",install:function(t){t.usePlugin(ur),t.usePlugin(yr),t.usePlugin(Zl)}},Ql=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):S.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function _r(t){var i=t.interaction,f=t.event;i.interactable&&i.interactable.checkAndPreventDefault(f)}var Nr={id:"core/interactablePreventDefault",install:function(t){var i=t.Interactable;i.prototype.preventDefault=Ql,i.prototype.checkAndPreventDefault=function(f){return function(y,_,O){var K=y.options.preventDefault;if(K!=="never")if(K!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(O.type)){var Q=x(O.target).document,ke=_.getDocOptions(Q);if(!ke||!ke.events||ke.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(O.type)||S.element(O.target)&&fe(O.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||O.preventDefault()}else O.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var y=0,_=t.interactions.list;y<_.length;y++){var O=_[y];if(O.element&&(O.element===f.target||se(O.element,f.target)))return void O.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,i){return t["interactions:".concat(i)]=_r,t},{})};function Al(t,i){if(i.phaselessTypes[t])return!0;for(var f in i.map)if(t.indexOf(f)===0&&t.substr(f.length)in i.phases)return!0;return!1}function Tr(t){var i={};for(var f in t){var y=t[f];S.plainObject(y)?i[f]=Tr(y):S.array(y)?i[f]=xe(y):i[f]=y}return i}var Pr=function(){function t(i){s(this,t),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=i,this.result=Wl(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(t,[{key:"start",value:function(i,f){var y,_,O=i.phase,K=this.interaction,Q=function(He){var Ce=He.interactable.options[He.prepared.name],ra=Ce.modifiers;return ra&&ra.length?ra:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ba){var Xa=Ce[Ba];return Xa&&Xa.enabled&&{options:Xa,methods:Xa._methods}}).filter(function(Ba){return!!Ba})}(K);this.prepareStates(Q),this.startEdges=ee({},K.edges),this.edges=ee({},this.startEdges),this.startOffset=(y=K.rect,_=f,y?{left:_.x-y.left,top:_.y-y.top,right:y.right-_.x,bottom:y.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ke=this.fillArg({phase:O,pageCoords:f,preEnd:!1});return this.result=Wl(),this.startAll(ke),this.result=this.setAll(ke)}},{key:"fillArg",value:function(i){var f=this.interaction;return i.interaction=f,i.interactable=f.interactable,i.element=f.element,i.rect||(i.rect=f.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var f=0,y=this.states;f<y.length;f++){var _=y[f];_.methods.start&&(i.state=_,_.methods.start(i))}}},{key:"setAll",value:function(i){var f=i.phase,y=i.preEnd,_=i.skipModifiers,O=i.rect,K=i.edges;i.coords=ee({},i.pageCoords),i.rect=ee({},O),i.edges=ee({},K);for(var Q=_?this.states.slice(_):this.states,ke=Wl(i.coords,i.rect),He=0;He<Q.length;He++){var Ce,ra=Q[He],Ba=ra.options,Xa=ee({},i.coords),Wa=null;(Ce=ra.methods)!=null&&Ce.set&&this.shouldDo(Ba,y,f)&&(i.state=ra,Wa=ra.methods.set(i),te(i.edges,i.rect,{x:i.coords.x-Xa.x,y:i.coords.y-Xa.y})),ke.eventProps.push(Wa)}ee(this.edges,i.edges),ke.delta.x=i.coords.x-i.pageCoords.x,ke.delta.y=i.coords.y-i.pageCoords.y,ke.rectDelta.left=i.rect.left-O.left,ke.rectDelta.right=i.rect.right-O.right,ke.rectDelta.top=i.rect.top-O.top,ke.rectDelta.bottom=i.rect.bottom-O.bottom;var el=this.result.coords,_l=this.result.rect;if(el&&_l){var bl=ke.rect.left!==_l.left||ke.rect.right!==_l.right||ke.rect.top!==_l.top||ke.rect.bottom!==_l.bottom;ke.changed=bl||el.x!==ke.coords.x||el.y!==ke.coords.y}return ke}},{key:"applyToInteraction",value:function(i){var f=this.interaction,y=i.phase,_=f.coords.cur,O=f.coords.start,K=this.result,Q=this.startDelta,ke=K.delta;y==="start"&&ee(this.startDelta,K.delta);for(var He=0,Ce=[[O,Q],[_,ke]];He<Ce.length;He++){var ra=Ce[He],Ba=ra[0],Xa=ra[1];Ba.page.x+=Xa.x,Ba.page.y+=Xa.y,Ba.client.x+=Xa.x,Ba.client.y+=Xa.y}var Wa=this.result.rectDelta,el=i.rect||f.rect;el.left+=Wa.left,el.right+=Wa.right,el.top+=Wa.top,el.bottom+=Wa.bottom,el.width=el.right-el.left,el.height=el.bottom-el.top}},{key:"setAndApply",value:function(i){var f=this.interaction,y=i.phase,_=i.preEnd,O=i.skipModifiers,K=this.setAll(this.fillArg({preEnd:_,phase:y,pageCoords:i.modifiedCoords||f.coords.cur.page}));if(this.result=K,!K.changed&&(!O||O<this.states.length)&&f.interacting())return!1;if(i.modifiedCoords){var Q=f.coords.cur.page,ke={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};K.coords.x+=ke.x,K.coords.y+=ke.y,K.delta.x+=ke.x,K.delta.y+=ke.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var f=i.interaction,y=i.event,_=this.states;if(_&&_.length){for(var O=!1,K=0;K<_.length;K++){var Q=_[K];i.state=Q;var ke=Q.options,He=Q.methods,Ce=He.beforeEnd&&He.beforeEnd(i);if(Ce)return this.endResult=Ce,!1;O=O||!O&&this.shouldDo(ke,!0,i.phase,!0)}O&&f.move({event:y,preEnd:!0})}}},{key:"stop",value:function(i){var f=i.interaction;if(this.states&&this.states.length){var y=ee({states:this.states,interactable:f.interactable,element:f.element,rect:null},i);this.fillArg(y);for(var _=0,O=this.states;_<O.length;_++){var K=O[_];y.state=K,K.methods.stop&&K.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var f=0;f<i.length;f++){var y=i[f],_=y.options,O=y.methods,K=y.name;this.states.push({options:_,methods:O,index:f,name:K})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var f=i.interaction,y=f.coords,_=f.rect,O=f.modification;if(O.result){for(var K=O.startDelta,Q=O.result,ke=Q.delta,He=Q.rectDelta,Ce=0,ra=[[y.start,K],[y.cur,ke]];Ce<ra.length;Ce++){var Ba=ra[Ce],Xa=Ba[0],Wa=Ba[1];Xa.page.x-=Wa.x,Xa.page.y-=Wa.y,Xa.client.x-=Wa.x,Xa.client.y-=Wa.y}_.left-=He.left,_.right-=He.right,_.top-=He.top,_.bottom-=He.bottom}}},{key:"shouldDo",value:function(i,f,y,_){return!(!i||i.enabled===!1||_&&!i.endOnly||i.endOnly&&!f||y==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(f){return Tr(f)}),this.result=Wl(ee({},i.result.coords),ee({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),t}();function Wl(t,i){return{rect:i,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function gr(t,i){var f=t.defaults,y={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},_=function(O){var K=O||{};for(var Q in K.enabled=K.enabled!==!1,f)Q in K||(K[Q]=f[Q]);var ke={options:K,methods:y,name:i,enable:function(){return K.enabled=!0,ke},disable:function(){return K.enabled=!1,ke}};return ke};return i&&typeof i=="string"&&(_._defaults=f,_._methods=y),_}function Ir(t){var i=t.iEvent,f=t.interaction.modification.result;f&&(i.modifiers=f.eventProps)}var Rr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var i=t.interaction;i.modification=new Pr(i)},"interactions:before-action-start":function(t){var i=t.interaction,f=t.interaction.modification;f.start(t,i.coords.start.page),i.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var i=t.interaction,f=i.modification,y=f.setAndApply(t);return i.edges=f.edges,y},"interactions:before-action-end":function(t){var i=t.interaction,f=i.modification,y=f.beforeEnd(t);return i.edges=f.startEdges,y},"interactions:action-start":Ir,"interactions:action-move":Ir,"interactions:action-end":Ir,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Vl=Rr,ar={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Fr=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ke,He){var Ce;s(this,f),(Ce=i.call(this,y)).relatedTarget=null,Ce.screenX=void 0,Ce.screenY=void 0,Ce.button=void 0,Ce.buttons=void 0,Ce.ctrlKey=void 0,Ce.shiftKey=void 0,Ce.altKey=void 0,Ce.metaKey=void 0,Ce.page=void 0,Ce.client=void 0,Ce.delta=void 0,Ce.rect=void 0,Ce.x0=void 0,Ce.y0=void 0,Ce.t0=void 0,Ce.dt=void 0,Ce.duration=void 0,Ce.clientX0=void 0,Ce.clientY0=void 0,Ce.velocity=void 0,Ce.speed=void 0,Ce.swipe=void 0,Ce.axes=void 0,Ce.preEnd=void 0,Q=Q||y.element;var ra=y.interactable,Ba=(ra&&ra.options||ar).deltaSource,Xa=Ne(ra,Q,O),Wa=K==="start",el=K==="end",_l=Wa?C(Ce):y.prevEvent,bl=Wa?y.coords.start:el?{page:_l.page,client:_l.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return Ce.page=ee({},bl.page),Ce.client=ee({},bl.client),Ce.rect=ee({},y.rect),Ce.timeStamp=bl.timeStamp,el||(Ce.page.x-=Xa.x,Ce.page.y-=Xa.y,Ce.client.x-=Xa.x,Ce.client.y-=Xa.y),Ce.ctrlKey=_.ctrlKey,Ce.altKey=_.altKey,Ce.shiftKey=_.shiftKey,Ce.metaKey=_.metaKey,Ce.button=_.button,Ce.buttons=_.buttons,Ce.target=Q,Ce.currentTarget=Q,Ce.preEnd=ke,Ce.type=He||O+(K||""),Ce.interactable=ra,Ce.t0=Wa?y.pointers[y.pointers.length-1].downTime:_l.t0,Ce.x0=y.coords.start.page.x-Xa.x,Ce.y0=y.coords.start.page.y-Xa.y,Ce.clientX0=y.coords.start.client.x-Xa.x,Ce.clientY0=y.coords.start.client.y-Xa.y,Ce.delta=Wa||el?{x:0,y:0}:{x:Ce[Ba].x-_l[Ba].x,y:Ce[Ba].y-_l[Ba].y},Ce.dt=y.coords.delta.timeStamp,Ce.duration=Ce.timeStamp-Ce.t0,Ce.velocity=ee({},y.coords.velocity[Ba]),Ce.speed=Ya(Ce.velocity.x,Ce.velocity.y),Ce.swipe=el||K==="inertiastart"?Ce.getSwipe():null,Ce}return c(f,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var O=112.5<=_&&_<247.5,K=202.5<=_&&_<337.5;return{up:K,down:!K&&22.5<=_&&_<157.5,left:O,right:!O&&(292.5<=_||_<67.5),angle:_,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}}]),f}(he);Object.defineProperties(Fr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var Vr=c(function t(i,f,y,_,O){s(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=f,this.event=y,this.downTime=_,this.downTarget=O}),Or=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),jr=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),Yr=0,sn=function(){function t(i){var f=this,y=i.pointerType,_=i.scopeFire;s(this,t),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=Xe(function(Ce){this.move(Ce)},"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=Yr++,this._scopeFire=_,this.pointerType=y;var O=this;this._proxy={};var K=function(Ce){Object.defineProperty(f._proxy,Ce,{get:function(){return O[Ce]}})};for(var Q in Or)K(Q);var ke=function(Ce){Object.defineProperty(f._proxy,Ce,{value:function(){return O[Ce].apply(O,arguments)}})};for(var He in jr)ke(He);this._scopeFire("interactions:new",{interaction:this})}return c(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,f,y){var _=this.updatePointer(i,f,y,!0),O=this.pointers[_];this._scopeFire("interactions:down",{pointer:i,event:f,eventTarget:y,pointerIndex:_,pointerInfo:O,type:"down",interaction:this})}},{key:"start",value:function(i,f,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!f.options[i.name].enabled)&&(Aa(this.prepared,i),this.interactable=f,this.element=y,this.rect=f.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(i,f,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,f,y,!1);var _,O,K=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&&(_=this.coords.cur.client.x-this.coords.start.client.x,O=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ya(_,O)>this.pointerMoveTolerance);var Q,ke,He,Ce=this.getPointerIndex(i),ra={pointer:i,pointerIndex:Ce,pointerInfo:this.pointers[Ce],event:f,type:"move",eventTarget:y,dx:_,dy:O,duplicate:K,interaction:this};K||(Q=this.coords.velocity,ke=this.coords.delta,He=Math.max(ke.timeStamp/1e3,.001),Q.page.x=ke.page.x/He,Q.page.y=ke.page.y/He,Q.client.x=ke.client.x/He,Q.client.y=ke.client.y/He,Q.timeStamp=He),this._scopeFire("interactions:move",ra),K||this.simulation||(this.interacting()&&(ra.type=null,this.move(ra)),this.pointerWasMoved&&X(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||ve(this.coords.delta),(i=ee({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,f,y,_){var O=this.getPointerIndex(i);O===-1&&(O=this.updatePointer(i,f,y,!1));var K=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(K),{pointer:i,pointerIndex:O,pointerInfo:this.pointers[O],event:f,eventTarget:y,type:K,curEventTarget:_,interaction:this}),this.simulation||this.end(f),this.removePointer(i,f)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var f;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,f===!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(i){var f=Pe(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:me(this.pointers,function(y){return y.id===f})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,f,y,_){var O,K,Q,ke=Pe(i),He=this.getPointerIndex(i),Ce=this.pointers[He];return _=_!==!1&&(_||/(down|start)$/i.test(f.type)),Ce?Ce.pointer=i:(Ce=new Vr(ke,i,f,null,null),He=this.pointers.length,this.pointers.push(Ce)),wa(this.coords.cur,this.pointers.map(function(ra){return ra.pointer}),this._now()),O=this.coords.delta,K=this.coords.prev,Q=this.coords.cur,O.page.x=Q.page.x-K.page.x,O.page.y=Q.page.y-K.page.y,O.client.x=Q.client.x-K.client.x,O.client.y=Q.client.y-K.client.y,O.timeStamp=Q.timeStamp-K.timeStamp,_&&(this.pointerIsDown=!0,Ce.downTime=this.coords.cur.timeStamp,Ce.downTarget=y,H(this.downPointer,i),this.interacting()||(X(this.coords.start,this.coords.cur),X(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(i,f,y),this._scopeFire("interactions:update-pointer",{pointer:i,event:f,eventTarget:y,down:_,pointerInfo:Ce,pointerIndex:He,interaction:this}),He}},{key:"removePointer",value:function(i,f){var y=this.getPointerIndex(i);if(y!==-1){var _=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:i,event:f,eventTarget:null,pointerIndex:y,pointerInfo:_,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,f,y){this._latestPointer.pointer=i,this._latestPointer.event=f,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,f,y,_){return new Fr(this,i,this.prepared.name,f,this.element,y,_)}},{key:"_fireEvent",value:function(i){var f;(f=this.interactable)==null||f.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var f=i.event,y=i.phase,_=i.preEnd,O=i.type,K=this.rect;if(K&&y==="move"&&(te(this.edges,K,this.coords.delta[this.interactable.options.deltaSource]),K.width=K.right-K.left,K.height=K.bottom-K.top),this._scopeFire("interactions:before-action-".concat(y),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(f,y,_,O);return this._scopeFire("interactions:action-".concat(y),i),y==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(y),i),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function Yl(t){hr(t.interaction)}function hr(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var i=t.offset.pending;return ml(t.coords.cur,i),ml(t.coords.delta,i),te(t.edges,t.rect,i),i.x=0,i.y=0,!0}function qr(t){var i=t.x,f=t.y;this.offset.pending.x+=i,this.offset.pending.y+=f,this.offset.total.x+=i,this.offset.total.y+=f}function ml(t,i){var f=t.page,y=t.client,_=i.x,O=i.y;f.x+=_,f.y+=O,y.x+=_,y.y+=O}jr.offsetBy="";var nr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=qr},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(i){i.pointerIsDown&&(ml(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":Yl,"interactions:before-action-move":Yl,"interactions:before-action-end":function(t){var i=t.interaction;if(hr(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(t){var i=t.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},Ll=nr,Sr=function(){function t(i){s(this,t),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=i}return c(t,[{key:"start",value:function(i){var f=this.interaction,y=Hl(f);if(!y||!y.enabled)return!1;var _=f.coords.velocity.client,O=Ya(_.x,_.y),K=this.modification||(this.modification=new Pr(f));if(K.copyFrom(f.modification),this.t0=f._now(),this.allowResume=y.allowResume,this.v0=O,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=K.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&O>y.minSpeed&&O>y.endSpeed)this.startInertia();else{if(K.result=K.setAll(this.modifierArg),!K.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:i,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,f=this.interaction.coords.velocity.client,y=Hl(this.interaction),_=y.resistance,O=-Math.log(y.endSpeed/this.v0)/_;this.targetOffset={x:(f.x-O)/_,y:(f.y-O)/_},this.te=O,this.lambda_v0=_/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var K=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},K.result=K.setAll(Q),K.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+K.result.delta.x,y:this.targetOffset.y+K.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=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 i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var f=this;this.timeout=tl.request(function(){f.active&&i()})}},{key:"inertiaTick",value:function(){var i,f,y,_,O,K,Q,ke=this,He=this.interaction,Ce=Hl(He).resistance,ra=(He._now()-this.t0)/1e3;if(ra<this.te){var Ba,Xa=1-(Math.exp(-Ce*ra)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,f=0,y=this.targetOffset.x,_=this.targetOffset.y,O=this.modifiedOffset.x,K=this.modifiedOffset.y,Ba={x:er(Q=Xa,i,y,O),y:er(Q,f,_,K)}):Ba={x:this.targetOffset.x*Xa,y:this.targetOffset.y*Xa};var Wa={x:Ba.x-this.currentOffset.x,y:Ba.y-this.currentOffset.y};this.currentOffset.x+=Wa.x,this.currentOffset.y+=Wa.y,He.offsetBy(Wa),He.move(),this.onNextFrame(function(){return ke.inertiaTick()})}else He.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,f=this.interaction,y=f._now()-this.t0,_=Hl(f).smoothEndDuration;if(y<_){var O={x:Wr(y,0,this.targetOffset.x,_),y:Wr(y,0,this.targetOffset.y,_)},K={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=K.x,this.currentOffset.y+=K.y,f.offsetBy(K),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var f=i.pointer,y=i.event,_=i.eventTarget,O=this.interaction;O.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),O.updatePointer(f,y,_,!0),O._doPhase({interaction:O,event:y,phase:"resume"}),X(O.coords.prev,O.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,tl.cancel(this.timeout)}}]),t}();function Hl(t){var i=t.interactable,f=t.prepared;return i&&i.options&&f.name&&i.options[f.name].inertia}var vr={id:"inertia",before:["modifiers","actions"],install:function(t){var i=t.defaults;t.usePlugin(Ll),t.usePlugin(Vl),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var i=t.interaction;i.inertia=new Sr(i)},"interactions:before-action-end":function(t){var i=t.interaction,f=t.event;return(!i._interacting||i.simulation||!i.inertia.start(f))&&null},"interactions:down":function(t){var i=t.interaction,f=t.eventTarget,y=i.inertia;if(y.active)for(var _=f;S.element(_);){if(_===i.element){y.resume(t);break}_=$e(_)}},"interactions:stop":function(t){var i=t.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(t){var i=t.interaction.modification;i.stop(t),i.start(t,t.interaction.coords.cur.page),i.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":Ir,"interactions:action-inertiastart":Ir,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function er(t,i,f,y){var _=1-t;return _*_*i+2*_*t*f+t*t*y}function Wr(t,i,f,y){return-f*(t/=y)*(t-2)+i}var an=vr;function _n(t,i){for(var f=0;f<i.length;f++){var y=i[f];if(t.immediatePropagationStopped)break;y(t)}}var Un=function(){function t(i){s(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},i||{})}return c(t,[{key:"fire",value:function(i){var f,y=this.global;(f=this.types[i.type])&&_n(i,f),!i.propagationStopped&&y&&(f=y[i.type])&&_n(i,f)}},{key:"on",value:function(i,f){var y=We(i,f);for(i in y)this.types[i]=Y(this.types[i]||[],y[i])}},{key:"off",value:function(i,f){var y=We(i,f);for(i in y){var _=this.types[i];if(_&&_.length)for(var O=0,K=y[i];O<K.length;O++){var Q=K[O],ke=_.indexOf(Q);ke!==-1&&_.splice(ke,1)}}}},{key:"getRect",value:function(i){return null}}]),t}(),Ln=function(){function t(i){s(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,H(this,i)}return c(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Sn(t){return S.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function An(t,i){return t===i||(typeof t=="boolean"?!!i.capture===t&&!i.passive:!!t.capture==!!i.capture&&!!t.passive==!!i.passive)}var Rn={id:"events",install:function(t){var i,f=[],y={},_=[],O={add:K,remove:Q,addDelegate:function(Ce,ra,Ba,Xa,Wa){var el=Sn(Wa);if(!y[Ba]){y[Ba]=[];for(var _l=0;_l<_.length;_l++){var bl=_[_l];K(bl,Ba,ke),K(bl,Ba,He,!0)}}var Cl=y[Ba],Ul=qe(Cl,function(Dl){return Dl.selector===Ce&&Dl.context===ra});Ul||(Ul={selector:Ce,context:ra,listeners:[]},Cl.push(Ul)),Ul.listeners.push({func:Xa,options:el})},removeDelegate:function(Ce,ra,Ba,Xa,Wa){var el,_l=Sn(Wa),bl=y[Ba],Cl=!1;if(bl)for(el=bl.length-1;el>=0;el--){var Ul=bl[el];if(Ul.selector===Ce&&Ul.context===ra){for(var Dl=Ul.listeners,Ol=Dl.length-1;Ol>=0;Ol--){var Il=Dl[Ol];if(Il.func===Xa&&An(Il.options,_l)){Dl.splice(Ol,1),Dl.length||(bl.splice(el,1),Q(ra,Ba,ke),Q(ra,Ba,He,!0)),Cl=!0;break}}if(Cl)break}}},delegateListener:ke,delegateUseCapture:He,delegatedEvents:y,documents:_,targets:f,supportsOptions:!1,supportsPassive:!1};function K(Ce,ra,Ba,Xa){if(Ce.addEventListener){var Wa=Sn(Xa),el=qe(f,function(_l){return _l.eventTarget===Ce});el||(el={eventTarget:Ce,events:{}},f.push(el)),el.events[ra]||(el.events[ra]=[]),qe(el.events[ra],function(_l){return _l.func===Ba&&An(_l.options,Wa)})||(Ce.addEventListener(ra,Ba,O.supportsOptions?Wa:Wa.capture),el.events[ra].push({func:Ba,options:Wa}))}}function Q(Ce,ra,Ba,Xa){if(Ce.addEventListener&&Ce.removeEventListener){var Wa=me(f,function(Xr){return Xr.eventTarget===Ce}),el=f[Wa];if(el&&el.events)if(ra!=="all"){var _l=!1,bl=el.events[ra];if(bl){if(Ba==="all"){for(var Cl=bl.length-1;Cl>=0;Cl--){var Ul=bl[Cl];Q(Ce,ra,Ul.func,Ul.options)}return}for(var Dl=Sn(Xa),Ol=0;Ol<bl.length;Ol++){var Il=bl[Ol];if(Il.func===Ba&&An(Il.options,Dl)){Ce.removeEventListener(ra,Ba,O.supportsOptions?Dl:Dl.capture),bl.splice(Ol,1),bl.length===0&&(delete el.events[ra],_l=!0);break}}}_l&&!Object.keys(el.events).length&&f.splice(Wa,1)}else for(ra in el.events)el.events.hasOwnProperty(ra)&&Q(Ce,ra,"all")}}function ke(Ce,ra){for(var Ba=Sn(ra),Xa=new Ln(Ce),Wa=y[Ce.type],el=Ae(Ce)[0],_l=el;S.element(_l);){for(var bl=0;bl<Wa.length;bl++){var Cl=Wa[bl],Ul=Cl.selector,Dl=Cl.context;if(fe(_l,Ul)&&se(Dl,el)&&se(Dl,_l)){var Ol=Cl.listeners;Xa.currentTarget=_l;for(var Il=0;Il<Ol.length;Il++){var Xr=Ol[Il];An(Xr.options,Ba)&&Xr.func(Xa)}}}_l=$e(_l)}}function He(Ce){return ke(Ce,!0)}return(i=t.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return O.supportsOptions=!0},get passive(){return O.supportsPassive=!0}}),t.events=O,O}},cn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var i=0,f=cn.methodOrder;i<f.length;i++){var y=f[i],_=cn[y](t);if(_)return _}return null},simulationResume:function(t){var i=t.pointerType,f=t.eventType,y=t.eventTarget,_=t.scope;if(!/down|start/i.test(f))return null;for(var O=0,K=_.interactions.list;O<K.length;O++){var Q=K[O],ke=y;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ke;){if(ke===Q.element)return Q;ke=$e(ke)}}return null},mouseOrPen:function(t){var i,f=t.pointerId,y=t.pointerType,_=t.eventType,O=t.scope;if(y!=="mouse"&&y!=="pen")return null;for(var K=0,Q=O.interactions.list;K<Q.length;K++){var ke=Q[K];if(ke.pointerType===y){if(ke.simulation&&!zn(ke,f))continue;if(ke.interacting())return ke;i||(i=ke)}}if(i)return i;for(var He=0,Ce=O.interactions.list;He<Ce.length;He++){var ra=Ce[He];if(!(ra.pointerType!==y||/down/i.test(_)&&ra.simulation))return ra}return null},hasPointer:function(t){for(var i=t.pointerId,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(zn(_,i))return _}return null},idle:function(t){for(var i=t.pointerType,f=0,y=t.scope.interactions.list;f<y.length;f++){var _=y[f];if(_.pointers.length===1){var O=_.interactable;if(O&&(!O.options.gesture||!O.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&i===_.pointerType)return _}return null}};function zn(t,i){return t.pointers.some(function(f){return f.id===i})}var qn=cn,Hr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Wn(t,i){return function(f){var y=i.interactions.list,_=Ca(f),O=Ae(f),K=O[0],Q=O[1],ke=[];if(/^touch/.test(f.type)){i.prevTouchTime=i.now();for(var He=0,Ce=f.changedTouches;He<Ce.length;He++){var ra=Ce[He],Ba={pointer:ra,pointerId:Pe(ra),pointerType:_,eventType:f.type,eventTarget:K,curEventTarget:Q,scope:i},Xa=bn(Ba);ke.push([Ba.pointer,Ba.eventTarget,Ba.curEventTarget,Xa])}}else{var Wa=!1;if(!J.supportsPointerEvent&&/mouse/.test(f.type)){for(var el=0;el<y.length&&!Wa;el++)Wa=y[el].pointerType!=="mouse"&&y[el].pointerIsDown;Wa=Wa||i.now()-i.prevTouchTime<500||f.timeStamp===0}if(!Wa){var _l={pointer:f,pointerId:Pe(f),pointerType:_,eventType:f.type,curEventTarget:Q,eventTarget:K,scope:i},bl=bn(_l);ke.push([_l.pointer,_l.eventTarget,_l.curEventTarget,bl])}}for(var Cl=0;Cl<ke.length;Cl++){var Ul=ke[Cl],Dl=Ul[0],Ol=Ul[1],Il=Ul[2];Ul[3][t](Dl,f,Ol,Il)}}}function bn(t){var i=t.pointerType,f=t.scope,y={interaction:qn.search(t),searchDetails:t};return f.fire("interactions:find",y),y.interaction||f.interactions.new({pointerType:i})}function Ni(t,i){var f=t.doc,y=t.scope,_=t.options,O=y.interactions.docEvents,K=y.events,Q=K[i];for(var ke in y.browser.isIOS&&!_.events&&(_.events={passive:!1}),K.delegatedEvents)Q(f,ke,K.delegateListener),Q(f,ke,K.delegateUseCapture,!0);for(var He=_&&_.events,Ce=0;Ce<O.length;Ce++){var ra=O[Ce];Q(f,ra.type,ra.listener,He)}}var Ro={id:"core/interactions",install:function(t){for(var i={},f=0;f<Hr.length;f++){var y=Hr[f];i[y]=Wn(y,t)}var _,O=J.pEventTypes;function K(){for(var Q=0,ke=t.interactions.list;Q<ke.length;Q++){var He=ke[Q];if(He.pointerIsDown&&He.pointerType==="touch"&&!He._interacting)for(var Ce=function(){var Xa=Ba[ra];t.documents.some(function(Wa){return se(Wa.doc,Xa.downTarget)})||He.removePointer(Xa.pointer,Xa.event)},ra=0,Ba=He.pointers;ra<Ba.length;ra++)Ce()}}(_=F.PointerEvent?[{type:O.down,listener:K},{type:O.down,listener:i.pointerDown},{type:O.move,listener:i.pointerMove},{type:O.up,listener:i.pointerUp},{type:O.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:K},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ke=0,He=t.interactions.list;ke<He.length;ke++)He[ke].documentBlur(Q)}}),t.prevTouchTime=0,t.Interaction=function(Q){m(He,Q);var ke=M(He);function He(){return s(this,He),ke.apply(this,arguments)}return c(He,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Ce){t.interactions.pointerMoveTolerance=Ce}},{key:"_now",value:function(){return t.now()}}]),He}(sn),t.interactions={list:[],new:function(Q){Q.scopeFire=function(He,Ce){return t.fire(He,Ce)};var ke=new t.Interaction(Q);return t.interactions.list.push(ke),ke},listeners:i,docEvents:_,pointerMoveTolerance:1},t.usePlugin(Nr)},listeners:{"scope:add-document":function(t){return Ni(t,"add")},"scope:remove-document":function(t){return Ni(t,"remove")},"interactable:unset":function(t,i){for(var f=t.interactable,y=i.interactions.list.length-1;y>=0;y--){var _=i.interactions.list[y];_.interactable===f&&(_.stop(),i.fire("interactions:destroy",{interaction:_}),_.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(y,1))}}},onDocSignal:Ni,doOnInteractions:Wn,methodNames:Hr},$o=Ro,Dn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Dn||{}),Vo=function(){function t(i,f,y,_){s(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Un,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=i,this._context=f.context||y,this._win=x(Ta(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=_,this.set(f)}return c(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,f){return S.func(f.onstart)&&this.on("".concat(i,"start"),f.onstart),S.func(f.onmove)&&this.on("".concat(i,"move"),f.onmove),S.func(f.onend)&&this.on("".concat(i,"end"),f.onend),S.func(f.oninertiastart)&&this.on("".concat(i,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,f,y){var _,O=this,K=(_=this._actions.map[i])==null?void 0:_.filterEventType,Q=function(ke){return(K==null||K(ke))&&Al(ke,O._actions)};(S.array(f)||S.object(f))&&this._onOff(Dn.Off,i,f,void 0,Q),(S.array(y)||S.object(y))&&this._onOff(Dn.On,i,y,void 0,Q)}},{key:"setPerAction",value:function(i,f){var y=this._defaults;for(var _ in f){var O=_,K=this.options[i],Q=f[O];O==="listeners"&&this.updatePerActionListeners(i,K.listeners,Q),S.array(Q)?K[O]=xe(Q):S.plainObject(Q)?(K[O]=ee(K[O]||{},Tr(Q)),S.object(y.perAction[O])&&"enabled"in y.perAction[O]&&(K[O].enabled=Q.enabled!==!1)):S.bool(Q)&&S.object(y.perAction[O])?K[O].enabled=Q:K[O]=Q}}},{key:"getRect",value:function(i){return i=i||(S.element(this.target)?this.target:null),S.string(this.target)&&(i=i||this._context.querySelector(this.target)),je(i)}},{key:"rectChecker",value:function(i){var f=this;return S.func(i)?(this.getRect=function(y){var _=ee({},i.apply(f,y));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,f){if(Ta(f)||S.object(f)){for(var y in this.options[i]=f,this._actions.map)this.options[y][i]=f;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return S.string(i)?Array.from(this._context.querySelectorAll(i)):S.func(i)&&i.getAllElements?i.getAllElements():S.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||se(this._context,i)}},{key:"testIgnoreAllow",value:function(i,f,y){return!this.testIgnore(i.ignoreFrom,f,y)&&this.testAllow(i.allowFrom,f,y)}},{key:"testAllow",value:function(i,f,y){return!i||!!S.element(y)&&(S.string(i)?U(y,i,f):!!S.element(i)&&se(i,y))}},{key:"testIgnore",value:function(i,f,y){return!(!i||!S.element(y))&&(S.string(i)?U(y,i,f):!!S.element(i)&&se(i,y))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,f,y,_,O){S.object(f)&&!S.array(f)&&(_=y,y=null);var K=We(f,y,O);for(var Q in K){Q==="wheel"&&(Q=J.wheelEvent);for(var ke=0,He=K[Q];ke<He.length;ke++){var Ce=He[ke];Al(Q,this._actions)?this.events[i===Dn.On?"on":"off"](Q,Ce):S.string(this.target)?this._scopeEvents[i===Dn.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Ce,_):this._scopeEvents[i===Dn.On?"add":"remove"](this.target,Q,Ce,_)}}return this}},{key:"on",value:function(i,f,y){return this._onOff(Dn.On,i,f,y)}},{key:"off",value:function(i,f,y){return this._onOff(Dn.Off,i,f,y)}},{key:"set",value:function(i){var f=this._defaults;for(var y in S.object(i)||(i={}),this.options=Tr(f.base),this._actions.methodDict){var _=y,O=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,ee(ee({},f.perAction),f.actions[_])),this[O](i[_])}for(var K in i)K!=="getRect"?S.func(this[K])&&this[K](i[K]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[i],y=f.length-1;y>=0;y--){var _=f[y],O=_.selector,K=_.context,Q=_.listeners;O===this.target&&K===this._context&&f.splice(y,1);for(var ke=Q.length-1;ke>=0;ke--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ke][0],Q[ke][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),Po=function(){function t(i){var f=this;s(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(y){var _=y.interactable,O=_.target,K=S.string(O)?f.selectorMap[O]:O[f.scope.id],Q=me(K,function(ke){return ke===_});K.splice(Q,1)}})}return c(t,[{key:"new",value:function(i,f){f=ee(f||{},{actions:this.scope.actions});var y=new this.scope.Interactable(i,f,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),S.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(y)):(y.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:i,options:f,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(i,f){var y=f&&f.context||this.scope.document,_=S.string(i),O=_?this.selectorMap[i]:i[this.scope.id];if(O)return qe(O,function(K){return K._context===y&&(_||K.inContext(i))})}},{key:"forEachMatch",value:function(i,f){for(var y=0,_=this.list;y<_.length;y++){var O=_[y],K=void 0;if((S.string(O.target)?S.element(i)&&fe(i,O.target):i===O.target)&&O.inContext(i)&&(K=f(O)),K!==void 0)return K}}}]),t}(),Fo=function(){function t(){var i=this;s(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=J,this.defaults=Tr(ar),this.Eventable=Un,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var _=function O(K,Q){var ke=y.interactables.getExisting(K,Q);return ke||((ke=y.interactables.new(K,Q)).events.global=O.globalEvents),ke};return _.getPointerAverage=ma,_.getTouchBBox=Oa,_.getTouchDistance=za,_.getTouchAngle=pa,_.getElementRect=je,_.getElementClientRect=Ie,_.matchesSelector=fe,_.closest=Be,_.globalEvents={},_.version="1.10.27",_.scope=y,_.use=function(O,K){return this.scope.usePlugin(O,K),this},_.isSet=function(O,K){return!!this.scope.interactables.get(O,K&&K.context)},_.on=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ke=0,He=O;ke<He.length;ke++){var Ce=He[ke];this.on(Ce,K,Q)}return this}if(S.object(O)){for(var ra in O)this.on(ra,O[ra],K);return this}return Al(O,this.scope.actions)?this.globalEvents[O]?this.globalEvents[O].push(K):this.globalEvents[O]=[K]:this.scope.events.add(this.scope.document,O,K,{options:Q}),this},"The interact.on() method is being deprecated"),_.off=Xe(function(O,K,Q){if(S.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),S.array(O)){for(var ke=0,He=O;ke<He.length;ke++){var Ce=He[ke];this.off(Ce,K,Q)}return this}if(S.object(O)){for(var ra in O)this.off(ra,O[ra],K);return this}var Ba;return Al(O,this.scope.actions)?O in this.globalEvents&&(Ba=this.globalEvents[O].indexOf(K))!==-1&&this.globalEvents[O].splice(Ba,1):this.scope.events.remove(this.scope.document,O,K,Q),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return J.supportsTouch},_.supportsPointerEvent=function(){return J.supportsPointerEvent},_.stop=function(){for(var O=0,K=this.scope.interactions.list;O<K.length;O++)K[O].stop();return this},_.pointerMoveTolerance=function(O){return S.number(O)?(this.scope.interactions.pointerMoveTolerance=O,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(O,K){this.scope.addDocument(O,K)},_.removeDocument=function(O){this.scope.removeDocument(O)},_}(this),this.InteractEvent=Fr,this.Interactable=void 0,this.interactables=new Po(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return i.removeDocument(y.target)};var f=this;this.Interactable=function(y){m(O,y);var _=M(O);function O(){return s(this,O),_.apply(this,arguments)}return c(O,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(K){return k(b(O.prototype),"set",this).call(this,K),f.fire("interactable:set",{options:K,interactable:this}),this}},{key:"unset",value:function(){k(b(O.prototype),"unset",this).call(this);var K=f.interactables.list.indexOf(this);K<0||(f.interactables.list.splice(K,1),f.fire("interactable:unset",{interactable:this}))}}]),O}(Vo)}return c(t,[{key:"addListeners",value:function(i,f){this.listenerMaps.push({id:f,map:i})}},{key:"fire",value:function(i,f){for(var y=0,_=this.listenerMaps;y<_.length;y++){var O=_[y].map[i];if(O&&O(f,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(f,y){return f.isInitialized=!0,S.window(y)&&E(y),F.init(y),J.init(y),tl.init(y),f.window=y,f.document=y.document,f.usePlugin($o),f.usePlugin(Rn),f}(this,i)}},{key:"pluginIsInstalled",value:function(i){var f=i.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,f),i.listeners&&i.before){for(var y=0,_=this.listenerMaps.length,O=i.before.reduce(function(Q,ke){return Q[ke]=!0,Q[Ai(ke)]=!0,Q},{});y<_;y++){var K=this.listenerMaps[y].id;if(K&&(O[K]||O[Ai(K)]))break}this.listenerMaps.splice(y,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,f){if(this.getDocIndex(i)!==-1)return!1;var y=x(i);f=f?ee({},f):{},this.documents.push({doc:i,options:f}),this.events.documents.push(i),i!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:y,scope:this,options:f})}},{key:"removeDocument",value:function(i){var f=this.getDocIndex(i),y=x(i),_=this.documents[f].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:i,window:y,scope:this,options:_})}},{key:"getDocIndex",value:function(i){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===i)return f;return-1}},{key:"getDocOptions",value:function(i){var f=this.getDocIndex(i);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ai(t){return t&&t.replace(/\/.*$/,"")}var Ji=new Fo,Jr=Ji.interactStatic,jo=typeof globalThis<"u"?globalThis:window;Ji.init(jo);var Ho=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var _=y[0],O=y[1];return _ in t||O in t}),f=function(y,_){for(var O=t.range,K=t.limits,Q=K===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:K,ke=t.offset,He=ke===void 0?{x:0,y:0}:ke,Ce={range:O,grid:t,x:null,y:null},ra=0;ra<i.length;ra++){var Ba=i[ra],Xa=Ba[0],Wa=Ba[1],el=Math.round((y-He.x)/t[Xa]),_l=Math.round((_-He.y)/t[Wa]);Ce[Xa]=Math.max(Q.left,Math.min(Q.right,el*t[Xa]+He.x)),Ce[Wa]=Math.max(Q.top,Math.min(Q.bottom,_l*t[Wa]+He.y))}return Ce};return f.grid=t,f.coordFields=i,f}}),zi={id:"snappers",install:function(t){var i=t.interactStatic;i.snappers=ee(i.snappers||{},Ho),i.createSnapGrid=i.snappers.grid}},Uo=zi,Mi={start:function(t){var i=t.state,f=t.rect,y=t.edges,_=t.pageCoords,O=i.options,K=O.ratio,Q=O.enabled,ke=i.options,He=ke.equalDelta,Ce=ke.modifiers;K==="preserve"&&(K=f.width/f.height),i.startCoords=ee({},_),i.startRect=ee({},f),i.ratio=K,i.equalDelta=He;var ra=i.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(i.xIsPrimaryAxis=!(!y.left&&!y.right),i.equalDelta){var Ba=(ra.left?1:-1)*(ra.top?1:-1);i.edgeSign={x:Ba,y:Ba}}else i.edgeSign={x:ra.left?-1:1,y:ra.top?-1:1};if(Q!==!1&&ee(y,ra),Ce!=null&&Ce.length){var Xa=new Pr(t.interaction);Xa.copyFrom(t.interaction.modification),Xa.prepareStates(Ce),i.subModification=Xa,Xa.startAll(r({},t))}},set:function(t){var i=t.state,f=t.rect,y=t.coords,_=i.linkedEdges,O=ee({},y),K=i.equalDelta?Xi:Zi;if(ee(t.edges,_),K(i,i.xIsPrimaryAxis,y,f),!i.subModification)return null;var Q=ee({},f);te(_,Q,{x:y.x-O.x,y:y.y-O.y});var ke=i.subModification.setAll(r(r({},t),{},{rect:Q,edges:_,pageCoords:y,prevCoords:y,prevRect:Q})),He=ke.delta;return ke.changed&&(K(i,Math.abs(He.x)>Math.abs(He.y),ke.coords,ke.rect),ee(y,ke.coords)),ke.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Xi(t,i,f){var y=t.startCoords,_=t.edgeSign;i?f.y=y.y+(f.x-y.x)*_.y:f.x=y.x+(f.y-y.y)*_.x}function Zi(t,i,f,y){var _=t.startRect,O=t.startCoords,K=t.ratio,Q=t.edgeSign;if(i){var ke=y.width/K;f.y=O.y+(ke-_.height)*Q.y}else{var He=y.height*K;f.x=O.x+(He-_.width)*Q.x}}var qo=gr(Mi,"aspectRatio"),Qi=function(){};Qi._defaults={};var ci=Qi;function fn(t,i,f){return S.func(t)?ue(t,i.interactable,i.element,[f.x,f.y,i]):ue(t,i.interactable,i.element)}var Kn={start:function(t){var i=t.rect,f=t.startOffset,y=t.state,_=t.interaction,O=t.pageCoords,K=y.options,Q=K.elementRect,ke=ee({left:0,top:0,right:0,bottom:0},K.offset||{});if(i&&Q){var He=fn(K.restriction,_,O);if(He){var Ce=He.right-He.left-i.width,ra=He.bottom-He.top-i.height;Ce<0&&(ke.left+=Ce,ke.right+=Ce),ra<0&&(ke.top+=ra,ke.bottom+=ra)}ke.left+=f.left-i.width*Q.left,ke.top+=f.top-i.height*Q.top,ke.right+=f.right-i.width*(1-Q.right),ke.bottom+=f.bottom-i.height*(1-Q.bottom)}y.offset=ke},set:function(t){var i=t.coords,f=t.interaction,y=t.state,_=y.options,O=y.offset,K=fn(_.restriction,f,i);if(K){var Q=function(ke){return!ke||"left"in ke&&"top"in ke||((ke=ee({},ke)).left=ke.x||0,ke.top=ke.y||0,ke.right=ke.right||ke.left+ke.width,ke.bottom=ke.bottom||ke.top+ke.height),ke}(K);i.x=Math.max(Math.min(Q.right-O.right,i.x),Q.left+O.left),i.y=Math.max(Math.min(Q.bottom-O.bottom,i.y),Q.top+O.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ii=gr(Kn,"restrict"),eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},ao={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function lo(t,i){for(var f=0,y=["top","left","bottom","right"];f<y.length;f++){var _=y[f];_ in t||(t[_]=i[_])}return t}var Gn={noInner:eo,noOuter:ao,start:function(t){var i,f=t.interaction,y=t.startOffset,_=t.state,O=_.options;O&&(i=ta(fn(O.offset,f,f.coords.start.page))),i=i||{x:0,y:0},_.offset={top:i.y+y.top,left:i.x+y.left,bottom:i.y-y.bottom,right:i.x-y.right}},set:function(t){var i=t.coords,f=t.edges,y=t.interaction,_=t.state,O=_.offset,K=_.options;if(f){var Q=ee({},i),ke=fn(K.inner,y,Q)||{},He=fn(K.outer,y,Q)||{};lo(ke,eo),lo(He,ao),f.top?i.y=Math.min(Math.max(He.top+O.top,Q.y),ke.top+O.top):f.bottom&&(i.y=Math.max(Math.min(He.bottom+O.bottom,Q.y),ke.bottom+O.bottom)),f.left?i.x=Math.min(Math.max(He.left+O.left,Q.x),ke.left+O.left):f.right&&(i.x=Math.max(Math.min(He.right+O.right,Q.x),ke.right+O.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ro=gr(Gn,"restrictEdges"),Yn=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Kn.defaults),no=gr({start:Kn.start,set:Kn.set,defaults:Yn},"restrictRect"),io={width:-1/0,height:-1/0},Jn={width:1/0,height:1/0},Wo=gr({start:function(t){return Gn.start(t)},set:function(t){var i=t.interaction,f=t.state,y=t.rect,_=t.edges,O=f.options;if(_){var K=Se(fn(O.min,i,t.coords))||io,Q=Se(fn(O.max,i,t.coords))||Jn;f.options={endOnly:O.endOnly,inner:ee({},Gn.noInner),outer:ee({},Gn.noOuter)},_.top?(f.options.inner.top=y.bottom-K.height,f.options.outer.top=y.bottom-Q.height):_.bottom&&(f.options.inner.bottom=y.top+K.height,f.options.outer.bottom=y.top+Q.height),_.left?(f.options.inner.left=y.right-K.width,f.options.outer.left=y.right-Q.width):_.right&&(f.options.inner.right=y.left+K.width,f.options.outer.right=y.left+Q.width),Gn.set(t),f.options=O}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ui={start:function(t){var i,f=t.interaction,y=t.interactable,_=t.element,O=t.rect,K=t.state,Q=t.startOffset,ke=K.options,He=ke.offsetWithOrigin?function(Ba){var Xa=Ba.interaction.element,Wa=ta(ue(Ba.state.options.origin,null,null,[Xa])),el=Wa||Ne(Ba.interactable,Xa,Ba.interaction.prepared.name);return el}(t):{x:0,y:0};if(ke.offset==="startCoords")i={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Ce=ue(ke.offset,y,_,[f]);(i=ta(Ce)||{x:0,y:0}).x+=He.x,i.y+=He.y}var ra=ke.relativePoints;K.offsets=O&&ra&&ra.length?ra.map(function(Ba,Xa){return{index:Xa,relativePoint:Ba,x:Q.left-O.width*Ba.x+i.x,y:Q.top-O.height*Ba.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(t){var i=t.interaction,f=t.coords,y=t.state,_=y.options,O=y.offsets,K=Ne(i.interactable,i.element,i.prepared.name),Q=ee({},f),ke=[];_.offsetWithOrigin||(Q.x-=K.x,Q.y-=K.y);for(var He=0,Ce=O;He<Ce.length;He++)for(var ra=Ce[He],Ba=Q.x-ra.x,Xa=Q.y-ra.y,Wa=0,el=_.targets.length;Wa<el;Wa++){var _l=_.targets[Wa],bl=void 0;(bl=S.func(_l)?_l(Ba,Xa,i._proxy,ra,Wa):_l)&&ke.push({x:(S.number(bl.x)?bl.x:Ba)+ra.x,y:(S.number(bl.y)?bl.y:Xa)+ra.y,range:S.number(bl.range)?bl.range:_.range,source:_l,index:Wa,offset:ra})}for(var Cl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ul=0;Ul<ke.length;Ul++){var Dl=ke[Ul],Ol=Dl.range,Il=Dl.x-Q.x,Xr=Dl.y-Q.y,ir=Ya(Il,Xr),ln=ir<=Ol;Ol===1/0&&Cl.inRange&&Cl.range!==1/0&&(ln=!1),Cl.target&&!(ln?Cl.inRange&&Ol!==1/0?ir/Ol<Cl.distance/Cl.range:Ol===1/0&&Cl.range!==1/0||ir<Cl.distance:!Cl.inRange&&ir<Cl.distance)||(Cl.target=Dl,Cl.distance=ir,Cl.range=Ol,Cl.inRange=ln,Cl.delta.x=Il,Cl.delta.y=Xr)}return Cl.inRange&&(f.x=Cl.target.x,f.y=Cl.target.y),y.closest=Cl,Cl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Xn=gr(ui,"snap"),di={start:function(t){var i=t.state,f=t.edges,y=i.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],ui.start(t),i.offsets=t.state.offsets,t.state=i},set:function(t){var i=t.interaction,f=t.state,y=t.coords,_=f.options,O=f.offsets,K={x:y.x-O[0].x,y:y.y-O[0].y};f.options=ee({},_),f.options.targets=[];for(var Q=0,ke=_.targets||[];Q<ke.length;Q++){var He=ke[Q],Ce=void 0;if(Ce=S.func(He)?He(K.x,K.y,i):He){for(var ra=0,Ba=f.targetFields;ra<Ba.length;ra++){var Xa=Ba[ra],Wa=Xa[0],el=Xa[1];if(Wa in Ce||el in Ce){Ce.x=Ce[Wa],Ce.y=Ce[el];break}}f.options.targets.push(Ce)}}var _l=ui.set(t);return f.options=_,_l},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ko=gr(di,"snapSize"),Oi={aspectRatio:qo,restrictEdges:ro,restrict:Ii,restrictRect:no,restrictSize:Wo,snapEdges:gr({start:function(t){var i=t.edges;return i?(t.state.targetFields=t.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],di.start(t)):null},set:di.set,defaults:ee(Tr(di.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Xn,snapSize:Ko,spring:ci,avoid:ci,transform:ci,rubberband:ci},Go={id:"modifiers",install:function(t){var i=t.interactStatic;for(var f in t.usePlugin(Vl),t.usePlugin(Uo),i.modifiers=Oi,Oi){var y=Oi[f],_=y._defaults,O=y._methods;_._methods=O,t.defaults.perAction[f]=_}}},Yo=Go,oo=function(t){m(f,t);var i=M(f);function f(y,_,O,K,Q,ke){var He;if(s(this,f),H(C(He=i.call(this,Q)),O),O!==_&&H(C(He),_),He.timeStamp=ke,He.originalEvent=O,He.type=y,He.pointerId=Pe(_),He.pointerType=Ca(_),He.target=K,He.currentTarget=null,y==="tap"){var Ce=Q.getPointerIndex(_);He.dt=He.timeStamp-Q.pointers[Ce].downTime;var ra=He.timeStamp-Q.tapTime;He.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===He.target&&ra<500}else y==="doubletap"&&(He.dt=_.timeStamp-Q.tapTime,He.double=!0);return He}return c(f,[{key:"_subtractOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX-=_,this.pageY-=O,this.clientX-=_,this.clientY-=O,this}},{key:"_addOrigin",value:function(y){var _=y.x,O=y.y;return this.pageX+=_,this.pageY+=O,this.clientX+=_,this.clientY+=O,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(he),Zn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Zn,t.defaults.actions.pointerEvents=Zn.defaults,ee(t.actions.phaselessTypes,Zn.types)},listeners:{"interactions:new":function(t){var i=t.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(t){var i=t.down,f=t.pointerInfo;!i&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Ri(t),Bn({interaction:f,pointer:y,event:_,eventTarget:O,type:"move"},i))},"interactions:down":function(t,i){(function(f,y){for(var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget,ke=f.pointerIndex,He=_.pointers[ke].hold,Ce=la(Q),ra={interaction:_,pointer:O,event:K,eventTarget:Q,type:"hold",targets:[],path:Ce,node:null},Ba=0;Ba<Ce.length;Ba++){var Xa=Ce[Ba];ra.node=Xa,y.fire("pointerEvents:collect-targets",ra)}if(ra.targets.length){for(var Wa=1/0,el=0,_l=ra.targets;el<_l.length;el++){var bl=_l[el].eventable.options.holdDuration;bl<Wa&&(Wa=bl)}He.duration=Wa,He.timeout=setTimeout(function(){Bn({interaction:_,eventTarget:Q,pointer:O,event:K,type:"hold"},y)},Wa)}})(t,i),Bn(t,i)},"interactions:up":function(t,i){Ri(t),Bn(t,i),function(f,y){var _=f.interaction,O=f.pointer,K=f.event,Q=f.eventTarget;_.pointerWasMoved||Bn({interaction:_,eventTarget:Q,pointer:O,event:K,type:"tap"},y)}(t,i)},"interactions:cancel":function(t,i){Ri(t),Bn(t,i)}},PointerEvent:oo,fire:Bn,collectEventTargets:Li,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 Bn(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=t.targets,ke=Q===void 0?Li(t,i):Q,He=new oo(K,y,_,O,f,i.now());i.fire("pointerEvents:new",{pointerEvent:He});for(var Ce={interaction:f,pointer:y,event:_,eventTarget:O,targets:ke,type:K,pointerEvent:He},ra=0;ra<ke.length;ra++){var Ba=ke[ra];for(var Xa in Ba.props||{})He[Xa]=Ba.props[Xa];var Wa=Ne(Ba.eventable,Ba.node);if(He._subtractOrigin(Wa),He.eventable=Ba.eventable,He.currentTarget=Ba.node,Ba.eventable.fire(He),He._addOrigin(Wa),He.immediatePropagationStopped||He.propagationStopped&&ra+1<ke.length&&ke[ra+1].node!==He.currentTarget)break}if(i.fire("pointerEvents:fired",Ce),K==="tap"){var el=He.double?Bn({interaction:f,pointer:y,event:_,eventTarget:O,type:"doubletap"},i):He;f.prevTap=el,f.tapTime=el.timeStamp}return He}function Li(t,i){var f=t.interaction,y=t.pointer,_=t.event,O=t.eventTarget,K=t.type,Q=f.getPointerIndex(y),ke=f.pointers[Q];if(K==="tap"&&(f.pointerWasMoved||!ke||ke.downTarget!==O))return[];for(var He=la(O),Ce={interaction:f,pointer:y,event:_,eventTarget:O,type:K,path:He,targets:[],node:null},ra=0;ra<He.length;ra++){var Ba=He[ra];Ce.node=Ba,i.fire("pointerEvents:collect-targets",Ce)}return K==="hold"&&(Ce.targets=Ce.targets.filter(function(Xa){var Wa,el;return Xa.eventable.options.holdDuration===((Wa=f.pointers[Q])==null||(el=Wa.hold)==null?void 0:el.duration)})),Ce.targets}function Ri(t){var i=t.interaction,f=t.pointerIndex,y=i.pointers[f].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var Jo=Object.freeze({__proto__:null,default:Zn});function Xo(t){var i=t.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var Zo={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Zn);var i=t.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,i){return t["pointerEvents:".concat(i)]=Xo,t},{"pointerEvents:new":function(t){var i=t.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(t,i){var f=t.interaction,y=t.pointerEvent,_=t.eventTarget,O=t.targets;if(y.type==="hold"&&O.length){var K=O[0].eventable.options.holdRepeatInterval;K<=0||(f.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:f,eventTarget:_,type:"hold",pointer:y,event:y},i)},K))}}})},pi=Zo,Qo={id:"pointer-events/interactableTargets",install:function(t){var i=t.Interactable;i.prototype.pointerEvents=function(y){return ee(this.events.options,y),this};var f=i.prototype._backCompatOption;i.prototype._backCompatOption=function(y,_){var O=f.call(this,y,_);return O===this&&(this.events.options[y]=_),O}},listeners:{"pointerEvents:collect-targets":function(t,i){var f=t.targets,y=t.node,_=t.type,O=t.eventTarget;i.interactables.forEachMatch(y,function(K){var Q=K.events,ke=Q.options;Q.types[_]&&Q.types[_].length&&K.testIgnoreAllow(ke,y,O)&&f.push({node:y,eventable:Q,props:{interactable:K}})})},"interactable:new":function(t){var i=t.interactable;i.events.getRect=function(f){return i.getRect(f)}},"interactable:set":function(t,i){var f=t.interactable,y=t.options;ee(f.events.options,i.pointerEvents.defaults),ee(f.events.options,y.pointerEvents||{})}}},et=Qo,at={id:"pointer-events",install:function(t){t.usePlugin(Jo),t.usePlugin(pi),t.usePlugin(et)}},lt=at,to={id:"reflow",install:function(t){var i=t.Interactable;t.actions.phases.reflow=!0,i.prototype.reflow=function(f){return function(y,_,O){for(var K=y.getAllElements(),Q=O.window.Promise,ke=Q?[]:null,He=function(){var ra=K[Ce],Ba=y.getRect(ra);if(!Ba)return 1;var Xa,Wa=qe(O.interactions.list,function(bl){return bl.interacting()&&bl.interactable===y&&bl.element===ra&&bl.prepared.name===_.name});if(Wa)Wa.move(),ke&&(Xa=Wa._reflowPromise||new Q(function(bl){Wa._reflowResolve=bl}));else{var el=Se(Ba),_l=function(bl){return{coords:bl,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:el.x,y:el.y},client:{x:el.x,y:el.y},timeStamp:O.now()});Xa=function(bl,Cl,Ul,Dl,Ol){var Il=bl.interactions.new({pointerType:"reflow"}),Xr={interaction:Il,event:Ol,pointer:Ol,eventTarget:Ul,phase:"reflow"};Il.interactable=Cl,Il.element=Ul,Il.prevEvent=Ol,Il.updatePointer(Ol,Ol,Ul,!0),ve(Il.coords.delta),Aa(Il.prepared,Dl),Il._doPhase(Xr);var ir=bl.window,ln=ir.Promise,hn=ln?new ln(function(En){Il._reflowResolve=En}):void 0;return Il._reflowPromise=hn,Il.start(Dl,Cl,Ul),Il._interacting?(Il.move(Xr),Il.end(Ol)):(Il.stop(),Il._reflowResolve()),Il.removePointer(Ol,Ol),hn}(O,y,ra,_,_l)}ke&&ke.push(Xa)},Ce=0;Ce<K.length&&!He();Ce++);return ke&&Q.all(ke).then(function(){return y})}(this,f,t)}},listeners:{"interactions:stop":function(t,i){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(y,_){y.splice(y.indexOf(_),1)}(i.interactions.list,f))}}},fi=to;if(Jr.use(Nr),Jr.use(Ll),Jr.use(lt),Jr.use(an),Jr.use(Yo),Jr.use(Oe),Jr.use(ol),Jr.use(ie),Jr.use(fi),Jr.default=Jr,o(a)==="object"&&a)try{a.exports=Jr}catch{}return Jr.default=Jr,Jr})}(ji,ji.exports)),ji.exports}var k1=b1();const As=A.getDefaultExportFromCjs(k1),Mo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:n}){const r=a,o=n,s=e.inject(Fc),h=e.inject(jc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),d=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let m=!1,b=!1,u=NaN,C=NaN,M=NaN,k=NaN,W=-1,I=-1,j=-1,L=-1,E=r.x,x=r.y,w=r.w,g=r.h;const S=e.ref(),$=e.reactive({i:e.toRef(r,"i"),state:d,wrapper:S,calcXY:ue});function V(de){We(de)}function ae(){sa()}function Z(de){yn(r.isDraggable)&&(d.draggable=de)}function be(de){yn(r.isResizable)&&(d.resizable=de)}function ze(de){yn(r.isBounded)&&(d.bounded=de)}function F(de){d.transformScale=de}function ne(de){d.rowHeight=de}function J(de){d.maxRows=de}function se(){d.rtl=Ts()==="rtl",sa()}function Be(de){d.cols=Math.floor(de)}s.increaseItem($),e.onBeforeMount(()=>{d.rtl=Ts()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?d.cols=Kc(s.lastBreakpoint,s.cols):d.cols=s.colNum,d.rowHeight=s.rowHeight,d.containerWidth=s.width!==null?s.width:100,d.margin=s.margin!==void 0?s.margin.map(Number):[10,10],d.maxRows=s.maxRows,yn(r.isDraggable)?d.draggable=s.isDraggable:d.draggable=r.isDraggable,yn(r.isResizable)?d.resizable=s.isResizable:d.resizable=r.isResizable,yn(r.isBounded)?d.bounded=s.isBounded:d.bounded=r.isBounded,d.transformScale=s.transformScale,d.useCssTransforms=s.useCssTransforms,d.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=r.x,x=r.y,g=r.h,w=r.w,rn(je)}),h.on("updateWidth",V),h.on("compact",ae),h.on("setDraggable",Z),h.on("setResizable",be),h.on("setBounded",ze),h.on("setTransformScale",F),h.on("setRowHeight",ne),h.on("setMaxRows",J),h.on("directionchange",se),h.on("setColNum",Be)}),e.onBeforeUnmount(()=>{h.off("updateWidth",V),h.off("compact",ae),h.off("setDraggable",Z),h.off("setResizable",be),h.off("setBounded",ze),h.off("setTransformScale",F),h.off("setRowHeight",ne),h.off("setMaxRows",J),h.off("directionchange",se),h.off("setColNum",Be),c.value&&(c.value.unset(),c.value=null),s.decreaseItem($)}),l({state:d,wrapper:S});const $e=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,fe=e.computed(()=>d.resizable&&!r.static),N=e.computed(()=>s.isMirrored?!d.rtl:d.rtl),oe=e.computed(()=>(d.draggable||d.resizable)&&!r.static),U=d1("item"),De=e.computed(()=>({[U.b()]:!0,[U.bm("resizable")]:fe.value,[U.bm("static")]:r.static,[U.bm("resizing")]:d.isResizing,[U.bm("dragging")]:d.isDragging,[U.bm("transform")]:d.useCssTransforms,[U.bm("rtl")]:N.value,[U.bm("no-touch")]:$e&&oe.value})),Ie=e.computed(()=>[U.be("resizer"),N.value&&U.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,de=>{d.draggable=de}),e.watch(()=>r.static,()=>{rn(H),rn(ve)}),e.watch(()=>d.draggable,()=>{rn(H)}),e.watch(()=>r.isResizable,de=>{d.resizable=de}),e.watch(()=>r.isBounded,de=>{d.bounded=de}),e.watch(()=>d.resizable,()=>{rn(ve)}),e.watch(()=>d.rowHeight,()=>{rn(je),rn(la)}),e.watch([()=>d.cols,()=>d.containerWidth],()=>{rn(ve),rn(je),rn(la)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{rn(ve)}),e.watch(N,()=>{rn(ve),rn(je)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const de=s.margin;!de||de[0]===d.margin[0]&&de[1]===d.margin[1]||(d.margin=de.map(Number),rn(je),rn(la))});function je(){r.x+r.w>d.cols?(E=0,w=r.w>d.cols?d.cols:r.w):(E=r.x,w=r.w);const de=ca(E,x,w,g);d.isDragging&&(de.top=d.dragging.top,N.value?de.right=d.dragging.left:de.left=d.dragging.left),d.isResizing&&(de.width=d.resizing.width,de.height=d.resizing.height);let va;d.useCssTransforms?N.value?va=o1(de.top,de.right,de.width,de.height):va=i1(de.top,de.left,de.width,de.height):N.value?va=c1(de.top,de.right,de.width,de.height):va=s1(de.top,de.left,de.width,de.height),d.style=va}function la(){const de={};for(const va of["width","height"]){const na=d.style[va].match(/^(\d+)px$/);if(!na)return;de[va]=na[1]}o("container-resized",r.i,r.h,r.w,de.height,de.width)}function Ta(de){if(r.static)return;const va=de.type;if(va==="resizestart"&&d.isResizing||va!=="resizestart"&&!d.isResizing)return;const na=Ds(de);if(yn(na))return;const{x:Pe,y:wa}=na,Me={width:0,height:0};let ma;switch(va){case"resizestart":{ve(),W=w,I=g,ma=ca(E,x,w,g),Me.width=ma.width,Me.height=ma.height,d.resizing=Me,d.isResizing=!0;break}case"resizemove":{!de.edges.right&&!de.edges.left&&(M=Pe),!de.edges.top&&!de.edges.bottom&&(k=wa);const Oa=Bs(M,k,Pe,wa);N.value?Me.width=d.resizing.width-Oa.deltaX/d.transformScale:Me.width=d.resizing.width+Oa.deltaX/d.transformScale,Me.height=d.resizing.height+Oa.deltaY/d.transformScale,d.resizing=Me;break}case"resizeend":{ma=ca(E,x,w,g),Me.width=ma.width,Me.height=ma.height,d.resizing={width:-1,height:-1},d.isResizing=!1;break}}ma=Ne(Me.height,Me.width),ma.w<r.minW&&(ma.w=r.minW),ma.w>r.maxW&&(ma.w=r.maxW),ma.h<r.minH&&(ma.h=r.minH),ma.h>r.maxH&&(ma.h=r.maxH),ma.h<1&&(ma.h=1),ma.w<1&&(ma.w=1),M=Pe,k=wa,(w!==ma.w||g!==ma.h)&&o("resize",r.i,ma.h,ma.w,Me.height,Me.width),de.type==="resizeend"&&(W!==w||I!==g)&&o("resized",r.i,ma.h,ma.w,Me.height,Me.width),h.emit("resizeEvent",de.type,r.i,E,x,ma.h,ma.w)}function ee(de){if(r.static||d.isResizing)return;const va=de.type;if(va==="dragstart"&&d.isDragging||va!=="dragstart"&&!d.isDragging)return;const na=Ds(de);if(yn(na))return;const{x:Pe,y:wa}=na,Me=de.target;if(!Me.offsetParent)return;const ma={top:0,left:0};switch(va){case"dragstart":{j=E,L=x;const za=Me.offsetParent.getBoundingClientRect(),pa=Me.getBoundingClientRect(),Ca=pa.left/d.transformScale,Ae=za.left/d.transformScale,he=pa.right/d.transformScale,Y=za.right/d.transformScale,xe=pa.top/d.transformScale,me=za.top/d.transformScale;N.value?ma.left=(he-Y)*-1:ma.left=Ca-Ae,ma.top=xe-me,d.dragging=ma,d.isDragging=!0;break}case"dragmove":{const za=Bs(u,C,Pe,wa);if(N.value?ma.left=d.dragging.left-za.deltaX/d.transformScale:ma.left=d.dragging.left+za.deltaX/d.transformScale,ma.top=d.dragging.top+za.deltaY/d.transformScale,d.bounded){const pa=Me.offsetParent.clientHeight-Se(r.h,d.rowHeight,d.margin[1]);ma.top=te(ma.top,0,pa);const Ca=ta(),Ae=d.containerWidth-Se(r.w,Ca,d.margin[0]);ma.left=te(ma.left,0,Ae)}d.dragging=ma;break}case"dragend":{const za=Me.offsetParent.getBoundingClientRect(),pa=Me.getBoundingClientRect(),Ca=pa.left/d.transformScale,Ae=za.left/d.transformScale,he=pa.right/d.transformScale,Y=za.right/d.transformScale,xe=pa.top/d.transformScale,me=za.top/d.transformScale;N.value?ma.left=(he-Y)*-1:ma.left=Ca-Ae,ma.top=xe-me,d.dragging={top:-1,left:-1},d.isDragging=!1;break}}let Oa;N.value,Oa=ue(ma.top,ma.left),u=Pe,C=wa,(E!==Oa.x||x!==Oa.y)&&o("move",r.i,Oa.x,Oa.y),de.type==="dragend"&&(j!==E||L!==x)&&o("moved",r.i,Oa.x,Oa.y),h.emit("dragEvent",de.type,r.i,Oa.x,Oa.y,g,w)}function ca(de,va,na,Pe){const wa=ta();let Me;return N.value?Me={right:Math.round(wa*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*va+(va+1)*d.margin[1]),width:na===1/0?na:Math.round(wa*na+Math.max(0,na-1)*d.margin[0]),height:Pe===1/0?Pe:Math.round(d.rowHeight*Pe+Math.max(0,Pe-1)*d.margin[1])}:Me={left:Math.round(wa*de+(de+1)*d.margin[0]),top:Math.round(d.rowHeight*va+(va+1)*d.margin[1]),width:na===1/0?na:Math.round(wa*na+Math.max(0,na-1)*d.margin[0]),height:Pe===1/0?Pe:Math.round(d.rowHeight*Pe+Math.max(0,Pe-1)*d.margin[1])},Me}function ue(de,va){const na=ta();let Pe=Math.round((va-d.margin[0])/(na+d.margin[0])),wa=Math.round((de-d.margin[1])/(d.rowHeight+d.margin[1]));return Pe=Math.max(Math.min(Pe,d.cols-w),0),wa=Math.max(Math.min(wa,d.maxRows-g),0),{x:Pe,y:wa}}function ta(){return(d.containerWidth-d.margin[0]*(d.cols+1))/d.cols}function Se(de,va,na){return Number.isFinite(de)?Math.round(va*de+Math.max(0,de-1)*na):de}function te(de,va,na){return Math.max(Math.min(de,na),va)}function Ne(de,va,na=!1){const Pe=ta();let wa=Math.round((va+d.margin[0])/(Pe+d.margin[0])),Me=0;return na?Me=Math.ceil((de+d.margin[1])/(d.rowHeight+d.margin[1])):Me=Math.round((de+d.margin[1])/(d.rowHeight+d.margin[1])),wa=Math.max(Math.min(wa,d.cols-E),0),Me=Math.max(Math.min(Me,d.maxRows-x),0),{w:wa,h:Me}}function We(de,va){d.containerWidth=de}function sa(){je()}function Ya(){!c.value&&S.value&&(c.value=As(S.value),d.useStyleCursor||c.value.styleCursor(!1))}const R=Ss(ee);function H(){if(Ya(),!!c.value)if(d.draggable&&!r.static){const de={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(de),m||(m=!0,c.value.on("dragstart dragmove dragend",va=>{va.type==="dragmove"?R(va):ee(va)}))}else c.value.draggable({enabled:!1})}const X=Ss(Ta);function ve(){if(Ya(),!!c.value)if(d.resizable&&!r.static){const de=ca(0,0,r.maxW,r.maxH),va=ca(0,0,r.minW,r.minH),na={edges:{left:N.value?`.${Ie.value[0]}`:!1,right:N.value?!1:`.${Ie.value[0]}`,bottom:`.${Ie.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:va.height*d.transformScale,width:va.width*d.transformScale},max:{height:de.height*d.transformScale,width:de.width*d.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(na.modifiers=[As.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(na),b||(b=!0,c.value.on("resizestart resizemove resizeend",Pe=>{Pe.type==="resizemove"?X(Pe):Ta(Pe)}))}else c.value.resizable({enabled:!1})}return(de,va)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(De.value),style:e.normalizeStyle(d.style)},[e.renderSlot(de.$slots,"default"),fe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ie.value)},null,2)):e.createCommentVNode("",!0)],6))}}),si=typeof window<"u";var zs;si&&(zs=window==null?void 0:window.navigator)!=null&&zs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ms(a){return a!=null}function Is(){}const x1=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(x1)));const w1=si&&("ontouchstart"in window||S1()>0),_1=w1?"pointerdown":"click";function S1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function E1(a,l,n=window.Event){const{type:r,bubbles:o=!1,cancelable:s=!1,...h}=l;if(!Ms(r)||r==="")return!1;let c;return Ms(n)?c=new n(r,{bubbles:o,cancelable:s}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,o,s)),Object.assign(c,h),a.dispatchEvent(c)}const C1="clickoutside",D1=new Set;si&&document.addEventListener(_1,a=>{const l=a.target,n=a.composedPath&&a.composedPath();D1.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&E1(r,{type:C1})})},!0);const B1=[["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 wo;if(si){for(const a of B1)if(a[1]in document){wo=a;break}}e.computed(()=>!1);const T1=new Set,N1=new WeakMap;if(si&&wo){const a=wo[2],l=wo[4];document.addEventListener(l,()=>{if(T1.forEach(n=>{n.value=!1}),document[a]){const n=N1.get(document[a]);n&&(n.value=!0)}},!1)}const Yc=new Map;Yc.set("x",0);Yc.set("y",0);var oi=[],A1=function(){return oi.some(function(a){return a.activeTargets.length>0})},z1=function(){return oi.some(function(a){return a.skippedTargets.length>0})},Os="ResizeObserver loop completed with undelivered notifications.",M1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Os}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Os),window.dispatchEvent(a)},Yi;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Yi||(Yi={}));var ti=function(a){return Object.freeze(a)},I1=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,ti(this)}return a}(),Jc=function(){function a(l,n,r,o){return this.x=l,this.y=n,this.width=r,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ti(this)}return a.prototype.toJSON=function(){var l=this,n=l.x,r=l.y,o=l.top,s=l.right,h=l.bottom,c=l.left,d=l.width,m=l.height;return{x:n,y:r,top:o,right:s,bottom:h,left:c,width:d,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Bt=function(a){return a instanceof SVGElement&&"getBBox"in a},Xc=function(a){if(Bt(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var o=a,s=o.offsetWidth,h=o.offsetHeight;return!(s||h||a.getClientRects().length)},Ls=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},O1=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Wi=typeof window<"u"?window:{},go=new WeakMap,Rs=/auto|scroll/,L1=/^tb|vertical/,R1=/msie|trident/i.test(Wi.navigator&&Wi.navigator.userAgent),Nn=function(a){return parseFloat(a||"0")},Ci=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new I1((n?l:a)||0,(n?a:l)||0)},$s=ti({devicePixelContentBoxSize:Ci(),borderBoxSize:Ci(),contentBoxSize:Ci(),contentRect:new Jc(0,0,0,0)}),Zc=function(a,l){if(l===void 0&&(l=!1),go.has(a)&&!l)return go.get(a);if(Xc(a))return go.set(a,$s),$s;var n=getComputedStyle(a),r=Bt(a)&&a.ownerSVGElement&&a.getBBox(),o=!R1&&n.boxSizing==="border-box",s=L1.test(n.writingMode||""),h=!r&&Rs.test(n.overflowY||""),c=!r&&Rs.test(n.overflowX||""),d=r?0:Nn(n.paddingTop),m=r?0:Nn(n.paddingRight),b=r?0:Nn(n.paddingBottom),u=r?0:Nn(n.paddingLeft),C=r?0:Nn(n.borderTopWidth),M=r?0:Nn(n.borderRightWidth),k=r?0:Nn(n.borderBottomWidth),W=r?0:Nn(n.borderLeftWidth),I=u+m,j=d+b,L=W+M,E=C+k,x=c?a.offsetHeight-E-a.clientHeight:0,w=h?a.offsetWidth-L-a.clientWidth:0,g=o?I+L:0,S=o?j+E:0,$=r?r.width:Nn(n.width)-g-w,V=r?r.height:Nn(n.height)-S-x,ae=$+I+w+L,Z=V+j+x+E,be=ti({devicePixelContentBoxSize:Ci(Math.round($*devicePixelRatio),Math.round(V*devicePixelRatio),s),borderBoxSize:Ci(ae,Z,s),contentBoxSize:Ci($,V,s),contentRect:new Jc(u,d,$,V)});return go.set(a,be),be},Qc=function(a,l,n){var r=Zc(a,n),o=r.borderBoxSize,s=r.contentBoxSize,h=r.devicePixelContentBoxSize;switch(l){case Yi.DEVICE_PIXEL_CONTENT_BOX:return h;case Yi.BORDER_BOX:return o;default:return s}},$1=function(){function a(l){var n=Zc(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=ti([n.borderBoxSize]),this.contentBoxSize=ti([n.contentBoxSize]),this.devicePixelContentBoxSize=ti([n.devicePixelContentBoxSize])}return a}(),eu=function(a){if(Xc(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},V1=function(){var a=1/0,l=[];oi.forEach(function(s){if(s.activeTargets.length!==0){var h=[];s.activeTargets.forEach(function(c){var d=new $1(c.target),m=eu(c.target);h.push(d),c.lastReportedSize=Qc(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,h,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var o=r[n];o()}return a},Vs=function(a){oi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(eu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},P1=function(){var a=0;for(Vs(a);A1();)a=V1(),Vs(a);return z1()&&M1(),a>0},dt,au=[],F1=function(){return au.splice(0).forEach(function(a){return a()})},j1=function(a){if(!dt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return F1()}).observe(n,r),dt=function(){n.textContent="".concat(l?l--:l++)}}au.push(a),dt()},H1=function(a){j1(function(){requestAnimationFrame(a)})},_o=0,U1=function(){return!!_o},q1=250,W1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ps=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fs=function(a){return a===void 0&&(a=0),Date.now()+a},pt=!1,K1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=q1),!pt){pt=!0;var r=Fs(l);H1(function(){var o=!1;try{o=P1()}finally{if(pt=!1,l=r-Fs(),!U1())return;o?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,W1)};document.body?n():Wi.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ps.forEach(function(n){return Wi.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Ps.forEach(function(n){return Wi.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),Et=new K1,js=function(a){!_o&&a>0&&Et.start(),_o+=a,!_o&&Et.stop()},G1=function(a){return!Bt(a)&&!O1(a)&&getComputedStyle(a).display==="inline"},Y1=function(){function a(l,n){this.target=l,this.observedBox=n||Yi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=Qc(this.target,this.observedBox,!0);return G1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),J1=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),bo=new WeakMap,Hs=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},ko=function(){function a(){}return a.connect=function(l,n){var r=new J1(l,n);bo.set(l,r)},a.observe=function(l,n,r){var o=bo.get(l),s=o.observationTargets.length===0;Hs(o.observationTargets,n)<0&&(s&&oi.push(o),o.observationTargets.push(new Y1(n,r&&r.box)),js(1),Et.schedule())},a.unobserve=function(l,n){var r=bo.get(l),o=Hs(r.observationTargets,n),s=r.observationTargets.length===1;o>=0&&(s&&oi.splice(oi.indexOf(r),1),r.observationTargets.splice(o,1),js(-1))},a.disconnect=function(l){var n=this,r=bo.get(l);r.observationTargets.slice().forEach(function(o){return n.unobserve(l,o.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),X1=function(){function a(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ko.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ls(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ko.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ls(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ko.unobserve(this,l)},a.prototype.disconnect=function(){ko.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Io=new WeakMap;function Z1(a){var l;for(let n=0,r=a.length;n<r;++n){const o=a[n],s=Io.get(o.target);if(typeof s=="function"){const{inlineSize:h,blockSize:c}=((l=o.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:d,offsetHeight:m}=o.target;s(Object.assign(o,{offsetWidth:d,offsetHeight:m,width:h??d,height:c??m}))}}}const lu=new(si&&window.ResizeObserver||X1)(Z1);function Us(a,l){Io.set(a,l),lu.observe(a)}function qs(a){Io.has(a)&&(lu.unobserve(a),Io.delete(a))}function Q1(a={}){let l=Is;const n=e.watch(()=>e.unref(a.target),o=>{l(),!(!o||typeof a.onResize!="function")&&(Us(o,a.onResize),l=()=>{qs(o),l=Is})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:Us,unobserveResize:qs,unobserve:r}}const ev=e.ref(!1);e.computed(()=>ev.value);const Ws="__theme_style__",ft="__theme_observer__",Ks=e.reactive(new Map),Gs=new Map;e.watch(Ks,()=>{if(!si)return;Gs.clear();const a=document.head.querySelector(`#${Ws}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${ft} { width: 1px }`,r=1;for(const[o,[s,h]]of Ks.entries())n+=` html.${s} .${ft}, .${h} .${ft} { width: ${++r}px }`,Gs.set(r,o);l.textContent=n,l.id=Ws,document.head.appendChild(l)});const ru=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:n}){const r=a,o=n,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),h=new Map,c=e.ref(r.layout),d=e.ref(),{observeResize:m,unobserveResize:b}=Q1(),u=Z6();u.on("resizeEvent",C),u.on("dragEvent",M),e.onBeforeMount(()=>{o("layout-before-mount",c.value)}),e.onMounted(()=>{o("layout-mounted",c.value),e.nextTick(()=>{u1(c.value),s.originalLayout=c.value,e.nextTick(()=>{V(),d.value&&m(d.value,Q6(E,16)),_i(c.value,r.verticalCompact),o("layout-updated",c.value),L(),E()})})}),e.onBeforeUnmount(()=>{u.clearAll(),d.value&&b(d.value)});function C(Z,be,ze,F,ne,J){S(Z,be,ze,F,ne,J)}function M(Z,be,ze,F,ne,J){g(Z,be,ze,F,ne,J)}e.watch(()=>s.width,(Z,be)=>{e.nextTick(()=>{u.emit("updateWidth",Z),be===-1&&e.nextTick(()=>{o("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,j()}),e.watch(()=>r.colNum,Z=>{u.emit("setColNum",Z)}),e.watch(()=>r.rowHeight,Z=>{u.emit("setRowHeight",Z)}),e.watch(()=>r.isDraggable,Z=>{u.emit("setDraggable",Z)}),e.watch(()=>r.isResizable,Z=>{u.emit("setResizable",Z)}),e.watch(()=>r.isBounded,Z=>{u.emit("setBounded",Z)}),e.watch(()=>r.transformScale,Z=>{u.emit("setTransformScale",Z)}),e.watch(()=>r.responsive,Z=>{Z||(o("update:layout",s.originalLayout),u.emit("setColNum",r.colNum)),E()}),e.watch(()=>r.maxRows,Z=>{u.emit("setMaxRows",Z)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(Fc,e.reactive({...e.toRefs(r),...e.toRefs(s),increaseItem:k,decreaseItem:W})),e.provide(jc,u),l({state:s,getItem:I,resizeEvent:S,dragEvent:g,layoutUpdate:j});function k(Z){h.set(Z.i,Z)}function W(Z){h.delete(Z.i)}function I(Z){return h.get(Z)}function j(){if(!yn(c.value)&&!yn(s.originalLayout)){if(c.value.length!==s.originalLayout.length){const Z=ae(c.value,s.originalLayout);if(Z.length>0)if(c.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(Z);else{const be=new Set(Z.map(ze=>ze.i));s.originalLayout=s.originalLayout.filter(ze=>!be.has(ze.i))}s.lastLayoutLength=c.value.length,V()}_i(c.value,r.verticalCompact),u.emit("updateWidth",s.width),L(),o("layout-updated",c.value)}}function L(){s.mergedStyle={height:x()}}function E(){d.value&&(s.width=d.value.offsetWidth),u.emit("resizeEvent")}function x(){if(!r.autoSize)return;const Z=parseFloat(r.margin[1]);return a1(c.value)*(r.rowHeight+Z)+Z+"px"}let w;function g(Z,be,ze,F,ne,J){let se=Es(c.value,be);yn(se)&&(se={h:0,w:0,x:0,y:0,i:""}),Z==="dragstart"&&!r.verticalCompact&&(w=c.value.reduce((Be,{i:$e,x:fe,y:N})=>({...Be,[$e]:{x:fe,y:N}}),{})),Z==="dragmove"||Z==="dragstart"?(s.placeholder.i=be,s.placeholder.x=se.x,s.placeholder.y=se.y,s.placeholder.w=J,s.placeholder.h=ne,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),c.value=St(c.value,se,ze,F,!0,r.preventCollision),r.restoreOnDrag?(se.static=!0,_i(c.value,r.verticalCompact,w),se.static=!1):_i(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="dragend"&&(w=void 0,o("layout-updated",c.value))}function S(Z,be,ze,F,ne,J){let se=Es(c.value,be);yn(se)&&(se={h:0,w:0,x:0,y:0,i:""});let Be;if(r.preventCollision){const $e=Uc(c.value,{...se,w:J,h:ne}).filter(fe=>fe.i!==se.i);if(Be=$e.length>0,Be){let fe=1/0,N=1/0;$e.forEach(oe=>{oe.x>se.x&&(fe=Math.min(fe,oe.x)),oe.y>se.y&&(N=Math.min(N,oe.y))}),Number.isFinite(fe)&&(se.w=fe-se.x),Number.isFinite(N)&&(se.h=N-se.y)}}Be||(se.w=J,se.h=ne),Z==="resizestart"||Z==="resizemove"?(s.placeholder.i=be,s.placeholder.x=ze,s.placeholder.y=F,s.placeholder.w=se.w,s.placeholder.h=se.h,e.nextTick(()=>{s.isDragging=!0}),u.emit("updateWidth",s.width)):Z&&e.nextTick(()=>{s.isDragging=!1}),r.responsive&&$(),_i(c.value,r.verticalCompact),u.emit("compact"),L(),Z==="resizeend"&&o("layout-updated",c.value)}function $(){const Z=h1(r.breakpoints,s.width);if(Z===s.lastBreakpoint)return;const be=Kc(Z,r.cols);!yn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=_t(c.value));const ze=v1(s.originalLayout,s.layouts,r.breakpoints,Z,s.lastBreakpoint,be,r.verticalCompact);s.layouts[Z]=ze,s.lastBreakpoint!==Z&&o("breakpoint-changed",Z,ze),c.value=ze,o("update:layout",ze),s.lastBreakpoint=Z,u.emit("setColNum",be)}function V(){s.layouts=Object.assign({},r.responsiveLayouts)}function ae(Z,be){const ze=new Set(be.map(se=>se.i)),F=new Set(Z.map(se=>se.i)),ne=Z.filter(se=>!ze.has(se.i)),J=be.filter(se=>!F.has(se.i));return ne.concat(J)}return(Z,be)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:d,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[Z.$slots.default?e.renderSlot(Z.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,ze=>(e.openBlock(),e.createBlock(Mo,e.mergeProps({key:ze.i,ref_for:!0},ze),{default:e.withCtx(()=>[e.renderSlot(Z.$slots,"item",{item:ze})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Mo,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const av={key:0,class:"item-view-group"},lv={key:0,class:"item-view-group"},rv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=A.useModelComp(A.pinia),{isEdit:r}=A.storeToRefs(n),o=Hn(A.pinia),s=l,h=a,c=e.ref(""),d=e.computed(()=>h==null?void 0:h.children),m=e.computed(()=>{var L,E,x,w;return((L=h==null?void 0:h.children)==null?void 0:L.length)>0&&((E=h==null?void 0:h.children)!=null&&E.every(g=>g==null?void 0:g.layout))?(w=(x=h==null?void 0:h.children)==null?void 0:x[0])==null?void 0:w.layout:"vertical"}),b=L=>{c.value=L,s("radioChange",L)},u=e.computed(()=>{var L,E;return((E=(L=h==null?void 0:h.children)==null?void 0:L[0])==null?void 0:E.isGridLayout)||!1}),C=e.ref((h==null?void 0:h.level)+1),M=e.computed(()=>{if(!(h!=null&&h.children)||!Array.isArray(h.children)||h.children.length<2)return!1;const L=h.children.some(x=>(x==null?void 0:x.name)==="测量系统配置表"&&(x==null?void 0:x.comp)==="ParentItem"),E=h.children.some(x=>(x==null?void 0:x.name)==="测量系统传递表"&&(x==null?void 0:x.comp)==="ParentItem");return L&&E}),k=e.computed(()=>{var E,x,w,g,S,$;let L=(E=h==null?void 0:h.children)==null?void 0:E.filter(V=>V==null?void 0:V.choice);if(o.setSelectTab((x=L==null?void 0:L[0])==null?void 0:x.choiceName),(c==null?void 0:c.value)!=="")return(w=h==null?void 0:h.children)==null?void 0:w.filter(V=>!(V!=null&&V.choiceName)||(V==null?void 0:V.choiceName)===(c==null?void 0:c.value));{let V=(S=(g=h==null?void 0:h.children)==null?void 0:g.find(ae=>ae==null?void 0:ae.choice))==null?void 0:S.choiceName;return($=h==null?void 0:h.children)==null?void 0:$.filter(ae=>!(ae!=null&&ae.choiceName)||(ae==null?void 0:ae.choiceName)===V)}}),W=L=>{const E=(L==null?void 0:L.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(x=>{const w=typeof x=="string"?x:JSON.stringify(x);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>h==null?void 0:h.children,()=>{M.value},{deep:!0});const I=L=>{s("rowClick",L)},j=(L,E)=>{s("routeUrl",L,E)};return(L,E)=>u.value?(e.openBlock(),e.createBlock(e.unref(ru),{key:0,layout:d.value,"onUpdate:layout":E[0]||(E[0]=x=>d.value=x),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(x,w)=>(e.openBlock(),e.createBlock(e.unref(Mo),{key:x.i,x:x.x,y:x.y,"min-h":x.minH,"max-h":x.maxH,"min-w":x.minW,w:x.w,h:x.h,i:x.i},{default:e.withCtx(()=>{var g,S,$,V,ae,Z,be,ze,F,ne,J,se,Be,$e;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[(($=(S=x==null?void 0:x.component)==null?void 0:S.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((V=x==null?void 0:x.component)!=null&&V.name)?(e.openBlock(),e.createElementBlock("div",av,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((ae=x==null?void 0:x.component)==null?void 0:ae.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)((Z=x==null?void 0:x.component)==null?void 0:Z.comp)),{pageLayout:m.value,config:{showIndex:(be=e.unref(cr)[w])==null?void 0:be.showIndex,allowMove:(ze=e.unref(cr)[w])==null?void 0:ze.allowMove,viewport:(F=e.unref(cr)[w])==null?void 0:F.viewport,status:(ne=e.unref(cr)[w])==null?void 0:ne.status},related:x==null?void 0:x.relatedTables,compName:x==null?void 0:x.component.name,compNames:e.unref(_c),itemData:(J=x==null?void 0:x.component)==null?void 0:J.compData,childItemData:(se=x==null?void 0:x.component)==null?void 0:se.itemChildData,key:e.unref(jn),cacheNewData:e.unref(wc),onChange:e.unref(To),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(No),onPageChange:e.unref(Ao),parentTableId:(Be=x==null?void 0:x.component)==null?void 0:Be.tableId,allMapContents:e.unref(kt),children:($e=x==null?void 0:x.component)==null?void 0:$e.children,level:C.value,onRowClick:I,onRouteUrl:j,onClickTrigger:e.unref(Sc),onClickMainKey:e.unref(Ec),onRadioChange:b},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(k.value,(x,w)=>{var g,S;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(x==null?void 0:x.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(w)===((g=h==null?void 0:h.children)==null?void 0:g.length)-1?"0px":"24px"})},[((S=x==null?void 0:x.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&x.name?(e.openBlock(),e.createElementBlock("div",lv,[W(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(x.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Gi)(x.comp)),{compName:x.name,groupNames:x==null?void 0:x.nameContents,config:{showIndex:x==null?void 0:x.showIndex,allowMove:x==null?void 0:x.allowMove,viewport:x==null?void 0:x.viewport,status:x==null?void 0:x.status},itemData:x==null?void 0:x.compData,related:x==null?void 0:x.relatedTables,childItemData:x==null?void 0:x.itemChildData,key:e.unref(jn),onChange:e.unref(To),index:(x==null?void 0:x.id)??w,onContentChange:e.unref(No),onPageChange:e.unref(Ao),parentTableId:x==null?void 0:x.tableId,allMapContents:e.unref(kt),children:x==null?void 0:x.children,level:C.value,onRowClick:I,onRouteUrl:j,onRadioChange:b},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),nv=Xl._export_sfc(rv,[["__scopeId","data-v-bafbdd45"]]),iv={class:"radio-group-container"},ov=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,o=e.ref(),s=Hn(A.pinia),{selectTab:h}=A.storeToRefs(s);e.watch(()=>n==null?void 0:n.itemData,()=>{o.value=h.value},{immediate:!0,deep:!0});const c=d=>{o.value=d,r("radioChange",o.value)};return(d,m)=>(e.openBlock(),e.createElementBlock("div",iv,[e.createVNode(nl.ssRadio,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=b=>o.value=b),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),tv=Xl._export_sfc(ov,[["__scopeId","data-v-177d64c3"]]),nu=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),sv={TABLE:Tc,FORM:xs,STATICFORM:Nc,TABLEOPERATE:Zh,TABLESTYLE:v2,TABLEEXTEND:y2,TABLEINTERACTION:k2,FORMOPERATE:ws,FOLD:J2,CALCULATOR:l4,METHODBUTTON:i4,AVATARUPLOAD:ls.ssAvatar,SIGNATURE:ls.ssSignature,FORMTOP:xs,STEP:y4,STEPOPERATE:F2,TIMELINE:_4,TIMELINEOPERATE:K2,FORMTOPOPERATE:ws,SIGNATUREOPERATE:h4,AVATARUPLOADOPERATE:s4,TABS:C4,TABSOPERATE:d6,CHART:C6,CHARTOPERATE:R6,LAYOUT:P6,LAYOUTOPERATE:Y6,PARENTITEM:nv,RADIO:tv};function Ti(a){return sv[a==null?void 0:a.toUpperCase()]||null}exports.De=ru;exports.activeStepInfo=Si;exports.addContents=Ki;exports.addVisibleDialog=Dt;exports.affixItems=D0;exports.allMapContents=kt;exports.analyzeMenu=ac;exports.cacheNewData=wc;exports.clickMainKey=Ec;exports.clickSavePage=C0;exports.clickStep=Dc;exports.clickTrigger=Sc;exports.compId=jn;exports.compNames=_c;exports.compShow=Bi;exports.existLayouts=O0;exports.fixChangeValue=Oo;exports.generateLayouts=d2;exports.getComponent=Ti;exports.getComponents=Gi;exports.getPageConstruct=Yd;exports.getPageData=Gr;exports.getSliceContLength=F0;exports.gridRowHeight=o2;exports.gridRowHeightHmPg=i2;exports.isStepLayout=Bc;exports.onBack=S0;exports.onButtonChange=A0;exports.onChange=To;exports.onClick=E0;exports.onClickStep=L0;exports.onContentChange=No;exports.onExtendTaskEnd=I0;exports.onOk=z0;exports.onPageBack=$0;exports.onPageChange=Ao;exports.onSelectFixContent=_0;exports.renderShowItems=kc;exports.showItems=cr;exports.sliceTableLength=xc;exports.slotContent=nu;exports.ssTable=Tc;exports.st=Mo;exports.stepItems=j0;exports.tabChange=R0;exports.toolBar=M0;exports.useFormComp=Ct;exports.useModelLoader=Ef;exports.verifyButton=V0;