ss-component-new 1.3.479 → 1.3.481

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-Dig7BYmd.cjs → array-BxpbFWKB.cjs} +1 -1
  2. package/dist/{array-CdymP2Bv.js → array-lENXXuxq.js} +2 -2
  3. package/dist/{index-CsRZ0i07.cjs → index-9YC24bNj.cjs} +1 -1
  4. package/dist/{index-BT6bHqwx.cjs → index-AxoUaL28.cjs} +1 -1
  5. package/dist/{index-BPNwGIHv.cjs → index-BH1ZgVQU.cjs} +1 -1
  6. package/dist/{index-BBoQVqN7.cjs → index-BJK8B62k.cjs} +1 -1
  7. package/dist/{index-HfmR8WSM.js → index-BQEOJF-G.js} +2 -2
  8. package/dist/{index-DPecDRMu.js → index-BWXZFsuz.js} +1 -1
  9. package/dist/{index-C1CYcu7q.cjs → index-BwYDoAMT.cjs} +1 -1
  10. package/dist/{index-BAsHBLV9.cjs → index-CHPMsDPK.cjs} +1 -1
  11. package/dist/{index-Bx4_opNC.cjs → index-ClYFYqBL.cjs} +1 -1
  12. package/dist/{index-BJiZQ7II.js → index-CtOsUUWU.js} +5 -5
  13. package/dist/{index-D2eCwes8.js → index-CtvNokK2.js} +1 -1
  14. package/dist/{index-BIarUBh3.cjs → index-CzhBMv8p.cjs} +1 -1
  15. package/dist/{index-DYm_0Gjd.cjs → index-DGEb9bkL.cjs} +1 -1
  16. package/dist/{index-DhYB0JA5.cjs → index-DLiW_2B8.cjs} +1 -1
  17. package/dist/{index-D-4qtOLZ.cjs → index-DZR82YPZ.cjs} +1 -1
  18. package/dist/{index-DLCA5vqn.js → index-DqkuDSPU.js} +1 -1
  19. package/dist/{index-BFxv4IR-.js → index-DrWKawXh.js} +3 -3
  20. package/dist/{index-CeP6fhJc.js → index-EfBib3zE.js} +1 -1
  21. package/dist/{index-BC7q-_1x.js → index-GqFgdK_J.js} +2 -2
  22. package/dist/{index-jIB-S19a.js → index-Pftc722L.js} +1 -1
  23. package/dist/{index-Bi1oVfaF.js → index-QgvVT_iI.js} +7 -7
  24. package/dist/{index-XhTww7Yz.js → index-Zp6hfbFU.js} +1 -1
  25. package/dist/{index-C1kHWH8t.cjs → index-dlG87qfK.cjs} +2 -2
  26. package/dist/{index-CUifMLL3.js → index-sEjvUC1x.js} +2 -2
  27. package/dist/{main-DUkp4ZQk.cjs → main-BqnZHAWL.cjs} +1 -1
  28. package/dist/{main-55wPj31J.js → main-CLr2QVY2.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-D4XUjqeo.js → threeModel-9C1GaQDe.js} +1 -1
  35. package/dist/{threeModel-Boe7qRNS.cjs → threeModel-CjBRvpDw.cjs} +1 -1
  36. package/dist/{threeSceneView-Q1x-IsSk.js → threeSceneView-CuW5ZE_z.js} +3 -3
  37. package/dist/{threeSceneView-C8X9qGmq.cjs → threeSceneView-TcJCWtoE.cjs} +1 -1
  38. package/dist/{threeSceneViewForCPMPIP-DCTKrIm1.cjs → threeSceneViewForCPMPIP-BK4boj8r.cjs} +1 -1
  39. package/dist/{threeSceneViewForCPMPIP-CEeuM1ZH.js → threeSceneViewForCPMPIP-Clh-ry8L.js} +1 -1
  40. package/dist/{threeViewerHost-DQichI1a.js → threeViewerHost-C9P34BEh.js} +1 -1
  41. package/dist/{threeViewerHost-eV1nqK_z.cjs → threeViewerHost-s3KEeoPW.cjs} +1 -1
  42. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";var Xu=Object.defineProperty;var Zu=(a,l,r)=>l in a?Xu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[l]=r;var hn=(a,l,r)=>Zu(a,typeof l!="symbol"?l+"":l,r);const e=require("vue"),Ja=require("./request-Dl8yi2iS.cjs"),M=require("./index-CMUsYepp.cjs"),dl=require("./index-BAsHBLV9.cjs"),le=require("./index-B7964G2F.cjs"),sr=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fl=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-Byr5bNn8.cjs"),$r=require("./index-B-pflqKE.cjs"),Do=require("./threeViewerHost-eV1nqK_z.cjs"),Zr=require("./index-DmwxzDGW.cjs"),hs=require("./index-BT6bHqwx.cjs"),cc=require("./index-DXiuTpL6.cjs");;/* empty css */const To=require("./isString-CGrvcmBw.cjs"),vs=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),uc=require("./index-BVaHwt5f.cjs"),Qu=require("./index-C4miPF2C.cjs"),Kn=require("./MTLLoader-BV8-OAj_.cjs"),ed=require("./URDFLoader-DSfk-yVN.cjs");var ad="[object Boolean]";function dc(a){return a===!0||a===!1||Ja.isObjectLike(a)&&Ja.baseGetTag(a)==ad}function ld(a){return a===void 0}const rd=a=>a.match(/\((.*)\)/)[1],nd={__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,r=e.ref(null),n=e.ref(!1),i=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{n.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>i.value,()=>{e.nextTick(()=>{var o,p;(p=(o=r.value)==null?void 0:o.updatePopper)==null||p.call(o)})},{deep:!0,immediate:!0}),(o,p)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:n.value,"onUpdate:visible":p[0]||(p[0]=u=>n.value=u),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:r,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},id=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,r=e.computed(()=>{var u,m,g,y,d,A;const n=l.value??"";let i=(u=l==null?void 0:l.columnContent)==null?void 0:u.filter;if(i=(m=le.analyzeSplitToContent(i,","))==null?void 0:m.map(w=>((w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),w)),i=i==null?void 0:i.find(w=>(w==null?void 0:w[0])==="("),(i==null?void 0:i[0])==="("&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split("||"),!i)return{backgroundColor:void 0,color:void 0};let o=(y=(g=l==null?void 0:l.columnContent)==null?void 0:g.options)==null?void 0:y.findIndex(w=>(w==null?void 0:w.value)===n);o=i==null?void 0:i[o],o=le.analyzeSplitToContent(o,","),o=o==null?void 0:o.map(w=>((w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),w));let p=o==null?void 0:o.find(w=>w==null?void 0:w.includes("@TextBackRGBA"));p?p=le.rgbaToColor((d=p==null?void 0:p.split("="))==null?void 0:d[1]):p=void 0;let c=o==null?void 0:o.find(w=>w==null?void 0:w.includes("@TextRGBA"));return c?c=le.rgbaToColor((A=c==null?void 0:c.split("="))==null?void 0:A[1]):c=void 0,{backgroundColor:p,color:c}});return(n,i)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(r.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),od=sr._export_sfc(id,[["__scopeId","data-v-3290070b"]]);function td(a,l,r,n={}){if(!a||!l||!r||r.length!==4)return;const i=a.getContext("2d");if(!i)return;const{color:o="rgba(255, 235, 59, 0.3)",strokeWidth:p=2,fillOpacity:c=.2}=n,u=a.getBoundingClientRect(),m=l.getBoundingClientRect(),g=l.naturalWidth,y=l.naturalHeight,d=m.width/g,A=m.height/y,w=Math.min(d,A),Y=g*w,D=y*w,P=(u.width-Y)/2,O=(u.height-D)/2,E=r.map(([x,b])=>{const _=P+x*Y,I=O+b*D;return{x:_,y:I}});i.clearRect(0,0,a.width,a.height),i.beginPath(),i.moveTo(E[0].x,E[0].y);for(let x=1;x<E.length;x++)i.lineTo(E[x].x,E[x].y);i.closePath();const S=o.replace(/[\d.]+\)$/,`${c})`);i.fillStyle=S,i.fill(),i.strokeStyle=o.replace(/[\d.]+\)$/,"1)"),i.lineWidth=p,i.stroke()}function Ti(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ms(a,l){if(!a||!l)return null;const r=a[l];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const sd={key:0,class:"ocr-img-preview-root"},cd={class:"ocr-img-preview-window"},ud={key:0,class:"img-preview-body"},dd={class:"img-preview-header"},pd={class:"img-header-left"},fd={class:"img-name"},hd={key:0,class:"img-header-right"},vd={class:"img-index"},md={key:0,class:"img-thumb-list"},yd=["onClick"],gd={key:1,class:"thumb-placeholder"},bd={class:"thumb-name"},kd={class:"img-preview-container"},xd={key:0,class:"img-placeholder"},wd={key:2,class:"img-placeholder"},_d={key:0},Sd={key:1},Ed={key:1,class:"img-placeholder"},Cd=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 r=a,n=l,i=e.computed({get:()=>r.visible,set:N=>n("update:visible",N)});let o=!1,p="",c=0,u=0,m=0,g=0,y=0,d=0,A=null;const w=N=>{var W,ue;const se=(ue=(W=N==null?void 0:N.target)==null?void 0:W.closest)==null?void 0:ue.call(W,".ocr-img-preview-window");return se||document.querySelector(".ocr-img-preview-window")},Y=N=>{if(!N||N==="none")return{tx:0,ty:0};let se=N.match(/matrix\(([^)]+)\)/);if(se){const W=se[1].split(",").map(ue=>Number(ue.trim()));return{tx:(W==null?void 0:W[4])||0,ty:(W==null?void 0:W[5])||0}}if(se=N.match(/matrix3d\(([^)]+)\)/),se){const W=se[1].split(",").map(ue=>Number(ue.trim()));return{tx:(W==null?void 0:W[12])||0,ty:(W==null?void 0:W[13])||0}}return se=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),se?{tx:Number(se[1])||0,ty:Number(se[2])||0}:{tx:0,ty:0}},D=(N,se,W)=>{N.style.transform=`translate(${se}px, ${W}px)`},P=N=>{const se=w(N);if(!se)return;o=!0,A=se,p="move",c=N.clientX,u=N.clientY;const W=window.getComputedStyle(se),{tx:ue,ty:_e}=Y(W.transform);y=ue,d=_e,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},O=(N,se)=>{const W=w(N);if(!W)return;o=!0,A=W,p=se,c=N.clientX,u=N.clientY;const ue=W.getBoundingClientRect();m=ue.width,g=ue.height;const _e=window.getComputedStyle(W),{tx:we,ty:Ke}=Y(_e.transform);y=we,d=Ke,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=N=>{if(!o||!A)return;const se=N.clientX-c,W=N.clientY-u,ue=360,_e=420;let we=m,Ke=g,la=y,j=d;if(p==="move"){la=y+se,j=d+W,D(A,la,j);return}if(p.includes("right")&&(we=Math.max(ue,m+se)),p.includes("bottom")&&(Ke=Math.max(_e,g+W)),p.includes("left")){const We=m-se;We<ue?(we=ue,la=y+(m-ue)):(we=We,la=y+se)}if(p.includes("top")){const We=g-W;We<_e?(Ke=_e,j=d+(g-_e)):(Ke=We,j=d+W)}A.style.width=`${we}px`,A.style.height=`${Ke}px`,D(A,la,j)},S=()=>{o=!1,p="",A=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)},x=e.ref([]),b=e.ref(!1);e.watch(()=>r.images,async N=>{if(!Array.isArray(N)||N.length===0){x.value=[];return}b.value=!0;const se=[];for(const W of N)if(W.url&&!W.url.startsWith("blob:")&&!W.url.startsWith("http"))try{const ue=await Fl.downloadFile(W.url),_e=URL.createObjectURL(ue);se.push({...W,blobUrl:_e})}catch(ue){console.error(`Failed to load image for preview: ${W.url}`,ue),se.push({...W,blobUrl:""})}else se.push({...W,blobUrl:W.url});x.value=se,b.value=!1},{deep:!0,immediate:!0});const _=e.ref(0),I=e.ref(null),R=e.ref(null),re=e.computed(()=>x.value[_.value]||null),X=()=>{if(!x.value.length){_.value=0;return}if(r.defaultImageName){const N=x.value.findIndex(se=>(se==null?void 0:se.name)===r.defaultImageName);_.value=N>=0?N:0}else _.value=0},ye=N=>{if(!x.value.length)return;const se=Math.max(0,Math.min(N,x.value.length-1));_.value=se},fe=()=>ye(_.value-1),U=()=>ye(_.value+1),q=N=>{if(!N)return;const se=x.value.findIndex(W=>(W==null?void 0:W.name)===N);se>=0&&(_.value=se)},Z=()=>{if(!R.value)return;const N=R.value.parentElement;if(!N)return;const se=N.getBoundingClientRect();R.value.width=se.width,R.value.height=se.height},ae=()=>{var ue,_e;if(!R.value||!I.value||!r.focusedFieldName){R.value&&Ti(R.value);return}const N=(ue=I.value.$el)==null?void 0:ue.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{ae()})};return}const se=((_e=re.value)==null?void 0:_e.name)||"",W=ms(r.fieldMeta,r.focusedFieldName);if(!W){Ti(R.value);return}if(W.imageName!==se){Ti(R.value);return}Z(),td(R.value,N,W.bboxNorm)},ve=()=>{e.nextTick(()=>{Z(),ae()})};e.watch(()=>r.focusedFieldName,()=>{if(!i.value)return;const N=ms(r.fieldMeta,r.focusedFieldName);N!=null&&N.imageName&&q(N.imageName),e.nextTick(()=>{ae()})}),e.watch(()=>{var N;return(N=re.value)==null?void 0:N.name},()=>{i.value&&e.nextTick(()=>{R.value&&Ti(R.value),ae()})}),e.watch(()=>r.visible,N=>{N?(X(),e.nextTick(()=>{Z(),ae()})):R.value&&Ti(R.value)}),e.watch(()=>r.defaultImageName,()=>{i.value&&X()});let ze=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&(ze=new ResizeObserver(()=>{Z(),e.nextTick(()=>{ae()})}),(N=R.value)!=null&&N.parentElement&&ze.observe(R.value.parentElement))}),e.onUnmounted(()=>{ze&&(ze.disconnect(),ze=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const te=()=>{R.value&&Ti(R.value),n("update:visible",!1),n("close")};return(N,se)=>{var Ke,la;const W=e.resolveComponent("el-button"),ue=e.resolveComponent("el-image"),_e=e.resolveComponent("Loading"),we=e.resolveComponent("el-icon");return i.value?(e.openBlock(),e.createElementBlock("div",sd,[se[12]||(se[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",cd,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(P,["stop"])},[se[8]||(se[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:te},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:se[0]||(se[0]=e.withModifiers(j=>O(j,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:se[1]||(se[1]=e.withModifiers(j=>O(j,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:se[2]||(se[2]=e.withModifiers(j=>O(j,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:se[3]||(se[3]=e.withModifiers(j=>O(j,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:se[4]||(se[4]=e.withModifiers(j=>O(j,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:se[5]||(se[5]=e.withModifiers(j=>O(j,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:se[6]||(se[6]=e.withModifiers(j=>O(j,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:se[7]||(se[7]=e.withModifiers(j=>O(j,"bottom-right"),["stop"]))},null,32),re.value?(e.openBlock(),e.createElementBlock("div",ud,[e.createElementVNode("div",dd,[e.createElementVNode("div",pd,[e.createElementVNode("span",fd,e.toDisplayString(re.value.name?re.value.name+(re.value.url&&re.value.url.lastIndexOf(".")!==-1?re.value.url.substring(re.value.url.lastIndexOf(".")):""):""),1)]),x.value.length>1?(e.openBlock(),e.createElementBlock("div",hd,[e.createVNode(W,{size:"small",disabled:_.value===0,onClick:fe},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",vd,e.toDisplayString(_.value+1)+" / "+e.toDisplayString(x.value.length),1),e.createVNode(W,{size:"small",disabled:_.value===x.value.length-1,onClick:U},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),x.value.length>1?(e.openBlock(),e.createElementBlock("div",md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(j,We)=>(e.openBlock(),e.createElementBlock("div",{key:(j.name||"")+"-"+We,class:e.normalizeClass(["img-thumb-item",{active:We===_.value}]),onClick:Oe=>ye(We)},[j!=null&&j.blobUrl?(e.openBlock(),e.createBlock(ue,{key:0,src:j.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[j.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",gd,"加载失败")),e.createElementVNode("div",bd,e.toDisplayString(j.name||"-"),1)],10,yd))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",kd,[b.value?(e.openBlock(),e.createElementBlock("div",xd,[e.createVNode(we,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(_e)]),_:1}),se[11]||(se[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(Ke=re.value)!=null&&Ke.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ue,{ref_key:"imageRef",ref:I,src:re.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[re.value.blobUrl],onLoad:ve},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:R,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",wd,[(la=re.value)!=null&&la.url?(e.openBlock(),e.createElementBlock("span",_d,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",Sd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",Ed,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),Dd=sr._export_sfc(Cd,[["__scopeId","data-v-48a4ecb1"]]),Td={class:"cert-preview-body"},Bd={key:0,class:"pdf-preview-container"},Nd={class:"thumbs"},Ad=["onClick"],zd={class:"thumb-img"},Md=["src"],Id={key:1,class:"thumb-loading"},Od={class:"thumb-title"},Ld={class:"viewer"},Rd={key:0,class:"viewer-img-wrap"},$d=["src"],Vd={key:1,class:"viewer-loading"},Fd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(""),o=e.ref(""),p=e.computed(()=>(r.versions||[]).find(w=>String(w.versionId)===String(i.value))),c=e.ref({}),u=e.ref(""),m=e.ref("证书附件.pdf"),g=()=>{try{Object.values(c.value||{}).forEach(w=>{w&&URL.revokeObjectURL(w)}),u.value&&URL.revokeObjectURL(u.value)}catch{}c.value={},u.value=""},y=async w=>{if(!w||w.fileType==="pdf")return;const Y=Array.isArray(w.images)?w.images:[];for(const D of Y){const P=D==null?void 0:D.url;if(!(!P||c.value[P]))try{const O=await M.platformDownloadFile({url:P}),E=URL.createObjectURL(O.data);c.value={...c.value,[P]:E}}catch{}}},d=async w=>{var D;if(!w||w.fileType!=="pdf"){u.value="";return}const Y=w.sourceUrl||"";if(!Y){u.value="";return}if(u.value){try{URL.revokeObjectURL(u.value)}catch{}u.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:Y,versionId:w==null?void 0:w.versionId,certNo:w==null?void 0:w.certNo});const P=await M.platformDownloadFile({url:Y});console.log("[CertificatePreview] PDF响应:",{url:Y,status:P==null?void 0:P.status,size:(D=P==null?void 0:P.data)==null?void 0:D.size});const O=URL.createObjectURL(P.data);u.value=O;const E=w.certNo?String(w.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(P){console.error("[CertificatePreview] PDF加载失败:",{url:Y,error:P}),u.value=""}};e.watch(()=>r.visible,async w=>{var D;if(!w){g();return}const Y=(D=r.versions)==null?void 0:D[0];i.value=(Y==null?void 0:Y.versionId)||"",await y(Y),await d(Y)},{immediate:!0}),e.watch(()=>i.value,async()=>{var Y,D;const w=p.value;if(!w){o.value="",u.value="";return}if(w.fileType==="pdf"){o.value="",await d(w);return}u.value="",o.value=((D=(Y=w.images)==null?void 0:Y[0])==null?void 0:D.url)||"",await y(w)},{immediate:!0});const A=()=>{n("update:visible",!1),g()};return e.onBeforeUnmount(()=>{g()}),(w,Y)=>{const D=e.resolveComponent("el-empty"),P=e.resolveComponent("el-tab-pane"),O=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),S=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(S,{"model-value":w.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:A},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:A},{default:e.withCtx(()=>Y[1]||(Y[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[w.versions&&w.versions.length>0?(e.openBlock(),e.createBlock(O,{key:0,modelValue:i.value,"onUpdate:modelValue":Y[0]||(Y[0]=x=>i.value=x),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.versions,x=>(e.openBlock(),e.createBlock(P,{key:x.versionId,name:x.versionId,label:x.label},{default:e.withCtx(()=>[e.createElementVNode("div",Td,[x.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",Bd,[u.value?(e.openBlock(),e.createBlock(dl.SsFilePreview,{key:1,fileName:m.value,blobUrl:u.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(D,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Nd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.images||[],b=>(e.openBlock(),e.createElementBlock("div",{key:b.url,class:e.normalizeClass(["thumb",{active:b.url===o.value}]),onClick:_=>o.value=b.url},[e.createElementVNode("div",zd,[c.value[b.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[b.url]},null,8,Md)):(e.openBlock(),e.createElementBlock("div",Id,"加载中"))]),e.createElementVNode("div",Od,e.toDisplayString(b.name),1)],10,Ad))),128))]),e.createElementVNode("div",Ld,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[o.value]?(e.openBlock(),e.createElementBlock("div",Rd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[o.value]},null,8,$d)])):(e.openBlock(),e.createElementBlock("div",Vd,"加载中"))],64)):(e.openBlock(),e.createBlock(D,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(D,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),Pd=sr._export_sfc(Fd,[["__scopeId","data-v-220703c0"]]),jd={class:"ocr-candidate-wrap"},Hd={class:"ocr-candidate-left"},Ud={key:1},qd={key:0},Wd={key:1},Kd={key:2},Gd={key:3},Yd={key:0,class:"ocr-candidate-right"},Jd={class:"ocr-candidate-actions"},Xd={key:1},Zd={class:"dialog-footer"},Qd={__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 r=(_=[])=>{const I=[],R=re=>{(re||[]).forEach(X=>{if(!X)return;const ye=X.children||X.childrens||X.columns;Array.isArray(ye)&&ye.length>0?R(ye):I.push(X)})};return R(_),I},n=a,i=l,o=e.computed(()=>{var _;return((_=d.value)==null?void 0:_.allowAdd)!==!1}),p=e.computed(()=>{var _;return((_=d.value)==null?void 0:_.allowReplace)!==!1}),c=_=>{if(!_)return[];if(Array.isArray(_))return _;if(typeof _=="string")try{const I=JSON.parse(_);return Array.isArray(I)?I:[]}catch{return[]}return[]},u=_=>{i("preview-file",_)},m=e.ref([]),g=e.ref(0),y=e.ref("");e.watch(()=>n.candidates,_=>{var I,R;m.value=(_||[]).map(re=>({...re,...(re==null?void 0:re.ocrRow)||{},selectedTargetId:(re==null?void 0:re.selectedTargetId)||"",__decision:re==null?void 0:re.__decision})),g.value=0,y.value=((R=(I=m.value)==null?void 0:I[0])==null?void 0:R.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>n.visible,_=>{var I,R;_&&(g.value=0,y.value=((R=(I=m.value)==null?void 0:I[0])==null?void 0:R.selectedTargetId)||"")});const d=e.computed(()=>{var I;const _=Number(g.value||0);return((I=m.value||[])==null?void 0:I[_])||null}),A=e.computed(()=>(r(n.columns||[])||[]).filter(R=>R&&R.prop).filter(R=>R.type!=="operate"&&R.label!=="操作"&&R.prop!=="operate")),w=e.computed(()=>A.value.filter(_=>_.label!=="证书附件"&&_.prop!=="证书附件")),Y=_=>{if(!_)return;const I=(m.value||[]).findIndex(R=>(R==null?void 0:R.idx)===(_==null?void 0:_.idx));I>-1&&(g.value=I,y.value=(_==null?void 0:_.selectedTargetId)||"")},D=_=>{if(!_){y.value="";return}y.value=String((_==null?void 0:_.id)??"")},P=(_,I="")=>{const R=Number(g.value||0),re=m.value||[],X=re[R];X&&(X.__decision=_,X.selectedTargetId=I,y.value=I,m.value=[...re])},O=()=>P("skip",""),E=()=>P("add",""),S=()=>{if(!y.value){Ja.ElMessage.warning("请先选择要替换的目标记录");return}P("replace",y.value)},x=()=>{i("update:visible",!1)},b=()=>{const _=m.value||[];if(_.find(R=>(R==null?void 0:R.__decision)==="replace"&&!(R!=null&&R.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}i("submit",_),i("update:visible",!1)};return(_,I)=>{const R=e.resolveComponent("el-table-column"),re=e.resolveComponent("svg-icon"),X=e.resolveComponent("el-table"),ye=e.resolveComponent("el-button"),fe=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock($r.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:x},{default:e.withCtx(()=>{var U,q;return[e.createElementVNode("div",jd,[e.createElementVNode("div",Hd,[I[0]||(I[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(X,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:Y},{default:e.withCtx(()=>[e.createVNode(R,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,Z=>(e.openBlock(),e.createBlock(R,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ae})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ae==null?void 0:ae[Z.prop]).length>0?(e.openBlock(),e.createBlock(re,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>u({row:ae,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Ud,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ae==null?void 0:ae[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(R,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:Z})=>[e.createTextVNode(e.toDisplayString(((Z==null?void 0:Z.candidates)||[]).length),1)]),_:1}),e.createVNode(R,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",qd,"替换")):(Z==null?void 0:Z.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Wd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Kd,"跳过")):(e.openBlock(),e.createElementBlock("span",Gd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Yd,[I[4]||(I[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Jd,[e.createVNode(ye,{id:"themeBorderButton",onClick:O},{default:e.withCtx(()=>I[1]||(I[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(ye,{id:"themeBorderButton",onClick:E,disabled:!o.value},{default:e.withCtx(()=>I[2]||(I[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:S,disabled:!p.value||!y.value},{default:e.withCtx(()=>I[3]||(I[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((U=d.value)==null?void 0:U.candidates)||[]).length===0?(e.openBlock(),e.createBlock(fe,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(X,{data:((q=d.value)==null?void 0:q.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:D,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(R,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Z=>(e.openBlock(),e.createBlock(R,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ae})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ae==null?void 0:ae[Z.prop]).length>0?(e.openBlock(),e.createBlock(re,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>u({row:ae,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Xd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ae==null?void 0:ae[Z.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(ye,{id:"themeBorderButton",onClick:x},{default:e.withCtx(()=>I[5]||(I[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:b},{default:e.withCtx(()=>I[6]||(I[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},ep=sr._export_sfc(Qd,[["__scopeId","data-v-89e0489c"]]),ap={class:"ocr-preview-content"},lp={class:"ocr-preview-tip"},rp={class:"ocr-preview-table"},np={style:{display:"flex","align-items":"center",gap:"8px"}},ip={class:"dialog-footer"},op={__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 r=a,n=l,i=e.ref([]),o=e.ref([]),p=e.ref([]);e.watch(()=>r.visible,A=>{A&&(i.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),o.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),p.value=[...r.ocrSelectedFields])});const c=(A,w)=>{const Y=[...p.value];if(w)Y.includes(A)||Y.push(A);else{const D=Y.indexOf(A);D>-1&&Y.splice(D,1)}p.value=Y,n("update:ocrSelectedFields",Y)},u=(A,w,Y)=>{n("fieldChange",{rowIndex:A,prop:w,value:Y})},m=()=>{n("update:ocrPreviewData",i.value),n("confirm",i.value),n("update:visible",!1)},g=()=>{n("update:visible",!1)},y=A=>typeof A!="number"?"-":`${(A*100).toFixed(1)}%`,d=A=>typeof A!="number"?"#606266":A>=.9?"#67c23a":A>=.7?"#e6a23c":"#f56c6c";return(A,w)=>{const Y=e.resolveComponent("el-alert"),D=e.resolveComponent("el-table-column"),P=e.resolveComponent("el-checkbox"),O=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),S=e.resolveComponent("el-button");return e.openBlock(),e.createBlock($r.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:g,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createElementVNode("div",lp,[e.createVNode(Y,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",rp,[e.createVNode(E,{data:i.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(D,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,x=>(e.openBlock(),e.createBlock(D,{key:x.prop,prop:x.prop,"min-width":x.minWidth||230,"class-name":x.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",np,[x.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P,{key:0,"model-value":p.value.includes(x.prop),onChange:b=>c(x.prop,b),onClick:w[0]||(w[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(x.label),1)])]),default:e.withCtx(({row:b,$index:_})=>[x.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:d(b[x.prop]),fontWeight:500})},e.toDisplayString(y(b[x.prop])),5)):(e.openBlock(),e.createBlock(O,{key:1,modelValue:b[x.prop],"onUpdate:modelValue":I=>b[x.prop]=I,size:"small",placeholder:"请输入"+x.label,onChange:I=>u(_,x.prop,I)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ip,[e.createVNode(S,{onClick:g,id:"themeBorderButton"},{default:e.withCtx(()=>w[1]||(w[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(S,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>w[2]||(w[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},tp=sr._export_sfc(op,[["__scopeId","data-v-df66eb1f"]]),ai=a=>{var n;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 r=(n=le.analyzeSplitToContent(l,","))==null?void 0:n.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),vn(i)));return r=r==null?void 0:r.join(","),r};function pc(a){return Ja.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function sp(a){return Ja.axios.get(a,{responseType:"blob"})}let or="$R",cp="http://222.92.178.198:55002/AIRobot",mt=["Form","BarChart","FormText","FormBlock"];const _t=a=>{var r,n;let l=(n=le.analyzeSplitToContent(a,"@"))==null?void 0:n[((r=le.analyzeSplitToContent(a,"@"))==null?void 0:r.length)-1];return!!(mt!=null&&mt.some(i=>l==null?void 0:l.includes(i)))},up=async(a,l,r,n)=>{var o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe;let i=a;if(_t(i==null?void 0:i[0])){let Ie=vc(i),Me=(o=Ie==null?void 0:Ie.filter)==null?void 0:o.join(","),de=[];(p=Ie==null?void 0:Ie.hideContents)==null||p.forEach(Ea=>{if(Ea){const Ge=Ea;Ge&&de.push(`(HideGroup=Yes, prop=${Ge})`)}});let Ce=(c=Ie==null?void 0:Ie.formContents)==null?void 0:c.filter(Ea=>{var Ge;return(Ge=Ea==null?void 0:Ea.filters)==null?void 0:Ge.includes("@ShowHide=Hide")});(Ce==null?void 0:Ce.length)>0&&(Ce==null||Ce.forEach(Ea=>{if(Ea){const Ge=Ea==null?void 0:Ea.prop;Ge&&de.push(`(Hide=Yes, prop=${Ge})`)}}));let Je=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Je)||(Je=Je?[Je]:[]),Je=[...Je,...de],Me===""&&((u=Ie==null?void 0:Ie.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Ie==null?void 0:Ie.groupName,value:Ie==null?void 0:Ie.formContents,contents:Array.isArray((m=Ie==null?void 0:Ie.contents)==null?void 0:m[0])&&((y=(g=Ie==null?void 0:Ie.contents)==null?void 0:g[0])!=null&&y.every(Ea=>Array.isArray(Ea)))?[(A=(d=Ie==null?void 0:Ie.contents)==null?void 0:d[0])==null?void 0:A[r]]:[Ie==null?void 0:Ie.contents],filter:"("+Me+")",menuFilter:Je,groupFilter:Ie==null?void 0:Ie.groupFilters}}else if(((w=i==null?void 0:i[0])==null?void 0:w[0])!=="&"){let Ie=mc(i,n),Me="";(Y=Ie==null?void 0:Ie.tableFilter)!=null&&Y.includes(or)?Ie.tableFilter=(D=Ie==null?void 0:Ie.tableFilter)==null?void 0:D.replace(or,""):Me=(E=(O=(P=Ie==null?void 0:Ie.tableFilter)==null?void 0:P.replace("(",or))==null?void 0:O.split(or))==null?void 0:E[0];let de=[];Ie!=null&&Ie.tableFilter&&((S=le.analyzeSplitToContent(Ie==null?void 0:Ie.tableFilter,","))==null||S.forEach(Je=>{Je!=null&&Je.includes("@ShowHide=Hide")&&de.push("HideGroup=Yes")}));let Ce=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Ce)||(Ce=Ce?[Ce]:[]),Ce=[...Ce,...de],{key:"Table",name:Ie==null?void 0:Ie.groupName,tableColumns:Ie==null?void 0:Ie.tableColumns,assistColumn:Ie==null?void 0:Ie.columns,tableContents:l===1?Ie==null?void 0:Ie.tableContents:(b=(x=Ie==null?void 0:Ie.tableContents)==null?void 0:x[r])!=null&&b.every(Je=>Array.isArray(Je))?(_=Ie==null?void 0:Ie.tableContents)==null?void 0:_[r]:[(I=Ie==null?void 0:Ie.tableContents)==null?void 0:I[r]],filter:Ie==null?void 0:Ie.tableFilter,menuFilter:Ce,quotePage:Me!==""?((X=(re=(R=Me==null?void 0:Me.replace("*",or))==null?void 0:R.split(or))==null?void 0:re[0])==null?void 0:X.replaceAll(":","/"))??"":void 0,quoteGroup:Me!==""?((ve=(ae=(Z=(q=(U=(fe=(ye=Me==null?void 0:Me.replace("*",or))==null?void 0:ye.split(or))==null?void 0:fe[1])==null?void 0:U.replace("{",or))==null?void 0:q.split(or))==null?void 0:Z[0])==null?void 0:ae.split(":"))==null?void 0:ve.filter(Je=>Je!==""))??[]:[],relatedQuotes:Ie==null?void 0:Ie.relatedQuotes,fatherSyncContents:Ie==null?void 0:Ie.fatherSyncContents,sonSyncContents:Ie==null?void 0:Ie.sonSyncContents,calculatorFilters:(Ie==null?void 0:Ie.calculatorFilters)??[]}}else{let Ie=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Me=i==null?void 0:i[0];Me=Me==null?void 0:Me.slice(1,Me==null?void 0:Me.length),Me=le.analyzeSplitToContent(Me,":"),Me=Me==null?void 0:Me[(Me==null?void 0:Me.length)-1];let de=[];de.push("1");let Ce=Me==null?void 0:Me.replace("(",or);Ce=(ze=Ce==null?void 0:Ce.split(or))==null?void 0:ze[0],de.push(Ce);let Je=Me==null?void 0:Me.replace("(",or);if(Je=(te=Je==null?void 0:Je.split(or))==null?void 0:te[1],Je=(se=(N=Je==null?void 0:Je.replace(")",or))==null?void 0:N.split(or))==null?void 0:se[0],(ue=(W=Je==null?void 0:Je.replace(",",or))==null?void 0:W.split(or))==null||ue.forEach(Ea=>{de.push(Ea)}),de.push(""),de.push(""),(_e=de==null?void 0:de[2])!=null&&_e.includes(".xlsx")||(we=de==null?void 0:de[2])!=null&&we.includes(".xls"))try{let Ea=cp+"/"+(de==null?void 0:de[2]),Ge=await sp(Ea),$=`生成js函数名称为${de==null?void 0:de[1]}的函数,规则为:`+(de==null?void 0:de[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((Ge==null?void 0:Ge.status)===200){let V=Ge==null?void 0:Ge.data;const ee=new FormData;ee.append("file",V,de==null?void 0:de[2]),ee.append("query",$);let ce=await pc(ee);ce=(j=(la=(Ke=ce==null?void 0:ce.data)==null?void 0:Ke.data)==null?void 0:la.response)==null?void 0:j.replace("generateResult",de==null?void 0:de[1]),de[de.length-2]=ce,de[de.length-1]=[{name:(Oe=(We=de==null?void 0:de[2])==null?void 0:We.split("."))==null?void 0:Oe[0],url:Ea}]}}catch{}return de=[de],{key:"Method",name:[],tableContents:de,tableColumns:Ie}}},dp=(a,l)=>{var n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea;let r=(i=(n=le.analyzeSplitToContent(a,"="))==null?void 0:n.filter(Ge=>Ge!=="="))==null?void 0:i.map(Ge=>((Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="="&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),Ge));if(_t(r==null?void 0:r[1])||_t(r==null?void 0:r[0])){let Ge=yp(r);if(Ge!=null&&Ge.formContents){let he=(o=Ge==null?void 0:Ge.filter)==null?void 0:o.join(","),ca=[];(p=Ge==null?void 0:Ge.hideContents)==null||p.forEach(ga=>{if(ga){const Ta=ga;Ta&&ca.push(`(HideGroup=Yes, prop=${Ta})`)}});let ia=(c=Ge==null?void 0:Ge.formContents)==null?void 0:c.filter(ga=>{var Ta;return(Ta=ga==null?void 0:ga.filters)==null?void 0:Ta.includes("@ShowHide=Hide")});(ia==null?void 0:ia.length)>0&&(ia==null||ia.forEach(ga=>{if(ga){const Ta=ga==null?void 0:ga.prop;Ta&&ca.push(`(Hide=Yes, prop=${Ta})`)}}));let Ve=(l==null?void 0:l.menuFilter)??[];return Array.isArray(Ve)||(Ve=Ve?[Ve]:[]),Ve=[...Ve,...ca],he===""&&((u=Ge==null?void 0:Ge.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Ge==null?void 0:Ge.groupName,value:Ge==null?void 0:Ge.formContents,contents:[Ge==null?void 0:Ge.contents],filter:"("+he+")",menuFilter:Ve,groupFilter:Ge==null?void 0:Ge.groupFilters,calculatorFilters:Ge==null?void 0:Ge.calculatorFilters}}let $=(y=(g=(m=Ge==null?void 0:Ge.filter)==null?void 0:m.replace("@",or))==null?void 0:g.split(or))==null?void 0:y[0],V=(w=(A=(d=Ge==null?void 0:Ge.filter)==null?void 0:d.replace("(",or))==null?void 0:A.split(or))==null?void 0:w[1],ee=(P=(D=(Y=Ge==null?void 0:Ge.filter)==null?void 0:Y.replace("(",or))==null?void 0:D.split(or))==null?void 0:P[0];ee="@"+((O=ee==null?void 0:ee.split("@"))==null?void 0:O[1]),V=V==null?void 0:V.slice(0,(V==null?void 0:V.length)-1),V=(S=(E=le.analyzeSplitToContent(V,","))==null?void 0:E.map(he=>(he=ee+he,he)))==null?void 0:S.join("");let ce=$+"("+V+")";return{key:"Form",name:Ge==null?void 0:Ge.group,filter:ce,formPage:((_=(b=(x=$==null?void 0:$.replace("*",or))==null?void 0:x.split(or))==null?void 0:b[0])==null?void 0:_.replaceAll(":","/"))??"",formGroup:((U=(fe=(ye=(X=(re=(R=(I=$==null?void 0:$.replace("*",or))==null?void 0:I.split(or))==null?void 0:R[1])==null?void 0:re.replace("{",or))==null?void 0:X.split(or))==null?void 0:ye[0])==null?void 0:fe.split(":"))==null?void 0:U.filter(he=>he!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter,contents:[]}}else{let Ge=r==null?void 0:r.filter((ia,Ve)=>Ve!==0);Ge=Ge==null?void 0:Ge.join("");let $=mc(r,l,Ge),V="";(q=$==null?void 0:$.tableFilter)!=null&&q.includes(or)?$.tableFilter=(Z=$==null?void 0:$.tableFilter)==null?void 0:Z.replace(or,""):V=(ze=(ve=(ae=$==null?void 0:$.tableFilter)==null?void 0:ae.replace("(",or))==null?void 0:ve.split(or))==null?void 0:ze[0];let ee=(se=(N=(te=$==null?void 0:$.tableFilter)==null?void 0:te.replace("(",or))==null?void 0:N.split(or))==null?void 0:se[0];ee=[{menus:(ue=(W=ee==null?void 0:ee.split("*"))==null?void 0:W[0])==null?void 0:ue.replaceAll(":","/"),groups:((we=(_e=ee==null?void 0:ee.split("*"))==null?void 0:_e[1])==null?void 0:we.split(":"))??[]}];let ce=(j=(la=(Ke=$==null?void 0:$.tableFilter)==null?void 0:Ke.replace("(",or))==null?void 0:la.split(or))==null?void 0:j[1];(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===")"&&(ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1));let he=[];$!=null&&$.tableFilter&&((We=le.analyzeSplitToContent($==null?void 0:$.tableFilter,","))==null||We.forEach(ia=>{ia!=null&&ia.includes("@ShowHide=Hide")&&he.push("HideGroup=Yes")}));let ca=(l==null?void 0:l.menuFilter)??[];return Array.isArray(ca)||(ca=ca?[ca]:[]),ca=[...ca,...he],{key:"Table",name:$==null?void 0:$.groupName,filter:$==null?void 0:$.tableFilter,tableColumns:$==null?void 0:$.tableColumns,tableContents:$==null?void 0:$.tableContents,quotePage:V!==""?((Me=(Ie=(Oe=V==null?void 0:V.replace("*",or))==null?void 0:Oe.split(or))==null?void 0:Ie[0])==null?void 0:Me.replaceAll(":","/"))??"":void 0,quoteGroup:V!==""?((Ea=(Je=(Ce=(de=V==null?void 0:V.replace("*",or))==null?void 0:de.split(or))==null?void 0:Ce[1])==null?void 0:Je.split(":"))==null?void 0:Ea.filter(ia=>ia!==""))??[]:[],menuFilter:ca,relatedQuotes:ee,fatherSyncContents:($==null?void 0:$.fatherSyncContents)??[],sonSyncContents:($==null?void 0:$.sonSyncContents)??[],calculatorFilters:($==null?void 0:$.calculatorFilters)??[]}}},pp=async(a,l)=>{let r=[],n=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(i,o)=>{let p=[];i=i==null?void 0:i.map(async c=>{var u,m;if(p.push(c),((u=le.analyzeSplitToContent(a,"="))==null?void 0:u.length)<=2){if(((m=le.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const g=await up(le.analyzeSplitToContent(a,"="),n,o,c);g&&p.push(g)}}else p.push(dp(a,c))}),await Promise.all(i),r.push(p)}),await Promise.all(l),r};let Wi="/",fp="$",Nn="$R";const fc=a=>{var r,n,i;let l="";if((a==null?void 0:a.length)>1){let o=a==null?void 0:a.filter((p,c)=>c!==0);o=o==null?void 0:o.join(""),o=le.analyzerSplitToWord(o,")"),(o==null?void 0:o.length)!==1?(o==null?void 0:o[(o==null?void 0:o.length)-1])===")"?o=o==null?void 0:o.join(""):o=(r=o==null?void 0:o.filter((p,c)=>c!==(o==null?void 0:o.length)-1))==null?void 0:r.join(""):o=o==null?void 0:o[0],l="("+o,((i=a==null?void 0:a[0])==null?void 0:i[((n=a==null?void 0:a[0])==null?void 0:n.length)-2])==="@"&&(l="@"+l)}return{filter:l}},hc=(a,l=[])=>{let r=(a==null?void 0:a.map(o=>{var p,c;return(c=o==null?void 0:o.key)==null?void 0:c.slice(1,(p=o==null?void 0:o.key)==null?void 0:p.length)}))??[],n=[];r==null||r.forEach(o=>{var p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye;if(o===""&&(o="算法库:通用算法"),o!=null&&o.includes(fp)){let fe="",U=!0,q=le.analyzerSplitToWord(o,"(");(q==null?void 0:q.length)>1&&(fe="("+((p=le.analyzerSplitToWord(q==null?void 0:q[1],")"))==null?void 0:p[0]),((u=q==null?void 0:q[0])==null?void 0:u[((c=q==null?void 0:q[0])==null?void 0:c.length)-2])==="@"&&(fe="@"+fe));let Z=o;Z=Z==null?void 0:Z.replace(fe,""),fe=vn(fe),fe=(m=le.analyzeSplitToContent(fe,","))==null?void 0:m.map(se=>((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)),fe!=null&&fe.includes("@ShowHide=Hide")&&(U=!1);let ae=(g=Z==null?void 0:Z.replace("$",Nn))==null?void 0:g.split(Nn),ve=ae==null?void 0:ae[1],ze=ae==null?void 0:ae[0];ze!=null&&ze.includes("[")&&(ze=(d=(y=ze==null?void 0:ze.replace("[",Nn))==null?void 0:y.split(Nn))==null?void 0:d[0],ve=ve+":["+((Y=(w=(A=ae==null?void 0:ae[0])==null?void 0:A.replace("[",Nn))==null?void 0:w.split(Nn))==null?void 0:Y[1])),ze=(P=(D=ze==null?void 0:ze.replaceAll(":","/"))==null?void 0:D.replaceAll("{",""))==null?void 0:P.replaceAll("}",""),(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])!=="/"&&(ze=ze+"/"),ve=((O=ze==null?void 0:ze.split("/"))==null?void 0:O[0])+":"+ve;let N="";if(!(ve!=null&&ve.includes("[")))N=ve==null?void 0:ve.replaceAll(":","/"),n==null||n.push({path:N,isShow:U,filter:fe,fatherPath:ze});else{let se=(S=(E=ve==null?void 0:ve.replace("[",Nn))==null?void 0:E.split(Nn))==null?void 0:S[1];se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1),se=(x=le.analyzeSplitToContent(se,","))==null?void 0:x.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])===","&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W)),se==null||se.forEach(W=>{var ue,_e;N=((_e=(ue=ve==null?void 0:ve.replace("[",Nn))==null?void 0:ue.split(Nn))==null?void 0:_e[0])+W,N=N==null?void 0:N.replaceAll(":","/"),n==null||n.push({path:N,isShow:U,filter:fe,fatherPath:ze})})}}else{let fe="",U=!0,q=le.analyzerSplitToWord(o,"(");(q==null?void 0:q.length)>1&&(fe=(b=fc(q))==null?void 0:b.filter);let Z=o;if(Z=Z==null?void 0:Z.replace(fe,""),(fe==null?void 0:fe[0])==="("){fe=fe==null?void 0:fe.slice(1,(fe==null?void 0:fe.length)-1);let ve=[];(_=le.analyzeSplitToContent(fe,","))==null||_.forEach(ze=>{(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])===","&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1)),(ze==null?void 0:ze[0])==="("&&(ze=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1)),(ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),ve.push(vn(ze))}),fe=ve==null?void 0:ve.join(",")}else fe=vn(fe);fe=(I=le.analyzeSplitToContent(fe,","))==null?void 0:I.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)),fe!=null&&fe.includes("@ShowHide=Hide")&&(U=!1),(Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])==="}"&&(Z=Z+":"),Z=(R=Z==null?void 0:Z.replaceAll("{",""))==null?void 0:R.replaceAll("}","");let ae="";if(Z!=null&&Z.includes("[")){let ve=(re=Z==null?void 0:Z.replace("[",Nn))==null?void 0:re.split(Nn),ze=ve==null?void 0:ve[1];ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1),(ye=(X=le.analyzeSplitToContent(ze,","))==null?void 0:X.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)))==null||ye.forEach(te=>{ae=(ve==null?void 0:ve[0])+te,ae=ae==null?void 0:ae.replaceAll(":","/"),n==null||n.push({path:ae,isShow:U,filter:fe})})}else ae=Z==null?void 0:Z.replaceAll(":","/"),n==null||n.push({path:ae,isShow:U,filter:fe})}});let i=M.cloneDeep(n);return(l==null?void 0:l.length)>0&&(i=l),i=i==null?void 0:i.filter(o=>{var p,c,u,m;return!(o!=null&&o.fatherPath)&&((c=(p=o==null?void 0:o.path)==null?void 0:p.split(Wi))==null?void 0:c.length)>1&&((m=(u=o==null?void 0:o.path)==null?void 0:u.split(Wi))==null?void 0:m[1])===""}),i=i==null?void 0:i.map(o=>{var p;return o.path=(p=o.path)==null?void 0:p.replace(Wi,""),o.path}),(i==null?void 0:i.length)>0&&(n=n==null?void 0:n.map(o=>{var c,u,m,g,y,d,A;let p=i==null?void 0:i.find(w=>{var Y;return(Y=o==null?void 0:o.path)==null?void 0:Y.includes(w)});return!(o!=null&&o.fatherPath)&&p&&!((c=o==null?void 0:o.path)!=null&&c.includes(Wi))&&!(i!=null&&i.find(w=>(o==null?void 0:o.path)===w))&&(o.path=p+Wi+((A=(m=(u=o==null?void 0:o.path)==null?void 0:u.split(p))==null?void 0:m[1])==null?void 0:A.slice(1,(d=(y=(g=o==null?void 0:o.path)==null?void 0:g.split(p))==null?void 0:y[1])==null?void 0:d.length))),o})),n},hp=(a,l)=>hc([{key:a}],l),vp=async(a,l)=>{const r=[],n=hp(a==null?void 0:a.key,l);return n&&(n==null?void 0:n.length)>0&&(n==null||n.forEach(o=>{r.push([{key:"path",value:o==null?void 0:o.path,parentPath:(o==null?void 0:o.parentPath)??"",isShow:o==null?void 0:o.isShow,menuFilter:o==null?void 0:o.filter}])})),await pp(a==null?void 0:a.value,r)};let vl="$R",Yi="[Any]";const mp=a=>{var n;let l=[],r=a;return(n=le.chunkArray(r))==null||n.forEach(i=>{var m,g,y,d,A;let o="",p=[],c="";(i==null?void 0:i.length)>1&&(c="@"+(i==null?void 0:i[0]),c=vn(c));let u=(i==null?void 0:i.length)===1?i==null?void 0:i[0]:i==null?void 0:i[1];u=u==null?void 0:u.slice(1,u==null?void 0:u.length),o=(g=(m=u==null?void 0:u.replace("(",vl))==null?void 0:m.split(vl))==null?void 0:g[0],u=(d=(y=u==null?void 0:u.replace("(",vl))==null?void 0:y.split(vl))==null?void 0:d[1],u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),p=(A=le.analyzeSplitToContent(u,","))==null?void 0:A.map(w=>((w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),w)),l.push({functionName:o,functionRelatedWords:p,calculatorFilter:c})}),l},yp=a=>{var r,n,i;let l={};if(((r=a==null?void 0:a[1])==null?void 0:r[0])==="&"){let o=a==null?void 0:a[0],p=a==null?void 0:a[1];p=le.analyzeSplitToContent(p,":"),p!=null&&p[1]&&(p==null?void 0:p[1])!==""&&(o=o+":"+(p==null?void 0:p[1])),p=p==null?void 0:p[0],p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1),p=[p],o=[o],o=vc(o),l.filter=o==null?void 0:o.filter,l.contents=o==null?void 0:o.contents,l.formContents=o==null?void 0:o.formContents,l.groupFilters=o==null?void 0:o.groupFilters,l.groupName=o==null?void 0:o.groupName,l.hideContents=o==null?void 0:o.hideContents,l.calculatorFilters=mp(p)??[]}else{let p=a==null?void 0:a[0];(p==null?void 0:p[0])==="*"&&(p=p==null?void 0:p.slice(1,p==null?void 0:p.length)),p=p==null?void 0:p.split(":"),l.group=p;let c=a==null?void 0:a[1],u;c!=null&&c.includes("{")?u=(i=(n=c==null?void 0:c.replaceAll("{",""))==null?void 0:n.replaceAll("}",""))==null?void 0:i.replaceAll(Yi,""):u=c==null?void 0:c.replaceAll(Yi,""),(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),l.filter=u}return l},vc=a=>{var d,A,w,Y,D,P;let l=[],r=[],n=[],i=[],o=[],p=[],c="",u=a==null?void 0:a[0];(u==null?void 0:u[0])==="*"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length));let m=le.analyzeSplitToContent(u,":");(d=m==null?void 0:m.filter(O=>(O==null?void 0:O[0])!=="{"&&(O==null?void 0:O[0])!=="["))==null||d.forEach(O=>{var S,x,b;(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));let E=le.analyzerSplitToWord(O,"(");if((E==null?void 0:E.length)>1){c=(S=fc(E))==null?void 0:S.filter;let _=O==null?void 0:O.replace(c,"");if(n.push(_),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let I=[];(x=le.analyzeSplitToContent(c,","))==null||x.forEach(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==null?void 0:R.slice(1,(R==null?void 0:R.length)-1)),(R==null?void 0:R[0])!=="@"&&(R="@"+R),I.push(vn(R))}),c=I==null?void 0:I.join(",")}else c=vn(c);c=(b=le.analyzeSplitToContent(c,","))==null?void 0:b.map(I=>((I==null?void 0:I[(I==null?void 0:I.length)-1])===","&&(I=I==null?void 0:I.slice(0,(I==null?void 0:I.length)-1)),I)),c!=null&&c.includes("@ShowHide=Hide")&&p.push(_),i=[...i,...c]}else n.push(E==null?void 0:E[0])});let g=(A=m==null?void 0:m.filter(O=>(O==null?void 0:O[0])==="{"))==null?void 0:A[0],y=(w=m==null?void 0:m.filter(O=>(O==null?void 0:O[0])==="["))==null?void 0:w[0];return l=Oi(y??""),l!=null&&l.every(O=>Array.isArray(O))&&(l=[l]),(g==null?void 0:g[(g==null?void 0:g.length)-1])===":"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),o=(Y=le.analyzeSplitToContent(g,"@"))==null?void 0:Y[1],o="@"+o,g=g==null?void 0:g.replace(o,""),o=vn(o),o=(D=le.analyzeSplitToContent(o,","))==null?void 0:D.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)),(g==null?void 0:g[0])==="{"&&(g=g==null?void 0:g.slice(1,(g==null?void 0:g.length)-1)),g=(P=le.analyzeSplitToContent(g,","))==null?void 0:P.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)),g==null||g.forEach((O,E)=>{var ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja;let S=[],x=[],b=[],_="",I="",R=!1,re,X=[],ye=[],fe=[],U="Input",q=[],Z=[];if(O!=null&&O.includes("==")){re=(ae=O==null?void 0:O.split("=="))==null?void 0:ae[0];let ta=(ve=O==null?void 0:O.split("=="))==null?void 0:ve[1],je="";((ze=le.analyzeSplitToContent(ta,"$"))==null?void 0:ze.length)>1&&((te=le.analyzeSplitToContent(ta,"$"))==null?void 0:te[0])!=="$"?(je=(N=le.analyzeSplitToContent(ta,"$"))==null?void 0:N[0],je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)):((se=le.analyzeSplitToContent(ta,"}"))==null?void 0:se.length)>1&&(je=(W=le.analyzeSplitToContent(ta,"}"))==null?void 0:W[1]);let ya=ta==null?void 0:ta.replace(je,"");if((je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),(ue=le.analyzeSplitToContent(je,","))==null||ue.forEach(Ze=>{var ne;(Ze==null?void 0:Ze[0])!=="@"&&(Ze="@"+Ze),(Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1));let Ae=vn(Ze);(ne=le.analyzeSplitToContent(Ae,","))==null||ne.forEach(pe=>{(pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])===","&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),S.push(pe)})}),(ya==null?void 0:ya[0])==="$"&&(ya=ya==null?void 0:ya.slice(1,ya==null?void 0:ya.length)),ya!=null&&ya.includes("&")){let Ze=ya;if((ya==null?void 0:ya[0])==="("){let ne=(_e=le.analyzeSplitToContent(ya,"&"))==null?void 0:_e.map(pe=>((pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])==="&"&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),pe));Ze=ne==null?void 0:ne[1],ne=ne==null?void 0:ne[0],(ne==null?void 0:ne[0])!=="@"&&(ne="@"+ne),_=vn(ne)}(Ze==null?void 0:Ze[0])==="&"&&(Ze=Ze==null?void 0:Ze.slice(1,Ze==null?void 0:Ze.length)),I=(Ke=(we=Ze==null?void 0:Ze.replace("(",vl))==null?void 0:we.split(vl))==null?void 0:Ke[0],b=(j=(la=Ze==null?void 0:Ze.replace("(",vl))==null?void 0:la.split(vl))==null?void 0:j[1],b=[b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)],U="Input"}else{let Ze=(We=ya==null?void 0:ya.replace("*",vl))==null?void 0:We.split(vl);X=(Oe=Ze==null?void 0:Ze[0])==null?void 0:Oe.split(":"),ye=(Me=(Ie=le.analyzeSplitToContent(Ze==null?void 0:Ze[1],":"))==null?void 0:Ie.filter((Ae,ne)=>{var pe,ua;return ne!==((ua=(pe=Ze==null?void 0:Ze[1])==null?void 0:pe.split(":"))==null?void 0:ua.length)-1}))==null?void 0:Me.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)),fe=(Ce=(de=le.analyzeSplitToContent(Ze==null?void 0:Ze[1],":"))==null?void 0:de.filter((Ae,ne)=>{var pe,ua;return ne===((ua=(pe=Ze==null?void 0:Ze[1])==null?void 0:pe.split(":"))==null?void 0:ua.length)-1}))==null?void 0:Ce[0],fe=(Ea=(Je=fe==null?void 0:fe.replaceAll("{",""))==null?void 0:Je.replaceAll("}",""))==null?void 0:Ea.split(":"),U="Select"}if(re!=null&&re.includes("@")){let Ze=le.analyzeSplitToContent(re,"@");re=Ze==null?void 0:Ze[0],re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1),Ze="@"+(Ze==null?void 0:Ze[1]),Ze=vn(Ze),S=(Ge=le.analyzeSplitToContent(Ze,","))==null?void 0:Ge.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))}}else if((($=le.analyzeSplitToContent(O,"="))==null?void 0:$.length)>1)if(U="Select",re=(ee=(V=O==null?void 0:O.replace("=",vl))==null?void 0:V.split(vl))==null?void 0:ee[0],!(O!=null&&O.includes("If")))q=(he=(ce=O==null?void 0:O.replace("=",vl))==null?void 0:ce.split(vl))==null?void 0:he[1],q=q==null?void 0:q.split("||");else{let ta=(ia=(ca=O==null?void 0:O.replace("=",vl))==null?void 0:ca.split(vl))==null?void 0:ia[1];Z=(Ve=le.analyzeSplitToContent(ta,")"))==null?void 0:Ve.filter(je=>!(je!=null&&je.includes("If"))),Z=Z==null?void 0:Z.map(je=>((je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),je=je==null?void 0:je.split("||"),je)),x=(ga=le.analyzeSplitToContent(ta,")"))==null?void 0:ga.filter(je=>je==null?void 0:je.includes("If")),x=x==null?void 0:x.map(je=>((je==null?void 0:je[0])==="|"&&(je=je==null?void 0:je.slice(2,je==null?void 0:je.length)),(je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),(je==null?void 0:je[0])!=="@"&&(je="@"+je),je))}else if(((Ta=le.analyzeSplitToContent(O,"@"))==null?void 0:Ta.length)>1){re=(De=le.analyzeSplitToContent(O,"@"))==null?void 0:De[0],(re==null?void 0:re[(re==null?void 0:re.length)-1])==="@"&&(re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1));let ta="@"+((Fa=le.analyzeSplitToContent(O,"@"))==null?void 0:Fa[1]);ta=vn(ta),S=(Na=le.analyzeSplitToContent(ta,","))==null?void 0:Na.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])===","&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)),je)),S!=null&&S.find(je=>je==null?void 0:je.includes("@Type"))&&(U=(ja=(da=S==null?void 0:S.find(je=>je==null?void 0:je.includes("@Type")))==null?void 0:da.split("="))==null?void 0:ja[1])}else re=O;S!=null&&S.includes("@ShowHide=Hide")&&(R=!0),r.push({prop:re,label:re,value:"",menuPath:X,groups:ye,columns:fe,type:U,options:q,allContents:Z,filters:S,width:g==null?void 0:g.length,isFormColHidden:R,filterContents:x,functionName:I,functionRelatedWords:b,calculatorFilter:_})}),{groupName:n,groupFilters:i,formContents:r,contents:l,filter:o,hideContents:p}},Oi=a=>{var n,i;if(!a||typeof a!="string")return[];let l=[],r=a.slice(1,(a==null?void 0:a.length)-1);if((r==null?void 0:r[0])!=="[")(n=le.analyzeSplitToContent(r,","))==null||n.forEach(o=>{(o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o.slice(0,(o==null?void 0:o.length)-1)),l.push(o??"")}),(r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&l.push("");else{let o=[];(i=le.analyzeSplitToContent(r,","))==null||i.forEach(p=>{(p==null?void 0:p[(p==null?void 0:p.length)-1])===","&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),o.push(Oi(p))}),l=o}return l},St=(a,l)=>{var P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da;let r,n=[],i=[],o=[],p=[],c=[],u=[],m=[],g="Input",y,d="",A="",w="",Y=[],D="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(r=(P=a==null?void 0:a.split("=="))==null?void 0:P[0],y=(O=a==null?void 0:a.split("=="))==null?void 0:O[0],g="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((x=(S=(E=a==null?void 0:a.replace("=",vl))==null?void 0:E.split(vl))==null?void 0:S[1])!=null&&x.includes("If")))if(r=le.analyzeSplitToContent(a,"@"),r=r==null?void 0:r[0],(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=(_=(b=r==null?void 0:r.replace("=",vl))==null?void 0:b.split(vl))==null?void 0:_[0],r!=null&&r.includes("&")&&(r=(R=(I=r==null?void 0:r.replace("&",vl))==null?void 0:I.split(vl))==null?void 0:R[0]),y=r,((re=le.analyzeSplitToContent(a,"@"))==null?void 0:re.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Te=(X=le.analyzeSplitToContent(a,"@"))==null?void 0:X[1];if((Te==null?void 0:Te[0])!=="@"&&(Te="@"+Te),Te=vn(Te),A=Te,A!=null&&A.includes("@Type")){let Le=le.analyzeSplitToContent(A,",");Le=Le==null?void 0:Le.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)),Le=(ye=Le==null?void 0:Le.filter(Fe=>Fe==null?void 0:Fe.includes("@Type")))==null?void 0:ye[0],g=(fe=Le==null?void 0:Le.split("="))==null?void 0:fe[1],g==="File"&&(g="Upload")}else g="Input"}}else if(a!=null&&a.includes("||")){let Te=[];n=(Z=(q=(U=le.analyzeSplitToContent(a,"="))==null?void 0:U[1])==null?void 0:q.split("||"))==null?void 0:Z.map(Fe=>{var me,al,Qa,Tl;let Ne=Fe;if(Ne!=null&&Ne.includes("@")){let Rl="@"+((al=(me=Ne==null?void 0:Ne.replace("@",vl))==null?void 0:me.split(vl))==null?void 0:al[1]);Ne=(Tl=(Qa=Ne==null?void 0:Ne.replace("@",vl))==null?void 0:Qa.split(vl))==null?void 0:Tl[0],Rl=ai(Rl),Te.push(Rl)}return{label:Ne==null?void 0:Ne.replaceAll("'",""),value:Ne==null?void 0:Ne.replaceAll("'","")}}),(Te==null?void 0:Te.length)>0&&(A="("+(Te==null?void 0:Te.join("||"))+")");let Le=(ae=le.analyzeSplitToContent(a,"="))==null?void 0:ae[0];if(Le!=null&&Le.includes("@")){(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));let Fe=(ve=le.analyzeSplitToContent(Le,"@"))==null?void 0:ve[1];Fe="@"+Fe,Fe=ai(Fe),A=A===""?Fe:Fe+","+A}}else g="Input",d=(N=(te=(ze=a==null?void 0:a.replace("=",vl))==null?void 0:ze.split(vl))==null?void 0:te[1])==null?void 0:N.replaceAll("'","");else if((W=(se=le.analyzeSplitToContent(a,"="))==null?void 0:se[1])!=null&&W.includes("||")){let Te=(ue=le.analyzeSplitToContent(a,"="))==null?void 0:ue[0];if((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!=null&&Te.includes("@")){let me=(_e=le.analyzeSplitToContent(Te,"@"))==null?void 0:_e[1];me="@"+me,A=ai(me),r=(j=(we=le.analyzeSplitToContent(Te,"@"))==null?void 0:we[0])==null?void 0:j.slice(0,((la=(Ke=le.analyzeSplitToContent(Te,"@"))==null?void 0:Ke[0])==null?void 0:la.length)-1),y=(Me=(We=le.analyzeSplitToContent(Te,"@"))==null?void 0:We[0])==null?void 0:Me.slice(0,((Ie=(Oe=le.analyzeSplitToContent(Te,"@"))==null?void 0:Oe[0])==null?void 0:Ie.length)-1)}else r=Te,y=Te;let Le=(de=le.analyzeSplitToContent(a,"="))==null?void 0:de[1];Le=le.analyzeSplitToContent(Le,")");let Fe=Le==null?void 0:Le.filter(me=>!(me!=null&&me.includes("If")));Fe==null||Fe.forEach(me=>{(me==null?void 0:me[0])==="("&&(me=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1)),i==null||i.push(me==null?void 0:me.split("||"))});let Ne=Le==null?void 0:Le.filter(me=>me==null?void 0:me.includes("If"));Ne=Ne==null?void 0:Ne.map(me=>((me==null?void 0:me[0])==="|"&&(me==null?void 0:me[1])==="|"&&(me=me==null?void 0:me.slice(2,me==null?void 0:me.length)),(me==null?void 0:me[0])==="("&&(me=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1)),(me==null?void 0:me[0])!=="@"&&(me="@"+me),me)),o=Ne}else{let Te=a==null?void 0:a.split("=="),Le=(Ce=Te==null?void 0:Te.filter(Fe=>(Fe==null?void 0:Fe.includes("$"))&&(Fe==null?void 0:Fe[0])!=="{"))==null?void 0:Ce[0];if(Le&&!(Le!=null&&Le.includes("&"))){let Fe=(Ea=le.analyzeSplitToContent(Le,")"))==null?void 0:Ea[((Je=le.analyzeSplitToContent(Le,")"))==null?void 0:Je.length)-1],Ne=(Ge=Fe==null?void 0:Fe.replace("*",vl))==null?void 0:Ge.split(vl),me=(Ne==null?void 0:Ne[0])===""?l==null?void 0:l.value:Ne==null?void 0:Ne[0];(me==null?void 0:me[0])==="("&&(me=($=le.analyzeSplitToContent(me,")"))==null?void 0:$[1]),me=(ee=(V=me==null?void 0:me.replaceAll("{",""))==null?void 0:V.replaceAll("}",""))==null?void 0:ee.replaceAll(Yi,""),(me==null?void 0:me[0])==="$"&&(me=(ce=me==null?void 0:me.slice(1,me==null?void 0:me.length))==null?void 0:ce.replaceAll(":","/")),p=me==null?void 0:me.split("/");let al=(ca=(he=Ne==null?void 0:Ne[1])==null?void 0:he.replace("{",vl))==null?void 0:ca.split(vl),Qa=al==null?void 0:al[0];(Qa==null?void 0:Qa[(Qa==null?void 0:Qa.length)-1])===":"&&(Qa=Qa==null?void 0:Qa.slice(0,(Qa==null?void 0:Qa.length)-1)),c=Qa==null?void 0:Qa.split(":"),u=(Ta=(ga=(Ve=(ia=al==null?void 0:al[1])==null?void 0:ia.replace("}",vl))==null?void 0:Ve.split(vl))==null?void 0:ga[0])==null?void 0:Ta.split(":");let Tl="";((De=le.analyzeSplitToContent(Le,")"))==null?void 0:De.length)>1&&(Tl=(Fa=le.analyzeSplitToContent(Le,")"))==null?void 0:Fa[0]),Tl&&Tl!==""&&((Tl==null?void 0:Tl[0])!=="@"&&(Tl="@"+Tl),A=ai(Tl))}if(Te!=null&&Te.some(Fe=>Fe==null?void 0:Fe.includes("&"))){let Fe=(Na=Te==null?void 0:Te.filter(al=>al==null?void 0:al.includes("&")))==null?void 0:Na[0];Fe=(da=le.analyzeSplitToContent(Fe,"&"))==null?void 0:da.map(al=>((al==null?void 0:al[(al==null?void 0:al.length)-1])==="&"&&(al=al==null?void 0:al.slice(0,(al==null?void 0:al.length)-1)),al)),w=(je=(ta=(ja=Fe==null?void 0:Fe[1])==null?void 0:ja.replace("(",vl))==null?void 0:ta.split(vl))==null?void 0:je[0];let Ne=(ya=le.analyzeSplitToContent(Fe==null?void 0:Fe[1],")"))==null?void 0:ya[0];Ne=(Ae=(Ze=Ne==null?void 0:Ne.replace("(",vl))==null?void 0:Ze.split(vl))==null?void 0:Ae[1],Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1),(Ne==null?void 0:Ne[0])==="{"&&(Ne=Ne==null?void 0:Ne.slice(1,Ne==null?void 0:Ne.length)),(Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])==="}"&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Y=Ne==null?void 0:Ne.split(",");let me=Fe==null?void 0:Fe[0];me&&me!==""&&((me==null?void 0:me[0])!=="@"&&(me="@"+me),D=ai(me))}else if(!Le&&((ne=Te==null?void 0:Te.filter(Fe=>(Fe==null?void 0:Fe[0])==="{"))==null?void 0:ne.length)>0){let Fe=Te==null?void 0:Te[(Te==null?void 0:Te.length)-1];Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1),Fe=le.analyzeSplitToContent(Fe,","),Fe=Fe==null?void 0:Fe.map(Ne=>((Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])===","&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ne)),Fe=Fe==null?void 0:Fe.map(Ne=>{var me,al,Qa,Tl;if(Ne=Ne==null?void 0:Ne.replaceAll("$",""),Ne!=null&&Ne.includes("{")){let Rl="";Ne=Ne==null?void 0:Ne.replaceAll("{","");let Al=Ne==null?void 0:Ne.split("}");Rl=((al=(me=Al==null?void 0:Al[0])==null?void 0:me.split(":"))==null?void 0:al[0])+":"+(Al==null?void 0:Al[1]),Ne=Rl,Ne=Ne+":"}if(Ne!=null&&Ne.includes(Yi)){let Rl="",Al=Ne==null?void 0:Ne.split(Yi);Rl=((Tl=(Qa=Al==null?void 0:Al[0])==null?void 0:Qa.split(":"))==null?void 0:Tl[0])+":"+(Al==null?void 0:Al[1]),Ne=Rl,Ne=Ne+":"}return Ne=Ne==null?void 0:Ne.replaceAll(":","/"),Ne}),m=Fe}else!((pe=Te==null?void 0:Te[1])!=null&&pe.includes("$"))&&((ua=Te==null?void 0:Te[1])==null?void 0:ua[0])!=="("&&u.push(Te==null?void 0:Te[1])}else r=(Qe=a==null?void 0:a.split("&"))==null?void 0:Qe[0],y=(Da=a==null?void 0:a.split("&"))==null?void 0:Da[0];return(n==null?void 0:n.length)===0&&(i==null?void 0:i.length)===0&&(p==null?void 0:p.length)===0&&g==="Select"&&(g="Input"),{label:r,prop:y,options:n,allContents:i,filterContents:o,menus:p,groups:c,words:u,align:"center",formType:g,filter:A,functionName:w,functionRelatedWords:Y,calculatorFilter:D,relatedPages:m,value:d}},Bo=(a,l)=>{var n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z;let r=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((p=(o=(i=(n=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:n.replace(":",vl))==null?void 0:i.split(vl))==null?void 0:o[0])!=null&&p.includes(","))){let ae=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),ve=(c=ae==null?void 0:ae.replace(":",vl))==null?void 0:c.split(vl);if(((u=le.analyzeSplitToContent(ve==null?void 0:ve[1],"="))==null?void 0:u.length)===1){let ze=ve==null?void 0:ve[0],te=[];(y=le.analyzeSplitToContent((g=ve==null?void 0:ve[1])==null?void 0:g.slice(1,((m=ve==null?void 0:ve[1])==null?void 0:m.length)-1),","))==null||y.forEach(N=>{var se,W;((se=le.analyzeSplitToContent(N,"="))==null?void 0:se.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)),te=[...te,...Bo(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)),te.push((W=Bo(N,l))==null?void 0:W[0]))}),r==null||r.push({label:ze,prop:ze,children:te,align:"center"})}else{let ze=[];if(((d=le.analyzeSplitToContent(ae,"="))==null?void 0:d.length)>=2){let N=(A=le.analyzeSplitToContent(ae,"="))==null?void 0:A[1],se=(w=le.analyzeSplitToContent(N,"/"))==null?void 0:w.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])==="/"&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W));ze=se==null?void 0:se.map(W=>(W=Oi(W),W))}let te=(S=(E=(O=(P=(D=(Y=ae==null?void 0:ae.replace("{",vl))==null?void 0:Y.split(vl))==null?void 0:D[1])==null?void 0:P.replace("}",vl))==null?void 0:O.split(vl))==null?void 0:E[0])==null?void 0:S.split(",");te==null||te.forEach((N,se)=>{(ze==null?void 0:ze.length)>0&&se===0?r==null||r.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:ze==null?void 0:ze.map(W=>{let ue={};return te==null||te.forEach((_e,we)=>{ue[_e]=W==null?void 0:W[we]}),ue}),options:ze==null?void 0:ze.map(W=>({label:W==null?void 0:W[0],value:W==null?void 0:W[0]})),mainKey:!0}):r==null||r.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((x=le.analyzeSplitToContent(a,"="))==null?void 0:x.length)===2&&((_=(b=le.analyzeSplitToContent(a,"="))==null?void 0:b[1])==null?void 0:_[0])==="["){let ae=[];if(((I=le.analyzeSplitToContent(a,"="))==null?void 0:I.length)>=2){let ze=(R=le.analyzeSplitToContent(a,"="))==null?void 0:R[1],te=(X=(re=le.analyzeSplitToContent(ze,"|"))==null?void 0:re.filter(N=>N!=="|"))==null?void 0:X.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));ae=te==null?void 0:te.map(N=>(N=Oi(N),N))}let ve=(fe=(ye=a==null?void 0:a.replace("}",vl))==null?void 0:ye.split(vl))==null?void 0:fe[0];ve=(U=ve==null?void 0:ve.slice(1,ve==null?void 0:ve.length))==null?void 0:U.split(","),ve==null||ve.forEach((ze,te)=>{(ae==null?void 0:ae.length)>0&&te===0?r==null||r.push({label:ze,prop:ze,align:"center",formType:"Select",relatedContents:ae==null?void 0:ae.map(N=>{let se={};return ve==null||ve.forEach((W,ue)=>{se[W]=N==null?void 0:N[ue]}),se}),options:ae==null?void 0:ae.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):r==null||r.push({label:ze,prop:ze,align:"center"})})}else(q=le.analyzeSplitToContent(a,","))==null||q.forEach(ae=>{var ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze;if((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==null?void 0:ae[0])==="{"){let Ae=le.analyzeSplitToContent(ae,"="),ne=Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1],pe=[],ua=[],Qe=[],Da="",Te="",Le=[],Fe=[],Ne=(ve=ne==null?void 0:ne.replace("*",vl))==null?void 0:ve.split(vl),me=(Ne==null?void 0:Ne[0])===""?l==null?void 0:l.value:Ne==null?void 0:Ne[0];me=le.analyzeSplitToContent(me,")");let al="";if((me==null?void 0:me.length)>1&&((ze=me==null?void 0:me[0])==null?void 0:ze[0])!=="&"&&(al=me==null?void 0:me[0],(al==null?void 0:al[0])!=="@"&&(al="@"+al),Te=al??""),me=(te=me==null?void 0:me.filter(ll=>(ll==null?void 0:ll[0])==="$"))==null?void 0:te[0],((N=le.analyzeSplitToContent(me,"}"))==null?void 0:N.length)>1&&((W=(se=le.analyzeSplitToContent(me,"}"))==null?void 0:se[1])==null?void 0:W[0])==="("&&(al=(ue=le.analyzeSplitToContent(me,"}"))==null?void 0:ue[1],(al==null?void 0:al[0])!=="@"&&(al="@"+al),Te!==""&&(Te=Te+","),Te=Te+al),(_e=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1))!=null&&_e.includes("$")||(me=(we=le.analyzeSplitToContent(me,"}"))==null?void 0:we[0]),(me==null?void 0:me[0])==="$"&&(me=(Ke=me==null?void 0:me.replace("{",""))==null?void 0:Ke.replace("}",":"),me=(la=me==null?void 0:me.slice(1,me==null?void 0:me.length))==null?void 0:la.replaceAll(":","/")),me!=null&&me.includes("$")){let ll=(j=me==null?void 0:me.split("$"))==null?void 0:j[0];ll=(We=ll==null?void 0:ll.split("/"))==null?void 0:We[0],me=ll+"/"+((Oe=me==null?void 0:me.split("$"))==null?void 0:Oe[1])+"/"}pe=(me==null?void 0:me.split("/"))??[];let Qa=(Me=(Ie=Ne==null?void 0:Ne[1])==null?void 0:Ie.replace("{",vl))==null?void 0:Me.split(vl);if((Je=(Ce=(de=Ne==null?void 0:Ne[1])==null?void 0:de.split("(@"))==null?void 0:Ce[0])!=null&&Je.includes("&&")||($=(Ge=(Ea=Ne==null?void 0:Ne[1])==null?void 0:Ea.split("@"))==null?void 0:Ge[0])!=null&&$.includes("&&")){let ll=(V=Ne==null?void 0:Ne[1])!=null&&V.includes("(@")?(he=(ce=(ee=Ne==null?void 0:Ne[1])==null?void 0:ee.split("(@"))==null?void 0:ce[0])==null?void 0:he.split("&&"):(Ve=(ia=(ca=Ne==null?void 0:Ne[1])==null?void 0:ca.split("@"))==null?void 0:ia[0])==null?void 0:Ve.split("&&");Le=ll==null?void 0:ll.map(Wa=>{var Hl,Jl;return(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(Jl=(Hl=Wa==null?void 0:Wa.replace("{",vl))==null?void 0:Hl.split(vl))==null?void 0:Jl[0],(Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])===":"&&(Wa=Wa==null?void 0:Wa.slice(0,(Wa==null?void 0:Wa.length)-1)),Wa=Wa==null?void 0:Wa.split(":"),Wa});let jl=[];ll==null||ll.forEach((Wa,Hl)=>{var Jl,ar;(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(ar=(Jl=Wa==null?void 0:Wa.replace("{",vl))==null?void 0:Jl.split(vl))==null?void 0:ar[1],(Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])==="}"&&(Wa=Wa==null?void 0:Wa.slice(0,(Wa==null?void 0:Wa.length)-1)),Wa=Wa==null?void 0:Wa.split(","),jl.push(Hl===0?(Wa==null?void 0:Wa.length)-1:Wa==null?void 0:Wa.length),Fe=[...Fe,...Wa]}),jl=(ga=le.prefixSum(jl))==null?void 0:ga.map(Wa=>Wa==null?void 0:Wa.total),Le=Le==null?void 0:Le.map((Wa,Hl)=>({number:jl==null?void 0:jl[Hl],contents:Wa}))}let Tl=Qa==null?void 0:Qa[0];(Tl==null?void 0:Tl[(Tl==null?void 0:Tl.length)-1])===":"&&(Tl=Tl==null?void 0:Tl.slice(0,(Tl==null?void 0:Tl.length)-1)),ua=(Tl==null?void 0:Tl.split(":"))??[],Qe=((Na=(Fa=(De=(Ta=Qa==null?void 0:Qa[1])==null?void 0:Ta.replace("}",vl))==null?void 0:De.split(vl))==null?void 0:Fa[0])==null?void 0:Na.split(","))??[];let Rl=(ja=Ae==null?void 0:Ae[0])==null?void 0:ja.slice(1,((da=Ae==null?void 0:Ae[0])==null?void 0:da.length)-2);Te&&Te!==""&&(Da=ai(Te));let Al=(ta=le.analyzeSplitToContent(Da,","))==null?void 0:ta.map(ll=>((ll==null?void 0:ll[(ll==null?void 0:ll.length)-1])===","&&(ll=ll==null?void 0:ll.slice(0,(ll==null?void 0:ll.length)-1)),ll)),Pl=[];Al!=null&&Al.find(ll=>ll==null?void 0:ll.includes("@MainParam"))&&(Al=Al==null?void 0:Al.find(ll=>ll==null?void 0:ll.includes("@MainParam")),Al=(ya=(je=Al==null?void 0:Al.replace("=",vl))==null?void 0:je.split(vl))==null?void 0:ya[1],Al=Al==null?void 0:Al.slice(1,(Al==null?void 0:Al.length)-1),Pl=le.analyzeSplitToContent(Al,",")),(Ze=Rl==null?void 0:Rl.split(","))==null||Ze.forEach((ll,jl)=>{var Wa,Hl,Jl,ar,bl,br;if(((Wa=le.analyzeSplitToContent(ll,"@"))==null?void 0:Wa.length)>1){let ka=(Hl=le.analyzeSplitToContent(ll,"@"))==null?void 0:Hl[1];ka="@"+ka,Da=ai(ka),ll=(Jl=le.analyzeSplitToContent(ll,"@"))==null?void 0:Jl[0],(ll==null?void 0:ll[(ll==null?void 0:ll.length)-1])==="@"&&(ll=ll==null?void 0:ll.slice(0,(ll==null?void 0:ll.length)-1))}r.push({label:ll,prop:ll,align:"center",menus:pe,groups:(Le==null?void 0:Le.length)===0?ua:(ar=Le==null?void 0:Le.find(ka=>(ka==null?void 0:ka.number)>=jl))==null?void 0:ar.contents,words:(Fe==null?void 0:Fe.length)===0?(bl=Qe==null?void 0:Qe[jl])==null?void 0:bl.split(":"):(br=Fe==null?void 0:Fe[jl])==null?void 0:br.split(":"),formType:(pe==null?void 0:pe.length)>0?"Select":"Input",mainKey:!!(jl===0||Pl!=null&&Pl.find(ka=>ka===ll)),filter:Da,isMainPath:(Le==null?void 0:Le.findIndex(ka=>(ka==null?void 0:ka.number)>=jl))===0})})}else r.push({label:ae,prop:ae,align:"center"})});else{let ae=(Z=le.analyzeSplitToContent(a,","))==null?void 0:Z.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));ae==null||ae.forEach(ve=>{r.push(St(ve,l))})}return r},gp=(a,l)=>{var p,c,u,m,g;let r=a;if(!a)return;let n="";((p=le.analyzeSplitToContent(a,"}"))==null?void 0:p.length)>1&&(r=(c=le.analyzeSplitToContent(a,"}"))==null?void 0:c[0],n=(u=le.analyzeSplitToContent(a,"}"))==null?void 0:u[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let i=[],o=[];return i.push({label:"排序",prop:"sort"}),i.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=le.analyzeSplitToContent(r,","))==null||m.forEach(y=>{var d;(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),(y==null?void 0:y[0])==="{"?(d=Bo(y,l))==null||d.forEach(A=>{i.push(A)}):i.push(St(y,l))}),i!=null&&i.some(y=>{var d;return(d=y==null?void 0:y.prop)==null?void 0:d.includes("@")})&&(i=i==null?void 0:i.filter(y=>{var d;return!((d=y==null?void 0:y.prop)!=null&&d.includes("@"))})),n!==""&&((n==null?void 0:n[0])=="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),(g=le.analyzeSplitToContent(n,","))==null||g.forEach(y=>{var d;(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),(y==null?void 0:y[0])==="{"?(d=Bo(y,l))==null||d.forEach(A=>{o.push(A)}):o.push(St(y,l))})),{columns:i,secondColumns:o}},vn=a=>{var l,r,n,i,o;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let p=(r=(l=a==null?void 0:a.replace("(",vl))==null?void 0:l.split(vl))==null?void 0:r[1],c=(i=(n=a==null?void 0:a.replace("(",vl))==null?void 0:n.split(vl))==null?void 0:i[0];return p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1),p=(o=le.analyzeSplitToContent(p,","))==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==null?void 0:u[0])==="("&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),c+u)),p=p==null?void 0:p.join(","),a!=null&&a.includes("@Quote")&&(p!=null&&p.includes("@QuoteType")||(p=p===""?p+"@QuoteType=Manual":p+",@QuoteType=Manual"),p!=null&&p.includes("@QuoteSonSync")||(p=p===""?p+"@QuoteSonSync=No":p+",@QuoteSonSync=No"),p!=null&&p.includes("@QuoteFatherSync")||(p=p===""?p+"@QuoteFatherSync=Yes":p+",@QuoteFatherSync=Yes")),p}},ys=a=>{let l=a==null?void 0:a.map(r=>{var n,i;return{menus:r==null?void 0:r.menus,content:((n=r==null?void 0:r.menus)==null?void 0:n.join("/"))+vl+((i=r==null?void 0:r.groups)==null?void 0:i.join("/"))}});return l=l==null?void 0:l.filter(r=>{var n;return(r==null?void 0:r.menus)&&((n=r==null?void 0:r.menus)==null?void 0:n.length)>0}),l=l==null?void 0:l.map(r=>r==null?void 0:r.content),l=[...new Set(l)],l=l==null?void 0:l.map(r=>{var n,i;return{menus:(n=r==null?void 0:r.split(vl))==null?void 0:n[0],groups:((i=r==null?void 0:r.split(vl))==null?void 0:i[1])??[]}}),l},gs=a=>{var r;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=(r=le.analyzeSplitToContent(l,","))==null?void 0:r.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==null?void 0:n[0])!=="@"&&(n="@"+n),(n==null?void 0:n[1])==="("&&(n=vn(n)),n)),l==null?void 0:l.join(",")},mc=(a,l,r="")=>{var E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae;let n=[],i=[],o=[],p="",c="",u="",m=[],g=[],y=[],d=[],A="";if(((E=a==null?void 0:a[0])==null?void 0:E[0])!=="*"&&((S=a==null?void 0:a[0])==null?void 0:S[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((b=a==null?void 0:a[0])==null?void 0:b[0])!=="*"&&((_=a==null?void 0:a[0])==null?void 0:_[0])!=="$"&&(p=(I=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:I[0],(p==null?void 0:p[0])!=="@"&&(p="@"+p),p=ai(p),u=(R=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:R[1],(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=u==null?void 0:u.replaceAll(":","/"));let Y=le.analyzeSplitToContent(a==null?void 0:a[0],":");if(n=(re=Y==null?void 0:Y.filter(ne=>(ne==null?void 0:ne[0])!=="{"&&(ne==null?void 0:ne[0])!=="["))==null?void 0:re.join(""),c=(X=a==null?void 0:a[0])==null?void 0:X.replace(n,""),(n==null?void 0:n[0])==="("&&(n=""),A=(ye=Y==null?void 0:Y.filter(ne=>(ne==null?void 0:ne[0])!=="["))==null?void 0:ye.join(""),A=(fe=a==null?void 0:a[0])==null?void 0:fe.replace(A,""),c=c==null?void 0:c.replace(A,""),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),((U=le.analyzeSplitToContent(c,"@"))==null?void 0:U.length)>1&&(p=(q=le.analyzeSplitToContent(c,"@"))==null?void 0:q[1],(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),p="@"+p,p=vn(p),c=(Z=le.analyzeSplitToContent(c,"@"))==null?void 0:Z[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((ae=le.analyzeSplitToContent(n,"@"))==null?void 0:ae.length)>1){p!==""&&(p=p+",");let ne=(ve=le.analyzeSplitToContent(n,"@"))==null?void 0:ve[1];ne="@"+ne,ne=vn(ne),p=p+ne,n=(ze=le.analyzeSplitToContent(n,"@"))==null?void 0:ze[0]}if((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=n===""?[]:n==null?void 0:n.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)),r!==""){let ne=(te=le.analyzeSplitToContent(r,")"))==null?void 0:te[0],pe=le.analyzeSplitToContent(r,")");pe=pe==null?void 0:pe.filter((Te,Le)=>Le!==(pe==null?void 0:pe.length)-1),pe=pe==null?void 0:pe.join("");let ua=(N=le.analyzeSplitToContent(r,"@"))==null?void 0:N[1];u=(W=(se=le.analyzeSplitToContent(r,"@"))==null?void 0:se[0])==null?void 0:W.replace(pe,""),(u==null?void 0:u[(u==null?void 0:u.length)-1])==="@"&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1));let Qe="";if(Qe=le.analyzeSplitToContent(r,")"),Qe=Qe==null?void 0:Qe.filter((Te,Le)=>Le!==0&&Le!==(Qe==null?void 0:Qe.length)-1),((ue=le.analyzeSplitToContent(r,"&"))==null?void 0:ue.length)>1&&(Qe==null?void 0:Qe.length)<2&&(ne="",u="",Qe=le.analyzeSplitToContent(r,")")),Qe!=null&&Qe.some(Te=>(Te==null?void 0:Te[0])===":")){let Te=(_e=Qe==null?void 0:Qe.filter(Le=>(Le==null?void 0:Le[0])===":"))==null?void 0:_e.join("");A=Te==null?void 0:Te.slice(1,Te==null?void 0:Te.length),Qe=Qe==null?void 0:Qe.filter(Le=>(Le==null?void 0:Le[0])!==":")}(Qe==null?void 0:Qe.length)>0&&((we=le.chunkArray(Qe))==null||we.forEach(Te=>{var al,Qa,Tl,Rl,Al;let Le="",Fe=[],Ne="";(Te==null?void 0:Te.length)>1&&(Ne="@"+(Te==null?void 0:Te[0]),Ne=vn(Ne));let me=(Te==null?void 0:Te.length)===1?Te==null?void 0:Te[0]:Te==null?void 0:Te[1];me=me==null?void 0:me.slice(1,me==null?void 0:me.length),Le=(Qa=(al=me==null?void 0:me.replace("(",vl))==null?void 0:al.split(vl))==null?void 0:Qa[0],me=(Rl=(Tl=me==null?void 0:me.replace("(",vl))==null?void 0:Tl.split(vl))==null?void 0:Rl[1],me=me==null?void 0:me.slice(0,(me==null?void 0:me.length)-1),Fe=(Al=le.analyzeSplitToContent(me,","))==null?void 0:Al.map(Pl=>((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)),Pl)),m.push({functionName:Le,functionRelatedWords:Fe,calculatorFilter:Ne})})),ne=gs(ne),ua=gs(ua);let Da=ne??"";if(Da!==""&&(Da=Da+","),Da=Da+ua,(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!==""&&p!==""&&(p=p+","),p=p+Da,(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=(Ke=le.analyzeSplitToContent(u,":"))==null?void 0:Ke.filter((Te,Le)=>{var Fe;return!((Te==null?void 0:Te[0])==="{"&&Le===((Fe=le.analyzeSplitToContent(u,":"))==null?void 0:Fe.length)-1)}),u=u==null?void 0:u.join(""),(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)),p!=null&&p.includes("@Sync")||(p=p===""?p+"@Sync=(Yes,Yes)":p+",@Sync=(Yes,Yes)"),u!=null&&u.includes("$")){let Te=(j=(la=u==null?void 0:u.replace("*",vl))==null?void 0:la.split(vl))==null?void 0:j[1],Le=(Oe=(We=u==null?void 0:u.replace("*",vl))==null?void 0:We.split(vl))==null?void 0:Oe[0];Le=Le==null?void 0:Le.split("$"),Le=((Me=(Ie=Le==null?void 0:Le[0])==null?void 0:Ie.split(":"))==null?void 0:Me[0])+":"+(Le==null?void 0:Le[1])+":",u=Le+"*"+Te}else u=(de=u==null?void 0:u.replaceAll("{",""))==null?void 0:de.replaceAll("}","");(u==null?void 0:u[0])===":"&&(A=u==null?void 0:u.slice(1,u==null?void 0:u.length),u="")}p!==""&&p&&(p="("+p+")"),p=u+p,((Ce=le.analyzeSplitToContent(c,"}"))==null?void 0:Ce.length)>1&&(c=(Je=le.analyzeSplitToContent(c,"}"))==null?void 0:Je.filter(ne=>(ne==null?void 0:ne[0])!=="@"),c=c==null?void 0:c.join(""));let D=gp(c,l);o=c===""?[]:(D==null?void 0:D.columns)??[],d=le.getColumnChild(o);let P=le.getColumnChild(o);o!=null&&o.some(ne=>{var pe;return Array.isArray(ne==null?void 0:ne.children)&&((pe=ne==null?void 0:ne.children)==null?void 0:pe.length)>0})&&(o=[o]),i=A?Oi(A):[],!(i!=null&&i.every(ne=>Array.isArray(ne)))&&(i==null?void 0:i.length)>0&&(i=[i]),(i==null?void 0:i.length)>0&&(Array.isArray(i==null?void 0:i[0])&&((Ea=i==null?void 0:i[0])!=null&&Ea.every(ne=>Array.isArray(ne)))?i=i==null?void 0:i.map((ne,pe)=>(ne=ne.map((ua,Qe)=>(ua.unshift("{}"),ua.unshift((Qe+1).toString()),ua)),ne)):i=i==null?void 0:i.map((ne,pe)=>(ne.unshift("{}"),ne.unshift((pe+1).toString()),ne))),D!=null&&D.secondColumns&&((Ge=D==null?void 0:D.secondColumns)==null?void 0:Ge.length)>0&&((i==null?void 0:i.length)>0?i=i==null?void 0:i.map((ne,pe)=>{var ua,Qe;return Array.isArray(ne==null?void 0:ne[0])?ne=ne==null?void 0:ne.map((Da,Te)=>{var Le,Fe;return Da.unshift((Fe=(Le=D==null?void 0:D.secondColumns)==null?void 0:Le[Te])==null?void 0:Fe.prop),Da}):ne.unshift((Qe=(ua=D==null?void 0:D.secondColumns)==null?void 0:ua[pe])==null?void 0:Qe.prop),ne}):i=($=D==null?void 0:D.secondColumns)==null?void 0:$.map((ne,pe)=>(ne=[ne==null?void 0:ne.label],ne.push(pe),ne)),o.unshift({label:"",prop:"disabled",sortable:!1})),d=d==null?void 0:d.map(ne=>{var pe,ua;return{menus:ne==null?void 0:ne.menus,content:((pe=ne==null?void 0:ne.menus)==null?void 0:pe.join("/"))+vl+((ua=ne==null?void 0:ne.groups)==null?void 0:ua.join("/"))}});let O=[];if(((ee=(V=p==null?void 0:p.replace("(",vl))==null?void 0:V.split(vl))==null?void 0:ee[0])!==""&&(O=(he=(ce=p==null?void 0:p.replace("(",vl))==null?void 0:ce.split(vl))==null?void 0:he[0],O=[O],O=O==null?void 0:O.map(ne=>{var ua,Qe,Da;let pe=ne==null?void 0:ne.split("*");return{menus:(ua=pe==null?void 0:pe[0])==null?void 0:ua.split(":"),content:((Qe=pe==null?void 0:pe[0])==null?void 0:Qe.replaceAll(":","/"))+vl+((Da=pe==null?void 0:pe[1])==null?void 0:Da.replaceAll(":","/"))}}),d=[...d,...O]),d=d==null?void 0:d.filter(ne=>{var pe;return(ne==null?void 0:ne.menus)&&((pe=ne==null?void 0:ne.menus)==null?void 0:pe.length)>0}),d=d==null?void 0:d.map(ne=>ne==null?void 0:ne.content),d=[...new Set(d)],d=d==null?void 0:d.map(ne=>{var pe,ua;return{menus:(pe=ne==null?void 0:ne.split(vl))==null?void 0:pe[0],groups:((ua=ne==null?void 0:ne.split(vl))==null?void 0:ua[1])??[]}}),g=P==null?void 0:P.filter(ne=>{var pe;return(ne==null?void 0:ne.filter)&&((pe=ne==null?void 0:ne.filter)==null?void 0:pe.includes("@Sync"))}),(g==null?void 0:g.length)>0&&(g=g==null?void 0:g.filter(ne=>{var pe,ua,Qe,Da;return(Da=(Qe=(ua=(pe=le.analyzeSplitToContent(ne==null?void 0:ne.filter,","))==null?void 0:pe.find(Te=>Te==null?void 0:Te.includes("@Sync")))==null?void 0:ua.split(","))==null?void 0:Qe[0])==null?void 0:Da.includes("Yes")}),g=ys(g)),y=P==null?void 0:P.filter(ne=>{var pe;return(ne==null?void 0:ne.filter)&&((pe=ne==null?void 0:ne.filter)==null?void 0:pe.includes("@Sync"))}),(y==null?void 0:y.length)>0&&(y=y==null?void 0:y.filter(ne=>{var pe,ua,Qe,Da;return(Da=(Qe=(ua=(pe=le.analyzeSplitToContent(ne==null?void 0:ne.filter,","))==null?void 0:pe.find(Te=>Te==null?void 0:Te.includes("@Sync")))==null?void 0:ua.split(","))==null?void 0:Qe[1])==null?void 0:Da.includes("Yes")}),y=ys(y)),p!==""&&(p!=null&&p.includes("@Sync"))&&(p==null?void 0:p[0])!=="("){let ne=(ca=p==null?void 0:p.replace("(",vl))==null?void 0:ca.split(vl),pe=ne==null?void 0:ne[1];if(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1),pe=le.analyzeSplitToContent(pe,","),(ga=(Ve=(ia=pe==null?void 0:pe.find(ua=>ua==null?void 0:ua.includes("@Sync")))==null?void 0:ia.split(","))==null?void 0:Ve[0])!=null&&ga.includes("Yes")){let ua=ne==null?void 0:ne[0];ua=[{menus:(De=(Ta=ua==null?void 0:ua.split("*"))==null?void 0:Ta[0])==null?void 0:De.replaceAll(":","/"),groups:((Na=(Fa=ua==null?void 0:ua.split("*"))==null?void 0:Fa[1])==null?void 0:Na.split(":"))??[]}],g=[...g,...ua]}if((ta=(ja=(da=pe==null?void 0:pe.find(ua=>ua==null?void 0:ua.includes("@Sync")))==null?void 0:da.split(","))==null?void 0:ja[1])!=null&&ta.includes("Yes")){let ua=ne==null?void 0:ne[0];ua=[{menus:(ya=(je=ua==null?void 0:ua.split("*"))==null?void 0:je[0])==null?void 0:ya.replaceAll(":","/"),groups:((Ae=(Ze=ua==null?void 0:ua.split("*"))==null?void 0:Ze[1])==null?void 0:Ae.split(":"))??[]}],y=[...y,...ua]}}return{groupName:n,tableColumns:o,tableFilter:p,tableContents:i,columns:(D==null?void 0:D.secondColumns)??[],relatedQuotes:d,fatherSyncContents:g,sonSyncContents:y,calculatorFilters:m}},yc=(a,l)=>(a=a==null?void 0:a.map((r,n)=>{var i,o,p,c;if(Array.isArray(r))r=r==null?void 0:r.map(u=>{var m,g,y,d;return u!=null&&u.isMainPath||(((m=u==null?void 0:u.children)==null?void 0:m.length)>0?u.children=yc(u.children,l):((g=u==null?void 0:u.menus)==null?void 0:g.length)>0&&!((y=r==null?void 0:r[0])!=null&&y.isMainPath)&&(u.menus=(d=u.menus)==null?void 0:d.map((A,w)=>{var Y,D;return((Y=u.menus)==null?void 0:Y.length)-1===w&&A===""&&(l==null?void 0:l.parentContent)+"/"!==((D=u.menus)==null?void 0:D.join("/"))&&(A=l==null?void 0:l.value),u}),u.bindMenus=u.menus)),u});else{if(n===0&&((i=r.menus)==null?void 0:i.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((o=r.menus)==null?void 0:o.length)>0&&!((p=a==null?void 0:a[0])!=null&&p.isMainPath)&&(r.menus=(c=r.menus)==null?void 0:c.map((u,m)=>{var g,y;return((g=r.menus)==null?void 0:g.length)-1===m&&u===""&&(l==null?void 0:l.parentContent)+"/"!==((y=r.menus)==null?void 0:y.join("/"))&&(u=l==null?void 0:l.value),u}),r.bindMenus=r.menus)}return r}),a),bp=(a,l)=>(a=a==null?void 0:a.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=yc(r.contents,l)),r)),a),Et=(a,l)=>{let r=a;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(n=>(n=Et(n,l),n)):r=r==null?void 0:r.map(n=>{var i,o;return n!=null&&n.children&&((i=n==null?void 0:n.children)==null?void 0:i.length)>0?n.children=Et(n==null?void 0:n.children,l):n!=null&&n.words&&((o=n==null?void 0:n.words)==null?void 0:o.length)>0&&(l!=null&&l.find(p=>{var c,u,m,g;return((g=(c=n==null?void 0:n.prop)==null?void 0:c.split("."))==null?void 0:g[((m=(u=n==null?void 0:n.prop)==null?void 0:u.split("."))==null?void 0:m.length)-1])===p}))&&(n.mainKey=!0),n}),r};let Br="$R";const kp=M.useUnit(M.pinia),{selectTitle:kn}=M.storeToRefs(kp),xp=M.useMenuState(M.pinia),{localFiles:wp}=M.storeToRefs(xp),_p=M.useLoginState(M.pinia),{loginUserInfo:yt}=M.storeToRefs(_p),An=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@ShowHide",value:"onShowHide",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:"@MainParam",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:"@ColumnNum",value:"onColumnNum",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 fi=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(fi||{});const Sp=async a=>{var r,n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O;let l=le.analyzeSplitToContent((a==null?void 0:a.filter)??"",")");if((l==null?void 0:l.length)>1){let E=l==null?void 0:l[0];E=E==null?void 0:E.slice(1,(E==null?void 0:E.length)-1),E=(n=(r=E==null?void 0:E.replace("(",Br))==null?void 0:r.split(Br))==null?void 0:n[1],E="("+((i=E==null?void 0:E.replaceAll("{",""))==null?void 0:i.replaceAll("}",""));let S=le.calculatorAndToOr(E),x=Object.keys(S==null?void 0:S[0]);if(E=S,((o=x==null?void 0:x[0])==null?void 0:o[0])==="$"){let b=(c=x==null?void 0:x[0])==null?void 0:c.slice(1,((p=x==null?void 0:x[0])==null?void 0:p.length)-1),_=(m=(u=b==null?void 0:b.split("*"))==null?void 0:u[0])==null?void 0:m.replaceAll(".","/"),I=(d=(y=(g=b==null?void 0:b.split("*"))==null?void 0:g[1])==null?void 0:y.split("."))==null?void 0:d[0],R=await Hr(_,!1);R=(A=R==null?void 0:R.filter(U=>(U==null?void 0:U.name)===I))==null?void 0:A[0];let re=(Y=(w=R==null?void 0:R.compData)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:Y.contents;E=E==null?void 0:E.map(U=>{var Z,ae;let q={};for(let ve in U)if((ve==null?void 0:ve[0])==="$"){let ze=(ae=ve==null?void 0:ve.split("."))==null?void 0:ae[((Z=ve==null?void 0:ve.split("."))==null?void 0:Z.length)-1];q[ze]=U==null?void 0:U[ve]}else q[ve]=U==null?void 0:U[ve];return q});let X=(P=(D=R==null?void 0:R.compData)==null?void 0:D.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:P.contents;X=(O=le.getEqualChild(X))==null?void 0:O.filter(U=>(U==null?void 0:U.label)!=="操作");let fe=le.tableToForm(re,X);if(E==null||E.forEach(U=>{var q,Z,ae,ve,ze;for(let te in U)(U==null?void 0:U[te])==="LoginUser"&&(U[te]=((q=yt.value)==null?void 0:q.姓名)||((Z=yt.value)==null?void 0:Z.account)||((ae=yt.value)==null?void 0:ae.账号)),!((ve=fe==null?void 0:fe[0])!=null&&ve.find(N=>{var se;return(N==null?void 0:N.key)===te||((se=N==null?void 0:N.key)==null?void 0:se.includes(te))}))&&!(fe!=null&&fe.find(N=>{var se;return(N==null?void 0:N.key)===te||((se=N==null?void 0:N.key)==null?void 0:se.includes(te))}))||(((ze=U[te])==null?void 0:ze[0])!=="!"?fe=fe==null?void 0:fe.filter(N=>{var se,W;return((se=N==null?void 0:N.find(ue=>{var _e;return(ue==null?void 0:ue.key)===te||((_e=ue==null?void 0:ue.key)==null?void 0:_e.includes(te))}))==null?void 0:se.value)===U[te]||Array.isArray(U==null?void 0:U[te])&&((W=U==null?void 0:U[te])==null?void 0:W.find(ue=>{var _e;return((_e=N==null?void 0:N.find(we=>{var Ke;return(we==null?void 0:we.key)===te||((Ke=we==null?void 0:we.key)==null?void 0:Ke.includes(te))}))==null?void 0:_e.value)===ue}))}):fe=fe==null?void 0:fe.filter(N=>{var se;return((se=N==null?void 0:N.find(W=>{var ue;return(W==null?void 0:W.key)===te||((ue=W==null?void 0:W.key)==null?void 0:ue.includes(te))}))==null?void 0:se.value)!==U[te]}))}),(fe==null?void 0:fe.length)===0){let U=a==null?void 0:a.contents;return U.push({key:"hideContents",contents:!0}),U}}}return a==null?void 0:a.contents},Ep=a=>{var l,r,n,i,o;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let p=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=le.analyzeSplitToContent(c,","))==null?void 0:l.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));let u=(c==null?void 0:c[2])??"Center",m=(c==null?void 0:c[0])??"Picture";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=(r=le.analyzeSplitToContent(c,","))==null?void 0:r.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));let g=(o=(i=(n=wp.value)==null?void 0:n.filter(y=>{var d;return(y==null?void 0:y.path)===((d=a==null?void 0:a.groupName)==null?void 0:d[0])}))==null?void 0:i[0])==null?void 0:o.children;return g=(g==null?void 0:g.filter(y=>c==null?void 0:c.find(d=>d===(y==null?void 0:y.name))))??[],(c==null?void 0:c.length)>0&&(g==null?void 0:g.length)===0&&(c==null||c.forEach(y=>{g.push({url:"file:///"+(y==null?void 0:y.replaceAll("\\","/"))})})),g[0]={...g==null?void 0:g[0],position:u,fileType:m},p.push({key:"backGround",contents:g}),p}return a==null?void 0:a.contents},Cp=a=>{const l=bc(a==null?void 0:a.filter);return l?af(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},Dp=a=>{let l=parseInt(a==null?void 0:a.filter);l=1/l;let r=a==null?void 0:a.contents;return r.push({key:"rowPosition",contents:l}),r},Tp=a=>{const l=bc(a==null?void 0:a.filter);if(!l)return a==null?void 0:a.contents;let r=a==null?void 0:a.contents;return r.push({key:"numPosition",contents:l}),r},Bp=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 r=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(r)?a==null?void 0:a.filter:r}),l}return a==null?void 0:a.contents},Np=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},Ap=a=>{var r;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(n=>{var i;return(n==null?void 0:n.key)==="tableContents"&&(n.contents=(i=n.contents)==null?void 0:i.slice(0,parseInt(a==null?void 0:a.filter))),n})},zp=async a=>{var l,r,n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(Z=>((Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=le.shuffle(Z.contents)),Z));if((a==null?void 0:a.filter)==="Auto"){let q=(n=(r=a==null?void 0:a.contents)==null?void 0:r.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:n.contents;Array.isArray(q==null?void 0:q[0])&&(q=q==null?void 0:q[0]),q=le.getColumnChild(q);let Z=q==null?void 0:q.filter(ue=>(ue==null?void 0:ue.filter)&&(ue==null?void 0:ue.filter)!==""),ae=new Map,ve=[];Z==null||Z.forEach(ue=>{var _e,we;ae.get((_e=ue==null?void 0:ue.menus)==null?void 0:_e.join("/"))||(ae.set((we=ue==null?void 0:ue.menus)==null?void 0:we.join("/"),ue),ve.push(ue))});let ze=(o=(i=kn==null?void 0:kn.value)==null?void 0:i.find(ue=>(ue==null?void 0:ue.condition)==="child"))==null?void 0:o.value,te=ve==null?void 0:ve.map(ue=>{var _e,we,Ke;return ue=(_e=ue==null?void 0:ue.menus)==null?void 0:_e.join("/"),(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&((Ke=(we=kn==null?void 0:kn.value)==null?void 0:we.find(la=>(la==null?void 0:la.condition)==="child"))==null?void 0:Ke.parentContent)+"/"!==ue?ue=ue+ze:(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),ue}),N=ve==null?void 0:ve.map(ue=>ue==null?void 0:ue.groups),se=te==null?void 0:te.map(async ue=>{let _e=await Hr(ue,!1);return{path:ue,contents:_e}});se=await Promise.all(se);let W=se==null?void 0:se.map((ue,_e)=>{var Ke,la,j,We,Oe,Ie,Me;let we=(Ke=ue==null?void 0:ue.contents)==null?void 0:Ke.filter(de=>{var Ce,Je;return(de==null?void 0:de.name)===((Je=N==null?void 0:N[_e])==null?void 0:Je[((Ce=N==null?void 0:N[_e])==null?void 0:Ce.length)-1])});return we=(We=(j=(la=we==null?void 0:we[0])==null?void 0:la.compData)==null?void 0:j.find(de=>(de==null?void 0:de.key)==="tableContents"))==null?void 0:We.contents,(ue==null?void 0:ue.path)===((Ie=(Oe=kn==null?void 0:kn.value)==null?void 0:Oe.find(de=>(de==null?void 0:de.condition)==="child"))==null?void 0:Ie.parentContent)&&(we=((Me=we==null?void 0:we.map(de=>{for(let Ce in de)if(de[Ce]===ze)return de}))==null?void 0:Me.filter(de=>de))??[]),we??[]});if(W=W==null?void 0:W.map(ue=>(ue=ue==null?void 0:ue.map(_e=>{var Ke;let we={};for(let la in _e)if(Z!=null&&Z.find(j=>{var We,Oe;return((Oe=(We=j==null?void 0:j.words)==null?void 0:We[0])==null?void 0:Oe.replaceAll("'",""))===la})){let j=(Ke=Z==null?void 0:Z.find(We=>{var Oe,Ie;return((Ie=(Oe=We==null?void 0:We.words)==null?void 0:Oe[0])==null?void 0:Ie.replaceAll("'",""))===la}))==null?void 0:Ke.prop;we[j]=_e==null?void 0:_e[la]}return we}),ue)),W=le.cartesianProduct(W),Array.isArray(W==null?void 0:W[0])&&(W=W==null?void 0:W[0]),(W==null?void 0:W.length)>0&&((y=(c=(p=Z==null?void 0:Z[0])==null?void 0:p.menus)==null?void 0:c.join("/"))==null?void 0:y[((g=(m=(u=Z==null?void 0:Z[0])==null?void 0:u.menus)==null?void 0:m.join("/"))==null?void 0:g.length)-1])==="/")return(d=a==null?void 0:a.contents)==null?void 0:d.map(_e=>{var we;return(_e==null?void 0:_e.key)==="tableContents"&&(W==null?void 0:W.length)>0&&(_e.contents=((we=_e.contents)==null?void 0:we.length)>0?_e.contents:W),_e})}if((a==null?void 0:a.filter)==="Manual"){let q=[],Z=[],ae=(w=(A=a==null?void 0:a.contents)==null?void 0:A.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:w.contents;(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])===")"?ae=(D=(Y=ae==null?void 0:ae.replace("(",Br))==null?void 0:Y.split(Br))==null?void 0:D[0]:ae="",ae!==""&&(q=((O=(P=ae==null?void 0:ae.split("*"))==null?void 0:P[0])==null?void 0:O.split(":"))??[],Z=((_=(b=(x=(S=(E=ae==null?void 0:ae.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",Br))==null?void 0:x.split(Br))==null?void 0:b[0])==null?void 0:_.split(":"))??[]);let ve=(R=(I=a==null?void 0:a.contents)==null?void 0:I.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:R.contents;ve=(X=(re=ve==null?void 0:ve.replace("(",Br))==null?void 0:re.split(Br))==null?void 0:X[1],ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1);let ze=(ye=a==null?void 0:a.contents)==null?void 0:ye.map(N=>{var se,W,ue,_e,we,Ke,la,j,We;return(N==null?void 0:N.key)==="header"&&((se=N==null?void 0:N.contents)!=null&&se.every(Oe=>(Oe==null?void 0:Oe.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((W=N==null?void 0:N.contents)==null?void 0:W[0])?N.contents=(ue=N==null?void 0:N.contents)==null?void 0:ue.map((Oe,Ie)=>{var Me,de,Ce;return Oe!=null&&Oe.isMainPath||(Ie===0?(Oe.mainKey=!0,Oe.formType="Select",Oe.bindMenus=q,Oe.groups=((Me=Oe.groups)==null?void 0:Me.length)===0?Z:Oe.groups,Oe.words=((de=Oe.words)==null?void 0:de.length)===0?[Oe==null?void 0:Oe.prop]:Oe.words,Oe.filter=ve,(!(Oe!=null&&Oe.menus)||((Ce=Oe==null?void 0:Oe.menus)==null?void 0:Ce.length)===0)&&(Oe.menus=q)):(Oe.mainKey=!1,Oe.bindMenus=q)),Oe}):Array.isArray((_e=N==null?void 0:N.contents)==null?void 0:_e[0])&&((la=(Ke=(we=N==null?void 0:N.contents)==null?void 0:we[0])==null?void 0:Ke.filter(()=>(q==null?void 0:q.length)>0))==null?void 0:la.length)>0&&(N.contents[0]=(We=(j=N==null?void 0:N.contents)==null?void 0:j[0])==null?void 0:We.map((Oe,Ie)=>{var Me,de,Ce;return Oe!=null&&Oe.isMainPath||(Ie===0?(Oe.mainKey=!0,Oe.formType="Select",Oe.bindMenus=q,Oe.groups=((Me=Oe.groups)==null?void 0:Me.length)===0?Z:Oe.groups,Oe.words=((de=Oe.words)==null?void 0:de.length)===0?[Oe==null?void 0:Oe.prop]:Oe.words,Oe.filter=ve,(!(Oe!=null&&Oe.menus)||Array.isArray(Oe==null?void 0:Oe.menus)&&((Ce=Oe==null?void 0:Oe.menus)==null?void 0:Ce.length)===0)&&(q==null?void 0:q.length)>0&&(Oe.menus=q)):(Oe.mainKey=!1,Oe.bindMenus=q)),Oe}))),N}),te=(fe=ze==null?void 0:ze.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:fe.contents;if(Array.isArray(te==null?void 0:te[0])&&(te=te==null?void 0:te[0]),te=le.getColumnChild(te),te!=null&&te.some(N=>{var se,W;return((W=N==null?void 0:N.menus)==null?void 0:W[((se=N==null?void 0:N.menus)==null?void 0:se.length)-1])===""})){let N=(U=kn==null?void 0:kn.value)==null?void 0:U.find(se=>(se==null?void 0:se.condition)==="child");ze=bp(ze,N)}return ze}if((a==null?void 0:a.filter)==="Chart"){let q=a==null?void 0:a.contents;return q.push({key:"newType",contents:"Chart"}),q}if((a==null?void 0:a.filter)==="Carousel"){let q=a==null?void 0:a.contents;return q.push({key:"newType",contents:"Carousel"}),q}return a==null?void 0:a.contents},Mp=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},Ip=a=>{var n,i,o,p,c,u,m,g,y,d,A,w;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((i=(n=l==null?void 0:l.replace(":",Br))==null?void 0:n.split(Br))==null?void 0:i[1])),l=(o=l==null?void 0:l.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(c=(p=l==null?void 0:l.split("="))==null?void 0:p[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 Y=(u=l==null?void 0:l.split("="))==null?void 0:u[0],D=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(g=D==null?void 0:D.slice(1,D==null?void 0:D.length))!=null&&g.includes("$")&&(D=(A=(d=(y=kn==null?void 0:kn.value)==null?void 0:y.filter(P=>(P==null?void 0:P.condition)==="child"))==null?void 0:d[0])==null?void 0:A.value),l=Y+"="+D}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 r=le.calculatorAndToOr(l);if((r==null?void 0:r.length)>0){let Y=[];return r==null||r.forEach(P=>{let O={};for(let E in P){let S=E;S!=null&&S.includes("[")||(O[S]=P[E])}Y.push(O)}),(w=a==null?void 0:a.contents)==null?void 0:w.map(P=>{var E,S,x;let O=(S=(E=a==null?void 0:a.contents)==null?void 0:E.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:S.contents;if(O=(x=le.getEqualChild(O))==null?void 0:x.filter(b=>(b==null?void 0:b.label)!=="操作"),(P==null?void 0:P.key)==="tableContents"){let _=le.tableToForm(P==null?void 0:P.contents,O);Y==null||Y.forEach(I=>{var R,re;for(let X in I)!((R=_==null?void 0:_[0])!=null&&R.find(ye=>{var fe;return(ye==null?void 0:ye.key)===X||((fe=ye==null?void 0:ye.key)==null?void 0:fe.includes(X))}))&&!(_!=null&&_.find(ye=>{var fe;return(ye==null?void 0:ye.key)===X||((fe=ye==null?void 0:ye.key)==null?void 0:fe.includes(X))}))||(((re=I[X])==null?void 0:re[0])!=="!"?_=_==null?void 0:_.filter(ye=>{var fe,U;return((fe=ye==null?void 0:ye.find(q=>{var Z;return(q==null?void 0:q.key)===X||((Z=q==null?void 0:q.key)==null?void 0:Z.includes(X))}))==null?void 0:fe.value)===I[X]||Array.isArray(I==null?void 0:I[X])&&((U=I==null?void 0:I[X])==null?void 0:U.find(q=>{var Z;return((Z=ye==null?void 0:ye.find(ae=>{var ve;return(ae==null?void 0:ae.key)===X||((ve=ae==null?void 0:ae.key)==null?void 0:ve.includes(X))}))==null?void 0:Z.value)===q}))}):_=_==null?void 0:_.filter(ye=>{var fe;return((fe=ye==null?void 0:ye.find(U=>{var q;return(U==null?void 0:U.key)===X||((q=U==null?void 0:U.key)==null?void 0:q.includes(X))}))==null?void 0:fe.value)!==I[X]}))}),(_==null?void 0:_.length)===0?P.contents=[]:P.contents=_==null?void 0:_.map(I=>{let R={};return I==null||I.forEach(re=>{R[re==null?void 0:re.key]=re==null?void 0:re.value}),R})}return P})}return a==null?void 0:a.contents},Op=a=>a==null?void 0:a.contents,Lp=a=>a==null?void 0:a.contents,Rp=a=>{var l,r,n,i;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let o=(n=(r=a==null?void 0:a.filter)==null?void 0:r.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:n.split(",");return(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=Et(c.contents,o)),c))}return a==null?void 0:a.contents},$p=a=>{var r,n,i,o,p;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(n=(r=l==null?void 0:l.replace("(",Br))==null?void 0:r.split(Br))==null?void 0:n[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=(i=le.analyzeSplitToContent(c,","))==null?void 0:i.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));let u=c==null?void 0:c[0];(u==null?void 0:u[0])==="("&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1));let m=(c==null?void 0:c[1])??"Up",g=(o=a==null?void 0:a.contents)==null?void 0:o.map(y=>{var d,A;if(m==="Up"){if((y==null?void 0:y.key)==="extraButton"){let w=(d=u==null?void 0:u.split(","))==null?void 0:d.map(Y=>({label:Y,prop:Y}));y.contents=[...w??[],...y.contents]}}else if(m==="Line"&&(y==null?void 0:y.key)==="rowButton"){let w=(A=u==null?void 0:u.split(","))==null?void 0:A.map(Y=>({label:Y,prop:Y}));y.contents=[...w??[],...y.contents]}return y});if(m==="Bottom"||m==="Down"){let y=(p=u==null?void 0:u.split(","))==null?void 0:p.map(d=>({label:d,prop:d}));g.push({key:"bottomButton",contents:y})}return g}return a==null?void 0:a.contents},Vp=a=>a==null?void 0:a.contents,Fp=a=>{var r;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!==""?(r=a==null?void 0:a.contents)==null?void 0:r.map(i=>{var o;return(i==null?void 0:i.key)==="rowButton"&&(i.contents=(o=l==null?void 0:l.split(","))==null?void 0:o.map(p=>({label:p,prop:p}))),i}):a==null?void 0:a.contents},Pp=a=>{var r;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 n=a==null?void 0:a.contents,i=(r=l==null?void 0:l.split(","))==null?void 0:r.map(o=>({label:o,prop:o}));return n.push({key:"bottomButton",contents:i}),n}return a==null?void 0:a.contents},jp=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(r=>{var n;return(r==null?void 0:r.key)==="formContent"&&(r.contents=(n=r.contents)==null?void 0:n.map(i=>(i.isNoClick=!0,i))),r}),l!=null&&l.find(r=>(r==null?void 0:r.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(r=>(r==null?void 0:r.key)!=="extraButton"&&(r==null?void 0:r.key)!=="rowButton")),l}return a==null?void 0:a.contents},Hp=a=>{var l;if(a!=null&&a.filter){const r=parseInt(a==null?void 0:a.filter);return!r||Number.isNaN(r)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(o=i.contents)==null?void 0:o.map(p=>(p.width=r,p))),i})}return a==null?void 0:a.contents},Up=a=>{var l,r,n,i;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const o=parseInt(a==null?void 0:a.filter);return!o||Number.isNaN(o)?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(c=>{var u;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(u=c.contents)==null?void 0:u.map(m=>(m.width=o,m))),c})}if(((n=a==null?void 0:a.filter)==null?void 0:n[0])==="["){let o=Oi(a==null?void 0:a.filter),p=Array.isArray(o)?o.map(u=>parseInt(u)).filter(u=>!!u&&!Number.isNaN(u)):[];return p.length?(i=a==null?void 0:a.contents)==null?void 0:i.map(u=>{if((u==null?void 0:u.key)==="formContent"){const m=u.contents??[];u.contents=m.map((g,y)=>{const d=y+1;let A=0,w=0;for(let D=0;D<p.length;D++){if(w+=p[D],d<=w){A=D;break}D===p.length-1&&(A=p.length-1)}const Y=p[A]||p[p.length-1]||1;return g.width=Y,g})}return u}):a==null?void 0:a.contents}return a==null?void 0:a.contents},qp=a=>{var l;if((a==null?void 0:a.filter)!==""){let 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=r==null?void 0:r.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o,p,c;return(i==null?void 0:i.key)==="header"&&(Array.isArray((o=i==null?void 0:i.contents)==null?void 0:o[0])?i.contents[0]=(c=i.contents[0])==null?void 0:c.map(u=>(r!=null&&r.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u)):i.contents=(p=i.contents)==null?void 0:p.map(u=>(r!=null&&r.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u))),i})}return a==null?void 0:a.contents},Wp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const n=o=>(r!=null&&r.find(p=>p===(o==null?void 0:o.prop))&&(o.required=!0),o!=null&&o.children&&Array.isArray(o.children)&&(o.children=o.children.map(p=>n(p))),o);return(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var p,c,u;return(o==null?void 0:o.key)==="header"&&(Array.isArray((p=o==null?void 0:o.contents)==null?void 0:p[0])?o.contents[0]=(u=o.contents[0])==null?void 0:u.map(m=>n(m)):o.contents=(c=o.contents)==null?void 0:c.map(m=>n(m))),o})}return a==null?void 0:a.contents},Kp=async a=>{var n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E;const l=M.useUnit(M.pinia),{chooseTitle:r}=M.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let S=await Hr(((i=(n=r==null?void 0:r.value)==null?void 0:n[0])==null?void 0:i.parentContent)??((p=(o=r==null?void 0:r.value)==null?void 0:o[0])==null?void 0:p.relatedContent),!1),x=(u=(c=r==null?void 0:r.value)==null?void 0:c[0])==null?void 0:u.value;(g=(m=S==null?void 0:S[0])==null?void 0:m.compData)!=null&&g.find(R=>(R==null?void 0:R.key)==="header")?S=(y=S==null?void 0:S[0])==null?void 0:y.compData:S=(A=(d=S==null?void 0:S.filter(R=>{var re;return(re=R==null?void 0:R.compData)==null?void 0:re.find(X=>(X==null?void 0:X.key)==="header")}))==null?void 0:d[0])==null?void 0:A.compData;let b=(w=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:w.contents;Array.isArray(b==null?void 0:b[0])&&(b=b==null?void 0:b[0]),b=((Y=b==null?void 0:b.find(R=>R==null?void 0:R.isMainKey))==null?void 0:Y.prop)??((D=b==null?void 0:b[0])==null?void 0:D.prop);let _=(O=(P=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:P.contents)==null?void 0:O.find(R=>(R==null?void 0:R[b])===x);return(E=a==null?void 0:a.contents)==null?void 0:E.map(R=>{var re;return(R==null?void 0:R.key)==="formContent"&&(R.contents=(re=R.contents)==null?void 0:re.map(X=>(X.value=_==null?void 0:_[X==null?void 0:X.prop],X))),R})}return a==null?void 0:a.contents},Gp=a=>{var l,r,n,i,o;if((l=a==null?void 0:a.extra)!=null&&l.row){let p=a==null?void 0:a.filter;if(p!=null&&p.includes("*")&&(p="({"+((n=(r=p==null?void 0:p.replace("{",Br))==null?void 0:r.split(Br))==null?void 0:n[1])),p=(i=p==null?void 0:p.replaceAll("{",""))==null?void 0:i.replaceAll("}",""),(p==null?void 0:p[0])!=="("&&(p="("+p+")"),p.slice(1,(p==null?void 0:p.length)-1)==="undefined")return a==null?void 0:a.contents;let c=le.calculatorAndToOr(p),u=c==null?void 0:c[0],m=(o=a==null?void 0:a.extra)==null?void 0:o.row,g=[];for(let y in u)(u==null?void 0:u[y])===(m==null?void 0:m[y])?g.push(!0):g.push(!1);return g!=null&&g.every(y=>y===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Yp=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},Jp=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},Xp=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},Zp=a=>{var l;if(a!=null&&a.filter){let r=a==null?void 0:a.contents,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=(l=le.analyzeSplitToContent(n,","))==null?void 0:l.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),i)),r.push({key:"stepName",contents:n}),r}return a==null?void 0:a.contents},Qp=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},gc={onNumSlice:Ap,onRandomContents:zp,onConditionContents:Ip,onFatherPaceContents:Op,onPaceContents:Lp,onMainTagContents:Rp,onButtonContents:$p,onPamButtonContents:Vp,onRowButtonContents:Fp,onRelated:Kp,onRowNum:Up,onFixRow:qp,onReqItem:Wp,onBottomButtonContents:Pp,onConditionContent:Gp,onTabs:Yp,onSinChoice:Jp,onTextSize:Bp,onTextRGBA:Np,onPosition:Cp,onColumnNum:Dp,onSize:Tp,onShowType:Xp,onStepName:Zp,onStep:Qp,onInterfaceTypeContents:Mp,onBackGround:Ep,onMaxColumn:Hp,onEditRead:jp,onShowHide:Sp},ef=async(a,l,r="")=>{var p,c,u,m,g,y,d,A,w,Y,D,P;let n="";if(((p=a==null?void 0:a.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:p.contents)!==""&&(n=(c=a==null?void 0:a.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:c.contents),n===""||!n)return a;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(m=(u=n==null?void 0:n.replace("(",Br))==null?void 0:u.split(Br))==null?void 0:m[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(g=le.analyzeSplitToContent(n,","))==null?void 0:g.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!=null&&O.includes("(")||(O=O==null?void 0:O.replaceAll(":","=")),O)),o=a;for(let O in i){let E,S="";E=(A=(d=(y=i==null?void 0:i[O])==null?void 0:y.replace("=",Br))==null?void 0:d.split(Br))==null?void 0:A[0],S=(D=(Y=(w=i==null?void 0:i[O])==null?void 0:w.replace("=",Br))==null?void 0:Y.split(Br))==null?void 0:D[1];let x=(P=An==null?void 0:An.find(b=>(b==null?void 0:b.key)===E))==null?void 0:P.value;if(x){const b=gc[x];o=await b({contents:o,filter:S,extra:l,groupName:r})}}return o},$o=async(a,l,r="")=>{var c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re;let n="";if(((c=a==null?void 0:a.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(u=a==null?void 0:a.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:u.contents),n===""||!n)return a;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(g=(m=n==null?void 0:n.replace("(",Br))==null?void 0:m.split(Br))==null?void 0:g[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(y=le.analyzeSplitToContent(n,","))==null?void 0:y.map(X=>((X==null?void 0:X[(X==null?void 0:X.length)-1])===","&&(X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1)),X!=null&&X.includes("(")||(X=X==null?void 0:X.replaceAll(":","=")),X)),o=a,p=new Map;i==null||i.forEach(X=>{var fe,U,q;let ye=(fe=X==null?void 0:X.split("="))==null?void 0:fe[0];if(ye==="@MainParam"&&p.get(ye)){let Z=p.get(ye);Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1);let ae=(q=(U=X==null?void 0:X.replace("{",Br))==null?void 0:U.split(Br))==null?void 0:q[1];ae=Z+","+ae,p.set(ye,ae)}else ye==="@Button"&&p.get(ye)?p.set(X,X):p.set(ye,X)}),i=Array.from(p.values()),i=i==null?void 0:i.sort((X,ye)=>{var fe,U;return((fe=An==null?void 0:An.find(q=>ye==null?void 0:ye.includes(q==null?void 0:q.key)))==null?void 0:fe.order)-((U=An==null?void 0:An.find(q=>X==null?void 0:X.includes(q==null?void 0:q.key)))==null?void 0:U.order)});for(let X in i){let ye,fe="";(d=i==null?void 0:i[X])!=null&&d.includes("(")&&((A=i==null?void 0:i[X])!=null&&A.includes("@If"))?(ye=(D=(Y=(w=i==null?void 0:i[X])==null?void 0:w.replace("(",Br))==null?void 0:Y.split(Br))==null?void 0:D[0],fe="("+((E=(O=(P=i==null?void 0:i[X])==null?void 0:P.replace("(",Br))==null?void 0:O.split(Br))==null?void 0:E[1])):(ye=(b=(x=(S=i==null?void 0:i[X])==null?void 0:S.replace("=",Br))==null?void 0:x.split(Br))==null?void 0:b[0],fe=(R=(I=(_=i==null?void 0:i[X])==null?void 0:_.replace("=",Br))==null?void 0:I.split(Br))==null?void 0:R[1]);let U=(re=An==null?void 0:An.find(q=>(q==null?void 0:q.key)===ye))==null?void 0:re.value;if(U){const q=gc[U];o=await q({contents:o,filter:fe,extra:l,groupName:r})}}return o},bc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const r=l.slice(1,-1).split(",").map(n=>Number(n.trim()));return r.length<2||r.some(n=>Number.isNaN(n))?null:[r[0],r[1]]},af=(a,l)=>{var Y,D,P,O,E;const r=Array.isArray(a)?a:[],n=r.find(S=>(S==null?void 0:S.key)==="formContent"),i=Array.isArray(n==null?void 0:n.contents)?n.contents:[],o=((Y=r.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:Y.contents)??{},p=(i==null?void 0:i[0])??{};let c=((D=l==null?void 0:l.position)==null?void 0:D[0])??(o==null?void 0:o._positionStartRow)??(p==null?void 0:p._positionStartRow),u=((P=l==null?void 0:l.position)==null?void 0:P[1])??(o==null?void 0:o._positionRowSpan)??(p==null?void 0:p._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!u||Number.isNaN(u)||u<1)&&(u=1);let m=((O=l==null?void 0:l.size)==null?void 0:O[0])??(o==null?void 0:o._sizeStart)??(p==null?void 0:p._sizeStart),g=((E=l==null?void 0:l.size)==null?void 0:E[1])??(o==null?void 0:o._sizeEnd)??(p==null?void 0:p._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(g===void 0||Number.isNaN(g))&&(g=1),m=Math.max(0,Math.min(1,m)),g=Math.max(0,Math.min(1,g)),g<=m&&(m=0,g=1);const y=g-m,d=Math.max(1,Math.round(1/y));let A=r.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const x=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:x.map(b=>({...b,width:d,_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g}))}});const w={_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g};return A.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?A=A.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:w}:S):A.push({key:"_gridLayoutMeta",contents:w}),A};let Bi="$R";const lf=M.useUnit(M.pinia),{selectTitle:rf}=M.storeToRefs(lf);let nf=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],of=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],tf=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],sf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const bs=async(a,l,r=!0)=>{let n=[],i=a==null?void 0:a.map(async o=>{var y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl,aa,Pa,Ga,$e,ha,wa,Ee,ba,Xa,yl,zl;let p=(w=(A=(d=(y=o==null?void 0:o.contents)==null?void 0:y.find(pa=>{var Ha;return(Ha=pa==null?void 0:pa.key)==null?void 0:Ha.includes("struct")}))==null?void 0:d.value)==null?void 0:A[0])==null?void 0:w.类型,c=Object.values(o==null?void 0:o.name);c=c==null?void 0:c.reverse();let u=(Y=o==null?void 0:o.contents)==null?void 0:Y.map(pa=>pa==null?void 0:pa.key),m={comp:p,isShow:o==null?void 0:o.is_show,name:c==null?void 0:c[0],id:o==null?void 0:o.object_id,order_no:o==null?void 0:o.order_no,relatedTables:u,menuFilter:(D=o==null?void 0:o.filter)==null?void 0:D.menuFilter,status:o==null?void 0:o.status,fatherSyncContents:(P=o==null?void 0:o.filter)==null?void 0:P.fatherSyncs,relatedQuotes:(O=o==null?void 0:o.filter)==null?void 0:O.quotes,sonSyncContents:(E=o==null?void 0:o.filter)==null?void 0:E.sonSyncs,nameContents:(S=M.cloneDeep(c))==null?void 0:S.reverse(),isHidden:!1,calculatorFilters:(R=(I=(_=(b=(x=o==null?void 0:o.contents)==null?void 0:x.find(pa=>{var Ha;return(Ha=pa==null?void 0:pa.key)==null?void 0:Ha.includes("struct")}))==null?void 0:b.value)==null?void 0:_[0])==null?void 0:I.算法)==null?void 0:R.contents};for(let pa in c)parseInt(pa)>=1&&(m[`name${parseInt(pa)-1}`]=c[pa]);let g=Array.isArray((re=o==null?void 0:o.filter)==null?void 0:re.menuFilter)?(X=o==null?void 0:o.filter)==null?void 0:X.menuFilter:[];if(((ye=g==null?void 0:g.filter(pa=>pa==null?void 0:pa.includes("@If")))==null?void 0:ye.length)>0){let pa=g==null?void 0:g.filter(Pe=>Pe==null?void 0:Pe.includes("@If"));pa=pa==null?void 0:pa[0],pa=(U=(fe=pa==null?void 0:pa.replace("(",Bi))==null?void 0:fe.split(Bi))==null?void 0:U[1],pa=pa==null?void 0:pa.slice(0,(pa==null?void 0:pa.length)-1),pa!=null&&pa.includes("*")&&(pa=(Z=(q=pa==null?void 0:pa.replace("{",Bi))==null?void 0:q.split(Bi))==null?void 0:Z[1],pa=pa==null?void 0:pa.replace("}","")),pa=le.calculatorAndToOr(pa);let Ha=(l==null?void 0:l.originPath)??"";(Ha==null?void 0:Ha[(Ha==null?void 0:Ha.length)-1])==="/"&&(Ha=Ha==null?void 0:Ha.slice(0,(Ha==null?void 0:Ha.length)-1));let va=await Hr(Ha,!1),Ca=(ae=va==null?void 0:va.filter(Pe=>(Pe==null?void 0:Pe.comp)==="Table"))==null?void 0:ae[0];Ca=(ze=(ve=Ca==null?void 0:Ca.compData)==null?void 0:ve.find(Pe=>(Pe==null?void 0:Pe.key)==="tableContents"))==null?void 0:ze.contents;let Aa=(N=(te=rf.value)==null?void 0:te.find(Pe=>(Pe==null?void 0:Pe.condition)==="child"))==null?void 0:N.value;Ca=(se=Ca==null?void 0:Ca.map(Pe=>{for(let kl in Pe)if((Pe==null?void 0:Pe[kl])===Aa)return Pe}))==null?void 0:se.filter(Pe=>Pe),Ca=Ca==null?void 0:Ca[0],pa=pa==null?void 0:pa[0];let pl=[];for(let Pe in pa){let kl="";Ja.isObject(Ca)&&(kl=(ue=(W=Object.keys(Ca))==null?void 0:W.filter(cr=>cr==null?void 0:cr.includes("."+Pe)))==null?void 0:ue[0]),kl!==""&&(Ca!=null&&Ca[kl])&&(pa==null?void 0:pa[Pe])===(Ca==null?void 0:Ca[kl])||Ca!=null&&Ca[Pe]&&(pa==null?void 0:pa[Pe])===(Ca==null?void 0:Ca[Pe])?pl.push(!0):pl.push(!1)}if(pl!=null&&pl.some(Pe=>Pe===!1)&&((we=l==null?void 0:l.originPath)==null?void 0:we[((_e=l==null?void 0:l.originPath)==null?void 0:_e.length)-1])!=="/")return}if(p==="Table"||p==="Method"){!r&&((Ke=m==null?void 0:m.fatherSyncContents)==null?void 0:Ke.length)>0;let pa=((la=o==null?void 0:o.contents)==null?void 0:la.find(ea=>{var La;return(La=ea==null?void 0:ea.key)==null?void 0:La.includes("content")}))||[],Ha=[];m.comp="Table",pa.value=(j=pa==null?void 0:pa.value)==null?void 0:j.sort((ea,La)=>parseInt(ea==null?void 0:ea.id)-parseInt(La==null?void 0:La.id)),pa.value=(We=pa==null?void 0:pa.value)==null?void 0:We.map(ea=>{let La={};for(let Bl in ea)JSON.stringify(ea==null?void 0:ea[Bl])==="{}"?La[Bl]="":La[Bl]=ea==null?void 0:ea[Bl];return La}),Ha.push({key:"tableContents",contents:pa==null?void 0:pa.value});let va=(Ce=(de=(Me=(Ie=(Oe=o==null?void 0:o.contents)==null?void 0:Oe.find(ea=>{var La;return(La=ea==null?void 0:ea.key)==null?void 0:La.includes("struct")}))==null?void 0:Ie.value)==null?void 0:Me[0])==null?void 0:de.结构)==null?void 0:Ce.contents;Array.isArray(va==null?void 0:va[0])?va[0]=(Je=va==null?void 0:va[0])==null?void 0:Je.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"):va=va==null?void 0:va.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"),Ha.push({key:"header",contents:va}),Ha.push({key:"filter",contents:(ee=(V=($=(Ge=(Ea=o==null?void 0:o.contents)==null?void 0:Ea.find(ea=>{var La;return(La=ea==null?void 0:ea.key)==null?void 0:La.includes("struct")}))==null?void 0:Ge.value)==null?void 0:$[0])==null?void 0:V.引用)==null?void 0:ee.contents}),Ha.push({key:"calculator",contents:m==null?void 0:m.calculatorFilters});let Ca=nf,Aa=M.cloneDeep(of);p==="Method"&&Aa.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(va==null?void 0:va[0])&&((ce=va==null?void 0:va[0])==null?void 0:ce.prop)==="disabled"&&(Ca=tf,Aa=sf);const pl=["推力","真空","压力","温度","流量"],Pe=m.name;Pe&&pl.includes(Pe)&&(Ca=[...Ca],Ca.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let kl=[];if(!Array.isArray(va==null?void 0:va[0])&&(va!=null&&va.some(ea=>{var La;return(ea==null?void 0:ea.calculatorFilter)&&((La=ea==null?void 0:ea.calculatorFilter)==null?void 0:La.includes("Manual"))}))){let ea=(he=va==null?void 0:va.map(La=>La==null?void 0:La.calculatorFilter))==null?void 0:he.filter(La=>La&&(La==null?void 0:La.includes("Manual")));ea==null||ea.forEach(La=>{var Ol;let Bl=le.analyzeSplitToContent(La,",");if(Bl=Bl==null?void 0:Bl.map(ma=>((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)),ma)),Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Extent"))&&(ma==null?void 0:ma.includes("Row")))&&(Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Button"))&&(ma==null?void 0:ma.includes(","))))){let ma=Bl==null?void 0:Bl.find(Sr=>Sr==null?void 0:Sr.includes("@FunctionButton"));ma=(Ol=ma==null?void 0:ma.split("="))==null?void 0:Ol[1],ma=ma==null?void 0:ma.slice(1,(ma==null?void 0:ma.length)-1),ma=ma==null?void 0:ma.split(","),ma=ma==null?void 0:ma[(ma==null?void 0:ma.length)-1],kl.push(ma)}}),kl=[...new Set(kl)],kl=kl==null?void 0:kl.map(La=>({label:La,prop:La,type:"methodButton"}))}else if(Array.isArray(va==null?void 0:va[0])&&((ca=le.getColumnChild(va==null?void 0:va[0]))!=null&&ca.some(ea=>{var La;return(ea==null?void 0:ea.calculatorFilter)&&((La=ea==null?void 0:ea.calculatorFilter)==null?void 0:La.includes("Manual"))}))){let ea=(Ve=(ia=le.getColumnChild(va==null?void 0:va[0]))==null?void 0:ia.map(La=>La==null?void 0:La.calculatorFilter))==null?void 0:Ve.filter(La=>La&&(La==null?void 0:La.includes("Manual")));ea==null||ea.forEach(La=>{var Ol;let Bl=le.analyzeSplitToContent(La,",");if(Bl=Bl==null?void 0:Bl.map(ma=>((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)),ma)),Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Extent"))&&(ma==null?void 0:ma.includes("Row")))&&(Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Button"))&&(ma==null?void 0:ma.includes(","))))){let ma=Bl==null?void 0:Bl.find(Sr=>Sr==null?void 0:Sr.includes("@FunctionButton"));ma=(Ol=ma==null?void 0:ma.split("="))==null?void 0:Ol[1],ma=ma==null?void 0:ma.slice(1,(ma==null?void 0:ma.length)-1),ma=ma==null?void 0:ma.split(","),ma=ma==null?void 0:ma[(ma==null?void 0:ma.length)-1],kl.push(ma)}}),kl=[...new Set(kl)],kl=kl==null?void 0:kl.map(La=>({label:La,prop:La,type:"methodButton"}))}if(Ha.push({key:"extraButton",contents:Ca}),Ha.push({key:"rowButton",contents:[...Aa,...kl]}),m.compData=await $o(Ha,l,m==null?void 0:m.nameContents),(ga=m.compData)!=null&&ga.find(ea=>(ea==null?void 0:ea.key)==="tab")&&(m.tab=(De=(Ta=m.compData)==null?void 0:Ta.find(ea=>(ea==null?void 0:ea.key)==="tab"))==null?void 0:De.contents),(Fa=m.compData)!=null&&Fa.find(ea=>(ea==null?void 0:ea.key)==="step")&&(m.step=(da=(Na=m.compData)==null?void 0:Na.find(ea=>(ea==null?void 0:ea.key)==="step"))==null?void 0:da.contents),(ja=m.compData)!=null&&ja.find(ea=>(ea==null?void 0:ea.key)==="choice")&&(m.choice=(je=(ta=m.compData)==null?void 0:ta.find(ea=>(ea==null?void 0:ea.key)==="choice"))==null?void 0:je.contents),(ya=m.compData)!=null&&ya.find(ea=>(ea==null?void 0:ea.key)==="hideContents")&&(m.isHidden=((Ae=(Ze=m.compData)==null?void 0:Ze.find(ea=>(ea==null?void 0:ea.key)==="hideContents"))==null?void 0:Ae.contents)??!1),(ne=m.compData)!=null&&ne.find(ea=>(ea==null?void 0:ea.key)==="newType")){let ea=(ua=(pe=m.compData)==null?void 0:pe.find(La=>(La==null?void 0:La.key)==="newType"))==null?void 0:ua.contents;m.comp=ea,m.compData=(Qe=m.compData)==null?void 0:Qe.filter(La=>(La==null?void 0:La.key)!=="newType")}let cr="",Cr=(Da=m==null?void 0:m.compData)==null?void 0:Da.filter(ea=>(ea==null?void 0:ea.key)==="fixType");if((Cr==null?void 0:Cr.length)>0&&r&&(cr=(Te=Cr==null?void 0:Cr[0])==null?void 0:Te.contents,m.comp=cr),((Le=m==null?void 0:m.calculatorFilters)==null?void 0:Le.length)>0){let ea=[],La=[],Bl=[];(Fe=m==null?void 0:m.calculatorFilters)==null||Fe.forEach(Ol=>{var Sr,Ur,Gr,Re,ur,wr,Yr;let ma=(Gr=(Ur=(Sr=Ol==null?void 0:Ol.calculatorFilter)==null?void 0:Sr.replace("(",Bi))==null?void 0:Ur.split(Bi))==null?void 0:Gr[1];ma=(Re=ma==null?void 0:ma.split(","))==null?void 0:Re[0],ma=ma??(Ol==null?void 0:Ol.functionName),(ur=Ol==null?void 0:Ol.calculatorFilter)!=null&&ur.includes("Up")&&ea.push({label:ma,prop:ma,type:"methodButton"}),(wr=Ol==null?void 0:Ol.calculatorFilter)!=null&&wr.includes("Line")&&La.push({label:ma,prop:ma,type:"methodButton"}),(Yr=Ol==null?void 0:Ol.calculatorFilter)!=null&&Yr.includes("Down")&&Bl.push({label:ma,prop:ma,type:"methodButton"})}),m.compData=(Ne=m.compData)==null?void 0:Ne.map(Ol=>((Ol==null?void 0:Ol.key)==="extraButton"&&(Ol.contents=[...ea??[],...Ol.contents]),(Ol==null?void 0:Ol.key)==="rowButton"&&(Ol.contents=[...La??[],...Ol.contents]),(Ol==null?void 0:Ol.key)==="bottomButton"&&(Ol.contents=[...Bl??[],...Ol.contents]),Ol)),(Bl==null?void 0:Bl.length)>0&&!((al=(me=m.compData)==null?void 0:me.find(Ol=>(Ol==null?void 0:Ol.key)==="bottomButton"))!=null&&al.contents)&&m.compData.push({key:"bottomButton",contents:Bl})}}else if(p==="Form"){let pa=[],Ha=(Rl=(Tl=(Qa=o==null?void 0:o.contents)==null?void 0:Qa.find(Pe=>{var kl;return(kl=Pe==null?void 0:Pe.key)==null?void 0:kl.includes("content")}))==null?void 0:Tl.value)==null?void 0:Rl[0],va=[],Ca=Array.isArray((Al=o==null?void 0:o.filter)==null?void 0:Al.menuFilter)?(Pl=o==null?void 0:o.filter)==null?void 0:Pl.menuFilter:[];Ca==null||Ca.forEach(Pe=>{if(Pe!=null&&Pe.includes("@Param(Hide=Yes, prop=")||Pe!=null&&Pe.includes("(Hide=Yes, prop=")){const kl=Pe==null?void 0:Pe.match(/prop=([^,)]+)/);kl!=null&&kl[1]&&va.push(kl==null?void 0:kl[1])}});let Aa=(Jl=(Hl=(Wa=(jl=(ll=o==null?void 0:o.contents)==null?void 0:ll.find(Pe=>{var kl;return(kl=Pe==null?void 0:Pe.key)==null?void 0:kl.includes("struct")}))==null?void 0:jl.value)==null?void 0:Wa[0])==null?void 0:Hl.结构)==null?void 0:Jl.contents,pl=(ar=Aa==null?void 0:Aa.map(Pe=>(Pe.value=Ha==null?void 0:Ha[Pe==null?void 0:Pe.prop],Pe)))==null?void 0:ar.filter(Pe=>(Pe==null?void 0:Pe.prop)!=="sort"&&(Pe==null?void 0:Pe.prop)!=="relatedId");pl=pl==null?void 0:pl.map(Pe=>(va!=null&&va.includes(Pe==null?void 0:Pe.prop)&&(Pe.isHideInForm=!0),Pe)),pa.push({key:"calculator",contents:m==null?void 0:m.calculatorFilters}),pa.push({key:"filter",contents:(hl=(ol=(ka=(br=(bl=o==null?void 0:o.contents)==null?void 0:bl.find(Pe=>{var kl;return(kl=Pe==null?void 0:Pe.key)==null?void 0:kl.includes("struct")}))==null?void 0:br.value)==null?void 0:ka[0])==null?void 0:ol.引用)==null?void 0:hl.contents}),pa.push({key:"formContent",contents:pl}),pa.push({key:"paramHideProps",contents:va}),m.compData=await ef(pa,l,m==null?void 0:m.nameContents),(Nl=m.compData)!=null&&Nl.find(Pe=>(Pe==null?void 0:Pe.key)==="tab")&&(m.tab=(Pa=(aa=m.compData)==null?void 0:aa.find(Pe=>(Pe==null?void 0:Pe.key)==="tab"))==null?void 0:Pa.contents),(Ga=m.compData)!=null&&Ga.find(Pe=>(Pe==null?void 0:Pe.key)==="step")&&(m.step=(ha=($e=m.compData)==null?void 0:$e.find(Pe=>(Pe==null?void 0:Pe.key)==="step"))==null?void 0:ha.contents),(wa=m.compData)!=null&&wa.find(Pe=>(Pe==null?void 0:Pe.key)==="choice")&&(m.choice=(ba=(Ee=m.compData)==null?void 0:Ee.find(Pe=>(Pe==null?void 0:Pe.key)==="choice"))==null?void 0:ba.contents),(Xa=m.compData)!=null&&Xa.find(Pe=>(Pe==null?void 0:Pe.key)==="hideContents")&&(m.isHidden=((zl=(yl=m.compData)==null?void 0:yl.find(Pe=>(Pe==null?void 0:Pe.key)==="hideContents"))==null?void 0:zl.contents)??!1)}return m});return n=await Promise.all(i),n=n==null?void 0:n.filter(o=>!(o!=null&&o.isHidden)),n};let cf="http://139.196.154.85:20031";function uf(a){return Ja.axios({method:"post",url:cf+"/api/word-report/build-by-upload",responseType:"blob",data:a})}const df=M.useUnit(M.pinia),{selectTitle:ks}=M.storeToRefs(df),pf=async a=>{var r;let l=(r=le.analyzerStringToArray(a,[":","@","="]))==null?void 0:r[0];return l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),l=le.analyzeSplitToContent(l,","),l=l==null?void 0:l.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)),l=l==null?void 0:l.map(async n=>{var o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se;let i=le.analyzeSplitToContent(n,"=");if(n!=null&&n.includes("==")){i=n==null?void 0:n.split("==");let W=i==null?void 0:i[0],ue=i==null?void 0:i[1],_e=(x=ue==null?void 0:ue.split("*"))==null?void 0:x[0],we=(b=ue==null?void 0:ue.split("*"))==null?void 0:b[1];we=(_=le.analyzeSplitToContent(we,":"))==null?void 0:_.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j));let Ke=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])!=="{"),la=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])==="{");if(la=la==null?void 0:la[0],la=la==null?void 0:la.slice(1,(la==null?void 0:la.length)-1),la=(I=le.analyzeSplitToContent(la,","))==null?void 0:I.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),_e!=null&&_e.includes("{")){let j=(re=(R=ks.value)==null?void 0:R.find(Ce=>(Ce==null?void 0:Ce.condition)==="child"))==null?void 0:re.value;_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(ye=(X=_e==null?void 0:_e.replace("{",""))==null?void 0:X.replace("}",""))==null?void 0:ye.replace(":","/"),_e=_e+"/"+j;let We=await Hr(_e,!1);We=We==null?void 0:We.find(Ce=>(Ce==null?void 0:Ce.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1]));let Oe=(U=(fe=We==null?void 0:We.compData)==null?void 0:fe.find(Ce=>(Ce==null?void 0:Ce.key)==="tableContents"))==null?void 0:U.contents,Ie=(Z=(q=We==null?void 0:We.compData)==null?void 0:q.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:Z.contents,Me=le.tableToForm(Oe,Ie),de=[];Me==null||Me.forEach(Ce=>{let Je=[];la==null||la.forEach(Ea=>{var Ge;Je.push(((Ge=Ce==null?void 0:Ce.find($=>($==null?void 0:$.key)===Ea))==null?void 0:Ge.value)??"")}),de.push(Je)}),de=le.arrayToString(de),n=W+"=="+de}else{_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(ve=(ae=_e==null?void 0:_e.replace("{",""))==null?void 0:ae.replace("}",""))==null?void 0:ve.replace(":","/");let j=await Hr(_e,!1);j=j==null?void 0:j.find(de=>(de==null?void 0:de.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1]));let We=(te=(ze=j==null?void 0:j.compData)==null?void 0:ze.find(de=>(de==null?void 0:de.key)==="tableContents"))==null?void 0:te.contents,Oe=(se=(N=j==null?void 0:j.compData)==null?void 0:N.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:se.contents,Ie=le.tableToForm(We,Oe),Me=[];Ie==null||Ie.forEach(de=>{let Ce=[];la==null||la.forEach(Je=>{var Ea;Ce.push(((Ea=de==null?void 0:de.find(Ge=>(Ge==null?void 0:Ge.key)===Je))==null?void 0:Ea.value)??"")}),Me.push(Ce)}),Me=le.arrayToString(Me),n=W+"=="+Me}}else{let W=i==null?void 0:i[0],ue=i==null?void 0:i[1],_e=(o=ue==null?void 0:ue.split("*"))==null?void 0:o[0],we=(p=ue==null?void 0:ue.split("*"))==null?void 0:p[1];we=(c=le.analyzeSplitToContent(we,":"))==null?void 0:c.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j));let Ke=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])!=="{"),la=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])==="{");if(la=la==null?void 0:la[0],la=la==null?void 0:la.slice(1,(la==null?void 0:la.length)-1),la=(u=le.analyzeSplitToContent(la,":"))==null?void 0:u.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),_e!=null&&_e.includes("{")){let j=(g=(m=ks.value)==null?void 0:m.find(Oe=>(Oe==null?void 0:Oe.condition)==="child"))==null?void 0:g.value;_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(d=(y=_e==null?void 0:_e.replace("{",""))==null?void 0:y.replace("}",""))==null?void 0:d.replace(":","/"),_e=_e+"/"+j;let We=await Hr(_e,!1);We=We==null?void 0:We.find(Oe=>(Oe==null?void 0:Oe.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])),We=(w=(A=We==null?void 0:We.compData)==null?void 0:A.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:w.contents,We=(Y=We==null?void 0:We.find(Oe=>(Oe==null?void 0:Oe.prop)===(la==null?void 0:la[(la==null?void 0:la.length)-1])))==null?void 0:Y.value,ue=We}else{_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(P=(D=_e==null?void 0:_e.replace("{",""))==null?void 0:D.replace("}",""))==null?void 0:P.replace(":","/");let j=await Hr(_e,!1);j=j==null?void 0:j.find(We=>(We==null?void 0:We.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])),j=(E=(O=j==null?void 0:j.compData)==null?void 0:O.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:E.contents,j=(S=j==null?void 0:j.find(We=>(We==null?void 0:We.prop)===(la==null?void 0:la[(la==null?void 0:la.length)-1])))==null?void 0:S.value,ue=j}n=W+ue}return n}),l=await Promise.all(l),l=l==null?void 0:l.join(","),l="{"+l+"}",l},ff=M.useLoginState(M.pinia),{loginUserInfo:Jn}=M.storeToRefs(ff),hf=M.useUnit(M.pinia),{selectTitle:kc}=M.storeToRefs(hf),Ki=M.useMenuState(M.pinia),{localFiles:vf}=M.storeToRefs(Ki),Lt=async(a=[],l="Manual",r=[],n=[])=>{var c;let i=a,o=(c=i==null?void 0:i.filter(u=>{var m;return(u==null?void 0:u.functionName)&&(l==="Manual"&&((m=u==null?void 0:u.calculatorFilter)==null?void 0:m.includes(l))||l!=="Manual")}))==null?void 0:c.map(u=>({prop:u==null?void 0:u.prop,label:u==null?void 0:u.label,methods:u==null?void 0:u.calculatorFilter,functionName:u==null?void 0:u.functionName,functionRelatedWords:u==null?void 0:u.functionRelatedWords}));(n==null?void 0:n.length)>0&&(o=[...n==null?void 0:n.map(m=>({prop:"",label:"",methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),...o]),(n==null?void 0:n.length)>0&&(i=[i==null?void 0:i[0]]);let p=i==null?void 0:i.map(async u=>{let m=(n==null?void 0:n.length)>0?n:o==null?void 0:o.filter(g=>(g==null?void 0:g.prop)===(u==null?void 0:u.prop));return u=await Rt(u,m,i,l,i,r),u});return p=await Promise.all(p),p},Ct=async(a,l,r="Manual",n=[],i=[],o=[])=>{var g;let p=a,c;Array.isArray(l==null?void 0:l[0])?c=le.getColumnChild(l==null?void 0:l[0]):c=l;let u=(g=c==null?void 0:c.filter(y=>{var d;return(y==null?void 0:y.calculatorFilter)&&((d=y==null?void 0:y.calculatorFilter)==null?void 0:d.includes(r))||(y==null?void 0:y.calculatorFilter)===""&&(y==null?void 0:y.functionName)}))==null?void 0:g.map(y=>({prop:y==null?void 0:y.prop,label:y==null?void 0:y.label,methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords}));(i==null?void 0:i.length)>0&&(u=[...i==null?void 0:i.map(d=>({prop:"",label:"",methods:d==null?void 0:d.calculatorFilter,functionName:d==null?void 0:d.functionName,functionRelatedWords:d==null?void 0:d.functionRelatedWords})),...u]),(i==null?void 0:i.length)>0&&(p=[p==null?void 0:p[0]]);let m=p==null?void 0:p.map(async y=>(y=await Rt(y,u,c,r,p,n,o),y));return m=await Promise.all(m),m},mf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(p=>{var c;if(l!=null&&l[p]){let u=l==null?void 0:l[p];o=o?u?Fl.isEqual(u.toString(),o.toString()):void 0:u}else{let u=(c=i==null?void 0:i.find(g=>(g==null?void 0:g.label)===p))==null?void 0:c.prop,m=(l==null?void 0:l[u])??0;o=o?m?Fl.isEqual(m.toString(),o.toString()):void 0:m}}),l[n]=o===void 0?void 0:o?1:0,l},Or=a=>{const[l,r,n]=M.cloneDeep(a).split(":").map(Number);let i=+a;return!a||!(a!=null&&a.includes(":"))?i:(l??0)*3600+(r??0)*60+(n??0)},ri=a=>{const l=o=>o.toString().padStart(2,"0"),r=Math.floor(a/3600),n=Math.floor(a%3600/60),i=a%60;return`${l(r)}:${l(n)}:${parseInt(l(i))}`},yf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y,D,P;if(l!=null&&l[u]){if(o==="Row")if(!((g=((m=l==null?void 0:l[u])==null?void 0:m.toString())??"")!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let O=+(l==null?void 0:l[u]);c=c+O}else c=Or(c.toString())+Or((d=l==null?void 0:l[u])==null?void 0:d.toString()),c=ri(c)}else if(o==="Row"){let O=(A=i==null?void 0:i.find(E=>(E==null?void 0:E.label)===u))==null?void 0:A.prop;if(!((Y=Number.isNaN(l==null?void 0:l[O])?"":(w=l==null?void 0:l[O])==null?void 0:w.toString())!=null&&Y.includes(":"))&&!((D=c==null?void 0:c.toString())!=null&&D.includes(":"))){let E=+((l==null?void 0:l[O])??0);c=c+E}else c=Or(c==null?void 0:c.toString())+Or((P=(l==null?void 0:l[O])??0)==null?void 0:P.toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y+d},0)}return l[n]=c,l},gf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y;if(l!=null&&l[u]){if(o==="Row")if(!((g=(m=l==null?void 0:l[u])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let D=+(l==null?void 0:l[u]);c=c===0?c+D:c-D}else c=c===0?Or(c.toString())+Or(l==null?void 0:l[u].toString()):Or(c.toString())-Or(l==null?void 0:l[u].toString()),c=ri(c)}else if(o==="Row"){let D=(d=i==null?void 0:i.find(P=>(P==null?void 0:P.label)===u))==null?void 0:d.prop;if(!((w=Number.isNaN(l==null?void 0:l[D])?"":(A=l==null?void 0:l[D])==null?void 0:A.toString())!=null&&w.includes(":"))&&!((Y=c==null?void 0:c.toString())!=null&&Y.includes(":"))){let P=+((l==null?void 0:l[D])??0);c=c===0?c+P:c-P}else c=c===0?Or(c.toString())+Or(((l==null?void 0:l[D])??0).toString()):Or(c.toString())-Or(((l==null?void 0:l[D])??0).toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y-d},0)}return l[n]=c,l},bf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y;if(l!=null&&l[u]){if(o==="Row")if(!((g=(m=l==null?void 0:l[u])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let D=+(l==null?void 0:l[u]);c=c===0?c+D:c*D}else c=c===0?Or(c.toString())+Or(l==null?void 0:l[u].toString()):Or(c.toString())*Or(l==null?void 0:l[u].toString()),c=ri(c)}else if(o==="Row"){let D=(d=i==null?void 0:i.find(P=>(P==null?void 0:P.label)===u))==null?void 0:d.prop;if(!(l!=null&&l[D]))c=void 0;else if(!((w=Number.isNaN(l==null?void 0:l[D])?"":(A=l==null?void 0:l[D])==null?void 0:A.toString())!=null&&w.includes(":"))&&!((Y=c==null?void 0:c.toString())!=null&&Y.includes(":"))){let P=+((l==null?void 0:l[D])??0);c=c===0?c+P:c*P}else c=c===0?Or(c.toString())+Or(((l==null?void 0:l[D])??0).toString()):Or(c.toString())*Or(((l==null?void 0:l[D])??0).toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y*d},0)}return l[n]=c,l},kf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y;if(l!=null&&l[u]){if(o==="Row")if(!((g=(m=l==null?void 0:l[u])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let D=+(l==null?void 0:l[u]);c=c===0?c+D:c/D}else c=c===0?Or(c.toString())+Or(l==null?void 0:l[u].toString()):Or(c.toString())/Or(l==null?void 0:l[u].toString()),c=ri(c)}else if(o==="Row"){let D=(d=i==null?void 0:i.find(P=>(P==null?void 0:P.label)===u))==null?void 0:d.prop;if(!((w=Number.isNaN(l==null?void 0:l[D])?"":(A=l==null?void 0:l[D])==null?void 0:A.toString())!=null&&w.includes(":"))&&!((Y=c==null?void 0:c.toString())!=null&&Y.includes(":"))){let P=+((l==null?void 0:l[D])??0);c=c===0?c+P:c/P}else c=c===0?Or(c.toString())+Or(((l==null?void 0:l[D])??0).toString()):Or(c.toString())/Or(((l==null?void 0:l[D])??0).toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y/d},0)}return l[n]=c.toFixed(2),l},xf=async a=>{var o,p,c,u,m,g,y,d,A,w,Y;let l=(o=a==null?void 0:a.valueString)==null?void 0:o[0],r=(p=a==null?void 0:a.contents)==null?void 0:p.calculatorFilter,n=0,i=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 D=(u=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:u.replaceAll(":","/"),P=await Hr(D,!1),O=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(P=(g=P==null?void 0:P.filter(E=>(E==null?void 0:E.name)===O))==null?void 0:g[0],r!==""){let E=P.compData;E=E==null?void 0:E.filter(S=>(S==null?void 0:S.key)!=="filter"),E.push({key:"filter",contents:"("+r+")"}),E=await $o(E,{}),n=(d=(y=E==null?void 0:E.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:y.contents)==null?void 0:d.length}else n=(Y=(w=(A=P==null?void 0:P.compData)==null?void 0:A.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:Y.length}return i.value=n,i},wf=async a=>{var y,d,A,w,Y,D,P,O,E;let l=(y=a==null?void 0:a.valueString)==null?void 0:y[0],r=a==null?void 0:a.filter;r=(r==null?void 0:r.find(S=>S==null?void 0:S.includes("@If")))??"",(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let n=(A=(d=l==null?void 0:l.split("*"))==null?void 0:d[0])==null?void 0:A.replaceAll(":","/"),i=(w=l==null?void 0:l.split("*"))==null?void 0:w[1],o=(Y=i==null?void 0:i.split("{"))==null?void 0:Y[0],p=i==null?void 0:i.replace(o,"");o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1),o=o==null?void 0:o.split(":"),o=o==null?void 0:o[(o==null?void 0:o.length)-1];let c=await Hr(n,!1);if(p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1),p=p==null?void 0:p.split(":"),p=p==null?void 0:p[(p==null?void 0:p.length)-1],c=c==null?void 0:c.find(S=>(S==null?void 0:S.name)===o),c=(P=(D=c==null?void 0:c.compData)==null?void 0:D.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:P.contents,(r==null?void 0:r.length)>0){r=(E=(O=r==null?void 0:r.replace("(","$R"))==null?void 0:O.split("$R"))==null?void 0:E[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1);let S=le.calculatorAndToOr(r);S==null||S.forEach(x=>{for(let b in x)x[b]!=="!"?c=c==null?void 0:c.filter(_=>{var I;return(_==null?void 0:_[b])===(x==null?void 0:x[b])||(_==null?void 0:_[(I=Object.keys(_))==null?void 0:I.find(R=>R==null?void 0:R.includes("."+b))])===(x==null?void 0:x[b])}):c=c==null?void 0:c.filter(_=>{var I;return(_==null?void 0:_[b])!==(x==null?void 0:x[b])&&(_==null?void 0:_[(I=Object.keys(_))==null?void 0:I.find(R=>R==null?void 0:R.includes("."+b))])!==(x==null?void 0:x[b])})})}c=c==null?void 0:c.map(S=>S==null?void 0:S[p]);let u=[...new Set(c)],m=[],g={};return u==null||u.forEach(S=>{var b;let x=(b=c==null?void 0:c.filter(_=>S===_))==null?void 0:b.length;g[S]=x}),m.push(g),{xAxis:u,yAxis:m}},_f=async a=>{var n,i;let l=a==null?void 0:a.valueString;l=l==null?void 0:l[0];let r={};if((l==null?void 0:l[0])==="{"){l=l==null?void 0:l.slice(1,l.length-1),l=(n=le.analyzeSplitToContent(l,","))==null?void 0:n.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),c));let o=l==null?void 0:l.map(async c=>{var y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye;let u=(d=(y=c==null?void 0:c.replace("=","$R"))==null?void 0:y.split("$R"))==null?void 0:d[0],m=(w=(A=c==null?void 0:c.replace("=","$R"))==null?void 0:A.split("$R"))==null?void 0:w[1],g="";if(m==="LoginUser")g=((Y=Jn.value)==null?void 0:Y.姓名)||((D=Jn.value)==null?void 0:D.account)||((P=Jn.value)==null?void 0:P.账号);else if((m==null?void 0:m[0])==="$"){let fe=(O=m==null?void 0:m.split("*"))==null?void 0:O[0],U=(E=m==null?void 0:m.split("*"))==null?void 0:E[1],q=U;if((fe==null?void 0:fe[0])==="$"&&(fe=fe==null?void 0:fe.slice(1,fe==null?void 0:fe.length)),fe!=null&&fe.includes("$")){let ae=(S=fe==null?void 0:fe.split("$"))==null?void 0:S[0],ve=(x=fe==null?void 0:fe.split("$"))==null?void 0:x[1],ze=(b=ae==null?void 0:ae.split(":"))==null?void 0:b[0],te=(R=(I=(_=kc.value)==null?void 0:_.filter(N=>(N==null?void 0:N.condition)==="child"))==null?void 0:I[0])==null?void 0:R.value;ve=ve==null?void 0:ve.replaceAll(":","/"),fe=ze+"/"+ve+"/"+te}else fe=fe==null?void 0:fe.replaceAll(":","/");U=U==null?void 0:U.split(":"),U=U==null?void 0:U.find((ae,ve)=>ve===(U==null?void 0:U.length)-2),q=q==null?void 0:q.split(":"),q=q==null?void 0:q.find((ae,ve)=>ve===(q==null?void 0:q.length)-1),(q==null?void 0:q[0])==="{"&&(q=q==null?void 0:q.slice(1,(q==null?void 0:q.length)-1));let Z=await Hr(fe,!1);Z=Z==null?void 0:Z.find(ae=>(ae==null?void 0:ae.name)===U),Z=(X=(re=Z==null?void 0:Z.compData)==null?void 0:re.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:X.contents,g=(ye=Z==null?void 0:Z[0])==null?void 0:ye[q]}else g=m;r[u]=g});await Promise.all(o);let p=(i=a==null?void 0:a.valueString)==null?void 0:i[1];r.menuPathContent=p}return r},Sf=async a=>{var m,g,y,d,A,w,Y;let l=a==null?void 0:a.valueString,r=l==null?void 0:l.filter(D=>(D==null?void 0:D.includes(".docx"))||(D==null?void 0:D.includes(".doc")));r=r==null?void 0:r[0];let n=l==null?void 0:l.filter(D=>!(D!=null&&D.includes(".docx"))&&!(D!=null&&D.includes(".doc")));n=n==null?void 0:n[0];let i=(g=a==null?void 0:a.compNames)==null?void 0:g[((m=a==null?void 0:a.compNames)==null?void 0:m.length)-1],o=((A=(d=(y=kc.value)==null?void 0:y.filter(D=>(D==null?void 0:D.condition)==="child"))==null?void 0:d[0])==null?void 0:A.value)??"",p=vf.value;o!==""&&(p=(w=p==null?void 0:p.find(D=>(D==null?void 0:D.path)===o))==null?void 0:w.children),p=(Y=p==null?void 0:p.find(D=>(D==null?void 0:D.name)===i))==null?void 0:Y.children;let c=p==null?void 0:p.find(D=>(D==null?void 0:D.name)===r),u=p==null?void 0:p.find(D=>(D==null?void 0:D.name)===n);u=(u==null?void 0:u.url)??"",u!==""?u=u==null?void 0:u.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"):u="file:///"+(n==null?void 0:n.replaceAll("\\","/")),c=(c==null?void 0:c.url)??"",c!==""?c=c==null?void 0:c.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"):c="file:///"+(r==null?void 0:r.replaceAll("\\","/"));try{const P=await(await fetch(c)).blob();let O=c.split(/[\\/]/).pop();const E=new File([P],O,{type:P.type||"application/octet-stream"}),S=new FormData;S.append("TemplateFile",E);let x=await fetch(u);x=await x.text(),x=await pf(x),S.append("RawContent",x);let b=await uf(S),_=new Blob([b.data],{type:"application/zip"});const I=window.URL.createObjectURL(_),R=document.createElement("a");R.href=I,R.download=r,document.body.appendChild(R),R.click(),document.body.removeChild(R),window.URL.revokeObjectURL(I)}catch{Ja.ElMessage.error("文件路径未找到")}},Ef=async a=>{var i,o;let l=a==null?void 0:a.valueString,r=l==null?void 0:l[0];r=(i=r==null?void 0:r.split("*"))==null?void 0:i[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.replaceAll(":","/"),r=r;let n=await Hr(r,!1);if((n==null?void 0:n.length)>0){Ki.setActiveTopMenuPath((o=r==null?void 0:r.split("/"))==null?void 0:o[0]);let p=localStorage.getItem("menus-store");p=JSON.parse(p),p=p==null?void 0:p.menus,p=p==null?void 0:p.find(c=>{var u;return(c==null?void 0:c.path)===((u=r==null?void 0:r.split("/"))==null?void 0:u[0])}),p=p==null?void 0:p.childMenus,Ki.setAsideMenus(p),Ki.setJumpMenuInform(!0),Ki.setActiveMenuPath(r)}else Ja.ElMessage.error("页面不存在");return a},mo={Sum:yf,Substract:gf,Multiple:bf,Divide:kf,Compare:mf,VecDimCount:xf,Approval:_f,VecRepCount:wf,AutoReportGen:Sf,OpenPortal:Ef},Rt=async(a,l,r,n="Auto",i,o=[],p=[])=>{var y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q;let c=a,u=[],m=await M.getPageDataApi({platId:parseInt((y=Jn==null?void 0:Jn.value)==null?void 0:y.plat_id),pageName:"menu"});m=(w=(A=(d=m==null?void 0:m.data)==null?void 0:d.result)==null?void 0:A.filter(Z=>(Z==null?void 0:Z.property_name)===""))==null?void 0:w[0];let g=[];if(m!=null&&m.object_name){m=m==null?void 0:m.object_name;let Z=await M.getPageDataApi({platId:parseInt((Y=Jn==null?void 0:Jn.value)==null?void 0:Y.plat_id),pageName:m});Z=(S=(E=(O=(P=(D=Z==null?void 0:Z.data)==null?void 0:D.result)==null?void 0:P[0])==null?void 0:O.contents)==null?void 0:E.find(ae=>{var ve;return(ve=ae==null?void 0:ae.key)==null?void 0:ve.includes("content")}))==null?void 0:S.value,u=(x=Z==null?void 0:Z.map(ae=>({functionName:ae==null?void 0:ae.函数名称,functionContent:ae==null?void 0:ae.输出值})))==null?void 0:x.filter(ae=>(ae==null?void 0:ae.functionContent)!==""),u==null||u.forEach(ae=>{g.push(ae.functionName),mo[ae.functionName]=new Function("return "+ae.functionContent)()})}if((l==null?void 0:l.length)===0)return c;for(let Z in l){let ae=(b=l==null?void 0:l[Z])==null?void 0:b.functionName;const ve=mo==null?void 0:mo[ae];let ze=(_=l==null?void 0:l[Z])==null?void 0:_.methods;if(ze=le.analyzeSplitToContent(ze,","),(I=ze==null?void 0:ze.find(te=>te==null?void 0:te.includes("@Type")))!=null&&I.includes(n)||!(ze!=null&&ze.find(te=>te==null?void 0:te.includes("@Type")))&&n==="Manual"||n==="Auto"||(ze==null?void 0:ze.length)===0){let te=((X=(re=(R=ze==null?void 0:ze.find(N=>N==null?void 0:N.includes("@Extent")))==null?void 0:R.replace(":","="))==null?void 0:re.split("="))==null?void 0:X[1])??[];if(await new Function("return ")(),(g==null?void 0:g.length)>0&&g.find(N=>N===ae)){let N="";try{let W=(ye=l==null?void 0:l[Z])==null?void 0:ye.functionRelatedWords,ue=(o==null?void 0:o.length)>0?o==null?void 0:o.map(we=>{var Ke;return we==null?void 0:we[(Ke=l==null?void 0:l[Z])==null?void 0:Ke.prop]}):["0"];ue=ue==null?void 0:ue.map(we=>we==null?void 0:we.slice((we==null?void 0:we.length)-5,we==null?void 0:we.length)),ue=ue==null?void 0:ue.map(we=>le.isNumber(parseInt(we))&&parseInt(we)?parseInt(we):0);let _e=Math.max(...ue);W=W==null?void 0:W.map(we=>{if(we!=null&&we.includes("'"))return we==null?void 0:we.replaceAll("'","");if(we!=null&&we.includes("@"))return _e+1;{let Ke=Object.keys(c);return we=(c==null?void 0:c[we])??(c==null?void 0:c[Ke==null?void 0:Ke.find(la=>la==null?void 0:la.includes("."+we))]),we}}),N=ve(...W)}catch(W){Ja.ElMessage.warning("关联数据出现错误,"+W.message)}let se=(fe=l==null?void 0:l[Z])==null?void 0:fe.prop;c[se]=N}else c=await ve({contents:c,valueString:(U=l==null?void 0:l[Z])==null?void 0:U.functionRelatedWords,prop:(q=l==null?void 0:l[Z])==null?void 0:q.prop,filter:ze,headers:r,typeString:te,allContents:i,compNames:p})}}return c},Cf=M.useLoginState(M.pinia),{loginUserInfo:xn}=M.storeToRefs(Cf),Df=M.useMenuState(M.pinia),{activeMenuPath:xs,currentMenuPath:yo}=M.storeToRefs(Df),xc=M.useUnit(M.pinia);let ws="$R";const{selectTitle:Mi}=M.storeToRefs(xc),wc=async(a,l)=>{var p,c,u,m,g,y,d,A,w,Y,D,P,O;let r=xs.value,n="",i=((p=Mi==null?void 0:Mi.value)==null?void 0:p.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(r=l?r:(c=a==null?void 0:a[0])==null?void 0:c.object_name,n=(u=a==null?void 0:a[0])==null?void 0:u.father_name);let o=[];if(n!==""){let E=n;(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 S=await Hr(E,!1);S=(m=S==null?void 0:S[0])==null?void 0:m.compData;let x=(g=S==null?void 0:S.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:g.contents;x=((y=x==null?void 0:x.find(_=>_==null?void 0:_.isMainKey))==null?void 0:y.prop)??((d=x==null?void 0:x[0])==null?void 0:d.prop);let b=(w=(A=S==null?void 0:S.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:A.contents)==null?void 0:w.map(_=>({label:_==null?void 0:_[x],value:_==null?void 0:_[x]}));o=(Y=n==null?void 0:n.split("/"))==null?void 0:Y.map(_=>(_===""?i?(i.isShow=!0,_=i):_={value:_,condition:"child",options:b,parentContent:(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"?n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1):n,isShow:!0}:_={condition:"parent",value:_.trim(),isShow:!0},_))}if(r!==""){let E=(D=r==null?void 0:r.split("/"))==null?void 0:D.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((P=E==null?void 0:E[0])==null?void 0:P.value)===((O=o==null?void 0:o[0])==null?void 0:O.value)&&(E=E==null?void 0:E.filter((S,x)=>x!==0)),o=[...o??[],...E??[]]}n===""&&i&&((i==null?void 0:i.parentContent)!==xs.value&&(i.isShow=!1),(i==null?void 0:i.value)!==""&&o.push(i)),xc.setSelectTitle(o)},Tf=async a=>{var o,p,c,u,m,g,y,d,A;let l=await M.getPageDataApi({platId:parseInt((o=xn==null?void 0:xn.value)==null?void 0:o.plat_id),pageName:"menu"}),r=(p=l==null?void 0:l.data)==null?void 0:p.result,n=(g=(m=(u=(c=a==null?void 0:a.filter(w=>(w==null?void 0:w.comp)==="Table"))==null?void 0:c[0])==null?void 0:u.compData)==null?void 0:m.find(w=>(w==null?void 0:w.key)==="filter"))==null?void 0:g.contents;n=(A=(d=(y=n==null?void 0:n.replace("(",ws))==null?void 0:y.split(ws))==null?void 0:d[0])==null?void 0:A.replaceAll(":","/");let i=r==null?void 0:r.filter(w=>{var Y;return(w==null?void 0:w.object_name)===yo.value+"/"||((Y=yo.value)==null?void 0:Y.includes(n))&&n+"/"===(w==null?void 0:w.object_name)||n===(w==null?void 0:w.object_name)});return(i==null?void 0:i.length)>0&&(a=a==null?void 0:a.map(w=>{var Y;return(w==null?void 0:w.comp)==="Table"&&(w.compData=(Y=w==null?void 0:w.compData)==null?void 0:Y.map(D=>{var P,O,E;return(D==null?void 0:D.key)==="header"&&(Array.isArray((P=D.contents)==null?void 0:P[0])?D.contents[0]=(E=D.contents[0])==null?void 0:E.map((S,x)=>{var b;return x===0&&(S.isExistChild=!0,((b=yo.value)!=null&&b.includes(n)||n)&&(S.fatherPath=n)),S}):D.contents=(O=D.contents)==null?void 0:O.map((S,x)=>{var b;return x===0&&(S.isExistChild=!0,((b=yo.value)!=null&&b.includes(n)||n)&&(S.fatherPath=n)),S})),D})),w})),a},Hr=async(a,l,r={})=>{var p,c,u,m,g,y,d,A,w,Y,D,P;let n=await M.getPageDataApi({platId:parseInt((p=xn==null?void 0:xn.value)==null?void 0:p.plat_id),pageName:a}),i=(c=n==null?void 0:n.data)==null?void 0:c.result;if((i==null?void 0:i.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==a){let O=await M.getPageDataApi({platId:parseInt((u=xn==null?void 0:xn.value)==null?void 0:u.plat_id),pageName:r==null?void 0:r.originPath});if(((g=(m=O==null?void 0:O.data)==null?void 0:m.result)==null?void 0:g.length)>0){let E=await bs((y=O==null?void 0:O.data)==null?void 0:y.result,r,!1);E=E==null?void 0:E.map(async b=>{var R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge;let _=[],I=(R=Object.keys(b))==null?void 0:R.filter($=>($==null?void 0:$.includes("name"))&&$!=="nameContents");for(let $ in b)I!=null&&I.find(V=>V===$)&&_.push(b==null?void 0:b[$]);if(_=_.reverse(),(b==null?void 0:b.comp)==="Table"){let $=(ye=(X=(re=b==null?void 0:b.compData)==null?void 0:re.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:X.contents)==null?void 0:ye.map(ee=>{let ce={};for(let he in ee)he!=="id"&&he!=="create_time"&&he!=="update_time"&&he!=="sort"&&he!=="create_user_id"&&he!=="update_user_id"&&he!=="department_id"&&he!=="relatedId"&&(ce[he]=ee==null?void 0:ee[he]);return ee=Object.values(ce),ee}),V=(U=(fe=b==null?void 0:b.compData)==null?void 0:fe.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:U.contents;if(Array.isArray(V==null?void 0:V[0])?(V[0].push({label:"排序",prop:"sort"}),V[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(q=V[0])!=null&&q.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(V[0]=(Z=V[0])==null?void 0:Z.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),V[0].unshift({label:"",prop:"disabled",sortable:!1}))):(V||(V=[]),V.push({label:"排序",prop:"sort"}),V.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),V!=null&&V.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(V=V==null?void 0:V.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),V.unshift({label:"",prop:"disabled",sortable:!1}))),V!=null&&V.some(ee=>{var ce;return(ee==null?void 0:ee.calculatorFilter)&&((ce=ee==null?void 0:ee.calculatorFilter)==null?void 0:ce.includes("Auto"))})&&($=await Ct($,V,"Auto"),$=$==null?void 0:$.map(ee=>Object.values(ee))),b!=null&&b.fatherSyncContents){Array.isArray((ae=b==null?void 0:b.fatherSyncContents)==null?void 0:ae[0])&&(b.fatherSyncContents=(ve=b==null?void 0:b.fatherSyncContents)==null?void 0:ve[0]);let ee=(ze=Mi.value)==null?void 0:ze.find(ce=>(ce==null?void 0:ce.condition)==="child");b.fatherSyncContents=(te=b==null?void 0:b.fatherSyncContents)==null?void 0:te.map(ce=>{var he,ca,ia,Ve,ga,Ta;return((ca=ce==null?void 0:ce.menus)==null?void 0:ca[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(ee==null?void 0:ee.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ta=ce.menus)==null?void 0:Ta.slice(0,((ga=ce.menus)==null?void 0:ga.length)-1)),ce})}if(b!=null&&b.sonSyncContents){Array.isArray((N=b==null?void 0:b.sonSyncContents)==null?void 0:N[0])&&(b.sonSyncContents=(se=b==null?void 0:b.sonSyncContents)==null?void 0:se[0]);let ee=(W=Mi.value)==null?void 0:W.find(ce=>(ce==null?void 0:ce.condition)==="child");b.sonSyncContents=(ue=b==null?void 0:b.sonSyncContents)==null?void 0:ue.map(ce=>{var he,ca,ia,Ve,ga,Ta;return((ca=ce==null?void 0:ce.menus)==null?void 0:ca[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(ee==null?void 0:ee.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ta=ce.menus)==null?void 0:Ta.slice(0,((ga=ce.menus)==null?void 0:ga.length)-1)),ce})}if(b!=null&&b.relatedQuotes){Array.isArray((_e=b==null?void 0:b.relatedQuotes)==null?void 0:_e[0])&&(b.relatedQuotes=(we=b==null?void 0:b.relatedQuotes)==null?void 0:we[0]);let ee=(Ke=Mi.value)==null?void 0:Ke.find(ce=>(ce==null?void 0:ce.condition)==="child");b.relatedQuotes=(la=b==null?void 0:b.relatedQuotes)==null?void 0:la.map(ce=>{var he,ca,ia,Ve,ga,Ta;return((ca=ce==null?void 0:ce.menus)==null?void 0:ca[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(ee==null?void 0:ee.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ta=ce.menus)==null?void 0:Ta.slice(0,((ga=ce.menus)==null?void 0:ga.length)-1)),ce})}b={filter:(We=(j=b==null?void 0:b.compData)==null?void 0:j.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:We.contents,key:b==null?void 0:b.comp,name:_,tableColumns:V,tableContents:$,menuFilter:b==null?void 0:b.menuFilter,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents,calculatorFilters:b==null?void 0:b.calculatorFilters}}else{let $=(Me=(Ie=(Oe=b==null?void 0:b.compData)==null?void 0:Oe.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ie.contents)==null?void 0:Me.map(ee=>(ee==null?void 0:ee.value)??"");$=[$];let V=(Je=(Ce=(de=b==null?void 0:b.compData)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ce.contents)==null?void 0:Je.map(ee=>(ee.value="",ee));b={contents:$,filter:(Ge=(Ea=b==null?void 0:b.compData)==null?void 0:Ea.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:Ge.contents,key:b==null?void 0:b.comp,name:_,value:V,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents,calculatorFilters:b==null?void 0:b.calculatorFilters}}return b.isShow=!1,b}),E=await Promise.all(E);let S=[{key:"menuPath",contents:[{path:a,fatherPath:(w=(A=(d=O==null?void 0:O.data)==null?void 0:d.result)==null?void 0:A[0])==null?void 0:w.father_name,isShow:!1}]},{key:a,contents:E}];await M.createPlatFormDataApi({platId:parseInt((Y=xn==null?void 0:xn.value)==null?void 0:Y.plat_id),changeData:S});let x=await M.getPageDataApi({platId:parseInt((D=xn==null?void 0:xn.value)==null?void 0:D.plat_id),pageName:a});i=(P=x==null?void 0:x.data)==null?void 0:P.result}}l&&await wc(i,!!(r!=null&&r.originPath));let o=await bs(i,r);return l&&(o=await Tf(o)),o==null?void 0:o.filter(O=>O)},_s=async a=>{var n,i,o,p,c,u,m,g,y,d,A;let l=(n=a==null?void 0:a.menus)==null?void 0:n.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+((o=(i=a.value)==null?void 0:i.split(" "))==null?void 0:o[0]));let r=await Hr(l,!1);if(r=(p=r==null?void 0:r.filter(w=>{var Y,D;return(w==null?void 0:w.name)===((D=a==null?void 0:a.groups)==null?void 0:D[((Y=a==null?void 0:a.groups)==null?void 0:Y.length)-1])}))==null?void 0:p[0],(u=(c=r==null?void 0:r.compData)==null?void 0:c.find(w=>(w==null?void 0:w.key)==="tableContents"))!=null&&u.contents){r=(g=(m=r==null?void 0:r.compData)==null?void 0:m.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:g.contents;let w=((y=a==null?void 0:a.words)==null?void 0:y[0])??(a==null?void 0:a.prop);return r=r==null?void 0:r.filter(Y=>{var D,P,O,E;return(Y==null?void 0:Y[a!=null&&a.endChildMenu?w:(D=a==null?void 0:a.words)==null?void 0:D[0]])===(a!=null&&a.relatedWords&&((P=a==null?void 0:a.relatedWords)==null?void 0:P.length)>0?(E=(O=a.value)==null?void 0:O.split(" "))==null?void 0:E[0]:a.value)}),r==null?void 0:r[0]}else{let w=(A=(d=r==null?void 0:r.compData)==null?void 0:d.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:A.contents,Y={};return w==null||w.forEach(D=>{Y[D.prop]=D.value}),Y}},Bf={key:0,class:"extra-button-content"},Nf={class:"table-operator-wrap"},Af={key:0,class:"extra-button-filter"},zf={key:1,class:"extra-header"},Mf=["onClick"],If={class:"table-op-text"},Of={class:"table-op-text"},Lf={class:"drop-menu",style:{width:"120px"}},Rf=["onClick"],$f={key:0},Vf={key:1},Ff=["onClick"],Pf={class:"table-op-text"},jf={key:1,class:"extra-button-content tabs-button-wrapper"},Hf={class:"table-operator-wrap"},Uf={class:"extra-button-filter"},qf={key:0,class:"extra-header"},Wf={class:"table-op-action"},Kf={class:"table-op-text"},Gf={class:"drop-menu",style:{width:"120px"}},Yf={key:0},Jf={key:1},Xf=["onClick"],Zf={class:"table-op-text"},Qf={__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 r=l,n=a,i=()=>{const I=(n==null?void 0:n.menuFilter)||[];return Array.isArray(I)&&(I==null?void 0:I.some(R=>{const re=typeof R=="string"?R:JSON.stringify(R);return re==null?void 0:re.includes("HideGroup=Yes")}))},o=e.ref(""),p=e.ref(!1),c=e.ref(!1),u=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),g=[{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 y(I,R){return I.map(re=>{const X={...re};return R.forEach(ye=>{delete X[ye]}),X})}function d(I){if(!I||I.t!=="n")return(I==null?void 0:I.v)??"";const R=I.v;if(I.z){const re=String(I.z).toLowerCase(),X=["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 U of X)if(re.includes(U))return A(R);const ye=/[ymdhms]/.test(re),fe=/^[0#\.\,\s]+$/.test(re.replace(/[\\\/\-:]/g,""));if(ye&&!fe)return A(R)}if(R>=1&&R<=73050){if(R<5e3)return R;if(R>=5e3&&R<4e4){const re=Math.floor((R-25569)/365.25)+1970;return re>=1970&&re<=2e3&&I.z&&/[ymd]/.test(String(I.z).toLowerCase())?A(R):R}if(R>=4e4)return A(R)}return R}function A(I){if(typeof I!="number")return I;try{const R=new Date((I-25569)*86400*1e3);if(isNaN(R.getTime()))return I;const re=R.getFullYear(),X=String(R.getMonth()+1).padStart(2,"0"),ye=String(R.getDate()).padStart(2,"0");return`${re}-${X}-${ye}`}catch{return I}}const w=I=>{const R=I.raw;if(!R)return;const re=new FileReader;re.onload=X=>{try{const ye=new Uint8Array(X.target.result),fe=le.readSync(ye,{type:"array"}),U=fe.SheetNames[0],q=fe.Sheets[U],ae=le.utils.decode_range(q["!ref"]).e.c+1,ve=new Array(ae).fill(""),ze=[];for(const ue in q){if(ue[0]==="!")continue;const{r:_e,c:we}=le.utils.decode_cell(ue),Ke=q[ue];let la=d(Ke);if((la==null||la==="")&&(la=""),_e===0)ve[we]=la;else{if(!ze[_e-1]){ze[_e-1]={};for(let j=0;j<ae;j++)ze[_e-1][`col_${j}`]=""}ze[_e-1][`col_${we}`]=la}}for(let ue=0;ue<ae;ue++)ve[ue]===void 0&&(ve[ue]="");const te=[];for(let ue=0;ue<ve.length;ue++)(!ve[ue]||ve[ue].toString().trim()==="")&&te.push(ue);let N,se;(te==null?void 0:te.length)>0?(Ja.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),N=ve.filter((ue,_e)=>!te.includes(_e)),se=y(ze,te==null?void 0:te.map(ue=>`col_${ue}`))):(N=ve,se=ze);const W=ze==null?void 0:ze[0];if(!(W!=null&&W.hasOwnProperty("col_0")))return Ja.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",N,se)}catch(ye){throw Ja.ElMessage.error(ye.message),new Error(ye.message)}},re.readAsArrayBuffer(R)},Y=I=>{var re;const R=(re=u.value)==null?void 0:re.reduce((X,ye,fe)=>(fe===0?X[ye.label]=I:X[ye.label]=ye==null?void 0:ye.value,X),{});r("filter",R,I,!0)},D=(I,R={})=>{r("buttonClick",I,"",R)},P=I=>{var R,re;u.value=(re=(R=le.getColumnChild(M.cloneDeep(I)))==null?void 0:R.filter(X=>(X==null?void 0:X.label)!==""&&(X==null?void 0:X.label)!=="操作"))==null?void 0:re.map(X=>({label:(X==null?void 0:X.label)??"",value:"",name:(X==null?void 0:X.prop)??"",isFormColHidden:X==null?void 0:X.isTableColHidden,width:3,prop:(X==null?void 0:X.prop)??""}))},O=e.ref(!1),E=I=>{var R;if((I==null?void 0:I.buttonName)==="确认"&&(r("filter",I==null?void 0:I.content),O.value=(I==null?void 0:I.content)&&Object.values(I==null?void 0:I.content).length>0),(I==null?void 0:I.buttonName)==="清空"){const re=M.cloneDeep(I==null?void 0:I.content);for(const X in re)re[X]="";u.value=(R=u.value)==null?void 0:R.map(X=>({...X,value:""})),r("filter",re),O.value=!1}p.value=!1},S=()=>{p.value=!p.value,c.value=!0},x=()=>{var R,re;u.value=(R=u.value)==null?void 0:R.map(X=>({...X,value:""}));const I=(re=u.value)==null?void 0:re.reduce((X,ye)=>(X[ye.label]=ye.value,X),{});r("filter",I)},b=e.ref(null);let _;return _=I=>{var ye;if(!p.value)return;const R=(ye=b==null?void 0:b.value)==null?void 0:ye.$el,re=R==null?void 0:R.contains(I.target);let X=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(fe=>{fe.contains(I.target)&&(X=!0)}),!re&&!X&&(p.value=!1)},e.onMounted(()=>{document.addEventListener("click",_),P(n.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",_)}),e.watch(()=>n.columns,()=>{P(n.columns)},{deep:!0,immediate:!0}),(I,R)=>{var q,Z,ae,ve,ze,te,N,se;const re=e.resolveComponent("el-icon"),X=e.resolveComponent("svg-icon"),ye=e.resolveComponent("el-input"),fe=e.resolveComponent("el-upload"),U=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Bf,[i()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(n==null?void 0:n.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((n==null?void 0:n.level)-1)*12+"px",fontWeight:600-((n==null?void 0:n.level)-1)*100>=400?600-((n==null?void 0:n.level)-1)*100:400,fontSize:17-(n==null?void 0:n.level)>=14?17-(n==null?void 0:n.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Nf,[n!=null&&n.filterShow?(e.openBlock(),e.createElementBlock("div",Af,[e.createVNode(nd,{trigger:"contextmenu",ref_key:"popOverRef",ref:b,title:"",width:800,placement:"bottom-start",isVisible:p.value,"onUpdate:isVisible":R[4]||(R[4]=W=>p.value=W)},{reference:e.withCtx(()=>{var W,ue,_e,we;return[e.createVNode(ye,{modelValue:o.value,"onUpdate:modelValue":R[0]||(R[0]=Ke=>o.value=Ke),style:{"min-width":"80px"},placeholder:O.value?(_e=(ue=(W=a.filterValues)==null?void 0:W.filter(Ke=>Ke))==null?void 0:ue.slice(0,3))==null?void 0:_e.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:Y,disabled:((we=u.value)==null?void 0:we.length)===0},{suffix:e.withCtx(()=>{var Ke,la;return[!o.value&&((la=(Ke=a.filterValues)==null?void 0:Ke.filter(j=>j))!=null&&la.join("/"))?(e.openBlock(),e.createBlock(re,{key:0,style:{cursor:"pointer"},onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(X,{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:R[1]||(R[1]=e.withModifiers(()=>{},["stop"])),onKeyup:R[2]||(R[2]=e.withModifiers(()=>{},["stop"])),onKeypress:R[3]||(R[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,buttonValue:m.value,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&&((q=a.buttons)==null?void 0:q.length)>0?(e.openBlock(),e.createElementBlock("div",zf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Z=a.buttons)==null?void 0:Z.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,ue)=>{var _e;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ue},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(fe,{key:0,class:"upload-button-wrap","on-change":w,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var we;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ke=>D(W==null?void 0:W.label)},[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",If,e.toDisplayString(W==null?void 0:W.label),1)],10,Mf)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(dl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var we;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",Of,e.toDisplayString(W==null?void 0:W.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Lf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,we=>{var Ke,la;return e.openBlock(),e.createElementBlock("div",{key:we==null?void 0:we.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:j=>!a.lockingPage&&D(we==null?void 0:we.label)},[e.createTextVNode(e.toDisplayString(we==null?void 0:we.label),1),(Ke=we==null?void 0:we.label)!=null&&Ke.includes("选中")?(e.openBlock(),e.createElementBlock("span",$f,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(la=we==null?void 0:we.label)!=null&&la.includes("全部")?(e.openBlock(),e.createElementBlock("span",Vf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Rf)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:we=>!a.lockingPage&&D(W==null?void 0:W.label,W)},[e.createVNode(X,{class:"table-op-icon",name:((_e=g==null?void 0:g.find(we=>(we==null?void 0:we.label)===(W==null?void 0:W.label)))==null?void 0:_e.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",Pf,e.toDisplayString(W==null?void 0:W.label),1)],10,Ff)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",jf,[e.createElementVNode("div",Hf,[e.createElementVNode("div",Uf,[e.createVNode(ye,{modelValue:o.value,"onUpdate:modelValue":R[5]||(R[5]=W=>o.value=W),style:{"min-width":"80px"},placeholder:O.value?(ze=(ve=(ae=a.filterValues)==null?void 0:ae.filter(W=>W))==null?void 0:ve.slice(0,3))==null?void 0:ze.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:Y,disabled:((te=u.value)==null?void 0:te.length)===0},{suffix:e.withCtx(()=>{var W,ue;return[!o.value&&((ue=(W=a.filterValues)==null?void 0:W.filter(_e=>_e))!=null&&ue.join("/"))?(e.openBlock(),e.createBlock(re,{key:0,style:{cursor:"pointer"},onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(X,{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",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=a.buttons)==null?void 0:se.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,ue)=>{var _e;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ue},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(fe,{key:0,class:"upload-button-wrap","on-change":w,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var we;return[e.createElementVNode("div",Wf,[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",Kf,e.toDisplayString(W==null?void 0:W.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(dl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(U,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var we;return[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(W==null?void 0:W.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Gf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,we=>(e.openBlock(),e.createBlock(U,{key:we==null?void 0:we.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ke=>D(we==null?void 0:we.label)},{default:e.withCtx(()=>{var Ke,la;return[e.createTextVNode(e.toDisplayString(we==null?void 0:we.label),1),(Ke=we==null?void 0:we.label)!=null&&Ke.includes("选中")?(e.openBlock(),e.createElementBlock("span",Yf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(la=we==null?void 0:we.label)!=null&&la.includes("全部")?(e.openBlock(),e.createElementBlock("span",Jf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:we=>!a.lockingPage&&D(W==null?void 0:W.label,W)},[e.createVNode(X,{class:"table-op-icon",name:(_e=g==null?void 0:g.find(we=>(we==null?void 0:we.label)===(W==null?void 0:W.label)))==null?void 0:_e.icon},null,8,["name"]),e.createElementVNode("span",Zf,e.toDisplayString(W==null?void 0:W.label),1)],10,Xf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},e0=sr._export_sfc(Qf,[["__scopeId","data-v-c54c7b35"]]),a0={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,r)=>{const n=e.resolveComponent("el-table-column"),i=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(i,{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,o=>{var p;return e.openBlock(),e.createBlock(n,{key:o==null?void 0:o.prop,label:o==null?void 0:o.label,prop:o==null?void 0:o.prop,fixed:(o==null?void 0:o.prop)==="operate"?"right":o==null?void 0:o.fixed,align:(o==null?void 0:o.align)??"left","show-overflow-tooltip":(o==null?void 0:o.showOverflowTooltip)??!0,width:o==null?void 0:o.width,"min-width":(o==null?void 0:o.minWidth)||((o==null?void 0:o.prop)==="operate"?80:(((p=o==null?void 0:o.label)==null?void 0:p.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(o.children,(u,m)=>(e.openBlock(),e.createBlock(dl._sfc_main$2,{key:m,column:u,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(g,y)=>({name:y,fn:e.withCtx(({row:d,slotData:A,item:w,column:Y})=>[e.renderSlot(l.$slots,y,e.mergeProps({ref_for:!0},A??d,{item:w??u,slotData:A??d,row:d,column:Y,columnProp:u}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class l0 extends Fl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,r,n,i){const o=this,p=new Fl.FileLoader(o.manager);p.setPath(o.path),p.setResponseType("arraybuffer"),p.setRequestHeader(o.requestHeader),p.setWithCredentials(o.withCredentials),p.load(l,function(c){try{r(o.parse(c))}catch(u){i?i(u):console.error(u),o.manager.itemError(l)}},n,i)}_getDataView(l,r,n,i){switch(n){case"F":return i===8?l.getFloat64(r,this.littleEndian):l.getFloat32(r,this.littleEndian);case"I":return i===1?l.getInt8(r):i===2?l.getInt16(r,this.littleEndian):l.getInt32(r,this.littleEndian);case"U":return i===1?l.getUint8(r):i===2?l.getUint16(r,this.littleEndian):l.getUint32(r,this.littleEndian)}}parse(l){function r(A,w){const Y=A.length,D=new Uint8Array(w);let P=0,O=0,E,S,x;do if(E=A[P++],E<32){if(E++,O+E>w)throw new Error("Output buffer is not large enough");if(P+E>Y)throw new Error("Invalid compressed data");do D[O++]=A[P++];while(--E)}else{if(S=E>>5,x=O-((E&31)<<8)-1,P>=Y)throw new Error("Invalid compressed data");if(S===7&&(S+=A[P++],P>=Y))throw new Error("Invalid compressed data");if(x-=A[P++],O+S+2>w)throw new Error("Output buffer is not large enough");if(x<0)throw new Error("Invalid compressed data");if(x>=O)throw new Error("Invalid compressed data");do D[O++]=D[x++];while(--S+2)}while(P<Y);return D}function n(A){const w={},Y=new Uint8Array(A);let D="",P="",O=0,E=!1;const S=Y.length;for(;O<S&&E===!1;){const I=String.fromCharCode(Y[O++]);I===`
1
+ "use strict";var Xu=Object.defineProperty;var Zu=(a,l,r)=>l in a?Xu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[l]=r;var hn=(a,l,r)=>Zu(a,typeof l!="symbol"?l+"":l,r);const e=require("vue"),Ja=require("./request-Dl8yi2iS.cjs"),M=require("./index-CMUsYepp.cjs"),dl=require("./index-CHPMsDPK.cjs"),le=require("./index-B7964G2F.cjs"),sr=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fl=require("./index.vue_vue_type_style_index_0_scoped_07c75c98_lang-Byr5bNn8.cjs"),$r=require("./index-B-pflqKE.cjs"),Do=require("./threeViewerHost-s3KEeoPW.cjs"),Zr=require("./index-DmwxzDGW.cjs"),hs=require("./index-AxoUaL28.cjs"),cc=require("./index-DXiuTpL6.cjs");;/* empty css */const To=require("./isString-CGrvcmBw.cjs"),vs=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),uc=require("./index-BVaHwt5f.cjs"),Qu=require("./index-C4miPF2C.cjs"),Kn=require("./MTLLoader-BV8-OAj_.cjs"),ed=require("./URDFLoader-DSfk-yVN.cjs");var ad="[object Boolean]";function dc(a){return a===!0||a===!1||Ja.isObjectLike(a)&&Ja.baseGetTag(a)==ad}function ld(a){return a===void 0}const rd=a=>a.match(/\((.*)\)/)[1],nd={__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,r=e.ref(null),n=e.ref(!1),i=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{n.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>i.value,()=>{e.nextTick(()=>{var o,p;(p=(o=r.value)==null?void 0:o.updatePopper)==null||p.call(o)})},{deep:!0,immediate:!0}),(o,p)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:n.value,"onUpdate:visible":p[0]||(p[0]=u=>n.value=u),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:r,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"reference",{ref_key:"referenceRef",ref:i})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(o.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},id=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,r=e.computed(()=>{var u,m,g,y,d,A;const n=l.value??"";let i=(u=l==null?void 0:l.columnContent)==null?void 0:u.filter;if(i=(m=le.analyzeSplitToContent(i,","))==null?void 0:m.map(w=>((w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),w)),i=i==null?void 0:i.find(w=>(w==null?void 0:w[0])==="("),(i==null?void 0:i[0])==="("&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split("||"),!i)return{backgroundColor:void 0,color:void 0};let o=(y=(g=l==null?void 0:l.columnContent)==null?void 0:g.options)==null?void 0:y.findIndex(w=>(w==null?void 0:w.value)===n);o=i==null?void 0:i[o],o=le.analyzeSplitToContent(o,","),o=o==null?void 0:o.map(w=>((w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),w));let p=o==null?void 0:o.find(w=>w==null?void 0:w.includes("@TextBackRGBA"));p?p=le.rgbaToColor((d=p==null?void 0:p.split("="))==null?void 0:d[1]):p=void 0;let c=o==null?void 0:o.find(w=>w==null?void 0:w.includes("@TextRGBA"));return c?c=le.rgbaToColor((A=c==null?void 0:c.split("="))==null?void 0:A[1]):c=void 0,{backgroundColor:p,color:c}});return(n,i)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(r.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),od=sr._export_sfc(id,[["__scopeId","data-v-3290070b"]]);function td(a,l,r,n={}){if(!a||!l||!r||r.length!==4)return;const i=a.getContext("2d");if(!i)return;const{color:o="rgba(255, 235, 59, 0.3)",strokeWidth:p=2,fillOpacity:c=.2}=n,u=a.getBoundingClientRect(),m=l.getBoundingClientRect(),g=l.naturalWidth,y=l.naturalHeight,d=m.width/g,A=m.height/y,w=Math.min(d,A),Y=g*w,D=y*w,P=(u.width-Y)/2,O=(u.height-D)/2,E=r.map(([x,b])=>{const _=P+x*Y,I=O+b*D;return{x:_,y:I}});i.clearRect(0,0,a.width,a.height),i.beginPath(),i.moveTo(E[0].x,E[0].y);for(let x=1;x<E.length;x++)i.lineTo(E[x].x,E[x].y);i.closePath();const S=o.replace(/[\d.]+\)$/,`${c})`);i.fillStyle=S,i.fill(),i.strokeStyle=o.replace(/[\d.]+\)$/,"1)"),i.lineWidth=p,i.stroke()}function Ti(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ms(a,l){if(!a||!l)return null;const r=a[l];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const sd={key:0,class:"ocr-img-preview-root"},cd={class:"ocr-img-preview-window"},ud={key:0,class:"img-preview-body"},dd={class:"img-preview-header"},pd={class:"img-header-left"},fd={class:"img-name"},hd={key:0,class:"img-header-right"},vd={class:"img-index"},md={key:0,class:"img-thumb-list"},yd=["onClick"],gd={key:1,class:"thumb-placeholder"},bd={class:"thumb-name"},kd={class:"img-preview-container"},xd={key:0,class:"img-placeholder"},wd={key:2,class:"img-placeholder"},_d={key:0},Sd={key:1},Ed={key:1,class:"img-placeholder"},Cd=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 r=a,n=l,i=e.computed({get:()=>r.visible,set:N=>n("update:visible",N)});let o=!1,p="",c=0,u=0,m=0,g=0,y=0,d=0,A=null;const w=N=>{var W,ue;const se=(ue=(W=N==null?void 0:N.target)==null?void 0:W.closest)==null?void 0:ue.call(W,".ocr-img-preview-window");return se||document.querySelector(".ocr-img-preview-window")},Y=N=>{if(!N||N==="none")return{tx:0,ty:0};let se=N.match(/matrix\(([^)]+)\)/);if(se){const W=se[1].split(",").map(ue=>Number(ue.trim()));return{tx:(W==null?void 0:W[4])||0,ty:(W==null?void 0:W[5])||0}}if(se=N.match(/matrix3d\(([^)]+)\)/),se){const W=se[1].split(",").map(ue=>Number(ue.trim()));return{tx:(W==null?void 0:W[12])||0,ty:(W==null?void 0:W[13])||0}}return se=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),se?{tx:Number(se[1])||0,ty:Number(se[2])||0}:{tx:0,ty:0}},D=(N,se,W)=>{N.style.transform=`translate(${se}px, ${W}px)`},P=N=>{const se=w(N);if(!se)return;o=!0,A=se,p="move",c=N.clientX,u=N.clientY;const W=window.getComputedStyle(se),{tx:ue,ty:_e}=Y(W.transform);y=ue,d=_e,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},O=(N,se)=>{const W=w(N);if(!W)return;o=!0,A=W,p=se,c=N.clientX,u=N.clientY;const ue=W.getBoundingClientRect();m=ue.width,g=ue.height;const _e=window.getComputedStyle(W),{tx:we,ty:Ke}=Y(_e.transform);y=we,d=Ke,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=N=>{if(!o||!A)return;const se=N.clientX-c,W=N.clientY-u,ue=360,_e=420;let we=m,Ke=g,la=y,j=d;if(p==="move"){la=y+se,j=d+W,D(A,la,j);return}if(p.includes("right")&&(we=Math.max(ue,m+se)),p.includes("bottom")&&(Ke=Math.max(_e,g+W)),p.includes("left")){const We=m-se;We<ue?(we=ue,la=y+(m-ue)):(we=We,la=y+se)}if(p.includes("top")){const We=g-W;We<_e?(Ke=_e,j=d+(g-_e)):(Ke=We,j=d+W)}A.style.width=`${we}px`,A.style.height=`${Ke}px`,D(A,la,j)},S=()=>{o=!1,p="",A=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)},x=e.ref([]),b=e.ref(!1);e.watch(()=>r.images,async N=>{if(!Array.isArray(N)||N.length===0){x.value=[];return}b.value=!0;const se=[];for(const W of N)if(W.url&&!W.url.startsWith("blob:")&&!W.url.startsWith("http"))try{const ue=await Fl.downloadFile(W.url),_e=URL.createObjectURL(ue);se.push({...W,blobUrl:_e})}catch(ue){console.error(`Failed to load image for preview: ${W.url}`,ue),se.push({...W,blobUrl:""})}else se.push({...W,blobUrl:W.url});x.value=se,b.value=!1},{deep:!0,immediate:!0});const _=e.ref(0),I=e.ref(null),R=e.ref(null),re=e.computed(()=>x.value[_.value]||null),X=()=>{if(!x.value.length){_.value=0;return}if(r.defaultImageName){const N=x.value.findIndex(se=>(se==null?void 0:se.name)===r.defaultImageName);_.value=N>=0?N:0}else _.value=0},ye=N=>{if(!x.value.length)return;const se=Math.max(0,Math.min(N,x.value.length-1));_.value=se},fe=()=>ye(_.value-1),U=()=>ye(_.value+1),q=N=>{if(!N)return;const se=x.value.findIndex(W=>(W==null?void 0:W.name)===N);se>=0&&(_.value=se)},Z=()=>{if(!R.value)return;const N=R.value.parentElement;if(!N)return;const se=N.getBoundingClientRect();R.value.width=se.width,R.value.height=se.height},ae=()=>{var ue,_e;if(!R.value||!I.value||!r.focusedFieldName){R.value&&Ti(R.value);return}const N=(ue=I.value.$el)==null?void 0:ue.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{ae()})};return}const se=((_e=re.value)==null?void 0:_e.name)||"",W=ms(r.fieldMeta,r.focusedFieldName);if(!W){Ti(R.value);return}if(W.imageName!==se){Ti(R.value);return}Z(),td(R.value,N,W.bboxNorm)},ve=()=>{e.nextTick(()=>{Z(),ae()})};e.watch(()=>r.focusedFieldName,()=>{if(!i.value)return;const N=ms(r.fieldMeta,r.focusedFieldName);N!=null&&N.imageName&&q(N.imageName),e.nextTick(()=>{ae()})}),e.watch(()=>{var N;return(N=re.value)==null?void 0:N.name},()=>{i.value&&e.nextTick(()=>{R.value&&Ti(R.value),ae()})}),e.watch(()=>r.visible,N=>{N?(X(),e.nextTick(()=>{Z(),ae()})):R.value&&Ti(R.value)}),e.watch(()=>r.defaultImageName,()=>{i.value&&X()});let ze=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&(ze=new ResizeObserver(()=>{Z(),e.nextTick(()=>{ae()})}),(N=R.value)!=null&&N.parentElement&&ze.observe(R.value.parentElement))}),e.onUnmounted(()=>{ze&&(ze.disconnect(),ze=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const te=()=>{R.value&&Ti(R.value),n("update:visible",!1),n("close")};return(N,se)=>{var Ke,la;const W=e.resolveComponent("el-button"),ue=e.resolveComponent("el-image"),_e=e.resolveComponent("Loading"),we=e.resolveComponent("el-icon");return i.value?(e.openBlock(),e.createElementBlock("div",sd,[se[12]||(se[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",cd,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(P,["stop"])},[se[8]||(se[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:te},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:se[0]||(se[0]=e.withModifiers(j=>O(j,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:se[1]||(se[1]=e.withModifiers(j=>O(j,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:se[2]||(se[2]=e.withModifiers(j=>O(j,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:se[3]||(se[3]=e.withModifiers(j=>O(j,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:se[4]||(se[4]=e.withModifiers(j=>O(j,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:se[5]||(se[5]=e.withModifiers(j=>O(j,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:se[6]||(se[6]=e.withModifiers(j=>O(j,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:se[7]||(se[7]=e.withModifiers(j=>O(j,"bottom-right"),["stop"]))},null,32),re.value?(e.openBlock(),e.createElementBlock("div",ud,[e.createElementVNode("div",dd,[e.createElementVNode("div",pd,[e.createElementVNode("span",fd,e.toDisplayString(re.value.name?re.value.name+(re.value.url&&re.value.url.lastIndexOf(".")!==-1?re.value.url.substring(re.value.url.lastIndexOf(".")):""):""),1)]),x.value.length>1?(e.openBlock(),e.createElementBlock("div",hd,[e.createVNode(W,{size:"small",disabled:_.value===0,onClick:fe},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",vd,e.toDisplayString(_.value+1)+" / "+e.toDisplayString(x.value.length),1),e.createVNode(W,{size:"small",disabled:_.value===x.value.length-1,onClick:U},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),x.value.length>1?(e.openBlock(),e.createElementBlock("div",md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(j,We)=>(e.openBlock(),e.createElementBlock("div",{key:(j.name||"")+"-"+We,class:e.normalizeClass(["img-thumb-item",{active:We===_.value}]),onClick:Oe=>ye(We)},[j!=null&&j.blobUrl?(e.openBlock(),e.createBlock(ue,{key:0,src:j.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[j.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",gd,"加载失败")),e.createElementVNode("div",bd,e.toDisplayString(j.name||"-"),1)],10,yd))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",kd,[b.value?(e.openBlock(),e.createElementBlock("div",xd,[e.createVNode(we,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(_e)]),_:1}),se[11]||(se[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(Ke=re.value)!=null&&Ke.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ue,{ref_key:"imageRef",ref:I,src:re.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[re.value.blobUrl],onLoad:ve},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:R,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",wd,[(la=re.value)!=null&&la.url?(e.openBlock(),e.createElementBlock("span",_d,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",Sd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",Ed,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),Dd=sr._export_sfc(Cd,[["__scopeId","data-v-48a4ecb1"]]),Td={class:"cert-preview-body"},Bd={key:0,class:"pdf-preview-container"},Nd={class:"thumbs"},Ad=["onClick"],zd={class:"thumb-img"},Md=["src"],Id={key:1,class:"thumb-loading"},Od={class:"thumb-title"},Ld={class:"viewer"},Rd={key:0,class:"viewer-img-wrap"},$d=["src"],Vd={key:1,class:"viewer-loading"},Fd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(""),o=e.ref(""),p=e.computed(()=>(r.versions||[]).find(w=>String(w.versionId)===String(i.value))),c=e.ref({}),u=e.ref(""),m=e.ref("证书附件.pdf"),g=()=>{try{Object.values(c.value||{}).forEach(w=>{w&&URL.revokeObjectURL(w)}),u.value&&URL.revokeObjectURL(u.value)}catch{}c.value={},u.value=""},y=async w=>{if(!w||w.fileType==="pdf")return;const Y=Array.isArray(w.images)?w.images:[];for(const D of Y){const P=D==null?void 0:D.url;if(!(!P||c.value[P]))try{const O=await M.platformDownloadFile({url:P}),E=URL.createObjectURL(O.data);c.value={...c.value,[P]:E}}catch{}}},d=async w=>{var D;if(!w||w.fileType!=="pdf"){u.value="";return}const Y=w.sourceUrl||"";if(!Y){u.value="";return}if(u.value){try{URL.revokeObjectURL(u.value)}catch{}u.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:Y,versionId:w==null?void 0:w.versionId,certNo:w==null?void 0:w.certNo});const P=await M.platformDownloadFile({url:Y});console.log("[CertificatePreview] PDF响应:",{url:Y,status:P==null?void 0:P.status,size:(D=P==null?void 0:P.data)==null?void 0:D.size});const O=URL.createObjectURL(P.data);u.value=O;const E=w.certNo?String(w.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(P){console.error("[CertificatePreview] PDF加载失败:",{url:Y,error:P}),u.value=""}};e.watch(()=>r.visible,async w=>{var D;if(!w){g();return}const Y=(D=r.versions)==null?void 0:D[0];i.value=(Y==null?void 0:Y.versionId)||"",await y(Y),await d(Y)},{immediate:!0}),e.watch(()=>i.value,async()=>{var Y,D;const w=p.value;if(!w){o.value="",u.value="";return}if(w.fileType==="pdf"){o.value="",await d(w);return}u.value="",o.value=((D=(Y=w.images)==null?void 0:Y[0])==null?void 0:D.url)||"",await y(w)},{immediate:!0});const A=()=>{n("update:visible",!1),g()};return e.onBeforeUnmount(()=>{g()}),(w,Y)=>{const D=e.resolveComponent("el-empty"),P=e.resolveComponent("el-tab-pane"),O=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),S=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(S,{"model-value":w.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:A},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:A},{default:e.withCtx(()=>Y[1]||(Y[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[w.versions&&w.versions.length>0?(e.openBlock(),e.createBlock(O,{key:0,modelValue:i.value,"onUpdate:modelValue":Y[0]||(Y[0]=x=>i.value=x),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.versions,x=>(e.openBlock(),e.createBlock(P,{key:x.versionId,name:x.versionId,label:x.label},{default:e.withCtx(()=>[e.createElementVNode("div",Td,[x.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",Bd,[u.value?(e.openBlock(),e.createBlock(dl.SsFilePreview,{key:1,fileName:m.value,blobUrl:u.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(D,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Nd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.images||[],b=>(e.openBlock(),e.createElementBlock("div",{key:b.url,class:e.normalizeClass(["thumb",{active:b.url===o.value}]),onClick:_=>o.value=b.url},[e.createElementVNode("div",zd,[c.value[b.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[b.url]},null,8,Md)):(e.openBlock(),e.createElementBlock("div",Id,"加载中"))]),e.createElementVNode("div",Od,e.toDisplayString(b.name),1)],10,Ad))),128))]),e.createElementVNode("div",Ld,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[o.value]?(e.openBlock(),e.createElementBlock("div",Rd,[e.createElementVNode("img",{class:"viewer-img",src:c.value[o.value]},null,8,$d)])):(e.openBlock(),e.createElementBlock("div",Vd,"加载中"))],64)):(e.openBlock(),e.createBlock(D,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(D,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),Pd=sr._export_sfc(Fd,[["__scopeId","data-v-220703c0"]]),jd={class:"ocr-candidate-wrap"},Hd={class:"ocr-candidate-left"},Ud={key:1},qd={key:0},Wd={key:1},Kd={key:2},Gd={key:3},Yd={key:0,class:"ocr-candidate-right"},Jd={class:"ocr-candidate-actions"},Xd={key:1},Zd={class:"dialog-footer"},Qd={__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 r=(_=[])=>{const I=[],R=re=>{(re||[]).forEach(X=>{if(!X)return;const ye=X.children||X.childrens||X.columns;Array.isArray(ye)&&ye.length>0?R(ye):I.push(X)})};return R(_),I},n=a,i=l,o=e.computed(()=>{var _;return((_=d.value)==null?void 0:_.allowAdd)!==!1}),p=e.computed(()=>{var _;return((_=d.value)==null?void 0:_.allowReplace)!==!1}),c=_=>{if(!_)return[];if(Array.isArray(_))return _;if(typeof _=="string")try{const I=JSON.parse(_);return Array.isArray(I)?I:[]}catch{return[]}return[]},u=_=>{i("preview-file",_)},m=e.ref([]),g=e.ref(0),y=e.ref("");e.watch(()=>n.candidates,_=>{var I,R;m.value=(_||[]).map(re=>({...re,...(re==null?void 0:re.ocrRow)||{},selectedTargetId:(re==null?void 0:re.selectedTargetId)||"",__decision:re==null?void 0:re.__decision})),g.value=0,y.value=((R=(I=m.value)==null?void 0:I[0])==null?void 0:R.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>n.visible,_=>{var I,R;_&&(g.value=0,y.value=((R=(I=m.value)==null?void 0:I[0])==null?void 0:R.selectedTargetId)||"")});const d=e.computed(()=>{var I;const _=Number(g.value||0);return((I=m.value||[])==null?void 0:I[_])||null}),A=e.computed(()=>(r(n.columns||[])||[]).filter(R=>R&&R.prop).filter(R=>R.type!=="operate"&&R.label!=="操作"&&R.prop!=="operate")),w=e.computed(()=>A.value.filter(_=>_.label!=="证书附件"&&_.prop!=="证书附件")),Y=_=>{if(!_)return;const I=(m.value||[]).findIndex(R=>(R==null?void 0:R.idx)===(_==null?void 0:_.idx));I>-1&&(g.value=I,y.value=(_==null?void 0:_.selectedTargetId)||"")},D=_=>{if(!_){y.value="";return}y.value=String((_==null?void 0:_.id)??"")},P=(_,I="")=>{const R=Number(g.value||0),re=m.value||[],X=re[R];X&&(X.__decision=_,X.selectedTargetId=I,y.value=I,m.value=[...re])},O=()=>P("skip",""),E=()=>P("add",""),S=()=>{if(!y.value){Ja.ElMessage.warning("请先选择要替换的目标记录");return}P("replace",y.value)},x=()=>{i("update:visible",!1)},b=()=>{const _=m.value||[];if(_.find(R=>(R==null?void 0:R.__decision)==="replace"&&!(R!=null&&R.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}i("submit",_),i("update:visible",!1)};return(_,I)=>{const R=e.resolveComponent("el-table-column"),re=e.resolveComponent("svg-icon"),X=e.resolveComponent("el-table"),ye=e.resolveComponent("el-button"),fe=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock($r.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:x},{default:e.withCtx(()=>{var U,q;return[e.createElementVNode("div",jd,[e.createElementVNode("div",Hd,[I[0]||(I[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(X,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:Y},{default:e.withCtx(()=>[e.createVNode(R,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,Z=>(e.openBlock(),e.createBlock(R,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ae})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ae==null?void 0:ae[Z.prop]).length>0?(e.openBlock(),e.createBlock(re,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>u({row:ae,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Ud,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ae==null?void 0:ae[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(R,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:Z})=>[e.createTextVNode(e.toDisplayString(((Z==null?void 0:Z.candidates)||[]).length),1)]),_:1}),e.createVNode(R,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",qd,"替换")):(Z==null?void 0:Z.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Wd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Kd,"跳过")):(e.openBlock(),e.createElementBlock("span",Gd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Yd,[I[4]||(I[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Jd,[e.createVNode(ye,{id:"themeBorderButton",onClick:O},{default:e.withCtx(()=>I[1]||(I[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(ye,{id:"themeBorderButton",onClick:E,disabled:!o.value},{default:e.withCtx(()=>I[2]||(I[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:S,disabled:!p.value||!y.value},{default:e.withCtx(()=>I[3]||(I[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((U=d.value)==null?void 0:U.candidates)||[]).length===0?(e.openBlock(),e.createBlock(fe,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(X,{data:((q=d.value)==null?void 0:q.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:D,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(R,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,Z=>(e.openBlock(),e.createBlock(R,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ae})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ae==null?void 0:ae[Z.prop]).length>0?(e.openBlock(),e.createBlock(re,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ve=>u({row:ae,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Xd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ae==null?void 0:ae[Z.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(ye,{id:"themeBorderButton",onClick:x},{default:e.withCtx(()=>I[5]||(I[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:b},{default:e.withCtx(()=>I[6]||(I[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},ep=sr._export_sfc(Qd,[["__scopeId","data-v-89e0489c"]]),ap={class:"ocr-preview-content"},lp={class:"ocr-preview-tip"},rp={class:"ocr-preview-table"},np={style:{display:"flex","align-items":"center",gap:"8px"}},ip={class:"dialog-footer"},op={__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 r=a,n=l,i=e.ref([]),o=e.ref([]),p=e.ref([]);e.watch(()=>r.visible,A=>{A&&(i.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),o.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),p.value=[...r.ocrSelectedFields])});const c=(A,w)=>{const Y=[...p.value];if(w)Y.includes(A)||Y.push(A);else{const D=Y.indexOf(A);D>-1&&Y.splice(D,1)}p.value=Y,n("update:ocrSelectedFields",Y)},u=(A,w,Y)=>{n("fieldChange",{rowIndex:A,prop:w,value:Y})},m=()=>{n("update:ocrPreviewData",i.value),n("confirm",i.value),n("update:visible",!1)},g=()=>{n("update:visible",!1)},y=A=>typeof A!="number"?"-":`${(A*100).toFixed(1)}%`,d=A=>typeof A!="number"?"#606266":A>=.9?"#67c23a":A>=.7?"#e6a23c":"#f56c6c";return(A,w)=>{const Y=e.resolveComponent("el-alert"),D=e.resolveComponent("el-table-column"),P=e.resolveComponent("el-checkbox"),O=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),S=e.resolveComponent("el-button");return e.openBlock(),e.createBlock($r.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:g,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createElementVNode("div",lp,[e.createVNode(Y,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",rp,[e.createVNode(E,{data:i.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(D,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,x=>(e.openBlock(),e.createBlock(D,{key:x.prop,prop:x.prop,"min-width":x.minWidth||230,"class-name":x.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",np,[x.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(P,{key:0,"model-value":p.value.includes(x.prop),onChange:b=>c(x.prop,b),onClick:w[0]||(w[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(x.label),1)])]),default:e.withCtx(({row:b,$index:_})=>[x.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:d(b[x.prop]),fontWeight:500})},e.toDisplayString(y(b[x.prop])),5)):(e.openBlock(),e.createBlock(O,{key:1,modelValue:b[x.prop],"onUpdate:modelValue":I=>b[x.prop]=I,size:"small",placeholder:"请输入"+x.label,onChange:I=>u(_,x.prop,I)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ip,[e.createVNode(S,{onClick:g,id:"themeBorderButton"},{default:e.withCtx(()=>w[1]||(w[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(S,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>w[2]||(w[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},tp=sr._export_sfc(op,[["__scopeId","data-v-df66eb1f"]]),ai=a=>{var n;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 r=(n=le.analyzeSplitToContent(l,","))==null?void 0:n.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),vn(i)));return r=r==null?void 0:r.join(","),r};function pc(a){return Ja.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function sp(a){return Ja.axios.get(a,{responseType:"blob"})}let or="$R",cp="http://222.92.178.198:55002/AIRobot",mt=["Form","BarChart","FormText","FormBlock"];const _t=a=>{var r,n;let l=(n=le.analyzeSplitToContent(a,"@"))==null?void 0:n[((r=le.analyzeSplitToContent(a,"@"))==null?void 0:r.length)-1];return!!(mt!=null&&mt.some(i=>l==null?void 0:l.includes(i)))},up=async(a,l,r,n)=>{var o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe;let i=a;if(_t(i==null?void 0:i[0])){let Ie=vc(i),Me=(o=Ie==null?void 0:Ie.filter)==null?void 0:o.join(","),de=[];(p=Ie==null?void 0:Ie.hideContents)==null||p.forEach(Ea=>{if(Ea){const Ge=Ea;Ge&&de.push(`(HideGroup=Yes, prop=${Ge})`)}});let Ce=(c=Ie==null?void 0:Ie.formContents)==null?void 0:c.filter(Ea=>{var Ge;return(Ge=Ea==null?void 0:Ea.filters)==null?void 0:Ge.includes("@ShowHide=Hide")});(Ce==null?void 0:Ce.length)>0&&(Ce==null||Ce.forEach(Ea=>{if(Ea){const Ge=Ea==null?void 0:Ea.prop;Ge&&de.push(`(Hide=Yes, prop=${Ge})`)}}));let Je=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Je)||(Je=Je?[Je]:[]),Je=[...Je,...de],Me===""&&((u=Ie==null?void 0:Ie.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Ie==null?void 0:Ie.groupName,value:Ie==null?void 0:Ie.formContents,contents:Array.isArray((m=Ie==null?void 0:Ie.contents)==null?void 0:m[0])&&((y=(g=Ie==null?void 0:Ie.contents)==null?void 0:g[0])!=null&&y.every(Ea=>Array.isArray(Ea)))?[(A=(d=Ie==null?void 0:Ie.contents)==null?void 0:d[0])==null?void 0:A[r]]:[Ie==null?void 0:Ie.contents],filter:"("+Me+")",menuFilter:Je,groupFilter:Ie==null?void 0:Ie.groupFilters}}else if(((w=i==null?void 0:i[0])==null?void 0:w[0])!=="&"){let Ie=mc(i,n),Me="";(Y=Ie==null?void 0:Ie.tableFilter)!=null&&Y.includes(or)?Ie.tableFilter=(D=Ie==null?void 0:Ie.tableFilter)==null?void 0:D.replace(or,""):Me=(E=(O=(P=Ie==null?void 0:Ie.tableFilter)==null?void 0:P.replace("(",or))==null?void 0:O.split(or))==null?void 0:E[0];let de=[];Ie!=null&&Ie.tableFilter&&((S=le.analyzeSplitToContent(Ie==null?void 0:Ie.tableFilter,","))==null||S.forEach(Je=>{Je!=null&&Je.includes("@ShowHide=Hide")&&de.push("HideGroup=Yes")}));let Ce=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Ce)||(Ce=Ce?[Ce]:[]),Ce=[...Ce,...de],{key:"Table",name:Ie==null?void 0:Ie.groupName,tableColumns:Ie==null?void 0:Ie.tableColumns,assistColumn:Ie==null?void 0:Ie.columns,tableContents:l===1?Ie==null?void 0:Ie.tableContents:(b=(x=Ie==null?void 0:Ie.tableContents)==null?void 0:x[r])!=null&&b.every(Je=>Array.isArray(Je))?(_=Ie==null?void 0:Ie.tableContents)==null?void 0:_[r]:[(I=Ie==null?void 0:Ie.tableContents)==null?void 0:I[r]],filter:Ie==null?void 0:Ie.tableFilter,menuFilter:Ce,quotePage:Me!==""?((X=(re=(R=Me==null?void 0:Me.replace("*",or))==null?void 0:R.split(or))==null?void 0:re[0])==null?void 0:X.replaceAll(":","/"))??"":void 0,quoteGroup:Me!==""?((ve=(ae=(Z=(q=(U=(fe=(ye=Me==null?void 0:Me.replace("*",or))==null?void 0:ye.split(or))==null?void 0:fe[1])==null?void 0:U.replace("{",or))==null?void 0:q.split(or))==null?void 0:Z[0])==null?void 0:ae.split(":"))==null?void 0:ve.filter(Je=>Je!==""))??[]:[],relatedQuotes:Ie==null?void 0:Ie.relatedQuotes,fatherSyncContents:Ie==null?void 0:Ie.fatherSyncContents,sonSyncContents:Ie==null?void 0:Ie.sonSyncContents,calculatorFilters:(Ie==null?void 0:Ie.calculatorFilters)??[]}}else{let Ie=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Me=i==null?void 0:i[0];Me=Me==null?void 0:Me.slice(1,Me==null?void 0:Me.length),Me=le.analyzeSplitToContent(Me,":"),Me=Me==null?void 0:Me[(Me==null?void 0:Me.length)-1];let de=[];de.push("1");let Ce=Me==null?void 0:Me.replace("(",or);Ce=(ze=Ce==null?void 0:Ce.split(or))==null?void 0:ze[0],de.push(Ce);let Je=Me==null?void 0:Me.replace("(",or);if(Je=(te=Je==null?void 0:Je.split(or))==null?void 0:te[1],Je=(se=(N=Je==null?void 0:Je.replace(")",or))==null?void 0:N.split(or))==null?void 0:se[0],(ue=(W=Je==null?void 0:Je.replace(",",or))==null?void 0:W.split(or))==null||ue.forEach(Ea=>{de.push(Ea)}),de.push(""),de.push(""),(_e=de==null?void 0:de[2])!=null&&_e.includes(".xlsx")||(we=de==null?void 0:de[2])!=null&&we.includes(".xls"))try{let Ea=cp+"/"+(de==null?void 0:de[2]),Ge=await sp(Ea),$=`生成js函数名称为${de==null?void 0:de[1]}的函数,规则为:`+(de==null?void 0:de[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((Ge==null?void 0:Ge.status)===200){let V=Ge==null?void 0:Ge.data;const ee=new FormData;ee.append("file",V,de==null?void 0:de[2]),ee.append("query",$);let ce=await pc(ee);ce=(j=(la=(Ke=ce==null?void 0:ce.data)==null?void 0:Ke.data)==null?void 0:la.response)==null?void 0:j.replace("generateResult",de==null?void 0:de[1]),de[de.length-2]=ce,de[de.length-1]=[{name:(Oe=(We=de==null?void 0:de[2])==null?void 0:We.split("."))==null?void 0:Oe[0],url:Ea}]}}catch{}return de=[de],{key:"Method",name:[],tableContents:de,tableColumns:Ie}}},dp=(a,l)=>{var n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea;let r=(i=(n=le.analyzeSplitToContent(a,"="))==null?void 0:n.filter(Ge=>Ge!=="="))==null?void 0:i.map(Ge=>((Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="="&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),Ge));if(_t(r==null?void 0:r[1])||_t(r==null?void 0:r[0])){let Ge=yp(r);if(Ge!=null&&Ge.formContents){let he=(o=Ge==null?void 0:Ge.filter)==null?void 0:o.join(","),ca=[];(p=Ge==null?void 0:Ge.hideContents)==null||p.forEach(ga=>{if(ga){const Ta=ga;Ta&&ca.push(`(HideGroup=Yes, prop=${Ta})`)}});let ia=(c=Ge==null?void 0:Ge.formContents)==null?void 0:c.filter(ga=>{var Ta;return(Ta=ga==null?void 0:ga.filters)==null?void 0:Ta.includes("@ShowHide=Hide")});(ia==null?void 0:ia.length)>0&&(ia==null||ia.forEach(ga=>{if(ga){const Ta=ga==null?void 0:ga.prop;Ta&&ca.push(`(Hide=Yes, prop=${Ta})`)}}));let Ve=(l==null?void 0:l.menuFilter)??[];return Array.isArray(Ve)||(Ve=Ve?[Ve]:[]),Ve=[...Ve,...ca],he===""&&((u=Ge==null?void 0:Ge.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Ge==null?void 0:Ge.groupName,value:Ge==null?void 0:Ge.formContents,contents:[Ge==null?void 0:Ge.contents],filter:"("+he+")",menuFilter:Ve,groupFilter:Ge==null?void 0:Ge.groupFilters,calculatorFilters:Ge==null?void 0:Ge.calculatorFilters}}let $=(y=(g=(m=Ge==null?void 0:Ge.filter)==null?void 0:m.replace("@",or))==null?void 0:g.split(or))==null?void 0:y[0],V=(w=(A=(d=Ge==null?void 0:Ge.filter)==null?void 0:d.replace("(",or))==null?void 0:A.split(or))==null?void 0:w[1],ee=(P=(D=(Y=Ge==null?void 0:Ge.filter)==null?void 0:Y.replace("(",or))==null?void 0:D.split(or))==null?void 0:P[0];ee="@"+((O=ee==null?void 0:ee.split("@"))==null?void 0:O[1]),V=V==null?void 0:V.slice(0,(V==null?void 0:V.length)-1),V=(S=(E=le.analyzeSplitToContent(V,","))==null?void 0:E.map(he=>(he=ee+he,he)))==null?void 0:S.join("");let ce=$+"("+V+")";return{key:"Form",name:Ge==null?void 0:Ge.group,filter:ce,formPage:((_=(b=(x=$==null?void 0:$.replace("*",or))==null?void 0:x.split(or))==null?void 0:b[0])==null?void 0:_.replaceAll(":","/"))??"",formGroup:((U=(fe=(ye=(X=(re=(R=(I=$==null?void 0:$.replace("*",or))==null?void 0:I.split(or))==null?void 0:R[1])==null?void 0:re.replace("{",or))==null?void 0:X.split(or))==null?void 0:ye[0])==null?void 0:fe.split(":"))==null?void 0:U.filter(he=>he!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter,contents:[]}}else{let Ge=r==null?void 0:r.filter((ia,Ve)=>Ve!==0);Ge=Ge==null?void 0:Ge.join("");let $=mc(r,l,Ge),V="";(q=$==null?void 0:$.tableFilter)!=null&&q.includes(or)?$.tableFilter=(Z=$==null?void 0:$.tableFilter)==null?void 0:Z.replace(or,""):V=(ze=(ve=(ae=$==null?void 0:$.tableFilter)==null?void 0:ae.replace("(",or))==null?void 0:ve.split(or))==null?void 0:ze[0];let ee=(se=(N=(te=$==null?void 0:$.tableFilter)==null?void 0:te.replace("(",or))==null?void 0:N.split(or))==null?void 0:se[0];ee=[{menus:(ue=(W=ee==null?void 0:ee.split("*"))==null?void 0:W[0])==null?void 0:ue.replaceAll(":","/"),groups:((we=(_e=ee==null?void 0:ee.split("*"))==null?void 0:_e[1])==null?void 0:we.split(":"))??[]}];let ce=(j=(la=(Ke=$==null?void 0:$.tableFilter)==null?void 0:Ke.replace("(",or))==null?void 0:la.split(or))==null?void 0:j[1];(ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===")"&&(ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1));let he=[];$!=null&&$.tableFilter&&((We=le.analyzeSplitToContent($==null?void 0:$.tableFilter,","))==null||We.forEach(ia=>{ia!=null&&ia.includes("@ShowHide=Hide")&&he.push("HideGroup=Yes")}));let ca=(l==null?void 0:l.menuFilter)??[];return Array.isArray(ca)||(ca=ca?[ca]:[]),ca=[...ca,...he],{key:"Table",name:$==null?void 0:$.groupName,filter:$==null?void 0:$.tableFilter,tableColumns:$==null?void 0:$.tableColumns,tableContents:$==null?void 0:$.tableContents,quotePage:V!==""?((Me=(Ie=(Oe=V==null?void 0:V.replace("*",or))==null?void 0:Oe.split(or))==null?void 0:Ie[0])==null?void 0:Me.replaceAll(":","/"))??"":void 0,quoteGroup:V!==""?((Ea=(Je=(Ce=(de=V==null?void 0:V.replace("*",or))==null?void 0:de.split(or))==null?void 0:Ce[1])==null?void 0:Je.split(":"))==null?void 0:Ea.filter(ia=>ia!==""))??[]:[],menuFilter:ca,relatedQuotes:ee,fatherSyncContents:($==null?void 0:$.fatherSyncContents)??[],sonSyncContents:($==null?void 0:$.sonSyncContents)??[],calculatorFilters:($==null?void 0:$.calculatorFilters)??[]}}},pp=async(a,l)=>{let r=[],n=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(i,o)=>{let p=[];i=i==null?void 0:i.map(async c=>{var u,m;if(p.push(c),((u=le.analyzeSplitToContent(a,"="))==null?void 0:u.length)<=2){if(((m=le.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const g=await up(le.analyzeSplitToContent(a,"="),n,o,c);g&&p.push(g)}}else p.push(dp(a,c))}),await Promise.all(i),r.push(p)}),await Promise.all(l),r};let Wi="/",fp="$",Nn="$R";const fc=a=>{var r,n,i;let l="";if((a==null?void 0:a.length)>1){let o=a==null?void 0:a.filter((p,c)=>c!==0);o=o==null?void 0:o.join(""),o=le.analyzerSplitToWord(o,")"),(o==null?void 0:o.length)!==1?(o==null?void 0:o[(o==null?void 0:o.length)-1])===")"?o=o==null?void 0:o.join(""):o=(r=o==null?void 0:o.filter((p,c)=>c!==(o==null?void 0:o.length)-1))==null?void 0:r.join(""):o=o==null?void 0:o[0],l="("+o,((i=a==null?void 0:a[0])==null?void 0:i[((n=a==null?void 0:a[0])==null?void 0:n.length)-2])==="@"&&(l="@"+l)}return{filter:l}},hc=(a,l=[])=>{let r=(a==null?void 0:a.map(o=>{var p,c;return(c=o==null?void 0:o.key)==null?void 0:c.slice(1,(p=o==null?void 0:o.key)==null?void 0:p.length)}))??[],n=[];r==null||r.forEach(o=>{var p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye;if(o===""&&(o="算法库:通用算法"),o!=null&&o.includes(fp)){let fe="",U=!0,q=le.analyzerSplitToWord(o,"(");(q==null?void 0:q.length)>1&&(fe="("+((p=le.analyzerSplitToWord(q==null?void 0:q[1],")"))==null?void 0:p[0]),((u=q==null?void 0:q[0])==null?void 0:u[((c=q==null?void 0:q[0])==null?void 0:c.length)-2])==="@"&&(fe="@"+fe));let Z=o;Z=Z==null?void 0:Z.replace(fe,""),fe=vn(fe),fe=(m=le.analyzeSplitToContent(fe,","))==null?void 0:m.map(se=>((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)),fe!=null&&fe.includes("@ShowHide=Hide")&&(U=!1);let ae=(g=Z==null?void 0:Z.replace("$",Nn))==null?void 0:g.split(Nn),ve=ae==null?void 0:ae[1],ze=ae==null?void 0:ae[0];ze!=null&&ze.includes("[")&&(ze=(d=(y=ze==null?void 0:ze.replace("[",Nn))==null?void 0:y.split(Nn))==null?void 0:d[0],ve=ve+":["+((Y=(w=(A=ae==null?void 0:ae[0])==null?void 0:A.replace("[",Nn))==null?void 0:w.split(Nn))==null?void 0:Y[1])),ze=(P=(D=ze==null?void 0:ze.replaceAll(":","/"))==null?void 0:D.replaceAll("{",""))==null?void 0:P.replaceAll("}",""),(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])!=="/"&&(ze=ze+"/"),ve=((O=ze==null?void 0:ze.split("/"))==null?void 0:O[0])+":"+ve;let N="";if(!(ve!=null&&ve.includes("[")))N=ve==null?void 0:ve.replaceAll(":","/"),n==null||n.push({path:N,isShow:U,filter:fe,fatherPath:ze});else{let se=(S=(E=ve==null?void 0:ve.replace("[",Nn))==null?void 0:E.split(Nn))==null?void 0:S[1];se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1),se=(x=le.analyzeSplitToContent(se,","))==null?void 0:x.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])===","&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W)),se==null||se.forEach(W=>{var ue,_e;N=((_e=(ue=ve==null?void 0:ve.replace("[",Nn))==null?void 0:ue.split(Nn))==null?void 0:_e[0])+W,N=N==null?void 0:N.replaceAll(":","/"),n==null||n.push({path:N,isShow:U,filter:fe,fatherPath:ze})})}}else{let fe="",U=!0,q=le.analyzerSplitToWord(o,"(");(q==null?void 0:q.length)>1&&(fe=(b=fc(q))==null?void 0:b.filter);let Z=o;if(Z=Z==null?void 0:Z.replace(fe,""),(fe==null?void 0:fe[0])==="("){fe=fe==null?void 0:fe.slice(1,(fe==null?void 0:fe.length)-1);let ve=[];(_=le.analyzeSplitToContent(fe,","))==null||_.forEach(ze=>{(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])===","&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1)),(ze==null?void 0:ze[0])==="("&&(ze=ze==null?void 0:ze.slice(1,(ze==null?void 0:ze.length)-1)),(ze==null?void 0:ze[0])!=="@"&&(ze="@"+ze),ve.push(vn(ze))}),fe=ve==null?void 0:ve.join(",")}else fe=vn(fe);fe=(I=le.analyzeSplitToContent(fe,","))==null?void 0:I.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)),fe!=null&&fe.includes("@ShowHide=Hide")&&(U=!1),(Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])==="}"&&(Z=Z+":"),Z=(R=Z==null?void 0:Z.replaceAll("{",""))==null?void 0:R.replaceAll("}","");let ae="";if(Z!=null&&Z.includes("[")){let ve=(re=Z==null?void 0:Z.replace("[",Nn))==null?void 0:re.split(Nn),ze=ve==null?void 0:ve[1];ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1),(ye=(X=le.analyzeSplitToContent(ze,","))==null?void 0:X.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)))==null||ye.forEach(te=>{ae=(ve==null?void 0:ve[0])+te,ae=ae==null?void 0:ae.replaceAll(":","/"),n==null||n.push({path:ae,isShow:U,filter:fe})})}else ae=Z==null?void 0:Z.replaceAll(":","/"),n==null||n.push({path:ae,isShow:U,filter:fe})}});let i=M.cloneDeep(n);return(l==null?void 0:l.length)>0&&(i=l),i=i==null?void 0:i.filter(o=>{var p,c,u,m;return!(o!=null&&o.fatherPath)&&((c=(p=o==null?void 0:o.path)==null?void 0:p.split(Wi))==null?void 0:c.length)>1&&((m=(u=o==null?void 0:o.path)==null?void 0:u.split(Wi))==null?void 0:m[1])===""}),i=i==null?void 0:i.map(o=>{var p;return o.path=(p=o.path)==null?void 0:p.replace(Wi,""),o.path}),(i==null?void 0:i.length)>0&&(n=n==null?void 0:n.map(o=>{var c,u,m,g,y,d,A;let p=i==null?void 0:i.find(w=>{var Y;return(Y=o==null?void 0:o.path)==null?void 0:Y.includes(w)});return!(o!=null&&o.fatherPath)&&p&&!((c=o==null?void 0:o.path)!=null&&c.includes(Wi))&&!(i!=null&&i.find(w=>(o==null?void 0:o.path)===w))&&(o.path=p+Wi+((A=(m=(u=o==null?void 0:o.path)==null?void 0:u.split(p))==null?void 0:m[1])==null?void 0:A.slice(1,(d=(y=(g=o==null?void 0:o.path)==null?void 0:g.split(p))==null?void 0:y[1])==null?void 0:d.length))),o})),n},hp=(a,l)=>hc([{key:a}],l),vp=async(a,l)=>{const r=[],n=hp(a==null?void 0:a.key,l);return n&&(n==null?void 0:n.length)>0&&(n==null||n.forEach(o=>{r.push([{key:"path",value:o==null?void 0:o.path,parentPath:(o==null?void 0:o.parentPath)??"",isShow:o==null?void 0:o.isShow,menuFilter:o==null?void 0:o.filter}])})),await pp(a==null?void 0:a.value,r)};let vl="$R",Yi="[Any]";const mp=a=>{var n;let l=[],r=a;return(n=le.chunkArray(r))==null||n.forEach(i=>{var m,g,y,d,A;let o="",p=[],c="";(i==null?void 0:i.length)>1&&(c="@"+(i==null?void 0:i[0]),c=vn(c));let u=(i==null?void 0:i.length)===1?i==null?void 0:i[0]:i==null?void 0:i[1];u=u==null?void 0:u.slice(1,u==null?void 0:u.length),o=(g=(m=u==null?void 0:u.replace("(",vl))==null?void 0:m.split(vl))==null?void 0:g[0],u=(d=(y=u==null?void 0:u.replace("(",vl))==null?void 0:y.split(vl))==null?void 0:d[1],u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),p=(A=le.analyzeSplitToContent(u,","))==null?void 0:A.map(w=>((w==null?void 0:w[(w==null?void 0:w.length)-1])===","&&(w=w==null?void 0:w.slice(0,(w==null?void 0:w.length)-1)),w)),l.push({functionName:o,functionRelatedWords:p,calculatorFilter:c})}),l},yp=a=>{var r,n,i;let l={};if(((r=a==null?void 0:a[1])==null?void 0:r[0])==="&"){let o=a==null?void 0:a[0],p=a==null?void 0:a[1];p=le.analyzeSplitToContent(p,":"),p!=null&&p[1]&&(p==null?void 0:p[1])!==""&&(o=o+":"+(p==null?void 0:p[1])),p=p==null?void 0:p[0],p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1),p=[p],o=[o],o=vc(o),l.filter=o==null?void 0:o.filter,l.contents=o==null?void 0:o.contents,l.formContents=o==null?void 0:o.formContents,l.groupFilters=o==null?void 0:o.groupFilters,l.groupName=o==null?void 0:o.groupName,l.hideContents=o==null?void 0:o.hideContents,l.calculatorFilters=mp(p)??[]}else{let p=a==null?void 0:a[0];(p==null?void 0:p[0])==="*"&&(p=p==null?void 0:p.slice(1,p==null?void 0:p.length)),p=p==null?void 0:p.split(":"),l.group=p;let c=a==null?void 0:a[1],u;c!=null&&c.includes("{")?u=(i=(n=c==null?void 0:c.replaceAll("{",""))==null?void 0:n.replaceAll("}",""))==null?void 0:i.replaceAll(Yi,""):u=c==null?void 0:c.replaceAll(Yi,""),(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),l.filter=u}return l},vc=a=>{var d,A,w,Y,D,P;let l=[],r=[],n=[],i=[],o=[],p=[],c="",u=a==null?void 0:a[0];(u==null?void 0:u[0])==="*"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length));let m=le.analyzeSplitToContent(u,":");(d=m==null?void 0:m.filter(O=>(O==null?void 0:O[0])!=="{"&&(O==null?void 0:O[0])!=="["))==null||d.forEach(O=>{var S,x,b;(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));let E=le.analyzerSplitToWord(O,"(");if((E==null?void 0:E.length)>1){c=(S=fc(E))==null?void 0:S.filter;let _=O==null?void 0:O.replace(c,"");if(n.push(_),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let I=[];(x=le.analyzeSplitToContent(c,","))==null||x.forEach(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==null?void 0:R.slice(1,(R==null?void 0:R.length)-1)),(R==null?void 0:R[0])!=="@"&&(R="@"+R),I.push(vn(R))}),c=I==null?void 0:I.join(",")}else c=vn(c);c=(b=le.analyzeSplitToContent(c,","))==null?void 0:b.map(I=>((I==null?void 0:I[(I==null?void 0:I.length)-1])===","&&(I=I==null?void 0:I.slice(0,(I==null?void 0:I.length)-1)),I)),c!=null&&c.includes("@ShowHide=Hide")&&p.push(_),i=[...i,...c]}else n.push(E==null?void 0:E[0])});let g=(A=m==null?void 0:m.filter(O=>(O==null?void 0:O[0])==="{"))==null?void 0:A[0],y=(w=m==null?void 0:m.filter(O=>(O==null?void 0:O[0])==="["))==null?void 0:w[0];return l=Oi(y??""),l!=null&&l.every(O=>Array.isArray(O))&&(l=[l]),(g==null?void 0:g[(g==null?void 0:g.length)-1])===":"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),o=(Y=le.analyzeSplitToContent(g,"@"))==null?void 0:Y[1],o="@"+o,g=g==null?void 0:g.replace(o,""),o=vn(o),o=(D=le.analyzeSplitToContent(o,","))==null?void 0:D.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)),(g==null?void 0:g[0])==="{"&&(g=g==null?void 0:g.slice(1,(g==null?void 0:g.length)-1)),g=(P=le.analyzeSplitToContent(g,","))==null?void 0:P.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)),g==null||g.forEach((O,E)=>{var ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja;let S=[],x=[],b=[],_="",I="",R=!1,re,X=[],ye=[],fe=[],U="Input",q=[],Z=[];if(O!=null&&O.includes("==")){re=(ae=O==null?void 0:O.split("=="))==null?void 0:ae[0];let ta=(ve=O==null?void 0:O.split("=="))==null?void 0:ve[1],je="";((ze=le.analyzeSplitToContent(ta,"$"))==null?void 0:ze.length)>1&&((te=le.analyzeSplitToContent(ta,"$"))==null?void 0:te[0])!=="$"?(je=(N=le.analyzeSplitToContent(ta,"$"))==null?void 0:N[0],je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)):((se=le.analyzeSplitToContent(ta,"}"))==null?void 0:se.length)>1&&(je=(W=le.analyzeSplitToContent(ta,"}"))==null?void 0:W[1]);let ya=ta==null?void 0:ta.replace(je,"");if((je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),(ue=le.analyzeSplitToContent(je,","))==null||ue.forEach(Ze=>{var ne;(Ze==null?void 0:Ze[0])!=="@"&&(Ze="@"+Ze),(Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1));let Ae=vn(Ze);(ne=le.analyzeSplitToContent(Ae,","))==null||ne.forEach(pe=>{(pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])===","&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),S.push(pe)})}),(ya==null?void 0:ya[0])==="$"&&(ya=ya==null?void 0:ya.slice(1,ya==null?void 0:ya.length)),ya!=null&&ya.includes("&")){let Ze=ya;if((ya==null?void 0:ya[0])==="("){let ne=(_e=le.analyzeSplitToContent(ya,"&"))==null?void 0:_e.map(pe=>((pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])==="&"&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),pe));Ze=ne==null?void 0:ne[1],ne=ne==null?void 0:ne[0],(ne==null?void 0:ne[0])!=="@"&&(ne="@"+ne),_=vn(ne)}(Ze==null?void 0:Ze[0])==="&"&&(Ze=Ze==null?void 0:Ze.slice(1,Ze==null?void 0:Ze.length)),I=(Ke=(we=Ze==null?void 0:Ze.replace("(",vl))==null?void 0:we.split(vl))==null?void 0:Ke[0],b=(j=(la=Ze==null?void 0:Ze.replace("(",vl))==null?void 0:la.split(vl))==null?void 0:j[1],b=[b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1)],U="Input"}else{let Ze=(We=ya==null?void 0:ya.replace("*",vl))==null?void 0:We.split(vl);X=(Oe=Ze==null?void 0:Ze[0])==null?void 0:Oe.split(":"),ye=(Me=(Ie=le.analyzeSplitToContent(Ze==null?void 0:Ze[1],":"))==null?void 0:Ie.filter((Ae,ne)=>{var pe,ua;return ne!==((ua=(pe=Ze==null?void 0:Ze[1])==null?void 0:pe.split(":"))==null?void 0:ua.length)-1}))==null?void 0:Me.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)),fe=(Ce=(de=le.analyzeSplitToContent(Ze==null?void 0:Ze[1],":"))==null?void 0:de.filter((Ae,ne)=>{var pe,ua;return ne===((ua=(pe=Ze==null?void 0:Ze[1])==null?void 0:pe.split(":"))==null?void 0:ua.length)-1}))==null?void 0:Ce[0],fe=(Ea=(Je=fe==null?void 0:fe.replaceAll("{",""))==null?void 0:Je.replaceAll("}",""))==null?void 0:Ea.split(":"),U="Select"}if(re!=null&&re.includes("@")){let Ze=le.analyzeSplitToContent(re,"@");re=Ze==null?void 0:Ze[0],re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1),Ze="@"+(Ze==null?void 0:Ze[1]),Ze=vn(Ze),S=(Ge=le.analyzeSplitToContent(Ze,","))==null?void 0:Ge.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))}}else if((($=le.analyzeSplitToContent(O,"="))==null?void 0:$.length)>1)if(U="Select",re=(ee=(V=O==null?void 0:O.replace("=",vl))==null?void 0:V.split(vl))==null?void 0:ee[0],!(O!=null&&O.includes("If")))q=(he=(ce=O==null?void 0:O.replace("=",vl))==null?void 0:ce.split(vl))==null?void 0:he[1],q=q==null?void 0:q.split("||");else{let ta=(ia=(ca=O==null?void 0:O.replace("=",vl))==null?void 0:ca.split(vl))==null?void 0:ia[1];Z=(Ve=le.analyzeSplitToContent(ta,")"))==null?void 0:Ve.filter(je=>!(je!=null&&je.includes("If"))),Z=Z==null?void 0:Z.map(je=>((je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),je=je==null?void 0:je.split("||"),je)),x=(ga=le.analyzeSplitToContent(ta,")"))==null?void 0:ga.filter(je=>je==null?void 0:je.includes("If")),x=x==null?void 0:x.map(je=>((je==null?void 0:je[0])==="|"&&(je=je==null?void 0:je.slice(2,je==null?void 0:je.length)),(je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),(je==null?void 0:je[0])!=="@"&&(je="@"+je),je))}else if(((Ta=le.analyzeSplitToContent(O,"@"))==null?void 0:Ta.length)>1){re=(De=le.analyzeSplitToContent(O,"@"))==null?void 0:De[0],(re==null?void 0:re[(re==null?void 0:re.length)-1])==="@"&&(re=re==null?void 0:re.slice(0,(re==null?void 0:re.length)-1));let ta="@"+((Fa=le.analyzeSplitToContent(O,"@"))==null?void 0:Fa[1]);ta=vn(ta),S=(Na=le.analyzeSplitToContent(ta,","))==null?void 0:Na.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])===","&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)),je)),S!=null&&S.find(je=>je==null?void 0:je.includes("@Type"))&&(U=(ja=(da=S==null?void 0:S.find(je=>je==null?void 0:je.includes("@Type")))==null?void 0:da.split("="))==null?void 0:ja[1])}else re=O;S!=null&&S.includes("@ShowHide=Hide")&&(R=!0),r.push({prop:re,label:re,value:"",menuPath:X,groups:ye,columns:fe,type:U,options:q,allContents:Z,filters:S,width:g==null?void 0:g.length,isFormColHidden:R,filterContents:x,functionName:I,functionRelatedWords:b,calculatorFilter:_})}),{groupName:n,groupFilters:i,formContents:r,contents:l,filter:o,hideContents:p}},Oi=a=>{var n,i;if(!a||typeof a!="string")return[];let l=[],r=a.slice(1,(a==null?void 0:a.length)-1);if((r==null?void 0:r[0])!=="[")(n=le.analyzeSplitToContent(r,","))==null||n.forEach(o=>{(o==null?void 0:o[(o==null?void 0:o.length)-1])===","&&(o=o.slice(0,(o==null?void 0:o.length)-1)),l.push(o??"")}),(r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&l.push("");else{let o=[];(i=le.analyzeSplitToContent(r,","))==null||i.forEach(p=>{(p==null?void 0:p[(p==null?void 0:p.length)-1])===","&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),o.push(Oi(p))}),l=o}return l},St=(a,l)=>{var P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da;let r,n=[],i=[],o=[],p=[],c=[],u=[],m=[],g="Input",y,d="",A="",w="",Y=[],D="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(r=(P=a==null?void 0:a.split("=="))==null?void 0:P[0],y=(O=a==null?void 0:a.split("=="))==null?void 0:O[0],g="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((x=(S=(E=a==null?void 0:a.replace("=",vl))==null?void 0:E.split(vl))==null?void 0:S[1])!=null&&x.includes("If")))if(r=le.analyzeSplitToContent(a,"@"),r=r==null?void 0:r[0],(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=(_=(b=r==null?void 0:r.replace("=",vl))==null?void 0:b.split(vl))==null?void 0:_[0],r!=null&&r.includes("&")&&(r=(R=(I=r==null?void 0:r.replace("&",vl))==null?void 0:I.split(vl))==null?void 0:R[0]),y=r,((re=le.analyzeSplitToContent(a,"@"))==null?void 0:re.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Te=(X=le.analyzeSplitToContent(a,"@"))==null?void 0:X[1];if((Te==null?void 0:Te[0])!=="@"&&(Te="@"+Te),Te=vn(Te),A=Te,A!=null&&A.includes("@Type")){let Le=le.analyzeSplitToContent(A,",");Le=Le==null?void 0:Le.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)),Le=(ye=Le==null?void 0:Le.filter(Fe=>Fe==null?void 0:Fe.includes("@Type")))==null?void 0:ye[0],g=(fe=Le==null?void 0:Le.split("="))==null?void 0:fe[1],g==="File"&&(g="Upload")}else g="Input"}}else if(a!=null&&a.includes("||")){let Te=[];n=(Z=(q=(U=le.analyzeSplitToContent(a,"="))==null?void 0:U[1])==null?void 0:q.split("||"))==null?void 0:Z.map(Fe=>{var me,al,Qa,Tl;let Ne=Fe;if(Ne!=null&&Ne.includes("@")){let Rl="@"+((al=(me=Ne==null?void 0:Ne.replace("@",vl))==null?void 0:me.split(vl))==null?void 0:al[1]);Ne=(Tl=(Qa=Ne==null?void 0:Ne.replace("@",vl))==null?void 0:Qa.split(vl))==null?void 0:Tl[0],Rl=ai(Rl),Te.push(Rl)}return{label:Ne==null?void 0:Ne.replaceAll("'",""),value:Ne==null?void 0:Ne.replaceAll("'","")}}),(Te==null?void 0:Te.length)>0&&(A="("+(Te==null?void 0:Te.join("||"))+")");let Le=(ae=le.analyzeSplitToContent(a,"="))==null?void 0:ae[0];if(Le!=null&&Le.includes("@")){(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));let Fe=(ve=le.analyzeSplitToContent(Le,"@"))==null?void 0:ve[1];Fe="@"+Fe,Fe=ai(Fe),A=A===""?Fe:Fe+","+A}}else g="Input",d=(N=(te=(ze=a==null?void 0:a.replace("=",vl))==null?void 0:ze.split(vl))==null?void 0:te[1])==null?void 0:N.replaceAll("'","");else if((W=(se=le.analyzeSplitToContent(a,"="))==null?void 0:se[1])!=null&&W.includes("||")){let Te=(ue=le.analyzeSplitToContent(a,"="))==null?void 0:ue[0];if((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!=null&&Te.includes("@")){let me=(_e=le.analyzeSplitToContent(Te,"@"))==null?void 0:_e[1];me="@"+me,A=ai(me),r=(j=(we=le.analyzeSplitToContent(Te,"@"))==null?void 0:we[0])==null?void 0:j.slice(0,((la=(Ke=le.analyzeSplitToContent(Te,"@"))==null?void 0:Ke[0])==null?void 0:la.length)-1),y=(Me=(We=le.analyzeSplitToContent(Te,"@"))==null?void 0:We[0])==null?void 0:Me.slice(0,((Ie=(Oe=le.analyzeSplitToContent(Te,"@"))==null?void 0:Oe[0])==null?void 0:Ie.length)-1)}else r=Te,y=Te;let Le=(de=le.analyzeSplitToContent(a,"="))==null?void 0:de[1];Le=le.analyzeSplitToContent(Le,")");let Fe=Le==null?void 0:Le.filter(me=>!(me!=null&&me.includes("If")));Fe==null||Fe.forEach(me=>{(me==null?void 0:me[0])==="("&&(me=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1)),i==null||i.push(me==null?void 0:me.split("||"))});let Ne=Le==null?void 0:Le.filter(me=>me==null?void 0:me.includes("If"));Ne=Ne==null?void 0:Ne.map(me=>((me==null?void 0:me[0])==="|"&&(me==null?void 0:me[1])==="|"&&(me=me==null?void 0:me.slice(2,me==null?void 0:me.length)),(me==null?void 0:me[0])==="("&&(me=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1)),(me==null?void 0:me[0])!=="@"&&(me="@"+me),me)),o=Ne}else{let Te=a==null?void 0:a.split("=="),Le=(Ce=Te==null?void 0:Te.filter(Fe=>(Fe==null?void 0:Fe.includes("$"))&&(Fe==null?void 0:Fe[0])!=="{"))==null?void 0:Ce[0];if(Le&&!(Le!=null&&Le.includes("&"))){let Fe=(Ea=le.analyzeSplitToContent(Le,")"))==null?void 0:Ea[((Je=le.analyzeSplitToContent(Le,")"))==null?void 0:Je.length)-1],Ne=(Ge=Fe==null?void 0:Fe.replace("*",vl))==null?void 0:Ge.split(vl),me=(Ne==null?void 0:Ne[0])===""?l==null?void 0:l.value:Ne==null?void 0:Ne[0];(me==null?void 0:me[0])==="("&&(me=($=le.analyzeSplitToContent(me,")"))==null?void 0:$[1]),me=(ee=(V=me==null?void 0:me.replaceAll("{",""))==null?void 0:V.replaceAll("}",""))==null?void 0:ee.replaceAll(Yi,""),(me==null?void 0:me[0])==="$"&&(me=(ce=me==null?void 0:me.slice(1,me==null?void 0:me.length))==null?void 0:ce.replaceAll(":","/")),p=me==null?void 0:me.split("/");let al=(ca=(he=Ne==null?void 0:Ne[1])==null?void 0:he.replace("{",vl))==null?void 0:ca.split(vl),Qa=al==null?void 0:al[0];(Qa==null?void 0:Qa[(Qa==null?void 0:Qa.length)-1])===":"&&(Qa=Qa==null?void 0:Qa.slice(0,(Qa==null?void 0:Qa.length)-1)),c=Qa==null?void 0:Qa.split(":"),u=(Ta=(ga=(Ve=(ia=al==null?void 0:al[1])==null?void 0:ia.replace("}",vl))==null?void 0:Ve.split(vl))==null?void 0:ga[0])==null?void 0:Ta.split(":");let Tl="";((De=le.analyzeSplitToContent(Le,")"))==null?void 0:De.length)>1&&(Tl=(Fa=le.analyzeSplitToContent(Le,")"))==null?void 0:Fa[0]),Tl&&Tl!==""&&((Tl==null?void 0:Tl[0])!=="@"&&(Tl="@"+Tl),A=ai(Tl))}if(Te!=null&&Te.some(Fe=>Fe==null?void 0:Fe.includes("&"))){let Fe=(Na=Te==null?void 0:Te.filter(al=>al==null?void 0:al.includes("&")))==null?void 0:Na[0];Fe=(da=le.analyzeSplitToContent(Fe,"&"))==null?void 0:da.map(al=>((al==null?void 0:al[(al==null?void 0:al.length)-1])==="&"&&(al=al==null?void 0:al.slice(0,(al==null?void 0:al.length)-1)),al)),w=(je=(ta=(ja=Fe==null?void 0:Fe[1])==null?void 0:ja.replace("(",vl))==null?void 0:ta.split(vl))==null?void 0:je[0];let Ne=(ya=le.analyzeSplitToContent(Fe==null?void 0:Fe[1],")"))==null?void 0:ya[0];Ne=(Ae=(Ze=Ne==null?void 0:Ne.replace("(",vl))==null?void 0:Ze.split(vl))==null?void 0:Ae[1],Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1),(Ne==null?void 0:Ne[0])==="{"&&(Ne=Ne==null?void 0:Ne.slice(1,Ne==null?void 0:Ne.length)),(Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])==="}"&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Y=Ne==null?void 0:Ne.split(",");let me=Fe==null?void 0:Fe[0];me&&me!==""&&((me==null?void 0:me[0])!=="@"&&(me="@"+me),D=ai(me))}else if(!Le&&((ne=Te==null?void 0:Te.filter(Fe=>(Fe==null?void 0:Fe[0])==="{"))==null?void 0:ne.length)>0){let Fe=Te==null?void 0:Te[(Te==null?void 0:Te.length)-1];Fe=Fe==null?void 0:Fe.slice(1,(Fe==null?void 0:Fe.length)-1),Fe=le.analyzeSplitToContent(Fe,","),Fe=Fe==null?void 0:Fe.map(Ne=>((Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])===","&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ne)),Fe=Fe==null?void 0:Fe.map(Ne=>{var me,al,Qa,Tl;if(Ne=Ne==null?void 0:Ne.replaceAll("$",""),Ne!=null&&Ne.includes("{")){let Rl="";Ne=Ne==null?void 0:Ne.replaceAll("{","");let Al=Ne==null?void 0:Ne.split("}");Rl=((al=(me=Al==null?void 0:Al[0])==null?void 0:me.split(":"))==null?void 0:al[0])+":"+(Al==null?void 0:Al[1]),Ne=Rl,Ne=Ne+":"}if(Ne!=null&&Ne.includes(Yi)){let Rl="",Al=Ne==null?void 0:Ne.split(Yi);Rl=((Tl=(Qa=Al==null?void 0:Al[0])==null?void 0:Qa.split(":"))==null?void 0:Tl[0])+":"+(Al==null?void 0:Al[1]),Ne=Rl,Ne=Ne+":"}return Ne=Ne==null?void 0:Ne.replaceAll(":","/"),Ne}),m=Fe}else!((pe=Te==null?void 0:Te[1])!=null&&pe.includes("$"))&&((ua=Te==null?void 0:Te[1])==null?void 0:ua[0])!=="("&&u.push(Te==null?void 0:Te[1])}else r=(Qe=a==null?void 0:a.split("&"))==null?void 0:Qe[0],y=(Da=a==null?void 0:a.split("&"))==null?void 0:Da[0];return(n==null?void 0:n.length)===0&&(i==null?void 0:i.length)===0&&(p==null?void 0:p.length)===0&&g==="Select"&&(g="Input"),{label:r,prop:y,options:n,allContents:i,filterContents:o,menus:p,groups:c,words:u,align:"center",formType:g,filter:A,functionName:w,functionRelatedWords:Y,calculatorFilter:D,relatedPages:m,value:d}},Bo=(a,l)=>{var n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z;let r=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((p=(o=(i=(n=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:n.replace(":",vl))==null?void 0:i.split(vl))==null?void 0:o[0])!=null&&p.includes(","))){let ae=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),ve=(c=ae==null?void 0:ae.replace(":",vl))==null?void 0:c.split(vl);if(((u=le.analyzeSplitToContent(ve==null?void 0:ve[1],"="))==null?void 0:u.length)===1){let ze=ve==null?void 0:ve[0],te=[];(y=le.analyzeSplitToContent((g=ve==null?void 0:ve[1])==null?void 0:g.slice(1,((m=ve==null?void 0:ve[1])==null?void 0:m.length)-1),","))==null||y.forEach(N=>{var se,W;((se=le.analyzeSplitToContent(N,"="))==null?void 0:se.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)),te=[...te,...Bo(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)),te.push((W=Bo(N,l))==null?void 0:W[0]))}),r==null||r.push({label:ze,prop:ze,children:te,align:"center"})}else{let ze=[];if(((d=le.analyzeSplitToContent(ae,"="))==null?void 0:d.length)>=2){let N=(A=le.analyzeSplitToContent(ae,"="))==null?void 0:A[1],se=(w=le.analyzeSplitToContent(N,"/"))==null?void 0:w.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])==="/"&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W));ze=se==null?void 0:se.map(W=>(W=Oi(W),W))}let te=(S=(E=(O=(P=(D=(Y=ae==null?void 0:ae.replace("{",vl))==null?void 0:Y.split(vl))==null?void 0:D[1])==null?void 0:P.replace("}",vl))==null?void 0:O.split(vl))==null?void 0:E[0])==null?void 0:S.split(",");te==null||te.forEach((N,se)=>{(ze==null?void 0:ze.length)>0&&se===0?r==null||r.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:ze==null?void 0:ze.map(W=>{let ue={};return te==null||te.forEach((_e,we)=>{ue[_e]=W==null?void 0:W[we]}),ue}),options:ze==null?void 0:ze.map(W=>({label:W==null?void 0:W[0],value:W==null?void 0:W[0]})),mainKey:!0}):r==null||r.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((x=le.analyzeSplitToContent(a,"="))==null?void 0:x.length)===2&&((_=(b=le.analyzeSplitToContent(a,"="))==null?void 0:b[1])==null?void 0:_[0])==="["){let ae=[];if(((I=le.analyzeSplitToContent(a,"="))==null?void 0:I.length)>=2){let ze=(R=le.analyzeSplitToContent(a,"="))==null?void 0:R[1],te=(X=(re=le.analyzeSplitToContent(ze,"|"))==null?void 0:re.filter(N=>N!=="|"))==null?void 0:X.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));ae=te==null?void 0:te.map(N=>(N=Oi(N),N))}let ve=(fe=(ye=a==null?void 0:a.replace("}",vl))==null?void 0:ye.split(vl))==null?void 0:fe[0];ve=(U=ve==null?void 0:ve.slice(1,ve==null?void 0:ve.length))==null?void 0:U.split(","),ve==null||ve.forEach((ze,te)=>{(ae==null?void 0:ae.length)>0&&te===0?r==null||r.push({label:ze,prop:ze,align:"center",formType:"Select",relatedContents:ae==null?void 0:ae.map(N=>{let se={};return ve==null||ve.forEach((W,ue)=>{se[W]=N==null?void 0:N[ue]}),se}),options:ae==null?void 0:ae.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):r==null||r.push({label:ze,prop:ze,align:"center"})})}else(q=le.analyzeSplitToContent(a,","))==null||q.forEach(ae=>{var ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze;if((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==null?void 0:ae[0])==="{"){let Ae=le.analyzeSplitToContent(ae,"="),ne=Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1],pe=[],ua=[],Qe=[],Da="",Te="",Le=[],Fe=[],Ne=(ve=ne==null?void 0:ne.replace("*",vl))==null?void 0:ve.split(vl),me=(Ne==null?void 0:Ne[0])===""?l==null?void 0:l.value:Ne==null?void 0:Ne[0];me=le.analyzeSplitToContent(me,")");let al="";if((me==null?void 0:me.length)>1&&((ze=me==null?void 0:me[0])==null?void 0:ze[0])!=="&"&&(al=me==null?void 0:me[0],(al==null?void 0:al[0])!=="@"&&(al="@"+al),Te=al??""),me=(te=me==null?void 0:me.filter(ll=>(ll==null?void 0:ll[0])==="$"))==null?void 0:te[0],((N=le.analyzeSplitToContent(me,"}"))==null?void 0:N.length)>1&&((W=(se=le.analyzeSplitToContent(me,"}"))==null?void 0:se[1])==null?void 0:W[0])==="("&&(al=(ue=le.analyzeSplitToContent(me,"}"))==null?void 0:ue[1],(al==null?void 0:al[0])!=="@"&&(al="@"+al),Te!==""&&(Te=Te+","),Te=Te+al),(_e=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1))!=null&&_e.includes("$")||(me=(we=le.analyzeSplitToContent(me,"}"))==null?void 0:we[0]),(me==null?void 0:me[0])==="$"&&(me=(Ke=me==null?void 0:me.replace("{",""))==null?void 0:Ke.replace("}",":"),me=(la=me==null?void 0:me.slice(1,me==null?void 0:me.length))==null?void 0:la.replaceAll(":","/")),me!=null&&me.includes("$")){let ll=(j=me==null?void 0:me.split("$"))==null?void 0:j[0];ll=(We=ll==null?void 0:ll.split("/"))==null?void 0:We[0],me=ll+"/"+((Oe=me==null?void 0:me.split("$"))==null?void 0:Oe[1])+"/"}pe=(me==null?void 0:me.split("/"))??[];let Qa=(Me=(Ie=Ne==null?void 0:Ne[1])==null?void 0:Ie.replace("{",vl))==null?void 0:Me.split(vl);if((Je=(Ce=(de=Ne==null?void 0:Ne[1])==null?void 0:de.split("(@"))==null?void 0:Ce[0])!=null&&Je.includes("&&")||($=(Ge=(Ea=Ne==null?void 0:Ne[1])==null?void 0:Ea.split("@"))==null?void 0:Ge[0])!=null&&$.includes("&&")){let ll=(V=Ne==null?void 0:Ne[1])!=null&&V.includes("(@")?(he=(ce=(ee=Ne==null?void 0:Ne[1])==null?void 0:ee.split("(@"))==null?void 0:ce[0])==null?void 0:he.split("&&"):(Ve=(ia=(ca=Ne==null?void 0:Ne[1])==null?void 0:ca.split("@"))==null?void 0:ia[0])==null?void 0:Ve.split("&&");Le=ll==null?void 0:ll.map(Wa=>{var Hl,Jl;return(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(Jl=(Hl=Wa==null?void 0:Wa.replace("{",vl))==null?void 0:Hl.split(vl))==null?void 0:Jl[0],(Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])===":"&&(Wa=Wa==null?void 0:Wa.slice(0,(Wa==null?void 0:Wa.length)-1)),Wa=Wa==null?void 0:Wa.split(":"),Wa});let jl=[];ll==null||ll.forEach((Wa,Hl)=>{var Jl,ar;(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(ar=(Jl=Wa==null?void 0:Wa.replace("{",vl))==null?void 0:Jl.split(vl))==null?void 0:ar[1],(Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])==="}"&&(Wa=Wa==null?void 0:Wa.slice(0,(Wa==null?void 0:Wa.length)-1)),Wa=Wa==null?void 0:Wa.split(","),jl.push(Hl===0?(Wa==null?void 0:Wa.length)-1:Wa==null?void 0:Wa.length),Fe=[...Fe,...Wa]}),jl=(ga=le.prefixSum(jl))==null?void 0:ga.map(Wa=>Wa==null?void 0:Wa.total),Le=Le==null?void 0:Le.map((Wa,Hl)=>({number:jl==null?void 0:jl[Hl],contents:Wa}))}let Tl=Qa==null?void 0:Qa[0];(Tl==null?void 0:Tl[(Tl==null?void 0:Tl.length)-1])===":"&&(Tl=Tl==null?void 0:Tl.slice(0,(Tl==null?void 0:Tl.length)-1)),ua=(Tl==null?void 0:Tl.split(":"))??[],Qe=((Na=(Fa=(De=(Ta=Qa==null?void 0:Qa[1])==null?void 0:Ta.replace("}",vl))==null?void 0:De.split(vl))==null?void 0:Fa[0])==null?void 0:Na.split(","))??[];let Rl=(ja=Ae==null?void 0:Ae[0])==null?void 0:ja.slice(1,((da=Ae==null?void 0:Ae[0])==null?void 0:da.length)-2);Te&&Te!==""&&(Da=ai(Te));let Al=(ta=le.analyzeSplitToContent(Da,","))==null?void 0:ta.map(ll=>((ll==null?void 0:ll[(ll==null?void 0:ll.length)-1])===","&&(ll=ll==null?void 0:ll.slice(0,(ll==null?void 0:ll.length)-1)),ll)),Pl=[];Al!=null&&Al.find(ll=>ll==null?void 0:ll.includes("@MainParam"))&&(Al=Al==null?void 0:Al.find(ll=>ll==null?void 0:ll.includes("@MainParam")),Al=(ya=(je=Al==null?void 0:Al.replace("=",vl))==null?void 0:je.split(vl))==null?void 0:ya[1],Al=Al==null?void 0:Al.slice(1,(Al==null?void 0:Al.length)-1),Pl=le.analyzeSplitToContent(Al,",")),(Ze=Rl==null?void 0:Rl.split(","))==null||Ze.forEach((ll,jl)=>{var Wa,Hl,Jl,ar,bl,br;if(((Wa=le.analyzeSplitToContent(ll,"@"))==null?void 0:Wa.length)>1){let ka=(Hl=le.analyzeSplitToContent(ll,"@"))==null?void 0:Hl[1];ka="@"+ka,Da=ai(ka),ll=(Jl=le.analyzeSplitToContent(ll,"@"))==null?void 0:Jl[0],(ll==null?void 0:ll[(ll==null?void 0:ll.length)-1])==="@"&&(ll=ll==null?void 0:ll.slice(0,(ll==null?void 0:ll.length)-1))}r.push({label:ll,prop:ll,align:"center",menus:pe,groups:(Le==null?void 0:Le.length)===0?ua:(ar=Le==null?void 0:Le.find(ka=>(ka==null?void 0:ka.number)>=jl))==null?void 0:ar.contents,words:(Fe==null?void 0:Fe.length)===0?(bl=Qe==null?void 0:Qe[jl])==null?void 0:bl.split(":"):(br=Fe==null?void 0:Fe[jl])==null?void 0:br.split(":"),formType:(pe==null?void 0:pe.length)>0?"Select":"Input",mainKey:!!(jl===0||Pl!=null&&Pl.find(ka=>ka===ll)),filter:Da,isMainPath:(Le==null?void 0:Le.findIndex(ka=>(ka==null?void 0:ka.number)>=jl))===0})})}else r.push({label:ae,prop:ae,align:"center"})});else{let ae=(Z=le.analyzeSplitToContent(a,","))==null?void 0:Z.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));ae==null||ae.forEach(ve=>{r.push(St(ve,l))})}return r},gp=(a,l)=>{var p,c,u,m,g;let r=a;if(!a)return;let n="";((p=le.analyzeSplitToContent(a,"}"))==null?void 0:p.length)>1&&(r=(c=le.analyzeSplitToContent(a,"}"))==null?void 0:c[0],n=(u=le.analyzeSplitToContent(a,"}"))==null?void 0:u[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let i=[],o=[];return i.push({label:"排序",prop:"sort"}),i.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=le.analyzeSplitToContent(r,","))==null||m.forEach(y=>{var d;(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),(y==null?void 0:y[0])==="{"?(d=Bo(y,l))==null||d.forEach(A=>{i.push(A)}):i.push(St(y,l))}),i!=null&&i.some(y=>{var d;return(d=y==null?void 0:y.prop)==null?void 0:d.includes("@")})&&(i=i==null?void 0:i.filter(y=>{var d;return!((d=y==null?void 0:y.prop)!=null&&d.includes("@"))})),n!==""&&((n==null?void 0:n[0])=="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),(g=le.analyzeSplitToContent(n,","))==null||g.forEach(y=>{var d;(y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),(y==null?void 0:y[0])==="{"?(d=Bo(y,l))==null||d.forEach(A=>{o.push(A)}):o.push(St(y,l))})),{columns:i,secondColumns:o}},vn=a=>{var l,r,n,i,o;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let p=(r=(l=a==null?void 0:a.replace("(",vl))==null?void 0:l.split(vl))==null?void 0:r[1],c=(i=(n=a==null?void 0:a.replace("(",vl))==null?void 0:n.split(vl))==null?void 0:i[0];return p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1),p=(o=le.analyzeSplitToContent(p,","))==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==null?void 0:u[0])==="("&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),c+u)),p=p==null?void 0:p.join(","),a!=null&&a.includes("@Quote")&&(p!=null&&p.includes("@QuoteType")||(p=p===""?p+"@QuoteType=Manual":p+",@QuoteType=Manual"),p!=null&&p.includes("@QuoteSonSync")||(p=p===""?p+"@QuoteSonSync=No":p+",@QuoteSonSync=No"),p!=null&&p.includes("@QuoteFatherSync")||(p=p===""?p+"@QuoteFatherSync=Yes":p+",@QuoteFatherSync=Yes")),p}},ys=a=>{let l=a==null?void 0:a.map(r=>{var n,i;return{menus:r==null?void 0:r.menus,content:((n=r==null?void 0:r.menus)==null?void 0:n.join("/"))+vl+((i=r==null?void 0:r.groups)==null?void 0:i.join("/"))}});return l=l==null?void 0:l.filter(r=>{var n;return(r==null?void 0:r.menus)&&((n=r==null?void 0:r.menus)==null?void 0:n.length)>0}),l=l==null?void 0:l.map(r=>r==null?void 0:r.content),l=[...new Set(l)],l=l==null?void 0:l.map(r=>{var n,i;return{menus:(n=r==null?void 0:r.split(vl))==null?void 0:n[0],groups:((i=r==null?void 0:r.split(vl))==null?void 0:i[1])??[]}}),l},gs=a=>{var r;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=(r=le.analyzeSplitToContent(l,","))==null?void 0:r.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==null?void 0:n[0])!=="@"&&(n="@"+n),(n==null?void 0:n[1])==="("&&(n=vn(n)),n)),l==null?void 0:l.join(",")},mc=(a,l,r="")=>{var E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae;let n=[],i=[],o=[],p="",c="",u="",m=[],g=[],y=[],d=[],A="";if(((E=a==null?void 0:a[0])==null?void 0:E[0])!=="*"&&((S=a==null?void 0:a[0])==null?void 0:S[0])!=="$"&&!((x=a==null?void 0:a[0])!=null&&x.includes("$")))return;((b=a==null?void 0:a[0])==null?void 0:b[0])!=="*"&&((_=a==null?void 0:a[0])==null?void 0:_[0])!=="$"&&(p=(I=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:I[0],(p==null?void 0:p[0])!=="@"&&(p="@"+p),p=ai(p),u=(R=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:R[1],(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=u==null?void 0:u.replaceAll(":","/"));let Y=le.analyzeSplitToContent(a==null?void 0:a[0],":");if(n=(re=Y==null?void 0:Y.filter(ne=>(ne==null?void 0:ne[0])!=="{"&&(ne==null?void 0:ne[0])!=="["))==null?void 0:re.join(""),c=(X=a==null?void 0:a[0])==null?void 0:X.replace(n,""),(n==null?void 0:n[0])==="("&&(n=""),A=(ye=Y==null?void 0:Y.filter(ne=>(ne==null?void 0:ne[0])!=="["))==null?void 0:ye.join(""),A=(fe=a==null?void 0:a[0])==null?void 0:fe.replace(A,""),c=c==null?void 0:c.replace(A,""),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),((U=le.analyzeSplitToContent(c,"@"))==null?void 0:U.length)>1&&(p=(q=le.analyzeSplitToContent(c,"@"))==null?void 0:q[1],(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),p="@"+p,p=vn(p),c=(Z=le.analyzeSplitToContent(c,"@"))==null?void 0:Z[0],c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),((ae=le.analyzeSplitToContent(n,"@"))==null?void 0:ae.length)>1){p!==""&&(p=p+",");let ne=(ve=le.analyzeSplitToContent(n,"@"))==null?void 0:ve[1];ne="@"+ne,ne=vn(ne),p=p+ne,n=(ze=le.analyzeSplitToContent(n,"@"))==null?void 0:ze[0]}if((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=n===""?[]:n==null?void 0:n.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)),r!==""){let ne=(te=le.analyzeSplitToContent(r,")"))==null?void 0:te[0],pe=le.analyzeSplitToContent(r,")");pe=pe==null?void 0:pe.filter((Te,Le)=>Le!==(pe==null?void 0:pe.length)-1),pe=pe==null?void 0:pe.join("");let ua=(N=le.analyzeSplitToContent(r,"@"))==null?void 0:N[1];u=(W=(se=le.analyzeSplitToContent(r,"@"))==null?void 0:se[0])==null?void 0:W.replace(pe,""),(u==null?void 0:u[(u==null?void 0:u.length)-1])==="@"&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1));let Qe="";if(Qe=le.analyzeSplitToContent(r,")"),Qe=Qe==null?void 0:Qe.filter((Te,Le)=>Le!==0&&Le!==(Qe==null?void 0:Qe.length)-1),((ue=le.analyzeSplitToContent(r,"&"))==null?void 0:ue.length)>1&&(Qe==null?void 0:Qe.length)<2&&(ne="",u="",Qe=le.analyzeSplitToContent(r,")")),Qe!=null&&Qe.some(Te=>(Te==null?void 0:Te[0])===":")){let Te=(_e=Qe==null?void 0:Qe.filter(Le=>(Le==null?void 0:Le[0])===":"))==null?void 0:_e.join("");A=Te==null?void 0:Te.slice(1,Te==null?void 0:Te.length),Qe=Qe==null?void 0:Qe.filter(Le=>(Le==null?void 0:Le[0])!==":")}(Qe==null?void 0:Qe.length)>0&&((we=le.chunkArray(Qe))==null||we.forEach(Te=>{var al,Qa,Tl,Rl,Al;let Le="",Fe=[],Ne="";(Te==null?void 0:Te.length)>1&&(Ne="@"+(Te==null?void 0:Te[0]),Ne=vn(Ne));let me=(Te==null?void 0:Te.length)===1?Te==null?void 0:Te[0]:Te==null?void 0:Te[1];me=me==null?void 0:me.slice(1,me==null?void 0:me.length),Le=(Qa=(al=me==null?void 0:me.replace("(",vl))==null?void 0:al.split(vl))==null?void 0:Qa[0],me=(Rl=(Tl=me==null?void 0:me.replace("(",vl))==null?void 0:Tl.split(vl))==null?void 0:Rl[1],me=me==null?void 0:me.slice(0,(me==null?void 0:me.length)-1),Fe=(Al=le.analyzeSplitToContent(me,","))==null?void 0:Al.map(Pl=>((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)),Pl)),m.push({functionName:Le,functionRelatedWords:Fe,calculatorFilter:Ne})})),ne=gs(ne),ua=gs(ua);let Da=ne??"";if(Da!==""&&(Da=Da+","),Da=Da+ua,(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!==""&&p!==""&&(p=p+","),p=p+Da,(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=(Ke=le.analyzeSplitToContent(u,":"))==null?void 0:Ke.filter((Te,Le)=>{var Fe;return!((Te==null?void 0:Te[0])==="{"&&Le===((Fe=le.analyzeSplitToContent(u,":"))==null?void 0:Fe.length)-1)}),u=u==null?void 0:u.join(""),(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)),p!=null&&p.includes("@Sync")||(p=p===""?p+"@Sync=(Yes,Yes)":p+",@Sync=(Yes,Yes)"),u!=null&&u.includes("$")){let Te=(j=(la=u==null?void 0:u.replace("*",vl))==null?void 0:la.split(vl))==null?void 0:j[1],Le=(Oe=(We=u==null?void 0:u.replace("*",vl))==null?void 0:We.split(vl))==null?void 0:Oe[0];Le=Le==null?void 0:Le.split("$"),Le=((Me=(Ie=Le==null?void 0:Le[0])==null?void 0:Ie.split(":"))==null?void 0:Me[0])+":"+(Le==null?void 0:Le[1])+":",u=Le+"*"+Te}else u=(de=u==null?void 0:u.replaceAll("{",""))==null?void 0:de.replaceAll("}","");(u==null?void 0:u[0])===":"&&(A=u==null?void 0:u.slice(1,u==null?void 0:u.length),u="")}p!==""&&p&&(p="("+p+")"),p=u+p,((Ce=le.analyzeSplitToContent(c,"}"))==null?void 0:Ce.length)>1&&(c=(Je=le.analyzeSplitToContent(c,"}"))==null?void 0:Je.filter(ne=>(ne==null?void 0:ne[0])!=="@"),c=c==null?void 0:c.join(""));let D=gp(c,l);o=c===""?[]:(D==null?void 0:D.columns)??[],d=le.getColumnChild(o);let P=le.getColumnChild(o);o!=null&&o.some(ne=>{var pe;return Array.isArray(ne==null?void 0:ne.children)&&((pe=ne==null?void 0:ne.children)==null?void 0:pe.length)>0})&&(o=[o]),i=A?Oi(A):[],!(i!=null&&i.every(ne=>Array.isArray(ne)))&&(i==null?void 0:i.length)>0&&(i=[i]),(i==null?void 0:i.length)>0&&(Array.isArray(i==null?void 0:i[0])&&((Ea=i==null?void 0:i[0])!=null&&Ea.every(ne=>Array.isArray(ne)))?i=i==null?void 0:i.map((ne,pe)=>(ne=ne.map((ua,Qe)=>(ua.unshift("{}"),ua.unshift((Qe+1).toString()),ua)),ne)):i=i==null?void 0:i.map((ne,pe)=>(ne.unshift("{}"),ne.unshift((pe+1).toString()),ne))),D!=null&&D.secondColumns&&((Ge=D==null?void 0:D.secondColumns)==null?void 0:Ge.length)>0&&((i==null?void 0:i.length)>0?i=i==null?void 0:i.map((ne,pe)=>{var ua,Qe;return Array.isArray(ne==null?void 0:ne[0])?ne=ne==null?void 0:ne.map((Da,Te)=>{var Le,Fe;return Da.unshift((Fe=(Le=D==null?void 0:D.secondColumns)==null?void 0:Le[Te])==null?void 0:Fe.prop),Da}):ne.unshift((Qe=(ua=D==null?void 0:D.secondColumns)==null?void 0:ua[pe])==null?void 0:Qe.prop),ne}):i=($=D==null?void 0:D.secondColumns)==null?void 0:$.map((ne,pe)=>(ne=[ne==null?void 0:ne.label],ne.push(pe),ne)),o.unshift({label:"",prop:"disabled",sortable:!1})),d=d==null?void 0:d.map(ne=>{var pe,ua;return{menus:ne==null?void 0:ne.menus,content:((pe=ne==null?void 0:ne.menus)==null?void 0:pe.join("/"))+vl+((ua=ne==null?void 0:ne.groups)==null?void 0:ua.join("/"))}});let O=[];if(((ee=(V=p==null?void 0:p.replace("(",vl))==null?void 0:V.split(vl))==null?void 0:ee[0])!==""&&(O=(he=(ce=p==null?void 0:p.replace("(",vl))==null?void 0:ce.split(vl))==null?void 0:he[0],O=[O],O=O==null?void 0:O.map(ne=>{var ua,Qe,Da;let pe=ne==null?void 0:ne.split("*");return{menus:(ua=pe==null?void 0:pe[0])==null?void 0:ua.split(":"),content:((Qe=pe==null?void 0:pe[0])==null?void 0:Qe.replaceAll(":","/"))+vl+((Da=pe==null?void 0:pe[1])==null?void 0:Da.replaceAll(":","/"))}}),d=[...d,...O]),d=d==null?void 0:d.filter(ne=>{var pe;return(ne==null?void 0:ne.menus)&&((pe=ne==null?void 0:ne.menus)==null?void 0:pe.length)>0}),d=d==null?void 0:d.map(ne=>ne==null?void 0:ne.content),d=[...new Set(d)],d=d==null?void 0:d.map(ne=>{var pe,ua;return{menus:(pe=ne==null?void 0:ne.split(vl))==null?void 0:pe[0],groups:((ua=ne==null?void 0:ne.split(vl))==null?void 0:ua[1])??[]}}),g=P==null?void 0:P.filter(ne=>{var pe;return(ne==null?void 0:ne.filter)&&((pe=ne==null?void 0:ne.filter)==null?void 0:pe.includes("@Sync"))}),(g==null?void 0:g.length)>0&&(g=g==null?void 0:g.filter(ne=>{var pe,ua,Qe,Da;return(Da=(Qe=(ua=(pe=le.analyzeSplitToContent(ne==null?void 0:ne.filter,","))==null?void 0:pe.find(Te=>Te==null?void 0:Te.includes("@Sync")))==null?void 0:ua.split(","))==null?void 0:Qe[0])==null?void 0:Da.includes("Yes")}),g=ys(g)),y=P==null?void 0:P.filter(ne=>{var pe;return(ne==null?void 0:ne.filter)&&((pe=ne==null?void 0:ne.filter)==null?void 0:pe.includes("@Sync"))}),(y==null?void 0:y.length)>0&&(y=y==null?void 0:y.filter(ne=>{var pe,ua,Qe,Da;return(Da=(Qe=(ua=(pe=le.analyzeSplitToContent(ne==null?void 0:ne.filter,","))==null?void 0:pe.find(Te=>Te==null?void 0:Te.includes("@Sync")))==null?void 0:ua.split(","))==null?void 0:Qe[1])==null?void 0:Da.includes("Yes")}),y=ys(y)),p!==""&&(p!=null&&p.includes("@Sync"))&&(p==null?void 0:p[0])!=="("){let ne=(ca=p==null?void 0:p.replace("(",vl))==null?void 0:ca.split(vl),pe=ne==null?void 0:ne[1];if(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1),pe=le.analyzeSplitToContent(pe,","),(ga=(Ve=(ia=pe==null?void 0:pe.find(ua=>ua==null?void 0:ua.includes("@Sync")))==null?void 0:ia.split(","))==null?void 0:Ve[0])!=null&&ga.includes("Yes")){let ua=ne==null?void 0:ne[0];ua=[{menus:(De=(Ta=ua==null?void 0:ua.split("*"))==null?void 0:Ta[0])==null?void 0:De.replaceAll(":","/"),groups:((Na=(Fa=ua==null?void 0:ua.split("*"))==null?void 0:Fa[1])==null?void 0:Na.split(":"))??[]}],g=[...g,...ua]}if((ta=(ja=(da=pe==null?void 0:pe.find(ua=>ua==null?void 0:ua.includes("@Sync")))==null?void 0:da.split(","))==null?void 0:ja[1])!=null&&ta.includes("Yes")){let ua=ne==null?void 0:ne[0];ua=[{menus:(ya=(je=ua==null?void 0:ua.split("*"))==null?void 0:je[0])==null?void 0:ya.replaceAll(":","/"),groups:((Ae=(Ze=ua==null?void 0:ua.split("*"))==null?void 0:Ze[1])==null?void 0:Ae.split(":"))??[]}],y=[...y,...ua]}}return{groupName:n,tableColumns:o,tableFilter:p,tableContents:i,columns:(D==null?void 0:D.secondColumns)??[],relatedQuotes:d,fatherSyncContents:g,sonSyncContents:y,calculatorFilters:m}},yc=(a,l)=>(a=a==null?void 0:a.map((r,n)=>{var i,o,p,c;if(Array.isArray(r))r=r==null?void 0:r.map(u=>{var m,g,y,d;return u!=null&&u.isMainPath||(((m=u==null?void 0:u.children)==null?void 0:m.length)>0?u.children=yc(u.children,l):((g=u==null?void 0:u.menus)==null?void 0:g.length)>0&&!((y=r==null?void 0:r[0])!=null&&y.isMainPath)&&(u.menus=(d=u.menus)==null?void 0:d.map((A,w)=>{var Y,D;return((Y=u.menus)==null?void 0:Y.length)-1===w&&A===""&&(l==null?void 0:l.parentContent)+"/"!==((D=u.menus)==null?void 0:D.join("/"))&&(A=l==null?void 0:l.value),u}),u.bindMenus=u.menus)),u});else{if(n===0&&((i=r.menus)==null?void 0:i.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((o=r.menus)==null?void 0:o.length)>0&&!((p=a==null?void 0:a[0])!=null&&p.isMainPath)&&(r.menus=(c=r.menus)==null?void 0:c.map((u,m)=>{var g,y;return((g=r.menus)==null?void 0:g.length)-1===m&&u===""&&(l==null?void 0:l.parentContent)+"/"!==((y=r.menus)==null?void 0:y.join("/"))&&(u=l==null?void 0:l.value),u}),r.bindMenus=r.menus)}return r}),a),bp=(a,l)=>(a=a==null?void 0:a.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=yc(r.contents,l)),r)),a),Et=(a,l)=>{let r=a;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(n=>(n=Et(n,l),n)):r=r==null?void 0:r.map(n=>{var i,o;return n!=null&&n.children&&((i=n==null?void 0:n.children)==null?void 0:i.length)>0?n.children=Et(n==null?void 0:n.children,l):n!=null&&n.words&&((o=n==null?void 0:n.words)==null?void 0:o.length)>0&&(l!=null&&l.find(p=>{var c,u,m,g;return((g=(c=n==null?void 0:n.prop)==null?void 0:c.split("."))==null?void 0:g[((m=(u=n==null?void 0:n.prop)==null?void 0:u.split("."))==null?void 0:m.length)-1])===p}))&&(n.mainKey=!0),n}),r};let Br="$R";const kp=M.useUnit(M.pinia),{selectTitle:kn}=M.storeToRefs(kp),xp=M.useMenuState(M.pinia),{localFiles:wp}=M.storeToRefs(xp),_p=M.useLoginState(M.pinia),{loginUserInfo:yt}=M.storeToRefs(_p),An=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@ShowHide",value:"onShowHide",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:"@MainParam",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:"@ColumnNum",value:"onColumnNum",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 fi=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(fi||{});const Sp=async a=>{var r,n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O;let l=le.analyzeSplitToContent((a==null?void 0:a.filter)??"",")");if((l==null?void 0:l.length)>1){let E=l==null?void 0:l[0];E=E==null?void 0:E.slice(1,(E==null?void 0:E.length)-1),E=(n=(r=E==null?void 0:E.replace("(",Br))==null?void 0:r.split(Br))==null?void 0:n[1],E="("+((i=E==null?void 0:E.replaceAll("{",""))==null?void 0:i.replaceAll("}",""));let S=le.calculatorAndToOr(E),x=Object.keys(S==null?void 0:S[0]);if(E=S,((o=x==null?void 0:x[0])==null?void 0:o[0])==="$"){let b=(c=x==null?void 0:x[0])==null?void 0:c.slice(1,((p=x==null?void 0:x[0])==null?void 0:p.length)-1),_=(m=(u=b==null?void 0:b.split("*"))==null?void 0:u[0])==null?void 0:m.replaceAll(".","/"),I=(d=(y=(g=b==null?void 0:b.split("*"))==null?void 0:g[1])==null?void 0:y.split("."))==null?void 0:d[0],R=await Hr(_,!1);R=(A=R==null?void 0:R.filter(U=>(U==null?void 0:U.name)===I))==null?void 0:A[0];let re=(Y=(w=R==null?void 0:R.compData)==null?void 0:w.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:Y.contents;E=E==null?void 0:E.map(U=>{var Z,ae;let q={};for(let ve in U)if((ve==null?void 0:ve[0])==="$"){let ze=(ae=ve==null?void 0:ve.split("."))==null?void 0:ae[((Z=ve==null?void 0:ve.split("."))==null?void 0:Z.length)-1];q[ze]=U==null?void 0:U[ve]}else q[ve]=U==null?void 0:U[ve];return q});let X=(P=(D=R==null?void 0:R.compData)==null?void 0:D.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:P.contents;X=(O=le.getEqualChild(X))==null?void 0:O.filter(U=>(U==null?void 0:U.label)!=="操作");let fe=le.tableToForm(re,X);if(E==null||E.forEach(U=>{var q,Z,ae,ve,ze;for(let te in U)(U==null?void 0:U[te])==="LoginUser"&&(U[te]=((q=yt.value)==null?void 0:q.姓名)||((Z=yt.value)==null?void 0:Z.account)||((ae=yt.value)==null?void 0:ae.账号)),!((ve=fe==null?void 0:fe[0])!=null&&ve.find(N=>{var se;return(N==null?void 0:N.key)===te||((se=N==null?void 0:N.key)==null?void 0:se.includes(te))}))&&!(fe!=null&&fe.find(N=>{var se;return(N==null?void 0:N.key)===te||((se=N==null?void 0:N.key)==null?void 0:se.includes(te))}))||(((ze=U[te])==null?void 0:ze[0])!=="!"?fe=fe==null?void 0:fe.filter(N=>{var se,W;return((se=N==null?void 0:N.find(ue=>{var _e;return(ue==null?void 0:ue.key)===te||((_e=ue==null?void 0:ue.key)==null?void 0:_e.includes(te))}))==null?void 0:se.value)===U[te]||Array.isArray(U==null?void 0:U[te])&&((W=U==null?void 0:U[te])==null?void 0:W.find(ue=>{var _e;return((_e=N==null?void 0:N.find(we=>{var Ke;return(we==null?void 0:we.key)===te||((Ke=we==null?void 0:we.key)==null?void 0:Ke.includes(te))}))==null?void 0:_e.value)===ue}))}):fe=fe==null?void 0:fe.filter(N=>{var se;return((se=N==null?void 0:N.find(W=>{var ue;return(W==null?void 0:W.key)===te||((ue=W==null?void 0:W.key)==null?void 0:ue.includes(te))}))==null?void 0:se.value)!==U[te]}))}),(fe==null?void 0:fe.length)===0){let U=a==null?void 0:a.contents;return U.push({key:"hideContents",contents:!0}),U}}}return a==null?void 0:a.contents},Ep=a=>{var l,r,n,i,o;if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let p=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=le.analyzeSplitToContent(c,","))==null?void 0:l.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));let u=(c==null?void 0:c[2])??"Center",m=(c==null?void 0:c[0])??"Picture";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=(r=le.analyzeSplitToContent(c,","))==null?void 0:r.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));let g=(o=(i=(n=wp.value)==null?void 0:n.filter(y=>{var d;return(y==null?void 0:y.path)===((d=a==null?void 0:a.groupName)==null?void 0:d[0])}))==null?void 0:i[0])==null?void 0:o.children;return g=(g==null?void 0:g.filter(y=>c==null?void 0:c.find(d=>d===(y==null?void 0:y.name))))??[],(c==null?void 0:c.length)>0&&(g==null?void 0:g.length)===0&&(c==null||c.forEach(y=>{g.push({url:"file:///"+(y==null?void 0:y.replaceAll("\\","/"))})})),g[0]={...g==null?void 0:g[0],position:u,fileType:m},p.push({key:"backGround",contents:g}),p}return a==null?void 0:a.contents},Cp=a=>{const l=bc(a==null?void 0:a.filter);return l?af(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},Dp=a=>{let l=parseInt(a==null?void 0:a.filter);l=1/l;let r=a==null?void 0:a.contents;return r.push({key:"rowPosition",contents:l}),r},Tp=a=>{const l=bc(a==null?void 0:a.filter);if(!l)return a==null?void 0:a.contents;let r=a==null?void 0:a.contents;return r.push({key:"numPosition",contents:l}),r},Bp=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 r=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(r)?a==null?void 0:a.filter:r}),l}return a==null?void 0:a.contents},Np=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},Ap=a=>{var r;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(n=>{var i;return(n==null?void 0:n.key)==="tableContents"&&(n.contents=(i=n.contents)==null?void 0:i.slice(0,parseInt(a==null?void 0:a.filter))),n})},zp=async a=>{var l,r,n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(Z=>((Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=le.shuffle(Z.contents)),Z));if((a==null?void 0:a.filter)==="Auto"){let q=(n=(r=a==null?void 0:a.contents)==null?void 0:r.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:n.contents;Array.isArray(q==null?void 0:q[0])&&(q=q==null?void 0:q[0]),q=le.getColumnChild(q);let Z=q==null?void 0:q.filter(ue=>(ue==null?void 0:ue.filter)&&(ue==null?void 0:ue.filter)!==""),ae=new Map,ve=[];Z==null||Z.forEach(ue=>{var _e,we;ae.get((_e=ue==null?void 0:ue.menus)==null?void 0:_e.join("/"))||(ae.set((we=ue==null?void 0:ue.menus)==null?void 0:we.join("/"),ue),ve.push(ue))});let ze=(o=(i=kn==null?void 0:kn.value)==null?void 0:i.find(ue=>(ue==null?void 0:ue.condition)==="child"))==null?void 0:o.value,te=ve==null?void 0:ve.map(ue=>{var _e,we,Ke;return ue=(_e=ue==null?void 0:ue.menus)==null?void 0:_e.join("/"),(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&((Ke=(we=kn==null?void 0:kn.value)==null?void 0:we.find(la=>(la==null?void 0:la.condition)==="child"))==null?void 0:Ke.parentContent)+"/"!==ue?ue=ue+ze:(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),ue}),N=ve==null?void 0:ve.map(ue=>ue==null?void 0:ue.groups),se=te==null?void 0:te.map(async ue=>{let _e=await Hr(ue,!1);return{path:ue,contents:_e}});se=await Promise.all(se);let W=se==null?void 0:se.map((ue,_e)=>{var Ke,la,j,We,Oe,Ie,Me;let we=(Ke=ue==null?void 0:ue.contents)==null?void 0:Ke.filter(de=>{var Ce,Je;return(de==null?void 0:de.name)===((Je=N==null?void 0:N[_e])==null?void 0:Je[((Ce=N==null?void 0:N[_e])==null?void 0:Ce.length)-1])});return we=(We=(j=(la=we==null?void 0:we[0])==null?void 0:la.compData)==null?void 0:j.find(de=>(de==null?void 0:de.key)==="tableContents"))==null?void 0:We.contents,(ue==null?void 0:ue.path)===((Ie=(Oe=kn==null?void 0:kn.value)==null?void 0:Oe.find(de=>(de==null?void 0:de.condition)==="child"))==null?void 0:Ie.parentContent)&&(we=((Me=we==null?void 0:we.map(de=>{for(let Ce in de)if(de[Ce]===ze)return de}))==null?void 0:Me.filter(de=>de))??[]),we??[]});if(W=W==null?void 0:W.map(ue=>(ue=ue==null?void 0:ue.map(_e=>{var Ke;let we={};for(let la in _e)if(Z!=null&&Z.find(j=>{var We,Oe;return((Oe=(We=j==null?void 0:j.words)==null?void 0:We[0])==null?void 0:Oe.replaceAll("'",""))===la})){let j=(Ke=Z==null?void 0:Z.find(We=>{var Oe,Ie;return((Ie=(Oe=We==null?void 0:We.words)==null?void 0:Oe[0])==null?void 0:Ie.replaceAll("'",""))===la}))==null?void 0:Ke.prop;we[j]=_e==null?void 0:_e[la]}return we}),ue)),W=le.cartesianProduct(W),Array.isArray(W==null?void 0:W[0])&&(W=W==null?void 0:W[0]),(W==null?void 0:W.length)>0&&((y=(c=(p=Z==null?void 0:Z[0])==null?void 0:p.menus)==null?void 0:c.join("/"))==null?void 0:y[((g=(m=(u=Z==null?void 0:Z[0])==null?void 0:u.menus)==null?void 0:m.join("/"))==null?void 0:g.length)-1])==="/")return(d=a==null?void 0:a.contents)==null?void 0:d.map(_e=>{var we;return(_e==null?void 0:_e.key)==="tableContents"&&(W==null?void 0:W.length)>0&&(_e.contents=((we=_e.contents)==null?void 0:we.length)>0?_e.contents:W),_e})}if((a==null?void 0:a.filter)==="Manual"){let q=[],Z=[],ae=(w=(A=a==null?void 0:a.contents)==null?void 0:A.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:w.contents;(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])===")"?ae=(D=(Y=ae==null?void 0:ae.replace("(",Br))==null?void 0:Y.split(Br))==null?void 0:D[0]:ae="",ae!==""&&(q=((O=(P=ae==null?void 0:ae.split("*"))==null?void 0:P[0])==null?void 0:O.split(":"))??[],Z=((_=(b=(x=(S=(E=ae==null?void 0:ae.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",Br))==null?void 0:x.split(Br))==null?void 0:b[0])==null?void 0:_.split(":"))??[]);let ve=(R=(I=a==null?void 0:a.contents)==null?void 0:I.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:R.contents;ve=(X=(re=ve==null?void 0:ve.replace("(",Br))==null?void 0:re.split(Br))==null?void 0:X[1],ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1);let ze=(ye=a==null?void 0:a.contents)==null?void 0:ye.map(N=>{var se,W,ue,_e,we,Ke,la,j,We;return(N==null?void 0:N.key)==="header"&&((se=N==null?void 0:N.contents)!=null&&se.every(Oe=>(Oe==null?void 0:Oe.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((W=N==null?void 0:N.contents)==null?void 0:W[0])?N.contents=(ue=N==null?void 0:N.contents)==null?void 0:ue.map((Oe,Ie)=>{var Me,de,Ce;return Oe!=null&&Oe.isMainPath||(Ie===0?(Oe.mainKey=!0,Oe.formType="Select",Oe.bindMenus=q,Oe.groups=((Me=Oe.groups)==null?void 0:Me.length)===0?Z:Oe.groups,Oe.words=((de=Oe.words)==null?void 0:de.length)===0?[Oe==null?void 0:Oe.prop]:Oe.words,Oe.filter=ve,(!(Oe!=null&&Oe.menus)||((Ce=Oe==null?void 0:Oe.menus)==null?void 0:Ce.length)===0)&&(Oe.menus=q)):(Oe.mainKey=!1,Oe.bindMenus=q)),Oe}):Array.isArray((_e=N==null?void 0:N.contents)==null?void 0:_e[0])&&((la=(Ke=(we=N==null?void 0:N.contents)==null?void 0:we[0])==null?void 0:Ke.filter(()=>(q==null?void 0:q.length)>0))==null?void 0:la.length)>0&&(N.contents[0]=(We=(j=N==null?void 0:N.contents)==null?void 0:j[0])==null?void 0:We.map((Oe,Ie)=>{var Me,de,Ce;return Oe!=null&&Oe.isMainPath||(Ie===0?(Oe.mainKey=!0,Oe.formType="Select",Oe.bindMenus=q,Oe.groups=((Me=Oe.groups)==null?void 0:Me.length)===0?Z:Oe.groups,Oe.words=((de=Oe.words)==null?void 0:de.length)===0?[Oe==null?void 0:Oe.prop]:Oe.words,Oe.filter=ve,(!(Oe!=null&&Oe.menus)||Array.isArray(Oe==null?void 0:Oe.menus)&&((Ce=Oe==null?void 0:Oe.menus)==null?void 0:Ce.length)===0)&&(q==null?void 0:q.length)>0&&(Oe.menus=q)):(Oe.mainKey=!1,Oe.bindMenus=q)),Oe}))),N}),te=(fe=ze==null?void 0:ze.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:fe.contents;if(Array.isArray(te==null?void 0:te[0])&&(te=te==null?void 0:te[0]),te=le.getColumnChild(te),te!=null&&te.some(N=>{var se,W;return((W=N==null?void 0:N.menus)==null?void 0:W[((se=N==null?void 0:N.menus)==null?void 0:se.length)-1])===""})){let N=(U=kn==null?void 0:kn.value)==null?void 0:U.find(se=>(se==null?void 0:se.condition)==="child");ze=bp(ze,N)}return ze}if((a==null?void 0:a.filter)==="Chart"){let q=a==null?void 0:a.contents;return q.push({key:"newType",contents:"Chart"}),q}if((a==null?void 0:a.filter)==="Carousel"){let q=a==null?void 0:a.contents;return q.push({key:"newType",contents:"Carousel"}),q}return a==null?void 0:a.contents},Mp=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},Ip=a=>{var n,i,o,p,c,u,m,g,y,d,A,w;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((i=(n=l==null?void 0:l.replace(":",Br))==null?void 0:n.split(Br))==null?void 0:i[1])),l=(o=l==null?void 0:l.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(c=(p=l==null?void 0:l.split("="))==null?void 0:p[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 Y=(u=l==null?void 0:l.split("="))==null?void 0:u[0],D=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(g=D==null?void 0:D.slice(1,D==null?void 0:D.length))!=null&&g.includes("$")&&(D=(A=(d=(y=kn==null?void 0:kn.value)==null?void 0:y.filter(P=>(P==null?void 0:P.condition)==="child"))==null?void 0:d[0])==null?void 0:A.value),l=Y+"="+D}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 r=le.calculatorAndToOr(l);if((r==null?void 0:r.length)>0){let Y=[];return r==null||r.forEach(P=>{let O={};for(let E in P){let S=E;S!=null&&S.includes("[")||(O[S]=P[E])}Y.push(O)}),(w=a==null?void 0:a.contents)==null?void 0:w.map(P=>{var E,S,x;let O=(S=(E=a==null?void 0:a.contents)==null?void 0:E.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:S.contents;if(O=(x=le.getEqualChild(O))==null?void 0:x.filter(b=>(b==null?void 0:b.label)!=="操作"),(P==null?void 0:P.key)==="tableContents"){let _=le.tableToForm(P==null?void 0:P.contents,O);Y==null||Y.forEach(I=>{var R,re;for(let X in I)!((R=_==null?void 0:_[0])!=null&&R.find(ye=>{var fe;return(ye==null?void 0:ye.key)===X||((fe=ye==null?void 0:ye.key)==null?void 0:fe.includes(X))}))&&!(_!=null&&_.find(ye=>{var fe;return(ye==null?void 0:ye.key)===X||((fe=ye==null?void 0:ye.key)==null?void 0:fe.includes(X))}))||(((re=I[X])==null?void 0:re[0])!=="!"?_=_==null?void 0:_.filter(ye=>{var fe,U;return((fe=ye==null?void 0:ye.find(q=>{var Z;return(q==null?void 0:q.key)===X||((Z=q==null?void 0:q.key)==null?void 0:Z.includes(X))}))==null?void 0:fe.value)===I[X]||Array.isArray(I==null?void 0:I[X])&&((U=I==null?void 0:I[X])==null?void 0:U.find(q=>{var Z;return((Z=ye==null?void 0:ye.find(ae=>{var ve;return(ae==null?void 0:ae.key)===X||((ve=ae==null?void 0:ae.key)==null?void 0:ve.includes(X))}))==null?void 0:Z.value)===q}))}):_=_==null?void 0:_.filter(ye=>{var fe;return((fe=ye==null?void 0:ye.find(U=>{var q;return(U==null?void 0:U.key)===X||((q=U==null?void 0:U.key)==null?void 0:q.includes(X))}))==null?void 0:fe.value)!==I[X]}))}),(_==null?void 0:_.length)===0?P.contents=[]:P.contents=_==null?void 0:_.map(I=>{let R={};return I==null||I.forEach(re=>{R[re==null?void 0:re.key]=re==null?void 0:re.value}),R})}return P})}return a==null?void 0:a.contents},Op=a=>a==null?void 0:a.contents,Lp=a=>a==null?void 0:a.contents,Rp=a=>{var l,r,n,i;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let o=(n=(r=a==null?void 0:a.filter)==null?void 0:r.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:n.split(",");return(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=Et(c.contents,o)),c))}return a==null?void 0:a.contents},$p=a=>{var r,n,i,o,p;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(n=(r=l==null?void 0:l.replace("(",Br))==null?void 0:r.split(Br))==null?void 0:n[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=(i=le.analyzeSplitToContent(c,","))==null?void 0:i.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));let u=c==null?void 0:c[0];(u==null?void 0:u[0])==="("&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1));let m=(c==null?void 0:c[1])??"Up",g=(o=a==null?void 0:a.contents)==null?void 0:o.map(y=>{var d,A;if(m==="Up"){if((y==null?void 0:y.key)==="extraButton"){let w=(d=u==null?void 0:u.split(","))==null?void 0:d.map(Y=>({label:Y,prop:Y}));y.contents=[...w??[],...y.contents]}}else if(m==="Line"&&(y==null?void 0:y.key)==="rowButton"){let w=(A=u==null?void 0:u.split(","))==null?void 0:A.map(Y=>({label:Y,prop:Y}));y.contents=[...w??[],...y.contents]}return y});if(m==="Bottom"||m==="Down"){let y=(p=u==null?void 0:u.split(","))==null?void 0:p.map(d=>({label:d,prop:d}));g.push({key:"bottomButton",contents:y})}return g}return a==null?void 0:a.contents},Vp=a=>a==null?void 0:a.contents,Fp=a=>{var r;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!==""?(r=a==null?void 0:a.contents)==null?void 0:r.map(i=>{var o;return(i==null?void 0:i.key)==="rowButton"&&(i.contents=(o=l==null?void 0:l.split(","))==null?void 0:o.map(p=>({label:p,prop:p}))),i}):a==null?void 0:a.contents},Pp=a=>{var r;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 n=a==null?void 0:a.contents,i=(r=l==null?void 0:l.split(","))==null?void 0:r.map(o=>({label:o,prop:o}));return n.push({key:"bottomButton",contents:i}),n}return a==null?void 0:a.contents},jp=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(r=>{var n;return(r==null?void 0:r.key)==="formContent"&&(r.contents=(n=r.contents)==null?void 0:n.map(i=>(i.isNoClick=!0,i))),r}),l!=null&&l.find(r=>(r==null?void 0:r.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(r=>(r==null?void 0:r.key)!=="extraButton"&&(r==null?void 0:r.key)!=="rowButton")),l}return a==null?void 0:a.contents},Hp=a=>{var l;if(a!=null&&a.filter){const r=parseInt(a==null?void 0:a.filter);return!r||Number.isNaN(r)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(o=i.contents)==null?void 0:o.map(p=>(p.width=r,p))),i})}return a==null?void 0:a.contents},Up=a=>{var l,r,n,i;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const o=parseInt(a==null?void 0:a.filter);return!o||Number.isNaN(o)?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(c=>{var u;return(c==null?void 0:c.key)==="formContent"&&(c.contents=(u=c.contents)==null?void 0:u.map(m=>(m.width=o,m))),c})}if(((n=a==null?void 0:a.filter)==null?void 0:n[0])==="["){let o=Oi(a==null?void 0:a.filter),p=Array.isArray(o)?o.map(u=>parseInt(u)).filter(u=>!!u&&!Number.isNaN(u)):[];return p.length?(i=a==null?void 0:a.contents)==null?void 0:i.map(u=>{if((u==null?void 0:u.key)==="formContent"){const m=u.contents??[];u.contents=m.map((g,y)=>{const d=y+1;let A=0,w=0;for(let D=0;D<p.length;D++){if(w+=p[D],d<=w){A=D;break}D===p.length-1&&(A=p.length-1)}const Y=p[A]||p[p.length-1]||1;return g.width=Y,g})}return u}):a==null?void 0:a.contents}return a==null?void 0:a.contents},qp=a=>{var l;if((a==null?void 0:a.filter)!==""){let 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=r==null?void 0:r.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o,p,c;return(i==null?void 0:i.key)==="header"&&(Array.isArray((o=i==null?void 0:i.contents)==null?void 0:o[0])?i.contents[0]=(c=i.contents[0])==null?void 0:c.map(u=>(r!=null&&r.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u)):i.contents=(p=i.contents)==null?void 0:p.map(u=>(r!=null&&r.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u))),i})}return a==null?void 0:a.contents},Wp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const n=o=>(r!=null&&r.find(p=>p===(o==null?void 0:o.prop))&&(o.required=!0),o!=null&&o.children&&Array.isArray(o.children)&&(o.children=o.children.map(p=>n(p))),o);return(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var p,c,u;return(o==null?void 0:o.key)==="header"&&(Array.isArray((p=o==null?void 0:o.contents)==null?void 0:p[0])?o.contents[0]=(u=o.contents[0])==null?void 0:u.map(m=>n(m)):o.contents=(c=o.contents)==null?void 0:c.map(m=>n(m))),o})}return a==null?void 0:a.contents},Kp=async a=>{var n,i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E;const l=M.useUnit(M.pinia),{chooseTitle:r}=M.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let S=await Hr(((i=(n=r==null?void 0:r.value)==null?void 0:n[0])==null?void 0:i.parentContent)??((p=(o=r==null?void 0:r.value)==null?void 0:o[0])==null?void 0:p.relatedContent),!1),x=(u=(c=r==null?void 0:r.value)==null?void 0:c[0])==null?void 0:u.value;(g=(m=S==null?void 0:S[0])==null?void 0:m.compData)!=null&&g.find(R=>(R==null?void 0:R.key)==="header")?S=(y=S==null?void 0:S[0])==null?void 0:y.compData:S=(A=(d=S==null?void 0:S.filter(R=>{var re;return(re=R==null?void 0:R.compData)==null?void 0:re.find(X=>(X==null?void 0:X.key)==="header")}))==null?void 0:d[0])==null?void 0:A.compData;let b=(w=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:w.contents;Array.isArray(b==null?void 0:b[0])&&(b=b==null?void 0:b[0]),b=((Y=b==null?void 0:b.find(R=>R==null?void 0:R.isMainKey))==null?void 0:Y.prop)??((D=b==null?void 0:b[0])==null?void 0:D.prop);let _=(O=(P=S==null?void 0:S.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:P.contents)==null?void 0:O.find(R=>(R==null?void 0:R[b])===x);return(E=a==null?void 0:a.contents)==null?void 0:E.map(R=>{var re;return(R==null?void 0:R.key)==="formContent"&&(R.contents=(re=R.contents)==null?void 0:re.map(X=>(X.value=_==null?void 0:_[X==null?void 0:X.prop],X))),R})}return a==null?void 0:a.contents},Gp=a=>{var l,r,n,i,o;if((l=a==null?void 0:a.extra)!=null&&l.row){let p=a==null?void 0:a.filter;if(p!=null&&p.includes("*")&&(p="({"+((n=(r=p==null?void 0:p.replace("{",Br))==null?void 0:r.split(Br))==null?void 0:n[1])),p=(i=p==null?void 0:p.replaceAll("{",""))==null?void 0:i.replaceAll("}",""),(p==null?void 0:p[0])!=="("&&(p="("+p+")"),p.slice(1,(p==null?void 0:p.length)-1)==="undefined")return a==null?void 0:a.contents;let c=le.calculatorAndToOr(p),u=c==null?void 0:c[0],m=(o=a==null?void 0:a.extra)==null?void 0:o.row,g=[];for(let y in u)(u==null?void 0:u[y])===(m==null?void 0:m[y])?g.push(!0):g.push(!1);return g!=null&&g.every(y=>y===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Yp=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},Jp=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},Xp=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},Zp=a=>{var l;if(a!=null&&a.filter){let r=a==null?void 0:a.contents,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=(l=le.analyzeSplitToContent(n,","))==null?void 0:l.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),i)),r.push({key:"stepName",contents:n}),r}return a==null?void 0:a.contents},Qp=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},gc={onNumSlice:Ap,onRandomContents:zp,onConditionContents:Ip,onFatherPaceContents:Op,onPaceContents:Lp,onMainTagContents:Rp,onButtonContents:$p,onPamButtonContents:Vp,onRowButtonContents:Fp,onRelated:Kp,onRowNum:Up,onFixRow:qp,onReqItem:Wp,onBottomButtonContents:Pp,onConditionContent:Gp,onTabs:Yp,onSinChoice:Jp,onTextSize:Bp,onTextRGBA:Np,onPosition:Cp,onColumnNum:Dp,onSize:Tp,onShowType:Xp,onStepName:Zp,onStep:Qp,onInterfaceTypeContents:Mp,onBackGround:Ep,onMaxColumn:Hp,onEditRead:jp,onShowHide:Sp},ef=async(a,l,r="")=>{var p,c,u,m,g,y,d,A,w,Y,D,P;let n="";if(((p=a==null?void 0:a.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:p.contents)!==""&&(n=(c=a==null?void 0:a.find(O=>(O==null?void 0:O.key)==="filter"))==null?void 0:c.contents),n===""||!n)return a;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(m=(u=n==null?void 0:n.replace("(",Br))==null?void 0:u.split(Br))==null?void 0:m[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(g=le.analyzeSplitToContent(n,","))==null?void 0:g.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!=null&&O.includes("(")||(O=O==null?void 0:O.replaceAll(":","=")),O)),o=a;for(let O in i){let E,S="";E=(A=(d=(y=i==null?void 0:i[O])==null?void 0:y.replace("=",Br))==null?void 0:d.split(Br))==null?void 0:A[0],S=(D=(Y=(w=i==null?void 0:i[O])==null?void 0:w.replace("=",Br))==null?void 0:Y.split(Br))==null?void 0:D[1];let x=(P=An==null?void 0:An.find(b=>(b==null?void 0:b.key)===E))==null?void 0:P.value;if(x){const b=gc[x];o=await b({contents:o,filter:S,extra:l,groupName:r})}}return o},$o=async(a,l,r="")=>{var c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re;let n="";if(((c=a==null?void 0:a.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(u=a==null?void 0:a.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:u.contents),n===""||!n)return a;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(g=(m=n==null?void 0:n.replace("(",Br))==null?void 0:m.split(Br))==null?void 0:g[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(y=le.analyzeSplitToContent(n,","))==null?void 0:y.map(X=>((X==null?void 0:X[(X==null?void 0:X.length)-1])===","&&(X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1)),X!=null&&X.includes("(")||(X=X==null?void 0:X.replaceAll(":","=")),X)),o=a,p=new Map;i==null||i.forEach(X=>{var fe,U,q;let ye=(fe=X==null?void 0:X.split("="))==null?void 0:fe[0];if(ye==="@MainParam"&&p.get(ye)){let Z=p.get(ye);Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1);let ae=(q=(U=X==null?void 0:X.replace("{",Br))==null?void 0:U.split(Br))==null?void 0:q[1];ae=Z+","+ae,p.set(ye,ae)}else ye==="@Button"&&p.get(ye)?p.set(X,X):p.set(ye,X)}),i=Array.from(p.values()),i=i==null?void 0:i.sort((X,ye)=>{var fe,U;return((fe=An==null?void 0:An.find(q=>ye==null?void 0:ye.includes(q==null?void 0:q.key)))==null?void 0:fe.order)-((U=An==null?void 0:An.find(q=>X==null?void 0:X.includes(q==null?void 0:q.key)))==null?void 0:U.order)});for(let X in i){let ye,fe="";(d=i==null?void 0:i[X])!=null&&d.includes("(")&&((A=i==null?void 0:i[X])!=null&&A.includes("@If"))?(ye=(D=(Y=(w=i==null?void 0:i[X])==null?void 0:w.replace("(",Br))==null?void 0:Y.split(Br))==null?void 0:D[0],fe="("+((E=(O=(P=i==null?void 0:i[X])==null?void 0:P.replace("(",Br))==null?void 0:O.split(Br))==null?void 0:E[1])):(ye=(b=(x=(S=i==null?void 0:i[X])==null?void 0:S.replace("=",Br))==null?void 0:x.split(Br))==null?void 0:b[0],fe=(R=(I=(_=i==null?void 0:i[X])==null?void 0:_.replace("=",Br))==null?void 0:I.split(Br))==null?void 0:R[1]);let U=(re=An==null?void 0:An.find(q=>(q==null?void 0:q.key)===ye))==null?void 0:re.value;if(U){const q=gc[U];o=await q({contents:o,filter:fe,extra:l,groupName:r})}}return o},bc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const r=l.slice(1,-1).split(",").map(n=>Number(n.trim()));return r.length<2||r.some(n=>Number.isNaN(n))?null:[r[0],r[1]]},af=(a,l)=>{var Y,D,P,O,E;const r=Array.isArray(a)?a:[],n=r.find(S=>(S==null?void 0:S.key)==="formContent"),i=Array.isArray(n==null?void 0:n.contents)?n.contents:[],o=((Y=r.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:Y.contents)??{},p=(i==null?void 0:i[0])??{};let c=((D=l==null?void 0:l.position)==null?void 0:D[0])??(o==null?void 0:o._positionStartRow)??(p==null?void 0:p._positionStartRow),u=((P=l==null?void 0:l.position)==null?void 0:P[1])??(o==null?void 0:o._positionRowSpan)??(p==null?void 0:p._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!u||Number.isNaN(u)||u<1)&&(u=1);let m=((O=l==null?void 0:l.size)==null?void 0:O[0])??(o==null?void 0:o._sizeStart)??(p==null?void 0:p._sizeStart),g=((E=l==null?void 0:l.size)==null?void 0:E[1])??(o==null?void 0:o._sizeEnd)??(p==null?void 0:p._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(g===void 0||Number.isNaN(g))&&(g=1),m=Math.max(0,Math.min(1,m)),g=Math.max(0,Math.min(1,g)),g<=m&&(m=0,g=1);const y=g-m,d=Math.max(1,Math.round(1/y));let A=r.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const x=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:x.map(b=>({...b,width:d,_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g}))}});const w={_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g};return A.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?A=A.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:w}:S):A.push({key:"_gridLayoutMeta",contents:w}),A};let Bi="$R";const lf=M.useUnit(M.pinia),{selectTitle:rf}=M.storeToRefs(lf);let nf=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],of=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],tf=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],sf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const bs=async(a,l,r=!0)=>{let n=[],i=a==null?void 0:a.map(async o=>{var y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl,aa,Pa,Ga,$e,ha,wa,Ee,ba,Xa,yl,zl;let p=(w=(A=(d=(y=o==null?void 0:o.contents)==null?void 0:y.find(pa=>{var Ha;return(Ha=pa==null?void 0:pa.key)==null?void 0:Ha.includes("struct")}))==null?void 0:d.value)==null?void 0:A[0])==null?void 0:w.类型,c=Object.values(o==null?void 0:o.name);c=c==null?void 0:c.reverse();let u=(Y=o==null?void 0:o.contents)==null?void 0:Y.map(pa=>pa==null?void 0:pa.key),m={comp:p,isShow:o==null?void 0:o.is_show,name:c==null?void 0:c[0],id:o==null?void 0:o.object_id,order_no:o==null?void 0:o.order_no,relatedTables:u,menuFilter:(D=o==null?void 0:o.filter)==null?void 0:D.menuFilter,status:o==null?void 0:o.status,fatherSyncContents:(P=o==null?void 0:o.filter)==null?void 0:P.fatherSyncs,relatedQuotes:(O=o==null?void 0:o.filter)==null?void 0:O.quotes,sonSyncContents:(E=o==null?void 0:o.filter)==null?void 0:E.sonSyncs,nameContents:(S=M.cloneDeep(c))==null?void 0:S.reverse(),isHidden:!1,calculatorFilters:(R=(I=(_=(b=(x=o==null?void 0:o.contents)==null?void 0:x.find(pa=>{var Ha;return(Ha=pa==null?void 0:pa.key)==null?void 0:Ha.includes("struct")}))==null?void 0:b.value)==null?void 0:_[0])==null?void 0:I.算法)==null?void 0:R.contents};for(let pa in c)parseInt(pa)>=1&&(m[`name${parseInt(pa)-1}`]=c[pa]);let g=Array.isArray((re=o==null?void 0:o.filter)==null?void 0:re.menuFilter)?(X=o==null?void 0:o.filter)==null?void 0:X.menuFilter:[];if(((ye=g==null?void 0:g.filter(pa=>pa==null?void 0:pa.includes("@If")))==null?void 0:ye.length)>0){let pa=g==null?void 0:g.filter(Pe=>Pe==null?void 0:Pe.includes("@If"));pa=pa==null?void 0:pa[0],pa=(U=(fe=pa==null?void 0:pa.replace("(",Bi))==null?void 0:fe.split(Bi))==null?void 0:U[1],pa=pa==null?void 0:pa.slice(0,(pa==null?void 0:pa.length)-1),pa!=null&&pa.includes("*")&&(pa=(Z=(q=pa==null?void 0:pa.replace("{",Bi))==null?void 0:q.split(Bi))==null?void 0:Z[1],pa=pa==null?void 0:pa.replace("}","")),pa=le.calculatorAndToOr(pa);let Ha=(l==null?void 0:l.originPath)??"";(Ha==null?void 0:Ha[(Ha==null?void 0:Ha.length)-1])==="/"&&(Ha=Ha==null?void 0:Ha.slice(0,(Ha==null?void 0:Ha.length)-1));let va=await Hr(Ha,!1),Ca=(ae=va==null?void 0:va.filter(Pe=>(Pe==null?void 0:Pe.comp)==="Table"))==null?void 0:ae[0];Ca=(ze=(ve=Ca==null?void 0:Ca.compData)==null?void 0:ve.find(Pe=>(Pe==null?void 0:Pe.key)==="tableContents"))==null?void 0:ze.contents;let Aa=(N=(te=rf.value)==null?void 0:te.find(Pe=>(Pe==null?void 0:Pe.condition)==="child"))==null?void 0:N.value;Ca=(se=Ca==null?void 0:Ca.map(Pe=>{for(let kl in Pe)if((Pe==null?void 0:Pe[kl])===Aa)return Pe}))==null?void 0:se.filter(Pe=>Pe),Ca=Ca==null?void 0:Ca[0],pa=pa==null?void 0:pa[0];let pl=[];for(let Pe in pa){let kl="";Ja.isObject(Ca)&&(kl=(ue=(W=Object.keys(Ca))==null?void 0:W.filter(cr=>cr==null?void 0:cr.includes("."+Pe)))==null?void 0:ue[0]),kl!==""&&(Ca!=null&&Ca[kl])&&(pa==null?void 0:pa[Pe])===(Ca==null?void 0:Ca[kl])||Ca!=null&&Ca[Pe]&&(pa==null?void 0:pa[Pe])===(Ca==null?void 0:Ca[Pe])?pl.push(!0):pl.push(!1)}if(pl!=null&&pl.some(Pe=>Pe===!1)&&((we=l==null?void 0:l.originPath)==null?void 0:we[((_e=l==null?void 0:l.originPath)==null?void 0:_e.length)-1])!=="/")return}if(p==="Table"||p==="Method"){!r&&((Ke=m==null?void 0:m.fatherSyncContents)==null?void 0:Ke.length)>0;let pa=((la=o==null?void 0:o.contents)==null?void 0:la.find(ea=>{var La;return(La=ea==null?void 0:ea.key)==null?void 0:La.includes("content")}))||[],Ha=[];m.comp="Table",pa.value=(j=pa==null?void 0:pa.value)==null?void 0:j.sort((ea,La)=>parseInt(ea==null?void 0:ea.id)-parseInt(La==null?void 0:La.id)),pa.value=(We=pa==null?void 0:pa.value)==null?void 0:We.map(ea=>{let La={};for(let Bl in ea)JSON.stringify(ea==null?void 0:ea[Bl])==="{}"?La[Bl]="":La[Bl]=ea==null?void 0:ea[Bl];return La}),Ha.push({key:"tableContents",contents:pa==null?void 0:pa.value});let va=(Ce=(de=(Me=(Ie=(Oe=o==null?void 0:o.contents)==null?void 0:Oe.find(ea=>{var La;return(La=ea==null?void 0:ea.key)==null?void 0:La.includes("struct")}))==null?void 0:Ie.value)==null?void 0:Me[0])==null?void 0:de.结构)==null?void 0:Ce.contents;Array.isArray(va==null?void 0:va[0])?va[0]=(Je=va==null?void 0:va[0])==null?void 0:Je.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"):va=va==null?void 0:va.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"),Ha.push({key:"header",contents:va}),Ha.push({key:"filter",contents:(ee=(V=($=(Ge=(Ea=o==null?void 0:o.contents)==null?void 0:Ea.find(ea=>{var La;return(La=ea==null?void 0:ea.key)==null?void 0:La.includes("struct")}))==null?void 0:Ge.value)==null?void 0:$[0])==null?void 0:V.引用)==null?void 0:ee.contents}),Ha.push({key:"calculator",contents:m==null?void 0:m.calculatorFilters});let Ca=nf,Aa=M.cloneDeep(of);p==="Method"&&Aa.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(va==null?void 0:va[0])&&((ce=va==null?void 0:va[0])==null?void 0:ce.prop)==="disabled"&&(Ca=tf,Aa=sf);const pl=["推力","真空","压力","温度","流量"],Pe=m.name;Pe&&pl.includes(Pe)&&(Ca=[...Ca],Ca.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let kl=[];if(!Array.isArray(va==null?void 0:va[0])&&(va!=null&&va.some(ea=>{var La;return(ea==null?void 0:ea.calculatorFilter)&&((La=ea==null?void 0:ea.calculatorFilter)==null?void 0:La.includes("Manual"))}))){let ea=(he=va==null?void 0:va.map(La=>La==null?void 0:La.calculatorFilter))==null?void 0:he.filter(La=>La&&(La==null?void 0:La.includes("Manual")));ea==null||ea.forEach(La=>{var Ol;let Bl=le.analyzeSplitToContent(La,",");if(Bl=Bl==null?void 0:Bl.map(ma=>((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)),ma)),Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Extent"))&&(ma==null?void 0:ma.includes("Row")))&&(Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Button"))&&(ma==null?void 0:ma.includes(","))))){let ma=Bl==null?void 0:Bl.find(Sr=>Sr==null?void 0:Sr.includes("@FunctionButton"));ma=(Ol=ma==null?void 0:ma.split("="))==null?void 0:Ol[1],ma=ma==null?void 0:ma.slice(1,(ma==null?void 0:ma.length)-1),ma=ma==null?void 0:ma.split(","),ma=ma==null?void 0:ma[(ma==null?void 0:ma.length)-1],kl.push(ma)}}),kl=[...new Set(kl)],kl=kl==null?void 0:kl.map(La=>({label:La,prop:La,type:"methodButton"}))}else if(Array.isArray(va==null?void 0:va[0])&&((ca=le.getColumnChild(va==null?void 0:va[0]))!=null&&ca.some(ea=>{var La;return(ea==null?void 0:ea.calculatorFilter)&&((La=ea==null?void 0:ea.calculatorFilter)==null?void 0:La.includes("Manual"))}))){let ea=(Ve=(ia=le.getColumnChild(va==null?void 0:va[0]))==null?void 0:ia.map(La=>La==null?void 0:La.calculatorFilter))==null?void 0:Ve.filter(La=>La&&(La==null?void 0:La.includes("Manual")));ea==null||ea.forEach(La=>{var Ol;let Bl=le.analyzeSplitToContent(La,",");if(Bl=Bl==null?void 0:Bl.map(ma=>((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)),ma)),Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Extent"))&&(ma==null?void 0:ma.includes("Row")))&&(Bl!=null&&Bl.find(ma=>(ma==null?void 0:ma.includes("Button"))&&(ma==null?void 0:ma.includes(","))))){let ma=Bl==null?void 0:Bl.find(Sr=>Sr==null?void 0:Sr.includes("@FunctionButton"));ma=(Ol=ma==null?void 0:ma.split("="))==null?void 0:Ol[1],ma=ma==null?void 0:ma.slice(1,(ma==null?void 0:ma.length)-1),ma=ma==null?void 0:ma.split(","),ma=ma==null?void 0:ma[(ma==null?void 0:ma.length)-1],kl.push(ma)}}),kl=[...new Set(kl)],kl=kl==null?void 0:kl.map(La=>({label:La,prop:La,type:"methodButton"}))}if(Ha.push({key:"extraButton",contents:Ca}),Ha.push({key:"rowButton",contents:[...Aa,...kl]}),m.compData=await $o(Ha,l,m==null?void 0:m.nameContents),(ga=m.compData)!=null&&ga.find(ea=>(ea==null?void 0:ea.key)==="tab")&&(m.tab=(De=(Ta=m.compData)==null?void 0:Ta.find(ea=>(ea==null?void 0:ea.key)==="tab"))==null?void 0:De.contents),(Fa=m.compData)!=null&&Fa.find(ea=>(ea==null?void 0:ea.key)==="step")&&(m.step=(da=(Na=m.compData)==null?void 0:Na.find(ea=>(ea==null?void 0:ea.key)==="step"))==null?void 0:da.contents),(ja=m.compData)!=null&&ja.find(ea=>(ea==null?void 0:ea.key)==="choice")&&(m.choice=(je=(ta=m.compData)==null?void 0:ta.find(ea=>(ea==null?void 0:ea.key)==="choice"))==null?void 0:je.contents),(ya=m.compData)!=null&&ya.find(ea=>(ea==null?void 0:ea.key)==="hideContents")&&(m.isHidden=((Ae=(Ze=m.compData)==null?void 0:Ze.find(ea=>(ea==null?void 0:ea.key)==="hideContents"))==null?void 0:Ae.contents)??!1),(ne=m.compData)!=null&&ne.find(ea=>(ea==null?void 0:ea.key)==="newType")){let ea=(ua=(pe=m.compData)==null?void 0:pe.find(La=>(La==null?void 0:La.key)==="newType"))==null?void 0:ua.contents;m.comp=ea,m.compData=(Qe=m.compData)==null?void 0:Qe.filter(La=>(La==null?void 0:La.key)!=="newType")}let cr="",Cr=(Da=m==null?void 0:m.compData)==null?void 0:Da.filter(ea=>(ea==null?void 0:ea.key)==="fixType");if((Cr==null?void 0:Cr.length)>0&&r&&(cr=(Te=Cr==null?void 0:Cr[0])==null?void 0:Te.contents,m.comp=cr),((Le=m==null?void 0:m.calculatorFilters)==null?void 0:Le.length)>0){let ea=[],La=[],Bl=[];(Fe=m==null?void 0:m.calculatorFilters)==null||Fe.forEach(Ol=>{var Sr,Ur,Gr,Re,ur,wr,Yr;let ma=(Gr=(Ur=(Sr=Ol==null?void 0:Ol.calculatorFilter)==null?void 0:Sr.replace("(",Bi))==null?void 0:Ur.split(Bi))==null?void 0:Gr[1];ma=(Re=ma==null?void 0:ma.split(","))==null?void 0:Re[0],ma=ma??(Ol==null?void 0:Ol.functionName),(ur=Ol==null?void 0:Ol.calculatorFilter)!=null&&ur.includes("Up")&&ea.push({label:ma,prop:ma,type:"methodButton"}),(wr=Ol==null?void 0:Ol.calculatorFilter)!=null&&wr.includes("Line")&&La.push({label:ma,prop:ma,type:"methodButton"}),(Yr=Ol==null?void 0:Ol.calculatorFilter)!=null&&Yr.includes("Down")&&Bl.push({label:ma,prop:ma,type:"methodButton"})}),m.compData=(Ne=m.compData)==null?void 0:Ne.map(Ol=>((Ol==null?void 0:Ol.key)==="extraButton"&&(Ol.contents=[...ea??[],...Ol.contents]),(Ol==null?void 0:Ol.key)==="rowButton"&&(Ol.contents=[...La??[],...Ol.contents]),(Ol==null?void 0:Ol.key)==="bottomButton"&&(Ol.contents=[...Bl??[],...Ol.contents]),Ol)),(Bl==null?void 0:Bl.length)>0&&!((al=(me=m.compData)==null?void 0:me.find(Ol=>(Ol==null?void 0:Ol.key)==="bottomButton"))!=null&&al.contents)&&m.compData.push({key:"bottomButton",contents:Bl})}}else if(p==="Form"){let pa=[],Ha=(Rl=(Tl=(Qa=o==null?void 0:o.contents)==null?void 0:Qa.find(Pe=>{var kl;return(kl=Pe==null?void 0:Pe.key)==null?void 0:kl.includes("content")}))==null?void 0:Tl.value)==null?void 0:Rl[0],va=[],Ca=Array.isArray((Al=o==null?void 0:o.filter)==null?void 0:Al.menuFilter)?(Pl=o==null?void 0:o.filter)==null?void 0:Pl.menuFilter:[];Ca==null||Ca.forEach(Pe=>{if(Pe!=null&&Pe.includes("@Param(Hide=Yes, prop=")||Pe!=null&&Pe.includes("(Hide=Yes, prop=")){const kl=Pe==null?void 0:Pe.match(/prop=([^,)]+)/);kl!=null&&kl[1]&&va.push(kl==null?void 0:kl[1])}});let Aa=(Jl=(Hl=(Wa=(jl=(ll=o==null?void 0:o.contents)==null?void 0:ll.find(Pe=>{var kl;return(kl=Pe==null?void 0:Pe.key)==null?void 0:kl.includes("struct")}))==null?void 0:jl.value)==null?void 0:Wa[0])==null?void 0:Hl.结构)==null?void 0:Jl.contents,pl=(ar=Aa==null?void 0:Aa.map(Pe=>(Pe.value=Ha==null?void 0:Ha[Pe==null?void 0:Pe.prop],Pe)))==null?void 0:ar.filter(Pe=>(Pe==null?void 0:Pe.prop)!=="sort"&&(Pe==null?void 0:Pe.prop)!=="relatedId");pl=pl==null?void 0:pl.map(Pe=>(va!=null&&va.includes(Pe==null?void 0:Pe.prop)&&(Pe.isHideInForm=!0),Pe)),pa.push({key:"calculator",contents:m==null?void 0:m.calculatorFilters}),pa.push({key:"filter",contents:(hl=(ol=(ka=(br=(bl=o==null?void 0:o.contents)==null?void 0:bl.find(Pe=>{var kl;return(kl=Pe==null?void 0:Pe.key)==null?void 0:kl.includes("struct")}))==null?void 0:br.value)==null?void 0:ka[0])==null?void 0:ol.引用)==null?void 0:hl.contents}),pa.push({key:"formContent",contents:pl}),pa.push({key:"paramHideProps",contents:va}),m.compData=await ef(pa,l,m==null?void 0:m.nameContents),(Nl=m.compData)!=null&&Nl.find(Pe=>(Pe==null?void 0:Pe.key)==="tab")&&(m.tab=(Pa=(aa=m.compData)==null?void 0:aa.find(Pe=>(Pe==null?void 0:Pe.key)==="tab"))==null?void 0:Pa.contents),(Ga=m.compData)!=null&&Ga.find(Pe=>(Pe==null?void 0:Pe.key)==="step")&&(m.step=(ha=($e=m.compData)==null?void 0:$e.find(Pe=>(Pe==null?void 0:Pe.key)==="step"))==null?void 0:ha.contents),(wa=m.compData)!=null&&wa.find(Pe=>(Pe==null?void 0:Pe.key)==="choice")&&(m.choice=(ba=(Ee=m.compData)==null?void 0:Ee.find(Pe=>(Pe==null?void 0:Pe.key)==="choice"))==null?void 0:ba.contents),(Xa=m.compData)!=null&&Xa.find(Pe=>(Pe==null?void 0:Pe.key)==="hideContents")&&(m.isHidden=((zl=(yl=m.compData)==null?void 0:yl.find(Pe=>(Pe==null?void 0:Pe.key)==="hideContents"))==null?void 0:zl.contents)??!1)}return m});return n=await Promise.all(i),n=n==null?void 0:n.filter(o=>!(o!=null&&o.isHidden)),n};let cf="http://139.196.154.85:20031";function uf(a){return Ja.axios({method:"post",url:cf+"/api/word-report/build-by-upload",responseType:"blob",data:a})}const df=M.useUnit(M.pinia),{selectTitle:ks}=M.storeToRefs(df),pf=async a=>{var r;let l=(r=le.analyzerStringToArray(a,[":","@","="]))==null?void 0:r[0];return l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),l=le.analyzeSplitToContent(l,","),l=l==null?void 0:l.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)),l=l==null?void 0:l.map(async n=>{var o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se;let i=le.analyzeSplitToContent(n,"=");if(n!=null&&n.includes("==")){i=n==null?void 0:n.split("==");let W=i==null?void 0:i[0],ue=i==null?void 0:i[1],_e=(x=ue==null?void 0:ue.split("*"))==null?void 0:x[0],we=(b=ue==null?void 0:ue.split("*"))==null?void 0:b[1];we=(_=le.analyzeSplitToContent(we,":"))==null?void 0:_.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j));let Ke=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])!=="{"),la=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])==="{");if(la=la==null?void 0:la[0],la=la==null?void 0:la.slice(1,(la==null?void 0:la.length)-1),la=(I=le.analyzeSplitToContent(la,","))==null?void 0:I.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),_e!=null&&_e.includes("{")){let j=(re=(R=ks.value)==null?void 0:R.find(Ce=>(Ce==null?void 0:Ce.condition)==="child"))==null?void 0:re.value;_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(ye=(X=_e==null?void 0:_e.replace("{",""))==null?void 0:X.replace("}",""))==null?void 0:ye.replace(":","/"),_e=_e+"/"+j;let We=await Hr(_e,!1);We=We==null?void 0:We.find(Ce=>(Ce==null?void 0:Ce.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1]));let Oe=(U=(fe=We==null?void 0:We.compData)==null?void 0:fe.find(Ce=>(Ce==null?void 0:Ce.key)==="tableContents"))==null?void 0:U.contents,Ie=(Z=(q=We==null?void 0:We.compData)==null?void 0:q.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:Z.contents,Me=le.tableToForm(Oe,Ie),de=[];Me==null||Me.forEach(Ce=>{let Je=[];la==null||la.forEach(Ea=>{var Ge;Je.push(((Ge=Ce==null?void 0:Ce.find($=>($==null?void 0:$.key)===Ea))==null?void 0:Ge.value)??"")}),de.push(Je)}),de=le.arrayToString(de),n=W+"=="+de}else{_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(ve=(ae=_e==null?void 0:_e.replace("{",""))==null?void 0:ae.replace("}",""))==null?void 0:ve.replace(":","/");let j=await Hr(_e,!1);j=j==null?void 0:j.find(de=>(de==null?void 0:de.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1]));let We=(te=(ze=j==null?void 0:j.compData)==null?void 0:ze.find(de=>(de==null?void 0:de.key)==="tableContents"))==null?void 0:te.contents,Oe=(se=(N=j==null?void 0:j.compData)==null?void 0:N.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:se.contents,Ie=le.tableToForm(We,Oe),Me=[];Ie==null||Ie.forEach(de=>{let Ce=[];la==null||la.forEach(Je=>{var Ea;Ce.push(((Ea=de==null?void 0:de.find(Ge=>(Ge==null?void 0:Ge.key)===Je))==null?void 0:Ea.value)??"")}),Me.push(Ce)}),Me=le.arrayToString(Me),n=W+"=="+Me}}else{let W=i==null?void 0:i[0],ue=i==null?void 0:i[1],_e=(o=ue==null?void 0:ue.split("*"))==null?void 0:o[0],we=(p=ue==null?void 0:ue.split("*"))==null?void 0:p[1];we=(c=le.analyzeSplitToContent(we,":"))==null?void 0:c.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j));let Ke=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])!=="{"),la=we==null?void 0:we.filter(j=>(j==null?void 0:j[0])==="{");if(la=la==null?void 0:la[0],la=la==null?void 0:la.slice(1,(la==null?void 0:la.length)-1),la=(u=le.analyzeSplitToContent(la,":"))==null?void 0:u.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),_e!=null&&_e.includes("{")){let j=(g=(m=ks.value)==null?void 0:m.find(Oe=>(Oe==null?void 0:Oe.condition)==="child"))==null?void 0:g.value;_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(d=(y=_e==null?void 0:_e.replace("{",""))==null?void 0:y.replace("}",""))==null?void 0:d.replace(":","/"),_e=_e+"/"+j;let We=await Hr(_e,!1);We=We==null?void 0:We.find(Oe=>(Oe==null?void 0:Oe.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])),We=(w=(A=We==null?void 0:We.compData)==null?void 0:A.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:w.contents,We=(Y=We==null?void 0:We.find(Oe=>(Oe==null?void 0:Oe.prop)===(la==null?void 0:la[(la==null?void 0:la.length)-1])))==null?void 0:Y.value,ue=We}else{_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length),_e=(P=(D=_e==null?void 0:_e.replace("{",""))==null?void 0:D.replace("}",""))==null?void 0:P.replace(":","/");let j=await Hr(_e,!1);j=j==null?void 0:j.find(We=>(We==null?void 0:We.name)===(Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1])),j=(E=(O=j==null?void 0:j.compData)==null?void 0:O.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:E.contents,j=(S=j==null?void 0:j.find(We=>(We==null?void 0:We.prop)===(la==null?void 0:la[(la==null?void 0:la.length)-1])))==null?void 0:S.value,ue=j}n=W+ue}return n}),l=await Promise.all(l),l=l==null?void 0:l.join(","),l="{"+l+"}",l},ff=M.useLoginState(M.pinia),{loginUserInfo:Jn}=M.storeToRefs(ff),hf=M.useUnit(M.pinia),{selectTitle:kc}=M.storeToRefs(hf),Ki=M.useMenuState(M.pinia),{localFiles:vf}=M.storeToRefs(Ki),Lt=async(a=[],l="Manual",r=[],n=[])=>{var c;let i=a,o=(c=i==null?void 0:i.filter(u=>{var m;return(u==null?void 0:u.functionName)&&(l==="Manual"&&((m=u==null?void 0:u.calculatorFilter)==null?void 0:m.includes(l))||l!=="Manual")}))==null?void 0:c.map(u=>({prop:u==null?void 0:u.prop,label:u==null?void 0:u.label,methods:u==null?void 0:u.calculatorFilter,functionName:u==null?void 0:u.functionName,functionRelatedWords:u==null?void 0:u.functionRelatedWords}));(n==null?void 0:n.length)>0&&(o=[...n==null?void 0:n.map(m=>({prop:"",label:"",methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),...o]),(n==null?void 0:n.length)>0&&(i=[i==null?void 0:i[0]]);let p=i==null?void 0:i.map(async u=>{let m=(n==null?void 0:n.length)>0?n:o==null?void 0:o.filter(g=>(g==null?void 0:g.prop)===(u==null?void 0:u.prop));return u=await Rt(u,m,i,l,i,r),u});return p=await Promise.all(p),p},Ct=async(a,l,r="Manual",n=[],i=[],o=[])=>{var g;let p=a,c;Array.isArray(l==null?void 0:l[0])?c=le.getColumnChild(l==null?void 0:l[0]):c=l;let u=(g=c==null?void 0:c.filter(y=>{var d;return(y==null?void 0:y.calculatorFilter)&&((d=y==null?void 0:y.calculatorFilter)==null?void 0:d.includes(r))||(y==null?void 0:y.calculatorFilter)===""&&(y==null?void 0:y.functionName)}))==null?void 0:g.map(y=>({prop:y==null?void 0:y.prop,label:y==null?void 0:y.label,methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords}));(i==null?void 0:i.length)>0&&(u=[...i==null?void 0:i.map(d=>({prop:"",label:"",methods:d==null?void 0:d.calculatorFilter,functionName:d==null?void 0:d.functionName,functionRelatedWords:d==null?void 0:d.functionRelatedWords})),...u]),(i==null?void 0:i.length)>0&&(p=[p==null?void 0:p[0]]);let m=p==null?void 0:p.map(async y=>(y=await Rt(y,u,c,r,p,n,o),y));return m=await Promise.all(m),m},mf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(p=>{var c;if(l!=null&&l[p]){let u=l==null?void 0:l[p];o=o?u?Fl.isEqual(u.toString(),o.toString()):void 0:u}else{let u=(c=i==null?void 0:i.find(g=>(g==null?void 0:g.label)===p))==null?void 0:c.prop,m=(l==null?void 0:l[u])??0;o=o?m?Fl.isEqual(m.toString(),o.toString()):void 0:m}}),l[n]=o===void 0?void 0:o?1:0,l},Or=a=>{const[l,r,n]=M.cloneDeep(a).split(":").map(Number);let i=+a;return!a||!(a!=null&&a.includes(":"))?i:(l??0)*3600+(r??0)*60+(n??0)},ri=a=>{const l=o=>o.toString().padStart(2,"0"),r=Math.floor(a/3600),n=Math.floor(a%3600/60),i=a%60;return`${l(r)}:${l(n)}:${parseInt(l(i))}`},yf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y,D,P;if(l!=null&&l[u]){if(o==="Row")if(!((g=((m=l==null?void 0:l[u])==null?void 0:m.toString())??"")!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let O=+(l==null?void 0:l[u]);c=c+O}else c=Or(c.toString())+Or((d=l==null?void 0:l[u])==null?void 0:d.toString()),c=ri(c)}else if(o==="Row"){let O=(A=i==null?void 0:i.find(E=>(E==null?void 0:E.label)===u))==null?void 0:A.prop;if(!((Y=Number.isNaN(l==null?void 0:l[O])?"":(w=l==null?void 0:l[O])==null?void 0:w.toString())!=null&&Y.includes(":"))&&!((D=c==null?void 0:c.toString())!=null&&D.includes(":"))){let E=+((l==null?void 0:l[O])??0);c=c+E}else c=Or(c==null?void 0:c.toString())+Or((P=(l==null?void 0:l[O])??0)==null?void 0:P.toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y+d},0)}return l[n]=c,l},gf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y;if(l!=null&&l[u]){if(o==="Row")if(!((g=(m=l==null?void 0:l[u])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let D=+(l==null?void 0:l[u]);c=c===0?c+D:c-D}else c=c===0?Or(c.toString())+Or(l==null?void 0:l[u].toString()):Or(c.toString())-Or(l==null?void 0:l[u].toString()),c=ri(c)}else if(o==="Row"){let D=(d=i==null?void 0:i.find(P=>(P==null?void 0:P.label)===u))==null?void 0:d.prop;if(!((w=Number.isNaN(l==null?void 0:l[D])?"":(A=l==null?void 0:l[D])==null?void 0:A.toString())!=null&&w.includes(":"))&&!((Y=c==null?void 0:c.toString())!=null&&Y.includes(":"))){let P=+((l==null?void 0:l[D])??0);c=c===0?c+P:c-P}else c=c===0?Or(c.toString())+Or(((l==null?void 0:l[D])??0).toString()):Or(c.toString())-Or(((l==null?void 0:l[D])??0).toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y-d},0)}return l[n]=c,l},bf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y;if(l!=null&&l[u]){if(o==="Row")if(!((g=(m=l==null?void 0:l[u])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let D=+(l==null?void 0:l[u]);c=c===0?c+D:c*D}else c=c===0?Or(c.toString())+Or(l==null?void 0:l[u].toString()):Or(c.toString())*Or(l==null?void 0:l[u].toString()),c=ri(c)}else if(o==="Row"){let D=(d=i==null?void 0:i.find(P=>(P==null?void 0:P.label)===u))==null?void 0:d.prop;if(!(l!=null&&l[D]))c=void 0;else if(!((w=Number.isNaN(l==null?void 0:l[D])?"":(A=l==null?void 0:l[D])==null?void 0:A.toString())!=null&&w.includes(":"))&&!((Y=c==null?void 0:c.toString())!=null&&Y.includes(":"))){let P=+((l==null?void 0:l[D])??0);c=c===0?c+P:c*P}else c=c===0?Or(c.toString())+Or(((l==null?void 0:l[D])??0).toString()):Or(c.toString())*Or(((l==null?void 0:l[D])??0).toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y*d},0)}return l[n]=c,l},kf=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,p=a==null?void 0:a.allContents,c=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=le.getValueToObjectValue(l,le.getColumnContents(i))),r==null||r.forEach(u=>{var m,g,y,d,A,w,Y;if(l!=null&&l[u]){if(o==="Row")if(!((g=(m=l==null?void 0:l[u])==null?void 0:m.toString())!=null&&g.includes(":"))&&!((y=c==null?void 0:c.toString())!=null&&y.includes(":"))){let D=+(l==null?void 0:l[u]);c=c===0?c+D:c/D}else c=c===0?Or(c.toString())+Or(l==null?void 0:l[u].toString()):Or(c.toString())/Or(l==null?void 0:l[u].toString()),c=ri(c)}else if(o==="Row"){let D=(d=i==null?void 0:i.find(P=>(P==null?void 0:P.label)===u))==null?void 0:d.prop;if(!((w=Number.isNaN(l==null?void 0:l[D])?"":(A=l==null?void 0:l[D])==null?void 0:A.toString())!=null&&w.includes(":"))&&!((Y=c==null?void 0:c.toString())!=null&&Y.includes(":"))){let P=+((l==null?void 0:l[D])??0);c=c===0?c+P:c/P}else c=c===0?Or(c.toString())+Or(((l==null?void 0:l[D])??0).toString()):Or(c.toString())/Or(((l==null?void 0:l[D])??0).toString()),c=ri(c)}}),o==="Column"){let u=[];r==null||r.forEach(m=>{let g=p==null?void 0:p.map(y=>{var d;return(y==null?void 0:y[m])??(y==null?void 0:y[(d=i==null?void 0:i.find(A=>(A==null?void 0:A.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let y=0;Number.isNaN(m)||(y=+m);let d=0;return Number.isNaN(g)||(d=+g),y/d},0)}return l[n]=c.toFixed(2),l},xf=async a=>{var o,p,c,u,m,g,y,d,A,w,Y;let l=(o=a==null?void 0:a.valueString)==null?void 0:o[0],r=(p=a==null?void 0:a.contents)==null?void 0:p.calculatorFilter,n=0,i=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 D=(u=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:u.replaceAll(":","/"),P=await Hr(D,!1),O=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(P=(g=P==null?void 0:P.filter(E=>(E==null?void 0:E.name)===O))==null?void 0:g[0],r!==""){let E=P.compData;E=E==null?void 0:E.filter(S=>(S==null?void 0:S.key)!=="filter"),E.push({key:"filter",contents:"("+r+")"}),E=await $o(E,{}),n=(d=(y=E==null?void 0:E.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:y.contents)==null?void 0:d.length}else n=(Y=(w=(A=P==null?void 0:P.compData)==null?void 0:A.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:Y.length}return i.value=n,i},wf=async a=>{var y,d,A,w,Y,D,P,O,E;let l=(y=a==null?void 0:a.valueString)==null?void 0:y[0],r=a==null?void 0:a.filter;r=(r==null?void 0:r.find(S=>S==null?void 0:S.includes("@If")))??"",(l==null?void 0:l[0])==="$"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length));let n=(A=(d=l==null?void 0:l.split("*"))==null?void 0:d[0])==null?void 0:A.replaceAll(":","/"),i=(w=l==null?void 0:l.split("*"))==null?void 0:w[1],o=(Y=i==null?void 0:i.split("{"))==null?void 0:Y[0],p=i==null?void 0:i.replace(o,"");o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1),o=o==null?void 0:o.split(":"),o=o==null?void 0:o[(o==null?void 0:o.length)-1];let c=await Hr(n,!1);if(p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1),p=p==null?void 0:p.split(":"),p=p==null?void 0:p[(p==null?void 0:p.length)-1],c=c==null?void 0:c.find(S=>(S==null?void 0:S.name)===o),c=(P=(D=c==null?void 0:c.compData)==null?void 0:D.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:P.contents,(r==null?void 0:r.length)>0){r=(E=(O=r==null?void 0:r.replace("(","$R"))==null?void 0:O.split("$R"))==null?void 0:E[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1);let S=le.calculatorAndToOr(r);S==null||S.forEach(x=>{for(let b in x)x[b]!=="!"?c=c==null?void 0:c.filter(_=>{var I;return(_==null?void 0:_[b])===(x==null?void 0:x[b])||(_==null?void 0:_[(I=Object.keys(_))==null?void 0:I.find(R=>R==null?void 0:R.includes("."+b))])===(x==null?void 0:x[b])}):c=c==null?void 0:c.filter(_=>{var I;return(_==null?void 0:_[b])!==(x==null?void 0:x[b])&&(_==null?void 0:_[(I=Object.keys(_))==null?void 0:I.find(R=>R==null?void 0:R.includes("."+b))])!==(x==null?void 0:x[b])})})}c=c==null?void 0:c.map(S=>S==null?void 0:S[p]);let u=[...new Set(c)],m=[],g={};return u==null||u.forEach(S=>{var b;let x=(b=c==null?void 0:c.filter(_=>S===_))==null?void 0:b.length;g[S]=x}),m.push(g),{xAxis:u,yAxis:m}},_f=async a=>{var n,i;let l=a==null?void 0:a.valueString;l=l==null?void 0:l[0];let r={};if((l==null?void 0:l[0])==="{"){l=l==null?void 0:l.slice(1,l.length-1),l=(n=le.analyzeSplitToContent(l,","))==null?void 0:n.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),c));let o=l==null?void 0:l.map(async c=>{var y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye;let u=(d=(y=c==null?void 0:c.replace("=","$R"))==null?void 0:y.split("$R"))==null?void 0:d[0],m=(w=(A=c==null?void 0:c.replace("=","$R"))==null?void 0:A.split("$R"))==null?void 0:w[1],g="";if(m==="LoginUser")g=((Y=Jn.value)==null?void 0:Y.姓名)||((D=Jn.value)==null?void 0:D.account)||((P=Jn.value)==null?void 0:P.账号);else if((m==null?void 0:m[0])==="$"){let fe=(O=m==null?void 0:m.split("*"))==null?void 0:O[0],U=(E=m==null?void 0:m.split("*"))==null?void 0:E[1],q=U;if((fe==null?void 0:fe[0])==="$"&&(fe=fe==null?void 0:fe.slice(1,fe==null?void 0:fe.length)),fe!=null&&fe.includes("$")){let ae=(S=fe==null?void 0:fe.split("$"))==null?void 0:S[0],ve=(x=fe==null?void 0:fe.split("$"))==null?void 0:x[1],ze=(b=ae==null?void 0:ae.split(":"))==null?void 0:b[0],te=(R=(I=(_=kc.value)==null?void 0:_.filter(N=>(N==null?void 0:N.condition)==="child"))==null?void 0:I[0])==null?void 0:R.value;ve=ve==null?void 0:ve.replaceAll(":","/"),fe=ze+"/"+ve+"/"+te}else fe=fe==null?void 0:fe.replaceAll(":","/");U=U==null?void 0:U.split(":"),U=U==null?void 0:U.find((ae,ve)=>ve===(U==null?void 0:U.length)-2),q=q==null?void 0:q.split(":"),q=q==null?void 0:q.find((ae,ve)=>ve===(q==null?void 0:q.length)-1),(q==null?void 0:q[0])==="{"&&(q=q==null?void 0:q.slice(1,(q==null?void 0:q.length)-1));let Z=await Hr(fe,!1);Z=Z==null?void 0:Z.find(ae=>(ae==null?void 0:ae.name)===U),Z=(X=(re=Z==null?void 0:Z.compData)==null?void 0:re.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:X.contents,g=(ye=Z==null?void 0:Z[0])==null?void 0:ye[q]}else g=m;r[u]=g});await Promise.all(o);let p=(i=a==null?void 0:a.valueString)==null?void 0:i[1];r.menuPathContent=p}return r},Sf=async a=>{var m,g,y,d,A,w,Y;let l=a==null?void 0:a.valueString,r=l==null?void 0:l.filter(D=>(D==null?void 0:D.includes(".docx"))||(D==null?void 0:D.includes(".doc")));r=r==null?void 0:r[0];let n=l==null?void 0:l.filter(D=>!(D!=null&&D.includes(".docx"))&&!(D!=null&&D.includes(".doc")));n=n==null?void 0:n[0];let i=(g=a==null?void 0:a.compNames)==null?void 0:g[((m=a==null?void 0:a.compNames)==null?void 0:m.length)-1],o=((A=(d=(y=kc.value)==null?void 0:y.filter(D=>(D==null?void 0:D.condition)==="child"))==null?void 0:d[0])==null?void 0:A.value)??"",p=vf.value;o!==""&&(p=(w=p==null?void 0:p.find(D=>(D==null?void 0:D.path)===o))==null?void 0:w.children),p=(Y=p==null?void 0:p.find(D=>(D==null?void 0:D.name)===i))==null?void 0:Y.children;let c=p==null?void 0:p.find(D=>(D==null?void 0:D.name)===r),u=p==null?void 0:p.find(D=>(D==null?void 0:D.name)===n);u=(u==null?void 0:u.url)??"",u!==""?u=u==null?void 0:u.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"):u="file:///"+(n==null?void 0:n.replaceAll("\\","/")),c=(c==null?void 0:c.url)??"",c!==""?c=c==null?void 0:c.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"):c="file:///"+(r==null?void 0:r.replaceAll("\\","/"));try{const P=await(await fetch(c)).blob();let O=c.split(/[\\/]/).pop();const E=new File([P],O,{type:P.type||"application/octet-stream"}),S=new FormData;S.append("TemplateFile",E);let x=await fetch(u);x=await x.text(),x=await pf(x),S.append("RawContent",x);let b=await uf(S),_=new Blob([b.data],{type:"application/zip"});const I=window.URL.createObjectURL(_),R=document.createElement("a");R.href=I,R.download=r,document.body.appendChild(R),R.click(),document.body.removeChild(R),window.URL.revokeObjectURL(I)}catch{Ja.ElMessage.error("文件路径未找到")}},Ef=async a=>{var i,o;let l=a==null?void 0:a.valueString,r=l==null?void 0:l[0];r=(i=r==null?void 0:r.split("*"))==null?void 0:i[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.replaceAll(":","/"),r=r;let n=await Hr(r,!1);if((n==null?void 0:n.length)>0){Ki.setActiveTopMenuPath((o=r==null?void 0:r.split("/"))==null?void 0:o[0]);let p=localStorage.getItem("menus-store");p=JSON.parse(p),p=p==null?void 0:p.menus,p=p==null?void 0:p.find(c=>{var u;return(c==null?void 0:c.path)===((u=r==null?void 0:r.split("/"))==null?void 0:u[0])}),p=p==null?void 0:p.childMenus,Ki.setAsideMenus(p),Ki.setJumpMenuInform(!0),Ki.setActiveMenuPath(r)}else Ja.ElMessage.error("页面不存在");return a},mo={Sum:yf,Substract:gf,Multiple:bf,Divide:kf,Compare:mf,VecDimCount:xf,Approval:_f,VecRepCount:wf,AutoReportGen:Sf,OpenPortal:Ef},Rt=async(a,l,r,n="Auto",i,o=[],p=[])=>{var y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q;let c=a,u=[],m=await M.getPageDataApi({platId:parseInt((y=Jn==null?void 0:Jn.value)==null?void 0:y.plat_id),pageName:"menu"});m=(w=(A=(d=m==null?void 0:m.data)==null?void 0:d.result)==null?void 0:A.filter(Z=>(Z==null?void 0:Z.property_name)===""))==null?void 0:w[0];let g=[];if(m!=null&&m.object_name){m=m==null?void 0:m.object_name;let Z=await M.getPageDataApi({platId:parseInt((Y=Jn==null?void 0:Jn.value)==null?void 0:Y.plat_id),pageName:m});Z=(S=(E=(O=(P=(D=Z==null?void 0:Z.data)==null?void 0:D.result)==null?void 0:P[0])==null?void 0:O.contents)==null?void 0:E.find(ae=>{var ve;return(ve=ae==null?void 0:ae.key)==null?void 0:ve.includes("content")}))==null?void 0:S.value,u=(x=Z==null?void 0:Z.map(ae=>({functionName:ae==null?void 0:ae.函数名称,functionContent:ae==null?void 0:ae.输出值})))==null?void 0:x.filter(ae=>(ae==null?void 0:ae.functionContent)!==""),u==null||u.forEach(ae=>{g.push(ae.functionName),mo[ae.functionName]=new Function("return "+ae.functionContent)()})}if((l==null?void 0:l.length)===0)return c;for(let Z in l){let ae=(b=l==null?void 0:l[Z])==null?void 0:b.functionName;const ve=mo==null?void 0:mo[ae];let ze=(_=l==null?void 0:l[Z])==null?void 0:_.methods;if(ze=le.analyzeSplitToContent(ze,","),(I=ze==null?void 0:ze.find(te=>te==null?void 0:te.includes("@Type")))!=null&&I.includes(n)||!(ze!=null&&ze.find(te=>te==null?void 0:te.includes("@Type")))&&n==="Manual"||n==="Auto"||(ze==null?void 0:ze.length)===0){let te=((X=(re=(R=ze==null?void 0:ze.find(N=>N==null?void 0:N.includes("@Extent")))==null?void 0:R.replace(":","="))==null?void 0:re.split("="))==null?void 0:X[1])??[];if(await new Function("return ")(),(g==null?void 0:g.length)>0&&g.find(N=>N===ae)){let N="";try{let W=(ye=l==null?void 0:l[Z])==null?void 0:ye.functionRelatedWords,ue=(o==null?void 0:o.length)>0?o==null?void 0:o.map(we=>{var Ke;return we==null?void 0:we[(Ke=l==null?void 0:l[Z])==null?void 0:Ke.prop]}):["0"];ue=ue==null?void 0:ue.map(we=>we==null?void 0:we.slice((we==null?void 0:we.length)-5,we==null?void 0:we.length)),ue=ue==null?void 0:ue.map(we=>le.isNumber(parseInt(we))&&parseInt(we)?parseInt(we):0);let _e=Math.max(...ue);W=W==null?void 0:W.map(we=>{if(we!=null&&we.includes("'"))return we==null?void 0:we.replaceAll("'","");if(we!=null&&we.includes("@"))return _e+1;{let Ke=Object.keys(c);return we=(c==null?void 0:c[we])??(c==null?void 0:c[Ke==null?void 0:Ke.find(la=>la==null?void 0:la.includes("."+we))]),we}}),N=ve(...W)}catch(W){Ja.ElMessage.warning("关联数据出现错误,"+W.message)}let se=(fe=l==null?void 0:l[Z])==null?void 0:fe.prop;c[se]=N}else c=await ve({contents:c,valueString:(U=l==null?void 0:l[Z])==null?void 0:U.functionRelatedWords,prop:(q=l==null?void 0:l[Z])==null?void 0:q.prop,filter:ze,headers:r,typeString:te,allContents:i,compNames:p})}}return c},Cf=M.useLoginState(M.pinia),{loginUserInfo:xn}=M.storeToRefs(Cf),Df=M.useMenuState(M.pinia),{activeMenuPath:xs,currentMenuPath:yo}=M.storeToRefs(Df),xc=M.useUnit(M.pinia);let ws="$R";const{selectTitle:Mi}=M.storeToRefs(xc),wc=async(a,l)=>{var p,c,u,m,g,y,d,A,w,Y,D,P,O;let r=xs.value,n="",i=((p=Mi==null?void 0:Mi.value)==null?void 0:p.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(r=l?r:(c=a==null?void 0:a[0])==null?void 0:c.object_name,n=(u=a==null?void 0:a[0])==null?void 0:u.father_name);let o=[];if(n!==""){let E=n;(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 S=await Hr(E,!1);S=(m=S==null?void 0:S[0])==null?void 0:m.compData;let x=(g=S==null?void 0:S.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:g.contents;x=((y=x==null?void 0:x.find(_=>_==null?void 0:_.isMainKey))==null?void 0:y.prop)??((d=x==null?void 0:x[0])==null?void 0:d.prop);let b=(w=(A=S==null?void 0:S.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:A.contents)==null?void 0:w.map(_=>({label:_==null?void 0:_[x],value:_==null?void 0:_[x]}));o=(Y=n==null?void 0:n.split("/"))==null?void 0:Y.map(_=>(_===""?i?(i.isShow=!0,_=i):_={value:_,condition:"child",options:b,parentContent:(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"?n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1):n,isShow:!0}:_={condition:"parent",value:_.trim(),isShow:!0},_))}if(r!==""){let E=(D=r==null?void 0:r.split("/"))==null?void 0:D.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((P=E==null?void 0:E[0])==null?void 0:P.value)===((O=o==null?void 0:o[0])==null?void 0:O.value)&&(E=E==null?void 0:E.filter((S,x)=>x!==0)),o=[...o??[],...E??[]]}n===""&&i&&((i==null?void 0:i.parentContent)!==xs.value&&(i.isShow=!1),(i==null?void 0:i.value)!==""&&o.push(i)),xc.setSelectTitle(o)},Tf=async a=>{var o,p,c,u,m,g,y,d,A;let l=await M.getPageDataApi({platId:parseInt((o=xn==null?void 0:xn.value)==null?void 0:o.plat_id),pageName:"menu"}),r=(p=l==null?void 0:l.data)==null?void 0:p.result,n=(g=(m=(u=(c=a==null?void 0:a.filter(w=>(w==null?void 0:w.comp)==="Table"))==null?void 0:c[0])==null?void 0:u.compData)==null?void 0:m.find(w=>(w==null?void 0:w.key)==="filter"))==null?void 0:g.contents;n=(A=(d=(y=n==null?void 0:n.replace("(",ws))==null?void 0:y.split(ws))==null?void 0:d[0])==null?void 0:A.replaceAll(":","/");let i=r==null?void 0:r.filter(w=>{var Y;return(w==null?void 0:w.object_name)===yo.value+"/"||((Y=yo.value)==null?void 0:Y.includes(n))&&n+"/"===(w==null?void 0:w.object_name)||n===(w==null?void 0:w.object_name)});return(i==null?void 0:i.length)>0&&(a=a==null?void 0:a.map(w=>{var Y;return(w==null?void 0:w.comp)==="Table"&&(w.compData=(Y=w==null?void 0:w.compData)==null?void 0:Y.map(D=>{var P,O,E;return(D==null?void 0:D.key)==="header"&&(Array.isArray((P=D.contents)==null?void 0:P[0])?D.contents[0]=(E=D.contents[0])==null?void 0:E.map((S,x)=>{var b;return x===0&&(S.isExistChild=!0,((b=yo.value)!=null&&b.includes(n)||n)&&(S.fatherPath=n)),S}):D.contents=(O=D.contents)==null?void 0:O.map((S,x)=>{var b;return x===0&&(S.isExistChild=!0,((b=yo.value)!=null&&b.includes(n)||n)&&(S.fatherPath=n)),S})),D})),w})),a},Hr=async(a,l,r={})=>{var p,c,u,m,g,y,d,A,w,Y,D,P;let n=await M.getPageDataApi({platId:parseInt((p=xn==null?void 0:xn.value)==null?void 0:p.plat_id),pageName:a}),i=(c=n==null?void 0:n.data)==null?void 0:c.result;if((i==null?void 0:i.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==a){let O=await M.getPageDataApi({platId:parseInt((u=xn==null?void 0:xn.value)==null?void 0:u.plat_id),pageName:r==null?void 0:r.originPath});if(((g=(m=O==null?void 0:O.data)==null?void 0:m.result)==null?void 0:g.length)>0){let E=await bs((y=O==null?void 0:O.data)==null?void 0:y.result,r,!1);E=E==null?void 0:E.map(async b=>{var R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge;let _=[],I=(R=Object.keys(b))==null?void 0:R.filter($=>($==null?void 0:$.includes("name"))&&$!=="nameContents");for(let $ in b)I!=null&&I.find(V=>V===$)&&_.push(b==null?void 0:b[$]);if(_=_.reverse(),(b==null?void 0:b.comp)==="Table"){let $=(ye=(X=(re=b==null?void 0:b.compData)==null?void 0:re.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:X.contents)==null?void 0:ye.map(ee=>{let ce={};for(let he in ee)he!=="id"&&he!=="create_time"&&he!=="update_time"&&he!=="sort"&&he!=="create_user_id"&&he!=="update_user_id"&&he!=="department_id"&&he!=="relatedId"&&(ce[he]=ee==null?void 0:ee[he]);return ee=Object.values(ce),ee}),V=(U=(fe=b==null?void 0:b.compData)==null?void 0:fe.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:U.contents;if(Array.isArray(V==null?void 0:V[0])?(V[0].push({label:"排序",prop:"sort"}),V[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(q=V[0])!=null&&q.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(V[0]=(Z=V[0])==null?void 0:Z.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),V[0].unshift({label:"",prop:"disabled",sortable:!1}))):(V||(V=[]),V.push({label:"排序",prop:"sort"}),V.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),V!=null&&V.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(V=V==null?void 0:V.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),V.unshift({label:"",prop:"disabled",sortable:!1}))),V!=null&&V.some(ee=>{var ce;return(ee==null?void 0:ee.calculatorFilter)&&((ce=ee==null?void 0:ee.calculatorFilter)==null?void 0:ce.includes("Auto"))})&&($=await Ct($,V,"Auto"),$=$==null?void 0:$.map(ee=>Object.values(ee))),b!=null&&b.fatherSyncContents){Array.isArray((ae=b==null?void 0:b.fatherSyncContents)==null?void 0:ae[0])&&(b.fatherSyncContents=(ve=b==null?void 0:b.fatherSyncContents)==null?void 0:ve[0]);let ee=(ze=Mi.value)==null?void 0:ze.find(ce=>(ce==null?void 0:ce.condition)==="child");b.fatherSyncContents=(te=b==null?void 0:b.fatherSyncContents)==null?void 0:te.map(ce=>{var he,ca,ia,Ve,ga,Ta;return((ca=ce==null?void 0:ce.menus)==null?void 0:ca[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(ee==null?void 0:ee.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ta=ce.menus)==null?void 0:Ta.slice(0,((ga=ce.menus)==null?void 0:ga.length)-1)),ce})}if(b!=null&&b.sonSyncContents){Array.isArray((N=b==null?void 0:b.sonSyncContents)==null?void 0:N[0])&&(b.sonSyncContents=(se=b==null?void 0:b.sonSyncContents)==null?void 0:se[0]);let ee=(W=Mi.value)==null?void 0:W.find(ce=>(ce==null?void 0:ce.condition)==="child");b.sonSyncContents=(ue=b==null?void 0:b.sonSyncContents)==null?void 0:ue.map(ce=>{var he,ca,ia,Ve,ga,Ta;return((ca=ce==null?void 0:ce.menus)==null?void 0:ca[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(ee==null?void 0:ee.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ta=ce.menus)==null?void 0:Ta.slice(0,((ga=ce.menus)==null?void 0:ga.length)-1)),ce})}if(b!=null&&b.relatedQuotes){Array.isArray((_e=b==null?void 0:b.relatedQuotes)==null?void 0:_e[0])&&(b.relatedQuotes=(we=b==null?void 0:b.relatedQuotes)==null?void 0:we[0]);let ee=(Ke=Mi.value)==null?void 0:Ke.find(ce=>(ce==null?void 0:ce.condition)==="child");b.relatedQuotes=(la=b==null?void 0:b.relatedQuotes)==null?void 0:la.map(ce=>{var he,ca,ia,Ve,ga,Ta;return((ca=ce==null?void 0:ce.menus)==null?void 0:ca[((he=ce==null?void 0:ce.menus)==null?void 0:he.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(ce==null?void 0:ce.menus)?ce.menus=(ce==null?void 0:ce.menus)+(ee==null?void 0:ee.value):((Ve=ce==null?void 0:ce.menus)==null?void 0:Ve[((ia=ce==null?void 0:ce.menus)==null?void 0:ia.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(ce==null?void 0:ce.menus)&&(ce.menus=(Ta=ce.menus)==null?void 0:Ta.slice(0,((ga=ce.menus)==null?void 0:ga.length)-1)),ce})}b={filter:(We=(j=b==null?void 0:b.compData)==null?void 0:j.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:We.contents,key:b==null?void 0:b.comp,name:_,tableColumns:V,tableContents:$,menuFilter:b==null?void 0:b.menuFilter,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents,calculatorFilters:b==null?void 0:b.calculatorFilters}}else{let $=(Me=(Ie=(Oe=b==null?void 0:b.compData)==null?void 0:Oe.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ie.contents)==null?void 0:Me.map(ee=>(ee==null?void 0:ee.value)??"");$=[$];let V=(Je=(Ce=(de=b==null?void 0:b.compData)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ce.contents)==null?void 0:Je.map(ee=>(ee.value="",ee));b={contents:$,filter:(Ge=(Ea=b==null?void 0:b.compData)==null?void 0:Ea.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:Ge.contents,key:b==null?void 0:b.comp,name:_,value:V,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents,calculatorFilters:b==null?void 0:b.calculatorFilters}}return b.isShow=!1,b}),E=await Promise.all(E);let S=[{key:"menuPath",contents:[{path:a,fatherPath:(w=(A=(d=O==null?void 0:O.data)==null?void 0:d.result)==null?void 0:A[0])==null?void 0:w.father_name,isShow:!1}]},{key:a,contents:E}];await M.createPlatFormDataApi({platId:parseInt((Y=xn==null?void 0:xn.value)==null?void 0:Y.plat_id),changeData:S});let x=await M.getPageDataApi({platId:parseInt((D=xn==null?void 0:xn.value)==null?void 0:D.plat_id),pageName:a});i=(P=x==null?void 0:x.data)==null?void 0:P.result}}l&&await wc(i,!!(r!=null&&r.originPath));let o=await bs(i,r);return l&&(o=await Tf(o)),o==null?void 0:o.filter(O=>O)},_s=async a=>{var n,i,o,p,c,u,m,g,y,d,A;let l=(n=a==null?void 0:a.menus)==null?void 0:n.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+((o=(i=a.value)==null?void 0:i.split(" "))==null?void 0:o[0]));let r=await Hr(l,!1);if(r=(p=r==null?void 0:r.filter(w=>{var Y,D;return(w==null?void 0:w.name)===((D=a==null?void 0:a.groups)==null?void 0:D[((Y=a==null?void 0:a.groups)==null?void 0:Y.length)-1])}))==null?void 0:p[0],(u=(c=r==null?void 0:r.compData)==null?void 0:c.find(w=>(w==null?void 0:w.key)==="tableContents"))!=null&&u.contents){r=(g=(m=r==null?void 0:r.compData)==null?void 0:m.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:g.contents;let w=((y=a==null?void 0:a.words)==null?void 0:y[0])??(a==null?void 0:a.prop);return r=r==null?void 0:r.filter(Y=>{var D,P,O,E;return(Y==null?void 0:Y[a!=null&&a.endChildMenu?w:(D=a==null?void 0:a.words)==null?void 0:D[0]])===(a!=null&&a.relatedWords&&((P=a==null?void 0:a.relatedWords)==null?void 0:P.length)>0?(E=(O=a.value)==null?void 0:O.split(" "))==null?void 0:E[0]:a.value)}),r==null?void 0:r[0]}else{let w=(A=(d=r==null?void 0:r.compData)==null?void 0:d.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:A.contents,Y={};return w==null||w.forEach(D=>{Y[D.prop]=D.value}),Y}},Bf={key:0,class:"extra-button-content"},Nf={class:"table-operator-wrap"},Af={key:0,class:"extra-button-filter"},zf={key:1,class:"extra-header"},Mf=["onClick"],If={class:"table-op-text"},Of={class:"table-op-text"},Lf={class:"drop-menu",style:{width:"120px"}},Rf=["onClick"],$f={key:0},Vf={key:1},Ff=["onClick"],Pf={class:"table-op-text"},jf={key:1,class:"extra-button-content tabs-button-wrapper"},Hf={class:"table-operator-wrap"},Uf={class:"extra-button-filter"},qf={key:0,class:"extra-header"},Wf={class:"table-op-action"},Kf={class:"table-op-text"},Gf={class:"drop-menu",style:{width:"120px"}},Yf={key:0},Jf={key:1},Xf=["onClick"],Zf={class:"table-op-text"},Qf={__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 r=l,n=a,i=()=>{const I=(n==null?void 0:n.menuFilter)||[];return Array.isArray(I)&&(I==null?void 0:I.some(R=>{const re=typeof R=="string"?R:JSON.stringify(R);return re==null?void 0:re.includes("HideGroup=Yes")}))},o=e.ref(""),p=e.ref(!1),c=e.ref(!1),u=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),g=[{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 y(I,R){return I.map(re=>{const X={...re};return R.forEach(ye=>{delete X[ye]}),X})}function d(I){if(!I||I.t!=="n")return(I==null?void 0:I.v)??"";const R=I.v;if(I.z){const re=String(I.z).toLowerCase(),X=["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 U of X)if(re.includes(U))return A(R);const ye=/[ymdhms]/.test(re),fe=/^[0#\.\,\s]+$/.test(re.replace(/[\\\/\-:]/g,""));if(ye&&!fe)return A(R)}if(R>=1&&R<=73050){if(R<5e3)return R;if(R>=5e3&&R<4e4){const re=Math.floor((R-25569)/365.25)+1970;return re>=1970&&re<=2e3&&I.z&&/[ymd]/.test(String(I.z).toLowerCase())?A(R):R}if(R>=4e4)return A(R)}return R}function A(I){if(typeof I!="number")return I;try{const R=new Date((I-25569)*86400*1e3);if(isNaN(R.getTime()))return I;const re=R.getFullYear(),X=String(R.getMonth()+1).padStart(2,"0"),ye=String(R.getDate()).padStart(2,"0");return`${re}-${X}-${ye}`}catch{return I}}const w=I=>{const R=I.raw;if(!R)return;const re=new FileReader;re.onload=X=>{try{const ye=new Uint8Array(X.target.result),fe=le.readSync(ye,{type:"array"}),U=fe.SheetNames[0],q=fe.Sheets[U],ae=le.utils.decode_range(q["!ref"]).e.c+1,ve=new Array(ae).fill(""),ze=[];for(const ue in q){if(ue[0]==="!")continue;const{r:_e,c:we}=le.utils.decode_cell(ue),Ke=q[ue];let la=d(Ke);if((la==null||la==="")&&(la=""),_e===0)ve[we]=la;else{if(!ze[_e-1]){ze[_e-1]={};for(let j=0;j<ae;j++)ze[_e-1][`col_${j}`]=""}ze[_e-1][`col_${we}`]=la}}for(let ue=0;ue<ae;ue++)ve[ue]===void 0&&(ve[ue]="");const te=[];for(let ue=0;ue<ve.length;ue++)(!ve[ue]||ve[ue].toString().trim()==="")&&te.push(ue);let N,se;(te==null?void 0:te.length)>0?(Ja.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),N=ve.filter((ue,_e)=>!te.includes(_e)),se=y(ze,te==null?void 0:te.map(ue=>`col_${ue}`))):(N=ve,se=ze);const W=ze==null?void 0:ze[0];if(!(W!=null&&W.hasOwnProperty("col_0")))return Ja.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",N,se)}catch(ye){throw Ja.ElMessage.error(ye.message),new Error(ye.message)}},re.readAsArrayBuffer(R)},Y=I=>{var re;const R=(re=u.value)==null?void 0:re.reduce((X,ye,fe)=>(fe===0?X[ye.label]=I:X[ye.label]=ye==null?void 0:ye.value,X),{});r("filter",R,I,!0)},D=(I,R={})=>{r("buttonClick",I,"",R)},P=I=>{var R,re;u.value=(re=(R=le.getColumnChild(M.cloneDeep(I)))==null?void 0:R.filter(X=>(X==null?void 0:X.label)!==""&&(X==null?void 0:X.label)!=="操作"))==null?void 0:re.map(X=>({label:(X==null?void 0:X.label)??"",value:"",name:(X==null?void 0:X.prop)??"",isFormColHidden:X==null?void 0:X.isTableColHidden,width:3,prop:(X==null?void 0:X.prop)??""}))},O=e.ref(!1),E=I=>{var R;if((I==null?void 0:I.buttonName)==="确认"&&(r("filter",I==null?void 0:I.content),O.value=(I==null?void 0:I.content)&&Object.values(I==null?void 0:I.content).length>0),(I==null?void 0:I.buttonName)==="清空"){const re=M.cloneDeep(I==null?void 0:I.content);for(const X in re)re[X]="";u.value=(R=u.value)==null?void 0:R.map(X=>({...X,value:""})),r("filter",re),O.value=!1}p.value=!1},S=()=>{p.value=!p.value,c.value=!0},x=()=>{var R,re;u.value=(R=u.value)==null?void 0:R.map(X=>({...X,value:""}));const I=(re=u.value)==null?void 0:re.reduce((X,ye)=>(X[ye.label]=ye.value,X),{});r("filter",I)},b=e.ref(null);let _;return _=I=>{var ye;if(!p.value)return;const R=(ye=b==null?void 0:b.value)==null?void 0:ye.$el,re=R==null?void 0:R.contains(I.target);let X=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(fe=>{fe.contains(I.target)&&(X=!0)}),!re&&!X&&(p.value=!1)},e.onMounted(()=>{document.addEventListener("click",_),P(n.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",_)}),e.watch(()=>n.columns,()=>{P(n.columns)},{deep:!0,immediate:!0}),(I,R)=>{var q,Z,ae,ve,ze,te,N,se;const re=e.resolveComponent("el-icon"),X=e.resolveComponent("svg-icon"),ye=e.resolveComponent("el-input"),fe=e.resolveComponent("el-upload"),U=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Bf,[i()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(n==null?void 0:n.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((n==null?void 0:n.level)-1)*12+"px",fontWeight:600-((n==null?void 0:n.level)-1)*100>=400?600-((n==null?void 0:n.level)-1)*100:400,fontSize:17-(n==null?void 0:n.level)>=14?17-(n==null?void 0:n.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Nf,[n!=null&&n.filterShow?(e.openBlock(),e.createElementBlock("div",Af,[e.createVNode(nd,{trigger:"contextmenu",ref_key:"popOverRef",ref:b,title:"",width:800,placement:"bottom-start",isVisible:p.value,"onUpdate:isVisible":R[4]||(R[4]=W=>p.value=W)},{reference:e.withCtx(()=>{var W,ue,_e,we;return[e.createVNode(ye,{modelValue:o.value,"onUpdate:modelValue":R[0]||(R[0]=Ke=>o.value=Ke),style:{"min-width":"80px"},placeholder:O.value?(_e=(ue=(W=a.filterValues)==null?void 0:W.filter(Ke=>Ke))==null?void 0:ue.slice(0,3))==null?void 0:_e.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:Y,disabled:((we=u.value)==null?void 0:we.length)===0},{suffix:e.withCtx(()=>{var Ke,la;return[!o.value&&((la=(Ke=a.filterValues)==null?void 0:Ke.filter(j=>j))!=null&&la.join("/"))?(e.openBlock(),e.createBlock(re,{key:0,style:{cursor:"pointer"},onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(X,{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:R[1]||(R[1]=e.withModifiers(()=>{},["stop"])),onKeyup:R[2]||(R[2]=e.withModifiers(()=>{},["stop"])),onKeypress:R[3]||(R[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,buttonValue:m.value,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&&((q=a.buttons)==null?void 0:q.length)>0?(e.openBlock(),e.createElementBlock("div",zf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Z=a.buttons)==null?void 0:Z.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,ue)=>{var _e;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ue},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(fe,{key:0,class:"upload-button-wrap","on-change":w,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var we;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ke=>D(W==null?void 0:W.label)},[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",If,e.toDisplayString(W==null?void 0:W.label),1)],10,Mf)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(dl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var we;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",Of,e.toDisplayString(W==null?void 0:W.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Lf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,we=>{var Ke,la;return e.openBlock(),e.createElementBlock("div",{key:we==null?void 0:we.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:j=>!a.lockingPage&&D(we==null?void 0:we.label)},[e.createTextVNode(e.toDisplayString(we==null?void 0:we.label),1),(Ke=we==null?void 0:we.label)!=null&&Ke.includes("选中")?(e.openBlock(),e.createElementBlock("span",$f,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(la=we==null?void 0:we.label)!=null&&la.includes("全部")?(e.openBlock(),e.createElementBlock("span",Vf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Rf)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:we=>!a.lockingPage&&D(W==null?void 0:W.label,W)},[e.createVNode(X,{class:"table-op-icon",name:((_e=g==null?void 0:g.find(we=>(we==null?void 0:we.label)===(W==null?void 0:W.label)))==null?void 0:_e.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",Pf,e.toDisplayString(W==null?void 0:W.label),1)],10,Ff)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",jf,[e.createElementVNode("div",Hf,[e.createElementVNode("div",Uf,[e.createVNode(ye,{modelValue:o.value,"onUpdate:modelValue":R[5]||(R[5]=W=>o.value=W),style:{"min-width":"80px"},placeholder:O.value?(ze=(ve=(ae=a.filterValues)==null?void 0:ae.filter(W=>W))==null?void 0:ve.slice(0,3))==null?void 0:ze.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:Y,disabled:((te=u.value)==null?void 0:te.length)===0},{suffix:e.withCtx(()=>{var W,ue;return[!o.value&&((ue=(W=a.filterValues)==null?void 0:W.filter(_e=>_e))!=null&&ue.join("/"))?(e.openBlock(),e.createBlock(re,{key:0,style:{cursor:"pointer"},onClick:x},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(X,{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",qf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=a.buttons)==null?void 0:se.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,ue)=>{var _e;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ue},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(fe,{key:0,class:"upload-button-wrap","on-change":w,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var we;return[e.createElementVNode("div",Wf,[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"]),e.createElementVNode("span",Kf,e.toDisplayString(W==null?void 0:W.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(dl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(U,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var we;return[e.createVNode(X,{class:"table-op-icon",name:(we=g==null?void 0:g.find(Ke=>(Ke==null?void 0:Ke.label)===(W==null?void 0:W.label)))==null?void 0:we.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(W==null?void 0:W.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Gf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,we=>(e.openBlock(),e.createBlock(U,{key:we==null?void 0:we.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ke=>D(we==null?void 0:we.label)},{default:e.withCtx(()=>{var Ke,la;return[e.createTextVNode(e.toDisplayString(we==null?void 0:we.label),1),(Ke=we==null?void 0:we.label)!=null&&Ke.includes("选中")?(e.openBlock(),e.createElementBlock("span",Yf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(la=we==null?void 0:we.label)!=null&&la.includes("全部")?(e.openBlock(),e.createElementBlock("span",Jf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:we=>!a.lockingPage&&D(W==null?void 0:W.label,W)},[e.createVNode(X,{class:"table-op-icon",name:(_e=g==null?void 0:g.find(we=>(we==null?void 0:we.label)===(W==null?void 0:W.label)))==null?void 0:_e.icon},null,8,["name"]),e.createElementVNode("span",Zf,e.toDisplayString(W==null?void 0:W.label),1)],10,Xf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},e0=sr._export_sfc(Qf,[["__scopeId","data-v-c54c7b35"]]),a0={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,r)=>{const n=e.resolveComponent("el-table-column"),i=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(i,{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,o=>{var p;return e.openBlock(),e.createBlock(n,{key:o==null?void 0:o.prop,label:o==null?void 0:o.label,prop:o==null?void 0:o.prop,fixed:(o==null?void 0:o.prop)==="operate"?"right":o==null?void 0:o.fixed,align:(o==null?void 0:o.align)??"left","show-overflow-tooltip":(o==null?void 0:o.showOverflowTooltip)??!0,width:o==null?void 0:o.width,"min-width":(o==null?void 0:o.minWidth)||((o==null?void 0:o.prop)==="operate"?80:(((p=o==null?void 0:o.label)==null?void 0:p.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(o.children,(u,m)=>(e.openBlock(),e.createBlock(dl._sfc_main$2,{key:m,column:u,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(g,y)=>({name:y,fn:e.withCtx(({row:d,slotData:A,item:w,column:Y})=>[e.renderSlot(l.$slots,y,e.mergeProps({ref_for:!0},A??d,{item:w??u,slotData:A??d,row:d,column:Y,columnProp:u}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class l0 extends Fl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,r,n,i){const o=this,p=new Fl.FileLoader(o.manager);p.setPath(o.path),p.setResponseType("arraybuffer"),p.setRequestHeader(o.requestHeader),p.setWithCredentials(o.withCredentials),p.load(l,function(c){try{r(o.parse(c))}catch(u){i?i(u):console.error(u),o.manager.itemError(l)}},n,i)}_getDataView(l,r,n,i){switch(n){case"F":return i===8?l.getFloat64(r,this.littleEndian):l.getFloat32(r,this.littleEndian);case"I":return i===1?l.getInt8(r):i===2?l.getInt16(r,this.littleEndian):l.getInt32(r,this.littleEndian);case"U":return i===1?l.getUint8(r):i===2?l.getUint16(r,this.littleEndian):l.getUint32(r,this.littleEndian)}}parse(l){function r(A,w){const Y=A.length,D=new Uint8Array(w);let P=0,O=0,E,S,x;do if(E=A[P++],E<32){if(E++,O+E>w)throw new Error("Output buffer is not large enough");if(P+E>Y)throw new Error("Invalid compressed data");do D[O++]=A[P++];while(--E)}else{if(S=E>>5,x=O-((E&31)<<8)-1,P>=Y)throw new Error("Invalid compressed data");if(S===7&&(S+=A[P++],P>=Y))throw new Error("Invalid compressed data");if(x-=A[P++],O+S+2>w)throw new Error("Output buffer is not large enough");if(x<0)throw new Error("Invalid compressed data");if(x>=O)throw new Error("Invalid compressed data");do D[O++]=D[x++];while(--S+2)}while(P<Y);return D}function n(A){const w={},Y=new Uint8Array(A);let D="",P="",O=0,E=!1;const S=Y.length;for(;O<S&&E===!1;){const I=String.fromCharCode(Y[O++]);I===`
2
2
  `||I==="\r"?(P.trim().toLowerCase().startsWith("data")&&(E=!0),P=""):P+=I,D+=I}const x=D.search(/[\r\n]DATA\s(\S*)\s/i),b=/[\r\n]DATA\s(\S*)\s/i.exec(D.slice(x-1));if(w.data=b[1],w.headerLen=b[0].length+x,w.str=D.slice(0,w.headerLen),w.str=w.str.replace(/#.*/gi,""),w.version=/^VERSION (.*)/im.exec(w.str),w.fields=/^FIELDS (.*)/im.exec(w.str),w.size=/^SIZE (.*)/im.exec(w.str),w.type=/^TYPE (.*)/im.exec(w.str),w.count=/^COUNT (.*)/im.exec(w.str),w.width=/^WIDTH (.*)/im.exec(w.str),w.height=/^HEIGHT (.*)/im.exec(w.str),w.viewpoint=/^VIEWPOINT (.*)/im.exec(w.str),w.points=/^POINTS (.*)/im.exec(w.str),w.version!==null&&(w.version=parseFloat(w.version[1])),w.fields=w.fields!==null?w.fields[1].split(" "):[],w.type!==null&&(w.type=w.type[1].split(" ")),w.width!==null&&(w.width=parseInt(w.width[1])),w.height!==null&&(w.height=parseInt(w.height[1])),w.viewpoint!==null&&(w.viewpoint=w.viewpoint[1]),w.points!==null&&(w.points=parseInt(w.points[1],10)),w.points===null&&(w.points=w.width*w.height),w.size!==null&&(w.size=w.size[1].split(" ").map(function(I){return parseInt(I,10)})),w.count!==null)w.count=w.count[1].split(" ").map(function(I){return parseInt(I,10)});else{w.count=[];for(let I=0,R=w.fields.length;I<R;I++)w.count.push(1)}w.offset={};let _=0;for(let I=0,R=w.fields.length;I<R;I++)w.data==="ascii"?w.offset[w.fields[I]]=I:(w.offset[w.fields[I]]=_,_+=w.size[I]*w.count[I]);return w.rowSize=_,w}const i=n(l),o=[],p=[],c=[],u=[],m=[],g=new Fl.Color;if(i.data==="ascii"){const A=i.offset,D=new TextDecoder().decode(l).slice(i.headerLen).split(`
3
3
  `);for(let P=0,O=D.length;P<O;P++){if(D[P]==="")continue;const E=D[P].split(" ");if(A.x!==void 0&&(o.push(parseFloat(E[A.x])),o.push(parseFloat(E[A.y])),o.push(parseFloat(E[A.z]))),A.rgb!==void 0){const S=i.fields.findIndex(X=>X==="rgb"),x=i.type[S],b=parseFloat(E[A.rgb]);let _=b;if(x==="F"){const X=new Float32Array(1);X[0]=b,_=new Int32Array(X.buffer)[0]}const I=(_>>16&255)/255,R=(_>>8&255)/255,re=(_>>0&255)/255;g.setRGB(I,R,re,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}A.normal_x!==void 0&&(p.push(parseFloat(E[A.normal_x])),p.push(parseFloat(E[A.normal_y])),p.push(parseFloat(E[A.normal_z]))),A.intensity!==void 0&&u.push(parseFloat(E[A.intensity])),A.label!==void 0&&m.push(parseInt(E[A.label]))}}if(i.data==="binary_compressed"){const A=new Uint32Array(l.slice(i.headerLen,i.headerLen+8)),w=A[0],Y=A[1],D=r(new Uint8Array(l,i.headerLen+8,w),Y),P=new DataView(D.buffer),O=i.offset;for(let E=0;E<i.points;E++){if(O.x!==void 0){const S=i.fields.indexOf("x"),x=i.fields.indexOf("y"),b=i.fields.indexOf("z");o.push(this._getDataView(P,i.points*O.x+i.size[S]*E,i.type[S],i.size[S])),o.push(this._getDataView(P,i.points*O.y+i.size[x]*E,i.type[x],i.size[x])),o.push(this._getDataView(P,i.points*O.z+i.size[b]*E,i.type[b],i.size[b]))}if(O.rgb!==void 0){const S=i.fields.indexOf("rgb"),x=P.getUint8(i.points*O.rgb+i.size[S]*E+2)/255,b=P.getUint8(i.points*O.rgb+i.size[S]*E+1)/255,_=P.getUint8(i.points*O.rgb+i.size[S]*E+0)/255;g.setRGB(x,b,_,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(O.normal_x!==void 0){const S=i.fields.indexOf("normal_x"),x=i.fields.indexOf("normal_y"),b=i.fields.indexOf("normal_z");p.push(this._getDataView(P,i.points*O.normal_x+i.size[S]*E,i.type[S],i.size[S])),p.push(this._getDataView(P,i.points*O.normal_y+i.size[x]*E,i.type[x],i.size[x])),p.push(this._getDataView(P,i.points*O.normal_z+i.size[b]*E,i.type[b],i.size[b]))}if(O.intensity!==void 0){const S=i.fields.indexOf("intensity");u.push(this._getDataView(P,i.points*O.intensity+i.size[S]*E,i.type[S],i.size[S]))}if(O.label!==void 0){const S=i.fields.indexOf("label");m.push(P.getInt32(i.points*O.label+i.size[S]*E,this.littleEndian))}}}if(i.data==="binary"){const A=new DataView(l,i.headerLen),w=i.offset;for(let Y=0,D=0;Y<i.points;Y++,D+=i.rowSize){if(w.x!==void 0){const P=i.fields.indexOf("x"),O=i.fields.indexOf("y"),E=i.fields.indexOf("z");o.push(this._getDataView(A,D+w.x,i.type[P],i.size[P])),o.push(this._getDataView(A,D+w.y,i.type[O],i.size[O])),o.push(this._getDataView(A,D+w.z,i.type[E],i.size[E]))}if(w.rgb!==void 0){const P=A.getUint8(D+w.rgb+2)/255,O=A.getUint8(D+w.rgb+1)/255,E=A.getUint8(D+w.rgb+0)/255;g.setRGB(P,O,E,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(w.normal_x!==void 0){const P=i.fields.indexOf("normal_x"),O=i.fields.indexOf("normal_y"),E=i.fields.indexOf("normal_z");p.push(this._getDataView(A,D+w.normal_x,i.type[P],i.size[P])),p.push(this._getDataView(A,D+w.normal_y,i.type[O],i.size[O])),p.push(this._getDataView(A,D+w.normal_z,i.type[E],i.size[E]))}if(w.intensity!==void 0){const P=i.fields.indexOf("intensity");u.push(this._getDataView(A,D+w.intensity,i.type[P],i.size[P]))}w.label!==void 0&&m.push(A.getInt32(D+w.label,this.littleEndian))}}const y=new Fl.BufferGeometry;o.length>0&&y.setAttribute("position",new Fl.Float32BufferAttribute(o,3)),p.length>0&&y.setAttribute("normal",new Fl.Float32BufferAttribute(p,3)),c.length>0&&y.setAttribute("color",new Fl.Float32BufferAttribute(c,3)),u.length>0&&y.setAttribute("intensity",new Fl.Float32BufferAttribute(u,1)),m.length>0&&y.setAttribute("label",new Fl.Int32BufferAttribute(m,1)),y.computeBoundingSphere();const d=new Fl.PointsMaterial({size:.005});return c.length>0&&(d.vertexColors=!0),new Fl.Points(y,d)}}const r0=M.useModelComp(M.pinia),{systemPath:Ss}=M.storeToRefs(r0),go=e.ref(),Es=new WeakMap;function n0(a,l,r,n,i){const o=async d=>{try{const A=await M.platformDownloadFile({url:d});if(A.status!==200)throw new Error(`下载失败: ${A.status}`);return A.data}catch(A){throw console.error("addModelFromUrl失败:",A),A}},p=d=>new Promise((A,w)=>{const Y=new FileReader;Y.onload=D=>{try{const P=D.target.result,E=new Kn.MTLLoader().parse(P);E.preload(),A(E)}catch(P){w(P)}},Y.onerror=()=>{w(new Error("MTL文件读取失败"))},Y.readAsText(d)}),c=async d=>{const A={materials:{},create:function(w){return this.materials[w]?this.materials[w]:(console.warn(`Material '${w}' not found, using default material`),new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))},getAsArray:function(){const w=[];for(const Y in this.materials)w.push(this.materials[Y]);return w},preload:function(){for(const w in this.materials)this.materials[w].map&&(this.materials[w].map.needsUpdate=!0)}};for(const w of d){const Y=await p(w);Object.assign(A.materials,Y.materials)}return A.preload(),A},u=async(d,A=[])=>new Promise((w,Y)=>{const D=new FileReader;D.onload=async P=>{try{const O=P.target.result;let E=null;A&&A.length>0&&(A.length===1?E=await p(A[0]):E=await c(A));const S=new Kn.OBJLoader;E&&S.setMaterials(E);const x=S.parse(O);E||x.traverse(b=>{b.isMesh&&(b.material=new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))}),w(x)}catch(O){Y(O)}},D.onerror=()=>{Y(new Error("OBJ文件读取失败"))},D.readAsText(d)}),m=async d=>{var A;try{r.value=!0;const{scene:w}=a();if(!w)throw new Error("Scene not initialized");i();const Y=[];for(let D=0;D<d.length;D++){const P=d[D];n.value=`正在加载模型 ${D+1}/${d.length}...`;const O=await o(P.objUrl),E=((A=P.objUrl)==null?void 0:A.split("/").pop())||`model_${D}.obj`,S=new File([O],E,{type:O.type});let x=[];if(P.mtlUrls){const _=Array.isArray(P.mtlUrls)?P.mtlUrls:[P.mtlUrls];for(let I=0;I<_.length;I++){const R=_[I],re=await o(R),X=(R==null?void 0:R.split("/").pop())||`material_${D}_${I}.mtl`,ye=new File([re],X,{type:re.type});x.push(ye)}}const b=await u(S,x);w.add(b),l.value.push(b),Y.push(b)}return r.value=!1,Y}catch(w){throw console.error("加载模型失败:",w),r.value=!1,w}},g=async(d,A,w=[],Y=[])=>{let D;const P=d.toLowerCase();switch(P){case".txt":case".cpt":case".obj":const O=await A.text();if(P===".txt"||P===".cpt"){const j=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Oe=[...O.matchAll(j)].map(de=>({x:parseFloat(de[1]),y:parseFloat(de[2]),z:parseFloat(de[3])})),Ie=new Fl.BufferGeometry,Me=Oe.flatMap(de=>[de.x,de.y,de.z]);if(Ie.setAttribute("position",new Fl.Float32BufferAttribute(Me,3)),P===".txt"){const de=new Fl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});D=new Fl.Points(Ie,de)}else if(P===".cpt"){const de=new Fl.LineBasicMaterial({color:"#5B5C99",linewidth:100});D=new Fl.Line(Ie,de)}}else if(P===".obj"){const j=new Kn.OBJLoader;if(w&&w.length>0){const We=new Kn.MTLLoader;for(const Oe of w){const Ie=await Oe.text(),Me=We.parse(Ie);Me.preload(),j.setMaterials(Me);break}}D=j.parse(O),(!w||w.length===0)&&D.traverse(We=>{We.isMesh&&(We.material=new Fl.MeshPhongMaterial({color:"#B3B3D4"})),We instanceof Fl.Mesh&&(We.material.side=Fl.DoubleSide)})}break;case".stl":const E=await A.arrayBuffer(),x=new Kn.STLLoader().parse(E),b=new Fl.MeshPhongMaterial({color:"#B3B3D4",side:Fl.DoubleSide});D=new Fl.Mesh(x,b);break;case".nc":const _=["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"],I={"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)"},R=new Fl.Group,re=_.map(j=>new Promise((We,Oe)=>{new Kn.STLLoader().load(Ss.value===""?`/model/${j}`:`${Ss.value}\\${j}`,Me=>{const de=new Fl.MeshPhongMaterial({color:I[j]||"#B3B3D4",side:Fl.DoubleSide}),Ce=new Fl.Mesh(Me,de);We(Ce)},void 0,Oe)}));try{(await Promise.all(re)).forEach(We=>R.add(We)),D=R}catch(j){throw console.error("加载NC文件对应的STL文件失败:",j),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const X=new l0,ye=new Fl.Group;try{const j=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),We=new Blob([j.data],{type:"application/octet-stream;charset=UTF-8"}),Oe=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ie=new Blob([Oe.data],{type:"application/octet-stream;charset=UTF-8"}),Me=await new Promise((Ce,Je)=>{const Ea=URL.createObjectURL(We);X.load(Ea,Ge=>{const $=new Float32Array(Ge.geometry.attributes.position.count*3);for(let V=0;V<Ge.geometry.attributes.position.count;V++)$[V*3]=1,$[V*3+1]=0,$[V*3+2]=0;Ge.geometry.setAttribute("color",new Fl.BufferAttribute($,3)),Ge.material.vertexColors=!0,Ge.scale.set(.3,.3,.3),URL.revokeObjectURL(Ea),Ce(Ge)},void 0,Je)}),de=await new Promise((Ce,Je)=>{const Ea=URL.createObjectURL(Ie);X.load(Ea,Ge=>{const $=new Float32Array(Ge.geometry.attributes.position.count*3);for(let V=0;V<Ge.geometry.attributes.position.count;V++)$[V*3]=0,$[V*3+1]=1,$[V*3+2]=0;Ge.geometry.setAttribute("color",new Fl.BufferAttribute($,3)),Ge.material.vertexColors=!0,Ge.scale.set(.3,.3,.3),URL.revokeObjectURL(Ea),Ce(Ge)},void 0,Je)});ye.add(Me),ye.add(de),D=ye}catch(j){throw console.error("PCD文件加载失败:",j),new Error("无法加载PCD文件")}break;case".urdf":const fe=URL.createObjectURL(A),U=new ed.URDFLoader,q="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",Z={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ae=new WeakMap,ve=new WeakMap,ze=new WeakMap,te=async j=>{if(ae.has(j))return console.log(`从缓存加载: ${j}`),ae.get(j);try{const We=await Ja.axios.get(`${q}/${j}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Oe=new Blob([We.data],{type:"application/octet-stream;charset=UTF-8"});return Z.enableCache&&ae.set(j,Oe),Oe}catch(We){throw console.error(`加载文件失败: ${j}`,We),new Error(`无法加载文件: ${j}`)}},N=(j="default")=>{if(ve.has(j))return ve.get(j);const We=new Fl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Fl.FrontSide});return ve.set(j,We),We},se=j=>{try{j.isBufferGeometry&&j.mergeVertices&&j.mergeVertices(),j.computeVertexNormals&&j.computeVertexNormals(),j.computeBoundingSphere&&j.computeBoundingSphere(),j.deleteAttribute&&j.deleteAttribute("uv2")}catch(We){console.warn("几何体优化失败,使用原始几何体:",We)}return j},W=async(j,We,Oe)=>{const Ie=`stl_${We}`;if(ze.has(Ie)){const Je=ze.get(Ie);return new Fl.Mesh(Je,N())}const Me=await j.arrayBuffer();let Ce=new Kn.STLLoader(Oe).parse(Me);return Ce=se(Ce),ze.set(Ie,Ce),new Fl.Mesh(Ce,N())},ue=async(j,We,Oe)=>{const Ie=`obj_${We}`;if(ae.has(Ie))return ae.get(Ie).clone();const Me=await j.text(),de=new Kn.OBJLoader(Oe),Ce=We.replace(".obj",".mtl");try{const Ge=await(await te(Ce)).text(),V=new Kn.MTLLoader(Oe).parse(Ge);V.preload(),de.setMaterials(V)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Ce}`)}const Je=de.parse(Me);return Je.traverse(Ea=>{Ea.isMesh&&(Ea.geometry=se(Ea.geometry),Ea.castShadow=!0,Ea.receiveShadow=!0,Ea.renderOrder=1)}),ae.set(Ie,Je),Je},_e=(j,We)=>{const Oe=new Fl.LOD;if(Oe.addLevel(j,0),j.geometry){const Ie=j.geometry.clone(),Me=new Fl.Mesh(Ie,j.material);Oe.addLevel(Me,50)}return Oe};let we=0,Ke=0;const la=[];U.loadMeshCb=async(j,We,Oe,Ie,Me)=>{const de=j.split("/").pop(),Ce=Oe||(()=>{});we++;const Je=new Promise(async(Ea,Ge)=>{try{const $=await te(de);if(!$||$.size===0)throw new Error(`文件为空: ${de}`);const V=de.split(".").pop().toLowerCase();let ee;switch(V){case"stl":ee=await W($,de,We);break;case"obj":ee=await ue($,de,We);break;default:throw new Error(`不支持的文件格式: ${V}`)}Z.enableLOD&&ee.isMesh&&(ee=_e(ee,de)),Ce(ee),Ke++,Ie&&Ie({loaded:Ke,total:we,progress:Ke/we}),Ea(ee)}catch($){console.error(`mesh文件加载失败: ${de}`,$);const V=new Fl.Group;Ce(V),Ea(V);const ee=new Fl.BoxGeometry(.1,.1,.1),ce=new Fl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Fl.Mesh(ee,ce)}});la.push(Je)};try{if(!fe){go.value=void 0;break}if(D=await U.loadAsync(fe),console.log(`URDF文件加载完成,等待${we}个mesh文件加载...`),la.length>0)try{await Promise.allSettled(la),console.log(`所有mesh文件处理完成,成功加载: ${Ke}/${we}`)}catch(Oe){console.warn("部分mesh文件加载失败,但继续显示模型",Oe)}D.traverse(Oe=>{Oe.isMesh&&(Oe.castShadow=!0,Oe.receiveShadow=!0,Oe.renderOrder=1,Oe.material&&(Oe.material.needsUpdate=!0))}),console.time("计算包围盒");const j=new Fl.Box3;j.expandByObject(D);const We=`urdf_${Date.now()}`;D.userData.boundingBox=j.clone(),D.userData.modelId=We,Es.set(We,{box:j.clone(),center:j.getCenter(new Fl.Vector3),size:j.getSize(new Fl.Vector3),maxSize:Math.max(...j.getSize(new Fl.Vector3).toArray())}),go.value=D,console.log("URDF模型加载完成并优化")}catch(j){console.error("URDF加载失败:",j),go.value=void 0}finally{fe&&URL.revokeObjectURL(fe)}break;default:throw new Error(`不支持的文件格式: ${d}`)}return D};return{addModelsFromUrls:m,loadModelByDefaultPath:async d=>{console.log(d);try{r.value=!0,n.value="正在加载模型...";const{scene:A}=a();if(!A)throw new Error("Scene not initialized");i(),await new Promise(Y=>setTimeout(Y,100));const w=[];for(let Y=0;Y<d.length;Y++){const D=d[Y],P=await g(D.suffix,D.blob,D.mtlBlobs||[],D.meshFiles||[]);P&&(A.add(P),l.value.push(P),w.push(P))}return r.value=!1,n.value="",w}catch(A){throw console.error("加载模型失败:",A),r.value=!1,n.value="",A}},urdfModel:go,modelBoundingBoxes:Es}}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=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,i,o,p,c,u=function(y,d){d.parentNode.insertBefore(y,d)};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(y){console&&console.log(y)}}n=function(){var y,d=document.createElement("div");d.innerHTML=a._iconfont_svg_string_4827314,(d=d.getElementsByTagName("svg")[0])&&(d.setAttribute("aria-hidden","true"),d.style.position="absolute",d.style.width=0,d.style.height=0,d.style.overflow="hidden",d=d,(y=document.body).firstChild?u(d,y.firstChild):y.appendChild(d))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=n,p=a.document,c=!1,g(),p.onreadystatechange=function(){p.readyState=="complete"&&(p.onreadystatechange=null,m())})}function m(){c||(c=!0,o())}function g(){try{p.documentElement.doScroll("left")}catch{return void setTimeout(g,50)}m()}})(window);const i0=["onClick"],o0=["src"],t0=["src"],s0=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:""},backgroundPosition:{default:"Center"},iconUrl:{default:void 0},calculator:{default:()=>[]}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(null),o=e.ref(null),p=x=>{var _,I,R,re;let b={};if(x!=null&&x.find(X=>X==null?void 0:X.includes("@TextSize"))){let X=(I=(_=x==null?void 0:x.find(ye=>ye==null?void 0:ye.includes("@TextSize")))==null?void 0:_.split("="))==null?void 0:I[1];b.fontSize=`${X}px`}if(x!=null&&x.find(X=>X==null?void 0:X.includes("@TextRGBA"))){let X=(re=(R=x==null?void 0:x.find(ye=>ye==null?void 0:ye.includes("@TextRGBA")))==null?void 0:R.split("="))==null?void 0:re[1];b.color=le.rgbaToColor(X)}return b},c=e.computed(()=>{const x=Number(r==null?void 0:r.textSize),b=le.rgbaToColor(r==null?void 0:r.textColor),_={},I={};return!Number.isNaN(x)&&x&&(_.fontSize=`${x}px`,I.fontSize=`${x}px`),b&&(_.color=b,I.color=b),{label:_,value:I}}),u=e.ref(""),m=e.ref(""),g=e.ref(!1),y=async x=>{if(x){m.value&&(URL.revokeObjectURL(m.value),m.value="");try{const b=await M.platformDownloadFile({url:x}),_=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});m.value=URL.createObjectURL(_)}catch{m.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,x=>{x&&(u.value=x)},{immediate:!0}),e.watch(u,x=>{y(x)},{immediate:!0});const d=async()=>{var x,b;((x=r==null?void 0:r.calculator)==null?void 0:x.length)>0&&await Lt(r==null?void 0:r.items,"Auto",[],r==null?void 0:r.calculator),(b=o.value)==null||b.click()},A=async x=>{var I,R,re;const b=x.target,_=(I=b==null?void 0:b.files)==null?void 0:I[0];if(!_){b.value="";return}g.value=!0;try{const X=new FormData;X.append("file",_);const ye=await M.platformUploadFile(X),fe=(re=(R=ye==null?void 0:ye.data)==null?void 0:R.result)==null?void 0:re.url;fe?(u.value=fe,n("update:backGroundImage",fe),y(fe),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{g.value=!1,b.value=""}},w=e.computed(()=>{var x,b,_,I;return m.value||(r==null?void 0:r.backgroundUrl)!==""?{backgroundImage:`url("${(x=r==null?void 0:r.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundPosition:`${((b=r==null?void 0:r.backgroundPosition)==null?void 0:b.toLowerCase())??"center"} center`,backgroundRepeat:"no-repeat",cursor:((_=r==null?void 0:r.calculator)==null?void 0:_.length)>0?"pointer":"auto"}:{cursor:((I=r==null?void 0:r.calculator)==null?void 0:I.length)>0?"pointer":"auto"}}),Y=x=>dl.getComponent(x),D=x=>{if(!x)return;const b=x.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},P=(x,b,_)=>{r.disabled||x.field&&(i.value=b,e.nextTick(()=>{D(_.currentTarget)}))},O=()=>{i.value=null},E=x=>{var _;const b=((_=x==null?void 0:x.field)==null?void 0:_.value)??(x==null?void 0:x.value);return b==null||b===""?"-":b},S=x=>{var re,X,ye,fe;const b=x!=null&&x.width&&x.width>0?x.width:1,I=`calc((100% - ${(b-1)*16}px) / ${b})`;let R;return(re=x==null?void 0:x.filters)!=null&&re.find(U=>U==null?void 0:U.includes("@TextBackRGBA"))&&(R=(fe=(ye=(X=x==null?void 0:x.filters)==null?void 0:X.find(U=>U==null?void 0:U.includes("@TextBackRGBA")))==null?void 0:ye.split("="))==null?void 0:fe[1],R=le.rgbaToColor(R)),{flex:`0 0 ${I}`,maxWidth:I,minWidth:"140px",boxSizing:"border-box",background:R}};return(x,b)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(w.value),onClick:b[1]||(b[1]=_=>d())},[r!=null&&r.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(_=>d(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:o,type:"file",accept:"image/*",style:{display:"none"},onChange:A},null,544),b[2]||(b[2]=e.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.items,(_,I)=>{var R,re,X,ye,fe,U,q,Z;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:I,style:e.normalizeStyle(S(_))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle({...c.value.label,...p(_==null?void 0:_.filters)})},e.toDisplayString(_==null?void 0:_.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(c.value.value),onClick:ae=>{var ve;return(ve=_.field)!=null&&ve.isNoClick?null:P(_,I,ae)}},[x.iconUrl&&x.backgroundPosition==="Left"?(e.openBlock(),e.createElementBlock("img",{key:0,src:x.iconUrl,class:"bg-upload-icon"},null,8,o0)):e.createCommentVNode("",!0),i.value===I&&_.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y(((R=_.field)==null?void 0:R.type)??"Input")),{key:1,modelValue:_.field.value,"onUpdate:modelValue":ae=>_.field.value=ae,isEdit:!0,disabled:(re=_.field)==null?void 0:re.disabled,content:((X=_.field)==null?void 0:X.contents)??[],optionUrl:_.field,originalValue:(ye=_.field)==null?void 0:ye.value,config:(fe=_.field)==null?void 0:fe.config,configModel:((U=_.field)==null?void 0:U.prop)??((q=_.field)==null?void 0:q.name),selectedTagList:((Z=_.field)==null?void 0:Z.selectValue)??[],onBlur:O,onBlurChange:O},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(E(_)),1)],64)),x.iconUrl&&x.backgroundPosition==="Right"?(e.openBlock(),e.createElementBlock("img",{key:3,src:x.iconUrl,class:"bg-upload-icon"},null,8,t0)):e.createCommentVNode("",!0)],12,i0)],4)}),128))],4))}}),c0=sr._export_sfc(s0,[["__scopeId","data-v-2a9d7d3d"]]),_c=M.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),u0={class:"calculator-content"},d0={class:"calculator-child"},p0={class:"calculator-child"},f0=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),r=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],r.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,i)=>(e.openBlock(),e.createElementBlock("div",u0,[e.createElementVNode("div",d0,[e.createVNode(dl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",p0,[e.createVNode(dl.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),h0=sr._export_sfc(f0,[["__scopeId","data-v-73db0fe7"]]),Dt=(a,l)=>{let r=a,n=l;return Array.isArray(r)&&(r=r==null?void 0:r.map((i,o)=>{if(Array.isArray(i)){let p={};return i=i==null?void 0:i.forEach((c,u)=>{var m;(m=n==null?void 0:n[u])!=null&&m.prop?p[n[u].prop]=c:Array.isArray(c)&&(p.children=Dt(c,n))}),Object.assign(p,{id:o})}else return i})),r},Sc=(a,l,r)=>{let n=a,i=l;return n=n==null?void 0:n.map((o,p)=>{var c,u;return!Array.isArray(o)||!((c=i==null?void 0:i[p])!=null&&c.label)&&!r||(o.unshift(((u=i==null?void 0:i[p])==null?void 0:u.label)??""),o.some(m=>Array.isArray(m))&&(o=o==null?void 0:o.map(m=>{var g;return Array.isArray(m)&&(m=Sc(m,(g=i==null?void 0:i[p])==null?void 0:g.children,r)),m}))),o}),n},v0=(a,l,r)=>{if(l==="")return a==null?void 0:a.filter(n=>(n==null?void 0:n.id)!==r);{const n=l.split("-");return m0(a,n,r)}},m0=(a,l,r)=>{let n=a,i=l;return(i==null?void 0:i.length)===0?n=n==null?void 0:n.filter(o=>o.id!==r):n=n==null?void 0:n.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Ec(o,i,r)),o)),n},Ec=(a,l,r)=>{var o,p;let n=a,i=l;return(i==null?void 0:i.length)===0?n.children=(o=n.children)==null?void 0:o.filter(c=>c.id!==r):n.children=(p=n.children)==null?void 0:p.map(c=>(c.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),c=Ec(c,i,r)),c)),n},y0=(a,l,r)=>{if(l==="")return r;{const n=l.split("-");return g0(a,n,r)}},g0=(a,l,r)=>{let n=a,i=l;return(i==null?void 0:i.length)===0?n=r:n=n==null?void 0:n.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=Cc(o,i,r)),o)),n},Cc=(a,l,r)=>{var o;let n=a,i=l;return(i==null?void 0:i.length)===0?n.children=r:n.children=(o=n.children)==null?void 0:o.map(p=>(p.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),p=Cc(p,i,r)),p)),n};class b0{constructor(l={}){hn(this,"url");hn(this,"heartbeatInterval");hn(this,"socket",null);hn(this,"isConnected",!1);hn(this,"heartTimer",null);hn(this,"canvas",null);hn(this,"ctx",null);hn(this,"mainCamCutMode",0);hn(this,"pMainShowStartX",0);hn(this,"pMainShowStartY",0);hn(this,"onLog");hn(this,"onDevCount");hn(this,"onResolution");hn(this,"onCameraStatus");hn(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,r,n){var p;(p=this.canvas)!=null&&p.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const i=document.createElement("canvas");i.style.border="solid 1px #A0A0A0",i.id="MainCamCanvas",i.width=r,i.height=n;const o=i.getContext("2d");if(!o)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(i),this.canvas=i,this.ctx=o}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,r)=>{const n=new WebSocket(this.url);n.binaryType="arraybuffer",n.onopen=()=>{this.socket=n,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},n.onerror=i=>{this.isConnected=!1,this.log("socket.onerror"),r(i)},n.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},n.onmessage=i=>{this.handleMessage(i)}})}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 r=l.find(i=>i.width===2592&&i.height===1944);return r||[...l].sort((i,o)=>o.width*o.height-i.width*i.height)[0]||null}openCamera(l=0,r=1280,n=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const i=new Uint8Array(12);i[0]=119,i[1]=136,i[2]=1,i[3]=l,i[4]=this.canvas.width>>8&255,i[5]=this.canvas.width&255,i[6]=this.canvas.height>>8&255,i[7]=this.canvas.height&255,i[8]=r>>8&255,i[9]=r&255,i[10]=n>>8&255,i[11]=n&255,this.sendBytes(i)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const i=new Uint8Array(12);i[0]=119,i[1]=136,i[2]=16,i[3]=0,i[4]=0,i[5]=0,i[6]=0,i[7]=0,i[8]=1,i[9]=0,i[10]=0,i[11]=0,this.sendBytes(i)}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 r;(r=this.onLog)==null||r.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 i,o,p,c,u,m;const r=new Uint8Array(l.data);if(r.length<=0)return;if(r[0]===17&&r[1]===17&&r[2]===17){this.log("heart socket!!!!");return}if(r[0]!==85||r[1]!==102)return;const n=r[2];if(n===80){const g=r[3],y=r.length-4,d=new Uint8Array(y);for(let Y=0;Y<y;Y++)d[Y]=r[4+Y];const w=decodeURIComponent(this.byteToString(d)).split("|");(i=this.onDevCount)==null||i.call(this,g,w);return}if(n===81){const g=r[3]||0,y=[];for(let d=0;d<g;d++){const A=(r[4+d*4+0]||0)*256+(r[4+d*4+1]||0),w=(r[4+d*4+2]||0)*256+(r[4+d*4+3]||0);y.push({width:A,height:w,text:`${A}*${w}`})}(o=this.onResolution)==null||o.call(this,g,y);return}if(n===1){r[3]===1&&((p=this.onCameraStatus)==null||p.call(this,"opened")),r[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(n===16){if(r[3]===1){const y=r[4]*256+r[5],d=r[6]*65536+r[7]*256+r[8];let A="";if(y>0){const D=new Uint8Array(y);for(let P=0;P<y;P++)D[P]=r[9+P];A=decodeURIComponent(this.byteToString(D))}const w=new Uint8Array(d);for(let D=0;D<d;D++)w[D]=r[9+y+D];const Y=this.uint8ArrayToString(w);(u=this.onPhoto)==null||u.call(this,{flag:0,imgPath:A,base64:Y})}r[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(n===204){if(!this.canvas||!this.ctx)return;const g=r[3]*256+r[4],y=r[5]*256+r[6];this.pMainShowStartX=r[7]*256+r[8],this.pMainShowStartY=r[9]*256+r[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const d=this.ctx.createImageData(g,y);let A=11;for(let w=0;w<d.data.length;w+=4)d.data[w+0]=r[A],d.data[w+1]=r[A+1],d.data[w+2]=r[A+2],d.data[w+3]=255,A+=3;this.ctx.putImageData(d,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}byteToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}}const k0={style:{display:"flex",gap:"16px",height:"100%"}},x0={key:0,style:{color:"var(--el-text-color-secondary)"}},w0={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},_0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},S0={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"}},E0={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},C0={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},D0=["src","onClick"],T0=["onClick"],B0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},N0={class:"dialog-footer"},A0=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(null),o=e.ref(!1),p=e.ref([]),c=e.ref(""),u=e.ref(!1),m=e.ref([]),g=new b0({url:"ws://127.0.0.1:22225"});function y(R,re){var Z;const X=R.split(","),ye=((Z=X[0].match(/:(.*?);/))==null?void 0:Z[1])??"image/jpeg",fe=atob(X[1]);let U=fe.length;const q=new Uint8Array(U);for(;U--;)q[U]=fe.charCodeAt(U);return new File([q],re,{type:ye})}function d(){g.onLog=R=>{console.log("[GPY]",R)},g.onDevCount=(R,re)=>{if(c.value+=`设备数量=${R},设备=${re.join(",")}
4
4
  `,R>0){c.value+=`检测到设备,正在获取分辨率...
@@ -22,5 +22,5 @@
22
22
  `}},S=()=>{p.value.length>0?n("confirm",p.value.map(R=>R.file)):n("confirm",[])},x=R=>{R<0||R>=p.value.length||(p.value.splice(R,1),c.value+=`已删除一张图片(剩余 ${p.value.length} 张)
23
23
  `)},b=R=>{if(!R)return;const re=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:re,blobUrl:R}],u.value=!0},_=()=>{u.value=!1},I=()=>{w(),n("cancel")};return(R,re)=>{const X=e.resolveComponent("el-input"),ye=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode($r.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:I,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",k0,[e.createElementVNode("div",{ref_key:"cameraBox",ref:i,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)"}},[o.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",x0,"初始化摄像头..."))],512),e.createElementVNode("div",w0,[e.createElementVNode("div",_0,[re[0]||(re[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",S0,[p.value.length===0?(e.openBlock(),e.createElementBlock("div",E0,"暂无图片")):(e.openBlock(),e.createElementBlock("div",C0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(fe,U)=>(e.openBlock(),e.createElementBlock("div",{key:fe.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:fe.url,onClick:q=>b(fe.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,D0),e.createElementVNode("div",{onClick:q=>x(U),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,T0)]))),128))]))],512)]),e.createElementVNode("div",B0,[re[1]||(re[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(X,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",N0,[e.createVNode(ye,{onClick:Y,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[2]||(re[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{onClick:D,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[3]||(re[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(ye,{onClick:P,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[4]||(re[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(ye,{onClick:O,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>re[5]||(re[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(ye,{onClick:E,disabled:!o.value,id:"themeButton"},{default:e.withCtx(()=>re[6]||(re[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),re[9]||(re[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(ye,{onClick:S,disabled:p.value.length===0,id:"themeButton"},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(ye,{onClick:I,id:"themeBorderButton"},{default:e.withCtx(()=>re[8]||(re[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),u.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:_},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),z0=sr._export_sfc(A0,[["__scopeId","data-v-24a2050a"]]),Cs=M.useMenuState(M.pinia);let Ni="$R";const M0=async a=>{var o,p,c,u,m,g;let l=a==null?void 0:a.导入文件,r=a==null?void 0:a.函数参数,n=(o=l==null?void 0:l[0])==null?void 0:o.url,i="";if(!(n!=null&&n.includes("http"))||!(n!=null&&n.includes("https"))){Cs.setContentLoading(!0);const y=await M.platformDownloadFile({url:n});let d=y==null?void 0:y.data;const A=new FormData;A.append("file",d,((p=l==null?void 0:l[0])==null?void 0:p.name)+"."+((c=n==null?void 0:n.split("."))==null?void 0:c[1])),A.append("query",r);let w=await pc(A);w=(g=(m=(u=w==null?void 0:w.data)==null?void 0:u.data)==null?void 0:m.response)==null?void 0:g.replace("generateResult",a==null?void 0:a.函数名称),i=w,Cs.setContentLoading(!1)}return i},I0=a=>{var r,n;if(a==="")return;let l=a;return l=(n=(r=l==null?void 0:l.replace("(",Ni))==null?void 0:r.split(Ni))==null?void 0:n[1],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1),l=le.analyzeSplitToContent(l,","),l=l==null?void 0:l.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),i)),l=l==null?void 0:l.filter(i=>(i==null?void 0:i.includes("If"))&&!(i!=null&&i.includes("@If"))),l=l==null?void 0:l.map(i=>{var c,u,m,g,y;let o=i;o=(u=(c=o==null?void 0:o.replace("=",Ni))==null?void 0:c.split(Ni))==null?void 0:u[1],o=(m=le.analyzeSplitToContent(o,")"))==null?void 0:m[0];let p=i==null?void 0:i.replaceAll(o,"");return(o==null?void 0:o[0])==="("&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),o=(y=(g=o==null?void 0:o.replace("(",Ni))==null?void 0:g.split(Ni))==null?void 0:y[1],o="("+o,o=le.calculatorAndToOr(o),{key:p,content:o}}),l},Ds=(a,l)=>{let r=[l];return a==null||a.forEach(n=>{for(let i in n)n[i]!=="!"?r=r==null?void 0:r.filter(o=>{var p;return(o==null?void 0:o[i])===(n==null?void 0:n[i])||(o==null?void 0:o[(p=Object.keys(o))==null?void 0:p.find(c=>c==null?void 0:c.includes("."+i))])===(n==null?void 0:n[i])}):r=r==null?void 0:r.filter(o=>{var p;return(o==null?void 0:o[i])!==(n==null?void 0:n[i])&&(o==null?void 0:o[(p=Object.keys(o))==null?void 0:p.find(c=>c==null?void 0:c.includes("."+i))])!==(n==null?void 0:n[i])})}),r},$t=M.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),O0=M.useModelComp(M.pinia),{extraContents:X1}=M.storeToRefs(O0),L0=M.useLoginState(M.pinia),{extraUrl:hi}=M.storeToRefs(L0);let Dc=hi.value===""||!hi.value?"http://139.196.154.85:20015":hi.value;e.watch(()=>hi.value,()=>{Dc=hi.value===""||!hi.value?"http://139.196.154.85:20015":hi.value},{deep:!0,immediate:!0});const No={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},Ts={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:Dc+"/api/public/paddleOCR"};class R0{constructor(l){hn(this,"config");this.config={...Ts,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const r=this.config.maxSize*1024*1024;return l.size<=r}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Ja.Local.get(Ja.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,r){return{title:r,form:{OCR图片文件:l}}}async recognize(l,r){const n=this.getAuthorizationToken(),i=this.buildOCRRequest(l,r),o=this.config.apiUrl||Ts.apiUrl||"";return(await Ja.axios.post(o,i,{headers:{"Content-Type":"application/json",Authorization:n}})).data}getFieldAliases(l){return No[l]?No[l]:[l]}extractTableHeaders(l){const r=[],n=new Set,i=p=>{const c=p==null?void 0:p.label;return!(!c||c==="操作"||c===this.config.columnName||(p==null?void 0:p.type)==="operate"||(p==null?void 0:p.prop)==="operate")},o=p=>{(p||[]).forEach(c=>{if(!c)return;const u=(c==null?void 0:c.children)||(c==null?void 0:c.child)||(c==null?void 0:c.columns);if(Array.isArray(u)&&u.length>0){o(u);return}if(i(c)){const m=c.label;if(!n.has(m)){n.add(m);const g=this.getFieldAliases(m);r.push(g)}}})};return o(l||[]),r}}function Tc(a){return new R0(a)}Tc();const Tt=async(a,l)=>{var p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b;let r=(c=(p=M.cloneDeep(a))==null?void 0:p.optionUrl)==null?void 0:c.menuSelect,n=[];r==null||r.forEach(_=>{});let i="",o=await le.menuToParent(r);if(o==null||o.forEach(_=>{var I,R,re,X;(_==null?void 0:_.name)===(((X=(re=(R=(I=M.cloneDeep(a))==null?void 0:I.optionUrl)==null?void 0:R.groupSelect)==null?void 0:re[0])==null?void 0:X.replaceAll("'",""))??"")&&(i=_==null?void 0:_.id)}),l){i=l;const _=await Zr.getInsofDataApi({id:i}),I=(y=(g=(m=(u=_==null?void 0:_.data)==null?void 0:u.result)==null?void 0:m[0])==null?void 0:g.key)==null?void 0:y.pageKey;o=await le.getItemData(I,sessionStorage.getItem("systemKey"),"")}if(i!==""){let _;l?_=(d=o==null?void 0:o.find(re=>(re==null?void 0:re.id)===l))==null?void 0:d.compData:_=(A=o==null?void 0:o.find(re=>{var X,ye,fe,U;return(re==null?void 0:re.name)===(((ye=(X=a==null?void 0:a.groupSelect)==null?void 0:X.split(":"))==null?void 0:ye[0])||((U=(fe=a==null?void 0:a.optionUrl)==null?void 0:fe.groupSelect)==null?void 0:U[0]))}))==null?void 0:A.compData;let I=(Y=(w=_==null?void 0:_.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:w.contents)==null?void 0:Y.map(re=>re==null?void 0:re.label);(P=(D=_==null?void 0:_.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents)!=null&&P.every(re=>Array.isArray(re))&&(I=(S=le.getColumnChild((E=(O=_==null?void 0:_.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:O.contents)==null?void 0:E[0]))==null?void 0:S.map(re=>re==null?void 0:re.prop));let R=(b=(x=_==null?void 0:_.find(re=>(re==null?void 0:re.key)==="tableContents"))==null?void 0:x.contents)==null?void 0:b.map(re=>{if(Array.isArray(re))re=re==null?void 0:re.filter(X=>!(X!=null&&X.id));else{let X={};for(let ye in re)ye!=="id"&&(X[ye]=re==null?void 0:re[ye]);re=X}return re});R==null||R.forEach(re=>{Array.isArray(re)?n.push(le.getValueToObjectValue(re,I)):n.push(re)})}return n},$0=M.useMenuState(M.pinia),{activeMenuPath:Z1}=M.storeToRefs($0),V0=M.useUnit(M.pinia),{chooseTitle:Q1}=M.storeToRefs(V0),F0="col-operate",Bc=a=>`${F0}-${a}`,P0=(a,l)=>{const r=new Map;a.forEach(i=>{const{prop:o}=i;r.set(o,i)});const n=i=>{Array.isArray(i)&&i.forEach(o=>{const{prop:p}=o||{},c=r.get(p);j0(c,o),Array.isArray(o==null?void 0:o.children)&&o.children.length>0&&n(o.children)})};return n(l),l},j0=(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),H0=(a,l)=>{const{sortable:r=!1,filterable:n=!1,showSummary:i=!1,operable:o=!1,fixed:p=!1}=l||{};return{prop:a,sortable:r,filterable:n,showSummary:i,operable:o,fixed:p}},U0=async a=>{var o,p;if(!a)return;const l=Bc(a),r=await Zr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),n=(o=r==null?void 0:r.data)==null?void 0:o.code,i=(p=r==null?void 0:r.data)==null?void 0:p.result;if(n==200)return i==null?void 0:i[0]},q0=async a=>{if(a)return[]},W0=async(a,l)=>{if(!a||!l)return;const r=Bc(a);return await Zr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:l}})},K0=async(a,l)=>!a||!l?void 0:await Zr.updateInsofDataApi({id:a,value:{columns:l}}),Bs=async(a,l)=>{const r=sessionStorage.getItem("systemKey");if(!a||!l||!r)return;const n=await U0(a);return n?await K0(n==null?void 0:n.id,l):await W0(a,l)};var So={exports:{}},G0=So.exports,Ns;function Y0(){return Ns||(Ns=1,function(a,l){(function(r,n){n()})(G0,function(){function r(m,g){return typeof g>"u"?g={autoBom:!1}:typeof g!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),g={autoBom:!g}),g.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 n(m,g,y){var d=new XMLHttpRequest;d.open("GET",m),d.responseType="blob",d.onload=function(){u(d.response,g,y)},d.onerror=function(){console.error("could not download file")},d.send()}function i(m){var g=new XMLHttpRequest;g.open("HEAD",m,!1);try{g.send()}catch{}return 200<=g.status&&299>=g.status}function o(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var g=document.createEvent("MouseEvents");g.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(g)}}var p=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof M.commonjsGlobal=="object"&&M.commonjsGlobal.global===M.commonjsGlobal?M.commonjsGlobal:void 0,c=p.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=p.saveAs||(typeof window!="object"||window!==p?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,g,y){var d=p.URL||p.webkitURL,A=document.createElement("a");g=g||m.name||"download",A.download=g,A.rel="noopener",typeof m=="string"?(A.href=m,A.origin===location.origin?o(A):i(A.href)?n(m,g,y):o(A,A.target="_blank")):(A.href=d.createObjectURL(m),setTimeout(function(){d.revokeObjectURL(A.href)},4e4),setTimeout(function(){o(A)},0))}:"msSaveOrOpenBlob"in navigator?function(m,g,y){if(g=g||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(r(m,y),g);else if(i(m))n(m,g,y);else{var d=document.createElement("a");d.href=m,d.target="_blank",setTimeout(function(){o(d)})}}:function(m,g,y,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof m=="string")return n(m,g,y);var A=m.type==="application/octet-stream",w=/constructor/i.test(p.HTMLElement)||p.safari,Y=/CriOS\/[\d]+/.test(navigator.userAgent);if((Y||A&&w||c)&&typeof FileReader<"u"){var D=new FileReader;D.onloadend=function(){var E=D.result;E=Y?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=E:location=E,d=null},D.readAsDataURL(m)}else{var P=p.URL||p.webkitURL,O=P.createObjectURL(m);d?d.location=O:location.href=O,d=null,setTimeout(function(){P.revokeObjectURL(O)},4e4)}});p.saveAs=u.saveAs=u,a.exports=u})}(So)),So.exports}Y0();const ii=M.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}}}),J0=M.useLoginState(M.pinia),{loginUserInfo:gt}=M.storeToRefs(J0),X0=async a=>{var n,i,o;let l=await M.getAllTables({platId:parseInt((n=gt==null?void 0:gt.value)==null?void 0:n.plat_id),tableNames:[a]});return l=(o=(i=l==null?void 0:l.data)==null?void 0:i.result)==null?void 0:o[0],await wc(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}]}]},Z0=M.useLoginState(),{loginUserInfo:ml}=M.storeToRefs(Z0);let bo="$R";const Kr=M.useModelComp(M.pinia),Nc=e.ref(!1),{itemData:Q0,itemGridData:pi,curStructureCompIds:As,isSubmitCurStructure:e3,routeToChildPath:a3,pageMapState:Bt,itemExtendData:ko,refreshTable:zs,refreshCurrentPageInform:l3}=M.storeToRefs(Kr),Vo=ii(M.pinia),ln=M.useMenuState(M.pinia),gr=e.shallowRef([]),{asideMenus:r3,activeTopMenuPath:n3,activeMenuPath:Sl,platform:e8,buttonTriggerType:i3,currentMenuPath:wn}=M.storeToRefs(ln),Bn=M.useUnit(M.pinia),{selectTitle:li,chooseTitle:Ao}=M.storeToRefs(Bn);e.ref();const Li=e.ref(!0),ni=e.ref(0),Nt=e.ref([]);e.ref(!1);const Vt=e.ref(!1),Qi=e.ref(),Ac=e.ref(),zc=e.ref(),o3=()=>{Kr.setItemGridData([]),Kr.setIsEdit("edit"),Kr.setSubmitCurStructure(Sl.value!=="/平台管理/菜单管理")},t3=()=>{Kr.setIsEdit("view"),Kr.setRefreshCurStructure(!0)},s3=async a=>{var i;let l=li.value,r=l==null?void 0:l.findIndex(o=>(o==null?void 0:o.value)===(a==null?void 0:a.value)),n=l==null?void 0:l.filter((o,p)=>p<=r);Bn.setSelectTitle(dl.safeClone(n)),n=(i=n==null?void 0:n.map(o=>o==null?void 0:o.value))==null?void 0:i.join("/"),ln.setActiveMenuPath(null),ln.setActiveMenuPath(n)},bt=async(a,l,r,n="contentConfig")=>{var i;try{if(!Array.isArray(a))return;let o,p;l==="create"?(o={dataList:a==null?void 0:a.map(u=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:n,parentTable:"",version:1},value:{pageData:{...u,compData:(m=u==null?void 0:u.compData)==null?void 0:m.filter(g=>(g==null?void 0:g.key)!=="tableContents")}}}})},p=Zr.batchAddInsofDataApi):l==="update"?(o={dataList:a==null?void 0:a.map(u=>{var m;return{id:u==null?void 0:u.id,value:{pageData:{...u,compData:(m=u==null?void 0:u.compData)==null?void 0:m.filter(g=>(g==null?void 0:g.key)!=="tableContents")}}}})},p=Zr.batchUpdateInsofDataApi):l==="delete"&&(o={ids:a},p=Zr.batchDeleteInsofDataApi);const c=await p(o);if(((i=c==null?void 0:c.data)==null?void 0:i.code)===200)return c.data.result;throw Ja.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ja.ElMessage.error("保存响应失败")}},Ms=async(a,l,r,n)=>{var i,o,p,c,u,m,g,y,d,A,w;try{const Y=(o=(i=a==null?void 0:a.results)==null?void 0:i.filter(x=>!(x!=null&&x.id)||typeof(x==null?void 0:x.id)=="string"))==null?void 0:o.map(x=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:r},value:{tableData:x}})),D=(c=(p=a==null?void 0:a.results)==null?void 0:p.filter(x=>(x==null?void 0:x.id)&&typeof(x==null?void 0:x.id)=="number"))==null?void 0:c.map(x=>({id:x==null?void 0:x.id,value:{tableData:x}})),P=JSON.parse(JSON.stringify(a)),O=(u=P==null?void 0:P.results)==null?void 0:u.map(x=>x.id);let E;r?E=(y=(g=(m=Bt.value)==null?void 0:m[Sl.value])==null?void 0:g.filter(x=>{var b,_,I;return((b=x==null?void 0:x.key)==null?void 0:b.type)===l&&((I=(_=x==null?void 0:x.key)==null?void 0:_.relatedInfo)==null?void 0:I.target)===n}))==null?void 0:y.map(x=>x==null?void 0:x.id):E=(w=(A=(d=Bt.value)==null?void 0:d[Sl.value])==null?void 0:A.filter(x=>{var b;return((b=x==null?void 0:x.key)==null?void 0:b.type)===l}))==null?void 0:w.map(x=>x==null?void 0:x.id);const S=E==null?void 0:E.filter(x=>!(O!=null&&O.includes(x))&&typeof x=="number");(Y==null?void 0:Y.length)>0&&await Zr.batchAddInsofDataApi({dataList:Y}),(D==null?void 0:D.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:D}),(S==null?void 0:S.length)>0&&await Zr.batchDeleteInsofDataApi({ids:S})}catch(Y){throw new Error(Y)}},c3=async a=>{var m,g,y,d,A,w,Y,D,P,O;ln.setContentLoading(!0);const l=JSON.parse(JSON.stringify(Q0.value));if(!e3.value)return ln.setCacheStructures({key:i3.value,data:l}),Ja.ElMessage.success("已暂存");const r=l==null?void 0:l.map(E=>E.id),n=r.filter(E=>{var S;return!((S=As.value)!=null&&S.includes(E))}),i=(m=As.value)==null?void 0:m.filter(E=>!r.includes(E)),o=[...n,...i].filter(E=>typeof E!==null&&typeof E<"u"),p=l==null?void 0:l.filter(E=>!E.id),c=l==null?void 0:l.filter(E=>E.id);let u=[];if(o&&(o==null?void 0:o.length)>0&&u.push(bt(o,"delete",a)),p&&(p==null?void 0:p.length)>0&&u.push(bt(p,"create",a)),c&&(c==null?void 0:c.length)>0&&u.push(bt(c,"update",a)),pi.value&&((g=pi.value)!=null&&g.isDelete&&((d=(y=pi.value)==null?void 0:y.results)==null?void 0:d.length)>0&&((w=(A=pi.value)==null?void 0:A.results)!=null&&w.every(E=>typeof E=="number"))?await Zr.batchDeleteInsofDataApi({ids:(Y=pi.value)==null?void 0:Y.results}):(console.log("itemGridData.value",pi.value),u.push(await Ms(pi.value,"gridLayout")))),ko.value)for(const E in ko.value)u.push(await Ms((D=ko.value)==null?void 0:D[E],"extend",{target:E,compId:(O=(P=ko.value)==null?void 0:P[E])==null?void 0:O.compId},E));await Promise.all(u).then(()=>{Ja.ElMessage.success("保存成功"),Kr.setRefreshCurStructure(!0)}).catch(E=>{Ja.ElMessage.success(E)}),ln.setContentLoading(!1)},eo=a=>Ri(a),u3=e.computed(()=>{var a;return(a=gr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Mc=e.computed(()=>{var a;return(a=gr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Ic=e.ref(0),Oc=e.ref(null),d3="ocr_committed_temp_ids_v1",p3=(a,l)=>`${d3}:${String(a??"")}:${String(l??"")}`,f3=(a,l,r)=>{try{const n=p3(a,l),i=sessionStorage.getItem(n),o=i?JSON.parse(i):[],p=Array.isArray(o)?o:[],c=Array.from(new Set([...p,...r||[]].map(u=>String(u)))).slice(-200);sessionStorage.setItem(n,JSON.stringify(c))}catch{}},zo=async(a,l="data",r)=>{var i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E,S,x,b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br;let n=((p=(o=(i=li.value)==null?void 0:i.filter(ka=>(ka==null?void 0:ka.condition)==="child"))==null?void 0:o[0])==null?void 0:p.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let ka=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(ol=>{let hl={};for(let Nl in ol)Array.isArray(ol==null?void 0:ol[Nl])?hl[Nl]=JSON.stringify(ol==null?void 0:ol[Nl]):hl[Nl]=ol==null?void 0:ol[Nl];return hl});if(ka!=null&&ka.every(ol=>ol==null?void 0:ol.menuPathContent)){let ol=(u=ka==null?void 0:ka[0])==null?void 0:u.menuPathContent;ka=ka==null?void 0:ka.map(ha=>(ha.id="0",ha==null||delete ha.menuPathContent,ha)),(ol==null?void 0:ol[0])==="$"&&(ol=ol==null?void 0:ol.slice(1,ol==null?void 0:ol.length));let hl=(m=le.analyzeSplitToContent(ol,"*"))==null?void 0:m[0],Nl=(g=le.analyzeSplitToContent(ol,"*"))==null?void 0:g[1];hl=hl==null?void 0:hl.slice(0,(hl==null?void 0:hl.length)-1),hl=(y=le.analyzeSplitToContent(hl,":"))==null?void 0:y.map(ha=>{var wa,Ee,ba,Xa,yl;if((ha==null?void 0:ha[(ha==null?void 0:ha.length)-1])===":"&&(ha=ha==null?void 0:ha.slice(0,(ha==null?void 0:ha.length)-1)),(ha==null?void 0:ha[0])==="{"){ha=ha==null?void 0:ha.slice(1,(ha==null?void 0:ha.length)-1),(ha==null?void 0:ha[0])==="*"&&(ha=ha==null?void 0:ha.slice(1,ha==null?void 0:ha.length));let zl=ha==null?void 0:ha.split(":"),pa=zl==null?void 0:zl[0],Ha=zl==null?void 0:zl[1];Ha=Ha==null?void 0:Ha.slice(1,(Ha==null?void 0:Ha.length)-1);let va=(wa=gr.value)==null?void 0:wa.filter(Ca=>(Ca==null?void 0:Ca.name)===pa);va=va==null?void 0:va[0],va=(yl=(Xa=(ba=(Ee=va==null?void 0:va.compData)==null?void 0:Ee.find(Ca=>(Ca==null?void 0:Ca.key)==="tableContents"))==null?void 0:ba.contents)==null?void 0:Xa[0])==null?void 0:yl[Ha],ha=va}return ha}),hl=hl==null?void 0:hl.join("/");let aa=await M.getPageDataApi({platId:parseInt((d=ml==null?void 0:ml.value)==null?void 0:d.plat_id),pageName:"menu"});aa=(A=aa==null?void 0:aa.data)==null?void 0:A.result,aa=aa==null?void 0:aa.find(ha=>(ha==null?void 0:ha.object_name)===hl&&(ha==null?void 0:ha.property_name)===Nl);let Pa=(aa==null?void 0:aa.object_id)??"";if(Pa===""){Ja.ElMessage.warning("添加页面数据不存在");return}let Ga=[{tableName:"content_"+Pa,tableContents:ka}];await M.pageBatchAddApi({platId:parseInt((w=ml==null?void 0:ml.value)==null?void 0:w.plat_id),changeContents:Ga});let $e=[];Ga==null||Ga.forEach(ha=>{var wa;(wa=ha==null?void 0:ha.tableContents)==null||wa.forEach(Ee=>{$e.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ee),request_result:"{}",is_delete:!1,request_table:ha==null?void 0:ha.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((Y=ml==null?void 0:ml.value)==null?void 0:Y.plat_id),changeContents:[{tableName:"log",tableContents:$e}]})}else{let ol=await M.quoteApi({platId:parseInt((D=ml==null?void 0:ml.value)==null?void 0:D.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});ol=(P=ol==null?void 0:ol.data)==null?void 0:P.result,ol=ol==null?void 0:ol.filter($e=>{var ha,wa;return!(($e==null?void 0:$e.fatherPath)!==""&&((wa=(ha=$e==null?void 0:$e.quote)==null?void 0:ha[0])==null?void 0:wa.menus)===(Sl==null?void 0:Sl.value))});let hl=ol==null?void 0:ol.map($e=>{var ba,Xa;let ha={},wa=ka==null?void 0:ka[0],Ee;return Array.isArray((ba=$e==null?void 0:$e.struct)==null?void 0:ba[0])?Ee=le.getColumnChild((Xa=$e==null?void 0:$e.struct)==null?void 0:Xa[0]):Ee=$e==null?void 0:$e.struct,Ee=Ee==null?void 0:Ee.filter(yl=>(yl==null?void 0:yl.prop)!=="relatedId"),Ee==null||Ee.forEach(yl=>{var zl,pa;ha[yl.prop]=((zl=yl==null?void 0:yl.words)!=null&&zl[0]?(wa==null?void 0:wa[(pa=yl==null?void 0:yl.words)==null?void 0:pa[0]])??(wa==null?void 0:wa[yl==null?void 0:yl.prop]):wa==null?void 0:wa[yl==null?void 0:yl.prop])??""}),ha.id="1",ha.relatedId=`[${ha.id}]`,delete ha.sort,{tableName:"content_"+($e==null?void 0:$e.id),tableContents:[ha]}}),Nl=[{tableName:(O=a==null?void 0:a.relatedContents)==null?void 0:O.find($e=>$e==null?void 0:$e.includes("content")),tableContents:ka}];Nl=[...Nl,...hl];let aa=await M.quoteApi({platId:parseInt((E=ml==null?void 0:ml.value)==null?void 0:E.plat_id),type:"sonSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});aa=(x=(S=aa==null?void 0:aa.data)==null?void 0:S.result)==null?void 0:x.filter($e=>!(Nl!=null&&Nl.find(ha=>(ha==null?void 0:ha.tableName)==="content_"+($e==null?void 0:$e.id)))),aa=aa==null?void 0:aa.filter($e=>{var ha,wa;return!(($e==null?void 0:$e.fatherPath)!==""&&((wa=(ha=$e==null?void 0:$e.quote)==null?void 0:ha[0])==null?void 0:wa.menus)===(Sl==null?void 0:Sl.value))});let Pa=aa==null?void 0:aa.map($e=>{var ba,Xa,yl,zl,pa,Ha,va;let ha={},wa=ka==null?void 0:ka[0],Ee;return Array.isArray((ba=$e==null?void 0:$e.struct)==null?void 0:ba[0])?Ee=le.getColumnChild((Xa=$e==null?void 0:$e.struct)==null?void 0:Xa[0]):Ee=$e==null?void 0:$e.struct,Ee=Ee==null?void 0:Ee.filter(Ca=>(Ca==null?void 0:Ca.prop)!=="relatedId"),((zl=(yl=Ee==null?void 0:Ee[0])==null?void 0:yl.words)!=null&&zl[0]?wa!=null&&wa[(Ha=(pa=Ee==null?void 0:Ee[0])==null?void 0:pa.words)==null?void 0:Ha[0]]:wa!=null&&wa[(va=Ee==null?void 0:Ee[0])==null?void 0:va.prop])?(Ee==null||Ee.forEach(Ca=>{var Aa,pl;ha[Ca.prop]=((Aa=Ca==null?void 0:Ca.words)!=null&&Aa[0]?(wa==null?void 0:wa[(pl=Ca==null?void 0:Ca.words)==null?void 0:pl[0]])??(wa==null?void 0:wa[Ca==null?void 0:Ca.prop]):wa==null?void 0:wa[Ca==null?void 0:Ca.prop])??""}),ha.id="1",ha.relatedId=`[${ha.id}]`,delete ha.sort):ha=void 0,{tableName:"content_"+($e==null?void 0:$e.id),tableContents:[ha]}});Pa=Pa==null?void 0:Pa.filter($e=>{var ha;return!((ha=$e==null?void 0:$e.tableContents)!=null&&ha.every(wa=>wa===void 0))}),Nl=[...Nl,...Pa],await M.pageBatchAddApi({platId:parseInt((b=ml==null?void 0:ml.value)==null?void 0:b.plat_id),changeContents:Nl});let Ga=[];Nl==null||Nl.forEach($e=>{var ha;(ha=$e==null?void 0:$e.tableContents)==null||ha.forEach(wa=>{Ga.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wa),request_result:"{}",is_delete:!1,request_table:$e==null?void 0:$e.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((_=ml==null?void 0:ml.value)==null?void 0:_.plat_id),changeContents:[{tableName:"log",tableContents:Ga}]})}}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const ka=((a==null?void 0:a.ocrRows)||[]).map(aa=>aa==null?void 0:aa.id).filter(aa=>aa!=null),ol=((a==null?void 0:a.ocrRows)||[]).map(aa=>{const Pa={...aa};return delete Pa._isOCRRow,delete Pa._ocrTableId,Object.keys(Pa).forEach(Ga=>{/(^|\.)证书附件$/.test(Ga)&&Array.isArray(Pa[Ga])&&(Pa[Ga]=JSON.stringify(Pa[Ga].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)))}),Pa});let hl=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find(aa=>aa==null?void 0:aa.includes("content")),tableContents:ol}];await M.pageBatchAddApi({platId:parseInt((R=ml==null?void 0:ml.value)==null?void 0:R.plat_id),changeContents:hl});let Nl=[];hl==null||hl.forEach(aa=>{var Pa;(Pa=aa==null?void 0:aa.tableContents)==null||Pa.forEach(Ga=>{Nl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ga),request_result:"{}",is_delete:!1,request_table:aa==null?void 0:aa.tableName,request_type:"ocrBatchAdd"})})}),await M.pageBatchAddApi({platId:parseInt((re=ml==null?void 0:ml.value)==null?void 0:re.plat_id),changeContents:[{tableName:"log",tableContents:Nl}]}),f3(a==null?void 0:a.parentTableId,a==null?void 0:a.index,ka)}if((a==null?void 0:a.buttonName)==="编辑"){const ol=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(Ee=>{const ba={...Ee};return delete ba._isOCRRow,delete ba._ocrTableId,delete ba._isTemp,delete ba.tableEditType,delete ba.index,ba});let hl=ol==null?void 0:ol.map(Ee=>{let ba={};for(let Xa in Ee)Array.isArray(Ee==null?void 0:Ee[Xa])?ba[Xa]=JSON.stringify(Ee==null?void 0:Ee[Xa]):ba[Xa]=Ee==null?void 0:Ee[Xa];return ba}),Nl=await M.quoteApi({platId:parseInt((X=ml==null?void 0:ml.value)==null?void 0:X.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});Nl=(ye=Nl==null?void 0:Nl.data)==null?void 0:ye.result,Nl=Nl==null?void 0:Nl.filter(Ee=>{var ba,Xa;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Xa=(ba=Ee==null?void 0:Ee.quote)==null?void 0:ba[0])==null?void 0:Xa.menus)===(Sl==null?void 0:Sl.value))});let aa=(fe=hl==null?void 0:hl[0])==null?void 0:fe.id,Pa=[{tableName:(U=a==null?void 0:a.relatedContents)==null?void 0:U.find(Ee=>Ee==null?void 0:Ee.includes("content")),tableContents:hl}],Ga=(q=Nl==null?void 0:Nl.map(Ee=>{var Xa,yl,zl,pa,Ha;let ba=(Xa=Ee==null?void 0:Ee.contents)==null?void 0:Xa.filter(va=>{var Ca,Aa;return JSON.stringify(va==null?void 0:va.relatedId)!=="{}"&&(va==null?void 0:va.relatedId)!==""&&(va!=null&&va.relatedId)?(Ca=va==null?void 0:va.relatedId)==null?void 0:Ca.includes(parseInt(aa)):(va==null?void 0:va.sort)===((Aa=hl==null?void 0:hl[0])==null?void 0:Aa.sort)});if((ba==null?void 0:ba.length)>0){let va=hl==null?void 0:hl[0];va={...va,id:(yl=ba==null?void 0:ba[0])==null?void 0:yl.id};let Ca={},Aa=va,pl;return Array.isArray((zl=Ee==null?void 0:Ee.struct)==null?void 0:zl[0])?pl=le.getColumnChild((pa=Ee==null?void 0:Ee.struct)==null?void 0:pa[0]):pl=Ee==null?void 0:Ee.struct,pl=pl==null?void 0:pl.filter(Pe=>(Pe==null?void 0:Pe.prop)!=="relatedId"),pl==null||pl.forEach(Pe=>{var kl,cr;Ca[Pe.prop]=((kl=Pe==null?void 0:Pe.words)!=null&&kl[0]?(Aa==null?void 0:Aa[(cr=Pe==null?void 0:Pe.words)==null?void 0:cr[0]])??(Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop]):Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop])??""}),Ca.id=(Ha=ba==null?void 0:ba[0])==null?void 0:Ha.id,delete Ca.sort,delete Ca.relatedId,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[Ca]}}else return}))==null?void 0:q.filter(Ee=>Ee);Pa=[...Pa,...Ga];let $e=await M.quoteApi({platId:parseInt((Z=ml==null?void 0:ml.value)==null?void 0:Z.plat_id),type:"sonSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});$e=(ve=(ae=$e==null?void 0:$e.data)==null?void 0:ae.result)==null?void 0:ve.filter(Ee=>!(Pa!=null&&Pa.find(ba=>(ba==null?void 0:ba.tableName)==="content_"+(Ee==null?void 0:Ee.id)))),$e=$e==null?void 0:$e.filter(Ee=>{var ba,Xa;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Xa=(ba=Ee==null?void 0:Ee.quote)==null?void 0:ba[0])==null?void 0:Xa.menus)===(Sl==null?void 0:Sl.value))});let ha=(ze=$e==null?void 0:$e.map(Ee=>{var Xa,yl,zl,pa,Ha;let ba=(Xa=Ee==null?void 0:Ee.contents)==null?void 0:Xa.filter(va=>{var Ca,Aa,pl;return JSON.stringify(va==null?void 0:va.relatedId)!=="{}"&&(va==null?void 0:va.relatedId)!==""&&(va!=null&&va.relatedId)?(Ca=va==null?void 0:va.relatedId)==null?void 0:Ca.includes(parseInt(aa)):(va==null?void 0:va.sort)===((Aa=hl==null?void 0:hl[0])==null?void 0:Aa.sort)||(va==null?void 0:va.sort)===(parseInt(((pl=hl==null?void 0:hl[0])==null?void 0:pl.sort)??"0")+1).toString()});if((ba==null?void 0:ba.length)>0){let va=hl==null?void 0:hl[0];va={...va,id:(yl=ba==null?void 0:ba[0])==null?void 0:yl.id};let Ca={},Aa=va,pl;return Array.isArray((zl=Ee==null?void 0:Ee.struct)==null?void 0:zl[0])?pl=le.getColumnChild((pa=Ee==null?void 0:Ee.struct)==null?void 0:pa[0]):pl=Ee==null?void 0:Ee.struct,pl=pl==null?void 0:pl.filter(Pe=>(Pe==null?void 0:Pe.prop)!=="relatedId"),pl==null||pl.forEach(Pe=>{var kl,cr,Cr,ea;((kl=Pe==null?void 0:Pe.words)!=null&&kl[0]?(Aa==null?void 0:Aa[(cr=Pe==null?void 0:Pe.words)==null?void 0:cr[0]])??(Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop]):Aa!=null&&Aa[Pe==null?void 0:Pe.prop])&&(Ca[Pe.prop]=((Cr=Pe==null?void 0:Pe.words)!=null&&Cr[0]?(Aa==null?void 0:Aa[(ea=Pe==null?void 0:Pe.words)==null?void 0:ea[0]])??(Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop]):Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop])??"")}),Ca.id=(Ha=ba==null?void 0:ba[0])==null?void 0:Ha.id,delete Ca.sort,delete Ca.relatedId,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[Ca]}}else return}))==null?void 0:ze.filter(Ee=>Ee);Pa=[...Pa,...ha],await M.pageBatchUpdateApi({platId:parseInt((te=ml==null?void 0:ml.value)==null?void 0:te.plat_id),changeContents:Pa});let wa=[];Pa==null||Pa.forEach(Ee=>{var ba;(ba=Ee==null?void 0:Ee.tableContents)==null||ba.forEach(Xa=>{wa.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Xa),request_result:"{}",is_delete:!1,request_table:Ee==null?void 0:Ee.tableName,request_type:"update"})})}),await M.pageBatchAddApi({platId:parseInt((N=ml==null?void 0:ml.value)==null?void 0:N.plat_id),changeContents:[{tableName:"log",tableContents:wa}]})}if((a==null?void 0:a.buttonName)==="删除"){let ka=[{tableName:(se=a==null?void 0:a.relatedContents)==null?void 0:se.find($e=>$e==null?void 0:$e.includes("content")),tableContents:a==null?void 0:a.fixContent}],ol=await M.quoteApi({platId:parseInt((W=ml==null?void 0:ml.value)==null?void 0:W.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});ol=(ue=ol==null?void 0:ol.data)==null?void 0:ue.result,ol=ol==null?void 0:ol.filter($e=>{var ha,wa;return!(($e==null?void 0:$e.fatherPath)!==""&&((wa=(ha=$e==null?void 0:$e.quote)==null?void 0:ha[0])==null?void 0:wa.menus)===(Sl==null?void 0:Sl.value))});let hl=(we=(_e=a==null?void 0:a.fixContent)==null?void 0:_e[0])==null?void 0:we.id,Nl=(Ke=ol==null?void 0:ol.map($e=>{var wa,Ee,ba,Xa,yl,zl;let ha=(wa=$e==null?void 0:$e.contents)==null?void 0:wa.filter(pa=>{var Ha,va,Ca;return JSON.stringify(pa==null?void 0:pa.relatedId)!=="{}"&&(pa==null?void 0:pa.relatedId)!==""&&(pa!=null&&pa.relatedId)?(Ha=pa==null?void 0:pa.relatedId)==null?void 0:Ha.includes(parseInt(hl)):(pa==null?void 0:pa.sort)===((Ca=(va=a==null?void 0:a.fixContent)==null?void 0:va[0])==null?void 0:Ca.sort)});if((ha==null?void 0:ha.length)>0){let pa=(Ee=a==null?void 0:a.fixContent)==null?void 0:Ee[0];pa={...pa,id:(ba=ha==null?void 0:ha[0])==null?void 0:ba.id};let Ha={},va=pa,Ca;return Array.isArray((Xa=$e==null?void 0:$e.struct)==null?void 0:Xa[0])?Ca=le.getColumnChild((yl=$e==null?void 0:$e.struct)==null?void 0:yl[0]):Ca=$e==null?void 0:$e.struct,Ca=Ca==null?void 0:Ca.filter(Aa=>(Aa==null?void 0:Aa.prop)!=="relatedId"),Ca==null||Ca.forEach(Aa=>{var pl,Pe;Ha[Aa.prop]=((pl=Aa==null?void 0:Aa.words)!=null&&pl[0]?(va==null?void 0:va[(Pe=Aa==null?void 0:Aa.words)==null?void 0:Pe[0]])??(va==null?void 0:va[Aa==null?void 0:Aa.prop]):va==null?void 0:va[Aa==null?void 0:Aa.prop])??""}),Ha.id=(zl=ha==null?void 0:ha[0])==null?void 0:zl.id,delete Ha.sort,delete Ha.relatedId,{tableName:"content_"+($e==null?void 0:$e.id),tableContents:[Ha]}}else return}))==null?void 0:Ke.filter($e=>$e);ka=[...ka,...Nl];let aa=await M.quoteApi({platId:parseInt((la=ml==null?void 0:ml.value)==null?void 0:la.plat_id),type:"sonSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});aa=(We=(j=aa==null?void 0:aa.data)==null?void 0:j.result)==null?void 0:We.filter($e=>!(ka!=null&&ka.find(ha=>(ha==null?void 0:ha.tableName)==="content_"+($e==null?void 0:$e.id)))),aa=aa==null?void 0:aa.filter($e=>{var ha,wa;return!(($e==null?void 0:$e.fatherPath)!==""&&((wa=(ha=$e==null?void 0:$e.quote)==null?void 0:ha[0])==null?void 0:wa.menus)===(Sl==null?void 0:Sl.value))});let Pa=(Oe=aa==null?void 0:aa.map($e=>{var wa,Ee,ba,Xa,yl,zl;let ha=(wa=$e==null?void 0:$e.contents)==null?void 0:wa.filter(pa=>{var Ha,va,Ca;return JSON.stringify(pa==null?void 0:pa.relatedId)!=="{}"&&(pa==null?void 0:pa.relatedId)!==""&&(pa!=null&&pa.relatedId)?(Ha=pa==null?void 0:pa.relatedId)==null?void 0:Ha.includes(parseInt(hl)):(pa==null?void 0:pa.sort)===((Ca=(va=a==null?void 0:a.fixContent)==null?void 0:va[0])==null?void 0:Ca.sort)});if((ha==null?void 0:ha.length)>0){let pa=(Ee=a==null?void 0:a.fixContent)==null?void 0:Ee[0];pa={...pa,id:(ba=ha==null?void 0:ha[0])==null?void 0:ba.id};let Ha={},va=pa,Ca;return Array.isArray((Xa=$e==null?void 0:$e.struct)==null?void 0:Xa[0])?Ca=le.getColumnChild((yl=$e==null?void 0:$e.struct)==null?void 0:yl[0]):Ca=$e==null?void 0:$e.struct,Ca=Ca==null?void 0:Ca.filter(Aa=>(Aa==null?void 0:Aa.prop)!=="relatedId"),Ca==null||Ca.forEach(Aa=>{var pl,Pe;Ha[Aa.prop]=((pl=Aa==null?void 0:Aa.words)!=null&&pl[0]?(va==null?void 0:va[(Pe=Aa==null?void 0:Aa.words)==null?void 0:Pe[0]])??(va==null?void 0:va[Aa==null?void 0:Aa.prop]):va==null?void 0:va[Aa==null?void 0:Aa.prop])??""}),Ha.id=(zl=ha==null?void 0:ha[0])==null?void 0:zl.id,delete Ha.sort,delete Ha.relatedId,{tableName:"content_"+($e==null?void 0:$e.id),tableContents:[Ha]}}else return}))==null?void 0:Oe.filter($e=>$e);ka=[...ka,...Pa],await M.pageBatchDeleteApi({platId:parseInt((Ie=ml==null?void 0:ml.value)==null?void 0:Ie.plat_id),changeContents:ka});let Ga=[];ka==null||ka.forEach($e=>{var ha;(ha=$e==null?void 0:$e.tableContents)==null||ha.forEach(wa=>{Ga.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(wa),request_result:"{}",is_delete:!1,request_table:$e==null?void 0:$e.tableName,request_type:"delete"})})}),await M.pageBatchAddApi({platId:parseInt((Me=ml==null?void 0:ml.value)==null?void 0:Me.plat_id),changeContents:[{tableName:"log",tableContents:Ga}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let ka=await M.getPageDataApi({platId:parseInt((de=ml==null?void 0:ml.value)==null?void 0:de.plat_id),pageName:"menu"});if(ka=(Ce=ka==null?void 0:ka.data)==null?void 0:Ce.result,ka!=null&&ka.find(ol=>(ol==null?void 0:ol.father_name)===Sl.value+"/")){zc.value=a,Ac.value=ka==null?void 0:ka.filter(Nl=>(Nl==null?void 0:Nl.father_name)===Sl.value+"/");let ol=(Ea=(Je=a==null?void 0:a.columns)==null?void 0:Je.find(Nl=>Nl==null?void 0:Nl.mainKey))==null?void 0:Ea.prop,hl=($=(Ge=a==null?void 0:a.fixContent)==null?void 0:Ge[0])==null?void 0:$[ol];Vt.value=!0,Qi.value=[{prop:ol,label:ol,name:ol,value:hl}]}else{let ol=(V=a==null?void 0:a.fixContent)==null?void 0:V.map(aa=>{let Pa={};for(let Ga in aa)Array.isArray(aa==null?void 0:aa[Ga])?Pa[Ga]=JSON.stringify(aa==null?void 0:aa[Ga]):Pa[Ga]=aa==null?void 0:aa[Ga];return Pa.relatedId="",Pa}),hl=[{tableName:(ee=a==null?void 0:a.relatedContents)==null?void 0:ee.find(aa=>aa==null?void 0:aa.includes("content")),tableContents:ol}];await M.pageBatchAddApi({platId:parseInt((ce=ml==null?void 0:ml.value)==null?void 0:ce.plat_id),changeContents:hl});let Nl=[];hl==null||hl.forEach(aa=>{var Pa;(Pa=aa==null?void 0:aa.tableContents)==null||Pa.forEach(Ga=>{Nl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ga),request_result:"{}",is_delete:!1,request_table:aa==null?void 0:aa.tableName,request_type:"copyAdd"})})}),await M.pageBatchAddApi({platId:parseInt((he=ml==null?void 0:ml.value)==null?void 0:he.plat_id),changeContents:[{tableName:"log",tableContents:Nl}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let ka=((Ve=(ia=(ca=a==null?void 0:a.columns)==null?void 0:ca.map(Ee=>Ee==null?void 0:Ee.filter))==null?void 0:ia.filter(Ee=>Ee!==""))==null?void 0:Ve[0])??"";ka=le.analyzeSplitToContent(ka,","),ka=(ka==null?void 0:ka.find(Ee=>Ee==null?void 0:Ee.includes("@Filter")))??"";let ol=(ga=a==null?void 0:a.fixContent)==null?void 0:ga.map(Ee=>{let ba={};for(let Xa in Ee)Array.isArray(Ee==null?void 0:Ee[Xa])?ba[Xa]=JSON.stringify(Ee==null?void 0:Ee[Xa]):ba[Xa]=Ee==null?void 0:Ee[Xa];return ba}),hl=await M.quoteApi({platId:parseInt((Ta=ml==null?void 0:ml.value)==null?void 0:Ta.plat_id),type:"fatherSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});hl=(De=hl==null?void 0:hl.data)==null?void 0:De.result,hl=hl==null?void 0:hl.filter(Ee=>{var ba,Xa;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Xa=(ba=Ee==null?void 0:Ee.quote)==null?void 0:ba[0])==null?void 0:Xa.menus)===(Sl==null?void 0:Sl.value))});let Nl=(Na=(Fa=a==null?void 0:a.columns)==null?void 0:Fa[0])==null?void 0:Na.prop,aa=(da=ol==null?void 0:ol[0])==null?void 0:da[Nl],Pa=[{tableName:(ja=a==null?void 0:a.relatedContents)==null?void 0:ja.find(Ee=>Ee==null?void 0:Ee.includes("content")),tableContents:ol}],Ga=(ta=hl==null?void 0:hl.map(Ee=>{var Xa,yl,zl,pa,Ha;let ba=(Xa=Ee==null?void 0:Ee.contents)==null?void 0:Xa.filter(va=>{var Ca;return(Ca=Object.values(va))==null?void 0:Ca.find(Aa=>Aa===aa)});if((ba==null?void 0:ba.length)>0){let va=ol==null?void 0:ol[0];va={...va,id:(yl=ba==null?void 0:ba[0])==null?void 0:yl.id};let Ca={},Aa=va,pl;return Array.isArray((zl=Ee==null?void 0:Ee.struct)==null?void 0:zl[0])?pl=le.getColumnChild((pa=Ee==null?void 0:Ee.struct)==null?void 0:pa[0]):pl=Ee==null?void 0:Ee.struct,pl=pl==null?void 0:pl.filter(Pe=>(Pe==null?void 0:Pe.prop)!=="relatedId"),pl==null||pl.forEach(Pe=>{var kl,cr;Ca[Pe.prop]=((kl=Pe==null?void 0:Pe.words)!=null&&kl[0]?(Aa==null?void 0:Aa[(cr=Pe==null?void 0:Pe.words)==null?void 0:cr[0]])??(Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop]):Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop])??""}),Ca.id=(Ha=ba==null?void 0:ba[0])==null?void 0:Ha.id,delete Ca.sort,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[Ca]}}else return}))==null?void 0:ta.filter(Ee=>Ee);Pa=[...Pa,...Ga];let $e=await M.quoteApi({platId:parseInt((je=ml==null?void 0:ml.value)==null?void 0:je.plat_id),type:"sonSyncs",related:[{menus:n!==""?Sl.value+"/"+n:Sl.value,groups:a==null?void 0:a.name}]});if($e=(Ze=(ya=$e==null?void 0:$e.data)==null?void 0:ya.result)==null?void 0:Ze.filter(Ee=>!(Pa!=null&&Pa.find(ba=>(ba==null?void 0:ba.tableName)==="content_"+(Ee==null?void 0:Ee.id)))),$e=$e==null?void 0:$e.filter(Ee=>{var ba,Xa;return!((Ee==null?void 0:Ee.fatherPath)!==""&&((Xa=(ba=Ee==null?void 0:Ee.quote)==null?void 0:ba[0])==null?void 0:Xa.menus)===(Sl==null?void 0:Sl.value))}),ka&&ka!==""){(ka==null?void 0:ka[(ka==null?void 0:ka.length)-1])===","&&(ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1)),ka=(ne=(Ae=ka==null?void 0:ka.replace("(",bo))==null?void 0:Ae.split(bo))==null?void 0:ne[1],ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1),(ka==null?void 0:ka[0])==="*"&&(ka="{"+((ua=(pe=ka==null?void 0:ka.replace("{",bo))==null?void 0:pe.split(bo))==null?void 0:ua[1])),ka=(Qe=ka==null?void 0:ka.replaceAll("{",""))==null?void 0:Qe.replaceAll("}","");let Ee=le.calculatorAndToOr(ka);Ee=Ee==null?void 0:Ee[0];let ba;if((Da=Object.values(Ee))!=null&&Da.some(Xa=>(Xa==null?void 0:Xa[0])==="*")){let Xa=(Le=(Te=li.value)==null?void 0:Te.find(yl=>(yl==null?void 0:yl.condition)==="child"))!=null&&Le.value?(wn==null?void 0:wn.value)+"/"+((Ne=(Fe=li.value)==null?void 0:Fe.find(yl=>(yl==null?void 0:yl.condition)==="child"))==null?void 0:Ne.value):wn==null?void 0:wn.value;ba=await Hr(Xa,!1)}for(let Xa in Ee)if(((me=Ee==null?void 0:Ee[Xa])==null?void 0:me[0])==="*"){let yl=(Rl=(Tl=(Qa=Ee[Xa])==null?void 0:Qa.slice(1,(al=Ee[Xa])==null?void 0:al.length))==null?void 0:Tl.split(":"))==null?void 0:Rl[0],zl=(Pl=(Al=Ee[Xa])==null?void 0:Al.split(":"))==null?void 0:Pl[1],pa=(ll=ba==null?void 0:ba.filter(Ha=>(Ha==null?void 0:Ha.name)===yl))==null?void 0:ll[0];pa=(Wa=(jl=pa==null?void 0:pa.compData)==null?void 0:jl.find(Ha=>(Ha==null?void 0:Ha.key)==="tableContents"))==null?void 0:Wa.contents,pa=(Hl=pa==null?void 0:pa[0])==null?void 0:Hl[zl],Ee[Xa]=pa}ka=((Jl=Object.values(Ee))==null?void 0:Jl[0])??""}let ha=(ar=$e==null?void 0:$e.map(Ee=>{var Xa,yl,zl,pa,Ha;let ba=(Xa=Ee==null?void 0:Ee.contents)==null?void 0:Xa.filter(va=>{var Ca;return(Ca=Object.values(va))==null?void 0:Ca.find(Aa=>Aa===(ka===""?aa:ka))});if((ba==null?void 0:ba.length)>0){let va=ol==null?void 0:ol[0];va={...va,id:(yl=ba==null?void 0:ba[0])==null?void 0:yl.id};let Ca={},Aa=va,pl;return Array.isArray((zl=Ee==null?void 0:Ee.struct)==null?void 0:zl[0])?pl=le.getColumnChild((pa=Ee==null?void 0:Ee.struct)==null?void 0:pa[0]):pl=Ee==null?void 0:Ee.struct,pl=pl==null?void 0:pl.filter(Pe=>(Pe==null?void 0:Pe.prop)!=="relatedId"),pl==null||pl.forEach(Pe=>{var cr,Cr,ea,La;let kl=(cr=a==null?void 0:a.columns)==null?void 0:cr.find(Bl=>{var Ol,ma,Sr;return((ma=(Ol=Bl==null?void 0:Bl.words)==null?void 0:Ol[0])==null?void 0:ma.replaceAll("'",""))===(Pe==null?void 0:Pe.prop)&&((Sr=Bl==null?void 0:Bl.functionRelatedWords)==null?void 0:Sr.length)>0});kl=(Cr=kl==null?void 0:kl.prop)==null?void 0:Cr.replaceAll("'",""),Ca[Pe.prop]=((ea=Pe==null?void 0:Pe.words)!=null&&ea[0]?(Aa==null?void 0:Aa[(La=Pe==null?void 0:Pe.words)==null?void 0:La[0]])??(Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop])??(Aa==null?void 0:Aa[kl]):(Aa==null?void 0:Aa[Pe==null?void 0:Pe.prop])??(Aa==null?void 0:Aa[kl]))??void 0}),Ca.id=(Ha=ba==null?void 0:ba[0])==null?void 0:Ha.id,delete Ca.sort,{tableName:"content_"+(Ee==null?void 0:Ee.id),tableContents:[Ca]}}else return}))==null?void 0:ar.filter(Ee=>Ee);Pa=[...Pa,...ha],await M.pageBatchUpdateApi({platId:parseInt((bl=ml==null?void 0:ml.value)==null?void 0:bl.plat_id),changeContents:Pa});let wa=[];Pa==null||Pa.forEach(Ee=>{var ba;(ba=Ee==null?void 0:Ee.tableContents)==null||ba.forEach(Xa=>{wa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Xa),request_result:"{}",is_delete:!1,request_table:Ee==null?void 0:Ee.tableName,request_type:"method"})})}),await M.pageBatchAddApi({platId:parseInt((br=ml==null?void 0:ml.value)==null?void 0:br.plat_id),changeContents:[{tableName:"log",tableContents:wa}]})}Kr.setRefreshCurStructure(!0),Kr.setRefreshCurrentPageInform(l3.value++),await zt(a)},At=async(a,l,r)=>{var i;let n=a==null?void 0:a.find(o=>(o==null?void 0:o.id)===l);if(n){let o=(i=n.compData)==null?void 0:i.map(p=>{var c;if((p==null?void 0:p.key)==="tableContents"){let u={...p,contents:r};return u.contents=(c=(u==null?void 0:u.contents)??[])==null?void 0:c.map(m=>{let g={};for(let y in m)JSON.stringify(m==null?void 0:m[y])==="{}"?g[y]="":g[y]=m==null?void 0:m[y];return g}),u}return p});return n.compData=await $o(o,{}),a=a==null?void 0:a.map(p=>((p==null?void 0:p.id)===(n==null?void 0:n.id)&&(p=n),p)),a}else{let o=a==null?void 0:a.filter(c=>{var u;return(c==null?void 0:c.children)&&((u=c==null?void 0:c.children)==null?void 0:u.length)>0||(c==null?void 0:c.comp)==="Tabs"}),p=o==null?void 0:o.map(async c=>{var u;return c!=null&&c.children&&((u=c==null?void 0:c.children)==null?void 0:u.length)>0?c.children=await At(c==null?void 0:c.children,l,r):c.compData=await At(c==null?void 0:c.compData,l,r),c});return o=await Promise.all(p),o}},zt=async a=>{var o,p,c,u,m,g,y;let l=(o=a==null?void 0:a.relatedContents)==null?void 0:o.filter(d=>d==null?void 0:d.includes("content_"));if(!l)return;let r=await M.getAllTables({platId:parseInt((p=ml==null?void 0:ml.value)==null?void 0:p.plat_id),tableNames:l??[]});if(r=(u=(c=r==null?void 0:r.data)==null?void 0:c.result)==null?void 0:u[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(d=>{d==null||delete d.source_table;const A={};for(let w in d){const Y=d==null?void 0:d[w],D=Y&&Object.prototype.toString.call(Y)==="[object Object]"&&Object.keys(Y).length===0,P=Array.isArray(Y)&&Y.length===0;Y==null||Y==="{}"||D||P?A[w]="":A[w]=Y}return A});let n=(g=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:g[1],i=await At(gr.value,n,r);gr.value=(y=gr.value)==null?void 0:y.map(d=>{var A,w;return(A=i==null?void 0:i[0])!=null&&A.tabInform&&((w=i==null?void 0:i[0])==null?void 0:w.tabInform)===(d==null?void 0:d.tabInform)?d=i==null?void 0:i[0]:(d!=null&&d.name?(d==null?void 0:d.name)===(i==null?void 0:i.name):(d==null?void 0:d.id)===(i==null?void 0:i.id))&&(d=i),d})},h3=a=>{let l=Qi.value;Qi.value=l==null?void 0:l.map(r=>(r.value=a==null?void 0:a[r==null?void 0:r.prop],r))},v3=async()=>{var d,A,w,Y,D,P,O,E,S,x;let a=zc.value,l=Ac.value,r=(A=(d=a==null?void 0:a.columns)==null?void 0:d.find(b=>b==null?void 0:b.mainKey))==null?void 0:A.prop,n=(Y=(w=Qi.value)==null?void 0:w[0])==null?void 0:Y.value,i=(D=a==null?void 0:a.fixContent)==null?void 0:D.map(b=>{var I;let _={};for(let R in b)Array.isArray(b==null?void 0:b[R])?_[R]=JSON.stringify(b==null?void 0:b[R]):_[R]=b==null?void 0:b[R];return(I=a==null?void 0:a.columns)==null||I.forEach(R=>{(R==null?void 0:R.formType)==="Upload"&&(_==null?void 0:_[R==null?void 0:R.prop])===""&&(_[R==null?void 0:R.prop]="{}")}),_[r]=n,_}),o=[{tableName:(P=a==null?void 0:a.relatedContents)==null?void 0:P.find(b=>b==null?void 0:b.includes("content")),tableContents:i}];await M.pageBatchAddApi({platId:parseInt((O=ml==null?void 0:ml.value)==null?void 0:O.plat_id),changeContents:o}),l=l==null?void 0:l.filter(b=>{var _,I,R;return(R=b==null?void 0:b.object_name)==null?void 0:R.includes((I=(_=a==null?void 0:a.fixContent)==null?void 0:_[0])==null?void 0:I[r])});let p=[],c=new Map;l==null||l.forEach(b=>{p.push(`content_${b==null?void 0:b.object_id}`),p.push(`struct_${b==null?void 0:b.object_id}`),c.set(b==null?void 0:b.object_id,b)});let u=await M.getAllTables({platId:parseInt((E=ml==null?void 0:ml.value)==null?void 0:E.plat_id),tableNames:p??[]});u=(S=u==null?void 0:u.data)==null?void 0:S.result;let m=[],g=[];u=le.chunk(u,2),u==null||u.forEach(b=>{var R,re,X,ye,fe,U,q,Z,ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la,j;let _=c.get((ye=(X=(re=(R=b==null?void 0:b[1])==null?void 0:R[0])==null?void 0:re.source_table)==null?void 0:X.split("_"))==null?void 0:ye[1]),I=(q=(U=(fe=_==null?void 0:_.object_name)==null?void 0:fe.split("/"))==null?void 0:U.filter((We,Oe)=>{var Ie,Me;return((Me=(Ie=_==null?void 0:_.object_name)==null?void 0:Ie.split("/"))==null?void 0:Me.length)-1!==Oe}))==null?void 0:q.join("/");if(I=I+"/"+n,g!=null&&g.find(We=>(We==null?void 0:We.path)===I)||g.push({fatherPath:_==null?void 0:_.father_name,isShow:_==null?void 0:_.is_show,path:I}),((ae=(Z=b==null?void 0:b[1])==null?void 0:Z[0])==null?void 0:ae.类型)==="Table"){let We=((te=(ze=(ve=b==null?void 0:b[1])==null?void 0:ve[0])==null?void 0:ze.结构)==null?void 0:te.contents)??[],Oe=dl.safeClone(We);Array.isArray(Oe==null?void 0:Oe[0])&&(Oe=le.getColumnChild(Oe==null?void 0:Oe[0]));let Ie=[];if(((N=b==null?void 0:b[0])==null?void 0:N.length)>0&&(Ie=(se=b==null?void 0:b[0])==null?void 0:se.map(Me=>Oe==null?void 0:Oe.map(Ce=>(Ce=(Me==null?void 0:Me[Ce==null?void 0:Ce.prop])??"",Ce)))),m!=null&&m.find(Me=>(Me==null?void 0:Me.key)===I)){let Me=(W=m==null?void 0:m.find(Ce=>(Ce==null?void 0:Ce.key)===I))==null?void 0:W.contents;Me.push({isShow:_==null?void 0:_.is_show,filter:((we=(_e=(ue=b==null?void 0:b[1])==null?void 0:ue[0])==null?void 0:_e.引用)==null?void 0:we.contents)??"",key:"Table",name:Object.values(_==null?void 0:_.name),tableColumns:We,tableContents:Ie});let de=m==null?void 0:m.findIndex(Ce=>(Ce==null?void 0:Ce.key)===I);m[de].contents=Me}else m.push({key:I,contents:[{isShow:_==null?void 0:_.is_show,filter:((j=(la=(Ke=b==null?void 0:b[1])==null?void 0:Ke[0])==null?void 0:la.引用)==null?void 0:j.contents)??"",key:"Table",name:Object.values(_==null?void 0:_.name),tableColumns:We,tableContents:Ie}]})}});let y=[];y.push({key:"menuPath",contents:g}),y=[...y,...m],await M.createPlatFormDataApi({platId:parseInt((x=ml==null?void 0:ml.value)==null?void 0:x.plat_id),changeData:y}),Vt.value=!1,Kr.setRefreshTable(!0)},Mo=async(a,l)=>{},Io=async a=>{gr.value=await le.getDeepDiffItems(a),Kr.setItemData(gr.value),Kr.setOriginalData(gr.value)};e.ref();const m3=e.ref(null),y3=()=>{var a,l;console.log("倒计时结束时"),M.ElMessageBox.alert(`超时未提交,【${(l=(a=Sl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Lc=e.ref([]),g3=e.computed(()=>{var a,l;return(l=(a=Bt.value)==null?void 0:a[Sl.value])==null?void 0:l.filter(r=>{var n;return((n=r==null?void 0:r.key)==null?void 0:n.type)==="gridLayout"})});e.watch(()=>[n3.value],()=>{Bn.setSelectTitle([]),Bn.setChooseTitle([])},{deep:!0});e.watch(()=>Ao.value,async(a,l)=>{var n,i,o,p,c,u;let r=(n=Ao.value)==null?void 0:n.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==wn.value);if((r==null?void 0:r.length)>0){ln.setContentLoading(!0);let m=((i=r==null?void 0:r[0])==null?void 0:i.relatedContent)??(Sl==null?void 0:Sl.value),g=m+"/"+((o=r==null?void 0:r[0])==null?void 0:o.value),y=!!((p=r==null?void 0:r[0])!=null&&p.parentContent),d=await Hr(g,y,{originPath:m});d=(c=d==null?void 0:d.filter(Y=>Y))==null?void 0:c.map(Y=>(Y.isShow=!0,Y)),console.log(d,"loadingContents");let A=await le.getDeepDiffItems(d),w=A==null?void 0:A.filter(Y=>Y==null?void 0:Y.choice);Vo.setSelectTab((u=w==null?void 0:w[0])==null?void 0:u.choiceName),A=A==null?void 0:A.filter(Y=>{var D;return!(Y!=null&&Y.choiceName)||(Y==null?void 0:Y.choiceName)===((D=w==null?void 0:w[0])==null?void 0:D.choiceName)}),gr.value=A,ln.setContentLoading(!1)}});const b3=(a,l)=>{setTimeout(async()=>{var c,u,m;let r=(c=Ao.value)==null?void 0:c.filter(g=>(g==null?void 0:g.condition)==="child"&&(g==null?void 0:g.value)!==""&&(g==null?void 0:g.parentContent)!==wn.value),n=Sl==null?void 0:Sl.value,i=Sl==null?void 0:Sl.value;(r==null?void 0:r.length)>0&&(i=((u=r==null?void 0:r[0])==null?void 0:u.relatedContent)??(Sl==null?void 0:Sl.value),n=i+"/"+((m=r==null?void 0:r[0])==null?void 0:m.value));let o=await Hr(n,!1,{originPath:i});o=o==null?void 0:o.map(g=>(g.isShow=!0,g));let p=await le.getDeepDiffItems(o);gr.value=p==null?void 0:p.filter(g=>!(g!=null&&g.step)||(g==null?void 0:g.step)===(a==null?void 0:a.title))},10)},k3=a=>{setTimeout(async()=>{var p,c,u;let l=(p=Ao.value)==null?void 0:p.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==wn.value),r=Sl==null?void 0:Sl.value,n=Sl==null?void 0:Sl.value;(l==null?void 0:l.length)>0&&(n=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(Sl==null?void 0:Sl.value),r=n+"/"+((u=l==null?void 0:l[0])==null?void 0:u.value));let i=await Hr(r,!1,{originPath:n});i=i==null?void 0:i.map(m=>(m.isShow=!0,m)),Vo.setSelectTab(a);let o=await le.getDeepDiffItems(i);gr.value=o==null?void 0:o.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>r3.value,a=>{a!=null&&a.length||(gr.value=[])},{immediate:!0});e.watch(()=>[Sl.value],async a=>{var o,p,c,u;if(!Sl.value)return;if(Sl.value==="/"){gr.value=[];return}ln.setCurrentMenuPath(Sl.value),Kr.setLockingPage(""),gr.value=[];let l=e.getCurrentInstance();(o=l==null?void 0:l.scope)==null||o.stop(),l=null,Li.value=!1,ln.setContentLoading(!0),Nc.value=!0;let r=a==null?void 0:a[0],n=r,i=(p=li.value)==null?void 0:p.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Sl.value&&!(m!=null&&m.relatedContent));if((i==null?void 0:i.length)>0&&(r=r+"/"+((c=i==null?void 0:i[0])==null?void 0:c.value)),r==="系统管理/日志管理")gr.value=await X0("log");else{let m=await Hr(r,!0,{originPath:n});m=m==null?void 0:m.map(d=>(d.isShow=!0,d));let g=await le.getDeepDiffItems(m),y=g==null?void 0:g.filter(d=>d==null?void 0:d.choice);Vo.setSelectTab((u=y==null?void 0:y[0])==null?void 0:u.choiceName),gr.value=g==null?void 0:g.filter(d=>{var A;return!(d!=null&&d.choiceName)||(d==null?void 0:d.choiceName)===((A=y==null?void 0:y[0])==null?void 0:A.choiceName)})}ln.setContentLoading(!1),Kr.setExtraContents([]),Bn.setSelectIndex(""),Bn.setSelectMenu(""),Kr.setItemData(gr.value),Kr.setOriginalData(gr.value),Kr.setRefreshTable(!1),e.nextTick(()=>{ni.value=ni.value++,Li.value=!0})},{immediate:!0});e.watch(()=>[zs.value],async()=>{var a,l,r,n;if(zs.value){gr.value=[];let i=e.getCurrentInstance();(a=i==null?void 0:i.scope)==null||a.stop(),i=null,Li.value=!1,ln.setContentLoading(!0),Nc.value=!0;let o=wn==null?void 0:wn.value,p=o,c=(l=li.value)==null?void 0:l.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==(wn==null?void 0:wn.value));(c==null?void 0:c.length)>0&&(o=o+"/"+((r=c==null?void 0:c[0])==null?void 0:r.value));let u=await Hr(o,!0,{originPath:p});u=u==null?void 0:u.map(y=>(y.isShow=!0,y));let m=await le.getDeepDiffItems(u),g=m==null?void 0:m.filter(y=>y==null?void 0:y.choice);if(Vo.setSelectTab((n=g==null?void 0:g[0])==null?void 0:n.choiceName),gr.value=m==null?void 0:m.filter(y=>{var d;return!(y!=null&&y.choiceName)||(y==null?void 0:y.choiceName)===((d=g==null?void 0:g[0])==null?void 0:d.choiceName)}),ln.setContentLoading(!1),Kr.setExtraContents([]),Bn.setSelectIndex(""),Bn.setSelectMenu(""),Kr.setItemData(gr.value),Kr.setOriginalData(gr.value),Kr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let y=[...li.value,...c];Bn.setSelectTitle(y)}e.nextTick(()=>{ni.value=ni.value++,Li.value=!0})}},{immediate:!0,deep:!0});const x3=async()=>{ln.setLinkMenuInfo(null),ln.setActiveMenuPath(a3.value),gr.value=null,Kr.setRouteToChildPath(""),ln.setChildMenu("")},w3=a=>new RegExp("button","i").test(a),_3=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Rc=a=>{if(_3(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&ln.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},$c=async(a,l,r)=>{var d,A,w,Y,D,P,O,E,S,x,b,_;let n="",i="";for(let I in l)(l==null?void 0:l[I])===a&&(i=I);r==null||r.forEach(I=>{(I==null?void 0:I.prop)===i&&(n=I==null?void 0:I.fatherPath)});let o=n===""?Sl.value:n;n!==""&&ln.setCurrentMenuPath(o),ln.setCurrentMenuPath(o+"/"+a),ln.setContentLoading(!0),gr.value=await Hr(o+"/"+a,!0,{originPath:o+"/",row:l});let p=await Hr(o,!1),c=(d=p==null?void 0:p.filter(I=>(I==null?void 0:I.comp)==="Table"))==null?void 0:d[0],u=((D=(Y=(w=(A=c==null?void 0:c.compData)==null?void 0:A.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:w.contents)==null?void 0:Y[0])==null?void 0:D.prop)??((x=(S=(E=(O=(P=c==null?void 0:c.compData)==null?void 0:P.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:O.contents)==null?void 0:E[0])==null?void 0:S[0])==null?void 0:x.prop),m=(_=(b=c==null?void 0:c.compData)==null?void 0:b.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:_.contents;m=m==null?void 0:m.map(I=>({label:I==null?void 0:I[u],value:I==null?void 0:I[u]}));let g=li.value,y={value:a,condition:"child",options:m,relatedContent:o,isShow:!0};g=g==null?void 0:g.filter(I=>(I==null?void 0:I.condition)!=="child"),g.push(y),Bn.setSelectTitle(g),Bn.setChooseTitle([y]),ln.setContentLoading(!1),Kr.setExtraContents([]),Bn.setSelectIndex(""),Bn.setSelectMenu(""),Kr.setItemData(gr.value),Kr.setOriginalData(gr.value)},S3=a=>{Ic.value=a},zi=e.reactive({index:0,comp:null}),E3=e.computed(()=>{var a;return(a=gr.value)==null?void 0:a.map((l,r)=>({id:l.id,name:l.name,status:C3(l,r)}))}),Vc=(a,l)=>{var u,m,g,y,d;const r=l?a:a-2,n=(u=gr.value)==null?void 0:u[r],i=(g=(m=n==null?void 0:n.compData)==null?void 0:m.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:g.contents,o=i==null?void 0:i.findIndex(A=>(A==null?void 0:A.isMainKey)&&(A==null?void 0:A.label)!=="操作"),p=o===-1?0:o,c=(d=(y=n==null?void 0:n.compData)==null?void 0:y.find(A=>(A==null?void 0:A.key)==="tableContents"))==null?void 0:d.contents;return{valid:c==null?void 0:c.every(A=>A==null?void 0:A[p+1]),length:(c==null?void 0:c.length)||0}},C3=(a,l)=>{var n;let r="process";if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){const{valid:i,length:o}=Vc(l,!0);zi.index===l?r="process":o===0?r="wait":r=i?"success":"error"}return r},Fc=a=>{var r,n,i,o,p;const l=a+1;if(l>1&&((i=(n=(r=gr.value)==null?void 0:r[a])==null?void 0:n.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:c}=Vc(l);c?(zi.index=l,zi.comp=(o=gr.value)==null?void 0:o[a]):Ja.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else zi.index=l,zi.comp=(p=gr.value)==null?void 0:p[a]},Pc=e.computed(()=>{var a,l;return(l=(a=Mc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Pc.value,a=>{a&&Fc(0)},{immediate:!0});const Oo=e.ref(0),jc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=M.cloneDeep(a))==null?void 0:l.map(n=>(Oo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??Oo.value,children:jc(n==null?void 0:n.children)},n))},D3=a=>{var r;return(r=M.cloneDeep(a))==null?void 0:r.map(n=>(Oo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??Oo.value,children:jc(n==null?void 0:n.children)},n))},Hc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===l)?(r=M.cloneDeep(a))==null?void 0:r.filter(i=>(i==null?void 0:i.id)!==l):(a=a==null?void 0:a.map(n=>(n.children=Hc(n==null?void 0:n.children,l),n)),a)},Uc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=M.cloneDeep(a))==null?void 0:r.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i=l),i)):(a=a==null?void 0:a.map(n=>(n.children=Uc(n==null?void 0:n.children,l),n)),a)},qc=(a,l)=>{var r;return a!=null&&a.find(n=>{var i;return(n==null?void 0:n.id)===((i=l==null?void 0:l.contents)==null?void 0:i.id)})?(r=M.cloneDeep(a))==null?void 0:r.map(i=>{var o;return(i==null?void 0:i.id)===((o=l==null?void 0:l.contents)==null?void 0:o.id)&&(i=l==null?void 0:l.contents),i}):(a=a==null?void 0:a.map(n=>(n.children=qc(n==null?void 0:n.children,l),n)),a)},Wc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=M.cloneDeep(a))==null?void 0:r.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i!=null&&i.children||(i.children=[]),i.children.push(l.contents)),i)):(a=a==null?void 0:a.map(n=>(n.children=Wc(n==null?void 0:n.children,l),n)),a)},xr=[{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"}],T3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],B3=[{label:"新增",value:"add"}],Gn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:B3},{key:"background",label:"按钮背景色",type:"Color"}],Yn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:T3},{key:"textColor",label:"按钮颜色",type:"Color"}],N3={class:"table-content"},A3={class:"menu-config-wrap"},z3=["onClick"],M3={key:0,class:"viewport-wrap"},I3=["onClick"],O3={title:"选择显示列信息"},L3={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"}},R3=["title"],$3={class:"col-operate-wrap"},V3={key:0,class:"col-operate-radio-wrapper"},F3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},P3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},j3={class:"pop-view"},H3={class:"pop-wrapper"},U3={class:"file-list-pop"},q3=["title","onClick"],W3=["onClick"],K3=["onClick"],G3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},Y3={class:"form-content"},J3={key:0,class:"dialog-footer"},X3={class:"dialog-footer"},Z3={class:"ocr-dialog-content"},Q3={class:"ocr-steps"},eh={key:0,class:"ocr-action-buttons"},ah={key:1,class:"ocr-preview-area"},lh={class:"ocr-file-grid"},rh={class:"file-thumbnail"},nh=["src"],ih={key:1,class:"thumbnail-placeholder"},oh={class:"progress-svg",viewBox:"0 0 36 36"},th=["stroke","stroke-width","stroke-dasharray"],sh={key:0,class:"progress-icon"},ch={key:1,class:"progress-icon"},uh=["onClick"],dh={class:"file-name"},ph={key:0,class:"ocr-recognize-button"},fh={key:2,class:"ocr-progress-section"},hh={key:3,class:"ocr-confirm-area"},vh={class:"ocr-preview-tip"},mh={class:"ocr-preview-table"},yh={style:{display:"flex","align-items":"center",gap:"8px"}},gh={key:0},bh={key:4,class:"ocr-success-area"},kh={key:0,class:"ocr-dialog-footer"},xh={class:"form-content"},wh={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},_h={style:{display:"flex","justify-content":"space-between",gap:"8px"}},Sh={style:{display:"flex"}},Is="ss-ocr-upload-history",Eh="ss-ocr-cert-history-v1",Ch={__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},calculator:{type:Array,default:()=>[]},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 Xt;const r=e.ref([]),n=$t(M.pinia),i=e.ref(null),o=e.ref(new Set),p=e.ref(new Map),c=e.ref(!1),u=e.ref([]),m=e.ref(new Map),g=new Map,y=e.ref(new Map),d=a,A=e.ref((d==null?void 0:d.allowSelect)??!0),w=e.ref(((Xt=d==null?void 0:d.config)==null?void 0:Xt.showIndex)??!0),Y=e.ref(),D=e.ref(!0),P=e.ref(!1),O=e.ref([]),E={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},S=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=le.useOriginalState(M.pinia);let b="$R";const{originalPath:_}=M.storeToRefs(x),I=_.value,R=e.computed(()=>{var v;const f=(v=le.getAllLeafNodes(q.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 f.length>0?f.every(z=>!!(z!=null&&z.sortable)):!1});e.computed(()=>{var v;return(v=q.value)==null?void 0:v.every(z=>z==null?void 0:z.filterable)}),e.computed(()=>{var v;return(v=q.value)==null?void 0:v.every(z=>z==null?void 0:z.operable)});const re=e.ref(!0),X=e.ref([]),ye=e.reactive({column:{},status:!1,text:"合计"}),fe=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),U=l,q=e.ref([]),Z=e.ref([]),ae=e.ref([]),ve=e.reactive({prop:"",order:null}),ze=e.ref([]),te=e.ref(!1),N=e.ref(!1),se=e.ref(null),{isUseBackdrop:W,initTrackFileType:ue,getFileExtension:_e,setData:we,getFileInfo:Ke,getFilesInfo:la}=Do.useThreeSystem(),j=e.ref([]),We=e.ref(!1),Oe=e.ref(),Ie=M.useMenuState(),{importLoading:Me,activeMenuPath:de,contentLoading:Ce,linkMenuInfo:Je}=M.storeToRefs(Ie),Ea=le.useTableComp(M.pinia),Ge=M.useModelComp(M.pinia),$=ii(M.pinia),{extraContents:V,cacheUpdatingData:ee,tableViewContents:ce,tableLoading:he,pageMapState:ca,lockingPage:ia}=M.storeToRefs(Ge),{selectTab:Ve}=M.storeToRefs($),{compType:ga,hasEditable:Ta}=cc.useRole(),De=e.ref([]),Fa=e.ref([]),Na=e.ref(new Map);e.ref(!1);const da=e.ref("");e.ref();const ja=e.ref(!0),ta=e.ref(0),je=e.ref(!0),ya=e.ref(""),Ze=e.ref(!1),Ae=e.ref(null);e.ref([]);const ne=e.ref({label:"查看三维模型"}),pe=e.ref(!1),ua=e.ref(),Qe=e.ref([]),Da=e.ref([]),Te=e.ref(!1),Le=e.ref([]),Fe=e.ref([]),Ne=e.ref([]),me=e.ref([]),al=e.ref({dialogShow:!1,dialogTitle:""}),Qa=()=>{al.value.dialogShow=!1,al.value.dialogTitle=""},Tl=f=>{console.log("Received signature data:",f),al.value.dialogShow=!1},Rl=e.ref([]),Al=()=>{try{const f=localStorage.getItem(Is),v=f?JSON.parse(f):[];Rl.value=Array.isArray(v)?v:[]}catch{Rl.value=[]}},Pl=()=>{try{localStorage.setItem(Is,JSON.stringify(Rl.value||[]))}catch{}},ll=f=>{var ie,oe,K;if(!f)return;const v=f.url||((ie=f==null?void 0:f.uploadResult)==null?void 0:ie.url)||"",z=f.name||((oe=f==null?void 0:f.uploadResult)==null?void 0:oe.name)||((K=f==null?void 0:f.uploadResult)==null?void 0:K.fileName)||"";if(!v&&!z)return;const L={name:z,url:v,ts:Date.now()},H=String(L.name||"").trim().toLowerCase(),T=(Rl.value||[]).findIndex(ke=>String((ke==null?void 0:ke.name)||"").trim().toLowerCase()===H);T>-1&&Rl.value.splice(T,1),Rl.value.unshift(L),Rl.value.length>20&&(Rl.value=Rl.value.slice(0,20)),Pl()};Al();const jl=(f,v)=>`${Eh}:${String(f??"")}:${String(v??"")}`,Wa=(f,v)=>{try{const z=sessionStorage.getItem(jl(f,v)),L=z?JSON.parse(z):[];return Array.isArray(L)?L:[]}catch{return[]}},Hl=(f,v,z)=>{try{sessionStorage.setItem(jl(f,v),JSON.stringify(Array.isArray(z)?z:[]))}catch{}},Jl=(f,v,z)=>{if(!v)return;const L=Wa(f,v),H=[z,...L||[]].filter(Boolean).slice(0,1);return Hl(f,v,H),H},ar=(f,v,z)=>{if(!v||!z)return;const L=jl(f,v),H=jl(f,z);try{const T=sessionStorage.getItem(L);if(!T)return;const ie=(()=>{try{const ke=JSON.parse(T);return Array.isArray(ke)?ke:[]}catch{return[]}})(),oe=Wa(f,z),K=[...ie,...oe||[]].filter(Boolean).sort((ke,ge)=>Number((ge==null?void 0:ge.ts)||0)-Number((ke==null?void 0:ke.ts)||0)).slice(0,1);sessionStorage.setItem(H,JSON.stringify(K)),sessionStorage.removeItem(L)}catch{}},bl=e.ref(!1),br=e.ref(!1),ka=e.ref([]),ol=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const hl=e.ref(!1),Nl=e.ref([]),aa=e.ref(1),Pa=e.ref(new Map),Ga=e.ref(new Map),$e=e.ref(0),ha=e.ref(!1),wa=e.ref([]),Ee=e.ref([]),ba=f=>{var v;try{const z=(v=le.getAllLeafNodes(q.value)||[])==null?void 0:v.filter(L=>(L==null?void 0:L.type)!=="operate"&&(L==null?void 0:L.label)!=="操作"&&(L==null?void 0:L.prop)!=="operate");return(z==null?void 0:z.find(L=>(L==null?void 0:L.prop)===f||(L==null?void 0:L.label)===f))||null}catch{return null}},Xa=f=>{const v=ba(f),z=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return dl.getComponent(z)||dl.getComponent("Input")},yl=e.ref([]),zl=e.ref(null),pa=e.ref([]),Ha=e.ref(null),va=e.ref(""),Ca=e.ref(!1),Aa=e.ref([]),pl=e.ref(""),Pe=e.ref(!1),kl=e.ref([]),cr=e.ref([]),Cr=e.ref([]),ea=e.ref(null),La=e.ref([]),Bl=e.ref("");e.computed(()=>{var f;try{const v=(f=le.getAllLeafNodes(q.value)||[])==null?void 0:f.filter(L=>(L==null?void 0:L.type)!=="operate"&&(L==null?void 0:L.label)!=="操作"&&(L==null?void 0:L.prop)!=="operate"),z=new Map;return v==null||v.forEach(L=>{L!=null&&L.label&&(L!=null&&L.prop)&&z.set(L.label,L.prop)}),z.get("编号")||""}catch{return""}});const Ol=e.computed(()=>{var f;try{const v=(f=le.getAllLeafNodes(q.value)||[])==null?void 0:f.filter(L=>(L==null?void 0:L.type)!=="operate"&&(L==null?void 0:L.label)!=="操作"&&(L==null?void 0:L.prop)!=="operate"),z=new Map;return v==null||v.forEach(L=>{L!=null&&L.label&&(L!=null&&L.prop)&&z.set(L.label,L.prop)}),z.get("名称")||""}catch{return""}}),ma=e.computed(()=>{var f;try{const v=(f=le.getAllLeafNodes(q.value)||[])==null?void 0:f.filter(L=>(L==null?void 0:L.type)!=="operate"&&(L==null?void 0:L.label)!=="操作"&&(L==null?void 0:L.prop)!=="operate"),z=new Map;return v==null||v.forEach(L=>{L!=null&&L.label&&(L!=null&&L.prop)&&z.set(L.label,L.prop)}),z.get("制造厂")||""}catch{return""}}),Sr=()=>{Pe.value=!1,kl.value=[],cr.value=[],Cr.value=[],ea.value=null,La.value=[],Bl.value=""},Ur=f=>f==null?!1:typeof f=="string"?f.trim()!=="":Array.isArray(f)?f.length>0:!0,Gr=(f,v)=>{const z=(f==null?void 0:f.ocrRow)||{};for(const H of Object.keys(z))H==="id"||H==="_isOCRRow"||H==="_ocrTableId"||Ur(z[H])&&(v[H]=z[H]);const L=Fa.value.find(H=>H.id===v.id);if(L)for(const H of Object.keys(z))H==="id"||H==="_isOCRRow"||H==="_ocrTableId"||Ur(z[H])&&(L[H]=z[H]);Na.value&&Na.value.set(v.id,v),Jl(d==null?void 0:d.index,v.id,f==null?void 0:f.versionItem),cr.value=[...cr.value||[],JSON.parse(JSON.stringify(v))]},Re=async(f,v=null)=>{var z,L,H,T,ie,oe,K;try{const ke=(z=le.getAllLeafNodes(q.value)||[])==null?void 0:z.filter(_a=>(_a==null?void 0:_a.type)!=="operate"&&(_a==null?void 0:_a.label)!=="操作"&&(_a==null?void 0:_a.prop)!=="operate"),ge=new Map;ke==null||ke.forEach(_a=>{_a!=null&&_a.label&&(_a!=null&&_a.prop)&&ge.set(_a.label,_a.prop)});const Ye=ge.get("系统编号")||ge.get("编号");if(!Ye){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const qe=v||ea.value;if((Array.isArray(qe==null?void 0:qe.result)?qe.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let _a=0;_a<f.length;_a++){const za=f[_a],Ma=za[Ye];if(!Ma){console.warn(`第 ${_a+1} 条匹配行缺少系统编号,跳过`);continue}const na=`设备管理/试验设备/${Ma}`,il=await M.getPageDataApi({platId:parseInt((L=wl.value)==null?void 0:L.plat_id),pageName:na});if(!((H=il==null?void 0:il.data)!=null&&H.result)||!Array.isArray(il.data.result)){console.warn(`未找到详情页数据: ${na}`);continue}const Sa=il.data.result.find(fa=>(fa==null?void 0:fa.property_name)==="校检记录");if(!Sa){console.warn(`详情页 ${na} 中未找到校检记录表`);continue}const tl=(T=Sa.contents)==null?void 0:T.find(fa=>(fa==null?void 0:fa.key)&&fa.key.startsWith("content_"));if(!tl||!tl.key){console.warn("校检记录表中未找到 content item");continue}const be=tl.key,Va=Array.isArray(tl.value)?tl.value:[];if(Va.length>=5){const B=[...Va].sort((Ia,Ua)=>{const sl=Number((Ia==null?void 0:Ia.create_time)||0),Ka=Number((Ua==null?void 0:Ua.create_time)||0);return sl-Ka})[0];B!=null&&B.id&&await M.pageBatchDeleteApi({platId:parseInt((ie=wl.value)==null?void 0:ie.plat_id),changeContents:[{tableName:be,tableContents:[{id:B.id}]}]})}const xa=(oe=ke==null?void 0:ke.find(fa=>(fa==null?void 0:fa.label)==="证书附件"))==null?void 0:oe.prop,Ya=String(Date.now()),Ra={id:Ya},Be=Va[0]||{},Q=new Date().toISOString().split("T")[0];if(Object.keys(Be||{}).forEach(fa=>{if(fa!=="id"){if(fa==="证书附件"){Ra[fa]="";return}if(fa==="校检日期"||fa==="检校日期"){Ra[fa]=za[fa]||za.校检日期||za.检校日期||Q;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(fa)){Ra[fa]=za[fa]??"";return}Ra[fa]=za[fa]??""}}),xa&&za[xa]){const fa=za[xa];if(Array.isArray(fa)&&fa.length>0)Ra.证书附件=JSON.stringify(fa.map(B=>({url:(B==null?void 0:B.url)||"",name:(B==null?void 0:B.name)||(B==null?void 0:B.fileName)||"",fileName:(B==null?void 0:B.fileName)||(B==null?void 0:B.name)||""})).filter(B=>B.url||B.name));else if(typeof fa=="string")try{const B=JSON.parse(fa);Ra.证书附件=fa}catch{Ra.证书附件=JSON.stringify([{url:fa,name:fa,fileName:fa}])}}console.log(be,"tableName","inspectionRecordRow",Ra),await M.pageBatchAddApi({platId:parseInt((K=wl.value)==null?void 0:K.plat_id),changeContents:[{tableName:be,tableContents:[Ra]}]});const He=Sa==null?void 0:Sa.object_id;if(He&&Ya){const fa=xa&&za[xa]?za[xa]:null;let B=[],Ia="",Ua=!1;if(Array.isArray(fa)&&fa.length>0){B=fa.map(ul=>({name:(ul==null?void 0:ul.name)||(ul==null?void 0:ul.fileName)||"",url:(ul==null?void 0:ul.url)||""})).filter(ul=>ul.url||ul.name);const Ka=fa[0];Ia=(Ka==null?void 0:Ka.url)||"";const Ba=(Ka==null?void 0:Ka.name)||(Ka==null?void 0:Ka.fileName)||"";Ua=String(Ba).toLowerCase().endsWith(".pdf")||String(Ia).toLowerCase().endsWith(".pdf")}else if(typeof fa=="string")try{const Ka=JSON.parse(fa);Array.isArray(Ka)?(B=Ka.map(Ba=>({name:(Ba==null?void 0:Ba.name)||(Ba==null?void 0:Ba.fileName)||"",url:(Ba==null?void 0:Ba.url)||""})).filter(Ba=>Ba.url||Ba.name),B.length>0&&(Ia=B[0].url||"",Ua=String(B[0].name).toLowerCase().endsWith(".pdf")||String(Ia).toLowerCase().endsWith(".pdf"))):(Ia=fa,Ua=String(fa).toLowerCase().endsWith(".pdf"))}catch{Ia=fa,Ua=String(fa).toLowerCase().endsWith(".pdf")}const sl={ts:Date.now(),versionId:String(Date.now())+"_"+String(_a),label:new Date().toLocaleString(),certType:za.证书类型||"",certNo:za.证书编号||"",fileType:Ua?"pdf":"image",sourceUrl:Ua?Ia:"",images:B};Jl(He,Ya,sl)}}}catch(ke){console.error("向校检记录表插入OCR识别结果失败:",ke),Ja.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},ur=f=>{const v=Array.isArray(f)?f:kl.value||[];if(v.length===0){Sr();return}if(v.find(T=>(T==null?void 0:T.__decision)==="replace"&&!(T!=null&&T.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(T=>{var oe;const ie=T==null?void 0:T.__decision;if(!(!ie||ie==="skip")){if(ie==="add"){Jl(d==null?void 0:d.index,(oe=T==null?void 0:T.ocrRow)==null?void 0:oe.id,T==null?void 0:T.versionItem),Cr.value=[...Cr.value||[],T.ocrRow];return}if(ie==="replace"){const K=T==null?void 0:T.selectedTargetId,ke=(De.value||[]).find(ge=>String(ge==null?void 0:ge.id)===String(K));if(!ke)return;Gr(T,ke)}}}),(cr.value||[]).length>0&&(De.value=[...De.value||[]]),(Cr.value||[]).length>0&&(De.value=[...De.value||[],...Cr.value||[]],Fa.value=[...Fa.value||[],...Cr.value||[]],(Cr.value||[]).forEach(T=>{var ie,oe;return(oe=(ie=Na.value)==null?void 0:ie.set)==null?void 0:oe.call(ie,T.id,T)})),Xl.value=De.value;const L=cr.value||[],H=Cr.value||[];if(L.length>0&&(U("change",{buttonName:"编辑",singleContent:L,content:De.value,relatedContents:d==null?void 0:d.related,index:d==null?void 0:d.index,parentTableId:d==null?void 0:d.parentTableId,columns:q.value,name:d==null?void 0:d.compName}),Re(L)),H.length>0){const T=ea.value;U("change",{buttonName:"OCR批量新增",content:De.value,index:d==null?void 0:d.index,parentTableId:d==null?void 0:d.parentTableId,column:q.value,ocrRows:H,relatedContents:d==null?void 0:d.related,uploadedFiles:(Array.isArray(T==null?void 0:T.result)?T.result:[]).map(ie=>(Array.isArray(ie==null?void 0:ie.图片信息)?ie.图片信息:[]).map(oe=>({url:(oe==null?void 0:oe.url)||"",name:(oe==null?void 0:oe.name)||"",fileName:(oe==null?void 0:oe.name)||""})).filter(oe=>oe.url)),ocrResult:T,matchedCount:(L||[]).length,newCount:(H||[]).length})}Ja.ElMessage.success("已提交候选处理结果"),Sr()},wr=Tc(),Yr=e.computed(()=>wr.getConfig()),tr=e.ref(),lr=e.ref(),un=_c(M.pinia),Xl=e.ref(),Ul=e.ref(0),Tr=M.useUnit(M.pinia),{selectIndex:Nr,selectMenu:El,selectTitle:Zl}=M.storeToRefs(Tr),{selectString:rr}=M.storeToRefs(un),Dr=M.useLoginState(M.pinia),{loginUserInfo:wl}=M.storeToRefs(Dr),Lr=e.ref(720),Kl=e.ref(!1),on=e.ref(!1),Rr=e.ref([]),qr=e.ref(),En=e.ref(!0),$n=e.ref(!0);e.ref([]);const Cn=e.inject("contentRef");e.provide("contentRef",Cn),e.provide("getSuggestListForCell",Wu),e.provide("getSuggestLoadingForCell",(f,v)=>{const z=`${f==null?void 0:f.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return y.value.get(z)||!1}),e.watch(()=>{var f;return(f=De.value)==null?void 0:f.length},f=>{fe.total=f}),e.watch(()=>ce.value,async()=>{var v,z,L,H,T,ie,oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na;if(((v=ce.value)==null?void 0:v.length)===0||!((z=d==null?void 0:d.itemData)!=null&&z.find(il=>(il==null?void 0:il.key)==="columnPath"))||!((L=d==null?void 0:d.itemData)!=null&&L.find(il=>(il==null?void 0:il.key)==="pageColumn")))return;let f=(ke=(K=(oe=(ie=(T=(H=d==null?void 0:d.itemData)==null?void 0:H.find(il=>(il==null?void 0:il.key)==="pageColumn"))==null?void 0:T.contents)==null?void 0:ie.split("["))==null?void 0:oe[1])==null?void 0:K.split("]"))==null?void 0:ke[0];((ra=(qe=(Ye=(ge=d==null?void 0:d.itemData)==null?void 0:ge.find(il=>(il==null?void 0:il.key)==="pageColumn"))==null?void 0:Ye.contents)==null?void 0:qe.split("["))==null?void 0:ra[0])+((za=(_a=ce.value)==null?void 0:_a.find(il=>(il==null?void 0:il.key)===f))==null?void 0:za.value),(na=(Ma=d==null?void 0:d.itemData)==null?void 0:Ma.find(il=>(il==null?void 0:il.key)==="pageGroup"))==null||na.contents,Jt(compData,d.allMapContents)},{deep:!0});const mn=f=>{var z,L,H,T,ie;const v=(L=(z=q.value)==null?void 0:z.filter(oe=>oe==null?void 0:oe.mainKey))==null?void 0:L.map(oe=>oe==null?void 0:oe.prop);if(v.length===0){const oe=(H=q.value)==null?void 0:H.map(K=>K==null?void 0:K.prop);return(T=oe==null?void 0:oe.map(K=>f==null?void 0:f[K]))==null?void 0:T.join("|")}return(ie=v==null?void 0:v.map(oe=>f==null?void 0:f[oe]))==null?void 0:ie.join("|")},Mn=f=>{var oe,K,ke,ge,Ye;const v=(K=(oe=q.value)==null?void 0:oe.filter(qe=>qe==null?void 0:qe.required))==null?void 0:K.map(qe=>qe==null?void 0:qe.prop),z=[];if(f==null||f.forEach(qe=>{v==null||v.forEach(ra=>{const _a=qe[ra];(_a==null||_a==="")&&(z.includes(ra)||z.push(ra))})}),z.length>0)return Ja.ElMessage.warning(`请填写必填项:${z.join("、")}`);const L=new Map,H=new Map;(ke=De.value)==null||ke.forEach(qe=>{const ra=mn(qe);L.set(ra,qe)}),f==null||f.forEach(qe=>{const ra=mn(qe);H.set(ra,qe)});const T=f==null?void 0:f.filter(qe=>L.has(mn(qe))),ie=(ge=De.value)==null?void 0:ge.filter(qe=>H.has(mn(qe)));return(T==null?void 0:T.length)>0&&(J.columns=(Ye=q.value)==null?void 0:Ye.filter(qe=>(qe==null?void 0:qe.label)!=="操作"),J.existRows=ie,J.tableData=T,J.show=!0),J.newRows=f==null?void 0:f.filter(qe=>{const ra=mn(qe);return!L.has(ra)}),J.newRows},rn=e.ref(""),Dn=e.ref(null),Vr=async()=>{var f,v,z,L,H,T;try{const ie=await M.quoteApi({related:[{menus:de.value,groups:d==null?void 0:d.compName}],platId:parseInt((f=wl.value)==null?void 0:f.plat_id)});if(((v=ie==null?void 0:ie.data)==null?void 0:v.code)===200){Dn.value=(z=ie==null?void 0:ie.data)==null?void 0:z.result;const oe=(L=q.value)==null?void 0:L.map(ge=>(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label)),K=Xr(oe,(H=ie==null?void 0:ie.data)==null?void 0:H.result),ke=K==null?void 0:K.flatMap(ge=>ge==null?void 0:ge.quote);(ke==null?void 0:ke.length)>0&&(rn.value=(T=ke==null?void 0:ke.map(ge=>ge==null?void 0:ge.menus))==null?void 0:T.join("、"))}}catch(ie){throw new Error(ie)}};function Xr(f,v){var z;return(z=v.filter(L=>L.struct&&Array.isArray(L.struct)?L.struct.some(H=>H.words&&Array.isArray(H.words)?H.words.some(T=>f.includes(T)):!1):!1))==null?void 0:z.map(L=>{const H={...L};return H.struct&&Array.isArray(H.struct)&&(H.struct=H.struct.filter(T=>T.words&&Array.isArray(T.words)?T.words.some(ie=>f.includes(ie)):!1)),H})}const _n=async(f,v)=>{var z,L;try{Dn.value||await Vr();const H=v==null?void 0:v.map(ie=>{const oe=Object.keys(ie),K={};return oe.forEach((ke,ge)=>{K[f[ge]]=ie[ke]}),K}),T=Mn(H);if(!T||(T==null?void 0:T.length)===0)return;J.show||await Ue(T)}catch(H){throw Ja.ElMessage.error("数据导入处理失败"),await M.pageBatchAddApi({platId:parseInt((z=wl==null?void 0:wl.value)==null?void 0:z.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(H),is_delete:!1,request_table:(L=d==null?void 0:d.related)==null?void 0:L.find(T=>T==null?void 0:T.includes("content")),request_type:"error"}]}]}),new Error(H)}},In=async f=>{var T,ie,oe,K,ke,ge,Ye;let v=ae.value;v!=null&&v.find(qe=>(f==null?void 0:f.key)===(qe==null?void 0:qe.key))&&(v=v==null?void 0:v.filter(qe=>(f==null?void 0:f.key)!==(qe==null?void 0:qe.key))),v.push({key:f==null?void 0:f.key,value:[(ie=f==null?void 0:f.value)==null?void 0:ie[((T=f==null?void 0:f.value)==null?void 0:T.length)-1]]});let z=me.value;z=z==null?void 0:z.map(qe=>{var ra,_a;return(qe==null?void 0:qe.type)==="Select"&&(f==null?void 0:f.key)===(qe==null?void 0:qe.prop)&&Array.isArray(qe.value)&&(ra=qe.value)!=null&&ra.every(za=>typeof za=="string")&&(qe.selectValue=(_a=v==null?void 0:v.find(za=>(za==null?void 0:za.key)===(qe==null?void 0:qe.prop)))==null?void 0:_a.value),qe});let L=(K=(oe=z==null?void 0:z.find(qe=>(qe==null?void 0:qe.prop)===(f==null?void 0:f.key)))==null?void 0:oe.optionUrl)==null?void 0:K.menuId,H=z==null?void 0:z.find(qe=>(qe==null?void 0:qe.prop)===(f==null?void 0:f.key));if(L){let qe=await Tt(H==null?void 0:H.optionUrl,L),ra,_a=X.value,za=(Ye=(ge=(ke=me.value)==null?void 0:ke.find(Ma=>{var na;return(na=H==null?void 0:H.optionUrl)==null?void 0:na.menuId}))==null?void 0:ge.selectValue)==null?void 0:Ye[0];if(qe==null||qe.forEach(Ma=>{var na,il,Sa,tl,be,Va,xa,Ya,Ra,Be;if(L){let Q=(il=(na=me.value)==null?void 0:na.find(fa=>{var B,Ia;return((B=H==null?void 0:H.optionUrl)==null?void 0:B.menuId)===((Ia=fa==null?void 0:fa.optionUrl)==null?void 0:Ia.menuId)}))==null?void 0:il.prop,He=(tl=(Sa=z==null?void 0:z.find(fa=>(fa==null?void 0:fa.prop)===Q))==null?void 0:Sa.selectValue)==null?void 0:tl[0];Q!=null&&Q.includes("·")&&(Q=(be=Q==null?void 0:Q.split("·"))==null?void 0:be[0],He=(Ra=(Ya=(xa=f==null?void 0:f.value)==null?void 0:xa[((Va=f==null?void 0:f.value)==null?void 0:Va.length)-1])==null?void 0:Ya.split(" "))==null?void 0:Ra[0]),_a!=null&&_a.find(fa=>(fa==null?void 0:fa.value)===za)?ra=(Be=_a==null?void 0:_a.find(fa=>(fa==null?void 0:fa.value)===za))==null?void 0:Be.objectValue:Ma[Q]===He&&(ra=Ma)}}),ra){let Ma=z;Ma=Ma==null?void 0:Ma.map(na=>{var il,Sa,tl,be,Va,xa;return L&&(ra!=null&&ra[na==null?void 0:na.prop])&&ya.value==="新增"&&(na==null?void 0:na.prop)!==(H==null?void 0:H.prop)?na.value=(ra==null?void 0:ra[na==null?void 0:na.prop])||(ra==null?void 0:ra[(be=(tl=(Sa=(il=na==null?void 0:na.optionUrl)==null?void 0:il.groupSelect)==null?void 0:Sa[1])==null?void 0:tl.replaceAll("[",""))==null?void 0:be.replaceAll("]","")]):na.value=(xa=(Va=me.value)==null?void 0:Va.find(Ya=>(Ya==null?void 0:Ya.prop)===(na==null?void 0:na.prop)))==null?void 0:xa.value,na}),me.value=Ma}}ae.value=v},$i=async(f,v)=>{var z,L,H,T,ie;if((z=f==null?void 0:f.toString())!=null&&z.includes(".txt")||(L=f==null?void 0:f.toString())!=null&&L.includes(".cpt")||(H=f==null?void 0:f.toString())!=null&&H.includes(".cyd")){const oe=await Ja.axios.get(f,{responseType:"blob",headers:{"Content-Type":"application/json"}}),K=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"});let ke=URL.createObjectURL(K);Oe.value=[{name:(ie=f==null?void 0:f.split("/"))==null?void 0:ie[((T=f==null?void 0:f.split("/"))==null?void 0:T.length)-1],blobUrl:ke}],We.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&U("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{$n.value=!1;let f=Ul.value;Ul.value=f+1});const gi=e.reactive({prop:"",order:null}),Fo=e.computed(()=>{const f=(De.value??[]).slice(),v=gi.prop||ve.prop,z=gi.order||ve.order;if(!v||!z)return f;const L=z==="ascending",H=ie=>{if(v)return ie&&Object.prototype.hasOwnProperty.call(ie,v)?ie[v]:v.includes(".")?v.split(".").reduce((oe,K)=>oe==null?oe:oe[K],ie):ie==null?void 0:ie[v]},T=ie=>{if(ie==null)return{ok:!1,value:NaN};if(typeof ie=="number")return{ok:Number.isFinite(ie),value:ie};const oe=String(ie).trim();if(oe==="")return{ok:!1,value:NaN};const K=oe.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(K))return{ok:!1,value:NaN};const ke=Number(K);return{ok:Number.isFinite(ke),value:ke}};return f.sort((ie,oe)=>{const K=H(ie),ke=H(oe);if(K==null&&ke==null)return 0;if(K==null)return L?-1:1;if(ke==null)return L?1:-1;const ge=T(K),Ye=T(ke);if(ge.ok&&Ye.ok)return L?ge.value-Ye.value:Ye.value-ge.value;const qe=be=>{if(be==null)return{ok:!1,value:NaN};const Va=String(be).trim();if(Va==="")return{ok:!1,value:NaN};const xa=Va.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!xa)return{ok:!1,value:NaN};const Ya=xa[1]?-1:1,Ra=Number(xa[2]),Be=Number(xa[3]),Q=Number(xa[4]);return[Ra,Be,Q].some(He=>Number.isNaN(He))?{ok:!1,value:NaN}:Be>=60||Q>=60?{ok:!1,value:NaN}:{ok:!0,value:Ya*(Ra*3600+Be*60+Q)}},ra=qe(K),_a=qe(ke);if(ra.ok&&_a.ok)return L?ra.value-_a.value:_a.value-ra.value;const za=new Date(K).getTime(),Ma=new Date(ke).getTime(),na=!Number.isNaN(za),il=!Number.isNaN(Ma);if(na&&il)return L?za-Ma:Ma-za;const Sa=String(K),tl=String(ke);return L?Sa.localeCompare(tl):tl.localeCompare(Sa)})}),On=e.computed(()=>{var z;const f=(fe.currentPage-1)*fe.pageSize,v=f+fe.pageSize;return U("getSliceContLength",fe),(z=Fo.value)==null?void 0:z.slice(f,v)}),Po=f=>{fe.currentPage=f,U("getSliceContLength",fe)},jo=f=>{var L;fe.pageSize=f;const v=((L=De.value)==null?void 0:L.length)??0,z=f>0?Math.ceil(v/f):1;fe.currentPage>z&&(fe.currentPage=z||1,Ja.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),U("getSliceContLength",fe)},Ho=({prop:f,order:v})=>{gi.prop=f,gi.order=v,fe.currentPage=1};function lo(f){const v=[];function z(L,H=""){L.forEach(T=>{T.children&&T.children.length>0?z(T.children,T.prop):v.push(T.prop)})}return z(f),v}const ro=(f,v)=>{var oe,K,ke,ge;let z=(K=(oe=q.value)==null?void 0:oe.map(Ye=>Ye==null?void 0:Ye.prop))==null?void 0:K.filter(Ye=>Ye!=="operate");((ke=q.value)==null?void 0:ke.some(Ye=>{var qe;return((qe=Ye==null?void 0:Ye.children)==null?void 0:qe.length)>0}))&&(z=lo((ge=q.value)==null?void 0:ge.filter(Ye=>(Ye==null?void 0:Ye.prop)!=="operate")));let H;if(H=(f==null?void 0:f.length)===(z==null?void 0:z.length)?f:f.slice(0,z==null?void 0:z.length),!(H==null?void 0:H.every(Ye=>z==null?void 0:z.find(qe=>Ye===qe))))return Ja.ElMessage.error("导入的数据表头不匹配");_n(H,v)},dn=(f,v)=>{var H;const z=f==null?void 0:f.filter(T=>T!=="序号"),L=v==null?void 0:v.map(T=>{const ie=Object.entries(T);return ie.shift(),Object.fromEntries(ie)});Ge.setRefreshCurStructure(!1),((H=q.value)==null?void 0:H.length)===0||ro(z,L)},Uo=(f,v,z,L)=>{const H=[],T=[],ie=ke=>Object.keys(ke).length;for(const ke in f)if(f[ke]!==void 0){const ge=f[ke],Ye=[];for(const[qe,ra]of Object.entries(ge))Ye.push(ra),T.length<ie(ge)&&T.push(qe);H.push(Ye)}H.unshift(T);const oe=le.utils.aoa_to_sheet(H),K=le.utils.book_new();le.utils.book_append_sheet(K,oe,L),le.writeFileSync(K,`${v}.xlsx`),Rr.value=[]},no=async(f,v,z,L=!1,H)=>{try{Ge.setRefreshCurStructure(!1)}catch(T){Ja.ElMessage.error(T)}},qo=async(f,v)=>{await no()},Wo=async(f,v)=>{await no("columnType",v,f,!1)},Ko=async({newRow:f,targetIndex:v})=>{var H;if(!Ta(d.config,{type:ga.TABLE}))return;const L=(fe.currentPage-1)*fe.pageSize+(v??0);f._isTemp=!0;try{(f.sort===void 0||f.sort===null||String(f.sort).trim()==="")&&(f.sort=si(L,De.value||[]))}catch{}De.value.splice(L,0,f),await e.nextTick(),p.value.has(f.id)||p.value.set(f.id,M.cloneDeep(f)),De.value=(H=De.value)==null?void 0:H.map(T=>({...T,tableEditType:(T==null?void 0:T.id)===f.id?"edit":(T==null?void 0:T.tableEditType)??"text"})),o.value.add(f.id),Kl.value=!0},Go=(f,v,z,L=[])=>(!Array.isArray(v)||v.length===0||v.forEach(H=>{const T=H==null?void 0:H.prop;if(!T)return;let ie=f==null?void 0:f[T];if(ie==null||String(ie).trim()==="")return;ie=String(ie);const oe=new Set([...(Array.isArray(z)?z:[]).filter(ge=>(ge==null?void 0:ge.id)!==(f==null?void 0:f.id)).map(ge=>ge==null?void 0:ge[T]).filter(ge=>ge!=null).map(ge=>String(ge)),...(Array.isArray(L)?L:[]).map(ge=>ge==null?void 0:ge[T]).filter(ge=>ge!=null).map(ge=>String(ge))]);if(!oe.has(ie))return;let K=1,ke="";for(;ke=`${ie}(${K})`,!!oe.has(ke);)K++;f[T]=ke}),f),Vi=async()=>{var H,T,ie,oe,K,ke,ge,Ye;const f=Array.from(o.value||[]);if(f.length===0)return;const v=(T=le.getColumnChild((H=M.cloneDeep(q.value))==null?void 0:H.filter(qe=>(qe==null?void 0:qe.label)!=="操作")))==null?void 0:T.filter(qe=>(qe==null?void 0:qe.required)===!0);if((v==null?void 0:v.length)>0)for(let qe=0;qe<f.length;qe++){const ra=f[qe],_a=(ie=De.value)==null?void 0:ie.find(za=>(za==null?void 0:za.id)===ra);if(_a)for(let za=0;za<v.length;za++){const Ma=v[za],na=Ma==null?void 0:Ma.prop,il=(Ma==null?void 0:Ma.label)??na,Sa=_a==null?void 0:_a[na];if(Sa===""||Sa===null||Sa===void 0||Array.isArray(Sa)&&Sa.length===0){Ja.ElMessage.error(`${il}不能为空`);let be={};be.id=_a==null?void 0:_a.id;const Va={fixContent:[be],buttonName:"修改",relatedContents:d==null?void 0:d.related,name:d==null?void 0:d.compName,columns:q.value};U("change",Va);return}}}const z=[],L=[];if(f.forEach(qe=>{var il;const ra=(il=De.value)==null?void 0:il.find(Sa=>(Sa==null?void 0:Sa.id)===qe);if(!ra)return;if(ra!=null&&ra._isTemp){const tl=(le.getAllLeafNodes(q.value)||[]).filter(Be=>(Be==null?void 0:Be.mainKey)===!0||(Be==null?void 0:Be.isMainKey)===!0),be=De.value.findIndex(Be=>(Be==null?void 0:Be.id)===qe),Va=be>=0?be+1:De.value.length+1;Go(ra,tl,De.value,z);const xa={id:Va.toString()};(ra==null?void 0:ra.sort)!==void 0&&(ra==null?void 0:ra.sort)!==null&&String(ra.sort).trim()!==""?xa.sort=String(ra.sort):xa.sort=si(be>=0?be:De.value.length-1,De.value||[]),(le.getAllLeafNodes(q.value)||[]).filter(Be=>(Be==null?void 0:Be.type)!=="operate"&&(Be==null?void 0:Be.label)!=="操作"&&(Be==null?void 0:Be.prop)!=="operate").forEach(Be=>{const Q=Be==null?void 0:Be.prop;if(Q){const He=ra[Q];He!==void 0?xa[Q]=He??"":xa[Q]=""}}),z.push(xa);return}const za=(le.getAllLeafNodes(q.value)||[]).filter(Sa=>(Sa==null?void 0:Sa.type)!=="operate"&&(Sa==null?void 0:Sa.label)!=="操作"&&(Sa==null?void 0:Sa.prop)!=="operate"),Ma=new Set(za.map(Sa=>Sa==null?void 0:Sa.prop).filter(Boolean)),na={};for(const Sa of Ma)Object.prototype.hasOwnProperty.call(ra,Sa)&&(na[Sa]=ra[Sa]);L.push({id:ra.id,value:{tableData:na}})}),Ge.setTableLoading(d==null?void 0:d.index),L.length>0){const qe=L.map(_a=>{const za={id:_a.id,..._a.value.tableData};return delete za._isOCRRow,delete za._ocrTableId,delete za._isTemp,delete za.tableEditType,delete za.index,za}),ra=[{tableName:((oe=d==null?void 0:d.related)==null?void 0:oe.find(_a=>_a==null?void 0:_a.includes("content")))??"content_"+(d==null?void 0:d.index),tableContents:qe}];try{await M.pageBatchUpdateApi({platId:parseInt((K=wl.value)==null?void 0:K.plat_id),changeContents:ra})}catch(_a){Ja.ElMessage.error(((ge=(ke=_a==null?void 0:_a.response)==null?void 0:ke.data)==null?void 0:ge.message)||(_a==null?void 0:_a.message)||"保存失败"),Ge.setTableLoading(!1);return}}if(z.length>0){const qe={fixContent:z,buttonName:"新增",relatedContents:d==null?void 0:d.related,name:d==null?void 0:d.compName,columns:q.value};U("change",qe)}Ja.ElMessage.success("保存成功"),o.value.clear(),p.value.clear(),De.value=(Ye=De.value)==null?void 0:Ye.map(qe=>({...qe,tableEditType:"text"})),Kl.value=!1,Ge.setRefreshCurStructure(!0)},Yo=()=>{var v;const f=Array.from(o.value||[]);if(f.length===0){Kl.value=!1;return}f.forEach(z=>{var T,ie;const L=p.value.get(z),H=(T=De.value)==null?void 0:T.find(oe=>(oe==null?void 0:oe.id)===z);if(H!=null&&H._isTemp){De.value=De.value.filter(oe=>(oe==null?void 0:oe.id)!==H.id);return}if(L){const oe=(ie=De.value)==null?void 0:ie.findIndex(K=>(K==null?void 0:K.id)===z);oe!==-1&&(De.value[oe]={...De.value[oe],...L})}}),o.value.clear(),p.value.clear(),De.value=(v=De.value)==null?void 0:v.map(z=>({...z,tableEditType:"text"})),Kl.value=!1},bi=e.ref(!1),oi=async f=>{var H,T,ie,oe;if(!Kl.value||f!=null&&f.isComposing||(f==null?void 0:f.key)!=="Enter")return;const v=f==null?void 0:f.target;if(((T=(H=v==null?void 0:v.tagName)==null?void 0:H.toLowerCase)==null?void 0:T.call(H))==="textarea")return;const L=document.getElementById("excel-table");L&&!L.contains(v)||((ie=v==null?void 0:v.blur)==null||ie.call(v),(oe=f.preventDefault)==null||oe.call(f),await e.nextTick(),await Vn())},Vn=async()=>{if(ee.value){Kl.value=!1;return}if(!bi.value){bi.value=!0;try{Array.from(o.value||[]).length>0?await Vi():Kl.value=!1}finally{Promise.resolve().then(()=>{bi.value=!1})}}},ki=f=>{Rr.value=f},Jo=(f,v)=>{qr.value===v?En.value=!1:En.value=!0,qr.value=v==null?void 0:v.changeProp},io=f=>{if(!f)return;const{item:v,value:z}=f,L=me.value.find(H=>H.prop==v.prop);L&&L.contents.push({label:z,value:z})},Xn=e.computed(()=>{var z,L,H;const f=(z=q.value)==null?void 0:z.some(T=>T==null?void 0:T.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",f?"inline-block":"none"),(H=(L=q.value)==null?void 0:L.filter(T=>(T==null?void 0:T.label)!=="操作"))==null?void 0:H.map(T=>({...T,filterable:!!(T!=null&&T.filterable),showSummary:!!(T!=null&&T.showSummary),operable:!!(T!=null&&T.operable),fixed:T==null?void 0:T.fixed}))}),Fi=async(f,v,z)=>{const L=M.cloneDeep(q.value);await e.nextTick();const H=L==null?void 0:L.map(ie=>(z==null?void 0:z.label)===(ie==null?void 0:ie.label)?{...ie,[v]:f}:ie),T=Un(H);await Bs(d.index,T),q.value=H,Z.value=T},Un=f=>{var H;const v=f||[];return((H=le.getAllLeafNodes(v)||[])==null?void 0:H.filter(T=>(T==null?void 0:T.prop)&&(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate")).map(T=>{const{prop:ie}=T;return H0(ie,T)})},Xo=async f=>{let v=await q0(d.index);v||(v=Un(f)),Z.value=v},Zo=async(f,v)=>{const z=M.cloneDeep(q.value),L=ie=>Array.isArray(ie)?ie.map(oe=>{const K=Array.isArray(oe==null?void 0:oe.children)&&oe.children.length>0,ke={...oe};return(ke==null?void 0:ke.prop)==="operate"||(ke==null?void 0:ke.label)==="操作"||(ke==null?void 0:ke.type)==="operate"?(ke.sortable=!1,ke.filterable=!1,ke.operable=!1):ke.sortable=K?!1:!!f,K&&(ke.children=L(ke.children)),ke}):ie,H=L(z),T=Un(H);await Bs(d.index,T),q.value=H,Z.value=T,await e.nextTick(),Ul.value=Ul.value+1},Qo=()=>{Ze.value=!1},et=f=>{U("clickTrigger",f)},oo=async f=>{var T,ie,oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa;const v=f==null?void 0:f.row,z=f==null?void 0:f.rowData,L=f==null?void 0:f.suffix;if((T=v==null?void 0:v.toString())!=null&&T.includes(".urdf")||f!=null&&f.isUrdf||L!=null&&L.includes(".urdf")){if(v.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(W(v)){const be={files:[Ke(v)],data:{}};we(be);return}Le.value=[{url:v,extension:_e(v)}],N.value=!0,se.value={data:M.cloneDeep(z)},te.value=!0;return}let H=[];if((ie=v==null?void 0:v.toString())!=null&&ie.includes(".stl")||(oe=v==null?void 0:v.toString())!=null&&oe.includes(".STL")||(K=v==null?void 0:v.toString())!=null&&K.includes(".obj")||(ke=v==null?void 0:v.toString())!=null&&ke.includes(".mtl")){const tl=(ge=v==null?void 0:v.toString())==null?void 0:ge.split(","),be=la(tl),Va=be==null?void 0:be[0];if(W(Va==null?void 0:Va.extension)){we({files:be,data:{}});return}Le.value=be,N.value=!1,te.value=!0;return}if((Ye=v==null?void 0:v.toString())!=null&&Ye.includes(".stl")||(qe=v==null?void 0:v.toString())!=null&&qe.includes(".STL")||(ra=v==null?void 0:v.toString())!=null&&ra.includes(".obj")||(_a=v==null?void 0:v.toString())!=null&&_a.includes(".mtl")||L!=null&&L.includes(".stl")||L!=null&&L.includes(".STL")||L!=null&&L.includes(".obj")||L!=null&&L.includes(".mtl")){let tl,be=[],Va={};if(Array.isArray(v)?tl=v:tl=v==null?void 0:v.split(","),tl==null||tl.forEach(xa=>{xa.includes(".mtl")?be.push(xa):Va.blob=Va.blob?Va.blob+","+xa:xa}),(be==null?void 0:be.length)>0&&(Va.mtlBlobs=be),L&&(Va.suffix=L),(Ma=(za=Object.values(Va))==null?void 0:za[0])!=null&&Ma.includes("http:"))H.push(Va);else{const xa=new Blob([Va.blob],{type:"application/octet-stream;charset=UTF-8"});let Ya=URL.createObjectURL(xa),Ra="";(na=v==null?void 0:v.split("/"))==null||na.forEach((Be,Q)=>{var He;Q===((He=v==null?void 0:v.split("/"))==null?void 0:He.length)-1&&(Ra=Be)}),(il=Va.blob)!=null&&il.includes(".stl")&&(Ra=(Ra==null?void 0:Ra.replaceAll(">",""))+".urdf"),Oe.value=[{name:Ra,blobUrl:Ya}],We.value=!0}}else{const tl=await Ja.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),be=new Blob([tl.data],{type:"application/octet-stream;charset=UTF-8"});let Va=URL.createObjectURL(be),xa="";if((Sa=v==null?void 0:v.split("/"))==null||Sa.forEach((Ya,Ra)=>{var Be;Ra===((Be=v==null?void 0:v.split("/"))==null?void 0:Be.length)-1&&(xa=Ya)}),W(xa)){const Ya=ue(xa),Ra=Ke(v);we({files:[Ra],data:{trackFileType:Ya}});return}Oe.value=[{name:xa,blobUrl:Va}],We.value=!0}(H==null?void 0:H.length)>0&&n.setBlobUrls(H)},ti=f=>{var L,H,T,ie;if(f!=null&&f.downloadUrl)return f==null?void 0:f.name;const v=(ie=(L=f==null?void 0:f.url)==null?void 0:L.split("."))==null?void 0:ie[((T=(H=f==null?void 0:f.url)==null?void 0:H.split("."))==null?void 0:T.length)-1];return(f==null?void 0:f.name)+"."+v},xi=f=>{if(!f)return"未知文件";try{const L=ti(f);if(typeof L=="string"&&L.includes("."))return L}catch{}const v=(f==null?void 0:f.fileName)||(f==null?void 0:f.name)||"未知文件",z=(f==null?void 0:f.suffix)||"";return v.includes(".")?v:`${v}${z}`},to=f=>{if(f==null||typeof f=="number"||typeof f!="string")return f;const v=f.match(/^(\d+)\_(\d+)$/);if(!v)return f;const z=Number(v[1]),L=Number(v[2]);return!Number.isFinite(z)||!Number.isFinite(L)?f:String(z*1e3+L)},Fn=f=>{if(f==null)return null;const v=String(f).trim();if(!v)return null;const z=Number(v);return Number.isFinite(z)?z:null},at=f=>{if(f==null)return null;const v=String(f).trim();if(!v)return null;if(/^\d+$/.test(v)){const H=Number(v);return Number.isFinite(H)?v.length<=10?H*1e3:H:null}const z=v.includes("T")?v:v.replace(" ","T"),L=Date.parse(z);return Number.isFinite(L)?L:null},wi=(f,v=[])=>{const z=Array.isArray(f)?f.slice():[];if(z.length<=1)return z;const L=new Map((v||[]).map((ie,oe)=>[String(ie),oe])),H=z.some(ie=>Fn(ie==null?void 0:ie.sort)!==null),T=z.map((ie,oe)=>({r:ie,idx:oe,id:String((ie==null?void 0:ie.id)??""),sortVal:Fn(ie==null?void 0:ie.sort),createTimeMs:at(ie==null?void 0:ie.create_time),prevIdx:L.has(String(ie==null?void 0:ie.id))?L.get(String(ie==null?void 0:ie.id)):Number.POSITIVE_INFINITY}));return T.sort((ie,oe)=>{if(H){const ge=ie.sortVal,Ye=oe.sortVal;if(ge===null&&Ye!==null)return 1;if(ge!==null&&Ye===null)return-1;if(ge!==null&&Ye!==null&&ge!==Ye)return ge-Ye}const K=ie.createTimeMs,ke=oe.createTimeMs;return K!==null&&ke!==null&&K!==ke?ke-K:K!==null&&ke===null?-1:K===null&&ke!==null?1:ie.prevIdx!==oe.prevIdx?ie.prevIdx-oe.prevIdx:ie.idx-oe.idx}),T.map(ie=>ie.r)},si=(f,v=[])=>{const z=v==null?void 0:v[f-1],L=v==null?void 0:v[f],H=Fn(z==null?void 0:z.sort),T=Fn(L==null?void 0:L.sort);let ie=null;H!==null&&T!==null&&T>H?ie=(H+T)/2:H!==null?ie=H+1:T!==null?ie=Math.max(T-1,0):ie=(f??0)+1;const oe=Number(ie.toFixed(6));return String(Number.isFinite(oe)?oe:ie)},lt=async f=>{let v=null,z=null;if(f!=null&&f.id){const H=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const T=await M.platformDownloadFile(f);v=URL.createObjectURL(T.data),z=xi(f)}finally{H.close()}}else if(f!=null&&f.downloadUrl){const H=await _i(),T=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ie=await Ja.axios.post(f==null?void 0:f.url,null,{responseType:"blob",headers:{Authorization:H,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{T.close()}),oe=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(oe),z=f==null?void 0:f.name}else{const H=await M.platformDownloadFile({url:f==null?void 0:f.url});!f.url.toUpperCase().includes(".OBJ")&&!f.url.toUpperCase().includes(".STL")&&!f.url.toUpperCase().includes(".MTL")&&!f.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(H.data),z=ti(f)):v=f==null?void 0:f.url}if(W(v)){const H={row:`${v}`,suffix:_e(z)};oo(H);return}const L={name:z,blobUrl:v};Oe.value=[L],We.value=!0},so=async f=>{let v=null,z=null;if(f!=null&&f.id){const T=await M.platformDownloadFile(f);v=URL.createObjectURL(T.data),z=xi(f)}else if(f!=null&&f.downloadUrl){const T=await _i(),ie=await Ja.axios.post(f==null?void 0:f.url,null,{responseType:"blob",headers:{Authorization:T,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),oe=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(oe),z=f==null?void 0:f.name}else{const T=await M.platformDownloadFile({url:f==null?void 0:f.url});v=URL.createObjectURL(T.data),z=ti(f)}const L={name:z,blobUrl:v},H=document.createElement("a");H.href=L.blobUrl,H.download=L.name,H.style.display="none",document.body.appendChild(H),H.click(),setTimeout(()=>{document.body.removeChild(H)},100)},ci=(f,v)=>{var L;if(Object.values(v).length===0)return;let z=f;return Object.values(v).find(H=>{var T,ie,oe;return((T=H==null?void 0:H.toString())==null?void 0:T.includes(".txt"))||((ie=H==null?void 0:H.toString())==null?void 0:ie.includes(".cpt"))||((oe=H==null?void 0:H.toString())==null?void 0:oe.includes(".obj"))})?z=[...f,ne.value]:(L=d==null?void 0:d.config)!=null&&L.allowMove&&(z=[...f,{label:"迁移"}]),z},Pn=()=>{P.value=!0},co=e.ref([]),Pi=async(f,v,z=!1)=>{var ie,oe,K,ke;if(!f)return;if(z){De.value=[...Na.value.values()].filter(ge=>Object.values(ge).some(Ye=>typeof Ye=="string"?Ye==null?void 0:Ye.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let L={};for(let ge in f)(f==null?void 0:f[ge])!==""&&(L[ge]=f==null?void 0:f[ge]);if(JSON.stringify(L)==="{}"){De.value=Array.from(((ie=Na.value)==null?void 0:ie.values())??[]);return}let H=(oe=d==null?void 0:d.related)==null?void 0:oe.find(ge=>ge==null?void 0:ge.includes("content_")),T=await M.getFillFind({platId:parseInt((K=wl==null?void 0:wl.value)==null?void 0:K.plat_id),tableName:H,params:L});T=(ke=T==null?void 0:T.data)==null?void 0:ke.result,De.value=T,Ge.setTableLoading(!1)},rt=e.computed(()=>{var v,z;return((z=(v=d==null?void 0:d.itemData)==null?void 0:v.find(L=>(L==null?void 0:L.key)==="isEdit"))==null?void 0:z.contents)??!0}),nt=async f=>{var H,T,ie,oe,K,ke;if(!Ta(d.config,{type:ga.TABLE})||!(((T=(H=d==null?void 0:d.itemData)==null?void 0:H.find(ge=>(ge==null?void 0:ge.key)==="isEdit"))==null?void 0:T.contents)??!0))return;let z=(oe=(ie=u.value)==null?void 0:ie.find(ge=>{var Ye;return(Ye=ge==null?void 0:ge.key)==null?void 0:Ye.includes("@EditRead")}))==null?void 0:oe.content;if((z==null?void 0:z.length)>0){let ge=Ds(z,f);if((ge==null?void 0:ge.length)>0)return}if(!f)return;((K=Array.from(o.value))==null?void 0:K.length)>0&&await Vi();const L=f==null?void 0:f.id;L!=null&&(o.value.clear(),p.value.clear(),p.value.has(L)||p.value.set(L,M.cloneDeep(f)),De.value=(ke=De.value)==null?void 0:ke.map(ge=>({...ge,tableEditType:(ge==null?void 0:ge.id)===L?"edit":"text"})),o.value.add(L),Kl.value=!0)},uo=async(f,v,z,L)=>{L!=null&&L.isExistChild&&U("clickMainKey",f,z,q.value)},it=()=>{We.value=!1},ot=f=>{U("rowClick",f)};e.watch(()=>d.changedContent,()=>{var z,L;if(!d.changedContent)return;let f=(z=De.value)==null?void 0:z.map(H=>{var T;return H.id===((T=d.changedContent)==null?void 0:T.id)&&(H={...d.changedContent,id:d.changedContent.newId?d.changedContent.newId:d.changedContent.id},delete H.newId),H});const v=(L=d.itemData)==null?void 0:L.map(H=>((H==null?void 0:H.key)==="tableContents"&&(H.contents=f),H));De.value=f,U("contentChange",{contents:v,index:d.index}),U("change",{content:f,index:d==null?void 0:d.index,buttonName:"",id:d==null?void 0:d.index})},{deep:!0,immediate:!0});const tt=()=>{},st=async()=>{const f=de.value,v=sessionStorage.getItem("systemKey"),z=await le.getItemData(f,v,""),L=(z==null?void 0:z.find(oe=>(oe==null?void 0:oe.name)==="方法明细"))||(z==null?void 0:z[0]),H=(L==null?void 0:L.compData)||[],T=H==null?void 0:H.find(oe=>{const K=oe==null?void 0:oe.key;return K==="formContent"||K==="tableContents"});return T==null?void 0:T.contents},_i=async()=>{const v=Ja.Local.get("access-token");return v?`Bearer ${v}`:""},ct=async(f,{token:v,inputData:z}={})=>await Ja.axios.post(f,z,{headers:{Authorization:v}}).catch(H=>(Ie.setImportLoading(!1),Promise.reject(H))),ut=f=>{var L;let v={};const z=[];return v.form={},(L=M.cloneDeep(f))==null||L.forEach((H,T)=>{var ie,oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa;if((H==null?void 0:H.comp)==="Table"){(oe=(ie=H==null?void 0:H.compData)==null?void 0:ie.find(xa=>(xa==null?void 0:xa.key)==="header"))==null||oe.contents;let tl=(ge=(ke=(K=H==null?void 0:H.compData)==null?void 0:K.find(xa=>(xa==null?void 0:xa.key)==="tableContents"))==null?void 0:ke.contents)==null?void 0:ge.map(xa=>xa.slice(1));(za=(_a=(ra=(qe=(Ye=H==null?void 0:H.compData)==null?void 0:Ye.find(xa=>(xa==null?void 0:xa.key)==="header"))==null?void 0:qe.contents)==null?void 0:ra[0])==null?void 0:_a[0])==null||za.label;let be=(na=(Ma=H==null?void 0:H.compData)==null?void 0:Ma.find(xa=>(xa==null?void 0:xa.key)==="header"))==null?void 0:na.contents,Va=[];tl==null||tl.forEach(xa=>{let Ya=[];xa==null||xa.forEach((Ra,Be)=>{var He;let Q={};((He=be[Be])==null?void 0:He.label)!=="操作"&&(Q[be[Be].label]=Ra,Ya.push(Q))}),Va.push(Ya)}),v[H.name]=Va}else{const tl=(Sa=(il=H.compData)==null?void 0:il.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:Sa.contents;tl==null||tl.forEach(be=>{var Va,xa;if(be.prop!==""){let Ya=be==null?void 0:be.value;Array.isArray(Ya)?Ya=((Va=Ya==null?void 0:Ya[0])==null?void 0:Va.oldUrl)||"http://222.92.178.198:62001/"+((xa=Ya==null?void 0:Ya[0])==null?void 0:xa.url):Ya=Ya.toString(),be={key:(be==null?void 0:be.prop)??(be==null?void 0:be.label),value:Ya},z.push(be)}})}}),v.form=le.getFormContents(z),v},s=f=>{const v=[],z=L=>{L&&typeof L=="object"&&!Array.isArray(L)?Object.values(L).forEach(z):v.push(L)};return z(f),v},t=async(f,v,z)=>{var be,Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl;Ie.setImportLoading(!0),Ge.setFreshContent(!1);let L=await st().catch(qa=>(Ie.setImportLoading(!1),Promise.reject(qa)));L=L==null?void 0:L.filter(qa=>{var Dl;return((Dl=qa==null?void 0:qa.find($a=>$a==null?void 0:$a.id))==null?void 0:Dl.id)===(v==null?void 0:v.id)});let H=le.getEqualChild([(be=q.value)==null?void 0:be.filter(qa=>(qa==null?void 0:qa.label)!=="操作")]);const T=(xa=(Va=le.tableToForm(L,H))==null?void 0:Va[0])==null?void 0:xa.find(qa=>{const Dl=qa==null?void 0:qa.key;return Dl==="Interface"||Dl==="方法体"}),ie=T==null?void 0:T.value;if(!ie){console.log("未搜索到isMain, 缺少算法执行接口"),Ie.setImportLoading(!1);return}const oe=q.value?le.getEqualChild([q.value]):[],K=oe.find(qa=>{const Dl=qa==null?void 0:qa.prop;return Dl==="Input1"||Dl==="输入数据.输入1"||Dl==="样本输入数据"}),ke=K==null?void 0:K.prop;let ge=v==null?void 0:v[ke];const Ye=await _i().catch(qa=>(Ie.setImportLoading(!1),Promise.reject(qa)));let qe=!0,ra="";(Ya=q.value)==null||Ya.forEach(qa=>{(qa==null?void 0:qa.prop)===ke&&(qe=!!(qa!=null&&qa.childPath),ra=qa==null?void 0:qa.childPath)});let _a="";if(qe){let qa=(Be=(Ra=q.value)==null?void 0:Ra.find(fl=>(fl==null?void 0:fl.isMainKey)===!0))==null?void 0:Be.prop;_a=v==null?void 0:v[qa];let Dl=ra==null?void 0:ra.split(I),$a=[];Dl==null||Dl.forEach((fl,Il)=>{(Dl==null?void 0:Dl.length)-1===Il&&$a.push(_a),$a.push(fl)}),$a=$a==null?void 0:$a[0];let $l=await le.getItemData($a,sessionStorage.getItem("systemKey"),""),nl=$l==null?void 0:$l.filter(fl=>(fl==null?void 0:fl.name)===ke);nl=nl==null?void 0:nl.map(fl=>{var Il;return fl.compData=(Il=fl==null?void 0:fl.compData)==null?void 0:Il.map(gl=>{var _r;return(gl==null?void 0:gl.key)==="tableContents"&&(gl.contents=(_r=gl==null?void 0:gl.contents)==null?void 0:_r.filter(pr=>(pr==null?void 0:pr[1])===(v==null?void 0:v[ke]))),gl}),fl}),(!nl||(nl==null?void 0:nl.length)===0)&&(nl=$l,nl=nl==null?void 0:nl.map(fl=>{var Il;return fl.compData=(Il=fl==null?void 0:fl.compData)==null?void 0:Il.map(gl=>{var _r;return(gl==null?void 0:gl.key)==="tableContents"&&(gl.contents=(_r=gl==null?void 0:gl.contents)==null?void 0:_r.filter(pr=>{var ir,xl;return(pr==null?void 0:pr[1])===(v==null?void 0:v[(xl=(ir=q==null?void 0:q.value)==null?void 0:ir[0])==null?void 0:xl.prop])})),gl}),fl})),ge=ut(nl)}const za=await ct(ie,{token:Ye,inputData:ge}).catch(qa=>(Ie.setImportLoading(!1),Promise.reject(qa))),Ma=(Q=za==null?void 0:za.data)==null?void 0:Q.data,na=oe.find(qa=>(qa==null?void 0:qa.prop)==="Output1"),il=na==null?void 0:na.prop;let Sa=[],tl=[];if(Ma&&((He=Object.values(Ma))==null?void 0:He.length)>0){let qa=[];const Dl=new FormData,$a=(fa=s(Ma))==null?void 0:fa.map(async nl=>{var fl,Il;if(!Array.isArray(nl)&&(nl!=null&&nl.includes("http"))){let gl=await Ja.axios.get(nl,{responseType:"blob"}),_r=(Il=nl==null?void 0:nl.split("/"))==null?void 0:Il[((fl=nl==null?void 0:nl.split("/"))==null?void 0:fl.length)-1];Dl.append("files",gl.data,_r)}else qa.push(nl)});if(await Promise.all($a),!le.isFormDataEmpty(Dl)){let nl=await dl.uploadAmountApi(Dl),fl=(Ia=(B=nl==null?void 0:nl.data)==null?void 0:B.result)==null?void 0:Ia.map(Il=>{var gl,_r,pr,ir,xl,Yl;return{name:(Yl=(xl=(ir=(gl=Il==null?void 0:Il.url)==null?void 0:gl.split("/"))==null?void 0:ir[((pr=(_r=Il==null?void 0:Il.url)==null?void 0:_r.split("/"))==null?void 0:pr.length)-1])==null?void 0:xl.split("."))==null?void 0:Yl[0],url:Il==null?void 0:Il.url}});qa=[...qa,...fl]}let $l={};for(let nl in v)nl!=="id"&&($l[nl]=v[nl]);$l[il]=qa,tl.push({id:v==null?void 0:v.id,value:{tableData:$l}})}if((tl==null?void 0:tl.length)>0){const qa=tl.map($a=>{const $l={id:$a.id,...$a.value.tableData};return delete $l._isOCRRow,delete $l._ocrTableId,delete $l._isTemp,delete $l.tableEditType,delete $l.index,$l}),Dl=[{tableName:(Ua=d==null?void 0:d.related)==null?void 0:Ua.find($a=>$a==null?void 0:$a.includes("content")),tableContents:qa}];await M.pageBatchUpdateApi({platId:parseInt((sl=wl.value)==null?void 0:sl.plat_id),changeContents:Dl})}if((Sa==null?void 0:Sa.length)>0)try{await M.pageBatchAddApi({platId:parseInt((Ka=wl.value)==null?void 0:Ka.plat_id),changeContents:[{tableName:(Ba=d==null?void 0:d.related)==null?void 0:Ba.find(qa=>qa==null?void 0:qa.includes("content")),tableContents:Sa.map(qa=>{var $a,$l,nl;const Dl={id:(($a=qa==null?void 0:qa.key)==null?void 0:$a.id)??(($l=qa==null?void 0:qa.key)==null?void 0:$l.rowId)??(qa==null?void 0:qa.id),...((nl=qa==null?void 0:qa.value)==null?void 0:nl.tableData)||{}};return delete Dl._isOCRRow,delete Dl._ocrTableId,delete Dl._isTemp,delete Dl.tableEditType,delete Dl.index,Object.keys(Dl).forEach(fl=>{fl==="证书附件"&&Array.isArray(Dl[fl])&&(Dl[fl]=JSON.stringify(Dl[fl]))}),Dl})}]})}catch(qa){Ja.ElMessage.error(((Wl=(ul=qa==null?void 0:qa.response)==null?void 0:ul.data)==null?void 0:Wl.message)||(qa==null?void 0:qa.message)||"保存失败"),Ge.setTableLoading(!1);return}Ui(!0),Ie.setImportLoading(!1),Ge.setFreshContent(!0)},h=(f,v)=>(f=f==null?void 0:f.map(z=>{var L,H;return z!=null&&z.children&&((L=z.children)!=null&&L.find(T=>T.id===(v==null?void 0:v.id))?z.children=(H=z.children)==null?void 0:H.filter(T=>(T==null?void 0:T.id)!==(v==null?void 0:v.id)):z.children=h(z.children,v)),z}),f),k=e.ref(!1),C=()=>{k.value=!0},F=async f=>{var z,L,H,T;k.value=!1;const v=Array.isArray(f)?f:f?[f]:[];if(v.length!==0)for(const ie of v){const oe={name:ie.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(ie),raw:ie,uid:Date.now()+Math.random()};ka.value.push(oe),yn(oe,"uploading"),Qr(oe,0);try{const K=new FormData;K.append("file",ie,oe.name);const ke=await M.platformUploadFile(K);oe.uploadResult=((z=ke==null?void 0:ke.data)==null?void 0:z.result)||{name:oe.name,url:"",fileName:oe.name},ll({name:((L=oe.uploadResult)==null?void 0:L.name)||oe.name,url:((H=oe.uploadResult)==null?void 0:H.url)||"",id:(T=oe.uploadResult)==null?void 0:T.id}),yn(oe,"uploaded"),Qr(oe,100)}catch(K){console.error("文件上传失败:",K),Ja.ElMessage.error(`文件 ${oe.name} 上传失败,请重试`),yn(oe,"pending"),Qr(oe,0);const ke=ka.value.findIndex(ge=>ge.uid===oe.uid);ke>-1&&ka.value.splice(ke,1)}}},G=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:d==null?void 0:d.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(f,v,z)=>{v===(d==null?void 0:d.index)?z(new Error("选择源不能和目标源一致")):z()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),J=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:""}),xe=()=>{J.show=!1},Ue=async f=>{var v,z,L,H,T,ie,oe,K;try{const ke=[];let ge=(v=De.value||[])==null?void 0:v.slice();(f||[]).forEach(za=>{const Ma={...za};try{Ma.sort=si(0,ge)}catch{}ke.push(Ma),ge.unshift(Ma)});let Ye=await M.quoteApi({platId:parseInt((z=wl==null?void 0:wl.value)==null?void 0:z.plat_id),type:"fatherSyncs",related:[{menus:de.value,groups:""},{menus:de.value,groups:d==null?void 0:d.compName}]});Ye=(L=Ye==null?void 0:Ye.data)==null?void 0:L.result;let qe=Ye==null?void 0:Ye.map(za=>({tableName:"content_"+(za==null?void 0:za.id),tableContents:ke==null?void 0:ke.map((Ma,na)=>({id:na,...Ma}))})),ra=[{tableName:(H=d==null?void 0:d.related)==null?void 0:H.find(za=>za==null?void 0:za.includes("content")),tableContents:ke==null?void 0:ke.map((za,Ma)=>({id:Ma,...za}))}];ra=[...ra,...qe];const _a=await M.pageBatchAddApi({platId:parseInt((T=wl.value)==null?void 0:T.plat_id),changeContents:ra});if(((ie=_a==null?void 0:_a.data)==null?void 0:ie.code)===200){const za={buttonName:"新增",columns:q.value,fixContent:ke==null?void 0:ke.map((na,il)=>({id:il,...na})),relatedContents:d==null?void 0:d.related};await zt(za),Ja.ElMessage.success("数据导入成功");let Ma=[];ra==null||ra.forEach(na=>{var il;(il=na==null?void 0:na.tableContents)==null||il.forEach(Sa=>{Ma.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Sa),request_result:"{}",is_delete:!1,request_table:na==null?void 0:na.tableName,request_type:"export"})})}),await M.pageBatchAddApi({platId:parseInt((oe=wl==null?void 0:wl.value)==null?void 0:oe.plat_id),changeContents:[{tableName:"log",tableContents:Ma}]})}else{let za=[];ra==null||ra.forEach(Ma=>{var na;(na=Ma==null?void 0:Ma.tableContents)==null||na.forEach(il=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(il),request_result:"{}",is_delete:!1,request_table:Ma==null?void 0:Ma.tableName,request_type:"error"})})}),await M.pageBatchAddApi({platId:parseInt((K=wl==null?void 0:wl.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:za}]}),Ja.ElMessage.error("数据导入响应失败")}}catch(ke){throw new Error(ke)}},Se=async f=>{var v,z,L,H,T,ie,oe,K,ke,ge;try{if(f==="cancel"&&(J.show=!1),f==="replace"&&((v=J==null?void 0:J.existRows)==null?void 0:v.length)>0){await M.pageBatchDeleteApi({platId:parseInt((z=wl.value)==null?void 0:z.plat_id),changeContents:[{tableName:((L=d==null?void 0:d.related)==null?void 0:L.find(qe=>qe==null?void 0:qe.includes("content_")))||((H=d==null?void 0:d.related)==null?void 0:H.find(qe=>qe==null?void 0:qe.includes("content"))),tableContents:J==null?void 0:J.existRows}]});const Ye=await M.pageBatchAddApi({platId:parseInt((T=wl.value)==null?void 0:T.plat_id),changeContents:[{tableName:(ie=d==null?void 0:d.related)==null?void 0:ie.find(qe=>qe==null?void 0:qe.includes("content")),tableContents:(()=>{const qe=(De.value||[]).filter(Ma=>!((J==null?void 0:J.existRows)||[]).some(na=>String(na==null?void 0:na.id)===String(Ma==null?void 0:Ma.id))),ra=(J==null?void 0:J.tableData)||[],_a=[];let za=qe.slice();return ra.forEach(Ma=>{const na={...Ma};try{na.sort=si(0,za)}catch{}_a.push(na),za.unshift(na)}),_a.map((Ma,na)=>({id:na,...Ma}))})()}]});if(((oe=Ye==null?void 0:Ye.data)==null?void 0:oe.code)!==200)return;(K=J.newRows)!=null&&K.length&&await Ue(J.newRows),await zt({buttonName:"新增",columns:q.value,fixContent:(ke=J==null?void 0:J.tableData)==null?void 0:ke.map((qe,ra)=>({id:ra,...qe})),relatedContents:d==null?void 0:d.related}),(ge=J.newRows)!=null&&ge.length||Ja.ElMessage.success("数据导入成功")}}catch(Ye){throw new Error(Ye)}finally{J.show=!1,J.columns=[],J.tableData=[],J.existRows=[]}},sa=()=>{G.show=!1},Oa=f=>{var v,z;if((f==null?void 0:f.buttonName)==="取消")return G.show=!1;G.to=f==null?void 0:f.content,!(!(d!=null&&d.index)||!((v=G.to)!=null&&v.groupName))&&(d==null?void 0:d.index)!==((z=G.to)==null?void 0:z.groupName)&&(U("change",{buttonName:"迁移",value:{from:G.from,to:G.to,data:G.selectRow}}),G.show=!1)},rl=async f=>{var v,z,L,H;if(f){if(!wr.validateFileSize(f.raw)){Ja.ElMessage.warning(`文件大小不能超过 ${Yr.value.maxSize}MB`);const T=ka.value.findIndex(ie=>ie.uid===f.uid);T>-1&&ka.value.splice(T,1),el();return}if(!wr.validateFileType(f.raw)){Ja.ElMessage.warning("请上传图片文件");const T=ka.value.findIndex(ie=>ie.uid===f.uid);T>-1&&ka.value.splice(T,1),el();return}yn(f,"uploading"),Qr(f,0);try{const T=new FormData;T.append("file",f.raw,f.name);const ie=await M.platformUploadFile(T);f.uploadResult=((v=ie==null?void 0:ie.data)==null?void 0:v.result)||{name:f.name,url:"",fileName:f.name},ll({name:((z=f.uploadResult)==null?void 0:z.name)||f.name,url:((L=f.uploadResult)==null?void 0:L.url)||"",id:(H=f.uploadResult)==null?void 0:H.id}),yn(f,"uploaded"),Qr(f,100)}catch(T){console.error("文件上传失败:",T),Ja.ElMessage.error(`文件 ${f.name} 上传失败,请重试`),yn(f,"pending"),Qr(f,0);const ie=ka.value.findIndex(oe=>oe.uid===f.uid);ie>-1&&ka.value.splice(ie,1)}finally{el()}}},el=()=>{e.nextTick(()=>{const f=document.querySelector('.ocr-upload-input input[type="file"]');f&&(f.value="")})},cl=async()=>{var z,L;if(sessionStorage.setItem("ocr_root_table_id",String((d==null?void 0:d.index)??"")),ka.value.length===0){Ja.ElMessage.warning("请先选择要上传的图片");return}if(ka.value.filter(H=>{const T=Gl(H);return T!=="uploaded"&&T!=="completed"&&T!=="failed"}).length>0){Ja.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}br.value=!0,$e.value=0;let v=null;try{ka.value.forEach(na=>{yn(na,"processing")});const H=Math.floor(Math.random()*10)+90;v=setInterval(()=>{$e.value<H?$e.value+=1:clearInterval(v)},50);const T=ka.value.map(na=>{var il,Sa,tl;return{name:((il=na.uploadResult)==null?void 0:il.name)||na.name,url:((Sa=na.uploadResult)==null?void 0:Sa.url)||"",fileName:((tl=na.uploadResult)==null?void 0:tl.fileName)||na.name}}),ie=wr.extractTableHeaders(q.value),oe=T.map(na=>({name:(na==null?void 0:na.fileName)||(na==null?void 0:na.name),url:(na==null?void 0:na.url)||""})),K=await wr.recognize(oe,ie);if(console.log(K,"ocrResult"),clearInterval(v),v=null,(K==null?void 0:K.code)===500||(K==null?void 0:K.type)==="error"||!(K!=null&&K.result)){$e.value=0,ka.value.forEach(na=>{yn(na,"failed"),Qr(na,0)}),Ja.ElMessage.error((K==null?void 0:K.message)||"OCR识别失败,请重试"),br.value=!1;return}$e.value=H;const ke=Array.isArray(K==null?void 0:K.result)?K.result:[];if(ke.length===0){$e.value=0,ka.value.forEach(na=>{yn(na,"failed"),Qr(na,0)}),Ja.ElMessage.warning("OCR识别未返回有效数据"),br.value=!1;return}const ge=new Set,Ye=[];ke.forEach((na,il)=>{const Sa=na!=null&&na.数据&&typeof(na==null?void 0:na.数据)=="object"?na.数据:{},tl=Array.isArray(na==null?void 0:na.图片信息)?na.图片信息:[],be=new Map;tl.forEach(xa=>{xa!=null&&xa.name&&be.set(xa.name,xa.url||"")});const Va={_index:il,_certType:(na==null?void 0:na.证书类型)||"",_certNo:(na==null?void 0:na.证书编号)||"",_ocrImages:tl,__ocrFieldMeta:{}};Object.entries(Sa).forEach(([xa,Ya])=>{let Ra="",Be=0,Q=[],He="";Ya&&typeof Ya=="object"&&!Array.isArray(Ya)?(Ra=(Ya==null?void 0:Ya.value)??"",Be=(Ya==null?void 0:Ya.score)??0,Q=Array.isArray(Ya==null?void 0:Ya.bboxNorm)?Ya==null?void 0:Ya.bboxNorm:[],He=(Ya==null?void 0:Ya.imageName)||""):Array.isArray(Ya)&&Ya.length>=2?(Ra=Ya[0]??"",Be=Ya[1]??0):(Ra=Ya??"",Be=0),Va[xa]=Ra,Va[`${xa}_accuracy`]=Be,ge.add(xa),Va.__ocrFieldMeta[xa]={value:Ra,score:Be,bboxNorm:Q,imageName:He,imageUrl:He&&be.get(He)||"",images:tl}}),Ye.push(Va)});const qe=[],ra=new Set;Ye.forEach(na=>{na&&ge.forEach(il=>{const Sa=na[`${il}_accuracy`];(typeof Sa=="number"?Sa>0:Sa!=null&&String(Sa).trim()!==""&&String(Sa)!=="0")&&ra.add(il)})}),ge.forEach(na=>{qe.push({prop:na,label:na,editable:!0,minWidth:230}),ra.has(na)&&qe.push({prop:`${na}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),ka.value.forEach(na=>{yn(na,"completed")}),$e.value=100,Ee.value=qe,wa.value=Ye,yl.value=T,zl.value=K;const _a=["出厂编号","设备名称","制造厂"],za=qe.filter(na=>na&&!na.isAccuracy&&typeof na.prop=="string").map(na=>na.prop),Ma=["出厂编号","设备名称","制造厂"];pa.value=za.filter(na=>Ma.includes(na)),console.log("[OCR] 默认勾选字段 props:",pa.value),aa.value=2,br.value=!1,ha.value=!1}catch(H){console.error("OCR处理失败:",H),v&&(clearInterval(v),v=null),Ja.ElMessage.error(((L=(z=H==null?void 0:H.response)==null?void 0:z.data)==null?void 0:L.message)||"OCR识别失败,请重试"),br.value=!1,$e.value=0,ka.value.forEach(T=>{yn(T,"pending"),Qr(T,0)})}},Cl=f=>{if(f==null)return"";let v=String(f);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,z=>String.fromCharCode(z.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},_l=()=>{var na,il;const f=yl.value,v=zl.value,z=wa.value;if(!z||z.length===0){Ja.ElMessage.warning("暂无数据可添加");return}const L=(na=le.getAllLeafNodes(q.value)||[])==null?void 0:na.filter(Sa=>(Sa==null?void 0:Sa.type)!=="operate"&&(Sa==null?void 0:Sa.label)!=="操作"&&(Sa==null?void 0:Sa.prop)!=="operate"),H=new Map,T=new Map,ie=(il=L==null?void 0:L.find(Sa=>(Sa==null?void 0:Sa.label)==="证书附件"))==null?void 0:il.prop;L==null||L.forEach(Sa=>{Sa!=null&&Sa.label&&(Sa!=null&&Sa.prop)&&(H.set(Sa.label,Sa.prop),T.set(Sa.prop,Sa.label))});const oe=Date.now(),K=Sa=>String(oe*1e3+Sa),ke=[],ge=[],Ye=Sa=>{const tl=No&&No[Sa]||[Sa];for(const be of tl){const Va=H.get(be);if(Va)return Va}return""},qe=Ye("出厂编号"),ra=Ye("设备名称"),_a=Ye("制造厂"),za=[],Ma=Sa=>{var Ra,Be;if(!ie)return[];const tl=(Array.isArray(f)?f[Sa]:null)||null,be=(tl==null?void 0:tl.url)||"",Va=(tl==null?void 0:tl.fileName)||(tl==null?void 0:tl.name)||"";return(String(Va).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf"))&&be?[{url:be,name:Va,fileName:Va}]:(Array.isArray((Be=(Ra=v==null?void 0:v.result)==null?void 0:Ra[Sa])==null?void 0:Be.图片信息)?v.result[Sa].图片信息:[]).map(Q=>({url:(Q==null?void 0:Q.url)||"",name:(Q==null?void 0:Q.name)||"",fileName:(Q==null?void 0:Q.name)||""})).filter(Q=>Q.url)};if(z.forEach((Sa,tl)=>{var sl;const be={id:K(tl),_isOCRRow:!0,_ocrTableId:d==null?void 0:d.index};for(const[Ka,Ba]of H.entries())Object.prototype.hasOwnProperty.call(Sa,Ka)&&(be[Ba]=Sa[Ka]);ie&&(be[ie]=Ma(tl));const Va=(Array.isArray(v==null?void 0:v.result)?v.result[tl]:null)||null,xa=(Array.isArray(f)?f[tl]:null)||null,Ya=(xa==null?void 0:xa.url)||"",Ra=(xa==null?void 0:xa.fileName)||(xa==null?void 0:xa.name)||"",Be=String(Ra).toLowerCase().endsWith(".pdf")||String(Ya).toLowerCase().endsWith(".pdf"),Q={ts:Date.now(),versionId:String(Date.now())+"_"+String(tl),label:new Date().toLocaleString(),certType:(Va==null?void 0:Va.证书类型)||"",certNo:(Va==null?void 0:Va.证书编号)||"",fileType:Be?"pdf":"image",sourceUrl:Be?Ya:"",images:Array.isArray(Va==null?void 0:Va.图片信息)?Va.图片信息.map(Ka=>({name:(Ka==null?void 0:Ka.name)||"",url:(Ka==null?void 0:Ka.url)||""})).filter(Ka=>Ka.url):[]},He=Ka=>Cl(Ka?be==null?void 0:be[Ka]:""),fa=He(qe),B=He(ra),Ia=He(_a);if(!!(qe&&ra&&_a&&fa&&B&&Ia)){const Ka=(De.value||[]).find(Ba=>{const ul=Cl(qe?Ba==null?void 0:Ba[qe]:""),Wl=Cl(ra?Ba==null?void 0:Ba[ra]:""),qa=Cl(_a?Ba==null?void 0:Ba[_a]:"");return ul&&Wl&&qa&&ul===fa&&Wl===B&&qa===Ia});if(Ka){za.push({idx:tl,ocrRow:be,versionItem:Q,ocrNo:fa,candidates:[Ka],selectedTargetId:String((Ka==null?void 0:Ka.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(fa&&qe){const Ka=(De.value||[]).filter(Ba=>{const ul=Cl(qe?Ba==null?void 0:Ba[qe]:"");return ul&&ul===fa});if(Ka.length>0){za.push({idx:tl,ocrRow:be,versionItem:Q,ocrNo:fa,candidates:Ka,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(be.sort===void 0||be.sort===null||String(be.sort).trim()===""){const Ka=(De.value||[]).map(ul=>Fn(ul==null?void 0:ul.sort)).filter(ul=>ul!==null),Ba=Ka.length>0?Math.max(...Ka):((sl=De.value)==null?void 0:sl.length)??0;be.sort=String(Number((Ba+1).toFixed(6)))}}catch{}Jl(d==null?void 0:d.index,be.id,Q),za.push({idx:tl,ocrRow:be,versionItem:Q,ocrNo:fa,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(za||[]).length>0){kl.value=(za||[]).map(Sa=>({...Sa,selectedTargetId:(Sa==null?void 0:Sa.selectedTargetId)||""})),Pe.value=!0,cr.value=ge,Cr.value=ke,ea.value=v,La.value=f,Bl.value=ie||"";return}},Vl=(f,v,z)=>{wa.value[f]&&(wa.value[f][v]=z)},Ql=f=>f==null||f===0?"-":`${(Number(f)*100).toFixed(1)}%`,dr=f=>{if(f==null||f===0)return"#909399";const v=Number(f);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},ql=f=>{var z,L,H,T;if(Ha.value===f){Ha.value=null,Ca.value=!1,va.value="";return}Ha.value=f,va.value="";const v=(z=wa.value)==null?void 0:z[f];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){Aa.value=v._ocrImages.map(K=>({name:(K==null?void 0:K.name)||"",url:(K==null?void 0:K.url)||""})).filter(K=>K.name||K.url);const ie=v.__ocrFieldMeta||{},oe=(L=Object.values(ie))==null?void 0:L.find(K=>K==null?void 0:K.imageName);pl.value=(oe==null?void 0:oe.imageName)||((T=(H=Aa.value)==null?void 0:H[0])==null?void 0:T.name)||"",Ca.value=Aa.value.length>0}else Aa.value=[],Ca.value=!1,pl.value=""},nr=()=>{bl.value=!1,ka.value=[],ol.value=null,aa.value=1,Pa.value.clear(),Ga.value.clear(),$e.value=0,Ca.value=!1},pn=f=>f.raw?URL.createObjectURL(f.raw):f.url?f.url:"",Gl=f=>{const v=f.uid||f.name;return Pa.value.get(v)||"pending"},gn=f=>{const v=f.uid||f.name;return Ga.value.get(v)||0},Qr=(f,v)=>{const z=f.uid||f.name;Ga.value.set(z,Math.min(100,Math.max(0,v)))},Ln=f=>{const v=Gl(f),z=100.53;if(v==="completed"||v==="uploaded")return`${z} ${z}`;if(v==="failed")return`${z} ${z}`;if(v==="uploading"){const L=gn(f);return`${z*(L/100)} ${z}`}else if(v==="processing")return`${z*.5} ${z}`;return`0 ${z}`},yn=(f,v)=>{const z=f.uid||f.name;Pa.value.set(z,v),(v==="completed"||v==="uploaded")&&Qr(f,100)},ui=()=>{e.nextTick(()=>{const f=document.querySelector('.ocr-upload-input input[type="file"]');if(f)f.value="",f.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 z=>{const L=Array.from(z.target.files||[]);for(const H of L){const T={name:H.name,raw:H,uid:Date.now()+Math.random()};ka.value.push(T),await rl(T)}z.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},_u=()=>{aa.value>1&&aa.value--},Su=()=>{aa.value===1?ka.value.length>0&&!br.value&&cl():aa.value===2&&(_l(),aa.value=3)},Eu=async f=>{await Pt(f==null?void 0:f.row)},Cu=async({row:f,prop:v})=>{!f||!v||await Pt(f,v)},Pt=async(f,v)=>{var H,T;const z=f==null?void 0:f.id;if(!z){Ja.ElMessage.warning("暂无可预览数据");return}let L=Wa(d==null?void 0:d.index,z);if(!L||L.length===0){const ie=sessionStorage.getItem("ocr_root_table_id"),oe=ie!==null?Number(ie):null;if(oe!=null&&oe!==""&&!Number.isNaN(oe)){const K=Wa(oe,z);Array.isArray(K)&&K.length>0&&(Hl(d==null?void 0:d.index,z,K),L=K)}}if(!L||L.length===0){const ie=(H=le.getAllLeafNodes(q.value)||[])==null?void 0:H.filter(K=>(K==null?void 0:K.type)!=="operate"&&(K==null?void 0:K.label)!=="操作"&&(K==null?void 0:K.prop)!=="operate"),oe=v||((T=ie==null?void 0:ie.find(K=>(K==null?void 0:K.label)==="证书附件"))==null?void 0:T.prop);if(oe&&f[oe]){const K=f[oe];let ke=[],ge="",Ye=!1;if(typeof K=="string")try{const qe=JSON.parse(K);Array.isArray(qe)&&(ke=qe.map(ra=>({name:(ra==null?void 0:ra.name)||(ra==null?void 0:ra.fileName)||"",url:(ra==null?void 0:ra.url)||""})).filter(ra=>ra.url||ra.name),ke.length>0&&(ge=ke[0].url||"",Ye=String(ke[0].name).toLowerCase().endsWith(".pdf")||String(ge).toLowerCase().endsWith(".pdf")))}catch{ge=K,Ye=String(K).toLowerCase().endsWith(".pdf"),ke=[{name:K,url:K}]}else Array.isArray(K)&&(ke=K.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),ke.length>0&&(ge=ke[0].url||"",Ye=String(ke[0].name).toLowerCase().endsWith(".pdf")||String(ge).toLowerCase().endsWith(".pdf")));if(ke.length>0||ge){const qe={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:f.证书类型||"",certNo:f.证书编号||"",fileType:Ye?"pdf":"image",sourceUrl:Ye?ge:"",images:ke};L=[qe],Jl(d==null?void 0:d.index,z,qe)}}}if(!L||L.length===0){Ja.ElMessage.warning("暂无可预览数据");return}Nl.value=L,hl.value=!0},Du=f=>{ka.value=ka.value.filter((v,z)=>z!==f)},dt=async(f,v,z)=>{var L,H,T,ie,oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya;if(Ta(d.config,{type:ga.TABLE,tableOperate:f})){if(da.value="",Te.value=!0,ja.value=!0,U("onButtonClick",f,v),X.value=[],f==="删除")M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ra,Be,Q,He;(Ra=De.value)!=null&&Ra.find(fa=>(fa==null?void 0:fa.id)===(v==null?void 0:v.id))?De.value=(Be=M.cloneDeep(De.value))==null?void 0:Be.filter(fa=>(fa==null?void 0:fa.id)!==(v==null?void 0:v.id)):De.value=h(M.cloneDeep(De.value),v);try{v!=null&&v.id&&((He=(Q=Na.value)==null?void 0:Q.has)!=null&&He.call(Q,v==null?void 0:v.id))&&Na.value.delete(v.id)}catch{}v0(Xl.value,El.value,v==null?void 0:v.id),Ge.setTableLoading(d==null?void 0:d.index),U("change",{content:De.value,fixContent:[v],index:d==null?void 0:d.index,type:"delete",name:d==null?void 0:d.groupNames,buttonName:f,columns:q.value,relatedContents:d==null?void 0:d.related}),console.log(v,"item")});else if(f==="批量删除"){if(((L=Rr.value)==null?void 0:L.length)===0)return Ja.ElMessage.warning("请先勾选操作的数据");M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var Q,He,fa,B,Ia;const Ra=(Q=Rr.value)==null?void 0:Q.map(Ua=>Ua.id);De.value=(He=M.cloneDeep(De.value))==null?void 0:He.filter(Ua=>!(Ra!=null&&Ra.includes(Ua.id))),Ge.setTableLoading(d==null?void 0:d.index),U("change",{content:De.value,fixContent:Rr.value,index:d==null?void 0:d.index,type:"delete",name:d==null?void 0:d.compName,buttonName:f,relatedContents:d==null?void 0:d.related,columns:q.value});const Be=(Ra||[]).filter(Boolean);if(Be.length>0&&Be.every(Ua=>Ua!=null&&Ua!=="")){const Ua=(Rr.value||[]).map(sl=>{const Ka={...sl};return delete Ka._isOCRRow,delete Ka._ocrTableId,delete Ka._isTemp,delete Ka.tableEditType,delete Ka.index,Ka});await M.pageBatchDeleteApi({platId:parseInt((fa=wl.value)==null?void 0:fa.plat_id),changeContents:[{tableName:((B=d==null?void 0:d.related)==null?void 0:B.find(sl=>sl==null?void 0:sl.includes("content_")))||((Ia=d==null?void 0:d.related)==null?void 0:Ia.find(sl=>sl==null?void 0:sl.includes("content"))),tableContents:Ua}]})}})}else if(f==="复制新增"){ya.value="复制新增",M.cloneDeep(v);const Ra=(H=q.value)==null?void 0:H.find(Be=>Be==null?void 0:Be.isMainKey);Ra||((T=q.value)==null||T[0]),lr.value=v,Ui(!0)}else if(f==="新增")ya.value="新增",ji(""),Ze.value=!0;else if(f==="编辑")ya.value="编辑",ji(v),Ze.value=!0;else if(f==="查看")ya.value="查看",ji(v),Te.value=!1,ja.value=!1,Ze.value=!0;else if(f==="查看三维模型"){const Ra={};for(let Q in v)Q!=="id"&&(Ra[Q]=v[Q]);let Be=(ie=Object.values(Ra))==null?void 0:ie[1];Ea.setTableShowThree(Be)}else if(f==="切换视图")Fu();else if(((oe=z==null?void 0:z.extra)==null?void 0:oe.type)==="modelExample")ya.value=f,pe.value=!0;else if(f==="新建"){let Ra=ca.value,Be=[];for(let Ia in Ra)Ia!=null&&Ia.includes(`loading${((K=wl.value)==null?void 0:K.account)||((ke=wl.value)==null?void 0:ke.账号)}`)&&(Be=[...Be,...Ia]);let Q=[];for(let Ia in Ra)Ia!=null&&Ia.includes(`updateLoading${((ge=wl.value)==null?void 0:ge.account)||((Ye=wl.value)==null?void 0:Ye.账号)}`)&&(Q=[...Q,...Ia]);let He=Be==null?void 0:Be.map(Ia=>Ia==null?void 0:Ia.id);const fa=Q==null?void 0:Q.map(Ia=>Ia==null?void 0:Ia.id);He=[...M.cloneDeep(He),...fa],(He==null?void 0:He.length)>0&&(He!=null&&He.every(Ia=>Ia!==null&&Ia))&&await Zr.batchDeleteInsofDataApi({ids:He});const B=(qe=Ne.value)==null?void 0:qe.find(Ia=>(Ia==null?void 0:Ia.label)==="新建");await Nu(!1,B)}else if(f==="修改模板"){let Ra=M.cloneDeep(de).value;Ge.setRouteToChildPath(Ra),Ie.setActiveMenuPath(Ra+I)}else if(f==="执行")t(f,v);else if(f==="导出paraform"){const Ra=M.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Be=["推力","真空","压力","温度","流量"],Q=xl=>{var Yl,hr,Ll;return xl?typeof(xl==null?void 0:xl.value)=="string"?xl.value:((Ll=(hr=(Yl=xl==null?void 0:xl._custom)==null?void 0:Yl.value)==null?void 0:hr.value)==null?void 0:Ll.value)||"":""},He=Array.isArray(Zl.value)?Zl.value:[],fa=Q(He.find(xl=>(xl==null?void 0:xl.condition)==="child")),B=String(fa||"").slice(0,8),Ia=xl=>{if(xl==null)return"";const Yl=String(xl).trim();if(!Yl)return"";if(/^\d{8}$/.test(Yl))return Yl;const hr=Yl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(hr){const vr=hr[1],Er=hr[2].padStart(2,"0"),mr=hr[3].padStart(2,"0");return`${vr}${Er}${mr}`}const Ll=Yl.replace(/\D/g,"");return Ll.length>=8?Ll.slice(0,8):""},Ua=async xl=>{var Yl,hr;if(!xl)return"";try{const Ll=await Hr("试验任务/任务管理",!1),vr=(fr,Mr=[])=>{if(!Array.isArray(fr))return Mr;for(const Fr of fr)(Fr==null?void 0:Fr.comp)==="Table"&&(Fr!=null&&Fr.name)&&Mr.push(Fr),Array.isArray(Fr==null?void 0:Fr.children)&&vr(Fr.children,Mr),Array.isArray(Fr==null?void 0:Fr.tab)&&vr(Fr.tab,Mr),Array.isArray(Fr==null?void 0:Fr.choice)&&vr(Fr.choice,Mr);return Mr},mr=vr(Ll||[]).find(fr=>(fr==null?void 0:fr.name)==="任务列表"),Ar=((hr=(Yl=mr==null?void 0:mr.compData)==null?void 0:Yl.find(fr=>(fr==null?void 0:fr.key)==="tableContents"))==null?void 0:hr.contents)||[];if(!Array.isArray(Ar)||Ar.length===0)return"";const tn=Ar.find(fr=>String((fr==null?void 0:fr["试验代号(名称)"])||"").slice(0,8)===xl);return Ia(tn==null?void 0:tn.计划试验时间)}catch(Ll){return console.warn("获取任务列表计划试验时间失败:",Ll),""}},sl=(de.value||"").replace(/\/+$/,""),Ka=fa?`${sl}/${fa}`:sl,Ba=await Hr(Ka||de.value,!1),ul=String(Ve.value||"").trim(),Wl=xl=>String(xl||"").trim(),qa=(xl,Yl=[],hr="")=>{if(!Array.isArray(xl))return Yl;for(const Ll of xl){const vr=Wl((Ll==null?void 0:Ll.choiceName)||(Ll==null?void 0:Ll.name0)||hr);(Ll==null?void 0:Ll.comp)==="Table"&&(Ll==null?void 0:Ll.name)&&Be.includes(Ll.name)&&(!ul||vr===ul)&&Yl.push(Ll),Array.isArray(Ll==null?void 0:Ll.children)&&qa(Ll.children,Yl,vr),Array.isArray(Ll==null?void 0:Ll.tab)&&qa(Ll.tab,Yl,vr),Array.isArray(Ll==null?void 0:Ll.choice)&&qa(Ll.choice,Yl,vr)}return Yl},Dl=qa(Ba||[]),$a=new Map;for(const xl of Dl)xl!=null&&xl.name&&!$a.has(xl.name)&&$a.set(xl.name,xl);const $l=Be.map(xl=>$a.get(xl)).filter(Boolean);if(!$l||$l.length===0)return Ja.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const nl=xl=>{const Yl=new Map,hr=(Ll,vr=[])=>{if(Array.isArray(Ll))for(const Er of Ll){const mr=((Er==null?void 0:Er.label)??"").toString().trim(),Ar=mr?[...vr,mr]:[...vr];if(Array.isArray(Er==null?void 0:Er.children)&&Er.children.length>0)hr(Er.children,Ar);else{const fr=((Er==null?void 0:Er.prop)??"").toString();if(!fr)continue;const Mr=mr||fr,Fr=(Ar.length>0?[...vr,Mr]:[Mr]).join(".");Yl.set(fr,Fr)}}};return hr(xl,[]),Yl},fl=(xl,Yl)=>{const hr=nl(xl||[]),vr=(le.getAllLeafNodes(xl||[])||[]).filter(mr=>(mr==null?void 0:mr.prop)&&(mr==null?void 0:mr.type)!=="operate"&&(mr==null?void 0:mr.label)!=="操作"&&(mr==null?void 0:mr.prop)!=="operate"),Er=Array.isArray(Yl)?Yl:[];return Er.length===0?[]:Er.map(mr=>{const Ar={};return vr.forEach(tn=>{const fr=String(tn.prop),Mr=hr.get(fr)||String(tn.label||tn.prop);Ar[Mr]=(mr==null?void 0:mr[fr])??""}),Ar})},Il=$l.map(xl=>{var Er,mr;const Yl=(xl==null?void 0:xl.compData)||[];let hr=(Er=Yl==null?void 0:Yl.find(Ar=>(Ar==null?void 0:Ar.key)==="header"))==null?void 0:Er.contents;Array.isArray(hr==null?void 0:hr[0])&&(hr=hr[0]);const Ll=((mr=Yl==null?void 0:Yl.find(Ar=>(Ar==null?void 0:Ar.key)==="tableContents"))==null?void 0:mr.contents)||[];if(!Array.isArray(hr)||hr.length===0||!Array.isArray(Ll)||Ll.length===0)return null;const vr=fl(hr||[],Ll||[]);return!Array.isArray(vr)||vr.length===0?null:{类型:xl==null?void 0:xl.name,数据:vr}}).filter(Boolean);if(!Il||Il.length===0)return Ja.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const gl=await Ua(B),_r={试验代号:B,试验日期:gl,ParaForm:Il},pr=await _i().catch(()=>""),ir=await M.exportParaformApi(_r,pr);if(((ra=ir==null?void 0:ir.data)==null?void 0:ra.code)===200&&((za=(_a=ir==null?void 0:ir.data)==null?void 0:_a.result)!=null&&za.Excel文件)){const xl=ir.data.result.Excel文件,Yl=await M.platformDownloadFile({url:xl}),hr=new Blob([Yl.data],{type:"application/vnd.ms-excel"}),Ll=URL.createObjectURL(hr),vr=M.dayjs().format("YYYYMMDD"),mr=`${(B||"UNKNOWN").trim()||"UNKNOWN"}_${vr}_paraform.xls`,Ar=document.createElement("a");Ar.href=Ll,Ar.download=mr,Ar.style.display="none",document.body.appendChild(Ar),Ar.click(),setTimeout(()=>{document.body.removeChild(Ar),URL.revokeObjectURL(Ll)},100);const tn=Array.isArray((na=(Ma=ir==null?void 0:ir.data)==null?void 0:Ma.result)==null?void 0:na.warnings)?ir.data.result.warnings:[];if(tn.length>0){const fr=tn.map((Mr,Fr)=>`${Fr+1}. ${(Mr==null?void 0:Mr.field)||"未知字段"}:${(Mr==null?void 0:Mr.message)||""}`).join(`
24
24
  `);Ja.ElMessage.warning({message:`导出成功,但存在以下提示:
25
- ${fr}`,duration:5e3,showClose:!0})}else Ja.ElMessage.success("导出成功")}else Ja.ElMessage.error(((il=ir==null?void 0:ir.data)==null?void 0:il.message)||"导出失败")}catch(Be){console.error("导出paraform失败:",Be),Ja.ElMessage.error("导出失败:"+((Be==null?void 0:Be.message)||"未知错误"))}finally{Ra.close()}}else if(f!=null&&f.includes("导出")&&f!=="导出paraform"){if(f==="导出选中"&&((Sa=Rr.value)==null?void 0:Sa.length)===0)return Ja.ElMessage.warning(`请先勾选${f}的数据`);if(f==="导出全部"&&((tl=De.value)==null?void 0:tl.length)===0)return Ja.ElMessage.warning("暂无数据导出");let Ra=["序号",...(Va=(be=q.value)==null?void 0:be.map(fa=>fa==null?void 0:fa.prop))==null?void 0:Va.filter(fa=>fa!=="操作")],Be=f==="导出全部"?De.value:Rr.value;const Q=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Be=Be==null?void 0:Be.map(fa=>Object.fromEntries(Object.entries(fa).filter(([B])=>!Q.includes(B)))),Ra=["序号",...Ra],Be=Be==null?void 0:Be.map((fa,B)=>({序号:B+1,...fa}));let He=(d==null?void 0:d.compName)||"表格信息";Uo(Be,He,Ra,He)}else if(f==="OCR识别")bl.value=!0,ka.value=[],aa.value=1,Pa.value.clear(),Ga.value.clear(),$e.value=0;else if(f==="迁移")G.selectRow=v,G.show=!0;else if(f==="生成方法"){let Ra=await M0(v),Be;v!==""?Be=[v]:Be=M.cloneDeep(De.value),Be=Be==null?void 0:Be.map(He=>(He.输出值=Ra,He));const Q={fixContent:Be,buttonName:"编辑",relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames};U("change",Q)}else if(f==="签字板"||f==="触控笔")al.value.dialogShow=!0,al.value.dialogTitle=f;else if(((xa=z==null?void 0:z.extra)==null?void 0:xa.type)==="methodButton"){let Ra;v!==""?Ra=[v]:Ra=M.cloneDeep(De.value);const Be=await Ct(Ra,q==null?void 0:q.value,"Manual",De.value,d==null?void 0:d.calculator,d==null?void 0:d.compNames);let Q;(Ya=Be==null?void 0:Be[0])!=null&&Ya.menuPathContent?Q={fixContent:Be,buttonName:"新增",relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames}:Q={fixContent:Be,buttonName:"methodButton",relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames},U("change",Q)}}},Tu=async(f,v)=>{var z,L,H,T,ie,oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be;try{let Va,xa;const Ya=(z=ca.value[de.value+I])==null?void 0:z.filter(Ua=>{var sl;return((sl=Ua==null?void 0:Ua.key)==null?void 0:sl.type)==="structureMethod"}),Ra=(L=ca.value[de.value+I])==null?void 0:L.filter(Ua=>{var sl;return((sl=Ua==null?void 0:Ua.key)==null?void 0:sl.type)==="structure"}),Be=Ya==null?void 0:Ya.find(Ua=>{var sl,Ka;return((Ka=(sl=Ua==null?void 0:Ua.value)==null?void 0:sl.pageData)==null?void 0:Ka.method)==="保存"});if(!Be)return;const Q=(oe=(ie=ca.value[(T=(H=Be==null?void 0:Be.value)==null?void 0:H.pageData)==null?void 0:T.path])==null?void 0:ie.filter(Ua=>{var sl;return((sl=Ua==null?void 0:Ua.key)==null?void 0:sl.type)==="data"}))==null?void 0:oe.find(Ua=>{var sl,Ka,Ba,ul;return((Ka=(sl=Ua==null?void 0:Ua.value)==null?void 0:sl.tableData)==null?void 0:Ka.算法名称)===((ul=(Ba=Be==null?void 0:Be.value)==null?void 0:Ba.pageData)==null?void 0:ul.method)});if(!Q)return;const He={buttonName:(ke=(K=Be==null?void 0:Be.value)==null?void 0:K.pageData)==null?void 0:ke.method,api:(Ye=(ge=Q==null?void 0:Q.value)==null?void 0:ge.tableData)==null?void 0:Ye.算法体,content:Ra==null?void 0:Ra.map(Ua=>{var sl;return(sl=Ua==null?void 0:Ua.value)==null?void 0:sl.pageData}),extraContent:[],extraValues:(ra=(qe=Be==null?void 0:Be.value)==null?void 0:qe.pageData)==null?void 0:ra.data,methodName:(za=(_a=Be==null?void 0:Be.value)==null?void 0:_a.pageData)==null?void 0:za.path};if(!f)return;const fa={...f,compData:(Ma=f==null?void 0:f.compData)==null?void 0:Ma.map(Ua=>{var sl;return(Ua==null?void 0:Ua.key)==="formContent"?{...Ua,contents:(sl=Ua==null?void 0:Ua.contents)==null?void 0:sl.map(Ka=>(Ka==null?void 0:Ka.prop)===v?{...Ka,value:""}:Ka)}:Ua})},B={key:{pageKey:de.value+I,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:fa}},Ia=await Ja.axios.post(He.api,B,{headers:{"Content-Type":"application/json"}});return((na=Ia==null?void 0:Ia.data)==null?void 0:na.code)===200&&(Va=(Sa=(il=Ia==null?void 0:Ia.data)==null?void 0:il.result)==null?void 0:Sa.latestReportCode,xa=(be=(tl=Ia==null?void 0:Ia.data)==null?void 0:tl.result)==null?void 0:be.status),{newMainKeyValue:Va,newStatus:xa}}catch(Va){throw Ja.ElMessage.error(Va),new Error(Va)}},jt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const Bu=async(f,v,z)=>{var K,ke;let L=f==null?void 0:f[v==null?void 0:v.prop],H=1,T,ie;const oe=M.cloneDeep(de).value+I+L;if(oe){jt.value="",T=(K=ca.value[oe])==null?void 0:K.filter(qe=>{var ra;return((ra=qe==null?void 0:qe.key)==null?void 0:ra.type)==="structure"});const ge=T==null?void 0:T.find(qe=>{var ra,_a,za;return((za=(_a=(ra=qe==null?void 0:qe.value)==null?void 0:ra.pageData)==null?void 0:_a.comp)==null?void 0:za.toUpperCase())==="FORM"});ie={...(ke=ge==null?void 0:ge.value)==null?void 0:ke.pageData,id:ge==null?void 0:ge.id};const Ye=await Tu(ie,v==null?void 0:v.prop);if(jt.value=Ye==null?void 0:Ye.newStatus,Ye!=null&&Ye.newMainKeyValue)return Ye==null?void 0:Ye.newMainKeyValue}if(De.value.some(ge=>(ge==null?void 0:ge[v==null?void 0:v.prop])===L)){const ge=L;for(;De.value.some(Ye=>(Ye==null?void 0:Ye[v==null?void 0:v.prop])===`${ge}(${H})`);)H++;L=`${ge}(${H})`}return L},Nu=async(f,v,z)=>{var T,ie,oe,K;let L,H;if(await Bu(z==null?void 0:z.data,z==null?void 0:z.firstCol),L=M.cloneDeep(de).value+I,H=M.cloneDeep(L)+`loading${((T=wl.value)==null?void 0:T.account)||((ie=wl.value)==null?void 0:ie.账号)}`,v){const ke=(K=(oe=ca.value[H])==null?void 0:oe.filter(ge=>{var Ye;return((Ye=ge==null?void 0:ge.key)==null?void 0:Ye.parentTable)===""}))==null?void 0:K.map(ge=>{var Ye;return{id:ge==null?void 0:ge.id,...(Ye=ge==null?void 0:ge.value)==null?void 0:Ye.pageData}});(ke==null?void 0:ke.length)>0||await le.loadingConstruct(L,H,null,null,null),Ge.setRouteToChildPath(M.cloneDeep(de).value),Ie.setActiveMenuPath(H)}else Ge.setRouteToChildPath(M.cloneDeep(de).value),Ie.setActiveMenuPath(H)},Au=()=>{te.value=!1,Le.value=[],N.value=!1},ji=f=>{var oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra,Be,Q,He,fa;const v=[];ze.value=M.cloneDeep(q.value);let z=(K=(oe=u.value)==null?void 0:oe.find(B=>{var Ia;return(Ia=B==null?void 0:B.key)==null?void 0:Ia.includes("@EditRead")}))==null?void 0:K.content,L=!1;(z==null?void 0:z.length)>0&&(L=Ds(z,f),(L==null?void 0:L.length)>0?L=!0:L=!1),(ge=le.getColumnChild((ke=M.cloneDeep(q.value))==null?void 0:ke.filter(B=>(B==null?void 0:B.label)!=="操作")))==null||ge.forEach((B,Ia)=>{var Ua,sl,Ka;B!=null&&B.formType&&((Ua=B==null?void 0:B.formType)==null?void 0:Ua.toUpperCase())==="SELECT"||B!=null&&B.menuId?v.push({label:(sl=B==null?void 0:B.prop)!=null&&sl.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",name:(B==null?void 0:B.prop)??"t"+Ia,prop:B==null?void 0:B.prop,type:"Select",value:(f==null?void 0:f[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??Ia,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,multipleLimit:B==null?void 0:B.multipleLimit,width:2,isFormColHidden:B==null?void 0:B.isFormColHidden,relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,allSelectionContents:(B==null?void 0:B.allSelectionContents)??[],filterContent:B==null?void 0:B.filterContent,disabled:(B==null?void 0:B.prop)==="disabled"?!0:L||(B==null?void 0:B.disabled),filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly}):v.push({label:(Ka=B==null?void 0:B.prop)!=null&&Ka.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",prop:B==null?void 0:B.prop,name:(B==null?void 0:B.prop)??"t"+Ia,type:!(B!=null&&B.formType)||(B==null?void 0:B.formType)===""?"Input":B==null?void 0:B.formType,value:(B==null?void 0:B.formType)==="Upload"?(f==null?void 0:f[B==null?void 0:B.prop])??"{}":(f==null?void 0:f[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??Ia,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,width:2,isFormColHidden:B==null?void 0:B.isFormColHidden,disabled:(B==null?void 0:B.prop)==="disabled"?!0:L||(B==null?void 0:B.disabled),relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly})}),f===""||!f||(da.value=(f==null?void 0:f.id)??"");let H=le.getColumnChild((Ye=M.cloneDeep(q.value))==null?void 0:Ye.filter(B=>(B==null?void 0:B.label)!=="操作"));Qe.value&&((qe=Qe.value)==null?void 0:qe.length)>0&&(Qe.value=(ra=M.cloneDeep(Qe).value)==null?void 0:ra.map(B=>{var Ua;let Ia=(B==null?void 0:B.prop)||((Ua=H==null?void 0:H.find(sl=>(sl==null?void 0:sl.label)===(B==null?void 0:B.label)))==null?void 0:Ua.prop);return Ia&&(B.value=f[Ia]),B})),me.value=Qe.value&&((_a=Qe.value)==null?void 0:_a.length)>0?le.getTableFormToForm(Qe.value):v,me.value=((za=me.value)==null?void 0:za.map(B=>({...B,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled})))??me.value;let T=[],ie=((il=(na=(Ma=d.itemData)==null?void 0:Ma.filter(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:na[0])==null?void 0:il.contents)??"";if(ie=le.analyzeSplitToContent(ie,","),(ie==null?void 0:ie.length)>0&&(T=ie.flat()),(T==null?void 0:T.length)>0){let B=T==null?void 0:T.filter(Ba=>Ba==null?void 0:Ba.includes("@Type"));if(B=B==null?void 0:B[(B==null?void 0:B.length)-1],(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)),B){let Ba=(tl=(Sa=B==null?void 0:B.replace("=",b))==null?void 0:Sa.split(b))==null?void 0:tl[1];((be=Ba==null?void 0:Ba.trim())==null?void 0:be.toUpperCase())==="MANUAL"&&(d==null||d.index,me.value=(Va=me.value)==null?void 0:Va.map((ul,Wl)=>ul))}let Ia=(xa=me.value)==null?void 0:xa.filter(Ba=>Ba==null?void 0:Ba.mainKey),Ua;Ia==null||Ia.forEach(Ba=>{var Wl;if(Ua!==void 0)return;let ul=Ba==null?void 0:Ba.menus;((Wl=Ia==null?void 0:Ia.filter(qa=>qa==null?void 0:qa.mainKey))==null?void 0:Wl.length)>1&&(Ua=ul,Ba==null||Ba.groups)});let sl=[],Ka=new Map;if(Ia==null||Ia.forEach(Ba=>{var ul,Wl,qa,Dl,$a,$l,nl,fl,Il,gl,_r,pr,ir;if((ul=Ba==null?void 0:Ba.prop)!=null&&ul.includes(".")){let xl=[];Ka.get(((qa=(Wl=Ba==null?void 0:Ba.prop)==null?void 0:Wl.split("."))==null?void 0:qa[0])+(Ba!=null&&Ba.isMainPath?0:1)+((Dl=Ba==null?void 0:Ba.groups)==null?void 0:Dl[0]))&&(xl=Ka.get((($l=($a=Ba==null?void 0:Ba.prop)==null?void 0:$a.split("."))==null?void 0:$l[0])+(Ba!=null&&Ba.isMainPath?0:1)+((nl=Ba==null?void 0:Ba.groups)==null?void 0:nl[0]))),xl.push(Ba),Ka.set(((Il=(fl=Ba==null?void 0:Ba.prop)==null?void 0:fl.split("."))==null?void 0:Il[0])+(Ba!=null&&Ba.isMainPath?0:1)+((gl=Ba==null?void 0:Ba.groups)==null?void 0:gl[0]),xl)}else{let xl=[];Ka.get("normal"+(Ba!=null&&Ba.isMainPath?0:1)+((_r=Ba==null?void 0:Ba.groups)==null?void 0:_r[0]))&&(xl=Ka.get("normal"+(Ba!=null&&Ba.isMainPath?0:1)+((pr=Ba==null?void 0:Ba.groups)==null?void 0:pr[0]))),xl.push(Ba),Ka.set("normal"+(Ba!=null&&Ba.isMainPath?0:1)+((ir=Ba==null?void 0:Ba.groups)==null?void 0:ir[0]),xl)}}),sl=Array.from(Ka.values()),(sl==null?void 0:sl.length)>0)for(let Ba in sl){let ul=sl==null?void 0:sl[Ba];if((ul==null?void 0:ul.length)!==1){if((ul==null?void 0:ul.length)>1){let Wl=ul==null?void 0:ul.map(gl=>gl==null?void 0:gl.prop),qa=ul==null?void 0:ul.map(gl=>gl==null?void 0:gl.label),Dl=ul==null?void 0:ul.map(gl=>gl==null?void 0:gl.value),$a=(Ya=M.cloneDeep(ul))==null?void 0:Ya[0],$l=(Ra=me.value)==null?void 0:Ra.findIndex(gl=>(gl==null?void 0:gl.prop)===($a==null?void 0:$a.prop)),nl=(Be=me.value)==null?void 0:Be.slice(0,$l),fl=(He=me.value)==null?void 0:He.slice($l,(Q=me.value)==null?void 0:Q.length);$a.label=qa==null?void 0:qa.join("·"),$a.value=Dl==null?void 0:Dl.join(" "),$a.value.trim()===""&&($a.value=""),$a.prop=Wl==null?void 0:Wl.join("·");let Il=ul==null?void 0:ul.map(gl=>{var _r;return(_r=gl==null?void 0:gl.words)==null?void 0:_r.join(".")});$a.relatedWords=Il,$a.usingType="parent",fl.unshift($a),me.value=[...nl,...fl],me.value=(fa=me.value)==null?void 0:fa.map(gl=>(Wl!=null&&Wl.find(_r=>_r===(gl==null?void 0:gl.prop))&&(gl.isFormColHidden=!0,gl.relatedWords=Il),gl))}}}}},zu=()=>{var v;const f=(v=i.value)==null?void 0:v.$el;f&&Fl.Sortable.create(f,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{var ie;const{oldIndex:L,newIndex:H}=z;if(L===H)return;const T=Xn.value.splice(L,1)[0];Xn.value.splice(H,0,T),q.value=(ie=q.value)==null?void 0:ie.slice().sort((oe,K)=>{if(oe.label==="操作")return 1;if(K.label==="操作")return-1;const ke=Xn.value.findIndex(Ye=>Ye.label===oe.label),ge=Xn.value.findIndex(Ye=>Ye.label===K.label);return ke-ge})}})};e.onMounted(()=>{ua.value=window.innerWidth-240*2,window.addEventListener("keydown",oi)});const Mu=()=>{e.nextTick(()=>{zu()})},Iu=()=>{c.value=!0},pt=(f,v)=>{var L;if(!f&&!(f!=null&&f.children))return{contents:f,currentSelectContents:void 0};let z;return f.children=(L=f.children)==null?void 0:L.map(H=>{var T,ie;if((H==null?void 0:H.id)===da.value){let oe={};for(let K in H){let ke=(T=v==null?void 0:v.find(ge=>(ge==null?void 0:ge.prop)===K))==null?void 0:T.label;ke?oe[K]=(ie=lr.value)==null?void 0:ie[ke]:oe[K]=H[K]??""}H=Object.assign(oe,lr.value),z=H}else{let oe=pt(H,v);H=oe==null?void 0:oe.contents,z=oe==null?void 0:oe.currentSelectContents}return H}),{contents:f,currentSelectContents:z}},Ht=(f,v)=>{let z,L;return f!=null&&f.find(H=>(H==null?void 0:H.id)===da.value)?z=f==null?void 0:f.map(H=>{var T,ie,oe;if((H==null?void 0:H.id)===da.value){let K={};for(let ge in H){let Ye=(T=v==null?void 0:v.find(qe=>(qe==null?void 0:qe.prop)===ge))==null?void 0:T.label;Ye?K[ge]=((ie=lr.value)==null?void 0:ie[Ye])??"":K[ge]=H[ge]??""}let ke=lr.value;for(let ge in K)(oe=lr.value)!=null&&oe[ge]||(ke[ge]=(K==null?void 0:K[ge])??"");H=ke,L=H}return H}):z=f==null?void 0:f.map(H=>{var T,ie,oe,K;if((H==null?void 0:H.id)===da.value){let ke={};for(let ge in H){let Ye=(T=v==null?void 0:v.find(qe=>(qe==null?void 0:qe.prop)===ge))==null?void 0:T.label;Ye?ke[ge]=(ie=lr.value)==null?void 0:ie[Ye]:ke[ge]=H[ge]??""}H=Object.assign(ke,lr.value),L=H}else H=(oe=pt(H,v))==null?void 0:oe.contents,L=(K=pt(H,v))==null?void 0:K.currentSelectContents;return H}),{newContents:z,currentSelectContents:L}},Ut=(f,v,z)=>{var L,H;return f[v==null?void 0:v.prop]=z,typeof f.id=="number"&&(f.id=(L=f.id)==null?void 0:L.toString()),f.children&&((H=f.children)==null?void 0:H.length)>0&&(f.children=f.children.map(Ut)),f},qt=f=>{var z;const v=[];return v.push({...f}),f!=null&&f.children&&Array.isArray(f.children)&&((z=f.children)==null||z.forEach(L=>{v.push(...qt(L))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(L=>{const H={...L};return delete H.children,H}):[]},po=["Pacific6000数据采集装置.通道号","通道号"],Hi=f=>{if(!f)return"";const v=po.map(z=>f==null?void 0:f[z]).find(z=>z!=null&&String(z).trim()!=="");return v==null?"":String(v).trim()},ft=async(f,v=void 0)=>{if(!f)return!1;try{const z=ra=>{var _a,za,Ma;return ra?typeof(ra==null?void 0:ra.value)=="string"?ra.value:((Ma=(za=(_a=ra==null?void 0:ra._custom)==null?void 0:_a.value)==null?void 0:za.value)==null?void 0:Ma.value)||"":""},L=Array.isArray(Zl.value)?Zl.value:[],H=z(L.find(ra=>(ra==null?void 0:ra.condition)==="child")),T=(de.value||"").replace(/\/+$/,""),ie=H?`${T}/${H}`:T,oe=await Hr(ie||de.value,!1),K=String(Ve.value||"").trim(),ke=ra=>String(ra||"").trim(),ge=(ra,_a=[],za="")=>{if(!Array.isArray(ra))return _a;for(const Ma of ra){const na=ke((Ma==null?void 0:Ma.choiceName)||(Ma==null?void 0:Ma.name0)||za);(Ma==null?void 0:Ma.comp)==="Table"&&(!K||na===K)&&_a.push(Ma),Array.isArray(Ma==null?void 0:Ma.children)&&ge(Ma.children,_a,na),Array.isArray(Ma==null?void 0:Ma.tab)&&ge(Ma.tab,_a,na),Array.isArray(Ma==null?void 0:Ma.choice)&&ge(Ma.choice,_a,na)}return _a},Ye=ge(oe||[]),qe=String((d==null?void 0:d.compName)||"");return Ye.some(ra=>{var za,Ma;const _a=((Ma=(za=ra==null?void 0:ra.compData)==null?void 0:za.find(na=>(na==null?void 0:na.key)==="tableContents"))==null?void 0:Ma.contents)||[];return!Array.isArray(_a)||_a.length===0?!1:_a.some(na=>{if(String((ra==null?void 0:ra.name)||"")===qe&&(na==null?void 0:na.id)===v)return!1;const Sa=Hi(na);return!!Sa&&Sa===f})})}catch{return(De.value||[]).some(L=>{if((L==null?void 0:L.id)===v)return!1;const H=Hi(L);return!!H&&H===f})}},Ui=async(f=!0,v,z)=>{var ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl;if(lr.value){const $a=(ge=le.getColumnChild((ke=M.cloneDeep(q.value))==null?void 0:ke.filter(nl=>(nl==null?void 0:nl.label)!=="操作")))==null?void 0:ge.filter(nl=>(nl==null?void 0:nl.required)===!0);for(let nl=0;nl<(($a==null?void 0:$a.length)??0);nl++){const fl=$a[nl],Il=fl==null?void 0:fl.prop,gl=(fl==null?void 0:fl.label)??Il,_r=(Ye=lr.value)==null?void 0:Ye[Il];if(_r===""||_r===null||_r===void 0||Array.isArray(_r)&&_r.length===0){Ja.ElMessage.error(`${gl}不能为空`);return}}const $l=Hi(lr.value);if($l&&await ft($l,da.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let L=le.getColumnChild((qe=M.cloneDeep(q.value))==null?void 0:qe.filter($a=>($a==null?void 0:$a.label)!=="操作")),H,T=M.cloneDeep(De.value);if(!lr.value){Ze.value=!1;return}if(da.value===""){ta.value++;let $a;$a={id:ta.value.toString()};try{$a.sort=si(0,De.value||[])}catch{}$a!=null&&$a.children&&($a={...$a,children:(ra=$a.children)==null?void 0:ra.map(nl=>Ut(nl,v,z))});const $l=Object.assign(lr.value,$a);T.unshift($l),H=$l}else T=(_a=Ht(T,L))==null?void 0:_a.newContents,H=(za=Ht(T,L))==null?void 0:za.currentSelectContents;const ie=(Ma=d.itemData)==null?void 0:Ma.filter($a=>($a==null?void 0:$a.key)==="childTree")[0];if(((na=ie==null?void 0:ie.contents)==null?void 0:na.length)>0){ya.value="编辑";const $a=[];T==null||T.forEach((fl,Il)=>{var _r;let gl={};if(Array.isArray(fl)){let pr=[];fl==null||fl.filter(ir=>!(ir!=null&&ir.id)).forEach((ir,xl)=>{var Yl,hr,Ll,vr,Er,mr,Ar;if((hr=(Yl=tr.value)==null?void 0:Yl[xl])!=null&&hr.prop&&!Array.isArray(ir)){let tn={};tn[tr.value[xl].column]=ir,V!=null&&V.value&&((Ll=V==null?void 0:V.value)==null?void 0:Ll.length)>0&&((vr=V==null?void 0:V.value)!=null&&vr.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(tn)))&&(pr=(Er=V==null?void 0:V.value)==null?void 0:Er.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(tn))),pr&&pr.length>0?gl[tr.value[xl].prop]=pr!=null&&pr.find(fr=>{var Mr;return((Mr=Object.keys(fr))==null?void 0:Mr[0])===tr.value[xl].column})?(mr=pr==null?void 0:pr.find(fr=>{var Mr;return((Mr=Object.keys(fr))==null?void 0:Mr[0])===tr.value[xl].column}))==null?void 0:mr[tr.value[xl].column]:ir:gl[tr.value[xl].prop]=ir}else Array.isArray(ir)&&((Ar=tr.value[xl])!=null&&Ar.prop?gl[tr.value[xl].prop]=ir:gl.children=Dt(ir,tr.value))})}else gl=fl;if(Array.isArray(fl)&&fl.some(pr=>pr==null?void 0:pr.id)){const pr=(_r=fl==null?void 0:fl.find(ir=>ir.id))==null?void 0:_r.id;$a.push(Object.assign(gl,{id:to(pr)}))}else gl.id?$a.push(gl):$a.push(Object.assign(gl,{id:Il.toString()}))});const $l=(De.value||[]).map(fl=>String(fl==null?void 0:fl.id)),nl=wi($a,$l);De.value=Yt(nl,ie,q.value)}Kt(De.value),Xl.value=De.value;const oe=y0(Xl.value,El.value,T);let K=[];if(ee.value?(K=(il=M.cloneDeep(ee).value.singleContent)==null?void 0:il.filter($a=>($a==null?void 0:$a.id)!==(H==null?void 0:H.id)),K.push(H)):K=[H],Kl.value){const $a={content:oe,singleContent:((Sa=ie==null?void 0:ie.contents)==null?void 0:Sa.length)>0?K==null?void 0:K.flatMap(qt):K,index:d==null?void 0:d.index,buttonName:"编辑",column:q.value,parentTableId:d==null?void 0:d.parentTableId};Ge.setCacheUpdatingData($a)}if((tl=q.value)==null||tl.forEach($a=>{($a==null?void 0:$a.formType)==="Upload"&&(H[$a.prop]=H[$a.prop]===""?"{}":typeof H[$a.prop]!="string"?JSON.stringify(H[$a.prop]):H[$a.prop])}),f){(Ya=(xa=(Va=(be=d.itemData)==null?void 0:be.find(nl=>(nl==null?void 0:nl.key)==="filterAllType"))==null?void 0:Va.value)==null?void 0:xa.find(nl=>(nl==null?void 0:nl.value)==="onConditionContents"))==null||Ya.content;let $a=(Ra=d.itemData)==null?void 0:Ra.filter(nl=>(nl==null?void 0:nl.key)==="filterAllType");$a=Array.from(new Map($a.filter(Boolean).map((nl,fl)=>[nl.value,{...nl,_idx:fl}])).values()).sort((nl,fl)=>nl._idx-fl._idx).map(({_idx:nl,...fl})=>fl),$a=(Be=$a==null?void 0:$a[($a==null?void 0:$a.length)-1])==null?void 0:Be.value;const $l={fixContent:[H],buttonName:ya.value,relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames};Ge.setTableLoading(d==null?void 0:d.index),Ze.value=!1,lr.value=void 0,U("change",$l)}if((fa=(He=(Q=me.value)==null?void 0:Q[0])==null?void 0:He.optionUrl)!=null&&fa.menuId){Ze.value=!1;let $a=(B=d.itemData)==null?void 0:B.filter($l=>($l==null?void 0:$l.key)==="filterAllType");if(($a==null?void 0:$a.length)>0){let $l=$a==null?void 0:$a.map(Il=>Il==null?void 0:Il.value),nl=(sl=(Ua=(Ia=$l.flat().find(Il=>{var gl;return(gl=Il==null?void 0:Il.content)==null?void 0:gl.includes("@Num")}))==null?void 0:Ia.content)==null?void 0:Ua.split(":"))==null?void 0:sl[1];((ul=(Ba=(Ka=$l.flat().find(Il=>{var gl;return(gl=Il==null?void 0:Il.content)==null?void 0:gl.includes("@Type:")}))==null?void 0:Ka.content)==null?void 0:Ba.split(":"))==null?void 0:ul[1])!=="Manual"&&(nl=parseInt(nl),De.value=(Dl=De.value)==null?void 0:Dl.slice(((Wl=De.value)==null?void 0:Wl.length)-nl,(qa=De.value)==null?void 0:qa.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",oi),q.value=[],De.value=[],ze.value=[],j.value=[],Qe.value=[],Da.value=[],Le.value=[],Fe.value=[],me.value=[],Rr.value=[],i.value=null,rn.value=""});const fo=async(f,v,z)=>{var ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra;qr.value=(z==null?void 0:z.prop)??(z==null?void 0:z.property);const L=M.cloneDeep(d.itemData),H=((ra=L==null?void 0:L.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:ra.contents)??[];let T=H==null?void 0:H.find((Be,Q)=>{var He,fa,B;return(Be==null?void 0:Be.prop)===qr.value||(Be==null?void 0:Be.label)===qr.value||(Q==null?void 0:Q.toString())===((B=(fa=(He=qr.value)==null?void 0:He.split("a"))==null?void 0:fa[1])==null?void 0:B.toString())});const ie=le.getColumnChild((_a=M.cloneDeep(q.value))==null?void 0:_a.filter(Be=>(Be==null?void 0:Be.label)!=="操作"));if(T||(T=ie==null?void 0:ie.find(Be=>(Be==null?void 0:Be.prop)===qr.value||(Be==null?void 0:Be.label)===qr.value)),T&&!((za=T==null?void 0:T.menus)!=null&&za.length)&&!((Ma=T==null?void 0:T.groups)!=null&&Ma.length)&&!((na=T==null?void 0:T.words)!=null&&na.length)){const Be=(il=me.value)==null?void 0:il.find(Q=>(Q==null?void 0:Q.prop)===qr.value);Be&&(T={...T,menus:(Be==null?void 0:Be.menus)??(T==null?void 0:T.menus),groups:(Be==null?void 0:Be.groups)??(T==null?void 0:T.groups),words:(Be==null?void 0:Be.words)??(T==null?void 0:T.words),bindMenus:(Be==null?void 0:Be.bindMenus)??(T==null?void 0:T.bindMenus),isMainPath:(Be==null?void 0:Be.isMainPath)??(T==null?void 0:T.isMainPath),relatedContents:(Be==null?void 0:Be.relatedContents)??(T==null?void 0:T.relatedContents),endChildMenu:(Be==null?void 0:Be.endChildMenu)??(T==null?void 0:T.endChildMenu)})}if(T&&((Sa=me==null?void 0:me.value)==null||Sa.forEach(Be=>{var Q,He,fa,B,Ia;(Be==null?void 0:Be.prop)===(T==null?void 0:T.prop)&&(Be!=null&&Be.endChildMenu)&&((Q=T==null?void 0:T.prop)!=null&&Q.includes(".")&&((fa=(He=T==null?void 0:T.prop)==null?void 0:He.split("."))==null?void 0:fa[0])!==((Ia=(B=Be==null?void 0:Be.prop)==null?void 0:B.split("."))==null?void 0:Ia[0])?T.endChildMenu=Be==null?void 0:Be.value:T.endChildMenu=Be==null?void 0:Be.endChildMenu)})),!T)return;const oe=qr.value,K=(tl=De.value)==null?void 0:tl.findIndex(Be=>(Be==null?void 0:Be.id)===(v==null?void 0:v.id));K!==-1&&oe&&(De.value[K]={...De.value[K],[oe]:f});const ke=Be=>{Array.isArray(Be)&&Be.forEach(Q=>{Array.isArray(Q==null?void 0:Q.allSelectionContents)&&Q.allSelectionContents.length>0&&(Q.contactValue=De.value[K]??v),Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&ke(Q.children)})};ke(q.value),T.value=f,T.endChildMenu=T.endChildMenu||"";let ge=T!=null&&T.isMainPath&&(T!=null&&T.mainKey)?T==null?void 0:T.value:"";const Ye=Be=>{Array.isArray(Be)&&Be.forEach(Q=>{var fa,B;if(((Q==null?void 0:Q.type)==="Select"||(Q==null?void 0:Q.formType)&&Q.formType.toUpperCase()==="SELECT"||(Q==null?void 0:Q.columnType)&&Q.columnType.toUpperCase()==="SELECT")&&Array.isArray(Q==null?void 0:Q.menus)&&Q.menus.length>0&&Q.menus[Q.menus.length-1]===""&&(T!=null&&T.isMainPath)&&(T!=null&&T.mainKey)){const Ia=(fa=Q==null?void 0:Q.prop)!=null&&fa.includes(".")?Q.prop.split(".")[0]:null,Ua=(B=T==null?void 0:T.prop)!=null&&B.includes(".")?T.prop.split(".")[0]:null;(!Ia||!Ua||Ia===Ua)&&(Q.endChildMenu=ge)}Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&Ye(Q.children)})};if(Ye(q.value),!!(T!=null&&T.mainKey)&&Array.isArray(T==null?void 0:T.menus)&&(T==null?void 0:T.menus.length)>0&&(T!=null&&T.value)&&(T==null?void 0:T.value)!==""){let Be=T!=null&&T.relatedContents&&((be=T==null?void 0:T.relatedContents)==null?void 0:be.length)>0?(Va=T==null?void 0:T.relatedContents)==null?void 0:Va.find(Q=>{var He,fa,B,Ia;return(Q==null?void 0:Q[(Ia=(He=T==null?void 0:T.prop)==null?void 0:He.split("."))==null?void 0:Ia[((B=(fa=T==null?void 0:T.prop)==null?void 0:fa.split("."))==null?void 0:B.length)-1]])===(T==null?void 0:T.value)}):await _s(T);if(Be){const Q={...v};ie==null||ie.forEach(He=>{var fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl,Il;(He==null?void 0:He.prop)!==(T==null?void 0:T.prop)&&(T!=null&&T.relatedContents&&((fa=T==null?void 0:T.relatedContents)==null?void 0:fa.length)>0?(B=He==null?void 0:He.prop)!=null&&B.includes(".")&&((Ua=(Ia=He==null?void 0:He.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])===((Ka=(sl=T==null?void 0:T.prop)==null?void 0:sl.split("."))==null?void 0:Ka[0])?Q[He.prop]=Be[(qa=(Ba=He==null?void 0:He.prop)==null?void 0:Ba.split("."))==null?void 0:qa[((Wl=(ul=He==null?void 0:He.prop)==null?void 0:ul.split("."))==null?void 0:Wl.length)-1]]??Q[He.prop]:Q[He.prop]=(Be==null?void 0:Be[He.prop])??Q[He.prop]:le.same((T==null?void 0:T.menus)??[],(He==null?void 0:He.menus)??[])&&le.same((T==null?void 0:T.groups)??[],(He==null?void 0:He.groups)??[])&&!le.same((T==null?void 0:T.words)??[],(He==null?void 0:He.words)??[])?(Dl=He==null?void 0:He.prop)!=null&&Dl.includes(".")&&(($l=($a=He==null?void 0:He.prop)==null?void 0:$a.split("."))==null?void 0:$l[0])!==((fl=(nl=T==null?void 0:T.prop)==null?void 0:nl.split("."))==null?void 0:fl[0])||(Q[He.prop]=(Be==null?void 0:Be[(Il=He==null?void 0:He.words)==null?void 0:Il.join(".")])??(Be==null?void 0:Be[He.prop])??Q[He.prop]):(!(He!=null&&He.isMainPath)&&le.same((T==null?void 0:T.bindMenus)??[],(He==null?void 0:He.bindMenus)??[]),Q[He.prop]=(Be==null?void 0:Be[He.prop])??Q[He.prop]))}),De.value=(xa=M.cloneDeep(De.value))==null?void 0:xa.map(He=>(He==null?void 0:He.id)===(v==null?void 0:v.id)?{...Q,id:He==null?void 0:He.id}:He)}}if((Ya=T==null?void 0:T.optionUrl)!=null&&Ya.menuSelect){let Be="";ie==null||ie.forEach(fa=>{var B,Ia,Ua,sl,Ka;Be===""&&((Ua=(Ia=(B=fa==null?void 0:fa.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ia[1])!=null&&Ua.includes("["))&&(Be=(Ka=(sl=fa==null?void 0:fa.optionUrl)==null?void 0:sl.groupSelect)==null?void 0:Ka[1])});let Q=await Tt(T),He;if(Q==null||Q.forEach(fa=>{var B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl;Be===((Ia=(B=T==null?void 0:T.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ia[1])&&((Ka=(sl=(Ua=T==null?void 0:T.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:sl[1])!=null&&Ka.includes("["))&&((Dl=M.cloneDeep(fa))==null?void 0:Dl[(qa=(Wl=(ul=(Ba=T==null?void 0:T.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:ul[1])==null?void 0:Wl.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])===(T==null?void 0:T.value)&&(He=fa)}),He){const fa={...v};ie==null||ie.forEach(B=>{var Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l;(He!=null&&He[B==null?void 0:B.label]||He!=null&&He[(Ka=(sl=(Ua=(Ia=B==null?void 0:B.optionUrl)==null?void 0:Ia.groupSelect)==null?void 0:Ua[1])==null?void 0:sl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])&&((Wl=(ul=(Ba=B==null?void 0:B.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:ul[1])!=null&&Wl.includes("["))&&(fa[B.prop]=(He==null?void 0:He[B==null?void 0:B.label])||(He==null?void 0:He[($l=($a=(Dl=(qa=B==null?void 0:B.optionUrl)==null?void 0:qa.groupSelect)==null?void 0:Dl[1])==null?void 0:$a.replaceAll("[",""))==null?void 0:$l.replaceAll("]","")]))}),De.value=(Ra=M.cloneDeep(De.value))==null?void 0:Ra.map(B=>(B==null?void 0:B.id)===(v==null?void 0:v.id)?{...fa,id:B==null?void 0:B.id}:B)}}},Ou=async f=>{var ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra,Be;if(!f)return;const v=M.cloneDeep(lr.value||{});lr.value=f;const z=Hi(v),L=Hi(lr.value);if(L&&L!==z&&await ft(L,da.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),po.forEach(He=>{if(Object.prototype.hasOwnProperty.call(lr.value||{},He)||Object.prototype.hasOwnProperty.call(v||{},He)){const fa=(v==null?void 0:v[He])??"";lr.value[He]=fa,f[He]=fa}}),me.value=(me.value||[]).map(He=>{if(!(He!=null&&He.prop)||!po.includes(He.prop))return He;const fa=(v==null?void 0:v[He.prop])??"";return{...He,value:fa,selectValue:fa===""?[]:[fa]}});return}let H=M.cloneDeep(d.itemData);H==null||H.map(Q=>{var He,fa,B,Ia;return(Q==null?void 0:Q.key)==="header"&&(Array.isArray((He=Q.contents)==null?void 0:He[0])?Q.contents=(B=le.getColumnChild((fa=Q.contents)==null?void 0:fa[0]))==null?void 0:B.map((Ua,sl)=>{var Ka,Ba,ul,Wl,qa,Dl;return((ul=(Ba=(Ka=me.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ba.optionUrl)==null?void 0:ul.multiple)===!0&&!Array.isArray((Wl=Object.values(f))==null?void 0:Wl[sl])?Ua.value=[(qa=Object.values(f))==null?void 0:qa[sl]]:Ua.value=(Dl=Object.values(f))==null?void 0:Dl[sl],Ua}):Q.contents=(Ia=Q.contents)==null?void 0:Ia.map((Ua,sl)=>{var Ka,Ba,ul,Wl,qa,Dl;return((ul=(Ba=(Ka=me.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ba.optionUrl)==null?void 0:ul.multiple)===!0&&!Array.isArray((Wl=Object.values(f))==null?void 0:Wl[sl])?Ua.value=[(qa=Object.values(f))==null?void 0:qa[sl]]:Ua.value=(Dl=Object.values(f))==null?void 0:Dl[sl],Ua})),Q});let T=me.value,ie=(ra=H==null?void 0:H.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:ra.contents;if(qr.value||(T=T==null?void 0:T.map(Q=>{var He;return Q.value=Q.value??((He=ie==null?void 0:ie.find((fa,B)=>(fa==null?void 0:fa.prop)===(Q==null?void 0:Q.name)))==null?void 0:He.value),Q})),!En.value)return;let oe=M.cloneDeep(qr.value);(_a=qr.value)!=null&&_a.includes("·")&&(qr.value=(Ma=(za=qr.value)==null?void 0:za.split("·"))==null?void 0:Ma[0]);let K=(il=(na=H==null?void 0:H.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:na.contents)==null?void 0:il.find((Q,He)=>(Q==null?void 0:Q.prop)===qr.value);(Sa=me==null?void 0:me.value)==null||Sa.forEach(Q=>{var He,fa,B,Ia,Ua,sl,Ka,Ba,ul;(Q==null?void 0:Q.prop)===(K==null?void 0:K.prop)&&(Q!=null&&Q.endChildMenu)&&((He=K==null?void 0:K.prop)!=null&&He.includes(".")&&((B=(fa=K==null?void 0:K.prop)==null?void 0:fa.split("."))==null?void 0:B[0])!==((Ua=(Ia=Q==null?void 0:Q.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])?K.endChildMenu=(Ka=(sl=Q==null?void 0:Q.value)==null?void 0:sl.split(" "))==null?void 0:Ka[0]:K.endChildMenu=(ul=(Ba=Q==null?void 0:Q.endChildMenu)==null?void 0:Ba.split(" "))==null?void 0:ul[0])});let ke=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",ge=T,Ye=ae.value;if(Ye!=null&&Ye.find(Q=>(K==null?void 0:K.prop)===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>(K==null?void 0:K.prop)!==(Q==null?void 0:Q.key))),Ye!=null&&Ye.find(Q=>oe===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>oe!==(Q==null?void 0:Q.key))),(K==null?void 0:K.formType)==="Select"?ge=ge==null?void 0:ge.map(Q=>{var He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl;return(Q==null?void 0:Q.type)==="Select"&&(((He=Q==null?void 0:Q.allSelectionContents)==null?void 0:He.length)>0&&(Q.contactValue=f),((K==null?void 0:K.prop)===(Q==null?void 0:Q.prop)||oe===(Q==null?void 0:Q.prop))&&K&&(Array.isArray(K.value)&&((fa=K.value)==null?void 0:fa.length)>0&&((B=K.value)!=null&&B.every(Il=>typeof Il=="string"))?(Ye.push({key:Q==null?void 0:Q.prop,value:[(Ua=K.value)==null?void 0:Ua[((Ia=K.value)==null?void 0:Ia.length)-1]]}),Q.selectValue=(sl=Ye==null?void 0:Ye.find(Il=>(Il==null?void 0:Il.key)===(Q==null?void 0:Q.prop)))==null?void 0:sl.value):Array.isArray(K.value)&&((Ka=K.value)==null?void 0:Ka.length)===0?(Ye=[],Q.selectValue=[],f[Q==null?void 0:Q.prop]=""):Array.isArray(Q.value)&&Ye.push({key:Q==null?void 0:Q.prop,value:[(Ba=Q.value)==null?void 0:Ba[(Q==null?void 0:Q.length)-1]]})),((Wl=Q==null?void 0:Q.menus)==null?void 0:Wl[((ul=Q==null?void 0:Q.menus)==null?void 0:ul.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((qa=Q==null?void 0:Q.prop)!=null&&qa.includes(".")&&(($a=(Dl=Q==null?void 0:Q.prop)==null?void 0:Dl.split("."))==null?void 0:$a[0])!==((nl=($l=K==null?void 0:K.prop)==null?void 0:$l.split("."))==null?void 0:nl[0])||(Q.endChildMenu=(fl=ke==null?void 0:ke.split(" "))==null?void 0:fl[0]))),Q.value=(f==null?void 0:f[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q}):(K==null?void 0:K.formType)!=="Input"&&(ge=ge==null?void 0:ge.map(Q=>(Q.value=(f==null?void 0:f[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q))),ae.value=Ye,ge!=null&&ge.some(Q=>(Q==null?void 0:Q.functionName)&&(Q==null?void 0:Q.functionName)!=="")){let Q=await Ct([f],q==null?void 0:q.value,"Auto",De.value),He=[];(tl=ge==null?void 0:ge.filter(B=>(B==null?void 0:B.functionName)&&(B==null?void 0:B.functionName)!==""))==null||tl.forEach(B=>{var Ia;((Ia=B==null?void 0:B.functionRelatedWords)==null?void 0:Ia.length)>0&&(He=[...He,...B==null?void 0:B.functionRelatedWords])}),He=He==null?void 0:He.filter(B=>(B==null?void 0:B[0])!=="@");let fa=[];for(let B in Q==null?void 0:Q[0])He!=null&&He.find(Ia=>B===Ia||(B==null?void 0:B.includes("."+Ia)))&&fa.push(((be=Q==null?void 0:Q[0])==null?void 0:be[B])!=="");(Q==null?void 0:Q.length)>0&&fa.every(B=>B)&&(ge=ge==null?void 0:ge.map(B=>{var Ia;return B.value=((Ia=Q==null?void 0:Q[0])==null?void 0:Ia[B==null?void 0:B.prop])??B.value,B})),lr.value=Q==null?void 0:Q[0]}if(me.value=ge,K=Object.assign({},K??{},{relatedWords:(xa=(Va=me==null?void 0:me.value)==null?void 0:Va.find(Q=>(Q==null?void 0:Q.prop)===(K==null?void 0:K.prop)))==null?void 0:xa.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let Q=K!=null&&K.relatedContents&&((Ya=K==null?void 0:K.relatedContents)==null?void 0:Ya.length)>0?(Ra=K==null?void 0:K.relatedContents)==null?void 0:Ra.find(He=>{var fa,B,Ia,Ua;return(He==null?void 0:He[(Ua=(fa=K==null?void 0:K.prop)==null?void 0:fa.split("."))==null?void 0:Ua[((Ia=(B=K==null?void 0:K.prop)==null?void 0:B.split("."))==null?void 0:Ia.length)-1]])===(K==null?void 0:K.value)}):await _s(K);if(Q&&JSON.stringify(Q)!=="{}"){let He=ge;He=He==null?void 0:He.map(B=>{var Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl,Il,gl,_r,pr,ir,xl,Yl,hr;if((K==null?void 0:K.prop)===(B==null?void 0:B.prop))B.value=(Q==null?void 0:Q[(Ia=B==null?void 0:B.words)==null?void 0:Ia.join(".")])??(Q==null?void 0:Q[B==null?void 0:B.prop])??Q[(Ba=(Ua=B==null?void 0:B.prop)==null?void 0:Ua.split("."))==null?void 0:Ba[((Ka=(sl=B==null?void 0:B.prop)==null?void 0:sl.split("."))==null?void 0:Ka.length)-1]];else if(K!=null&&K.relatedContents&&((ul=K==null?void 0:K.relatedContents)==null?void 0:ul.length)>0)B.value=(Wl=B==null?void 0:B.prop)!=null&&Wl.includes(".")&&((Dl=(qa=B==null?void 0:B.prop)==null?void 0:qa.split("."))==null?void 0:Dl[0])===(($l=($a=K==null?void 0:K.prop)==null?void 0:$a.split("."))==null?void 0:$l[0])?Q[(gl=(nl=B==null?void 0:B.prop)==null?void 0:nl.split("."))==null?void 0:gl[((Il=(fl=B==null?void 0:B.prop)==null?void 0:fl.split("."))==null?void 0:Il.length)-1]]:(Q==null?void 0:Q[B==null?void 0:B.prop])??(B==null?void 0:B.value);else if(le.same((K==null?void 0:K.menus)??[],(B==null?void 0:B.menus)??[])&&le.same((K==null?void 0:K.groups)??[],(B==null?void 0:B.groups)??[])&&!le.same((K==null?void 0:K.words)??[],(B==null?void 0:B.words)??[]))if((_r=B==null?void 0:B.prop)!=null&&_r.includes(".")&&((ir=(pr=B==null?void 0:B.prop)==null?void 0:pr.split("."))==null?void 0:ir[0])!==((Yl=(xl=K==null?void 0:K.prop)==null?void 0:xl.split("."))==null?void 0:Yl[0])){let Ll=Object.keys(Q);Ll=Ll==null?void 0:Ll.find(vr=>{var Er;return vr==null?void 0:vr.includes("."+((Er=B==null?void 0:B.words)==null?void 0:Er.join(".")))}),B.value=(Q==null?void 0:Q[Ll])??(Q==null?void 0:Q[B==null?void 0:B.prop])??B.value}else{let Ll=Object.keys(Q);Ll=Ll==null?void 0:Ll.find(vr=>{var Er;return vr==null?void 0:vr.includes("."+((Er=B==null?void 0:B.words)==null?void 0:Er.join(".")))}),B.value=(Q==null?void 0:Q[(hr=B==null?void 0:B.words)==null?void 0:hr.join(".")])??(Q==null?void 0:Q[Ll])??(Q==null?void 0:Q[B==null?void 0:B.prop])??B.value}else!(B!=null&&B.isMainPath)&&le.same((K==null?void 0:K.bindMenus)??[],(B==null?void 0:B.bindMenus)??[]),B.value=(Q==null?void 0:Q[B==null?void 0:B.prop])??B.value;return B}),me.value=He;let fa={};(Be=me.value)==null||Be.forEach(B=>{fa[B.prop]=B==null?void 0:B.value}),lr.value=fa}}En.value=!0,P.value=!1},Lu=f=>f?(f==null?void 0:f.toUpperCase())==="INPUT"?"TEXTAREA":f:"TEXTAREA",Ru=f=>{var T,ie;const v=(ie=(T=Qe.value)==null?void 0:T.find(oe=>(oe==null?void 0:oe.label)===(f==null?void 0:f.label)))==null?void 0:ie.multiple,z=f==null?void 0:f.prop;if((f==null?void 0:f.formType)!="Select")return;De.value.forEach(oe=>{const K=oe==null?void 0:oe[z];v&&To.isString(K)&&(oe[z]=[K]),!v&&!To.isString(K)&&(oe[z]="")})},Wt=(f,v)=>{var z;return v==null||v.forEach(L=>{f[L==null?void 0:L.prop]=L==null?void 0:L.value}),f.children&&((z=f.children)==null?void 0:z.length)>0&&(f.children=f.children.map(L=>Wt(L,v))),f},ht=f=>{var z,L,H,T,ie,oe;ji("");const v=(z=me.value)==null?void 0:z.reduce((K,ke)=>(K[ke.name]=ke.value,K),{});if(((L=Object.keys(v))==null?void 0:L.length)>0){lr.value=v,da.value="",ta.value=(H=De.value)==null?void 0:H.length,Fe.value=(T=Ne.value)==null?void 0:T.filter(ke=>(ke==null?void 0:ke.label)!=="新增");const K=(oe=(ie=ze.value)==null?void 0:ie.filter(ke=>(ke==null?void 0:ke.label)!=="操作"))==null?void 0:oe.map(ke=>{var Ye,qe,ra;const ge=(qe=(Ye=Qe.value)==null?void 0:Ye.find(_a=>(_a==null?void 0:_a.label)===(ke==null?void 0:ke.label)))==null?void 0:qe.multiple;return Ru(ke),{...ke,contents:(ke==null?void 0:ke.options)??[],optionUrl:ke!=null&&ke.formMenuSelect&&((ra=ke==null?void 0:ke.formMenuSelect)==null?void 0:ra.length)>0?{groupSelect:ke==null?void 0:ke.groupSelect,menuSelect:ke==null?void 0:ke.formMenuSelect,selectRelateType:"",type:ke==null?void 0:ke.formType,multiple:ge}:null}});q.value=K==null?void 0:K.map(ke=>Wt(ke,[{prop:"type",value:"edit"},{prop:"columnType",value:Lu(ke==null?void 0:ke.formType)||(ke==null?void 0:ke.columnType)}])),f==="createClick"&&(ya.value="新增",Ui(!0))}},Si={START:"开始时间",END:"结束时间",HOURS:"工时"},$u=(f,v)=>Number(M.dayjs(v).diff(M.dayjs(f),"day",!0).toFixed(1)),Kt=f=>{var T;const v=d.itemData,z=(T=v==null?void 0:v.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:T.contents,L=new Map;return z==null||z.forEach((ie,oe)=>{const{label:K}=ie;L.set(K,oe)}),!L.has(Si.START)||!L.has(Si.END)||!L.has(Si.HOURS)?f:f==null?void 0:f.map(ie=>{const oe=ie==null?void 0:ie[Si.START],K=ie==null?void 0:ie[Si.END],ke=$u(oe,K);return oe&&K&&(ie[Si.HOURS]=`${ke}天`),ie})},Gt=(f,v,z=0)=>{if(z>((v==null?void 0:v.length)??""))return f;const L=v==null?void 0:v[z],H=new Map;for(const ie of f){const oe=ie[L];H.has(oe)||H.set(oe,[]),H.get(oe)&&H.get(oe).push(ie)}const T=[];for(const[ie,oe]of H){const[K,...ke]=oe,ge={...K};z+1===((v==null?void 0:v.length)??"")?ge.children=oe==null?void 0:oe.map(Ye=>(Ye.level=M.cloneDeep(z)+1,Ye)).filter((Ye,qe)=>qe!==0):ke.length>0&&(ge.children=Gt(ke,v,z+1)),ge.level=z,T.push(ge)}return T},Yt=(f,v,z)=>{var H;if(!(v!=null&&v.contents)||((H=v==null?void 0:v.contents)==null?void 0:H.length)===0)return f;let L=[];return L=Gt(f,v==null?void 0:v.contents,0),L},Jt=async(f,v)=>{var il,Sa,tl,be,Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl,Il,gl,_r,pr,ir,xl,Yl,hr,Ll,vr,Er,mr,Ar,tn,fr,Mr,Fr,Zt,Qt,es,as,ls,rs;const z=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="header");f==null||f.filter(oa=>(oa==null?void 0:oa.key)==="tableIndexColumn")[0];const L=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="childTree")[0];let H=!0;if((tl=(Sa=(il=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="filterAllType"))==null?void 0:il.value)==null?void 0:Sa.find(oa=>(oa==null?void 0:oa.value)==="onPamButtonContents"))!=null&&tl.content){let oa=(xa=(Va=(be=f==null?void 0:f.find(Ml=>(Ml==null?void 0:Ml.key)==="filterAllType"))==null?void 0:be.value)==null?void 0:Va.find(Ml=>(Ml==null?void 0:Ml.value)==="onPamButtonContents"))==null?void 0:xa.content;oa=(Ya=oa==null?void 0:oa.split(":"))==null?void 0:Ya[1],oa=(Ra=oa.slice(1,(oa==null?void 0:oa.length)-1))==null?void 0:Ra.split(","),H=!!(oa!=null&&oa.find(Ml=>Ml==="操作"))}const T=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="page"),ie=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="rowButton"),oe=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="extraButton"),K=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="tableContents"),ke=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="bottomButton");let ge=[],Ye=(Be=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="filter"))==null?void 0:Be[0];Ye=(Ye==null?void 0:Ye.contents)??"",Ye=I0(Ye),(Ye==null?void 0:Ye.length)>0&&(u.value=Ye);const qe=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="tableIndex");Qe.value=(He=(Q=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="tableToForm"))==null?void 0:Q[0])==null?void 0:He.contents,je.value=(T==null?void 0:T.contents)??!0;let ra=[];rr.value===""?ra=z==null?void 0:z[0]:ra=(z==null?void 0:z.find(oa=>(oa==null?void 0:oa.selectLabel)==="("+rr.value+")"))??(z==null?void 0:z.find(oa=>!(oa!=null&&oa.selectLabel)));let _a=[];rr.value===""?_a=qe==null?void 0:qe[0]:_a=(qe==null?void 0:qe.find(oa=>(oa==null?void 0:oa.selectLabel)==="("+rr.value+")"))??(qe==null?void 0:qe.find(oa=>!(oa!=null&&oa.selectLabel)));let za=[],Ma=[];if(((fa=ra==null?void 0:ra.contents)==null?void 0:fa.length)>0){let oa=[],Ml=ra==null?void 0:ra.contents;if(Array.isArray(Ml==null?void 0:Ml[0])&&((B=Ml==null?void 0:Ml[0])!=null&&B.every(Za=>!(Za!=null&&Za.children)))&&(Ml=Ml==null?void 0:Ml[0]),Ml.some(Za=>Array.isArray(Za)&&(Za==null?void 0:Za.find(Xe=>Xe.children))))oa=(Ia=le.getGradeColumns(Ml,H))==null?void 0:Ia[0],oa!=null&&oa.find(Za=>(Za==null?void 0:Za.label)==="操作")||oa.push({label:"操作",prop:"operate",type:"operate"});else{let Za=Ml.some(Xe=>Array.isArray(Xe))?Ml==null?void 0:Ml[0]:Ml;Za!=null&&Za.find(Xe=>(Xe==null?void 0:Xe.label)==="操作")||Za.push({label:"操作",prop:"operate",type:"operate"}),Za==null||Za.forEach((Xe,yr)=>{var an,nn,Wr,di,Ei,Ci,Ir,Rn,Qn,Di,Sn,ei,ns,is,os,ts,ss,cs,us,ds,ps;if((nn=(an=de.value)==null?void 0:an.split("/"))==null||nn.forEach(kr=>{var zr,jn,fs;kr!==""&&((fs=(jn=(zr=kr==null?void 0:kr.split(I+"updateLoading"))==null?void 0:zr[0])==null?void 0:jn.split(I+"loading"))==null||fs[0])}),Xe!=null&&Xe.methodContent){let kr=(Ei=(di=(Wr=Xe==null?void 0:Xe.methodContent)==null?void 0:Wr.replace("@","%%#"))==null?void 0:di.split("%%#"))==null?void 0:Ei[1];if(kr=kr==null?void 0:kr.slice(0,(kr==null?void 0:kr.length)-1),kr=le.contentTransArrayToAllNoExtra(kr??"",","),(Ci=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("@Button")))!=null&&Ci.includes("Prop")&&((Ir=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("Type")))!=null&&Ir.includes("Manual"))){let zr=(Qn=(Rn=kr==null?void 0:kr.find(jn=>jn==null?void 0:jn.includes("@Button")))==null?void 0:Rn.split(":"))==null?void 0:Qn[1];zr=((ei=(Sn=(Di=zr==null?void 0:zr.replaceAll("[",""))==null?void 0:Di.replaceAll("]",""))==null?void 0:Sn.split(","))==null?void 0:ei[1])??"算法执行",za.push(zr)}else if((ns=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("@Button")))!=null&&ns.includes("Row")&&((is=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("Type")))!=null&&is.includes("Manual"))){let zr=(ts=(os=kr==null?void 0:kr.find(jn=>jn==null?void 0:jn.includes("@Button")))==null?void 0:os.split(":"))==null?void 0:ts[1];zr=((us=(cs=(ss=zr==null?void 0:zr.replaceAll("[",""))==null?void 0:ss.replaceAll("]",""))==null?void 0:cs.split(","))==null?void 0:us[1])??"算法执行",Ma.push(zr)}}(ds=Qe.value)==null||ds.find(kr=>(kr==null?void 0:kr.prop)===(Xe==null?void 0:Xe.prop));let cn=((ps=Xe==null?void 0:Xe.filter)==null?void 0:ps.includes("@EditRead=Read"))??!1;oa.push({label:(Xe==null?void 0:Xe.label)==="操作"?H?"操作":"":(Xe==null?void 0:Xe.label)??"",prop:(Xe==null?void 0:Xe.label)==="操作"?"operate":(Xe==null?void 0:Xe.prop)??"a"+yr,width:Xe!=null&&Xe.width?parseInt(Xe.width):"",fixed:(Xe==null?void 0:Xe.fixed)??void 0,sortable:(Xe==null?void 0:Xe.sortable)??!1,filterable:(Xe==null?void 0:Xe.filterable)??!1,operable:(Xe==null?void 0:Xe.operable)??!1,showSummary:(Xe==null?void 0:Xe.showSummary)??!1,align:(Xe==null?void 0:Xe.align)??"left",showOverflowTooltip:(Xe==null?void 0:Xe.showOverflowTooltip)??!0,isNotDrag:(Xe==null?void 0:Xe.isNotDrag)??!1,isEditCol:(Xe==null?void 0:Xe.isEditCol)??!1,isOperate:(Xe==null?void 0:Xe.isOperate)??!1,id:(Xe==null?void 0:Xe.id)??yr,type:(Xe==null?void 0:Xe.label)==="操作"?"operate":void 0,formType:(Xe==null?void 0:Xe.formType)??(Xe!=null&&Xe.groupSelect?"Select":""),disabled:Xe==null?void 0:Xe.disabled,options:(Xe==null?void 0:Xe.options)??[],value:(Xe==null?void 0:Xe.value)??"",isExistChild:(Xe==null?void 0:Xe.isExistChild)??!1,mainKey:(Xe==null?void 0:Xe.mainKey)??yr===0,allSelectionContents:(Xe==null?void 0:Xe.allContents)??[],filterContent:Xe==null?void 0:Xe.filterContents,menus:Xe==null?void 0:Xe.menus,groups:Xe==null?void 0:Xe.groups,words:Xe==null?void 0:Xe.words,filter:Xe==null?void 0:Xe.filter,bindMenus:Xe==null?void 0:Xe.bindMenus,fatherPath:Xe==null?void 0:Xe.fatherPath,isMainPath:Xe==null?void 0:Xe.isMainPath,required:(Xe==null?void 0:Xe.required)??!1,relatedContents:Xe==null?void 0:Xe.relatedContents,functionName:Xe==null?void 0:Xe.functionName,functionRelatedWords:Xe==null?void 0:Xe.functionRelatedWords,calculatorFilter:Xe==null?void 0:Xe.calculatorFilter,relatedPages:Xe==null?void 0:Xe.relatedPages,multiple:(Xe==null?void 0:Xe.multiple)??!1,multipleLimit:Xe==null?void 0:Xe.multipleLimit,isReadonly:cn})})}oa=oa==null?void 0:oa.filter(Za=>{var Xe;return!((Xe=Za==null?void 0:Za.filter)!=null&&Xe.includes("@ShowHide=Hide"))}),O.value=(Ua=ke==null?void 0:ke[0])==null?void 0:Ua.contents;const sn=le.getNewColumnChild(oa);ge=le.getColumnChild(sn);const Zn=Za=>Array.isArray(Za)?Za.map(Xe=>(Array.isArray(Xe==null?void 0:Xe.children)&&Xe.children.length>0?(Xe.sortable=!1,Zn(Xe.children)):(Xe==null?void 0:Xe.prop)==="operate"||(Xe==null?void 0:Xe.label)==="操作"||(Xe==null?void 0:Xe.type)==="operate"||(Xe.sortable=!1),Xe)):Za;Zn(sn),await Xo(sn),P0(Z.value,sn),q.value=sn,j.value=sn,r.value=(sl=q.value)==null?void 0:sl.map(Za=>Za==null?void 0:Za.label);let Pr=(Ba=(Ka=le.getAllLeafNodes(q.value))==null?void 0:Ka.filter(Za=>(Za==null?void 0:Za.type)!=="operate"))==null?void 0:Ba.map((Za,Xe)=>({prop:(Za==null?void 0:Za.prop)??"a"+Xe,column:Za.label}));tr.value=Pr;let Jr=[];rr.value===""?Jr=K==null?void 0:K[0]:Jr=(K==null?void 0:K.find(Za=>(Za==null?void 0:Za.selectLabel)==="("+rr.value+")"))??(K==null?void 0:K.find(Za=>!(Za!=null&&Za.selectLabel)));let jr=Array.isArray((ul=Jr==null?void 0:Jr.contents)==null?void 0:ul[0])&&((Wl=Jr==null?void 0:Jr.contents)!=null&&Wl[0].every(Za=>Array.isArray(Za)))?(qa=Jr==null?void 0:Jr.contents)==null?void 0:qa[0]:Jr==null?void 0:Jr.contents;_a!=null&&_a.contents&&((Dl=_a==null?void 0:_a.contents)==null?void 0:Dl.length)!==0&&(jr=($a=M.cloneDeep(jr))==null?void 0:$a.map((Za,Xe)=>{if(!Array.isArray(Za)){let yr={};for(let cn in Za)cn!=="id"&&cn!=="index"&&(yr[cn]=Za[cn]);Za=Object.values(yr)}return Za}));const ho=!!(($l=q.value)!=null&&$l.find(Za=>Za.prop==="index"));jr=Sc(jr,_a==null?void 0:_a.contents,ho);const qn=[];jr==null||jr.forEach((Za,Xe)=>{var cn;let yr={};if(Array.isArray(Za)){let an=[];Za==null||Za.filter(nn=>!(nn!=null&&nn.id)).forEach((nn,Wr)=>{var di,Ei,Ci,Ir,Rn,Qn;if((di=Pr==null?void 0:Pr[Wr])!=null&&di.prop&&!Array.isArray(nn)){let Di={};Di[Pr[Wr].column]=nn,V!=null&&V.value&&((Ei=V==null?void 0:V.value)==null?void 0:Ei.length)>0&&((Ci=V==null?void 0:V.value)!=null&&Ci.find(Sn=>JSON.stringify(Sn==null?void 0:Sn[0])===JSON.stringify(Di)))&&(an=(Ir=V==null?void 0:V.value)==null?void 0:Ir.find(Sn=>JSON.stringify(Sn==null?void 0:Sn[0])===JSON.stringify(Di))),an&&an.length>0?yr[Pr[Wr].prop]=an!=null&&an.find(Sn=>{var ei;return((ei=Object.keys(Sn))==null?void 0:ei[0])===Pr[Wr].column})?(Rn=an==null?void 0:an.find(Sn=>{var ei;return((ei=Object.keys(Sn))==null?void 0:ei[0])===Pr[Wr].column}))==null?void 0:Rn[Pr[Wr].column]:nn:yr[Pr[Wr].prop]=nn}else Array.isArray(nn)&&((Qn=Pr[Wr])!=null&&Qn.prop?yr[Pr[Wr].prop]=nn:yr.children=Dt(nn,Pr))})}else yr=Za;if(Array.isArray(Za)&&Za.some(an=>an==null?void 0:an.id)){const an=(cn=Za==null?void 0:Za.find(nn=>nn.id))==null?void 0:cn.id;qn.push(Object.assign(yr,{id:to(an)}))}else yr.id?qn.push(yr):qn.push(Object.assign(yr,{id:Xe.toString()}))});try{const Za=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Xe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),yr=Za==null?void 0:Za.tableId,cn=Za==null?void 0:Za.compIndex;if(yr&&Array.isArray(Xe)&&Xe.length>0&&String(yr)===String(d==null?void 0:d.parentTableId)&&String(cn)===String(d==null?void 0:d.index)){const an=new Set(qn.map(Wr=>String(Wr==null?void 0:Wr.id))),nn=Xe.filter(Wr=>!an.has(String(Wr)));if(nn.length>0){const Wr=Za==null?void 0:Za.pageKey,di=Wr!=null&&Wr.startsWith("/")?Wr.substring(1):Wr;((v==null?void 0:v[Wr])||(v==null?void 0:v[di])||[]).filter(Ir=>{var Rn,Qn;return((Rn=Ir==null?void 0:Ir.key)==null?void 0:Rn.type)==="data"&&String((Qn=Ir==null?void 0:Ir.key)==null?void 0:Qn.tableId)===String(yr)&&nn.includes(Ir==null?void 0:Ir.id)}).forEach(Ir=>{var Rn;an.has(String(Ir==null?void 0:Ir.id))||(qn.push({id:Ir==null?void 0:Ir.id,...((Rn=Ir==null?void 0:Ir.value)==null?void 0:Rn.tableData)||{}}),an.add(String(Ir==null?void 0:Ir.id)))})}}}catch{}let Wn=null;try{const Za=`ocr_committed_temp_ids_v1:${String((d==null?void 0:d.parentTableId)??"")}:${String((d==null?void 0:d.index)??"")}`,Xe=JSON.parse(sessionStorage.getItem(Za)||"null");Array.isArray(Xe)&&Xe.length>0&&(Wn=new Set(Xe.map(yr=>String(yr))))}catch{}const qi=Array.from(((nl=Na.value)==null?void 0:nl.values())||[]).filter(Za=>!(!(Za!=null&&Za._isOCRRow&&(Za==null?void 0:Za._ocrTableId)===(d==null?void 0:d.index))||Wn&&Wn.has(String(Za==null?void 0:Za.id)))),vo=(De.value||[]).map(Za=>String(Za==null?void 0:Za.id)),er=wi(qn,vo);if(De.value=Yt(er,L,q.value),Fa.value=er,(fl=Fa.value)==null||fl.forEach(Za=>{var Xe;(Xe=Na.value)==null||Xe.set(Za.id,Za)}),Wn&&Wn.size>0)try{const Za=new Set(Array.from(Wn.values()));De.value=(De.value||[]).filter(Xe=>!Za.has(String(Xe==null?void 0:Xe.id))),Fa.value=(Fa.value||[]).filter(Xe=>!Za.has(String(Xe==null?void 0:Xe.id))),Za.forEach(Xe=>{var yr,cn;try{(cn=(yr=Na.value)==null?void 0:yr.delete)==null||cn.call(yr,Xe)}catch{}})}catch{}const en=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),vt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(en&&Array.isArray(vt)&&vt.length>0&&String(en==null?void 0:en.compIndex)===String(d==null?void 0:d.index)){const Za=new Set((Fa.value||[]).map(Xe=>String(Xe==null?void 0:Xe.id)));vt.filter(Xe=>!Za.has(String(Xe)))}if(qi.length>0){const Za=new Set((De.value||[]).map(yr=>yr==null?void 0:yr.id)),Xe=qi.filter(yr=>!Za.has(yr.id));Xe.length>0&&(De.value=[...De.value||[],...Xe],Fa.value=[...Fa.value||[],...Xe],Xe.forEach(yr=>{var cn;return(cn=Na.value)==null?void 0:cn.set(yr.id,yr)}))}}else q.value=[],ze.value=[],De.value=[],Fa.value=[],Na.value=new Map;if(Ma=[...new Set(Ma)],Ma=Ma==null?void 0:Ma.map(oa=>({label:oa,type:"methodButton"})),((Il=ie==null?void 0:ie.contents)==null?void 0:Il.length)>0?Da.value=ie==null?void 0:ie.contents:Da.value=[],Da.value=[...Da.value,...Ma],za=[...new Set(za)],za=za==null?void 0:za.map(oa=>({label:oa,type:"methodButton"})),((gl=oe==null?void 0:oe.contents)==null?void 0:gl.length)>0)if((ir=(pr=(_r=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="filterAllType"))==null?void 0:_r.value)==null?void 0:pr.find(oa=>(oa==null?void 0:oa.value)==="onButtonContents"))!=null&&ir.content){let oa=(hr=(Yl=(xl=f==null?void 0:f.find(Ml=>(Ml==null?void 0:Ml.key)==="filterAllType"))==null?void 0:xl.value)==null?void 0:Yl.find(Ml=>(Ml==null?void 0:Ml.value)==="onButtonContents"))==null?void 0:hr.content;if(oa=(Ll=oa==null?void 0:oa.split(":"))==null?void 0:Ll[1],oa=(vr=oa.slice(1,(oa==null?void 0:oa.length)-1))==null?void 0:vr.split(","),Fe.value=(Er=oe==null?void 0:oe.contents)==null?void 0:Er.filter(Ml=>oa==null?void 0:oa.find(sn=>sn===(Ml==null?void 0:Ml.label))),Ne.value=(mr=oe==null?void 0:oe.contents)==null?void 0:mr.filter(Ml=>oa==null?void 0:oa.find(sn=>sn===(Ml==null?void 0:Ml.label))),(Ar=oe==null?void 0:oe.contents)!=null&&Ar.some(Ml=>(Ml==null?void 0:Ml.label)==="OCR识别")&&!((tn=Fe.value)!=null&&tn.some(Ml=>(Ml==null?void 0:Ml.label)==="OCR识别"))){const Ml=(fr=oe==null?void 0:oe.contents)==null?void 0:fr.find(sn=>(sn==null?void 0:sn.label)==="OCR识别");Fe.value=[...Fe.value,Ml],Ne.value=[...Ne.value,Ml]}D.value=!!(oa!=null&&oa.find(Ml=>Ml==="搜索")),re.value=!!(oa!=null&&oa.find(Ml=>Ml==="块状显示"))}else Fe.value=oe==null?void 0:oe.contents,Ne.value=oe==null?void 0:oe.contents;else Fe.value=[],Ne.value=[];if(Fe.value=[...Fe.value,...za],Ne.value=[...Ne.value,...za],typeof de.value=="string"&&de.value==="设备管理/试验设备"&&(d==null?void 0:d.compName)==="设备列表"?((Mr=Fe.value)!=null&&Mr.some(oa=>(oa==null?void 0:oa.label)==="OCR识别")||(Fe.value=[...Fe.value||[],{label:"OCR识别"}]),(Fr=Ne.value)!=null&&Fr.some(oa=>(oa==null?void 0:oa.label)==="OCR识别")||(Ne.value=[...Ne.value||[],{label:"OCR识别"}])):(Fe.value=(Fe.value||[]).filter(oa=>(oa==null?void 0:oa.label)!=="OCR识别"),Ne.value=(Ne.value||[]).filter(oa=>(oa==null?void 0:oa.label)!=="OCR识别")),(Zt=Fe.value)!=null&&Zt.some(oa=>(oa==null?void 0:oa.label)==="切换视图")||(Fe.value=[...Fe.value||[],{label:"切换视图"}]),(Qt=Ne.value)!=null&&Qt.some(oa=>(oa==null?void 0:oa.label)==="切换视图")||(Ne.value=[...Ne.value||[],{label:"切换视图"}]),ge!=null&&ge.some(oa=>{var Ml;return(oa==null?void 0:oa.calculatorFilter)&&((Ml=oa==null?void 0:oa.calculatorFilter)==null?void 0:Ml.includes("@Button"))})){let oa=(es=ge==null?void 0:ge.filter(Pr=>{var Jr;return(Pr==null?void 0:Pr.calculatorFilter)&&((Jr=Pr==null?void 0:Pr.calculatorFilter)==null?void 0:Jr.includes("@Button"))}))==null?void 0:es.map(Pr=>Pr==null?void 0:Pr.calculatorFilter),Ml=[],sn=[],Zn=[];oa==null||oa.forEach(Pr=>{var ho,qn,Wn,qi,vo;let Jr=(ho=le.analyzeSplitToContent(Pr,","))==null?void 0:ho.map(er=>((er==null?void 0:er[(er==null?void 0:er.length)-1])===","&&(er=er==null?void 0:er.slice(0,(er==null?void 0:er.length)-1)),er)),jr=Jr==null?void 0:Jr.find(er=>er==null?void 0:er.includes("@Button"));if(Jr!=null&&Jr.find(er=>er==null?void 0:er.includes("Manual"))){jr=(Wn=(qn=jr==null?void 0:jr.replace("=","$R"))==null?void 0:qn.split("$R"))==null?void 0:Wn[1],jr=jr==null?void 0:jr.slice(1,(jr==null?void 0:jr.length)-1);let er=(qi=le.analyzeSplitToContent(jr,","))==null?void 0:qi.map(en=>((en==null?void 0:en[(en==null?void 0:en.length)-1])===","&&(en=en==null?void 0:en.slice(0,(en==null?void 0:en.length)-1)),en));er=er==null?void 0:er[0],er=er==null?void 0:er.slice(1,(er==null?void 0:er.length)-1),er=(vo=er==null?void 0:er.split(","))==null?void 0:vo.map(en=>({label:en,prop:en})),jr!=null&&jr.includes("Up")?Ml=[...Ml,...er??[]]:jr!=null&&jr.includes("Line")?sn=[...sn,...er??[]]:Zn=[...Zn,...er??[]]}}),Fe.value=[...Ml,...Fe.value??[]],Da.value=[...sn,...Da.value??[]],Zn.value=[...Zn,...Zn.value??[]]}ta.value=((as=De==null?void 0:De.value)==null?void 0:as.length)??0,Kt(De.value),Xl.value=De.value,Kl.value&&(q.value=(rs=(ls=ze.value)==null?void 0:ls.filter(oa=>(oa==null?void 0:oa.label)!=="操作"))==null?void 0:rs.map(oa=>{var Ml;return{...oa,type:"edit",optionUrl:oa!=null&&oa.formMenuSelect&&((Ml=oa==null?void 0:oa.formMenuSelect)==null?void 0:Ml.length)>0?{groupSelect:oa==null?void 0:oa.groupSelect,menuSelect:oa==null?void 0:oa.formMenuSelect,selectRelateType:"",type:oa==null?void 0:oa.formType}:null}}),ht())};e.watch(()=>[d.itemData,rr.value,Nr.value,El.value,V==null?void 0:V.value],async()=>{var f,v,z,L,H,T;if((f=d==null?void 0:d.itemData)!=null&&f.find(ie=>(ie==null?void 0:ie.key)==="columnPath")&&!((v=ce.value)!=null&&v.find(ie=>{var oe,K;return(ie==null?void 0:ie.key)===((K=(oe=d==null?void 0:d.itemData)==null?void 0:oe.find(ke=>(ke==null?void 0:ke.key)==="columnPath"))==null?void 0:K.contents)}))){let ie=ce.value,oe={key:(L=(z=d==null?void 0:d.itemData)==null?void 0:z.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:L.contents,value:(T=(H=d==null?void 0:d.itemData)==null?void 0:H.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:T.contents};ie!=null&&ie.find(K=>(K==null?void 0:K.key)===(oe==null?void 0:oe.key))?ie=ie==null?void 0:ie.map(K=>((K==null?void 0:K.key)===(oe==null?void 0:oe.key)&&(K.value=oe.value),K)):ie.push(oe),Ge.setTableViewContents(ie)}await Jt(d.itemData,d.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.operatingForm,f=>{f!=null&&f.form&&(ji(f==null?void 0:f.form),ya.value=f==null?void 0:f.dialogTitle,Te.value=!0,Ze.value=!0)},{immediate:!0,deep:!0});const Vu=()=>{var f;(f=Y.value)!=null&&f.includes("read")&&(Kl.value=!Kl.value)},Fu=()=>{on.value=!on.value};e.watch(()=>{var f;return(f=d==null?void 0:d.config)==null?void 0:f.viewport},f=>{var v;Y.value=f,(f==null?void 0:f.length)===0?Kl.value=!1:(f!=null&&f.includes("read")||(Kl.value=!0),f!=null&&f.includes("edit")||(Kl.value=!1)),w.value=((v=d==null?void 0:d.config)==null?void 0:v.showIndex)||Kl.value},{immediate:!0}),e.watch(()=>Kl.value,f=>{var v;f?(ht("viewChange"),Ge.setCacheUpdatingData(null)):(Fe.value=Ne.value,q.value=j.value,ee.value&&(Ge.setTableLoading(d==null?void 0:d.index),U("change",ee.value))),w.value=f||((v=d==null?void 0:d.config)==null?void 0:v.showIndex),Rr.value=[]},{immediate:!0}),e.watch(()=>{var f;return(f=On.value)==null?void 0:f.length},f=>{f===0&&(fe.currentPage=1)}),e.watch(()=>d==null?void 0:d.compNames,f=>{G.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:f||[],width:1}]},{immediate:!0}),e.ref(!1);const Pu=(f,v)=>{var z;ht("createClick"),v===fe.pageSize&&(fe.currentPage=Math.ceil(((z=De.value)==null?void 0:z.length)/fe.pageSize))},ju=async(f,v,z)=>{var H,T,ie,oe,K;const L=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(L&&po.includes(L)&&z!==void 0&&z!==null&&String(z).trim()!==""){const ke=String(z).trim();if(await ft(ke,f==null?void 0:f.id)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ye=(H=De.value)==null?void 0:H.findIndex(ra=>(ra==null?void 0:ra.id)===(f==null?void 0:f.id)),qe=Ye!==-1?(ie=(T=De.value)==null?void 0:T[Ye])==null?void 0:ie[L]:void 0;L&&(f[L]=qe??"");return}}if(Kl.value){const ke=f==null?void 0:f.id;ke!=null&&(p.value.has(ke)||p.value.set(ke,M.cloneDeep(f)),o.value.add(ke));const ge=(oe=De.value)==null?void 0:oe.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(f==null?void 0:f.id));ge!==-1&&L&&(De.value[ge]={...De.value[ge],[L]:z}),fo(z,f,v);return}fo(z,f,v),lr.value=M.cloneDeep(f),da.value=f==null?void 0:f.id,ta.value=(K=De.value)==null?void 0:K.length,ya.value=f!=null&&f._isTemp?"新增":"编辑",Ui(!1)},Hu=async()=>{var f,v;try{const z=[];if(d!=null&&d.related&&Array.isArray(d.related)&&(console.log("props.related",d.related),d.related.forEach(L=>{if(typeof L=="string"&&L.includes("content_")){const H=L.split("_")[1];H&&(z.push(`content_${H}`),z.push(`struct_${H}`))}})),z.length===0&&(d!=null&&d.itemData)){const L=(v=(f=d.itemData)==null?void 0:f.find(H=>(H==null?void 0:H.key)==="contentTableId"))==null?void 0:v.contents;L&&(z.push(`content_${L}`),z.push(`struct_${L}`))}return z}catch(z){return console.error("获取 tableNames 失败:",z),[]}},Uu=async(f,v,z)=>{var T,ie;if(!z||typeof z!="string"||z.trim()===""){const oe=(v==null?void 0:v.property)??(v==null?void 0:v.prop),K=`${f==null?void 0:f.id}:${oe}`;m.value.delete(K),y.value.set(K,!1);return}const L=(v==null?void 0:v.property)??(v==null?void 0:v.prop),H=`${f==null?void 0:f.id}:${L}`;y.value.set(H,!0);try{const oe=await Hu();if(oe.length===0){console.warn("未找到同名表,跳过全局搜索"),m.value.delete(H),y.value.set(H,!1);return}const K=parseInt((T=wl.value)==null?void 0:T.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),m.value.delete(H),y.value.set(H,!1);return}const ke=await M.getAllTables({platId:K,tableNames:oe??[]}),ge=((ie=ke==null?void 0:ke.data)==null?void 0:ie.result)||[],Ye=[],qe=[];for(let ra=0;ra<ge.length;ra+=2)ra+1<ge.length&&qe.push([ge[ra],ge[ra+1]]);qe.forEach(([ra,_a])=>{var tl;if(!Array.isArray(ra)||ra.length===0||!Array.isArray(_a)||_a.length===0)return;const za=_a[0];let Ma=((tl=za==null?void 0:za.结构)==null?void 0:tl.contents)??[];if(!Array.isArray(Ma)||Ma.length===0)return;let na=M.cloneDeep(Ma);if(Array.isArray(na==null?void 0:na[0])&&(na=le.getColumnChild(na[0])),!Array.isArray(na)||na.length===0||!na.some(be=>(be==null?void 0:be.prop)===L))return;[...ra].sort((be,Va)=>{const xa=Number((be==null?void 0:be.update_time)??0);return Number((Va==null?void 0:Va.update_time)??0)-xa}).slice(0,20).forEach(be=>{const Va=be[L];if(Va!=null){const xa=String(Va);xa.toLowerCase().includes(z.toLowerCase())&&Ye.findIndex(Ra=>{var Be;return be.id&&((Be=Ra.rowData)==null?void 0:Be.id)===be.id?!0:Ra.label===xa})===-1&&Ye.push({label:xa,rowData:M.cloneDeep(be),sourceTable:(za==null?void 0:za.source_table)||""})}})}),m.value.set(H,Ye)}catch(oe){console.error("全局搜索建议失败:",oe),m.value.delete(H)}finally{y.value.set(H,!1)}},qu=(f,v,z)=>{if(!Kl.value)return;const L=(v==null?void 0:v.property)??(v==null?void 0:v.prop),H=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(H&&H.toUpperCase()!=="INPUT"&&H!=="")return;const T=`${f==null?void 0:f.id}:${L}`;if(g.has(T)&&clearTimeout(g.get(T)),!z||z.trim()===""){m.value.delete(T),y.value.set(T,!1);return}const ie=setTimeout(()=>{Uu(f,{prop:L,property:L},z),g.delete(T)},300);g.set(T,ie)};function Wu(f,v){const z=`${f==null?void 0:f.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return m.value.get(z)||[]}const Ku=(f,v,z)=>{var ke;if(!z||!z.rowData)return;const L=z.rowData,H=f==null?void 0:f.id,T=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(le.getAllLeafNodes(q.value)||[]).filter(ge=>(ge==null?void 0:ge.type)!=="operate"&&(ge==null?void 0:ge.label)!=="操作"&&(ge==null?void 0:ge.prop)!=="operate").forEach(ge=>{const Ye=ge==null?void 0:ge.prop;Ye&&L[Ye]!==void 0&&(f[Ye]=L[Ye])}),(ke=De.value)==null||ke.findIndex(ge=>(ge==null?void 0:ge.id)===H),H!=null&&(p.value.has(H)||p.value.set(H,M.cloneDeep(f)),o.value.add(H));const K=`${H}:${T}`;m.value.delete(K),y.value.set(K,!1),fo(f[T],f,v)},fn=f=>{var K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il;const{row:v,column:z,item:L,slotData:H}=f;let T=v!=null&&v[z==null?void 0:z.prop]||(v==null?void 0:v[z==null?void 0:z.prop])===0?((ke=(K=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:K[0])==null?void 0:ke.contents)??((v==null?void 0:v[z==null?void 0:z.prop])===0?"0":v==null?void 0:v[z==null?void 0:z.prop]):((Ye=(ge=v==null?void 0:v[L==null?void 0:L.prop])==null?void 0:ge[0])==null?void 0:Ye.contents)??(v==null?void 0:v[L==null?void 0:L.prop])??((ra=(qe=H==null?void 0:H[L==null?void 0:L.prop])==null?void 0:qe[0])==null?void 0:ra.contents)??(H==null?void 0:H[L==null?void 0:L.prop])??((Ma=(za=v==null?void 0:v[(_a=L==null?void 0:L.child)==null?void 0:_a.prop])==null?void 0:za[0])==null?void 0:Ma.contents)??(v==null?void 0:v[(na=L==null?void 0:L.child)==null?void 0:na.prop]),oe=Array.isArray(T)&&!(T!=null&&T.every(Sa=>typeof Sa=="string"||typeof Sa=="number"))?"查看":T;if(oe=Array.isArray(oe)?oe.join(","):oe,(z==null?void 0:z.formType)==="Date")if(!oe||oe===""||oe===null||oe===void 0)oe="";else{const Sa=M.dayjs(oe,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);oe=Sa.isValid()?Sa.format("YYYYMMDD"):oe??""}return Array.isArray(z==null?void 0:z.relatedPages)&&((il=z==null?void 0:z.relatedPages)==null?void 0:il.length)>0&&(oe="详情页"),oe},Gu=f=>{var ke,ge,Ye,qe,ra,_a,za,Ma,na,il;const{row:v,column:z,item:L,slotData:H}=f;let T=v!=null&&v[z==null?void 0:z.prop]?((ge=(ke=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:ke[0])==null?void 0:ge.contents)??(v==null?void 0:v[z==null?void 0:z.prop]):((qe=(Ye=v==null?void 0:v[L==null?void 0:L.prop])==null?void 0:Ye[0])==null?void 0:qe.contents)??(v==null?void 0:v[L==null?void 0:L.prop])??((_a=(ra=H==null?void 0:H[L==null?void 0:L.prop])==null?void 0:ra[0])==null?void 0:_a.contents)??(H==null?void 0:H[L==null?void 0:L.prop])??((na=(Ma=v==null?void 0:v[(za=L==null?void 0:L.child)==null?void 0:za.prop])==null?void 0:Ma[0])==null?void 0:na.contents)??(v==null?void 0:v[(il=L==null?void 0:L.child)==null?void 0:il.prop]);const oe=Array.isArray(T)&&!(T!=null&&T.every(Sa=>typeof Sa=="string"||typeof Sa=="number")),K=Array.isArray(T)&&(T==null?void 0:T.find(Sa=>Sa==null?void 0:Sa.url));return oe&&K},Yu=f=>{var H,T,ie,oe;if(!(f!=null&&f.column))return!1;const v=de.value==="试验任务/任务管理",z=(d==null?void 0:d.compName)==="任务列表",L=((T=(H=f==null?void 0:f.column)==null?void 0:H.filter)==null?void 0:T.includes("@TextRGBA"))||((oe=(ie=f==null?void 0:f.column)==null?void 0:ie.filter)==null?void 0:oe.includes("@TextBackRGBA"));return v&&z&&L},Ju=(f,v)=>f.find(z=>Object.values(z).some(L=>L===v));return e.watch(()=>Je.value,async f=>{if(f){Ie.setContentLoading(!0),await e.nextTick();const v=Ju(De.value,f==null?void 0:f.data);if(!v)return Ie.setContentLoading(!1);await uo(f==null?void 0:f.data,null,v,{data:f==null?void 0:f.data}),Ie.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.cacheNewData,f=>{var v;f&&(Array.isArray(f)?f.forEach(z=>{var L,H,T,ie,oe;if(换,String(z==null?void 0:z.compId)===String(d==null?void 0:d.index)&&(z!=null&&z.resId)&&((L=z==null?void 0:z.data)!=null&&L.id)){const K=(H=z==null?void 0:z.data)==null?void 0:H.id,ke=z==null?void 0:z.resId;if(De.value=(T=De.value)==null?void 0:T.map(ge=>{if((ge==null?void 0:ge.id)===K){const Ye={...ge,id:ke};return delete Ye._isOCRRow,delete Ye._ocrTableId,Ye}return ge}),(oe=(ie=Na.value)==null?void 0:ie.has)!=null&&oe.call(ie,K)){const Ye={...Na.value.get(K)||{},id:ke};delete Ye._isOCRRow,delete Ye._ocrTableId,Na.value.delete(K),Na.value.set(ke,Ye)}ar(d==null?void 0:d.index,K,ke)}}):String(f==null?void 0:f.compId)===String(d==null?void 0:d.index)&&(De.value=(v=De.value)==null?void 0:v.map(z=>{var L;if((z==null?void 0:z.id)===((L=f==null?void 0:f.data)==null?void 0:L.id)){const H={...z,id:f==null?void 0:f.resId};return delete H._isOCRRow,delete H._ocrTableId,H}return z})))},{immediate:!0,deep:!0}),(f,v)=>{var na,il,Sa,tl;const z=e.resolveComponent("svg-icon"),L=e.resolveComponent("el-popover"),H=e.resolveComponent("el-switch"),T=e.resolveComponent("el-checkbox"),ie=e.resolveComponent("el-radio"),oe=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-checkbox-group"),ke=e.resolveComponent("el-button"),ge=e.resolveComponent("el-icon"),Ye=e.resolveComponent("el-progress"),qe=e.resolveComponent("el-alert"),ra=e.resolveComponent("el-table-column"),_a=e.resolveComponent("el-table"),za=e.resolveComponent("el-upload"),Ma=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",N3,[$n.value?(e.openBlock(),e.createBlock(dl.ssTable,{id:"excel-table",pageObj:fe,showIndex:w.value,isTree:(na=a.compItem)==null?void 0:na.isTree,summaryInfo:ye,columns:q.value,defaultSort:ve,isCardViewport:on.value,checkedColumns:r.value,key:Ul.value+JSON.stringify(q.value),tableData:On.value,isEditViewport:Kl.value,isShowPagination:je.value,isShowEdit:!1,isShowDelete:!1,allowSelect:A.value,onDbClickRow:nt,extraButton:Fe.value,rowButton:Da.value,cacheExtraButtons:Ne.value,isClearSelection:((il=Rr.value)==null?void 0:il.length)===0,onDoCurrentChange:Po,onDoSizeChange:jo,onSortChange:Ho,onContentClick:uo,onRowClick:ot,onSelectChange:ki,onCellChange:ju,onCellInput:qu,onSelectSuggest:Ku,onChange:fo,onPreview:oo,onSubmitEditingTable:Vn,onHandleColEditChange:qo,onHandleColTypeChange:Wo,onClickButton:dt,onAddNewRow:Ko,bottomButton:O.value,allowRowAddOrDelete:rt.value},e.createSlots({headerButton:e.withCtx(be=>{var Va,xa,Ya,Ra;return[a.showHeader?(e.openBlock(),e.createBlock(e0,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ia)===e.unref(de),filterValues:co.value,selectNums:(Va=Rr.value)==null?void 0:Va.length,dataNums:(xa=De.value)==null?void 0:xa.length,compName:a.compName,isDevMode:a.isDevMode,buttons:be.buttons,menuFilter:(Ra=(Ya=a.compItem)==null?void 0:Ya.component)==null?void 0:Ra.menuFilter,onButtonClick:v[1]||(v[1]=(Be,Q,He)=>dt(Be,Q,{extra:He})),columns:q.value,onFilter:Pi,onGetImportData:dn,level:a.level,filterShow:D.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var be,Va,xa,Ya;return[((be=De.value)==null?void 0:be.length)>0&&a.allowOperate&&re.value?(e.openBlock(),e.createElementBlock("div",M3,[(Va=Y.value)!=null&&Va.includes("read")&&((xa=Y.value)!=null&&xa.includes("edit"))&&((Ya=Da.value)!=null&&Ya.some(Ra=>(Ra==null?void 0:Ra.label)==="编辑"))&&!on.value&&e.unref(ia)!==e.unref(de)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:Vu},[e.createVNode(z,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:be,index:Va})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:xa=>Pu(be,Va)},[e.createVNode(z,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,I3)]),operateCol:e.withCtx(()=>[e.createVNode(L,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Mu,onBeforeEnter:Iu},{reference:e.withCtx(()=>[e.createElementVNode("span",O3,[e.createVNode(z,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",L3,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(H,{"model-value":R.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=be=>Zo(be))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":v[3]||(v[3]=be=>r.value=be),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xn.value,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(T,{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,R3)]),_:2},1032,["value"]),e.createVNode(L,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Va;return[e.createElementVNode("div",$3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Va=Object.keys(be))==null?void 0:Va.filter(xa=>{var Ya;return(Ya=S.value)==null?void 0:Ya.find(Ra=>(Ra==null?void 0:Ra.value)===xa)}),xa=>{var Ya,Ra;return e.openBlock(),e.createElementBlock("div",{key:xa},[E[xa]=="radio"?(e.openBlock(),e.createElementBlock("div",V3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(oe,{"model-value":be==null?void 0:be[xa],onChange:Be=>Fi(Be,xa,be)},{default:e.withCtx(()=>{var Be,Q;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Q=(Be=S.value)==null?void 0:Be.find(He=>(He==null?void 0:He.value)===xa))==null?void 0:Q.options,He=>(e.openBlock(),e.createBlock(ie,{key:He==null?void 0:He.value,label:He==null?void 0:He.value,value:He==null?void 0:He.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(He==null?void 0:He.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),E[xa]=="switch"?(e.openBlock(),e.createBlock(H,{key:1,"model-value":be==null?void 0:be[xa],"active-text":(Ra=(Ya=S.value)==null?void 0:Ya.find(Be=>(Be==null?void 0:Be.value)===xa))==null?void 0:Ra.label,onChange:Be=>Fi(Be,xa,be)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",F3,[e.createVNode(z,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(be=>{var Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l;return[((Va=be==null?void 0:be.column)==null?void 0:Va.label)==="证书附件"||((xa=be==null?void 0:be.column)==null?void 0:xa.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",P3,[e.createVNode(z,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(nl=>Eu(be),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Gu(be)?(e.openBlock(),e.createBlock(L,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",j3,e.toDisplayString(fn(be)),1)]),default:e.withCtx(()=>{var nl,fl;return[e.createElementVNode("div",H3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((fl=be==null?void 0:be.row)==null?void 0:fl[(nl=be==null?void 0:be.column)==null?void 0:nl.prop],Il=>(e.openBlock(),e.createElementBlock("div",U3,[e.createElementVNode("div",{class:"prop-url",title:ti(Il),onClick:gl=>lt(Il)},e.toDisplayString(ti(Il)),9,q3),e.createElementVNode("div",{class:"prop-download",onClick:gl=>so(Il)}," 下载 ",8,W3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Yu(be)?(e.openBlock(),e.createBlock(od,{key:0,value:fn(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(fn(be))&&((Ra=(Ya=fn(be))==null?void 0:Ya.toString())!=null&&Ra.includes(".txt")||(Q=(Be=fn(be))==null?void 0:Be.toString())!=null&&Q.includes(".cpt")||(fa=(He=fn(be))==null?void 0:He.toString())!=null&&fa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(fn(be))&&((Ia=(B=fn(be))==null?void 0:B.toString())!=null&&Ia.includes(".txt")||(sl=(Ua=fn(be))==null?void 0:Ua.toString())!=null&&sl.includes(".cpt")||(Ba=(Ka=fn(be))==null?void 0:Ka.toString())!=null&&Ba.includes(".cyd"))?"underline":"",cursor:!Array.isArray(fn(be))&&((Wl=(ul=fn(be))==null?void 0:ul.toString())!=null&&Wl.includes(".txt")||(Dl=(qa=fn(be))==null?void 0:qa.toString())!=null&&Dl.includes(".cpt")||($l=($a=fn(be))==null?void 0:$a.toString())!=null&&$l.includes(".cyd"))?"pointer":"",marginLeft:(be==null?void 0:be.colIndex)===0?`${((be==null?void 0:be.level)??0)*20}px`:0}),onClick:nl=>{var fl;return $i(fn(be),((fl=be==null?void 0:be.column)==null?void 0:fl.relatedPages)??[])}},e.toDisplayString(fn(be)===0?"0":fn(be)),13,K3))],64))]}),_:2},[((Sa=Da.value)==null?void 0:Sa.length)>0?{name:"actions",fn:e.withCtx(({item:be,fIndex:Va})=>[e.createVNode(L,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",A3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ci(Da.value,be),(xa,Ya)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ya,onClick:e.withModifiers(Ra=>dt(xa==null?void 0:xa.label,be,{extra:xa}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:xa==null?void 0:xa.textColor}),class:"extra-button-label"},e.toDisplayString(xa==null?void 0:xa.label),5)],8,z3))),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),Kl.value?(e.openBlock(),e.createElementBlock("div",G3,[e.createVNode(ke,{id:"themeBorderButton",onClick:Yo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(ke,{class:"ok-button",id:"themeButton",onClick:Vi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode($r.ssDialog,{title:ya.value,visible:Ze.value,width:Lr.value,onBeforeDestroy:Qo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Y3,[e.createVNode(dl.ssForm,{ref_key:"formRef",ref:Ae,rowContents:me.value,showOperator:!1,onChange:Ou,isEnableWrap:!1,layer:!0,onFixChangeValue:Pn,onClickTrigger:et,isEdit:ja.value,onBlurChange:Jo,onCreate:io,onTagChange:In},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Te.value?(e.openBlock(),e.createElementBlock("div",J3,[e.createVNode(ke,{onClick:v[4]||(v[4]=be=>Ze.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(ke,{class:"ok-button",onClick:v[5]||(v[5]=be=>Ui(!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($r.ssDialog,{title:ya.value,visible:pe.value,width:ua.value,onBeforeDestroy:v[7]||(v[7]=be=>pe.value=!1)},{default:e.withCtx(()=>[e.createVNode(h0)]),footer:e.withCtx(()=>[e.createElementVNode("div",X3,[e.createVNode(ke,{onClick:v[6]||(v[6]=be=>pe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(ke,{class:"ok-button",onClick:tt,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),We.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:2,fileDataList:Oe.value,onDestroy:it},null,8,["fileDataList"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createBlock($r.ssDialog,{key:3,visible:te.value,onBeforeDestroy:Au,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:Le.value,threeData:se.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode($r.ssDialog,{title:"OCR扫描录入",visible:bl.value,"close-on-click-modal":!1,onBeforeDestroy:nr,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",Z3,[e.createElementVNode("div",Q3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:aa.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:aa.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:aa.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)]),aa.value===1?(e.openBlock(),e.createElementBlock("div",eh,[e.createVNode(ke,{onClick:C,class:"ocr-action-btn",disabled:br.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(ke,{onClick:ui,class:"ocr-action-btn",disabled:br.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),aa.value===1?(e.openBlock(),e.createElementBlock("div",ah,[e.createElementVNode("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ka.value,(be,Va)=>{var xa;return e.openBlock(),e.createElementBlock("div",{key:Va,class:"ocr-file-item"},[e.createElementVNode("div",rh,[be.raw&&((xa=be.raw.type)!=null&&xa.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:pn(be),alt:"预览",class:"thumbnail-image"},null,8,nh)):(e.openBlock(),e.createElementBlock("div",ih,[e.createVNode(ge,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Gl(be)==="uploading",processing:Gl(be)==="processing",completed:Gl(be)==="completed"||Gl(be)==="uploaded",failed:Gl(be)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",oh,[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:Gl(be)==="completed"||Gl(be)==="uploaded",uploading:Gl(be)==="uploading",processing:Gl(be)==="processing",failed:Gl(be)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Gl(be)==="failed"?"#f56c6c":Gl(be)==="completed"||Gl(be)==="uploaded"?"#67c23a":"#409eff","stroke-width":Gl(be)==="completed"||Gl(be)==="uploaded"||Gl(be)==="failed"?3:2,"stroke-dasharray":Ln(be),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,th)])),Gl(be)==="completed"||Gl(be)==="uploaded"?(e.openBlock(),e.createElementBlock("div",sh,[e.createVNode(ge,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1})])):e.createCommentVNode("",!0),Gl(be)==="failed"?(e.openBlock(),e.createElementBlock("div",ch,[e.createVNode(ge,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ya=>Du(Va)},[e.createVNode(ge,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})],8,uh)]),e.createElementVNode("div",dh,e.toDisplayString(be.name||"文件名123"),1)])}),128))]),ka.value.length>0?(e.openBlock(),e.createElementBlock("div",ph,[e.createVNode(ke,{onClick:cl,class:"ocr-start-recognize-btn",disabled:br.value||ka.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),aa.value===1?(e.openBlock(),e.createElementBlock("div",fh,[e.createVNode(Ye,{percentage:$e.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),aa.value===2?(e.openBlock(),e.createElementBlock("div",hh,[e.createElementVNode("div",vh,[e.createVNode(qe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",mh,[e.createVNode(_a,{data:wa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(ra,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,be=>(e.openBlock(),e.createBlock(ra,{key:be.prop,prop:be.prop,"min-width":be.minWidth||230,"class-name":be.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",yh,[e.createElementVNode("span",null,e.toDisplayString(be.label),1)])]),default:e.withCtx(({row:Va,$index:xa})=>{var Ya,Ra,Be;return[be.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:dr(Va[be.prop]),fontWeight:500})},e.toDisplayString(Ql(Va[be.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Ha.value!==xa?(e.openBlock(),e.createElementBlock("span",gh,e.toDisplayString(Va[be.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Xa(be.prop)),{key:1,modelValue:Va[be.prop],"onUpdate:modelValue":Q=>Va[be.prop]=Q,size:"small",placeholder:"请输入"+be.label,content:((Ya=ba(be.prop))==null?void 0:Ya.contents)??((Ra=ba(be.prop))==null?void 0:Ra.options)??[],optionUrl:(Be=ba(be.prop))==null?void 0:Be.optionUrl,onChange:Q=>Vl(xa,be.prop,Q),onFocus:Q=>va.value=be.prop,onBlur:v[8]||(v[8]=Q=>va.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(ra,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:be})=>[Ha.value===be?(e.openBlock(),e.createBlock(ge,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Va=>ql(be),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(z,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Va=>ql(be),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),aa.value===3?(e.openBlock(),e.createElementBlock("div",bh,[e.createVNode(ge,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(za,{ref:"ocrUploadRef","file-list":ka.value,"onUpdate:fileList":v[9]||(v[9]=be=>ka.value=be),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":rl,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[aa.value!==3?(e.openBlock(),e.createElementBlock("div",kh,[e.createVNode(ke,{onClick:_u,class:"ocr-start-recognize-btn",disabled:aa.value===1||br.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(ke,{onClick:Su,class:"ocr-start-recognize-btn",disabled:br.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(z0,{visible:k.value,onConfirm:F,onCancel:v[10]||(v[10]=be=>k.value=!1)},null,8,["visible"]),e.createVNode(Pd,{visible:hl.value,"onUpdate:visible":v[11]||(v[11]=be=>hl.value=be),versions:Nl.value},null,8,["visible","versions"]),e.createVNode(Dd,{visible:Ca.value,"onUpdate:visible":v[12]||(v[12]=be=>Ca.value=be),images:Aa.value,"default-image-name":pl.value,"field-meta":Ha.value!==null?((tl=wa.value[Ha.value])==null?void 0:tl.__ocrFieldMeta)||{}:{},"focused-field-name":va.value,onClose:v[13]||(v[13]=be=>Ca.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(ep,{visible:Pe.value,"onUpdate:visible":v[14]||(v[14]=be=>Pe.value=be),candidates:kl.value,"name-prop":Ol.value,"mfr-prop":ma.value,columns:q.value,onSubmit:ur,onPreviewFile:Cu},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(tp,{visible:ha.value,"onUpdate:visible":v[15]||(v[15]=be=>ha.value=be),ocrPreviewData:wa.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=be=>wa.value=be),ocrSelectedFields:pa.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=be=>pa.value=be),ocrPreviewColumns:Ee.value,onConfirm:_l,onFieldChange:v[18]||(v[18]=({rowIndex:be,prop:Va,value:xa})=>Vl(be,Va,xa))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode($r.ssDialog,{title:G.title,visible:G.show,width:G.width,onBeforeDestroy:sa},{default:e.withCtx(()=>[e.createElementVNode("div",xh,[e.createVNode(dl.ssForm,{rowContents:G==null?void 0:G.contents,formRules:G==null?void 0:G.formRules,showOperator:!1,buttonValue:G.buttonValue,isEdit:ja.value,isStartJustify:!1,onOnButtonClick:Oa},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode($r.ssDialog,{title:"",visible:J.show,width:J.width,alignCenter:!0,onBeforeDestroy:xe},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",wh,e.toDisplayString(J.title),1),e.createVNode(Ma,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",_h,[e.createVNode(Ma,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(rn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",Sh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J==null?void 0:J.buttonValue,be=>(e.openBlock(),e.createBlock(ke,{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:Va=>Se(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(a0,{columns:J==null?void 0:J.columns,tableData:J==null?void 0:J.tableData},{content:e.withCtx(({row:be,item:Va,slotData:xa,scope:Ya,column:Ra,columnProp:Be,$index:Q})=>[e.createTextVNode(e.toDisplayString((be==null?void 0:be[Ra==null?void 0:Ra.prop])||(be==null?void 0:be[Ra==null?void 0:Ra.label])||(be==null?void 0:be[Ra==null?void 0:Ra.property])||(xa==null?void 0:xa[Ra==null?void 0:Ra.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"]),e.createVNode(dl.Signature,{signPadInfo:al.value,onBeforeDestroy:Qa,onClickSubmitSign:Tl},null,8,["signPadInfo"])])}}},Kc=sr._export_sfc(Ch,[["__scopeId","data-v-edde0776"]]),Dh={key:1,class:"static-form-body"},Th=["onClick"],Bh=["src"],Nh={key:1},Ah=["src"],zh=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},backgroundPosition:{default:"Center"},iconUrl:{default:void 0},calculator:{default:()=>[]}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,i=x=>{switch(x){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},o=e.computed(()=>{var I;const x=(I=r.itemData)==null?void 0:I.find(R=>(R==null?void 0:R.key)==="formContent"),b=(x==null?void 0:x.contents)||[];return(r.fields&&r.fields.length>0?r.fields:b).filter(R=>(R==null?void 0:R.label)||(R==null?void 0:R.isHideInForm)).map(R=>{let re=R==null?void 0:R.value;Array.isArray(re)&&(re=re.map(U=>U==null?"":typeof U=="object"?U.label??U.value??U.name??JSON.stringify(U):String(U)).filter(Boolean).join(",")),re!=null&&typeof re=="object"&&(re=re.label??re.value??re.name??JSON.stringify(re));const X=R.isHideInForm?"":R.label??"",ye=re==null||re===""?"-":String(re),fe=X==="使用状态";return{label:X,value:ye,isStatus:fe,tagType:fe?i(ye):"",width:R.width??1,field:R}})}),p=e.ref(null),c=e.ref(null),u=e.computed(()=>{const x=Number(r==null?void 0:r.textSize),b=le.rgbaToColor(r==null?void 0:r.textColor),_={},I={},R={},re={};return!Number.isNaN(x)&&x&&(_.fontSize=`${x}px`,I.fontSize=`${x+1}px`,R.fontSize=`${x}px`,re.fontSize=`${x}px`),b&&(I.color=b,R.color=b,re.color=b),{item:_,label:I,value:R,empty:re}}),m=e.ref(""),g=e.ref(""),y=e.ref(!1),d=async x=>{if(x){g.value&&(URL.revokeObjectURL(g.value),g.value="");try{const b=await M.platformDownloadFile({url:x}),_=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});g.value=URL.createObjectURL(_)}catch{g.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,x=>{x&&(m.value=x)},{immediate:!0}),e.watch(m,x=>{d(x)},{immediate:!0});const A=async()=>{var x,b;((x=r==null?void 0:r.calculator)==null?void 0:x.length)>0&&await Lt(o.value,"Auto",[],r==null?void 0:r.calculator),(b=c.value)==null||b.click()},w=async x=>{var I,R,re;const b=x.target,_=(I=b==null?void 0:b.files)==null?void 0:I[0];if(!_){b.value="";return}y.value=!0;try{const X=new FormData;X.append("file",_);const ye=await M.platformUploadFile(X),fe=(re=(R=ye==null?void 0:ye.data)==null?void 0:R.result)==null?void 0:re.url;fe?(m.value=fe,n("update:backGroundImage",fe),d(fe),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{y.value=!1,b.value=""}},Y=e.computed(()=>{var x,b,_,I;return g.value||(r==null?void 0:r.backgroundUrl)!==""?{backgroundImage:`url("${(x=r==null?void 0:r.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundPosition:`${((b=r==null?void 0:r.backgroundPosition)==null?void 0:b.toLowerCase())??"center"} center`,backgroundRepeat:"no-repeat",cursor:((_=r==null?void 0:r.calculator)==null?void 0:_.length)>0?"pointer":"auto"}:{cursor:((I=r==null?void 0:r.calculator)==null?void 0:I.length)>0?"pointer":"auto"}}),D=x=>dl.getComponent(x),P=x=>{if(!x)return;const b=x.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},O=(x,b,_)=>{r.disabled||(p.value=b,e.nextTick(()=>{P(_.currentTarget)}))},E=()=>{p.value=null},S=x=>{const b=x!=null&&x.width&&x.width>0?x.width:1,I=`calc((100% - ${(b-1)*48}px) / ${b})`;return{flex:`0 0 ${I}`,maxWidth:I,minWidth:"0",boxSizing:"border-box"}};return(x,b)=>{const _=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(Y.value),onClick:b[1]||(b[1]=I=>A())},[(r==null?void 0:r.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(I=>A(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:w},null,544),b[2]||(b[2]=e.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(I,R)=>{var re,X,ye,fe,U,q,Z,ae,ve;return e.openBlock(),e.createElementBlock("div",{key:R,class:"static-form-item",style:e.normalizeStyle({...S(I),...u.value.item})},[I.label&&!((re=I==null?void 0:I.field)!=null&&re.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(u.value.label)},e.toDisplayString(I.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(u.value.value),onClick:ze=>{var te;return(te=I.field)!=null&&te.isNoClick?null:O(I,R,ze)}},[x.iconUrl&&x.backgroundPosition==="Left"?(e.openBlock(),e.createElementBlock("img",{key:0,src:x.iconUrl,class:"bg-upload-icon"},null,8,Bh)):e.createCommentVNode("",!0),p.value===R&&I.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(((X=I.field)==null?void 0:X.type)??"Input")),{key:1,modelValue:I.field.value,"onUpdate:modelValue":ze=>I.field.value=ze,isEdit:!0,disabled:(ye=I.field)==null?void 0:ye.disabled,content:((fe=I.field)==null?void 0:fe.contents)??[],optionUrl:I.field,originalValue:(U=I.field)==null?void 0:U.value,config:(q=I.field)==null?void 0:q.config,configModel:((Z=I.field)==null?void 0:Z.prop)??((ae=I.field)==null?void 0:ae.name),selectedTagList:((ve=I.field)==null?void 0:ve.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[I.isStatus?(e.openBlock(),e.createBlock(_,{key:0,type:I.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Nh,e.toDisplayString(I.value??"-"),1))],64)),x.iconUrl&&x.backgroundPosition==="Right"?(e.openBlock(),e.createElementBlock("img",{key:3,src:x.iconUrl,class:"bg-upload-icon"},null,8,Ah)):e.createCommentVNode("",!0)],12,Th)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(u.value.empty)}," 暂无数据 ",4))],4)}}}),Gc=sr._export_sfc(zh,[["__scopeId","data-v-60da0bde"]]),Mh={class:"form-content"},Ih={title:"选择标签"},Oh={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Lh={class:"col-operate-wrap"},Rh={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},$h={__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:()=>{}},calculator:{type:Array,default:()=>[]}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const r=()=>{m.value=!1,g.value=!1,y.value=[]},n=a;e.computed(()=>{var ua;const ne=(ua=We.value)==null?void 0:ua.split("/");return(ne==null?void 0:ne.some(Qe=>(Qe==null?void 0:Qe.includes("updateLoading"))||(Qe==null?void 0:Qe.includes("loading"))))?!1:N.value==="view"});const i=l,o=e.ref(""),p=e.ref(""),c=e.ref("Center"),u=e.ref([]),m=e.ref(!1),g=e.ref(!1),y=e.ref([]),{getFileExtension:d}=Do.useThreeSystem(),A=e.ref(),w=e.ref(!1),Y=e.ref(!1),D=M.useUnit(M.pinia),{chooseTitle:P}=M.storeToRefs(D),O=e.ref([]),E=e.ref(),S=e.ref(!1),x=e.ref([]),b=_c(M.pinia),_=$t(M.pinia),I=e.ref(!1),R=e.ref(),re=e.ref(),X=e.ref(),ye=e.ref(),fe=e.ref(),U=M.useLoginState(M.pinia),{loginUserInfo:q}=M.storeToRefs(U),Z=e.ref(),ae=e.ref(!0),ve=M.useModelComp(M.pinia),{tableViewContents:ze,itemData:te,isEdit:N,routeToChildPath:se,lockingPage:W,homepageBackgroundTableId:ue,refreshCurrentPageInform:_e}=M.storeToRefs(ve),we=e.ref(null),Ke=e.ref(!1),la=e.ref(!1),j=M.useMenuState(),{activeMenuPath:We}=M.storeToRefs(j),Oe=le.useOriginalState(M.pinia),{originalPath:Ie}=M.storeToRefs(Oe),{compType:Me,hasEditable:de}=cc.useRole(),Ce=()=>!de(n.config,{type:Me.FORM});e.computed(()=>We.value==="设备管理/试验设备"&&n.compName==="设备概要");const Je=async()=>{var ua,Qe,Da;const ne=ue==null?void 0:ue.value,pe=(ua=q==null?void 0:q.value)==null?void 0:ua.plat_id;if(!(!ne||!pe))try{const Te=await M.getAllTables({platId:parseInt(pe),tableNames:[`content_${ne}`,`struct_${ne}`],user_unique_id:"0"}),Le=((Da=(Qe=Te==null?void 0:Te.data)==null?void 0:Qe.result)==null?void 0:Da[0])??[],Fe=String((n==null?void 0:n.index)??""),Ne=Le==null?void 0:Le.find(me=>String(me==null?void 0:me.relatedForm_id)===Fe);Ne!=null&&Ne.backgroundImg_url&&(ye.value=Ne.backgroundImg_url)}catch(Te){console.error("获取首页背景图片表数据失败:",Te)}},Ea=e.ref([]),Ge=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),$=async ne=>{la.value=ne,await Ve("disabled",null,ne,!0)},V=async ne=>{await Ve("operable",null,ne,!0)};e.watch(()=>We.value,async()=>{u.value=[],y.value=[]},{deep:!0,immediate:!0});const ee=()=>{e.nextTick(()=>{ia()})},ce=ne=>{var pe;u.value=(pe=u.value)==null?void 0:pe.map(ua=>({...ua,isFormColHidden:!(ne!=null&&ne.includes(ua.label))}))};e.onUnmounted(()=>{we.value=null});const he=ne=>{i("clickTrigger",ne)},ca=async ne=>{var pe,ua,Qe,Da,Te,Le;if(ne===""){let Fe="";(pe=u.value)==null||pe.forEach(Qa=>{Qa!=null&&Qa.isMain&&(Fe=Qa==null?void 0:Qa.value)});let Ne=await le.getItemData(se.value,sessionStorage.getItem("systemKey"),"");Fe=((Le=(Te=(Da=(Qe=(ua=Ne==null?void 0:Ne[0])==null?void 0:ua.compData)==null?void 0:Qe.find(Qa=>(Qa==null?void 0:Qa.key)==="mainRouters"))==null?void 0:Da.contents)==null?void 0:Te[0])==null?void 0:Le.routerContent)+Ie.value+Fe;let al=await le.getItemData(Fe,sessionStorage.getItem("systemKey"),"");S.value=!0,x.value=al==null?void 0:al.filter(Qa=>(Qa==null?void 0:Qa.comp)!=="methodButton"),i("routeUrl",x.value)}},ia=()=>{var pe;const ne=(pe=we.value)==null?void 0:pe.$el;ne&&Fl.Sortable.create(ne,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ua=>{const{oldIndex:Qe,newIndex:Da}=ua;if(Qe===Da)return;const Te=u.value.splice(Qe,1)[0];u.value.splice(Da,0,Te)}})},Ve=async(ne,pe,ua,Qe=!1)=>{try{ve.setRefreshCurStructure(!1)}catch{Ja.ElMessage.error("编辑处理失败")}},ga=async(ne,pe)=>{await Ve()},Ta=async(ne,pe)=>{ne&&await Ve()},De=async(ne,pe,ua)=>{await Ve(pe,ua,ne,!1)},Fa=(ne,pe)=>{Z.value===pe?ae.value=!1:ae.value=!0,Z.value=pe==null?void 0:pe.changeProp},Na=async ne=>{var Le;ye.value=ne;const pe=n.itemData,ua=pe==null?void 0:pe.find(Fe=>(Fe==null?void 0:Fe.key)==="backGroundImage");ua?ua.contents=ne:pe==null||pe.push({key:"backGroundImage",contents:ne}),i("change",{key:"backGroundImage",contents:ne});const Qe=ue==null?void 0:ue.value,Da=n==null?void 0:n.index,Te=(Le=q==null?void 0:q.value)==null?void 0:Le.plat_id;if(!(!Qe||!Te||!Da||!ne))try{await M.pageBatchAddApi({platId:parseInt(Te),changeContents:[{tableName:`content_${Qe}`,tableContents:[{backgroundImg_url:ne,relatedForm_id:String(Da)}]}],user_unique_id:"0"})}catch(Fe){console.error("保存背景图片记录失败:",Fe),Ja.ElMessage.error("背景图片记录保存失败")}},da=async ne=>{var ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll;let pe=[];if((ua=ne==null?void 0:ne.toString())!=null&&ua.includes(".urdf")){if(ne.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}y.value=[{url:ne,extension:d(ne)}],g.value=!0,m.value=!0;return}if((Qe=ne==null?void 0:ne.toString())!=null&&Qe.includes(".stl")||(Da=ne==null?void 0:ne.toString())!=null&&Da.includes(".STL")||(Te=ne==null?void 0:ne.toString())!=null&&Te.includes(".obj")||(Le=ne==null?void 0:ne.toString())!=null&&Le.includes(".mtl")){const Wa=((Fe=ne==null?void 0:ne.toString())==null?void 0:Fe.split(",")).map(Hl=>({url:Hl,extension:d(Hl)}));y.value=Wa,g.value=!1,m.value=!0;return}if((Ne=ne==null?void 0:ne.toString())!=null&&Ne.includes(".stl")||(me=ne==null?void 0:ne.toString())!=null&&me.includes(".STL")||(al=ne==null?void 0:ne.toString())!=null&&al.includes(".obj")||(Qa=ne==null?void 0:ne.toString())!=null&&Qa.includes(".mtl")){let jl,Wa=[],Hl={};if(Array.isArray(ne)?jl=ne:jl=ne==null?void 0:ne.split(","),jl==null||jl.forEach(Jl=>{Jl.includes(".mtl")?Wa.push(Jl):Hl.blob=Hl.blob?Hl.blob+","+Jl:Jl}),(Wa==null?void 0:Wa.length)>0&&(Hl.mtlBlobs=Wa),(Rl=(Tl=Object.values(Hl))==null?void 0:Tl[0])!=null&&Rl.includes("http:"))pe.push(Hl);else{const Jl=new Blob([Hl.blob],{type:"application/octet-stream;charset=UTF-8"});let ar=URL.createObjectURL(Jl),bl="";(Al=ne==null?void 0:ne.split("/"))==null||Al.forEach((br,ka)=>{var ol;ka===((ol=ne==null?void 0:ne.split("/"))==null?void 0:ol.length)-1&&(bl=br)}),(Pl=Hl.blob)!=null&&Pl.includes(".stl")&&(bl=(bl==null?void 0:bl.replaceAll(">",""))+".urdf"),E.value=[{name:bl,blobUrl:ar}],Y.value=!0}}else{const jl=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Wa=await Ja.axios.get(ne,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{jl.close()}),Hl=new Blob([Wa.data],{type:"application/octet-stream;charset=UTF-8"});let Jl=URL.createObjectURL(Hl),ar="";(ll=ne==null?void 0:ne.split("/"))==null||ll.forEach((bl,br)=>{var ka;br===((ka=ne==null?void 0:ne.split("/"))==null?void 0:ka.length)-1&&(ar=bl)}),E.value=[{name:ar,blobUrl:Jl}],Y.value=!0}(pe==null?void 0:pe.length)>0&&_.setBlobUrls(pe)},ja=()=>{Y.value=!1},ta=ne=>{var Te,Le,Fe,Ne;const pe=(Le=(Te=dl.safeClone(n.itemData))==null?void 0:Te.find(me=>(me==null?void 0:me.key)==="formContent"))==null?void 0:Le.contents,ua=dl.safeClone(ne.content);let Qe={};ua&&((Fe=Object.values(ua))==null?void 0:Fe.length)>0&&((Ne=Object.values(ua))==null||Ne.forEach((me,al)=>{Qe[pe[al].key]=me}));const Da={content:Qe,index:n==null?void 0:n.index,buttonName:ne==null?void 0:ne.buttonName};i("change",Da)};e.computed(()=>"http://222.92.178.198:62001");const je=async ne=>{var Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl;if(!ne)return;(Rl=(Tl=n==null?void 0:n.itemData)==null?void 0:Tl.find(aa=>(aa==null?void 0:aa.key)==="parentFormPath"))==null||Rl.contents;let pe=ze.value;(pe==null?void 0:pe.length)>0&&(pe=pe==null?void 0:pe.map(aa=>{var Ga,$e,ha,wa;let Pa=(Ga=aa==null?void 0:aa.key)==null?void 0:Ga.split("/");return(n==null?void 0:n.compName)===(Pa==null?void 0:Pa[0])&&($e=u.value)!=null&&$e.find(Ee=>(Ee==null?void 0:Ee.prop)===(Pa==null?void 0:Pa[1]))&&(aa.value=(wa=(ha=u.value)==null?void 0:ha.find(Ee=>(Ee==null?void 0:Ee.prop)===(Pa==null?void 0:Pa[1])))==null?void 0:wa.value),aa}),ve.setTableViewContents(pe));const ua=dl.safeClone(n.itemData);let Qe=ua==null?void 0:ua.map(aa=>{var Pa;return(aa==null?void 0:aa.key)==="formContent"&&((Pa=aa.contents)==null||Pa.map((Ga,$e)=>{var ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl,Pe,kl,cr,Cr,ea,La,Bl,Ol;return Ga.type=(wa=(ha=u.value)==null?void 0:ha.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:wa.type,Ga.options=Ga!=null&&Ga.options?Ga.options:((Xa=(ba=(Ee=Ga==null?void 0:Ga.key)==null?void 0:Ee.split("$"))==null?void 0:ba[1])==null?void 0:Xa.length)>0?(Ha=(pa=rd((zl=(yl=Ga==null?void 0:Ga.key)==null?void 0:yl.split("$"))==null?void 0:zl[1]))==null?void 0:pa.split(","))==null?void 0:Ha.map(ma=>({label:ma,value:ma})):[],(va=Ga==null?void 0:Ga.key)!=null&&va.includes("$")&&(Ga.key=(Aa=(Ca=Ga==null?void 0:Ga.key)==null?void 0:Ca.split("$"))==null?void 0:Aa[0]),Ga.signature=(Pe=(pl=u.value)==null?void 0:pl.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:Pe.signature,Ga.isLoginUser=(cr=(kl=u.value)==null?void 0:kl.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:cr.isLoginUser,Ga.value=(Cr=Object.values(ne))==null?void 0:Cr[$e],Ga.isFormColHidden=(La=(ea=u.value)==null?void 0:ea.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:La.isFormColHidden,Ga.isHideInForm=(Ol=(Bl=u.value)==null?void 0:Bl.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:Ol.isHideInForm,Ga})),aa}),Da=u.value,Te=(Pl=(Al=dl.safeClone(Qe))==null?void 0:Al.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:Pl.contents;if(Da=Da==null?void 0:Da.map(aa=>{var Pa,Ga;return(aa==null?void 0:aa.type)==="Select"&&((Pa=aa==null?void 0:aa.allSelectionContents)==null?void 0:Pa.length)>0&&(aa.contactValue=ne),aa.value=(Ga=Te==null?void 0:Te.find(($e,ha)=>(($e==null?void 0:$e.id)??ha)===(aa==null?void 0:aa.id)))==null?void 0:Ga.value,aa}),!ae.value){i("contentChange",{contents:Qe,index:n.index});return}let Le="",Fe=(Wa=(jl=(ll=dl.safeClone(Qe))==null?void 0:ll.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:jl.contents)==null?void 0:Wa.find((aa,Pa)=>{var Ga,$e,ha;return(aa==null?void 0:aa.label)===Z.value||Pa.toString()===((ha=($e=(Ga=Z.value)==null?void 0:Ga.split("t"))==null?void 0:$e[1])==null?void 0:ha.toString())}),Ne=(Hl=Fe==null?void 0:Fe.optionUrl)==null?void 0:Hl.menuSelect,me=!0;if((bl=(ar=(Jl=dl.safeClone(Qe))==null?void 0:Jl.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:ar.contents)==null||bl.forEach(aa=>{var Pa,Ga,$e,ha,wa,Ee;me&&(($e=(Ga=(Pa=aa==null?void 0:aa.optionUrl)==null?void 0:Pa.groupSelect)==null?void 0:Ga[1])!=null&&$e.includes("["))&&(Le=(wa=(ha=aa==null?void 0:aa.optionUrl)==null?void 0:ha.groupSelect)==null?void 0:wa[1],JSON.stringify(Ne)===JSON.stringify((Ee=aa==null?void 0:aa.optionUrl)==null?void 0:Ee.menuSelect)&&(me=!1))}),(br=Fe==null?void 0:Fe.optionUrl)!=null&&br.menuSelect&&ae.value){let aa=await Tt(Fe),Pa,Ga=(ka=Fe==null?void 0:Fe.optionUrl)==null?void 0:ka.menuSelect;if(aa==null||aa.forEach($e=>{var ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va;Le===((wa=(ha=Fe==null?void 0:Fe.optionUrl)==null?void 0:ha.groupSelect)==null?void 0:wa[1])&&((Xa=(ba=(Ee=Fe==null?void 0:Fe.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:ba[1])!=null&&Xa.includes("["))&&((va=dl.safeClone($e))==null?void 0:va[(Ha=(pa=(zl=(yl=Fe==null?void 0:Fe.optionUrl)==null?void 0:yl.groupSelect)==null?void 0:zl[1])==null?void 0:pa.replaceAll("[",""))==null?void 0:Ha.replaceAll("]","")])===(Fe==null?void 0:Fe.value)&&(Pa=$e)}),Pa){let $e=dl.safeClone(Da);$e=$e==null?void 0:$e.map(wa=>{var Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl;return(Pa!=null&&Pa[wa==null?void 0:wa.label]||Pa!=null&&Pa[(yl=(Xa=(ba=(Ee=wa==null?void 0:wa.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:ba[1])==null?void 0:Xa.replaceAll("[",""))==null?void 0:yl.replaceAll("]","")])&&((Ha=(pa=(zl=wa==null?void 0:wa.optionUrl)==null?void 0:zl.groupSelect)==null?void 0:pa[1])!=null&&Ha.includes("["))&&Ga!=null&&Ga.every(Pe=>{var kl,cr;return(cr=(kl=wa==null?void 0:wa.optionUrl)==null?void 0:kl.menuSelect)==null?void 0:cr.includes(Pe)})&&(wa.value=(Pa==null?void 0:Pa[wa==null?void 0:wa.label])||(Pa==null?void 0:Pa[(pl=(Aa=(Ca=(va=wa==null?void 0:wa.optionUrl)==null?void 0:va.groupSelect)==null?void 0:Ca[1])==null?void 0:Aa.replaceAll("[",""))==null?void 0:pl.replaceAll("]","")]),Array.isArray(wa.value)&&wa.value.every(Pe=>(Pe==null?void 0:Pe.url)&&(Pe==null?void 0:Pe.name))&&(wa.type="Upload")),wa}),$e=$e==null?void 0:$e.map(wa=>{var Ee,ba,Xa;return(Ee=wa==null?void 0:wa.optionUrl)!=null&&Ee.oldMenuSelect&&(wa.optionUrl.menuSelect=(Xa=(ba=dl.safeClone(wa))==null?void 0:ba.optionUrl)==null?void 0:Xa.oldMenuSelect),wa}),u.value=dl.safeClone($e);let ha=dl.safeClone($e);ha=ha==null?void 0:ha.map(wa=>{var Ee,ba,Xa,yl,zl,pa;return(ba=(Ee=wa==null?void 0:wa.optionUrl)==null?void 0:Ee.menuSelect)!=null&&ba.some(Ha=>Ha==null?void 0:Ha.includes("["))&&(wa.optionUrl.oldMenuSelect=(yl=(Xa=dl.safeClone(wa))==null?void 0:Xa.optionUrl)==null?void 0:yl.menuSelect,wa.optionUrl.menuSelect=(pa=(zl=wa==null?void 0:wa.optionUrl)==null?void 0:zl.menuSelect)==null?void 0:pa.map(Ha=>{var va,Ca,Aa,pl;if(Ha!=null&&Ha.includes("[")){let Pe=(Ca=(va=Ha==null?void 0:Ha.replaceAll("[","").replaceAll("]",""))==null?void 0:va.split(":"))==null?void 0:Ca[1];Ha=(pl=(Aa=dl.safeClone($e))==null?void 0:Aa.find(kl=>(kl==null?void 0:kl.label)===Pe))==null?void 0:pl.value}return Ha})),wa}),u.value=ha}else u.value=Da;Qe=Qe==null?void 0:Qe.map($e=>{var ha;return($e==null?void 0:$e.key)==="formContent"&&($e.contents=(ha=$e.contents)==null?void 0:ha.map(wa=>{var Ee,ba,Xa,yl;return wa.value=((ba=(Ee=u.value)==null?void 0:Ee.find(zl=>(zl==null?void 0:zl.label)===(wa==null?void 0:wa.key)))==null?void 0:ba.value)??(wa==null?void 0:wa.value),wa.type=((yl=(Xa=u.value)==null?void 0:Xa.find(zl=>(zl==null?void 0:zl.prop)===(wa==null?void 0:wa.key)))==null?void 0:yl.type)??(wa==null?void 0:wa.type),wa})),$e})}ae.value=!1,i("contentChange",{contents:Qe,index:n.index});let al=[],Qa=[];if((hl=dl.safeClone((ol=Qe==null?void 0:Qe.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:ol.contents))==null||hl.forEach(aa=>{var Pa;Array.isArray(aa==null?void 0:aa.value)&&((Pa=aa==null?void 0:aa.value)!=null&&Pa.find(Ga=>{var $e;return($e=Ga==null?void 0:Ga.url)==null?void 0:$e.includes(".obj")}))&&(Qa=aa==null?void 0:aa.value)}),(Qa==null?void 0:Qa.length)>0){const aa=(Nl=dl.safeClone(Qa))==null?void 0:Nl.filter(Pa=>{var Ga;return(Ga=Pa==null?void 0:Pa.url)==null?void 0:Ga.includes(".obj")});aa==null||aa.forEach(Pa=>{var $e,ha,wa,Ee;const Ga=($e=Qa==null?void 0:Qa.filter(ba=>{var Xa;return(ba==null?void 0:ba.name)===(Pa==null?void 0:Pa.name)&&((Xa=ba==null?void 0:ba.url)==null?void 0:Xa.includes(".mtl"))}))==null?void 0:$e.map(ba=>ba==null?void 0:ba.url);al.push({objUrl:Pa==null?void 0:Pa.url,mtlUrls:((ha=Qa==null?void 0:Qa.filter(ba=>{var Xa;return(ba==null?void 0:ba.name)===(Pa==null?void 0:Pa.name)&&((Xa=ba==null?void 0:ba.url)==null?void 0:Xa.includes(".mtl"))}))==null?void 0:ha.length)===1?(Ee=(wa=Qa==null?void 0:Qa.filter(ba=>{var Xa;return(ba==null?void 0:ba.name)===(Pa==null?void 0:Pa.name)&&((Xa=ba==null?void 0:ba.url)==null?void 0:Xa.includes(".mtl"))}))==null?void 0:wa[0])==null?void 0:Ee.url:Ga})}),_.setObjUrl(al)}},ya=(ne,pe,ua)=>{let Qe="";const Da=pe==null?void 0:pe.map(Te=>{var Le;return(Le=Te==null?void 0:Te.value)==null?void 0:Le.pageData});return Da==null||Da.forEach(Te=>{var Le;(Te==null?void 0:Te.name)===(ne==null?void 0:ne[0])&&((Le=Te==null?void 0:Te.compData)==null||Le.forEach(Fe=>{var Ne;(Fe==null?void 0:Fe.key)==="formContent"&&((Ne=Fe==null?void 0:Fe.contents)==null||Ne.forEach(me=>{var al;(me==null?void 0:me.prop)===(ne==null?void 0:ne[1])&&(Qe=(me==null?void 0:me.value)===""?le.judgeContents((al=dl.safeClone(me))==null?void 0:al.optionUrl,ua):me==null?void 0:me.value)}))}))}),Qe},Ze=(ne,pe,ua,Qe)=>{var Fe,Ne;let Da="",Te="";(Fe=dl.safeClone(pe))==null||Fe.forEach((me,al)=>{me!=null&&me.includes("[")?Te=Te+Ie.value+ne[al]:Te=Te===""?Te+me:Te+"/"+me});let Le=(Ne=Qe[Te])==null?void 0:Ne.map(me=>{var al;return(al=me==null?void 0:me.value)==null?void 0:al.pageData});return Le==null||Le.forEach(me=>{var al;(me==null?void 0:me.name)===(ua==null?void 0:ua[0])&&((al=me==null?void 0:me.compData)==null||al.forEach(Qa=>{var Tl;(Qa==null?void 0:Qa.key)==="formContent"&&((Tl=Qa==null?void 0:Qa.contents)==null||Tl.forEach(Rl=>{(Rl==null?void 0:Rl.prop)===(ua==null?void 0:ua[1])&&(Da=Rl==null?void 0:Rl.value)}))}))}),Da};e.watch(()=>ue==null?void 0:ue.value,async()=>{await Je()},{immediate:!0});const Ae=async ne=>await Lt(ne,"Auto");return e.watch(()=>_e.value,async()=>{var ne;(ne=u.value)!=null&&ne.some(pe=>(pe==null?void 0:pe.functionName)&&(pe==null?void 0:pe.functionName)!=="")&&(u.value=await Ae(u.value))},{immediate:!0,deep:!0}),e.watch(()=>n.itemData,async()=>{var Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl,aa,Pa,Ga,$e,ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl,Pe,kl,cr,Cr;const ne=(Rl=n.itemData)==null?void 0:Rl.find(ea=>(ea==null?void 0:ea.key)==="formContent");let pe=(Al=n.itemData)==null?void 0:Al.find(ea=>(ea==null?void 0:ea.key)==="backGround");pe&&((Pl=pe==null?void 0:pe.contents)==null?void 0:Pl.length)>0&&(((jl=(ll=pe==null?void 0:pe.contents)==null?void 0:ll[0])==null?void 0:jl.fileType)==="Picture"&&(o.value=((Hl=(Wa=pe==null?void 0:pe.contents)==null?void 0:Wa[0])==null?void 0:Hl.url)??""),((ar=(Jl=pe==null?void 0:pe.contents)==null?void 0:Jl[0])==null?void 0:ar.fileType)==="Icon"&&(p.value=((br=(bl=pe==null?void 0:pe.contents)==null?void 0:bl[0])==null?void 0:br.url)??""),c.value=((ol=(ka=pe==null?void 0:pe.contents)==null?void 0:ka[0])==null?void 0:ol.position)??"");const ua=(hl=dl.safeClone(n.itemData))==null?void 0:hl.find(ea=>(ea==null?void 0:ea.key)==="formButton"),Qe=(Nl=dl.safeClone(n.itemData))==null?void 0:Nl.find(ea=>(ea==null?void 0:ea.key)==="formFlex"),Da=(aa=dl.safeClone(n.itemData))==null?void 0:aa.find(ea=>(ea==null?void 0:ea.key)==="formWrap"),Te=(Pa=dl.safeClone(n.itemData))==null?void 0:Pa.find(ea=>(ea==null?void 0:ea.key)==="enableWrap"),Le=(Ga=dl.safeClone(n.itemData))==null?void 0:Ga.find(ea=>(ea==null?void 0:ea.key)==="textSize"),Fe=($e=dl.safeClone(n.itemData))==null?void 0:$e.find(ea=>(ea==null?void 0:ea.key)==="textRGBA"),Ne=(ha=dl.safeClone(n.itemData))==null?void 0:ha.find(ea=>(ea==null?void 0:ea.key)==="backGround"),me=(wa=dl.safeClone(n.itemData))==null?void 0:wa.find(ea=>(ea==null?void 0:ea.key)==="backGroundImage");(Da==null?void 0:Da.contents)==="纵向"?w.value=!1:w.value=!0;const al=Number(Le==null?void 0:Le.contents);R.value=Number.isNaN(al)?void 0:al,re.value=Fe==null?void 0:Fe.contents,X.value=Ne==null?void 0:Ne.contents,ye.value=me==null?void 0:me.contents;const Qa=Te==null?void 0:Te.contents;if(Qa===void 0?I.value=fi.BLOCK:typeof Qa=="boolean"?I.value=Qa?fi.ORDINARY:fi.BLOCK:I.value=Qa,fe.value=typeof(Qe==null?void 0:Qe.contents)!="boolean"?!(!(Qe!=null&&Qe.contents)===""||((Ee=Qe==null?void 0:Qe.contents)==null?void 0:Ee.toUpperCase())==="VERTICAL"):Qe==null?void 0:Qe.contents,((ba=ne==null?void 0:ne.contents)==null?void 0:ba.length)>0&&Array.isArray(ne==null?void 0:ne.contents)){let ea=n.allMapContents;const La=(yl=(Xa=dl.safeClone(ne))==null?void 0:Xa.contents)==null?void 0:yl.map((Re,ur)=>{var wl,Lr,Kl,on,Rr,qr,En,$n,Cn,mn,Mn,rn,Dn;let wr=(Re==null?void 0:Re.label)??(Re==null?void 0:Re.key)??"";Re==null||Re.type;let Yr=(Re==null?void 0:Re.options)??[];if((wl=Re==null?void 0:Re.key)!=null&&wl.includes("$")&&(wr=(Lr=dl.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Lr[0],((on=(Kl=dl.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Kl[1])==null?void 0:on.length)>0)){const[Vr,Xr]=(qr=(Rr=dl.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Rr[1])==null?void 0:qr.split(/[()]/);(En=le.FormType.find(_n=>(_n==null?void 0:_n.key)===Vr))==null||En.value,(($n=Xr==null?void 0:Xr.split(","))==null?void 0:$n.length)>0&&(Yr=(Cn=Xr==null?void 0:Xr.split(","))==null?void 0:Cn.map(_n=>({label:_n,value:_n})))}let tr=Re==null?void 0:Re.options;((mn=Re==null?void 0:Re.optionUrl)==null?void 0:mn.selectRelateType)==="自定义绑定"&&(tr=(rn=(Mn=Re==null?void 0:Re.optionUrl)==null?void 0:Mn.defaultSelect)==null?void 0:rn.map(Vr=>({label:Vr,value:Vr})));let lr=(Re==null?void 0:Re.menuPath)??[],un=(Re==null?void 0:Re.groups)??[],Xl=(Re==null?void 0:Re.columns)??[],Ul=!1,Tr=(Re==null?void 0:Re.isFormColHidden)??!1,Nr="",El=Re!=null&&Re.value?Re.value:(tr==null?void 0:tr.length)>0?(Dn=tr==null?void 0:tr[0])==null?void 0:Dn.value:(Re==null?void 0:Re.value)??"",Zl=!1,rr="Input";return((tr==null?void 0:tr.length)>0||(lr==null?void 0:lr.length)>0)&&(rr="Select"),(Array.isArray(Nr)&&(Nr!=null&&Nr.every(Vr=>(Vr==null?void 0:Vr.name)&&(Vr==null?void 0:Vr.url)))||Array.isArray(El)&&(El!=null&&El.every(Vr=>(Vr==null?void 0:Vr.name)&&(Vr==null?void 0:Vr.url))))&&(rr="upload"),Re!=null&&Re.isMainUrl&&(rr="Url"),{label:wr??"",name:wr??"t"+ur,prop:wr??dl.safeClone(Re==null?void 0:Re.key),type:(Re==null?void 0:Re.type)??rr,value:(Re==null?void 0:Re.type)==="Date"&&El===""?new Date:El,id:(Re==null?void 0:Re.id)??ur,contents:(tr==null?void 0:tr.length)>0?tr:Yr??[],width:(Re==null?void 0:Re.width)??1,isLoginUser:Ul,config:Re==null?void 0:Re.config,optionUrl:(Re==null?void 0:Re.optionUrl)??Re,isFormColHidden:Tr,isHideInForm:(Re==null?void 0:Re.isHideInForm)??!1,signature:Zl,isMain:Re==null?void 0:Re.isMain,required:(Re==null?void 0:Re.required)??!1,isMainUrl:Re==null?void 0:Re.isMainUrl,operable:(Re==null?void 0:Re.operable)??!1,disabled:(Re==null?void 0:Re.disabled)??!1,isSync:Re==null?void 0:Re.isSync,menus:lr,groups:un,words:Xl,allSelectionContents:Re==null?void 0:Re.allContents,filterContent:Re==null?void 0:Re.filterContents,isNoClick:(Re==null?void 0:Re.isNoClick)??!1,functionName:Re==null?void 0:Re.functionName,functionRelatedWords:Re==null?void 0:Re.functionRelatedWords,calculatorFilter:Re==null?void 0:Re.calculatorFilter,filters:Re==null?void 0:Re.filters}}),Bl=La==null?void 0:La.map(Re=>Re==null?void 0:Re.value);let Ol="";Bl==null||Bl.forEach(Re=>{Re!==""&&Re!==void 0&&(Ol=Ol===""?Re:Ol+"/"+Re)}),b.setSelectArray(Bl),b.setSelectString(Ol);let ma=(zl=dl.safeClone(La))==null?void 0:zl.map(Re=>(Re!=null&&Re.value&&le.IsJson(Re==null?void 0:Re.value)&&Array.isArray(JSON.parse(Re==null?void 0:Re.value))&&(Re.value=JSON.parse(Re.value)),Re)),Sr={};ma==null||ma.forEach(Re=>{Sr[Re.label]=Re==null?void 0:Re.value}),ma=ma==null?void 0:ma.map(Re=>{var ur,wr,Yr,tr,lr,un,Xl,Ul,Tr;if((Re==null?void 0:Re.type)==="Select"&&((ur=Re==null?void 0:Re.allSelectionContents)==null?void 0:ur.length)>0&&(Re.contactValue=Sr),(Yr=(wr=Re==null?void 0:Re.optionUrl)==null?void 0:wr.menuSelect)!=null&&Yr.some(Nr=>Nr==null?void 0:Nr.includes("["))){let Nr="";Re.optionUrl.oldMenuSelect=(lr=(tr=dl.safeClone(Re))==null?void 0:tr.optionUrl)==null?void 0:lr.menuSelect,Re.optionUrl.menuSelect=(Xl=(un=Re==null?void 0:Re.optionUrl)==null?void 0:un.menuSelect)==null?void 0:Xl.map(El=>{var Zl,rr,Dr,wl,Lr,Kl;if(El!=null&&El.includes("[")){let on=(rr=(Zl=El==null?void 0:El.replaceAll("[","").replaceAll("]",""))==null?void 0:Zl.split(":"))==null?void 0:rr[1];Nr=ya((Dr=El==null?void 0:El.replaceAll("[","").replaceAll("]",""))==null?void 0:Dr.split(":"),ea==null?void 0:ea[We.value],ea),El=((Lr=(wl=dl.safeClone(ma))==null?void 0:wl.find(Rr=>(Rr==null?void 0:Rr.label)===on))==null?void 0:Lr.value)||ya((Kl=El==null?void 0:El.replaceAll("[","").replaceAll("]",""))==null?void 0:Kl.split(":"),ea==null?void 0:ea[We.value],ea)}return El}),Nr!==""&&Re.value===""&&(Re.value=Ze(Re.optionUrl.menuSelect,Re.optionUrl.oldMenuSelect,(Ul=Re==null?void 0:Re.optionUrl)==null?void 0:Ul.groupSelect,ea),Array.isArray(Re.value)&&((Tr=Re.value)!=null&&Tr.every(El=>El==null?void 0:El.url))&&(Re.type="UPLOAD"))}return Re}),u.value=ma,la.value=((pa=u.value)==null?void 0:pa.every(Re=>Re==null?void 0:Re.disabled))||W.value===We.value,Ke.value=(Ha=u.value)==null?void 0:Ha.every(Re=>Re==null?void 0:Re.operable),Ea.value=(va=u.value)==null?void 0:va.map(Re=>Re==null?void 0:Re.label);let Ur=[],Gr=[];if((Ca=dl.safeClone(u.value))==null||Ca.forEach(Re=>{var ur;Array.isArray(Re==null?void 0:Re.value)&&((ur=Re==null?void 0:Re.value)!=null&&ur.find(wr=>{var Yr;return(Yr=wr==null?void 0:wr.url)==null?void 0:Yr.includes(".obj")}))&&(Gr=Re==null?void 0:Re.value)}),(Gr==null?void 0:Gr.length)>0){const Re=(Aa=dl.safeClone(Gr))==null?void 0:Aa.filter(ur=>{var wr;return(wr=ur==null?void 0:ur.url)==null?void 0:wr.includes(".obj")});Re==null||Re.forEach(ur=>{var Yr,tr,lr,un;const wr=(Yr=Gr==null?void 0:Gr.filter(Xl=>{var Ul;return(Xl==null?void 0:Xl.name)===(ur==null?void 0:ur.name)&&((Ul=Xl==null?void 0:Xl.url)==null?void 0:Ul.includes(".mtl"))}))==null?void 0:Yr.map(Xl=>Xl==null?void 0:Xl.url);Ur.push({objUrl:ur==null?void 0:ur.url,mtlUrls:((tr=Gr==null?void 0:Gr.filter(Xl=>{var Ul;return(Xl==null?void 0:Xl.name)===(ur==null?void 0:ur.name)&&((Ul=Xl==null?void 0:Xl.url)==null?void 0:Ul.includes(".mtl"))}))==null?void 0:tr.length)===1?(un=(lr=Gr==null?void 0:Gr.filter(Xl=>{var Ul;return(Xl==null?void 0:Xl.name)===(ur==null?void 0:ur.name)&&((Ul=Xl==null?void 0:Xl.url)==null?void 0:Ul.includes(".mtl"))}))==null?void 0:lr[0])==null?void 0:un.url:wr})}),_.setObjUrl(Ur)}(pl=dl.safeClone(u.value))==null||pl.forEach(Re=>{var ur,wr,Yr,tr,lr,un,Xl,Ul,Tr,Nr,El,Zl,rr;if((wr=(ur=Re==null?void 0:Re.value)==null?void 0:ur.toString())!=null&&wr.includes(".stl")||(tr=(Yr=Re==null?void 0:Re.value)==null?void 0:Yr.toString())!=null&&tr.includes(".STL")||(un=(lr=Re==null?void 0:Re.value)==null?void 0:lr.toString())!=null&&un.includes(".obj")||(Ul=(Xl=Re==null?void 0:Re.value)==null?void 0:Xl.toString())!=null&&Ul.includes(".mtl")||(Nr=(Tr=Re==null?void 0:Re.value)==null?void 0:Tr.toString())!=null&&Nr.includes(".urdf")){let Dr={},wl=[],Lr;Array.isArray(Re==null?void 0:Re.value)?Lr=Re==null?void 0:Re.value:Lr=(El=Re==null?void 0:Re.value)==null?void 0:El.split(","),Lr==null||Lr.forEach(Kl=>{Kl.includes(".mtl")?wl.push(Kl):Dr.blob=Dr.blob==="undefined"?Kl:Dr.blob+","+Kl}),(wl==null?void 0:wl.length)>0&&(Dr.mtlBlobs=wl),(rr=(Zl=Object.values(Dr))==null?void 0:Zl[0])!=null&&rr.includes("http:")}})}else u.value=[];let Tl=ze.value;if((Tl==null?void 0:Tl.length)>0&&(Tl=Tl==null?void 0:Tl.map(ea=>{var Bl,Ol,ma,Sr;let La=(Bl=ea==null?void 0:ea.key)==null?void 0:Bl.split("/");return(n==null?void 0:n.compName)===(La==null?void 0:La[0])&&(Ol=u.value)!=null&&Ol.find(Ur=>(Ur==null?void 0:Ur.prop)===(La==null?void 0:La[1]))&&(ea.value=(Sr=(ma=u.value)==null?void 0:ma.find(Ur=>(Ur==null?void 0:Ur.prop)===(La==null?void 0:La[1])))==null?void 0:Sr.value),ea}),ve.setTableViewContents(Tl)),n!=null&&n.formRules)A.value=n==null?void 0:n.formRules;else{let ea={};(Pe=dl.safeClone(u).value)==null||Pe.forEach(La=>{((La==null?void 0:La.isMain)===!0||(La==null?void 0:La.required)===!0)&&(ea[(La==null?void 0:La.prop)??(La==null?void 0:La.name)]=[{required:!0,message:`${(La==null?void 0:La.label)||(La==null?void 0:La.prop)||(La==null?void 0:La.name)}不能为空`}])}),A.value=ea}if(((kl=ua==null?void 0:ua.contents)==null?void 0:kl.length)>0){const ea=[];(cr=ua==null?void 0:ua.contents)==null||cr.forEach((La,Bl)=>{(La==null?void 0:La.label)!==""&&ea.push({label:(La==null?void 0:La.label)??"",id:(La==null?void 0:La.id)??Bl,type:(La==null?void 0:La.type)??"",background:La==null?void 0:La.background})}),O.value=ea}else O.value=[];(Cr=u.value)!=null&&Cr.some(ea=>(ea==null?void 0:ea.functionName)&&(ea==null?void 0:ea.functionName)!=="")&&(u.value=await Ae(u.value))},{deep:!0,immediate:!0}),e.watch(()=>W.value,ne=>{la.value=ne===We.value},{immediate:!0}),(ne,pe)=>{var Fe;const ua=e.resolveComponent("svg-icon"),Qe=e.resolveComponent("el-switch"),Da=e.resolveComponent("el-checkbox"),Te=e.resolveComponent("el-popover"),Le=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Mh,[I.value===e.unref(fi).TEXT?(e.openBlock(),e.createBlock(Gc,{key:0,itemData:a.itemData,compName:a.compName,calculator:a.calculator,fields:u.value,textSize:R.value,textColor:re.value,backGround:X.value,backGroundImage:ye.value,disabled:la.value||Ce(),iconUrl:p.value,"onUpdate:backGroundImage":Na,backgroundUrl:o.value,backgroundPosition:c.value},null,8,["itemData","compName","calculator","fields","textSize","textColor","backGround","backGroundImage","disabled","iconUrl","backgroundUrl","backgroundPosition"])):I.value===e.unref(fi).BLOCK?(e.openBlock(),e.createBlock(c0,{key:1,items:(Fe=u.value)==null?void 0:Fe.map(Ne=>({label:Ne!=null&&Ne.isHideInForm?"":Ne==null?void 0:Ne.label,value:Ne==null?void 0:Ne.value,width:(Ne==null?void 0:Ne.width)??1,field:Ne,filters:Ne==null?void 0:Ne.filters})),textSize:R.value,textColor:re.value,backGround:X.value,iconUrl:p.value,backGroundImage:ye.value,disabled:la.value||Ce(),calculator:a.calculator,"onUpdate:backGroundImage":Na,backgroundUrl:o.value,backgroundPosition:c.value},null,8,["items","textSize","textColor","backGround","iconUrl","backGroundImage","disabled","calculator","backgroundUrl","backgroundPosition"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":I.value===e.unref(fi).ORDINARY})},[e.createVNode(dl.ssForm,{rowContents:u.value,formRules:A.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:!0,textSize:R.value,textColor:re.value,backGround:X.value,backGroundImage:ye.value,onOnButtonClick:ta,onChange:je,formDisabled:la.value||Ce(),formLabelsOperable:Ke.value,isButtonRow:w.value,onPreview:da,onBlurChange:Fa,style:e.normalizeStyle({backGroundImage:o.value!==""?`url("${o.value}")`:void 0}),onHandleColEditChange:ga,onHandleColTypeChange:Ta,onRouteUrl:ca,onClickTrigger:he,"onUpdate:backGroundImage":Na},{operateCol:e.withCtx(({renderColumns:Ne,formDisabled:me,formLabelsOperable:al})=>[e.createVNode(Te,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ee},{reference:e.withCtx(()=>[e.createElementVNode("span",Ih,[e.createVNode(ua,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Oh,[pe[1]||(pe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(Qe,{"model-value":me,"active-text":"禁用","inactive-text":"",onChange:$,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(Qe,{"model-value":al,"active-text":"编辑所有标签","inactive-text":"",onChange:V},null,8,["model-value"]),pe[2]||(pe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Le,{modelValue:Ea.value,"onUpdate:modelValue":pe[0]||(pe[0]=Qa=>Ea.value=Qa),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:we,onChange:ce},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ne,Qa=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Qa.label},[e.createVNode(Da,{value:Qa.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Qa.label),1)]),_:2},1032,["value"]),e.createVNode(Te,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(ua,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Tl;return[e.createElementVNode("div",Lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Tl=Object.keys(Qa))==null?void 0:Tl.filter(Rl=>{var Al;return(Al=Ge.value)==null?void 0:Al.find(Pl=>(Pl==null?void 0:Pl.value)===Rl)}),Rl=>{var Al,Pl;return e.openBlock(),e.createElementBlock("div",{key:Rl},[e.createVNode(dl._sfc_main$1,{value:Qa==null?void 0:Qa[Rl],"active-text":(Pl=(Al=Ge.value)==null?void 0:Al.find(ll=>(ll==null?void 0:ll.value)===Rl))==null?void 0:Pl.label,inactiveText:"",onChange:ll=>De(ll,Rl,Qa)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Rh,[e.createVNode(ua,{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)),Y.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:3,fileDataList:E.value,onDestroy:ja},null,8,["fileDataList"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock($r.ssDialog,{key:4,visible:m.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:y.value,onGetAnimationData:ne.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Os=sr._export_sfc($h,[["__scopeId","data-v-b1c6d66b"]]),Vh={class:"table-header-child"},Fh={class:"table-header-child-main"},Ph={class:"table-header-child-content"},jh={class:"table-header-child-content-item"},Hh={class:"fix-button"},Uh={key:0},qh={class:"form-content"},Wh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref(""),p=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(p);e.ref(0);const u=e.ref(""),m=e.ref([]),g=e.ref([]),y=E=>{var x;i.value=!0;let S=[];xr==null||xr.forEach(b=>{let _=M.cloneDeep(c.value)+1;p.setTableIndex(_),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:c.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((x=E==null?void 0:E.children)==null?void 0:x.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),u.value=E==null?void 0:E.id,m.value=S,g.value=S},d=E=>{n("fixChange",M.cloneDeep(E))},A=E=>{n("deleteChange",M.cloneDeep(E))},w=E=>{i.value=!0;let S=[];xr==null||xr.forEach(x=>{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),S.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:c.value,contents:x==null?void 0:x.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},Y=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(x=>(x.children||(x.value=E==null?void 0:E[x.name]),x)),g.value=S},D=()=>{var S,x;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(b=>{const _=xr==null?void 0:xr.find(I=>(I==null?void 0:I.label)===(b==null?void 0:b.label));_?E[_.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),E.id="id"+c.value,(x=m.value)==null||x.forEach(_=>{const I=xr==null?void 0:xr.find(R=>(R==null?void 0:R.label)===(_==null?void 0:_.label));I?E[I.key]=_.value:_!=null&&_.children&&_.children.length>0&&(E.children=_.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},P=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},O=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(b,_)=>(e.openBlock(),e.createElementBlock("div",Fh,[e.createElementVNode("div",Ph,[e.createElementVNode("div",jh,e.toDisplayString(b.label),1),e.createElementVNode("div",Hh,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>w(b)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>y(b)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>O(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",Uh,[e.createVNode(Yc,{tableChildContents:b==null?void 0:b.children,onDeleteChange:A,onFixChange:d},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode($r.ssDialog,{visible:i.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:P,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:D},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Kh=sr._export_sfc(Wh,[["__scopeId","data-v-e0fef72d"]]),Gh={class:"table-header-child"},Yh={class:"table-header-child-main"},Jh={class:"table-header-child-content"},Xh={class:"table-header-child-content-item"},Zh={class:"fix-button"},Qh={key:0},e6={class:"form-content"},a6={class:"dialog-footer"},l6={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref(""),p=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(p),u=e.ref(""),m=e.ref([]),g=e.ref([]),y=E=>{n("fixChange",M.cloneDeep(E))},d=E=>{var x;i.value=!0;let S=[];xr==null||xr.forEach(b=>{let _=M.cloneDeep(c.value)+1;p.setTableIndex(_),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:c.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((x=E==null?void 0:E.children)==null?void 0:x.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),u.value=E==null?void 0:E.id,m.value=S,g.value=S},A=E=>{i.value=!0;let S=[];xr==null||xr.forEach(x=>{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),S.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:c.value,contents:x==null?void 0:x.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},w=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(x=>(x.children||(x.value=E==null?void 0:E[x.name]),x)),g.value=S},Y=()=>{var S,x;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(b=>{const _=xr==null?void 0:xr.find(I=>(I==null?void 0:I.label)===(b==null?void 0:b.label));_?E[_.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),E.id="idChild"+c.value,(x=m.value)==null||x.forEach(_=>{const I=xr==null?void 0:xr.find(R=>(R==null?void 0:R.label)===(_==null?void 0:_.label));I?E[I.key]=_.value:_!=null&&_.children&&_.children.length>0&&(E.children=_.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},D=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},P=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},O=E=>{n("deleteChange",E)};return(E,S)=>{const x=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Gh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(_,I)=>(e.openBlock(),e.createElementBlock("div",Yh,[e.createElementVNode("div",Jh,[e.createElementVNode("div",Xh,e.toDisplayString(_.label),1),e.createElementVNode("div",Zh,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>A(_)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>d(_)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>P(_)},null,8,["onClick"])])]),_!=null&&_.children&&_.children.length>0?(e.openBlock(),e.createElementBlock("div",Qh,[e.createVNode(Kh,{tableChildContents:_==null?void 0:_.children,onDeleteChange:O,onFixChange:y},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode($r.ssDialog,{visible:i.value,onBeforeDestroy:D,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",e6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",a6,[e.createVNode(b,{onClick:D,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"ok-button button",onClick:Y,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Yc=sr._export_sfc(l6,[["__scopeId","data-v-ebd68fa1"]]),r6={class:"table-operate-content"},n6={class:"table-operate-item"},i6={class:"operate-title"},o6={class:"operate-content"},t6={class:"fix-content"},s6={class:"fix-content-label"},c6={class:"fix-button"},u6={key:0},d6={class:"operate-title"},p6={class:"operate-content"},f6={class:"fix-content"},h6={class:"fix-content-label"},v6={class:"fix-button"},m6={class:"operate-title"},y6={class:"operate-content"},g6={class:"fix-content"},b6={class:"fix-content-label"},k6={class:"fix-button"},x6={class:"operate-title"},w6={class:"operate-content"},_6={class:"fix-content"},S6={class:"fix-content-label"},E6={class:"fix-button"},C6={class:"operate-content"},D6={style:{display:"flex","justify-content":"space-between"}},T6={class:"form-content"},B6={class:"dialog-footer"},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={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]),o=e.ref(!1),p=e.ref(!1),c=e.ref([]),u=e.ref(!1),m=e.ref([]),g=e.ref(!1),y=e.ref([]),d=e.ref(""),A=e.ref(""),w=e.ref([]),Y=e.ref([]),D=e.ref([]),P=e.ref([]),O=e.ref(!1),E=e.ref([]),S=e.ref([]),x=e.ref(0),b=e.ref([]),_=e.ref([]),I=e.ref([]),R=()=>{O.value=!0;let $=[];Gn==null||Gn.forEach(V=>{x.value++,$.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.key)==="background"?"var(--ssComponent-primary-color)":"",id:x.value,contents:V==null?void 0:V.options})}),E.value=$,S.value=$},re=()=>{var V,ee,ce;p.value=!0;let $=[];(ce=(ee=(V=le.FormContent)==null?void 0:V.find(he=>(he==null?void 0:he.key)==="Input"))==null?void 0:ee.value)==null||ce.forEach(he=>{x.value++,$.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:(he==null?void 0:he.label)==="类型"?"Input":"",id:x.value,contents:he==null?void 0:he.options})}),b.value=$,_.value=$},X=$=>{$||(b.value=_.value)},ye=async $=>{var V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na;if(($==null?void 0:$.类型)!==((ee=(V=_.value)==null?void 0:V.find(da=>(da==null?void 0:da.label)==="类型"))==null?void 0:ee.value)){let da=[],ja=await((ca=(he=(ce=le.FormContent)==null?void 0:ce.find(ta=>(ta==null?void 0:ta.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:he.value)==null?void 0:ca.value)?await((De=(Ta=(ga=le.FormContent)==null?void 0:ga.find(ta=>(ta==null?void 0:ta.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:Ta.value)==null?void 0:De.value):(Ve=(ia=le.FormContent)==null?void 0:ia.find(ta=>(ta==null?void 0:ta.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:Ve.value;if(ja==null||ja.forEach(ta=>{x.value++,da.push({label:ta==null?void 0:ta.label,name:(ta==null?void 0:ta.name)||(ta==null?void 0:ta.label),type:ta.type,value:ta!=null&&ta.属性名?($==null?void 0:$.prop)||($==null?void 0:$.name)||($==null?void 0:$.label):($==null?void 0:$[ta.label])??"",id:x.value,contents:ta==null?void 0:ta.options,prop:(ta==null?void 0:ta.prop)||(ta==null?void 0:ta.name)||(ta==null?void 0:ta.label)})}),$!=null&&$.菜单选项&&((Fa=$==null?void 0:$.菜单选项)==null?void 0:Fa.length)>0){const ta=await le.menuToContentType($==null?void 0:$.菜单选项);da=da==null?void 0:da.map(je=>((je==null?void 0:je.name)==="组信息选项"&&(je.contents=ta),je))}_.value=await le.selectToBase(M.cloneDeep(da)),b.value=await le.selectToBase(M.cloneDeep(da))}else{let da=M.cloneDeep(b.value);if(da=da==null?void 0:da.map(ja=>(ja.value=$==null?void 0:$[ja.name],ja)),$!=null&&$.菜单选项&&((Na=$==null?void 0:$.菜单选项)==null?void 0:Na.length)>0){const ja=await le.menuToContentType($==null?void 0:$.菜单选项);da=da==null?void 0:da.map(ta=>((ta==null?void 0:ta.name)==="组信息选项"&&(ta.contents=ja),ta))}da=le.formToOptionsContents(da),_.value=await le.selectToBase(M.cloneDeep(da))}},fe=async $=>{await ye($),b.value=_.value},U=($,V)=>{if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="selectRelateType"){const ee=V==null?void 0:V.optionUrl;return(ee==null?void 0:ee.selectRelateType)||V[$.key]}if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="menuSelect"){const ee=V==null?void 0:V.optionUrl;return(ee==null?void 0:ee.menuSelect)||V[$.key]}if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="groupSelect"){const ee=V==null?void 0:V.optionUrl;return(ee==null?void 0:ee.groupSelect)||V[$.key]}if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="originalContent")return(V==null?void 0:V.value)||V[$.key];if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="multiple"){const ee=V[$.key];return dc(ee)?ee:$.default}return($==null?void 0:$.label)==="类型"&&V[$.key]===""?"Input":($==null?void 0:$.key)==="isFormColHidden"&&!V[$.key]?!1:V[$.key]},q=async $=>{var ce,he,ca,ia,Ve,ga,Ta,De,Fa;p.value=!0;let V=[];const ee=await((ca=(he=(ce=le.FormContent)==null?void 0:ce.find(Na=>(Na==null?void 0:Na.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:he.value)==null?void 0:ca.value)?await((De=(Ta=(ga=le.FormContent)==null?void 0:ga.find(Na=>(Na==null?void 0:Na.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:Ta.value)==null?void 0:De.value):(Ve=(ia=le.FormContent)==null?void 0:ia.find(Na=>(Na==null?void 0:Na.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:Ve.value;if(ee==null||ee.forEach(Na=>{x.value++,V.push({label:Na==null?void 0:Na.label,name:(Na==null?void 0:Na.name)||(Na==null?void 0:Na.label),type:Na.type,value:(Na==null?void 0:Na.label)==="属性名"?($==null?void 0:$.prop)||($==null?void 0:$.name)||($==null?void 0:$.label):U(Na,$),id:x.value,contents:Na==null?void 0:Na.options})}),$!=null&&$.menuSelect&&((Fa=$==null?void 0:$.menuSelect)==null?void 0:Fa.length)>0){const Na=await le.menuToContentType($==null?void 0:$.menuSelect);V=V==null?void 0:V.map(da=>((da==null?void 0:da.name)==="组信息选项"&&(da.contents=Na),da))}d.value=$==null?void 0:$.id,b.value=await le.selectToBase(le.formToOptionsContents(V)),_.value=await le.selectToBase(le.formToOptionsContents(V))},Z=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;I.value=(V=M.cloneDeep(I.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="tableToForm"&&(ce.contents=I.value),ce))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ae=()=>{p.value=!1,b.value=[],d.value=""},ve=async()=>{var ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na;b.value=_.value;let $={};d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value);let V=await((ca=(he=(ce=le.FormContent)==null?void 0:ce.find(da=>{var ja,ta;return(da==null?void 0:da.key)===(((ta=(ja=b.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:ta.value)??"label")}))==null?void 0:he.value)==null?void 0:ca.value)??((Ve=(ia=le.FormContent)==null?void 0:ia.find(da=>{var ja,ta;return(da==null?void 0:da.key)===(((ta=(ja=b.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:ta.value)??"label")}))==null?void 0:Ve.value);if((ga=b.value)==null||ga.forEach(da=>{const ja=V==null?void 0:V.find(ta=>(ta==null?void 0:ta.label)===(da==null?void 0:da.label));ja&&($[ja.key]=da.value)}),$.name=$.label,(Ta=I.value)!=null&&Ta.find(da=>da.id===$.id))I.value=(De=I.value)==null?void 0:De.map(da=>(da.id===$.id&&(da=$),da));else{let da=M.cloneDeep(I.value);I.value||(I.value=[]),da.push($),I.value=da}I.value=I.value.map(({id:da,...ja})=>ja),p.value=!1,d.value="";let ee=M.cloneDeep(r.originalItemContents);(Fa=M.cloneDeep(r.originalItemContents))!=null&&Fa.find(da=>(da==null?void 0:da.key)==="tableToForm")?ee=(Na=M.cloneDeep(r.originalItemContents))==null?void 0:Na.map(da=>((da==null?void 0:da.key)==="tableToForm"&&(da.contents=I.value),da)):ee.push({key:"tableToForm",contents:I.value}),n("change",ee)},ze=$=>{O.value=!0;let V=[];Gn==null||Gn.forEach(ee=>{x.value++,V.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:$[ee.key],id:x.value,contents:ee==null?void 0:ee.options})}),d.value=$==null?void 0:$.id,E.value=V,S.value=V};e.watch(()=>g.value,()=>{var V,ee;let $=M.cloneDeep(r.originalItemContents);(V=M.cloneDeep(r.originalItemContents))!=null&&V.find(ce=>(ce==null?void 0:ce.key)==="page")?$=(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="page"&&(ce.contents=g.value),ce)):$.push({key:"page",contents:g.value}),n("change",$)},{deep:!0});const te=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;Y.value=(V=M.cloneDeep(Y.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="extraButton"&&(ce.contents=Y.value),ce))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var ee,ce,he,ca,ia;E.value=S.value;let $={};if(d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value),(ee=E.value)==null||ee.forEach(Ve=>{const ga=Gn==null?void 0:Gn.find(Ta=>(Ta==null?void 0:Ta.label)===(Ve==null?void 0:Ve.label));ga?$[ga.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&($.children=Ve.children)}),(ce=Y.value)!=null&&ce.find(Ve=>Ve.id===$.id))Y.value=(he=Y.value)==null?void 0:he.map(Ve=>(Ve.id===$.id&&(Ve=$),Ve));else{let Ve=M.cloneDeep(Y.value)??[];Ve.push($),Y.value=Ve}O.value=!1,d.value="";let V=M.cloneDeep(r.originalItemContents);(ca=M.cloneDeep(r.originalItemContents))!=null&&ca.find(Ve=>(Ve==null?void 0:Ve.key)==="extraButton")?V=(ia=M.cloneDeep(r.originalItemContents))==null?void 0:ia.map(Ve=>((Ve==null?void 0:Ve.key)==="extraButton"&&(Ve.contents=Y.value),Ve)):V.push({key:"extraButton",contents:Y.value}),n("change",V)},se=$=>{let V=M.cloneDeep(S.value);V=V==null?void 0:V.map(ee=>(ee.children||(ee.value=$==null?void 0:$[ee.name]),ee)),S.value=V},W=()=>{O.value=!1,E.value=[],d.value=""},ue=$=>{u.value=!0;let V=[];Yn==null||Yn.forEach(ee=>{x.value++,V.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:$[ee.key],id:x.value,contents:ee==null?void 0:ee.options})}),d.value=$==null?void 0:$.id,D.value=V,P.value=V},_e=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;w.value=(V=M.cloneDeep(w.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="rowButton"&&(ce.contents=w.value),ce))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},we=()=>{o.value=!0;let $=[];xr==null||xr.forEach(V=>{x.value++,$.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),m.value=$,y.value=$},Ke=()=>{u.value=!0;let $=[];Yn==null||Yn.forEach(V=>{x.value++,$.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),D.value=$,P.value=$},la=$=>{let V=M.cloneDeep(P.value);V=V==null?void 0:V.map(ee=>(ee.children||(ee.value=$==null?void 0:$[ee.name]),ee)),P.value=V},j=()=>{var ee,ce,he,ca,ia;D.value=P.value;let $={};if(d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value),(ee=D.value)==null||ee.forEach(Ve=>{const ga=Yn==null?void 0:Yn.find(Ta=>(Ta==null?void 0:Ta.label)===(Ve==null?void 0:Ve.label));ga?$[ga.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&($.children=Ve.children)}),(ce=w.value)!=null&&ce.find(Ve=>Ve.id===$.id))w.value=(he=w.value)==null?void 0:he.map(Ve=>(Ve.id===$.id&&(Ve=$),Ve));else{let Ve=M.cloneDeep(w.value);Ve.push($),w.value=Ve}u.value=!1,d.value="";let V=M.cloneDeep(r.originalItemContents);(ca=M.cloneDeep(r.originalItemContents))!=null&&ca.find(Ve=>(Ve==null?void 0:Ve.key)==="rowButton")?V=(ia=M.cloneDeep(r.originalItemContents))==null?void 0:ia.map(Ve=>((Ve==null?void 0:Ve.key)==="rowButton"&&(Ve.contents=w.value),Ve)):V.push({key:"rowButton",contents:w.value}),n("change",V)},We=()=>{u.value=!1,d.value="",P.value=[],D.value=[]},Oe=$=>{o.value=!0;let V=[];xr==null||xr.forEach(ee=>{x.value++,V.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:"",id:x.value,contents:ee==null?void 0:ee.options})}),m.value=V,A.value=$==null?void 0:$.id,y.value=V},Ie=$=>{var V;c.value=Hc(M.cloneDeep(c.value),$==null?void 0:$.id),n("change",(V=M.cloneDeep(r.originalItemContents))==null?void 0:V.map(ee=>{var ce;return(ee==null?void 0:ee.key)==="header"&&(ee.contents=(ce=c.value)!=null&&ce.some(he=>he==null?void 0:he.children)?[c.value]:c.value),ee}))},Me=$=>{var ee,ce,he;$.type==="fix"?$.id!==""?c.value=qc(c.value,$):c.value=Uc(c.value,$==null?void 0:$.contents):c.value=Wc(c.value,$),c.value=(ee=c.value)!=null&&ee.some(ca=>ca==null?void 0:ca.children)?[c.value]:c.value,d.value="";let V=M.cloneDeep(r.originalItemContents);(ce=M.cloneDeep(r.originalItemContents))!=null&&ce.find(ca=>(ca==null?void 0:ca.key)==="header")?V=(he=M.cloneDeep(r.originalItemContents))==null?void 0:he.map(ca=>((ca==null?void 0:ca.key)==="header"&&(ca.contents=c.value),ca)):V.push({key:"header",contents:c.value}),n("change",V)},de=$=>{var ee;o.value=!0;let V=[];xr==null||xr.forEach(ce=>{x.value++,V.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:$[ce.key],id:x.value,contents:ce==null?void 0:ce.options})}),$!=null&&$.children&&((ee=$==null?void 0:$.children)==null?void 0:ee.length)>0&&V.push({children:$==null?void 0:$.children,isFormColHidden:!0}),d.value=$==null?void 0:$.id,A.value="",m.value=V,y.value=V},Ce=$=>{let V=M.cloneDeep(y.value);V=V==null?void 0:V.map(ee=>(ee.children||(ee.value=$==null?void 0:$[ee.name]),ee)),y.value=V},Je=()=>{o.value=!1,d.value="",A.value="",y.value=[]},Ea=()=>{var ee,ce,he,ca,ia,Ve;m.value=y.value;let $={};if(d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value),(ee=m.value)==null||ee.forEach(ga=>{const Ta=xr==null?void 0:xr.find(De=>(De==null?void 0:De.label)===(ga==null?void 0:ga.label));Ta?$[Ta.key]=ga.value:ga!=null&&ga.children&&ga.children.length>0&&($.children=ga.children)}),(ce=c.value)!=null&&ce.find(ga=>ga.id===$.id))c.value=(he=c.value)==null?void 0:he.map(ga=>(ga.id===$.id&&(ga=$),ga));else{let ga=M.cloneDeep(c.value)??[];A.value===""?ga.push($):ga=ga==null?void 0:ga.map(Ta=>(Ta.id===A.value&&(Ta.children||(Ta.children=[]),Ta.children.push($)),Ta)),c.value=ga}c.value=(ca=c.value)!=null&&ca.some(ga=>ga==null?void 0:ga.children)?[c.value]:c.value,o.value=!1,d.value="",A.value="";let V=M.cloneDeep(r.originalItemContents);(ia=M.cloneDeep(r.originalItemContents))!=null&&ia.find(ga=>(ga==null?void 0:ga.key)==="header")?V=(Ve=M.cloneDeep(r.originalItemContents))==null?void 0:Ve.map(ga=>((ga==null?void 0:ga.key)==="header"&&(ga.contents=c.value),ga)):V.push({key:"header",contents:c.value}),n("change",V)},Ge=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;c.value=(V=M.cloneDeep(c.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>{var he;return(ce==null?void 0:ce.key)==="header"&&(ce.contents=(he=c.value)!=null&&he.some(ca=>ca==null?void 0:ca.children)?[c.value]:c.value),ce})),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var $,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(i.value=M.cloneDeep(r.originalItemContents),c.value=(V=($=i.value)==null?void 0:$.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:V.contents,w.value=(ce=(ee=i.value)==null?void 0:ee.find(Ae=>(Ae==null?void 0:Ae.key)==="rowButton"))==null?void 0:ce.contents,Y.value=(ca=(he=i.value)==null?void 0:he.find(Ae=>(Ae==null?void 0:Ae.key)==="extraButton"))==null?void 0:ca.contents,g.value=(Ve=(ia=i.value)==null?void 0:ia.find(Ae=>(Ae==null?void 0:Ae.key)==="page"))!=null&&Ve.contents?!!((Ta=(ga=i.value)==null?void 0:ga.find(Ae=>(Ae==null?void 0:Ae.key)==="page"))!=null&&Ta.contents):!1,I.value=(Fa=(De=i.value)==null?void 0:De.find(Ae=>(Ae==null?void 0:Ae.key)==="tableToForm"))==null?void 0:Fa.contents,c.value=(Na=c.value)==null?void 0:Na.map((Ae,ne)=>(Array.isArray(Ae)?Ae=D3(Ae):Ae={label:(Ae==null?void 0:Ae.label)??"",prop:(Ae==null?void 0:Ae.label)==="操作"?"operate":Ae==null?void 0:Ae.prop,width:Ae!=null&&Ae.width?parseInt(Ae.width):"",fixed:(Ae==null?void 0:Ae.fixed)??void 0,sortable:(Ae==null?void 0:Ae.sortable)??!1,align:(Ae==null?void 0:Ae.align)??"left",showOverflowTooltip:(Ae==null?void 0:Ae.showOverflowTooltip)??!0,isNotDrag:(Ae==null?void 0:Ae.isNotDrag)??!1,isEditCol:(Ae==null?void 0:Ae.isEditCol)??!1,isOperate:(Ae==null?void 0:Ae.isOperate)??!1,id:(Ae==null?void 0:Ae.id)??ne,formMenuSelect:(Ae==null?void 0:Ae.formMenuSelect)??void 0,groupSelect:(Ae==null?void 0:Ae.groupSelect)??void 0},Ae)),c.value=(da=c.value)!=null&&da.every(Ae=>Array.isArray(Ae))?(ja=c.value)==null?void 0:ja[0]:c.value,w.value=(ta=w.value)==null?void 0:ta.map((Ae,ne)=>Ae={label:(Ae==null?void 0:Ae.label)??"",type:(Ae==null?void 0:Ae.type)??"",textColor:(Ae==null?void 0:Ae.textColor)??"#000000",id:(Ae==null?void 0:Ae.id)??ne}),Y.value=(je=Y.value)==null?void 0:je.map((Ae,ne)=>Ae={label:(Ae==null?void 0:Ae.label)??"",type:(Ae==null?void 0:Ae.type)??"",background:(Ae==null?void 0:Ae.background)??"var(--ssComponent-primary-color)",id:(Ae==null?void 0:Ae.id)??ne}),I.value)I.value=(Ze=I.value)==null?void 0:Ze.map(Ae=>{x.value++;let ne=Ae;return ne.id=x.value,ne});else{let Ae=[];const ne=(ya=le.getColumnChild(M.cloneDeep(c.value)))==null?void 0:ya.filter(pe=>(pe==null?void 0:pe.prop)!=="operate");ne==null||ne.forEach(pe=>{var ua;x.value++,Ae.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.prop)||(pe==null?void 0:pe.label),type:pe!=null&&pe.groupSelect?"Select":"Input",value:"",id:x.value,contents:pe==null?void 0:pe.options,menuSelect:pe==null?void 0:pe.formMenuSelect,groupSelect:(ua=pe==null?void 0:pe.groupSelect)==null?void 0:ua.split(":"),selectRelateType:"关联绑定列"})}),I.value=Ae}},{deep:!0,immediate:!0}),($,V)=>{const ee=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",r6,[e.createElementVNode("div",n6,[e.createElementVNode("div",i6,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ce,{class:"icon-content",onClick:we,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",o6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",t6,[e.createElementVNode("div",s6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",c6,[e.createVNode(ee,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Oe(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>de(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Ge(he)},null,8,["onClick"])])]),he!=null&&he.children&&he.children.length>0?(e.openBlock(),e.createElementBlock("div",u6,[e.createVNode(Yc,{tableChildContents:he==null?void 0:he.children,onDeleteChange:Ie,onFixChange:Me},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",d6,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:Ke},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",p6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",f6,[e.createElementVNode("div",h6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",v6,[e.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>ue(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>_e(he)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",m6,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:R},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",y6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",g6,[e.createElementVNode("div",b6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",k6,[e.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>ze(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>te(he)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",x6,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:re},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",w6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",_6,[e.createElementVNode("div",S6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",E6,[e.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>q(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Z(he)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",C6,[e.createElementVNode("div",D6,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(dl._sfc_main$1,{modelValue:g.value,"onUpdate:modelValue":V[0]||(V[0]=he=>g.value=he)},null,8,["modelValue"])])])]),e.createVNode($r.ssDialog,{visible:o.value,onBeforeDestroy:Je,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B6,[e.createVNode(ce,{onClick:Je,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ce,{class:"ok-button button",onClick:Ea,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:u.value,onBeforeDestroy:We,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",N6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:la},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",A6,[e.createVNode(ce,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ce,{class:"ok-button button",onClick:j,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:O.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(ce,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ce,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:p.value,onBeforeDestroy:ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:ye,onChangeVisible:X,onBlurChange:fe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(ce,{onClick:ae,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ce,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},R6=sr._export_sfc(L6,[["__scopeId","data-v-7a6b87b5"]]),$6=M.useModelComp(M.pinia),{pageMapState:Jc}=M.storeToRefs($6),V6=M.useMenuState(M.pinia),{activeMenuPath:Xc,systemHeight:Zc}=M.storeToRefs(V6),F6=e.ref(24),P6=e.ref(6),Qc=e.ref(10),j6=e.ref(70),H6=e.ref(.18),U6=e.ref(45),q6=()=>{Qc.value=(Zc.value-100)/100};e.watch(()=>Zc.value,()=>{q6()},{deep:!0,immediate:!0});const W6=(a,l,r,n)=>{var i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E;return{x:((o=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:o.x)||l%2*12,y:((c=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:c.y)||l,w:((m=(u=a==null?void 0:a.value)==null?void 0:u.tableData)==null?void 0:m.w)||F6.value,h:((y=(g=a==null?void 0:a.value)==null?void 0:g.tableData)==null?void 0:y.h)||r,minW:((A=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:A.minW)||P6.value,minH:((Y=(w=a==null?void 0:a.value)==null?void 0:w.tableData)==null?void 0:Y.minH)||H6.value,maxH:((P=(D=a==null?void 0:a.value)==null?void 0:D.tableData)==null?void 0:P.maxH)||U6.value,i:((E=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},K6=(a,l)=>{var n,i,o,p,c,u,m,g;let r=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){if(((p=(o=(i=a==null?void 0:a.compData)==null?void 0:i.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:o.contents)==null?void 0:p.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(r=((g=(m=(u=a==null?void 0:a.compData)==null?void 0:u.find(d=>(d==null?void 0:d.key)==="formContent"))==null?void 0:m.contents)==null?void 0:g.length)/5);return r*2},eu=(a,l,r)=>{var p,c;const n=(c=(p=Jc.value)==null?void 0:p[Xc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=n==null?void 0:n.find(u=>{var m,g,y;return((y=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:y.id)===a.id}),o=K6(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>eu(u,m))),{...W6(i,l,o,a)}},G6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=M.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,i)=>eu(n,i)):[]},Y6=(a,l,r,n)=>{var i,o;return{x:r==null?void 0:r.x,y:0,w:Math.round(r==null?void 0:r.w),h:r==null?void 0:r.h,arrowGap:r==null?void 0:r.arrowGap,i:((o=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:o.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},J6=(a,l)=>{var m,g,y,d;let r=0,n=0,i=0,o=0,p=0,c=((g=(m=a==null?void 0:a.compData)==null?void 0:m.find(A=>(A==null?void 0:A.key)==="numPosition"))==null?void 0:g.contents)??[],u=((d=(y=a==null?void 0:a.compData)==null?void 0:y.find(A=>(A==null?void 0:A.key)==="rowPosition"))==null?void 0:d.contents)??"";return u&&u!==1&&(p=Math.ceil(u*l)),i=(c==null?void 0:c[0])*l,o=(c==null?void 0:c[1])*100,{x:r,y:n,w:i,h:o,arrowGap:p}},au=(a,l,r)=>{var p,c;const n=(c=(p=Jc.value)==null?void 0:p[Xc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=n==null?void 0:n.find(u=>{var m,g,y;return((y=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:y.id)===a.id}),o=J6(a,r);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>au(u,m,r))),{...Y6(i,l,o,a)}},X6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=M.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,i)=>au(n,i,l)):[]},Z6=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}]}]}}),Q6=(a,l)=>a==null?void 0:a.map(r=>{for(const n in l)if(n===(r==null?void 0:r.prop))return{...r,value:l[n]};return r}),e4=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]);e.watch(()=>r.compType,c=>{var g;const u=Z6(r==null?void 0:r.optionItems),m=c?(g=u[c==null?void 0:c.toUpperCase()])==null?void 0:g[r==null?void 0:r.target]:[];i.value=m==null?void 0:m.map(y=>{for(const[d,A]of Object.entries((r==null?void 0:r.comp)||{}))if((y==null?void 0:y.prop)===d)return{...y,value:A};return y})},{immediate:!0});const o=c=>dl.getComponent(c),p=c=>{var u,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?i.value=(u=i.value)==null?void 0:u.map(g=>{var y;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(y=g==null?void 0:g.options)==null?void 0:y.map(d=>({...d,disabled:!0}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!0}:g}):i.value=(m=i.value)==null?void 0:m.map(g=>{var y;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(y=g==null?void 0:g.options)==null?void 0:y.map(d=>({...d,disabled:!1}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!1}:g}),n("change",{target:r==null?void 0:r.target,styleConfigs:i.value,prop:c==null?void 0:c.prop})};return(c,u)=>{const m=e.resolveComponent("el-col"),g=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createBlock(g,{class:"style-row",key:y==null?void 0:y.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y==null?void 0:y.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(y.type)),{modelValue:y.value,"onUpdate:modelValue":d=>y.value=d,content:y==null?void 0:y.options,optionUrl:y==null?void 0:y.optionUrl,disabled:y==null?void 0:y.disabled,activeText:y==null?void 0:y.activeText,inactiveText:y==null?void 0:y.inactiveText,onChange:d=>p(y)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),a4=sr._export_sfc(e4,[["__scopeId","data-v-da01b651"]]),l4=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 r=a,n=l,i=[{required:!0,message:"输入不能为空",trigger:"blur"}],o=e.ref([]),p=P=>P==null?void 0:P.reduce((O,E)=>(O[E==null?void 0:E.prop]=E==null?void 0:E.rule,O),{}),c=e.computed(()=>({formRules:p(o.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),u=e.ref([]),m=e.ref(""),g=(P,O,E)=>{var b;let S=[];(r==null?void 0:r.activeTabName)==="任务配置"?(S=[{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:P},{label:"按钮名称",value:"按钮名称",children:O}]},{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:"暂停"}]}],o.value=[{prop:"任务名称",rule:i},{prop:"任务关键词",rule:i},{prop:"执行任务",rule:i},{prop:"执行动作",rule:i},{prop:"执行交互",rule:i}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(S=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(b=r==null?void 0:r.relatedData)==null?void 0:b.map(_=>({label:_==null?void 0:_.任务名称,value:_==null?void 0:_.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],o.value=[{prop:"关联名称",rule:i},{prop:"关联状态",rule:i},{prop:"关联形式",rule:i},{prop:"关联任务集合",rule:i}]);let x;return E&&(E==null?void 0:E.length)>0?x=[...S,...y(P,O,E)]:x=S,x},y=(P,O,E)=>{const S=[{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?S==null?void 0:S.filter(x=>E==null?void 0:E.includes(x==null?void 0:x.prop)):S},d=(P,O)=>{var _,I,R,re,X,ye,fe,U,q;const E=((X=(re=(R=(I=(_=r==null?void 0:r.comp)==null?void 0:_.compData)==null?void 0:I.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:R.contents)==null?void 0:re.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:X.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],S=/button/i,x=((q=(U=(fe=(ye=r==null?void 0:r.comp)==null?void 0:ye.compData)==null?void 0:fe.filter(Z=>S.test(Z==null?void 0:Z.key)))==null?void 0:U.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:q.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],b=g(E,x,P);u.value=O?Q6(b,O):b,P&&(P==null?void 0:P.length)>0&&o.value.push(...P==null?void 0:P.map(Z=>({prop:Z,rule:i})))};e.onMounted(()=>{d(null,r==null?void 0:r.extendItem)});const A=P=>{const O=P==null?void 0:P[m.value];if(m.value==="执行任务"){if(!(O!=null&&O.join("/")))return;const E=O==null?void 0:O.join("/");d(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,P)}},w=P=>{n("change",{target:r==null?void 0:r.target,extendConfigs:P})},Y=(P,O)=>{m.value=O==null?void 0:O.changeProp,A(P)},D=P=>{n("onButtonClick",P)};return(P,O)=>(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,key:u.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:w,onBlurChange:Y,onOnButtonClick:D},null,8,["rowContents","formRules","buttonValue"]))}}),r4=sr._export_sfc(l4,[["__scopeId","data-v-4b39853f"]]),n4={};function i4(a,l){return null}const o4=sr._export_sfc(n4,[["render",i4]]),t4={class:"form-operate-content"},s4={class:"form-operate-item"},c4={class:"operate-title"},u4={class:"operate-content"},d4={class:"fix-content"},p4={class:"fix-button"},f4={class:"operate-title"},h4={class:"operate-content"},v4={class:"fix-content"},m4={class:"fix-button"},y4={style:{display:"flex","justify-content":"space-between"}},g4={class:"form-content"},b4={class:"dialog-footer"},k4={class:"form-content"},x4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref([]),p=e.ref([]),c=e.ref(!1),u=e.ref([]),m=e.ref([]),g=e.ref(""),y=e.ref(!1),d=e.ref(0),A=e.ref([]),w=e.ref([]),Y=(U,q)=>{if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="selectRelateType"){const Z=q==null?void 0:q.optionUrl;return(Z==null?void 0:Z.selectRelateType)||q[U.key]}if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="menuSelect"){const Z=q==null?void 0:q.optionUrl;return(Z==null?void 0:Z.menuSelect)||q[U.key]}if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="groupSelect"){const Z=q==null?void 0:q.optionUrl;return(Z==null?void 0:Z.groupSelect)||q[U.key]}if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="originalContent")return(q==null?void 0:q.value)||q[U.key];if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="multiple"){const Z=q[U.key];return dc(Z)?Z:U.default}return(U==null?void 0:U.label)==="类型"&&q[U.key]===""?"Input":(U==null?void 0:U.key)==="isFormColHidden"&&!q[U.key]?!1:q[U.key]},D=async U=>{var ae,ve,ze,te,N,se;i.value=!0;let q=[];const Z=await((ze=(ve=(ae=le.FormContent)==null?void 0:ae.find(W=>(W==null?void 0:W.key)===((U==null?void 0:U.type)===""?"Input":U==null?void 0:U.type)))==null?void 0:ve.value)==null?void 0:ze.value)??((N=(te=le.FormContent)==null?void 0:te.find(W=>(W==null?void 0:W.key)===((U==null?void 0:U.type)===""?"Input":U==null?void 0:U.type)))==null?void 0:N.value);if(Z==null||Z.forEach(W=>{d.value++,q.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,prop:W==null?void 0:W.prop,value:Y(W,U),id:d.value,contents:W==null?void 0:W.options,width:(U==null?void 0:U.width)??1})}),U!=null&&U.menuSelect&&((se=U==null?void 0:U.menuSelect)==null?void 0:se.length)>0){const W=await le.menuToContentType(U==null?void 0:U.menuSelect);q=q==null?void 0:q.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=W),ue))}g.value=U==null?void 0:U.id,o.value=await le.selectToBase(le.formToOptionsContents(q)),p.value=await le.selectToBase(le.formToOptionsContents(q))},P=U=>{var Z;c.value=!0;let q=[];(Z=le.FormButton)==null||Z.forEach(ae=>{d.value++,q.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:(ae==null?void 0:ae.label)==="类型"&&U[ae.key]===""?"normal":U[ae.key],id:d.value,contents:ae==null?void 0:ae.options})}),A.value=q,w.value=q,g.value=U==null?void 0:U.id};e.watch(()=>y.value,()=>{var q,Z;let U=M.cloneDeep(r.originalItemContents);(q=M.cloneDeep(r.originalItemContents))!=null&&q.find(ae=>(ae==null?void 0:ae.key)==="enableWrap")?U=(Z=M.cloneDeep(r.originalItemContents))==null?void 0:Z.map(ae=>((ae==null?void 0:ae.key)==="enableWrap"&&(ae.contents=!y.value),ae)):U.push({key:"enableWrap",contents:!y.value}),n("change",U)},{deep:!0});const O=()=>{var Z,ae,ve,ze,te;A.value=w.value;let U={};if(g.value!==""?U.id=g.value:(d.value++,U.id="id"+d.value),(Z=A.value)==null||Z.forEach(N=>{var W;const se=(W=le.FormButton)==null?void 0:W.find(ue=>(ue==null?void 0:ue.label)===(N==null?void 0:N.label));se&&(U[se.key]=N.value)}),(ae=u.value)!=null&&ae.find(N=>N.id===U.id))u.value=(ve=u.value)==null?void 0:ve.map(N=>(N.id===U.id&&(N=U),N));else{let N=M.cloneDeep(u.value);u.value||(u.value=[]),N.push(U),u.value=N}c.value=!1,g.value="";let q=M.cloneDeep(r.originalItemContents);(ze=M.cloneDeep(r.originalItemContents))!=null&&ze.find(N=>(N==null?void 0:N.key)==="formButton")?q=(te=M.cloneDeep(r.originalItemContents))==null?void 0:te.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=u.value),N)):q.push({key:"formButton",contents:u.value}),n("change",q)},E=U=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var q,Z;m.value=(q=M.cloneDeep(m.value))==null?void 0:q.filter(ae=>(ae==null?void 0:ae.id)!==(U==null?void 0:U.id)),n("change",(Z=M.cloneDeep(r.originalItemContents))==null?void 0:Z.map(ae=>((ae==null?void 0:ae.key)==="formContent"&&(ae.contents=m.value),ae))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=U=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var q,Z;u.value=(q=M.cloneDeep(u.value))==null?void 0:q.filter(ae=>(ae==null?void 0:ae.id)!==(U==null?void 0:U.id)),n("change",(Z=M.cloneDeep(r.originalItemContents))==null?void 0:Z.map(ae=>((ae==null?void 0:ae.key)==="formButton"&&(ae.contents=u.value),ae))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>{var q;c.value=!0;let U=[];(q=le.FormButton)==null||q.forEach(Z=>{d.value++,U.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:(Z==null?void 0:Z.label)==="类型"?"normal":"",id:d.value,contents:Z==null?void 0:Z.options})}),A.value=U,w.value=U},b=()=>{var q,Z,ae;i.value=!0;let U=[];(ae=(Z=(q=le.FormContent)==null?void 0:q.find(ve=>(ve==null?void 0:ve.key)==="Input"))==null?void 0:Z.value)==null||ae.forEach(ve=>{d.value++,U.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"?"Input":"",id:d.value,contents:ve==null?void 0:ve.options})}),o.value=U,p.value=U},_=U=>{let q=M.cloneDeep(w.value);q=q==null?void 0:q.map(Z=>(Z.value=U==null?void 0:U[Z.name],Z)),w.value=q},I=U=>{const q=U.find(ve=>(ve==null?void 0:ve.name)==="类型");if((q==null?void 0:q.value)!="Select")return;const Z=U.find(ve=>(ve==null?void 0:ve.name)==="多选"),ae=U.find(ve=>(ve==null?void 0:ve.name)==="初始值");Z!=null&&Z.value&&To.isString(ae.value)&&(ae.value=[ae.value]),!(Z!=null&&Z.value)&&!To.isString(ae.value)&&(ae.value="")},R=async U=>{var q,Z,ae,ve,ze,te,N,se,W,ue,_e,we;if((U==null?void 0:U.类型)!==((Z=(q=p.value)==null?void 0:q.find(Ke=>(Ke==null?void 0:Ke.label)==="类型"))==null?void 0:Z.value)){let Ke=[];const la=await((ze=(ve=(ae=le.FormContent)==null?void 0:ae.find(j=>(j==null?void 0:j.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:ve.value)==null?void 0:ze.value)?await((ue=(W=(se=le.FormContent)==null?void 0:se.find(j=>(j==null?void 0:j.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:W.value)==null?void 0:ue.value):(N=(te=le.FormContent)==null?void 0:te.find(j=>(j==null?void 0:j.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:N.value;if(la==null||la.forEach(j=>{var Oe,Ie;d.value++;const We=ld(j==null?void 0:j.default)?(U==null?void 0:U[j.label])??j.value??"":j==null?void 0:j.default;Ke.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:We,prop:j==null?void 0:j.prop,id:d.value,contents:j==null?void 0:j.options,width:((Ie=(Oe=p.value)==null?void 0:Oe[0])==null?void 0:Ie.width)??1})}),U!=null&&U.菜单选项&&((_e=U==null?void 0:U.菜单选项)==null?void 0:_e.length)>0){const j=await le.menuToContentType(U==null?void 0:U.菜单选项);Ke=Ke==null?void 0:Ke.map(We=>((We==null?void 0:We.name)==="组信息选项"&&(We.contents=j),We))}I(Ke),p.value=await le.selectToBase(M.cloneDeep(Ke)),o.value=await le.selectToBase(M.cloneDeep(Ke))}else{let Ke=M.cloneDeep(p.value);if(Ke=Ke==null?void 0:Ke.map(la=>(la.value=U==null?void 0:U[la.name],la)),U!=null&&U.菜单选项&&((we=U==null?void 0:U.菜单选项)==null?void 0:we.length)>0){const la=await le.menuToContentType(U==null?void 0:U.菜单选项);Ke=Ke==null?void 0:Ke.map(j=>((j==null?void 0:j.name)==="组信息选项"&&(j.contents=la),j))}Ke=le.formToOptionsContents(Ke),I(Ke),p.value=await le.selectToBase(M.cloneDeep(Ke))}},re=U=>{U||(o.value=p.value)},X=async U=>{await R(U),o.value=p.value},ye=Fl.debounce(async()=>{var ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la;o.value=p.value;let U={};U.width=((ve=(ae=o.value)==null?void 0:ae[0])==null?void 0:ve.width)??1,g.value!==""?U.id=g.value:(d.value++,U.id="id"+d.value);let q=await((N=(te=(ze=le.FormContent)==null?void 0:ze.find(j=>{var We,Oe;return(j==null?void 0:j.key)===(((Oe=(We=o.value)==null?void 0:We.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Oe.value)??"label")}))==null?void 0:te.value)==null?void 0:N.value)??((W=(se=le.FormContent)==null?void 0:se.find(j=>{var We,Oe;return(j==null?void 0:j.key)===(((Oe=(We=o.value)==null?void 0:We.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Oe.value)??"label")}))==null?void 0:W.value);if((ue=o.value)==null||ue.forEach(j=>{const We=q==null?void 0:q.find(Oe=>(Oe==null?void 0:Oe.label)===(j==null?void 0:j.label));We&&(U[We.key]=j.value)}),U.width=U.width?U.width:1,U.key=U==null?void 0:U.label,U.isFormColHidden=U==null?void 0:U.isFormColHidden,(_e=m.value)!=null&&_e.find(j=>j.id===U.id))m.value=(we=m.value)==null?void 0:we.map(j=>(j.id===U.id&&(j=U),j));else{let j=M.cloneDeep(m.value);j.push(U),m.value=j}m.value=m.value.map(({id:j,...We})=>We),i.value=!1,g.value="";let Z=M.cloneDeep(r.originalItemContents);(Ke=M.cloneDeep(r.originalItemContents))!=null&&Ke.find(j=>(j==null?void 0:j.key)==="formContent")?Z=(la=M.cloneDeep(r.originalItemContents))==null?void 0:la.map(j=>((j==null?void 0:j.key)==="formContent"&&(j.contents=m.value),j)):Z.push({key:"formContent",contents:m.value}),n("change",Z)},300),fe=()=>{i.value=!1,c.value=!1,g.value="",p.value=[],w.value=[]};return e.watch(()=>r.originalItemContents,()=>{var q,Z,ae,ve,ze,te;if(!r.originalItemContents||r.originalItemContents.length===0)return;const U=M.cloneDeep(r.originalItemContents);m.value=((q=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:q.contents)??[],u.value=((Z=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:Z.contents)??[],y.value=(ae=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&ae.contents?!((ve=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&ve.contents):!0,m.value=(ze=M.cloneDeep(m.value))==null?void 0:ze.map((N,se)=>{var ue;let W=N;return W.id=(N==null?void 0:N.id)??se,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=((ue=N==null?void 0:N.options)==null?void 0:ue.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,W}),m.value=le.formToOptionsContents(m.value),u.value=(te=u.value)==null?void 0:te.map((N,se)=>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:se})},{deep:!0,immediate:!0}),(U,q)=>{const Z=e.resolveComponent("svg-icon"),ae=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",t4,[e.createElementVNode("div",s4,[e.createElementVNode("div",c4,[q[2]||(q[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ae,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[q[1]||(q[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",u4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(ve,ze)=>(e.openBlock(),e.createElementBlock("div",{key:ze},[e.createElementVNode("div",d4,[e.createElementVNode("div",null,e.toDisplayString(ve.label),1),e.createElementVNode("div",p4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>D(ve)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>E(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",f4,[q[4]||(q[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ae,{class:"icon-content",id:"themeButton",onClick:x},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[q[3]||(q[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",h4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(ve,ze)=>(e.openBlock(),e.createElementBlock("div",{key:ze},[e.createElementVNode("div",v4,[e.createElementVNode("div",null,e.toDisplayString(ve.label),1),e.createElementVNode("div",m4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>P(ve)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>S(ve)},null,8,["onClick"])])])]))),128))]),q[6]||(q[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",y4,[q[5]||(q[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(dl._sfc_main$1,{modelValue:y.value,"onUpdate:modelValue":q[0]||(q[0]=ve=>y.value=ve)},null,8,["modelValue"])])]),e.createVNode($r.ssDialog,{visible:i.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",g4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:R,onChangeVisible:re,onBlurChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",b4,[e.createVNode(ae,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>q[7]||(q[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ae,{class:"ok-button button",onClick:e.unref(ye),id:"themeButton"},{default:e.withCtx(()=>q[8]||(q[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:c.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",k4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:fe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:O},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ls=sr._export_sfc(x4,[["__scopeId","data-v-20850524"]]),w4={class:"step-module content"},_4={class:"module-data"},S4={class:"step-module layout"},E4={class:"form-content"},C4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=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}]),o=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),p=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),u=e.ref("create"),m=e.ref({}),g=e.ref([]),y=D=>{var P;m.value=D,n("change",(P=w())==null?void 0:P.compData)},d=(D,P)=>{var O,E;switch(D){case"create":(O=o.value)==null||O.forEach(S=>{S.value=""}),u.value="create",c.visible=!0;break;case"update":(E=o.value)==null||E.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),u.value="update",c.visible=!0;break;case"delete":g.value.splice(P,1),u.value="delete";break}},A=D=>{var P,O,E;if((D==null?void 0:D.buttonName)==="确认"){const S=M.cloneDeep(D==null?void 0:D.content);switch(Object.keys(S).forEach(x=>{S[x]===""&&delete S[x]}),u.value){case"create":g.value.push({...S,index:((P=g.value)==null?void 0:P.length)+1});break;case"update":g.value=(O=g.value)==null?void 0:O.map(x=>x.index===(S==null?void 0:S.index)?{...x,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:x);break}n("change",(E=w())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},w=()=>({comp:"Step",compData:[{key:"stepList",contents:g.value},{key:"stepConfig",contents:m.value}]}),Y=()=>{c.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,D=>{var P,O;D&&(m.value=((P=D==null?void 0:D.find(E=>E.key==="stepConfig"))==null?void 0:P.contents)??{},g.value=((O=D==null?void 0:D.find(E=>E.key==="stepList"))==null?void 0:O.contents)??[])},{immediate:!0}),(D,P)=>{const O=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",w4,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>d("update",{...S,index:x+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>d("delete",x)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",S4,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(dl.ssForm,{rowContents:i.value,onChange:y},null,8,["rowContents"])])]),e.createVNode($r.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Y,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",E4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:p.value,onOnButtonClick:A},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),D4=sr._export_sfc(C4,[["__scopeId","data-v-7dbd17f2"]]),T4={class:"step-module content"},B4={class:"module-data"},N4={class:"step-module layout"},A4={class:"form-content"},z4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref("create"),o=e.ref({}),p=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}]),u=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"}]),g=e.reactive({visible:!1,width:"40%",title:"时间线"}),y=D=>{var P;o.value=D,n("change",(P=w())==null?void 0:P.compData)},d=(D,P)=>{var O,E;switch(D){case"create":(O=u.value)==null||O.forEach(S=>{S.value=""}),i.value="create",g.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),i.value="update",g.visible=!0;break;case"delete":p.value.splice(P,1),i.value="delete";break}},A=D=>{var P,O,E,S;if((D==null?void 0:D.buttonName)==="确认"){const x=M.cloneDeep(D==null?void 0:D.content);switch(Object.keys(x).forEach(b=>{x[b]===""&&delete x[b]}),i.value){case"create":(O=p.value)==null||O.push({...x,index:((P=p.value)==null?void 0:P.length)+1});break;case"update":p.value=(E=p.value)==null?void 0:E.map(b=>b.index===(x==null?void 0:x.index)?{...b,content:x==null?void 0:x.content,timestamp:x==null?void 0:x.timestamp}:b);break}n("change",(S=w())==null?void 0:S.compData),g.visible=!1}else g.visible=!1},w=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:p.value},{key:"timeLineConfig",contents:o.value}]}),Y=()=>{g.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,D=>{var P,O;D&&(o.value=((P=D==null?void 0:D.find(E=>E.key==="timeLineConfig"))==null?void 0:P.contents)??{},p.value=((O=D==null?void 0:D.find(E=>E.key==="timeLineList"))==null?void 0:O.contents)??[])},{immediate:!0}),(D,P)=>{const O=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",T4,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",B4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>d("update",{...S,index:x+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>d("delete",x)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",N4,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(dl.ssForm,{rowContents:c.value,onChange:y},null,8,["rowContents"])])]),e.createVNode($r.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:Y,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",A4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:A},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),M4=sr._export_sfc(z4,[["__scopeId","data-v-39ffc861"]]),I4={};function O4(a,l){return e.openBlock(),e.createElementBlock("div")}const L4=sr._export_sfc(I4,[["render",O4]]),R4={class:"extra-content"},$4={key:0},V4={key:1},F4={class:"dialog-footer"},P4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const r=a,n=e.ref(0),i=e.ref(),o=e.ref(),p=l,c=e.ref(!1),u=e.ref({}),m=e.ref({}),g=e.ref();e.watch(()=>[r.itemData],()=>{var S;const E=M.cloneDeep(r.itemData);i.value=(S=M.cloneDeep(E))==null?void 0:S.map(x=>{var b;if(x.key==="extra"){let _=[];(b=x.value)==null||b.forEach(I=>{var R;_.push((R=Object.values(I))==null?void 0:R[0])}),x.value=_}return x})},{deep:!0,immediate:!0});const y=(E,S,x,b)=>{var I;let _={};((I=E==null?void 0:E[0])==null?void 0:I.contents)==="详情"&&(c.value=!0,_[S]=E,o.value=E==null?void 0:E.filter(R=>(R==null?void 0:R.key)!=="tableContentName"),u.value=_,m.value=x,g.value=b.id)},d=E=>{var R,re,X,ye;const S=(re=(R=Object.values(M.cloneDeep(u.value)))==null?void 0:R[0])==null?void 0:re.filter(fe=>(fe==null?void 0:fe.key)==="tableContentName"),x=(ye=(X=Object.values(M.cloneDeep(u.value)))==null?void 0:X[0])==null?void 0:ye.filter(fe=>(fe==null?void 0:fe.key)!=="tableContentName"),b=x==null?void 0:x.map((fe,U)=>{var q;return U===E.index&&(fe==null?void 0:fe.comp)==="Table"&&(fe.compData=(q=fe.compData)==null?void 0:q.map(Z=>{var ae,ve;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(ve=(ae=E.content)==null?void 0:ae.map(ze=>{let te={};for(let N in ze)N!=="id"&&(te[N]=ze[N]);return te}))==null?void 0:ve.map(ze=>Object.values(ze))),Z})),fe});b.unshift(S==null?void 0:S[0]);let _=M.cloneDeep(u.value),I={};for(let fe in _)I[fe]=b;u.value=I},A=()=>{c.value=!1,u.value={},m.value={},g.value=void 0,n.value++},w=E=>{var R,re,X,ye;const S=(re=(R=Object.values(M.cloneDeep(u.value)))==null?void 0:R[0])==null?void 0:re.filter(fe=>(fe==null?void 0:fe.key)==="tableContentName"),x=(ye=(X=Object.values(M.cloneDeep(u.value)))==null?void 0:X[0])==null?void 0:ye.filter(fe=>(fe==null?void 0:fe.key)!=="tableContentName"),b=x==null?void 0:x.map((fe,U)=>(U===E.index&&(fe.compData=E.contents),fe));b.unshift(S==null?void 0:S[0]);let _=M.cloneDeep(u.value),I={};for(let fe in _)I[fe]=b;u.value=I},Y=()=>{var S,x;let E={};for(let b in m.value)b===((S=Object.keys(u.value))==null?void 0:S[0])?E[b]=(x=Object.values(u.value))==null?void 0:x[0]:E[b]=m.value[b];p("change",{buttonName:"编辑",index:g.value,singleContent:E},"methodData"),c.value=!1,u.value={},m.value={},g.value=void 0},D=()=>{c.value=!1,u.value={},m.value={},g.value=void 0},P=E=>{p("change",E,"methodData")},O=E=>Ri(E);return(E,S)=>{const x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",R4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(b,_)=>(e.openBlock(),e.createElementBlock("div",{key:n.value},[(b==null?void 0:b.key)==="extra"?(e.openBlock(),e.createElementBlock("div",$4)):(e.openBlock(),e.createElementBlock("div",V4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(b.comp)),{itemData:b==null?void 0:b.compData,childItemData:b==null?void 0:b.itemChildData,key:_,index:(b==null?void 0:b.id)??_,onContentClick:y,onChange:P},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode($r.ssDialog,{visible:c.value,onBeforeDestroy:D},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(b,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(b.comp)),{itemData:b==null?void 0:b.compData,onChange:d,childItemData:b==null?void 0:b.itemChildData,key:_,onContentChange:w,index:(b==null?void 0:b.id)??_,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",F4,[e.createVNode(x,{class:"cancel-button footer-button",onClick:A,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(x,{class:"confirm-button footer-button",onClick:Y,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},j4=sr._export_sfc(P4,[["__scopeId","data-v-2d9c5ab2"]]),H4={key:0,class:"method-content"},U4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),r=le.useOriginalState(M.pinia),{originalPath:n}=M.storeToRefs(r),i=a,o=e.ref(!1),p=e.ref(),c=le.useTableComp(M.pinia),{multipleTableConst:u}=M.storeToRefs(c),m=M.useModelComp(M.pinia),g=e.ref(!1),y=M.useMenuState(M.pinia),d=M.useLoginState(M.pinia),{itemData:A,isEdit:w,routeToChildPath:Y,tableViewContents:D,lockingPage:P,payloadTypes:O}=M.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:x}=M.storeToRefs(y),{loginUserInfo:b}=M.storeToRefs(d),_=e.ref(!1),I=async()=>{var te,N;(te=l.value)!=null&&te.find(se=>(se==null?void 0:se.buttonName)==="保存")&&await Z((N=l.value)==null?void 0:N.find(se=>(se==null?void 0:se.buttonName)==="保存")),await le.onSaveBack()};e.watch(()=>A.value,async()=>{w.value==="view"&&!_.value&&await ze(M.cloneDeep(i.itemData)),_.value=!1},{deep:!0});const R=()=>{o.value=!1,p.value=void 0},re=te=>te.map(N=>{const se={};for(const W in N){const ue=N[W];if(W.includes(u.value)){const _e=W.split(u.value);let we=se;_e.forEach((Ke,la)=>{la===_e.length-1?we[Ke]=ue:(we[Ke]||(we[Ke]={}),we=we[Ke])})}else se[W]=ue}return se}),X=async(te,N,se=[])=>{var ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge;let W=(ue=M.cloneDeep(N))==null?void 0:ue.filter($=>($==null?void 0:$.comp)!=="methodButton");if(te!=null&&te.includes("[")){let $=(j=(la=(Ke=(we=(_e=M.cloneDeep(te))==null?void 0:_e.split("["))==null?void 0:we[1])==null?void 0:Ke.split("]"))==null?void 0:la[0])==null?void 0:j.split(":"),V="";if($!=null&&$[0]){let ee=(We=W==null?void 0:W.find(ce=>(ce==null?void 0:ce.name)===($==null?void 0:$[0])))==null?void 0:We.compData;if(!ee){let ce=(Oe=te==null?void 0:te.split("["))==null?void 0:Oe[0],he=await le.getItemData(ce,sessionStorage.getItem("systemKey"),"",!1,"","",se);ee=(Ie=he==null?void 0:he.find(ca=>(ca==null?void 0:ca.name)===($==null?void 0:$[0])))==null?void 0:Ie.compData}ee==null||ee.forEach(ce=>{var he,ca,ia,Ve,ga,Ta;if((ce==null?void 0:ce.key)==="formContent")(he=ce==null?void 0:ce.contents)==null||he.forEach(De=>{var Fa;(De==null?void 0:De.key)===($==null?void 0:$[1])&&(Array.isArray(De==null?void 0:De.value)?V=De==null?void 0:De.value:V=(Fa=De==null?void 0:De.value)==null?void 0:Fa.toString())});else if((ce==null?void 0:ce.key)==="tableContents"){let De=[],Fa=(ca=ee==null?void 0:ee.find(da=>(da==null?void 0:da.key)==="header"))==null?void 0:ca.contents,Na=($==null?void 0:$[1])??"";if(Fa!=null&&Fa.every(da=>Array.isArray(da))){let da=le.getColumnChild((ga=Fa==null?void 0:Fa[0])==null?void 0:ga.filter(ja=>(ja==null?void 0:ja.label)!=="操作"));(Ta=ce.contents)==null||Ta.forEach(ja=>{let ta={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),da==null||da.forEach((je,ya)=>{let Ze=ja[ya];typeof ja[ya]=="number"&&(Ze=ja[ya].toString()),(Na===""||Na===je.prop)&&(ta[je.prop]=Ze)}),De.push(ta)}),De=re(De)}else{let da=(ia=Fa==null?void 0:Fa.map(ja=>ja==null?void 0:ja.label))==null?void 0:ia.filter(ja=>ja!=="操作");(Ve=ce.contents)==null||Ve.forEach(ja=>{let ta={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),da==null||da.forEach((je,ya)=>{let Ze=ja[ya];typeof ja[ya]=="number"&&(Ze=ja[ya].toString()),(Na===""||Na===je)&&(ta[je]=Ze)}),De.push(ta)})}V=De}})}return V}else if(te!=null&&te.includes("/")){let $={};return(Me=M.cloneDeep(W))==null||Me.forEach((V,ee)=>{var ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe;if((V==null?void 0:V.comp)==="Table"){let ua=Array.isArray((ca=(he=(ce=V==null?void 0:V.compData)==null?void 0:ce.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:he.contents)==null?void 0:ca[0])?(Ta=(ga=(Ve=(ia=V==null?void 0:V.compData)==null?void 0:ia.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:Ve.contents)==null?void 0:ga[0])==null?void 0:Ta.some(Le=>Le==null?void 0:Le.children):[],Qe=(Na=(Fa=(De=V==null?void 0:V.compData)==null?void 0:De.find(Le=>(Le==null?void 0:Le.key)==="tableContents"))==null?void 0:Fa.contents)==null?void 0:Na.map(Le=>(Le!=null&&Le.find(Fe=>Fe==null?void 0:Fe.id)&&(Le=Le.slice(1)),Le)),Da=(ya=(je=(ta=(ja=(da=V==null?void 0:V.compData)==null?void 0:da.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:ja.contents)==null?void 0:ta[0])==null?void 0:je[0])==null?void 0:ya.label,Te=(Ae=(Ze=V==null?void 0:V.compData)==null?void 0:Ze.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:Ae.contents;if(ua)(ua==null?void 0:ua.length)===0?$[V.name]=$!=null&&$[V.name]?$[V.name]:le.tableToForm(Qe,Te):$[Da]=le.tableToForm(Qe,Te);else{const Le=[];Te=Te.slice(1,Te.length-1),Te==null||Te.forEach((Fe,Ne)=>{Qe==null||Qe.forEach(me=>{Le.push({key:Fe.label+me[0],value:me[Ne+1]})})}),$["form"+ee]=Le}}else{const ua=(pe=(ne=V.compData)==null?void 0:ne.find(Da=>(Da==null?void 0:Da.key)==="formContent"))==null?void 0:pe.contents;$!=null&&$.form||($.form=[]);const Qe=[];ua==null||ua.forEach(Da=>{Da.key!==""&&(Da={key:(Da==null?void 0:Da.key)??(Da==null?void 0:Da.label),value:Da==null?void 0:Da.value},Qe.push(Da))}),$.form=[...Qe,...M.cloneDeep($==null?void 0:$.form)]}}),$}else{if(te==="createInsofDataApi"){let $=(de=M.cloneDeep(N))==null?void 0:de[0];return $={comp:(Ce=M.cloneDeep($))==null?void 0:Ce.comp,compData:(Je=M.cloneDeep($))==null?void 0:Je.compData,name:(Ea=M.cloneDeep($))==null?void 0:Ea.name,isShow:(Ge=M.cloneDeep($))==null?void 0:Ge.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:$}}}return te}},ye=async(te,N,se)=>{var _e,we,Ke;let W=await le.getItemData(N,sessionStorage.getItem("systemKey"),""),ue=W==null?void 0:W.find(la=>(la==null?void 0:la.name)===(se==null?void 0:se[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let la={};for(let Ce in M.cloneDeep(te))M.cloneDeep(te)[Ce]!=="loginUser"?la[Ce]=M.cloneDeep(te)[Ce]:la[Ce]=((_e=b.value)==null?void 0:_e.account)||((we=b.value)==null?void 0:we.账号);let j=[],We=la;Array.isArray(te)||(We=[la]),We==null||We.forEach(Ce=>{j.push({[Ce[se[1]]]:Ce})});let Oe=[],Ie=j==null?void 0:j.map(Ce=>{var Je;return(Je=Object.keys(Ce))==null?void 0:Je[0]});W==null||W.forEach(Ce=>{var Je;(Ce==null?void 0:Ce.name)===(se==null?void 0:se[0])&&((Je=Ce==null?void 0:Ce.compData)==null||Je.forEach(Ea=>{var Ge;(Ea==null?void 0:Ea.key)==="tableContents"&&((Ge=Ea==null?void 0:Ea.contents)==null||Ge.forEach($=>{$!=null&&$.some(V=>Ie.includes(V))&&Oe.push({[$.find(V=>V.id).id]:$.find(V=>Ie.includes(V))})}))}))});let Me=Oe==null?void 0:Oe.map(Ce=>{var Je;return(Je=Object.keys(Ce))==null?void 0:Je[0]}),de=[];if(Me==null||Me.forEach(Ce=>{var Ge;let Je=(Ge=Oe==null?void 0:Oe.find($=>{var V;return((V=Object.keys($))==null?void 0:V[0].toString())===Ce.toString()}))==null?void 0:Ge[Ce],Ea=j==null?void 0:j.find($=>{var V;return((V=Object.keys($))==null?void 0:V[0])===Je});de.push({id:parseInt(Ce),value:{tableData:Ea[Je]}})}),(de==null?void 0:de.length)>0)return de}else if((ue==null?void 0:ue.comp)==="Form"){let la=M.cloneDeep(ue);la.compData=(Ke=la.compData)==null?void 0:Ke.map(Oe=>{var Ie;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(Ie=Oe.contents)==null?void 0:Ie.map(Me=>((Me==null?void 0:Me.key)===(se==null?void 0:se[1])&&(Me.value=(te==null?void 0:te[Me==null?void 0:Me.prop])||te),Me))),Oe});let j={};for(let Oe in la)Oe!=="id"&&(j[Oe]=la[Oe]);let We=[];if(We.push({id:ue==null?void 0:ue.id,keyType:se==null?void 0:se[1],value:{pageData:j}}),(We==null?void 0:We.length)>0)return We}}},fe=async(te,N,se)=>{var _e,we,Ke,la,j,We,Oe,Ie,Me,de;let W=await le.getItemData(N,sessionStorage.getItem("systemKey"),""),ue=W==null?void 0:W.find(Ce=>(Ce==null?void 0:Ce.name)===(se==null?void 0:se[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let Ce={};for(let Je in M.cloneDeep(te))M.cloneDeep(te)[Je]!=="loginUser"?Ce[Je]=M.cloneDeep(te)[Je]:Ce[Je]=((_e=b.value)==null?void 0:_e.account)||((we=b.value)==null?void 0:we.账号);await Zr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ce}})}else if((ue==null?void 0:ue.comp)==="Form"){let Ce=M.cloneDeep(ue),Je=Object.keys(te),Ea="";(la=(Ke=M.cloneDeep(Ce))==null?void 0:Ke.compData)==null||la.forEach(he=>{var ca,ia;(he==null?void 0:he.key)==="formContent"&&((ia=(ca=M.cloneDeep(he))==null?void 0:ca.contents)==null||ia.forEach(Ve=>{var ga;Je.includes(Ve==null?void 0:Ve.key)&&(Ve==null?void 0:Ve.value)===((ga=b.value)==null?void 0:ga.姓名)&&(Ea=Ve==null?void 0:Ve.key)}))});let Ge=[];(j=Object.values(te[Ea]))==null||j.forEach(he=>{he!=null&&he.includes("(")&&Ge.push(he)}),Ge=[...new Set(Ge)];const $=Ge==null?void 0:Ge.map(async he=>{var Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne;let ca="";(ja=(da=(Na=(Fa=(De=(Ta=M.cloneDeep(he))==null?void 0:Ta.split("("))==null?void 0:De[1])==null?void 0:Fa.split(")"))==null?void 0:Na[0])==null?void 0:da.split(":"))==null||ja.forEach(pe=>{ca=ca===""?ca+pe.replaceAll("'",""):ca+"/"+pe.replaceAll("'","")});let ia=[];(ne=(Ae=(Ze=(ya=(je=(ta=M.cloneDeep(he))==null?void 0:ta.split("<"))==null?void 0:je[1])==null?void 0:ya.split(">"))==null?void 0:Ze[0])==null?void 0:Ae.split(":"))==null||ne.forEach(pe=>{ia.push(pe.replaceAll("'",""))});const Ve=await le.getItemData(ca,sessionStorage.getItem("systemKey"),"");let ga="";return Ve==null||Ve.forEach(pe=>{var ua;pe.name===(ia==null?void 0:ia[0])&&((ua=pe==null?void 0:pe.compData)==null||ua.forEach(Qe=>{var Da;(Qe==null?void 0:Qe.key)==="formContent"&&((Da=Qe.contents)==null||Da.forEach(Te=>{(Te==null?void 0:Te.key)===(ia==null?void 0:ia[1])&&(ga=Te==null?void 0:Te.value)}))}))}),{[he]:ga}}),V=await Promise.all($);Ce.compData=(Oe=(We=M.cloneDeep(Ce))==null?void 0:We.compData)==null?void 0:Oe.map(he=>{var ca,ia;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(ia=(ca=M.cloneDeep(he))==null?void 0:ca.contents)==null?void 0:ia.map(Ve=>{var ga,Ta,De,Fa;return(ga=te[Ea])!=null&&ga[Ve==null?void 0:Ve.key]&&(te[Ea][Ve==null?void 0:Ve.key].includes("(")?Ve.value=(Ta=V==null?void 0:V.find(Na=>{var da;return((da=Object.keys(Na))==null?void 0:da[0])===te[Ea][Ve==null?void 0:Ve.key]}))==null?void 0:Ta[te[Ea][Ve==null?void 0:Ve.key]]:Ve.value=(Fa=(De=M.cloneDeep(te))==null?void 0:De[Ea])==null?void 0:Fa[Ve==null?void 0:Ve.key]),Ve})),he});const ee=await Zr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let ce="";((Ie=ee==null?void 0:ee.data)==null?void 0:Ie.type)==="success"&&((de=(Me=ee==null?void 0:ee.data)==null?void 0:Me.result)==null||de.forEach(he=>{var ca,ia;((ia=(ca=he==null?void 0:he.value)==null?void 0:ca.pageData)==null?void 0:ia.name)===(se==null?void 0:se[0])&&(ce=he.id)}),await Zr.updateInsofDataApi({id:ce,value:{pageData:Ce}}))}}},U=(te,N="",se={})=>{for(const[W,ue]of Object.entries(te)){const _e=N?`${N}.${W}`:W;ue!==null&&typeof ue=="object"&&!Array.isArray(ue)&&Object.prototype.toString.call(ue)!=="[object Date]"?U(ue,_e,se):se[_e]=ue}return se},q=async(te,N,se,W)=>{var we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa;let ue=await le.getItemData(N,sessionStorage.getItem("systemKey"),""),_e=ue==null?void 0:ue.find(Na=>(Na==null?void 0:Na.name)===(se==null?void 0:se[0]));if(_e){if(!(se!=null&&se[1])&&(_e==null?void 0:_e.comp)==="Table"){let Na={},da=[],ja=(Ke=(we=_e==null?void 0:_e.compData)==null?void 0:we.find(ya=>(ya==null?void 0:ya.key)==="header"))==null?void 0:Ke.contents;ja!=null&&ja.every(ya=>Array.isArray(ya))?da=(j=le.getColumnChild((la=ja==null?void 0:ja[0])==null?void 0:la.filter(ya=>(ya==null?void 0:ya.label)!=="操作")))==null?void 0:j.map(ya=>ya==null?void 0:ya.prop):da=ja==null?void 0:ja.map(ya=>ya==null?void 0:ya.label);for(let ya in M.cloneDeep(te))if(M.cloneDeep(te)[ya]!=="loginUser"){let Ze=U(M.cloneDeep(te)[ya]),Ae={};for(let ne in Ze)if(da!=null&&da.find(pe=>pe===ne))Ae[ne]=Ze[ne];else if(da!=null&&da.find(pe=>(pe==null?void 0:pe.toUpperCase())===(ne==null?void 0:ne.toUpperCase()))){let pe=da==null?void 0:da.find(ua=>(ua==null?void 0:ua.toUpperCase())===(ne==null?void 0:ne.toUpperCase()));Ae[pe]=Ze[ne]}Na[ya]=Ae}else Na[ya]=((We=b.value)==null?void 0:We.account)||((Oe=b.value)==null?void 0:Oe.账号);let ta=await Zr.getInsofDataApi({keyLikes:{tableId:_e==null?void 0:_e.id}});if(((Me=(Ie=ta==null?void 0:ta.data)==null?void 0:Ie.result)==null?void 0:Me.length)>0){let ya=(Ce=(de=ta==null?void 0:ta.data)==null?void 0:de.result)==null?void 0:Ce.map(Ze=>Ze==null?void 0:Ze.id);(ya==null?void 0:ya.length)>0&&await Zr.batchDeleteInsofDataApi({ids:ya})}let je=[];if((Je=_e==null?void 0:_e.compData)!=null&&Je.find(ya=>(ya==null?void 0:ya.key)==="pageColumn")&&(($=(Ge=(Ea=_e==null?void 0:_e.compData)==null?void 0:Ea.find(ya=>(ya==null?void 0:ya.key)==="pageColumn"))==null?void 0:Ge.contents)!=null&&$.includes("["))){const ya=await Zr.getInsofDataApi({id:_e==null?void 0:_e.tableId});let Ze=((he=(ce=(ee=(V=ya==null?void 0:ya.data)==null?void 0:V.result)==null?void 0:ee[0])==null?void 0:ce.key)==null?void 0:he.pageKey)??"";(ca=Object.values(Na))==null||ca.forEach(Ae=>{je.push({key:{type:"data",pageKey:Ze,tableId:_e==null?void 0:_e.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ae}})})}else(ia=Object.values(Na))==null||ia.forEach(ya=>{je.push({key:{type:"data",pageKey:N,tableId:_e==null?void 0:_e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ya}})});(je==null?void 0:je.length)>0&&await Zr.batchAddInsofDataApi({dataList:je})}else if(!(se!=null&&se[1])&&(_e==null?void 0:_e.comp)==="Form"){let Na=M.cloneDeep(_e);Na.compData=(ga=(Ve=M.cloneDeep(Na))==null?void 0:Ve.compData)==null?void 0:ga.map(ta=>{var je,ya;return(ta==null?void 0:ta.key)==="formContent"&&(ta.contents=(ya=(je=M.cloneDeep(ta))==null?void 0:je.contents)==null?void 0:ya.map(Ze=>{var Ae,ne;return(Ae=M.cloneDeep(te))!=null&&Ae[Ze==null?void 0:Ze.key]&&(Ze.value=(ne=M.cloneDeep(te))==null?void 0:ne[Ze==null?void 0:Ze.key]),Ze})),ta});const da=await Zr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let ja="";((Ta=da==null?void 0:da.data)==null?void 0:Ta.type)==="success"&&((Fa=(De=da==null?void 0:da.data)==null?void 0:De.result)==null||Fa.forEach(ta=>{var je,ya;((ya=(je=ta==null?void 0:ta.value)==null?void 0:je.pageData)==null?void 0:ya.name)===(se==null?void 0:se[0])&&(ja=ta.id)}),await Zr.updateInsofDataApi({id:ja,value:{pageData:Na}}))}}},Z=async te=>{var N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de;y.setImportLoading(!0);try{if(te.api){let Ce=new WeakMap,Je=await le.getItemData((x==null?void 0:x.value)===""?E.value:x==null?void 0:x.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ce),Ea="";if(Je=Je==null?void 0:Je.map(ia=>{var Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze;if((ia==null?void 0:ia.comp)==="Form")ia.compData=(Ve=ia.compData)==null?void 0:Ve.map(Ae=>{var ne;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(ne=Ae.contents)==null?void 0:ne.map(pe=>{var ua;if((pe==null?void 0:pe.value)===""&&(pe==null?void 0:pe.type)==="Select"){let Qe=le.judgeContents((ua=M.cloneDeep(pe))==null?void 0:ua.optionUrl,Ce);pe.value=pe.value||Qe}return pe})),Ae});else if((ia==null?void 0:ia.comp)==="Table"&&(ga=ia.compData)!=null&&ga.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=(De=(Ta=ia.compData)==null?void 0:Ta.find(Qe=>(Qe==null?void 0:Qe.key)==="pageColumn"))==null?void 0:De.contents,ne=((Na=(Fa=ia.compData)==null?void 0:Fa.find(Qe=>(Qe==null?void 0:Qe.key)==="pageGroup"))==null?void 0:Na.contents)??"",pe=(ta=(ja=(da=Ae==null?void 0:Ae.split("["))==null?void 0:da[1])==null?void 0:ja.split("]"))==null?void 0:ta[0];Ea=((je=Ae==null?void 0:Ae.split("["))==null?void 0:je[0])+((Ze=(ya=D.value)==null?void 0:ya.find(Qe=>(Qe==null?void 0:Qe.key)===pe))==null?void 0:Ze.value)}return ia}),!(Ea===""||Ea==="")){const ia=await le.getItemData(Ea,sessionStorage.getItem("systemKey"),"",!1,"","",Ce);Je=Je==null?void 0:Je.map(Ve=>{var ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne;if((Ve==null?void 0:Ve.comp)==="Table"&&(ga=Ve.compData)!=null&&ga.find(pe=>(pe==null?void 0:pe.key)==="pageColumn")){let pe=(De=(Ta=Ve.compData)==null?void 0:Ta.find(Le=>(Le==null?void 0:Le.key)==="pageColumn"))==null?void 0:De.contents,ua=((Na=(Fa=Ve.compData)==null?void 0:Fa.find(Le=>(Le==null?void 0:Le.key)==="pageGroup"))==null?void 0:Na.contents)??"",Qe=(ta=(ja=(da=pe==null?void 0:pe.split("["))==null?void 0:da[1])==null?void 0:ja.split("]"))==null?void 0:ta[0],Da=((je=pe==null?void 0:pe.split("["))==null?void 0:je[0])+((Ze=(ya=D.value)==null?void 0:ya.find(Le=>(Le==null?void 0:Le.key)===Qe))==null?void 0:Ze.value),Te=(Ae=ia==null?void 0:ia.find(Le=>(Le==null?void 0:Le.name)===(ua===""?i==null?void 0:i.compName:ua)))==null?void 0:Ae.compData;Ve.compData=(ne=Ve.compData)==null?void 0:ne.map(Le=>{var Fe;return(Le==null?void 0:Le.key)==="tableContents"&&(Le.contents=(Fe=Te==null?void 0:Te.find(Ne=>(Ne==null?void 0:Ne.key)==="tableContents"))==null?void 0:Fe.contents),Le})}return Ve})}let Ge={};if(((se=(N=te==null?void 0:te.extraValues)==null?void 0:N.input)==null?void 0:se.length)>0){const ia=(ue=(W=te==null?void 0:te.extraValues)==null?void 0:W.input)==null?void 0:ue.map(async Ve=>{var ga;ae!=null&&ae.find(Ta=>Ta===Ve)?Ge=await X(Ve,Je):Ge[Object.keys(Ve)[0]]=await X((ga=Object.values(Ve))==null?void 0:ga[0],Je,Ce)});await Promise.all(ia)}else Ge=await X("/",Je);let $=!1;(we=(_e=te==null?void 0:te.extraValues)==null?void 0:_e.output)==null||we.forEach(ia=>{var Ve,ga;(ga=(Ve=Object.values(ia))==null?void 0:Ve[0])!=null&&ga.includes(".doc")&&($=!0)});let V;if($){const ia=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});V=await Ja.axios.post(te.api,Ge,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ia.close()})}else V=await Ja.axios.post(te.api,Ge,{headers:{"Content-Type":"application/json"}});let ee=(We=(j=(la=(Ke=M.cloneDeep(te))==null?void 0:Ke.extraValues)==null?void 0:la.output)==null?void 0:j.map(ia=>{var Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua;if(!((ga=(Ve=Object.values(ia))==null?void 0:Ve[0])!=null&&ga.includes(".doc"))){let Qe=(je=(ta=(ja=(De=M.cloneDeep((Ta=Object.values(ia))==null?void 0:Ta[0]))==null?void 0:De.split("["))==null?void 0:ja[((da=(Na=M.cloneDeep((Fa=Object.values(ia))==null?void 0:Fa[0]))==null?void 0:Na.split("["))==null?void 0:da.length)-1])==null?void 0:ta.split("]"))==null?void 0:je[0],Da=Qe==null?void 0:Qe.split(":"),Te=(Ae=M.cloneDeep((ya=Object.values(ia))==null?void 0:ya[0]))==null?void 0:Ae.substring(0,M.cloneDeep((Ze=Object.values(ia))==null?void 0:Ze[0]).lastIndexOf("["));if(Te=(pe=M.cloneDeep(Te))==null?void 0:pe.slice(0,((ne=M.cloneDeep(Te))==null?void 0:ne.length)-1),Te!=null&&Te.includes("[")){let Le="";if((ua=le.contentTransArrayToAll(Te,"/"))==null||ua.forEach(Fe=>{var Ne,me,al,Qa,Tl,Rl,Al;if(!(Fe!=null&&Fe.includes("[")))Le=Le===""?Le+Fe.replaceAll("/",""):Le+"/"+Fe.replaceAll("/","");else{let Pl=M.cloneDeep(Fe).slice(1,((Ne=M.cloneDeep(Fe))==null?void 0:Ne.length)-1),ll=(Rl=(Tl=(Qa=(al=(me=M.cloneDeep(Pl))==null?void 0:me.split("["))==null?void 0:al[1])==null?void 0:Qa.split("]"))==null?void 0:Tl[0])==null?void 0:Rl.split(":"),jl="",Wa=(Al=Je==null?void 0:Je.find(Hl=>(Hl==null?void 0:Hl.name)===(ll==null?void 0:ll[0])))==null?void 0:Al.compData;Wa==null||Wa.forEach(Hl=>{var Jl;(Hl==null?void 0:Hl.key)==="formContent"&&((Jl=Hl==null?void 0:Hl.contents)==null||Jl.forEach(ar=>{(ar==null?void 0:ar.key)===(ll==null?void 0:ll[1])&&(jl=ar==null?void 0:ar.value)}))}),Le=Le===""?Le+jl.replaceAll("/",""):Le+"/"+jl.replaceAll("/","")}}),Te=Le,Te[(Te==null?void 0:Te.length)-1]!=="/")return Te}}}))==null?void 0:We.filter(ia=>ia);ee=[...new Set(M.cloneDeep(ee))];let ce=ee==null?void 0:ee.map(async ia=>{let Ve=await le.getItemData(ia,sessionStorage.getItem("systemKey"),"",!1,"","",Ce);if((Ve==null?void 0:Ve.length)===0)return await le.getParentContents(ia)});await Promise.all(ce);let he=[],ca=(Me=(Ie=(Oe=M.cloneDeep(te))==null?void 0:Oe.extraValues)==null?void 0:Ie.output)==null?void 0:Me.map(async ia=>{var ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl,aa,Pa,Ga,$e,ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl,Pe,kl,cr,Cr,ea,La,Bl,Ol,ma,Sr,Ur,Gr,Re,ur,wr,Yr,tr,lr,un;if((ta=(ja=Object.values(ia))==null?void 0:ja[0])!=null&&ta.includes(".doc")){var Ve=new Blob([V.data],{type:"application/octet-stream;charset=UTF-8"}),ga=V.headers["content-disposition"],Ta=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),De=Ta.exec(ga),Fa=De==null?void 0:De[1],Na=document.createElement("a"),da=window.URL.createObjectURL(Ve);p.value=[{name:Fa,blobUrl:da}],o.value=!0}else{let Xl=(Qe=(ua=(pe=(ya=M.cloneDeep((je=Object.values(ia))==null?void 0:je[0]))==null?void 0:ya.split("["))==null?void 0:pe[((ne=(Ae=M.cloneDeep((Ze=Object.values(ia))==null?void 0:Ze[0]))==null?void 0:Ae.split("["))==null?void 0:ne.length)-1])==null?void 0:ua.split("]"))==null?void 0:Qe[0],Ul=Xl==null?void 0:Xl.split(":"),Tr=(Le=M.cloneDeep((Da=Object.values(ia))==null?void 0:Da[0]))==null?void 0:Le.substring(0,M.cloneDeep((Te=Object.values(ia))==null?void 0:Te[0]).lastIndexOf("["));if(Tr!=null&&Tr.includes("[")?Tr=(Ne=M.cloneDeep(Tr))==null?void 0:Ne.slice(0,((Fe=M.cloneDeep(Tr))==null?void 0:Fe.length)-1):Tr===""&&(Tr=E.value),Tr=Tr.replaceAll("<","[").replaceAll(">","]"),Tr!=null&&Tr.includes("[")){let El="";(me=le.contentTransArrayToAll(Tr,"/"))==null||me.forEach((Zl,rr)=>{var Dr,wl,Lr,Kl,on,Rr,qr,En,$n,Cn,mn;if(!(Zl!=null&&Zl.includes("[")))El=El===""?El+Zl.replaceAll("/",""):El+"/"+Zl.replaceAll("/","");else{let Mn="",rn="";(Dr=M.cloneDeep(Zl))!=null&&Dr.includes("]")?(Mn=M.cloneDeep(Zl).slice(1,((wl=M.cloneDeep(Zl))==null?void 0:wl.length)-1),rn=(qr=(Rr=(on=(Kl=(Lr=M.cloneDeep(Mn))==null?void 0:Lr.split("["))==null?void 0:Kl[1])==null?void 0:on.split("]"))==null?void 0:Rr[0])==null?void 0:qr.split(":")):(Mn=M.cloneDeep(Zl).slice(1,(En=M.cloneDeep(Zl))==null?void 0:En.length),rn=($n=M.cloneDeep(Mn))==null?void 0:$n.split("/"));let Dn="",Vr=(Cn=Je==null?void 0:Je.find(Xr=>(Xr==null?void 0:Xr.name)===(rn==null?void 0:rn[0])))==null?void 0:Cn.compData;Vr==null||Vr.forEach(Xr=>{var _n;(Xr==null?void 0:Xr.key)==="formContent"&&((_n=Xr==null?void 0:Xr.contents)==null||_n.forEach(In=>{(In==null?void 0:In.key)===(rn==null?void 0:rn[1])&&(Dn=In==null?void 0:In.value)}))}),((mn=le.contentTransArrayToAll(Tr,"/"))==null?void 0:mn.length)-1!==rr?El=El===""?El+Dn.replaceAll("/",""):El+"/"+Dn.replaceAll("/",""):El=El+n.value+Dn.replaceAll("/","")}}),(al=E.value)!=null&&al.includes(El)?Tr=E.value:Tr=El}let Nr=M.cloneDeep((Qa=Object.keys(ia))==null?void 0:Qa[0]);if(((Tl=V==null?void 0:V.data)==null?void 0:Tl.statusCode)===200||((Rl=V==null?void 0:V.data)==null?void 0:Rl.code)===200){if(((Pl=(Al=V==null?void 0:V.data)==null?void 0:Al.data)!=null&&Pl[Nr]||(jl=(ll=V==null?void 0:V.data)==null?void 0:ll.result)!=null&&jl[Nr])&&(Ul==null?void 0:Ul.length)===1)return await q(((Hl=(Wa=V==null?void 0:V.data)==null?void 0:Wa.data)==null?void 0:Hl[Nr])||((ar=(Jl=V==null?void 0:V.data)==null?void 0:Jl.result)==null?void 0:ar[Nr]),M.cloneDeep(Tr),Ul,Ea);if((br=(bl=V==null?void 0:V.data)==null?void 0:bl.data)!=null&&br[Nr]||(ol=(ka=V==null?void 0:V.data)==null?void 0:ka.result)!=null&&ol[Nr]){let El=await ye(((Nl=(hl=V==null?void 0:V.data)==null?void 0:hl.data)==null?void 0:Nl[Nr])||((Pa=(aa=V==null?void 0:V.data)==null?void 0:aa.result)==null?void 0:Pa[Nr]),M.cloneDeep(Tr),Ul);return El&&(he=[...he,...El]),El}else{if(!((Ga=V==null?void 0:V.data)!=null&&Ga.data)){let El=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ce);El=El==null?void 0:El.map(rr=>{var Dr;return(rr==null?void 0:rr.name)===(Ul==null?void 0:Ul[0])&&(rr.compData=(Dr=rr.compData)==null?void 0:Dr.map(wl=>{var Lr;return(wl==null?void 0:wl.key)==="formContent"&&(wl.contents=(Lr=wl.contents)==null?void 0:Lr.map(Kl=>{var on,Rr;return(Kl==null?void 0:Kl.key)===(Ul==null?void 0:Ul[1])&&(Kl.value=(Rr=(on=V==null?void 0:V.data)==null?void 0:on.result)==null?void 0:Rr[Nr==null?void 0:Nr.replaceAll(":","")]),Kl})),wl})),rr});let Zl=[];($e=El==null?void 0:El.filter(rr=>(rr==null?void 0:rr.comp)==="Form"))==null||$e.forEach(async rr=>{let Dr={};for(let wl in rr)wl!=="id"&&(Dr[wl]=rr[wl]);Zl.push({id:rr==null?void 0:rr.id,value:{pageData:Dr}})}),(Zl==null?void 0:Zl.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:Zl});return}if((Ul==null?void 0:Ul.length)===1){const El=(Ee=(wa=(ha=V==null?void 0:V.data)==null?void 0:ha.data)==null?void 0:wa.path)==null?void 0:Ee.path;let Zl="";(pa=(zl=(yl=(Xa=(ba=El==null?void 0:El.split("("))==null?void 0:ba[1])==null?void 0:Xa.split(")"))==null?void 0:yl[0])==null?void 0:zl.split(":"))==null||pa.forEach(wl=>{var Lr,Kl;Zl=Zl===""?Zl+((Lr=wl==null?void 0:wl.replaceAll("'",""))==null?void 0:Lr.trim()):Zl+"/"+((Kl=wl==null?void 0:wl.replaceAll("'",""))==null?void 0:Kl.trim())});let rr=[(pl=(Aa=(Ca=(va=(Ha=El==null?void 0:El.split("<"))==null?void 0:Ha[1])==null?void 0:va.split(">"))==null?void 0:Ca[0])==null?void 0:Aa.replaceAll("'",""))==null?void 0:pl.trim()],Dr;return(cr=(kl=(Pe=V==null?void 0:V.data)==null?void 0:Pe.data)==null?void 0:kl.data)!=null&&cr[Ul==null?void 0:Ul[0]]?Dr=await q((La=(ea=(Cr=V==null?void 0:V.data)==null?void 0:Cr.data)==null?void 0:ea.data)==null?void 0:La[Ul==null?void 0:Ul[0]],Zl,Ul,Ea):Dr=await fe((Ol=(Bl=V==null?void 0:V.data)==null?void 0:Bl.data)==null?void 0:Ol.data,Zl,rr,Ce),Dr}else{const El=(Ur=(Sr=(ma=V==null?void 0:V.data)==null?void 0:ma.data)==null?void 0:Sr.path)==null?void 0:Ur.path;let Zl="";return(Yr=(wr=(ur=(Re=(Gr=El==null?void 0:El.split("("))==null?void 0:Gr[1])==null?void 0:Re.split(")"))==null?void 0:ur[0])==null?void 0:wr.split(":"))==null||Yr.forEach(Dr=>{var wl,Lr;Zl=Zl===""?Zl+((wl=Dr==null?void 0:Dr.replaceAll("'",""))==null?void 0:wl.trim()):Zl+"/"+((Lr=Dr==null?void 0:Dr.replaceAll("'",""))==null?void 0:Lr.trim())}),await ye((un=(lr=(tr=V==null?void 0:V.data)==null?void 0:tr.data)==null?void 0:lr.data)==null?void 0:un[Ul==null?void 0:Ul[0]],Zl,Ul)}}}}});if(await Promise.all(ca),(he==null?void 0:he.length)>0){let ia=[];he==null||he.forEach(Ta=>{ia!=null&&ia.find(De=>{var Fa,Na,da,ja;return((Na=(Fa=De==null?void 0:De.value)==null?void 0:Fa.pageData)==null?void 0:Na.name)===((ja=(da=Ta==null?void 0:Ta.value)==null?void 0:da.pageData)==null?void 0:ja.name)})||ia.push(Ta)});let Ve=[];ia==null||ia.forEach(Ta=>{var Na,da,ja,ta;let De=M.cloneDeep(Ta);De.value.pageData.compData=(Na=De.value.pageData.compData)==null?void 0:Na.map(je=>{var ya;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(ya=je.contents)==null?void 0:ya.map(Ze=>{var ne,pe,ua,Qe;let Ae=(ne=M.cloneDeep(he))==null?void 0:ne.find(Da=>(Da==null?void 0:Da.keyType)===(Ze==null?void 0:Ze.key));if(Ae){let Da=(Qe=(ua=(pe=Ae.value.pageData.compData)==null?void 0:pe.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:ua.contents)==null?void 0:Qe.find(Te=>(Te==null?void 0:Te.key)===(Ze==null?void 0:Ze.key));Ze.value=Da==null?void 0:Da.value}return Ze})),je}),Ve.push({id:De==null?void 0:De.id,value:De==null?void 0:De.value});let Fa=[];(ta=(ja=(da=De==null?void 0:De.value)==null?void 0:da.pageData)==null?void 0:ja.compData)==null||ta.forEach(je=>{var ya;(je==null?void 0:je.key)==="formContent"&&((ya=je==null?void 0:je.contents)==null||ya.forEach(Ze=>{var Ae,ne,pe,ua,Qe,Da;if((ne=(Ae=Ze==null?void 0:Ze.optionUrl)==null?void 0:Ae.menuSelect)!=null&&ne.find(Te=>Te==null?void 0:Te.includes("[")))if(Fa!=null&&Fa.find(Te=>{var Le,Fe,Ne;return((Le=Te==null?void 0:Te.key)==null?void 0:Le.join(","))===((Ne=(Fe=Ze==null?void 0:Ze.optionUrl)==null?void 0:Fe.menuSelect)==null?void 0:Ne.join(","))})){let Te=(pe=Fa==null?void 0:Fa.find(Le=>{var Fe,Ne,me;return((Fe=Le==null?void 0:Le.key)==null?void 0:Fe.join(","))===((me=(Ne=Ze==null?void 0:Ze.optionUrl)==null?void 0:Ne.menuSelect)==null?void 0:me.join(","))}))==null?void 0:pe.value;Te.push({key:Ze==null?void 0:Ze.prop,groups:(ua=Ze==null?void 0:Ze.optionUrl)==null?void 0:ua.groupSelect,value:Ze==null?void 0:Ze.value}),Fa=Fa==null?void 0:Fa.map(Le=>{var Fe,Ne,me;return((Fe=Le==null?void 0:Le.key)==null?void 0:Fe.join(","))===((me=(Ne=Ze==null?void 0:Ze.optionUrl)==null?void 0:Ne.menuSelect)==null?void 0:me.join(","))&&(Le.value=Te),Le})}else Fa.push({key:(Qe=Ze==null?void 0:Ze.optionUrl)==null?void 0:Qe.menuSelect,value:[{key:Ze==null?void 0:Ze.prop,groups:(Da=Ze==null?void 0:Ze.optionUrl)==null?void 0:Da.groupSelect,value:Ze==null?void 0:Ze.value}]})}))}),(Fa==null?void 0:Fa.length)>0&&(Fa=Fa==null?void 0:Fa.map(je=>{var Ze;let ya="";return(Ze=je==null?void 0:je.key)==null||Ze.forEach(Ae=>{var ne;if(!(Ae!=null&&Ae.includes("[")))ya=ya===""?ya+Ae:ya+"/"+Ae;else{let pe="",ua=(ne=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:ne.split(":");Je==null||Je.forEach(Qe=>{var Da;(Qe==null?void 0:Qe.name)===(ua==null?void 0:ua[0])&&((Da=Qe==null?void 0:Qe.compData)==null||Da.forEach(Te=>{var Le;(Te==null?void 0:Te.key)==="formContent"&&((Le=Te==null?void 0:Te.contents)==null||Le.forEach(Fe=>{(Fe==null?void 0:Fe.prop)===(ua==null?void 0:ua[1])&&(pe=Fe==null?void 0:Fe.value)}))}))}),ya=ya+n.value+pe}}),je.key=ya,je})),Fa==null||Fa.forEach(je=>{var ne,pe,ua;let ya=(ne=Ce[je.key])==null?void 0:ne.find(Qe=>{var Da,Te,Le,Fe,Ne,me,al;return((Te=(Da=Qe==null?void 0:Qe.value)==null?void 0:Da.pageData)==null?void 0:Te.name)===((Ne=(Fe=(Le=je==null?void 0:je.value)==null?void 0:Le[0])==null?void 0:Fe.groups)==null?void 0:Ne[0])&&((al=(me=Qe==null?void 0:Qe.value)==null?void 0:me.pageData)==null?void 0:al.name)!==void 0}),Ze=ya==null?void 0:ya.id,Ae=(pe=ya==null?void 0:ya.value)==null?void 0:pe.pageData;Ae.compData=(ua=Ae.compData)==null?void 0:ua.map(Qe=>{var Da;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(Da=Qe.contents)==null?void 0:Da.map(Te=>{var Fe;let Le=(Fe=je.value)==null?void 0:Fe.find(Ne=>(Ne==null?void 0:Ne.key)===(Te==null?void 0:Te.prop));return Le&&(Te.value=Le.value),Te})),Qe}),Ve.push({id:Ze,value:{pageData:Ae}})})});let ga=(de=M.cloneDeep(he))==null?void 0:de[0];(Ve==null?void 0:Ve.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:Ve})}m.setFreshContent(!0)}y.setImportLoading(!1)}catch{Ja.ElMessage.error("方法执行错误,请查看方法!"),y.setImportLoading(!1)}_.value=!0},ae=["createInsofDataApi"],ve=Fl.debounce(async te=>{Z(te)},100),ze=async te=>{var we,Ke,la;const N=M.cloneDeep(te);let se,W=new WeakMap;te!=null&&te[0].path&&(se=await(N==null?void 0:N.map(async(j,We)=>{var Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja;const Ie=(Ge=W[j==null?void 0:j.path])==null?void 0:Ge.filter(ta=>{var je;return((je=ta==null?void 0:ta.key)==null?void 0:je.type)==="data"});let Me="";const de=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);Ie==null||Ie.forEach(ta=>{var je,ya,Ze,Ae,ne;((ya=(je=ta==null?void 0:ta.value)==null?void 0:je.tableData)==null?void 0:ya.算法名称)===((Ze=N==null?void 0:N[We])==null?void 0:Ze.method)&&(Me=(ne=(Ae=ta==null?void 0:ta.value)==null?void 0:Ae.tableData)==null?void 0:ne.算法体)});const Ce=await le.getItemData(j==null?void 0:j.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);let Je="",Ea=(ce=(ee=(V=($=Ce==null?void 0:Ce[0])==null?void 0:$.compData)==null?void 0:V.find(ta=>(ta==null?void 0:ta.key)==="header"))==null?void 0:ee.contents)==null?void 0:ce.findIndex(ta=>(ta==null?void 0:ta.prop)==="算法体");return(ca=(he=Ce==null?void 0:Ce[0])==null?void 0:he.compData)==null||ca.forEach(ta=>{var je;(ta==null?void 0:ta.key)==="tableContents"&&((je=ta==null?void 0:ta.contents)==null||je.forEach(ya=>{ya!=null&&ya.find(Ze=>Ze===(j==null?void 0:j.method))&&(Je=ya[Ea])}))}),{buttonName:((ia=N==null?void 0:N[We])==null?void 0:ia.method)||((Ta=(ga=(Ve=Ie==null?void 0:Ie[0])==null?void 0:Ve.value)==null?void 0:ga.tableData)==null?void 0:Ta.算法名称),api:(Me===""?(Na=(Fa=(De=Ie==null?void 0:Ie[0])==null?void 0:De.value)==null?void 0:Fa.tableData)==null?void 0:Na.算法体:Me)||Je,content:de==null?void 0:de.filter(ta=>ta.comp!=="methodButton"),extraContent:(da=M.cloneDeep(j.value))==null?void 0:da.slice(1),methodName:(j==null?void 0:j.path)??"",extraValues:(ja=N==null?void 0:N[We])==null?void 0:ja.data}})));const ue=N==null?void 0:N.map(async j=>{var Ce,Je,Ea,Ge,$,V;const We=(Ce=resAll.data.result)==null?void 0:Ce.filter(ee=>{var ce,he,ca;return((ce=ee==null?void 0:ee.key)==null?void 0:ce.parentTable)===""&&((he=ee==null?void 0:ee.key)==null?void 0:he.type)==="method"&&((ca=ee==null?void 0:ee.key)==null?void 0:ca.methodName)===ee.method}),Oe=We==null?void 0:We[0],Ie=(Je=resAll.data.result)==null?void 0:Je.filter(ee=>{var ce,he;return((ce=ee==null?void 0:ee.key)==null?void 0:ce.type)==="methodData"&&((he=ee==null?void 0:ee.key)==null?void 0:he.tableId)===(Oe==null?void 0:Oe.id)}),Me=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W),de=Ie==null?void 0:Ie[0];return{buttonName:(Ea=Oe==null?void 0:Oe.key)==null?void 0:Ea.methodKey,api:($=(Ge=de==null?void 0:de.value)==null?void 0:Ge.tableData)==null?void 0:$[0],content:Me==null?void 0:Me.filter(ee=>ee.comp!=="methodButton"),extraContent:(V=M.cloneDeep(j.value))==null?void 0:V.slice(1),methodName:(j==null?void 0:j.method)??""}}),_e=(we=te==null?void 0:te[0])!=null&&we.path&&((Ke=te==null?void 0:te[0])==null?void 0:Ke.path)!==""?await Promise.all(se):await Promise.all(ue);l.value=_e==null?void 0:_e.filter(j=>j==null?void 0:j.extraContent),(la=l.value)==null||la.forEach(j=>{var We;j.api===""&&((We=j.content)==null||We.forEach(Oe=>{var Ie;Oe.comp=="Table"&&m.setExtraContents(le.methodTableToContent(Oe.compData,(Ie=j.extraContent)==null?void 0:Ie[0]))}))})};return e.watch(()=>i.itemData,async()=>{w.value=="view"&&!_.value&&await ze(M.cloneDeep(i.itemData)),_.value=!1},{immediate:!0,deep:!0}),(te,N)=>{var se,W,ue;return e.unref(w)!=="edit"?(e.openBlock(),e.createElementBlock("div",H4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=l.value)==null?void 0:se.filter(_e=>(_e==null?void 0:_e.buttonName)!=="保存"),_e=>{var we;return e.openBlock(),e.createElementBlock("div",null,[_e.api!==""?(e.openBlock(),e.createBlock(e.unref(vs._sfc_main),{key:0,disabled:e.unref(P)===e.unref(E)&&!((we=_e==null?void 0:_e.buttonName)!=null&&we.includes("预览")),class:"calculator-content",modelValue:_e.buttonName,onClickTrigger:Ke=>e.unref(ve)(_e),loading:g.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Y)!==""&&((ue=e.unref(E))==null?void 0:ue[((W=e.unref(E))==null?void 0:W.length)-1])!==e.unref(n)?(e.openBlock(),e.createBlock(e.unref(vs._sfc_main),{key:0,class:"calculator-content",onClickTrigger:I,modelValue:"保存"})):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:0,fileDataList:p.value,onDestroy:R},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},q4=sr._export_sfc(U4,[["__scopeId","data-v-063aa9af"]]),W4={};function K4(a,l){return" 567 "}const G4=sr._export_sfc(W4,[["render",K4]]),Y4={class:"module content"},J4={class:"module data"},X4={class:"module layout"},Z4={class:"form-content"},Q4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.reactive({visible:!1,width:"40%",title:"签名配置"}),o=e.ref("create"),p=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}]),u=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({}),g=e.ref([]),y=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:g.value},{key:"signConfig",contents:m.value}]}),d=D=>{var P;m.value=M.cloneDeep(D),n("change",(P=y())==null?void 0:P.compData)},A=D=>{var P,O;if((D==null?void 0:D.buttonName)==="确认"){const E=M.cloneDeep(D==null?void 0:D.content);switch(o.value){case"create":g.value.push({...E,index:((P=g.value)==null?void 0:P.length)+1});break}n("change",(O=y())==null?void 0:O.compData),i.visible=!1}else i.visible=!1},w=(D,P)=>{var O,E;switch(D){case"create":(O=u.value)==null||O.forEach(S=>{S.value=""}),o.value="create",i.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),o.value="update",i.visible=!0;break;case"delete":g.value.splice(P,1),o.value="delete";break}},Y=()=>{i.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,D=>{var P,O;D&&(m.value=((P=D==null?void 0:D.find(E=>E.key==="signConfig"))==null?void 0:P.contents)??{},g.value=((O=D==null?void 0:D.find(E=>E.key==="signTypeList"))==null?void 0:O.contents)??[])},{immediate:!0}),(D,P)=>{const O=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Y4,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>w("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",J4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>w("update",{...S,index:x+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>w("delete",x)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",X4,[e.createVNode(dl.ssForm,{rowContents:c.value,onChange:d},null,8,["rowContents"])])]),e.createVNode($r.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:Y,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",Z4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:p.value,onOnButtonClick:A},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),e2=sr._export_sfc(Q4,[["__scopeId","data-v-487e0536"]]),a2=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(0),o=e.computed(()=>{var y,d;return(y=r==null?void 0:r.stepConfig)!=null&&y.allowTrigger?i.value:(d=r==null?void 0:r.stepConfig)==null?void 0:d.active}),p=(y,d)=>{i.value=d-1,n("clickStep",y,d)};e.onMounted(()=>{var y;n("clickStep",(y=r==null?void 0:r.stepList)==null?void 0:y[0],0)});const c=y=>dl.getComponent(y),u=()=>{var d;const y=(d=r==null?void 0:r.stepList)==null?void 0:d.find((A,w)=>w+1===o.value);return console.log("findStep",y),y?y==null?void 0:y.children:[]},m=y=>{n("clickTrigger",y)},g=y=>{n("changeTrigger",y)};return(y,d)=>{var Y,D,P,O,E;const A=e.resolveComponent("el-step"),w=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(w,{direction:(Y=a.stepConfig)==null?void 0:Y.direction,active:o.value,"finish-status":"success",simple:(D=a.stepConfig)==null?void 0:D.simple,"align-center":((P=a.stepConfig)==null?void 0:P.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(S,x)=>(e.openBlock(),e.createBlock(A,{key:x,class:"step-item",onClick:b=>p(S,x+1)},{title:e.withCtx(()=>[e.renderSlot(y.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(y.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(O=a.stepConfig)!=null&&O.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u(),(S,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":b=>S.value=b,onClickTrigger:m,onChangeTrigger:g,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(y.$slots,(b,_)=>({name:_,fn:e.withCtx(I=>[e.renderSlot(y.$slots,_,e.mergeProps({ref_for:!0},I||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),l2=sr._export_sfc(a2,[["__scopeId","data-v-a30ff621"]]),r2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const r=a,n=l,i=e.ref({}),o=e.ref([]),p=(c,u)=>{n("clickStep",c,u)};return e.watch(()=>r==null?void 0:r.itemData,c=>{var y,d,A,w;i.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let u=((y=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.key)==="stepName"))==null?void 0:y.contents)??[],m=[];(A=(d=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:d.contents)==null||A.forEach(Y=>{m.push({label:Y==null?void 0:Y.label,prop:Y==null?void 0:Y.prop,name:Y==null?void 0:Y.prop,type:"text",disabled:!0})});let g=((w=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:w.contents)??[];u=u==null?void 0:u.map((Y,D)=>{let P=m==null?void 0:m.map(O=>{var E;return{...O,value:(E=g==null?void 0:g[D])==null?void 0:E[O==null?void 0:O.prop]}});return{title:Y,description:P}}),o.value=u},{immediate:!0,deep:!0}),(c,u)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(l2,{stepConfig:i.value,stepList:o.value,onClickStep:p},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:g})=>[e.createTextVNode(e.toDisplayString(g),1)]),description:e.withCtx(({descriptions:g})=>[e.createVNode(dl.ssForm,{ref:"formRef",rowContents:g,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),n2=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,r)=>{const n=e.resolveComponent("el-timeline-item"),i=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(i,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(o,p)=>(e.openBlock(),e.createBlock(n,{key:p,timestamp:o.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:o==null?void 0:o.content,timestamp:o==null?void 0:o.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),i2=sr._export_sfc(n2,[["__scopeId","data-v-4172a886"]]),o2={class:"line-content"},t2={class:"line-time"},s2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref({}),n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,i=>{var o,p;n.value=(o=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:o.contents,r.value=(p=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:p.contents},{immediate:!0}),(i,o)=>(e.openBlock(),e.createBlock(i2,{activities:n.value,timeLineConfig:r.value},{content:e.withCtx(({content:p,timestamp:c})=>[e.createElementVNode("span",o2,e.toDisplayString(p),1),e.createElementVNode("span",t2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),c2=sr._export_sfc(s2,[["__scopeId","data-v-b4d9deed"]]),u2={class:"tabs-content"},d2=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 r=a,n=l,i=e.ref();e.watch(()=>r==null?void 0:r.itemData,()=>{i.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const o=d=>{n("change",d)},p=(d,A)=>{n("contentChange",d,A)},c=d=>{n("pageChange",d)},u=d=>{n("rowClick",d)},m=(d,A)=>{n("routeUrl",d,A)},g=d=>{n("clickTrigger",d)},y=(d,A)=>{n("clickMainKey",d,A)};return(d,A)=>{var w,Y;return e.openBlock(),e.createElementBlock("div",u2,[(w=i.value)!=null&&w.length?(e.openBlock(),e.createBlock(dl.ssTab,{tabsContents:i.value,key:(Y=i.value)==null?void 0:Y.length},{pane:e.withCtx(({tab:D,index:P})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(D==null?void 0:D.comp)),{related:D==null?void 0:D.relatedTables,compNames:D==null?void 0:D.nameContents,compName:D==null?void 0:D.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:a.isDevMode,itemData:D==null?void 0:D.compData,childItemData:D==null?void 0:D.itemChildData,onChange:o,calculator:D==null?void 0:D.calculatorFilters,index:(D==null?void 0:D.id)??P,config:{showIndex:D==null?void 0:D.showIndex,allowMove:D==null?void 0:D.allowMove,viewport:D==null?void 0:D.viewport,status:D==null?void 0:D.status},onContentChange:p,onPageChange:c,onRowClick:u,onRouteUrl:m,parentTableId:D==null?void 0:D.tableId,allMapContents:a.allMapContents,children:D==null?void 0:D.children,level:1,onClickTrigger:g,onClickMainKey:y},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","calculator","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),p2=sr._export_sfc(d2,[["__scopeId","data-v-71516232"]]),f2={class:"type-select"},h2=["onClick"],v2={class:"list-icon"},m2={__name:"modelSelect",setup(a){const l=ii(M.pinia),{itemData:r}=M.storeToRefs(l),n=i=>{const o=M.cloneDeep(r.value);o.push({comp:i.comp,name:i.name,compData:[]}),l.setItemData(o)};return(i,o)=>{const p=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",f2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(wu),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:m=>n(c)},[e.createElementVNode("div",v2,[e.createVNode(p,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,h2)]))),128))])}}},y2=sr._export_sfc(m2,[["__scopeId","data-v-91799bf8"]]),g2={class:"fill-content"},b2={class:"operate-content"},k2={class:"collapse-title-content"},x2={class:"collapse-title-item"},w2={key:1},_2=["onClick"],S2={class:"icon-content"},E2={key:0,class:"edit-content"},C2=["onClick"],D2={class:"comp-child"},T2={__name:"modelFill",setup(a){const l=ii(M.pinia),{itemData:r,originalData:n}=M.storeToRefs(l),i=e.ref([]);e.ref([]);const o=e.ref([]),p=e.ref([]),c=A=>{var Y;let w=(Y=M.cloneDeep(p.value))==null?void 0:Y.map((D,P)=>(A===P&&(D.content=!0),D));p.value=w},u=A=>{var Y;let w=(Y=M.cloneDeep(p.value))==null?void 0:Y.map((D,P)=>(A===P&&(D.content=!1),D));p.value=w,i.value=M.cloneDeep(r.value)},m=(A,w)=>{var O;let Y=(O=M.cloneDeep(p.value))==null?void 0:O.map((E,S)=>(A===S&&(E.content=!1),E));p.value=Y;const D=M.cloneDeep(r.value),P=D==null?void 0:D.filter((E,S)=>(S===A&&(E.name=w),E));l.setOriginalData(P),l.setItemData(P)};e.watch(()=>r.value,()=>{var A,w,Y;!r.value||((A=r.value)==null?void 0:A.length)===0?i.value=[]:i.value=(w=M.cloneDeep(r.value))==null?void 0:w.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),o.value=i.value,p.value=(Y=M.cloneDeep(o.value))==null?void 0:Y.map((D,P)=>({id:P,content:!1}))},{deep:!0,immediate:!0});const g=A=>Ri(A),y=(A,w,Y)=>{var P,O;if(!A)return;let D=M.cloneDeep(r.value);D=(P=D==null?void 0:D.map((E,S)=>(S===Y&&(E.compData=A),E)))==null?void 0:P.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),p.value=(O=M.cloneDeep(D))==null?void 0:O.map((E,S)=>({id:S,content:!1})),l.setOriginalData(D),l.setItemData(D)},d=A=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const w=M.cloneDeep(r.value),Y=w==null?void 0:w.filter((D,P)=>P!==A);l.setOriginalData(Y),l.setItemData(Y),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(A,w)=>{const Y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",g2,[w[1]||(w[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",b2,[e.createVNode(uc.default,{class:"collapse-content",collapseContents:i.value},{title:e.withCtx(({item:D,index:P})=>{var O,E,S,x,b,_,I,R,re,X;return[e.createElementVNode("div",k2,[e.createElementVNode("div",x2,[(E=(O=p.value)==null?void 0:O.find(ye=>ye.id===P))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:D.name&&D.name!==""?"8px":"0px"})},e.toDisplayString(D.name),5)),(x=(S=p.value)==null?void 0:S.find(ye=>ye.id===P))!=null&&x.content?(e.openBlock(),e.createElementBlock("div",w2,[e.createVNode(dl.ssInput,{modelValue:D.name,"onUpdate:modelValue":ye=>D.name=ye,onClick:w[0]||(w[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(_=(b=p.value)==null?void 0:b.find(ye=>ye.id===P))!=null&&_.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ye=>c(P),["stop"]),class:"icon-content"},[e.createVNode(Y,{name:"Edit",style:{width:"16px",height:"16px"}})],8,_2))]),e.createElementVNode("div",S2,[(R=(I=p.value)==null?void 0:I.find(ye=>ye.id===P))!=null&&R.content?(e.openBlock(),e.createElementBlock("div",E2,[e.createVNode(Y,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ye=>u(P),["stop"])},null,8,["onClick"]),e.createVNode(Y,{name:"Save",onClick:e.withModifiers(ye=>m(P,D.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(X=(re=p.value)==null?void 0:re.find(ye=>ye.id===P))!=null&&X.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ye=>d(P),["stop"]),class:"icon-content"},[e.createVNode(Y,{name:"Delete",style:{width:"16px",height:"16px"}})],8,C2))])])]}),content:e.withCtx(({item:D,index:P})=>{var O,E;return[e.createElementVNode("div",D2,[e.createTextVNode(e.toDisplayString(g(D.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(D.comp+"Operate")),{itemContents:D==null?void 0:D.compData,originalItemContents:(E=(O=o.value)==null?void 0:O.find((S,x)=>x===P))==null?void 0:E.compData,onChange:S=>y(S,D,P)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},B2=sr._export_sfc(T2,[["__scopeId","data-v-a46a44b9"]]),N2={key:0,class:"show-content"},A2={style:{display:"flex"}},z2={__name:"modelShow",setup(a){const l=ii(M.pinia),{itemData:r}=M.storeToRefs(l),n=e.ref([]);e.watch(()=>r.value,()=>{var o;!r.value||((o=r.value)==null?void 0:o.length)===0?n.value=[]:n.value=M.cloneDeep(r.value)},{deep:!0,immediate:!0});const i=o=>Ri(o);return(o,p)=>{var c;return((c=n.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",N2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",A2,e.toDisplayString(u.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},M2=sr._export_sfc(z2,[["__scopeId","data-v-3f3e863e"]]),I2={class:"tabs-header"},O2={class:"tabs-list"},L2={class:"tab-name"},R2={class:"tab-actions"},$2=["onClick"],V2=["onClick"],F2=["onClick"],P2={class:"model-operate"},j2={class:"model-select",style:{display:"unset"}},H2={class:"existing-components"},U2={class:"component-list"},q2=["onClick"],W2={class:"component-info"},K2={class:"component-type"},G2={class:"component-name"},Y2={class:"model-fill"},J2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]),o=e.ref(!1),p=e.ref(""),c=e.ref({title:""}),u=e.ref(-1),m=e.ref(!1),g=e.ref(-1),y=e.ref(new WeakMap),d=e.ref(null),A=ii(M.pinia),{itemData:w}=M.storeToRefs(A),Y=()=>{p.value="新增标签页",c.value.title="",u.value=-1,o.value=!0},D=te=>{p.value="修改标签页",c.value.title=i.value[te].title,u.value=te,o.value=!0},P=te=>{const N=S(te);y.value.delete(N),i.value.splice(te,1),ze()},O=()=>{if(c.value.title.trim()){if(u.value===-1){const te={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};i.value.push(te)}else i.value[u.value].title=c.value.title,i.value[u.value].value=c.value.title,i.value[u.value].label=c.value.title;o.value=!1,ze()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=te=>{const N=i.value[te];return N.id||(N.id=E()),N.id},x=te=>{var W;g.value=te;const N=S(te);d.value=M.cloneDeep(w.value);let se=y.value.get(N);!se&&((W=i.value[te].children)==null?void 0:W.length)>0&&(se=R(i.value[te].children)),se?A.setItemData(M.cloneDeep(se)):A.setItemData([]),m.value=!0},b=e.computed(()=>{const te=M.useModelComp(M.pinia),N=M.storeToRefs(te).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(se=>{var W;if(se.comp==="Tabs"&&g.value>=0){const ue=S(g.value);if((W=se.compData)==null?void 0:W.some(we=>{var Ke;return we.key==="stepList"&&((Ke=we.contents)==null?void 0:Ke.some(la=>la.id===ue))}))return!1}return!0})}),_=te=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[te]||te,I=te=>{var N;try{const se=M.cloneDeep(te);se.id=Date.now()+Math.random(),se.comp==="Tabs"&&((N=se.compData)==null||N.forEach(ue=>{ue.key==="stepList"&&ue.contents&&ue.contents.forEach(_e=>{_e.id=E()})}));const W=M.cloneDeep(w.value);W.push(se),A.setItemData(W)}catch(se){console.error("添加组件失败:",se)}},R=te=>te.map(N=>{var se;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:re(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:X(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((se=N.content)==null?void 0:se.originalData)||[]}}}),re=te=>{if(!te)return[];const N=[];return te.rowContents&&N.push({key:"formContent",contents:te.rowContents}),te.buttonValue&&N.push({key:"formButton",contents:te.buttonValue}),typeof te.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:te.isEnableWrap}),N},X=te=>[],ye=()=>{if(g.value>=0&&g.value<i.value.length){const te=S(g.value);y.value.set(te,M.cloneDeep(w.value)),i.value[g.value].children=q(w.value),console.log("保存后的数据",q(w.value))}m.value=!1,g.value=-1,d.value=null,ze()},fe=()=>{d.value&&A.setItemData(M.cloneDeep(d.value)),m.value=!1,g.value=-1,d.value=null},U=()=>{m.value&&fe()},q=te=>{if(!Array.isArray(te))throw new Error("sourceData must be an array");return te.map((N,se)=>{if(!N||typeof N!="object")return N;const{comp:W,name:ue,compData:_e}=N;switch(W){case"Form":return{type:"form",content:Z(_e||[]),value:"表单"};case"Table":return{type:"table",content:ae(_e||[]),value:"表格"};default:return{type:"xxx",content:ve(_e||[]),value:""}}})},Z=te=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},se={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return te.forEach((W,ue)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${ue}:`,W);return}const{key:_e,contents:we}=W,Ke=se[_e];if(!Ke){console.warn(`Unknown Form config key: ${_e}`);return}_e==="enableWrap"?N[Ke]=!!we:N[Ke]=Array.isArray(we)?we:[]}),N},ae=te=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},se={header:"columns",tableContents:"tableData"};return te.forEach((W,ue)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${ue}:`,W);return}const{key:_e,contents:we}=W,Ke=se[_e];if(!Ke){console.warn(`Unknown Table config key: ${_e}`);return}N[Ke]=Array.isArray(we)?we:[]}),N},ve=te=>(console.log("Default conversion logic - to be implemented"),{originalData:te,processed:!1,componentType:"unknown"}),ze=()=>{const te=[{key:"stepList",contents:i.value}];n("change",te)};return e.watch(()=>r.itemContents,te=>{if(te&&te.length>0){const N=te.find(se=>se.key==="stepList");N&&N.contents&&(i.value=N.contents.map(se=>({title:se.title||"",value:se.value||se.title||"",label:se.label||se.title||"",children:se.children||[],id:se.id||E()})))}},{immediate:!0,deep:!0}),(te,N)=>{const se=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-input"),ue=e.resolveComponent("el-form-item"),_e=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I2,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Y},[e.createVNode(se,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",O2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(we,Ke)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Ke},[e.createElementVNode("span",L2,e.toDisplayString(we.title),1),e.createElementVNode("div",R2,[e.createElementVNode("button",{onClick:la=>D(Ke)},"修改标题",8,$2),e.createElementVNode("button",{onClick:la=>x(Ke)},"布局调整",8,V2),e.createElementVNode("button",{onClick:la=>P(Ke)},"删除",8,F2)])]))),128))]),e.createVNode($r.ssDialog,{modelValue:o.value,"onUpdate:modelValue":N[2]||(N[2]=we=>o.value=we),title:p.value,onBeforeDestroy:N[3]||(N[3]=we=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=we=>o.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:O},"确定")]),default:e.withCtx(()=>[e.createVNode(_e,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ue,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:c.value.title,"onUpdate:modelValue":N[0]||(N[0]=we=>c.value.title=we),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode($r.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=we=>m.value=we),title:"布局调整",fullScreen:"",onBeforeDestroy:U},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:fe},"取消"),e.createElementVNode("button",{onClick:ye},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",P2,[e.createElementVNode("div",j2,[e.createVNode(y2),e.createElementVNode("div",H2,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",U2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,we=>(e.openBlock(),e.createElementBlock("div",{key:we.id,class:"component-item",onClick:Ke=>I(we)},[e.createElementVNode("div",W2,[e.createElementVNode("span",K2,e.toDisplayString(_(we.comp)),1),e.createElementVNode("span",G2,e.toDisplayString(we.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,q2))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:te.innerWidth},[e.createVNode(M2)])),e.createElementVNode("div",Y2,[e.createVNode(B2)])])]),_:1},8,["modelValue"])])}}},X2=sr._export_sfc(J2,[["__scopeId","data-v-9096ed0d"]]);function Z2(){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 Q2(a){return{type:"line",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],...a}}function ev(){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 av(a){return{type:"bar",barWidth:"60%",showBackground:!0,backgroundStyle:{color:"rgba(180, 180, 180, 0.1)"},itemStyle:{color:new Fl.LinearGradient(0,0,0,1,[{offset:0,color:"#94C2FD"},{offset:.7,color:"#6491E1"},{offset:1,color:"#3264C8"}])},emphasis:{itemStyle:{color:new Fl.LinearGradient(0,0,0,1,[{offset:0,color:"#3264C8"},{offset:.7,color:"#6491E1"},{offset:1,color:"#94C2FD"}])}},...a}}function lv(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function rv(a){return{type:"pie",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],radius:["40%","70%"],itemStyle:{borderRadius:6,borderColor:"#fff",borderWidth:2},label:{show:!0,formatter:function(l){return"{b|"+l.name+`}
25
+ ${fr}`,duration:5e3,showClose:!0})}else Ja.ElMessage.success("导出成功")}else Ja.ElMessage.error(((il=ir==null?void 0:ir.data)==null?void 0:il.message)||"导出失败")}catch(Be){console.error("导出paraform失败:",Be),Ja.ElMessage.error("导出失败:"+((Be==null?void 0:Be.message)||"未知错误"))}finally{Ra.close()}}else if(f!=null&&f.includes("导出")&&f!=="导出paraform"){if(f==="导出选中"&&((Sa=Rr.value)==null?void 0:Sa.length)===0)return Ja.ElMessage.warning(`请先勾选${f}的数据`);if(f==="导出全部"&&((tl=De.value)==null?void 0:tl.length)===0)return Ja.ElMessage.warning("暂无数据导出");let Ra=["序号",...(Va=(be=q.value)==null?void 0:be.map(fa=>fa==null?void 0:fa.prop))==null?void 0:Va.filter(fa=>fa!=="操作")],Be=f==="导出全部"?De.value:Rr.value;const Q=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Be=Be==null?void 0:Be.map(fa=>Object.fromEntries(Object.entries(fa).filter(([B])=>!Q.includes(B)))),Ra=["序号",...Ra],Be=Be==null?void 0:Be.map((fa,B)=>({序号:B+1,...fa}));let He=(d==null?void 0:d.compName)||"表格信息";Uo(Be,He,Ra,He)}else if(f==="OCR识别")bl.value=!0,ka.value=[],aa.value=1,Pa.value.clear(),Ga.value.clear(),$e.value=0;else if(f==="迁移")G.selectRow=v,G.show=!0;else if(f==="生成方法"){let Ra=await M0(v),Be;v!==""?Be=[v]:Be=M.cloneDeep(De.value),Be=Be==null?void 0:Be.map(He=>(He.输出值=Ra,He));const Q={fixContent:Be,buttonName:"编辑",relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames};U("change",Q)}else if(f==="签字板"||f==="触控笔")al.value.dialogShow=!0,al.value.dialogTitle=f;else if(((xa=z==null?void 0:z.extra)==null?void 0:xa.type)==="methodButton"){let Ra;v!==""?Ra=[v]:Ra=M.cloneDeep(De.value);const Be=await Ct(Ra,q==null?void 0:q.value,"Manual",De.value,d==null?void 0:d.calculator,d==null?void 0:d.compNames);let Q;(Ya=Be==null?void 0:Be[0])!=null&&Ya.menuPathContent?Q={fixContent:Be,buttonName:"新增",relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames}:Q={fixContent:Be,buttonName:"methodButton",relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames},U("change",Q)}}},Tu=async(f,v)=>{var z,L,H,T,ie,oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be;try{let Va,xa;const Ya=(z=ca.value[de.value+I])==null?void 0:z.filter(Ua=>{var sl;return((sl=Ua==null?void 0:Ua.key)==null?void 0:sl.type)==="structureMethod"}),Ra=(L=ca.value[de.value+I])==null?void 0:L.filter(Ua=>{var sl;return((sl=Ua==null?void 0:Ua.key)==null?void 0:sl.type)==="structure"}),Be=Ya==null?void 0:Ya.find(Ua=>{var sl,Ka;return((Ka=(sl=Ua==null?void 0:Ua.value)==null?void 0:sl.pageData)==null?void 0:Ka.method)==="保存"});if(!Be)return;const Q=(oe=(ie=ca.value[(T=(H=Be==null?void 0:Be.value)==null?void 0:H.pageData)==null?void 0:T.path])==null?void 0:ie.filter(Ua=>{var sl;return((sl=Ua==null?void 0:Ua.key)==null?void 0:sl.type)==="data"}))==null?void 0:oe.find(Ua=>{var sl,Ka,Ba,ul;return((Ka=(sl=Ua==null?void 0:Ua.value)==null?void 0:sl.tableData)==null?void 0:Ka.算法名称)===((ul=(Ba=Be==null?void 0:Be.value)==null?void 0:Ba.pageData)==null?void 0:ul.method)});if(!Q)return;const He={buttonName:(ke=(K=Be==null?void 0:Be.value)==null?void 0:K.pageData)==null?void 0:ke.method,api:(Ye=(ge=Q==null?void 0:Q.value)==null?void 0:ge.tableData)==null?void 0:Ye.算法体,content:Ra==null?void 0:Ra.map(Ua=>{var sl;return(sl=Ua==null?void 0:Ua.value)==null?void 0:sl.pageData}),extraContent:[],extraValues:(ra=(qe=Be==null?void 0:Be.value)==null?void 0:qe.pageData)==null?void 0:ra.data,methodName:(za=(_a=Be==null?void 0:Be.value)==null?void 0:_a.pageData)==null?void 0:za.path};if(!f)return;const fa={...f,compData:(Ma=f==null?void 0:f.compData)==null?void 0:Ma.map(Ua=>{var sl;return(Ua==null?void 0:Ua.key)==="formContent"?{...Ua,contents:(sl=Ua==null?void 0:Ua.contents)==null?void 0:sl.map(Ka=>(Ka==null?void 0:Ka.prop)===v?{...Ka,value:""}:Ka)}:Ua})},B={key:{pageKey:de.value+I,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:fa}},Ia=await Ja.axios.post(He.api,B,{headers:{"Content-Type":"application/json"}});return((na=Ia==null?void 0:Ia.data)==null?void 0:na.code)===200&&(Va=(Sa=(il=Ia==null?void 0:Ia.data)==null?void 0:il.result)==null?void 0:Sa.latestReportCode,xa=(be=(tl=Ia==null?void 0:Ia.data)==null?void 0:tl.result)==null?void 0:be.status),{newMainKeyValue:Va,newStatus:xa}}catch(Va){throw Ja.ElMessage.error(Va),new Error(Va)}},jt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const Bu=async(f,v,z)=>{var K,ke;let L=f==null?void 0:f[v==null?void 0:v.prop],H=1,T,ie;const oe=M.cloneDeep(de).value+I+L;if(oe){jt.value="",T=(K=ca.value[oe])==null?void 0:K.filter(qe=>{var ra;return((ra=qe==null?void 0:qe.key)==null?void 0:ra.type)==="structure"});const ge=T==null?void 0:T.find(qe=>{var ra,_a,za;return((za=(_a=(ra=qe==null?void 0:qe.value)==null?void 0:ra.pageData)==null?void 0:_a.comp)==null?void 0:za.toUpperCase())==="FORM"});ie={...(ke=ge==null?void 0:ge.value)==null?void 0:ke.pageData,id:ge==null?void 0:ge.id};const Ye=await Tu(ie,v==null?void 0:v.prop);if(jt.value=Ye==null?void 0:Ye.newStatus,Ye!=null&&Ye.newMainKeyValue)return Ye==null?void 0:Ye.newMainKeyValue}if(De.value.some(ge=>(ge==null?void 0:ge[v==null?void 0:v.prop])===L)){const ge=L;for(;De.value.some(Ye=>(Ye==null?void 0:Ye[v==null?void 0:v.prop])===`${ge}(${H})`);)H++;L=`${ge}(${H})`}return L},Nu=async(f,v,z)=>{var T,ie,oe,K;let L,H;if(await Bu(z==null?void 0:z.data,z==null?void 0:z.firstCol),L=M.cloneDeep(de).value+I,H=M.cloneDeep(L)+`loading${((T=wl.value)==null?void 0:T.account)||((ie=wl.value)==null?void 0:ie.账号)}`,v){const ke=(K=(oe=ca.value[H])==null?void 0:oe.filter(ge=>{var Ye;return((Ye=ge==null?void 0:ge.key)==null?void 0:Ye.parentTable)===""}))==null?void 0:K.map(ge=>{var Ye;return{id:ge==null?void 0:ge.id,...(Ye=ge==null?void 0:ge.value)==null?void 0:Ye.pageData}});(ke==null?void 0:ke.length)>0||await le.loadingConstruct(L,H,null,null,null),Ge.setRouteToChildPath(M.cloneDeep(de).value),Ie.setActiveMenuPath(H)}else Ge.setRouteToChildPath(M.cloneDeep(de).value),Ie.setActiveMenuPath(H)},Au=()=>{te.value=!1,Le.value=[],N.value=!1},ji=f=>{var oe,K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra,Be,Q,He,fa;const v=[];ze.value=M.cloneDeep(q.value);let z=(K=(oe=u.value)==null?void 0:oe.find(B=>{var Ia;return(Ia=B==null?void 0:B.key)==null?void 0:Ia.includes("@EditRead")}))==null?void 0:K.content,L=!1;(z==null?void 0:z.length)>0&&(L=Ds(z,f),(L==null?void 0:L.length)>0?L=!0:L=!1),(ge=le.getColumnChild((ke=M.cloneDeep(q.value))==null?void 0:ke.filter(B=>(B==null?void 0:B.label)!=="操作")))==null||ge.forEach((B,Ia)=>{var Ua,sl,Ka;B!=null&&B.formType&&((Ua=B==null?void 0:B.formType)==null?void 0:Ua.toUpperCase())==="SELECT"||B!=null&&B.menuId?v.push({label:(sl=B==null?void 0:B.prop)!=null&&sl.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",name:(B==null?void 0:B.prop)??"t"+Ia,prop:B==null?void 0:B.prop,type:"Select",value:(f==null?void 0:f[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??Ia,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,multipleLimit:B==null?void 0:B.multipleLimit,width:2,isFormColHidden:B==null?void 0:B.isFormColHidden,relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,allSelectionContents:(B==null?void 0:B.allSelectionContents)??[],filterContent:B==null?void 0:B.filterContent,disabled:(B==null?void 0:B.prop)==="disabled"?!0:L||(B==null?void 0:B.disabled),filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly}):v.push({label:(Ka=B==null?void 0:B.prop)!=null&&Ka.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",prop:B==null?void 0:B.prop,name:(B==null?void 0:B.prop)??"t"+Ia,type:!(B!=null&&B.formType)||(B==null?void 0:B.formType)===""?"Input":B==null?void 0:B.formType,value:(B==null?void 0:B.formType)==="Upload"?(f==null?void 0:f[B==null?void 0:B.prop])??"{}":(f==null?void 0:f[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??Ia,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,width:2,isFormColHidden:B==null?void 0:B.isFormColHidden,disabled:(B==null?void 0:B.prop)==="disabled"?!0:L||(B==null?void 0:B.disabled),relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter,isReadonly:B==null?void 0:B.isReadonly})}),f===""||!f||(da.value=(f==null?void 0:f.id)??"");let H=le.getColumnChild((Ye=M.cloneDeep(q.value))==null?void 0:Ye.filter(B=>(B==null?void 0:B.label)!=="操作"));Qe.value&&((qe=Qe.value)==null?void 0:qe.length)>0&&(Qe.value=(ra=M.cloneDeep(Qe).value)==null?void 0:ra.map(B=>{var Ua;let Ia=(B==null?void 0:B.prop)||((Ua=H==null?void 0:H.find(sl=>(sl==null?void 0:sl.label)===(B==null?void 0:B.label)))==null?void 0:Ua.prop);return Ia&&(B.value=f[Ia]),B})),me.value=Qe.value&&((_a=Qe.value)==null?void 0:_a.length)>0?le.getTableFormToForm(Qe.value):v,me.value=((za=me.value)==null?void 0:za.map(B=>({...B,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled})))??me.value;let T=[],ie=((il=(na=(Ma=d.itemData)==null?void 0:Ma.filter(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:na[0])==null?void 0:il.contents)??"";if(ie=le.analyzeSplitToContent(ie,","),(ie==null?void 0:ie.length)>0&&(T=ie.flat()),(T==null?void 0:T.length)>0){let B=T==null?void 0:T.filter(Ba=>Ba==null?void 0:Ba.includes("@Type"));if(B=B==null?void 0:B[(B==null?void 0:B.length)-1],(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)),B){let Ba=(tl=(Sa=B==null?void 0:B.replace("=",b))==null?void 0:Sa.split(b))==null?void 0:tl[1];((be=Ba==null?void 0:Ba.trim())==null?void 0:be.toUpperCase())==="MANUAL"&&(d==null||d.index,me.value=(Va=me.value)==null?void 0:Va.map((ul,Wl)=>ul))}let Ia=(xa=me.value)==null?void 0:xa.filter(Ba=>Ba==null?void 0:Ba.mainKey),Ua;Ia==null||Ia.forEach(Ba=>{var Wl;if(Ua!==void 0)return;let ul=Ba==null?void 0:Ba.menus;((Wl=Ia==null?void 0:Ia.filter(qa=>qa==null?void 0:qa.mainKey))==null?void 0:Wl.length)>1&&(Ua=ul,Ba==null||Ba.groups)});let sl=[],Ka=new Map;if(Ia==null||Ia.forEach(Ba=>{var ul,Wl,qa,Dl,$a,$l,nl,fl,Il,gl,_r,pr,ir;if((ul=Ba==null?void 0:Ba.prop)!=null&&ul.includes(".")){let xl=[];Ka.get(((qa=(Wl=Ba==null?void 0:Ba.prop)==null?void 0:Wl.split("."))==null?void 0:qa[0])+(Ba!=null&&Ba.isMainPath?0:1)+((Dl=Ba==null?void 0:Ba.groups)==null?void 0:Dl[0]))&&(xl=Ka.get((($l=($a=Ba==null?void 0:Ba.prop)==null?void 0:$a.split("."))==null?void 0:$l[0])+(Ba!=null&&Ba.isMainPath?0:1)+((nl=Ba==null?void 0:Ba.groups)==null?void 0:nl[0]))),xl.push(Ba),Ka.set(((Il=(fl=Ba==null?void 0:Ba.prop)==null?void 0:fl.split("."))==null?void 0:Il[0])+(Ba!=null&&Ba.isMainPath?0:1)+((gl=Ba==null?void 0:Ba.groups)==null?void 0:gl[0]),xl)}else{let xl=[];Ka.get("normal"+(Ba!=null&&Ba.isMainPath?0:1)+((_r=Ba==null?void 0:Ba.groups)==null?void 0:_r[0]))&&(xl=Ka.get("normal"+(Ba!=null&&Ba.isMainPath?0:1)+((pr=Ba==null?void 0:Ba.groups)==null?void 0:pr[0]))),xl.push(Ba),Ka.set("normal"+(Ba!=null&&Ba.isMainPath?0:1)+((ir=Ba==null?void 0:Ba.groups)==null?void 0:ir[0]),xl)}}),sl=Array.from(Ka.values()),(sl==null?void 0:sl.length)>0)for(let Ba in sl){let ul=sl==null?void 0:sl[Ba];if((ul==null?void 0:ul.length)!==1){if((ul==null?void 0:ul.length)>1){let Wl=ul==null?void 0:ul.map(gl=>gl==null?void 0:gl.prop),qa=ul==null?void 0:ul.map(gl=>gl==null?void 0:gl.label),Dl=ul==null?void 0:ul.map(gl=>gl==null?void 0:gl.value),$a=(Ya=M.cloneDeep(ul))==null?void 0:Ya[0],$l=(Ra=me.value)==null?void 0:Ra.findIndex(gl=>(gl==null?void 0:gl.prop)===($a==null?void 0:$a.prop)),nl=(Be=me.value)==null?void 0:Be.slice(0,$l),fl=(He=me.value)==null?void 0:He.slice($l,(Q=me.value)==null?void 0:Q.length);$a.label=qa==null?void 0:qa.join("·"),$a.value=Dl==null?void 0:Dl.join(" "),$a.value.trim()===""&&($a.value=""),$a.prop=Wl==null?void 0:Wl.join("·");let Il=ul==null?void 0:ul.map(gl=>{var _r;return(_r=gl==null?void 0:gl.words)==null?void 0:_r.join(".")});$a.relatedWords=Il,$a.usingType="parent",fl.unshift($a),me.value=[...nl,...fl],me.value=(fa=me.value)==null?void 0:fa.map(gl=>(Wl!=null&&Wl.find(_r=>_r===(gl==null?void 0:gl.prop))&&(gl.isFormColHidden=!0,gl.relatedWords=Il),gl))}}}}},zu=()=>{var v;const f=(v=i.value)==null?void 0:v.$el;f&&Fl.Sortable.create(f,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{var ie;const{oldIndex:L,newIndex:H}=z;if(L===H)return;const T=Xn.value.splice(L,1)[0];Xn.value.splice(H,0,T),q.value=(ie=q.value)==null?void 0:ie.slice().sort((oe,K)=>{if(oe.label==="操作")return 1;if(K.label==="操作")return-1;const ke=Xn.value.findIndex(Ye=>Ye.label===oe.label),ge=Xn.value.findIndex(Ye=>Ye.label===K.label);return ke-ge})}})};e.onMounted(()=>{ua.value=window.innerWidth-240*2,window.addEventListener("keydown",oi)});const Mu=()=>{e.nextTick(()=>{zu()})},Iu=()=>{c.value=!0},pt=(f,v)=>{var L;if(!f&&!(f!=null&&f.children))return{contents:f,currentSelectContents:void 0};let z;return f.children=(L=f.children)==null?void 0:L.map(H=>{var T,ie;if((H==null?void 0:H.id)===da.value){let oe={};for(let K in H){let ke=(T=v==null?void 0:v.find(ge=>(ge==null?void 0:ge.prop)===K))==null?void 0:T.label;ke?oe[K]=(ie=lr.value)==null?void 0:ie[ke]:oe[K]=H[K]??""}H=Object.assign(oe,lr.value),z=H}else{let oe=pt(H,v);H=oe==null?void 0:oe.contents,z=oe==null?void 0:oe.currentSelectContents}return H}),{contents:f,currentSelectContents:z}},Ht=(f,v)=>{let z,L;return f!=null&&f.find(H=>(H==null?void 0:H.id)===da.value)?z=f==null?void 0:f.map(H=>{var T,ie,oe;if((H==null?void 0:H.id)===da.value){let K={};for(let ge in H){let Ye=(T=v==null?void 0:v.find(qe=>(qe==null?void 0:qe.prop)===ge))==null?void 0:T.label;Ye?K[ge]=((ie=lr.value)==null?void 0:ie[Ye])??"":K[ge]=H[ge]??""}let ke=lr.value;for(let ge in K)(oe=lr.value)!=null&&oe[ge]||(ke[ge]=(K==null?void 0:K[ge])??"");H=ke,L=H}return H}):z=f==null?void 0:f.map(H=>{var T,ie,oe,K;if((H==null?void 0:H.id)===da.value){let ke={};for(let ge in H){let Ye=(T=v==null?void 0:v.find(qe=>(qe==null?void 0:qe.prop)===ge))==null?void 0:T.label;Ye?ke[ge]=(ie=lr.value)==null?void 0:ie[Ye]:ke[ge]=H[ge]??""}H=Object.assign(ke,lr.value),L=H}else H=(oe=pt(H,v))==null?void 0:oe.contents,L=(K=pt(H,v))==null?void 0:K.currentSelectContents;return H}),{newContents:z,currentSelectContents:L}},Ut=(f,v,z)=>{var L,H;return f[v==null?void 0:v.prop]=z,typeof f.id=="number"&&(f.id=(L=f.id)==null?void 0:L.toString()),f.children&&((H=f.children)==null?void 0:H.length)>0&&(f.children=f.children.map(Ut)),f},qt=f=>{var z;const v=[];return v.push({...f}),f!=null&&f.children&&Array.isArray(f.children)&&((z=f.children)==null||z.forEach(L=>{v.push(...qt(L))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(L=>{const H={...L};return delete H.children,H}):[]},po=["Pacific6000数据采集装置.通道号","通道号"],Hi=f=>{if(!f)return"";const v=po.map(z=>f==null?void 0:f[z]).find(z=>z!=null&&String(z).trim()!=="");return v==null?"":String(v).trim()},ft=async(f,v=void 0)=>{if(!f)return!1;try{const z=ra=>{var _a,za,Ma;return ra?typeof(ra==null?void 0:ra.value)=="string"?ra.value:((Ma=(za=(_a=ra==null?void 0:ra._custom)==null?void 0:_a.value)==null?void 0:za.value)==null?void 0:Ma.value)||"":""},L=Array.isArray(Zl.value)?Zl.value:[],H=z(L.find(ra=>(ra==null?void 0:ra.condition)==="child")),T=(de.value||"").replace(/\/+$/,""),ie=H?`${T}/${H}`:T,oe=await Hr(ie||de.value,!1),K=String(Ve.value||"").trim(),ke=ra=>String(ra||"").trim(),ge=(ra,_a=[],za="")=>{if(!Array.isArray(ra))return _a;for(const Ma of ra){const na=ke((Ma==null?void 0:Ma.choiceName)||(Ma==null?void 0:Ma.name0)||za);(Ma==null?void 0:Ma.comp)==="Table"&&(!K||na===K)&&_a.push(Ma),Array.isArray(Ma==null?void 0:Ma.children)&&ge(Ma.children,_a,na),Array.isArray(Ma==null?void 0:Ma.tab)&&ge(Ma.tab,_a,na),Array.isArray(Ma==null?void 0:Ma.choice)&&ge(Ma.choice,_a,na)}return _a},Ye=ge(oe||[]),qe=String((d==null?void 0:d.compName)||"");return Ye.some(ra=>{var za,Ma;const _a=((Ma=(za=ra==null?void 0:ra.compData)==null?void 0:za.find(na=>(na==null?void 0:na.key)==="tableContents"))==null?void 0:Ma.contents)||[];return!Array.isArray(_a)||_a.length===0?!1:_a.some(na=>{if(String((ra==null?void 0:ra.name)||"")===qe&&(na==null?void 0:na.id)===v)return!1;const Sa=Hi(na);return!!Sa&&Sa===f})})}catch{return(De.value||[]).some(L=>{if((L==null?void 0:L.id)===v)return!1;const H=Hi(L);return!!H&&H===f})}},Ui=async(f=!0,v,z)=>{var ke,ge,Ye,qe,ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl;if(lr.value){const $a=(ge=le.getColumnChild((ke=M.cloneDeep(q.value))==null?void 0:ke.filter(nl=>(nl==null?void 0:nl.label)!=="操作")))==null?void 0:ge.filter(nl=>(nl==null?void 0:nl.required)===!0);for(let nl=0;nl<(($a==null?void 0:$a.length)??0);nl++){const fl=$a[nl],Il=fl==null?void 0:fl.prop,gl=(fl==null?void 0:fl.label)??Il,_r=(Ye=lr.value)==null?void 0:Ye[Il];if(_r===""||_r===null||_r===void 0||Array.isArray(_r)&&_r.length===0){Ja.ElMessage.error(`${gl}不能为空`);return}}const $l=Hi(lr.value);if($l&&await ft($l,da.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let L=le.getColumnChild((qe=M.cloneDeep(q.value))==null?void 0:qe.filter($a=>($a==null?void 0:$a.label)!=="操作")),H,T=M.cloneDeep(De.value);if(!lr.value){Ze.value=!1;return}if(da.value===""){ta.value++;let $a;$a={id:ta.value.toString()};try{$a.sort=si(0,De.value||[])}catch{}$a!=null&&$a.children&&($a={...$a,children:(ra=$a.children)==null?void 0:ra.map(nl=>Ut(nl,v,z))});const $l=Object.assign(lr.value,$a);T.unshift($l),H=$l}else T=(_a=Ht(T,L))==null?void 0:_a.newContents,H=(za=Ht(T,L))==null?void 0:za.currentSelectContents;const ie=(Ma=d.itemData)==null?void 0:Ma.filter($a=>($a==null?void 0:$a.key)==="childTree")[0];if(((na=ie==null?void 0:ie.contents)==null?void 0:na.length)>0){ya.value="编辑";const $a=[];T==null||T.forEach((fl,Il)=>{var _r;let gl={};if(Array.isArray(fl)){let pr=[];fl==null||fl.filter(ir=>!(ir!=null&&ir.id)).forEach((ir,xl)=>{var Yl,hr,Ll,vr,Er,mr,Ar;if((hr=(Yl=tr.value)==null?void 0:Yl[xl])!=null&&hr.prop&&!Array.isArray(ir)){let tn={};tn[tr.value[xl].column]=ir,V!=null&&V.value&&((Ll=V==null?void 0:V.value)==null?void 0:Ll.length)>0&&((vr=V==null?void 0:V.value)!=null&&vr.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(tn)))&&(pr=(Er=V==null?void 0:V.value)==null?void 0:Er.find(fr=>JSON.stringify(fr==null?void 0:fr[0])===JSON.stringify(tn))),pr&&pr.length>0?gl[tr.value[xl].prop]=pr!=null&&pr.find(fr=>{var Mr;return((Mr=Object.keys(fr))==null?void 0:Mr[0])===tr.value[xl].column})?(mr=pr==null?void 0:pr.find(fr=>{var Mr;return((Mr=Object.keys(fr))==null?void 0:Mr[0])===tr.value[xl].column}))==null?void 0:mr[tr.value[xl].column]:ir:gl[tr.value[xl].prop]=ir}else Array.isArray(ir)&&((Ar=tr.value[xl])!=null&&Ar.prop?gl[tr.value[xl].prop]=ir:gl.children=Dt(ir,tr.value))})}else gl=fl;if(Array.isArray(fl)&&fl.some(pr=>pr==null?void 0:pr.id)){const pr=(_r=fl==null?void 0:fl.find(ir=>ir.id))==null?void 0:_r.id;$a.push(Object.assign(gl,{id:to(pr)}))}else gl.id?$a.push(gl):$a.push(Object.assign(gl,{id:Il.toString()}))});const $l=(De.value||[]).map(fl=>String(fl==null?void 0:fl.id)),nl=wi($a,$l);De.value=Yt(nl,ie,q.value)}Kt(De.value),Xl.value=De.value;const oe=y0(Xl.value,El.value,T);let K=[];if(ee.value?(K=(il=M.cloneDeep(ee).value.singleContent)==null?void 0:il.filter($a=>($a==null?void 0:$a.id)!==(H==null?void 0:H.id)),K.push(H)):K=[H],Kl.value){const $a={content:oe,singleContent:((Sa=ie==null?void 0:ie.contents)==null?void 0:Sa.length)>0?K==null?void 0:K.flatMap(qt):K,index:d==null?void 0:d.index,buttonName:"编辑",column:q.value,parentTableId:d==null?void 0:d.parentTableId};Ge.setCacheUpdatingData($a)}if((tl=q.value)==null||tl.forEach($a=>{($a==null?void 0:$a.formType)==="Upload"&&(H[$a.prop]=H[$a.prop]===""?"{}":typeof H[$a.prop]!="string"?JSON.stringify(H[$a.prop]):H[$a.prop])}),f){(Ya=(xa=(Va=(be=d.itemData)==null?void 0:be.find(nl=>(nl==null?void 0:nl.key)==="filterAllType"))==null?void 0:Va.value)==null?void 0:xa.find(nl=>(nl==null?void 0:nl.value)==="onConditionContents"))==null||Ya.content;let $a=(Ra=d.itemData)==null?void 0:Ra.filter(nl=>(nl==null?void 0:nl.key)==="filterAllType");$a=Array.from(new Map($a.filter(Boolean).map((nl,fl)=>[nl.value,{...nl,_idx:fl}])).values()).sort((nl,fl)=>nl._idx-fl._idx).map(({_idx:nl,...fl})=>fl),$a=(Be=$a==null?void 0:$a[($a==null?void 0:$a.length)-1])==null?void 0:Be.value;const $l={fixContent:[H],buttonName:ya.value,relatedContents:d==null?void 0:d.related,columns:q.value,name:d==null?void 0:d.groupNames};Ge.setTableLoading(d==null?void 0:d.index),Ze.value=!1,lr.value=void 0,U("change",$l)}if((fa=(He=(Q=me.value)==null?void 0:Q[0])==null?void 0:He.optionUrl)!=null&&fa.menuId){Ze.value=!1;let $a=(B=d.itemData)==null?void 0:B.filter($l=>($l==null?void 0:$l.key)==="filterAllType");if(($a==null?void 0:$a.length)>0){let $l=$a==null?void 0:$a.map(Il=>Il==null?void 0:Il.value),nl=(sl=(Ua=(Ia=$l.flat().find(Il=>{var gl;return(gl=Il==null?void 0:Il.content)==null?void 0:gl.includes("@Num")}))==null?void 0:Ia.content)==null?void 0:Ua.split(":"))==null?void 0:sl[1];((ul=(Ba=(Ka=$l.flat().find(Il=>{var gl;return(gl=Il==null?void 0:Il.content)==null?void 0:gl.includes("@Type:")}))==null?void 0:Ka.content)==null?void 0:Ba.split(":"))==null?void 0:ul[1])!=="Manual"&&(nl=parseInt(nl),De.value=(Dl=De.value)==null?void 0:Dl.slice(((Wl=De.value)==null?void 0:Wl.length)-nl,(qa=De.value)==null?void 0:qa.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",oi),q.value=[],De.value=[],ze.value=[],j.value=[],Qe.value=[],Da.value=[],Le.value=[],Fe.value=[],me.value=[],Rr.value=[],i.value=null,rn.value=""});const fo=async(f,v,z)=>{var ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra;qr.value=(z==null?void 0:z.prop)??(z==null?void 0:z.property);const L=M.cloneDeep(d.itemData),H=((ra=L==null?void 0:L.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:ra.contents)??[];let T=H==null?void 0:H.find((Be,Q)=>{var He,fa,B;return(Be==null?void 0:Be.prop)===qr.value||(Be==null?void 0:Be.label)===qr.value||(Q==null?void 0:Q.toString())===((B=(fa=(He=qr.value)==null?void 0:He.split("a"))==null?void 0:fa[1])==null?void 0:B.toString())});const ie=le.getColumnChild((_a=M.cloneDeep(q.value))==null?void 0:_a.filter(Be=>(Be==null?void 0:Be.label)!=="操作"));if(T||(T=ie==null?void 0:ie.find(Be=>(Be==null?void 0:Be.prop)===qr.value||(Be==null?void 0:Be.label)===qr.value)),T&&!((za=T==null?void 0:T.menus)!=null&&za.length)&&!((Ma=T==null?void 0:T.groups)!=null&&Ma.length)&&!((na=T==null?void 0:T.words)!=null&&na.length)){const Be=(il=me.value)==null?void 0:il.find(Q=>(Q==null?void 0:Q.prop)===qr.value);Be&&(T={...T,menus:(Be==null?void 0:Be.menus)??(T==null?void 0:T.menus),groups:(Be==null?void 0:Be.groups)??(T==null?void 0:T.groups),words:(Be==null?void 0:Be.words)??(T==null?void 0:T.words),bindMenus:(Be==null?void 0:Be.bindMenus)??(T==null?void 0:T.bindMenus),isMainPath:(Be==null?void 0:Be.isMainPath)??(T==null?void 0:T.isMainPath),relatedContents:(Be==null?void 0:Be.relatedContents)??(T==null?void 0:T.relatedContents),endChildMenu:(Be==null?void 0:Be.endChildMenu)??(T==null?void 0:T.endChildMenu)})}if(T&&((Sa=me==null?void 0:me.value)==null||Sa.forEach(Be=>{var Q,He,fa,B,Ia;(Be==null?void 0:Be.prop)===(T==null?void 0:T.prop)&&(Be!=null&&Be.endChildMenu)&&((Q=T==null?void 0:T.prop)!=null&&Q.includes(".")&&((fa=(He=T==null?void 0:T.prop)==null?void 0:He.split("."))==null?void 0:fa[0])!==((Ia=(B=Be==null?void 0:Be.prop)==null?void 0:B.split("."))==null?void 0:Ia[0])?T.endChildMenu=Be==null?void 0:Be.value:T.endChildMenu=Be==null?void 0:Be.endChildMenu)})),!T)return;const oe=qr.value,K=(tl=De.value)==null?void 0:tl.findIndex(Be=>(Be==null?void 0:Be.id)===(v==null?void 0:v.id));K!==-1&&oe&&(De.value[K]={...De.value[K],[oe]:f});const ke=Be=>{Array.isArray(Be)&&Be.forEach(Q=>{Array.isArray(Q==null?void 0:Q.allSelectionContents)&&Q.allSelectionContents.length>0&&(Q.contactValue=De.value[K]??v),Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&ke(Q.children)})};ke(q.value),T.value=f,T.endChildMenu=T.endChildMenu||"";let ge=T!=null&&T.isMainPath&&(T!=null&&T.mainKey)?T==null?void 0:T.value:"";const Ye=Be=>{Array.isArray(Be)&&Be.forEach(Q=>{var fa,B;if(((Q==null?void 0:Q.type)==="Select"||(Q==null?void 0:Q.formType)&&Q.formType.toUpperCase()==="SELECT"||(Q==null?void 0:Q.columnType)&&Q.columnType.toUpperCase()==="SELECT")&&Array.isArray(Q==null?void 0:Q.menus)&&Q.menus.length>0&&Q.menus[Q.menus.length-1]===""&&(T!=null&&T.isMainPath)&&(T!=null&&T.mainKey)){const Ia=(fa=Q==null?void 0:Q.prop)!=null&&fa.includes(".")?Q.prop.split(".")[0]:null,Ua=(B=T==null?void 0:T.prop)!=null&&B.includes(".")?T.prop.split(".")[0]:null;(!Ia||!Ua||Ia===Ua)&&(Q.endChildMenu=ge)}Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&Ye(Q.children)})};if(Ye(q.value),!!(T!=null&&T.mainKey)&&Array.isArray(T==null?void 0:T.menus)&&(T==null?void 0:T.menus.length)>0&&(T!=null&&T.value)&&(T==null?void 0:T.value)!==""){let Be=T!=null&&T.relatedContents&&((be=T==null?void 0:T.relatedContents)==null?void 0:be.length)>0?(Va=T==null?void 0:T.relatedContents)==null?void 0:Va.find(Q=>{var He,fa,B,Ia;return(Q==null?void 0:Q[(Ia=(He=T==null?void 0:T.prop)==null?void 0:He.split("."))==null?void 0:Ia[((B=(fa=T==null?void 0:T.prop)==null?void 0:fa.split("."))==null?void 0:B.length)-1]])===(T==null?void 0:T.value)}):await _s(T);if(Be){const Q={...v};ie==null||ie.forEach(He=>{var fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl,Il;(He==null?void 0:He.prop)!==(T==null?void 0:T.prop)&&(T!=null&&T.relatedContents&&((fa=T==null?void 0:T.relatedContents)==null?void 0:fa.length)>0?(B=He==null?void 0:He.prop)!=null&&B.includes(".")&&((Ua=(Ia=He==null?void 0:He.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])===((Ka=(sl=T==null?void 0:T.prop)==null?void 0:sl.split("."))==null?void 0:Ka[0])?Q[He.prop]=Be[(qa=(Ba=He==null?void 0:He.prop)==null?void 0:Ba.split("."))==null?void 0:qa[((Wl=(ul=He==null?void 0:He.prop)==null?void 0:ul.split("."))==null?void 0:Wl.length)-1]]??Q[He.prop]:Q[He.prop]=(Be==null?void 0:Be[He.prop])??Q[He.prop]:le.same((T==null?void 0:T.menus)??[],(He==null?void 0:He.menus)??[])&&le.same((T==null?void 0:T.groups)??[],(He==null?void 0:He.groups)??[])&&!le.same((T==null?void 0:T.words)??[],(He==null?void 0:He.words)??[])?(Dl=He==null?void 0:He.prop)!=null&&Dl.includes(".")&&(($l=($a=He==null?void 0:He.prop)==null?void 0:$a.split("."))==null?void 0:$l[0])!==((fl=(nl=T==null?void 0:T.prop)==null?void 0:nl.split("."))==null?void 0:fl[0])||(Q[He.prop]=(Be==null?void 0:Be[(Il=He==null?void 0:He.words)==null?void 0:Il.join(".")])??(Be==null?void 0:Be[He.prop])??Q[He.prop]):(!(He!=null&&He.isMainPath)&&le.same((T==null?void 0:T.bindMenus)??[],(He==null?void 0:He.bindMenus)??[]),Q[He.prop]=(Be==null?void 0:Be[He.prop])??Q[He.prop]))}),De.value=(xa=M.cloneDeep(De.value))==null?void 0:xa.map(He=>(He==null?void 0:He.id)===(v==null?void 0:v.id)?{...Q,id:He==null?void 0:He.id}:He)}}if((Ya=T==null?void 0:T.optionUrl)!=null&&Ya.menuSelect){let Be="";ie==null||ie.forEach(fa=>{var B,Ia,Ua,sl,Ka;Be===""&&((Ua=(Ia=(B=fa==null?void 0:fa.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ia[1])!=null&&Ua.includes("["))&&(Be=(Ka=(sl=fa==null?void 0:fa.optionUrl)==null?void 0:sl.groupSelect)==null?void 0:Ka[1])});let Q=await Tt(T),He;if(Q==null||Q.forEach(fa=>{var B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl;Be===((Ia=(B=T==null?void 0:T.optionUrl)==null?void 0:B.groupSelect)==null?void 0:Ia[1])&&((Ka=(sl=(Ua=T==null?void 0:T.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:sl[1])!=null&&Ka.includes("["))&&((Dl=M.cloneDeep(fa))==null?void 0:Dl[(qa=(Wl=(ul=(Ba=T==null?void 0:T.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:ul[1])==null?void 0:Wl.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])===(T==null?void 0:T.value)&&(He=fa)}),He){const fa={...v};ie==null||ie.forEach(B=>{var Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l;(He!=null&&He[B==null?void 0:B.label]||He!=null&&He[(Ka=(sl=(Ua=(Ia=B==null?void 0:B.optionUrl)==null?void 0:Ia.groupSelect)==null?void 0:Ua[1])==null?void 0:sl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])&&((Wl=(ul=(Ba=B==null?void 0:B.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:ul[1])!=null&&Wl.includes("["))&&(fa[B.prop]=(He==null?void 0:He[B==null?void 0:B.label])||(He==null?void 0:He[($l=($a=(Dl=(qa=B==null?void 0:B.optionUrl)==null?void 0:qa.groupSelect)==null?void 0:Dl[1])==null?void 0:$a.replaceAll("[",""))==null?void 0:$l.replaceAll("]","")]))}),De.value=(Ra=M.cloneDeep(De.value))==null?void 0:Ra.map(B=>(B==null?void 0:B.id)===(v==null?void 0:v.id)?{...fa,id:B==null?void 0:B.id}:B)}}},Ou=async f=>{var ra,_a,za,Ma,na,il,Sa,tl,be,Va,xa,Ya,Ra,Be;if(!f)return;const v=M.cloneDeep(lr.value||{});lr.value=f;const z=Hi(v),L=Hi(lr.value);if(L&&L!==z&&await ft(L,da.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),po.forEach(He=>{if(Object.prototype.hasOwnProperty.call(lr.value||{},He)||Object.prototype.hasOwnProperty.call(v||{},He)){const fa=(v==null?void 0:v[He])??"";lr.value[He]=fa,f[He]=fa}}),me.value=(me.value||[]).map(He=>{if(!(He!=null&&He.prop)||!po.includes(He.prop))return He;const fa=(v==null?void 0:v[He.prop])??"";return{...He,value:fa,selectValue:fa===""?[]:[fa]}});return}let H=M.cloneDeep(d.itemData);H==null||H.map(Q=>{var He,fa,B,Ia;return(Q==null?void 0:Q.key)==="header"&&(Array.isArray((He=Q.contents)==null?void 0:He[0])?Q.contents=(B=le.getColumnChild((fa=Q.contents)==null?void 0:fa[0]))==null?void 0:B.map((Ua,sl)=>{var Ka,Ba,ul,Wl,qa,Dl;return((ul=(Ba=(Ka=me.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ba.optionUrl)==null?void 0:ul.multiple)===!0&&!Array.isArray((Wl=Object.values(f))==null?void 0:Wl[sl])?Ua.value=[(qa=Object.values(f))==null?void 0:qa[sl]]:Ua.value=(Dl=Object.values(f))==null?void 0:Dl[sl],Ua}):Q.contents=(Ia=Q.contents)==null?void 0:Ia.map((Ua,sl)=>{var Ka,Ba,ul,Wl,qa,Dl;return((ul=(Ba=(Ka=me.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ba.optionUrl)==null?void 0:ul.multiple)===!0&&!Array.isArray((Wl=Object.values(f))==null?void 0:Wl[sl])?Ua.value=[(qa=Object.values(f))==null?void 0:qa[sl]]:Ua.value=(Dl=Object.values(f))==null?void 0:Dl[sl],Ua})),Q});let T=me.value,ie=(ra=H==null?void 0:H.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:ra.contents;if(qr.value||(T=T==null?void 0:T.map(Q=>{var He;return Q.value=Q.value??((He=ie==null?void 0:ie.find((fa,B)=>(fa==null?void 0:fa.prop)===(Q==null?void 0:Q.name)))==null?void 0:He.value),Q})),!En.value)return;let oe=M.cloneDeep(qr.value);(_a=qr.value)!=null&&_a.includes("·")&&(qr.value=(Ma=(za=qr.value)==null?void 0:za.split("·"))==null?void 0:Ma[0]);let K=(il=(na=H==null?void 0:H.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:na.contents)==null?void 0:il.find((Q,He)=>(Q==null?void 0:Q.prop)===qr.value);(Sa=me==null?void 0:me.value)==null||Sa.forEach(Q=>{var He,fa,B,Ia,Ua,sl,Ka,Ba,ul;(Q==null?void 0:Q.prop)===(K==null?void 0:K.prop)&&(Q!=null&&Q.endChildMenu)&&((He=K==null?void 0:K.prop)!=null&&He.includes(".")&&((B=(fa=K==null?void 0:K.prop)==null?void 0:fa.split("."))==null?void 0:B[0])!==((Ua=(Ia=Q==null?void 0:Q.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])?K.endChildMenu=(Ka=(sl=Q==null?void 0:Q.value)==null?void 0:sl.split(" "))==null?void 0:Ka[0]:K.endChildMenu=(ul=(Ba=Q==null?void 0:Q.endChildMenu)==null?void 0:Ba.split(" "))==null?void 0:ul[0])});let ke=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",ge=T,Ye=ae.value;if(Ye!=null&&Ye.find(Q=>(K==null?void 0:K.prop)===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>(K==null?void 0:K.prop)!==(Q==null?void 0:Q.key))),Ye!=null&&Ye.find(Q=>oe===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>oe!==(Q==null?void 0:Q.key))),(K==null?void 0:K.formType)==="Select"?ge=ge==null?void 0:ge.map(Q=>{var He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl;return(Q==null?void 0:Q.type)==="Select"&&(((He=Q==null?void 0:Q.allSelectionContents)==null?void 0:He.length)>0&&(Q.contactValue=f),((K==null?void 0:K.prop)===(Q==null?void 0:Q.prop)||oe===(Q==null?void 0:Q.prop))&&K&&(Array.isArray(K.value)&&((fa=K.value)==null?void 0:fa.length)>0&&((B=K.value)!=null&&B.every(Il=>typeof Il=="string"))?(Ye.push({key:Q==null?void 0:Q.prop,value:[(Ua=K.value)==null?void 0:Ua[((Ia=K.value)==null?void 0:Ia.length)-1]]}),Q.selectValue=(sl=Ye==null?void 0:Ye.find(Il=>(Il==null?void 0:Il.key)===(Q==null?void 0:Q.prop)))==null?void 0:sl.value):Array.isArray(K.value)&&((Ka=K.value)==null?void 0:Ka.length)===0?(Ye=[],Q.selectValue=[],f[Q==null?void 0:Q.prop]=""):Array.isArray(Q.value)&&Ye.push({key:Q==null?void 0:Q.prop,value:[(Ba=Q.value)==null?void 0:Ba[(Q==null?void 0:Q.length)-1]]})),((Wl=Q==null?void 0:Q.menus)==null?void 0:Wl[((ul=Q==null?void 0:Q.menus)==null?void 0:ul.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((qa=Q==null?void 0:Q.prop)!=null&&qa.includes(".")&&(($a=(Dl=Q==null?void 0:Q.prop)==null?void 0:Dl.split("."))==null?void 0:$a[0])!==((nl=($l=K==null?void 0:K.prop)==null?void 0:$l.split("."))==null?void 0:nl[0])||(Q.endChildMenu=(fl=ke==null?void 0:ke.split(" "))==null?void 0:fl[0]))),Q.value=(f==null?void 0:f[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q}):(K==null?void 0:K.formType)!=="Input"&&(ge=ge==null?void 0:ge.map(Q=>(Q.value=(f==null?void 0:f[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q))),ae.value=Ye,ge!=null&&ge.some(Q=>(Q==null?void 0:Q.functionName)&&(Q==null?void 0:Q.functionName)!=="")){let Q=await Ct([f],q==null?void 0:q.value,"Auto",De.value),He=[];(tl=ge==null?void 0:ge.filter(B=>(B==null?void 0:B.functionName)&&(B==null?void 0:B.functionName)!==""))==null||tl.forEach(B=>{var Ia;((Ia=B==null?void 0:B.functionRelatedWords)==null?void 0:Ia.length)>0&&(He=[...He,...B==null?void 0:B.functionRelatedWords])}),He=He==null?void 0:He.filter(B=>(B==null?void 0:B[0])!=="@");let fa=[];for(let B in Q==null?void 0:Q[0])He!=null&&He.find(Ia=>B===Ia||(B==null?void 0:B.includes("."+Ia)))&&fa.push(((be=Q==null?void 0:Q[0])==null?void 0:be[B])!=="");(Q==null?void 0:Q.length)>0&&fa.every(B=>B)&&(ge=ge==null?void 0:ge.map(B=>{var Ia;return B.value=((Ia=Q==null?void 0:Q[0])==null?void 0:Ia[B==null?void 0:B.prop])??B.value,B})),lr.value=Q==null?void 0:Q[0]}if(me.value=ge,K=Object.assign({},K??{},{relatedWords:(xa=(Va=me==null?void 0:me.value)==null?void 0:Va.find(Q=>(Q==null?void 0:Q.prop)===(K==null?void 0:K.prop)))==null?void 0:xa.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let Q=K!=null&&K.relatedContents&&((Ya=K==null?void 0:K.relatedContents)==null?void 0:Ya.length)>0?(Ra=K==null?void 0:K.relatedContents)==null?void 0:Ra.find(He=>{var fa,B,Ia,Ua;return(He==null?void 0:He[(Ua=(fa=K==null?void 0:K.prop)==null?void 0:fa.split("."))==null?void 0:Ua[((Ia=(B=K==null?void 0:K.prop)==null?void 0:B.split("."))==null?void 0:Ia.length)-1]])===(K==null?void 0:K.value)}):await _s(K);if(Q&&JSON.stringify(Q)!=="{}"){let He=ge;He=He==null?void 0:He.map(B=>{var Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl,Il,gl,_r,pr,ir,xl,Yl,hr;if((K==null?void 0:K.prop)===(B==null?void 0:B.prop))B.value=(Q==null?void 0:Q[(Ia=B==null?void 0:B.words)==null?void 0:Ia.join(".")])??(Q==null?void 0:Q[B==null?void 0:B.prop])??Q[(Ba=(Ua=B==null?void 0:B.prop)==null?void 0:Ua.split("."))==null?void 0:Ba[((Ka=(sl=B==null?void 0:B.prop)==null?void 0:sl.split("."))==null?void 0:Ka.length)-1]];else if(K!=null&&K.relatedContents&&((ul=K==null?void 0:K.relatedContents)==null?void 0:ul.length)>0)B.value=(Wl=B==null?void 0:B.prop)!=null&&Wl.includes(".")&&((Dl=(qa=B==null?void 0:B.prop)==null?void 0:qa.split("."))==null?void 0:Dl[0])===(($l=($a=K==null?void 0:K.prop)==null?void 0:$a.split("."))==null?void 0:$l[0])?Q[(gl=(nl=B==null?void 0:B.prop)==null?void 0:nl.split("."))==null?void 0:gl[((Il=(fl=B==null?void 0:B.prop)==null?void 0:fl.split("."))==null?void 0:Il.length)-1]]:(Q==null?void 0:Q[B==null?void 0:B.prop])??(B==null?void 0:B.value);else if(le.same((K==null?void 0:K.menus)??[],(B==null?void 0:B.menus)??[])&&le.same((K==null?void 0:K.groups)??[],(B==null?void 0:B.groups)??[])&&!le.same((K==null?void 0:K.words)??[],(B==null?void 0:B.words)??[]))if((_r=B==null?void 0:B.prop)!=null&&_r.includes(".")&&((ir=(pr=B==null?void 0:B.prop)==null?void 0:pr.split("."))==null?void 0:ir[0])!==((Yl=(xl=K==null?void 0:K.prop)==null?void 0:xl.split("."))==null?void 0:Yl[0])){let Ll=Object.keys(Q);Ll=Ll==null?void 0:Ll.find(vr=>{var Er;return vr==null?void 0:vr.includes("."+((Er=B==null?void 0:B.words)==null?void 0:Er.join(".")))}),B.value=(Q==null?void 0:Q[Ll])??(Q==null?void 0:Q[B==null?void 0:B.prop])??B.value}else{let Ll=Object.keys(Q);Ll=Ll==null?void 0:Ll.find(vr=>{var Er;return vr==null?void 0:vr.includes("."+((Er=B==null?void 0:B.words)==null?void 0:Er.join(".")))}),B.value=(Q==null?void 0:Q[(hr=B==null?void 0:B.words)==null?void 0:hr.join(".")])??(Q==null?void 0:Q[Ll])??(Q==null?void 0:Q[B==null?void 0:B.prop])??B.value}else!(B!=null&&B.isMainPath)&&le.same((K==null?void 0:K.bindMenus)??[],(B==null?void 0:B.bindMenus)??[]),B.value=(Q==null?void 0:Q[B==null?void 0:B.prop])??B.value;return B}),me.value=He;let fa={};(Be=me.value)==null||Be.forEach(B=>{fa[B.prop]=B==null?void 0:B.value}),lr.value=fa}}En.value=!0,P.value=!1},Lu=f=>f?(f==null?void 0:f.toUpperCase())==="INPUT"?"TEXTAREA":f:"TEXTAREA",Ru=f=>{var T,ie;const v=(ie=(T=Qe.value)==null?void 0:T.find(oe=>(oe==null?void 0:oe.label)===(f==null?void 0:f.label)))==null?void 0:ie.multiple,z=f==null?void 0:f.prop;if((f==null?void 0:f.formType)!="Select")return;De.value.forEach(oe=>{const K=oe==null?void 0:oe[z];v&&To.isString(K)&&(oe[z]=[K]),!v&&!To.isString(K)&&(oe[z]="")})},Wt=(f,v)=>{var z;return v==null||v.forEach(L=>{f[L==null?void 0:L.prop]=L==null?void 0:L.value}),f.children&&((z=f.children)==null?void 0:z.length)>0&&(f.children=f.children.map(L=>Wt(L,v))),f},ht=f=>{var z,L,H,T,ie,oe;ji("");const v=(z=me.value)==null?void 0:z.reduce((K,ke)=>(K[ke.name]=ke.value,K),{});if(((L=Object.keys(v))==null?void 0:L.length)>0){lr.value=v,da.value="",ta.value=(H=De.value)==null?void 0:H.length,Fe.value=(T=Ne.value)==null?void 0:T.filter(ke=>(ke==null?void 0:ke.label)!=="新增");const K=(oe=(ie=ze.value)==null?void 0:ie.filter(ke=>(ke==null?void 0:ke.label)!=="操作"))==null?void 0:oe.map(ke=>{var Ye,qe,ra;const ge=(qe=(Ye=Qe.value)==null?void 0:Ye.find(_a=>(_a==null?void 0:_a.label)===(ke==null?void 0:ke.label)))==null?void 0:qe.multiple;return Ru(ke),{...ke,contents:(ke==null?void 0:ke.options)??[],optionUrl:ke!=null&&ke.formMenuSelect&&((ra=ke==null?void 0:ke.formMenuSelect)==null?void 0:ra.length)>0?{groupSelect:ke==null?void 0:ke.groupSelect,menuSelect:ke==null?void 0:ke.formMenuSelect,selectRelateType:"",type:ke==null?void 0:ke.formType,multiple:ge}:null}});q.value=K==null?void 0:K.map(ke=>Wt(ke,[{prop:"type",value:"edit"},{prop:"columnType",value:Lu(ke==null?void 0:ke.formType)||(ke==null?void 0:ke.columnType)}])),f==="createClick"&&(ya.value="新增",Ui(!0))}},Si={START:"开始时间",END:"结束时间",HOURS:"工时"},$u=(f,v)=>Number(M.dayjs(v).diff(M.dayjs(f),"day",!0).toFixed(1)),Kt=f=>{var T;const v=d.itemData,z=(T=v==null?void 0:v.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:T.contents,L=new Map;return z==null||z.forEach((ie,oe)=>{const{label:K}=ie;L.set(K,oe)}),!L.has(Si.START)||!L.has(Si.END)||!L.has(Si.HOURS)?f:f==null?void 0:f.map(ie=>{const oe=ie==null?void 0:ie[Si.START],K=ie==null?void 0:ie[Si.END],ke=$u(oe,K);return oe&&K&&(ie[Si.HOURS]=`${ke}天`),ie})},Gt=(f,v,z=0)=>{if(z>((v==null?void 0:v.length)??""))return f;const L=v==null?void 0:v[z],H=new Map;for(const ie of f){const oe=ie[L];H.has(oe)||H.set(oe,[]),H.get(oe)&&H.get(oe).push(ie)}const T=[];for(const[ie,oe]of H){const[K,...ke]=oe,ge={...K};z+1===((v==null?void 0:v.length)??"")?ge.children=oe==null?void 0:oe.map(Ye=>(Ye.level=M.cloneDeep(z)+1,Ye)).filter((Ye,qe)=>qe!==0):ke.length>0&&(ge.children=Gt(ke,v,z+1)),ge.level=z,T.push(ge)}return T},Yt=(f,v,z)=>{var H;if(!(v!=null&&v.contents)||((H=v==null?void 0:v.contents)==null?void 0:H.length)===0)return f;let L=[];return L=Gt(f,v==null?void 0:v.contents,0),L},Jt=async(f,v)=>{var il,Sa,tl,be,Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l,nl,fl,Il,gl,_r,pr,ir,xl,Yl,hr,Ll,vr,Er,mr,Ar,tn,fr,Mr,Fr,Zt,Qt,es,as,ls,rs;const z=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="header");f==null||f.filter(oa=>(oa==null?void 0:oa.key)==="tableIndexColumn")[0];const L=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="childTree")[0];let H=!0;if((tl=(Sa=(il=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="filterAllType"))==null?void 0:il.value)==null?void 0:Sa.find(oa=>(oa==null?void 0:oa.value)==="onPamButtonContents"))!=null&&tl.content){let oa=(xa=(Va=(be=f==null?void 0:f.find(Ml=>(Ml==null?void 0:Ml.key)==="filterAllType"))==null?void 0:be.value)==null?void 0:Va.find(Ml=>(Ml==null?void 0:Ml.value)==="onPamButtonContents"))==null?void 0:xa.content;oa=(Ya=oa==null?void 0:oa.split(":"))==null?void 0:Ya[1],oa=(Ra=oa.slice(1,(oa==null?void 0:oa.length)-1))==null?void 0:Ra.split(","),H=!!(oa!=null&&oa.find(Ml=>Ml==="操作"))}const T=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="page"),ie=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="rowButton"),oe=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="extraButton"),K=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="tableContents"),ke=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="bottomButton");let ge=[],Ye=(Be=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="filter"))==null?void 0:Be[0];Ye=(Ye==null?void 0:Ye.contents)??"",Ye=I0(Ye),(Ye==null?void 0:Ye.length)>0&&(u.value=Ye);const qe=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="tableIndex");Qe.value=(He=(Q=f==null?void 0:f.filter(oa=>(oa==null?void 0:oa.key)==="tableToForm"))==null?void 0:Q[0])==null?void 0:He.contents,je.value=(T==null?void 0:T.contents)??!0;let ra=[];rr.value===""?ra=z==null?void 0:z[0]:ra=(z==null?void 0:z.find(oa=>(oa==null?void 0:oa.selectLabel)==="("+rr.value+")"))??(z==null?void 0:z.find(oa=>!(oa!=null&&oa.selectLabel)));let _a=[];rr.value===""?_a=qe==null?void 0:qe[0]:_a=(qe==null?void 0:qe.find(oa=>(oa==null?void 0:oa.selectLabel)==="("+rr.value+")"))??(qe==null?void 0:qe.find(oa=>!(oa!=null&&oa.selectLabel)));let za=[],Ma=[];if(((fa=ra==null?void 0:ra.contents)==null?void 0:fa.length)>0){let oa=[],Ml=ra==null?void 0:ra.contents;if(Array.isArray(Ml==null?void 0:Ml[0])&&((B=Ml==null?void 0:Ml[0])!=null&&B.every(Za=>!(Za!=null&&Za.children)))&&(Ml=Ml==null?void 0:Ml[0]),Ml.some(Za=>Array.isArray(Za)&&(Za==null?void 0:Za.find(Xe=>Xe.children))))oa=(Ia=le.getGradeColumns(Ml,H))==null?void 0:Ia[0],oa!=null&&oa.find(Za=>(Za==null?void 0:Za.label)==="操作")||oa.push({label:"操作",prop:"operate",type:"operate"});else{let Za=Ml.some(Xe=>Array.isArray(Xe))?Ml==null?void 0:Ml[0]:Ml;Za!=null&&Za.find(Xe=>(Xe==null?void 0:Xe.label)==="操作")||Za.push({label:"操作",prop:"operate",type:"operate"}),Za==null||Za.forEach((Xe,yr)=>{var an,nn,Wr,di,Ei,Ci,Ir,Rn,Qn,Di,Sn,ei,ns,is,os,ts,ss,cs,us,ds,ps;if((nn=(an=de.value)==null?void 0:an.split("/"))==null||nn.forEach(kr=>{var zr,jn,fs;kr!==""&&((fs=(jn=(zr=kr==null?void 0:kr.split(I+"updateLoading"))==null?void 0:zr[0])==null?void 0:jn.split(I+"loading"))==null||fs[0])}),Xe!=null&&Xe.methodContent){let kr=(Ei=(di=(Wr=Xe==null?void 0:Xe.methodContent)==null?void 0:Wr.replace("@","%%#"))==null?void 0:di.split("%%#"))==null?void 0:Ei[1];if(kr=kr==null?void 0:kr.slice(0,(kr==null?void 0:kr.length)-1),kr=le.contentTransArrayToAllNoExtra(kr??"",","),(Ci=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("@Button")))!=null&&Ci.includes("Prop")&&((Ir=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("Type")))!=null&&Ir.includes("Manual"))){let zr=(Qn=(Rn=kr==null?void 0:kr.find(jn=>jn==null?void 0:jn.includes("@Button")))==null?void 0:Rn.split(":"))==null?void 0:Qn[1];zr=((ei=(Sn=(Di=zr==null?void 0:zr.replaceAll("[",""))==null?void 0:Di.replaceAll("]",""))==null?void 0:Sn.split(","))==null?void 0:ei[1])??"算法执行",za.push(zr)}else if((ns=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("@Button")))!=null&&ns.includes("Row")&&((is=kr==null?void 0:kr.find(zr=>zr==null?void 0:zr.includes("Type")))!=null&&is.includes("Manual"))){let zr=(ts=(os=kr==null?void 0:kr.find(jn=>jn==null?void 0:jn.includes("@Button")))==null?void 0:os.split(":"))==null?void 0:ts[1];zr=((us=(cs=(ss=zr==null?void 0:zr.replaceAll("[",""))==null?void 0:ss.replaceAll("]",""))==null?void 0:cs.split(","))==null?void 0:us[1])??"算法执行",Ma.push(zr)}}(ds=Qe.value)==null||ds.find(kr=>(kr==null?void 0:kr.prop)===(Xe==null?void 0:Xe.prop));let cn=((ps=Xe==null?void 0:Xe.filter)==null?void 0:ps.includes("@EditRead=Read"))??!1;oa.push({label:(Xe==null?void 0:Xe.label)==="操作"?H?"操作":"":(Xe==null?void 0:Xe.label)??"",prop:(Xe==null?void 0:Xe.label)==="操作"?"operate":(Xe==null?void 0:Xe.prop)??"a"+yr,width:Xe!=null&&Xe.width?parseInt(Xe.width):"",fixed:(Xe==null?void 0:Xe.fixed)??void 0,sortable:(Xe==null?void 0:Xe.sortable)??!1,filterable:(Xe==null?void 0:Xe.filterable)??!1,operable:(Xe==null?void 0:Xe.operable)??!1,showSummary:(Xe==null?void 0:Xe.showSummary)??!1,align:(Xe==null?void 0:Xe.align)??"left",showOverflowTooltip:(Xe==null?void 0:Xe.showOverflowTooltip)??!0,isNotDrag:(Xe==null?void 0:Xe.isNotDrag)??!1,isEditCol:(Xe==null?void 0:Xe.isEditCol)??!1,isOperate:(Xe==null?void 0:Xe.isOperate)??!1,id:(Xe==null?void 0:Xe.id)??yr,type:(Xe==null?void 0:Xe.label)==="操作"?"operate":void 0,formType:(Xe==null?void 0:Xe.formType)??(Xe!=null&&Xe.groupSelect?"Select":""),disabled:Xe==null?void 0:Xe.disabled,options:(Xe==null?void 0:Xe.options)??[],value:(Xe==null?void 0:Xe.value)??"",isExistChild:(Xe==null?void 0:Xe.isExistChild)??!1,mainKey:(Xe==null?void 0:Xe.mainKey)??yr===0,allSelectionContents:(Xe==null?void 0:Xe.allContents)??[],filterContent:Xe==null?void 0:Xe.filterContents,menus:Xe==null?void 0:Xe.menus,groups:Xe==null?void 0:Xe.groups,words:Xe==null?void 0:Xe.words,filter:Xe==null?void 0:Xe.filter,bindMenus:Xe==null?void 0:Xe.bindMenus,fatherPath:Xe==null?void 0:Xe.fatherPath,isMainPath:Xe==null?void 0:Xe.isMainPath,required:(Xe==null?void 0:Xe.required)??!1,relatedContents:Xe==null?void 0:Xe.relatedContents,functionName:Xe==null?void 0:Xe.functionName,functionRelatedWords:Xe==null?void 0:Xe.functionRelatedWords,calculatorFilter:Xe==null?void 0:Xe.calculatorFilter,relatedPages:Xe==null?void 0:Xe.relatedPages,multiple:(Xe==null?void 0:Xe.multiple)??!1,multipleLimit:Xe==null?void 0:Xe.multipleLimit,isReadonly:cn})})}oa=oa==null?void 0:oa.filter(Za=>{var Xe;return!((Xe=Za==null?void 0:Za.filter)!=null&&Xe.includes("@ShowHide=Hide"))}),O.value=(Ua=ke==null?void 0:ke[0])==null?void 0:Ua.contents;const sn=le.getNewColumnChild(oa);ge=le.getColumnChild(sn);const Zn=Za=>Array.isArray(Za)?Za.map(Xe=>(Array.isArray(Xe==null?void 0:Xe.children)&&Xe.children.length>0?(Xe.sortable=!1,Zn(Xe.children)):(Xe==null?void 0:Xe.prop)==="operate"||(Xe==null?void 0:Xe.label)==="操作"||(Xe==null?void 0:Xe.type)==="operate"||(Xe.sortable=!1),Xe)):Za;Zn(sn),await Xo(sn),P0(Z.value,sn),q.value=sn,j.value=sn,r.value=(sl=q.value)==null?void 0:sl.map(Za=>Za==null?void 0:Za.label);let Pr=(Ba=(Ka=le.getAllLeafNodes(q.value))==null?void 0:Ka.filter(Za=>(Za==null?void 0:Za.type)!=="operate"))==null?void 0:Ba.map((Za,Xe)=>({prop:(Za==null?void 0:Za.prop)??"a"+Xe,column:Za.label}));tr.value=Pr;let Jr=[];rr.value===""?Jr=K==null?void 0:K[0]:Jr=(K==null?void 0:K.find(Za=>(Za==null?void 0:Za.selectLabel)==="("+rr.value+")"))??(K==null?void 0:K.find(Za=>!(Za!=null&&Za.selectLabel)));let jr=Array.isArray((ul=Jr==null?void 0:Jr.contents)==null?void 0:ul[0])&&((Wl=Jr==null?void 0:Jr.contents)!=null&&Wl[0].every(Za=>Array.isArray(Za)))?(qa=Jr==null?void 0:Jr.contents)==null?void 0:qa[0]:Jr==null?void 0:Jr.contents;_a!=null&&_a.contents&&((Dl=_a==null?void 0:_a.contents)==null?void 0:Dl.length)!==0&&(jr=($a=M.cloneDeep(jr))==null?void 0:$a.map((Za,Xe)=>{if(!Array.isArray(Za)){let yr={};for(let cn in Za)cn!=="id"&&cn!=="index"&&(yr[cn]=Za[cn]);Za=Object.values(yr)}return Za}));const ho=!!(($l=q.value)!=null&&$l.find(Za=>Za.prop==="index"));jr=Sc(jr,_a==null?void 0:_a.contents,ho);const qn=[];jr==null||jr.forEach((Za,Xe)=>{var cn;let yr={};if(Array.isArray(Za)){let an=[];Za==null||Za.filter(nn=>!(nn!=null&&nn.id)).forEach((nn,Wr)=>{var di,Ei,Ci,Ir,Rn,Qn;if((di=Pr==null?void 0:Pr[Wr])!=null&&di.prop&&!Array.isArray(nn)){let Di={};Di[Pr[Wr].column]=nn,V!=null&&V.value&&((Ei=V==null?void 0:V.value)==null?void 0:Ei.length)>0&&((Ci=V==null?void 0:V.value)!=null&&Ci.find(Sn=>JSON.stringify(Sn==null?void 0:Sn[0])===JSON.stringify(Di)))&&(an=(Ir=V==null?void 0:V.value)==null?void 0:Ir.find(Sn=>JSON.stringify(Sn==null?void 0:Sn[0])===JSON.stringify(Di))),an&&an.length>0?yr[Pr[Wr].prop]=an!=null&&an.find(Sn=>{var ei;return((ei=Object.keys(Sn))==null?void 0:ei[0])===Pr[Wr].column})?(Rn=an==null?void 0:an.find(Sn=>{var ei;return((ei=Object.keys(Sn))==null?void 0:ei[0])===Pr[Wr].column}))==null?void 0:Rn[Pr[Wr].column]:nn:yr[Pr[Wr].prop]=nn}else Array.isArray(nn)&&((Qn=Pr[Wr])!=null&&Qn.prop?yr[Pr[Wr].prop]=nn:yr.children=Dt(nn,Pr))})}else yr=Za;if(Array.isArray(Za)&&Za.some(an=>an==null?void 0:an.id)){const an=(cn=Za==null?void 0:Za.find(nn=>nn.id))==null?void 0:cn.id;qn.push(Object.assign(yr,{id:to(an)}))}else yr.id?qn.push(yr):qn.push(Object.assign(yr,{id:Xe.toString()}))});try{const Za=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Xe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),yr=Za==null?void 0:Za.tableId,cn=Za==null?void 0:Za.compIndex;if(yr&&Array.isArray(Xe)&&Xe.length>0&&String(yr)===String(d==null?void 0:d.parentTableId)&&String(cn)===String(d==null?void 0:d.index)){const an=new Set(qn.map(Wr=>String(Wr==null?void 0:Wr.id))),nn=Xe.filter(Wr=>!an.has(String(Wr)));if(nn.length>0){const Wr=Za==null?void 0:Za.pageKey,di=Wr!=null&&Wr.startsWith("/")?Wr.substring(1):Wr;((v==null?void 0:v[Wr])||(v==null?void 0:v[di])||[]).filter(Ir=>{var Rn,Qn;return((Rn=Ir==null?void 0:Ir.key)==null?void 0:Rn.type)==="data"&&String((Qn=Ir==null?void 0:Ir.key)==null?void 0:Qn.tableId)===String(yr)&&nn.includes(Ir==null?void 0:Ir.id)}).forEach(Ir=>{var Rn;an.has(String(Ir==null?void 0:Ir.id))||(qn.push({id:Ir==null?void 0:Ir.id,...((Rn=Ir==null?void 0:Ir.value)==null?void 0:Rn.tableData)||{}}),an.add(String(Ir==null?void 0:Ir.id)))})}}}catch{}let Wn=null;try{const Za=`ocr_committed_temp_ids_v1:${String((d==null?void 0:d.parentTableId)??"")}:${String((d==null?void 0:d.index)??"")}`,Xe=JSON.parse(sessionStorage.getItem(Za)||"null");Array.isArray(Xe)&&Xe.length>0&&(Wn=new Set(Xe.map(yr=>String(yr))))}catch{}const qi=Array.from(((nl=Na.value)==null?void 0:nl.values())||[]).filter(Za=>!(!(Za!=null&&Za._isOCRRow&&(Za==null?void 0:Za._ocrTableId)===(d==null?void 0:d.index))||Wn&&Wn.has(String(Za==null?void 0:Za.id)))),vo=(De.value||[]).map(Za=>String(Za==null?void 0:Za.id)),er=wi(qn,vo);if(De.value=Yt(er,L,q.value),Fa.value=er,(fl=Fa.value)==null||fl.forEach(Za=>{var Xe;(Xe=Na.value)==null||Xe.set(Za.id,Za)}),Wn&&Wn.size>0)try{const Za=new Set(Array.from(Wn.values()));De.value=(De.value||[]).filter(Xe=>!Za.has(String(Xe==null?void 0:Xe.id))),Fa.value=(Fa.value||[]).filter(Xe=>!Za.has(String(Xe==null?void 0:Xe.id))),Za.forEach(Xe=>{var yr,cn;try{(cn=(yr=Na.value)==null?void 0:yr.delete)==null||cn.call(yr,Xe)}catch{}})}catch{}const en=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),vt=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(en&&Array.isArray(vt)&&vt.length>0&&String(en==null?void 0:en.compIndex)===String(d==null?void 0:d.index)){const Za=new Set((Fa.value||[]).map(Xe=>String(Xe==null?void 0:Xe.id)));vt.filter(Xe=>!Za.has(String(Xe)))}if(qi.length>0){const Za=new Set((De.value||[]).map(yr=>yr==null?void 0:yr.id)),Xe=qi.filter(yr=>!Za.has(yr.id));Xe.length>0&&(De.value=[...De.value||[],...Xe],Fa.value=[...Fa.value||[],...Xe],Xe.forEach(yr=>{var cn;return(cn=Na.value)==null?void 0:cn.set(yr.id,yr)}))}}else q.value=[],ze.value=[],De.value=[],Fa.value=[],Na.value=new Map;if(Ma=[...new Set(Ma)],Ma=Ma==null?void 0:Ma.map(oa=>({label:oa,type:"methodButton"})),((Il=ie==null?void 0:ie.contents)==null?void 0:Il.length)>0?Da.value=ie==null?void 0:ie.contents:Da.value=[],Da.value=[...Da.value,...Ma],za=[...new Set(za)],za=za==null?void 0:za.map(oa=>({label:oa,type:"methodButton"})),((gl=oe==null?void 0:oe.contents)==null?void 0:gl.length)>0)if((ir=(pr=(_r=f==null?void 0:f.find(oa=>(oa==null?void 0:oa.key)==="filterAllType"))==null?void 0:_r.value)==null?void 0:pr.find(oa=>(oa==null?void 0:oa.value)==="onButtonContents"))!=null&&ir.content){let oa=(hr=(Yl=(xl=f==null?void 0:f.find(Ml=>(Ml==null?void 0:Ml.key)==="filterAllType"))==null?void 0:xl.value)==null?void 0:Yl.find(Ml=>(Ml==null?void 0:Ml.value)==="onButtonContents"))==null?void 0:hr.content;if(oa=(Ll=oa==null?void 0:oa.split(":"))==null?void 0:Ll[1],oa=(vr=oa.slice(1,(oa==null?void 0:oa.length)-1))==null?void 0:vr.split(","),Fe.value=(Er=oe==null?void 0:oe.contents)==null?void 0:Er.filter(Ml=>oa==null?void 0:oa.find(sn=>sn===(Ml==null?void 0:Ml.label))),Ne.value=(mr=oe==null?void 0:oe.contents)==null?void 0:mr.filter(Ml=>oa==null?void 0:oa.find(sn=>sn===(Ml==null?void 0:Ml.label))),(Ar=oe==null?void 0:oe.contents)!=null&&Ar.some(Ml=>(Ml==null?void 0:Ml.label)==="OCR识别")&&!((tn=Fe.value)!=null&&tn.some(Ml=>(Ml==null?void 0:Ml.label)==="OCR识别"))){const Ml=(fr=oe==null?void 0:oe.contents)==null?void 0:fr.find(sn=>(sn==null?void 0:sn.label)==="OCR识别");Fe.value=[...Fe.value,Ml],Ne.value=[...Ne.value,Ml]}D.value=!!(oa!=null&&oa.find(Ml=>Ml==="搜索")),re.value=!!(oa!=null&&oa.find(Ml=>Ml==="块状显示"))}else Fe.value=oe==null?void 0:oe.contents,Ne.value=oe==null?void 0:oe.contents;else Fe.value=[],Ne.value=[];if(Fe.value=[...Fe.value,...za],Ne.value=[...Ne.value,...za],typeof de.value=="string"&&de.value==="设备管理/试验设备"&&(d==null?void 0:d.compName)==="设备列表"?((Mr=Fe.value)!=null&&Mr.some(oa=>(oa==null?void 0:oa.label)==="OCR识别")||(Fe.value=[...Fe.value||[],{label:"OCR识别"}]),(Fr=Ne.value)!=null&&Fr.some(oa=>(oa==null?void 0:oa.label)==="OCR识别")||(Ne.value=[...Ne.value||[],{label:"OCR识别"}])):(Fe.value=(Fe.value||[]).filter(oa=>(oa==null?void 0:oa.label)!=="OCR识别"),Ne.value=(Ne.value||[]).filter(oa=>(oa==null?void 0:oa.label)!=="OCR识别")),(Zt=Fe.value)!=null&&Zt.some(oa=>(oa==null?void 0:oa.label)==="切换视图")||(Fe.value=[...Fe.value||[],{label:"切换视图"}]),(Qt=Ne.value)!=null&&Qt.some(oa=>(oa==null?void 0:oa.label)==="切换视图")||(Ne.value=[...Ne.value||[],{label:"切换视图"}]),ge!=null&&ge.some(oa=>{var Ml;return(oa==null?void 0:oa.calculatorFilter)&&((Ml=oa==null?void 0:oa.calculatorFilter)==null?void 0:Ml.includes("@Button"))})){let oa=(es=ge==null?void 0:ge.filter(Pr=>{var Jr;return(Pr==null?void 0:Pr.calculatorFilter)&&((Jr=Pr==null?void 0:Pr.calculatorFilter)==null?void 0:Jr.includes("@Button"))}))==null?void 0:es.map(Pr=>Pr==null?void 0:Pr.calculatorFilter),Ml=[],sn=[],Zn=[];oa==null||oa.forEach(Pr=>{var ho,qn,Wn,qi,vo;let Jr=(ho=le.analyzeSplitToContent(Pr,","))==null?void 0:ho.map(er=>((er==null?void 0:er[(er==null?void 0:er.length)-1])===","&&(er=er==null?void 0:er.slice(0,(er==null?void 0:er.length)-1)),er)),jr=Jr==null?void 0:Jr.find(er=>er==null?void 0:er.includes("@Button"));if(Jr!=null&&Jr.find(er=>er==null?void 0:er.includes("Manual"))){jr=(Wn=(qn=jr==null?void 0:jr.replace("=","$R"))==null?void 0:qn.split("$R"))==null?void 0:Wn[1],jr=jr==null?void 0:jr.slice(1,(jr==null?void 0:jr.length)-1);let er=(qi=le.analyzeSplitToContent(jr,","))==null?void 0:qi.map(en=>((en==null?void 0:en[(en==null?void 0:en.length)-1])===","&&(en=en==null?void 0:en.slice(0,(en==null?void 0:en.length)-1)),en));er=er==null?void 0:er[0],er=er==null?void 0:er.slice(1,(er==null?void 0:er.length)-1),er=(vo=er==null?void 0:er.split(","))==null?void 0:vo.map(en=>({label:en,prop:en})),jr!=null&&jr.includes("Up")?Ml=[...Ml,...er??[]]:jr!=null&&jr.includes("Line")?sn=[...sn,...er??[]]:Zn=[...Zn,...er??[]]}}),Fe.value=[...Ml,...Fe.value??[]],Da.value=[...sn,...Da.value??[]],Zn.value=[...Zn,...Zn.value??[]]}ta.value=((as=De==null?void 0:De.value)==null?void 0:as.length)??0,Kt(De.value),Xl.value=De.value,Kl.value&&(q.value=(rs=(ls=ze.value)==null?void 0:ls.filter(oa=>(oa==null?void 0:oa.label)!=="操作"))==null?void 0:rs.map(oa=>{var Ml;return{...oa,type:"edit",optionUrl:oa!=null&&oa.formMenuSelect&&((Ml=oa==null?void 0:oa.formMenuSelect)==null?void 0:Ml.length)>0?{groupSelect:oa==null?void 0:oa.groupSelect,menuSelect:oa==null?void 0:oa.formMenuSelect,selectRelateType:"",type:oa==null?void 0:oa.formType}:null}}),ht())};e.watch(()=>[d.itemData,rr.value,Nr.value,El.value,V==null?void 0:V.value],async()=>{var f,v,z,L,H,T;if((f=d==null?void 0:d.itemData)!=null&&f.find(ie=>(ie==null?void 0:ie.key)==="columnPath")&&!((v=ce.value)!=null&&v.find(ie=>{var oe,K;return(ie==null?void 0:ie.key)===((K=(oe=d==null?void 0:d.itemData)==null?void 0:oe.find(ke=>(ke==null?void 0:ke.key)==="columnPath"))==null?void 0:K.contents)}))){let ie=ce.value,oe={key:(L=(z=d==null?void 0:d.itemData)==null?void 0:z.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:L.contents,value:(T=(H=d==null?void 0:d.itemData)==null?void 0:H.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:T.contents};ie!=null&&ie.find(K=>(K==null?void 0:K.key)===(oe==null?void 0:oe.key))?ie=ie==null?void 0:ie.map(K=>((K==null?void 0:K.key)===(oe==null?void 0:oe.key)&&(K.value=oe.value),K)):ie.push(oe),Ge.setTableViewContents(ie)}await Jt(d.itemData,d.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.operatingForm,f=>{f!=null&&f.form&&(ji(f==null?void 0:f.form),ya.value=f==null?void 0:f.dialogTitle,Te.value=!0,Ze.value=!0)},{immediate:!0,deep:!0});const Vu=()=>{var f;(f=Y.value)!=null&&f.includes("read")&&(Kl.value=!Kl.value)},Fu=()=>{on.value=!on.value};e.watch(()=>{var f;return(f=d==null?void 0:d.config)==null?void 0:f.viewport},f=>{var v;Y.value=f,(f==null?void 0:f.length)===0?Kl.value=!1:(f!=null&&f.includes("read")||(Kl.value=!0),f!=null&&f.includes("edit")||(Kl.value=!1)),w.value=((v=d==null?void 0:d.config)==null?void 0:v.showIndex)||Kl.value},{immediate:!0}),e.watch(()=>Kl.value,f=>{var v;f?(ht("viewChange"),Ge.setCacheUpdatingData(null)):(Fe.value=Ne.value,q.value=j.value,ee.value&&(Ge.setTableLoading(d==null?void 0:d.index),U("change",ee.value))),w.value=f||((v=d==null?void 0:d.config)==null?void 0:v.showIndex),Rr.value=[]},{immediate:!0}),e.watch(()=>{var f;return(f=On.value)==null?void 0:f.length},f=>{f===0&&(fe.currentPage=1)}),e.watch(()=>d==null?void 0:d.compNames,f=>{G.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:f||[],width:1}]},{immediate:!0}),e.ref(!1);const Pu=(f,v)=>{var z;ht("createClick"),v===fe.pageSize&&(fe.currentPage=Math.ceil(((z=De.value)==null?void 0:z.length)/fe.pageSize))},ju=async(f,v,z)=>{var H,T,ie,oe,K;const L=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(L&&po.includes(L)&&z!==void 0&&z!==null&&String(z).trim()!==""){const ke=String(z).trim();if(await ft(ke,f==null?void 0:f.id)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ye=(H=De.value)==null?void 0:H.findIndex(ra=>(ra==null?void 0:ra.id)===(f==null?void 0:f.id)),qe=Ye!==-1?(ie=(T=De.value)==null?void 0:T[Ye])==null?void 0:ie[L]:void 0;L&&(f[L]=qe??"");return}}if(Kl.value){const ke=f==null?void 0:f.id;ke!=null&&(p.value.has(ke)||p.value.set(ke,M.cloneDeep(f)),o.value.add(ke));const ge=(oe=De.value)==null?void 0:oe.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(f==null?void 0:f.id));ge!==-1&&L&&(De.value[ge]={...De.value[ge],[L]:z}),fo(z,f,v);return}fo(z,f,v),lr.value=M.cloneDeep(f),da.value=f==null?void 0:f.id,ta.value=(K=De.value)==null?void 0:K.length,ya.value=f!=null&&f._isTemp?"新增":"编辑",Ui(!1)},Hu=async()=>{var f,v;try{const z=[];if(d!=null&&d.related&&Array.isArray(d.related)&&(console.log("props.related",d.related),d.related.forEach(L=>{if(typeof L=="string"&&L.includes("content_")){const H=L.split("_")[1];H&&(z.push(`content_${H}`),z.push(`struct_${H}`))}})),z.length===0&&(d!=null&&d.itemData)){const L=(v=(f=d.itemData)==null?void 0:f.find(H=>(H==null?void 0:H.key)==="contentTableId"))==null?void 0:v.contents;L&&(z.push(`content_${L}`),z.push(`struct_${L}`))}return z}catch(z){return console.error("获取 tableNames 失败:",z),[]}},Uu=async(f,v,z)=>{var T,ie;if(!z||typeof z!="string"||z.trim()===""){const oe=(v==null?void 0:v.property)??(v==null?void 0:v.prop),K=`${f==null?void 0:f.id}:${oe}`;m.value.delete(K),y.value.set(K,!1);return}const L=(v==null?void 0:v.property)??(v==null?void 0:v.prop),H=`${f==null?void 0:f.id}:${L}`;y.value.set(H,!0);try{const oe=await Hu();if(oe.length===0){console.warn("未找到同名表,跳过全局搜索"),m.value.delete(H),y.value.set(H,!1);return}const K=parseInt((T=wl.value)==null?void 0:T.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),m.value.delete(H),y.value.set(H,!1);return}const ke=await M.getAllTables({platId:K,tableNames:oe??[]}),ge=((ie=ke==null?void 0:ke.data)==null?void 0:ie.result)||[],Ye=[],qe=[];for(let ra=0;ra<ge.length;ra+=2)ra+1<ge.length&&qe.push([ge[ra],ge[ra+1]]);qe.forEach(([ra,_a])=>{var tl;if(!Array.isArray(ra)||ra.length===0||!Array.isArray(_a)||_a.length===0)return;const za=_a[0];let Ma=((tl=za==null?void 0:za.结构)==null?void 0:tl.contents)??[];if(!Array.isArray(Ma)||Ma.length===0)return;let na=M.cloneDeep(Ma);if(Array.isArray(na==null?void 0:na[0])&&(na=le.getColumnChild(na[0])),!Array.isArray(na)||na.length===0||!na.some(be=>(be==null?void 0:be.prop)===L))return;[...ra].sort((be,Va)=>{const xa=Number((be==null?void 0:be.update_time)??0);return Number((Va==null?void 0:Va.update_time)??0)-xa}).slice(0,20).forEach(be=>{const Va=be[L];if(Va!=null){const xa=String(Va);xa.toLowerCase().includes(z.toLowerCase())&&Ye.findIndex(Ra=>{var Be;return be.id&&((Be=Ra.rowData)==null?void 0:Be.id)===be.id?!0:Ra.label===xa})===-1&&Ye.push({label:xa,rowData:M.cloneDeep(be),sourceTable:(za==null?void 0:za.source_table)||""})}})}),m.value.set(H,Ye)}catch(oe){console.error("全局搜索建议失败:",oe),m.value.delete(H)}finally{y.value.set(H,!1)}},qu=(f,v,z)=>{if(!Kl.value)return;const L=(v==null?void 0:v.property)??(v==null?void 0:v.prop),H=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(H&&H.toUpperCase()!=="INPUT"&&H!=="")return;const T=`${f==null?void 0:f.id}:${L}`;if(g.has(T)&&clearTimeout(g.get(T)),!z||z.trim()===""){m.value.delete(T),y.value.set(T,!1);return}const ie=setTimeout(()=>{Uu(f,{prop:L,property:L},z),g.delete(T)},300);g.set(T,ie)};function Wu(f,v){const z=`${f==null?void 0:f.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return m.value.get(z)||[]}const Ku=(f,v,z)=>{var ke;if(!z||!z.rowData)return;const L=z.rowData,H=f==null?void 0:f.id,T=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(le.getAllLeafNodes(q.value)||[]).filter(ge=>(ge==null?void 0:ge.type)!=="operate"&&(ge==null?void 0:ge.label)!=="操作"&&(ge==null?void 0:ge.prop)!=="operate").forEach(ge=>{const Ye=ge==null?void 0:ge.prop;Ye&&L[Ye]!==void 0&&(f[Ye]=L[Ye])}),(ke=De.value)==null||ke.findIndex(ge=>(ge==null?void 0:ge.id)===H),H!=null&&(p.value.has(H)||p.value.set(H,M.cloneDeep(f)),o.value.add(H));const K=`${H}:${T}`;m.value.delete(K),y.value.set(K,!1),fo(f[T],f,v)},fn=f=>{var K,ke,ge,Ye,qe,ra,_a,za,Ma,na,il;const{row:v,column:z,item:L,slotData:H}=f;let T=v!=null&&v[z==null?void 0:z.prop]||(v==null?void 0:v[z==null?void 0:z.prop])===0?((ke=(K=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:K[0])==null?void 0:ke.contents)??((v==null?void 0:v[z==null?void 0:z.prop])===0?"0":v==null?void 0:v[z==null?void 0:z.prop]):((Ye=(ge=v==null?void 0:v[L==null?void 0:L.prop])==null?void 0:ge[0])==null?void 0:Ye.contents)??(v==null?void 0:v[L==null?void 0:L.prop])??((ra=(qe=H==null?void 0:H[L==null?void 0:L.prop])==null?void 0:qe[0])==null?void 0:ra.contents)??(H==null?void 0:H[L==null?void 0:L.prop])??((Ma=(za=v==null?void 0:v[(_a=L==null?void 0:L.child)==null?void 0:_a.prop])==null?void 0:za[0])==null?void 0:Ma.contents)??(v==null?void 0:v[(na=L==null?void 0:L.child)==null?void 0:na.prop]),oe=Array.isArray(T)&&!(T!=null&&T.every(Sa=>typeof Sa=="string"||typeof Sa=="number"))?"查看":T;if(oe=Array.isArray(oe)?oe.join(","):oe,(z==null?void 0:z.formType)==="Date")if(!oe||oe===""||oe===null||oe===void 0)oe="";else{const Sa=M.dayjs(oe,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);oe=Sa.isValid()?Sa.format("YYYYMMDD"):oe??""}return Array.isArray(z==null?void 0:z.relatedPages)&&((il=z==null?void 0:z.relatedPages)==null?void 0:il.length)>0&&(oe="详情页"),oe},Gu=f=>{var ke,ge,Ye,qe,ra,_a,za,Ma,na,il;const{row:v,column:z,item:L,slotData:H}=f;let T=v!=null&&v[z==null?void 0:z.prop]?((ge=(ke=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:ke[0])==null?void 0:ge.contents)??(v==null?void 0:v[z==null?void 0:z.prop]):((qe=(Ye=v==null?void 0:v[L==null?void 0:L.prop])==null?void 0:Ye[0])==null?void 0:qe.contents)??(v==null?void 0:v[L==null?void 0:L.prop])??((_a=(ra=H==null?void 0:H[L==null?void 0:L.prop])==null?void 0:ra[0])==null?void 0:_a.contents)??(H==null?void 0:H[L==null?void 0:L.prop])??((na=(Ma=v==null?void 0:v[(za=L==null?void 0:L.child)==null?void 0:za.prop])==null?void 0:Ma[0])==null?void 0:na.contents)??(v==null?void 0:v[(il=L==null?void 0:L.child)==null?void 0:il.prop]);const oe=Array.isArray(T)&&!(T!=null&&T.every(Sa=>typeof Sa=="string"||typeof Sa=="number")),K=Array.isArray(T)&&(T==null?void 0:T.find(Sa=>Sa==null?void 0:Sa.url));return oe&&K},Yu=f=>{var H,T,ie,oe;if(!(f!=null&&f.column))return!1;const v=de.value==="试验任务/任务管理",z=(d==null?void 0:d.compName)==="任务列表",L=((T=(H=f==null?void 0:f.column)==null?void 0:H.filter)==null?void 0:T.includes("@TextRGBA"))||((oe=(ie=f==null?void 0:f.column)==null?void 0:ie.filter)==null?void 0:oe.includes("@TextBackRGBA"));return v&&z||L},Ju=(f,v)=>f.find(z=>Object.values(z).some(L=>L===v));return e.watch(()=>Je.value,async f=>{if(f){Ie.setContentLoading(!0),await e.nextTick();const v=Ju(De.value,f==null?void 0:f.data);if(!v)return Ie.setContentLoading(!1);await uo(f==null?void 0:f.data,null,v,{data:f==null?void 0:f.data}),Ie.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.cacheNewData,f=>{var v;f&&(Array.isArray(f)?f.forEach(z=>{var L,H,T,ie,oe;if(换,String(z==null?void 0:z.compId)===String(d==null?void 0:d.index)&&(z!=null&&z.resId)&&((L=z==null?void 0:z.data)!=null&&L.id)){const K=(H=z==null?void 0:z.data)==null?void 0:H.id,ke=z==null?void 0:z.resId;if(De.value=(T=De.value)==null?void 0:T.map(ge=>{if((ge==null?void 0:ge.id)===K){const Ye={...ge,id:ke};return delete Ye._isOCRRow,delete Ye._ocrTableId,Ye}return ge}),(oe=(ie=Na.value)==null?void 0:ie.has)!=null&&oe.call(ie,K)){const Ye={...Na.value.get(K)||{},id:ke};delete Ye._isOCRRow,delete Ye._ocrTableId,Na.value.delete(K),Na.value.set(ke,Ye)}ar(d==null?void 0:d.index,K,ke)}}):String(f==null?void 0:f.compId)===String(d==null?void 0:d.index)&&(De.value=(v=De.value)==null?void 0:v.map(z=>{var L;if((z==null?void 0:z.id)===((L=f==null?void 0:f.data)==null?void 0:L.id)){const H={...z,id:f==null?void 0:f.resId};return delete H._isOCRRow,delete H._ocrTableId,H}return z})))},{immediate:!0,deep:!0}),(f,v)=>{var na,il,Sa,tl;const z=e.resolveComponent("svg-icon"),L=e.resolveComponent("el-popover"),H=e.resolveComponent("el-switch"),T=e.resolveComponent("el-checkbox"),ie=e.resolveComponent("el-radio"),oe=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-checkbox-group"),ke=e.resolveComponent("el-button"),ge=e.resolveComponent("el-icon"),Ye=e.resolveComponent("el-progress"),qe=e.resolveComponent("el-alert"),ra=e.resolveComponent("el-table-column"),_a=e.resolveComponent("el-table"),za=e.resolveComponent("el-upload"),Ma=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",N3,[$n.value?(e.openBlock(),e.createBlock(dl.ssTable,{id:"excel-table",pageObj:fe,showIndex:w.value,isTree:(na=a.compItem)==null?void 0:na.isTree,summaryInfo:ye,columns:q.value,defaultSort:ve,isCardViewport:on.value,checkedColumns:r.value,key:Ul.value+JSON.stringify(q.value),tableData:On.value,isEditViewport:Kl.value,isShowPagination:je.value,isShowEdit:!1,isShowDelete:!1,allowSelect:A.value,onDbClickRow:nt,extraButton:Fe.value,rowButton:Da.value,cacheExtraButtons:Ne.value,isClearSelection:((il=Rr.value)==null?void 0:il.length)===0,onDoCurrentChange:Po,onDoSizeChange:jo,onSortChange:Ho,onContentClick:uo,onRowClick:ot,onSelectChange:ki,onCellChange:ju,onCellInput:qu,onSelectSuggest:Ku,onChange:fo,onPreview:oo,onSubmitEditingTable:Vn,onHandleColEditChange:qo,onHandleColTypeChange:Wo,onClickButton:dt,onAddNewRow:Ko,bottomButton:O.value,allowRowAddOrDelete:rt.value},e.createSlots({headerButton:e.withCtx(be=>{var Va,xa,Ya,Ra;return[a.showHeader?(e.openBlock(),e.createBlock(e0,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ia)===e.unref(de),filterValues:co.value,selectNums:(Va=Rr.value)==null?void 0:Va.length,dataNums:(xa=De.value)==null?void 0:xa.length,compName:a.compName,isDevMode:a.isDevMode,buttons:be.buttons,menuFilter:(Ra=(Ya=a.compItem)==null?void 0:Ya.component)==null?void 0:Ra.menuFilter,onButtonClick:v[1]||(v[1]=(Be,Q,He)=>dt(Be,Q,{extra:He})),columns:q.value,onFilter:Pi,onGetImportData:dn,level:a.level,filterShow:D.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var be,Va,xa,Ya;return[((be=De.value)==null?void 0:be.length)>0&&a.allowOperate&&re.value?(e.openBlock(),e.createElementBlock("div",M3,[(Va=Y.value)!=null&&Va.includes("read")&&((xa=Y.value)!=null&&xa.includes("edit"))&&((Ya=Da.value)!=null&&Ya.some(Ra=>(Ra==null?void 0:Ra.label)==="编辑"))&&!on.value&&e.unref(ia)!==e.unref(de)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:Vu},[e.createVNode(z,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:be,index:Va})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:xa=>Pu(be,Va)},[e.createVNode(z,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,I3)]),operateCol:e.withCtx(()=>[e.createVNode(L,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Mu,onBeforeEnter:Iu},{reference:e.withCtx(()=>[e.createElementVNode("span",O3,[e.createVNode(z,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",L3,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(H,{"model-value":R.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=be=>Zo(be))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":v[3]||(v[3]=be=>r.value=be),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xn.value,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(T,{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,R3)]),_:2},1032,["value"]),e.createVNode(L,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Va;return[e.createElementVNode("div",$3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Va=Object.keys(be))==null?void 0:Va.filter(xa=>{var Ya;return(Ya=S.value)==null?void 0:Ya.find(Ra=>(Ra==null?void 0:Ra.value)===xa)}),xa=>{var Ya,Ra;return e.openBlock(),e.createElementBlock("div",{key:xa},[E[xa]=="radio"?(e.openBlock(),e.createElementBlock("div",V3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(oe,{"model-value":be==null?void 0:be[xa],onChange:Be=>Fi(Be,xa,be)},{default:e.withCtx(()=>{var Be,Q;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Q=(Be=S.value)==null?void 0:Be.find(He=>(He==null?void 0:He.value)===xa))==null?void 0:Q.options,He=>(e.openBlock(),e.createBlock(ie,{key:He==null?void 0:He.value,label:He==null?void 0:He.value,value:He==null?void 0:He.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(He==null?void 0:He.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),E[xa]=="switch"?(e.openBlock(),e.createBlock(H,{key:1,"model-value":be==null?void 0:be[xa],"active-text":(Ra=(Ya=S.value)==null?void 0:Ya.find(Be=>(Be==null?void 0:Be.value)===xa))==null?void 0:Ra.label,onChange:Be=>Fi(Be,xa,be)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",F3,[e.createVNode(z,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(be=>{var Va,xa,Ya,Ra,Be,Q,He,fa,B,Ia,Ua,sl,Ka,Ba,ul,Wl,qa,Dl,$a,$l;return[((Va=be==null?void 0:be.column)==null?void 0:Va.label)==="证书附件"||((xa=be==null?void 0:be.column)==null?void 0:xa.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",P3,[e.createVNode(z,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(nl=>Eu(be),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Gu(be)?(e.openBlock(),e.createBlock(L,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",j3,e.toDisplayString(fn(be)),1)]),default:e.withCtx(()=>{var nl,fl;return[e.createElementVNode("div",H3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((fl=be==null?void 0:be.row)==null?void 0:fl[(nl=be==null?void 0:be.column)==null?void 0:nl.prop],Il=>(e.openBlock(),e.createElementBlock("div",U3,[e.createElementVNode("div",{class:"prop-url",title:ti(Il),onClick:gl=>lt(Il)},e.toDisplayString(ti(Il)),9,q3),e.createElementVNode("div",{class:"prop-download",onClick:gl=>so(Il)}," 下载 ",8,W3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Yu(be)?(e.openBlock(),e.createBlock(od,{key:0,value:fn(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(fn(be))&&((Ra=(Ya=fn(be))==null?void 0:Ya.toString())!=null&&Ra.includes(".txt")||(Q=(Be=fn(be))==null?void 0:Be.toString())!=null&&Q.includes(".cpt")||(fa=(He=fn(be))==null?void 0:He.toString())!=null&&fa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(fn(be))&&((Ia=(B=fn(be))==null?void 0:B.toString())!=null&&Ia.includes(".txt")||(sl=(Ua=fn(be))==null?void 0:Ua.toString())!=null&&sl.includes(".cpt")||(Ba=(Ka=fn(be))==null?void 0:Ka.toString())!=null&&Ba.includes(".cyd"))?"underline":"",cursor:!Array.isArray(fn(be))&&((Wl=(ul=fn(be))==null?void 0:ul.toString())!=null&&Wl.includes(".txt")||(Dl=(qa=fn(be))==null?void 0:qa.toString())!=null&&Dl.includes(".cpt")||($l=($a=fn(be))==null?void 0:$a.toString())!=null&&$l.includes(".cyd"))?"pointer":"",marginLeft:(be==null?void 0:be.colIndex)===0?`${((be==null?void 0:be.level)??0)*20}px`:0}),onClick:nl=>{var fl;return $i(fn(be),((fl=be==null?void 0:be.column)==null?void 0:fl.relatedPages)??[])}},e.toDisplayString(fn(be)===0?"0":fn(be)),13,K3))],64))]}),_:2},[((Sa=Da.value)==null?void 0:Sa.length)>0?{name:"actions",fn:e.withCtx(({item:be,fIndex:Va})=>[e.createVNode(L,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(z,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",A3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ci(Da.value,be),(xa,Ya)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ya,onClick:e.withModifiers(Ra=>dt(xa==null?void 0:xa.label,be,{extra:xa}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:xa==null?void 0:xa.textColor}),class:"extra-button-label"},e.toDisplayString(xa==null?void 0:xa.label),5)],8,z3))),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),Kl.value?(e.openBlock(),e.createElementBlock("div",G3,[e.createVNode(ke,{id:"themeBorderButton",onClick:Yo},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(ke,{class:"ok-button",id:"themeButton",onClick:Vi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode($r.ssDialog,{title:ya.value,visible:Ze.value,width:Lr.value,onBeforeDestroy:Qo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Y3,[e.createVNode(dl.ssForm,{ref_key:"formRef",ref:Ae,rowContents:me.value,showOperator:!1,onChange:Ou,isEnableWrap:!1,layer:!0,onFixChangeValue:Pn,onClickTrigger:et,isEdit:ja.value,onBlurChange:Jo,onCreate:io,onTagChange:In},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Te.value?(e.openBlock(),e.createElementBlock("div",J3,[e.createVNode(ke,{onClick:v[4]||(v[4]=be=>Ze.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(ke,{class:"ok-button",onClick:v[5]||(v[5]=be=>Ui(!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($r.ssDialog,{title:ya.value,visible:pe.value,width:ua.value,onBeforeDestroy:v[7]||(v[7]=be=>pe.value=!1)},{default:e.withCtx(()=>[e.createVNode(h0)]),footer:e.withCtx(()=>[e.createElementVNode("div",X3,[e.createVNode(ke,{onClick:v[6]||(v[6]=be=>pe.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(ke,{class:"ok-button",onClick:tt,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),We.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:2,fileDataList:Oe.value,onDestroy:it},null,8,["fileDataList"])):e.createCommentVNode("",!0),te.value?(e.openBlock(),e.createBlock($r.ssDialog,{key:3,visible:te.value,onBeforeDestroy:Au,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:Le.value,threeData:se.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode($r.ssDialog,{title:"OCR扫描录入",visible:bl.value,"close-on-click-modal":!1,onBeforeDestroy:nr,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",Z3,[e.createElementVNode("div",Q3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:aa.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:aa.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:aa.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)]),aa.value===1?(e.openBlock(),e.createElementBlock("div",eh,[e.createVNode(ke,{onClick:C,class:"ocr-action-btn",disabled:br.value,size:"default"},{default:e.withCtx(()=>v[33]||(v[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(ke,{onClick:ui,class:"ocr-action-btn",disabled:br.value,size:"default"},{default:e.withCtx(()=>v[34]||(v[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),aa.value===1?(e.openBlock(),e.createElementBlock("div",ah,[e.createElementVNode("div",lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ka.value,(be,Va)=>{var xa;return e.openBlock(),e.createElementBlock("div",{key:Va,class:"ocr-file-item"},[e.createElementVNode("div",rh,[be.raw&&((xa=be.raw.type)!=null&&xa.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:pn(be),alt:"预览",class:"thumbnail-image"},null,8,nh)):(e.openBlock(),e.createElementBlock("div",ih,[e.createVNode(ge,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Gl(be)==="uploading",processing:Gl(be)==="processing",completed:Gl(be)==="completed"||Gl(be)==="uploaded",failed:Gl(be)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",oh,[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:Gl(be)==="completed"||Gl(be)==="uploaded",uploading:Gl(be)==="uploading",processing:Gl(be)==="processing",failed:Gl(be)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Gl(be)==="failed"?"#f56c6c":Gl(be)==="completed"||Gl(be)==="uploaded"?"#67c23a":"#409eff","stroke-width":Gl(be)==="completed"||Gl(be)==="uploaded"||Gl(be)==="failed"?3:2,"stroke-dasharray":Ln(be),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,th)])),Gl(be)==="completed"||Gl(be)==="uploaded"?(e.openBlock(),e.createElementBlock("div",sh,[e.createVNode(ge,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1})])):e.createCommentVNode("",!0),Gl(be)==="failed"?(e.openBlock(),e.createElementBlock("div",ch,[e.createVNode(ge,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ya=>Du(Va)},[e.createVNode(ge,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})],8,uh)]),e.createElementVNode("div",dh,e.toDisplayString(be.name||"文件名123"),1)])}),128))]),ka.value.length>0?(e.openBlock(),e.createElementBlock("div",ph,[e.createVNode(ke,{onClick:cl,class:"ocr-start-recognize-btn",disabled:br.value||ka.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),aa.value===1?(e.openBlock(),e.createElementBlock("div",fh,[e.createVNode(Ye,{percentage:$e.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),aa.value===2?(e.openBlock(),e.createElementBlock("div",hh,[e.createElementVNode("div",vh,[e.createVNode(qe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",mh,[e.createVNode(_a,{data:wa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(ra,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,be=>(e.openBlock(),e.createBlock(ra,{key:be.prop,prop:be.prop,"min-width":be.minWidth||230,"class-name":be.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",yh,[e.createElementVNode("span",null,e.toDisplayString(be.label),1)])]),default:e.withCtx(({row:Va,$index:xa})=>{var Ya,Ra,Be;return[be.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:dr(Va[be.prop]),fontWeight:500})},e.toDisplayString(Ql(Va[be.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[Ha.value!==xa?(e.openBlock(),e.createElementBlock("span",gh,e.toDisplayString(Va[be.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Xa(be.prop)),{key:1,modelValue:Va[be.prop],"onUpdate:modelValue":Q=>Va[be.prop]=Q,size:"small",placeholder:"请输入"+be.label,content:((Ya=ba(be.prop))==null?void 0:Ya.contents)??((Ra=ba(be.prop))==null?void 0:Ra.options)??[],optionUrl:(Be=ba(be.prop))==null?void 0:Be.optionUrl,onChange:Q=>Vl(xa,be.prop,Q),onFocus:Q=>va.value=be.prop,onBlur:v[8]||(v[8]=Q=>va.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(ra,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:be})=>[Ha.value===be?(e.openBlock(),e.createBlock(ge,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Va=>ql(be),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(z,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers(Va=>ql(be),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),aa.value===3?(e.openBlock(),e.createElementBlock("div",bh,[e.createVNode(ge,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1}),v[37]||(v[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(za,{ref:"ocrUploadRef","file-list":ka.value,"onUpdate:fileList":v[9]||(v[9]=be=>ka.value=be),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":rl,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[aa.value!==3?(e.openBlock(),e.createElementBlock("div",kh,[e.createVNode(ke,{onClick:_u,class:"ocr-start-recognize-btn",disabled:aa.value===1||br.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(ke,{onClick:Su,class:"ocr-start-recognize-btn",disabled:br.value},{default:e.withCtx(()=>v[40]||(v[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(z0,{visible:k.value,onConfirm:F,onCancel:v[10]||(v[10]=be=>k.value=!1)},null,8,["visible"]),e.createVNode(Pd,{visible:hl.value,"onUpdate:visible":v[11]||(v[11]=be=>hl.value=be),versions:Nl.value},null,8,["visible","versions"]),e.createVNode(Dd,{visible:Ca.value,"onUpdate:visible":v[12]||(v[12]=be=>Ca.value=be),images:Aa.value,"default-image-name":pl.value,"field-meta":Ha.value!==null?((tl=wa.value[Ha.value])==null?void 0:tl.__ocrFieldMeta)||{}:{},"focused-field-name":va.value,onClose:v[13]||(v[13]=be=>Ca.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(ep,{visible:Pe.value,"onUpdate:visible":v[14]||(v[14]=be=>Pe.value=be),candidates:kl.value,"name-prop":Ol.value,"mfr-prop":ma.value,columns:q.value,onSubmit:ur,onPreviewFile:Cu},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(tp,{visible:ha.value,"onUpdate:visible":v[15]||(v[15]=be=>ha.value=be),ocrPreviewData:wa.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=be=>wa.value=be),ocrSelectedFields:pa.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=be=>pa.value=be),ocrPreviewColumns:Ee.value,onConfirm:_l,onFieldChange:v[18]||(v[18]=({rowIndex:be,prop:Va,value:xa})=>Vl(be,Va,xa))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode($r.ssDialog,{title:G.title,visible:G.show,width:G.width,onBeforeDestroy:sa},{default:e.withCtx(()=>[e.createElementVNode("div",xh,[e.createVNode(dl.ssForm,{rowContents:G==null?void 0:G.contents,formRules:G==null?void 0:G.formRules,showOperator:!1,buttonValue:G.buttonValue,isEdit:ja.value,isStartJustify:!1,onOnButtonClick:Oa},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode($r.ssDialog,{title:"",visible:J.show,width:J.width,alignCenter:!0,onBeforeDestroy:xe},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",wh,e.toDisplayString(J.title),1),e.createVNode(Ma,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",_h,[e.createVNode(Ma,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(rn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",Sh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J==null?void 0:J.buttonValue,be=>(e.openBlock(),e.createBlock(ke,{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:Va=>Se(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(a0,{columns:J==null?void 0:J.columns,tableData:J==null?void 0:J.tableData},{content:e.withCtx(({row:be,item:Va,slotData:xa,scope:Ya,column:Ra,columnProp:Be,$index:Q})=>[e.createTextVNode(e.toDisplayString((be==null?void 0:be[Ra==null?void 0:Ra.prop])||(be==null?void 0:be[Ra==null?void 0:Ra.label])||(be==null?void 0:be[Ra==null?void 0:Ra.property])||(xa==null?void 0:xa[Ra==null?void 0:Ra.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"]),e.createVNode(dl.Signature,{signPadInfo:al.value,onBeforeDestroy:Qa,onClickSubmitSign:Tl},null,8,["signPadInfo"])])}}},Kc=sr._export_sfc(Ch,[["__scopeId","data-v-ecef7355"]]),Dh={key:1,class:"static-form-body"},Th=["onClick"],Bh=["src"],Nh={key:1},Ah=["src"],zh=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},backgroundPosition:{default:"Center"},iconUrl:{default:void 0},calculator:{default:()=>[]}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,i=x=>{switch(x){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},o=e.computed(()=>{var I;const x=(I=r.itemData)==null?void 0:I.find(R=>(R==null?void 0:R.key)==="formContent"),b=(x==null?void 0:x.contents)||[];return(r.fields&&r.fields.length>0?r.fields:b).filter(R=>(R==null?void 0:R.label)||(R==null?void 0:R.isHideInForm)).map(R=>{let re=R==null?void 0:R.value;Array.isArray(re)&&(re=re.map(U=>U==null?"":typeof U=="object"?U.label??U.value??U.name??JSON.stringify(U):String(U)).filter(Boolean).join(",")),re!=null&&typeof re=="object"&&(re=re.label??re.value??re.name??JSON.stringify(re));const X=R.isHideInForm?"":R.label??"",ye=re==null||re===""?"-":String(re),fe=X==="使用状态";return{label:X,value:ye,isStatus:fe,tagType:fe?i(ye):"",width:R.width??1,field:R}})}),p=e.ref(null),c=e.ref(null),u=e.computed(()=>{const x=Number(r==null?void 0:r.textSize),b=le.rgbaToColor(r==null?void 0:r.textColor),_={},I={},R={},re={};return!Number.isNaN(x)&&x&&(_.fontSize=`${x}px`,I.fontSize=`${x+1}px`,R.fontSize=`${x}px`,re.fontSize=`${x}px`),b&&(I.color=b,R.color=b,re.color=b),{item:_,label:I,value:R,empty:re}}),m=e.ref(""),g=e.ref(""),y=e.ref(!1),d=async x=>{if(x){g.value&&(URL.revokeObjectURL(g.value),g.value="");try{const b=await M.platformDownloadFile({url:x}),_=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});g.value=URL.createObjectURL(_)}catch{g.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,x=>{x&&(m.value=x)},{immediate:!0}),e.watch(m,x=>{d(x)},{immediate:!0});const A=async()=>{var x,b;((x=r==null?void 0:r.calculator)==null?void 0:x.length)>0&&await Lt(o.value,"Auto",[],r==null?void 0:r.calculator),(b=c.value)==null||b.click()},w=async x=>{var I,R,re;const b=x.target,_=(I=b==null?void 0:b.files)==null?void 0:I[0];if(!_){b.value="";return}y.value=!0;try{const X=new FormData;X.append("file",_);const ye=await M.platformUploadFile(X),fe=(re=(R=ye==null?void 0:ye.data)==null?void 0:R.result)==null?void 0:re.url;fe?(m.value=fe,n("update:backGroundImage",fe),d(fe),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{y.value=!1,b.value=""}},Y=e.computed(()=>{var x,b,_,I;return g.value||(r==null?void 0:r.backgroundUrl)!==""?{backgroundImage:`url("${(x=r==null?void 0:r.backgroundUrl)==null?void 0:x.replace(/\\/g,"/")}")`,backgroundPosition:`${((b=r==null?void 0:r.backgroundPosition)==null?void 0:b.toLowerCase())??"center"} center`,backgroundRepeat:"no-repeat",cursor:((_=r==null?void 0:r.calculator)==null?void 0:_.length)>0?"pointer":"auto"}:{cursor:((I=r==null?void 0:r.calculator)==null?void 0:I.length)>0?"pointer":"auto"}}),D=x=>dl.getComponent(x),P=x=>{if(!x)return;const b=x.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},O=(x,b,_)=>{r.disabled||(p.value=b,e.nextTick(()=>{P(_.currentTarget)}))},E=()=>{p.value=null},S=x=>{const b=x!=null&&x.width&&x.width>0?x.width:1,I=`calc((100% - ${(b-1)*48}px) / ${b})`;return{flex:`0 0 ${I}`,maxWidth:I,minWidth:"0",boxSizing:"border-box"}};return(x,b)=>{const _=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(Y.value),onClick:b[1]||(b[1]=I=>A())},[(r==null?void 0:r.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(I=>A(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:w},null,544),b[2]||(b[2]=e.createElementVNode("img",{src:dl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",Dh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(I,R)=>{var re,X,ye,fe,U,q,Z,ae,ve;return e.openBlock(),e.createElementBlock("div",{key:R,class:"static-form-item",style:e.normalizeStyle({...S(I),...u.value.item})},[I.label&&!((re=I==null?void 0:I.field)!=null&&re.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(u.value.label)},e.toDisplayString(I.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(u.value.value),onClick:ze=>{var te;return(te=I.field)!=null&&te.isNoClick?null:O(I,R,ze)}},[x.iconUrl&&x.backgroundPosition==="Left"?(e.openBlock(),e.createElementBlock("img",{key:0,src:x.iconUrl,class:"bg-upload-icon"},null,8,Bh)):e.createCommentVNode("",!0),p.value===R&&I.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D(((X=I.field)==null?void 0:X.type)??"Input")),{key:1,modelValue:I.field.value,"onUpdate:modelValue":ze=>I.field.value=ze,isEdit:!0,disabled:(ye=I.field)==null?void 0:ye.disabled,content:((fe=I.field)==null?void 0:fe.contents)??[],optionUrl:I.field,originalValue:(U=I.field)==null?void 0:U.value,config:(q=I.field)==null?void 0:q.config,configModel:((Z=I.field)==null?void 0:Z.prop)??((ae=I.field)==null?void 0:ae.name),selectedTagList:((ve=I.field)==null?void 0:ve.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[I.isStatus?(e.openBlock(),e.createBlock(_,{key:0,type:I.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Nh,e.toDisplayString(I.value??"-"),1))],64)),x.iconUrl&&x.backgroundPosition==="Right"?(e.openBlock(),e.createElementBlock("img",{key:3,src:x.iconUrl,class:"bg-upload-icon"},null,8,Ah)):e.createCommentVNode("",!0)],12,Th)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(u.value.empty)}," 暂无数据 ",4))],4)}}}),Gc=sr._export_sfc(zh,[["__scopeId","data-v-60da0bde"]]),Mh={class:"form-content"},Ih={title:"选择标签"},Oh={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Lh={class:"col-operate-wrap"},Rh={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},$h={__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:()=>{}},calculator:{type:Array,default:()=>[]}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const r=()=>{m.value=!1,g.value=!1,y.value=[]},n=a;e.computed(()=>{var ua;const ne=(ua=We.value)==null?void 0:ua.split("/");return(ne==null?void 0:ne.some(Qe=>(Qe==null?void 0:Qe.includes("updateLoading"))||(Qe==null?void 0:Qe.includes("loading"))))?!1:N.value==="view"});const i=l,o=e.ref(""),p=e.ref(""),c=e.ref("Center"),u=e.ref([]),m=e.ref(!1),g=e.ref(!1),y=e.ref([]),{getFileExtension:d}=Do.useThreeSystem(),A=e.ref(),w=e.ref(!1),Y=e.ref(!1),D=M.useUnit(M.pinia),{chooseTitle:P}=M.storeToRefs(D),O=e.ref([]),E=e.ref(),S=e.ref(!1),x=e.ref([]),b=_c(M.pinia),_=$t(M.pinia),I=e.ref(!1),R=e.ref(),re=e.ref(),X=e.ref(),ye=e.ref(),fe=e.ref(),U=M.useLoginState(M.pinia),{loginUserInfo:q}=M.storeToRefs(U),Z=e.ref(),ae=e.ref(!0),ve=M.useModelComp(M.pinia),{tableViewContents:ze,itemData:te,isEdit:N,routeToChildPath:se,lockingPage:W,homepageBackgroundTableId:ue,refreshCurrentPageInform:_e}=M.storeToRefs(ve),we=e.ref(null),Ke=e.ref(!1),la=e.ref(!1),j=M.useMenuState(),{activeMenuPath:We}=M.storeToRefs(j),Oe=le.useOriginalState(M.pinia),{originalPath:Ie}=M.storeToRefs(Oe),{compType:Me,hasEditable:de}=cc.useRole(),Ce=()=>!de(n.config,{type:Me.FORM});e.computed(()=>We.value==="设备管理/试验设备"&&n.compName==="设备概要");const Je=async()=>{var ua,Qe,Da;const ne=ue==null?void 0:ue.value,pe=(ua=q==null?void 0:q.value)==null?void 0:ua.plat_id;if(!(!ne||!pe))try{const Te=await M.getAllTables({platId:parseInt(pe),tableNames:[`content_${ne}`,`struct_${ne}`],user_unique_id:"0"}),Le=((Da=(Qe=Te==null?void 0:Te.data)==null?void 0:Qe.result)==null?void 0:Da[0])??[],Fe=String((n==null?void 0:n.index)??""),Ne=Le==null?void 0:Le.find(me=>String(me==null?void 0:me.relatedForm_id)===Fe);Ne!=null&&Ne.backgroundImg_url&&(ye.value=Ne.backgroundImg_url)}catch(Te){console.error("获取首页背景图片表数据失败:",Te)}},Ea=e.ref([]),Ge=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),$=async ne=>{la.value=ne,await Ve("disabled",null,ne,!0)},V=async ne=>{await Ve("operable",null,ne,!0)};e.watch(()=>We.value,async()=>{u.value=[],y.value=[]},{deep:!0,immediate:!0});const ee=()=>{e.nextTick(()=>{ia()})},ce=ne=>{var pe;u.value=(pe=u.value)==null?void 0:pe.map(ua=>({...ua,isFormColHidden:!(ne!=null&&ne.includes(ua.label))}))};e.onUnmounted(()=>{we.value=null});const he=ne=>{i("clickTrigger",ne)},ca=async ne=>{var pe,ua,Qe,Da,Te,Le;if(ne===""){let Fe="";(pe=u.value)==null||pe.forEach(Qa=>{Qa!=null&&Qa.isMain&&(Fe=Qa==null?void 0:Qa.value)});let Ne=await le.getItemData(se.value,sessionStorage.getItem("systemKey"),"");Fe=((Le=(Te=(Da=(Qe=(ua=Ne==null?void 0:Ne[0])==null?void 0:ua.compData)==null?void 0:Qe.find(Qa=>(Qa==null?void 0:Qa.key)==="mainRouters"))==null?void 0:Da.contents)==null?void 0:Te[0])==null?void 0:Le.routerContent)+Ie.value+Fe;let al=await le.getItemData(Fe,sessionStorage.getItem("systemKey"),"");S.value=!0,x.value=al==null?void 0:al.filter(Qa=>(Qa==null?void 0:Qa.comp)!=="methodButton"),i("routeUrl",x.value)}},ia=()=>{var pe;const ne=(pe=we.value)==null?void 0:pe.$el;ne&&Fl.Sortable.create(ne,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:ua=>{const{oldIndex:Qe,newIndex:Da}=ua;if(Qe===Da)return;const Te=u.value.splice(Qe,1)[0];u.value.splice(Da,0,Te)}})},Ve=async(ne,pe,ua,Qe=!1)=>{try{ve.setRefreshCurStructure(!1)}catch{Ja.ElMessage.error("编辑处理失败")}},ga=async(ne,pe)=>{await Ve()},Ta=async(ne,pe)=>{ne&&await Ve()},De=async(ne,pe,ua)=>{await Ve(pe,ua,ne,!1)},Fa=(ne,pe)=>{Z.value===pe?ae.value=!1:ae.value=!0,Z.value=pe==null?void 0:pe.changeProp},Na=async ne=>{var Le;ye.value=ne;const pe=n.itemData,ua=pe==null?void 0:pe.find(Fe=>(Fe==null?void 0:Fe.key)==="backGroundImage");ua?ua.contents=ne:pe==null||pe.push({key:"backGroundImage",contents:ne}),i("change",{key:"backGroundImage",contents:ne});const Qe=ue==null?void 0:ue.value,Da=n==null?void 0:n.index,Te=(Le=q==null?void 0:q.value)==null?void 0:Le.plat_id;if(!(!Qe||!Te||!Da||!ne))try{await M.pageBatchAddApi({platId:parseInt(Te),changeContents:[{tableName:`content_${Qe}`,tableContents:[{backgroundImg_url:ne,relatedForm_id:String(Da)}]}],user_unique_id:"0"})}catch(Fe){console.error("保存背景图片记录失败:",Fe),Ja.ElMessage.error("背景图片记录保存失败")}},da=async ne=>{var ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll;let pe=[];if((ua=ne==null?void 0:ne.toString())!=null&&ua.includes(".urdf")){if(ne.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}y.value=[{url:ne,extension:d(ne)}],g.value=!0,m.value=!0;return}if((Qe=ne==null?void 0:ne.toString())!=null&&Qe.includes(".stl")||(Da=ne==null?void 0:ne.toString())!=null&&Da.includes(".STL")||(Te=ne==null?void 0:ne.toString())!=null&&Te.includes(".obj")||(Le=ne==null?void 0:ne.toString())!=null&&Le.includes(".mtl")){const Wa=((Fe=ne==null?void 0:ne.toString())==null?void 0:Fe.split(",")).map(Hl=>({url:Hl,extension:d(Hl)}));y.value=Wa,g.value=!1,m.value=!0;return}if((Ne=ne==null?void 0:ne.toString())!=null&&Ne.includes(".stl")||(me=ne==null?void 0:ne.toString())!=null&&me.includes(".STL")||(al=ne==null?void 0:ne.toString())!=null&&al.includes(".obj")||(Qa=ne==null?void 0:ne.toString())!=null&&Qa.includes(".mtl")){let jl,Wa=[],Hl={};if(Array.isArray(ne)?jl=ne:jl=ne==null?void 0:ne.split(","),jl==null||jl.forEach(Jl=>{Jl.includes(".mtl")?Wa.push(Jl):Hl.blob=Hl.blob?Hl.blob+","+Jl:Jl}),(Wa==null?void 0:Wa.length)>0&&(Hl.mtlBlobs=Wa),(Rl=(Tl=Object.values(Hl))==null?void 0:Tl[0])!=null&&Rl.includes("http:"))pe.push(Hl);else{const Jl=new Blob([Hl.blob],{type:"application/octet-stream;charset=UTF-8"});let ar=URL.createObjectURL(Jl),bl="";(Al=ne==null?void 0:ne.split("/"))==null||Al.forEach((br,ka)=>{var ol;ka===((ol=ne==null?void 0:ne.split("/"))==null?void 0:ol.length)-1&&(bl=br)}),(Pl=Hl.blob)!=null&&Pl.includes(".stl")&&(bl=(bl==null?void 0:bl.replaceAll(">",""))+".urdf"),E.value=[{name:bl,blobUrl:ar}],Y.value=!0}}else{const jl=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Wa=await Ja.axios.get(ne,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{jl.close()}),Hl=new Blob([Wa.data],{type:"application/octet-stream;charset=UTF-8"});let Jl=URL.createObjectURL(Hl),ar="";(ll=ne==null?void 0:ne.split("/"))==null||ll.forEach((bl,br)=>{var ka;br===((ka=ne==null?void 0:ne.split("/"))==null?void 0:ka.length)-1&&(ar=bl)}),E.value=[{name:ar,blobUrl:Jl}],Y.value=!0}(pe==null?void 0:pe.length)>0&&_.setBlobUrls(pe)},ja=()=>{Y.value=!1},ta=ne=>{var Te,Le,Fe,Ne;const pe=(Le=(Te=dl.safeClone(n.itemData))==null?void 0:Te.find(me=>(me==null?void 0:me.key)==="formContent"))==null?void 0:Le.contents,ua=dl.safeClone(ne.content);let Qe={};ua&&((Fe=Object.values(ua))==null?void 0:Fe.length)>0&&((Ne=Object.values(ua))==null||Ne.forEach((me,al)=>{Qe[pe[al].key]=me}));const Da={content:Qe,index:n==null?void 0:n.index,buttonName:ne==null?void 0:ne.buttonName};i("change",Da)};e.computed(()=>"http://222.92.178.198:62001");const je=async ne=>{var Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl;if(!ne)return;(Rl=(Tl=n==null?void 0:n.itemData)==null?void 0:Tl.find(aa=>(aa==null?void 0:aa.key)==="parentFormPath"))==null||Rl.contents;let pe=ze.value;(pe==null?void 0:pe.length)>0&&(pe=pe==null?void 0:pe.map(aa=>{var Ga,$e,ha,wa;let Pa=(Ga=aa==null?void 0:aa.key)==null?void 0:Ga.split("/");return(n==null?void 0:n.compName)===(Pa==null?void 0:Pa[0])&&($e=u.value)!=null&&$e.find(Ee=>(Ee==null?void 0:Ee.prop)===(Pa==null?void 0:Pa[1]))&&(aa.value=(wa=(ha=u.value)==null?void 0:ha.find(Ee=>(Ee==null?void 0:Ee.prop)===(Pa==null?void 0:Pa[1])))==null?void 0:wa.value),aa}),ve.setTableViewContents(pe));const ua=dl.safeClone(n.itemData);let Qe=ua==null?void 0:ua.map(aa=>{var Pa;return(aa==null?void 0:aa.key)==="formContent"&&((Pa=aa.contents)==null||Pa.map((Ga,$e)=>{var ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl,Pe,kl,cr,Cr,ea,La,Bl,Ol;return Ga.type=(wa=(ha=u.value)==null?void 0:ha.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:wa.type,Ga.options=Ga!=null&&Ga.options?Ga.options:((Xa=(ba=(Ee=Ga==null?void 0:Ga.key)==null?void 0:Ee.split("$"))==null?void 0:ba[1])==null?void 0:Xa.length)>0?(Ha=(pa=rd((zl=(yl=Ga==null?void 0:Ga.key)==null?void 0:yl.split("$"))==null?void 0:zl[1]))==null?void 0:pa.split(","))==null?void 0:Ha.map(ma=>({label:ma,value:ma})):[],(va=Ga==null?void 0:Ga.key)!=null&&va.includes("$")&&(Ga.key=(Aa=(Ca=Ga==null?void 0:Ga.key)==null?void 0:Ca.split("$"))==null?void 0:Aa[0]),Ga.signature=(Pe=(pl=u.value)==null?void 0:pl.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:Pe.signature,Ga.isLoginUser=(cr=(kl=u.value)==null?void 0:kl.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:cr.isLoginUser,Ga.value=(Cr=Object.values(ne))==null?void 0:Cr[$e],Ga.isFormColHidden=(La=(ea=u.value)==null?void 0:ea.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:La.isFormColHidden,Ga.isHideInForm=(Ol=(Bl=u.value)==null?void 0:Bl.find(ma=>(ma==null?void 0:ma.prop)===(Ga==null?void 0:Ga.prop)))==null?void 0:Ol.isHideInForm,Ga})),aa}),Da=u.value,Te=(Pl=(Al=dl.safeClone(Qe))==null?void 0:Al.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:Pl.contents;if(Da=Da==null?void 0:Da.map(aa=>{var Pa,Ga;return(aa==null?void 0:aa.type)==="Select"&&((Pa=aa==null?void 0:aa.allSelectionContents)==null?void 0:Pa.length)>0&&(aa.contactValue=ne),aa.value=(Ga=Te==null?void 0:Te.find(($e,ha)=>(($e==null?void 0:$e.id)??ha)===(aa==null?void 0:aa.id)))==null?void 0:Ga.value,aa}),!ae.value){i("contentChange",{contents:Qe,index:n.index});return}let Le="",Fe=(Wa=(jl=(ll=dl.safeClone(Qe))==null?void 0:ll.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:jl.contents)==null?void 0:Wa.find((aa,Pa)=>{var Ga,$e,ha;return(aa==null?void 0:aa.label)===Z.value||Pa.toString()===((ha=($e=(Ga=Z.value)==null?void 0:Ga.split("t"))==null?void 0:$e[1])==null?void 0:ha.toString())}),Ne=(Hl=Fe==null?void 0:Fe.optionUrl)==null?void 0:Hl.menuSelect,me=!0;if((bl=(ar=(Jl=dl.safeClone(Qe))==null?void 0:Jl.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:ar.contents)==null||bl.forEach(aa=>{var Pa,Ga,$e,ha,wa,Ee;me&&(($e=(Ga=(Pa=aa==null?void 0:aa.optionUrl)==null?void 0:Pa.groupSelect)==null?void 0:Ga[1])!=null&&$e.includes("["))&&(Le=(wa=(ha=aa==null?void 0:aa.optionUrl)==null?void 0:ha.groupSelect)==null?void 0:wa[1],JSON.stringify(Ne)===JSON.stringify((Ee=aa==null?void 0:aa.optionUrl)==null?void 0:Ee.menuSelect)&&(me=!1))}),(br=Fe==null?void 0:Fe.optionUrl)!=null&&br.menuSelect&&ae.value){let aa=await Tt(Fe),Pa,Ga=(ka=Fe==null?void 0:Fe.optionUrl)==null?void 0:ka.menuSelect;if(aa==null||aa.forEach($e=>{var ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va;Le===((wa=(ha=Fe==null?void 0:Fe.optionUrl)==null?void 0:ha.groupSelect)==null?void 0:wa[1])&&((Xa=(ba=(Ee=Fe==null?void 0:Fe.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:ba[1])!=null&&Xa.includes("["))&&((va=dl.safeClone($e))==null?void 0:va[(Ha=(pa=(zl=(yl=Fe==null?void 0:Fe.optionUrl)==null?void 0:yl.groupSelect)==null?void 0:zl[1])==null?void 0:pa.replaceAll("[",""))==null?void 0:Ha.replaceAll("]","")])===(Fe==null?void 0:Fe.value)&&(Pa=$e)}),Pa){let $e=dl.safeClone(Da);$e=$e==null?void 0:$e.map(wa=>{var Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl;return(Pa!=null&&Pa[wa==null?void 0:wa.label]||Pa!=null&&Pa[(yl=(Xa=(ba=(Ee=wa==null?void 0:wa.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:ba[1])==null?void 0:Xa.replaceAll("[",""))==null?void 0:yl.replaceAll("]","")])&&((Ha=(pa=(zl=wa==null?void 0:wa.optionUrl)==null?void 0:zl.groupSelect)==null?void 0:pa[1])!=null&&Ha.includes("["))&&Ga!=null&&Ga.every(Pe=>{var kl,cr;return(cr=(kl=wa==null?void 0:wa.optionUrl)==null?void 0:kl.menuSelect)==null?void 0:cr.includes(Pe)})&&(wa.value=(Pa==null?void 0:Pa[wa==null?void 0:wa.label])||(Pa==null?void 0:Pa[(pl=(Aa=(Ca=(va=wa==null?void 0:wa.optionUrl)==null?void 0:va.groupSelect)==null?void 0:Ca[1])==null?void 0:Aa.replaceAll("[",""))==null?void 0:pl.replaceAll("]","")]),Array.isArray(wa.value)&&wa.value.every(Pe=>(Pe==null?void 0:Pe.url)&&(Pe==null?void 0:Pe.name))&&(wa.type="Upload")),wa}),$e=$e==null?void 0:$e.map(wa=>{var Ee,ba,Xa;return(Ee=wa==null?void 0:wa.optionUrl)!=null&&Ee.oldMenuSelect&&(wa.optionUrl.menuSelect=(Xa=(ba=dl.safeClone(wa))==null?void 0:ba.optionUrl)==null?void 0:Xa.oldMenuSelect),wa}),u.value=dl.safeClone($e);let ha=dl.safeClone($e);ha=ha==null?void 0:ha.map(wa=>{var Ee,ba,Xa,yl,zl,pa;return(ba=(Ee=wa==null?void 0:wa.optionUrl)==null?void 0:Ee.menuSelect)!=null&&ba.some(Ha=>Ha==null?void 0:Ha.includes("["))&&(wa.optionUrl.oldMenuSelect=(yl=(Xa=dl.safeClone(wa))==null?void 0:Xa.optionUrl)==null?void 0:yl.menuSelect,wa.optionUrl.menuSelect=(pa=(zl=wa==null?void 0:wa.optionUrl)==null?void 0:zl.menuSelect)==null?void 0:pa.map(Ha=>{var va,Ca,Aa,pl;if(Ha!=null&&Ha.includes("[")){let Pe=(Ca=(va=Ha==null?void 0:Ha.replaceAll("[","").replaceAll("]",""))==null?void 0:va.split(":"))==null?void 0:Ca[1];Ha=(pl=(Aa=dl.safeClone($e))==null?void 0:Aa.find(kl=>(kl==null?void 0:kl.label)===Pe))==null?void 0:pl.value}return Ha})),wa}),u.value=ha}else u.value=Da;Qe=Qe==null?void 0:Qe.map($e=>{var ha;return($e==null?void 0:$e.key)==="formContent"&&($e.contents=(ha=$e.contents)==null?void 0:ha.map(wa=>{var Ee,ba,Xa,yl;return wa.value=((ba=(Ee=u.value)==null?void 0:Ee.find(zl=>(zl==null?void 0:zl.label)===(wa==null?void 0:wa.key)))==null?void 0:ba.value)??(wa==null?void 0:wa.value),wa.type=((yl=(Xa=u.value)==null?void 0:Xa.find(zl=>(zl==null?void 0:zl.prop)===(wa==null?void 0:wa.key)))==null?void 0:yl.type)??(wa==null?void 0:wa.type),wa})),$e})}ae.value=!1,i("contentChange",{contents:Qe,index:n.index});let al=[],Qa=[];if((hl=dl.safeClone((ol=Qe==null?void 0:Qe.find(aa=>(aa==null?void 0:aa.key)==="formContent"))==null?void 0:ol.contents))==null||hl.forEach(aa=>{var Pa;Array.isArray(aa==null?void 0:aa.value)&&((Pa=aa==null?void 0:aa.value)!=null&&Pa.find(Ga=>{var $e;return($e=Ga==null?void 0:Ga.url)==null?void 0:$e.includes(".obj")}))&&(Qa=aa==null?void 0:aa.value)}),(Qa==null?void 0:Qa.length)>0){const aa=(Nl=dl.safeClone(Qa))==null?void 0:Nl.filter(Pa=>{var Ga;return(Ga=Pa==null?void 0:Pa.url)==null?void 0:Ga.includes(".obj")});aa==null||aa.forEach(Pa=>{var $e,ha,wa,Ee;const Ga=($e=Qa==null?void 0:Qa.filter(ba=>{var Xa;return(ba==null?void 0:ba.name)===(Pa==null?void 0:Pa.name)&&((Xa=ba==null?void 0:ba.url)==null?void 0:Xa.includes(".mtl"))}))==null?void 0:$e.map(ba=>ba==null?void 0:ba.url);al.push({objUrl:Pa==null?void 0:Pa.url,mtlUrls:((ha=Qa==null?void 0:Qa.filter(ba=>{var Xa;return(ba==null?void 0:ba.name)===(Pa==null?void 0:Pa.name)&&((Xa=ba==null?void 0:ba.url)==null?void 0:Xa.includes(".mtl"))}))==null?void 0:ha.length)===1?(Ee=(wa=Qa==null?void 0:Qa.filter(ba=>{var Xa;return(ba==null?void 0:ba.name)===(Pa==null?void 0:Pa.name)&&((Xa=ba==null?void 0:ba.url)==null?void 0:Xa.includes(".mtl"))}))==null?void 0:wa[0])==null?void 0:Ee.url:Ga})}),_.setObjUrl(al)}},ya=(ne,pe,ua)=>{let Qe="";const Da=pe==null?void 0:pe.map(Te=>{var Le;return(Le=Te==null?void 0:Te.value)==null?void 0:Le.pageData});return Da==null||Da.forEach(Te=>{var Le;(Te==null?void 0:Te.name)===(ne==null?void 0:ne[0])&&((Le=Te==null?void 0:Te.compData)==null||Le.forEach(Fe=>{var Ne;(Fe==null?void 0:Fe.key)==="formContent"&&((Ne=Fe==null?void 0:Fe.contents)==null||Ne.forEach(me=>{var al;(me==null?void 0:me.prop)===(ne==null?void 0:ne[1])&&(Qe=(me==null?void 0:me.value)===""?le.judgeContents((al=dl.safeClone(me))==null?void 0:al.optionUrl,ua):me==null?void 0:me.value)}))}))}),Qe},Ze=(ne,pe,ua,Qe)=>{var Fe,Ne;let Da="",Te="";(Fe=dl.safeClone(pe))==null||Fe.forEach((me,al)=>{me!=null&&me.includes("[")?Te=Te+Ie.value+ne[al]:Te=Te===""?Te+me:Te+"/"+me});let Le=(Ne=Qe[Te])==null?void 0:Ne.map(me=>{var al;return(al=me==null?void 0:me.value)==null?void 0:al.pageData});return Le==null||Le.forEach(me=>{var al;(me==null?void 0:me.name)===(ua==null?void 0:ua[0])&&((al=me==null?void 0:me.compData)==null||al.forEach(Qa=>{var Tl;(Qa==null?void 0:Qa.key)==="formContent"&&((Tl=Qa==null?void 0:Qa.contents)==null||Tl.forEach(Rl=>{(Rl==null?void 0:Rl.prop)===(ua==null?void 0:ua[1])&&(Da=Rl==null?void 0:Rl.value)}))}))}),Da};e.watch(()=>ue==null?void 0:ue.value,async()=>{await Je()},{immediate:!0});const Ae=async ne=>await Lt(ne,"Auto");return e.watch(()=>_e.value,async()=>{var ne;(ne=u.value)!=null&&ne.some(pe=>(pe==null?void 0:pe.functionName)&&(pe==null?void 0:pe.functionName)!=="")&&(u.value=await Ae(u.value))},{immediate:!0,deep:!0}),e.watch(()=>n.itemData,async()=>{var Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl,aa,Pa,Ga,$e,ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl,Pe,kl,cr,Cr;const ne=(Rl=n.itemData)==null?void 0:Rl.find(ea=>(ea==null?void 0:ea.key)==="formContent");let pe=(Al=n.itemData)==null?void 0:Al.find(ea=>(ea==null?void 0:ea.key)==="backGround");pe&&((Pl=pe==null?void 0:pe.contents)==null?void 0:Pl.length)>0&&(((jl=(ll=pe==null?void 0:pe.contents)==null?void 0:ll[0])==null?void 0:jl.fileType)==="Picture"&&(o.value=((Hl=(Wa=pe==null?void 0:pe.contents)==null?void 0:Wa[0])==null?void 0:Hl.url)??""),((ar=(Jl=pe==null?void 0:pe.contents)==null?void 0:Jl[0])==null?void 0:ar.fileType)==="Icon"&&(p.value=((br=(bl=pe==null?void 0:pe.contents)==null?void 0:bl[0])==null?void 0:br.url)??""),c.value=((ol=(ka=pe==null?void 0:pe.contents)==null?void 0:ka[0])==null?void 0:ol.position)??"");const ua=(hl=dl.safeClone(n.itemData))==null?void 0:hl.find(ea=>(ea==null?void 0:ea.key)==="formButton"),Qe=(Nl=dl.safeClone(n.itemData))==null?void 0:Nl.find(ea=>(ea==null?void 0:ea.key)==="formFlex"),Da=(aa=dl.safeClone(n.itemData))==null?void 0:aa.find(ea=>(ea==null?void 0:ea.key)==="formWrap"),Te=(Pa=dl.safeClone(n.itemData))==null?void 0:Pa.find(ea=>(ea==null?void 0:ea.key)==="enableWrap"),Le=(Ga=dl.safeClone(n.itemData))==null?void 0:Ga.find(ea=>(ea==null?void 0:ea.key)==="textSize"),Fe=($e=dl.safeClone(n.itemData))==null?void 0:$e.find(ea=>(ea==null?void 0:ea.key)==="textRGBA"),Ne=(ha=dl.safeClone(n.itemData))==null?void 0:ha.find(ea=>(ea==null?void 0:ea.key)==="backGround"),me=(wa=dl.safeClone(n.itemData))==null?void 0:wa.find(ea=>(ea==null?void 0:ea.key)==="backGroundImage");(Da==null?void 0:Da.contents)==="纵向"?w.value=!1:w.value=!0;const al=Number(Le==null?void 0:Le.contents);R.value=Number.isNaN(al)?void 0:al,re.value=Fe==null?void 0:Fe.contents,X.value=Ne==null?void 0:Ne.contents,ye.value=me==null?void 0:me.contents;const Qa=Te==null?void 0:Te.contents;if(Qa===void 0?I.value=fi.BLOCK:typeof Qa=="boolean"?I.value=Qa?fi.ORDINARY:fi.BLOCK:I.value=Qa,fe.value=typeof(Qe==null?void 0:Qe.contents)!="boolean"?!(!(Qe!=null&&Qe.contents)===""||((Ee=Qe==null?void 0:Qe.contents)==null?void 0:Ee.toUpperCase())==="VERTICAL"):Qe==null?void 0:Qe.contents,((ba=ne==null?void 0:ne.contents)==null?void 0:ba.length)>0&&Array.isArray(ne==null?void 0:ne.contents)){let ea=n.allMapContents;const La=(yl=(Xa=dl.safeClone(ne))==null?void 0:Xa.contents)==null?void 0:yl.map((Re,ur)=>{var wl,Lr,Kl,on,Rr,qr,En,$n,Cn,mn,Mn,rn,Dn;let wr=(Re==null?void 0:Re.label)??(Re==null?void 0:Re.key)??"";Re==null||Re.type;let Yr=(Re==null?void 0:Re.options)??[];if((wl=Re==null?void 0:Re.key)!=null&&wl.includes("$")&&(wr=(Lr=dl.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Lr[0],((on=(Kl=dl.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Kl[1])==null?void 0:on.length)>0)){const[Vr,Xr]=(qr=(Rr=dl.safeClone(Re==null?void 0:Re.key).split("$"))==null?void 0:Rr[1])==null?void 0:qr.split(/[()]/);(En=le.FormType.find(_n=>(_n==null?void 0:_n.key)===Vr))==null||En.value,(($n=Xr==null?void 0:Xr.split(","))==null?void 0:$n.length)>0&&(Yr=(Cn=Xr==null?void 0:Xr.split(","))==null?void 0:Cn.map(_n=>({label:_n,value:_n})))}let tr=Re==null?void 0:Re.options;((mn=Re==null?void 0:Re.optionUrl)==null?void 0:mn.selectRelateType)==="自定义绑定"&&(tr=(rn=(Mn=Re==null?void 0:Re.optionUrl)==null?void 0:Mn.defaultSelect)==null?void 0:rn.map(Vr=>({label:Vr,value:Vr})));let lr=(Re==null?void 0:Re.menuPath)??[],un=(Re==null?void 0:Re.groups)??[],Xl=(Re==null?void 0:Re.columns)??[],Ul=!1,Tr=(Re==null?void 0:Re.isFormColHidden)??!1,Nr="",El=Re!=null&&Re.value?Re.value:(tr==null?void 0:tr.length)>0?(Dn=tr==null?void 0:tr[0])==null?void 0:Dn.value:(Re==null?void 0:Re.value)??"",Zl=!1,rr="Input";return((tr==null?void 0:tr.length)>0||(lr==null?void 0:lr.length)>0)&&(rr="Select"),(Array.isArray(Nr)&&(Nr!=null&&Nr.every(Vr=>(Vr==null?void 0:Vr.name)&&(Vr==null?void 0:Vr.url)))||Array.isArray(El)&&(El!=null&&El.every(Vr=>(Vr==null?void 0:Vr.name)&&(Vr==null?void 0:Vr.url))))&&(rr="upload"),Re!=null&&Re.isMainUrl&&(rr="Url"),{label:wr??"",name:wr??"t"+ur,prop:wr??dl.safeClone(Re==null?void 0:Re.key),type:(Re==null?void 0:Re.type)??rr,value:(Re==null?void 0:Re.type)==="Date"&&El===""?new Date:El,id:(Re==null?void 0:Re.id)??ur,contents:(tr==null?void 0:tr.length)>0?tr:Yr??[],width:(Re==null?void 0:Re.width)??1,isLoginUser:Ul,config:Re==null?void 0:Re.config,optionUrl:(Re==null?void 0:Re.optionUrl)??Re,isFormColHidden:Tr,isHideInForm:(Re==null?void 0:Re.isHideInForm)??!1,signature:Zl,isMain:Re==null?void 0:Re.isMain,required:(Re==null?void 0:Re.required)??!1,isMainUrl:Re==null?void 0:Re.isMainUrl,operable:(Re==null?void 0:Re.operable)??!1,disabled:(Re==null?void 0:Re.disabled)??!1,isSync:Re==null?void 0:Re.isSync,menus:lr,groups:un,words:Xl,allSelectionContents:Re==null?void 0:Re.allContents,filterContent:Re==null?void 0:Re.filterContents,isNoClick:(Re==null?void 0:Re.isNoClick)??!1,functionName:Re==null?void 0:Re.functionName,functionRelatedWords:Re==null?void 0:Re.functionRelatedWords,calculatorFilter:Re==null?void 0:Re.calculatorFilter,filters:Re==null?void 0:Re.filters}}),Bl=La==null?void 0:La.map(Re=>Re==null?void 0:Re.value);let Ol="";Bl==null||Bl.forEach(Re=>{Re!==""&&Re!==void 0&&(Ol=Ol===""?Re:Ol+"/"+Re)}),b.setSelectArray(Bl),b.setSelectString(Ol);let ma=(zl=dl.safeClone(La))==null?void 0:zl.map(Re=>(Re!=null&&Re.value&&le.IsJson(Re==null?void 0:Re.value)&&Array.isArray(JSON.parse(Re==null?void 0:Re.value))&&(Re.value=JSON.parse(Re.value)),Re)),Sr={};ma==null||ma.forEach(Re=>{Sr[Re.label]=Re==null?void 0:Re.value}),ma=ma==null?void 0:ma.map(Re=>{var ur,wr,Yr,tr,lr,un,Xl,Ul,Tr;if((Re==null?void 0:Re.type)==="Select"&&((ur=Re==null?void 0:Re.allSelectionContents)==null?void 0:ur.length)>0&&(Re.contactValue=Sr),(Yr=(wr=Re==null?void 0:Re.optionUrl)==null?void 0:wr.menuSelect)!=null&&Yr.some(Nr=>Nr==null?void 0:Nr.includes("["))){let Nr="";Re.optionUrl.oldMenuSelect=(lr=(tr=dl.safeClone(Re))==null?void 0:tr.optionUrl)==null?void 0:lr.menuSelect,Re.optionUrl.menuSelect=(Xl=(un=Re==null?void 0:Re.optionUrl)==null?void 0:un.menuSelect)==null?void 0:Xl.map(El=>{var Zl,rr,Dr,wl,Lr,Kl;if(El!=null&&El.includes("[")){let on=(rr=(Zl=El==null?void 0:El.replaceAll("[","").replaceAll("]",""))==null?void 0:Zl.split(":"))==null?void 0:rr[1];Nr=ya((Dr=El==null?void 0:El.replaceAll("[","").replaceAll("]",""))==null?void 0:Dr.split(":"),ea==null?void 0:ea[We.value],ea),El=((Lr=(wl=dl.safeClone(ma))==null?void 0:wl.find(Rr=>(Rr==null?void 0:Rr.label)===on))==null?void 0:Lr.value)||ya((Kl=El==null?void 0:El.replaceAll("[","").replaceAll("]",""))==null?void 0:Kl.split(":"),ea==null?void 0:ea[We.value],ea)}return El}),Nr!==""&&Re.value===""&&(Re.value=Ze(Re.optionUrl.menuSelect,Re.optionUrl.oldMenuSelect,(Ul=Re==null?void 0:Re.optionUrl)==null?void 0:Ul.groupSelect,ea),Array.isArray(Re.value)&&((Tr=Re.value)!=null&&Tr.every(El=>El==null?void 0:El.url))&&(Re.type="UPLOAD"))}return Re}),u.value=ma,la.value=((pa=u.value)==null?void 0:pa.every(Re=>Re==null?void 0:Re.disabled))||W.value===We.value,Ke.value=(Ha=u.value)==null?void 0:Ha.every(Re=>Re==null?void 0:Re.operable),Ea.value=(va=u.value)==null?void 0:va.map(Re=>Re==null?void 0:Re.label);let Ur=[],Gr=[];if((Ca=dl.safeClone(u.value))==null||Ca.forEach(Re=>{var ur;Array.isArray(Re==null?void 0:Re.value)&&((ur=Re==null?void 0:Re.value)!=null&&ur.find(wr=>{var Yr;return(Yr=wr==null?void 0:wr.url)==null?void 0:Yr.includes(".obj")}))&&(Gr=Re==null?void 0:Re.value)}),(Gr==null?void 0:Gr.length)>0){const Re=(Aa=dl.safeClone(Gr))==null?void 0:Aa.filter(ur=>{var wr;return(wr=ur==null?void 0:ur.url)==null?void 0:wr.includes(".obj")});Re==null||Re.forEach(ur=>{var Yr,tr,lr,un;const wr=(Yr=Gr==null?void 0:Gr.filter(Xl=>{var Ul;return(Xl==null?void 0:Xl.name)===(ur==null?void 0:ur.name)&&((Ul=Xl==null?void 0:Xl.url)==null?void 0:Ul.includes(".mtl"))}))==null?void 0:Yr.map(Xl=>Xl==null?void 0:Xl.url);Ur.push({objUrl:ur==null?void 0:ur.url,mtlUrls:((tr=Gr==null?void 0:Gr.filter(Xl=>{var Ul;return(Xl==null?void 0:Xl.name)===(ur==null?void 0:ur.name)&&((Ul=Xl==null?void 0:Xl.url)==null?void 0:Ul.includes(".mtl"))}))==null?void 0:tr.length)===1?(un=(lr=Gr==null?void 0:Gr.filter(Xl=>{var Ul;return(Xl==null?void 0:Xl.name)===(ur==null?void 0:ur.name)&&((Ul=Xl==null?void 0:Xl.url)==null?void 0:Ul.includes(".mtl"))}))==null?void 0:lr[0])==null?void 0:un.url:wr})}),_.setObjUrl(Ur)}(pl=dl.safeClone(u.value))==null||pl.forEach(Re=>{var ur,wr,Yr,tr,lr,un,Xl,Ul,Tr,Nr,El,Zl,rr;if((wr=(ur=Re==null?void 0:Re.value)==null?void 0:ur.toString())!=null&&wr.includes(".stl")||(tr=(Yr=Re==null?void 0:Re.value)==null?void 0:Yr.toString())!=null&&tr.includes(".STL")||(un=(lr=Re==null?void 0:Re.value)==null?void 0:lr.toString())!=null&&un.includes(".obj")||(Ul=(Xl=Re==null?void 0:Re.value)==null?void 0:Xl.toString())!=null&&Ul.includes(".mtl")||(Nr=(Tr=Re==null?void 0:Re.value)==null?void 0:Tr.toString())!=null&&Nr.includes(".urdf")){let Dr={},wl=[],Lr;Array.isArray(Re==null?void 0:Re.value)?Lr=Re==null?void 0:Re.value:Lr=(El=Re==null?void 0:Re.value)==null?void 0:El.split(","),Lr==null||Lr.forEach(Kl=>{Kl.includes(".mtl")?wl.push(Kl):Dr.blob=Dr.blob==="undefined"?Kl:Dr.blob+","+Kl}),(wl==null?void 0:wl.length)>0&&(Dr.mtlBlobs=wl),(rr=(Zl=Object.values(Dr))==null?void 0:Zl[0])!=null&&rr.includes("http:")}})}else u.value=[];let Tl=ze.value;if((Tl==null?void 0:Tl.length)>0&&(Tl=Tl==null?void 0:Tl.map(ea=>{var Bl,Ol,ma,Sr;let La=(Bl=ea==null?void 0:ea.key)==null?void 0:Bl.split("/");return(n==null?void 0:n.compName)===(La==null?void 0:La[0])&&(Ol=u.value)!=null&&Ol.find(Ur=>(Ur==null?void 0:Ur.prop)===(La==null?void 0:La[1]))&&(ea.value=(Sr=(ma=u.value)==null?void 0:ma.find(Ur=>(Ur==null?void 0:Ur.prop)===(La==null?void 0:La[1])))==null?void 0:Sr.value),ea}),ve.setTableViewContents(Tl)),n!=null&&n.formRules)A.value=n==null?void 0:n.formRules;else{let ea={};(Pe=dl.safeClone(u).value)==null||Pe.forEach(La=>{((La==null?void 0:La.isMain)===!0||(La==null?void 0:La.required)===!0)&&(ea[(La==null?void 0:La.prop)??(La==null?void 0:La.name)]=[{required:!0,message:`${(La==null?void 0:La.label)||(La==null?void 0:La.prop)||(La==null?void 0:La.name)}不能为空`}])}),A.value=ea}if(((kl=ua==null?void 0:ua.contents)==null?void 0:kl.length)>0){const ea=[];(cr=ua==null?void 0:ua.contents)==null||cr.forEach((La,Bl)=>{(La==null?void 0:La.label)!==""&&ea.push({label:(La==null?void 0:La.label)??"",id:(La==null?void 0:La.id)??Bl,type:(La==null?void 0:La.type)??"",background:La==null?void 0:La.background})}),O.value=ea}else O.value=[];(Cr=u.value)!=null&&Cr.some(ea=>(ea==null?void 0:ea.functionName)&&(ea==null?void 0:ea.functionName)!=="")&&(u.value=await Ae(u.value))},{deep:!0,immediate:!0}),e.watch(()=>W.value,ne=>{la.value=ne===We.value},{immediate:!0}),(ne,pe)=>{var Fe;const ua=e.resolveComponent("svg-icon"),Qe=e.resolveComponent("el-switch"),Da=e.resolveComponent("el-checkbox"),Te=e.resolveComponent("el-popover"),Le=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Mh,[I.value===e.unref(fi).TEXT?(e.openBlock(),e.createBlock(Gc,{key:0,itemData:a.itemData,compName:a.compName,calculator:a.calculator,fields:u.value,textSize:R.value,textColor:re.value,backGround:X.value,backGroundImage:ye.value,disabled:la.value||Ce(),iconUrl:p.value,"onUpdate:backGroundImage":Na,backgroundUrl:o.value,backgroundPosition:c.value},null,8,["itemData","compName","calculator","fields","textSize","textColor","backGround","backGroundImage","disabled","iconUrl","backgroundUrl","backgroundPosition"])):I.value===e.unref(fi).BLOCK?(e.openBlock(),e.createBlock(c0,{key:1,items:(Fe=u.value)==null?void 0:Fe.map(Ne=>({label:Ne!=null&&Ne.isHideInForm?"":Ne==null?void 0:Ne.label,value:Ne==null?void 0:Ne.value,width:(Ne==null?void 0:Ne.width)??1,field:Ne,filters:Ne==null?void 0:Ne.filters})),textSize:R.value,textColor:re.value,backGround:X.value,iconUrl:p.value,backGroundImage:ye.value,disabled:la.value||Ce(),calculator:a.calculator,"onUpdate:backGroundImage":Na,backgroundUrl:o.value,backgroundPosition:c.value},null,8,["items","textSize","textColor","backGround","iconUrl","backGroundImage","disabled","calculator","backgroundUrl","backgroundPosition"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":I.value===e.unref(fi).ORDINARY})},[e.createVNode(dl.ssForm,{rowContents:u.value,formRules:A.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:!0,textSize:R.value,textColor:re.value,backGround:X.value,backGroundImage:ye.value,onOnButtonClick:ta,onChange:je,formDisabled:la.value||Ce(),formLabelsOperable:Ke.value,isButtonRow:w.value,onPreview:da,onBlurChange:Fa,style:e.normalizeStyle({backGroundImage:o.value!==""?`url("${o.value}")`:void 0}),onHandleColEditChange:ga,onHandleColTypeChange:Ta,onRouteUrl:ca,onClickTrigger:he,"onUpdate:backGroundImage":Na},{operateCol:e.withCtx(({renderColumns:Ne,formDisabled:me,formLabelsOperable:al})=>[e.createVNode(Te,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ee},{reference:e.withCtx(()=>[e.createElementVNode("span",Ih,[e.createVNode(ua,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Oh,[pe[1]||(pe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(Qe,{"model-value":me,"active-text":"禁用","inactive-text":"",onChange:$,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(Qe,{"model-value":al,"active-text":"编辑所有标签","inactive-text":"",onChange:V},null,8,["model-value"]),pe[2]||(pe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Le,{modelValue:Ea.value,"onUpdate:modelValue":pe[0]||(pe[0]=Qa=>Ea.value=Qa),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:we,onChange:ce},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ne,Qa=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Qa.label},[e.createVNode(Da,{value:Qa.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Qa.label),1)]),_:2},1032,["value"]),e.createVNode(Te,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(ua,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Tl;return[e.createElementVNode("div",Lh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Tl=Object.keys(Qa))==null?void 0:Tl.filter(Rl=>{var Al;return(Al=Ge.value)==null?void 0:Al.find(Pl=>(Pl==null?void 0:Pl.value)===Rl)}),Rl=>{var Al,Pl;return e.openBlock(),e.createElementBlock("div",{key:Rl},[e.createVNode(dl._sfc_main$1,{value:Qa==null?void 0:Qa[Rl],"active-text":(Pl=(Al=Ge.value)==null?void 0:Al.find(ll=>(ll==null?void 0:ll.value)===Rl))==null?void 0:Pl.label,inactiveText:"",onChange:ll=>De(ll,Rl,Qa)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Rh,[e.createVNode(ua,{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)),Y.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:3,fileDataList:E.value,onDestroy:ja},null,8,["fileDataList"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock($r.ssDialog,{key:4,visible:m.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:y.value,onGetAnimationData:ne.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Os=sr._export_sfc($h,[["__scopeId","data-v-b1c6d66b"]]),Vh={class:"table-header-child"},Fh={class:"table-header-child-main"},Ph={class:"table-header-child-content"},jh={class:"table-header-child-content-item"},Hh={class:"fix-button"},Uh={key:0},qh={class:"form-content"},Wh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref(""),p=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(p);e.ref(0);const u=e.ref(""),m=e.ref([]),g=e.ref([]),y=E=>{var x;i.value=!0;let S=[];xr==null||xr.forEach(b=>{let _=M.cloneDeep(c.value)+1;p.setTableIndex(_),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:c.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((x=E==null?void 0:E.children)==null?void 0:x.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),u.value=E==null?void 0:E.id,m.value=S,g.value=S},d=E=>{n("fixChange",M.cloneDeep(E))},A=E=>{n("deleteChange",M.cloneDeep(E))},w=E=>{i.value=!0;let S=[];xr==null||xr.forEach(x=>{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),S.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:c.value,contents:x==null?void 0:x.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},Y=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(x=>(x.children||(x.value=E==null?void 0:E[x.name]),x)),g.value=S},D=()=>{var S,x;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(b=>{const _=xr==null?void 0:xr.find(I=>(I==null?void 0:I.label)===(b==null?void 0:b.label));_?E[_.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),E.id="id"+c.value,(x=m.value)==null||x.forEach(_=>{const I=xr==null?void 0:xr.find(R=>(R==null?void 0:R.label)===(_==null?void 0:_.label));I?E[I.key]=_.value:_!=null&&_.children&&_.children.length>0&&(E.children=_.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},P=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},O=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(b,_)=>(e.openBlock(),e.createElementBlock("div",Fh,[e.createElementVNode("div",Ph,[e.createElementVNode("div",jh,e.toDisplayString(b.label),1),e.createElementVNode("div",Hh,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>w(b)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>y(b)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>O(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",Uh,[e.createVNode(Yc,{tableChildContents:b==null?void 0:b.children,onDeleteChange:A,onFixChange:d},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode($r.ssDialog,{visible:i.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:P,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:D},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Kh=sr._export_sfc(Wh,[["__scopeId","data-v-e0fef72d"]]),Gh={class:"table-header-child"},Yh={class:"table-header-child-main"},Jh={class:"table-header-child-content"},Xh={class:"table-header-child-content-item"},Zh={class:"fix-button"},Qh={key:0},e6={class:"form-content"},a6={class:"dialog-footer"},l6={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref(""),p=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(p),u=e.ref(""),m=e.ref([]),g=e.ref([]),y=E=>{n("fixChange",M.cloneDeep(E))},d=E=>{var x;i.value=!0;let S=[];xr==null||xr.forEach(b=>{let _=M.cloneDeep(c.value)+1;p.setTableIndex(_),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:c.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((x=E==null?void 0:E.children)==null?void 0:x.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),u.value=E==null?void 0:E.id,m.value=S,g.value=S},A=E=>{i.value=!0;let S=[];xr==null||xr.forEach(x=>{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),S.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:c.value,contents:x==null?void 0:x.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},w=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(x=>(x.children||(x.value=E==null?void 0:E[x.name]),x)),g.value=S},Y=()=>{var S,x;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(b=>{const _=xr==null?void 0:xr.find(I=>(I==null?void 0:I.label)===(b==null?void 0:b.label));_?E[_.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let b=M.cloneDeep(c.value)+1;p.setTableIndex(b),E.id="idChild"+c.value,(x=m.value)==null||x.forEach(_=>{const I=xr==null?void 0:xr.find(R=>(R==null?void 0:R.label)===(_==null?void 0:_.label));I?E[I.key]=_.value:_!=null&&_.children&&_.children.length>0&&(E.children=_.children)}),i.value=!1,n("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},D=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},P=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},O=E=>{n("deleteChange",E)};return(E,S)=>{const x=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Gh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(_,I)=>(e.openBlock(),e.createElementBlock("div",Yh,[e.createElementVNode("div",Jh,[e.createElementVNode("div",Xh,e.toDisplayString(_.label),1),e.createElementVNode("div",Zh,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>A(_)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>d(_)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>P(_)},null,8,["onClick"])])]),_!=null&&_.children&&_.children.length>0?(e.openBlock(),e.createElementBlock("div",Qh,[e.createVNode(Kh,{tableChildContents:_==null?void 0:_.children,onDeleteChange:O,onFixChange:y},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode($r.ssDialog,{visible:i.value,onBeforeDestroy:D,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",e6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",a6,[e.createVNode(b,{onClick:D,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"ok-button button",onClick:Y,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Yc=sr._export_sfc(l6,[["__scopeId","data-v-ebd68fa1"]]),r6={class:"table-operate-content"},n6={class:"table-operate-item"},i6={class:"operate-title"},o6={class:"operate-content"},t6={class:"fix-content"},s6={class:"fix-content-label"},c6={class:"fix-button"},u6={key:0},d6={class:"operate-title"},p6={class:"operate-content"},f6={class:"fix-content"},h6={class:"fix-content-label"},v6={class:"fix-button"},m6={class:"operate-title"},y6={class:"operate-content"},g6={class:"fix-content"},b6={class:"fix-content-label"},k6={class:"fix-button"},x6={class:"operate-title"},w6={class:"operate-content"},_6={class:"fix-content"},S6={class:"fix-content-label"},E6={class:"fix-button"},C6={class:"operate-content"},D6={style:{display:"flex","justify-content":"space-between"}},T6={class:"form-content"},B6={class:"dialog-footer"},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={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]),o=e.ref(!1),p=e.ref(!1),c=e.ref([]),u=e.ref(!1),m=e.ref([]),g=e.ref(!1),y=e.ref([]),d=e.ref(""),A=e.ref(""),w=e.ref([]),Y=e.ref([]),D=e.ref([]),P=e.ref([]),O=e.ref(!1),E=e.ref([]),S=e.ref([]),x=e.ref(0),b=e.ref([]),_=e.ref([]),I=e.ref([]),R=()=>{O.value=!0;let $=[];Gn==null||Gn.forEach(V=>{x.value++,$.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.key)==="background"?"var(--ssComponent-primary-color)":"",id:x.value,contents:V==null?void 0:V.options})}),E.value=$,S.value=$},re=()=>{var V,ee,ce;p.value=!0;let $=[];(ce=(ee=(V=le.FormContent)==null?void 0:V.find(he=>(he==null?void 0:he.key)==="Input"))==null?void 0:ee.value)==null||ce.forEach(he=>{x.value++,$.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:(he==null?void 0:he.label)==="类型"?"Input":"",id:x.value,contents:he==null?void 0:he.options})}),b.value=$,_.value=$},X=$=>{$||(b.value=_.value)},ye=async $=>{var V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na;if(($==null?void 0:$.类型)!==((ee=(V=_.value)==null?void 0:V.find(da=>(da==null?void 0:da.label)==="类型"))==null?void 0:ee.value)){let da=[],ja=await((ca=(he=(ce=le.FormContent)==null?void 0:ce.find(ta=>(ta==null?void 0:ta.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:he.value)==null?void 0:ca.value)?await((De=(Ta=(ga=le.FormContent)==null?void 0:ga.find(ta=>(ta==null?void 0:ta.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:Ta.value)==null?void 0:De.value):(Ve=(ia=le.FormContent)==null?void 0:ia.find(ta=>(ta==null?void 0:ta.key)===(($==null?void 0:$.类型)===""?"Input":$==null?void 0:$.类型)))==null?void 0:Ve.value;if(ja==null||ja.forEach(ta=>{x.value++,da.push({label:ta==null?void 0:ta.label,name:(ta==null?void 0:ta.name)||(ta==null?void 0:ta.label),type:ta.type,value:ta!=null&&ta.属性名?($==null?void 0:$.prop)||($==null?void 0:$.name)||($==null?void 0:$.label):($==null?void 0:$[ta.label])??"",id:x.value,contents:ta==null?void 0:ta.options,prop:(ta==null?void 0:ta.prop)||(ta==null?void 0:ta.name)||(ta==null?void 0:ta.label)})}),$!=null&&$.菜单选项&&((Fa=$==null?void 0:$.菜单选项)==null?void 0:Fa.length)>0){const ta=await le.menuToContentType($==null?void 0:$.菜单选项);da=da==null?void 0:da.map(je=>((je==null?void 0:je.name)==="组信息选项"&&(je.contents=ta),je))}_.value=await le.selectToBase(M.cloneDeep(da)),b.value=await le.selectToBase(M.cloneDeep(da))}else{let da=M.cloneDeep(b.value);if(da=da==null?void 0:da.map(ja=>(ja.value=$==null?void 0:$[ja.name],ja)),$!=null&&$.菜单选项&&((Na=$==null?void 0:$.菜单选项)==null?void 0:Na.length)>0){const ja=await le.menuToContentType($==null?void 0:$.菜单选项);da=da==null?void 0:da.map(ta=>((ta==null?void 0:ta.name)==="组信息选项"&&(ta.contents=ja),ta))}da=le.formToOptionsContents(da),_.value=await le.selectToBase(M.cloneDeep(da))}},fe=async $=>{await ye($),b.value=_.value},U=($,V)=>{if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="selectRelateType"){const ee=V==null?void 0:V.optionUrl;return(ee==null?void 0:ee.selectRelateType)||V[$.key]}if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="menuSelect"){const ee=V==null?void 0:V.optionUrl;return(ee==null?void 0:ee.menuSelect)||V[$.key]}if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="groupSelect"){const ee=V==null?void 0:V.optionUrl;return(ee==null?void 0:ee.groupSelect)||V[$.key]}if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="originalContent")return(V==null?void 0:V.value)||V[$.key];if((V==null?void 0:V.type)=="Select"&&($==null?void 0:$.key)==="multiple"){const ee=V[$.key];return dc(ee)?ee:$.default}return($==null?void 0:$.label)==="类型"&&V[$.key]===""?"Input":($==null?void 0:$.key)==="isFormColHidden"&&!V[$.key]?!1:V[$.key]},q=async $=>{var ce,he,ca,ia,Ve,ga,Ta,De,Fa;p.value=!0;let V=[];const ee=await((ca=(he=(ce=le.FormContent)==null?void 0:ce.find(Na=>(Na==null?void 0:Na.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:he.value)==null?void 0:ca.value)?await((De=(Ta=(ga=le.FormContent)==null?void 0:ga.find(Na=>(Na==null?void 0:Na.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:Ta.value)==null?void 0:De.value):(Ve=(ia=le.FormContent)==null?void 0:ia.find(Na=>(Na==null?void 0:Na.key)===(($==null?void 0:$.type)===""?"Input":$==null?void 0:$.type)))==null?void 0:Ve.value;if(ee==null||ee.forEach(Na=>{x.value++,V.push({label:Na==null?void 0:Na.label,name:(Na==null?void 0:Na.name)||(Na==null?void 0:Na.label),type:Na.type,value:(Na==null?void 0:Na.label)==="属性名"?($==null?void 0:$.prop)||($==null?void 0:$.name)||($==null?void 0:$.label):U(Na,$),id:x.value,contents:Na==null?void 0:Na.options})}),$!=null&&$.menuSelect&&((Fa=$==null?void 0:$.menuSelect)==null?void 0:Fa.length)>0){const Na=await le.menuToContentType($==null?void 0:$.menuSelect);V=V==null?void 0:V.map(da=>((da==null?void 0:da.name)==="组信息选项"&&(da.contents=Na),da))}d.value=$==null?void 0:$.id,b.value=await le.selectToBase(le.formToOptionsContents(V)),_.value=await le.selectToBase(le.formToOptionsContents(V))},Z=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;I.value=(V=M.cloneDeep(I.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="tableToForm"&&(ce.contents=I.value),ce))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ae=()=>{p.value=!1,b.value=[],d.value=""},ve=async()=>{var ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na;b.value=_.value;let $={};d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value);let V=await((ca=(he=(ce=le.FormContent)==null?void 0:ce.find(da=>{var ja,ta;return(da==null?void 0:da.key)===(((ta=(ja=b.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:ta.value)??"label")}))==null?void 0:he.value)==null?void 0:ca.value)??((Ve=(ia=le.FormContent)==null?void 0:ia.find(da=>{var ja,ta;return(da==null?void 0:da.key)===(((ta=(ja=b.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:ta.value)??"label")}))==null?void 0:Ve.value);if((ga=b.value)==null||ga.forEach(da=>{const ja=V==null?void 0:V.find(ta=>(ta==null?void 0:ta.label)===(da==null?void 0:da.label));ja&&($[ja.key]=da.value)}),$.name=$.label,(Ta=I.value)!=null&&Ta.find(da=>da.id===$.id))I.value=(De=I.value)==null?void 0:De.map(da=>(da.id===$.id&&(da=$),da));else{let da=M.cloneDeep(I.value);I.value||(I.value=[]),da.push($),I.value=da}I.value=I.value.map(({id:da,...ja})=>ja),p.value=!1,d.value="";let ee=M.cloneDeep(r.originalItemContents);(Fa=M.cloneDeep(r.originalItemContents))!=null&&Fa.find(da=>(da==null?void 0:da.key)==="tableToForm")?ee=(Na=M.cloneDeep(r.originalItemContents))==null?void 0:Na.map(da=>((da==null?void 0:da.key)==="tableToForm"&&(da.contents=I.value),da)):ee.push({key:"tableToForm",contents:I.value}),n("change",ee)},ze=$=>{O.value=!0;let V=[];Gn==null||Gn.forEach(ee=>{x.value++,V.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:$[ee.key],id:x.value,contents:ee==null?void 0:ee.options})}),d.value=$==null?void 0:$.id,E.value=V,S.value=V};e.watch(()=>g.value,()=>{var V,ee;let $=M.cloneDeep(r.originalItemContents);(V=M.cloneDeep(r.originalItemContents))!=null&&V.find(ce=>(ce==null?void 0:ce.key)==="page")?$=(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="page"&&(ce.contents=g.value),ce)):$.push({key:"page",contents:g.value}),n("change",$)},{deep:!0});const te=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;Y.value=(V=M.cloneDeep(Y.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="extraButton"&&(ce.contents=Y.value),ce))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var ee,ce,he,ca,ia;E.value=S.value;let $={};if(d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value),(ee=E.value)==null||ee.forEach(Ve=>{const ga=Gn==null?void 0:Gn.find(Ta=>(Ta==null?void 0:Ta.label)===(Ve==null?void 0:Ve.label));ga?$[ga.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&($.children=Ve.children)}),(ce=Y.value)!=null&&ce.find(Ve=>Ve.id===$.id))Y.value=(he=Y.value)==null?void 0:he.map(Ve=>(Ve.id===$.id&&(Ve=$),Ve));else{let Ve=M.cloneDeep(Y.value)??[];Ve.push($),Y.value=Ve}O.value=!1,d.value="";let V=M.cloneDeep(r.originalItemContents);(ca=M.cloneDeep(r.originalItemContents))!=null&&ca.find(Ve=>(Ve==null?void 0:Ve.key)==="extraButton")?V=(ia=M.cloneDeep(r.originalItemContents))==null?void 0:ia.map(Ve=>((Ve==null?void 0:Ve.key)==="extraButton"&&(Ve.contents=Y.value),Ve)):V.push({key:"extraButton",contents:Y.value}),n("change",V)},se=$=>{let V=M.cloneDeep(S.value);V=V==null?void 0:V.map(ee=>(ee.children||(ee.value=$==null?void 0:$[ee.name]),ee)),S.value=V},W=()=>{O.value=!1,E.value=[],d.value=""},ue=$=>{u.value=!0;let V=[];Yn==null||Yn.forEach(ee=>{x.value++,V.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:$[ee.key],id:x.value,contents:ee==null?void 0:ee.options})}),d.value=$==null?void 0:$.id,D.value=V,P.value=V},_e=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;w.value=(V=M.cloneDeep(w.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>((ce==null?void 0:ce.key)==="rowButton"&&(ce.contents=w.value),ce))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},we=()=>{o.value=!0;let $=[];xr==null||xr.forEach(V=>{x.value++,$.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),m.value=$,y.value=$},Ke=()=>{u.value=!0;let $=[];Yn==null||Yn.forEach(V=>{x.value++,$.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),D.value=$,P.value=$},la=$=>{let V=M.cloneDeep(P.value);V=V==null?void 0:V.map(ee=>(ee.children||(ee.value=$==null?void 0:$[ee.name]),ee)),P.value=V},j=()=>{var ee,ce,he,ca,ia;D.value=P.value;let $={};if(d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value),(ee=D.value)==null||ee.forEach(Ve=>{const ga=Yn==null?void 0:Yn.find(Ta=>(Ta==null?void 0:Ta.label)===(Ve==null?void 0:Ve.label));ga?$[ga.key]=Ve.value:Ve!=null&&Ve.children&&Ve.children.length>0&&($.children=Ve.children)}),(ce=w.value)!=null&&ce.find(Ve=>Ve.id===$.id))w.value=(he=w.value)==null?void 0:he.map(Ve=>(Ve.id===$.id&&(Ve=$),Ve));else{let Ve=M.cloneDeep(w.value);Ve.push($),w.value=Ve}u.value=!1,d.value="";let V=M.cloneDeep(r.originalItemContents);(ca=M.cloneDeep(r.originalItemContents))!=null&&ca.find(Ve=>(Ve==null?void 0:Ve.key)==="rowButton")?V=(ia=M.cloneDeep(r.originalItemContents))==null?void 0:ia.map(Ve=>((Ve==null?void 0:Ve.key)==="rowButton"&&(Ve.contents=w.value),Ve)):V.push({key:"rowButton",contents:w.value}),n("change",V)},We=()=>{u.value=!1,d.value="",P.value=[],D.value=[]},Oe=$=>{o.value=!0;let V=[];xr==null||xr.forEach(ee=>{x.value++,V.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:"",id:x.value,contents:ee==null?void 0:ee.options})}),m.value=V,A.value=$==null?void 0:$.id,y.value=V},Ie=$=>{var V;c.value=Hc(M.cloneDeep(c.value),$==null?void 0:$.id),n("change",(V=M.cloneDeep(r.originalItemContents))==null?void 0:V.map(ee=>{var ce;return(ee==null?void 0:ee.key)==="header"&&(ee.contents=(ce=c.value)!=null&&ce.some(he=>he==null?void 0:he.children)?[c.value]:c.value),ee}))},Me=$=>{var ee,ce,he;$.type==="fix"?$.id!==""?c.value=qc(c.value,$):c.value=Uc(c.value,$==null?void 0:$.contents):c.value=Wc(c.value,$),c.value=(ee=c.value)!=null&&ee.some(ca=>ca==null?void 0:ca.children)?[c.value]:c.value,d.value="";let V=M.cloneDeep(r.originalItemContents);(ce=M.cloneDeep(r.originalItemContents))!=null&&ce.find(ca=>(ca==null?void 0:ca.key)==="header")?V=(he=M.cloneDeep(r.originalItemContents))==null?void 0:he.map(ca=>((ca==null?void 0:ca.key)==="header"&&(ca.contents=c.value),ca)):V.push({key:"header",contents:c.value}),n("change",V)},de=$=>{var ee;o.value=!0;let V=[];xr==null||xr.forEach(ce=>{x.value++,V.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,value:$[ce.key],id:x.value,contents:ce==null?void 0:ce.options})}),$!=null&&$.children&&((ee=$==null?void 0:$.children)==null?void 0:ee.length)>0&&V.push({children:$==null?void 0:$.children,isFormColHidden:!0}),d.value=$==null?void 0:$.id,A.value="",m.value=V,y.value=V},Ce=$=>{let V=M.cloneDeep(y.value);V=V==null?void 0:V.map(ee=>(ee.children||(ee.value=$==null?void 0:$[ee.name]),ee)),y.value=V},Je=()=>{o.value=!1,d.value="",A.value="",y.value=[]},Ea=()=>{var ee,ce,he,ca,ia,Ve;m.value=y.value;let $={};if(d.value!==""?$.id=d.value:(x.value++,$.id="id"+x.value),(ee=m.value)==null||ee.forEach(ga=>{const Ta=xr==null?void 0:xr.find(De=>(De==null?void 0:De.label)===(ga==null?void 0:ga.label));Ta?$[Ta.key]=ga.value:ga!=null&&ga.children&&ga.children.length>0&&($.children=ga.children)}),(ce=c.value)!=null&&ce.find(ga=>ga.id===$.id))c.value=(he=c.value)==null?void 0:he.map(ga=>(ga.id===$.id&&(ga=$),ga));else{let ga=M.cloneDeep(c.value)??[];A.value===""?ga.push($):ga=ga==null?void 0:ga.map(Ta=>(Ta.id===A.value&&(Ta.children||(Ta.children=[]),Ta.children.push($)),Ta)),c.value=ga}c.value=(ca=c.value)!=null&&ca.some(ga=>ga==null?void 0:ga.children)?[c.value]:c.value,o.value=!1,d.value="",A.value="";let V=M.cloneDeep(r.originalItemContents);(ia=M.cloneDeep(r.originalItemContents))!=null&&ia.find(ga=>(ga==null?void 0:ga.key)==="header")?V=(Ve=M.cloneDeep(r.originalItemContents))==null?void 0:Ve.map(ga=>((ga==null?void 0:ga.key)==="header"&&(ga.contents=c.value),ga)):V.push({key:"header",contents:c.value}),n("change",V)},Ge=$=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ee;c.value=(V=M.cloneDeep(c.value))==null?void 0:V.filter(ce=>(ce==null?void 0:ce.id)!==($==null?void 0:$.id)),n("change",(ee=M.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ce=>{var he;return(ce==null?void 0:ce.key)==="header"&&(ce.contents=(he=c.value)!=null&&he.some(ca=>ca==null?void 0:ca.children)?[c.value]:c.value),ce})),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var $,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(i.value=M.cloneDeep(r.originalItemContents),c.value=(V=($=i.value)==null?void 0:$.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:V.contents,w.value=(ce=(ee=i.value)==null?void 0:ee.find(Ae=>(Ae==null?void 0:Ae.key)==="rowButton"))==null?void 0:ce.contents,Y.value=(ca=(he=i.value)==null?void 0:he.find(Ae=>(Ae==null?void 0:Ae.key)==="extraButton"))==null?void 0:ca.contents,g.value=(Ve=(ia=i.value)==null?void 0:ia.find(Ae=>(Ae==null?void 0:Ae.key)==="page"))!=null&&Ve.contents?!!((Ta=(ga=i.value)==null?void 0:ga.find(Ae=>(Ae==null?void 0:Ae.key)==="page"))!=null&&Ta.contents):!1,I.value=(Fa=(De=i.value)==null?void 0:De.find(Ae=>(Ae==null?void 0:Ae.key)==="tableToForm"))==null?void 0:Fa.contents,c.value=(Na=c.value)==null?void 0:Na.map((Ae,ne)=>(Array.isArray(Ae)?Ae=D3(Ae):Ae={label:(Ae==null?void 0:Ae.label)??"",prop:(Ae==null?void 0:Ae.label)==="操作"?"operate":Ae==null?void 0:Ae.prop,width:Ae!=null&&Ae.width?parseInt(Ae.width):"",fixed:(Ae==null?void 0:Ae.fixed)??void 0,sortable:(Ae==null?void 0:Ae.sortable)??!1,align:(Ae==null?void 0:Ae.align)??"left",showOverflowTooltip:(Ae==null?void 0:Ae.showOverflowTooltip)??!0,isNotDrag:(Ae==null?void 0:Ae.isNotDrag)??!1,isEditCol:(Ae==null?void 0:Ae.isEditCol)??!1,isOperate:(Ae==null?void 0:Ae.isOperate)??!1,id:(Ae==null?void 0:Ae.id)??ne,formMenuSelect:(Ae==null?void 0:Ae.formMenuSelect)??void 0,groupSelect:(Ae==null?void 0:Ae.groupSelect)??void 0},Ae)),c.value=(da=c.value)!=null&&da.every(Ae=>Array.isArray(Ae))?(ja=c.value)==null?void 0:ja[0]:c.value,w.value=(ta=w.value)==null?void 0:ta.map((Ae,ne)=>Ae={label:(Ae==null?void 0:Ae.label)??"",type:(Ae==null?void 0:Ae.type)??"",textColor:(Ae==null?void 0:Ae.textColor)??"#000000",id:(Ae==null?void 0:Ae.id)??ne}),Y.value=(je=Y.value)==null?void 0:je.map((Ae,ne)=>Ae={label:(Ae==null?void 0:Ae.label)??"",type:(Ae==null?void 0:Ae.type)??"",background:(Ae==null?void 0:Ae.background)??"var(--ssComponent-primary-color)",id:(Ae==null?void 0:Ae.id)??ne}),I.value)I.value=(Ze=I.value)==null?void 0:Ze.map(Ae=>{x.value++;let ne=Ae;return ne.id=x.value,ne});else{let Ae=[];const ne=(ya=le.getColumnChild(M.cloneDeep(c.value)))==null?void 0:ya.filter(pe=>(pe==null?void 0:pe.prop)!=="operate");ne==null||ne.forEach(pe=>{var ua;x.value++,Ae.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.prop)||(pe==null?void 0:pe.label),type:pe!=null&&pe.groupSelect?"Select":"Input",value:"",id:x.value,contents:pe==null?void 0:pe.options,menuSelect:pe==null?void 0:pe.formMenuSelect,groupSelect:(ua=pe==null?void 0:pe.groupSelect)==null?void 0:ua.split(":"),selectRelateType:"关联绑定列"})}),I.value=Ae}},{deep:!0,immediate:!0}),($,V)=>{const ee=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",r6,[e.createElementVNode("div",n6,[e.createElementVNode("div",i6,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(ce,{class:"icon-content",onClick:we,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",o6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",t6,[e.createElementVNode("div",s6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",c6,[e.createVNode(ee,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Oe(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>de(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Ge(he)},null,8,["onClick"])])]),he!=null&&he.children&&he.children.length>0?(e.openBlock(),e.createElementBlock("div",u6,[e.createVNode(Yc,{tableChildContents:he==null?void 0:he.children,onDeleteChange:Ie,onFixChange:Me},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",d6,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:Ke},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",p6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",f6,[e.createElementVNode("div",h6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",v6,[e.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>ue(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>_e(he)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",m6,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:R},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",y6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",g6,[e.createElementVNode("div",b6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",k6,[e.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>ze(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>te(he)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",x6,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(ce,{class:"icon-content",id:"themeButton",onClick:re},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",w6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(he,ca)=>(e.openBlock(),e.createElementBlock("div",{key:ca},[e.createElementVNode("div",_6,[e.createElementVNode("div",S6,e.toDisplayString(he==null?void 0:he.label),1),e.createElementVNode("div",E6,[e.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ia=>q(he)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ia=>Z(he)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",C6,[e.createElementVNode("div",D6,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(dl._sfc_main$1,{modelValue:g.value,"onUpdate:modelValue":V[0]||(V[0]=he=>g.value=he)},null,8,["modelValue"])])])]),e.createVNode($r.ssDialog,{visible:o.value,onBeforeDestroy:Je,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B6,[e.createVNode(ce,{onClick:Je,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ce,{class:"ok-button button",onClick:Ea,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:u.value,onBeforeDestroy:We,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",N6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:la},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",A6,[e.createVNode(ce,{onClick:We,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ce,{class:"ok-button button",onClick:j,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:O.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",z6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:se},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",M6,[e.createVNode(ce,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(ce,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:p.value,onBeforeDestroy:ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",I6,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:ye,onChangeVisible:X,onBlurChange:fe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",O6,[e.createVNode(ce,{onClick:ae,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(ce,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},R6=sr._export_sfc(L6,[["__scopeId","data-v-7a6b87b5"]]),$6=M.useModelComp(M.pinia),{pageMapState:Jc}=M.storeToRefs($6),V6=M.useMenuState(M.pinia),{activeMenuPath:Xc,systemHeight:Zc}=M.storeToRefs(V6),F6=e.ref(24),P6=e.ref(6),Qc=e.ref(10),j6=e.ref(70),H6=e.ref(.18),U6=e.ref(45),q6=()=>{Qc.value=(Zc.value-100)/100};e.watch(()=>Zc.value,()=>{q6()},{deep:!0,immediate:!0});const W6=(a,l,r,n)=>{var i,o,p,c,u,m,g,y,d,A,w,Y,D,P,O,E;return{x:((o=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:o.x)||l%2*12,y:((c=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:c.y)||l,w:((m=(u=a==null?void 0:a.value)==null?void 0:u.tableData)==null?void 0:m.w)||F6.value,h:((y=(g=a==null?void 0:a.value)==null?void 0:g.tableData)==null?void 0:y.h)||r,minW:((A=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:A.minW)||P6.value,minH:((Y=(w=a==null?void 0:a.value)==null?void 0:w.tableData)==null?void 0:Y.minH)||H6.value,maxH:((P=(D=a==null?void 0:a.value)==null?void 0:D.tableData)==null?void 0:P.maxH)||U6.value,i:((E=(O=a==null?void 0:a.value)==null?void 0:O.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},K6=(a,l)=>{var n,i,o,p,c,u,m,g;let r=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){if(((p=(o=(i=a==null?void 0:a.compData)==null?void 0:i.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:o.contents)==null?void 0:p.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(r=((g=(m=(u=a==null?void 0:a.compData)==null?void 0:u.find(d=>(d==null?void 0:d.key)==="formContent"))==null?void 0:m.contents)==null?void 0:g.length)/5);return r*2},eu=(a,l,r)=>{var p,c;const n=(c=(p=Jc.value)==null?void 0:p[Xc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=n==null?void 0:n.find(u=>{var m,g,y;return((y=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:y.id)===a.id}),o=K6(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>eu(u,m))),{...W6(i,l,o,a)}},G6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=M.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,i)=>eu(n,i)):[]},Y6=(a,l,r,n)=>{var i,o;return{x:r==null?void 0:r.x,y:0,w:Math.round(r==null?void 0:r.w),h:r==null?void 0:r.h,arrowGap:r==null?void 0:r.arrowGap,i:((o=(i=a==null?void 0:a.value)==null?void 0:i.tableData)==null?void 0:o.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},J6=(a,l)=>{var m,g,y,d;let r=0,n=0,i=0,o=0,p=0,c=((g=(m=a==null?void 0:a.compData)==null?void 0:m.find(A=>(A==null?void 0:A.key)==="numPosition"))==null?void 0:g.contents)??[],u=((d=(y=a==null?void 0:a.compData)==null?void 0:y.find(A=>(A==null?void 0:A.key)==="rowPosition"))==null?void 0:d.contents)??"";return u&&u!==1&&(p=Math.ceil(u*l)),i=(c==null?void 0:c[0])*l,o=(c==null?void 0:c[1])*100,{x:r,y:n,w:i,h:o,arrowGap:p}},au=(a,l,r)=>{var p,c;const n=(c=(p=Jc.value)==null?void 0:p[Xc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=n==null?void 0:n.find(u=>{var m,g,y;return((y=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:y.id)===a.id}),o=J6(a,r);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>au(u,m,r))),{...Y6(i,l,o,a)}},X6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=M.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,i)=>au(n,i,l)):[]},Z6=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}]}]}}),Q6=(a,l)=>a==null?void 0:a.map(r=>{for(const n in l)if(n===(r==null?void 0:r.prop))return{...r,value:l[n]};return r}),e4=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]);e.watch(()=>r.compType,c=>{var g;const u=Z6(r==null?void 0:r.optionItems),m=c?(g=u[c==null?void 0:c.toUpperCase()])==null?void 0:g[r==null?void 0:r.target]:[];i.value=m==null?void 0:m.map(y=>{for(const[d,A]of Object.entries((r==null?void 0:r.comp)||{}))if((y==null?void 0:y.prop)===d)return{...y,value:A};return y})},{immediate:!0});const o=c=>dl.getComponent(c),p=c=>{var u,m;(c==null?void 0:c.prop)==="layout"&&(c==null?void 0:c.value)==="horizontal"?i.value=(u=i.value)==null?void 0:u.map(g=>{var y;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(y=g==null?void 0:g.options)==null?void 0:y.map(d=>({...d,disabled:!0}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!0}:g}):i.value=(m=i.value)==null?void 0:m.map(g=>{var y;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(y=g==null?void 0:g.options)==null?void 0:y.map(d=>({...d,disabled:!1}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!1}:g}),n("change",{target:r==null?void 0:r.target,styleConfigs:i.value,prop:c==null?void 0:c.prop})};return(c,u)=>{const m=e.resolveComponent("el-col"),g=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,y=>(e.openBlock(),e.createBlock(g,{class:"style-row",key:y==null?void 0:y.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y==null?void 0:y.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(y.type)),{modelValue:y.value,"onUpdate:modelValue":d=>y.value=d,content:y==null?void 0:y.options,optionUrl:y==null?void 0:y.optionUrl,disabled:y==null?void 0:y.disabled,activeText:y==null?void 0:y.activeText,inactiveText:y==null?void 0:y.inactiveText,onChange:d=>p(y)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),a4=sr._export_sfc(e4,[["__scopeId","data-v-da01b651"]]),l4=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 r=a,n=l,i=[{required:!0,message:"输入不能为空",trigger:"blur"}],o=e.ref([]),p=P=>P==null?void 0:P.reduce((O,E)=>(O[E==null?void 0:E.prop]=E==null?void 0:E.rule,O),{}),c=e.computed(()=>({formRules:p(o.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),u=e.ref([]),m=e.ref(""),g=(P,O,E)=>{var b;let S=[];(r==null?void 0:r.activeTabName)==="任务配置"?(S=[{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:P},{label:"按钮名称",value:"按钮名称",children:O}]},{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:"暂停"}]}],o.value=[{prop:"任务名称",rule:i},{prop:"任务关键词",rule:i},{prop:"执行任务",rule:i},{prop:"执行动作",rule:i},{prop:"执行交互",rule:i}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(S=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(b=r==null?void 0:r.relatedData)==null?void 0:b.map(_=>({label:_==null?void 0:_.任务名称,value:_==null?void 0:_.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],o.value=[{prop:"关联名称",rule:i},{prop:"关联状态",rule:i},{prop:"关联形式",rule:i},{prop:"关联任务集合",rule:i}]);let x;return E&&(E==null?void 0:E.length)>0?x=[...S,...y(P,O,E)]:x=S,x},y=(P,O,E)=>{const S=[{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?S==null?void 0:S.filter(x=>E==null?void 0:E.includes(x==null?void 0:x.prop)):S},d=(P,O)=>{var _,I,R,re,X,ye,fe,U,q;const E=((X=(re=(R=(I=(_=r==null?void 0:r.comp)==null?void 0:_.compData)==null?void 0:I.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:R.contents)==null?void 0:re.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:X.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],S=/button/i,x=((q=(U=(fe=(ye=r==null?void 0:r.comp)==null?void 0:ye.compData)==null?void 0:fe.filter(Z=>S.test(Z==null?void 0:Z.key)))==null?void 0:U.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:q.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],b=g(E,x,P);u.value=O?Q6(b,O):b,P&&(P==null?void 0:P.length)>0&&o.value.push(...P==null?void 0:P.map(Z=>({prop:Z,rule:i})))};e.onMounted(()=>{d(null,r==null?void 0:r.extendItem)});const A=P=>{const O=P==null?void 0:P[m.value];if(m.value==="执行任务"){if(!(O!=null&&O.join("/")))return;const E=O==null?void 0:O.join("/");d(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,P)}},w=P=>{n("change",{target:r==null?void 0:r.target,extendConfigs:P})},Y=(P,O)=>{m.value=O==null?void 0:O.changeProp,A(P)},D=P=>{n("onButtonClick",P)};return(P,O)=>(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,key:u.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:w,onBlurChange:Y,onOnButtonClick:D},null,8,["rowContents","formRules","buttonValue"]))}}),r4=sr._export_sfc(l4,[["__scopeId","data-v-4b39853f"]]),n4={};function i4(a,l){return null}const o4=sr._export_sfc(n4,[["render",i4]]),t4={class:"form-operate-content"},s4={class:"form-operate-item"},c4={class:"operate-title"},u4={class:"operate-content"},d4={class:"fix-content"},p4={class:"fix-button"},f4={class:"operate-title"},h4={class:"operate-content"},v4={class:"fix-content"},m4={class:"fix-button"},y4={style:{display:"flex","justify-content":"space-between"}},g4={class:"form-content"},b4={class:"dialog-footer"},k4={class:"form-content"},x4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(!1),o=e.ref([]),p=e.ref([]),c=e.ref(!1),u=e.ref([]),m=e.ref([]),g=e.ref(""),y=e.ref(!1),d=e.ref(0),A=e.ref([]),w=e.ref([]),Y=(U,q)=>{if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="selectRelateType"){const Z=q==null?void 0:q.optionUrl;return(Z==null?void 0:Z.selectRelateType)||q[U.key]}if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="menuSelect"){const Z=q==null?void 0:q.optionUrl;return(Z==null?void 0:Z.menuSelect)||q[U.key]}if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="groupSelect"){const Z=q==null?void 0:q.optionUrl;return(Z==null?void 0:Z.groupSelect)||q[U.key]}if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="originalContent")return(q==null?void 0:q.value)||q[U.key];if((q==null?void 0:q.type)=="Select"&&(U==null?void 0:U.key)==="multiple"){const Z=q[U.key];return dc(Z)?Z:U.default}return(U==null?void 0:U.label)==="类型"&&q[U.key]===""?"Input":(U==null?void 0:U.key)==="isFormColHidden"&&!q[U.key]?!1:q[U.key]},D=async U=>{var ae,ve,ze,te,N,se;i.value=!0;let q=[];const Z=await((ze=(ve=(ae=le.FormContent)==null?void 0:ae.find(W=>(W==null?void 0:W.key)===((U==null?void 0:U.type)===""?"Input":U==null?void 0:U.type)))==null?void 0:ve.value)==null?void 0:ze.value)??((N=(te=le.FormContent)==null?void 0:te.find(W=>(W==null?void 0:W.key)===((U==null?void 0:U.type)===""?"Input":U==null?void 0:U.type)))==null?void 0:N.value);if(Z==null||Z.forEach(W=>{d.value++,q.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,prop:W==null?void 0:W.prop,value:Y(W,U),id:d.value,contents:W==null?void 0:W.options,width:(U==null?void 0:U.width)??1})}),U!=null&&U.menuSelect&&((se=U==null?void 0:U.menuSelect)==null?void 0:se.length)>0){const W=await le.menuToContentType(U==null?void 0:U.menuSelect);q=q==null?void 0:q.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=W),ue))}g.value=U==null?void 0:U.id,o.value=await le.selectToBase(le.formToOptionsContents(q)),p.value=await le.selectToBase(le.formToOptionsContents(q))},P=U=>{var Z;c.value=!0;let q=[];(Z=le.FormButton)==null||Z.forEach(ae=>{d.value++,q.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:(ae==null?void 0:ae.label)==="类型"&&U[ae.key]===""?"normal":U[ae.key],id:d.value,contents:ae==null?void 0:ae.options})}),A.value=q,w.value=q,g.value=U==null?void 0:U.id};e.watch(()=>y.value,()=>{var q,Z;let U=M.cloneDeep(r.originalItemContents);(q=M.cloneDeep(r.originalItemContents))!=null&&q.find(ae=>(ae==null?void 0:ae.key)==="enableWrap")?U=(Z=M.cloneDeep(r.originalItemContents))==null?void 0:Z.map(ae=>((ae==null?void 0:ae.key)==="enableWrap"&&(ae.contents=!y.value),ae)):U.push({key:"enableWrap",contents:!y.value}),n("change",U)},{deep:!0});const O=()=>{var Z,ae,ve,ze,te;A.value=w.value;let U={};if(g.value!==""?U.id=g.value:(d.value++,U.id="id"+d.value),(Z=A.value)==null||Z.forEach(N=>{var W;const se=(W=le.FormButton)==null?void 0:W.find(ue=>(ue==null?void 0:ue.label)===(N==null?void 0:N.label));se&&(U[se.key]=N.value)}),(ae=u.value)!=null&&ae.find(N=>N.id===U.id))u.value=(ve=u.value)==null?void 0:ve.map(N=>(N.id===U.id&&(N=U),N));else{let N=M.cloneDeep(u.value);u.value||(u.value=[]),N.push(U),u.value=N}c.value=!1,g.value="";let q=M.cloneDeep(r.originalItemContents);(ze=M.cloneDeep(r.originalItemContents))!=null&&ze.find(N=>(N==null?void 0:N.key)==="formButton")?q=(te=M.cloneDeep(r.originalItemContents))==null?void 0:te.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=u.value),N)):q.push({key:"formButton",contents:u.value}),n("change",q)},E=U=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var q,Z;m.value=(q=M.cloneDeep(m.value))==null?void 0:q.filter(ae=>(ae==null?void 0:ae.id)!==(U==null?void 0:U.id)),n("change",(Z=M.cloneDeep(r.originalItemContents))==null?void 0:Z.map(ae=>((ae==null?void 0:ae.key)==="formContent"&&(ae.contents=m.value),ae))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=U=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var q,Z;u.value=(q=M.cloneDeep(u.value))==null?void 0:q.filter(ae=>(ae==null?void 0:ae.id)!==(U==null?void 0:U.id)),n("change",(Z=M.cloneDeep(r.originalItemContents))==null?void 0:Z.map(ae=>((ae==null?void 0:ae.key)==="formButton"&&(ae.contents=u.value),ae))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>{var q;c.value=!0;let U=[];(q=le.FormButton)==null||q.forEach(Z=>{d.value++,U.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:(Z==null?void 0:Z.label)==="类型"?"normal":"",id:d.value,contents:Z==null?void 0:Z.options})}),A.value=U,w.value=U},b=()=>{var q,Z,ae;i.value=!0;let U=[];(ae=(Z=(q=le.FormContent)==null?void 0:q.find(ve=>(ve==null?void 0:ve.key)==="Input"))==null?void 0:Z.value)==null||ae.forEach(ve=>{d.value++,U.push({label:ve==null?void 0:ve.label,name:ve==null?void 0:ve.label,type:ve.type,value:(ve==null?void 0:ve.label)==="类型"?"Input":"",id:d.value,contents:ve==null?void 0:ve.options})}),o.value=U,p.value=U},_=U=>{let q=M.cloneDeep(w.value);q=q==null?void 0:q.map(Z=>(Z.value=U==null?void 0:U[Z.name],Z)),w.value=q},I=U=>{const q=U.find(ve=>(ve==null?void 0:ve.name)==="类型");if((q==null?void 0:q.value)!="Select")return;const Z=U.find(ve=>(ve==null?void 0:ve.name)==="多选"),ae=U.find(ve=>(ve==null?void 0:ve.name)==="初始值");Z!=null&&Z.value&&To.isString(ae.value)&&(ae.value=[ae.value]),!(Z!=null&&Z.value)&&!To.isString(ae.value)&&(ae.value="")},R=async U=>{var q,Z,ae,ve,ze,te,N,se,W,ue,_e,we;if((U==null?void 0:U.类型)!==((Z=(q=p.value)==null?void 0:q.find(Ke=>(Ke==null?void 0:Ke.label)==="类型"))==null?void 0:Z.value)){let Ke=[];const la=await((ze=(ve=(ae=le.FormContent)==null?void 0:ae.find(j=>(j==null?void 0:j.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:ve.value)==null?void 0:ze.value)?await((ue=(W=(se=le.FormContent)==null?void 0:se.find(j=>(j==null?void 0:j.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:W.value)==null?void 0:ue.value):(N=(te=le.FormContent)==null?void 0:te.find(j=>(j==null?void 0:j.key)===((U==null?void 0:U.类型)===""?"Input":U==null?void 0:U.类型)))==null?void 0:N.value;if(la==null||la.forEach(j=>{var Oe,Ie;d.value++;const We=ld(j==null?void 0:j.default)?(U==null?void 0:U[j.label])??j.value??"":j==null?void 0:j.default;Ke.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:We,prop:j==null?void 0:j.prop,id:d.value,contents:j==null?void 0:j.options,width:((Ie=(Oe=p.value)==null?void 0:Oe[0])==null?void 0:Ie.width)??1})}),U!=null&&U.菜单选项&&((_e=U==null?void 0:U.菜单选项)==null?void 0:_e.length)>0){const j=await le.menuToContentType(U==null?void 0:U.菜单选项);Ke=Ke==null?void 0:Ke.map(We=>((We==null?void 0:We.name)==="组信息选项"&&(We.contents=j),We))}I(Ke),p.value=await le.selectToBase(M.cloneDeep(Ke)),o.value=await le.selectToBase(M.cloneDeep(Ke))}else{let Ke=M.cloneDeep(p.value);if(Ke=Ke==null?void 0:Ke.map(la=>(la.value=U==null?void 0:U[la.name],la)),U!=null&&U.菜单选项&&((we=U==null?void 0:U.菜单选项)==null?void 0:we.length)>0){const la=await le.menuToContentType(U==null?void 0:U.菜单选项);Ke=Ke==null?void 0:Ke.map(j=>((j==null?void 0:j.name)==="组信息选项"&&(j.contents=la),j))}Ke=le.formToOptionsContents(Ke),I(Ke),p.value=await le.selectToBase(M.cloneDeep(Ke))}},re=U=>{U||(o.value=p.value)},X=async U=>{await R(U),o.value=p.value},ye=Fl.debounce(async()=>{var ae,ve,ze,te,N,se,W,ue,_e,we,Ke,la;o.value=p.value;let U={};U.width=((ve=(ae=o.value)==null?void 0:ae[0])==null?void 0:ve.width)??1,g.value!==""?U.id=g.value:(d.value++,U.id="id"+d.value);let q=await((N=(te=(ze=le.FormContent)==null?void 0:ze.find(j=>{var We,Oe;return(j==null?void 0:j.key)===(((Oe=(We=o.value)==null?void 0:We.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Oe.value)??"label")}))==null?void 0:te.value)==null?void 0:N.value)??((W=(se=le.FormContent)==null?void 0:se.find(j=>{var We,Oe;return(j==null?void 0:j.key)===(((Oe=(We=o.value)==null?void 0:We.find(Ie=>(Ie==null?void 0:Ie.label)==="类型"))==null?void 0:Oe.value)??"label")}))==null?void 0:W.value);if((ue=o.value)==null||ue.forEach(j=>{const We=q==null?void 0:q.find(Oe=>(Oe==null?void 0:Oe.label)===(j==null?void 0:j.label));We&&(U[We.key]=j.value)}),U.width=U.width?U.width:1,U.key=U==null?void 0:U.label,U.isFormColHidden=U==null?void 0:U.isFormColHidden,(_e=m.value)!=null&&_e.find(j=>j.id===U.id))m.value=(we=m.value)==null?void 0:we.map(j=>(j.id===U.id&&(j=U),j));else{let j=M.cloneDeep(m.value);j.push(U),m.value=j}m.value=m.value.map(({id:j,...We})=>We),i.value=!1,g.value="";let Z=M.cloneDeep(r.originalItemContents);(Ke=M.cloneDeep(r.originalItemContents))!=null&&Ke.find(j=>(j==null?void 0:j.key)==="formContent")?Z=(la=M.cloneDeep(r.originalItemContents))==null?void 0:la.map(j=>((j==null?void 0:j.key)==="formContent"&&(j.contents=m.value),j)):Z.push({key:"formContent",contents:m.value}),n("change",Z)},300),fe=()=>{i.value=!1,c.value=!1,g.value="",p.value=[],w.value=[]};return e.watch(()=>r.originalItemContents,()=>{var q,Z,ae,ve,ze,te;if(!r.originalItemContents||r.originalItemContents.length===0)return;const U=M.cloneDeep(r.originalItemContents);m.value=((q=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:q.contents)??[],u.value=((Z=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:Z.contents)??[],y.value=(ae=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&ae.contents?!((ve=U==null?void 0:U.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&ve.contents):!0,m.value=(ze=M.cloneDeep(m.value))==null?void 0:ze.map((N,se)=>{var ue;let W=N;return W.id=(N==null?void 0:N.id)??se,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=((ue=N==null?void 0:N.options)==null?void 0:ue.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,W}),m.value=le.formToOptionsContents(m.value),u.value=(te=u.value)==null?void 0:te.map((N,se)=>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:se})},{deep:!0,immediate:!0}),(U,q)=>{const Z=e.resolveComponent("svg-icon"),ae=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",t4,[e.createElementVNode("div",s4,[e.createElementVNode("div",c4,[q[2]||(q[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ae,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[q[1]||(q[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",u4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(ve,ze)=>(e.openBlock(),e.createElementBlock("div",{key:ze},[e.createElementVNode("div",d4,[e.createElementVNode("div",null,e.toDisplayString(ve.label),1),e.createElementVNode("div",p4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>D(ve)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>E(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",f4,[q[4]||(q[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ae,{class:"icon-content",id:"themeButton",onClick:x},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[q[3]||(q[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",h4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(ve,ze)=>(e.openBlock(),e.createElementBlock("div",{key:ze},[e.createElementVNode("div",v4,[e.createElementVNode("div",null,e.toDisplayString(ve.label),1),e.createElementVNode("div",m4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>P(ve)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>S(ve)},null,8,["onClick"])])])]))),128))]),q[6]||(q[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",y4,[q[5]||(q[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(dl._sfc_main$1,{modelValue:y.value,"onUpdate:modelValue":q[0]||(q[0]=ve=>y.value=ve)},null,8,["modelValue"])])]),e.createVNode($r.ssDialog,{visible:i.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",g4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:R,onChangeVisible:re,onBlurChange:X},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",b4,[e.createVNode(ae,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>q[7]||(q[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ae,{class:"ok-button button",onClick:e.unref(ye),id:"themeButton"},{default:e.withCtx(()=>q[8]||(q[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode($r.ssDialog,{visible:c.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",k4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:fe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:O},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ls=sr._export_sfc(x4,[["__scopeId","data-v-20850524"]]),w4={class:"step-module content"},_4={class:"module-data"},S4={class:"step-module layout"},E4={class:"form-content"},C4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=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}]),o=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),p=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),u=e.ref("create"),m=e.ref({}),g=e.ref([]),y=D=>{var P;m.value=D,n("change",(P=w())==null?void 0:P.compData)},d=(D,P)=>{var O,E;switch(D){case"create":(O=o.value)==null||O.forEach(S=>{S.value=""}),u.value="create",c.visible=!0;break;case"update":(E=o.value)==null||E.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),u.value="update",c.visible=!0;break;case"delete":g.value.splice(P,1),u.value="delete";break}},A=D=>{var P,O,E;if((D==null?void 0:D.buttonName)==="确认"){const S=M.cloneDeep(D==null?void 0:D.content);switch(Object.keys(S).forEach(x=>{S[x]===""&&delete S[x]}),u.value){case"create":g.value.push({...S,index:((P=g.value)==null?void 0:P.length)+1});break;case"update":g.value=(O=g.value)==null?void 0:O.map(x=>x.index===(S==null?void 0:S.index)?{...x,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:x);break}n("change",(E=w())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},w=()=>({comp:"Step",compData:[{key:"stepList",contents:g.value},{key:"stepConfig",contents:m.value}]}),Y=()=>{c.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,D=>{var P,O;D&&(m.value=((P=D==null?void 0:D.find(E=>E.key==="stepConfig"))==null?void 0:P.contents)??{},g.value=((O=D==null?void 0:D.find(E=>E.key==="stepList"))==null?void 0:O.contents)??[])},{immediate:!0}),(D,P)=>{const O=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",w4,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>d("update",{...S,index:x+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>d("delete",x)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",S4,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(dl.ssForm,{rowContents:i.value,onChange:y},null,8,["rowContents"])])]),e.createVNode($r.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Y,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",E4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:p.value,onOnButtonClick:A},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),D4=sr._export_sfc(C4,[["__scopeId","data-v-7dbd17f2"]]),T4={class:"step-module content"},B4={class:"module-data"},N4={class:"step-module layout"},A4={class:"form-content"},z4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref("create"),o=e.ref({}),p=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}]),u=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"}]),g=e.reactive({visible:!1,width:"40%",title:"时间线"}),y=D=>{var P;o.value=D,n("change",(P=w())==null?void 0:P.compData)},d=(D,P)=>{var O,E;switch(D){case"create":(O=u.value)==null||O.forEach(S=>{S.value=""}),i.value="create",g.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),i.value="update",g.visible=!0;break;case"delete":p.value.splice(P,1),i.value="delete";break}},A=D=>{var P,O,E,S;if((D==null?void 0:D.buttonName)==="确认"){const x=M.cloneDeep(D==null?void 0:D.content);switch(Object.keys(x).forEach(b=>{x[b]===""&&delete x[b]}),i.value){case"create":(O=p.value)==null||O.push({...x,index:((P=p.value)==null?void 0:P.length)+1});break;case"update":p.value=(E=p.value)==null?void 0:E.map(b=>b.index===(x==null?void 0:x.index)?{...b,content:x==null?void 0:x.content,timestamp:x==null?void 0:x.timestamp}:b);break}n("change",(S=w())==null?void 0:S.compData),g.visible=!1}else g.visible=!1},w=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:p.value},{key:"timeLineConfig",contents:o.value}]}),Y=()=>{g.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,D=>{var P,O;D&&(o.value=((P=D==null?void 0:D.find(E=>E.key==="timeLineConfig"))==null?void 0:P.contents)??{},p.value=((O=D==null?void 0:D.find(E=>E.key==="timeLineList"))==null?void 0:O.contents)??[])},{immediate:!0}),(D,P)=>{const O=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",T4,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",B4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>d("update",{...S,index:x+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>d("delete",x)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",N4,[P[5]||(P[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(dl.ssForm,{rowContents:c.value,onChange:y},null,8,["rowContents"])])]),e.createVNode($r.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:Y,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",A4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:A},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),M4=sr._export_sfc(z4,[["__scopeId","data-v-39ffc861"]]),I4={};function O4(a,l){return e.openBlock(),e.createElementBlock("div")}const L4=sr._export_sfc(I4,[["render",O4]]),R4={class:"extra-content"},$4={key:0},V4={key:1},F4={class:"dialog-footer"},P4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const r=a,n=e.ref(0),i=e.ref(),o=e.ref(),p=l,c=e.ref(!1),u=e.ref({}),m=e.ref({}),g=e.ref();e.watch(()=>[r.itemData],()=>{var S;const E=M.cloneDeep(r.itemData);i.value=(S=M.cloneDeep(E))==null?void 0:S.map(x=>{var b;if(x.key==="extra"){let _=[];(b=x.value)==null||b.forEach(I=>{var R;_.push((R=Object.values(I))==null?void 0:R[0])}),x.value=_}return x})},{deep:!0,immediate:!0});const y=(E,S,x,b)=>{var I;let _={};((I=E==null?void 0:E[0])==null?void 0:I.contents)==="详情"&&(c.value=!0,_[S]=E,o.value=E==null?void 0:E.filter(R=>(R==null?void 0:R.key)!=="tableContentName"),u.value=_,m.value=x,g.value=b.id)},d=E=>{var R,re,X,ye;const S=(re=(R=Object.values(M.cloneDeep(u.value)))==null?void 0:R[0])==null?void 0:re.filter(fe=>(fe==null?void 0:fe.key)==="tableContentName"),x=(ye=(X=Object.values(M.cloneDeep(u.value)))==null?void 0:X[0])==null?void 0:ye.filter(fe=>(fe==null?void 0:fe.key)!=="tableContentName"),b=x==null?void 0:x.map((fe,U)=>{var q;return U===E.index&&(fe==null?void 0:fe.comp)==="Table"&&(fe.compData=(q=fe.compData)==null?void 0:q.map(Z=>{var ae,ve;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(ve=(ae=E.content)==null?void 0:ae.map(ze=>{let te={};for(let N in ze)N!=="id"&&(te[N]=ze[N]);return te}))==null?void 0:ve.map(ze=>Object.values(ze))),Z})),fe});b.unshift(S==null?void 0:S[0]);let _=M.cloneDeep(u.value),I={};for(let fe in _)I[fe]=b;u.value=I},A=()=>{c.value=!1,u.value={},m.value={},g.value=void 0,n.value++},w=E=>{var R,re,X,ye;const S=(re=(R=Object.values(M.cloneDeep(u.value)))==null?void 0:R[0])==null?void 0:re.filter(fe=>(fe==null?void 0:fe.key)==="tableContentName"),x=(ye=(X=Object.values(M.cloneDeep(u.value)))==null?void 0:X[0])==null?void 0:ye.filter(fe=>(fe==null?void 0:fe.key)!=="tableContentName"),b=x==null?void 0:x.map((fe,U)=>(U===E.index&&(fe.compData=E.contents),fe));b.unshift(S==null?void 0:S[0]);let _=M.cloneDeep(u.value),I={};for(let fe in _)I[fe]=b;u.value=I},Y=()=>{var S,x;let E={};for(let b in m.value)b===((S=Object.keys(u.value))==null?void 0:S[0])?E[b]=(x=Object.values(u.value))==null?void 0:x[0]:E[b]=m.value[b];p("change",{buttonName:"编辑",index:g.value,singleContent:E},"methodData"),c.value=!1,u.value={},m.value={},g.value=void 0},D=()=>{c.value=!1,u.value={},m.value={},g.value=void 0},P=E=>{p("change",E,"methodData")},O=E=>Ri(E);return(E,S)=>{const x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",R4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(b,_)=>(e.openBlock(),e.createElementBlock("div",{key:n.value},[(b==null?void 0:b.key)==="extra"?(e.openBlock(),e.createElementBlock("div",$4)):(e.openBlock(),e.createElementBlock("div",V4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(b.comp)),{itemData:b==null?void 0:b.compData,childItemData:b==null?void 0:b.itemChildData,key:_,index:(b==null?void 0:b.id)??_,onContentClick:y,onChange:P},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode($r.ssDialog,{visible:c.value,onBeforeDestroy:D},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(b,_)=>(e.openBlock(),e.createElementBlock("div",{key:_,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(b.comp)),{itemData:b==null?void 0:b.compData,onChange:d,childItemData:b==null?void 0:b.itemChildData,key:_,onContentChange:w,index:(b==null?void 0:b.id)??_,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",F4,[e.createVNode(x,{class:"cancel-button footer-button",onClick:A,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(x,{class:"confirm-button footer-button",onClick:Y,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},j4=sr._export_sfc(P4,[["__scopeId","data-v-2d9c5ab2"]]),H4={key:0,class:"method-content"},U4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),r=le.useOriginalState(M.pinia),{originalPath:n}=M.storeToRefs(r),i=a,o=e.ref(!1),p=e.ref(),c=le.useTableComp(M.pinia),{multipleTableConst:u}=M.storeToRefs(c),m=M.useModelComp(M.pinia),g=e.ref(!1),y=M.useMenuState(M.pinia),d=M.useLoginState(M.pinia),{itemData:A,isEdit:w,routeToChildPath:Y,tableViewContents:D,lockingPage:P,payloadTypes:O}=M.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:x}=M.storeToRefs(y),{loginUserInfo:b}=M.storeToRefs(d),_=e.ref(!1),I=async()=>{var te,N;(te=l.value)!=null&&te.find(se=>(se==null?void 0:se.buttonName)==="保存")&&await Z((N=l.value)==null?void 0:N.find(se=>(se==null?void 0:se.buttonName)==="保存")),await le.onSaveBack()};e.watch(()=>A.value,async()=>{w.value==="view"&&!_.value&&await ze(M.cloneDeep(i.itemData)),_.value=!1},{deep:!0});const R=()=>{o.value=!1,p.value=void 0},re=te=>te.map(N=>{const se={};for(const W in N){const ue=N[W];if(W.includes(u.value)){const _e=W.split(u.value);let we=se;_e.forEach((Ke,la)=>{la===_e.length-1?we[Ke]=ue:(we[Ke]||(we[Ke]={}),we=we[Ke])})}else se[W]=ue}return se}),X=async(te,N,se=[])=>{var ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge;let W=(ue=M.cloneDeep(N))==null?void 0:ue.filter($=>($==null?void 0:$.comp)!=="methodButton");if(te!=null&&te.includes("[")){let $=(j=(la=(Ke=(we=(_e=M.cloneDeep(te))==null?void 0:_e.split("["))==null?void 0:we[1])==null?void 0:Ke.split("]"))==null?void 0:la[0])==null?void 0:j.split(":"),V="";if($!=null&&$[0]){let ee=(We=W==null?void 0:W.find(ce=>(ce==null?void 0:ce.name)===($==null?void 0:$[0])))==null?void 0:We.compData;if(!ee){let ce=(Oe=te==null?void 0:te.split("["))==null?void 0:Oe[0],he=await le.getItemData(ce,sessionStorage.getItem("systemKey"),"",!1,"","",se);ee=(Ie=he==null?void 0:he.find(ca=>(ca==null?void 0:ca.name)===($==null?void 0:$[0])))==null?void 0:Ie.compData}ee==null||ee.forEach(ce=>{var he,ca,ia,Ve,ga,Ta;if((ce==null?void 0:ce.key)==="formContent")(he=ce==null?void 0:ce.contents)==null||he.forEach(De=>{var Fa;(De==null?void 0:De.key)===($==null?void 0:$[1])&&(Array.isArray(De==null?void 0:De.value)?V=De==null?void 0:De.value:V=(Fa=De==null?void 0:De.value)==null?void 0:Fa.toString())});else if((ce==null?void 0:ce.key)==="tableContents"){let De=[],Fa=(ca=ee==null?void 0:ee.find(da=>(da==null?void 0:da.key)==="header"))==null?void 0:ca.contents,Na=($==null?void 0:$[1])??"";if(Fa!=null&&Fa.every(da=>Array.isArray(da))){let da=le.getColumnChild((ga=Fa==null?void 0:Fa[0])==null?void 0:ga.filter(ja=>(ja==null?void 0:ja.label)!=="操作"));(Ta=ce.contents)==null||Ta.forEach(ja=>{let ta={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),da==null||da.forEach((je,ya)=>{let Ze=ja[ya];typeof ja[ya]=="number"&&(Ze=ja[ya].toString()),(Na===""||Na===je.prop)&&(ta[je.prop]=Ze)}),De.push(ta)}),De=re(De)}else{let da=(ia=Fa==null?void 0:Fa.map(ja=>ja==null?void 0:ja.label))==null?void 0:ia.filter(ja=>ja!=="操作");(Ve=ce.contents)==null||Ve.forEach(ja=>{let ta={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),da==null||da.forEach((je,ya)=>{let Ze=ja[ya];typeof ja[ya]=="number"&&(Ze=ja[ya].toString()),(Na===""||Na===je)&&(ta[je]=Ze)}),De.push(ta)})}V=De}})}return V}else if(te!=null&&te.includes("/")){let $={};return(Me=M.cloneDeep(W))==null||Me.forEach((V,ee)=>{var ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe;if((V==null?void 0:V.comp)==="Table"){let ua=Array.isArray((ca=(he=(ce=V==null?void 0:V.compData)==null?void 0:ce.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:he.contents)==null?void 0:ca[0])?(Ta=(ga=(Ve=(ia=V==null?void 0:V.compData)==null?void 0:ia.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:Ve.contents)==null?void 0:ga[0])==null?void 0:Ta.some(Le=>Le==null?void 0:Le.children):[],Qe=(Na=(Fa=(De=V==null?void 0:V.compData)==null?void 0:De.find(Le=>(Le==null?void 0:Le.key)==="tableContents"))==null?void 0:Fa.contents)==null?void 0:Na.map(Le=>(Le!=null&&Le.find(Fe=>Fe==null?void 0:Fe.id)&&(Le=Le.slice(1)),Le)),Da=(ya=(je=(ta=(ja=(da=V==null?void 0:V.compData)==null?void 0:da.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:ja.contents)==null?void 0:ta[0])==null?void 0:je[0])==null?void 0:ya.label,Te=(Ae=(Ze=V==null?void 0:V.compData)==null?void 0:Ze.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:Ae.contents;if(ua)(ua==null?void 0:ua.length)===0?$[V.name]=$!=null&&$[V.name]?$[V.name]:le.tableToForm(Qe,Te):$[Da]=le.tableToForm(Qe,Te);else{const Le=[];Te=Te.slice(1,Te.length-1),Te==null||Te.forEach((Fe,Ne)=>{Qe==null||Qe.forEach(me=>{Le.push({key:Fe.label+me[0],value:me[Ne+1]})})}),$["form"+ee]=Le}}else{const ua=(pe=(ne=V.compData)==null?void 0:ne.find(Da=>(Da==null?void 0:Da.key)==="formContent"))==null?void 0:pe.contents;$!=null&&$.form||($.form=[]);const Qe=[];ua==null||ua.forEach(Da=>{Da.key!==""&&(Da={key:(Da==null?void 0:Da.key)??(Da==null?void 0:Da.label),value:Da==null?void 0:Da.value},Qe.push(Da))}),$.form=[...Qe,...M.cloneDeep($==null?void 0:$.form)]}}),$}else{if(te==="createInsofDataApi"){let $=(de=M.cloneDeep(N))==null?void 0:de[0];return $={comp:(Ce=M.cloneDeep($))==null?void 0:Ce.comp,compData:(Je=M.cloneDeep($))==null?void 0:Je.compData,name:(Ea=M.cloneDeep($))==null?void 0:Ea.name,isShow:(Ge=M.cloneDeep($))==null?void 0:Ge.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:$}}}return te}},ye=async(te,N,se)=>{var _e,we,Ke;let W=await le.getItemData(N,sessionStorage.getItem("systemKey"),""),ue=W==null?void 0:W.find(la=>(la==null?void 0:la.name)===(se==null?void 0:se[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let la={};for(let Ce in M.cloneDeep(te))M.cloneDeep(te)[Ce]!=="loginUser"?la[Ce]=M.cloneDeep(te)[Ce]:la[Ce]=((_e=b.value)==null?void 0:_e.account)||((we=b.value)==null?void 0:we.账号);let j=[],We=la;Array.isArray(te)||(We=[la]),We==null||We.forEach(Ce=>{j.push({[Ce[se[1]]]:Ce})});let Oe=[],Ie=j==null?void 0:j.map(Ce=>{var Je;return(Je=Object.keys(Ce))==null?void 0:Je[0]});W==null||W.forEach(Ce=>{var Je;(Ce==null?void 0:Ce.name)===(se==null?void 0:se[0])&&((Je=Ce==null?void 0:Ce.compData)==null||Je.forEach(Ea=>{var Ge;(Ea==null?void 0:Ea.key)==="tableContents"&&((Ge=Ea==null?void 0:Ea.contents)==null||Ge.forEach($=>{$!=null&&$.some(V=>Ie.includes(V))&&Oe.push({[$.find(V=>V.id).id]:$.find(V=>Ie.includes(V))})}))}))});let Me=Oe==null?void 0:Oe.map(Ce=>{var Je;return(Je=Object.keys(Ce))==null?void 0:Je[0]}),de=[];if(Me==null||Me.forEach(Ce=>{var Ge;let Je=(Ge=Oe==null?void 0:Oe.find($=>{var V;return((V=Object.keys($))==null?void 0:V[0].toString())===Ce.toString()}))==null?void 0:Ge[Ce],Ea=j==null?void 0:j.find($=>{var V;return((V=Object.keys($))==null?void 0:V[0])===Je});de.push({id:parseInt(Ce),value:{tableData:Ea[Je]}})}),(de==null?void 0:de.length)>0)return de}else if((ue==null?void 0:ue.comp)==="Form"){let la=M.cloneDeep(ue);la.compData=(Ke=la.compData)==null?void 0:Ke.map(Oe=>{var Ie;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(Ie=Oe.contents)==null?void 0:Ie.map(Me=>((Me==null?void 0:Me.key)===(se==null?void 0:se[1])&&(Me.value=(te==null?void 0:te[Me==null?void 0:Me.prop])||te),Me))),Oe});let j={};for(let Oe in la)Oe!=="id"&&(j[Oe]=la[Oe]);let We=[];if(We.push({id:ue==null?void 0:ue.id,keyType:se==null?void 0:se[1],value:{pageData:j}}),(We==null?void 0:We.length)>0)return We}}},fe=async(te,N,se)=>{var _e,we,Ke,la,j,We,Oe,Ie,Me,de;let W=await le.getItemData(N,sessionStorage.getItem("systemKey"),""),ue=W==null?void 0:W.find(Ce=>(Ce==null?void 0:Ce.name)===(se==null?void 0:se[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let Ce={};for(let Je in M.cloneDeep(te))M.cloneDeep(te)[Je]!=="loginUser"?Ce[Je]=M.cloneDeep(te)[Je]:Ce[Je]=((_e=b.value)==null?void 0:_e.account)||((we=b.value)==null?void 0:we.账号);await Zr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ce}})}else if((ue==null?void 0:ue.comp)==="Form"){let Ce=M.cloneDeep(ue),Je=Object.keys(te),Ea="";(la=(Ke=M.cloneDeep(Ce))==null?void 0:Ke.compData)==null||la.forEach(he=>{var ca,ia;(he==null?void 0:he.key)==="formContent"&&((ia=(ca=M.cloneDeep(he))==null?void 0:ca.contents)==null||ia.forEach(Ve=>{var ga;Je.includes(Ve==null?void 0:Ve.key)&&(Ve==null?void 0:Ve.value)===((ga=b.value)==null?void 0:ga.姓名)&&(Ea=Ve==null?void 0:Ve.key)}))});let Ge=[];(j=Object.values(te[Ea]))==null||j.forEach(he=>{he!=null&&he.includes("(")&&Ge.push(he)}),Ge=[...new Set(Ge)];const $=Ge==null?void 0:Ge.map(async he=>{var Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne;let ca="";(ja=(da=(Na=(Fa=(De=(Ta=M.cloneDeep(he))==null?void 0:Ta.split("("))==null?void 0:De[1])==null?void 0:Fa.split(")"))==null?void 0:Na[0])==null?void 0:da.split(":"))==null||ja.forEach(pe=>{ca=ca===""?ca+pe.replaceAll("'",""):ca+"/"+pe.replaceAll("'","")});let ia=[];(ne=(Ae=(Ze=(ya=(je=(ta=M.cloneDeep(he))==null?void 0:ta.split("<"))==null?void 0:je[1])==null?void 0:ya.split(">"))==null?void 0:Ze[0])==null?void 0:Ae.split(":"))==null||ne.forEach(pe=>{ia.push(pe.replaceAll("'",""))});const Ve=await le.getItemData(ca,sessionStorage.getItem("systemKey"),"");let ga="";return Ve==null||Ve.forEach(pe=>{var ua;pe.name===(ia==null?void 0:ia[0])&&((ua=pe==null?void 0:pe.compData)==null||ua.forEach(Qe=>{var Da;(Qe==null?void 0:Qe.key)==="formContent"&&((Da=Qe.contents)==null||Da.forEach(Te=>{(Te==null?void 0:Te.key)===(ia==null?void 0:ia[1])&&(ga=Te==null?void 0:Te.value)}))}))}),{[he]:ga}}),V=await Promise.all($);Ce.compData=(Oe=(We=M.cloneDeep(Ce))==null?void 0:We.compData)==null?void 0:Oe.map(he=>{var ca,ia;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(ia=(ca=M.cloneDeep(he))==null?void 0:ca.contents)==null?void 0:ia.map(Ve=>{var ga,Ta,De,Fa;return(ga=te[Ea])!=null&&ga[Ve==null?void 0:Ve.key]&&(te[Ea][Ve==null?void 0:Ve.key].includes("(")?Ve.value=(Ta=V==null?void 0:V.find(Na=>{var da;return((da=Object.keys(Na))==null?void 0:da[0])===te[Ea][Ve==null?void 0:Ve.key]}))==null?void 0:Ta[te[Ea][Ve==null?void 0:Ve.key]]:Ve.value=(Fa=(De=M.cloneDeep(te))==null?void 0:De[Ea])==null?void 0:Fa[Ve==null?void 0:Ve.key]),Ve})),he});const ee=await Zr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let ce="";((Ie=ee==null?void 0:ee.data)==null?void 0:Ie.type)==="success"&&((de=(Me=ee==null?void 0:ee.data)==null?void 0:Me.result)==null||de.forEach(he=>{var ca,ia;((ia=(ca=he==null?void 0:he.value)==null?void 0:ca.pageData)==null?void 0:ia.name)===(se==null?void 0:se[0])&&(ce=he.id)}),await Zr.updateInsofDataApi({id:ce,value:{pageData:Ce}}))}}},U=(te,N="",se={})=>{for(const[W,ue]of Object.entries(te)){const _e=N?`${N}.${W}`:W;ue!==null&&typeof ue=="object"&&!Array.isArray(ue)&&Object.prototype.toString.call(ue)!=="[object Date]"?U(ue,_e,se):se[_e]=ue}return se},q=async(te,N,se,W)=>{var we,Ke,la,j,We,Oe,Ie,Me,de,Ce,Je,Ea,Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa;let ue=await le.getItemData(N,sessionStorage.getItem("systemKey"),""),_e=ue==null?void 0:ue.find(Na=>(Na==null?void 0:Na.name)===(se==null?void 0:se[0]));if(_e){if(!(se!=null&&se[1])&&(_e==null?void 0:_e.comp)==="Table"){let Na={},da=[],ja=(Ke=(we=_e==null?void 0:_e.compData)==null?void 0:we.find(ya=>(ya==null?void 0:ya.key)==="header"))==null?void 0:Ke.contents;ja!=null&&ja.every(ya=>Array.isArray(ya))?da=(j=le.getColumnChild((la=ja==null?void 0:ja[0])==null?void 0:la.filter(ya=>(ya==null?void 0:ya.label)!=="操作")))==null?void 0:j.map(ya=>ya==null?void 0:ya.prop):da=ja==null?void 0:ja.map(ya=>ya==null?void 0:ya.label);for(let ya in M.cloneDeep(te))if(M.cloneDeep(te)[ya]!=="loginUser"){let Ze=U(M.cloneDeep(te)[ya]),Ae={};for(let ne in Ze)if(da!=null&&da.find(pe=>pe===ne))Ae[ne]=Ze[ne];else if(da!=null&&da.find(pe=>(pe==null?void 0:pe.toUpperCase())===(ne==null?void 0:ne.toUpperCase()))){let pe=da==null?void 0:da.find(ua=>(ua==null?void 0:ua.toUpperCase())===(ne==null?void 0:ne.toUpperCase()));Ae[pe]=Ze[ne]}Na[ya]=Ae}else Na[ya]=((We=b.value)==null?void 0:We.account)||((Oe=b.value)==null?void 0:Oe.账号);let ta=await Zr.getInsofDataApi({keyLikes:{tableId:_e==null?void 0:_e.id}});if(((Me=(Ie=ta==null?void 0:ta.data)==null?void 0:Ie.result)==null?void 0:Me.length)>0){let ya=(Ce=(de=ta==null?void 0:ta.data)==null?void 0:de.result)==null?void 0:Ce.map(Ze=>Ze==null?void 0:Ze.id);(ya==null?void 0:ya.length)>0&&await Zr.batchDeleteInsofDataApi({ids:ya})}let je=[];if((Je=_e==null?void 0:_e.compData)!=null&&Je.find(ya=>(ya==null?void 0:ya.key)==="pageColumn")&&(($=(Ge=(Ea=_e==null?void 0:_e.compData)==null?void 0:Ea.find(ya=>(ya==null?void 0:ya.key)==="pageColumn"))==null?void 0:Ge.contents)!=null&&$.includes("["))){const ya=await Zr.getInsofDataApi({id:_e==null?void 0:_e.tableId});let Ze=((he=(ce=(ee=(V=ya==null?void 0:ya.data)==null?void 0:V.result)==null?void 0:ee[0])==null?void 0:ce.key)==null?void 0:he.pageKey)??"";(ca=Object.values(Na))==null||ca.forEach(Ae=>{je.push({key:{type:"data",pageKey:Ze,tableId:_e==null?void 0:_e.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ae}})})}else(ia=Object.values(Na))==null||ia.forEach(ya=>{je.push({key:{type:"data",pageKey:N,tableId:_e==null?void 0:_e.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ya}})});(je==null?void 0:je.length)>0&&await Zr.batchAddInsofDataApi({dataList:je})}else if(!(se!=null&&se[1])&&(_e==null?void 0:_e.comp)==="Form"){let Na=M.cloneDeep(_e);Na.compData=(ga=(Ve=M.cloneDeep(Na))==null?void 0:Ve.compData)==null?void 0:ga.map(ta=>{var je,ya;return(ta==null?void 0:ta.key)==="formContent"&&(ta.contents=(ya=(je=M.cloneDeep(ta))==null?void 0:je.contents)==null?void 0:ya.map(Ze=>{var Ae,ne;return(Ae=M.cloneDeep(te))!=null&&Ae[Ze==null?void 0:Ze.key]&&(Ze.value=(ne=M.cloneDeep(te))==null?void 0:ne[Ze==null?void 0:Ze.key]),Ze})),ta});const da=await Zr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let ja="";((Ta=da==null?void 0:da.data)==null?void 0:Ta.type)==="success"&&((Fa=(De=da==null?void 0:da.data)==null?void 0:De.result)==null||Fa.forEach(ta=>{var je,ya;((ya=(je=ta==null?void 0:ta.value)==null?void 0:je.pageData)==null?void 0:ya.name)===(se==null?void 0:se[0])&&(ja=ta.id)}),await Zr.updateInsofDataApi({id:ja,value:{pageData:Na}}))}}},Z=async te=>{var N,se,W,ue,_e,we,Ke,la,j,We,Oe,Ie,Me,de;y.setImportLoading(!0);try{if(te.api){let Ce=new WeakMap,Je=await le.getItemData((x==null?void 0:x.value)===""?E.value:x==null?void 0:x.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ce),Ea="";if(Je=Je==null?void 0:Je.map(ia=>{var Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze;if((ia==null?void 0:ia.comp)==="Form")ia.compData=(Ve=ia.compData)==null?void 0:Ve.map(Ae=>{var ne;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(ne=Ae.contents)==null?void 0:ne.map(pe=>{var ua;if((pe==null?void 0:pe.value)===""&&(pe==null?void 0:pe.type)==="Select"){let Qe=le.judgeContents((ua=M.cloneDeep(pe))==null?void 0:ua.optionUrl,Ce);pe.value=pe.value||Qe}return pe})),Ae});else if((ia==null?void 0:ia.comp)==="Table"&&(ga=ia.compData)!=null&&ga.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn")){let Ae=(De=(Ta=ia.compData)==null?void 0:Ta.find(Qe=>(Qe==null?void 0:Qe.key)==="pageColumn"))==null?void 0:De.contents,ne=((Na=(Fa=ia.compData)==null?void 0:Fa.find(Qe=>(Qe==null?void 0:Qe.key)==="pageGroup"))==null?void 0:Na.contents)??"",pe=(ta=(ja=(da=Ae==null?void 0:Ae.split("["))==null?void 0:da[1])==null?void 0:ja.split("]"))==null?void 0:ta[0];Ea=((je=Ae==null?void 0:Ae.split("["))==null?void 0:je[0])+((Ze=(ya=D.value)==null?void 0:ya.find(Qe=>(Qe==null?void 0:Qe.key)===pe))==null?void 0:Ze.value)}return ia}),!(Ea===""||Ea==="")){const ia=await le.getItemData(Ea,sessionStorage.getItem("systemKey"),"",!1,"","",Ce);Je=Je==null?void 0:Je.map(Ve=>{var ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne;if((Ve==null?void 0:Ve.comp)==="Table"&&(ga=Ve.compData)!=null&&ga.find(pe=>(pe==null?void 0:pe.key)==="pageColumn")){let pe=(De=(Ta=Ve.compData)==null?void 0:Ta.find(Le=>(Le==null?void 0:Le.key)==="pageColumn"))==null?void 0:De.contents,ua=((Na=(Fa=Ve.compData)==null?void 0:Fa.find(Le=>(Le==null?void 0:Le.key)==="pageGroup"))==null?void 0:Na.contents)??"",Qe=(ta=(ja=(da=pe==null?void 0:pe.split("["))==null?void 0:da[1])==null?void 0:ja.split("]"))==null?void 0:ta[0],Da=((je=pe==null?void 0:pe.split("["))==null?void 0:je[0])+((Ze=(ya=D.value)==null?void 0:ya.find(Le=>(Le==null?void 0:Le.key)===Qe))==null?void 0:Ze.value),Te=(Ae=ia==null?void 0:ia.find(Le=>(Le==null?void 0:Le.name)===(ua===""?i==null?void 0:i.compName:ua)))==null?void 0:Ae.compData;Ve.compData=(ne=Ve.compData)==null?void 0:ne.map(Le=>{var Fe;return(Le==null?void 0:Le.key)==="tableContents"&&(Le.contents=(Fe=Te==null?void 0:Te.find(Ne=>(Ne==null?void 0:Ne.key)==="tableContents"))==null?void 0:Fe.contents),Le})}return Ve})}let Ge={};if(((se=(N=te==null?void 0:te.extraValues)==null?void 0:N.input)==null?void 0:se.length)>0){const ia=(ue=(W=te==null?void 0:te.extraValues)==null?void 0:W.input)==null?void 0:ue.map(async Ve=>{var ga;ae!=null&&ae.find(Ta=>Ta===Ve)?Ge=await X(Ve,Je):Ge[Object.keys(Ve)[0]]=await X((ga=Object.values(Ve))==null?void 0:ga[0],Je,Ce)});await Promise.all(ia)}else Ge=await X("/",Je);let $=!1;(we=(_e=te==null?void 0:te.extraValues)==null?void 0:_e.output)==null||we.forEach(ia=>{var Ve,ga;(ga=(Ve=Object.values(ia))==null?void 0:Ve[0])!=null&&ga.includes(".doc")&&($=!0)});let V;if($){const ia=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});V=await Ja.axios.post(te.api,Ge,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ia.close()})}else V=await Ja.axios.post(te.api,Ge,{headers:{"Content-Type":"application/json"}});let ee=(We=(j=(la=(Ke=M.cloneDeep(te))==null?void 0:Ke.extraValues)==null?void 0:la.output)==null?void 0:j.map(ia=>{var Ve,ga,Ta,De,Fa,Na,da,ja,ta,je,ya,Ze,Ae,ne,pe,ua;if(!((ga=(Ve=Object.values(ia))==null?void 0:Ve[0])!=null&&ga.includes(".doc"))){let Qe=(je=(ta=(ja=(De=M.cloneDeep((Ta=Object.values(ia))==null?void 0:Ta[0]))==null?void 0:De.split("["))==null?void 0:ja[((da=(Na=M.cloneDeep((Fa=Object.values(ia))==null?void 0:Fa[0]))==null?void 0:Na.split("["))==null?void 0:da.length)-1])==null?void 0:ta.split("]"))==null?void 0:je[0],Da=Qe==null?void 0:Qe.split(":"),Te=(Ae=M.cloneDeep((ya=Object.values(ia))==null?void 0:ya[0]))==null?void 0:Ae.substring(0,M.cloneDeep((Ze=Object.values(ia))==null?void 0:Ze[0]).lastIndexOf("["));if(Te=(pe=M.cloneDeep(Te))==null?void 0:pe.slice(0,((ne=M.cloneDeep(Te))==null?void 0:ne.length)-1),Te!=null&&Te.includes("[")){let Le="";if((ua=le.contentTransArrayToAll(Te,"/"))==null||ua.forEach(Fe=>{var Ne,me,al,Qa,Tl,Rl,Al;if(!(Fe!=null&&Fe.includes("[")))Le=Le===""?Le+Fe.replaceAll("/",""):Le+"/"+Fe.replaceAll("/","");else{let Pl=M.cloneDeep(Fe).slice(1,((Ne=M.cloneDeep(Fe))==null?void 0:Ne.length)-1),ll=(Rl=(Tl=(Qa=(al=(me=M.cloneDeep(Pl))==null?void 0:me.split("["))==null?void 0:al[1])==null?void 0:Qa.split("]"))==null?void 0:Tl[0])==null?void 0:Rl.split(":"),jl="",Wa=(Al=Je==null?void 0:Je.find(Hl=>(Hl==null?void 0:Hl.name)===(ll==null?void 0:ll[0])))==null?void 0:Al.compData;Wa==null||Wa.forEach(Hl=>{var Jl;(Hl==null?void 0:Hl.key)==="formContent"&&((Jl=Hl==null?void 0:Hl.contents)==null||Jl.forEach(ar=>{(ar==null?void 0:ar.key)===(ll==null?void 0:ll[1])&&(jl=ar==null?void 0:ar.value)}))}),Le=Le===""?Le+jl.replaceAll("/",""):Le+"/"+jl.replaceAll("/","")}}),Te=Le,Te[(Te==null?void 0:Te.length)-1]!=="/")return Te}}}))==null?void 0:We.filter(ia=>ia);ee=[...new Set(M.cloneDeep(ee))];let ce=ee==null?void 0:ee.map(async ia=>{let Ve=await le.getItemData(ia,sessionStorage.getItem("systemKey"),"",!1,"","",Ce);if((Ve==null?void 0:Ve.length)===0)return await le.getParentContents(ia)});await Promise.all(ce);let he=[],ca=(Me=(Ie=(Oe=M.cloneDeep(te))==null?void 0:Oe.extraValues)==null?void 0:Ie.output)==null?void 0:Me.map(async ia=>{var ja,ta,je,ya,Ze,Ae,ne,pe,ua,Qe,Da,Te,Le,Fe,Ne,me,al,Qa,Tl,Rl,Al,Pl,ll,jl,Wa,Hl,Jl,ar,bl,br,ka,ol,hl,Nl,aa,Pa,Ga,$e,ha,wa,Ee,ba,Xa,yl,zl,pa,Ha,va,Ca,Aa,pl,Pe,kl,cr,Cr,ea,La,Bl,Ol,ma,Sr,Ur,Gr,Re,ur,wr,Yr,tr,lr,un;if((ta=(ja=Object.values(ia))==null?void 0:ja[0])!=null&&ta.includes(".doc")){var Ve=new Blob([V.data],{type:"application/octet-stream;charset=UTF-8"}),ga=V.headers["content-disposition"],Ta=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),De=Ta.exec(ga),Fa=De==null?void 0:De[1],Na=document.createElement("a"),da=window.URL.createObjectURL(Ve);p.value=[{name:Fa,blobUrl:da}],o.value=!0}else{let Xl=(Qe=(ua=(pe=(ya=M.cloneDeep((je=Object.values(ia))==null?void 0:je[0]))==null?void 0:ya.split("["))==null?void 0:pe[((ne=(Ae=M.cloneDeep((Ze=Object.values(ia))==null?void 0:Ze[0]))==null?void 0:Ae.split("["))==null?void 0:ne.length)-1])==null?void 0:ua.split("]"))==null?void 0:Qe[0],Ul=Xl==null?void 0:Xl.split(":"),Tr=(Le=M.cloneDeep((Da=Object.values(ia))==null?void 0:Da[0]))==null?void 0:Le.substring(0,M.cloneDeep((Te=Object.values(ia))==null?void 0:Te[0]).lastIndexOf("["));if(Tr!=null&&Tr.includes("[")?Tr=(Ne=M.cloneDeep(Tr))==null?void 0:Ne.slice(0,((Fe=M.cloneDeep(Tr))==null?void 0:Fe.length)-1):Tr===""&&(Tr=E.value),Tr=Tr.replaceAll("<","[").replaceAll(">","]"),Tr!=null&&Tr.includes("[")){let El="";(me=le.contentTransArrayToAll(Tr,"/"))==null||me.forEach((Zl,rr)=>{var Dr,wl,Lr,Kl,on,Rr,qr,En,$n,Cn,mn;if(!(Zl!=null&&Zl.includes("[")))El=El===""?El+Zl.replaceAll("/",""):El+"/"+Zl.replaceAll("/","");else{let Mn="",rn="";(Dr=M.cloneDeep(Zl))!=null&&Dr.includes("]")?(Mn=M.cloneDeep(Zl).slice(1,((wl=M.cloneDeep(Zl))==null?void 0:wl.length)-1),rn=(qr=(Rr=(on=(Kl=(Lr=M.cloneDeep(Mn))==null?void 0:Lr.split("["))==null?void 0:Kl[1])==null?void 0:on.split("]"))==null?void 0:Rr[0])==null?void 0:qr.split(":")):(Mn=M.cloneDeep(Zl).slice(1,(En=M.cloneDeep(Zl))==null?void 0:En.length),rn=($n=M.cloneDeep(Mn))==null?void 0:$n.split("/"));let Dn="",Vr=(Cn=Je==null?void 0:Je.find(Xr=>(Xr==null?void 0:Xr.name)===(rn==null?void 0:rn[0])))==null?void 0:Cn.compData;Vr==null||Vr.forEach(Xr=>{var _n;(Xr==null?void 0:Xr.key)==="formContent"&&((_n=Xr==null?void 0:Xr.contents)==null||_n.forEach(In=>{(In==null?void 0:In.key)===(rn==null?void 0:rn[1])&&(Dn=In==null?void 0:In.value)}))}),((mn=le.contentTransArrayToAll(Tr,"/"))==null?void 0:mn.length)-1!==rr?El=El===""?El+Dn.replaceAll("/",""):El+"/"+Dn.replaceAll("/",""):El=El+n.value+Dn.replaceAll("/","")}}),(al=E.value)!=null&&al.includes(El)?Tr=E.value:Tr=El}let Nr=M.cloneDeep((Qa=Object.keys(ia))==null?void 0:Qa[0]);if(((Tl=V==null?void 0:V.data)==null?void 0:Tl.statusCode)===200||((Rl=V==null?void 0:V.data)==null?void 0:Rl.code)===200){if(((Pl=(Al=V==null?void 0:V.data)==null?void 0:Al.data)!=null&&Pl[Nr]||(jl=(ll=V==null?void 0:V.data)==null?void 0:ll.result)!=null&&jl[Nr])&&(Ul==null?void 0:Ul.length)===1)return await q(((Hl=(Wa=V==null?void 0:V.data)==null?void 0:Wa.data)==null?void 0:Hl[Nr])||((ar=(Jl=V==null?void 0:V.data)==null?void 0:Jl.result)==null?void 0:ar[Nr]),M.cloneDeep(Tr),Ul,Ea);if((br=(bl=V==null?void 0:V.data)==null?void 0:bl.data)!=null&&br[Nr]||(ol=(ka=V==null?void 0:V.data)==null?void 0:ka.result)!=null&&ol[Nr]){let El=await ye(((Nl=(hl=V==null?void 0:V.data)==null?void 0:hl.data)==null?void 0:Nl[Nr])||((Pa=(aa=V==null?void 0:V.data)==null?void 0:aa.result)==null?void 0:Pa[Nr]),M.cloneDeep(Tr),Ul);return El&&(he=[...he,...El]),El}else{if(!((Ga=V==null?void 0:V.data)!=null&&Ga.data)){let El=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ce);El=El==null?void 0:El.map(rr=>{var Dr;return(rr==null?void 0:rr.name)===(Ul==null?void 0:Ul[0])&&(rr.compData=(Dr=rr.compData)==null?void 0:Dr.map(wl=>{var Lr;return(wl==null?void 0:wl.key)==="formContent"&&(wl.contents=(Lr=wl.contents)==null?void 0:Lr.map(Kl=>{var on,Rr;return(Kl==null?void 0:Kl.key)===(Ul==null?void 0:Ul[1])&&(Kl.value=(Rr=(on=V==null?void 0:V.data)==null?void 0:on.result)==null?void 0:Rr[Nr==null?void 0:Nr.replaceAll(":","")]),Kl})),wl})),rr});let Zl=[];($e=El==null?void 0:El.filter(rr=>(rr==null?void 0:rr.comp)==="Form"))==null||$e.forEach(async rr=>{let Dr={};for(let wl in rr)wl!=="id"&&(Dr[wl]=rr[wl]);Zl.push({id:rr==null?void 0:rr.id,value:{pageData:Dr}})}),(Zl==null?void 0:Zl.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:Zl});return}if((Ul==null?void 0:Ul.length)===1){const El=(Ee=(wa=(ha=V==null?void 0:V.data)==null?void 0:ha.data)==null?void 0:wa.path)==null?void 0:Ee.path;let Zl="";(pa=(zl=(yl=(Xa=(ba=El==null?void 0:El.split("("))==null?void 0:ba[1])==null?void 0:Xa.split(")"))==null?void 0:yl[0])==null?void 0:zl.split(":"))==null||pa.forEach(wl=>{var Lr,Kl;Zl=Zl===""?Zl+((Lr=wl==null?void 0:wl.replaceAll("'",""))==null?void 0:Lr.trim()):Zl+"/"+((Kl=wl==null?void 0:wl.replaceAll("'",""))==null?void 0:Kl.trim())});let rr=[(pl=(Aa=(Ca=(va=(Ha=El==null?void 0:El.split("<"))==null?void 0:Ha[1])==null?void 0:va.split(">"))==null?void 0:Ca[0])==null?void 0:Aa.replaceAll("'",""))==null?void 0:pl.trim()],Dr;return(cr=(kl=(Pe=V==null?void 0:V.data)==null?void 0:Pe.data)==null?void 0:kl.data)!=null&&cr[Ul==null?void 0:Ul[0]]?Dr=await q((La=(ea=(Cr=V==null?void 0:V.data)==null?void 0:Cr.data)==null?void 0:ea.data)==null?void 0:La[Ul==null?void 0:Ul[0]],Zl,Ul,Ea):Dr=await fe((Ol=(Bl=V==null?void 0:V.data)==null?void 0:Bl.data)==null?void 0:Ol.data,Zl,rr,Ce),Dr}else{const El=(Ur=(Sr=(ma=V==null?void 0:V.data)==null?void 0:ma.data)==null?void 0:Sr.path)==null?void 0:Ur.path;let Zl="";return(Yr=(wr=(ur=(Re=(Gr=El==null?void 0:El.split("("))==null?void 0:Gr[1])==null?void 0:Re.split(")"))==null?void 0:ur[0])==null?void 0:wr.split(":"))==null||Yr.forEach(Dr=>{var wl,Lr;Zl=Zl===""?Zl+((wl=Dr==null?void 0:Dr.replaceAll("'",""))==null?void 0:wl.trim()):Zl+"/"+((Lr=Dr==null?void 0:Dr.replaceAll("'",""))==null?void 0:Lr.trim())}),await ye((un=(lr=(tr=V==null?void 0:V.data)==null?void 0:tr.data)==null?void 0:lr.data)==null?void 0:un[Ul==null?void 0:Ul[0]],Zl,Ul)}}}}});if(await Promise.all(ca),(he==null?void 0:he.length)>0){let ia=[];he==null||he.forEach(Ta=>{ia!=null&&ia.find(De=>{var Fa,Na,da,ja;return((Na=(Fa=De==null?void 0:De.value)==null?void 0:Fa.pageData)==null?void 0:Na.name)===((ja=(da=Ta==null?void 0:Ta.value)==null?void 0:da.pageData)==null?void 0:ja.name)})||ia.push(Ta)});let Ve=[];ia==null||ia.forEach(Ta=>{var Na,da,ja,ta;let De=M.cloneDeep(Ta);De.value.pageData.compData=(Na=De.value.pageData.compData)==null?void 0:Na.map(je=>{var ya;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(ya=je.contents)==null?void 0:ya.map(Ze=>{var ne,pe,ua,Qe;let Ae=(ne=M.cloneDeep(he))==null?void 0:ne.find(Da=>(Da==null?void 0:Da.keyType)===(Ze==null?void 0:Ze.key));if(Ae){let Da=(Qe=(ua=(pe=Ae.value.pageData.compData)==null?void 0:pe.find(Te=>(Te==null?void 0:Te.key)==="formContent"))==null?void 0:ua.contents)==null?void 0:Qe.find(Te=>(Te==null?void 0:Te.key)===(Ze==null?void 0:Ze.key));Ze.value=Da==null?void 0:Da.value}return Ze})),je}),Ve.push({id:De==null?void 0:De.id,value:De==null?void 0:De.value});let Fa=[];(ta=(ja=(da=De==null?void 0:De.value)==null?void 0:da.pageData)==null?void 0:ja.compData)==null||ta.forEach(je=>{var ya;(je==null?void 0:je.key)==="formContent"&&((ya=je==null?void 0:je.contents)==null||ya.forEach(Ze=>{var Ae,ne,pe,ua,Qe,Da;if((ne=(Ae=Ze==null?void 0:Ze.optionUrl)==null?void 0:Ae.menuSelect)!=null&&ne.find(Te=>Te==null?void 0:Te.includes("[")))if(Fa!=null&&Fa.find(Te=>{var Le,Fe,Ne;return((Le=Te==null?void 0:Te.key)==null?void 0:Le.join(","))===((Ne=(Fe=Ze==null?void 0:Ze.optionUrl)==null?void 0:Fe.menuSelect)==null?void 0:Ne.join(","))})){let Te=(pe=Fa==null?void 0:Fa.find(Le=>{var Fe,Ne,me;return((Fe=Le==null?void 0:Le.key)==null?void 0:Fe.join(","))===((me=(Ne=Ze==null?void 0:Ze.optionUrl)==null?void 0:Ne.menuSelect)==null?void 0:me.join(","))}))==null?void 0:pe.value;Te.push({key:Ze==null?void 0:Ze.prop,groups:(ua=Ze==null?void 0:Ze.optionUrl)==null?void 0:ua.groupSelect,value:Ze==null?void 0:Ze.value}),Fa=Fa==null?void 0:Fa.map(Le=>{var Fe,Ne,me;return((Fe=Le==null?void 0:Le.key)==null?void 0:Fe.join(","))===((me=(Ne=Ze==null?void 0:Ze.optionUrl)==null?void 0:Ne.menuSelect)==null?void 0:me.join(","))&&(Le.value=Te),Le})}else Fa.push({key:(Qe=Ze==null?void 0:Ze.optionUrl)==null?void 0:Qe.menuSelect,value:[{key:Ze==null?void 0:Ze.prop,groups:(Da=Ze==null?void 0:Ze.optionUrl)==null?void 0:Da.groupSelect,value:Ze==null?void 0:Ze.value}]})}))}),(Fa==null?void 0:Fa.length)>0&&(Fa=Fa==null?void 0:Fa.map(je=>{var Ze;let ya="";return(Ze=je==null?void 0:je.key)==null||Ze.forEach(Ae=>{var ne;if(!(Ae!=null&&Ae.includes("[")))ya=ya===""?ya+Ae:ya+"/"+Ae;else{let pe="",ua=(ne=Ae==null?void 0:Ae.replaceAll("[","").replaceAll("]",""))==null?void 0:ne.split(":");Je==null||Je.forEach(Qe=>{var Da;(Qe==null?void 0:Qe.name)===(ua==null?void 0:ua[0])&&((Da=Qe==null?void 0:Qe.compData)==null||Da.forEach(Te=>{var Le;(Te==null?void 0:Te.key)==="formContent"&&((Le=Te==null?void 0:Te.contents)==null||Le.forEach(Fe=>{(Fe==null?void 0:Fe.prop)===(ua==null?void 0:ua[1])&&(pe=Fe==null?void 0:Fe.value)}))}))}),ya=ya+n.value+pe}}),je.key=ya,je})),Fa==null||Fa.forEach(je=>{var ne,pe,ua;let ya=(ne=Ce[je.key])==null?void 0:ne.find(Qe=>{var Da,Te,Le,Fe,Ne,me,al;return((Te=(Da=Qe==null?void 0:Qe.value)==null?void 0:Da.pageData)==null?void 0:Te.name)===((Ne=(Fe=(Le=je==null?void 0:je.value)==null?void 0:Le[0])==null?void 0:Fe.groups)==null?void 0:Ne[0])&&((al=(me=Qe==null?void 0:Qe.value)==null?void 0:me.pageData)==null?void 0:al.name)!==void 0}),Ze=ya==null?void 0:ya.id,Ae=(pe=ya==null?void 0:ya.value)==null?void 0:pe.pageData;Ae.compData=(ua=Ae.compData)==null?void 0:ua.map(Qe=>{var Da;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(Da=Qe.contents)==null?void 0:Da.map(Te=>{var Fe;let Le=(Fe=je.value)==null?void 0:Fe.find(Ne=>(Ne==null?void 0:Ne.key)===(Te==null?void 0:Te.prop));return Le&&(Te.value=Le.value),Te})),Qe}),Ve.push({id:Ze,value:{pageData:Ae}})})});let ga=(de=M.cloneDeep(he))==null?void 0:de[0];(Ve==null?void 0:Ve.length)>0&&await Zr.batchUpdateInsofDataApi({dataList:Ve})}m.setFreshContent(!0)}y.setImportLoading(!1)}catch{Ja.ElMessage.error("方法执行错误,请查看方法!"),y.setImportLoading(!1)}_.value=!0},ae=["createInsofDataApi"],ve=Fl.debounce(async te=>{Z(te)},100),ze=async te=>{var we,Ke,la;const N=M.cloneDeep(te);let se,W=new WeakMap;te!=null&&te[0].path&&(se=await(N==null?void 0:N.map(async(j,We)=>{var Ge,$,V,ee,ce,he,ca,ia,Ve,ga,Ta,De,Fa,Na,da,ja;const Ie=(Ge=W[j==null?void 0:j.path])==null?void 0:Ge.filter(ta=>{var je;return((je=ta==null?void 0:ta.key)==null?void 0:je.type)==="data"});let Me="";const de=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);Ie==null||Ie.forEach(ta=>{var je,ya,Ze,Ae,ne;((ya=(je=ta==null?void 0:ta.value)==null?void 0:je.tableData)==null?void 0:ya.算法名称)===((Ze=N==null?void 0:N[We])==null?void 0:Ze.method)&&(Me=(ne=(Ae=ta==null?void 0:ta.value)==null?void 0:Ae.tableData)==null?void 0:ne.算法体)});const Ce=await le.getItemData(j==null?void 0:j.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);let Je="",Ea=(ce=(ee=(V=($=Ce==null?void 0:Ce[0])==null?void 0:$.compData)==null?void 0:V.find(ta=>(ta==null?void 0:ta.key)==="header"))==null?void 0:ee.contents)==null?void 0:ce.findIndex(ta=>(ta==null?void 0:ta.prop)==="算法体");return(ca=(he=Ce==null?void 0:Ce[0])==null?void 0:he.compData)==null||ca.forEach(ta=>{var je;(ta==null?void 0:ta.key)==="tableContents"&&((je=ta==null?void 0:ta.contents)==null||je.forEach(ya=>{ya!=null&&ya.find(Ze=>Ze===(j==null?void 0:j.method))&&(Je=ya[Ea])}))}),{buttonName:((ia=N==null?void 0:N[We])==null?void 0:ia.method)||((Ta=(ga=(Ve=Ie==null?void 0:Ie[0])==null?void 0:Ve.value)==null?void 0:ga.tableData)==null?void 0:Ta.算法名称),api:(Me===""?(Na=(Fa=(De=Ie==null?void 0:Ie[0])==null?void 0:De.value)==null?void 0:Fa.tableData)==null?void 0:Na.算法体:Me)||Je,content:de==null?void 0:de.filter(ta=>ta.comp!=="methodButton"),extraContent:(da=M.cloneDeep(j.value))==null?void 0:da.slice(1),methodName:(j==null?void 0:j.path)??"",extraValues:(ja=N==null?void 0:N[We])==null?void 0:ja.data}})));const ue=N==null?void 0:N.map(async j=>{var Ce,Je,Ea,Ge,$,V;const We=(Ce=resAll.data.result)==null?void 0:Ce.filter(ee=>{var ce,he,ca;return((ce=ee==null?void 0:ee.key)==null?void 0:ce.parentTable)===""&&((he=ee==null?void 0:ee.key)==null?void 0:he.type)==="method"&&((ca=ee==null?void 0:ee.key)==null?void 0:ca.methodName)===ee.method}),Oe=We==null?void 0:We[0],Ie=(Je=resAll.data.result)==null?void 0:Je.filter(ee=>{var ce,he;return((ce=ee==null?void 0:ee.key)==null?void 0:ce.type)==="methodData"&&((he=ee==null?void 0:ee.key)==null?void 0:he.tableId)===(Oe==null?void 0:Oe.id)}),Me=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W),de=Ie==null?void 0:Ie[0];return{buttonName:(Ea=Oe==null?void 0:Oe.key)==null?void 0:Ea.methodKey,api:($=(Ge=de==null?void 0:de.value)==null?void 0:Ge.tableData)==null?void 0:$[0],content:Me==null?void 0:Me.filter(ee=>ee.comp!=="methodButton"),extraContent:(V=M.cloneDeep(j.value))==null?void 0:V.slice(1),methodName:(j==null?void 0:j.method)??""}}),_e=(we=te==null?void 0:te[0])!=null&&we.path&&((Ke=te==null?void 0:te[0])==null?void 0:Ke.path)!==""?await Promise.all(se):await Promise.all(ue);l.value=_e==null?void 0:_e.filter(j=>j==null?void 0:j.extraContent),(la=l.value)==null||la.forEach(j=>{var We;j.api===""&&((We=j.content)==null||We.forEach(Oe=>{var Ie;Oe.comp=="Table"&&m.setExtraContents(le.methodTableToContent(Oe.compData,(Ie=j.extraContent)==null?void 0:Ie[0]))}))})};return e.watch(()=>i.itemData,async()=>{w.value=="view"&&!_.value&&await ze(M.cloneDeep(i.itemData)),_.value=!1},{immediate:!0,deep:!0}),(te,N)=>{var se,W,ue;return e.unref(w)!=="edit"?(e.openBlock(),e.createElementBlock("div",H4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((se=l.value)==null?void 0:se.filter(_e=>(_e==null?void 0:_e.buttonName)!=="保存"),_e=>{var we;return e.openBlock(),e.createElementBlock("div",null,[_e.api!==""?(e.openBlock(),e.createBlock(e.unref(vs._sfc_main),{key:0,disabled:e.unref(P)===e.unref(E)&&!((we=_e==null?void 0:_e.buttonName)!=null&&we.includes("预览")),class:"calculator-content",modelValue:_e.buttonName,onClickTrigger:Ke=>e.unref(ve)(_e),loading:g.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Y)!==""&&((ue=e.unref(E))==null?void 0:ue[((W=e.unref(E))==null?void 0:W.length)-1])!==e.unref(n)?(e.openBlock(),e.createBlock(e.unref(vs._sfc_main),{key:0,class:"calculator-content",onClickTrigger:I,modelValue:"保存"})):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createBlock(dl.ssFilePreview,{key:0,fileDataList:p.value,onDestroy:R},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},q4=sr._export_sfc(U4,[["__scopeId","data-v-063aa9af"]]),W4={};function K4(a,l){return" 567 "}const G4=sr._export_sfc(W4,[["render",K4]]),Y4={class:"module content"},J4={class:"module data"},X4={class:"module layout"},Z4={class:"form-content"},Q4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.reactive({visible:!1,width:"40%",title:"签名配置"}),o=e.ref("create"),p=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}]),u=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({}),g=e.ref([]),y=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:g.value},{key:"signConfig",contents:m.value}]}),d=D=>{var P;m.value=M.cloneDeep(D),n("change",(P=y())==null?void 0:P.compData)},A=D=>{var P,O;if((D==null?void 0:D.buttonName)==="确认"){const E=M.cloneDeep(D==null?void 0:D.content);switch(o.value){case"create":g.value.push({...E,index:((P=g.value)==null?void 0:P.length)+1});break}n("change",(O=y())==null?void 0:O.compData),i.visible=!1}else i.visible=!1},w=(D,P)=>{var O,E;switch(D){case"create":(O=u.value)==null||O.forEach(S=>{S.value=""}),o.value="create",i.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=P[S==null?void 0:S.prop]}),o.value="update",i.visible=!0;break;case"delete":g.value.splice(P,1),o.value="delete";break}},Y=()=>{i.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,D=>{var P,O;D&&(m.value=((P=D==null?void 0:D.find(E=>E.key==="signConfig"))==null?void 0:P.contents)??{},g.value=((O=D==null?void 0:D.find(E=>E.key==="signTypeList"))==null?void 0:O.contents)??[])},{immediate:!0}),(D,P)=>{const O=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Y4,[P[2]||(P[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:P[0]||(P[0]=S=>w("create"))},{icon:e.withCtx(()=>[e.createVNode(O,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[P[1]||(P[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",J4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>w("update",{...S,index:x+1})},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>w("delete",x)},{default:e.withCtx(()=>P[4]||(P[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",X4,[e.createVNode(dl.ssForm,{rowContents:c.value,onChange:d},null,8,["rowContents"])])]),e.createVNode($r.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:Y,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",Z4,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:p.value,onOnButtonClick:A},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),e2=sr._export_sfc(Q4,[["__scopeId","data-v-487e0536"]]),a2=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(0),o=e.computed(()=>{var y,d;return(y=r==null?void 0:r.stepConfig)!=null&&y.allowTrigger?i.value:(d=r==null?void 0:r.stepConfig)==null?void 0:d.active}),p=(y,d)=>{i.value=d-1,n("clickStep",y,d)};e.onMounted(()=>{var y;n("clickStep",(y=r==null?void 0:r.stepList)==null?void 0:y[0],0)});const c=y=>dl.getComponent(y),u=()=>{var d;const y=(d=r==null?void 0:r.stepList)==null?void 0:d.find((A,w)=>w+1===o.value);return console.log("findStep",y),y?y==null?void 0:y.children:[]},m=y=>{n("clickTrigger",y)},g=y=>{n("changeTrigger",y)};return(y,d)=>{var Y,D,P,O,E;const A=e.resolveComponent("el-step"),w=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(w,{direction:(Y=a.stepConfig)==null?void 0:Y.direction,active:o.value,"finish-status":"success",simple:(D=a.stepConfig)==null?void 0:D.simple,"align-center":((P=a.stepConfig)==null?void 0:P.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(S,x)=>(e.openBlock(),e.createBlock(A,{key:x,class:"step-item",onClick:b=>p(S,x+1)},{title:e.withCtx(()=>[e.renderSlot(y.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(y.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(O=a.stepConfig)!=null&&O.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u(),(S,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":b=>S.value=b,onClickTrigger:m,onChangeTrigger:g,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(y.$slots,(b,_)=>({name:_,fn:e.withCtx(I=>[e.renderSlot(y.$slots,_,e.mergeProps({ref_for:!0},I||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),l2=sr._export_sfc(a2,[["__scopeId","data-v-a30ff621"]]),r2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const r=a,n=l,i=e.ref({}),o=e.ref([]),p=(c,u)=>{n("clickStep",c,u)};return e.watch(()=>r==null?void 0:r.itemData,c=>{var y,d,A,w;i.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let u=((y=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.key)==="stepName"))==null?void 0:y.contents)??[],m=[];(A=(d=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:d.contents)==null||A.forEach(Y=>{m.push({label:Y==null?void 0:Y.label,prop:Y==null?void 0:Y.prop,name:Y==null?void 0:Y.prop,type:"text",disabled:!0})});let g=((w=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:w.contents)??[];u=u==null?void 0:u.map((Y,D)=>{let P=m==null?void 0:m.map(O=>{var E;return{...O,value:(E=g==null?void 0:g[D])==null?void 0:E[O==null?void 0:O.prop]}});return{title:Y,description:P}}),o.value=u},{immediate:!0,deep:!0}),(c,u)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(l2,{stepConfig:i.value,stepList:o.value,onClickStep:p},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:g})=>[e.createTextVNode(e.toDisplayString(g),1)]),description:e.withCtx(({descriptions:g})=>[e.createVNode(dl.ssForm,{ref:"formRef",rowContents:g,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),n2=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,r)=>{const n=e.resolveComponent("el-timeline-item"),i=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(i,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(o,p)=>(e.openBlock(),e.createBlock(n,{key:p,timestamp:o.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:o==null?void 0:o.content,timestamp:o==null?void 0:o.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),i2=sr._export_sfc(n2,[["__scopeId","data-v-4172a886"]]),o2={class:"line-content"},t2={class:"line-time"},s2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref({}),n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,i=>{var o,p;n.value=(o=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:o.contents,r.value=(p=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:p.contents},{immediate:!0}),(i,o)=>(e.openBlock(),e.createBlock(i2,{activities:n.value,timeLineConfig:r.value},{content:e.withCtx(({content:p,timestamp:c})=>[e.createElementVNode("span",o2,e.toDisplayString(p),1),e.createElementVNode("span",t2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),c2=sr._export_sfc(s2,[["__scopeId","data-v-b4d9deed"]]),u2={class:"tabs-content"},d2=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 r=a,n=l,i=e.ref();e.watch(()=>r==null?void 0:r.itemData,()=>{i.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const o=d=>{n("change",d)},p=(d,A)=>{n("contentChange",d,A)},c=d=>{n("pageChange",d)},u=d=>{n("rowClick",d)},m=(d,A)=>{n("routeUrl",d,A)},g=d=>{n("clickTrigger",d)},y=(d,A)=>{n("clickMainKey",d,A)};return(d,A)=>{var w,Y;return e.openBlock(),e.createElementBlock("div",u2,[(w=i.value)!=null&&w.length?(e.openBlock(),e.createBlock(dl.ssTab,{tabsContents:i.value,key:(Y=i.value)==null?void 0:Y.length},{pane:e.withCtx(({tab:D,index:P})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(D==null?void 0:D.comp)),{related:D==null?void 0:D.relatedTables,compNames:D==null?void 0:D.nameContents,compName:D==null?void 0:D.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:a.isDevMode,itemData:D==null?void 0:D.compData,childItemData:D==null?void 0:D.itemChildData,onChange:o,calculator:D==null?void 0:D.calculatorFilters,index:(D==null?void 0:D.id)??P,config:{showIndex:D==null?void 0:D.showIndex,allowMove:D==null?void 0:D.allowMove,viewport:D==null?void 0:D.viewport,status:D==null?void 0:D.status},onContentChange:p,onPageChange:c,onRowClick:u,onRouteUrl:m,parentTableId:D==null?void 0:D.tableId,allMapContents:a.allMapContents,children:D==null?void 0:D.children,level:1,onClickTrigger:g,onClickMainKey:y},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","calculator","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),p2=sr._export_sfc(d2,[["__scopeId","data-v-71516232"]]),f2={class:"type-select"},h2=["onClick"],v2={class:"list-icon"},m2={__name:"modelSelect",setup(a){const l=ii(M.pinia),{itemData:r}=M.storeToRefs(l),n=i=>{const o=M.cloneDeep(r.value);o.push({comp:i.comp,name:i.name,compData:[]}),l.setItemData(o)};return(i,o)=>{const p=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",f2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(wu),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:m=>n(c)},[e.createElementVNode("div",v2,[e.createVNode(p,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,h2)]))),128))])}}},y2=sr._export_sfc(m2,[["__scopeId","data-v-91799bf8"]]),g2={class:"fill-content"},b2={class:"operate-content"},k2={class:"collapse-title-content"},x2={class:"collapse-title-item"},w2={key:1},_2=["onClick"],S2={class:"icon-content"},E2={key:0,class:"edit-content"},C2=["onClick"],D2={class:"comp-child"},T2={__name:"modelFill",setup(a){const l=ii(M.pinia),{itemData:r,originalData:n}=M.storeToRefs(l),i=e.ref([]);e.ref([]);const o=e.ref([]),p=e.ref([]),c=A=>{var Y;let w=(Y=M.cloneDeep(p.value))==null?void 0:Y.map((D,P)=>(A===P&&(D.content=!0),D));p.value=w},u=A=>{var Y;let w=(Y=M.cloneDeep(p.value))==null?void 0:Y.map((D,P)=>(A===P&&(D.content=!1),D));p.value=w,i.value=M.cloneDeep(r.value)},m=(A,w)=>{var O;let Y=(O=M.cloneDeep(p.value))==null?void 0:O.map((E,S)=>(A===S&&(E.content=!1),E));p.value=Y;const D=M.cloneDeep(r.value),P=D==null?void 0:D.filter((E,S)=>(S===A&&(E.name=w),E));l.setOriginalData(P),l.setItemData(P)};e.watch(()=>r.value,()=>{var A,w,Y;!r.value||((A=r.value)==null?void 0:A.length)===0?i.value=[]:i.value=(w=M.cloneDeep(r.value))==null?void 0:w.filter(D=>(D==null?void 0:D.comp)!=="methodButton"),o.value=i.value,p.value=(Y=M.cloneDeep(o.value))==null?void 0:Y.map((D,P)=>({id:P,content:!1}))},{deep:!0,immediate:!0});const g=A=>Ri(A),y=(A,w,Y)=>{var P,O;if(!A)return;let D=M.cloneDeep(r.value);D=(P=D==null?void 0:D.map((E,S)=>(S===Y&&(E.compData=A),E)))==null?void 0:P.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),p.value=(O=M.cloneDeep(D))==null?void 0:O.map((E,S)=>({id:S,content:!1})),l.setOriginalData(D),l.setItemData(D)},d=A=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const w=M.cloneDeep(r.value),Y=w==null?void 0:w.filter((D,P)=>P!==A);l.setOriginalData(Y),l.setItemData(Y),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(A,w)=>{const Y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",g2,[w[1]||(w[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",b2,[e.createVNode(uc.default,{class:"collapse-content",collapseContents:i.value},{title:e.withCtx(({item:D,index:P})=>{var O,E,S,x,b,_,I,R,re,X;return[e.createElementVNode("div",k2,[e.createElementVNode("div",x2,[(E=(O=p.value)==null?void 0:O.find(ye=>ye.id===P))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:D.name&&D.name!==""?"8px":"0px"})},e.toDisplayString(D.name),5)),(x=(S=p.value)==null?void 0:S.find(ye=>ye.id===P))!=null&&x.content?(e.openBlock(),e.createElementBlock("div",w2,[e.createVNode(dl.ssInput,{modelValue:D.name,"onUpdate:modelValue":ye=>D.name=ye,onClick:w[0]||(w[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(_=(b=p.value)==null?void 0:b.find(ye=>ye.id===P))!=null&&_.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ye=>c(P),["stop"]),class:"icon-content"},[e.createVNode(Y,{name:"Edit",style:{width:"16px",height:"16px"}})],8,_2))]),e.createElementVNode("div",S2,[(R=(I=p.value)==null?void 0:I.find(ye=>ye.id===P))!=null&&R.content?(e.openBlock(),e.createElementBlock("div",E2,[e.createVNode(Y,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ye=>u(P),["stop"])},null,8,["onClick"]),e.createVNode(Y,{name:"Save",onClick:e.withModifiers(ye=>m(P,D.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(X=(re=p.value)==null?void 0:re.find(ye=>ye.id===P))!=null&&X.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ye=>d(P),["stop"]),class:"icon-content"},[e.createVNode(Y,{name:"Delete",style:{width:"16px",height:"16px"}})],8,C2))])])]}),content:e.withCtx(({item:D,index:P})=>{var O,E;return[e.createElementVNode("div",D2,[e.createTextVNode(e.toDisplayString(g(D.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(D.comp+"Operate")),{itemContents:D==null?void 0:D.compData,originalItemContents:(E=(O=o.value)==null?void 0:O.find((S,x)=>x===P))==null?void 0:E.compData,onChange:S=>y(S,D,P)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},B2=sr._export_sfc(T2,[["__scopeId","data-v-a46a44b9"]]),N2={key:0,class:"show-content"},A2={style:{display:"flex"}},z2={__name:"modelShow",setup(a){const l=ii(M.pinia),{itemData:r}=M.storeToRefs(l),n=e.ref([]);e.watch(()=>r.value,()=>{var o;!r.value||((o=r.value)==null?void 0:o.length)===0?n.value=[]:n.value=M.cloneDeep(r.value)},{deep:!0,immediate:!0});const i=o=>Ri(o);return(o,p)=>{var c;return((c=n.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",N2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",A2,e.toDisplayString(u.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},M2=sr._export_sfc(z2,[["__scopeId","data-v-3f3e863e"]]),I2={class:"tabs-header"},O2={class:"tabs-list"},L2={class:"tab-name"},R2={class:"tab-actions"},$2=["onClick"],V2=["onClick"],F2=["onClick"],P2={class:"model-operate"},j2={class:"model-select",style:{display:"unset"}},H2={class:"existing-components"},U2={class:"component-list"},q2=["onClick"],W2={class:"component-info"},K2={class:"component-type"},G2={class:"component-name"},Y2={class:"model-fill"},J2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.ref([]),o=e.ref(!1),p=e.ref(""),c=e.ref({title:""}),u=e.ref(-1),m=e.ref(!1),g=e.ref(-1),y=e.ref(new WeakMap),d=e.ref(null),A=ii(M.pinia),{itemData:w}=M.storeToRefs(A),Y=()=>{p.value="新增标签页",c.value.title="",u.value=-1,o.value=!0},D=te=>{p.value="修改标签页",c.value.title=i.value[te].title,u.value=te,o.value=!0},P=te=>{const N=S(te);y.value.delete(N),i.value.splice(te,1),ze()},O=()=>{if(c.value.title.trim()){if(u.value===-1){const te={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};i.value.push(te)}else i.value[u.value].title=c.value.title,i.value[u.value].value=c.value.title,i.value[u.value].label=c.value.title;o.value=!1,ze()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=te=>{const N=i.value[te];return N.id||(N.id=E()),N.id},x=te=>{var W;g.value=te;const N=S(te);d.value=M.cloneDeep(w.value);let se=y.value.get(N);!se&&((W=i.value[te].children)==null?void 0:W.length)>0&&(se=R(i.value[te].children)),se?A.setItemData(M.cloneDeep(se)):A.setItemData([]),m.value=!0},b=e.computed(()=>{const te=M.useModelComp(M.pinia),N=M.storeToRefs(te).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(se=>{var W;if(se.comp==="Tabs"&&g.value>=0){const ue=S(g.value);if((W=se.compData)==null?void 0:W.some(we=>{var Ke;return we.key==="stepList"&&((Ke=we.contents)==null?void 0:Ke.some(la=>la.id===ue))}))return!1}return!0})}),_=te=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[te]||te,I=te=>{var N;try{const se=M.cloneDeep(te);se.id=Date.now()+Math.random(),se.comp==="Tabs"&&((N=se.compData)==null||N.forEach(ue=>{ue.key==="stepList"&&ue.contents&&ue.contents.forEach(_e=>{_e.id=E()})}));const W=M.cloneDeep(w.value);W.push(se),A.setItemData(W)}catch(se){console.error("添加组件失败:",se)}},R=te=>te.map(N=>{var se;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:re(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:X(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((se=N.content)==null?void 0:se.originalData)||[]}}}),re=te=>{if(!te)return[];const N=[];return te.rowContents&&N.push({key:"formContent",contents:te.rowContents}),te.buttonValue&&N.push({key:"formButton",contents:te.buttonValue}),typeof te.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:te.isEnableWrap}),N},X=te=>[],ye=()=>{if(g.value>=0&&g.value<i.value.length){const te=S(g.value);y.value.set(te,M.cloneDeep(w.value)),i.value[g.value].children=q(w.value),console.log("保存后的数据",q(w.value))}m.value=!1,g.value=-1,d.value=null,ze()},fe=()=>{d.value&&A.setItemData(M.cloneDeep(d.value)),m.value=!1,g.value=-1,d.value=null},U=()=>{m.value&&fe()},q=te=>{if(!Array.isArray(te))throw new Error("sourceData must be an array");return te.map((N,se)=>{if(!N||typeof N!="object")return N;const{comp:W,name:ue,compData:_e}=N;switch(W){case"Form":return{type:"form",content:Z(_e||[]),value:"表单"};case"Table":return{type:"table",content:ae(_e||[]),value:"表格"};default:return{type:"xxx",content:ve(_e||[]),value:""}}})},Z=te=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},se={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return te.forEach((W,ue)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${ue}:`,W);return}const{key:_e,contents:we}=W,Ke=se[_e];if(!Ke){console.warn(`Unknown Form config key: ${_e}`);return}_e==="enableWrap"?N[Ke]=!!we:N[Ke]=Array.isArray(we)?we:[]}),N},ae=te=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},se={header:"columns",tableContents:"tableData"};return te.forEach((W,ue)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${ue}:`,W);return}const{key:_e,contents:we}=W,Ke=se[_e];if(!Ke){console.warn(`Unknown Table config key: ${_e}`);return}N[Ke]=Array.isArray(we)?we:[]}),N},ve=te=>(console.log("Default conversion logic - to be implemented"),{originalData:te,processed:!1,componentType:"unknown"}),ze=()=>{const te=[{key:"stepList",contents:i.value}];n("change",te)};return e.watch(()=>r.itemContents,te=>{if(te&&te.length>0){const N=te.find(se=>se.key==="stepList");N&&N.contents&&(i.value=N.contents.map(se=>({title:se.title||"",value:se.value||se.title||"",label:se.label||se.title||"",children:se.children||[],id:se.id||E()})))}},{immediate:!0,deep:!0}),(te,N)=>{const se=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-input"),ue=e.resolveComponent("el-form-item"),_e=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I2,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Y},[e.createVNode(se,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",O2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(we,Ke)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Ke},[e.createElementVNode("span",L2,e.toDisplayString(we.title),1),e.createElementVNode("div",R2,[e.createElementVNode("button",{onClick:la=>D(Ke)},"修改标题",8,$2),e.createElementVNode("button",{onClick:la=>x(Ke)},"布局调整",8,V2),e.createElementVNode("button",{onClick:la=>P(Ke)},"删除",8,F2)])]))),128))]),e.createVNode($r.ssDialog,{modelValue:o.value,"onUpdate:modelValue":N[2]||(N[2]=we=>o.value=we),title:p.value,onBeforeDestroy:N[3]||(N[3]=we=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=we=>o.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:O},"确定")]),default:e.withCtx(()=>[e.createVNode(_e,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ue,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:c.value.title,"onUpdate:modelValue":N[0]||(N[0]=we=>c.value.title=we),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode($r.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=we=>m.value=we),title:"布局调整",fullScreen:"",onBeforeDestroy:U},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:fe},"取消"),e.createElementVNode("button",{onClick:ye},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",P2,[e.createElementVNode("div",j2,[e.createVNode(y2),e.createElementVNode("div",H2,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",U2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,we=>(e.openBlock(),e.createElementBlock("div",{key:we.id,class:"component-item",onClick:Ke=>I(we)},[e.createElementVNode("div",W2,[e.createElementVNode("span",K2,e.toDisplayString(_(we.comp)),1),e.createElementVNode("span",G2,e.toDisplayString(we.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,q2))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:te.innerWidth},[e.createVNode(M2)])),e.createElementVNode("div",Y2,[e.createVNode(B2)])])]),_:1},8,["modelValue"])])}}},X2=sr._export_sfc(J2,[["__scopeId","data-v-9096ed0d"]]);function Z2(){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 Q2(a){return{type:"line",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],...a}}function ev(){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 av(a){return{type:"bar",barWidth:"60%",showBackground:!0,backgroundStyle:{color:"rgba(180, 180, 180, 0.1)"},itemStyle:{color:new Fl.LinearGradient(0,0,0,1,[{offset:0,color:"#94C2FD"},{offset:.7,color:"#6491E1"},{offset:1,color:"#3264C8"}])},emphasis:{itemStyle:{color:new Fl.LinearGradient(0,0,0,1,[{offset:0,color:"#3264C8"},{offset:.7,color:"#6491E1"},{offset:1,color:"#94C2FD"}])}},...a}}function lv(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function rv(a){return{type:"pie",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],radius:["40%","70%"],itemStyle:{borderRadius:6,borderColor:"#fff",borderWidth:2},label:{show:!0,formatter:function(l){return"{b|"+l.name+`}
26
26
  {c|`+l.value+"}"},rich:{b:{fontFamily:"SourceHanSansSC",fontWeight:"bold",fontSize:14,color:"#333"},c:{fontFamily:"SourceHanSansSC",fontSize:12,color:"#666"},d:{fontFamily:"SourceHanSansSC",fontSize:12,color:"#999"}}},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const nv=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),iv=a=>({type:"scatter",symbolSize:20,...a}),zn={Line:{initBaseoptions:Z2,initSeries:Q2},Bar:{initBaseoptions:ev,initSeries:av},Pie:{initBaseoptions:lv,initSeries:rv},Scatter:{initBaseoptions:nv,initSeries:iv}},ov=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=zn==null?void 0:zn[n];if(!o)return;const{initBaseoptions:p,initSeries:c}=o,u=p();u.title.text=i??"";const m=l==null?void 0:l.map(d=>d==null?void 0:d.prop);let g=[];if(m==null||m.forEach(d=>{var A;g.push((A=r==null?void 0:r[0])==null?void 0:A[d])}),!m||!g)return u;u.xAxis.data=m;const y=c({data:g});return u.series.push(y),u},tv=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=zn==null?void 0:zn[n];if(!o)return;const{initBaseoptions:p,initSeries:c}=o,u=p();u.title.text=i??"";const m=l==null?void 0:l.map(d=>d==null?void 0:d.prop);let g=[];if(m==null||m.forEach(d=>{var A;g.push((A=r==null?void 0:r[0])==null?void 0:A[d])}),!m||!g)return u;u.xAxis.data=m;const y=c({data:g});return u.series.push(y),u},sv=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=zn==null?void 0:zn[n];if(!o)return;const{initBaseoptions:p,initSeries:c}=o,u=p();u.title.text=i??"";const m=l==null?void 0:l.map(A=>A==null?void 0:A.prop);let g=[];if(m==null||m.forEach(A=>{var w;g.push((w=r==null?void 0:r[0])==null?void 0:w[A])}),!m||!g)return u;const y=[];for(let A=0;A<m.length;A++){const w=m[A],Y=g[A];y.push({name:w,value:Y})}const d=c({data:y});return u.series.push(d),u},cv=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:i}=a||{},o=zn==null?void 0:zn[n];if(!o)return;const{initBaseoptions:p,initSeries:c}=o,u=p();u.title.text=i??"";let m=[];const g=l==null?void 0:l.map(A=>A==null?void 0:A.prop);if(m=g==null?void 0:g.map(A=>{var Y;let w=[];return w.push(A),w.push((Y=r==null?void 0:r[0])==null?void 0:Y[A]),w}),!m)return u;const d=c({data:m});return u.series.push(d),u},uv=async(a=[])=>{var c,u,m,g,y;const l=((c=a==null?void 0:a.find(d=>d.key==="ChartType"))==null?void 0:c.contents)??{};let r=((u=a==null?void 0:a.find(d=>d.key==="header"))==null?void 0:u.contents)??[],n=((m=a==null?void 0:a.find(d=>d.key==="tableContents"))==null?void 0:m.contents)??[],i=((g=a==null?void 0:a.find(d=>d.key==="calculator"))==null?void 0:g.contents)??[];if((i==null?void 0:i.length)>0){i=i==null?void 0:i.map(A=>({methods:A==null?void 0:A.calculatorFilter,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords}));let d=await Rt([],i,[],"Auto",[],[]);r=(y=d==null?void 0:d.xAxis)==null?void 0:y.map(A=>({label:A,prop:A})),n=d==null?void 0:d.yAxis}let{type:o}=l,p={};return o==="Line"&&(p=await ov({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),o==="Bar"&&(p=await tv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),o==="Pie"&&(p=await sv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),o==="Scatter"&&(p=await cv({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),p},dv=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,r=e.ref({});e.onMounted(async()=>{const i=l==null?void 0:l.itemData;r.value=await uv(i)});const n=e.computed(()=>(l==null?void 0:l.height)||"300px");return(i,o)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:n.value})},[e.createVNode(Qu.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),pv=sr._export_sfc(dv,[["__scopeId","data-v-d4c081e8"]]),fv={class:"chart-module layout"},hv={class:"chart-module content"},vv={class:"chart-module content"},mv={class:"form-content"},yv={class:"dialog-footer"},gv={class:"form-content"},bv={class:"dialog-footer"},kv={class:"form-content"},xv={class:"dialog-footer"},wv=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,i=e.reactive({visible:!1,width:"840",title:"基础配置"}),o=e.ref([]),p=()=>[{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({}),u=Me=>{var de;o.value=p(),(de=o.value)==null||de.forEach(Ce=>{var Ea;const Je=Ce==null?void 0:Ce.prop;Ce.value=(Ea=c==null?void 0:c.value)==null?void 0:Ea[Je]}),i.visible=!0},m=Me=>{c.value=Me},g=()=>{var Me;i.visible=!1,n("change",(Me=Oe())==null?void 0:Me.compData)},y=e.reactive({visible:!1,width:"840",title:"数据配置"}),d=e.ref([]),A=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],w=e.ref({}),Y=()=>{const Me=d.value,de=M.cloneDeep(Me);return de==null||de.forEach(Ce=>{var Ea;const Je=Ce==null?void 0:Ce.prop;Ce.value=(Ea=w.value)==null?void 0:Ea[Je]}),de},D=Me=>{var Ce;w.value=Me;const de=Y();d.value=de,n("change",(Ce=Oe())==null?void 0:Ce.compData)},P=async Me=>{const de=await le.getMenusContent(),Ce=Y();Ce==null||Ce.forEach(Je=>{(Je==null?void 0:Je.prop)==="menu"&&(Je.contents=de)}),d.value=Ce,y.visible=!0,await we(w.value.menu),await j(w.value.group)},O=e.reactive({visible:!1,width:"840",title:"详情页配置"}),E=e.ref([]),S=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],x=e.ref({}),b=()=>{const Me=E.value,de=M.cloneDeep(Me);return de==null||de.forEach(Ce=>{var Ea;const Je=Ce==null?void 0:Ce.prop;Ce.value=(Ea=x.value)==null?void 0:Ea[Je]}),de},_=Me=>{var Ce;x.value=Me;const de=b();E.value=de,n("change",(Ce=Oe())==null?void 0:Ce.compData)},I=async Me=>{await U();const de=M.cloneDeep(R.value),Ce=b();Ce==null||Ce.forEach(Je=>{var Ge;const Ea=Je==null?void 0:Je.prop;Je.value=(Ge=x==null?void 0:x.value)==null?void 0:Ge[Ea],Ea==="mainKey"&&(Je.contents=de)}),E.value=Ce,O.visible=!0},R=e.ref([]),re=e.ref([]),X=e.ref({}),ye=e.ref({}),fe=()=>{const{compData:Me}=W.value||{},de=Me==null?void 0:Me.find(ee=>{const{key:ce}=ee;return ce==="header"}),Ce=(de==null?void 0:de.contents)||[],Je=Ce==null?void 0:Ce.filter((ee,ce)=>{const{label:he}=ee;return he!=="操作"}),Ea=Je==null?void 0:Je.findIndex((ee,ce)=>{const{isMainKey:he}=ee;return he});if(Ea<0)return[];const Ge=Me==null?void 0:Me.find(ee=>{const{key:ce}=ee;return ce==="tableContents"}),$=(Ge==null?void 0:Ge.contents)||[];return $==null?void 0:$.map(ee=>{const ce=ee==null?void 0:ee[0];let he=Ea;Ja.isObject(ce)&&(ce!=null&&ce.id)&&(he=he+1);const ca=ee==null?void 0:ee[he];return{label:ca,value:ca}})},U=async()=>{const Me=await fe();R.value=Me},q=async Me=>{const de=sessionStorage.getItem("systemKey");return await le.getItemData(Me,de,"")},Z=async Me=>{const de=Me;re.value=de==null?void 0:de.map(Ce=>{const{name:Je}=Ce;return X.value[Je]=Ce,{label:Je,value:Je}})},ae=Me=>{const{comp:de,compData:Ce}=ye.value||{};if(de==="Table"){let Je=b();Je=Je.filter(Ea=>{const{prop:Ge}=Ea;return Ge!=="formItems"}),Ke(Je,Ce),E.value=Je}},ve=async()=>{var Ce,Je;const Me=(Ce=x==null?void 0:x.value)==null?void 0:Ce.mainKey,de=(Je=w==null?void 0:w.value)==null?void 0:Je.menu;if(Me){const Ge=`${de==null?void 0:de.join("/")}^${Me}`,$=await q(Ge);await Z($);const V=b();V==null||V.forEach(ee=>{(ee==null?void 0:ee.prop)==="group"&&(ee.contents=re.value)}),E.value=V}};e.watch(()=>{var Me;return(Me=x==null?void 0:x.value)==null?void 0:Me.mainKey},async(Me,de)=>{Me!=de&&Me&&await ve()});const ze=async Me=>{const de=X.value[Me];ye.value=de,await ae()};e.watch(()=>{var Me;return(Me=x==null?void 0:x.value)==null?void 0:Me.group},async(Me,de)=>{Me!=de&&Me&&ze(Me)});const te=async()=>{var de;await ve();const Me=(de=x.value)==null?void 0:de.group;await ze(Me)},N=e.ref([]),se=e.ref({}),W=e.ref({}),ue=async Me=>{const de=Me==null?void 0:Me.join("/"),Ce=sessionStorage.getItem("systemKey");return await le.getItemData(de,Ce,"")},_e=async Me=>{const de=await ue(Me);N.value=de==null?void 0:de.map(Ce=>{const{name:Je}=Ce;return se.value[Je]=Ce,{label:Je,value:Je}})},we=async(Me,de)=>{await _e(Me);const Ce=Y();Ce==null||Ce.forEach(Je=>{(Je==null?void 0:Je.prop)==="group"&&(Je.contents=N.value)}),d.value=Ce};e.watch(()=>{var Me;return(Me=w==null?void 0:w.value)==null?void 0:Me.menu},async(Me,de)=>{const Ce=Me==null?void 0:Me.join("/"),Je=de==null?void 0:de.join("/");Ce!=Je&&await we(Me)});const Ke=(Me,de)=>{const Ce=de==null?void 0:de.find($=>{const{key:V}=$;return V==="header"}),Je=(Ce==null?void 0:Ce.contents)||[],Ea=Je==null?void 0:Je.filter(($,V)=>{const{label:ee}=$;return ee!=="操作"}),Ge=Ea==null?void 0:Ea.map(($,V)=>{const{label:ee}=$;return{label:ee,value:V}});Me==null||Me.forEach($=>{const V=$==null?void 0:$.prop;(V==="nameCol"||V==="valueCol")&&($.contents=Ge)})},la=Me=>{const{comp:de,compData:Ce}=W.value||{};if(de==="Table"){w.value.formItems=[];let Je=Y();Je=Je.filter(Ea=>{const{prop:Ge}=Ea;return Ge!=="formItems"}),Ke(Je,Ce),d.value=Je}},j=async Me=>{const de=se.value[Me];W.value=de,await la()};e.watch(()=>{var Me;return(Me=w==null?void 0:w.value)==null?void 0:Me.group},async(Me,de)=>{Me!=de&&j(Me)});const We=async()=>{var Ce,Je;const Me=(Ce=w.value)==null?void 0:Ce.menu;await we(Me);const de=(Je=w.value)==null?void 0:Je.group;await j(de)},Oe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:w.value},{key:"chartDetailConfig",contents:x.value}]}),Ie=()=>{i.visible=!1,y.visible=!1,O.visible=!1};return e.onMounted(async()=>{var de,Ce,Je;d.value=A(),E.value=S();const Me=r==null?void 0:r.itemContents;c.value=((de=Me==null?void 0:Me.find(Ea=>Ea.key==="chartBaseConfig"))==null?void 0:de.contents)??{},w.value=((Ce=Me==null?void 0:Me.find(Ea=>Ea.key==="chartDataConfig"))==null?void 0:Ce.contents)??{},await We(),x.value=((Je=Me==null?void 0:Me.find(Ea=>Ea.key==="chartDetailConfig"))==null?void 0:Je.contents)??{},await te()}),(Me,de)=>{const Ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",fv,[de[4]||(de[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Ce,{id:"themeButton",onClick:de[0]||(de[0]=Je=>u())},{default:e.withCtx(()=>de[3]||(de[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",hv,[de[6]||(de[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Ce,{id:"themeButton",onClick:de[1]||(de[1]=Je=>P())},{default:e.withCtx(()=>de[5]||(de[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",vv,[de[8]||(de[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Ce,{id:"themeButton",onClick:de[2]||(de[2]=Je=>I())},{default:e.withCtx(()=>de[7]||(de[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode($r.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:Ie,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",mv,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",yv,[e.createVNode(Ce,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>de[9]||(de[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Ce,{class:"ok-button button",onClick:g,id:"themeButton"},{default:e.withCtx(()=>de[10]||(de[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode($r.ssDialog,{visible:y.visible,title:y.title,onBeforeDestroy:Ie,width:y.width},{default:e.withCtx(()=>[e.createElementVNode("div",gv,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",bv,[e.createVNode(Ce,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>de[11]||(de[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Ce,{class:"ok-button button",onClick:Ie,id:"themeButton"},{default:e.withCtx(()=>de[12]||(de[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode($r.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:Ie,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",kv,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",xv,[e.createVNode(Ce,{class:"cancel-button button",onClick:Ie,id:"themeBorderButton"},{default:e.withCtx(()=>de[13]||(de[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Ce,{class:"ok-button button",onClick:Ie,id:"themeButton"},{default:e.withCtx(()=>de[14]||(de[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),_v=sr._export_sfc(wv,[["__scopeId","data-v-88c50cdb"]]),Sv={class:"layout"},Ev=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const r=l,n=a;e.onMounted(async()=>{});const i=e.computed(()=>M.cloneDeep(n==null?void 0:n.itemData)||[]),o=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(y=>{const{key:d}=y;return d==="baseConfig"});return m==null?void 0:m.contents}),p=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(y=>{const{key:d}=y;return d==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=M.cloneDeep(p.value)||[];const g=m.length;let y=0;const d=[];if(m=m.map(A=>{const w=A.span;return w?(A.span=Number(w),y=y+A.span):d.push(A),A}),y<24){const A=Math.floor((24-y)/g);d.forEach(w=>{w.span=A})}return m}),u=m=>{r("rowClick",m)};return(m,g)=>{var A;const y=e.resolveComponent("el-col"),d=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Sv,[e.createVNode(d,{style:e.normalizeStyle({height:(A=o.value)==null?void 0:A.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(w,Y)=>(e.openBlock(),e.createBlock(y,{span:w==null?void 0:w.span},{default:e.withCtx(()=>{var D;return[e.unref(Li)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(w.comp)),{key:e.unref(ni),compName:w.name,index:(w==null?void 0:w.id)??Y,height:(D=o.value)==null?void 0:D.height,itemData:w==null?void 0:w.compData,childItemData:w==null?void 0:w.itemChildData,onChange:e.unref(zo),onContentChange:e.unref(Mo),onPageChange:e.unref(Io),onRowClick:u},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Cv=sr._export_sfc(Ev,[["__scopeId","data-v-ab9a36ed"]]),Dv={class:"layout-operate"},Tv={class:"layout-module"},Bv={class:"collapse-title-item"},Nv={class:"collapse-title"},Av={class:"icon-content"},zv=["onClick"],Mv={class:"comp-child"},Iv=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l;e.onMounted(()=>{Y()});const i=e.ref({}),o=e.ref({}),p=e.ref([]),c=x=>[{label:"高度",prop:"height",type:"input",value:x==null?void 0:x.height}],u=x=>{o.value=x,n("change",S(),!0)},m=e.ref([]),g=e.ref([]),y=x=>[{label:"占比",prop:"span",type:"input",value:x==null?void 0:x.span}],d=e.computed(()=>{const x=r==null?void 0:r.itemContents;return M.cloneDeep(x)}),A=e.computed(()=>{const x=d==null?void 0:d.value,b=x==null?void 0:x.find(_=>{const{key:I}=_;return I==="baseConfig"});return b==null?void 0:b.contents}),w=e.computed(()=>{const x=d==null?void 0:d.value,b=x==null?void 0:x.find(_=>{const{key:I}=_;return I==="children"});return b==null?void 0:b.contents}),Y=()=>{var x;i.value=d.value||{},m.value=(w==null?void 0:w.value)||[],p.value=c(),p.value=(x=p.value)==null?void 0:x.map(b=>{var I;const{prop:_}=b;return b.value=(I=A.value)==null?void 0:I[_],b})};e.watch(()=>{var x;return(x=w==null?void 0:w.value)==null?void 0:x.length},()=>{var x;m.value=(w==null?void 0:w.value)||[],g.value=(x=w.value)==null?void 0:x.map(b=>y(b))},{immediate:!0});const D=(x,b)=>{const _=M.cloneDeep(w==null?void 0:w.value);_[b].span=x.span,m.value=_,n("change",S(),!0)},P=x=>Ri(x),O=(x,b,_)=>{if(!x)return;const I=M.cloneDeep(w==null?void 0:w.value);I[_]&&(I[_].compData=x,m.value=I,n("change",S(),!0))},E=x=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let b=M.cloneDeep(w==null?void 0:w.value);b=b==null?void 0:b.filter((_,I)=>x!==I),m.value=b,n("change",S(),!0),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:o.value},{key:"children",contents:m==null?void 0:m.value}]});return(x,b)=>{const _=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Dv,[e.createElementVNode("div",Tv,[b[1]||(b[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(dl.ssForm,{rowContents:p.value,isEnableWrap:!0,onChange:b[0]||(b[0]=I=>u(I))},null,8,["rowContents"])])]),e.createVNode(uc.default,{class:"collapse-content",collapseContents:w.value},{title:e.withCtx(({item:I,index:R})=>[e.createElementVNode("div",Bv,[e.createElementVNode("div",Nv,e.toDisplayString(I.name),1),e.createElementVNode("div",Av,[e.createElementVNode("div",{onClick:e.withModifiers(re=>E(R),["stop"]),class:"icon-content"},[e.createVNode(_,{name:"Delete",style:{width:"16px",height:"16px"}})],8,zv)])])]),content:e.withCtx(({item:I,index:R})=>[e.createElementVNode("div",Mv,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(dl.ssForm,{rowContents:g.value[R],key:R,isEnableWrap:!0,onChange:re=>D(re,R)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(I.comp+"Operate")),{itemContents:I==null?void 0:I.compData,originalItemContents:I.compData,onChange:re=>O(re,I,R)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Ov=sr._export_sfc(Iv,[["__scopeId","data-v-ba05456e"]]),Lv=typeof window<"u";var Rs;Lv&&((Rs=window==null?void 0:window.navigator)!=null&&Rs.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Tn(a){return a==null}function lu(){}const Rv=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(Rv)));function $v(){const a=new Map;return{on(l,r){const n=a.get(l);n!=null&&n.add(r)||a.set(l,new Set([r]))},off(l,r){const n=a.get(l);n&&n.delete(r)},clear(l){const r=a.get(l);r&&r.clear()},clearAll(){a.clear()},emit(l,...r){const n=a.get(l);n&&n.forEach(i=>{i(...r)})}}}function $s(a,l=16){if(typeof a!="function")return lu;const r=(...o)=>{a(...o)};if(l<=0)return ru(r);let n=0,i;return function(...o){const p=Date.now(),c=p-n;clearTimeout(i),c>=l?(n=p,r(...o)):i=setTimeout(()=>{n=Date.now(),r(...o)},Math.max(0,l-c))}}function Vv(a,l=100){if(typeof a!="function")return lu;const r=(...i)=>{a(...i)};if(l<=0)return ru(r);let n;return function(...i){clearTimeout(n),n=setTimeout(()=>{r(...i)},l)}}function ru(a){if(typeof a!="function")return a;let l=!1,r,n;return function(...i){return r=i,l||(l=!0,n=Promise.resolve().then(()=>(l=!1,n=void 0,a(...r)))),n}}const Ji=new Set,nu=new WeakMap;function Fv(){Ji.forEach(a=>{a(...nu.get(a))}),Ji.clear()}function bn(a,...l){if(typeof a!="function")return a;nu.set(a,l),!Ji.has(a)&&(Ji.add(a),Ji.size===1&&Promise.resolve().then(Fv))}const iu=Symbol("LAYOUT_KEY"),ou=Symbol("EMITTER_KEY");function Pv(a){let l=0,r;for(let n=0,i=a.length;n<i;n++)r=a[n].y+a[n].h,r>l&&(l=r);return l}function Mt(a){const l=Array(a.length);for(let r=0,n=a.length;r<n;r++)l[r]=jv(a[r]);return l}function jv(a){return{...a}}function tu(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 Ai(a,l,r){const n=cu(a),i=uu(a),o=Array(a.length);for(let p=0,c=i.length;p<c;p++){let u=i[p];u.static||(u=Hv(n,u,l,r),n.push(u)),o[a.findIndex(m=>m.i===u.i)]=u,u.moved=!1}return o}function Hv(a,l,r,n){if(r)for(;l.y>0&&!Xi(a,l);)l.y--;else if(n){const o=n[l.i].y;for(;l.y>o&&!Xi(a,l);)l.y--}let i;for(;i=Xi(a,l);)l.y=i.y+i.h;return l}function Uv(a,l){const r=cu(a);for(let n=0,i=a.length;n<i;n++){const o=a[n];if(o.x+o.w>l.cols&&(o.x=l.cols-o.w),o.x<0&&(o.x=0,o.w=l.cols),!o.static)r.push(o);else for(;Xi(r,o);)o.y++}return a}function Vs(a,l){for(let r=0,n=a.length;r<n;r++)if(a[r].i===l)return a[r]}function Xi(a,l){for(let r=0,n=a.length;r<n;r++)if(tu(a[r],l))return a[r]}function su(a,l){return a.filter(r=>tu(r,l))}function cu(a){return a.filter(l=>l.static)}function It(a,l,r,n,i=!1,o=!1){if(l.static)return a;const p=l.x,c=l.y,u=n&&l.y>n;typeof r=="number"&&(l.x=r),typeof n=="number"&&(l.y=n),l.moved=!0;let m=uu(a);u&&(m=m.reverse());const g=su(m,l);if(o&&g.length)return l.x=p,l.y=c,l.moved=!1,a;for(let y=0,d=g.length;y<d;y++){const A=g[y];A.moved||l.y>A.y&&l.y-A.y>A.h/4||(A.static?a=Fs(a,A,l,i):a=Fs(a,l,A,i))}return a}function Fs(a,l,r,n){if(n){const i={x:r.x,y:r.y,w:r.w,h:r.h};if(i.y=Math.max(l.y-r.h,0),!Xi(a,i))return It(a,r,void 0,i.y,!1)}return It(a,r,void 0,r.y+1,!1)}function qv(a,l,r,n){const i="translate3d("+l+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:r+"px",height:n+"px",position:"absolute"}}function Wv(a,l,r,n){const i="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:r+"px",height:n+"px",position:"absolute"}}function Kv(a,l,r,n){return{top:a+"px",left:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function Gv(a,l,r,n){return{top:a+"px",right:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function uu(a){return Array.from(a).sort(function(l,r){return l.y===r.y&&l.x===r.x?0:l.y>r.y||l.y===r.y&&l.x>r.x?1:-1})}function Yv(a,l){l=l||"Layout";const r=["x","y","w","h"],n=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let i=0,o=a.length;i<o;i++){const p=a[i];for(let c=0;c<r.length;c++)if(typeof p[r[c]]!="number")throw new Error("VueGridLayout: "+l+"["+i+"]."+r[c]+" must be a number!");if(p.i===void 0||p.i===null)throw new Error("VueGridLayout: "+l+"["+i+"].i cannot be null!");if(typeof p.i!="number"&&typeof p.i!="string")throw new Error("VueGridLayout: "+l+"["+i+"].i must be a string or number!");if(n.indexOf(p.i)>=0)throw new Error("VueGridLayout: "+l+"["+i+"].i must be unique!");if(n.push(p.i),p.static!==void 0&&typeof p.static!="boolean")throw new Error("VueGridLayout: "+l+"["+i+"].static must be a boolean!")}}function Jv(a,l="vgl"){const r=()=>`${l}-${a}`;return{b:r,be:n=>`${r()}__${n}`,bm:n=>`${r()}--${n}`,bem:(n,i)=>`${r()}__${n}--${i}`}}function Ps(a){return Xv(a)}function Xv(a){var l;const r=((l=a.target)==null?void 0:l.offsetParent)||document.body,n=a.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),i=a.clientX+r.scrollLeft-n.left,o=a.clientY+r.scrollTop-n.top;return{x:i,y:o}}function js(a,l,r,n){return Zv(a)?{deltaX:r-a,deltaY:n-l,lastX:a,lastY:l,x:r,y:n}:{deltaX:0,deltaY:0,lastX:r,lastY:n,x:r,y:n}}function Zv(a){return typeof a=="number"&&!Number.isNaN(a)}function Qv(a,l){const r=pu(a);let n=r[0];for(let i=1,o=r.length;i<o;i++){const p=r[i];l>a[p]&&(n=p)}return n}function du(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function e1(a,l,r,n,i,o,p){if(l[n])return Mt(l[n]);let c=a;const u=pu(r),m=u.slice(u.indexOf(n));for(let g=0,y=m.length;g<y;g++){const d=m[g];if(l[d]){c=l[d];break}}return c=Mt(c||[]),Ai(Uv(c,{cols:o}),p)}function pu(a){return Object.keys(a).sort((l,r)=>a[l]-a[r])}let a1="auto";function l1(){return typeof document<"u"}function Hs(){return l1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):a1}var Gi={exports:{}},r1=Gi.exports,Us;function n1(){return Us||(Us=1,function(a,l){(function(r,n){a.exports=n()})(r1,function(){function r(s,t){var h=Object.keys(s);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(s);t&&(k=k.filter(function(C){return Object.getOwnPropertyDescriptor(s,C).enumerable})),h.push.apply(h,k)}return h}function n(s){for(var t=1;t<arguments.length;t++){var h=arguments[t]!=null?arguments[t]:{};t%2?r(Object(h),!0).forEach(function(k){u(s,k,h[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(h)):r(Object(h)).forEach(function(k){Object.defineProperty(s,k,Object.getOwnPropertyDescriptor(h,k))})}return s}function i(s){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(s)}function o(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}function p(s,t){for(var h=0;h<t.length;h++){var k=t[h];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(s,Y(k.key),k)}}function c(s,t,h){return t&&p(s.prototype,t),Object.defineProperty(s,"prototype",{writable:!1}),s}function u(s,t,h){return(t=Y(t))in s?Object.defineProperty(s,t,{value:h,enumerable:!0,configurable:!0,writable:!0}):s[t]=h,s}function m(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&y(s,t)}function g(s){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(s)}function y(s,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,k){return h.__proto__=k,h},y(s,t)}function d(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function A(s){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var h,k=g(s);if(t){var C=g(this).constructor;h=Reflect.construct(k,arguments,C)}else h=k.apply(this,arguments);return function(F,G){if(G&&(typeof G=="object"||typeof G=="function"))return G;if(G!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(F)}(this,h)}}function w(){return w=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(s,t,h){var k=function(F,G){for(;!Object.prototype.hasOwnProperty.call(F,G)&&(F=g(F))!==null;);return F}(s,t);if(k){var C=Object.getOwnPropertyDescriptor(k,t);return C.get?C.get.call(arguments.length<3?s:h):C.value}},w.apply(this,arguments)}function Y(s){var t=function(h,k){if(typeof h!="object"||h===null)return h;var C=h[Symbol.toPrimitive];if(C!==void 0){var F=C.call(h,k);if(typeof F!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}(s,"string");return typeof t=="symbol"?t:t+""}var D=function(s){return!(!s||!s.Window)&&s instanceof s.Window},P=void 0,O=void 0;function E(s){P=s;var t=s.document.createTextNode("");t.ownerDocument!==s.document&&typeof s.wrap=="function"&&s.wrap(t)===t&&(s=s.wrap(s)),O=s}function S(s){return D(s)?s:(s.ownerDocument||s).defaultView||O.window}typeof window<"u"&&window&&E(window);var x=function(s){return!!s&&i(s)==="object"},b=function(s){return typeof s=="function"},_={window:function(s){return s===O||D(s)},docFrag:function(s){return x(s)&&s.nodeType===11},object:x,func:b,number:function(s){return typeof s=="number"},bool:function(s){return typeof s=="boolean"},string:function(s){return typeof s=="string"},element:function(s){if(!s||i(s)!=="object")return!1;var t=S(s)||O;return/object|function/.test(typeof Element>"u"?"undefined":i(Element))?s instanceof Element||s instanceof t.Element:s.nodeType===1&&typeof s.nodeName=="string"},plainObject:function(s){return x(s)&&!!s.constructor&&/function Object\b/.test(s.constructor.toString())},array:function(s){return x(s)&&s.length!==void 0&&b(s.splice)}};function I(s){var t=s.interaction;if(t.prepared.name==="drag"){var h=t.prepared.axis;h==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):h==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function R(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="drag"){var k=h.prepared.axis;if(k==="x"||k==="y"){var C=k==="x"?"y":"x";t.page[C]=h.coords.start.page[C],t.client[C]=h.coords.start.client[C],t.delta[C]=0}}}var re={id:"actions/drag",install:function(s){var t=s.actions,h=s.Interactable,k=s.defaults;h.prototype.draggable=re.draggable,t.map.drag=re,t.methodDict.drag="draggable",k.actions.drag=re.defaults},listeners:{"interactions:before-action-move":I,"interactions:action-resume":I,"interactions:action-move":R,"auto-start:check":function(s){var t=s.interaction,h=s.interactable,k=s.buttons,C=h.options.drag;if(C&&C.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(k&h.options.drag.mouseButtons)!=0))return s.action={name:"drag",axis:C.lockAxis==="start"?C.startAxis:C.lockAxis},!1}},draggable:function(s){return _.object(s)?(this.options.drag.enabled=s.enabled!==!1,this.setPerAction("drag",s),this.setOnEvents("drag",s),/^(xy|x|y|start)$/.test(s.lockAxis)&&(this.options.drag.lockAxis=s.lockAxis),/^(xy|x|y)$/.test(s.startAxis)&&(this.options.drag.startAxis=s.startAxis),this):_.bool(s)?(this.options.drag.enabled=s,this):this.options.drag},beforeMove:I,move:R,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(s){return s.search("drag")===0}},X=re,ye={init:function(s){var t=s;ye.document=t.document,ye.DocumentFragment=t.DocumentFragment||fe,ye.SVGElement=t.SVGElement||fe,ye.SVGSVGElement=t.SVGSVGElement||fe,ye.SVGElementInstance=t.SVGElementInstance||fe,ye.Element=t.Element||fe,ye.HTMLElement=t.HTMLElement||ye.Element,ye.Event=t.Event,ye.Touch=t.Touch||fe,ye.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function fe(){}var U=ye,q={init:function(s){var t=U.Element,h=s.navigator||{};q.supportsTouch="ontouchstart"in s||_.func(s.DocumentTouch)&&U.document instanceof s.DocumentTouch,q.supportsPointerEvent=h.pointerEnabled!==!1&&!!U.PointerEvent,q.isIOS=/iP(hone|od|ad)/.test(h.platform),q.isIOS7=/iP(hone|od|ad)/.test(h.platform)&&/OS 7[^\d]/.test(h.appVersion),q.isIe9=/MSIE 9/.test(h.userAgent),q.isOperaMobile=h.appName==="Opera"&&q.supportsTouch&&/Presto/.test(h.userAgent),q.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",q.pEventTypes=q.supportsPointerEvent?U.PointerEvent===s.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,q.wheelEvent=U.document&&"onmousewheel"in U.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Z=q;function ae(s,t){if(s.contains)return s.contains(t);for(;t;){if(t===s)return!0;t=t.parentNode}return!1}function ve(s,t){for(;_.element(s);){if(te(s,t))return s;s=ze(s)}return null}function ze(s){var t=s.parentNode;if(_.docFrag(t)){for(;(t=t.host)&&_.docFrag(t););return t}return t}function te(s,t){return O!==P&&(t=t.replace(/\/deep\//g," ")),s[Z.prefixedMatchesSelector](t)}var N=function(s){return s.parentNode||s.host};function se(s,t){for(var h,k=[],C=s;(h=N(C))&&C!==t&&h!==C.ownerDocument;)k.unshift(C),C=h;return k}function W(s,t,h){for(;_.element(s);){if(te(s,t))return!0;if((s=ze(s))===h)return te(s,t)}return!1}function ue(s){return s.correspondingUseElement||s}function _e(s){var t=s instanceof U.SVGElement?s.getBoundingClientRect():s.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function we(s){var t,h=_e(s);if(!Z.isIOS7&&h){var k={x:(t=(t=S(s))||O).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};h.left+=k.x,h.right+=k.x,h.top+=k.y,h.bottom+=k.y}return h}function Ke(s){for(var t=[];s;)t.push(s),s=ze(s);return t}function la(s){return!!_.string(s)&&(U.document.querySelector(s),!0)}function j(s,t){for(var h in t)s[h]=t[h];return s}function We(s,t,h){return s==="parent"?ze(h):s==="self"?t.getRect(h):ve(h,s)}function Oe(s,t,h,k){var C=s;return _.string(C)?C=We(C,t,h):_.func(C)&&(C=C.apply(void 0,k)),_.element(C)&&(C=we(C)),C}function Ie(s){return s&&{x:"x"in s?s.x:s.left,y:"y"in s?s.y:s.top}}function Me(s){return!s||"x"in s&&"y"in s||((s=j({},s)).x=s.left||0,s.y=s.top||0,s.width=s.width||(s.right||0)-s.x,s.height=s.height||(s.bottom||0)-s.y),s}function de(s,t,h){s.left&&(t.left+=h.x),s.right&&(t.right+=h.x),s.top&&(t.top+=h.y),s.bottom&&(t.bottom+=h.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function Ce(s,t,h){var k=h&&s.options[h];return Ie(Oe(k&&k.origin||s.options.origin,s,t,[s&&t]))||{x:0,y:0}}function Je(s,t){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(xe){return!0},k=arguments.length>3?arguments[3]:void 0;if(k=k||{},_.string(s)&&s.search(" ")!==-1&&(s=Ea(s)),_.array(s))return s.forEach(function(xe){return Je(xe,t,h,k)}),k;if(_.object(s)&&(t=s,s=""),_.func(t)&&h(s))k[s]=k[s]||[],k[s].push(t);else if(_.array(t))for(var C=0,F=t;C<F.length;C++){var G=F[C];Je(s,G,h,k)}else if(_.object(t))for(var J in t)Je(Ea(J).map(function(xe){return"".concat(s).concat(xe)}),t[J],h,k);return k}function Ea(s){return s.trim().split(/ +/)}var Ge=function(s,t){return Math.sqrt(s*s+t*t)},$=["webkit","moz"];function V(s,t){s.__set||(s.__set={});var h=function(C){if($.some(function(F){return C.indexOf(F)===0}))return 1;typeof s[C]!="function"&&C!=="__set"&&Object.defineProperty(s,C,{get:function(){return C in s.__set?s.__set[C]:s.__set[C]=t[C]},set:function(F){s.__set[C]=F},configurable:!0})};for(var k in t)h(k);return s}function ee(s,t){s.page=s.page||{},s.page.x=t.page.x,s.page.y=t.page.y,s.client=s.client||{},s.client.x=t.client.x,s.client.y=t.client.y,s.timeStamp=t.timeStamp}function ce(s){s.page.x=0,s.page.y=0,s.client.x=0,s.client.y=0}function he(s){return s instanceof U.Event||s instanceof U.Touch}function ca(s,t,h){return s=s||"page",(h=h||{}).x=t[s+"X"],h.y=t[s+"Y"],h}function ia(s,t){return t=t||{x:0,y:0},Z.isOperaMobile&&he(s)?(ca("screen",s,t),t.x+=window.scrollX,t.y+=window.scrollY):ca("page",s,t),t}function Ve(s){return _.number(s.pointerId)?s.pointerId:s.identifier}function ga(s,t,h){var k=t.length>1?De(t):t[0];ia(k,s.page),function(C,F){F=F||{},Z.isOperaMobile&&he(C)?ca("screen",C,F):ca("client",C,F)}(k,s.client),s.timeStamp=h}function Ta(s){var t=[];return _.array(s)?(t[0]=s[0],t[1]=s[1]):s.type==="touchend"?s.touches.length===1?(t[0]=s.touches[0],t[1]=s.changedTouches[0]):s.touches.length===0&&(t[0]=s.changedTouches[0],t[1]=s.changedTouches[1]):(t[0]=s.touches[0],t[1]=s.touches[1]),t}function De(s){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},h=0;h<s.length;h++){var k=s[h];for(var C in t)t[C]+=k[C]}for(var F in t)t[F]/=s.length;return t}function Fa(s){if(!s.length)return null;var t=Ta(s),h=Math.min(t[0].pageX,t[1].pageX),k=Math.min(t[0].pageY,t[1].pageY),C=Math.max(t[0].pageX,t[1].pageX),F=Math.max(t[0].pageY,t[1].pageY);return{x:h,y:k,left:h,top:k,right:C,bottom:F,width:C-h,height:F-k}}function Na(s,t){var h=t+"X",k=t+"Y",C=Ta(s),F=C[0][h]-C[1][h],G=C[0][k]-C[1][k];return Ge(F,G)}function da(s,t){var h=t+"X",k=t+"Y",C=Ta(s),F=C[1][h]-C[0][h],G=C[1][k]-C[0][k];return 180*Math.atan2(G,F)/Math.PI}function ja(s){return _.string(s.pointerType)?s.pointerType:_.number(s.pointerType)?[void 0,void 0,"touch","pen","mouse"][s.pointerType]:/touch/.test(s.type||"")||s instanceof U.Touch?"touch":"mouse"}function ta(s){var t=_.func(s.composedPath)?s.composedPath():s.path;return[ue(t?t[0]:s.target),ue(s.currentTarget)]}var je=function(){function s(t){o(this,s),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return c(s,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),s}();Object.defineProperty(je.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ya=function(s,t){for(var h=0;h<t.length;h++){var k=t[h];s.push(k)}return s},Ze=function(s){return ya([],s)},Ae=function(s,t){for(var h=0;h<s.length;h++)if(t(s[h],h,s))return h;return-1},ne=function(s,t){return s[Ae(s,t)]},pe=function(s){m(h,s);var t=A(h);function h(k,C,F){var G;o(this,h),(G=t.call(this,C._interaction)).dropzone=void 0,G.dragEvent=void 0,G.relatedTarget=void 0,G.draggable=void 0,G.propagationStopped=!1,G.immediatePropagationStopped=!1;var J=F==="dragleave"?k.prev:k.cur,xe=J.element,Ue=J.dropzone;return G.type=F,G.target=xe,G.currentTarget=xe,G.dropzone=Ue,G.dragEvent=C,G.relatedTarget=C.target,G.draggable=C.interactable,G.timeStamp=C.timeStamp,G}return c(h,[{key:"reject",value:function(){var k=this,C=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&C.cur.dropzone===this.dropzone&&C.cur.element===this.target)if(C.prev.dropzone=this.dropzone,C.prev.element=this.target,C.rejected=!0,C.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var F=C.activeDrops,G=Ae(F,function(xe){var Ue=xe.dropzone,Se=xe.element;return Ue===k.dropzone&&Se===k.target});C.activeDrops.splice(G,1);var J=new h(C,this.dragEvent,"dropdeactivate");J.dropzone=this.dropzone,J.target=this.target,this.dropzone.fire(J)}else this.dropzone.fire(new h(C,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),h}(je);function ua(s,t){for(var h=0,k=s.slice();h<k.length;h++){var C=k[h],F=C.dropzone,G=C.element;t.dropzone=F,t.target=G,F.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Qe(s,t){for(var h=function(F,G){for(var J=[],xe=0,Ue=F.interactables.list;xe<Ue.length;xe++){var Se=Ue[xe];if(Se.options.drop.enabled){var sa=Se.options.drop.accept;if(!(_.element(sa)&&sa!==G||_.string(sa)&&!te(G,sa)||_.func(sa)&&!sa({dropzone:Se,draggableElement:G})))for(var Oa=0,rl=Se.getAllElements();Oa<rl.length;Oa++){var el=rl[Oa];el!==G&&J.push({dropzone:Se,element:el,rect:Se.getRect(el)})}}}return J}(s,t),k=0;k<h.length;k++){var C=h[k];C.rect=C.dropzone.getRect(C.element)}return h}function Da(s,t,h){for(var k=s.dropState,C=s.interactable,F=s.element,G=[],J=0,xe=k.activeDrops;J<xe.length;J++){var Ue=xe[J],Se=Ue.dropzone,sa=Ue.element,Oa=Ue.rect,rl=Se.dropCheck(t,h,C,F,sa,Oa);G.push(rl?sa:null)}var el=function(cl){for(var Cl,_l,Vl,Ql=[],dr=0;dr<cl.length;dr++){var ql=cl[dr],nr=cl[Cl];if(ql&&dr!==Cl)if(nr){var pn=N(ql),Gl=N(nr);if(pn!==ql.ownerDocument)if(Gl!==ql.ownerDocument)if(pn!==Gl){Ql=Ql.length?Ql:se(nr);var gn=void 0;if(nr instanceof U.HTMLElement&&ql instanceof U.SVGElement&&!(ql instanceof U.SVGSVGElement)){if(ql===Gl)continue;gn=ql.ownerSVGElement}else gn=ql;for(var Qr=se(gn,nr.ownerDocument),Ln=0;Qr[Ln]&&Qr[Ln]===Ql[Ln];)Ln++;var yn=[Qr[Ln-1],Qr[Ln],Ql[Ln]];if(yn[0])for(var ui=yn[0].lastChild;ui;){if(ui===yn[1]){Cl=dr,Ql=Qr;break}if(ui===yn[2])break;ui=ui.previousSibling}}else Vl=nr,(parseInt(S(_l=ql).getComputedStyle(_l).zIndex,10)||0)>=(parseInt(S(Vl).getComputedStyle(Vl).zIndex,10)||0)&&(Cl=dr);else Cl=dr}else Cl=dr}return Cl}(G);return k.activeDrops[el]||null}function Te(s,t,h){var k=s.dropState,C={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return h.type==="dragstart"&&(C.activate=new pe(k,h,"dropactivate"),C.activate.target=null,C.activate.dropzone=null),h.type==="dragend"&&(C.deactivate=new pe(k,h,"dropdeactivate"),C.deactivate.target=null,C.deactivate.dropzone=null),k.rejected||(k.cur.element!==k.prev.element&&(k.prev.dropzone&&(C.leave=new pe(k,h,"dragleave"),h.dragLeave=C.leave.target=k.prev.element,h.prevDropzone=C.leave.dropzone=k.prev.dropzone),k.cur.dropzone&&(C.enter=new pe(k,h,"dragenter"),h.dragEnter=k.cur.element,h.dropzone=k.cur.dropzone)),h.type==="dragend"&&k.cur.dropzone&&(C.drop=new pe(k,h,"drop"),h.dropzone=k.cur.dropzone,h.relatedTarget=k.cur.element),h.type==="dragmove"&&k.cur.dropzone&&(C.move=new pe(k,h,"dropmove"),h.dropzone=k.cur.dropzone)),C}function Le(s,t){var h=s.dropState,k=h.activeDrops,C=h.cur,F=h.prev;t.leave&&F.dropzone.fire(t.leave),t.enter&&C.dropzone.fire(t.enter),t.move&&C.dropzone.fire(t.move),t.drop&&C.dropzone.fire(t.drop),t.deactivate&&ua(k,t.deactivate),h.prev.dropzone=C.dropzone,h.prev.element=C.element}function Fe(s,t){var h=s.interaction,k=s.iEvent,C=s.event;if(k.type==="dragmove"||k.type==="dragend"){var F=h.dropState;t.dynamicDrop&&(F.activeDrops=Qe(t,h.element));var G=k,J=Da(h,G,C);F.rejected=F.rejected&&!!J&&J.dropzone===F.cur.dropzone&&J.element===F.cur.element,F.cur.dropzone=J&&J.dropzone,F.cur.element=J&&J.element,F.events=Te(h,0,G)}}var Ne={id:"actions/drop",install:function(s){var t=s.actions,h=s.interactStatic,k=s.Interactable,C=s.defaults;s.usePlugin(X),k.prototype.dropzone=function(F){return function(G,J){if(_.object(J)){if(G.options.drop.enabled=J.enabled!==!1,J.listeners){var xe=Je(J.listeners),Ue=Object.keys(xe).reduce(function(sa,Oa){return sa[/^(enter|leave)/.test(Oa)?"drag".concat(Oa):/^(activate|deactivate|move)/.test(Oa)?"drop".concat(Oa):Oa]=xe[Oa],sa},{}),Se=G.options.drop.listeners;Se&&G.off(Se),G.on(Ue),G.options.drop.listeners=Ue}return _.func(J.ondrop)&&G.on("drop",J.ondrop),_.func(J.ondropactivate)&&G.on("dropactivate",J.ondropactivate),_.func(J.ondropdeactivate)&&G.on("dropdeactivate",J.ondropdeactivate),_.func(J.ondragenter)&&G.on("dragenter",J.ondragenter),_.func(J.ondragleave)&&G.on("dragleave",J.ondragleave),_.func(J.ondropmove)&&G.on("dropmove",J.ondropmove),/^(pointer|center)$/.test(J.overlap)?G.options.drop.overlap=J.overlap:_.number(J.overlap)&&(G.options.drop.overlap=Math.max(Math.min(1,J.overlap),0)),"accept"in J&&(G.options.drop.accept=J.accept),"checker"in J&&(G.options.drop.checker=J.checker),G}return _.bool(J)?(G.options.drop.enabled=J,G):G.options.drop}(this,F)},k.prototype.dropCheck=function(F,G,J,xe,Ue,Se){return function(sa,Oa,rl,el,cl,Cl,_l){var Vl=!1;if(!(_l=_l||sa.getRect(Cl)))return!!sa.options.drop.checker&&sa.options.drop.checker(Oa,rl,Vl,sa,Cl,el,cl);var Ql=sa.options.drop.overlap;if(Ql==="pointer"){var dr=Ce(el,cl,"drag"),ql=ia(Oa);ql.x+=dr.x,ql.y+=dr.y;var nr=ql.x>_l.left&&ql.x<_l.right,pn=ql.y>_l.top&&ql.y<_l.bottom;Vl=nr&&pn}var Gl=el.getRect(cl);if(Gl&&Ql==="center"){var gn=Gl.left+Gl.width/2,Qr=Gl.top+Gl.height/2;Vl=gn>=_l.left&&gn<=_l.right&&Qr>=_l.top&&Qr<=_l.bottom}return Gl&&_.number(Ql)&&(Vl=Math.max(0,Math.min(_l.right,Gl.right)-Math.max(_l.left,Gl.left))*Math.max(0,Math.min(_l.bottom,Gl.bottom)-Math.max(_l.top,Gl.top))/(Gl.width*Gl.height)>=Ql),sa.options.drop.checker&&(Vl=sa.options.drop.checker(Oa,rl,Vl,sa,Cl,el,cl)),Vl}(this,F,G,J,xe,Ue,Se)},h.dynamicDrop=function(F){return _.bool(F)?(s.dynamicDrop=F,h):s.dynamicDrop},j(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",s.dynamicDrop=!1,C.actions.drop=Ne.defaults},listeners:{"interactions:before-action-start":function(s){var t=s.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(s,t){var h=s.interaction,k=(s.event,s.iEvent);if(h.prepared.name==="drag"){var C=h.dropState;C.activeDrops=[],C.events={},C.activeDrops=Qe(t,h.element),C.events=Te(h,0,k),C.events.activate&&(ua(C.activeDrops,C.events.activate),t.fire("actions/drop:start",{interaction:h,dragEvent:k}))}},"interactions:action-move":Fe,"interactions:after-action-move":function(s,t){var h=s.interaction,k=s.iEvent;if(h.prepared.name==="drag"){var C=h.dropState;Le(h,C.events),t.fire("actions/drop:move",{interaction:h,dragEvent:k}),C.events={}}},"interactions:action-end":function(s,t){if(s.interaction.prepared.name==="drag"){var h=s.interaction,k=s.iEvent;Fe(s,t),Le(h,h.dropState.events),t.fire("actions/drop:end",{interaction:h,dragEvent:k})}},"interactions:stop":function(s){var t=s.interaction;if(t.prepared.name==="drag"){var h=t.dropState;h&&(h.activeDrops=null,h.events=null,h.cur.dropzone=null,h.cur.element=null,h.prev.dropzone=null,h.prev.element=null,h.rejected=!1)}}},getActiveDrops:Qe,getDrop:Da,getDropEvents:Te,fireDropEvents:Le,filterEventType:function(s){return s.search("drag")===0||s.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},me=Ne;function al(s){var t=s.interaction,h=s.iEvent,k=s.phase;if(t.prepared.name==="gesture"){var C=t.pointers.map(function(Ue){return Ue.pointer}),F=k==="start",G=k==="end",J=t.interactable.options.deltaSource;if(h.touches=[C[0],C[1]],F)h.distance=Na(C,J),h.box=Fa(C),h.scale=1,h.ds=0,h.angle=da(C,J),h.da=0,t.gesture.startDistance=h.distance,t.gesture.startAngle=h.angle;else if(G||t.pointers.length<2){var xe=t.prevEvent;h.distance=xe.distance,h.box=xe.box,h.scale=xe.scale,h.ds=0,h.angle=xe.angle,h.da=0}else h.distance=Na(C,J),h.box=Fa(C),h.scale=h.distance/t.gesture.startDistance,h.angle=da(C,J),h.ds=h.scale-t.gesture.scale,h.da=h.angle-t.gesture.angle;t.gesture.distance=h.distance,t.gesture.angle=h.angle,_.number(h.scale)&&h.scale!==1/0&&!isNaN(h.scale)&&(t.gesture.scale=h.scale)}}var Qa={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(s){var t=s.actions,h=s.Interactable,k=s.defaults;h.prototype.gesturable=function(C){return _.object(C)?(this.options.gesture.enabled=C.enabled!==!1,this.setPerAction("gesture",C),this.setOnEvents("gesture",C),this):_.bool(C)?(this.options.gesture.enabled=C,this):this.options.gesture},t.map.gesture=Qa,t.methodDict.gesture="gesturable",k.actions.gesture=Qa.defaults},listeners:{"interactions:action-start":al,"interactions:action-move":al,"interactions:action-end":al,"interactions:new":function(s){s.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(s){if(!(s.interaction.pointers.length<2)){var t=s.interactable.options.gesture;if(t&&t.enabled)return s.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(s){return s.search("gesture")===0}},Tl=Qa;function Rl(s,t,h,k,C,F,G){if(!t)return!1;if(t===!0){var J=_.number(F.width)?F.width:F.right-F.left,xe=_.number(F.height)?F.height:F.bottom-F.top;if(G=Math.min(G,Math.abs((s==="left"||s==="right"?J:xe)/2)),J<0&&(s==="left"?s="right":s==="right"&&(s="left")),xe<0&&(s==="top"?s="bottom":s==="bottom"&&(s="top")),s==="left"){var Ue=J>=0?F.left:F.right;return h.x<Ue+G}if(s==="top"){var Se=xe>=0?F.top:F.bottom;return h.y<Se+G}if(s==="right")return h.x>(J>=0?F.right:F.left)-G;if(s==="bottom")return h.y>(xe>=0?F.bottom:F.top)-G}return!!_.element(k)&&(_.element(t)?t===k:W(k,t,C))}function Al(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.resizeAxes){var k=t;h.interactable.options.resize.square?(h.resizeAxes==="y"?k.delta.x=k.delta.y:k.delta.y=k.delta.x,k.axes="xy"):(k.axes=h.resizeAxes,h.resizeAxes==="x"?k.delta.y=0:h.resizeAxes==="y"&&(k.delta.x=0))}}var Pl,ll,jl={id:"actions/resize",before:["actions/drag"],install:function(s){var t=s.actions,h=s.browser,k=s.Interactable,C=s.defaults;jl.cursors=function(F){return F.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(h),jl.defaultMargin=h.supportsTouch||h.supportsPointerEvent?20:10,k.prototype.resizable=function(F){return function(G,J,xe){return _.object(J)?(G.options.resize.enabled=J.enabled!==!1,G.setPerAction("resize",J),G.setOnEvents("resize",J),_.string(J.axis)&&/^x$|^y$|^xy$/.test(J.axis)?G.options.resize.axis=J.axis:J.axis===null&&(G.options.resize.axis=xe.defaults.actions.resize.axis),_.bool(J.preserveAspectRatio)?G.options.resize.preserveAspectRatio=J.preserveAspectRatio:_.bool(J.square)&&(G.options.resize.square=J.square),G):_.bool(J)?(G.options.resize.enabled=J,G):G.options.resize}(this,F,s)},t.map.resize=jl,t.methodDict.resize="resizable",C.actions.resize=jl.defaults},listeners:{"interactions:new":function(s){s.interaction.resizeAxes="xy"},"interactions:action-start":function(s){(function(t){var h=t.iEvent,k=t.interaction;if(k.prepared.name==="resize"&&k.prepared.edges){var C=h,F=k.rect;k._rects={start:j({},F),corrected:j({},F),previous:j({},F),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},C.edges=k.prepared.edges,C.rect=k._rects.corrected,C.deltaRect=k._rects.delta}})(s),Al(s)},"interactions:action-move":function(s){(function(t){var h=t.iEvent,k=t.interaction;if(k.prepared.name==="resize"&&k.prepared.edges){var C=h,F=k.interactable.options.resize.invert,G=F==="reposition"||F==="negate",J=k.rect,xe=k._rects,Ue=xe.start,Se=xe.corrected,sa=xe.delta,Oa=xe.previous;if(j(Oa,Se),G){if(j(Se,J),F==="reposition"){if(Se.top>Se.bottom){var rl=Se.top;Se.top=Se.bottom,Se.bottom=rl}if(Se.left>Se.right){var el=Se.left;Se.left=Se.right,Se.right=el}}}else Se.top=Math.min(J.top,Ue.bottom),Se.bottom=Math.max(J.bottom,Ue.top),Se.left=Math.min(J.left,Ue.right),Se.right=Math.max(J.right,Ue.left);for(var cl in Se.width=Se.right-Se.left,Se.height=Se.bottom-Se.top,Se)sa[cl]=Se[cl]-Oa[cl];C.edges=k.prepared.edges,C.rect=Se,C.deltaRect=sa}})(s),Al(s)},"interactions:action-end":function(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.prepared.edges){var k=t;k.edges=h.prepared.edges,k.rect=h._rects.corrected,k.deltaRect=h._rects.delta}},"auto-start:check":function(s){var t=s.interaction,h=s.interactable,k=s.element,C=s.rect,F=s.buttons;if(C){var G=j({},t.coords.cur.page),J=h.options.resize;if(J&&J.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(F&J.mouseButtons)!=0)){if(_.object(J.edges)){var xe={left:!1,right:!1,top:!1,bottom:!1};for(var Ue in xe)xe[Ue]=Rl(Ue,J.edges[Ue],G,t._latestPointer.eventTarget,k,C,J.margin||jl.defaultMargin);xe.left=xe.left&&!xe.right,xe.top=xe.top&&!xe.bottom,(xe.left||xe.right||xe.top||xe.bottom)&&(s.action={name:"resize",edges:xe})}else{var Se=J.axis!=="y"&&G.x>C.right-jl.defaultMargin,sa=J.axis!=="x"&&G.y>C.bottom-jl.defaultMargin;(Se||sa)&&(s.action={name:"resize",axes:(Se?"x":"")+(sa?"y":"")})}return!s.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(s){var t=s.edges,h=s.axis,k=s.name,C=jl.cursors,F=null;if(h)F=C[k+h];else if(t){for(var G="",J=0,xe=["top","bottom","left","right"];J<xe.length;J++){var Ue=xe[J];t[Ue]&&(G+=Ue)}F=C[G]}return F},filterEventType:function(s){return s.search("resize")===0},defaultMargin:null},Wa=jl,Hl={id:"actions",install:function(s){s.usePlugin(Tl),s.usePlugin(Wa),s.usePlugin(X),s.usePlugin(me)}},Jl=0,ar={request:function(s){return Pl(s)},cancel:function(s){return ll(s)},init:function(s){if(Pl=s.requestAnimationFrame,ll=s.cancelAnimationFrame,!Pl)for(var t=["ms","moz","webkit","o"],h=0;h<t.length;h++){var k=t[h];Pl=s["".concat(k,"RequestAnimationFrame")],ll=s["".concat(k,"CancelAnimationFrame")]||s["".concat(k,"CancelRequestAnimationFrame")]}Pl=Pl&&Pl.bind(s),ll=ll&&ll.bind(s),Pl||(Pl=function(C){var F=Date.now(),G=Math.max(0,16-(F-Jl)),J=s.setTimeout(function(){C(F+G)},G);return Jl=F+G,J},ll=function(C){return clearTimeout(C)})}},bl={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(s){bl.isScrolling=!0,ar.cancel(bl.i),s.autoScroll=bl,bl.interaction=s,bl.prevTime=bl.now(),bl.i=ar.request(bl.scroll)},stop:function(){bl.isScrolling=!1,bl.interaction&&(bl.interaction.autoScroll=null),ar.cancel(bl.i)},scroll:function(){var s=bl.interaction,t=s.interactable,h=s.element,k=s.prepared.name,C=t.options[k].autoScroll,F=br(C.container,t,h),G=bl.now(),J=(G-bl.prevTime)/1e3,xe=C.speed*J;if(xe>=1){var Ue={x:bl.x*xe,y:bl.y*xe};if(Ue.x||Ue.y){var Se=ka(F);_.window(F)?F.scrollBy(Ue.x,Ue.y):F&&(F.scrollLeft+=Ue.x,F.scrollTop+=Ue.y);var sa=ka(F),Oa={x:sa.x-Se.x,y:sa.y-Se.y};(Oa.x||Oa.y)&&t.fire({type:"autoscroll",target:h,interactable:t,delta:Oa,interaction:s,container:F})}bl.prevTime=G}bl.isScrolling&&(ar.cancel(bl.i),bl.i=ar.request(bl.scroll))},check:function(s,t){var h;return(h=s.options[t].autoScroll)==null?void 0:h.enabled},onInteractionMove:function(s){var t=s.interaction,h=s.pointer;if(t.interacting()&&bl.check(t.interactable,t.prepared.name))if(t.simulation)bl.x=bl.y=0;else{var k,C,F,G,J=t.interactable,xe=t.element,Ue=t.prepared.name,Se=J.options[Ue].autoScroll,sa=br(Se.container,J,xe);if(_.window(sa))G=h.clientX<bl.margin,k=h.clientY<bl.margin,C=h.clientX>sa.innerWidth-bl.margin,F=h.clientY>sa.innerHeight-bl.margin;else{var Oa=_e(sa);G=h.clientX<Oa.left+bl.margin,k=h.clientY<Oa.top+bl.margin,C=h.clientX>Oa.right-bl.margin,F=h.clientY>Oa.bottom-bl.margin}bl.x=C?1:G?-1:0,bl.y=F?1:k?-1:0,bl.isScrolling||(bl.margin=Se.margin,bl.speed=Se.speed,bl.start(t))}}};function br(s,t,h){return(_.string(s)?We(s,t,h):s)||S(h)}function ka(s){return _.window(s)&&(s=window.document.body),{x:s.scrollLeft,y:s.scrollTop}}var ol={id:"auto-scroll",install:function(s){var t=s.defaults,h=s.actions;s.autoScroll=bl,bl.now=function(){return s.now()},h.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=bl.defaults},listeners:{"interactions:new":function(s){s.interaction.autoScroll=null},"interactions:destroy":function(s){s.interaction.autoScroll=null,bl.stop(),bl.interaction&&(bl.interaction=null)},"interactions:stop":bl.stop,"interactions:action-move":function(s){return bl.onInteractionMove(s)}}},hl=ol;function Nl(s,t){var h=!1;return function(){return h||(O.console.warn(t),h=!0),s.apply(this,arguments)}}function aa(s,t){return s.name=t.name,s.axis=t.axis,s.edges=t.edges,s}function Pa(s){return _.bool(s)?(this.options.styleCursor=s,this):s===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Ga(s){return _.func(s)?(this.options.actionChecker=s,this):s===null?(delete this.options.actionChecker,this):this.options.actionChecker}var $e={id:"auto-start/interactableMethods",install:function(s){var t=s.Interactable;t.prototype.getAction=function(h,k,C,F){var G=function(J,xe,Ue,Se,sa){var Oa=J.getRect(Se),rl=xe.buttons||{0:1,1:4,3:8,4:16}[xe.button],el={action:null,interactable:J,interaction:Ue,element:Se,rect:Oa,buttons:rl};return sa.fire("auto-start:check",el),el.action}(this,k,C,F,s);return this.options.actionChecker?this.options.actionChecker(h,k,G,this,F,C):G},t.prototype.ignoreFrom=Nl(function(h){return this._backCompatOption("ignoreFrom",h)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Nl(function(h){return this._backCompatOption("allowFrom",h)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Ga,t.prototype.styleCursor=Pa}};function ha(s,t,h,k,C){return t.testIgnoreAllow(t.options[s.name],h,k)&&t.options[s.name].enabled&&Xa(t,h,s,C)?s:null}function wa(s,t,h,k,C,F,G){for(var J=0,xe=k.length;J<xe;J++){var Ue=k[J],Se=C[J],sa=Ue.getAction(t,h,s,Se);if(sa){var Oa=ha(sa,Ue,Se,F,G);if(Oa)return{action:Oa,interactable:Ue,element:Se}}}return{action:null,interactable:null,element:null}}function Ee(s,t,h,k,C){var F=[],G=[],J=k;function xe(Se){F.push(Se),G.push(J)}for(;_.element(J);){F=[],G=[],C.interactables.forEachMatch(J,xe);var Ue=wa(s,t,h,F,G,k,C);if(Ue.action&&!Ue.interactable.options[Ue.action.name].manualStart)return Ue;J=ze(J)}return{action:null,interactable:null,element:null}}function ba(s,t,h){var k=t.action,C=t.interactable,F=t.element;k=k||{name:null},s.interactable=C,s.element=F,aa(s.prepared,k),s.rect=C&&k.name?C.getRect(F):null,pa(s,h),h.fire("autoStart:prepared",{interaction:s})}function Xa(s,t,h,k){var C=s.options,F=C[h.name].max,G=C[h.name].maxPerElement,J=k.autoStart.maxInteractions,xe=0,Ue=0,Se=0;if(!(F&&G&&J))return!1;for(var sa=0,Oa=k.interactions.list;sa<Oa.length;sa++){var rl=Oa[sa],el=rl.prepared.name;if(rl.interacting()&&(++xe>=J||rl.interactable===s&&((Ue+=el===h.name?1:0)>=F||rl.element===t&&(Se++,el===h.name&&Se>=G))))return!1}return J>0}function yl(s,t){return _.number(s)?(t.autoStart.maxInteractions=s,this):t.autoStart.maxInteractions}function zl(s,t,h){var k=h.autoStart.cursorElement;k&&k!==s&&(k.style.cursor=""),s.ownerDocument.documentElement.style.cursor=t,s.style.cursor=t,h.autoStart.cursorElement=t?s:null}function pa(s,t){var h=s.interactable,k=s.element,C=s.prepared;if(s.pointerType==="mouse"&&h&&h.options.styleCursor){var F="";if(C.name){var G=h.options[C.name].cursorChecker;F=_.func(G)?G(C,h,k,s._interacting):t.actions.map[C.name].getCursor(C)}zl(s.element,F||"",t)}else t.autoStart.cursorElement&&zl(t.autoStart.cursorElement,"",t)}var Ha={id:"auto-start/base",before:["actions"],install:function(s){var t=s.interactStatic,h=s.defaults;s.usePlugin($e),h.base.actionChecker=null,h.base.styleCursor=!0,j(h.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(k){return yl(k,s)},s.autoStart={maxInteractions:1/0,withinInteractionLimit:Xa,cursorElement:null}},listeners:{"interactions:down":function(s,t){var h=s.interaction,k=s.pointer,C=s.event,F=s.eventTarget;h.interacting()||ba(h,Ee(h,k,C,F,t),t)},"interactions:move":function(s,t){(function(h,k){var C=h.interaction,F=h.pointer,G=h.event,J=h.eventTarget;C.pointerType!=="mouse"||C.pointerIsDown||C.interacting()||ba(C,Ee(C,F,G,J,k),k)})(s,t),function(h,k){var C=h.interaction;if(C.pointerIsDown&&!C.interacting()&&C.pointerWasMoved&&C.prepared.name){k.fire("autoStart:before-start",h);var F=C.interactable,G=C.prepared.name;G&&F&&(F.options[G].manualStart||!Xa(F,C.element,C.prepared,k)?C.stop():(C.start(C.prepared,F,C.element),pa(C,k)))}}(s,t)},"interactions:stop":function(s,t){var h=s.interaction,k=h.interactable;k&&k.options.styleCursor&&zl(h.element,"",t)}},maxInteractions:yl,withinInteractionLimit:Xa,validateAction:ha},va=Ha,Ca={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(s,t){var h=s.interaction,k=s.eventTarget,C=s.dx,F=s.dy;if(h.prepared.name==="drag"){var G=Math.abs(C),J=Math.abs(F),xe=h.interactable.options.drag,Ue=xe.startAxis,Se=G>J?"x":G<J?"y":"xy";if(h.prepared.axis=xe.lockAxis==="start"?Se[0]:xe.lockAxis,Se!=="xy"&&Ue!=="xy"&&Ue!==Se){h.prepared.name=null;for(var sa=k,Oa=function(el){if(el!==h.interactable){var cl=h.interactable.options.drag;if(!cl.manualStart&&el.testIgnoreAllow(cl,sa,k)){var Cl=el.getAction(h.downPointer,h.downEvent,h,sa);if(Cl&&Cl.name==="drag"&&function(_l,Vl){if(!Vl)return!1;var Ql=Vl.options.drag.startAxis;return _l==="xy"||Ql==="xy"||Ql===_l}(Se,el)&&va.validateAction(Cl,el,sa,k,t))return el}}};_.element(sa);){var rl=t.interactables.forEachMatch(sa,Oa);if(rl){h.prepared.name="drag",h.interactable=rl,h.element=sa;break}sa=ze(sa)}}}}}};function Aa(s){var t=s.prepared&&s.prepared.name;if(!t)return null;var h=s.interactable.options;return h[t].hold||h[t].delay}var pl={id:"auto-start/hold",install:function(s){var t=s.defaults;s.usePlugin(va),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(s){s.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(s){var t=s.interaction,h=Aa(t);h>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},h))},"interactions:move":function(s){var t=s.interaction,h=s.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!h&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(s){var t=s.interaction;Aa(t)>0&&(t.prepared.name=null)}},getHoldDuration:Aa},Pe=pl,kl={id:"auto-start",install:function(s){s.usePlugin(va),s.usePlugin(Pe),s.usePlugin(Ca)}},cr=function(s){return/^(always|never|auto)$/.test(s)?(this.options.preventDefault=s,this):_.bool(s)?(this.options.preventDefault=s?"always":"never",this):this.options.preventDefault};function Cr(s){var t=s.interaction,h=s.event;t.interactable&&t.interactable.checkAndPreventDefault(h)}var ea={id:"core/interactablePreventDefault",install:function(s){var t=s.Interactable;t.prototype.preventDefault=cr,t.prototype.checkAndPreventDefault=function(h){return function(k,C,F){var G=k.options.preventDefault;if(G!=="never")if(G!=="always"){if(C.events.supportsPassive&&/^touch(start|move)$/.test(F.type)){var J=S(F.target).document,xe=C.getDocOptions(J);if(!xe||!xe.events||xe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(F.type)||_.element(F.target)&&te(F.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||F.preventDefault()}else F.preventDefault()}(this,s,h)},s.interactions.docEvents.push({type:"dragstart",listener:function(h){for(var k=0,C=s.interactions.list;k<C.length;k++){var F=C[k];if(F.element&&(F.element===h.target||ae(F.element,h.target)))return void F.interactable.checkAndPreventDefault(h)}}})},listeners:["down","move","up","cancel"].reduce(function(s,t){return s["interactions:".concat(t)]=Cr,s},{})};function La(s,t){if(t.phaselessTypes[s])return!0;for(var h in t.map)if(s.indexOf(h)===0&&s.substr(h.length)in t.phases)return!0;return!1}function Bl(s){var t={};for(var h in s){var k=s[h];_.plainObject(k)?t[h]=Bl(k):_.array(k)?t[h]=Ze(k):t[h]=k}return t}var Ol=function(){function s(t){o(this,s),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ma(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(s,[{key:"start",value:function(t,h){var k,C,F=t.phase,G=this.interaction,J=function(Ue){var Se=Ue.interactable.options[Ue.prepared.name],sa=Se.modifiers;return sa&&sa.length?sa:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Oa){var rl=Se[Oa];return rl&&rl.enabled&&{options:rl,methods:rl._methods}}).filter(function(Oa){return!!Oa})}(G);this.prepareStates(J),this.startEdges=j({},G.edges),this.edges=j({},this.startEdges),this.startOffset=(k=G.rect,C=h,k?{left:C.x-k.left,top:C.y-k.top,right:k.right-C.x,bottom:k.bottom-C.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var xe=this.fillArg({phase:F,pageCoords:h,preEnd:!1});return this.result=ma(),this.startAll(xe),this.result=this.setAll(xe)}},{key:"fillArg",value:function(t){var h=this.interaction;return t.interaction=h,t.interactable=h.interactable,t.element=h.element,t.rect||(t.rect=h.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var h=0,k=this.states;h<k.length;h++){var C=k[h];C.methods.start&&(t.state=C,C.methods.start(t))}}},{key:"setAll",value:function(t){var h=t.phase,k=t.preEnd,C=t.skipModifiers,F=t.rect,G=t.edges;t.coords=j({},t.pageCoords),t.rect=j({},F),t.edges=j({},G);for(var J=C?this.states.slice(C):this.states,xe=ma(t.coords,t.rect),Ue=0;Ue<J.length;Ue++){var Se,sa=J[Ue],Oa=sa.options,rl=j({},t.coords),el=null;(Se=sa.methods)!=null&&Se.set&&this.shouldDo(Oa,k,h)&&(t.state=sa,el=sa.methods.set(t),de(t.edges,t.rect,{x:t.coords.x-rl.x,y:t.coords.y-rl.y})),xe.eventProps.push(el)}j(this.edges,t.edges),xe.delta.x=t.coords.x-t.pageCoords.x,xe.delta.y=t.coords.y-t.pageCoords.y,xe.rectDelta.left=t.rect.left-F.left,xe.rectDelta.right=t.rect.right-F.right,xe.rectDelta.top=t.rect.top-F.top,xe.rectDelta.bottom=t.rect.bottom-F.bottom;var cl=this.result.coords,Cl=this.result.rect;if(cl&&Cl){var _l=xe.rect.left!==Cl.left||xe.rect.right!==Cl.right||xe.rect.top!==Cl.top||xe.rect.bottom!==Cl.bottom;xe.changed=_l||cl.x!==xe.coords.x||cl.y!==xe.coords.y}return xe}},{key:"applyToInteraction",value:function(t){var h=this.interaction,k=t.phase,C=h.coords.cur,F=h.coords.start,G=this.result,J=this.startDelta,xe=G.delta;k==="start"&&j(this.startDelta,G.delta);for(var Ue=0,Se=[[F,J],[C,xe]];Ue<Se.length;Ue++){var sa=Se[Ue],Oa=sa[0],rl=sa[1];Oa.page.x+=rl.x,Oa.page.y+=rl.y,Oa.client.x+=rl.x,Oa.client.y+=rl.y}var el=this.result.rectDelta,cl=t.rect||h.rect;cl.left+=el.left,cl.right+=el.right,cl.top+=el.top,cl.bottom+=el.bottom,cl.width=cl.right-cl.left,cl.height=cl.bottom-cl.top}},{key:"setAndApply",value:function(t){var h=this.interaction,k=t.phase,C=t.preEnd,F=t.skipModifiers,G=this.setAll(this.fillArg({preEnd:C,phase:k,pageCoords:t.modifiedCoords||h.coords.cur.page}));if(this.result=G,!G.changed&&(!F||F<this.states.length)&&h.interacting())return!1;if(t.modifiedCoords){var J=h.coords.cur.page,xe={x:t.modifiedCoords.x-J.x,y:t.modifiedCoords.y-J.y};G.coords.x+=xe.x,G.coords.y+=xe.y,G.delta.x+=xe.x,G.delta.y+=xe.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var h=t.interaction,k=t.event,C=this.states;if(C&&C.length){for(var F=!1,G=0;G<C.length;G++){var J=C[G];t.state=J;var xe=J.options,Ue=J.methods,Se=Ue.beforeEnd&&Ue.beforeEnd(t);if(Se)return this.endResult=Se,!1;F=F||!F&&this.shouldDo(xe,!0,t.phase,!0)}F&&h.move({event:k,preEnd:!0})}}},{key:"stop",value:function(t){var h=t.interaction;if(this.states&&this.states.length){var k=j({states:this.states,interactable:h.interactable,element:h.element,rect:null},t);this.fillArg(k);for(var C=0,F=this.states;C<F.length;C++){var G=F[C];k.state=G,G.methods.stop&&G.methods.stop(k)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var h=0;h<t.length;h++){var k=t[h],C=k.options,F=k.methods,G=k.name;this.states.push({options:C,methods:F,index:h,name:G})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var h=t.interaction,k=h.coords,C=h.rect,F=h.modification;if(F.result){for(var G=F.startDelta,J=F.result,xe=J.delta,Ue=J.rectDelta,Se=0,sa=[[k.start,G],[k.cur,xe]];Se<sa.length;Se++){var Oa=sa[Se],rl=Oa[0],el=Oa[1];rl.page.x-=el.x,rl.page.y-=el.y,rl.client.x-=el.x,rl.client.y-=el.y}C.left-=Ue.left,C.right-=Ue.right,C.top-=Ue.top,C.bottom-=Ue.bottom}}},{key:"shouldDo",value:function(t,h,k,C){return!(!t||t.enabled===!1||C&&!t.endOnly||t.endOnly&&!h||k==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(h){return Bl(h)}),this.result=ma(j({},t.result.coords),j({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),s}();function ma(s,t){return{rect:t,coords:s,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Sr(s,t){var h=s.defaults,k={start:s.start,set:s.set,beforeEnd:s.beforeEnd,stop:s.stop},C=function(F){var G=F||{};for(var J in G.enabled=G.enabled!==!1,h)J in G||(G[J]=h[J]);var xe={options:G,methods:k,name:t,enable:function(){return G.enabled=!0,xe},disable:function(){return G.enabled=!1,xe}};return xe};return t&&typeof t=="string"&&(C._defaults=h,C._methods=k),C}function Ur(s){var t=s.iEvent,h=s.interaction.modification.result;h&&(t.modifiers=h.eventProps)}var Gr={id:"modifiers/base",before:["actions"],install:function(s){s.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(s){var t=s.interaction;t.modification=new Ol(t)},"interactions:before-action-start":function(s){var t=s.interaction,h=s.interaction.modification;h.start(s,t.coords.start.page),t.edges=h.edges,h.applyToInteraction(s)},"interactions:before-action-move":function(s){var t=s.interaction,h=t.modification,k=h.setAndApply(s);return t.edges=h.edges,k},"interactions:before-action-end":function(s){var t=s.interaction,h=t.modification,k=h.beforeEnd(s);return t.edges=h.startEdges,k},"interactions:action-start":Ur,"interactions:action-move":Ur,"interactions:action-end":Ur,"interactions:after-action-start":function(s){return s.interaction.modification.restoreInteractionCoords(s)},"interactions:after-action-move":function(s){return s.interaction.modification.restoreInteractionCoords(s)},"interactions:stop":function(s){return s.interaction.modification.stop(s)}}},Re=Gr,ur={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},wr=function(s){m(h,s);var t=A(h);function h(k,C,F,G,J,xe,Ue){var Se;o(this,h),(Se=t.call(this,k)).relatedTarget=null,Se.screenX=void 0,Se.screenY=void 0,Se.button=void 0,Se.buttons=void 0,Se.ctrlKey=void 0,Se.shiftKey=void 0,Se.altKey=void 0,Se.metaKey=void 0,Se.page=void 0,Se.client=void 0,Se.delta=void 0,Se.rect=void 0,Se.x0=void 0,Se.y0=void 0,Se.t0=void 0,Se.dt=void 0,Se.duration=void 0,Se.clientX0=void 0,Se.clientY0=void 0,Se.velocity=void 0,Se.speed=void 0,Se.swipe=void 0,Se.axes=void 0,Se.preEnd=void 0,J=J||k.element;var sa=k.interactable,Oa=(sa&&sa.options||ur).deltaSource,rl=Ce(sa,J,F),el=G==="start",cl=G==="end",Cl=el?d(Se):k.prevEvent,_l=el?k.coords.start:cl?{page:Cl.page,client:Cl.client,timeStamp:k.coords.cur.timeStamp}:k.coords.cur;return Se.page=j({},_l.page),Se.client=j({},_l.client),Se.rect=j({},k.rect),Se.timeStamp=_l.timeStamp,cl||(Se.page.x-=rl.x,Se.page.y-=rl.y,Se.client.x-=rl.x,Se.client.y-=rl.y),Se.ctrlKey=C.ctrlKey,Se.altKey=C.altKey,Se.shiftKey=C.shiftKey,Se.metaKey=C.metaKey,Se.button=C.button,Se.buttons=C.buttons,Se.target=J,Se.currentTarget=J,Se.preEnd=xe,Se.type=Ue||F+(G||""),Se.interactable=sa,Se.t0=el?k.pointers[k.pointers.length-1].downTime:Cl.t0,Se.x0=k.coords.start.page.x-rl.x,Se.y0=k.coords.start.page.y-rl.y,Se.clientX0=k.coords.start.client.x-rl.x,Se.clientY0=k.coords.start.client.y-rl.y,Se.delta=el||cl?{x:0,y:0}:{x:Se[Oa].x-Cl[Oa].x,y:Se[Oa].y-Cl[Oa].y},Se.dt=k.coords.delta.timeStamp,Se.duration=Se.timeStamp-Se.t0,Se.velocity=j({},k.coords.velocity[Oa]),Se.speed=Ge(Se.velocity.x,Se.velocity.y),Se.swipe=cl||G==="inertiastart"?Se.getSwipe():null,Se}return c(h,[{key:"getSwipe",value:function(){var k=this._interaction;if(k.prevEvent.speed<600||this.timeStamp-k.prevEvent.timeStamp>150)return null;var C=180*Math.atan2(k.prevEvent.velocityY,k.prevEvent.velocityX)/Math.PI;C<0&&(C+=360);var F=112.5<=C&&C<247.5,G=202.5<=C&&C<337.5;return{up:G,down:!G&&22.5<=C&&C<157.5,left:F,right:!F&&(292.5<=C||C<67.5),angle:C,speed:k.prevEvent.speed,velocity:{x:k.prevEvent.velocityX,y:k.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),h}(je);Object.defineProperties(wr.prototype,{pageX:{get:function(){return this.page.x},set:function(s){this.page.x=s}},pageY:{get:function(){return this.page.y},set:function(s){this.page.y=s}},clientX:{get:function(){return this.client.x},set:function(s){this.client.x=s}},clientY:{get:function(){return this.client.y},set:function(s){this.client.y=s}},dx:{get:function(){return this.delta.x},set:function(s){this.delta.x=s}},dy:{get:function(){return this.delta.y},set:function(s){this.delta.y=s}},velocityX:{get:function(){return this.velocity.x},set:function(s){this.velocity.x=s}},velocityY:{get:function(){return this.velocity.y},set:function(s){this.velocity.y=s}}});var Yr=c(function s(t,h,k,C,F){o(this,s),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=h,this.event=k,this.downTime=C,this.downTarget=F}),tr=function(s){return s.interactable="",s.element="",s.prepared="",s.pointerIsDown="",s.pointerWasMoved="",s._proxy="",s}({}),lr=function(s){return s.start="",s.move="",s.end="",s.stop="",s.interacting="",s}({}),un=0,Xl=function(){function s(t){var h=this,k=t.pointerType,C=t.scopeFire;o(this,s),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=Nl(function(Se){this.move(Se)},"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=un++,this._scopeFire=C,this.pointerType=k;var F=this;this._proxy={};var G=function(Se){Object.defineProperty(h._proxy,Se,{get:function(){return F[Se]}})};for(var J in tr)G(J);var xe=function(Se){Object.defineProperty(h._proxy,Se,{value:function(){return F[Se].apply(F,arguments)}})};for(var Ue in lr)xe(Ue);this._scopeFire("interactions:new",{interaction:this})}return c(s,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,h,k){var C=this.updatePointer(t,h,k,!0),F=this.pointers[C];this._scopeFire("interactions:down",{pointer:t,event:h,eventTarget:k,pointerIndex:C,pointerInfo:F,type:"down",interaction:this})}},{key:"start",value:function(t,h,k){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!h.options[t.name].enabled)&&(aa(this.prepared,t),this.interactable=h,this.element=k,this.rect=h.getRect(k),this.edges=this.prepared.edges?j({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,h,k){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,h,k,!1);var C,F,G=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(C=this.coords.cur.client.x-this.coords.start.client.x,F=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ge(C,F)>this.pointerMoveTolerance);var J,xe,Ue,Se=this.getPointerIndex(t),sa={pointer:t,pointerIndex:Se,pointerInfo:this.pointers[Se],event:h,type:"move",eventTarget:k,dx:C,dy:F,duplicate:G,interaction:this};G||(J=this.coords.velocity,xe=this.coords.delta,Ue=Math.max(xe.timeStamp/1e3,.001),J.page.x=xe.page.x/Ue,J.page.y=xe.page.y/Ue,J.client.x=xe.client.x/Ue,J.client.y=xe.client.y/Ue,J.timeStamp=Ue),this._scopeFire("interactions:move",sa),G||this.simulation||(this.interacting()&&(sa.type=null,this.move(sa)),this.pointerWasMoved&&ee(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||ce(this.coords.delta),(t=j({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,h,k,C){var F=this.getPointerIndex(t);F===-1&&(F=this.updatePointer(t,h,k,!1));var G=/cancel$/i.test(h.type)?"cancel":"up";this._scopeFire("interactions:".concat(G),{pointer:t,pointerIndex:F,pointerInfo:this.pointers[F],event:h,eventTarget:k,type:G,curEventTarget:C,interaction:this}),this.simulation||this.end(h),this.removePointer(t,h)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var h;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(h=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,h===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var h=Ve(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Ae(this.pointers,function(k){return k.id===h})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,h,k,C){var F,G,J,xe=Ve(t),Ue=this.getPointerIndex(t),Se=this.pointers[Ue];return C=C!==!1&&(C||/(down|start)$/i.test(h.type)),Se?Se.pointer=t:(Se=new Yr(xe,t,h,null,null),Ue=this.pointers.length,this.pointers.push(Se)),ga(this.coords.cur,this.pointers.map(function(sa){return sa.pointer}),this._now()),F=this.coords.delta,G=this.coords.prev,J=this.coords.cur,F.page.x=J.page.x-G.page.x,F.page.y=J.page.y-G.page.y,F.client.x=J.client.x-G.client.x,F.client.y=J.client.y-G.client.y,F.timeStamp=J.timeStamp-G.timeStamp,C&&(this.pointerIsDown=!0,Se.downTime=this.coords.cur.timeStamp,Se.downTarget=k,V(this.downPointer,t),this.interacting()||(ee(this.coords.start,this.coords.cur),ee(this.coords.prev,this.coords.cur),this.downEvent=h,this.pointerWasMoved=!1)),this._updateLatestPointer(t,h,k),this._scopeFire("interactions:update-pointer",{pointer:t,event:h,eventTarget:k,down:C,pointerInfo:Se,pointerIndex:Ue,interaction:this}),Ue}},{key:"removePointer",value:function(t,h){var k=this.getPointerIndex(t);if(k!==-1){var C=this.pointers[k];this._scopeFire("interactions:remove-pointer",{pointer:t,event:h,eventTarget:null,pointerIndex:k,pointerInfo:C,interaction:this}),this.pointers.splice(k,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,h,k){this._latestPointer.pointer=t,this._latestPointer.event=h,this._latestPointer.eventTarget=k}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,h,k,C){return new wr(this,t,this.prepared.name,h,this.element,k,C)}},{key:"_fireEvent",value:function(t){var h;(h=this.interactable)==null||h.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var h=t.event,k=t.phase,C=t.preEnd,F=t.type,G=this.rect;if(G&&k==="move"&&(de(this.edges,G,this.coords.delta[this.interactable.options.deltaSource]),G.width=G.right-G.left,G.height=G.bottom-G.top),this._scopeFire("interactions:before-action-".concat(k),t)===!1)return!1;var J=t.iEvent=this._createPreparedEvent(h,k,C,F);return this._scopeFire("interactions:action-".concat(k),t),k==="start"&&(this.prevEvent=J),this._fireEvent(J),this._scopeFire("interactions:after-action-".concat(k),t),!0}},{key:"_now",value:function(){return Date.now()}}]),s}();function Ul(s){Tr(s.interaction)}function Tr(s){if(!function(h){return!(!h.offset.pending.x&&!h.offset.pending.y)}(s))return!1;var t=s.offset.pending;return El(s.coords.cur,t),El(s.coords.delta,t),de(s.edges,s.rect,t),t.x=0,t.y=0,!0}function Nr(s){var t=s.x,h=s.y;this.offset.pending.x+=t,this.offset.pending.y+=h,this.offset.total.x+=t,this.offset.total.y+=h}function El(s,t){var h=s.page,k=s.client,C=t.x,F=t.y;h.x+=C,h.y+=F,k.x+=C,k.y+=F}lr.offsetBy="";var Zl={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(s){s.Interaction.prototype.offsetBy=Nr},listeners:{"interactions:new":function(s){s.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(s){return function(t){t.pointerIsDown&&(El(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(s.interaction)},"interactions:before-action-start":Ul,"interactions:before-action-move":Ul,"interactions:before-action-end":function(s){var t=s.interaction;if(Tr(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(s){var t=s.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},rr=Zl,Dr=function(){function s(t){o(this,s),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return c(s,[{key:"start",value:function(t){var h=this.interaction,k=wl(h);if(!k||!k.enabled)return!1;var C=h.coords.velocity.client,F=Ge(C.x,C.y),G=this.modification||(this.modification=new Ol(h));if(G.copyFrom(h.modification),this.t0=h._now(),this.allowResume=k.allowResume,this.v0=F,this.currentOffset={x:0,y:0},this.startCoords=h.coords.cur.page,this.modifierArg=G.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-h.coords.cur.timeStamp<50&&F>k.minSpeed&&F>k.endSpeed)this.startInertia();else{if(G.result=G.setAll(this.modifierArg),!G.result.changed)return!1;this.startSmoothEnd()}return h.modification.result.rect=null,h.offsetBy(this.targetOffset),h._doPhase({interaction:h,event:t,phase:"inertiastart"}),h.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),h.modification.result.rect=null,this.active=!0,h.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,h=this.interaction.coords.velocity.client,k=wl(this.interaction),C=k.resistance,F=-Math.log(k.endSpeed/this.v0)/C;this.targetOffset={x:(h.x-F)/C,y:(h.y-F)/C},this.te=F,this.lambda_v0=C/this.v0,this.one_ve_v0=1-k.endSpeed/this.v0;var G=this.modification,J=this.modifierArg;J.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},G.result=G.setAll(J),G.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+G.result.delta.x,y:this.targetOffset.y+G.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var h=this;this.timeout=ar.request(function(){h.active&&t()})}},{key:"inertiaTick",value:function(){var t,h,k,C,F,G,J,xe=this,Ue=this.interaction,Se=wl(Ue).resistance,sa=(Ue._now()-this.t0)/1e3;if(sa<this.te){var Oa,rl=1-(Math.exp(-Se*sa)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,h=0,k=this.targetOffset.x,C=this.targetOffset.y,F=this.modifiedOffset.x,G=this.modifiedOffset.y,Oa={x:Kl(J=rl,t,k,F),y:Kl(J,h,C,G)}):Oa={x:this.targetOffset.x*rl,y:this.targetOffset.y*rl};var el={x:Oa.x-this.currentOffset.x,y:Oa.y-this.currentOffset.y};this.currentOffset.x+=el.x,this.currentOffset.y+=el.y,Ue.offsetBy(el),Ue.move(),this.onNextFrame(function(){return xe.inertiaTick()})}else Ue.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,h=this.interaction,k=h._now()-this.t0,C=wl(h).smoothEndDuration;if(k<C){var F={x:on(k,0,this.targetOffset.x,C),y:on(k,0,this.targetOffset.y,C)},G={x:F.x-this.currentOffset.x,y:F.y-this.currentOffset.y};this.currentOffset.x+=G.x,this.currentOffset.y+=G.y,h.offsetBy(G),h.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else h.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var h=t.pointer,k=t.event,C=t.eventTarget,F=this.interaction;F.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),F.updatePointer(h,k,C,!0),F._doPhase({interaction:F,event:k,phase:"resume"}),ee(F.coords.prev,F.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,ar.cancel(this.timeout)}}]),s}();function wl(s){var t=s.interactable,h=s.prepared;return t&&t.options&&h.name&&t.options[h.name].inertia}var Lr={id:"inertia",before:["modifiers","actions"],install:function(s){var t=s.defaults;s.usePlugin(rr),s.usePlugin(Re),s.actions.phases.inertiastart=!0,s.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(s){var t=s.interaction;t.inertia=new Dr(t)},"interactions:before-action-end":function(s){var t=s.interaction,h=s.event;return(!t._interacting||t.simulation||!t.inertia.start(h))&&null},"interactions:down":function(s){var t=s.interaction,h=s.eventTarget,k=t.inertia;if(k.active)for(var C=h;_.element(C);){if(C===t.element){k.resume(s);break}C=ze(C)}},"interactions:stop":function(s){var t=s.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(s){var t=s.interaction.modification;t.stop(s),t.start(s,s.interaction.coords.cur.page),t.applyToInteraction(s)},"interactions:before-action-inertiastart":function(s){return s.interaction.modification.setAndApply(s)},"interactions:action-resume":Ur,"interactions:action-inertiastart":Ur,"interactions:after-action-inertiastart":function(s){return s.interaction.modification.restoreInteractionCoords(s)},"interactions:after-action-resume":function(s){return s.interaction.modification.restoreInteractionCoords(s)}}};function Kl(s,t,h,k){var C=1-s;return C*C*t+2*C*s*h+s*s*k}function on(s,t,h,k){return-h*(s/=k)*(s-2)+t}var Rr=Lr;function qr(s,t){for(var h=0;h<t.length;h++){var k=t[h];if(s.immediatePropagationStopped)break;k(s)}}var En=function(){function s(t){o(this,s),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=j({},t||{})}return c(s,[{key:"fire",value:function(t){var h,k=this.global;(h=this.types[t.type])&&qr(t,h),!t.propagationStopped&&k&&(h=k[t.type])&&qr(t,h)}},{key:"on",value:function(t,h){var k=Je(t,h);for(t in k)this.types[t]=ya(this.types[t]||[],k[t])}},{key:"off",value:function(t,h){var k=Je(t,h);for(t in k){var C=this.types[t];if(C&&C.length)for(var F=0,G=k[t];F<G.length;F++){var J=G[F],xe=C.indexOf(J);xe!==-1&&C.splice(xe,1)}}}},{key:"getRect",value:function(t){return null}}]),s}(),$n=function(){function s(t){o(this,s),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,V(this,t)}return c(s,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),s}();function Cn(s){return _.object(s)?{capture:!!s.capture,passive:!!s.passive}:{capture:!!s,passive:!1}}function mn(s,t){return s===t||(typeof s=="boolean"?!!t.capture===s&&!t.passive:!!s.capture==!!t.capture&&!!s.passive==!!t.passive)}var Mn={id:"events",install:function(s){var t,h=[],k={},C=[],F={add:G,remove:J,addDelegate:function(Se,sa,Oa,rl,el){var cl=Cn(el);if(!k[Oa]){k[Oa]=[];for(var Cl=0;Cl<C.length;Cl++){var _l=C[Cl];G(_l,Oa,xe),G(_l,Oa,Ue,!0)}}var Vl=k[Oa],Ql=ne(Vl,function(dr){return dr.selector===Se&&dr.context===sa});Ql||(Ql={selector:Se,context:sa,listeners:[]},Vl.push(Ql)),Ql.listeners.push({func:rl,options:cl})},removeDelegate:function(Se,sa,Oa,rl,el){var cl,Cl=Cn(el),_l=k[Oa],Vl=!1;if(_l)for(cl=_l.length-1;cl>=0;cl--){var Ql=_l[cl];if(Ql.selector===Se&&Ql.context===sa){for(var dr=Ql.listeners,ql=dr.length-1;ql>=0;ql--){var nr=dr[ql];if(nr.func===rl&&mn(nr.options,Cl)){dr.splice(ql,1),dr.length||(_l.splice(cl,1),J(sa,Oa,xe),J(sa,Oa,Ue,!0)),Vl=!0;break}}if(Vl)break}}},delegateListener:xe,delegateUseCapture:Ue,delegatedEvents:k,documents:C,targets:h,supportsOptions:!1,supportsPassive:!1};function G(Se,sa,Oa,rl){if(Se.addEventListener){var el=Cn(rl),cl=ne(h,function(Cl){return Cl.eventTarget===Se});cl||(cl={eventTarget:Se,events:{}},h.push(cl)),cl.events[sa]||(cl.events[sa]=[]),ne(cl.events[sa],function(Cl){return Cl.func===Oa&&mn(Cl.options,el)})||(Se.addEventListener(sa,Oa,F.supportsOptions?el:el.capture),cl.events[sa].push({func:Oa,options:el}))}}function J(Se,sa,Oa,rl){if(Se.addEventListener&&Se.removeEventListener){var el=Ae(h,function(pn){return pn.eventTarget===Se}),cl=h[el];if(cl&&cl.events)if(sa!=="all"){var Cl=!1,_l=cl.events[sa];if(_l){if(Oa==="all"){for(var Vl=_l.length-1;Vl>=0;Vl--){var Ql=_l[Vl];J(Se,sa,Ql.func,Ql.options)}return}for(var dr=Cn(rl),ql=0;ql<_l.length;ql++){var nr=_l[ql];if(nr.func===Oa&&mn(nr.options,dr)){Se.removeEventListener(sa,Oa,F.supportsOptions?dr:dr.capture),_l.splice(ql,1),_l.length===0&&(delete cl.events[sa],Cl=!0);break}}}Cl&&!Object.keys(cl.events).length&&h.splice(el,1)}else for(sa in cl.events)cl.events.hasOwnProperty(sa)&&J(Se,sa,"all")}}function xe(Se,sa){for(var Oa=Cn(sa),rl=new $n(Se),el=k[Se.type],cl=ta(Se)[0],Cl=cl;_.element(Cl);){for(var _l=0;_l<el.length;_l++){var Vl=el[_l],Ql=Vl.selector,dr=Vl.context;if(te(Cl,Ql)&&ae(dr,cl)&&ae(dr,Cl)){var ql=Vl.listeners;rl.currentTarget=Cl;for(var nr=0;nr<ql.length;nr++){var pn=ql[nr];mn(pn.options,Oa)&&pn.func(rl)}}}Cl=ze(Cl)}}function Ue(Se){return xe(Se,!0)}return(t=s.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return F.supportsOptions=!0},get passive(){return F.supportsPassive=!0}}),s.events=F,F}},rn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(s){for(var t=0,h=rn.methodOrder;t<h.length;t++){var k=h[t],C=rn[k](s);if(C)return C}return null},simulationResume:function(s){var t=s.pointerType,h=s.eventType,k=s.eventTarget,C=s.scope;if(!/down|start/i.test(h))return null;for(var F=0,G=C.interactions.list;F<G.length;F++){var J=G[F],xe=k;if(J.simulation&&J.simulation.allowResume&&J.pointerType===t)for(;xe;){if(xe===J.element)return J;xe=ze(xe)}}return null},mouseOrPen:function(s){var t,h=s.pointerId,k=s.pointerType,C=s.eventType,F=s.scope;if(k!=="mouse"&&k!=="pen")return null;for(var G=0,J=F.interactions.list;G<J.length;G++){var xe=J[G];if(xe.pointerType===k){if(xe.simulation&&!Dn(xe,h))continue;if(xe.interacting())return xe;t||(t=xe)}}if(t)return t;for(var Ue=0,Se=F.interactions.list;Ue<Se.length;Ue++){var sa=Se[Ue];if(!(sa.pointerType!==k||/down/i.test(C)&&sa.simulation))return sa}return null},hasPointer:function(s){for(var t=s.pointerId,h=0,k=s.scope.interactions.list;h<k.length;h++){var C=k[h];if(Dn(C,t))return C}return null},idle:function(s){for(var t=s.pointerType,h=0,k=s.scope.interactions.list;h<k.length;h++){var C=k[h];if(C.pointers.length===1){var F=C.interactable;if(F&&(!F.options.gesture||!F.options.gesture.enabled))continue}else if(C.pointers.length>=2)continue;if(!C.interacting()&&t===C.pointerType)return C}return null}};function Dn(s,t){return s.pointers.some(function(h){return h.id===t})}var Vr=rn,Xr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function _n(s,t){return function(h){var k=t.interactions.list,C=ja(h),F=ta(h),G=F[0],J=F[1],xe=[];if(/^touch/.test(h.type)){t.prevTouchTime=t.now();for(var Ue=0,Se=h.changedTouches;Ue<Se.length;Ue++){var sa=Se[Ue],Oa={pointer:sa,pointerId:Ve(sa),pointerType:C,eventType:h.type,eventTarget:G,curEventTarget:J,scope:t},rl=In(Oa);xe.push([Oa.pointer,Oa.eventTarget,Oa.curEventTarget,rl])}}else{var el=!1;if(!Z.supportsPointerEvent&&/mouse/.test(h.type)){for(var cl=0;cl<k.length&&!el;cl++)el=k[cl].pointerType!=="mouse"&&k[cl].pointerIsDown;el=el||t.now()-t.prevTouchTime<500||h.timeStamp===0}if(!el){var Cl={pointer:h,pointerId:Ve(h),pointerType:C,eventType:h.type,curEventTarget:J,eventTarget:G,scope:t},_l=In(Cl);xe.push([Cl.pointer,Cl.eventTarget,Cl.curEventTarget,_l])}}for(var Vl=0;Vl<xe.length;Vl++){var Ql=xe[Vl],dr=Ql[0],ql=Ql[1],nr=Ql[2];Ql[3][s](dr,h,ql,nr)}}}function In(s){var t=s.pointerType,h=s.scope,k={interaction:Vr.search(s),searchDetails:s};return h.fire("interactions:find",k),k.interaction||h.interactions.new({pointerType:t})}function $i(s,t){var h=s.doc,k=s.scope,C=s.options,F=k.interactions.docEvents,G=k.events,J=G[t];for(var xe in k.browser.isIOS&&!C.events&&(C.events={passive:!1}),G.delegatedEvents)J(h,xe,G.delegateListener),J(h,xe,G.delegateUseCapture,!0);for(var Ue=C&&C.events,Se=0;Se<F.length;Se++){var sa=F[Se];J(h,sa.type,sa.listener,Ue)}}var gi={id:"core/interactions",install:function(s){for(var t={},h=0;h<Xr.length;h++){var k=Xr[h];t[k]=_n(k,s)}var C,F=Z.pEventTypes;function G(){for(var J=0,xe=s.interactions.list;J<xe.length;J++){var Ue=xe[J];if(Ue.pointerIsDown&&Ue.pointerType==="touch"&&!Ue._interacting)for(var Se=function(){var rl=Oa[sa];s.documents.some(function(el){return ae(el.doc,rl.downTarget)})||Ue.removePointer(rl.pointer,rl.event)},sa=0,Oa=Ue.pointers;sa<Oa.length;sa++)Se()}}(C=U.PointerEvent?[{type:F.down,listener:G},{type:F.down,listener:t.pointerDown},{type:F.move,listener:t.pointerMove},{type:F.up,listener:t.pointerUp},{type:F.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:G},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(J){for(var xe=0,Ue=s.interactions.list;xe<Ue.length;xe++)Ue[xe].documentBlur(J)}}),s.prevTouchTime=0,s.Interaction=function(J){m(Ue,J);var xe=A(Ue);function Ue(){return o(this,Ue),xe.apply(this,arguments)}return c(Ue,[{key:"pointerMoveTolerance",get:function(){return s.interactions.pointerMoveTolerance},set:function(Se){s.interactions.pointerMoveTolerance=Se}},{key:"_now",value:function(){return s.now()}}]),Ue}(Xl),s.interactions={list:[],new:function(J){J.scopeFire=function(Ue,Se){return s.fire(Ue,Se)};var xe=new s.Interaction(J);return s.interactions.list.push(xe),xe},listeners:t,docEvents:C,pointerMoveTolerance:1},s.usePlugin(ea)},listeners:{"scope:add-document":function(s){return $i(s,"add")},"scope:remove-document":function(s){return $i(s,"remove")},"interactable:unset":function(s,t){for(var h=s.interactable,k=t.interactions.list.length-1;k>=0;k--){var C=t.interactions.list[k];C.interactable===h&&(C.stop(),t.fire("interactions:destroy",{interaction:C}),C.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(k,1))}}},onDocSignal:$i,doOnInteractions:_n,methodNames:Xr},Fo=gi,On=function(s){return s[s.On=0]="On",s[s.Off=1]="Off",s}(On||{}),Po=function(){function s(t,h,k,C){o(this,s),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new En,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=h.actions,this.target=t,this._context=h.context||k,this._win=S(la(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=C,this.set(h)}return c(s,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,h){return _.func(h.onstart)&&this.on("".concat(t,"start"),h.onstart),_.func(h.onmove)&&this.on("".concat(t,"move"),h.onmove),_.func(h.onend)&&this.on("".concat(t,"end"),h.onend),_.func(h.oninertiastart)&&this.on("".concat(t,"inertiastart"),h.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,h,k){var C,F=this,G=(C=this._actions.map[t])==null?void 0:C.filterEventType,J=function(xe){return(G==null||G(xe))&&La(xe,F._actions)};(_.array(h)||_.object(h))&&this._onOff(On.Off,t,h,void 0,J),(_.array(k)||_.object(k))&&this._onOff(On.On,t,k,void 0,J)}},{key:"setPerAction",value:function(t,h){var k=this._defaults;for(var C in h){var F=C,G=this.options[t],J=h[F];F==="listeners"&&this.updatePerActionListeners(t,G.listeners,J),_.array(J)?G[F]=Ze(J):_.plainObject(J)?(G[F]=j(G[F]||{},Bl(J)),_.object(k.perAction[F])&&"enabled"in k.perAction[F]&&(G[F].enabled=J.enabled!==!1)):_.bool(J)&&_.object(k.perAction[F])?G[F].enabled=J:G[F]=J}}},{key:"getRect",value:function(t){return t=t||(_.element(this.target)?this.target:null),_.string(this.target)&&(t=t||this._context.querySelector(this.target)),we(t)}},{key:"rectChecker",value:function(t){var h=this;return _.func(t)?(this.getRect=function(k){var C=j({},t.apply(h,k));return"width"in C||(C.width=C.right-C.left,C.height=C.bottom-C.top),C},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,h){if(la(h)||_.object(h)){for(var k in this.options[t]=h,this._actions.map)this.options[k][t]=h;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return _.string(t)?Array.from(this._context.querySelectorAll(t)):_.func(t)&&t.getAllElements?t.getAllElements():_.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ae(this._context,t)}},{key:"testIgnoreAllow",value:function(t,h,k){return!this.testIgnore(t.ignoreFrom,h,k)&&this.testAllow(t.allowFrom,h,k)}},{key:"testAllow",value:function(t,h,k){return!t||!!_.element(k)&&(_.string(t)?W(k,t,h):!!_.element(t)&&ae(t,k))}},{key:"testIgnore",value:function(t,h,k){return!(!t||!_.element(k))&&(_.string(t)?W(k,t,h):!!_.element(t)&&ae(t,k))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,h,k,C,F){_.object(h)&&!_.array(h)&&(C=k,k=null);var G=Je(h,k,F);for(var J in G){J==="wheel"&&(J=Z.wheelEvent);for(var xe=0,Ue=G[J];xe<Ue.length;xe++){var Se=Ue[xe];La(J,this._actions)?this.events[t===On.On?"on":"off"](J,Se):_.string(this.target)?this._scopeEvents[t===On.On?"addDelegate":"removeDelegate"](this.target,this._context,J,Se,C):this._scopeEvents[t===On.On?"add":"remove"](this.target,J,Se,C)}}return this}},{key:"on",value:function(t,h,k){return this._onOff(On.On,t,h,k)}},{key:"off",value:function(t,h,k){return this._onOff(On.Off,t,h,k)}},{key:"set",value:function(t){var h=this._defaults;for(var k in _.object(t)||(t={}),this.options=Bl(h.base),this._actions.methodDict){var C=k,F=this._actions.methodDict[C];this.options[C]={},this.setPerAction(C,j(j({},h.perAction),h.actions[C])),this[F](t[C])}for(var G in t)G!=="getRect"?_.func(this[G])&&this[G](t[G]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(_.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var h=this._scopeEvents.delegatedEvents[t],k=h.length-1;k>=0;k--){var C=h[k],F=C.selector,G=C.context,J=C.listeners;F===this.target&&G===this._context&&h.splice(k,1);for(var xe=J.length-1;xe>=0;xe--)this._scopeEvents.removeDelegate(this.target,this._context,t,J[xe][0],J[xe][1])}else this._scopeEvents.remove(this.target,"all")}}]),s}(),jo=function(){function s(t){var h=this;o(this,s),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(k){var C=k.interactable,F=C.target,G=_.string(F)?h.selectorMap[F]:F[h.scope.id],J=Ae(G,function(xe){return xe===C});G.splice(J,1)}})}return c(s,[{key:"new",value:function(t,h){h=j(h||{},{actions:this.scope.actions});var k=new this.scope.Interactable(t,h,this.scope.document,this.scope.events);return this.scope.addDocument(k._doc),this.list.push(k),_.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(k)):(k.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(k)),this.scope.fire("interactable:new",{target:t,options:h,interactable:k,win:this.scope._win}),k}},{key:"getExisting",value:function(t,h){var k=h&&h.context||this.scope.document,C=_.string(t),F=C?this.selectorMap[t]:t[this.scope.id];if(F)return ne(F,function(G){return G._context===k&&(C||G.inContext(t))})}},{key:"forEachMatch",value:function(t,h){for(var k=0,C=this.list;k<C.length;k++){var F=C[k],G=void 0;if((_.string(F.target)?_.element(t)&&te(t,F.target):t===F.target)&&F.inContext(t)&&(G=h(F)),G!==void 0)return G}}}]),s}(),Ho=function(){function s(){var t=this;o(this,s),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Z,this.defaults=Bl(ur),this.Eventable=En,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(k){var C=function F(G,J){var xe=k.interactables.getExisting(G,J);return xe||((xe=k.interactables.new(G,J)).events.global=F.globalEvents),xe};return C.getPointerAverage=De,C.getTouchBBox=Fa,C.getTouchDistance=Na,C.getTouchAngle=da,C.getElementRect=we,C.getElementClientRect=_e,C.matchesSelector=te,C.closest=ve,C.globalEvents={},C.version="1.10.27",C.scope=k,C.use=function(F,G){return this.scope.usePlugin(F,G),this},C.isSet=function(F,G){return!!this.scope.interactables.get(F,G&&G.context)},C.on=Nl(function(F,G,J){if(_.string(F)&&F.search(" ")!==-1&&(F=F.trim().split(/ +/)),_.array(F)){for(var xe=0,Ue=F;xe<Ue.length;xe++){var Se=Ue[xe];this.on(Se,G,J)}return this}if(_.object(F)){for(var sa in F)this.on(sa,F[sa],G);return this}return La(F,this.scope.actions)?this.globalEvents[F]?this.globalEvents[F].push(G):this.globalEvents[F]=[G]:this.scope.events.add(this.scope.document,F,G,{options:J}),this},"The interact.on() method is being deprecated"),C.off=Nl(function(F,G,J){if(_.string(F)&&F.search(" ")!==-1&&(F=F.trim().split(/ +/)),_.array(F)){for(var xe=0,Ue=F;xe<Ue.length;xe++){var Se=Ue[xe];this.off(Se,G,J)}return this}if(_.object(F)){for(var sa in F)this.off(sa,F[sa],G);return this}var Oa;return La(F,this.scope.actions)?F in this.globalEvents&&(Oa=this.globalEvents[F].indexOf(G))!==-1&&this.globalEvents[F].splice(Oa,1):this.scope.events.remove(this.scope.document,F,G,J),this},"The interact.off() method is being deprecated"),C.debug=function(){return this.scope},C.supportsTouch=function(){return Z.supportsTouch},C.supportsPointerEvent=function(){return Z.supportsPointerEvent},C.stop=function(){for(var F=0,G=this.scope.interactions.list;F<G.length;F++)G[F].stop();return this},C.pointerMoveTolerance=function(F){return _.number(F)?(this.scope.interactions.pointerMoveTolerance=F,this):this.scope.interactions.pointerMoveTolerance},C.addDocument=function(F,G){this.scope.addDocument(F,G)},C.removeDocument=function(F){this.scope.removeDocument(F)},C}(this),this.InteractEvent=wr,this.Interactable=void 0,this.interactables=new jo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(k){return t.removeDocument(k.target)};var h=this;this.Interactable=function(k){m(F,k);var C=A(F);function F(){return o(this,F),C.apply(this,arguments)}return c(F,[{key:"_defaults",get:function(){return h.defaults}},{key:"set",value:function(G){return w(g(F.prototype),"set",this).call(this,G),h.fire("interactable:set",{options:G,interactable:this}),this}},{key:"unset",value:function(){w(g(F.prototype),"unset",this).call(this);var G=h.interactables.list.indexOf(this);G<0||(h.interactables.list.splice(G,1),h.fire("interactable:unset",{interactable:this}))}}]),F}(Po)}return c(s,[{key:"addListeners",value:function(t,h){this.listenerMaps.push({id:h,map:t})}},{key:"fire",value:function(t,h){for(var k=0,C=this.listenerMaps;k<C.length;k++){var F=C[k].map[t];if(F&&F(h,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(h,k){return h.isInitialized=!0,_.window(k)&&E(k),U.init(k),Z.init(k),ar.init(k),h.window=k,h.document=k.document,h.usePlugin(Fo),h.usePlugin(Mn),h}(this,t)}},{key:"pluginIsInstalled",value:function(t){var h=t.id;return h?!!this._plugins.map[h]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,h){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,h),t.listeners&&t.before){for(var k=0,C=this.listenerMaps.length,F=t.before.reduce(function(J,xe){return J[xe]=!0,J[lo(xe)]=!0,J},{});k<C;k++){var G=this.listenerMaps[k].id;if(G&&(F[G]||F[lo(G)]))break}this.listenerMaps.splice(k,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,h){if(this.getDocIndex(t)!==-1)return!1;var k=S(t);h=h?j({},h):{},this.documents.push({doc:t,options:h}),this.events.documents.push(t),t!==this.document&&this.events.add(k,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:k,scope:this,options:h})}},{key:"removeDocument",value:function(t){var h=this.getDocIndex(t),k=S(t),C=this.documents[h].options;this.events.remove(k,"unload",this.onWindowUnload),this.documents.splice(h,1),this.events.documents.splice(h,1),this.fire("scope:remove-document",{doc:t,window:k,scope:this,options:C})}},{key:"getDocIndex",value:function(t){for(var h=0;h<this.documents.length;h++)if(this.documents[h].doc===t)return h;return-1}},{key:"getDocOptions",value:function(t){var h=this.getDocIndex(t);return h===-1?null:this.documents[h].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),s}();function lo(s){return s&&s.replace(/\/.*$/,"")}var ro=new Ho,dn=ro.interactStatic,Uo=typeof globalThis<"u"?globalThis:window;ro.init(Uo);var no=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(s){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(k){var C=k[0],F=k[1];return C in s||F in s}),h=function(k,C){for(var F=s.range,G=s.limits,J=G===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:G,xe=s.offset,Ue=xe===void 0?{x:0,y:0}:xe,Se={range:F,grid:s,x:null,y:null},sa=0;sa<t.length;sa++){var Oa=t[sa],rl=Oa[0],el=Oa[1],cl=Math.round((k-Ue.x)/s[rl]),Cl=Math.round((C-Ue.y)/s[el]);Se[rl]=Math.max(J.left,Math.min(J.right,cl*s[rl]+Ue.x)),Se[el]=Math.max(J.top,Math.min(J.bottom,Cl*s[el]+Ue.y))}return Se};return h.grid=s,h.coordFields=t,h}}),qo={id:"snappers",install:function(s){var t=s.interactStatic;t.snappers=j(t.snappers||{},no),t.createSnapGrid=t.snappers.grid}},Wo=qo,Ko={start:function(s){var t=s.state,h=s.rect,k=s.edges,C=s.pageCoords,F=t.options,G=F.ratio,J=F.enabled,xe=t.options,Ue=xe.equalDelta,Se=xe.modifiers;G==="preserve"&&(G=h.width/h.height),t.startCoords=j({},C),t.startRect=j({},h),t.ratio=G,t.equalDelta=Ue;var sa=t.linkedEdges={top:k.top||k.left&&!k.bottom,left:k.left||k.top&&!k.right,bottom:k.bottom||k.right&&!k.top,right:k.right||k.bottom&&!k.left};if(t.xIsPrimaryAxis=!(!k.left&&!k.right),t.equalDelta){var Oa=(sa.left?1:-1)*(sa.top?1:-1);t.edgeSign={x:Oa,y:Oa}}else t.edgeSign={x:sa.left?-1:1,y:sa.top?-1:1};if(J!==!1&&j(k,sa),Se!=null&&Se.length){var rl=new Ol(s.interaction);rl.copyFrom(s.interaction.modification),rl.prepareStates(Se),t.subModification=rl,rl.startAll(n({},s))}},set:function(s){var t=s.state,h=s.rect,k=s.coords,C=t.linkedEdges,F=j({},k),G=t.equalDelta?Go:Vi;if(j(s.edges,C),G(t,t.xIsPrimaryAxis,k,h),!t.subModification)return null;var J=j({},h);de(C,J,{x:k.x-F.x,y:k.y-F.y});var xe=t.subModification.setAll(n(n({},s),{},{rect:J,edges:C,pageCoords:k,prevCoords:k,prevRect:J})),Ue=xe.delta;return xe.changed&&(G(t,Math.abs(Ue.x)>Math.abs(Ue.y),xe.coords,xe.rect),j(k,xe.coords)),xe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Go(s,t,h){var k=s.startCoords,C=s.edgeSign;t?h.y=k.y+(h.x-k.x)*C.y:h.x=k.x+(h.y-k.y)*C.x}function Vi(s,t,h,k){var C=s.startRect,F=s.startCoords,G=s.ratio,J=s.edgeSign;if(t){var xe=k.width/G;h.y=F.y+(xe-C.height)*J.y}else{var Ue=k.height*G;h.x=F.x+(Ue-C.width)*J.x}}var Yo=Sr(Ko,"aspectRatio"),bi=function(){};bi._defaults={};var oi=bi;function Vn(s,t,h){return _.func(s)?Oe(s,t.interactable,t.element,[h.x,h.y,t]):Oe(s,t.interactable,t.element)}var ki={start:function(s){var t=s.rect,h=s.startOffset,k=s.state,C=s.interaction,F=s.pageCoords,G=k.options,J=G.elementRect,xe=j({left:0,top:0,right:0,bottom:0},G.offset||{});if(t&&J){var Ue=Vn(G.restriction,C,F);if(Ue){var Se=Ue.right-Ue.left-t.width,sa=Ue.bottom-Ue.top-t.height;Se<0&&(xe.left+=Se,xe.right+=Se),sa<0&&(xe.top+=sa,xe.bottom+=sa)}xe.left+=h.left-t.width*J.left,xe.top+=h.top-t.height*J.top,xe.right+=h.right-t.width*(1-J.right),xe.bottom+=h.bottom-t.height*(1-J.bottom)}k.offset=xe},set:function(s){var t=s.coords,h=s.interaction,k=s.state,C=k.options,F=k.offset,G=Vn(C.restriction,h,t);if(G){var J=function(xe){return!xe||"left"in xe&&"top"in xe||((xe=j({},xe)).left=xe.x||0,xe.top=xe.y||0,xe.right=xe.right||xe.left+xe.width,xe.bottom=xe.bottom||xe.top+xe.height),xe}(G);t.x=Math.max(Math.min(J.right-F.right,t.x),J.left+F.left),t.y=Math.max(Math.min(J.bottom-F.bottom,t.y),J.top+F.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Jo=Sr(ki,"restrict"),io={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Xn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Fi(s,t){for(var h=0,k=["top","left","bottom","right"];h<k.length;h++){var C=k[h];C in s||(s[C]=t[C])}return s}var Un={noInner:io,noOuter:Xn,start:function(s){var t,h=s.interaction,k=s.startOffset,C=s.state,F=C.options;F&&(t=Ie(Vn(F.offset,h,h.coords.start.page))),t=t||{x:0,y:0},C.offset={top:t.y+k.top,left:t.x+k.left,bottom:t.y-k.bottom,right:t.x-k.right}},set:function(s){var t=s.coords,h=s.edges,k=s.interaction,C=s.state,F=C.offset,G=C.options;if(h){var J=j({},t),xe=Vn(G.inner,k,J)||{},Ue=Vn(G.outer,k,J)||{};Fi(xe,io),Fi(Ue,Xn),h.top?t.y=Math.min(Math.max(Ue.top+F.top,J.y),xe.top+F.top):h.bottom&&(t.y=Math.max(Math.min(Ue.bottom+F.bottom,J.y),xe.bottom+F.bottom)),h.left?t.x=Math.min(Math.max(Ue.left+F.left,J.x),xe.left+F.left):h.right&&(t.x=Math.max(Math.min(Ue.right+F.right,J.x),xe.right+F.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Xo=Sr(Un,"restrictEdges"),Zo=j({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(s){}},ki.defaults),Qo=Sr({start:ki.start,set:ki.set,defaults:Zo},"restrictRect"),et={width:-1/0,height:-1/0},oo={width:1/0,height:1/0},ti=Sr({start:function(s){return Un.start(s)},set:function(s){var t=s.interaction,h=s.state,k=s.rect,C=s.edges,F=h.options;if(C){var G=Me(Vn(F.min,t,s.coords))||et,J=Me(Vn(F.max,t,s.coords))||oo;h.options={endOnly:F.endOnly,inner:j({},Un.noInner),outer:j({},Un.noOuter)},C.top?(h.options.inner.top=k.bottom-G.height,h.options.outer.top=k.bottom-J.height):C.bottom&&(h.options.inner.bottom=k.top+G.height,h.options.outer.bottom=k.top+J.height),C.left?(h.options.inner.left=k.right-G.width,h.options.outer.left=k.right-J.width):C.right&&(h.options.inner.right=k.left+G.width,h.options.outer.right=k.left+J.width),Un.set(s),h.options=F}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),xi={start:function(s){var t,h=s.interaction,k=s.interactable,C=s.element,F=s.rect,G=s.state,J=s.startOffset,xe=G.options,Ue=xe.offsetWithOrigin?function(Oa){var rl=Oa.interaction.element,el=Ie(Oe(Oa.state.options.origin,null,null,[rl])),cl=el||Ce(Oa.interactable,rl,Oa.interaction.prepared.name);return cl}(s):{x:0,y:0};if(xe.offset==="startCoords")t={x:h.coords.start.page.x,y:h.coords.start.page.y};else{var Se=Oe(xe.offset,k,C,[h]);(t=Ie(Se)||{x:0,y:0}).x+=Ue.x,t.y+=Ue.y}var sa=xe.relativePoints;G.offsets=F&&sa&&sa.length?sa.map(function(Oa,rl){return{index:rl,relativePoint:Oa,x:J.left-F.width*Oa.x+t.x,y:J.top-F.height*Oa.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(s){var t=s.interaction,h=s.coords,k=s.state,C=k.options,F=k.offsets,G=Ce(t.interactable,t.element,t.prepared.name),J=j({},h),xe=[];C.offsetWithOrigin||(J.x-=G.x,J.y-=G.y);for(var Ue=0,Se=F;Ue<Se.length;Ue++)for(var sa=Se[Ue],Oa=J.x-sa.x,rl=J.y-sa.y,el=0,cl=C.targets.length;el<cl;el++){var Cl=C.targets[el],_l=void 0;(_l=_.func(Cl)?Cl(Oa,rl,t._proxy,sa,el):Cl)&&xe.push({x:(_.number(_l.x)?_l.x:Oa)+sa.x,y:(_.number(_l.y)?_l.y:rl)+sa.y,range:_.number(_l.range)?_l.range:C.range,source:Cl,index:el,offset:sa})}for(var Vl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ql=0;Ql<xe.length;Ql++){var dr=xe[Ql],ql=dr.range,nr=dr.x-J.x,pn=dr.y-J.y,Gl=Ge(nr,pn),gn=Gl<=ql;ql===1/0&&Vl.inRange&&Vl.range!==1/0&&(gn=!1),Vl.target&&!(gn?Vl.inRange&&ql!==1/0?Gl/ql<Vl.distance/Vl.range:ql===1/0&&Vl.range!==1/0||Gl<Vl.distance:!Vl.inRange&&Gl<Vl.distance)||(Vl.target=dr,Vl.distance=Gl,Vl.range=ql,Vl.inRange=gn,Vl.delta.x=nr,Vl.delta.y=pn)}return Vl.inRange&&(h.x=Vl.target.x,h.y=Vl.target.y),k.closest=Vl,Vl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},to=Sr(xi,"snap"),Fn={start:function(s){var t=s.state,h=s.edges,k=t.options;if(!h)return null;s.state={options:{targets:null,relativePoints:[{x:h.left?0:1,y:h.top?0:1}],offset:k.offset||"self",origin:{x:0,y:0},range:k.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],xi.start(s),t.offsets=s.state.offsets,s.state=t},set:function(s){var t=s.interaction,h=s.state,k=s.coords,C=h.options,F=h.offsets,G={x:k.x-F[0].x,y:k.y-F[0].y};h.options=j({},C),h.options.targets=[];for(var J=0,xe=C.targets||[];J<xe.length;J++){var Ue=xe[J],Se=void 0;if(Se=_.func(Ue)?Ue(G.x,G.y,t):Ue){for(var sa=0,Oa=h.targetFields;sa<Oa.length;sa++){var rl=Oa[sa],el=rl[0],cl=rl[1];if(el in Se||cl in Se){Se.x=Se[el],Se.y=Se[cl];break}}h.options.targets.push(Se)}}var Cl=xi.set(s);return h.options=C,Cl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},at=Sr(Fn,"snapSize"),wi={aspectRatio:Yo,restrictEdges:Xo,restrict:Jo,restrictRect:Qo,restrictSize:ti,snapEdges:Sr({start:function(s){var t=s.edges;return t?(s.state.targetFields=s.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Fn.start(s)):null},set:Fn.set,defaults:j(Bl(Fn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:to,snapSize:at,spring:oi,avoid:oi,transform:oi,rubberband:oi},si={id:"modifiers",install:function(s){var t=s.interactStatic;for(var h in s.usePlugin(Re),s.usePlugin(Wo),t.modifiers=wi,wi){var k=wi[h],C=k._defaults,F=k._methods;C._methods=F,s.defaults.perAction[h]=C}}},lt=si,so=function(s){m(h,s);var t=A(h);function h(k,C,F,G,J,xe){var Ue;if(o(this,h),V(d(Ue=t.call(this,J)),F),F!==C&&V(d(Ue),C),Ue.timeStamp=xe,Ue.originalEvent=F,Ue.type=k,Ue.pointerId=Ve(C),Ue.pointerType=ja(C),Ue.target=G,Ue.currentTarget=null,k==="tap"){var Se=J.getPointerIndex(C);Ue.dt=Ue.timeStamp-J.pointers[Se].downTime;var sa=Ue.timeStamp-J.tapTime;Ue.double=!!J.prevTap&&J.prevTap.type!=="doubletap"&&J.prevTap.target===Ue.target&&sa<500}else k==="doubletap"&&(Ue.dt=C.timeStamp-J.tapTime,Ue.double=!0);return Ue}return c(h,[{key:"_subtractOrigin",value:function(k){var C=k.x,F=k.y;return this.pageX-=C,this.pageY-=F,this.clientX-=C,this.clientY-=F,this}},{key:"_addOrigin",value:function(k){var C=k.x,F=k.y;return this.pageX+=C,this.pageY+=F,this.clientX+=C,this.clientY+=F,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),h}(je),ci={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(s){s.pointerEvents=ci,s.defaults.actions.pointerEvents=ci.defaults,j(s.actions.phaselessTypes,ci.types)},listeners:{"interactions:new":function(s){var t=s.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(s){var t=s.down,h=s.pointerInfo;!t&&h.hold||(h.hold={duration:1/0,timeout:null})},"interactions:move":function(s,t){var h=s.interaction,k=s.pointer,C=s.event,F=s.eventTarget;s.duplicate||h.pointerIsDown&&!h.pointerWasMoved||(h.pointerIsDown&&Pi(s),Pn({interaction:h,pointer:k,event:C,eventTarget:F,type:"move"},t))},"interactions:down":function(s,t){(function(h,k){for(var C=h.interaction,F=h.pointer,G=h.event,J=h.eventTarget,xe=h.pointerIndex,Ue=C.pointers[xe].hold,Se=Ke(J),sa={interaction:C,pointer:F,event:G,eventTarget:J,type:"hold",targets:[],path:Se,node:null},Oa=0;Oa<Se.length;Oa++){var rl=Se[Oa];sa.node=rl,k.fire("pointerEvents:collect-targets",sa)}if(sa.targets.length){for(var el=1/0,cl=0,Cl=sa.targets;cl<Cl.length;cl++){var _l=Cl[cl].eventable.options.holdDuration;_l<el&&(el=_l)}Ue.duration=el,Ue.timeout=setTimeout(function(){Pn({interaction:C,eventTarget:J,pointer:F,event:G,type:"hold"},k)},el)}})(s,t),Pn(s,t)},"interactions:up":function(s,t){Pi(s),Pn(s,t),function(h,k){var C=h.interaction,F=h.pointer,G=h.event,J=h.eventTarget;C.pointerWasMoved||Pn({interaction:C,eventTarget:J,pointer:F,event:G,type:"tap"},k)}(s,t)},"interactions:cancel":function(s,t){Pi(s),Pn(s,t)}},PointerEvent:so,fire:Pn,collectEventTargets:co,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 Pn(s,t){var h=s.interaction,k=s.pointer,C=s.event,F=s.eventTarget,G=s.type,J=s.targets,xe=J===void 0?co(s,t):J,Ue=new so(G,k,C,F,h,t.now());t.fire("pointerEvents:new",{pointerEvent:Ue});for(var Se={interaction:h,pointer:k,event:C,eventTarget:F,targets:xe,type:G,pointerEvent:Ue},sa=0;sa<xe.length;sa++){var Oa=xe[sa];for(var rl in Oa.props||{})Ue[rl]=Oa.props[rl];var el=Ce(Oa.eventable,Oa.node);if(Ue._subtractOrigin(el),Ue.eventable=Oa.eventable,Ue.currentTarget=Oa.node,Oa.eventable.fire(Ue),Ue._addOrigin(el),Ue.immediatePropagationStopped||Ue.propagationStopped&&sa+1<xe.length&&xe[sa+1].node!==Ue.currentTarget)break}if(t.fire("pointerEvents:fired",Se),G==="tap"){var cl=Ue.double?Pn({interaction:h,pointer:k,event:C,eventTarget:F,type:"doubletap"},t):Ue;h.prevTap=cl,h.tapTime=cl.timeStamp}return Ue}function co(s,t){var h=s.interaction,k=s.pointer,C=s.event,F=s.eventTarget,G=s.type,J=h.getPointerIndex(k),xe=h.pointers[J];if(G==="tap"&&(h.pointerWasMoved||!xe||xe.downTarget!==F))return[];for(var Ue=Ke(F),Se={interaction:h,pointer:k,event:C,eventTarget:F,type:G,path:Ue,targets:[],node:null},sa=0;sa<Ue.length;sa++){var Oa=Ue[sa];Se.node=Oa,t.fire("pointerEvents:collect-targets",Se)}return G==="hold"&&(Se.targets=Se.targets.filter(function(rl){var el,cl;return rl.eventable.options.holdDuration===((el=h.pointers[J])==null||(cl=el.hold)==null?void 0:cl.duration)})),Se.targets}function Pi(s){var t=s.interaction,h=s.pointerIndex,k=t.pointers[h].hold;k&&k.timeout&&(clearTimeout(k.timeout),k.timeout=null)}var rt=Object.freeze({__proto__:null,default:ci});function nt(s){var t=s.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var uo={id:"pointer-events/holdRepeat",install:function(s){s.usePlugin(ci);var t=s.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=s.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(s,t){return s["pointerEvents:".concat(t)]=nt,s},{"pointerEvents:new":function(s){var t=s.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(s,t){var h=s.interaction,k=s.pointerEvent,C=s.eventTarget,F=s.targets;if(k.type==="hold"&&F.length){var G=F[0].eventable.options.holdRepeatInterval;G<=0||(h.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:h,eventTarget:C,type:"hold",pointer:k,event:k},t)},G))}}})},it=uo,ot={id:"pointer-events/interactableTargets",install:function(s){var t=s.Interactable;t.prototype.pointerEvents=function(k){return j(this.events.options,k),this};var h=t.prototype._backCompatOption;t.prototype._backCompatOption=function(k,C){var F=h.call(this,k,C);return F===this&&(this.events.options[k]=C),F}},listeners:{"pointerEvents:collect-targets":function(s,t){var h=s.targets,k=s.node,C=s.type,F=s.eventTarget;t.interactables.forEachMatch(k,function(G){var J=G.events,xe=J.options;J.types[C]&&J.types[C].length&&G.testIgnoreAllow(xe,k,F)&&h.push({node:k,eventable:J,props:{interactable:G}})})},"interactable:new":function(s){var t=s.interactable;t.events.getRect=function(h){return t.getRect(h)}},"interactable:set":function(s,t){var h=s.interactable,k=s.options;j(h.events.options,t.pointerEvents.defaults),j(h.events.options,k.pointerEvents||{})}}},tt=ot,st={id:"pointer-events",install:function(s){s.usePlugin(rt),s.usePlugin(it),s.usePlugin(tt)}},_i=st,ct={id:"reflow",install:function(s){var t=s.Interactable;s.actions.phases.reflow=!0,t.prototype.reflow=function(h){return function(k,C,F){for(var G=k.getAllElements(),J=F.window.Promise,xe=J?[]:null,Ue=function(){var sa=G[Se],Oa=k.getRect(sa);if(!Oa)return 1;var rl,el=ne(F.interactions.list,function(_l){return _l.interacting()&&_l.interactable===k&&_l.element===sa&&_l.prepared.name===C.name});if(el)el.move(),xe&&(rl=el._reflowPromise||new J(function(_l){el._reflowResolve=_l}));else{var cl=Me(Oa),Cl=function(_l){return{coords:_l,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:cl.x,y:cl.y},client:{x:cl.x,y:cl.y},timeStamp:F.now()});rl=function(_l,Vl,Ql,dr,ql){var nr=_l.interactions.new({pointerType:"reflow"}),pn={interaction:nr,event:ql,pointer:ql,eventTarget:Ql,phase:"reflow"};nr.interactable=Vl,nr.element=Ql,nr.prevEvent=ql,nr.updatePointer(ql,ql,Ql,!0),ce(nr.coords.delta),aa(nr.prepared,dr),nr._doPhase(pn);var Gl=_l.window,gn=Gl.Promise,Qr=gn?new gn(function(Ln){nr._reflowResolve=Ln}):void 0;return nr._reflowPromise=Qr,nr.start(dr,Vl,Ql),nr._interacting?(nr.move(pn),nr.end(ql)):(nr.stop(),nr._reflowResolve()),nr.removePointer(ql,ql),Qr}(F,k,sa,C,Cl)}xe&&xe.push(rl)},Se=0;Se<G.length&&!Ue();Se++);return xe&&J.all(xe).then(function(){return k})}(this,h,s)}},listeners:{"interactions:stop":function(s,t){var h=s.interaction;h.pointerType==="reflow"&&(h._reflowResolve&&h._reflowResolve(),function(k,C){k.splice(k.indexOf(C),1)}(t.interactions.list,h))}}},ut=ct;if(dn.use(ea),dn.use(rr),dn.use(_i),dn.use(Rr),dn.use(lt),dn.use(kl),dn.use(Hl),dn.use(hl),dn.use(ut),dn.default=dn,i(a)==="object"&&a)try{a.exports=dn}catch{}return dn.default=dn,dn})}(Gi,Gi.exports)),Gi.exports}var i1=n1();const qs=M.getDefaultExportFromCjs(i1),Lo=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:r}){const n=a,i=r,o=e.inject(iu),p=e.inject(ou);if(!o)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const c=e.shallowRef(null),u=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,g=!1,y=NaN,d=NaN,A=NaN,w=NaN,Y=-1,D=-1,P=-1,O=-1,E=n.x,S=n.y,x=n.w,b=n.h;const _=e.ref(),I=e.reactive({i:e.toRef(n,"i"),state:u,wrapper:_,calcXY:Oe});function R(he){Je(he)}function re(){Ea()}function X(he){Tn(n.isDraggable)&&(u.draggable=he)}function ye(he){Tn(n.isResizable)&&(u.resizable=he)}function fe(he){Tn(n.isBounded)&&(u.bounded=he)}function U(he){u.transformScale=he}function q(he){u.rowHeight=he}function Z(he){u.maxRows=he}function ae(){u.rtl=Hs()==="rtl",Ea()}function ve(he){u.cols=Math.floor(he)}o.increaseItem(I),e.onBeforeMount(()=>{u.rtl=Hs()==="rtl"}),e.onMounted(()=>{o.responsive&&o.lastBreakpoint?u.cols=du(o.lastBreakpoint,o.cols):u.cols=o.colNum,u.rowHeight=o.rowHeight,u.containerWidth=o.width!==null?o.width:100,u.margin=o.margin!==void 0?o.margin.map(Number):[10,10],u.maxRows=o.maxRows,Tn(n.isDraggable)?u.draggable=o.isDraggable:u.draggable=n.isDraggable,Tn(n.isResizable)?u.resizable=o.isResizable:u.resizable=n.isResizable,Tn(n.isBounded)?u.bounded=o.isBounded:u.bounded=n.isBounded,u.transformScale=o.transformScale,u.useCssTransforms=o.useCssTransforms,u.useStyleCursor=o.useStyleCursor,e.watchEffect(()=>{E=n.x,S=n.y,b=n.h,x=n.w,bn(we)}),p.on("updateWidth",R),p.on("compact",re),p.on("setDraggable",X),p.on("setResizable",ye),p.on("setBounded",fe),p.on("setTransformScale",U),p.on("setRowHeight",q),p.on("setMaxRows",Z),p.on("directionchange",ae),p.on("setColNum",ve)}),e.onBeforeUnmount(()=>{p.off("updateWidth",R),p.off("compact",re),p.off("setDraggable",X),p.off("setResizable",ye),p.off("setBounded",fe),p.off("setTransformScale",U),p.off("setRowHeight",q),p.off("setMaxRows",Z),p.off("directionchange",ae),p.off("setColNum",ve),c.value&&(c.value.unset(),c.value=null),o.decreaseItem(I)}),l({state:u,wrapper:_});const ze=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,te=e.computed(()=>u.resizable&&!n.static),N=e.computed(()=>o.isMirrored?!u.rtl:u.rtl),se=e.computed(()=>(u.draggable||u.resizable)&&!n.static),W=Jv("item"),ue=e.computed(()=>({[W.b()]:!0,[W.bm("resizable")]:te.value,[W.bm("static")]:n.static,[W.bm("resizing")]:u.isResizing,[W.bm("dragging")]:u.isDragging,[W.bm("transform")]:u.useCssTransforms,[W.bm("rtl")]:N.value,[W.bm("no-touch")]:ze&&se.value})),_e=e.computed(()=>[W.be("resizer"),N.value&&W.bem("resizer","rtl")].filter(Boolean));e.watch(()=>n.isDraggable,he=>{u.draggable=he}),e.watch(()=>n.static,()=>{bn(V),bn(ce)}),e.watch(()=>u.draggable,()=>{bn(V)}),e.watch(()=>n.isResizable,he=>{u.resizable=he}),e.watch(()=>n.isBounded,he=>{u.bounded=he}),e.watch(()=>u.resizable,()=>{bn(ce)}),e.watch(()=>u.rowHeight,()=>{bn(we),bn(Ke)}),e.watch([()=>u.cols,()=>u.containerWidth],()=>{bn(ce),bn(we),bn(Ke)}),e.watch([()=>n.minH,()=>n.maxH,()=>n.minW,()=>n.maxW],()=>{bn(ce)}),e.watch(N,()=>{bn(ce),bn(we)}),e.watch([()=>o.margin,()=>o.margin[0],()=>o.margin[1]],()=>{const he=o.margin;!he||he[0]===u.margin[0]&&he[1]===u.margin[1]||(u.margin=he.map(Number),bn(we),bn(Ke))});function we(){n.x+n.w>u.cols?(E=0,x=n.w>u.cols?u.cols:n.w):(E=n.x,x=n.w);const he=We(E,S,x,b);u.isDragging&&(he.top=u.dragging.top,N.value?he.right=u.dragging.left:he.left=u.dragging.left),u.isResizing&&(he.width=u.resizing.width,he.height=u.resizing.height);let ca;u.useCssTransforms?N.value?ca=Wv(he.top,he.right,he.width,he.height):ca=qv(he.top,he.left,he.width,he.height):N.value?ca=Gv(he.top,he.right,he.width,he.height):ca=Kv(he.top,he.left,he.width,he.height),u.style=ca}function Ke(){const he={};for(const ca of["width","height"]){const ia=u.style[ca].match(/^(\d+)px$/);if(!ia)return;he[ca]=ia[1]}i("container-resized",n.i,n.h,n.w,he.height,he.width)}function la(he){if(n.static)return;const ca=he.type;if(ca==="resizestart"&&u.isResizing||ca!=="resizestart"&&!u.isResizing)return;const ia=Ps(he);if(Tn(ia))return;const{x:Ve,y:ga}=ia,Ta={width:0,height:0};let De;switch(ca){case"resizestart":{ce(),Y=x,D=b,De=We(E,S,x,b),Ta.width=De.width,Ta.height=De.height,u.resizing=Ta,u.isResizing=!0;break}case"resizemove":{!he.edges.right&&!he.edges.left&&(A=Ve),!he.edges.top&&!he.edges.bottom&&(w=ga);const Fa=js(A,w,Ve,ga);N.value?Ta.width=u.resizing.width-Fa.deltaX/u.transformScale:Ta.width=u.resizing.width+Fa.deltaX/u.transformScale,Ta.height=u.resizing.height+Fa.deltaY/u.transformScale,u.resizing=Ta;break}case"resizeend":{De=We(E,S,x,b),Ta.width=De.width,Ta.height=De.height,u.resizing={width:-1,height:-1},u.isResizing=!1;break}}De=Ce(Ta.height,Ta.width),De.w<n.minW&&(De.w=n.minW),De.w>n.maxW&&(De.w=n.maxW),De.h<n.minH&&(De.h=n.minH),De.h>n.maxH&&(De.h=n.maxH),De.h<1&&(De.h=1),De.w<1&&(De.w=1),A=Ve,w=ga,(x!==De.w||b!==De.h)&&i("resize",n.i,De.h,De.w,Ta.height,Ta.width),he.type==="resizeend"&&(Y!==x||D!==b)&&i("resized",n.i,De.h,De.w,Ta.height,Ta.width),p.emit("resizeEvent",he.type,n.i,E,S,De.h,De.w)}function j(he){if(n.static||u.isResizing)return;const ca=he.type;if(ca==="dragstart"&&u.isDragging||ca!=="dragstart"&&!u.isDragging)return;const ia=Ps(he);if(Tn(ia))return;const{x:Ve,y:ga}=ia,Ta=he.target;if(!Ta.offsetParent)return;const De={top:0,left:0};switch(ca){case"dragstart":{P=E,O=S;const Na=Ta.offsetParent.getBoundingClientRect(),da=Ta.getBoundingClientRect(),ja=da.left/u.transformScale,ta=Na.left/u.transformScale,je=da.right/u.transformScale,ya=Na.right/u.transformScale,Ze=da.top/u.transformScale,Ae=Na.top/u.transformScale;N.value?De.left=(je-ya)*-1:De.left=ja-ta,De.top=Ze-Ae,u.dragging=De,u.isDragging=!0;break}case"dragmove":{const Na=js(y,d,Ve,ga);if(N.value?De.left=u.dragging.left-Na.deltaX/u.transformScale:De.left=u.dragging.left+Na.deltaX/u.transformScale,De.top=u.dragging.top+Na.deltaY/u.transformScale,u.bounded){const da=Ta.offsetParent.clientHeight-Me(n.h,u.rowHeight,u.margin[1]);De.top=de(De.top,0,da);const ja=Ie(),ta=u.containerWidth-Me(n.w,ja,u.margin[0]);De.left=de(De.left,0,ta)}u.dragging=De;break}case"dragend":{const Na=Ta.offsetParent.getBoundingClientRect(),da=Ta.getBoundingClientRect(),ja=da.left/u.transformScale,ta=Na.left/u.transformScale,je=da.right/u.transformScale,ya=Na.right/u.transformScale,Ze=da.top/u.transformScale,Ae=Na.top/u.transformScale;N.value?De.left=(je-ya)*-1:De.left=ja-ta,De.top=Ze-Ae,u.dragging={top:-1,left:-1},u.isDragging=!1;break}}let Fa;N.value,Fa=Oe(De.top,De.left),y=Ve,d=ga,(E!==Fa.x||S!==Fa.y)&&i("move",n.i,Fa.x,Fa.y),he.type==="dragend"&&(P!==E||O!==S)&&i("moved",n.i,Fa.x,Fa.y),p.emit("dragEvent",he.type,n.i,Fa.x,Fa.y,b,x)}function We(he,ca,ia,Ve){const ga=Ie();let Ta;return N.value?Ta={right:Math.round(ga*he+(he+1)*u.margin[0]),top:Math.round(u.rowHeight*ca+(ca+1)*u.margin[1]),width:ia===1/0?ia:Math.round(ga*ia+Math.max(0,ia-1)*u.margin[0]),height:Ve===1/0?Ve:Math.round(u.rowHeight*Ve+Math.max(0,Ve-1)*u.margin[1])}:Ta={left:Math.round(ga*he+(he+1)*u.margin[0]),top:Math.round(u.rowHeight*ca+(ca+1)*u.margin[1]),width:ia===1/0?ia:Math.round(ga*ia+Math.max(0,ia-1)*u.margin[0]),height:Ve===1/0?Ve:Math.round(u.rowHeight*Ve+Math.max(0,Ve-1)*u.margin[1])},Ta}function Oe(he,ca){const ia=Ie();let Ve=Math.round((ca-u.margin[0])/(ia+u.margin[0])),ga=Math.round((he-u.margin[1])/(u.rowHeight+u.margin[1]));return Ve=Math.max(Math.min(Ve,u.cols-x),0),ga=Math.max(Math.min(ga,u.maxRows-b),0),{x:Ve,y:ga}}function Ie(){return(u.containerWidth-u.margin[0]*(u.cols+1))/u.cols}function Me(he,ca,ia){return Number.isFinite(he)?Math.round(ca*he+Math.max(0,he-1)*ia):he}function de(he,ca,ia){return Math.max(Math.min(he,ia),ca)}function Ce(he,ca,ia=!1){const Ve=Ie();let ga=Math.round((ca+u.margin[0])/(Ve+u.margin[0])),Ta=0;return ia?Ta=Math.ceil((he+u.margin[1])/(u.rowHeight+u.margin[1])):Ta=Math.round((he+u.margin[1])/(u.rowHeight+u.margin[1])),ga=Math.max(Math.min(ga,u.cols-E),0),Ta=Math.max(Math.min(Ta,u.maxRows-S),0),{w:ga,h:Ta}}function Je(he,ca){u.containerWidth=he}function Ea(){we()}function Ge(){!c.value&&_.value&&(c.value=qs(_.value),u.useStyleCursor||c.value.styleCursor(!1))}const $=$s(j);function V(){if(Ge(),!!c.value)if(u.draggable&&!n.static){const he={ignoreFrom:n.dragIgnoreFrom,allowFrom:n.dragAllowFrom,...n.dragOption};c.value.draggable(he),m||(m=!0,c.value.on("dragstart dragmove dragend",ca=>{ca.type==="dragmove"?$(ca):j(ca)}))}else c.value.draggable({enabled:!1})}const ee=$s(la);function ce(){if(Ge(),!!c.value)if(u.resizable&&!n.static){const he=We(0,0,n.maxW,n.maxH),ca=We(0,0,n.minW,n.minH),ia={edges:{left:N.value?`.${_e.value[0]}`:!1,right:N.value?!1:`.${_e.value[0]}`,bottom:`.${_e.value[0]}`,top:!1},ignoreFrom:n.resizeIgnoreFrom,restrictSize:{min:{height:ca.height*u.transformScale,width:ca.width*u.transformScale},max:{height:he.height*u.transformScale,width:he.width*u.transformScale}},...n.resizeOption};n.preserveAspectRatio&&(ia.modifiers=[qs.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(ia),g||(g=!0,c.value.on("resizestart resizemove resizeend",Ve=>{Ve.type==="resizemove"?ee(Ve):la(Ve)}))}else c.value.resizable({enabled:!1})}return(he,ca)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:_,class:e.normalizeClass(ue.value),style:e.normalizeStyle(u.style)},[e.renderSlot(he.$slots,"default"),te.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(_e.value)},null,2)):e.createCommentVNode("",!0)],6))}}),yi=typeof window<"u";var Ws;yi&&(Ws=window==null?void 0:window.navigator)!=null&&Ws.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ks(a){return a!=null}function Gs(){}const o1=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(o1)));const s1=yi&&("ontouchstart"in window||u1()>0),c1=s1?"pointerdown":"click";function u1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function d1(a,l,r=window.Event){const{type:n,bubbles:i=!1,cancelable:o=!1,...p}=l;if(!Ks(n)||n==="")return!1;let c;return Ks(r)?c=new r(n,{bubbles:i,cancelable:o}):(c=document.createEvent("HTMLEvents"),c.initEvent(n,i,o)),Object.assign(c,p),a.dispatchEvent(c)}const p1="clickoutside",f1=new Set;yi&&document.addEventListener(c1,a=>{const l=a.target,r=a.composedPath&&a.composedPath();f1.forEach(n=>{n!==l&&(r?!r.includes(n):!n.contains(l))&&(!n.__transferElement||n.__transferElement!==l&&!n.__transferElement.contains(l))&&d1(n,{type:p1})})},!0);const h1=[["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 Eo;if(yi){for(const a of h1)if(a[1]in document){Eo=a;break}}e.computed(()=>!1);const v1=new Set,m1=new WeakMap;if(yi&&Eo){const a=Eo[2],l=Eo[4];document.addEventListener(l,()=>{if(v1.forEach(r=>{r.value=!1}),document[a]){const r=m1.get(document[a]);r&&(r.value=!0)}},!1)}const fu=new Map;fu.set("x",0);fu.set("y",0);var vi=[],y1=function(){return vi.some(function(a){return a.activeTargets.length>0})},g1=function(){return vi.some(function(a){return a.skippedTargets.length>0})},Ys="ResizeObserver loop completed with undelivered notifications.",b1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Ys}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Ys),window.dispatchEvent(a)},ao;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ao||(ao={}));var mi=function(a){return Object.freeze(a)},k1=function(){function a(l,r){this.inlineSize=l,this.blockSize=r,mi(this)}return a}(),hu=function(){function a(l,r,n,i){return this.x=l,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,mi(this)}return a.prototype.toJSON=function(){var l=this,r=l.x,n=l.y,i=l.top,o=l.right,p=l.bottom,c=l.left,u=l.width,m=l.height;return{x:r,y:n,top:i,right:o,bottom:p,left:c,width:u,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Ft=function(a){return a instanceof SVGElement&&"getBBox"in a},vu=function(a){if(Ft(a)){var l=a.getBBox(),r=l.width,n=l.height;return!r&&!n}var i=a,o=i.offsetWidth,p=i.offsetHeight;return!(o||p||a.getClientRects().length)},Js=function(a){var l;if(a instanceof Element)return!0;var r=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(r&&a instanceof r.Element)},x1=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},Zi=typeof window<"u"?window:{},xo=new WeakMap,Xs=/auto|scroll/,w1=/^tb|vertical/,_1=/msie|trident/i.test(Zi.navigator&&Zi.navigator.userAgent),Hn=function(a){return parseFloat(a||"0")},Ii=function(a,l,r){return a===void 0&&(a=0),l===void 0&&(l=0),r===void 0&&(r=!1),new k1((r?l:a)||0,(r?a:l)||0)},Zs=mi({devicePixelContentBoxSize:Ii(),borderBoxSize:Ii(),contentBoxSize:Ii(),contentRect:new hu(0,0,0,0)}),mu=function(a,l){if(l===void 0&&(l=!1),xo.has(a)&&!l)return xo.get(a);if(vu(a))return xo.set(a,Zs),Zs;var r=getComputedStyle(a),n=Ft(a)&&a.ownerSVGElement&&a.getBBox(),i=!_1&&r.boxSizing==="border-box",o=w1.test(r.writingMode||""),p=!n&&Xs.test(r.overflowY||""),c=!n&&Xs.test(r.overflowX||""),u=n?0:Hn(r.paddingTop),m=n?0:Hn(r.paddingRight),g=n?0:Hn(r.paddingBottom),y=n?0:Hn(r.paddingLeft),d=n?0:Hn(r.borderTopWidth),A=n?0:Hn(r.borderRightWidth),w=n?0:Hn(r.borderBottomWidth),Y=n?0:Hn(r.borderLeftWidth),D=y+m,P=u+g,O=Y+A,E=d+w,S=c?a.offsetHeight-E-a.clientHeight:0,x=p?a.offsetWidth-O-a.clientWidth:0,b=i?D+O:0,_=i?P+E:0,I=n?n.width:Hn(r.width)-b-x,R=n?n.height:Hn(r.height)-_-S,re=I+D+x+O,X=R+P+S+E,ye=mi({devicePixelContentBoxSize:Ii(Math.round(I*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:Ii(re,X,o),contentBoxSize:Ii(I,R,o),contentRect:new hu(y,u,I,R)});return xo.set(a,ye),ye},yu=function(a,l,r){var n=mu(a,r),i=n.borderBoxSize,o=n.contentBoxSize,p=n.devicePixelContentBoxSize;switch(l){case ao.DEVICE_PIXEL_CONTENT_BOX:return p;case ao.BORDER_BOX:return i;default:return o}},S1=function(){function a(l){var r=mu(l);this.target=l,this.contentRect=r.contentRect,this.borderBoxSize=mi([r.borderBoxSize]),this.contentBoxSize=mi([r.contentBoxSize]),this.devicePixelContentBoxSize=mi([r.devicePixelContentBoxSize])}return a}(),gu=function(a){if(vu(a))return 1/0;for(var l=0,r=a.parentNode;r;)l+=1,r=r.parentNode;return l},E1=function(){var a=1/0,l=[];vi.forEach(function(o){if(o.activeTargets.length!==0){var p=[];o.activeTargets.forEach(function(c){var u=new S1(c.target),m=gu(c.target);p.push(u),c.lastReportedSize=yu(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){o.callback.call(o.observer,p,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=l;r<n.length;r++){var i=n[r];i()}return a},Qs=function(a){vi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(r){r.isActive()&&(gu(r.target)>a?l.activeTargets.push(r):l.skippedTargets.push(r))})})},C1=function(){var a=0;for(Qs(a);y1();)a=E1(),Qs(a);return g1()&&b1(),a>0},kt,bu=[],D1=function(){return bu.splice(0).forEach(function(a){return a()})},T1=function(a){if(!kt){var l=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return D1()}).observe(r,n),kt=function(){r.textContent="".concat(l?l--:l++)}}bu.push(a),kt()},B1=function(a){T1(function(){requestAnimationFrame(a)})},Co=0,N1=function(){return!!Co},A1=250,z1={attributes:!0,characterData:!0,childList:!0,subtree:!0},ec=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ac=function(a){return a===void 0&&(a=0),Date.now()+a},xt=!1,M1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var r=this;if(l===void 0&&(l=A1),!xt){xt=!0;var n=ac(l);B1(function(){var i=!1;try{i=C1()}finally{if(xt=!1,l=n-ac(),!N1())return;i?r.run(1e3):l>0?r.run(l):r.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,r=function(){return l.observer&&l.observer.observe(document.body,z1)};document.body?r():Zi.addEventListener("DOMContentLoaded",r)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ec.forEach(function(r){return Zi.addEventListener(r,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),ec.forEach(function(r){return Zi.removeEventListener(r,l.listener,!0)}),this.stopped=!0)},a}(),Ot=new M1,lc=function(a){!Co&&a>0&&Ot.start(),Co+=a,!Co&&Ot.stop()},I1=function(a){return!Ft(a)&&!x1(a)&&getComputedStyle(a).display==="inline"},O1=function(){function a(l,r){this.target=l,this.observedBox=r||ao.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=yu(this.target,this.observedBox,!0);return I1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),L1=function(){function a(l,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=r}return a}(),wo=new WeakMap,rc=function(a,l){for(var r=0;r<a.length;r+=1)if(a[r].target===l)return r;return-1},_o=function(){function a(){}return a.connect=function(l,r){var n=new L1(l,r);wo.set(l,n)},a.observe=function(l,r,n){var i=wo.get(l),o=i.observationTargets.length===0;rc(i.observationTargets,r)<0&&(o&&vi.push(i),i.observationTargets.push(new O1(r,n&&n.box)),lc(1),Ot.schedule())},a.unobserve=function(l,r){var n=wo.get(l),i=rc(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&vi.splice(vi.indexOf(n),1),n.observationTargets.splice(i,1),lc(-1))},a.disconnect=function(l){var r=this,n=wo.get(l);n.observationTargets.slice().forEach(function(i){return r.unobserve(l,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},a}(),R1=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.");_o.connect(this,l)}return a.prototype.observe=function(l,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Js(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");_o.observe(this,l,r)},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(!Js(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");_o.unobserve(this,l)},a.prototype.disconnect=function(){_o.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Ro=new WeakMap;function $1(a){var l;for(let r=0,n=a.length;r<n;++r){const i=a[r],o=Ro.get(i.target);if(typeof o=="function"){const{inlineSize:p,blockSize:c}=((l=i.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:u,offsetHeight:m}=i.target;o(Object.assign(i,{offsetWidth:u,offsetHeight:m,width:p??u,height:c??m}))}}}const ku=new(yi&&window.ResizeObserver||R1)($1);function nc(a,l){Ro.set(a,l),ku.observe(a)}function ic(a){Ro.has(a)&&(ku.unobserve(a),Ro.delete(a))}function V1(a={}){let l=Gs;const r=e.watch(()=>e.unref(a.target),i=>{l(),!(!i||typeof a.onResize!="function")&&(nc(i,a.onResize),l=()=>{ic(i),l=Gs})},{immediate:!0}),n=()=>{r(),l()};return e.getCurrentScope()&&e.onScopeDispose(n),{observeResize:nc,unobserveResize:ic,unobserve:n}}const F1=e.ref(!1);e.computed(()=>F1.value);const oc="__theme_style__",wt="__theme_observer__",tc=e.reactive(new Map),sc=new Map;e.watch(tc,()=>{if(!yi)return;sc.clear();const a=document.head.querySelector(`#${oc}`);a&&document.head.removeChild(a);const l=document.createElement("style");let r=`.${wt} { width: 1px }`,n=1;for(const[i,[o,p]]of tc.entries())r+=` html.${o} .${wt}, .${p} .${wt} { width: ${++n}px }`,sc.set(n,i);l.textContent=r,l.id=oc,document.head.appendChild(l)});const xu=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:r}){const n=a,i=r,o=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),p=new Map,c=e.ref(n.layout),u=e.ref(),{observeResize:m,unobserveResize:g}=V1(),y=$v();y.on("resizeEvent",d),y.on("dragEvent",A),e.onBeforeMount(()=>{i("layout-before-mount",c.value)}),e.onMounted(()=>{i("layout-mounted",c.value),e.nextTick(()=>{Yv(c.value),o.originalLayout=c.value,e.nextTick(()=>{R(),u.value&&m(u.value,Vv(E,16)),Ai(c.value,n.verticalCompact),i("layout-updated",c.value),O(),E()})})}),e.onBeforeUnmount(()=>{y.clearAll(),u.value&&g(u.value)});function d(X,ye,fe,U,q,Z){_(X,ye,fe,U,q,Z)}function A(X,ye,fe,U,q,Z){b(X,ye,fe,U,q,Z)}e.watch(()=>o.width,(X,ye)=>{e.nextTick(()=>{y.emit("updateWidth",X),ye===-1&&e.nextTick(()=>{i("layout-ready",c.value)}),O()})}),e.watch(()=>[n.layout,n.layout.length],()=>{c.value=n.layout,P()}),e.watch(()=>n.colNum,X=>{y.emit("setColNum",X)}),e.watch(()=>n.rowHeight,X=>{y.emit("setRowHeight",X)}),e.watch(()=>n.isDraggable,X=>{y.emit("setDraggable",X)}),e.watch(()=>n.isResizable,X=>{y.emit("setResizable",X)}),e.watch(()=>n.isBounded,X=>{y.emit("setBounded",X)}),e.watch(()=>n.transformScale,X=>{y.emit("setTransformScale",X)}),e.watch(()=>n.responsive,X=>{X||(i("update:layout",o.originalLayout),y.emit("setColNum",n.colNum)),E()}),e.watch(()=>n.maxRows,X=>{y.emit("setMaxRows",X)}),e.watch([()=>n.margin,()=>n.margin[1]],O),e.provide(iu,e.reactive({...e.toRefs(n),...e.toRefs(o),increaseItem:w,decreaseItem:Y})),e.provide(ou,y),l({state:o,getItem:D,resizeEvent:_,dragEvent:b,layoutUpdate:P});function w(X){p.set(X.i,X)}function Y(X){p.delete(X.i)}function D(X){return p.get(X)}function P(){if(!Tn(c.value)&&!Tn(o.originalLayout)){if(c.value.length!==o.originalLayout.length){const X=re(c.value,o.originalLayout);if(X.length>0)if(c.value.length>o.originalLayout.length)o.originalLayout=o.originalLayout.concat(X);else{const ye=new Set(X.map(fe=>fe.i));o.originalLayout=o.originalLayout.filter(fe=>!ye.has(fe.i))}o.lastLayoutLength=c.value.length,R()}Ai(c.value,n.verticalCompact),y.emit("updateWidth",o.width),O(),i("layout-updated",c.value)}}function O(){o.mergedStyle={height:S()}}function E(){u.value&&(o.width=u.value.offsetWidth),y.emit("resizeEvent")}function S(){if(!n.autoSize)return;const X=parseFloat(n.margin[1]);return Pv(c.value)*(n.rowHeight+X)+X+"px"}let x;function b(X,ye,fe,U,q,Z){let ae=Vs(c.value,ye);Tn(ae)&&(ae={h:0,w:0,x:0,y:0,i:""}),X==="dragstart"&&!n.verticalCompact&&(x=c.value.reduce((ve,{i:ze,x:te,y:N})=>({...ve,[ze]:{x:te,y:N}}),{})),X==="dragmove"||X==="dragstart"?(o.placeholder.i=ye,o.placeholder.x=ae.x,o.placeholder.y=ae.y,o.placeholder.w=Z,o.placeholder.h=q,e.nextTick(()=>{o.isDragging=!0}),y.emit("updateWidth",o.width)):e.nextTick(()=>{o.isDragging=!1}),c.value=It(c.value,ae,fe,U,!0,n.preventCollision),n.restoreOnDrag?(ae.static=!0,Ai(c.value,n.verticalCompact,x),ae.static=!1):Ai(c.value,n.verticalCompact),y.emit("compact"),O(),X==="dragend"&&(x=void 0,i("layout-updated",c.value))}function _(X,ye,fe,U,q,Z){let ae=Vs(c.value,ye);Tn(ae)&&(ae={h:0,w:0,x:0,y:0,i:""});let ve;if(n.preventCollision){const ze=su(c.value,{...ae,w:Z,h:q}).filter(te=>te.i!==ae.i);if(ve=ze.length>0,ve){let te=1/0,N=1/0;ze.forEach(se=>{se.x>ae.x&&(te=Math.min(te,se.x)),se.y>ae.y&&(N=Math.min(N,se.y))}),Number.isFinite(te)&&(ae.w=te-ae.x),Number.isFinite(N)&&(ae.h=N-ae.y)}}ve||(ae.w=Z,ae.h=q),X==="resizestart"||X==="resizemove"?(o.placeholder.i=ye,o.placeholder.x=fe,o.placeholder.y=U,o.placeholder.w=ae.w,o.placeholder.h=ae.h,e.nextTick(()=>{o.isDragging=!0}),y.emit("updateWidth",o.width)):X&&e.nextTick(()=>{o.isDragging=!1}),n.responsive&&I(),Ai(c.value,n.verticalCompact),y.emit("compact"),O(),X==="resizeend"&&i("layout-updated",c.value)}function I(){const X=Qv(n.breakpoints,o.width);if(X===o.lastBreakpoint)return;const ye=du(X,n.cols);!Tn(o.lastBreakpoint)&&!o.layouts[o.lastBreakpoint]&&(o.layouts[o.lastBreakpoint]=Mt(c.value));const fe=e1(o.originalLayout,o.layouts,n.breakpoints,X,o.lastBreakpoint,ye,n.verticalCompact);o.layouts[X]=fe,o.lastBreakpoint!==X&&i("breakpoint-changed",X,fe),c.value=fe,i("update:layout",fe),o.lastBreakpoint=X,y.emit("setColNum",ye)}function R(){o.layouts=Object.assign({},n.responsiveLayouts)}function re(X,ye){const fe=new Set(ye.map(ae=>ae.i)),U=new Set(X.map(ae=>ae.i)),q=X.filter(ae=>!fe.has(ae.i)),Z=ye.filter(ae=>!U.has(ae.i));return q.concat(Z)}return(X,ye)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:u,class:"vgl-layout",style:e.normalizeStyle(o.mergedStyle)},[X.$slots.default?e.renderSlot(X.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,fe=>(e.openBlock(),e.createBlock(Lo,e.mergeProps({key:fe.i,ref_for:!0},fe),{default:e.withCtx(()=>[e.renderSlot(X.$slots,"item",{item:fe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Lo,{class:"vgl-item--placeholder",x:o.placeholder.x,y:o.placeholder.y,w:o.placeholder.w,h:o.placeholder.h,i:o.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,o.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 P1={key:0,class:"item-view-group"},j1={key:0,class:"item-view-group"},H1=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const r=M.useModelComp(M.pinia),{isEdit:n}=M.storeToRefs(r),i=ii(M.pinia),o=l,p=a,c=e.ref(""),u=e.computed(()=>p==null?void 0:p.children),m=e.computed(()=>{var O,E,S,x;return((O=p==null?void 0:p.children)==null?void 0:O.length)>0&&((E=p==null?void 0:p.children)!=null&&E.every(b=>b==null?void 0:b.layout))?(x=(S=p==null?void 0:p.children)==null?void 0:S[0])==null?void 0:x.layout:"vertical"}),g=O=>{c.value=O,o("radioChange",O)},y=e.computed(()=>{var O,E;return((E=(O=p==null?void 0:p.children)==null?void 0:O[0])==null?void 0:E.isGridLayout)||!1}),d=e.ref((p==null?void 0:p.level)+1),A=e.computed(()=>{if(!(p!=null&&p.children)||!Array.isArray(p.children)||p.children.length<2)return!1;const O=p.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),E=p.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return O&&E}),w=e.computed(()=>{var E,S,x,b,_,I;let O=(E=p==null?void 0:p.children)==null?void 0:E.filter(R=>R==null?void 0:R.choice);if(i.setSelectTab((S=O==null?void 0:O[0])==null?void 0:S.choiceName),(c==null?void 0:c.value)!=="")return(x=p==null?void 0:p.children)==null?void 0:x.filter(R=>!(R!=null&&R.choiceName)||(R==null?void 0:R.choiceName)===(c==null?void 0:c.value));{let R=(_=(b=p==null?void 0:p.children)==null?void 0:b.find(re=>re==null?void 0:re.choice))==null?void 0:_.choiceName;return(I=p==null?void 0:p.children)==null?void 0:I.filter(re=>!(re!=null&&re.choiceName)||(re==null?void 0:re.choiceName)===R)}}),Y=O=>{const E=(O==null?void 0:O.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(S=>{const x=typeof S=="string"?S:JSON.stringify(S);return x==null?void 0:x.includes("HideGroup=Yes")}))};e.watch(()=>p==null?void 0:p.children,()=>{A.value},{deep:!0});const D=O=>{o("rowClick",O)},P=(O,E)=>{o("routeUrl",O,E)};return(O,E)=>y.value?(e.openBlock(),e.createBlock(e.unref(xu),{key:0,layout:u.value,"onUpdate:layout":E[0]||(E[0]=S=>u.value=S),"is-draggable":e.unref(n)==="edit","is-resizable":e.unref(n)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(S,x)=>(e.openBlock(),e.createBlock(e.unref(Lo),{key:S.i,x:S.x,y:S.y,"min-h":S.minH,"max-h":S.maxH,"min-w":S.minW,w:S.w,h:S.h,i:S.i},{default:e.withCtx(()=>{var b,_,I,R,re,X,ye,fe,U,q,Z,ae,ve,ze;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:x===((b=p==null?void 0:p.children)==null?void 0:b.length)-1?"0px":"24px"})},[((I=(_=S==null?void 0:S.component)==null?void 0:_.comp)==null?void 0:I.toUpperCase())!=="TABLE"&&((R=S==null?void 0:S.component)!=null&&R.name)?(e.openBlock(),e.createElementBlock("div",P1,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(d.value.toString())-1)*12+"px",fontWeight:600-(d.value-1)*100>=400?600-(d.value-1)*100:400,fontSize:17-d.value>=14?17-d.value+"px":"14px"})},e.toDisplayString((re=S==null?void 0:S.component)==null?void 0:re.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)((X=S==null?void 0:S.component)==null?void 0:X.comp)),{pageLayout:m.value,config:{showIndex:(ye=e.unref(gr)[x])==null?void 0:ye.showIndex,allowMove:(fe=e.unref(gr)[x])==null?void 0:fe.allowMove,viewport:(U=e.unref(gr)[x])==null?void 0:U.viewport,status:(q=e.unref(gr)[x])==null?void 0:q.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:e.unref(Lc),itemData:(Z=S==null?void 0:S.component)==null?void 0:Z.compData,childItemData:(ae=S==null?void 0:S.component)==null?void 0:ae.itemChildData,key:e.unref(ni),cacheNewData:e.unref(Oc),onChange:e.unref(zo),index:(S==null?void 0:S.id)??x,onContentChange:e.unref(Mo),onPageChange:e.unref(Io),parentTableId:(ve=S==null?void 0:S.component)==null?void 0:ve.tableId,allMapContents:e.unref(Nt),children:(ze=S==null?void 0:S.component)==null?void 0:ze.children,level:d.value,onRowClick:D,onRouteUrl:P,onClickTrigger:e.unref(Rc),onClickMainKey:e.unref($c),onRadioChange:g},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(w.value,(S,x)=>{var b,_;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(S==null?void 0:S.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(x)===((b=p==null?void 0:p.children)==null?void 0:b.length)-1?"0px":"24px"})},[((_=S==null?void 0:S.comp)==null?void 0:_.toUpperCase())!=="TABLE"&&S.name?(e.openBlock(),e.createElementBlock("div",j1,[Y(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(d.value.toString())>1?"12px":"0px",fontWeight:600-(d.value-1)*100>=400?600-(d.value-1)*100:400,fontSize:17-d.value>=14?17-d.value+"px":"14px"})},e.toDisplayString(S.name),5))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(eo)(S.comp)),{compName:S.name,groupNames:S==null?void 0:S.nameContents,config:{showIndex:S==null?void 0:S.showIndex,allowMove:S==null?void 0:S.allowMove,viewport:S==null?void 0:S.viewport,status:S==null?void 0:S.status},itemData:S==null?void 0:S.compData,related:S==null?void 0:S.relatedTables,childItemData:S==null?void 0:S.itemChildData,key:e.unref(ni),onChange:e.unref(zo),index:(S==null?void 0:S.id)??x,onContentChange:e.unref(Mo),onPageChange:e.unref(Io),parentTableId:S==null?void 0:S.tableId,allMapContents:e.unref(Nt),children:S==null?void 0:S.children,level:d.value,onRowClick:D,onRouteUrl:P,onRadioChange:g},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),U1=sr._export_sfc(H1,[["__scopeId","data-v-bafbdd45"]]),q1={class:"radio-group-container"},W1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const r=a,n=l,i=e.ref(),o=ii(M.pinia),{selectTab:p}=M.storeToRefs(o);e.watch(()=>r==null?void 0:r.itemData,()=>{i.value=p.value},{immediate:!0,deep:!0});const c=u=>{i.value=u,n("radioChange",i.value)};return(u,m)=>(e.openBlock(),e.createElementBlock("div",q1,[e.createVNode(dl.ssRadio,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g),content:r==null?void 0:r.itemData,onChange:c},null,8,["modelValue","content"])]))}}),K1=sr._export_sfc(W1,[["__scopeId","data-v-177d64c3"]]),G1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,()=>{var n,i;r.value=((i=(n=l==null?void 0:l.itemData)==null?void 0:n.find(o=>(o==null?void 0:o.key)==="backGround"))==null?void 0:i.contents)??[]},{deep:!0,immediate:!0}),(n,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(dl.ssCarousel,{carouselList:r.value},null,8,["carouselList"])]))}}),wu=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"}]),Y1={TABLE:Kc,FORM:Os,STATICFORM:Gc,TABLEOPERATE:R6,TABLESTYLE:a4,TABLEEXTEND:r4,TABLEINTERACTION:o4,FORMOPERATE:Ls,FOLD:L4,CALCULATOR:j4,METHODBUTTON:q4,AVATARUPLOAD:hs.ssAvatar,SIGNATURE:hs.ssSignature,FORMTOP:Os,STEP:r2,STEPOPERATE:D4,TIMELINE:c2,TIMELINEOPERATE:M4,FORMTOPOPERATE:Ls,SIGNATUREOPERATE:e2,AVATARUPLOADOPERATE:G4,TABS:p2,TABSOPERATE:X2,CHART:pv,CHARTOPERATE:_v,LAYOUT:Cv,LAYOUTOPERATE:Ov,PARENTITEM:U1,RADIO:K1,CAROUSEL:G1};function Ri(a){return Y1[a==null?void 0:a.toUpperCase()]||null}exports.De=xu;exports.activeStepInfo=zi;exports.addContents=Qi;exports.addVisibleDialog=Vt;exports.affixItems=u3;exports.allMapContents=Nt;exports.analyzeMenu=hc;exports.cacheNewData=Oc;exports.clickMainKey=$c;exports.clickSavePage=c3;exports.clickStep=Fc;exports.clickTrigger=Rc;exports.compId=ni;exports.compNames=Lc;exports.compShow=Li;exports.existLayouts=g3;exports.fixChangeValue=$o;exports.generateLayouts=G6;exports.getComponent=Ri;exports.getComponents=eo;exports.getPageConstruct=vp;exports.getPageData=Hr;exports.getSliceContLength=S3;exports.gridRowHeight=j6;exports.gridRowHeightHmPg=Qc;exports.isStepLayout=Pc;exports.newGenerateLayouts=X6;exports.onBack=t3;exports.onButtonChange=h3;exports.onChange=zo;exports.onClick=s3;exports.onClickStep=b3;exports.onContentChange=Mo;exports.onExtendTaskEnd=y3;exports.onOk=v3;exports.onPageBack=x3;exports.onPageChange=Io;exports.onSelectFixContent=o3;exports.renderShowItems=Mc;exports.showItems=gr;exports.sliceTableLength=Ic;exports.slotContent=wu;exports.ssTable=Kc;exports.st=Lo;exports.stepItems=E3;exports.tabChange=k3;exports.toolBar=m3;exports.useFormComp=$t;exports.useModelLoader=n0;exports.verifyButton=w3;