ss-component-new 1.3.458 → 1.3.460

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 (43) hide show
  1. package/dist/{array-BG0Wa7PN.cjs → array-Bx7kWCmG.cjs} +1 -1
  2. package/dist/{array-Cp0F1m2y.js → array-CCXn4kXi.js} +2 -2
  3. package/dist/config.js +1 -0
  4. package/dist/{index-D9pzEo1k.cjs → index-9rDZUKZr.cjs} +1 -1
  5. package/dist/{index-B6n6cN8y.js → index-BVPERE53.js} +2 -2
  6. package/dist/{index-CPO7Q2Aq.js → index-BVu80UeY.js} +2 -2
  7. package/dist/{index-BUXULM4o.js → index-Bz4tHsqe.js} +3 -3
  8. package/dist/{index-Ba4FP0tW.cjs → index-CR_-CUVw.cjs} +1 -1
  9. package/dist/{index-fXWEVaA3.cjs → index-CZCVnc3s.cjs} +1 -1
  10. package/dist/{index-C0bySlGz.js → index-CgMgnpQh.js} +7 -7
  11. package/dist/{index-CSecYeNf.cjs → index-CkXt9YzE.cjs} +5 -5
  12. package/dist/{index-D7Z7ZOq1.cjs → index-Cpvf1mjT.cjs} +1 -1
  13. package/dist/{index-Bgc0u_It.js → index-Cv3_hjJV.js} +596 -594
  14. package/dist/{index-DLdZxFsL.cjs → index-D3qwmoSW.cjs} +1 -1
  15. package/dist/{index-DkBjYDzc.js → index-D6DTOKMm.js} +2 -2
  16. package/dist/{index-CeAsXEdb.cjs → index-DEboz2Jj.cjs} +1 -1
  17. package/dist/{index-Y3oOwH2I.cjs → index-DOiLgWNp.cjs} +1 -1
  18. package/dist/{index-D43VapJ8.js → index-D_Ap8Hpc.js} +1 -1
  19. package/dist/{index-mcDM4_PL.cjs → index-DcJSPUIZ.cjs} +1 -1
  20. package/dist/{index-BmNodtkL.cjs → index-Dr8WFyKW.cjs} +1 -1
  21. package/dist/{index-DfGg9CPQ.js → index-DsicAhsV.js} +1 -1
  22. package/dist/{index-C7j65dbl.cjs → index-XixVs6Zz.cjs} +1 -1
  23. package/dist/{index-CIx9YQo4.js → index-f6KoITSW.js} +1 -1
  24. package/dist/{index-D3zihirP.cjs → index-k--unvps.cjs} +1 -1
  25. package/dist/{index-CVuQiGB9.js → index-oygMZlZA.js} +1 -1
  26. package/dist/{index-4b768F9V.js → index-uqMk83aH.js} +1 -1
  27. package/dist/{index-BtTut0Di.js → index-zIIT5_Cc.js} +1 -1
  28. package/dist/{main-B6LBlYdq.cjs → main-CGJtW2wV.cjs} +1 -1
  29. package/dist/{main-Ce56c10J.js → main-Dqdms_Qp.js} +2 -2
  30. package/dist/ss-component.cjs +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-BK2mEttt.cjs → threeModel-KL1Nt2kb.cjs} +1 -1
  35. package/dist/{threeModel-DqSRqLYB.js → threeModel-eSAu_pek.js} +1 -1
  36. package/dist/{threeSceneView-Cor37Lkk.cjs → threeSceneView-FNjsWsw3.cjs} +1 -1
  37. package/dist/{threeSceneView-CVn9p6Zi.js → threeSceneView-eh3_cGC6.js} +3 -3
  38. package/dist/{threeSceneViewForCPMPIP-BGHjrad1.js → threeSceneViewForCPMPIP-C5VvgWDh.js} +1 -1
  39. package/dist/{threeSceneViewForCPMPIP-DErua_Oi.cjs → threeSceneViewForCPMPIP-K0KEWioK.cjs} +1 -1
  40. package/dist/{threeViewerHost-9AOhzrVB.js → threeViewerHost-B1j40Oe9.js} +1 -1
  41. package/dist/{threeViewerHost-Cy5kwHUR.cjs → threeViewerHost-C8NY-2-c.cjs} +1 -1
  42. package/package.json +1 -1
  43. package/public/config.js +1 -0
@@ -1,6 +1,6 @@
1
- "use strict";var Ku=Object.defineProperty;var Yu=(a,l,n)=>l in a?Ku(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var dn=(a,l,n)=>Yu(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),Ja=require("./request-Dl8yi2iS.cjs"),M=require("./index-Dom0zBom.cjs"),pl=require("./index-D9pzEo1k.cjs"),le=require("./index-BTEY8ajW.cjs"),nr=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.cjs"),Ir=require("./index-B-pflqKE.cjs"),Co=require("./threeViewerHost-Cy5kwHUR.cjs"),qr=require("./index-DmwxzDGW.cjs"),ds=require("./index-Ba4FP0tW.cjs"),oc=require("./index-mqL-OFAs.cjs");;/* empty css */const Do=require("./isString-CGrvcmBw.cjs"),ps=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),tc=require("./index-BVaHwt5f.cjs"),Ju=require("./index-BXHzLi8Y.cjs"),Hn=require("./MTLLoader-B5SKHnGa.cjs"),Xu=require("./URDFLoader-DrI0sVHT.cjs");var Zu="[object Boolean]";function sc(a){return a===!0||a===!1||Ja.isObjectLike(a)&&Ja.baseGetTag(a)==Zu}function Qu(a){return a===void 0}const ed=a=>a.match(/\((.*)\)/)[1],ad={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(a){const l=a,n=e.ref(null),r=e.ref(!1),i=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>i.value,()=>{e.nextTick(()=>{var o,f;(f=(o=n.value)==null?void 0:o.updatePopper)==null||f.call(o)})},{deep:!0,immediate:!0}),(o,f)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":f[0]||(f[0]=u=>r.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:n,"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"])}}},ld=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var u,m,g,w,d,N;const r=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(_=>((_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),_)),i=i==null?void 0:i.find(_=>(_==null?void 0:_[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=(w=(g=l==null?void 0:l.columnContent)==null?void 0:g.options)==null?void 0:w.findIndex(_=>(_==null?void 0:_.value)===r);o=i==null?void 0:i[o],o=le.analyzeSplitToContent(o,","),o=o==null?void 0:o.map(_=>((_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),_));let f=o==null?void 0:o.find(_=>_==null?void 0:_.includes("@TextBackRGBA"));f?f=le.rgbaToColor((d=f==null?void 0:f.split("="))==null?void 0:d[1]):f=void 0;let c=o==null?void 0:o.find(_=>_==null?void 0:_.includes("@TextRGBA"));return c?c=le.rgbaToColor((N=c==null?void 0:c.split("="))==null?void 0:N[1]):c=void 0,{backgroundColor:f,color:c}});return(r,i)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),rd=nr._export_sfc(ld,[["__scopeId","data-v-3290070b"]]);function nd(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const i=a.getContext("2d");if(!i)return;const{color:o="rgba(255, 235, 59, 0.3)",strokeWidth:f=2,fillOpacity:c=.2}=r,u=a.getBoundingClientRect(),m=l.getBoundingClientRect(),g=l.naturalWidth,w=l.naturalHeight,d=m.width/g,N=m.height/w,_=Math.min(d,N),J=g*_,A=w*_,F=(u.width-J)/2,L=(u.height-A)/2,E=n.map(([k,y])=>{const x=F+k*J,O=L+y*A;return{x,y:O}});i.clearRect(0,0,a.width,a.height),i.beginPath(),i.moveTo(E[0].x,E[0].y);for(let k=1;k<E.length;k++)i.lineTo(E[k].x,E[k].y);i.closePath();const S=o.replace(/[\d.]+\)$/,`${c})`);i.fillStyle=S,i.fill(),i.strokeStyle=o.replace(/[\d.]+\)$/,"1)"),i.lineWidth=f,i.stroke()}function Ti(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function fs(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const id={key:0,class:"ocr-img-preview-root"},od={class:"ocr-img-preview-window"},td={key:0,class:"img-preview-body"},sd={class:"img-preview-header"},cd={class:"img-header-left"},ud={class:"img-name"},dd={key:0,class:"img-header-right"},pd={class:"img-index"},fd={key:0,class:"img-thumb-list"},hd=["onClick"],vd={key:1,class:"thumb-placeholder"},md={class:"thumb-name"},yd={class:"img-preview-container"},gd={key:0,class:"img-placeholder"},bd={key:2,class:"img-placeholder"},kd={key:0},xd={key:1},wd={key:1,class:"img-placeholder"},_d=e.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(a,{emit:l}){const n=a,r=l,i=e.computed({get:()=>n.visible,set:B=>r("update:visible",B)});let o=!1,f="",c=0,u=0,m=0,g=0,w=0,d=0,N=null;const _=B=>{var q,ye;const oe=(ye=(q=B==null?void 0:B.target)==null?void 0:q.closest)==null?void 0:ye.call(q,".ocr-img-preview-window");return oe||document.querySelector(".ocr-img-preview-window")},J=B=>{if(!B||B==="none")return{tx:0,ty:0};let oe=B.match(/matrix\(([^)]+)\)/);if(oe){const q=oe[1].split(",").map(ye=>Number(ye.trim()));return{tx:(q==null?void 0:q[4])||0,ty:(q==null?void 0:q[5])||0}}if(oe=B.match(/matrix3d\(([^)]+)\)/),oe){const q=oe[1].split(",").map(ye=>Number(ye.trim()));return{tx:(q==null?void 0:q[12])||0,ty:(q==null?void 0:q[13])||0}}return oe=B.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),oe?{tx:Number(oe[1])||0,ty:Number(oe[2])||0}:{tx:0,ty:0}},A=(B,oe,q)=>{B.style.transform=`translate(${oe}px, ${q}px)`},F=B=>{const oe=_(B);if(!oe)return;o=!0,N=oe,f="move",c=B.clientX,u=B.clientY;const q=window.getComputedStyle(oe),{tx:ye,ty:Ke}=J(q.transform);w=ye,d=Ke,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},L=(B,oe)=>{const q=_(B);if(!q)return;o=!0,N=q,f=oe,c=B.clientX,u=B.clientY;const ye=q.getBoundingClientRect();m=ye.width,g=ye.height;const Ke=window.getComputedStyle(q),{tx:Ae,ty:Qe}=J(Ke.transform);w=Ae,d=Qe,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=B=>{if(!o||!N)return;const oe=B.clientX-c,q=B.clientY-u,ye=360,Ke=420;let Ae=m,Qe=g,Ea=w,ne=d;if(f==="move"){Ea=w+oe,ne=d+q,A(N,Ea,ne);return}if(f.includes("right")&&(Ae=Math.max(ye,m+oe)),f.includes("bottom")&&(Qe=Math.max(Ke,g+q)),f.includes("left")){const ua=m-oe;ua<ye?(Ae=ye,Ea=w+(m-ye)):(Ae=ua,Ea=w+oe)}if(f.includes("top")){const ua=g-q;ua<Ke?(Qe=Ke,ne=d+(g-Ke)):(Qe=ua,ne=d+q)}N.style.width=`${Ae}px`,N.style.height=`${Qe}px`,A(N,Ea,ne)},S=()=>{o=!1,f="",N=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)},k=e.ref([]),y=e.ref(!1);e.watch(()=>n.images,async B=>{if(!Array.isArray(B)||B.length===0){k.value=[];return}y.value=!0;const oe=[];for(const q of B)if(q.url&&!q.url.startsWith("blob:")&&!q.url.startsWith("http"))try{const ye=await Fl.downloadFile(q.url),Ke=URL.createObjectURL(ye);oe.push({...q,blobUrl:Ke})}catch(ye){console.error(`Failed to load image for preview: ${q.url}`,ye),oe.push({...q,blobUrl:""})}else oe.push({...q,blobUrl:q.url});k.value=oe,y.value=!1},{deep:!0,immediate:!0});const x=e.ref(0),O=e.ref(null),I=e.ref(null),W=e.computed(()=>k.value[x.value]||null),Y=()=>{if(!k.value.length){x.value=0;return}if(n.defaultImageName){const B=k.value.findIndex(oe=>(oe==null?void 0:oe.name)===n.defaultImageName);x.value=B>=0?B:0}else x.value=0},fe=B=>{if(!k.value.length)return;const oe=Math.max(0,Math.min(B,k.value.length-1));x.value=oe},de=()=>fe(x.value-1),j=()=>fe(x.value+1),U=B=>{if(!B)return;const oe=k.value.findIndex(q=>(q==null?void 0:q.name)===B);oe>=0&&(x.value=oe)},Z=()=>{if(!I.value)return;const B=I.value.parentElement;if(!B)return;const oe=B.getBoundingClientRect();I.value.width=oe.width,I.value.height=oe.height},ee=()=>{var ye,Ke;if(!I.value||!O.value||!n.focusedFieldName){I.value&&Ti(I.value);return}const B=(ye=O.value.$el)==null?void 0:ye.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{e.nextTick(()=>{ee()})};return}const oe=((Ke=W.value)==null?void 0:Ke.name)||"",q=fs(n.fieldMeta,n.focusedFieldName);if(!q){Ti(I.value);return}if(q.imageName!==oe){Ti(I.value);return}Z(),nd(I.value,B,q.bboxNorm)},ge=()=>{e.nextTick(()=>{Z(),ee()})};e.watch(()=>n.focusedFieldName,()=>{if(!i.value)return;const B=fs(n.fieldMeta,n.focusedFieldName);B!=null&&B.imageName&&U(B.imageName),e.nextTick(()=>{ee()})}),e.watch(()=>{var B;return(B=W.value)==null?void 0:B.name},()=>{i.value&&e.nextTick(()=>{I.value&&Ti(I.value),ee()})}),e.watch(()=>n.visible,B=>{B?(Y(),e.nextTick(()=>{Z(),ee()})):I.value&&Ti(I.value)}),e.watch(()=>n.defaultImageName,()=>{i.value&&Y()});let Ie=null;e.onMounted(()=>{var B;typeof ResizeObserver<"u"&&(Ie=new ResizeObserver(()=>{Z(),e.nextTick(()=>{ee()})}),(B=I.value)!=null&&B.parentElement&&Ie.observe(I.value.parentElement))}),e.onUnmounted(()=>{Ie&&(Ie.disconnect(),Ie=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const ue=()=>{I.value&&Ti(I.value),r("update:visible",!1),r("close")};return(B,oe)=>{var Qe,Ea;const q=e.resolveComponent("el-button"),ye=e.resolveComponent("el-image"),Ke=e.resolveComponent("Loading"),Ae=e.resolveComponent("el-icon");return i.value?(e.openBlock(),e.createElementBlock("div",id,[oe[12]||(oe[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",od,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(F,["stop"])},[oe[8]||(oe[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ue},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:oe[0]||(oe[0]=e.withModifiers(ne=>L(ne,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:oe[1]||(oe[1]=e.withModifiers(ne=>L(ne,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:oe[2]||(oe[2]=e.withModifiers(ne=>L(ne,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:oe[3]||(oe[3]=e.withModifiers(ne=>L(ne,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:oe[4]||(oe[4]=e.withModifiers(ne=>L(ne,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:oe[5]||(oe[5]=e.withModifiers(ne=>L(ne,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:oe[6]||(oe[6]=e.withModifiers(ne=>L(ne,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:oe[7]||(oe[7]=e.withModifiers(ne=>L(ne,"bottom-right"),["stop"]))},null,32),W.value?(e.openBlock(),e.createElementBlock("div",td,[e.createElementVNode("div",sd,[e.createElementVNode("div",cd,[e.createElementVNode("span",ud,e.toDisplayString(W.value.name?W.value.name+(W.value.url&&W.value.url.lastIndexOf(".")!==-1?W.value.url.substring(W.value.url.lastIndexOf(".")):""):""),1)]),k.value.length>1?(e.openBlock(),e.createElementBlock("div",dd,[e.createVNode(q,{size:"small",disabled:x.value===0,onClick:de},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",pd,e.toDisplayString(x.value+1)+" / "+e.toDisplayString(k.value.length),1),e.createVNode(q,{size:"small",disabled:x.value===k.value.length-1,onClick:j},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),k.value.length>1?(e.openBlock(),e.createElementBlock("div",fd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(ne,ua)=>(e.openBlock(),e.createElementBlock("div",{key:(ne.name||"")+"-"+ua,class:e.normalizeClass(["img-thumb-item",{active:ua===x.value}]),onClick:Pe=>fe(ua)},[ne!=null&&ne.blobUrl?(e.openBlock(),e.createBlock(ye,{key:0,src:ne.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ne.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",vd,"加载失败")),e.createElementVNode("div",md,e.toDisplayString(ne.name||"-"),1)],10,hd))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",yd,[y.value?(e.openBlock(),e.createElementBlock("div",gd,[e.createVNode(Ae,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Ke)]),_:1}),oe[11]||(oe[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(Qe=W.value)!=null&&Qe.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ye,{ref_key:"imageRef",ref:O,src:W.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[W.value.blobUrl],onLoad:ge},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:I,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",bd,[(Ea=W.value)!=null&&Ea.url?(e.openBlock(),e.createElementBlock("span",kd,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",xd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",wd,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),Sd=nr._export_sfc(_d,[["__scopeId","data-v-48a4ecb1"]]),Ed={class:"cert-preview-body"},Cd={key:0,class:"pdf-preview-container"},Dd={class:"thumbs"},Td=["onClick"],Bd={class:"thumb-img"},Nd=["src"],Ad={key:1,class:"thumb-loading"},zd={class:"thumb-title"},Md={class:"viewer"},Id={key:0,class:"viewer-img-wrap"},Od=["src"],Ld={key:1,class:"viewer-loading"},Rd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(""),o=e.ref(""),f=e.computed(()=>(n.versions||[]).find(_=>String(_.versionId)===String(i.value))),c=e.ref({}),u=e.ref(""),m=e.ref("证书附件.pdf"),g=()=>{try{Object.values(c.value||{}).forEach(_=>{_&&URL.revokeObjectURL(_)}),u.value&&URL.revokeObjectURL(u.value)}catch{}c.value={},u.value=""},w=async _=>{if(!_||_.fileType==="pdf")return;const J=Array.isArray(_.images)?_.images:[];for(const A of J){const F=A==null?void 0:A.url;if(!(!F||c.value[F]))try{const L=await M.platformDownloadFile({url:F}),E=URL.createObjectURL(L.data);c.value={...c.value,[F]:E}}catch{}}},d=async _=>{var A;if(!_||_.fileType!=="pdf"){u.value="";return}const J=_.sourceUrl||"";if(!J){u.value="";return}if(u.value){try{URL.revokeObjectURL(u.value)}catch{}u.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:J,versionId:_==null?void 0:_.versionId,certNo:_==null?void 0:_.certNo});const F=await M.platformDownloadFile({url:J});console.log("[CertificatePreview] PDF响应:",{url:J,status:F==null?void 0:F.status,size:(A=F==null?void 0:F.data)==null?void 0:A.size});const L=URL.createObjectURL(F.data);u.value=L;const E=_.certNo?String(_.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(F){console.error("[CertificatePreview] PDF加载失败:",{url:J,error:F}),u.value=""}};e.watch(()=>n.visible,async _=>{var A;if(!_){g();return}const J=(A=n.versions)==null?void 0:A[0];i.value=(J==null?void 0:J.versionId)||"",await w(J),await d(J)},{immediate:!0}),e.watch(()=>i.value,async()=>{var J,A;const _=f.value;if(!_){o.value="",u.value="";return}if(_.fileType==="pdf"){o.value="",await d(_);return}u.value="",o.value=((A=(J=_.images)==null?void 0:J[0])==null?void 0:A.url)||"",await w(_)},{immediate:!0});const N=()=>{r("update:visible",!1),g()};return e.onBeforeUnmount(()=>{g()}),(_,J)=>{const A=e.resolveComponent("el-empty"),F=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),S=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(S,{"model-value":_.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:N},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:N},{default:e.withCtx(()=>J[1]||(J[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[_.versions&&_.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:i.value,"onUpdate:modelValue":J[0]||(J[0]=k=>i.value=k),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.versions,k=>(e.openBlock(),e.createBlock(F,{key:k.versionId,name:k.versionId,label:k.label},{default:e.withCtx(()=>[e.createElementVNode("div",Ed,[k.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",Cd,[u.value?(e.openBlock(),e.createBlock(pl.SsFilePreview,{key:1,fileName:m.value,blobUrl:u.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(A,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Dd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.images||[],y=>(e.openBlock(),e.createElementBlock("div",{key:y.url,class:e.normalizeClass(["thumb",{active:y.url===o.value}]),onClick:x=>o.value=y.url},[e.createElementVNode("div",Bd,[c.value[y.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[y.url]},null,8,Nd)):(e.openBlock(),e.createElementBlock("div",Ad,"加载中"))]),e.createElementVNode("div",zd,e.toDisplayString(y.name),1)],10,Td))),128))]),e.createElementVNode("div",Md,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[o.value]?(e.openBlock(),e.createElementBlock("div",Id,[e.createElementVNode("img",{class:"viewer-img",src:c.value[o.value]},null,8,Od)])):(e.openBlock(),e.createElementBlock("div",Ld,"加载中"))],64)):(e.openBlock(),e.createBlock(A,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(A,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),$d=nr._export_sfc(Rd,[["__scopeId","data-v-220703c0"]]),Vd={class:"ocr-candidate-wrap"},Fd={class:"ocr-candidate-left"},Pd={key:1},jd={key:0},Hd={key:1},Ud={key:2},qd={key:3},Wd={key:0,class:"ocr-candidate-right"},Gd={class:"ocr-candidate-actions"},Kd={key:1},Yd={class:"dialog-footer"},Jd={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(a,{emit:l}){const n=(x=[])=>{const O=[],I=W=>{(W||[]).forEach(Y=>{if(!Y)return;const fe=Y.children||Y.childrens||Y.columns;Array.isArray(fe)&&fe.length>0?I(fe):O.push(Y)})};return I(x),O},r=a,i=l,o=e.computed(()=>{var x;return((x=d.value)==null?void 0:x.allowAdd)!==!1}),f=e.computed(()=>{var x;return((x=d.value)==null?void 0:x.allowReplace)!==!1}),c=x=>{if(!x)return[];if(Array.isArray(x))return x;if(typeof x=="string")try{const O=JSON.parse(x);return Array.isArray(O)?O:[]}catch{return[]}return[]},u=x=>{i("preview-file",x)},m=e.ref([]),g=e.ref(0),w=e.ref("");e.watch(()=>r.candidates,x=>{var O,I;m.value=(x||[]).map(W=>({...W,...(W==null?void 0:W.ocrRow)||{},selectedTargetId:(W==null?void 0:W.selectedTargetId)||"",__decision:W==null?void 0:W.__decision})),g.value=0,w.value=((I=(O=m.value)==null?void 0:O[0])==null?void 0:I.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,x=>{var O,I;x&&(g.value=0,w.value=((I=(O=m.value)==null?void 0:O[0])==null?void 0:I.selectedTargetId)||"")});const d=e.computed(()=>{var O;const x=Number(g.value||0);return((O=m.value||[])==null?void 0:O[x])||null}),N=e.computed(()=>(n(r.columns||[])||[]).filter(I=>I&&I.prop).filter(I=>I.type!=="operate"&&I.label!=="操作"&&I.prop!=="operate")),_=e.computed(()=>N.value.filter(x=>x.label!=="证书附件"&&x.prop!=="证书附件")),J=x=>{if(!x)return;const O=(m.value||[]).findIndex(I=>(I==null?void 0:I.idx)===(x==null?void 0:x.idx));O>-1&&(g.value=O,w.value=(x==null?void 0:x.selectedTargetId)||"")},A=x=>{if(!x){w.value="";return}w.value=String((x==null?void 0:x.id)??"")},F=(x,O="")=>{const I=Number(g.value||0),W=m.value||[],Y=W[I];Y&&(Y.__decision=x,Y.selectedTargetId=O,w.value=O,m.value=[...W])},L=()=>F("skip",""),E=()=>F("add",""),S=()=>{if(!w.value){Ja.ElMessage.warning("请先选择要替换的目标记录");return}F("replace",w.value)},k=()=>{i("update:visible",!1)},y=()=>{const x=m.value||[];if(x.find(I=>(I==null?void 0:I.__decision)==="replace"&&!(I!=null&&I.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}i("submit",x),i("update:visible",!1)};return(x,O)=>{const I=e.resolveComponent("el-table-column"),W=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-table"),fe=e.resolveComponent("el-button"),de=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Ir.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:k},{default:e.withCtx(()=>{var j,U;return[e.createElementVNode("div",Vd,[e.createElementVNode("div",Fd,[O[0]||(O[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Y,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:J},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,Z=>(e.openBlock(),e.createBlock(I,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ee})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ee==null?void 0:ee[Z.prop]).length>0?(e.openBlock(),e.createBlock(W,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ge=>u({row:ee,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Pd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ee==null?void 0:ee[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(I,{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(I,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",jd,"替换")):(Z==null?void 0:Z.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Hd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Ud,"跳过")):(e.openBlock(),e.createElementBlock("span",qd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Wd,[O[4]||(O[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Gd,[e.createVNode(fe,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>O[1]||(O[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(fe,{id:"themeBorderButton",onClick:E,disabled:!o.value},{default:e.withCtx(()=>O[2]||(O[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(fe,{class:"ok-button",id:"themeButton",onClick:S,disabled:!f.value||!w.value},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((j=d.value)==null?void 0:j.candidates)||[]).length===0?(e.openBlock(),e.createBlock(de,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Y,{data:((U=d.value)==null?void 0:U.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:A,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Z=>(e.openBlock(),e.createBlock(I,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ee})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ee==null?void 0:ee[Z.prop]).length>0?(e.openBlock(),e.createBlock(W,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ge=>u({row:ee,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Kd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ee==null?void 0:ee[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Yd,[e.createVNode(fe,{id:"themeBorderButton",onClick:k},{default:e.withCtx(()=>O[5]||(O[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(fe,{class:"ok-button",id:"themeButton",onClick:y},{default:e.withCtx(()=>O[6]||(O[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Xd=nr._export_sfc(Jd,[["__scopeId","data-v-89e0489c"]]),Zd={class:"ocr-preview-content"},Qd={class:"ocr-preview-tip"},ep={class:"ocr-preview-table"},ap={style:{display:"flex","align-items":"center",gap:"8px"}},lp={class:"dialog-footer"},rp={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),o=e.ref([]),f=e.ref([]);e.watch(()=>n.visible,N=>{N&&(i.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),o.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),f.value=[...n.ocrSelectedFields])});const c=(N,_)=>{const J=[...f.value];if(_)J.includes(N)||J.push(N);else{const A=J.indexOf(N);A>-1&&J.splice(A,1)}f.value=J,r("update:ocrSelectedFields",J)},u=(N,_,J)=>{r("fieldChange",{rowIndex:N,prop:_,value:J})},m=()=>{r("update:ocrPreviewData",i.value),r("confirm",i.value),r("update:visible",!1)},g=()=>{r("update:visible",!1)},w=N=>typeof N!="number"?"-":`${(N*100).toFixed(1)}%`,d=N=>typeof N!="number"?"#606266":N>=.9?"#67c23a":N>=.7?"#e6a23c":"#f56c6c";return(N,_)=>{const J=e.resolveComponent("el-alert"),A=e.resolveComponent("el-table-column"),F=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),S=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Ir.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:g,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Zd,[e.createElementVNode("div",Qd,[e.createVNode(J,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",ep,[e.createVNode(E,{data:i.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(A,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,k=>(e.openBlock(),e.createBlock(A,{key:k.prop,prop:k.prop,"min-width":k.minWidth||230,"class-name":k.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",ap,[k.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:0,"model-value":f.value.includes(k.prop),onChange:y=>c(k.prop,y),onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(k.label),1)])]),default:e.withCtx(({row:y,$index:x})=>[k.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:d(y[k.prop]),fontWeight:500})},e.toDisplayString(w(y[k.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:y[k.prop],"onUpdate:modelValue":O=>y[k.prop]=O,size:"small",placeholder:"请输入"+k.label,onChange:O=>u(x,k.prop,O)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",lp,[e.createVNode(S,{onClick:g,id:"themeBorderButton"},{default:e.withCtx(()=>_[1]||(_[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(S,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>_[2]||(_[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},np=nr._export_sfc(rp,[["__scopeId","data-v-df66eb1f"]]),Zn=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=le.analyzeSplitToContent(l,","))==null?void 0:r.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 n=n==null?void 0:n.join(","),n};function cc(a){return Ja.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function ip(a){return Ja.axios.get(a,{responseType:"blob"})}let lr="$R",op="http://222.92.178.198:55002/AIRobot",vt=["Form","BarChart","FormText","FormBlock"];const uc=a=>{var n,r;let l=(r=le.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=le.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(vt!=null&&vt.some(i=>l==null?void 0:l.includes(i)))},tp=async(a,l,n,r)=>{var o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe;let i=a;if(uc(i==null?void 0:i[0])){let Re=hp(i),Le=(o=Re==null?void 0:Re.filter)==null?void 0:o.join(","),se=[];(f=Re==null?void 0:Re.hideContents)==null||f.forEach(ka=>{if(ka){const _a=ka;_a&&se.push(`(HideGroup=Yes, prop=${_a})`)}});let me=(c=Re==null?void 0:Re.formContents)==null?void 0:c.filter(ka=>{var _a;return(_a=ka==null?void 0:ka.filters)==null?void 0:_a.includes("@ShowHide=Hide")});(me==null?void 0:me.length)>0&&(me==null||me.forEach(ka=>{if(ka){const _a=ka==null?void 0:ka.prop;_a&&se.push(`(Hide=Yes, prop=${_a})`)}}));let qe=(r==null?void 0:r.menuFilter)??[];return Array.isArray(qe)||(qe=qe?[qe]:[]),qe=[...qe,...se],Le===""&&((u=Re==null?void 0:Re.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Re==null?void 0:Re.groupName,value:Re==null?void 0:Re.formContents,contents:Array.isArray((m=Re==null?void 0:Re.contents)==null?void 0:m[0])&&((w=(g=Re==null?void 0:Re.contents)==null?void 0:g[0])!=null&&w.every(ka=>Array.isArray(ka)))?[(N=(d=Re==null?void 0:Re.contents)==null?void 0:d[0])==null?void 0:N[n]]:[Re==null?void 0:Re.contents],filter:"("+Le+")",menuFilter:qe,groupFilter:Re==null?void 0:Re.groupFilters}}else if(((_=i==null?void 0:i[0])==null?void 0:_[0])!=="&"){let Re=fc(i,r),Le="";(J=Re==null?void 0:Re.tableFilter)!=null&&J.includes(lr)?Re.tableFilter=(A=Re==null?void 0:Re.tableFilter)==null?void 0:A.replace(lr,""):Le=(E=(L=(F=Re==null?void 0:Re.tableFilter)==null?void 0:F.replace("(",lr))==null?void 0:L.split(lr))==null?void 0:E[0];let se=[];Re!=null&&Re.tableFilter&&((S=le.analyzeSplitToContent(Re==null?void 0:Re.tableFilter,","))==null||S.forEach(qe=>{qe!=null&&qe.includes("@ShowHide=Hide")&&se.push("HideGroup=Yes")}));let me=(r==null?void 0:r.menuFilter)??[];return Array.isArray(me)||(me=me?[me]:[]),me=[...me,...se],{key:"Table",name:Re==null?void 0:Re.groupName,tableColumns:Re==null?void 0:Re.tableColumns,assistColumn:Re==null?void 0:Re.columns,tableContents:l===1?Re==null?void 0:Re.tableContents:(y=(k=Re==null?void 0:Re.tableContents)==null?void 0:k[n])!=null&&y.every(qe=>Array.isArray(qe))?(x=Re==null?void 0:Re.tableContents)==null?void 0:x[n]:[(O=Re==null?void 0:Re.tableContents)==null?void 0:O[n]],filter:Re==null?void 0:Re.tableFilter,menuFilter:me,quotePage:Le!==""?((Y=(W=(I=Le==null?void 0:Le.replace("*",lr))==null?void 0:I.split(lr))==null?void 0:W[0])==null?void 0:Y.replaceAll(":","/"))??"":void 0,quoteGroup:Le!==""?((ge=(ee=(Z=(U=(j=(de=(fe=Le==null?void 0:Le.replace("*",lr))==null?void 0:fe.split(lr))==null?void 0:de[1])==null?void 0:j.replace("{",lr))==null?void 0:U.split(lr))==null?void 0:Z[0])==null?void 0:ee.split(":"))==null?void 0:ge.filter(qe=>qe!==""))??[]:[],relatedQuotes:Re==null?void 0:Re.relatedQuotes,fatherSyncContents:Re==null?void 0:Re.fatherSyncContents,sonSyncContents:Re==null?void 0:Re.sonSyncContents,calculatorFilters:(Re==null?void 0:Re.calculatorFilters)??[]}}else{let Re=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Le=i==null?void 0:i[0];Le=Le==null?void 0:Le.slice(1,Le==null?void 0:Le.length),Le=le.analyzeSplitToContent(Le,":"),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1];let se=[];se.push("1");let me=Le==null?void 0:Le.replace("(",lr);me=(Ie=me==null?void 0:me.split(lr))==null?void 0:Ie[0],se.push(me);let qe=Le==null?void 0:Le.replace("(",lr);if(qe=(ue=qe==null?void 0:qe.split(lr))==null?void 0:ue[1],qe=(oe=(B=qe==null?void 0:qe.replace(")",lr))==null?void 0:B.split(lr))==null?void 0:oe[0],(ye=(q=qe==null?void 0:qe.replace(",",lr))==null?void 0:q.split(lr))==null||ye.forEach(ka=>{se.push(ka)}),se.push(""),se.push(""),(Ke=se==null?void 0:se[2])!=null&&Ke.includes(".xlsx")||(Ae=se==null?void 0:se[2])!=null&&Ae.includes(".xls"))try{let ka=op+"/"+(se==null?void 0:se[2]),_a=await ip(ka),H=`生成js函数名称为${se==null?void 0:se[1]}的函数,规则为:`+(se==null?void 0:se[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((_a==null?void 0:_a.status)===200){let V=_a==null?void 0:_a.data;const ae=new FormData;ae.append("file",V,se==null?void 0:se[2]),ae.append("query",H);let pe=await cc(ae);pe=(ne=(Ea=(Qe=pe==null?void 0:pe.data)==null?void 0:Qe.data)==null?void 0:Ea.response)==null?void 0:ne.replace("generateResult",se==null?void 0:se[1]),se[se.length-2]=pe,se[se.length-1]=[{name:(Pe=(ua=se==null?void 0:se[2])==null?void 0:ua.split("."))==null?void 0:Pe[0],url:ka}]}}catch{}return se=[se],{key:"Method",name:[],tableContents:se,tableColumns:Re}}},sp=(a,l)=>{var r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le;let n=(i=(r=le.analyzeSplitToContent(a,"="))==null?void 0:r.filter(se=>se!=="="))==null?void 0:i.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));if(uc(n==null?void 0:n[1])){let se=fp(n),me=(c=(f=(o=se==null?void 0:se.filter)==null?void 0:o.replace("@",lr))==null?void 0:f.split(lr))==null?void 0:c[0],qe=(g=(m=(u=se==null?void 0:se.filter)==null?void 0:u.replace("(",lr))==null?void 0:m.split(lr))==null?void 0:g[1],ka=(N=(d=(w=se==null?void 0:se.filter)==null?void 0:w.replace("(",lr))==null?void 0:d.split(lr))==null?void 0:N[0];ka="@"+((_=ka==null?void 0:ka.split("@"))==null?void 0:_[1]),qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1),qe=(A=(J=le.analyzeSplitToContent(qe,","))==null?void 0:J.map(H=>(H=ka+H,H)))==null?void 0:A.join("");let _a=me+"("+qe+")";return{key:"Form",name:se==null?void 0:se.group,filter:_a,formPage:((E=(L=(F=me==null?void 0:me.replace("*",lr))==null?void 0:F.split(lr))==null?void 0:L[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((W=(I=(O=(x=(y=(k=(S=me==null?void 0:me.replace("*",lr))==null?void 0:S.split(lr))==null?void 0:k[1])==null?void 0:y.replace("{",lr))==null?void 0:x.split(lr))==null?void 0:O[0])==null?void 0:I.split(":"))==null?void 0:W.filter(H=>H!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let se=n==null?void 0:n.filter((ae,pe)=>pe!==0);se=se==null?void 0:se.join("");let me=fc(n,l,se),qe="";(Y=me==null?void 0:me.tableFilter)!=null&&Y.includes(lr)?me.tableFilter=(fe=me==null?void 0:me.tableFilter)==null?void 0:fe.replace(lr,""):qe=(U=(j=(de=me==null?void 0:me.tableFilter)==null?void 0:de.replace("(",lr))==null?void 0:j.split(lr))==null?void 0:U[0];let ka=(ge=(ee=(Z=me==null?void 0:me.tableFilter)==null?void 0:Z.replace("(",lr))==null?void 0:ee.split(lr))==null?void 0:ge[0];ka=[{menus:(ue=(Ie=ka==null?void 0:ka.split("*"))==null?void 0:Ie[0])==null?void 0:ue.replaceAll(":","/"),groups:((oe=(B=ka==null?void 0:ka.split("*"))==null?void 0:B[1])==null?void 0:oe.split(":"))??[]}];let _a=(Ke=(ye=(q=me==null?void 0:me.tableFilter)==null?void 0:q.replace("(",lr))==null?void 0:ye.split(lr))==null?void 0:Ke[1];(_a==null?void 0:_a[(_a==null?void 0:_a.length)-1])===")"&&(_a=_a==null?void 0:_a.slice(0,(_a==null?void 0:_a.length)-1));let H=[];me!=null&&me.tableFilter&&((Ae=le.analyzeSplitToContent(me==null?void 0:me.tableFilter,","))==null||Ae.forEach(ae=>{ae!=null&&ae.includes("@ShowHide=Hide")&&H.push("HideGroup=Yes")}));let V=(l==null?void 0:l.menuFilter)??[];return Array.isArray(V)||(V=V?[V]:[]),V=[...V,...H],{key:"Table",name:me==null?void 0:me.groupName,filter:me==null?void 0:me.tableFilter,tableColumns:me==null?void 0:me.tableColumns,tableContents:me==null?void 0:me.tableContents,quotePage:qe!==""?((ne=(Ea=(Qe=qe==null?void 0:qe.replace("*",lr))==null?void 0:Qe.split(lr))==null?void 0:Ea[0])==null?void 0:ne.replaceAll(":","/"))??"":void 0,quoteGroup:qe!==""?((Le=(Re=(Pe=(ua=qe==null?void 0:qe.replace("*",lr))==null?void 0:ua.split(lr))==null?void 0:Pe[1])==null?void 0:Re.split(":"))==null?void 0:Le.filter(ae=>ae!==""))??[]:[],menuFilter:V,relatedQuotes:ka,fatherSyncContents:(me==null?void 0:me.fatherSyncContents)??[],sonSyncContents:(me==null?void 0:me.sonSyncContents)??[],calculatorFilters:(me==null?void 0:me.calculatorFilters)??[]}}},cp=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(i,o)=>{let f=[];i=i==null?void 0:i.map(async c=>{var u,m;if(f.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 tp(le.analyzeSplitToContent(a,"="),r,o,c);g&&f.push(g)}}else f.push(sp(a,c))}),await Promise.all(i),n.push(f)}),await Promise.all(l),n};let Wi="/",up="$",En="$R";const dc=a=>{var n,r,i;let l="";if((a==null?void 0:a.length)>1){let o=a==null?void 0:a.filter((f,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=(n=o==null?void 0:o.filter((f,c)=>c!==(o==null?void 0:o.length)-1))==null?void 0:n.join(""):o=o==null?void 0:o[0],l="("+o,((i=a==null?void 0:a[0])==null?void 0:i[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},pc=(a,l=[])=>{let n=(a==null?void 0:a.map(o=>{var f,c;return(c=o==null?void 0:o.key)==null?void 0:c.slice(1,(f=o==null?void 0:o.key)==null?void 0:f.length)}))??[],r=[];n==null||n.forEach(o=>{var f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe;if(o===""&&(o="算法库:通用算法"),o!=null&&o.includes(up)){let de="",j=!0,U=le.analyzerSplitToWord(o,"(");(U==null?void 0:U.length)>1&&(de="("+((f=le.analyzerSplitToWord(U==null?void 0:U[1],")"))==null?void 0:f[0]),((u=U==null?void 0:U[0])==null?void 0:u[((c=U==null?void 0:U[0])==null?void 0:c.length)-2])==="@"&&(de="@"+de));let Z=o;Z=Z==null?void 0:Z.replace(de,""),de=vn(de),de=(m=le.analyzeSplitToContent(de,","))==null?void 0:m.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe)),de!=null&&de.includes("@ShowHide=Hide")&&(j=!1);let ee=(g=Z==null?void 0:Z.replace("$",En))==null?void 0:g.split(En),ge=ee==null?void 0:ee[1],Ie=ee==null?void 0:ee[0];Ie!=null&&Ie.includes("[")&&(Ie=(d=(w=Ie==null?void 0:Ie.replace("[",En))==null?void 0:w.split(En))==null?void 0:d[0],ge=ge+":["+((J=(_=(N=ee==null?void 0:ee[0])==null?void 0:N.replace("[",En))==null?void 0:_.split(En))==null?void 0:J[1])),Ie=(F=(A=Ie==null?void 0:Ie.replaceAll(":","/"))==null?void 0:A.replaceAll("{",""))==null?void 0:F.replaceAll("}",""),(Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])!=="/"&&(Ie=Ie+"/"),ge=((L=Ie==null?void 0:Ie.split("/"))==null?void 0:L[0])+":"+ge;let B="";if(!(ge!=null&&ge.includes("[")))B=ge==null?void 0:ge.replaceAll(":","/"),r==null||r.push({path:B,isShow:j,filter:de,fatherPath:Ie});else{let oe=(S=(E=ge==null?void 0:ge.replace("[",En))==null?void 0:E.split(En))==null?void 0:S[1];oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1),oe=(k=le.analyzeSplitToContent(oe,","))==null?void 0:k.map(q=>((q==null?void 0:q[(q==null?void 0:q.length)-1])===","&&(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1)),q)),oe==null||oe.forEach(q=>{var ye,Ke;B=((Ke=(ye=ge==null?void 0:ge.replace("[",En))==null?void 0:ye.split(En))==null?void 0:Ke[0])+q,B=B==null?void 0:B.replaceAll(":","/"),r==null||r.push({path:B,isShow:j,filter:de,fatherPath:Ie})})}}else{let de="",j=!0,U=le.analyzerSplitToWord(o,"(");(U==null?void 0:U.length)>1&&(de=(y=dc(U))==null?void 0:y.filter);let Z=o;if(Z=Z==null?void 0:Z.replace(de,""),(de==null?void 0:de[0])==="("){de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1);let ge=[];(x=le.analyzeSplitToContent(de,","))==null||x.forEach(Ie=>{(Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])===","&&(Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1)),(Ie==null?void 0:Ie[0])==="("&&(Ie=Ie==null?void 0:Ie.slice(1,(Ie==null?void 0:Ie.length)-1)),(Ie==null?void 0:Ie[0])!=="@"&&(Ie="@"+Ie),ge.push(vn(Ie))}),de=ge==null?void 0:ge.join(",")}else de=vn(de);de=(O=le.analyzeSplitToContent(de,","))==null?void 0:O.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)),de!=null&&de.includes("@ShowHide=Hide")&&(j=!1),(Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])==="}"&&(Z=Z+":"),Z=(I=Z==null?void 0:Z.replaceAll("{",""))==null?void 0:I.replaceAll("}","");let ee="";if(Z!=null&&Z.includes("[")){let ge=(W=Z==null?void 0:Z.replace("[",En))==null?void 0:W.split(En),Ie=ge==null?void 0:ge[1];Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1),(fe=(Y=le.analyzeSplitToContent(Ie,","))==null?void 0:Y.map(ue=>((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)))==null||fe.forEach(ue=>{ee=(ge==null?void 0:ge[0])+ue,ee=ee==null?void 0:ee.replaceAll(":","/"),r==null||r.push({path:ee,isShow:j,filter:de})})}else ee=Z==null?void 0:Z.replaceAll(":","/"),r==null||r.push({path:ee,isShow:j,filter:de})}});let i=M.cloneDeep(r);return(l==null?void 0:l.length)>0&&(i=l),i=i==null?void 0:i.filter(o=>{var f,c,u,m;return!(o!=null&&o.fatherPath)&&((c=(f=o==null?void 0:o.path)==null?void 0:f.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 f;return o.path=(f=o.path)==null?void 0:f.replace(Wi,""),o.path}),(i==null?void 0:i.length)>0&&(r=r==null?void 0:r.map(o=>{var c,u,m,g,w,d,N;let f=i==null?void 0:i.find(_=>{var J;return(J=o==null?void 0:o.path)==null?void 0:J.includes(_)});return!(o!=null&&o.fatherPath)&&f&&!((c=o==null?void 0:o.path)!=null&&c.includes(Wi))&&!(i!=null&&i.find(_=>(o==null?void 0:o.path)===_))&&(o.path=f+Wi+((N=(m=(u=o==null?void 0:o.path)==null?void 0:u.split(f))==null?void 0:m[1])==null?void 0:N.slice(1,(d=(w=(g=o==null?void 0:o.path)==null?void 0:g.split(f))==null?void 0:w[1])==null?void 0:d.length))),o})),r},dp=(a,l)=>pc([{key:a}],l),pp=async(a,l)=>{const n=[],r=dp(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(o=>{n.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 cp(a==null?void 0:a.value,n)};let yl="$R",Ki="[Any]";const fp=a=>{var f,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let i=a==null?void 0:a[1],o;return i!=null&&i.includes("{")?o=(c=(f=i==null?void 0:i.replaceAll("{",""))==null?void 0:f.replaceAll("}",""))==null?void 0:c.replaceAll(Ki,""):o=i==null?void 0:i.replaceAll(Ki,""),(o==null?void 0:o[0])==="$"&&(o=o==null?void 0:o.slice(1,o==null?void 0:o.length)),l.filter=o,l},hp=a=>{var d,N,_,J,A,F;let l=[],n=[],r=[],i=[],o=[],f=[],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(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||d.forEach(L=>{var S,k,y;(L==null?void 0:L[(L==null?void 0:L.length)-1])===":"&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1));let E=le.analyzerSplitToWord(L,"(");if((E==null?void 0:E.length)>1){c=(S=dc(E))==null?void 0:S.filter;let x=L==null?void 0:L.replace(c,"");if(r.push(x),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let O=[];(k=le.analyzeSplitToContent(c,","))==null||k.forEach(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==null?void 0:I[0])==="("&&(I=I==null?void 0:I.slice(1,(I==null?void 0:I.length)-1)),(I==null?void 0:I[0])!=="@"&&(I="@"+I),O.push(vn(I))}),c=O==null?void 0:O.join(",")}else c=vn(c);c=(y=le.analyzeSplitToContent(c,","))==null?void 0:y.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)),c!=null&&c.includes("@ShowHide=Hide")&&f.push(x),i=[...i,...c]}else r.push(E==null?void 0:E[0])});let g=(N=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:N[0],w=(_=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:_[0];return l=Oi(w??""),l!=null&&l.every(L=>Array.isArray(L))&&(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=(J=le.analyzeSplitToContent(g,"@"))==null?void 0:J[1],o="@"+o,g=g==null?void 0:g.replace(o,""),o=vn(o),o=(A=le.analyzeSplitToContent(o,","))==null?void 0:A.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),(g==null?void 0:g[0])==="{"&&(g=g==null?void 0:g.slice(1,(g==null?void 0:g.length)-1)),g=(F=le.analyzeSplitToContent(g,","))==null?void 0:F.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),g==null||g.forEach((L,E)=>{var ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja;let S=[],k=[],y=[],x="",O="",I=!1,W,Y=[],fe=[],de=[],j="Input",U=[],Z=[];if(L!=null&&L.includes("==")){W=(ee=L==null?void 0:L.split("=="))==null?void 0:ee[0];let aa=(ge=L==null?void 0:L.split("=="))==null?void 0:ge[1],je="";((Ie=le.analyzeSplitToContent(aa,"$"))==null?void 0:Ie.length)>1&&((ue=le.analyzeSplitToContent(aa,"$"))==null?void 0:ue[0])!=="$"?(je=(B=le.analyzeSplitToContent(aa,"$"))==null?void 0:B[0],je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)):((oe=le.analyzeSplitToContent(aa,"}"))==null?void 0:oe.length)>1&&(je=(q=le.analyzeSplitToContent(aa,"}"))==null?void 0:q[1]);let pa=aa==null?void 0:aa.replace(je,"");if((je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),(ye=le.analyzeSplitToContent(je,","))==null||ye.forEach(te=>{var Se;(te==null?void 0:te[0])!=="@"&&(te="@"+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));let ce=vn(te);(Se=le.analyzeSplitToContent(ce,","))==null||Se.forEach(we=>{(we==null?void 0:we[(we==null?void 0:we.length)-1])===","&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),S.push(we)})}),(pa==null?void 0:pa[0])==="$"&&(pa=pa==null?void 0:pa.slice(1,pa==null?void 0:pa.length)),pa!=null&&pa.includes("&")){let te=pa;if((pa==null?void 0:pa[0])==="("){let Se=(Ke=le.analyzeSplitToContent(pa,"&"))==null?void 0:Ke.map(we=>((we==null?void 0:we[(we==null?void 0:we.length)-1])==="&"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),we));te=Se==null?void 0:Se[1],Se=Se==null?void 0:Se[0],(Se==null?void 0:Se[0])!=="@"&&(Se="@"+Se),x=vn(Se)}(te==null?void 0:te[0])==="&"&&(te=te==null?void 0:te.slice(1,te==null?void 0:te.length)),O=(Qe=(Ae=te==null?void 0:te.replace("(",yl))==null?void 0:Ae.split(yl))==null?void 0:Qe[0],y=(ne=(Ea=te==null?void 0:te.replace("(",yl))==null?void 0:Ea.split(yl))==null?void 0:ne[1],y=[y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)],j="Input"}else{let te=(ua=pa==null?void 0:pa.replace("*",yl))==null?void 0:ua.split(yl);Y=(Pe=te==null?void 0:te[0])==null?void 0:Pe.split(":"),fe=(Le=(Re=le.analyzeSplitToContent(te==null?void 0:te[1],":"))==null?void 0:Re.filter((ce,Se)=>{var we,fa;return Se!==((fa=(we=te==null?void 0:te[1])==null?void 0:we.split(":"))==null?void 0:fa.length)-1}))==null?void 0:Le.map(ce=>((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)),ce)),de=(me=(se=le.analyzeSplitToContent(te==null?void 0:te[1],":"))==null?void 0:se.filter((ce,Se)=>{var we,fa;return Se===((fa=(we=te==null?void 0:te[1])==null?void 0:we.split(":"))==null?void 0:fa.length)-1}))==null?void 0:me[0],de=(ka=(qe=de==null?void 0:de.replaceAll("{",""))==null?void 0:qe.replaceAll("}",""))==null?void 0:ka.split(":"),j="Select"}if(W!=null&&W.includes("@")){let te=le.analyzeSplitToContent(W,"@");W=te==null?void 0:te[0],W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1),te="@"+(te==null?void 0:te[1]),te=vn(te),S=(_a=le.analyzeSplitToContent(te,","))==null?void 0:_a.map(ce=>((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)),ce))}}else if(((H=le.analyzeSplitToContent(L,"="))==null?void 0:H.length)>1)if(j="Select",W=(ae=(V=L==null?void 0:L.replace("=",yl))==null?void 0:V.split(yl))==null?void 0:ae[0],!(L!=null&&L.includes("If")))U=(ve=(pe=L==null?void 0:L.replace("=",yl))==null?void 0:pe.split(yl))==null?void 0:ve[1],U=U==null?void 0:U.split("||");else{let aa=(ca=(da=L==null?void 0:L.replace("=",yl))==null?void 0:da.split(yl))==null?void 0:ca[1];Z=(Ue=le.analyzeSplitToContent(aa,")"))==null?void 0:Ue.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)),k=(Sa=le.analyzeSplitToContent(aa,")"))==null?void 0:Sa.filter(je=>je==null?void 0:je.includes("If")),k=k==null?void 0:k.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(((Ma=le.analyzeSplitToContent(L,"@"))==null?void 0:Ma.length)>1){W=(Te=le.analyzeSplitToContent(L,"@"))==null?void 0:Te[0],(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));let aa="@"+((Fa=le.analyzeSplitToContent(L,"@"))==null?void 0:Fa[1]);aa=vn(aa),S=(Na=le.analyzeSplitToContent(aa,","))==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"))&&(j=(ja=(oa=S==null?void 0:S.find(je=>je==null?void 0:je.includes("@Type")))==null?void 0:oa.split("="))==null?void 0:ja[1])}else W=L;S!=null&&S.includes("@ShowHide=Hide")&&(I=!0),n.push({prop:W,label:W,value:"",menuPath:Y,groups:fe,columns:de,type:j,options:U,allContents:Z,filters:S,width:g==null?void 0:g.length,isFormColHidden:I,filterContents:k,functionName:O,functionRelatedWords:y,calculatorFilter:x})}),{groupName:r,groupFilters:i,formContents:n,contents:l,filter:o,hideContents:f}},Oi=a=>{var r,i;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=le.analyzeSplitToContent(n,","))==null||r.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??"")}),(n==null?void 0:n[(n==null?void 0:n.length)-1])===","&&l.push("");else{let o=[];(i=le.analyzeSplitToContent(n,","))==null||i.forEach(f=>{(f==null?void 0:f[(f==null?void 0:f.length)-1])===","&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1)),o.push(Oi(f))}),l=o}return l},wt=(a,l)=>{var F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta;let n,r=[],i=[],o=[],f=[],c=[],u=[],m=[],g="Input",w,d="",N="",_="",J=[],A="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(F=a==null?void 0:a.split("=="))==null?void 0:F[0],w=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],g="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((k=(S=(E=a==null?void 0:a.replace("=",yl))==null?void 0:E.split(yl))==null?void 0:S[1])!=null&&k.includes("If")))if(n=le.analyzeSplitToContent(a,"@"),n=n==null?void 0:n[0],(n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=(x=(y=n==null?void 0:n.replace("=",yl))==null?void 0:y.split(yl))==null?void 0:x[0],n!=null&&n.includes("&")&&(n=(I=(O=n==null?void 0:n.replace("&",yl))==null?void 0:O.split(yl))==null?void 0:I[0]),w=n,((W=le.analyzeSplitToContent(a,"@"))==null?void 0:W.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Ee=(Y=le.analyzeSplitToContent(a,"@"))==null?void 0:Y[1];if((Ee==null?void 0:Ee[0])!=="@"&&(Ee="@"+Ee),Ee=vn(Ee),N=Ee,N!=null&&N.includes("@Type")){let Me=le.analyzeSplitToContent(N,",");Me=Me==null?void 0:Me.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)),Me=(fe=Me==null?void 0:Me.filter(Fe=>Fe==null?void 0:Fe.includes("@Type")))==null?void 0:fe[0],g=(de=Me==null?void 0:Me.split("="))==null?void 0:de[1],g==="File"&&(g="Upload")}else g="Input"}}else if(a!=null&&a.includes("||")){let Ee=[];r=(Z=(U=(j=le.analyzeSplitToContent(a,"="))==null?void 0:j[1])==null?void 0:U.split("||"))==null?void 0:Z.map(Fe=>{var he,tl,El,Ml;let $e=Fe;if($e!=null&&$e.includes("@")){let Hl="@"+((tl=(he=$e==null?void 0:$e.replace("@",yl))==null?void 0:he.split(yl))==null?void 0:tl[1]);$e=(Ml=(El=$e==null?void 0:$e.replace("@",yl))==null?void 0:El.split(yl))==null?void 0:Ml[0],Hl=Zn(Hl),Ee.push(Hl)}return{label:$e==null?void 0:$e.replaceAll("'",""),value:$e==null?void 0:$e.replaceAll("'","")}}),(Ee==null?void 0:Ee.length)>0&&(N="("+(Ee==null?void 0:Ee.join("||"))+")");let Me=(ee=le.analyzeSplitToContent(a,"="))==null?void 0:ee[0];if(Me!=null&&Me.includes("@")){(Me==null?void 0:Me[(Me==null?void 0:Me.length)-1])==="="&&(Me=Me==null?void 0:Me.slice(0,(Me==null?void 0:Me.length)-1));let Fe=(ge=le.analyzeSplitToContent(Me,"@"))==null?void 0:ge[1];Fe="@"+Fe,Fe=Zn(Fe),N=N===""?Fe:Fe+","+N}}else g="Input",d=(B=(ue=(Ie=a==null?void 0:a.replace("=",yl))==null?void 0:Ie.split(yl))==null?void 0:ue[1])==null?void 0:B.replaceAll("'","");else if((q=(oe=le.analyzeSplitToContent(a,"="))==null?void 0:oe[1])!=null&&q.includes("||")){let Ee=(ye=le.analyzeSplitToContent(a,"="))==null?void 0:ye[0];if((Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])==="="&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),Ee!=null&&Ee.includes("@")){let he=(Ke=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Ke[1];he="@"+he,N=Zn(he),n=(ne=(Ae=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Ae[0])==null?void 0:ne.slice(0,((Ea=(Qe=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Qe[0])==null?void 0:Ea.length)-1),w=(Le=(ua=le.analyzeSplitToContent(Ee,"@"))==null?void 0:ua[0])==null?void 0:Le.slice(0,((Re=(Pe=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Pe[0])==null?void 0:Re.length)-1)}else n=Ee,w=Ee;let Me=(se=le.analyzeSplitToContent(a,"="))==null?void 0:se[1];Me=le.analyzeSplitToContent(Me,")");let Fe=Me==null?void 0:Me.filter(he=>!(he!=null&&he.includes("If")));Fe==null||Fe.forEach(he=>{(he==null?void 0:he[0])==="("&&(he=he==null?void 0:he.slice(1,(he==null?void 0:he.length)-1)),i==null||i.push(he==null?void 0:he.split("||"))});let $e=Me==null?void 0:Me.filter(he=>he==null?void 0:he.includes("If"));$e=$e==null?void 0:$e.map(he=>((he==null?void 0:he[0])==="|"&&(he==null?void 0:he[1])==="|"&&(he=he==null?void 0:he.slice(2,he==null?void 0:he.length)),(he==null?void 0:he[0])==="("&&(he=he==null?void 0:he.slice(1,(he==null?void 0:he.length)-1)),(he==null?void 0:he[0])!=="@"&&(he="@"+he),he)),o=$e}else{let Ee=a==null?void 0:a.split("=="),Me=(me=Ee==null?void 0:Ee.filter(Fe=>(Fe==null?void 0:Fe.includes("$"))&&(Fe==null?void 0:Fe[0])!=="{"))==null?void 0:me[0];if(Me&&!(Me!=null&&Me.includes("&"))){let Fe=(ka=le.analyzeSplitToContent(Me,")"))==null?void 0:ka[((qe=le.analyzeSplitToContent(Me,")"))==null?void 0:qe.length)-1],$e=(_a=Fe==null?void 0:Fe.replace("*",yl))==null?void 0:_a.split(yl),he=($e==null?void 0:$e[0])===""?l==null?void 0:l.value:$e==null?void 0:$e[0];(he==null?void 0:he[0])==="("&&(he=(H=le.analyzeSplitToContent(he,")"))==null?void 0:H[1]),he=(ae=(V=he==null?void 0:he.replaceAll("{",""))==null?void 0:V.replaceAll("}",""))==null?void 0:ae.replaceAll(Ki,""),(he==null?void 0:he[0])==="$"&&(he=(pe=he==null?void 0:he.slice(1,he==null?void 0:he.length))==null?void 0:pe.replaceAll(":","/")),f=he==null?void 0:he.split("/");let tl=(da=(ve=$e==null?void 0:$e[1])==null?void 0:ve.replace("{",yl))==null?void 0:da.split(yl),El=tl==null?void 0:tl[0];(El==null?void 0:El[(El==null?void 0:El.length)-1])===":"&&(El=El==null?void 0:El.slice(0,(El==null?void 0:El.length)-1)),c=El==null?void 0:El.split(":"),u=(Ma=(Sa=(Ue=(ca=tl==null?void 0:tl[1])==null?void 0:ca.replace("}",yl))==null?void 0:Ue.split(yl))==null?void 0:Sa[0])==null?void 0:Ma.split(":");let Ml="";((Te=le.analyzeSplitToContent(Me,")"))==null?void 0:Te.length)>1&&(Ml=(Fa=le.analyzeSplitToContent(Me,")"))==null?void 0:Fa[0]),Ml&&Ml!==""&&((Ml==null?void 0:Ml[0])!=="@"&&(Ml="@"+Ml),N=Zn(Ml))}if(Ee!=null&&Ee.some(Fe=>Fe==null?void 0:Fe.includes("&"))){let Fe=(Na=Ee==null?void 0:Ee.filter(tl=>tl==null?void 0:tl.includes("&")))==null?void 0:Na[0];Fe=(oa=le.analyzeSplitToContent(Fe,"&"))==null?void 0:oa.map(tl=>((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)),tl)),_=(je=(aa=(ja=Fe==null?void 0:Fe[1])==null?void 0:ja.replace("(",yl))==null?void 0:aa.split(yl))==null?void 0:je[0];let $e=(pa=le.analyzeSplitToContent(Fe==null?void 0:Fe[1],")"))==null?void 0:pa[0];$e=(ce=(te=$e==null?void 0:$e.replace("(",yl))==null?void 0:te.split(yl))==null?void 0:ce[1],$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),($e==null?void 0:$e[0])==="{"&&($e=$e==null?void 0:$e.slice(1,$e==null?void 0:$e.length)),($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)),J=$e==null?void 0:$e.split(",");let he=Fe==null?void 0:Fe[0];he&&he!==""&&((he==null?void 0:he[0])!=="@"&&(he="@"+he),A=Zn(he))}else if(!Me&&((Se=Ee==null?void 0:Ee.filter(Fe=>(Fe==null?void 0:Fe[0])==="{"))==null?void 0:Se.length)>0){let Fe=Ee==null?void 0:Ee[(Ee==null?void 0:Ee.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($e=>(($e==null?void 0:$e[($e==null?void 0:$e.length)-1])===","&&($e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1)),$e)),Fe=Fe==null?void 0:Fe.map($e=>{var he,tl,El,Ml;if($e=$e==null?void 0:$e.replaceAll("$",""),$e!=null&&$e.includes("{")){let Hl="";$e=$e==null?void 0:$e.replaceAll("{","");let Bl=$e==null?void 0:$e.split("}");Hl=((tl=(he=Bl==null?void 0:Bl[0])==null?void 0:he.split(":"))==null?void 0:tl[0])+":"+(Bl==null?void 0:Bl[1]),$e=Hl,$e=$e+":"}if($e!=null&&$e.includes(Ki)){let Hl="",Bl=$e==null?void 0:$e.split(Ki);Hl=((Ml=(El=Bl==null?void 0:Bl[0])==null?void 0:El.split(":"))==null?void 0:Ml[0])+":"+(Bl==null?void 0:Bl[1]),$e=Hl,$e=$e+":"}return $e=$e==null?void 0:$e.replaceAll(":","/"),$e}),m=Fe}else!((we=Ee==null?void 0:Ee[1])!=null&&we.includes("$"))&&((fa=Ee==null?void 0:Ee[1])==null?void 0:fa[0])!=="("&&u.push(Ee==null?void 0:Ee[1])}else n=(ea=a==null?void 0:a.split("&"))==null?void 0:ea[0],w=(Ta=a==null?void 0:a.split("&"))==null?void 0:Ta[0];return(r==null?void 0:r.length)===0&&(i==null?void 0:i.length)===0&&(f==null?void 0:f.length)===0&&g==="Select"&&(g="Input"),{label:n,prop:w,options:r,allContents:i,filterContents:o,menus:f,groups:c,words:u,align:"center",formType:g,filter:N,functionName:_,functionRelatedWords:J,calculatorFilter:A,relatedPages:m,value:d}},To=(a,l)=>{var r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((f=(o=(i=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",yl))==null?void 0:i.split(yl))==null?void 0:o[0])!=null&&f.includes(","))){let ee=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),ge=(c=ee==null?void 0:ee.replace(":",yl))==null?void 0:c.split(yl);if(((u=le.analyzeSplitToContent(ge==null?void 0:ge[1],"="))==null?void 0:u.length)===1){let Ie=ge==null?void 0:ge[0],ue=[];(w=le.analyzeSplitToContent((g=ge==null?void 0:ge[1])==null?void 0:g.slice(1,((m=ge==null?void 0:ge[1])==null?void 0:m.length)-1),","))==null||w.forEach(B=>{var oe,q;((oe=le.analyzeSplitToContent(B,"="))==null?void 0:oe.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)),ue=[...ue,...To(B,l)]):((B==null?void 0:B[(B==null?void 0:B.length)-1])===","&&(B=B==null?void 0:B.slice(0,(B==null?void 0:B.length)-1)),ue.push((q=To(B,l))==null?void 0:q[0]))}),n==null||n.push({label:Ie,prop:Ie,children:ue,align:"center"})}else{let Ie=[];if(((d=le.analyzeSplitToContent(ee,"="))==null?void 0:d.length)>=2){let B=(N=le.analyzeSplitToContent(ee,"="))==null?void 0:N[1],oe=(_=le.analyzeSplitToContent(B,"/"))==null?void 0:_.map(q=>((q==null?void 0:q[(q==null?void 0:q.length)-1])==="/"&&(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1)),q));Ie=oe==null?void 0:oe.map(q=>(q=Oi(q),q))}let ue=(S=(E=(L=(F=(A=(J=ee==null?void 0:ee.replace("{",yl))==null?void 0:J.split(yl))==null?void 0:A[1])==null?void 0:F.replace("}",yl))==null?void 0:L.split(yl))==null?void 0:E[0])==null?void 0:S.split(",");ue==null||ue.forEach((B,oe)=>{(Ie==null?void 0:Ie.length)>0&&oe===0?n==null||n.push({label:B,prop:B,align:"center",formType:"Select",relatedContents:Ie==null?void 0:Ie.map(q=>{let ye={};return ue==null||ue.forEach((Ke,Ae)=>{ye[Ke]=q==null?void 0:q[Ae]}),ye}),options:Ie==null?void 0:Ie.map(q=>({label:q==null?void 0:q[0],value:q==null?void 0:q[0]})),mainKey:!0}):n==null||n.push({label:B,prop:B,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((k=le.analyzeSplitToContent(a,"="))==null?void 0:k.length)===2&&((x=(y=le.analyzeSplitToContent(a,"="))==null?void 0:y[1])==null?void 0:x[0])==="["){let ee=[];if(((O=le.analyzeSplitToContent(a,"="))==null?void 0:O.length)>=2){let Ie=(I=le.analyzeSplitToContent(a,"="))==null?void 0:I[1],ue=(Y=(W=le.analyzeSplitToContent(Ie,"|"))==null?void 0:W.filter(B=>B!=="|"))==null?void 0:Y.map(B=>((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));ee=ue==null?void 0:ue.map(B=>(B=Oi(B),B))}let ge=(de=(fe=a==null?void 0:a.replace("}",yl))==null?void 0:fe.split(yl))==null?void 0:de[0];ge=(j=ge==null?void 0:ge.slice(1,ge==null?void 0:ge.length))==null?void 0:j.split(","),ge==null||ge.forEach((Ie,ue)=>{(ee==null?void 0:ee.length)>0&&ue===0?n==null||n.push({label:Ie,prop:Ie,align:"center",formType:"Select",relatedContents:ee==null?void 0:ee.map(B=>{let oe={};return ge==null||ge.forEach((q,ye)=>{oe[q]=B==null?void 0:B[ye]}),oe}),options:ee==null?void 0:ee.map(B=>({label:B==null?void 0:B[0],value:B==null?void 0:B[0]})),mainKey:!0}):n==null||n.push({label:Ie,prop:Ie,align:"center"})})}else(U=le.analyzeSplitToContent(a,","))==null||U.forEach(ee=>{var ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te;if((ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])===","&&(ee=ee==null?void 0:ee.slice(0,(ee==null?void 0:ee.length)-1)),(ee==null?void 0:ee[0])==="{"){let ce=le.analyzeSplitToContent(ee,"="),Se=ce==null?void 0:ce[(ce==null?void 0:ce.length)-1],we=[],fa=[],ea=[],Ta="",Ee="",Me=[],Fe=[],$e=(ge=Se==null?void 0:Se.replace("*",yl))==null?void 0:ge.split(yl),he=($e==null?void 0:$e[0])===""?l==null?void 0:l.value:$e==null?void 0:$e[0];he=le.analyzeSplitToContent(he,")");let tl="";if((he==null?void 0:he.length)>1&&((Ie=he==null?void 0:he[0])==null?void 0:Ie[0])!=="&"&&(tl=he==null?void 0:he[0],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ee=tl??""),he=(ue=he==null?void 0:he.filter(el=>(el==null?void 0:el[0])==="$"))==null?void 0:ue[0],((B=le.analyzeSplitToContent(he,"}"))==null?void 0:B.length)>1&&((q=(oe=le.analyzeSplitToContent(he,"}"))==null?void 0:oe[1])==null?void 0:q[0])==="("&&(tl=(ye=le.analyzeSplitToContent(he,"}"))==null?void 0:ye[1],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ee!==""&&(Ee=Ee+","),Ee=Ee+tl),(Ke=he==null?void 0:he.slice(1,(he==null?void 0:he.length)-1))!=null&&Ke.includes("$")||(he=(Ae=le.analyzeSplitToContent(he,"}"))==null?void 0:Ae[0]),(he==null?void 0:he[0])==="$"&&(he=(Qe=he==null?void 0:he.replace("{",""))==null?void 0:Qe.replace("}",":"),he=(Ea=he==null?void 0:he.slice(1,he==null?void 0:he.length))==null?void 0:Ea.replaceAll(":","/")),he!=null&&he.includes("$")){let el=(ne=he==null?void 0:he.split("$"))==null?void 0:ne[0];el=(ua=el==null?void 0:el.split("/"))==null?void 0:ua[0],he=el+"/"+((Pe=he==null?void 0:he.split("$"))==null?void 0:Pe[1])+"/"}we=(he==null?void 0:he.split("/"))??[];let El=(Le=(Re=$e==null?void 0:$e[1])==null?void 0:Re.replace("{",yl))==null?void 0:Le.split(yl);if((qe=(me=(se=$e==null?void 0:$e[1])==null?void 0:se.split("(@"))==null?void 0:me[0])!=null&&qe.includes("&&")||(H=(_a=(ka=$e==null?void 0:$e[1])==null?void 0:ka.split("@"))==null?void 0:_a[0])!=null&&H.includes("&&")){let el=(V=$e==null?void 0:$e[1])!=null&&V.includes("(@")?(ve=(pe=(ae=$e==null?void 0:$e[1])==null?void 0:ae.split("(@"))==null?void 0:pe[0])==null?void 0:ve.split("&&"):(Ue=(ca=(da=$e==null?void 0:$e[1])==null?void 0:da.split("@"))==null?void 0:ca[0])==null?void 0:Ue.split("&&");Me=el==null?void 0:el.map(Wa=>{var Kl,Jl;return(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(Jl=(Kl=Wa==null?void 0:Wa.replace("{",yl))==null?void 0:Kl.split(yl))==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 $l=[];el==null||el.forEach((Wa,Kl)=>{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("{",yl))==null?void 0:Jl.split(yl))==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(","),$l.push(Kl===0?(Wa==null?void 0:Wa.length)-1:Wa==null?void 0:Wa.length),Fe=[...Fe,...Wa]}),$l=(Sa=le.prefixSum($l))==null?void 0:Sa.map(Wa=>Wa==null?void 0:Wa.total),Me=Me==null?void 0:Me.map((Wa,Kl)=>({number:$l==null?void 0:$l[Kl],contents:Wa}))}let Ml=El==null?void 0:El[0];(Ml==null?void 0:Ml[(Ml==null?void 0:Ml.length)-1])===":"&&(Ml=Ml==null?void 0:Ml.slice(0,(Ml==null?void 0:Ml.length)-1)),fa=(Ml==null?void 0:Ml.split(":"))??[],ea=((Na=(Fa=(Te=(Ma=El==null?void 0:El[1])==null?void 0:Ma.replace("}",yl))==null?void 0:Te.split(yl))==null?void 0:Fa[0])==null?void 0:Na.split(","))??[];let Hl=(ja=ce==null?void 0:ce[0])==null?void 0:ja.slice(1,((oa=ce==null?void 0:ce[0])==null?void 0:oa.length)-2);Ee&&Ee!==""&&(Ta=Zn(Ee));let Bl=(aa=le.analyzeSplitToContent(Ta,","))==null?void 0:aa.map(el=>((el==null?void 0:el[(el==null?void 0:el.length)-1])===","&&(el=el==null?void 0:el.slice(0,(el==null?void 0:el.length)-1)),el)),jl=[];Bl!=null&&Bl.find(el=>el==null?void 0:el.includes("@MainParam"))&&(Bl=Bl==null?void 0:Bl.find(el=>el==null?void 0:el.includes("@MainParam")),Bl=(pa=(je=Bl==null?void 0:Bl.replace("=",yl))==null?void 0:je.split(yl))==null?void 0:pa[1],Bl=Bl==null?void 0:Bl.slice(1,(Bl==null?void 0:Bl.length)-1),jl=le.analyzeSplitToContent(Bl,",")),(te=Hl==null?void 0:Hl.split(","))==null||te.forEach((el,$l)=>{var Wa,Kl,Jl,ar,xl,br;if(((Wa=le.analyzeSplitToContent(el,"@"))==null?void 0:Wa.length)>1){let ya=(Kl=le.analyzeSplitToContent(el,"@"))==null?void 0:Kl[1];ya="@"+ya,Ta=Zn(ya),el=(Jl=le.analyzeSplitToContent(el,"@"))==null?void 0:Jl[0],(el==null?void 0:el[(el==null?void 0:el.length)-1])==="@"&&(el=el==null?void 0:el.slice(0,(el==null?void 0:el.length)-1))}n.push({label:el,prop:el,align:"center",menus:we,groups:(Me==null?void 0:Me.length)===0?fa:(ar=Me==null?void 0:Me.find(ya=>(ya==null?void 0:ya.number)>=$l))==null?void 0:ar.contents,words:(Fe==null?void 0:Fe.length)===0?(xl=ea==null?void 0:ea[$l])==null?void 0:xl.split(":"):(br=Fe==null?void 0:Fe[$l])==null?void 0:br.split(":"),formType:(we==null?void 0:we.length)>0?"Select":"Input",mainKey:!!($l===0||jl!=null&&jl.find(ya=>ya===el)),filter:Ta,isMainPath:(Me==null?void 0:Me.findIndex(ya=>(ya==null?void 0:ya.number)>=$l))===0})})}else n.push({label:ee,prop:ee,align:"center"})});else{let ee=(Z=le.analyzeSplitToContent(a,","))==null?void 0:Z.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));ee==null||ee.forEach(ge=>{n.push(wt(ge,l))})}return n},vp=(a,l)=>{var f,c,u,m,g;let n=a;if(!a)return;let r="";((f=le.analyzeSplitToContent(a,"}"))==null?void 0:f.length)>1&&(n=(c=le.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(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])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let i=[],o=[];return i.push({label:"排序",prop:"sort"}),i.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=le.analyzeSplitToContent(n,","))==null||m.forEach(w=>{var d;(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==null?void 0:w[0])==="{"?(d=To(w,l))==null||d.forEach(N=>{i.push(N)}):i.push(wt(w,l))}),i!=null&&i.some(w=>{var d;return(d=w==null?void 0:w.prop)==null?void 0:d.includes("@")})&&(i=i==null?void 0:i.filter(w=>{var d;return!((d=w==null?void 0:w.prop)!=null&&d.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(g=le.analyzeSplitToContent(r,","))==null||g.forEach(w=>{var d;(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==null?void 0:w[0])==="{"?(d=To(w,l))==null||d.forEach(N=>{o.push(N)}):o.push(wt(w,l))})),{columns:i,secondColumns:o}},vn=a=>{var l,n,r,i,o;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let f=(n=(l=a==null?void 0:a.replace("(",yl))==null?void 0:l.split(yl))==null?void 0:n[1],c=(i=(r=a==null?void 0:a.replace("(",yl))==null?void 0:r.split(yl))==null?void 0:i[0];return f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1),f=(o=le.analyzeSplitToContent(f,","))==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)),f=f==null?void 0:f.join(","),a!=null&&a.includes("@Quote")&&(f!=null&&f.includes("@QuoteType")||(f=f===""?f+"@QuoteType=Manual":f+",@QuoteType=Manual"),f!=null&&f.includes("@QuoteSonSync")||(f=f===""?f+"@QuoteSonSync=No":f+",@QuoteSonSync=No"),f!=null&&f.includes("@QuoteFatherSync")||(f=f===""?f+"@QuoteFatherSync=Yes":f+",@QuoteFatherSync=Yes")),f}},hs=a=>{let l=a==null?void 0:a.map(n=>{var r,i;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+yl+((i=n==null?void 0:n.groups)==null?void 0:i.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,i;return{menus:(r=n==null?void 0:n.split(yl))==null?void 0:r[0],groups:((i=n==null?void 0:n.split(yl))==null?void 0:i[1])??[]}}),l},vs=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=le.analyzeSplitToContent(l,","))==null?void 0:n.map(r=>((r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])!=="@"&&(r="@"+r),(r==null?void 0:r[1])==="("&&(r=vn(r)),r)),l==null?void 0:l.join(",")},fc=(a,l,n="")=>{var E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce;let r=[],i=[],o=[],f="",c="",u="",m=[],g=[],w=[],d=[],N="";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])!=="$"&&!((k=a==null?void 0:a[0])!=null&&k.includes("$")))return;((y=a==null?void 0:a[0])==null?void 0:y[0])!=="*"&&((x=a==null?void 0:a[0])==null?void 0:x[0])!=="$"&&(f=(O=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:O[0],(f==null?void 0:f[0])!=="@"&&(f="@"+f),f=Zn(f),u=(I=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:I[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 J=le.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(W=J==null?void 0:J.filter(Se=>(Se==null?void 0:Se[0])!=="{"&&(Se==null?void 0:Se[0])!=="["))==null?void 0:W.join(""),c=(Y=a==null?void 0:a[0])==null?void 0:Y.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),N=(fe=J==null?void 0:J.filter(Se=>(Se==null?void 0:Se[0])!=="["))==null?void 0:fe.join(""),N=(de=a==null?void 0:a[0])==null?void 0:de.replace(N,""),c=c==null?void 0:c.replace(N,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),((j=le.analyzeSplitToContent(c,"@"))==null?void 0:j.length)>1&&(f=(U=le.analyzeSplitToContent(c,"@"))==null?void 0:U[1],(f==null?void 0:f[(f==null?void 0:f.length)-1])===":"&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1)),f="@"+f,f=vn(f),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)),((ee=le.analyzeSplitToContent(r,"@"))==null?void 0:ee.length)>1){f!==""&&(f=f+",");let Se=(ge=le.analyzeSplitToContent(r,"@"))==null?void 0:ge[1];Se="@"+Se,Se=vn(Se),f=f+Se,r=(Ie=le.analyzeSplitToContent(r,"@"))==null?void 0:Ie[0]}if((r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=r===""?[]:r==null?void 0:r.split(":"),(c==null?void 0:c[(c==null?void 0:c.length)-1])===":"&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),n!==""){let Se=(ue=le.analyzeSplitToContent(n,")"))==null?void 0:ue[0],we=le.analyzeSplitToContent(n,")");we=we==null?void 0:we.filter((Ee,Me)=>Me!==(we==null?void 0:we.length)-1),we=we==null?void 0:we.join("");let fa=(B=le.analyzeSplitToContent(n,"@"))==null?void 0:B[1];u=(q=(oe=le.analyzeSplitToContent(n,"@"))==null?void 0:oe[0])==null?void 0:q.replace(we,""),(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 ea="";if(ea=le.analyzeSplitToContent(n,")"),ea=ea==null?void 0:ea.filter((Ee,Me)=>Me!==0&&Me!==(ea==null?void 0:ea.length)-1),((ye=le.analyzeSplitToContent(n,"&"))==null?void 0:ye.length)>1&&(ea==null?void 0:ea.length)<2&&(Se="",u="",ea=le.analyzeSplitToContent(n,")")),ea!=null&&ea.some(Ee=>(Ee==null?void 0:Ee[0])===":")){let Ee=(Ke=ea==null?void 0:ea.filter(Me=>(Me==null?void 0:Me[0])===":"))==null?void 0:Ke.join("");N=Ee==null?void 0:Ee.slice(1,Ee==null?void 0:Ee.length),ea=ea==null?void 0:ea.filter(Me=>(Me==null?void 0:Me[0])!==":")}(ea==null?void 0:ea.length)>0&&((Ae=le.chunkArray(ea))==null||Ae.forEach(Ee=>{var tl,El,Ml,Hl,Bl;let Me="",Fe=[],$e="";(Ee==null?void 0:Ee.length)>1&&($e="@"+(Ee==null?void 0:Ee[0]),$e=vn($e));let he=(Ee==null?void 0:Ee.length)===1?Ee==null?void 0:Ee[0]:Ee==null?void 0:Ee[1];he=he==null?void 0:he.slice(1,he==null?void 0:he.length),Me=(El=(tl=he==null?void 0:he.replace("(",yl))==null?void 0:tl.split(yl))==null?void 0:El[0],he=(Hl=(Ml=he==null?void 0:he.replace("(",yl))==null?void 0:Ml.split(yl))==null?void 0:Hl[1],he=he==null?void 0:he.slice(0,(he==null?void 0:he.length)-1),Fe=(Bl=le.analyzeSplitToContent(he,","))==null?void 0:Bl.map(jl=>((jl==null?void 0:jl[(jl==null?void 0:jl.length)-1])===","&&(jl=jl==null?void 0:jl.slice(0,(jl==null?void 0:jl.length)-1)),jl)),m.push({functionName:Me,functionRelatedWords:Fe,calculatorFilter:$e})})),Se=vs(Se),fa=vs(fa);let Ta=Se??"";if(Ta!==""&&(Ta=Ta+","),Ta=Ta+fa,(Ta==null?void 0:Ta[(Ta==null?void 0:Ta.length)-1])===","&&(Ta=Ta==null?void 0:Ta.slice(0,(Ta==null?void 0:Ta.length)-1)),Ta!==""&&f!==""&&(f=f+","),f=f+Ta,(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=(Qe=le.analyzeSplitToContent(u,":"))==null?void 0:Qe.filter((Ee,Me)=>{var Fe;return!((Ee==null?void 0:Ee[0])==="{"&&Me===((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)),f!=null&&f.includes("@Sync")||(f=f===""?f+"@Sync=(Yes,Yes)":f+",@Sync=(Yes,Yes)"),u!=null&&u.includes("$")){let Ee=(ne=(Ea=u==null?void 0:u.replace("*",yl))==null?void 0:Ea.split(yl))==null?void 0:ne[1],Me=(Pe=(ua=u==null?void 0:u.replace("*",yl))==null?void 0:ua.split(yl))==null?void 0:Pe[0];Me=Me==null?void 0:Me.split("$"),Me=((Le=(Re=Me==null?void 0:Me[0])==null?void 0:Re.split(":"))==null?void 0:Le[0])+":"+(Me==null?void 0:Me[1])+":",u=Me+"*"+Ee}else u=(se=u==null?void 0:u.replaceAll("{",""))==null?void 0:se.replaceAll("}","");(u==null?void 0:u[0])===":"&&(N=u==null?void 0:u.slice(1,u==null?void 0:u.length),u="")}f!==""&&f&&(f="("+f+")"),f=u+f,((me=le.analyzeSplitToContent(c,"}"))==null?void 0:me.length)>1&&(c=(qe=le.analyzeSplitToContent(c,"}"))==null?void 0:qe.filter(Se=>(Se==null?void 0:Se[0])!=="@"),c=c==null?void 0:c.join(""));let A=vp(c,l);o=c===""?[]:(A==null?void 0:A.columns)??[],d=le.getColumnChild(o);let F=le.getColumnChild(o);o!=null&&o.some(Se=>{var we;return Array.isArray(Se==null?void 0:Se.children)&&((we=Se==null?void 0:Se.children)==null?void 0:we.length)>0})&&(o=[o]),i=N?Oi(N):[],!(i!=null&&i.every(Se=>Array.isArray(Se)))&&(i==null?void 0:i.length)>0&&(i=[i]),(i==null?void 0:i.length)>0&&(Array.isArray(i==null?void 0:i[0])&&((ka=i==null?void 0:i[0])!=null&&ka.every(Se=>Array.isArray(Se)))?i=i==null?void 0:i.map((Se,we)=>(Se=Se.map((fa,ea)=>(fa.unshift("{}"),fa.unshift((ea+1).toString()),fa)),Se)):i=i==null?void 0:i.map((Se,we)=>(Se.unshift("{}"),Se.unshift((we+1).toString()),Se))),A!=null&&A.secondColumns&&((_a=A==null?void 0:A.secondColumns)==null?void 0:_a.length)>0&&((i==null?void 0:i.length)>0?i=i==null?void 0:i.map((Se,we)=>{var fa,ea;return Array.isArray(Se==null?void 0:Se[0])?Se=Se==null?void 0:Se.map((Ta,Ee)=>{var Me,Fe;return Ta.unshift((Fe=(Me=A==null?void 0:A.secondColumns)==null?void 0:Me[Ee])==null?void 0:Fe.prop),Ta}):Se.unshift((ea=(fa=A==null?void 0:A.secondColumns)==null?void 0:fa[we])==null?void 0:ea.prop),Se}):i=(H=A==null?void 0:A.secondColumns)==null?void 0:H.map((Se,we)=>(Se=[Se==null?void 0:Se.label],Se.push(we),Se)),o.unshift({label:"",prop:"disabled",sortable:!1})),d=d==null?void 0:d.map(Se=>{var we,fa;return{menus:Se==null?void 0:Se.menus,content:((we=Se==null?void 0:Se.menus)==null?void 0:we.join("/"))+yl+((fa=Se==null?void 0:Se.groups)==null?void 0:fa.join("/"))}});let L=[];if(((ae=(V=f==null?void 0:f.replace("(",yl))==null?void 0:V.split(yl))==null?void 0:ae[0])!==""&&(L=(ve=(pe=f==null?void 0:f.replace("(",yl))==null?void 0:pe.split(yl))==null?void 0:ve[0],L=[L],L=L==null?void 0:L.map(Se=>{var fa,ea,Ta;let we=Se==null?void 0:Se.split("*");return{menus:(fa=we==null?void 0:we[0])==null?void 0:fa.split(":"),content:((ea=we==null?void 0:we[0])==null?void 0:ea.replaceAll(":","/"))+yl+((Ta=we==null?void 0:we[1])==null?void 0:Ta.replaceAll(":","/"))}}),d=[...d,...L]),d=d==null?void 0:d.filter(Se=>{var we;return(Se==null?void 0:Se.menus)&&((we=Se==null?void 0:Se.menus)==null?void 0:we.length)>0}),d=d==null?void 0:d.map(Se=>Se==null?void 0:Se.content),d=[...new Set(d)],d=d==null?void 0:d.map(Se=>{var we,fa;return{menus:(we=Se==null?void 0:Se.split(yl))==null?void 0:we[0],groups:((fa=Se==null?void 0:Se.split(yl))==null?void 0:fa[1])??[]}}),g=F==null?void 0:F.filter(Se=>{var we;return(Se==null?void 0:Se.filter)&&((we=Se==null?void 0:Se.filter)==null?void 0:we.includes("@Sync"))}),(g==null?void 0:g.length)>0&&(g=g==null?void 0:g.filter(Se=>{var we,fa,ea,Ta;return(Ta=(ea=(fa=(we=le.analyzeSplitToContent(Se==null?void 0:Se.filter,","))==null?void 0:we.find(Ee=>Ee==null?void 0:Ee.includes("@Sync")))==null?void 0:fa.split(","))==null?void 0:ea[0])==null?void 0:Ta.includes("Yes")}),g=hs(g)),w=F==null?void 0:F.filter(Se=>{var we;return(Se==null?void 0:Se.filter)&&((we=Se==null?void 0:Se.filter)==null?void 0:we.includes("@Sync"))}),(w==null?void 0:w.length)>0&&(w=w==null?void 0:w.filter(Se=>{var we,fa,ea,Ta;return(Ta=(ea=(fa=(we=le.analyzeSplitToContent(Se==null?void 0:Se.filter,","))==null?void 0:we.find(Ee=>Ee==null?void 0:Ee.includes("@Sync")))==null?void 0:fa.split(","))==null?void 0:ea[1])==null?void 0:Ta.includes("Yes")}),w=hs(w)),f!==""&&(f!=null&&f.includes("@Sync"))&&(f==null?void 0:f[0])!=="("){let Se=(da=f==null?void 0:f.replace("(",yl))==null?void 0:da.split(yl),we=Se==null?void 0:Se[1];if(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),we=le.analyzeSplitToContent(we,","),(Sa=(Ue=(ca=we==null?void 0:we.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:ca.split(","))==null?void 0:Ue[0])!=null&&Sa.includes("Yes")){let fa=Se==null?void 0:Se[0];fa=[{menus:(Te=(Ma=fa==null?void 0:fa.split("*"))==null?void 0:Ma[0])==null?void 0:Te.replaceAll(":","/"),groups:((Na=(Fa=fa==null?void 0:fa.split("*"))==null?void 0:Fa[1])==null?void 0:Na.split(":"))??[]}],g=[...g,...fa]}if((aa=(ja=(oa=we==null?void 0:we.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:oa.split(","))==null?void 0:ja[1])!=null&&aa.includes("Yes")){let fa=Se==null?void 0:Se[0];fa=[{menus:(pa=(je=fa==null?void 0:fa.split("*"))==null?void 0:je[0])==null?void 0:pa.replaceAll(":","/"),groups:((ce=(te=fa==null?void 0:fa.split("*"))==null?void 0:te[1])==null?void 0:ce.split(":"))??[]}],w=[...w,...fa]}}return{groupName:r,tableColumns:o,tableFilter:f,tableContents:i,columns:(A==null?void 0:A.secondColumns)??[],relatedQuotes:d,fatherSyncContents:g,sonSyncContents:w,calculatorFilters:m}},hc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var i,o,f,c;if(Array.isArray(n))n=n==null?void 0:n.map(u=>{var m,g,w,d;return u!=null&&u.isMainPath||(((m=u==null?void 0:u.children)==null?void 0:m.length)>0?u.children=hc(u.children,l):((g=u==null?void 0:u.menus)==null?void 0:g.length)>0&&!((w=n==null?void 0:n[0])!=null&&w.isMainPath)&&(u.menus=(d=u.menus)==null?void 0:d.map((N,_)=>{var J,A;return((J=u.menus)==null?void 0:J.length)-1===_&&N===""&&(l==null?void 0:l.parentContent)+"/"!==((A=u.menus)==null?void 0:A.join("/"))&&(N=l==null?void 0:l.value),u}),u.bindMenus=u.menus)),u});else{if(r===0&&((i=n.menus)==null?void 0:i.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((o=n.menus)==null?void 0:o.length)>0&&!((f=a==null?void 0:a[0])!=null&&f.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((u,m)=>{var g,w;return((g=n.menus)==null?void 0:g.length)-1===m&&u===""&&(l==null?void 0:l.parentContent)+"/"!==((w=n.menus)==null?void 0:w.join("/"))&&(u=l==null?void 0:l.value),u}),n.bindMenus=n.menus)}return n}),a),mp=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=hc(n.contents,l)),n)),a),_t=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=_t(r,l),r)):n=n==null?void 0:n.map(r=>{var i,o;return r!=null&&r.children&&((i=r==null?void 0:r.children)==null?void 0:i.length)>0?r.children=_t(r==null?void 0:r.children,l):r!=null&&r.words&&((o=r==null?void 0:r.words)==null?void 0:o.length)>0&&(l!=null&&l.find(f=>{var c,u,m,g;return((g=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:g[((m=(u=r==null?void 0:r.prop)==null?void 0:u.split("."))==null?void 0:m.length)-1])===f}))&&(r.mainKey=!0),r}),n};let Sr="$R";const yp=M.useUnit(M.pinia),{selectTitle:gn}=M.storeToRefs(yp),gp=M.useMenuState(M.pinia),{localFiles:bp}=M.storeToRefs(gp),kp=M.useLoginState(M.pinia),{loginUserInfo:mt}=M.storeToRefs(kp),Cn=[{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 xp=async a=>{var n,r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L;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=(r=(n=E==null?void 0:E.replace("(",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1],E="("+((i=E==null?void 0:E.replaceAll("{",""))==null?void 0:i.replaceAll("}",""));let S=le.calculatorAndToOr(E),k=Object.keys(S==null?void 0:S[0]);if(E=S,((o=k==null?void 0:k[0])==null?void 0:o[0])==="$"){let y=(c=k==null?void 0:k[0])==null?void 0:c.slice(1,((f=k==null?void 0:k[0])==null?void 0:f.length)-1),x=(m=(u=y==null?void 0:y.split("*"))==null?void 0:u[0])==null?void 0:m.replaceAll(".","/"),O=(d=(w=(g=y==null?void 0:y.split("*"))==null?void 0:g[1])==null?void 0:w.split("."))==null?void 0:d[0],I=await Wr(x,!1);I=(N=I==null?void 0:I.filter(j=>(j==null?void 0:j.name)===O))==null?void 0:N[0];let W=(J=(_=I==null?void 0:I.compData)==null?void 0:_.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:J.contents;E=E==null?void 0:E.map(j=>{var Z,ee;let U={};for(let ge in j)if((ge==null?void 0:ge[0])==="$"){let Ie=(ee=ge==null?void 0:ge.split("."))==null?void 0:ee[((Z=ge==null?void 0:ge.split("."))==null?void 0:Z.length)-1];U[Ie]=j==null?void 0:j[ge]}else U[ge]=j==null?void 0:j[ge];return U});let Y=(F=(A=I==null?void 0:I.compData)==null?void 0:A.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:F.contents;Y=(L=le.getEqualChild(Y))==null?void 0:L.filter(j=>(j==null?void 0:j.label)!=="操作");let de=le.tableToForm(W,Y);if(E==null||E.forEach(j=>{var U,Z,ee,ge,Ie;for(let ue in j)(j==null?void 0:j[ue])==="LoginUser"&&(j[ue]=((U=mt.value)==null?void 0:U.姓名)||((Z=mt.value)==null?void 0:Z.account)||((ee=mt.value)==null?void 0:ee.账号)),!((ge=de==null?void 0:de[0])!=null&&ge.find(B=>{var oe;return(B==null?void 0:B.key)===ue||((oe=B==null?void 0:B.key)==null?void 0:oe.includes(ue))}))&&!(de!=null&&de.find(B=>{var oe;return(B==null?void 0:B.key)===ue||((oe=B==null?void 0:B.key)==null?void 0:oe.includes(ue))}))||(((Ie=j[ue])==null?void 0:Ie[0])!=="!"?de=de==null?void 0:de.filter(B=>{var oe,q;return((oe=B==null?void 0:B.find(ye=>{var Ke;return(ye==null?void 0:ye.key)===ue||((Ke=ye==null?void 0:ye.key)==null?void 0:Ke.includes(ue))}))==null?void 0:oe.value)===j[ue]||Array.isArray(j==null?void 0:j[ue])&&((q=j==null?void 0:j[ue])==null?void 0:q.find(ye=>{var Ke;return((Ke=B==null?void 0:B.find(Ae=>{var Qe;return(Ae==null?void 0:Ae.key)===ue||((Qe=Ae==null?void 0:Ae.key)==null?void 0:Qe.includes(ue))}))==null?void 0:Ke.value)===ye}))}):de=de==null?void 0:de.filter(B=>{var oe;return((oe=B==null?void 0:B.find(q=>{var ye;return(q==null?void 0:q.key)===ue||((ye=q==null?void 0:q.key)==null?void 0:ye.includes(ue))}))==null?void 0:oe.value)!==j[ue]}))}),(de==null?void 0:de.length)===0){let j=a==null?void 0:a.contents;return j.push({key:"hideContents",contents:!0}),j}}}return a==null?void 0:a.contents},wp=a=>{var l,n,r,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 f=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(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=le.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));let u=(o=(i=(r=bp.value)==null?void 0:r.filter(m=>{var g;return(m==null?void 0:m.path)===((g=a==null?void 0:a.groupName)==null?void 0:g[0])}))==null?void 0:i[0])==null?void 0:o.children;return u=(u==null?void 0:u.filter(m=>c==null?void 0:c.find(g=>g===(m==null?void 0:m.name))))??[],(c==null?void 0:c.length)>0&&(u==null?void 0:u.length)===0&&(c==null||c.forEach(m=>{u.push({url:"file:///"+(m==null?void 0:m.replaceAll("\\","/"))})})),f.push({key:"backGround",contents:u}),f}return a==null?void 0:a.contents},_p=a=>{const l=mc(a==null?void 0:a.filter);return l?Zp(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},Sp=a=>{let l=parseInt(a==null?void 0:a.filter);l=1/l;let n=a==null?void 0:a.contents;return n.push({key:"rowPosition",contents:l}),n},Ep=a=>{const l=mc(a==null?void 0:a.filter);if(!l)return a==null?void 0:a.contents;let n=a==null?void 0:a.contents;return n.push({key:"numPosition",contents:l}),n},Cp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},Dp=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},Tp=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var i;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(i=r.contents)==null?void 0:i.slice(0,parseInt(a==null?void 0:a.filter))),r})},Bp=async a=>{var l,n,r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j;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 U=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:r.contents;Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),U=le.getColumnChild(U);let Z=U==null?void 0:U.filter(ye=>(ye==null?void 0:ye.filter)&&(ye==null?void 0:ye.filter)!==""),ee=new Map,ge=[];Z==null||Z.forEach(ye=>{var Ke,Ae;ee.get((Ke=ye==null?void 0:ye.menus)==null?void 0:Ke.join("/"))||(ee.set((Ae=ye==null?void 0:ye.menus)==null?void 0:Ae.join("/"),ye),ge.push(ye))});let Ie=(o=(i=gn==null?void 0:gn.value)==null?void 0:i.find(ye=>(ye==null?void 0:ye.condition)==="child"))==null?void 0:o.value,ue=ge==null?void 0:ge.map(ye=>{var Ke,Ae,Qe;return ye=(Ke=ye==null?void 0:ye.menus)==null?void 0:Ke.join("/"),(ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])==="/"&&((Qe=(Ae=gn==null?void 0:gn.value)==null?void 0:Ae.find(Ea=>(Ea==null?void 0:Ea.condition)==="child"))==null?void 0:Qe.parentContent)+"/"!==ye?ye=ye+Ie:(ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])==="/"&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),ye}),B=ge==null?void 0:ge.map(ye=>ye==null?void 0:ye.groups),oe=ue==null?void 0:ue.map(async ye=>{let Ke=await Wr(ye,!1);return{path:ye,contents:Ke}});oe=await Promise.all(oe);let q=oe==null?void 0:oe.map((ye,Ke)=>{var Qe,Ea,ne,ua,Pe,Re,Le;let Ae=(Qe=ye==null?void 0:ye.contents)==null?void 0:Qe.filter(se=>{var me,qe;return(se==null?void 0:se.name)===((qe=B==null?void 0:B[Ke])==null?void 0:qe[((me=B==null?void 0:B[Ke])==null?void 0:me.length)-1])});return Ae=(ua=(ne=(Ea=Ae==null?void 0:Ae[0])==null?void 0:Ea.compData)==null?void 0:ne.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:ua.contents,(ye==null?void 0:ye.path)===((Re=(Pe=gn==null?void 0:gn.value)==null?void 0:Pe.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:Re.parentContent)&&(Ae=((Le=Ae==null?void 0:Ae.map(se=>{for(let me in se)if(se[me]===Ie)return se}))==null?void 0:Le.filter(se=>se))??[]),Ae??[]});if(q=q==null?void 0:q.map(ye=>(ye=ye==null?void 0:ye.map(Ke=>{var Qe;let Ae={};for(let Ea in Ke)if(Z!=null&&Z.find(ne=>{var ua,Pe;return((Pe=(ua=ne==null?void 0:ne.words)==null?void 0:ua[0])==null?void 0:Pe.replaceAll("'",""))===Ea})){let ne=(Qe=Z==null?void 0:Z.find(ua=>{var Pe,Re;return((Re=(Pe=ua==null?void 0:ua.words)==null?void 0:Pe[0])==null?void 0:Re.replaceAll("'",""))===Ea}))==null?void 0:Qe.prop;Ae[ne]=Ke==null?void 0:Ke[Ea]}return Ae}),ye)),q=le.cartesianProduct(q),Array.isArray(q==null?void 0:q[0])&&(q=q==null?void 0:q[0]),(q==null?void 0:q.length)>0&&((w=(c=(f=Z==null?void 0:Z[0])==null?void 0:f.menus)==null?void 0:c.join("/"))==null?void 0:w[((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(Ke=>{var Ae;return(Ke==null?void 0:Ke.key)==="tableContents"&&(q==null?void 0:q.length)>0&&(Ke.contents=((Ae=Ke.contents)==null?void 0:Ae.length)>0?Ke.contents:q),Ke})}if((a==null?void 0:a.filter)==="Manual"){let U=[],Z=[],ee=(_=(N=a==null?void 0:a.contents)==null?void 0:N.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:_.contents;(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])===")"?ee=(A=(J=ee==null?void 0:ee.replace("(",Sr))==null?void 0:J.split(Sr))==null?void 0:A[0]:ee="",ee!==""&&(U=((L=(F=ee==null?void 0:ee.split("*"))==null?void 0:F[0])==null?void 0:L.split(":"))??[],Z=((x=(y=(k=(S=(E=ee==null?void 0:ee.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",Sr))==null?void 0:k.split(Sr))==null?void 0:y[0])==null?void 0:x.split(":"))??[]);let ge=(I=(O=a==null?void 0:a.contents)==null?void 0:O.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:I.contents;ge=(Y=(W=ge==null?void 0:ge.replace("(",Sr))==null?void 0:W.split(Sr))==null?void 0:Y[1],ge=ge==null?void 0:ge.slice(0,(ge==null?void 0:ge.length)-1);let Ie=(fe=a==null?void 0:a.contents)==null?void 0:fe.map(B=>{var oe,q,ye,Ke,Ae,Qe,Ea,ne,ua;return(B==null?void 0:B.key)==="header"&&((oe=B==null?void 0:B.contents)!=null&&oe.every(Pe=>(Pe==null?void 0:Pe.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((q=B==null?void 0:B.contents)==null?void 0:q[0])?B.contents=(ye=B==null?void 0:B.contents)==null?void 0:ye.map((Pe,Re)=>{var Le,se,me;return Pe!=null&&Pe.isMainPath||(Re===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=U,Pe.groups=((Le=Pe.groups)==null?void 0:Le.length)===0?Z:Pe.groups,Pe.words=((se=Pe.words)==null?void 0:se.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=ge,(!(Pe!=null&&Pe.menus)||((me=Pe==null?void 0:Pe.menus)==null?void 0:me.length)===0)&&(Pe.menus=U)):(Pe.mainKey=!1,Pe.bindMenus=U)),Pe}):Array.isArray((Ke=B==null?void 0:B.contents)==null?void 0:Ke[0])&&((Ea=(Qe=(Ae=B==null?void 0:B.contents)==null?void 0:Ae[0])==null?void 0:Qe.filter(()=>(U==null?void 0:U.length)>0))==null?void 0:Ea.length)>0&&(B.contents[0]=(ua=(ne=B==null?void 0:B.contents)==null?void 0:ne[0])==null?void 0:ua.map((Pe,Re)=>{var Le,se,me;return Pe!=null&&Pe.isMainPath||(Re===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=U,Pe.groups=((Le=Pe.groups)==null?void 0:Le.length)===0?Z:Pe.groups,Pe.words=((se=Pe.words)==null?void 0:se.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=ge,(!(Pe!=null&&Pe.menus)||Array.isArray(Pe==null?void 0:Pe.menus)&&((me=Pe==null?void 0:Pe.menus)==null?void 0:me.length)===0)&&(U==null?void 0:U.length)>0&&(Pe.menus=U)):(Pe.mainKey=!1,Pe.bindMenus=U)),Pe}))),B}),ue=(de=Ie==null?void 0:Ie.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:de.contents;if(Array.isArray(ue==null?void 0:ue[0])&&(ue=ue==null?void 0:ue[0]),ue=le.getColumnChild(ue),ue!=null&&ue.some(B=>{var oe,q;return((q=B==null?void 0:B.menus)==null?void 0:q[((oe=B==null?void 0:B.menus)==null?void 0:oe.length)-1])===""})){let B=(j=gn==null?void 0:gn.value)==null?void 0:j.find(oe=>(oe==null?void 0:oe.condition)==="child");Ie=mp(Ie,B)}return Ie}if((a==null?void 0:a.filter)==="Chart"){let U=a==null?void 0:a.contents;return U.push({key:"newType",contents:"Chart"}),U}if((a==null?void 0:a.filter)==="Carousel"){let U=a==null?void 0:a.contents;return U.push({key:"newType",contents:"Carousel"}),U}return a==null?void 0:a.contents},Np=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},Ap=a=>{var r,i,o,f,c,u,m,g,w,d,N,_;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((i=(r=l==null?void 0:l.replace(":",Sr))==null?void 0:r.split(Sr))==null?void 0:i[1])),l=(o=l==null?void 0:l.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(c=(f=l==null?void 0:l.split("="))==null?void 0:f[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 J=(u=l==null?void 0:l.split("="))==null?void 0:u[0],A=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(g=A==null?void 0:A.slice(1,A==null?void 0:A.length))!=null&&g.includes("$")&&(A=(N=(d=(w=gn==null?void 0:gn.value)==null?void 0:w.filter(F=>(F==null?void 0:F.condition)==="child"))==null?void 0:d[0])==null?void 0:N.value),l=J+"="+A}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=le.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let J=[];return n==null||n.forEach(F=>{let L={};for(let E in F){let S=E;S!=null&&S.includes("[")||(L[S]=F[E])}J.push(L)}),(_=a==null?void 0:a.contents)==null?void 0:_.map(F=>{var E,S,k;let L=(S=(E=a==null?void 0:a.contents)==null?void 0:E.find(y=>(y==null?void 0:y.key)==="header"))==null?void 0:S.contents;if(L=(k=le.getEqualChild(L))==null?void 0:k.filter(y=>(y==null?void 0:y.label)!=="操作"),(F==null?void 0:F.key)==="tableContents"){let x=le.tableToForm(F==null?void 0:F.contents,L);J==null||J.forEach(O=>{var I,W;for(let Y in O)!((I=x==null?void 0:x[0])!=null&&I.find(fe=>{var de;return(fe==null?void 0:fe.key)===Y||((de=fe==null?void 0:fe.key)==null?void 0:de.includes(Y))}))&&!(x!=null&&x.find(fe=>{var de;return(fe==null?void 0:fe.key)===Y||((de=fe==null?void 0:fe.key)==null?void 0:de.includes(Y))}))||(((W=O[Y])==null?void 0:W[0])!=="!"?x=x==null?void 0:x.filter(fe=>{var de,j;return((de=fe==null?void 0:fe.find(U=>{var Z;return(U==null?void 0:U.key)===Y||((Z=U==null?void 0:U.key)==null?void 0:Z.includes(Y))}))==null?void 0:de.value)===O[Y]||Array.isArray(O==null?void 0:O[Y])&&((j=O==null?void 0:O[Y])==null?void 0:j.find(U=>{var Z;return((Z=fe==null?void 0:fe.find(ee=>{var ge;return(ee==null?void 0:ee.key)===Y||((ge=ee==null?void 0:ee.key)==null?void 0:ge.includes(Y))}))==null?void 0:Z.value)===U}))}):x=x==null?void 0:x.filter(fe=>{var de;return((de=fe==null?void 0:fe.find(j=>{var U;return(j==null?void 0:j.key)===Y||((U=j==null?void 0:j.key)==null?void 0:U.includes(Y))}))==null?void 0:de.value)!==O[Y]}))}),(x==null?void 0:x.length)===0?F.contents=[]:F.contents=x==null?void 0:x.map(O=>{let I={};return O==null||O.forEach(W=>{I[W==null?void 0:W.key]=W==null?void 0:W.value}),I})}return F})}return a==null?void 0:a.contents},zp=a=>a==null?void 0:a.contents,Mp=a=>a==null?void 0:a.contents,Ip=a=>{var l,n,r,i;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let o=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=_t(c.contents,o)),c))}return a==null?void 0:a.contents},Op=a=>{var n,r,i,o,f;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(i=le.analyzeSplitToContent(c,","))==null?void 0:i.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 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(w=>{var d,N;if(m==="Up"){if((w==null?void 0:w.key)==="extraButton"){let _=(d=u==null?void 0:u.split(","))==null?void 0:d.map(J=>({label:J,prop:J}));w.contents=[..._??[],...w.contents]}}else if(m==="Line"&&(w==null?void 0:w.key)==="rowButton"){let _=(N=u==null?void 0:u.split(","))==null?void 0:N.map(J=>({label:J,prop:J}));w.contents=[..._??[],...w.contents]}return w});if(m==="Bottom"||m==="Down"){let w=(f=u==null?void 0:u.split(","))==null?void 0:f.map(d=>({label:d,prop:d}));g.push({key:"bottomButton",contents:w})}return g}return a==null?void 0:a.contents},Lp=a=>a==null?void 0:a.contents,Rp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(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(f=>({label:f,prop:f}))),i}):a==null?void 0:a.contents},$p=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,i=(n=l==null?void 0:l.split(","))==null?void 0:n.map(o=>({label:o,prop:o}));return r.push({key:"bottomButton",contents:i}),r}return a==null?void 0:a.contents},Vp=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(i=>(i.isNoClick=!0,i))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},Fp=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(o=i.contents)==null?void 0:o.map(f=>(f.width=n,f))),i})}return a==null?void 0:a.contents},Pp=a=>{var l,n,r,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:(n=a==null?void 0:a.contents)==null?void 0:n.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(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let o=Oi(a==null?void 0:a.filter),f=Array.isArray(o)?o.map(u=>parseInt(u)).filter(u=>!!u&&!Number.isNaN(u)):[];return f.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,w)=>{const d=w+1;let N=0,_=0;for(let A=0;A<f.length;A++){if(_+=f[A],d<=_){N=A;break}A===f.length-1&&(N=f.length-1)}const J=f[N]||f[f.length-1]||1;return g.width=J,g})}return u}):a==null?void 0:a.contents}return a==null?void 0:a.contents},jp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;return(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o,f,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=>(n!=null&&n.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u)):i.contents=(f=i.contents)==null?void 0:f.map(u=>(n!=null&&n.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u))),i})}return a==null?void 0:a.contents},Hp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const r=o=>(n!=null&&n.find(f=>f===(o==null?void 0:o.prop))&&(o.required=!0),o!=null&&o.children&&Array.isArray(o.children)&&(o.children=o.children.map(f=>r(f))),o);return(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var f,c,u;return(o==null?void 0:o.key)==="header"&&(Array.isArray((f=o==null?void 0:o.contents)==null?void 0:f[0])?o.contents[0]=(u=o.contents[0])==null?void 0:u.map(m=>r(m)):o.contents=(c=o.contents)==null?void 0:c.map(m=>r(m))),o})}return a==null?void 0:a.contents},Up=async a=>{var r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E;const l=M.useUnit(M.pinia),{chooseTitle:n}=M.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let S=await Wr(((i=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:i.parentContent)??((f=(o=n==null?void 0:n.value)==null?void 0:o[0])==null?void 0:f.relatedContent),!1),k=(u=(c=n==null?void 0:n.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(I=>(I==null?void 0:I.key)==="header")?S=(w=S==null?void 0:S[0])==null?void 0:w.compData:S=(N=(d=S==null?void 0:S.filter(I=>{var W;return(W=I==null?void 0:I.compData)==null?void 0:W.find(Y=>(Y==null?void 0:Y.key)==="header")}))==null?void 0:d[0])==null?void 0:N.compData;let y=(_=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:_.contents;Array.isArray(y==null?void 0:y[0])&&(y=y==null?void 0:y[0]),y=((J=y==null?void 0:y.find(I=>I==null?void 0:I.isMainKey))==null?void 0:J.prop)??((A=y==null?void 0:y[0])==null?void 0:A.prop);let x=(L=(F=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.find(I=>(I==null?void 0:I[y])===k);return(E=a==null?void 0:a.contents)==null?void 0:E.map(I=>{var W;return(I==null?void 0:I.key)==="formContent"&&(I.contents=(W=I.contents)==null?void 0:W.map(Y=>(Y.value=x==null?void 0:x[Y==null?void 0:Y.prop],Y))),I})}return a==null?void 0:a.contents},qp=a=>{var l,n,r,i,o;if((l=a==null?void 0:a.extra)!=null&&l.row){let f=a==null?void 0:a.filter;if(f!=null&&f.includes("*")&&(f="({"+((r=(n=f==null?void 0:f.replace("{",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1])),f=(i=f==null?void 0:f.replaceAll("{",""))==null?void 0:i.replaceAll("}",""),(f==null?void 0:f[0])!=="("&&(f="("+f+")"),f.slice(1,(f==null?void 0:f.length)-1)==="undefined")return a==null?void 0:a.contents;let c=le.calculatorAndToOr(f),u=c==null?void 0:c[0],m=(o=a==null?void 0:a.extra)==null?void 0:o.row,g=[];for(let w in u)(u==null?void 0:u[w])===(m==null?void 0:m[w])?g.push(!0):g.push(!1);return g!=null&&g.every(w=>w===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},Wp=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},Gp=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},Kp=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},Yp=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=(l=le.analyzeSplitToContent(r,","))==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)),n.push({key:"stepName",contents:r}),n}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:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},vc={onNumSlice:Tp,onRandomContents:Bp,onConditionContents:Ap,onFatherPaceContents:zp,onPaceContents:Mp,onMainTagContents:Ip,onButtonContents:Op,onPamButtonContents:Lp,onRowButtonContents:Rp,onRelated:Up,onRowNum:Pp,onFixRow:jp,onReqItem:Hp,onBottomButtonContents:$p,onConditionContent:qp,onTabs:Wp,onSinChoice:Gp,onTextSize:Cp,onTextRGBA:Dp,onPosition:_p,onColumnNum:Sp,onSize:Ep,onShowType:Kp,onStepName:Yp,onStep:Jp,onInterfaceTypeContents:Np,onBackGround:wp,onMaxColumn:Fp,onEditRead:Vp,onShowHide:xp},Xp=async(a,l,n="")=>{var f,c,u,m,g,w,d,N,_,J,A,F;let r="";if(((f=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:f.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(m=(u=r==null?void 0:r.replace("(",Sr))==null?void 0:u.split(Sr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(g=le.analyzeSplitToContent(r,","))==null?void 0:g.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L!=null&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),o=a;for(let L in i){let E,S="";E=(N=(d=(w=i==null?void 0:i[L])==null?void 0:w.replace("=",Sr))==null?void 0:d.split(Sr))==null?void 0:N[0],S=(A=(J=(_=i==null?void 0:i[L])==null?void 0:_.replace("=",Sr))==null?void 0:J.split(Sr))==null?void 0:A[1];let k=(F=Cn==null?void 0:Cn.find(y=>(y==null?void 0:y.key)===E))==null?void 0:F.value;if(k){const y=vc[k];o=await y({contents:o,filter:S,extra:l,groupName:n})}}return o},Ro=async(a,l,n="")=>{var c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W;let r="";if(((c=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(u=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:u.contents),r===""||!r)return a;(r==null?void 0:r[0])===","&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(g=(m=r==null?void 0:r.replace("(",Sr))==null?void 0:m.split(Sr))==null?void 0:g[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(w=le.analyzeSplitToContent(r,","))==null?void 0:w.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!=null&&Y.includes("(")||(Y=Y==null?void 0:Y.replaceAll(":","=")),Y)),o=a,f=new Map;i==null||i.forEach(Y=>{var de,j,U;let fe=(de=Y==null?void 0:Y.split("="))==null?void 0:de[0];if(fe==="@MainParam"&&f.get(fe)){let Z=f.get(fe);Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1);let ee=(U=(j=Y==null?void 0:Y.replace("{",Sr))==null?void 0:j.split(Sr))==null?void 0:U[1];ee=Z+","+ee,f.set(fe,ee)}else fe==="@Button"&&f.get(fe)?f.set(Y,Y):f.set(fe,Y)}),i=Array.from(f.values()),i=i==null?void 0:i.sort((Y,fe)=>{var de,j;return((de=Cn==null?void 0:Cn.find(U=>fe==null?void 0:fe.includes(U==null?void 0:U.key)))==null?void 0:de.order)-((j=Cn==null?void 0:Cn.find(U=>Y==null?void 0:Y.includes(U==null?void 0:U.key)))==null?void 0:j.order)});for(let Y in i){let fe,de="";(d=i==null?void 0:i[Y])!=null&&d.includes("(")&&((N=i==null?void 0:i[Y])!=null&&N.includes("@If"))?(fe=(A=(J=(_=i==null?void 0:i[Y])==null?void 0:_.replace("(",Sr))==null?void 0:J.split(Sr))==null?void 0:A[0],de="("+((E=(L=(F=i==null?void 0:i[Y])==null?void 0:F.replace("(",Sr))==null?void 0:L.split(Sr))==null?void 0:E[1])):(fe=(y=(k=(S=i==null?void 0:i[Y])==null?void 0:S.replace("=",Sr))==null?void 0:k.split(Sr))==null?void 0:y[0],de=(I=(O=(x=i==null?void 0:i[Y])==null?void 0:x.replace("=",Sr))==null?void 0:O.split(Sr))==null?void 0:I[1]);let j=(W=Cn==null?void 0:Cn.find(U=>(U==null?void 0:U.key)===fe))==null?void 0:W.value;if(j){const U=vc[j];o=await U({contents:o,filter:de,extra:l,groupName:n})}}return o},mc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},Zp=(a,l)=>{var J,A,F,L,E;const n=Array.isArray(a)?a:[],r=n.find(S=>(S==null?void 0:S.key)==="formContent"),i=Array.isArray(r==null?void 0:r.contents)?r.contents:[],o=((J=n.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:J.contents)??{},f=(i==null?void 0:i[0])??{};let c=((A=l==null?void 0:l.position)==null?void 0:A[0])??(o==null?void 0:o._positionStartRow)??(f==null?void 0:f._positionStartRow),u=((F=l==null?void 0:l.position)==null?void 0:F[1])??(o==null?void 0:o._positionRowSpan)??(f==null?void 0:f._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!u||Number.isNaN(u)||u<1)&&(u=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(o==null?void 0:o._sizeStart)??(f==null?void 0:f._sizeStart),g=((E=l==null?void 0:l.size)==null?void 0:E[1])??(o==null?void 0:o._sizeEnd)??(f==null?void 0:f._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 w=g-m,d=Math.max(1,Math.round(1/w));let N=n.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const k=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:k.map(y=>({...y,width:d,_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g}))}});const _={_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g};return N.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?N=N.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:_}:S):N.push({key:"_gridLayoutMeta",contents:_}),N};let Bi="$R";const Qp=M.useUnit(M.pinia),{selectTitle:ef}=M.storeToRefs(Qp);let af=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],lf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],rf=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],nf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ms=async(a,l,n=!0)=>{let r=[],i=a==null?void 0:a.map(async o=>{var w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl,ha,Ha,ra,Ga,wl,De,ia,Pa,Be,La,al,bl,Tl;let f=(_=(N=(d=(w=o==null?void 0:o.contents)==null?void 0:w.find(Oe=>{var ma;return(ma=Oe==null?void 0:Oe.key)==null?void 0:ma.includes("struct")}))==null?void 0:d.value)==null?void 0:N[0])==null?void 0:_.类型,c=Object.values(o==null?void 0:o.name);c=c==null?void 0:c.reverse();let u=(J=o==null?void 0:o.contents)==null?void 0:J.map(Oe=>Oe==null?void 0:Oe.key),m={comp:f,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:(A=o==null?void 0:o.filter)==null?void 0:A.menuFilter,status:o==null?void 0:o.status,fatherSyncContents:(F=o==null?void 0:o.filter)==null?void 0:F.fatherSyncs,relatedQuotes:(L=o==null?void 0:o.filter)==null?void 0:L.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:(I=(O=(x=(y=(k=o==null?void 0:o.contents)==null?void 0:k.find(Oe=>{var ma;return(ma=Oe==null?void 0:Oe.key)==null?void 0:ma.includes("struct")}))==null?void 0:y.value)==null?void 0:x[0])==null?void 0:O.算法)==null?void 0:I.contents};for(let Oe in c)parseInt(Oe)>=1&&(m[`name${parseInt(Oe)-1}`]=c[Oe]);let g=Array.isArray((W=o==null?void 0:o.filter)==null?void 0:W.menuFilter)?(Y=o==null?void 0:o.filter)==null?void 0:Y.menuFilter:[];if(((fe=g==null?void 0:g.filter(Oe=>Oe==null?void 0:Oe.includes("@If")))==null?void 0:fe.length)>0){let Oe=g==null?void 0:g.filter(Ve=>Ve==null?void 0:Ve.includes("@If"));Oe=Oe==null?void 0:Oe[0],Oe=(j=(de=Oe==null?void 0:Oe.replace("(",Bi))==null?void 0:de.split(Bi))==null?void 0:j[1],Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1),Oe!=null&&Oe.includes("*")&&(Oe=(Z=(U=Oe==null?void 0:Oe.replace("{",Bi))==null?void 0:U.split(Bi))==null?void 0:Z[1],Oe=Oe==null?void 0:Oe.replace("}","")),Oe=le.calculatorAndToOr(Oe);let ma=(l==null?void 0:l.originPath)??"";(ma==null?void 0:ma[(ma==null?void 0:ma.length)-1])==="/"&&(ma=ma==null?void 0:ma.slice(0,(ma==null?void 0:ma.length)-1));let ta=await Wr(ma,!1),xa=(ee=ta==null?void 0:ta.filter(Ve=>(Ve==null?void 0:Ve.comp)==="Table"))==null?void 0:ee[0];xa=(Ie=(ge=xa==null?void 0:xa.compData)==null?void 0:ge.find(Ve=>(Ve==null?void 0:Ve.key)==="tableContents"))==null?void 0:Ie.contents;let ga=(B=(ue=ef.value)==null?void 0:ue.find(Ve=>(Ve==null?void 0:Ve.condition)==="child"))==null?void 0:B.value;xa=(oe=xa==null?void 0:xa.map(Ve=>{for(let ml in Ve)if((Ve==null?void 0:Ve[ml])===ga)return Ve}))==null?void 0:oe.filter(Ve=>Ve),xa=xa==null?void 0:xa[0],Oe=Oe==null?void 0:Oe[0];let fl=[];for(let Ve in Oe){let ml="";Ja.isObject(xa)&&(ml=(ye=(q=Object.keys(xa))==null?void 0:q.filter(Ne=>Ne==null?void 0:Ne.includes("."+Ve)))==null?void 0:ye[0]),ml!==""&&(xa!=null&&xa[ml])&&(Oe==null?void 0:Oe[Ve])===(xa==null?void 0:xa[ml])||xa!=null&&xa[Ve]&&(Oe==null?void 0:Oe[Ve])===(xa==null?void 0:xa[Ve])?fl.push(!0):fl.push(!1)}if(fl!=null&&fl.some(Ve=>Ve===!1)&&((Ae=l==null?void 0:l.originPath)==null?void 0:Ae[((Ke=l==null?void 0:l.originPath)==null?void 0:Ke.length)-1])!=="/")return}if(f==="Table"||f==="Method"){!n&&((Qe=m==null?void 0:m.fatherSyncContents)==null?void 0:Qe.length)>0;let Oe=((Ea=o==null?void 0:o.contents)==null?void 0:Ea.find(Da=>{var ul;return(ul=Da==null?void 0:Da.key)==null?void 0:ul.includes("content")}))||[],ma=[];m.comp="Table",Oe.value=(ne=Oe==null?void 0:Oe.value)==null?void 0:ne.sort((Da,ul)=>parseInt(Da==null?void 0:Da.id)-parseInt(ul==null?void 0:ul.id)),Oe.value=(ua=Oe==null?void 0:Oe.value)==null?void 0:ua.map(Da=>{let ul={};for(let Za in Da)JSON.stringify(Da==null?void 0:Da[Za])==="{}"?ul[Za]="":ul[Za]=Da==null?void 0:Da[Za];return ul}),ma.push({key:"tableContents",contents:Oe==null?void 0:Oe.value});let ta=(me=(se=(Le=(Re=(Pe=o==null?void 0:o.contents)==null?void 0:Pe.find(Da=>{var ul;return(ul=Da==null?void 0:Da.key)==null?void 0:ul.includes("struct")}))==null?void 0:Re.value)==null?void 0:Le[0])==null?void 0:se.结构)==null?void 0:me.contents;Array.isArray(ta==null?void 0:ta[0])?ta[0]=(qe=ta==null?void 0:ta[0])==null?void 0:qe.filter(Da=>(Da==null?void 0:Da.prop)!=="sort"&&(Da==null?void 0:Da.prop)!=="relatedId"):ta=ta==null?void 0:ta.filter(Da=>(Da==null?void 0:Da.prop)!=="sort"&&(Da==null?void 0:Da.prop)!=="relatedId"),ma.push({key:"header",contents:ta}),ma.push({key:"filter",contents:(ae=(V=(H=(_a=(ka=o==null?void 0:o.contents)==null?void 0:ka.find(Da=>{var ul;return(ul=Da==null?void 0:Da.key)==null?void 0:ul.includes("struct")}))==null?void 0:_a.value)==null?void 0:H[0])==null?void 0:V.引用)==null?void 0:ae.contents}),ma.push({key:"calculator",contents:m==null?void 0:m.calculatorFilters});let xa=af,ga=M.cloneDeep(lf);f==="Method"&&ga.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ta==null?void 0:ta[0])&&((pe=ta==null?void 0:ta[0])==null?void 0:pe.prop)==="disabled"&&(xa=rf,ga=nf);const fl=["推力","真空","压力","温度","流量"],Ve=m.name;Ve&&fl.includes(Ve)&&(xa=[...xa],xa.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let ml=[];if(!Array.isArray(ta==null?void 0:ta[0])&&(ta!=null&&ta.some(Da=>{var ul;return(Da==null?void 0:Da.calculatorFilter)&&((ul=Da==null?void 0:Da.calculatorFilter)==null?void 0:ul.includes("Manual"))}))){let Da=(ve=ta==null?void 0:ta.map(ul=>ul==null?void 0:ul.calculatorFilter))==null?void 0:ve.filter(ul=>ul&&(ul==null?void 0:ul.includes("Manual")));Da==null||Da.forEach(ul=>{var Nl;let Za=le.analyzeSplitToContent(ul,",");if(Za=Za==null?void 0:Za.map(Ba=>((Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1])===","&&(Ba=Ba==null?void 0:Ba.slice(0,(Ba==null?void 0:Ba.length)-1)),Ba)),Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Extent"))&&(Ba==null?void 0:Ba.includes("Row")))&&(Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Button"))&&(Ba==null?void 0:Ba.includes(","))))){let Ba=Za==null?void 0:Za.find(Rl=>Rl==null?void 0:Rl.includes("@FunctionButton"));Ba=(Nl=Ba==null?void 0:Ba.split("="))==null?void 0:Nl[1],Ba=Ba==null?void 0:Ba.slice(1,(Ba==null?void 0:Ba.length)-1),Ba=Ba==null?void 0:Ba.split(","),Ba=Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1],ml.push(Ba)}}),ml=[...new Set(ml)],ml=ml==null?void 0:ml.map(ul=>({label:ul,prop:ul,type:"methodButton"}))}else if(Array.isArray(ta==null?void 0:ta[0])&&((da=le.getColumnChild(ta==null?void 0:ta[0]))!=null&&da.some(Da=>{var ul;return(Da==null?void 0:Da.calculatorFilter)&&((ul=Da==null?void 0:Da.calculatorFilter)==null?void 0:ul.includes("Manual"))}))){let Da=(Ue=(ca=le.getColumnChild(ta==null?void 0:ta[0]))==null?void 0:ca.map(ul=>ul==null?void 0:ul.calculatorFilter))==null?void 0:Ue.filter(ul=>ul&&(ul==null?void 0:ul.includes("Manual")));Da==null||Da.forEach(ul=>{var Nl;let Za=le.analyzeSplitToContent(ul,",");if(Za=Za==null?void 0:Za.map(Ba=>((Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1])===","&&(Ba=Ba==null?void 0:Ba.slice(0,(Ba==null?void 0:Ba.length)-1)),Ba)),Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Extent"))&&(Ba==null?void 0:Ba.includes("Row")))&&(Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Button"))&&(Ba==null?void 0:Ba.includes(","))))){let Ba=Za==null?void 0:Za.find(Rl=>Rl==null?void 0:Rl.includes("@FunctionButton"));Ba=(Nl=Ba==null?void 0:Ba.split("="))==null?void 0:Nl[1],Ba=Ba==null?void 0:Ba.slice(1,(Ba==null?void 0:Ba.length)-1),Ba=Ba==null?void 0:Ba.split(","),Ba=Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1],ml.push(Ba)}}),ml=[...new Set(ml)],ml=ml==null?void 0:ml.map(ul=>({label:ul,prop:ul,type:"methodButton"}))}if(ma.push({key:"extraButton",contents:xa}),ma.push({key:"rowButton",contents:[...ga,...ml]}),m.compData=await Ro(ma,l,m==null?void 0:m.nameContents),(Sa=m.compData)!=null&&Sa.find(Da=>(Da==null?void 0:Da.key)==="tab")&&(m.tab=(Te=(Ma=m.compData)==null?void 0:Ma.find(Da=>(Da==null?void 0:Da.key)==="tab"))==null?void 0:Te.contents),(Fa=m.compData)!=null&&Fa.find(Da=>(Da==null?void 0:Da.key)==="step")&&(m.step=(oa=(Na=m.compData)==null?void 0:Na.find(Da=>(Da==null?void 0:Da.key)==="step"))==null?void 0:oa.contents),(ja=m.compData)!=null&&ja.find(Da=>(Da==null?void 0:Da.key)==="choice")&&(m.choice=(je=(aa=m.compData)==null?void 0:aa.find(Da=>(Da==null?void 0:Da.key)==="choice"))==null?void 0:je.contents),(pa=m.compData)!=null&&pa.find(Da=>(Da==null?void 0:Da.key)==="hideContents")&&(m.isHidden=((ce=(te=m.compData)==null?void 0:te.find(Da=>(Da==null?void 0:Da.key)==="hideContents"))==null?void 0:ce.contents)??!1),(Se=m.compData)!=null&&Se.find(Da=>(Da==null?void 0:Da.key)==="newType")){let Da=(fa=(we=m.compData)==null?void 0:we.find(ul=>(ul==null?void 0:ul.key)==="newType"))==null?void 0:fa.contents;m.comp=Da,m.compData=(ea=m.compData)==null?void 0:ea.filter(ul=>(ul==null?void 0:ul.key)!=="newType")}let Ne="",Pl=(Ta=m==null?void 0:m.compData)==null?void 0:Ta.filter(Da=>(Da==null?void 0:Da.key)==="fixType");if((Pl==null?void 0:Pl.length)>0&&n&&(Ne=(Ee=Pl==null?void 0:Pl[0])==null?void 0:Ee.contents,m.comp=Ne),((Me=m==null?void 0:m.calculatorFilters)==null?void 0:Me.length)>0){let Da=[],ul=[],Za=[];(Fe=m==null?void 0:m.calculatorFilters)==null||Fe.forEach(Nl=>{var Rl,Er,tn,Fr,ir,Ur,Zr;let Ba=(tn=(Er=(Rl=Nl==null?void 0:Nl.calculatorFilter)==null?void 0:Rl.replace("(",Bi))==null?void 0:Er.split(Bi))==null?void 0:tn[1];Ba=(Fr=Ba==null?void 0:Ba.split(","))==null?void 0:Fr[0],Ba=Ba??(Nl==null?void 0:Nl.functionName),(ir=Nl==null?void 0:Nl.calculatorFilter)!=null&&ir.includes("Up")&&Da.push({label:Ba,prop:Ba,type:"methodButton"}),(Ur=Nl==null?void 0:Nl.calculatorFilter)!=null&&Ur.includes("Line")&&ul.push({label:Ba,prop:Ba,type:"methodButton"}),(Zr=Nl==null?void 0:Nl.calculatorFilter)!=null&&Zr.includes("Down")&&Za.push({label:Ba,prop:Ba,type:"methodButton"})}),m.compData=($e=m.compData)==null?void 0:$e.map(Nl=>((Nl==null?void 0:Nl.key)==="extraButton"&&(Nl.contents=[...Da??[],...Nl.contents]),(Nl==null?void 0:Nl.key)==="rowButton"&&(Nl.contents=[...ul??[],...Nl.contents]),(Nl==null?void 0:Nl.key)==="bottomButton"&&(Nl.contents=[...Za??[],...Nl.contents]),Nl)),(Za==null?void 0:Za.length)>0&&!((tl=(he=m.compData)==null?void 0:he.find(Nl=>(Nl==null?void 0:Nl.key)==="bottomButton"))!=null&&tl.contents)&&m.compData.push({key:"bottomButton",contents:Za})}}else if(f==="Form"){let Oe=[],ma=(Hl=(Ml=(El=o==null?void 0:o.contents)==null?void 0:El.find(Ve=>{var ml;return(ml=Ve==null?void 0:Ve.key)==null?void 0:ml.includes("content")}))==null?void 0:Ml.value)==null?void 0:Hl[0],ta=[],xa=Array.isArray((Bl=o==null?void 0:o.filter)==null?void 0:Bl.menuFilter)?(jl=o==null?void 0:o.filter)==null?void 0:jl.menuFilter:[];xa==null||xa.forEach(Ve=>{if(Ve!=null&&Ve.includes("@Param(Hide=Yes, prop=")||Ve!=null&&Ve.includes("(Hide=Yes, prop=")){const ml=Ve==null?void 0:Ve.match(/prop=([^,)]+)/);ml!=null&&ml[1]&&ta.push(ml==null?void 0:ml[1])}});let ga=(Jl=(Kl=(Wa=($l=(el=o==null?void 0:o.contents)==null?void 0:el.find(Ve=>{var ml;return(ml=Ve==null?void 0:Ve.key)==null?void 0:ml.includes("struct")}))==null?void 0:$l.value)==null?void 0:Wa[0])==null?void 0:Kl.结构)==null?void 0:Jl.contents,fl=(ar=ga==null?void 0:ga.map(Ve=>(Ve.value=ma==null?void 0:ma[Ve==null?void 0:Ve.prop],Ve)))==null?void 0:ar.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="sort"&&(Ve==null?void 0:Ve.prop)!=="relatedId");fl=fl==null?void 0:fl.map(Ve=>(ta!=null&&ta.includes(Ve==null?void 0:Ve.prop)&&(Ve.isHideInForm=!0),Ve)),Oe.push({key:"filter",contents:(ha=(sl=(ya=(br=(xl=o==null?void 0:o.contents)==null?void 0:xl.find(Ve=>{var ml;return(ml=Ve==null?void 0:Ve.key)==null?void 0:ml.includes("struct")}))==null?void 0:br.value)==null?void 0:ya[0])==null?void 0:sl.引用)==null?void 0:ha.contents}),Oe.push({key:"formContent",contents:fl}),Oe.push({key:"paramHideProps",contents:ta}),m.compData=await Xp(Oe,l,m==null?void 0:m.nameContents),(Ha=m.compData)!=null&&Ha.find(Ve=>(Ve==null?void 0:Ve.key)==="tab")&&(m.tab=(Ga=(ra=m.compData)==null?void 0:ra.find(Ve=>(Ve==null?void 0:Ve.key)==="tab"))==null?void 0:Ga.contents),(wl=m.compData)!=null&&wl.find(Ve=>(Ve==null?void 0:Ve.key)==="step")&&(m.step=(ia=(De=m.compData)==null?void 0:De.find(Ve=>(Ve==null?void 0:Ve.key)==="step"))==null?void 0:ia.contents),(Pa=m.compData)!=null&&Pa.find(Ve=>(Ve==null?void 0:Ve.key)==="choice")&&(m.choice=(La=(Be=m.compData)==null?void 0:Be.find(Ve=>(Ve==null?void 0:Ve.key)==="choice"))==null?void 0:La.contents),(al=m.compData)!=null&&al.find(Ve=>(Ve==null?void 0:Ve.key)==="hideContents")&&(m.isHidden=((Tl=(bl=m.compData)==null?void 0:bl.find(Ve=>(Ve==null?void 0:Ve.key)==="hideContents"))==null?void 0:Tl.contents)??!1)}return m});return r=await Promise.all(i),r=r==null?void 0:r.filter(o=>!(o!=null&&o.isHidden)),r};let ys;function of(a){return console.log(2321,ys),Ja.axios.post(ys+"/api/word-report/build-by-upload",a)}const tf=M.useUnit(M.pinia),{selectTitle:sf}=M.storeToRefs(tf),cf=async a=>{var n;let l=(n=le.analyzerStringToArray(a,[":","@","="]))==null?void 0:n[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(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)),l=l==null?void 0:l.map(async r=>{var o,f,c,u,m,g,w,d,N,_,J,A,F,L,E;let i=le.analyzeSplitToContent(r,"=");if(!(r!=null&&r.includes("=="))){let S=i==null?void 0:i[0],k=i==null?void 0:i[1],y=(o=k==null?void 0:k.split("*"))==null?void 0:o[0],x=(f=k==null?void 0:k.split("*"))==null?void 0:f[1];x=(c=le.analyzeSplitToContent(x,":"))==null?void 0:c.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 O=x==null?void 0:x.filter(W=>(W==null?void 0:W[0])!=="{"),I=x==null?void 0:x.filter(W=>(W==null?void 0:W[0])==="{");if(I=I==null?void 0:I[0],I=I==null?void 0:I.slice(1,(I==null?void 0:I.length)-1),I=(u=le.analyzeSplitToContent(x,":"))==null?void 0:u.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)),y!=null&&y.includes("{")){let W=(g=(m=sf.value)==null?void 0:m.find(fe=>(fe==null?void 0:fe.condition)==="child"))==null?void 0:g.value;y=y==null?void 0:y.slice(1,y==null?void 0:y.length),y=(d=(w=y==null?void 0:y.replace("{",""))==null?void 0:w.replace("}",""))==null?void 0:d.replace(":","/"),y=y+"/"+W;let Y=await Wr(y,!1);Y=Y==null?void 0:Y.find(fe=>(fe==null?void 0:fe.name)===(O==null?void 0:O[(O==null?void 0:O.length)-1])),Y=(_=(N=Y==null?void 0:Y.compData)==null?void 0:N.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:_.contents,Y=Y==null?void 0:Y.find(fe=>(fe==null?void 0:fe.prop)===(I==null?void 0:I[(I==null?void 0:I.length)-1])),k=Y}else{y=y==null?void 0:y.slice(1,y==null?void 0:y.length),y=(A=(J=y==null?void 0:y.replace("{",""))==null?void 0:J.replace("}",""))==null?void 0:A.replace(":","/");let W=await Wr(y,!1);W=W==null?void 0:W.find(Y=>(Y==null?void 0:Y.name)===(O==null?void 0:O[(O==null?void 0:O.length)-1])),W=(L=(F=W==null?void 0:W.compData)==null?void 0:F.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:L.contents,W=(E=W==null?void 0:W.find(Y=>(Y==null?void 0:Y.prop)===(I==null?void 0:I[(I==null?void 0:I.length)-1])))==null?void 0:E.value,k=W}r=S+k}return r}),l=await Promise.all(l),l=l==null?void 0:l.join(","),l="{"+l+"}",l},uf=M.useLoginState(M.pinia),{loginUserInfo:Wn}=M.storeToRefs(uf),df=M.useUnit(M.pinia),{selectTitle:yc}=M.storeToRefs(df),pf=M.useMenuState(M.pinia),{localFiles:ff}=M.storeToRefs(pf),hf=async(a,l="Manual",n=[])=>{var f;let r=a,i=(f=r==null?void 0:r.filter(c=>{var u;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((u=c==null?void 0:c.calculatorFilter)==null?void 0:u.includes(l))||l!=="Manual")}))==null?void 0:f.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),o=r==null?void 0:r.map(async c=>{let u=i==null?void 0:i.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await It(c,u,r,l,r,n),c});return o=await Promise.all(o),o},St=async(a,l,n="Manual",r=[],i=[],o=[])=>{var g;let f=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(w=>{var d;return(w==null?void 0:w.calculatorFilter)&&((d=w==null?void 0:w.calculatorFilter)==null?void 0:d.includes(n))||(w==null?void 0:w.calculatorFilter)===""&&(w==null?void 0:w.functionName)}))==null?void 0:g.map(w=>({prop:w==null?void 0:w.prop,label:w==null?void 0:w.label,methods:w==null?void 0:w.calculatorFilter,functionName:w==null?void 0:w.functionName,functionRelatedWords:w==null?void 0:w.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&&(f=[f==null?void 0:f[0]]);let m=f==null?void 0:f.map(async w=>(w=await It(w,u,c,n,f,r,o),w));return m=await Promise.all(m),m},vf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=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))),n==null||n.forEach(f=>{var c;if(l!=null&&l[f]){let u=l==null?void 0:l[f];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)===f))==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[r]=o===void 0?void 0:o?1:0,l},zr=a=>{const[l,n,r]=M.cloneDeep(a).split(":").map(Number);let i=+a;return!a||!(a!=null&&a.includes(":"))?i:(l??0)*3600+(n??0)*60+(r??0)},ei=a=>{const l=o=>o.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),i=a%60;return`${l(n)}:${l(r)}:${parseInt(l(i))}`},mf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J,A,F;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let L=+(l==null?void 0:l[u]);c=c+L}else c=zr(c.toString())+zr((d=l==null?void 0:l[u])==null?void 0:d.toString()),c=ei(c)}else if(o==="Row"){let L=(N=i==null?void 0:i.find(E=>(E==null?void 0:E.label)===u))==null?void 0:N.prop;if(!((J=Number.isNaN(l==null?void 0:l[L])?"":(_=l==null?void 0:l[L])==null?void 0:_.toString())!=null&&J.includes(":"))&&!((A=c==null?void 0:c.toString())!=null&&A.includes(":"))){let E=+((l==null?void 0:l[L])??0);c=c+E}else c=zr(c==null?void 0:c.toString())+zr((F=(l==null?void 0:l[L])??0)==null?void 0:F.toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w+d},0)}return l[r]=c,l},yf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let A=+(l==null?void 0:l[u]);c=c===0?c+A:c-A}else c=c===0?zr(c.toString())+zr(l==null?void 0:l[u].toString()):zr(c.toString())-zr(l==null?void 0:l[u].toString()),c=ei(c)}else if(o==="Row"){let A=(d=i==null?void 0:i.find(F=>(F==null?void 0:F.label)===u))==null?void 0:d.prop;if(!((_=Number.isNaN(l==null?void 0:l[A])?"":(N=l==null?void 0:l[A])==null?void 0:N.toString())!=null&&_.includes(":"))&&!((J=c==null?void 0:c.toString())!=null&&J.includes(":"))){let F=+((l==null?void 0:l[A])??0);c=c===0?c+F:c-F}else c=c===0?zr(c.toString())+zr(((l==null?void 0:l[A])??0).toString()):zr(c.toString())-zr(((l==null?void 0:l[A])??0).toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w-d},0)}return l[r]=c,l},gf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let A=+(l==null?void 0:l[u]);c=c===0?c+A:c*A}else c=c===0?zr(c.toString())+zr(l==null?void 0:l[u].toString()):zr(c.toString())*zr(l==null?void 0:l[u].toString()),c=ei(c)}else if(o==="Row"){let A=(d=i==null?void 0:i.find(F=>(F==null?void 0:F.label)===u))==null?void 0:d.prop;if(!(l!=null&&l[A]))c=void 0;else if(!((_=Number.isNaN(l==null?void 0:l[A])?"":(N=l==null?void 0:l[A])==null?void 0:N.toString())!=null&&_.includes(":"))&&!((J=c==null?void 0:c.toString())!=null&&J.includes(":"))){let F=+((l==null?void 0:l[A])??0);c=c===0?c+F:c*F}else c=c===0?zr(c.toString())+zr(((l==null?void 0:l[A])??0).toString()):zr(c.toString())*zr(((l==null?void 0:l[A])??0).toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w*d},0)}return l[r]=c,l},bf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let A=+(l==null?void 0:l[u]);c=c===0?c+A:c/A}else c=c===0?zr(c.toString())+zr(l==null?void 0:l[u].toString()):zr(c.toString())/zr(l==null?void 0:l[u].toString()),c=ei(c)}else if(o==="Row"){let A=(d=i==null?void 0:i.find(F=>(F==null?void 0:F.label)===u))==null?void 0:d.prop;if(!((_=Number.isNaN(l==null?void 0:l[A])?"":(N=l==null?void 0:l[A])==null?void 0:N.toString())!=null&&_.includes(":"))&&!((J=c==null?void 0:c.toString())!=null&&J.includes(":"))){let F=+((l==null?void 0:l[A])??0);c=c===0?c+F:c/F}else c=c===0?zr(c.toString())+zr(((l==null?void 0:l[A])??0).toString()):zr(c.toString())/zr(((l==null?void 0:l[A])??0).toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w/d},0)}return l[r]=c.toFixed(2),l},kf=async a=>{var o,f,c,u,m,g,w,d,N,_,J;let l=(o=a==null?void 0:a.valueString)==null?void 0:o[0],n=(f=a==null?void 0:a.contents)==null?void 0:f.calculatorFilter,r=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 A=(u=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:u.replaceAll(":","/"),F=await Wr(A,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(F=(g=F==null?void 0:F.filter(E=>(E==null?void 0:E.name)===L))==null?void 0:g[0],n!==""){let E=F.compData;E=E==null?void 0:E.filter(S=>(S==null?void 0:S.key)!=="filter"),E.push({key:"filter",contents:"("+n+")"}),E=await Ro(E,{}),r=(d=(w=E==null?void 0:E.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:d.length}else r=(J=(_=(N=F==null?void 0:F.compData)==null?void 0:N.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:J.length}return i.value=r,i},xf=async a=>{var w,d,N,_,J,A,F,L,E;let l=(w=a==null?void 0:a.valueString)==null?void 0:w[0],n=a==null?void 0:a.filter;n=(n==null?void 0:n.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 r=(N=(d=l==null?void 0:l.split("*"))==null?void 0:d[0])==null?void 0:N.replaceAll(":","/"),i=(_=l==null?void 0:l.split("*"))==null?void 0:_[1],o=(J=i==null?void 0:i.split("{"))==null?void 0:J[0],f=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 Wr(r,!1);if(f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1),f=f==null?void 0:f.split(":"),f=f==null?void 0:f[(f==null?void 0:f.length)-1],c=c==null?void 0:c.find(S=>(S==null?void 0:S.name)===o),c=(F=(A=c==null?void 0:c.compData)==null?void 0:A.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:F.contents,(n==null?void 0:n.length)>0){n=(E=(L=n==null?void 0:n.replace("(","$R"))==null?void 0:L.split("$R"))==null?void 0:E[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1);let S=le.calculatorAndToOr(n);S==null||S.forEach(k=>{for(let y in k)k[y]!=="!"?c=c==null?void 0:c.filter(x=>{var O;return(x==null?void 0:x[y])===(k==null?void 0:k[y])||(x==null?void 0:x[(O=Object.keys(x))==null?void 0:O.find(I=>I==null?void 0:I.includes("."+y))])===(k==null?void 0:k[y])}):c=c==null?void 0:c.filter(x=>{var O;return(x==null?void 0:x[y])!==(k==null?void 0:k[y])&&(x==null?void 0:x[(O=Object.keys(x))==null?void 0:O.find(I=>I==null?void 0:I.includes("."+y))])!==(k==null?void 0:k[y])})})}c=c==null?void 0:c.map(S=>S==null?void 0:S[f]);let u=[...new Set(c)],m=[],g={};return u==null||u.forEach(S=>{var y;let k=(y=c==null?void 0:c.filter(x=>S===x))==null?void 0:y.length;g[S]=k}),m.push(g),{xAxis:u,yAxis:m}},wf=async a=>{var r,i;let l=a==null?void 0:a.valueString;l=l==null?void 0:l[0];let n={};if((l==null?void 0:l[0])==="{"){l=l==null?void 0:l.slice(1,l.length-1),l=(r=le.analyzeSplitToContent(l,","))==null?void 0:r.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 w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe;let u=(d=(w=c==null?void 0:c.replace("=","$R"))==null?void 0:w.split("$R"))==null?void 0:d[0],m=(_=(N=c==null?void 0:c.replace("=","$R"))==null?void 0:N.split("$R"))==null?void 0:_[1],g="";if(m==="LoginUser")g=((J=Wn.value)==null?void 0:J.姓名)||((A=Wn.value)==null?void 0:A.account)||((F=Wn.value)==null?void 0:F.账号);else if((m==null?void 0:m[0])==="$"){let de=(L=m==null?void 0:m.split("*"))==null?void 0:L[0],j=(E=m==null?void 0:m.split("*"))==null?void 0:E[1],U=j;if((de==null?void 0:de[0])==="$"&&(de=de==null?void 0:de.slice(1,de==null?void 0:de.length)),de!=null&&de.includes("$")){let ee=(S=de==null?void 0:de.split("$"))==null?void 0:S[0],ge=(k=de==null?void 0:de.split("$"))==null?void 0:k[1],Ie=(y=ee==null?void 0:ee.split(":"))==null?void 0:y[0],ue=(I=(O=(x=yc.value)==null?void 0:x.filter(B=>(B==null?void 0:B.condition)==="child"))==null?void 0:O[0])==null?void 0:I.value;ge=ge==null?void 0:ge.replaceAll(":","/"),de=Ie+"/"+ge+"/"+ue}else de=de==null?void 0:de.replaceAll(":","/");j=j==null?void 0:j.split(":"),j=j==null?void 0:j.find((ee,ge)=>ge===(j==null?void 0:j.length)-2),U=U==null?void 0:U.split(":"),U=U==null?void 0:U.find((ee,ge)=>ge===(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));let Z=await Wr(de,!1);Z=Z==null?void 0:Z.find(ee=>(ee==null?void 0:ee.name)===j),Z=(Y=(W=Z==null?void 0:Z.compData)==null?void 0:W.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:Y.contents,g=(fe=Z==null?void 0:Z[0])==null?void 0:fe[U]}else g=m;n[u]=g});await Promise.all(o);let f=(i=a==null?void 0:a.valueString)==null?void 0:i[1];n.menuPathContent=f}return n},_f=async a=>{var A,F,L,E,S,k,y;let l=a==null?void 0:a.valueString,n=l==null?void 0:l.filter(x=>(x==null?void 0:x.includes(".docx"))||(x==null?void 0:x.includes(".doc")));n=n==null?void 0:n[0];let r=l==null?void 0:l.filter(x=>!(x!=null&&x.includes(".docx"))&&!(x!=null&&x.includes(".doc")));r=r==null?void 0:r[0];let i=(F=a==null?void 0:a.compNames)==null?void 0:F[((A=a==null?void 0:a.compNames)==null?void 0:A.length)-1],o=((S=(E=(L=yc.value)==null?void 0:L.filter(x=>(x==null?void 0:x.condition)==="child"))==null?void 0:E[0])==null?void 0:S.value)??"",f=ff.value;o!==""&&(f=(k=f==null?void 0:f.find(x=>(x==null?void 0:x.path)===o))==null?void 0:k.children),f=(y=f==null?void 0:f.find(x=>(x==null?void 0:x.name)===i))==null?void 0:y.children;let c=f==null?void 0:f.find(x=>(x==null?void 0:x.name)===n),u=f==null?void 0:f.find(x=>(x==null?void 0:x.name)===r);u=u==null?void 0:u.url,u=u==null?void 0:u.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"),c=c==null?void 0:c.url,c=c==null?void 0:c.replace(/^file:\/\//,"file:///").replace(/\\/g,"/");const g=await(await fetch(c)).blob();let w=c.split(/[\\/]/).pop();const d=new File([g],w,{type:g.type||"application/octet-stream"}),N=new FormData;N.append("TemplateFile",d);let _=await fetch(u);_=await _.text(),_=await cf(_),N.append("RawContent",_);let J=await of(N);console.log(232,J)},vo={Sum:mf,Substract:yf,Multiple:gf,Divide:bf,Compare:vf,VecDimCount:kf,Approval:wf,VecRepCount:xf,AutoReportGen:_f},It=async(a,l,n,r="Auto",i,o=[],f=[])=>{var w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U;let c=a,u=[],m=await M.getPageDataApi({platId:parseInt((w=Wn==null?void 0:Wn.value)==null?void 0:w.plat_id),pageName:"menu"});m=(_=(N=(d=m==null?void 0:m.data)==null?void 0:d.result)==null?void 0:N.filter(Z=>(Z==null?void 0:Z.property_name)===""))==null?void 0:_[0];let g=[];if(m!=null&&m.object_name){m=m==null?void 0:m.object_name;let Z=await M.getPageDataApi({platId:parseInt((J=Wn==null?void 0:Wn.value)==null?void 0:J.plat_id),pageName:m});Z=(S=(E=(L=(F=(A=Z==null?void 0:Z.data)==null?void 0:A.result)==null?void 0:F[0])==null?void 0:L.contents)==null?void 0:E.find(ee=>{var ge;return(ge=ee==null?void 0:ee.key)==null?void 0:ge.includes("content")}))==null?void 0:S.value,u=(k=Z==null?void 0:Z.map(ee=>({functionName:ee==null?void 0:ee.函数名称,functionContent:ee==null?void 0:ee.输出值})))==null?void 0:k.filter(ee=>(ee==null?void 0:ee.functionContent)!==""),u==null||u.forEach(ee=>{g.push(ee.functionName),vo[ee.functionName]=new Function("return "+ee.functionContent)()})}if((l==null?void 0:l.length)===0)return c;for(let Z in l){let ee=(y=l==null?void 0:l[Z])==null?void 0:y.functionName;const ge=vo==null?void 0:vo[ee];let Ie=(x=l==null?void 0:l[Z])==null?void 0:x.methods;if(Ie=le.analyzeSplitToContent(Ie,","),(O=Ie==null?void 0:Ie.find(ue=>ue==null?void 0:ue.includes("@Type")))!=null&&O.includes(r)||!(Ie!=null&&Ie.find(ue=>ue==null?void 0:ue.includes("@Type")))&&r==="Manual"||r==="Auto"||(Ie==null?void 0:Ie.length)===0){let ue=((Y=(W=(I=Ie==null?void 0:Ie.find(B=>B==null?void 0:B.includes("@Extent")))==null?void 0:I.replace(":","="))==null?void 0:W.split("="))==null?void 0:Y[1])??[];if(await new Function("return ")(),(g==null?void 0:g.length)>0&&g.find(B=>B===ee)){let B="";try{let q=(fe=l==null?void 0:l[Z])==null?void 0:fe.functionRelatedWords,ye=(o==null?void 0:o.length)>0?o==null?void 0:o.map(Ae=>{var Qe;return Ae==null?void 0:Ae[(Qe=l==null?void 0:l[Z])==null?void 0:Qe.prop]}):["0"];ye=ye==null?void 0:ye.map(Ae=>Ae==null?void 0:Ae.slice((Ae==null?void 0:Ae.length)-5,Ae==null?void 0:Ae.length)),ye=ye==null?void 0:ye.map(Ae=>le.isNumber(parseInt(Ae))&&parseInt(Ae)?parseInt(Ae):0);let Ke=Math.max(...ye);q=q==null?void 0:q.map(Ae=>{if(Ae!=null&&Ae.includes("'"))return Ae==null?void 0:Ae.replaceAll("'","");if(Ae!=null&&Ae.includes("@"))return Ke+1;{let Qe=Object.keys(c);return Ae=(c==null?void 0:c[Ae])??(c==null?void 0:c[Qe==null?void 0:Qe.find(Ea=>Ea==null?void 0:Ea.includes("."+Ae))]),Ae}}),B=ge(...q)}catch(q){Ja.ElMessage.warning("关联数据出现错误,"+q.message)}let oe=(de=l==null?void 0:l[Z])==null?void 0:de.prop;c[oe]=B}else c=await ge({contents:c,valueString:(j=l==null?void 0:l[Z])==null?void 0:j.functionRelatedWords,prop:(U=l==null?void 0:l[Z])==null?void 0:U.prop,filter:Ie,headers:n,typeString:ue,allContents:i,compNames:f})}}return c},Sf=M.useLoginState(M.pinia),{loginUserInfo:bn}=M.storeToRefs(Sf),Ef=M.useMenuState(M.pinia),{activeMenuPath:gs,currentMenuPath:mo}=M.storeToRefs(Ef),gc=M.useUnit(M.pinia);let bs="$R";const{selectTitle:Mi}=M.storeToRefs(gc),bc=async(a,l)=>{var f,c,u,m,g,w,d,N,_,J,A,F,L;let n=gs.value,r="",i=((f=Mi==null?void 0:Mi.value)==null?void 0:f.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(u=a==null?void 0:a[0])==null?void 0:u.father_name);let o=[];if(r!==""){let E=r;(E==null?void 0:E[(E==null?void 0:E.length)-1])==="/"&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1));let S=await Wr(E,!1);S=(m=S==null?void 0:S[0])==null?void 0:m.compData;let k=(g=S==null?void 0:S.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:g.contents;k=((w=k==null?void 0:k.find(x=>x==null?void 0:x.isMainKey))==null?void 0:w.prop)??((d=k==null?void 0:k[0])==null?void 0:d.prop);let y=(_=(N=S==null?void 0:S.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:N.contents)==null?void 0:_.map(x=>({label:x==null?void 0:x[k],value:x==null?void 0:x[k]}));o=(J=r==null?void 0:r.split("/"))==null?void 0:J.map(x=>(x===""?i?(i.isShow=!0,x=i):x={value:x,condition:"child",options:y,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:x={condition:"parent",value:x.trim(),isShow:!0},x))}if(n!==""){let E=(A=n==null?void 0:n.split("/"))==null?void 0:A.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((F=E==null?void 0:E[0])==null?void 0:F.value)===((L=o==null?void 0:o[0])==null?void 0:L.value)&&(E=E==null?void 0:E.filter((S,k)=>k!==0)),o=[...o??[],...E??[]]}r===""&&i&&((i==null?void 0:i.parentContent)!==gs.value&&(i.isShow=!1),(i==null?void 0:i.value)!==""&&o.push(i)),gc.setSelectTitle(o)},Cf=async a=>{var o,f,c,u,m,g,w,d,N;let l=await M.getPageDataApi({platId:parseInt((o=bn==null?void 0:bn.value)==null?void 0:o.plat_id),pageName:"menu"}),n=(f=l==null?void 0:l.data)==null?void 0:f.result,r=(g=(m=(u=(c=a==null?void 0:a.filter(_=>(_==null?void 0:_.comp)==="Table"))==null?void 0:c[0])==null?void 0:u.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="filter"))==null?void 0:g.contents;r=(N=(d=(w=r==null?void 0:r.replace("(",bs))==null?void 0:w.split(bs))==null?void 0:d[0])==null?void 0:N.replaceAll(":","/");let i=n==null?void 0:n.filter(_=>{var J;return(_==null?void 0:_.object_name)===mo.value+"/"||((J=mo.value)==null?void 0:J.includes(r))&&r+"/"===(_==null?void 0:_.object_name)||r===(_==null?void 0:_.object_name)});return(i==null?void 0:i.length)>0&&(a=a==null?void 0:a.map(_=>{var J;return(_==null?void 0:_.comp)==="Table"&&(_.compData=(J=_==null?void 0:_.compData)==null?void 0:J.map(A=>{var F,L,E;return(A==null?void 0:A.key)==="header"&&(Array.isArray((F=A.contents)==null?void 0:F[0])?A.contents[0]=(E=A.contents[0])==null?void 0:E.map((S,k)=>{var y;return k===0&&(S.isExistChild=!0,((y=mo.value)!=null&&y.includes(r)||r)&&(S.fatherPath=r)),S}):A.contents=(L=A.contents)==null?void 0:L.map((S,k)=>{var y;return k===0&&(S.isExistChild=!0,((y=mo.value)!=null&&y.includes(r)||r)&&(S.fatherPath=r)),S})),A})),_})),a},Wr=async(a,l,n={})=>{var f,c,u,m,g,w,d,N,_,J,A,F;let r=await M.getPageDataApi({platId:parseInt((f=bn==null?void 0:bn.value)==null?void 0:f.plat_id),pageName:a}),i=(c=r==null?void 0:r.data)==null?void 0:c.result;if((i==null?void 0:i.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await M.getPageDataApi({platId:parseInt((u=bn==null?void 0:bn.value)==null?void 0:u.plat_id),pageName:n==null?void 0:n.originPath});if(((g=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:g.length)>0){let E=await ms((w=L==null?void 0:L.data)==null?void 0:w.result,n,!1);E=E==null?void 0:E.map(async y=>{var I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a;let x=[],O=(I=Object.keys(y))==null?void 0:I.filter(H=>(H==null?void 0:H.includes("name"))&&H!=="nameContents");for(let H in y)O!=null&&O.find(V=>V===H)&&x.push(y==null?void 0:y[H]);if(x=x.reverse(),(y==null?void 0:y.comp)==="Table"){let H=(fe=(Y=(W=y==null?void 0:y.compData)==null?void 0:W.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:Y.contents)==null?void 0:fe.map(ae=>{let pe={};for(let ve in ae)ve!=="id"&&ve!=="create_time"&&ve!=="update_time"&&ve!=="sort"&&ve!=="create_user_id"&&ve!=="update_user_id"&&ve!=="department_id"&&ve!=="relatedId"&&(pe[ve]=ae==null?void 0:ae[ve]);return ae=Object.values(pe),ae}),V=(j=(de=y==null?void 0:y.compData)==null?void 0:de.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:j.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"}),(U=V[0])!=null&&U.find(ae=>(ae==null?void 0:ae.prop)==="disabled")&&(V[0]=(Z=V[0])==null?void 0:Z.filter(ae=>(ae==null?void 0:ae.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(ae=>(ae==null?void 0:ae.prop)==="disabled")&&(V=V==null?void 0:V.filter(ae=>(ae==null?void 0:ae.prop)!=="disabled"),V.unshift({label:"",prop:"disabled",sortable:!1}))),V!=null&&V.some(ae=>{var pe;return(ae==null?void 0:ae.calculatorFilter)&&((pe=ae==null?void 0:ae.calculatorFilter)==null?void 0:pe.includes("Auto"))})&&(H=await St(H,V,"Auto"),H=H==null?void 0:H.map(ae=>Object.values(ae))),y!=null&&y.fatherSyncContents){Array.isArray((ee=y==null?void 0:y.fatherSyncContents)==null?void 0:ee[0])&&(y.fatherSyncContents=(ge=y==null?void 0:y.fatherSyncContents)==null?void 0:ge[0]);let ae=(Ie=Mi.value)==null?void 0:Ie.find(pe=>(pe==null?void 0:pe.condition)==="child");y.fatherSyncContents=(ue=y==null?void 0:y.fatherSyncContents)==null?void 0:ue.map(pe=>{var ve,da,ca,Ue,Sa,Ma;return((da=pe==null?void 0:pe.menus)==null?void 0:da[((ve=pe==null?void 0:pe.menus)==null?void 0:ve.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"!==(pe==null?void 0:pe.menus)?pe.menus=(pe==null?void 0:pe.menus)+(ae==null?void 0:ae.value):((Ue=pe==null?void 0:pe.menus)==null?void 0:Ue[((ca=pe==null?void 0:pe.menus)==null?void 0:ca.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"===(pe==null?void 0:pe.menus)&&(pe.menus=(Ma=pe.menus)==null?void 0:Ma.slice(0,((Sa=pe.menus)==null?void 0:Sa.length)-1)),pe})}if(y!=null&&y.sonSyncContents){Array.isArray((B=y==null?void 0:y.sonSyncContents)==null?void 0:B[0])&&(y.sonSyncContents=(oe=y==null?void 0:y.sonSyncContents)==null?void 0:oe[0]);let ae=(q=Mi.value)==null?void 0:q.find(pe=>(pe==null?void 0:pe.condition)==="child");y.sonSyncContents=(ye=y==null?void 0:y.sonSyncContents)==null?void 0:ye.map(pe=>{var ve,da,ca,Ue,Sa,Ma;return((da=pe==null?void 0:pe.menus)==null?void 0:da[((ve=pe==null?void 0:pe.menus)==null?void 0:ve.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"!==(pe==null?void 0:pe.menus)?pe.menus=(pe==null?void 0:pe.menus)+(ae==null?void 0:ae.value):((Ue=pe==null?void 0:pe.menus)==null?void 0:Ue[((ca=pe==null?void 0:pe.menus)==null?void 0:ca.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"===(pe==null?void 0:pe.menus)&&(pe.menus=(Ma=pe.menus)==null?void 0:Ma.slice(0,((Sa=pe.menus)==null?void 0:Sa.length)-1)),pe})}if(y!=null&&y.relatedQuotes){Array.isArray((Ke=y==null?void 0:y.relatedQuotes)==null?void 0:Ke[0])&&(y.relatedQuotes=(Ae=y==null?void 0:y.relatedQuotes)==null?void 0:Ae[0]);let ae=(Qe=Mi.value)==null?void 0:Qe.find(pe=>(pe==null?void 0:pe.condition)==="child");y.relatedQuotes=(Ea=y==null?void 0:y.relatedQuotes)==null?void 0:Ea.map(pe=>{var ve,da,ca,Ue,Sa,Ma;return((da=pe==null?void 0:pe.menus)==null?void 0:da[((ve=pe==null?void 0:pe.menus)==null?void 0:ve.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"!==(pe==null?void 0:pe.menus)?pe.menus=(pe==null?void 0:pe.menus)+(ae==null?void 0:ae.value):((Ue=pe==null?void 0:pe.menus)==null?void 0:Ue[((ca=pe==null?void 0:pe.menus)==null?void 0:ca.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"===(pe==null?void 0:pe.menus)&&(pe.menus=(Ma=pe.menus)==null?void 0:Ma.slice(0,((Sa=pe.menus)==null?void 0:Sa.length)-1)),pe})}y={filter:(ua=(ne=y==null?void 0:y.compData)==null?void 0:ne.find(ae=>(ae==null?void 0:ae.key)==="filter"))==null?void 0:ua.contents,key:y==null?void 0:y.comp,name:x,tableColumns:V,tableContents:H,menuFilter:y==null?void 0:y.menuFilter,fatherSyncContents:y==null?void 0:y.fatherSyncContents,relatedQuotes:y==null?void 0:y.relatedQuotes,sonSyncContents:y==null?void 0:y.sonSyncContents,calculatorFilters:y==null?void 0:y.calculatorFilters}}else{let H=(Le=(Re=(Pe=y==null?void 0:y.compData)==null?void 0:Pe.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Re.contents)==null?void 0:Le.map(ae=>(ae==null?void 0:ae.value)??"");H=[H];let V=(qe=(me=(se=y==null?void 0:y.compData)==null?void 0:se.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:me.contents)==null?void 0:qe.map(ae=>(ae.value="",ae));y={contents:H,filter:(_a=(ka=y==null?void 0:y.compData)==null?void 0:ka.find(ae=>(ae==null?void 0:ae.key)==="filter"))==null?void 0:_a.contents,key:y==null?void 0:y.comp,name:x,value:V,fatherSyncContents:y==null?void 0:y.fatherSyncContents,relatedQuotes:y==null?void 0:y.relatedQuotes,sonSyncContents:y==null?void 0:y.sonSyncContents,calculatorFilters:y==null?void 0:y.calculatorFilters}}return y.isShow=!1,y}),E=await Promise.all(E);let S=[{key:"menuPath",contents:[{path:a,fatherPath:(_=(N=(d=L==null?void 0:L.data)==null?void 0:d.result)==null?void 0:N[0])==null?void 0:_.father_name,isShow:!1}]},{key:a,contents:E}];await M.createPlatFormDataApi({platId:parseInt((J=bn==null?void 0:bn.value)==null?void 0:J.plat_id),changeData:S});let k=await M.getPageDataApi({platId:parseInt((A=bn==null?void 0:bn.value)==null?void 0:A.plat_id),pageName:a});i=(F=k==null?void 0:k.data)==null?void 0:F.result}}l&&await bc(i,!!(n!=null&&n.originPath));let o=await ms(i,n);return l&&(o=await Cf(o)),o==null?void 0:o.filter(L=>L)},ks=async a=>{var r,i,o,f,c,u,m,g,w,d,N;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((o=(i=a.value)==null?void 0:i.split(" "))==null?void 0:o[0]));let n=await Wr(l,!1);if(n=(f=n==null?void 0:n.filter(_=>{var J,A;return(_==null?void 0:_.name)===((A=a==null?void 0:a.groups)==null?void 0:A[((J=a==null?void 0:a.groups)==null?void 0:J.length)-1])}))==null?void 0:f[0],(u=(c=n==null?void 0:n.compData)==null?void 0:c.find(_=>(_==null?void 0:_.key)==="tableContents"))!=null&&u.contents){n=(g=(m=n==null?void 0:n.compData)==null?void 0:m.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:g.contents;let _=((w=a==null?void 0:a.words)==null?void 0:w[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(J=>{var A,F,L,E;return(J==null?void 0:J[a!=null&&a.endChildMenu?_:(A=a==null?void 0:a.words)==null?void 0:A[0]])===(a!=null&&a.relatedWords&&((F=a==null?void 0:a.relatedWords)==null?void 0:F.length)>0?(E=(L=a.value)==null?void 0:L.split(" "))==null?void 0:E[0]:a.value)}),n==null?void 0:n[0]}else{let _=(N=(d=n==null?void 0:n.compData)==null?void 0:d.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:N.contents,J={};return _==null||_.forEach(A=>{J[A.prop]=A.value}),J}},Df={key:0,class:"extra-button-content"},Tf={class:"table-operator-wrap"},Bf={key:0,class:"extra-button-filter"},Nf={key:1,class:"extra-header"},Af=["onClick"],zf={class:"table-op-text"},Mf={class:"table-op-text"},If={class:"drop-menu",style:{width:"120px"}},Of=["onClick"],Lf={key:0},Rf={key:1},$f=["onClick"],Vf={class:"table-op-text"},Ff={key:1,class:"extra-button-content tabs-button-wrapper"},Pf={class:"table-operator-wrap"},jf={class:"extra-button-filter"},Hf={key:0,class:"extra-header"},Uf={class:"table-op-action"},qf={class:"table-op-text"},Wf={class:"drop-menu",style:{width:"120px"}},Gf={key:0},Kf={key:1},Yf=["onClick"],Jf={class:"table-op-text"},Xf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const n=l,r=a,i=()=>{const O=(r==null?void 0:r.menuFilter)||[];return Array.isArray(O)&&(O==null?void 0:O.some(I=>{const W=typeof I=="string"?I:JSON.stringify(I);return W==null?void 0:W.includes("HideGroup=Yes")}))},o=e.ref(""),f=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 w(O,I){return O.map(W=>{const Y={...W};return I.forEach(fe=>{delete Y[fe]}),Y})}function d(O){if(!O||O.t!=="n")return(O==null?void 0:O.v)??"";const I=O.v;if(O.z){const W=String(O.z).toLowerCase(),Y=["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 j of Y)if(W.includes(j))return N(I);const fe=/[ymdhms]/.test(W),de=/^[0#\.\,\s]+$/.test(W.replace(/[\\\/\-:]/g,""));if(fe&&!de)return N(I)}if(I>=1&&I<=73050){if(I<5e3)return I;if(I>=5e3&&I<4e4){const W=Math.floor((I-25569)/365.25)+1970;return W>=1970&&W<=2e3&&O.z&&/[ymd]/.test(String(O.z).toLowerCase())?N(I):I}if(I>=4e4)return N(I)}return I}function N(O){if(typeof O!="number")return O;try{const I=new Date((O-25569)*86400*1e3);if(isNaN(I.getTime()))return O;const W=I.getFullYear(),Y=String(I.getMonth()+1).padStart(2,"0"),fe=String(I.getDate()).padStart(2,"0");return`${W}-${Y}-${fe}`}catch{return O}}const _=O=>{const I=O.raw;if(!I)return;const W=new FileReader;W.onload=Y=>{try{const fe=new Uint8Array(Y.target.result),de=le.readSync(fe,{type:"array"}),j=de.SheetNames[0],U=de.Sheets[j],ee=le.utils.decode_range(U["!ref"]).e.c+1,ge=new Array(ee).fill(""),Ie=[];for(const ye in U){if(ye[0]==="!")continue;const{r:Ke,c:Ae}=le.utils.decode_cell(ye),Qe=U[ye];let Ea=d(Qe);if((Ea==null||Ea==="")&&(Ea=""),Ke===0)ge[Ae]=Ea;else{if(!Ie[Ke-1]){Ie[Ke-1]={};for(let ne=0;ne<ee;ne++)Ie[Ke-1][`col_${ne}`]=""}Ie[Ke-1][`col_${Ae}`]=Ea}}for(let ye=0;ye<ee;ye++)ge[ye]===void 0&&(ge[ye]="");const ue=[];for(let ye=0;ye<ge.length;ye++)(!ge[ye]||ge[ye].toString().trim()==="")&&ue.push(ye);let B,oe;(ue==null?void 0:ue.length)>0?(Ja.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),B=ge.filter((ye,Ke)=>!ue.includes(Ke)),oe=w(Ie,ue==null?void 0:ue.map(ye=>`col_${ye}`))):(B=ge,oe=Ie);const q=Ie==null?void 0:Ie[0];if(!(q!=null&&q.hasOwnProperty("col_0")))return Ja.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",B,oe)}catch(fe){throw Ja.ElMessage.error(fe.message),new Error(fe.message)}},W.readAsArrayBuffer(I)},J=O=>{var W;const I=(W=u.value)==null?void 0:W.reduce((Y,fe,de)=>(de===0?Y[fe.label]=O:Y[fe.label]=fe==null?void 0:fe.value,Y),{});n("filter",I,O,!0)},A=(O,I={})=>{n("buttonClick",O,"",I)},F=O=>{var I,W;u.value=(W=(I=le.getColumnChild(M.cloneDeep(O)))==null?void 0:I.filter(Y=>(Y==null?void 0:Y.label)!==""&&(Y==null?void 0:Y.label)!=="操作"))==null?void 0:W.map(Y=>({label:(Y==null?void 0:Y.label)??"",value:"",name:(Y==null?void 0:Y.prop)??"",isFormColHidden:Y==null?void 0:Y.isTableColHidden,width:3,prop:(Y==null?void 0:Y.prop)??""}))},L=e.ref(!1),E=O=>{var I;if((O==null?void 0:O.buttonName)==="确认"&&(n("filter",O==null?void 0:O.content),L.value=(O==null?void 0:O.content)&&Object.values(O==null?void 0:O.content).length>0),(O==null?void 0:O.buttonName)==="清空"){const W=M.cloneDeep(O==null?void 0:O.content);for(const Y in W)W[Y]="";u.value=(I=u.value)==null?void 0:I.map(Y=>({...Y,value:""})),n("filter",W),L.value=!1}f.value=!1},S=()=>{f.value=!f.value,c.value=!0},k=()=>{var I,W;u.value=(I=u.value)==null?void 0:I.map(Y=>({...Y,value:""}));const O=(W=u.value)==null?void 0:W.reduce((Y,fe)=>(Y[fe.label]=fe.value,Y),{});n("filter",O)},y=e.ref(null);let x;return x=O=>{var fe;if(!f.value)return;const I=(fe=y==null?void 0:y.value)==null?void 0:fe.$el,W=I==null?void 0:I.contains(O.target);let Y=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(de=>{de.contains(O.target)&&(Y=!0)}),!W&&!Y&&(f.value=!1)},e.onMounted(()=>{document.addEventListener("click",x),F(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",x)}),e.watch(()=>r.columns,()=>{F(r.columns)},{deep:!0,immediate:!0}),(O,I)=>{var U,Z,ee,ge,Ie,ue,B,oe;const W=e.resolveComponent("el-icon"),Y=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-input"),de=e.resolveComponent("el-upload"),j=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Df,[i()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Tf,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",Bf,[e.createVNode(ad,{trigger:"contextmenu",ref_key:"popOverRef",ref:y,title:"",width:800,placement:"bottom-start",isVisible:f.value,"onUpdate:isVisible":I[4]||(I[4]=q=>f.value=q)},{reference:e.withCtx(()=>{var q,ye,Ke,Ae;return[e.createVNode(fe,{modelValue:o.value,"onUpdate:modelValue":I[0]||(I[0]=Qe=>o.value=Qe),style:{"min-width":"80px"},placeholder:L.value?(Ke=(ye=(q=a.filterValues)==null?void 0:q.filter(Qe=>Qe))==null?void 0:ye.slice(0,3))==null?void 0:Ke.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:J,disabled:((Ae=u.value)==null?void 0:Ae.length)===0},{suffix:e.withCtx(()=>{var Qe,Ea;return[!o.value&&((Ea=(Qe=a.filterValues)==null?void 0:Qe.filter(ne=>ne))!=null&&Ea.join("/"))?(e.openBlock(),e.createBlock(W,{key:0,style:{cursor:"pointer"},onClick:k},{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(Y,{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:I[1]||(I[1]=e.withModifiers(()=>{},["stop"])),onKeyup:I[2]||(I[2]=e.withModifiers(()=>{},["stop"])),onKeypress:I[3]||(I[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(pl.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&&((U=a.buttons)==null?void 0:U.length)>0?(e.openBlock(),e.createElementBlock("div",Nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Z=a.buttons)==null?void 0:Z.filter(q=>a.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ye)=>{var Ke;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ye},[(q==null?void 0:q.type)==="upload"?(e.openBlock(),e.createBlock(de,{key:0,class:"upload-button-wrap","on-change":_,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var Ae;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Qe=>A(q==null?void 0:q.label)},[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),e.createElementVNode("span",zf,e.toDisplayString(q==null?void 0:q.label),1)],10,Af)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(e.openBlock(),e.createBlock(pl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Ae;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),e.createElementVNode("span",Mf,e.toDisplayString(q==null?void 0:q.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",If,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q==null?void 0:q.contents,Ae=>{var Qe,Ea;return e.openBlock(),e.createElementBlock("div",{key:Ae==null?void 0:Ae.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ne=>!a.lockingPage&&A(Ae==null?void 0:Ae.label)},[e.createTextVNode(e.toDisplayString(Ae==null?void 0:Ae.label),1),(Qe=Ae==null?void 0:Ae.label)!=null&&Qe.includes("选中")?(e.openBlock(),e.createElementBlock("span",Lf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ea=Ae==null?void 0:Ae.label)!=null&&Ea.includes("全部")?(e.openBlock(),e.createElementBlock("span",Rf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Of)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ae=>!a.lockingPage&&A(q==null?void 0:q.label,q)},[e.createVNode(Y,{class:"table-op-icon",name:((Ke=g==null?void 0:g.find(Ae=>(Ae==null?void 0:Ae.label)===(q==null?void 0:q.label)))==null?void 0:Ke.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",Vf,e.toDisplayString(q==null?void 0:q.label),1)],10,$f)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Ff,[e.createElementVNode("div",Pf,[e.createElementVNode("div",jf,[e.createVNode(fe,{modelValue:o.value,"onUpdate:modelValue":I[5]||(I[5]=q=>o.value=q),style:{"min-width":"80px"},placeholder:L.value?(Ie=(ge=(ee=a.filterValues)==null?void 0:ee.filter(q=>q))==null?void 0:ge.slice(0,3))==null?void 0:Ie.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:J,disabled:((ue=u.value)==null?void 0:ue.length)===0},{suffix:e.withCtx(()=>{var q,ye;return[!o.value&&((ye=(q=a.filterValues)==null?void 0:q.filter(Ke=>Ke))!=null&&ye.join("/"))?(e.openBlock(),e.createBlock(W,{key:0,style:{cursor:"pointer"},onClick:k},{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(Y,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((B=a.buttons)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",Hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=a.buttons)==null?void 0:oe.filter(q=>a.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ye)=>{var Ke;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ye},[(q==null?void 0:q.type)==="upload"?(e.openBlock(),e.createBlock(de,{key:0,class:"upload-button-wrap","on-change":_,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Ae;return[e.createElementVNode("div",Uf,[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),e.createElementVNode("span",qf,e.toDisplayString(q==null?void 0:q.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(e.openBlock(),e.createBlock(pl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(e.openBlock(),e.createBlock(j,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Ae;return[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(q==null?void 0:q.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Wf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q==null?void 0:q.contents,Ae=>(e.openBlock(),e.createBlock(j,{key:Ae==null?void 0:Ae.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Qe=>A(Ae==null?void 0:Ae.label)},{default:e.withCtx(()=>{var Qe,Ea;return[e.createTextVNode(e.toDisplayString(Ae==null?void 0:Ae.label),1),(Qe=Ae==null?void 0:Ae.label)!=null&&Qe.includes("选中")?(e.openBlock(),e.createElementBlock("span",Gf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ea=Ae==null?void 0:Ae.label)!=null&&Ea.includes("全部")?(e.openBlock(),e.createElementBlock("span",Kf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Ae=>!a.lockingPage&&A(q==null?void 0:q.label,q)},[e.createVNode(Y,{class:"table-op-icon",name:(Ke=g==null?void 0:g.find(Ae=>(Ae==null?void 0:Ae.label)===(q==null?void 0:q.label)))==null?void 0:Ke.icon},null,8,["name"]),e.createElementVNode("span",Jf,e.toDisplayString(q==null?void 0:q.label),1)],10,Yf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},Zf=nr._export_sfc(Xf,[["__scopeId","data-v-c54c7b35"]]),Qf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=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 f;return e.openBlock(),e.createBlock(r,{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:(((f=o==null?void 0:o.label)==null?void 0:f.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(pl._sfc_main$2,{key:m,column:u,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(g,w)=>({name:w,fn:e.withCtx(({row:d,slotData:N,item:_,column:J})=>[e.renderSlot(l.$slots,w,e.mergeProps({ref_for:!0},N??d,{item:_??u,slotData:N??d,row:d,column:J,columnProp:u}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class e0 extends Fl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,i){const o=this,f=new Fl.FileLoader(o.manager);f.setPath(o.path),f.setResponseType("arraybuffer"),f.setRequestHeader(o.requestHeader),f.setWithCredentials(o.withCredentials),f.load(l,function(c){try{n(o.parse(c))}catch(u){i?i(u):console.error(u),o.manager.itemError(l)}},r,i)}_getDataView(l,n,r,i){switch(r){case"F":return i===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return i===1?l.getInt8(n):i===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return i===1?l.getUint8(n):i===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(N,_){const J=N.length,A=new Uint8Array(_);let F=0,L=0,E,S,k;do if(E=N[F++],E<32){if(E++,L+E>_)throw new Error("Output buffer is not large enough");if(F+E>J)throw new Error("Invalid compressed data");do A[L++]=N[F++];while(--E)}else{if(S=E>>5,k=L-((E&31)<<8)-1,F>=J)throw new Error("Invalid compressed data");if(S===7&&(S+=N[F++],F>=J))throw new Error("Invalid compressed data");if(k-=N[F++],L+S+2>_)throw new Error("Output buffer is not large enough");if(k<0)throw new Error("Invalid compressed data");if(k>=L)throw new Error("Invalid compressed data");do A[L++]=A[k++];while(--S+2)}while(F<J);return A}function r(N){const _={},J=new Uint8Array(N);let A="",F="",L=0,E=!1;const S=J.length;for(;L<S&&E===!1;){const O=String.fromCharCode(J[L++]);O===`
1
+ "use strict";var Gu=Object.defineProperty;var Ku=(a,l,n)=>l in a?Gu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[l]=n;var dn=(a,l,n)=>Ku(a,typeof l!="symbol"?l+"":l,n);const e=require("vue"),Ja=require("./request-Dl8yi2iS.cjs"),M=require("./index-Dom0zBom.cjs"),pl=require("./index-9rDZUKZr.cjs"),le=require("./index-BTEY8ajW.cjs"),nr=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.cjs"),Ir=require("./index-B-pflqKE.cjs"),Co=require("./threeViewerHost-C8NY-2-c.cjs"),qr=require("./index-DmwxzDGW.cjs"),ds=require("./index-CR_-CUVw.cjs"),ic=require("./index-mqL-OFAs.cjs");;/* empty css */const Do=require("./isString-CGrvcmBw.cjs"),ps=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),oc=require("./index-BVaHwt5f.cjs"),Yu=require("./index-BXHzLi8Y.cjs"),Hn=require("./MTLLoader-B5SKHnGa.cjs"),Ju=require("./URDFLoader-DrI0sVHT.cjs");var Xu="[object Boolean]";function tc(a){return a===!0||a===!1||Ja.isObjectLike(a)&&Ja.baseGetTag(a)==Xu}function Zu(a){return a===void 0}const Qu=a=>a.match(/\((.*)\)/)[1],ed={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(a){const l=a,n=e.ref(null),r=e.ref(!1),i=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{r.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>i.value,()=>{e.nextTick(()=>{var o,f;(f=(o=n.value)==null?void 0:o.updatePopper)==null||f.call(o)})},{deep:!0,immediate:!0}),(o,f)=>{const c=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(c,{visible:r.value,"onUpdate:visible":f[0]||(f[0]=u=>r.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:n,"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"])}}},ad=e.defineComponent({__name:"index",props:{value:{type:[String,Number],default:""},columnContent:{type:Object,default:{}}},setup(a){const l=a,n=e.computed(()=>{var u,m,g,w,d,N;const r=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(_=>((_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),_)),i=i==null?void 0:i.find(_=>(_==null?void 0:_[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=(w=(g=l==null?void 0:l.columnContent)==null?void 0:g.options)==null?void 0:w.findIndex(_=>(_==null?void 0:_.value)===r);o=i==null?void 0:i[o],o=le.analyzeSplitToContent(o,","),o=o==null?void 0:o.map(_=>((_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),_));let f=o==null?void 0:o.find(_=>_==null?void 0:_.includes("@TextBackRGBA"));f?f=le.rgbaToColor((d=f==null?void 0:f.split("="))==null?void 0:d[1]):f=void 0;let c=o==null?void 0:o.find(_=>_==null?void 0:_.includes("@TextRGBA"));return c?c=le.rgbaToColor((N=c==null?void 0:c.split("="))==null?void 0:N[1]):c=void 0,{backgroundColor:f,color:c}});return(r,i)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:"task-status-tag",style:e.normalizeStyle(n.value)},e.toDisplayString(a.value===0?"0":a.value),5)):e.createCommentVNode("",!0)}}),ld=nr._export_sfc(ad,[["__scopeId","data-v-3290070b"]]);function rd(a,l,n,r={}){if(!a||!l||!n||n.length!==4)return;const i=a.getContext("2d");if(!i)return;const{color:o="rgba(255, 235, 59, 0.3)",strokeWidth:f=2,fillOpacity:c=.2}=r,u=a.getBoundingClientRect(),m=l.getBoundingClientRect(),g=l.naturalWidth,w=l.naturalHeight,d=m.width/g,N=m.height/w,_=Math.min(d,N),J=g*_,A=w*_,F=(u.width-J)/2,L=(u.height-A)/2,E=n.map(([k,y])=>{const x=F+k*J,O=L+y*A;return{x,y:O}});i.clearRect(0,0,a.width,a.height),i.beginPath(),i.moveTo(E[0].x,E[0].y);for(let k=1;k<E.length;k++)i.lineTo(E[k].x,E[k].y);i.closePath();const S=o.replace(/[\d.]+\)$/,`${c})`);i.fillStyle=S,i.fill(),i.strokeStyle=o.replace(/[\d.]+\)$/,"1)"),i.lineWidth=f,i.stroke()}function Ti(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function fs(a,l){if(!a||!l)return null;const n=a[l];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const nd={key:0,class:"ocr-img-preview-root"},id={class:"ocr-img-preview-window"},od={key:0,class:"img-preview-body"},td={class:"img-preview-header"},sd={class:"img-header-left"},cd={class:"img-name"},ud={key:0,class:"img-header-right"},dd={class:"img-index"},pd={key:0,class:"img-thumb-list"},fd=["onClick"],hd={key:1,class:"thumb-placeholder"},vd={class:"thumb-name"},md={class:"img-preview-container"},yd={key:0,class:"img-placeholder"},gd={key:2,class:"img-placeholder"},bd={key:0},kd={key:1},xd={key:1,class:"img-placeholder"},wd=e.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(a,{emit:l}){const n=a,r=l,i=e.computed({get:()=>n.visible,set:B=>r("update:visible",B)});let o=!1,f="",c=0,u=0,m=0,g=0,w=0,d=0,N=null;const _=B=>{var q,ye;const oe=(ye=(q=B==null?void 0:B.target)==null?void 0:q.closest)==null?void 0:ye.call(q,".ocr-img-preview-window");return oe||document.querySelector(".ocr-img-preview-window")},J=B=>{if(!B||B==="none")return{tx:0,ty:0};let oe=B.match(/matrix\(([^)]+)\)/);if(oe){const q=oe[1].split(",").map(ye=>Number(ye.trim()));return{tx:(q==null?void 0:q[4])||0,ty:(q==null?void 0:q[5])||0}}if(oe=B.match(/matrix3d\(([^)]+)\)/),oe){const q=oe[1].split(",").map(ye=>Number(ye.trim()));return{tx:(q==null?void 0:q[12])||0,ty:(q==null?void 0:q[13])||0}}return oe=B.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),oe?{tx:Number(oe[1])||0,ty:Number(oe[2])||0}:{tx:0,ty:0}},A=(B,oe,q)=>{B.style.transform=`translate(${oe}px, ${q}px)`},F=B=>{const oe=_(B);if(!oe)return;o=!0,N=oe,f="move",c=B.clientX,u=B.clientY;const q=window.getComputedStyle(oe),{tx:ye,ty:Ke}=J(q.transform);w=ye,d=Ke,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},L=(B,oe)=>{const q=_(B);if(!q)return;o=!0,N=q,f=oe,c=B.clientX,u=B.clientY;const ye=q.getBoundingClientRect();m=ye.width,g=ye.height;const Ke=window.getComputedStyle(q),{tx:Ae,ty:Qe}=J(Ke.transform);w=Ae,d=Qe,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=B=>{if(!o||!N)return;const oe=B.clientX-c,q=B.clientY-u,ye=360,Ke=420;let Ae=m,Qe=g,Ea=w,ne=d;if(f==="move"){Ea=w+oe,ne=d+q,A(N,Ea,ne);return}if(f.includes("right")&&(Ae=Math.max(ye,m+oe)),f.includes("bottom")&&(Qe=Math.max(Ke,g+q)),f.includes("left")){const ua=m-oe;ua<ye?(Ae=ye,Ea=w+(m-ye)):(Ae=ua,Ea=w+oe)}if(f.includes("top")){const ua=g-q;ua<Ke?(Qe=Ke,ne=d+(g-Ke)):(Qe=ua,ne=d+q)}N.style.width=`${Ae}px`,N.style.height=`${Qe}px`,A(N,Ea,ne)},S=()=>{o=!1,f="",N=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)},k=e.ref([]),y=e.ref(!1);e.watch(()=>n.images,async B=>{if(!Array.isArray(B)||B.length===0){k.value=[];return}y.value=!0;const oe=[];for(const q of B)if(q.url&&!q.url.startsWith("blob:")&&!q.url.startsWith("http"))try{const ye=await Fl.downloadFile(q.url),Ke=URL.createObjectURL(ye);oe.push({...q,blobUrl:Ke})}catch(ye){console.error(`Failed to load image for preview: ${q.url}`,ye),oe.push({...q,blobUrl:""})}else oe.push({...q,blobUrl:q.url});k.value=oe,y.value=!1},{deep:!0,immediate:!0});const x=e.ref(0),O=e.ref(null),I=e.ref(null),W=e.computed(()=>k.value[x.value]||null),Y=()=>{if(!k.value.length){x.value=0;return}if(n.defaultImageName){const B=k.value.findIndex(oe=>(oe==null?void 0:oe.name)===n.defaultImageName);x.value=B>=0?B:0}else x.value=0},fe=B=>{if(!k.value.length)return;const oe=Math.max(0,Math.min(B,k.value.length-1));x.value=oe},de=()=>fe(x.value-1),j=()=>fe(x.value+1),U=B=>{if(!B)return;const oe=k.value.findIndex(q=>(q==null?void 0:q.name)===B);oe>=0&&(x.value=oe)},Z=()=>{if(!I.value)return;const B=I.value.parentElement;if(!B)return;const oe=B.getBoundingClientRect();I.value.width=oe.width,I.value.height=oe.height},ee=()=>{var ye,Ke;if(!I.value||!O.value||!n.focusedFieldName){I.value&&Ti(I.value);return}const B=(ye=O.value.$el)==null?void 0:ye.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{e.nextTick(()=>{ee()})};return}const oe=((Ke=W.value)==null?void 0:Ke.name)||"",q=fs(n.fieldMeta,n.focusedFieldName);if(!q){Ti(I.value);return}if(q.imageName!==oe){Ti(I.value);return}Z(),rd(I.value,B,q.bboxNorm)},ge=()=>{e.nextTick(()=>{Z(),ee()})};e.watch(()=>n.focusedFieldName,()=>{if(!i.value)return;const B=fs(n.fieldMeta,n.focusedFieldName);B!=null&&B.imageName&&U(B.imageName),e.nextTick(()=>{ee()})}),e.watch(()=>{var B;return(B=W.value)==null?void 0:B.name},()=>{i.value&&e.nextTick(()=>{I.value&&Ti(I.value),ee()})}),e.watch(()=>n.visible,B=>{B?(Y(),e.nextTick(()=>{Z(),ee()})):I.value&&Ti(I.value)}),e.watch(()=>n.defaultImageName,()=>{i.value&&Y()});let Ie=null;e.onMounted(()=>{var B;typeof ResizeObserver<"u"&&(Ie=new ResizeObserver(()=>{Z(),e.nextTick(()=>{ee()})}),(B=I.value)!=null&&B.parentElement&&Ie.observe(I.value.parentElement))}),e.onUnmounted(()=>{Ie&&(Ie.disconnect(),Ie=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const ue=()=>{I.value&&Ti(I.value),r("update:visible",!1),r("close")};return(B,oe)=>{var Qe,Ea;const q=e.resolveComponent("el-button"),ye=e.resolveComponent("el-image"),Ke=e.resolveComponent("Loading"),Ae=e.resolveComponent("el-icon");return i.value?(e.openBlock(),e.createElementBlock("div",nd,[oe[12]||(oe[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",id,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(F,["stop"])},[oe[8]||(oe[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ue},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:oe[0]||(oe[0]=e.withModifiers(ne=>L(ne,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:oe[1]||(oe[1]=e.withModifiers(ne=>L(ne,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:oe[2]||(oe[2]=e.withModifiers(ne=>L(ne,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:oe[3]||(oe[3]=e.withModifiers(ne=>L(ne,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:oe[4]||(oe[4]=e.withModifiers(ne=>L(ne,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:oe[5]||(oe[5]=e.withModifiers(ne=>L(ne,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:oe[6]||(oe[6]=e.withModifiers(ne=>L(ne,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:oe[7]||(oe[7]=e.withModifiers(ne=>L(ne,"bottom-right"),["stop"]))},null,32),W.value?(e.openBlock(),e.createElementBlock("div",od,[e.createElementVNode("div",td,[e.createElementVNode("div",sd,[e.createElementVNode("span",cd,e.toDisplayString(W.value.name?W.value.name+(W.value.url&&W.value.url.lastIndexOf(".")!==-1?W.value.url.substring(W.value.url.lastIndexOf(".")):""):""),1)]),k.value.length>1?(e.openBlock(),e.createElementBlock("div",ud,[e.createVNode(q,{size:"small",disabled:x.value===0,onClick:de},{default:e.withCtx(()=>oe[9]||(oe[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",dd,e.toDisplayString(x.value+1)+" / "+e.toDisplayString(k.value.length),1),e.createVNode(q,{size:"small",disabled:x.value===k.value.length-1,onClick:j},{default:e.withCtx(()=>oe[10]||(oe[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),k.value.length>1?(e.openBlock(),e.createElementBlock("div",pd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(ne,ua)=>(e.openBlock(),e.createElementBlock("div",{key:(ne.name||"")+"-"+ua,class:e.normalizeClass(["img-thumb-item",{active:ua===x.value}]),onClick:Pe=>fe(ua)},[ne!=null&&ne.blobUrl?(e.openBlock(),e.createBlock(ye,{key:0,src:ne.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ne.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",hd,"加载失败")),e.createElementVNode("div",vd,e.toDisplayString(ne.name||"-"),1)],10,fd))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",md,[y.value?(e.openBlock(),e.createElementBlock("div",yd,[e.createVNode(Ae,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Ke)]),_:1}),oe[11]||(oe[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(Qe=W.value)!=null&&Qe.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ye,{ref_key:"imageRef",ref:O,src:W.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[W.value.blobUrl],onLoad:ge},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:I,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",gd,[(Ea=W.value)!=null&&Ea.url?(e.openBlock(),e.createElementBlock("span",bd,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",kd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",xd,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),_d=nr._export_sfc(wd,[["__scopeId","data-v-48a4ecb1"]]),Sd={class:"cert-preview-body"},Ed={key:0,class:"pdf-preview-container"},Cd={class:"thumbs"},Dd=["onClick"],Td={class:"thumb-img"},Bd=["src"],Nd={key:1,class:"thumb-loading"},Ad={class:"thumb-title"},zd={class:"viewer"},Md={key:0,class:"viewer-img-wrap"},Id=["src"],Od={key:1,class:"viewer-loading"},Ld=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(""),o=e.ref(""),f=e.computed(()=>(n.versions||[]).find(_=>String(_.versionId)===String(i.value))),c=e.ref({}),u=e.ref(""),m=e.ref("证书附件.pdf"),g=()=>{try{Object.values(c.value||{}).forEach(_=>{_&&URL.revokeObjectURL(_)}),u.value&&URL.revokeObjectURL(u.value)}catch{}c.value={},u.value=""},w=async _=>{if(!_||_.fileType==="pdf")return;const J=Array.isArray(_.images)?_.images:[];for(const A of J){const F=A==null?void 0:A.url;if(!(!F||c.value[F]))try{const L=await M.platformDownloadFile({url:F}),E=URL.createObjectURL(L.data);c.value={...c.value,[F]:E}}catch{}}},d=async _=>{var A;if(!_||_.fileType!=="pdf"){u.value="";return}const J=_.sourceUrl||"";if(!J){u.value="";return}if(u.value){try{URL.revokeObjectURL(u.value)}catch{}u.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:J,versionId:_==null?void 0:_.versionId,certNo:_==null?void 0:_.certNo});const F=await M.platformDownloadFile({url:J});console.log("[CertificatePreview] PDF响应:",{url:J,status:F==null?void 0:F.status,size:(A=F==null?void 0:F.data)==null?void 0:A.size});const L=URL.createObjectURL(F.data);u.value=L;const E=_.certNo?String(_.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(F){console.error("[CertificatePreview] PDF加载失败:",{url:J,error:F}),u.value=""}};e.watch(()=>n.visible,async _=>{var A;if(!_){g();return}const J=(A=n.versions)==null?void 0:A[0];i.value=(J==null?void 0:J.versionId)||"",await w(J),await d(J)},{immediate:!0}),e.watch(()=>i.value,async()=>{var J,A;const _=f.value;if(!_){o.value="",u.value="";return}if(_.fileType==="pdf"){o.value="",await d(_);return}u.value="",o.value=((A=(J=_.images)==null?void 0:J[0])==null?void 0:A.url)||"",await w(_)},{immediate:!0});const N=()=>{r("update:visible",!1),g()};return e.onBeforeUnmount(()=>{g()}),(_,J)=>{const A=e.resolveComponent("el-empty"),F=e.resolveComponent("el-tab-pane"),L=e.resolveComponent("el-tabs"),E=e.resolveComponent("el-button"),S=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(S,{"model-value":_.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:N},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:N},{default:e.withCtx(()=>J[1]||(J[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[_.versions&&_.versions.length>0?(e.openBlock(),e.createBlock(L,{key:0,modelValue:i.value,"onUpdate:modelValue":J[0]||(J[0]=k=>i.value=k),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.versions,k=>(e.openBlock(),e.createBlock(F,{key:k.versionId,name:k.versionId,label:k.label},{default:e.withCtx(()=>[e.createElementVNode("div",Sd,[k.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",Ed,[u.value?(e.openBlock(),e.createBlock(pl.SsFilePreview,{key:1,fileName:m.value,blobUrl:u.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(A,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Cd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.images||[],y=>(e.openBlock(),e.createElementBlock("div",{key:y.url,class:e.normalizeClass(["thumb",{active:y.url===o.value}]),onClick:x=>o.value=y.url},[e.createElementVNode("div",Td,[c.value[y.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:c.value[y.url]},null,8,Bd)):(e.openBlock(),e.createElementBlock("div",Nd,"加载中"))]),e.createElementVNode("div",Ad,e.toDisplayString(y.name),1)],10,Dd))),128))]),e.createElementVNode("div",zd,[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value[o.value]?(e.openBlock(),e.createElementBlock("div",Md,[e.createElementVNode("img",{class:"viewer-img",src:c.value[o.value]},null,8,Id)])):(e.openBlock(),e.createElementBlock("div",Od,"加载中"))],64)):(e.openBlock(),e.createBlock(A,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(A,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),Rd=nr._export_sfc(Ld,[["__scopeId","data-v-220703c0"]]),$d={class:"ocr-candidate-wrap"},Vd={class:"ocr-candidate-left"},Fd={key:1},Pd={key:0},jd={key:1},Hd={key:2},Ud={key:3},qd={key:0,class:"ocr-candidate-right"},Wd={class:"ocr-candidate-actions"},Gd={key:1},Kd={class:"dialog-footer"},Yd={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(a,{emit:l}){const n=(x=[])=>{const O=[],I=W=>{(W||[]).forEach(Y=>{if(!Y)return;const fe=Y.children||Y.childrens||Y.columns;Array.isArray(fe)&&fe.length>0?I(fe):O.push(Y)})};return I(x),O},r=a,i=l,o=e.computed(()=>{var x;return((x=d.value)==null?void 0:x.allowAdd)!==!1}),f=e.computed(()=>{var x;return((x=d.value)==null?void 0:x.allowReplace)!==!1}),c=x=>{if(!x)return[];if(Array.isArray(x))return x;if(typeof x=="string")try{const O=JSON.parse(x);return Array.isArray(O)?O:[]}catch{return[]}return[]},u=x=>{i("preview-file",x)},m=e.ref([]),g=e.ref(0),w=e.ref("");e.watch(()=>r.candidates,x=>{var O,I;m.value=(x||[]).map(W=>({...W,...(W==null?void 0:W.ocrRow)||{},selectedTargetId:(W==null?void 0:W.selectedTargetId)||"",__decision:W==null?void 0:W.__decision})),g.value=0,w.value=((I=(O=m.value)==null?void 0:O[0])==null?void 0:I.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>r.visible,x=>{var O,I;x&&(g.value=0,w.value=((I=(O=m.value)==null?void 0:O[0])==null?void 0:I.selectedTargetId)||"")});const d=e.computed(()=>{var O;const x=Number(g.value||0);return((O=m.value||[])==null?void 0:O[x])||null}),N=e.computed(()=>(n(r.columns||[])||[]).filter(I=>I&&I.prop).filter(I=>I.type!=="operate"&&I.label!=="操作"&&I.prop!=="operate")),_=e.computed(()=>N.value.filter(x=>x.label!=="证书附件"&&x.prop!=="证书附件")),J=x=>{if(!x)return;const O=(m.value||[]).findIndex(I=>(I==null?void 0:I.idx)===(x==null?void 0:x.idx));O>-1&&(g.value=O,w.value=(x==null?void 0:x.selectedTargetId)||"")},A=x=>{if(!x){w.value="";return}w.value=String((x==null?void 0:x.id)??"")},F=(x,O="")=>{const I=Number(g.value||0),W=m.value||[],Y=W[I];Y&&(Y.__decision=x,Y.selectedTargetId=O,w.value=O,m.value=[...W])},L=()=>F("skip",""),E=()=>F("add",""),S=()=>{if(!w.value){Ja.ElMessage.warning("请先选择要替换的目标记录");return}F("replace",w.value)},k=()=>{i("update:visible",!1)},y=()=>{const x=m.value||[];if(x.find(I=>(I==null?void 0:I.__decision)==="replace"&&!(I!=null&&I.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}i("submit",x),i("update:visible",!1)};return(x,O)=>{const I=e.resolveComponent("el-table-column"),W=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-table"),fe=e.resolveComponent("el-button"),de=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(Ir.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:k},{default:e.withCtx(()=>{var j,U;return[e.createElementVNode("div",$d,[e.createElementVNode("div",Vd,[O[0]||(O[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(Y,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:J},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,Z=>(e.openBlock(),e.createBlock(I,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ee})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ee==null?void 0:ee[Z.prop]).length>0?(e.openBlock(),e.createBlock(W,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ge=>u({row:ee,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Fd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ee==null?void 0:ee[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(I,{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(I,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Pd,"替换")):(Z==null?void 0:Z.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",jd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Hd,"跳过")):(e.openBlock(),e.createElementBlock("span",Ud,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",qd,[O[4]||(O[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Wd,[e.createVNode(fe,{id:"themeBorderButton",onClick:L},{default:e.withCtx(()=>O[1]||(O[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(fe,{id:"themeBorderButton",onClick:E,disabled:!o.value},{default:e.withCtx(()=>O[2]||(O[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(fe,{class:"ok-button",id:"themeButton",onClick:S,disabled:!f.value||!w.value},{default:e.withCtx(()=>O[3]||(O[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((j=d.value)==null?void 0:j.candidates)||[]).length===0?(e.openBlock(),e.createBlock(de,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(Y,{data:((U=d.value)==null?void 0:U.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:A,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,Z=>(e.openBlock(),e.createBlock(I,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:e.withCtx(({row:ee})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[c(ee==null?void 0:ee[Z.prop]).length>0?(e.openBlock(),e.createBlock(W,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(ge=>u({row:ee,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Gd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ee==null?void 0:ee[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Kd,[e.createVNode(fe,{id:"themeBorderButton",onClick:k},{default:e.withCtx(()=>O[5]||(O[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(fe,{class:"ok-button",id:"themeButton",onClick:y},{default:e.withCtx(()=>O[6]||(O[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Jd=nr._export_sfc(Yd,[["__scopeId","data-v-89e0489c"]]),Xd={class:"ocr-preview-content"},Zd={class:"ocr-preview-tip"},Qd={class:"ocr-preview-table"},ep={style:{display:"flex","align-items":"center",gap:"8px"}},ap={class:"dialog-footer"},lp={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),o=e.ref([]),f=e.ref([]);e.watch(()=>n.visible,N=>{N&&(i.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),o.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),f.value=[...n.ocrSelectedFields])});const c=(N,_)=>{const J=[...f.value];if(_)J.includes(N)||J.push(N);else{const A=J.indexOf(N);A>-1&&J.splice(A,1)}f.value=J,r("update:ocrSelectedFields",J)},u=(N,_,J)=>{r("fieldChange",{rowIndex:N,prop:_,value:J})},m=()=>{r("update:ocrPreviewData",i.value),r("confirm",i.value),r("update:visible",!1)},g=()=>{r("update:visible",!1)},w=N=>typeof N!="number"?"-":`${(N*100).toFixed(1)}%`,d=N=>typeof N!="number"?"#606266":N>=.9?"#67c23a":N>=.7?"#e6a23c":"#f56c6c";return(N,_)=>{const J=e.resolveComponent("el-alert"),A=e.resolveComponent("el-table-column"),F=e.resolveComponent("el-checkbox"),L=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),S=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(Ir.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:g,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Xd,[e.createElementVNode("div",Zd,[e.createVNode(J,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Qd,[e.createVNode(E,{data:i.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(A,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,k=>(e.openBlock(),e.createBlock(A,{key:k.prop,prop:k.prop,"min-width":k.minWidth||230,"class-name":k.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",ep,[k.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F,{key:0,"model-value":f.value.includes(k.prop),onChange:y=>c(k.prop,y),onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(k.label),1)])]),default:e.withCtx(({row:y,$index:x})=>[k.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:d(y[k.prop]),fontWeight:500})},e.toDisplayString(w(y[k.prop])),5)):(e.openBlock(),e.createBlock(L,{key:1,modelValue:y[k.prop],"onUpdate:modelValue":O=>y[k.prop]=O,size:"small",placeholder:"请输入"+k.label,onChange:O=>u(x,k.prop,O)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",ap,[e.createVNode(S,{onClick:g,id:"themeBorderButton"},{default:e.withCtx(()=>_[1]||(_[1]=[e.createTextVNode("取消")])),_:1,__:[1]}),e.createVNode(S,{class:"ok-button",onClick:m,id:"themeButton"},{default:e.withCtx(()=>_[2]||(_[2]=[e.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},rp=nr._export_sfc(lp,[["__scopeId","data-v-df66eb1f"]]),Zn=a=>{var r;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let n=(r=le.analyzeSplitToContent(l,","))==null?void 0:r.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 n=n==null?void 0:n.join(","),n};function sc(a){return Ja.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function np(a){return Ja.axios.get(a,{responseType:"blob"})}let lr="$R",ip="http://222.92.178.198:55002/AIRobot",vt=["Form","BarChart","FormText","FormBlock"];const cc=a=>{var n,r;let l=(r=le.analyzeSplitToContent(a,"@"))==null?void 0:r[((n=le.analyzeSplitToContent(a,"@"))==null?void 0:n.length)-1];return!!(vt!=null&&vt.some(i=>l==null?void 0:l.includes(i)))},op=async(a,l,n,r)=>{var o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe;let i=a;if(cc(i==null?void 0:i[0])){let Re=fp(i),Le=(o=Re==null?void 0:Re.filter)==null?void 0:o.join(","),se=[];(f=Re==null?void 0:Re.hideContents)==null||f.forEach(ka=>{if(ka){const _a=ka;_a&&se.push(`(HideGroup=Yes, prop=${_a})`)}});let me=(c=Re==null?void 0:Re.formContents)==null?void 0:c.filter(ka=>{var _a;return(_a=ka==null?void 0:ka.filters)==null?void 0:_a.includes("@ShowHide=Hide")});(me==null?void 0:me.length)>0&&(me==null||me.forEach(ka=>{if(ka){const _a=ka==null?void 0:ka.prop;_a&&se.push(`(Hide=Yes, prop=${_a})`)}}));let qe=(r==null?void 0:r.menuFilter)??[];return Array.isArray(qe)||(qe=qe?[qe]:[]),qe=[...qe,...se],Le===""&&((u=Re==null?void 0:Re.formContents)==null?void 0:u.length)===0?void 0:{key:"Form",name:Re==null?void 0:Re.groupName,value:Re==null?void 0:Re.formContents,contents:Array.isArray((m=Re==null?void 0:Re.contents)==null?void 0:m[0])&&((w=(g=Re==null?void 0:Re.contents)==null?void 0:g[0])!=null&&w.every(ka=>Array.isArray(ka)))?[(N=(d=Re==null?void 0:Re.contents)==null?void 0:d[0])==null?void 0:N[n]]:[Re==null?void 0:Re.contents],filter:"("+Le+")",menuFilter:qe,groupFilter:Re==null?void 0:Re.groupFilters}}else if(((_=i==null?void 0:i[0])==null?void 0:_[0])!=="&"){let Re=pc(i,r),Le="";(J=Re==null?void 0:Re.tableFilter)!=null&&J.includes(lr)?Re.tableFilter=(A=Re==null?void 0:Re.tableFilter)==null?void 0:A.replace(lr,""):Le=(E=(L=(F=Re==null?void 0:Re.tableFilter)==null?void 0:F.replace("(",lr))==null?void 0:L.split(lr))==null?void 0:E[0];let se=[];Re!=null&&Re.tableFilter&&((S=le.analyzeSplitToContent(Re==null?void 0:Re.tableFilter,","))==null||S.forEach(qe=>{qe!=null&&qe.includes("@ShowHide=Hide")&&se.push("HideGroup=Yes")}));let me=(r==null?void 0:r.menuFilter)??[];return Array.isArray(me)||(me=me?[me]:[]),me=[...me,...se],{key:"Table",name:Re==null?void 0:Re.groupName,tableColumns:Re==null?void 0:Re.tableColumns,assistColumn:Re==null?void 0:Re.columns,tableContents:l===1?Re==null?void 0:Re.tableContents:(y=(k=Re==null?void 0:Re.tableContents)==null?void 0:k[n])!=null&&y.every(qe=>Array.isArray(qe))?(x=Re==null?void 0:Re.tableContents)==null?void 0:x[n]:[(O=Re==null?void 0:Re.tableContents)==null?void 0:O[n]],filter:Re==null?void 0:Re.tableFilter,menuFilter:me,quotePage:Le!==""?((Y=(W=(I=Le==null?void 0:Le.replace("*",lr))==null?void 0:I.split(lr))==null?void 0:W[0])==null?void 0:Y.replaceAll(":","/"))??"":void 0,quoteGroup:Le!==""?((ge=(ee=(Z=(U=(j=(de=(fe=Le==null?void 0:Le.replace("*",lr))==null?void 0:fe.split(lr))==null?void 0:de[1])==null?void 0:j.replace("{",lr))==null?void 0:U.split(lr))==null?void 0:Z[0])==null?void 0:ee.split(":"))==null?void 0:ge.filter(qe=>qe!==""))??[]:[],relatedQuotes:Re==null?void 0:Re.relatedQuotes,fatherSyncContents:Re==null?void 0:Re.fatherSyncContents,sonSyncContents:Re==null?void 0:Re.sonSyncContents,calculatorFilters:(Re==null?void 0:Re.calculatorFilters)??[]}}else{let Re=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Le=i==null?void 0:i[0];Le=Le==null?void 0:Le.slice(1,Le==null?void 0:Le.length),Le=le.analyzeSplitToContent(Le,":"),Le=Le==null?void 0:Le[(Le==null?void 0:Le.length)-1];let se=[];se.push("1");let me=Le==null?void 0:Le.replace("(",lr);me=(Ie=me==null?void 0:me.split(lr))==null?void 0:Ie[0],se.push(me);let qe=Le==null?void 0:Le.replace("(",lr);if(qe=(ue=qe==null?void 0:qe.split(lr))==null?void 0:ue[1],qe=(oe=(B=qe==null?void 0:qe.replace(")",lr))==null?void 0:B.split(lr))==null?void 0:oe[0],(ye=(q=qe==null?void 0:qe.replace(",",lr))==null?void 0:q.split(lr))==null||ye.forEach(ka=>{se.push(ka)}),se.push(""),se.push(""),(Ke=se==null?void 0:se[2])!=null&&Ke.includes(".xlsx")||(Ae=se==null?void 0:se[2])!=null&&Ae.includes(".xls"))try{let ka=ip+"/"+(se==null?void 0:se[2]),_a=await np(ka),H=`生成js函数名称为${se==null?void 0:se[1]}的函数,规则为:`+(se==null?void 0:se[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((_a==null?void 0:_a.status)===200){let V=_a==null?void 0:_a.data;const ae=new FormData;ae.append("file",V,se==null?void 0:se[2]),ae.append("query",H);let pe=await sc(ae);pe=(ne=(Ea=(Qe=pe==null?void 0:pe.data)==null?void 0:Qe.data)==null?void 0:Ea.response)==null?void 0:ne.replace("generateResult",se==null?void 0:se[1]),se[se.length-2]=pe,se[se.length-1]=[{name:(Pe=(ua=se==null?void 0:se[2])==null?void 0:ua.split("."))==null?void 0:Pe[0],url:ka}]}}catch{}return se=[se],{key:"Method",name:[],tableContents:se,tableColumns:Re}}},tp=(a,l)=>{var r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le;let n=(i=(r=le.analyzeSplitToContent(a,"="))==null?void 0:r.filter(se=>se!=="="))==null?void 0:i.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));if(cc(n==null?void 0:n[1])){let se=pp(n),me=(c=(f=(o=se==null?void 0:se.filter)==null?void 0:o.replace("@",lr))==null?void 0:f.split(lr))==null?void 0:c[0],qe=(g=(m=(u=se==null?void 0:se.filter)==null?void 0:u.replace("(",lr))==null?void 0:m.split(lr))==null?void 0:g[1],ka=(N=(d=(w=se==null?void 0:se.filter)==null?void 0:w.replace("(",lr))==null?void 0:d.split(lr))==null?void 0:N[0];ka="@"+((_=ka==null?void 0:ka.split("@"))==null?void 0:_[1]),qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1),qe=(A=(J=le.analyzeSplitToContent(qe,","))==null?void 0:J.map(H=>(H=ka+H,H)))==null?void 0:A.join("");let _a=me+"("+qe+")";return{key:"Form",name:se==null?void 0:se.group,filter:_a,formPage:((E=(L=(F=me==null?void 0:me.replace("*",lr))==null?void 0:F.split(lr))==null?void 0:L[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((W=(I=(O=(x=(y=(k=(S=me==null?void 0:me.replace("*",lr))==null?void 0:S.split(lr))==null?void 0:k[1])==null?void 0:y.replace("{",lr))==null?void 0:x.split(lr))==null?void 0:O[0])==null?void 0:I.split(":"))==null?void 0:W.filter(H=>H!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let se=n==null?void 0:n.filter((ae,pe)=>pe!==0);se=se==null?void 0:se.join("");let me=pc(n,l,se),qe="";(Y=me==null?void 0:me.tableFilter)!=null&&Y.includes(lr)?me.tableFilter=(fe=me==null?void 0:me.tableFilter)==null?void 0:fe.replace(lr,""):qe=(U=(j=(de=me==null?void 0:me.tableFilter)==null?void 0:de.replace("(",lr))==null?void 0:j.split(lr))==null?void 0:U[0];let ka=(ge=(ee=(Z=me==null?void 0:me.tableFilter)==null?void 0:Z.replace("(",lr))==null?void 0:ee.split(lr))==null?void 0:ge[0];ka=[{menus:(ue=(Ie=ka==null?void 0:ka.split("*"))==null?void 0:Ie[0])==null?void 0:ue.replaceAll(":","/"),groups:((oe=(B=ka==null?void 0:ka.split("*"))==null?void 0:B[1])==null?void 0:oe.split(":"))??[]}];let _a=(Ke=(ye=(q=me==null?void 0:me.tableFilter)==null?void 0:q.replace("(",lr))==null?void 0:ye.split(lr))==null?void 0:Ke[1];(_a==null?void 0:_a[(_a==null?void 0:_a.length)-1])===")"&&(_a=_a==null?void 0:_a.slice(0,(_a==null?void 0:_a.length)-1));let H=[];me!=null&&me.tableFilter&&((Ae=le.analyzeSplitToContent(me==null?void 0:me.tableFilter,","))==null||Ae.forEach(ae=>{ae!=null&&ae.includes("@ShowHide=Hide")&&H.push("HideGroup=Yes")}));let V=(l==null?void 0:l.menuFilter)??[];return Array.isArray(V)||(V=V?[V]:[]),V=[...V,...H],{key:"Table",name:me==null?void 0:me.groupName,filter:me==null?void 0:me.tableFilter,tableColumns:me==null?void 0:me.tableColumns,tableContents:me==null?void 0:me.tableContents,quotePage:qe!==""?((ne=(Ea=(Qe=qe==null?void 0:qe.replace("*",lr))==null?void 0:Qe.split(lr))==null?void 0:Ea[0])==null?void 0:ne.replaceAll(":","/"))??"":void 0,quoteGroup:qe!==""?((Le=(Re=(Pe=(ua=qe==null?void 0:qe.replace("*",lr))==null?void 0:ua.split(lr))==null?void 0:Pe[1])==null?void 0:Re.split(":"))==null?void 0:Le.filter(ae=>ae!==""))??[]:[],menuFilter:V,relatedQuotes:ka,fatherSyncContents:(me==null?void 0:me.fatherSyncContents)??[],sonSyncContents:(me==null?void 0:me.sonSyncContents)??[],calculatorFilters:(me==null?void 0:me.calculatorFilters)??[]}}},sp=async(a,l)=>{let n=[],r=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(i,o)=>{let f=[];i=i==null?void 0:i.map(async c=>{var u,m;if(f.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 op(le.analyzeSplitToContent(a,"="),r,o,c);g&&f.push(g)}}else f.push(tp(a,c))}),await Promise.all(i),n.push(f)}),await Promise.all(l),n};let Wi="/",cp="$",En="$R";const uc=a=>{var n,r,i;let l="";if((a==null?void 0:a.length)>1){let o=a==null?void 0:a.filter((f,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=(n=o==null?void 0:o.filter((f,c)=>c!==(o==null?void 0:o.length)-1))==null?void 0:n.join(""):o=o==null?void 0:o[0],l="("+o,((i=a==null?void 0:a[0])==null?void 0:i[((r=a==null?void 0:a[0])==null?void 0:r.length)-2])==="@"&&(l="@"+l)}return{filter:l}},dc=(a,l=[])=>{let n=(a==null?void 0:a.map(o=>{var f,c;return(c=o==null?void 0:o.key)==null?void 0:c.slice(1,(f=o==null?void 0:o.key)==null?void 0:f.length)}))??[],r=[];n==null||n.forEach(o=>{var f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe;if(o===""&&(o="算法库:通用算法"),o!=null&&o.includes(cp)){let de="",j=!0,U=le.analyzerSplitToWord(o,"(");(U==null?void 0:U.length)>1&&(de="("+((f=le.analyzerSplitToWord(U==null?void 0:U[1],")"))==null?void 0:f[0]),((u=U==null?void 0:U[0])==null?void 0:u[((c=U==null?void 0:U[0])==null?void 0:c.length)-2])==="@"&&(de="@"+de));let Z=o;Z=Z==null?void 0:Z.replace(de,""),de=vn(de),de=(m=le.analyzeSplitToContent(de,","))==null?void 0:m.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])===","&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe)),de!=null&&de.includes("@ShowHide=Hide")&&(j=!1);let ee=(g=Z==null?void 0:Z.replace("$",En))==null?void 0:g.split(En),ge=ee==null?void 0:ee[1],Ie=ee==null?void 0:ee[0];Ie!=null&&Ie.includes("[")&&(Ie=(d=(w=Ie==null?void 0:Ie.replace("[",En))==null?void 0:w.split(En))==null?void 0:d[0],ge=ge+":["+((J=(_=(N=ee==null?void 0:ee[0])==null?void 0:N.replace("[",En))==null?void 0:_.split(En))==null?void 0:J[1])),Ie=(F=(A=Ie==null?void 0:Ie.replaceAll(":","/"))==null?void 0:A.replaceAll("{",""))==null?void 0:F.replaceAll("}",""),(Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])!=="/"&&(Ie=Ie+"/"),ge=((L=Ie==null?void 0:Ie.split("/"))==null?void 0:L[0])+":"+ge;let B="";if(!(ge!=null&&ge.includes("[")))B=ge==null?void 0:ge.replaceAll(":","/"),r==null||r.push({path:B,isShow:j,filter:de,fatherPath:Ie});else{let oe=(S=(E=ge==null?void 0:ge.replace("[",En))==null?void 0:E.split(En))==null?void 0:S[1];oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1),oe=(k=le.analyzeSplitToContent(oe,","))==null?void 0:k.map(q=>((q==null?void 0:q[(q==null?void 0:q.length)-1])===","&&(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1)),q)),oe==null||oe.forEach(q=>{var ye,Ke;B=((Ke=(ye=ge==null?void 0:ge.replace("[",En))==null?void 0:ye.split(En))==null?void 0:Ke[0])+q,B=B==null?void 0:B.replaceAll(":","/"),r==null||r.push({path:B,isShow:j,filter:de,fatherPath:Ie})})}}else{let de="",j=!0,U=le.analyzerSplitToWord(o,"(");(U==null?void 0:U.length)>1&&(de=(y=uc(U))==null?void 0:y.filter);let Z=o;if(Z=Z==null?void 0:Z.replace(de,""),(de==null?void 0:de[0])==="("){de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1);let ge=[];(x=le.analyzeSplitToContent(de,","))==null||x.forEach(Ie=>{(Ie==null?void 0:Ie[(Ie==null?void 0:Ie.length)-1])===","&&(Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1)),(Ie==null?void 0:Ie[0])==="("&&(Ie=Ie==null?void 0:Ie.slice(1,(Ie==null?void 0:Ie.length)-1)),(Ie==null?void 0:Ie[0])!=="@"&&(Ie="@"+Ie),ge.push(vn(Ie))}),de=ge==null?void 0:ge.join(",")}else de=vn(de);de=(O=le.analyzeSplitToContent(de,","))==null?void 0:O.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)),de!=null&&de.includes("@ShowHide=Hide")&&(j=!1),(Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])==="}"&&(Z=Z+":"),Z=(I=Z==null?void 0:Z.replaceAll("{",""))==null?void 0:I.replaceAll("}","");let ee="";if(Z!=null&&Z.includes("[")){let ge=(W=Z==null?void 0:Z.replace("[",En))==null?void 0:W.split(En),Ie=ge==null?void 0:ge[1];Ie=Ie==null?void 0:Ie.slice(0,(Ie==null?void 0:Ie.length)-1),(fe=(Y=le.analyzeSplitToContent(Ie,","))==null?void 0:Y.map(ue=>((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)))==null||fe.forEach(ue=>{ee=(ge==null?void 0:ge[0])+ue,ee=ee==null?void 0:ee.replaceAll(":","/"),r==null||r.push({path:ee,isShow:j,filter:de})})}else ee=Z==null?void 0:Z.replaceAll(":","/"),r==null||r.push({path:ee,isShow:j,filter:de})}});let i=M.cloneDeep(r);return(l==null?void 0:l.length)>0&&(i=l),i=i==null?void 0:i.filter(o=>{var f,c,u,m;return!(o!=null&&o.fatherPath)&&((c=(f=o==null?void 0:o.path)==null?void 0:f.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 f;return o.path=(f=o.path)==null?void 0:f.replace(Wi,""),o.path}),(i==null?void 0:i.length)>0&&(r=r==null?void 0:r.map(o=>{var c,u,m,g,w,d,N;let f=i==null?void 0:i.find(_=>{var J;return(J=o==null?void 0:o.path)==null?void 0:J.includes(_)});return!(o!=null&&o.fatherPath)&&f&&!((c=o==null?void 0:o.path)!=null&&c.includes(Wi))&&!(i!=null&&i.find(_=>(o==null?void 0:o.path)===_))&&(o.path=f+Wi+((N=(m=(u=o==null?void 0:o.path)==null?void 0:u.split(f))==null?void 0:m[1])==null?void 0:N.slice(1,(d=(w=(g=o==null?void 0:o.path)==null?void 0:g.split(f))==null?void 0:w[1])==null?void 0:d.length))),o})),r},up=(a,l)=>dc([{key:a}],l),dp=async(a,l)=>{const n=[],r=up(a==null?void 0:a.key,l);return r&&(r==null?void 0:r.length)>0&&(r==null||r.forEach(o=>{n.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 sp(a==null?void 0:a.value,n)};let yl="$R",Ki="[Any]";const pp=a=>{var f,c;let l={},r=a==null?void 0:a[0];(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":"),l.group=r;let i=a==null?void 0:a[1],o;return i!=null&&i.includes("{")?o=(c=(f=i==null?void 0:i.replaceAll("{",""))==null?void 0:f.replaceAll("}",""))==null?void 0:c.replaceAll(Ki,""):o=i==null?void 0:i.replaceAll(Ki,""),(o==null?void 0:o[0])==="$"&&(o=o==null?void 0:o.slice(1,o==null?void 0:o.length)),l.filter=o,l},fp=a=>{var d,N,_,J,A,F;let l=[],n=[],r=[],i=[],o=[],f=[],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(L=>(L==null?void 0:L[0])!=="{"&&(L==null?void 0:L[0])!=="["))==null||d.forEach(L=>{var S,k,y;(L==null?void 0:L[(L==null?void 0:L.length)-1])===":"&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1));let E=le.analyzerSplitToWord(L,"(");if((E==null?void 0:E.length)>1){c=(S=uc(E))==null?void 0:S.filter;let x=L==null?void 0:L.replace(c,"");if(r.push(x),(c==null?void 0:c[0])==="("){c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1);let O=[];(k=le.analyzeSplitToContent(c,","))==null||k.forEach(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==null?void 0:I[0])==="("&&(I=I==null?void 0:I.slice(1,(I==null?void 0:I.length)-1)),(I==null?void 0:I[0])!=="@"&&(I="@"+I),O.push(vn(I))}),c=O==null?void 0:O.join(",")}else c=vn(c);c=(y=le.analyzeSplitToContent(c,","))==null?void 0:y.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)),c!=null&&c.includes("@ShowHide=Hide")&&f.push(x),i=[...i,...c]}else r.push(E==null?void 0:E[0])});let g=(N=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="{"))==null?void 0:N[0],w=(_=m==null?void 0:m.filter(L=>(L==null?void 0:L[0])==="["))==null?void 0:_[0];return l=Oi(w??""),l!=null&&l.every(L=>Array.isArray(L))&&(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=(J=le.analyzeSplitToContent(g,"@"))==null?void 0:J[1],o="@"+o,g=g==null?void 0:g.replace(o,""),o=vn(o),o=(A=le.analyzeSplitToContent(o,","))==null?void 0:A.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),(g==null?void 0:g[0])==="{"&&(g=g==null?void 0:g.slice(1,(g==null?void 0:g.length)-1)),g=(F=le.analyzeSplitToContent(g,","))==null?void 0:F.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),g==null||g.forEach((L,E)=>{var ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja;let S=[],k=[],y=[],x="",O="",I=!1,W,Y=[],fe=[],de=[],j="Input",U=[],Z=[];if(L!=null&&L.includes("==")){W=(ee=L==null?void 0:L.split("=="))==null?void 0:ee[0];let aa=(ge=L==null?void 0:L.split("=="))==null?void 0:ge[1],je="";((Ie=le.analyzeSplitToContent(aa,"$"))==null?void 0:Ie.length)>1&&((ue=le.analyzeSplitToContent(aa,"$"))==null?void 0:ue[0])!=="$"?(je=(B=le.analyzeSplitToContent(aa,"$"))==null?void 0:B[0],je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)):((oe=le.analyzeSplitToContent(aa,"}"))==null?void 0:oe.length)>1&&(je=(q=le.analyzeSplitToContent(aa,"}"))==null?void 0:q[1]);let pa=aa==null?void 0:aa.replace(je,"");if((je==null?void 0:je[0])==="("&&(je=je==null?void 0:je.slice(1,(je==null?void 0:je.length)-1)),(ye=le.analyzeSplitToContent(je,","))==null||ye.forEach(te=>{var Se;(te==null?void 0:te[0])!=="@"&&(te="@"+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));let ce=vn(te);(Se=le.analyzeSplitToContent(ce,","))==null||Se.forEach(we=>{(we==null?void 0:we[(we==null?void 0:we.length)-1])===","&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),S.push(we)})}),(pa==null?void 0:pa[0])==="$"&&(pa=pa==null?void 0:pa.slice(1,pa==null?void 0:pa.length)),pa!=null&&pa.includes("&")){let te=pa;if((pa==null?void 0:pa[0])==="("){let Se=(Ke=le.analyzeSplitToContent(pa,"&"))==null?void 0:Ke.map(we=>((we==null?void 0:we[(we==null?void 0:we.length)-1])==="&"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),we));te=Se==null?void 0:Se[1],Se=Se==null?void 0:Se[0],(Se==null?void 0:Se[0])!=="@"&&(Se="@"+Se),x=vn(Se)}(te==null?void 0:te[0])==="&"&&(te=te==null?void 0:te.slice(1,te==null?void 0:te.length)),O=(Qe=(Ae=te==null?void 0:te.replace("(",yl))==null?void 0:Ae.split(yl))==null?void 0:Qe[0],y=(ne=(Ea=te==null?void 0:te.replace("(",yl))==null?void 0:Ea.split(yl))==null?void 0:ne[1],y=[y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)],j="Input"}else{let te=(ua=pa==null?void 0:pa.replace("*",yl))==null?void 0:ua.split(yl);Y=(Pe=te==null?void 0:te[0])==null?void 0:Pe.split(":"),fe=(Le=(Re=le.analyzeSplitToContent(te==null?void 0:te[1],":"))==null?void 0:Re.filter((ce,Se)=>{var we,fa;return Se!==((fa=(we=te==null?void 0:te[1])==null?void 0:we.split(":"))==null?void 0:fa.length)-1}))==null?void 0:Le.map(ce=>((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)),ce)),de=(me=(se=le.analyzeSplitToContent(te==null?void 0:te[1],":"))==null?void 0:se.filter((ce,Se)=>{var we,fa;return Se===((fa=(we=te==null?void 0:te[1])==null?void 0:we.split(":"))==null?void 0:fa.length)-1}))==null?void 0:me[0],de=(ka=(qe=de==null?void 0:de.replaceAll("{",""))==null?void 0:qe.replaceAll("}",""))==null?void 0:ka.split(":"),j="Select"}if(W!=null&&W.includes("@")){let te=le.analyzeSplitToContent(W,"@");W=te==null?void 0:te[0],W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1),te="@"+(te==null?void 0:te[1]),te=vn(te),S=(_a=le.analyzeSplitToContent(te,","))==null?void 0:_a.map(ce=>((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)),ce))}}else if(((H=le.analyzeSplitToContent(L,"="))==null?void 0:H.length)>1)if(j="Select",W=(ae=(V=L==null?void 0:L.replace("=",yl))==null?void 0:V.split(yl))==null?void 0:ae[0],!(L!=null&&L.includes("If")))U=(ve=(pe=L==null?void 0:L.replace("=",yl))==null?void 0:pe.split(yl))==null?void 0:ve[1],U=U==null?void 0:U.split("||");else{let aa=(ca=(da=L==null?void 0:L.replace("=",yl))==null?void 0:da.split(yl))==null?void 0:ca[1];Z=(Ue=le.analyzeSplitToContent(aa,")"))==null?void 0:Ue.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)),k=(Sa=le.analyzeSplitToContent(aa,")"))==null?void 0:Sa.filter(je=>je==null?void 0:je.includes("If")),k=k==null?void 0:k.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(((Ma=le.analyzeSplitToContent(L,"@"))==null?void 0:Ma.length)>1){W=(Te=le.analyzeSplitToContent(L,"@"))==null?void 0:Te[0],(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));let aa="@"+((Fa=le.analyzeSplitToContent(L,"@"))==null?void 0:Fa[1]);aa=vn(aa),S=(Na=le.analyzeSplitToContent(aa,","))==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"))&&(j=(ja=(oa=S==null?void 0:S.find(je=>je==null?void 0:je.includes("@Type")))==null?void 0:oa.split("="))==null?void 0:ja[1])}else W=L;S!=null&&S.includes("@ShowHide=Hide")&&(I=!0),n.push({prop:W,label:W,value:"",menuPath:Y,groups:fe,columns:de,type:j,options:U,allContents:Z,filters:S,width:g==null?void 0:g.length,isFormColHidden:I,filterContents:k,functionName:O,functionRelatedWords:y,calculatorFilter:x})}),{groupName:r,groupFilters:i,formContents:n,contents:l,filter:o,hideContents:f}},Oi=a=>{var r,i;if(!a||typeof a!="string")return[];let l=[],n=a.slice(1,(a==null?void 0:a.length)-1);if((n==null?void 0:n[0])!=="[")(r=le.analyzeSplitToContent(n,","))==null||r.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??"")}),(n==null?void 0:n[(n==null?void 0:n.length)-1])===","&&l.push("");else{let o=[];(i=le.analyzeSplitToContent(n,","))==null||i.forEach(f=>{(f==null?void 0:f[(f==null?void 0:f.length)-1])===","&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1)),o.push(Oi(f))}),l=o}return l},wt=(a,l)=>{var F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta;let n,r=[],i=[],o=[],f=[],c=[],u=[],m=[],g="Input",w,d="",N="",_="",J=[],A="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(n=(F=a==null?void 0:a.split("=="))==null?void 0:F[0],w=(L=a==null?void 0:a.split("=="))==null?void 0:L[0],g="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((k=(S=(E=a==null?void 0:a.replace("=",yl))==null?void 0:E.split(yl))==null?void 0:S[1])!=null&&k.includes("If")))if(n=le.analyzeSplitToContent(a,"@"),n=n==null?void 0:n[0],(n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=(x=(y=n==null?void 0:n.replace("=",yl))==null?void 0:y.split(yl))==null?void 0:x[0],n!=null&&n.includes("&")&&(n=(I=(O=n==null?void 0:n.replace("&",yl))==null?void 0:O.split(yl))==null?void 0:I[0]),w=n,((W=le.analyzeSplitToContent(a,"@"))==null?void 0:W.length)>1&&!(a!=null&&a.includes("||"))){if(!(a!=null&&a.includes("&"))){let Ee=(Y=le.analyzeSplitToContent(a,"@"))==null?void 0:Y[1];if((Ee==null?void 0:Ee[0])!=="@"&&(Ee="@"+Ee),Ee=vn(Ee),N=Ee,N!=null&&N.includes("@Type")){let Me=le.analyzeSplitToContent(N,",");Me=Me==null?void 0:Me.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)),Me=(fe=Me==null?void 0:Me.filter(Fe=>Fe==null?void 0:Fe.includes("@Type")))==null?void 0:fe[0],g=(de=Me==null?void 0:Me.split("="))==null?void 0:de[1],g==="File"&&(g="Upload")}else g="Input"}}else if(a!=null&&a.includes("||")){let Ee=[];r=(Z=(U=(j=le.analyzeSplitToContent(a,"="))==null?void 0:j[1])==null?void 0:U.split("||"))==null?void 0:Z.map(Fe=>{var he,tl,El,Ml;let $e=Fe;if($e!=null&&$e.includes("@")){let Hl="@"+((tl=(he=$e==null?void 0:$e.replace("@",yl))==null?void 0:he.split(yl))==null?void 0:tl[1]);$e=(Ml=(El=$e==null?void 0:$e.replace("@",yl))==null?void 0:El.split(yl))==null?void 0:Ml[0],Hl=Zn(Hl),Ee.push(Hl)}return{label:$e==null?void 0:$e.replaceAll("'",""),value:$e==null?void 0:$e.replaceAll("'","")}}),(Ee==null?void 0:Ee.length)>0&&(N="("+(Ee==null?void 0:Ee.join("||"))+")");let Me=(ee=le.analyzeSplitToContent(a,"="))==null?void 0:ee[0];if(Me!=null&&Me.includes("@")){(Me==null?void 0:Me[(Me==null?void 0:Me.length)-1])==="="&&(Me=Me==null?void 0:Me.slice(0,(Me==null?void 0:Me.length)-1));let Fe=(ge=le.analyzeSplitToContent(Me,"@"))==null?void 0:ge[1];Fe="@"+Fe,Fe=Zn(Fe),N=N===""?Fe:Fe+","+N}}else g="Input",d=(B=(ue=(Ie=a==null?void 0:a.replace("=",yl))==null?void 0:Ie.split(yl))==null?void 0:ue[1])==null?void 0:B.replaceAll("'","");else if((q=(oe=le.analyzeSplitToContent(a,"="))==null?void 0:oe[1])!=null&&q.includes("||")){let Ee=(ye=le.analyzeSplitToContent(a,"="))==null?void 0:ye[0];if((Ee==null?void 0:Ee[(Ee==null?void 0:Ee.length)-1])==="="&&(Ee=Ee==null?void 0:Ee.slice(0,(Ee==null?void 0:Ee.length)-1)),Ee!=null&&Ee.includes("@")){let he=(Ke=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Ke[1];he="@"+he,N=Zn(he),n=(ne=(Ae=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Ae[0])==null?void 0:ne.slice(0,((Ea=(Qe=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Qe[0])==null?void 0:Ea.length)-1),w=(Le=(ua=le.analyzeSplitToContent(Ee,"@"))==null?void 0:ua[0])==null?void 0:Le.slice(0,((Re=(Pe=le.analyzeSplitToContent(Ee,"@"))==null?void 0:Pe[0])==null?void 0:Re.length)-1)}else n=Ee,w=Ee;let Me=(se=le.analyzeSplitToContent(a,"="))==null?void 0:se[1];Me=le.analyzeSplitToContent(Me,")");let Fe=Me==null?void 0:Me.filter(he=>!(he!=null&&he.includes("If")));Fe==null||Fe.forEach(he=>{(he==null?void 0:he[0])==="("&&(he=he==null?void 0:he.slice(1,(he==null?void 0:he.length)-1)),i==null||i.push(he==null?void 0:he.split("||"))});let $e=Me==null?void 0:Me.filter(he=>he==null?void 0:he.includes("If"));$e=$e==null?void 0:$e.map(he=>((he==null?void 0:he[0])==="|"&&(he==null?void 0:he[1])==="|"&&(he=he==null?void 0:he.slice(2,he==null?void 0:he.length)),(he==null?void 0:he[0])==="("&&(he=he==null?void 0:he.slice(1,(he==null?void 0:he.length)-1)),(he==null?void 0:he[0])!=="@"&&(he="@"+he),he)),o=$e}else{let Ee=a==null?void 0:a.split("=="),Me=(me=Ee==null?void 0:Ee.filter(Fe=>(Fe==null?void 0:Fe.includes("$"))&&(Fe==null?void 0:Fe[0])!=="{"))==null?void 0:me[0];if(Me&&!(Me!=null&&Me.includes("&"))){let Fe=(ka=le.analyzeSplitToContent(Me,")"))==null?void 0:ka[((qe=le.analyzeSplitToContent(Me,")"))==null?void 0:qe.length)-1],$e=(_a=Fe==null?void 0:Fe.replace("*",yl))==null?void 0:_a.split(yl),he=($e==null?void 0:$e[0])===""?l==null?void 0:l.value:$e==null?void 0:$e[0];(he==null?void 0:he[0])==="("&&(he=(H=le.analyzeSplitToContent(he,")"))==null?void 0:H[1]),he=(ae=(V=he==null?void 0:he.replaceAll("{",""))==null?void 0:V.replaceAll("}",""))==null?void 0:ae.replaceAll(Ki,""),(he==null?void 0:he[0])==="$"&&(he=(pe=he==null?void 0:he.slice(1,he==null?void 0:he.length))==null?void 0:pe.replaceAll(":","/")),f=he==null?void 0:he.split("/");let tl=(da=(ve=$e==null?void 0:$e[1])==null?void 0:ve.replace("{",yl))==null?void 0:da.split(yl),El=tl==null?void 0:tl[0];(El==null?void 0:El[(El==null?void 0:El.length)-1])===":"&&(El=El==null?void 0:El.slice(0,(El==null?void 0:El.length)-1)),c=El==null?void 0:El.split(":"),u=(Ma=(Sa=(Ue=(ca=tl==null?void 0:tl[1])==null?void 0:ca.replace("}",yl))==null?void 0:Ue.split(yl))==null?void 0:Sa[0])==null?void 0:Ma.split(":");let Ml="";((Te=le.analyzeSplitToContent(Me,")"))==null?void 0:Te.length)>1&&(Ml=(Fa=le.analyzeSplitToContent(Me,")"))==null?void 0:Fa[0]),Ml&&Ml!==""&&((Ml==null?void 0:Ml[0])!=="@"&&(Ml="@"+Ml),N=Zn(Ml))}if(Ee!=null&&Ee.some(Fe=>Fe==null?void 0:Fe.includes("&"))){let Fe=(Na=Ee==null?void 0:Ee.filter(tl=>tl==null?void 0:tl.includes("&")))==null?void 0:Na[0];Fe=(oa=le.analyzeSplitToContent(Fe,"&"))==null?void 0:oa.map(tl=>((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)),tl)),_=(je=(aa=(ja=Fe==null?void 0:Fe[1])==null?void 0:ja.replace("(",yl))==null?void 0:aa.split(yl))==null?void 0:je[0];let $e=(pa=le.analyzeSplitToContent(Fe==null?void 0:Fe[1],")"))==null?void 0:pa[0];$e=(ce=(te=$e==null?void 0:$e.replace("(",yl))==null?void 0:te.split(yl))==null?void 0:ce[1],$e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1),($e==null?void 0:$e[0])==="{"&&($e=$e==null?void 0:$e.slice(1,$e==null?void 0:$e.length)),($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)),J=$e==null?void 0:$e.split(",");let he=Fe==null?void 0:Fe[0];he&&he!==""&&((he==null?void 0:he[0])!=="@"&&(he="@"+he),A=Zn(he))}else if(!Me&&((Se=Ee==null?void 0:Ee.filter(Fe=>(Fe==null?void 0:Fe[0])==="{"))==null?void 0:Se.length)>0){let Fe=Ee==null?void 0:Ee[(Ee==null?void 0:Ee.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($e=>(($e==null?void 0:$e[($e==null?void 0:$e.length)-1])===","&&($e=$e==null?void 0:$e.slice(0,($e==null?void 0:$e.length)-1)),$e)),Fe=Fe==null?void 0:Fe.map($e=>{var he,tl,El,Ml;if($e=$e==null?void 0:$e.replaceAll("$",""),$e!=null&&$e.includes("{")){let Hl="";$e=$e==null?void 0:$e.replaceAll("{","");let Bl=$e==null?void 0:$e.split("}");Hl=((tl=(he=Bl==null?void 0:Bl[0])==null?void 0:he.split(":"))==null?void 0:tl[0])+":"+(Bl==null?void 0:Bl[1]),$e=Hl,$e=$e+":"}if($e!=null&&$e.includes(Ki)){let Hl="",Bl=$e==null?void 0:$e.split(Ki);Hl=((Ml=(El=Bl==null?void 0:Bl[0])==null?void 0:El.split(":"))==null?void 0:Ml[0])+":"+(Bl==null?void 0:Bl[1]),$e=Hl,$e=$e+":"}return $e=$e==null?void 0:$e.replaceAll(":","/"),$e}),m=Fe}else!((we=Ee==null?void 0:Ee[1])!=null&&we.includes("$"))&&((fa=Ee==null?void 0:Ee[1])==null?void 0:fa[0])!=="("&&u.push(Ee==null?void 0:Ee[1])}else n=(ea=a==null?void 0:a.split("&"))==null?void 0:ea[0],w=(Ta=a==null?void 0:a.split("&"))==null?void 0:Ta[0];return(r==null?void 0:r.length)===0&&(i==null?void 0:i.length)===0&&(f==null?void 0:f.length)===0&&g==="Select"&&(g="Input"),{label:n,prop:w,options:r,allContents:i,filterContents:o,menus:f,groups:c,words:u,align:"center",formType:g,filter:N,functionName:_,functionRelatedWords:J,calculatorFilter:A,relatedPages:m,value:d}},To=(a,l)=>{var r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z;let n=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((f=(o=(i=(r=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:r.replace(":",yl))==null?void 0:i.split(yl))==null?void 0:o[0])!=null&&f.includes(","))){let ee=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),ge=(c=ee==null?void 0:ee.replace(":",yl))==null?void 0:c.split(yl);if(((u=le.analyzeSplitToContent(ge==null?void 0:ge[1],"="))==null?void 0:u.length)===1){let Ie=ge==null?void 0:ge[0],ue=[];(w=le.analyzeSplitToContent((g=ge==null?void 0:ge[1])==null?void 0:g.slice(1,((m=ge==null?void 0:ge[1])==null?void 0:m.length)-1),","))==null||w.forEach(B=>{var oe,q;((oe=le.analyzeSplitToContent(B,"="))==null?void 0:oe.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)),ue=[...ue,...To(B,l)]):((B==null?void 0:B[(B==null?void 0:B.length)-1])===","&&(B=B==null?void 0:B.slice(0,(B==null?void 0:B.length)-1)),ue.push((q=To(B,l))==null?void 0:q[0]))}),n==null||n.push({label:Ie,prop:Ie,children:ue,align:"center"})}else{let Ie=[];if(((d=le.analyzeSplitToContent(ee,"="))==null?void 0:d.length)>=2){let B=(N=le.analyzeSplitToContent(ee,"="))==null?void 0:N[1],oe=(_=le.analyzeSplitToContent(B,"/"))==null?void 0:_.map(q=>((q==null?void 0:q[(q==null?void 0:q.length)-1])==="/"&&(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1)),q));Ie=oe==null?void 0:oe.map(q=>(q=Oi(q),q))}let ue=(S=(E=(L=(F=(A=(J=ee==null?void 0:ee.replace("{",yl))==null?void 0:J.split(yl))==null?void 0:A[1])==null?void 0:F.replace("}",yl))==null?void 0:L.split(yl))==null?void 0:E[0])==null?void 0:S.split(",");ue==null||ue.forEach((B,oe)=>{(Ie==null?void 0:Ie.length)>0&&oe===0?n==null||n.push({label:B,prop:B,align:"center",formType:"Select",relatedContents:Ie==null?void 0:Ie.map(q=>{let ye={};return ue==null||ue.forEach((Ke,Ae)=>{ye[Ke]=q==null?void 0:q[Ae]}),ye}),options:Ie==null?void 0:Ie.map(q=>({label:q==null?void 0:q[0],value:q==null?void 0:q[0]})),mainKey:!0}):n==null||n.push({label:B,prop:B,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((k=le.analyzeSplitToContent(a,"="))==null?void 0:k.length)===2&&((x=(y=le.analyzeSplitToContent(a,"="))==null?void 0:y[1])==null?void 0:x[0])==="["){let ee=[];if(((O=le.analyzeSplitToContent(a,"="))==null?void 0:O.length)>=2){let Ie=(I=le.analyzeSplitToContent(a,"="))==null?void 0:I[1],ue=(Y=(W=le.analyzeSplitToContent(Ie,"|"))==null?void 0:W.filter(B=>B!=="|"))==null?void 0:Y.map(B=>((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));ee=ue==null?void 0:ue.map(B=>(B=Oi(B),B))}let ge=(de=(fe=a==null?void 0:a.replace("}",yl))==null?void 0:fe.split(yl))==null?void 0:de[0];ge=(j=ge==null?void 0:ge.slice(1,ge==null?void 0:ge.length))==null?void 0:j.split(","),ge==null||ge.forEach((Ie,ue)=>{(ee==null?void 0:ee.length)>0&&ue===0?n==null||n.push({label:Ie,prop:Ie,align:"center",formType:"Select",relatedContents:ee==null?void 0:ee.map(B=>{let oe={};return ge==null||ge.forEach((q,ye)=>{oe[q]=B==null?void 0:B[ye]}),oe}),options:ee==null?void 0:ee.map(B=>({label:B==null?void 0:B[0],value:B==null?void 0:B[0]})),mainKey:!0}):n==null||n.push({label:Ie,prop:Ie,align:"center"})})}else(U=le.analyzeSplitToContent(a,","))==null||U.forEach(ee=>{var ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te;if((ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])===","&&(ee=ee==null?void 0:ee.slice(0,(ee==null?void 0:ee.length)-1)),(ee==null?void 0:ee[0])==="{"){let ce=le.analyzeSplitToContent(ee,"="),Se=ce==null?void 0:ce[(ce==null?void 0:ce.length)-1],we=[],fa=[],ea=[],Ta="",Ee="",Me=[],Fe=[],$e=(ge=Se==null?void 0:Se.replace("*",yl))==null?void 0:ge.split(yl),he=($e==null?void 0:$e[0])===""?l==null?void 0:l.value:$e==null?void 0:$e[0];he=le.analyzeSplitToContent(he,")");let tl="";if((he==null?void 0:he.length)>1&&((Ie=he==null?void 0:he[0])==null?void 0:Ie[0])!=="&"&&(tl=he==null?void 0:he[0],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ee=tl??""),he=(ue=he==null?void 0:he.filter(el=>(el==null?void 0:el[0])==="$"))==null?void 0:ue[0],((B=le.analyzeSplitToContent(he,"}"))==null?void 0:B.length)>1&&((q=(oe=le.analyzeSplitToContent(he,"}"))==null?void 0:oe[1])==null?void 0:q[0])==="("&&(tl=(ye=le.analyzeSplitToContent(he,"}"))==null?void 0:ye[1],(tl==null?void 0:tl[0])!=="@"&&(tl="@"+tl),Ee!==""&&(Ee=Ee+","),Ee=Ee+tl),(Ke=he==null?void 0:he.slice(1,(he==null?void 0:he.length)-1))!=null&&Ke.includes("$")||(he=(Ae=le.analyzeSplitToContent(he,"}"))==null?void 0:Ae[0]),(he==null?void 0:he[0])==="$"&&(he=(Qe=he==null?void 0:he.replace("{",""))==null?void 0:Qe.replace("}",":"),he=(Ea=he==null?void 0:he.slice(1,he==null?void 0:he.length))==null?void 0:Ea.replaceAll(":","/")),he!=null&&he.includes("$")){let el=(ne=he==null?void 0:he.split("$"))==null?void 0:ne[0];el=(ua=el==null?void 0:el.split("/"))==null?void 0:ua[0],he=el+"/"+((Pe=he==null?void 0:he.split("$"))==null?void 0:Pe[1])+"/"}we=(he==null?void 0:he.split("/"))??[];let El=(Le=(Re=$e==null?void 0:$e[1])==null?void 0:Re.replace("{",yl))==null?void 0:Le.split(yl);if((qe=(me=(se=$e==null?void 0:$e[1])==null?void 0:se.split("(@"))==null?void 0:me[0])!=null&&qe.includes("&&")||(H=(_a=(ka=$e==null?void 0:$e[1])==null?void 0:ka.split("@"))==null?void 0:_a[0])!=null&&H.includes("&&")){let el=(V=$e==null?void 0:$e[1])!=null&&V.includes("(@")?(ve=(pe=(ae=$e==null?void 0:$e[1])==null?void 0:ae.split("(@"))==null?void 0:pe[0])==null?void 0:ve.split("&&"):(Ue=(ca=(da=$e==null?void 0:$e[1])==null?void 0:da.split("@"))==null?void 0:ca[0])==null?void 0:Ue.split("&&");Me=el==null?void 0:el.map(Wa=>{var Kl,Jl;return(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(Jl=(Kl=Wa==null?void 0:Wa.replace("{",yl))==null?void 0:Kl.split(yl))==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 $l=[];el==null||el.forEach((Wa,Kl)=>{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("{",yl))==null?void 0:Jl.split(yl))==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(","),$l.push(Kl===0?(Wa==null?void 0:Wa.length)-1:Wa==null?void 0:Wa.length),Fe=[...Fe,...Wa]}),$l=(Sa=le.prefixSum($l))==null?void 0:Sa.map(Wa=>Wa==null?void 0:Wa.total),Me=Me==null?void 0:Me.map((Wa,Kl)=>({number:$l==null?void 0:$l[Kl],contents:Wa}))}let Ml=El==null?void 0:El[0];(Ml==null?void 0:Ml[(Ml==null?void 0:Ml.length)-1])===":"&&(Ml=Ml==null?void 0:Ml.slice(0,(Ml==null?void 0:Ml.length)-1)),fa=(Ml==null?void 0:Ml.split(":"))??[],ea=((Na=(Fa=(Te=(Ma=El==null?void 0:El[1])==null?void 0:Ma.replace("}",yl))==null?void 0:Te.split(yl))==null?void 0:Fa[0])==null?void 0:Na.split(","))??[];let Hl=(ja=ce==null?void 0:ce[0])==null?void 0:ja.slice(1,((oa=ce==null?void 0:ce[0])==null?void 0:oa.length)-2);Ee&&Ee!==""&&(Ta=Zn(Ee));let Bl=(aa=le.analyzeSplitToContent(Ta,","))==null?void 0:aa.map(el=>((el==null?void 0:el[(el==null?void 0:el.length)-1])===","&&(el=el==null?void 0:el.slice(0,(el==null?void 0:el.length)-1)),el)),jl=[];Bl!=null&&Bl.find(el=>el==null?void 0:el.includes("@MainParam"))&&(Bl=Bl==null?void 0:Bl.find(el=>el==null?void 0:el.includes("@MainParam")),Bl=(pa=(je=Bl==null?void 0:Bl.replace("=",yl))==null?void 0:je.split(yl))==null?void 0:pa[1],Bl=Bl==null?void 0:Bl.slice(1,(Bl==null?void 0:Bl.length)-1),jl=le.analyzeSplitToContent(Bl,",")),(te=Hl==null?void 0:Hl.split(","))==null||te.forEach((el,$l)=>{var Wa,Kl,Jl,ar,xl,br;if(((Wa=le.analyzeSplitToContent(el,"@"))==null?void 0:Wa.length)>1){let ya=(Kl=le.analyzeSplitToContent(el,"@"))==null?void 0:Kl[1];ya="@"+ya,Ta=Zn(ya),el=(Jl=le.analyzeSplitToContent(el,"@"))==null?void 0:Jl[0],(el==null?void 0:el[(el==null?void 0:el.length)-1])==="@"&&(el=el==null?void 0:el.slice(0,(el==null?void 0:el.length)-1))}n.push({label:el,prop:el,align:"center",menus:we,groups:(Me==null?void 0:Me.length)===0?fa:(ar=Me==null?void 0:Me.find(ya=>(ya==null?void 0:ya.number)>=$l))==null?void 0:ar.contents,words:(Fe==null?void 0:Fe.length)===0?(xl=ea==null?void 0:ea[$l])==null?void 0:xl.split(":"):(br=Fe==null?void 0:Fe[$l])==null?void 0:br.split(":"),formType:(we==null?void 0:we.length)>0?"Select":"Input",mainKey:!!($l===0||jl!=null&&jl.find(ya=>ya===el)),filter:Ta,isMainPath:(Me==null?void 0:Me.findIndex(ya=>(ya==null?void 0:ya.number)>=$l))===0})})}else n.push({label:ee,prop:ee,align:"center"})});else{let ee=(Z=le.analyzeSplitToContent(a,","))==null?void 0:Z.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));ee==null||ee.forEach(ge=>{n.push(wt(ge,l))})}return n},hp=(a,l)=>{var f,c,u,m,g;let n=a;if(!a)return;let r="";((f=le.analyzeSplitToContent(a,"}"))==null?void 0:f.length)>1&&(n=(c=le.analyzeSplitToContent(a,"}"))==null?void 0:c[0],r=(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])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let i=[],o=[];return i.push({label:"排序",prop:"sort"}),i.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=le.analyzeSplitToContent(n,","))==null||m.forEach(w=>{var d;(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==null?void 0:w[0])==="{"?(d=To(w,l))==null||d.forEach(N=>{i.push(N)}):i.push(wt(w,l))}),i!=null&&i.some(w=>{var d;return(d=w==null?void 0:w.prop)==null?void 0:d.includes("@")})&&(i=i==null?void 0:i.filter(w=>{var d;return!((d=w==null?void 0:w.prop)!=null&&d.includes("@"))})),r!==""&&((r==null?void 0:r[0])=="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),(g=le.analyzeSplitToContent(r,","))==null||g.forEach(w=>{var d;(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==null?void 0:w[0])==="{"?(d=To(w,l))==null||d.forEach(N=>{o.push(N)}):o.push(wt(w,l))})),{columns:i,secondColumns:o}},vn=a=>{var l,n,r,i,o;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let f=(n=(l=a==null?void 0:a.replace("(",yl))==null?void 0:l.split(yl))==null?void 0:n[1],c=(i=(r=a==null?void 0:a.replace("(",yl))==null?void 0:r.split(yl))==null?void 0:i[0];return f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1),f=(o=le.analyzeSplitToContent(f,","))==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)),f=f==null?void 0:f.join(","),a!=null&&a.includes("@Quote")&&(f!=null&&f.includes("@QuoteType")||(f=f===""?f+"@QuoteType=Manual":f+",@QuoteType=Manual"),f!=null&&f.includes("@QuoteSonSync")||(f=f===""?f+"@QuoteSonSync=No":f+",@QuoteSonSync=No"),f!=null&&f.includes("@QuoteFatherSync")||(f=f===""?f+"@QuoteFatherSync=Yes":f+",@QuoteFatherSync=Yes")),f}},hs=a=>{let l=a==null?void 0:a.map(n=>{var r,i;return{menus:n==null?void 0:n.menus,content:((r=n==null?void 0:n.menus)==null?void 0:r.join("/"))+yl+((i=n==null?void 0:n.groups)==null?void 0:i.join("/"))}});return l=l==null?void 0:l.filter(n=>{var r;return(n==null?void 0:n.menus)&&((r=n==null?void 0:n.menus)==null?void 0:r.length)>0}),l=l==null?void 0:l.map(n=>n==null?void 0:n.content),l=[...new Set(l)],l=l==null?void 0:l.map(n=>{var r,i;return{menus:(r=n==null?void 0:n.split(yl))==null?void 0:r[0],groups:((i=n==null?void 0:n.split(yl))==null?void 0:i[1])??[]}}),l},vs=a=>{var n;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(n=le.analyzeSplitToContent(l,","))==null?void 0:n.map(r=>((r==null?void 0:r[(r==null?void 0:r.length)-1])===","&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])!=="@"&&(r="@"+r),(r==null?void 0:r[1])==="("&&(r=vn(r)),r)),l==null?void 0:l.join(",")},pc=(a,l,n="")=>{var E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce;let r=[],i=[],o=[],f="",c="",u="",m=[],g=[],w=[],d=[],N="";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])!=="$"&&!((k=a==null?void 0:a[0])!=null&&k.includes("$")))return;((y=a==null?void 0:a[0])==null?void 0:y[0])!=="*"&&((x=a==null?void 0:a[0])==null?void 0:x[0])!=="$"&&(f=(O=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:O[0],(f==null?void 0:f[0])!=="@"&&(f="@"+f),f=Zn(f),u=(I=le.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:I[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 J=le.analyzeSplitToContent(a==null?void 0:a[0],":");if(r=(W=J==null?void 0:J.filter(Se=>(Se==null?void 0:Se[0])!=="{"&&(Se==null?void 0:Se[0])!=="["))==null?void 0:W.join(""),c=(Y=a==null?void 0:a[0])==null?void 0:Y.replace(r,""),(r==null?void 0:r[0])==="("&&(r=""),N=(fe=J==null?void 0:J.filter(Se=>(Se==null?void 0:Se[0])!=="["))==null?void 0:fe.join(""),N=(de=a==null?void 0:a[0])==null?void 0:de.replace(N,""),c=c==null?void 0:c.replace(N,""),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),((j=le.analyzeSplitToContent(c,"@"))==null?void 0:j.length)>1&&(f=(U=le.analyzeSplitToContent(c,"@"))==null?void 0:U[1],(f==null?void 0:f[(f==null?void 0:f.length)-1])===":"&&(f=f==null?void 0:f.slice(0,(f==null?void 0:f.length)-1)),f="@"+f,f=vn(f),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)),((ee=le.analyzeSplitToContent(r,"@"))==null?void 0:ee.length)>1){f!==""&&(f=f+",");let Se=(ge=le.analyzeSplitToContent(r,"@"))==null?void 0:ge[1];Se="@"+Se,Se=vn(Se),f=f+Se,r=(Ie=le.analyzeSplitToContent(r,"@"))==null?void 0:Ie[0]}if((r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=r===""?[]:r==null?void 0:r.split(":"),(c==null?void 0:c[(c==null?void 0:c.length)-1])===":"&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),n!==""){let Se=(ue=le.analyzeSplitToContent(n,")"))==null?void 0:ue[0],we=le.analyzeSplitToContent(n,")");we=we==null?void 0:we.filter((Ee,Me)=>Me!==(we==null?void 0:we.length)-1),we=we==null?void 0:we.join("");let fa=(B=le.analyzeSplitToContent(n,"@"))==null?void 0:B[1];u=(q=(oe=le.analyzeSplitToContent(n,"@"))==null?void 0:oe[0])==null?void 0:q.replace(we,""),(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 ea="";if(ea=le.analyzeSplitToContent(n,")"),ea=ea==null?void 0:ea.filter((Ee,Me)=>Me!==0&&Me!==(ea==null?void 0:ea.length)-1),((ye=le.analyzeSplitToContent(n,"&"))==null?void 0:ye.length)>1&&(ea==null?void 0:ea.length)<2&&(Se="",u="",ea=le.analyzeSplitToContent(n,")")),ea!=null&&ea.some(Ee=>(Ee==null?void 0:Ee[0])===":")){let Ee=(Ke=ea==null?void 0:ea.filter(Me=>(Me==null?void 0:Me[0])===":"))==null?void 0:Ke.join("");N=Ee==null?void 0:Ee.slice(1,Ee==null?void 0:Ee.length),ea=ea==null?void 0:ea.filter(Me=>(Me==null?void 0:Me[0])!==":")}(ea==null?void 0:ea.length)>0&&((Ae=le.chunkArray(ea))==null||Ae.forEach(Ee=>{var tl,El,Ml,Hl,Bl;let Me="",Fe=[],$e="";(Ee==null?void 0:Ee.length)>1&&($e="@"+(Ee==null?void 0:Ee[0]),$e=vn($e));let he=(Ee==null?void 0:Ee.length)===1?Ee==null?void 0:Ee[0]:Ee==null?void 0:Ee[1];he=he==null?void 0:he.slice(1,he==null?void 0:he.length),Me=(El=(tl=he==null?void 0:he.replace("(",yl))==null?void 0:tl.split(yl))==null?void 0:El[0],he=(Hl=(Ml=he==null?void 0:he.replace("(",yl))==null?void 0:Ml.split(yl))==null?void 0:Hl[1],he=he==null?void 0:he.slice(0,(he==null?void 0:he.length)-1),Fe=(Bl=le.analyzeSplitToContent(he,","))==null?void 0:Bl.map(jl=>((jl==null?void 0:jl[(jl==null?void 0:jl.length)-1])===","&&(jl=jl==null?void 0:jl.slice(0,(jl==null?void 0:jl.length)-1)),jl)),m.push({functionName:Me,functionRelatedWords:Fe,calculatorFilter:$e})})),Se=vs(Se),fa=vs(fa);let Ta=Se??"";if(Ta!==""&&(Ta=Ta+","),Ta=Ta+fa,(Ta==null?void 0:Ta[(Ta==null?void 0:Ta.length)-1])===","&&(Ta=Ta==null?void 0:Ta.slice(0,(Ta==null?void 0:Ta.length)-1)),Ta!==""&&f!==""&&(f=f+","),f=f+Ta,(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),u=(Qe=le.analyzeSplitToContent(u,":"))==null?void 0:Qe.filter((Ee,Me)=>{var Fe;return!((Ee==null?void 0:Ee[0])==="{"&&Me===((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)),f!=null&&f.includes("@Sync")||(f=f===""?f+"@Sync=(Yes,Yes)":f+",@Sync=(Yes,Yes)"),u!=null&&u.includes("$")){let Ee=(ne=(Ea=u==null?void 0:u.replace("*",yl))==null?void 0:Ea.split(yl))==null?void 0:ne[1],Me=(Pe=(ua=u==null?void 0:u.replace("*",yl))==null?void 0:ua.split(yl))==null?void 0:Pe[0];Me=Me==null?void 0:Me.split("$"),Me=((Le=(Re=Me==null?void 0:Me[0])==null?void 0:Re.split(":"))==null?void 0:Le[0])+":"+(Me==null?void 0:Me[1])+":",u=Me+"*"+Ee}else u=(se=u==null?void 0:u.replaceAll("{",""))==null?void 0:se.replaceAll("}","");(u==null?void 0:u[0])===":"&&(N=u==null?void 0:u.slice(1,u==null?void 0:u.length),u="")}f!==""&&f&&(f="("+f+")"),f=u+f,((me=le.analyzeSplitToContent(c,"}"))==null?void 0:me.length)>1&&(c=(qe=le.analyzeSplitToContent(c,"}"))==null?void 0:qe.filter(Se=>(Se==null?void 0:Se[0])!=="@"),c=c==null?void 0:c.join(""));let A=hp(c,l);o=c===""?[]:(A==null?void 0:A.columns)??[],d=le.getColumnChild(o);let F=le.getColumnChild(o);o!=null&&o.some(Se=>{var we;return Array.isArray(Se==null?void 0:Se.children)&&((we=Se==null?void 0:Se.children)==null?void 0:we.length)>0})&&(o=[o]),i=N?Oi(N):[],!(i!=null&&i.every(Se=>Array.isArray(Se)))&&(i==null?void 0:i.length)>0&&(i=[i]),(i==null?void 0:i.length)>0&&(Array.isArray(i==null?void 0:i[0])&&((ka=i==null?void 0:i[0])!=null&&ka.every(Se=>Array.isArray(Se)))?i=i==null?void 0:i.map((Se,we)=>(Se=Se.map((fa,ea)=>(fa.unshift("{}"),fa.unshift((ea+1).toString()),fa)),Se)):i=i==null?void 0:i.map((Se,we)=>(Se.unshift("{}"),Se.unshift((we+1).toString()),Se))),A!=null&&A.secondColumns&&((_a=A==null?void 0:A.secondColumns)==null?void 0:_a.length)>0&&((i==null?void 0:i.length)>0?i=i==null?void 0:i.map((Se,we)=>{var fa,ea;return Array.isArray(Se==null?void 0:Se[0])?Se=Se==null?void 0:Se.map((Ta,Ee)=>{var Me,Fe;return Ta.unshift((Fe=(Me=A==null?void 0:A.secondColumns)==null?void 0:Me[Ee])==null?void 0:Fe.prop),Ta}):Se.unshift((ea=(fa=A==null?void 0:A.secondColumns)==null?void 0:fa[we])==null?void 0:ea.prop),Se}):i=(H=A==null?void 0:A.secondColumns)==null?void 0:H.map((Se,we)=>(Se=[Se==null?void 0:Se.label],Se.push(we),Se)),o.unshift({label:"",prop:"disabled",sortable:!1})),d=d==null?void 0:d.map(Se=>{var we,fa;return{menus:Se==null?void 0:Se.menus,content:((we=Se==null?void 0:Se.menus)==null?void 0:we.join("/"))+yl+((fa=Se==null?void 0:Se.groups)==null?void 0:fa.join("/"))}});let L=[];if(((ae=(V=f==null?void 0:f.replace("(",yl))==null?void 0:V.split(yl))==null?void 0:ae[0])!==""&&(L=(ve=(pe=f==null?void 0:f.replace("(",yl))==null?void 0:pe.split(yl))==null?void 0:ve[0],L=[L],L=L==null?void 0:L.map(Se=>{var fa,ea,Ta;let we=Se==null?void 0:Se.split("*");return{menus:(fa=we==null?void 0:we[0])==null?void 0:fa.split(":"),content:((ea=we==null?void 0:we[0])==null?void 0:ea.replaceAll(":","/"))+yl+((Ta=we==null?void 0:we[1])==null?void 0:Ta.replaceAll(":","/"))}}),d=[...d,...L]),d=d==null?void 0:d.filter(Se=>{var we;return(Se==null?void 0:Se.menus)&&((we=Se==null?void 0:Se.menus)==null?void 0:we.length)>0}),d=d==null?void 0:d.map(Se=>Se==null?void 0:Se.content),d=[...new Set(d)],d=d==null?void 0:d.map(Se=>{var we,fa;return{menus:(we=Se==null?void 0:Se.split(yl))==null?void 0:we[0],groups:((fa=Se==null?void 0:Se.split(yl))==null?void 0:fa[1])??[]}}),g=F==null?void 0:F.filter(Se=>{var we;return(Se==null?void 0:Se.filter)&&((we=Se==null?void 0:Se.filter)==null?void 0:we.includes("@Sync"))}),(g==null?void 0:g.length)>0&&(g=g==null?void 0:g.filter(Se=>{var we,fa,ea,Ta;return(Ta=(ea=(fa=(we=le.analyzeSplitToContent(Se==null?void 0:Se.filter,","))==null?void 0:we.find(Ee=>Ee==null?void 0:Ee.includes("@Sync")))==null?void 0:fa.split(","))==null?void 0:ea[0])==null?void 0:Ta.includes("Yes")}),g=hs(g)),w=F==null?void 0:F.filter(Se=>{var we;return(Se==null?void 0:Se.filter)&&((we=Se==null?void 0:Se.filter)==null?void 0:we.includes("@Sync"))}),(w==null?void 0:w.length)>0&&(w=w==null?void 0:w.filter(Se=>{var we,fa,ea,Ta;return(Ta=(ea=(fa=(we=le.analyzeSplitToContent(Se==null?void 0:Se.filter,","))==null?void 0:we.find(Ee=>Ee==null?void 0:Ee.includes("@Sync")))==null?void 0:fa.split(","))==null?void 0:ea[1])==null?void 0:Ta.includes("Yes")}),w=hs(w)),f!==""&&(f!=null&&f.includes("@Sync"))&&(f==null?void 0:f[0])!=="("){let Se=(da=f==null?void 0:f.replace("(",yl))==null?void 0:da.split(yl),we=Se==null?void 0:Se[1];if(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),we=le.analyzeSplitToContent(we,","),(Sa=(Ue=(ca=we==null?void 0:we.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:ca.split(","))==null?void 0:Ue[0])!=null&&Sa.includes("Yes")){let fa=Se==null?void 0:Se[0];fa=[{menus:(Te=(Ma=fa==null?void 0:fa.split("*"))==null?void 0:Ma[0])==null?void 0:Te.replaceAll(":","/"),groups:((Na=(Fa=fa==null?void 0:fa.split("*"))==null?void 0:Fa[1])==null?void 0:Na.split(":"))??[]}],g=[...g,...fa]}if((aa=(ja=(oa=we==null?void 0:we.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:oa.split(","))==null?void 0:ja[1])!=null&&aa.includes("Yes")){let fa=Se==null?void 0:Se[0];fa=[{menus:(pa=(je=fa==null?void 0:fa.split("*"))==null?void 0:je[0])==null?void 0:pa.replaceAll(":","/"),groups:((ce=(te=fa==null?void 0:fa.split("*"))==null?void 0:te[1])==null?void 0:ce.split(":"))??[]}],w=[...w,...fa]}}return{groupName:r,tableColumns:o,tableFilter:f,tableContents:i,columns:(A==null?void 0:A.secondColumns)??[],relatedQuotes:d,fatherSyncContents:g,sonSyncContents:w,calculatorFilters:m}},fc=(a,l)=>(a=a==null?void 0:a.map((n,r)=>{var i,o,f,c;if(Array.isArray(n))n=n==null?void 0:n.map(u=>{var m,g,w,d;return u!=null&&u.isMainPath||(((m=u==null?void 0:u.children)==null?void 0:m.length)>0?u.children=fc(u.children,l):((g=u==null?void 0:u.menus)==null?void 0:g.length)>0&&!((w=n==null?void 0:n[0])!=null&&w.isMainPath)&&(u.menus=(d=u.menus)==null?void 0:d.map((N,_)=>{var J,A;return((J=u.menus)==null?void 0:J.length)-1===_&&N===""&&(l==null?void 0:l.parentContent)+"/"!==((A=u.menus)==null?void 0:A.join("/"))&&(N=l==null?void 0:l.value),u}),u.bindMenus=u.menus)),u});else{if(r===0&&((i=n.menus)==null?void 0:i.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((o=n.menus)==null?void 0:o.length)>0&&!((f=a==null?void 0:a[0])!=null&&f.isMainPath)&&(n.menus=(c=n.menus)==null?void 0:c.map((u,m)=>{var g,w;return((g=n.menus)==null?void 0:g.length)-1===m&&u===""&&(l==null?void 0:l.parentContent)+"/"!==((w=n.menus)==null?void 0:w.join("/"))&&(u=l==null?void 0:l.value),u}),n.bindMenus=n.menus)}return n}),a),vp=(a,l)=>(a=a==null?void 0:a.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=fc(n.contents,l)),n)),a),_t=(a,l)=>{let n=a;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(r=>(r=_t(r,l),r)):n=n==null?void 0:n.map(r=>{var i,o;return r!=null&&r.children&&((i=r==null?void 0:r.children)==null?void 0:i.length)>0?r.children=_t(r==null?void 0:r.children,l):r!=null&&r.words&&((o=r==null?void 0:r.words)==null?void 0:o.length)>0&&(l!=null&&l.find(f=>{var c,u,m,g;return((g=(c=r==null?void 0:r.prop)==null?void 0:c.split("."))==null?void 0:g[((m=(u=r==null?void 0:r.prop)==null?void 0:u.split("."))==null?void 0:m.length)-1])===f}))&&(r.mainKey=!0),r}),n};let Sr="$R";const mp=M.useUnit(M.pinia),{selectTitle:gn}=M.storeToRefs(mp),yp=M.useMenuState(M.pinia),{localFiles:gp}=M.storeToRefs(yp),bp=M.useLoginState(M.pinia),{loginUserInfo:mt}=M.storeToRefs(bp),Cn=[{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 kp=async a=>{var n,r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L;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=(r=(n=E==null?void 0:E.replace("(",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1],E="("+((i=E==null?void 0:E.replaceAll("{",""))==null?void 0:i.replaceAll("}",""));let S=le.calculatorAndToOr(E),k=Object.keys(S==null?void 0:S[0]);if(E=S,((o=k==null?void 0:k[0])==null?void 0:o[0])==="$"){let y=(c=k==null?void 0:k[0])==null?void 0:c.slice(1,((f=k==null?void 0:k[0])==null?void 0:f.length)-1),x=(m=(u=y==null?void 0:y.split("*"))==null?void 0:u[0])==null?void 0:m.replaceAll(".","/"),O=(d=(w=(g=y==null?void 0:y.split("*"))==null?void 0:g[1])==null?void 0:w.split("."))==null?void 0:d[0],I=await Wr(x,!1);I=(N=I==null?void 0:I.filter(j=>(j==null?void 0:j.name)===O))==null?void 0:N[0];let W=(J=(_=I==null?void 0:I.compData)==null?void 0:_.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:J.contents;E=E==null?void 0:E.map(j=>{var Z,ee;let U={};for(let ge in j)if((ge==null?void 0:ge[0])==="$"){let Ie=(ee=ge==null?void 0:ge.split("."))==null?void 0:ee[((Z=ge==null?void 0:ge.split("."))==null?void 0:Z.length)-1];U[Ie]=j==null?void 0:j[ge]}else U[ge]=j==null?void 0:j[ge];return U});let Y=(F=(A=I==null?void 0:I.compData)==null?void 0:A.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:F.contents;Y=(L=le.getEqualChild(Y))==null?void 0:L.filter(j=>(j==null?void 0:j.label)!=="操作");let de=le.tableToForm(W,Y);if(E==null||E.forEach(j=>{var U,Z,ee,ge,Ie;for(let ue in j)(j==null?void 0:j[ue])==="LoginUser"&&(j[ue]=((U=mt.value)==null?void 0:U.姓名)||((Z=mt.value)==null?void 0:Z.account)||((ee=mt.value)==null?void 0:ee.账号)),!((ge=de==null?void 0:de[0])!=null&&ge.find(B=>{var oe;return(B==null?void 0:B.key)===ue||((oe=B==null?void 0:B.key)==null?void 0:oe.includes(ue))}))&&!(de!=null&&de.find(B=>{var oe;return(B==null?void 0:B.key)===ue||((oe=B==null?void 0:B.key)==null?void 0:oe.includes(ue))}))||(((Ie=j[ue])==null?void 0:Ie[0])!=="!"?de=de==null?void 0:de.filter(B=>{var oe,q;return((oe=B==null?void 0:B.find(ye=>{var Ke;return(ye==null?void 0:ye.key)===ue||((Ke=ye==null?void 0:ye.key)==null?void 0:Ke.includes(ue))}))==null?void 0:oe.value)===j[ue]||Array.isArray(j==null?void 0:j[ue])&&((q=j==null?void 0:j[ue])==null?void 0:q.find(ye=>{var Ke;return((Ke=B==null?void 0:B.find(Ae=>{var Qe;return(Ae==null?void 0:Ae.key)===ue||((Qe=Ae==null?void 0:Ae.key)==null?void 0:Qe.includes(ue))}))==null?void 0:Ke.value)===ye}))}):de=de==null?void 0:de.filter(B=>{var oe;return((oe=B==null?void 0:B.find(q=>{var ye;return(q==null?void 0:q.key)===ue||((ye=q==null?void 0:q.key)==null?void 0:ye.includes(ue))}))==null?void 0:oe.value)!==j[ue]}))}),(de==null?void 0:de.length)===0){let j=a==null?void 0:a.contents;return j.push({key:"hideContents",contents:!0}),j}}}return a==null?void 0:a.contents},xp=a=>{var l,n,r,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 f=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(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m)),c=c==null?void 0:c[1],(c==null?void 0:c[0])==="("&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(n=le.analyzeSplitToContent(c,","))==null?void 0:n.map(m=>((m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m));let u=(o=(i=(r=gp.value)==null?void 0:r.filter(m=>{var g;return(m==null?void 0:m.path)===((g=a==null?void 0:a.groupName)==null?void 0:g[0])}))==null?void 0:i[0])==null?void 0:o.children;return u=(u==null?void 0:u.filter(m=>c==null?void 0:c.find(g=>g===(m==null?void 0:m.name))))??[],(c==null?void 0:c.length)>0&&(u==null?void 0:u.length)===0&&(c==null||c.forEach(m=>{u.push({url:"file:///"+(m==null?void 0:m.replaceAll("\\","/"))})})),f.push({key:"backGround",contents:u}),f}return a==null?void 0:a.contents},wp=a=>{const l=vc(a==null?void 0:a.filter);return l?Xp(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},_p=a=>{let l=parseInt(a==null?void 0:a.filter);l=1/l;let n=a==null?void 0:a.contents;return n.push({key:"rowPosition",contents:l}),n},Sp=a=>{const l=vc(a==null?void 0:a.filter);if(!l)return a==null?void 0:a.contents;let n=a==null?void 0:a.contents;return n.push({key:"numPosition",contents:l}),n},Ep=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const n=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(n)?a==null?void 0:a.filter:n}),l}return a==null?void 0:a.contents},Cp=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},Dp=a=>{var n;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(n=a==null?void 0:a.contents)==null?void 0:n.map(r=>{var i;return(r==null?void 0:r.key)==="tableContents"&&(r.contents=(i=r.contents)==null?void 0:i.slice(0,parseInt(a==null?void 0:a.filter))),r})},Tp=async a=>{var l,n,r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j;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 U=(r=(n=a==null?void 0:a.contents)==null?void 0:n.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:r.contents;Array.isArray(U==null?void 0:U[0])&&(U=U==null?void 0:U[0]),U=le.getColumnChild(U);let Z=U==null?void 0:U.filter(ye=>(ye==null?void 0:ye.filter)&&(ye==null?void 0:ye.filter)!==""),ee=new Map,ge=[];Z==null||Z.forEach(ye=>{var Ke,Ae;ee.get((Ke=ye==null?void 0:ye.menus)==null?void 0:Ke.join("/"))||(ee.set((Ae=ye==null?void 0:ye.menus)==null?void 0:Ae.join("/"),ye),ge.push(ye))});let Ie=(o=(i=gn==null?void 0:gn.value)==null?void 0:i.find(ye=>(ye==null?void 0:ye.condition)==="child"))==null?void 0:o.value,ue=ge==null?void 0:ge.map(ye=>{var Ke,Ae,Qe;return ye=(Ke=ye==null?void 0:ye.menus)==null?void 0:Ke.join("/"),(ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])==="/"&&((Qe=(Ae=gn==null?void 0:gn.value)==null?void 0:Ae.find(Ea=>(Ea==null?void 0:Ea.condition)==="child"))==null?void 0:Qe.parentContent)+"/"!==ye?ye=ye+Ie:(ye==null?void 0:ye[(ye==null?void 0:ye.length)-1])==="/"&&(ye=ye==null?void 0:ye.slice(0,(ye==null?void 0:ye.length)-1)),ye}),B=ge==null?void 0:ge.map(ye=>ye==null?void 0:ye.groups),oe=ue==null?void 0:ue.map(async ye=>{let Ke=await Wr(ye,!1);return{path:ye,contents:Ke}});oe=await Promise.all(oe);let q=oe==null?void 0:oe.map((ye,Ke)=>{var Qe,Ea,ne,ua,Pe,Re,Le;let Ae=(Qe=ye==null?void 0:ye.contents)==null?void 0:Qe.filter(se=>{var me,qe;return(se==null?void 0:se.name)===((qe=B==null?void 0:B[Ke])==null?void 0:qe[((me=B==null?void 0:B[Ke])==null?void 0:me.length)-1])});return Ae=(ua=(ne=(Ea=Ae==null?void 0:Ae[0])==null?void 0:Ea.compData)==null?void 0:ne.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:ua.contents,(ye==null?void 0:ye.path)===((Re=(Pe=gn==null?void 0:gn.value)==null?void 0:Pe.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:Re.parentContent)&&(Ae=((Le=Ae==null?void 0:Ae.map(se=>{for(let me in se)if(se[me]===Ie)return se}))==null?void 0:Le.filter(se=>se))??[]),Ae??[]});if(q=q==null?void 0:q.map(ye=>(ye=ye==null?void 0:ye.map(Ke=>{var Qe;let Ae={};for(let Ea in Ke)if(Z!=null&&Z.find(ne=>{var ua,Pe;return((Pe=(ua=ne==null?void 0:ne.words)==null?void 0:ua[0])==null?void 0:Pe.replaceAll("'",""))===Ea})){let ne=(Qe=Z==null?void 0:Z.find(ua=>{var Pe,Re;return((Re=(Pe=ua==null?void 0:ua.words)==null?void 0:Pe[0])==null?void 0:Re.replaceAll("'",""))===Ea}))==null?void 0:Qe.prop;Ae[ne]=Ke==null?void 0:Ke[Ea]}return Ae}),ye)),q=le.cartesianProduct(q),Array.isArray(q==null?void 0:q[0])&&(q=q==null?void 0:q[0]),(q==null?void 0:q.length)>0&&((w=(c=(f=Z==null?void 0:Z[0])==null?void 0:f.menus)==null?void 0:c.join("/"))==null?void 0:w[((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(Ke=>{var Ae;return(Ke==null?void 0:Ke.key)==="tableContents"&&(q==null?void 0:q.length)>0&&(Ke.contents=((Ae=Ke.contents)==null?void 0:Ae.length)>0?Ke.contents:q),Ke})}if((a==null?void 0:a.filter)==="Manual"){let U=[],Z=[],ee=(_=(N=a==null?void 0:a.contents)==null?void 0:N.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:_.contents;(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])===")"?ee=(A=(J=ee==null?void 0:ee.replace("(",Sr))==null?void 0:J.split(Sr))==null?void 0:A[0]:ee="",ee!==""&&(U=((L=(F=ee==null?void 0:ee.split("*"))==null?void 0:F[0])==null?void 0:L.split(":"))??[],Z=((x=(y=(k=(S=(E=ee==null?void 0:ee.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",Sr))==null?void 0:k.split(Sr))==null?void 0:y[0])==null?void 0:x.split(":"))??[]);let ge=(I=(O=a==null?void 0:a.contents)==null?void 0:O.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:I.contents;ge=(Y=(W=ge==null?void 0:ge.replace("(",Sr))==null?void 0:W.split(Sr))==null?void 0:Y[1],ge=ge==null?void 0:ge.slice(0,(ge==null?void 0:ge.length)-1);let Ie=(fe=a==null?void 0:a.contents)==null?void 0:fe.map(B=>{var oe,q,ye,Ke,Ae,Qe,Ea,ne,ua;return(B==null?void 0:B.key)==="header"&&((oe=B==null?void 0:B.contents)!=null&&oe.every(Pe=>(Pe==null?void 0:Pe.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((q=B==null?void 0:B.contents)==null?void 0:q[0])?B.contents=(ye=B==null?void 0:B.contents)==null?void 0:ye.map((Pe,Re)=>{var Le,se,me;return Pe!=null&&Pe.isMainPath||(Re===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=U,Pe.groups=((Le=Pe.groups)==null?void 0:Le.length)===0?Z:Pe.groups,Pe.words=((se=Pe.words)==null?void 0:se.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=ge,(!(Pe!=null&&Pe.menus)||((me=Pe==null?void 0:Pe.menus)==null?void 0:me.length)===0)&&(Pe.menus=U)):(Pe.mainKey=!1,Pe.bindMenus=U)),Pe}):Array.isArray((Ke=B==null?void 0:B.contents)==null?void 0:Ke[0])&&((Ea=(Qe=(Ae=B==null?void 0:B.contents)==null?void 0:Ae[0])==null?void 0:Qe.filter(()=>(U==null?void 0:U.length)>0))==null?void 0:Ea.length)>0&&(B.contents[0]=(ua=(ne=B==null?void 0:B.contents)==null?void 0:ne[0])==null?void 0:ua.map((Pe,Re)=>{var Le,se,me;return Pe!=null&&Pe.isMainPath||(Re===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=U,Pe.groups=((Le=Pe.groups)==null?void 0:Le.length)===0?Z:Pe.groups,Pe.words=((se=Pe.words)==null?void 0:se.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=ge,(!(Pe!=null&&Pe.menus)||Array.isArray(Pe==null?void 0:Pe.menus)&&((me=Pe==null?void 0:Pe.menus)==null?void 0:me.length)===0)&&(U==null?void 0:U.length)>0&&(Pe.menus=U)):(Pe.mainKey=!1,Pe.bindMenus=U)),Pe}))),B}),ue=(de=Ie==null?void 0:Ie.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:de.contents;if(Array.isArray(ue==null?void 0:ue[0])&&(ue=ue==null?void 0:ue[0]),ue=le.getColumnChild(ue),ue!=null&&ue.some(B=>{var oe,q;return((q=B==null?void 0:B.menus)==null?void 0:q[((oe=B==null?void 0:B.menus)==null?void 0:oe.length)-1])===""})){let B=(j=gn==null?void 0:gn.value)==null?void 0:j.find(oe=>(oe==null?void 0:oe.condition)==="child");Ie=vp(Ie,B)}return Ie}if((a==null?void 0:a.filter)==="Chart"){let U=a==null?void 0:a.contents;return U.push({key:"newType",contents:"Chart"}),U}if((a==null?void 0:a.filter)==="Carousel"){let U=a==null?void 0:a.contents;return U.push({key:"newType",contents:"Carousel"}),U}return a==null?void 0:a.contents},Bp=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},Np=a=>{var r,i,o,f,c,u,m,g,w,d,N,_;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((i=(r=l==null?void 0:l.replace(":",Sr))==null?void 0:r.split(Sr))==null?void 0:i[1])),l=(o=l==null?void 0:l.replaceAll("{",""))==null?void 0:o.replaceAll("}",""),(c=(f=l==null?void 0:l.split("="))==null?void 0:f[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 J=(u=l==null?void 0:l.split("="))==null?void 0:u[0],A=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(g=A==null?void 0:A.slice(1,A==null?void 0:A.length))!=null&&g.includes("$")&&(A=(N=(d=(w=gn==null?void 0:gn.value)==null?void 0:w.filter(F=>(F==null?void 0:F.condition)==="child"))==null?void 0:d[0])==null?void 0:N.value),l=J+"="+A}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let n=le.calculatorAndToOr(l);if((n==null?void 0:n.length)>0){let J=[];return n==null||n.forEach(F=>{let L={};for(let E in F){let S=E;S!=null&&S.includes("[")||(L[S]=F[E])}J.push(L)}),(_=a==null?void 0:a.contents)==null?void 0:_.map(F=>{var E,S,k;let L=(S=(E=a==null?void 0:a.contents)==null?void 0:E.find(y=>(y==null?void 0:y.key)==="header"))==null?void 0:S.contents;if(L=(k=le.getEqualChild(L))==null?void 0:k.filter(y=>(y==null?void 0:y.label)!=="操作"),(F==null?void 0:F.key)==="tableContents"){let x=le.tableToForm(F==null?void 0:F.contents,L);J==null||J.forEach(O=>{var I,W;for(let Y in O)!((I=x==null?void 0:x[0])!=null&&I.find(fe=>{var de;return(fe==null?void 0:fe.key)===Y||((de=fe==null?void 0:fe.key)==null?void 0:de.includes(Y))}))&&!(x!=null&&x.find(fe=>{var de;return(fe==null?void 0:fe.key)===Y||((de=fe==null?void 0:fe.key)==null?void 0:de.includes(Y))}))||(((W=O[Y])==null?void 0:W[0])!=="!"?x=x==null?void 0:x.filter(fe=>{var de,j;return((de=fe==null?void 0:fe.find(U=>{var Z;return(U==null?void 0:U.key)===Y||((Z=U==null?void 0:U.key)==null?void 0:Z.includes(Y))}))==null?void 0:de.value)===O[Y]||Array.isArray(O==null?void 0:O[Y])&&((j=O==null?void 0:O[Y])==null?void 0:j.find(U=>{var Z;return((Z=fe==null?void 0:fe.find(ee=>{var ge;return(ee==null?void 0:ee.key)===Y||((ge=ee==null?void 0:ee.key)==null?void 0:ge.includes(Y))}))==null?void 0:Z.value)===U}))}):x=x==null?void 0:x.filter(fe=>{var de;return((de=fe==null?void 0:fe.find(j=>{var U;return(j==null?void 0:j.key)===Y||((U=j==null?void 0:j.key)==null?void 0:U.includes(Y))}))==null?void 0:de.value)!==O[Y]}))}),(x==null?void 0:x.length)===0?F.contents=[]:F.contents=x==null?void 0:x.map(O=>{let I={};return O==null||O.forEach(W=>{I[W==null?void 0:W.key]=W==null?void 0:W.value}),I})}return F})}return a==null?void 0:a.contents},Ap=a=>a==null?void 0:a.contents,zp=a=>a==null?void 0:a.contents,Mp=a=>{var l,n,r,i;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let o=(r=(n=a==null?void 0:a.filter)==null?void 0:n.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:r.split(",");return(i=a==null?void 0:a.contents)==null?void 0:i.map(c=>((c==null?void 0:c.key)==="header"&&(c.contents=_t(c.contents,o)),c))}return a==null?void 0:a.contents},Ip=a=>{var n,r,i,o,f;let l=(a==null?void 0:a.filter)??"";if(l!==""){let c=(r=(n=l==null?void 0:l.replace("(",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1];c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(i=le.analyzeSplitToContent(c,","))==null?void 0:i.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 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(w=>{var d,N;if(m==="Up"){if((w==null?void 0:w.key)==="extraButton"){let _=(d=u==null?void 0:u.split(","))==null?void 0:d.map(J=>({label:J,prop:J}));w.contents=[..._??[],...w.contents]}}else if(m==="Line"&&(w==null?void 0:w.key)==="rowButton"){let _=(N=u==null?void 0:u.split(","))==null?void 0:N.map(J=>({label:J,prop:J}));w.contents=[..._??[],...w.contents]}return w});if(m==="Bottom"||m==="Down"){let w=(f=u==null?void 0:u.split(","))==null?void 0:f.map(d=>({label:d,prop:d}));g.push({key:"bottomButton",contents:w})}return g}return a==null?void 0:a.contents},Op=a=>a==null?void 0:a.contents,Lp=a=>{var n;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(n=a==null?void 0:a.contents)==null?void 0:n.map(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(f=>({label:f,prop:f}))),i}):a==null?void 0:a.contents},Rp=a=>{var n;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let r=a==null?void 0:a.contents,i=(n=l==null?void 0:l.split(","))==null?void 0:n.map(o=>({label:o,prop:o}));return r.push({key:"bottomButton",contents:i}),r}return a==null?void 0:a.contents},$p=a=>{if((a==null?void 0:a.filter)==="Read"){let l=a==null?void 0:a.contents;return l=l==null?void 0:l.map(n=>{var r;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(r=n.contents)==null?void 0:r.map(i=>(i.isNoClick=!0,i))),n}),l!=null&&l.find(n=>(n==null?void 0:n.key)==="tableContents")&&(l==null||l.push({key:"isEdit",contents:!1}),l=l==null?void 0:l.filter(n=>(n==null?void 0:n.key)!=="extraButton"&&(n==null?void 0:n.key)!=="rowButton")),l}return a==null?void 0:a.contents},Vp=a=>{var l;if(a!=null&&a.filter){const n=parseInt(a==null?void 0:a.filter);return!n||Number.isNaN(n)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(o=i.contents)==null?void 0:o.map(f=>(f.width=n,f))),i})}return a==null?void 0:a.contents},Fp=a=>{var l,n,r,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:(n=a==null?void 0:a.contents)==null?void 0:n.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(((r=a==null?void 0:a.filter)==null?void 0:r[0])==="["){let o=Oi(a==null?void 0:a.filter),f=Array.isArray(o)?o.map(u=>parseInt(u)).filter(u=>!!u&&!Number.isNaN(u)):[];return f.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,w)=>{const d=w+1;let N=0,_=0;for(let A=0;A<f.length;A++){if(_+=f[A],d<=_){N=A;break}A===f.length-1&&(N=f.length-1)}const J=f[N]||f[f.length-1]||1;return g.width=J,g})}return u}):a==null?void 0:a.contents}return a==null?void 0:a.contents},Pp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;return(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(i=>{var o,f,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=>(n!=null&&n.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u)):i.contents=(f=i.contents)==null?void 0:f.map(u=>(n!=null&&n.find(m=>m===(u==null?void 0:u.prop))&&(u.fixed="left"),u))),i})}return a==null?void 0:a.contents},jp=a=>{var l;if((a==null?void 0:a.filter)!==""){let n=a==null?void 0:a.filter;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const r=o=>(n!=null&&n.find(f=>f===(o==null?void 0:o.prop))&&(o.required=!0),o!=null&&o.children&&Array.isArray(o.children)&&(o.children=o.children.map(f=>r(f))),o);return(l=a==null?void 0:a.contents)==null?void 0:l.map(o=>{var f,c,u;return(o==null?void 0:o.key)==="header"&&(Array.isArray((f=o==null?void 0:o.contents)==null?void 0:f[0])?o.contents[0]=(u=o.contents[0])==null?void 0:u.map(m=>r(m)):o.contents=(c=o.contents)==null?void 0:c.map(m=>r(m))),o})}return a==null?void 0:a.contents},Hp=async a=>{var r,i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E;const l=M.useUnit(M.pinia),{chooseTitle:n}=M.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let S=await Wr(((i=(r=n==null?void 0:n.value)==null?void 0:r[0])==null?void 0:i.parentContent)??((f=(o=n==null?void 0:n.value)==null?void 0:o[0])==null?void 0:f.relatedContent),!1),k=(u=(c=n==null?void 0:n.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(I=>(I==null?void 0:I.key)==="header")?S=(w=S==null?void 0:S[0])==null?void 0:w.compData:S=(N=(d=S==null?void 0:S.filter(I=>{var W;return(W=I==null?void 0:I.compData)==null?void 0:W.find(Y=>(Y==null?void 0:Y.key)==="header")}))==null?void 0:d[0])==null?void 0:N.compData;let y=(_=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:_.contents;Array.isArray(y==null?void 0:y[0])&&(y=y==null?void 0:y[0]),y=((J=y==null?void 0:y.find(I=>I==null?void 0:I.isMainKey))==null?void 0:J.prop)??((A=y==null?void 0:y[0])==null?void 0:A.prop);let x=(L=(F=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.find(I=>(I==null?void 0:I[y])===k);return(E=a==null?void 0:a.contents)==null?void 0:E.map(I=>{var W;return(I==null?void 0:I.key)==="formContent"&&(I.contents=(W=I.contents)==null?void 0:W.map(Y=>(Y.value=x==null?void 0:x[Y==null?void 0:Y.prop],Y))),I})}return a==null?void 0:a.contents},Up=a=>{var l,n,r,i,o;if((l=a==null?void 0:a.extra)!=null&&l.row){let f=a==null?void 0:a.filter;if(f!=null&&f.includes("*")&&(f="({"+((r=(n=f==null?void 0:f.replace("{",Sr))==null?void 0:n.split(Sr))==null?void 0:r[1])),f=(i=f==null?void 0:f.replaceAll("{",""))==null?void 0:i.replaceAll("}",""),(f==null?void 0:f[0])!=="("&&(f="("+f+")"),f.slice(1,(f==null?void 0:f.length)-1)==="undefined")return a==null?void 0:a.contents;let c=le.calculatorAndToOr(f),u=c==null?void 0:c[0],m=(o=a==null?void 0:a.extra)==null?void 0:o.row,g=[];for(let w in u)(u==null?void 0:u[w])===(m==null?void 0:m[w])?g.push(!0):g.push(!1);return g!=null&&g.every(w=>w===!0)?a==null?void 0:a.contents:[]}else 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:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Wp=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},Gp=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},Kp=a=>{var l;if(a!=null&&a.filter){let n=a==null?void 0:a.contents,r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=(l=le.analyzeSplitToContent(r,","))==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)),n.push({key:"stepName",contents:r}),n}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:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},hc={onNumSlice:Dp,onRandomContents:Tp,onConditionContents:Np,onFatherPaceContents:Ap,onPaceContents:zp,onMainTagContents:Mp,onButtonContents:Ip,onPamButtonContents:Op,onRowButtonContents:Lp,onRelated:Hp,onRowNum:Fp,onFixRow:Pp,onReqItem:jp,onBottomButtonContents:Rp,onConditionContent:Up,onTabs:qp,onSinChoice:Wp,onTextSize:Ep,onTextRGBA:Cp,onPosition:wp,onColumnNum:_p,onSize:Sp,onShowType:Gp,onStepName:Kp,onStep:Yp,onInterfaceTypeContents:Bp,onBackGround:xp,onMaxColumn:Vp,onEditRead:$p,onShowHide:kp},Jp=async(a,l,n="")=>{var f,c,u,m,g,w,d,N,_,J,A,F;let r="";if(((f=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:f.contents)!==""&&(r=(c=a==null?void 0:a.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(m=(u=r==null?void 0:r.replace("(",Sr))==null?void 0:u.split(Sr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(g=le.analyzeSplitToContent(r,","))==null?void 0:g.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L!=null&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),o=a;for(let L in i){let E,S="";E=(N=(d=(w=i==null?void 0:i[L])==null?void 0:w.replace("=",Sr))==null?void 0:d.split(Sr))==null?void 0:N[0],S=(A=(J=(_=i==null?void 0:i[L])==null?void 0:_.replace("=",Sr))==null?void 0:J.split(Sr))==null?void 0:A[1];let k=(F=Cn==null?void 0:Cn.find(y=>(y==null?void 0:y.key)===E))==null?void 0:F.value;if(k){const y=hc[k];o=await y({contents:o,filter:S,extra:l,groupName:n})}}return o},Ro=async(a,l,n="")=>{var c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W;let r="";if(((c=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:c.contents)!==""&&(r=(u=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:u.contents),r===""||!r)return a;(r==null?void 0:r[0])===","&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(g=(m=r==null?void 0:r.replace("(",Sr))==null?void 0:m.split(Sr))==null?void 0:g[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(w=le.analyzeSplitToContent(r,","))==null?void 0:w.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!=null&&Y.includes("(")||(Y=Y==null?void 0:Y.replaceAll(":","=")),Y)),o=a,f=new Map;i==null||i.forEach(Y=>{var de,j,U;let fe=(de=Y==null?void 0:Y.split("="))==null?void 0:de[0];if(fe==="@MainParam"&&f.get(fe)){let Z=f.get(fe);Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1);let ee=(U=(j=Y==null?void 0:Y.replace("{",Sr))==null?void 0:j.split(Sr))==null?void 0:U[1];ee=Z+","+ee,f.set(fe,ee)}else fe==="@Button"&&f.get(fe)?f.set(Y,Y):f.set(fe,Y)}),i=Array.from(f.values()),i=i==null?void 0:i.sort((Y,fe)=>{var de,j;return((de=Cn==null?void 0:Cn.find(U=>fe==null?void 0:fe.includes(U==null?void 0:U.key)))==null?void 0:de.order)-((j=Cn==null?void 0:Cn.find(U=>Y==null?void 0:Y.includes(U==null?void 0:U.key)))==null?void 0:j.order)});for(let Y in i){let fe,de="";(d=i==null?void 0:i[Y])!=null&&d.includes("(")&&((N=i==null?void 0:i[Y])!=null&&N.includes("@If"))?(fe=(A=(J=(_=i==null?void 0:i[Y])==null?void 0:_.replace("(",Sr))==null?void 0:J.split(Sr))==null?void 0:A[0],de="("+((E=(L=(F=i==null?void 0:i[Y])==null?void 0:F.replace("(",Sr))==null?void 0:L.split(Sr))==null?void 0:E[1])):(fe=(y=(k=(S=i==null?void 0:i[Y])==null?void 0:S.replace("=",Sr))==null?void 0:k.split(Sr))==null?void 0:y[0],de=(I=(O=(x=i==null?void 0:i[Y])==null?void 0:x.replace("=",Sr))==null?void 0:O.split(Sr))==null?void 0:I[1]);let j=(W=Cn==null?void 0:Cn.find(U=>(U==null?void 0:U.key)===fe))==null?void 0:W.value;if(j){const U=hc[j];o=await U({contents:o,filter:de,extra:l,groupName:n})}}return o},vc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const n=l.slice(1,-1).split(",").map(r=>Number(r.trim()));return n.length<2||n.some(r=>Number.isNaN(r))?null:[n[0],n[1]]},Xp=(a,l)=>{var J,A,F,L,E;const n=Array.isArray(a)?a:[],r=n.find(S=>(S==null?void 0:S.key)==="formContent"),i=Array.isArray(r==null?void 0:r.contents)?r.contents:[],o=((J=n.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:J.contents)??{},f=(i==null?void 0:i[0])??{};let c=((A=l==null?void 0:l.position)==null?void 0:A[0])??(o==null?void 0:o._positionStartRow)??(f==null?void 0:f._positionStartRow),u=((F=l==null?void 0:l.position)==null?void 0:F[1])??(o==null?void 0:o._positionRowSpan)??(f==null?void 0:f._positionRowSpan);(!c||Number.isNaN(c)||c<1)&&(c=1),(!u||Number.isNaN(u)||u<1)&&(u=1);let m=((L=l==null?void 0:l.size)==null?void 0:L[0])??(o==null?void 0:o._sizeStart)??(f==null?void 0:f._sizeStart),g=((E=l==null?void 0:l.size)==null?void 0:E[1])??(o==null?void 0:o._sizeEnd)??(f==null?void 0:f._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 w=g-m,d=Math.max(1,Math.round(1/w));let N=n.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const k=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:k.map(y=>({...y,width:d,_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g}))}});const _={_positionStartRow:c,_positionRowSpan:u,_sizeStart:m,_sizeEnd:g};return N.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?N=N.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:_}:S):N.push({key:"_gridLayoutMeta",contents:_}),N};let Bi="$R";const Zp=M.useUnit(M.pinia),{selectTitle:Qp}=M.storeToRefs(Zp);let ef=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],af=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],lf=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],rf=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ms=async(a,l,n=!0)=>{let r=[],i=a==null?void 0:a.map(async o=>{var w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl,ha,Ha,ra,Ga,wl,De,ia,Pa,Be,La,al,bl,Tl;let f=(_=(N=(d=(w=o==null?void 0:o.contents)==null?void 0:w.find(Oe=>{var ma;return(ma=Oe==null?void 0:Oe.key)==null?void 0:ma.includes("struct")}))==null?void 0:d.value)==null?void 0:N[0])==null?void 0:_.类型,c=Object.values(o==null?void 0:o.name);c=c==null?void 0:c.reverse();let u=(J=o==null?void 0:o.contents)==null?void 0:J.map(Oe=>Oe==null?void 0:Oe.key),m={comp:f,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:(A=o==null?void 0:o.filter)==null?void 0:A.menuFilter,status:o==null?void 0:o.status,fatherSyncContents:(F=o==null?void 0:o.filter)==null?void 0:F.fatherSyncs,relatedQuotes:(L=o==null?void 0:o.filter)==null?void 0:L.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:(I=(O=(x=(y=(k=o==null?void 0:o.contents)==null?void 0:k.find(Oe=>{var ma;return(ma=Oe==null?void 0:Oe.key)==null?void 0:ma.includes("struct")}))==null?void 0:y.value)==null?void 0:x[0])==null?void 0:O.算法)==null?void 0:I.contents};for(let Oe in c)parseInt(Oe)>=1&&(m[`name${parseInt(Oe)-1}`]=c[Oe]);let g=Array.isArray((W=o==null?void 0:o.filter)==null?void 0:W.menuFilter)?(Y=o==null?void 0:o.filter)==null?void 0:Y.menuFilter:[];if(((fe=g==null?void 0:g.filter(Oe=>Oe==null?void 0:Oe.includes("@If")))==null?void 0:fe.length)>0){let Oe=g==null?void 0:g.filter(Ve=>Ve==null?void 0:Ve.includes("@If"));Oe=Oe==null?void 0:Oe[0],Oe=(j=(de=Oe==null?void 0:Oe.replace("(",Bi))==null?void 0:de.split(Bi))==null?void 0:j[1],Oe=Oe==null?void 0:Oe.slice(0,(Oe==null?void 0:Oe.length)-1),Oe!=null&&Oe.includes("*")&&(Oe=(Z=(U=Oe==null?void 0:Oe.replace("{",Bi))==null?void 0:U.split(Bi))==null?void 0:Z[1],Oe=Oe==null?void 0:Oe.replace("}","")),Oe=le.calculatorAndToOr(Oe);let ma=(l==null?void 0:l.originPath)??"";(ma==null?void 0:ma[(ma==null?void 0:ma.length)-1])==="/"&&(ma=ma==null?void 0:ma.slice(0,(ma==null?void 0:ma.length)-1));let ta=await Wr(ma,!1),xa=(ee=ta==null?void 0:ta.filter(Ve=>(Ve==null?void 0:Ve.comp)==="Table"))==null?void 0:ee[0];xa=(Ie=(ge=xa==null?void 0:xa.compData)==null?void 0:ge.find(Ve=>(Ve==null?void 0:Ve.key)==="tableContents"))==null?void 0:Ie.contents;let ga=(B=(ue=Qp.value)==null?void 0:ue.find(Ve=>(Ve==null?void 0:Ve.condition)==="child"))==null?void 0:B.value;xa=(oe=xa==null?void 0:xa.map(Ve=>{for(let ml in Ve)if((Ve==null?void 0:Ve[ml])===ga)return Ve}))==null?void 0:oe.filter(Ve=>Ve),xa=xa==null?void 0:xa[0],Oe=Oe==null?void 0:Oe[0];let fl=[];for(let Ve in Oe){let ml="";Ja.isObject(xa)&&(ml=(ye=(q=Object.keys(xa))==null?void 0:q.filter(Ne=>Ne==null?void 0:Ne.includes("."+Ve)))==null?void 0:ye[0]),ml!==""&&(xa!=null&&xa[ml])&&(Oe==null?void 0:Oe[Ve])===(xa==null?void 0:xa[ml])||xa!=null&&xa[Ve]&&(Oe==null?void 0:Oe[Ve])===(xa==null?void 0:xa[Ve])?fl.push(!0):fl.push(!1)}if(fl!=null&&fl.some(Ve=>Ve===!1)&&((Ae=l==null?void 0:l.originPath)==null?void 0:Ae[((Ke=l==null?void 0:l.originPath)==null?void 0:Ke.length)-1])!=="/")return}if(f==="Table"||f==="Method"){!n&&((Qe=m==null?void 0:m.fatherSyncContents)==null?void 0:Qe.length)>0;let Oe=((Ea=o==null?void 0:o.contents)==null?void 0:Ea.find(Da=>{var ul;return(ul=Da==null?void 0:Da.key)==null?void 0:ul.includes("content")}))||[],ma=[];m.comp="Table",Oe.value=(ne=Oe==null?void 0:Oe.value)==null?void 0:ne.sort((Da,ul)=>parseInt(Da==null?void 0:Da.id)-parseInt(ul==null?void 0:ul.id)),Oe.value=(ua=Oe==null?void 0:Oe.value)==null?void 0:ua.map(Da=>{let ul={};for(let Za in Da)JSON.stringify(Da==null?void 0:Da[Za])==="{}"?ul[Za]="":ul[Za]=Da==null?void 0:Da[Za];return ul}),ma.push({key:"tableContents",contents:Oe==null?void 0:Oe.value});let ta=(me=(se=(Le=(Re=(Pe=o==null?void 0:o.contents)==null?void 0:Pe.find(Da=>{var ul;return(ul=Da==null?void 0:Da.key)==null?void 0:ul.includes("struct")}))==null?void 0:Re.value)==null?void 0:Le[0])==null?void 0:se.结构)==null?void 0:me.contents;Array.isArray(ta==null?void 0:ta[0])?ta[0]=(qe=ta==null?void 0:ta[0])==null?void 0:qe.filter(Da=>(Da==null?void 0:Da.prop)!=="sort"&&(Da==null?void 0:Da.prop)!=="relatedId"):ta=ta==null?void 0:ta.filter(Da=>(Da==null?void 0:Da.prop)!=="sort"&&(Da==null?void 0:Da.prop)!=="relatedId"),ma.push({key:"header",contents:ta}),ma.push({key:"filter",contents:(ae=(V=(H=(_a=(ka=o==null?void 0:o.contents)==null?void 0:ka.find(Da=>{var ul;return(ul=Da==null?void 0:Da.key)==null?void 0:ul.includes("struct")}))==null?void 0:_a.value)==null?void 0:H[0])==null?void 0:V.引用)==null?void 0:ae.contents}),ma.push({key:"calculator",contents:m==null?void 0:m.calculatorFilters});let xa=ef,ga=M.cloneDeep(af);f==="Method"&&ga.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ta==null?void 0:ta[0])&&((pe=ta==null?void 0:ta[0])==null?void 0:pe.prop)==="disabled"&&(xa=lf,ga=rf);const fl=["推力","真空","压力","温度","流量"],Ve=m.name;Ve&&fl.includes(Ve)&&(xa=[...xa],xa.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let ml=[];if(!Array.isArray(ta==null?void 0:ta[0])&&(ta!=null&&ta.some(Da=>{var ul;return(Da==null?void 0:Da.calculatorFilter)&&((ul=Da==null?void 0:Da.calculatorFilter)==null?void 0:ul.includes("Manual"))}))){let Da=(ve=ta==null?void 0:ta.map(ul=>ul==null?void 0:ul.calculatorFilter))==null?void 0:ve.filter(ul=>ul&&(ul==null?void 0:ul.includes("Manual")));Da==null||Da.forEach(ul=>{var Nl;let Za=le.analyzeSplitToContent(ul,",");if(Za=Za==null?void 0:Za.map(Ba=>((Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1])===","&&(Ba=Ba==null?void 0:Ba.slice(0,(Ba==null?void 0:Ba.length)-1)),Ba)),Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Extent"))&&(Ba==null?void 0:Ba.includes("Row")))&&(Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Button"))&&(Ba==null?void 0:Ba.includes(","))))){let Ba=Za==null?void 0:Za.find(Rl=>Rl==null?void 0:Rl.includes("@FunctionButton"));Ba=(Nl=Ba==null?void 0:Ba.split("="))==null?void 0:Nl[1],Ba=Ba==null?void 0:Ba.slice(1,(Ba==null?void 0:Ba.length)-1),Ba=Ba==null?void 0:Ba.split(","),Ba=Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1],ml.push(Ba)}}),ml=[...new Set(ml)],ml=ml==null?void 0:ml.map(ul=>({label:ul,prop:ul,type:"methodButton"}))}else if(Array.isArray(ta==null?void 0:ta[0])&&((da=le.getColumnChild(ta==null?void 0:ta[0]))!=null&&da.some(Da=>{var ul;return(Da==null?void 0:Da.calculatorFilter)&&((ul=Da==null?void 0:Da.calculatorFilter)==null?void 0:ul.includes("Manual"))}))){let Da=(Ue=(ca=le.getColumnChild(ta==null?void 0:ta[0]))==null?void 0:ca.map(ul=>ul==null?void 0:ul.calculatorFilter))==null?void 0:Ue.filter(ul=>ul&&(ul==null?void 0:ul.includes("Manual")));Da==null||Da.forEach(ul=>{var Nl;let Za=le.analyzeSplitToContent(ul,",");if(Za=Za==null?void 0:Za.map(Ba=>((Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1])===","&&(Ba=Ba==null?void 0:Ba.slice(0,(Ba==null?void 0:Ba.length)-1)),Ba)),Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Extent"))&&(Ba==null?void 0:Ba.includes("Row")))&&(Za!=null&&Za.find(Ba=>(Ba==null?void 0:Ba.includes("Button"))&&(Ba==null?void 0:Ba.includes(","))))){let Ba=Za==null?void 0:Za.find(Rl=>Rl==null?void 0:Rl.includes("@FunctionButton"));Ba=(Nl=Ba==null?void 0:Ba.split("="))==null?void 0:Nl[1],Ba=Ba==null?void 0:Ba.slice(1,(Ba==null?void 0:Ba.length)-1),Ba=Ba==null?void 0:Ba.split(","),Ba=Ba==null?void 0:Ba[(Ba==null?void 0:Ba.length)-1],ml.push(Ba)}}),ml=[...new Set(ml)],ml=ml==null?void 0:ml.map(ul=>({label:ul,prop:ul,type:"methodButton"}))}if(ma.push({key:"extraButton",contents:xa}),ma.push({key:"rowButton",contents:[...ga,...ml]}),m.compData=await Ro(ma,l,m==null?void 0:m.nameContents),(Sa=m.compData)!=null&&Sa.find(Da=>(Da==null?void 0:Da.key)==="tab")&&(m.tab=(Te=(Ma=m.compData)==null?void 0:Ma.find(Da=>(Da==null?void 0:Da.key)==="tab"))==null?void 0:Te.contents),(Fa=m.compData)!=null&&Fa.find(Da=>(Da==null?void 0:Da.key)==="step")&&(m.step=(oa=(Na=m.compData)==null?void 0:Na.find(Da=>(Da==null?void 0:Da.key)==="step"))==null?void 0:oa.contents),(ja=m.compData)!=null&&ja.find(Da=>(Da==null?void 0:Da.key)==="choice")&&(m.choice=(je=(aa=m.compData)==null?void 0:aa.find(Da=>(Da==null?void 0:Da.key)==="choice"))==null?void 0:je.contents),(pa=m.compData)!=null&&pa.find(Da=>(Da==null?void 0:Da.key)==="hideContents")&&(m.isHidden=((ce=(te=m.compData)==null?void 0:te.find(Da=>(Da==null?void 0:Da.key)==="hideContents"))==null?void 0:ce.contents)??!1),(Se=m.compData)!=null&&Se.find(Da=>(Da==null?void 0:Da.key)==="newType")){let Da=(fa=(we=m.compData)==null?void 0:we.find(ul=>(ul==null?void 0:ul.key)==="newType"))==null?void 0:fa.contents;m.comp=Da,m.compData=(ea=m.compData)==null?void 0:ea.filter(ul=>(ul==null?void 0:ul.key)!=="newType")}let Ne="",Pl=(Ta=m==null?void 0:m.compData)==null?void 0:Ta.filter(Da=>(Da==null?void 0:Da.key)==="fixType");if((Pl==null?void 0:Pl.length)>0&&n&&(Ne=(Ee=Pl==null?void 0:Pl[0])==null?void 0:Ee.contents,m.comp=Ne),((Me=m==null?void 0:m.calculatorFilters)==null?void 0:Me.length)>0){let Da=[],ul=[],Za=[];(Fe=m==null?void 0:m.calculatorFilters)==null||Fe.forEach(Nl=>{var Rl,Er,tn,Fr,ir,Ur,Zr;let Ba=(tn=(Er=(Rl=Nl==null?void 0:Nl.calculatorFilter)==null?void 0:Rl.replace("(",Bi))==null?void 0:Er.split(Bi))==null?void 0:tn[1];Ba=(Fr=Ba==null?void 0:Ba.split(","))==null?void 0:Fr[0],Ba=Ba??(Nl==null?void 0:Nl.functionName),(ir=Nl==null?void 0:Nl.calculatorFilter)!=null&&ir.includes("Up")&&Da.push({label:Ba,prop:Ba,type:"methodButton"}),(Ur=Nl==null?void 0:Nl.calculatorFilter)!=null&&Ur.includes("Line")&&ul.push({label:Ba,prop:Ba,type:"methodButton"}),(Zr=Nl==null?void 0:Nl.calculatorFilter)!=null&&Zr.includes("Down")&&Za.push({label:Ba,prop:Ba,type:"methodButton"})}),m.compData=($e=m.compData)==null?void 0:$e.map(Nl=>((Nl==null?void 0:Nl.key)==="extraButton"&&(Nl.contents=[...Da??[],...Nl.contents]),(Nl==null?void 0:Nl.key)==="rowButton"&&(Nl.contents=[...ul??[],...Nl.contents]),(Nl==null?void 0:Nl.key)==="bottomButton"&&(Nl.contents=[...Za??[],...Nl.contents]),Nl)),(Za==null?void 0:Za.length)>0&&!((tl=(he=m.compData)==null?void 0:he.find(Nl=>(Nl==null?void 0:Nl.key)==="bottomButton"))!=null&&tl.contents)&&m.compData.push({key:"bottomButton",contents:Za})}}else if(f==="Form"){let Oe=[],ma=(Hl=(Ml=(El=o==null?void 0:o.contents)==null?void 0:El.find(Ve=>{var ml;return(ml=Ve==null?void 0:Ve.key)==null?void 0:ml.includes("content")}))==null?void 0:Ml.value)==null?void 0:Hl[0],ta=[],xa=Array.isArray((Bl=o==null?void 0:o.filter)==null?void 0:Bl.menuFilter)?(jl=o==null?void 0:o.filter)==null?void 0:jl.menuFilter:[];xa==null||xa.forEach(Ve=>{if(Ve!=null&&Ve.includes("@Param(Hide=Yes, prop=")||Ve!=null&&Ve.includes("(Hide=Yes, prop=")){const ml=Ve==null?void 0:Ve.match(/prop=([^,)]+)/);ml!=null&&ml[1]&&ta.push(ml==null?void 0:ml[1])}});let ga=(Jl=(Kl=(Wa=($l=(el=o==null?void 0:o.contents)==null?void 0:el.find(Ve=>{var ml;return(ml=Ve==null?void 0:Ve.key)==null?void 0:ml.includes("struct")}))==null?void 0:$l.value)==null?void 0:Wa[0])==null?void 0:Kl.结构)==null?void 0:Jl.contents,fl=(ar=ga==null?void 0:ga.map(Ve=>(Ve.value=ma==null?void 0:ma[Ve==null?void 0:Ve.prop],Ve)))==null?void 0:ar.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="sort"&&(Ve==null?void 0:Ve.prop)!=="relatedId");fl=fl==null?void 0:fl.map(Ve=>(ta!=null&&ta.includes(Ve==null?void 0:Ve.prop)&&(Ve.isHideInForm=!0),Ve)),Oe.push({key:"filter",contents:(ha=(sl=(ya=(br=(xl=o==null?void 0:o.contents)==null?void 0:xl.find(Ve=>{var ml;return(ml=Ve==null?void 0:Ve.key)==null?void 0:ml.includes("struct")}))==null?void 0:br.value)==null?void 0:ya[0])==null?void 0:sl.引用)==null?void 0:ha.contents}),Oe.push({key:"formContent",contents:fl}),Oe.push({key:"paramHideProps",contents:ta}),m.compData=await Jp(Oe,l,m==null?void 0:m.nameContents),(Ha=m.compData)!=null&&Ha.find(Ve=>(Ve==null?void 0:Ve.key)==="tab")&&(m.tab=(Ga=(ra=m.compData)==null?void 0:ra.find(Ve=>(Ve==null?void 0:Ve.key)==="tab"))==null?void 0:Ga.contents),(wl=m.compData)!=null&&wl.find(Ve=>(Ve==null?void 0:Ve.key)==="step")&&(m.step=(ia=(De=m.compData)==null?void 0:De.find(Ve=>(Ve==null?void 0:Ve.key)==="step"))==null?void 0:ia.contents),(Pa=m.compData)!=null&&Pa.find(Ve=>(Ve==null?void 0:Ve.key)==="choice")&&(m.choice=(La=(Be=m.compData)==null?void 0:Be.find(Ve=>(Ve==null?void 0:Ve.key)==="choice"))==null?void 0:La.contents),(al=m.compData)!=null&&al.find(Ve=>(Ve==null?void 0:Ve.key)==="hideContents")&&(m.isHidden=((Tl=(bl=m.compData)==null?void 0:bl.find(Ve=>(Ve==null?void 0:Ve.key)==="hideContents"))==null?void 0:Tl.contents)??!1)}return m});return r=await Promise.all(i),r=r==null?void 0:r.filter(o=>!(o!=null&&o.isHidden)),r};let nf="http://139.196.154.85:20031";function of(a){return Ja.axios.post(nf+"/api/word-report/build-by-upload",a)}const tf=M.useUnit(M.pinia),{selectTitle:sf}=M.storeToRefs(tf),cf=async a=>{var n;let l=(n=le.analyzerStringToArray(a,[":","@","="]))==null?void 0:n[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(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)),l=l==null?void 0:l.map(async r=>{var o,f,c,u,m,g,w,d,N,_,J,A,F,L,E;let i=le.analyzeSplitToContent(r,"=");if(r!=null&&r.includes("=="))return"";{let S=i==null?void 0:i[0],k=i==null?void 0:i[1],y=(o=k==null?void 0:k.split("*"))==null?void 0:o[0],x=(f=k==null?void 0:k.split("*"))==null?void 0:f[1];x=(c=le.analyzeSplitToContent(x,":"))==null?void 0:c.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 O=x==null?void 0:x.filter(W=>(W==null?void 0:W[0])!=="{"),I=x==null?void 0:x.filter(W=>(W==null?void 0:W[0])==="{");if(I=I==null?void 0:I[0],I=I==null?void 0:I.slice(1,(I==null?void 0:I.length)-1),I=(u=le.analyzeSplitToContent(x,":"))==null?void 0:u.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)),y!=null&&y.includes("{")){let W=(g=(m=sf.value)==null?void 0:m.find(fe=>(fe==null?void 0:fe.condition)==="child"))==null?void 0:g.value;y=y==null?void 0:y.slice(1,y==null?void 0:y.length),y=(d=(w=y==null?void 0:y.replace("{",""))==null?void 0:w.replace("}",""))==null?void 0:d.replace(":","/"),y=y+"/"+W;let Y=await Wr(y,!1);Y=Y==null?void 0:Y.find(fe=>(fe==null?void 0:fe.name)===(O==null?void 0:O[(O==null?void 0:O.length)-1])),Y=(_=(N=Y==null?void 0:Y.compData)==null?void 0:N.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:_.contents,console.log(232,I,Y),Y=Y==null?void 0:Y.find(fe=>(fe==null?void 0:fe.prop)===(I==null?void 0:I[(I==null?void 0:I.length)-1])),k=Y}else{y=y==null?void 0:y.slice(1,y==null?void 0:y.length),y=(A=(J=y==null?void 0:y.replace("{",""))==null?void 0:J.replace("}",""))==null?void 0:A.replace(":","/");let W=await Wr(y,!1);W=W==null?void 0:W.find(Y=>(Y==null?void 0:Y.name)===(O==null?void 0:O[(O==null?void 0:O.length)-1])),W=(L=(F=W==null?void 0:W.compData)==null?void 0:F.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:L.contents,W=(E=W==null?void 0:W.find(Y=>(Y==null?void 0:Y.prop)===(I==null?void 0:I[(I==null?void 0:I.length)-1])))==null?void 0:E.value,k=W}r=S+k}return r}),l=await Promise.all(l),l=l==null?void 0:l.join(","),l="{"+l+"}",l},uf=M.useLoginState(M.pinia),{loginUserInfo:Wn}=M.storeToRefs(uf),df=M.useUnit(M.pinia),{selectTitle:mc}=M.storeToRefs(df),pf=M.useMenuState(M.pinia),{localFiles:ff}=M.storeToRefs(pf),hf=async(a,l="Manual",n=[])=>{var f;let r=a,i=(f=r==null?void 0:r.filter(c=>{var u;return(c==null?void 0:c.functionName)&&(l==="Manual"&&((u=c==null?void 0:c.calculatorFilter)==null?void 0:u.includes(l))||l!=="Manual")}))==null?void 0:f.map(c=>({prop:c==null?void 0:c.prop,label:c==null?void 0:c.label,methods:c==null?void 0:c.calculatorFilter,functionName:c==null?void 0:c.functionName,functionRelatedWords:c==null?void 0:c.functionRelatedWords})),o=r==null?void 0:r.map(async c=>{let u=i==null?void 0:i.filter(m=>(m==null?void 0:m.prop)===(c==null?void 0:c.prop));return c=await It(c,u,r,l,r,n),c});return o=await Promise.all(o),o},St=async(a,l,n="Manual",r=[],i=[],o=[])=>{var g;let f=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(w=>{var d;return(w==null?void 0:w.calculatorFilter)&&((d=w==null?void 0:w.calculatorFilter)==null?void 0:d.includes(n))||(w==null?void 0:w.calculatorFilter)===""&&(w==null?void 0:w.functionName)}))==null?void 0:g.map(w=>({prop:w==null?void 0:w.prop,label:w==null?void 0:w.label,methods:w==null?void 0:w.calculatorFilter,functionName:w==null?void 0:w.functionName,functionRelatedWords:w==null?void 0:w.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&&(f=[f==null?void 0:f[0]]);let m=f==null?void 0:f.map(async w=>(w=await It(w,u,c,n,f,r,o),w));return m=await Promise.all(m),m},vf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=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))),n==null||n.forEach(f=>{var c;if(l!=null&&l[f]){let u=l==null?void 0:l[f];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)===f))==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[r]=o===void 0?void 0:o?1:0,l},zr=a=>{const[l,n,r]=M.cloneDeep(a).split(":").map(Number);let i=+a;return!a||!(a!=null&&a.includes(":"))?i:(l??0)*3600+(n??0)*60+(r??0)},ei=a=>{const l=o=>o.toString().padStart(2,"0"),n=Math.floor(a/3600),r=Math.floor(a%3600/60),i=a%60;return`${l(n)}:${l(r)}:${parseInt(l(i))}`},mf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J,A,F;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let L=+(l==null?void 0:l[u]);c=c+L}else c=zr(c.toString())+zr((d=l==null?void 0:l[u])==null?void 0:d.toString()),c=ei(c)}else if(o==="Row"){let L=(N=i==null?void 0:i.find(E=>(E==null?void 0:E.label)===u))==null?void 0:N.prop;if(!((J=Number.isNaN(l==null?void 0:l[L])?"":(_=l==null?void 0:l[L])==null?void 0:_.toString())!=null&&J.includes(":"))&&!((A=c==null?void 0:c.toString())!=null&&A.includes(":"))){let E=+((l==null?void 0:l[L])??0);c=c+E}else c=zr(c==null?void 0:c.toString())+zr((F=(l==null?void 0:l[L])??0)==null?void 0:F.toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w+d},0)}return l[r]=c,l},yf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let A=+(l==null?void 0:l[u]);c=c===0?c+A:c-A}else c=c===0?zr(c.toString())+zr(l==null?void 0:l[u].toString()):zr(c.toString())-zr(l==null?void 0:l[u].toString()),c=ei(c)}else if(o==="Row"){let A=(d=i==null?void 0:i.find(F=>(F==null?void 0:F.label)===u))==null?void 0:d.prop;if(!((_=Number.isNaN(l==null?void 0:l[A])?"":(N=l==null?void 0:l[A])==null?void 0:N.toString())!=null&&_.includes(":"))&&!((J=c==null?void 0:c.toString())!=null&&J.includes(":"))){let F=+((l==null?void 0:l[A])??0);c=c===0?c+F:c-F}else c=c===0?zr(c.toString())+zr(((l==null?void 0:l[A])??0).toString()):zr(c.toString())-zr(((l==null?void 0:l[A])??0).toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w-d},0)}return l[r]=c,l},gf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let A=+(l==null?void 0:l[u]);c=c===0?c+A:c*A}else c=c===0?zr(c.toString())+zr(l==null?void 0:l[u].toString()):zr(c.toString())*zr(l==null?void 0:l[u].toString()),c=ei(c)}else if(o==="Row"){let A=(d=i==null?void 0:i.find(F=>(F==null?void 0:F.label)===u))==null?void 0:d.prop;if(!(l!=null&&l[A]))c=void 0;else if(!((_=Number.isNaN(l==null?void 0:l[A])?"":(N=l==null?void 0:l[A])==null?void 0:N.toString())!=null&&_.includes(":"))&&!((J=c==null?void 0:c.toString())!=null&&J.includes(":"))){let F=+((l==null?void 0:l[A])??0);c=c===0?c+F:c*F}else c=c===0?zr(c.toString())+zr(((l==null?void 0:l[A])??0).toString()):zr(c.toString())*zr(((l==null?void 0:l[A])??0).toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w*d},0)}return l[r]=c,l},bf=a=>{let l=a==null?void 0:a.contents,n=a==null?void 0:a.valueString,r=a==null?void 0:a.prop,i=a==null?void 0:a.headers,o=a==null?void 0:a.typeString,f=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))),n==null||n.forEach(u=>{var m,g,w,d,N,_,J;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(":"))&&!((w=c==null?void 0:c.toString())!=null&&w.includes(":"))){let A=+(l==null?void 0:l[u]);c=c===0?c+A:c/A}else c=c===0?zr(c.toString())+zr(l==null?void 0:l[u].toString()):zr(c.toString())/zr(l==null?void 0:l[u].toString()),c=ei(c)}else if(o==="Row"){let A=(d=i==null?void 0:i.find(F=>(F==null?void 0:F.label)===u))==null?void 0:d.prop;if(!((_=Number.isNaN(l==null?void 0:l[A])?"":(N=l==null?void 0:l[A])==null?void 0:N.toString())!=null&&_.includes(":"))&&!((J=c==null?void 0:c.toString())!=null&&J.includes(":"))){let F=+((l==null?void 0:l[A])??0);c=c===0?c+F:c/F}else c=c===0?zr(c.toString())+zr(((l==null?void 0:l[A])??0).toString()):zr(c.toString())/zr(((l==null?void 0:l[A])??0).toString()),c=ei(c)}}),o==="Column"){let u=[];n==null||n.forEach(m=>{let g=f==null?void 0:f.map(w=>{var d;return(w==null?void 0:w[m])??(w==null?void 0:w[(d=i==null?void 0:i.find(N=>(N==null?void 0:N.label)===m))==null?void 0:d.prop])});u=[...u,...g]}),c=u.reduce((m,g)=>{let w=0;Number.isNaN(m)||(w=+m);let d=0;return Number.isNaN(g)||(d=+g),w/d},0)}return l[r]=c.toFixed(2),l},kf=async a=>{var o,f,c,u,m,g,w,d,N,_,J;let l=(o=a==null?void 0:a.valueString)==null?void 0:o[0],n=(f=a==null?void 0:a.contents)==null?void 0:f.calculatorFilter,r=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 A=(u=(c=l==null?void 0:l.split("*"))==null?void 0:c[0])==null?void 0:u.replaceAll(":","/"),F=await Wr(A,!1),L=(m=l==null?void 0:l.split("*"))==null?void 0:m[1];if(F=(g=F==null?void 0:F.filter(E=>(E==null?void 0:E.name)===L))==null?void 0:g[0],n!==""){let E=F.compData;E=E==null?void 0:E.filter(S=>(S==null?void 0:S.key)!=="filter"),E.push({key:"filter",contents:"("+n+")"}),E=await Ro(E,{}),r=(d=(w=E==null?void 0:E.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:d.length}else r=(J=(_=(N=F==null?void 0:F.compData)==null?void 0:N.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:J.length}return i.value=r,i},xf=async a=>{var w,d,N,_,J,A,F,L,E;let l=(w=a==null?void 0:a.valueString)==null?void 0:w[0],n=a==null?void 0:a.filter;n=(n==null?void 0:n.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 r=(N=(d=l==null?void 0:l.split("*"))==null?void 0:d[0])==null?void 0:N.replaceAll(":","/"),i=(_=l==null?void 0:l.split("*"))==null?void 0:_[1],o=(J=i==null?void 0:i.split("{"))==null?void 0:J[0],f=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 Wr(r,!1);if(f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1),f=f==null?void 0:f.split(":"),f=f==null?void 0:f[(f==null?void 0:f.length)-1],c=c==null?void 0:c.find(S=>(S==null?void 0:S.name)===o),c=(F=(A=c==null?void 0:c.compData)==null?void 0:A.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:F.contents,(n==null?void 0:n.length)>0){n=(E=(L=n==null?void 0:n.replace("(","$R"))==null?void 0:L.split("$R"))==null?void 0:E[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1);let S=le.calculatorAndToOr(n);S==null||S.forEach(k=>{for(let y in k)k[y]!=="!"?c=c==null?void 0:c.filter(x=>{var O;return(x==null?void 0:x[y])===(k==null?void 0:k[y])||(x==null?void 0:x[(O=Object.keys(x))==null?void 0:O.find(I=>I==null?void 0:I.includes("."+y))])===(k==null?void 0:k[y])}):c=c==null?void 0:c.filter(x=>{var O;return(x==null?void 0:x[y])!==(k==null?void 0:k[y])&&(x==null?void 0:x[(O=Object.keys(x))==null?void 0:O.find(I=>I==null?void 0:I.includes("."+y))])!==(k==null?void 0:k[y])})})}c=c==null?void 0:c.map(S=>S==null?void 0:S[f]);let u=[...new Set(c)],m=[],g={};return u==null||u.forEach(S=>{var y;let k=(y=c==null?void 0:c.filter(x=>S===x))==null?void 0:y.length;g[S]=k}),m.push(g),{xAxis:u,yAxis:m}},wf=async a=>{var r,i;let l=a==null?void 0:a.valueString;l=l==null?void 0:l[0];let n={};if((l==null?void 0:l[0])==="{"){l=l==null?void 0:l.slice(1,l.length-1),l=(r=le.analyzeSplitToContent(l,","))==null?void 0:r.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 w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe;let u=(d=(w=c==null?void 0:c.replace("=","$R"))==null?void 0:w.split("$R"))==null?void 0:d[0],m=(_=(N=c==null?void 0:c.replace("=","$R"))==null?void 0:N.split("$R"))==null?void 0:_[1],g="";if(m==="LoginUser")g=((J=Wn.value)==null?void 0:J.姓名)||((A=Wn.value)==null?void 0:A.account)||((F=Wn.value)==null?void 0:F.账号);else if((m==null?void 0:m[0])==="$"){let de=(L=m==null?void 0:m.split("*"))==null?void 0:L[0],j=(E=m==null?void 0:m.split("*"))==null?void 0:E[1],U=j;if((de==null?void 0:de[0])==="$"&&(de=de==null?void 0:de.slice(1,de==null?void 0:de.length)),de!=null&&de.includes("$")){let ee=(S=de==null?void 0:de.split("$"))==null?void 0:S[0],ge=(k=de==null?void 0:de.split("$"))==null?void 0:k[1],Ie=(y=ee==null?void 0:ee.split(":"))==null?void 0:y[0],ue=(I=(O=(x=mc.value)==null?void 0:x.filter(B=>(B==null?void 0:B.condition)==="child"))==null?void 0:O[0])==null?void 0:I.value;ge=ge==null?void 0:ge.replaceAll(":","/"),de=Ie+"/"+ge+"/"+ue}else de=de==null?void 0:de.replaceAll(":","/");j=j==null?void 0:j.split(":"),j=j==null?void 0:j.find((ee,ge)=>ge===(j==null?void 0:j.length)-2),U=U==null?void 0:U.split(":"),U=U==null?void 0:U.find((ee,ge)=>ge===(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));let Z=await Wr(de,!1);Z=Z==null?void 0:Z.find(ee=>(ee==null?void 0:ee.name)===j),Z=(Y=(W=Z==null?void 0:Z.compData)==null?void 0:W.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:Y.contents,g=(fe=Z==null?void 0:Z[0])==null?void 0:fe[U]}else g=m;n[u]=g});await Promise.all(o);let f=(i=a==null?void 0:a.valueString)==null?void 0:i[1];n.menuPathContent=f}return n},_f=async a=>{var A,F,L,E,S,k,y;let l=a==null?void 0:a.valueString,n=l==null?void 0:l.filter(x=>(x==null?void 0:x.includes(".docx"))||(x==null?void 0:x.includes(".doc")));n=n==null?void 0:n[0];let r=l==null?void 0:l.filter(x=>!(x!=null&&x.includes(".docx"))&&!(x!=null&&x.includes(".doc")));r=r==null?void 0:r[0];let i=(F=a==null?void 0:a.compNames)==null?void 0:F[((A=a==null?void 0:a.compNames)==null?void 0:A.length)-1],o=((S=(E=(L=mc.value)==null?void 0:L.filter(x=>(x==null?void 0:x.condition)==="child"))==null?void 0:E[0])==null?void 0:S.value)??"",f=ff.value;o!==""&&(f=(k=f==null?void 0:f.find(x=>(x==null?void 0:x.path)===o))==null?void 0:k.children),f=(y=f==null?void 0:f.find(x=>(x==null?void 0:x.name)===i))==null?void 0:y.children;let c=f==null?void 0:f.find(x=>(x==null?void 0:x.name)===n),u=f==null?void 0:f.find(x=>(x==null?void 0:x.name)===r);u=u==null?void 0:u.url,u=u==null?void 0:u.replace(/^file:\/\//,"file:///").replace(/\\/g,"/"),c=c==null?void 0:c.url,c=c==null?void 0:c.replace(/^file:\/\//,"file:///").replace(/\\/g,"/");const g=await(await fetch(c)).blob();let w=c.split(/[\\/]/).pop();const d=new File([g],w,{type:g.type||"application/octet-stream"}),N=new FormData;N.append("TemplateFile",d);let _=await fetch(u);_=await _.text(),_=await cf(_),N.append("RawContent",_);let J=await of(N);console.log(2321,J)},vo={Sum:mf,Substract:yf,Multiple:gf,Divide:bf,Compare:vf,VecDimCount:kf,Approval:wf,VecRepCount:xf,AutoReportGen:_f},It=async(a,l,n,r="Auto",i,o=[],f=[])=>{var w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U;let c=a,u=[],m=await M.getPageDataApi({platId:parseInt((w=Wn==null?void 0:Wn.value)==null?void 0:w.plat_id),pageName:"menu"});m=(_=(N=(d=m==null?void 0:m.data)==null?void 0:d.result)==null?void 0:N.filter(Z=>(Z==null?void 0:Z.property_name)===""))==null?void 0:_[0];let g=[];if(m!=null&&m.object_name){m=m==null?void 0:m.object_name;let Z=await M.getPageDataApi({platId:parseInt((J=Wn==null?void 0:Wn.value)==null?void 0:J.plat_id),pageName:m});Z=(S=(E=(L=(F=(A=Z==null?void 0:Z.data)==null?void 0:A.result)==null?void 0:F[0])==null?void 0:L.contents)==null?void 0:E.find(ee=>{var ge;return(ge=ee==null?void 0:ee.key)==null?void 0:ge.includes("content")}))==null?void 0:S.value,u=(k=Z==null?void 0:Z.map(ee=>({functionName:ee==null?void 0:ee.函数名称,functionContent:ee==null?void 0:ee.输出值})))==null?void 0:k.filter(ee=>(ee==null?void 0:ee.functionContent)!==""),u==null||u.forEach(ee=>{g.push(ee.functionName),vo[ee.functionName]=new Function("return "+ee.functionContent)()})}if((l==null?void 0:l.length)===0)return c;for(let Z in l){let ee=(y=l==null?void 0:l[Z])==null?void 0:y.functionName;const ge=vo==null?void 0:vo[ee];let Ie=(x=l==null?void 0:l[Z])==null?void 0:x.methods;if(Ie=le.analyzeSplitToContent(Ie,","),(O=Ie==null?void 0:Ie.find(ue=>ue==null?void 0:ue.includes("@Type")))!=null&&O.includes(r)||!(Ie!=null&&Ie.find(ue=>ue==null?void 0:ue.includes("@Type")))&&r==="Manual"||r==="Auto"||(Ie==null?void 0:Ie.length)===0){let ue=((Y=(W=(I=Ie==null?void 0:Ie.find(B=>B==null?void 0:B.includes("@Extent")))==null?void 0:I.replace(":","="))==null?void 0:W.split("="))==null?void 0:Y[1])??[];if(await new Function("return ")(),(g==null?void 0:g.length)>0&&g.find(B=>B===ee)){let B="";try{let q=(fe=l==null?void 0:l[Z])==null?void 0:fe.functionRelatedWords,ye=(o==null?void 0:o.length)>0?o==null?void 0:o.map(Ae=>{var Qe;return Ae==null?void 0:Ae[(Qe=l==null?void 0:l[Z])==null?void 0:Qe.prop]}):["0"];ye=ye==null?void 0:ye.map(Ae=>Ae==null?void 0:Ae.slice((Ae==null?void 0:Ae.length)-5,Ae==null?void 0:Ae.length)),ye=ye==null?void 0:ye.map(Ae=>le.isNumber(parseInt(Ae))&&parseInt(Ae)?parseInt(Ae):0);let Ke=Math.max(...ye);q=q==null?void 0:q.map(Ae=>{if(Ae!=null&&Ae.includes("'"))return Ae==null?void 0:Ae.replaceAll("'","");if(Ae!=null&&Ae.includes("@"))return Ke+1;{let Qe=Object.keys(c);return Ae=(c==null?void 0:c[Ae])??(c==null?void 0:c[Qe==null?void 0:Qe.find(Ea=>Ea==null?void 0:Ea.includes("."+Ae))]),Ae}}),B=ge(...q)}catch(q){Ja.ElMessage.warning("关联数据出现错误,"+q.message)}let oe=(de=l==null?void 0:l[Z])==null?void 0:de.prop;c[oe]=B}else c=await ge({contents:c,valueString:(j=l==null?void 0:l[Z])==null?void 0:j.functionRelatedWords,prop:(U=l==null?void 0:l[Z])==null?void 0:U.prop,filter:Ie,headers:n,typeString:ue,allContents:i,compNames:f})}}return c},Sf=M.useLoginState(M.pinia),{loginUserInfo:bn}=M.storeToRefs(Sf),Ef=M.useMenuState(M.pinia),{activeMenuPath:ys,currentMenuPath:mo}=M.storeToRefs(Ef),yc=M.useUnit(M.pinia);let gs="$R";const{selectTitle:Mi}=M.storeToRefs(yc),gc=async(a,l)=>{var f,c,u,m,g,w,d,N,_,J,A,F,L;let n=ys.value,r="",i=((f=Mi==null?void 0:Mi.value)==null?void 0:f.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(n=l?n:(c=a==null?void 0:a[0])==null?void 0:c.object_name,r=(u=a==null?void 0:a[0])==null?void 0:u.father_name);let o=[];if(r!==""){let E=r;(E==null?void 0:E[(E==null?void 0:E.length)-1])==="/"&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1));let S=await Wr(E,!1);S=(m=S==null?void 0:S[0])==null?void 0:m.compData;let k=(g=S==null?void 0:S.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:g.contents;k=((w=k==null?void 0:k.find(x=>x==null?void 0:x.isMainKey))==null?void 0:w.prop)??((d=k==null?void 0:k[0])==null?void 0:d.prop);let y=(_=(N=S==null?void 0:S.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:N.contents)==null?void 0:_.map(x=>({label:x==null?void 0:x[k],value:x==null?void 0:x[k]}));o=(J=r==null?void 0:r.split("/"))==null?void 0:J.map(x=>(x===""?i?(i.isShow=!0,x=i):x={value:x,condition:"child",options:y,parentContent:(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"?r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1):r,isShow:!0}:x={condition:"parent",value:x.trim(),isShow:!0},x))}if(n!==""){let E=(A=n==null?void 0:n.split("/"))==null?void 0:A.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((F=E==null?void 0:E[0])==null?void 0:F.value)===((L=o==null?void 0:o[0])==null?void 0:L.value)&&(E=E==null?void 0:E.filter((S,k)=>k!==0)),o=[...o??[],...E??[]]}r===""&&i&&((i==null?void 0:i.parentContent)!==ys.value&&(i.isShow=!1),(i==null?void 0:i.value)!==""&&o.push(i)),yc.setSelectTitle(o)},Cf=async a=>{var o,f,c,u,m,g,w,d,N;let l=await M.getPageDataApi({platId:parseInt((o=bn==null?void 0:bn.value)==null?void 0:o.plat_id),pageName:"menu"}),n=(f=l==null?void 0:l.data)==null?void 0:f.result,r=(g=(m=(u=(c=a==null?void 0:a.filter(_=>(_==null?void 0:_.comp)==="Table"))==null?void 0:c[0])==null?void 0:u.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="filter"))==null?void 0:g.contents;r=(N=(d=(w=r==null?void 0:r.replace("(",gs))==null?void 0:w.split(gs))==null?void 0:d[0])==null?void 0:N.replaceAll(":","/");let i=n==null?void 0:n.filter(_=>{var J;return(_==null?void 0:_.object_name)===mo.value+"/"||((J=mo.value)==null?void 0:J.includes(r))&&r+"/"===(_==null?void 0:_.object_name)||r===(_==null?void 0:_.object_name)});return(i==null?void 0:i.length)>0&&(a=a==null?void 0:a.map(_=>{var J;return(_==null?void 0:_.comp)==="Table"&&(_.compData=(J=_==null?void 0:_.compData)==null?void 0:J.map(A=>{var F,L,E;return(A==null?void 0:A.key)==="header"&&(Array.isArray((F=A.contents)==null?void 0:F[0])?A.contents[0]=(E=A.contents[0])==null?void 0:E.map((S,k)=>{var y;return k===0&&(S.isExistChild=!0,((y=mo.value)!=null&&y.includes(r)||r)&&(S.fatherPath=r)),S}):A.contents=(L=A.contents)==null?void 0:L.map((S,k)=>{var y;return k===0&&(S.isExistChild=!0,((y=mo.value)!=null&&y.includes(r)||r)&&(S.fatherPath=r)),S})),A})),_})),a},Wr=async(a,l,n={})=>{var f,c,u,m,g,w,d,N,_,J,A,F;let r=await M.getPageDataApi({platId:parseInt((f=bn==null?void 0:bn.value)==null?void 0:f.plat_id),pageName:a}),i=(c=r==null?void 0:r.data)==null?void 0:c.result;if((i==null?void 0:i.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==a){let L=await M.getPageDataApi({platId:parseInt((u=bn==null?void 0:bn.value)==null?void 0:u.plat_id),pageName:n==null?void 0:n.originPath});if(((g=(m=L==null?void 0:L.data)==null?void 0:m.result)==null?void 0:g.length)>0){let E=await ms((w=L==null?void 0:L.data)==null?void 0:w.result,n,!1);E=E==null?void 0:E.map(async y=>{var I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a;let x=[],O=(I=Object.keys(y))==null?void 0:I.filter(H=>(H==null?void 0:H.includes("name"))&&H!=="nameContents");for(let H in y)O!=null&&O.find(V=>V===H)&&x.push(y==null?void 0:y[H]);if(x=x.reverse(),(y==null?void 0:y.comp)==="Table"){let H=(fe=(Y=(W=y==null?void 0:y.compData)==null?void 0:W.find(ae=>(ae==null?void 0:ae.key)==="tableContents"))==null?void 0:Y.contents)==null?void 0:fe.map(ae=>{let pe={};for(let ve in ae)ve!=="id"&&ve!=="create_time"&&ve!=="update_time"&&ve!=="sort"&&ve!=="create_user_id"&&ve!=="update_user_id"&&ve!=="department_id"&&ve!=="relatedId"&&(pe[ve]=ae==null?void 0:ae[ve]);return ae=Object.values(pe),ae}),V=(j=(de=y==null?void 0:y.compData)==null?void 0:de.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:j.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"}),(U=V[0])!=null&&U.find(ae=>(ae==null?void 0:ae.prop)==="disabled")&&(V[0]=(Z=V[0])==null?void 0:Z.filter(ae=>(ae==null?void 0:ae.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(ae=>(ae==null?void 0:ae.prop)==="disabled")&&(V=V==null?void 0:V.filter(ae=>(ae==null?void 0:ae.prop)!=="disabled"),V.unshift({label:"",prop:"disabled",sortable:!1}))),V!=null&&V.some(ae=>{var pe;return(ae==null?void 0:ae.calculatorFilter)&&((pe=ae==null?void 0:ae.calculatorFilter)==null?void 0:pe.includes("Auto"))})&&(H=await St(H,V,"Auto"),H=H==null?void 0:H.map(ae=>Object.values(ae))),y!=null&&y.fatherSyncContents){Array.isArray((ee=y==null?void 0:y.fatherSyncContents)==null?void 0:ee[0])&&(y.fatherSyncContents=(ge=y==null?void 0:y.fatherSyncContents)==null?void 0:ge[0]);let ae=(Ie=Mi.value)==null?void 0:Ie.find(pe=>(pe==null?void 0:pe.condition)==="child");y.fatherSyncContents=(ue=y==null?void 0:y.fatherSyncContents)==null?void 0:ue.map(pe=>{var ve,da,ca,Ue,Sa,Ma;return((da=pe==null?void 0:pe.menus)==null?void 0:da[((ve=pe==null?void 0:pe.menus)==null?void 0:ve.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"!==(pe==null?void 0:pe.menus)?pe.menus=(pe==null?void 0:pe.menus)+(ae==null?void 0:ae.value):((Ue=pe==null?void 0:pe.menus)==null?void 0:Ue[((ca=pe==null?void 0:pe.menus)==null?void 0:ca.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"===(pe==null?void 0:pe.menus)&&(pe.menus=(Ma=pe.menus)==null?void 0:Ma.slice(0,((Sa=pe.menus)==null?void 0:Sa.length)-1)),pe})}if(y!=null&&y.sonSyncContents){Array.isArray((B=y==null?void 0:y.sonSyncContents)==null?void 0:B[0])&&(y.sonSyncContents=(oe=y==null?void 0:y.sonSyncContents)==null?void 0:oe[0]);let ae=(q=Mi.value)==null?void 0:q.find(pe=>(pe==null?void 0:pe.condition)==="child");y.sonSyncContents=(ye=y==null?void 0:y.sonSyncContents)==null?void 0:ye.map(pe=>{var ve,da,ca,Ue,Sa,Ma;return((da=pe==null?void 0:pe.menus)==null?void 0:da[((ve=pe==null?void 0:pe.menus)==null?void 0:ve.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"!==(pe==null?void 0:pe.menus)?pe.menus=(pe==null?void 0:pe.menus)+(ae==null?void 0:ae.value):((Ue=pe==null?void 0:pe.menus)==null?void 0:Ue[((ca=pe==null?void 0:pe.menus)==null?void 0:ca.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"===(pe==null?void 0:pe.menus)&&(pe.menus=(Ma=pe.menus)==null?void 0:Ma.slice(0,((Sa=pe.menus)==null?void 0:Sa.length)-1)),pe})}if(y!=null&&y.relatedQuotes){Array.isArray((Ke=y==null?void 0:y.relatedQuotes)==null?void 0:Ke[0])&&(y.relatedQuotes=(Ae=y==null?void 0:y.relatedQuotes)==null?void 0:Ae[0]);let ae=(Qe=Mi.value)==null?void 0:Qe.find(pe=>(pe==null?void 0:pe.condition)==="child");y.relatedQuotes=(Ea=y==null?void 0:y.relatedQuotes)==null?void 0:Ea.map(pe=>{var ve,da,ca,Ue,Sa,Ma;return((da=pe==null?void 0:pe.menus)==null?void 0:da[((ve=pe==null?void 0:pe.menus)==null?void 0:ve.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"!==(pe==null?void 0:pe.menus)?pe.menus=(pe==null?void 0:pe.menus)+(ae==null?void 0:ae.value):((Ue=pe==null?void 0:pe.menus)==null?void 0:Ue[((ca=pe==null?void 0:pe.menus)==null?void 0:ca.length)-1])==="/"&&(ae==null?void 0:ae.parentContent)+"/"===(pe==null?void 0:pe.menus)&&(pe.menus=(Ma=pe.menus)==null?void 0:Ma.slice(0,((Sa=pe.menus)==null?void 0:Sa.length)-1)),pe})}y={filter:(ua=(ne=y==null?void 0:y.compData)==null?void 0:ne.find(ae=>(ae==null?void 0:ae.key)==="filter"))==null?void 0:ua.contents,key:y==null?void 0:y.comp,name:x,tableColumns:V,tableContents:H,menuFilter:y==null?void 0:y.menuFilter,fatherSyncContents:y==null?void 0:y.fatherSyncContents,relatedQuotes:y==null?void 0:y.relatedQuotes,sonSyncContents:y==null?void 0:y.sonSyncContents,calculatorFilters:y==null?void 0:y.calculatorFilters}}else{let H=(Le=(Re=(Pe=y==null?void 0:y.compData)==null?void 0:Pe.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:Re.contents)==null?void 0:Le.map(ae=>(ae==null?void 0:ae.value)??"");H=[H];let V=(qe=(me=(se=y==null?void 0:y.compData)==null?void 0:se.find(ae=>(ae==null?void 0:ae.key)==="formContent"))==null?void 0:me.contents)==null?void 0:qe.map(ae=>(ae.value="",ae));y={contents:H,filter:(_a=(ka=y==null?void 0:y.compData)==null?void 0:ka.find(ae=>(ae==null?void 0:ae.key)==="filter"))==null?void 0:_a.contents,key:y==null?void 0:y.comp,name:x,value:V,fatherSyncContents:y==null?void 0:y.fatherSyncContents,relatedQuotes:y==null?void 0:y.relatedQuotes,sonSyncContents:y==null?void 0:y.sonSyncContents,calculatorFilters:y==null?void 0:y.calculatorFilters}}return y.isShow=!1,y}),E=await Promise.all(E);let S=[{key:"menuPath",contents:[{path:a,fatherPath:(_=(N=(d=L==null?void 0:L.data)==null?void 0:d.result)==null?void 0:N[0])==null?void 0:_.father_name,isShow:!1}]},{key:a,contents:E}];await M.createPlatFormDataApi({platId:parseInt((J=bn==null?void 0:bn.value)==null?void 0:J.plat_id),changeData:S});let k=await M.getPageDataApi({platId:parseInt((A=bn==null?void 0:bn.value)==null?void 0:A.plat_id),pageName:a});i=(F=k==null?void 0:k.data)==null?void 0:F.result}}l&&await gc(i,!!(n!=null&&n.originPath));let o=await ms(i,n);return l&&(o=await Cf(o)),o==null?void 0:o.filter(L=>L)},bs=async a=>{var r,i,o,f,c,u,m,g,w,d,N;let l=(r=a==null?void 0:a.menus)==null?void 0:r.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((o=(i=a.value)==null?void 0:i.split(" "))==null?void 0:o[0]));let n=await Wr(l,!1);if(n=(f=n==null?void 0:n.filter(_=>{var J,A;return(_==null?void 0:_.name)===((A=a==null?void 0:a.groups)==null?void 0:A[((J=a==null?void 0:a.groups)==null?void 0:J.length)-1])}))==null?void 0:f[0],(u=(c=n==null?void 0:n.compData)==null?void 0:c.find(_=>(_==null?void 0:_.key)==="tableContents"))!=null&&u.contents){n=(g=(m=n==null?void 0:n.compData)==null?void 0:m.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:g.contents;let _=((w=a==null?void 0:a.words)==null?void 0:w[0])??(a==null?void 0:a.prop);return n=n==null?void 0:n.filter(J=>{var A,F,L,E;return(J==null?void 0:J[a!=null&&a.endChildMenu?_:(A=a==null?void 0:a.words)==null?void 0:A[0]])===(a!=null&&a.relatedWords&&((F=a==null?void 0:a.relatedWords)==null?void 0:F.length)>0?(E=(L=a.value)==null?void 0:L.split(" "))==null?void 0:E[0]:a.value)}),n==null?void 0:n[0]}else{let _=(N=(d=n==null?void 0:n.compData)==null?void 0:d.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:N.contents,J={};return _==null||_.forEach(A=>{J[A.prop]=A.value}),J}},Df={key:0,class:"extra-button-content"},Tf={class:"table-operator-wrap"},Bf={key:0,class:"extra-button-filter"},Nf={key:1,class:"extra-header"},Af=["onClick"],zf={class:"table-op-text"},Mf={class:"table-op-text"},If={class:"drop-menu",style:{width:"120px"}},Of=["onClick"],Lf={key:0},Rf={key:1},$f=["onClick"],Vf={class:"table-op-text"},Ff={key:1,class:"extra-button-content tabs-button-wrapper"},Pf={class:"table-operator-wrap"},jf={class:"extra-button-filter"},Hf={key:0,class:"extra-header"},Uf={class:"table-op-action"},qf={class:"table-op-text"},Wf={class:"drop-menu",style:{width:"120px"}},Gf={key:0},Kf={key:1},Yf=["onClick"],Jf={class:"table-op-text"},Xf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const n=l,r=a,i=()=>{const O=(r==null?void 0:r.menuFilter)||[];return Array.isArray(O)&&(O==null?void 0:O.some(I=>{const W=typeof I=="string"?I:JSON.stringify(I);return W==null?void 0:W.includes("HideGroup=Yes")}))},o=e.ref(""),f=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 w(O,I){return O.map(W=>{const Y={...W};return I.forEach(fe=>{delete Y[fe]}),Y})}function d(O){if(!O||O.t!=="n")return(O==null?void 0:O.v)??"";const I=O.v;if(O.z){const W=String(O.z).toLowerCase(),Y=["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 j of Y)if(W.includes(j))return N(I);const fe=/[ymdhms]/.test(W),de=/^[0#\.\,\s]+$/.test(W.replace(/[\\\/\-:]/g,""));if(fe&&!de)return N(I)}if(I>=1&&I<=73050){if(I<5e3)return I;if(I>=5e3&&I<4e4){const W=Math.floor((I-25569)/365.25)+1970;return W>=1970&&W<=2e3&&O.z&&/[ymd]/.test(String(O.z).toLowerCase())?N(I):I}if(I>=4e4)return N(I)}return I}function N(O){if(typeof O!="number")return O;try{const I=new Date((O-25569)*86400*1e3);if(isNaN(I.getTime()))return O;const W=I.getFullYear(),Y=String(I.getMonth()+1).padStart(2,"0"),fe=String(I.getDate()).padStart(2,"0");return`${W}-${Y}-${fe}`}catch{return O}}const _=O=>{const I=O.raw;if(!I)return;const W=new FileReader;W.onload=Y=>{try{const fe=new Uint8Array(Y.target.result),de=le.readSync(fe,{type:"array"}),j=de.SheetNames[0],U=de.Sheets[j],ee=le.utils.decode_range(U["!ref"]).e.c+1,ge=new Array(ee).fill(""),Ie=[];for(const ye in U){if(ye[0]==="!")continue;const{r:Ke,c:Ae}=le.utils.decode_cell(ye),Qe=U[ye];let Ea=d(Qe);if((Ea==null||Ea==="")&&(Ea=""),Ke===0)ge[Ae]=Ea;else{if(!Ie[Ke-1]){Ie[Ke-1]={};for(let ne=0;ne<ee;ne++)Ie[Ke-1][`col_${ne}`]=""}Ie[Ke-1][`col_${Ae}`]=Ea}}for(let ye=0;ye<ee;ye++)ge[ye]===void 0&&(ge[ye]="");const ue=[];for(let ye=0;ye<ge.length;ye++)(!ge[ye]||ge[ye].toString().trim()==="")&&ue.push(ye);let B,oe;(ue==null?void 0:ue.length)>0?(Ja.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),B=ge.filter((ye,Ke)=>!ue.includes(Ke)),oe=w(Ie,ue==null?void 0:ue.map(ye=>`col_${ye}`))):(B=ge,oe=Ie);const q=Ie==null?void 0:Ie[0];if(!(q!=null&&q.hasOwnProperty("col_0")))return Ja.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",B,oe)}catch(fe){throw Ja.ElMessage.error(fe.message),new Error(fe.message)}},W.readAsArrayBuffer(I)},J=O=>{var W;const I=(W=u.value)==null?void 0:W.reduce((Y,fe,de)=>(de===0?Y[fe.label]=O:Y[fe.label]=fe==null?void 0:fe.value,Y),{});n("filter",I,O,!0)},A=(O,I={})=>{n("buttonClick",O,"",I)},F=O=>{var I,W;u.value=(W=(I=le.getColumnChild(M.cloneDeep(O)))==null?void 0:I.filter(Y=>(Y==null?void 0:Y.label)!==""&&(Y==null?void 0:Y.label)!=="操作"))==null?void 0:W.map(Y=>({label:(Y==null?void 0:Y.label)??"",value:"",name:(Y==null?void 0:Y.prop)??"",isFormColHidden:Y==null?void 0:Y.isTableColHidden,width:3,prop:(Y==null?void 0:Y.prop)??""}))},L=e.ref(!1),E=O=>{var I;if((O==null?void 0:O.buttonName)==="确认"&&(n("filter",O==null?void 0:O.content),L.value=(O==null?void 0:O.content)&&Object.values(O==null?void 0:O.content).length>0),(O==null?void 0:O.buttonName)==="清空"){const W=M.cloneDeep(O==null?void 0:O.content);for(const Y in W)W[Y]="";u.value=(I=u.value)==null?void 0:I.map(Y=>({...Y,value:""})),n("filter",W),L.value=!1}f.value=!1},S=()=>{f.value=!f.value,c.value=!0},k=()=>{var I,W;u.value=(I=u.value)==null?void 0:I.map(Y=>({...Y,value:""}));const O=(W=u.value)==null?void 0:W.reduce((Y,fe)=>(Y[fe.label]=fe.value,Y),{});n("filter",O)},y=e.ref(null);let x;return x=O=>{var fe;if(!f.value)return;const I=(fe=y==null?void 0:y.value)==null?void 0:fe.$el,W=I==null?void 0:I.contains(O.target);let Y=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(de=>{de.contains(O.target)&&(Y=!0)}),!W&&!Y&&(f.value=!1)},e.onMounted(()=>{document.addEventListener("click",x),F(r.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",x)}),e.watch(()=>r.columns,()=>{F(r.columns)},{deep:!0,immediate:!0}),(O,I)=>{var U,Z,ee,ge,Ie,ue,B,oe;const W=e.resolveComponent("el-icon"),Y=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-input"),de=e.resolveComponent("el-upload"),j=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Df,[i()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(r==null?void 0:r.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((r==null?void 0:r.level)-1)*12+"px",fontWeight:600-((r==null?void 0:r.level)-1)*100>=400?600-((r==null?void 0:r.level)-1)*100:400,fontSize:17-(r==null?void 0:r.level)>=14?17-(r==null?void 0:r.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Tf,[r!=null&&r.filterShow?(e.openBlock(),e.createElementBlock("div",Bf,[e.createVNode(ed,{trigger:"contextmenu",ref_key:"popOverRef",ref:y,title:"",width:800,placement:"bottom-start",isVisible:f.value,"onUpdate:isVisible":I[4]||(I[4]=q=>f.value=q)},{reference:e.withCtx(()=>{var q,ye,Ke,Ae;return[e.createVNode(fe,{modelValue:o.value,"onUpdate:modelValue":I[0]||(I[0]=Qe=>o.value=Qe),style:{"min-width":"80px"},placeholder:L.value?(Ke=(ye=(q=a.filterValues)==null?void 0:q.filter(Qe=>Qe))==null?void 0:ye.slice(0,3))==null?void 0:Ke.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:J,disabled:((Ae=u.value)==null?void 0:Ae.length)===0},{suffix:e.withCtx(()=>{var Qe,Ea;return[!o.value&&((Ea=(Qe=a.filterValues)==null?void 0:Qe.filter(ne=>ne))!=null&&Ea.join("/"))?(e.openBlock(),e.createBlock(W,{key:0,style:{cursor:"pointer"},onClick:k},{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(Y,{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:I[1]||(I[1]=e.withModifiers(()=>{},["stop"])),onKeyup:I[2]||(I[2]=e.withModifiers(()=>{},["stop"])),onKeypress:I[3]||(I[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(pl.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&&((U=a.buttons)==null?void 0:U.length)>0?(e.openBlock(),e.createElementBlock("div",Nf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Z=a.buttons)==null?void 0:Z.filter(q=>a.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ye)=>{var Ke;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ye},[(q==null?void 0:q.type)==="upload"?(e.openBlock(),e.createBlock(de,{key:0,class:"upload-button-wrap","on-change":_,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var Ae;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Qe=>A(q==null?void 0:q.label)},[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),e.createElementVNode("span",zf,e.toDisplayString(q==null?void 0:q.label),1)],10,Af)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(e.openBlock(),e.createBlock(pl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Ae;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),e.createElementVNode("span",Mf,e.toDisplayString(q==null?void 0:q.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",If,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q==null?void 0:q.contents,Ae=>{var Qe,Ea;return e.openBlock(),e.createElementBlock("div",{key:Ae==null?void 0:Ae.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ne=>!a.lockingPage&&A(Ae==null?void 0:Ae.label)},[e.createTextVNode(e.toDisplayString(Ae==null?void 0:Ae.label),1),(Qe=Ae==null?void 0:Ae.label)!=null&&Qe.includes("选中")?(e.openBlock(),e.createElementBlock("span",Lf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ea=Ae==null?void 0:Ae.label)!=null&&Ea.includes("全部")?(e.openBlock(),e.createElementBlock("span",Rf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Of)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ae=>!a.lockingPage&&A(q==null?void 0:q.label,q)},[e.createVNode(Y,{class:"table-op-icon",name:((Ke=g==null?void 0:g.find(Ae=>(Ae==null?void 0:Ae.label)===(q==null?void 0:q.label)))==null?void 0:Ke.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",Vf,e.toDisplayString(q==null?void 0:q.label),1)],10,$f)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",Ff,[e.createElementVNode("div",Pf,[e.createElementVNode("div",jf,[e.createVNode(fe,{modelValue:o.value,"onUpdate:modelValue":I[5]||(I[5]=q=>o.value=q),style:{"min-width":"80px"},placeholder:L.value?(Ie=(ge=(ee=a.filterValues)==null?void 0:ee.filter(q=>q))==null?void 0:ge.slice(0,3))==null?void 0:Ie.join("/"):"搜索","prefix-icon":e.unref(Ja.search_default),clearable:"",onInput:J,disabled:((ue=u.value)==null?void 0:ue.length)===0},{suffix:e.withCtx(()=>{var q,ye;return[!o.value&&((ye=(q=a.filterValues)==null?void 0:q.filter(Ke=>Ke))!=null&&ye.join("/"))?(e.openBlock(),e.createBlock(W,{key:0,style:{cursor:"pointer"},onClick:k},{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(Y,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((B=a.buttons)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",Hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=a.buttons)==null?void 0:oe.filter(q=>a.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ye)=>{var Ke;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:ye},[(q==null?void 0:q.type)==="upload"?(e.openBlock(),e.createBlock(de,{key:0,class:"upload-button-wrap","on-change":_,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Ae;return[e.createElementVNode("div",Uf,[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"]),e.createElementVNode("span",qf,e.toDisplayString(q==null?void 0:q.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(e.openBlock(),e.createBlock(pl._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(e.openBlock(),e.createBlock(j,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Ae;return[e.createVNode(Y,{class:"table-op-icon",name:(Ae=g==null?void 0:g.find(Qe=>(Qe==null?void 0:Qe.label)===(q==null?void 0:q.label)))==null?void 0:Ae.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(q==null?void 0:q.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Wf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q==null?void 0:q.contents,Ae=>(e.openBlock(),e.createBlock(j,{key:Ae==null?void 0:Ae.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Qe=>A(Ae==null?void 0:Ae.label)},{default:e.withCtx(()=>{var Qe,Ea;return[e.createTextVNode(e.toDisplayString(Ae==null?void 0:Ae.label),1),(Qe=Ae==null?void 0:Ae.label)!=null&&Qe.includes("选中")?(e.openBlock(),e.createElementBlock("span",Gf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Ea=Ae==null?void 0:Ae.label)!=null&&Ea.includes("全部")?(e.openBlock(),e.createElementBlock("span",Kf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Ae=>!a.lockingPage&&A(q==null?void 0:q.label,q)},[e.createVNode(Y,{class:"table-op-icon",name:(Ke=g==null?void 0:g.find(Ae=>(Ae==null?void 0:Ae.label)===(q==null?void 0:q.label)))==null?void 0:Ke.icon},null,8,["name"]),e.createElementVNode("span",Jf,e.toDisplayString(q==null?void 0:q.label),1)],10,Yf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},Zf=nr._export_sfc(Xf,[["__scopeId","data-v-c54c7b35"]]),Qf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,n)=>{const r=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 f;return e.openBlock(),e.createBlock(r,{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:(((f=o==null?void 0:o.label)==null?void 0:f.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(pl._sfc_main$2,{key:m,column:u,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(g,w)=>({name:w,fn:e.withCtx(({row:d,slotData:N,item:_,column:J})=>[e.renderSlot(l.$slots,w,e.mergeProps({ref_for:!0},N??d,{item:_??u,slotData:N??d,row:d,column:J,columnProp:u}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class e0 extends Fl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,n,r,i){const o=this,f=new Fl.FileLoader(o.manager);f.setPath(o.path),f.setResponseType("arraybuffer"),f.setRequestHeader(o.requestHeader),f.setWithCredentials(o.withCredentials),f.load(l,function(c){try{n(o.parse(c))}catch(u){i?i(u):console.error(u),o.manager.itemError(l)}},r,i)}_getDataView(l,n,r,i){switch(r){case"F":return i===8?l.getFloat64(n,this.littleEndian):l.getFloat32(n,this.littleEndian);case"I":return i===1?l.getInt8(n):i===2?l.getInt16(n,this.littleEndian):l.getInt32(n,this.littleEndian);case"U":return i===1?l.getUint8(n):i===2?l.getUint16(n,this.littleEndian):l.getUint32(n,this.littleEndian)}}parse(l){function n(N,_){const J=N.length,A=new Uint8Array(_);let F=0,L=0,E,S,k;do if(E=N[F++],E<32){if(E++,L+E>_)throw new Error("Output buffer is not large enough");if(F+E>J)throw new Error("Invalid compressed data");do A[L++]=N[F++];while(--E)}else{if(S=E>>5,k=L-((E&31)<<8)-1,F>=J)throw new Error("Invalid compressed data");if(S===7&&(S+=N[F++],F>=J))throw new Error("Invalid compressed data");if(k-=N[F++],L+S+2>_)throw new Error("Output buffer is not large enough");if(k<0)throw new Error("Invalid compressed data");if(k>=L)throw new Error("Invalid compressed data");do A[L++]=A[k++];while(--S+2)}while(F<J);return A}function r(N){const _={},J=new Uint8Array(N);let A="",F="",L=0,E=!1;const S=J.length;for(;L<S&&E===!1;){const O=String.fromCharCode(J[L++]);O===`
2
2
  `||O==="\r"?(F.trim().toLowerCase().startsWith("data")&&(E=!0),F=""):F+=O,A+=O}const k=A.search(/[\r\n]DATA\s(\S*)\s/i),y=/[\r\n]DATA\s(\S*)\s/i.exec(A.slice(k-1));if(_.data=y[1],_.headerLen=y[0].length+k,_.str=A.slice(0,_.headerLen),_.str=_.str.replace(/#.*/gi,""),_.version=/^VERSION (.*)/im.exec(_.str),_.fields=/^FIELDS (.*)/im.exec(_.str),_.size=/^SIZE (.*)/im.exec(_.str),_.type=/^TYPE (.*)/im.exec(_.str),_.count=/^COUNT (.*)/im.exec(_.str),_.width=/^WIDTH (.*)/im.exec(_.str),_.height=/^HEIGHT (.*)/im.exec(_.str),_.viewpoint=/^VIEWPOINT (.*)/im.exec(_.str),_.points=/^POINTS (.*)/im.exec(_.str),_.version!==null&&(_.version=parseFloat(_.version[1])),_.fields=_.fields!==null?_.fields[1].split(" "):[],_.type!==null&&(_.type=_.type[1].split(" ")),_.width!==null&&(_.width=parseInt(_.width[1])),_.height!==null&&(_.height=parseInt(_.height[1])),_.viewpoint!==null&&(_.viewpoint=_.viewpoint[1]),_.points!==null&&(_.points=parseInt(_.points[1],10)),_.points===null&&(_.points=_.width*_.height),_.size!==null&&(_.size=_.size[1].split(" ").map(function(O){return parseInt(O,10)})),_.count!==null)_.count=_.count[1].split(" ").map(function(O){return parseInt(O,10)});else{_.count=[];for(let O=0,I=_.fields.length;O<I;O++)_.count.push(1)}_.offset={};let x=0;for(let O=0,I=_.fields.length;O<I;O++)_.data==="ascii"?_.offset[_.fields[O]]=O:(_.offset[_.fields[O]]=x,x+=_.size[O]*_.count[O]);return _.rowSize=x,_}const i=r(l),o=[],f=[],c=[],u=[],m=[],g=new Fl.Color;if(i.data==="ascii"){const N=i.offset,A=new TextDecoder().decode(l).slice(i.headerLen).split(`
3
- `);for(let F=0,L=A.length;F<L;F++){if(A[F]==="")continue;const E=A[F].split(" ");if(N.x!==void 0&&(o.push(parseFloat(E[N.x])),o.push(parseFloat(E[N.y])),o.push(parseFloat(E[N.z]))),N.rgb!==void 0){const S=i.fields.findIndex(Y=>Y==="rgb"),k=i.type[S],y=parseFloat(E[N.rgb]);let x=y;if(k==="F"){const Y=new Float32Array(1);Y[0]=y,x=new Int32Array(Y.buffer)[0]}const O=(x>>16&255)/255,I=(x>>8&255)/255,W=(x>>0&255)/255;g.setRGB(O,I,W,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}N.normal_x!==void 0&&(f.push(parseFloat(E[N.normal_x])),f.push(parseFloat(E[N.normal_y])),f.push(parseFloat(E[N.normal_z]))),N.intensity!==void 0&&u.push(parseFloat(E[N.intensity])),N.label!==void 0&&m.push(parseInt(E[N.label]))}}if(i.data==="binary_compressed"){const N=new Uint32Array(l.slice(i.headerLen,i.headerLen+8)),_=N[0],J=N[1],A=n(new Uint8Array(l,i.headerLen+8,_),J),F=new DataView(A.buffer),L=i.offset;for(let E=0;E<i.points;E++){if(L.x!==void 0){const S=i.fields.indexOf("x"),k=i.fields.indexOf("y"),y=i.fields.indexOf("z");o.push(this._getDataView(F,i.points*L.x+i.size[S]*E,i.type[S],i.size[S])),o.push(this._getDataView(F,i.points*L.y+i.size[k]*E,i.type[k],i.size[k])),o.push(this._getDataView(F,i.points*L.z+i.size[y]*E,i.type[y],i.size[y]))}if(L.rgb!==void 0){const S=i.fields.indexOf("rgb"),k=F.getUint8(i.points*L.rgb+i.size[S]*E+2)/255,y=F.getUint8(i.points*L.rgb+i.size[S]*E+1)/255,x=F.getUint8(i.points*L.rgb+i.size[S]*E+0)/255;g.setRGB(k,y,x,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(L.normal_x!==void 0){const S=i.fields.indexOf("normal_x"),k=i.fields.indexOf("normal_y"),y=i.fields.indexOf("normal_z");f.push(this._getDataView(F,i.points*L.normal_x+i.size[S]*E,i.type[S],i.size[S])),f.push(this._getDataView(F,i.points*L.normal_y+i.size[k]*E,i.type[k],i.size[k])),f.push(this._getDataView(F,i.points*L.normal_z+i.size[y]*E,i.type[y],i.size[y]))}if(L.intensity!==void 0){const S=i.fields.indexOf("intensity");u.push(this._getDataView(F,i.points*L.intensity+i.size[S]*E,i.type[S],i.size[S]))}if(L.label!==void 0){const S=i.fields.indexOf("label");m.push(F.getInt32(i.points*L.label+i.size[S]*E,this.littleEndian))}}}if(i.data==="binary"){const N=new DataView(l,i.headerLen),_=i.offset;for(let J=0,A=0;J<i.points;J++,A+=i.rowSize){if(_.x!==void 0){const F=i.fields.indexOf("x"),L=i.fields.indexOf("y"),E=i.fields.indexOf("z");o.push(this._getDataView(N,A+_.x,i.type[F],i.size[F])),o.push(this._getDataView(N,A+_.y,i.type[L],i.size[L])),o.push(this._getDataView(N,A+_.z,i.type[E],i.size[E]))}if(_.rgb!==void 0){const F=N.getUint8(A+_.rgb+2)/255,L=N.getUint8(A+_.rgb+1)/255,E=N.getUint8(A+_.rgb+0)/255;g.setRGB(F,L,E,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(_.normal_x!==void 0){const F=i.fields.indexOf("normal_x"),L=i.fields.indexOf("normal_y"),E=i.fields.indexOf("normal_z");f.push(this._getDataView(N,A+_.normal_x,i.type[F],i.size[F])),f.push(this._getDataView(N,A+_.normal_y,i.type[L],i.size[L])),f.push(this._getDataView(N,A+_.normal_z,i.type[E],i.size[E]))}if(_.intensity!==void 0){const F=i.fields.indexOf("intensity");u.push(this._getDataView(N,A+_.intensity,i.type[F],i.size[F]))}_.label!==void 0&&m.push(N.getInt32(A+_.label,this.littleEndian))}}const w=new Fl.BufferGeometry;o.length>0&&w.setAttribute("position",new Fl.Float32BufferAttribute(o,3)),f.length>0&&w.setAttribute("normal",new Fl.Float32BufferAttribute(f,3)),c.length>0&&w.setAttribute("color",new Fl.Float32BufferAttribute(c,3)),u.length>0&&w.setAttribute("intensity",new Fl.Float32BufferAttribute(u,1)),m.length>0&&w.setAttribute("label",new Fl.Int32BufferAttribute(m,1)),w.computeBoundingSphere();const d=new Fl.PointsMaterial({size:.005});return c.length>0&&(d.vertexColors=!0),new Fl.Points(w,d)}}const a0=M.useModelComp(M.pinia),{systemPath:xs}=M.storeToRefs(a0),yo=e.ref(),ws=new WeakMap;function l0(a,l,n,r,i){const o=async d=>{try{const N=await M.platformDownloadFile({url:d});if(N.status!==200)throw new Error(`下载失败: ${N.status}`);return N.data}catch(N){throw console.error("addModelFromUrl失败:",N),N}},f=d=>new Promise((N,_)=>{const J=new FileReader;J.onload=A=>{try{const F=A.target.result,E=new Hn.MTLLoader().parse(F);E.preload(),N(E)}catch(F){_(F)}},J.onerror=()=>{_(new Error("MTL文件读取失败"))},J.readAsText(d)}),c=async d=>{const N={materials:{},create:function(_){return this.materials[_]?this.materials[_]:(console.warn(`Material '${_}' not found, using default material`),new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))},getAsArray:function(){const _=[];for(const J in this.materials)_.push(this.materials[J]);return _},preload:function(){for(const _ in this.materials)this.materials[_].map&&(this.materials[_].map.needsUpdate=!0)}};for(const _ of d){const J=await f(_);Object.assign(N.materials,J.materials)}return N.preload(),N},u=async(d,N=[])=>new Promise((_,J)=>{const A=new FileReader;A.onload=async F=>{try{const L=F.target.result;let E=null;N&&N.length>0&&(N.length===1?E=await f(N[0]):E=await c(N));const S=new Hn.OBJLoader;E&&S.setMaterials(E);const k=S.parse(L);E||k.traverse(y=>{y.isMesh&&(y.material=new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))}),_(k)}catch(L){J(L)}},A.onerror=()=>{J(new Error("OBJ文件读取失败"))},A.readAsText(d)}),m=async d=>{var N;try{n.value=!0;const{scene:_}=a();if(!_)throw new Error("Scene not initialized");i();const J=[];for(let A=0;A<d.length;A++){const F=d[A];r.value=`正在加载模型 ${A+1}/${d.length}...`;const L=await o(F.objUrl),E=((N=F.objUrl)==null?void 0:N.split("/").pop())||`model_${A}.obj`,S=new File([L],E,{type:L.type});let k=[];if(F.mtlUrls){const x=Array.isArray(F.mtlUrls)?F.mtlUrls:[F.mtlUrls];for(let O=0;O<x.length;O++){const I=x[O],W=await o(I),Y=(I==null?void 0:I.split("/").pop())||`material_${A}_${O}.mtl`,fe=new File([W],Y,{type:W.type});k.push(fe)}}const y=await u(S,k);_.add(y),l.value.push(y),J.push(y)}return n.value=!1,J}catch(_){throw console.error("加载模型失败:",_),n.value=!1,_}},g=async(d,N,_=[],J=[])=>{let A;const F=d.toLowerCase();switch(F){case".txt":case".cpt":case".obj":const L=await N.text();if(F===".txt"||F===".cpt"){const ne=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Pe=[...L.matchAll(ne)].map(se=>({x:parseFloat(se[1]),y:parseFloat(se[2]),z:parseFloat(se[3])})),Re=new Fl.BufferGeometry,Le=Pe.flatMap(se=>[se.x,se.y,se.z]);if(Re.setAttribute("position",new Fl.Float32BufferAttribute(Le,3)),F===".txt"){const se=new Fl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});A=new Fl.Points(Re,se)}else if(F===".cpt"){const se=new Fl.LineBasicMaterial({color:"#5B5C99",linewidth:100});A=new Fl.Line(Re,se)}}else if(F===".obj"){const ne=new Hn.OBJLoader;if(_&&_.length>0){const ua=new Hn.MTLLoader;for(const Pe of _){const Re=await Pe.text(),Le=ua.parse(Re);Le.preload(),ne.setMaterials(Le);break}}A=ne.parse(L),(!_||_.length===0)&&A.traverse(ua=>{ua.isMesh&&(ua.material=new Fl.MeshPhongMaterial({color:"#B3B3D4"})),ua instanceof Fl.Mesh&&(ua.material.side=Fl.DoubleSide)})}break;case".stl":const E=await N.arrayBuffer(),k=new Hn.STLLoader().parse(E),y=new Fl.MeshPhongMaterial({color:"#B3B3D4",side:Fl.DoubleSide});A=new Fl.Mesh(k,y);break;case".nc":const x=["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"],O={"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)"},I=new Fl.Group,W=x.map(ne=>new Promise((ua,Pe)=>{new Hn.STLLoader().load(xs.value===""?`/model/${ne}`:`${xs.value}\\${ne}`,Le=>{const se=new Fl.MeshPhongMaterial({color:O[ne]||"#B3B3D4",side:Fl.DoubleSide}),me=new Fl.Mesh(Le,se);ua(me)},void 0,Pe)}));try{(await Promise.all(W)).forEach(ua=>I.add(ua)),A=I}catch(ne){throw console.error("加载NC文件对应的STL文件失败:",ne),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const Y=new e0,fe=new Fl.Group;try{const ne=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ua=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"}),Pe=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Re=new Blob([Pe.data],{type:"application/octet-stream;charset=UTF-8"}),Le=await new Promise((me,qe)=>{const ka=URL.createObjectURL(ua);Y.load(ka,_a=>{const H=new Float32Array(_a.geometry.attributes.position.count*3);for(let V=0;V<_a.geometry.attributes.position.count;V++)H[V*3]=1,H[V*3+1]=0,H[V*3+2]=0;_a.geometry.setAttribute("color",new Fl.BufferAttribute(H,3)),_a.material.vertexColors=!0,_a.scale.set(.3,.3,.3),URL.revokeObjectURL(ka),me(_a)},void 0,qe)}),se=await new Promise((me,qe)=>{const ka=URL.createObjectURL(Re);Y.load(ka,_a=>{const H=new Float32Array(_a.geometry.attributes.position.count*3);for(let V=0;V<_a.geometry.attributes.position.count;V++)H[V*3]=0,H[V*3+1]=1,H[V*3+2]=0;_a.geometry.setAttribute("color",new Fl.BufferAttribute(H,3)),_a.material.vertexColors=!0,_a.scale.set(.3,.3,.3),URL.revokeObjectURL(ka),me(_a)},void 0,qe)});fe.add(Le),fe.add(se),A=fe}catch(ne){throw console.error("PCD文件加载失败:",ne),new Error("无法加载PCD文件")}break;case".urdf":const de=URL.createObjectURL(N),j=new Xu.URDFLoader,U="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},ee=new WeakMap,ge=new WeakMap,Ie=new WeakMap,ue=async ne=>{if(ee.has(ne))return console.log(`从缓存加载: ${ne}`),ee.get(ne);try{const ua=await Ja.axios.get(`${U}/${ne}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Pe=new Blob([ua.data],{type:"application/octet-stream;charset=UTF-8"});return Z.enableCache&&ee.set(ne,Pe),Pe}catch(ua){throw console.error(`加载文件失败: ${ne}`,ua),new Error(`无法加载文件: ${ne}`)}},B=(ne="default")=>{if(ge.has(ne))return ge.get(ne);const ua=new Fl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Fl.FrontSide});return ge.set(ne,ua),ua},oe=ne=>{try{ne.isBufferGeometry&&ne.mergeVertices&&ne.mergeVertices(),ne.computeVertexNormals&&ne.computeVertexNormals(),ne.computeBoundingSphere&&ne.computeBoundingSphere(),ne.deleteAttribute&&ne.deleteAttribute("uv2")}catch(ua){console.warn("几何体优化失败,使用原始几何体:",ua)}return ne},q=async(ne,ua,Pe)=>{const Re=`stl_${ua}`;if(Ie.has(Re)){const qe=Ie.get(Re);return new Fl.Mesh(qe,B())}const Le=await ne.arrayBuffer();let me=new Hn.STLLoader(Pe).parse(Le);return me=oe(me),Ie.set(Re,me),new Fl.Mesh(me,B())},ye=async(ne,ua,Pe)=>{const Re=`obj_${ua}`;if(ee.has(Re))return ee.get(Re).clone();const Le=await ne.text(),se=new Hn.OBJLoader(Pe),me=ua.replace(".obj",".mtl");try{const _a=await(await ue(me)).text(),V=new Hn.MTLLoader(Pe).parse(_a);V.preload(),se.setMaterials(V)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${me}`)}const qe=se.parse(Le);return qe.traverse(ka=>{ka.isMesh&&(ka.geometry=oe(ka.geometry),ka.castShadow=!0,ka.receiveShadow=!0,ka.renderOrder=1)}),ee.set(Re,qe),qe},Ke=(ne,ua)=>{const Pe=new Fl.LOD;if(Pe.addLevel(ne,0),ne.geometry){const Re=ne.geometry.clone(),Le=new Fl.Mesh(Re,ne.material);Pe.addLevel(Le,50)}return Pe};let Ae=0,Qe=0;const Ea=[];j.loadMeshCb=async(ne,ua,Pe,Re,Le)=>{const se=ne.split("/").pop(),me=Pe||(()=>{});Ae++;const qe=new Promise(async(ka,_a)=>{try{const H=await ue(se);if(!H||H.size===0)throw new Error(`文件为空: ${se}`);const V=se.split(".").pop().toLowerCase();let ae;switch(V){case"stl":ae=await q(H,se,ua);break;case"obj":ae=await ye(H,se,ua);break;default:throw new Error(`不支持的文件格式: ${V}`)}Z.enableLOD&&ae.isMesh&&(ae=Ke(ae,se)),me(ae),Qe++,Re&&Re({loaded:Qe,total:Ae,progress:Qe/Ae}),ka(ae)}catch(H){console.error(`mesh文件加载失败: ${se}`,H);const V=new Fl.Group;me(V),ka(V);const ae=new Fl.BoxGeometry(.1,.1,.1),pe=new Fl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Fl.Mesh(ae,pe)}});Ea.push(qe)};try{if(!de){yo.value=void 0;break}if(A=await j.loadAsync(de),console.log(`URDF文件加载完成,等待${Ae}个mesh文件加载...`),Ea.length>0)try{await Promise.allSettled(Ea),console.log(`所有mesh文件处理完成,成功加载: ${Qe}/${Ae}`)}catch(Pe){console.warn("部分mesh文件加载失败,但继续显示模型",Pe)}A.traverse(Pe=>{Pe.isMesh&&(Pe.castShadow=!0,Pe.receiveShadow=!0,Pe.renderOrder=1,Pe.material&&(Pe.material.needsUpdate=!0))}),console.time("计算包围盒");const ne=new Fl.Box3;ne.expandByObject(A);const ua=`urdf_${Date.now()}`;A.userData.boundingBox=ne.clone(),A.userData.modelId=ua,ws.set(ua,{box:ne.clone(),center:ne.getCenter(new Fl.Vector3),size:ne.getSize(new Fl.Vector3),maxSize:Math.max(...ne.getSize(new Fl.Vector3).toArray())}),yo.value=A,console.log("URDF模型加载完成并优化")}catch(ne){console.error("URDF加载失败:",ne),yo.value=void 0}finally{de&&URL.revokeObjectURL(de)}break;default:throw new Error(`不支持的文件格式: ${d}`)}return A};return{addModelsFromUrls:m,loadModelByDefaultPath:async d=>{console.log(d);try{n.value=!0,r.value="正在加载模型...";const{scene:N}=a();if(!N)throw new Error("Scene not initialized");i(),await new Promise(J=>setTimeout(J,100));const _=[];for(let J=0;J<d.length;J++){const A=d[J],F=await g(A.suffix,A.blob,A.mtlBlobs||[],A.meshFiles||[]);F&&(N.add(F),l.value.push(F),_.push(F))}return n.value=!1,r.value="",_}catch(N){throw console.error("加载模型失败:",N),n.value=!1,r.value="",N}},urdfModel:yo,modelBoundingBoxes:ws}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(a=>{var l=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,i,o,f,c,u=function(w,d){d.parentNode.insertBefore(w,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(w){console&&console.log(w)}}r=function(){var w,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,(w=document.body).firstChild?u(d,w.firstChild):w.appendChild(d))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),r()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=r,f=a.document,c=!1,g(),f.onreadystatechange=function(){f.readyState=="complete"&&(f.onreadystatechange=null,m())})}function m(){c||(c=!0,o())}function g(){try{f.documentElement.doScroll("left")}catch{return void setTimeout(g,50)}m()}})(window);const r0=["onClick"],n0=e.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:""}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(null),o=e.ref(null),f=k=>{var x,O,I,W;let y={};if(k!=null&&k.find(Y=>Y==null?void 0:Y.includes("@TextSize"))){let Y=(O=(x=k==null?void 0:k.find(fe=>fe==null?void 0:fe.includes("@TextSize")))==null?void 0:x.split("="))==null?void 0:O[1];y.fontSize=`${Y}px`}if(k!=null&&k.find(Y=>Y==null?void 0:Y.includes("@TextRGBA"))){let Y=(W=(I=k==null?void 0:k.find(fe=>fe==null?void 0:fe.includes("@TextRGBA")))==null?void 0:I.split("="))==null?void 0:W[1];y.color=le.rgbaToColor(Y)}return y},c=e.computed(()=>{const k=Number(n==null?void 0:n.textSize),y=le.rgbaToColor(n==null?void 0:n.textColor),x={},O={};return!Number.isNaN(k)&&k&&(x.fontSize=`${k}px`,O.fontSize=`${k}px`),y&&(x.color=y,O.color=y),{label:x,value:O}}),u=e.ref(""),m=e.ref(""),g=e.ref(!1),w=async k=>{if(k){m.value&&(URL.revokeObjectURL(m.value),m.value="");try{const y=await M.platformDownloadFile({url:k}),x=new Blob([y==null?void 0:y.data],{type:(y==null?void 0:y.headers["content-type"])||"image/*"});m.value=URL.createObjectURL(x)}catch{m.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(u.value=k)},{immediate:!0}),e.watch(u,k=>{w(k)},{immediate:!0});const d=()=>{var k;(k=o.value)==null||k.click()},N=async k=>{var O,I,W;const y=k.target,x=(O=y==null?void 0:y.files)==null?void 0:O[0];if(!x){y.value="";return}g.value=!0;try{const Y=new FormData;Y.append("file",x);const fe=await M.platformUploadFile(Y),de=(W=(I=fe==null?void 0:fe.data)==null?void 0:I.result)==null?void 0:W.url;de?(u.value=de,r("update:backGroundImage",de),w(de),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{g.value=!1,y.value=""}},_=e.computed(()=>{var k;return m.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(k=n==null?void 0:n.backgroundUrl)==null?void 0:k.replace(/\\/g,"/")}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),J=k=>pl.getComponent(k),A=k=>{if(!k)return;const y=k.querySelector("input, textarea, .el-input__inner");y&&typeof y.focus=="function"&&y.focus()},F=(k,y,x)=>{n.disabled||k.field&&(i.value=y,e.nextTick(()=>{A(x.currentTarget)}))},L=()=>{i.value=null},E=k=>{var x;const y=((x=k==null?void 0:k.field)==null?void 0:x.value)??(k==null?void 0:k.value);return y==null||y===""?"-":y},S=k=>{var W,Y,fe,de;const y=k!=null&&k.width&&k.width>0?k.width:1,O=`calc((100% - ${(y-1)*16}px) / ${y})`;let I;return(W=k==null?void 0:k.filters)!=null&&W.find(j=>j==null?void 0:j.includes("@TextBackRGBA"))&&(I=(de=(fe=(Y=k==null?void 0:k.filters)==null?void 0:Y.find(j=>j==null?void 0:j.includes("@TextBackRGBA")))==null?void 0:fe.split("="))==null?void 0:de[1],I=le.rgbaToColor(I)),{flex:`0 0 ${O}`,maxWidth:O,minWidth:"140px",boxSizing:"border-box",background:I}};return(k,y)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(_.value),onClick:y[2]||(y[2]=x=>(n==null?void 0:n.backGround)&&d())},[n!=null&&n.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:y[0]||(y[0]=e.withModifiers(x=>d(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:o,type:"file",accept:"image/*",style:{display:"none"},onChange:N},null,544),y[3]||(y[3]=e.createElementVNode("img",{src:pl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.items,(x,O)=>{var I,W,Y,fe,de,j,U,Z;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:O,style:e.normalizeStyle(S(x)),onClick:y[1]||(y[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle({...c.value.label,...f(x==null?void 0:x.filters)})},e.toDisplayString(x==null?void 0:x.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(c.value.value),onClick:ee=>{var ge;return(ge=x.field)!=null&&ge.isNoClick?null:F(x,O,ee)}},[i.value===O&&x.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(J(((I=x.field)==null?void 0:I.type)??"Input")),{key:0,modelValue:x.field.value,"onUpdate:modelValue":ee=>x.field.value=ee,isEdit:!0,disabled:(W=x.field)==null?void 0:W.disabled,content:((Y=x.field)==null?void 0:Y.contents)??[],optionUrl:x.field,originalValue:(fe=x.field)==null?void 0:fe.value,config:(de=x.field)==null?void 0:de.config,configModel:((j=x.field)==null?void 0:j.prop)??((U=x.field)==null?void 0:U.name),selectedTagList:((Z=x.field)==null?void 0:Z.selectValue)??[],onBlur:L,onBlurChange:L},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(E(x)),1)],64))],12,r0)],4)}),128))],4))}}),i0=nr._export_sfc(n0,[["__scopeId","data-v-be923b14"]]),kc=M.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),o0={class:"calculator-content"},t0={class:"calculator-child"},s0={class:"calculator-child"},c0=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),n=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(r,i)=>(e.openBlock(),e.createElementBlock("div",o0,[e.createElementVNode("div",t0,[e.createVNode(pl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",s0,[e.createVNode(pl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),u0=nr._export_sfc(c0,[["__scopeId","data-v-73db0fe7"]]),Et=(a,l)=>{let n=a,r=l;return Array.isArray(n)&&(n=n==null?void 0:n.map((i,o)=>{if(Array.isArray(i)){let f={};return i=i==null?void 0:i.forEach((c,u)=>{var m;(m=r==null?void 0:r[u])!=null&&m.prop?f[r[u].prop]=c:Array.isArray(c)&&(f.children=Et(c,r))}),Object.assign(f,{id:o})}else return i})),n},xc=(a,l,n)=>{let r=a,i=l;return r=r==null?void 0:r.map((o,f)=>{var c,u;return!Array.isArray(o)||!((c=i==null?void 0:i[f])!=null&&c.label)&&!n||(o.unshift(((u=i==null?void 0:i[f])==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=xc(m,(g=i==null?void 0:i[f])==null?void 0:g.children,n)),m}))),o}),r},d0=(a,l,n)=>{if(l==="")return a==null?void 0:a.filter(r=>(r==null?void 0:r.id)!==n);{const r=l.split("-");return p0(a,r,n)}},p0=(a,l,n)=>{let r=a,i=l;return(i==null?void 0:i.length)===0?r=r==null?void 0:r.filter(o=>o.id!==n):r=r==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=wc(o,i,n)),o)),r},wc=(a,l,n)=>{var o,f;let r=a,i=l;return(i==null?void 0:i.length)===0?r.children=(o=r.children)==null?void 0:o.filter(c=>c.id!==n):r.children=(f=r.children)==null?void 0:f.map(c=>(c.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),c=wc(c,i,n)),c)),r},f0=(a,l,n)=>{if(l==="")return n;{const r=l.split("-");return h0(a,r,n)}},h0=(a,l,n)=>{let r=a,i=l;return(i==null?void 0:i.length)===0?r=n:r=r==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=_c(o,i,n)),o)),r},_c=(a,l,n)=>{var o;let r=a,i=l;return(i==null?void 0:i.length)===0?r.children=n:r.children=(o=r.children)==null?void 0:o.map(f=>(f.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),f=_c(f,i,n)),f)),r};class v0{constructor(l={}){dn(this,"url");dn(this,"heartbeatInterval");dn(this,"socket",null);dn(this,"isConnected",!1);dn(this,"heartTimer",null);dn(this,"canvas",null);dn(this,"ctx",null);dn(this,"mainCamCutMode",0);dn(this,"pMainShowStartX",0);dn(this,"pMainShowStartY",0);dn(this,"onLog");dn(this,"onDevCount");dn(this,"onResolution");dn(this,"onCameraStatus");dn(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,n,r){var f;(f=this.canvas)!=null&&f.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const i=document.createElement("canvas");i.style.border="solid 1px #A0A0A0",i.id="MainCamCanvas",i.width=n,i.height=r;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,n)=>{const r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>{this.socket=r,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},r.onerror=i=>{this.isConnected=!1,this.log("socket.onerror"),n(i)},r.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},r.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 n=l.find(i=>i.width===2592&&i.height===1944);return n||[...l].sort((i,o)=>o.width*o.height-i.width*i.height)[0]||null}openCamera(l=0,n=1280,r=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]=n>>8&255,i[9]=n&255,i[10]=r>>8&255,i[11]=r&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 n;(n=this.onLog)==null||n.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var i,o,f,c,u,m;const n=new Uint8Array(l.data);if(n.length<=0)return;if(n[0]===17&&n[1]===17&&n[2]===17){this.log("heart socket!!!!");return}if(n[0]!==85||n[1]!==102)return;const r=n[2];if(r===80){const g=n[3],w=n.length-4,d=new Uint8Array(w);for(let J=0;J<w;J++)d[J]=n[4+J];const _=decodeURIComponent(this.byteToString(d)).split("|");(i=this.onDevCount)==null||i.call(this,g,_);return}if(r===81){const g=n[3]||0,w=[];for(let d=0;d<g;d++){const N=(n[4+d*4+0]||0)*256+(n[4+d*4+1]||0),_=(n[4+d*4+2]||0)*256+(n[4+d*4+3]||0);w.push({width:N,height:_,text:`${N}*${_}`})}(o=this.onResolution)==null||o.call(this,g,w);return}if(r===1){n[3]===1&&((f=this.onCameraStatus)==null||f.call(this,"opened")),n[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(r===16){if(n[3]===1){const w=n[4]*256+n[5],d=n[6]*65536+n[7]*256+n[8];let N="";if(w>0){const A=new Uint8Array(w);for(let F=0;F<w;F++)A[F]=n[9+F];N=decodeURIComponent(this.byteToString(A))}const _=new Uint8Array(d);for(let A=0;A<d;A++)_[A]=n[9+w+A];const J=this.uint8ArrayToString(_);(u=this.onPhoto)==null||u.call(this,{flag:0,imgPath:N,base64:J})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(r===204){if(!this.canvas||!this.ctx)return;const g=n[3]*256+n[4],w=n[5]*256+n[6];this.pMainShowStartX=n[7]*256+n[8],this.pMainShowStartY=n[9]*256+n[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const d=this.ctx.createImageData(g,w);let N=11;for(let _=0;_<d.data.length;_+=4)d.data[_+0]=n[N],d.data[_+1]=n[N+1],d.data[_+2]=n[N+2],d.data[_+3]=255,N+=3;this.ctx.putImageData(d,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}byteToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}}const m0={style:{display:"flex",gap:"16px",height:"100%"}},y0={key:0,style:{color:"var(--el-text-color-secondary)"}},g0={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},b0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},k0={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"}},x0={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},w0={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},_0=["src","onClick"],S0=["onClick"],E0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},C0={class:"dialog-footer"},D0=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(null),o=e.ref(!1),f=e.ref([]),c=e.ref(""),u=e.ref(!1),m=e.ref([]),g=new v0({url:"ws://127.0.0.1:22225"});function w(I,W){var Z;const Y=I.split(","),fe=((Z=Y[0].match(/:(.*?);/))==null?void 0:Z[1])??"image/jpeg",de=atob(Y[1]);let j=de.length;const U=new Uint8Array(j);for(;j--;)U[j]=de.charCodeAt(j);return new File([U],W,{type:fe})}function d(){g.onLog=I=>{console.log("[GPY]",I)},g.onDevCount=(I,W)=>{if(c.value+=`设备数量=${I},设备=${W.join(",")}
3
+ `);for(let F=0,L=A.length;F<L;F++){if(A[F]==="")continue;const E=A[F].split(" ");if(N.x!==void 0&&(o.push(parseFloat(E[N.x])),o.push(parseFloat(E[N.y])),o.push(parseFloat(E[N.z]))),N.rgb!==void 0){const S=i.fields.findIndex(Y=>Y==="rgb"),k=i.type[S],y=parseFloat(E[N.rgb]);let x=y;if(k==="F"){const Y=new Float32Array(1);Y[0]=y,x=new Int32Array(Y.buffer)[0]}const O=(x>>16&255)/255,I=(x>>8&255)/255,W=(x>>0&255)/255;g.setRGB(O,I,W,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}N.normal_x!==void 0&&(f.push(parseFloat(E[N.normal_x])),f.push(parseFloat(E[N.normal_y])),f.push(parseFloat(E[N.normal_z]))),N.intensity!==void 0&&u.push(parseFloat(E[N.intensity])),N.label!==void 0&&m.push(parseInt(E[N.label]))}}if(i.data==="binary_compressed"){const N=new Uint32Array(l.slice(i.headerLen,i.headerLen+8)),_=N[0],J=N[1],A=n(new Uint8Array(l,i.headerLen+8,_),J),F=new DataView(A.buffer),L=i.offset;for(let E=0;E<i.points;E++){if(L.x!==void 0){const S=i.fields.indexOf("x"),k=i.fields.indexOf("y"),y=i.fields.indexOf("z");o.push(this._getDataView(F,i.points*L.x+i.size[S]*E,i.type[S],i.size[S])),o.push(this._getDataView(F,i.points*L.y+i.size[k]*E,i.type[k],i.size[k])),o.push(this._getDataView(F,i.points*L.z+i.size[y]*E,i.type[y],i.size[y]))}if(L.rgb!==void 0){const S=i.fields.indexOf("rgb"),k=F.getUint8(i.points*L.rgb+i.size[S]*E+2)/255,y=F.getUint8(i.points*L.rgb+i.size[S]*E+1)/255,x=F.getUint8(i.points*L.rgb+i.size[S]*E+0)/255;g.setRGB(k,y,x,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(L.normal_x!==void 0){const S=i.fields.indexOf("normal_x"),k=i.fields.indexOf("normal_y"),y=i.fields.indexOf("normal_z");f.push(this._getDataView(F,i.points*L.normal_x+i.size[S]*E,i.type[S],i.size[S])),f.push(this._getDataView(F,i.points*L.normal_y+i.size[k]*E,i.type[k],i.size[k])),f.push(this._getDataView(F,i.points*L.normal_z+i.size[y]*E,i.type[y],i.size[y]))}if(L.intensity!==void 0){const S=i.fields.indexOf("intensity");u.push(this._getDataView(F,i.points*L.intensity+i.size[S]*E,i.type[S],i.size[S]))}if(L.label!==void 0){const S=i.fields.indexOf("label");m.push(F.getInt32(i.points*L.label+i.size[S]*E,this.littleEndian))}}}if(i.data==="binary"){const N=new DataView(l,i.headerLen),_=i.offset;for(let J=0,A=0;J<i.points;J++,A+=i.rowSize){if(_.x!==void 0){const F=i.fields.indexOf("x"),L=i.fields.indexOf("y"),E=i.fields.indexOf("z");o.push(this._getDataView(N,A+_.x,i.type[F],i.size[F])),o.push(this._getDataView(N,A+_.y,i.type[L],i.size[L])),o.push(this._getDataView(N,A+_.z,i.type[E],i.size[E]))}if(_.rgb!==void 0){const F=N.getUint8(A+_.rgb+2)/255,L=N.getUint8(A+_.rgb+1)/255,E=N.getUint8(A+_.rgb+0)/255;g.setRGB(F,L,E,Fl.SRGBColorSpace),c.push(g.r,g.g,g.b)}if(_.normal_x!==void 0){const F=i.fields.indexOf("normal_x"),L=i.fields.indexOf("normal_y"),E=i.fields.indexOf("normal_z");f.push(this._getDataView(N,A+_.normal_x,i.type[F],i.size[F])),f.push(this._getDataView(N,A+_.normal_y,i.type[L],i.size[L])),f.push(this._getDataView(N,A+_.normal_z,i.type[E],i.size[E]))}if(_.intensity!==void 0){const F=i.fields.indexOf("intensity");u.push(this._getDataView(N,A+_.intensity,i.type[F],i.size[F]))}_.label!==void 0&&m.push(N.getInt32(A+_.label,this.littleEndian))}}const w=new Fl.BufferGeometry;o.length>0&&w.setAttribute("position",new Fl.Float32BufferAttribute(o,3)),f.length>0&&w.setAttribute("normal",new Fl.Float32BufferAttribute(f,3)),c.length>0&&w.setAttribute("color",new Fl.Float32BufferAttribute(c,3)),u.length>0&&w.setAttribute("intensity",new Fl.Float32BufferAttribute(u,1)),m.length>0&&w.setAttribute("label",new Fl.Int32BufferAttribute(m,1)),w.computeBoundingSphere();const d=new Fl.PointsMaterial({size:.005});return c.length>0&&(d.vertexColors=!0),new Fl.Points(w,d)}}const a0=M.useModelComp(M.pinia),{systemPath:ks}=M.storeToRefs(a0),yo=e.ref(),xs=new WeakMap;function l0(a,l,n,r,i){const o=async d=>{try{const N=await M.platformDownloadFile({url:d});if(N.status!==200)throw new Error(`下载失败: ${N.status}`);return N.data}catch(N){throw console.error("addModelFromUrl失败:",N),N}},f=d=>new Promise((N,_)=>{const J=new FileReader;J.onload=A=>{try{const F=A.target.result,E=new Hn.MTLLoader().parse(F);E.preload(),N(E)}catch(F){_(F)}},J.onerror=()=>{_(new Error("MTL文件读取失败"))},J.readAsText(d)}),c=async d=>{const N={materials:{},create:function(_){return this.materials[_]?this.materials[_]:(console.warn(`Material '${_}' not found, using default material`),new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))},getAsArray:function(){const _=[];for(const J in this.materials)_.push(this.materials[J]);return _},preload:function(){for(const _ in this.materials)this.materials[_].map&&(this.materials[_].map.needsUpdate=!0)}};for(const _ of d){const J=await f(_);Object.assign(N.materials,J.materials)}return N.preload(),N},u=async(d,N=[])=>new Promise((_,J)=>{const A=new FileReader;A.onload=async F=>{try{const L=F.target.result;let E=null;N&&N.length>0&&(N.length===1?E=await f(N[0]):E=await c(N));const S=new Hn.OBJLoader;E&&S.setMaterials(E);const k=S.parse(L);E||k.traverse(y=>{y.isMesh&&(y.material=new Fl.MeshPhongMaterial({color:8947848,side:Fl.DoubleSide}))}),_(k)}catch(L){J(L)}},A.onerror=()=>{J(new Error("OBJ文件读取失败"))},A.readAsText(d)}),m=async d=>{var N;try{n.value=!0;const{scene:_}=a();if(!_)throw new Error("Scene not initialized");i();const J=[];for(let A=0;A<d.length;A++){const F=d[A];r.value=`正在加载模型 ${A+1}/${d.length}...`;const L=await o(F.objUrl),E=((N=F.objUrl)==null?void 0:N.split("/").pop())||`model_${A}.obj`,S=new File([L],E,{type:L.type});let k=[];if(F.mtlUrls){const x=Array.isArray(F.mtlUrls)?F.mtlUrls:[F.mtlUrls];for(let O=0;O<x.length;O++){const I=x[O],W=await o(I),Y=(I==null?void 0:I.split("/").pop())||`material_${A}_${O}.mtl`,fe=new File([W],Y,{type:W.type});k.push(fe)}}const y=await u(S,k);_.add(y),l.value.push(y),J.push(y)}return n.value=!1,J}catch(_){throw console.error("加载模型失败:",_),n.value=!1,_}},g=async(d,N,_=[],J=[])=>{let A;const F=d.toLowerCase();switch(F){case".txt":case".cpt":case".obj":const L=await N.text();if(F===".txt"||F===".cpt"){const ne=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Pe=[...L.matchAll(ne)].map(se=>({x:parseFloat(se[1]),y:parseFloat(se[2]),z:parseFloat(se[3])})),Re=new Fl.BufferGeometry,Le=Pe.flatMap(se=>[se.x,se.y,se.z]);if(Re.setAttribute("position",new Fl.Float32BufferAttribute(Le,3)),F===".txt"){const se=new Fl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});A=new Fl.Points(Re,se)}else if(F===".cpt"){const se=new Fl.LineBasicMaterial({color:"#5B5C99",linewidth:100});A=new Fl.Line(Re,se)}}else if(F===".obj"){const ne=new Hn.OBJLoader;if(_&&_.length>0){const ua=new Hn.MTLLoader;for(const Pe of _){const Re=await Pe.text(),Le=ua.parse(Re);Le.preload(),ne.setMaterials(Le);break}}A=ne.parse(L),(!_||_.length===0)&&A.traverse(ua=>{ua.isMesh&&(ua.material=new Fl.MeshPhongMaterial({color:"#B3B3D4"})),ua instanceof Fl.Mesh&&(ua.material.side=Fl.DoubleSide)})}break;case".stl":const E=await N.arrayBuffer(),k=new Hn.STLLoader().parse(E),y=new Fl.MeshPhongMaterial({color:"#B3B3D4",side:Fl.DoubleSide});A=new Fl.Mesh(k,y);break;case".nc":const x=["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"],O={"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)"},I=new Fl.Group,W=x.map(ne=>new Promise((ua,Pe)=>{new Hn.STLLoader().load(ks.value===""?`/model/${ne}`:`${ks.value}\\${ne}`,Le=>{const se=new Fl.MeshPhongMaterial({color:O[ne]||"#B3B3D4",side:Fl.DoubleSide}),me=new Fl.Mesh(Le,se);ua(me)},void 0,Pe)}));try{(await Promise.all(W)).forEach(ua=>I.add(ua)),A=I}catch(ne){throw console.error("加载NC文件对应的STL文件失败:",ne),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const Y=new e0,fe=new Fl.Group;try{const ne=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ua=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"}),Pe=await Ja.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Re=new Blob([Pe.data],{type:"application/octet-stream;charset=UTF-8"}),Le=await new Promise((me,qe)=>{const ka=URL.createObjectURL(ua);Y.load(ka,_a=>{const H=new Float32Array(_a.geometry.attributes.position.count*3);for(let V=0;V<_a.geometry.attributes.position.count;V++)H[V*3]=1,H[V*3+1]=0,H[V*3+2]=0;_a.geometry.setAttribute("color",new Fl.BufferAttribute(H,3)),_a.material.vertexColors=!0,_a.scale.set(.3,.3,.3),URL.revokeObjectURL(ka),me(_a)},void 0,qe)}),se=await new Promise((me,qe)=>{const ka=URL.createObjectURL(Re);Y.load(ka,_a=>{const H=new Float32Array(_a.geometry.attributes.position.count*3);for(let V=0;V<_a.geometry.attributes.position.count;V++)H[V*3]=0,H[V*3+1]=1,H[V*3+2]=0;_a.geometry.setAttribute("color",new Fl.BufferAttribute(H,3)),_a.material.vertexColors=!0,_a.scale.set(.3,.3,.3),URL.revokeObjectURL(ka),me(_a)},void 0,qe)});fe.add(Le),fe.add(se),A=fe}catch(ne){throw console.error("PCD文件加载失败:",ne),new Error("无法加载PCD文件")}break;case".urdf":const de=URL.createObjectURL(N),j=new Ju.URDFLoader,U="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},ee=new WeakMap,ge=new WeakMap,Ie=new WeakMap,ue=async ne=>{if(ee.has(ne))return console.log(`从缓存加载: ${ne}`),ee.get(ne);try{const ua=await Ja.axios.get(`${U}/${ne}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Pe=new Blob([ua.data],{type:"application/octet-stream;charset=UTF-8"});return Z.enableCache&&ee.set(ne,Pe),Pe}catch(ua){throw console.error(`加载文件失败: ${ne}`,ua),new Error(`无法加载文件: ${ne}`)}},B=(ne="default")=>{if(ge.has(ne))return ge.get(ne);const ua=new Fl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Fl.FrontSide});return ge.set(ne,ua),ua},oe=ne=>{try{ne.isBufferGeometry&&ne.mergeVertices&&ne.mergeVertices(),ne.computeVertexNormals&&ne.computeVertexNormals(),ne.computeBoundingSphere&&ne.computeBoundingSphere(),ne.deleteAttribute&&ne.deleteAttribute("uv2")}catch(ua){console.warn("几何体优化失败,使用原始几何体:",ua)}return ne},q=async(ne,ua,Pe)=>{const Re=`stl_${ua}`;if(Ie.has(Re)){const qe=Ie.get(Re);return new Fl.Mesh(qe,B())}const Le=await ne.arrayBuffer();let me=new Hn.STLLoader(Pe).parse(Le);return me=oe(me),Ie.set(Re,me),new Fl.Mesh(me,B())},ye=async(ne,ua,Pe)=>{const Re=`obj_${ua}`;if(ee.has(Re))return ee.get(Re).clone();const Le=await ne.text(),se=new Hn.OBJLoader(Pe),me=ua.replace(".obj",".mtl");try{const _a=await(await ue(me)).text(),V=new Hn.MTLLoader(Pe).parse(_a);V.preload(),se.setMaterials(V)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${me}`)}const qe=se.parse(Le);return qe.traverse(ka=>{ka.isMesh&&(ka.geometry=oe(ka.geometry),ka.castShadow=!0,ka.receiveShadow=!0,ka.renderOrder=1)}),ee.set(Re,qe),qe},Ke=(ne,ua)=>{const Pe=new Fl.LOD;if(Pe.addLevel(ne,0),ne.geometry){const Re=ne.geometry.clone(),Le=new Fl.Mesh(Re,ne.material);Pe.addLevel(Le,50)}return Pe};let Ae=0,Qe=0;const Ea=[];j.loadMeshCb=async(ne,ua,Pe,Re,Le)=>{const se=ne.split("/").pop(),me=Pe||(()=>{});Ae++;const qe=new Promise(async(ka,_a)=>{try{const H=await ue(se);if(!H||H.size===0)throw new Error(`文件为空: ${se}`);const V=se.split(".").pop().toLowerCase();let ae;switch(V){case"stl":ae=await q(H,se,ua);break;case"obj":ae=await ye(H,se,ua);break;default:throw new Error(`不支持的文件格式: ${V}`)}Z.enableLOD&&ae.isMesh&&(ae=Ke(ae,se)),me(ae),Qe++,Re&&Re({loaded:Qe,total:Ae,progress:Qe/Ae}),ka(ae)}catch(H){console.error(`mesh文件加载失败: ${se}`,H);const V=new Fl.Group;me(V),ka(V);const ae=new Fl.BoxGeometry(.1,.1,.1),pe=new Fl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Fl.Mesh(ae,pe)}});Ea.push(qe)};try{if(!de){yo.value=void 0;break}if(A=await j.loadAsync(de),console.log(`URDF文件加载完成,等待${Ae}个mesh文件加载...`),Ea.length>0)try{await Promise.allSettled(Ea),console.log(`所有mesh文件处理完成,成功加载: ${Qe}/${Ae}`)}catch(Pe){console.warn("部分mesh文件加载失败,但继续显示模型",Pe)}A.traverse(Pe=>{Pe.isMesh&&(Pe.castShadow=!0,Pe.receiveShadow=!0,Pe.renderOrder=1,Pe.material&&(Pe.material.needsUpdate=!0))}),console.time("计算包围盒");const ne=new Fl.Box3;ne.expandByObject(A);const ua=`urdf_${Date.now()}`;A.userData.boundingBox=ne.clone(),A.userData.modelId=ua,xs.set(ua,{box:ne.clone(),center:ne.getCenter(new Fl.Vector3),size:ne.getSize(new Fl.Vector3),maxSize:Math.max(...ne.getSize(new Fl.Vector3).toArray())}),yo.value=A,console.log("URDF模型加载完成并优化")}catch(ne){console.error("URDF加载失败:",ne),yo.value=void 0}finally{de&&URL.revokeObjectURL(de)}break;default:throw new Error(`不支持的文件格式: ${d}`)}return A};return{addModelsFromUrls:m,loadModelByDefaultPath:async d=>{console.log(d);try{n.value=!0,r.value="正在加载模型...";const{scene:N}=a();if(!N)throw new Error("Scene not initialized");i(),await new Promise(J=>setTimeout(J,100));const _=[];for(let J=0;J<d.length;J++){const A=d[J],F=await g(A.suffix,A.blob,A.mtlBlobs||[],A.meshFiles||[]);F&&(N.add(F),l.value.push(F),_.push(F))}return n.value=!1,r.value="",_}catch(N){throw console.error("加载模型失败:",N),n.value=!1,r.value="",N}},urdfModel:yo,modelBoundingBoxes:xs}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(a=>{var l=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var r,i,o,f,c,u=function(w,d){d.parentNode.insertBefore(w,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(w){console&&console.log(w)}}r=function(){var w,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,(w=document.body).firstChild?u(d,w.firstChild):w.appendChild(d))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),r()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=r,f=a.document,c=!1,g(),f.onreadystatechange=function(){f.readyState=="complete"&&(f.onreadystatechange=null,m())})}function m(){c||(c=!0,o())}function g(){try{f.documentElement.doScroll("left")}catch{return void setTimeout(g,50)}m()}})(window);const r0=["onClick"],n0=e.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:""}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(null),o=e.ref(null),f=k=>{var x,O,I,W;let y={};if(k!=null&&k.find(Y=>Y==null?void 0:Y.includes("@TextSize"))){let Y=(O=(x=k==null?void 0:k.find(fe=>fe==null?void 0:fe.includes("@TextSize")))==null?void 0:x.split("="))==null?void 0:O[1];y.fontSize=`${Y}px`}if(k!=null&&k.find(Y=>Y==null?void 0:Y.includes("@TextRGBA"))){let Y=(W=(I=k==null?void 0:k.find(fe=>fe==null?void 0:fe.includes("@TextRGBA")))==null?void 0:I.split("="))==null?void 0:W[1];y.color=le.rgbaToColor(Y)}return y},c=e.computed(()=>{const k=Number(n==null?void 0:n.textSize),y=le.rgbaToColor(n==null?void 0:n.textColor),x={},O={};return!Number.isNaN(k)&&k&&(x.fontSize=`${k}px`,O.fontSize=`${k}px`),y&&(x.color=y,O.color=y),{label:x,value:O}}),u=e.ref(""),m=e.ref(""),g=e.ref(!1),w=async k=>{if(k){m.value&&(URL.revokeObjectURL(m.value),m.value="");try{const y=await M.platformDownloadFile({url:k}),x=new Blob([y==null?void 0:y.data],{type:(y==null?void 0:y.headers["content-type"])||"image/*"});m.value=URL.createObjectURL(x)}catch{m.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(u.value=k)},{immediate:!0}),e.watch(u,k=>{w(k)},{immediate:!0});const d=()=>{var k;(k=o.value)==null||k.click()},N=async k=>{var O,I,W;const y=k.target,x=(O=y==null?void 0:y.files)==null?void 0:O[0];if(!x){y.value="";return}g.value=!0;try{const Y=new FormData;Y.append("file",x);const fe=await M.platformUploadFile(Y),de=(W=(I=fe==null?void 0:fe.data)==null?void 0:I.result)==null?void 0:W.url;de?(u.value=de,r("update:backGroundImage",de),w(de),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{g.value=!1,y.value=""}},_=e.computed(()=>{var k;return m.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(k=n==null?void 0:n.backgroundUrl)==null?void 0:k.replace(/\\/g,"/")}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),J=k=>pl.getComponent(k),A=k=>{if(!k)return;const y=k.querySelector("input, textarea, .el-input__inner");y&&typeof y.focus=="function"&&y.focus()},F=(k,y,x)=>{n.disabled||k.field&&(i.value=y,e.nextTick(()=>{A(x.currentTarget)}))},L=()=>{i.value=null},E=k=>{var x;const y=((x=k==null?void 0:k.field)==null?void 0:x.value)??(k==null?void 0:k.value);return y==null||y===""?"-":y},S=k=>{var W,Y,fe,de;const y=k!=null&&k.width&&k.width>0?k.width:1,O=`calc((100% - ${(y-1)*16}px) / ${y})`;let I;return(W=k==null?void 0:k.filters)!=null&&W.find(j=>j==null?void 0:j.includes("@TextBackRGBA"))&&(I=(de=(fe=(Y=k==null?void 0:k.filters)==null?void 0:Y.find(j=>j==null?void 0:j.includes("@TextBackRGBA")))==null?void 0:fe.split("="))==null?void 0:de[1],I=le.rgbaToColor(I)),{flex:`0 0 ${O}`,maxWidth:O,minWidth:"140px",boxSizing:"border-box",background:I}};return(k,y)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(_.value),onClick:y[2]||(y[2]=x=>(n==null?void 0:n.backGround)&&d())},[n!=null&&n.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:y[0]||(y[0]=e.withModifiers(x=>d(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:o,type:"file",accept:"image/*",style:{display:"none"},onChange:N},null,544),y[3]||(y[3]=e.createElementVNode("img",{src:pl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.items,(x,O)=>{var I,W,Y,fe,de,j,U,Z;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:O,style:e.normalizeStyle(S(x)),onClick:y[1]||(y[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle({...c.value.label,...f(x==null?void 0:x.filters)})},e.toDisplayString(x==null?void 0:x.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(c.value.value),onClick:ee=>{var ge;return(ge=x.field)!=null&&ge.isNoClick?null:F(x,O,ee)}},[i.value===O&&x.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(J(((I=x.field)==null?void 0:I.type)??"Input")),{key:0,modelValue:x.field.value,"onUpdate:modelValue":ee=>x.field.value=ee,isEdit:!0,disabled:(W=x.field)==null?void 0:W.disabled,content:((Y=x.field)==null?void 0:Y.contents)??[],optionUrl:x.field,originalValue:(fe=x.field)==null?void 0:fe.value,config:(de=x.field)==null?void 0:de.config,configModel:((j=x.field)==null?void 0:j.prop)??((U=x.field)==null?void 0:U.name),selectedTagList:((Z=x.field)==null?void 0:Z.selectValue)??[],onBlur:L,onBlurChange:L},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(E(x)),1)],64))],12,r0)],4)}),128))],4))}}),i0=nr._export_sfc(n0,[["__scopeId","data-v-be923b14"]]),bc=M.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),o0={class:"calculator-content"},t0={class:"calculator-child"},s0={class:"calculator-child"},c0=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),n=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(r,i)=>(e.openBlock(),e.createElementBlock("div",o0,[e.createElementVNode("div",t0,[e.createVNode(pl.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",s0,[e.createVNode(pl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),u0=nr._export_sfc(c0,[["__scopeId","data-v-73db0fe7"]]),Et=(a,l)=>{let n=a,r=l;return Array.isArray(n)&&(n=n==null?void 0:n.map((i,o)=>{if(Array.isArray(i)){let f={};return i=i==null?void 0:i.forEach((c,u)=>{var m;(m=r==null?void 0:r[u])!=null&&m.prop?f[r[u].prop]=c:Array.isArray(c)&&(f.children=Et(c,r))}),Object.assign(f,{id:o})}else return i})),n},kc=(a,l,n)=>{let r=a,i=l;return r=r==null?void 0:r.map((o,f)=>{var c,u;return!Array.isArray(o)||!((c=i==null?void 0:i[f])!=null&&c.label)&&!n||(o.unshift(((u=i==null?void 0:i[f])==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=kc(m,(g=i==null?void 0:i[f])==null?void 0:g.children,n)),m}))),o}),r},d0=(a,l,n)=>{if(l==="")return a==null?void 0:a.filter(r=>(r==null?void 0:r.id)!==n);{const r=l.split("-");return p0(a,r,n)}},p0=(a,l,n)=>{let r=a,i=l;return(i==null?void 0:i.length)===0?r=r==null?void 0:r.filter(o=>o.id!==n):r=r==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=xc(o,i,n)),o)),r},xc=(a,l,n)=>{var o,f;let r=a,i=l;return(i==null?void 0:i.length)===0?r.children=(o=r.children)==null?void 0:o.filter(c=>c.id!==n):r.children=(f=r.children)==null?void 0:f.map(c=>(c.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),c=xc(c,i,n)),c)),r},f0=(a,l,n)=>{if(l==="")return n;{const r=l.split("-");return h0(a,r,n)}},h0=(a,l,n)=>{let r=a,i=l;return(i==null?void 0:i.length)===0?r=n:r=r==null?void 0:r.map(o=>(o.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),o=wc(o,i,n)),o)),r},wc=(a,l,n)=>{var o;let r=a,i=l;return(i==null?void 0:i.length)===0?r.children=n:r.children=(o=r.children)==null?void 0:o.map(f=>(f.id.toString()===(i==null?void 0:i[0])&&(i==null||i.shift(),f=wc(f,i,n)),f)),r};class v0{constructor(l={}){dn(this,"url");dn(this,"heartbeatInterval");dn(this,"socket",null);dn(this,"isConnected",!1);dn(this,"heartTimer",null);dn(this,"canvas",null);dn(this,"ctx",null);dn(this,"mainCamCutMode",0);dn(this,"pMainShowStartX",0);dn(this,"pMainShowStartY",0);dn(this,"onLog");dn(this,"onDevCount");dn(this,"onResolution");dn(this,"onCameraStatus");dn(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,n,r){var f;(f=this.canvas)!=null&&f.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const i=document.createElement("canvas");i.style.border="solid 1px #A0A0A0",i.id="MainCamCanvas",i.width=n,i.height=r;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,n)=>{const r=new WebSocket(this.url);r.binaryType="arraybuffer",r.onopen=()=>{this.socket=r,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},r.onerror=i=>{this.isConnected=!1,this.log("socket.onerror"),n(i)},r.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},r.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 n=l.find(i=>i.width===2592&&i.height===1944);return n||[...l].sort((i,o)=>o.width*o.height-i.width*i.height)[0]||null}openCamera(l=0,n=1280,r=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]=n>>8&255,i[9]=n&255,i[10]=r>>8&255,i[11]=r&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 n;(n=this.onLog)==null||n.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var i,o,f,c,u,m;const n=new Uint8Array(l.data);if(n.length<=0)return;if(n[0]===17&&n[1]===17&&n[2]===17){this.log("heart socket!!!!");return}if(n[0]!==85||n[1]!==102)return;const r=n[2];if(r===80){const g=n[3],w=n.length-4,d=new Uint8Array(w);for(let J=0;J<w;J++)d[J]=n[4+J];const _=decodeURIComponent(this.byteToString(d)).split("|");(i=this.onDevCount)==null||i.call(this,g,_);return}if(r===81){const g=n[3]||0,w=[];for(let d=0;d<g;d++){const N=(n[4+d*4+0]||0)*256+(n[4+d*4+1]||0),_=(n[4+d*4+2]||0)*256+(n[4+d*4+3]||0);w.push({width:N,height:_,text:`${N}*${_}`})}(o=this.onResolution)==null||o.call(this,g,w);return}if(r===1){n[3]===1&&((f=this.onCameraStatus)==null||f.call(this,"opened")),n[3]===3&&((c=this.onCameraStatus)==null||c.call(this,"closed"));return}if(r===16){if(n[3]===1){const w=n[4]*256+n[5],d=n[6]*65536+n[7]*256+n[8];let N="";if(w>0){const A=new Uint8Array(w);for(let F=0;F<w;F++)A[F]=n[9+F];N=decodeURIComponent(this.byteToString(A))}const _=new Uint8Array(d);for(let A=0;A<d;A++)_[A]=n[9+w+A];const J=this.uint8ArrayToString(_);(u=this.onPhoto)==null||u.call(this,{flag:0,imgPath:N,base64:J})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(r===204){if(!this.canvas||!this.ctx)return;const g=n[3]*256+n[4],w=n[5]*256+n[6];this.pMainShowStartX=n[7]*256+n[8],this.pMainShowStartY=n[9]*256+n[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const d=this.ctx.createImageData(g,w);let N=11;for(let _=0;_<d.data.length;_+=4)d.data[_+0]=n[N],d.data[_+1]=n[N+1],d.data[_+2]=n[N+2],d.data[_+3]=255,N+=3;this.ctx.putImageData(d,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}byteToString(l){let n="";for(let r=0;r<l.length;r++)n+=String.fromCharCode(l[r]);return n}}const m0={style:{display:"flex",gap:"16px",height:"100%"}},y0={key:0,style:{color:"var(--el-text-color-secondary)"}},g0={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},b0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},k0={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"}},x0={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},w0={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},_0=["src","onClick"],S0=["onClick"],E0={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},C0={class:"dialog-footer"},D0=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(null),o=e.ref(!1),f=e.ref([]),c=e.ref(""),u=e.ref(!1),m=e.ref([]),g=new v0({url:"ws://127.0.0.1:22225"});function w(I,W){var Z;const Y=I.split(","),fe=((Z=Y[0].match(/:(.*?);/))==null?void 0:Z[1])??"image/jpeg",de=atob(Y[1]);let j=de.length;const U=new Uint8Array(j);for(;j--;)U[j]=de.charCodeAt(j);return new File([U],W,{type:fe})}function d(){g.onLog=I=>{console.log("[GPY]",I)},g.onDevCount=(I,W)=>{if(c.value+=`设备数量=${I},设备=${W.join(",")}
4
4
  `,I>0){c.value+=`检测到设备,正在获取分辨率...
5
5
  `;try{g.getResolution(0)}catch(Y){c.value+=`获取分辨率失败:${(Y==null?void 0:Y.message)??Y}
6
6
  `}}else c.value+=`未检测到高拍仪设备!
@@ -20,7 +20,7 @@
20
20
  `,g.getDevCount()},_=()=>{try{g.destroy()}catch(I){console.error(I)}o.value=!1,f.value=[],c.value="",u.value=!1,m.value=[]};e.watch(()=>n.visible,I=>{I?N():_()});const J=()=>{try{g.bestSize()}catch(I){console.error(I)}},A=()=>{try{g.rotateLeft()}catch(I){console.error(I)}},F=()=>{try{g.rotateRight()}catch(I){console.error(I)}},L=()=>{try{g.focus()}catch(I){console.error(I)}},E=()=>{c.value+=`正在拍照...
21
21
  `;try{g.photo()}catch(I){c.value+=`拍照调用失败:${(I==null?void 0:I.message)??I}
22
22
  `}},S=()=>{f.value.length>0?r("confirm",f.value.map(I=>I.file)):r("confirm",[])},k=I=>{I<0||I>=f.value.length||(f.value.splice(I,1),c.value+=`已删除一张图片(剩余 ${f.value.length} 张)
23
- `)},y=I=>{if(!I)return;const W=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:W,blobUrl:I}],u.value=!0},x=()=>{u.value=!1},O=()=>{_(),r("cancel")};return(I,W)=>{const Y=e.resolveComponent("el-input"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ir.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:O,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",m0,[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",y0,"初始化摄像头..."))],512),e.createElementVNode("div",g0,[e.createElementVNode("div",b0,[W[0]||(W[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",k0,[f.value.length===0?(e.openBlock(),e.createElementBlock("div",x0,"暂无图片")):(e.openBlock(),e.createElementBlock("div",w0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(de,j)=>(e.openBlock(),e.createElementBlock("div",{key:de.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:de.url,onClick:U=>y(de.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,_0),e.createElementVNode("div",{onClick:U=>k(j),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,S0)]))),128))]))],512)]),e.createElementVNode("div",E0,[W[1]||(W[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Y,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",C0,[e.createVNode(fe,{onClick:J,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[2]||(W[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(fe,{onClick:A,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[3]||(W[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(fe,{onClick:F,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[4]||(W[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(fe,{onClick:L,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[5]||(W[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(fe,{onClick:E,disabled:!o.value,id:"themeButton"},{default:e.withCtx(()=>W[6]||(W[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),W[9]||(W[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(fe,{onClick:S,disabled:f.value.length===0,id:"themeButton"},{default:e.withCtx(()=>W[7]||(W[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(fe,{onClick:O,id:"themeBorderButton"},{default:e.withCtx(()=>W[8]||(W[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),u.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:x},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),T0=nr._export_sfc(D0,[["__scopeId","data-v-24a2050a"]]),_s=M.useMenuState(M.pinia);let Ni="$R";const B0=async a=>{var o,f,c,u,m,g;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(o=l==null?void 0:l[0])==null?void 0:o.url,i="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){_s.setContentLoading(!0);const w=await M.platformDownloadFile({url:r});let d=w==null?void 0:w.data;const N=new FormData;N.append("file",d,((f=l==null?void 0:l[0])==null?void 0:f.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),N.append("query",n);let _=await cc(N);_=(g=(m=(u=_==null?void 0:_.data)==null?void 0:u.data)==null?void 0:m.response)==null?void 0:g.replace("generateResult",a==null?void 0:a.函数名称),i=_,_s.setContentLoading(!1)}return i},N0=a=>{var n,r;if(a==="")return;let l=a;return l=(r=(n=l==null?void 0:l.replace("(",Ni))==null?void 0:n.split(Ni))==null?void 0:r[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,w;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 f=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=(w=(g=o==null?void 0:o.replace("(",Ni))==null?void 0:g.split(Ni))==null?void 0:w[1],o="("+o,o=le.calculatorAndToOr(o),{key:f,content:o}}),l},Ss=(a,l)=>{let n=[l];return a==null||a.forEach(r=>{for(let i in r)r[i]!=="!"?n=n==null?void 0:n.filter(o=>{var f;return(o==null?void 0:o[i])===(r==null?void 0:r[i])||(o==null?void 0:o[(f=Object.keys(o))==null?void 0:f.find(c=>c==null?void 0:c.includes("."+i))])===(r==null?void 0:r[i])}):n=n==null?void 0:n.filter(o=>{var f;return(o==null?void 0:o[i])!==(r==null?void 0:r[i])&&(o==null?void 0:o[(f=Object.keys(o))==null?void 0:f.find(c=>c==null?void 0:c.includes("."+i))])!==(r==null?void 0:r[i])})}),n},Ot=M.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),A0=M.useModelComp(M.pinia),{extraContents:qv}=M.storeToRefs(A0),z0=M.useLoginState(M.pinia),{extraUrl:hi}=M.storeToRefs(z0);let Sc=hi.value===""||!hi.value?"http://139.196.154.85:20015":hi.value;e.watch(()=>hi.value,()=>{Sc=hi.value===""||!hi.value?"http://139.196.154.85:20015":hi.value},{deep:!0,immediate:!0});const Bo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},Es={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:Sc+"/api/public/paddleOCR"};class M0{constructor(l){dn(this,"config");this.config={...Es,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Ja.Local.get(Ja.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),i=this.buildOCRRequest(l,n),o=this.config.apiUrl||Es.apiUrl||"";return(await Ja.axios.post(o,i,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return Bo[l]?Bo[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,i=f=>{const c=f==null?void 0:f.label;return!(!c||c==="操作"||c===this.config.columnName||(f==null?void 0:f.type)==="operate"||(f==null?void 0:f.prop)==="operate")},o=f=>{(f||[]).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(!r.has(m)){r.add(m);const g=this.getFieldAliases(m);n.push(g)}}})};return o(l||[]),n}}function Ec(a){return new M0(a)}Ec();const Ct=async(a,l)=>{var f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y;let n=(c=(f=M.cloneDeep(a))==null?void 0:f.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(x=>{});let i="",o=await le.menuToParent(n);if(o==null||o.forEach(x=>{var O,I,W,Y;(x==null?void 0:x.name)===(((Y=(W=(I=(O=M.cloneDeep(a))==null?void 0:O.optionUrl)==null?void 0:I.groupSelect)==null?void 0:W[0])==null?void 0:Y.replaceAll("'",""))??"")&&(i=x==null?void 0:x.id)}),l){i=l;const x=await qr.getInsofDataApi({id:i}),O=(w=(g=(m=(u=x==null?void 0:x.data)==null?void 0:u.result)==null?void 0:m[0])==null?void 0:g.key)==null?void 0:w.pageKey;o=await le.getItemData(O,sessionStorage.getItem("systemKey"),"")}if(i!==""){let x;l?x=(d=o==null?void 0:o.find(W=>(W==null?void 0:W.id)===l))==null?void 0:d.compData:x=(N=o==null?void 0:o.find(W=>{var Y,fe,de,j;return(W==null?void 0:W.name)===(((fe=(Y=a==null?void 0:a.groupSelect)==null?void 0:Y.split(":"))==null?void 0:fe[0])||((j=(de=a==null?void 0:a.optionUrl)==null?void 0:de.groupSelect)==null?void 0:j[0]))}))==null?void 0:N.compData;let O=(J=(_=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:_.contents)==null?void 0:J.map(W=>W==null?void 0:W.label);(F=(A=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:A.contents)!=null&&F.every(W=>Array.isArray(W))&&(O=(S=le.getColumnChild((E=(L=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0]))==null?void 0:S.map(W=>W==null?void 0:W.prop));let I=(y=(k=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:y.map(W=>{if(Array.isArray(W))W=W==null?void 0:W.filter(Y=>!(Y!=null&&Y.id));else{let Y={};for(let fe in W)fe!=="id"&&(Y[fe]=W==null?void 0:W[fe]);W=Y}return W});I==null||I.forEach(W=>{Array.isArray(W)?r.push(le.getValueToObjectValue(W,O)):r.push(W)})}return r},I0=M.useMenuState(M.pinia),{activeMenuPath:Wv}=M.storeToRefs(I0),O0=M.useUnit(M.pinia),{chooseTitle:Gv}=M.storeToRefs(O0),L0="col-operate",Cc=a=>`${L0}-${a}`,R0=(a,l)=>{const n=new Map;a.forEach(i=>{const{prop:o}=i;n.set(o,i)});const r=i=>{Array.isArray(i)&&i.forEach(o=>{const{prop:f}=o||{},c=n.get(f);$0(c,o),Array.isArray(o==null?void 0:o.children)&&o.children.length>0&&r(o.children)})};return r(l),l},$0=(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),V0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:i=!1,operable:o=!1,fixed:f=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:i,operable:o,fixed:f}},F0=async a=>{var o,f;if(!a)return;const l=Cc(a),n=await qr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(o=n==null?void 0:n.data)==null?void 0:o.code,i=(f=n==null?void 0:n.data)==null?void 0:f.result;if(r==200)return i==null?void 0:i[0]},P0=async a=>{if(a)return[]},j0=async(a,l)=>{if(!a||!l)return;const n=Cc(a);return await qr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},H0=async(a,l)=>!a||!l?void 0:await qr.updateInsofDataApi({id:a,value:{columns:l}}),Cs=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await F0(a);return r?await H0(r==null?void 0:r.id,l):await j0(a,l)};var _o={exports:{}},U0=_o.exports,Ds;function q0(){return Ds||(Ds=1,function(a,l){(function(n,r){r()})(U0,function(){function n(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 r(m,g,w){var d=new XMLHttpRequest;d.open("GET",m),d.responseType="blob",d.onload=function(){u(d.response,g,w)},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 f=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=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=f.saveAs||(typeof window!="object"||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,g,w){var d=f.URL||f.webkitURL,N=document.createElement("a");g=g||m.name||"download",N.download=g,N.rel="noopener",typeof m=="string"?(N.href=m,N.origin===location.origin?o(N):i(N.href)?r(m,g,w):o(N,N.target="_blank")):(N.href=d.createObjectURL(m),setTimeout(function(){d.revokeObjectURL(N.href)},4e4),setTimeout(function(){o(N)},0))}:"msSaveOrOpenBlob"in navigator?function(m,g,w){if(g=g||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,w),g);else if(i(m))r(m,g,w);else{var d=document.createElement("a");d.href=m,d.target="_blank",setTimeout(function(){o(d)})}}:function(m,g,w,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof m=="string")return r(m,g,w);var N=m.type==="application/octet-stream",_=/constructor/i.test(f.HTMLElement)||f.safari,J=/CriOS\/[\d]+/.test(navigator.userAgent);if((J||N&&_||c)&&typeof FileReader<"u"){var A=new FileReader;A.onloadend=function(){var E=A.result;E=J?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=E:location=E,d=null},A.readAsDataURL(m)}else{var F=f.URL||f.webkitURL,L=F.createObjectURL(m);d?d.location=L:location.href=L,d=null,setTimeout(function(){F.revokeObjectURL(L)},4e4)}});f.saveAs=u.saveAs=u,a.exports=u})}(_o)),_o.exports}q0();const li=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}}}),W0=M.useLoginState(M.pinia),{loginUserInfo:yt}=M.storeToRefs(W0),G0=async a=>{var r,i,o;let l=await M.getAllTables({platId:parseInt((r=yt==null?void 0:yt.value)==null?void 0:r.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 bc(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}]}]},K0=M.useLoginState(),{loginUserInfo:vl}=M.storeToRefs(K0);let go="$R";const jr=M.useModelComp(M.pinia),Dc=e.ref(!1),{itemData:Y0,itemGridData:pi,curStructureCompIds:Ts,isSubmitCurStructure:J0,routeToChildPath:X0,pageMapState:Dt,itemExtendData:bo,refreshTable:Bs,refreshCurrentPageInform:Z0}=M.storeToRefs(jr),$o=li(M.pinia),Xr=M.useMenuState(M.pinia),mr=e.shallowRef([]),{asideMenus:Q0,activeTopMenuPath:e3,activeMenuPath:Sl,platform:Kv,buttonTriggerType:a3,currentMenuPath:kn}=M.storeToRefs(Xr),Sn=M.useUnit(M.pinia),{selectTitle:Qn,chooseTitle:No}=M.storeToRefs(Sn);e.ref();const Li=e.ref(!0),ai=e.ref(0),Tt=e.ref([]);e.ref(!1);const Lt=e.ref(!1),Zi=e.ref(),Tc=e.ref(),Bc=e.ref(),l3=()=>{jr.setItemGridData([]),jr.setIsEdit("edit"),jr.setSubmitCurStructure(Sl.value!=="/平台管理/菜单管理")},r3=()=>{jr.setIsEdit("view"),jr.setRefreshCurStructure(!0)},n3=async a=>{var i;let l=Qn.value,n=l==null?void 0:l.findIndex(o=>(o==null?void 0:o.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((o,f)=>f<=n);Sn.setSelectTitle(pl.safeClone(r)),r=(i=r==null?void 0:r.map(o=>o==null?void 0:o.value))==null?void 0:i.join("/"),Xr.setActiveMenuPath(null),Xr.setActiveMenuPath(r)},gt=async(a,l,n,r="contentConfig")=>{var i;try{if(!Array.isArray(a))return;let o,f;l==="create"?(o={dataList:a==null?void 0:a.map(u=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...u,compData:(m=u==null?void 0:u.compData)==null?void 0:m.filter(g=>(g==null?void 0:g.key)!=="tableContents")}}}})},f=qr.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")}}}})},f=qr.batchUpdateInsofDataApi):l==="delete"&&(o={ids:a},f=qr.batchDeleteInsofDataApi);const c=await f(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("保存响应失败")}},Ns=async(a,l,n,r)=>{var i,o,f,c,u,m,g,w,d,N,_;try{const J=(o=(i=a==null?void 0:a.results)==null?void 0:i.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:o.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:k}})),A=(c=(f=a==null?void 0:a.results)==null?void 0:f.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:c.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),F=JSON.parse(JSON.stringify(a)),L=(u=F==null?void 0:F.results)==null?void 0:u.map(k=>k.id);let E;n?E=(w=(g=(m=Dt.value)==null?void 0:m[Sl.value])==null?void 0:g.filter(k=>{var y,x,O;return((y=k==null?void 0:k.key)==null?void 0:y.type)===l&&((O=(x=k==null?void 0:k.key)==null?void 0:x.relatedInfo)==null?void 0:O.target)===r}))==null?void 0:w.map(k=>k==null?void 0:k.id):E=(_=(N=(d=Dt.value)==null?void 0:d[Sl.value])==null?void 0:N.filter(k=>{var y;return((y=k==null?void 0:k.key)==null?void 0:y.type)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id);const S=E==null?void 0:E.filter(k=>!(L!=null&&L.includes(k))&&typeof k=="number");(J==null?void 0:J.length)>0&&await qr.batchAddInsofDataApi({dataList:J}),(A==null?void 0:A.length)>0&&await qr.batchUpdateInsofDataApi({dataList:A}),(S==null?void 0:S.length)>0&&await qr.batchDeleteInsofDataApi({ids:S})}catch(J){throw new Error(J)}},i3=async a=>{var m,g,w,d,N,_,J,A,F,L;Xr.setContentLoading(!0);const l=JSON.parse(JSON.stringify(Y0.value));if(!J0.value)return Xr.setCacheStructures({key:a3.value,data:l}),Ja.ElMessage.success("已暂存");const n=l==null?void 0:l.map(E=>E.id),r=n.filter(E=>{var S;return!((S=Ts.value)!=null&&S.includes(E))}),i=(m=Ts.value)==null?void 0:m.filter(E=>!n.includes(E)),o=[...r,...i].filter(E=>typeof E!==null&&typeof E<"u"),f=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(gt(o,"delete",a)),f&&(f==null?void 0:f.length)>0&&u.push(gt(f,"create",a)),c&&(c==null?void 0:c.length)>0&&u.push(gt(c,"update",a)),pi.value&&((g=pi.value)!=null&&g.isDelete&&((d=(w=pi.value)==null?void 0:w.results)==null?void 0:d.length)>0&&((_=(N=pi.value)==null?void 0:N.results)!=null&&_.every(E=>typeof E=="number"))?await qr.batchDeleteInsofDataApi({ids:(J=pi.value)==null?void 0:J.results}):(console.log("itemGridData.value",pi.value),u.push(await Ns(pi.value,"gridLayout")))),bo.value)for(const E in bo.value)u.push(await Ns((A=bo.value)==null?void 0:A[E],"extend",{target:E,compId:(L=(F=bo.value)==null?void 0:F[E])==null?void 0:L.compId},E));await Promise.all(u).then(()=>{Ja.ElMessage.success("保存成功"),jr.setRefreshCurStructure(!0)}).catch(E=>{Ja.ElMessage.success(E)}),Xr.setContentLoading(!1)},Qi=a=>Ri(a),o3=e.computed(()=>{var a;return(a=mr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Nc=e.computed(()=>{var a;return(a=mr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Ac=e.ref(0),zc=e.ref(null),t3="ocr_committed_temp_ids_v1",s3=(a,l)=>`${t3}:${String(a??"")}:${String(l??"")}`,c3=(a,l,n)=>{try{const r=s3(a,l),i=sessionStorage.getItem(r),o=i?JSON.parse(i):[],f=Array.isArray(o)?o:[],c=Array.from(new Set([...f,...n||[]].map(u=>String(u)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},Ao=async(a,l="data",n)=>{var i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br;let r=((f=(o=(i=Qn.value)==null?void 0:i.filter(ya=>(ya==null?void 0:ya.condition)==="child"))==null?void 0:o[0])==null?void 0:f.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let ya=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(sl=>{let ha={};for(let Ha in sl)Array.isArray(sl==null?void 0:sl[Ha])?ha[Ha]=JSON.stringify(sl==null?void 0:sl[Ha]):ha[Ha]=sl==null?void 0:sl[Ha];return ha});if(ya!=null&&ya.every(sl=>sl==null?void 0:sl.menuPathContent)){let sl=(u=ya==null?void 0:ya[0])==null?void 0:u.menuPathContent;ya=ya==null?void 0:ya.map(ia=>(ia.id="0",ia==null||delete ia.menuPathContent,ia)),(sl==null?void 0:sl[0])==="$"&&(sl=sl==null?void 0:sl.slice(1,sl==null?void 0:sl.length));let ha=(m=le.analyzeSplitToContent(sl,"*"))==null?void 0:m[0],Ha=(g=le.analyzeSplitToContent(sl,"*"))==null?void 0:g[1];ha=ha==null?void 0:ha.slice(0,(ha==null?void 0:ha.length)-1),ha=(w=le.analyzeSplitToContent(ha,":"))==null?void 0:w.map(ia=>{var Pa,Be,La,al,bl;if((ia==null?void 0:ia[(ia==null?void 0:ia.length)-1])===":"&&(ia=ia==null?void 0:ia.slice(0,(ia==null?void 0:ia.length)-1)),(ia==null?void 0:ia[0])==="{"){ia=ia==null?void 0:ia.slice(1,(ia==null?void 0:ia.length)-1),(ia==null?void 0:ia[0])==="*"&&(ia=ia==null?void 0:ia.slice(1,ia==null?void 0:ia.length));let Tl=ia==null?void 0:ia.split(":"),Oe=Tl==null?void 0:Tl[0],ma=Tl==null?void 0:Tl[1];ma=ma==null?void 0:ma.slice(1,(ma==null?void 0:ma.length)-1);let ta=(Pa=mr.value)==null?void 0:Pa.filter(xa=>(xa==null?void 0:xa.name)===Oe);ta=ta==null?void 0:ta[0],ta=(bl=(al=(La=(Be=ta==null?void 0:ta.compData)==null?void 0:Be.find(xa=>(xa==null?void 0:xa.key)==="tableContents"))==null?void 0:La.contents)==null?void 0:al[0])==null?void 0:bl[ma],ia=ta}return ia}),ha=ha==null?void 0:ha.join("/");let ra=await M.getPageDataApi({platId:parseInt((d=vl==null?void 0:vl.value)==null?void 0:d.plat_id),pageName:"menu"});ra=(N=ra==null?void 0:ra.data)==null?void 0:N.result,ra=ra==null?void 0:ra.find(ia=>(ia==null?void 0:ia.object_name)===ha&&(ia==null?void 0:ia.property_name)===Ha);let Ga=(ra==null?void 0:ra.object_id)??"";if(Ga===""){Ja.ElMessage.warning("添加页面数据不存在");return}let wl=[{tableName:"content_"+Ga,tableContents:ya}];await M.pageBatchAddApi({platId:parseInt((_=vl==null?void 0:vl.value)==null?void 0:_.plat_id),changeContents:wl});let De=[];wl==null||wl.forEach(ia=>{var Pa;(Pa=ia==null?void 0:ia.tableContents)==null||Pa.forEach(Be=>{De.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Be),request_result:"{}",is_delete:!1,request_table:ia==null?void 0:ia.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((J=vl==null?void 0:vl.value)==null?void 0:J.plat_id),changeContents:[{tableName:"log",tableContents:De}]})}else{let sl=await M.quoteApi({platId:parseInt((A=vl==null?void 0:vl.value)==null?void 0:A.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});sl=(F=sl==null?void 0:sl.data)==null?void 0:F.result,sl=sl==null?void 0:sl.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let ha=sl==null?void 0:sl.map(De=>{var La,al;let ia={},Pa=ya==null?void 0:ya[0],Be;return Array.isArray((La=De==null?void 0:De.struct)==null?void 0:La[0])?Be=le.getColumnChild((al=De==null?void 0:De.struct)==null?void 0:al[0]):Be=De==null?void 0:De.struct,Be=Be==null?void 0:Be.filter(bl=>(bl==null?void 0:bl.prop)!=="relatedId"),Be==null||Be.forEach(bl=>{var Tl,Oe;ia[bl.prop]=((Tl=bl==null?void 0:bl.words)!=null&&Tl[0]?(Pa==null?void 0:Pa[(Oe=bl==null?void 0:bl.words)==null?void 0:Oe[0]])??(Pa==null?void 0:Pa[bl==null?void 0:bl.prop]):Pa==null?void 0:Pa[bl==null?void 0:bl.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ia]}}),Ha=[{tableName:(L=a==null?void 0:a.relatedContents)==null?void 0:L.find(De=>De==null?void 0:De.includes("content")),tableContents:ya}];Ha=[...Ha,...ha];let ra=await M.quoteApi({platId:parseInt((E=vl==null?void 0:vl.value)==null?void 0:E.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});ra=(k=(S=ra==null?void 0:ra.data)==null?void 0:S.result)==null?void 0:k.filter(De=>!(Ha!=null&&Ha.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(De==null?void 0:De.id)))),ra=ra==null?void 0:ra.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let Ga=ra==null?void 0:ra.map(De=>{var La,al,bl,Tl,Oe,ma,ta;let ia={},Pa=ya==null?void 0:ya[0],Be;return Array.isArray((La=De==null?void 0:De.struct)==null?void 0:La[0])?Be=le.getColumnChild((al=De==null?void 0:De.struct)==null?void 0:al[0]):Be=De==null?void 0:De.struct,Be=Be==null?void 0:Be.filter(xa=>(xa==null?void 0:xa.prop)!=="relatedId"),((Tl=(bl=Be==null?void 0:Be[0])==null?void 0:bl.words)!=null&&Tl[0]?Pa!=null&&Pa[(ma=(Oe=Be==null?void 0:Be[0])==null?void 0:Oe.words)==null?void 0:ma[0]]:Pa!=null&&Pa[(ta=Be==null?void 0:Be[0])==null?void 0:ta.prop])?(Be==null||Be.forEach(xa=>{var ga,fl;ia[xa.prop]=((ga=xa==null?void 0:xa.words)!=null&&ga[0]?(Pa==null?void 0:Pa[(fl=xa==null?void 0:xa.words)==null?void 0:fl[0]])??(Pa==null?void 0:Pa[xa==null?void 0:xa.prop]):Pa==null?void 0:Pa[xa==null?void 0:xa.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort):ia=void 0,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ia]}});Ga=Ga==null?void 0:Ga.filter(De=>{var ia;return!((ia=De==null?void 0:De.tableContents)!=null&&ia.every(Pa=>Pa===void 0))}),Ha=[...Ha,...Ga],await M.pageBatchAddApi({platId:parseInt((y=vl==null?void 0:vl.value)==null?void 0:y.plat_id),changeContents:Ha});let wl=[];Ha==null||Ha.forEach(De=>{var ia;(ia=De==null?void 0:De.tableContents)==null||ia.forEach(Pa=>{wl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Pa),request_result:"{}",is_delete:!1,request_table:De==null?void 0:De.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((x=vl==null?void 0:vl.value)==null?void 0:x.plat_id),changeContents:[{tableName:"log",tableContents:wl}]})}}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const ya=((a==null?void 0:a.ocrRows)||[]).map(ra=>ra==null?void 0:ra.id).filter(ra=>ra!=null),sl=((a==null?void 0:a.ocrRows)||[]).map(ra=>{const Ga={...ra};return delete Ga._isOCRRow,delete Ga._ocrTableId,Object.keys(Ga).forEach(wl=>{/(^|\.)证书附件$/.test(wl)&&Array.isArray(Ga[wl])&&(Ga[wl]=JSON.stringify(Ga[wl].map(De=>({url:(De==null?void 0:De.url)||"",name:(De==null?void 0:De.name)||(De==null?void 0:De.fileName)||"",fileName:(De==null?void 0:De.fileName)||(De==null?void 0:De.name)||""})).filter(De=>De.url||De.name)))}),Ga});let ha=[{tableName:(O=a==null?void 0:a.relatedContents)==null?void 0:O.find(ra=>ra==null?void 0:ra.includes("content")),tableContents:sl}];await M.pageBatchAddApi({platId:parseInt((I=vl==null?void 0:vl.value)==null?void 0:I.plat_id),changeContents:ha});let Ha=[];ha==null||ha.forEach(ra=>{var Ga;(Ga=ra==null?void 0:ra.tableContents)==null||Ga.forEach(wl=>{Ha.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wl),request_result:"{}",is_delete:!1,request_table:ra==null?void 0:ra.tableName,request_type:"ocrBatchAdd"})})}),await M.pageBatchAddApi({platId:parseInt((W=vl==null?void 0:vl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:Ha}]}),c3(a==null?void 0:a.parentTableId,a==null?void 0:a.index,ya)}if((a==null?void 0:a.buttonName)==="编辑"){const sl=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(Be=>{const La={...Be};return delete La._isOCRRow,delete La._ocrTableId,delete La._isTemp,delete La.tableEditType,delete La.index,La});let ha=sl==null?void 0:sl.map(Be=>{let La={};for(let al in Be)Array.isArray(Be==null?void 0:Be[al])?La[al]=JSON.stringify(Be==null?void 0:Be[al]):La[al]=Be==null?void 0:Be[al];return La}),Ha=await M.quoteApi({platId:parseInt((Y=vl==null?void 0:vl.value)==null?void 0:Y.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});Ha=(fe=Ha==null?void 0:Ha.data)==null?void 0:fe.result,Ha=Ha==null?void 0:Ha.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))});let ra=(de=ha==null?void 0:ha[0])==null?void 0:de.id,Ga=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(Be=>Be==null?void 0:Be.includes("content")),tableContents:ha}],wl=(U=Ha==null?void 0:Ha.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa,ga;return JSON.stringify(ta==null?void 0:ta.relatedId)!=="{}"&&(ta==null?void 0:ta.relatedId)!==""&&(ta!=null&&ta.relatedId)?(xa=ta==null?void 0:ta.relatedId)==null?void 0:xa.includes(parseInt(ra)):(ta==null?void 0:ta.sort)===((ga=ha==null?void 0:ha[0])==null?void 0:ga.sort)});if((La==null?void 0:La.length)>0){let ta=ha==null?void 0:ha[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var ml,Ne;xa[Ve.prop]=((ml=Ve==null?void 0:Ve.words)!=null&&ml[0]?(ga==null?void 0:ga[(Ne=Ve==null?void 0:Ve.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??""}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,delete xa.relatedId,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:U.filter(Be=>Be);Ga=[...Ga,...wl];let De=await M.quoteApi({platId:parseInt((Z=vl==null?void 0:vl.value)==null?void 0:Z.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});De=(ge=(ee=De==null?void 0:De.data)==null?void 0:ee.result)==null?void 0:ge.filter(Be=>!(Ga!=null&&Ga.find(La=>(La==null?void 0:La.tableName)==="content_"+(Be==null?void 0:Be.id)))),De=De==null?void 0:De.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))});let ia=(Ie=De==null?void 0:De.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa,ga,fl;return JSON.stringify(ta==null?void 0:ta.relatedId)!=="{}"&&(ta==null?void 0:ta.relatedId)!==""&&(ta!=null&&ta.relatedId)?(xa=ta==null?void 0:ta.relatedId)==null?void 0:xa.includes(parseInt(ra)):(ta==null?void 0:ta.sort)===((ga=ha==null?void 0:ha[0])==null?void 0:ga.sort)||(ta==null?void 0:ta.sort)===(parseInt(((fl=ha==null?void 0:ha[0])==null?void 0:fl.sort)??"0")+1).toString()});if((La==null?void 0:La.length)>0){let ta=ha==null?void 0:ha[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var ml,Ne,Pl,Da;((ml=Ve==null?void 0:Ve.words)!=null&&ml[0]?(ga==null?void 0:ga[(Ne=Ve==null?void 0:Ve.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga!=null&&ga[Ve==null?void 0:Ve.prop])&&(xa[Ve.prop]=((Pl=Ve==null?void 0:Ve.words)!=null&&Pl[0]?(ga==null?void 0:ga[(Da=Ve==null?void 0:Ve.words)==null?void 0:Da[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??"")}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,delete xa.relatedId,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:Ie.filter(Be=>Be);Ga=[...Ga,...ia],await M.pageBatchUpdateApi({platId:parseInt((ue=vl==null?void 0:vl.value)==null?void 0:ue.plat_id),changeContents:Ga});let Pa=[];Ga==null||Ga.forEach(Be=>{var La;(La=Be==null?void 0:Be.tableContents)==null||La.forEach(al=>{Pa.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(al),request_result:"{}",is_delete:!1,request_table:Be==null?void 0:Be.tableName,request_type:"update"})})}),await M.pageBatchAddApi({platId:parseInt((B=vl==null?void 0:vl.value)==null?void 0:B.plat_id),changeContents:[{tableName:"log",tableContents:Pa}]})}if((a==null?void 0:a.buttonName)==="删除"){let ya=[{tableName:(oe=a==null?void 0:a.relatedContents)==null?void 0:oe.find(De=>De==null?void 0:De.includes("content")),tableContents:a==null?void 0:a.fixContent}],sl=await M.quoteApi({platId:parseInt((q=vl==null?void 0:vl.value)==null?void 0:q.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});sl=(ye=sl==null?void 0:sl.data)==null?void 0:ye.result,sl=sl==null?void 0:sl.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let ha=(Ae=(Ke=a==null?void 0:a.fixContent)==null?void 0:Ke[0])==null?void 0:Ae.id,Ha=(Qe=sl==null?void 0:sl.map(De=>{var Pa,Be,La,al,bl,Tl;let ia=(Pa=De==null?void 0:De.contents)==null?void 0:Pa.filter(Oe=>{var ma,ta,xa;return JSON.stringify(Oe==null?void 0:Oe.relatedId)!=="{}"&&(Oe==null?void 0:Oe.relatedId)!==""&&(Oe!=null&&Oe.relatedId)?(ma=Oe==null?void 0:Oe.relatedId)==null?void 0:ma.includes(parseInt(ha)):(Oe==null?void 0:Oe.sort)===((xa=(ta=a==null?void 0:a.fixContent)==null?void 0:ta[0])==null?void 0:xa.sort)});if((ia==null?void 0:ia.length)>0){let Oe=(Be=a==null?void 0:a.fixContent)==null?void 0:Be[0];Oe={...Oe,id:(La=ia==null?void 0:ia[0])==null?void 0:La.id};let ma={},ta=Oe,xa;return Array.isArray((al=De==null?void 0:De.struct)==null?void 0:al[0])?xa=le.getColumnChild((bl=De==null?void 0:De.struct)==null?void 0:bl[0]):xa=De==null?void 0:De.struct,xa=xa==null?void 0:xa.filter(ga=>(ga==null?void 0:ga.prop)!=="relatedId"),xa==null||xa.forEach(ga=>{var fl,Ve;ma[ga.prop]=((fl=ga==null?void 0:ga.words)!=null&&fl[0]?(ta==null?void 0:ta[(Ve=ga==null?void 0:ga.words)==null?void 0:Ve[0]])??(ta==null?void 0:ta[ga==null?void 0:ga.prop]):ta==null?void 0:ta[ga==null?void 0:ga.prop])??""}),ma.id=(Tl=ia==null?void 0:ia[0])==null?void 0:Tl.id,delete ma.sort,delete ma.relatedId,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ma]}}else return}))==null?void 0:Qe.filter(De=>De);ya=[...ya,...Ha];let ra=await M.quoteApi({platId:parseInt((Ea=vl==null?void 0:vl.value)==null?void 0:Ea.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});ra=(ua=(ne=ra==null?void 0:ra.data)==null?void 0:ne.result)==null?void 0:ua.filter(De=>!(ya!=null&&ya.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(De==null?void 0:De.id)))),ra=ra==null?void 0:ra.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let Ga=(Pe=ra==null?void 0:ra.map(De=>{var Pa,Be,La,al,bl,Tl;let ia=(Pa=De==null?void 0:De.contents)==null?void 0:Pa.filter(Oe=>{var ma,ta,xa;return JSON.stringify(Oe==null?void 0:Oe.relatedId)!=="{}"&&(Oe==null?void 0:Oe.relatedId)!==""&&(Oe!=null&&Oe.relatedId)?(ma=Oe==null?void 0:Oe.relatedId)==null?void 0:ma.includes(parseInt(ha)):(Oe==null?void 0:Oe.sort)===((xa=(ta=a==null?void 0:a.fixContent)==null?void 0:ta[0])==null?void 0:xa.sort)});if((ia==null?void 0:ia.length)>0){let Oe=(Be=a==null?void 0:a.fixContent)==null?void 0:Be[0];Oe={...Oe,id:(La=ia==null?void 0:ia[0])==null?void 0:La.id};let ma={},ta=Oe,xa;return Array.isArray((al=De==null?void 0:De.struct)==null?void 0:al[0])?xa=le.getColumnChild((bl=De==null?void 0:De.struct)==null?void 0:bl[0]):xa=De==null?void 0:De.struct,xa=xa==null?void 0:xa.filter(ga=>(ga==null?void 0:ga.prop)!=="relatedId"),xa==null||xa.forEach(ga=>{var fl,Ve;ma[ga.prop]=((fl=ga==null?void 0:ga.words)!=null&&fl[0]?(ta==null?void 0:ta[(Ve=ga==null?void 0:ga.words)==null?void 0:Ve[0]])??(ta==null?void 0:ta[ga==null?void 0:ga.prop]):ta==null?void 0:ta[ga==null?void 0:ga.prop])??""}),ma.id=(Tl=ia==null?void 0:ia[0])==null?void 0:Tl.id,delete ma.sort,delete ma.relatedId,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ma]}}else return}))==null?void 0:Pe.filter(De=>De);ya=[...ya,...Ga],await M.pageBatchDeleteApi({platId:parseInt((Re=vl==null?void 0:vl.value)==null?void 0:Re.plat_id),changeContents:ya});let wl=[];ya==null||ya.forEach(De=>{var ia;(ia=De==null?void 0:De.tableContents)==null||ia.forEach(Pa=>{wl.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Pa),request_result:"{}",is_delete:!1,request_table:De==null?void 0:De.tableName,request_type:"delete"})})}),await M.pageBatchAddApi({platId:parseInt((Le=vl==null?void 0:vl.value)==null?void 0:Le.plat_id),changeContents:[{tableName:"log",tableContents:wl}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let ya=await M.getPageDataApi({platId:parseInt((se=vl==null?void 0:vl.value)==null?void 0:se.plat_id),pageName:"menu"});if(ya=(me=ya==null?void 0:ya.data)==null?void 0:me.result,ya!=null&&ya.find(sl=>(sl==null?void 0:sl.father_name)===Sl.value+"/")){Bc.value=a,Tc.value=ya==null?void 0:ya.filter(Ha=>(Ha==null?void 0:Ha.father_name)===Sl.value+"/");let sl=(ka=(qe=a==null?void 0:a.columns)==null?void 0:qe.find(Ha=>Ha==null?void 0:Ha.mainKey))==null?void 0:ka.prop,ha=(H=(_a=a==null?void 0:a.fixContent)==null?void 0:_a[0])==null?void 0:H[sl];Lt.value=!0,Zi.value=[{prop:sl,label:sl,name:sl,value:ha}]}else{let sl=(V=a==null?void 0:a.fixContent)==null?void 0:V.map(ra=>{let Ga={};for(let wl in ra)Array.isArray(ra==null?void 0:ra[wl])?Ga[wl]=JSON.stringify(ra==null?void 0:ra[wl]):Ga[wl]=ra==null?void 0:ra[wl];return Ga.relatedId="",Ga}),ha=[{tableName:(ae=a==null?void 0:a.relatedContents)==null?void 0:ae.find(ra=>ra==null?void 0:ra.includes("content")),tableContents:sl}];await M.pageBatchAddApi({platId:parseInt((pe=vl==null?void 0:vl.value)==null?void 0:pe.plat_id),changeContents:ha});let Ha=[];ha==null||ha.forEach(ra=>{var Ga;(Ga=ra==null?void 0:ra.tableContents)==null||Ga.forEach(wl=>{Ha.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wl),request_result:"{}",is_delete:!1,request_table:ra==null?void 0:ra.tableName,request_type:"copyAdd"})})}),await M.pageBatchAddApi({platId:parseInt((ve=vl==null?void 0:vl.value)==null?void 0:ve.plat_id),changeContents:[{tableName:"log",tableContents:Ha}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let ya=((Ue=(ca=(da=a==null?void 0:a.columns)==null?void 0:da.map(Be=>Be==null?void 0:Be.filter))==null?void 0:ca.filter(Be=>Be!==""))==null?void 0:Ue[0])??"";ya=le.analyzeSplitToContent(ya,","),ya=(ya==null?void 0:ya.find(Be=>Be==null?void 0:Be.includes("@Filter")))??"";let sl=(Sa=a==null?void 0:a.fixContent)==null?void 0:Sa.map(Be=>{let La={};for(let al in Be)Array.isArray(Be==null?void 0:Be[al])?La[al]=JSON.stringify(Be==null?void 0:Be[al]):La[al]=Be==null?void 0:Be[al];return La}),ha=await M.quoteApi({platId:parseInt((Ma=vl==null?void 0:vl.value)==null?void 0:Ma.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});ha=(Te=ha==null?void 0:ha.data)==null?void 0:Te.result,ha=ha==null?void 0:ha.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))});let Ha=(Na=(Fa=a==null?void 0:a.columns)==null?void 0:Fa[0])==null?void 0:Na.prop,ra=(oa=sl==null?void 0:sl[0])==null?void 0:oa[Ha],Ga=[{tableName:(ja=a==null?void 0:a.relatedContents)==null?void 0:ja.find(Be=>Be==null?void 0:Be.includes("content")),tableContents:sl}],wl=(aa=ha==null?void 0:ha.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa;return(xa=Object.values(ta))==null?void 0:xa.find(ga=>ga===ra)});if((La==null?void 0:La.length)>0){let ta=sl==null?void 0:sl[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var ml,Ne;xa[Ve.prop]=((ml=Ve==null?void 0:Ve.words)!=null&&ml[0]?(ga==null?void 0:ga[(Ne=Ve==null?void 0:Ve.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??""}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:aa.filter(Be=>Be);Ga=[...Ga,...wl];let De=await M.quoteApi({platId:parseInt((je=vl==null?void 0:vl.value)==null?void 0:je.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});if(De=(te=(pa=De==null?void 0:De.data)==null?void 0:pa.result)==null?void 0:te.filter(Be=>!(Ga!=null&&Ga.find(La=>(La==null?void 0:La.tableName)==="content_"+(Be==null?void 0:Be.id)))),De=De==null?void 0:De.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))}),ya&&ya!==""){(ya==null?void 0:ya[(ya==null?void 0:ya.length)-1])===","&&(ya=ya==null?void 0:ya.slice(0,(ya==null?void 0:ya.length)-1)),ya=(Se=(ce=ya==null?void 0:ya.replace("(",go))==null?void 0:ce.split(go))==null?void 0:Se[1],ya=ya==null?void 0:ya.slice(0,(ya==null?void 0:ya.length)-1),(ya==null?void 0:ya[0])==="*"&&(ya="{"+((fa=(we=ya==null?void 0:ya.replace("{",go))==null?void 0:we.split(go))==null?void 0:fa[1])),ya=(ea=ya==null?void 0:ya.replaceAll("{",""))==null?void 0:ea.replaceAll("}","");let Be=le.calculatorAndToOr(ya);Be=Be==null?void 0:Be[0];let La;if((Ta=Object.values(Be))!=null&&Ta.some(al=>(al==null?void 0:al[0])==="*")){let al=(Me=(Ee=Qn.value)==null?void 0:Ee.find(bl=>(bl==null?void 0:bl.condition)==="child"))!=null&&Me.value?(kn==null?void 0:kn.value)+"/"+(($e=(Fe=Qn.value)==null?void 0:Fe.find(bl=>(bl==null?void 0:bl.condition)==="child"))==null?void 0:$e.value):kn==null?void 0:kn.value;La=await Wr(al,!1)}for(let al in Be)if(((he=Be==null?void 0:Be[al])==null?void 0:he[0])==="*"){let bl=(Hl=(Ml=(El=Be[al])==null?void 0:El.slice(1,(tl=Be[al])==null?void 0:tl.length))==null?void 0:Ml.split(":"))==null?void 0:Hl[0],Tl=(jl=(Bl=Be[al])==null?void 0:Bl.split(":"))==null?void 0:jl[1],Oe=(el=La==null?void 0:La.filter(ma=>(ma==null?void 0:ma.name)===bl))==null?void 0:el[0];Oe=(Wa=($l=Oe==null?void 0:Oe.compData)==null?void 0:$l.find(ma=>(ma==null?void 0:ma.key)==="tableContents"))==null?void 0:Wa.contents,Oe=(Kl=Oe==null?void 0:Oe[0])==null?void 0:Kl[Tl],Be[al]=Oe}ya=((Jl=Object.values(Be))==null?void 0:Jl[0])??""}let ia=(ar=De==null?void 0:De.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa;return(xa=Object.values(ta))==null?void 0:xa.find(ga=>ga===(ya===""?ra:ya))});if((La==null?void 0:La.length)>0){let ta=sl==null?void 0:sl[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var Ne,Pl,Da,ul;let ml=(Ne=a==null?void 0:a.columns)==null?void 0:Ne.find(Za=>{var Nl,Ba,Rl;return((Ba=(Nl=Za==null?void 0:Za.words)==null?void 0:Nl[0])==null?void 0:Ba.replaceAll("'",""))===(Ve==null?void 0:Ve.prop)&&((Rl=Za==null?void 0:Za.functionRelatedWords)==null?void 0:Rl.length)>0});ml=(Pl=ml==null?void 0:ml.prop)==null?void 0:Pl.replaceAll("'",""),xa[Ve.prop]=((Da=Ve==null?void 0:Ve.words)!=null&&Da[0]?(ga==null?void 0:ga[(ul=Ve==null?void 0:Ve.words)==null?void 0:ul[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??(ga==null?void 0:ga[ml]):(ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??(ga==null?void 0:ga[ml]))??void 0}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:ar.filter(Be=>Be);Ga=[...Ga,...ia],await M.pageBatchUpdateApi({platId:parseInt((xl=vl==null?void 0:vl.value)==null?void 0:xl.plat_id),changeContents:Ga});let Pa=[];Ga==null||Ga.forEach(Be=>{var La;(La=Be==null?void 0:Be.tableContents)==null||La.forEach(al=>{Pa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(al),request_result:"{}",is_delete:!1,request_table:Be==null?void 0:Be.tableName,request_type:"method"})})}),await M.pageBatchAddApi({platId:parseInt((br=vl==null?void 0:vl.value)==null?void 0:br.plat_id),changeContents:[{tableName:"log",tableContents:Pa}]})}jr.setRefreshCurStructure(!0),jr.setRefreshCurrentPageInform(Z0.value++),await Nt(a)},Bt=async(a,l,n)=>{var i;let r=a==null?void 0:a.find(o=>(o==null?void 0:o.id)===l);if(r){let o=(i=r.compData)==null?void 0:i.map(f=>{var c;if((f==null?void 0:f.key)==="tableContents"){let u={...f,contents:n};return u.contents=(c=(u==null?void 0:u.contents)??[])==null?void 0:c.map(m=>{let g={};for(let w in m)JSON.stringify(m==null?void 0:m[w])==="{}"?g[w]="":g[w]=m==null?void 0:m[w];return g}),u}return f});return r.compData=await Ro(o,{}),a=a==null?void 0:a.map(f=>((f==null?void 0:f.id)===(r==null?void 0:r.id)&&(f=r),f)),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"}),f=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 Bt(c==null?void 0:c.children,l,n):c.compData=await Bt(c==null?void 0:c.compData,l,n),c});return o=await Promise.all(f),o}},Nt=async a=>{var o,f,c,u,m,g,w;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 n=await M.getAllTables({platId:parseInt((f=vl==null?void 0:vl.value)==null?void 0:f.plat_id),tableNames:l??[]});if(n=(u=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:u[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(d=>{d==null||delete d.source_table;const N={};for(let _ in d){const J=d==null?void 0:d[_],A=J&&Object.prototype.toString.call(J)==="[object Object]"&&Object.keys(J).length===0,F=Array.isArray(J)&&J.length===0;J==null||J==="{}"||A||F?N[_]="":N[_]=J}return N});let r=(g=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:g[1],i=await Bt(mr.value,r,n);mr.value=(w=mr.value)==null?void 0:w.map(d=>{var N,_;return(N=i==null?void 0:i[0])!=null&&N.tabInform&&((_=i==null?void 0:i[0])==null?void 0:_.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})},u3=a=>{let l=Zi.value;Zi.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},d3=async()=>{var d,N,_,J,A,F,L,E,S,k;let a=Bc.value,l=Tc.value,n=(N=(d=a==null?void 0:a.columns)==null?void 0:d.find(y=>y==null?void 0:y.mainKey))==null?void 0:N.prop,r=(J=(_=Zi.value)==null?void 0:_[0])==null?void 0:J.value,i=(A=a==null?void 0:a.fixContent)==null?void 0:A.map(y=>{var O;let x={};for(let I in y)Array.isArray(y==null?void 0:y[I])?x[I]=JSON.stringify(y==null?void 0:y[I]):x[I]=y==null?void 0:y[I];return(O=a==null?void 0:a.columns)==null||O.forEach(I=>{(I==null?void 0:I.formType)==="Upload"&&(x==null?void 0:x[I==null?void 0:I.prop])===""&&(x[I==null?void 0:I.prop]="{}")}),x[n]=r,x}),o=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(y=>y==null?void 0:y.includes("content")),tableContents:i}];await M.pageBatchAddApi({platId:parseInt((L=vl==null?void 0:vl.value)==null?void 0:L.plat_id),changeContents:o}),l=l==null?void 0:l.filter(y=>{var x,O,I;return(I=y==null?void 0:y.object_name)==null?void 0:I.includes((O=(x=a==null?void 0:a.fixContent)==null?void 0:x[0])==null?void 0:O[n])});let f=[],c=new Map;l==null||l.forEach(y=>{f.push(`content_${y==null?void 0:y.object_id}`),f.push(`struct_${y==null?void 0:y.object_id}`),c.set(y==null?void 0:y.object_id,y)});let u=await M.getAllTables({platId:parseInt((E=vl==null?void 0:vl.value)==null?void 0:E.plat_id),tableNames:f??[]});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(y=>{var I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne;let x=c.get((fe=(Y=(W=(I=y==null?void 0:y[1])==null?void 0:I[0])==null?void 0:W.source_table)==null?void 0:Y.split("_"))==null?void 0:fe[1]),O=(U=(j=(de=x==null?void 0:x.object_name)==null?void 0:de.split("/"))==null?void 0:j.filter((ua,Pe)=>{var Re,Le;return((Le=(Re=x==null?void 0:x.object_name)==null?void 0:Re.split("/"))==null?void 0:Le.length)-1!==Pe}))==null?void 0:U.join("/");if(O=O+"/"+r,g!=null&&g.find(ua=>(ua==null?void 0:ua.path)===O)||g.push({fatherPath:x==null?void 0:x.father_name,isShow:x==null?void 0:x.is_show,path:O}),((ee=(Z=y==null?void 0:y[1])==null?void 0:Z[0])==null?void 0:ee.类型)==="Table"){let ua=((ue=(Ie=(ge=y==null?void 0:y[1])==null?void 0:ge[0])==null?void 0:Ie.结构)==null?void 0:ue.contents)??[],Pe=pl.safeClone(ua);Array.isArray(Pe==null?void 0:Pe[0])&&(Pe=le.getColumnChild(Pe==null?void 0:Pe[0]));let Re=[];if(((B=y==null?void 0:y[0])==null?void 0:B.length)>0&&(Re=(oe=y==null?void 0:y[0])==null?void 0:oe.map(Le=>Pe==null?void 0:Pe.map(me=>(me=(Le==null?void 0:Le[me==null?void 0:me.prop])??"",me)))),m!=null&&m.find(Le=>(Le==null?void 0:Le.key)===O)){let Le=(q=m==null?void 0:m.find(me=>(me==null?void 0:me.key)===O))==null?void 0:q.contents;Le.push({isShow:x==null?void 0:x.is_show,filter:((Ae=(Ke=(ye=y==null?void 0:y[1])==null?void 0:ye[0])==null?void 0:Ke.引用)==null?void 0:Ae.contents)??"",key:"Table",name:Object.values(x==null?void 0:x.name),tableColumns:ua,tableContents:Re});let se=m==null?void 0:m.findIndex(me=>(me==null?void 0:me.key)===O);m[se].contents=Le}else m.push({key:O,contents:[{isShow:x==null?void 0:x.is_show,filter:((ne=(Ea=(Qe=y==null?void 0:y[1])==null?void 0:Qe[0])==null?void 0:Ea.引用)==null?void 0:ne.contents)??"",key:"Table",name:Object.values(x==null?void 0:x.name),tableColumns:ua,tableContents:Re}]})}});let w=[];w.push({key:"menuPath",contents:g}),w=[...w,...m],await M.createPlatFormDataApi({platId:parseInt((k=vl==null?void 0:vl.value)==null?void 0:k.plat_id),changeData:w}),Lt.value=!1,jr.setRefreshTable(!0)},zo=async(a,l)=>{},Mo=async a=>{mr.value=await le.getDeepDiffItems(a),jr.setItemData(mr.value),jr.setOriginalData(mr.value)};e.ref();const p3=e.ref(null),f3=()=>{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"})},Mc=e.ref([]),h3=e.computed(()=>{var a,l;return(l=(a=Dt.value)==null?void 0:a[Sl.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[e3.value],()=>{Sn.setSelectTitle([]),Sn.setChooseTitle([])},{deep:!0});e.watch(()=>No.value,async(a,l)=>{var r,i,o,f,c,u;let n=(r=No.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==kn.value);if((n==null?void 0:n.length)>0){Xr.setContentLoading(!0);let m=((i=n==null?void 0:n[0])==null?void 0:i.relatedContent)??(Sl==null?void 0:Sl.value),g=m+"/"+((o=n==null?void 0:n[0])==null?void 0:o.value),w=!!((f=n==null?void 0:n[0])!=null&&f.parentContent),d=await Wr(g,w,{originPath:m});d=(c=d==null?void 0:d.filter(J=>J))==null?void 0:c.map(J=>(J.isShow=!0,J)),console.log(d,"loadingContents");let N=await le.getDeepDiffItems(d),_=N==null?void 0:N.filter(J=>J==null?void 0:J.choice);$o.setSelectTab((u=_==null?void 0:_[0])==null?void 0:u.choiceName),N=N==null?void 0:N.filter(J=>{var A;return!(J!=null&&J.choiceName)||(J==null?void 0:J.choiceName)===((A=_==null?void 0:_[0])==null?void 0:A.choiceName)}),mr.value=N,Xr.setContentLoading(!1)}});const v3=(a,l)=>{setTimeout(async()=>{var c,u,m;let n=(c=No.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)!==kn.value),r=Sl==null?void 0:Sl.value,i=Sl==null?void 0:Sl.value;(n==null?void 0:n.length)>0&&(i=((u=n==null?void 0:n[0])==null?void 0:u.relatedContent)??(Sl==null?void 0:Sl.value),r=i+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let o=await Wr(r,!1,{originPath:i});o=o==null?void 0:o.map(g=>(g.isShow=!0,g));let f=await le.getDeepDiffItems(o);mr.value=f==null?void 0:f.filter(g=>!(g!=null&&g.step)||(g==null?void 0:g.step)===(a==null?void 0:a.title))},10)},m3=a=>{setTimeout(async()=>{var f,c,u;let l=(f=No.value)==null?void 0:f.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==kn.value),n=Sl==null?void 0:Sl.value,r=Sl==null?void 0:Sl.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(Sl==null?void 0:Sl.value),n=r+"/"+((u=l==null?void 0:l[0])==null?void 0:u.value));let i=await Wr(n,!1,{originPath:r});i=i==null?void 0:i.map(m=>(m.isShow=!0,m)),$o.setSelectTab(a);let o=await le.getDeepDiffItems(i);mr.value=o==null?void 0:o.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>Q0.value,a=>{a!=null&&a.length||(mr.value=[])},{immediate:!0});e.watch(()=>[Sl.value],async a=>{var o,f,c,u;if(!Sl.value)return;if(Sl.value==="/"){mr.value=[];return}Xr.setCurrentMenuPath(Sl.value),jr.setLockingPage(""),mr.value=[];let l=e.getCurrentInstance();(o=l==null?void 0:l.scope)==null||o.stop(),l=null,Li.value=!1,Xr.setContentLoading(!0),Dc.value=!0;let n=a==null?void 0:a[0],r=n,i=(f=Qn.value)==null?void 0:f.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&&(n=n+"/"+((c=i==null?void 0:i[0])==null?void 0:c.value)),n==="系统管理/日志管理")mr.value=await G0("log");else{let m=await Wr(n,!0,{originPath:r});m=m==null?void 0:m.map(d=>(d.isShow=!0,d));let g=await le.getDeepDiffItems(m),w=g==null?void 0:g.filter(d=>d==null?void 0:d.choice);$o.setSelectTab((u=w==null?void 0:w[0])==null?void 0:u.choiceName),mr.value=g==null?void 0:g.filter(d=>{var N;return!(d!=null&&d.choiceName)||(d==null?void 0:d.choiceName)===((N=w==null?void 0:w[0])==null?void 0:N.choiceName)})}Xr.setContentLoading(!1),jr.setExtraContents([]),Sn.setSelectIndex(""),Sn.setSelectMenu(""),jr.setItemData(mr.value),jr.setOriginalData(mr.value),jr.setRefreshTable(!1),e.nextTick(()=>{ai.value=ai.value++,Li.value=!0})},{immediate:!0});e.watch(()=>[Bs.value],async()=>{var a,l,n,r;if(Bs.value){mr.value=[];let i=e.getCurrentInstance();(a=i==null?void 0:i.scope)==null||a.stop(),i=null,Li.value=!1,Xr.setContentLoading(!0),Dc.value=!0;let o=kn==null?void 0:kn.value,f=o,c=(l=Qn.value)==null?void 0:l.filter(w=>(w==null?void 0:w.condition)==="child"&&(w==null?void 0:w.value)!==""&&(w==null?void 0:w.parentContent)!==(kn==null?void 0:kn.value));(c==null?void 0:c.length)>0&&(o=o+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let u=await Wr(o,!0,{originPath:f});u=u==null?void 0:u.map(w=>(w.isShow=!0,w));let m=await le.getDeepDiffItems(u),g=m==null?void 0:m.filter(w=>w==null?void 0:w.choice);if($o.setSelectTab((r=g==null?void 0:g[0])==null?void 0:r.choiceName),mr.value=m==null?void 0:m.filter(w=>{var d;return!(w!=null&&w.choiceName)||(w==null?void 0:w.choiceName)===((d=g==null?void 0:g[0])==null?void 0:d.choiceName)}),Xr.setContentLoading(!1),jr.setExtraContents([]),Sn.setSelectIndex(""),Sn.setSelectMenu(""),jr.setItemData(mr.value),jr.setOriginalData(mr.value),jr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let w=[...Qn.value,...c];Sn.setSelectTitle(w)}e.nextTick(()=>{ai.value=ai.value++,Li.value=!0})}},{immediate:!0,deep:!0});const y3=async()=>{Xr.setLinkMenuInfo(null),Xr.setActiveMenuPath(X0.value),mr.value=null,jr.setRouteToChildPath(""),Xr.setChildMenu("")},g3=a=>new RegExp("button","i").test(a),b3=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ic=a=>{if(b3(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Xr.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Oc=async(a,l,n)=>{var d,N,_,J,A,F,L,E,S,k,y,x;let r="",i="";for(let O in l)(l==null?void 0:l[O])===a&&(i=O);n==null||n.forEach(O=>{(O==null?void 0:O.prop)===i&&(r=O==null?void 0:O.fatherPath)});let o=r===""?Sl.value:r;r!==""&&Xr.setCurrentMenuPath(o),Xr.setCurrentMenuPath(o+"/"+a),Xr.setContentLoading(!0),mr.value=await Wr(o+"/"+a,!0,{originPath:o+"/",row:l});let f=await Wr(o,!1),c=(d=f==null?void 0:f.filter(O=>(O==null?void 0:O.comp)==="Table"))==null?void 0:d[0],u=((A=(J=(_=(N=c==null?void 0:c.compData)==null?void 0:N.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:_.contents)==null?void 0:J[0])==null?void 0:A.prop)??((k=(S=(E=(L=(F=c==null?void 0:c.compData)==null?void 0:F.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0])==null?void 0:S[0])==null?void 0:k.prop),m=(x=(y=c==null?void 0:c.compData)==null?void 0:y.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:x.contents;m=m==null?void 0:m.map(O=>({label:O==null?void 0:O[u],value:O==null?void 0:O[u]}));let g=Qn.value,w={value:a,condition:"child",options:m,relatedContent:o,isShow:!0};g=g==null?void 0:g.filter(O=>(O==null?void 0:O.condition)!=="child"),g.push(w),Sn.setSelectTitle(g),Sn.setChooseTitle([w]),Xr.setContentLoading(!1),jr.setExtraContents([]),Sn.setSelectIndex(""),Sn.setSelectMenu(""),jr.setItemData(mr.value),jr.setOriginalData(mr.value)},k3=a=>{Ac.value=a},zi=e.reactive({index:0,comp:null}),x3=e.computed(()=>{var a;return(a=mr.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:w3(l,n)}))}),Lc=(a,l)=>{var u,m,g,w,d;const n=l?a:a-2,r=(u=mr.value)==null?void 0:u[n],i=(g=(m=r==null?void 0:r.compData)==null?void 0:m.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:g.contents,o=i==null?void 0:i.findIndex(N=>(N==null?void 0:N.isMainKey)&&(N==null?void 0:N.label)!=="操作"),f=o===-1?0:o,c=(d=(w=r==null?void 0:r.compData)==null?void 0:w.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:d.contents;return{valid:c==null?void 0:c.every(N=>N==null?void 0:N[f+1]),length:(c==null?void 0:c.length)||0}},w3=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:i,length:o}=Lc(l,!0);zi.index===l?n="process":o===0?n="wait":n=i?"success":"error"}return n},Rc=a=>{var n,r,i,o,f;const l=a+1;if(l>1&&((i=(r=(n=mr.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:c}=Lc(l);c?(zi.index=l,zi.comp=(o=mr.value)==null?void 0:o[a]):Ja.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else zi.index=l,zi.comp=(f=mr.value)==null?void 0:f[a]},$c=e.computed(()=>{var a,l;return(l=(a=Nc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>$c.value,a=>{a&&Rc(0)},{immediate:!0});const Io=e.ref(0),Vc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=M.cloneDeep(a))==null?void 0:l.map(r=>(Io.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Io.value,children:Vc(r==null?void 0:r.children)},r))},_3=a=>{var n;return(n=M.cloneDeep(a))==null?void 0:n.map(r=>(Io.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Io.value,children:Vc(r==null?void 0:r.children)},r))},Fc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=M.cloneDeep(a))==null?void 0:n.filter(i=>(i==null?void 0:i.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=Fc(r==null?void 0:r.children,l),r)),a)},Pc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=M.cloneDeep(a))==null?void 0:n.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i=l),i)):(a=a==null?void 0:a.map(r=>(r.children=Pc(r==null?void 0:r.children,l),r)),a)},jc=(a,l)=>{var n;return a!=null&&a.find(r=>{var i;return(r==null?void 0:r.id)===((i=l==null?void 0:l.contents)==null?void 0:i.id)})?(n=M.cloneDeep(a))==null?void 0:n.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(r=>(r.children=jc(r==null?void 0:r.children,l),r)),a)},Hc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=M.cloneDeep(a))==null?void 0:n.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(r=>(r.children=Hc(r==null?void 0:r.children,l),r)),a)},gr=[{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"}],S3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],E3=[{label:"新增",value:"add"}],Un=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:E3},{key:"background",label:"按钮背景色",type:"Color"}],qn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:S3},{key:"textColor",label:"按钮颜色",type:"Color"}],C3={class:"table-content"},D3={class:"menu-config-wrap"},T3=["onClick"],B3={key:0,class:"viewport-wrap"},N3=["onClick"],A3={title:"选择显示列信息"},z3={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"}},M3=["title"],I3={class:"col-operate-wrap"},O3={key:0,class:"col-operate-radio-wrapper"},L3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},R3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},$3={class:"pop-view"},V3={class:"pop-wrapper"},F3={class:"file-list-pop"},P3=["title","onClick"],j3=["onClick"],H3=["onClick"],U3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},q3={class:"form-content"},W3={key:0,class:"dialog-footer"},G3={class:"dialog-footer"},K3={class:"ocr-dialog-content"},Y3={class:"ocr-steps"},J3={key:0,class:"ocr-action-buttons"},X3={key:1,class:"ocr-preview-area"},Z3={class:"ocr-file-grid"},Q3={class:"file-thumbnail"},eh=["src"],ah={key:1,class:"thumbnail-placeholder"},lh={class:"progress-svg",viewBox:"0 0 36 36"},rh=["stroke","stroke-width","stroke-dasharray"],nh={key:0,class:"progress-icon"},ih={key:1,class:"progress-icon"},oh=["onClick"],th={class:"file-name"},sh={key:0,class:"ocr-recognize-button"},ch={key:2,class:"ocr-progress-section"},uh={key:3,class:"ocr-confirm-area"},dh={class:"ocr-preview-tip"},ph={class:"ocr-preview-table"},fh={style:{display:"flex","align-items":"center",gap:"8px"}},hh={key:0},vh={key:4,class:"ocr-success-area"},mh={key:0,class:"ocr-dialog-footer"},yh={class:"form-content"},gh={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},bh={style:{display:"flex","justify-content":"space-between",gap:"8px"}},kh={style:{display:"flex"}},As="ss-ocr-upload-history",xh="ss-ocr-cert-history-v1",wh={__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 Kt;const n=e.ref([]),r=Ot(M.pinia),i=e.ref(null),o=e.ref(new Set),f=e.ref(new Map),c=e.ref(!1),u=e.ref([]),m=e.ref(new Map),g=new Map,w=e.ref(new Map),d=a,N=e.ref((d==null?void 0:d.allowSelect)??!0),_=e.ref(((Kt=d==null?void 0:d.config)==null?void 0:Kt.showIndex)??!0),J=e.ref(),A=e.ref(!0),F=e.ref(!1),L=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"}]}]),k=le.useOriginalState(M.pinia);let y="$R";const{originalPath:x}=M.storeToRefs(k),O=x.value,I=e.computed(()=>{var v;const p=(v=le.getAllLeafNodes(U.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 p.length>0?p.every(z=>!!(z!=null&&z.sortable)):!1});e.computed(()=>{var v;return(v=U.value)==null?void 0:v.every(z=>z==null?void 0:z.filterable)}),e.computed(()=>{var v;return(v=U.value)==null?void 0:v.every(z=>z==null?void 0:z.operable)});const W=e.ref(!0),Y=e.ref([]),fe=e.reactive({column:{},status:!1,text:"合计"}),de=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),j=l,U=e.ref([]),Z=e.ref([]),ee=e.ref([]),ge=e.reactive({prop:"",order:null}),Ie=e.ref([]),ue=e.ref(!1),B=e.ref(!1),oe=e.ref(null),{isUseBackdrop:q,initTrackFileType:ye,getFileExtension:Ke,setData:Ae,getFileInfo:Qe,getFilesInfo:Ea}=Co.useThreeSystem(),ne=e.ref([]),ua=e.ref(!1),Pe=e.ref(),Re=M.useMenuState(),{importLoading:Le,activeMenuPath:se,contentLoading:me,linkMenuInfo:qe}=M.storeToRefs(Re),ka=le.useTableComp(M.pinia),_a=M.useModelComp(M.pinia),H=li(M.pinia),{extraContents:V,cacheUpdatingData:ae,tableViewContents:pe,tableLoading:ve,pageMapState:da,lockingPage:ca}=M.storeToRefs(_a),{selectTab:Ue}=M.storeToRefs(H),{compType:Sa,hasEditable:Ma}=oc.useRole(),Te=e.ref([]),Fa=e.ref([]),Na=e.ref(new Map);e.ref(!1);const oa=e.ref("");e.ref();const ja=e.ref(!0),aa=e.ref(0),je=e.ref(!0),pa=e.ref(""),te=e.ref(!1),ce=e.ref(null);e.ref([]);const Se=e.ref({label:"查看三维模型"}),we=e.ref(!1),fa=e.ref(),ea=e.ref([]),Ta=e.ref([]),Ee=e.ref(!1),Me=e.ref([]),Fe=e.ref([]),$e=e.ref([]),he=e.ref([]),tl=e.ref({dialogShow:!1,dialogTitle:""}),El=()=>{tl.value.dialogShow=!1,tl.value.dialogTitle=""},Ml=p=>{console.log("Received signature data:",p),tl.value.dialogShow=!1},Hl=e.ref([]),Bl=()=>{try{const p=localStorage.getItem(As),v=p?JSON.parse(p):[];Hl.value=Array.isArray(v)?v:[]}catch{Hl.value=[]}},jl=()=>{try{localStorage.setItem(As,JSON.stringify(Hl.value||[]))}catch{}},el=p=>{var re,ie,G;if(!p)return;const v=p.url||((re=p==null?void 0:p.uploadResult)==null?void 0:re.url)||"",z=p.name||((ie=p==null?void 0:p.uploadResult)==null?void 0:ie.name)||((G=p==null?void 0:p.uploadResult)==null?void 0:G.fileName)||"";if(!v&&!z)return;const R={name:z,url:v,ts:Date.now()},P=String(R.name||"").trim().toLowerCase(),D=(Hl.value||[]).findIndex(xe=>String((xe==null?void 0:xe.name)||"").trim().toLowerCase()===P);D>-1&&Hl.value.splice(D,1),Hl.value.unshift(R),Hl.value.length>20&&(Hl.value=Hl.value.slice(0,20)),jl()};Bl();const $l=(p,v)=>`${xh}:${String(p??"")}:${String(v??"")}`,Wa=(p,v)=>{try{const z=sessionStorage.getItem($l(p,v)),R=z?JSON.parse(z):[];return Array.isArray(R)?R:[]}catch{return[]}},Kl=(p,v,z)=>{try{sessionStorage.setItem($l(p,v),JSON.stringify(Array.isArray(z)?z:[]))}catch{}},Jl=(p,v,z)=>{if(!v)return;const R=Wa(p,v),P=[z,...R||[]].filter(Boolean).slice(0,1);return Kl(p,v,P),P},ar=(p,v,z)=>{if(!v||!z)return;const R=$l(p,v),P=$l(p,z);try{const D=sessionStorage.getItem(R);if(!D)return;const re=(()=>{try{const xe=JSON.parse(D);return Array.isArray(xe)?xe:[]}catch{return[]}})(),ie=Wa(p,z),G=[...re,...ie||[]].filter(Boolean).sort((xe,be)=>Number((be==null?void 0:be.ts)||0)-Number((xe==null?void 0:xe.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(G)),sessionStorage.removeItem(R)}catch{}},xl=e.ref(!1),br=e.ref(!1),ya=e.ref([]),sl=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const ha=e.ref(!1),Ha=e.ref([]),ra=e.ref(1),Ga=e.ref(new Map),wl=e.ref(new Map),De=e.ref(0),ia=e.ref(!1),Pa=e.ref([]),Be=e.ref([]),La=p=>{var v;try{const z=(v=le.getAllLeafNodes(U.value)||[])==null?void 0:v.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate");return(z==null?void 0:z.find(R=>(R==null?void 0:R.prop)===p||(R==null?void 0:R.label)===p))||null}catch{return null}},al=p=>{const v=La(p),z=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return pl.getComponent(z)||pl.getComponent("Input")},bl=e.ref([]),Tl=e.ref(null),Oe=e.ref([]),ma=e.ref(null),ta=e.ref(""),xa=e.ref(!1),ga=e.ref([]),fl=e.ref(""),Ve=e.ref(!1),ml=e.ref([]),Ne=e.ref([]),Pl=e.ref([]),Da=e.ref(null),ul=e.ref([]),Za=e.ref("");e.computed(()=>{var p;try{const v=(p=le.getAllLeafNodes(U.value)||[])==null?void 0:p.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate"),z=new Map;return v==null||v.forEach(R=>{R!=null&&R.label&&(R!=null&&R.prop)&&z.set(R.label,R.prop)}),z.get("编号")||""}catch{return""}});const Nl=e.computed(()=>{var p;try{const v=(p=le.getAllLeafNodes(U.value)||[])==null?void 0:p.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate"),z=new Map;return v==null||v.forEach(R=>{R!=null&&R.label&&(R!=null&&R.prop)&&z.set(R.label,R.prop)}),z.get("名称")||""}catch{return""}}),Ba=e.computed(()=>{var p;try{const v=(p=le.getAllLeafNodes(U.value)||[])==null?void 0:p.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate"),z=new Map;return v==null||v.forEach(R=>{R!=null&&R.label&&(R!=null&&R.prop)&&z.set(R.label,R.prop)}),z.get("制造厂")||""}catch{return""}}),Rl=()=>{Ve.value=!1,ml.value=[],Ne.value=[],Pl.value=[],Da.value=null,ul.value=[],Za.value=""},Er=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,tn=(p,v)=>{const z=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(z))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Er(z[P])&&(v[P]=z[P]);const R=Fa.value.find(P=>P.id===v.id);if(R)for(const P of Object.keys(z))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Er(z[P])&&(R[P]=z[P]);Na.value&&Na.value.set(v.id,v),Jl(d==null?void 0:d.index,v.id,p==null?void 0:p.versionItem),Ne.value=[...Ne.value||[],JSON.parse(JSON.stringify(v))]},Fr=async(p,v=null)=>{var z,R,P,D,re,ie,G;try{const xe=(z=le.getAllLeafNodes(U.value)||[])==null?void 0:z.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),be=new Map;xe==null||xe.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&be.set(ba.label,ba.prop)});const Ye=be.get("系统编号")||be.get("编号");if(!Ye){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Ge=v||Da.value;if((Array.isArray(Ge==null?void 0:Ge.result)?Ge.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ba=0;ba<p.length;ba++){const Aa=p[ba],za=Aa[Ye];if(!za){console.warn(`第 ${ba+1} 条匹配行缺少系统编号,跳过`);continue}const Ze=`设备管理/试验设备/${za}`,nl=await M.getPageDataApi({platId:parseInt((R=Il.value)==null?void 0:R.plat_id),pageName:Ze});if(!((P=nl==null?void 0:nl.data)!=null&&P.result)||!Array.isArray(nl.data.result)){console.warn(`未找到详情页数据: ${Ze}`);continue}const wa=nl.data.result.find(sa=>(sa==null?void 0:sa.property_name)==="校检记录");if(!wa){console.warn(`详情页 ${Ze} 中未找到校检记录表`);continue}const il=(D=wa.contents)==null?void 0:D.find(sa=>(sa==null?void 0:sa.key)&&sa.key.startsWith("content_"));if(!il||!il.key){console.warn("校检记录表中未找到 content item");continue}const ke=il.key,Va=Array.isArray(il.value)?il.value:[];if(Va.length>=5){const T=[...Va].sort((Ia,Ua)=>{const ol=Number((Ia==null?void 0:Ia.create_time)||0),Ka=Number((Ua==null?void 0:Ua.create_time)||0);return ol-Ka})[0];T!=null&&T.id&&await M.pageBatchDeleteApi({platId:parseInt((re=Il.value)==null?void 0:re.plat_id),changeContents:[{tableName:ke,tableContents:[{id:T.id}]}]})}const va=(ie=xe==null?void 0:xe.find(sa=>(sa==null?void 0:sa.label)==="证书附件"))==null?void 0:ie.prop,Ya=String(Date.now()),Ra={id:Ya},ze=Va[0]||{},Q=new Date().toISOString().split("T")[0];if(Object.keys(ze||{}).forEach(sa=>{if(sa!=="id"){if(sa==="证书附件"){Ra[sa]="";return}if(sa==="校检日期"||sa==="检校日期"){Ra[sa]=Aa[sa]||Aa.校检日期||Aa.检校日期||Q;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(sa)){Ra[sa]=Aa[sa]??"";return}Ra[sa]=Aa[sa]??""}}),va&&Aa[va]){const sa=Aa[va];if(Array.isArray(sa)&&sa.length>0)Ra.证书附件=JSON.stringify(sa.map(T=>({url:(T==null?void 0:T.url)||"",name:(T==null?void 0:T.name)||(T==null?void 0:T.fileName)||"",fileName:(T==null?void 0:T.fileName)||(T==null?void 0:T.name)||""})).filter(T=>T.url||T.name));else if(typeof sa=="string")try{const T=JSON.parse(sa);Ra.证书附件=sa}catch{Ra.证书附件=JSON.stringify([{url:sa,name:sa,fileName:sa}])}}console.log(ke,"tableName","inspectionRecordRow",Ra),await M.pageBatchAddApi({platId:parseInt((G=Il.value)==null?void 0:G.plat_id),changeContents:[{tableName:ke,tableContents:[Ra]}]});const He=wa==null?void 0:wa.object_id;if(He&&Ya){const sa=va&&Aa[va]?Aa[va]:null;let T=[],Ia="",Ua=!1;if(Array.isArray(sa)&&sa.length>0){T=sa.map(dl=>({name:(dl==null?void 0:dl.name)||(dl==null?void 0:dl.fileName)||"",url:(dl==null?void 0:dl.url)||""})).filter(dl=>dl.url||dl.name);const Ka=sa[0];Ia=(Ka==null?void 0:Ka.url)||"";const Ca=(Ka==null?void 0:Ka.name)||(Ka==null?void 0:Ka.fileName)||"";Ua=String(Ca).toLowerCase().endsWith(".pdf")||String(Ia).toLowerCase().endsWith(".pdf")}else if(typeof sa=="string")try{const Ka=JSON.parse(sa);Array.isArray(Ka)?(T=Ka.map(Ca=>({name:(Ca==null?void 0:Ca.name)||(Ca==null?void 0:Ca.fileName)||"",url:(Ca==null?void 0:Ca.url)||""})).filter(Ca=>Ca.url||Ca.name),T.length>0&&(Ia=T[0].url||"",Ua=String(T[0].name).toLowerCase().endsWith(".pdf")||String(Ia).toLowerCase().endsWith(".pdf"))):(Ia=sa,Ua=String(sa).toLowerCase().endsWith(".pdf"))}catch{Ia=sa,Ua=String(sa).toLowerCase().endsWith(".pdf")}const ol={ts:Date.now(),versionId:String(Date.now())+"_"+String(ba),label:new Date().toLocaleString(),certType:Aa.证书类型||"",certNo:Aa.证书编号||"",fileType:Ua?"pdf":"image",sourceUrl:Ua?Ia:"",images:T};Jl(He,Ya,ol)}}}catch(xe){console.error("向校检记录表插入OCR识别结果失败:",xe),Ja.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},ir=p=>{const v=Array.isArray(p)?p:ml.value||[];if(v.length===0){Rl();return}if(v.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(D=>{var ie;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){Jl(d==null?void 0:d.index,(ie=D==null?void 0:D.ocrRow)==null?void 0:ie.id,D==null?void 0:D.versionItem),Pl.value=[...Pl.value||[],D.ocrRow];return}if(re==="replace"){const G=D==null?void 0:D.selectedTargetId,xe=(Te.value||[]).find(be=>String(be==null?void 0:be.id)===String(G));if(!xe)return;tn(D,xe)}}}),(Ne.value||[]).length>0&&(Te.value=[...Te.value||[]]),(Pl.value||[]).length>0&&(Te.value=[...Te.value||[],...Pl.value||[]],Fa.value=[...Fa.value||[],...Pl.value||[]],(Pl.value||[]).forEach(D=>{var re,ie;return(ie=(re=Na.value)==null?void 0:re.set)==null?void 0:ie.call(re,D.id,D)})),Gr.value=Te.value;const R=Ne.value||[],P=Pl.value||[];if(R.length>0&&(j("change",{buttonName:"编辑",singleContent:R,content:Te.value,relatedContents:d==null?void 0:d.related,index:d==null?void 0:d.index,parentTableId:d==null?void 0:d.parentTableId,columns:U.value,name:d==null?void 0:d.compName}),Fr(R)),P.length>0){const D=Da.value;j("change",{buttonName:"OCR批量新增",content:Te.value,index:d==null?void 0:d.index,parentTableId:d==null?void 0:d.parentTableId,column:U.value,ocrRows:P,relatedContents:d==null?void 0:d.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(ie=>({url:(ie==null?void 0:ie.url)||"",name:(ie==null?void 0:ie.name)||"",fileName:(ie==null?void 0:ie.name)||""})).filter(ie=>ie.url)),ocrResult:D,matchedCount:(R||[]).length,newCount:(P||[]).length})}Ja.ElMessage.success("已提交候选处理结果"),Rl()},Ur=Ec(),Zr=e.computed(()=>Ur.getConfig()),Or=e.ref(),rr=e.ref(),en=kc(M.pinia),Gr=e.ref(),or=e.ref(0),Cr=M.useUnit(M.pinia),{selectIndex:an,selectMenu:Wl,selectTitle:tr}=M.storeToRefs(Cr),{selectString:kr}=M.storeToRefs(en),Lr=M.useLoginState(M.pinia),{loginUserInfo:Il}=M.storeToRefs(Lr),ln=e.ref(720),sr=e.ref(!1),_r=e.ref(!1),Mr=e.ref([]),Br=e.ref(),zn=e.ref(!0),ri=e.ref(!0);e.ref([]);const Mn=e.inject("contentRef");e.provide("contentRef",Mn),e.provide("getSuggestListForCell",Hu),e.provide("getSuggestLoadingForCell",(p,v)=>{const z=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return w.value.get(z)||!1}),e.watch(()=>{var p;return(p=Te.value)==null?void 0:p.length},p=>{de.total=p}),e.watch(()=>pe.value,async()=>{var v,z,R,P,D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze;if(((v=pe.value)==null?void 0:v.length)===0||!((z=d==null?void 0:d.itemData)!=null&&z.find(nl=>(nl==null?void 0:nl.key)==="columnPath"))||!((R=d==null?void 0:d.itemData)!=null&&R.find(nl=>(nl==null?void 0:nl.key)==="pageColumn")))return;let p=(xe=(G=(ie=(re=(D=(P=d==null?void 0:d.itemData)==null?void 0:P.find(nl=>(nl==null?void 0:nl.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:ie[1])==null?void 0:G.split("]"))==null?void 0:xe[0];((Xe=(Ge=(Ye=(be=d==null?void 0:d.itemData)==null?void 0:be.find(nl=>(nl==null?void 0:nl.key)==="pageColumn"))==null?void 0:Ye.contents)==null?void 0:Ge.split("["))==null?void 0:Xe[0])+((Aa=(ba=pe.value)==null?void 0:ba.find(nl=>(nl==null?void 0:nl.key)===p))==null?void 0:Aa.value),(Ze=(za=d==null?void 0:d.itemData)==null?void 0:za.find(nl=>(nl==null?void 0:nl.key)==="pageGroup"))==null||Ze.contents,Gt(compData,d.allMapContents)},{deep:!0});const wn=p=>{var z,R,P,D,re;const v=(R=(z=U.value)==null?void 0:z.filter(ie=>ie==null?void 0:ie.mainKey))==null?void 0:R.map(ie=>ie==null?void 0:ie.prop);if(v.length===0){const ie=(P=U.value)==null?void 0:P.map(G=>G==null?void 0:G.prop);return(D=ie==null?void 0:ie.map(G=>p==null?void 0:p[G]))==null?void 0:D.join("|")}return(re=v==null?void 0:v.map(ie=>p==null?void 0:p[ie]))==null?void 0:re.join("|")},Gn=p=>{var ie,G,xe,be,Ye;const v=(G=(ie=U.value)==null?void 0:ie.filter(Ge=>Ge==null?void 0:Ge.required))==null?void 0:G.map(Ge=>Ge==null?void 0:Ge.prop),z=[];if(p==null||p.forEach(Ge=>{v==null||v.forEach(Xe=>{const ba=Ge[Xe];(ba==null||ba==="")&&(z.includes(Xe)||z.push(Xe))})}),z.length>0)return Ja.ElMessage.warning(`请填写必填项:${z.join("、")}`);const R=new Map,P=new Map;(xe=Te.value)==null||xe.forEach(Ge=>{const Xe=wn(Ge);R.set(Xe,Ge)}),p==null||p.forEach(Ge=>{const Xe=wn(Ge);P.set(Xe,Ge)});const D=p==null?void 0:p.filter(Ge=>R.has(wn(Ge))),re=(be=Te.value)==null?void 0:be.filter(Ge=>P.has(wn(Ge)));return(D==null?void 0:D.length)>0&&(X.columns=(Ye=U.value)==null?void 0:Ye.filter(Ge=>(Ge==null?void 0:Ge.label)!=="操作"),X.existRows=re,X.tableData=D,X.show=!0),X.newRows=p==null?void 0:p.filter(Ge=>{const Xe=wn(Ge);return!R.has(Xe)}),X.newRows},pn=e.ref(""),In=e.ref(null),ni=async()=>{var p,v,z,R,P,D;try{const re=await M.quoteApi({related:[{menus:se.value,groups:d==null?void 0:d.compName}],platId:parseInt((p=Il.value)==null?void 0:p.plat_id)});if(((v=re==null?void 0:re.data)==null?void 0:v.code)===200){In.value=(z=re==null?void 0:re.data)==null?void 0:z.result;const ie=(R=U.value)==null?void 0:R.map(be=>(be==null?void 0:be.prop)||(be==null?void 0:be.label)),G=fn(ie,(P=re==null?void 0:re.data)==null?void 0:P.result),xe=G==null?void 0:G.flatMap(be=>be==null?void 0:be.quote);(xe==null?void 0:xe.length)>0&&(pn.value=(D=xe==null?void 0:xe.map(be=>be==null?void 0:be.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function fn(p,v){var z;return(z=v.filter(R=>R.struct&&Array.isArray(R.struct)?R.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(D=>p.includes(D)):!1):!1))==null?void 0:z.map(R=>{const P={...R};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>p.includes(re)):!1)),P})}const ii=async(p,v)=>{var z,R;try{In.value||await ni();const P=v==null?void 0:v.map(re=>{const ie=Object.keys(re),G={};return ie.forEach((xe,be)=>{G[p[be]]=re[xe]}),G}),D=Gn(P);if(!D||(D==null?void 0:D.length)===0)return;X.show||await We(D)}catch(P){throw Ja.ElMessage.error("数据导入处理失败"),await M.pageBatchAddApi({platId:parseInt((z=Il==null?void 0:Il.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(P),is_delete:!1,request_table:(R=d==null?void 0:d.related)==null?void 0:R.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(P)}},Tn=async p=>{var D,re,ie,G,xe,be,Ye;let v=ee.value;v!=null&&v.find(Ge=>(p==null?void 0:p.key)===(Ge==null?void 0:Ge.key))&&(v=v==null?void 0:v.filter(Ge=>(p==null?void 0:p.key)!==(Ge==null?void 0:Ge.key))),v.push({key:p==null?void 0:p.key,value:[(re=p==null?void 0:p.value)==null?void 0:re[((D=p==null?void 0:p.value)==null?void 0:D.length)-1]]});let z=he.value;z=z==null?void 0:z.map(Ge=>{var Xe,ba;return(Ge==null?void 0:Ge.type)==="Select"&&(p==null?void 0:p.key)===(Ge==null?void 0:Ge.prop)&&Array.isArray(Ge.value)&&(Xe=Ge.value)!=null&&Xe.every(Aa=>typeof Aa=="string")&&(Ge.selectValue=(ba=v==null?void 0:v.find(Aa=>(Aa==null?void 0:Aa.key)===(Ge==null?void 0:Ge.prop)))==null?void 0:ba.value),Ge});let R=(G=(ie=z==null?void 0:z.find(Ge=>(Ge==null?void 0:Ge.prop)===(p==null?void 0:p.key)))==null?void 0:ie.optionUrl)==null?void 0:G.menuId,P=z==null?void 0:z.find(Ge=>(Ge==null?void 0:Ge.prop)===(p==null?void 0:p.key));if(R){let Ge=await Ct(P==null?void 0:P.optionUrl,R),Xe,ba=Y.value,Aa=(Ye=(be=(xe=he.value)==null?void 0:xe.find(za=>{var Ze;return(Ze=P==null?void 0:P.optionUrl)==null?void 0:Ze.menuId}))==null?void 0:be.selectValue)==null?void 0:Ye[0];if(Ge==null||Ge.forEach(za=>{var Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze;if(R){let Q=(nl=(Ze=he.value)==null?void 0:Ze.find(sa=>{var T,Ia;return((T=P==null?void 0:P.optionUrl)==null?void 0:T.menuId)===((Ia=sa==null?void 0:sa.optionUrl)==null?void 0:Ia.menuId)}))==null?void 0:nl.prop,He=(il=(wa=z==null?void 0:z.find(sa=>(sa==null?void 0:sa.prop)===Q))==null?void 0:wa.selectValue)==null?void 0:il[0];Q!=null&&Q.includes("·")&&(Q=(ke=Q==null?void 0:Q.split("·"))==null?void 0:ke[0],He=(Ra=(Ya=(va=p==null?void 0:p.value)==null?void 0:va[((Va=p==null?void 0:p.value)==null?void 0:Va.length)-1])==null?void 0:Ya.split(" "))==null?void 0:Ra[0]),ba!=null&&ba.find(sa=>(sa==null?void 0:sa.value)===Aa)?Xe=(ze=ba==null?void 0:ba.find(sa=>(sa==null?void 0:sa.value)===Aa))==null?void 0:ze.objectValue:za[Q]===He&&(Xe=za)}}),Xe){let za=z;za=za==null?void 0:za.map(Ze=>{var nl,wa,il,ke,Va,va;return R&&(Xe!=null&&Xe[Ze==null?void 0:Ze.prop])&&pa.value==="新增"&&(Ze==null?void 0:Ze.prop)!==(P==null?void 0:P.prop)?Ze.value=(Xe==null?void 0:Xe[Ze==null?void 0:Ze.prop])||(Xe==null?void 0:Xe[(ke=(il=(wa=(nl=Ze==null?void 0:Ze.optionUrl)==null?void 0:nl.groupSelect)==null?void 0:wa[1])==null?void 0:il.replaceAll("[",""))==null?void 0:ke.replaceAll("]","")]):Ze.value=(va=(Va=he.value)==null?void 0:Va.find(Ya=>(Ya==null?void 0:Ya.prop)===(Ze==null?void 0:Ze.prop)))==null?void 0:va.value,Ze}),he.value=za}}ee.value=v},$i=async(p,v)=>{var z,R,P,D,re;if((z=p==null?void 0:p.toString())!=null&&z.includes(".txt")||(R=p==null?void 0:p.toString())!=null&&R.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const ie=await Ja.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),G=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});let xe=URL.createObjectURL(G);Pe.value=[{name:(re=p==null?void 0:p.split("/"))==null?void 0:re[((D=p==null?void 0:p.split("/"))==null?void 0:D.length)-1],blobUrl:xe}],ua.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&j("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{ri.value=!1;let p=or.value;or.value=p+1});const gi=e.reactive({prop:"",order:null}),Vo=e.computed(()=>{const p=(Te.value??[]).slice(),v=gi.prop||ge.prop,z=gi.order||ge.order;if(!v||!z)return p;const R=z==="ascending",P=re=>{if(v)return re&&Object.prototype.hasOwnProperty.call(re,v)?re[v]:v.includes(".")?v.split(".").reduce((ie,G)=>ie==null?ie:ie[G],re):re==null?void 0:re[v]},D=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const ie=String(re).trim();if(ie==="")return{ok:!1,value:NaN};const G=ie.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(G))return{ok:!1,value:NaN};const xe=Number(G);return{ok:Number.isFinite(xe),value:xe}};return p.sort((re,ie)=>{const G=P(re),xe=P(ie);if(G==null&&xe==null)return 0;if(G==null)return R?-1:1;if(xe==null)return R?1:-1;const be=D(G),Ye=D(xe);if(be.ok&&Ye.ok)return R?be.value-Ye.value:Ye.value-be.value;const Ge=ke=>{if(ke==null)return{ok:!1,value:NaN};const Va=String(ke).trim();if(Va==="")return{ok:!1,value:NaN};const va=Va.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!va)return{ok:!1,value:NaN};const Ya=va[1]?-1:1,Ra=Number(va[2]),ze=Number(va[3]),Q=Number(va[4]);return[Ra,ze,Q].some(He=>Number.isNaN(He))?{ok:!1,value:NaN}:ze>=60||Q>=60?{ok:!1,value:NaN}:{ok:!0,value:Ya*(Ra*3600+ze*60+Q)}},Xe=Ge(G),ba=Ge(xe);if(Xe.ok&&ba.ok)return R?Xe.value-ba.value:ba.value-Xe.value;const Aa=new Date(G).getTime(),za=new Date(xe).getTime(),Ze=!Number.isNaN(Aa),nl=!Number.isNaN(za);if(Ze&&nl)return R?Aa-za:za-Aa;const wa=String(G),il=String(xe);return R?wa.localeCompare(il):il.localeCompare(wa)})}),Bn=e.computed(()=>{var z;const p=(de.currentPage-1)*de.pageSize,v=p+de.pageSize;return j("getSliceContLength",de),(z=Vo.value)==null?void 0:z.slice(p,v)}),Fo=p=>{de.currentPage=p,j("getSliceContLength",de)},Po=p=>{var R;de.pageSize=p;const v=((R=Te.value)==null?void 0:R.length)??0,z=p>0?Math.ceil(v/p):1;de.currentPage>z&&(de.currentPage=z||1,Ja.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),j("getSliceContLength",de)},jo=({prop:p,order:v})=>{gi.prop=p,gi.order=v,de.currentPage=1};function ao(p){const v=[];function z(R,P=""){R.forEach(D=>{D.children&&D.children.length>0?z(D.children,D.prop):v.push(D.prop)})}return z(p),v}const lo=(p,v)=>{var ie,G,xe,be;let z=(G=(ie=U.value)==null?void 0:ie.map(Ye=>Ye==null?void 0:Ye.prop))==null?void 0:G.filter(Ye=>Ye!=="operate");((xe=U.value)==null?void 0:xe.some(Ye=>{var Ge;return((Ge=Ye==null?void 0:Ye.children)==null?void 0:Ge.length)>0}))&&(z=ao((be=U.value)==null?void 0:be.filter(Ye=>(Ye==null?void 0:Ye.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(z==null?void 0:z.length)?p:p.slice(0,z==null?void 0:z.length),!(P==null?void 0:P.every(Ye=>z==null?void 0:z.find(Ge=>Ye===Ge))))return Ja.ElMessage.error("导入的数据表头不匹配");ii(P,v)},sn=(p,v)=>{var P;const z=p==null?void 0:p.filter(D=>D!=="序号"),R=v==null?void 0:v.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});_a.setRefreshCurStructure(!1),((P=U.value)==null?void 0:P.length)===0||lo(z,R)},Ho=(p,v,z,R)=>{const P=[],D=[],re=xe=>Object.keys(xe).length;for(const xe in p)if(p[xe]!==void 0){const be=p[xe],Ye=[];for(const[Ge,Xe]of Object.entries(be))Ye.push(Xe),D.length<re(be)&&D.push(Ge);P.push(Ye)}P.unshift(D);const ie=le.utils.aoa_to_sheet(P),G=le.utils.book_new();le.utils.book_append_sheet(G,ie,R),le.writeFileSync(G,`${v}.xlsx`),Mr.value=[]},ro=async(p,v,z,R=!1,P)=>{try{_a.setRefreshCurStructure(!1)}catch(D){Ja.ElMessage.error(D)}},Uo=async(p,v)=>{await ro()},qo=async(p,v)=>{await ro("columnType",v,p,!1)},Wo=async({newRow:p,targetIndex:v})=>{var P;if(!Ma(d.config,{type:Sa.TABLE}))return;const R=(de.currentPage-1)*de.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=si(R,Te.value||[]))}catch{}Te.value.splice(R,0,p),await e.nextTick(),f.value.has(p.id)||f.value.set(p.id,M.cloneDeep(p)),Te.value=(P=Te.value)==null?void 0:P.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===p.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),o.value.add(p.id),sr.value=!0},Go=(p,v,z,R=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const D=P==null?void 0:P.prop;if(!D)return;let re=p==null?void 0:p[D];if(re==null||String(re).trim()==="")return;re=String(re);const ie=new Set([...(Array.isArray(z)?z:[]).filter(be=>(be==null?void 0:be.id)!==(p==null?void 0:p.id)).map(be=>be==null?void 0:be[D]).filter(be=>be!=null).map(be=>String(be)),...(Array.isArray(R)?R:[]).map(be=>be==null?void 0:be[D]).filter(be=>be!=null).map(be=>String(be))]);if(!ie.has(re))return;let G=1,xe="";for(;xe=`${re}(${G})`,!!ie.has(xe);)G++;p[D]=xe}),p),Vi=async()=>{var P,D,re,ie,G,xe,be,Ye;const p=Array.from(o.value||[]);if(p.length===0)return;const v=(D=le.getColumnChild((P=M.cloneDeep(U.value))==null?void 0:P.filter(Ge=>(Ge==null?void 0:Ge.label)!=="操作")))==null?void 0:D.filter(Ge=>(Ge==null?void 0:Ge.required)===!0);if((v==null?void 0:v.length)>0)for(let Ge=0;Ge<p.length;Ge++){const Xe=p[Ge],ba=(re=Te.value)==null?void 0:re.find(Aa=>(Aa==null?void 0:Aa.id)===Xe);if(ba)for(let Aa=0;Aa<v.length;Aa++){const za=v[Aa],Ze=za==null?void 0:za.prop,nl=(za==null?void 0:za.label)??Ze,wa=ba==null?void 0:ba[Ze];if(wa===""||wa===null||wa===void 0||Array.isArray(wa)&&wa.length===0){Ja.ElMessage.error(`${nl}不能为空`);let ke={};ke.id=ba==null?void 0:ba.id;const Va={fixContent:[ke],buttonName:"修改",relatedContents:d==null?void 0:d.related,name:d==null?void 0:d.compName,columns:U.value};j("change",Va);return}}}const z=[],R=[];if(p.forEach(Ge=>{var nl;const Xe=(nl=Te.value)==null?void 0:nl.find(wa=>(wa==null?void 0:wa.id)===Ge);if(!Xe)return;if(Xe!=null&&Xe._isTemp){const il=(le.getAllLeafNodes(U.value)||[]).filter(ze=>(ze==null?void 0:ze.mainKey)===!0||(ze==null?void 0:ze.isMainKey)===!0),ke=Te.value.findIndex(ze=>(ze==null?void 0:ze.id)===Ge),Va=ke>=0?ke+1:Te.value.length+1;Go(Xe,il,Te.value,z);const va={id:Va.toString()};(Xe==null?void 0:Xe.sort)!==void 0&&(Xe==null?void 0:Xe.sort)!==null&&String(Xe.sort).trim()!==""?va.sort=String(Xe.sort):va.sort=si(ke>=0?ke:Te.value.length-1,Te.value||[]),(le.getAllLeafNodes(U.value)||[]).filter(ze=>(ze==null?void 0:ze.type)!=="operate"&&(ze==null?void 0:ze.label)!=="操作"&&(ze==null?void 0:ze.prop)!=="operate").forEach(ze=>{const Q=ze==null?void 0:ze.prop;if(Q){const He=Xe[Q];He!==void 0?va[Q]=He??"":va[Q]=""}}),z.push(va);return}const Aa=(le.getAllLeafNodes(U.value)||[]).filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),za=new Set(Aa.map(wa=>wa==null?void 0:wa.prop).filter(Boolean)),Ze={};for(const wa of za)Object.prototype.hasOwnProperty.call(Xe,wa)&&(Ze[wa]=Xe[wa]);R.push({id:Xe.id,value:{tableData:Ze}})}),_a.setTableLoading(d==null?void 0:d.index),R.length>0){const Ge=R.map(ba=>{const Aa={id:ba.id,...ba.value.tableData};return delete Aa._isOCRRow,delete Aa._ocrTableId,delete Aa._isTemp,delete Aa.tableEditType,delete Aa.index,Aa}),Xe=[{tableName:((ie=d==null?void 0:d.related)==null?void 0:ie.find(ba=>ba==null?void 0:ba.includes("content")))??"content_"+(d==null?void 0:d.index),tableContents:Ge}];try{await M.pageBatchUpdateApi({platId:parseInt((G=Il.value)==null?void 0:G.plat_id),changeContents:Xe})}catch(ba){Ja.ElMessage.error(((be=(xe=ba==null?void 0:ba.response)==null?void 0:xe.data)==null?void 0:be.message)||(ba==null?void 0:ba.message)||"保存失败"),_a.setTableLoading(!1);return}}if(z.length>0){const Ge={fixContent:z,buttonName:"新增",relatedContents:d==null?void 0:d.related,name:d==null?void 0:d.compName,columns:U.value};j("change",Ge)}Ja.ElMessage.success("保存成功"),o.value.clear(),f.value.clear(),Te.value=(Ye=Te.value)==null?void 0:Ye.map(Ge=>({...Ge,tableEditType:"text"})),sr.value=!1,_a.setRefreshCurStructure(!0)},Ko=()=>{var v;const p=Array.from(o.value||[]);if(p.length===0){sr.value=!1;return}p.forEach(z=>{var D,re;const R=f.value.get(z),P=(D=Te.value)==null?void 0:D.find(ie=>(ie==null?void 0:ie.id)===z);if(P!=null&&P._isTemp){Te.value=Te.value.filter(ie=>(ie==null?void 0:ie.id)!==P.id);return}if(R){const ie=(re=Te.value)==null?void 0:re.findIndex(G=>(G==null?void 0:G.id)===z);ie!==-1&&(Te.value[ie]={...Te.value[ie],...R})}}),o.value.clear(),f.value.clear(),Te.value=(v=Te.value)==null?void 0:v.map(z=>({...z,tableEditType:"text"})),sr.value=!1},bi=e.ref(!1),oi=async p=>{var P,D,re,ie;if(!sr.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((D=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:D.call(P))==="textarea")return;const R=document.getElementById("excel-table");R&&!R.contains(v)||((re=v==null?void 0:v.blur)==null||re.call(v),(ie=p.preventDefault)==null||ie.call(p),await e.nextTick(),await On())},On=async()=>{if(ae.value){sr.value=!1;return}if(!bi.value){bi.value=!0;try{Array.from(o.value||[]).length>0?await Vi():sr.value=!1}finally{Promise.resolve().then(()=>{bi.value=!1})}}},ki=p=>{Mr.value=p},Yo=(p,v)=>{Br.value===v?zn.value=!1:zn.value=!0,Br.value=v==null?void 0:v.changeProp},no=p=>{if(!p)return;const{item:v,value:z}=p,R=he.value.find(P=>P.prop==v.prop);R&&R.contents.push({label:z,value:z})},Kn=e.computed(()=>{var z,R,P;const p=(z=U.value)==null?void 0:z.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(R=U.value)==null?void 0:R.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:P.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Fi=async(p,v,z)=>{const R=M.cloneDeep(U.value);await e.nextTick();const P=R==null?void 0:R.map(re=>(z==null?void 0:z.label)===(re==null?void 0:re.label)?{...re,[v]:p}:re),D=Fn(P);await Cs(d.index,D),U.value=P,Z.value=D},Fn=p=>{var P;const v=p||[];return((P=le.getAllLeafNodes(v)||[])==null?void 0:P.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return V0(re,D)})},Jo=async p=>{let v=await P0(d.index);v||(v=Fn(p)),Z.value=v},Xo=async(p,v)=>{const z=M.cloneDeep(U.value),R=re=>Array.isArray(re)?re.map(ie=>{const G=Array.isArray(ie==null?void 0:ie.children)&&ie.children.length>0,xe={...ie};return(xe==null?void 0:xe.prop)==="operate"||(xe==null?void 0:xe.label)==="操作"||(xe==null?void 0:xe.type)==="operate"?(xe.sortable=!1,xe.filterable=!1,xe.operable=!1):xe.sortable=G?!1:!!p,G&&(xe.children=R(xe.children)),xe}):re,P=R(z),D=Fn(P);await Cs(d.index,D),U.value=P,Z.value=D,await e.nextTick(),or.value=or.value+1},Zo=()=>{te.value=!1},Qo=p=>{j("clickTrigger",p)},io=async p=>{var D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa;const v=p==null?void 0:p.row,z=p==null?void 0:p.rowData,R=p==null?void 0:p.suffix;if((D=v==null?void 0:v.toString())!=null&&D.includes(".urdf")||p!=null&&p.isUrdf||R!=null&&R.includes(".urdf")){if(v.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(q(v)){const ke={files:[Qe(v)],data:{}};Ae(ke);return}Me.value=[{url:v,extension:Ke(v)}],B.value=!0,oe.value={data:M.cloneDeep(z)},ue.value=!0;return}let P=[];if((re=v==null?void 0:v.toString())!=null&&re.includes(".stl")||(ie=v==null?void 0:v.toString())!=null&&ie.includes(".STL")||(G=v==null?void 0:v.toString())!=null&&G.includes(".obj")||(xe=v==null?void 0:v.toString())!=null&&xe.includes(".mtl")){const il=(be=v==null?void 0:v.toString())==null?void 0:be.split(","),ke=Ea(il),Va=ke==null?void 0:ke[0];if(q(Va==null?void 0:Va.extension)){Ae({files:ke,data:{}});return}Me.value=ke,B.value=!1,ue.value=!0;return}if((Ye=v==null?void 0:v.toString())!=null&&Ye.includes(".stl")||(Ge=v==null?void 0:v.toString())!=null&&Ge.includes(".STL")||(Xe=v==null?void 0:v.toString())!=null&&Xe.includes(".obj")||(ba=v==null?void 0:v.toString())!=null&&ba.includes(".mtl")||R!=null&&R.includes(".stl")||R!=null&&R.includes(".STL")||R!=null&&R.includes(".obj")||R!=null&&R.includes(".mtl")){let il,ke=[],Va={};if(Array.isArray(v)?il=v:il=v==null?void 0:v.split(","),il==null||il.forEach(va=>{va.includes(".mtl")?ke.push(va):Va.blob=Va.blob?Va.blob+","+va:va}),(ke==null?void 0:ke.length)>0&&(Va.mtlBlobs=ke),R&&(Va.suffix=R),(za=(Aa=Object.values(Va))==null?void 0:Aa[0])!=null&&za.includes("http:"))P.push(Va);else{const va=new Blob([Va.blob],{type:"application/octet-stream;charset=UTF-8"});let Ya=URL.createObjectURL(va),Ra="";(Ze=v==null?void 0:v.split("/"))==null||Ze.forEach((ze,Q)=>{var He;Q===((He=v==null?void 0:v.split("/"))==null?void 0:He.length)-1&&(Ra=ze)}),(nl=Va.blob)!=null&&nl.includes(".stl")&&(Ra=(Ra==null?void 0:Ra.replaceAll(">",""))+".urdf"),Pe.value=[{name:Ra,blobUrl:Ya}],ua.value=!0}}else{const il=await Ja.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ke=new Blob([il.data],{type:"application/octet-stream;charset=UTF-8"});let Va=URL.createObjectURL(ke),va="";if((wa=v==null?void 0:v.split("/"))==null||wa.forEach((Ya,Ra)=>{var ze;Ra===((ze=v==null?void 0:v.split("/"))==null?void 0:ze.length)-1&&(va=Ya)}),q(va)){const Ya=ye(va),Ra=Qe(v);Ae({files:[Ra],data:{trackFileType:Ya}});return}Pe.value=[{name:va,blobUrl:Va}],ua.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},ti=p=>{var R,P,D,re;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(re=(R=p==null?void 0:p.url)==null?void 0:R.split("."))==null?void 0:re[((D=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:D.length)-1];return(p==null?void 0:p.name)+"."+v},xi=p=>{if(!p)return"未知文件";try{const R=ti(p);if(typeof R=="string"&&R.includes("."))return R}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",z=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${z}`},oo=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const z=Number(v[1]),R=Number(v[2]);return!Number.isFinite(z)||!Number.isFinite(R)?p:String(z*1e3+R)},Ln=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const z=Number(v);return Number.isFinite(z)?z:null},et=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const z=v.includes("T")?v:v.replace(" ","T"),R=Date.parse(z);return Number.isFinite(R)?R:null},wi=(p,v=[])=>{const z=Array.isArray(p)?p.slice():[];if(z.length<=1)return z;const R=new Map((v||[]).map((re,ie)=>[String(re),ie])),P=z.some(re=>Ln(re==null?void 0:re.sort)!==null),D=z.map((re,ie)=>({r:re,idx:ie,id:String((re==null?void 0:re.id)??""),sortVal:Ln(re==null?void 0:re.sort),createTimeMs:et(re==null?void 0:re.create_time),prevIdx:R.has(String(re==null?void 0:re.id))?R.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,ie)=>{if(P){const be=re.sortVal,Ye=ie.sortVal;if(be===null&&Ye!==null)return 1;if(be!==null&&Ye===null)return-1;if(be!==null&&Ye!==null&&be!==Ye)return be-Ye}const G=re.createTimeMs,xe=ie.createTimeMs;return G!==null&&xe!==null&&G!==xe?xe-G:G!==null&&xe===null?-1:G===null&&xe!==null?1:re.prevIdx!==ie.prevIdx?re.prevIdx-ie.prevIdx:re.idx-ie.idx}),D.map(re=>re.r)},si=(p,v=[])=>{const z=v==null?void 0:v[p-1],R=v==null?void 0:v[p],P=Ln(z==null?void 0:z.sort),D=Ln(R==null?void 0:R.sort);let re=null;P!==null&&D!==null&&D>P?re=(P+D)/2:P!==null?re=P+1:D!==null?re=Math.max(D-1,0):re=(p??0)+1;const ie=Number(re.toFixed(6));return String(Number.isFinite(ie)?ie:re)},at=async p=>{let v=null,z=null;if(p!=null&&p.id){const P=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await M.platformDownloadFile(p);v=URL.createObjectURL(D.data),z=xi(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await _i(),D=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await Ja.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),ie=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),z=p==null?void 0:p.name}else{const P=await M.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),z=ti(p)):v=p==null?void 0:p.url}if(q(v)){const P={row:`${v}`,suffix:Ke(z)};io(P);return}const R={name:z,blobUrl:v};Pe.value=[R],ua.value=!0},to=async p=>{let v=null,z=null;if(p!=null&&p.id){const D=await M.platformDownloadFile(p);v=URL.createObjectURL(D.data),z=xi(p)}else if(p!=null&&p.downloadUrl){const D=await _i(),re=await Ja.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:D,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ie=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),z=p==null?void 0:p.name}else{const D=await M.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(D.data),z=ti(p)}const R={name:z,blobUrl:v},P=document.createElement("a");P.href=R.blobUrl,P.download=R.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},ci=(p,v)=>{var R;if(Object.values(v).length===0)return;let z=p;return Object.values(v).find(P=>{var D,re,ie;return((D=P==null?void 0:P.toString())==null?void 0:D.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((ie=P==null?void 0:P.toString())==null?void 0:ie.includes(".obj"))})?z=[...p,Se.value]:(R=d==null?void 0:d.config)!=null&&R.allowMove&&(z=[...p,{label:"迁移"}]),z},Rn=()=>{F.value=!0},so=e.ref([]),Pi=async(p,v,z=!1)=>{var re,ie,G,xe;if(!p)return;if(z){Te.value=[...Na.value.values()].filter(be=>Object.values(be).some(Ye=>typeof Ye=="string"?Ye==null?void 0:Ye.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let R={};for(let be in p)(p==null?void 0:p[be])!==""&&(R[be]=p==null?void 0:p[be]);if(JSON.stringify(R)==="{}"){Te.value=Array.from(((re=Na.value)==null?void 0:re.values())??[]);return}let P=(ie=d==null?void 0:d.related)==null?void 0:ie.find(be=>be==null?void 0:be.includes("content_")),D=await M.getFillFind({platId:parseInt((G=Il==null?void 0:Il.value)==null?void 0:G.plat_id),tableName:P,params:R});D=(xe=D==null?void 0:D.data)==null?void 0:xe.result,Te.value=D,_a.setTableLoading(!1)},lt=e.computed(()=>{var v,z;return((z=(v=d==null?void 0:d.itemData)==null?void 0:v.find(R=>(R==null?void 0:R.key)==="isEdit"))==null?void 0:z.contents)??!0}),rt=async p=>{var P,D,re,ie,G,xe;if(!Ma(d.config,{type:Sa.TABLE})||!(((D=(P=d==null?void 0:d.itemData)==null?void 0:P.find(be=>(be==null?void 0:be.key)==="isEdit"))==null?void 0:D.contents)??!0))return;let z=(ie=(re=u.value)==null?void 0:re.find(be=>{var Ye;return(Ye=be==null?void 0:be.key)==null?void 0:Ye.includes("@EditRead")}))==null?void 0:ie.content;if((z==null?void 0:z.length)>0){let be=Ss(z,p);if((be==null?void 0:be.length)>0)return}if(!p)return;((G=Array.from(o.value))==null?void 0:G.length)>0&&await Vi();const R=p==null?void 0:p.id;R!=null&&(o.value.clear(),f.value.clear(),f.value.has(R)||f.value.set(R,M.cloneDeep(p)),Te.value=(xe=Te.value)==null?void 0:xe.map(be=>({...be,tableEditType:(be==null?void 0:be.id)===R?"edit":"text"})),o.value.add(R),sr.value=!0)},co=async(p,v,z,R)=>{R!=null&&R.isExistChild&&j("clickMainKey",p,z,U.value)},nt=()=>{ua.value=!1},it=p=>{j("rowClick",p)};e.watch(()=>d.changedContent,()=>{var z,R;if(!d.changedContent)return;let p=(z=Te.value)==null?void 0:z.map(P=>{var D;return P.id===((D=d.changedContent)==null?void 0:D.id)&&(P={...d.changedContent,id:d.changedContent.newId?d.changedContent.newId:d.changedContent.id},delete P.newId),P});const v=(R=d.itemData)==null?void 0:R.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));Te.value=p,j("contentChange",{contents:v,index:d.index}),j("change",{content:p,index:d==null?void 0:d.index,buttonName:"",id:d==null?void 0:d.index})},{deep:!0,immediate:!0});const ot=()=>{},tt=async()=>{const p=se.value,v=sessionStorage.getItem("systemKey"),z=await le.getItemData(p,v,""),R=(z==null?void 0:z.find(ie=>(ie==null?void 0:ie.name)==="方法明细"))||(z==null?void 0:z[0]),P=(R==null?void 0:R.compData)||[],D=P==null?void 0:P.find(ie=>{const G=ie==null?void 0:ie.key;return G==="formContent"||G==="tableContents"});return D==null?void 0:D.contents},_i=async()=>{const v=Ja.Local.get("access-token");return v?`Bearer ${v}`:""},st=async(p,{token:v,inputData:z}={})=>await Ja.axios.post(p,z,{headers:{Authorization:v}}).catch(P=>(Re.setImportLoading(!1),Promise.reject(P))),ct=p=>{var R;let v={};const z=[];return v.form={},(R=M.cloneDeep(p))==null||R.forEach((P,D)=>{var re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa;if((P==null?void 0:P.comp)==="Table"){(ie=(re=P==null?void 0:P.compData)==null?void 0:re.find(va=>(va==null?void 0:va.key)==="header"))==null||ie.contents;let il=(be=(xe=(G=P==null?void 0:P.compData)==null?void 0:G.find(va=>(va==null?void 0:va.key)==="tableContents"))==null?void 0:xe.contents)==null?void 0:be.map(va=>va.slice(1));(Aa=(ba=(Xe=(Ge=(Ye=P==null?void 0:P.compData)==null?void 0:Ye.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:Ge.contents)==null?void 0:Xe[0])==null?void 0:ba[0])==null||Aa.label;let ke=(Ze=(za=P==null?void 0:P.compData)==null?void 0:za.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:Ze.contents,Va=[];il==null||il.forEach(va=>{let Ya=[];va==null||va.forEach((Ra,ze)=>{var He;let Q={};((He=ke[ze])==null?void 0:He.label)!=="操作"&&(Q[ke[ze].label]=Ra,Ya.push(Q))}),Va.push(Ya)}),v[P.name]=Va}else{const il=(wa=(nl=P.compData)==null?void 0:nl.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:wa.contents;il==null||il.forEach(ke=>{var Va,va;if(ke.prop!==""){let Ya=ke==null?void 0:ke.value;Array.isArray(Ya)?Ya=((Va=Ya==null?void 0:Ya[0])==null?void 0:Va.oldUrl)||"http://222.92.178.198:62001/"+((va=Ya==null?void 0:Ya[0])==null?void 0:va.url):Ya=Ya.toString(),ke={key:(ke==null?void 0:ke.prop)??(ke==null?void 0:ke.label),value:Ya},z.push(ke)}})}}),v.form=le.getFormContents(z),v},s=p=>{const v=[],z=R=>{R&&typeof R=="object"&&!Array.isArray(R)?Object.values(R).forEach(z):v.push(R)};return z(p),v},t=async(p,v,z)=>{var ke,Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql;Re.setImportLoading(!0),_a.setFreshContent(!1);let R=await tt().catch(qa=>(Re.setImportLoading(!1),Promise.reject(qa)));R=R==null?void 0:R.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 P=le.getEqualChild([(ke=U.value)==null?void 0:ke.filter(qa=>(qa==null?void 0:qa.label)!=="操作")]);const D=(va=(Va=le.tableToForm(R,P))==null?void 0:Va[0])==null?void 0:va.find(qa=>{const Dl=qa==null?void 0:qa.key;return Dl==="Interface"||Dl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),Re.setImportLoading(!1);return}const ie=U.value?le.getEqualChild([U.value]):[],G=ie.find(qa=>{const Dl=qa==null?void 0:qa.prop;return Dl==="Input1"||Dl==="输入数据.输入1"||Dl==="样本输入数据"}),xe=G==null?void 0:G.prop;let be=v==null?void 0:v[xe];const Ye=await _i().catch(qa=>(Re.setImportLoading(!1),Promise.reject(qa)));let Ge=!0,Xe="";(Ya=U.value)==null||Ya.forEach(qa=>{(qa==null?void 0:qa.prop)===xe&&(Ge=!!(qa!=null&&qa.childPath),Xe=qa==null?void 0:qa.childPath)});let ba="";if(Ge){let qa=(ze=(Ra=U.value)==null?void 0:Ra.find(hl=>(hl==null?void 0:hl.isMainKey)===!0))==null?void 0:ze.prop;ba=v==null?void 0:v[qa];let Dl=Xe==null?void 0:Xe.split(O),$a=[];Dl==null||Dl.forEach((hl,zl)=>{(Dl==null?void 0:Dl.length)-1===zl&&$a.push(ba),$a.push(hl)}),$a=$a==null?void 0:$a[0];let Ll=await le.getItemData($a,sessionStorage.getItem("systemKey"),""),rl=Ll==null?void 0:Ll.filter(hl=>(hl==null?void 0:hl.name)===xe);rl=rl==null?void 0:rl.map(hl=>{var zl;return hl.compData=(zl=hl==null?void 0:hl.compData)==null?void 0:zl.map(gl=>{var xr;return(gl==null?void 0:gl.key)==="tableContents"&&(gl.contents=(xr=gl==null?void 0:gl.contents)==null?void 0:xr.filter(ur=>(ur==null?void 0:ur[1])===(v==null?void 0:v[xe]))),gl}),hl}),(!rl||(rl==null?void 0:rl.length)===0)&&(rl=Ll,rl=rl==null?void 0:rl.map(hl=>{var zl;return hl.compData=(zl=hl==null?void 0:hl.compData)==null?void 0:zl.map(gl=>{var xr;return(gl==null?void 0:gl.key)==="tableContents"&&(gl.contents=(xr=gl==null?void 0:gl.contents)==null?void 0:xr.filter(ur=>{var er,kl;return(ur==null?void 0:ur[1])===(v==null?void 0:v[(kl=(er=U==null?void 0:U.value)==null?void 0:er[0])==null?void 0:kl.prop])})),gl}),hl})),be=ct(rl)}const Aa=await st(re,{token:Ye,inputData:be}).catch(qa=>(Re.setImportLoading(!1),Promise.reject(qa))),za=(Q=Aa==null?void 0:Aa.data)==null?void 0:Q.data,Ze=ie.find(qa=>(qa==null?void 0:qa.prop)==="Output1"),nl=Ze==null?void 0:Ze.prop;let wa=[],il=[];if(za&&((He=Object.values(za))==null?void 0:He.length)>0){let qa=[];const Dl=new FormData,$a=(sa=s(za))==null?void 0:sa.map(async rl=>{var hl,zl;if(!Array.isArray(rl)&&(rl!=null&&rl.includes("http"))){let gl=await Ja.axios.get(rl,{responseType:"blob"}),xr=(zl=rl==null?void 0:rl.split("/"))==null?void 0:zl[((hl=rl==null?void 0:rl.split("/"))==null?void 0:hl.length)-1];Dl.append("files",gl.data,xr)}else qa.push(rl)});if(await Promise.all($a),!le.isFormDataEmpty(Dl)){let rl=await pl.uploadAmountApi(Dl),hl=(Ia=(T=rl==null?void 0:rl.data)==null?void 0:T.result)==null?void 0:Ia.map(zl=>{var gl,xr,ur,er,kl,Yl;return{name:(Yl=(kl=(er=(gl=zl==null?void 0:zl.url)==null?void 0:gl.split("/"))==null?void 0:er[((ur=(xr=zl==null?void 0:zl.url)==null?void 0:xr.split("/"))==null?void 0:ur.length)-1])==null?void 0:kl.split("."))==null?void 0:Yl[0],url:zl==null?void 0:zl.url}});qa=[...qa,...hl]}let Ll={};for(let rl in v)rl!=="id"&&(Ll[rl]=v[rl]);Ll[nl]=qa,il.push({id:v==null?void 0:v.id,value:{tableData:Ll}})}if((il==null?void 0:il.length)>0){const qa=il.map($a=>{const Ll={id:$a.id,...$a.value.tableData};return delete Ll._isOCRRow,delete Ll._ocrTableId,delete Ll._isTemp,delete Ll.tableEditType,delete Ll.index,Ll}),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((ol=Il.value)==null?void 0:ol.plat_id),changeContents:Dl})}if((wa==null?void 0:wa.length)>0)try{await M.pageBatchAddApi({platId:parseInt((Ka=Il.value)==null?void 0:Ka.plat_id),changeContents:[{tableName:(Ca=d==null?void 0:d.related)==null?void 0:Ca.find(qa=>qa==null?void 0:qa.includes("content")),tableContents:wa.map(qa=>{var $a,Ll,rl;const Dl={id:(($a=qa==null?void 0:qa.key)==null?void 0:$a.id)??((Ll=qa==null?void 0:qa.key)==null?void 0:Ll.rowId)??(qa==null?void 0:qa.id),...((rl=qa==null?void 0:qa.value)==null?void 0:rl.tableData)||{}};return delete Dl._isOCRRow,delete Dl._ocrTableId,delete Dl._isTemp,delete Dl.tableEditType,delete Dl.index,Object.keys(Dl).forEach(hl=>{hl==="证书附件"&&Array.isArray(Dl[hl])&&(Dl[hl]=JSON.stringify(Dl[hl]))}),Dl})}]})}catch(qa){Ja.ElMessage.error(((ql=(dl=qa==null?void 0:qa.response)==null?void 0:dl.data)==null?void 0:ql.message)||(qa==null?void 0:qa.message)||"保存失败"),_a.setTableLoading(!1);return}Ui(!0),Re.setImportLoading(!1),_a.setFreshContent(!0)},h=(p,v)=>(p=p==null?void 0:p.map(z=>{var R,P;return z!=null&&z.children&&((R=z.children)!=null&&R.find(D=>D.id===(v==null?void 0:v.id))?z.children=(P=z.children)==null?void 0:P.filter(D=>(D==null?void 0:D.id)!==(v==null?void 0:v.id)):z.children=h(z.children,v)),z}),p),b=e.ref(!1),C=()=>{b.value=!0},$=async p=>{var z,R,P,D;b.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const re of v){const ie={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};ya.value.push(ie),hn(ie,"uploading"),Kr(ie,0);try{const G=new FormData;G.append("file",re,ie.name);const xe=await M.platformUploadFile(G);ie.uploadResult=((z=xe==null?void 0:xe.data)==null?void 0:z.result)||{name:ie.name,url:"",fileName:ie.name},el({name:((R=ie.uploadResult)==null?void 0:R.name)||ie.name,url:((P=ie.uploadResult)==null?void 0:P.url)||"",id:(D=ie.uploadResult)==null?void 0:D.id}),hn(ie,"uploaded"),Kr(ie,100)}catch(G){console.error("文件上传失败:",G),Ja.ElMessage.error(`文件 ${ie.name} 上传失败,请重试`),hn(ie,"pending"),Kr(ie,0);const xe=ya.value.findIndex(be=>be.uid===ie.uid);xe>-1&&ya.value.splice(xe,1)}}},K=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:(p,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)"}]}),X=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:""}),_e=()=>{X.show=!1},We=async p=>{var v,z,R,P,D,re,ie,G;try{const xe=[];let be=(v=Te.value||[])==null?void 0:v.slice();(p||[]).forEach(Aa=>{const za={...Aa};try{za.sort=si(0,be)}catch{}xe.push(za),be.unshift(za)});let Ye=await M.quoteApi({platId:parseInt((z=Il==null?void 0:Il.value)==null?void 0:z.plat_id),type:"fatherSyncs",related:[{menus:se.value,groups:""},{menus:se.value,groups:d==null?void 0:d.compName}]});Ye=(R=Ye==null?void 0:Ye.data)==null?void 0:R.result;let Ge=Ye==null?void 0:Ye.map(Aa=>({tableName:"content_"+(Aa==null?void 0:Aa.id),tableContents:xe==null?void 0:xe.map((za,Ze)=>({id:Ze,...za}))})),Xe=[{tableName:(P=d==null?void 0:d.related)==null?void 0:P.find(Aa=>Aa==null?void 0:Aa.includes("content")),tableContents:xe==null?void 0:xe.map((Aa,za)=>({id:za,...Aa}))}];Xe=[...Xe,...Ge];const ba=await M.pageBatchAddApi({platId:parseInt((D=Il.value)==null?void 0:D.plat_id),changeContents:Xe});if(((re=ba==null?void 0:ba.data)==null?void 0:re.code)===200){const Aa={buttonName:"新增",columns:U.value,fixContent:xe==null?void 0:xe.map((Ze,nl)=>({id:nl,...Ze})),relatedContents:d==null?void 0:d.related};await Nt(Aa),Ja.ElMessage.success("数据导入成功");let za=[];Xe==null||Xe.forEach(Ze=>{var nl;(nl=Ze==null?void 0:Ze.tableContents)==null||nl.forEach(wa=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wa),request_result:"{}",is_delete:!1,request_table:Ze==null?void 0:Ze.tableName,request_type:"export"})})}),await M.pageBatchAddApi({platId:parseInt((ie=Il==null?void 0:Il.value)==null?void 0:ie.plat_id),changeContents:[{tableName:"log",tableContents:za}]})}else{let Aa=[];Xe==null||Xe.forEach(za=>{var Ze;(Ze=za==null?void 0:za.tableContents)==null||Ze.forEach(nl=>{Aa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(nl),request_result:"{}",is_delete:!1,request_table:za==null?void 0:za.tableName,request_type:"error"})})}),await M.pageBatchAddApi({platId:parseInt((G=Il==null?void 0:Il.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Aa}]}),Ja.ElMessage.error("数据导入响应失败")}}catch(xe){throw new Error(xe)}},Ce=async p=>{var v,z,R,P,D,re,ie,G,xe,be;try{if(p==="cancel"&&(X.show=!1),p==="replace"&&((v=X==null?void 0:X.existRows)==null?void 0:v.length)>0){await M.pageBatchDeleteApi({platId:parseInt((z=Il.value)==null?void 0:z.plat_id),changeContents:[{tableName:((R=d==null?void 0:d.related)==null?void 0:R.find(Ge=>Ge==null?void 0:Ge.includes("content_")))||((P=d==null?void 0:d.related)==null?void 0:P.find(Ge=>Ge==null?void 0:Ge.includes("content"))),tableContents:X==null?void 0:X.existRows}]});const Ye=await M.pageBatchAddApi({platId:parseInt((D=Il.value)==null?void 0:D.plat_id),changeContents:[{tableName:(re=d==null?void 0:d.related)==null?void 0:re.find(Ge=>Ge==null?void 0:Ge.includes("content")),tableContents:(()=>{const Ge=(Te.value||[]).filter(za=>!((X==null?void 0:X.existRows)||[]).some(Ze=>String(Ze==null?void 0:Ze.id)===String(za==null?void 0:za.id))),Xe=(X==null?void 0:X.tableData)||[],ba=[];let Aa=Ge.slice();return Xe.forEach(za=>{const Ze={...za};try{Ze.sort=si(0,Aa)}catch{}ba.push(Ze),Aa.unshift(Ze)}),ba.map((za,Ze)=>({id:Ze,...za}))})()}]});if(((ie=Ye==null?void 0:Ye.data)==null?void 0:ie.code)!==200)return;(G=X.newRows)!=null&&G.length&&await We(X.newRows),await Nt({buttonName:"新增",columns:U.value,fixContent:(xe=X==null?void 0:X.tableData)==null?void 0:xe.map((Ge,Xe)=>({id:Xe,...Ge})),relatedContents:d==null?void 0:d.related}),(be=X.newRows)!=null&&be.length||Ja.ElMessage.success("数据导入成功")}}catch(Ye){throw new Error(Ye)}finally{X.show=!1,X.columns=[],X.tableData=[],X.existRows=[]}},na=()=>{K.show=!1},Oa=p=>{var v,z;if((p==null?void 0:p.buttonName)==="取消")return K.show=!1;K.to=p==null?void 0:p.content,!(!(d!=null&&d.index)||!((v=K.to)!=null&&v.groupName))&&(d==null?void 0:d.index)!==((z=K.to)==null?void 0:z.groupName)&&(j("change",{buttonName:"迁移",value:{from:K.from,to:K.to,data:K.selectRow}}),K.show=!1)},ll=async p=>{var v,z,R,P;if(p){if(!Ur.validateFileSize(p.raw)){Ja.ElMessage.warning(`文件大小不能超过 ${Zr.value.maxSize}MB`);const D=ya.value.findIndex(re=>re.uid===p.uid);D>-1&&ya.value.splice(D,1),Qa();return}if(!Ur.validateFileType(p.raw)){Ja.ElMessage.warning("请上传图片文件");const D=ya.value.findIndex(re=>re.uid===p.uid);D>-1&&ya.value.splice(D,1),Qa();return}hn(p,"uploading"),Kr(p,0);try{const D=new FormData;D.append("file",p.raw,p.name);const re=await M.platformUploadFile(D);p.uploadResult=((v=re==null?void 0:re.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},el({name:((z=p.uploadResult)==null?void 0:z.name)||p.name,url:((R=p.uploadResult)==null?void 0:R.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),hn(p,"uploaded"),Kr(p,100)}catch(D){console.error("文件上传失败:",D),Ja.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),hn(p,"pending"),Kr(p,0);const re=ya.value.findIndex(ie=>ie.uid===p.uid);re>-1&&ya.value.splice(re,1)}finally{Qa()}}},Qa=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},cl=async()=>{var z,R;if(sessionStorage.setItem("ocr_root_table_id",String((d==null?void 0:d.index)??"")),ya.value.length===0){Ja.ElMessage.warning("请先选择要上传的图片");return}if(ya.value.filter(P=>{const D=Gl(P);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){Ja.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}br.value=!0,De.value=0;let v=null;try{ya.value.forEach(Ze=>{hn(Ze,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{De.value<P?De.value+=1:clearInterval(v)},50);const D=ya.value.map(Ze=>{var nl,wa,il;return{name:((nl=Ze.uploadResult)==null?void 0:nl.name)||Ze.name,url:((wa=Ze.uploadResult)==null?void 0:wa.url)||"",fileName:((il=Ze.uploadResult)==null?void 0:il.fileName)||Ze.name}}),re=Ur.extractTableHeaders(U.value),ie=D.map(Ze=>({name:(Ze==null?void 0:Ze.fileName)||(Ze==null?void 0:Ze.name),url:(Ze==null?void 0:Ze.url)||""})),G=await Ur.recognize(ie,re);if(console.log(G,"ocrResult"),clearInterval(v),v=null,(G==null?void 0:G.code)===500||(G==null?void 0:G.type)==="error"||!(G!=null&&G.result)){De.value=0,ya.value.forEach(Ze=>{hn(Ze,"failed"),Kr(Ze,0)}),Ja.ElMessage.error((G==null?void 0:G.message)||"OCR识别失败,请重试"),br.value=!1;return}De.value=P;const xe=Array.isArray(G==null?void 0:G.result)?G.result:[];if(xe.length===0){De.value=0,ya.value.forEach(Ze=>{hn(Ze,"failed"),Kr(Ze,0)}),Ja.ElMessage.warning("OCR识别未返回有效数据"),br.value=!1;return}const be=new Set,Ye=[];xe.forEach((Ze,nl)=>{const wa=Ze!=null&&Ze.数据&&typeof(Ze==null?void 0:Ze.数据)=="object"?Ze.数据:{},il=Array.isArray(Ze==null?void 0:Ze.图片信息)?Ze.图片信息:[],ke=new Map;il.forEach(va=>{va!=null&&va.name&&ke.set(va.name,va.url||"")});const Va={_index:nl,_certType:(Ze==null?void 0:Ze.证书类型)||"",_certNo:(Ze==null?void 0:Ze.证书编号)||"",_ocrImages:il,__ocrFieldMeta:{}};Object.entries(wa).forEach(([va,Ya])=>{let Ra="",ze=0,Q=[],He="";Ya&&typeof Ya=="object"&&!Array.isArray(Ya)?(Ra=(Ya==null?void 0:Ya.value)??"",ze=(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]??"",ze=Ya[1]??0):(Ra=Ya??"",ze=0),Va[va]=Ra,Va[`${va}_accuracy`]=ze,be.add(va),Va.__ocrFieldMeta[va]={value:Ra,score:ze,bboxNorm:Q,imageName:He,imageUrl:He&&ke.get(He)||"",images:il}}),Ye.push(Va)});const Ge=[],Xe=new Set;Ye.forEach(Ze=>{Ze&&be.forEach(nl=>{const wa=Ze[`${nl}_accuracy`];(typeof wa=="number"?wa>0:wa!=null&&String(wa).trim()!==""&&String(wa)!=="0")&&Xe.add(nl)})}),be.forEach(Ze=>{Ge.push({prop:Ze,label:Ze,editable:!0,minWidth:230}),Xe.has(Ze)&&Ge.push({prop:`${Ze}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),ya.value.forEach(Ze=>{hn(Ze,"completed")}),De.value=100,Be.value=Ge,Pa.value=Ye,bl.value=D,Tl.value=G;const ba=["出厂编号","设备名称","制造厂"],Aa=Ge.filter(Ze=>Ze&&!Ze.isAccuracy&&typeof Ze.prop=="string").map(Ze=>Ze.prop),za=["出厂编号","设备名称","制造厂"];Oe.value=Aa.filter(Ze=>za.includes(Ze)),console.log("[OCR] 默认勾选字段 props:",Oe.value),ra.value=2,br.value=!1,ia.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),Ja.ElMessage.error(((R=(z=P==null?void 0:P.response)==null?void 0:z.data)==null?void 0:R.message)||"OCR识别失败,请重试"),br.value=!1,De.value=0,ya.value.forEach(D=>{hn(D,"pending"),Kr(D,0)})}},Cl=p=>{if(p==null)return"";let v=String(p);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 Ze,nl;const p=bl.value,v=Tl.value,z=Pa.value;if(!z||z.length===0){Ja.ElMessage.warning("暂无数据可添加");return}const R=(Ze=le.getAllLeafNodes(U.value)||[])==null?void 0:Ze.filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),P=new Map,D=new Map,re=(nl=R==null?void 0:R.find(wa=>(wa==null?void 0:wa.label)==="证书附件"))==null?void 0:nl.prop;R==null||R.forEach(wa=>{wa!=null&&wa.label&&(wa!=null&&wa.prop)&&(P.set(wa.label,wa.prop),D.set(wa.prop,wa.label))});const ie=Date.now(),G=wa=>String(ie*1e3+wa),xe=[],be=[],Ye=wa=>{const il=Bo&&Bo[wa]||[wa];for(const ke of il){const Va=P.get(ke);if(Va)return Va}return""},Ge=Ye("出厂编号"),Xe=Ye("设备名称"),ba=Ye("制造厂"),Aa=[],za=wa=>{var Ra,ze;if(!re)return[];const il=(Array.isArray(p)?p[wa]:null)||null,ke=(il==null?void 0:il.url)||"",Va=(il==null?void 0:il.fileName)||(il==null?void 0:il.name)||"";return(String(Va).toLowerCase().endsWith(".pdf")||String(ke).toLowerCase().endsWith(".pdf"))&&ke?[{url:ke,name:Va,fileName:Va}]:(Array.isArray((ze=(Ra=v==null?void 0:v.result)==null?void 0:Ra[wa])==null?void 0:ze.图片信息)?v.result[wa].图片信息:[]).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((wa,il)=>{var ol;const ke={id:G(il),_isOCRRow:!0,_ocrTableId:d==null?void 0:d.index};for(const[Ka,Ca]of P.entries())Object.prototype.hasOwnProperty.call(wa,Ka)&&(ke[Ca]=wa[Ka]);re&&(ke[re]=za(il));const Va=(Array.isArray(v==null?void 0:v.result)?v.result[il]:null)||null,va=(Array.isArray(p)?p[il]:null)||null,Ya=(va==null?void 0:va.url)||"",Ra=(va==null?void 0:va.fileName)||(va==null?void 0:va.name)||"",ze=String(Ra).toLowerCase().endsWith(".pdf")||String(Ya).toLowerCase().endsWith(".pdf"),Q={ts:Date.now(),versionId:String(Date.now())+"_"+String(il),label:new Date().toLocaleString(),certType:(Va==null?void 0:Va.证书类型)||"",certNo:(Va==null?void 0:Va.证书编号)||"",fileType:ze?"pdf":"image",sourceUrl:ze?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?ke==null?void 0:ke[Ka]:""),sa=He(Ge),T=He(Xe),Ia=He(ba);if(!!(Ge&&Xe&&ba&&sa&&T&&Ia)){const Ka=(Te.value||[]).find(Ca=>{const dl=Cl(Ge?Ca==null?void 0:Ca[Ge]:""),ql=Cl(Xe?Ca==null?void 0:Ca[Xe]:""),qa=Cl(ba?Ca==null?void 0:Ca[ba]:"");return dl&&ql&&qa&&dl===sa&&ql===T&&qa===Ia});if(Ka){Aa.push({idx:il,ocrRow:ke,versionItem:Q,ocrNo:sa,candidates:[Ka],selectedTargetId:String((Ka==null?void 0:Ka.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(sa&&Ge){const Ka=(Te.value||[]).filter(Ca=>{const dl=Cl(Ge?Ca==null?void 0:Ca[Ge]:"");return dl&&dl===sa});if(Ka.length>0){Aa.push({idx:il,ocrRow:ke,versionItem:Q,ocrNo:sa,candidates:Ka,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ke.sort===void 0||ke.sort===null||String(ke.sort).trim()===""){const Ka=(Te.value||[]).map(dl=>Ln(dl==null?void 0:dl.sort)).filter(dl=>dl!==null),Ca=Ka.length>0?Math.max(...Ka):((ol=Te.value)==null?void 0:ol.length)??0;ke.sort=String(Number((Ca+1).toFixed(6)))}}catch{}Jl(d==null?void 0:d.index,ke.id,Q),Aa.push({idx:il,ocrRow:ke,versionItem:Q,ocrNo:sa,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Aa||[]).length>0){ml.value=(Aa||[]).map(wa=>({...wa,selectedTargetId:(wa==null?void 0:wa.selectedTargetId)||""})),Ve.value=!0,Ne.value=be,Pl.value=xe,Da.value=v,ul.value=p,Za.value=re||"";return}},Vl=(p,v,z)=>{Pa.value[p]&&(Pa.value[p][v]=z)},Xl=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,cr=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},Ul=p=>{var z,R,P,D;if(ma.value===p){ma.value=null,xa.value=!1,ta.value="";return}ma.value=p,ta.value="";const v=(z=Pa.value)==null?void 0:z[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){ga.value=v._ocrImages.map(G=>({name:(G==null?void 0:G.name)||"",url:(G==null?void 0:G.url)||""})).filter(G=>G.name||G.url);const re=v.__ocrFieldMeta||{},ie=(R=Object.values(re))==null?void 0:R.find(G=>G==null?void 0:G.imageName);fl.value=(ie==null?void 0:ie.imageName)||((D=(P=ga.value)==null?void 0:P[0])==null?void 0:D.name)||"",xa.value=ga.value.length>0}else ga.value=[],xa.value=!1,fl.value=""},Ql=()=>{xl.value=!1,ya.value=[],sl.value=null,ra.value=1,Ga.value.clear(),wl.value.clear(),De.value=0,xa.value=!1},cn=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",Gl=p=>{const v=p.uid||p.name;return Ga.value.get(v)||"pending"},mn=p=>{const v=p.uid||p.name;return wl.value.get(v)||0},Kr=(p,v)=>{const z=p.uid||p.name;wl.value.set(z,Math.min(100,Math.max(0,v)))},Nn=p=>{const v=Gl(p),z=100.53;if(v==="completed"||v==="uploaded")return`${z} ${z}`;if(v==="failed")return`${z} ${z}`;if(v==="uploading"){const R=mn(p);return`${z*(R/100)} ${z}`}else if(v==="processing")return`${z*.5} ${z}`;return`0 ${z}`},hn=(p,v)=>{const z=p.uid||p.name;Ga.value.set(z,v),(v==="completed"||v==="uploaded")&&Kr(p,100)},ui=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async z=>{const R=Array.from(z.target.files||[]);for(const P of R){const D={name:P.name,raw:P,uid:Date.now()+Math.random()};ya.value.push(D),await ll(D)}z.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},ku=()=>{ra.value>1&&ra.value--},xu=()=>{ra.value===1?ya.value.length>0&&!br.value&&cl():ra.value===2&&(_l(),ra.value=3)},wu=async p=>{await $t(p==null?void 0:p.row)},_u=async({row:p,prop:v})=>{!p||!v||await $t(p,v)},$t=async(p,v)=>{var P,D;const z=p==null?void 0:p.id;if(!z){Ja.ElMessage.warning("暂无可预览数据");return}let R=Wa(d==null?void 0:d.index,z);if(!R||R.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),ie=re!==null?Number(re):null;if(ie!=null&&ie!==""&&!Number.isNaN(ie)){const G=Wa(ie,z);Array.isArray(G)&&G.length>0&&(Kl(d==null?void 0:d.index,z,G),R=G)}}if(!R||R.length===0){const re=(P=le.getAllLeafNodes(U.value)||[])==null?void 0:P.filter(G=>(G==null?void 0:G.type)!=="operate"&&(G==null?void 0:G.label)!=="操作"&&(G==null?void 0:G.prop)!=="operate"),ie=v||((D=re==null?void 0:re.find(G=>(G==null?void 0:G.label)==="证书附件"))==null?void 0:D.prop);if(ie&&p[ie]){const G=p[ie];let xe=[],be="",Ye=!1;if(typeof G=="string")try{const Ge=JSON.parse(G);Array.isArray(Ge)&&(xe=Ge.map(Xe=>({name:(Xe==null?void 0:Xe.name)||(Xe==null?void 0:Xe.fileName)||"",url:(Xe==null?void 0:Xe.url)||""})).filter(Xe=>Xe.url||Xe.name),xe.length>0&&(be=xe[0].url||"",Ye=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf")))}catch{be=G,Ye=String(G).toLowerCase().endsWith(".pdf"),xe=[{name:G,url:G}]}else Array.isArray(G)&&(xe=G.map(Ge=>({name:(Ge==null?void 0:Ge.name)||(Ge==null?void 0:Ge.fileName)||"",url:(Ge==null?void 0:Ge.url)||""})).filter(Ge=>Ge.url||Ge.name),xe.length>0&&(be=xe[0].url||"",Ye=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf")));if(xe.length>0||be){const Ge={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ye?"pdf":"image",sourceUrl:Ye?be:"",images:xe};R=[Ge],Jl(d==null?void 0:d.index,z,Ge)}}}if(!R||R.length===0){Ja.ElMessage.warning("暂无可预览数据");return}Ha.value=R,ha.value=!0},Su=p=>{ya.value=ya.value.filter((v,z)=>z!==p)},ut=async(p,v,z)=>{var R,P,D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya;if(Ma(d.config,{type:Sa.TABLE,tableOperate:p})){if(oa.value="",Ee.value=!0,ja.value=!0,j("onButtonClick",p,v),Y.value=[],p==="删除")M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ra,ze,Q,He;(Ra=Te.value)!=null&&Ra.find(sa=>(sa==null?void 0:sa.id)===(v==null?void 0:v.id))?Te.value=(ze=M.cloneDeep(Te.value))==null?void 0:ze.filter(sa=>(sa==null?void 0:sa.id)!==(v==null?void 0:v.id)):Te.value=h(M.cloneDeep(Te.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{}d0(Gr.value,Wl.value,v==null?void 0:v.id),_a.setTableLoading(d==null?void 0:d.index),j("change",{content:Te.value,fixContent:[v],index:d==null?void 0:d.index,type:"delete",name:d==null?void 0:d.groupNames,buttonName:p,columns:U.value,relatedContents:d==null?void 0:d.related}),console.log(v,"item")});else if(p==="批量删除"){if(((R=Mr.value)==null?void 0:R.length)===0)return Ja.ElMessage.warning("请先勾选操作的数据");M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var Q,He,sa,T,Ia;const Ra=(Q=Mr.value)==null?void 0:Q.map(Ua=>Ua.id);Te.value=(He=M.cloneDeep(Te.value))==null?void 0:He.filter(Ua=>!(Ra!=null&&Ra.includes(Ua.id))),_a.setTableLoading(d==null?void 0:d.index),j("change",{content:Te.value,fixContent:Mr.value,index:d==null?void 0:d.index,type:"delete",name:d==null?void 0:d.compName,buttonName:p,relatedContents:d==null?void 0:d.related,columns:U.value});const ze=(Ra||[]).filter(Boolean);if(ze.length>0&&ze.every(Ua=>Ua!=null&&Ua!=="")){const Ua=(Mr.value||[]).map(ol=>{const Ka={...ol};return delete Ka._isOCRRow,delete Ka._ocrTableId,delete Ka._isTemp,delete Ka.tableEditType,delete Ka.index,Ka});await M.pageBatchDeleteApi({platId:parseInt((sa=Il.value)==null?void 0:sa.plat_id),changeContents:[{tableName:((T=d==null?void 0:d.related)==null?void 0:T.find(ol=>ol==null?void 0:ol.includes("content_")))||((Ia=d==null?void 0:d.related)==null?void 0:Ia.find(ol=>ol==null?void 0:ol.includes("content"))),tableContents:Ua}]})}})}else if(p==="复制新增"){pa.value="复制新增",M.cloneDeep(v);const Ra=(P=U.value)==null?void 0:P.find(ze=>ze==null?void 0:ze.isMainKey);Ra||((D=U.value)==null||D[0]),rr.value=v,Ui(!0)}else if(p==="新增")pa.value="新增",ji(""),te.value=!0;else if(p==="编辑")pa.value="编辑",ji(v),te.value=!0;else if(p==="查看")pa.value="查看",ji(v),Ee.value=!1,ja.value=!1,te.value=!0;else if(p==="查看三维模型"){const Ra={};for(let Q in v)Q!=="id"&&(Ra[Q]=v[Q]);let ze=(re=Object.values(Ra))==null?void 0:re[1];ka.setTableShowThree(ze)}else if(p==="切换视图")Ru();else if(((ie=z==null?void 0:z.extra)==null?void 0:ie.type)==="modelExample")pa.value=p,we.value=!0;else if(p==="新建"){let Ra=da.value,ze=[];for(let Ia in Ra)Ia!=null&&Ia.includes(`loading${((G=Il.value)==null?void 0:G.account)||((xe=Il.value)==null?void 0:xe.账号)}`)&&(ze=[...ze,...Ia]);let Q=[];for(let Ia in Ra)Ia!=null&&Ia.includes(`updateLoading${((be=Il.value)==null?void 0:be.account)||((Ye=Il.value)==null?void 0:Ye.账号)}`)&&(Q=[...Q,...Ia]);let He=ze==null?void 0:ze.map(Ia=>Ia==null?void 0:Ia.id);const sa=Q==null?void 0:Q.map(Ia=>Ia==null?void 0:Ia.id);He=[...M.cloneDeep(He),...sa],(He==null?void 0:He.length)>0&&(He!=null&&He.every(Ia=>Ia!==null&&Ia))&&await qr.batchDeleteInsofDataApi({ids:He});const T=(Ge=$e.value)==null?void 0:Ge.find(Ia=>(Ia==null?void 0:Ia.label)==="新建");await Du(!1,T)}else if(p==="修改模板"){let Ra=M.cloneDeep(se).value;_a.setRouteToChildPath(Ra),Re.setActiveMenuPath(Ra+O)}else if(p==="执行")t(p,v);else if(p==="导出paraform"){const Ra=M.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const ze=["推力","真空","压力","温度","流量"],Q=kl=>{var Yl,pr,Ol;return kl?typeof(kl==null?void 0:kl.value)=="string"?kl.value:((Ol=(pr=(Yl=kl==null?void 0:kl._custom)==null?void 0:Yl.value)==null?void 0:pr.value)==null?void 0:Ol.value)||"":""},He=Array.isArray(tr.value)?tr.value:[],sa=Q(He.find(kl=>(kl==null?void 0:kl.condition)==="child")),T=String(sa||"").slice(0,8),Ia=kl=>{if(kl==null)return"";const Yl=String(kl).trim();if(!Yl)return"";if(/^\d{8}$/.test(Yl))return Yl;const pr=Yl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(pr){const fr=pr[1],wr=pr[2].padStart(2,"0"),hr=pr[3].padStart(2,"0");return`${fr}${wr}${hr}`}const Ol=Yl.replace(/\D/g,"");return Ol.length>=8?Ol.slice(0,8):""},Ua=async kl=>{var Yl,pr;if(!kl)return"";try{const Ol=await Wr("试验任务/任务管理",!1),fr=(dr,Nr=[])=>{if(!Array.isArray(dr))return Nr;for(const Rr of dr)(Rr==null?void 0:Rr.comp)==="Table"&&(Rr!=null&&Rr.name)&&Nr.push(Rr),Array.isArray(Rr==null?void 0:Rr.children)&&fr(Rr.children,Nr),Array.isArray(Rr==null?void 0:Rr.tab)&&fr(Rr.tab,Nr),Array.isArray(Rr==null?void 0:Rr.choice)&&fr(Rr.choice,Nr);return Nr},hr=fr(Ol||[]).find(dr=>(dr==null?void 0:dr.name)==="任务列表"),Dr=((pr=(Yl=hr==null?void 0:hr.compData)==null?void 0:Yl.find(dr=>(dr==null?void 0:dr.key)==="tableContents"))==null?void 0:pr.contents)||[];if(!Array.isArray(Dr)||Dr.length===0)return"";const rn=Dr.find(dr=>String((dr==null?void 0:dr["试验代号(名称)"])||"").slice(0,8)===kl);return Ia(rn==null?void 0:rn.计划试验时间)}catch(Ol){return console.warn("获取任务列表计划试验时间失败:",Ol),""}},ol=(se.value||"").replace(/\/+$/,""),Ka=sa?`${ol}/${sa}`:ol,Ca=await Wr(Ka||se.value,!1),dl=String(Ue.value||"").trim(),ql=kl=>String(kl||"").trim(),qa=(kl,Yl=[],pr="")=>{if(!Array.isArray(kl))return Yl;for(const Ol of kl){const fr=ql((Ol==null?void 0:Ol.choiceName)||(Ol==null?void 0:Ol.name0)||pr);(Ol==null?void 0:Ol.comp)==="Table"&&(Ol==null?void 0:Ol.name)&&ze.includes(Ol.name)&&(!dl||fr===dl)&&Yl.push(Ol),Array.isArray(Ol==null?void 0:Ol.children)&&qa(Ol.children,Yl,fr),Array.isArray(Ol==null?void 0:Ol.tab)&&qa(Ol.tab,Yl,fr),Array.isArray(Ol==null?void 0:Ol.choice)&&qa(Ol.choice,Yl,fr)}return Yl},Dl=qa(Ca||[]),$a=new Map;for(const kl of Dl)kl!=null&&kl.name&&!$a.has(kl.name)&&$a.set(kl.name,kl);const Ll=ze.map(kl=>$a.get(kl)).filter(Boolean);if(!Ll||Ll.length===0)return Ja.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const rl=kl=>{const Yl=new Map,pr=(Ol,fr=[])=>{if(Array.isArray(Ol))for(const wr of Ol){const hr=((wr==null?void 0:wr.label)??"").toString().trim(),Dr=hr?[...fr,hr]:[...fr];if(Array.isArray(wr==null?void 0:wr.children)&&wr.children.length>0)pr(wr.children,Dr);else{const dr=((wr==null?void 0:wr.prop)??"").toString();if(!dr)continue;const Nr=hr||dr,Rr=(Dr.length>0?[...fr,Nr]:[Nr]).join(".");Yl.set(dr,Rr)}}};return pr(kl,[]),Yl},hl=(kl,Yl)=>{const pr=rl(kl||[]),fr=(le.getAllLeafNodes(kl||[])||[]).filter(hr=>(hr==null?void 0:hr.prop)&&(hr==null?void 0:hr.type)!=="operate"&&(hr==null?void 0:hr.label)!=="操作"&&(hr==null?void 0:hr.prop)!=="operate"),wr=Array.isArray(Yl)?Yl:[];return wr.length===0?[]:wr.map(hr=>{const Dr={};return fr.forEach(rn=>{const dr=String(rn.prop),Nr=pr.get(dr)||String(rn.label||rn.prop);Dr[Nr]=(hr==null?void 0:hr[dr])??""}),Dr})},zl=Ll.map(kl=>{var wr,hr;const Yl=(kl==null?void 0:kl.compData)||[];let pr=(wr=Yl==null?void 0:Yl.find(Dr=>(Dr==null?void 0:Dr.key)==="header"))==null?void 0:wr.contents;Array.isArray(pr==null?void 0:pr[0])&&(pr=pr[0]);const Ol=((hr=Yl==null?void 0:Yl.find(Dr=>(Dr==null?void 0:Dr.key)==="tableContents"))==null?void 0:hr.contents)||[];if(!Array.isArray(pr)||pr.length===0||!Array.isArray(Ol)||Ol.length===0)return null;const fr=hl(pr||[],Ol||[]);return!Array.isArray(fr)||fr.length===0?null:{类型:kl==null?void 0:kl.name,数据:fr}}).filter(Boolean);if(!zl||zl.length===0)return Ja.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const gl=await Ua(T),xr={试验代号:T,试验日期:gl,ParaForm:zl},ur=await _i().catch(()=>""),er=await M.exportParaformApi(xr,ur);if(((Xe=er==null?void 0:er.data)==null?void 0:Xe.code)===200&&((Aa=(ba=er==null?void 0:er.data)==null?void 0:ba.result)!=null&&Aa.Excel文件)){const kl=er.data.result.Excel文件,Yl=await M.platformDownloadFile({url:kl}),pr=new Blob([Yl.data],{type:"application/vnd.ms-excel"}),Ol=URL.createObjectURL(pr),fr=M.dayjs().format("YYYYMMDD"),hr=`${(T||"UNKNOWN").trim()||"UNKNOWN"}_${fr}_paraform.xls`,Dr=document.createElement("a");Dr.href=Ol,Dr.download=hr,Dr.style.display="none",document.body.appendChild(Dr),Dr.click(),setTimeout(()=>{document.body.removeChild(Dr),URL.revokeObjectURL(Ol)},100);const rn=Array.isArray((Ze=(za=er==null?void 0:er.data)==null?void 0:za.result)==null?void 0:Ze.warnings)?er.data.result.warnings:[];if(rn.length>0){const dr=rn.map((Nr,Rr)=>`${Rr+1}. ${(Nr==null?void 0:Nr.field)||"未知字段"}:${(Nr==null?void 0:Nr.message)||""}`).join(`
23
+ `)},y=I=>{if(!I)return;const W=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:W,blobUrl:I}],u.value=!0},x=()=>{u.value=!1},O=()=>{_(),r("cancel")};return(I,W)=>{const Y=e.resolveComponent("el-input"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ir.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:O,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",m0,[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",y0,"初始化摄像头..."))],512),e.createElementVNode("div",g0,[e.createElementVNode("div",b0,[W[0]||(W[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",k0,[f.value.length===0?(e.openBlock(),e.createElementBlock("div",x0,"暂无图片")):(e.openBlock(),e.createElementBlock("div",w0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(de,j)=>(e.openBlock(),e.createElementBlock("div",{key:de.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:de.url,onClick:U=>y(de.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,_0),e.createElementVNode("div",{onClick:U=>k(j),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,S0)]))),128))]))],512)]),e.createElementVNode("div",E0,[W[1]||(W[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(Y,{type:"textarea",value:c.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",C0,[e.createVNode(fe,{onClick:J,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[2]||(W[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(fe,{onClick:A,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[3]||(W[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(fe,{onClick:F,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[4]||(W[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(fe,{onClick:L,disabled:!o.value,id:"themeBorderButton"},{default:e.withCtx(()=>W[5]||(W[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(fe,{onClick:E,disabled:!o.value,id:"themeButton"},{default:e.withCtx(()=>W[6]||(W[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),W[9]||(W[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(fe,{onClick:S,disabled:f.value.length===0,id:"themeButton"},{default:e.withCtx(()=>W[7]||(W[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(fe,{onClick:O,id:"themeBorderButton"},{default:e.withCtx(()=>W[8]||(W[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),u.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:x},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),T0=nr._export_sfc(D0,[["__scopeId","data-v-24a2050a"]]),ws=M.useMenuState(M.pinia);let Ni="$R";const B0=async a=>{var o,f,c,u,m,g;let l=a==null?void 0:a.导入文件,n=a==null?void 0:a.函数参数,r=(o=l==null?void 0:l[0])==null?void 0:o.url,i="";if(!(r!=null&&r.includes("http"))||!(r!=null&&r.includes("https"))){ws.setContentLoading(!0);const w=await M.platformDownloadFile({url:r});let d=w==null?void 0:w.data;const N=new FormData;N.append("file",d,((f=l==null?void 0:l[0])==null?void 0:f.name)+"."+((c=r==null?void 0:r.split("."))==null?void 0:c[1])),N.append("query",n);let _=await sc(N);_=(g=(m=(u=_==null?void 0:_.data)==null?void 0:u.data)==null?void 0:m.response)==null?void 0:g.replace("generateResult",a==null?void 0:a.函数名称),i=_,ws.setContentLoading(!1)}return i},N0=a=>{var n,r;if(a==="")return;let l=a;return l=(r=(n=l==null?void 0:l.replace("(",Ni))==null?void 0:n.split(Ni))==null?void 0:r[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,w;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 f=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=(w=(g=o==null?void 0:o.replace("(",Ni))==null?void 0:g.split(Ni))==null?void 0:w[1],o="("+o,o=le.calculatorAndToOr(o),{key:f,content:o}}),l},_s=(a,l)=>{let n=[l];return a==null||a.forEach(r=>{for(let i in r)r[i]!=="!"?n=n==null?void 0:n.filter(o=>{var f;return(o==null?void 0:o[i])===(r==null?void 0:r[i])||(o==null?void 0:o[(f=Object.keys(o))==null?void 0:f.find(c=>c==null?void 0:c.includes("."+i))])===(r==null?void 0:r[i])}):n=n==null?void 0:n.filter(o=>{var f;return(o==null?void 0:o[i])!==(r==null?void 0:r[i])&&(o==null?void 0:o[(f=Object.keys(o))==null?void 0:f.find(c=>c==null?void 0:c.includes("."+i))])!==(r==null?void 0:r[i])})}),n},Ot=M.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),A0=M.useModelComp(M.pinia),{extraContents:qv}=M.storeToRefs(A0),z0=M.useLoginState(M.pinia),{extraUrl:hi}=M.storeToRefs(z0);let _c=hi.value===""||!hi.value?"http://139.196.154.85:20015":hi.value;e.watch(()=>hi.value,()=>{_c=hi.value===""||!hi.value?"http://139.196.154.85:20015":hi.value},{deep:!0,immediate:!0});const Bo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},Ss={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:_c+"/api/public/paddleOCR"};class M0{constructor(l){dn(this,"config");this.config={...Ss,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const n=this.config.maxSize*1024*1024;return l.size<=n}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=Ja.Local.get(Ja.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,n){return{title:n,form:{OCR图片文件:l}}}async recognize(l,n){const r=this.getAuthorizationToken(),i=this.buildOCRRequest(l,n),o=this.config.apiUrl||Ss.apiUrl||"";return(await Ja.axios.post(o,i,{headers:{"Content-Type":"application/json",Authorization:r}})).data}getFieldAliases(l){return Bo[l]?Bo[l]:[l]}extractTableHeaders(l){const n=[],r=new Set,i=f=>{const c=f==null?void 0:f.label;return!(!c||c==="操作"||c===this.config.columnName||(f==null?void 0:f.type)==="operate"||(f==null?void 0:f.prop)==="operate")},o=f=>{(f||[]).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(!r.has(m)){r.add(m);const g=this.getFieldAliases(m);n.push(g)}}})};return o(l||[]),n}}function Sc(a){return new M0(a)}Sc();const Ct=async(a,l)=>{var f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y;let n=(c=(f=M.cloneDeep(a))==null?void 0:f.optionUrl)==null?void 0:c.menuSelect,r=[];n==null||n.forEach(x=>{});let i="",o=await le.menuToParent(n);if(o==null||o.forEach(x=>{var O,I,W,Y;(x==null?void 0:x.name)===(((Y=(W=(I=(O=M.cloneDeep(a))==null?void 0:O.optionUrl)==null?void 0:I.groupSelect)==null?void 0:W[0])==null?void 0:Y.replaceAll("'",""))??"")&&(i=x==null?void 0:x.id)}),l){i=l;const x=await qr.getInsofDataApi({id:i}),O=(w=(g=(m=(u=x==null?void 0:x.data)==null?void 0:u.result)==null?void 0:m[0])==null?void 0:g.key)==null?void 0:w.pageKey;o=await le.getItemData(O,sessionStorage.getItem("systemKey"),"")}if(i!==""){let x;l?x=(d=o==null?void 0:o.find(W=>(W==null?void 0:W.id)===l))==null?void 0:d.compData:x=(N=o==null?void 0:o.find(W=>{var Y,fe,de,j;return(W==null?void 0:W.name)===(((fe=(Y=a==null?void 0:a.groupSelect)==null?void 0:Y.split(":"))==null?void 0:fe[0])||((j=(de=a==null?void 0:a.optionUrl)==null?void 0:de.groupSelect)==null?void 0:j[0]))}))==null?void 0:N.compData;let O=(J=(_=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:_.contents)==null?void 0:J.map(W=>W==null?void 0:W.label);(F=(A=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:A.contents)!=null&&F.every(W=>Array.isArray(W))&&(O=(S=le.getColumnChild((E=(L=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0]))==null?void 0:S.map(W=>W==null?void 0:W.prop));let I=(y=(k=x==null?void 0:x.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:k.contents)==null?void 0:y.map(W=>{if(Array.isArray(W))W=W==null?void 0:W.filter(Y=>!(Y!=null&&Y.id));else{let Y={};for(let fe in W)fe!=="id"&&(Y[fe]=W==null?void 0:W[fe]);W=Y}return W});I==null||I.forEach(W=>{Array.isArray(W)?r.push(le.getValueToObjectValue(W,O)):r.push(W)})}return r},I0=M.useMenuState(M.pinia),{activeMenuPath:Wv}=M.storeToRefs(I0),O0=M.useUnit(M.pinia),{chooseTitle:Gv}=M.storeToRefs(O0),L0="col-operate",Ec=a=>`${L0}-${a}`,R0=(a,l)=>{const n=new Map;a.forEach(i=>{const{prop:o}=i;n.set(o,i)});const r=i=>{Array.isArray(i)&&i.forEach(o=>{const{prop:f}=o||{},c=n.get(f);$0(c,o),Array.isArray(o==null?void 0:o.children)&&o.children.length>0&&r(o.children)})};return r(l),l},$0=(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),V0=(a,l)=>{const{sortable:n=!1,filterable:r=!1,showSummary:i=!1,operable:o=!1,fixed:f=!1}=l||{};return{prop:a,sortable:n,filterable:r,showSummary:i,operable:o,fixed:f}},F0=async a=>{var o,f;if(!a)return;const l=Ec(a),n=await qr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),r=(o=n==null?void 0:n.data)==null?void 0:o.code,i=(f=n==null?void 0:n.data)==null?void 0:f.result;if(r==200)return i==null?void 0:i[0]},P0=async a=>{if(a)return[]},j0=async(a,l)=>{if(!a||!l)return;const n=Ec(a);return await qr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:l}})},H0=async(a,l)=>!a||!l?void 0:await qr.updateInsofDataApi({id:a,value:{columns:l}}),Es=async(a,l)=>{const n=sessionStorage.getItem("systemKey");if(!a||!l||!n)return;const r=await F0(a);return r?await H0(r==null?void 0:r.id,l):await j0(a,l)};var _o={exports:{}},U0=_o.exports,Cs;function q0(){return Cs||(Cs=1,function(a,l){(function(n,r){r()})(U0,function(){function n(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 r(m,g,w){var d=new XMLHttpRequest;d.open("GET",m),d.responseType="blob",d.onload=function(){u(d.response,g,w)},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 f=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=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=f.saveAs||(typeof window!="object"||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!c?function(m,g,w){var d=f.URL||f.webkitURL,N=document.createElement("a");g=g||m.name||"download",N.download=g,N.rel="noopener",typeof m=="string"?(N.href=m,N.origin===location.origin?o(N):i(N.href)?r(m,g,w):o(N,N.target="_blank")):(N.href=d.createObjectURL(m),setTimeout(function(){d.revokeObjectURL(N.href)},4e4),setTimeout(function(){o(N)},0))}:"msSaveOrOpenBlob"in navigator?function(m,g,w){if(g=g||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,w),g);else if(i(m))r(m,g,w);else{var d=document.createElement("a");d.href=m,d.target="_blank",setTimeout(function(){o(d)})}}:function(m,g,w,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof m=="string")return r(m,g,w);var N=m.type==="application/octet-stream",_=/constructor/i.test(f.HTMLElement)||f.safari,J=/CriOS\/[\d]+/.test(navigator.userAgent);if((J||N&&_||c)&&typeof FileReader<"u"){var A=new FileReader;A.onloadend=function(){var E=A.result;E=J?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=E:location=E,d=null},A.readAsDataURL(m)}else{var F=f.URL||f.webkitURL,L=F.createObjectURL(m);d?d.location=L:location.href=L,d=null,setTimeout(function(){F.revokeObjectURL(L)},4e4)}});f.saveAs=u.saveAs=u,a.exports=u})}(_o)),_o.exports}q0();const li=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}}}),W0=M.useLoginState(M.pinia),{loginUserInfo:yt}=M.storeToRefs(W0),G0=async a=>{var r,i,o;let l=await M.getAllTables({platId:parseInt((r=yt==null?void 0:yt.value)==null?void 0:r.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 gc(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}]}]},K0=M.useLoginState(),{loginUserInfo:vl}=M.storeToRefs(K0);let go="$R";const jr=M.useModelComp(M.pinia),Cc=e.ref(!1),{itemData:Y0,itemGridData:pi,curStructureCompIds:Ds,isSubmitCurStructure:J0,routeToChildPath:X0,pageMapState:Dt,itemExtendData:bo,refreshTable:Ts,refreshCurrentPageInform:Z0}=M.storeToRefs(jr),$o=li(M.pinia),Xr=M.useMenuState(M.pinia),mr=e.shallowRef([]),{asideMenus:Q0,activeTopMenuPath:e3,activeMenuPath:Sl,platform:Kv,buttonTriggerType:a3,currentMenuPath:kn}=M.storeToRefs(Xr),Sn=M.useUnit(M.pinia),{selectTitle:Qn,chooseTitle:No}=M.storeToRefs(Sn);e.ref();const Li=e.ref(!0),ai=e.ref(0),Tt=e.ref([]);e.ref(!1);const Lt=e.ref(!1),Zi=e.ref(),Dc=e.ref(),Tc=e.ref(),l3=()=>{jr.setItemGridData([]),jr.setIsEdit("edit"),jr.setSubmitCurStructure(Sl.value!=="/平台管理/菜单管理")},r3=()=>{jr.setIsEdit("view"),jr.setRefreshCurStructure(!0)},n3=async a=>{var i;let l=Qn.value,n=l==null?void 0:l.findIndex(o=>(o==null?void 0:o.value)===(a==null?void 0:a.value)),r=l==null?void 0:l.filter((o,f)=>f<=n);Sn.setSelectTitle(pl.safeClone(r)),r=(i=r==null?void 0:r.map(o=>o==null?void 0:o.value))==null?void 0:i.join("/"),Xr.setActiveMenuPath(null),Xr.setActiveMenuPath(r)},gt=async(a,l,n,r="contentConfig")=>{var i;try{if(!Array.isArray(a))return;let o,f;l==="create"?(o={dataList:a==null?void 0:a.map(u=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...u,compData:(m=u==null?void 0:u.compData)==null?void 0:m.filter(g=>(g==null?void 0:g.key)!=="tableContents")}}}})},f=qr.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")}}}})},f=qr.batchUpdateInsofDataApi):l==="delete"&&(o={ids:a},f=qr.batchDeleteInsofDataApi);const c=await f(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("保存响应失败")}},Bs=async(a,l,n,r)=>{var i,o,f,c,u,m,g,w,d,N,_;try{const J=(o=(i=a==null?void 0:a.results)==null?void 0:i.filter(k=>!(k!=null&&k.id)||typeof(k==null?void 0:k.id)=="string"))==null?void 0:o.map(k=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:n},value:{tableData:k}})),A=(c=(f=a==null?void 0:a.results)==null?void 0:f.filter(k=>(k==null?void 0:k.id)&&typeof(k==null?void 0:k.id)=="number"))==null?void 0:c.map(k=>({id:k==null?void 0:k.id,value:{tableData:k}})),F=JSON.parse(JSON.stringify(a)),L=(u=F==null?void 0:F.results)==null?void 0:u.map(k=>k.id);let E;n?E=(w=(g=(m=Dt.value)==null?void 0:m[Sl.value])==null?void 0:g.filter(k=>{var y,x,O;return((y=k==null?void 0:k.key)==null?void 0:y.type)===l&&((O=(x=k==null?void 0:k.key)==null?void 0:x.relatedInfo)==null?void 0:O.target)===r}))==null?void 0:w.map(k=>k==null?void 0:k.id):E=(_=(N=(d=Dt.value)==null?void 0:d[Sl.value])==null?void 0:N.filter(k=>{var y;return((y=k==null?void 0:k.key)==null?void 0:y.type)===l}))==null?void 0:_.map(k=>k==null?void 0:k.id);const S=E==null?void 0:E.filter(k=>!(L!=null&&L.includes(k))&&typeof k=="number");(J==null?void 0:J.length)>0&&await qr.batchAddInsofDataApi({dataList:J}),(A==null?void 0:A.length)>0&&await qr.batchUpdateInsofDataApi({dataList:A}),(S==null?void 0:S.length)>0&&await qr.batchDeleteInsofDataApi({ids:S})}catch(J){throw new Error(J)}},i3=async a=>{var m,g,w,d,N,_,J,A,F,L;Xr.setContentLoading(!0);const l=JSON.parse(JSON.stringify(Y0.value));if(!J0.value)return Xr.setCacheStructures({key:a3.value,data:l}),Ja.ElMessage.success("已暂存");const n=l==null?void 0:l.map(E=>E.id),r=n.filter(E=>{var S;return!((S=Ds.value)!=null&&S.includes(E))}),i=(m=Ds.value)==null?void 0:m.filter(E=>!n.includes(E)),o=[...r,...i].filter(E=>typeof E!==null&&typeof E<"u"),f=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(gt(o,"delete",a)),f&&(f==null?void 0:f.length)>0&&u.push(gt(f,"create",a)),c&&(c==null?void 0:c.length)>0&&u.push(gt(c,"update",a)),pi.value&&((g=pi.value)!=null&&g.isDelete&&((d=(w=pi.value)==null?void 0:w.results)==null?void 0:d.length)>0&&((_=(N=pi.value)==null?void 0:N.results)!=null&&_.every(E=>typeof E=="number"))?await qr.batchDeleteInsofDataApi({ids:(J=pi.value)==null?void 0:J.results}):(console.log("itemGridData.value",pi.value),u.push(await Bs(pi.value,"gridLayout")))),bo.value)for(const E in bo.value)u.push(await Bs((A=bo.value)==null?void 0:A[E],"extend",{target:E,compId:(L=(F=bo.value)==null?void 0:F[E])==null?void 0:L.compId},E));await Promise.all(u).then(()=>{Ja.ElMessage.success("保存成功"),jr.setRefreshCurStructure(!0)}).catch(E=>{Ja.ElMessage.success(E)}),Xr.setContentLoading(!1)},Qi=a=>Ri(a),o3=e.computed(()=>{var a;return(a=mr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Bc=e.computed(()=>{var a;return(a=mr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),Nc=e.ref(0),Ac=e.ref(null),t3="ocr_committed_temp_ids_v1",s3=(a,l)=>`${t3}:${String(a??"")}:${String(l??"")}`,c3=(a,l,n)=>{try{const r=s3(a,l),i=sessionStorage.getItem(r),o=i?JSON.parse(i):[],f=Array.isArray(o)?o:[],c=Array.from(new Set([...f,...n||[]].map(u=>String(u)))).slice(-200);sessionStorage.setItem(r,JSON.stringify(c))}catch{}},Ao=async(a,l="data",n)=>{var i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,E,S,k,y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br;let r=((f=(o=(i=Qn.value)==null?void 0:i.filter(ya=>(ya==null?void 0:ya.condition)==="child"))==null?void 0:o[0])==null?void 0:f.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let ya=(c=a==null?void 0:a.fixContent)==null?void 0:c.map(sl=>{let ha={};for(let Ha in sl)Array.isArray(sl==null?void 0:sl[Ha])?ha[Ha]=JSON.stringify(sl==null?void 0:sl[Ha]):ha[Ha]=sl==null?void 0:sl[Ha];return ha});if(ya!=null&&ya.every(sl=>sl==null?void 0:sl.menuPathContent)){let sl=(u=ya==null?void 0:ya[0])==null?void 0:u.menuPathContent;ya=ya==null?void 0:ya.map(ia=>(ia.id="0",ia==null||delete ia.menuPathContent,ia)),(sl==null?void 0:sl[0])==="$"&&(sl=sl==null?void 0:sl.slice(1,sl==null?void 0:sl.length));let ha=(m=le.analyzeSplitToContent(sl,"*"))==null?void 0:m[0],Ha=(g=le.analyzeSplitToContent(sl,"*"))==null?void 0:g[1];ha=ha==null?void 0:ha.slice(0,(ha==null?void 0:ha.length)-1),ha=(w=le.analyzeSplitToContent(ha,":"))==null?void 0:w.map(ia=>{var Pa,Be,La,al,bl;if((ia==null?void 0:ia[(ia==null?void 0:ia.length)-1])===":"&&(ia=ia==null?void 0:ia.slice(0,(ia==null?void 0:ia.length)-1)),(ia==null?void 0:ia[0])==="{"){ia=ia==null?void 0:ia.slice(1,(ia==null?void 0:ia.length)-1),(ia==null?void 0:ia[0])==="*"&&(ia=ia==null?void 0:ia.slice(1,ia==null?void 0:ia.length));let Tl=ia==null?void 0:ia.split(":"),Oe=Tl==null?void 0:Tl[0],ma=Tl==null?void 0:Tl[1];ma=ma==null?void 0:ma.slice(1,(ma==null?void 0:ma.length)-1);let ta=(Pa=mr.value)==null?void 0:Pa.filter(xa=>(xa==null?void 0:xa.name)===Oe);ta=ta==null?void 0:ta[0],ta=(bl=(al=(La=(Be=ta==null?void 0:ta.compData)==null?void 0:Be.find(xa=>(xa==null?void 0:xa.key)==="tableContents"))==null?void 0:La.contents)==null?void 0:al[0])==null?void 0:bl[ma],ia=ta}return ia}),ha=ha==null?void 0:ha.join("/");let ra=await M.getPageDataApi({platId:parseInt((d=vl==null?void 0:vl.value)==null?void 0:d.plat_id),pageName:"menu"});ra=(N=ra==null?void 0:ra.data)==null?void 0:N.result,ra=ra==null?void 0:ra.find(ia=>(ia==null?void 0:ia.object_name)===ha&&(ia==null?void 0:ia.property_name)===Ha);let Ga=(ra==null?void 0:ra.object_id)??"";if(Ga===""){Ja.ElMessage.warning("添加页面数据不存在");return}let wl=[{tableName:"content_"+Ga,tableContents:ya}];await M.pageBatchAddApi({platId:parseInt((_=vl==null?void 0:vl.value)==null?void 0:_.plat_id),changeContents:wl});let De=[];wl==null||wl.forEach(ia=>{var Pa;(Pa=ia==null?void 0:ia.tableContents)==null||Pa.forEach(Be=>{De.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Be),request_result:"{}",is_delete:!1,request_table:ia==null?void 0:ia.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((J=vl==null?void 0:vl.value)==null?void 0:J.plat_id),changeContents:[{tableName:"log",tableContents:De}]})}else{let sl=await M.quoteApi({platId:parseInt((A=vl==null?void 0:vl.value)==null?void 0:A.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});sl=(F=sl==null?void 0:sl.data)==null?void 0:F.result,sl=sl==null?void 0:sl.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let ha=sl==null?void 0:sl.map(De=>{var La,al;let ia={},Pa=ya==null?void 0:ya[0],Be;return Array.isArray((La=De==null?void 0:De.struct)==null?void 0:La[0])?Be=le.getColumnChild((al=De==null?void 0:De.struct)==null?void 0:al[0]):Be=De==null?void 0:De.struct,Be=Be==null?void 0:Be.filter(bl=>(bl==null?void 0:bl.prop)!=="relatedId"),Be==null||Be.forEach(bl=>{var Tl,Oe;ia[bl.prop]=((Tl=bl==null?void 0:bl.words)!=null&&Tl[0]?(Pa==null?void 0:Pa[(Oe=bl==null?void 0:bl.words)==null?void 0:Oe[0]])??(Pa==null?void 0:Pa[bl==null?void 0:bl.prop]):Pa==null?void 0:Pa[bl==null?void 0:bl.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ia]}}),Ha=[{tableName:(L=a==null?void 0:a.relatedContents)==null?void 0:L.find(De=>De==null?void 0:De.includes("content")),tableContents:ya}];Ha=[...Ha,...ha];let ra=await M.quoteApi({platId:parseInt((E=vl==null?void 0:vl.value)==null?void 0:E.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});ra=(k=(S=ra==null?void 0:ra.data)==null?void 0:S.result)==null?void 0:k.filter(De=>!(Ha!=null&&Ha.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(De==null?void 0:De.id)))),ra=ra==null?void 0:ra.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let Ga=ra==null?void 0:ra.map(De=>{var La,al,bl,Tl,Oe,ma,ta;let ia={},Pa=ya==null?void 0:ya[0],Be;return Array.isArray((La=De==null?void 0:De.struct)==null?void 0:La[0])?Be=le.getColumnChild((al=De==null?void 0:De.struct)==null?void 0:al[0]):Be=De==null?void 0:De.struct,Be=Be==null?void 0:Be.filter(xa=>(xa==null?void 0:xa.prop)!=="relatedId"),((Tl=(bl=Be==null?void 0:Be[0])==null?void 0:bl.words)!=null&&Tl[0]?Pa!=null&&Pa[(ma=(Oe=Be==null?void 0:Be[0])==null?void 0:Oe.words)==null?void 0:ma[0]]:Pa!=null&&Pa[(ta=Be==null?void 0:Be[0])==null?void 0:ta.prop])?(Be==null||Be.forEach(xa=>{var ga,fl;ia[xa.prop]=((ga=xa==null?void 0:xa.words)!=null&&ga[0]?(Pa==null?void 0:Pa[(fl=xa==null?void 0:xa.words)==null?void 0:fl[0]])??(Pa==null?void 0:Pa[xa==null?void 0:xa.prop]):Pa==null?void 0:Pa[xa==null?void 0:xa.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort):ia=void 0,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ia]}});Ga=Ga==null?void 0:Ga.filter(De=>{var ia;return!((ia=De==null?void 0:De.tableContents)!=null&&ia.every(Pa=>Pa===void 0))}),Ha=[...Ha,...Ga],await M.pageBatchAddApi({platId:parseInt((y=vl==null?void 0:vl.value)==null?void 0:y.plat_id),changeContents:Ha});let wl=[];Ha==null||Ha.forEach(De=>{var ia;(ia=De==null?void 0:De.tableContents)==null||ia.forEach(Pa=>{wl.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Pa),request_result:"{}",is_delete:!1,request_table:De==null?void 0:De.tableName,request_type:"add"})})}),await M.pageBatchAddApi({platId:parseInt((x=vl==null?void 0:vl.value)==null?void 0:x.plat_id),changeContents:[{tableName:"log",tableContents:wl}]})}}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const ya=((a==null?void 0:a.ocrRows)||[]).map(ra=>ra==null?void 0:ra.id).filter(ra=>ra!=null),sl=((a==null?void 0:a.ocrRows)||[]).map(ra=>{const Ga={...ra};return delete Ga._isOCRRow,delete Ga._ocrTableId,Object.keys(Ga).forEach(wl=>{/(^|\.)证书附件$/.test(wl)&&Array.isArray(Ga[wl])&&(Ga[wl]=JSON.stringify(Ga[wl].map(De=>({url:(De==null?void 0:De.url)||"",name:(De==null?void 0:De.name)||(De==null?void 0:De.fileName)||"",fileName:(De==null?void 0:De.fileName)||(De==null?void 0:De.name)||""})).filter(De=>De.url||De.name)))}),Ga});let ha=[{tableName:(O=a==null?void 0:a.relatedContents)==null?void 0:O.find(ra=>ra==null?void 0:ra.includes("content")),tableContents:sl}];await M.pageBatchAddApi({platId:parseInt((I=vl==null?void 0:vl.value)==null?void 0:I.plat_id),changeContents:ha});let Ha=[];ha==null||ha.forEach(ra=>{var Ga;(Ga=ra==null?void 0:ra.tableContents)==null||Ga.forEach(wl=>{Ha.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wl),request_result:"{}",is_delete:!1,request_table:ra==null?void 0:ra.tableName,request_type:"ocrBatchAdd"})})}),await M.pageBatchAddApi({platId:parseInt((W=vl==null?void 0:vl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:Ha}]}),c3(a==null?void 0:a.parentTableId,a==null?void 0:a.index,ya)}if((a==null?void 0:a.buttonName)==="编辑"){const sl=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(Be=>{const La={...Be};return delete La._isOCRRow,delete La._ocrTableId,delete La._isTemp,delete La.tableEditType,delete La.index,La});let ha=sl==null?void 0:sl.map(Be=>{let La={};for(let al in Be)Array.isArray(Be==null?void 0:Be[al])?La[al]=JSON.stringify(Be==null?void 0:Be[al]):La[al]=Be==null?void 0:Be[al];return La}),Ha=await M.quoteApi({platId:parseInt((Y=vl==null?void 0:vl.value)==null?void 0:Y.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});Ha=(fe=Ha==null?void 0:Ha.data)==null?void 0:fe.result,Ha=Ha==null?void 0:Ha.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))});let ra=(de=ha==null?void 0:ha[0])==null?void 0:de.id,Ga=[{tableName:(j=a==null?void 0:a.relatedContents)==null?void 0:j.find(Be=>Be==null?void 0:Be.includes("content")),tableContents:ha}],wl=(U=Ha==null?void 0:Ha.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa,ga;return JSON.stringify(ta==null?void 0:ta.relatedId)!=="{}"&&(ta==null?void 0:ta.relatedId)!==""&&(ta!=null&&ta.relatedId)?(xa=ta==null?void 0:ta.relatedId)==null?void 0:xa.includes(parseInt(ra)):(ta==null?void 0:ta.sort)===((ga=ha==null?void 0:ha[0])==null?void 0:ga.sort)});if((La==null?void 0:La.length)>0){let ta=ha==null?void 0:ha[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var ml,Ne;xa[Ve.prop]=((ml=Ve==null?void 0:Ve.words)!=null&&ml[0]?(ga==null?void 0:ga[(Ne=Ve==null?void 0:Ve.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??""}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,delete xa.relatedId,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:U.filter(Be=>Be);Ga=[...Ga,...wl];let De=await M.quoteApi({platId:parseInt((Z=vl==null?void 0:vl.value)==null?void 0:Z.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});De=(ge=(ee=De==null?void 0:De.data)==null?void 0:ee.result)==null?void 0:ge.filter(Be=>!(Ga!=null&&Ga.find(La=>(La==null?void 0:La.tableName)==="content_"+(Be==null?void 0:Be.id)))),De=De==null?void 0:De.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))});let ia=(Ie=De==null?void 0:De.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa,ga,fl;return JSON.stringify(ta==null?void 0:ta.relatedId)!=="{}"&&(ta==null?void 0:ta.relatedId)!==""&&(ta!=null&&ta.relatedId)?(xa=ta==null?void 0:ta.relatedId)==null?void 0:xa.includes(parseInt(ra)):(ta==null?void 0:ta.sort)===((ga=ha==null?void 0:ha[0])==null?void 0:ga.sort)||(ta==null?void 0:ta.sort)===(parseInt(((fl=ha==null?void 0:ha[0])==null?void 0:fl.sort)??"0")+1).toString()});if((La==null?void 0:La.length)>0){let ta=ha==null?void 0:ha[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var ml,Ne,Pl,Da;((ml=Ve==null?void 0:Ve.words)!=null&&ml[0]?(ga==null?void 0:ga[(Ne=Ve==null?void 0:Ve.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga!=null&&ga[Ve==null?void 0:Ve.prop])&&(xa[Ve.prop]=((Pl=Ve==null?void 0:Ve.words)!=null&&Pl[0]?(ga==null?void 0:ga[(Da=Ve==null?void 0:Ve.words)==null?void 0:Da[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??"")}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,delete xa.relatedId,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:Ie.filter(Be=>Be);Ga=[...Ga,...ia],await M.pageBatchUpdateApi({platId:parseInt((ue=vl==null?void 0:vl.value)==null?void 0:ue.plat_id),changeContents:Ga});let Pa=[];Ga==null||Ga.forEach(Be=>{var La;(La=Be==null?void 0:Be.tableContents)==null||La.forEach(al=>{Pa.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(al),request_result:"{}",is_delete:!1,request_table:Be==null?void 0:Be.tableName,request_type:"update"})})}),await M.pageBatchAddApi({platId:parseInt((B=vl==null?void 0:vl.value)==null?void 0:B.plat_id),changeContents:[{tableName:"log",tableContents:Pa}]})}if((a==null?void 0:a.buttonName)==="删除"){let ya=[{tableName:(oe=a==null?void 0:a.relatedContents)==null?void 0:oe.find(De=>De==null?void 0:De.includes("content")),tableContents:a==null?void 0:a.fixContent}],sl=await M.quoteApi({platId:parseInt((q=vl==null?void 0:vl.value)==null?void 0:q.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});sl=(ye=sl==null?void 0:sl.data)==null?void 0:ye.result,sl=sl==null?void 0:sl.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let ha=(Ae=(Ke=a==null?void 0:a.fixContent)==null?void 0:Ke[0])==null?void 0:Ae.id,Ha=(Qe=sl==null?void 0:sl.map(De=>{var Pa,Be,La,al,bl,Tl;let ia=(Pa=De==null?void 0:De.contents)==null?void 0:Pa.filter(Oe=>{var ma,ta,xa;return JSON.stringify(Oe==null?void 0:Oe.relatedId)!=="{}"&&(Oe==null?void 0:Oe.relatedId)!==""&&(Oe!=null&&Oe.relatedId)?(ma=Oe==null?void 0:Oe.relatedId)==null?void 0:ma.includes(parseInt(ha)):(Oe==null?void 0:Oe.sort)===((xa=(ta=a==null?void 0:a.fixContent)==null?void 0:ta[0])==null?void 0:xa.sort)});if((ia==null?void 0:ia.length)>0){let Oe=(Be=a==null?void 0:a.fixContent)==null?void 0:Be[0];Oe={...Oe,id:(La=ia==null?void 0:ia[0])==null?void 0:La.id};let ma={},ta=Oe,xa;return Array.isArray((al=De==null?void 0:De.struct)==null?void 0:al[0])?xa=le.getColumnChild((bl=De==null?void 0:De.struct)==null?void 0:bl[0]):xa=De==null?void 0:De.struct,xa=xa==null?void 0:xa.filter(ga=>(ga==null?void 0:ga.prop)!=="relatedId"),xa==null||xa.forEach(ga=>{var fl,Ve;ma[ga.prop]=((fl=ga==null?void 0:ga.words)!=null&&fl[0]?(ta==null?void 0:ta[(Ve=ga==null?void 0:ga.words)==null?void 0:Ve[0]])??(ta==null?void 0:ta[ga==null?void 0:ga.prop]):ta==null?void 0:ta[ga==null?void 0:ga.prop])??""}),ma.id=(Tl=ia==null?void 0:ia[0])==null?void 0:Tl.id,delete ma.sort,delete ma.relatedId,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ma]}}else return}))==null?void 0:Qe.filter(De=>De);ya=[...ya,...Ha];let ra=await M.quoteApi({platId:parseInt((Ea=vl==null?void 0:vl.value)==null?void 0:Ea.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});ra=(ua=(ne=ra==null?void 0:ra.data)==null?void 0:ne.result)==null?void 0:ua.filter(De=>!(ya!=null&&ya.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(De==null?void 0:De.id)))),ra=ra==null?void 0:ra.filter(De=>{var ia,Pa;return!((De==null?void 0:De.fatherPath)!==""&&((Pa=(ia=De==null?void 0:De.quote)==null?void 0:ia[0])==null?void 0:Pa.menus)===(Sl==null?void 0:Sl.value))});let Ga=(Pe=ra==null?void 0:ra.map(De=>{var Pa,Be,La,al,bl,Tl;let ia=(Pa=De==null?void 0:De.contents)==null?void 0:Pa.filter(Oe=>{var ma,ta,xa;return JSON.stringify(Oe==null?void 0:Oe.relatedId)!=="{}"&&(Oe==null?void 0:Oe.relatedId)!==""&&(Oe!=null&&Oe.relatedId)?(ma=Oe==null?void 0:Oe.relatedId)==null?void 0:ma.includes(parseInt(ha)):(Oe==null?void 0:Oe.sort)===((xa=(ta=a==null?void 0:a.fixContent)==null?void 0:ta[0])==null?void 0:xa.sort)});if((ia==null?void 0:ia.length)>0){let Oe=(Be=a==null?void 0:a.fixContent)==null?void 0:Be[0];Oe={...Oe,id:(La=ia==null?void 0:ia[0])==null?void 0:La.id};let ma={},ta=Oe,xa;return Array.isArray((al=De==null?void 0:De.struct)==null?void 0:al[0])?xa=le.getColumnChild((bl=De==null?void 0:De.struct)==null?void 0:bl[0]):xa=De==null?void 0:De.struct,xa=xa==null?void 0:xa.filter(ga=>(ga==null?void 0:ga.prop)!=="relatedId"),xa==null||xa.forEach(ga=>{var fl,Ve;ma[ga.prop]=((fl=ga==null?void 0:ga.words)!=null&&fl[0]?(ta==null?void 0:ta[(Ve=ga==null?void 0:ga.words)==null?void 0:Ve[0]])??(ta==null?void 0:ta[ga==null?void 0:ga.prop]):ta==null?void 0:ta[ga==null?void 0:ga.prop])??""}),ma.id=(Tl=ia==null?void 0:ia[0])==null?void 0:Tl.id,delete ma.sort,delete ma.relatedId,{tableName:"content_"+(De==null?void 0:De.id),tableContents:[ma]}}else return}))==null?void 0:Pe.filter(De=>De);ya=[...ya,...Ga],await M.pageBatchDeleteApi({platId:parseInt((Re=vl==null?void 0:vl.value)==null?void 0:Re.plat_id),changeContents:ya});let wl=[];ya==null||ya.forEach(De=>{var ia;(ia=De==null?void 0:De.tableContents)==null||ia.forEach(Pa=>{wl.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Pa),request_result:"{}",is_delete:!1,request_table:De==null?void 0:De.tableName,request_type:"delete"})})}),await M.pageBatchAddApi({platId:parseInt((Le=vl==null?void 0:vl.value)==null?void 0:Le.plat_id),changeContents:[{tableName:"log",tableContents:wl}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let ya=await M.getPageDataApi({platId:parseInt((se=vl==null?void 0:vl.value)==null?void 0:se.plat_id),pageName:"menu"});if(ya=(me=ya==null?void 0:ya.data)==null?void 0:me.result,ya!=null&&ya.find(sl=>(sl==null?void 0:sl.father_name)===Sl.value+"/")){Tc.value=a,Dc.value=ya==null?void 0:ya.filter(Ha=>(Ha==null?void 0:Ha.father_name)===Sl.value+"/");let sl=(ka=(qe=a==null?void 0:a.columns)==null?void 0:qe.find(Ha=>Ha==null?void 0:Ha.mainKey))==null?void 0:ka.prop,ha=(H=(_a=a==null?void 0:a.fixContent)==null?void 0:_a[0])==null?void 0:H[sl];Lt.value=!0,Zi.value=[{prop:sl,label:sl,name:sl,value:ha}]}else{let sl=(V=a==null?void 0:a.fixContent)==null?void 0:V.map(ra=>{let Ga={};for(let wl in ra)Array.isArray(ra==null?void 0:ra[wl])?Ga[wl]=JSON.stringify(ra==null?void 0:ra[wl]):Ga[wl]=ra==null?void 0:ra[wl];return Ga.relatedId="",Ga}),ha=[{tableName:(ae=a==null?void 0:a.relatedContents)==null?void 0:ae.find(ra=>ra==null?void 0:ra.includes("content")),tableContents:sl}];await M.pageBatchAddApi({platId:parseInt((pe=vl==null?void 0:vl.value)==null?void 0:pe.plat_id),changeContents:ha});let Ha=[];ha==null||ha.forEach(ra=>{var Ga;(Ga=ra==null?void 0:ra.tableContents)==null||Ga.forEach(wl=>{Ha.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wl),request_result:"{}",is_delete:!1,request_table:ra==null?void 0:ra.tableName,request_type:"copyAdd"})})}),await M.pageBatchAddApi({platId:parseInt((ve=vl==null?void 0:vl.value)==null?void 0:ve.plat_id),changeContents:[{tableName:"log",tableContents:Ha}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let ya=((Ue=(ca=(da=a==null?void 0:a.columns)==null?void 0:da.map(Be=>Be==null?void 0:Be.filter))==null?void 0:ca.filter(Be=>Be!==""))==null?void 0:Ue[0])??"";ya=le.analyzeSplitToContent(ya,","),ya=(ya==null?void 0:ya.find(Be=>Be==null?void 0:Be.includes("@Filter")))??"";let sl=(Sa=a==null?void 0:a.fixContent)==null?void 0:Sa.map(Be=>{let La={};for(let al in Be)Array.isArray(Be==null?void 0:Be[al])?La[al]=JSON.stringify(Be==null?void 0:Be[al]):La[al]=Be==null?void 0:Be[al];return La}),ha=await M.quoteApi({platId:parseInt((Ma=vl==null?void 0:vl.value)==null?void 0:Ma.plat_id),type:"fatherSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});ha=(Te=ha==null?void 0:ha.data)==null?void 0:Te.result,ha=ha==null?void 0:ha.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))});let Ha=(Na=(Fa=a==null?void 0:a.columns)==null?void 0:Fa[0])==null?void 0:Na.prop,ra=(oa=sl==null?void 0:sl[0])==null?void 0:oa[Ha],Ga=[{tableName:(ja=a==null?void 0:a.relatedContents)==null?void 0:ja.find(Be=>Be==null?void 0:Be.includes("content")),tableContents:sl}],wl=(aa=ha==null?void 0:ha.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa;return(xa=Object.values(ta))==null?void 0:xa.find(ga=>ga===ra)});if((La==null?void 0:La.length)>0){let ta=sl==null?void 0:sl[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var ml,Ne;xa[Ve.prop]=((ml=Ve==null?void 0:Ve.words)!=null&&ml[0]?(ga==null?void 0:ga[(Ne=Ve==null?void 0:Ve.words)==null?void 0:Ne[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop]):ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??""}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:aa.filter(Be=>Be);Ga=[...Ga,...wl];let De=await M.quoteApi({platId:parseInt((je=vl==null?void 0:vl.value)==null?void 0:je.plat_id),type:"sonSyncs",related:[{menus:r!==""?Sl.value+"/"+r:Sl.value,groups:a==null?void 0:a.name}]});if(De=(te=(pa=De==null?void 0:De.data)==null?void 0:pa.result)==null?void 0:te.filter(Be=>!(Ga!=null&&Ga.find(La=>(La==null?void 0:La.tableName)==="content_"+(Be==null?void 0:Be.id)))),De=De==null?void 0:De.filter(Be=>{var La,al;return!((Be==null?void 0:Be.fatherPath)!==""&&((al=(La=Be==null?void 0:Be.quote)==null?void 0:La[0])==null?void 0:al.menus)===(Sl==null?void 0:Sl.value))}),ya&&ya!==""){(ya==null?void 0:ya[(ya==null?void 0:ya.length)-1])===","&&(ya=ya==null?void 0:ya.slice(0,(ya==null?void 0:ya.length)-1)),ya=(Se=(ce=ya==null?void 0:ya.replace("(",go))==null?void 0:ce.split(go))==null?void 0:Se[1],ya=ya==null?void 0:ya.slice(0,(ya==null?void 0:ya.length)-1),(ya==null?void 0:ya[0])==="*"&&(ya="{"+((fa=(we=ya==null?void 0:ya.replace("{",go))==null?void 0:we.split(go))==null?void 0:fa[1])),ya=(ea=ya==null?void 0:ya.replaceAll("{",""))==null?void 0:ea.replaceAll("}","");let Be=le.calculatorAndToOr(ya);Be=Be==null?void 0:Be[0];let La;if((Ta=Object.values(Be))!=null&&Ta.some(al=>(al==null?void 0:al[0])==="*")){let al=(Me=(Ee=Qn.value)==null?void 0:Ee.find(bl=>(bl==null?void 0:bl.condition)==="child"))!=null&&Me.value?(kn==null?void 0:kn.value)+"/"+(($e=(Fe=Qn.value)==null?void 0:Fe.find(bl=>(bl==null?void 0:bl.condition)==="child"))==null?void 0:$e.value):kn==null?void 0:kn.value;La=await Wr(al,!1)}for(let al in Be)if(((he=Be==null?void 0:Be[al])==null?void 0:he[0])==="*"){let bl=(Hl=(Ml=(El=Be[al])==null?void 0:El.slice(1,(tl=Be[al])==null?void 0:tl.length))==null?void 0:Ml.split(":"))==null?void 0:Hl[0],Tl=(jl=(Bl=Be[al])==null?void 0:Bl.split(":"))==null?void 0:jl[1],Oe=(el=La==null?void 0:La.filter(ma=>(ma==null?void 0:ma.name)===bl))==null?void 0:el[0];Oe=(Wa=($l=Oe==null?void 0:Oe.compData)==null?void 0:$l.find(ma=>(ma==null?void 0:ma.key)==="tableContents"))==null?void 0:Wa.contents,Oe=(Kl=Oe==null?void 0:Oe[0])==null?void 0:Kl[Tl],Be[al]=Oe}ya=((Jl=Object.values(Be))==null?void 0:Jl[0])??""}let ia=(ar=De==null?void 0:De.map(Be=>{var al,bl,Tl,Oe,ma;let La=(al=Be==null?void 0:Be.contents)==null?void 0:al.filter(ta=>{var xa;return(xa=Object.values(ta))==null?void 0:xa.find(ga=>ga===(ya===""?ra:ya))});if((La==null?void 0:La.length)>0){let ta=sl==null?void 0:sl[0];ta={...ta,id:(bl=La==null?void 0:La[0])==null?void 0:bl.id};let xa={},ga=ta,fl;return Array.isArray((Tl=Be==null?void 0:Be.struct)==null?void 0:Tl[0])?fl=le.getColumnChild((Oe=Be==null?void 0:Be.struct)==null?void 0:Oe[0]):fl=Be==null?void 0:Be.struct,fl=fl==null?void 0:fl.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="relatedId"),fl==null||fl.forEach(Ve=>{var Ne,Pl,Da,ul;let ml=(Ne=a==null?void 0:a.columns)==null?void 0:Ne.find(Za=>{var Nl,Ba,Rl;return((Ba=(Nl=Za==null?void 0:Za.words)==null?void 0:Nl[0])==null?void 0:Ba.replaceAll("'",""))===(Ve==null?void 0:Ve.prop)&&((Rl=Za==null?void 0:Za.functionRelatedWords)==null?void 0:Rl.length)>0});ml=(Pl=ml==null?void 0:ml.prop)==null?void 0:Pl.replaceAll("'",""),xa[Ve.prop]=((Da=Ve==null?void 0:Ve.words)!=null&&Da[0]?(ga==null?void 0:ga[(ul=Ve==null?void 0:Ve.words)==null?void 0:ul[0]])??(ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??(ga==null?void 0:ga[ml]):(ga==null?void 0:ga[Ve==null?void 0:Ve.prop])??(ga==null?void 0:ga[ml]))??void 0}),xa.id=(ma=La==null?void 0:La[0])==null?void 0:ma.id,delete xa.sort,{tableName:"content_"+(Be==null?void 0:Be.id),tableContents:[xa]}}else return}))==null?void 0:ar.filter(Be=>Be);Ga=[...Ga,...ia],await M.pageBatchUpdateApi({platId:parseInt((xl=vl==null?void 0:vl.value)==null?void 0:xl.plat_id),changeContents:Ga});let Pa=[];Ga==null||Ga.forEach(Be=>{var La;(La=Be==null?void 0:Be.tableContents)==null||La.forEach(al=>{Pa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(al),request_result:"{}",is_delete:!1,request_table:Be==null?void 0:Be.tableName,request_type:"method"})})}),await M.pageBatchAddApi({platId:parseInt((br=vl==null?void 0:vl.value)==null?void 0:br.plat_id),changeContents:[{tableName:"log",tableContents:Pa}]})}jr.setRefreshCurStructure(!0),jr.setRefreshCurrentPageInform(Z0.value++),await Nt(a)},Bt=async(a,l,n)=>{var i;let r=a==null?void 0:a.find(o=>(o==null?void 0:o.id)===l);if(r){let o=(i=r.compData)==null?void 0:i.map(f=>{var c;if((f==null?void 0:f.key)==="tableContents"){let u={...f,contents:n};return u.contents=(c=(u==null?void 0:u.contents)??[])==null?void 0:c.map(m=>{let g={};for(let w in m)JSON.stringify(m==null?void 0:m[w])==="{}"?g[w]="":g[w]=m==null?void 0:m[w];return g}),u}return f});return r.compData=await Ro(o,{}),a=a==null?void 0:a.map(f=>((f==null?void 0:f.id)===(r==null?void 0:r.id)&&(f=r),f)),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"}),f=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 Bt(c==null?void 0:c.children,l,n):c.compData=await Bt(c==null?void 0:c.compData,l,n),c});return o=await Promise.all(f),o}},Nt=async a=>{var o,f,c,u,m,g,w;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 n=await M.getAllTables({platId:parseInt((f=vl==null?void 0:vl.value)==null?void 0:f.plat_id),tableNames:l??[]});if(n=(u=(c=n==null?void 0:n.data)==null?void 0:c.result)==null?void 0:u[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(d=>{d==null||delete d.source_table;const N={};for(let _ in d){const J=d==null?void 0:d[_],A=J&&Object.prototype.toString.call(J)==="[object Object]"&&Object.keys(J).length===0,F=Array.isArray(J)&&J.length===0;J==null||J==="{}"||A||F?N[_]="":N[_]=J}return N});let r=(g=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:g[1],i=await Bt(mr.value,r,n);mr.value=(w=mr.value)==null?void 0:w.map(d=>{var N,_;return(N=i==null?void 0:i[0])!=null&&N.tabInform&&((_=i==null?void 0:i[0])==null?void 0:_.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})},u3=a=>{let l=Zi.value;Zi.value=l==null?void 0:l.map(n=>(n.value=a==null?void 0:a[n==null?void 0:n.prop],n))},d3=async()=>{var d,N,_,J,A,F,L,E,S,k;let a=Tc.value,l=Dc.value,n=(N=(d=a==null?void 0:a.columns)==null?void 0:d.find(y=>y==null?void 0:y.mainKey))==null?void 0:N.prop,r=(J=(_=Zi.value)==null?void 0:_[0])==null?void 0:J.value,i=(A=a==null?void 0:a.fixContent)==null?void 0:A.map(y=>{var O;let x={};for(let I in y)Array.isArray(y==null?void 0:y[I])?x[I]=JSON.stringify(y==null?void 0:y[I]):x[I]=y==null?void 0:y[I];return(O=a==null?void 0:a.columns)==null||O.forEach(I=>{(I==null?void 0:I.formType)==="Upload"&&(x==null?void 0:x[I==null?void 0:I.prop])===""&&(x[I==null?void 0:I.prop]="{}")}),x[n]=r,x}),o=[{tableName:(F=a==null?void 0:a.relatedContents)==null?void 0:F.find(y=>y==null?void 0:y.includes("content")),tableContents:i}];await M.pageBatchAddApi({platId:parseInt((L=vl==null?void 0:vl.value)==null?void 0:L.plat_id),changeContents:o}),l=l==null?void 0:l.filter(y=>{var x,O,I;return(I=y==null?void 0:y.object_name)==null?void 0:I.includes((O=(x=a==null?void 0:a.fixContent)==null?void 0:x[0])==null?void 0:O[n])});let f=[],c=new Map;l==null||l.forEach(y=>{f.push(`content_${y==null?void 0:y.object_id}`),f.push(`struct_${y==null?void 0:y.object_id}`),c.set(y==null?void 0:y.object_id,y)});let u=await M.getAllTables({platId:parseInt((E=vl==null?void 0:vl.value)==null?void 0:E.plat_id),tableNames:f??[]});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(y=>{var I,W,Y,fe,de,j,U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea,ne;let x=c.get((fe=(Y=(W=(I=y==null?void 0:y[1])==null?void 0:I[0])==null?void 0:W.source_table)==null?void 0:Y.split("_"))==null?void 0:fe[1]),O=(U=(j=(de=x==null?void 0:x.object_name)==null?void 0:de.split("/"))==null?void 0:j.filter((ua,Pe)=>{var Re,Le;return((Le=(Re=x==null?void 0:x.object_name)==null?void 0:Re.split("/"))==null?void 0:Le.length)-1!==Pe}))==null?void 0:U.join("/");if(O=O+"/"+r,g!=null&&g.find(ua=>(ua==null?void 0:ua.path)===O)||g.push({fatherPath:x==null?void 0:x.father_name,isShow:x==null?void 0:x.is_show,path:O}),((ee=(Z=y==null?void 0:y[1])==null?void 0:Z[0])==null?void 0:ee.类型)==="Table"){let ua=((ue=(Ie=(ge=y==null?void 0:y[1])==null?void 0:ge[0])==null?void 0:Ie.结构)==null?void 0:ue.contents)??[],Pe=pl.safeClone(ua);Array.isArray(Pe==null?void 0:Pe[0])&&(Pe=le.getColumnChild(Pe==null?void 0:Pe[0]));let Re=[];if(((B=y==null?void 0:y[0])==null?void 0:B.length)>0&&(Re=(oe=y==null?void 0:y[0])==null?void 0:oe.map(Le=>Pe==null?void 0:Pe.map(me=>(me=(Le==null?void 0:Le[me==null?void 0:me.prop])??"",me)))),m!=null&&m.find(Le=>(Le==null?void 0:Le.key)===O)){let Le=(q=m==null?void 0:m.find(me=>(me==null?void 0:me.key)===O))==null?void 0:q.contents;Le.push({isShow:x==null?void 0:x.is_show,filter:((Ae=(Ke=(ye=y==null?void 0:y[1])==null?void 0:ye[0])==null?void 0:Ke.引用)==null?void 0:Ae.contents)??"",key:"Table",name:Object.values(x==null?void 0:x.name),tableColumns:ua,tableContents:Re});let se=m==null?void 0:m.findIndex(me=>(me==null?void 0:me.key)===O);m[se].contents=Le}else m.push({key:O,contents:[{isShow:x==null?void 0:x.is_show,filter:((ne=(Ea=(Qe=y==null?void 0:y[1])==null?void 0:Qe[0])==null?void 0:Ea.引用)==null?void 0:ne.contents)??"",key:"Table",name:Object.values(x==null?void 0:x.name),tableColumns:ua,tableContents:Re}]})}});let w=[];w.push({key:"menuPath",contents:g}),w=[...w,...m],await M.createPlatFormDataApi({platId:parseInt((k=vl==null?void 0:vl.value)==null?void 0:k.plat_id),changeData:w}),Lt.value=!1,jr.setRefreshTable(!0)},zo=async(a,l)=>{},Mo=async a=>{mr.value=await le.getDeepDiffItems(a),jr.setItemData(mr.value),jr.setOriginalData(mr.value)};e.ref();const p3=e.ref(null),f3=()=>{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"})},zc=e.ref([]),h3=e.computed(()=>{var a,l;return(l=(a=Dt.value)==null?void 0:a[Sl.value])==null?void 0:l.filter(n=>{var r;return((r=n==null?void 0:n.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[e3.value],()=>{Sn.setSelectTitle([]),Sn.setChooseTitle([])},{deep:!0});e.watch(()=>No.value,async(a,l)=>{var r,i,o,f,c,u;let n=(r=No.value)==null?void 0:r.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==kn.value);if((n==null?void 0:n.length)>0){Xr.setContentLoading(!0);let m=((i=n==null?void 0:n[0])==null?void 0:i.relatedContent)??(Sl==null?void 0:Sl.value),g=m+"/"+((o=n==null?void 0:n[0])==null?void 0:o.value),w=!!((f=n==null?void 0:n[0])!=null&&f.parentContent),d=await Wr(g,w,{originPath:m});d=(c=d==null?void 0:d.filter(J=>J))==null?void 0:c.map(J=>(J.isShow=!0,J)),console.log(d,"loadingContents");let N=await le.getDeepDiffItems(d),_=N==null?void 0:N.filter(J=>J==null?void 0:J.choice);$o.setSelectTab((u=_==null?void 0:_[0])==null?void 0:u.choiceName),N=N==null?void 0:N.filter(J=>{var A;return!(J!=null&&J.choiceName)||(J==null?void 0:J.choiceName)===((A=_==null?void 0:_[0])==null?void 0:A.choiceName)}),mr.value=N,Xr.setContentLoading(!1)}});const v3=(a,l)=>{setTimeout(async()=>{var c,u,m;let n=(c=No.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)!==kn.value),r=Sl==null?void 0:Sl.value,i=Sl==null?void 0:Sl.value;(n==null?void 0:n.length)>0&&(i=((u=n==null?void 0:n[0])==null?void 0:u.relatedContent)??(Sl==null?void 0:Sl.value),r=i+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let o=await Wr(r,!1,{originPath:i});o=o==null?void 0:o.map(g=>(g.isShow=!0,g));let f=await le.getDeepDiffItems(o);mr.value=f==null?void 0:f.filter(g=>!(g!=null&&g.step)||(g==null?void 0:g.step)===(a==null?void 0:a.title))},10)},m3=a=>{setTimeout(async()=>{var f,c,u;let l=(f=No.value)==null?void 0:f.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==kn.value),n=Sl==null?void 0:Sl.value,r=Sl==null?void 0:Sl.value;(l==null?void 0:l.length)>0&&(r=((c=l==null?void 0:l[0])==null?void 0:c.relatedContent)??(Sl==null?void 0:Sl.value),n=r+"/"+((u=l==null?void 0:l[0])==null?void 0:u.value));let i=await Wr(n,!1,{originPath:r});i=i==null?void 0:i.map(m=>(m.isShow=!0,m)),$o.setSelectTab(a);let o=await le.getDeepDiffItems(i);mr.value=o==null?void 0:o.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>Q0.value,a=>{a!=null&&a.length||(mr.value=[])},{immediate:!0});e.watch(()=>[Sl.value],async a=>{var o,f,c,u;if(!Sl.value)return;if(Sl.value==="/"){mr.value=[];return}Xr.setCurrentMenuPath(Sl.value),jr.setLockingPage(""),mr.value=[];let l=e.getCurrentInstance();(o=l==null?void 0:l.scope)==null||o.stop(),l=null,Li.value=!1,Xr.setContentLoading(!0),Cc.value=!0;let n=a==null?void 0:a[0],r=n,i=(f=Qn.value)==null?void 0:f.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&&(n=n+"/"+((c=i==null?void 0:i[0])==null?void 0:c.value)),n==="系统管理/日志管理")mr.value=await G0("log");else{let m=await Wr(n,!0,{originPath:r});m=m==null?void 0:m.map(d=>(d.isShow=!0,d));let g=await le.getDeepDiffItems(m),w=g==null?void 0:g.filter(d=>d==null?void 0:d.choice);$o.setSelectTab((u=w==null?void 0:w[0])==null?void 0:u.choiceName),mr.value=g==null?void 0:g.filter(d=>{var N;return!(d!=null&&d.choiceName)||(d==null?void 0:d.choiceName)===((N=w==null?void 0:w[0])==null?void 0:N.choiceName)})}Xr.setContentLoading(!1),jr.setExtraContents([]),Sn.setSelectIndex(""),Sn.setSelectMenu(""),jr.setItemData(mr.value),jr.setOriginalData(mr.value),jr.setRefreshTable(!1),e.nextTick(()=>{ai.value=ai.value++,Li.value=!0})},{immediate:!0});e.watch(()=>[Ts.value],async()=>{var a,l,n,r;if(Ts.value){mr.value=[];let i=e.getCurrentInstance();(a=i==null?void 0:i.scope)==null||a.stop(),i=null,Li.value=!1,Xr.setContentLoading(!0),Cc.value=!0;let o=kn==null?void 0:kn.value,f=o,c=(l=Qn.value)==null?void 0:l.filter(w=>(w==null?void 0:w.condition)==="child"&&(w==null?void 0:w.value)!==""&&(w==null?void 0:w.parentContent)!==(kn==null?void 0:kn.value));(c==null?void 0:c.length)>0&&(o=o+"/"+((n=c==null?void 0:c[0])==null?void 0:n.value));let u=await Wr(o,!0,{originPath:f});u=u==null?void 0:u.map(w=>(w.isShow=!0,w));let m=await le.getDeepDiffItems(u),g=m==null?void 0:m.filter(w=>w==null?void 0:w.choice);if($o.setSelectTab((r=g==null?void 0:g[0])==null?void 0:r.choiceName),mr.value=m==null?void 0:m.filter(w=>{var d;return!(w!=null&&w.choiceName)||(w==null?void 0:w.choiceName)===((d=g==null?void 0:g[0])==null?void 0:d.choiceName)}),Xr.setContentLoading(!1),jr.setExtraContents([]),Sn.setSelectIndex(""),Sn.setSelectMenu(""),jr.setItemData(mr.value),jr.setOriginalData(mr.value),jr.setRefreshTable(!1),(c==null?void 0:c.length)>0){let w=[...Qn.value,...c];Sn.setSelectTitle(w)}e.nextTick(()=>{ai.value=ai.value++,Li.value=!0})}},{immediate:!0,deep:!0});const y3=async()=>{Xr.setLinkMenuInfo(null),Xr.setActiveMenuPath(X0.value),mr.value=null,jr.setRouteToChildPath(""),Xr.setChildMenu("")},g3=a=>new RegExp("button","i").test(a),b3=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Mc=a=>{if(b3(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Xr.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Ic=async(a,l,n)=>{var d,N,_,J,A,F,L,E,S,k,y,x;let r="",i="";for(let O in l)(l==null?void 0:l[O])===a&&(i=O);n==null||n.forEach(O=>{(O==null?void 0:O.prop)===i&&(r=O==null?void 0:O.fatherPath)});let o=r===""?Sl.value:r;r!==""&&Xr.setCurrentMenuPath(o),Xr.setCurrentMenuPath(o+"/"+a),Xr.setContentLoading(!0),mr.value=await Wr(o+"/"+a,!0,{originPath:o+"/",row:l});let f=await Wr(o,!1),c=(d=f==null?void 0:f.filter(O=>(O==null?void 0:O.comp)==="Table"))==null?void 0:d[0],u=((A=(J=(_=(N=c==null?void 0:c.compData)==null?void 0:N.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:_.contents)==null?void 0:J[0])==null?void 0:A.prop)??((k=(S=(E=(L=(F=c==null?void 0:c.compData)==null?void 0:F.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:L.contents)==null?void 0:E[0])==null?void 0:S[0])==null?void 0:k.prop),m=(x=(y=c==null?void 0:c.compData)==null?void 0:y.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:x.contents;m=m==null?void 0:m.map(O=>({label:O==null?void 0:O[u],value:O==null?void 0:O[u]}));let g=Qn.value,w={value:a,condition:"child",options:m,relatedContent:o,isShow:!0};g=g==null?void 0:g.filter(O=>(O==null?void 0:O.condition)!=="child"),g.push(w),Sn.setSelectTitle(g),Sn.setChooseTitle([w]),Xr.setContentLoading(!1),jr.setExtraContents([]),Sn.setSelectIndex(""),Sn.setSelectMenu(""),jr.setItemData(mr.value),jr.setOriginalData(mr.value)},k3=a=>{Nc.value=a},zi=e.reactive({index:0,comp:null}),x3=e.computed(()=>{var a;return(a=mr.value)==null?void 0:a.map((l,n)=>({id:l.id,name:l.name,status:w3(l,n)}))}),Oc=(a,l)=>{var u,m,g,w,d;const n=l?a:a-2,r=(u=mr.value)==null?void 0:u[n],i=(g=(m=r==null?void 0:r.compData)==null?void 0:m.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:g.contents,o=i==null?void 0:i.findIndex(N=>(N==null?void 0:N.isMainKey)&&(N==null?void 0:N.label)!=="操作"),f=o===-1?0:o,c=(d=(w=r==null?void 0:r.compData)==null?void 0:w.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:d.contents;return{valid:c==null?void 0:c.every(N=>N==null?void 0:N[f+1]),length:(c==null?void 0:c.length)||0}},w3=(a,l)=>{var r;let n="process";if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:i,length:o}=Oc(l,!0);zi.index===l?n="process":o===0?n="wait":n=i?"success":"error"}return n},Lc=a=>{var n,r,i,o,f;const l=a+1;if(l>1&&((i=(r=(n=mr.value)==null?void 0:n[a])==null?void 0:r.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:c}=Oc(l);c?(zi.index=l,zi.comp=(o=mr.value)==null?void 0:o[a]):Ja.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else zi.index=l,zi.comp=(f=mr.value)==null?void 0:f[a]},Rc=e.computed(()=>{var a,l;return(l=(a=Bc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Rc.value,a=>{a&&Lc(0)},{immediate:!0});const Io=e.ref(0),$c=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=M.cloneDeep(a))==null?void 0:l.map(r=>(Io.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Io.value,children:$c(r==null?void 0:r.children)},r))},_3=a=>{var n;return(n=M.cloneDeep(a))==null?void 0:n.map(r=>(Io.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Io.value,children:$c(r==null?void 0:r.children)},r))},Vc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===l)?(n=M.cloneDeep(a))==null?void 0:n.filter(i=>(i==null?void 0:i.id)!==l):(a=a==null?void 0:a.map(r=>(r.children=Vc(r==null?void 0:r.children,l),r)),a)},Fc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=M.cloneDeep(a))==null?void 0:n.map(i=>((i==null?void 0:i.id)===(l==null?void 0:l.id)&&(i=l),i)):(a=a==null?void 0:a.map(r=>(r.children=Fc(r==null?void 0:r.children,l),r)),a)},Pc=(a,l)=>{var n;return a!=null&&a.find(r=>{var i;return(r==null?void 0:r.id)===((i=l==null?void 0:l.contents)==null?void 0:i.id)})?(n=M.cloneDeep(a))==null?void 0:n.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(r=>(r.children=Pc(r==null?void 0:r.children,l),r)),a)},jc=(a,l)=>{var n;return a!=null&&a.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(n=M.cloneDeep(a))==null?void 0:n.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(r=>(r.children=jc(r==null?void 0:r.children,l),r)),a)},gr=[{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"}],S3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],E3=[{label:"新增",value:"add"}],Un=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:E3},{key:"background",label:"按钮背景色",type:"Color"}],qn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:S3},{key:"textColor",label:"按钮颜色",type:"Color"}],C3={class:"table-content"},D3={class:"menu-config-wrap"},T3=["onClick"],B3={key:0,class:"viewport-wrap"},N3=["onClick"],A3={title:"选择显示列信息"},z3={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"}},M3=["title"],I3={class:"col-operate-wrap"},O3={key:0,class:"col-operate-radio-wrapper"},L3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},R3={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},$3={class:"pop-view"},V3={class:"pop-wrapper"},F3={class:"file-list-pop"},P3=["title","onClick"],j3=["onClick"],H3=["onClick"],U3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},q3={class:"form-content"},W3={key:0,class:"dialog-footer"},G3={class:"dialog-footer"},K3={class:"ocr-dialog-content"},Y3={class:"ocr-steps"},J3={key:0,class:"ocr-action-buttons"},X3={key:1,class:"ocr-preview-area"},Z3={class:"ocr-file-grid"},Q3={class:"file-thumbnail"},eh=["src"],ah={key:1,class:"thumbnail-placeholder"},lh={class:"progress-svg",viewBox:"0 0 36 36"},rh=["stroke","stroke-width","stroke-dasharray"],nh={key:0,class:"progress-icon"},ih={key:1,class:"progress-icon"},oh=["onClick"],th={class:"file-name"},sh={key:0,class:"ocr-recognize-button"},ch={key:2,class:"ocr-progress-section"},uh={key:3,class:"ocr-confirm-area"},dh={class:"ocr-preview-tip"},ph={class:"ocr-preview-table"},fh={style:{display:"flex","align-items":"center",gap:"8px"}},hh={key:0},vh={key:4,class:"ocr-success-area"},mh={key:0,class:"ocr-dialog-footer"},yh={class:"form-content"},gh={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},bh={style:{display:"flex","justify-content":"space-between",gap:"8px"}},kh={style:{display:"flex"}},Ns="ss-ocr-upload-history",xh="ss-ocr-cert-history-v1",wh={__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 Kt;const n=e.ref([]),r=Ot(M.pinia),i=e.ref(null),o=e.ref(new Set),f=e.ref(new Map),c=e.ref(!1),u=e.ref([]),m=e.ref(new Map),g=new Map,w=e.ref(new Map),d=a,N=e.ref((d==null?void 0:d.allowSelect)??!0),_=e.ref(((Kt=d==null?void 0:d.config)==null?void 0:Kt.showIndex)??!0),J=e.ref(),A=e.ref(!0),F=e.ref(!1),L=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"}]}]),k=le.useOriginalState(M.pinia);let y="$R";const{originalPath:x}=M.storeToRefs(k),O=x.value,I=e.computed(()=>{var v;const p=(v=le.getAllLeafNodes(U.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 p.length>0?p.every(z=>!!(z!=null&&z.sortable)):!1});e.computed(()=>{var v;return(v=U.value)==null?void 0:v.every(z=>z==null?void 0:z.filterable)}),e.computed(()=>{var v;return(v=U.value)==null?void 0:v.every(z=>z==null?void 0:z.operable)});const W=e.ref(!0),Y=e.ref([]),fe=e.reactive({column:{},status:!1,text:"合计"}),de=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),j=l,U=e.ref([]),Z=e.ref([]),ee=e.ref([]),ge=e.reactive({prop:"",order:null}),Ie=e.ref([]),ue=e.ref(!1),B=e.ref(!1),oe=e.ref(null),{isUseBackdrop:q,initTrackFileType:ye,getFileExtension:Ke,setData:Ae,getFileInfo:Qe,getFilesInfo:Ea}=Co.useThreeSystem(),ne=e.ref([]),ua=e.ref(!1),Pe=e.ref(),Re=M.useMenuState(),{importLoading:Le,activeMenuPath:se,contentLoading:me,linkMenuInfo:qe}=M.storeToRefs(Re),ka=le.useTableComp(M.pinia),_a=M.useModelComp(M.pinia),H=li(M.pinia),{extraContents:V,cacheUpdatingData:ae,tableViewContents:pe,tableLoading:ve,pageMapState:da,lockingPage:ca}=M.storeToRefs(_a),{selectTab:Ue}=M.storeToRefs(H),{compType:Sa,hasEditable:Ma}=ic.useRole(),Te=e.ref([]),Fa=e.ref([]),Na=e.ref(new Map);e.ref(!1);const oa=e.ref("");e.ref();const ja=e.ref(!0),aa=e.ref(0),je=e.ref(!0),pa=e.ref(""),te=e.ref(!1),ce=e.ref(null);e.ref([]);const Se=e.ref({label:"查看三维模型"}),we=e.ref(!1),fa=e.ref(),ea=e.ref([]),Ta=e.ref([]),Ee=e.ref(!1),Me=e.ref([]),Fe=e.ref([]),$e=e.ref([]),he=e.ref([]),tl=e.ref({dialogShow:!1,dialogTitle:""}),El=()=>{tl.value.dialogShow=!1,tl.value.dialogTitle=""},Ml=p=>{console.log("Received signature data:",p),tl.value.dialogShow=!1},Hl=e.ref([]),Bl=()=>{try{const p=localStorage.getItem(Ns),v=p?JSON.parse(p):[];Hl.value=Array.isArray(v)?v:[]}catch{Hl.value=[]}},jl=()=>{try{localStorage.setItem(Ns,JSON.stringify(Hl.value||[]))}catch{}},el=p=>{var re,ie,G;if(!p)return;const v=p.url||((re=p==null?void 0:p.uploadResult)==null?void 0:re.url)||"",z=p.name||((ie=p==null?void 0:p.uploadResult)==null?void 0:ie.name)||((G=p==null?void 0:p.uploadResult)==null?void 0:G.fileName)||"";if(!v&&!z)return;const R={name:z,url:v,ts:Date.now()},P=String(R.name||"").trim().toLowerCase(),D=(Hl.value||[]).findIndex(xe=>String((xe==null?void 0:xe.name)||"").trim().toLowerCase()===P);D>-1&&Hl.value.splice(D,1),Hl.value.unshift(R),Hl.value.length>20&&(Hl.value=Hl.value.slice(0,20)),jl()};Bl();const $l=(p,v)=>`${xh}:${String(p??"")}:${String(v??"")}`,Wa=(p,v)=>{try{const z=sessionStorage.getItem($l(p,v)),R=z?JSON.parse(z):[];return Array.isArray(R)?R:[]}catch{return[]}},Kl=(p,v,z)=>{try{sessionStorage.setItem($l(p,v),JSON.stringify(Array.isArray(z)?z:[]))}catch{}},Jl=(p,v,z)=>{if(!v)return;const R=Wa(p,v),P=[z,...R||[]].filter(Boolean).slice(0,1);return Kl(p,v,P),P},ar=(p,v,z)=>{if(!v||!z)return;const R=$l(p,v),P=$l(p,z);try{const D=sessionStorage.getItem(R);if(!D)return;const re=(()=>{try{const xe=JSON.parse(D);return Array.isArray(xe)?xe:[]}catch{return[]}})(),ie=Wa(p,z),G=[...re,...ie||[]].filter(Boolean).sort((xe,be)=>Number((be==null?void 0:be.ts)||0)-Number((xe==null?void 0:xe.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(G)),sessionStorage.removeItem(R)}catch{}},xl=e.ref(!1),br=e.ref(!1),ya=e.ref([]),sl=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const ha=e.ref(!1),Ha=e.ref([]),ra=e.ref(1),Ga=e.ref(new Map),wl=e.ref(new Map),De=e.ref(0),ia=e.ref(!1),Pa=e.ref([]),Be=e.ref([]),La=p=>{var v;try{const z=(v=le.getAllLeafNodes(U.value)||[])==null?void 0:v.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate");return(z==null?void 0:z.find(R=>(R==null?void 0:R.prop)===p||(R==null?void 0:R.label)===p))||null}catch{return null}},al=p=>{const v=La(p),z=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return pl.getComponent(z)||pl.getComponent("Input")},bl=e.ref([]),Tl=e.ref(null),Oe=e.ref([]),ma=e.ref(null),ta=e.ref(""),xa=e.ref(!1),ga=e.ref([]),fl=e.ref(""),Ve=e.ref(!1),ml=e.ref([]),Ne=e.ref([]),Pl=e.ref([]),Da=e.ref(null),ul=e.ref([]),Za=e.ref("");e.computed(()=>{var p;try{const v=(p=le.getAllLeafNodes(U.value)||[])==null?void 0:p.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate"),z=new Map;return v==null||v.forEach(R=>{R!=null&&R.label&&(R!=null&&R.prop)&&z.set(R.label,R.prop)}),z.get("编号")||""}catch{return""}});const Nl=e.computed(()=>{var p;try{const v=(p=le.getAllLeafNodes(U.value)||[])==null?void 0:p.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate"),z=new Map;return v==null||v.forEach(R=>{R!=null&&R.label&&(R!=null&&R.prop)&&z.set(R.label,R.prop)}),z.get("名称")||""}catch{return""}}),Ba=e.computed(()=>{var p;try{const v=(p=le.getAllLeafNodes(U.value)||[])==null?void 0:p.filter(R=>(R==null?void 0:R.type)!=="operate"&&(R==null?void 0:R.label)!=="操作"&&(R==null?void 0:R.prop)!=="operate"),z=new Map;return v==null||v.forEach(R=>{R!=null&&R.label&&(R!=null&&R.prop)&&z.set(R.label,R.prop)}),z.get("制造厂")||""}catch{return""}}),Rl=()=>{Ve.value=!1,ml.value=[],Ne.value=[],Pl.value=[],Da.value=null,ul.value=[],Za.value=""},Er=p=>p==null?!1:typeof p=="string"?p.trim()!=="":Array.isArray(p)?p.length>0:!0,tn=(p,v)=>{const z=(p==null?void 0:p.ocrRow)||{};for(const P of Object.keys(z))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Er(z[P])&&(v[P]=z[P]);const R=Fa.value.find(P=>P.id===v.id);if(R)for(const P of Object.keys(z))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Er(z[P])&&(R[P]=z[P]);Na.value&&Na.value.set(v.id,v),Jl(d==null?void 0:d.index,v.id,p==null?void 0:p.versionItem),Ne.value=[...Ne.value||[],JSON.parse(JSON.stringify(v))]},Fr=async(p,v=null)=>{var z,R,P,D,re,ie,G;try{const xe=(z=le.getAllLeafNodes(U.value)||[])==null?void 0:z.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),be=new Map;xe==null||xe.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&be.set(ba.label,ba.prop)});const Ye=be.get("系统编号")||be.get("编号");if(!Ye){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Ge=v||Da.value;if((Array.isArray(Ge==null?void 0:Ge.result)?Ge.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ba=0;ba<p.length;ba++){const Aa=p[ba],za=Aa[Ye];if(!za){console.warn(`第 ${ba+1} 条匹配行缺少系统编号,跳过`);continue}const Ze=`设备管理/试验设备/${za}`,nl=await M.getPageDataApi({platId:parseInt((R=Il.value)==null?void 0:R.plat_id),pageName:Ze});if(!((P=nl==null?void 0:nl.data)!=null&&P.result)||!Array.isArray(nl.data.result)){console.warn(`未找到详情页数据: ${Ze}`);continue}const wa=nl.data.result.find(sa=>(sa==null?void 0:sa.property_name)==="校检记录");if(!wa){console.warn(`详情页 ${Ze} 中未找到校检记录表`);continue}const il=(D=wa.contents)==null?void 0:D.find(sa=>(sa==null?void 0:sa.key)&&sa.key.startsWith("content_"));if(!il||!il.key){console.warn("校检记录表中未找到 content item");continue}const ke=il.key,Va=Array.isArray(il.value)?il.value:[];if(Va.length>=5){const T=[...Va].sort((Ia,Ua)=>{const ol=Number((Ia==null?void 0:Ia.create_time)||0),Ka=Number((Ua==null?void 0:Ua.create_time)||0);return ol-Ka})[0];T!=null&&T.id&&await M.pageBatchDeleteApi({platId:parseInt((re=Il.value)==null?void 0:re.plat_id),changeContents:[{tableName:ke,tableContents:[{id:T.id}]}]})}const va=(ie=xe==null?void 0:xe.find(sa=>(sa==null?void 0:sa.label)==="证书附件"))==null?void 0:ie.prop,Ya=String(Date.now()),Ra={id:Ya},ze=Va[0]||{},Q=new Date().toISOString().split("T")[0];if(Object.keys(ze||{}).forEach(sa=>{if(sa!=="id"){if(sa==="证书附件"){Ra[sa]="";return}if(sa==="校检日期"||sa==="检校日期"){Ra[sa]=Aa[sa]||Aa.校检日期||Aa.检校日期||Q;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(sa)){Ra[sa]=Aa[sa]??"";return}Ra[sa]=Aa[sa]??""}}),va&&Aa[va]){const sa=Aa[va];if(Array.isArray(sa)&&sa.length>0)Ra.证书附件=JSON.stringify(sa.map(T=>({url:(T==null?void 0:T.url)||"",name:(T==null?void 0:T.name)||(T==null?void 0:T.fileName)||"",fileName:(T==null?void 0:T.fileName)||(T==null?void 0:T.name)||""})).filter(T=>T.url||T.name));else if(typeof sa=="string")try{const T=JSON.parse(sa);Ra.证书附件=sa}catch{Ra.证书附件=JSON.stringify([{url:sa,name:sa,fileName:sa}])}}console.log(ke,"tableName","inspectionRecordRow",Ra),await M.pageBatchAddApi({platId:parseInt((G=Il.value)==null?void 0:G.plat_id),changeContents:[{tableName:ke,tableContents:[Ra]}]});const He=wa==null?void 0:wa.object_id;if(He&&Ya){const sa=va&&Aa[va]?Aa[va]:null;let T=[],Ia="",Ua=!1;if(Array.isArray(sa)&&sa.length>0){T=sa.map(dl=>({name:(dl==null?void 0:dl.name)||(dl==null?void 0:dl.fileName)||"",url:(dl==null?void 0:dl.url)||""})).filter(dl=>dl.url||dl.name);const Ka=sa[0];Ia=(Ka==null?void 0:Ka.url)||"";const Ca=(Ka==null?void 0:Ka.name)||(Ka==null?void 0:Ka.fileName)||"";Ua=String(Ca).toLowerCase().endsWith(".pdf")||String(Ia).toLowerCase().endsWith(".pdf")}else if(typeof sa=="string")try{const Ka=JSON.parse(sa);Array.isArray(Ka)?(T=Ka.map(Ca=>({name:(Ca==null?void 0:Ca.name)||(Ca==null?void 0:Ca.fileName)||"",url:(Ca==null?void 0:Ca.url)||""})).filter(Ca=>Ca.url||Ca.name),T.length>0&&(Ia=T[0].url||"",Ua=String(T[0].name).toLowerCase().endsWith(".pdf")||String(Ia).toLowerCase().endsWith(".pdf"))):(Ia=sa,Ua=String(sa).toLowerCase().endsWith(".pdf"))}catch{Ia=sa,Ua=String(sa).toLowerCase().endsWith(".pdf")}const ol={ts:Date.now(),versionId:String(Date.now())+"_"+String(ba),label:new Date().toLocaleString(),certType:Aa.证书类型||"",certNo:Aa.证书编号||"",fileType:Ua?"pdf":"image",sourceUrl:Ua?Ia:"",images:T};Jl(He,Ya,ol)}}}catch(xe){console.error("向校检记录表插入OCR识别结果失败:",xe),Ja.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},ir=p=>{const v=Array.isArray(p)?p:ml.value||[];if(v.length===0){Rl();return}if(v.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){Ja.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(D=>{var ie;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){Jl(d==null?void 0:d.index,(ie=D==null?void 0:D.ocrRow)==null?void 0:ie.id,D==null?void 0:D.versionItem),Pl.value=[...Pl.value||[],D.ocrRow];return}if(re==="replace"){const G=D==null?void 0:D.selectedTargetId,xe=(Te.value||[]).find(be=>String(be==null?void 0:be.id)===String(G));if(!xe)return;tn(D,xe)}}}),(Ne.value||[]).length>0&&(Te.value=[...Te.value||[]]),(Pl.value||[]).length>0&&(Te.value=[...Te.value||[],...Pl.value||[]],Fa.value=[...Fa.value||[],...Pl.value||[]],(Pl.value||[]).forEach(D=>{var re,ie;return(ie=(re=Na.value)==null?void 0:re.set)==null?void 0:ie.call(re,D.id,D)})),Gr.value=Te.value;const R=Ne.value||[],P=Pl.value||[];if(R.length>0&&(j("change",{buttonName:"编辑",singleContent:R,content:Te.value,relatedContents:d==null?void 0:d.related,index:d==null?void 0:d.index,parentTableId:d==null?void 0:d.parentTableId,columns:U.value,name:d==null?void 0:d.compName}),Fr(R)),P.length>0){const D=Da.value;j("change",{buttonName:"OCR批量新增",content:Te.value,index:d==null?void 0:d.index,parentTableId:d==null?void 0:d.parentTableId,column:U.value,ocrRows:P,relatedContents:d==null?void 0:d.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(ie=>({url:(ie==null?void 0:ie.url)||"",name:(ie==null?void 0:ie.name)||"",fileName:(ie==null?void 0:ie.name)||""})).filter(ie=>ie.url)),ocrResult:D,matchedCount:(R||[]).length,newCount:(P||[]).length})}Ja.ElMessage.success("已提交候选处理结果"),Rl()},Ur=Sc(),Zr=e.computed(()=>Ur.getConfig()),Or=e.ref(),rr=e.ref(),en=bc(M.pinia),Gr=e.ref(),or=e.ref(0),Cr=M.useUnit(M.pinia),{selectIndex:an,selectMenu:Wl,selectTitle:tr}=M.storeToRefs(Cr),{selectString:kr}=M.storeToRefs(en),Lr=M.useLoginState(M.pinia),{loginUserInfo:Il}=M.storeToRefs(Lr),ln=e.ref(720),sr=e.ref(!1),_r=e.ref(!1),Mr=e.ref([]),Br=e.ref(),zn=e.ref(!0),ri=e.ref(!0);e.ref([]);const Mn=e.inject("contentRef");e.provide("contentRef",Mn),e.provide("getSuggestListForCell",ju),e.provide("getSuggestLoadingForCell",(p,v)=>{const z=`${p==null?void 0:p.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return w.value.get(z)||!1}),e.watch(()=>{var p;return(p=Te.value)==null?void 0:p.length},p=>{de.total=p}),e.watch(()=>pe.value,async()=>{var v,z,R,P,D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze;if(((v=pe.value)==null?void 0:v.length)===0||!((z=d==null?void 0:d.itemData)!=null&&z.find(nl=>(nl==null?void 0:nl.key)==="columnPath"))||!((R=d==null?void 0:d.itemData)!=null&&R.find(nl=>(nl==null?void 0:nl.key)==="pageColumn")))return;let p=(xe=(G=(ie=(re=(D=(P=d==null?void 0:d.itemData)==null?void 0:P.find(nl=>(nl==null?void 0:nl.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:ie[1])==null?void 0:G.split("]"))==null?void 0:xe[0];((Xe=(Ge=(Ye=(be=d==null?void 0:d.itemData)==null?void 0:be.find(nl=>(nl==null?void 0:nl.key)==="pageColumn"))==null?void 0:Ye.contents)==null?void 0:Ge.split("["))==null?void 0:Xe[0])+((Aa=(ba=pe.value)==null?void 0:ba.find(nl=>(nl==null?void 0:nl.key)===p))==null?void 0:Aa.value),(Ze=(za=d==null?void 0:d.itemData)==null?void 0:za.find(nl=>(nl==null?void 0:nl.key)==="pageGroup"))==null||Ze.contents,Gt(compData,d.allMapContents)},{deep:!0});const wn=p=>{var z,R,P,D,re;const v=(R=(z=U.value)==null?void 0:z.filter(ie=>ie==null?void 0:ie.mainKey))==null?void 0:R.map(ie=>ie==null?void 0:ie.prop);if(v.length===0){const ie=(P=U.value)==null?void 0:P.map(G=>G==null?void 0:G.prop);return(D=ie==null?void 0:ie.map(G=>p==null?void 0:p[G]))==null?void 0:D.join("|")}return(re=v==null?void 0:v.map(ie=>p==null?void 0:p[ie]))==null?void 0:re.join("|")},Gn=p=>{var ie,G,xe,be,Ye;const v=(G=(ie=U.value)==null?void 0:ie.filter(Ge=>Ge==null?void 0:Ge.required))==null?void 0:G.map(Ge=>Ge==null?void 0:Ge.prop),z=[];if(p==null||p.forEach(Ge=>{v==null||v.forEach(Xe=>{const ba=Ge[Xe];(ba==null||ba==="")&&(z.includes(Xe)||z.push(Xe))})}),z.length>0)return Ja.ElMessage.warning(`请填写必填项:${z.join("、")}`);const R=new Map,P=new Map;(xe=Te.value)==null||xe.forEach(Ge=>{const Xe=wn(Ge);R.set(Xe,Ge)}),p==null||p.forEach(Ge=>{const Xe=wn(Ge);P.set(Xe,Ge)});const D=p==null?void 0:p.filter(Ge=>R.has(wn(Ge))),re=(be=Te.value)==null?void 0:be.filter(Ge=>P.has(wn(Ge)));return(D==null?void 0:D.length)>0&&(X.columns=(Ye=U.value)==null?void 0:Ye.filter(Ge=>(Ge==null?void 0:Ge.label)!=="操作"),X.existRows=re,X.tableData=D,X.show=!0),X.newRows=p==null?void 0:p.filter(Ge=>{const Xe=wn(Ge);return!R.has(Xe)}),X.newRows},pn=e.ref(""),In=e.ref(null),ni=async()=>{var p,v,z,R,P,D;try{const re=await M.quoteApi({related:[{menus:se.value,groups:d==null?void 0:d.compName}],platId:parseInt((p=Il.value)==null?void 0:p.plat_id)});if(((v=re==null?void 0:re.data)==null?void 0:v.code)===200){In.value=(z=re==null?void 0:re.data)==null?void 0:z.result;const ie=(R=U.value)==null?void 0:R.map(be=>(be==null?void 0:be.prop)||(be==null?void 0:be.label)),G=fn(ie,(P=re==null?void 0:re.data)==null?void 0:P.result),xe=G==null?void 0:G.flatMap(be=>be==null?void 0:be.quote);(xe==null?void 0:xe.length)>0&&(pn.value=(D=xe==null?void 0:xe.map(be=>be==null?void 0:be.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function fn(p,v){var z;return(z=v.filter(R=>R.struct&&Array.isArray(R.struct)?R.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(D=>p.includes(D)):!1):!1))==null?void 0:z.map(R=>{const P={...R};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>p.includes(re)):!1)),P})}const ii=async(p,v)=>{var z,R;try{In.value||await ni();const P=v==null?void 0:v.map(re=>{const ie=Object.keys(re),G={};return ie.forEach((xe,be)=>{G[p[be]]=re[xe]}),G}),D=Gn(P);if(!D||(D==null?void 0:D.length)===0)return;X.show||await We(D)}catch(P){throw Ja.ElMessage.error("数据导入处理失败"),await M.pageBatchAddApi({platId:parseInt((z=Il==null?void 0:Il.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(P),is_delete:!1,request_table:(R=d==null?void 0:d.related)==null?void 0:R.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(P)}},Tn=async p=>{var D,re,ie,G,xe,be,Ye;let v=ee.value;v!=null&&v.find(Ge=>(p==null?void 0:p.key)===(Ge==null?void 0:Ge.key))&&(v=v==null?void 0:v.filter(Ge=>(p==null?void 0:p.key)!==(Ge==null?void 0:Ge.key))),v.push({key:p==null?void 0:p.key,value:[(re=p==null?void 0:p.value)==null?void 0:re[((D=p==null?void 0:p.value)==null?void 0:D.length)-1]]});let z=he.value;z=z==null?void 0:z.map(Ge=>{var Xe,ba;return(Ge==null?void 0:Ge.type)==="Select"&&(p==null?void 0:p.key)===(Ge==null?void 0:Ge.prop)&&Array.isArray(Ge.value)&&(Xe=Ge.value)!=null&&Xe.every(Aa=>typeof Aa=="string")&&(Ge.selectValue=(ba=v==null?void 0:v.find(Aa=>(Aa==null?void 0:Aa.key)===(Ge==null?void 0:Ge.prop)))==null?void 0:ba.value),Ge});let R=(G=(ie=z==null?void 0:z.find(Ge=>(Ge==null?void 0:Ge.prop)===(p==null?void 0:p.key)))==null?void 0:ie.optionUrl)==null?void 0:G.menuId,P=z==null?void 0:z.find(Ge=>(Ge==null?void 0:Ge.prop)===(p==null?void 0:p.key));if(R){let Ge=await Ct(P==null?void 0:P.optionUrl,R),Xe,ba=Y.value,Aa=(Ye=(be=(xe=he.value)==null?void 0:xe.find(za=>{var Ze;return(Ze=P==null?void 0:P.optionUrl)==null?void 0:Ze.menuId}))==null?void 0:be.selectValue)==null?void 0:Ye[0];if(Ge==null||Ge.forEach(za=>{var Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze;if(R){let Q=(nl=(Ze=he.value)==null?void 0:Ze.find(sa=>{var T,Ia;return((T=P==null?void 0:P.optionUrl)==null?void 0:T.menuId)===((Ia=sa==null?void 0:sa.optionUrl)==null?void 0:Ia.menuId)}))==null?void 0:nl.prop,He=(il=(wa=z==null?void 0:z.find(sa=>(sa==null?void 0:sa.prop)===Q))==null?void 0:wa.selectValue)==null?void 0:il[0];Q!=null&&Q.includes("·")&&(Q=(ke=Q==null?void 0:Q.split("·"))==null?void 0:ke[0],He=(Ra=(Ya=(va=p==null?void 0:p.value)==null?void 0:va[((Va=p==null?void 0:p.value)==null?void 0:Va.length)-1])==null?void 0:Ya.split(" "))==null?void 0:Ra[0]),ba!=null&&ba.find(sa=>(sa==null?void 0:sa.value)===Aa)?Xe=(ze=ba==null?void 0:ba.find(sa=>(sa==null?void 0:sa.value)===Aa))==null?void 0:ze.objectValue:za[Q]===He&&(Xe=za)}}),Xe){let za=z;za=za==null?void 0:za.map(Ze=>{var nl,wa,il,ke,Va,va;return R&&(Xe!=null&&Xe[Ze==null?void 0:Ze.prop])&&pa.value==="新增"&&(Ze==null?void 0:Ze.prop)!==(P==null?void 0:P.prop)?Ze.value=(Xe==null?void 0:Xe[Ze==null?void 0:Ze.prop])||(Xe==null?void 0:Xe[(ke=(il=(wa=(nl=Ze==null?void 0:Ze.optionUrl)==null?void 0:nl.groupSelect)==null?void 0:wa[1])==null?void 0:il.replaceAll("[",""))==null?void 0:ke.replaceAll("]","")]):Ze.value=(va=(Va=he.value)==null?void 0:Va.find(Ya=>(Ya==null?void 0:Ya.prop)===(Ze==null?void 0:Ze.prop)))==null?void 0:va.value,Ze}),he.value=za}}ee.value=v},$i=async(p,v)=>{var z,R,P,D,re;if((z=p==null?void 0:p.toString())!=null&&z.includes(".txt")||(R=p==null?void 0:p.toString())!=null&&R.includes(".cpt")||(P=p==null?void 0:p.toString())!=null&&P.includes(".cyd")){const ie=await Ja.axios.get(p,{responseType:"blob",headers:{"Content-Type":"application/json"}}),G=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});let xe=URL.createObjectURL(G);Pe.value=[{name:(re=p==null?void 0:p.split("/"))==null?void 0:re[((D=p==null?void 0:p.split("/"))==null?void 0:D.length)-1],blobUrl:xe}],ua.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&j("routeUrl",{isEdit:!1,routerUrl:v})};e.onBeforeUnmount(()=>{ri.value=!1;let p=or.value;or.value=p+1});const gi=e.reactive({prop:"",order:null}),Vo=e.computed(()=>{const p=(Te.value??[]).slice(),v=gi.prop||ge.prop,z=gi.order||ge.order;if(!v||!z)return p;const R=z==="ascending",P=re=>{if(v)return re&&Object.prototype.hasOwnProperty.call(re,v)?re[v]:v.includes(".")?v.split(".").reduce((ie,G)=>ie==null?ie:ie[G],re):re==null?void 0:re[v]},D=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const ie=String(re).trim();if(ie==="")return{ok:!1,value:NaN};const G=ie.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(G))return{ok:!1,value:NaN};const xe=Number(G);return{ok:Number.isFinite(xe),value:xe}};return p.sort((re,ie)=>{const G=P(re),xe=P(ie);if(G==null&&xe==null)return 0;if(G==null)return R?-1:1;if(xe==null)return R?1:-1;const be=D(G),Ye=D(xe);if(be.ok&&Ye.ok)return R?be.value-Ye.value:Ye.value-be.value;const Ge=ke=>{if(ke==null)return{ok:!1,value:NaN};const Va=String(ke).trim();if(Va==="")return{ok:!1,value:NaN};const va=Va.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!va)return{ok:!1,value:NaN};const Ya=va[1]?-1:1,Ra=Number(va[2]),ze=Number(va[3]),Q=Number(va[4]);return[Ra,ze,Q].some(He=>Number.isNaN(He))?{ok:!1,value:NaN}:ze>=60||Q>=60?{ok:!1,value:NaN}:{ok:!0,value:Ya*(Ra*3600+ze*60+Q)}},Xe=Ge(G),ba=Ge(xe);if(Xe.ok&&ba.ok)return R?Xe.value-ba.value:ba.value-Xe.value;const Aa=new Date(G).getTime(),za=new Date(xe).getTime(),Ze=!Number.isNaN(Aa),nl=!Number.isNaN(za);if(Ze&&nl)return R?Aa-za:za-Aa;const wa=String(G),il=String(xe);return R?wa.localeCompare(il):il.localeCompare(wa)})}),Bn=e.computed(()=>{var z;const p=(de.currentPage-1)*de.pageSize,v=p+de.pageSize;return j("getSliceContLength",de),(z=Vo.value)==null?void 0:z.slice(p,v)}),Fo=p=>{de.currentPage=p,j("getSliceContLength",de)},Po=p=>{var R;de.pageSize=p;const v=((R=Te.value)==null?void 0:R.length)??0,z=p>0?Math.ceil(v/p):1;de.currentPage>z&&(de.currentPage=z||1,Ja.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),j("getSliceContLength",de)},jo=({prop:p,order:v})=>{gi.prop=p,gi.order=v,de.currentPage=1};function ao(p){const v=[];function z(R,P=""){R.forEach(D=>{D.children&&D.children.length>0?z(D.children,D.prop):v.push(D.prop)})}return z(p),v}const lo=(p,v)=>{var ie,G,xe,be;let z=(G=(ie=U.value)==null?void 0:ie.map(Ye=>Ye==null?void 0:Ye.prop))==null?void 0:G.filter(Ye=>Ye!=="operate");((xe=U.value)==null?void 0:xe.some(Ye=>{var Ge;return((Ge=Ye==null?void 0:Ye.children)==null?void 0:Ge.length)>0}))&&(z=ao((be=U.value)==null?void 0:be.filter(Ye=>(Ye==null?void 0:Ye.prop)!=="operate")));let P;if(P=(p==null?void 0:p.length)===(z==null?void 0:z.length)?p:p.slice(0,z==null?void 0:z.length),!(P==null?void 0:P.every(Ye=>z==null?void 0:z.find(Ge=>Ye===Ge))))return Ja.ElMessage.error("导入的数据表头不匹配");ii(P,v)},sn=(p,v)=>{var P;const z=p==null?void 0:p.filter(D=>D!=="序号"),R=v==null?void 0:v.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});_a.setRefreshCurStructure(!1),((P=U.value)==null?void 0:P.length)===0||lo(z,R)},Ho=(p,v,z,R)=>{const P=[],D=[],re=xe=>Object.keys(xe).length;for(const xe in p)if(p[xe]!==void 0){const be=p[xe],Ye=[];for(const[Ge,Xe]of Object.entries(be))Ye.push(Xe),D.length<re(be)&&D.push(Ge);P.push(Ye)}P.unshift(D);const ie=le.utils.aoa_to_sheet(P),G=le.utils.book_new();le.utils.book_append_sheet(G,ie,R),le.writeFileSync(G,`${v}.xlsx`),Mr.value=[]},ro=async(p,v,z,R=!1,P)=>{try{_a.setRefreshCurStructure(!1)}catch(D){Ja.ElMessage.error(D)}},Uo=async(p,v)=>{await ro()},qo=async(p,v)=>{await ro("columnType",v,p,!1)},Wo=async({newRow:p,targetIndex:v})=>{var P;if(!Ma(d.config,{type:Sa.TABLE}))return;const R=(de.currentPage-1)*de.pageSize+(v??0);p._isTemp=!0;try{(p.sort===void 0||p.sort===null||String(p.sort).trim()==="")&&(p.sort=si(R,Te.value||[]))}catch{}Te.value.splice(R,0,p),await e.nextTick(),f.value.has(p.id)||f.value.set(p.id,M.cloneDeep(p)),Te.value=(P=Te.value)==null?void 0:P.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===p.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),o.value.add(p.id),sr.value=!0},Go=(p,v,z,R=[])=>(!Array.isArray(v)||v.length===0||v.forEach(P=>{const D=P==null?void 0:P.prop;if(!D)return;let re=p==null?void 0:p[D];if(re==null||String(re).trim()==="")return;re=String(re);const ie=new Set([...(Array.isArray(z)?z:[]).filter(be=>(be==null?void 0:be.id)!==(p==null?void 0:p.id)).map(be=>be==null?void 0:be[D]).filter(be=>be!=null).map(be=>String(be)),...(Array.isArray(R)?R:[]).map(be=>be==null?void 0:be[D]).filter(be=>be!=null).map(be=>String(be))]);if(!ie.has(re))return;let G=1,xe="";for(;xe=`${re}(${G})`,!!ie.has(xe);)G++;p[D]=xe}),p),Vi=async()=>{var P,D,re,ie,G,xe,be,Ye;const p=Array.from(o.value||[]);if(p.length===0)return;const v=(D=le.getColumnChild((P=M.cloneDeep(U.value))==null?void 0:P.filter(Ge=>(Ge==null?void 0:Ge.label)!=="操作")))==null?void 0:D.filter(Ge=>(Ge==null?void 0:Ge.required)===!0);if((v==null?void 0:v.length)>0)for(let Ge=0;Ge<p.length;Ge++){const Xe=p[Ge],ba=(re=Te.value)==null?void 0:re.find(Aa=>(Aa==null?void 0:Aa.id)===Xe);if(ba)for(let Aa=0;Aa<v.length;Aa++){const za=v[Aa],Ze=za==null?void 0:za.prop,nl=(za==null?void 0:za.label)??Ze,wa=ba==null?void 0:ba[Ze];if(wa===""||wa===null||wa===void 0||Array.isArray(wa)&&wa.length===0){Ja.ElMessage.error(`${nl}不能为空`);let ke={};ke.id=ba==null?void 0:ba.id;const Va={fixContent:[ke],buttonName:"修改",relatedContents:d==null?void 0:d.related,name:d==null?void 0:d.compName,columns:U.value};j("change",Va);return}}}const z=[],R=[];if(p.forEach(Ge=>{var nl;const Xe=(nl=Te.value)==null?void 0:nl.find(wa=>(wa==null?void 0:wa.id)===Ge);if(!Xe)return;if(Xe!=null&&Xe._isTemp){const il=(le.getAllLeafNodes(U.value)||[]).filter(ze=>(ze==null?void 0:ze.mainKey)===!0||(ze==null?void 0:ze.isMainKey)===!0),ke=Te.value.findIndex(ze=>(ze==null?void 0:ze.id)===Ge),Va=ke>=0?ke+1:Te.value.length+1;Go(Xe,il,Te.value,z);const va={id:Va.toString()};(Xe==null?void 0:Xe.sort)!==void 0&&(Xe==null?void 0:Xe.sort)!==null&&String(Xe.sort).trim()!==""?va.sort=String(Xe.sort):va.sort=si(ke>=0?ke:Te.value.length-1,Te.value||[]),(le.getAllLeafNodes(U.value)||[]).filter(ze=>(ze==null?void 0:ze.type)!=="operate"&&(ze==null?void 0:ze.label)!=="操作"&&(ze==null?void 0:ze.prop)!=="operate").forEach(ze=>{const Q=ze==null?void 0:ze.prop;if(Q){const He=Xe[Q];He!==void 0?va[Q]=He??"":va[Q]=""}}),z.push(va);return}const Aa=(le.getAllLeafNodes(U.value)||[]).filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),za=new Set(Aa.map(wa=>wa==null?void 0:wa.prop).filter(Boolean)),Ze={};for(const wa of za)Object.prototype.hasOwnProperty.call(Xe,wa)&&(Ze[wa]=Xe[wa]);R.push({id:Xe.id,value:{tableData:Ze}})}),_a.setTableLoading(d==null?void 0:d.index),R.length>0){const Ge=R.map(ba=>{const Aa={id:ba.id,...ba.value.tableData};return delete Aa._isOCRRow,delete Aa._ocrTableId,delete Aa._isTemp,delete Aa.tableEditType,delete Aa.index,Aa}),Xe=[{tableName:((ie=d==null?void 0:d.related)==null?void 0:ie.find(ba=>ba==null?void 0:ba.includes("content")))??"content_"+(d==null?void 0:d.index),tableContents:Ge}];try{await M.pageBatchUpdateApi({platId:parseInt((G=Il.value)==null?void 0:G.plat_id),changeContents:Xe})}catch(ba){Ja.ElMessage.error(((be=(xe=ba==null?void 0:ba.response)==null?void 0:xe.data)==null?void 0:be.message)||(ba==null?void 0:ba.message)||"保存失败"),_a.setTableLoading(!1);return}}if(z.length>0){const Ge={fixContent:z,buttonName:"新增",relatedContents:d==null?void 0:d.related,name:d==null?void 0:d.compName,columns:U.value};j("change",Ge)}Ja.ElMessage.success("保存成功"),o.value.clear(),f.value.clear(),Te.value=(Ye=Te.value)==null?void 0:Ye.map(Ge=>({...Ge,tableEditType:"text"})),sr.value=!1,_a.setRefreshCurStructure(!0)},Ko=()=>{var v;const p=Array.from(o.value||[]);if(p.length===0){sr.value=!1;return}p.forEach(z=>{var D,re;const R=f.value.get(z),P=(D=Te.value)==null?void 0:D.find(ie=>(ie==null?void 0:ie.id)===z);if(P!=null&&P._isTemp){Te.value=Te.value.filter(ie=>(ie==null?void 0:ie.id)!==P.id);return}if(R){const ie=(re=Te.value)==null?void 0:re.findIndex(G=>(G==null?void 0:G.id)===z);ie!==-1&&(Te.value[ie]={...Te.value[ie],...R})}}),o.value.clear(),f.value.clear(),Te.value=(v=Te.value)==null?void 0:v.map(z=>({...z,tableEditType:"text"})),sr.value=!1},bi=e.ref(!1),oi=async p=>{var P,D,re,ie;if(!sr.value||p!=null&&p.isComposing||(p==null?void 0:p.key)!=="Enter")return;const v=p==null?void 0:p.target;if(((D=(P=v==null?void 0:v.tagName)==null?void 0:P.toLowerCase)==null?void 0:D.call(P))==="textarea")return;const R=document.getElementById("excel-table");R&&!R.contains(v)||((re=v==null?void 0:v.blur)==null||re.call(v),(ie=p.preventDefault)==null||ie.call(p),await e.nextTick(),await On())},On=async()=>{if(ae.value){sr.value=!1;return}if(!bi.value){bi.value=!0;try{Array.from(o.value||[]).length>0?await Vi():sr.value=!1}finally{Promise.resolve().then(()=>{bi.value=!1})}}},ki=p=>{Mr.value=p},Yo=(p,v)=>{Br.value===v?zn.value=!1:zn.value=!0,Br.value=v==null?void 0:v.changeProp},no=p=>{if(!p)return;const{item:v,value:z}=p,R=he.value.find(P=>P.prop==v.prop);R&&R.contents.push({label:z,value:z})},Kn=e.computed(()=>{var z,R,P;const p=(z=U.value)==null?void 0:z.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",p?"inline-block":"none"),(P=(R=U.value)==null?void 0:R.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:P.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Fi=async(p,v,z)=>{const R=M.cloneDeep(U.value);await e.nextTick();const P=R==null?void 0:R.map(re=>(z==null?void 0:z.label)===(re==null?void 0:re.label)?{...re,[v]:p}:re),D=Fn(P);await Es(d.index,D),U.value=P,Z.value=D},Fn=p=>{var P;const v=p||[];return((P=le.getAllLeafNodes(v)||[])==null?void 0:P.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return V0(re,D)})},Jo=async p=>{let v=await P0(d.index);v||(v=Fn(p)),Z.value=v},Xo=async(p,v)=>{const z=M.cloneDeep(U.value),R=re=>Array.isArray(re)?re.map(ie=>{const G=Array.isArray(ie==null?void 0:ie.children)&&ie.children.length>0,xe={...ie};return(xe==null?void 0:xe.prop)==="operate"||(xe==null?void 0:xe.label)==="操作"||(xe==null?void 0:xe.type)==="operate"?(xe.sortable=!1,xe.filterable=!1,xe.operable=!1):xe.sortable=G?!1:!!p,G&&(xe.children=R(xe.children)),xe}):re,P=R(z),D=Fn(P);await Es(d.index,D),U.value=P,Z.value=D,await e.nextTick(),or.value=or.value+1},Zo=()=>{te.value=!1},Qo=p=>{j("clickTrigger",p)},io=async p=>{var D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa;const v=p==null?void 0:p.row,z=p==null?void 0:p.rowData,R=p==null?void 0:p.suffix;if((D=v==null?void 0:v.toString())!=null&&D.includes(".urdf")||p!=null&&p.isUrdf||R!=null&&R.includes(".urdf")){if(v.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(q(v)){const ke={files:[Qe(v)],data:{}};Ae(ke);return}Me.value=[{url:v,extension:Ke(v)}],B.value=!0,oe.value={data:M.cloneDeep(z)},ue.value=!0;return}let P=[];if((re=v==null?void 0:v.toString())!=null&&re.includes(".stl")||(ie=v==null?void 0:v.toString())!=null&&ie.includes(".STL")||(G=v==null?void 0:v.toString())!=null&&G.includes(".obj")||(xe=v==null?void 0:v.toString())!=null&&xe.includes(".mtl")){const il=(be=v==null?void 0:v.toString())==null?void 0:be.split(","),ke=Ea(il),Va=ke==null?void 0:ke[0];if(q(Va==null?void 0:Va.extension)){Ae({files:ke,data:{}});return}Me.value=ke,B.value=!1,ue.value=!0;return}if((Ye=v==null?void 0:v.toString())!=null&&Ye.includes(".stl")||(Ge=v==null?void 0:v.toString())!=null&&Ge.includes(".STL")||(Xe=v==null?void 0:v.toString())!=null&&Xe.includes(".obj")||(ba=v==null?void 0:v.toString())!=null&&ba.includes(".mtl")||R!=null&&R.includes(".stl")||R!=null&&R.includes(".STL")||R!=null&&R.includes(".obj")||R!=null&&R.includes(".mtl")){let il,ke=[],Va={};if(Array.isArray(v)?il=v:il=v==null?void 0:v.split(","),il==null||il.forEach(va=>{va.includes(".mtl")?ke.push(va):Va.blob=Va.blob?Va.blob+","+va:va}),(ke==null?void 0:ke.length)>0&&(Va.mtlBlobs=ke),R&&(Va.suffix=R),(za=(Aa=Object.values(Va))==null?void 0:Aa[0])!=null&&za.includes("http:"))P.push(Va);else{const va=new Blob([Va.blob],{type:"application/octet-stream;charset=UTF-8"});let Ya=URL.createObjectURL(va),Ra="";(Ze=v==null?void 0:v.split("/"))==null||Ze.forEach((ze,Q)=>{var He;Q===((He=v==null?void 0:v.split("/"))==null?void 0:He.length)-1&&(Ra=ze)}),(nl=Va.blob)!=null&&nl.includes(".stl")&&(Ra=(Ra==null?void 0:Ra.replaceAll(">",""))+".urdf"),Pe.value=[{name:Ra,blobUrl:Ya}],ua.value=!0}}else{const il=await Ja.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ke=new Blob([il.data],{type:"application/octet-stream;charset=UTF-8"});let Va=URL.createObjectURL(ke),va="";if((wa=v==null?void 0:v.split("/"))==null||wa.forEach((Ya,Ra)=>{var ze;Ra===((ze=v==null?void 0:v.split("/"))==null?void 0:ze.length)-1&&(va=Ya)}),q(va)){const Ya=ye(va),Ra=Qe(v);Ae({files:[Ra],data:{trackFileType:Ya}});return}Pe.value=[{name:va,blobUrl:Va}],ua.value=!0}(P==null?void 0:P.length)>0&&r.setBlobUrls(P)},ti=p=>{var R,P,D,re;if(p!=null&&p.downloadUrl)return p==null?void 0:p.name;const v=(re=(R=p==null?void 0:p.url)==null?void 0:R.split("."))==null?void 0:re[((D=(P=p==null?void 0:p.url)==null?void 0:P.split("."))==null?void 0:D.length)-1];return(p==null?void 0:p.name)+"."+v},xi=p=>{if(!p)return"未知文件";try{const R=ti(p);if(typeof R=="string"&&R.includes("."))return R}catch{}const v=(p==null?void 0:p.fileName)||(p==null?void 0:p.name)||"未知文件",z=(p==null?void 0:p.suffix)||"";return v.includes(".")?v:`${v}${z}`},oo=p=>{if(p==null||typeof p=="number"||typeof p!="string")return p;const v=p.match(/^(\d+)\_(\d+)$/);if(!v)return p;const z=Number(v[1]),R=Number(v[2]);return!Number.isFinite(z)||!Number.isFinite(R)?p:String(z*1e3+R)},Ln=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;const z=Number(v);return Number.isFinite(z)?z:null},et=p=>{if(p==null)return null;const v=String(p).trim();if(!v)return null;if(/^\d+$/.test(v)){const P=Number(v);return Number.isFinite(P)?v.length<=10?P*1e3:P:null}const z=v.includes("T")?v:v.replace(" ","T"),R=Date.parse(z);return Number.isFinite(R)?R:null},wi=(p,v=[])=>{const z=Array.isArray(p)?p.slice():[];if(z.length<=1)return z;const R=new Map((v||[]).map((re,ie)=>[String(re),ie])),P=z.some(re=>Ln(re==null?void 0:re.sort)!==null),D=z.map((re,ie)=>({r:re,idx:ie,id:String((re==null?void 0:re.id)??""),sortVal:Ln(re==null?void 0:re.sort),createTimeMs:et(re==null?void 0:re.create_time),prevIdx:R.has(String(re==null?void 0:re.id))?R.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,ie)=>{if(P){const be=re.sortVal,Ye=ie.sortVal;if(be===null&&Ye!==null)return 1;if(be!==null&&Ye===null)return-1;if(be!==null&&Ye!==null&&be!==Ye)return be-Ye}const G=re.createTimeMs,xe=ie.createTimeMs;return G!==null&&xe!==null&&G!==xe?xe-G:G!==null&&xe===null?-1:G===null&&xe!==null?1:re.prevIdx!==ie.prevIdx?re.prevIdx-ie.prevIdx:re.idx-ie.idx}),D.map(re=>re.r)},si=(p,v=[])=>{const z=v==null?void 0:v[p-1],R=v==null?void 0:v[p],P=Ln(z==null?void 0:z.sort),D=Ln(R==null?void 0:R.sort);let re=null;P!==null&&D!==null&&D>P?re=(P+D)/2:P!==null?re=P+1:D!==null?re=Math.max(D-1,0):re=(p??0)+1;const ie=Number(re.toFixed(6));return String(Number.isFinite(ie)?ie:re)},at=async p=>{let v=null,z=null;if(p!=null&&p.id){const P=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await M.platformDownloadFile(p);v=URL.createObjectURL(D.data),z=xi(p)}finally{P.close()}}else if(p!=null&&p.downloadUrl){const P=await _i(),D=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await Ja.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),ie=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),z=p==null?void 0:p.name}else{const P=await M.platformDownloadFile({url:p==null?void 0:p.url});!p.url.toUpperCase().includes(".OBJ")&&!p.url.toUpperCase().includes(".STL")&&!p.url.toUpperCase().includes(".MTL")&&!p.url.toUpperCase().includes(".URDF")?(v=URL.createObjectURL(P.data),z=ti(p)):v=p==null?void 0:p.url}if(q(v)){const P={row:`${v}`,suffix:Ke(z)};io(P);return}const R={name:z,blobUrl:v};Pe.value=[R],ua.value=!0},to=async p=>{let v=null,z=null;if(p!=null&&p.id){const D=await M.platformDownloadFile(p);v=URL.createObjectURL(D.data),z=xi(p)}else if(p!=null&&p.downloadUrl){const D=await _i(),re=await Ja.axios.post(p==null?void 0:p.url,null,{responseType:"blob",headers:{Authorization:D,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ie=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(ie),z=p==null?void 0:p.name}else{const D=await M.platformDownloadFile({url:p==null?void 0:p.url});v=URL.createObjectURL(D.data),z=ti(p)}const R={name:z,blobUrl:v},P=document.createElement("a");P.href=R.blobUrl,P.download=R.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},ci=(p,v)=>{var R;if(Object.values(v).length===0)return;let z=p;return Object.values(v).find(P=>{var D,re,ie;return((D=P==null?void 0:P.toString())==null?void 0:D.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((ie=P==null?void 0:P.toString())==null?void 0:ie.includes(".obj"))})?z=[...p,Se.value]:(R=d==null?void 0:d.config)!=null&&R.allowMove&&(z=[...p,{label:"迁移"}]),z},Rn=()=>{F.value=!0},so=e.ref([]),Pi=async(p,v,z=!1)=>{var re,ie,G,xe;if(!p)return;if(z){Te.value=[...Na.value.values()].filter(be=>Object.values(be).some(Ye=>typeof Ye=="string"?Ye==null?void 0:Ye.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let R={};for(let be in p)(p==null?void 0:p[be])!==""&&(R[be]=p==null?void 0:p[be]);if(JSON.stringify(R)==="{}"){Te.value=Array.from(((re=Na.value)==null?void 0:re.values())??[]);return}let P=(ie=d==null?void 0:d.related)==null?void 0:ie.find(be=>be==null?void 0:be.includes("content_")),D=await M.getFillFind({platId:parseInt((G=Il==null?void 0:Il.value)==null?void 0:G.plat_id),tableName:P,params:R});D=(xe=D==null?void 0:D.data)==null?void 0:xe.result,Te.value=D,_a.setTableLoading(!1)},lt=e.computed(()=>{var v,z;return((z=(v=d==null?void 0:d.itemData)==null?void 0:v.find(R=>(R==null?void 0:R.key)==="isEdit"))==null?void 0:z.contents)??!0}),rt=async p=>{var P,D,re,ie,G,xe;if(!Ma(d.config,{type:Sa.TABLE})||!(((D=(P=d==null?void 0:d.itemData)==null?void 0:P.find(be=>(be==null?void 0:be.key)==="isEdit"))==null?void 0:D.contents)??!0))return;let z=(ie=(re=u.value)==null?void 0:re.find(be=>{var Ye;return(Ye=be==null?void 0:be.key)==null?void 0:Ye.includes("@EditRead")}))==null?void 0:ie.content;if((z==null?void 0:z.length)>0){let be=_s(z,p);if((be==null?void 0:be.length)>0)return}if(!p)return;((G=Array.from(o.value))==null?void 0:G.length)>0&&await Vi();const R=p==null?void 0:p.id;R!=null&&(o.value.clear(),f.value.clear(),f.value.has(R)||f.value.set(R,M.cloneDeep(p)),Te.value=(xe=Te.value)==null?void 0:xe.map(be=>({...be,tableEditType:(be==null?void 0:be.id)===R?"edit":"text"})),o.value.add(R),sr.value=!0)},co=async(p,v,z,R)=>{R!=null&&R.isExistChild&&j("clickMainKey",p,z,U.value)},nt=()=>{ua.value=!1},it=p=>{j("rowClick",p)};e.watch(()=>d.changedContent,()=>{var z,R;if(!d.changedContent)return;let p=(z=Te.value)==null?void 0:z.map(P=>{var D;return P.id===((D=d.changedContent)==null?void 0:D.id)&&(P={...d.changedContent,id:d.changedContent.newId?d.changedContent.newId:d.changedContent.id},delete P.newId),P});const v=(R=d.itemData)==null?void 0:R.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=p),P));Te.value=p,j("contentChange",{contents:v,index:d.index}),j("change",{content:p,index:d==null?void 0:d.index,buttonName:"",id:d==null?void 0:d.index})},{deep:!0,immediate:!0});const ot=()=>{},tt=async()=>{const p=se.value,v=sessionStorage.getItem("systemKey"),z=await le.getItemData(p,v,""),R=(z==null?void 0:z.find(ie=>(ie==null?void 0:ie.name)==="方法明细"))||(z==null?void 0:z[0]),P=(R==null?void 0:R.compData)||[],D=P==null?void 0:P.find(ie=>{const G=ie==null?void 0:ie.key;return G==="formContent"||G==="tableContents"});return D==null?void 0:D.contents},_i=async()=>{const v=Ja.Local.get("access-token");return v?`Bearer ${v}`:""},st=async(p,{token:v,inputData:z}={})=>await Ja.axios.post(p,z,{headers:{Authorization:v}}).catch(P=>(Re.setImportLoading(!1),Promise.reject(P))),ct=p=>{var R;let v={};const z=[];return v.form={},(R=M.cloneDeep(p))==null||R.forEach((P,D)=>{var re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa;if((P==null?void 0:P.comp)==="Table"){(ie=(re=P==null?void 0:P.compData)==null?void 0:re.find(va=>(va==null?void 0:va.key)==="header"))==null||ie.contents;let il=(be=(xe=(G=P==null?void 0:P.compData)==null?void 0:G.find(va=>(va==null?void 0:va.key)==="tableContents"))==null?void 0:xe.contents)==null?void 0:be.map(va=>va.slice(1));(Aa=(ba=(Xe=(Ge=(Ye=P==null?void 0:P.compData)==null?void 0:Ye.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:Ge.contents)==null?void 0:Xe[0])==null?void 0:ba[0])==null||Aa.label;let ke=(Ze=(za=P==null?void 0:P.compData)==null?void 0:za.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:Ze.contents,Va=[];il==null||il.forEach(va=>{let Ya=[];va==null||va.forEach((Ra,ze)=>{var He;let Q={};((He=ke[ze])==null?void 0:He.label)!=="操作"&&(Q[ke[ze].label]=Ra,Ya.push(Q))}),Va.push(Ya)}),v[P.name]=Va}else{const il=(wa=(nl=P.compData)==null?void 0:nl.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:wa.contents;il==null||il.forEach(ke=>{var Va,va;if(ke.prop!==""){let Ya=ke==null?void 0:ke.value;Array.isArray(Ya)?Ya=((Va=Ya==null?void 0:Ya[0])==null?void 0:Va.oldUrl)||"http://222.92.178.198:62001/"+((va=Ya==null?void 0:Ya[0])==null?void 0:va.url):Ya=Ya.toString(),ke={key:(ke==null?void 0:ke.prop)??(ke==null?void 0:ke.label),value:Ya},z.push(ke)}})}}),v.form=le.getFormContents(z),v},s=p=>{const v=[],z=R=>{R&&typeof R=="object"&&!Array.isArray(R)?Object.values(R).forEach(z):v.push(R)};return z(p),v},t=async(p,v,z)=>{var ke,Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql;Re.setImportLoading(!0),_a.setFreshContent(!1);let R=await tt().catch(qa=>(Re.setImportLoading(!1),Promise.reject(qa)));R=R==null?void 0:R.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 P=le.getEqualChild([(ke=U.value)==null?void 0:ke.filter(qa=>(qa==null?void 0:qa.label)!=="操作")]);const D=(va=(Va=le.tableToForm(R,P))==null?void 0:Va[0])==null?void 0:va.find(qa=>{const Dl=qa==null?void 0:qa.key;return Dl==="Interface"||Dl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),Re.setImportLoading(!1);return}const ie=U.value?le.getEqualChild([U.value]):[],G=ie.find(qa=>{const Dl=qa==null?void 0:qa.prop;return Dl==="Input1"||Dl==="输入数据.输入1"||Dl==="样本输入数据"}),xe=G==null?void 0:G.prop;let be=v==null?void 0:v[xe];const Ye=await _i().catch(qa=>(Re.setImportLoading(!1),Promise.reject(qa)));let Ge=!0,Xe="";(Ya=U.value)==null||Ya.forEach(qa=>{(qa==null?void 0:qa.prop)===xe&&(Ge=!!(qa!=null&&qa.childPath),Xe=qa==null?void 0:qa.childPath)});let ba="";if(Ge){let qa=(ze=(Ra=U.value)==null?void 0:Ra.find(hl=>(hl==null?void 0:hl.isMainKey)===!0))==null?void 0:ze.prop;ba=v==null?void 0:v[qa];let Dl=Xe==null?void 0:Xe.split(O),$a=[];Dl==null||Dl.forEach((hl,zl)=>{(Dl==null?void 0:Dl.length)-1===zl&&$a.push(ba),$a.push(hl)}),$a=$a==null?void 0:$a[0];let Ll=await le.getItemData($a,sessionStorage.getItem("systemKey"),""),rl=Ll==null?void 0:Ll.filter(hl=>(hl==null?void 0:hl.name)===xe);rl=rl==null?void 0:rl.map(hl=>{var zl;return hl.compData=(zl=hl==null?void 0:hl.compData)==null?void 0:zl.map(gl=>{var xr;return(gl==null?void 0:gl.key)==="tableContents"&&(gl.contents=(xr=gl==null?void 0:gl.contents)==null?void 0:xr.filter(ur=>(ur==null?void 0:ur[1])===(v==null?void 0:v[xe]))),gl}),hl}),(!rl||(rl==null?void 0:rl.length)===0)&&(rl=Ll,rl=rl==null?void 0:rl.map(hl=>{var zl;return hl.compData=(zl=hl==null?void 0:hl.compData)==null?void 0:zl.map(gl=>{var xr;return(gl==null?void 0:gl.key)==="tableContents"&&(gl.contents=(xr=gl==null?void 0:gl.contents)==null?void 0:xr.filter(ur=>{var er,kl;return(ur==null?void 0:ur[1])===(v==null?void 0:v[(kl=(er=U==null?void 0:U.value)==null?void 0:er[0])==null?void 0:kl.prop])})),gl}),hl})),be=ct(rl)}const Aa=await st(re,{token:Ye,inputData:be}).catch(qa=>(Re.setImportLoading(!1),Promise.reject(qa))),za=(Q=Aa==null?void 0:Aa.data)==null?void 0:Q.data,Ze=ie.find(qa=>(qa==null?void 0:qa.prop)==="Output1"),nl=Ze==null?void 0:Ze.prop;let wa=[],il=[];if(za&&((He=Object.values(za))==null?void 0:He.length)>0){let qa=[];const Dl=new FormData,$a=(sa=s(za))==null?void 0:sa.map(async rl=>{var hl,zl;if(!Array.isArray(rl)&&(rl!=null&&rl.includes("http"))){let gl=await Ja.axios.get(rl,{responseType:"blob"}),xr=(zl=rl==null?void 0:rl.split("/"))==null?void 0:zl[((hl=rl==null?void 0:rl.split("/"))==null?void 0:hl.length)-1];Dl.append("files",gl.data,xr)}else qa.push(rl)});if(await Promise.all($a),!le.isFormDataEmpty(Dl)){let rl=await pl.uploadAmountApi(Dl),hl=(Ia=(T=rl==null?void 0:rl.data)==null?void 0:T.result)==null?void 0:Ia.map(zl=>{var gl,xr,ur,er,kl,Yl;return{name:(Yl=(kl=(er=(gl=zl==null?void 0:zl.url)==null?void 0:gl.split("/"))==null?void 0:er[((ur=(xr=zl==null?void 0:zl.url)==null?void 0:xr.split("/"))==null?void 0:ur.length)-1])==null?void 0:kl.split("."))==null?void 0:Yl[0],url:zl==null?void 0:zl.url}});qa=[...qa,...hl]}let Ll={};for(let rl in v)rl!=="id"&&(Ll[rl]=v[rl]);Ll[nl]=qa,il.push({id:v==null?void 0:v.id,value:{tableData:Ll}})}if((il==null?void 0:il.length)>0){const qa=il.map($a=>{const Ll={id:$a.id,...$a.value.tableData};return delete Ll._isOCRRow,delete Ll._ocrTableId,delete Ll._isTemp,delete Ll.tableEditType,delete Ll.index,Ll}),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((ol=Il.value)==null?void 0:ol.plat_id),changeContents:Dl})}if((wa==null?void 0:wa.length)>0)try{await M.pageBatchAddApi({platId:parseInt((Ka=Il.value)==null?void 0:Ka.plat_id),changeContents:[{tableName:(Ca=d==null?void 0:d.related)==null?void 0:Ca.find(qa=>qa==null?void 0:qa.includes("content")),tableContents:wa.map(qa=>{var $a,Ll,rl;const Dl={id:(($a=qa==null?void 0:qa.key)==null?void 0:$a.id)??((Ll=qa==null?void 0:qa.key)==null?void 0:Ll.rowId)??(qa==null?void 0:qa.id),...((rl=qa==null?void 0:qa.value)==null?void 0:rl.tableData)||{}};return delete Dl._isOCRRow,delete Dl._ocrTableId,delete Dl._isTemp,delete Dl.tableEditType,delete Dl.index,Object.keys(Dl).forEach(hl=>{hl==="证书附件"&&Array.isArray(Dl[hl])&&(Dl[hl]=JSON.stringify(Dl[hl]))}),Dl})}]})}catch(qa){Ja.ElMessage.error(((ql=(dl=qa==null?void 0:qa.response)==null?void 0:dl.data)==null?void 0:ql.message)||(qa==null?void 0:qa.message)||"保存失败"),_a.setTableLoading(!1);return}Ui(!0),Re.setImportLoading(!1),_a.setFreshContent(!0)},h=(p,v)=>(p=p==null?void 0:p.map(z=>{var R,P;return z!=null&&z.children&&((R=z.children)!=null&&R.find(D=>D.id===(v==null?void 0:v.id))?z.children=(P=z.children)==null?void 0:P.filter(D=>(D==null?void 0:D.id)!==(v==null?void 0:v.id)):z.children=h(z.children,v)),z}),p),b=e.ref(!1),C=()=>{b.value=!0},$=async p=>{var z,R,P,D;b.value=!1;const v=Array.isArray(p)?p:p?[p]:[];if(v.length!==0)for(const re of v){const ie={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};ya.value.push(ie),hn(ie,"uploading"),Kr(ie,0);try{const G=new FormData;G.append("file",re,ie.name);const xe=await M.platformUploadFile(G);ie.uploadResult=((z=xe==null?void 0:xe.data)==null?void 0:z.result)||{name:ie.name,url:"",fileName:ie.name},el({name:((R=ie.uploadResult)==null?void 0:R.name)||ie.name,url:((P=ie.uploadResult)==null?void 0:P.url)||"",id:(D=ie.uploadResult)==null?void 0:D.id}),hn(ie,"uploaded"),Kr(ie,100)}catch(G){console.error("文件上传失败:",G),Ja.ElMessage.error(`文件 ${ie.name} 上传失败,请重试`),hn(ie,"pending"),Kr(ie,0);const xe=ya.value.findIndex(be=>be.uid===ie.uid);xe>-1&&ya.value.splice(xe,1)}}},K=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:(p,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)"}]}),X=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:""}),_e=()=>{X.show=!1},We=async p=>{var v,z,R,P,D,re,ie,G;try{const xe=[];let be=(v=Te.value||[])==null?void 0:v.slice();(p||[]).forEach(Aa=>{const za={...Aa};try{za.sort=si(0,be)}catch{}xe.push(za),be.unshift(za)});let Ye=await M.quoteApi({platId:parseInt((z=Il==null?void 0:Il.value)==null?void 0:z.plat_id),type:"fatherSyncs",related:[{menus:se.value,groups:""},{menus:se.value,groups:d==null?void 0:d.compName}]});Ye=(R=Ye==null?void 0:Ye.data)==null?void 0:R.result;let Ge=Ye==null?void 0:Ye.map(Aa=>({tableName:"content_"+(Aa==null?void 0:Aa.id),tableContents:xe==null?void 0:xe.map((za,Ze)=>({id:Ze,...za}))})),Xe=[{tableName:(P=d==null?void 0:d.related)==null?void 0:P.find(Aa=>Aa==null?void 0:Aa.includes("content")),tableContents:xe==null?void 0:xe.map((Aa,za)=>({id:za,...Aa}))}];Xe=[...Xe,...Ge];const ba=await M.pageBatchAddApi({platId:parseInt((D=Il.value)==null?void 0:D.plat_id),changeContents:Xe});if(((re=ba==null?void 0:ba.data)==null?void 0:re.code)===200){const Aa={buttonName:"新增",columns:U.value,fixContent:xe==null?void 0:xe.map((Ze,nl)=>({id:nl,...Ze})),relatedContents:d==null?void 0:d.related};await Nt(Aa),Ja.ElMessage.success("数据导入成功");let za=[];Xe==null||Xe.forEach(Ze=>{var nl;(nl=Ze==null?void 0:Ze.tableContents)==null||nl.forEach(wa=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(wa),request_result:"{}",is_delete:!1,request_table:Ze==null?void 0:Ze.tableName,request_type:"export"})})}),await M.pageBatchAddApi({platId:parseInt((ie=Il==null?void 0:Il.value)==null?void 0:ie.plat_id),changeContents:[{tableName:"log",tableContents:za}]})}else{let Aa=[];Xe==null||Xe.forEach(za=>{var Ze;(Ze=za==null?void 0:za.tableContents)==null||Ze.forEach(nl=>{Aa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(nl),request_result:"{}",is_delete:!1,request_table:za==null?void 0:za.tableName,request_type:"error"})})}),await M.pageBatchAddApi({platId:parseInt((G=Il==null?void 0:Il.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Aa}]}),Ja.ElMessage.error("数据导入响应失败")}}catch(xe){throw new Error(xe)}},Ce=async p=>{var v,z,R,P,D,re,ie,G,xe,be;try{if(p==="cancel"&&(X.show=!1),p==="replace"&&((v=X==null?void 0:X.existRows)==null?void 0:v.length)>0){await M.pageBatchDeleteApi({platId:parseInt((z=Il.value)==null?void 0:z.plat_id),changeContents:[{tableName:((R=d==null?void 0:d.related)==null?void 0:R.find(Ge=>Ge==null?void 0:Ge.includes("content_")))||((P=d==null?void 0:d.related)==null?void 0:P.find(Ge=>Ge==null?void 0:Ge.includes("content"))),tableContents:X==null?void 0:X.existRows}]});const Ye=await M.pageBatchAddApi({platId:parseInt((D=Il.value)==null?void 0:D.plat_id),changeContents:[{tableName:(re=d==null?void 0:d.related)==null?void 0:re.find(Ge=>Ge==null?void 0:Ge.includes("content")),tableContents:(()=>{const Ge=(Te.value||[]).filter(za=>!((X==null?void 0:X.existRows)||[]).some(Ze=>String(Ze==null?void 0:Ze.id)===String(za==null?void 0:za.id))),Xe=(X==null?void 0:X.tableData)||[],ba=[];let Aa=Ge.slice();return Xe.forEach(za=>{const Ze={...za};try{Ze.sort=si(0,Aa)}catch{}ba.push(Ze),Aa.unshift(Ze)}),ba.map((za,Ze)=>({id:Ze,...za}))})()}]});if(((ie=Ye==null?void 0:Ye.data)==null?void 0:ie.code)!==200)return;(G=X.newRows)!=null&&G.length&&await We(X.newRows),await Nt({buttonName:"新增",columns:U.value,fixContent:(xe=X==null?void 0:X.tableData)==null?void 0:xe.map((Ge,Xe)=>({id:Xe,...Ge})),relatedContents:d==null?void 0:d.related}),(be=X.newRows)!=null&&be.length||Ja.ElMessage.success("数据导入成功")}}catch(Ye){throw new Error(Ye)}finally{X.show=!1,X.columns=[],X.tableData=[],X.existRows=[]}},na=()=>{K.show=!1},Oa=p=>{var v,z;if((p==null?void 0:p.buttonName)==="取消")return K.show=!1;K.to=p==null?void 0:p.content,!(!(d!=null&&d.index)||!((v=K.to)!=null&&v.groupName))&&(d==null?void 0:d.index)!==((z=K.to)==null?void 0:z.groupName)&&(j("change",{buttonName:"迁移",value:{from:K.from,to:K.to,data:K.selectRow}}),K.show=!1)},ll=async p=>{var v,z,R,P;if(p){if(!Ur.validateFileSize(p.raw)){Ja.ElMessage.warning(`文件大小不能超过 ${Zr.value.maxSize}MB`);const D=ya.value.findIndex(re=>re.uid===p.uid);D>-1&&ya.value.splice(D,1),Qa();return}if(!Ur.validateFileType(p.raw)){Ja.ElMessage.warning("请上传图片文件");const D=ya.value.findIndex(re=>re.uid===p.uid);D>-1&&ya.value.splice(D,1),Qa();return}hn(p,"uploading"),Kr(p,0);try{const D=new FormData;D.append("file",p.raw,p.name);const re=await M.platformUploadFile(D);p.uploadResult=((v=re==null?void 0:re.data)==null?void 0:v.result)||{name:p.name,url:"",fileName:p.name},el({name:((z=p.uploadResult)==null?void 0:z.name)||p.name,url:((R=p.uploadResult)==null?void 0:R.url)||"",id:(P=p.uploadResult)==null?void 0:P.id}),hn(p,"uploaded"),Kr(p,100)}catch(D){console.error("文件上传失败:",D),Ja.ElMessage.error(`文件 ${p.name} 上传失败,请重试`),hn(p,"pending"),Kr(p,0);const re=ya.value.findIndex(ie=>ie.uid===p.uid);re>-1&&ya.value.splice(re,1)}finally{Qa()}}},Qa=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');p&&(p.value="")})},cl=async()=>{var z,R;if(sessionStorage.setItem("ocr_root_table_id",String((d==null?void 0:d.index)??"")),ya.value.length===0){Ja.ElMessage.warning("请先选择要上传的图片");return}if(ya.value.filter(P=>{const D=Gl(P);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){Ja.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}br.value=!0,De.value=0;let v=null;try{ya.value.forEach(Ze=>{hn(Ze,"processing")});const P=Math.floor(Math.random()*10)+90;v=setInterval(()=>{De.value<P?De.value+=1:clearInterval(v)},50);const D=ya.value.map(Ze=>{var nl,wa,il;return{name:((nl=Ze.uploadResult)==null?void 0:nl.name)||Ze.name,url:((wa=Ze.uploadResult)==null?void 0:wa.url)||"",fileName:((il=Ze.uploadResult)==null?void 0:il.fileName)||Ze.name}}),re=Ur.extractTableHeaders(U.value),ie=D.map(Ze=>({name:(Ze==null?void 0:Ze.fileName)||(Ze==null?void 0:Ze.name),url:(Ze==null?void 0:Ze.url)||""})),G=await Ur.recognize(ie,re);if(console.log(G,"ocrResult"),clearInterval(v),v=null,(G==null?void 0:G.code)===500||(G==null?void 0:G.type)==="error"||!(G!=null&&G.result)){De.value=0,ya.value.forEach(Ze=>{hn(Ze,"failed"),Kr(Ze,0)}),Ja.ElMessage.error((G==null?void 0:G.message)||"OCR识别失败,请重试"),br.value=!1;return}De.value=P;const xe=Array.isArray(G==null?void 0:G.result)?G.result:[];if(xe.length===0){De.value=0,ya.value.forEach(Ze=>{hn(Ze,"failed"),Kr(Ze,0)}),Ja.ElMessage.warning("OCR识别未返回有效数据"),br.value=!1;return}const be=new Set,Ye=[];xe.forEach((Ze,nl)=>{const wa=Ze!=null&&Ze.数据&&typeof(Ze==null?void 0:Ze.数据)=="object"?Ze.数据:{},il=Array.isArray(Ze==null?void 0:Ze.图片信息)?Ze.图片信息:[],ke=new Map;il.forEach(va=>{va!=null&&va.name&&ke.set(va.name,va.url||"")});const Va={_index:nl,_certType:(Ze==null?void 0:Ze.证书类型)||"",_certNo:(Ze==null?void 0:Ze.证书编号)||"",_ocrImages:il,__ocrFieldMeta:{}};Object.entries(wa).forEach(([va,Ya])=>{let Ra="",ze=0,Q=[],He="";Ya&&typeof Ya=="object"&&!Array.isArray(Ya)?(Ra=(Ya==null?void 0:Ya.value)??"",ze=(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]??"",ze=Ya[1]??0):(Ra=Ya??"",ze=0),Va[va]=Ra,Va[`${va}_accuracy`]=ze,be.add(va),Va.__ocrFieldMeta[va]={value:Ra,score:ze,bboxNorm:Q,imageName:He,imageUrl:He&&ke.get(He)||"",images:il}}),Ye.push(Va)});const Ge=[],Xe=new Set;Ye.forEach(Ze=>{Ze&&be.forEach(nl=>{const wa=Ze[`${nl}_accuracy`];(typeof wa=="number"?wa>0:wa!=null&&String(wa).trim()!==""&&String(wa)!=="0")&&Xe.add(nl)})}),be.forEach(Ze=>{Ge.push({prop:Ze,label:Ze,editable:!0,minWidth:230}),Xe.has(Ze)&&Ge.push({prop:`${Ze}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),ya.value.forEach(Ze=>{hn(Ze,"completed")}),De.value=100,Be.value=Ge,Pa.value=Ye,bl.value=D,Tl.value=G;const ba=["出厂编号","设备名称","制造厂"],Aa=Ge.filter(Ze=>Ze&&!Ze.isAccuracy&&typeof Ze.prop=="string").map(Ze=>Ze.prop),za=["出厂编号","设备名称","制造厂"];Oe.value=Aa.filter(Ze=>za.includes(Ze)),console.log("[OCR] 默认勾选字段 props:",Oe.value),ra.value=2,br.value=!1,ia.value=!1}catch(P){console.error("OCR处理失败:",P),v&&(clearInterval(v),v=null),Ja.ElMessage.error(((R=(z=P==null?void 0:P.response)==null?void 0:z.data)==null?void 0:R.message)||"OCR识别失败,请重试"),br.value=!1,De.value=0,ya.value.forEach(D=>{hn(D,"pending"),Kr(D,0)})}},Cl=p=>{if(p==null)return"";let v=String(p);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 Ze,nl;const p=bl.value,v=Tl.value,z=Pa.value;if(!z||z.length===0){Ja.ElMessage.warning("暂无数据可添加");return}const R=(Ze=le.getAllLeafNodes(U.value)||[])==null?void 0:Ze.filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),P=new Map,D=new Map,re=(nl=R==null?void 0:R.find(wa=>(wa==null?void 0:wa.label)==="证书附件"))==null?void 0:nl.prop;R==null||R.forEach(wa=>{wa!=null&&wa.label&&(wa!=null&&wa.prop)&&(P.set(wa.label,wa.prop),D.set(wa.prop,wa.label))});const ie=Date.now(),G=wa=>String(ie*1e3+wa),xe=[],be=[],Ye=wa=>{const il=Bo&&Bo[wa]||[wa];for(const ke of il){const Va=P.get(ke);if(Va)return Va}return""},Ge=Ye("出厂编号"),Xe=Ye("设备名称"),ba=Ye("制造厂"),Aa=[],za=wa=>{var Ra,ze;if(!re)return[];const il=(Array.isArray(p)?p[wa]:null)||null,ke=(il==null?void 0:il.url)||"",Va=(il==null?void 0:il.fileName)||(il==null?void 0:il.name)||"";return(String(Va).toLowerCase().endsWith(".pdf")||String(ke).toLowerCase().endsWith(".pdf"))&&ke?[{url:ke,name:Va,fileName:Va}]:(Array.isArray((ze=(Ra=v==null?void 0:v.result)==null?void 0:Ra[wa])==null?void 0:ze.图片信息)?v.result[wa].图片信息:[]).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((wa,il)=>{var ol;const ke={id:G(il),_isOCRRow:!0,_ocrTableId:d==null?void 0:d.index};for(const[Ka,Ca]of P.entries())Object.prototype.hasOwnProperty.call(wa,Ka)&&(ke[Ca]=wa[Ka]);re&&(ke[re]=za(il));const Va=(Array.isArray(v==null?void 0:v.result)?v.result[il]:null)||null,va=(Array.isArray(p)?p[il]:null)||null,Ya=(va==null?void 0:va.url)||"",Ra=(va==null?void 0:va.fileName)||(va==null?void 0:va.name)||"",ze=String(Ra).toLowerCase().endsWith(".pdf")||String(Ya).toLowerCase().endsWith(".pdf"),Q={ts:Date.now(),versionId:String(Date.now())+"_"+String(il),label:new Date().toLocaleString(),certType:(Va==null?void 0:Va.证书类型)||"",certNo:(Va==null?void 0:Va.证书编号)||"",fileType:ze?"pdf":"image",sourceUrl:ze?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?ke==null?void 0:ke[Ka]:""),sa=He(Ge),T=He(Xe),Ia=He(ba);if(!!(Ge&&Xe&&ba&&sa&&T&&Ia)){const Ka=(Te.value||[]).find(Ca=>{const dl=Cl(Ge?Ca==null?void 0:Ca[Ge]:""),ql=Cl(Xe?Ca==null?void 0:Ca[Xe]:""),qa=Cl(ba?Ca==null?void 0:Ca[ba]:"");return dl&&ql&&qa&&dl===sa&&ql===T&&qa===Ia});if(Ka){Aa.push({idx:il,ocrRow:ke,versionItem:Q,ocrNo:sa,candidates:[Ka],selectedTargetId:String((Ka==null?void 0:Ka.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(sa&&Ge){const Ka=(Te.value||[]).filter(Ca=>{const dl=Cl(Ge?Ca==null?void 0:Ca[Ge]:"");return dl&&dl===sa});if(Ka.length>0){Aa.push({idx:il,ocrRow:ke,versionItem:Q,ocrNo:sa,candidates:Ka,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ke.sort===void 0||ke.sort===null||String(ke.sort).trim()===""){const Ka=(Te.value||[]).map(dl=>Ln(dl==null?void 0:dl.sort)).filter(dl=>dl!==null),Ca=Ka.length>0?Math.max(...Ka):((ol=Te.value)==null?void 0:ol.length)??0;ke.sort=String(Number((Ca+1).toFixed(6)))}}catch{}Jl(d==null?void 0:d.index,ke.id,Q),Aa.push({idx:il,ocrRow:ke,versionItem:Q,ocrNo:sa,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Aa||[]).length>0){ml.value=(Aa||[]).map(wa=>({...wa,selectedTargetId:(wa==null?void 0:wa.selectedTargetId)||""})),Ve.value=!0,Ne.value=be,Pl.value=xe,Da.value=v,ul.value=p,Za.value=re||"";return}},Vl=(p,v,z)=>{Pa.value[p]&&(Pa.value[p][v]=z)},Xl=p=>p==null||p===0?"-":`${(Number(p)*100).toFixed(1)}%`,cr=p=>{if(p==null||p===0)return"#909399";const v=Number(p);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},Ul=p=>{var z,R,P,D;if(ma.value===p){ma.value=null,xa.value=!1,ta.value="";return}ma.value=p,ta.value="";const v=(z=Pa.value)==null?void 0:z[p];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){ga.value=v._ocrImages.map(G=>({name:(G==null?void 0:G.name)||"",url:(G==null?void 0:G.url)||""})).filter(G=>G.name||G.url);const re=v.__ocrFieldMeta||{},ie=(R=Object.values(re))==null?void 0:R.find(G=>G==null?void 0:G.imageName);fl.value=(ie==null?void 0:ie.imageName)||((D=(P=ga.value)==null?void 0:P[0])==null?void 0:D.name)||"",xa.value=ga.value.length>0}else ga.value=[],xa.value=!1,fl.value=""},Ql=()=>{xl.value=!1,ya.value=[],sl.value=null,ra.value=1,Ga.value.clear(),wl.value.clear(),De.value=0,xa.value=!1},cn=p=>p.raw?URL.createObjectURL(p.raw):p.url?p.url:"",Gl=p=>{const v=p.uid||p.name;return Ga.value.get(v)||"pending"},mn=p=>{const v=p.uid||p.name;return wl.value.get(v)||0},Kr=(p,v)=>{const z=p.uid||p.name;wl.value.set(z,Math.min(100,Math.max(0,v)))},Nn=p=>{const v=Gl(p),z=100.53;if(v==="completed"||v==="uploaded")return`${z} ${z}`;if(v==="failed")return`${z} ${z}`;if(v==="uploading"){const R=mn(p);return`${z*(R/100)} ${z}`}else if(v==="processing")return`${z*.5} ${z}`;return`0 ${z}`},hn=(p,v)=>{const z=p.uid||p.name;Ga.value.set(z,v),(v==="completed"||v==="uploaded")&&Kr(p,100)},ui=()=>{e.nextTick(()=>{const p=document.querySelector('.ocr-upload-input input[type="file"]');if(p)p.value="",p.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async z=>{const R=Array.from(z.target.files||[]);for(const P of R){const D={name:P.name,raw:P,uid:Date.now()+Math.random()};ya.value.push(D),await ll(D)}z.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},bu=()=>{ra.value>1&&ra.value--},ku=()=>{ra.value===1?ya.value.length>0&&!br.value&&cl():ra.value===2&&(_l(),ra.value=3)},xu=async p=>{await $t(p==null?void 0:p.row)},wu=async({row:p,prop:v})=>{!p||!v||await $t(p,v)},$t=async(p,v)=>{var P,D;const z=p==null?void 0:p.id;if(!z){Ja.ElMessage.warning("暂无可预览数据");return}let R=Wa(d==null?void 0:d.index,z);if(!R||R.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),ie=re!==null?Number(re):null;if(ie!=null&&ie!==""&&!Number.isNaN(ie)){const G=Wa(ie,z);Array.isArray(G)&&G.length>0&&(Kl(d==null?void 0:d.index,z,G),R=G)}}if(!R||R.length===0){const re=(P=le.getAllLeafNodes(U.value)||[])==null?void 0:P.filter(G=>(G==null?void 0:G.type)!=="operate"&&(G==null?void 0:G.label)!=="操作"&&(G==null?void 0:G.prop)!=="operate"),ie=v||((D=re==null?void 0:re.find(G=>(G==null?void 0:G.label)==="证书附件"))==null?void 0:D.prop);if(ie&&p[ie]){const G=p[ie];let xe=[],be="",Ye=!1;if(typeof G=="string")try{const Ge=JSON.parse(G);Array.isArray(Ge)&&(xe=Ge.map(Xe=>({name:(Xe==null?void 0:Xe.name)||(Xe==null?void 0:Xe.fileName)||"",url:(Xe==null?void 0:Xe.url)||""})).filter(Xe=>Xe.url||Xe.name),xe.length>0&&(be=xe[0].url||"",Ye=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf")))}catch{be=G,Ye=String(G).toLowerCase().endsWith(".pdf"),xe=[{name:G,url:G}]}else Array.isArray(G)&&(xe=G.map(Ge=>({name:(Ge==null?void 0:Ge.name)||(Ge==null?void 0:Ge.fileName)||"",url:(Ge==null?void 0:Ge.url)||""})).filter(Ge=>Ge.url||Ge.name),xe.length>0&&(be=xe[0].url||"",Ye=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(be).toLowerCase().endsWith(".pdf")));if(xe.length>0||be){const Ge={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:p.证书类型||"",certNo:p.证书编号||"",fileType:Ye?"pdf":"image",sourceUrl:Ye?be:"",images:xe};R=[Ge],Jl(d==null?void 0:d.index,z,Ge)}}}if(!R||R.length===0){Ja.ElMessage.warning("暂无可预览数据");return}Ha.value=R,ha.value=!0},_u=p=>{ya.value=ya.value.filter((v,z)=>z!==p)},ut=async(p,v,z)=>{var R,P,D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya;if(Ma(d.config,{type:Sa.TABLE,tableOperate:p})){if(oa.value="",Ee.value=!0,ja.value=!0,j("onButtonClick",p,v),Y.value=[],p==="删除")M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ra,ze,Q,He;(Ra=Te.value)!=null&&Ra.find(sa=>(sa==null?void 0:sa.id)===(v==null?void 0:v.id))?Te.value=(ze=M.cloneDeep(Te.value))==null?void 0:ze.filter(sa=>(sa==null?void 0:sa.id)!==(v==null?void 0:v.id)):Te.value=h(M.cloneDeep(Te.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{}d0(Gr.value,Wl.value,v==null?void 0:v.id),_a.setTableLoading(d==null?void 0:d.index),j("change",{content:Te.value,fixContent:[v],index:d==null?void 0:d.index,type:"delete",name:d==null?void 0:d.groupNames,buttonName:p,columns:U.value,relatedContents:d==null?void 0:d.related}),console.log(v,"item")});else if(p==="批量删除"){if(((R=Mr.value)==null?void 0:R.length)===0)return Ja.ElMessage.warning("请先勾选操作的数据");M.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var Q,He,sa,T,Ia;const Ra=(Q=Mr.value)==null?void 0:Q.map(Ua=>Ua.id);Te.value=(He=M.cloneDeep(Te.value))==null?void 0:He.filter(Ua=>!(Ra!=null&&Ra.includes(Ua.id))),_a.setTableLoading(d==null?void 0:d.index),j("change",{content:Te.value,fixContent:Mr.value,index:d==null?void 0:d.index,type:"delete",name:d==null?void 0:d.compName,buttonName:p,relatedContents:d==null?void 0:d.related,columns:U.value});const ze=(Ra||[]).filter(Boolean);if(ze.length>0&&ze.every(Ua=>Ua!=null&&Ua!=="")){const Ua=(Mr.value||[]).map(ol=>{const Ka={...ol};return delete Ka._isOCRRow,delete Ka._ocrTableId,delete Ka._isTemp,delete Ka.tableEditType,delete Ka.index,Ka});await M.pageBatchDeleteApi({platId:parseInt((sa=Il.value)==null?void 0:sa.plat_id),changeContents:[{tableName:((T=d==null?void 0:d.related)==null?void 0:T.find(ol=>ol==null?void 0:ol.includes("content_")))||((Ia=d==null?void 0:d.related)==null?void 0:Ia.find(ol=>ol==null?void 0:ol.includes("content"))),tableContents:Ua}]})}})}else if(p==="复制新增"){pa.value="复制新增",M.cloneDeep(v);const Ra=(P=U.value)==null?void 0:P.find(ze=>ze==null?void 0:ze.isMainKey);Ra||((D=U.value)==null||D[0]),rr.value=v,Ui(!0)}else if(p==="新增")pa.value="新增",ji(""),te.value=!0;else if(p==="编辑")pa.value="编辑",ji(v),te.value=!0;else if(p==="查看")pa.value="查看",ji(v),Ee.value=!1,ja.value=!1,te.value=!0;else if(p==="查看三维模型"){const Ra={};for(let Q in v)Q!=="id"&&(Ra[Q]=v[Q]);let ze=(re=Object.values(Ra))==null?void 0:re[1];ka.setTableShowThree(ze)}else if(p==="切换视图")Lu();else if(((ie=z==null?void 0:z.extra)==null?void 0:ie.type)==="modelExample")pa.value=p,we.value=!0;else if(p==="新建"){let Ra=da.value,ze=[];for(let Ia in Ra)Ia!=null&&Ia.includes(`loading${((G=Il.value)==null?void 0:G.account)||((xe=Il.value)==null?void 0:xe.账号)}`)&&(ze=[...ze,...Ia]);let Q=[];for(let Ia in Ra)Ia!=null&&Ia.includes(`updateLoading${((be=Il.value)==null?void 0:be.account)||((Ye=Il.value)==null?void 0:Ye.账号)}`)&&(Q=[...Q,...Ia]);let He=ze==null?void 0:ze.map(Ia=>Ia==null?void 0:Ia.id);const sa=Q==null?void 0:Q.map(Ia=>Ia==null?void 0:Ia.id);He=[...M.cloneDeep(He),...sa],(He==null?void 0:He.length)>0&&(He!=null&&He.every(Ia=>Ia!==null&&Ia))&&await qr.batchDeleteInsofDataApi({ids:He});const T=(Ge=$e.value)==null?void 0:Ge.find(Ia=>(Ia==null?void 0:Ia.label)==="新建");await Cu(!1,T)}else if(p==="修改模板"){let Ra=M.cloneDeep(se).value;_a.setRouteToChildPath(Ra),Re.setActiveMenuPath(Ra+O)}else if(p==="执行")t(p,v);else if(p==="导出paraform"){const Ra=M.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const ze=["推力","真空","压力","温度","流量"],Q=kl=>{var Yl,pr,Ol;return kl?typeof(kl==null?void 0:kl.value)=="string"?kl.value:((Ol=(pr=(Yl=kl==null?void 0:kl._custom)==null?void 0:Yl.value)==null?void 0:pr.value)==null?void 0:Ol.value)||"":""},He=Array.isArray(tr.value)?tr.value:[],sa=Q(He.find(kl=>(kl==null?void 0:kl.condition)==="child")),T=String(sa||"").slice(0,8),Ia=kl=>{if(kl==null)return"";const Yl=String(kl).trim();if(!Yl)return"";if(/^\d{8}$/.test(Yl))return Yl;const pr=Yl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(pr){const fr=pr[1],wr=pr[2].padStart(2,"0"),hr=pr[3].padStart(2,"0");return`${fr}${wr}${hr}`}const Ol=Yl.replace(/\D/g,"");return Ol.length>=8?Ol.slice(0,8):""},Ua=async kl=>{var Yl,pr;if(!kl)return"";try{const Ol=await Wr("试验任务/任务管理",!1),fr=(dr,Nr=[])=>{if(!Array.isArray(dr))return Nr;for(const Rr of dr)(Rr==null?void 0:Rr.comp)==="Table"&&(Rr!=null&&Rr.name)&&Nr.push(Rr),Array.isArray(Rr==null?void 0:Rr.children)&&fr(Rr.children,Nr),Array.isArray(Rr==null?void 0:Rr.tab)&&fr(Rr.tab,Nr),Array.isArray(Rr==null?void 0:Rr.choice)&&fr(Rr.choice,Nr);return Nr},hr=fr(Ol||[]).find(dr=>(dr==null?void 0:dr.name)==="任务列表"),Dr=((pr=(Yl=hr==null?void 0:hr.compData)==null?void 0:Yl.find(dr=>(dr==null?void 0:dr.key)==="tableContents"))==null?void 0:pr.contents)||[];if(!Array.isArray(Dr)||Dr.length===0)return"";const rn=Dr.find(dr=>String((dr==null?void 0:dr["试验代号(名称)"])||"").slice(0,8)===kl);return Ia(rn==null?void 0:rn.计划试验时间)}catch(Ol){return console.warn("获取任务列表计划试验时间失败:",Ol),""}},ol=(se.value||"").replace(/\/+$/,""),Ka=sa?`${ol}/${sa}`:ol,Ca=await Wr(Ka||se.value,!1),dl=String(Ue.value||"").trim(),ql=kl=>String(kl||"").trim(),qa=(kl,Yl=[],pr="")=>{if(!Array.isArray(kl))return Yl;for(const Ol of kl){const fr=ql((Ol==null?void 0:Ol.choiceName)||(Ol==null?void 0:Ol.name0)||pr);(Ol==null?void 0:Ol.comp)==="Table"&&(Ol==null?void 0:Ol.name)&&ze.includes(Ol.name)&&(!dl||fr===dl)&&Yl.push(Ol),Array.isArray(Ol==null?void 0:Ol.children)&&qa(Ol.children,Yl,fr),Array.isArray(Ol==null?void 0:Ol.tab)&&qa(Ol.tab,Yl,fr),Array.isArray(Ol==null?void 0:Ol.choice)&&qa(Ol.choice,Yl,fr)}return Yl},Dl=qa(Ca||[]),$a=new Map;for(const kl of Dl)kl!=null&&kl.name&&!$a.has(kl.name)&&$a.set(kl.name,kl);const Ll=ze.map(kl=>$a.get(kl)).filter(Boolean);if(!Ll||Ll.length===0)return Ja.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const rl=kl=>{const Yl=new Map,pr=(Ol,fr=[])=>{if(Array.isArray(Ol))for(const wr of Ol){const hr=((wr==null?void 0:wr.label)??"").toString().trim(),Dr=hr?[...fr,hr]:[...fr];if(Array.isArray(wr==null?void 0:wr.children)&&wr.children.length>0)pr(wr.children,Dr);else{const dr=((wr==null?void 0:wr.prop)??"").toString();if(!dr)continue;const Nr=hr||dr,Rr=(Dr.length>0?[...fr,Nr]:[Nr]).join(".");Yl.set(dr,Rr)}}};return pr(kl,[]),Yl},hl=(kl,Yl)=>{const pr=rl(kl||[]),fr=(le.getAllLeafNodes(kl||[])||[]).filter(hr=>(hr==null?void 0:hr.prop)&&(hr==null?void 0:hr.type)!=="operate"&&(hr==null?void 0:hr.label)!=="操作"&&(hr==null?void 0:hr.prop)!=="operate"),wr=Array.isArray(Yl)?Yl:[];return wr.length===0?[]:wr.map(hr=>{const Dr={};return fr.forEach(rn=>{const dr=String(rn.prop),Nr=pr.get(dr)||String(rn.label||rn.prop);Dr[Nr]=(hr==null?void 0:hr[dr])??""}),Dr})},zl=Ll.map(kl=>{var wr,hr;const Yl=(kl==null?void 0:kl.compData)||[];let pr=(wr=Yl==null?void 0:Yl.find(Dr=>(Dr==null?void 0:Dr.key)==="header"))==null?void 0:wr.contents;Array.isArray(pr==null?void 0:pr[0])&&(pr=pr[0]);const Ol=((hr=Yl==null?void 0:Yl.find(Dr=>(Dr==null?void 0:Dr.key)==="tableContents"))==null?void 0:hr.contents)||[];if(!Array.isArray(pr)||pr.length===0||!Array.isArray(Ol)||Ol.length===0)return null;const fr=hl(pr||[],Ol||[]);return!Array.isArray(fr)||fr.length===0?null:{类型:kl==null?void 0:kl.name,数据:fr}}).filter(Boolean);if(!zl||zl.length===0)return Ja.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const gl=await Ua(T),xr={试验代号:T,试验日期:gl,ParaForm:zl},ur=await _i().catch(()=>""),er=await M.exportParaformApi(xr,ur);if(((Xe=er==null?void 0:er.data)==null?void 0:Xe.code)===200&&((Aa=(ba=er==null?void 0:er.data)==null?void 0:ba.result)!=null&&Aa.Excel文件)){const kl=er.data.result.Excel文件,Yl=await M.platformDownloadFile({url:kl}),pr=new Blob([Yl.data],{type:"application/vnd.ms-excel"}),Ol=URL.createObjectURL(pr),fr=M.dayjs().format("YYYYMMDD"),hr=`${(T||"UNKNOWN").trim()||"UNKNOWN"}_${fr}_paraform.xls`,Dr=document.createElement("a");Dr.href=Ol,Dr.download=hr,Dr.style.display="none",document.body.appendChild(Dr),Dr.click(),setTimeout(()=>{document.body.removeChild(Dr),URL.revokeObjectURL(Ol)},100);const rn=Array.isArray((Ze=(za=er==null?void 0:er.data)==null?void 0:za.result)==null?void 0:Ze.warnings)?er.data.result.warnings:[];if(rn.length>0){const dr=rn.map((Nr,Rr)=>`${Rr+1}. ${(Nr==null?void 0:Nr.field)||"未知字段"}:${(Nr==null?void 0:Nr.message)||""}`).join(`
24
24
  `);Ja.ElMessage.warning({message:`导出成功,但存在以下提示:
25
- ${dr}`,duration:5e3,showClose:!0})}else Ja.ElMessage.success("导出成功")}else Ja.ElMessage.error(((nl=er==null?void 0:er.data)==null?void 0:nl.message)||"导出失败")}catch(ze){console.error("导出paraform失败:",ze),Ja.ElMessage.error("导出失败:"+((ze==null?void 0:ze.message)||"未知错误"))}finally{Ra.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((wa=Mr.value)==null?void 0:wa.length)===0)return Ja.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((il=Te.value)==null?void 0:il.length)===0)return Ja.ElMessage.warning("暂无数据导出");let Ra=["序号",...(Va=(ke=U.value)==null?void 0:ke.map(sa=>sa==null?void 0:sa.prop))==null?void 0:Va.filter(sa=>sa!=="操作")],ze=p==="导出全部"?Te.value:Mr.value;const Q=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];ze=ze==null?void 0:ze.map(sa=>Object.fromEntries(Object.entries(sa).filter(([T])=>!Q.includes(T)))),Ra=["序号",...Ra],ze=ze==null?void 0:ze.map((sa,T)=>({序号:T+1,...sa}));let He=(d==null?void 0:d.compName)||"表格信息";Ho(ze,He,Ra,He)}else if(p==="OCR识别")xl.value=!0,ya.value=[],ra.value=1,Ga.value.clear(),wl.value.clear(),De.value=0;else if(p==="迁移")K.selectRow=v,K.show=!0;else if(p==="生成方法"){let Ra=await B0(v),ze;v!==""?ze=[v]:ze=M.cloneDeep(Te.value),ze=ze==null?void 0:ze.map(He=>(He.输出值=Ra,He));const Q={fixContent:ze,buttonName:"编辑",relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames};j("change",Q)}else if(p==="签字板"||p==="触控笔")tl.value.dialogShow=!0,tl.value.dialogTitle=p;else if(((va=z==null?void 0:z.extra)==null?void 0:va.type)==="methodButton"){let Ra;v!==""?Ra=[v]:Ra=M.cloneDeep(Te.value);const ze=await St(Ra,U==null?void 0:U.value,"Manual",Te.value,d==null?void 0:d.calculator,d==null?void 0:d.compNames);let Q;(Ya=ze==null?void 0:ze[0])!=null&&Ya.menuPathContent?Q={fixContent:ze,buttonName:"新增",relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames}:Q={fixContent:ze,buttonName:"methodButton",relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames},j("change",Q)}}},Eu=async(p,v)=>{var z,R,P,D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke;try{let Va,va;const Ya=(z=da.value[se.value+O])==null?void 0:z.filter(Ua=>{var ol;return((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.type)==="structureMethod"}),Ra=(R=da.value[se.value+O])==null?void 0:R.filter(Ua=>{var ol;return((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.type)==="structure"}),ze=Ya==null?void 0:Ya.find(Ua=>{var ol,Ka;return((Ka=(ol=Ua==null?void 0:Ua.value)==null?void 0:ol.pageData)==null?void 0:Ka.method)==="保存"});if(!ze)return;const Q=(ie=(re=da.value[(D=(P=ze==null?void 0:ze.value)==null?void 0:P.pageData)==null?void 0:D.path])==null?void 0:re.filter(Ua=>{var ol;return((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.type)==="data"}))==null?void 0:ie.find(Ua=>{var ol,Ka,Ca,dl;return((Ka=(ol=Ua==null?void 0:Ua.value)==null?void 0:ol.tableData)==null?void 0:Ka.算法名称)===((dl=(Ca=ze==null?void 0:ze.value)==null?void 0:Ca.pageData)==null?void 0:dl.method)});if(!Q)return;const He={buttonName:(xe=(G=ze==null?void 0:ze.value)==null?void 0:G.pageData)==null?void 0:xe.method,api:(Ye=(be=Q==null?void 0:Q.value)==null?void 0:be.tableData)==null?void 0:Ye.算法体,content:Ra==null?void 0:Ra.map(Ua=>{var ol;return(ol=Ua==null?void 0:Ua.value)==null?void 0:ol.pageData}),extraContent:[],extraValues:(Xe=(Ge=ze==null?void 0:ze.value)==null?void 0:Ge.pageData)==null?void 0:Xe.data,methodName:(Aa=(ba=ze==null?void 0:ze.value)==null?void 0:ba.pageData)==null?void 0:Aa.path};if(!p)return;const sa={...p,compData:(za=p==null?void 0:p.compData)==null?void 0:za.map(Ua=>{var ol;return(Ua==null?void 0:Ua.key)==="formContent"?{...Ua,contents:(ol=Ua==null?void 0:Ua.contents)==null?void 0:ol.map(Ka=>(Ka==null?void 0:Ka.prop)===v?{...Ka,value:""}:Ka)}:Ua})},T={key:{pageKey:se.value+O,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:sa}},Ia=await Ja.axios.post(He.api,T,{headers:{"Content-Type":"application/json"}});return((Ze=Ia==null?void 0:Ia.data)==null?void 0:Ze.code)===200&&(Va=(wa=(nl=Ia==null?void 0:Ia.data)==null?void 0:nl.result)==null?void 0:wa.latestReportCode,va=(ke=(il=Ia==null?void 0:Ia.data)==null?void 0:il.result)==null?void 0:ke.status),{newMainKeyValue:Va,newStatus:va}}catch(Va){throw Ja.ElMessage.error(Va),new Error(Va)}},Vt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const Cu=async(p,v,z)=>{var G,xe;let R=p==null?void 0:p[v==null?void 0:v.prop],P=1,D,re;const ie=M.cloneDeep(se).value+O+R;if(ie){Vt.value="",D=(G=da.value[ie])==null?void 0:G.filter(Ge=>{var Xe;return((Xe=Ge==null?void 0:Ge.key)==null?void 0:Xe.type)==="structure"});const be=D==null?void 0:D.find(Ge=>{var Xe,ba,Aa;return((Aa=(ba=(Xe=Ge==null?void 0:Ge.value)==null?void 0:Xe.pageData)==null?void 0:ba.comp)==null?void 0:Aa.toUpperCase())==="FORM"});re={...(xe=be==null?void 0:be.value)==null?void 0:xe.pageData,id:be==null?void 0:be.id};const Ye=await Eu(re,v==null?void 0:v.prop);if(Vt.value=Ye==null?void 0:Ye.newStatus,Ye!=null&&Ye.newMainKeyValue)return Ye==null?void 0:Ye.newMainKeyValue}if(Te.value.some(be=>(be==null?void 0:be[v==null?void 0:v.prop])===R)){const be=R;for(;Te.value.some(Ye=>(Ye==null?void 0:Ye[v==null?void 0:v.prop])===`${be}(${P})`);)P++;R=`${be}(${P})`}return R},Du=async(p,v,z)=>{var D,re,ie,G;let R,P;if(await Cu(z==null?void 0:z.data,z==null?void 0:z.firstCol),R=M.cloneDeep(se).value+O,P=M.cloneDeep(R)+`loading${((D=Il.value)==null?void 0:D.account)||((re=Il.value)==null?void 0:re.账号)}`,v){const xe=(G=(ie=da.value[P])==null?void 0:ie.filter(be=>{var Ye;return((Ye=be==null?void 0:be.key)==null?void 0:Ye.parentTable)===""}))==null?void 0:G.map(be=>{var Ye;return{id:be==null?void 0:be.id,...(Ye=be==null?void 0:be.value)==null?void 0:Ye.pageData}});(xe==null?void 0:xe.length)>0||await le.loadingConstruct(R,P,null,null,null),_a.setRouteToChildPath(M.cloneDeep(se).value),Re.setActiveMenuPath(P)}else _a.setRouteToChildPath(M.cloneDeep(se).value),Re.setActiveMenuPath(P)},Tu=()=>{ue.value=!1,Me.value=[],B.value=!1},ji=p=>{var ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze,Q,He,sa;const v=[];Ie.value=M.cloneDeep(U.value);let z=(G=(ie=u.value)==null?void 0:ie.find(T=>{var Ia;return(Ia=T==null?void 0:T.key)==null?void 0:Ia.includes("@EditRead")}))==null?void 0:G.content,R=!1;(z==null?void 0:z.length)>0&&(R=Ss(z,p),(R==null?void 0:R.length)>0?R=!0:R=!1),(be=le.getColumnChild((xe=M.cloneDeep(U.value))==null?void 0:xe.filter(T=>(T==null?void 0:T.label)!=="操作")))==null||be.forEach((T,Ia)=>{var Ua,ol,Ka;T!=null&&T.formType&&((Ua=T==null?void 0:T.formType)==null?void 0:Ua.toUpperCase())==="SELECT"||T!=null&&T.menuId?v.push({label:(ol=T==null?void 0:T.prop)!=null&&ol.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",name:(T==null?void 0:T.prop)??"t"+Ia,prop:T==null?void 0:T.prop,type:"Select",value:(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??Ia,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,multipleLimit:T==null?void 0:T.multipleLimit,width:2,isFormColHidden:T==null?void 0:T.isFormColHidden,relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,allSelectionContents:(T==null?void 0:T.allSelectionContents)??[],filterContent:T==null?void 0:T.filterContent,disabled:(T==null?void 0:T.prop)==="disabled"?!0:R||(T==null?void 0:T.disabled),filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly}):v.push({label:(Ka=T==null?void 0:T.prop)!=null&&Ka.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",prop:T==null?void 0:T.prop,name:(T==null?void 0:T.prop)??"t"+Ia,type:!(T!=null&&T.formType)||(T==null?void 0:T.formType)===""?"Input":T==null?void 0:T.formType,value:(T==null?void 0:T.formType)==="Upload"?(p==null?void 0:p[T==null?void 0:T.prop])??"{}":(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??Ia,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,width:2,isFormColHidden:T==null?void 0:T.isFormColHidden,disabled:(T==null?void 0:T.prop)==="disabled"?!0:R||(T==null?void 0:T.disabled),relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly})}),p===""||!p||(oa.value=(p==null?void 0:p.id)??"");let P=le.getColumnChild((Ye=M.cloneDeep(U.value))==null?void 0:Ye.filter(T=>(T==null?void 0:T.label)!=="操作"));ea.value&&((Ge=ea.value)==null?void 0:Ge.length)>0&&(ea.value=(Xe=M.cloneDeep(ea).value)==null?void 0:Xe.map(T=>{var Ua;let Ia=(T==null?void 0:T.prop)||((Ua=P==null?void 0:P.find(ol=>(ol==null?void 0:ol.label)===(T==null?void 0:T.label)))==null?void 0:Ua.prop);return Ia&&(T.value=p[Ia]),T})),he.value=ea.value&&((ba=ea.value)==null?void 0:ba.length)>0?le.getTableFormToForm(ea.value):v,he.value=((Aa=he.value)==null?void 0:Aa.map(T=>({...T,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled})))??he.value;let D=[],re=((nl=(Ze=(za=d.itemData)==null?void 0:za.filter(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:Ze[0])==null?void 0:nl.contents)??"";if(re=le.analyzeSplitToContent(re,","),(re==null?void 0:re.length)>0&&(D=re.flat()),(D==null?void 0:D.length)>0){let T=D==null?void 0:D.filter(Ca=>Ca==null?void 0:Ca.includes("@Type"));if(T=T==null?void 0:T[(T==null?void 0:T.length)-1],(T==null?void 0:T[(T==null?void 0:T.length)-1])===","&&(T=T==null?void 0:T.slice(0,(T==null?void 0:T.length)-1)),T){let Ca=(il=(wa=T==null?void 0:T.replace("=",y))==null?void 0:wa.split(y))==null?void 0:il[1];((ke=Ca==null?void 0:Ca.trim())==null?void 0:ke.toUpperCase())==="MANUAL"&&(d==null||d.index,he.value=(Va=he.value)==null?void 0:Va.map((dl,ql)=>dl))}let Ia=(va=he.value)==null?void 0:va.filter(Ca=>Ca==null?void 0:Ca.mainKey),Ua;Ia==null||Ia.forEach(Ca=>{var ql;if(Ua!==void 0)return;let dl=Ca==null?void 0:Ca.menus;((ql=Ia==null?void 0:Ia.filter(qa=>qa==null?void 0:qa.mainKey))==null?void 0:ql.length)>1&&(Ua=dl,Ca==null||Ca.groups)});let ol=[],Ka=new Map;if(Ia==null||Ia.forEach(Ca=>{var dl,ql,qa,Dl,$a,Ll,rl,hl,zl,gl,xr,ur,er;if((dl=Ca==null?void 0:Ca.prop)!=null&&dl.includes(".")){let kl=[];Ka.get(((qa=(ql=Ca==null?void 0:Ca.prop)==null?void 0:ql.split("."))==null?void 0:qa[0])+(Ca!=null&&Ca.isMainPath?0:1)+((Dl=Ca==null?void 0:Ca.groups)==null?void 0:Dl[0]))&&(kl=Ka.get(((Ll=($a=Ca==null?void 0:Ca.prop)==null?void 0:$a.split("."))==null?void 0:Ll[0])+(Ca!=null&&Ca.isMainPath?0:1)+((rl=Ca==null?void 0:Ca.groups)==null?void 0:rl[0]))),kl.push(Ca),Ka.set(((zl=(hl=Ca==null?void 0:Ca.prop)==null?void 0:hl.split("."))==null?void 0:zl[0])+(Ca!=null&&Ca.isMainPath?0:1)+((gl=Ca==null?void 0:Ca.groups)==null?void 0:gl[0]),kl)}else{let kl=[];Ka.get("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((xr=Ca==null?void 0:Ca.groups)==null?void 0:xr[0]))&&(kl=Ka.get("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((ur=Ca==null?void 0:Ca.groups)==null?void 0:ur[0]))),kl.push(Ca),Ka.set("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((er=Ca==null?void 0:Ca.groups)==null?void 0:er[0]),kl)}}),ol=Array.from(Ka.values()),(ol==null?void 0:ol.length)>0)for(let Ca in ol){let dl=ol==null?void 0:ol[Ca];if((dl==null?void 0:dl.length)!==1){if((dl==null?void 0:dl.length)>1){let ql=dl==null?void 0:dl.map(gl=>gl==null?void 0:gl.prop),qa=dl==null?void 0:dl.map(gl=>gl==null?void 0:gl.label),Dl=dl==null?void 0:dl.map(gl=>gl==null?void 0:gl.value),$a=(Ya=M.cloneDeep(dl))==null?void 0:Ya[0],Ll=(Ra=he.value)==null?void 0:Ra.findIndex(gl=>(gl==null?void 0:gl.prop)===($a==null?void 0:$a.prop)),rl=(ze=he.value)==null?void 0:ze.slice(0,Ll),hl=(He=he.value)==null?void 0:He.slice(Ll,(Q=he.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=ql==null?void 0:ql.join("·");let zl=dl==null?void 0:dl.map(gl=>{var xr;return(xr=gl==null?void 0:gl.words)==null?void 0:xr.join(".")});$a.relatedWords=zl,$a.usingType="parent",hl.unshift($a),he.value=[...rl,...hl],he.value=(sa=he.value)==null?void 0:sa.map(gl=>(ql!=null&&ql.find(xr=>xr===(gl==null?void 0:gl.prop))&&(gl.isFormColHidden=!0,gl.relatedWords=zl),gl))}}}}},Bu=()=>{var v;const p=(v=i.value)==null?void 0:v.$el;p&&Fl.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{var re;const{oldIndex:R,newIndex:P}=z;if(R===P)return;const D=Kn.value.splice(R,1)[0];Kn.value.splice(P,0,D),U.value=(re=U.value)==null?void 0:re.slice().sort((ie,G)=>{if(ie.label==="操作")return 1;if(G.label==="操作")return-1;const xe=Kn.value.findIndex(Ye=>Ye.label===ie.label),be=Kn.value.findIndex(Ye=>Ye.label===G.label);return xe-be})}})};e.onMounted(()=>{fa.value=window.innerWidth-240*2,window.addEventListener("keydown",oi)});const Nu=()=>{e.nextTick(()=>{Bu()})},Au=()=>{c.value=!0},dt=(p,v)=>{var R;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let z;return p.children=(R=p.children)==null?void 0:R.map(P=>{var D,re;if((P==null?void 0:P.id)===oa.value){let ie={};for(let G in P){let xe=(D=v==null?void 0:v.find(be=>(be==null?void 0:be.prop)===G))==null?void 0:D.label;xe?ie[G]=(re=rr.value)==null?void 0:re[xe]:ie[G]=P[G]??""}P=Object.assign(ie,rr.value),z=P}else{let ie=dt(P,v);P=ie==null?void 0:ie.contents,z=ie==null?void 0:ie.currentSelectContents}return P}),{contents:p,currentSelectContents:z}},Ft=(p,v)=>{let z,R;return p!=null&&p.find(P=>(P==null?void 0:P.id)===oa.value)?z=p==null?void 0:p.map(P=>{var D,re,ie;if((P==null?void 0:P.id)===oa.value){let G={};for(let be in P){let Ye=(D=v==null?void 0:v.find(Ge=>(Ge==null?void 0:Ge.prop)===be))==null?void 0:D.label;Ye?G[be]=((re=rr.value)==null?void 0:re[Ye])??"":G[be]=P[be]??""}let xe=rr.value;for(let be in G)(ie=rr.value)!=null&&ie[be]||(xe[be]=(G==null?void 0:G[be])??"");P=xe,R=P}return P}):z=p==null?void 0:p.map(P=>{var D,re,ie,G;if((P==null?void 0:P.id)===oa.value){let xe={};for(let be in P){let Ye=(D=v==null?void 0:v.find(Ge=>(Ge==null?void 0:Ge.prop)===be))==null?void 0:D.label;Ye?xe[be]=(re=rr.value)==null?void 0:re[Ye]:xe[be]=P[be]??""}P=Object.assign(xe,rr.value),R=P}else P=(ie=dt(P,v))==null?void 0:ie.contents,R=(G=dt(P,v))==null?void 0:G.currentSelectContents;return P}),{newContents:z,currentSelectContents:R}},Pt=(p,v,z)=>{var R,P;return p[v==null?void 0:v.prop]=z,typeof p.id=="number"&&(p.id=(R=p.id)==null?void 0:R.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(Pt)),p},jt=p=>{var z;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((z=p.children)==null||z.forEach(R=>{v.push(...jt(R))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(R=>{const P={...R};return delete P.children,P}):[]},uo=["Pacific6000数据采集装置.通道号","通道号"],Hi=p=>{if(!p)return"";const v=uo.map(z=>p==null?void 0:p[z]).find(z=>z!=null&&String(z).trim()!=="");return v==null?"":String(v).trim()},pt=async(p,v=void 0)=>{if(!p)return!1;try{const z=Xe=>{var ba,Aa,za;return Xe?typeof(Xe==null?void 0:Xe.value)=="string"?Xe.value:((za=(Aa=(ba=Xe==null?void 0:Xe._custom)==null?void 0:ba.value)==null?void 0:Aa.value)==null?void 0:za.value)||"":""},R=Array.isArray(tr.value)?tr.value:[],P=z(R.find(Xe=>(Xe==null?void 0:Xe.condition)==="child")),D=(se.value||"").replace(/\/+$/,""),re=P?`${D}/${P}`:D,ie=await Wr(re||se.value,!1),G=String(Ue.value||"").trim(),xe=Xe=>String(Xe||"").trim(),be=(Xe,ba=[],Aa="")=>{if(!Array.isArray(Xe))return ba;for(const za of Xe){const Ze=xe((za==null?void 0:za.choiceName)||(za==null?void 0:za.name0)||Aa);(za==null?void 0:za.comp)==="Table"&&(!G||Ze===G)&&ba.push(za),Array.isArray(za==null?void 0:za.children)&&be(za.children,ba,Ze),Array.isArray(za==null?void 0:za.tab)&&be(za.tab,ba,Ze),Array.isArray(za==null?void 0:za.choice)&&be(za.choice,ba,Ze)}return ba},Ye=be(ie||[]),Ge=String((d==null?void 0:d.compName)||"");return Ye.some(Xe=>{var Aa,za;const ba=((za=(Aa=Xe==null?void 0:Xe.compData)==null?void 0:Aa.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:za.contents)||[];return!Array.isArray(ba)||ba.length===0?!1:ba.some(Ze=>{if(String((Xe==null?void 0:Xe.name)||"")===Ge&&(Ze==null?void 0:Ze.id)===v)return!1;const wa=Hi(Ze);return!!wa&&wa===p})})}catch{return(Te.value||[]).some(R=>{if((R==null?void 0:R.id)===v)return!1;const P=Hi(R);return!!P&&P===p})}},Ui=async(p=!0,v,z)=>{var xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl;if(rr.value){const $a=(be=le.getColumnChild((xe=M.cloneDeep(U.value))==null?void 0:xe.filter(rl=>(rl==null?void 0:rl.label)!=="操作")))==null?void 0:be.filter(rl=>(rl==null?void 0:rl.required)===!0);for(let rl=0;rl<(($a==null?void 0:$a.length)??0);rl++){const hl=$a[rl],zl=hl==null?void 0:hl.prop,gl=(hl==null?void 0:hl.label)??zl,xr=(Ye=rr.value)==null?void 0:Ye[zl];if(xr===""||xr===null||xr===void 0||Array.isArray(xr)&&xr.length===0){Ja.ElMessage.error(`${gl}不能为空`);return}}const Ll=Hi(rr.value);if(Ll&&await pt(Ll,oa.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let R=le.getColumnChild((Ge=M.cloneDeep(U.value))==null?void 0:Ge.filter($a=>($a==null?void 0:$a.label)!=="操作")),P,D=M.cloneDeep(Te.value);if(!rr.value){te.value=!1;return}if(oa.value===""){aa.value++;let $a;$a={id:aa.value.toString()};try{$a.sort=si(0,Te.value||[])}catch{}$a!=null&&$a.children&&($a={...$a,children:(Xe=$a.children)==null?void 0:Xe.map(rl=>Pt(rl,v,z))});const Ll=Object.assign(rr.value,$a);D.unshift(Ll),P=Ll}else D=(ba=Ft(D,R))==null?void 0:ba.newContents,P=(Aa=Ft(D,R))==null?void 0:Aa.currentSelectContents;const re=(za=d.itemData)==null?void 0:za.filter($a=>($a==null?void 0:$a.key)==="childTree")[0];if(((Ze=re==null?void 0:re.contents)==null?void 0:Ze.length)>0){pa.value="编辑";const $a=[];D==null||D.forEach((hl,zl)=>{var xr;let gl={};if(Array.isArray(hl)){let ur=[];hl==null||hl.filter(er=>!(er!=null&&er.id)).forEach((er,kl)=>{var Yl,pr,Ol,fr,wr,hr,Dr;if((pr=(Yl=Or.value)==null?void 0:Yl[kl])!=null&&pr.prop&&!Array.isArray(er)){let rn={};rn[Or.value[kl].column]=er,V!=null&&V.value&&((Ol=V==null?void 0:V.value)==null?void 0:Ol.length)>0&&((fr=V==null?void 0:V.value)!=null&&fr.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(rn)))&&(ur=(wr=V==null?void 0:V.value)==null?void 0:wr.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(rn))),ur&&ur.length>0?gl[Or.value[kl].prop]=ur!=null&&ur.find(dr=>{var Nr;return((Nr=Object.keys(dr))==null?void 0:Nr[0])===Or.value[kl].column})?(hr=ur==null?void 0:ur.find(dr=>{var Nr;return((Nr=Object.keys(dr))==null?void 0:Nr[0])===Or.value[kl].column}))==null?void 0:hr[Or.value[kl].column]:er:gl[Or.value[kl].prop]=er}else Array.isArray(er)&&((Dr=Or.value[kl])!=null&&Dr.prop?gl[Or.value[kl].prop]=er:gl.children=Et(er,Or.value))})}else gl=hl;if(Array.isArray(hl)&&hl.some(ur=>ur==null?void 0:ur.id)){const ur=(xr=hl==null?void 0:hl.find(er=>er.id))==null?void 0:xr.id;$a.push(Object.assign(gl,{id:oo(ur)}))}else gl.id?$a.push(gl):$a.push(Object.assign(gl,{id:zl.toString()}))});const Ll=(Te.value||[]).map(hl=>String(hl==null?void 0:hl.id)),rl=wi($a,Ll);Te.value=Wt(rl,re,U.value)}Ut(Te.value),Gr.value=Te.value;const ie=f0(Gr.value,Wl.value,D);let G=[];if(ae.value?(G=(nl=M.cloneDeep(ae).value.singleContent)==null?void 0:nl.filter($a=>($a==null?void 0:$a.id)!==(P==null?void 0:P.id)),G.push(P)):G=[P],sr.value){const $a={content:ie,singleContent:((wa=re==null?void 0:re.contents)==null?void 0:wa.length)>0?G==null?void 0:G.flatMap(jt):G,index:d==null?void 0:d.index,buttonName:"编辑",column:U.value,parentTableId:d==null?void 0:d.parentTableId};_a.setCacheUpdatingData($a)}if((il=U.value)==null||il.forEach($a=>{($a==null?void 0:$a.formType)==="Upload"&&(P[$a.prop]=P[$a.prop]===""?"{}":typeof P[$a.prop]!="string"?JSON.stringify(P[$a.prop]):P[$a.prop])}),p){(Ya=(va=(Va=(ke=d.itemData)==null?void 0:ke.find(rl=>(rl==null?void 0:rl.key)==="filterAllType"))==null?void 0:Va.value)==null?void 0:va.find(rl=>(rl==null?void 0:rl.value)==="onConditionContents"))==null||Ya.content;let $a=(Ra=d.itemData)==null?void 0:Ra.filter(rl=>(rl==null?void 0:rl.key)==="filterAllType");$a=Array.from(new Map($a.filter(Boolean).map((rl,hl)=>[rl.value,{...rl,_idx:hl}])).values()).sort((rl,hl)=>rl._idx-hl._idx).map(({_idx:rl,...hl})=>hl),$a=(ze=$a==null?void 0:$a[($a==null?void 0:$a.length)-1])==null?void 0:ze.value;const Ll={fixContent:[P],buttonName:pa.value,relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames};_a.setTableLoading(d==null?void 0:d.index),te.value=!1,rr.value=void 0,j("change",Ll)}if((sa=(He=(Q=he.value)==null?void 0:Q[0])==null?void 0:He.optionUrl)!=null&&sa.menuId){te.value=!1;let $a=(T=d.itemData)==null?void 0:T.filter(Ll=>(Ll==null?void 0:Ll.key)==="filterAllType");if(($a==null?void 0:$a.length)>0){let Ll=$a==null?void 0:$a.map(zl=>zl==null?void 0:zl.value),rl=(ol=(Ua=(Ia=Ll.flat().find(zl=>{var gl;return(gl=zl==null?void 0:zl.content)==null?void 0:gl.includes("@Num")}))==null?void 0:Ia.content)==null?void 0:Ua.split(":"))==null?void 0:ol[1];((dl=(Ca=(Ka=Ll.flat().find(zl=>{var gl;return(gl=zl==null?void 0:zl.content)==null?void 0:gl.includes("@Type:")}))==null?void 0:Ka.content)==null?void 0:Ca.split(":"))==null?void 0:dl[1])!=="Manual"&&(rl=parseInt(rl),Te.value=(Dl=Te.value)==null?void 0:Dl.slice(((ql=Te.value)==null?void 0:ql.length)-rl,(qa=Te.value)==null?void 0:qa.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",oi),U.value=[],Te.value=[],Ie.value=[],ne.value=[],ea.value=[],Ta.value=[],Me.value=[],Fe.value=[],he.value=[],Mr.value=[],i.value=null,pn.value=""});const po=async(p,v,z)=>{var Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra;Br.value=(z==null?void 0:z.prop)??(z==null?void 0:z.property);const R=M.cloneDeep(d.itemData),P=((Xe=R==null?void 0:R.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:Xe.contents)??[];let D=P==null?void 0:P.find((ze,Q)=>{var He,sa,T;return(ze==null?void 0:ze.prop)===Br.value||(ze==null?void 0:ze.label)===Br.value||(Q==null?void 0:Q.toString())===((T=(sa=(He=Br.value)==null?void 0:He.split("a"))==null?void 0:sa[1])==null?void 0:T.toString())});const re=le.getColumnChild((ba=M.cloneDeep(U.value))==null?void 0:ba.filter(ze=>(ze==null?void 0:ze.label)!=="操作"));if(D||(D=re==null?void 0:re.find(ze=>(ze==null?void 0:ze.prop)===Br.value||(ze==null?void 0:ze.label)===Br.value)),D&&!((Aa=D==null?void 0:D.menus)!=null&&Aa.length)&&!((za=D==null?void 0:D.groups)!=null&&za.length)&&!((Ze=D==null?void 0:D.words)!=null&&Ze.length)){const ze=(nl=he.value)==null?void 0:nl.find(Q=>(Q==null?void 0:Q.prop)===Br.value);ze&&(D={...D,menus:(ze==null?void 0:ze.menus)??(D==null?void 0:D.menus),groups:(ze==null?void 0:ze.groups)??(D==null?void 0:D.groups),words:(ze==null?void 0:ze.words)??(D==null?void 0:D.words),bindMenus:(ze==null?void 0:ze.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(ze==null?void 0:ze.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(ze==null?void 0:ze.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(ze==null?void 0:ze.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((wa=he==null?void 0:he.value)==null||wa.forEach(ze=>{var Q,He,sa,T,Ia;(ze==null?void 0:ze.prop)===(D==null?void 0:D.prop)&&(ze!=null&&ze.endChildMenu)&&((Q=D==null?void 0:D.prop)!=null&&Q.includes(".")&&((sa=(He=D==null?void 0:D.prop)==null?void 0:He.split("."))==null?void 0:sa[0])!==((Ia=(T=ze==null?void 0:ze.prop)==null?void 0:T.split("."))==null?void 0:Ia[0])?D.endChildMenu=ze==null?void 0:ze.value:D.endChildMenu=ze==null?void 0:ze.endChildMenu)})),!D)return;const ie=Br.value,G=(il=Te.value)==null?void 0:il.findIndex(ze=>(ze==null?void 0:ze.id)===(v==null?void 0:v.id));G!==-1&&ie&&(Te.value[G]={...Te.value[G],[ie]:p});const xe=ze=>{Array.isArray(ze)&&ze.forEach(Q=>{Array.isArray(Q==null?void 0:Q.allSelectionContents)&&Q.allSelectionContents.length>0&&(Q.contactValue=Te.value[G]??v),Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&xe(Q.children)})};xe(U.value),D.value=p,D.endChildMenu=D.endChildMenu||"";let be=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const Ye=ze=>{Array.isArray(ze)&&ze.forEach(Q=>{var sa,T;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]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const Ia=(sa=Q==null?void 0:Q.prop)!=null&&sa.includes(".")?Q.prop.split(".")[0]:null,Ua=(T=D==null?void 0:D.prop)!=null&&T.includes(".")?D.prop.split(".")[0]:null;(!Ia||!Ua||Ia===Ua)&&(Q.endChildMenu=be)}Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&Ye(Q.children)})};if(Ye(U.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let ze=D!=null&&D.relatedContents&&((ke=D==null?void 0:D.relatedContents)==null?void 0:ke.length)>0?(Va=D==null?void 0:D.relatedContents)==null?void 0:Va.find(Q=>{var He,sa,T,Ia;return(Q==null?void 0:Q[(Ia=(He=D==null?void 0:D.prop)==null?void 0:He.split("."))==null?void 0:Ia[((T=(sa=D==null?void 0:D.prop)==null?void 0:sa.split("."))==null?void 0:T.length)-1]])===(D==null?void 0:D.value)}):await ks(D);if(ze){const Q={...v};re==null||re.forEach(He=>{var sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl,zl;(He==null?void 0:He.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((sa=D==null?void 0:D.relatedContents)==null?void 0:sa.length)>0?(T=He==null?void 0:He.prop)!=null&&T.includes(".")&&((Ua=(Ia=He==null?void 0:He.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])===((Ka=(ol=D==null?void 0:D.prop)==null?void 0:ol.split("."))==null?void 0:Ka[0])?Q[He.prop]=ze[(qa=(Ca=He==null?void 0:He.prop)==null?void 0:Ca.split("."))==null?void 0:qa[((ql=(dl=He==null?void 0:He.prop)==null?void 0:dl.split("."))==null?void 0:ql.length)-1]]??Q[He.prop]:Q[He.prop]=(ze==null?void 0:ze[He.prop])??Q[He.prop]:le.same((D==null?void 0:D.menus)??[],(He==null?void 0:He.menus)??[])&&le.same((D==null?void 0:D.groups)??[],(He==null?void 0:He.groups)??[])&&!le.same((D==null?void 0:D.words)??[],(He==null?void 0:He.words)??[])?(Dl=He==null?void 0:He.prop)!=null&&Dl.includes(".")&&((Ll=($a=He==null?void 0:He.prop)==null?void 0:$a.split("."))==null?void 0:Ll[0])!==((hl=(rl=D==null?void 0:D.prop)==null?void 0:rl.split("."))==null?void 0:hl[0])||(Q[He.prop]=(ze==null?void 0:ze[(zl=He==null?void 0:He.words)==null?void 0:zl.join(".")])??(ze==null?void 0:ze[He.prop])??Q[He.prop]):(!(He!=null&&He.isMainPath)&&le.same((D==null?void 0:D.bindMenus)??[],(He==null?void 0:He.bindMenus)??[]),Q[He.prop]=(ze==null?void 0:ze[He.prop])??Q[He.prop]))}),Te.value=(va=M.cloneDeep(Te.value))==null?void 0:va.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=D==null?void 0:D.optionUrl)!=null&&Ya.menuSelect){let ze="";re==null||re.forEach(sa=>{var T,Ia,Ua,ol,Ka;ze===""&&((Ua=(Ia=(T=sa==null?void 0:sa.optionUrl)==null?void 0:T.groupSelect)==null?void 0:Ia[1])!=null&&Ua.includes("["))&&(ze=(Ka=(ol=sa==null?void 0:sa.optionUrl)==null?void 0:ol.groupSelect)==null?void 0:Ka[1])});let Q=await Ct(D),He;if(Q==null||Q.forEach(sa=>{var T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl;ze===((Ia=(T=D==null?void 0:D.optionUrl)==null?void 0:T.groupSelect)==null?void 0:Ia[1])&&((Ka=(ol=(Ua=D==null?void 0:D.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:ol[1])!=null&&Ka.includes("["))&&((Dl=M.cloneDeep(sa))==null?void 0:Dl[(qa=(ql=(dl=(Ca=D==null?void 0:D.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:dl[1])==null?void 0:ql.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])===(D==null?void 0:D.value)&&(He=sa)}),He){const sa={...v};re==null||re.forEach(T=>{var Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll;(He!=null&&He[T==null?void 0:T.label]||He!=null&&He[(Ka=(ol=(Ua=(Ia=T==null?void 0:T.optionUrl)==null?void 0:Ia.groupSelect)==null?void 0:Ua[1])==null?void 0:ol.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])&&((ql=(dl=(Ca=T==null?void 0:T.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:dl[1])!=null&&ql.includes("["))&&(sa[T.prop]=(He==null?void 0:He[T==null?void 0:T.label])||(He==null?void 0:He[(Ll=($a=(Dl=(qa=T==null?void 0:T.optionUrl)==null?void 0:qa.groupSelect)==null?void 0:Dl[1])==null?void 0:$a.replaceAll("[",""))==null?void 0:Ll.replaceAll("]","")]))}),Te.value=(Ra=M.cloneDeep(Te.value))==null?void 0:Ra.map(T=>(T==null?void 0:T.id)===(v==null?void 0:v.id)?{...sa,id:T==null?void 0:T.id}:T)}}},zu=async p=>{var Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze;if(!p)return;const v=M.cloneDeep(rr.value||{});rr.value=p;const z=Hi(v),R=Hi(rr.value);if(R&&R!==z&&await pt(R,oa.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),uo.forEach(He=>{if(Object.prototype.hasOwnProperty.call(rr.value||{},He)||Object.prototype.hasOwnProperty.call(v||{},He)){const sa=(v==null?void 0:v[He])??"";rr.value[He]=sa,p[He]=sa}}),he.value=(he.value||[]).map(He=>{if(!(He!=null&&He.prop)||!uo.includes(He.prop))return He;const sa=(v==null?void 0:v[He.prop])??"";return{...He,value:sa,selectValue:sa===""?[]:[sa]}});return}let P=M.cloneDeep(d.itemData);P==null||P.map(Q=>{var He,sa,T,Ia;return(Q==null?void 0:Q.key)==="header"&&(Array.isArray((He=Q.contents)==null?void 0:He[0])?Q.contents=(T=le.getColumnChild((sa=Q.contents)==null?void 0:sa[0]))==null?void 0:T.map((Ua,ol)=>{var Ka,Ca,dl,ql,qa,Dl;return((dl=(Ca=(Ka=he.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ca.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((ql=Object.values(p))==null?void 0:ql[ol])?Ua.value=[(qa=Object.values(p))==null?void 0:qa[ol]]:Ua.value=(Dl=Object.values(p))==null?void 0:Dl[ol],Ua}):Q.contents=(Ia=Q.contents)==null?void 0:Ia.map((Ua,ol)=>{var Ka,Ca,dl,ql,qa,Dl;return((dl=(Ca=(Ka=he.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ca.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((ql=Object.values(p))==null?void 0:ql[ol])?Ua.value=[(qa=Object.values(p))==null?void 0:qa[ol]]:Ua.value=(Dl=Object.values(p))==null?void 0:Dl[ol],Ua})),Q});let D=he.value,re=(Xe=P==null?void 0:P.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Xe.contents;if(Br.value||(D=D==null?void 0:D.map(Q=>{var He;return Q.value=Q.value??((He=re==null?void 0:re.find((sa,T)=>(sa==null?void 0:sa.prop)===(Q==null?void 0:Q.name)))==null?void 0:He.value),Q})),!zn.value)return;let ie=M.cloneDeep(Br.value);(ba=Br.value)!=null&&ba.includes("·")&&(Br.value=(za=(Aa=Br.value)==null?void 0:Aa.split("·"))==null?void 0:za[0]);let G=(nl=(Ze=P==null?void 0:P.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Ze.contents)==null?void 0:nl.find((Q,He)=>(Q==null?void 0:Q.prop)===Br.value);(wa=he==null?void 0:he.value)==null||wa.forEach(Q=>{var He,sa,T,Ia,Ua,ol,Ka,Ca,dl;(Q==null?void 0:Q.prop)===(G==null?void 0:G.prop)&&(Q!=null&&Q.endChildMenu)&&((He=G==null?void 0:G.prop)!=null&&He.includes(".")&&((T=(sa=G==null?void 0:G.prop)==null?void 0:sa.split("."))==null?void 0:T[0])!==((Ua=(Ia=Q==null?void 0:Q.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])?G.endChildMenu=(Ka=(ol=Q==null?void 0:Q.value)==null?void 0:ol.split(" "))==null?void 0:Ka[0]:G.endChildMenu=(dl=(Ca=Q==null?void 0:Q.endChildMenu)==null?void 0:Ca.split(" "))==null?void 0:dl[0])});let xe=G!=null&&G.isMainPath&&(G!=null&&G.mainKey)?G==null?void 0:G.value:"",be=D,Ye=ee.value;if(Ye!=null&&Ye.find(Q=>(G==null?void 0:G.prop)===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>(G==null?void 0:G.prop)!==(Q==null?void 0:Q.key))),Ye!=null&&Ye.find(Q=>ie===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>ie!==(Q==null?void 0:Q.key))),(G==null?void 0:G.formType)==="Select"?be=be==null?void 0:be.map(Q=>{var He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl;return(Q==null?void 0:Q.type)==="Select"&&(((He=Q==null?void 0:Q.allSelectionContents)==null?void 0:He.length)>0&&(Q.contactValue=p),((G==null?void 0:G.prop)===(Q==null?void 0:Q.prop)||ie===(Q==null?void 0:Q.prop))&&G&&(Array.isArray(G.value)&&((sa=G.value)==null?void 0:sa.length)>0&&((T=G.value)!=null&&T.every(zl=>typeof zl=="string"))?(Ye.push({key:Q==null?void 0:Q.prop,value:[(Ua=G.value)==null?void 0:Ua[((Ia=G.value)==null?void 0:Ia.length)-1]]}),Q.selectValue=(ol=Ye==null?void 0:Ye.find(zl=>(zl==null?void 0:zl.key)===(Q==null?void 0:Q.prop)))==null?void 0:ol.value):Array.isArray(G.value)&&((Ka=G.value)==null?void 0:Ka.length)===0?(Ye=[],Q.selectValue=[],p[Q==null?void 0:Q.prop]=""):Array.isArray(Q.value)&&Ye.push({key:Q==null?void 0:Q.prop,value:[(Ca=Q.value)==null?void 0:Ca[(Q==null?void 0:Q.length)-1]]})),((ql=Q==null?void 0:Q.menus)==null?void 0:ql[((dl=Q==null?void 0:Q.menus)==null?void 0:dl.length)-1])===""&&(G!=null&&G.isMainPath)&&(G!=null&&G.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])!==((rl=(Ll=G==null?void 0:G.prop)==null?void 0:Ll.split("."))==null?void 0:rl[0])||(Q.endChildMenu=(hl=xe==null?void 0:xe.split(" "))==null?void 0:hl[0]))),Q.value=(p==null?void 0:p[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q}):(G==null?void 0:G.formType)!=="Input"&&(be=be==null?void 0:be.map(Q=>(Q.value=(p==null?void 0:p[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q))),ee.value=Ye,be!=null&&be.some(Q=>(Q==null?void 0:Q.functionName)&&(Q==null?void 0:Q.functionName)!=="")){let Q=await St([p],U==null?void 0:U.value,"Auto",Te.value),He=[];(il=be==null?void 0:be.filter(T=>(T==null?void 0:T.functionName)&&(T==null?void 0:T.functionName)!==""))==null||il.forEach(T=>{var Ia;((Ia=T==null?void 0:T.functionRelatedWords)==null?void 0:Ia.length)>0&&(He=[...He,...T==null?void 0:T.functionRelatedWords])}),He=He==null?void 0:He.filter(T=>(T==null?void 0:T[0])!=="@");let sa=[];for(let T in Q==null?void 0:Q[0])He!=null&&He.find(Ia=>T===Ia||(T==null?void 0:T.includes("."+Ia)))&&sa.push(((ke=Q==null?void 0:Q[0])==null?void 0:ke[T])!=="");(Q==null?void 0:Q.length)>0&&sa.every(T=>T)&&(be=be==null?void 0:be.map(T=>{var Ia;return T.value=((Ia=Q==null?void 0:Q[0])==null?void 0:Ia[T==null?void 0:T.prop])??T.value,T})),rr.value=Q==null?void 0:Q[0]}if(he.value=be,G=Object.assign({},G??{},{relatedWords:(va=(Va=he==null?void 0:he.value)==null?void 0:Va.find(Q=>(Q==null?void 0:Q.prop)===(G==null?void 0:G.prop)))==null?void 0:va.relatedWords}),(G==null?void 0:G.mainKey)&&(G!=null&&G.value)&&(G==null?void 0:G.value)!==""){let Q=G!=null&&G.relatedContents&&((Ya=G==null?void 0:G.relatedContents)==null?void 0:Ya.length)>0?(Ra=G==null?void 0:G.relatedContents)==null?void 0:Ra.find(He=>{var sa,T,Ia,Ua;return(He==null?void 0:He[(Ua=(sa=G==null?void 0:G.prop)==null?void 0:sa.split("."))==null?void 0:Ua[((Ia=(T=G==null?void 0:G.prop)==null?void 0:T.split("."))==null?void 0:Ia.length)-1]])===(G==null?void 0:G.value)}):await ks(G);if(Q&&JSON.stringify(Q)!=="{}"){let He=be;He=He==null?void 0:He.map(T=>{var Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl,zl,gl,xr,ur,er,kl,Yl,pr;if((G==null?void 0:G.prop)===(T==null?void 0:T.prop))T.value=(Q==null?void 0:Q[(Ia=T==null?void 0:T.words)==null?void 0:Ia.join(".")])??(Q==null?void 0:Q[T==null?void 0:T.prop])??Q[(Ca=(Ua=T==null?void 0:T.prop)==null?void 0:Ua.split("."))==null?void 0:Ca[((Ka=(ol=T==null?void 0:T.prop)==null?void 0:ol.split("."))==null?void 0:Ka.length)-1]];else if(G!=null&&G.relatedContents&&((dl=G==null?void 0:G.relatedContents)==null?void 0:dl.length)>0)T.value=(ql=T==null?void 0:T.prop)!=null&&ql.includes(".")&&((Dl=(qa=T==null?void 0:T.prop)==null?void 0:qa.split("."))==null?void 0:Dl[0])===((Ll=($a=G==null?void 0:G.prop)==null?void 0:$a.split("."))==null?void 0:Ll[0])?Q[(gl=(rl=T==null?void 0:T.prop)==null?void 0:rl.split("."))==null?void 0:gl[((zl=(hl=T==null?void 0:T.prop)==null?void 0:hl.split("."))==null?void 0:zl.length)-1]]:(Q==null?void 0:Q[T==null?void 0:T.prop])??(T==null?void 0:T.value);else if(le.same((G==null?void 0:G.menus)??[],(T==null?void 0:T.menus)??[])&&le.same((G==null?void 0:G.groups)??[],(T==null?void 0:T.groups)??[])&&!le.same((G==null?void 0:G.words)??[],(T==null?void 0:T.words)??[]))if((xr=T==null?void 0:T.prop)!=null&&xr.includes(".")&&((er=(ur=T==null?void 0:T.prop)==null?void 0:ur.split("."))==null?void 0:er[0])!==((Yl=(kl=G==null?void 0:G.prop)==null?void 0:kl.split("."))==null?void 0:Yl[0])){let Ol=Object.keys(Q);Ol=Ol==null?void 0:Ol.find(fr=>{var wr;return fr==null?void 0:fr.includes("."+((wr=T==null?void 0:T.words)==null?void 0:wr.join(".")))}),T.value=(Q==null?void 0:Q[Ol])??(Q==null?void 0:Q[T==null?void 0:T.prop])??T.value}else{let Ol=Object.keys(Q);Ol=Ol==null?void 0:Ol.find(fr=>{var wr;return fr==null?void 0:fr.includes("."+((wr=T==null?void 0:T.words)==null?void 0:wr.join(".")))}),T.value=(Q==null?void 0:Q[(pr=T==null?void 0:T.words)==null?void 0:pr.join(".")])??(Q==null?void 0:Q[Ol])??(Q==null?void 0:Q[T==null?void 0:T.prop])??T.value}else!(T!=null&&T.isMainPath)&&le.same((G==null?void 0:G.bindMenus)??[],(T==null?void 0:T.bindMenus)??[]),T.value=(Q==null?void 0:Q[T==null?void 0:T.prop])??T.value;return T}),he.value=He;let sa={};(ze=he.value)==null||ze.forEach(T=>{sa[T.prop]=T==null?void 0:T.value}),rr.value=sa}}zn.value=!0,F.value=!1},Mu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",Iu=p=>{var D,re;const v=(re=(D=ea.value)==null?void 0:D.find(ie=>(ie==null?void 0:ie.label)===(p==null?void 0:p.label)))==null?void 0:re.multiple,z=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;Te.value.forEach(ie=>{const G=ie==null?void 0:ie[z];v&&Do.isString(G)&&(ie[z]=[G]),!v&&!Do.isString(G)&&(ie[z]="")})},Ht=(p,v)=>{var z;return v==null||v.forEach(R=>{p[R==null?void 0:R.prop]=R==null?void 0:R.value}),p.children&&((z=p.children)==null?void 0:z.length)>0&&(p.children=p.children.map(R=>Ht(R,v))),p},ft=p=>{var z,R,P,D,re,ie;ji("");const v=(z=he.value)==null?void 0:z.reduce((G,xe)=>(G[xe.name]=xe.value,G),{});if(((R=Object.keys(v))==null?void 0:R.length)>0){rr.value=v,oa.value="",aa.value=(P=Te.value)==null?void 0:P.length,Fe.value=(D=$e.value)==null?void 0:D.filter(xe=>(xe==null?void 0:xe.label)!=="新增");const G=(ie=(re=Ie.value)==null?void 0:re.filter(xe=>(xe==null?void 0:xe.label)!=="操作"))==null?void 0:ie.map(xe=>{var Ye,Ge,Xe;const be=(Ge=(Ye=ea.value)==null?void 0:Ye.find(ba=>(ba==null?void 0:ba.label)===(xe==null?void 0:xe.label)))==null?void 0:Ge.multiple;return Iu(xe),{...xe,contents:(xe==null?void 0:xe.options)??[],optionUrl:xe!=null&&xe.formMenuSelect&&((Xe=xe==null?void 0:xe.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:xe==null?void 0:xe.groupSelect,menuSelect:xe==null?void 0:xe.formMenuSelect,selectRelateType:"",type:xe==null?void 0:xe.formType,multiple:be}:null}});U.value=G==null?void 0:G.map(xe=>Ht(xe,[{prop:"type",value:"edit"},{prop:"columnType",value:Mu(xe==null?void 0:xe.formType)||(xe==null?void 0:xe.columnType)}])),p==="createClick"&&(pa.value="新增",Ui(!0))}},Si={START:"开始时间",END:"结束时间",HOURS:"工时"},Ou=(p,v)=>Number(M.dayjs(v).diff(M.dayjs(p),"day",!0).toFixed(1)),Ut=p=>{var D;const v=d.itemData,z=(D=v==null?void 0:v.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,R=new Map;return z==null||z.forEach((re,ie)=>{const{label:G}=re;R.set(G,ie)}),!R.has(Si.START)||!R.has(Si.END)||!R.has(Si.HOURS)?p:p==null?void 0:p.map(re=>{const ie=re==null?void 0:re[Si.START],G=re==null?void 0:re[Si.END],xe=Ou(ie,G);return ie&&G&&(re[Si.HOURS]=`${xe}天`),re})},qt=(p,v,z=0)=>{if(z>((v==null?void 0:v.length)??""))return p;const R=v==null?void 0:v[z],P=new Map;for(const re of p){const ie=re[R];P.has(ie)||P.set(ie,[]),P.get(ie)&&P.get(ie).push(re)}const D=[];for(const[re,ie]of P){const[G,...xe]=ie,be={...G};z+1===((v==null?void 0:v.length)??"")?be.children=ie==null?void 0:ie.map(Ye=>(Ye.level=M.cloneDeep(z)+1,Ye)).filter((Ye,Ge)=>Ge!==0):xe.length>0&&(be.children=qt(xe,v,z+1)),be.level=z,D.push(be)}return D},Wt=(p,v,z)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let R=[];return R=qt(p,v==null?void 0:v.contents,0),R},Gt=async(p,v)=>{var nl,wa,il,ke,Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl,zl,gl,xr,ur,er,kl,Yl,pr,Ol,fr,wr,hr,Dr,rn,dr,Nr,Rr,Yt,Jt,Xt,Zt,Qt,es;const z=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="header");p==null||p.filter(la=>(la==null?void 0:la.key)==="tableIndexColumn")[0];const R=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="childTree")[0];let P=!0;if((il=(wa=(nl=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="filterAllType"))==null?void 0:nl.value)==null?void 0:wa.find(la=>(la==null?void 0:la.value)==="onPamButtonContents"))!=null&&il.content){let la=(va=(Va=(ke=p==null?void 0:p.find(Al=>(Al==null?void 0:Al.key)==="filterAllType"))==null?void 0:ke.value)==null?void 0:Va.find(Al=>(Al==null?void 0:Al.value)==="onPamButtonContents"))==null?void 0:va.content;la=(Ya=la==null?void 0:la.split(":"))==null?void 0:Ya[1],la=(Ra=la.slice(1,(la==null?void 0:la.length)-1))==null?void 0:Ra.split(","),P=!!(la!=null&&la.find(Al=>Al==="操作"))}const D=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="page"),re=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="rowButton"),ie=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="extraButton"),G=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="tableContents"),xe=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="bottomButton");let be=[],Ye=(ze=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="filter"))==null?void 0:ze[0];Ye=(Ye==null?void 0:Ye.contents)??"",Ye=N0(Ye),(Ye==null?void 0:Ye.length)>0&&(u.value=Ye);const Ge=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="tableIndex");ea.value=(He=(Q=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="tableToForm"))==null?void 0:Q[0])==null?void 0:He.contents,je.value=(D==null?void 0:D.contents)??!0;let Xe=[];kr.value===""?Xe=z==null?void 0:z[0]:Xe=(z==null?void 0:z.find(la=>(la==null?void 0:la.selectLabel)==="("+kr.value+")"))??(z==null?void 0:z.find(la=>!(la!=null&&la.selectLabel)));let ba=[];kr.value===""?ba=Ge==null?void 0:Ge[0]:ba=(Ge==null?void 0:Ge.find(la=>(la==null?void 0:la.selectLabel)==="("+kr.value+")"))??(Ge==null?void 0:Ge.find(la=>!(la!=null&&la.selectLabel)));let Aa=[],za=[];if(((sa=Xe==null?void 0:Xe.contents)==null?void 0:sa.length)>0){let la=[],Al=Xe==null?void 0:Xe.contents;if(Array.isArray(Al==null?void 0:Al[0])&&((T=Al==null?void 0:Al[0])!=null&&T.every(Xa=>!(Xa!=null&&Xa.children)))&&(Al=Al==null?void 0:Al[0]),Al.some(Xa=>Array.isArray(Xa)&&(Xa==null?void 0:Xa.find(Je=>Je.children))))la=(Ia=le.getGradeColumns(Al,P))==null?void 0:Ia[0],la!=null&&la.find(Xa=>(Xa==null?void 0:Xa.label)==="操作")||la.push({label:"操作",prop:"operate",type:"operate"});else{let Xa=Al.some(Je=>Array.isArray(Je))?Al==null?void 0:Al[0]:Al;Xa!=null&&Xa.find(Je=>(Je==null?void 0:Je.label)==="操作")||Xa.push({label:"操作",prop:"operate",type:"operate"}),Xa==null||Xa.forEach((Je,vr)=>{var Jr,Qr,Pr,di,Ei,Ci,Ar,An,Jn,Di,xn,Xn,as,ls,rs,ns,is,os,ts,ss,cs;if((Qr=(Jr=se.value)==null?void 0:Jr.split("/"))==null||Qr.forEach(yr=>{var Tr,$n,us;yr!==""&&((us=($n=(Tr=yr==null?void 0:yr.split(O+"updateLoading"))==null?void 0:Tr[0])==null?void 0:$n.split(O+"loading"))==null||us[0])}),Je!=null&&Je.methodContent){let yr=(Ei=(di=(Pr=Je==null?void 0:Je.methodContent)==null?void 0:Pr.replace("@","%%#"))==null?void 0:di.split("%%#"))==null?void 0:Ei[1];if(yr=yr==null?void 0:yr.slice(0,(yr==null?void 0:yr.length)-1),yr=le.contentTransArrayToAllNoExtra(yr??"",","),(Ci=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("@Button")))!=null&&Ci.includes("Prop")&&((Ar=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("Type")))!=null&&Ar.includes("Manual"))){let Tr=(Jn=(An=yr==null?void 0:yr.find($n=>$n==null?void 0:$n.includes("@Button")))==null?void 0:An.split(":"))==null?void 0:Jn[1];Tr=((Xn=(xn=(Di=Tr==null?void 0:Tr.replaceAll("[",""))==null?void 0:Di.replaceAll("]",""))==null?void 0:xn.split(","))==null?void 0:Xn[1])??"算法执行",Aa.push(Tr)}else if((as=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("@Button")))!=null&&as.includes("Row")&&((ls=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("Type")))!=null&&ls.includes("Manual"))){let Tr=(ns=(rs=yr==null?void 0:yr.find($n=>$n==null?void 0:$n.includes("@Button")))==null?void 0:rs.split(":"))==null?void 0:ns[1];Tr=((ts=(os=(is=Tr==null?void 0:Tr.replaceAll("[",""))==null?void 0:is.replaceAll("]",""))==null?void 0:os.split(","))==null?void 0:ts[1])??"算法执行",za.push(Tr)}}(ss=ea.value)==null||ss.find(yr=>(yr==null?void 0:yr.prop)===(Je==null?void 0:Je.prop));let on=((cs=Je==null?void 0:Je.filter)==null?void 0:cs.includes("@EditRead=Read"))??!1;la.push({label:(Je==null?void 0:Je.label)==="操作"?P?"操作":"":(Je==null?void 0:Je.label)??"",prop:(Je==null?void 0:Je.label)==="操作"?"operate":(Je==null?void 0:Je.prop)??"a"+vr,width:Je!=null&&Je.width?parseInt(Je.width):"",fixed:(Je==null?void 0:Je.fixed)??void 0,sortable:(Je==null?void 0:Je.sortable)??!1,filterable:(Je==null?void 0:Je.filterable)??!1,operable:(Je==null?void 0:Je.operable)??!1,showSummary:(Je==null?void 0:Je.showSummary)??!1,align:(Je==null?void 0:Je.align)??"left",showOverflowTooltip:(Je==null?void 0:Je.showOverflowTooltip)??!0,isNotDrag:(Je==null?void 0:Je.isNotDrag)??!1,isEditCol:(Je==null?void 0:Je.isEditCol)??!1,isOperate:(Je==null?void 0:Je.isOperate)??!1,id:(Je==null?void 0:Je.id)??vr,type:(Je==null?void 0:Je.label)==="操作"?"operate":void 0,formType:(Je==null?void 0:Je.formType)??(Je!=null&&Je.groupSelect?"Select":""),disabled:Je==null?void 0:Je.disabled,options:(Je==null?void 0:Je.options)??[],value:(Je==null?void 0:Je.value)??"",isExistChild:(Je==null?void 0:Je.isExistChild)??!1,mainKey:(Je==null?void 0:Je.mainKey)??vr===0,allSelectionContents:(Je==null?void 0:Je.allContents)??[],filterContent:Je==null?void 0:Je.filterContents,menus:Je==null?void 0:Je.menus,groups:Je==null?void 0:Je.groups,words:Je==null?void 0:Je.words,filter:Je==null?void 0:Je.filter,bindMenus:Je==null?void 0:Je.bindMenus,fatherPath:Je==null?void 0:Je.fatherPath,isMainPath:Je==null?void 0:Je.isMainPath,required:(Je==null?void 0:Je.required)??!1,relatedContents:Je==null?void 0:Je.relatedContents,functionName:Je==null?void 0:Je.functionName,functionRelatedWords:Je==null?void 0:Je.functionRelatedWords,calculatorFilter:Je==null?void 0:Je.calculatorFilter,relatedPages:Je==null?void 0:Je.relatedPages,multiple:(Je==null?void 0:Je.multiple)??!1,multipleLimit:Je==null?void 0:Je.multipleLimit,isReadonly:on})})}la=la==null?void 0:la.filter(Xa=>{var Je;return!((Je=Xa==null?void 0:Xa.filter)!=null&&Je.includes("@ShowHide=Hide"))}),L.value=(Ua=xe==null?void 0:xe[0])==null?void 0:Ua.contents;const nn=le.getNewColumnChild(la);be=le.getColumnChild(nn);const Yn=Xa=>Array.isArray(Xa)?Xa.map(Je=>(Array.isArray(Je==null?void 0:Je.children)&&Je.children.length>0?(Je.sortable=!1,Yn(Je.children)):(Je==null?void 0:Je.prop)==="operate"||(Je==null?void 0:Je.label)==="操作"||(Je==null?void 0:Je.type)==="operate"||(Je.sortable=!1),Je)):Xa;Yn(nn),await Jo(nn),R0(Z.value,nn),U.value=nn,ne.value=nn,n.value=(ol=U.value)==null?void 0:ol.map(Xa=>Xa==null?void 0:Xa.label);let $r=(Ca=(Ka=le.getAllLeafNodes(U.value))==null?void 0:Ka.filter(Xa=>(Xa==null?void 0:Xa.type)!=="operate"))==null?void 0:Ca.map((Xa,Je)=>({prop:(Xa==null?void 0:Xa.prop)??"a"+Je,column:Xa.label}));Or.value=$r;let Hr=[];kr.value===""?Hr=G==null?void 0:G[0]:Hr=(G==null?void 0:G.find(Xa=>(Xa==null?void 0:Xa.selectLabel)==="("+kr.value+")"))??(G==null?void 0:G.find(Xa=>!(Xa!=null&&Xa.selectLabel)));let Vr=Array.isArray((dl=Hr==null?void 0:Hr.contents)==null?void 0:dl[0])&&((ql=Hr==null?void 0:Hr.contents)!=null&&ql[0].every(Xa=>Array.isArray(Xa)))?(qa=Hr==null?void 0:Hr.contents)==null?void 0:qa[0]:Hr==null?void 0:Hr.contents;ba!=null&&ba.contents&&((Dl=ba==null?void 0:ba.contents)==null?void 0:Dl.length)!==0&&(Vr=($a=M.cloneDeep(Vr))==null?void 0:$a.map((Xa,Je)=>{if(!Array.isArray(Xa)){let vr={};for(let on in Xa)on!=="id"&&on!=="index"&&(vr[on]=Xa[on]);Xa=Object.values(vr)}return Xa}));const fo=!!((Ll=U.value)!=null&&Ll.find(Xa=>Xa.prop==="index"));Vr=xc(Vr,ba==null?void 0:ba.contents,fo);const Pn=[];Vr==null||Vr.forEach((Xa,Je)=>{var on;let vr={};if(Array.isArray(Xa)){let Jr=[];Xa==null||Xa.filter(Qr=>!(Qr!=null&&Qr.id)).forEach((Qr,Pr)=>{var di,Ei,Ci,Ar,An,Jn;if((di=$r==null?void 0:$r[Pr])!=null&&di.prop&&!Array.isArray(Qr)){let Di={};Di[$r[Pr].column]=Qr,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(xn=>JSON.stringify(xn==null?void 0:xn[0])===JSON.stringify(Di)))&&(Jr=(Ar=V==null?void 0:V.value)==null?void 0:Ar.find(xn=>JSON.stringify(xn==null?void 0:xn[0])===JSON.stringify(Di))),Jr&&Jr.length>0?vr[$r[Pr].prop]=Jr!=null&&Jr.find(xn=>{var Xn;return((Xn=Object.keys(xn))==null?void 0:Xn[0])===$r[Pr].column})?(An=Jr==null?void 0:Jr.find(xn=>{var Xn;return((Xn=Object.keys(xn))==null?void 0:Xn[0])===$r[Pr].column}))==null?void 0:An[$r[Pr].column]:Qr:vr[$r[Pr].prop]=Qr}else Array.isArray(Qr)&&((Jn=$r[Pr])!=null&&Jn.prop?vr[$r[Pr].prop]=Qr:vr.children=Et(Qr,$r))})}else vr=Xa;if(Array.isArray(Xa)&&Xa.some(Jr=>Jr==null?void 0:Jr.id)){const Jr=(on=Xa==null?void 0:Xa.find(Qr=>Qr.id))==null?void 0:on.id;Pn.push(Object.assign(vr,{id:oo(Jr)}))}else vr.id?Pn.push(vr):Pn.push(Object.assign(vr,{id:Je.toString()}))});try{const Xa=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Je=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),vr=Xa==null?void 0:Xa.tableId,on=Xa==null?void 0:Xa.compIndex;if(vr&&Array.isArray(Je)&&Je.length>0&&String(vr)===String(d==null?void 0:d.parentTableId)&&String(on)===String(d==null?void 0:d.index)){const Jr=new Set(Pn.map(Pr=>String(Pr==null?void 0:Pr.id))),Qr=Je.filter(Pr=>!Jr.has(String(Pr)));if(Qr.length>0){const Pr=Xa==null?void 0:Xa.pageKey,di=Pr!=null&&Pr.startsWith("/")?Pr.substring(1):Pr;((v==null?void 0:v[Pr])||(v==null?void 0:v[di])||[]).filter(Ar=>{var An,Jn;return((An=Ar==null?void 0:Ar.key)==null?void 0:An.type)==="data"&&String((Jn=Ar==null?void 0:Ar.key)==null?void 0:Jn.tableId)===String(vr)&&Qr.includes(Ar==null?void 0:Ar.id)}).forEach(Ar=>{var An;Jr.has(String(Ar==null?void 0:Ar.id))||(Pn.push({id:Ar==null?void 0:Ar.id,...((An=Ar==null?void 0:Ar.value)==null?void 0:An.tableData)||{}}),Jr.add(String(Ar==null?void 0:Ar.id)))})}}}catch{}let jn=null;try{const Xa=`ocr_committed_temp_ids_v1:${String((d==null?void 0:d.parentTableId)??"")}:${String((d==null?void 0:d.index)??"")}`,Je=JSON.parse(sessionStorage.getItem(Xa)||"null");Array.isArray(Je)&&Je.length>0&&(jn=new Set(Je.map(vr=>String(vr))))}catch{}const qi=Array.from(((rl=Na.value)==null?void 0:rl.values())||[]).filter(Xa=>!(!(Xa!=null&&Xa._isOCRRow&&(Xa==null?void 0:Xa._ocrTableId)===(d==null?void 0:d.index))||jn&&jn.has(String(Xa==null?void 0:Xa.id)))),ho=(Te.value||[]).map(Xa=>String(Xa==null?void 0:Xa.id)),Zl=wi(Pn,ho);if(Te.value=Wt(Zl,R,U.value),Fa.value=Zl,(hl=Fa.value)==null||hl.forEach(Xa=>{var Je;(Je=Na.value)==null||Je.set(Xa.id,Xa)}),jn&&jn.size>0)try{const Xa=new Set(Array.from(jn.values()));Te.value=(Te.value||[]).filter(Je=>!Xa.has(String(Je==null?void 0:Je.id))),Fa.value=(Fa.value||[]).filter(Je=>!Xa.has(String(Je==null?void 0:Je.id))),Xa.forEach(Je=>{var vr,on;try{(on=(vr=Na.value)==null?void 0:vr.delete)==null||on.call(vr,Je)}catch{}})}catch{}const Yr=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ht=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(Yr&&Array.isArray(ht)&&ht.length>0&&String(Yr==null?void 0:Yr.compIndex)===String(d==null?void 0:d.index)){const Xa=new Set((Fa.value||[]).map(Je=>String(Je==null?void 0:Je.id)));ht.filter(Je=>!Xa.has(String(Je)))}if(qi.length>0){const Xa=new Set((Te.value||[]).map(vr=>vr==null?void 0:vr.id)),Je=qi.filter(vr=>!Xa.has(vr.id));Je.length>0&&(Te.value=[...Te.value||[],...Je],Fa.value=[...Fa.value||[],...Je],Je.forEach(vr=>{var on;return(on=Na.value)==null?void 0:on.set(vr.id,vr)}))}}else U.value=[],Ie.value=[],Te.value=[],Fa.value=[],Na.value=new Map;if(za=[...new Set(za)],za=za==null?void 0:za.map(la=>({label:la,type:"methodButton"})),((zl=re==null?void 0:re.contents)==null?void 0:zl.length)>0?Ta.value=re==null?void 0:re.contents:Ta.value=[],Ta.value=[...Ta.value,...za],Aa=[...new Set(Aa)],Aa=Aa==null?void 0:Aa.map(la=>({label:la,type:"methodButton"})),((gl=ie==null?void 0:ie.contents)==null?void 0:gl.length)>0)if((er=(ur=(xr=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="filterAllType"))==null?void 0:xr.value)==null?void 0:ur.find(la=>(la==null?void 0:la.value)==="onButtonContents"))!=null&&er.content){let la=(pr=(Yl=(kl=p==null?void 0:p.find(Al=>(Al==null?void 0:Al.key)==="filterAllType"))==null?void 0:kl.value)==null?void 0:Yl.find(Al=>(Al==null?void 0:Al.value)==="onButtonContents"))==null?void 0:pr.content;if(la=(Ol=la==null?void 0:la.split(":"))==null?void 0:Ol[1],la=(fr=la.slice(1,(la==null?void 0:la.length)-1))==null?void 0:fr.split(","),Fe.value=(wr=ie==null?void 0:ie.contents)==null?void 0:wr.filter(Al=>la==null?void 0:la.find(nn=>nn===(Al==null?void 0:Al.label))),$e.value=(hr=ie==null?void 0:ie.contents)==null?void 0:hr.filter(Al=>la==null?void 0:la.find(nn=>nn===(Al==null?void 0:Al.label))),(Dr=ie==null?void 0:ie.contents)!=null&&Dr.some(Al=>(Al==null?void 0:Al.label)==="OCR识别")&&!((rn=Fe.value)!=null&&rn.some(Al=>(Al==null?void 0:Al.label)==="OCR识别"))){const Al=(dr=ie==null?void 0:ie.contents)==null?void 0:dr.find(nn=>(nn==null?void 0:nn.label)==="OCR识别");Fe.value=[...Fe.value,Al],$e.value=[...$e.value,Al]}A.value=!!(la!=null&&la.find(Al=>Al==="搜索")),W.value=!!(la!=null&&la.find(Al=>Al==="块状显示"))}else Fe.value=ie==null?void 0:ie.contents,$e.value=ie==null?void 0:ie.contents;else Fe.value=[],$e.value=[];if(Fe.value=[...Fe.value,...Aa],$e.value=[...$e.value,...Aa],typeof se.value=="string"&&se.value==="设备管理/试验设备"&&(d==null?void 0:d.compName)==="设备列表"?((Nr=Fe.value)!=null&&Nr.some(la=>(la==null?void 0:la.label)==="OCR识别")||(Fe.value=[...Fe.value||[],{label:"OCR识别"}]),(Rr=$e.value)!=null&&Rr.some(la=>(la==null?void 0:la.label)==="OCR识别")||($e.value=[...$e.value||[],{label:"OCR识别"}])):(Fe.value=(Fe.value||[]).filter(la=>(la==null?void 0:la.label)!=="OCR识别"),$e.value=($e.value||[]).filter(la=>(la==null?void 0:la.label)!=="OCR识别")),(Yt=Fe.value)!=null&&Yt.some(la=>(la==null?void 0:la.label)==="切换视图")||(Fe.value=[...Fe.value||[],{label:"切换视图"}]),(Jt=$e.value)!=null&&Jt.some(la=>(la==null?void 0:la.label)==="切换视图")||($e.value=[...$e.value||[],{label:"切换视图"}]),be!=null&&be.some(la=>{var Al;return(la==null?void 0:la.calculatorFilter)&&((Al=la==null?void 0:la.calculatorFilter)==null?void 0:Al.includes("@Button"))})){let la=(Xt=be==null?void 0:be.filter($r=>{var Hr;return($r==null?void 0:$r.calculatorFilter)&&((Hr=$r==null?void 0:$r.calculatorFilter)==null?void 0:Hr.includes("@Button"))}))==null?void 0:Xt.map($r=>$r==null?void 0:$r.calculatorFilter),Al=[],nn=[],Yn=[];la==null||la.forEach($r=>{var fo,Pn,jn,qi,ho;let Hr=(fo=le.analyzeSplitToContent($r,","))==null?void 0:fo.map(Zl=>((Zl==null?void 0:Zl[(Zl==null?void 0:Zl.length)-1])===","&&(Zl=Zl==null?void 0:Zl.slice(0,(Zl==null?void 0:Zl.length)-1)),Zl)),Vr=Hr==null?void 0:Hr.find(Zl=>Zl==null?void 0:Zl.includes("@Button"));if(Hr!=null&&Hr.find(Zl=>Zl==null?void 0:Zl.includes("Manual"))){Vr=(jn=(Pn=Vr==null?void 0:Vr.replace("=","$R"))==null?void 0:Pn.split("$R"))==null?void 0:jn[1],Vr=Vr==null?void 0:Vr.slice(1,(Vr==null?void 0:Vr.length)-1);let Zl=(qi=le.analyzeSplitToContent(Vr,","))==null?void 0:qi.map(Yr=>((Yr==null?void 0:Yr[(Yr==null?void 0:Yr.length)-1])===","&&(Yr=Yr==null?void 0:Yr.slice(0,(Yr==null?void 0:Yr.length)-1)),Yr));Zl=Zl==null?void 0:Zl[0],Zl=Zl==null?void 0:Zl.slice(1,(Zl==null?void 0:Zl.length)-1),Zl=(ho=Zl==null?void 0:Zl.split(","))==null?void 0:ho.map(Yr=>({label:Yr,prop:Yr})),Vr!=null&&Vr.includes("Up")?Al=[...Al,...Zl??[]]:Vr!=null&&Vr.includes("Line")?nn=[...nn,...Zl??[]]:Yn=[...Yn,...Zl??[]]}}),Fe.value=[...Al,...Fe.value??[]],Ta.value=[...nn,...Ta.value??[]],Yn.value=[...Yn,...Yn.value??[]]}aa.value=((Zt=Te==null?void 0:Te.value)==null?void 0:Zt.length)??0,Ut(Te.value),Gr.value=Te.value,sr.value&&(U.value=(es=(Qt=Ie.value)==null?void 0:Qt.filter(la=>(la==null?void 0:la.label)!=="操作"))==null?void 0:es.map(la=>{var Al;return{...la,type:"edit",optionUrl:la!=null&&la.formMenuSelect&&((Al=la==null?void 0:la.formMenuSelect)==null?void 0:Al.length)>0?{groupSelect:la==null?void 0:la.groupSelect,menuSelect:la==null?void 0:la.formMenuSelect,selectRelateType:"",type:la==null?void 0:la.formType}:null}}),ft())};e.watch(()=>[d.itemData,kr.value,an.value,Wl.value,V==null?void 0:V.value],async()=>{var p,v,z,R,P,D;if((p=d==null?void 0:d.itemData)!=null&&p.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((v=pe.value)!=null&&v.find(re=>{var ie,G;return(re==null?void 0:re.key)===((G=(ie=d==null?void 0:d.itemData)==null?void 0:ie.find(xe=>(xe==null?void 0:xe.key)==="columnPath"))==null?void 0:G.contents)}))){let re=pe.value,ie={key:(R=(z=d==null?void 0:d.itemData)==null?void 0:z.find(G=>(G==null?void 0:G.key)==="columnPath"))==null?void 0:R.contents,value:(D=(P=d==null?void 0:d.itemData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(G=>(G==null?void 0:G.key)===(ie==null?void 0:ie.key))?re=re==null?void 0:re.map(G=>((G==null?void 0:G.key)===(ie==null?void 0:ie.key)&&(G.value=ie.value),G)):re.push(ie),_a.setTableViewContents(re)}await Gt(d.itemData,d.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.operatingForm,p=>{p!=null&&p.form&&(ji(p==null?void 0:p.form),pa.value=p==null?void 0:p.dialogTitle,Ee.value=!0,te.value=!0)},{immediate:!0,deep:!0});const Lu=()=>{var p;(p=J.value)!=null&&p.includes("read")&&(sr.value=!sr.value)},Ru=()=>{_r.value=!_r.value};e.watch(()=>{var p;return(p=d==null?void 0:d.config)==null?void 0:p.viewport},p=>{var v;J.value=p,(p==null?void 0:p.length)===0?sr.value=!1:(p!=null&&p.includes("read")||(sr.value=!0),p!=null&&p.includes("edit")||(sr.value=!1)),_.value=((v=d==null?void 0:d.config)==null?void 0:v.showIndex)||sr.value},{immediate:!0}),e.watch(()=>sr.value,p=>{var v;p?(ft("viewChange"),_a.setCacheUpdatingData(null)):(Fe.value=$e.value,U.value=ne.value,ae.value&&(_a.setTableLoading(d==null?void 0:d.index),j("change",ae.value))),_.value=p||((v=d==null?void 0:d.config)==null?void 0:v.showIndex),Mr.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=Bn.value)==null?void 0:p.length},p=>{p===0&&(de.currentPage=1)}),e.watch(()=>d==null?void 0:d.compNames,p=>{K.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const $u=(p,v)=>{var z;ft("createClick"),v===de.pageSize&&(de.currentPage=Math.ceil(((z=Te.value)==null?void 0:z.length)/de.pageSize))},Vu=async(p,v,z)=>{var P,D,re,ie,G;const R=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(R&&uo.includes(R)&&z!==void 0&&z!==null&&String(z).trim()!==""){const xe=String(z).trim();if(await pt(xe,p==null?void 0:p.id)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ye=(P=Te.value)==null?void 0:P.findIndex(Xe=>(Xe==null?void 0:Xe.id)===(p==null?void 0:p.id)),Ge=Ye!==-1?(re=(D=Te.value)==null?void 0:D[Ye])==null?void 0:re[R]:void 0;R&&(p[R]=Ge??"");return}}if(sr.value){const xe=p==null?void 0:p.id;xe!=null&&(f.value.has(xe)||f.value.set(xe,M.cloneDeep(p)),o.value.add(xe));const be=(ie=Te.value)==null?void 0:ie.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(p==null?void 0:p.id));be!==-1&&R&&(Te.value[be]={...Te.value[be],[R]:z}),po(z,p,v);return}po(z,p,v),rr.value=M.cloneDeep(p),oa.value=p==null?void 0:p.id,aa.value=(G=Te.value)==null?void 0:G.length,pa.value=p!=null&&p._isTemp?"新增":"编辑",Ui(!1)},Fu=async()=>{var p,v;try{const z=[];if(d!=null&&d.related&&Array.isArray(d.related)&&(console.log("props.related",d.related),d.related.forEach(R=>{if(typeof R=="string"&&R.includes("content_")){const P=R.split("_")[1];P&&(z.push(`content_${P}`),z.push(`struct_${P}`))}})),z.length===0&&(d!=null&&d.itemData)){const R=(v=(p=d.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;R&&(z.push(`content_${R}`),z.push(`struct_${R}`))}return z}catch(z){return console.error("获取 tableNames 失败:",z),[]}},Pu=async(p,v,z)=>{var D,re;if(!z||typeof z!="string"||z.trim()===""){const ie=(v==null?void 0:v.property)??(v==null?void 0:v.prop),G=`${p==null?void 0:p.id}:${ie}`;m.value.delete(G),w.value.set(G,!1);return}const R=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${R}`;w.value.set(P,!0);try{const ie=await Fu();if(ie.length===0){console.warn("未找到同名表,跳过全局搜索"),m.value.delete(P),w.value.set(P,!1);return}const G=parseInt((D=Il.value)==null?void 0:D.plat_id);if(!G){console.warn("platId 无效,跳过全局搜索"),m.value.delete(P),w.value.set(P,!1);return}const xe=await M.getAllTables({platId:G,tableNames:ie??[]}),be=((re=xe==null?void 0:xe.data)==null?void 0:re.result)||[],Ye=[],Ge=[];for(let Xe=0;Xe<be.length;Xe+=2)Xe+1<be.length&&Ge.push([be[Xe],be[Xe+1]]);Ge.forEach(([Xe,ba])=>{var il;if(!Array.isArray(Xe)||Xe.length===0||!Array.isArray(ba)||ba.length===0)return;const Aa=ba[0];let za=((il=Aa==null?void 0:Aa.结构)==null?void 0:il.contents)??[];if(!Array.isArray(za)||za.length===0)return;let Ze=M.cloneDeep(za);if(Array.isArray(Ze==null?void 0:Ze[0])&&(Ze=le.getColumnChild(Ze[0])),!Array.isArray(Ze)||Ze.length===0||!Ze.some(ke=>(ke==null?void 0:ke.prop)===R))return;[...Xe].sort((ke,Va)=>{const va=Number((ke==null?void 0:ke.update_time)??0);return Number((Va==null?void 0:Va.update_time)??0)-va}).slice(0,20).forEach(ke=>{const Va=ke[R];if(Va!=null){const va=String(Va);va.toLowerCase().includes(z.toLowerCase())&&Ye.findIndex(Ra=>{var ze;return ke.id&&((ze=Ra.rowData)==null?void 0:ze.id)===ke.id?!0:Ra.label===va})===-1&&Ye.push({label:va,rowData:M.cloneDeep(ke),sourceTable:(Aa==null?void 0:Aa.source_table)||""})}})}),m.value.set(P,Ye)}catch(ie){console.error("全局搜索建议失败:",ie),m.value.delete(P)}finally{w.value.set(P,!1)}},ju=(p,v,z)=>{if(!sr.value)return;const R=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const D=`${p==null?void 0:p.id}:${R}`;if(g.has(D)&&clearTimeout(g.get(D)),!z||z.trim()===""){m.value.delete(D),w.value.set(D,!1);return}const re=setTimeout(()=>{Pu(p,{prop:R,property:R},z),g.delete(D)},300);g.set(D,re)};function Hu(p,v){const z=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return m.value.get(z)||[]}const Uu=(p,v,z)=>{var xe;if(!z||!z.rowData)return;const R=z.rowData,P=p==null?void 0:p.id,D=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(le.getAllLeafNodes(U.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 Ye=be==null?void 0:be.prop;Ye&&R[Ye]!==void 0&&(p[Ye]=R[Ye])}),(xe=Te.value)==null||xe.findIndex(be=>(be==null?void 0:be.id)===P),P!=null&&(f.value.has(P)||f.value.set(P,M.cloneDeep(p)),o.value.add(P));const G=`${P}:${D}`;m.value.delete(G),w.value.set(G,!1),po(p[D],p,v)},un=p=>{var G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl;const{row:v,column:z,item:R,slotData:P}=p;let D=v!=null&&v[z==null?void 0:z.prop]||(v==null?void 0:v[z==null?void 0:z.prop])===0?((xe=(G=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:G[0])==null?void 0:xe.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=(be=v==null?void 0:v[R==null?void 0:R.prop])==null?void 0:be[0])==null?void 0:Ye.contents)??(v==null?void 0:v[R==null?void 0:R.prop])??((Xe=(Ge=P==null?void 0:P[R==null?void 0:R.prop])==null?void 0:Ge[0])==null?void 0:Xe.contents)??(P==null?void 0:P[R==null?void 0:R.prop])??((za=(Aa=v==null?void 0:v[(ba=R==null?void 0:R.child)==null?void 0:ba.prop])==null?void 0:Aa[0])==null?void 0:za.contents)??(v==null?void 0:v[(Ze=R==null?void 0:R.child)==null?void 0:Ze.prop]),ie=Array.isArray(D)&&!(D!=null&&D.every(wa=>typeof wa=="string"||typeof wa=="number"))?"查看":D;if(ie=Array.isArray(ie)?ie.join(","):ie,(z==null?void 0:z.formType)==="Date")if(!ie||ie===""||ie===null||ie===void 0)ie="";else{const wa=M.dayjs(ie,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ie=wa.isValid()?wa.format("YYYYMMDD"):ie??""}return Array.isArray(z==null?void 0:z.relatedPages)&&((nl=z==null?void 0:z.relatedPages)==null?void 0:nl.length)>0&&(ie="详情页"),ie},qu=p=>{var xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl;const{row:v,column:z,item:R,slotData:P}=p;let D=v!=null&&v[z==null?void 0:z.prop]?((be=(xe=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:xe[0])==null?void 0:be.contents)??(v==null?void 0:v[z==null?void 0:z.prop]):((Ge=(Ye=v==null?void 0:v[R==null?void 0:R.prop])==null?void 0:Ye[0])==null?void 0:Ge.contents)??(v==null?void 0:v[R==null?void 0:R.prop])??((ba=(Xe=P==null?void 0:P[R==null?void 0:R.prop])==null?void 0:Xe[0])==null?void 0:ba.contents)??(P==null?void 0:P[R==null?void 0:R.prop])??((Ze=(za=v==null?void 0:v[(Aa=R==null?void 0:R.child)==null?void 0:Aa.prop])==null?void 0:za[0])==null?void 0:Ze.contents)??(v==null?void 0:v[(nl=R==null?void 0:R.child)==null?void 0:nl.prop]);const ie=Array.isArray(D)&&!(D!=null&&D.every(wa=>typeof wa=="string"||typeof wa=="number")),G=Array.isArray(D)&&(D==null?void 0:D.find(wa=>wa==null?void 0:wa.url));return ie&&G},Wu=p=>{var P,D,re,ie;if(!(p!=null&&p.column))return!1;const v=se.value==="试验任务/任务管理",z=(d==null?void 0:d.compName)==="任务列表",R=((D=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:D.includes("@TextRGBA"))||((ie=(re=p==null?void 0:p.column)==null?void 0:re.filter)==null?void 0:ie.includes("@TextBackRGBA"));return v&&z&&R},Gu=(p,v)=>p.find(z=>Object.values(z).some(R=>R===v));return e.watch(()=>qe.value,async p=>{if(p){Re.setContentLoading(!0),await e.nextTick();const v=Gu(Te.value,p==null?void 0:p.data);if(!v)return Re.setContentLoading(!1);await co(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),Re.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(z=>{var R,P,D,re,ie;if(换,String(z==null?void 0:z.compId)===String(d==null?void 0:d.index)&&(z!=null&&z.resId)&&((R=z==null?void 0:z.data)!=null&&R.id)){const G=(P=z==null?void 0:z.data)==null?void 0:P.id,xe=z==null?void 0:z.resId;if(Te.value=(D=Te.value)==null?void 0:D.map(be=>{if((be==null?void 0:be.id)===G){const Ye={...be,id:xe};return delete Ye._isOCRRow,delete Ye._ocrTableId,Ye}return be}),(ie=(re=Na.value)==null?void 0:re.has)!=null&&ie.call(re,G)){const Ye={...Na.value.get(G)||{},id:xe};delete Ye._isOCRRow,delete Ye._ocrTableId,Na.value.delete(G),Na.value.set(xe,Ye)}ar(d==null?void 0:d.index,G,xe)}}):String(p==null?void 0:p.compId)===String(d==null?void 0:d.index)&&(Te.value=(v=Te.value)==null?void 0:v.map(z=>{var R;if((z==null?void 0:z.id)===((R=p==null?void 0:p.data)==null?void 0:R.id)){const P={...z,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return z})))},{immediate:!0,deep:!0}),(p,v)=>{var Ze,nl,wa,il;const z=e.resolveComponent("svg-icon"),R=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),ie=e.resolveComponent("el-radio-group"),G=e.resolveComponent("el-checkbox-group"),xe=e.resolveComponent("el-button"),be=e.resolveComponent("el-icon"),Ye=e.resolveComponent("el-progress"),Ge=e.resolveComponent("el-alert"),Xe=e.resolveComponent("el-table-column"),ba=e.resolveComponent("el-table"),Aa=e.resolveComponent("el-upload"),za=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",C3,[ri.value?(e.openBlock(),e.createBlock(pl.ssTable,{id:"excel-table",pageObj:de,showIndex:_.value,isTree:(Ze=a.compItem)==null?void 0:Ze.isTree,summaryInfo:fe,columns:U.value,defaultSort:ge,isCardViewport:_r.value,checkedColumns:n.value,key:or.value+JSON.stringify(U.value),tableData:Bn.value,isEditViewport:sr.value,isShowPagination:je.value,isShowEdit:!1,isShowDelete:!1,allowSelect:N.value,onDbClickRow:rt,extraButton:Fe.value,rowButton:Ta.value,cacheExtraButtons:$e.value,isClearSelection:((nl=Mr.value)==null?void 0:nl.length)===0,onDoCurrentChange:Fo,onDoSizeChange:Po,onSortChange:jo,onContentClick:co,onRowClick:it,onSelectChange:ki,onCellChange:Vu,onCellInput:ju,onSelectSuggest:Uu,onChange:po,onPreview:io,onSubmitEditingTable:On,onHandleColEditChange:Uo,onHandleColTypeChange:qo,onClickButton:ut,onAddNewRow:Wo,bottomButton:L.value,allowRowAddOrDelete:lt.value},e.createSlots({headerButton:e.withCtx(ke=>{var Va,va,Ya,Ra;return[a.showHeader?(e.openBlock(),e.createBlock(Zf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ca)===e.unref(se),filterValues:so.value,selectNums:(Va=Mr.value)==null?void 0:Va.length,dataNums:(va=Te.value)==null?void 0:va.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ke.buttons,menuFilter:(Ra=(Ya=a.compItem)==null?void 0:Ya.component)==null?void 0:Ra.menuFilter,onButtonClick:v[1]||(v[1]=(ze,Q,He)=>ut(ze,Q,{extra:He})),columns:U.value,onFilter:Pi,onGetImportData:sn,level:a.level,filterShow:A.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ke,Va,va,Ya;return[((ke=Te.value)==null?void 0:ke.length)>0&&a.allowOperate&&W.value?(e.openBlock(),e.createElementBlock("div",B3,[(Va=J.value)!=null&&Va.includes("read")&&((va=J.value)!=null&&va.includes("edit"))&&((Ya=Ta.value)!=null&&Ya.some(Ra=>(Ra==null?void 0:Ra.label)==="编辑"))&&!_r.value&&e.unref(ca)!==e.unref(se)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:Lu},[e.createVNode(z,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ke,index:Va})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:va=>$u(ke,Va)},[e.createVNode(z,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,N3)]),operateCol:e.withCtx(()=>[e.createVNode(R,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Nu,onBeforeEnter:Au},{reference:e.withCtx(()=>[e.createElementVNode("span",A3,[e.createVNode(z,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",z3,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":I.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ke=>Xo(ke))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(G,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ke=>n.value=ke),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Kn.value,ke=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[e.createVNode(D,{value:ke.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:ke.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(ke.label),9,M3)]),_:2},1032,["value"]),e.createVNode(R,{"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",I3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Va=Object.keys(ke))==null?void 0:Va.filter(va=>{var Ya;return(Ya=S.value)==null?void 0:Ya.find(Ra=>(Ra==null?void 0:Ra.value)===va)}),va=>{var Ya,Ra;return e.openBlock(),e.createElementBlock("div",{key:va},[E[va]=="radio"?(e.openBlock(),e.createElementBlock("div",O3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(ie,{"model-value":ke==null?void 0:ke[va],onChange:ze=>Fi(ze,va,ke)},{default:e.withCtx(()=>{var ze,Q;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Q=(ze=S.value)==null?void 0:ze.find(He=>(He==null?void 0:He.value)===va))==null?void 0:Q.options,He=>(e.openBlock(),e.createBlock(re,{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[va]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ke==null?void 0:ke[va],"active-text":(Ra=(Ya=S.value)==null?void 0:Ya.find(ze=>(ze==null?void 0:ze.value)===va))==null?void 0:Ra.label,onChange:ze=>Fi(ze,va,ke)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",L3,[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(ke=>{var Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll;return[((Va=ke==null?void 0:ke.column)==null?void 0:Va.label)==="证书附件"||((va=ke==null?void 0:ke.column)==null?void 0:va.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",R3,[e.createVNode(z,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(rl=>wu(ke),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):qu(ke)?(e.openBlock(),e.createBlock(R,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",$3,e.toDisplayString(un(ke)),1)]),default:e.withCtx(()=>{var rl,hl;return[e.createElementVNode("div",V3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((hl=ke==null?void 0:ke.row)==null?void 0:hl[(rl=ke==null?void 0:ke.column)==null?void 0:rl.prop],zl=>(e.openBlock(),e.createElementBlock("div",F3,[e.createElementVNode("div",{class:"prop-url",title:ti(zl),onClick:gl=>at(zl)},e.toDisplayString(ti(zl)),9,P3),e.createElementVNode("div",{class:"prop-download",onClick:gl=>to(zl)}," 下载 ",8,j3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Wu(ke)?(e.openBlock(),e.createBlock(rd,{key:0,value:un(ke),columnContent:ke==null?void 0:ke.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(un(ke))&&((Ra=(Ya=un(ke))==null?void 0:Ya.toString())!=null&&Ra.includes(".txt")||(Q=(ze=un(ke))==null?void 0:ze.toString())!=null&&Q.includes(".cpt")||(sa=(He=un(ke))==null?void 0:He.toString())!=null&&sa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(un(ke))&&((Ia=(T=un(ke))==null?void 0:T.toString())!=null&&Ia.includes(".txt")||(ol=(Ua=un(ke))==null?void 0:Ua.toString())!=null&&ol.includes(".cpt")||(Ca=(Ka=un(ke))==null?void 0:Ka.toString())!=null&&Ca.includes(".cyd"))?"underline":"",cursor:!Array.isArray(un(ke))&&((ql=(dl=un(ke))==null?void 0:dl.toString())!=null&&ql.includes(".txt")||(Dl=(qa=un(ke))==null?void 0:qa.toString())!=null&&Dl.includes(".cpt")||(Ll=($a=un(ke))==null?void 0:$a.toString())!=null&&Ll.includes(".cyd"))?"pointer":"",marginLeft:(ke==null?void 0:ke.colIndex)===0?`${((ke==null?void 0:ke.level)??0)*20}px`:0}),onClick:rl=>{var hl;return $i(un(ke),((hl=ke==null?void 0:ke.column)==null?void 0:hl.relatedPages)??[])}},e.toDisplayString(un(ke)===0?"0":un(ke)),13,H3))],64))]}),_:2},[((wa=Ta.value)==null?void 0:wa.length)>0?{name:"actions",fn:e.withCtx(({item:ke,fIndex:Va})=>[e.createVNode(R,{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",D3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ci(Ta.value,ke),(va,Ya)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ya,onClick:e.withModifiers(Ra=>ut(va==null?void 0:va.label,ke,{extra:va}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:va==null?void 0:va.textColor}),class:"extra-button-label"},e.toDisplayString(va==null?void 0:va.label),5)],8,T3))),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),sr.value?(e.openBlock(),e.createElementBlock("div",U3,[e.createVNode(xe,{id:"themeBorderButton",onClick:Ko},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(xe,{class:"ok-button",id:"themeButton",onClick:Vi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Ir.ssDialog,{title:pa.value,visible:te.value,width:ln.value,onBeforeDestroy:Zo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",q3,[e.createVNode(pl.ssForm,{ref_key:"formRef",ref:ce,rowContents:he.value,showOperator:!1,onChange:zu,isEnableWrap:!1,layer:!0,onFixChangeValue:Rn,onClickTrigger:Qo,isEdit:ja.value,onBlurChange:Yo,onCreate:no,onTagChange:Tn},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Ee.value?(e.openBlock(),e.createElementBlock("div",W3,[e.createVNode(xe,{onClick:v[4]||(v[4]=ke=>te.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(xe,{class:"ok-button",onClick:v[5]||(v[5]=ke=>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(Ir.ssDialog,{title:pa.value,visible:we.value,width:fa.value,onBeforeDestroy:v[7]||(v[7]=ke=>we.value=!1)},{default:e.withCtx(()=>[e.createVNode(u0)]),footer:e.withCtx(()=>[e.createElementVNode("div",G3,[e.createVNode(xe,{onClick:v[6]||(v[6]=ke=>we.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(xe,{class:"ok-button",onClick:ot,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ua.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:2,fileDataList:Pe.value,onDestroy:nt},null,8,["fileDataList"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createBlock(Ir.ssDialog,{key:3,visible:ue.value,onBeforeDestroy:Tu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Co.ThreeViewerHost,{files:Me.value,threeData:oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Ir.ssDialog,{title:"OCR扫描录入",visible:xl.value,"close-on-click-modal":!1,onBeforeDestroy:Ql,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",K3,[e.createElementVNode("div",Y3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ra.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:ra.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:ra.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)]),ra.value===1?(e.openBlock(),e.createElementBlock("div",J3,[e.createVNode(xe,{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(xe,{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),ra.value===1?(e.openBlock(),e.createElementBlock("div",X3,[e.createElementVNode("div",Z3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ya.value,(ke,Va)=>{var va;return e.openBlock(),e.createElementBlock("div",{key:Va,class:"ocr-file-item"},[e.createElementVNode("div",Q3,[ke.raw&&((va=ke.raw.type)!=null&&va.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:cn(ke),alt:"预览",class:"thumbnail-image"},null,8,eh)):(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(be,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Gl(ke)==="uploading",processing:Gl(ke)==="processing",completed:Gl(ke)==="completed"||Gl(ke)==="uploaded",failed:Gl(ke)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",lh,[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(ke)==="completed"||Gl(ke)==="uploaded",uploading:Gl(ke)==="uploading",processing:Gl(ke)==="processing",failed:Gl(ke)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Gl(ke)==="failed"?"#f56c6c":Gl(ke)==="completed"||Gl(ke)==="uploaded"?"#67c23a":"#409eff","stroke-width":Gl(ke)==="completed"||Gl(ke)==="uploaded"||Gl(ke)==="failed"?3:2,"stroke-dasharray":Nn(ke),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,rh)])),Gl(ke)==="completed"||Gl(ke)==="uploaded"?(e.openBlock(),e.createElementBlock("div",nh,[e.createVNode(be,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1})])):e.createCommentVNode("",!0),Gl(ke)==="failed"?(e.openBlock(),e.createElementBlock("div",ih,[e.createVNode(be,{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=>Su(Va)},[e.createVNode(be,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})],8,oh)]),e.createElementVNode("div",th,e.toDisplayString(ke.name||"文件名123"),1)])}),128))]),ya.value.length>0?(e.openBlock(),e.createElementBlock("div",sh,[e.createVNode(xe,{onClick:cl,class:"ocr-start-recognize-btn",disabled:br.value||ya.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),ra.value===1?(e.openBlock(),e.createElementBlock("div",ch,[e.createVNode(Ye,{percentage:De.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),ra.value===2?(e.openBlock(),e.createElementBlock("div",uh,[e.createElementVNode("div",dh,[e.createVNode(Ge,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",ph,[e.createVNode(ba,{data:Pa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Xe,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Be.value,ke=>(e.openBlock(),e.createBlock(Xe,{key:ke.prop,prop:ke.prop,"min-width":ke.minWidth||230,"class-name":ke.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",fh,[e.createElementVNode("span",null,e.toDisplayString(ke.label),1)])]),default:e.withCtx(({row:Va,$index:va})=>{var Ya,Ra,ze;return[ke.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:cr(Va[ke.prop]),fontWeight:500})},e.toDisplayString(Xl(Va[ke.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ma.value!==va?(e.openBlock(),e.createElementBlock("span",hh,e.toDisplayString(Va[ke.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(al(ke.prop)),{key:1,modelValue:Va[ke.prop],"onUpdate:modelValue":Q=>Va[ke.prop]=Q,size:"small",placeholder:"请输入"+ke.label,content:((Ya=La(ke.prop))==null?void 0:Ya.contents)??((Ra=La(ke.prop))==null?void 0:Ra.options)??[],optionUrl:(ze=La(ke.prop))==null?void 0:ze.optionUrl,onChange:Q=>Vl(va,ke.prop,Q),onFocus:Q=>ta.value=ke.prop,onBlur:v[8]||(v[8]=Q=>ta.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Xe,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ke})=>[ma.value===ke?(e.openBlock(),e.createBlock(be,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Va=>Ul(ke),["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=>Ul(ke),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),ra.value===3?(e.openBlock(),e.createElementBlock("div",vh,[e.createVNode(be,{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(Aa,{ref:"ocrUploadRef","file-list":ya.value,"onUpdate:fileList":v[9]||(v[9]=ke=>ya.value=ke),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":ll,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[ra.value!==3?(e.openBlock(),e.createElementBlock("div",mh,[e.createVNode(xe,{onClick:ku,class:"ocr-start-recognize-btn",disabled:ra.value===1||br.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(xe,{onClick:xu,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(T0,{visible:b.value,onConfirm:$,onCancel:v[10]||(v[10]=ke=>b.value=!1)},null,8,["visible"]),e.createVNode($d,{visible:ha.value,"onUpdate:visible":v[11]||(v[11]=ke=>ha.value=ke),versions:Ha.value},null,8,["visible","versions"]),e.createVNode(Sd,{visible:xa.value,"onUpdate:visible":v[12]||(v[12]=ke=>xa.value=ke),images:ga.value,"default-image-name":fl.value,"field-meta":ma.value!==null?((il=Pa.value[ma.value])==null?void 0:il.__ocrFieldMeta)||{}:{},"focused-field-name":ta.value,onClose:v[13]||(v[13]=ke=>xa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Xd,{visible:Ve.value,"onUpdate:visible":v[14]||(v[14]=ke=>Ve.value=ke),candidates:ml.value,"name-prop":Nl.value,"mfr-prop":Ba.value,columns:U.value,onSubmit:ir,onPreviewFile:_u},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(np,{visible:ia.value,"onUpdate:visible":v[15]||(v[15]=ke=>ia.value=ke),ocrPreviewData:Pa.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ke=>Pa.value=ke),ocrSelectedFields:Oe.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ke=>Oe.value=ke),ocrPreviewColumns:Be.value,onConfirm:_l,onFieldChange:v[18]||(v[18]=({rowIndex:ke,prop:Va,value:va})=>Vl(ke,Va,va))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Ir.ssDialog,{title:K.title,visible:K.show,width:K.width,onBeforeDestroy:na},{default:e.withCtx(()=>[e.createElementVNode("div",yh,[e.createVNode(pl.ssForm,{rowContents:K==null?void 0:K.contents,formRules:K==null?void 0:K.formRules,showOperator:!1,buttonValue:K.buttonValue,isEdit:ja.value,isStartJustify:!1,onOnButtonClick:Oa},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Ir.ssDialog,{title:"",visible:X.show,width:X.width,alignCenter:!0,onBeforeDestroy:_e},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",gh,e.toDisplayString(X.title),1),e.createVNode(za,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",bh,[e.createVNode(za,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(pn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",kh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X==null?void 0:X.buttonValue,ke=>(e.openBlock(),e.createBlock(xe,{key:ke==null?void 0:ke.label,style:e.normalizeStyle({background:ke==null?void 0:ke.background,color:ke==null?void 0:ke.color}),onClick:Va=>Ce(ke==null?void 0:ke.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ke==null?void 0:ke.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(Qf,{columns:X==null?void 0:X.columns,tableData:X==null?void 0:X.tableData},{content:e.withCtx(({row:ke,item:Va,slotData:va,scope:Ya,column:Ra,columnProp:ze,$index:Q})=>[e.createTextVNode(e.toDisplayString((ke==null?void 0:ke[Ra==null?void 0:Ra.prop])||(ke==null?void 0:ke[Ra==null?void 0:Ra.label])||(ke==null?void 0:ke[Ra==null?void 0:Ra.property])||(va==null?void 0:va[Ra==null?void 0:Ra.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"]),e.createVNode(pl.Signature,{signPadInfo:tl.value,onBeforeDestroy:El,onClickSubmitSign:Ml},null,8,["signPadInfo"])])}}},Uc=nr._export_sfc(wh,[["__scopeId","data-v-edde0776"]]),_h={key:1,class:"static-form-body"},Sh=["onClick"],Eh={key:1},Ch=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,i=k=>{switch(k){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},o=e.computed(()=>{var O;const k=(O=n.itemData)==null?void 0:O.find(I=>(I==null?void 0:I.key)==="formContent"),y=(k==null?void 0:k.contents)||[];return(n.fields&&n.fields.length>0?n.fields:y).filter(I=>(I==null?void 0:I.label)||(I==null?void 0:I.isHideInForm)).map(I=>{let W=I==null?void 0:I.value;Array.isArray(W)&&(W=W.map(j=>j==null?"":typeof j=="object"?j.label??j.value??j.name??JSON.stringify(j):String(j)).filter(Boolean).join(",")),W!=null&&typeof W=="object"&&(W=W.label??W.value??W.name??JSON.stringify(W));const Y=I.isHideInForm?"":I.label??"",fe=W==null||W===""?"-":String(W),de=Y==="使用状态";return{label:Y,value:fe,isStatus:de,tagType:de?i(fe):"",width:I.width??1,field:I}})}),f=e.ref(null),c=e.ref(null),u=e.computed(()=>{const k=Number(n==null?void 0:n.textSize),y=le.rgbaToColor(n==null?void 0:n.textColor),x={},O={},I={},W={};return!Number.isNaN(k)&&k&&(x.fontSize=`${k}px`,O.fontSize=`${k+1}px`,I.fontSize=`${k}px`,W.fontSize=`${k}px`),y&&(O.color=y,I.color=y,W.color=y),{item:x,label:O,value:I,empty:W}}),m=e.ref(""),g=e.ref(""),w=e.ref(!1),d=async k=>{if(k){g.value&&(URL.revokeObjectURL(g.value),g.value="");try{const y=await M.platformDownloadFile({url:k}),x=new Blob([y==null?void 0:y.data],{type:(y==null?void 0:y.headers["content-type"])||"image/*"});g.value=URL.createObjectURL(x)}catch{g.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(m.value=k)},{immediate:!0}),e.watch(m,k=>{d(k)},{immediate:!0});const N=()=>{var k;(k=c.value)==null||k.click()},_=async k=>{var O,I,W;const y=k.target,x=(O=y==null?void 0:y.files)==null?void 0:O[0];if(!x){y.value="";return}w.value=!0;try{const Y=new FormData;Y.append("file",x);const fe=await M.platformUploadFile(Y),de=(W=(I=fe==null?void 0:fe.data)==null?void 0:I.result)==null?void 0:W.url;de?(m.value=de,r("update:backGroundImage",de),d(de),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{w.value=!1,y.value=""}},J=e.computed(()=>{var k;return g.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(k=n==null?void 0:n.backgroundUrl)==null?void 0:k.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),A=k=>pl.getComponent(k),F=k=>{if(!k)return;const y=k.querySelector("input, textarea, .el-input__inner");y&&typeof y.focus=="function"&&y.focus()},L=(k,y,x)=>{n.disabled||(f.value=y,e.nextTick(()=>{F(x.currentTarget)}))},E=()=>{f.value=null},S=k=>{const y=k!=null&&k.width&&k.width>0?k.width:1,O=`calc((100% - ${(y-1)*48}px) / ${y})`;return{flex:`0 0 ${O}`,maxWidth:O,minWidth:"0",boxSizing:"border-box"}};return(k,y)=>{const x=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(J.value),onClick:y[2]||(y[2]=O=>(n==null?void 0:n.backGround)==="Yes"&&N())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:y[0]||(y[0]=e.withModifiers(O=>N(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:_},null,544),y[3]||(y[3]=e.createElementVNode("img",{src:pl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",_h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(O,I)=>{var W,Y,fe,de,j,U,Z,ee,ge;return e.openBlock(),e.createElementBlock("div",{key:I,class:"static-form-item",style:e.normalizeStyle({...S(O),...u.value.item}),onClick:y[1]||(y[1]=e.withModifiers(()=>{},["stop"]))},[O.label&&!((W=O==null?void 0:O.field)!=null&&W.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(u.value.label)},e.toDisplayString(O.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(u.value.value),onClick:Ie=>{var ue;return(ue=O.field)!=null&&ue.isNoClick?null:L(O,I,Ie)}},[f.value===I&&O.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A(((Y=O.field)==null?void 0:Y.type)??"Input")),{key:0,modelValue:O.field.value,"onUpdate:modelValue":Ie=>O.field.value=Ie,isEdit:!0,disabled:(fe=O.field)==null?void 0:fe.disabled,content:((de=O.field)==null?void 0:de.contents)??[],optionUrl:O.field,originalValue:(j=O.field)==null?void 0:j.value,config:(U=O.field)==null?void 0:U.config,configModel:((Z=O.field)==null?void 0:Z.prop)??((ee=O.field)==null?void 0:ee.name),selectedTagList:((ge=O.field)==null?void 0:ge.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[O.isStatus?(e.openBlock(),e.createBlock(x,{key:0,type:O.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Eh,e.toDisplayString(O.value??"-"),1))],64))],12,Sh)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(u.value.empty)}," 暂无数据 ",4))],4)}}}),qc=nr._export_sfc(Ch,[["__scopeId","data-v-01e64c5f"]]),Dh={class:"form-content"},Th={title:"选择标签"},Bh={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Nh={class:"col-operate-wrap"},Ah={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},zh={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const n=()=>{c.value=!1,u.value=!1,m.value=[]},r=a;e.computed(()=>{var Se;const te=(Se=Ea.value)==null?void 0:Se.split("/");return(te==null?void 0:te.some(we=>(we==null?void 0:we.includes("updateLoading"))||(we==null?void 0:we.includes("loading"))))?!1:Ie.value==="view"});const i=l,o=e.ref(""),f=e.ref([]),c=e.ref(!1),u=e.ref(!1),m=e.ref([]),{getFileExtension:g}=Co.useThreeSystem(),w=e.ref(),d=e.ref(!1),N=e.ref(!1),_=M.useUnit(M.pinia),{chooseTitle:J}=M.storeToRefs(_),A=e.ref([]),F=e.ref(),L=e.ref(!1),E=e.ref([]),S=kc(M.pinia),k=Ot(M.pinia),y=e.ref(!1),x=e.ref(),O=e.ref(),I=e.ref(),W=e.ref(),Y=e.ref(),fe=M.useLoginState(M.pinia),{loginUserInfo:de}=M.storeToRefs(fe),j=e.ref(),U=e.ref(!0),Z=M.useModelComp(M.pinia),{tableViewContents:ee,itemData:ge,isEdit:Ie,routeToChildPath:ue,lockingPage:B,homepageBackgroundTableId:oe,refreshCurrentPageInform:q}=M.storeToRefs(Z),ye=e.ref(null),Ke=e.ref(!1),Ae=e.ref(!1),Qe=M.useMenuState(),{activeMenuPath:Ea}=M.storeToRefs(Qe),ne=le.useOriginalState(M.pinia),{originalPath:ua}=M.storeToRefs(ne),{compType:Pe,hasEditable:Re}=oc.useRole(),Le=()=>!Re(r.config,{type:Pe.FORM});e.computed(()=>Ea.value==="设备管理/试验设备"&&r.compName==="设备概要");const se=async()=>{var Se,we,fa;const te=oe==null?void 0:oe.value,ce=(Se=de==null?void 0:de.value)==null?void 0:Se.plat_id;if(!(!te||!ce))try{const ea=await M.getAllTables({platId:parseInt(ce),tableNames:[`content_${te}`,`struct_${te}`],user_unique_id:"0"}),Ta=((fa=(we=ea==null?void 0:ea.data)==null?void 0:we.result)==null?void 0:fa[0])??[],Ee=String((r==null?void 0:r.index)??""),Me=Ta==null?void 0:Ta.find(Fe=>String(Fe==null?void 0:Fe.relatedForm_id)===Ee);Me!=null&&Me.backgroundImg_url&&(W.value=Me.backgroundImg_url)}catch(ea){console.error("获取首页背景图片表数据失败:",ea)}},me=e.ref([]),qe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ka=async te=>{Ae.value=te,await da("disabled",null,te,!0)},_a=async te=>{await da("operable",null,te,!0)};e.watch(()=>Ea.value,async()=>{f.value=[],m.value=[]},{deep:!0,immediate:!0});const H=()=>{e.nextTick(()=>{ve()})},V=te=>{var ce;f.value=(ce=f.value)==null?void 0:ce.map(Se=>({...Se,isFormColHidden:!(te!=null&&te.includes(Se.label))}))};e.onUnmounted(()=>{ye.value=null});const ae=te=>{i("clickTrigger",te)},pe=async te=>{var ce,Se,we,fa,ea,Ta;if(te===""){let Ee="";(ce=f.value)==null||ce.forEach(he=>{he!=null&&he.isMain&&(Ee=he==null?void 0:he.value)});let Me=await le.getItemData(ue.value,sessionStorage.getItem("systemKey"),"");Ee=((Ta=(ea=(fa=(we=(Se=Me==null?void 0:Me[0])==null?void 0:Se.compData)==null?void 0:we.find(he=>(he==null?void 0:he.key)==="mainRouters"))==null?void 0:fa.contents)==null?void 0:ea[0])==null?void 0:Ta.routerContent)+ua.value+Ee;let $e=await le.getItemData(Ee,sessionStorage.getItem("systemKey"),"");L.value=!0,E.value=$e==null?void 0:$e.filter(he=>(he==null?void 0:he.comp)!=="methodButton"),i("routeUrl",E.value)}},ve=()=>{var ce;const te=(ce=ye.value)==null?void 0:ce.$el;te&&Fl.Sortable.create(te,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Se=>{const{oldIndex:we,newIndex:fa}=Se;if(we===fa)return;const ea=f.value.splice(we,1)[0];f.value.splice(fa,0,ea)}})},da=async(te,ce,Se,we=!1)=>{try{Z.setRefreshCurStructure(!1)}catch{Ja.ElMessage.error("编辑处理失败")}},ca=async(te,ce)=>{await da()},Ue=async(te,ce)=>{te&&await da()},Sa=async(te,ce,Se)=>{await da(ce,Se,te,!1)},Ma=(te,ce)=>{j.value===ce?U.value=!1:U.value=!0,j.value=ce==null?void 0:ce.changeProp},Te=async te=>{var Ta;W.value=te;const ce=r.itemData,Se=ce==null?void 0:ce.find(Ee=>(Ee==null?void 0:Ee.key)==="backGroundImage");Se?Se.contents=te:ce==null||ce.push({key:"backGroundImage",contents:te}),i("change",{key:"backGroundImage",contents:te});const we=oe==null?void 0:oe.value,fa=r==null?void 0:r.index,ea=(Ta=de==null?void 0:de.value)==null?void 0:Ta.plat_id;if(!(!we||!ea||!fa||!te))try{await M.pageBatchAddApi({platId:parseInt(ea),changeContents:[{tableName:`content_${we}`,tableContents:[{backgroundImg_url:te,relatedForm_id:String(fa)}]}],user_unique_id:"0"})}catch(Ee){console.error("保存背景图片记录失败:",Ee),Ja.ElMessage.error("背景图片记录保存失败")}},Fa=async te=>{var Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl;let ce=[];if((Se=te==null?void 0:te.toString())!=null&&Se.includes(".urdf")){if(te.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:te,extension:g(te)}],u.value=!0,c.value=!0;return}if((we=te==null?void 0:te.toString())!=null&&we.includes(".stl")||(fa=te==null?void 0:te.toString())!=null&&fa.includes(".STL")||(ea=te==null?void 0:te.toString())!=null&&ea.includes(".obj")||(Ta=te==null?void 0:te.toString())!=null&&Ta.includes(".mtl")){const el=((Ee=te==null?void 0:te.toString())==null?void 0:Ee.split(",")).map($l=>({url:$l,extension:g($l)}));m.value=el,u.value=!1,c.value=!0;return}if((Me=te==null?void 0:te.toString())!=null&&Me.includes(".stl")||(Fe=te==null?void 0:te.toString())!=null&&Fe.includes(".STL")||($e=te==null?void 0:te.toString())!=null&&$e.includes(".obj")||(he=te==null?void 0:te.toString())!=null&&he.includes(".mtl")){let jl,el=[],$l={};if(Array.isArray(te)?jl=te:jl=te==null?void 0:te.split(","),jl==null||jl.forEach(Wa=>{Wa.includes(".mtl")?el.push(Wa):$l.blob=$l.blob?$l.blob+","+Wa:Wa}),(el==null?void 0:el.length)>0&&($l.mtlBlobs=el),(El=(tl=Object.values($l))==null?void 0:tl[0])!=null&&El.includes("http:"))ce.push($l);else{const Wa=new Blob([$l.blob],{type:"application/octet-stream;charset=UTF-8"});let Kl=URL.createObjectURL(Wa),Jl="";(Ml=te==null?void 0:te.split("/"))==null||Ml.forEach((ar,xl)=>{var br;xl===((br=te==null?void 0:te.split("/"))==null?void 0:br.length)-1&&(Jl=ar)}),(Hl=$l.blob)!=null&&Hl.includes(".stl")&&(Jl=(Jl==null?void 0:Jl.replaceAll(">",""))+".urdf"),F.value=[{name:Jl,blobUrl:Kl}],N.value=!0}}else{const jl=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),el=await Ja.axios.get(te,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{jl.close()}),$l=new Blob([el.data],{type:"application/octet-stream;charset=UTF-8"});let Wa=URL.createObjectURL($l),Kl="";(Bl=te==null?void 0:te.split("/"))==null||Bl.forEach((Jl,ar)=>{var xl;ar===((xl=te==null?void 0:te.split("/"))==null?void 0:xl.length)-1&&(Kl=Jl)}),F.value=[{name:Kl,blobUrl:Wa}],N.value=!0}(ce==null?void 0:ce.length)>0&&k.setBlobUrls(ce)},Na=()=>{N.value=!1},oa=te=>{var ea,Ta,Ee,Me;const ce=(Ta=(ea=pl.safeClone(r.itemData))==null?void 0:ea.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:Ta.contents,Se=pl.safeClone(te.content);let we={};Se&&((Ee=Object.values(Se))==null?void 0:Ee.length)>0&&((Me=Object.values(Se))==null||Me.forEach((Fe,$e)=>{we[ce[$e].key]=Fe}));const fa={content:we,index:r==null?void 0:r.index,buttonName:te==null?void 0:te.buttonName};i("change",fa)};e.computed(()=>"http://222.92.178.198:62001");const ja=async te=>{var tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl;if(!te)return;(El=(tl=r==null?void 0:r.itemData)==null?void 0:tl.find(ha=>(ha==null?void 0:ha.key)==="parentFormPath"))==null||El.contents;let ce=ee.value;(ce==null?void 0:ce.length)>0&&(ce=ce==null?void 0:ce.map(ha=>{var ra,Ga,wl,De;let Ha=(ra=ha==null?void 0:ha.key)==null?void 0:ra.split("/");return(r==null?void 0:r.compName)===(Ha==null?void 0:Ha[0])&&(Ga=f.value)!=null&&Ga.find(ia=>(ia==null?void 0:ia.prop)===(Ha==null?void 0:Ha[1]))&&(ha.value=(De=(wl=f.value)==null?void 0:wl.find(ia=>(ia==null?void 0:ia.prop)===(Ha==null?void 0:Ha[1])))==null?void 0:De.value),ha}),Z.setTableViewContents(ce));const Se=pl.safeClone(r.itemData);let we=Se==null?void 0:Se.map(ha=>{var Ha;return(ha==null?void 0:ha.key)==="formContent"&&((Ha=ha.contents)==null||Ha.map((ra,Ga)=>{var wl,De,ia,Pa,Be,La,al,bl,Tl,Oe,ma,ta,xa,ga,fl,Ve,ml,Ne,Pl,Da,ul;return ra.type=(De=(wl=f.value)==null?void 0:wl.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:De.type,ra.options=ra!=null&&ra.options?ra.options:((Be=(Pa=(ia=ra==null?void 0:ra.key)==null?void 0:ia.split("$"))==null?void 0:Pa[1])==null?void 0:Be.length)>0?(Tl=(bl=ed((al=(La=ra==null?void 0:ra.key)==null?void 0:La.split("$"))==null?void 0:al[1]))==null?void 0:bl.split(","))==null?void 0:Tl.map(Za=>({label:Za,value:Za})):[],(Oe=ra==null?void 0:ra.key)!=null&&Oe.includes("$")&&(ra.key=(ta=(ma=ra==null?void 0:ra.key)==null?void 0:ma.split("$"))==null?void 0:ta[0]),ra.signature=(ga=(xa=f.value)==null?void 0:xa.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:ga.signature,ra.isLoginUser=(Ve=(fl=f.value)==null?void 0:fl.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:Ve.isLoginUser,ra.value=(ml=Object.values(te))==null?void 0:ml[Ga],ra.isFormColHidden=(Pl=(Ne=f.value)==null?void 0:Ne.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:Pl.isFormColHidden,ra.isHideInForm=(ul=(Da=f.value)==null?void 0:Da.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:ul.isHideInForm,ra})),ha}),fa=f.value,ea=(Hl=(Ml=pl.safeClone(we))==null?void 0:Ml.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:Hl.contents;if(fa=fa==null?void 0:fa.map(ha=>{var Ha,ra;return(ha==null?void 0:ha.type)==="Select"&&((Ha=ha==null?void 0:ha.allSelectionContents)==null?void 0:Ha.length)>0&&(ha.contactValue=te),ha.value=(ra=ea==null?void 0:ea.find((Ga,wl)=>((Ga==null?void 0:Ga.id)??wl)===(ha==null?void 0:ha.id)))==null?void 0:ra.value,ha}),!U.value){i("contentChange",{contents:we,index:r.index});return}let Ta="",Ee=(el=(jl=(Bl=pl.safeClone(we))==null?void 0:Bl.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:jl.contents)==null?void 0:el.find((ha,Ha)=>{var ra,Ga,wl;return(ha==null?void 0:ha.label)===j.value||Ha.toString()===((wl=(Ga=(ra=j.value)==null?void 0:ra.split("t"))==null?void 0:Ga[1])==null?void 0:wl.toString())}),Me=($l=Ee==null?void 0:Ee.optionUrl)==null?void 0:$l.menuSelect,Fe=!0;if((Jl=(Kl=(Wa=pl.safeClone(we))==null?void 0:Wa.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:Kl.contents)==null||Jl.forEach(ha=>{var Ha,ra,Ga,wl,De,ia;Fe&&((Ga=(ra=(Ha=ha==null?void 0:ha.optionUrl)==null?void 0:Ha.groupSelect)==null?void 0:ra[1])!=null&&Ga.includes("["))&&(Ta=(De=(wl=ha==null?void 0:ha.optionUrl)==null?void 0:wl.groupSelect)==null?void 0:De[1],JSON.stringify(Me)===JSON.stringify((ia=ha==null?void 0:ha.optionUrl)==null?void 0:ia.menuSelect)&&(Fe=!1))}),(ar=Ee==null?void 0:Ee.optionUrl)!=null&&ar.menuSelect&&U.value){let ha=await Ct(Ee),Ha,ra=(xl=Ee==null?void 0:Ee.optionUrl)==null?void 0:xl.menuSelect;if(ha==null||ha.forEach(Ga=>{var wl,De,ia,Pa,Be,La,al,bl,Tl,Oe;Ta===((De=(wl=Ee==null?void 0:Ee.optionUrl)==null?void 0:wl.groupSelect)==null?void 0:De[1])&&((Be=(Pa=(ia=Ee==null?void 0:Ee.optionUrl)==null?void 0:ia.groupSelect)==null?void 0:Pa[1])!=null&&Be.includes("["))&&((Oe=pl.safeClone(Ga))==null?void 0:Oe[(Tl=(bl=(al=(La=Ee==null?void 0:Ee.optionUrl)==null?void 0:La.groupSelect)==null?void 0:al[1])==null?void 0:bl.replaceAll("[",""))==null?void 0:Tl.replaceAll("]","")])===(Ee==null?void 0:Ee.value)&&(Ha=Ga)}),Ha){let Ga=pl.safeClone(fa);Ga=Ga==null?void 0:Ga.map(De=>{var ia,Pa,Be,La,al,bl,Tl,Oe,ma,ta,xa;return(Ha!=null&&Ha[De==null?void 0:De.label]||Ha!=null&&Ha[(La=(Be=(Pa=(ia=De==null?void 0:De.optionUrl)==null?void 0:ia.groupSelect)==null?void 0:Pa[1])==null?void 0:Be.replaceAll("[",""))==null?void 0:La.replaceAll("]","")])&&((Tl=(bl=(al=De==null?void 0:De.optionUrl)==null?void 0:al.groupSelect)==null?void 0:bl[1])!=null&&Tl.includes("["))&&ra!=null&&ra.every(ga=>{var fl,Ve;return(Ve=(fl=De==null?void 0:De.optionUrl)==null?void 0:fl.menuSelect)==null?void 0:Ve.includes(ga)})&&(De.value=(Ha==null?void 0:Ha[De==null?void 0:De.label])||(Ha==null?void 0:Ha[(xa=(ta=(ma=(Oe=De==null?void 0:De.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:ma[1])==null?void 0:ta.replaceAll("[",""))==null?void 0:xa.replaceAll("]","")]),Array.isArray(De.value)&&De.value.every(ga=>(ga==null?void 0:ga.url)&&(ga==null?void 0:ga.name))&&(De.type="Upload")),De}),Ga=Ga==null?void 0:Ga.map(De=>{var ia,Pa,Be;return(ia=De==null?void 0:De.optionUrl)!=null&&ia.oldMenuSelect&&(De.optionUrl.menuSelect=(Be=(Pa=pl.safeClone(De))==null?void 0:Pa.optionUrl)==null?void 0:Be.oldMenuSelect),De}),f.value=pl.safeClone(Ga);let wl=pl.safeClone(Ga);wl=wl==null?void 0:wl.map(De=>{var ia,Pa,Be,La,al,bl;return(Pa=(ia=De==null?void 0:De.optionUrl)==null?void 0:ia.menuSelect)!=null&&Pa.some(Tl=>Tl==null?void 0:Tl.includes("["))&&(De.optionUrl.oldMenuSelect=(La=(Be=pl.safeClone(De))==null?void 0:Be.optionUrl)==null?void 0:La.menuSelect,De.optionUrl.menuSelect=(bl=(al=De==null?void 0:De.optionUrl)==null?void 0:al.menuSelect)==null?void 0:bl.map(Tl=>{var Oe,ma,ta,xa;if(Tl!=null&&Tl.includes("[")){let ga=(ma=(Oe=Tl==null?void 0:Tl.replaceAll("[","").replaceAll("]",""))==null?void 0:Oe.split(":"))==null?void 0:ma[1];Tl=(xa=(ta=pl.safeClone(Ga))==null?void 0:ta.find(fl=>(fl==null?void 0:fl.label)===ga))==null?void 0:xa.value}return Tl})),De}),f.value=wl}else f.value=fa;we=we==null?void 0:we.map(Ga=>{var wl;return(Ga==null?void 0:Ga.key)==="formContent"&&(Ga.contents=(wl=Ga.contents)==null?void 0:wl.map(De=>{var ia,Pa,Be,La;return De.value=((Pa=(ia=f.value)==null?void 0:ia.find(al=>(al==null?void 0:al.label)===(De==null?void 0:De.key)))==null?void 0:Pa.value)??(De==null?void 0:De.value),De.type=((La=(Be=f.value)==null?void 0:Be.find(al=>(al==null?void 0:al.prop)===(De==null?void 0:De.key)))==null?void 0:La.type)??(De==null?void 0:De.type),De})),Ga})}U.value=!1,i("contentChange",{contents:we,index:r.index});let $e=[],he=[];if((ya=pl.safeClone((br=we==null?void 0:we.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:br.contents))==null||ya.forEach(ha=>{var Ha;Array.isArray(ha==null?void 0:ha.value)&&((Ha=ha==null?void 0:ha.value)!=null&&Ha.find(ra=>{var Ga;return(Ga=ra==null?void 0:ra.url)==null?void 0:Ga.includes(".obj")}))&&(he=ha==null?void 0:ha.value)}),(he==null?void 0:he.length)>0){const ha=(sl=pl.safeClone(he))==null?void 0:sl.filter(Ha=>{var ra;return(ra=Ha==null?void 0:Ha.url)==null?void 0:ra.includes(".obj")});ha==null||ha.forEach(Ha=>{var Ga,wl,De,ia;const ra=(Ga=he==null?void 0:he.filter(Pa=>{var Be;return(Pa==null?void 0:Pa.name)===(Ha==null?void 0:Ha.name)&&((Be=Pa==null?void 0:Pa.url)==null?void 0:Be.includes(".mtl"))}))==null?void 0:Ga.map(Pa=>Pa==null?void 0:Pa.url);$e.push({objUrl:Ha==null?void 0:Ha.url,mtlUrls:((wl=he==null?void 0:he.filter(Pa=>{var Be;return(Pa==null?void 0:Pa.name)===(Ha==null?void 0:Ha.name)&&((Be=Pa==null?void 0:Pa.url)==null?void 0:Be.includes(".mtl"))}))==null?void 0:wl.length)===1?(ia=(De=he==null?void 0:he.filter(Pa=>{var Be;return(Pa==null?void 0:Pa.name)===(Ha==null?void 0:Ha.name)&&((Be=Pa==null?void 0:Pa.url)==null?void 0:Be.includes(".mtl"))}))==null?void 0:De[0])==null?void 0:ia.url:ra})}),k.setObjUrl($e)}},aa=(te,ce,Se)=>{let we="";const fa=ce==null?void 0:ce.map(ea=>{var Ta;return(Ta=ea==null?void 0:ea.value)==null?void 0:Ta.pageData});return fa==null||fa.forEach(ea=>{var Ta;(ea==null?void 0:ea.name)===(te==null?void 0:te[0])&&((Ta=ea==null?void 0:ea.compData)==null||Ta.forEach(Ee=>{var Me;(Ee==null?void 0:Ee.key)==="formContent"&&((Me=Ee==null?void 0:Ee.contents)==null||Me.forEach(Fe=>{var $e;(Fe==null?void 0:Fe.prop)===(te==null?void 0:te[1])&&(we=(Fe==null?void 0:Fe.value)===""?le.judgeContents(($e=pl.safeClone(Fe))==null?void 0:$e.optionUrl,Se):Fe==null?void 0:Fe.value)}))}))}),we},je=(te,ce,Se,we)=>{var Ee,Me;let fa="",ea="";(Ee=pl.safeClone(ce))==null||Ee.forEach((Fe,$e)=>{Fe!=null&&Fe.includes("[")?ea=ea+ua.value+te[$e]:ea=ea===""?ea+Fe:ea+"/"+Fe});let Ta=(Me=we[ea])==null?void 0:Me.map(Fe=>{var $e;return($e=Fe==null?void 0:Fe.value)==null?void 0:$e.pageData});return Ta==null||Ta.forEach(Fe=>{var $e;(Fe==null?void 0:Fe.name)===(Se==null?void 0:Se[0])&&(($e=Fe==null?void 0:Fe.compData)==null||$e.forEach(he=>{var tl;(he==null?void 0:he.key)==="formContent"&&((tl=he==null?void 0:he.contents)==null||tl.forEach(El=>{(El==null?void 0:El.prop)===(Se==null?void 0:Se[1])&&(fa=El==null?void 0:El.value)}))}))}),fa};e.watch(()=>oe==null?void 0:oe.value,async()=>{await se()},{immediate:!0});const pa=async te=>await hf(te,"Auto");return e.watch(()=>q.value,async()=>{var te;(te=f.value)!=null&&te.some(ce=>(ce==null?void 0:ce.functionName)&&(ce==null?void 0:ce.functionName)!=="")&&(f.value=await pa(f.value))},{immediate:!0,deep:!0}),e.watch(()=>r.itemData,async()=>{var El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl,ha,Ha,ra,Ga,wl,De,ia,Pa,Be,La,al,bl,Tl;const te=(El=r.itemData)==null?void 0:El.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent");let ce=(Ml=r.itemData)==null?void 0:Ml.find(Oe=>(Oe==null?void 0:Oe.key)==="backGround");ce&&((Hl=ce==null?void 0:ce.contents)==null?void 0:Hl.length)>0&&(o.value=((jl=(Bl=ce==null?void 0:ce.contents)==null?void 0:Bl[0])==null?void 0:jl.url)??"");const Se=(el=pl.safeClone(r.itemData))==null?void 0:el.find(Oe=>(Oe==null?void 0:Oe.key)==="formButton"),we=($l=pl.safeClone(r.itemData))==null?void 0:$l.find(Oe=>(Oe==null?void 0:Oe.key)==="formFlex"),fa=(Wa=pl.safeClone(r.itemData))==null?void 0:Wa.find(Oe=>(Oe==null?void 0:Oe.key)==="formWrap"),ea=(Kl=pl.safeClone(r.itemData))==null?void 0:Kl.find(Oe=>(Oe==null?void 0:Oe.key)==="enableWrap"),Ta=(Jl=pl.safeClone(r.itemData))==null?void 0:Jl.find(Oe=>(Oe==null?void 0:Oe.key)==="textSize"),Ee=(ar=pl.safeClone(r.itemData))==null?void 0:ar.find(Oe=>(Oe==null?void 0:Oe.key)==="textRGBA"),Me=(xl=pl.safeClone(r.itemData))==null?void 0:xl.find(Oe=>(Oe==null?void 0:Oe.key)==="backGround"),Fe=(br=pl.safeClone(r.itemData))==null?void 0:br.find(Oe=>(Oe==null?void 0:Oe.key)==="backGroundImage");(fa==null?void 0:fa.contents)==="纵向"?d.value=!1:d.value=!0;const $e=Number(Ta==null?void 0:Ta.contents);x.value=Number.isNaN($e)?void 0:$e,O.value=Ee==null?void 0:Ee.contents,I.value=Me==null?void 0:Me.contents,W.value=Fe==null?void 0:Fe.contents;const he=ea==null?void 0:ea.contents;if(he===void 0?y.value=fi.BLOCK:typeof he=="boolean"?y.value=he?fi.ORDINARY:fi.BLOCK:y.value=he,Y.value=typeof(we==null?void 0:we.contents)!="boolean"?!(!(we!=null&&we.contents)===""||((ya=we==null?void 0:we.contents)==null?void 0:ya.toUpperCase())==="VERTICAL"):we==null?void 0:we.contents,((sl=te==null?void 0:te.contents)==null?void 0:sl.length)>0&&Array.isArray(te==null?void 0:te.contents)){let Oe=r.allMapContents;const ma=(Ha=(ha=pl.safeClone(te))==null?void 0:ha.contents)==null?void 0:Ha.map((Ne,Pl)=>{var rr,en,Gr,or,Cr,an,Wl,tr,kr,Lr,Il,ln,sr;let Da=(Ne==null?void 0:Ne.label)??(Ne==null?void 0:Ne.key)??"";Ne==null||Ne.type;let ul=(Ne==null?void 0:Ne.options)??[];if((rr=Ne==null?void 0:Ne.key)!=null&&rr.includes("$")&&(Da=(en=pl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:en[0],((or=(Gr=pl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:Gr[1])==null?void 0:or.length)>0)){const[_r,Mr]=(an=(Cr=pl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:Cr[1])==null?void 0:an.split(/[()]/);(Wl=le.FormType.find(Br=>(Br==null?void 0:Br.key)===_r))==null||Wl.value,((tr=Mr==null?void 0:Mr.split(","))==null?void 0:tr.length)>0&&(ul=(kr=Mr==null?void 0:Mr.split(","))==null?void 0:kr.map(Br=>({label:Br,value:Br})))}let Za=Ne==null?void 0:Ne.options;((Lr=Ne==null?void 0:Ne.optionUrl)==null?void 0:Lr.selectRelateType)==="自定义绑定"&&(Za=(ln=(Il=Ne==null?void 0:Ne.optionUrl)==null?void 0:Il.defaultSelect)==null?void 0:ln.map(_r=>({label:_r,value:_r})));let Nl=(Ne==null?void 0:Ne.menuPath)??[],Ba=(Ne==null?void 0:Ne.groups)??[],Rl=(Ne==null?void 0:Ne.columns)??[],Er=!1,tn=(Ne==null?void 0:Ne.isFormColHidden)??!1,Fr="",ir=Ne!=null&&Ne.value?Ne.value:(Za==null?void 0:Za.length)>0?(sr=Za==null?void 0:Za[0])==null?void 0:sr.value:(Ne==null?void 0:Ne.value)??"",Ur=!1,Zr="Input";return((Za==null?void 0:Za.length)>0||(Nl==null?void 0:Nl.length)>0)&&(Zr="Select"),(Array.isArray(Fr)&&(Fr!=null&&Fr.every(_r=>(_r==null?void 0:_r.name)&&(_r==null?void 0:_r.url)))||Array.isArray(ir)&&(ir!=null&&ir.every(_r=>(_r==null?void 0:_r.name)&&(_r==null?void 0:_r.url))))&&(Zr="upload"),Ne!=null&&Ne.isMainUrl&&(Zr="Url"),{label:Da??"",name:Da??"t"+Pl,prop:Da??pl.safeClone(Ne==null?void 0:Ne.key),type:(Ne==null?void 0:Ne.type)??Zr,value:(Ne==null?void 0:Ne.type)==="Date"&&ir===""?new Date:ir,id:(Ne==null?void 0:Ne.id)??Pl,contents:(Za==null?void 0:Za.length)>0?Za:ul??[],width:(Ne==null?void 0:Ne.width)??1,isLoginUser:Er,config:Ne==null?void 0:Ne.config,optionUrl:(Ne==null?void 0:Ne.optionUrl)??Ne,isFormColHidden:tn,isHideInForm:(Ne==null?void 0:Ne.isHideInForm)??!1,signature:Ur,isMain:Ne==null?void 0:Ne.isMain,required:(Ne==null?void 0:Ne.required)??!1,isMainUrl:Ne==null?void 0:Ne.isMainUrl,operable:(Ne==null?void 0:Ne.operable)??!1,disabled:(Ne==null?void 0:Ne.disabled)??!1,isSync:Ne==null?void 0:Ne.isSync,menus:Nl,groups:Ba,words:Rl,allSelectionContents:Ne==null?void 0:Ne.allContents,filterContent:Ne==null?void 0:Ne.filterContents,isNoClick:(Ne==null?void 0:Ne.isNoClick)??!1,functionName:Ne==null?void 0:Ne.functionName,functionRelatedWords:Ne==null?void 0:Ne.functionRelatedWords,calculatorFilter:Ne==null?void 0:Ne.calculatorFilter,filters:Ne==null?void 0:Ne.filters}}),ta=ma==null?void 0:ma.map(Ne=>Ne==null?void 0:Ne.value);let xa="";ta==null||ta.forEach(Ne=>{Ne!==""&&Ne!==void 0&&(xa=xa===""?Ne:xa+"/"+Ne)}),S.setSelectArray(ta),S.setSelectString(xa);let ga=(ra=pl.safeClone(ma))==null?void 0:ra.map(Ne=>(Ne!=null&&Ne.value&&le.IsJson(Ne==null?void 0:Ne.value)&&Array.isArray(JSON.parse(Ne==null?void 0:Ne.value))&&(Ne.value=JSON.parse(Ne.value)),Ne)),fl={};ga==null||ga.forEach(Ne=>{fl[Ne.label]=Ne==null?void 0:Ne.value}),ga=ga==null?void 0:ga.map(Ne=>{var Pl,Da,ul,Za,Nl,Ba,Rl,Er,tn;if((Ne==null?void 0:Ne.type)==="Select"&&((Pl=Ne==null?void 0:Ne.allSelectionContents)==null?void 0:Pl.length)>0&&(Ne.contactValue=fl),(ul=(Da=Ne==null?void 0:Ne.optionUrl)==null?void 0:Da.menuSelect)!=null&&ul.some(Fr=>Fr==null?void 0:Fr.includes("["))){let Fr="";Ne.optionUrl.oldMenuSelect=(Nl=(Za=pl.safeClone(Ne))==null?void 0:Za.optionUrl)==null?void 0:Nl.menuSelect,Ne.optionUrl.menuSelect=(Rl=(Ba=Ne==null?void 0:Ne.optionUrl)==null?void 0:Ba.menuSelect)==null?void 0:Rl.map(ir=>{var Ur,Zr,Or,rr,en,Gr;if(ir!=null&&ir.includes("[")){let or=(Zr=(Ur=ir==null?void 0:ir.replaceAll("[","").replaceAll("]",""))==null?void 0:Ur.split(":"))==null?void 0:Zr[1];Fr=aa((Or=ir==null?void 0:ir.replaceAll("[","").replaceAll("]",""))==null?void 0:Or.split(":"),Oe==null?void 0:Oe[Ea.value],Oe),ir=((en=(rr=pl.safeClone(ga))==null?void 0:rr.find(Cr=>(Cr==null?void 0:Cr.label)===or))==null?void 0:en.value)||aa((Gr=ir==null?void 0:ir.replaceAll("[","").replaceAll("]",""))==null?void 0:Gr.split(":"),Oe==null?void 0:Oe[Ea.value],Oe)}return ir}),Fr!==""&&Ne.value===""&&(Ne.value=je(Ne.optionUrl.menuSelect,Ne.optionUrl.oldMenuSelect,(Er=Ne==null?void 0:Ne.optionUrl)==null?void 0:Er.groupSelect,Oe),Array.isArray(Ne.value)&&((tn=Ne.value)!=null&&tn.every(ir=>ir==null?void 0:ir.url))&&(Ne.type="UPLOAD"))}return Ne}),f.value=ga,Ae.value=((Ga=f.value)==null?void 0:Ga.every(Ne=>Ne==null?void 0:Ne.disabled))||B.value===Ea.value,Ke.value=(wl=f.value)==null?void 0:wl.every(Ne=>Ne==null?void 0:Ne.operable),me.value=(De=f.value)==null?void 0:De.map(Ne=>Ne==null?void 0:Ne.label);let Ve=[],ml=[];if((ia=pl.safeClone(f.value))==null||ia.forEach(Ne=>{var Pl;Array.isArray(Ne==null?void 0:Ne.value)&&((Pl=Ne==null?void 0:Ne.value)!=null&&Pl.find(Da=>{var ul;return(ul=Da==null?void 0:Da.url)==null?void 0:ul.includes(".obj")}))&&(ml=Ne==null?void 0:Ne.value)}),(ml==null?void 0:ml.length)>0){const Ne=(Pa=pl.safeClone(ml))==null?void 0:Pa.filter(Pl=>{var Da;return(Da=Pl==null?void 0:Pl.url)==null?void 0:Da.includes(".obj")});Ne==null||Ne.forEach(Pl=>{var ul,Za,Nl,Ba;const Da=(ul=ml==null?void 0:ml.filter(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Pl==null?void 0:Pl.name)&&((Er=Rl==null?void 0:Rl.url)==null?void 0:Er.includes(".mtl"))}))==null?void 0:ul.map(Rl=>Rl==null?void 0:Rl.url);Ve.push({objUrl:Pl==null?void 0:Pl.url,mtlUrls:((Za=ml==null?void 0:ml.filter(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Pl==null?void 0:Pl.name)&&((Er=Rl==null?void 0:Rl.url)==null?void 0:Er.includes(".mtl"))}))==null?void 0:Za.length)===1?(Ba=(Nl=ml==null?void 0:ml.filter(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Pl==null?void 0:Pl.name)&&((Er=Rl==null?void 0:Rl.url)==null?void 0:Er.includes(".mtl"))}))==null?void 0:Nl[0])==null?void 0:Ba.url:Da})}),k.setObjUrl(Ve)}(Be=pl.safeClone(f.value))==null||Be.forEach(Ne=>{var Pl,Da,ul,Za,Nl,Ba,Rl,Er,tn,Fr,ir,Ur,Zr;if((Da=(Pl=Ne==null?void 0:Ne.value)==null?void 0:Pl.toString())!=null&&Da.includes(".stl")||(Za=(ul=Ne==null?void 0:Ne.value)==null?void 0:ul.toString())!=null&&Za.includes(".STL")||(Ba=(Nl=Ne==null?void 0:Ne.value)==null?void 0:Nl.toString())!=null&&Ba.includes(".obj")||(Er=(Rl=Ne==null?void 0:Ne.value)==null?void 0:Rl.toString())!=null&&Er.includes(".mtl")||(Fr=(tn=Ne==null?void 0:Ne.value)==null?void 0:tn.toString())!=null&&Fr.includes(".urdf")){let Or={},rr=[],en;Array.isArray(Ne==null?void 0:Ne.value)?en=Ne==null?void 0:Ne.value:en=(ir=Ne==null?void 0:Ne.value)==null?void 0:ir.split(","),en==null||en.forEach(Gr=>{Gr.includes(".mtl")?rr.push(Gr):Or.blob=Or.blob==="undefined"?Gr:Or.blob+","+Gr}),(rr==null?void 0:rr.length)>0&&(Or.mtlBlobs=rr),(Zr=(Ur=Object.values(Or))==null?void 0:Ur[0])!=null&&Zr.includes("http:")}})}else f.value=[];let tl=ee.value;if((tl==null?void 0:tl.length)>0&&(tl=tl==null?void 0:tl.map(Oe=>{var ta,xa,ga,fl;let ma=(ta=Oe==null?void 0:Oe.key)==null?void 0:ta.split("/");return(r==null?void 0:r.compName)===(ma==null?void 0:ma[0])&&(xa=f.value)!=null&&xa.find(Ve=>(Ve==null?void 0:Ve.prop)===(ma==null?void 0:ma[1]))&&(Oe.value=(fl=(ga=f.value)==null?void 0:ga.find(Ve=>(Ve==null?void 0:Ve.prop)===(ma==null?void 0:ma[1])))==null?void 0:fl.value),Oe}),Z.setTableViewContents(tl)),r!=null&&r.formRules)w.value=r==null?void 0:r.formRules;else{let Oe={};(La=pl.safeClone(f).value)==null||La.forEach(ma=>{((ma==null?void 0:ma.isMain)===!0||(ma==null?void 0:ma.required)===!0)&&(Oe[(ma==null?void 0:ma.prop)??(ma==null?void 0:ma.name)]=[{required:!0,message:`${(ma==null?void 0:ma.label)||(ma==null?void 0:ma.prop)||(ma==null?void 0:ma.name)}不能为空`}])}),w.value=Oe}if(((al=Se==null?void 0:Se.contents)==null?void 0:al.length)>0){const Oe=[];(bl=Se==null?void 0:Se.contents)==null||bl.forEach((ma,ta)=>{(ma==null?void 0:ma.label)!==""&&Oe.push({label:(ma==null?void 0:ma.label)??"",id:(ma==null?void 0:ma.id)??ta,type:(ma==null?void 0:ma.type)??"",background:ma==null?void 0:ma.background})}),A.value=Oe}else A.value=[];(Tl=f.value)!=null&&Tl.some(Oe=>(Oe==null?void 0:Oe.functionName)&&(Oe==null?void 0:Oe.functionName)!=="")&&(f.value=await pa(f.value))},{deep:!0,immediate:!0}),e.watch(()=>B.value,te=>{Ae.value=te===Ea.value},{immediate:!0}),(te,ce)=>{var Ee;const Se=e.resolveComponent("svg-icon"),we=e.resolveComponent("el-switch"),fa=e.resolveComponent("el-checkbox"),ea=e.resolveComponent("el-popover"),Ta=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Dh,[y.value===e.unref(fi).TEXT?(e.openBlock(),e.createBlock(qc,{key:0,itemData:a.itemData,compName:a.compName,fields:f.value,textSize:x.value,textColor:O.value,backGround:I.value,backGroundImage:W.value,disabled:Ae.value||Le(),"onUpdate:backGroundImage":Te,backgroundUrl:o.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):y.value===e.unref(fi).BLOCK?(e.openBlock(),e.createBlock(i0,{key:1,items:(Ee=f.value)==null?void 0:Ee.map(Me=>({label:Me!=null&&Me.isHideInForm?"":Me==null?void 0:Me.label,value:Me==null?void 0:Me.value,width:(Me==null?void 0:Me.width)??1,field:Me,filters:Me==null?void 0:Me.filters})),textSize:x.value,textColor:O.value,backGround:I.value,backGroundImage:W.value,disabled:Ae.value||Le(),"onUpdate:backGroundImage":Te,backgroundUrl:o.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":y.value===e.unref(fi).ORDINARY})},[e.createVNode(pl.ssForm,{rowContents:f.value,formRules:w.value,buttonValue:A.value,isRowFlex:!1,isEnableWrap:!0,textSize:x.value,textColor:O.value,backGround:I.value,backGroundImage:W.value,onOnButtonClick:oa,onChange:ja,formDisabled:Ae.value||Le(),formLabelsOperable:Ke.value,isButtonRow:d.value,onPreview:Fa,onBlurChange:Ma,style:e.normalizeStyle({backGroundImage:o.value!==""?`url("${o.value}")`:void 0}),onHandleColEditChange:ca,onHandleColTypeChange:Ue,onRouteUrl:pe,onClickTrigger:ae,"onUpdate:backGroundImage":Te},{operateCol:e.withCtx(({renderColumns:Me,formDisabled:Fe,formLabelsOperable:$e})=>[e.createVNode(ea,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:H},{reference:e.withCtx(()=>[e.createElementVNode("span",Th,[e.createVNode(Se,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Bh,[ce[1]||(ce[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(we,{"model-value":Fe,"active-text":"禁用","inactive-text":"",onChange:ka,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(we,{"model-value":$e,"active-text":"编辑所有标签","inactive-text":"",onChange:_a},null,8,["model-value"]),ce[2]||(ce[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ta,{modelValue:me.value,"onUpdate:modelValue":ce[0]||(ce[0]=he=>me.value=he),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ye,onChange:V},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me,he=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:he.label},[e.createVNode(fa,{value:he.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(he.label),1)]),_:2},1032,["value"]),e.createVNode(ea,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(Se,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var tl;return[e.createElementVNode("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((tl=Object.keys(he))==null?void 0:tl.filter(El=>{var Ml;return(Ml=qe.value)==null?void 0:Ml.find(Hl=>(Hl==null?void 0:Hl.value)===El)}),El=>{var Ml,Hl;return e.openBlock(),e.createElementBlock("div",{key:El},[e.createVNode(pl._sfc_main$1,{value:he==null?void 0:he[El],"active-text":(Hl=(Ml=qe.value)==null?void 0:Ml.find(Bl=>(Bl==null?void 0:Bl.value)===El))==null?void 0:Hl.label,inactiveText:"",onChange:Bl=>Sa(Bl,El,he)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ah,[e.createVNode(Se,{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)),N.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:3,fileDataList:F.value,onDestroy:Na},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Ir.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Co.ThreeViewerHost,{files:m.value,onGetAnimationData:te.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},zs=nr._export_sfc(zh,[["__scopeId","data-v-4e9ba5aa"]]),Mh={class:"table-header-child"},Ih={class:"table-header-child-main"},Oh={class:"table-header-child-content"},Lh={class:"table-header-child-content-item"},Rh={class:"fix-button"},$h={key:0},Vh={class:"form-content"},Fh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),o=e.ref(""),f=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(f);e.ref(0);const u=e.ref(""),m=e.ref([]),g=e.ref([]),w=E=>{var k;i.value=!0;let S=[];gr==null||gr.forEach(y=>{let x=M.cloneDeep(c.value)+1;f.setTableIndex(x),S.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:E[y.key],id:c.value,contents:y==null?void 0:y.options})}),E!=null&&E.children&&((k=E==null?void 0:E.children)==null?void 0:k.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=>{r("fixChange",M.cloneDeep(E))},N=E=>{r("deleteChange",M.cloneDeep(E))},_=E=>{i.value=!0;let S=[];gr==null||gr.forEach(k=>{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),S.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:c.value,contents:k==null?void 0:k.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},J=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(k=>(k.children||(k.value=E==null?void 0:E[k.name]),k)),g.value=S},A=()=>{var S,k;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(y=>{const x=gr==null?void 0:gr.find(O=>(O==null?void 0:O.label)===(y==null?void 0:y.label));x?E[x.key]=y.value:y!=null&&y.children&&y.children.length>0&&(E.children=y.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),E.id="id"+c.value,(k=m.value)==null||k.forEach(x=>{const O=gr==null?void 0:gr.find(I=>(I==null?void 0:I.label)===(x==null?void 0:x.label));O?E[O.key]=x.value:x!=null&&x.children&&x.children.length>0&&(E.children=x.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},F=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},L=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(y,x)=>(e.openBlock(),e.createElementBlock("div",Ih,[e.createElementVNode("div",Oh,[e.createElementVNode("div",Lh,e.toDisplayString(y.label),1),e.createElementVNode("div",Rh,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:O=>_(y)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:O=>w(y)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:O=>L(y)},null,8,["onClick"])])]),y!=null&&y.children&&y.children.length>0?(e.openBlock(),e.createElementBlock("div",$h,[e.createVNode(Wc,{tableChildContents:y==null?void 0:y.children,onDeleteChange:N,onFixChange:d},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Ir.ssDialog,{visible:i.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vh,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:J},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:F,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:A},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ph=nr._export_sfc(Fh,[["__scopeId","data-v-e0fef72d"]]),jh={class:"table-header-child"},Hh={class:"table-header-child-main"},Uh={class:"table-header-child-content"},qh={class:"table-header-child-content-item"},Wh={class:"fix-button"},Gh={key:0},Kh={class:"form-content"},Yh={class:"dialog-footer"},Jh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),o=e.ref(""),f=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(f),u=e.ref(""),m=e.ref([]),g=e.ref([]),w=E=>{r("fixChange",M.cloneDeep(E))},d=E=>{var k;i.value=!0;let S=[];gr==null||gr.forEach(y=>{let x=M.cloneDeep(c.value)+1;f.setTableIndex(x),S.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:E[y.key],id:c.value,contents:y==null?void 0:y.options})}),E!=null&&E.children&&((k=E==null?void 0:E.children)==null?void 0:k.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},N=E=>{i.value=!0;let S=[];gr==null||gr.forEach(k=>{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),S.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:c.value,contents:k==null?void 0:k.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},_=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(k=>(k.children||(k.value=E==null?void 0:E[k.name]),k)),g.value=S},J=()=>{var S,k;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(y=>{const x=gr==null?void 0:gr.find(O=>(O==null?void 0:O.label)===(y==null?void 0:y.label));x?E[x.key]=y.value:y!=null&&y.children&&y.children.length>0&&(E.children=y.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),E.id="idChild"+c.value,(k=m.value)==null||k.forEach(x=>{const O=gr==null?void 0:gr.find(I=>(I==null?void 0:I.label)===(x==null?void 0:x.label));O?E[O.key]=x.value:x!=null&&x.children&&x.children.length>0&&(E.children=x.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},A=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},F=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=E=>{r("deleteChange",E)};return(E,S)=>{const k=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",jh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(x,O)=>(e.openBlock(),e.createElementBlock("div",Hh,[e.createElementVNode("div",Uh,[e.createElementVNode("div",qh,e.toDisplayString(x.label),1),e.createElementVNode("div",Wh,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>N(x)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>d(x)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>F(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",Gh,[e.createVNode(Ph,{tableChildContents:x==null?void 0:x.children,onDeleteChange:L,onFixChange:w},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Ir.ssDialog,{visible:i.value,onBeforeDestroy:A,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kh,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yh,[e.createVNode(y,{onClick:A,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"ok-button button",onClick:J,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Wc=nr._export_sfc(Jh,[["__scopeId","data-v-ebd68fa1"]]),Xh={class:"table-operate-content"},Zh={class:"table-operate-item"},Qh={class:"operate-title"},e6={class:"operate-content"},a6={class:"fix-content"},l6={class:"fix-content-label"},r6={class:"fix-button"},n6={key:0},i6={class:"operate-title"},o6={class:"operate-content"},t6={class:"fix-content"},s6={class:"fix-content-label"},c6={class:"fix-button"},u6={class:"operate-title"},d6={class:"operate-content"},p6={class:"fix-content"},f6={class:"fix-content-label"},h6={class:"fix-button"},v6={class:"operate-title"},m6={class:"operate-content"},y6={class:"fix-content"},g6={class:"fix-content-label"},b6={class:"fix-button"},k6={class:"operate-content"},x6={style:{display:"flex","justify-content":"space-between"}},w6={class:"form-content"},_6={class:"dialog-footer"},S6={class:"form-content"},E6={class:"dialog-footer"},C6={class:"form-content"},D6={class:"dialog-footer"},T6={class:"form-content"},B6={class:"dialog-footer"},N6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),o=e.ref(!1),f=e.ref(!1),c=e.ref([]),u=e.ref(!1),m=e.ref([]),g=e.ref(!1),w=e.ref([]),d=e.ref(""),N=e.ref(""),_=e.ref([]),J=e.ref([]),A=e.ref([]),F=e.ref([]),L=e.ref(!1),E=e.ref([]),S=e.ref([]),k=e.ref(0),y=e.ref([]),x=e.ref([]),O=e.ref([]),I=()=>{L.value=!0;let H=[];Un==null||Un.forEach(V=>{k.value++,H.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:k.value,contents:V==null?void 0:V.options})}),E.value=H,S.value=H},W=()=>{var V,ae,pe;f.value=!0;let H=[];(pe=(ae=(V=le.FormContent)==null?void 0:V.find(ve=>(ve==null?void 0:ve.key)==="Input"))==null?void 0:ae.value)==null||pe.forEach(ve=>{k.value++,H.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="类型"?"Input":"",id:k.value,contents:ve==null?void 0:ve.options})}),y.value=H,x.value=H},Y=H=>{H||(y.value=x.value)},fe=async H=>{var V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na;if((H==null?void 0:H.类型)!==((ae=(V=x.value)==null?void 0:V.find(oa=>(oa==null?void 0:oa.label)==="类型"))==null?void 0:ae.value)){let oa=[],ja=await((da=(ve=(pe=le.FormContent)==null?void 0:pe.find(aa=>(aa==null?void 0:aa.key)===((H==null?void 0:H.类型)===""?"Input":H==null?void 0:H.类型)))==null?void 0:ve.value)==null?void 0:da.value)?await((Te=(Ma=(Sa=le.FormContent)==null?void 0:Sa.find(aa=>(aa==null?void 0:aa.key)===((H==null?void 0:H.类型)===""?"Input":H==null?void 0:H.类型)))==null?void 0:Ma.value)==null?void 0:Te.value):(Ue=(ca=le.FormContent)==null?void 0:ca.find(aa=>(aa==null?void 0:aa.key)===((H==null?void 0:H.类型)===""?"Input":H==null?void 0:H.类型)))==null?void 0:Ue.value;if(ja==null||ja.forEach(aa=>{k.value++,oa.push({label:aa==null?void 0:aa.label,name:(aa==null?void 0:aa.name)||(aa==null?void 0:aa.label),type:aa.type,value:aa!=null&&aa.属性名?(H==null?void 0:H.prop)||(H==null?void 0:H.name)||(H==null?void 0:H.label):(H==null?void 0:H[aa.label])??"",id:k.value,contents:aa==null?void 0:aa.options,prop:(aa==null?void 0:aa.prop)||(aa==null?void 0:aa.name)||(aa==null?void 0:aa.label)})}),H!=null&&H.菜单选项&&((Fa=H==null?void 0:H.菜单选项)==null?void 0:Fa.length)>0){const aa=await le.menuToContentType(H==null?void 0:H.菜单选项);oa=oa==null?void 0:oa.map(je=>((je==null?void 0:je.name)==="组信息选项"&&(je.contents=aa),je))}x.value=await le.selectToBase(M.cloneDeep(oa)),y.value=await le.selectToBase(M.cloneDeep(oa))}else{let oa=M.cloneDeep(y.value);if(oa=oa==null?void 0:oa.map(ja=>(ja.value=H==null?void 0:H[ja.name],ja)),H!=null&&H.菜单选项&&((Na=H==null?void 0:H.菜单选项)==null?void 0:Na.length)>0){const ja=await le.menuToContentType(H==null?void 0:H.菜单选项);oa=oa==null?void 0:oa.map(aa=>((aa==null?void 0:aa.name)==="组信息选项"&&(aa.contents=ja),aa))}oa=le.formToOptionsContents(oa),x.value=await le.selectToBase(M.cloneDeep(oa))}},de=async H=>{await fe(H),y.value=x.value},j=(H,V)=>{if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="selectRelateType"){const ae=V==null?void 0:V.optionUrl;return(ae==null?void 0:ae.selectRelateType)||V[H.key]}if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="menuSelect"){const ae=V==null?void 0:V.optionUrl;return(ae==null?void 0:ae.menuSelect)||V[H.key]}if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="groupSelect"){const ae=V==null?void 0:V.optionUrl;return(ae==null?void 0:ae.groupSelect)||V[H.key]}if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="originalContent")return(V==null?void 0:V.value)||V[H.key];if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="multiple"){const ae=V[H.key];return sc(ae)?ae:H.default}return(H==null?void 0:H.label)==="类型"&&V[H.key]===""?"Input":(H==null?void 0:H.key)==="isFormColHidden"&&!V[H.key]?!1:V[H.key]},U=async H=>{var pe,ve,da,ca,Ue,Sa,Ma,Te,Fa;f.value=!0;let V=[];const ae=await((da=(ve=(pe=le.FormContent)==null?void 0:pe.find(Na=>(Na==null?void 0:Na.key)===((H==null?void 0:H.type)===""?"Input":H==null?void 0:H.type)))==null?void 0:ve.value)==null?void 0:da.value)?await((Te=(Ma=(Sa=le.FormContent)==null?void 0:Sa.find(Na=>(Na==null?void 0:Na.key)===((H==null?void 0:H.type)===""?"Input":H==null?void 0:H.type)))==null?void 0:Ma.value)==null?void 0:Te.value):(Ue=(ca=le.FormContent)==null?void 0:ca.find(Na=>(Na==null?void 0:Na.key)===((H==null?void 0:H.type)===""?"Input":H==null?void 0:H.type)))==null?void 0:Ue.value;if(ae==null||ae.forEach(Na=>{k.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)==="属性名"?(H==null?void 0:H.prop)||(H==null?void 0:H.name)||(H==null?void 0:H.label):j(Na,H),id:k.value,contents:Na==null?void 0:Na.options})}),H!=null&&H.menuSelect&&((Fa=H==null?void 0:H.menuSelect)==null?void 0:Fa.length)>0){const Na=await le.menuToContentType(H==null?void 0:H.menuSelect);V=V==null?void 0:V.map(oa=>((oa==null?void 0:oa.name)==="组信息选项"&&(oa.contents=Na),oa))}d.value=H==null?void 0:H.id,y.value=await le.selectToBase(le.formToOptionsContents(V)),x.value=await le.selectToBase(le.formToOptionsContents(V))},Z=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;O.value=(V=M.cloneDeep(O.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="tableToForm"&&(pe.contents=O.value),pe))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ee=()=>{f.value=!1,y.value=[],d.value=""},ge=async()=>{var pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na;y.value=x.value;let H={};d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value);let V=await((da=(ve=(pe=le.FormContent)==null?void 0:pe.find(oa=>{var ja,aa;return(oa==null?void 0:oa.key)===(((aa=(ja=y.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:aa.value)??"label")}))==null?void 0:ve.value)==null?void 0:da.value)??((Ue=(ca=le.FormContent)==null?void 0:ca.find(oa=>{var ja,aa;return(oa==null?void 0:oa.key)===(((aa=(ja=y.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:aa.value)??"label")}))==null?void 0:Ue.value);if((Sa=y.value)==null||Sa.forEach(oa=>{const ja=V==null?void 0:V.find(aa=>(aa==null?void 0:aa.label)===(oa==null?void 0:oa.label));ja&&(H[ja.key]=oa.value)}),H.name=H.label,(Ma=O.value)!=null&&Ma.find(oa=>oa.id===H.id))O.value=(Te=O.value)==null?void 0:Te.map(oa=>(oa.id===H.id&&(oa=H),oa));else{let oa=M.cloneDeep(O.value);O.value||(O.value=[]),oa.push(H),O.value=oa}O.value=O.value.map(({id:oa,...ja})=>ja),f.value=!1,d.value="";let ae=M.cloneDeep(n.originalItemContents);(Fa=M.cloneDeep(n.originalItemContents))!=null&&Fa.find(oa=>(oa==null?void 0:oa.key)==="tableToForm")?ae=(Na=M.cloneDeep(n.originalItemContents))==null?void 0:Na.map(oa=>((oa==null?void 0:oa.key)==="tableToForm"&&(oa.contents=O.value),oa)):ae.push({key:"tableToForm",contents:O.value}),r("change",ae)},Ie=H=>{L.value=!0;let V=[];Un==null||Un.forEach(ae=>{k.value++,V.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:H[ae.key],id:k.value,contents:ae==null?void 0:ae.options})}),d.value=H==null?void 0:H.id,E.value=V,S.value=V};e.watch(()=>g.value,()=>{var V,ae;let H=M.cloneDeep(n.originalItemContents);(V=M.cloneDeep(n.originalItemContents))!=null&&V.find(pe=>(pe==null?void 0:pe.key)==="page")?H=(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="page"&&(pe.contents=g.value),pe)):H.push({key:"page",contents:g.value}),r("change",H)},{deep:!0});const ue=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;J.value=(V=M.cloneDeep(J.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="extraButton"&&(pe.contents=J.value),pe))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var ae,pe,ve,da,ca;E.value=S.value;let H={};if(d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value),(ae=E.value)==null||ae.forEach(Ue=>{const Sa=Un==null?void 0:Un.find(Ma=>(Ma==null?void 0:Ma.label)===(Ue==null?void 0:Ue.label));Sa?H[Sa.key]=Ue.value:Ue!=null&&Ue.children&&Ue.children.length>0&&(H.children=Ue.children)}),(pe=J.value)!=null&&pe.find(Ue=>Ue.id===H.id))J.value=(ve=J.value)==null?void 0:ve.map(Ue=>(Ue.id===H.id&&(Ue=H),Ue));else{let Ue=M.cloneDeep(J.value)??[];Ue.push(H),J.value=Ue}L.value=!1,d.value="";let V=M.cloneDeep(n.originalItemContents);(da=M.cloneDeep(n.originalItemContents))!=null&&da.find(Ue=>(Ue==null?void 0:Ue.key)==="extraButton")?V=(ca=M.cloneDeep(n.originalItemContents))==null?void 0:ca.map(Ue=>((Ue==null?void 0:Ue.key)==="extraButton"&&(Ue.contents=J.value),Ue)):V.push({key:"extraButton",contents:J.value}),r("change",V)},oe=H=>{let V=M.cloneDeep(S.value);V=V==null?void 0:V.map(ae=>(ae.children||(ae.value=H==null?void 0:H[ae.name]),ae)),S.value=V},q=()=>{L.value=!1,E.value=[],d.value=""},ye=H=>{u.value=!0;let V=[];qn==null||qn.forEach(ae=>{k.value++,V.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:H[ae.key],id:k.value,contents:ae==null?void 0:ae.options})}),d.value=H==null?void 0:H.id,A.value=V,F.value=V},Ke=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;_.value=(V=M.cloneDeep(_.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="rowButton"&&(pe.contents=_.value),pe))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ae=()=>{o.value=!0;let H=[];gr==null||gr.forEach(V=>{k.value++,H.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:k.value,contents:V==null?void 0:V.options})}),m.value=H,w.value=H},Qe=()=>{u.value=!0;let H=[];qn==null||qn.forEach(V=>{k.value++,H.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:k.value,contents:V==null?void 0:V.options})}),A.value=H,F.value=H},Ea=H=>{let V=M.cloneDeep(F.value);V=V==null?void 0:V.map(ae=>(ae.children||(ae.value=H==null?void 0:H[ae.name]),ae)),F.value=V},ne=()=>{var ae,pe,ve,da,ca;A.value=F.value;let H={};if(d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value),(ae=A.value)==null||ae.forEach(Ue=>{const Sa=qn==null?void 0:qn.find(Ma=>(Ma==null?void 0:Ma.label)===(Ue==null?void 0:Ue.label));Sa?H[Sa.key]=Ue.value:Ue!=null&&Ue.children&&Ue.children.length>0&&(H.children=Ue.children)}),(pe=_.value)!=null&&pe.find(Ue=>Ue.id===H.id))_.value=(ve=_.value)==null?void 0:ve.map(Ue=>(Ue.id===H.id&&(Ue=H),Ue));else{let Ue=M.cloneDeep(_.value);Ue.push(H),_.value=Ue}u.value=!1,d.value="";let V=M.cloneDeep(n.originalItemContents);(da=M.cloneDeep(n.originalItemContents))!=null&&da.find(Ue=>(Ue==null?void 0:Ue.key)==="rowButton")?V=(ca=M.cloneDeep(n.originalItemContents))==null?void 0:ca.map(Ue=>((Ue==null?void 0:Ue.key)==="rowButton"&&(Ue.contents=_.value),Ue)):V.push({key:"rowButton",contents:_.value}),r("change",V)},ua=()=>{u.value=!1,d.value="",F.value=[],A.value=[]},Pe=H=>{o.value=!0;let V=[];gr==null||gr.forEach(ae=>{k.value++,V.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:"",id:k.value,contents:ae==null?void 0:ae.options})}),m.value=V,N.value=H==null?void 0:H.id,w.value=V},Re=H=>{var V;c.value=Fc(M.cloneDeep(c.value),H==null?void 0:H.id),r("change",(V=M.cloneDeep(n.originalItemContents))==null?void 0:V.map(ae=>{var pe;return(ae==null?void 0:ae.key)==="header"&&(ae.contents=(pe=c.value)!=null&&pe.some(ve=>ve==null?void 0:ve.children)?[c.value]:c.value),ae}))},Le=H=>{var ae,pe,ve;H.type==="fix"?H.id!==""?c.value=jc(c.value,H):c.value=Pc(c.value,H==null?void 0:H.contents):c.value=Hc(c.value,H),c.value=(ae=c.value)!=null&&ae.some(da=>da==null?void 0:da.children)?[c.value]:c.value,d.value="";let V=M.cloneDeep(n.originalItemContents);(pe=M.cloneDeep(n.originalItemContents))!=null&&pe.find(da=>(da==null?void 0:da.key)==="header")?V=(ve=M.cloneDeep(n.originalItemContents))==null?void 0:ve.map(da=>((da==null?void 0:da.key)==="header"&&(da.contents=c.value),da)):V.push({key:"header",contents:c.value}),r("change",V)},se=H=>{var ae;o.value=!0;let V=[];gr==null||gr.forEach(pe=>{k.value++,V.push({label:pe==null?void 0:pe.label,name:pe==null?void 0:pe.label,type:pe.type,value:H[pe.key],id:k.value,contents:pe==null?void 0:pe.options})}),H!=null&&H.children&&((ae=H==null?void 0:H.children)==null?void 0:ae.length)>0&&V.push({children:H==null?void 0:H.children,isFormColHidden:!0}),d.value=H==null?void 0:H.id,N.value="",m.value=V,w.value=V},me=H=>{let V=M.cloneDeep(w.value);V=V==null?void 0:V.map(ae=>(ae.children||(ae.value=H==null?void 0:H[ae.name]),ae)),w.value=V},qe=()=>{o.value=!1,d.value="",N.value="",w.value=[]},ka=()=>{var ae,pe,ve,da,ca,Ue;m.value=w.value;let H={};if(d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value),(ae=m.value)==null||ae.forEach(Sa=>{const Ma=gr==null?void 0:gr.find(Te=>(Te==null?void 0:Te.label)===(Sa==null?void 0:Sa.label));Ma?H[Ma.key]=Sa.value:Sa!=null&&Sa.children&&Sa.children.length>0&&(H.children=Sa.children)}),(pe=c.value)!=null&&pe.find(Sa=>Sa.id===H.id))c.value=(ve=c.value)==null?void 0:ve.map(Sa=>(Sa.id===H.id&&(Sa=H),Sa));else{let Sa=M.cloneDeep(c.value)??[];N.value===""?Sa.push(H):Sa=Sa==null?void 0:Sa.map(Ma=>(Ma.id===N.value&&(Ma.children||(Ma.children=[]),Ma.children.push(H)),Ma)),c.value=Sa}c.value=(da=c.value)!=null&&da.some(Sa=>Sa==null?void 0:Sa.children)?[c.value]:c.value,o.value=!1,d.value="",N.value="";let V=M.cloneDeep(n.originalItemContents);(ca=M.cloneDeep(n.originalItemContents))!=null&&ca.find(Sa=>(Sa==null?void 0:Sa.key)==="header")?V=(Ue=M.cloneDeep(n.originalItemContents))==null?void 0:Ue.map(Sa=>((Sa==null?void 0:Sa.key)==="header"&&(Sa.contents=c.value),Sa)):V.push({key:"header",contents:c.value}),r("change",V)},_a=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;c.value=(V=M.cloneDeep(c.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>{var ve;return(pe==null?void 0:pe.key)==="header"&&(pe.contents=(ve=c.value)!=null&&ve.some(da=>da==null?void 0:da.children)?[c.value]:c.value),pe})),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(i.value=M.cloneDeep(n.originalItemContents),c.value=(V=(H=i.value)==null?void 0:H.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:V.contents,_.value=(pe=(ae=i.value)==null?void 0:ae.find(ce=>(ce==null?void 0:ce.key)==="rowButton"))==null?void 0:pe.contents,J.value=(da=(ve=i.value)==null?void 0:ve.find(ce=>(ce==null?void 0:ce.key)==="extraButton"))==null?void 0:da.contents,g.value=(Ue=(ca=i.value)==null?void 0:ca.find(ce=>(ce==null?void 0:ce.key)==="page"))!=null&&Ue.contents?!!((Ma=(Sa=i.value)==null?void 0:Sa.find(ce=>(ce==null?void 0:ce.key)==="page"))!=null&&Ma.contents):!1,O.value=(Fa=(Te=i.value)==null?void 0:Te.find(ce=>(ce==null?void 0:ce.key)==="tableToForm"))==null?void 0:Fa.contents,c.value=(Na=c.value)==null?void 0:Na.map((ce,Se)=>(Array.isArray(ce)?ce=_3(ce):ce={label:(ce==null?void 0:ce.label)??"",prop:(ce==null?void 0:ce.label)==="操作"?"operate":ce==null?void 0:ce.prop,width:ce!=null&&ce.width?parseInt(ce.width):"",fixed:(ce==null?void 0:ce.fixed)??void 0,sortable:(ce==null?void 0:ce.sortable)??!1,align:(ce==null?void 0:ce.align)??"left",showOverflowTooltip:(ce==null?void 0:ce.showOverflowTooltip)??!0,isNotDrag:(ce==null?void 0:ce.isNotDrag)??!1,isEditCol:(ce==null?void 0:ce.isEditCol)??!1,isOperate:(ce==null?void 0:ce.isOperate)??!1,id:(ce==null?void 0:ce.id)??Se,formMenuSelect:(ce==null?void 0:ce.formMenuSelect)??void 0,groupSelect:(ce==null?void 0:ce.groupSelect)??void 0},ce)),c.value=(oa=c.value)!=null&&oa.every(ce=>Array.isArray(ce))?(ja=c.value)==null?void 0:ja[0]:c.value,_.value=(aa=_.value)==null?void 0:aa.map((ce,Se)=>ce={label:(ce==null?void 0:ce.label)??"",type:(ce==null?void 0:ce.type)??"",textColor:(ce==null?void 0:ce.textColor)??"#000000",id:(ce==null?void 0:ce.id)??Se}),J.value=(je=J.value)==null?void 0:je.map((ce,Se)=>ce={label:(ce==null?void 0:ce.label)??"",type:(ce==null?void 0:ce.type)??"",background:(ce==null?void 0:ce.background)??"var(--ssComponent-primary-color)",id:(ce==null?void 0:ce.id)??Se}),O.value)O.value=(te=O.value)==null?void 0:te.map(ce=>{k.value++;let Se=ce;return Se.id=k.value,Se});else{let ce=[];const Se=(pa=le.getColumnChild(M.cloneDeep(c.value)))==null?void 0:pa.filter(we=>(we==null?void 0:we.prop)!=="operate");Se==null||Se.forEach(we=>{var fa;k.value++,ce.push({label:we==null?void 0:we.label,name:(we==null?void 0:we.prop)||(we==null?void 0:we.label),type:we!=null&&we.groupSelect?"Select":"Input",value:"",id:k.value,contents:we==null?void 0:we.options,menuSelect:we==null?void 0:we.formMenuSelect,groupSelect:(fa=we==null?void 0:we.groupSelect)==null?void 0:fa.split(":"),selectRelateType:"关联绑定列"})}),O.value=ce}},{deep:!0,immediate:!0}),(H,V)=>{const ae=e.resolveComponent("svg-icon"),pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Xh,[e.createElementVNode("div",Zh,[e.createElementVNode("div",Qh,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(pe,{class:"icon-content",onClick:Ae,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",e6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",a6,[e.createElementVNode("div",l6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",r6,[e.createVNode(ae,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>Pe(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>se(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>_a(ve)},null,8,["onClick"])])]),ve!=null&&ve.children&&ve.children.length>0?(e.openBlock(),e.createElementBlock("div",n6,[e.createVNode(Wc,{tableChildContents:ve==null?void 0:ve.children,onDeleteChange:Re,onFixChange:Le},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",i6,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:Qe},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",o6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",t6,[e.createElementVNode("div",s6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",c6,[e.createVNode(ae,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ca=>ye(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>Ke(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",u6,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:I},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",d6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",p6,[e.createElementVNode("div",f6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",h6,[e.createVNode(ae,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ca=>Ie(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>ue(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",v6,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:W},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",m6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",y6,[e.createElementVNode("div",g6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",b6,[e.createVNode(ae,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ca=>U(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>Z(ve)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",k6,[e.createElementVNode("div",x6,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(pl._sfc_main$1,{modelValue:g.value,"onUpdate:modelValue":V[0]||(V[0]=ve=>g.value=ve)},null,8,["modelValue"])])])]),e.createVNode(Ir.ssDialog,{visible:o.value,onBeforeDestroy:qe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",w6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_6,[e.createVNode(pe,{onClick:qe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(pe,{class:"ok-button button",onClick:ka,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:u.value,onBeforeDestroy:ua,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",S6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Ea},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",E6,[e.createVNode(pe,{onClick:ua,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(pe,{class:"ok-button button",onClick:ne,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:L.value,onBeforeDestroy:q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",C6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",D6,[e.createVNode(pe,{onClick:q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(pe,{class:"ok-button button",onClick:B,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:f.value,onBeforeDestroy:ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:fe,onChangeVisible:Y,onBlurChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B6,[e.createVNode(pe,{onClick:ee,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(pe,{class:"ok-button button",onClick:ge,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},A6=nr._export_sfc(N6,[["__scopeId","data-v-7a6b87b5"]]),z6=M.useModelComp(M.pinia),{pageMapState:Gc}=M.storeToRefs(z6),M6=M.useMenuState(M.pinia),{activeMenuPath:Kc,systemHeight:Yc}=M.storeToRefs(M6),I6=e.ref(24),O6=e.ref(6),Jc=e.ref(10),L6=e.ref(70),R6=e.ref(.18),$6=e.ref(45),V6=()=>{Jc.value=(Yc.value-100)/100};e.watch(()=>Yc.value,()=>{V6()},{deep:!0,immediate:!0});const F6=(a,l,n,r)=>{var i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,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=(f=a==null?void 0:a.value)==null?void 0:f.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)||I6.value,h:((w=(g=a==null?void 0:a.value)==null?void 0:g.tableData)==null?void 0:w.h)||n,minW:((N=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:N.minW)||O6.value,minH:((J=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:J.minH)||R6.value,maxH:((F=(A=a==null?void 0:a.value)==null?void 0:A.tableData)==null?void 0:F.maxH)||$6.value,i:((E=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},P6=(a,l)=>{var r,i,o,f,c,u,m,g;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((f=(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:f.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((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 n*2},Xc=(a,l,n)=>{var f,c;const r=(c=(f=Gc.value)==null?void 0:f[Kc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=r==null?void 0:r.find(u=>{var m,g,w;return((w=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:w.id)===a.id}),o=P6(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>Xc(u,m))),{...F6(i,l,o,a)}},j6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=M.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,i)=>Xc(r,i)):[]},H6=(a,l,n,r)=>{var i,o;return{x:n==null?void 0:n.x,y:0,w:Math.round(n==null?void 0:n.w),h:n==null?void 0:n.h,arrowGap:n==null?void 0:n.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:r}},U6=(a,l)=>{var m,g,w,d;let n=0,r=0,i=0,o=0,f=0,c=((g=(m=a==null?void 0:a.compData)==null?void 0:m.find(N=>(N==null?void 0:N.key)==="numPosition"))==null?void 0:g.contents)??[],u=((d=(w=a==null?void 0:a.compData)==null?void 0:w.find(N=>(N==null?void 0:N.key)==="rowPosition"))==null?void 0:d.contents)??"";return u&&u!==1&&(f=Math.ceil(u*l)),i=(c==null?void 0:c[0])*l,o=(c==null?void 0:c[1])*100,{x:n,y:r,w:i,h:o,arrowGap:f}},Zc=(a,l,n)=>{var f,c;const r=(c=(f=Gc.value)==null?void 0:f[Kc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=r==null?void 0:r.find(u=>{var m,g,w;return((w=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:w.id)===a.id}),o=U6(a,n);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>Zc(u,m,n))),{...H6(i,l,o,a)}},q6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=M.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,i)=>Zc(r,i,l)):[]},W6=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}]}]}}),G6=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),K6=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]);e.watch(()=>n.compType,c=>{var g;const u=W6(n==null?void 0:n.optionItems),m=c?(g=u[c==null?void 0:c.toUpperCase()])==null?void 0:g[n==null?void 0:n.target]:[];i.value=m==null?void 0:m.map(w=>{for(const[d,N]of Object.entries((n==null?void 0:n.comp)||{}))if((w==null?void 0:w.prop)===d)return{...w,value:N};return w})},{immediate:!0});const o=c=>pl.getComponent(c),f=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 w;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(w=g==null?void 0:g.options)==null?void 0:w.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 w;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(w=g==null?void 0:g.options)==null?void 0:w.map(d=>({...d,disabled:!1}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!1}:g}),r("change",{target:n==null?void 0:n.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,w=>(e.openBlock(),e.createBlock(g,{class:"style-row",key:w==null?void 0:w.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w==null?void 0:w.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(w.type)),{modelValue:w.value,"onUpdate:modelValue":d=>w.value=d,content:w==null?void 0:w.options,optionUrl:w==null?void 0:w.optionUrl,disabled:w==null?void 0:w.disabled,activeText:w==null?void 0:w.activeText,inactiveText:w==null?void 0:w.inactiveText,onChange:d=>f(w)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Y6=nr._export_sfc(K6,[["__scopeId","data-v-da01b651"]]),J6=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const n=a,r=l,i=[{required:!0,message:"输入不能为空",trigger:"blur"}],o=e.ref([]),f=F=>F==null?void 0:F.reduce((L,E)=>(L[E==null?void 0:E.prop]=E==null?void 0:E.rule,L),{}),c=e.computed(()=>({formRules:f(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=(F,L,E)=>{var y;let S=[];(n==null?void 0:n.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:F},{label:"按钮名称",value:"按钮名称",children:L}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],o.value=[{prop:"任务名称",rule:i},{prop:"任务关键词",rule:i},{prop:"执行任务",rule:i},{prop:"执行动作",rule:i},{prop:"执行交互",rule:i}]):(n==null?void 0:n.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:(y=n==null?void 0:n.relatedData)==null?void 0:y.map(x=>({label:x==null?void 0:x.任务名称,value:x==null?void 0:x.任务名称}))},{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 k;return E&&(E==null?void 0:E.length)>0?k=[...S,...w(F,L,E)]:k=S,k},w=(F,L,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(k=>E==null?void 0:E.includes(k==null?void 0:k.prop)):S},d=(F,L)=>{var x,O,I,W,Y,fe,de,j,U;const E=((Y=(W=(I=(O=(x=n==null?void 0:n.comp)==null?void 0:x.compData)==null?void 0:O.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:I.contents)==null?void 0:W.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:Y.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],S=/button/i,k=((U=(j=(de=(fe=n==null?void 0:n.comp)==null?void 0:fe.compData)==null?void 0:de.filter(Z=>S.test(Z==null?void 0:Z.key)))==null?void 0:j.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:U.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],y=g(E,k,F);u.value=L?G6(y,L):y,F&&(F==null?void 0:F.length)>0&&o.value.push(...F==null?void 0:F.map(Z=>({prop:Z,rule:i})))};e.onMounted(()=>{d(null,n==null?void 0:n.extendItem)});const N=F=>{const L=F==null?void 0:F[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const E=L==null?void 0:L.join("/");d(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,F)}},_=F=>{r("change",{target:n==null?void 0:n.target,extendConfigs:F})},J=(F,L)=>{m.value=L==null?void 0:L.changeProp,N(F)},A=F=>{r("onButtonClick",F)};return(F,L)=>(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:u.value,key:u.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:_,onBlurChange:J,onOnButtonClick:A},null,8,["rowContents","formRules","buttonValue"]))}}),X6=nr._export_sfc(J6,[["__scopeId","data-v-4b39853f"]]),Z6={};function Q6(a,l){return null}const e4=nr._export_sfc(Z6,[["render",Q6]]),a4={class:"form-operate-content"},l4={class:"form-operate-item"},r4={class:"operate-title"},n4={class:"operate-content"},i4={class:"fix-content"},o4={class:"fix-button"},t4={class:"operate-title"},s4={class:"operate-content"},c4={class:"fix-content"},u4={class:"fix-button"},d4={style:{display:"flex","justify-content":"space-between"}},p4={class:"form-content"},f4={class:"dialog-footer"},h4={class:"form-content"},v4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),o=e.ref([]),f=e.ref([]),c=e.ref(!1),u=e.ref([]),m=e.ref([]),g=e.ref(""),w=e.ref(!1),d=e.ref(0),N=e.ref([]),_=e.ref([]),J=(j,U)=>{if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="selectRelateType"){const Z=U==null?void 0:U.optionUrl;return(Z==null?void 0:Z.selectRelateType)||U[j.key]}if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="menuSelect"){const Z=U==null?void 0:U.optionUrl;return(Z==null?void 0:Z.menuSelect)||U[j.key]}if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="groupSelect"){const Z=U==null?void 0:U.optionUrl;return(Z==null?void 0:Z.groupSelect)||U[j.key]}if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="originalContent")return(U==null?void 0:U.value)||U[j.key];if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="multiple"){const Z=U[j.key];return sc(Z)?Z:j.default}return(j==null?void 0:j.label)==="类型"&&U[j.key]===""?"Input":(j==null?void 0:j.key)==="isFormColHidden"&&!U[j.key]?!1:U[j.key]},A=async j=>{var ee,ge,Ie,ue,B,oe;i.value=!0;let U=[];const Z=await((Ie=(ge=(ee=le.FormContent)==null?void 0:ee.find(q=>(q==null?void 0:q.key)===((j==null?void 0:j.type)===""?"Input":j==null?void 0:j.type)))==null?void 0:ge.value)==null?void 0:Ie.value)??((B=(ue=le.FormContent)==null?void 0:ue.find(q=>(q==null?void 0:q.key)===((j==null?void 0:j.type)===""?"Input":j==null?void 0:j.type)))==null?void 0:B.value);if(Z==null||Z.forEach(q=>{d.value++,U.push({label:q==null?void 0:q.label,name:q==null?void 0:q.label,type:q.type,prop:q==null?void 0:q.prop,value:J(q,j),id:d.value,contents:q==null?void 0:q.options,width:(j==null?void 0:j.width)??1})}),j!=null&&j.menuSelect&&((oe=j==null?void 0:j.menuSelect)==null?void 0:oe.length)>0){const q=await le.menuToContentType(j==null?void 0:j.menuSelect);U=U==null?void 0:U.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=q),ye))}g.value=j==null?void 0:j.id,o.value=await le.selectToBase(le.formToOptionsContents(U)),f.value=await le.selectToBase(le.formToOptionsContents(U))},F=j=>{var Z;c.value=!0;let U=[];(Z=le.FormButton)==null||Z.forEach(ee=>{d.value++,U.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:(ee==null?void 0:ee.label)==="类型"&&j[ee.key]===""?"normal":j[ee.key],id:d.value,contents:ee==null?void 0:ee.options})}),N.value=U,_.value=U,g.value=j==null?void 0:j.id};e.watch(()=>w.value,()=>{var U,Z;let j=M.cloneDeep(n.originalItemContents);(U=M.cloneDeep(n.originalItemContents))!=null&&U.find(ee=>(ee==null?void 0:ee.key)==="enableWrap")?j=(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ee=>((ee==null?void 0:ee.key)==="enableWrap"&&(ee.contents=!w.value),ee)):j.push({key:"enableWrap",contents:!w.value}),r("change",j)},{deep:!0});const L=()=>{var Z,ee,ge,Ie,ue;N.value=_.value;let j={};if(g.value!==""?j.id=g.value:(d.value++,j.id="id"+d.value),(Z=N.value)==null||Z.forEach(B=>{var q;const oe=(q=le.FormButton)==null?void 0:q.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));oe&&(j[oe.key]=B.value)}),(ee=u.value)!=null&&ee.find(B=>B.id===j.id))u.value=(ge=u.value)==null?void 0:ge.map(B=>(B.id===j.id&&(B=j),B));else{let B=M.cloneDeep(u.value);u.value||(u.value=[]),B.push(j),u.value=B}c.value=!1,g.value="";let U=M.cloneDeep(n.originalItemContents);(Ie=M.cloneDeep(n.originalItemContents))!=null&&Ie.find(B=>(B==null?void 0:B.key)==="formButton")?U=(ue=M.cloneDeep(n.originalItemContents))==null?void 0:ue.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=u.value),B)):U.push({key:"formButton",contents:u.value}),r("change",U)},E=j=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var U,Z;m.value=(U=M.cloneDeep(m.value))==null?void 0:U.filter(ee=>(ee==null?void 0:ee.id)!==(j==null?void 0:j.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=j=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var U,Z;u.value=(U=M.cloneDeep(u.value))==null?void 0:U.filter(ee=>(ee==null?void 0:ee.id)!==(j==null?void 0:j.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ee=>((ee==null?void 0:ee.key)==="formButton"&&(ee.contents=u.value),ee))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var U;c.value=!0;let j=[];(U=le.FormButton)==null||U.forEach(Z=>{d.value++,j.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})}),N.value=j,_.value=j},y=()=>{var U,Z,ee;i.value=!0;let j=[];(ee=(Z=(U=le.FormContent)==null?void 0:U.find(ge=>(ge==null?void 0:ge.key)==="Input"))==null?void 0:Z.value)==null||ee.forEach(ge=>{d.value++,j.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,value:(ge==null?void 0:ge.label)==="类型"?"Input":"",id:d.value,contents:ge==null?void 0:ge.options})}),o.value=j,f.value=j},x=j=>{let U=M.cloneDeep(_.value);U=U==null?void 0:U.map(Z=>(Z.value=j==null?void 0:j[Z.name],Z)),_.value=U},O=j=>{const U=j.find(ge=>(ge==null?void 0:ge.name)==="类型");if((U==null?void 0:U.value)!="Select")return;const Z=j.find(ge=>(ge==null?void 0:ge.name)==="多选"),ee=j.find(ge=>(ge==null?void 0:ge.name)==="初始值");Z!=null&&Z.value&&Do.isString(ee.value)&&(ee.value=[ee.value]),!(Z!=null&&Z.value)&&!Do.isString(ee.value)&&(ee.value="")},I=async j=>{var U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae;if((j==null?void 0:j.类型)!==((Z=(U=f.value)==null?void 0:U.find(Qe=>(Qe==null?void 0:Qe.label)==="类型"))==null?void 0:Z.value)){let Qe=[];const Ea=await((Ie=(ge=(ee=le.FormContent)==null?void 0:ee.find(ne=>(ne==null?void 0:ne.key)===((j==null?void 0:j.类型)===""?"Input":j==null?void 0:j.类型)))==null?void 0:ge.value)==null?void 0:Ie.value)?await((ye=(q=(oe=le.FormContent)==null?void 0:oe.find(ne=>(ne==null?void 0:ne.key)===((j==null?void 0:j.类型)===""?"Input":j==null?void 0:j.类型)))==null?void 0:q.value)==null?void 0:ye.value):(B=(ue=le.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((j==null?void 0:j.类型)===""?"Input":j==null?void 0:j.类型)))==null?void 0:B.value;if(Ea==null||Ea.forEach(ne=>{var Pe,Re;d.value++;const ua=Qu(ne==null?void 0:ne.default)?(j==null?void 0:j[ne.label])??ne.value??"":ne==null?void 0:ne.default;Qe.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:ua,prop:ne==null?void 0:ne.prop,id:d.value,contents:ne==null?void 0:ne.options,width:((Re=(Pe=f.value)==null?void 0:Pe[0])==null?void 0:Re.width)??1})}),j!=null&&j.菜单选项&&((Ke=j==null?void 0:j.菜单选项)==null?void 0:Ke.length)>0){const ne=await le.menuToContentType(j==null?void 0:j.菜单选项);Qe=Qe==null?void 0:Qe.map(ua=>((ua==null?void 0:ua.name)==="组信息选项"&&(ua.contents=ne),ua))}O(Qe),f.value=await le.selectToBase(M.cloneDeep(Qe)),o.value=await le.selectToBase(M.cloneDeep(Qe))}else{let Qe=M.cloneDeep(f.value);if(Qe=Qe==null?void 0:Qe.map(Ea=>(Ea.value=j==null?void 0:j[Ea.name],Ea)),j!=null&&j.菜单选项&&((Ae=j==null?void 0:j.菜单选项)==null?void 0:Ae.length)>0){const Ea=await le.menuToContentType(j==null?void 0:j.菜单选项);Qe=Qe==null?void 0:Qe.map(ne=>((ne==null?void 0:ne.name)==="组信息选项"&&(ne.contents=Ea),ne))}Qe=le.formToOptionsContents(Qe),O(Qe),f.value=await le.selectToBase(M.cloneDeep(Qe))}},W=j=>{j||(o.value=f.value)},Y=async j=>{await I(j),o.value=f.value},fe=Fl.debounce(async()=>{var ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea;o.value=f.value;let j={};j.width=((ge=(ee=o.value)==null?void 0:ee[0])==null?void 0:ge.width)??1,g.value!==""?j.id=g.value:(d.value++,j.id="id"+d.value);let U=await((B=(ue=(Ie=le.FormContent)==null?void 0:Ie.find(ne=>{var ua,Pe;return(ne==null?void 0:ne.key)===(((Pe=(ua=o.value)==null?void 0:ua.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:ue.value)==null?void 0:B.value)??((q=(oe=le.FormContent)==null?void 0:oe.find(ne=>{var ua,Pe;return(ne==null?void 0:ne.key)===(((Pe=(ua=o.value)==null?void 0:ua.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:q.value);if((ye=o.value)==null||ye.forEach(ne=>{const ua=U==null?void 0:U.find(Pe=>(Pe==null?void 0:Pe.label)===(ne==null?void 0:ne.label));ua&&(j[ua.key]=ne.value)}),j.width=j.width?j.width:1,j.key=j==null?void 0:j.label,j.isFormColHidden=j==null?void 0:j.isFormColHidden,(Ke=m.value)!=null&&Ke.find(ne=>ne.id===j.id))m.value=(Ae=m.value)==null?void 0:Ae.map(ne=>(ne.id===j.id&&(ne=j),ne));else{let ne=M.cloneDeep(m.value);ne.push(j),m.value=ne}m.value=m.value.map(({id:ne,...ua})=>ua),i.value=!1,g.value="";let Z=M.cloneDeep(n.originalItemContents);(Qe=M.cloneDeep(n.originalItemContents))!=null&&Qe.find(ne=>(ne==null?void 0:ne.key)==="formContent")?Z=(Ea=M.cloneDeep(n.originalItemContents))==null?void 0:Ea.map(ne=>((ne==null?void 0:ne.key)==="formContent"&&(ne.contents=m.value),ne)):Z.push({key:"formContent",contents:m.value}),r("change",Z)},300),de=()=>{i.value=!1,c.value=!1,g.value="",f.value=[],_.value=[]};return e.watch(()=>n.originalItemContents,()=>{var U,Z,ee,ge,Ie,ue;if(!n.originalItemContents||n.originalItemContents.length===0)return;const j=M.cloneDeep(n.originalItemContents);m.value=((U=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:U.contents)??[],u.value=((Z=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:Z.contents)??[],w.value=(ee=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&ee.contents?!((ge=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&ge.contents):!0,m.value=(Ie=M.cloneDeep(m.value))==null?void 0:Ie.map((B,oe)=>{var ye;let q=B;return q.id=(B==null?void 0:B.id)??oe,B!=null&&B.label||(B.label=(B==null?void 0:B.key)??(B==null?void 0:B.label)??""),B!=null&&B.type||(B.type=(B==null?void 0:B.type)??""),B.contents=((ye=B==null?void 0:B.options)==null?void 0:ye.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,q}),m.value=le.formToOptionsContents(m.value),u.value=(ue=u.value)==null?void 0:ue.map((B,oe)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",background:(B==null?void 0:B.background)??"var(--ssComponent-primary-color)",id:oe})},{deep:!0,immediate:!0}),(j,U)=>{const Z=e.resolveComponent("svg-icon"),ee=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",a4,[e.createElementVNode("div",l4,[e.createElementVNode("div",r4,[U[2]||(U[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ee,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",n4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(ge,Ie)=>(e.openBlock(),e.createElementBlock("div",{key:Ie},[e.createElementVNode("div",i4,[e.createElementVNode("div",null,e.toDisplayString(ge.label),1),e.createElementVNode("div",o4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>A(ge)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>E(ge)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",t4,[U[4]||(U[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ee,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[3]||(U[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",s4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(ge,Ie)=>(e.openBlock(),e.createElementBlock("div",{key:Ie},[e.createElementVNode("div",c4,[e.createElementVNode("div",null,e.toDisplayString(ge.label),1),e.createElementVNode("div",u4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>F(ge)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>S(ge)},null,8,["onClick"])])])]))),128))]),U[6]||(U[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",d4,[U[5]||(U[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(pl._sfc_main$1,{modelValue:w.value,"onUpdate:modelValue":U[0]||(U[0]=ge=>w.value=ge)},null,8,["modelValue"])])]),e.createVNode(Ir.ssDialog,{visible:i.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",p4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:I,onChangeVisible:W,onBlurChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",f4,[e.createVNode(ee,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>U[7]||(U[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ee,{class:"ok-button button",onClick:e.unref(fe),id:"themeButton"},{default:e.withCtx(()=>U[8]||(U[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:c.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",h4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:de,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ms=nr._export_sfc(v4,[["__scopeId","data-v-20850524"]]),m4={class:"step-module content"},y4={class:"module-data"},g4={class:"step-module layout"},b4={class:"form-content"},k4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=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:""}]),f=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([]),w=A=>{var F;m.value=A,r("change",(F=_())==null?void 0:F.compData)},d=(A,F)=>{var L,E;switch(A){case"create":(L=o.value)==null||L.forEach(S=>{S.value=""}),u.value="create",c.visible=!0;break;case"update":(E=o.value)==null||E.forEach(S=>{S.value=F[S==null?void 0:S.prop]}),u.value="update",c.visible=!0;break;case"delete":g.value.splice(F,1),u.value="delete";break}},N=A=>{var F,L,E;if((A==null?void 0:A.buttonName)==="确认"){const S=M.cloneDeep(A==null?void 0:A.content);switch(Object.keys(S).forEach(k=>{S[k]===""&&delete S[k]}),u.value){case"create":g.value.push({...S,index:((F=g.value)==null?void 0:F.length)+1});break;case"update":g.value=(L=g.value)==null?void 0:L.map(k=>k.index===(S==null?void 0:S.index)?{...k,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:k);break}r("change",(E=_())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},_=()=>({comp:"Step",compData:[{key:"stepList",contents:g.value},{key:"stepConfig",contents:m.value}]}),J=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,A=>{var F,L;A&&(m.value=((F=A==null?void 0:A.find(E=>E.key==="stepConfig"))==null?void 0:F.contents)??{},g.value=((L=A==null?void 0:A.find(E=>E.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(A,F)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",m4,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",y4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[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:y=>d("update",{...S,index:k+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:y=>d("delete",k)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",g4,[F[5]||(F[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(pl.ssForm,{rowContents:i.value,onChange:w},null,8,["rowContents"])])]),e.createVNode(Ir.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:J,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",b4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:f.value,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),x4=nr._export_sfc(k4,[["__scopeId","data-v-7dbd17f2"]]),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 n=a,r=l,i=e.ref("create"),o=e.ref({}),f=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:"时间线"}),w=A=>{var F;o.value=A,r("change",(F=_())==null?void 0:F.compData)},d=(A,F)=>{var L,E;switch(A){case"create":(L=u.value)==null||L.forEach(S=>{S.value=""}),i.value="create",g.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=F[S==null?void 0:S.prop]}),i.value="update",g.visible=!0;break;case"delete":f.value.splice(F,1),i.value="delete";break}},N=A=>{var F,L,E,S;if((A==null?void 0:A.buttonName)==="确认"){const k=M.cloneDeep(A==null?void 0:A.content);switch(Object.keys(k).forEach(y=>{k[y]===""&&delete k[y]}),i.value){case"create":(L=f.value)==null||L.push({...k,index:((F=f.value)==null?void 0:F.length)+1});break;case"update":f.value=(E=f.value)==null?void 0:E.map(y=>y.index===(k==null?void 0:k.index)?{...y,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:y);break}r("change",(S=_())==null?void 0:S.compData),g.visible=!1}else g.visible=!1},_=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:f.value},{key:"timeLineConfig",contents:o.value}]}),J=()=>{g.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,A=>{var F,L;A&&(o.value=((F=A==null?void 0:A.find(E=>E.key==="timeLineConfig"))==null?void 0:F.contents)??{},f.value=((L=A==null?void 0:A.find(E=>E.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(A,F)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",w4,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(S,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[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:y=>d("update",{...S,index:k+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:y=>d("delete",k)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",S4,[F[5]||(F[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(pl.ssForm,{rowContents:c.value,onChange:w},null,8,["rowContents"])])]),e.createVNode(Ir.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:J,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",E4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),D4=nr._export_sfc(C4,[["__scopeId","data-v-39ffc861"]]),T4={};function B4(a,l){return e.openBlock(),e.createElementBlock("div")}const N4=nr._export_sfc(T4,[["render",B4]]),A4={class:"extra-content"},z4={key:0},M4={key:1},I4={class:"dialog-footer"},O4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),i=e.ref(),o=e.ref(),f=l,c=e.ref(!1),u=e.ref({}),m=e.ref({}),g=e.ref();e.watch(()=>[n.itemData],()=>{var S;const E=M.cloneDeep(n.itemData);i.value=(S=M.cloneDeep(E))==null?void 0:S.map(k=>{var y;if(k.key==="extra"){let x=[];(y=k.value)==null||y.forEach(O=>{var I;x.push((I=Object.values(O))==null?void 0:I[0])}),k.value=x}return k})},{deep:!0,immediate:!0});const w=(E,S,k,y)=>{var O;let x={};((O=E==null?void 0:E[0])==null?void 0:O.contents)==="详情"&&(c.value=!0,x[S]=E,o.value=E==null?void 0:E.filter(I=>(I==null?void 0:I.key)!=="tableContentName"),u.value=x,m.value=k,g.value=y.id)},d=E=>{var I,W,Y,fe;const S=(W=(I=Object.values(M.cloneDeep(u.value)))==null?void 0:I[0])==null?void 0:W.filter(de=>(de==null?void 0:de.key)==="tableContentName"),k=(fe=(Y=Object.values(M.cloneDeep(u.value)))==null?void 0:Y[0])==null?void 0:fe.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),y=k==null?void 0:k.map((de,j)=>{var U;return j===E.index&&(de==null?void 0:de.comp)==="Table"&&(de.compData=(U=de.compData)==null?void 0:U.map(Z=>{var ee,ge;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(ge=(ee=E.content)==null?void 0:ee.map(Ie=>{let ue={};for(let B in Ie)B!=="id"&&(ue[B]=Ie[B]);return ue}))==null?void 0:ge.map(Ie=>Object.values(Ie))),Z})),de});y.unshift(S==null?void 0:S[0]);let x=M.cloneDeep(u.value),O={};for(let de in x)O[de]=y;u.value=O},N=()=>{c.value=!1,u.value={},m.value={},g.value=void 0,r.value++},_=E=>{var I,W,Y,fe;const S=(W=(I=Object.values(M.cloneDeep(u.value)))==null?void 0:I[0])==null?void 0:W.filter(de=>(de==null?void 0:de.key)==="tableContentName"),k=(fe=(Y=Object.values(M.cloneDeep(u.value)))==null?void 0:Y[0])==null?void 0:fe.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),y=k==null?void 0:k.map((de,j)=>(j===E.index&&(de.compData=E.contents),de));y.unshift(S==null?void 0:S[0]);let x=M.cloneDeep(u.value),O={};for(let de in x)O[de]=y;u.value=O},J=()=>{var S,k;let E={};for(let y in m.value)y===((S=Object.keys(u.value))==null?void 0:S[0])?E[y]=(k=Object.values(u.value))==null?void 0:k[0]:E[y]=m.value[y];f("change",{buttonName:"编辑",index:g.value,singleContent:E},"methodData"),c.value=!1,u.value={},m.value={},g.value=void 0},A=()=>{c.value=!1,u.value={},m.value={},g.value=void 0},F=E=>{f("change",E,"methodData")},L=E=>Ri(E);return(E,S)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",A4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(y,x)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(y==null?void 0:y.key)==="extra"?(e.openBlock(),e.createElementBlock("div",z4)):(e.openBlock(),e.createElementBlock("div",M4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(y.comp)),{itemData:y==null?void 0:y.compData,childItemData:y==null?void 0:y.itemChildData,key:x,index:(y==null?void 0:y.id)??x,onContentClick:w,onChange:F},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Ir.ssDialog,{visible:c.value,onBeforeDestroy:A},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(y,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(y.comp)),{itemData:y==null?void 0:y.compData,onChange:d,childItemData:y==null?void 0:y.itemChildData,key:x,onContentChange:_,index:(y==null?void 0:y.id)??x,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",I4,[e.createVNode(k,{class:"cancel-button footer-button",onClick:N,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:J,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},L4=nr._export_sfc(O4,[["__scopeId","data-v-2d9c5ab2"]]),R4={key:0,class:"method-content"},$4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=le.useOriginalState(M.pinia),{originalPath:r}=M.storeToRefs(n),i=a,o=e.ref(!1),f=e.ref(),c=le.useTableComp(M.pinia),{multipleTableConst:u}=M.storeToRefs(c),m=M.useModelComp(M.pinia),g=e.ref(!1),w=M.useMenuState(M.pinia),d=M.useLoginState(M.pinia),{itemData:N,isEdit:_,routeToChildPath:J,tableViewContents:A,lockingPage:F,payloadTypes:L}=M.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:k}=M.storeToRefs(w),{loginUserInfo:y}=M.storeToRefs(d),x=e.ref(!1),O=async()=>{var ue,B;(ue=l.value)!=null&&ue.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")&&await Z((B=l.value)==null?void 0:B.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")),await le.onSaveBack()};e.watch(()=>N.value,async()=>{_.value==="view"&&!x.value&&await Ie(M.cloneDeep(i.itemData)),x.value=!1},{deep:!0});const I=()=>{o.value=!1,f.value=void 0},W=ue=>ue.map(B=>{const oe={};for(const q in B){const ye=B[q];if(q.includes(u.value)){const Ke=q.split(u.value);let Ae=oe;Ke.forEach((Qe,Ea)=>{Ea===Ke.length-1?Ae[Qe]=ye:(Ae[Qe]||(Ae[Qe]={}),Ae=Ae[Qe])})}else oe[q]=ye}return oe}),Y=async(ue,B,oe=[])=>{var ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a;let q=(ye=M.cloneDeep(B))==null?void 0:ye.filter(H=>(H==null?void 0:H.comp)!=="methodButton");if(ue!=null&&ue.includes("[")){let H=(ne=(Ea=(Qe=(Ae=(Ke=M.cloneDeep(ue))==null?void 0:Ke.split("["))==null?void 0:Ae[1])==null?void 0:Qe.split("]"))==null?void 0:Ea[0])==null?void 0:ne.split(":"),V="";if(H!=null&&H[0]){let ae=(ua=q==null?void 0:q.find(pe=>(pe==null?void 0:pe.name)===(H==null?void 0:H[0])))==null?void 0:ua.compData;if(!ae){let pe=(Pe=ue==null?void 0:ue.split("["))==null?void 0:Pe[0],ve=await le.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,"","",oe);ae=(Re=ve==null?void 0:ve.find(da=>(da==null?void 0:da.name)===(H==null?void 0:H[0])))==null?void 0:Re.compData}ae==null||ae.forEach(pe=>{var ve,da,ca,Ue,Sa,Ma;if((pe==null?void 0:pe.key)==="formContent")(ve=pe==null?void 0:pe.contents)==null||ve.forEach(Te=>{var Fa;(Te==null?void 0:Te.key)===(H==null?void 0:H[1])&&(Array.isArray(Te==null?void 0:Te.value)?V=Te==null?void 0:Te.value:V=(Fa=Te==null?void 0:Te.value)==null?void 0:Fa.toString())});else if((pe==null?void 0:pe.key)==="tableContents"){let Te=[],Fa=(da=ae==null?void 0:ae.find(oa=>(oa==null?void 0:oa.key)==="header"))==null?void 0:da.contents,Na=(H==null?void 0:H[1])??"";if(Fa!=null&&Fa.every(oa=>Array.isArray(oa))){let oa=le.getColumnChild((Sa=Fa==null?void 0:Fa[0])==null?void 0:Sa.filter(ja=>(ja==null?void 0:ja.label)!=="操作"));(Ma=pe.contents)==null||Ma.forEach(ja=>{let aa={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),oa==null||oa.forEach((je,pa)=>{let te=ja[pa];typeof ja[pa]=="number"&&(te=ja[pa].toString()),(Na===""||Na===je.prop)&&(aa[je.prop]=te)}),Te.push(aa)}),Te=W(Te)}else{let oa=(ca=Fa==null?void 0:Fa.map(ja=>ja==null?void 0:ja.label))==null?void 0:ca.filter(ja=>ja!=="操作");(Ue=pe.contents)==null||Ue.forEach(ja=>{let aa={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),oa==null||oa.forEach((je,pa)=>{let te=ja[pa];typeof ja[pa]=="number"&&(te=ja[pa].toString()),(Na===""||Na===je)&&(aa[je]=te)}),Te.push(aa)})}V=Te}})}return V}else if(ue!=null&&ue.includes("/")){let H={};return(Le=M.cloneDeep(q))==null||Le.forEach((V,ae)=>{var pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we;if((V==null?void 0:V.comp)==="Table"){let fa=Array.isArray((da=(ve=(pe=V==null?void 0:V.compData)==null?void 0:pe.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:ve.contents)==null?void 0:da[0])?(Ma=(Sa=(Ue=(ca=V==null?void 0:V.compData)==null?void 0:ca.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:Ue.contents)==null?void 0:Sa[0])==null?void 0:Ma.some(Me=>Me==null?void 0:Me.children):[],ea=(Na=(Fa=(Te=V==null?void 0:V.compData)==null?void 0:Te.find(Me=>(Me==null?void 0:Me.key)==="tableContents"))==null?void 0:Fa.contents)==null?void 0:Na.map(Me=>(Me!=null&&Me.find(Fe=>Fe==null?void 0:Fe.id)&&(Me=Me.slice(1)),Me)),Ta=(pa=(je=(aa=(ja=(oa=V==null?void 0:V.compData)==null?void 0:oa.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:ja.contents)==null?void 0:aa[0])==null?void 0:je[0])==null?void 0:pa.label,Ee=(ce=(te=V==null?void 0:V.compData)==null?void 0:te.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:ce.contents;if(fa)(fa==null?void 0:fa.length)===0?H[V.name]=H!=null&&H[V.name]?H[V.name]:le.tableToForm(ea,Ee):H[Ta]=le.tableToForm(ea,Ee);else{const Me=[];Ee=Ee.slice(1,Ee.length-1),Ee==null||Ee.forEach((Fe,$e)=>{ea==null||ea.forEach(he=>{Me.push({key:Fe.label+he[0],value:he[$e+1]})})}),H["form"+ae]=Me}}else{const fa=(we=(Se=V.compData)==null?void 0:Se.find(Ta=>(Ta==null?void 0:Ta.key)==="formContent"))==null?void 0:we.contents;H!=null&&H.form||(H.form=[]);const ea=[];fa==null||fa.forEach(Ta=>{Ta.key!==""&&(Ta={key:(Ta==null?void 0:Ta.key)??(Ta==null?void 0:Ta.label),value:Ta==null?void 0:Ta.value},ea.push(Ta))}),H.form=[...ea,...M.cloneDeep(H==null?void 0:H.form)]}}),H}else{if(ue==="createInsofDataApi"){let H=(se=M.cloneDeep(B))==null?void 0:se[0];return H={comp:(me=M.cloneDeep(H))==null?void 0:me.comp,compData:(qe=M.cloneDeep(H))==null?void 0:qe.compData,name:(ka=M.cloneDeep(H))==null?void 0:ka.name,isShow:(_a=M.cloneDeep(H))==null?void 0:_a.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:H}}}return ue}},fe=async(ue,B,oe)=>{var Ke,Ae,Qe;let q=await le.getItemData(B,sessionStorage.getItem("systemKey"),""),ye=q==null?void 0:q.find(Ea=>(Ea==null?void 0:Ea.name)===(oe==null?void 0:oe[0]));if(ye){if((ye==null?void 0:ye.comp)==="Table"){let Ea={};for(let me in M.cloneDeep(ue))M.cloneDeep(ue)[me]!=="loginUser"?Ea[me]=M.cloneDeep(ue)[me]:Ea[me]=((Ke=y.value)==null?void 0:Ke.account)||((Ae=y.value)==null?void 0:Ae.账号);let ne=[],ua=Ea;Array.isArray(ue)||(ua=[Ea]),ua==null||ua.forEach(me=>{ne.push({[me[oe[1]]]:me})});let Pe=[],Re=ne==null?void 0:ne.map(me=>{var qe;return(qe=Object.keys(me))==null?void 0:qe[0]});q==null||q.forEach(me=>{var qe;(me==null?void 0:me.name)===(oe==null?void 0:oe[0])&&((qe=me==null?void 0:me.compData)==null||qe.forEach(ka=>{var _a;(ka==null?void 0:ka.key)==="tableContents"&&((_a=ka==null?void 0:ka.contents)==null||_a.forEach(H=>{H!=null&&H.some(V=>Re.includes(V))&&Pe.push({[H.find(V=>V.id).id]:H.find(V=>Re.includes(V))})}))}))});let Le=Pe==null?void 0:Pe.map(me=>{var qe;return(qe=Object.keys(me))==null?void 0:qe[0]}),se=[];if(Le==null||Le.forEach(me=>{var _a;let qe=(_a=Pe==null?void 0:Pe.find(H=>{var V;return((V=Object.keys(H))==null?void 0:V[0].toString())===me.toString()}))==null?void 0:_a[me],ka=ne==null?void 0:ne.find(H=>{var V;return((V=Object.keys(H))==null?void 0:V[0])===qe});se.push({id:parseInt(me),value:{tableData:ka[qe]}})}),(se==null?void 0:se.length)>0)return se}else if((ye==null?void 0:ye.comp)==="Form"){let Ea=M.cloneDeep(ye);Ea.compData=(Qe=Ea.compData)==null?void 0:Qe.map(Pe=>{var Re;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(Re=Pe.contents)==null?void 0:Re.map(Le=>((Le==null?void 0:Le.key)===(oe==null?void 0:oe[1])&&(Le.value=(ue==null?void 0:ue[Le==null?void 0:Le.prop])||ue),Le))),Pe});let ne={};for(let Pe in Ea)Pe!=="id"&&(ne[Pe]=Ea[Pe]);let ua=[];if(ua.push({id:ye==null?void 0:ye.id,keyType:oe==null?void 0:oe[1],value:{pageData:ne}}),(ua==null?void 0:ua.length)>0)return ua}}},de=async(ue,B,oe)=>{var Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se;let q=await le.getItemData(B,sessionStorage.getItem("systemKey"),""),ye=q==null?void 0:q.find(me=>(me==null?void 0:me.name)===(oe==null?void 0:oe[0]));if(ye){if((ye==null?void 0:ye.comp)==="Table"){let me={};for(let qe in M.cloneDeep(ue))M.cloneDeep(ue)[qe]!=="loginUser"?me[qe]=M.cloneDeep(ue)[qe]:me[qe]=((Ke=y.value)==null?void 0:Ke.account)||((Ae=y.value)==null?void 0:Ae.账号);await qr.createInsofDataApi({key:{type:"data",pageKey:B,tableId:ye==null?void 0:ye.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:me}})}else if((ye==null?void 0:ye.comp)==="Form"){let me=M.cloneDeep(ye),qe=Object.keys(ue),ka="";(Ea=(Qe=M.cloneDeep(me))==null?void 0:Qe.compData)==null||Ea.forEach(ve=>{var da,ca;(ve==null?void 0:ve.key)==="formContent"&&((ca=(da=M.cloneDeep(ve))==null?void 0:da.contents)==null||ca.forEach(Ue=>{var Sa;qe.includes(Ue==null?void 0:Ue.key)&&(Ue==null?void 0:Ue.value)===((Sa=y.value)==null?void 0:Sa.姓名)&&(ka=Ue==null?void 0:Ue.key)}))});let _a=[];(ne=Object.values(ue[ka]))==null||ne.forEach(ve=>{ve!=null&&ve.includes("(")&&_a.push(ve)}),_a=[...new Set(_a)];const H=_a==null?void 0:_a.map(async ve=>{var Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se;let da="";(ja=(oa=(Na=(Fa=(Te=(Ma=M.cloneDeep(ve))==null?void 0:Ma.split("("))==null?void 0:Te[1])==null?void 0:Fa.split(")"))==null?void 0:Na[0])==null?void 0:oa.split(":"))==null||ja.forEach(we=>{da=da===""?da+we.replaceAll("'",""):da+"/"+we.replaceAll("'","")});let ca=[];(Se=(ce=(te=(pa=(je=(aa=M.cloneDeep(ve))==null?void 0:aa.split("<"))==null?void 0:je[1])==null?void 0:pa.split(">"))==null?void 0:te[0])==null?void 0:ce.split(":"))==null||Se.forEach(we=>{ca.push(we.replaceAll("'",""))});const Ue=await le.getItemData(da,sessionStorage.getItem("systemKey"),"");let Sa="";return Ue==null||Ue.forEach(we=>{var fa;we.name===(ca==null?void 0:ca[0])&&((fa=we==null?void 0:we.compData)==null||fa.forEach(ea=>{var Ta;(ea==null?void 0:ea.key)==="formContent"&&((Ta=ea.contents)==null||Ta.forEach(Ee=>{(Ee==null?void 0:Ee.key)===(ca==null?void 0:ca[1])&&(Sa=Ee==null?void 0:Ee.value)}))}))}),{[ve]:Sa}}),V=await Promise.all(H);me.compData=(Pe=(ua=M.cloneDeep(me))==null?void 0:ua.compData)==null?void 0:Pe.map(ve=>{var da,ca;return(ve==null?void 0:ve.key)==="formContent"&&(ve.contents=(ca=(da=M.cloneDeep(ve))==null?void 0:da.contents)==null?void 0:ca.map(Ue=>{var Sa,Ma,Te,Fa;return(Sa=ue[ka])!=null&&Sa[Ue==null?void 0:Ue.key]&&(ue[ka][Ue==null?void 0:Ue.key].includes("(")?Ue.value=(Ma=V==null?void 0:V.find(Na=>{var oa;return((oa=Object.keys(Na))==null?void 0:oa[0])===ue[ka][Ue==null?void 0:Ue.key]}))==null?void 0:Ma[ue[ka][Ue==null?void 0:Ue.key]]:Ue.value=(Fa=(Te=M.cloneDeep(ue))==null?void 0:Te[ka])==null?void 0:Fa[Ue==null?void 0:Ue.key]),Ue})),ve});const ae=await qr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let pe="";((Re=ae==null?void 0:ae.data)==null?void 0:Re.type)==="success"&&((se=(Le=ae==null?void 0:ae.data)==null?void 0:Le.result)==null||se.forEach(ve=>{var da,ca;((ca=(da=ve==null?void 0:ve.value)==null?void 0:da.pageData)==null?void 0:ca.name)===(oe==null?void 0:oe[0])&&(pe=ve.id)}),await qr.updateInsofDataApi({id:pe,value:{pageData:me}}))}}},j=(ue,B="",oe={})=>{for(const[q,ye]of Object.entries(ue)){const Ke=B?`${B}.${q}`:q;ye!==null&&typeof ye=="object"&&!Array.isArray(ye)&&Object.prototype.toString.call(ye)!=="[object Date]"?j(ye,Ke,oe):oe[Ke]=ye}return oe},U=async(ue,B,oe,q)=>{var Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa;let ye=await le.getItemData(B,sessionStorage.getItem("systemKey"),""),Ke=ye==null?void 0:ye.find(Na=>(Na==null?void 0:Na.name)===(oe==null?void 0:oe[0]));if(Ke){if(!(oe!=null&&oe[1])&&(Ke==null?void 0:Ke.comp)==="Table"){let Na={},oa=[],ja=(Qe=(Ae=Ke==null?void 0:Ke.compData)==null?void 0:Ae.find(pa=>(pa==null?void 0:pa.key)==="header"))==null?void 0:Qe.contents;ja!=null&&ja.every(pa=>Array.isArray(pa))?oa=(ne=le.getColumnChild((Ea=ja==null?void 0:ja[0])==null?void 0:Ea.filter(pa=>(pa==null?void 0:pa.label)!=="操作")))==null?void 0:ne.map(pa=>pa==null?void 0:pa.prop):oa=ja==null?void 0:ja.map(pa=>pa==null?void 0:pa.label);for(let pa in M.cloneDeep(ue))if(M.cloneDeep(ue)[pa]!=="loginUser"){let te=j(M.cloneDeep(ue)[pa]),ce={};for(let Se in te)if(oa!=null&&oa.find(we=>we===Se))ce[Se]=te[Se];else if(oa!=null&&oa.find(we=>(we==null?void 0:we.toUpperCase())===(Se==null?void 0:Se.toUpperCase()))){let we=oa==null?void 0:oa.find(fa=>(fa==null?void 0:fa.toUpperCase())===(Se==null?void 0:Se.toUpperCase()));ce[we]=te[Se]}Na[pa]=ce}else Na[pa]=((ua=y.value)==null?void 0:ua.account)||((Pe=y.value)==null?void 0:Pe.账号);let aa=await qr.getInsofDataApi({keyLikes:{tableId:Ke==null?void 0:Ke.id}});if(((Le=(Re=aa==null?void 0:aa.data)==null?void 0:Re.result)==null?void 0:Le.length)>0){let pa=(me=(se=aa==null?void 0:aa.data)==null?void 0:se.result)==null?void 0:me.map(te=>te==null?void 0:te.id);(pa==null?void 0:pa.length)>0&&await qr.batchDeleteInsofDataApi({ids:pa})}let je=[];if((qe=Ke==null?void 0:Ke.compData)!=null&&qe.find(pa=>(pa==null?void 0:pa.key)==="pageColumn")&&((H=(_a=(ka=Ke==null?void 0:Ke.compData)==null?void 0:ka.find(pa=>(pa==null?void 0:pa.key)==="pageColumn"))==null?void 0:_a.contents)!=null&&H.includes("["))){const pa=await qr.getInsofDataApi({id:Ke==null?void 0:Ke.tableId});let te=((ve=(pe=(ae=(V=pa==null?void 0:pa.data)==null?void 0:V.result)==null?void 0:ae[0])==null?void 0:pe.key)==null?void 0:ve.pageKey)??"";(da=Object.values(Na))==null||da.forEach(ce=>{je.push({key:{type:"data",pageKey:te,tableId:Ke==null?void 0:Ke.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ce}})})}else(ca=Object.values(Na))==null||ca.forEach(pa=>{je.push({key:{type:"data",pageKey:B,tableId:Ke==null?void 0:Ke.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pa}})});(je==null?void 0:je.length)>0&&await qr.batchAddInsofDataApi({dataList:je})}else if(!(oe!=null&&oe[1])&&(Ke==null?void 0:Ke.comp)==="Form"){let Na=M.cloneDeep(Ke);Na.compData=(Sa=(Ue=M.cloneDeep(Na))==null?void 0:Ue.compData)==null?void 0:Sa.map(aa=>{var je,pa;return(aa==null?void 0:aa.key)==="formContent"&&(aa.contents=(pa=(je=M.cloneDeep(aa))==null?void 0:je.contents)==null?void 0:pa.map(te=>{var ce,Se;return(ce=M.cloneDeep(ue))!=null&&ce[te==null?void 0:te.key]&&(te.value=(Se=M.cloneDeep(ue))==null?void 0:Se[te==null?void 0:te.key]),te})),aa});const oa=await qr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let ja="";((Ma=oa==null?void 0:oa.data)==null?void 0:Ma.type)==="success"&&((Fa=(Te=oa==null?void 0:oa.data)==null?void 0:Te.result)==null||Fa.forEach(aa=>{var je,pa;((pa=(je=aa==null?void 0:aa.value)==null?void 0:je.pageData)==null?void 0:pa.name)===(oe==null?void 0:oe[0])&&(ja=aa.id)}),await qr.updateInsofDataApi({id:ja,value:{pageData:Na}}))}}},Z=async ue=>{var B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se;w.setImportLoading(!0);try{if(ue.api){let me=new WeakMap,qe=await le.getItemData((k==null?void 0:k.value)===""?E.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",me),ka="";if(qe=qe==null?void 0:qe.map(ca=>{var Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te;if((ca==null?void 0:ca.comp)==="Form")ca.compData=(Ue=ca.compData)==null?void 0:Ue.map(ce=>{var Se;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(Se=ce.contents)==null?void 0:Se.map(we=>{var fa;if((we==null?void 0:we.value)===""&&(we==null?void 0:we.type)==="Select"){let ea=le.judgeContents((fa=M.cloneDeep(we))==null?void 0:fa.optionUrl,me);we.value=we.value||ea}return we})),ce});else if((ca==null?void 0:ca.comp)==="Table"&&(Sa=ca.compData)!=null&&Sa.find(ce=>(ce==null?void 0:ce.key)==="pageColumn")){let ce=(Te=(Ma=ca.compData)==null?void 0:Ma.find(ea=>(ea==null?void 0:ea.key)==="pageColumn"))==null?void 0:Te.contents,Se=((Na=(Fa=ca.compData)==null?void 0:Fa.find(ea=>(ea==null?void 0:ea.key)==="pageGroup"))==null?void 0:Na.contents)??"",we=(aa=(ja=(oa=ce==null?void 0:ce.split("["))==null?void 0:oa[1])==null?void 0:ja.split("]"))==null?void 0:aa[0];ka=((je=ce==null?void 0:ce.split("["))==null?void 0:je[0])+((te=(pa=A.value)==null?void 0:pa.find(ea=>(ea==null?void 0:ea.key)===we))==null?void 0:te.value)}return ca}),!(ka===""||ka==="")){const ca=await le.getItemData(ka,sessionStorage.getItem("systemKey"),"",!1,"","",me);qe=qe==null?void 0:qe.map(Ue=>{var Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se;if((Ue==null?void 0:Ue.comp)==="Table"&&(Sa=Ue.compData)!=null&&Sa.find(we=>(we==null?void 0:we.key)==="pageColumn")){let we=(Te=(Ma=Ue.compData)==null?void 0:Ma.find(Me=>(Me==null?void 0:Me.key)==="pageColumn"))==null?void 0:Te.contents,fa=((Na=(Fa=Ue.compData)==null?void 0:Fa.find(Me=>(Me==null?void 0:Me.key)==="pageGroup"))==null?void 0:Na.contents)??"",ea=(aa=(ja=(oa=we==null?void 0:we.split("["))==null?void 0:oa[1])==null?void 0:ja.split("]"))==null?void 0:aa[0],Ta=((je=we==null?void 0:we.split("["))==null?void 0:je[0])+((te=(pa=A.value)==null?void 0:pa.find(Me=>(Me==null?void 0:Me.key)===ea))==null?void 0:te.value),Ee=(ce=ca==null?void 0:ca.find(Me=>(Me==null?void 0:Me.name)===(fa===""?i==null?void 0:i.compName:fa)))==null?void 0:ce.compData;Ue.compData=(Se=Ue.compData)==null?void 0:Se.map(Me=>{var Fe;return(Me==null?void 0:Me.key)==="tableContents"&&(Me.contents=(Fe=Ee==null?void 0:Ee.find($e=>($e==null?void 0:$e.key)==="tableContents"))==null?void 0:Fe.contents),Me})}return Ue})}let _a={};if(((oe=(B=ue==null?void 0:ue.extraValues)==null?void 0:B.input)==null?void 0:oe.length)>0){const ca=(ye=(q=ue==null?void 0:ue.extraValues)==null?void 0:q.input)==null?void 0:ye.map(async Ue=>{var Sa;ee!=null&&ee.find(Ma=>Ma===Ue)?_a=await Y(Ue,qe):_a[Object.keys(Ue)[0]]=await Y((Sa=Object.values(Ue))==null?void 0:Sa[0],qe,me)});await Promise.all(ca)}else _a=await Y("/",qe);let H=!1;(Ae=(Ke=ue==null?void 0:ue.extraValues)==null?void 0:Ke.output)==null||Ae.forEach(ca=>{var Ue,Sa;(Sa=(Ue=Object.values(ca))==null?void 0:Ue[0])!=null&&Sa.includes(".doc")&&(H=!0)});let V;if(H){const ca=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});V=await Ja.axios.post(ue.api,_a,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ca.close()})}else V=await Ja.axios.post(ue.api,_a,{headers:{"Content-Type":"application/json"}});let ae=(ua=(ne=(Ea=(Qe=M.cloneDeep(ue))==null?void 0:Qe.extraValues)==null?void 0:Ea.output)==null?void 0:ne.map(ca=>{var Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa;if(!((Sa=(Ue=Object.values(ca))==null?void 0:Ue[0])!=null&&Sa.includes(".doc"))){let ea=(je=(aa=(ja=(Te=M.cloneDeep((Ma=Object.values(ca))==null?void 0:Ma[0]))==null?void 0:Te.split("["))==null?void 0:ja[((oa=(Na=M.cloneDeep((Fa=Object.values(ca))==null?void 0:Fa[0]))==null?void 0:Na.split("["))==null?void 0:oa.length)-1])==null?void 0:aa.split("]"))==null?void 0:je[0],Ta=ea==null?void 0:ea.split(":"),Ee=(ce=M.cloneDeep((pa=Object.values(ca))==null?void 0:pa[0]))==null?void 0:ce.substring(0,M.cloneDeep((te=Object.values(ca))==null?void 0:te[0]).lastIndexOf("["));if(Ee=(we=M.cloneDeep(Ee))==null?void 0:we.slice(0,((Se=M.cloneDeep(Ee))==null?void 0:Se.length)-1),Ee!=null&&Ee.includes("[")){let Me="";if((fa=le.contentTransArrayToAll(Ee,"/"))==null||fa.forEach(Fe=>{var $e,he,tl,El,Ml,Hl,Bl;if(!(Fe!=null&&Fe.includes("[")))Me=Me===""?Me+Fe.replaceAll("/",""):Me+"/"+Fe.replaceAll("/","");else{let jl=M.cloneDeep(Fe).slice(1,(($e=M.cloneDeep(Fe))==null?void 0:$e.length)-1),el=(Hl=(Ml=(El=(tl=(he=M.cloneDeep(jl))==null?void 0:he.split("["))==null?void 0:tl[1])==null?void 0:El.split("]"))==null?void 0:Ml[0])==null?void 0:Hl.split(":"),$l="",Wa=(Bl=qe==null?void 0:qe.find(Kl=>(Kl==null?void 0:Kl.name)===(el==null?void 0:el[0])))==null?void 0:Bl.compData;Wa==null||Wa.forEach(Kl=>{var Jl;(Kl==null?void 0:Kl.key)==="formContent"&&((Jl=Kl==null?void 0:Kl.contents)==null||Jl.forEach(ar=>{(ar==null?void 0:ar.key)===(el==null?void 0:el[1])&&($l=ar==null?void 0:ar.value)}))}),Me=Me===""?Me+$l.replaceAll("/",""):Me+"/"+$l.replaceAll("/","")}}),Ee=Me,Ee[(Ee==null?void 0:Ee.length)-1]!=="/")return Ee}}}))==null?void 0:ua.filter(ca=>ca);ae=[...new Set(M.cloneDeep(ae))];let pe=ae==null?void 0:ae.map(async ca=>{let Ue=await le.getItemData(ca,sessionStorage.getItem("systemKey"),"",!1,"","",me);if((Ue==null?void 0:Ue.length)===0)return await le.getParentContents(ca)});await Promise.all(pe);let ve=[],da=(Le=(Re=(Pe=M.cloneDeep(ue))==null?void 0:Pe.extraValues)==null?void 0:Re.output)==null?void 0:Le.map(async ca=>{var ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl,ha,Ha,ra,Ga,wl,De,ia,Pa,Be,La,al,bl,Tl,Oe,ma,ta,xa,ga,fl,Ve,ml,Ne,Pl,Da,ul,Za,Nl,Ba,Rl,Er,tn,Fr,ir,Ur,Zr,Or,rr,en;if((aa=(ja=Object.values(ca))==null?void 0:ja[0])!=null&&aa.includes(".doc")){var Ue=new Blob([V.data],{type:"application/octet-stream;charset=UTF-8"}),Sa=V.headers["content-disposition"],Ma=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Te=Ma.exec(Sa),Fa=Te==null?void 0:Te[1],Na=document.createElement("a"),oa=window.URL.createObjectURL(Ue);f.value=[{name:Fa,blobUrl:oa}],o.value=!0}else{let Gr=(ea=(fa=(we=(pa=M.cloneDeep((je=Object.values(ca))==null?void 0:je[0]))==null?void 0:pa.split("["))==null?void 0:we[((Se=(ce=M.cloneDeep((te=Object.values(ca))==null?void 0:te[0]))==null?void 0:ce.split("["))==null?void 0:Se.length)-1])==null?void 0:fa.split("]"))==null?void 0:ea[0],or=Gr==null?void 0:Gr.split(":"),Cr=(Me=M.cloneDeep((Ta=Object.values(ca))==null?void 0:Ta[0]))==null?void 0:Me.substring(0,M.cloneDeep((Ee=Object.values(ca))==null?void 0:Ee[0]).lastIndexOf("["));if(Cr!=null&&Cr.includes("[")?Cr=($e=M.cloneDeep(Cr))==null?void 0:$e.slice(0,((Fe=M.cloneDeep(Cr))==null?void 0:Fe.length)-1):Cr===""&&(Cr=E.value),Cr=Cr.replaceAll("<","[").replaceAll(">","]"),Cr!=null&&Cr.includes("[")){let Wl="";(he=le.contentTransArrayToAll(Cr,"/"))==null||he.forEach((tr,kr)=>{var Lr,Il,ln,sr,_r,Mr,Br,zn,ri,Mn,wn;if(!(tr!=null&&tr.includes("[")))Wl=Wl===""?Wl+tr.replaceAll("/",""):Wl+"/"+tr.replaceAll("/","");else{let Gn="",pn="";(Lr=M.cloneDeep(tr))!=null&&Lr.includes("]")?(Gn=M.cloneDeep(tr).slice(1,((Il=M.cloneDeep(tr))==null?void 0:Il.length)-1),pn=(Br=(Mr=(_r=(sr=(ln=M.cloneDeep(Gn))==null?void 0:ln.split("["))==null?void 0:sr[1])==null?void 0:_r.split("]"))==null?void 0:Mr[0])==null?void 0:Br.split(":")):(Gn=M.cloneDeep(tr).slice(1,(zn=M.cloneDeep(tr))==null?void 0:zn.length),pn=(ri=M.cloneDeep(Gn))==null?void 0:ri.split("/"));let In="",ni=(Mn=qe==null?void 0:qe.find(fn=>(fn==null?void 0:fn.name)===(pn==null?void 0:pn[0])))==null?void 0:Mn.compData;ni==null||ni.forEach(fn=>{var ii;(fn==null?void 0:fn.key)==="formContent"&&((ii=fn==null?void 0:fn.contents)==null||ii.forEach(Tn=>{(Tn==null?void 0:Tn.key)===(pn==null?void 0:pn[1])&&(In=Tn==null?void 0:Tn.value)}))}),((wn=le.contentTransArrayToAll(Cr,"/"))==null?void 0:wn.length)-1!==kr?Wl=Wl===""?Wl+In.replaceAll("/",""):Wl+"/"+In.replaceAll("/",""):Wl=Wl+r.value+In.replaceAll("/","")}}),(tl=E.value)!=null&&tl.includes(Wl)?Cr=E.value:Cr=Wl}let an=M.cloneDeep((El=Object.keys(ca))==null?void 0:El[0]);if(((Ml=V==null?void 0:V.data)==null?void 0:Ml.statusCode)===200||((Hl=V==null?void 0:V.data)==null?void 0:Hl.code)===200){if(((jl=(Bl=V==null?void 0:V.data)==null?void 0:Bl.data)!=null&&jl[an]||($l=(el=V==null?void 0:V.data)==null?void 0:el.result)!=null&&$l[an])&&(or==null?void 0:or.length)===1)return await U(((Kl=(Wa=V==null?void 0:V.data)==null?void 0:Wa.data)==null?void 0:Kl[an])||((ar=(Jl=V==null?void 0:V.data)==null?void 0:Jl.result)==null?void 0:ar[an]),M.cloneDeep(Cr),or,ka);if((br=(xl=V==null?void 0:V.data)==null?void 0:xl.data)!=null&&br[an]||(sl=(ya=V==null?void 0:V.data)==null?void 0:ya.result)!=null&&sl[an]){let Wl=await fe(((Ha=(ha=V==null?void 0:V.data)==null?void 0:ha.data)==null?void 0:Ha[an])||((Ga=(ra=V==null?void 0:V.data)==null?void 0:ra.result)==null?void 0:Ga[an]),M.cloneDeep(Cr),or);return Wl&&(ve=[...ve,...Wl]),Wl}else{if(!((wl=V==null?void 0:V.data)!=null&&wl.data)){let Wl=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",me);Wl=Wl==null?void 0:Wl.map(kr=>{var Lr;return(kr==null?void 0:kr.name)===(or==null?void 0:or[0])&&(kr.compData=(Lr=kr.compData)==null?void 0:Lr.map(Il=>{var ln;return(Il==null?void 0:Il.key)==="formContent"&&(Il.contents=(ln=Il.contents)==null?void 0:ln.map(sr=>{var _r,Mr;return(sr==null?void 0:sr.key)===(or==null?void 0:or[1])&&(sr.value=(Mr=(_r=V==null?void 0:V.data)==null?void 0:_r.result)==null?void 0:Mr[an==null?void 0:an.replaceAll(":","")]),sr})),Il})),kr});let tr=[];(De=Wl==null?void 0:Wl.filter(kr=>(kr==null?void 0:kr.comp)==="Form"))==null||De.forEach(async kr=>{let Lr={};for(let Il in kr)Il!=="id"&&(Lr[Il]=kr[Il]);tr.push({id:kr==null?void 0:kr.id,value:{pageData:Lr}})}),(tr==null?void 0:tr.length)>0&&await qr.batchUpdateInsofDataApi({dataList:tr});return}if((or==null?void 0:or.length)===1){const Wl=(Be=(Pa=(ia=V==null?void 0:V.data)==null?void 0:ia.data)==null?void 0:Pa.path)==null?void 0:Be.path;let tr="";(Oe=(Tl=(bl=(al=(La=Wl==null?void 0:Wl.split("("))==null?void 0:La[1])==null?void 0:al.split(")"))==null?void 0:bl[0])==null?void 0:Tl.split(":"))==null||Oe.forEach(Il=>{var ln,sr;tr=tr===""?tr+((ln=Il==null?void 0:Il.replaceAll("'",""))==null?void 0:ln.trim()):tr+"/"+((sr=Il==null?void 0:Il.replaceAll("'",""))==null?void 0:sr.trim())});let kr=[(fl=(ga=(xa=(ta=(ma=Wl==null?void 0:Wl.split("<"))==null?void 0:ma[1])==null?void 0:ta.split(">"))==null?void 0:xa[0])==null?void 0:ga.replaceAll("'",""))==null?void 0:fl.trim()],Lr;return(Ne=(ml=(Ve=V==null?void 0:V.data)==null?void 0:Ve.data)==null?void 0:ml.data)!=null&&Ne[or==null?void 0:or[0]]?Lr=await U((ul=(Da=(Pl=V==null?void 0:V.data)==null?void 0:Pl.data)==null?void 0:Da.data)==null?void 0:ul[or==null?void 0:or[0]],tr,or,ka):Lr=await de((Nl=(Za=V==null?void 0:V.data)==null?void 0:Za.data)==null?void 0:Nl.data,tr,kr,me),Lr}else{const Wl=(Er=(Rl=(Ba=V==null?void 0:V.data)==null?void 0:Ba.data)==null?void 0:Rl.path)==null?void 0:Er.path;let tr="";return(Zr=(Ur=(ir=(Fr=(tn=Wl==null?void 0:Wl.split("("))==null?void 0:tn[1])==null?void 0:Fr.split(")"))==null?void 0:ir[0])==null?void 0:Ur.split(":"))==null||Zr.forEach(Lr=>{var Il,ln;tr=tr===""?tr+((Il=Lr==null?void 0:Lr.replaceAll("'",""))==null?void 0:Il.trim()):tr+"/"+((ln=Lr==null?void 0:Lr.replaceAll("'",""))==null?void 0:ln.trim())}),await fe((en=(rr=(Or=V==null?void 0:V.data)==null?void 0:Or.data)==null?void 0:rr.data)==null?void 0:en[or==null?void 0:or[0]],tr,or)}}}}});if(await Promise.all(da),(ve==null?void 0:ve.length)>0){let ca=[];ve==null||ve.forEach(Ma=>{ca!=null&&ca.find(Te=>{var Fa,Na,oa,ja;return((Na=(Fa=Te==null?void 0:Te.value)==null?void 0:Fa.pageData)==null?void 0:Na.name)===((ja=(oa=Ma==null?void 0:Ma.value)==null?void 0:oa.pageData)==null?void 0:ja.name)})||ca.push(Ma)});let Ue=[];ca==null||ca.forEach(Ma=>{var Na,oa,ja,aa;let Te=M.cloneDeep(Ma);Te.value.pageData.compData=(Na=Te.value.pageData.compData)==null?void 0:Na.map(je=>{var pa;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(pa=je.contents)==null?void 0:pa.map(te=>{var Se,we,fa,ea;let ce=(Se=M.cloneDeep(ve))==null?void 0:Se.find(Ta=>(Ta==null?void 0:Ta.keyType)===(te==null?void 0:te.key));if(ce){let Ta=(ea=(fa=(we=ce.value.pageData.compData)==null?void 0:we.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:fa.contents)==null?void 0:ea.find(Ee=>(Ee==null?void 0:Ee.key)===(te==null?void 0:te.key));te.value=Ta==null?void 0:Ta.value}return te})),je}),Ue.push({id:Te==null?void 0:Te.id,value:Te==null?void 0:Te.value});let Fa=[];(aa=(ja=(oa=Te==null?void 0:Te.value)==null?void 0:oa.pageData)==null?void 0:ja.compData)==null||aa.forEach(je=>{var pa;(je==null?void 0:je.key)==="formContent"&&((pa=je==null?void 0:je.contents)==null||pa.forEach(te=>{var ce,Se,we,fa,ea,Ta;if((Se=(ce=te==null?void 0:te.optionUrl)==null?void 0:ce.menuSelect)!=null&&Se.find(Ee=>Ee==null?void 0:Ee.includes("[")))if(Fa!=null&&Fa.find(Ee=>{var Me,Fe,$e;return((Me=Ee==null?void 0:Ee.key)==null?void 0:Me.join(","))===(($e=(Fe=te==null?void 0:te.optionUrl)==null?void 0:Fe.menuSelect)==null?void 0:$e.join(","))})){let Ee=(we=Fa==null?void 0:Fa.find(Me=>{var Fe,$e,he;return((Fe=Me==null?void 0:Me.key)==null?void 0:Fe.join(","))===((he=($e=te==null?void 0:te.optionUrl)==null?void 0:$e.menuSelect)==null?void 0:he.join(","))}))==null?void 0:we.value;Ee.push({key:te==null?void 0:te.prop,groups:(fa=te==null?void 0:te.optionUrl)==null?void 0:fa.groupSelect,value:te==null?void 0:te.value}),Fa=Fa==null?void 0:Fa.map(Me=>{var Fe,$e,he;return((Fe=Me==null?void 0:Me.key)==null?void 0:Fe.join(","))===((he=($e=te==null?void 0:te.optionUrl)==null?void 0:$e.menuSelect)==null?void 0:he.join(","))&&(Me.value=Ee),Me})}else Fa.push({key:(ea=te==null?void 0:te.optionUrl)==null?void 0:ea.menuSelect,value:[{key:te==null?void 0:te.prop,groups:(Ta=te==null?void 0:te.optionUrl)==null?void 0:Ta.groupSelect,value:te==null?void 0:te.value}]})}))}),(Fa==null?void 0:Fa.length)>0&&(Fa=Fa==null?void 0:Fa.map(je=>{var te;let pa="";return(te=je==null?void 0:je.key)==null||te.forEach(ce=>{var Se;if(!(ce!=null&&ce.includes("[")))pa=pa===""?pa+ce:pa+"/"+ce;else{let we="",fa=(Se=ce==null?void 0:ce.replaceAll("[","").replaceAll("]",""))==null?void 0:Se.split(":");qe==null||qe.forEach(ea=>{var Ta;(ea==null?void 0:ea.name)===(fa==null?void 0:fa[0])&&((Ta=ea==null?void 0:ea.compData)==null||Ta.forEach(Ee=>{var Me;(Ee==null?void 0:Ee.key)==="formContent"&&((Me=Ee==null?void 0:Ee.contents)==null||Me.forEach(Fe=>{(Fe==null?void 0:Fe.prop)===(fa==null?void 0:fa[1])&&(we=Fe==null?void 0:Fe.value)}))}))}),pa=pa+r.value+we}}),je.key=pa,je})),Fa==null||Fa.forEach(je=>{var Se,we,fa;let pa=(Se=me[je.key])==null?void 0:Se.find(ea=>{var Ta,Ee,Me,Fe,$e,he,tl;return((Ee=(Ta=ea==null?void 0:ea.value)==null?void 0:Ta.pageData)==null?void 0:Ee.name)===(($e=(Fe=(Me=je==null?void 0:je.value)==null?void 0:Me[0])==null?void 0:Fe.groups)==null?void 0:$e[0])&&((tl=(he=ea==null?void 0:ea.value)==null?void 0:he.pageData)==null?void 0:tl.name)!==void 0}),te=pa==null?void 0:pa.id,ce=(we=pa==null?void 0:pa.value)==null?void 0:we.pageData;ce.compData=(fa=ce.compData)==null?void 0:fa.map(ea=>{var Ta;return(ea==null?void 0:ea.key)==="formContent"&&(ea.contents=(Ta=ea.contents)==null?void 0:Ta.map(Ee=>{var Fe;let Me=(Fe=je.value)==null?void 0:Fe.find($e=>($e==null?void 0:$e.key)===(Ee==null?void 0:Ee.prop));return Me&&(Ee.value=Me.value),Ee})),ea}),Ue.push({id:te,value:{pageData:ce}})})});let Sa=(se=M.cloneDeep(ve))==null?void 0:se[0];(Ue==null?void 0:Ue.length)>0&&await qr.batchUpdateInsofDataApi({dataList:Ue})}m.setFreshContent(!0)}w.setImportLoading(!1)}catch{Ja.ElMessage.error("方法执行错误,请查看方法!"),w.setImportLoading(!1)}x.value=!0},ee=["createInsofDataApi"],ge=Fl.debounce(async ue=>{Z(ue)},100),Ie=async ue=>{var Ae,Qe,Ea;const B=M.cloneDeep(ue);let oe,q=new WeakMap;ue!=null&&ue[0].path&&(oe=await(B==null?void 0:B.map(async(ne,ua)=>{var _a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja;const Re=(_a=q[ne==null?void 0:ne.path])==null?void 0:_a.filter(aa=>{var je;return((je=aa==null?void 0:aa.key)==null?void 0:je.type)==="data"});let Le="";const se=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,q);Re==null||Re.forEach(aa=>{var je,pa,te,ce,Se;((pa=(je=aa==null?void 0:aa.value)==null?void 0:je.tableData)==null?void 0:pa.算法名称)===((te=B==null?void 0:B[ua])==null?void 0:te.method)&&(Le=(Se=(ce=aa==null?void 0:aa.value)==null?void 0:ce.tableData)==null?void 0:Se.算法体)});const me=await le.getItemData(ne==null?void 0:ne.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,q);let qe="",ka=(pe=(ae=(V=(H=me==null?void 0:me[0])==null?void 0:H.compData)==null?void 0:V.find(aa=>(aa==null?void 0:aa.key)==="header"))==null?void 0:ae.contents)==null?void 0:pe.findIndex(aa=>(aa==null?void 0:aa.prop)==="算法体");return(da=(ve=me==null?void 0:me[0])==null?void 0:ve.compData)==null||da.forEach(aa=>{var je;(aa==null?void 0:aa.key)==="tableContents"&&((je=aa==null?void 0:aa.contents)==null||je.forEach(pa=>{pa!=null&&pa.find(te=>te===(ne==null?void 0:ne.method))&&(qe=pa[ka])}))}),{buttonName:((ca=B==null?void 0:B[ua])==null?void 0:ca.method)||((Ma=(Sa=(Ue=Re==null?void 0:Re[0])==null?void 0:Ue.value)==null?void 0:Sa.tableData)==null?void 0:Ma.算法名称),api:(Le===""?(Na=(Fa=(Te=Re==null?void 0:Re[0])==null?void 0:Te.value)==null?void 0:Fa.tableData)==null?void 0:Na.算法体:Le)||qe,content:se==null?void 0:se.filter(aa=>aa.comp!=="methodButton"),extraContent:(oa=M.cloneDeep(ne.value))==null?void 0:oa.slice(1),methodName:(ne==null?void 0:ne.path)??"",extraValues:(ja=B==null?void 0:B[ua])==null?void 0:ja.data}})));const ye=B==null?void 0:B.map(async ne=>{var me,qe,ka,_a,H,V;const ua=(me=resAll.data.result)==null?void 0:me.filter(ae=>{var pe,ve,da;return((pe=ae==null?void 0:ae.key)==null?void 0:pe.parentTable)===""&&((ve=ae==null?void 0:ae.key)==null?void 0:ve.type)==="method"&&((da=ae==null?void 0:ae.key)==null?void 0:da.methodName)===ae.method}),Pe=ua==null?void 0:ua[0],Re=(qe=resAll.data.result)==null?void 0:qe.filter(ae=>{var pe,ve;return((pe=ae==null?void 0:ae.key)==null?void 0:pe.type)==="methodData"&&((ve=ae==null?void 0:ae.key)==null?void 0:ve.tableId)===(Pe==null?void 0:Pe.id)}),Le=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,q),se=Re==null?void 0:Re[0];return{buttonName:(ka=Pe==null?void 0:Pe.key)==null?void 0:ka.methodKey,api:(H=(_a=se==null?void 0:se.value)==null?void 0:_a.tableData)==null?void 0:H[0],content:Le==null?void 0:Le.filter(ae=>ae.comp!=="methodButton"),extraContent:(V=M.cloneDeep(ne.value))==null?void 0:V.slice(1),methodName:(ne==null?void 0:ne.method)??""}}),Ke=(Ae=ue==null?void 0:ue[0])!=null&&Ae.path&&((Qe=ue==null?void 0:ue[0])==null?void 0:Qe.path)!==""?await Promise.all(oe):await Promise.all(ye);l.value=Ke==null?void 0:Ke.filter(ne=>ne==null?void 0:ne.extraContent),(Ea=l.value)==null||Ea.forEach(ne=>{var ua;ne.api===""&&((ua=ne.content)==null||ua.forEach(Pe=>{var Re;Pe.comp=="Table"&&m.setExtraContents(le.methodTableToContent(Pe.compData,(Re=ne.extraContent)==null?void 0:Re[0]))}))})};return e.watch(()=>i.itemData,async()=>{_.value=="view"&&!x.value&&await Ie(M.cloneDeep(i.itemData)),x.value=!1},{immediate:!0,deep:!0}),(ue,B)=>{var oe,q,ye;return e.unref(_)!=="edit"?(e.openBlock(),e.createElementBlock("div",R4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=l.value)==null?void 0:oe.filter(Ke=>(Ke==null?void 0:Ke.buttonName)!=="保存"),Ke=>{var Ae;return e.openBlock(),e.createElementBlock("div",null,[Ke.api!==""?(e.openBlock(),e.createBlock(e.unref(ps._sfc_main),{key:0,disabled:e.unref(F)===e.unref(E)&&!((Ae=Ke==null?void 0:Ke.buttonName)!=null&&Ae.includes("预览")),class:"calculator-content",modelValue:Ke.buttonName,onClickTrigger:Qe=>e.unref(ge)(Ke),loading:g.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(J)!==""&&((ye=e.unref(E))==null?void 0:ye[((q=e.unref(E))==null?void 0:q.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ps._sfc_main),{key:0,class:"calculator-content",onClickTrigger:O,modelValue:"保存"})):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:0,fileDataList:f.value,onDestroy:I},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},V4=nr._export_sfc($4,[["__scopeId","data-v-063aa9af"]]),F4={};function P4(a,l){return" 567 "}const j4=nr._export_sfc(F4,[["render",P4]]),H4={class:"module content"},U4={class:"module data"},q4={class:"module layout"},W4={class:"form-content"},G4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.reactive({visible:!1,width:"40%",title:"签名配置"}),o=e.ref("create"),f=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([]),w=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:g.value},{key:"signConfig",contents:m.value}]}),d=A=>{var F;m.value=M.cloneDeep(A),r("change",(F=w())==null?void 0:F.compData)},N=A=>{var F,L;if((A==null?void 0:A.buttonName)==="确认"){const E=M.cloneDeep(A==null?void 0:A.content);switch(o.value){case"create":g.value.push({...E,index:((F=g.value)==null?void 0:F.length)+1});break}r("change",(L=w())==null?void 0:L.compData),i.visible=!1}else i.visible=!1},_=(A,F)=>{var L,E;switch(A){case"create":(L=u.value)==null||L.forEach(S=>{S.value=""}),o.value="create",i.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=F[S==null?void 0:S.prop]}),o.value="update",i.visible=!0;break;case"delete":g.value.splice(F,1),o.value="delete";break}},J=()=>{i.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,A=>{var F,L;A&&(m.value=((F=A==null?void 0:A.find(E=>E.key==="signConfig"))==null?void 0:F.contents)??{},g.value=((L=A==null?void 0:A.find(E=>E.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(A,F)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",H4,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=S=>_("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",U4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[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:y=>_("update",{...S,index:k+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:y=>_("delete",k)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",q4,[e.createVNode(pl.ssForm,{rowContents:c.value,onChange:d},null,8,["rowContents"])])]),e.createVNode(Ir.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:J,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",W4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:f.value,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),K4=nr._export_sfc(G4,[["__scopeId","data-v-487e0536"]]),Y4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(0),o=e.computed(()=>{var w,d;return(w=n==null?void 0:n.stepConfig)!=null&&w.allowTrigger?i.value:(d=n==null?void 0:n.stepConfig)==null?void 0:d.active}),f=(w,d)=>{i.value=d-1,r("clickStep",w,d)};e.onMounted(()=>{var w;r("clickStep",(w=n==null?void 0:n.stepList)==null?void 0:w[0],0)});const c=w=>pl.getComponent(w),u=()=>{var d;const w=(d=n==null?void 0:n.stepList)==null?void 0:d.find((N,_)=>_+1===o.value);return console.log("findStep",w),w?w==null?void 0:w.children:[]},m=w=>{r("clickTrigger",w)},g=w=>{r("changeTrigger",w)};return(w,d)=>{var J,A,F,L,E;const N=e.resolveComponent("el-step"),_=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(_,{direction:(J=a.stepConfig)==null?void 0:J.direction,active:o.value,"finish-status":"success",simple:(A=a.stepConfig)==null?void 0:A.simple,"align-center":((F=a.stepConfig)==null?void 0:F.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(S,k)=>(e.openBlock(),e.createBlock(N,{key:k,class:"step-item",onClick:y=>f(S,k+1)},{title:e.withCtx(()=>[e.renderSlot(w.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(w.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u(),(S,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":y=>S.value=y,onClickTrigger:m,onChangeTrigger:g,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(w.$slots,(y,x)=>({name:x,fn:e.withCtx(O=>[e.renderSlot(w.$slots,x,e.mergeProps({ref_for:!0},O||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),J4=nr._export_sfc(Y4,[["__scopeId","data-v-a30ff621"]]),X4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,i=e.ref({}),o=e.ref([]),f=(c,u)=>{r("clickStep",c,u)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var w,d,N,_;i.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let u=((w=c==null?void 0:c.find(J=>(J==null?void 0:J.key)==="stepName"))==null?void 0:w.contents)??[],m=[];(N=(d=c==null?void 0:c.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:d.contents)==null||N.forEach(J=>{m.push({label:J==null?void 0:J.label,prop:J==null?void 0:J.prop,name:J==null?void 0:J.prop,type:"text",disabled:!0})});let g=((_=c==null?void 0:c.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:_.contents)??[];u=u==null?void 0:u.map((J,A)=>{let F=m==null?void 0:m.map(L=>{var E;return{...L,value:(E=g==null?void 0:g[A])==null?void 0:E[L==null?void 0:L.prop]}});return{title:J,description:F}}),o.value=u},{immediate:!0,deep:!0}),(c,u)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(J4,{stepConfig:i.value,stepList:o.value,onClickStep:f},{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(pl.ssForm,{ref:"formRef",rowContents:g,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),Z4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),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,f)=>(e.openBlock(),e.createBlock(r,{key:f,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})}}}),Q4=nr._export_sfc(Z4,[["__scopeId","data-v-4172a886"]]),e2={class:"line-content"},a2={class:"line-time"},l2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,i=>{var o,f;r.value=(o=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:o.contents,n.value=(f=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:f.contents},{immediate:!0}),(i,o)=>(e.openBlock(),e.createBlock(Q4,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:f,timestamp:c})=>[e.createElementVNode("span",e2,e.toDisplayString(f),1),e.createElementVNode("span",a2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),r2=nr._export_sfc(l2,[["__scopeId","data-v-b4d9deed"]]),n2={class:"tabs-content"},i2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(a,{emit:l}){const n=a,r=l,i=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{i.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const o=d=>{r("change",d)},f=(d,N)=>{r("contentChange",d,N)},c=d=>{r("pageChange",d)},u=d=>{r("rowClick",d)},m=(d,N)=>{r("routeUrl",d,N)},g=d=>{r("clickTrigger",d)},w=(d,N)=>{r("clickMainKey",d,N)};return(d,N)=>{var _,J;return e.openBlock(),e.createElementBlock("div",n2,[(_=i.value)!=null&&_.length?(e.openBlock(),e.createBlock(pl.ssTab,{tabsContents:i.value,key:(J=i.value)==null?void 0:J.length},{pane:e.withCtx(({tab:A,index:F})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(A==null?void 0:A.comp)),{related:A==null?void 0:A.relatedTables,compNames:A==null?void 0:A.nameContents,compName:A==null?void 0:A.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,onChange:o,calculator:A==null?void 0:A.calculatorFilters,index:(A==null?void 0:A.id)??F,config:{showIndex:A==null?void 0:A.showIndex,allowMove:A==null?void 0:A.allowMove,viewport:A==null?void 0:A.viewport,status:A==null?void 0:A.status},onContentChange:f,onPageChange:c,onRowClick:u,onRouteUrl:m,parentTableId:A==null?void 0:A.tableId,allMapContents:a.allMapContents,children:A==null?void 0:A.children,level:1,onClickTrigger:g,onClickMainKey:w},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","calculator","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),o2=nr._export_sfc(i2,[["__scopeId","data-v-71516232"]]),t2={class:"type-select"},s2=["onClick"],c2={class:"list-icon"},u2={__name:"modelSelect",setup(a){const l=li(M.pinia),{itemData:n}=M.storeToRefs(l),r=i=>{const o=M.cloneDeep(n.value);o.push({comp:i.comp,name:i.name,compData:[]}),l.setItemData(o)};return(i,o)=>{const f=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",t2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(bu),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",c2,[e.createVNode(f,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,s2)]))),128))])}}},d2=nr._export_sfc(u2,[["__scopeId","data-v-91799bf8"]]),p2={class:"fill-content"},f2={class:"operate-content"},h2={class:"collapse-title-content"},v2={class:"collapse-title-item"},m2={key:1},y2=["onClick"],g2={class:"icon-content"},b2={key:0,class:"edit-content"},k2=["onClick"],x2={class:"comp-child"},w2={__name:"modelFill",setup(a){const l=li(M.pinia),{itemData:n,originalData:r}=M.storeToRefs(l),i=e.ref([]);e.ref([]);const o=e.ref([]),f=e.ref([]),c=N=>{var J;let _=(J=M.cloneDeep(f.value))==null?void 0:J.map((A,F)=>(N===F&&(A.content=!0),A));f.value=_},u=N=>{var J;let _=(J=M.cloneDeep(f.value))==null?void 0:J.map((A,F)=>(N===F&&(A.content=!1),A));f.value=_,i.value=M.cloneDeep(n.value)},m=(N,_)=>{var L;let J=(L=M.cloneDeep(f.value))==null?void 0:L.map((E,S)=>(N===S&&(E.content=!1),E));f.value=J;const A=M.cloneDeep(n.value),F=A==null?void 0:A.filter((E,S)=>(S===N&&(E.name=_),E));l.setOriginalData(F),l.setItemData(F)};e.watch(()=>n.value,()=>{var N,_,J;!n.value||((N=n.value)==null?void 0:N.length)===0?i.value=[]:i.value=(_=M.cloneDeep(n.value))==null?void 0:_.filter(A=>(A==null?void 0:A.comp)!=="methodButton"),o.value=i.value,f.value=(J=M.cloneDeep(o.value))==null?void 0:J.map((A,F)=>({id:F,content:!1}))},{deep:!0,immediate:!0});const g=N=>Ri(N),w=(N,_,J)=>{var F,L;if(!N)return;let A=M.cloneDeep(n.value);A=(F=A==null?void 0:A.map((E,S)=>(S===J&&(E.compData=N),E)))==null?void 0:F.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),f.value=(L=M.cloneDeep(A))==null?void 0:L.map((E,S)=>({id:S,content:!1})),l.setOriginalData(A),l.setItemData(A)},d=N=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=M.cloneDeep(n.value),J=_==null?void 0:_.filter((A,F)=>F!==N);l.setOriginalData(J),l.setItemData(J),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(N,_)=>{const J=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",p2,[_[1]||(_[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",f2,[e.createVNode(tc.default,{class:"collapse-content",collapseContents:i.value},{title:e.withCtx(({item:A,index:F})=>{var L,E,S,k,y,x,O,I,W,Y;return[e.createElementVNode("div",h2,[e.createElementVNode("div",v2,[(E=(L=f.value)==null?void 0:L.find(fe=>fe.id===F))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:A.name&&A.name!==""?"8px":"0px"})},e.toDisplayString(A.name),5)),(k=(S=f.value)==null?void 0:S.find(fe=>fe.id===F))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",m2,[e.createVNode(pl.ssInput,{modelValue:A.name,"onUpdate:modelValue":fe=>A.name=fe,onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(x=(y=f.value)==null?void 0:y.find(fe=>fe.id===F))!=null&&x.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(fe=>c(F),["stop"]),class:"icon-content"},[e.createVNode(J,{name:"Edit",style:{width:"16px",height:"16px"}})],8,y2))]),e.createElementVNode("div",g2,[(I=(O=f.value)==null?void 0:O.find(fe=>fe.id===F))!=null&&I.content?(e.openBlock(),e.createElementBlock("div",b2,[e.createVNode(J,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(fe=>u(F),["stop"])},null,8,["onClick"]),e.createVNode(J,{name:"Save",onClick:e.withModifiers(fe=>m(F,A.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Y=(W=f.value)==null?void 0:W.find(fe=>fe.id===F))!=null&&Y.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(fe=>d(F),["stop"]),class:"icon-content"},[e.createVNode(J,{name:"Delete",style:{width:"16px",height:"16px"}})],8,k2))])])]}),content:e.withCtx(({item:A,index:F})=>{var L,E;return[e.createElementVNode("div",x2,[e.createTextVNode(e.toDisplayString(g(A.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(A.comp+"Operate")),{itemContents:A==null?void 0:A.compData,originalItemContents:(E=(L=o.value)==null?void 0:L.find((S,k)=>k===F))==null?void 0:E.compData,onChange:S=>w(S,A,F)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},_2=nr._export_sfc(w2,[["__scopeId","data-v-a46a44b9"]]),S2={key:0,class:"show-content"},E2={style:{display:"flex"}},C2={__name:"modelShow",setup(a){const l=li(M.pinia),{itemData:n}=M.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var o;!n.value||((o=n.value)==null?void 0:o.length)===0?r.value=[]:r.value=M.cloneDeep(n.value)},{deep:!0,immediate:!0});const i=o=>Ri(o);return(o,f)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",S2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",E2,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)}}},D2=nr._export_sfc(C2,[["__scopeId","data-v-3f3e863e"]]),T2={class:"tabs-header"},B2={class:"tabs-list"},N2={class:"tab-name"},A2={class:"tab-actions"},z2=["onClick"],M2=["onClick"],I2=["onClick"],O2={class:"model-operate"},L2={class:"model-select",style:{display:"unset"}},R2={class:"existing-components"},$2={class:"component-list"},V2=["onClick"],F2={class:"component-info"},P2={class:"component-type"},j2={class:"component-name"},H2={class:"model-fill"},U2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),o=e.ref(!1),f=e.ref(""),c=e.ref({title:""}),u=e.ref(-1),m=e.ref(!1),g=e.ref(-1),w=e.ref(new WeakMap),d=e.ref(null),N=li(M.pinia),{itemData:_}=M.storeToRefs(N),J=()=>{f.value="新增标签页",c.value.title="",u.value=-1,o.value=!0},A=ue=>{f.value="修改标签页",c.value.title=i.value[ue].title,u.value=ue,o.value=!0},F=ue=>{const B=S(ue);w.value.delete(B),i.value.splice(ue,1),Ie()},L=()=>{if(c.value.title.trim()){if(u.value===-1){const ue={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};i.value.push(ue)}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,Ie()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ue=>{const B=i.value[ue];return B.id||(B.id=E()),B.id},k=ue=>{var q;g.value=ue;const B=S(ue);d.value=M.cloneDeep(_.value);let oe=w.value.get(B);!oe&&((q=i.value[ue].children)==null?void 0:q.length)>0&&(oe=I(i.value[ue].children)),oe?N.setItemData(M.cloneDeep(oe)):N.setItemData([]),m.value=!0},y=e.computed(()=>{const ue=M.useModelComp(M.pinia),B=M.storeToRefs(ue).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(oe=>{var q;if(oe.comp==="Tabs"&&g.value>=0){const ye=S(g.value);if((q=oe.compData)==null?void 0:q.some(Ae=>{var Qe;return Ae.key==="stepList"&&((Qe=Ae.contents)==null?void 0:Qe.some(Ea=>Ea.id===ye))}))return!1}return!0})}),x=ue=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ue]||ue,O=ue=>{var B;try{const oe=M.cloneDeep(ue);oe.id=Date.now()+Math.random(),oe.comp==="Tabs"&&((B=oe.compData)==null||B.forEach(ye=>{ye.key==="stepList"&&ye.contents&&ye.contents.forEach(Ke=>{Ke.id=E()})}));const q=M.cloneDeep(_.value);q.push(oe),N.setItemData(q)}catch(oe){console.error("添加组件失败:",oe)}},I=ue=>ue.map(B=>{var oe;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:W(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:Y(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((oe=B.content)==null?void 0:oe.originalData)||[]}}}),W=ue=>{if(!ue)return[];const B=[];return ue.rowContents&&B.push({key:"formContent",contents:ue.rowContents}),ue.buttonValue&&B.push({key:"formButton",contents:ue.buttonValue}),typeof ue.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ue.isEnableWrap}),B},Y=ue=>[],fe=()=>{if(g.value>=0&&g.value<i.value.length){const ue=S(g.value);w.value.set(ue,M.cloneDeep(_.value)),i.value[g.value].children=U(_.value),console.log("保存后的数据",U(_.value))}m.value=!1,g.value=-1,d.value=null,Ie()},de=()=>{d.value&&N.setItemData(M.cloneDeep(d.value)),m.value=!1,g.value=-1,d.value=null},j=()=>{m.value&&de()},U=ue=>{if(!Array.isArray(ue))throw new Error("sourceData must be an array");return ue.map((B,oe)=>{if(!B||typeof B!="object")return B;const{comp:q,name:ye,compData:Ke}=B;switch(q){case"Form":return{type:"form",content:Z(Ke||[]),value:"表单"};case"Table":return{type:"table",content:ee(Ke||[]),value:"表格"};default:return{type:"xxx",content:ge(Ke||[]),value:""}}})},Z=ue=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},oe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ue.forEach((q,ye)=>{if(!q||typeof q!="object"){console.warn(`Invalid config at index ${ye}:`,q);return}const{key:Ke,contents:Ae}=q,Qe=oe[Ke];if(!Qe){console.warn(`Unknown Form config key: ${Ke}`);return}Ke==="enableWrap"?B[Qe]=!!Ae:B[Qe]=Array.isArray(Ae)?Ae:[]}),B},ee=ue=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},oe={header:"columns",tableContents:"tableData"};return ue.forEach((q,ye)=>{if(!q||typeof q!="object"){console.warn(`Invalid config at index ${ye}:`,q);return}const{key:Ke,contents:Ae}=q,Qe=oe[Ke];if(!Qe){console.warn(`Unknown Table config key: ${Ke}`);return}B[Qe]=Array.isArray(Ae)?Ae:[]}),B},ge=ue=>(console.log("Default conversion logic - to be implemented"),{originalData:ue,processed:!1,componentType:"unknown"}),Ie=()=>{const ue=[{key:"stepList",contents:i.value}];r("change",ue)};return e.watch(()=>n.itemContents,ue=>{if(ue&&ue.length>0){const B=ue.find(oe=>oe.key==="stepList");B&&B.contents&&(i.value=B.contents.map(oe=>({title:oe.title||"",value:oe.value||oe.title||"",label:oe.label||oe.title||"",children:oe.children||[],id:oe.id||E()})))}},{immediate:!0,deep:!0}),(ue,B)=>{const oe=e.resolveComponent("svg-icon"),q=e.resolveComponent("el-input"),ye=e.resolveComponent("el-form-item"),Ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",T2,[B[6]||(B[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:J},[e.createVNode(oe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",B2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(Ae,Qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Qe},[e.createElementVNode("span",N2,e.toDisplayString(Ae.title),1),e.createElementVNode("div",A2,[e.createElementVNode("button",{onClick:Ea=>A(Qe)},"修改标题",8,z2),e.createElementVNode("button",{onClick:Ea=>k(Qe)},"布局调整",8,M2),e.createElementVNode("button",{onClick:Ea=>F(Qe)},"删除",8,I2)])]))),128))]),e.createVNode(Ir.ssDialog,{modelValue:o.value,"onUpdate:modelValue":B[2]||(B[2]=Ae=>o.value=Ae),title:f.value,onBeforeDestroy:B[3]||(B[3]=Ae=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:B[1]||(B[1]=Ae=>o.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Ke,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ye,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(q,{modelValue:c.value.title,"onUpdate:modelValue":B[0]||(B[0]=Ae=>c.value.title=Ae),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Ir.ssDialog,{modelValue:m.value,"onUpdate:modelValue":B[4]||(B[4]=Ae=>m.value=Ae),title:"布局调整",fullScreen:"",onBeforeDestroy:j},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:de},"取消"),e.createElementVNode("button",{onClick:fe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",O2,[e.createElementVNode("div",L2,[e.createVNode(d2),e.createElementVNode("div",R2,[B[8]||(B[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",$2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,Ae=>(e.openBlock(),e.createElementBlock("div",{key:Ae.id,class:"component-item",onClick:Qe=>O(Ae)},[e.createElementVNode("div",F2,[e.createElementVNode("span",P2,e.toDisplayString(x(Ae.comp)),1),e.createElementVNode("span",j2,e.toDisplayString(Ae.name),1)]),B[7]||(B[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,V2))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ue.innerWidth},[e.createVNode(D2)])),e.createElementVNode("div",H2,[e.createVNode(_2)])])]),_:1},8,["modelValue"])])}}},q2=nr._export_sfc(U2,[["__scopeId","data-v-9096ed0d"]]);function W2(){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 G2(a){return{type:"line",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],...a}}function K2(){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 Y2(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 J2(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function X2(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
- {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 Z2=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),Q2=a=>({type:"scatter",symbolSize:20,...a}),Dn={Line:{initBaseoptions:W2,initSeries:G2},Bar:{initBaseoptions:K2,initSeries:Y2},Pie:{initBaseoptions:J2,initSeries:X2},Scatter:{initBaseoptions:Z2,initSeries:Q2}},e1=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();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 N;g.push((N=n==null?void 0:n[0])==null?void 0:N[d])}),!m||!g)return u;u.xAxis.data=m;const w=c({data:g});return u.series.push(w),u},a1=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();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 N;g.push((N=n==null?void 0:n[0])==null?void 0:N[d])}),!m||!g)return u;u.xAxis.data=m;const w=c({data:g});return u.series.push(w),u},l1=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();u.title.text=i??"";const m=l==null?void 0:l.map(N=>N==null?void 0:N.prop);let g=[];if(m==null||m.forEach(N=>{var _;g.push((_=n==null?void 0:n[0])==null?void 0:_[N])}),!m||!g)return u;const w=[];for(let N=0;N<m.length;N++){const _=m[N],J=g[N];w.push({name:_,value:J})}const d=c({data:w});return u.series.push(d),u},r1=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();u.title.text=i??"";let m=[];const g=l==null?void 0:l.map(N=>N==null?void 0:N.prop);if(m=g==null?void 0:g.map(N=>{var J;let _=[];return _.push(N),_.push((J=n==null?void 0:n[0])==null?void 0:J[N]),_}),!m)return u;const d=c({data:m});return u.series.push(d),u},n1=async(a=[])=>{var c,u,m,g,w;const l=((c=a==null?void 0:a.find(d=>d.key==="ChartType"))==null?void 0:c.contents)??{};let n=((u=a==null?void 0:a.find(d=>d.key==="header"))==null?void 0:u.contents)??[],r=((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(N=>({methods:N==null?void 0:N.calculatorFilter,functionName:N==null?void 0:N.functionName,functionRelatedWords:N==null?void 0:N.functionRelatedWords}));let d=await It([],i,[],"Auto",[],[]);n=(w=d==null?void 0:d.xAxis)==null?void 0:w.map(N=>({label:N,prop:N})),r=d==null?void 0:d.yAxis}let{type:o}=l,f={};return o==="Line"&&(f=await e1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Bar"&&(f=await a1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Pie"&&(f=await l1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Scatter"&&(f=await r1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),f},i1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,n=e.ref({});e.onMounted(async()=>{const i=l==null?void 0:l.itemData;n.value=await n1(i)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(i,o)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Ju.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),o1=nr._export_sfc(i1,[["__scopeId","data-v-d4c081e8"]]),s1={class:"chart-module layout"},c1={class:"chart-module content"},u1={class:"chart-module content"},d1={class:"form-content"},p1={class:"dialog-footer"},f1={class:"form-content"},h1={class:"dialog-footer"},v1={class:"form-content"},m1={class:"dialog-footer"},y1=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.reactive({visible:!1,width:"840",title:"基础配置"}),o=e.ref([]),f=()=>[{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=Le=>{var se;o.value=f(),(se=o.value)==null||se.forEach(me=>{var ka;const qe=me==null?void 0:me.prop;me.value=(ka=c==null?void 0:c.value)==null?void 0:ka[qe]}),i.visible=!0},m=Le=>{c.value=Le},g=()=>{var Le;i.visible=!1,r("change",(Le=Pe())==null?void 0:Le.compData)},w=e.reactive({visible:!1,width:"840",title:"数据配置"}),d=e.ref([]),N=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],_=e.ref({}),J=()=>{const Le=d.value,se=M.cloneDeep(Le);return se==null||se.forEach(me=>{var ka;const qe=me==null?void 0:me.prop;me.value=(ka=_.value)==null?void 0:ka[qe]}),se},A=Le=>{var me;_.value=Le;const se=J();d.value=se,r("change",(me=Pe())==null?void 0:me.compData)},F=async Le=>{const se=await le.getMenusContent(),me=J();me==null||me.forEach(qe=>{(qe==null?void 0:qe.prop)==="menu"&&(qe.contents=se)}),d.value=me,w.visible=!0,await Ae(_.value.menu),await ne(_.value.group)},L=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:[]}],k=e.ref({}),y=()=>{const Le=E.value,se=M.cloneDeep(Le);return se==null||se.forEach(me=>{var ka;const qe=me==null?void 0:me.prop;me.value=(ka=k.value)==null?void 0:ka[qe]}),se},x=Le=>{var me;k.value=Le;const se=y();E.value=se,r("change",(me=Pe())==null?void 0:me.compData)},O=async Le=>{await j();const se=M.cloneDeep(I.value),me=y();me==null||me.forEach(qe=>{var _a;const ka=qe==null?void 0:qe.prop;qe.value=(_a=k==null?void 0:k.value)==null?void 0:_a[ka],ka==="mainKey"&&(qe.contents=se)}),E.value=me,L.visible=!0},I=e.ref([]),W=e.ref([]),Y=e.ref({}),fe=e.ref({}),de=()=>{const{compData:Le}=q.value||{},se=Le==null?void 0:Le.find(ae=>{const{key:pe}=ae;return pe==="header"}),me=(se==null?void 0:se.contents)||[],qe=me==null?void 0:me.filter((ae,pe)=>{const{label:ve}=ae;return ve!=="操作"}),ka=qe==null?void 0:qe.findIndex((ae,pe)=>{const{isMainKey:ve}=ae;return ve});if(ka<0)return[];const _a=Le==null?void 0:Le.find(ae=>{const{key:pe}=ae;return pe==="tableContents"}),H=(_a==null?void 0:_a.contents)||[];return H==null?void 0:H.map(ae=>{const pe=ae==null?void 0:ae[0];let ve=ka;Ja.isObject(pe)&&(pe!=null&&pe.id)&&(ve=ve+1);const da=ae==null?void 0:ae[ve];return{label:da,value:da}})},j=async()=>{const Le=await de();I.value=Le},U=async Le=>{const se=sessionStorage.getItem("systemKey");return await le.getItemData(Le,se,"")},Z=async Le=>{const se=Le;W.value=se==null?void 0:se.map(me=>{const{name:qe}=me;return Y.value[qe]=me,{label:qe,value:qe}})},ee=Le=>{const{comp:se,compData:me}=fe.value||{};if(se==="Table"){let qe=y();qe=qe.filter(ka=>{const{prop:_a}=ka;return _a!=="formItems"}),Qe(qe,me),E.value=qe}},ge=async()=>{var me,qe;const Le=(me=k==null?void 0:k.value)==null?void 0:me.mainKey,se=(qe=_==null?void 0:_.value)==null?void 0:qe.menu;if(Le){const _a=`${se==null?void 0:se.join("/")}^${Le}`,H=await U(_a);await Z(H);const V=y();V==null||V.forEach(ae=>{(ae==null?void 0:ae.prop)==="group"&&(ae.contents=W.value)}),E.value=V}};e.watch(()=>{var Le;return(Le=k==null?void 0:k.value)==null?void 0:Le.mainKey},async(Le,se)=>{Le!=se&&Le&&await ge()});const Ie=async Le=>{const se=Y.value[Le];fe.value=se,await ee()};e.watch(()=>{var Le;return(Le=k==null?void 0:k.value)==null?void 0:Le.group},async(Le,se)=>{Le!=se&&Le&&Ie(Le)});const ue=async()=>{var se;await ge();const Le=(se=k.value)==null?void 0:se.group;await Ie(Le)},B=e.ref([]),oe=e.ref({}),q=e.ref({}),ye=async Le=>{const se=Le==null?void 0:Le.join("/"),me=sessionStorage.getItem("systemKey");return await le.getItemData(se,me,"")},Ke=async Le=>{const se=await ye(Le);B.value=se==null?void 0:se.map(me=>{const{name:qe}=me;return oe.value[qe]=me,{label:qe,value:qe}})},Ae=async(Le,se)=>{await Ke(Le);const me=J();me==null||me.forEach(qe=>{(qe==null?void 0:qe.prop)==="group"&&(qe.contents=B.value)}),d.value=me};e.watch(()=>{var Le;return(Le=_==null?void 0:_.value)==null?void 0:Le.menu},async(Le,se)=>{const me=Le==null?void 0:Le.join("/"),qe=se==null?void 0:se.join("/");me!=qe&&await Ae(Le)});const Qe=(Le,se)=>{const me=se==null?void 0:se.find(H=>{const{key:V}=H;return V==="header"}),qe=(me==null?void 0:me.contents)||[],ka=qe==null?void 0:qe.filter((H,V)=>{const{label:ae}=H;return ae!=="操作"}),_a=ka==null?void 0:ka.map((H,V)=>{const{label:ae}=H;return{label:ae,value:V}});Le==null||Le.forEach(H=>{const V=H==null?void 0:H.prop;(V==="nameCol"||V==="valueCol")&&(H.contents=_a)})},Ea=Le=>{const{comp:se,compData:me}=q.value||{};if(se==="Table"){_.value.formItems=[];let qe=J();qe=qe.filter(ka=>{const{prop:_a}=ka;return _a!=="formItems"}),Qe(qe,me),d.value=qe}},ne=async Le=>{const se=oe.value[Le];q.value=se,await Ea()};e.watch(()=>{var Le;return(Le=_==null?void 0:_.value)==null?void 0:Le.group},async(Le,se)=>{Le!=se&&ne(Le)});const ua=async()=>{var me,qe;const Le=(me=_.value)==null?void 0:me.menu;await Ae(Le);const se=(qe=_.value)==null?void 0:qe.group;await ne(se)},Pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:_.value},{key:"chartDetailConfig",contents:k.value}]}),Re=()=>{i.visible=!1,w.visible=!1,L.visible=!1};return e.onMounted(async()=>{var se,me,qe;d.value=N(),E.value=S();const Le=n==null?void 0:n.itemContents;c.value=((se=Le==null?void 0:Le.find(ka=>ka.key==="chartBaseConfig"))==null?void 0:se.contents)??{},_.value=((me=Le==null?void 0:Le.find(ka=>ka.key==="chartDataConfig"))==null?void 0:me.contents)??{},await ua(),k.value=((qe=Le==null?void 0:Le.find(ka=>ka.key==="chartDetailConfig"))==null?void 0:qe.contents)??{},await ue()}),(Le,se)=>{const me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",s1,[se[4]||(se[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(me,{id:"themeButton",onClick:se[0]||(se[0]=qe=>u())},{default:e.withCtx(()=>se[3]||(se[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",c1,[se[6]||(se[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(me,{id:"themeButton",onClick:se[1]||(se[1]=qe=>F())},{default:e.withCtx(()=>se[5]||(se[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",u1,[se[8]||(se[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(me,{id:"themeButton",onClick:se[2]||(se[2]=qe=>O())},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Ir.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:Re,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",d1,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",p1,[e.createVNode(me,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(me,{class:"ok-button button",onClick:g,id:"themeButton"},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Ir.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:Re,width:w.width},{default:e.withCtx(()=>[e.createElementVNode("div",f1,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:A},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",h1,[e.createVNode(me,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>se[11]||(se[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(me,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>se[12]||(se[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Ir.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:Re,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",v1,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",m1,[e.createVNode(me,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>se[13]||(se[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(me,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>se[14]||(se[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),g1=nr._export_sfc(y1,[["__scopeId","data-v-88c50cdb"]]),b1={class:"layout"},k1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const i=e.computed(()=>M.cloneDeep(r==null?void 0:r.itemData)||[]),o=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(w=>{const{key:d}=w;return d==="baseConfig"});return m==null?void 0:m.contents}),f=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(w=>{const{key:d}=w;return d==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=M.cloneDeep(f.value)||[];const g=m.length;let w=0;const d=[];if(m=m.map(N=>{const _=N.span;return _?(N.span=Number(_),w=w+N.span):d.push(N),N}),w<24){const N=Math.floor((24-w)/g);d.forEach(_=>{_.span=N})}return m}),u=m=>{n("rowClick",m)};return(m,g)=>{var N;const w=e.resolveComponent("el-col"),d=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",b1,[e.createVNode(d,{style:e.normalizeStyle({height:(N=o.value)==null?void 0:N.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(_,J)=>(e.openBlock(),e.createBlock(w,{span:_==null?void 0:_.span},{default:e.withCtx(()=>{var A;return[e.unref(Li)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(_.comp)),{key:e.unref(ai),compName:_.name,index:(_==null?void 0:_.id)??J,height:(A=o.value)==null?void 0:A.height,itemData:_==null?void 0:_.compData,childItemData:_==null?void 0:_.itemChildData,onChange:e.unref(Ao),onContentChange:e.unref(zo),onPageChange:e.unref(Mo),onRowClick:u},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),x1=nr._export_sfc(k1,[["__scopeId","data-v-ab9a36ed"]]),w1={class:"layout-operate"},_1={class:"layout-module"},S1={class:"collapse-title-item"},E1={class:"collapse-title"},C1={class:"icon-content"},D1=["onClick"],T1={class:"comp-child"},B1=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{J()});const i=e.ref({}),o=e.ref({}),f=e.ref([]),c=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],u=k=>{o.value=k,r("change",S(),!0)},m=e.ref([]),g=e.ref([]),w=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],d=e.computed(()=>{const k=n==null?void 0:n.itemContents;return M.cloneDeep(k)}),N=e.computed(()=>{const k=d==null?void 0:d.value,y=k==null?void 0:k.find(x=>{const{key:O}=x;return O==="baseConfig"});return y==null?void 0:y.contents}),_=e.computed(()=>{const k=d==null?void 0:d.value,y=k==null?void 0:k.find(x=>{const{key:O}=x;return O==="children"});return y==null?void 0:y.contents}),J=()=>{var k;i.value=d.value||{},m.value=(_==null?void 0:_.value)||[],f.value=c(),f.value=(k=f.value)==null?void 0:k.map(y=>{var O;const{prop:x}=y;return y.value=(O=N.value)==null?void 0:O[x],y})};e.watch(()=>{var k;return(k=_==null?void 0:_.value)==null?void 0:k.length},()=>{var k;m.value=(_==null?void 0:_.value)||[],g.value=(k=_.value)==null?void 0:k.map(y=>w(y))},{immediate:!0});const A=(k,y)=>{const x=M.cloneDeep(_==null?void 0:_.value);x[y].span=k.span,m.value=x,r("change",S(),!0)},F=k=>Ri(k),L=(k,y,x)=>{if(!k)return;const O=M.cloneDeep(_==null?void 0:_.value);O[x]&&(O[x].compData=k,m.value=O,r("change",S(),!0))},E=k=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let y=M.cloneDeep(_==null?void 0:_.value);y=y==null?void 0:y.filter((x,O)=>k!==O),m.value=y,r("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(k,y)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",w1,[e.createElementVNode("div",_1,[y[1]||(y[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(pl.ssForm,{rowContents:f.value,isEnableWrap:!0,onChange:y[0]||(y[0]=O=>u(O))},null,8,["rowContents"])])]),e.createVNode(tc.default,{class:"collapse-content",collapseContents:_.value},{title:e.withCtx(({item:O,index:I})=>[e.createElementVNode("div",S1,[e.createElementVNode("div",E1,e.toDisplayString(O.name),1),e.createElementVNode("div",C1,[e.createElementVNode("div",{onClick:e.withModifiers(W=>E(I),["stop"]),class:"icon-content"},[e.createVNode(x,{name:"Delete",style:{width:"16px",height:"16px"}})],8,D1)])])]),content:e.withCtx(({item:O,index:I})=>[e.createElementVNode("div",T1,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:g.value[I],key:I,isEnableWrap:!0,onChange:W=>A(W,I)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(O.comp+"Operate")),{itemContents:O==null?void 0:O.compData,originalItemContents:O.compData,onChange:W=>L(W,O,I)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),N1=nr._export_sfc(B1,[["__scopeId","data-v-ba05456e"]]),A1=typeof window<"u";var Is;A1&&((Is=window==null?void 0:window.navigator)!=null&&Is.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function _n(a){return a==null}function Qc(){}const z1=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(z1)));function M1(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(i=>{i(...n)})}}}function Os(a,l=16){if(typeof a!="function")return Qc;const n=(...o)=>{a(...o)};if(l<=0)return eu(n);let r=0,i;return function(...o){const f=Date.now(),c=f-r;clearTimeout(i),c>=l?(r=f,n(...o)):i=setTimeout(()=>{r=Date.now(),n(...o)},Math.max(0,l-c))}}function I1(a,l=100){if(typeof a!="function")return Qc;const n=(...i)=>{a(...i)};if(l<=0)return eu(n);let r;return function(...i){clearTimeout(r),r=setTimeout(()=>{n(...i)},l)}}function eu(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...i){return n=i,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Yi=new Set,au=new WeakMap;function O1(){Yi.forEach(a=>{a(...au.get(a))}),Yi.clear()}function yn(a,...l){if(typeof a!="function")return a;au.set(a,l),!Yi.has(a)&&(Yi.add(a),Yi.size===1&&Promise.resolve().then(O1))}const lu=Symbol("LAYOUT_KEY"),ru=Symbol("EMITTER_KEY");function L1(a){let l=0,n;for(let r=0,i=a.length;r<i;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function At(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=R1(a[n]);return l}function R1(a){return{...a}}function nu(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,n){const r=ou(a),i=tu(a),o=Array(a.length);for(let f=0,c=i.length;f<c;f++){let u=i[f];u.static||(u=$1(r,u,l,n),r.push(u)),o[a.findIndex(m=>m.i===u.i)]=u,u.moved=!1}return o}function $1(a,l,n,r){if(n)for(;l.y>0&&!Ji(a,l);)l.y--;else if(r){const o=r[l.i].y;for(;l.y>o&&!Ji(a,l);)l.y--}let i;for(;i=Ji(a,l);)l.y=i.y+i.h;return l}function V1(a,l){const n=ou(a);for(let r=0,i=a.length;r<i;r++){const o=a[r];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)n.push(o);else for(;Ji(n,o);)o.y++}return a}function Ls(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function Ji(a,l){for(let n=0,r=a.length;n<r;n++)if(nu(a[n],l))return a[n]}function iu(a,l){return a.filter(n=>nu(n,l))}function ou(a){return a.filter(l=>l.static)}function zt(a,l,n,r,i=!1,o=!1){if(l.static)return a;const f=l.x,c=l.y,u=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=tu(a);u&&(m=m.reverse());const g=iu(m,l);if(o&&g.length)return l.x=f,l.y=c,l.moved=!1,a;for(let w=0,d=g.length;w<d;w++){const N=g[w];N.moved||l.y>N.y&&l.y-N.y>N.h/4||(N.static?a=Rs(a,N,l,i):a=Rs(a,l,N,i))}return a}function Rs(a,l,n,r){if(r){const i={x:n.x,y:n.y,w:n.w,h:n.h};if(i.y=Math.max(l.y-n.h,0),!Ji(a,i))return zt(a,n,void 0,i.y,!1)}return zt(a,n,void 0,n.y+1,!1)}function F1(a,l,n,r){const i="translate3d("+l+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:n+"px",height:r+"px",position:"absolute"}}function P1(a,l,n,r){const i="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:n+"px",height:r+"px",position:"absolute"}}function j1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function H1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function tu(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function U1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let i=0,o=a.length;i<o;i++){const f=a[i];for(let c=0;c<n.length;c++)if(typeof f[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+i+"]."+n[c]+" must be a number!");if(f.i===void 0||f.i===null)throw new Error("VueGridLayout: "+l+"["+i+"].i cannot be null!");if(typeof f.i!="number"&&typeof f.i!="string")throw new Error("VueGridLayout: "+l+"["+i+"].i must be a string or number!");if(r.indexOf(f.i)>=0)throw new Error("VueGridLayout: "+l+"["+i+"].i must be unique!");if(r.push(f.i),f.static!==void 0&&typeof f.static!="boolean")throw new Error("VueGridLayout: "+l+"["+i+"].static must be a boolean!")}}function q1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,i)=>`${n()}__${r}--${i}`}}function $s(a){return W1(a)}function W1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),i=a.clientX+n.scrollLeft-r.left,o=a.clientY+n.scrollTop-r.top;return{x:i,y:o}}function Vs(a,l,n,r){return G1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function G1(a){return typeof a=="number"&&!Number.isNaN(a)}function K1(a,l){const n=cu(a);let r=n[0];for(let i=1,o=n.length;i<o;i++){const f=n[i];l>a[f]&&(r=f)}return r}function su(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function Y1(a,l,n,r,i,o,f){if(l[r])return At(l[r]);let c=a;const u=cu(n),m=u.slice(u.indexOf(r));for(let g=0,w=m.length;g<w;g++){const d=m[g];if(l[d]){c=l[d];break}}return c=At(c||[]),Ai(V1(c,{cols:o}),f)}function cu(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let J1="auto";function X1(){return typeof document<"u"}function Fs(){return X1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):J1}var Gi={exports:{}},Z1=Gi.exports,Ps;function Q1(){return Ps||(Ps=1,function(a,l){(function(n,r){a.exports=r()})(Z1,function(){function n(s,t){var h=Object.keys(s);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(s);t&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(s,C).enumerable})),h.push.apply(h,b)}return h}function r(s){for(var t=1;t<arguments.length;t++){var h=arguments[t]!=null?arguments[t]:{};t%2?n(Object(h),!0).forEach(function(b){u(s,b,h[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(h)):n(Object(h)).forEach(function(b){Object.defineProperty(s,b,Object.getOwnPropertyDescriptor(h,b))})}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 f(s,t){for(var h=0;h<t.length;h++){var b=t[h];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(s,J(b.key),b)}}function c(s,t,h){return t&&f(s.prototype,t),Object.defineProperty(s,"prototype",{writable:!1}),s}function u(s,t,h){return(t=J(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&&w(s,t)}function g(s){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(s)}function w(s,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,b){return h.__proto__=b,h},w(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 N(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,b=g(s);if(t){var C=g(this).constructor;h=Reflect.construct(b,arguments,C)}else h=b.apply(this,arguments);return function($,K){if(K&&(typeof K=="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d($)}(this,h)}}function _(){return _=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(s,t,h){var b=function($,K){for(;!Object.prototype.hasOwnProperty.call($,K)&&($=g($))!==null;);return $}(s,t);if(b){var C=Object.getOwnPropertyDescriptor(b,t);return C.get?C.get.call(arguments.length<3?s:h):C.value}},_.apply(this,arguments)}function J(s){var t=function(h,b){if(typeof h!="object"||h===null)return h;var C=h[Symbol.toPrimitive];if(C!==void 0){var $=C.call(h,b);if(typeof $!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}(s,"string");return typeof t=="symbol"?t:t+""}var A=function(s){return!(!s||!s.Window)&&s instanceof s.Window},F=void 0,L=void 0;function E(s){F=s;var t=s.document.createTextNode("");t.ownerDocument!==s.document&&typeof s.wrap=="function"&&s.wrap(t)===t&&(s=s.wrap(s)),L=s}function S(s){return A(s)?s:(s.ownerDocument||s).defaultView||L.window}typeof window<"u"&&window&&E(window);var k=function(s){return!!s&&i(s)==="object"},y=function(s){return typeof s=="function"},x={window:function(s){return s===L||A(s)},docFrag:function(s){return k(s)&&s.nodeType===11},object:k,func:y,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)||L;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 k(s)&&!!s.constructor&&/function Object\b/.test(s.constructor.toString())},array:function(s){return k(s)&&s.length!==void 0&&y(s.splice)}};function O(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 I(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="drag"){var b=h.prepared.axis;if(b==="x"||b==="y"){var C=b==="x"?"y":"x";t.page[C]=h.coords.start.page[C],t.client[C]=h.coords.start.client[C],t.delta[C]=0}}}var W={id:"actions/drag",install:function(s){var t=s.actions,h=s.Interactable,b=s.defaults;h.prototype.draggable=W.draggable,t.map.drag=W,t.methodDict.drag="draggable",b.actions.drag=W.defaults},listeners:{"interactions:before-action-move":O,"interactions:action-resume":O,"interactions:action-move":I,"auto-start:check":function(s){var t=s.interaction,h=s.interactable,b=s.buttons,C=h.options.drag;if(C&&C.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(b&h.options.drag.mouseButtons)!=0))return s.action={name:"drag",axis:C.lockAxis==="start"?C.startAxis:C.lockAxis},!1}},draggable:function(s){return x.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):x.bool(s)?(this.options.drag.enabled=s,this):this.options.drag},beforeMove:O,move:I,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(s){return s.search("drag")===0}},Y=W,fe={init:function(s){var t=s;fe.document=t.document,fe.DocumentFragment=t.DocumentFragment||de,fe.SVGElement=t.SVGElement||de,fe.SVGSVGElement=t.SVGSVGElement||de,fe.SVGElementInstance=t.SVGElementInstance||de,fe.Element=t.Element||de,fe.HTMLElement=t.HTMLElement||fe.Element,fe.Event=t.Event,fe.Touch=t.Touch||de,fe.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function de(){}var j=fe,U={init:function(s){var t=j.Element,h=s.navigator||{};U.supportsTouch="ontouchstart"in s||x.func(s.DocumentTouch)&&j.document instanceof s.DocumentTouch,U.supportsPointerEvent=h.pointerEnabled!==!1&&!!j.PointerEvent,U.isIOS=/iP(hone|od|ad)/.test(h.platform),U.isIOS7=/iP(hone|od|ad)/.test(h.platform)&&/OS 7[^\d]/.test(h.appVersion),U.isIe9=/MSIE 9/.test(h.userAgent),U.isOperaMobile=h.appName==="Opera"&&U.supportsTouch&&/Presto/.test(h.userAgent),U.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",U.pEventTypes=U.supportsPointerEvent?j.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,U.wheelEvent=j.document&&"onmousewheel"in j.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Z=U;function ee(s,t){if(s.contains)return s.contains(t);for(;t;){if(t===s)return!0;t=t.parentNode}return!1}function ge(s,t){for(;x.element(s);){if(ue(s,t))return s;s=Ie(s)}return null}function Ie(s){var t=s.parentNode;if(x.docFrag(t)){for(;(t=t.host)&&x.docFrag(t););return t}return t}function ue(s,t){return L!==F&&(t=t.replace(/\/deep\//g," ")),s[Z.prefixedMatchesSelector](t)}var B=function(s){return s.parentNode||s.host};function oe(s,t){for(var h,b=[],C=s;(h=B(C))&&C!==t&&h!==C.ownerDocument;)b.unshift(C),C=h;return b}function q(s,t,h){for(;x.element(s);){if(ue(s,t))return!0;if((s=Ie(s))===h)return ue(s,t)}return!1}function ye(s){return s.correspondingUseElement||s}function Ke(s){var t=s instanceof j.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 Ae(s){var t,h=Ke(s);if(!Z.isIOS7&&h){var b={x:(t=(t=S(s))||L).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};h.left+=b.x,h.right+=b.x,h.top+=b.y,h.bottom+=b.y}return h}function Qe(s){for(var t=[];s;)t.push(s),s=Ie(s);return t}function Ea(s){return!!x.string(s)&&(j.document.querySelector(s),!0)}function ne(s,t){for(var h in t)s[h]=t[h];return s}function ua(s,t,h){return s==="parent"?Ie(h):s==="self"?t.getRect(h):ge(h,s)}function Pe(s,t,h,b){var C=s;return x.string(C)?C=ua(C,t,h):x.func(C)&&(C=C.apply(void 0,b)),x.element(C)&&(C=Ae(C)),C}function Re(s){return s&&{x:"x"in s?s.x:s.left,y:"y"in s?s.y:s.top}}function Le(s){return!s||"x"in s&&"y"in s||((s=ne({},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 se(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 me(s,t,h){var b=h&&s.options[h];return Re(Pe(b&&b.origin||s.options.origin,s,t,[s&&t]))||{x:0,y:0}}function qe(s,t){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(_e){return!0},b=arguments.length>3?arguments[3]:void 0;if(b=b||{},x.string(s)&&s.search(" ")!==-1&&(s=ka(s)),x.array(s))return s.forEach(function(_e){return qe(_e,t,h,b)}),b;if(x.object(s)&&(t=s,s=""),x.func(t)&&h(s))b[s]=b[s]||[],b[s].push(t);else if(x.array(t))for(var C=0,$=t;C<$.length;C++){var K=$[C];qe(s,K,h,b)}else if(x.object(t))for(var X in t)qe(ka(X).map(function(_e){return"".concat(s).concat(_e)}),t[X],h,b);return b}function ka(s){return s.trim().split(/ +/)}var _a=function(s,t){return Math.sqrt(s*s+t*t)},H=["webkit","moz"];function V(s,t){s.__set||(s.__set={});var h=function(C){if(H.some(function($){return C.indexOf($)===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($){s.__set[C]=$},configurable:!0})};for(var b in t)h(b);return s}function ae(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 pe(s){s.page.x=0,s.page.y=0,s.client.x=0,s.client.y=0}function ve(s){return s instanceof j.Event||s instanceof j.Touch}function da(s,t,h){return s=s||"page",(h=h||{}).x=t[s+"X"],h.y=t[s+"Y"],h}function ca(s,t){return t=t||{x:0,y:0},Z.isOperaMobile&&ve(s)?(da("screen",s,t),t.x+=window.scrollX,t.y+=window.scrollY):da("page",s,t),t}function Ue(s){return x.number(s.pointerId)?s.pointerId:s.identifier}function Sa(s,t,h){var b=t.length>1?Te(t):t[0];ca(b,s.page),function(C,$){$=$||{},Z.isOperaMobile&&ve(C)?da("screen",C,$):da("client",C,$)}(b,s.client),s.timeStamp=h}function Ma(s){var t=[];return x.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 Te(s){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},h=0;h<s.length;h++){var b=s[h];for(var C in t)t[C]+=b[C]}for(var $ in t)t[$]/=s.length;return t}function Fa(s){if(!s.length)return null;var t=Ma(s),h=Math.min(t[0].pageX,t[1].pageX),b=Math.min(t[0].pageY,t[1].pageY),C=Math.max(t[0].pageX,t[1].pageX),$=Math.max(t[0].pageY,t[1].pageY);return{x:h,y:b,left:h,top:b,right:C,bottom:$,width:C-h,height:$-b}}function Na(s,t){var h=t+"X",b=t+"Y",C=Ma(s),$=C[0][h]-C[1][h],K=C[0][b]-C[1][b];return _a($,K)}function oa(s,t){var h=t+"X",b=t+"Y",C=Ma(s),$=C[1][h]-C[0][h],K=C[1][b]-C[0][b];return 180*Math.atan2(K,$)/Math.PI}function ja(s){return x.string(s.pointerType)?s.pointerType:x.number(s.pointerType)?[void 0,void 0,"touch","pen","mouse"][s.pointerType]:/touch/.test(s.type||"")||s instanceof j.Touch?"touch":"mouse"}function aa(s){var t=x.func(s.composedPath)?s.composedPath():s.path;return[ye(t?t[0]:s.target),ye(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 pa=function(s,t){for(var h=0;h<t.length;h++){var b=t[h];s.push(b)}return s},te=function(s){return pa([],s)},ce=function(s,t){for(var h=0;h<s.length;h++)if(t(s[h],h,s))return h;return-1},Se=function(s,t){return s[ce(s,t)]},we=function(s){m(h,s);var t=N(h);function h(b,C,$){var K;o(this,h),(K=t.call(this,C._interaction)).dropzone=void 0,K.dragEvent=void 0,K.relatedTarget=void 0,K.draggable=void 0,K.propagationStopped=!1,K.immediatePropagationStopped=!1;var X=$==="dragleave"?b.prev:b.cur,_e=X.element,We=X.dropzone;return K.type=$,K.target=_e,K.currentTarget=_e,K.dropzone=We,K.dragEvent=C,K.relatedTarget=C.target,K.draggable=C.interactable,K.timeStamp=C.timeStamp,K}return c(h,[{key:"reject",value:function(){var b=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 $=C.activeDrops,K=ce($,function(_e){var We=_e.dropzone,Ce=_e.element;return We===b.dropzone&&Ce===b.target});C.activeDrops.splice(K,1);var X=new h(C,this.dragEvent,"dropdeactivate");X.dropzone=this.dropzone,X.target=this.target,this.dropzone.fire(X)}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 fa(s,t){for(var h=0,b=s.slice();h<b.length;h++){var C=b[h],$=C.dropzone,K=C.element;t.dropzone=$,t.target=K,$.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ea(s,t){for(var h=function($,K){for(var X=[],_e=0,We=$.interactables.list;_e<We.length;_e++){var Ce=We[_e];if(Ce.options.drop.enabled){var na=Ce.options.drop.accept;if(!(x.element(na)&&na!==K||x.string(na)&&!ue(K,na)||x.func(na)&&!na({dropzone:Ce,draggableElement:K})))for(var Oa=0,ll=Ce.getAllElements();Oa<ll.length;Oa++){var Qa=ll[Oa];Qa!==K&&X.push({dropzone:Ce,element:Qa,rect:Ce.getRect(Qa)})}}}return X}(s,t),b=0;b<h.length;b++){var C=h[b];C.rect=C.dropzone.getRect(C.element)}return h}function Ta(s,t,h){for(var b=s.dropState,C=s.interactable,$=s.element,K=[],X=0,_e=b.activeDrops;X<_e.length;X++){var We=_e[X],Ce=We.dropzone,na=We.element,Oa=We.rect,ll=Ce.dropCheck(t,h,C,$,na,Oa);K.push(ll?na:null)}var Qa=function(cl){for(var Cl,_l,Vl,Xl=[],cr=0;cr<cl.length;cr++){var Ul=cl[cr],Ql=cl[Cl];if(Ul&&cr!==Cl)if(Ql){var cn=B(Ul),Gl=B(Ql);if(cn!==Ul.ownerDocument)if(Gl!==Ul.ownerDocument)if(cn!==Gl){Xl=Xl.length?Xl:oe(Ql);var mn=void 0;if(Ql instanceof j.HTMLElement&&Ul instanceof j.SVGElement&&!(Ul instanceof j.SVGSVGElement)){if(Ul===Gl)continue;mn=Ul.ownerSVGElement}else mn=Ul;for(var Kr=oe(mn,Ql.ownerDocument),Nn=0;Kr[Nn]&&Kr[Nn]===Xl[Nn];)Nn++;var hn=[Kr[Nn-1],Kr[Nn],Xl[Nn]];if(hn[0])for(var ui=hn[0].lastChild;ui;){if(ui===hn[1]){Cl=cr,Xl=Kr;break}if(ui===hn[2])break;ui=ui.previousSibling}}else Vl=Ql,(parseInt(S(_l=Ul).getComputedStyle(_l).zIndex,10)||0)>=(parseInt(S(Vl).getComputedStyle(Vl).zIndex,10)||0)&&(Cl=cr);else Cl=cr}else Cl=cr}return Cl}(K);return b.activeDrops[Qa]||null}function Ee(s,t,h){var b=s.dropState,C={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return h.type==="dragstart"&&(C.activate=new we(b,h,"dropactivate"),C.activate.target=null,C.activate.dropzone=null),h.type==="dragend"&&(C.deactivate=new we(b,h,"dropdeactivate"),C.deactivate.target=null,C.deactivate.dropzone=null),b.rejected||(b.cur.element!==b.prev.element&&(b.prev.dropzone&&(C.leave=new we(b,h,"dragleave"),h.dragLeave=C.leave.target=b.prev.element,h.prevDropzone=C.leave.dropzone=b.prev.dropzone),b.cur.dropzone&&(C.enter=new we(b,h,"dragenter"),h.dragEnter=b.cur.element,h.dropzone=b.cur.dropzone)),h.type==="dragend"&&b.cur.dropzone&&(C.drop=new we(b,h,"drop"),h.dropzone=b.cur.dropzone,h.relatedTarget=b.cur.element),h.type==="dragmove"&&b.cur.dropzone&&(C.move=new we(b,h,"dropmove"),h.dropzone=b.cur.dropzone)),C}function Me(s,t){var h=s.dropState,b=h.activeDrops,C=h.cur,$=h.prev;t.leave&&$.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&&fa(b,t.deactivate),h.prev.dropzone=C.dropzone,h.prev.element=C.element}function Fe(s,t){var h=s.interaction,b=s.iEvent,C=s.event;if(b.type==="dragmove"||b.type==="dragend"){var $=h.dropState;t.dynamicDrop&&($.activeDrops=ea(t,h.element));var K=b,X=Ta(h,K,C);$.rejected=$.rejected&&!!X&&X.dropzone===$.cur.dropzone&&X.element===$.cur.element,$.cur.dropzone=X&&X.dropzone,$.cur.element=X&&X.element,$.events=Ee(h,0,K)}}var $e={id:"actions/drop",install:function(s){var t=s.actions,h=s.interactStatic,b=s.Interactable,C=s.defaults;s.usePlugin(Y),b.prototype.dropzone=function($){return function(K,X){if(x.object(X)){if(K.options.drop.enabled=X.enabled!==!1,X.listeners){var _e=qe(X.listeners),We=Object.keys(_e).reduce(function(na,Oa){return na[/^(enter|leave)/.test(Oa)?"drag".concat(Oa):/^(activate|deactivate|move)/.test(Oa)?"drop".concat(Oa):Oa]=_e[Oa],na},{}),Ce=K.options.drop.listeners;Ce&&K.off(Ce),K.on(We),K.options.drop.listeners=We}return x.func(X.ondrop)&&K.on("drop",X.ondrop),x.func(X.ondropactivate)&&K.on("dropactivate",X.ondropactivate),x.func(X.ondropdeactivate)&&K.on("dropdeactivate",X.ondropdeactivate),x.func(X.ondragenter)&&K.on("dragenter",X.ondragenter),x.func(X.ondragleave)&&K.on("dragleave",X.ondragleave),x.func(X.ondropmove)&&K.on("dropmove",X.ondropmove),/^(pointer|center)$/.test(X.overlap)?K.options.drop.overlap=X.overlap:x.number(X.overlap)&&(K.options.drop.overlap=Math.max(Math.min(1,X.overlap),0)),"accept"in X&&(K.options.drop.accept=X.accept),"checker"in X&&(K.options.drop.checker=X.checker),K}return x.bool(X)?(K.options.drop.enabled=X,K):K.options.drop}(this,$)},b.prototype.dropCheck=function($,K,X,_e,We,Ce){return function(na,Oa,ll,Qa,cl,Cl,_l){var Vl=!1;if(!(_l=_l||na.getRect(Cl)))return!!na.options.drop.checker&&na.options.drop.checker(Oa,ll,Vl,na,Cl,Qa,cl);var Xl=na.options.drop.overlap;if(Xl==="pointer"){var cr=me(Qa,cl,"drag"),Ul=ca(Oa);Ul.x+=cr.x,Ul.y+=cr.y;var Ql=Ul.x>_l.left&&Ul.x<_l.right,cn=Ul.y>_l.top&&Ul.y<_l.bottom;Vl=Ql&&cn}var Gl=Qa.getRect(cl);if(Gl&&Xl==="center"){var mn=Gl.left+Gl.width/2,Kr=Gl.top+Gl.height/2;Vl=mn>=_l.left&&mn<=_l.right&&Kr>=_l.top&&Kr<=_l.bottom}return Gl&&x.number(Xl)&&(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)>=Xl),na.options.drop.checker&&(Vl=na.options.drop.checker(Oa,ll,Vl,na,Cl,Qa,cl)),Vl}(this,$,K,X,_e,We,Ce)},h.dynamicDrop=function($){return x.bool($)?(s.dynamicDrop=$,h):s.dynamicDrop},ne(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",s.dynamicDrop=!1,C.actions.drop=$e.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,b=(s.event,s.iEvent);if(h.prepared.name==="drag"){var C=h.dropState;C.activeDrops=[],C.events={},C.activeDrops=ea(t,h.element),C.events=Ee(h,0,b),C.events.activate&&(fa(C.activeDrops,C.events.activate),t.fire("actions/drop:start",{interaction:h,dragEvent:b}))}},"interactions:action-move":Fe,"interactions:after-action-move":function(s,t){var h=s.interaction,b=s.iEvent;if(h.prepared.name==="drag"){var C=h.dropState;Me(h,C.events),t.fire("actions/drop:move",{interaction:h,dragEvent:b}),C.events={}}},"interactions:action-end":function(s,t){if(s.interaction.prepared.name==="drag"){var h=s.interaction,b=s.iEvent;Fe(s,t),Me(h,h.dropState.events),t.fire("actions/drop:end",{interaction:h,dragEvent:b})}},"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:ea,getDrop:Ta,getDropEvents:Ee,fireDropEvents:Me,filterEventType:function(s){return s.search("drag")===0||s.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},he=$e;function tl(s){var t=s.interaction,h=s.iEvent,b=s.phase;if(t.prepared.name==="gesture"){var C=t.pointers.map(function(We){return We.pointer}),$=b==="start",K=b==="end",X=t.interactable.options.deltaSource;if(h.touches=[C[0],C[1]],$)h.distance=Na(C,X),h.box=Fa(C),h.scale=1,h.ds=0,h.angle=oa(C,X),h.da=0,t.gesture.startDistance=h.distance,t.gesture.startAngle=h.angle;else if(K||t.pointers.length<2){var _e=t.prevEvent;h.distance=_e.distance,h.box=_e.box,h.scale=_e.scale,h.ds=0,h.angle=_e.angle,h.da=0}else h.distance=Na(C,X),h.box=Fa(C),h.scale=h.distance/t.gesture.startDistance,h.angle=oa(C,X),h.ds=h.scale-t.gesture.scale,h.da=h.angle-t.gesture.angle;t.gesture.distance=h.distance,t.gesture.angle=h.angle,x.number(h.scale)&&h.scale!==1/0&&!isNaN(h.scale)&&(t.gesture.scale=h.scale)}}var El={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(s){var t=s.actions,h=s.Interactable,b=s.defaults;h.prototype.gesturable=function(C){return x.object(C)?(this.options.gesture.enabled=C.enabled!==!1,this.setPerAction("gesture",C),this.setOnEvents("gesture",C),this):x.bool(C)?(this.options.gesture.enabled=C,this):this.options.gesture},t.map.gesture=El,t.methodDict.gesture="gesturable",b.actions.gesture=El.defaults},listeners:{"interactions:action-start":tl,"interactions:action-move":tl,"interactions:action-end":tl,"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}},Ml=El;function Hl(s,t,h,b,C,$,K){if(!t)return!1;if(t===!0){var X=x.number($.width)?$.width:$.right-$.left,_e=x.number($.height)?$.height:$.bottom-$.top;if(K=Math.min(K,Math.abs((s==="left"||s==="right"?X:_e)/2)),X<0&&(s==="left"?s="right":s==="right"&&(s="left")),_e<0&&(s==="top"?s="bottom":s==="bottom"&&(s="top")),s==="left"){var We=X>=0?$.left:$.right;return h.x<We+K}if(s==="top"){var Ce=_e>=0?$.top:$.bottom;return h.y<Ce+K}if(s==="right")return h.x>(X>=0?$.right:$.left)-K;if(s==="bottom")return h.y>(_e>=0?$.bottom:$.top)-K}return!!x.element(b)&&(x.element(t)?t===b:q(b,t,C))}function Bl(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.resizeAxes){var b=t;h.interactable.options.resize.square?(h.resizeAxes==="y"?b.delta.x=b.delta.y:b.delta.y=b.delta.x,b.axes="xy"):(b.axes=h.resizeAxes,h.resizeAxes==="x"?b.delta.y=0:h.resizeAxes==="y"&&(b.delta.x=0))}}var jl,el,$l={id:"actions/resize",before:["actions/drag"],install:function(s){var t=s.actions,h=s.browser,b=s.Interactable,C=s.defaults;$l.cursors=function($){return $.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),$l.defaultMargin=h.supportsTouch||h.supportsPointerEvent?20:10,b.prototype.resizable=function($){return function(K,X,_e){return x.object(X)?(K.options.resize.enabled=X.enabled!==!1,K.setPerAction("resize",X),K.setOnEvents("resize",X),x.string(X.axis)&&/^x$|^y$|^xy$/.test(X.axis)?K.options.resize.axis=X.axis:X.axis===null&&(K.options.resize.axis=_e.defaults.actions.resize.axis),x.bool(X.preserveAspectRatio)?K.options.resize.preserveAspectRatio=X.preserveAspectRatio:x.bool(X.square)&&(K.options.resize.square=X.square),K):x.bool(X)?(K.options.resize.enabled=X,K):K.options.resize}(this,$,s)},t.map.resize=$l,t.methodDict.resize="resizable",C.actions.resize=$l.defaults},listeners:{"interactions:new":function(s){s.interaction.resizeAxes="xy"},"interactions:action-start":function(s){(function(t){var h=t.iEvent,b=t.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var C=h,$=b.rect;b._rects={start:ne({},$),corrected:ne({},$),previous:ne({},$),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},C.edges=b.prepared.edges,C.rect=b._rects.corrected,C.deltaRect=b._rects.delta}})(s),Bl(s)},"interactions:action-move":function(s){(function(t){var h=t.iEvent,b=t.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var C=h,$=b.interactable.options.resize.invert,K=$==="reposition"||$==="negate",X=b.rect,_e=b._rects,We=_e.start,Ce=_e.corrected,na=_e.delta,Oa=_e.previous;if(ne(Oa,Ce),K){if(ne(Ce,X),$==="reposition"){if(Ce.top>Ce.bottom){var ll=Ce.top;Ce.top=Ce.bottom,Ce.bottom=ll}if(Ce.left>Ce.right){var Qa=Ce.left;Ce.left=Ce.right,Ce.right=Qa}}}else Ce.top=Math.min(X.top,We.bottom),Ce.bottom=Math.max(X.bottom,We.top),Ce.left=Math.min(X.left,We.right),Ce.right=Math.max(X.right,We.left);for(var cl in Ce.width=Ce.right-Ce.left,Ce.height=Ce.bottom-Ce.top,Ce)na[cl]=Ce[cl]-Oa[cl];C.edges=b.prepared.edges,C.rect=Ce,C.deltaRect=na}})(s),Bl(s)},"interactions:action-end":function(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.prepared.edges){var b=t;b.edges=h.prepared.edges,b.rect=h._rects.corrected,b.deltaRect=h._rects.delta}},"auto-start:check":function(s){var t=s.interaction,h=s.interactable,b=s.element,C=s.rect,$=s.buttons;if(C){var K=ne({},t.coords.cur.page),X=h.options.resize;if(X&&X.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||($&X.mouseButtons)!=0)){if(x.object(X.edges)){var _e={left:!1,right:!1,top:!1,bottom:!1};for(var We in _e)_e[We]=Hl(We,X.edges[We],K,t._latestPointer.eventTarget,b,C,X.margin||$l.defaultMargin);_e.left=_e.left&&!_e.right,_e.top=_e.top&&!_e.bottom,(_e.left||_e.right||_e.top||_e.bottom)&&(s.action={name:"resize",edges:_e})}else{var Ce=X.axis!=="y"&&K.x>C.right-$l.defaultMargin,na=X.axis!=="x"&&K.y>C.bottom-$l.defaultMargin;(Ce||na)&&(s.action={name:"resize",axes:(Ce?"x":"")+(na?"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,b=s.name,C=$l.cursors,$=null;if(h)$=C[b+h];else if(t){for(var K="",X=0,_e=["top","bottom","left","right"];X<_e.length;X++){var We=_e[X];t[We]&&(K+=We)}$=C[K]}return $},filterEventType:function(s){return s.search("resize")===0},defaultMargin:null},Wa=$l,Kl={id:"actions",install:function(s){s.usePlugin(Ml),s.usePlugin(Wa),s.usePlugin(Y),s.usePlugin(he)}},Jl=0,ar={request:function(s){return jl(s)},cancel:function(s){return el(s)},init:function(s){if(jl=s.requestAnimationFrame,el=s.cancelAnimationFrame,!jl)for(var t=["ms","moz","webkit","o"],h=0;h<t.length;h++){var b=t[h];jl=s["".concat(b,"RequestAnimationFrame")],el=s["".concat(b,"CancelAnimationFrame")]||s["".concat(b,"CancelRequestAnimationFrame")]}jl=jl&&jl.bind(s),el=el&&el.bind(s),jl||(jl=function(C){var $=Date.now(),K=Math.max(0,16-($-Jl)),X=s.setTimeout(function(){C($+K)},K);return Jl=$+K,X},el=function(C){return clearTimeout(C)})}},xl={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){xl.isScrolling=!0,ar.cancel(xl.i),s.autoScroll=xl,xl.interaction=s,xl.prevTime=xl.now(),xl.i=ar.request(xl.scroll)},stop:function(){xl.isScrolling=!1,xl.interaction&&(xl.interaction.autoScroll=null),ar.cancel(xl.i)},scroll:function(){var s=xl.interaction,t=s.interactable,h=s.element,b=s.prepared.name,C=t.options[b].autoScroll,$=br(C.container,t,h),K=xl.now(),X=(K-xl.prevTime)/1e3,_e=C.speed*X;if(_e>=1){var We={x:xl.x*_e,y:xl.y*_e};if(We.x||We.y){var Ce=ya($);x.window($)?$.scrollBy(We.x,We.y):$&&($.scrollLeft+=We.x,$.scrollTop+=We.y);var na=ya($),Oa={x:na.x-Ce.x,y:na.y-Ce.y};(Oa.x||Oa.y)&&t.fire({type:"autoscroll",target:h,interactable:t,delta:Oa,interaction:s,container:$})}xl.prevTime=K}xl.isScrolling&&(ar.cancel(xl.i),xl.i=ar.request(xl.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()&&xl.check(t.interactable,t.prepared.name))if(t.simulation)xl.x=xl.y=0;else{var b,C,$,K,X=t.interactable,_e=t.element,We=t.prepared.name,Ce=X.options[We].autoScroll,na=br(Ce.container,X,_e);if(x.window(na))K=h.clientX<xl.margin,b=h.clientY<xl.margin,C=h.clientX>na.innerWidth-xl.margin,$=h.clientY>na.innerHeight-xl.margin;else{var Oa=Ke(na);K=h.clientX<Oa.left+xl.margin,b=h.clientY<Oa.top+xl.margin,C=h.clientX>Oa.right-xl.margin,$=h.clientY>Oa.bottom-xl.margin}xl.x=C?1:K?-1:0,xl.y=$?1:b?-1:0,xl.isScrolling||(xl.margin=Ce.margin,xl.speed=Ce.speed,xl.start(t))}}};function br(s,t,h){return(x.string(s)?ua(s,t,h):s)||S(h)}function ya(s){return x.window(s)&&(s=window.document.body),{x:s.scrollLeft,y:s.scrollTop}}var sl={id:"auto-scroll",install:function(s){var t=s.defaults,h=s.actions;s.autoScroll=xl,xl.now=function(){return s.now()},h.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=xl.defaults},listeners:{"interactions:new":function(s){s.interaction.autoScroll=null},"interactions:destroy":function(s){s.interaction.autoScroll=null,xl.stop(),xl.interaction&&(xl.interaction=null)},"interactions:stop":xl.stop,"interactions:action-move":function(s){return xl.onInteractionMove(s)}}},ha=sl;function Ha(s,t){var h=!1;return function(){return h||(L.console.warn(t),h=!0),s.apply(this,arguments)}}function ra(s,t){return s.name=t.name,s.axis=t.axis,s.edges=t.edges,s}function Ga(s){return x.bool(s)?(this.options.styleCursor=s,this):s===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wl(s){return x.func(s)?(this.options.actionChecker=s,this):s===null?(delete this.options.actionChecker,this):this.options.actionChecker}var De={id:"auto-start/interactableMethods",install:function(s){var t=s.Interactable;t.prototype.getAction=function(h,b,C,$){var K=function(X,_e,We,Ce,na){var Oa=X.getRect(Ce),ll=_e.buttons||{0:1,1:4,3:8,4:16}[_e.button],Qa={action:null,interactable:X,interaction:We,element:Ce,rect:Oa,buttons:ll};return na.fire("auto-start:check",Qa),Qa.action}(this,b,C,$,s);return this.options.actionChecker?this.options.actionChecker(h,b,K,this,$,C):K},t.prototype.ignoreFrom=Ha(function(h){return this._backCompatOption("ignoreFrom",h)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Ha(function(h){return this._backCompatOption("allowFrom",h)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=wl,t.prototype.styleCursor=Ga}};function ia(s,t,h,b,C){return t.testIgnoreAllow(t.options[s.name],h,b)&&t.options[s.name].enabled&&al(t,h,s,C)?s:null}function Pa(s,t,h,b,C,$,K){for(var X=0,_e=b.length;X<_e;X++){var We=b[X],Ce=C[X],na=We.getAction(t,h,s,Ce);if(na){var Oa=ia(na,We,Ce,$,K);if(Oa)return{action:Oa,interactable:We,element:Ce}}}return{action:null,interactable:null,element:null}}function Be(s,t,h,b,C){var $=[],K=[],X=b;function _e(Ce){$.push(Ce),K.push(X)}for(;x.element(X);){$=[],K=[],C.interactables.forEachMatch(X,_e);var We=Pa(s,t,h,$,K,b,C);if(We.action&&!We.interactable.options[We.action.name].manualStart)return We;X=Ie(X)}return{action:null,interactable:null,element:null}}function La(s,t,h){var b=t.action,C=t.interactable,$=t.element;b=b||{name:null},s.interactable=C,s.element=$,ra(s.prepared,b),s.rect=C&&b.name?C.getRect($):null,Oe(s,h),h.fire("autoStart:prepared",{interaction:s})}function al(s,t,h,b){var C=s.options,$=C[h.name].max,K=C[h.name].maxPerElement,X=b.autoStart.maxInteractions,_e=0,We=0,Ce=0;if(!($&&K&&X))return!1;for(var na=0,Oa=b.interactions.list;na<Oa.length;na++){var ll=Oa[na],Qa=ll.prepared.name;if(ll.interacting()&&(++_e>=X||ll.interactable===s&&((We+=Qa===h.name?1:0)>=$||ll.element===t&&(Ce++,Qa===h.name&&Ce>=K))))return!1}return X>0}function bl(s,t){return x.number(s)?(t.autoStart.maxInteractions=s,this):t.autoStart.maxInteractions}function Tl(s,t,h){var b=h.autoStart.cursorElement;b&&b!==s&&(b.style.cursor=""),s.ownerDocument.documentElement.style.cursor=t,s.style.cursor=t,h.autoStart.cursorElement=t?s:null}function Oe(s,t){var h=s.interactable,b=s.element,C=s.prepared;if(s.pointerType==="mouse"&&h&&h.options.styleCursor){var $="";if(C.name){var K=h.options[C.name].cursorChecker;$=x.func(K)?K(C,h,b,s._interacting):t.actions.map[C.name].getCursor(C)}Tl(s.element,$||"",t)}else t.autoStart.cursorElement&&Tl(t.autoStart.cursorElement,"",t)}var ma={id:"auto-start/base",before:["actions"],install:function(s){var t=s.interactStatic,h=s.defaults;s.usePlugin(De),h.base.actionChecker=null,h.base.styleCursor=!0,ne(h.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(b){return bl(b,s)},s.autoStart={maxInteractions:1/0,withinInteractionLimit:al,cursorElement:null}},listeners:{"interactions:down":function(s,t){var h=s.interaction,b=s.pointer,C=s.event,$=s.eventTarget;h.interacting()||La(h,Be(h,b,C,$,t),t)},"interactions:move":function(s,t){(function(h,b){var C=h.interaction,$=h.pointer,K=h.event,X=h.eventTarget;C.pointerType!=="mouse"||C.pointerIsDown||C.interacting()||La(C,Be(C,$,K,X,b),b)})(s,t),function(h,b){var C=h.interaction;if(C.pointerIsDown&&!C.interacting()&&C.pointerWasMoved&&C.prepared.name){b.fire("autoStart:before-start",h);var $=C.interactable,K=C.prepared.name;K&&$&&($.options[K].manualStart||!al($,C.element,C.prepared,b)?C.stop():(C.start(C.prepared,$,C.element),Oe(C,b)))}}(s,t)},"interactions:stop":function(s,t){var h=s.interaction,b=h.interactable;b&&b.options.styleCursor&&Tl(h.element,"",t)}},maxInteractions:bl,withinInteractionLimit:al,validateAction:ia},ta=ma,xa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(s,t){var h=s.interaction,b=s.eventTarget,C=s.dx,$=s.dy;if(h.prepared.name==="drag"){var K=Math.abs(C),X=Math.abs($),_e=h.interactable.options.drag,We=_e.startAxis,Ce=K>X?"x":K<X?"y":"xy";if(h.prepared.axis=_e.lockAxis==="start"?Ce[0]:_e.lockAxis,Ce!=="xy"&&We!=="xy"&&We!==Ce){h.prepared.name=null;for(var na=b,Oa=function(Qa){if(Qa!==h.interactable){var cl=h.interactable.options.drag;if(!cl.manualStart&&Qa.testIgnoreAllow(cl,na,b)){var Cl=Qa.getAction(h.downPointer,h.downEvent,h,na);if(Cl&&Cl.name==="drag"&&function(_l,Vl){if(!Vl)return!1;var Xl=Vl.options.drag.startAxis;return _l==="xy"||Xl==="xy"||Xl===_l}(Ce,Qa)&&ta.validateAction(Cl,Qa,na,b,t))return Qa}}};x.element(na);){var ll=t.interactables.forEachMatch(na,Oa);if(ll){h.prepared.name="drag",h.interactable=ll,h.element=na;break}na=Ie(na)}}}}}};function ga(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 fl={id:"auto-start/hold",install:function(s){var t=s.defaults;s.usePlugin(ta),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=ga(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;ga(t)>0&&(t.prepared.name=null)}},getHoldDuration:ga},Ve=fl,ml={id:"auto-start",install:function(s){s.usePlugin(ta),s.usePlugin(Ve),s.usePlugin(xa)}},Ne=function(s){return/^(always|never|auto)$/.test(s)?(this.options.preventDefault=s,this):x.bool(s)?(this.options.preventDefault=s?"always":"never",this):this.options.preventDefault};function Pl(s){var t=s.interaction,h=s.event;t.interactable&&t.interactable.checkAndPreventDefault(h)}var Da={id:"core/interactablePreventDefault",install:function(s){var t=s.Interactable;t.prototype.preventDefault=Ne,t.prototype.checkAndPreventDefault=function(h){return function(b,C,$){var K=b.options.preventDefault;if(K!=="never")if(K!=="always"){if(C.events.supportsPassive&&/^touch(start|move)$/.test($.type)){var X=S($.target).document,_e=C.getDocOptions(X);if(!_e||!_e.events||_e.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test($.type)||x.element($.target)&&ue($.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||$.preventDefault()}else $.preventDefault()}(this,s,h)},s.interactions.docEvents.push({type:"dragstart",listener:function(h){for(var b=0,C=s.interactions.list;b<C.length;b++){var $=C[b];if($.element&&($.element===h.target||ee($.element,h.target)))return void $.interactable.checkAndPreventDefault(h)}}})},listeners:["down","move","up","cancel"].reduce(function(s,t){return s["interactions:".concat(t)]=Pl,s},{})};function ul(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 Za(s){var t={};for(var h in s){var b=s[h];x.plainObject(b)?t[h]=Za(b):x.array(b)?t[h]=te(b):t[h]=b}return t}var Nl=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=Ba(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(s,[{key:"start",value:function(t,h){var b,C,$=t.phase,K=this.interaction,X=function(We){var Ce=We.interactable.options[We.prepared.name],na=Ce.modifiers;return na&&na.length?na:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Oa){var ll=Ce[Oa];return ll&&ll.enabled&&{options:ll,methods:ll._methods}}).filter(function(Oa){return!!Oa})}(K);this.prepareStates(X),this.startEdges=ne({},K.edges),this.edges=ne({},this.startEdges),this.startOffset=(b=K.rect,C=h,b?{left:C.x-b.left,top:C.y-b.top,right:b.right-C.x,bottom:b.bottom-C.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var _e=this.fillArg({phase:$,pageCoords:h,preEnd:!1});return this.result=Ba(),this.startAll(_e),this.result=this.setAll(_e)}},{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,b=this.states;h<b.length;h++){var C=b[h];C.methods.start&&(t.state=C,C.methods.start(t))}}},{key:"setAll",value:function(t){var h=t.phase,b=t.preEnd,C=t.skipModifiers,$=t.rect,K=t.edges;t.coords=ne({},t.pageCoords),t.rect=ne({},$),t.edges=ne({},K);for(var X=C?this.states.slice(C):this.states,_e=Ba(t.coords,t.rect),We=0;We<X.length;We++){var Ce,na=X[We],Oa=na.options,ll=ne({},t.coords),Qa=null;(Ce=na.methods)!=null&&Ce.set&&this.shouldDo(Oa,b,h)&&(t.state=na,Qa=na.methods.set(t),se(t.edges,t.rect,{x:t.coords.x-ll.x,y:t.coords.y-ll.y})),_e.eventProps.push(Qa)}ne(this.edges,t.edges),_e.delta.x=t.coords.x-t.pageCoords.x,_e.delta.y=t.coords.y-t.pageCoords.y,_e.rectDelta.left=t.rect.left-$.left,_e.rectDelta.right=t.rect.right-$.right,_e.rectDelta.top=t.rect.top-$.top,_e.rectDelta.bottom=t.rect.bottom-$.bottom;var cl=this.result.coords,Cl=this.result.rect;if(cl&&Cl){var _l=_e.rect.left!==Cl.left||_e.rect.right!==Cl.right||_e.rect.top!==Cl.top||_e.rect.bottom!==Cl.bottom;_e.changed=_l||cl.x!==_e.coords.x||cl.y!==_e.coords.y}return _e}},{key:"applyToInteraction",value:function(t){var h=this.interaction,b=t.phase,C=h.coords.cur,$=h.coords.start,K=this.result,X=this.startDelta,_e=K.delta;b==="start"&&ne(this.startDelta,K.delta);for(var We=0,Ce=[[$,X],[C,_e]];We<Ce.length;We++){var na=Ce[We],Oa=na[0],ll=na[1];Oa.page.x+=ll.x,Oa.page.y+=ll.y,Oa.client.x+=ll.x,Oa.client.y+=ll.y}var Qa=this.result.rectDelta,cl=t.rect||h.rect;cl.left+=Qa.left,cl.right+=Qa.right,cl.top+=Qa.top,cl.bottom+=Qa.bottom,cl.width=cl.right-cl.left,cl.height=cl.bottom-cl.top}},{key:"setAndApply",value:function(t){var h=this.interaction,b=t.phase,C=t.preEnd,$=t.skipModifiers,K=this.setAll(this.fillArg({preEnd:C,phase:b,pageCoords:t.modifiedCoords||h.coords.cur.page}));if(this.result=K,!K.changed&&(!$||$<this.states.length)&&h.interacting())return!1;if(t.modifiedCoords){var X=h.coords.cur.page,_e={x:t.modifiedCoords.x-X.x,y:t.modifiedCoords.y-X.y};K.coords.x+=_e.x,K.coords.y+=_e.y,K.delta.x+=_e.x,K.delta.y+=_e.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var h=t.interaction,b=t.event,C=this.states;if(C&&C.length){for(var $=!1,K=0;K<C.length;K++){var X=C[K];t.state=X;var _e=X.options,We=X.methods,Ce=We.beforeEnd&&We.beforeEnd(t);if(Ce)return this.endResult=Ce,!1;$=$||!$&&this.shouldDo(_e,!0,t.phase,!0)}$&&h.move({event:b,preEnd:!0})}}},{key:"stop",value:function(t){var h=t.interaction;if(this.states&&this.states.length){var b=ne({states:this.states,interactable:h.interactable,element:h.element,rect:null},t);this.fillArg(b);for(var C=0,$=this.states;C<$.length;C++){var K=$[C];b.state=K,K.methods.stop&&K.methods.stop(b)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var h=0;h<t.length;h++){var b=t[h],C=b.options,$=b.methods,K=b.name;this.states.push({options:C,methods:$,index:h,name:K})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var h=t.interaction,b=h.coords,C=h.rect,$=h.modification;if($.result){for(var K=$.startDelta,X=$.result,_e=X.delta,We=X.rectDelta,Ce=0,na=[[b.start,K],[b.cur,_e]];Ce<na.length;Ce++){var Oa=na[Ce],ll=Oa[0],Qa=Oa[1];ll.page.x-=Qa.x,ll.page.y-=Qa.y,ll.client.x-=Qa.x,ll.client.y-=Qa.y}C.left-=We.left,C.right-=We.right,C.top-=We.top,C.bottom-=We.bottom}}},{key:"shouldDo",value:function(t,h,b,C){return!(!t||t.enabled===!1||C&&!t.endOnly||t.endOnly&&!h||b==="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 Za(h)}),this.result=Ba(ne({},t.result.coords),ne({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),s}();function Ba(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 Rl(s,t){var h=s.defaults,b={start:s.start,set:s.set,beforeEnd:s.beforeEnd,stop:s.stop},C=function($){var K=$||{};for(var X in K.enabled=K.enabled!==!1,h)X in K||(K[X]=h[X]);var _e={options:K,methods:b,name:t,enable:function(){return K.enabled=!0,_e},disable:function(){return K.enabled=!1,_e}};return _e};return t&&typeof t=="string"&&(C._defaults=h,C._methods=b),C}function Er(s){var t=s.iEvent,h=s.interaction.modification.result;h&&(t.modifiers=h.eventProps)}var tn={id:"modifiers/base",before:["actions"],install:function(s){s.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(s){var t=s.interaction;t.modification=new Nl(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,b=h.setAndApply(s);return t.edges=h.edges,b},"interactions:before-action-end":function(s){var t=s.interaction,h=t.modification,b=h.beforeEnd(s);return t.edges=h.startEdges,b},"interactions:action-start":Er,"interactions:action-move":Er,"interactions:action-end":Er,"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)}}},Fr=tn,ir={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ur=function(s){m(h,s);var t=N(h);function h(b,C,$,K,X,_e,We){var Ce;o(this,h),(Ce=t.call(this,b)).relatedTarget=null,Ce.screenX=void 0,Ce.screenY=void 0,Ce.button=void 0,Ce.buttons=void 0,Ce.ctrlKey=void 0,Ce.shiftKey=void 0,Ce.altKey=void 0,Ce.metaKey=void 0,Ce.page=void 0,Ce.client=void 0,Ce.delta=void 0,Ce.rect=void 0,Ce.x0=void 0,Ce.y0=void 0,Ce.t0=void 0,Ce.dt=void 0,Ce.duration=void 0,Ce.clientX0=void 0,Ce.clientY0=void 0,Ce.velocity=void 0,Ce.speed=void 0,Ce.swipe=void 0,Ce.axes=void 0,Ce.preEnd=void 0,X=X||b.element;var na=b.interactable,Oa=(na&&na.options||ir).deltaSource,ll=me(na,X,$),Qa=K==="start",cl=K==="end",Cl=Qa?d(Ce):b.prevEvent,_l=Qa?b.coords.start:cl?{page:Cl.page,client:Cl.client,timeStamp:b.coords.cur.timeStamp}:b.coords.cur;return Ce.page=ne({},_l.page),Ce.client=ne({},_l.client),Ce.rect=ne({},b.rect),Ce.timeStamp=_l.timeStamp,cl||(Ce.page.x-=ll.x,Ce.page.y-=ll.y,Ce.client.x-=ll.x,Ce.client.y-=ll.y),Ce.ctrlKey=C.ctrlKey,Ce.altKey=C.altKey,Ce.shiftKey=C.shiftKey,Ce.metaKey=C.metaKey,Ce.button=C.button,Ce.buttons=C.buttons,Ce.target=X,Ce.currentTarget=X,Ce.preEnd=_e,Ce.type=We||$+(K||""),Ce.interactable=na,Ce.t0=Qa?b.pointers[b.pointers.length-1].downTime:Cl.t0,Ce.x0=b.coords.start.page.x-ll.x,Ce.y0=b.coords.start.page.y-ll.y,Ce.clientX0=b.coords.start.client.x-ll.x,Ce.clientY0=b.coords.start.client.y-ll.y,Ce.delta=Qa||cl?{x:0,y:0}:{x:Ce[Oa].x-Cl[Oa].x,y:Ce[Oa].y-Cl[Oa].y},Ce.dt=b.coords.delta.timeStamp,Ce.duration=Ce.timeStamp-Ce.t0,Ce.velocity=ne({},b.coords.velocity[Oa]),Ce.speed=_a(Ce.velocity.x,Ce.velocity.y),Ce.swipe=cl||K==="inertiastart"?Ce.getSwipe():null,Ce}return c(h,[{key:"getSwipe",value:function(){var b=this._interaction;if(b.prevEvent.speed<600||this.timeStamp-b.prevEvent.timeStamp>150)return null;var C=180*Math.atan2(b.prevEvent.velocityY,b.prevEvent.velocityX)/Math.PI;C<0&&(C+=360);var $=112.5<=C&&C<247.5,K=202.5<=C&&C<337.5;return{up:K,down:!K&&22.5<=C&&C<157.5,left:$,right:!$&&(292.5<=C||C<67.5),angle:C,speed:b.prevEvent.speed,velocity:{x:b.prevEvent.velocityX,y:b.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(Ur.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 Zr=c(function s(t,h,b,C,$){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=b,this.downTime=C,this.downTarget=$}),Or=function(s){return s.interactable="",s.element="",s.prepared="",s.pointerIsDown="",s.pointerWasMoved="",s._proxy="",s}({}),rr=function(s){return s.start="",s.move="",s.end="",s.stop="",s.interacting="",s}({}),en=0,Gr=function(){function s(t){var h=this,b=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=Ha(function(Ce){this.move(Ce)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=en++,this._scopeFire=C,this.pointerType=b;var $=this;this._proxy={};var K=function(Ce){Object.defineProperty(h._proxy,Ce,{get:function(){return $[Ce]}})};for(var X in Or)K(X);var _e=function(Ce){Object.defineProperty(h._proxy,Ce,{value:function(){return $[Ce].apply($,arguments)}})};for(var We in rr)_e(We);this._scopeFire("interactions:new",{interaction:this})}return c(s,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,h,b){var C=this.updatePointer(t,h,b,!0),$=this.pointers[C];this._scopeFire("interactions:down",{pointer:t,event:h,eventTarget:b,pointerIndex:C,pointerInfo:$,type:"down",interaction:this})}},{key:"start",value:function(t,h,b){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!h.options[t.name].enabled)&&(ra(this.prepared,t),this.interactable=h,this.element=b,this.rect=h.getRect(b),this.edges=this.prepared.edges?ne({},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,b){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,h,b,!1);var C,$,K=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(C=this.coords.cur.client.x-this.coords.start.client.x,$=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=_a(C,$)>this.pointerMoveTolerance);var X,_e,We,Ce=this.getPointerIndex(t),na={pointer:t,pointerIndex:Ce,pointerInfo:this.pointers[Ce],event:h,type:"move",eventTarget:b,dx:C,dy:$,duplicate:K,interaction:this};K||(X=this.coords.velocity,_e=this.coords.delta,We=Math.max(_e.timeStamp/1e3,.001),X.page.x=_e.page.x/We,X.page.y=_e.page.y/We,X.client.x=_e.client.x/We,X.client.y=_e.client.y/We,X.timeStamp=We),this._scopeFire("interactions:move",na),K||this.simulation||(this.interacting()&&(na.type=null,this.move(na)),this.pointerWasMoved&&ae(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||pe(this.coords.delta),(t=ne({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,b,C){var $=this.getPointerIndex(t);$===-1&&($=this.updatePointer(t,h,b,!1));var K=/cancel$/i.test(h.type)?"cancel":"up";this._scopeFire("interactions:".concat(K),{pointer:t,pointerIndex:$,pointerInfo:this.pointers[$],event:h,eventTarget:b,type:K,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=Ue(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:ce(this.pointers,function(b){return b.id===h})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,h,b,C){var $,K,X,_e=Ue(t),We=this.getPointerIndex(t),Ce=this.pointers[We];return C=C!==!1&&(C||/(down|start)$/i.test(h.type)),Ce?Ce.pointer=t:(Ce=new Zr(_e,t,h,null,null),We=this.pointers.length,this.pointers.push(Ce)),Sa(this.coords.cur,this.pointers.map(function(na){return na.pointer}),this._now()),$=this.coords.delta,K=this.coords.prev,X=this.coords.cur,$.page.x=X.page.x-K.page.x,$.page.y=X.page.y-K.page.y,$.client.x=X.client.x-K.client.x,$.client.y=X.client.y-K.client.y,$.timeStamp=X.timeStamp-K.timeStamp,C&&(this.pointerIsDown=!0,Ce.downTime=this.coords.cur.timeStamp,Ce.downTarget=b,V(this.downPointer,t),this.interacting()||(ae(this.coords.start,this.coords.cur),ae(this.coords.prev,this.coords.cur),this.downEvent=h,this.pointerWasMoved=!1)),this._updateLatestPointer(t,h,b),this._scopeFire("interactions:update-pointer",{pointer:t,event:h,eventTarget:b,down:C,pointerInfo:Ce,pointerIndex:We,interaction:this}),We}},{key:"removePointer",value:function(t,h){var b=this.getPointerIndex(t);if(b!==-1){var C=this.pointers[b];this._scopeFire("interactions:remove-pointer",{pointer:t,event:h,eventTarget:null,pointerIndex:b,pointerInfo:C,interaction:this}),this.pointers.splice(b,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,h,b){this._latestPointer.pointer=t,this._latestPointer.event=h,this._latestPointer.eventTarget=b}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,h,b,C){return new Ur(this,t,this.prepared.name,h,this.element,b,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,b=t.phase,C=t.preEnd,$=t.type,K=this.rect;if(K&&b==="move"&&(se(this.edges,K,this.coords.delta[this.interactable.options.deltaSource]),K.width=K.right-K.left,K.height=K.bottom-K.top),this._scopeFire("interactions:before-action-".concat(b),t)===!1)return!1;var X=t.iEvent=this._createPreparedEvent(h,b,C,$);return this._scopeFire("interactions:action-".concat(b),t),b==="start"&&(this.prevEvent=X),this._fireEvent(X),this._scopeFire("interactions:after-action-".concat(b),t),!0}},{key:"_now",value:function(){return Date.now()}}]),s}();function or(s){Cr(s.interaction)}function Cr(s){if(!function(h){return!(!h.offset.pending.x&&!h.offset.pending.y)}(s))return!1;var t=s.offset.pending;return Wl(s.coords.cur,t),Wl(s.coords.delta,t),se(s.edges,s.rect,t),t.x=0,t.y=0,!0}function an(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 Wl(s,t){var h=s.page,b=s.client,C=t.x,$=t.y;h.x+=C,h.y+=$,b.x+=C,b.y+=$}rr.offsetBy="";var tr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(s){s.Interaction.prototype.offsetBy=an},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&&(Wl(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(s.interaction)},"interactions:before-action-start":or,"interactions:before-action-move":or,"interactions:before-action-end":function(s){var t=s.interaction;if(Cr(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}}},kr=tr,Lr=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,b=Il(h);if(!b||!b.enabled)return!1;var C=h.coords.velocity.client,$=_a(C.x,C.y),K=this.modification||(this.modification=new Nl(h));if(K.copyFrom(h.modification),this.t0=h._now(),this.allowResume=b.allowResume,this.v0=$,this.currentOffset={x:0,y:0},this.startCoords=h.coords.cur.page,this.modifierArg=K.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-h.coords.cur.timeStamp<50&&$>b.minSpeed&&$>b.endSpeed)this.startInertia();else{if(K.result=K.setAll(this.modifierArg),!K.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,b=Il(this.interaction),C=b.resistance,$=-Math.log(b.endSpeed/this.v0)/C;this.targetOffset={x:(h.x-$)/C,y:(h.y-$)/C},this.te=$,this.lambda_v0=C/this.v0,this.one_ve_v0=1-b.endSpeed/this.v0;var K=this.modification,X=this.modifierArg;X.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},K.result=K.setAll(X),K.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+K.result.delta.x,y:this.targetOffset.y+K.result.delta.y}),this.onNextFrame(function(){return 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,b,C,$,K,X,_e=this,We=this.interaction,Ce=Il(We).resistance,na=(We._now()-this.t0)/1e3;if(na<this.te){var Oa,ll=1-(Math.exp(-Ce*na)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,h=0,b=this.targetOffset.x,C=this.targetOffset.y,$=this.modifiedOffset.x,K=this.modifiedOffset.y,Oa={x:sr(X=ll,t,b,$),y:sr(X,h,C,K)}):Oa={x:this.targetOffset.x*ll,y:this.targetOffset.y*ll};var Qa={x:Oa.x-this.currentOffset.x,y:Oa.y-this.currentOffset.y};this.currentOffset.x+=Qa.x,this.currentOffset.y+=Qa.y,We.offsetBy(Qa),We.move(),this.onNextFrame(function(){return _e.inertiaTick()})}else We.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,b=h._now()-this.t0,C=Il(h).smoothEndDuration;if(b<C){var $={x:_r(b,0,this.targetOffset.x,C),y:_r(b,0,this.targetOffset.y,C)},K={x:$.x-this.currentOffset.x,y:$.y-this.currentOffset.y};this.currentOffset.x+=K.x,this.currentOffset.y+=K.y,h.offsetBy(K),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,b=t.event,C=t.eventTarget,$=this.interaction;$.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),$.updatePointer(h,b,C,!0),$._doPhase({interaction:$,event:b,phase:"resume"}),ae($.coords.prev,$.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 Il(s){var t=s.interactable,h=s.prepared;return t&&t.options&&h.name&&t.options[h.name].inertia}var ln={id:"inertia",before:["modifiers","actions"],install:function(s){var t=s.defaults;s.usePlugin(kr),s.usePlugin(Fr),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 Lr(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,b=t.inertia;if(b.active)for(var C=h;x.element(C);){if(C===t.element){b.resume(s);break}C=Ie(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":Er,"interactions:action-inertiastart":Er,"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 sr(s,t,h,b){var C=1-s;return C*C*t+2*C*s*h+s*s*b}function _r(s,t,h,b){return-h*(s/=b)*(s-2)+t}var Mr=ln;function Br(s,t){for(var h=0;h<t.length;h++){var b=t[h];if(s.immediatePropagationStopped)break;b(s)}}var zn=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=ne({},t||{})}return c(s,[{key:"fire",value:function(t){var h,b=this.global;(h=this.types[t.type])&&Br(t,h),!t.propagationStopped&&b&&(h=b[t.type])&&Br(t,h)}},{key:"on",value:function(t,h){var b=qe(t,h);for(t in b)this.types[t]=pa(this.types[t]||[],b[t])}},{key:"off",value:function(t,h){var b=qe(t,h);for(t in b){var C=this.types[t];if(C&&C.length)for(var $=0,K=b[t];$<K.length;$++){var X=K[$],_e=C.indexOf(X);_e!==-1&&C.splice(_e,1)}}}},{key:"getRect",value:function(t){return null}}]),s}(),ri=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 Mn(s){return x.object(s)?{capture:!!s.capture,passive:!!s.passive}:{capture:!!s,passive:!1}}function wn(s,t){return s===t||(typeof s=="boolean"?!!t.capture===s&&!t.passive:!!s.capture==!!t.capture&&!!s.passive==!!t.passive)}var Gn={id:"events",install:function(s){var t,h=[],b={},C=[],$={add:K,remove:X,addDelegate:function(Ce,na,Oa,ll,Qa){var cl=Mn(Qa);if(!b[Oa]){b[Oa]=[];for(var Cl=0;Cl<C.length;Cl++){var _l=C[Cl];K(_l,Oa,_e),K(_l,Oa,We,!0)}}var Vl=b[Oa],Xl=Se(Vl,function(cr){return cr.selector===Ce&&cr.context===na});Xl||(Xl={selector:Ce,context:na,listeners:[]},Vl.push(Xl)),Xl.listeners.push({func:ll,options:cl})},removeDelegate:function(Ce,na,Oa,ll,Qa){var cl,Cl=Mn(Qa),_l=b[Oa],Vl=!1;if(_l)for(cl=_l.length-1;cl>=0;cl--){var Xl=_l[cl];if(Xl.selector===Ce&&Xl.context===na){for(var cr=Xl.listeners,Ul=cr.length-1;Ul>=0;Ul--){var Ql=cr[Ul];if(Ql.func===ll&&wn(Ql.options,Cl)){cr.splice(Ul,1),cr.length||(_l.splice(cl,1),X(na,Oa,_e),X(na,Oa,We,!0)),Vl=!0;break}}if(Vl)break}}},delegateListener:_e,delegateUseCapture:We,delegatedEvents:b,documents:C,targets:h,supportsOptions:!1,supportsPassive:!1};function K(Ce,na,Oa,ll){if(Ce.addEventListener){var Qa=Mn(ll),cl=Se(h,function(Cl){return Cl.eventTarget===Ce});cl||(cl={eventTarget:Ce,events:{}},h.push(cl)),cl.events[na]||(cl.events[na]=[]),Se(cl.events[na],function(Cl){return Cl.func===Oa&&wn(Cl.options,Qa)})||(Ce.addEventListener(na,Oa,$.supportsOptions?Qa:Qa.capture),cl.events[na].push({func:Oa,options:Qa}))}}function X(Ce,na,Oa,ll){if(Ce.addEventListener&&Ce.removeEventListener){var Qa=ce(h,function(cn){return cn.eventTarget===Ce}),cl=h[Qa];if(cl&&cl.events)if(na!=="all"){var Cl=!1,_l=cl.events[na];if(_l){if(Oa==="all"){for(var Vl=_l.length-1;Vl>=0;Vl--){var Xl=_l[Vl];X(Ce,na,Xl.func,Xl.options)}return}for(var cr=Mn(ll),Ul=0;Ul<_l.length;Ul++){var Ql=_l[Ul];if(Ql.func===Oa&&wn(Ql.options,cr)){Ce.removeEventListener(na,Oa,$.supportsOptions?cr:cr.capture),_l.splice(Ul,1),_l.length===0&&(delete cl.events[na],Cl=!0);break}}}Cl&&!Object.keys(cl.events).length&&h.splice(Qa,1)}else for(na in cl.events)cl.events.hasOwnProperty(na)&&X(Ce,na,"all")}}function _e(Ce,na){for(var Oa=Mn(na),ll=new ri(Ce),Qa=b[Ce.type],cl=aa(Ce)[0],Cl=cl;x.element(Cl);){for(var _l=0;_l<Qa.length;_l++){var Vl=Qa[_l],Xl=Vl.selector,cr=Vl.context;if(ue(Cl,Xl)&&ee(cr,cl)&&ee(cr,Cl)){var Ul=Vl.listeners;ll.currentTarget=Cl;for(var Ql=0;Ql<Ul.length;Ql++){var cn=Ul[Ql];wn(cn.options,Oa)&&cn.func(ll)}}}Cl=Ie(Cl)}}function We(Ce){return _e(Ce,!0)}return(t=s.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return $.supportsOptions=!0},get passive(){return $.supportsPassive=!0}}),s.events=$,$}},pn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(s){for(var t=0,h=pn.methodOrder;t<h.length;t++){var b=h[t],C=pn[b](s);if(C)return C}return null},simulationResume:function(s){var t=s.pointerType,h=s.eventType,b=s.eventTarget,C=s.scope;if(!/down|start/i.test(h))return null;for(var $=0,K=C.interactions.list;$<K.length;$++){var X=K[$],_e=b;if(X.simulation&&X.simulation.allowResume&&X.pointerType===t)for(;_e;){if(_e===X.element)return X;_e=Ie(_e)}}return null},mouseOrPen:function(s){var t,h=s.pointerId,b=s.pointerType,C=s.eventType,$=s.scope;if(b!=="mouse"&&b!=="pen")return null;for(var K=0,X=$.interactions.list;K<X.length;K++){var _e=X[K];if(_e.pointerType===b){if(_e.simulation&&!In(_e,h))continue;if(_e.interacting())return _e;t||(t=_e)}}if(t)return t;for(var We=0,Ce=$.interactions.list;We<Ce.length;We++){var na=Ce[We];if(!(na.pointerType!==b||/down/i.test(C)&&na.simulation))return na}return null},hasPointer:function(s){for(var t=s.pointerId,h=0,b=s.scope.interactions.list;h<b.length;h++){var C=b[h];if(In(C,t))return C}return null},idle:function(s){for(var t=s.pointerType,h=0,b=s.scope.interactions.list;h<b.length;h++){var C=b[h];if(C.pointers.length===1){var $=C.interactable;if($&&(!$.options.gesture||!$.options.gesture.enabled))continue}else if(C.pointers.length>=2)continue;if(!C.interacting()&&t===C.pointerType)return C}return null}};function In(s,t){return s.pointers.some(function(h){return h.id===t})}var ni=pn,fn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ii(s,t){return function(h){var b=t.interactions.list,C=ja(h),$=aa(h),K=$[0],X=$[1],_e=[];if(/^touch/.test(h.type)){t.prevTouchTime=t.now();for(var We=0,Ce=h.changedTouches;We<Ce.length;We++){var na=Ce[We],Oa={pointer:na,pointerId:Ue(na),pointerType:C,eventType:h.type,eventTarget:K,curEventTarget:X,scope:t},ll=Tn(Oa);_e.push([Oa.pointer,Oa.eventTarget,Oa.curEventTarget,ll])}}else{var Qa=!1;if(!Z.supportsPointerEvent&&/mouse/.test(h.type)){for(var cl=0;cl<b.length&&!Qa;cl++)Qa=b[cl].pointerType!=="mouse"&&b[cl].pointerIsDown;Qa=Qa||t.now()-t.prevTouchTime<500||h.timeStamp===0}if(!Qa){var Cl={pointer:h,pointerId:Ue(h),pointerType:C,eventType:h.type,curEventTarget:X,eventTarget:K,scope:t},_l=Tn(Cl);_e.push([Cl.pointer,Cl.eventTarget,Cl.curEventTarget,_l])}}for(var Vl=0;Vl<_e.length;Vl++){var Xl=_e[Vl],cr=Xl[0],Ul=Xl[1],Ql=Xl[2];Xl[3][s](cr,h,Ul,Ql)}}}function Tn(s){var t=s.pointerType,h=s.scope,b={interaction:ni.search(s),searchDetails:s};return h.fire("interactions:find",b),b.interaction||h.interactions.new({pointerType:t})}function $i(s,t){var h=s.doc,b=s.scope,C=s.options,$=b.interactions.docEvents,K=b.events,X=K[t];for(var _e in b.browser.isIOS&&!C.events&&(C.events={passive:!1}),K.delegatedEvents)X(h,_e,K.delegateListener),X(h,_e,K.delegateUseCapture,!0);for(var We=C&&C.events,Ce=0;Ce<$.length;Ce++){var na=$[Ce];X(h,na.type,na.listener,We)}}var gi={id:"core/interactions",install:function(s){for(var t={},h=0;h<fn.length;h++){var b=fn[h];t[b]=ii(b,s)}var C,$=Z.pEventTypes;function K(){for(var X=0,_e=s.interactions.list;X<_e.length;X++){var We=_e[X];if(We.pointerIsDown&&We.pointerType==="touch"&&!We._interacting)for(var Ce=function(){var ll=Oa[na];s.documents.some(function(Qa){return ee(Qa.doc,ll.downTarget)})||We.removePointer(ll.pointer,ll.event)},na=0,Oa=We.pointers;na<Oa.length;na++)Ce()}}(C=j.PointerEvent?[{type:$.down,listener:K},{type:$.down,listener:t.pointerDown},{type:$.move,listener:t.pointerMove},{type:$.up,listener:t.pointerUp},{type:$.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:K},{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(X){for(var _e=0,We=s.interactions.list;_e<We.length;_e++)We[_e].documentBlur(X)}}),s.prevTouchTime=0,s.Interaction=function(X){m(We,X);var _e=N(We);function We(){return o(this,We),_e.apply(this,arguments)}return c(We,[{key:"pointerMoveTolerance",get:function(){return s.interactions.pointerMoveTolerance},set:function(Ce){s.interactions.pointerMoveTolerance=Ce}},{key:"_now",value:function(){return s.now()}}]),We}(Gr),s.interactions={list:[],new:function(X){X.scopeFire=function(We,Ce){return s.fire(We,Ce)};var _e=new s.Interaction(X);return s.interactions.list.push(_e),_e},listeners:t,docEvents:C,pointerMoveTolerance:1},s.usePlugin(Da)},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,b=t.interactions.list.length-1;b>=0;b--){var C=t.interactions.list[b];C.interactable===h&&(C.stop(),t.fire("interactions:destroy",{interaction:C}),C.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(b,1))}}},onDocSignal:$i,doOnInteractions:ii,methodNames:fn},Vo=gi,Bn=function(s){return s[s.On=0]="On",s[s.Off=1]="Off",s}(Bn||{}),Fo=function(){function s(t,h,b,C){o(this,s),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new zn,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||b,this._win=S(Ea(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 x.func(h.onstart)&&this.on("".concat(t,"start"),h.onstart),x.func(h.onmove)&&this.on("".concat(t,"move"),h.onmove),x.func(h.onend)&&this.on("".concat(t,"end"),h.onend),x.func(h.oninertiastart)&&this.on("".concat(t,"inertiastart"),h.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,h,b){var C,$=this,K=(C=this._actions.map[t])==null?void 0:C.filterEventType,X=function(_e){return(K==null||K(_e))&&ul(_e,$._actions)};(x.array(h)||x.object(h))&&this._onOff(Bn.Off,t,h,void 0,X),(x.array(b)||x.object(b))&&this._onOff(Bn.On,t,b,void 0,X)}},{key:"setPerAction",value:function(t,h){var b=this._defaults;for(var C in h){var $=C,K=this.options[t],X=h[$];$==="listeners"&&this.updatePerActionListeners(t,K.listeners,X),x.array(X)?K[$]=te(X):x.plainObject(X)?(K[$]=ne(K[$]||{},Za(X)),x.object(b.perAction[$])&&"enabled"in b.perAction[$]&&(K[$].enabled=X.enabled!==!1)):x.bool(X)&&x.object(b.perAction[$])?K[$].enabled=X:K[$]=X}}},{key:"getRect",value:function(t){return t=t||(x.element(this.target)?this.target:null),x.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ae(t)}},{key:"rectChecker",value:function(t){var h=this;return x.func(t)?(this.getRect=function(b){var C=ne({},t.apply(h,b));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(Ea(h)||x.object(h)){for(var b in this.options[t]=h,this._actions.map)this.options[b][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 x.string(t)?Array.from(this._context.querySelectorAll(t)):x.func(t)&&t.getAllElements?t.getAllElements():x.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ee(this._context,t)}},{key:"testIgnoreAllow",value:function(t,h,b){return!this.testIgnore(t.ignoreFrom,h,b)&&this.testAllow(t.allowFrom,h,b)}},{key:"testAllow",value:function(t,h,b){return!t||!!x.element(b)&&(x.string(t)?q(b,t,h):!!x.element(t)&&ee(t,b))}},{key:"testIgnore",value:function(t,h,b){return!(!t||!x.element(b))&&(x.string(t)?q(b,t,h):!!x.element(t)&&ee(t,b))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,h,b,C,$){x.object(h)&&!x.array(h)&&(C=b,b=null);var K=qe(h,b,$);for(var X in K){X==="wheel"&&(X=Z.wheelEvent);for(var _e=0,We=K[X];_e<We.length;_e++){var Ce=We[_e];ul(X,this._actions)?this.events[t===Bn.On?"on":"off"](X,Ce):x.string(this.target)?this._scopeEvents[t===Bn.On?"addDelegate":"removeDelegate"](this.target,this._context,X,Ce,C):this._scopeEvents[t===Bn.On?"add":"remove"](this.target,X,Ce,C)}}return this}},{key:"on",value:function(t,h,b){return this._onOff(Bn.On,t,h,b)}},{key:"off",value:function(t,h,b){return this._onOff(Bn.Off,t,h,b)}},{key:"set",value:function(t){var h=this._defaults;for(var b in x.object(t)||(t={}),this.options=Za(h.base),this._actions.methodDict){var C=b,$=this._actions.methodDict[C];this.options[C]={},this.setPerAction(C,ne(ne({},h.perAction),h.actions[C])),this[$](t[C])}for(var K in t)K!=="getRect"?x.func(this[K])&&this[K](t[K]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(x.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var h=this._scopeEvents.delegatedEvents[t],b=h.length-1;b>=0;b--){var C=h[b],$=C.selector,K=C.context,X=C.listeners;$===this.target&&K===this._context&&h.splice(b,1);for(var _e=X.length-1;_e>=0;_e--)this._scopeEvents.removeDelegate(this.target,this._context,t,X[_e][0],X[_e][1])}else this._scopeEvents.remove(this.target,"all")}}]),s}(),Po=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(b){var C=b.interactable,$=C.target,K=x.string($)?h.selectorMap[$]:$[h.scope.id],X=ce(K,function(_e){return _e===C});K.splice(X,1)}})}return c(s,[{key:"new",value:function(t,h){h=ne(h||{},{actions:this.scope.actions});var b=new this.scope.Interactable(t,h,this.scope.document,this.scope.events);return this.scope.addDocument(b._doc),this.list.push(b),x.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(b)):(b.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(b)),this.scope.fire("interactable:new",{target:t,options:h,interactable:b,win:this.scope._win}),b}},{key:"getExisting",value:function(t,h){var b=h&&h.context||this.scope.document,C=x.string(t),$=C?this.selectorMap[t]:t[this.scope.id];if($)return Se($,function(K){return K._context===b&&(C||K.inContext(t))})}},{key:"forEachMatch",value:function(t,h){for(var b=0,C=this.list;b<C.length;b++){var $=C[b],K=void 0;if((x.string($.target)?x.element(t)&&ue(t,$.target):t===$.target)&&$.inContext(t)&&(K=h($)),K!==void 0)return K}}}]),s}(),jo=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=Za(ir),this.Eventable=zn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(b){var C=function $(K,X){var _e=b.interactables.getExisting(K,X);return _e||((_e=b.interactables.new(K,X)).events.global=$.globalEvents),_e};return C.getPointerAverage=Te,C.getTouchBBox=Fa,C.getTouchDistance=Na,C.getTouchAngle=oa,C.getElementRect=Ae,C.getElementClientRect=Ke,C.matchesSelector=ue,C.closest=ge,C.globalEvents={},C.version="1.10.27",C.scope=b,C.use=function($,K){return this.scope.usePlugin($,K),this},C.isSet=function($,K){return!!this.scope.interactables.get($,K&&K.context)},C.on=Ha(function($,K,X){if(x.string($)&&$.search(" ")!==-1&&($=$.trim().split(/ +/)),x.array($)){for(var _e=0,We=$;_e<We.length;_e++){var Ce=We[_e];this.on(Ce,K,X)}return this}if(x.object($)){for(var na in $)this.on(na,$[na],K);return this}return ul($,this.scope.actions)?this.globalEvents[$]?this.globalEvents[$].push(K):this.globalEvents[$]=[K]:this.scope.events.add(this.scope.document,$,K,{options:X}),this},"The interact.on() method is being deprecated"),C.off=Ha(function($,K,X){if(x.string($)&&$.search(" ")!==-1&&($=$.trim().split(/ +/)),x.array($)){for(var _e=0,We=$;_e<We.length;_e++){var Ce=We[_e];this.off(Ce,K,X)}return this}if(x.object($)){for(var na in $)this.off(na,$[na],K);return this}var Oa;return ul($,this.scope.actions)?$ in this.globalEvents&&(Oa=this.globalEvents[$].indexOf(K))!==-1&&this.globalEvents[$].splice(Oa,1):this.scope.events.remove(this.scope.document,$,K,X),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 $=0,K=this.scope.interactions.list;$<K.length;$++)K[$].stop();return this},C.pointerMoveTolerance=function($){return x.number($)?(this.scope.interactions.pointerMoveTolerance=$,this):this.scope.interactions.pointerMoveTolerance},C.addDocument=function($,K){this.scope.addDocument($,K)},C.removeDocument=function($){this.scope.removeDocument($)},C}(this),this.InteractEvent=Ur,this.Interactable=void 0,this.interactables=new Po(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(b){return t.removeDocument(b.target)};var h=this;this.Interactable=function(b){m($,b);var C=N($);function $(){return o(this,$),C.apply(this,arguments)}return c($,[{key:"_defaults",get:function(){return h.defaults}},{key:"set",value:function(K){return _(g($.prototype),"set",this).call(this,K),h.fire("interactable:set",{options:K,interactable:this}),this}},{key:"unset",value:function(){_(g($.prototype),"unset",this).call(this);var K=h.interactables.list.indexOf(this);K<0||(h.interactables.list.splice(K,1),h.fire("interactable:unset",{interactable:this}))}}]),$}(Fo)}return c(s,[{key:"addListeners",value:function(t,h){this.listenerMaps.push({id:h,map:t})}},{key:"fire",value:function(t,h){for(var b=0,C=this.listenerMaps;b<C.length;b++){var $=C[b].map[t];if($&&$(h,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(h,b){return h.isInitialized=!0,x.window(b)&&E(b),j.init(b),Z.init(b),ar.init(b),h.window=b,h.document=b.document,h.usePlugin(Vo),h.usePlugin(Gn),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 b=0,C=this.listenerMaps.length,$=t.before.reduce(function(X,_e){return X[_e]=!0,X[ao(_e)]=!0,X},{});b<C;b++){var K=this.listenerMaps[b].id;if(K&&($[K]||$[ao(K)]))break}this.listenerMaps.splice(b,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 b=S(t);h=h?ne({},h):{},this.documents.push({doc:t,options:h}),this.events.documents.push(t),t!==this.document&&this.events.add(b,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:b,scope:this,options:h})}},{key:"removeDocument",value:function(t){var h=this.getDocIndex(t),b=S(t),C=this.documents[h].options;this.events.remove(b,"unload",this.onWindowUnload),this.documents.splice(h,1),this.events.documents.splice(h,1),this.fire("scope:remove-document",{doc:t,window:b,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 ao(s){return s&&s.replace(/\/.*$/,"")}var lo=new jo,sn=lo.interactStatic,Ho=typeof globalThis<"u"?globalThis:window;lo.init(Ho);var ro=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(s){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(b){var C=b[0],$=b[1];return C in s||$ in s}),h=function(b,C){for(var $=s.range,K=s.limits,X=K===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:K,_e=s.offset,We=_e===void 0?{x:0,y:0}:_e,Ce={range:$,grid:s,x:null,y:null},na=0;na<t.length;na++){var Oa=t[na],ll=Oa[0],Qa=Oa[1],cl=Math.round((b-We.x)/s[ll]),Cl=Math.round((C-We.y)/s[Qa]);Ce[ll]=Math.max(X.left,Math.min(X.right,cl*s[ll]+We.x)),Ce[Qa]=Math.max(X.top,Math.min(X.bottom,Cl*s[Qa]+We.y))}return Ce};return h.grid=s,h.coordFields=t,h}}),Uo={id:"snappers",install:function(s){var t=s.interactStatic;t.snappers=ne(t.snappers||{},ro),t.createSnapGrid=t.snappers.grid}},qo=Uo,Wo={start:function(s){var t=s.state,h=s.rect,b=s.edges,C=s.pageCoords,$=t.options,K=$.ratio,X=$.enabled,_e=t.options,We=_e.equalDelta,Ce=_e.modifiers;K==="preserve"&&(K=h.width/h.height),t.startCoords=ne({},C),t.startRect=ne({},h),t.ratio=K,t.equalDelta=We;var na=t.linkedEdges={top:b.top||b.left&&!b.bottom,left:b.left||b.top&&!b.right,bottom:b.bottom||b.right&&!b.top,right:b.right||b.bottom&&!b.left};if(t.xIsPrimaryAxis=!(!b.left&&!b.right),t.equalDelta){var Oa=(na.left?1:-1)*(na.top?1:-1);t.edgeSign={x:Oa,y:Oa}}else t.edgeSign={x:na.left?-1:1,y:na.top?-1:1};if(X!==!1&&ne(b,na),Ce!=null&&Ce.length){var ll=new Nl(s.interaction);ll.copyFrom(s.interaction.modification),ll.prepareStates(Ce),t.subModification=ll,ll.startAll(r({},s))}},set:function(s){var t=s.state,h=s.rect,b=s.coords,C=t.linkedEdges,$=ne({},b),K=t.equalDelta?Go:Vi;if(ne(s.edges,C),K(t,t.xIsPrimaryAxis,b,h),!t.subModification)return null;var X=ne({},h);se(C,X,{x:b.x-$.x,y:b.y-$.y});var _e=t.subModification.setAll(r(r({},s),{},{rect:X,edges:C,pageCoords:b,prevCoords:b,prevRect:X})),We=_e.delta;return _e.changed&&(K(t,Math.abs(We.x)>Math.abs(We.y),_e.coords,_e.rect),ne(b,_e.coords)),_e.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Go(s,t,h){var b=s.startCoords,C=s.edgeSign;t?h.y=b.y+(h.x-b.x)*C.y:h.x=b.x+(h.y-b.y)*C.x}function Vi(s,t,h,b){var C=s.startRect,$=s.startCoords,K=s.ratio,X=s.edgeSign;if(t){var _e=b.width/K;h.y=$.y+(_e-C.height)*X.y}else{var We=b.height*K;h.x=$.x+(We-C.width)*X.x}}var Ko=Rl(Wo,"aspectRatio"),bi=function(){};bi._defaults={};var oi=bi;function On(s,t,h){return x.func(s)?Pe(s,t.interactable,t.element,[h.x,h.y,t]):Pe(s,t.interactable,t.element)}var ki={start:function(s){var t=s.rect,h=s.startOffset,b=s.state,C=s.interaction,$=s.pageCoords,K=b.options,X=K.elementRect,_e=ne({left:0,top:0,right:0,bottom:0},K.offset||{});if(t&&X){var We=On(K.restriction,C,$);if(We){var Ce=We.right-We.left-t.width,na=We.bottom-We.top-t.height;Ce<0&&(_e.left+=Ce,_e.right+=Ce),na<0&&(_e.top+=na,_e.bottom+=na)}_e.left+=h.left-t.width*X.left,_e.top+=h.top-t.height*X.top,_e.right+=h.right-t.width*(1-X.right),_e.bottom+=h.bottom-t.height*(1-X.bottom)}b.offset=_e},set:function(s){var t=s.coords,h=s.interaction,b=s.state,C=b.options,$=b.offset,K=On(C.restriction,h,t);if(K){var X=function(_e){return!_e||"left"in _e&&"top"in _e||((_e=ne({},_e)).left=_e.x||0,_e.top=_e.y||0,_e.right=_e.right||_e.left+_e.width,_e.bottom=_e.bottom||_e.top+_e.height),_e}(K);t.x=Math.max(Math.min(X.right-$.right,t.x),X.left+$.left),t.y=Math.max(Math.min(X.bottom-$.bottom,t.y),X.top+$.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Yo=Rl(ki,"restrict"),no={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Kn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Fi(s,t){for(var h=0,b=["top","left","bottom","right"];h<b.length;h++){var C=b[h];C in s||(s[C]=t[C])}return s}var Fn={noInner:no,noOuter:Kn,start:function(s){var t,h=s.interaction,b=s.startOffset,C=s.state,$=C.options;$&&(t=Re(On($.offset,h,h.coords.start.page))),t=t||{x:0,y:0},C.offset={top:t.y+b.top,left:t.x+b.left,bottom:t.y-b.bottom,right:t.x-b.right}},set:function(s){var t=s.coords,h=s.edges,b=s.interaction,C=s.state,$=C.offset,K=C.options;if(h){var X=ne({},t),_e=On(K.inner,b,X)||{},We=On(K.outer,b,X)||{};Fi(_e,no),Fi(We,Kn),h.top?t.y=Math.min(Math.max(We.top+$.top,X.y),_e.top+$.top):h.bottom&&(t.y=Math.max(Math.min(We.bottom+$.bottom,X.y),_e.bottom+$.bottom)),h.left?t.x=Math.min(Math.max(We.left+$.left,X.x),_e.left+$.left):h.right&&(t.x=Math.max(Math.min(We.right+$.right,X.x),_e.right+$.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Jo=Rl(Fn,"restrictEdges"),Xo=ne({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(s){}},ki.defaults),Zo=Rl({start:ki.start,set:ki.set,defaults:Xo},"restrictRect"),Qo={width:-1/0,height:-1/0},io={width:1/0,height:1/0},ti=Rl({start:function(s){return Fn.start(s)},set:function(s){var t=s.interaction,h=s.state,b=s.rect,C=s.edges,$=h.options;if(C){var K=Le(On($.min,t,s.coords))||Qo,X=Le(On($.max,t,s.coords))||io;h.options={endOnly:$.endOnly,inner:ne({},Fn.noInner),outer:ne({},Fn.noOuter)},C.top?(h.options.inner.top=b.bottom-K.height,h.options.outer.top=b.bottom-X.height):C.bottom&&(h.options.inner.bottom=b.top+K.height,h.options.outer.bottom=b.top+X.height),C.left?(h.options.inner.left=b.right-K.width,h.options.outer.left=b.right-X.width):C.right&&(h.options.inner.right=b.left+K.width,h.options.outer.right=b.left+X.width),Fn.set(s),h.options=$}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),xi={start:function(s){var t,h=s.interaction,b=s.interactable,C=s.element,$=s.rect,K=s.state,X=s.startOffset,_e=K.options,We=_e.offsetWithOrigin?function(Oa){var ll=Oa.interaction.element,Qa=Re(Pe(Oa.state.options.origin,null,null,[ll])),cl=Qa||me(Oa.interactable,ll,Oa.interaction.prepared.name);return cl}(s):{x:0,y:0};if(_e.offset==="startCoords")t={x:h.coords.start.page.x,y:h.coords.start.page.y};else{var Ce=Pe(_e.offset,b,C,[h]);(t=Re(Ce)||{x:0,y:0}).x+=We.x,t.y+=We.y}var na=_e.relativePoints;K.offsets=$&&na&&na.length?na.map(function(Oa,ll){return{index:ll,relativePoint:Oa,x:X.left-$.width*Oa.x+t.x,y:X.top-$.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,b=s.state,C=b.options,$=b.offsets,K=me(t.interactable,t.element,t.prepared.name),X=ne({},h),_e=[];C.offsetWithOrigin||(X.x-=K.x,X.y-=K.y);for(var We=0,Ce=$;We<Ce.length;We++)for(var na=Ce[We],Oa=X.x-na.x,ll=X.y-na.y,Qa=0,cl=C.targets.length;Qa<cl;Qa++){var Cl=C.targets[Qa],_l=void 0;(_l=x.func(Cl)?Cl(Oa,ll,t._proxy,na,Qa):Cl)&&_e.push({x:(x.number(_l.x)?_l.x:Oa)+na.x,y:(x.number(_l.y)?_l.y:ll)+na.y,range:x.number(_l.range)?_l.range:C.range,source:Cl,index:Qa,offset:na})}for(var Vl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Xl=0;Xl<_e.length;Xl++){var cr=_e[Xl],Ul=cr.range,Ql=cr.x-X.x,cn=cr.y-X.y,Gl=_a(Ql,cn),mn=Gl<=Ul;Ul===1/0&&Vl.inRange&&Vl.range!==1/0&&(mn=!1),Vl.target&&!(mn?Vl.inRange&&Ul!==1/0?Gl/Ul<Vl.distance/Vl.range:Ul===1/0&&Vl.range!==1/0||Gl<Vl.distance:!Vl.inRange&&Gl<Vl.distance)||(Vl.target=cr,Vl.distance=Gl,Vl.range=Ul,Vl.inRange=mn,Vl.delta.x=Ql,Vl.delta.y=cn)}return Vl.inRange&&(h.x=Vl.target.x,h.y=Vl.target.y),b.closest=Vl,Vl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},oo=Rl(xi,"snap"),Ln={start:function(s){var t=s.state,h=s.edges,b=t.options;if(!h)return null;s.state={options:{targets:null,relativePoints:[{x:h.left?0:1,y:h.top?0:1}],offset:b.offset||"self",origin:{x:0,y:0},range:b.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,b=s.coords,C=h.options,$=h.offsets,K={x:b.x-$[0].x,y:b.y-$[0].y};h.options=ne({},C),h.options.targets=[];for(var X=0,_e=C.targets||[];X<_e.length;X++){var We=_e[X],Ce=void 0;if(Ce=x.func(We)?We(K.x,K.y,t):We){for(var na=0,Oa=h.targetFields;na<Oa.length;na++){var ll=Oa[na],Qa=ll[0],cl=ll[1];if(Qa in Ce||cl in Ce){Ce.x=Ce[Qa],Ce.y=Ce[cl];break}}h.options.targets.push(Ce)}}var Cl=xi.set(s);return h.options=C,Cl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},et=Rl(Ln,"snapSize"),wi={aspectRatio:Ko,restrictEdges:Jo,restrict:Yo,restrictRect:Zo,restrictSize:ti,snapEdges:Rl({start:function(s){var t=s.edges;return t?(s.state.targetFields=s.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ln.start(s)):null},set:Ln.set,defaults:ne(Za(Ln.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:oo,snapSize:et,spring:oi,avoid:oi,transform:oi,rubberband:oi},si={id:"modifiers",install:function(s){var t=s.interactStatic;for(var h in s.usePlugin(Fr),s.usePlugin(qo),t.modifiers=wi,wi){var b=wi[h],C=b._defaults,$=b._methods;C._methods=$,s.defaults.perAction[h]=C}}},at=si,to=function(s){m(h,s);var t=N(h);function h(b,C,$,K,X,_e){var We;if(o(this,h),V(d(We=t.call(this,X)),$),$!==C&&V(d(We),C),We.timeStamp=_e,We.originalEvent=$,We.type=b,We.pointerId=Ue(C),We.pointerType=ja(C),We.target=K,We.currentTarget=null,b==="tap"){var Ce=X.getPointerIndex(C);We.dt=We.timeStamp-X.pointers[Ce].downTime;var na=We.timeStamp-X.tapTime;We.double=!!X.prevTap&&X.prevTap.type!=="doubletap"&&X.prevTap.target===We.target&&na<500}else b==="doubletap"&&(We.dt=C.timeStamp-X.tapTime,We.double=!0);return We}return c(h,[{key:"_subtractOrigin",value:function(b){var C=b.x,$=b.y;return this.pageX-=C,this.pageY-=$,this.clientX-=C,this.clientY-=$,this}},{key:"_addOrigin",value:function(b){var C=b.x,$=b.y;return this.pageX+=C,this.pageY+=$,this.clientX+=C,this.clientY+=$,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,ne(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,b=s.pointer,C=s.event,$=s.eventTarget;s.duplicate||h.pointerIsDown&&!h.pointerWasMoved||(h.pointerIsDown&&Pi(s),Rn({interaction:h,pointer:b,event:C,eventTarget:$,type:"move"},t))},"interactions:down":function(s,t){(function(h,b){for(var C=h.interaction,$=h.pointer,K=h.event,X=h.eventTarget,_e=h.pointerIndex,We=C.pointers[_e].hold,Ce=Qe(X),na={interaction:C,pointer:$,event:K,eventTarget:X,type:"hold",targets:[],path:Ce,node:null},Oa=0;Oa<Ce.length;Oa++){var ll=Ce[Oa];na.node=ll,b.fire("pointerEvents:collect-targets",na)}if(na.targets.length){for(var Qa=1/0,cl=0,Cl=na.targets;cl<Cl.length;cl++){var _l=Cl[cl].eventable.options.holdDuration;_l<Qa&&(Qa=_l)}We.duration=Qa,We.timeout=setTimeout(function(){Rn({interaction:C,eventTarget:X,pointer:$,event:K,type:"hold"},b)},Qa)}})(s,t),Rn(s,t)},"interactions:up":function(s,t){Pi(s),Rn(s,t),function(h,b){var C=h.interaction,$=h.pointer,K=h.event,X=h.eventTarget;C.pointerWasMoved||Rn({interaction:C,eventTarget:X,pointer:$,event:K,type:"tap"},b)}(s,t)},"interactions:cancel":function(s,t){Pi(s),Rn(s,t)}},PointerEvent:to,fire:Rn,collectEventTargets:so,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 Rn(s,t){var h=s.interaction,b=s.pointer,C=s.event,$=s.eventTarget,K=s.type,X=s.targets,_e=X===void 0?so(s,t):X,We=new to(K,b,C,$,h,t.now());t.fire("pointerEvents:new",{pointerEvent:We});for(var Ce={interaction:h,pointer:b,event:C,eventTarget:$,targets:_e,type:K,pointerEvent:We},na=0;na<_e.length;na++){var Oa=_e[na];for(var ll in Oa.props||{})We[ll]=Oa.props[ll];var Qa=me(Oa.eventable,Oa.node);if(We._subtractOrigin(Qa),We.eventable=Oa.eventable,We.currentTarget=Oa.node,Oa.eventable.fire(We),We._addOrigin(Qa),We.immediatePropagationStopped||We.propagationStopped&&na+1<_e.length&&_e[na+1].node!==We.currentTarget)break}if(t.fire("pointerEvents:fired",Ce),K==="tap"){var cl=We.double?Rn({interaction:h,pointer:b,event:C,eventTarget:$,type:"doubletap"},t):We;h.prevTap=cl,h.tapTime=cl.timeStamp}return We}function so(s,t){var h=s.interaction,b=s.pointer,C=s.event,$=s.eventTarget,K=s.type,X=h.getPointerIndex(b),_e=h.pointers[X];if(K==="tap"&&(h.pointerWasMoved||!_e||_e.downTarget!==$))return[];for(var We=Qe($),Ce={interaction:h,pointer:b,event:C,eventTarget:$,type:K,path:We,targets:[],node:null},na=0;na<We.length;na++){var Oa=We[na];Ce.node=Oa,t.fire("pointerEvents:collect-targets",Ce)}return K==="hold"&&(Ce.targets=Ce.targets.filter(function(ll){var Qa,cl;return ll.eventable.options.holdDuration===((Qa=h.pointers[X])==null||(cl=Qa.hold)==null?void 0:cl.duration)})),Ce.targets}function Pi(s){var t=s.interaction,h=s.pointerIndex,b=t.pointers[h].hold;b&&b.timeout&&(clearTimeout(b.timeout),b.timeout=null)}var lt=Object.freeze({__proto__:null,default:ci});function rt(s){var t=s.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var co={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)]=rt,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,b=s.pointerEvent,C=s.eventTarget,$=s.targets;if(b.type==="hold"&&$.length){var K=$[0].eventable.options.holdRepeatInterval;K<=0||(h.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:h,eventTarget:C,type:"hold",pointer:b,event:b},t)},K))}}})},nt=co,it={id:"pointer-events/interactableTargets",install:function(s){var t=s.Interactable;t.prototype.pointerEvents=function(b){return ne(this.events.options,b),this};var h=t.prototype._backCompatOption;t.prototype._backCompatOption=function(b,C){var $=h.call(this,b,C);return $===this&&(this.events.options[b]=C),$}},listeners:{"pointerEvents:collect-targets":function(s,t){var h=s.targets,b=s.node,C=s.type,$=s.eventTarget;t.interactables.forEachMatch(b,function(K){var X=K.events,_e=X.options;X.types[C]&&X.types[C].length&&K.testIgnoreAllow(_e,b,$)&&h.push({node:b,eventable:X,props:{interactable:K}})})},"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,b=s.options;ne(h.events.options,t.pointerEvents.defaults),ne(h.events.options,b.pointerEvents||{})}}},ot=it,tt={id:"pointer-events",install:function(s){s.usePlugin(lt),s.usePlugin(nt),s.usePlugin(ot)}},_i=tt,st={id:"reflow",install:function(s){var t=s.Interactable;s.actions.phases.reflow=!0,t.prototype.reflow=function(h){return function(b,C,$){for(var K=b.getAllElements(),X=$.window.Promise,_e=X?[]:null,We=function(){var na=K[Ce],Oa=b.getRect(na);if(!Oa)return 1;var ll,Qa=Se($.interactions.list,function(_l){return _l.interacting()&&_l.interactable===b&&_l.element===na&&_l.prepared.name===C.name});if(Qa)Qa.move(),_e&&(ll=Qa._reflowPromise||new X(function(_l){Qa._reflowResolve=_l}));else{var cl=Le(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:$.now()});ll=function(_l,Vl,Xl,cr,Ul){var Ql=_l.interactions.new({pointerType:"reflow"}),cn={interaction:Ql,event:Ul,pointer:Ul,eventTarget:Xl,phase:"reflow"};Ql.interactable=Vl,Ql.element=Xl,Ql.prevEvent=Ul,Ql.updatePointer(Ul,Ul,Xl,!0),pe(Ql.coords.delta),ra(Ql.prepared,cr),Ql._doPhase(cn);var Gl=_l.window,mn=Gl.Promise,Kr=mn?new mn(function(Nn){Ql._reflowResolve=Nn}):void 0;return Ql._reflowPromise=Kr,Ql.start(cr,Vl,Xl),Ql._interacting?(Ql.move(cn),Ql.end(Ul)):(Ql.stop(),Ql._reflowResolve()),Ql.removePointer(Ul,Ul),Kr}($,b,na,C,Cl)}_e&&_e.push(ll)},Ce=0;Ce<K.length&&!We();Ce++);return _e&&X.all(_e).then(function(){return b})}(this,h,s)}},listeners:{"interactions:stop":function(s,t){var h=s.interaction;h.pointerType==="reflow"&&(h._reflowResolve&&h._reflowResolve(),function(b,C){b.splice(b.indexOf(C),1)}(t.interactions.list,h))}}},ct=st;if(sn.use(Da),sn.use(kr),sn.use(_i),sn.use(Mr),sn.use(at),sn.use(ml),sn.use(Kl),sn.use(ha),sn.use(ct),sn.default=sn,i(a)==="object"&&a)try{a.exports=sn}catch{}return sn.default=sn,sn})}(Gi,Gi.exports)),Gi.exports}var ev=Q1();const js=M.getDefaultExportFromCjs(ev),Oo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:n}){const r=a,i=n,o=e.inject(lu),f=e.inject(ru);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,w=NaN,d=NaN,N=NaN,_=NaN,J=-1,A=-1,F=-1,L=-1,E=r.x,S=r.y,k=r.w,y=r.h;const x=e.ref(),O=e.reactive({i:e.toRef(r,"i"),state:u,wrapper:x,calcXY:Pe});function I(ve){qe(ve)}function W(){ka()}function Y(ve){_n(r.isDraggable)&&(u.draggable=ve)}function fe(ve){_n(r.isResizable)&&(u.resizable=ve)}function de(ve){_n(r.isBounded)&&(u.bounded=ve)}function j(ve){u.transformScale=ve}function U(ve){u.rowHeight=ve}function Z(ve){u.maxRows=ve}function ee(){u.rtl=Fs()==="rtl",ka()}function ge(ve){u.cols=Math.floor(ve)}o.increaseItem(O),e.onBeforeMount(()=>{u.rtl=Fs()==="rtl"}),e.onMounted(()=>{o.responsive&&o.lastBreakpoint?u.cols=su(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,_n(r.isDraggable)?u.draggable=o.isDraggable:u.draggable=r.isDraggable,_n(r.isResizable)?u.resizable=o.isResizable:u.resizable=r.isResizable,_n(r.isBounded)?u.bounded=o.isBounded:u.bounded=r.isBounded,u.transformScale=o.transformScale,u.useCssTransforms=o.useCssTransforms,u.useStyleCursor=o.useStyleCursor,e.watchEffect(()=>{E=r.x,S=r.y,y=r.h,k=r.w,yn(Ae)}),f.on("updateWidth",I),f.on("compact",W),f.on("setDraggable",Y),f.on("setResizable",fe),f.on("setBounded",de),f.on("setTransformScale",j),f.on("setRowHeight",U),f.on("setMaxRows",Z),f.on("directionchange",ee),f.on("setColNum",ge)}),e.onBeforeUnmount(()=>{f.off("updateWidth",I),f.off("compact",W),f.off("setDraggable",Y),f.off("setResizable",fe),f.off("setBounded",de),f.off("setTransformScale",j),f.off("setRowHeight",U),f.off("setMaxRows",Z),f.off("directionchange",ee),f.off("setColNum",ge),c.value&&(c.value.unset(),c.value=null),o.decreaseItem(O)}),l({state:u,wrapper:x});const Ie=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ue=e.computed(()=>u.resizable&&!r.static),B=e.computed(()=>o.isMirrored?!u.rtl:u.rtl),oe=e.computed(()=>(u.draggable||u.resizable)&&!r.static),q=q1("item"),ye=e.computed(()=>({[q.b()]:!0,[q.bm("resizable")]:ue.value,[q.bm("static")]:r.static,[q.bm("resizing")]:u.isResizing,[q.bm("dragging")]:u.isDragging,[q.bm("transform")]:u.useCssTransforms,[q.bm("rtl")]:B.value,[q.bm("no-touch")]:Ie&&oe.value})),Ke=e.computed(()=>[q.be("resizer"),B.value&&q.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,ve=>{u.draggable=ve}),e.watch(()=>r.static,()=>{yn(V),yn(pe)}),e.watch(()=>u.draggable,()=>{yn(V)}),e.watch(()=>r.isResizable,ve=>{u.resizable=ve}),e.watch(()=>r.isBounded,ve=>{u.bounded=ve}),e.watch(()=>u.resizable,()=>{yn(pe)}),e.watch(()=>u.rowHeight,()=>{yn(Ae),yn(Qe)}),e.watch([()=>u.cols,()=>u.containerWidth],()=>{yn(pe),yn(Ae),yn(Qe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{yn(pe)}),e.watch(B,()=>{yn(pe),yn(Ae)}),e.watch([()=>o.margin,()=>o.margin[0],()=>o.margin[1]],()=>{const ve=o.margin;!ve||ve[0]===u.margin[0]&&ve[1]===u.margin[1]||(u.margin=ve.map(Number),yn(Ae),yn(Qe))});function Ae(){r.x+r.w>u.cols?(E=0,k=r.w>u.cols?u.cols:r.w):(E=r.x,k=r.w);const ve=ua(E,S,k,y);u.isDragging&&(ve.top=u.dragging.top,B.value?ve.right=u.dragging.left:ve.left=u.dragging.left),u.isResizing&&(ve.width=u.resizing.width,ve.height=u.resizing.height);let da;u.useCssTransforms?B.value?da=P1(ve.top,ve.right,ve.width,ve.height):da=F1(ve.top,ve.left,ve.width,ve.height):B.value?da=H1(ve.top,ve.right,ve.width,ve.height):da=j1(ve.top,ve.left,ve.width,ve.height),u.style=da}function Qe(){const ve={};for(const da of["width","height"]){const ca=u.style[da].match(/^(\d+)px$/);if(!ca)return;ve[da]=ca[1]}i("container-resized",r.i,r.h,r.w,ve.height,ve.width)}function Ea(ve){if(r.static)return;const da=ve.type;if(da==="resizestart"&&u.isResizing||da!=="resizestart"&&!u.isResizing)return;const ca=$s(ve);if(_n(ca))return;const{x:Ue,y:Sa}=ca,Ma={width:0,height:0};let Te;switch(da){case"resizestart":{pe(),J=k,A=y,Te=ua(E,S,k,y),Ma.width=Te.width,Ma.height=Te.height,u.resizing=Ma,u.isResizing=!0;break}case"resizemove":{!ve.edges.right&&!ve.edges.left&&(N=Ue),!ve.edges.top&&!ve.edges.bottom&&(_=Sa);const Fa=Vs(N,_,Ue,Sa);B.value?Ma.width=u.resizing.width-Fa.deltaX/u.transformScale:Ma.width=u.resizing.width+Fa.deltaX/u.transformScale,Ma.height=u.resizing.height+Fa.deltaY/u.transformScale,u.resizing=Ma;break}case"resizeend":{Te=ua(E,S,k,y),Ma.width=Te.width,Ma.height=Te.height,u.resizing={width:-1,height:-1},u.isResizing=!1;break}}Te=me(Ma.height,Ma.width),Te.w<r.minW&&(Te.w=r.minW),Te.w>r.maxW&&(Te.w=r.maxW),Te.h<r.minH&&(Te.h=r.minH),Te.h>r.maxH&&(Te.h=r.maxH),Te.h<1&&(Te.h=1),Te.w<1&&(Te.w=1),N=Ue,_=Sa,(k!==Te.w||y!==Te.h)&&i("resize",r.i,Te.h,Te.w,Ma.height,Ma.width),ve.type==="resizeend"&&(J!==k||A!==y)&&i("resized",r.i,Te.h,Te.w,Ma.height,Ma.width),f.emit("resizeEvent",ve.type,r.i,E,S,Te.h,Te.w)}function ne(ve){if(r.static||u.isResizing)return;const da=ve.type;if(da==="dragstart"&&u.isDragging||da!=="dragstart"&&!u.isDragging)return;const ca=$s(ve);if(_n(ca))return;const{x:Ue,y:Sa}=ca,Ma=ve.target;if(!Ma.offsetParent)return;const Te={top:0,left:0};switch(da){case"dragstart":{F=E,L=S;const Na=Ma.offsetParent.getBoundingClientRect(),oa=Ma.getBoundingClientRect(),ja=oa.left/u.transformScale,aa=Na.left/u.transformScale,je=oa.right/u.transformScale,pa=Na.right/u.transformScale,te=oa.top/u.transformScale,ce=Na.top/u.transformScale;B.value?Te.left=(je-pa)*-1:Te.left=ja-aa,Te.top=te-ce,u.dragging=Te,u.isDragging=!0;break}case"dragmove":{const Na=Vs(w,d,Ue,Sa);if(B.value?Te.left=u.dragging.left-Na.deltaX/u.transformScale:Te.left=u.dragging.left+Na.deltaX/u.transformScale,Te.top=u.dragging.top+Na.deltaY/u.transformScale,u.bounded){const oa=Ma.offsetParent.clientHeight-Le(r.h,u.rowHeight,u.margin[1]);Te.top=se(Te.top,0,oa);const ja=Re(),aa=u.containerWidth-Le(r.w,ja,u.margin[0]);Te.left=se(Te.left,0,aa)}u.dragging=Te;break}case"dragend":{const Na=Ma.offsetParent.getBoundingClientRect(),oa=Ma.getBoundingClientRect(),ja=oa.left/u.transformScale,aa=Na.left/u.transformScale,je=oa.right/u.transformScale,pa=Na.right/u.transformScale,te=oa.top/u.transformScale,ce=Na.top/u.transformScale;B.value?Te.left=(je-pa)*-1:Te.left=ja-aa,Te.top=te-ce,u.dragging={top:-1,left:-1},u.isDragging=!1;break}}let Fa;B.value,Fa=Pe(Te.top,Te.left),w=Ue,d=Sa,(E!==Fa.x||S!==Fa.y)&&i("move",r.i,Fa.x,Fa.y),ve.type==="dragend"&&(F!==E||L!==S)&&i("moved",r.i,Fa.x,Fa.y),f.emit("dragEvent",ve.type,r.i,Fa.x,Fa.y,y,k)}function ua(ve,da,ca,Ue){const Sa=Re();let Ma;return B.value?Ma={right:Math.round(Sa*ve+(ve+1)*u.margin[0]),top:Math.round(u.rowHeight*da+(da+1)*u.margin[1]),width:ca===1/0?ca:Math.round(Sa*ca+Math.max(0,ca-1)*u.margin[0]),height:Ue===1/0?Ue:Math.round(u.rowHeight*Ue+Math.max(0,Ue-1)*u.margin[1])}:Ma={left:Math.round(Sa*ve+(ve+1)*u.margin[0]),top:Math.round(u.rowHeight*da+(da+1)*u.margin[1]),width:ca===1/0?ca:Math.round(Sa*ca+Math.max(0,ca-1)*u.margin[0]),height:Ue===1/0?Ue:Math.round(u.rowHeight*Ue+Math.max(0,Ue-1)*u.margin[1])},Ma}function Pe(ve,da){const ca=Re();let Ue=Math.round((da-u.margin[0])/(ca+u.margin[0])),Sa=Math.round((ve-u.margin[1])/(u.rowHeight+u.margin[1]));return Ue=Math.max(Math.min(Ue,u.cols-k),0),Sa=Math.max(Math.min(Sa,u.maxRows-y),0),{x:Ue,y:Sa}}function Re(){return(u.containerWidth-u.margin[0]*(u.cols+1))/u.cols}function Le(ve,da,ca){return Number.isFinite(ve)?Math.round(da*ve+Math.max(0,ve-1)*ca):ve}function se(ve,da,ca){return Math.max(Math.min(ve,ca),da)}function me(ve,da,ca=!1){const Ue=Re();let Sa=Math.round((da+u.margin[0])/(Ue+u.margin[0])),Ma=0;return ca?Ma=Math.ceil((ve+u.margin[1])/(u.rowHeight+u.margin[1])):Ma=Math.round((ve+u.margin[1])/(u.rowHeight+u.margin[1])),Sa=Math.max(Math.min(Sa,u.cols-E),0),Ma=Math.max(Math.min(Ma,u.maxRows-S),0),{w:Sa,h:Ma}}function qe(ve,da){u.containerWidth=ve}function ka(){Ae()}function _a(){!c.value&&x.value&&(c.value=js(x.value),u.useStyleCursor||c.value.styleCursor(!1))}const H=Os(ne);function V(){if(_a(),!!c.value)if(u.draggable&&!r.static){const ve={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(ve),m||(m=!0,c.value.on("dragstart dragmove dragend",da=>{da.type==="dragmove"?H(da):ne(da)}))}else c.value.draggable({enabled:!1})}const ae=Os(Ea);function pe(){if(_a(),!!c.value)if(u.resizable&&!r.static){const ve=ua(0,0,r.maxW,r.maxH),da=ua(0,0,r.minW,r.minH),ca={edges:{left:B.value?`.${Ke.value[0]}`:!1,right:B.value?!1:`.${Ke.value[0]}`,bottom:`.${Ke.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:da.height*u.transformScale,width:da.width*u.transformScale},max:{height:ve.height*u.transformScale,width:ve.width*u.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(ca.modifiers=[js.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(ca),g||(g=!0,c.value.on("resizestart resizemove resizeend",Ue=>{Ue.type==="resizemove"?ae(Ue):Ea(Ue)}))}else c.value.resizable({enabled:!1})}return(ve,da)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:x,class:e.normalizeClass(ye.value),style:e.normalizeStyle(u.style)},[e.renderSlot(ve.$slots,"default"),ue.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ke.value)},null,2)):e.createCommentVNode("",!0)],6))}}),yi=typeof window<"u";var Hs;yi&&(Hs=window==null?void 0:window.navigator)!=null&&Hs.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Us(a){return a!=null}function qs(){}const av=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(av)));const lv=yi&&("ontouchstart"in window||nv()>0),rv=lv?"pointerdown":"click";function nv(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function iv(a,l,n=window.Event){const{type:r,bubbles:i=!1,cancelable:o=!1,...f}=l;if(!Us(r)||r==="")return!1;let c;return Us(n)?c=new n(r,{bubbles:i,cancelable:o}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,i,o)),Object.assign(c,f),a.dispatchEvent(c)}const ov="clickoutside",tv=new Set;yi&&document.addEventListener(rv,a=>{const l=a.target,n=a.composedPath&&a.composedPath();tv.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&iv(r,{type:ov})})},!0);const sv=[["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 So;if(yi){for(const a of sv)if(a[1]in document){So=a;break}}e.computed(()=>!1);const cv=new Set,uv=new WeakMap;if(yi&&So){const a=So[2],l=So[4];document.addEventListener(l,()=>{if(cv.forEach(n=>{n.value=!1}),document[a]){const n=uv.get(document[a]);n&&(n.value=!0)}},!1)}const uu=new Map;uu.set("x",0);uu.set("y",0);var vi=[],dv=function(){return vi.some(function(a){return a.activeTargets.length>0})},pv=function(){return vi.some(function(a){return a.skippedTargets.length>0})},Ws="ResizeObserver loop completed with undelivered notifications.",fv=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Ws}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Ws),window.dispatchEvent(a)},eo;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(eo||(eo={}));var mi=function(a){return Object.freeze(a)},hv=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,mi(this)}return a}(),du=function(){function a(l,n,r,i){return this.x=l,this.y=n,this.width=r,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,n=l.x,r=l.y,i=l.top,o=l.right,f=l.bottom,c=l.left,u=l.width,m=l.height;return{x:n,y:r,top:i,right:o,bottom:f,left:c,width:u,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Rt=function(a){return a instanceof SVGElement&&"getBBox"in a},pu=function(a){if(Rt(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var i=a,o=i.offsetWidth,f=i.offsetHeight;return!(o||f||a.getClientRects().length)},Gs=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},vv=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},Xi=typeof window<"u"?window:{},ko=new WeakMap,Ks=/auto|scroll/,mv=/^tb|vertical/,yv=/msie|trident/i.test(Xi.navigator&&Xi.navigator.userAgent),Vn=function(a){return parseFloat(a||"0")},Ii=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new hv((n?l:a)||0,(n?a:l)||0)},Ys=mi({devicePixelContentBoxSize:Ii(),borderBoxSize:Ii(),contentBoxSize:Ii(),contentRect:new du(0,0,0,0)}),fu=function(a,l){if(l===void 0&&(l=!1),ko.has(a)&&!l)return ko.get(a);if(pu(a))return ko.set(a,Ys),Ys;var n=getComputedStyle(a),r=Rt(a)&&a.ownerSVGElement&&a.getBBox(),i=!yv&&n.boxSizing==="border-box",o=mv.test(n.writingMode||""),f=!r&&Ks.test(n.overflowY||""),c=!r&&Ks.test(n.overflowX||""),u=r?0:Vn(n.paddingTop),m=r?0:Vn(n.paddingRight),g=r?0:Vn(n.paddingBottom),w=r?0:Vn(n.paddingLeft),d=r?0:Vn(n.borderTopWidth),N=r?0:Vn(n.borderRightWidth),_=r?0:Vn(n.borderBottomWidth),J=r?0:Vn(n.borderLeftWidth),A=w+m,F=u+g,L=J+N,E=d+_,S=c?a.offsetHeight-E-a.clientHeight:0,k=f?a.offsetWidth-L-a.clientWidth:0,y=i?A+L:0,x=i?F+E:0,O=r?r.width:Vn(n.width)-y-k,I=r?r.height:Vn(n.height)-x-S,W=O+A+k+L,Y=I+F+S+E,fe=mi({devicePixelContentBoxSize:Ii(Math.round(O*devicePixelRatio),Math.round(I*devicePixelRatio),o),borderBoxSize:Ii(W,Y,o),contentBoxSize:Ii(O,I,o),contentRect:new du(w,u,O,I)});return ko.set(a,fe),fe},hu=function(a,l,n){var r=fu(a,n),i=r.borderBoxSize,o=r.contentBoxSize,f=r.devicePixelContentBoxSize;switch(l){case eo.DEVICE_PIXEL_CONTENT_BOX:return f;case eo.BORDER_BOX:return i;default:return o}},gv=function(){function a(l){var n=fu(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=mi([n.borderBoxSize]),this.contentBoxSize=mi([n.contentBoxSize]),this.devicePixelContentBoxSize=mi([n.devicePixelContentBoxSize])}return a}(),vu=function(a){if(pu(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},bv=function(){var a=1/0,l=[];vi.forEach(function(o){if(o.activeTargets.length!==0){var f=[];o.activeTargets.forEach(function(c){var u=new gv(c.target),m=vu(c.target);f.push(u),c.lastReportedSize=hu(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){o.callback.call(o.observer,f,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var i=r[n];i()}return a},Js=function(a){vi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(vu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},kv=function(){var a=0;for(Js(a);dv();)a=bv(),Js(a);return pv()&&fv(),a>0},bt,mu=[],xv=function(){return mu.splice(0).forEach(function(a){return a()})},wv=function(a){if(!bt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return xv()}).observe(n,r),bt=function(){n.textContent="".concat(l?l--:l++)}}mu.push(a),bt()},_v=function(a){wv(function(){requestAnimationFrame(a)})},Eo=0,Sv=function(){return!!Eo},Ev=250,Cv={attributes:!0,characterData:!0,childList:!0,subtree:!0},Xs=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Zs=function(a){return a===void 0&&(a=0),Date.now()+a},kt=!1,Dv=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=Ev),!kt){kt=!0;var r=Zs(l);_v(function(){var i=!1;try{i=kv()}finally{if(kt=!1,l=r-Zs(),!Sv())return;i?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,Cv)};document.body?n():Xi.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Xs.forEach(function(n){return Xi.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Xs.forEach(function(n){return Xi.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),Mt=new Dv,Qs=function(a){!Eo&&a>0&&Mt.start(),Eo+=a,!Eo&&Mt.stop()},Tv=function(a){return!Rt(a)&&!vv(a)&&getComputedStyle(a).display==="inline"},Bv=function(){function a(l,n){this.target=l,this.observedBox=n||eo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=hu(this.target,this.observedBox,!0);return Tv(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),Nv=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),xo=new WeakMap,ec=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},wo=function(){function a(){}return a.connect=function(l,n){var r=new Nv(l,n);xo.set(l,r)},a.observe=function(l,n,r){var i=xo.get(l),o=i.observationTargets.length===0;ec(i.observationTargets,n)<0&&(o&&vi.push(i),i.observationTargets.push(new Bv(n,r&&r.box)),Qs(1),Mt.schedule())},a.unobserve=function(l,n){var r=xo.get(l),i=ec(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&vi.splice(vi.indexOf(r),1),r.observationTargets.splice(i,1),Qs(-1))},a.disconnect=function(l){var n=this,r=xo.get(l);r.observationTargets.slice().forEach(function(i){return n.unobserve(l,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),Av=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.");wo.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Gs(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Gs(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.unobserve(this,l)},a.prototype.disconnect=function(){wo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Lo=new WeakMap;function zv(a){var l;for(let n=0,r=a.length;n<r;++n){const i=a[n],o=Lo.get(i.target);if(typeof o=="function"){const{inlineSize:f,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:f??u,height:c??m}))}}}const yu=new(yi&&window.ResizeObserver||Av)(zv);function ac(a,l){Lo.set(a,l),yu.observe(a)}function lc(a){Lo.has(a)&&(yu.unobserve(a),Lo.delete(a))}function Mv(a={}){let l=qs;const n=e.watch(()=>e.unref(a.target),i=>{l(),!(!i||typeof a.onResize!="function")&&(ac(i,a.onResize),l=()=>{lc(i),l=qs})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:ac,unobserveResize:lc,unobserve:r}}const Iv=e.ref(!1);e.computed(()=>Iv.value);const rc="__theme_style__",xt="__theme_observer__",nc=e.reactive(new Map),ic=new Map;e.watch(nc,()=>{if(!yi)return;ic.clear();const a=document.head.querySelector(`#${rc}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${xt} { width: 1px }`,r=1;for(const[i,[o,f]]of nc.entries())n+=` html.${o} .${xt}, .${f} .${xt} { width: ${++r}px }`,ic.set(r,i);l.textContent=n,l.id=rc,document.head.appendChild(l)});const gu=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:n}){const r=a,i=n,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}),f=new Map,c=e.ref(r.layout),u=e.ref(),{observeResize:m,unobserveResize:g}=Mv(),w=M1();w.on("resizeEvent",d),w.on("dragEvent",N),e.onBeforeMount(()=>{i("layout-before-mount",c.value)}),e.onMounted(()=>{i("layout-mounted",c.value),e.nextTick(()=>{U1(c.value),o.originalLayout=c.value,e.nextTick(()=>{I(),u.value&&m(u.value,I1(E,16)),Ai(c.value,r.verticalCompact),i("layout-updated",c.value),L(),E()})})}),e.onBeforeUnmount(()=>{w.clearAll(),u.value&&g(u.value)});function d(Y,fe,de,j,U,Z){x(Y,fe,de,j,U,Z)}function N(Y,fe,de,j,U,Z){y(Y,fe,de,j,U,Z)}e.watch(()=>o.width,(Y,fe)=>{e.nextTick(()=>{w.emit("updateWidth",Y),fe===-1&&e.nextTick(()=>{i("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,F()}),e.watch(()=>r.colNum,Y=>{w.emit("setColNum",Y)}),e.watch(()=>r.rowHeight,Y=>{w.emit("setRowHeight",Y)}),e.watch(()=>r.isDraggable,Y=>{w.emit("setDraggable",Y)}),e.watch(()=>r.isResizable,Y=>{w.emit("setResizable",Y)}),e.watch(()=>r.isBounded,Y=>{w.emit("setBounded",Y)}),e.watch(()=>r.transformScale,Y=>{w.emit("setTransformScale",Y)}),e.watch(()=>r.responsive,Y=>{Y||(i("update:layout",o.originalLayout),w.emit("setColNum",r.colNum)),E()}),e.watch(()=>r.maxRows,Y=>{w.emit("setMaxRows",Y)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(lu,e.reactive({...e.toRefs(r),...e.toRefs(o),increaseItem:_,decreaseItem:J})),e.provide(ru,w),l({state:o,getItem:A,resizeEvent:x,dragEvent:y,layoutUpdate:F});function _(Y){f.set(Y.i,Y)}function J(Y){f.delete(Y.i)}function A(Y){return f.get(Y)}function F(){if(!_n(c.value)&&!_n(o.originalLayout)){if(c.value.length!==o.originalLayout.length){const Y=W(c.value,o.originalLayout);if(Y.length>0)if(c.value.length>o.originalLayout.length)o.originalLayout=o.originalLayout.concat(Y);else{const fe=new Set(Y.map(de=>de.i));o.originalLayout=o.originalLayout.filter(de=>!fe.has(de.i))}o.lastLayoutLength=c.value.length,I()}Ai(c.value,r.verticalCompact),w.emit("updateWidth",o.width),L(),i("layout-updated",c.value)}}function L(){o.mergedStyle={height:S()}}function E(){u.value&&(o.width=u.value.offsetWidth),w.emit("resizeEvent")}function S(){if(!r.autoSize)return;const Y=parseFloat(r.margin[1]);return L1(c.value)*(r.rowHeight+Y)+Y+"px"}let k;function y(Y,fe,de,j,U,Z){let ee=Ls(c.value,fe);_n(ee)&&(ee={h:0,w:0,x:0,y:0,i:""}),Y==="dragstart"&&!r.verticalCompact&&(k=c.value.reduce((ge,{i:Ie,x:ue,y:B})=>({...ge,[Ie]:{x:ue,y:B}}),{})),Y==="dragmove"||Y==="dragstart"?(o.placeholder.i=fe,o.placeholder.x=ee.x,o.placeholder.y=ee.y,o.placeholder.w=Z,o.placeholder.h=U,e.nextTick(()=>{o.isDragging=!0}),w.emit("updateWidth",o.width)):e.nextTick(()=>{o.isDragging=!1}),c.value=zt(c.value,ee,de,j,!0,r.preventCollision),r.restoreOnDrag?(ee.static=!0,Ai(c.value,r.verticalCompact,k),ee.static=!1):Ai(c.value,r.verticalCompact),w.emit("compact"),L(),Y==="dragend"&&(k=void 0,i("layout-updated",c.value))}function x(Y,fe,de,j,U,Z){let ee=Ls(c.value,fe);_n(ee)&&(ee={h:0,w:0,x:0,y:0,i:""});let ge;if(r.preventCollision){const Ie=iu(c.value,{...ee,w:Z,h:U}).filter(ue=>ue.i!==ee.i);if(ge=Ie.length>0,ge){let ue=1/0,B=1/0;Ie.forEach(oe=>{oe.x>ee.x&&(ue=Math.min(ue,oe.x)),oe.y>ee.y&&(B=Math.min(B,oe.y))}),Number.isFinite(ue)&&(ee.w=ue-ee.x),Number.isFinite(B)&&(ee.h=B-ee.y)}}ge||(ee.w=Z,ee.h=U),Y==="resizestart"||Y==="resizemove"?(o.placeholder.i=fe,o.placeholder.x=de,o.placeholder.y=j,o.placeholder.w=ee.w,o.placeholder.h=ee.h,e.nextTick(()=>{o.isDragging=!0}),w.emit("updateWidth",o.width)):Y&&e.nextTick(()=>{o.isDragging=!1}),r.responsive&&O(),Ai(c.value,r.verticalCompact),w.emit("compact"),L(),Y==="resizeend"&&i("layout-updated",c.value)}function O(){const Y=K1(r.breakpoints,o.width);if(Y===o.lastBreakpoint)return;const fe=su(Y,r.cols);!_n(o.lastBreakpoint)&&!o.layouts[o.lastBreakpoint]&&(o.layouts[o.lastBreakpoint]=At(c.value));const de=Y1(o.originalLayout,o.layouts,r.breakpoints,Y,o.lastBreakpoint,fe,r.verticalCompact);o.layouts[Y]=de,o.lastBreakpoint!==Y&&i("breakpoint-changed",Y,de),c.value=de,i("update:layout",de),o.lastBreakpoint=Y,w.emit("setColNum",fe)}function I(){o.layouts=Object.assign({},r.responsiveLayouts)}function W(Y,fe){const de=new Set(fe.map(ee=>ee.i)),j=new Set(Y.map(ee=>ee.i)),U=Y.filter(ee=>!de.has(ee.i)),Z=fe.filter(ee=>!j.has(ee.i));return U.concat(Z)}return(Y,fe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:u,class:"vgl-layout",style:e.normalizeStyle(o.mergedStyle)},[Y.$slots.default?e.renderSlot(Y.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,de=>(e.openBlock(),e.createBlock(Oo,e.mergeProps({key:de.i,ref_for:!0},de),{default:e.withCtx(()=>[e.renderSlot(Y.$slots,"item",{item:de})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Oo,{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 Ov={key:0,class:"item-view-group"},Lv={key:0,class:"item-view-group"},Rv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=M.useModelComp(M.pinia),{isEdit:r}=M.storeToRefs(n),i=li(M.pinia),o=l,f=a,c=e.ref(""),u=e.computed(()=>f==null?void 0:f.children),m=e.computed(()=>{var L,E,S,k;return((L=f==null?void 0:f.children)==null?void 0:L.length)>0&&((E=f==null?void 0:f.children)!=null&&E.every(y=>y==null?void 0:y.layout))?(k=(S=f==null?void 0:f.children)==null?void 0:S[0])==null?void 0:k.layout:"vertical"}),g=L=>{c.value=L,o("radioChange",L)},w=e.computed(()=>{var L,E;return((E=(L=f==null?void 0:f.children)==null?void 0:L[0])==null?void 0:E.isGridLayout)||!1}),d=e.ref((f==null?void 0:f.level)+1),N=e.computed(()=>{if(!(f!=null&&f.children)||!Array.isArray(f.children)||f.children.length<2)return!1;const L=f.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),E=f.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return L&&E}),_=e.computed(()=>{var E,S,k,y,x,O;let L=(E=f==null?void 0:f.children)==null?void 0:E.filter(I=>I==null?void 0:I.choice);if(i.setSelectTab((S=L==null?void 0:L[0])==null?void 0:S.choiceName),(c==null?void 0:c.value)!=="")return(k=f==null?void 0:f.children)==null?void 0:k.filter(I=>!(I!=null&&I.choiceName)||(I==null?void 0:I.choiceName)===(c==null?void 0:c.value));{let I=(x=(y=f==null?void 0:f.children)==null?void 0:y.find(W=>W==null?void 0:W.choice))==null?void 0:x.choiceName;return(O=f==null?void 0:f.children)==null?void 0:O.filter(W=>!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===I)}}),J=L=>{const E=(L==null?void 0:L.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(S=>{const k=typeof S=="string"?S:JSON.stringify(S);return k==null?void 0:k.includes("HideGroup=Yes")}))};e.watch(()=>f==null?void 0:f.children,()=>{N.value},{deep:!0});const A=L=>{o("rowClick",L)},F=(L,E)=>{o("routeUrl",L,E)};return(L,E)=>w.value?(e.openBlock(),e.createBlock(e.unref(gu),{key:0,layout:u.value,"onUpdate:layout":E[0]||(E[0]=S=>u.value=S),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(S,k)=>(e.openBlock(),e.createBlock(e.unref(Oo),{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 y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:k===((y=f==null?void 0:f.children)==null?void 0:y.length)-1?"0px":"24px"})},[((O=(x=S==null?void 0:S.component)==null?void 0:x.comp)==null?void 0:O.toUpperCase())!=="TABLE"&&((I=S==null?void 0:S.component)!=null&&I.name)?(e.openBlock(),e.createElementBlock("div",Ov,[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((W=S==null?void 0:S.component)==null?void 0:W.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)((Y=S==null?void 0:S.component)==null?void 0:Y.comp)),{pageLayout:m.value,config:{showIndex:(fe=e.unref(mr)[k])==null?void 0:fe.showIndex,allowMove:(de=e.unref(mr)[k])==null?void 0:de.allowMove,viewport:(j=e.unref(mr)[k])==null?void 0:j.viewport,status:(U=e.unref(mr)[k])==null?void 0:U.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:e.unref(Mc),itemData:(Z=S==null?void 0:S.component)==null?void 0:Z.compData,childItemData:(ee=S==null?void 0:S.component)==null?void 0:ee.itemChildData,key:e.unref(ai),cacheNewData:e.unref(zc),onChange:e.unref(Ao),index:(S==null?void 0:S.id)??k,onContentChange:e.unref(zo),onPageChange:e.unref(Mo),parentTableId:(ge=S==null?void 0:S.component)==null?void 0:ge.tableId,allMapContents:e.unref(Tt),children:(Ie=S==null?void 0:S.component)==null?void 0:Ie.children,level:d.value,onRowClick:A,onRouteUrl:F,onClickTrigger:e.unref(Ic),onClickMainKey:e.unref(Oc),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(_.value,(S,k)=>{var y,x;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(k)===((y=f==null?void 0:f.children)==null?void 0:y.length)-1?"0px":"24px"})},[((x=S==null?void 0:S.comp)==null?void 0:x.toUpperCase())!=="TABLE"&&S.name?(e.openBlock(),e.createElementBlock("div",Lv,[J(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(Qi)(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(ai),onChange:e.unref(Ao),index:(S==null?void 0:S.id)??k,onContentChange:e.unref(zo),onPageChange:e.unref(Mo),parentTableId:S==null?void 0:S.tableId,allMapContents:e.unref(Tt),children:S==null?void 0:S.children,level:d.value,onRowClick:A,onRouteUrl:F,onRadioChange:g},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$v=nr._export_sfc(Rv,[["__scopeId","data-v-bafbdd45"]]),Vv={class:"radio-group-container"},Fv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(),o=li(M.pinia),{selectTab:f}=M.storeToRefs(o);e.watch(()=>n==null?void 0:n.itemData,()=>{i.value=f.value},{immediate:!0,deep:!0});const c=u=>{i.value=u,r("radioChange",i.value)};return(u,m)=>(e.openBlock(),e.createElementBlock("div",Vv,[e.createVNode(pl.ssRadio,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),Pv=nr._export_sfc(Fv,[["__scopeId","data-v-177d64c3"]]),jv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,()=>{var r,i;n.value=((i=(r=l==null?void 0:l.itemData)==null?void 0:r.find(o=>(o==null?void 0:o.key)==="backGround"))==null?void 0:i.contents)??[]},{deep:!0,immediate:!0}),(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pl.ssCarousel,{carouselList:n.value},null,8,["carouselList"])]))}}),bu=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"}]),Hv={TABLE:Uc,FORM:zs,STATICFORM:qc,TABLEOPERATE:A6,TABLESTYLE:Y6,TABLEEXTEND:X6,TABLEINTERACTION:e4,FORMOPERATE:Ms,FOLD:N4,CALCULATOR:L4,METHODBUTTON:V4,AVATARUPLOAD:ds.ssAvatar,SIGNATURE:ds.ssSignature,FORMTOP:zs,STEP:X4,STEPOPERATE:x4,TIMELINE:r2,TIMELINEOPERATE:D4,FORMTOPOPERATE:Ms,SIGNATUREOPERATE:K4,AVATARUPLOADOPERATE:j4,TABS:o2,TABSOPERATE:q2,CHART:o1,CHARTOPERATE:g1,LAYOUT:x1,LAYOUTOPERATE:N1,PARENTITEM:$v,RADIO:Pv,CAROUSEL:jv};function Ri(a){return Hv[a==null?void 0:a.toUpperCase()]||null}exports.De=gu;exports.activeStepInfo=zi;exports.addContents=Zi;exports.addVisibleDialog=Lt;exports.affixItems=o3;exports.allMapContents=Tt;exports.analyzeMenu=pc;exports.cacheNewData=zc;exports.clickMainKey=Oc;exports.clickSavePage=i3;exports.clickStep=Rc;exports.clickTrigger=Ic;exports.compId=ai;exports.compNames=Mc;exports.compShow=Li;exports.existLayouts=h3;exports.fixChangeValue=Ro;exports.generateLayouts=j6;exports.getComponent=Ri;exports.getComponents=Qi;exports.getPageConstruct=pp;exports.getPageData=Wr;exports.getSliceContLength=k3;exports.gridRowHeight=L6;exports.gridRowHeightHmPg=Jc;exports.isStepLayout=$c;exports.newGenerateLayouts=q6;exports.onBack=r3;exports.onButtonChange=u3;exports.onChange=Ao;exports.onClick=n3;exports.onClickStep=v3;exports.onContentChange=zo;exports.onExtendTaskEnd=f3;exports.onOk=d3;exports.onPageBack=y3;exports.onPageChange=Mo;exports.onSelectFixContent=l3;exports.renderShowItems=Nc;exports.showItems=mr;exports.sliceTableLength=Ac;exports.slotContent=bu;exports.ssTable=Uc;exports.st=Oo;exports.stepItems=x3;exports.tabChange=m3;exports.toolBar=p3;exports.useFormComp=Ot;exports.useModelLoader=l0;exports.verifyButton=g3;
25
+ ${dr}`,duration:5e3,showClose:!0})}else Ja.ElMessage.success("导出成功")}else Ja.ElMessage.error(((nl=er==null?void 0:er.data)==null?void 0:nl.message)||"导出失败")}catch(ze){console.error("导出paraform失败:",ze),Ja.ElMessage.error("导出失败:"+((ze==null?void 0:ze.message)||"未知错误"))}finally{Ra.close()}}else if(p!=null&&p.includes("导出")&&p!=="导出paraform"){if(p==="导出选中"&&((wa=Mr.value)==null?void 0:wa.length)===0)return Ja.ElMessage.warning(`请先勾选${p}的数据`);if(p==="导出全部"&&((il=Te.value)==null?void 0:il.length)===0)return Ja.ElMessage.warning("暂无数据导出");let Ra=["序号",...(Va=(ke=U.value)==null?void 0:ke.map(sa=>sa==null?void 0:sa.prop))==null?void 0:Va.filter(sa=>sa!=="操作")],ze=p==="导出全部"?Te.value:Mr.value;const Q=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];ze=ze==null?void 0:ze.map(sa=>Object.fromEntries(Object.entries(sa).filter(([T])=>!Q.includes(T)))),Ra=["序号",...Ra],ze=ze==null?void 0:ze.map((sa,T)=>({序号:T+1,...sa}));let He=(d==null?void 0:d.compName)||"表格信息";Ho(ze,He,Ra,He)}else if(p==="OCR识别")xl.value=!0,ya.value=[],ra.value=1,Ga.value.clear(),wl.value.clear(),De.value=0;else if(p==="迁移")K.selectRow=v,K.show=!0;else if(p==="生成方法"){let Ra=await B0(v),ze;v!==""?ze=[v]:ze=M.cloneDeep(Te.value),ze=ze==null?void 0:ze.map(He=>(He.输出值=Ra,He));const Q={fixContent:ze,buttonName:"编辑",relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames};j("change",Q)}else if(p==="签字板"||p==="触控笔")tl.value.dialogShow=!0,tl.value.dialogTitle=p;else if(((va=z==null?void 0:z.extra)==null?void 0:va.type)==="methodButton"){let Ra;v!==""?Ra=[v]:Ra=M.cloneDeep(Te.value);const ze=await St(Ra,U==null?void 0:U.value,"Manual",Te.value,d==null?void 0:d.calculator,d==null?void 0:d.compNames);let Q;(Ya=ze==null?void 0:ze[0])!=null&&Ya.menuPathContent?Q={fixContent:ze,buttonName:"新增",relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames}:Q={fixContent:ze,buttonName:"methodButton",relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames},j("change",Q)}}},Su=async(p,v)=>{var z,R,P,D,re,ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke;try{let Va,va;const Ya=(z=da.value[se.value+O])==null?void 0:z.filter(Ua=>{var ol;return((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.type)==="structureMethod"}),Ra=(R=da.value[se.value+O])==null?void 0:R.filter(Ua=>{var ol;return((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.type)==="structure"}),ze=Ya==null?void 0:Ya.find(Ua=>{var ol,Ka;return((Ka=(ol=Ua==null?void 0:Ua.value)==null?void 0:ol.pageData)==null?void 0:Ka.method)==="保存"});if(!ze)return;const Q=(ie=(re=da.value[(D=(P=ze==null?void 0:ze.value)==null?void 0:P.pageData)==null?void 0:D.path])==null?void 0:re.filter(Ua=>{var ol;return((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.type)==="data"}))==null?void 0:ie.find(Ua=>{var ol,Ka,Ca,dl;return((Ka=(ol=Ua==null?void 0:Ua.value)==null?void 0:ol.tableData)==null?void 0:Ka.算法名称)===((dl=(Ca=ze==null?void 0:ze.value)==null?void 0:Ca.pageData)==null?void 0:dl.method)});if(!Q)return;const He={buttonName:(xe=(G=ze==null?void 0:ze.value)==null?void 0:G.pageData)==null?void 0:xe.method,api:(Ye=(be=Q==null?void 0:Q.value)==null?void 0:be.tableData)==null?void 0:Ye.算法体,content:Ra==null?void 0:Ra.map(Ua=>{var ol;return(ol=Ua==null?void 0:Ua.value)==null?void 0:ol.pageData}),extraContent:[],extraValues:(Xe=(Ge=ze==null?void 0:ze.value)==null?void 0:Ge.pageData)==null?void 0:Xe.data,methodName:(Aa=(ba=ze==null?void 0:ze.value)==null?void 0:ba.pageData)==null?void 0:Aa.path};if(!p)return;const sa={...p,compData:(za=p==null?void 0:p.compData)==null?void 0:za.map(Ua=>{var ol;return(Ua==null?void 0:Ua.key)==="formContent"?{...Ua,contents:(ol=Ua==null?void 0:Ua.contents)==null?void 0:ol.map(Ka=>(Ka==null?void 0:Ka.prop)===v?{...Ka,value:""}:Ka)}:Ua})},T={key:{pageKey:se.value+O,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:sa}},Ia=await Ja.axios.post(He.api,T,{headers:{"Content-Type":"application/json"}});return((Ze=Ia==null?void 0:Ia.data)==null?void 0:Ze.code)===200&&(Va=(wa=(nl=Ia==null?void 0:Ia.data)==null?void 0:nl.result)==null?void 0:wa.latestReportCode,va=(ke=(il=Ia==null?void 0:Ia.data)==null?void 0:il.result)==null?void 0:ke.status),{newMainKeyValue:Va,newStatus:va}}catch(Va){throw Ja.ElMessage.error(Va),new Error(Va)}},Vt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const Eu=async(p,v,z)=>{var G,xe;let R=p==null?void 0:p[v==null?void 0:v.prop],P=1,D,re;const ie=M.cloneDeep(se).value+O+R;if(ie){Vt.value="",D=(G=da.value[ie])==null?void 0:G.filter(Ge=>{var Xe;return((Xe=Ge==null?void 0:Ge.key)==null?void 0:Xe.type)==="structure"});const be=D==null?void 0:D.find(Ge=>{var Xe,ba,Aa;return((Aa=(ba=(Xe=Ge==null?void 0:Ge.value)==null?void 0:Xe.pageData)==null?void 0:ba.comp)==null?void 0:Aa.toUpperCase())==="FORM"});re={...(xe=be==null?void 0:be.value)==null?void 0:xe.pageData,id:be==null?void 0:be.id};const Ye=await Su(re,v==null?void 0:v.prop);if(Vt.value=Ye==null?void 0:Ye.newStatus,Ye!=null&&Ye.newMainKeyValue)return Ye==null?void 0:Ye.newMainKeyValue}if(Te.value.some(be=>(be==null?void 0:be[v==null?void 0:v.prop])===R)){const be=R;for(;Te.value.some(Ye=>(Ye==null?void 0:Ye[v==null?void 0:v.prop])===`${be}(${P})`);)P++;R=`${be}(${P})`}return R},Cu=async(p,v,z)=>{var D,re,ie,G;let R,P;if(await Eu(z==null?void 0:z.data,z==null?void 0:z.firstCol),R=M.cloneDeep(se).value+O,P=M.cloneDeep(R)+`loading${((D=Il.value)==null?void 0:D.account)||((re=Il.value)==null?void 0:re.账号)}`,v){const xe=(G=(ie=da.value[P])==null?void 0:ie.filter(be=>{var Ye;return((Ye=be==null?void 0:be.key)==null?void 0:Ye.parentTable)===""}))==null?void 0:G.map(be=>{var Ye;return{id:be==null?void 0:be.id,...(Ye=be==null?void 0:be.value)==null?void 0:Ye.pageData}});(xe==null?void 0:xe.length)>0||await le.loadingConstruct(R,P,null,null,null),_a.setRouteToChildPath(M.cloneDeep(se).value),Re.setActiveMenuPath(P)}else _a.setRouteToChildPath(M.cloneDeep(se).value),Re.setActiveMenuPath(P)},Du=()=>{ue.value=!1,Me.value=[],B.value=!1},ji=p=>{var ie,G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze,Q,He,sa;const v=[];Ie.value=M.cloneDeep(U.value);let z=(G=(ie=u.value)==null?void 0:ie.find(T=>{var Ia;return(Ia=T==null?void 0:T.key)==null?void 0:Ia.includes("@EditRead")}))==null?void 0:G.content,R=!1;(z==null?void 0:z.length)>0&&(R=_s(z,p),(R==null?void 0:R.length)>0?R=!0:R=!1),(be=le.getColumnChild((xe=M.cloneDeep(U.value))==null?void 0:xe.filter(T=>(T==null?void 0:T.label)!=="操作")))==null||be.forEach((T,Ia)=>{var Ua,ol,Ka;T!=null&&T.formType&&((Ua=T==null?void 0:T.formType)==null?void 0:Ua.toUpperCase())==="SELECT"||T!=null&&T.menuId?v.push({label:(ol=T==null?void 0:T.prop)!=null&&ol.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",name:(T==null?void 0:T.prop)??"t"+Ia,prop:T==null?void 0:T.prop,type:"Select",value:(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??Ia,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,multipleLimit:T==null?void 0:T.multipleLimit,width:2,isFormColHidden:T==null?void 0:T.isFormColHidden,relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,allSelectionContents:(T==null?void 0:T.allSelectionContents)??[],filterContent:T==null?void 0:T.filterContent,disabled:(T==null?void 0:T.prop)==="disabled"?!0:R||(T==null?void 0:T.disabled),filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly}):v.push({label:(Ka=T==null?void 0:T.prop)!=null&&Ka.includes(".")?T==null?void 0:T.prop:(T==null?void 0:T.label)??(T==null?void 0:T.prop)??"",prop:T==null?void 0:T.prop,name:(T==null?void 0:T.prop)??"t"+Ia,type:!(T!=null&&T.formType)||(T==null?void 0:T.formType)===""?"Input":T==null?void 0:T.formType,value:(T==null?void 0:T.formType)==="Upload"?(p==null?void 0:p[T==null?void 0:T.prop])??"{}":(p==null?void 0:p[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??Ia,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,width:2,isFormColHidden:T==null?void 0:T.isFormColHidden,disabled:(T==null?void 0:T.prop)==="disabled"?!0:R||(T==null?void 0:T.disabled),relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter,isReadonly:T==null?void 0:T.isReadonly})}),p===""||!p||(oa.value=(p==null?void 0:p.id)??"");let P=le.getColumnChild((Ye=M.cloneDeep(U.value))==null?void 0:Ye.filter(T=>(T==null?void 0:T.label)!=="操作"));ea.value&&((Ge=ea.value)==null?void 0:Ge.length)>0&&(ea.value=(Xe=M.cloneDeep(ea).value)==null?void 0:Xe.map(T=>{var Ua;let Ia=(T==null?void 0:T.prop)||((Ua=P==null?void 0:P.find(ol=>(ol==null?void 0:ol.label)===(T==null?void 0:T.label)))==null?void 0:Ua.prop);return Ia&&(T.value=p[Ia]),T})),he.value=ea.value&&((ba=ea.value)==null?void 0:ba.length)>0?le.getTableFormToForm(ea.value):v,he.value=((Aa=he.value)==null?void 0:Aa.map(T=>({...T,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled})))??he.value;let D=[],re=((nl=(Ze=(za=d.itemData)==null?void 0:za.filter(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:Ze[0])==null?void 0:nl.contents)??"";if(re=le.analyzeSplitToContent(re,","),(re==null?void 0:re.length)>0&&(D=re.flat()),(D==null?void 0:D.length)>0){let T=D==null?void 0:D.filter(Ca=>Ca==null?void 0:Ca.includes("@Type"));if(T=T==null?void 0:T[(T==null?void 0:T.length)-1],(T==null?void 0:T[(T==null?void 0:T.length)-1])===","&&(T=T==null?void 0:T.slice(0,(T==null?void 0:T.length)-1)),T){let Ca=(il=(wa=T==null?void 0:T.replace("=",y))==null?void 0:wa.split(y))==null?void 0:il[1];((ke=Ca==null?void 0:Ca.trim())==null?void 0:ke.toUpperCase())==="MANUAL"&&(d==null||d.index,he.value=(Va=he.value)==null?void 0:Va.map((dl,ql)=>dl))}let Ia=(va=he.value)==null?void 0:va.filter(Ca=>Ca==null?void 0:Ca.mainKey),Ua;Ia==null||Ia.forEach(Ca=>{var ql;if(Ua!==void 0)return;let dl=Ca==null?void 0:Ca.menus;((ql=Ia==null?void 0:Ia.filter(qa=>qa==null?void 0:qa.mainKey))==null?void 0:ql.length)>1&&(Ua=dl,Ca==null||Ca.groups)});let ol=[],Ka=new Map;if(Ia==null||Ia.forEach(Ca=>{var dl,ql,qa,Dl,$a,Ll,rl,hl,zl,gl,xr,ur,er;if((dl=Ca==null?void 0:Ca.prop)!=null&&dl.includes(".")){let kl=[];Ka.get(((qa=(ql=Ca==null?void 0:Ca.prop)==null?void 0:ql.split("."))==null?void 0:qa[0])+(Ca!=null&&Ca.isMainPath?0:1)+((Dl=Ca==null?void 0:Ca.groups)==null?void 0:Dl[0]))&&(kl=Ka.get(((Ll=($a=Ca==null?void 0:Ca.prop)==null?void 0:$a.split("."))==null?void 0:Ll[0])+(Ca!=null&&Ca.isMainPath?0:1)+((rl=Ca==null?void 0:Ca.groups)==null?void 0:rl[0]))),kl.push(Ca),Ka.set(((zl=(hl=Ca==null?void 0:Ca.prop)==null?void 0:hl.split("."))==null?void 0:zl[0])+(Ca!=null&&Ca.isMainPath?0:1)+((gl=Ca==null?void 0:Ca.groups)==null?void 0:gl[0]),kl)}else{let kl=[];Ka.get("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((xr=Ca==null?void 0:Ca.groups)==null?void 0:xr[0]))&&(kl=Ka.get("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((ur=Ca==null?void 0:Ca.groups)==null?void 0:ur[0]))),kl.push(Ca),Ka.set("normal"+(Ca!=null&&Ca.isMainPath?0:1)+((er=Ca==null?void 0:Ca.groups)==null?void 0:er[0]),kl)}}),ol=Array.from(Ka.values()),(ol==null?void 0:ol.length)>0)for(let Ca in ol){let dl=ol==null?void 0:ol[Ca];if((dl==null?void 0:dl.length)!==1){if((dl==null?void 0:dl.length)>1){let ql=dl==null?void 0:dl.map(gl=>gl==null?void 0:gl.prop),qa=dl==null?void 0:dl.map(gl=>gl==null?void 0:gl.label),Dl=dl==null?void 0:dl.map(gl=>gl==null?void 0:gl.value),$a=(Ya=M.cloneDeep(dl))==null?void 0:Ya[0],Ll=(Ra=he.value)==null?void 0:Ra.findIndex(gl=>(gl==null?void 0:gl.prop)===($a==null?void 0:$a.prop)),rl=(ze=he.value)==null?void 0:ze.slice(0,Ll),hl=(He=he.value)==null?void 0:He.slice(Ll,(Q=he.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=ql==null?void 0:ql.join("·");let zl=dl==null?void 0:dl.map(gl=>{var xr;return(xr=gl==null?void 0:gl.words)==null?void 0:xr.join(".")});$a.relatedWords=zl,$a.usingType="parent",hl.unshift($a),he.value=[...rl,...hl],he.value=(sa=he.value)==null?void 0:sa.map(gl=>(ql!=null&&ql.find(xr=>xr===(gl==null?void 0:gl.prop))&&(gl.isFormColHidden=!0,gl.relatedWords=zl),gl))}}}}},Tu=()=>{var v;const p=(v=i.value)==null?void 0:v.$el;p&&Fl.Sortable.create(p,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:z=>{var re;const{oldIndex:R,newIndex:P}=z;if(R===P)return;const D=Kn.value.splice(R,1)[0];Kn.value.splice(P,0,D),U.value=(re=U.value)==null?void 0:re.slice().sort((ie,G)=>{if(ie.label==="操作")return 1;if(G.label==="操作")return-1;const xe=Kn.value.findIndex(Ye=>Ye.label===ie.label),be=Kn.value.findIndex(Ye=>Ye.label===G.label);return xe-be})}})};e.onMounted(()=>{fa.value=window.innerWidth-240*2,window.addEventListener("keydown",oi)});const Bu=()=>{e.nextTick(()=>{Tu()})},Nu=()=>{c.value=!0},dt=(p,v)=>{var R;if(!p&&!(p!=null&&p.children))return{contents:p,currentSelectContents:void 0};let z;return p.children=(R=p.children)==null?void 0:R.map(P=>{var D,re;if((P==null?void 0:P.id)===oa.value){let ie={};for(let G in P){let xe=(D=v==null?void 0:v.find(be=>(be==null?void 0:be.prop)===G))==null?void 0:D.label;xe?ie[G]=(re=rr.value)==null?void 0:re[xe]:ie[G]=P[G]??""}P=Object.assign(ie,rr.value),z=P}else{let ie=dt(P,v);P=ie==null?void 0:ie.contents,z=ie==null?void 0:ie.currentSelectContents}return P}),{contents:p,currentSelectContents:z}},Ft=(p,v)=>{let z,R;return p!=null&&p.find(P=>(P==null?void 0:P.id)===oa.value)?z=p==null?void 0:p.map(P=>{var D,re,ie;if((P==null?void 0:P.id)===oa.value){let G={};for(let be in P){let Ye=(D=v==null?void 0:v.find(Ge=>(Ge==null?void 0:Ge.prop)===be))==null?void 0:D.label;Ye?G[be]=((re=rr.value)==null?void 0:re[Ye])??"":G[be]=P[be]??""}let xe=rr.value;for(let be in G)(ie=rr.value)!=null&&ie[be]||(xe[be]=(G==null?void 0:G[be])??"");P=xe,R=P}return P}):z=p==null?void 0:p.map(P=>{var D,re,ie,G;if((P==null?void 0:P.id)===oa.value){let xe={};for(let be in P){let Ye=(D=v==null?void 0:v.find(Ge=>(Ge==null?void 0:Ge.prop)===be))==null?void 0:D.label;Ye?xe[be]=(re=rr.value)==null?void 0:re[Ye]:xe[be]=P[be]??""}P=Object.assign(xe,rr.value),R=P}else P=(ie=dt(P,v))==null?void 0:ie.contents,R=(G=dt(P,v))==null?void 0:G.currentSelectContents;return P}),{newContents:z,currentSelectContents:R}},Pt=(p,v,z)=>{var R,P;return p[v==null?void 0:v.prop]=z,typeof p.id=="number"&&(p.id=(R=p.id)==null?void 0:R.toString()),p.children&&((P=p.children)==null?void 0:P.length)>0&&(p.children=p.children.map(Pt)),p},jt=p=>{var z;const v=[];return v.push({...p}),p!=null&&p.children&&Array.isArray(p.children)&&((z=p.children)==null||z.forEach(R=>{v.push(...jt(R))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(R=>{const P={...R};return delete P.children,P}):[]},uo=["Pacific6000数据采集装置.通道号","通道号"],Hi=p=>{if(!p)return"";const v=uo.map(z=>p==null?void 0:p[z]).find(z=>z!=null&&String(z).trim()!=="");return v==null?"":String(v).trim()},pt=async(p,v=void 0)=>{if(!p)return!1;try{const z=Xe=>{var ba,Aa,za;return Xe?typeof(Xe==null?void 0:Xe.value)=="string"?Xe.value:((za=(Aa=(ba=Xe==null?void 0:Xe._custom)==null?void 0:ba.value)==null?void 0:Aa.value)==null?void 0:za.value)||"":""},R=Array.isArray(tr.value)?tr.value:[],P=z(R.find(Xe=>(Xe==null?void 0:Xe.condition)==="child")),D=(se.value||"").replace(/\/+$/,""),re=P?`${D}/${P}`:D,ie=await Wr(re||se.value,!1),G=String(Ue.value||"").trim(),xe=Xe=>String(Xe||"").trim(),be=(Xe,ba=[],Aa="")=>{if(!Array.isArray(Xe))return ba;for(const za of Xe){const Ze=xe((za==null?void 0:za.choiceName)||(za==null?void 0:za.name0)||Aa);(za==null?void 0:za.comp)==="Table"&&(!G||Ze===G)&&ba.push(za),Array.isArray(za==null?void 0:za.children)&&be(za.children,ba,Ze),Array.isArray(za==null?void 0:za.tab)&&be(za.tab,ba,Ze),Array.isArray(za==null?void 0:za.choice)&&be(za.choice,ba,Ze)}return ba},Ye=be(ie||[]),Ge=String((d==null?void 0:d.compName)||"");return Ye.some(Xe=>{var Aa,za;const ba=((za=(Aa=Xe==null?void 0:Xe.compData)==null?void 0:Aa.find(Ze=>(Ze==null?void 0:Ze.key)==="tableContents"))==null?void 0:za.contents)||[];return!Array.isArray(ba)||ba.length===0?!1:ba.some(Ze=>{if(String((Xe==null?void 0:Xe.name)||"")===Ge&&(Ze==null?void 0:Ze.id)===v)return!1;const wa=Hi(Ze);return!!wa&&wa===p})})}catch{return(Te.value||[]).some(R=>{if((R==null?void 0:R.id)===v)return!1;const P=Hi(R);return!!P&&P===p})}},Ui=async(p=!0,v,z)=>{var xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl;if(rr.value){const $a=(be=le.getColumnChild((xe=M.cloneDeep(U.value))==null?void 0:xe.filter(rl=>(rl==null?void 0:rl.label)!=="操作")))==null?void 0:be.filter(rl=>(rl==null?void 0:rl.required)===!0);for(let rl=0;rl<(($a==null?void 0:$a.length)??0);rl++){const hl=$a[rl],zl=hl==null?void 0:hl.prop,gl=(hl==null?void 0:hl.label)??zl,xr=(Ye=rr.value)==null?void 0:Ye[zl];if(xr===""||xr===null||xr===void 0||Array.isArray(xr)&&xr.length===0){Ja.ElMessage.error(`${gl}不能为空`);return}}const Ll=Hi(rr.value);if(Ll&&await pt(Ll,oa.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let R=le.getColumnChild((Ge=M.cloneDeep(U.value))==null?void 0:Ge.filter($a=>($a==null?void 0:$a.label)!=="操作")),P,D=M.cloneDeep(Te.value);if(!rr.value){te.value=!1;return}if(oa.value===""){aa.value++;let $a;$a={id:aa.value.toString()};try{$a.sort=si(0,Te.value||[])}catch{}$a!=null&&$a.children&&($a={...$a,children:(Xe=$a.children)==null?void 0:Xe.map(rl=>Pt(rl,v,z))});const Ll=Object.assign(rr.value,$a);D.unshift(Ll),P=Ll}else D=(ba=Ft(D,R))==null?void 0:ba.newContents,P=(Aa=Ft(D,R))==null?void 0:Aa.currentSelectContents;const re=(za=d.itemData)==null?void 0:za.filter($a=>($a==null?void 0:$a.key)==="childTree")[0];if(((Ze=re==null?void 0:re.contents)==null?void 0:Ze.length)>0){pa.value="编辑";const $a=[];D==null||D.forEach((hl,zl)=>{var xr;let gl={};if(Array.isArray(hl)){let ur=[];hl==null||hl.filter(er=>!(er!=null&&er.id)).forEach((er,kl)=>{var Yl,pr,Ol,fr,wr,hr,Dr;if((pr=(Yl=Or.value)==null?void 0:Yl[kl])!=null&&pr.prop&&!Array.isArray(er)){let rn={};rn[Or.value[kl].column]=er,V!=null&&V.value&&((Ol=V==null?void 0:V.value)==null?void 0:Ol.length)>0&&((fr=V==null?void 0:V.value)!=null&&fr.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(rn)))&&(ur=(wr=V==null?void 0:V.value)==null?void 0:wr.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(rn))),ur&&ur.length>0?gl[Or.value[kl].prop]=ur!=null&&ur.find(dr=>{var Nr;return((Nr=Object.keys(dr))==null?void 0:Nr[0])===Or.value[kl].column})?(hr=ur==null?void 0:ur.find(dr=>{var Nr;return((Nr=Object.keys(dr))==null?void 0:Nr[0])===Or.value[kl].column}))==null?void 0:hr[Or.value[kl].column]:er:gl[Or.value[kl].prop]=er}else Array.isArray(er)&&((Dr=Or.value[kl])!=null&&Dr.prop?gl[Or.value[kl].prop]=er:gl.children=Et(er,Or.value))})}else gl=hl;if(Array.isArray(hl)&&hl.some(ur=>ur==null?void 0:ur.id)){const ur=(xr=hl==null?void 0:hl.find(er=>er.id))==null?void 0:xr.id;$a.push(Object.assign(gl,{id:oo(ur)}))}else gl.id?$a.push(gl):$a.push(Object.assign(gl,{id:zl.toString()}))});const Ll=(Te.value||[]).map(hl=>String(hl==null?void 0:hl.id)),rl=wi($a,Ll);Te.value=Wt(rl,re,U.value)}Ut(Te.value),Gr.value=Te.value;const ie=f0(Gr.value,Wl.value,D);let G=[];if(ae.value?(G=(nl=M.cloneDeep(ae).value.singleContent)==null?void 0:nl.filter($a=>($a==null?void 0:$a.id)!==(P==null?void 0:P.id)),G.push(P)):G=[P],sr.value){const $a={content:ie,singleContent:((wa=re==null?void 0:re.contents)==null?void 0:wa.length)>0?G==null?void 0:G.flatMap(jt):G,index:d==null?void 0:d.index,buttonName:"编辑",column:U.value,parentTableId:d==null?void 0:d.parentTableId};_a.setCacheUpdatingData($a)}if((il=U.value)==null||il.forEach($a=>{($a==null?void 0:$a.formType)==="Upload"&&(P[$a.prop]=P[$a.prop]===""?"{}":typeof P[$a.prop]!="string"?JSON.stringify(P[$a.prop]):P[$a.prop])}),p){(Ya=(va=(Va=(ke=d.itemData)==null?void 0:ke.find(rl=>(rl==null?void 0:rl.key)==="filterAllType"))==null?void 0:Va.value)==null?void 0:va.find(rl=>(rl==null?void 0:rl.value)==="onConditionContents"))==null||Ya.content;let $a=(Ra=d.itemData)==null?void 0:Ra.filter(rl=>(rl==null?void 0:rl.key)==="filterAllType");$a=Array.from(new Map($a.filter(Boolean).map((rl,hl)=>[rl.value,{...rl,_idx:hl}])).values()).sort((rl,hl)=>rl._idx-hl._idx).map(({_idx:rl,...hl})=>hl),$a=(ze=$a==null?void 0:$a[($a==null?void 0:$a.length)-1])==null?void 0:ze.value;const Ll={fixContent:[P],buttonName:pa.value,relatedContents:d==null?void 0:d.related,columns:U.value,name:d==null?void 0:d.groupNames};_a.setTableLoading(d==null?void 0:d.index),te.value=!1,rr.value=void 0,j("change",Ll)}if((sa=(He=(Q=he.value)==null?void 0:Q[0])==null?void 0:He.optionUrl)!=null&&sa.menuId){te.value=!1;let $a=(T=d.itemData)==null?void 0:T.filter(Ll=>(Ll==null?void 0:Ll.key)==="filterAllType");if(($a==null?void 0:$a.length)>0){let Ll=$a==null?void 0:$a.map(zl=>zl==null?void 0:zl.value),rl=(ol=(Ua=(Ia=Ll.flat().find(zl=>{var gl;return(gl=zl==null?void 0:zl.content)==null?void 0:gl.includes("@Num")}))==null?void 0:Ia.content)==null?void 0:Ua.split(":"))==null?void 0:ol[1];((dl=(Ca=(Ka=Ll.flat().find(zl=>{var gl;return(gl=zl==null?void 0:zl.content)==null?void 0:gl.includes("@Type:")}))==null?void 0:Ka.content)==null?void 0:Ca.split(":"))==null?void 0:dl[1])!=="Manual"&&(rl=parseInt(rl),Te.value=(Dl=Te.value)==null?void 0:Dl.slice(((ql=Te.value)==null?void 0:ql.length)-rl,(qa=Te.value)==null?void 0:qa.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",oi),U.value=[],Te.value=[],Ie.value=[],ne.value=[],ea.value=[],Ta.value=[],Me.value=[],Fe.value=[],he.value=[],Mr.value=[],i.value=null,pn.value=""});const po=async(p,v,z)=>{var Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra;Br.value=(z==null?void 0:z.prop)??(z==null?void 0:z.property);const R=M.cloneDeep(d.itemData),P=((Xe=R==null?void 0:R.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:Xe.contents)??[];let D=P==null?void 0:P.find((ze,Q)=>{var He,sa,T;return(ze==null?void 0:ze.prop)===Br.value||(ze==null?void 0:ze.label)===Br.value||(Q==null?void 0:Q.toString())===((T=(sa=(He=Br.value)==null?void 0:He.split("a"))==null?void 0:sa[1])==null?void 0:T.toString())});const re=le.getColumnChild((ba=M.cloneDeep(U.value))==null?void 0:ba.filter(ze=>(ze==null?void 0:ze.label)!=="操作"));if(D||(D=re==null?void 0:re.find(ze=>(ze==null?void 0:ze.prop)===Br.value||(ze==null?void 0:ze.label)===Br.value)),D&&!((Aa=D==null?void 0:D.menus)!=null&&Aa.length)&&!((za=D==null?void 0:D.groups)!=null&&za.length)&&!((Ze=D==null?void 0:D.words)!=null&&Ze.length)){const ze=(nl=he.value)==null?void 0:nl.find(Q=>(Q==null?void 0:Q.prop)===Br.value);ze&&(D={...D,menus:(ze==null?void 0:ze.menus)??(D==null?void 0:D.menus),groups:(ze==null?void 0:ze.groups)??(D==null?void 0:D.groups),words:(ze==null?void 0:ze.words)??(D==null?void 0:D.words),bindMenus:(ze==null?void 0:ze.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(ze==null?void 0:ze.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(ze==null?void 0:ze.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(ze==null?void 0:ze.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((wa=he==null?void 0:he.value)==null||wa.forEach(ze=>{var Q,He,sa,T,Ia;(ze==null?void 0:ze.prop)===(D==null?void 0:D.prop)&&(ze!=null&&ze.endChildMenu)&&((Q=D==null?void 0:D.prop)!=null&&Q.includes(".")&&((sa=(He=D==null?void 0:D.prop)==null?void 0:He.split("."))==null?void 0:sa[0])!==((Ia=(T=ze==null?void 0:ze.prop)==null?void 0:T.split("."))==null?void 0:Ia[0])?D.endChildMenu=ze==null?void 0:ze.value:D.endChildMenu=ze==null?void 0:ze.endChildMenu)})),!D)return;const ie=Br.value,G=(il=Te.value)==null?void 0:il.findIndex(ze=>(ze==null?void 0:ze.id)===(v==null?void 0:v.id));G!==-1&&ie&&(Te.value[G]={...Te.value[G],[ie]:p});const xe=ze=>{Array.isArray(ze)&&ze.forEach(Q=>{Array.isArray(Q==null?void 0:Q.allSelectionContents)&&Q.allSelectionContents.length>0&&(Q.contactValue=Te.value[G]??v),Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&xe(Q.children)})};xe(U.value),D.value=p,D.endChildMenu=D.endChildMenu||"";let be=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const Ye=ze=>{Array.isArray(ze)&&ze.forEach(Q=>{var sa,T;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]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const Ia=(sa=Q==null?void 0:Q.prop)!=null&&sa.includes(".")?Q.prop.split(".")[0]:null,Ua=(T=D==null?void 0:D.prop)!=null&&T.includes(".")?D.prop.split(".")[0]:null;(!Ia||!Ua||Ia===Ua)&&(Q.endChildMenu=be)}Array.isArray(Q==null?void 0:Q.children)&&Q.children.length>0&&Ye(Q.children)})};if(Ye(U.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let ze=D!=null&&D.relatedContents&&((ke=D==null?void 0:D.relatedContents)==null?void 0:ke.length)>0?(Va=D==null?void 0:D.relatedContents)==null?void 0:Va.find(Q=>{var He,sa,T,Ia;return(Q==null?void 0:Q[(Ia=(He=D==null?void 0:D.prop)==null?void 0:He.split("."))==null?void 0:Ia[((T=(sa=D==null?void 0:D.prop)==null?void 0:sa.split("."))==null?void 0:T.length)-1]])===(D==null?void 0:D.value)}):await bs(D);if(ze){const Q={...v};re==null||re.forEach(He=>{var sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl,zl;(He==null?void 0:He.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((sa=D==null?void 0:D.relatedContents)==null?void 0:sa.length)>0?(T=He==null?void 0:He.prop)!=null&&T.includes(".")&&((Ua=(Ia=He==null?void 0:He.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])===((Ka=(ol=D==null?void 0:D.prop)==null?void 0:ol.split("."))==null?void 0:Ka[0])?Q[He.prop]=ze[(qa=(Ca=He==null?void 0:He.prop)==null?void 0:Ca.split("."))==null?void 0:qa[((ql=(dl=He==null?void 0:He.prop)==null?void 0:dl.split("."))==null?void 0:ql.length)-1]]??Q[He.prop]:Q[He.prop]=(ze==null?void 0:ze[He.prop])??Q[He.prop]:le.same((D==null?void 0:D.menus)??[],(He==null?void 0:He.menus)??[])&&le.same((D==null?void 0:D.groups)??[],(He==null?void 0:He.groups)??[])&&!le.same((D==null?void 0:D.words)??[],(He==null?void 0:He.words)??[])?(Dl=He==null?void 0:He.prop)!=null&&Dl.includes(".")&&((Ll=($a=He==null?void 0:He.prop)==null?void 0:$a.split("."))==null?void 0:Ll[0])!==((hl=(rl=D==null?void 0:D.prop)==null?void 0:rl.split("."))==null?void 0:hl[0])||(Q[He.prop]=(ze==null?void 0:ze[(zl=He==null?void 0:He.words)==null?void 0:zl.join(".")])??(ze==null?void 0:ze[He.prop])??Q[He.prop]):(!(He!=null&&He.isMainPath)&&le.same((D==null?void 0:D.bindMenus)??[],(He==null?void 0:He.bindMenus)??[]),Q[He.prop]=(ze==null?void 0:ze[He.prop])??Q[He.prop]))}),Te.value=(va=M.cloneDeep(Te.value))==null?void 0:va.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=D==null?void 0:D.optionUrl)!=null&&Ya.menuSelect){let ze="";re==null||re.forEach(sa=>{var T,Ia,Ua,ol,Ka;ze===""&&((Ua=(Ia=(T=sa==null?void 0:sa.optionUrl)==null?void 0:T.groupSelect)==null?void 0:Ia[1])!=null&&Ua.includes("["))&&(ze=(Ka=(ol=sa==null?void 0:sa.optionUrl)==null?void 0:ol.groupSelect)==null?void 0:Ka[1])});let Q=await Ct(D),He;if(Q==null||Q.forEach(sa=>{var T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl;ze===((Ia=(T=D==null?void 0:D.optionUrl)==null?void 0:T.groupSelect)==null?void 0:Ia[1])&&((Ka=(ol=(Ua=D==null?void 0:D.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:ol[1])!=null&&Ka.includes("["))&&((Dl=M.cloneDeep(sa))==null?void 0:Dl[(qa=(ql=(dl=(Ca=D==null?void 0:D.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:dl[1])==null?void 0:ql.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])===(D==null?void 0:D.value)&&(He=sa)}),He){const sa={...v};re==null||re.forEach(T=>{var Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll;(He!=null&&He[T==null?void 0:T.label]||He!=null&&He[(Ka=(ol=(Ua=(Ia=T==null?void 0:T.optionUrl)==null?void 0:Ia.groupSelect)==null?void 0:Ua[1])==null?void 0:ol.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])&&((ql=(dl=(Ca=T==null?void 0:T.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:dl[1])!=null&&ql.includes("["))&&(sa[T.prop]=(He==null?void 0:He[T==null?void 0:T.label])||(He==null?void 0:He[(Ll=($a=(Dl=(qa=T==null?void 0:T.optionUrl)==null?void 0:qa.groupSelect)==null?void 0:Dl[1])==null?void 0:$a.replaceAll("[",""))==null?void 0:Ll.replaceAll("]","")]))}),Te.value=(Ra=M.cloneDeep(Te.value))==null?void 0:Ra.map(T=>(T==null?void 0:T.id)===(v==null?void 0:v.id)?{...sa,id:T==null?void 0:T.id}:T)}}},Au=async p=>{var Xe,ba,Aa,za,Ze,nl,wa,il,ke,Va,va,Ya,Ra,ze;if(!p)return;const v=M.cloneDeep(rr.value||{});rr.value=p;const z=Hi(v),R=Hi(rr.value);if(R&&R!==z&&await pt(R,oa.value||void 0)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),uo.forEach(He=>{if(Object.prototype.hasOwnProperty.call(rr.value||{},He)||Object.prototype.hasOwnProperty.call(v||{},He)){const sa=(v==null?void 0:v[He])??"";rr.value[He]=sa,p[He]=sa}}),he.value=(he.value||[]).map(He=>{if(!(He!=null&&He.prop)||!uo.includes(He.prop))return He;const sa=(v==null?void 0:v[He.prop])??"";return{...He,value:sa,selectValue:sa===""?[]:[sa]}});return}let P=M.cloneDeep(d.itemData);P==null||P.map(Q=>{var He,sa,T,Ia;return(Q==null?void 0:Q.key)==="header"&&(Array.isArray((He=Q.contents)==null?void 0:He[0])?Q.contents=(T=le.getColumnChild((sa=Q.contents)==null?void 0:sa[0]))==null?void 0:T.map((Ua,ol)=>{var Ka,Ca,dl,ql,qa,Dl;return((dl=(Ca=(Ka=he.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ca.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((ql=Object.values(p))==null?void 0:ql[ol])?Ua.value=[(qa=Object.values(p))==null?void 0:qa[ol]]:Ua.value=(Dl=Object.values(p))==null?void 0:Dl[ol],Ua}):Q.contents=(Ia=Q.contents)==null?void 0:Ia.map((Ua,ol)=>{var Ka,Ca,dl,ql,qa,Dl;return((dl=(Ca=(Ka=he.value)==null?void 0:Ka.find($a=>($a==null?void 0:$a.prop)===(Ua==null?void 0:Ua.prop)))==null?void 0:Ca.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((ql=Object.values(p))==null?void 0:ql[ol])?Ua.value=[(qa=Object.values(p))==null?void 0:qa[ol]]:Ua.value=(Dl=Object.values(p))==null?void 0:Dl[ol],Ua})),Q});let D=he.value,re=(Xe=P==null?void 0:P.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Xe.contents;if(Br.value||(D=D==null?void 0:D.map(Q=>{var He;return Q.value=Q.value??((He=re==null?void 0:re.find((sa,T)=>(sa==null?void 0:sa.prop)===(Q==null?void 0:Q.name)))==null?void 0:He.value),Q})),!zn.value)return;let ie=M.cloneDeep(Br.value);(ba=Br.value)!=null&&ba.includes("·")&&(Br.value=(za=(Aa=Br.value)==null?void 0:Aa.split("·"))==null?void 0:za[0]);let G=(nl=(Ze=P==null?void 0:P.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:Ze.contents)==null?void 0:nl.find((Q,He)=>(Q==null?void 0:Q.prop)===Br.value);(wa=he==null?void 0:he.value)==null||wa.forEach(Q=>{var He,sa,T,Ia,Ua,ol,Ka,Ca,dl;(Q==null?void 0:Q.prop)===(G==null?void 0:G.prop)&&(Q!=null&&Q.endChildMenu)&&((He=G==null?void 0:G.prop)!=null&&He.includes(".")&&((T=(sa=G==null?void 0:G.prop)==null?void 0:sa.split("."))==null?void 0:T[0])!==((Ua=(Ia=Q==null?void 0:Q.prop)==null?void 0:Ia.split("."))==null?void 0:Ua[0])?G.endChildMenu=(Ka=(ol=Q==null?void 0:Q.value)==null?void 0:ol.split(" "))==null?void 0:Ka[0]:G.endChildMenu=(dl=(Ca=Q==null?void 0:Q.endChildMenu)==null?void 0:Ca.split(" "))==null?void 0:dl[0])});let xe=G!=null&&G.isMainPath&&(G!=null&&G.mainKey)?G==null?void 0:G.value:"",be=D,Ye=ee.value;if(Ye!=null&&Ye.find(Q=>(G==null?void 0:G.prop)===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>(G==null?void 0:G.prop)!==(Q==null?void 0:Q.key))),Ye!=null&&Ye.find(Q=>ie===(Q==null?void 0:Q.key))&&(Ye=Ye==null?void 0:Ye.filter(Q=>ie!==(Q==null?void 0:Q.key))),(G==null?void 0:G.formType)==="Select"?be=be==null?void 0:be.map(Q=>{var He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl;return(Q==null?void 0:Q.type)==="Select"&&(((He=Q==null?void 0:Q.allSelectionContents)==null?void 0:He.length)>0&&(Q.contactValue=p),((G==null?void 0:G.prop)===(Q==null?void 0:Q.prop)||ie===(Q==null?void 0:Q.prop))&&G&&(Array.isArray(G.value)&&((sa=G.value)==null?void 0:sa.length)>0&&((T=G.value)!=null&&T.every(zl=>typeof zl=="string"))?(Ye.push({key:Q==null?void 0:Q.prop,value:[(Ua=G.value)==null?void 0:Ua[((Ia=G.value)==null?void 0:Ia.length)-1]]}),Q.selectValue=(ol=Ye==null?void 0:Ye.find(zl=>(zl==null?void 0:zl.key)===(Q==null?void 0:Q.prop)))==null?void 0:ol.value):Array.isArray(G.value)&&((Ka=G.value)==null?void 0:Ka.length)===0?(Ye=[],Q.selectValue=[],p[Q==null?void 0:Q.prop]=""):Array.isArray(Q.value)&&Ye.push({key:Q==null?void 0:Q.prop,value:[(Ca=Q.value)==null?void 0:Ca[(Q==null?void 0:Q.length)-1]]})),((ql=Q==null?void 0:Q.menus)==null?void 0:ql[((dl=Q==null?void 0:Q.menus)==null?void 0:dl.length)-1])===""&&(G!=null&&G.isMainPath)&&(G!=null&&G.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])!==((rl=(Ll=G==null?void 0:G.prop)==null?void 0:Ll.split("."))==null?void 0:rl[0])||(Q.endChildMenu=(hl=xe==null?void 0:xe.split(" "))==null?void 0:hl[0]))),Q.value=(p==null?void 0:p[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q}):(G==null?void 0:G.formType)!=="Input"&&(be=be==null?void 0:be.map(Q=>(Q.value=(p==null?void 0:p[Q==null?void 0:Q.prop])??(Q==null?void 0:Q.value),Q))),ee.value=Ye,be!=null&&be.some(Q=>(Q==null?void 0:Q.functionName)&&(Q==null?void 0:Q.functionName)!=="")){let Q=await St([p],U==null?void 0:U.value,"Auto",Te.value),He=[];(il=be==null?void 0:be.filter(T=>(T==null?void 0:T.functionName)&&(T==null?void 0:T.functionName)!==""))==null||il.forEach(T=>{var Ia;((Ia=T==null?void 0:T.functionRelatedWords)==null?void 0:Ia.length)>0&&(He=[...He,...T==null?void 0:T.functionRelatedWords])}),He=He==null?void 0:He.filter(T=>(T==null?void 0:T[0])!=="@");let sa=[];for(let T in Q==null?void 0:Q[0])He!=null&&He.find(Ia=>T===Ia||(T==null?void 0:T.includes("."+Ia)))&&sa.push(((ke=Q==null?void 0:Q[0])==null?void 0:ke[T])!=="");(Q==null?void 0:Q.length)>0&&sa.every(T=>T)&&(be=be==null?void 0:be.map(T=>{var Ia;return T.value=((Ia=Q==null?void 0:Q[0])==null?void 0:Ia[T==null?void 0:T.prop])??T.value,T})),rr.value=Q==null?void 0:Q[0]}if(he.value=be,G=Object.assign({},G??{},{relatedWords:(va=(Va=he==null?void 0:he.value)==null?void 0:Va.find(Q=>(Q==null?void 0:Q.prop)===(G==null?void 0:G.prop)))==null?void 0:va.relatedWords}),(G==null?void 0:G.mainKey)&&(G!=null&&G.value)&&(G==null?void 0:G.value)!==""){let Q=G!=null&&G.relatedContents&&((Ya=G==null?void 0:G.relatedContents)==null?void 0:Ya.length)>0?(Ra=G==null?void 0:G.relatedContents)==null?void 0:Ra.find(He=>{var sa,T,Ia,Ua;return(He==null?void 0:He[(Ua=(sa=G==null?void 0:G.prop)==null?void 0:sa.split("."))==null?void 0:Ua[((Ia=(T=G==null?void 0:G.prop)==null?void 0:T.split("."))==null?void 0:Ia.length)-1]])===(G==null?void 0:G.value)}):await bs(G);if(Q&&JSON.stringify(Q)!=="{}"){let He=be;He=He==null?void 0:He.map(T=>{var Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl,zl,gl,xr,ur,er,kl,Yl,pr;if((G==null?void 0:G.prop)===(T==null?void 0:T.prop))T.value=(Q==null?void 0:Q[(Ia=T==null?void 0:T.words)==null?void 0:Ia.join(".")])??(Q==null?void 0:Q[T==null?void 0:T.prop])??Q[(Ca=(Ua=T==null?void 0:T.prop)==null?void 0:Ua.split("."))==null?void 0:Ca[((Ka=(ol=T==null?void 0:T.prop)==null?void 0:ol.split("."))==null?void 0:Ka.length)-1]];else if(G!=null&&G.relatedContents&&((dl=G==null?void 0:G.relatedContents)==null?void 0:dl.length)>0)T.value=(ql=T==null?void 0:T.prop)!=null&&ql.includes(".")&&((Dl=(qa=T==null?void 0:T.prop)==null?void 0:qa.split("."))==null?void 0:Dl[0])===((Ll=($a=G==null?void 0:G.prop)==null?void 0:$a.split("."))==null?void 0:Ll[0])?Q[(gl=(rl=T==null?void 0:T.prop)==null?void 0:rl.split("."))==null?void 0:gl[((zl=(hl=T==null?void 0:T.prop)==null?void 0:hl.split("."))==null?void 0:zl.length)-1]]:(Q==null?void 0:Q[T==null?void 0:T.prop])??(T==null?void 0:T.value);else if(le.same((G==null?void 0:G.menus)??[],(T==null?void 0:T.menus)??[])&&le.same((G==null?void 0:G.groups)??[],(T==null?void 0:T.groups)??[])&&!le.same((G==null?void 0:G.words)??[],(T==null?void 0:T.words)??[]))if((xr=T==null?void 0:T.prop)!=null&&xr.includes(".")&&((er=(ur=T==null?void 0:T.prop)==null?void 0:ur.split("."))==null?void 0:er[0])!==((Yl=(kl=G==null?void 0:G.prop)==null?void 0:kl.split("."))==null?void 0:Yl[0])){let Ol=Object.keys(Q);Ol=Ol==null?void 0:Ol.find(fr=>{var wr;return fr==null?void 0:fr.includes("."+((wr=T==null?void 0:T.words)==null?void 0:wr.join(".")))}),T.value=(Q==null?void 0:Q[Ol])??(Q==null?void 0:Q[T==null?void 0:T.prop])??T.value}else{let Ol=Object.keys(Q);Ol=Ol==null?void 0:Ol.find(fr=>{var wr;return fr==null?void 0:fr.includes("."+((wr=T==null?void 0:T.words)==null?void 0:wr.join(".")))}),T.value=(Q==null?void 0:Q[(pr=T==null?void 0:T.words)==null?void 0:pr.join(".")])??(Q==null?void 0:Q[Ol])??(Q==null?void 0:Q[T==null?void 0:T.prop])??T.value}else!(T!=null&&T.isMainPath)&&le.same((G==null?void 0:G.bindMenus)??[],(T==null?void 0:T.bindMenus)??[]),T.value=(Q==null?void 0:Q[T==null?void 0:T.prop])??T.value;return T}),he.value=He;let sa={};(ze=he.value)==null||ze.forEach(T=>{sa[T.prop]=T==null?void 0:T.value}),rr.value=sa}}zn.value=!0,F.value=!1},zu=p=>p?(p==null?void 0:p.toUpperCase())==="INPUT"?"TEXTAREA":p:"TEXTAREA",Mu=p=>{var D,re;const v=(re=(D=ea.value)==null?void 0:D.find(ie=>(ie==null?void 0:ie.label)===(p==null?void 0:p.label)))==null?void 0:re.multiple,z=p==null?void 0:p.prop;if((p==null?void 0:p.formType)!="Select")return;Te.value.forEach(ie=>{const G=ie==null?void 0:ie[z];v&&Do.isString(G)&&(ie[z]=[G]),!v&&!Do.isString(G)&&(ie[z]="")})},Ht=(p,v)=>{var z;return v==null||v.forEach(R=>{p[R==null?void 0:R.prop]=R==null?void 0:R.value}),p.children&&((z=p.children)==null?void 0:z.length)>0&&(p.children=p.children.map(R=>Ht(R,v))),p},ft=p=>{var z,R,P,D,re,ie;ji("");const v=(z=he.value)==null?void 0:z.reduce((G,xe)=>(G[xe.name]=xe.value,G),{});if(((R=Object.keys(v))==null?void 0:R.length)>0){rr.value=v,oa.value="",aa.value=(P=Te.value)==null?void 0:P.length,Fe.value=(D=$e.value)==null?void 0:D.filter(xe=>(xe==null?void 0:xe.label)!=="新增");const G=(ie=(re=Ie.value)==null?void 0:re.filter(xe=>(xe==null?void 0:xe.label)!=="操作"))==null?void 0:ie.map(xe=>{var Ye,Ge,Xe;const be=(Ge=(Ye=ea.value)==null?void 0:Ye.find(ba=>(ba==null?void 0:ba.label)===(xe==null?void 0:xe.label)))==null?void 0:Ge.multiple;return Mu(xe),{...xe,contents:(xe==null?void 0:xe.options)??[],optionUrl:xe!=null&&xe.formMenuSelect&&((Xe=xe==null?void 0:xe.formMenuSelect)==null?void 0:Xe.length)>0?{groupSelect:xe==null?void 0:xe.groupSelect,menuSelect:xe==null?void 0:xe.formMenuSelect,selectRelateType:"",type:xe==null?void 0:xe.formType,multiple:be}:null}});U.value=G==null?void 0:G.map(xe=>Ht(xe,[{prop:"type",value:"edit"},{prop:"columnType",value:zu(xe==null?void 0:xe.formType)||(xe==null?void 0:xe.columnType)}])),p==="createClick"&&(pa.value="新增",Ui(!0))}},Si={START:"开始时间",END:"结束时间",HOURS:"工时"},Iu=(p,v)=>Number(M.dayjs(v).diff(M.dayjs(p),"day",!0).toFixed(1)),Ut=p=>{var D;const v=d.itemData,z=(D=v==null?void 0:v.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,R=new Map;return z==null||z.forEach((re,ie)=>{const{label:G}=re;R.set(G,ie)}),!R.has(Si.START)||!R.has(Si.END)||!R.has(Si.HOURS)?p:p==null?void 0:p.map(re=>{const ie=re==null?void 0:re[Si.START],G=re==null?void 0:re[Si.END],xe=Iu(ie,G);return ie&&G&&(re[Si.HOURS]=`${xe}天`),re})},qt=(p,v,z=0)=>{if(z>((v==null?void 0:v.length)??""))return p;const R=v==null?void 0:v[z],P=new Map;for(const re of p){const ie=re[R];P.has(ie)||P.set(ie,[]),P.get(ie)&&P.get(ie).push(re)}const D=[];for(const[re,ie]of P){const[G,...xe]=ie,be={...G};z+1===((v==null?void 0:v.length)??"")?be.children=ie==null?void 0:ie.map(Ye=>(Ye.level=M.cloneDeep(z)+1,Ye)).filter((Ye,Ge)=>Ge!==0):xe.length>0&&(be.children=qt(xe,v,z+1)),be.level=z,D.push(be)}return D},Wt=(p,v,z)=>{var P;if(!(v!=null&&v.contents)||((P=v==null?void 0:v.contents)==null?void 0:P.length)===0)return p;let R=[];return R=qt(p,v==null?void 0:v.contents,0),R},Gt=async(p,v)=>{var nl,wa,il,ke,Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll,rl,hl,zl,gl,xr,ur,er,kl,Yl,pr,Ol,fr,wr,hr,Dr,rn,dr,Nr,Rr,Yt,Jt,Xt,Zt,Qt,es;const z=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="header");p==null||p.filter(la=>(la==null?void 0:la.key)==="tableIndexColumn")[0];const R=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="childTree")[0];let P=!0;if((il=(wa=(nl=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="filterAllType"))==null?void 0:nl.value)==null?void 0:wa.find(la=>(la==null?void 0:la.value)==="onPamButtonContents"))!=null&&il.content){let la=(va=(Va=(ke=p==null?void 0:p.find(Al=>(Al==null?void 0:Al.key)==="filterAllType"))==null?void 0:ke.value)==null?void 0:Va.find(Al=>(Al==null?void 0:Al.value)==="onPamButtonContents"))==null?void 0:va.content;la=(Ya=la==null?void 0:la.split(":"))==null?void 0:Ya[1],la=(Ra=la.slice(1,(la==null?void 0:la.length)-1))==null?void 0:Ra.split(","),P=!!(la!=null&&la.find(Al=>Al==="操作"))}const D=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="page"),re=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="rowButton"),ie=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="extraButton"),G=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="tableContents"),xe=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="bottomButton");let be=[],Ye=(ze=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="filter"))==null?void 0:ze[0];Ye=(Ye==null?void 0:Ye.contents)??"",Ye=N0(Ye),(Ye==null?void 0:Ye.length)>0&&(u.value=Ye);const Ge=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="tableIndex");ea.value=(He=(Q=p==null?void 0:p.filter(la=>(la==null?void 0:la.key)==="tableToForm"))==null?void 0:Q[0])==null?void 0:He.contents,je.value=(D==null?void 0:D.contents)??!0;let Xe=[];kr.value===""?Xe=z==null?void 0:z[0]:Xe=(z==null?void 0:z.find(la=>(la==null?void 0:la.selectLabel)==="("+kr.value+")"))??(z==null?void 0:z.find(la=>!(la!=null&&la.selectLabel)));let ba=[];kr.value===""?ba=Ge==null?void 0:Ge[0]:ba=(Ge==null?void 0:Ge.find(la=>(la==null?void 0:la.selectLabel)==="("+kr.value+")"))??(Ge==null?void 0:Ge.find(la=>!(la!=null&&la.selectLabel)));let Aa=[],za=[];if(((sa=Xe==null?void 0:Xe.contents)==null?void 0:sa.length)>0){let la=[],Al=Xe==null?void 0:Xe.contents;if(Array.isArray(Al==null?void 0:Al[0])&&((T=Al==null?void 0:Al[0])!=null&&T.every(Xa=>!(Xa!=null&&Xa.children)))&&(Al=Al==null?void 0:Al[0]),Al.some(Xa=>Array.isArray(Xa)&&(Xa==null?void 0:Xa.find(Je=>Je.children))))la=(Ia=le.getGradeColumns(Al,P))==null?void 0:Ia[0],la!=null&&la.find(Xa=>(Xa==null?void 0:Xa.label)==="操作")||la.push({label:"操作",prop:"operate",type:"operate"});else{let Xa=Al.some(Je=>Array.isArray(Je))?Al==null?void 0:Al[0]:Al;Xa!=null&&Xa.find(Je=>(Je==null?void 0:Je.label)==="操作")||Xa.push({label:"操作",prop:"operate",type:"operate"}),Xa==null||Xa.forEach((Je,vr)=>{var Jr,Qr,Pr,di,Ei,Ci,Ar,An,Jn,Di,xn,Xn,as,ls,rs,ns,is,os,ts,ss,cs;if((Qr=(Jr=se.value)==null?void 0:Jr.split("/"))==null||Qr.forEach(yr=>{var Tr,$n,us;yr!==""&&((us=($n=(Tr=yr==null?void 0:yr.split(O+"updateLoading"))==null?void 0:Tr[0])==null?void 0:$n.split(O+"loading"))==null||us[0])}),Je!=null&&Je.methodContent){let yr=(Ei=(di=(Pr=Je==null?void 0:Je.methodContent)==null?void 0:Pr.replace("@","%%#"))==null?void 0:di.split("%%#"))==null?void 0:Ei[1];if(yr=yr==null?void 0:yr.slice(0,(yr==null?void 0:yr.length)-1),yr=le.contentTransArrayToAllNoExtra(yr??"",","),(Ci=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("@Button")))!=null&&Ci.includes("Prop")&&((Ar=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("Type")))!=null&&Ar.includes("Manual"))){let Tr=(Jn=(An=yr==null?void 0:yr.find($n=>$n==null?void 0:$n.includes("@Button")))==null?void 0:An.split(":"))==null?void 0:Jn[1];Tr=((Xn=(xn=(Di=Tr==null?void 0:Tr.replaceAll("[",""))==null?void 0:Di.replaceAll("]",""))==null?void 0:xn.split(","))==null?void 0:Xn[1])??"算法执行",Aa.push(Tr)}else if((as=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("@Button")))!=null&&as.includes("Row")&&((ls=yr==null?void 0:yr.find(Tr=>Tr==null?void 0:Tr.includes("Type")))!=null&&ls.includes("Manual"))){let Tr=(ns=(rs=yr==null?void 0:yr.find($n=>$n==null?void 0:$n.includes("@Button")))==null?void 0:rs.split(":"))==null?void 0:ns[1];Tr=((ts=(os=(is=Tr==null?void 0:Tr.replaceAll("[",""))==null?void 0:is.replaceAll("]",""))==null?void 0:os.split(","))==null?void 0:ts[1])??"算法执行",za.push(Tr)}}(ss=ea.value)==null||ss.find(yr=>(yr==null?void 0:yr.prop)===(Je==null?void 0:Je.prop));let on=((cs=Je==null?void 0:Je.filter)==null?void 0:cs.includes("@EditRead=Read"))??!1;la.push({label:(Je==null?void 0:Je.label)==="操作"?P?"操作":"":(Je==null?void 0:Je.label)??"",prop:(Je==null?void 0:Je.label)==="操作"?"operate":(Je==null?void 0:Je.prop)??"a"+vr,width:Je!=null&&Je.width?parseInt(Je.width):"",fixed:(Je==null?void 0:Je.fixed)??void 0,sortable:(Je==null?void 0:Je.sortable)??!1,filterable:(Je==null?void 0:Je.filterable)??!1,operable:(Je==null?void 0:Je.operable)??!1,showSummary:(Je==null?void 0:Je.showSummary)??!1,align:(Je==null?void 0:Je.align)??"left",showOverflowTooltip:(Je==null?void 0:Je.showOverflowTooltip)??!0,isNotDrag:(Je==null?void 0:Je.isNotDrag)??!1,isEditCol:(Je==null?void 0:Je.isEditCol)??!1,isOperate:(Je==null?void 0:Je.isOperate)??!1,id:(Je==null?void 0:Je.id)??vr,type:(Je==null?void 0:Je.label)==="操作"?"operate":void 0,formType:(Je==null?void 0:Je.formType)??(Je!=null&&Je.groupSelect?"Select":""),disabled:Je==null?void 0:Je.disabled,options:(Je==null?void 0:Je.options)??[],value:(Je==null?void 0:Je.value)??"",isExistChild:(Je==null?void 0:Je.isExistChild)??!1,mainKey:(Je==null?void 0:Je.mainKey)??vr===0,allSelectionContents:(Je==null?void 0:Je.allContents)??[],filterContent:Je==null?void 0:Je.filterContents,menus:Je==null?void 0:Je.menus,groups:Je==null?void 0:Je.groups,words:Je==null?void 0:Je.words,filter:Je==null?void 0:Je.filter,bindMenus:Je==null?void 0:Je.bindMenus,fatherPath:Je==null?void 0:Je.fatherPath,isMainPath:Je==null?void 0:Je.isMainPath,required:(Je==null?void 0:Je.required)??!1,relatedContents:Je==null?void 0:Je.relatedContents,functionName:Je==null?void 0:Je.functionName,functionRelatedWords:Je==null?void 0:Je.functionRelatedWords,calculatorFilter:Je==null?void 0:Je.calculatorFilter,relatedPages:Je==null?void 0:Je.relatedPages,multiple:(Je==null?void 0:Je.multiple)??!1,multipleLimit:Je==null?void 0:Je.multipleLimit,isReadonly:on})})}la=la==null?void 0:la.filter(Xa=>{var Je;return!((Je=Xa==null?void 0:Xa.filter)!=null&&Je.includes("@ShowHide=Hide"))}),L.value=(Ua=xe==null?void 0:xe[0])==null?void 0:Ua.contents;const nn=le.getNewColumnChild(la);be=le.getColumnChild(nn);const Yn=Xa=>Array.isArray(Xa)?Xa.map(Je=>(Array.isArray(Je==null?void 0:Je.children)&&Je.children.length>0?(Je.sortable=!1,Yn(Je.children)):(Je==null?void 0:Je.prop)==="operate"||(Je==null?void 0:Je.label)==="操作"||(Je==null?void 0:Je.type)==="operate"||(Je.sortable=!1),Je)):Xa;Yn(nn),await Jo(nn),R0(Z.value,nn),U.value=nn,ne.value=nn,n.value=(ol=U.value)==null?void 0:ol.map(Xa=>Xa==null?void 0:Xa.label);let $r=(Ca=(Ka=le.getAllLeafNodes(U.value))==null?void 0:Ka.filter(Xa=>(Xa==null?void 0:Xa.type)!=="operate"))==null?void 0:Ca.map((Xa,Je)=>({prop:(Xa==null?void 0:Xa.prop)??"a"+Je,column:Xa.label}));Or.value=$r;let Hr=[];kr.value===""?Hr=G==null?void 0:G[0]:Hr=(G==null?void 0:G.find(Xa=>(Xa==null?void 0:Xa.selectLabel)==="("+kr.value+")"))??(G==null?void 0:G.find(Xa=>!(Xa!=null&&Xa.selectLabel)));let Vr=Array.isArray((dl=Hr==null?void 0:Hr.contents)==null?void 0:dl[0])&&((ql=Hr==null?void 0:Hr.contents)!=null&&ql[0].every(Xa=>Array.isArray(Xa)))?(qa=Hr==null?void 0:Hr.contents)==null?void 0:qa[0]:Hr==null?void 0:Hr.contents;ba!=null&&ba.contents&&((Dl=ba==null?void 0:ba.contents)==null?void 0:Dl.length)!==0&&(Vr=($a=M.cloneDeep(Vr))==null?void 0:$a.map((Xa,Je)=>{if(!Array.isArray(Xa)){let vr={};for(let on in Xa)on!=="id"&&on!=="index"&&(vr[on]=Xa[on]);Xa=Object.values(vr)}return Xa}));const fo=!!((Ll=U.value)!=null&&Ll.find(Xa=>Xa.prop==="index"));Vr=kc(Vr,ba==null?void 0:ba.contents,fo);const Pn=[];Vr==null||Vr.forEach((Xa,Je)=>{var on;let vr={};if(Array.isArray(Xa)){let Jr=[];Xa==null||Xa.filter(Qr=>!(Qr!=null&&Qr.id)).forEach((Qr,Pr)=>{var di,Ei,Ci,Ar,An,Jn;if((di=$r==null?void 0:$r[Pr])!=null&&di.prop&&!Array.isArray(Qr)){let Di={};Di[$r[Pr].column]=Qr,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(xn=>JSON.stringify(xn==null?void 0:xn[0])===JSON.stringify(Di)))&&(Jr=(Ar=V==null?void 0:V.value)==null?void 0:Ar.find(xn=>JSON.stringify(xn==null?void 0:xn[0])===JSON.stringify(Di))),Jr&&Jr.length>0?vr[$r[Pr].prop]=Jr!=null&&Jr.find(xn=>{var Xn;return((Xn=Object.keys(xn))==null?void 0:Xn[0])===$r[Pr].column})?(An=Jr==null?void 0:Jr.find(xn=>{var Xn;return((Xn=Object.keys(xn))==null?void 0:Xn[0])===$r[Pr].column}))==null?void 0:An[$r[Pr].column]:Qr:vr[$r[Pr].prop]=Qr}else Array.isArray(Qr)&&((Jn=$r[Pr])!=null&&Jn.prop?vr[$r[Pr].prop]=Qr:vr.children=Et(Qr,$r))})}else vr=Xa;if(Array.isArray(Xa)&&Xa.some(Jr=>Jr==null?void 0:Jr.id)){const Jr=(on=Xa==null?void 0:Xa.find(Qr=>Qr.id))==null?void 0:on.id;Pn.push(Object.assign(vr,{id:oo(Jr)}))}else vr.id?Pn.push(vr):Pn.push(Object.assign(vr,{id:Je.toString()}))});try{const Xa=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Je=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),vr=Xa==null?void 0:Xa.tableId,on=Xa==null?void 0:Xa.compIndex;if(vr&&Array.isArray(Je)&&Je.length>0&&String(vr)===String(d==null?void 0:d.parentTableId)&&String(on)===String(d==null?void 0:d.index)){const Jr=new Set(Pn.map(Pr=>String(Pr==null?void 0:Pr.id))),Qr=Je.filter(Pr=>!Jr.has(String(Pr)));if(Qr.length>0){const Pr=Xa==null?void 0:Xa.pageKey,di=Pr!=null&&Pr.startsWith("/")?Pr.substring(1):Pr;((v==null?void 0:v[Pr])||(v==null?void 0:v[di])||[]).filter(Ar=>{var An,Jn;return((An=Ar==null?void 0:Ar.key)==null?void 0:An.type)==="data"&&String((Jn=Ar==null?void 0:Ar.key)==null?void 0:Jn.tableId)===String(vr)&&Qr.includes(Ar==null?void 0:Ar.id)}).forEach(Ar=>{var An;Jr.has(String(Ar==null?void 0:Ar.id))||(Pn.push({id:Ar==null?void 0:Ar.id,...((An=Ar==null?void 0:Ar.value)==null?void 0:An.tableData)||{}}),Jr.add(String(Ar==null?void 0:Ar.id)))})}}}catch{}let jn=null;try{const Xa=`ocr_committed_temp_ids_v1:${String((d==null?void 0:d.parentTableId)??"")}:${String((d==null?void 0:d.index)??"")}`,Je=JSON.parse(sessionStorage.getItem(Xa)||"null");Array.isArray(Je)&&Je.length>0&&(jn=new Set(Je.map(vr=>String(vr))))}catch{}const qi=Array.from(((rl=Na.value)==null?void 0:rl.values())||[]).filter(Xa=>!(!(Xa!=null&&Xa._isOCRRow&&(Xa==null?void 0:Xa._ocrTableId)===(d==null?void 0:d.index))||jn&&jn.has(String(Xa==null?void 0:Xa.id)))),ho=(Te.value||[]).map(Xa=>String(Xa==null?void 0:Xa.id)),Zl=wi(Pn,ho);if(Te.value=Wt(Zl,R,U.value),Fa.value=Zl,(hl=Fa.value)==null||hl.forEach(Xa=>{var Je;(Je=Na.value)==null||Je.set(Xa.id,Xa)}),jn&&jn.size>0)try{const Xa=new Set(Array.from(jn.values()));Te.value=(Te.value||[]).filter(Je=>!Xa.has(String(Je==null?void 0:Je.id))),Fa.value=(Fa.value||[]).filter(Je=>!Xa.has(String(Je==null?void 0:Je.id))),Xa.forEach(Je=>{var vr,on;try{(on=(vr=Na.value)==null?void 0:vr.delete)==null||on.call(vr,Je)}catch{}})}catch{}const Yr=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ht=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(Yr&&Array.isArray(ht)&&ht.length>0&&String(Yr==null?void 0:Yr.compIndex)===String(d==null?void 0:d.index)){const Xa=new Set((Fa.value||[]).map(Je=>String(Je==null?void 0:Je.id)));ht.filter(Je=>!Xa.has(String(Je)))}if(qi.length>0){const Xa=new Set((Te.value||[]).map(vr=>vr==null?void 0:vr.id)),Je=qi.filter(vr=>!Xa.has(vr.id));Je.length>0&&(Te.value=[...Te.value||[],...Je],Fa.value=[...Fa.value||[],...Je],Je.forEach(vr=>{var on;return(on=Na.value)==null?void 0:on.set(vr.id,vr)}))}}else U.value=[],Ie.value=[],Te.value=[],Fa.value=[],Na.value=new Map;if(za=[...new Set(za)],za=za==null?void 0:za.map(la=>({label:la,type:"methodButton"})),((zl=re==null?void 0:re.contents)==null?void 0:zl.length)>0?Ta.value=re==null?void 0:re.contents:Ta.value=[],Ta.value=[...Ta.value,...za],Aa=[...new Set(Aa)],Aa=Aa==null?void 0:Aa.map(la=>({label:la,type:"methodButton"})),((gl=ie==null?void 0:ie.contents)==null?void 0:gl.length)>0)if((er=(ur=(xr=p==null?void 0:p.find(la=>(la==null?void 0:la.key)==="filterAllType"))==null?void 0:xr.value)==null?void 0:ur.find(la=>(la==null?void 0:la.value)==="onButtonContents"))!=null&&er.content){let la=(pr=(Yl=(kl=p==null?void 0:p.find(Al=>(Al==null?void 0:Al.key)==="filterAllType"))==null?void 0:kl.value)==null?void 0:Yl.find(Al=>(Al==null?void 0:Al.value)==="onButtonContents"))==null?void 0:pr.content;if(la=(Ol=la==null?void 0:la.split(":"))==null?void 0:Ol[1],la=(fr=la.slice(1,(la==null?void 0:la.length)-1))==null?void 0:fr.split(","),Fe.value=(wr=ie==null?void 0:ie.contents)==null?void 0:wr.filter(Al=>la==null?void 0:la.find(nn=>nn===(Al==null?void 0:Al.label))),$e.value=(hr=ie==null?void 0:ie.contents)==null?void 0:hr.filter(Al=>la==null?void 0:la.find(nn=>nn===(Al==null?void 0:Al.label))),(Dr=ie==null?void 0:ie.contents)!=null&&Dr.some(Al=>(Al==null?void 0:Al.label)==="OCR识别")&&!((rn=Fe.value)!=null&&rn.some(Al=>(Al==null?void 0:Al.label)==="OCR识别"))){const Al=(dr=ie==null?void 0:ie.contents)==null?void 0:dr.find(nn=>(nn==null?void 0:nn.label)==="OCR识别");Fe.value=[...Fe.value,Al],$e.value=[...$e.value,Al]}A.value=!!(la!=null&&la.find(Al=>Al==="搜索")),W.value=!!(la!=null&&la.find(Al=>Al==="块状显示"))}else Fe.value=ie==null?void 0:ie.contents,$e.value=ie==null?void 0:ie.contents;else Fe.value=[],$e.value=[];if(Fe.value=[...Fe.value,...Aa],$e.value=[...$e.value,...Aa],typeof se.value=="string"&&se.value==="设备管理/试验设备"&&(d==null?void 0:d.compName)==="设备列表"?((Nr=Fe.value)!=null&&Nr.some(la=>(la==null?void 0:la.label)==="OCR识别")||(Fe.value=[...Fe.value||[],{label:"OCR识别"}]),(Rr=$e.value)!=null&&Rr.some(la=>(la==null?void 0:la.label)==="OCR识别")||($e.value=[...$e.value||[],{label:"OCR识别"}])):(Fe.value=(Fe.value||[]).filter(la=>(la==null?void 0:la.label)!=="OCR识别"),$e.value=($e.value||[]).filter(la=>(la==null?void 0:la.label)!=="OCR识别")),(Yt=Fe.value)!=null&&Yt.some(la=>(la==null?void 0:la.label)==="切换视图")||(Fe.value=[...Fe.value||[],{label:"切换视图"}]),(Jt=$e.value)!=null&&Jt.some(la=>(la==null?void 0:la.label)==="切换视图")||($e.value=[...$e.value||[],{label:"切换视图"}]),be!=null&&be.some(la=>{var Al;return(la==null?void 0:la.calculatorFilter)&&((Al=la==null?void 0:la.calculatorFilter)==null?void 0:Al.includes("@Button"))})){let la=(Xt=be==null?void 0:be.filter($r=>{var Hr;return($r==null?void 0:$r.calculatorFilter)&&((Hr=$r==null?void 0:$r.calculatorFilter)==null?void 0:Hr.includes("@Button"))}))==null?void 0:Xt.map($r=>$r==null?void 0:$r.calculatorFilter),Al=[],nn=[],Yn=[];la==null||la.forEach($r=>{var fo,Pn,jn,qi,ho;let Hr=(fo=le.analyzeSplitToContent($r,","))==null?void 0:fo.map(Zl=>((Zl==null?void 0:Zl[(Zl==null?void 0:Zl.length)-1])===","&&(Zl=Zl==null?void 0:Zl.slice(0,(Zl==null?void 0:Zl.length)-1)),Zl)),Vr=Hr==null?void 0:Hr.find(Zl=>Zl==null?void 0:Zl.includes("@Button"));if(Hr!=null&&Hr.find(Zl=>Zl==null?void 0:Zl.includes("Manual"))){Vr=(jn=(Pn=Vr==null?void 0:Vr.replace("=","$R"))==null?void 0:Pn.split("$R"))==null?void 0:jn[1],Vr=Vr==null?void 0:Vr.slice(1,(Vr==null?void 0:Vr.length)-1);let Zl=(qi=le.analyzeSplitToContent(Vr,","))==null?void 0:qi.map(Yr=>((Yr==null?void 0:Yr[(Yr==null?void 0:Yr.length)-1])===","&&(Yr=Yr==null?void 0:Yr.slice(0,(Yr==null?void 0:Yr.length)-1)),Yr));Zl=Zl==null?void 0:Zl[0],Zl=Zl==null?void 0:Zl.slice(1,(Zl==null?void 0:Zl.length)-1),Zl=(ho=Zl==null?void 0:Zl.split(","))==null?void 0:ho.map(Yr=>({label:Yr,prop:Yr})),Vr!=null&&Vr.includes("Up")?Al=[...Al,...Zl??[]]:Vr!=null&&Vr.includes("Line")?nn=[...nn,...Zl??[]]:Yn=[...Yn,...Zl??[]]}}),Fe.value=[...Al,...Fe.value??[]],Ta.value=[...nn,...Ta.value??[]],Yn.value=[...Yn,...Yn.value??[]]}aa.value=((Zt=Te==null?void 0:Te.value)==null?void 0:Zt.length)??0,Ut(Te.value),Gr.value=Te.value,sr.value&&(U.value=(es=(Qt=Ie.value)==null?void 0:Qt.filter(la=>(la==null?void 0:la.label)!=="操作"))==null?void 0:es.map(la=>{var Al;return{...la,type:"edit",optionUrl:la!=null&&la.formMenuSelect&&((Al=la==null?void 0:la.formMenuSelect)==null?void 0:Al.length)>0?{groupSelect:la==null?void 0:la.groupSelect,menuSelect:la==null?void 0:la.formMenuSelect,selectRelateType:"",type:la==null?void 0:la.formType}:null}}),ft())};e.watch(()=>[d.itemData,kr.value,an.value,Wl.value,V==null?void 0:V.value],async()=>{var p,v,z,R,P,D;if((p=d==null?void 0:d.itemData)!=null&&p.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((v=pe.value)!=null&&v.find(re=>{var ie,G;return(re==null?void 0:re.key)===((G=(ie=d==null?void 0:d.itemData)==null?void 0:ie.find(xe=>(xe==null?void 0:xe.key)==="columnPath"))==null?void 0:G.contents)}))){let re=pe.value,ie={key:(R=(z=d==null?void 0:d.itemData)==null?void 0:z.find(G=>(G==null?void 0:G.key)==="columnPath"))==null?void 0:R.contents,value:(D=(P=d==null?void 0:d.itemData)==null?void 0:P.find(G=>(G==null?void 0:G.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(G=>(G==null?void 0:G.key)===(ie==null?void 0:ie.key))?re=re==null?void 0:re.map(G=>((G==null?void 0:G.key)===(ie==null?void 0:ie.key)&&(G.value=ie.value),G)):re.push(ie),_a.setTableViewContents(re)}await Gt(d.itemData,d.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.operatingForm,p=>{p!=null&&p.form&&(ji(p==null?void 0:p.form),pa.value=p==null?void 0:p.dialogTitle,Ee.value=!0,te.value=!0)},{immediate:!0,deep:!0});const Ou=()=>{var p;(p=J.value)!=null&&p.includes("read")&&(sr.value=!sr.value)},Lu=()=>{_r.value=!_r.value};e.watch(()=>{var p;return(p=d==null?void 0:d.config)==null?void 0:p.viewport},p=>{var v;J.value=p,(p==null?void 0:p.length)===0?sr.value=!1:(p!=null&&p.includes("read")||(sr.value=!0),p!=null&&p.includes("edit")||(sr.value=!1)),_.value=((v=d==null?void 0:d.config)==null?void 0:v.showIndex)||sr.value},{immediate:!0}),e.watch(()=>sr.value,p=>{var v;p?(ft("viewChange"),_a.setCacheUpdatingData(null)):(Fe.value=$e.value,U.value=ne.value,ae.value&&(_a.setTableLoading(d==null?void 0:d.index),j("change",ae.value))),_.value=p||((v=d==null?void 0:d.config)==null?void 0:v.showIndex),Mr.value=[]},{immediate:!0}),e.watch(()=>{var p;return(p=Bn.value)==null?void 0:p.length},p=>{p===0&&(de.currentPage=1)}),e.watch(()=>d==null?void 0:d.compNames,p=>{K.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:p||[],width:1}]},{immediate:!0}),e.ref(!1);const Ru=(p,v)=>{var z;ft("createClick"),v===de.pageSize&&(de.currentPage=Math.ceil(((z=Te.value)==null?void 0:z.length)/de.pageSize))},$u=async(p,v,z)=>{var P,D,re,ie,G;const R=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(R&&uo.includes(R)&&z!==void 0&&z!==null&&String(z).trim()!==""){const xe=String(z).trim();if(await pt(xe,p==null?void 0:p.id)){Ja.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ye=(P=Te.value)==null?void 0:P.findIndex(Xe=>(Xe==null?void 0:Xe.id)===(p==null?void 0:p.id)),Ge=Ye!==-1?(re=(D=Te.value)==null?void 0:D[Ye])==null?void 0:re[R]:void 0;R&&(p[R]=Ge??"");return}}if(sr.value){const xe=p==null?void 0:p.id;xe!=null&&(f.value.has(xe)||f.value.set(xe,M.cloneDeep(p)),o.value.add(xe));const be=(ie=Te.value)==null?void 0:ie.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(p==null?void 0:p.id));be!==-1&&R&&(Te.value[be]={...Te.value[be],[R]:z}),po(z,p,v);return}po(z,p,v),rr.value=M.cloneDeep(p),oa.value=p==null?void 0:p.id,aa.value=(G=Te.value)==null?void 0:G.length,pa.value=p!=null&&p._isTemp?"新增":"编辑",Ui(!1)},Vu=async()=>{var p,v;try{const z=[];if(d!=null&&d.related&&Array.isArray(d.related)&&(console.log("props.related",d.related),d.related.forEach(R=>{if(typeof R=="string"&&R.includes("content_")){const P=R.split("_")[1];P&&(z.push(`content_${P}`),z.push(`struct_${P}`))}})),z.length===0&&(d!=null&&d.itemData)){const R=(v=(p=d.itemData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:v.contents;R&&(z.push(`content_${R}`),z.push(`struct_${R}`))}return z}catch(z){return console.error("获取 tableNames 失败:",z),[]}},Fu=async(p,v,z)=>{var D,re;if(!z||typeof z!="string"||z.trim()===""){const ie=(v==null?void 0:v.property)??(v==null?void 0:v.prop),G=`${p==null?void 0:p.id}:${ie}`;m.value.delete(G),w.value.set(G,!1);return}const R=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=`${p==null?void 0:p.id}:${R}`;w.value.set(P,!0);try{const ie=await Vu();if(ie.length===0){console.warn("未找到同名表,跳过全局搜索"),m.value.delete(P),w.value.set(P,!1);return}const G=parseInt((D=Il.value)==null?void 0:D.plat_id);if(!G){console.warn("platId 无效,跳过全局搜索"),m.value.delete(P),w.value.set(P,!1);return}const xe=await M.getAllTables({platId:G,tableNames:ie??[]}),be=((re=xe==null?void 0:xe.data)==null?void 0:re.result)||[],Ye=[],Ge=[];for(let Xe=0;Xe<be.length;Xe+=2)Xe+1<be.length&&Ge.push([be[Xe],be[Xe+1]]);Ge.forEach(([Xe,ba])=>{var il;if(!Array.isArray(Xe)||Xe.length===0||!Array.isArray(ba)||ba.length===0)return;const Aa=ba[0];let za=((il=Aa==null?void 0:Aa.结构)==null?void 0:il.contents)??[];if(!Array.isArray(za)||za.length===0)return;let Ze=M.cloneDeep(za);if(Array.isArray(Ze==null?void 0:Ze[0])&&(Ze=le.getColumnChild(Ze[0])),!Array.isArray(Ze)||Ze.length===0||!Ze.some(ke=>(ke==null?void 0:ke.prop)===R))return;[...Xe].sort((ke,Va)=>{const va=Number((ke==null?void 0:ke.update_time)??0);return Number((Va==null?void 0:Va.update_time)??0)-va}).slice(0,20).forEach(ke=>{const Va=ke[R];if(Va!=null){const va=String(Va);va.toLowerCase().includes(z.toLowerCase())&&Ye.findIndex(Ra=>{var ze;return ke.id&&((ze=Ra.rowData)==null?void 0:ze.id)===ke.id?!0:Ra.label===va})===-1&&Ye.push({label:va,rowData:M.cloneDeep(ke),sourceTable:(Aa==null?void 0:Aa.source_table)||""})}})}),m.value.set(P,Ye)}catch(ie){console.error("全局搜索建议失败:",ie),m.value.delete(P)}finally{w.value.set(P,!1)}},Pu=(p,v,z)=>{if(!sr.value)return;const R=(v==null?void 0:v.property)??(v==null?void 0:v.prop),P=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const D=`${p==null?void 0:p.id}:${R}`;if(g.has(D)&&clearTimeout(g.get(D)),!z||z.trim()===""){m.value.delete(D),w.value.set(D,!1);return}const re=setTimeout(()=>{Fu(p,{prop:R,property:R},z),g.delete(D)},300);g.set(D,re)};function ju(p,v){const z=`${p==null?void 0:p.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return m.value.get(z)||[]}const Hu=(p,v,z)=>{var xe;if(!z||!z.rowData)return;const R=z.rowData,P=p==null?void 0:p.id,D=(v==null?void 0:v.property)??(v==null?void 0:v.prop);(le.getAllLeafNodes(U.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 Ye=be==null?void 0:be.prop;Ye&&R[Ye]!==void 0&&(p[Ye]=R[Ye])}),(xe=Te.value)==null||xe.findIndex(be=>(be==null?void 0:be.id)===P),P!=null&&(f.value.has(P)||f.value.set(P,M.cloneDeep(p)),o.value.add(P));const G=`${P}:${D}`;m.value.delete(G),w.value.set(G,!1),po(p[D],p,v)},un=p=>{var G,xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl;const{row:v,column:z,item:R,slotData:P}=p;let D=v!=null&&v[z==null?void 0:z.prop]||(v==null?void 0:v[z==null?void 0:z.prop])===0?((xe=(G=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:G[0])==null?void 0:xe.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=(be=v==null?void 0:v[R==null?void 0:R.prop])==null?void 0:be[0])==null?void 0:Ye.contents)??(v==null?void 0:v[R==null?void 0:R.prop])??((Xe=(Ge=P==null?void 0:P[R==null?void 0:R.prop])==null?void 0:Ge[0])==null?void 0:Xe.contents)??(P==null?void 0:P[R==null?void 0:R.prop])??((za=(Aa=v==null?void 0:v[(ba=R==null?void 0:R.child)==null?void 0:ba.prop])==null?void 0:Aa[0])==null?void 0:za.contents)??(v==null?void 0:v[(Ze=R==null?void 0:R.child)==null?void 0:Ze.prop]),ie=Array.isArray(D)&&!(D!=null&&D.every(wa=>typeof wa=="string"||typeof wa=="number"))?"查看":D;if(ie=Array.isArray(ie)?ie.join(","):ie,(z==null?void 0:z.formType)==="Date")if(!ie||ie===""||ie===null||ie===void 0)ie="";else{const wa=M.dayjs(ie,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ie=wa.isValid()?wa.format("YYYYMMDD"):ie??""}return Array.isArray(z==null?void 0:z.relatedPages)&&((nl=z==null?void 0:z.relatedPages)==null?void 0:nl.length)>0&&(ie="详情页"),ie},Uu=p=>{var xe,be,Ye,Ge,Xe,ba,Aa,za,Ze,nl;const{row:v,column:z,item:R,slotData:P}=p;let D=v!=null&&v[z==null?void 0:z.prop]?((be=(xe=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:xe[0])==null?void 0:be.contents)??(v==null?void 0:v[z==null?void 0:z.prop]):((Ge=(Ye=v==null?void 0:v[R==null?void 0:R.prop])==null?void 0:Ye[0])==null?void 0:Ge.contents)??(v==null?void 0:v[R==null?void 0:R.prop])??((ba=(Xe=P==null?void 0:P[R==null?void 0:R.prop])==null?void 0:Xe[0])==null?void 0:ba.contents)??(P==null?void 0:P[R==null?void 0:R.prop])??((Ze=(za=v==null?void 0:v[(Aa=R==null?void 0:R.child)==null?void 0:Aa.prop])==null?void 0:za[0])==null?void 0:Ze.contents)??(v==null?void 0:v[(nl=R==null?void 0:R.child)==null?void 0:nl.prop]);const ie=Array.isArray(D)&&!(D!=null&&D.every(wa=>typeof wa=="string"||typeof wa=="number")),G=Array.isArray(D)&&(D==null?void 0:D.find(wa=>wa==null?void 0:wa.url));return ie&&G},qu=p=>{var P,D,re,ie;if(!(p!=null&&p.column))return!1;const v=se.value==="试验任务/任务管理",z=(d==null?void 0:d.compName)==="任务列表",R=((D=(P=p==null?void 0:p.column)==null?void 0:P.filter)==null?void 0:D.includes("@TextRGBA"))||((ie=(re=p==null?void 0:p.column)==null?void 0:re.filter)==null?void 0:ie.includes("@TextBackRGBA"));return v&&z&&R},Wu=(p,v)=>p.find(z=>Object.values(z).some(R=>R===v));return e.watch(()=>qe.value,async p=>{if(p){Re.setContentLoading(!0),await e.nextTick();const v=Wu(Te.value,p==null?void 0:p.data);if(!v)return Re.setContentLoading(!1);await co(p==null?void 0:p.data,null,v,{data:p==null?void 0:p.data}),Re.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>d==null?void 0:d.cacheNewData,p=>{var v;p&&(Array.isArray(p)?p.forEach(z=>{var R,P,D,re,ie;if(换,String(z==null?void 0:z.compId)===String(d==null?void 0:d.index)&&(z!=null&&z.resId)&&((R=z==null?void 0:z.data)!=null&&R.id)){const G=(P=z==null?void 0:z.data)==null?void 0:P.id,xe=z==null?void 0:z.resId;if(Te.value=(D=Te.value)==null?void 0:D.map(be=>{if((be==null?void 0:be.id)===G){const Ye={...be,id:xe};return delete Ye._isOCRRow,delete Ye._ocrTableId,Ye}return be}),(ie=(re=Na.value)==null?void 0:re.has)!=null&&ie.call(re,G)){const Ye={...Na.value.get(G)||{},id:xe};delete Ye._isOCRRow,delete Ye._ocrTableId,Na.value.delete(G),Na.value.set(xe,Ye)}ar(d==null?void 0:d.index,G,xe)}}):String(p==null?void 0:p.compId)===String(d==null?void 0:d.index)&&(Te.value=(v=Te.value)==null?void 0:v.map(z=>{var R;if((z==null?void 0:z.id)===((R=p==null?void 0:p.data)==null?void 0:R.id)){const P={...z,id:p==null?void 0:p.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return z})))},{immediate:!0,deep:!0}),(p,v)=>{var Ze,nl,wa,il;const z=e.resolveComponent("svg-icon"),R=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),ie=e.resolveComponent("el-radio-group"),G=e.resolveComponent("el-checkbox-group"),xe=e.resolveComponent("el-button"),be=e.resolveComponent("el-icon"),Ye=e.resolveComponent("el-progress"),Ge=e.resolveComponent("el-alert"),Xe=e.resolveComponent("el-table-column"),ba=e.resolveComponent("el-table"),Aa=e.resolveComponent("el-upload"),za=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",C3,[ri.value?(e.openBlock(),e.createBlock(pl.ssTable,{id:"excel-table",pageObj:de,showIndex:_.value,isTree:(Ze=a.compItem)==null?void 0:Ze.isTree,summaryInfo:fe,columns:U.value,defaultSort:ge,isCardViewport:_r.value,checkedColumns:n.value,key:or.value+JSON.stringify(U.value),tableData:Bn.value,isEditViewport:sr.value,isShowPagination:je.value,isShowEdit:!1,isShowDelete:!1,allowSelect:N.value,onDbClickRow:rt,extraButton:Fe.value,rowButton:Ta.value,cacheExtraButtons:$e.value,isClearSelection:((nl=Mr.value)==null?void 0:nl.length)===0,onDoCurrentChange:Fo,onDoSizeChange:Po,onSortChange:jo,onContentClick:co,onRowClick:it,onSelectChange:ki,onCellChange:$u,onCellInput:Pu,onSelectSuggest:Hu,onChange:po,onPreview:io,onSubmitEditingTable:On,onHandleColEditChange:Uo,onHandleColTypeChange:qo,onClickButton:ut,onAddNewRow:Wo,bottomButton:L.value,allowRowAddOrDelete:lt.value},e.createSlots({headerButton:e.withCtx(ke=>{var Va,va,Ya,Ra;return[a.showHeader?(e.openBlock(),e.createBlock(Zf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(ca)===e.unref(se),filterValues:so.value,selectNums:(Va=Mr.value)==null?void 0:Va.length,dataNums:(va=Te.value)==null?void 0:va.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ke.buttons,menuFilter:(Ra=(Ya=a.compItem)==null?void 0:Ya.component)==null?void 0:Ra.menuFilter,onButtonClick:v[1]||(v[1]=(ze,Q,He)=>ut(ze,Q,{extra:He})),columns:U.value,onFilter:Pi,onGetImportData:sn,level:a.level,filterShow:A.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ke,Va,va,Ya;return[((ke=Te.value)==null?void 0:ke.length)>0&&a.allowOperate&&W.value?(e.openBlock(),e.createElementBlock("div",B3,[(Va=J.value)!=null&&Va.includes("read")&&((va=J.value)!=null&&va.includes("edit"))&&((Ya=Ta.value)!=null&&Ya.some(Ra=>(Ra==null?void 0:Ra.label)==="编辑"))&&!_r.value&&e.unref(ca)!==e.unref(se)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:Ou},[e.createVNode(z,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ke,index:Va})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:va=>Ru(ke,Va)},[e.createVNode(z,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,N3)]),operateCol:e.withCtx(()=>[e.createVNode(R,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Bu,onBeforeEnter:Nu},{reference:e.withCtx(()=>[e.createElementVNode("span",A3,[e.createVNode(z,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",z3,[v[20]||(v[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":I.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ke=>Xo(ke))},null,8,["model-value"]),v[21]||(v[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(G,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ke=>n.value=ke),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:i},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Kn.value,ke=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[e.createVNode(D,{value:ke.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:ke.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(ke.label),9,M3)]),_:2},1032,["value"]),e.createVNode(R,{"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",I3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Va=Object.keys(ke))==null?void 0:Va.filter(va=>{var Ya;return(Ya=S.value)==null?void 0:Ya.find(Ra=>(Ra==null?void 0:Ra.value)===va)}),va=>{var Ya,Ra;return e.openBlock(),e.createElementBlock("div",{key:va},[E[va]=="radio"?(e.openBlock(),e.createElementBlock("div",O3,[v[19]||(v[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(ie,{"model-value":ke==null?void 0:ke[va],onChange:ze=>Fi(ze,va,ke)},{default:e.withCtx(()=>{var ze,Q;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Q=(ze=S.value)==null?void 0:ze.find(He=>(He==null?void 0:He.value)===va))==null?void 0:Q.options,He=>(e.openBlock(),e.createBlock(re,{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[va]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ke==null?void 0:ke[va],"active-text":(Ra=(Ya=S.value)==null?void 0:Ya.find(ze=>(ze==null?void 0:ze.value)===va))==null?void 0:Ra.label,onChange:ze=>Fi(ze,va,ke)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",L3,[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(ke=>{var Va,va,Ya,Ra,ze,Q,He,sa,T,Ia,Ua,ol,Ka,Ca,dl,ql,qa,Dl,$a,Ll;return[((Va=ke==null?void 0:ke.column)==null?void 0:Va.label)==="证书附件"||((va=ke==null?void 0:ke.column)==null?void 0:va.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",R3,[e.createVNode(z,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(rl=>xu(ke),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Uu(ke)?(e.openBlock(),e.createBlock(R,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",$3,e.toDisplayString(un(ke)),1)]),default:e.withCtx(()=>{var rl,hl;return[e.createElementVNode("div",V3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((hl=ke==null?void 0:ke.row)==null?void 0:hl[(rl=ke==null?void 0:ke.column)==null?void 0:rl.prop],zl=>(e.openBlock(),e.createElementBlock("div",F3,[e.createElementVNode("div",{class:"prop-url",title:ti(zl),onClick:gl=>at(zl)},e.toDisplayString(ti(zl)),9,P3),e.createElementVNode("div",{class:"prop-download",onClick:gl=>to(zl)}," 下载 ",8,j3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[qu(ke)?(e.openBlock(),e.createBlock(ld,{key:0,value:un(ke),columnContent:ke==null?void 0:ke.column},null,8,["value","columnContent"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(un(ke))&&((Ra=(Ya=un(ke))==null?void 0:Ya.toString())!=null&&Ra.includes(".txt")||(Q=(ze=un(ke))==null?void 0:ze.toString())!=null&&Q.includes(".cpt")||(sa=(He=un(ke))==null?void 0:He.toString())!=null&&sa.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(un(ke))&&((Ia=(T=un(ke))==null?void 0:T.toString())!=null&&Ia.includes(".txt")||(ol=(Ua=un(ke))==null?void 0:Ua.toString())!=null&&ol.includes(".cpt")||(Ca=(Ka=un(ke))==null?void 0:Ka.toString())!=null&&Ca.includes(".cyd"))?"underline":"",cursor:!Array.isArray(un(ke))&&((ql=(dl=un(ke))==null?void 0:dl.toString())!=null&&ql.includes(".txt")||(Dl=(qa=un(ke))==null?void 0:qa.toString())!=null&&Dl.includes(".cpt")||(Ll=($a=un(ke))==null?void 0:$a.toString())!=null&&Ll.includes(".cyd"))?"pointer":"",marginLeft:(ke==null?void 0:ke.colIndex)===0?`${((ke==null?void 0:ke.level)??0)*20}px`:0}),onClick:rl=>{var hl;return $i(un(ke),((hl=ke==null?void 0:ke.column)==null?void 0:hl.relatedPages)??[])}},e.toDisplayString(un(ke)===0?"0":un(ke)),13,H3))],64))]}),_:2},[((wa=Ta.value)==null?void 0:wa.length)>0?{name:"actions",fn:e.withCtx(({item:ke,fIndex:Va})=>[e.createVNode(R,{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",D3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ci(Ta.value,ke),(va,Ya)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ya,onClick:e.withModifiers(Ra=>ut(va==null?void 0:va.label,ke,{extra:va}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:va==null?void 0:va.textColor}),class:"extra-button-label"},e.toDisplayString(va==null?void 0:va.label),5)],8,T3))),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),sr.value?(e.openBlock(),e.createElementBlock("div",U3,[e.createVNode(xe,{id:"themeBorderButton",onClick:Ko},{default:e.withCtx(()=>v[22]||(v[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(xe,{class:"ok-button",id:"themeButton",onClick:Vi},{default:e.withCtx(()=>v[23]||(v[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(Ir.ssDialog,{title:pa.value,visible:te.value,width:ln.value,onBeforeDestroy:Zo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",q3,[e.createVNode(pl.ssForm,{ref_key:"formRef",ref:ce,rowContents:he.value,showOperator:!1,onChange:Au,isEnableWrap:!1,layer:!0,onFixChangeValue:Rn,onClickTrigger:Qo,isEdit:ja.value,onBlurChange:Yo,onCreate:no,onTagChange:Tn},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Ee.value?(e.openBlock(),e.createElementBlock("div",W3,[e.createVNode(xe,{onClick:v[4]||(v[4]=ke=>te.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>v[24]||(v[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(xe,{class:"ok-button",onClick:v[5]||(v[5]=ke=>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(Ir.ssDialog,{title:pa.value,visible:we.value,width:fa.value,onBeforeDestroy:v[7]||(v[7]=ke=>we.value=!1)},{default:e.withCtx(()=>[e.createVNode(u0)]),footer:e.withCtx(()=>[e.createElementVNode("div",G3,[e.createVNode(xe,{onClick:v[6]||(v[6]=ke=>we.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>v[26]||(v[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(xe,{class:"ok-button",onClick:ot,id:"themeButton"},{default:e.withCtx(()=>v[27]||(v[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ua.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:2,fileDataList:Pe.value,onDestroy:nt},null,8,["fileDataList"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createBlock(Ir.ssDialog,{key:3,visible:ue.value,onBeforeDestroy:Du,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Co.ThreeViewerHost,{files:Me.value,threeData:oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(Ir.ssDialog,{title:"OCR扫描录入",visible:xl.value,"close-on-click-modal":!1,onBeforeDestroy:Ql,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",K3,[e.createElementVNode("div",Y3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ra.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:ra.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:ra.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)]),ra.value===1?(e.openBlock(),e.createElementBlock("div",J3,[e.createVNode(xe,{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(xe,{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),ra.value===1?(e.openBlock(),e.createElementBlock("div",X3,[e.createElementVNode("div",Z3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ya.value,(ke,Va)=>{var va;return e.openBlock(),e.createElementBlock("div",{key:Va,class:"ocr-file-item"},[e.createElementVNode("div",Q3,[ke.raw&&((va=ke.raw.type)!=null&&va.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:cn(ke),alt:"预览",class:"thumbnail-image"},null,8,eh)):(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(be,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:Gl(ke)==="uploading",processing:Gl(ke)==="processing",completed:Gl(ke)==="completed"||Gl(ke)==="uploaded",failed:Gl(ke)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",lh,[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(ke)==="completed"||Gl(ke)==="uploaded",uploading:Gl(ke)==="uploading",processing:Gl(ke)==="processing",failed:Gl(ke)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:Gl(ke)==="failed"?"#f56c6c":Gl(ke)==="completed"||Gl(ke)==="uploaded"?"#67c23a":"#409eff","stroke-width":Gl(ke)==="completed"||Gl(ke)==="uploaded"||Gl(ke)==="failed"?3:2,"stroke-dasharray":Nn(ke),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,rh)])),Gl(ke)==="completed"||Gl(ke)==="uploaded"?(e.openBlock(),e.createElementBlock("div",nh,[e.createVNode(be,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.check_default))]),_:1})])):e.createCommentVNode("",!0),Gl(ke)==="failed"?(e.openBlock(),e.createElementBlock("div",ih,[e.createVNode(be,{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=>_u(Va)},[e.createVNode(be,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Ja.close_default))]),_:1})],8,oh)]),e.createElementVNode("div",th,e.toDisplayString(ke.name||"文件名123"),1)])}),128))]),ya.value.length>0?(e.openBlock(),e.createElementBlock("div",sh,[e.createVNode(xe,{onClick:cl,class:"ocr-start-recognize-btn",disabled:br.value||ya.value.length===0,size:"default"},{default:e.withCtx(()=>v[36]||(v[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),ra.value===1?(e.openBlock(),e.createElementBlock("div",ch,[e.createVNode(Ye,{percentage:De.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),ra.value===2?(e.openBlock(),e.createElementBlock("div",uh,[e.createElementVNode("div",dh,[e.createVNode(Ge,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",ph,[e.createVNode(ba,{data:Pa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Xe,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Be.value,ke=>(e.openBlock(),e.createBlock(Xe,{key:ke.prop,prop:ke.prop,"min-width":ke.minWidth||230,"class-name":ke.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",fh,[e.createElementVNode("span",null,e.toDisplayString(ke.label),1)])]),default:e.withCtx(({row:Va,$index:va})=>{var Ya,Ra,ze;return[ke.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:cr(Va[ke.prop]),fontWeight:500})},e.toDisplayString(Xl(Va[ke.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[ma.value!==va?(e.openBlock(),e.createElementBlock("span",hh,e.toDisplayString(Va[ke.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(al(ke.prop)),{key:1,modelValue:Va[ke.prop],"onUpdate:modelValue":Q=>Va[ke.prop]=Q,size:"small",placeholder:"请输入"+ke.label,content:((Ya=La(ke.prop))==null?void 0:Ya.contents)??((Ra=La(ke.prop))==null?void 0:Ra.options)??[],optionUrl:(ze=La(ke.prop))==null?void 0:ze.optionUrl,onChange:Q=>Vl(va,ke.prop,Q),onFocus:Q=>ta.value=ke.prop,onBlur:v[8]||(v[8]=Q=>ta.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Xe,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ke})=>[ma.value===ke?(e.openBlock(),e.createBlock(be,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers(Va=>Ul(ke),["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=>Ul(ke),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),ra.value===3?(e.openBlock(),e.createElementBlock("div",vh,[e.createVNode(be,{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(Aa,{ref:"ocrUploadRef","file-list":ya.value,"onUpdate:fileList":v[9]||(v[9]=ke=>ya.value=ke),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":ll,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[ra.value!==3?(e.openBlock(),e.createElementBlock("div",mh,[e.createVNode(xe,{onClick:bu,class:"ocr-start-recognize-btn",disabled:ra.value===1||br.value},{default:e.withCtx(()=>v[39]||(v[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(xe,{onClick:ku,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(T0,{visible:b.value,onConfirm:$,onCancel:v[10]||(v[10]=ke=>b.value=!1)},null,8,["visible"]),e.createVNode(Rd,{visible:ha.value,"onUpdate:visible":v[11]||(v[11]=ke=>ha.value=ke),versions:Ha.value},null,8,["visible","versions"]),e.createVNode(_d,{visible:xa.value,"onUpdate:visible":v[12]||(v[12]=ke=>xa.value=ke),images:ga.value,"default-image-name":fl.value,"field-meta":ma.value!==null?((il=Pa.value[ma.value])==null?void 0:il.__ocrFieldMeta)||{}:{},"focused-field-name":ta.value,onClose:v[13]||(v[13]=ke=>xa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Jd,{visible:Ve.value,"onUpdate:visible":v[14]||(v[14]=ke=>Ve.value=ke),candidates:ml.value,"name-prop":Nl.value,"mfr-prop":Ba.value,columns:U.value,onSubmit:ir,onPreviewFile:wu},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(rp,{visible:ia.value,"onUpdate:visible":v[15]||(v[15]=ke=>ia.value=ke),ocrPreviewData:Pa.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ke=>Pa.value=ke),ocrSelectedFields:Oe.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ke=>Oe.value=ke),ocrPreviewColumns:Be.value,onConfirm:_l,onFieldChange:v[18]||(v[18]=({rowIndex:ke,prop:Va,value:va})=>Vl(ke,Va,va))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(Ir.ssDialog,{title:K.title,visible:K.show,width:K.width,onBeforeDestroy:na},{default:e.withCtx(()=>[e.createElementVNode("div",yh,[e.createVNode(pl.ssForm,{rowContents:K==null?void 0:K.contents,formRules:K==null?void 0:K.formRules,showOperator:!1,buttonValue:K.buttonValue,isEdit:ja.value,isStartJustify:!1,onOnButtonClick:Oa},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(Ir.ssDialog,{title:"",visible:X.show,width:X.width,alignCenter:!0,onBeforeDestroy:_e},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",gh,e.toDisplayString(X.title),1),e.createVNode(za,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>v[41]||(v[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",bh,[e.createVNode(za,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(pn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",kh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X==null?void 0:X.buttonValue,ke=>(e.openBlock(),e.createBlock(xe,{key:ke==null?void 0:ke.label,style:e.normalizeStyle({background:ke==null?void 0:ke.background,color:ke==null?void 0:ke.color}),onClick:Va=>Ce(ke==null?void 0:ke.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ke==null?void 0:ke.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(Qf,{columns:X==null?void 0:X.columns,tableData:X==null?void 0:X.tableData},{content:e.withCtx(({row:ke,item:Va,slotData:va,scope:Ya,column:Ra,columnProp:ze,$index:Q})=>[e.createTextVNode(e.toDisplayString((ke==null?void 0:ke[Ra==null?void 0:Ra.prop])||(ke==null?void 0:ke[Ra==null?void 0:Ra.label])||(ke==null?void 0:ke[Ra==null?void 0:Ra.property])||(va==null?void 0:va[Ra==null?void 0:Ra.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"]),e.createVNode(pl.Signature,{signPadInfo:tl.value,onBeforeDestroy:El,onClickSubmitSign:Ml},null,8,["signPadInfo"])])}}},Hc=nr._export_sfc(wh,[["__scopeId","data-v-edde0776"]]),_h={key:1,class:"static-form-body"},Sh=["onClick"],Eh={key:1},Ch=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0},backGround:{default:void 0},backGroundImage:{default:void 0},backgroundUrl:{default:void 0}},emits:["update:backGroundImage"],setup(a,{emit:l}){const n=a,r=l,i=k=>{switch(k){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},o=e.computed(()=>{var O;const k=(O=n.itemData)==null?void 0:O.find(I=>(I==null?void 0:I.key)==="formContent"),y=(k==null?void 0:k.contents)||[];return(n.fields&&n.fields.length>0?n.fields:y).filter(I=>(I==null?void 0:I.label)||(I==null?void 0:I.isHideInForm)).map(I=>{let W=I==null?void 0:I.value;Array.isArray(W)&&(W=W.map(j=>j==null?"":typeof j=="object"?j.label??j.value??j.name??JSON.stringify(j):String(j)).filter(Boolean).join(",")),W!=null&&typeof W=="object"&&(W=W.label??W.value??W.name??JSON.stringify(W));const Y=I.isHideInForm?"":I.label??"",fe=W==null||W===""?"-":String(W),de=Y==="使用状态";return{label:Y,value:fe,isStatus:de,tagType:de?i(fe):"",width:I.width??1,field:I}})}),f=e.ref(null),c=e.ref(null),u=e.computed(()=>{const k=Number(n==null?void 0:n.textSize),y=le.rgbaToColor(n==null?void 0:n.textColor),x={},O={},I={},W={};return!Number.isNaN(k)&&k&&(x.fontSize=`${k}px`,O.fontSize=`${k+1}px`,I.fontSize=`${k}px`,W.fontSize=`${k}px`),y&&(O.color=y,I.color=y,W.color=y),{item:x,label:O,value:I,empty:W}}),m=e.ref(""),g=e.ref(""),w=e.ref(!1),d=async k=>{if(k){g.value&&(URL.revokeObjectURL(g.value),g.value="");try{const y=await M.platformDownloadFile({url:k}),x=new Blob([y==null?void 0:y.data],{type:(y==null?void 0:y.headers["content-type"])||"image/*"});g.value=URL.createObjectURL(x)}catch{g.value=""}}};e.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(m.value=k)},{immediate:!0}),e.watch(m,k=>{d(k)},{immediate:!0});const N=()=>{var k;(k=c.value)==null||k.click()},_=async k=>{var O,I,W;const y=k.target,x=(O=y==null?void 0:y.files)==null?void 0:O[0];if(!x){y.value="";return}w.value=!0;try{const Y=new FormData;Y.append("file",x);const fe=await M.platformUploadFile(Y),de=(W=(I=fe==null?void 0:fe.data)==null?void 0:I.result)==null?void 0:W.url;de?(m.value=de,r("update:backGroundImage",de),d(de),Ja.ElMessage.success("背景图片上传成功")):Ja.ElMessage.error("背景图片上传失败")}catch{Ja.ElMessage.error("背景图片上传失败")}finally{w.value=!1,y.value=""}},J=e.computed(()=>{var k;return g.value||(n==null?void 0:n.backgroundUrl)!==""?{backgroundImage:`url("${(k=n==null?void 0:n.backgroundUrl)==null?void 0:k.replace(/\\/g,"/")}")`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}}),A=k=>pl.getComponent(k),F=k=>{if(!k)return;const y=k.querySelector("input, textarea, .el-input__inner");y&&typeof y.focus=="function"&&y.focus()},L=(k,y,x)=>{n.disabled||(f.value=y,e.nextTick(()=>{F(x.currentTarget)}))},E=()=>{f.value=null},S=k=>{const y=k!=null&&k.width&&k.width>0?k.width:1,O=`calc((100% - ${(y-1)*48}px) / ${y})`;return{flex:`0 0 ${O}`,maxWidth:O,minWidth:"0",boxSizing:"border-box"}};return(k,y)=>{const x=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(J.value),onClick:y[2]||(y[2]=O=>(n==null?void 0:n.backGround)==="Yes"&&N())},[(n==null?void 0:n.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:y[0]||(y[0]=e.withModifiers(O=>N(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:_},null,544),y[3]||(y[3]=e.createElementVNode("img",{src:pl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",_h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(O,I)=>{var W,Y,fe,de,j,U,Z,ee,ge;return e.openBlock(),e.createElementBlock("div",{key:I,class:"static-form-item",style:e.normalizeStyle({...S(O),...u.value.item}),onClick:y[1]||(y[1]=e.withModifiers(()=>{},["stop"]))},[O.label&&!((W=O==null?void 0:O.field)!=null&&W.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(u.value.label)},e.toDisplayString(O.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(u.value.value),onClick:Ie=>{var ue;return(ue=O.field)!=null&&ue.isNoClick?null:L(O,I,Ie)}},[f.value===I&&O.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A(((Y=O.field)==null?void 0:Y.type)??"Input")),{key:0,modelValue:O.field.value,"onUpdate:modelValue":Ie=>O.field.value=Ie,isEdit:!0,disabled:(fe=O.field)==null?void 0:fe.disabled,content:((de=O.field)==null?void 0:de.contents)??[],optionUrl:O.field,originalValue:(j=O.field)==null?void 0:j.value,config:(U=O.field)==null?void 0:U.config,configModel:((Z=O.field)==null?void 0:Z.prop)??((ee=O.field)==null?void 0:ee.name),selectedTagList:((ge=O.field)==null?void 0:ge.selectValue)??[],onBlur:E,onBlurChange:E},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[O.isStatus?(e.openBlock(),e.createBlock(x,{key:0,type:O.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",Eh,e.toDisplayString(O.value??"-"),1))],64))],12,Sh)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(u.value.empty)}," 暂无数据 ",4))],4)}}}),Uc=nr._export_sfc(Ch,[["__scopeId","data-v-01e64c5f"]]),Dh={class:"form-content"},Th={title:"选择标签"},Bh={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Nh={class:"col-operate-wrap"},Ah={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},zh={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:l}){const n=()=>{c.value=!1,u.value=!1,m.value=[]},r=a;e.computed(()=>{var Se;const te=(Se=Ea.value)==null?void 0:Se.split("/");return(te==null?void 0:te.some(we=>(we==null?void 0:we.includes("updateLoading"))||(we==null?void 0:we.includes("loading"))))?!1:Ie.value==="view"});const i=l,o=e.ref(""),f=e.ref([]),c=e.ref(!1),u=e.ref(!1),m=e.ref([]),{getFileExtension:g}=Co.useThreeSystem(),w=e.ref(),d=e.ref(!1),N=e.ref(!1),_=M.useUnit(M.pinia),{chooseTitle:J}=M.storeToRefs(_),A=e.ref([]),F=e.ref(),L=e.ref(!1),E=e.ref([]),S=bc(M.pinia),k=Ot(M.pinia),y=e.ref(!1),x=e.ref(),O=e.ref(),I=e.ref(),W=e.ref(),Y=e.ref(),fe=M.useLoginState(M.pinia),{loginUserInfo:de}=M.storeToRefs(fe),j=e.ref(),U=e.ref(!0),Z=M.useModelComp(M.pinia),{tableViewContents:ee,itemData:ge,isEdit:Ie,routeToChildPath:ue,lockingPage:B,homepageBackgroundTableId:oe,refreshCurrentPageInform:q}=M.storeToRefs(Z),ye=e.ref(null),Ke=e.ref(!1),Ae=e.ref(!1),Qe=M.useMenuState(),{activeMenuPath:Ea}=M.storeToRefs(Qe),ne=le.useOriginalState(M.pinia),{originalPath:ua}=M.storeToRefs(ne),{compType:Pe,hasEditable:Re}=ic.useRole(),Le=()=>!Re(r.config,{type:Pe.FORM});e.computed(()=>Ea.value==="设备管理/试验设备"&&r.compName==="设备概要");const se=async()=>{var Se,we,fa;const te=oe==null?void 0:oe.value,ce=(Se=de==null?void 0:de.value)==null?void 0:Se.plat_id;if(!(!te||!ce))try{const ea=await M.getAllTables({platId:parseInt(ce),tableNames:[`content_${te}`,`struct_${te}`],user_unique_id:"0"}),Ta=((fa=(we=ea==null?void 0:ea.data)==null?void 0:we.result)==null?void 0:fa[0])??[],Ee=String((r==null?void 0:r.index)??""),Me=Ta==null?void 0:Ta.find(Fe=>String(Fe==null?void 0:Fe.relatedForm_id)===Ee);Me!=null&&Me.backgroundImg_url&&(W.value=Me.backgroundImg_url)}catch(ea){console.error("获取首页背景图片表数据失败:",ea)}},me=e.ref([]),qe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ka=async te=>{Ae.value=te,await da("disabled",null,te,!0)},_a=async te=>{await da("operable",null,te,!0)};e.watch(()=>Ea.value,async()=>{f.value=[],m.value=[]},{deep:!0,immediate:!0});const H=()=>{e.nextTick(()=>{ve()})},V=te=>{var ce;f.value=(ce=f.value)==null?void 0:ce.map(Se=>({...Se,isFormColHidden:!(te!=null&&te.includes(Se.label))}))};e.onUnmounted(()=>{ye.value=null});const ae=te=>{i("clickTrigger",te)},pe=async te=>{var ce,Se,we,fa,ea,Ta;if(te===""){let Ee="";(ce=f.value)==null||ce.forEach(he=>{he!=null&&he.isMain&&(Ee=he==null?void 0:he.value)});let Me=await le.getItemData(ue.value,sessionStorage.getItem("systemKey"),"");Ee=((Ta=(ea=(fa=(we=(Se=Me==null?void 0:Me[0])==null?void 0:Se.compData)==null?void 0:we.find(he=>(he==null?void 0:he.key)==="mainRouters"))==null?void 0:fa.contents)==null?void 0:ea[0])==null?void 0:Ta.routerContent)+ua.value+Ee;let $e=await le.getItemData(Ee,sessionStorage.getItem("systemKey"),"");L.value=!0,E.value=$e==null?void 0:$e.filter(he=>(he==null?void 0:he.comp)!=="methodButton"),i("routeUrl",E.value)}},ve=()=>{var ce;const te=(ce=ye.value)==null?void 0:ce.$el;te&&Fl.Sortable.create(te,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Se=>{const{oldIndex:we,newIndex:fa}=Se;if(we===fa)return;const ea=f.value.splice(we,1)[0];f.value.splice(fa,0,ea)}})},da=async(te,ce,Se,we=!1)=>{try{Z.setRefreshCurStructure(!1)}catch{Ja.ElMessage.error("编辑处理失败")}},ca=async(te,ce)=>{await da()},Ue=async(te,ce)=>{te&&await da()},Sa=async(te,ce,Se)=>{await da(ce,Se,te,!1)},Ma=(te,ce)=>{j.value===ce?U.value=!1:U.value=!0,j.value=ce==null?void 0:ce.changeProp},Te=async te=>{var Ta;W.value=te;const ce=r.itemData,Se=ce==null?void 0:ce.find(Ee=>(Ee==null?void 0:Ee.key)==="backGroundImage");Se?Se.contents=te:ce==null||ce.push({key:"backGroundImage",contents:te}),i("change",{key:"backGroundImage",contents:te});const we=oe==null?void 0:oe.value,fa=r==null?void 0:r.index,ea=(Ta=de==null?void 0:de.value)==null?void 0:Ta.plat_id;if(!(!we||!ea||!fa||!te))try{await M.pageBatchAddApi({platId:parseInt(ea),changeContents:[{tableName:`content_${we}`,tableContents:[{backgroundImg_url:te,relatedForm_id:String(fa)}]}],user_unique_id:"0"})}catch(Ee){console.error("保存背景图片记录失败:",Ee),Ja.ElMessage.error("背景图片记录保存失败")}},Fa=async te=>{var Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl;let ce=[];if((Se=te==null?void 0:te.toString())!=null&&Se.includes(".urdf")){if(te.includes(",")){Ja.ElMessage.error("当前版本仅允许单个urdf预览!");return}m.value=[{url:te,extension:g(te)}],u.value=!0,c.value=!0;return}if((we=te==null?void 0:te.toString())!=null&&we.includes(".stl")||(fa=te==null?void 0:te.toString())!=null&&fa.includes(".STL")||(ea=te==null?void 0:te.toString())!=null&&ea.includes(".obj")||(Ta=te==null?void 0:te.toString())!=null&&Ta.includes(".mtl")){const el=((Ee=te==null?void 0:te.toString())==null?void 0:Ee.split(",")).map($l=>({url:$l,extension:g($l)}));m.value=el,u.value=!1,c.value=!0;return}if((Me=te==null?void 0:te.toString())!=null&&Me.includes(".stl")||(Fe=te==null?void 0:te.toString())!=null&&Fe.includes(".STL")||($e=te==null?void 0:te.toString())!=null&&$e.includes(".obj")||(he=te==null?void 0:te.toString())!=null&&he.includes(".mtl")){let jl,el=[],$l={};if(Array.isArray(te)?jl=te:jl=te==null?void 0:te.split(","),jl==null||jl.forEach(Wa=>{Wa.includes(".mtl")?el.push(Wa):$l.blob=$l.blob?$l.blob+","+Wa:Wa}),(el==null?void 0:el.length)>0&&($l.mtlBlobs=el),(El=(tl=Object.values($l))==null?void 0:tl[0])!=null&&El.includes("http:"))ce.push($l);else{const Wa=new Blob([$l.blob],{type:"application/octet-stream;charset=UTF-8"});let Kl=URL.createObjectURL(Wa),Jl="";(Ml=te==null?void 0:te.split("/"))==null||Ml.forEach((ar,xl)=>{var br;xl===((br=te==null?void 0:te.split("/"))==null?void 0:br.length)-1&&(Jl=ar)}),(Hl=$l.blob)!=null&&Hl.includes(".stl")&&(Jl=(Jl==null?void 0:Jl.replaceAll(">",""))+".urdf"),F.value=[{name:Jl,blobUrl:Kl}],N.value=!0}}else{const jl=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),el=await Ja.axios.get(te,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{jl.close()}),$l=new Blob([el.data],{type:"application/octet-stream;charset=UTF-8"});let Wa=URL.createObjectURL($l),Kl="";(Bl=te==null?void 0:te.split("/"))==null||Bl.forEach((Jl,ar)=>{var xl;ar===((xl=te==null?void 0:te.split("/"))==null?void 0:xl.length)-1&&(Kl=Jl)}),F.value=[{name:Kl,blobUrl:Wa}],N.value=!0}(ce==null?void 0:ce.length)>0&&k.setBlobUrls(ce)},Na=()=>{N.value=!1},oa=te=>{var ea,Ta,Ee,Me;const ce=(Ta=(ea=pl.safeClone(r.itemData))==null?void 0:ea.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:Ta.contents,Se=pl.safeClone(te.content);let we={};Se&&((Ee=Object.values(Se))==null?void 0:Ee.length)>0&&((Me=Object.values(Se))==null||Me.forEach((Fe,$e)=>{we[ce[$e].key]=Fe}));const fa={content:we,index:r==null?void 0:r.index,buttonName:te==null?void 0:te.buttonName};i("change",fa)};e.computed(()=>"http://222.92.178.198:62001");const ja=async te=>{var tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl;if(!te)return;(El=(tl=r==null?void 0:r.itemData)==null?void 0:tl.find(ha=>(ha==null?void 0:ha.key)==="parentFormPath"))==null||El.contents;let ce=ee.value;(ce==null?void 0:ce.length)>0&&(ce=ce==null?void 0:ce.map(ha=>{var ra,Ga,wl,De;let Ha=(ra=ha==null?void 0:ha.key)==null?void 0:ra.split("/");return(r==null?void 0:r.compName)===(Ha==null?void 0:Ha[0])&&(Ga=f.value)!=null&&Ga.find(ia=>(ia==null?void 0:ia.prop)===(Ha==null?void 0:Ha[1]))&&(ha.value=(De=(wl=f.value)==null?void 0:wl.find(ia=>(ia==null?void 0:ia.prop)===(Ha==null?void 0:Ha[1])))==null?void 0:De.value),ha}),Z.setTableViewContents(ce));const Se=pl.safeClone(r.itemData);let we=Se==null?void 0:Se.map(ha=>{var Ha;return(ha==null?void 0:ha.key)==="formContent"&&((Ha=ha.contents)==null||Ha.map((ra,Ga)=>{var wl,De,ia,Pa,Be,La,al,bl,Tl,Oe,ma,ta,xa,ga,fl,Ve,ml,Ne,Pl,Da,ul;return ra.type=(De=(wl=f.value)==null?void 0:wl.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:De.type,ra.options=ra!=null&&ra.options?ra.options:((Be=(Pa=(ia=ra==null?void 0:ra.key)==null?void 0:ia.split("$"))==null?void 0:Pa[1])==null?void 0:Be.length)>0?(Tl=(bl=Qu((al=(La=ra==null?void 0:ra.key)==null?void 0:La.split("$"))==null?void 0:al[1]))==null?void 0:bl.split(","))==null?void 0:Tl.map(Za=>({label:Za,value:Za})):[],(Oe=ra==null?void 0:ra.key)!=null&&Oe.includes("$")&&(ra.key=(ta=(ma=ra==null?void 0:ra.key)==null?void 0:ma.split("$"))==null?void 0:ta[0]),ra.signature=(ga=(xa=f.value)==null?void 0:xa.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:ga.signature,ra.isLoginUser=(Ve=(fl=f.value)==null?void 0:fl.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:Ve.isLoginUser,ra.value=(ml=Object.values(te))==null?void 0:ml[Ga],ra.isFormColHidden=(Pl=(Ne=f.value)==null?void 0:Ne.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:Pl.isFormColHidden,ra.isHideInForm=(ul=(Da=f.value)==null?void 0:Da.find(Za=>(Za==null?void 0:Za.prop)===(ra==null?void 0:ra.prop)))==null?void 0:ul.isHideInForm,ra})),ha}),fa=f.value,ea=(Hl=(Ml=pl.safeClone(we))==null?void 0:Ml.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:Hl.contents;if(fa=fa==null?void 0:fa.map(ha=>{var Ha,ra;return(ha==null?void 0:ha.type)==="Select"&&((Ha=ha==null?void 0:ha.allSelectionContents)==null?void 0:Ha.length)>0&&(ha.contactValue=te),ha.value=(ra=ea==null?void 0:ea.find((Ga,wl)=>((Ga==null?void 0:Ga.id)??wl)===(ha==null?void 0:ha.id)))==null?void 0:ra.value,ha}),!U.value){i("contentChange",{contents:we,index:r.index});return}let Ta="",Ee=(el=(jl=(Bl=pl.safeClone(we))==null?void 0:Bl.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:jl.contents)==null?void 0:el.find((ha,Ha)=>{var ra,Ga,wl;return(ha==null?void 0:ha.label)===j.value||Ha.toString()===((wl=(Ga=(ra=j.value)==null?void 0:ra.split("t"))==null?void 0:Ga[1])==null?void 0:wl.toString())}),Me=($l=Ee==null?void 0:Ee.optionUrl)==null?void 0:$l.menuSelect,Fe=!0;if((Jl=(Kl=(Wa=pl.safeClone(we))==null?void 0:Wa.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:Kl.contents)==null||Jl.forEach(ha=>{var Ha,ra,Ga,wl,De,ia;Fe&&((Ga=(ra=(Ha=ha==null?void 0:ha.optionUrl)==null?void 0:Ha.groupSelect)==null?void 0:ra[1])!=null&&Ga.includes("["))&&(Ta=(De=(wl=ha==null?void 0:ha.optionUrl)==null?void 0:wl.groupSelect)==null?void 0:De[1],JSON.stringify(Me)===JSON.stringify((ia=ha==null?void 0:ha.optionUrl)==null?void 0:ia.menuSelect)&&(Fe=!1))}),(ar=Ee==null?void 0:Ee.optionUrl)!=null&&ar.menuSelect&&U.value){let ha=await Ct(Ee),Ha,ra=(xl=Ee==null?void 0:Ee.optionUrl)==null?void 0:xl.menuSelect;if(ha==null||ha.forEach(Ga=>{var wl,De,ia,Pa,Be,La,al,bl,Tl,Oe;Ta===((De=(wl=Ee==null?void 0:Ee.optionUrl)==null?void 0:wl.groupSelect)==null?void 0:De[1])&&((Be=(Pa=(ia=Ee==null?void 0:Ee.optionUrl)==null?void 0:ia.groupSelect)==null?void 0:Pa[1])!=null&&Be.includes("["))&&((Oe=pl.safeClone(Ga))==null?void 0:Oe[(Tl=(bl=(al=(La=Ee==null?void 0:Ee.optionUrl)==null?void 0:La.groupSelect)==null?void 0:al[1])==null?void 0:bl.replaceAll("[",""))==null?void 0:Tl.replaceAll("]","")])===(Ee==null?void 0:Ee.value)&&(Ha=Ga)}),Ha){let Ga=pl.safeClone(fa);Ga=Ga==null?void 0:Ga.map(De=>{var ia,Pa,Be,La,al,bl,Tl,Oe,ma,ta,xa;return(Ha!=null&&Ha[De==null?void 0:De.label]||Ha!=null&&Ha[(La=(Be=(Pa=(ia=De==null?void 0:De.optionUrl)==null?void 0:ia.groupSelect)==null?void 0:Pa[1])==null?void 0:Be.replaceAll("[",""))==null?void 0:La.replaceAll("]","")])&&((Tl=(bl=(al=De==null?void 0:De.optionUrl)==null?void 0:al.groupSelect)==null?void 0:bl[1])!=null&&Tl.includes("["))&&ra!=null&&ra.every(ga=>{var fl,Ve;return(Ve=(fl=De==null?void 0:De.optionUrl)==null?void 0:fl.menuSelect)==null?void 0:Ve.includes(ga)})&&(De.value=(Ha==null?void 0:Ha[De==null?void 0:De.label])||(Ha==null?void 0:Ha[(xa=(ta=(ma=(Oe=De==null?void 0:De.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:ma[1])==null?void 0:ta.replaceAll("[",""))==null?void 0:xa.replaceAll("]","")]),Array.isArray(De.value)&&De.value.every(ga=>(ga==null?void 0:ga.url)&&(ga==null?void 0:ga.name))&&(De.type="Upload")),De}),Ga=Ga==null?void 0:Ga.map(De=>{var ia,Pa,Be;return(ia=De==null?void 0:De.optionUrl)!=null&&ia.oldMenuSelect&&(De.optionUrl.menuSelect=(Be=(Pa=pl.safeClone(De))==null?void 0:Pa.optionUrl)==null?void 0:Be.oldMenuSelect),De}),f.value=pl.safeClone(Ga);let wl=pl.safeClone(Ga);wl=wl==null?void 0:wl.map(De=>{var ia,Pa,Be,La,al,bl;return(Pa=(ia=De==null?void 0:De.optionUrl)==null?void 0:ia.menuSelect)!=null&&Pa.some(Tl=>Tl==null?void 0:Tl.includes("["))&&(De.optionUrl.oldMenuSelect=(La=(Be=pl.safeClone(De))==null?void 0:Be.optionUrl)==null?void 0:La.menuSelect,De.optionUrl.menuSelect=(bl=(al=De==null?void 0:De.optionUrl)==null?void 0:al.menuSelect)==null?void 0:bl.map(Tl=>{var Oe,ma,ta,xa;if(Tl!=null&&Tl.includes("[")){let ga=(ma=(Oe=Tl==null?void 0:Tl.replaceAll("[","").replaceAll("]",""))==null?void 0:Oe.split(":"))==null?void 0:ma[1];Tl=(xa=(ta=pl.safeClone(Ga))==null?void 0:ta.find(fl=>(fl==null?void 0:fl.label)===ga))==null?void 0:xa.value}return Tl})),De}),f.value=wl}else f.value=fa;we=we==null?void 0:we.map(Ga=>{var wl;return(Ga==null?void 0:Ga.key)==="formContent"&&(Ga.contents=(wl=Ga.contents)==null?void 0:wl.map(De=>{var ia,Pa,Be,La;return De.value=((Pa=(ia=f.value)==null?void 0:ia.find(al=>(al==null?void 0:al.label)===(De==null?void 0:De.key)))==null?void 0:Pa.value)??(De==null?void 0:De.value),De.type=((La=(Be=f.value)==null?void 0:Be.find(al=>(al==null?void 0:al.prop)===(De==null?void 0:De.key)))==null?void 0:La.type)??(De==null?void 0:De.type),De})),Ga})}U.value=!1,i("contentChange",{contents:we,index:r.index});let $e=[],he=[];if((ya=pl.safeClone((br=we==null?void 0:we.find(ha=>(ha==null?void 0:ha.key)==="formContent"))==null?void 0:br.contents))==null||ya.forEach(ha=>{var Ha;Array.isArray(ha==null?void 0:ha.value)&&((Ha=ha==null?void 0:ha.value)!=null&&Ha.find(ra=>{var Ga;return(Ga=ra==null?void 0:ra.url)==null?void 0:Ga.includes(".obj")}))&&(he=ha==null?void 0:ha.value)}),(he==null?void 0:he.length)>0){const ha=(sl=pl.safeClone(he))==null?void 0:sl.filter(Ha=>{var ra;return(ra=Ha==null?void 0:Ha.url)==null?void 0:ra.includes(".obj")});ha==null||ha.forEach(Ha=>{var Ga,wl,De,ia;const ra=(Ga=he==null?void 0:he.filter(Pa=>{var Be;return(Pa==null?void 0:Pa.name)===(Ha==null?void 0:Ha.name)&&((Be=Pa==null?void 0:Pa.url)==null?void 0:Be.includes(".mtl"))}))==null?void 0:Ga.map(Pa=>Pa==null?void 0:Pa.url);$e.push({objUrl:Ha==null?void 0:Ha.url,mtlUrls:((wl=he==null?void 0:he.filter(Pa=>{var Be;return(Pa==null?void 0:Pa.name)===(Ha==null?void 0:Ha.name)&&((Be=Pa==null?void 0:Pa.url)==null?void 0:Be.includes(".mtl"))}))==null?void 0:wl.length)===1?(ia=(De=he==null?void 0:he.filter(Pa=>{var Be;return(Pa==null?void 0:Pa.name)===(Ha==null?void 0:Ha.name)&&((Be=Pa==null?void 0:Pa.url)==null?void 0:Be.includes(".mtl"))}))==null?void 0:De[0])==null?void 0:ia.url:ra})}),k.setObjUrl($e)}},aa=(te,ce,Se)=>{let we="";const fa=ce==null?void 0:ce.map(ea=>{var Ta;return(Ta=ea==null?void 0:ea.value)==null?void 0:Ta.pageData});return fa==null||fa.forEach(ea=>{var Ta;(ea==null?void 0:ea.name)===(te==null?void 0:te[0])&&((Ta=ea==null?void 0:ea.compData)==null||Ta.forEach(Ee=>{var Me;(Ee==null?void 0:Ee.key)==="formContent"&&((Me=Ee==null?void 0:Ee.contents)==null||Me.forEach(Fe=>{var $e;(Fe==null?void 0:Fe.prop)===(te==null?void 0:te[1])&&(we=(Fe==null?void 0:Fe.value)===""?le.judgeContents(($e=pl.safeClone(Fe))==null?void 0:$e.optionUrl,Se):Fe==null?void 0:Fe.value)}))}))}),we},je=(te,ce,Se,we)=>{var Ee,Me;let fa="",ea="";(Ee=pl.safeClone(ce))==null||Ee.forEach((Fe,$e)=>{Fe!=null&&Fe.includes("[")?ea=ea+ua.value+te[$e]:ea=ea===""?ea+Fe:ea+"/"+Fe});let Ta=(Me=we[ea])==null?void 0:Me.map(Fe=>{var $e;return($e=Fe==null?void 0:Fe.value)==null?void 0:$e.pageData});return Ta==null||Ta.forEach(Fe=>{var $e;(Fe==null?void 0:Fe.name)===(Se==null?void 0:Se[0])&&(($e=Fe==null?void 0:Fe.compData)==null||$e.forEach(he=>{var tl;(he==null?void 0:he.key)==="formContent"&&((tl=he==null?void 0:he.contents)==null||tl.forEach(El=>{(El==null?void 0:El.prop)===(Se==null?void 0:Se[1])&&(fa=El==null?void 0:El.value)}))}))}),fa};e.watch(()=>oe==null?void 0:oe.value,async()=>{await se()},{immediate:!0});const pa=async te=>await hf(te,"Auto");return e.watch(()=>q.value,async()=>{var te;(te=f.value)!=null&&te.some(ce=>(ce==null?void 0:ce.functionName)&&(ce==null?void 0:ce.functionName)!=="")&&(f.value=await pa(f.value))},{immediate:!0,deep:!0}),e.watch(()=>r.itemData,async()=>{var El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl,ha,Ha,ra,Ga,wl,De,ia,Pa,Be,La,al,bl,Tl;const te=(El=r.itemData)==null?void 0:El.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent");let ce=(Ml=r.itemData)==null?void 0:Ml.find(Oe=>(Oe==null?void 0:Oe.key)==="backGround");ce&&((Hl=ce==null?void 0:ce.contents)==null?void 0:Hl.length)>0&&(o.value=((jl=(Bl=ce==null?void 0:ce.contents)==null?void 0:Bl[0])==null?void 0:jl.url)??"");const Se=(el=pl.safeClone(r.itemData))==null?void 0:el.find(Oe=>(Oe==null?void 0:Oe.key)==="formButton"),we=($l=pl.safeClone(r.itemData))==null?void 0:$l.find(Oe=>(Oe==null?void 0:Oe.key)==="formFlex"),fa=(Wa=pl.safeClone(r.itemData))==null?void 0:Wa.find(Oe=>(Oe==null?void 0:Oe.key)==="formWrap"),ea=(Kl=pl.safeClone(r.itemData))==null?void 0:Kl.find(Oe=>(Oe==null?void 0:Oe.key)==="enableWrap"),Ta=(Jl=pl.safeClone(r.itemData))==null?void 0:Jl.find(Oe=>(Oe==null?void 0:Oe.key)==="textSize"),Ee=(ar=pl.safeClone(r.itemData))==null?void 0:ar.find(Oe=>(Oe==null?void 0:Oe.key)==="textRGBA"),Me=(xl=pl.safeClone(r.itemData))==null?void 0:xl.find(Oe=>(Oe==null?void 0:Oe.key)==="backGround"),Fe=(br=pl.safeClone(r.itemData))==null?void 0:br.find(Oe=>(Oe==null?void 0:Oe.key)==="backGroundImage");(fa==null?void 0:fa.contents)==="纵向"?d.value=!1:d.value=!0;const $e=Number(Ta==null?void 0:Ta.contents);x.value=Number.isNaN($e)?void 0:$e,O.value=Ee==null?void 0:Ee.contents,I.value=Me==null?void 0:Me.contents,W.value=Fe==null?void 0:Fe.contents;const he=ea==null?void 0:ea.contents;if(he===void 0?y.value=fi.BLOCK:typeof he=="boolean"?y.value=he?fi.ORDINARY:fi.BLOCK:y.value=he,Y.value=typeof(we==null?void 0:we.contents)!="boolean"?!(!(we!=null&&we.contents)===""||((ya=we==null?void 0:we.contents)==null?void 0:ya.toUpperCase())==="VERTICAL"):we==null?void 0:we.contents,((sl=te==null?void 0:te.contents)==null?void 0:sl.length)>0&&Array.isArray(te==null?void 0:te.contents)){let Oe=r.allMapContents;const ma=(Ha=(ha=pl.safeClone(te))==null?void 0:ha.contents)==null?void 0:Ha.map((Ne,Pl)=>{var rr,en,Gr,or,Cr,an,Wl,tr,kr,Lr,Il,ln,sr;let Da=(Ne==null?void 0:Ne.label)??(Ne==null?void 0:Ne.key)??"";Ne==null||Ne.type;let ul=(Ne==null?void 0:Ne.options)??[];if((rr=Ne==null?void 0:Ne.key)!=null&&rr.includes("$")&&(Da=(en=pl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:en[0],((or=(Gr=pl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:Gr[1])==null?void 0:or.length)>0)){const[_r,Mr]=(an=(Cr=pl.safeClone(Ne==null?void 0:Ne.key).split("$"))==null?void 0:Cr[1])==null?void 0:an.split(/[()]/);(Wl=le.FormType.find(Br=>(Br==null?void 0:Br.key)===_r))==null||Wl.value,((tr=Mr==null?void 0:Mr.split(","))==null?void 0:tr.length)>0&&(ul=(kr=Mr==null?void 0:Mr.split(","))==null?void 0:kr.map(Br=>({label:Br,value:Br})))}let Za=Ne==null?void 0:Ne.options;((Lr=Ne==null?void 0:Ne.optionUrl)==null?void 0:Lr.selectRelateType)==="自定义绑定"&&(Za=(ln=(Il=Ne==null?void 0:Ne.optionUrl)==null?void 0:Il.defaultSelect)==null?void 0:ln.map(_r=>({label:_r,value:_r})));let Nl=(Ne==null?void 0:Ne.menuPath)??[],Ba=(Ne==null?void 0:Ne.groups)??[],Rl=(Ne==null?void 0:Ne.columns)??[],Er=!1,tn=(Ne==null?void 0:Ne.isFormColHidden)??!1,Fr="",ir=Ne!=null&&Ne.value?Ne.value:(Za==null?void 0:Za.length)>0?(sr=Za==null?void 0:Za[0])==null?void 0:sr.value:(Ne==null?void 0:Ne.value)??"",Ur=!1,Zr="Input";return((Za==null?void 0:Za.length)>0||(Nl==null?void 0:Nl.length)>0)&&(Zr="Select"),(Array.isArray(Fr)&&(Fr!=null&&Fr.every(_r=>(_r==null?void 0:_r.name)&&(_r==null?void 0:_r.url)))||Array.isArray(ir)&&(ir!=null&&ir.every(_r=>(_r==null?void 0:_r.name)&&(_r==null?void 0:_r.url))))&&(Zr="upload"),Ne!=null&&Ne.isMainUrl&&(Zr="Url"),{label:Da??"",name:Da??"t"+Pl,prop:Da??pl.safeClone(Ne==null?void 0:Ne.key),type:(Ne==null?void 0:Ne.type)??Zr,value:(Ne==null?void 0:Ne.type)==="Date"&&ir===""?new Date:ir,id:(Ne==null?void 0:Ne.id)??Pl,contents:(Za==null?void 0:Za.length)>0?Za:ul??[],width:(Ne==null?void 0:Ne.width)??1,isLoginUser:Er,config:Ne==null?void 0:Ne.config,optionUrl:(Ne==null?void 0:Ne.optionUrl)??Ne,isFormColHidden:tn,isHideInForm:(Ne==null?void 0:Ne.isHideInForm)??!1,signature:Ur,isMain:Ne==null?void 0:Ne.isMain,required:(Ne==null?void 0:Ne.required)??!1,isMainUrl:Ne==null?void 0:Ne.isMainUrl,operable:(Ne==null?void 0:Ne.operable)??!1,disabled:(Ne==null?void 0:Ne.disabled)??!1,isSync:Ne==null?void 0:Ne.isSync,menus:Nl,groups:Ba,words:Rl,allSelectionContents:Ne==null?void 0:Ne.allContents,filterContent:Ne==null?void 0:Ne.filterContents,isNoClick:(Ne==null?void 0:Ne.isNoClick)??!1,functionName:Ne==null?void 0:Ne.functionName,functionRelatedWords:Ne==null?void 0:Ne.functionRelatedWords,calculatorFilter:Ne==null?void 0:Ne.calculatorFilter,filters:Ne==null?void 0:Ne.filters}}),ta=ma==null?void 0:ma.map(Ne=>Ne==null?void 0:Ne.value);let xa="";ta==null||ta.forEach(Ne=>{Ne!==""&&Ne!==void 0&&(xa=xa===""?Ne:xa+"/"+Ne)}),S.setSelectArray(ta),S.setSelectString(xa);let ga=(ra=pl.safeClone(ma))==null?void 0:ra.map(Ne=>(Ne!=null&&Ne.value&&le.IsJson(Ne==null?void 0:Ne.value)&&Array.isArray(JSON.parse(Ne==null?void 0:Ne.value))&&(Ne.value=JSON.parse(Ne.value)),Ne)),fl={};ga==null||ga.forEach(Ne=>{fl[Ne.label]=Ne==null?void 0:Ne.value}),ga=ga==null?void 0:ga.map(Ne=>{var Pl,Da,ul,Za,Nl,Ba,Rl,Er,tn;if((Ne==null?void 0:Ne.type)==="Select"&&((Pl=Ne==null?void 0:Ne.allSelectionContents)==null?void 0:Pl.length)>0&&(Ne.contactValue=fl),(ul=(Da=Ne==null?void 0:Ne.optionUrl)==null?void 0:Da.menuSelect)!=null&&ul.some(Fr=>Fr==null?void 0:Fr.includes("["))){let Fr="";Ne.optionUrl.oldMenuSelect=(Nl=(Za=pl.safeClone(Ne))==null?void 0:Za.optionUrl)==null?void 0:Nl.menuSelect,Ne.optionUrl.menuSelect=(Rl=(Ba=Ne==null?void 0:Ne.optionUrl)==null?void 0:Ba.menuSelect)==null?void 0:Rl.map(ir=>{var Ur,Zr,Or,rr,en,Gr;if(ir!=null&&ir.includes("[")){let or=(Zr=(Ur=ir==null?void 0:ir.replaceAll("[","").replaceAll("]",""))==null?void 0:Ur.split(":"))==null?void 0:Zr[1];Fr=aa((Or=ir==null?void 0:ir.replaceAll("[","").replaceAll("]",""))==null?void 0:Or.split(":"),Oe==null?void 0:Oe[Ea.value],Oe),ir=((en=(rr=pl.safeClone(ga))==null?void 0:rr.find(Cr=>(Cr==null?void 0:Cr.label)===or))==null?void 0:en.value)||aa((Gr=ir==null?void 0:ir.replaceAll("[","").replaceAll("]",""))==null?void 0:Gr.split(":"),Oe==null?void 0:Oe[Ea.value],Oe)}return ir}),Fr!==""&&Ne.value===""&&(Ne.value=je(Ne.optionUrl.menuSelect,Ne.optionUrl.oldMenuSelect,(Er=Ne==null?void 0:Ne.optionUrl)==null?void 0:Er.groupSelect,Oe),Array.isArray(Ne.value)&&((tn=Ne.value)!=null&&tn.every(ir=>ir==null?void 0:ir.url))&&(Ne.type="UPLOAD"))}return Ne}),f.value=ga,Ae.value=((Ga=f.value)==null?void 0:Ga.every(Ne=>Ne==null?void 0:Ne.disabled))||B.value===Ea.value,Ke.value=(wl=f.value)==null?void 0:wl.every(Ne=>Ne==null?void 0:Ne.operable),me.value=(De=f.value)==null?void 0:De.map(Ne=>Ne==null?void 0:Ne.label);let Ve=[],ml=[];if((ia=pl.safeClone(f.value))==null||ia.forEach(Ne=>{var Pl;Array.isArray(Ne==null?void 0:Ne.value)&&((Pl=Ne==null?void 0:Ne.value)!=null&&Pl.find(Da=>{var ul;return(ul=Da==null?void 0:Da.url)==null?void 0:ul.includes(".obj")}))&&(ml=Ne==null?void 0:Ne.value)}),(ml==null?void 0:ml.length)>0){const Ne=(Pa=pl.safeClone(ml))==null?void 0:Pa.filter(Pl=>{var Da;return(Da=Pl==null?void 0:Pl.url)==null?void 0:Da.includes(".obj")});Ne==null||Ne.forEach(Pl=>{var ul,Za,Nl,Ba;const Da=(ul=ml==null?void 0:ml.filter(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Pl==null?void 0:Pl.name)&&((Er=Rl==null?void 0:Rl.url)==null?void 0:Er.includes(".mtl"))}))==null?void 0:ul.map(Rl=>Rl==null?void 0:Rl.url);Ve.push({objUrl:Pl==null?void 0:Pl.url,mtlUrls:((Za=ml==null?void 0:ml.filter(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Pl==null?void 0:Pl.name)&&((Er=Rl==null?void 0:Rl.url)==null?void 0:Er.includes(".mtl"))}))==null?void 0:Za.length)===1?(Ba=(Nl=ml==null?void 0:ml.filter(Rl=>{var Er;return(Rl==null?void 0:Rl.name)===(Pl==null?void 0:Pl.name)&&((Er=Rl==null?void 0:Rl.url)==null?void 0:Er.includes(".mtl"))}))==null?void 0:Nl[0])==null?void 0:Ba.url:Da})}),k.setObjUrl(Ve)}(Be=pl.safeClone(f.value))==null||Be.forEach(Ne=>{var Pl,Da,ul,Za,Nl,Ba,Rl,Er,tn,Fr,ir,Ur,Zr;if((Da=(Pl=Ne==null?void 0:Ne.value)==null?void 0:Pl.toString())!=null&&Da.includes(".stl")||(Za=(ul=Ne==null?void 0:Ne.value)==null?void 0:ul.toString())!=null&&Za.includes(".STL")||(Ba=(Nl=Ne==null?void 0:Ne.value)==null?void 0:Nl.toString())!=null&&Ba.includes(".obj")||(Er=(Rl=Ne==null?void 0:Ne.value)==null?void 0:Rl.toString())!=null&&Er.includes(".mtl")||(Fr=(tn=Ne==null?void 0:Ne.value)==null?void 0:tn.toString())!=null&&Fr.includes(".urdf")){let Or={},rr=[],en;Array.isArray(Ne==null?void 0:Ne.value)?en=Ne==null?void 0:Ne.value:en=(ir=Ne==null?void 0:Ne.value)==null?void 0:ir.split(","),en==null||en.forEach(Gr=>{Gr.includes(".mtl")?rr.push(Gr):Or.blob=Or.blob==="undefined"?Gr:Or.blob+","+Gr}),(rr==null?void 0:rr.length)>0&&(Or.mtlBlobs=rr),(Zr=(Ur=Object.values(Or))==null?void 0:Ur[0])!=null&&Zr.includes("http:")}})}else f.value=[];let tl=ee.value;if((tl==null?void 0:tl.length)>0&&(tl=tl==null?void 0:tl.map(Oe=>{var ta,xa,ga,fl;let ma=(ta=Oe==null?void 0:Oe.key)==null?void 0:ta.split("/");return(r==null?void 0:r.compName)===(ma==null?void 0:ma[0])&&(xa=f.value)!=null&&xa.find(Ve=>(Ve==null?void 0:Ve.prop)===(ma==null?void 0:ma[1]))&&(Oe.value=(fl=(ga=f.value)==null?void 0:ga.find(Ve=>(Ve==null?void 0:Ve.prop)===(ma==null?void 0:ma[1])))==null?void 0:fl.value),Oe}),Z.setTableViewContents(tl)),r!=null&&r.formRules)w.value=r==null?void 0:r.formRules;else{let Oe={};(La=pl.safeClone(f).value)==null||La.forEach(ma=>{((ma==null?void 0:ma.isMain)===!0||(ma==null?void 0:ma.required)===!0)&&(Oe[(ma==null?void 0:ma.prop)??(ma==null?void 0:ma.name)]=[{required:!0,message:`${(ma==null?void 0:ma.label)||(ma==null?void 0:ma.prop)||(ma==null?void 0:ma.name)}不能为空`}])}),w.value=Oe}if(((al=Se==null?void 0:Se.contents)==null?void 0:al.length)>0){const Oe=[];(bl=Se==null?void 0:Se.contents)==null||bl.forEach((ma,ta)=>{(ma==null?void 0:ma.label)!==""&&Oe.push({label:(ma==null?void 0:ma.label)??"",id:(ma==null?void 0:ma.id)??ta,type:(ma==null?void 0:ma.type)??"",background:ma==null?void 0:ma.background})}),A.value=Oe}else A.value=[];(Tl=f.value)!=null&&Tl.some(Oe=>(Oe==null?void 0:Oe.functionName)&&(Oe==null?void 0:Oe.functionName)!=="")&&(f.value=await pa(f.value))},{deep:!0,immediate:!0}),e.watch(()=>B.value,te=>{Ae.value=te===Ea.value},{immediate:!0}),(te,ce)=>{var Ee;const Se=e.resolveComponent("svg-icon"),we=e.resolveComponent("el-switch"),fa=e.resolveComponent("el-checkbox"),ea=e.resolveComponent("el-popover"),Ta=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Dh,[y.value===e.unref(fi).TEXT?(e.openBlock(),e.createBlock(Uc,{key:0,itemData:a.itemData,compName:a.compName,fields:f.value,textSize:x.value,textColor:O.value,backGround:I.value,backGroundImage:W.value,disabled:Ae.value||Le(),"onUpdate:backGroundImage":Te,backgroundUrl:o.value},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):y.value===e.unref(fi).BLOCK?(e.openBlock(),e.createBlock(i0,{key:1,items:(Ee=f.value)==null?void 0:Ee.map(Me=>({label:Me!=null&&Me.isHideInForm?"":Me==null?void 0:Me.label,value:Me==null?void 0:Me.value,width:(Me==null?void 0:Me.width)??1,field:Me,filters:Me==null?void 0:Me.filters})),textSize:x.value,textColor:O.value,backGround:I.value,backGroundImage:W.value,disabled:Ae.value||Le(),"onUpdate:backGroundImage":Te,backgroundUrl:o.value},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled","backgroundUrl"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":y.value===e.unref(fi).ORDINARY})},[e.createVNode(pl.ssForm,{rowContents:f.value,formRules:w.value,buttonValue:A.value,isRowFlex:!1,isEnableWrap:!0,textSize:x.value,textColor:O.value,backGround:I.value,backGroundImage:W.value,onOnButtonClick:oa,onChange:ja,formDisabled:Ae.value||Le(),formLabelsOperable:Ke.value,isButtonRow:d.value,onPreview:Fa,onBlurChange:Ma,style:e.normalizeStyle({backGroundImage:o.value!==""?`url("${o.value}")`:void 0}),onHandleColEditChange:ca,onHandleColTypeChange:Ue,onRouteUrl:pe,onClickTrigger:ae,"onUpdate:backGroundImage":Te},{operateCol:e.withCtx(({renderColumns:Me,formDisabled:Fe,formLabelsOperable:$e})=>[e.createVNode(ea,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:H},{reference:e.withCtx(()=>[e.createElementVNode("span",Th,[e.createVNode(Se,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Bh,[ce[1]||(ce[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(we,{"model-value":Fe,"active-text":"禁用","inactive-text":"",onChange:ka,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(we,{"model-value":$e,"active-text":"编辑所有标签","inactive-text":"",onChange:_a},null,8,["model-value"]),ce[2]||(ce[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(Ta,{modelValue:me.value,"onUpdate:modelValue":ce[0]||(ce[0]=he=>me.value=he),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ye,onChange:V},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Me,he=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:he.label},[e.createVNode(fa,{value:he.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(he.label),1)]),_:2},1032,["value"]),e.createVNode(ea,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(Se,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var tl;return[e.createElementVNode("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((tl=Object.keys(he))==null?void 0:tl.filter(El=>{var Ml;return(Ml=qe.value)==null?void 0:Ml.find(Hl=>(Hl==null?void 0:Hl.value)===El)}),El=>{var Ml,Hl;return e.openBlock(),e.createElementBlock("div",{key:El},[e.createVNode(pl._sfc_main$1,{value:he==null?void 0:he[El],"active-text":(Hl=(Ml=qe.value)==null?void 0:Ml.find(Bl=>(Bl==null?void 0:Bl.value)===El))==null?void 0:Hl.label,inactiveText:"",onChange:Bl=>Sa(Bl,El,he)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ah,[e.createVNode(Se,{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)),N.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:3,fileDataList:F.value,onDestroy:Na},null,8,["fileDataList"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(Ir.ssDialog,{key:4,visible:c.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Co.ThreeViewerHost,{files:m.value,onGetAnimationData:te.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},As=nr._export_sfc(zh,[["__scopeId","data-v-4e9ba5aa"]]),Mh={class:"table-header-child"},Ih={class:"table-header-child-main"},Oh={class:"table-header-child-content"},Lh={class:"table-header-child-content-item"},Rh={class:"fix-button"},$h={key:0},Vh={class:"form-content"},Fh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),o=e.ref(""),f=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(f);e.ref(0);const u=e.ref(""),m=e.ref([]),g=e.ref([]),w=E=>{var k;i.value=!0;let S=[];gr==null||gr.forEach(y=>{let x=M.cloneDeep(c.value)+1;f.setTableIndex(x),S.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:E[y.key],id:c.value,contents:y==null?void 0:y.options})}),E!=null&&E.children&&((k=E==null?void 0:E.children)==null?void 0:k.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=>{r("fixChange",M.cloneDeep(E))},N=E=>{r("deleteChange",M.cloneDeep(E))},_=E=>{i.value=!0;let S=[];gr==null||gr.forEach(k=>{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),S.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:c.value,contents:k==null?void 0:k.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},J=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(k=>(k.children||(k.value=E==null?void 0:E[k.name]),k)),g.value=S},A=()=>{var S,k;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(y=>{const x=gr==null?void 0:gr.find(O=>(O==null?void 0:O.label)===(y==null?void 0:y.label));x?E[x.key]=y.value:y!=null&&y.children&&y.children.length>0&&(E.children=y.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),E.id="id"+c.value,(k=m.value)==null||k.forEach(x=>{const O=gr==null?void 0:gr.find(I=>(I==null?void 0:I.label)===(x==null?void 0:x.label));O?E[O.key]=x.value:x!=null&&x.children&&x.children.length>0&&(E.children=x.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},F=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},L=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(y,x)=>(e.openBlock(),e.createElementBlock("div",Ih,[e.createElementVNode("div",Oh,[e.createElementVNode("div",Lh,e.toDisplayString(y.label),1),e.createElementVNode("div",Rh,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:O=>_(y)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:O=>w(y)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:O=>L(y)},null,8,["onClick"])])]),y!=null&&y.children&&y.children.length>0?(e.openBlock(),e.createElementBlock("div",$h,[e.createVNode(qc,{tableChildContents:y==null?void 0:y.children,onDeleteChange:N,onFixChange:d},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Ir.ssDialog,{visible:i.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vh,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:J},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:F,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:A},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ph=nr._export_sfc(Fh,[["__scopeId","data-v-e0fef72d"]]),jh={class:"table-header-child"},Hh={class:"table-header-child-main"},Uh={class:"table-header-child-content"},qh={class:"table-header-child-content-item"},Wh={class:"fix-button"},Gh={key:0},Kh={class:"form-content"},Yh={class:"dialog-footer"},Jh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),o=e.ref(""),f=le.useTableComp(M.pinia),{tableIndex:c}=M.storeToRefs(f),u=e.ref(""),m=e.ref([]),g=e.ref([]),w=E=>{r("fixChange",M.cloneDeep(E))},d=E=>{var k;i.value=!0;let S=[];gr==null||gr.forEach(y=>{let x=M.cloneDeep(c.value)+1;f.setTableIndex(x),S.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:E[y.key],id:c.value,contents:y==null?void 0:y.options})}),E!=null&&E.children&&((k=E==null?void 0:E.children)==null?void 0:k.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},N=E=>{i.value=!0;let S=[];gr==null||gr.forEach(k=>{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),S.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:"",id:c.value,contents:k==null?void 0:k.options})}),o.value=E==null?void 0:E.id,m.value=S,g.value=S},_=E=>{let S=M.cloneDeep(g.value);S=S==null?void 0:S.map(k=>(k.children||(k.value=E==null?void 0:E[k.name]),k)),g.value=S},J=()=>{var S,k;m.value=g.value;let E={};if(u.value!=="")E.id=u.value,(S=m.value)==null||S.forEach(y=>{const x=gr==null?void 0:gr.find(O=>(O==null?void 0:O.label)===(y==null?void 0:y.label));x?E[x.key]=y.value:y!=null&&y.children&&y.children.length>0&&(E.children=y.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"fix"});else{let y=M.cloneDeep(c.value)+1;f.setTableIndex(y),E.id="idChild"+c.value,(k=m.value)==null||k.forEach(x=>{const O=gr==null?void 0:gr.find(I=>(I==null?void 0:I.label)===(x==null?void 0:x.label));O?E[O.key]=x.value:x!=null&&x.children&&x.children.length>0&&(E.children=x.children)}),i.value=!1,r("fixChange",{contents:M.cloneDeep(E),id:o.value,type:"add"})}u.value="",m.value=[],g.value=[]},A=()=>{i.value=!1,u.value="",o.value="",m.value=[],g.value=[]},F=E=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",E),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=E=>{r("deleteChange",E)};return(E,S)=>{const k=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",jh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(x,O)=>(e.openBlock(),e.createElementBlock("div",Hh,[e.createElementVNode("div",Uh,[e.createElementVNode("div",qh,e.toDisplayString(x.label),1),e.createElementVNode("div",Wh,[e.createVNode(k,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>N(x)},null,8,["onClick"]),e.createVNode(k,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>d(x)},null,8,["onClick"]),e.createVNode(k,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>F(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",Gh,[e.createVNode(Ph,{tableChildContents:x==null?void 0:x.children,onDeleteChange:L,onFixChange:w},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Ir.ssDialog,{visible:i.value,onBeforeDestroy:A,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kh,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yh,[e.createVNode(y,{onClick:A,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"ok-button button",onClick:J,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},qc=nr._export_sfc(Jh,[["__scopeId","data-v-ebd68fa1"]]),Xh={class:"table-operate-content"},Zh={class:"table-operate-item"},Qh={class:"operate-title"},e6={class:"operate-content"},a6={class:"fix-content"},l6={class:"fix-content-label"},r6={class:"fix-button"},n6={key:0},i6={class:"operate-title"},o6={class:"operate-content"},t6={class:"fix-content"},s6={class:"fix-content-label"},c6={class:"fix-button"},u6={class:"operate-title"},d6={class:"operate-content"},p6={class:"fix-content"},f6={class:"fix-content-label"},h6={class:"fix-button"},v6={class:"operate-title"},m6={class:"operate-content"},y6={class:"fix-content"},g6={class:"fix-content-label"},b6={class:"fix-button"},k6={class:"operate-content"},x6={style:{display:"flex","justify-content":"space-between"}},w6={class:"form-content"},_6={class:"dialog-footer"},S6={class:"form-content"},E6={class:"dialog-footer"},C6={class:"form-content"},D6={class:"dialog-footer"},T6={class:"form-content"},B6={class:"dialog-footer"},N6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),o=e.ref(!1),f=e.ref(!1),c=e.ref([]),u=e.ref(!1),m=e.ref([]),g=e.ref(!1),w=e.ref([]),d=e.ref(""),N=e.ref(""),_=e.ref([]),J=e.ref([]),A=e.ref([]),F=e.ref([]),L=e.ref(!1),E=e.ref([]),S=e.ref([]),k=e.ref(0),y=e.ref([]),x=e.ref([]),O=e.ref([]),I=()=>{L.value=!0;let H=[];Un==null||Un.forEach(V=>{k.value++,H.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:k.value,contents:V==null?void 0:V.options})}),E.value=H,S.value=H},W=()=>{var V,ae,pe;f.value=!0;let H=[];(pe=(ae=(V=le.FormContent)==null?void 0:V.find(ve=>(ve==null?void 0:ve.key)==="Input"))==null?void 0:ae.value)==null||pe.forEach(ve=>{k.value++,H.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="类型"?"Input":"",id:k.value,contents:ve==null?void 0:ve.options})}),y.value=H,x.value=H},Y=H=>{H||(y.value=x.value)},fe=async H=>{var V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na;if((H==null?void 0:H.类型)!==((ae=(V=x.value)==null?void 0:V.find(oa=>(oa==null?void 0:oa.label)==="类型"))==null?void 0:ae.value)){let oa=[],ja=await((da=(ve=(pe=le.FormContent)==null?void 0:pe.find(aa=>(aa==null?void 0:aa.key)===((H==null?void 0:H.类型)===""?"Input":H==null?void 0:H.类型)))==null?void 0:ve.value)==null?void 0:da.value)?await((Te=(Ma=(Sa=le.FormContent)==null?void 0:Sa.find(aa=>(aa==null?void 0:aa.key)===((H==null?void 0:H.类型)===""?"Input":H==null?void 0:H.类型)))==null?void 0:Ma.value)==null?void 0:Te.value):(Ue=(ca=le.FormContent)==null?void 0:ca.find(aa=>(aa==null?void 0:aa.key)===((H==null?void 0:H.类型)===""?"Input":H==null?void 0:H.类型)))==null?void 0:Ue.value;if(ja==null||ja.forEach(aa=>{k.value++,oa.push({label:aa==null?void 0:aa.label,name:(aa==null?void 0:aa.name)||(aa==null?void 0:aa.label),type:aa.type,value:aa!=null&&aa.属性名?(H==null?void 0:H.prop)||(H==null?void 0:H.name)||(H==null?void 0:H.label):(H==null?void 0:H[aa.label])??"",id:k.value,contents:aa==null?void 0:aa.options,prop:(aa==null?void 0:aa.prop)||(aa==null?void 0:aa.name)||(aa==null?void 0:aa.label)})}),H!=null&&H.菜单选项&&((Fa=H==null?void 0:H.菜单选项)==null?void 0:Fa.length)>0){const aa=await le.menuToContentType(H==null?void 0:H.菜单选项);oa=oa==null?void 0:oa.map(je=>((je==null?void 0:je.name)==="组信息选项"&&(je.contents=aa),je))}x.value=await le.selectToBase(M.cloneDeep(oa)),y.value=await le.selectToBase(M.cloneDeep(oa))}else{let oa=M.cloneDeep(y.value);if(oa=oa==null?void 0:oa.map(ja=>(ja.value=H==null?void 0:H[ja.name],ja)),H!=null&&H.菜单选项&&((Na=H==null?void 0:H.菜单选项)==null?void 0:Na.length)>0){const ja=await le.menuToContentType(H==null?void 0:H.菜单选项);oa=oa==null?void 0:oa.map(aa=>((aa==null?void 0:aa.name)==="组信息选项"&&(aa.contents=ja),aa))}oa=le.formToOptionsContents(oa),x.value=await le.selectToBase(M.cloneDeep(oa))}},de=async H=>{await fe(H),y.value=x.value},j=(H,V)=>{if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="selectRelateType"){const ae=V==null?void 0:V.optionUrl;return(ae==null?void 0:ae.selectRelateType)||V[H.key]}if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="menuSelect"){const ae=V==null?void 0:V.optionUrl;return(ae==null?void 0:ae.menuSelect)||V[H.key]}if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="groupSelect"){const ae=V==null?void 0:V.optionUrl;return(ae==null?void 0:ae.groupSelect)||V[H.key]}if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="originalContent")return(V==null?void 0:V.value)||V[H.key];if((V==null?void 0:V.type)=="Select"&&(H==null?void 0:H.key)==="multiple"){const ae=V[H.key];return tc(ae)?ae:H.default}return(H==null?void 0:H.label)==="类型"&&V[H.key]===""?"Input":(H==null?void 0:H.key)==="isFormColHidden"&&!V[H.key]?!1:V[H.key]},U=async H=>{var pe,ve,da,ca,Ue,Sa,Ma,Te,Fa;f.value=!0;let V=[];const ae=await((da=(ve=(pe=le.FormContent)==null?void 0:pe.find(Na=>(Na==null?void 0:Na.key)===((H==null?void 0:H.type)===""?"Input":H==null?void 0:H.type)))==null?void 0:ve.value)==null?void 0:da.value)?await((Te=(Ma=(Sa=le.FormContent)==null?void 0:Sa.find(Na=>(Na==null?void 0:Na.key)===((H==null?void 0:H.type)===""?"Input":H==null?void 0:H.type)))==null?void 0:Ma.value)==null?void 0:Te.value):(Ue=(ca=le.FormContent)==null?void 0:ca.find(Na=>(Na==null?void 0:Na.key)===((H==null?void 0:H.type)===""?"Input":H==null?void 0:H.type)))==null?void 0:Ue.value;if(ae==null||ae.forEach(Na=>{k.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)==="属性名"?(H==null?void 0:H.prop)||(H==null?void 0:H.name)||(H==null?void 0:H.label):j(Na,H),id:k.value,contents:Na==null?void 0:Na.options})}),H!=null&&H.menuSelect&&((Fa=H==null?void 0:H.menuSelect)==null?void 0:Fa.length)>0){const Na=await le.menuToContentType(H==null?void 0:H.menuSelect);V=V==null?void 0:V.map(oa=>((oa==null?void 0:oa.name)==="组信息选项"&&(oa.contents=Na),oa))}d.value=H==null?void 0:H.id,y.value=await le.selectToBase(le.formToOptionsContents(V)),x.value=await le.selectToBase(le.formToOptionsContents(V))},Z=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;O.value=(V=M.cloneDeep(O.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="tableToForm"&&(pe.contents=O.value),pe))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ee=()=>{f.value=!1,y.value=[],d.value=""},ge=async()=>{var pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na;y.value=x.value;let H={};d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value);let V=await((da=(ve=(pe=le.FormContent)==null?void 0:pe.find(oa=>{var ja,aa;return(oa==null?void 0:oa.key)===(((aa=(ja=y.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:aa.value)??"label")}))==null?void 0:ve.value)==null?void 0:da.value)??((Ue=(ca=le.FormContent)==null?void 0:ca.find(oa=>{var ja,aa;return(oa==null?void 0:oa.key)===(((aa=(ja=y.value)==null?void 0:ja.find(je=>(je==null?void 0:je.label)==="类型"))==null?void 0:aa.value)??"label")}))==null?void 0:Ue.value);if((Sa=y.value)==null||Sa.forEach(oa=>{const ja=V==null?void 0:V.find(aa=>(aa==null?void 0:aa.label)===(oa==null?void 0:oa.label));ja&&(H[ja.key]=oa.value)}),H.name=H.label,(Ma=O.value)!=null&&Ma.find(oa=>oa.id===H.id))O.value=(Te=O.value)==null?void 0:Te.map(oa=>(oa.id===H.id&&(oa=H),oa));else{let oa=M.cloneDeep(O.value);O.value||(O.value=[]),oa.push(H),O.value=oa}O.value=O.value.map(({id:oa,...ja})=>ja),f.value=!1,d.value="";let ae=M.cloneDeep(n.originalItemContents);(Fa=M.cloneDeep(n.originalItemContents))!=null&&Fa.find(oa=>(oa==null?void 0:oa.key)==="tableToForm")?ae=(Na=M.cloneDeep(n.originalItemContents))==null?void 0:Na.map(oa=>((oa==null?void 0:oa.key)==="tableToForm"&&(oa.contents=O.value),oa)):ae.push({key:"tableToForm",contents:O.value}),r("change",ae)},Ie=H=>{L.value=!0;let V=[];Un==null||Un.forEach(ae=>{k.value++,V.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:H[ae.key],id:k.value,contents:ae==null?void 0:ae.options})}),d.value=H==null?void 0:H.id,E.value=V,S.value=V};e.watch(()=>g.value,()=>{var V,ae;let H=M.cloneDeep(n.originalItemContents);(V=M.cloneDeep(n.originalItemContents))!=null&&V.find(pe=>(pe==null?void 0:pe.key)==="page")?H=(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="page"&&(pe.contents=g.value),pe)):H.push({key:"page",contents:g.value}),r("change",H)},{deep:!0});const ue=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;J.value=(V=M.cloneDeep(J.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="extraButton"&&(pe.contents=J.value),pe))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var ae,pe,ve,da,ca;E.value=S.value;let H={};if(d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value),(ae=E.value)==null||ae.forEach(Ue=>{const Sa=Un==null?void 0:Un.find(Ma=>(Ma==null?void 0:Ma.label)===(Ue==null?void 0:Ue.label));Sa?H[Sa.key]=Ue.value:Ue!=null&&Ue.children&&Ue.children.length>0&&(H.children=Ue.children)}),(pe=J.value)!=null&&pe.find(Ue=>Ue.id===H.id))J.value=(ve=J.value)==null?void 0:ve.map(Ue=>(Ue.id===H.id&&(Ue=H),Ue));else{let Ue=M.cloneDeep(J.value)??[];Ue.push(H),J.value=Ue}L.value=!1,d.value="";let V=M.cloneDeep(n.originalItemContents);(da=M.cloneDeep(n.originalItemContents))!=null&&da.find(Ue=>(Ue==null?void 0:Ue.key)==="extraButton")?V=(ca=M.cloneDeep(n.originalItemContents))==null?void 0:ca.map(Ue=>((Ue==null?void 0:Ue.key)==="extraButton"&&(Ue.contents=J.value),Ue)):V.push({key:"extraButton",contents:J.value}),r("change",V)},oe=H=>{let V=M.cloneDeep(S.value);V=V==null?void 0:V.map(ae=>(ae.children||(ae.value=H==null?void 0:H[ae.name]),ae)),S.value=V},q=()=>{L.value=!1,E.value=[],d.value=""},ye=H=>{u.value=!0;let V=[];qn==null||qn.forEach(ae=>{k.value++,V.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:H[ae.key],id:k.value,contents:ae==null?void 0:ae.options})}),d.value=H==null?void 0:H.id,A.value=V,F.value=V},Ke=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;_.value=(V=M.cloneDeep(_.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>((pe==null?void 0:pe.key)==="rowButton"&&(pe.contents=_.value),pe))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ae=()=>{o.value=!0;let H=[];gr==null||gr.forEach(V=>{k.value++,H.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:k.value,contents:V==null?void 0:V.options})}),m.value=H,w.value=H},Qe=()=>{u.value=!0;let H=[];qn==null||qn.forEach(V=>{k.value++,H.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:k.value,contents:V==null?void 0:V.options})}),A.value=H,F.value=H},Ea=H=>{let V=M.cloneDeep(F.value);V=V==null?void 0:V.map(ae=>(ae.children||(ae.value=H==null?void 0:H[ae.name]),ae)),F.value=V},ne=()=>{var ae,pe,ve,da,ca;A.value=F.value;let H={};if(d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value),(ae=A.value)==null||ae.forEach(Ue=>{const Sa=qn==null?void 0:qn.find(Ma=>(Ma==null?void 0:Ma.label)===(Ue==null?void 0:Ue.label));Sa?H[Sa.key]=Ue.value:Ue!=null&&Ue.children&&Ue.children.length>0&&(H.children=Ue.children)}),(pe=_.value)!=null&&pe.find(Ue=>Ue.id===H.id))_.value=(ve=_.value)==null?void 0:ve.map(Ue=>(Ue.id===H.id&&(Ue=H),Ue));else{let Ue=M.cloneDeep(_.value);Ue.push(H),_.value=Ue}u.value=!1,d.value="";let V=M.cloneDeep(n.originalItemContents);(da=M.cloneDeep(n.originalItemContents))!=null&&da.find(Ue=>(Ue==null?void 0:Ue.key)==="rowButton")?V=(ca=M.cloneDeep(n.originalItemContents))==null?void 0:ca.map(Ue=>((Ue==null?void 0:Ue.key)==="rowButton"&&(Ue.contents=_.value),Ue)):V.push({key:"rowButton",contents:_.value}),r("change",V)},ua=()=>{u.value=!1,d.value="",F.value=[],A.value=[]},Pe=H=>{o.value=!0;let V=[];gr==null||gr.forEach(ae=>{k.value++,V.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:"",id:k.value,contents:ae==null?void 0:ae.options})}),m.value=V,N.value=H==null?void 0:H.id,w.value=V},Re=H=>{var V;c.value=Vc(M.cloneDeep(c.value),H==null?void 0:H.id),r("change",(V=M.cloneDeep(n.originalItemContents))==null?void 0:V.map(ae=>{var pe;return(ae==null?void 0:ae.key)==="header"&&(ae.contents=(pe=c.value)!=null&&pe.some(ve=>ve==null?void 0:ve.children)?[c.value]:c.value),ae}))},Le=H=>{var ae,pe,ve;H.type==="fix"?H.id!==""?c.value=Pc(c.value,H):c.value=Fc(c.value,H==null?void 0:H.contents):c.value=jc(c.value,H),c.value=(ae=c.value)!=null&&ae.some(da=>da==null?void 0:da.children)?[c.value]:c.value,d.value="";let V=M.cloneDeep(n.originalItemContents);(pe=M.cloneDeep(n.originalItemContents))!=null&&pe.find(da=>(da==null?void 0:da.key)==="header")?V=(ve=M.cloneDeep(n.originalItemContents))==null?void 0:ve.map(da=>((da==null?void 0:da.key)==="header"&&(da.contents=c.value),da)):V.push({key:"header",contents:c.value}),r("change",V)},se=H=>{var ae;o.value=!0;let V=[];gr==null||gr.forEach(pe=>{k.value++,V.push({label:pe==null?void 0:pe.label,name:pe==null?void 0:pe.label,type:pe.type,value:H[pe.key],id:k.value,contents:pe==null?void 0:pe.options})}),H!=null&&H.children&&((ae=H==null?void 0:H.children)==null?void 0:ae.length)>0&&V.push({children:H==null?void 0:H.children,isFormColHidden:!0}),d.value=H==null?void 0:H.id,N.value="",m.value=V,w.value=V},me=H=>{let V=M.cloneDeep(w.value);V=V==null?void 0:V.map(ae=>(ae.children||(ae.value=H==null?void 0:H[ae.name]),ae)),w.value=V},qe=()=>{o.value=!1,d.value="",N.value="",w.value=[]},ka=()=>{var ae,pe,ve,da,ca,Ue;m.value=w.value;let H={};if(d.value!==""?H.id=d.value:(k.value++,H.id="id"+k.value),(ae=m.value)==null||ae.forEach(Sa=>{const Ma=gr==null?void 0:gr.find(Te=>(Te==null?void 0:Te.label)===(Sa==null?void 0:Sa.label));Ma?H[Ma.key]=Sa.value:Sa!=null&&Sa.children&&Sa.children.length>0&&(H.children=Sa.children)}),(pe=c.value)!=null&&pe.find(Sa=>Sa.id===H.id))c.value=(ve=c.value)==null?void 0:ve.map(Sa=>(Sa.id===H.id&&(Sa=H),Sa));else{let Sa=M.cloneDeep(c.value)??[];N.value===""?Sa.push(H):Sa=Sa==null?void 0:Sa.map(Ma=>(Ma.id===N.value&&(Ma.children||(Ma.children=[]),Ma.children.push(H)),Ma)),c.value=Sa}c.value=(da=c.value)!=null&&da.some(Sa=>Sa==null?void 0:Sa.children)?[c.value]:c.value,o.value=!1,d.value="",N.value="";let V=M.cloneDeep(n.originalItemContents);(ca=M.cloneDeep(n.originalItemContents))!=null&&ca.find(Sa=>(Sa==null?void 0:Sa.key)==="header")?V=(Ue=M.cloneDeep(n.originalItemContents))==null?void 0:Ue.map(Sa=>((Sa==null?void 0:Sa.key)==="header"&&(Sa.contents=c.value),Sa)):V.push({key:"header",contents:c.value}),r("change",V)},_a=H=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,ae;c.value=(V=M.cloneDeep(c.value))==null?void 0:V.filter(pe=>(pe==null?void 0:pe.id)!==(H==null?void 0:H.id)),r("change",(ae=M.cloneDeep(n.originalItemContents))==null?void 0:ae.map(pe=>{var ve;return(pe==null?void 0:pe.key)==="header"&&(pe.contents=(ve=c.value)!=null&&ve.some(da=>da==null?void 0:da.children)?[c.value]:c.value),pe})),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(i.value=M.cloneDeep(n.originalItemContents),c.value=(V=(H=i.value)==null?void 0:H.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:V.contents,_.value=(pe=(ae=i.value)==null?void 0:ae.find(ce=>(ce==null?void 0:ce.key)==="rowButton"))==null?void 0:pe.contents,J.value=(da=(ve=i.value)==null?void 0:ve.find(ce=>(ce==null?void 0:ce.key)==="extraButton"))==null?void 0:da.contents,g.value=(Ue=(ca=i.value)==null?void 0:ca.find(ce=>(ce==null?void 0:ce.key)==="page"))!=null&&Ue.contents?!!((Ma=(Sa=i.value)==null?void 0:Sa.find(ce=>(ce==null?void 0:ce.key)==="page"))!=null&&Ma.contents):!1,O.value=(Fa=(Te=i.value)==null?void 0:Te.find(ce=>(ce==null?void 0:ce.key)==="tableToForm"))==null?void 0:Fa.contents,c.value=(Na=c.value)==null?void 0:Na.map((ce,Se)=>(Array.isArray(ce)?ce=_3(ce):ce={label:(ce==null?void 0:ce.label)??"",prop:(ce==null?void 0:ce.label)==="操作"?"operate":ce==null?void 0:ce.prop,width:ce!=null&&ce.width?parseInt(ce.width):"",fixed:(ce==null?void 0:ce.fixed)??void 0,sortable:(ce==null?void 0:ce.sortable)??!1,align:(ce==null?void 0:ce.align)??"left",showOverflowTooltip:(ce==null?void 0:ce.showOverflowTooltip)??!0,isNotDrag:(ce==null?void 0:ce.isNotDrag)??!1,isEditCol:(ce==null?void 0:ce.isEditCol)??!1,isOperate:(ce==null?void 0:ce.isOperate)??!1,id:(ce==null?void 0:ce.id)??Se,formMenuSelect:(ce==null?void 0:ce.formMenuSelect)??void 0,groupSelect:(ce==null?void 0:ce.groupSelect)??void 0},ce)),c.value=(oa=c.value)!=null&&oa.every(ce=>Array.isArray(ce))?(ja=c.value)==null?void 0:ja[0]:c.value,_.value=(aa=_.value)==null?void 0:aa.map((ce,Se)=>ce={label:(ce==null?void 0:ce.label)??"",type:(ce==null?void 0:ce.type)??"",textColor:(ce==null?void 0:ce.textColor)??"#000000",id:(ce==null?void 0:ce.id)??Se}),J.value=(je=J.value)==null?void 0:je.map((ce,Se)=>ce={label:(ce==null?void 0:ce.label)??"",type:(ce==null?void 0:ce.type)??"",background:(ce==null?void 0:ce.background)??"var(--ssComponent-primary-color)",id:(ce==null?void 0:ce.id)??Se}),O.value)O.value=(te=O.value)==null?void 0:te.map(ce=>{k.value++;let Se=ce;return Se.id=k.value,Se});else{let ce=[];const Se=(pa=le.getColumnChild(M.cloneDeep(c.value)))==null?void 0:pa.filter(we=>(we==null?void 0:we.prop)!=="operate");Se==null||Se.forEach(we=>{var fa;k.value++,ce.push({label:we==null?void 0:we.label,name:(we==null?void 0:we.prop)||(we==null?void 0:we.label),type:we!=null&&we.groupSelect?"Select":"Input",value:"",id:k.value,contents:we==null?void 0:we.options,menuSelect:we==null?void 0:we.formMenuSelect,groupSelect:(fa=we==null?void 0:we.groupSelect)==null?void 0:fa.split(":"),selectRelateType:"关联绑定列"})}),O.value=ce}},{deep:!0,immediate:!0}),(H,V)=>{const ae=e.resolveComponent("svg-icon"),pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Xh,[e.createElementVNode("div",Zh,[e.createElementVNode("div",Qh,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(pe,{class:"icon-content",onClick:Ae,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",e6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",a6,[e.createElementVNode("div",l6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",r6,[e.createVNode(ae,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>Pe(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>se(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>_a(ve)},null,8,["onClick"])])]),ve!=null&&ve.children&&ve.children.length>0?(e.openBlock(),e.createElementBlock("div",n6,[e.createVNode(qc,{tableChildContents:ve==null?void 0:ve.children,onDeleteChange:Re,onFixChange:Le},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",i6,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:Qe},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",o6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",t6,[e.createElementVNode("div",s6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",c6,[e.createVNode(ae,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ca=>ye(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>Ke(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",u6,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:I},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",d6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",p6,[e.createElementVNode("div",f6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",h6,[e.createVNode(ae,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ca=>Ie(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>ue(ve)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",v6,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(pe,{class:"icon-content",id:"themeButton",onClick:W},{icon:e.withCtx(()=>[e.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",m6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(ve,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",y6,[e.createElementVNode("div",g6,e.toDisplayString(ve==null?void 0:ve.label),1),e.createElementVNode("div",b6,[e.createVNode(ae,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ca=>U(ve)},null,8,["onClick"]),e.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ca=>Z(ve)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",k6,[e.createElementVNode("div",x6,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(pl._sfc_main$1,{modelValue:g.value,"onUpdate:modelValue":V[0]||(V[0]=ve=>g.value=ve)},null,8,["modelValue"])])])]),e.createVNode(Ir.ssDialog,{visible:o.value,onBeforeDestroy:qe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",w6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:me},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_6,[e.createVNode(pe,{onClick:qe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(pe,{class:"ok-button button",onClick:ka,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:u.value,onBeforeDestroy:ua,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",S6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Ea},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",E6,[e.createVNode(pe,{onClick:ua,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(pe,{class:"ok-button button",onClick:ne,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:L.value,onBeforeDestroy:q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",C6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",D6,[e.createVNode(pe,{onClick:q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(pe,{class:"ok-button button",onClick:B,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:f.value,onBeforeDestroy:ee,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T6,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:fe,onChangeVisible:Y,onBlurChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B6,[e.createVNode(pe,{onClick:ee,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(pe,{class:"ok-button button",onClick:ge,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},A6=nr._export_sfc(N6,[["__scopeId","data-v-7a6b87b5"]]),z6=M.useModelComp(M.pinia),{pageMapState:Wc}=M.storeToRefs(z6),M6=M.useMenuState(M.pinia),{activeMenuPath:Gc,systemHeight:Kc}=M.storeToRefs(M6),I6=e.ref(24),O6=e.ref(6),Yc=e.ref(10),L6=e.ref(70),R6=e.ref(.18),$6=e.ref(45),V6=()=>{Yc.value=(Kc.value-100)/100};e.watch(()=>Kc.value,()=>{V6()},{deep:!0,immediate:!0});const F6=(a,l,n,r)=>{var i,o,f,c,u,m,g,w,d,N,_,J,A,F,L,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=(f=a==null?void 0:a.value)==null?void 0:f.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)||I6.value,h:((w=(g=a==null?void 0:a.value)==null?void 0:g.tableData)==null?void 0:w.h)||n,minW:((N=(d=a==null?void 0:a.value)==null?void 0:d.tableData)==null?void 0:N.minW)||O6.value,minH:((J=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:J.minH)||R6.value,maxH:((F=(A=a==null?void 0:a.value)==null?void 0:A.tableData)==null?void 0:F.maxH)||$6.value,i:((E=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:r}},P6=(a,l)=>{var r,i,o,f,c,u,m,g;let n=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((r=a==null?void 0:a.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((f=(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:f.length)===0)return 2}else((c=a==null?void 0:a.comp)==null?void 0:c.toUpperCase())==="FORM"&&(n=((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 n*2},Jc=(a,l,n)=>{var f,c;const r=(c=(f=Wc.value)==null?void 0:f[Gc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=r==null?void 0:r.find(u=>{var m,g,w;return((w=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:w.id)===a.id}),o=P6(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>Jc(u,m))),{...F6(i,l,o,a)}},j6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=M.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,i)=>Jc(r,i)):[]},H6=(a,l,n,r)=>{var i,o;return{x:n==null?void 0:n.x,y:0,w:Math.round(n==null?void 0:n.w),h:n==null?void 0:n.h,arrowGap:n==null?void 0:n.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:r}},U6=(a,l)=>{var m,g,w,d;let n=0,r=0,i=0,o=0,f=0,c=((g=(m=a==null?void 0:a.compData)==null?void 0:m.find(N=>(N==null?void 0:N.key)==="numPosition"))==null?void 0:g.contents)??[],u=((d=(w=a==null?void 0:a.compData)==null?void 0:w.find(N=>(N==null?void 0:N.key)==="rowPosition"))==null?void 0:d.contents)??"";return u&&u!==1&&(f=Math.ceil(u*l)),i=(c==null?void 0:c[0])*l,o=(c==null?void 0:c[1])*100,{x:n,y:r,w:i,h:o,arrowGap:f}},Xc=(a,l,n)=>{var f,c;const r=(c=(f=Wc.value)==null?void 0:f[Gc.value])==null?void 0:c.filter(u=>{var m;return((m=u==null?void 0:u.key)==null?void 0:m.type)==="gridLayout"}),i=r==null?void 0:r.find(u=>{var m,g,w;return((w=(g=(m=u==null?void 0:u.value)==null?void 0:m.tableData)==null?void 0:g.component)==null?void 0:w.id)===a.id}),o=U6(a,n);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((u,m)=>Xc(u,m,n))),{...H6(i,l,o,a)}},q6=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const n=M.cloneDeep(a);return Array.isArray(a)?n==null?void 0:n.map((r,i)=>Xc(r,i,l)):[]},W6=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}]}]}}),G6=(a,l)=>a==null?void 0:a.map(n=>{for(const r in l)if(r===(n==null?void 0:n.prop))return{...n,value:l[r]};return n}),K6=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]);e.watch(()=>n.compType,c=>{var g;const u=W6(n==null?void 0:n.optionItems),m=c?(g=u[c==null?void 0:c.toUpperCase()])==null?void 0:g[n==null?void 0:n.target]:[];i.value=m==null?void 0:m.map(w=>{for(const[d,N]of Object.entries((n==null?void 0:n.comp)||{}))if((w==null?void 0:w.prop)===d)return{...w,value:N};return w})},{immediate:!0});const o=c=>pl.getComponent(c),f=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 w;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(w=g==null?void 0:g.options)==null?void 0:w.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 w;return(g==null?void 0:g.prop)==="isStepLayout"?{...g,options:(w=g==null?void 0:g.options)==null?void 0:w.map(d=>({...d,disabled:!1}))}:(g==null?void 0:g.prop)==="isGridLayout"?{...g,disabled:!1}:g}),r("change",{target:n==null?void 0:n.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,w=>(e.openBlock(),e.createBlock(g,{class:"style-row",key:w==null?void 0:w.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w==null?void 0:w.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(w.type)),{modelValue:w.value,"onUpdate:modelValue":d=>w.value=d,content:w==null?void 0:w.options,optionUrl:w==null?void 0:w.optionUrl,disabled:w==null?void 0:w.disabled,activeText:w==null?void 0:w.activeText,inactiveText:w==null?void 0:w.inactiveText,onChange:d=>f(w)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Y6=nr._export_sfc(K6,[["__scopeId","data-v-da01b651"]]),J6=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const n=a,r=l,i=[{required:!0,message:"输入不能为空",trigger:"blur"}],o=e.ref([]),f=F=>F==null?void 0:F.reduce((L,E)=>(L[E==null?void 0:E.prop]=E==null?void 0:E.rule,L),{}),c=e.computed(()=>({formRules:f(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=(F,L,E)=>{var y;let S=[];(n==null?void 0:n.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:F},{label:"按钮名称",value:"按钮名称",children:L}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],o.value=[{prop:"任务名称",rule:i},{prop:"任务关键词",rule:i},{prop:"执行任务",rule:i},{prop:"执行动作",rule:i},{prop:"执行交互",rule:i}]):(n==null?void 0:n.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:(y=n==null?void 0:n.relatedData)==null?void 0:y.map(x=>({label:x==null?void 0:x.任务名称,value:x==null?void 0:x.任务名称}))},{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 k;return E&&(E==null?void 0:E.length)>0?k=[...S,...w(F,L,E)]:k=S,k},w=(F,L,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(k=>E==null?void 0:E.includes(k==null?void 0:k.prop)):S},d=(F,L)=>{var x,O,I,W,Y,fe,de,j,U;const E=((Y=(W=(I=(O=(x=n==null?void 0:n.comp)==null?void 0:x.compData)==null?void 0:O.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:I.contents)==null?void 0:W.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:Y.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],S=/button/i,k=((U=(j=(de=(fe=n==null?void 0:n.comp)==null?void 0:fe.compData)==null?void 0:de.filter(Z=>S.test(Z==null?void 0:Z.key)))==null?void 0:j.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:U.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],y=g(E,k,F);u.value=L?G6(y,L):y,F&&(F==null?void 0:F.length)>0&&o.value.push(...F==null?void 0:F.map(Z=>({prop:Z,rule:i})))};e.onMounted(()=>{d(null,n==null?void 0:n.extendItem)});const N=F=>{const L=F==null?void 0:F[m.value];if(m.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const E=L==null?void 0:L.join("/");d(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,F)}},_=F=>{r("change",{target:n==null?void 0:n.target,extendConfigs:F})},J=(F,L)=>{m.value=L==null?void 0:L.changeProp,N(F)},A=F=>{r("onButtonClick",F)};return(F,L)=>(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:u.value,key:u.value,isStartJustify:!1,isEnableWrap:!1,formRules:c.value.formRules,buttonValue:c.value.buttonValue,onChange:_,onBlurChange:J,onOnButtonClick:A},null,8,["rowContents","formRules","buttonValue"]))}}),X6=nr._export_sfc(J6,[["__scopeId","data-v-4b39853f"]]),Z6={};function Q6(a,l){return null}const e4=nr._export_sfc(Z6,[["render",Q6]]),a4={class:"form-operate-content"},l4={class:"form-operate-item"},r4={class:"operate-title"},n4={class:"operate-content"},i4={class:"fix-content"},o4={class:"fix-button"},t4={class:"operate-title"},s4={class:"operate-content"},c4={class:"fix-content"},u4={class:"fix-button"},d4={style:{display:"flex","justify-content":"space-between"}},p4={class:"form-content"},f4={class:"dialog-footer"},h4={class:"form-content"},v4={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(!1),o=e.ref([]),f=e.ref([]),c=e.ref(!1),u=e.ref([]),m=e.ref([]),g=e.ref(""),w=e.ref(!1),d=e.ref(0),N=e.ref([]),_=e.ref([]),J=(j,U)=>{if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="selectRelateType"){const Z=U==null?void 0:U.optionUrl;return(Z==null?void 0:Z.selectRelateType)||U[j.key]}if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="menuSelect"){const Z=U==null?void 0:U.optionUrl;return(Z==null?void 0:Z.menuSelect)||U[j.key]}if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="groupSelect"){const Z=U==null?void 0:U.optionUrl;return(Z==null?void 0:Z.groupSelect)||U[j.key]}if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="originalContent")return(U==null?void 0:U.value)||U[j.key];if((U==null?void 0:U.type)=="Select"&&(j==null?void 0:j.key)==="multiple"){const Z=U[j.key];return tc(Z)?Z:j.default}return(j==null?void 0:j.label)==="类型"&&U[j.key]===""?"Input":(j==null?void 0:j.key)==="isFormColHidden"&&!U[j.key]?!1:U[j.key]},A=async j=>{var ee,ge,Ie,ue,B,oe;i.value=!0;let U=[];const Z=await((Ie=(ge=(ee=le.FormContent)==null?void 0:ee.find(q=>(q==null?void 0:q.key)===((j==null?void 0:j.type)===""?"Input":j==null?void 0:j.type)))==null?void 0:ge.value)==null?void 0:Ie.value)??((B=(ue=le.FormContent)==null?void 0:ue.find(q=>(q==null?void 0:q.key)===((j==null?void 0:j.type)===""?"Input":j==null?void 0:j.type)))==null?void 0:B.value);if(Z==null||Z.forEach(q=>{d.value++,U.push({label:q==null?void 0:q.label,name:q==null?void 0:q.label,type:q.type,prop:q==null?void 0:q.prop,value:J(q,j),id:d.value,contents:q==null?void 0:q.options,width:(j==null?void 0:j.width)??1})}),j!=null&&j.menuSelect&&((oe=j==null?void 0:j.menuSelect)==null?void 0:oe.length)>0){const q=await le.menuToContentType(j==null?void 0:j.menuSelect);U=U==null?void 0:U.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=q),ye))}g.value=j==null?void 0:j.id,o.value=await le.selectToBase(le.formToOptionsContents(U)),f.value=await le.selectToBase(le.formToOptionsContents(U))},F=j=>{var Z;c.value=!0;let U=[];(Z=le.FormButton)==null||Z.forEach(ee=>{d.value++,U.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:(ee==null?void 0:ee.label)==="类型"&&j[ee.key]===""?"normal":j[ee.key],id:d.value,contents:ee==null?void 0:ee.options})}),N.value=U,_.value=U,g.value=j==null?void 0:j.id};e.watch(()=>w.value,()=>{var U,Z;let j=M.cloneDeep(n.originalItemContents);(U=M.cloneDeep(n.originalItemContents))!=null&&U.find(ee=>(ee==null?void 0:ee.key)==="enableWrap")?j=(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ee=>((ee==null?void 0:ee.key)==="enableWrap"&&(ee.contents=!w.value),ee)):j.push({key:"enableWrap",contents:!w.value}),r("change",j)},{deep:!0});const L=()=>{var Z,ee,ge,Ie,ue;N.value=_.value;let j={};if(g.value!==""?j.id=g.value:(d.value++,j.id="id"+d.value),(Z=N.value)==null||Z.forEach(B=>{var q;const oe=(q=le.FormButton)==null?void 0:q.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));oe&&(j[oe.key]=B.value)}),(ee=u.value)!=null&&ee.find(B=>B.id===j.id))u.value=(ge=u.value)==null?void 0:ge.map(B=>(B.id===j.id&&(B=j),B));else{let B=M.cloneDeep(u.value);u.value||(u.value=[]),B.push(j),u.value=B}c.value=!1,g.value="";let U=M.cloneDeep(n.originalItemContents);(Ie=M.cloneDeep(n.originalItemContents))!=null&&Ie.find(B=>(B==null?void 0:B.key)==="formButton")?U=(ue=M.cloneDeep(n.originalItemContents))==null?void 0:ue.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=u.value),B)):U.push({key:"formButton",contents:u.value}),r("change",U)},E=j=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var U,Z;m.value=(U=M.cloneDeep(m.value))==null?void 0:U.filter(ee=>(ee==null?void 0:ee.id)!==(j==null?void 0:j.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=j=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var U,Z;u.value=(U=M.cloneDeep(u.value))==null?void 0:U.filter(ee=>(ee==null?void 0:ee.id)!==(j==null?void 0:j.id)),r("change",(Z=M.cloneDeep(n.originalItemContents))==null?void 0:Z.map(ee=>((ee==null?void 0:ee.key)==="formButton"&&(ee.contents=u.value),ee))),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},k=()=>{var U;c.value=!0;let j=[];(U=le.FormButton)==null||U.forEach(Z=>{d.value++,j.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})}),N.value=j,_.value=j},y=()=>{var U,Z,ee;i.value=!0;let j=[];(ee=(Z=(U=le.FormContent)==null?void 0:U.find(ge=>(ge==null?void 0:ge.key)==="Input"))==null?void 0:Z.value)==null||ee.forEach(ge=>{d.value++,j.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,value:(ge==null?void 0:ge.label)==="类型"?"Input":"",id:d.value,contents:ge==null?void 0:ge.options})}),o.value=j,f.value=j},x=j=>{let U=M.cloneDeep(_.value);U=U==null?void 0:U.map(Z=>(Z.value=j==null?void 0:j[Z.name],Z)),_.value=U},O=j=>{const U=j.find(ge=>(ge==null?void 0:ge.name)==="类型");if((U==null?void 0:U.value)!="Select")return;const Z=j.find(ge=>(ge==null?void 0:ge.name)==="多选"),ee=j.find(ge=>(ge==null?void 0:ge.name)==="初始值");Z!=null&&Z.value&&Do.isString(ee.value)&&(ee.value=[ee.value]),!(Z!=null&&Z.value)&&!Do.isString(ee.value)&&(ee.value="")},I=async j=>{var U,Z,ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae;if((j==null?void 0:j.类型)!==((Z=(U=f.value)==null?void 0:U.find(Qe=>(Qe==null?void 0:Qe.label)==="类型"))==null?void 0:Z.value)){let Qe=[];const Ea=await((Ie=(ge=(ee=le.FormContent)==null?void 0:ee.find(ne=>(ne==null?void 0:ne.key)===((j==null?void 0:j.类型)===""?"Input":j==null?void 0:j.类型)))==null?void 0:ge.value)==null?void 0:Ie.value)?await((ye=(q=(oe=le.FormContent)==null?void 0:oe.find(ne=>(ne==null?void 0:ne.key)===((j==null?void 0:j.类型)===""?"Input":j==null?void 0:j.类型)))==null?void 0:q.value)==null?void 0:ye.value):(B=(ue=le.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((j==null?void 0:j.类型)===""?"Input":j==null?void 0:j.类型)))==null?void 0:B.value;if(Ea==null||Ea.forEach(ne=>{var Pe,Re;d.value++;const ua=Zu(ne==null?void 0:ne.default)?(j==null?void 0:j[ne.label])??ne.value??"":ne==null?void 0:ne.default;Qe.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:ua,prop:ne==null?void 0:ne.prop,id:d.value,contents:ne==null?void 0:ne.options,width:((Re=(Pe=f.value)==null?void 0:Pe[0])==null?void 0:Re.width)??1})}),j!=null&&j.菜单选项&&((Ke=j==null?void 0:j.菜单选项)==null?void 0:Ke.length)>0){const ne=await le.menuToContentType(j==null?void 0:j.菜单选项);Qe=Qe==null?void 0:Qe.map(ua=>((ua==null?void 0:ua.name)==="组信息选项"&&(ua.contents=ne),ua))}O(Qe),f.value=await le.selectToBase(M.cloneDeep(Qe)),o.value=await le.selectToBase(M.cloneDeep(Qe))}else{let Qe=M.cloneDeep(f.value);if(Qe=Qe==null?void 0:Qe.map(Ea=>(Ea.value=j==null?void 0:j[Ea.name],Ea)),j!=null&&j.菜单选项&&((Ae=j==null?void 0:j.菜单选项)==null?void 0:Ae.length)>0){const Ea=await le.menuToContentType(j==null?void 0:j.菜单选项);Qe=Qe==null?void 0:Qe.map(ne=>((ne==null?void 0:ne.name)==="组信息选项"&&(ne.contents=Ea),ne))}Qe=le.formToOptionsContents(Qe),O(Qe),f.value=await le.selectToBase(M.cloneDeep(Qe))}},W=j=>{j||(o.value=f.value)},Y=async j=>{await I(j),o.value=f.value},fe=Fl.debounce(async()=>{var ee,ge,Ie,ue,B,oe,q,ye,Ke,Ae,Qe,Ea;o.value=f.value;let j={};j.width=((ge=(ee=o.value)==null?void 0:ee[0])==null?void 0:ge.width)??1,g.value!==""?j.id=g.value:(d.value++,j.id="id"+d.value);let U=await((B=(ue=(Ie=le.FormContent)==null?void 0:Ie.find(ne=>{var ua,Pe;return(ne==null?void 0:ne.key)===(((Pe=(ua=o.value)==null?void 0:ua.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:ue.value)==null?void 0:B.value)??((q=(oe=le.FormContent)==null?void 0:oe.find(ne=>{var ua,Pe;return(ne==null?void 0:ne.key)===(((Pe=(ua=o.value)==null?void 0:ua.find(Re=>(Re==null?void 0:Re.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:q.value);if((ye=o.value)==null||ye.forEach(ne=>{const ua=U==null?void 0:U.find(Pe=>(Pe==null?void 0:Pe.label)===(ne==null?void 0:ne.label));ua&&(j[ua.key]=ne.value)}),j.width=j.width?j.width:1,j.key=j==null?void 0:j.label,j.isFormColHidden=j==null?void 0:j.isFormColHidden,(Ke=m.value)!=null&&Ke.find(ne=>ne.id===j.id))m.value=(Ae=m.value)==null?void 0:Ae.map(ne=>(ne.id===j.id&&(ne=j),ne));else{let ne=M.cloneDeep(m.value);ne.push(j),m.value=ne}m.value=m.value.map(({id:ne,...ua})=>ua),i.value=!1,g.value="";let Z=M.cloneDeep(n.originalItemContents);(Qe=M.cloneDeep(n.originalItemContents))!=null&&Qe.find(ne=>(ne==null?void 0:ne.key)==="formContent")?Z=(Ea=M.cloneDeep(n.originalItemContents))==null?void 0:Ea.map(ne=>((ne==null?void 0:ne.key)==="formContent"&&(ne.contents=m.value),ne)):Z.push({key:"formContent",contents:m.value}),r("change",Z)},300),de=()=>{i.value=!1,c.value=!1,g.value="",f.value=[],_.value=[]};return e.watch(()=>n.originalItemContents,()=>{var U,Z,ee,ge,Ie,ue;if(!n.originalItemContents||n.originalItemContents.length===0)return;const j=M.cloneDeep(n.originalItemContents);m.value=((U=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:U.contents)??[],u.value=((Z=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:Z.contents)??[],w.value=(ee=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&ee.contents?!((ge=j==null?void 0:j.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&ge.contents):!0,m.value=(Ie=M.cloneDeep(m.value))==null?void 0:Ie.map((B,oe)=>{var ye;let q=B;return q.id=(B==null?void 0:B.id)??oe,B!=null&&B.label||(B.label=(B==null?void 0:B.key)??(B==null?void 0:B.label)??""),B!=null&&B.type||(B.type=(B==null?void 0:B.type)??""),B.contents=((ye=B==null?void 0:B.options)==null?void 0:ye.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,q}),m.value=le.formToOptionsContents(m.value),u.value=(ue=u.value)==null?void 0:ue.map((B,oe)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",background:(B==null?void 0:B.background)??"var(--ssComponent-primary-color)",id:oe})},{deep:!0,immediate:!0}),(j,U)=>{const Z=e.resolveComponent("svg-icon"),ee=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",a4,[e.createElementVNode("div",l4,[e.createElementVNode("div",r4,[U[2]||(U[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ee,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",n4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(ge,Ie)=>(e.openBlock(),e.createElementBlock("div",{key:Ie},[e.createElementVNode("div",i4,[e.createElementVNode("div",null,e.toDisplayString(ge.label),1),e.createElementVNode("div",o4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>A(ge)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>E(ge)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",t4,[U[4]||(U[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ee,{class:"icon-content",id:"themeButton",onClick:k},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[3]||(U[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",s4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(ge,Ie)=>(e.openBlock(),e.createElementBlock("div",{key:Ie},[e.createElementVNode("div",c4,[e.createElementVNode("div",null,e.toDisplayString(ge.label),1),e.createElementVNode("div",u4,[e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>F(ge)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ue=>S(ge)},null,8,["onClick"])])])]))),128))]),U[6]||(U[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",d4,[U[5]||(U[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(pl._sfc_main$1,{modelValue:w.value,"onUpdate:modelValue":U[0]||(U[0]=ge=>w.value=ge)},null,8,["modelValue"])])]),e.createVNode(Ir.ssDialog,{visible:i.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",p4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:I,onChangeVisible:W,onBlurChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",f4,[e.createVNode(ee,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>U[7]||(U[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ee,{class:"ok-button button",onClick:e.unref(fe),id:"themeButton"},{default:e.withCtx(()=>U[8]||(U[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Ir.ssDialog,{visible:c.value,onBeforeDestroy:de,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",h4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:de,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},zs=nr._export_sfc(v4,[["__scopeId","data-v-20850524"]]),m4={class:"step-module content"},y4={class:"module-data"},g4={class:"step-module layout"},b4={class:"form-content"},k4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=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:""}]),f=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([]),w=A=>{var F;m.value=A,r("change",(F=_())==null?void 0:F.compData)},d=(A,F)=>{var L,E;switch(A){case"create":(L=o.value)==null||L.forEach(S=>{S.value=""}),u.value="create",c.visible=!0;break;case"update":(E=o.value)==null||E.forEach(S=>{S.value=F[S==null?void 0:S.prop]}),u.value="update",c.visible=!0;break;case"delete":g.value.splice(F,1),u.value="delete";break}},N=A=>{var F,L,E;if((A==null?void 0:A.buttonName)==="确认"){const S=M.cloneDeep(A==null?void 0:A.content);switch(Object.keys(S).forEach(k=>{S[k]===""&&delete S[k]}),u.value){case"create":g.value.push({...S,index:((F=g.value)==null?void 0:F.length)+1});break;case"update":g.value=(L=g.value)==null?void 0:L.map(k=>k.index===(S==null?void 0:S.index)?{...k,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:k);break}r("change",(E=_())==null?void 0:E.compData),c.visible=!1}else c.visible=!1},_=()=>({comp:"Step",compData:[{key:"stepList",contents:g.value},{key:"stepConfig",contents:m.value}]}),J=()=>{c.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,A=>{var F,L;A&&(m.value=((F=A==null?void 0:A.find(E=>E.key==="stepConfig"))==null?void 0:F.contents)??{},g.value=((L=A==null?void 0:A.find(E=>E.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),(A,F)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",m4,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",y4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[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:y=>d("update",{...S,index:k+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:y=>d("delete",k)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",g4,[F[5]||(F[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(pl.ssForm,{rowContents:i.value,onChange:w},null,8,["rowContents"])])]),e.createVNode(Ir.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:J,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",b4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:f.value,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),x4=nr._export_sfc(k4,[["__scopeId","data-v-7dbd17f2"]]),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 n=a,r=l,i=e.ref("create"),o=e.ref({}),f=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:"时间线"}),w=A=>{var F;o.value=A,r("change",(F=_())==null?void 0:F.compData)},d=(A,F)=>{var L,E;switch(A){case"create":(L=u.value)==null||L.forEach(S=>{S.value=""}),i.value="create",g.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=F[S==null?void 0:S.prop]}),i.value="update",g.visible=!0;break;case"delete":f.value.splice(F,1),i.value="delete";break}},N=A=>{var F,L,E,S;if((A==null?void 0:A.buttonName)==="确认"){const k=M.cloneDeep(A==null?void 0:A.content);switch(Object.keys(k).forEach(y=>{k[y]===""&&delete k[y]}),i.value){case"create":(L=f.value)==null||L.push({...k,index:((F=f.value)==null?void 0:F.length)+1});break;case"update":f.value=(E=f.value)==null?void 0:E.map(y=>y.index===(k==null?void 0:k.index)?{...y,content:k==null?void 0:k.content,timestamp:k==null?void 0:k.timestamp}:y);break}r("change",(S=_())==null?void 0:S.compData),g.visible=!1}else g.visible=!1},_=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:f.value},{key:"timeLineConfig",contents:o.value}]}),J=()=>{g.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,A=>{var F,L;A&&(o.value=((F=A==null?void 0:A.find(E=>E.key==="timeLineConfig"))==null?void 0:F.contents)??{},f.value=((L=A==null?void 0:A.find(E=>E.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),(A,F)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",w4,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=S=>d("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",_4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(S,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[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:y=>d("update",{...S,index:k+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:y=>d("delete",k)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",S4,[F[5]||(F[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(pl.ssForm,{rowContents:c.value,onChange:w},null,8,["rowContents"])])]),e.createVNode(Ir.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:J,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",E4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),D4=nr._export_sfc(C4,[["__scopeId","data-v-39ffc861"]]),T4={};function B4(a,l){return e.openBlock(),e.createElementBlock("div")}const N4=nr._export_sfc(T4,[["render",B4]]),A4={class:"extra-content"},z4={key:0},M4={key:1},I4={class:"dialog-footer"},O4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const n=a,r=e.ref(0),i=e.ref(),o=e.ref(),f=l,c=e.ref(!1),u=e.ref({}),m=e.ref({}),g=e.ref();e.watch(()=>[n.itemData],()=>{var S;const E=M.cloneDeep(n.itemData);i.value=(S=M.cloneDeep(E))==null?void 0:S.map(k=>{var y;if(k.key==="extra"){let x=[];(y=k.value)==null||y.forEach(O=>{var I;x.push((I=Object.values(O))==null?void 0:I[0])}),k.value=x}return k})},{deep:!0,immediate:!0});const w=(E,S,k,y)=>{var O;let x={};((O=E==null?void 0:E[0])==null?void 0:O.contents)==="详情"&&(c.value=!0,x[S]=E,o.value=E==null?void 0:E.filter(I=>(I==null?void 0:I.key)!=="tableContentName"),u.value=x,m.value=k,g.value=y.id)},d=E=>{var I,W,Y,fe;const S=(W=(I=Object.values(M.cloneDeep(u.value)))==null?void 0:I[0])==null?void 0:W.filter(de=>(de==null?void 0:de.key)==="tableContentName"),k=(fe=(Y=Object.values(M.cloneDeep(u.value)))==null?void 0:Y[0])==null?void 0:fe.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),y=k==null?void 0:k.map((de,j)=>{var U;return j===E.index&&(de==null?void 0:de.comp)==="Table"&&(de.compData=(U=de.compData)==null?void 0:U.map(Z=>{var ee,ge;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(ge=(ee=E.content)==null?void 0:ee.map(Ie=>{let ue={};for(let B in Ie)B!=="id"&&(ue[B]=Ie[B]);return ue}))==null?void 0:ge.map(Ie=>Object.values(Ie))),Z})),de});y.unshift(S==null?void 0:S[0]);let x=M.cloneDeep(u.value),O={};for(let de in x)O[de]=y;u.value=O},N=()=>{c.value=!1,u.value={},m.value={},g.value=void 0,r.value++},_=E=>{var I,W,Y,fe;const S=(W=(I=Object.values(M.cloneDeep(u.value)))==null?void 0:I[0])==null?void 0:W.filter(de=>(de==null?void 0:de.key)==="tableContentName"),k=(fe=(Y=Object.values(M.cloneDeep(u.value)))==null?void 0:Y[0])==null?void 0:fe.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),y=k==null?void 0:k.map((de,j)=>(j===E.index&&(de.compData=E.contents),de));y.unshift(S==null?void 0:S[0]);let x=M.cloneDeep(u.value),O={};for(let de in x)O[de]=y;u.value=O},J=()=>{var S,k;let E={};for(let y in m.value)y===((S=Object.keys(u.value))==null?void 0:S[0])?E[y]=(k=Object.values(u.value))==null?void 0:k[0]:E[y]=m.value[y];f("change",{buttonName:"编辑",index:g.value,singleContent:E},"methodData"),c.value=!1,u.value={},m.value={},g.value=void 0},A=()=>{c.value=!1,u.value={},m.value={},g.value=void 0},F=E=>{f("change",E,"methodData")},L=E=>Ri(E);return(E,S)=>{const k=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",A4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(y,x)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(y==null?void 0:y.key)==="extra"?(e.openBlock(),e.createElementBlock("div",z4)):(e.openBlock(),e.createElementBlock("div",M4,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(y.comp)),{itemData:y==null?void 0:y.compData,childItemData:y==null?void 0:y.itemChildData,key:x,index:(y==null?void 0:y.id)??x,onContentClick:w,onChange:F},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Ir.ssDialog,{visible:c.value,onBeforeDestroy:A},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(y,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(y.comp)),{itemData:y==null?void 0:y.compData,onChange:d,childItemData:y==null?void 0:y.itemChildData,key:x,onContentChange:_,index:(y==null?void 0:y.id)??x,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",I4,[e.createVNode(k,{class:"cancel-button footer-button",onClick:N,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(k,{class:"confirm-button footer-button",onClick:J,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},L4=nr._export_sfc(O4,[["__scopeId","data-v-2d9c5ab2"]]),R4={key:0,class:"method-content"},$4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),n=le.useOriginalState(M.pinia),{originalPath:r}=M.storeToRefs(n),i=a,o=e.ref(!1),f=e.ref(),c=le.useTableComp(M.pinia),{multipleTableConst:u}=M.storeToRefs(c),m=M.useModelComp(M.pinia),g=e.ref(!1),w=M.useMenuState(M.pinia),d=M.useLoginState(M.pinia),{itemData:N,isEdit:_,routeToChildPath:J,tableViewContents:A,lockingPage:F,payloadTypes:L}=M.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:k}=M.storeToRefs(w),{loginUserInfo:y}=M.storeToRefs(d),x=e.ref(!1),O=async()=>{var ue,B;(ue=l.value)!=null&&ue.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")&&await Z((B=l.value)==null?void 0:B.find(oe=>(oe==null?void 0:oe.buttonName)==="保存")),await le.onSaveBack()};e.watch(()=>N.value,async()=>{_.value==="view"&&!x.value&&await Ie(M.cloneDeep(i.itemData)),x.value=!1},{deep:!0});const I=()=>{o.value=!1,f.value=void 0},W=ue=>ue.map(B=>{const oe={};for(const q in B){const ye=B[q];if(q.includes(u.value)){const Ke=q.split(u.value);let Ae=oe;Ke.forEach((Qe,Ea)=>{Ea===Ke.length-1?Ae[Qe]=ye:(Ae[Qe]||(Ae[Qe]={}),Ae=Ae[Qe])})}else oe[q]=ye}return oe}),Y=async(ue,B,oe=[])=>{var ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a;let q=(ye=M.cloneDeep(B))==null?void 0:ye.filter(H=>(H==null?void 0:H.comp)!=="methodButton");if(ue!=null&&ue.includes("[")){let H=(ne=(Ea=(Qe=(Ae=(Ke=M.cloneDeep(ue))==null?void 0:Ke.split("["))==null?void 0:Ae[1])==null?void 0:Qe.split("]"))==null?void 0:Ea[0])==null?void 0:ne.split(":"),V="";if(H!=null&&H[0]){let ae=(ua=q==null?void 0:q.find(pe=>(pe==null?void 0:pe.name)===(H==null?void 0:H[0])))==null?void 0:ua.compData;if(!ae){let pe=(Pe=ue==null?void 0:ue.split("["))==null?void 0:Pe[0],ve=await le.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,"","",oe);ae=(Re=ve==null?void 0:ve.find(da=>(da==null?void 0:da.name)===(H==null?void 0:H[0])))==null?void 0:Re.compData}ae==null||ae.forEach(pe=>{var ve,da,ca,Ue,Sa,Ma;if((pe==null?void 0:pe.key)==="formContent")(ve=pe==null?void 0:pe.contents)==null||ve.forEach(Te=>{var Fa;(Te==null?void 0:Te.key)===(H==null?void 0:H[1])&&(Array.isArray(Te==null?void 0:Te.value)?V=Te==null?void 0:Te.value:V=(Fa=Te==null?void 0:Te.value)==null?void 0:Fa.toString())});else if((pe==null?void 0:pe.key)==="tableContents"){let Te=[],Fa=(da=ae==null?void 0:ae.find(oa=>(oa==null?void 0:oa.key)==="header"))==null?void 0:da.contents,Na=(H==null?void 0:H[1])??"";if(Fa!=null&&Fa.every(oa=>Array.isArray(oa))){let oa=le.getColumnChild((Sa=Fa==null?void 0:Fa[0])==null?void 0:Sa.filter(ja=>(ja==null?void 0:ja.label)!=="操作"));(Ma=pe.contents)==null||Ma.forEach(ja=>{let aa={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),oa==null||oa.forEach((je,pa)=>{let te=ja[pa];typeof ja[pa]=="number"&&(te=ja[pa].toString()),(Na===""||Na===je.prop)&&(aa[je.prop]=te)}),Te.push(aa)}),Te=W(Te)}else{let oa=(ca=Fa==null?void 0:Fa.map(ja=>ja==null?void 0:ja.label))==null?void 0:ca.filter(ja=>ja!=="操作");(Ue=pe.contents)==null||Ue.forEach(ja=>{let aa={};ja=ja==null?void 0:ja.filter(je=>!(je!=null&&je.id)),oa==null||oa.forEach((je,pa)=>{let te=ja[pa];typeof ja[pa]=="number"&&(te=ja[pa].toString()),(Na===""||Na===je)&&(aa[je]=te)}),Te.push(aa)})}V=Te}})}return V}else if(ue!=null&&ue.includes("/")){let H={};return(Le=M.cloneDeep(q))==null||Le.forEach((V,ae)=>{var pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we;if((V==null?void 0:V.comp)==="Table"){let fa=Array.isArray((da=(ve=(pe=V==null?void 0:V.compData)==null?void 0:pe.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:ve.contents)==null?void 0:da[0])?(Ma=(Sa=(Ue=(ca=V==null?void 0:V.compData)==null?void 0:ca.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:Ue.contents)==null?void 0:Sa[0])==null?void 0:Ma.some(Me=>Me==null?void 0:Me.children):[],ea=(Na=(Fa=(Te=V==null?void 0:V.compData)==null?void 0:Te.find(Me=>(Me==null?void 0:Me.key)==="tableContents"))==null?void 0:Fa.contents)==null?void 0:Na.map(Me=>(Me!=null&&Me.find(Fe=>Fe==null?void 0:Fe.id)&&(Me=Me.slice(1)),Me)),Ta=(pa=(je=(aa=(ja=(oa=V==null?void 0:V.compData)==null?void 0:oa.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:ja.contents)==null?void 0:aa[0])==null?void 0:je[0])==null?void 0:pa.label,Ee=(ce=(te=V==null?void 0:V.compData)==null?void 0:te.find(Me=>(Me==null?void 0:Me.key)==="header"))==null?void 0:ce.contents;if(fa)(fa==null?void 0:fa.length)===0?H[V.name]=H!=null&&H[V.name]?H[V.name]:le.tableToForm(ea,Ee):H[Ta]=le.tableToForm(ea,Ee);else{const Me=[];Ee=Ee.slice(1,Ee.length-1),Ee==null||Ee.forEach((Fe,$e)=>{ea==null||ea.forEach(he=>{Me.push({key:Fe.label+he[0],value:he[$e+1]})})}),H["form"+ae]=Me}}else{const fa=(we=(Se=V.compData)==null?void 0:Se.find(Ta=>(Ta==null?void 0:Ta.key)==="formContent"))==null?void 0:we.contents;H!=null&&H.form||(H.form=[]);const ea=[];fa==null||fa.forEach(Ta=>{Ta.key!==""&&(Ta={key:(Ta==null?void 0:Ta.key)??(Ta==null?void 0:Ta.label),value:Ta==null?void 0:Ta.value},ea.push(Ta))}),H.form=[...ea,...M.cloneDeep(H==null?void 0:H.form)]}}),H}else{if(ue==="createInsofDataApi"){let H=(se=M.cloneDeep(B))==null?void 0:se[0];return H={comp:(me=M.cloneDeep(H))==null?void 0:me.comp,compData:(qe=M.cloneDeep(H))==null?void 0:qe.compData,name:(ka=M.cloneDeep(H))==null?void 0:ka.name,isShow:(_a=M.cloneDeep(H))==null?void 0:_a.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:H}}}return ue}},fe=async(ue,B,oe)=>{var Ke,Ae,Qe;let q=await le.getItemData(B,sessionStorage.getItem("systemKey"),""),ye=q==null?void 0:q.find(Ea=>(Ea==null?void 0:Ea.name)===(oe==null?void 0:oe[0]));if(ye){if((ye==null?void 0:ye.comp)==="Table"){let Ea={};for(let me in M.cloneDeep(ue))M.cloneDeep(ue)[me]!=="loginUser"?Ea[me]=M.cloneDeep(ue)[me]:Ea[me]=((Ke=y.value)==null?void 0:Ke.account)||((Ae=y.value)==null?void 0:Ae.账号);let ne=[],ua=Ea;Array.isArray(ue)||(ua=[Ea]),ua==null||ua.forEach(me=>{ne.push({[me[oe[1]]]:me})});let Pe=[],Re=ne==null?void 0:ne.map(me=>{var qe;return(qe=Object.keys(me))==null?void 0:qe[0]});q==null||q.forEach(me=>{var qe;(me==null?void 0:me.name)===(oe==null?void 0:oe[0])&&((qe=me==null?void 0:me.compData)==null||qe.forEach(ka=>{var _a;(ka==null?void 0:ka.key)==="tableContents"&&((_a=ka==null?void 0:ka.contents)==null||_a.forEach(H=>{H!=null&&H.some(V=>Re.includes(V))&&Pe.push({[H.find(V=>V.id).id]:H.find(V=>Re.includes(V))})}))}))});let Le=Pe==null?void 0:Pe.map(me=>{var qe;return(qe=Object.keys(me))==null?void 0:qe[0]}),se=[];if(Le==null||Le.forEach(me=>{var _a;let qe=(_a=Pe==null?void 0:Pe.find(H=>{var V;return((V=Object.keys(H))==null?void 0:V[0].toString())===me.toString()}))==null?void 0:_a[me],ka=ne==null?void 0:ne.find(H=>{var V;return((V=Object.keys(H))==null?void 0:V[0])===qe});se.push({id:parseInt(me),value:{tableData:ka[qe]}})}),(se==null?void 0:se.length)>0)return se}else if((ye==null?void 0:ye.comp)==="Form"){let Ea=M.cloneDeep(ye);Ea.compData=(Qe=Ea.compData)==null?void 0:Qe.map(Pe=>{var Re;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(Re=Pe.contents)==null?void 0:Re.map(Le=>((Le==null?void 0:Le.key)===(oe==null?void 0:oe[1])&&(Le.value=(ue==null?void 0:ue[Le==null?void 0:Le.prop])||ue),Le))),Pe});let ne={};for(let Pe in Ea)Pe!=="id"&&(ne[Pe]=Ea[Pe]);let ua=[];if(ua.push({id:ye==null?void 0:ye.id,keyType:oe==null?void 0:oe[1],value:{pageData:ne}}),(ua==null?void 0:ua.length)>0)return ua}}},de=async(ue,B,oe)=>{var Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se;let q=await le.getItemData(B,sessionStorage.getItem("systemKey"),""),ye=q==null?void 0:q.find(me=>(me==null?void 0:me.name)===(oe==null?void 0:oe[0]));if(ye){if((ye==null?void 0:ye.comp)==="Table"){let me={};for(let qe in M.cloneDeep(ue))M.cloneDeep(ue)[qe]!=="loginUser"?me[qe]=M.cloneDeep(ue)[qe]:me[qe]=((Ke=y.value)==null?void 0:Ke.account)||((Ae=y.value)==null?void 0:Ae.账号);await qr.createInsofDataApi({key:{type:"data",pageKey:B,tableId:ye==null?void 0:ye.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:me}})}else if((ye==null?void 0:ye.comp)==="Form"){let me=M.cloneDeep(ye),qe=Object.keys(ue),ka="";(Ea=(Qe=M.cloneDeep(me))==null?void 0:Qe.compData)==null||Ea.forEach(ve=>{var da,ca;(ve==null?void 0:ve.key)==="formContent"&&((ca=(da=M.cloneDeep(ve))==null?void 0:da.contents)==null||ca.forEach(Ue=>{var Sa;qe.includes(Ue==null?void 0:Ue.key)&&(Ue==null?void 0:Ue.value)===((Sa=y.value)==null?void 0:Sa.姓名)&&(ka=Ue==null?void 0:Ue.key)}))});let _a=[];(ne=Object.values(ue[ka]))==null||ne.forEach(ve=>{ve!=null&&ve.includes("(")&&_a.push(ve)}),_a=[...new Set(_a)];const H=_a==null?void 0:_a.map(async ve=>{var Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se;let da="";(ja=(oa=(Na=(Fa=(Te=(Ma=M.cloneDeep(ve))==null?void 0:Ma.split("("))==null?void 0:Te[1])==null?void 0:Fa.split(")"))==null?void 0:Na[0])==null?void 0:oa.split(":"))==null||ja.forEach(we=>{da=da===""?da+we.replaceAll("'",""):da+"/"+we.replaceAll("'","")});let ca=[];(Se=(ce=(te=(pa=(je=(aa=M.cloneDeep(ve))==null?void 0:aa.split("<"))==null?void 0:je[1])==null?void 0:pa.split(">"))==null?void 0:te[0])==null?void 0:ce.split(":"))==null||Se.forEach(we=>{ca.push(we.replaceAll("'",""))});const Ue=await le.getItemData(da,sessionStorage.getItem("systemKey"),"");let Sa="";return Ue==null||Ue.forEach(we=>{var fa;we.name===(ca==null?void 0:ca[0])&&((fa=we==null?void 0:we.compData)==null||fa.forEach(ea=>{var Ta;(ea==null?void 0:ea.key)==="formContent"&&((Ta=ea.contents)==null||Ta.forEach(Ee=>{(Ee==null?void 0:Ee.key)===(ca==null?void 0:ca[1])&&(Sa=Ee==null?void 0:Ee.value)}))}))}),{[ve]:Sa}}),V=await Promise.all(H);me.compData=(Pe=(ua=M.cloneDeep(me))==null?void 0:ua.compData)==null?void 0:Pe.map(ve=>{var da,ca;return(ve==null?void 0:ve.key)==="formContent"&&(ve.contents=(ca=(da=M.cloneDeep(ve))==null?void 0:da.contents)==null?void 0:ca.map(Ue=>{var Sa,Ma,Te,Fa;return(Sa=ue[ka])!=null&&Sa[Ue==null?void 0:Ue.key]&&(ue[ka][Ue==null?void 0:Ue.key].includes("(")?Ue.value=(Ma=V==null?void 0:V.find(Na=>{var oa;return((oa=Object.keys(Na))==null?void 0:oa[0])===ue[ka][Ue==null?void 0:Ue.key]}))==null?void 0:Ma[ue[ka][Ue==null?void 0:Ue.key]]:Ue.value=(Fa=(Te=M.cloneDeep(ue))==null?void 0:Te[ka])==null?void 0:Fa[Ue==null?void 0:Ue.key]),Ue})),ve});const ae=await qr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let pe="";((Re=ae==null?void 0:ae.data)==null?void 0:Re.type)==="success"&&((se=(Le=ae==null?void 0:ae.data)==null?void 0:Le.result)==null||se.forEach(ve=>{var da,ca;((ca=(da=ve==null?void 0:ve.value)==null?void 0:da.pageData)==null?void 0:ca.name)===(oe==null?void 0:oe[0])&&(pe=ve.id)}),await qr.updateInsofDataApi({id:pe,value:{pageData:me}}))}}},j=(ue,B="",oe={})=>{for(const[q,ye]of Object.entries(ue)){const Ke=B?`${B}.${q}`:q;ye!==null&&typeof ye=="object"&&!Array.isArray(ye)&&Object.prototype.toString.call(ye)!=="[object Date]"?j(ye,Ke,oe):oe[Ke]=ye}return oe},U=async(ue,B,oe,q)=>{var Ae,Qe,Ea,ne,ua,Pe,Re,Le,se,me,qe,ka,_a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa;let ye=await le.getItemData(B,sessionStorage.getItem("systemKey"),""),Ke=ye==null?void 0:ye.find(Na=>(Na==null?void 0:Na.name)===(oe==null?void 0:oe[0]));if(Ke){if(!(oe!=null&&oe[1])&&(Ke==null?void 0:Ke.comp)==="Table"){let Na={},oa=[],ja=(Qe=(Ae=Ke==null?void 0:Ke.compData)==null?void 0:Ae.find(pa=>(pa==null?void 0:pa.key)==="header"))==null?void 0:Qe.contents;ja!=null&&ja.every(pa=>Array.isArray(pa))?oa=(ne=le.getColumnChild((Ea=ja==null?void 0:ja[0])==null?void 0:Ea.filter(pa=>(pa==null?void 0:pa.label)!=="操作")))==null?void 0:ne.map(pa=>pa==null?void 0:pa.prop):oa=ja==null?void 0:ja.map(pa=>pa==null?void 0:pa.label);for(let pa in M.cloneDeep(ue))if(M.cloneDeep(ue)[pa]!=="loginUser"){let te=j(M.cloneDeep(ue)[pa]),ce={};for(let Se in te)if(oa!=null&&oa.find(we=>we===Se))ce[Se]=te[Se];else if(oa!=null&&oa.find(we=>(we==null?void 0:we.toUpperCase())===(Se==null?void 0:Se.toUpperCase()))){let we=oa==null?void 0:oa.find(fa=>(fa==null?void 0:fa.toUpperCase())===(Se==null?void 0:Se.toUpperCase()));ce[we]=te[Se]}Na[pa]=ce}else Na[pa]=((ua=y.value)==null?void 0:ua.account)||((Pe=y.value)==null?void 0:Pe.账号);let aa=await qr.getInsofDataApi({keyLikes:{tableId:Ke==null?void 0:Ke.id}});if(((Le=(Re=aa==null?void 0:aa.data)==null?void 0:Re.result)==null?void 0:Le.length)>0){let pa=(me=(se=aa==null?void 0:aa.data)==null?void 0:se.result)==null?void 0:me.map(te=>te==null?void 0:te.id);(pa==null?void 0:pa.length)>0&&await qr.batchDeleteInsofDataApi({ids:pa})}let je=[];if((qe=Ke==null?void 0:Ke.compData)!=null&&qe.find(pa=>(pa==null?void 0:pa.key)==="pageColumn")&&((H=(_a=(ka=Ke==null?void 0:Ke.compData)==null?void 0:ka.find(pa=>(pa==null?void 0:pa.key)==="pageColumn"))==null?void 0:_a.contents)!=null&&H.includes("["))){const pa=await qr.getInsofDataApi({id:Ke==null?void 0:Ke.tableId});let te=((ve=(pe=(ae=(V=pa==null?void 0:pa.data)==null?void 0:V.result)==null?void 0:ae[0])==null?void 0:pe.key)==null?void 0:ve.pageKey)??"";(da=Object.values(Na))==null||da.forEach(ce=>{je.push({key:{type:"data",pageKey:te,tableId:Ke==null?void 0:Ke.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ce}})})}else(ca=Object.values(Na))==null||ca.forEach(pa=>{je.push({key:{type:"data",pageKey:B,tableId:Ke==null?void 0:Ke.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pa}})});(je==null?void 0:je.length)>0&&await qr.batchAddInsofDataApi({dataList:je})}else if(!(oe!=null&&oe[1])&&(Ke==null?void 0:Ke.comp)==="Form"){let Na=M.cloneDeep(Ke);Na.compData=(Sa=(Ue=M.cloneDeep(Na))==null?void 0:Ue.compData)==null?void 0:Sa.map(aa=>{var je,pa;return(aa==null?void 0:aa.key)==="formContent"&&(aa.contents=(pa=(je=M.cloneDeep(aa))==null?void 0:je.contents)==null?void 0:pa.map(te=>{var ce,Se;return(ce=M.cloneDeep(ue))!=null&&ce[te==null?void 0:te.key]&&(te.value=(Se=M.cloneDeep(ue))==null?void 0:Se[te==null?void 0:te.key]),te})),aa});const oa=await qr.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let ja="";((Ma=oa==null?void 0:oa.data)==null?void 0:Ma.type)==="success"&&((Fa=(Te=oa==null?void 0:oa.data)==null?void 0:Te.result)==null||Fa.forEach(aa=>{var je,pa;((pa=(je=aa==null?void 0:aa.value)==null?void 0:je.pageData)==null?void 0:pa.name)===(oe==null?void 0:oe[0])&&(ja=aa.id)}),await qr.updateInsofDataApi({id:ja,value:{pageData:Na}}))}}},Z=async ue=>{var B,oe,q,ye,Ke,Ae,Qe,Ea,ne,ua,Pe,Re,Le,se;w.setImportLoading(!0);try{if(ue.api){let me=new WeakMap,qe=await le.getItemData((k==null?void 0:k.value)===""?E.value:k==null?void 0:k.value,sessionStorage.getItem("systemKey"),"",!1,"","",me),ka="";if(qe=qe==null?void 0:qe.map(ca=>{var Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te;if((ca==null?void 0:ca.comp)==="Form")ca.compData=(Ue=ca.compData)==null?void 0:Ue.map(ce=>{var Se;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(Se=ce.contents)==null?void 0:Se.map(we=>{var fa;if((we==null?void 0:we.value)===""&&(we==null?void 0:we.type)==="Select"){let ea=le.judgeContents((fa=M.cloneDeep(we))==null?void 0:fa.optionUrl,me);we.value=we.value||ea}return we})),ce});else if((ca==null?void 0:ca.comp)==="Table"&&(Sa=ca.compData)!=null&&Sa.find(ce=>(ce==null?void 0:ce.key)==="pageColumn")){let ce=(Te=(Ma=ca.compData)==null?void 0:Ma.find(ea=>(ea==null?void 0:ea.key)==="pageColumn"))==null?void 0:Te.contents,Se=((Na=(Fa=ca.compData)==null?void 0:Fa.find(ea=>(ea==null?void 0:ea.key)==="pageGroup"))==null?void 0:Na.contents)??"",we=(aa=(ja=(oa=ce==null?void 0:ce.split("["))==null?void 0:oa[1])==null?void 0:ja.split("]"))==null?void 0:aa[0];ka=((je=ce==null?void 0:ce.split("["))==null?void 0:je[0])+((te=(pa=A.value)==null?void 0:pa.find(ea=>(ea==null?void 0:ea.key)===we))==null?void 0:te.value)}return ca}),!(ka===""||ka==="")){const ca=await le.getItemData(ka,sessionStorage.getItem("systemKey"),"",!1,"","",me);qe=qe==null?void 0:qe.map(Ue=>{var Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se;if((Ue==null?void 0:Ue.comp)==="Table"&&(Sa=Ue.compData)!=null&&Sa.find(we=>(we==null?void 0:we.key)==="pageColumn")){let we=(Te=(Ma=Ue.compData)==null?void 0:Ma.find(Me=>(Me==null?void 0:Me.key)==="pageColumn"))==null?void 0:Te.contents,fa=((Na=(Fa=Ue.compData)==null?void 0:Fa.find(Me=>(Me==null?void 0:Me.key)==="pageGroup"))==null?void 0:Na.contents)??"",ea=(aa=(ja=(oa=we==null?void 0:we.split("["))==null?void 0:oa[1])==null?void 0:ja.split("]"))==null?void 0:aa[0],Ta=((je=we==null?void 0:we.split("["))==null?void 0:je[0])+((te=(pa=A.value)==null?void 0:pa.find(Me=>(Me==null?void 0:Me.key)===ea))==null?void 0:te.value),Ee=(ce=ca==null?void 0:ca.find(Me=>(Me==null?void 0:Me.name)===(fa===""?i==null?void 0:i.compName:fa)))==null?void 0:ce.compData;Ue.compData=(Se=Ue.compData)==null?void 0:Se.map(Me=>{var Fe;return(Me==null?void 0:Me.key)==="tableContents"&&(Me.contents=(Fe=Ee==null?void 0:Ee.find($e=>($e==null?void 0:$e.key)==="tableContents"))==null?void 0:Fe.contents),Me})}return Ue})}let _a={};if(((oe=(B=ue==null?void 0:ue.extraValues)==null?void 0:B.input)==null?void 0:oe.length)>0){const ca=(ye=(q=ue==null?void 0:ue.extraValues)==null?void 0:q.input)==null?void 0:ye.map(async Ue=>{var Sa;ee!=null&&ee.find(Ma=>Ma===Ue)?_a=await Y(Ue,qe):_a[Object.keys(Ue)[0]]=await Y((Sa=Object.values(Ue))==null?void 0:Sa[0],qe,me)});await Promise.all(ca)}else _a=await Y("/",qe);let H=!1;(Ae=(Ke=ue==null?void 0:ue.extraValues)==null?void 0:Ke.output)==null||Ae.forEach(ca=>{var Ue,Sa;(Sa=(Ue=Object.values(ca))==null?void 0:Ue[0])!=null&&Sa.includes(".doc")&&(H=!0)});let V;if(H){const ca=M.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});V=await Ja.axios.post(ue.api,_a,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{ca.close()})}else V=await Ja.axios.post(ue.api,_a,{headers:{"Content-Type":"application/json"}});let ae=(ua=(ne=(Ea=(Qe=M.cloneDeep(ue))==null?void 0:Qe.extraValues)==null?void 0:Ea.output)==null?void 0:ne.map(ca=>{var Ue,Sa,Ma,Te,Fa,Na,oa,ja,aa,je,pa,te,ce,Se,we,fa;if(!((Sa=(Ue=Object.values(ca))==null?void 0:Ue[0])!=null&&Sa.includes(".doc"))){let ea=(je=(aa=(ja=(Te=M.cloneDeep((Ma=Object.values(ca))==null?void 0:Ma[0]))==null?void 0:Te.split("["))==null?void 0:ja[((oa=(Na=M.cloneDeep((Fa=Object.values(ca))==null?void 0:Fa[0]))==null?void 0:Na.split("["))==null?void 0:oa.length)-1])==null?void 0:aa.split("]"))==null?void 0:je[0],Ta=ea==null?void 0:ea.split(":"),Ee=(ce=M.cloneDeep((pa=Object.values(ca))==null?void 0:pa[0]))==null?void 0:ce.substring(0,M.cloneDeep((te=Object.values(ca))==null?void 0:te[0]).lastIndexOf("["));if(Ee=(we=M.cloneDeep(Ee))==null?void 0:we.slice(0,((Se=M.cloneDeep(Ee))==null?void 0:Se.length)-1),Ee!=null&&Ee.includes("[")){let Me="";if((fa=le.contentTransArrayToAll(Ee,"/"))==null||fa.forEach(Fe=>{var $e,he,tl,El,Ml,Hl,Bl;if(!(Fe!=null&&Fe.includes("[")))Me=Me===""?Me+Fe.replaceAll("/",""):Me+"/"+Fe.replaceAll("/","");else{let jl=M.cloneDeep(Fe).slice(1,(($e=M.cloneDeep(Fe))==null?void 0:$e.length)-1),el=(Hl=(Ml=(El=(tl=(he=M.cloneDeep(jl))==null?void 0:he.split("["))==null?void 0:tl[1])==null?void 0:El.split("]"))==null?void 0:Ml[0])==null?void 0:Hl.split(":"),$l="",Wa=(Bl=qe==null?void 0:qe.find(Kl=>(Kl==null?void 0:Kl.name)===(el==null?void 0:el[0])))==null?void 0:Bl.compData;Wa==null||Wa.forEach(Kl=>{var Jl;(Kl==null?void 0:Kl.key)==="formContent"&&((Jl=Kl==null?void 0:Kl.contents)==null||Jl.forEach(ar=>{(ar==null?void 0:ar.key)===(el==null?void 0:el[1])&&($l=ar==null?void 0:ar.value)}))}),Me=Me===""?Me+$l.replaceAll("/",""):Me+"/"+$l.replaceAll("/","")}}),Ee=Me,Ee[(Ee==null?void 0:Ee.length)-1]!=="/")return Ee}}}))==null?void 0:ua.filter(ca=>ca);ae=[...new Set(M.cloneDeep(ae))];let pe=ae==null?void 0:ae.map(async ca=>{let Ue=await le.getItemData(ca,sessionStorage.getItem("systemKey"),"",!1,"","",me);if((Ue==null?void 0:Ue.length)===0)return await le.getParentContents(ca)});await Promise.all(pe);let ve=[],da=(Le=(Re=(Pe=M.cloneDeep(ue))==null?void 0:Pe.extraValues)==null?void 0:Re.output)==null?void 0:Le.map(async ca=>{var ja,aa,je,pa,te,ce,Se,we,fa,ea,Ta,Ee,Me,Fe,$e,he,tl,El,Ml,Hl,Bl,jl,el,$l,Wa,Kl,Jl,ar,xl,br,ya,sl,ha,Ha,ra,Ga,wl,De,ia,Pa,Be,La,al,bl,Tl,Oe,ma,ta,xa,ga,fl,Ve,ml,Ne,Pl,Da,ul,Za,Nl,Ba,Rl,Er,tn,Fr,ir,Ur,Zr,Or,rr,en;if((aa=(ja=Object.values(ca))==null?void 0:ja[0])!=null&&aa.includes(".doc")){var Ue=new Blob([V.data],{type:"application/octet-stream;charset=UTF-8"}),Sa=V.headers["content-disposition"],Ma=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Te=Ma.exec(Sa),Fa=Te==null?void 0:Te[1],Na=document.createElement("a"),oa=window.URL.createObjectURL(Ue);f.value=[{name:Fa,blobUrl:oa}],o.value=!0}else{let Gr=(ea=(fa=(we=(pa=M.cloneDeep((je=Object.values(ca))==null?void 0:je[0]))==null?void 0:pa.split("["))==null?void 0:we[((Se=(ce=M.cloneDeep((te=Object.values(ca))==null?void 0:te[0]))==null?void 0:ce.split("["))==null?void 0:Se.length)-1])==null?void 0:fa.split("]"))==null?void 0:ea[0],or=Gr==null?void 0:Gr.split(":"),Cr=(Me=M.cloneDeep((Ta=Object.values(ca))==null?void 0:Ta[0]))==null?void 0:Me.substring(0,M.cloneDeep((Ee=Object.values(ca))==null?void 0:Ee[0]).lastIndexOf("["));if(Cr!=null&&Cr.includes("[")?Cr=($e=M.cloneDeep(Cr))==null?void 0:$e.slice(0,((Fe=M.cloneDeep(Cr))==null?void 0:Fe.length)-1):Cr===""&&(Cr=E.value),Cr=Cr.replaceAll("<","[").replaceAll(">","]"),Cr!=null&&Cr.includes("[")){let Wl="";(he=le.contentTransArrayToAll(Cr,"/"))==null||he.forEach((tr,kr)=>{var Lr,Il,ln,sr,_r,Mr,Br,zn,ri,Mn,wn;if(!(tr!=null&&tr.includes("[")))Wl=Wl===""?Wl+tr.replaceAll("/",""):Wl+"/"+tr.replaceAll("/","");else{let Gn="",pn="";(Lr=M.cloneDeep(tr))!=null&&Lr.includes("]")?(Gn=M.cloneDeep(tr).slice(1,((Il=M.cloneDeep(tr))==null?void 0:Il.length)-1),pn=(Br=(Mr=(_r=(sr=(ln=M.cloneDeep(Gn))==null?void 0:ln.split("["))==null?void 0:sr[1])==null?void 0:_r.split("]"))==null?void 0:Mr[0])==null?void 0:Br.split(":")):(Gn=M.cloneDeep(tr).slice(1,(zn=M.cloneDeep(tr))==null?void 0:zn.length),pn=(ri=M.cloneDeep(Gn))==null?void 0:ri.split("/"));let In="",ni=(Mn=qe==null?void 0:qe.find(fn=>(fn==null?void 0:fn.name)===(pn==null?void 0:pn[0])))==null?void 0:Mn.compData;ni==null||ni.forEach(fn=>{var ii;(fn==null?void 0:fn.key)==="formContent"&&((ii=fn==null?void 0:fn.contents)==null||ii.forEach(Tn=>{(Tn==null?void 0:Tn.key)===(pn==null?void 0:pn[1])&&(In=Tn==null?void 0:Tn.value)}))}),((wn=le.contentTransArrayToAll(Cr,"/"))==null?void 0:wn.length)-1!==kr?Wl=Wl===""?Wl+In.replaceAll("/",""):Wl+"/"+In.replaceAll("/",""):Wl=Wl+r.value+In.replaceAll("/","")}}),(tl=E.value)!=null&&tl.includes(Wl)?Cr=E.value:Cr=Wl}let an=M.cloneDeep((El=Object.keys(ca))==null?void 0:El[0]);if(((Ml=V==null?void 0:V.data)==null?void 0:Ml.statusCode)===200||((Hl=V==null?void 0:V.data)==null?void 0:Hl.code)===200){if(((jl=(Bl=V==null?void 0:V.data)==null?void 0:Bl.data)!=null&&jl[an]||($l=(el=V==null?void 0:V.data)==null?void 0:el.result)!=null&&$l[an])&&(or==null?void 0:or.length)===1)return await U(((Kl=(Wa=V==null?void 0:V.data)==null?void 0:Wa.data)==null?void 0:Kl[an])||((ar=(Jl=V==null?void 0:V.data)==null?void 0:Jl.result)==null?void 0:ar[an]),M.cloneDeep(Cr),or,ka);if((br=(xl=V==null?void 0:V.data)==null?void 0:xl.data)!=null&&br[an]||(sl=(ya=V==null?void 0:V.data)==null?void 0:ya.result)!=null&&sl[an]){let Wl=await fe(((Ha=(ha=V==null?void 0:V.data)==null?void 0:ha.data)==null?void 0:Ha[an])||((Ga=(ra=V==null?void 0:V.data)==null?void 0:ra.result)==null?void 0:Ga[an]),M.cloneDeep(Cr),or);return Wl&&(ve=[...ve,...Wl]),Wl}else{if(!((wl=V==null?void 0:V.data)!=null&&wl.data)){let Wl=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",me);Wl=Wl==null?void 0:Wl.map(kr=>{var Lr;return(kr==null?void 0:kr.name)===(or==null?void 0:or[0])&&(kr.compData=(Lr=kr.compData)==null?void 0:Lr.map(Il=>{var ln;return(Il==null?void 0:Il.key)==="formContent"&&(Il.contents=(ln=Il.contents)==null?void 0:ln.map(sr=>{var _r,Mr;return(sr==null?void 0:sr.key)===(or==null?void 0:or[1])&&(sr.value=(Mr=(_r=V==null?void 0:V.data)==null?void 0:_r.result)==null?void 0:Mr[an==null?void 0:an.replaceAll(":","")]),sr})),Il})),kr});let tr=[];(De=Wl==null?void 0:Wl.filter(kr=>(kr==null?void 0:kr.comp)==="Form"))==null||De.forEach(async kr=>{let Lr={};for(let Il in kr)Il!=="id"&&(Lr[Il]=kr[Il]);tr.push({id:kr==null?void 0:kr.id,value:{pageData:Lr}})}),(tr==null?void 0:tr.length)>0&&await qr.batchUpdateInsofDataApi({dataList:tr});return}if((or==null?void 0:or.length)===1){const Wl=(Be=(Pa=(ia=V==null?void 0:V.data)==null?void 0:ia.data)==null?void 0:Pa.path)==null?void 0:Be.path;let tr="";(Oe=(Tl=(bl=(al=(La=Wl==null?void 0:Wl.split("("))==null?void 0:La[1])==null?void 0:al.split(")"))==null?void 0:bl[0])==null?void 0:Tl.split(":"))==null||Oe.forEach(Il=>{var ln,sr;tr=tr===""?tr+((ln=Il==null?void 0:Il.replaceAll("'",""))==null?void 0:ln.trim()):tr+"/"+((sr=Il==null?void 0:Il.replaceAll("'",""))==null?void 0:sr.trim())});let kr=[(fl=(ga=(xa=(ta=(ma=Wl==null?void 0:Wl.split("<"))==null?void 0:ma[1])==null?void 0:ta.split(">"))==null?void 0:xa[0])==null?void 0:ga.replaceAll("'",""))==null?void 0:fl.trim()],Lr;return(Ne=(ml=(Ve=V==null?void 0:V.data)==null?void 0:Ve.data)==null?void 0:ml.data)!=null&&Ne[or==null?void 0:or[0]]?Lr=await U((ul=(Da=(Pl=V==null?void 0:V.data)==null?void 0:Pl.data)==null?void 0:Da.data)==null?void 0:ul[or==null?void 0:or[0]],tr,or,ka):Lr=await de((Nl=(Za=V==null?void 0:V.data)==null?void 0:Za.data)==null?void 0:Nl.data,tr,kr,me),Lr}else{const Wl=(Er=(Rl=(Ba=V==null?void 0:V.data)==null?void 0:Ba.data)==null?void 0:Rl.path)==null?void 0:Er.path;let tr="";return(Zr=(Ur=(ir=(Fr=(tn=Wl==null?void 0:Wl.split("("))==null?void 0:tn[1])==null?void 0:Fr.split(")"))==null?void 0:ir[0])==null?void 0:Ur.split(":"))==null||Zr.forEach(Lr=>{var Il,ln;tr=tr===""?tr+((Il=Lr==null?void 0:Lr.replaceAll("'",""))==null?void 0:Il.trim()):tr+"/"+((ln=Lr==null?void 0:Lr.replaceAll("'",""))==null?void 0:ln.trim())}),await fe((en=(rr=(Or=V==null?void 0:V.data)==null?void 0:Or.data)==null?void 0:rr.data)==null?void 0:en[or==null?void 0:or[0]],tr,or)}}}}});if(await Promise.all(da),(ve==null?void 0:ve.length)>0){let ca=[];ve==null||ve.forEach(Ma=>{ca!=null&&ca.find(Te=>{var Fa,Na,oa,ja;return((Na=(Fa=Te==null?void 0:Te.value)==null?void 0:Fa.pageData)==null?void 0:Na.name)===((ja=(oa=Ma==null?void 0:Ma.value)==null?void 0:oa.pageData)==null?void 0:ja.name)})||ca.push(Ma)});let Ue=[];ca==null||ca.forEach(Ma=>{var Na,oa,ja,aa;let Te=M.cloneDeep(Ma);Te.value.pageData.compData=(Na=Te.value.pageData.compData)==null?void 0:Na.map(je=>{var pa;return(je==null?void 0:je.key)==="formContent"&&(je.contents=(pa=je.contents)==null?void 0:pa.map(te=>{var Se,we,fa,ea;let ce=(Se=M.cloneDeep(ve))==null?void 0:Se.find(Ta=>(Ta==null?void 0:Ta.keyType)===(te==null?void 0:te.key));if(ce){let Ta=(ea=(fa=(we=ce.value.pageData.compData)==null?void 0:we.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:fa.contents)==null?void 0:ea.find(Ee=>(Ee==null?void 0:Ee.key)===(te==null?void 0:te.key));te.value=Ta==null?void 0:Ta.value}return te})),je}),Ue.push({id:Te==null?void 0:Te.id,value:Te==null?void 0:Te.value});let Fa=[];(aa=(ja=(oa=Te==null?void 0:Te.value)==null?void 0:oa.pageData)==null?void 0:ja.compData)==null||aa.forEach(je=>{var pa;(je==null?void 0:je.key)==="formContent"&&((pa=je==null?void 0:je.contents)==null||pa.forEach(te=>{var ce,Se,we,fa,ea,Ta;if((Se=(ce=te==null?void 0:te.optionUrl)==null?void 0:ce.menuSelect)!=null&&Se.find(Ee=>Ee==null?void 0:Ee.includes("[")))if(Fa!=null&&Fa.find(Ee=>{var Me,Fe,$e;return((Me=Ee==null?void 0:Ee.key)==null?void 0:Me.join(","))===(($e=(Fe=te==null?void 0:te.optionUrl)==null?void 0:Fe.menuSelect)==null?void 0:$e.join(","))})){let Ee=(we=Fa==null?void 0:Fa.find(Me=>{var Fe,$e,he;return((Fe=Me==null?void 0:Me.key)==null?void 0:Fe.join(","))===((he=($e=te==null?void 0:te.optionUrl)==null?void 0:$e.menuSelect)==null?void 0:he.join(","))}))==null?void 0:we.value;Ee.push({key:te==null?void 0:te.prop,groups:(fa=te==null?void 0:te.optionUrl)==null?void 0:fa.groupSelect,value:te==null?void 0:te.value}),Fa=Fa==null?void 0:Fa.map(Me=>{var Fe,$e,he;return((Fe=Me==null?void 0:Me.key)==null?void 0:Fe.join(","))===((he=($e=te==null?void 0:te.optionUrl)==null?void 0:$e.menuSelect)==null?void 0:he.join(","))&&(Me.value=Ee),Me})}else Fa.push({key:(ea=te==null?void 0:te.optionUrl)==null?void 0:ea.menuSelect,value:[{key:te==null?void 0:te.prop,groups:(Ta=te==null?void 0:te.optionUrl)==null?void 0:Ta.groupSelect,value:te==null?void 0:te.value}]})}))}),(Fa==null?void 0:Fa.length)>0&&(Fa=Fa==null?void 0:Fa.map(je=>{var te;let pa="";return(te=je==null?void 0:je.key)==null||te.forEach(ce=>{var Se;if(!(ce!=null&&ce.includes("[")))pa=pa===""?pa+ce:pa+"/"+ce;else{let we="",fa=(Se=ce==null?void 0:ce.replaceAll("[","").replaceAll("]",""))==null?void 0:Se.split(":");qe==null||qe.forEach(ea=>{var Ta;(ea==null?void 0:ea.name)===(fa==null?void 0:fa[0])&&((Ta=ea==null?void 0:ea.compData)==null||Ta.forEach(Ee=>{var Me;(Ee==null?void 0:Ee.key)==="formContent"&&((Me=Ee==null?void 0:Ee.contents)==null||Me.forEach(Fe=>{(Fe==null?void 0:Fe.prop)===(fa==null?void 0:fa[1])&&(we=Fe==null?void 0:Fe.value)}))}))}),pa=pa+r.value+we}}),je.key=pa,je})),Fa==null||Fa.forEach(je=>{var Se,we,fa;let pa=(Se=me[je.key])==null?void 0:Se.find(ea=>{var Ta,Ee,Me,Fe,$e,he,tl;return((Ee=(Ta=ea==null?void 0:ea.value)==null?void 0:Ta.pageData)==null?void 0:Ee.name)===(($e=(Fe=(Me=je==null?void 0:je.value)==null?void 0:Me[0])==null?void 0:Fe.groups)==null?void 0:$e[0])&&((tl=(he=ea==null?void 0:ea.value)==null?void 0:he.pageData)==null?void 0:tl.name)!==void 0}),te=pa==null?void 0:pa.id,ce=(we=pa==null?void 0:pa.value)==null?void 0:we.pageData;ce.compData=(fa=ce.compData)==null?void 0:fa.map(ea=>{var Ta;return(ea==null?void 0:ea.key)==="formContent"&&(ea.contents=(Ta=ea.contents)==null?void 0:Ta.map(Ee=>{var Fe;let Me=(Fe=je.value)==null?void 0:Fe.find($e=>($e==null?void 0:$e.key)===(Ee==null?void 0:Ee.prop));return Me&&(Ee.value=Me.value),Ee})),ea}),Ue.push({id:te,value:{pageData:ce}})})});let Sa=(se=M.cloneDeep(ve))==null?void 0:se[0];(Ue==null?void 0:Ue.length)>0&&await qr.batchUpdateInsofDataApi({dataList:Ue})}m.setFreshContent(!0)}w.setImportLoading(!1)}catch{Ja.ElMessage.error("方法执行错误,请查看方法!"),w.setImportLoading(!1)}x.value=!0},ee=["createInsofDataApi"],ge=Fl.debounce(async ue=>{Z(ue)},100),Ie=async ue=>{var Ae,Qe,Ea;const B=M.cloneDeep(ue);let oe,q=new WeakMap;ue!=null&&ue[0].path&&(oe=await(B==null?void 0:B.map(async(ne,ua)=>{var _a,H,V,ae,pe,ve,da,ca,Ue,Sa,Ma,Te,Fa,Na,oa,ja;const Re=(_a=q[ne==null?void 0:ne.path])==null?void 0:_a.filter(aa=>{var je;return((je=aa==null?void 0:aa.key)==null?void 0:je.type)==="data"});let Le="";const se=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,q);Re==null||Re.forEach(aa=>{var je,pa,te,ce,Se;((pa=(je=aa==null?void 0:aa.value)==null?void 0:je.tableData)==null?void 0:pa.算法名称)===((te=B==null?void 0:B[ua])==null?void 0:te.method)&&(Le=(Se=(ce=aa==null?void 0:aa.value)==null?void 0:ce.tableData)==null?void 0:Se.算法体)});const me=await le.getItemData(ne==null?void 0:ne.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,q);let qe="",ka=(pe=(ae=(V=(H=me==null?void 0:me[0])==null?void 0:H.compData)==null?void 0:V.find(aa=>(aa==null?void 0:aa.key)==="header"))==null?void 0:ae.contents)==null?void 0:pe.findIndex(aa=>(aa==null?void 0:aa.prop)==="算法体");return(da=(ve=me==null?void 0:me[0])==null?void 0:ve.compData)==null||da.forEach(aa=>{var je;(aa==null?void 0:aa.key)==="tableContents"&&((je=aa==null?void 0:aa.contents)==null||je.forEach(pa=>{pa!=null&&pa.find(te=>te===(ne==null?void 0:ne.method))&&(qe=pa[ka])}))}),{buttonName:((ca=B==null?void 0:B[ua])==null?void 0:ca.method)||((Ma=(Sa=(Ue=Re==null?void 0:Re[0])==null?void 0:Ue.value)==null?void 0:Sa.tableData)==null?void 0:Ma.算法名称),api:(Le===""?(Na=(Fa=(Te=Re==null?void 0:Re[0])==null?void 0:Te.value)==null?void 0:Fa.tableData)==null?void 0:Na.算法体:Le)||qe,content:se==null?void 0:se.filter(aa=>aa.comp!=="methodButton"),extraContent:(oa=M.cloneDeep(ne.value))==null?void 0:oa.slice(1),methodName:(ne==null?void 0:ne.path)??"",extraValues:(ja=B==null?void 0:B[ua])==null?void 0:ja.data}})));const ye=B==null?void 0:B.map(async ne=>{var me,qe,ka,_a,H,V;const ua=(me=resAll.data.result)==null?void 0:me.filter(ae=>{var pe,ve,da;return((pe=ae==null?void 0:ae.key)==null?void 0:pe.parentTable)===""&&((ve=ae==null?void 0:ae.key)==null?void 0:ve.type)==="method"&&((da=ae==null?void 0:ae.key)==null?void 0:da.methodName)===ae.method}),Pe=ua==null?void 0:ua[0],Re=(qe=resAll.data.result)==null?void 0:qe.filter(ae=>{var pe,ve;return((pe=ae==null?void 0:ae.key)==null?void 0:pe.type)==="methodData"&&((ve=ae==null?void 0:ae.key)==null?void 0:ve.tableId)===(Pe==null?void 0:Pe.id)}),Le=await le.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,q),se=Re==null?void 0:Re[0];return{buttonName:(ka=Pe==null?void 0:Pe.key)==null?void 0:ka.methodKey,api:(H=(_a=se==null?void 0:se.value)==null?void 0:_a.tableData)==null?void 0:H[0],content:Le==null?void 0:Le.filter(ae=>ae.comp!=="methodButton"),extraContent:(V=M.cloneDeep(ne.value))==null?void 0:V.slice(1),methodName:(ne==null?void 0:ne.method)??""}}),Ke=(Ae=ue==null?void 0:ue[0])!=null&&Ae.path&&((Qe=ue==null?void 0:ue[0])==null?void 0:Qe.path)!==""?await Promise.all(oe):await Promise.all(ye);l.value=Ke==null?void 0:Ke.filter(ne=>ne==null?void 0:ne.extraContent),(Ea=l.value)==null||Ea.forEach(ne=>{var ua;ne.api===""&&((ua=ne.content)==null||ua.forEach(Pe=>{var Re;Pe.comp=="Table"&&m.setExtraContents(le.methodTableToContent(Pe.compData,(Re=ne.extraContent)==null?void 0:Re[0]))}))})};return e.watch(()=>i.itemData,async()=>{_.value=="view"&&!x.value&&await Ie(M.cloneDeep(i.itemData)),x.value=!1},{immediate:!0,deep:!0}),(ue,B)=>{var oe,q,ye;return e.unref(_)!=="edit"?(e.openBlock(),e.createElementBlock("div",R4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((oe=l.value)==null?void 0:oe.filter(Ke=>(Ke==null?void 0:Ke.buttonName)!=="保存"),Ke=>{var Ae;return e.openBlock(),e.createElementBlock("div",null,[Ke.api!==""?(e.openBlock(),e.createBlock(e.unref(ps._sfc_main),{key:0,disabled:e.unref(F)===e.unref(E)&&!((Ae=Ke==null?void 0:Ke.buttonName)!=null&&Ae.includes("预览")),class:"calculator-content",modelValue:Ke.buttonName,onClickTrigger:Qe=>e.unref(ge)(Ke),loading:g.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(J)!==""&&((ye=e.unref(E))==null?void 0:ye[((q=e.unref(E))==null?void 0:q.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(ps._sfc_main),{key:0,class:"calculator-content",onClickTrigger:O,modelValue:"保存"})):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createBlock(pl.ssFilePreview,{key:0,fileDataList:f.value,onDestroy:I},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},V4=nr._export_sfc($4,[["__scopeId","data-v-063aa9af"]]),F4={};function P4(a,l){return" 567 "}const j4=nr._export_sfc(F4,[["render",P4]]),H4={class:"module content"},U4={class:"module data"},q4={class:"module layout"},W4={class:"form-content"},G4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.reactive({visible:!1,width:"40%",title:"签名配置"}),o=e.ref("create"),f=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([]),w=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:g.value},{key:"signConfig",contents:m.value}]}),d=A=>{var F;m.value=M.cloneDeep(A),r("change",(F=w())==null?void 0:F.compData)},N=A=>{var F,L;if((A==null?void 0:A.buttonName)==="确认"){const E=M.cloneDeep(A==null?void 0:A.content);switch(o.value){case"create":g.value.push({...E,index:((F=g.value)==null?void 0:F.length)+1});break}r("change",(L=w())==null?void 0:L.compData),i.visible=!1}else i.visible=!1},_=(A,F)=>{var L,E;switch(A){case"create":(L=u.value)==null||L.forEach(S=>{S.value=""}),o.value="create",i.visible=!0;break;case"update":(E=u.value)==null||E.forEach(S=>{S.value=F[S==null?void 0:S.prop]}),o.value="update",i.visible=!0;break;case"delete":g.value.splice(F,1),o.value="delete";break}},J=()=>{i.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,A=>{var F,L;A&&(m.value=((F=A==null?void 0:A.find(E=>E.key==="signConfig"))==null?void 0:F.contents)??{},g.value=((L=A==null?void 0:A.find(E=>E.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),(A,F)=>{const L=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",H4,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=S=>_("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",U4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(S,k)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:k},[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:y=>_("update",{...S,index:k+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:y=>_("delete",k)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",q4,[e.createVNode(pl.ssForm,{rowContents:c.value,onChange:d},null,8,["rowContents"])])]),e.createVNode(Ir.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:J,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",W4,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:f.value,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),K4=nr._export_sfc(G4,[["__scopeId","data-v-487e0536"]]),Y4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(0),o=e.computed(()=>{var w,d;return(w=n==null?void 0:n.stepConfig)!=null&&w.allowTrigger?i.value:(d=n==null?void 0:n.stepConfig)==null?void 0:d.active}),f=(w,d)=>{i.value=d-1,r("clickStep",w,d)};e.onMounted(()=>{var w;r("clickStep",(w=n==null?void 0:n.stepList)==null?void 0:w[0],0)});const c=w=>pl.getComponent(w),u=()=>{var d;const w=(d=n==null?void 0:n.stepList)==null?void 0:d.find((N,_)=>_+1===o.value);return console.log("findStep",w),w?w==null?void 0:w.children:[]},m=w=>{r("clickTrigger",w)},g=w=>{r("changeTrigger",w)};return(w,d)=>{var J,A,F,L,E;const N=e.resolveComponent("el-step"),_=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(_,{direction:(J=a.stepConfig)==null?void 0:J.direction,active:o.value,"finish-status":"success",simple:(A=a.stepConfig)==null?void 0:A.simple,"align-center":((F=a.stepConfig)==null?void 0:F.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(S,k)=>(e.openBlock(),e.createBlock(N,{key:k,class:"step-item",onClick:y=>f(S,k+1)},{title:e.withCtx(()=>[e.renderSlot(w.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(w.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u(),(S,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":y=>S.value=y,onClickTrigger:m,onChangeTrigger:g,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(w.$slots,(y,x)=>({name:x,fn:e.withCtx(O=>[e.renderSlot(w.$slots,x,e.mergeProps({ref_for:!0},O||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),J4=nr._export_sfc(Y4,[["__scopeId","data-v-a30ff621"]]),X4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const n=a,r=l,i=e.ref({}),o=e.ref([]),f=(c,u)=>{r("clickStep",c,u)};return e.watch(()=>n==null?void 0:n.itemData,c=>{var w,d,N,_;i.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let u=((w=c==null?void 0:c.find(J=>(J==null?void 0:J.key)==="stepName"))==null?void 0:w.contents)??[],m=[];(N=(d=c==null?void 0:c.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:d.contents)==null||N.forEach(J=>{m.push({label:J==null?void 0:J.label,prop:J==null?void 0:J.prop,name:J==null?void 0:J.prop,type:"text",disabled:!0})});let g=((_=c==null?void 0:c.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:_.contents)??[];u=u==null?void 0:u.map((J,A)=>{let F=m==null?void 0:m.map(L=>{var E;return{...L,value:(E=g==null?void 0:g[A])==null?void 0:E[L==null?void 0:L.prop]}});return{title:J,description:F}}),o.value=u},{immediate:!0,deep:!0}),(c,u)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(J4,{stepConfig:i.value,stepList:o.value,onClickStep:f},{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(pl.ssForm,{ref:"formRef",rowContents:g,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),Z4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,n)=>{const r=e.resolveComponent("el-timeline-item"),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,f)=>(e.openBlock(),e.createBlock(r,{key:f,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})}}}),Q4=nr._export_sfc(Z4,[["__scopeId","data-v-4172a886"]]),e2={class:"line-content"},a2={class:"line-time"},l2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,i=>{var o,f;r.value=(o=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:o.contents,n.value=(f=i==null?void 0:i.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:f.contents},{immediate:!0}),(i,o)=>(e.openBlock(),e.createBlock(Q4,{activities:r.value,timeLineConfig:n.value},{content:e.withCtx(({content:f,timestamp:c})=>[e.createElementVNode("span",e2,e.toDisplayString(f),1),e.createElementVNode("span",a2,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),r2=nr._export_sfc(l2,[["__scopeId","data-v-b4d9deed"]]),n2={class:"tabs-content"},i2=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(a,{emit:l}){const n=a,r=l,i=e.ref();e.watch(()=>n==null?void 0:n.itemData,()=>{i.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const o=d=>{r("change",d)},f=(d,N)=>{r("contentChange",d,N)},c=d=>{r("pageChange",d)},u=d=>{r("rowClick",d)},m=(d,N)=>{r("routeUrl",d,N)},g=d=>{r("clickTrigger",d)},w=(d,N)=>{r("clickMainKey",d,N)};return(d,N)=>{var _,J;return e.openBlock(),e.createElementBlock("div",n2,[(_=i.value)!=null&&_.length?(e.openBlock(),e.createBlock(pl.ssTab,{tabsContents:i.value,key:(J=i.value)==null?void 0:J.length},{pane:e.withCtx(({tab:A,index:F})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(A==null?void 0:A.comp)),{related:A==null?void 0:A.relatedTables,compNames:A==null?void 0:A.nameContents,compName:A==null?void 0:A.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:a.isDevMode,itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,onChange:o,calculator:A==null?void 0:A.calculatorFilters,index:(A==null?void 0:A.id)??F,config:{showIndex:A==null?void 0:A.showIndex,allowMove:A==null?void 0:A.allowMove,viewport:A==null?void 0:A.viewport,status:A==null?void 0:A.status},onContentChange:f,onPageChange:c,onRowClick:u,onRouteUrl:m,parentTableId:A==null?void 0:A.tableId,allMapContents:a.allMapContents,children:A==null?void 0:A.children,level:1,onClickTrigger:g,onClickMainKey:w},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","calculator","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),o2=nr._export_sfc(i2,[["__scopeId","data-v-71516232"]]),t2={class:"type-select"},s2=["onClick"],c2={class:"list-icon"},u2={__name:"modelSelect",setup(a){const l=li(M.pinia),{itemData:n}=M.storeToRefs(l),r=i=>{const o=M.cloneDeep(n.value);o.push({comp:i.comp,name:i.name,compData:[]}),l.setItemData(o)};return(i,o)=>{const f=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",t2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(gu),(c,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:m=>r(c)},[e.createElementVNode("div",c2,[e.createVNode(f,{name:c.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(c.name),1)],8,s2)]))),128))])}}},d2=nr._export_sfc(u2,[["__scopeId","data-v-91799bf8"]]),p2={class:"fill-content"},f2={class:"operate-content"},h2={class:"collapse-title-content"},v2={class:"collapse-title-item"},m2={key:1},y2=["onClick"],g2={class:"icon-content"},b2={key:0,class:"edit-content"},k2=["onClick"],x2={class:"comp-child"},w2={__name:"modelFill",setup(a){const l=li(M.pinia),{itemData:n,originalData:r}=M.storeToRefs(l),i=e.ref([]);e.ref([]);const o=e.ref([]),f=e.ref([]),c=N=>{var J;let _=(J=M.cloneDeep(f.value))==null?void 0:J.map((A,F)=>(N===F&&(A.content=!0),A));f.value=_},u=N=>{var J;let _=(J=M.cloneDeep(f.value))==null?void 0:J.map((A,F)=>(N===F&&(A.content=!1),A));f.value=_,i.value=M.cloneDeep(n.value)},m=(N,_)=>{var L;let J=(L=M.cloneDeep(f.value))==null?void 0:L.map((E,S)=>(N===S&&(E.content=!1),E));f.value=J;const A=M.cloneDeep(n.value),F=A==null?void 0:A.filter((E,S)=>(S===N&&(E.name=_),E));l.setOriginalData(F),l.setItemData(F)};e.watch(()=>n.value,()=>{var N,_,J;!n.value||((N=n.value)==null?void 0:N.length)===0?i.value=[]:i.value=(_=M.cloneDeep(n.value))==null?void 0:_.filter(A=>(A==null?void 0:A.comp)!=="methodButton"),o.value=i.value,f.value=(J=M.cloneDeep(o.value))==null?void 0:J.map((A,F)=>({id:F,content:!1}))},{deep:!0,immediate:!0});const g=N=>Ri(N),w=(N,_,J)=>{var F,L;if(!N)return;let A=M.cloneDeep(n.value);A=(F=A==null?void 0:A.map((E,S)=>(S===J&&(E.compData=N),E)))==null?void 0:F.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),f.value=(L=M.cloneDeep(A))==null?void 0:L.map((E,S)=>({id:S,content:!1})),l.setOriginalData(A),l.setItemData(A)},d=N=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=M.cloneDeep(n.value),J=_==null?void 0:_.filter((A,F)=>F!==N);l.setOriginalData(J),l.setItemData(J),Ja.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(N,_)=>{const J=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",p2,[_[1]||(_[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",f2,[e.createVNode(oc.default,{class:"collapse-content",collapseContents:i.value},{title:e.withCtx(({item:A,index:F})=>{var L,E,S,k,y,x,O,I,W,Y;return[e.createElementVNode("div",h2,[e.createElementVNode("div",v2,[(E=(L=f.value)==null?void 0:L.find(fe=>fe.id===F))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:A.name&&A.name!==""?"8px":"0px"})},e.toDisplayString(A.name),5)),(k=(S=f.value)==null?void 0:S.find(fe=>fe.id===F))!=null&&k.content?(e.openBlock(),e.createElementBlock("div",m2,[e.createVNode(pl.ssInput,{modelValue:A.name,"onUpdate:modelValue":fe=>A.name=fe,onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(x=(y=f.value)==null?void 0:y.find(fe=>fe.id===F))!=null&&x.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(fe=>c(F),["stop"]),class:"icon-content"},[e.createVNode(J,{name:"Edit",style:{width:"16px",height:"16px"}})],8,y2))]),e.createElementVNode("div",g2,[(I=(O=f.value)==null?void 0:O.find(fe=>fe.id===F))!=null&&I.content?(e.openBlock(),e.createElementBlock("div",b2,[e.createVNode(J,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(fe=>u(F),["stop"])},null,8,["onClick"]),e.createVNode(J,{name:"Save",onClick:e.withModifiers(fe=>m(F,A.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Y=(W=f.value)==null?void 0:W.find(fe=>fe.id===F))!=null&&Y.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(fe=>d(F),["stop"]),class:"icon-content"},[e.createVNode(J,{name:"Delete",style:{width:"16px",height:"16px"}})],8,k2))])])]}),content:e.withCtx(({item:A,index:F})=>{var L,E;return[e.createElementVNode("div",x2,[e.createTextVNode(e.toDisplayString(g(A.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(A.comp+"Operate")),{itemContents:A==null?void 0:A.compData,originalItemContents:(E=(L=o.value)==null?void 0:L.find((S,k)=>k===F))==null?void 0:E.compData,onChange:S=>w(S,A,F)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},_2=nr._export_sfc(w2,[["__scopeId","data-v-a46a44b9"]]),S2={key:0,class:"show-content"},E2={style:{display:"flex"}},C2={__name:"modelShow",setup(a){const l=li(M.pinia),{itemData:n}=M.storeToRefs(l),r=e.ref([]);e.watch(()=>n.value,()=>{var o;!n.value||((o=n.value)==null?void 0:o.length)===0?r.value=[]:r.value=M.cloneDeep(n.value)},{deep:!0,immediate:!0});const i=o=>Ri(o);return(o,f)=>{var c;return((c=r.value)==null?void 0:c.length)>0?(e.openBlock(),e.createElementBlock("div",S2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",E2,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)}}},D2=nr._export_sfc(C2,[["__scopeId","data-v-3f3e863e"]]),T2={class:"tabs-header"},B2={class:"tabs-list"},N2={class:"tab-name"},A2={class:"tab-actions"},z2=["onClick"],M2=["onClick"],I2=["onClick"],O2={class:"model-operate"},L2={class:"model-select",style:{display:"unset"}},R2={class:"existing-components"},$2={class:"component-list"},V2=["onClick"],F2={class:"component-info"},P2={class:"component-type"},j2={class:"component-name"},H2={class:"model-fill"},U2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.ref([]),o=e.ref(!1),f=e.ref(""),c=e.ref({title:""}),u=e.ref(-1),m=e.ref(!1),g=e.ref(-1),w=e.ref(new WeakMap),d=e.ref(null),N=li(M.pinia),{itemData:_}=M.storeToRefs(N),J=()=>{f.value="新增标签页",c.value.title="",u.value=-1,o.value=!0},A=ue=>{f.value="修改标签页",c.value.title=i.value[ue].title,u.value=ue,o.value=!0},F=ue=>{const B=S(ue);w.value.delete(B),i.value.splice(ue,1),Ie()},L=()=>{if(c.value.title.trim()){if(u.value===-1){const ue={title:c.value.title,value:c.value.title,label:c.value.title,children:[],id:E()};i.value.push(ue)}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,Ie()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ue=>{const B=i.value[ue];return B.id||(B.id=E()),B.id},k=ue=>{var q;g.value=ue;const B=S(ue);d.value=M.cloneDeep(_.value);let oe=w.value.get(B);!oe&&((q=i.value[ue].children)==null?void 0:q.length)>0&&(oe=I(i.value[ue].children)),oe?N.setItemData(M.cloneDeep(oe)):N.setItemData([]),m.value=!0},y=e.computed(()=>{const ue=M.useModelComp(M.pinia),B=M.storeToRefs(ue).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(oe=>{var q;if(oe.comp==="Tabs"&&g.value>=0){const ye=S(g.value);if((q=oe.compData)==null?void 0:q.some(Ae=>{var Qe;return Ae.key==="stepList"&&((Qe=Ae.contents)==null?void 0:Qe.some(Ea=>Ea.id===ye))}))return!1}return!0})}),x=ue=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ue]||ue,O=ue=>{var B;try{const oe=M.cloneDeep(ue);oe.id=Date.now()+Math.random(),oe.comp==="Tabs"&&((B=oe.compData)==null||B.forEach(ye=>{ye.key==="stepList"&&ye.contents&&ye.contents.forEach(Ke=>{Ke.id=E()})}));const q=M.cloneDeep(_.value);q.push(oe),N.setItemData(q)}catch(oe){console.error("添加组件失败:",oe)}},I=ue=>ue.map(B=>{var oe;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:W(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:Y(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((oe=B.content)==null?void 0:oe.originalData)||[]}}}),W=ue=>{if(!ue)return[];const B=[];return ue.rowContents&&B.push({key:"formContent",contents:ue.rowContents}),ue.buttonValue&&B.push({key:"formButton",contents:ue.buttonValue}),typeof ue.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ue.isEnableWrap}),B},Y=ue=>[],fe=()=>{if(g.value>=0&&g.value<i.value.length){const ue=S(g.value);w.value.set(ue,M.cloneDeep(_.value)),i.value[g.value].children=U(_.value),console.log("保存后的数据",U(_.value))}m.value=!1,g.value=-1,d.value=null,Ie()},de=()=>{d.value&&N.setItemData(M.cloneDeep(d.value)),m.value=!1,g.value=-1,d.value=null},j=()=>{m.value&&de()},U=ue=>{if(!Array.isArray(ue))throw new Error("sourceData must be an array");return ue.map((B,oe)=>{if(!B||typeof B!="object")return B;const{comp:q,name:ye,compData:Ke}=B;switch(q){case"Form":return{type:"form",content:Z(Ke||[]),value:"表单"};case"Table":return{type:"table",content:ee(Ke||[]),value:"表格"};default:return{type:"xxx",content:ge(Ke||[]),value:""}}})},Z=ue=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},oe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ue.forEach((q,ye)=>{if(!q||typeof q!="object"){console.warn(`Invalid config at index ${ye}:`,q);return}const{key:Ke,contents:Ae}=q,Qe=oe[Ke];if(!Qe){console.warn(`Unknown Form config key: ${Ke}`);return}Ke==="enableWrap"?B[Qe]=!!Ae:B[Qe]=Array.isArray(Ae)?Ae:[]}),B},ee=ue=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},oe={header:"columns",tableContents:"tableData"};return ue.forEach((q,ye)=>{if(!q||typeof q!="object"){console.warn(`Invalid config at index ${ye}:`,q);return}const{key:Ke,contents:Ae}=q,Qe=oe[Ke];if(!Qe){console.warn(`Unknown Table config key: ${Ke}`);return}B[Qe]=Array.isArray(Ae)?Ae:[]}),B},ge=ue=>(console.log("Default conversion logic - to be implemented"),{originalData:ue,processed:!1,componentType:"unknown"}),Ie=()=>{const ue=[{key:"stepList",contents:i.value}];r("change",ue)};return e.watch(()=>n.itemContents,ue=>{if(ue&&ue.length>0){const B=ue.find(oe=>oe.key==="stepList");B&&B.contents&&(i.value=B.contents.map(oe=>({title:oe.title||"",value:oe.value||oe.title||"",label:oe.label||oe.title||"",children:oe.children||[],id:oe.id||E()})))}},{immediate:!0,deep:!0}),(ue,B)=>{const oe=e.resolveComponent("svg-icon"),q=e.resolveComponent("el-input"),ye=e.resolveComponent("el-form-item"),Ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",T2,[B[6]||(B[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:J},[e.createVNode(oe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",B2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(Ae,Qe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Qe},[e.createElementVNode("span",N2,e.toDisplayString(Ae.title),1),e.createElementVNode("div",A2,[e.createElementVNode("button",{onClick:Ea=>A(Qe)},"修改标题",8,z2),e.createElementVNode("button",{onClick:Ea=>k(Qe)},"布局调整",8,M2),e.createElementVNode("button",{onClick:Ea=>F(Qe)},"删除",8,I2)])]))),128))]),e.createVNode(Ir.ssDialog,{modelValue:o.value,"onUpdate:modelValue":B[2]||(B[2]=Ae=>o.value=Ae),title:f.value,onBeforeDestroy:B[3]||(B[3]=Ae=>o.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:B[1]||(B[1]=Ae=>o.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(Ke,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ye,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(q,{modelValue:c.value.title,"onUpdate:modelValue":B[0]||(B[0]=Ae=>c.value.title=Ae),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Ir.ssDialog,{modelValue:m.value,"onUpdate:modelValue":B[4]||(B[4]=Ae=>m.value=Ae),title:"布局调整",fullScreen:"",onBeforeDestroy:j},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:de},"取消"),e.createElementVNode("button",{onClick:fe},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",O2,[e.createElementVNode("div",L2,[e.createVNode(d2),e.createElementVNode("div",R2,[B[8]||(B[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",$2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,Ae=>(e.openBlock(),e.createElementBlock("div",{key:Ae.id,class:"component-item",onClick:Qe=>O(Ae)},[e.createElementVNode("div",F2,[e.createElementVNode("span",P2,e.toDisplayString(x(Ae.comp)),1),e.createElementVNode("span",j2,e.toDisplayString(Ae.name),1)]),B[7]||(B[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,V2))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ue.innerWidth},[e.createVNode(D2)])),e.createElementVNode("div",H2,[e.createVNode(_2)])])]),_:1},8,["modelValue"])])}}},q2=nr._export_sfc(U2,[["__scopeId","data-v-9096ed0d"]]);function W2(){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 G2(a){return{type:"line",color:["#5070DD","#B6D634","#505372","#FF994E","#0CA8DF","#FFD10A","#FB628B","#8466C1","#3EBE95"],...a}}function K2(){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 Y2(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 J2(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function X2(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
+ {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 Z2=()=>({title:{text:"",left:"center"},tooltip:{trigger:"item"},xAxis:{scale:!0},yAxis:{scale:!0},series:[]}),Q2=a=>({type:"scatter",symbolSize:20,...a}),Dn={Line:{initBaseoptions:W2,initSeries:G2},Bar:{initBaseoptions:K2,initSeries:Y2},Pie:{initBaseoptions:J2,initSeries:X2},Scatter:{initBaseoptions:Z2,initSeries:Q2}},e1=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();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 N;g.push((N=n==null?void 0:n[0])==null?void 0:N[d])}),!m||!g)return u;u.xAxis.data=m;const w=c({data:g});return u.series.push(w),u},a1=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();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 N;g.push((N=n==null?void 0:n[0])==null?void 0:N[d])}),!m||!g)return u;u.xAxis.data=m;const w=c({data:g});return u.series.push(w),u},l1=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();u.title.text=i??"";const m=l==null?void 0:l.map(N=>N==null?void 0:N.prop);let g=[];if(m==null||m.forEach(N=>{var _;g.push((_=n==null?void 0:n[0])==null?void 0:_[N])}),!m||!g)return u;const w=[];for(let N=0;N<m.length;N++){const _=m[N],J=g[N];w.push({name:_,value:J})}const d=c({data:w});return u.series.push(d),u},r1=({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:n})=>{const{type:r,title:i}=a||{},o=Dn==null?void 0:Dn[r];if(!o)return;const{initBaseoptions:f,initSeries:c}=o,u=f();u.title.text=i??"";let m=[];const g=l==null?void 0:l.map(N=>N==null?void 0:N.prop);if(m=g==null?void 0:g.map(N=>{var J;let _=[];return _.push(N),_.push((J=n==null?void 0:n[0])==null?void 0:J[N]),_}),!m)return u;const d=c({data:m});return u.series.push(d),u},n1=async(a=[])=>{var c,u,m,g,w;const l=((c=a==null?void 0:a.find(d=>d.key==="ChartType"))==null?void 0:c.contents)??{};let n=((u=a==null?void 0:a.find(d=>d.key==="header"))==null?void 0:u.contents)??[],r=((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(N=>({methods:N==null?void 0:N.calculatorFilter,functionName:N==null?void 0:N.functionName,functionRelatedWords:N==null?void 0:N.functionRelatedWords}));let d=await It([],i,[],"Auto",[],[]);n=(w=d==null?void 0:d.xAxis)==null?void 0:w.map(N=>({label:N,prop:N})),r=d==null?void 0:d.yAxis}let{type:o}=l,f={};return o==="Line"&&(f=await e1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Bar"&&(f=await a1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Pie"&&(f=await l1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),o==="Scatter"&&(f=await r1({chartBaseConfig:l,chartDataConfig:n,chartDetailConfig:r})),f},i1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,n=e.ref({});e.onMounted(async()=>{const i=l==null?void 0:l.itemData;n.value=await n1(i)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(i,o)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Yu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),o1=nr._export_sfc(i1,[["__scopeId","data-v-d4c081e8"]]),s1={class:"chart-module layout"},c1={class:"chart-module content"},u1={class:"chart-module content"},d1={class:"form-content"},p1={class:"dialog-footer"},f1={class:"form-content"},h1={class:"dialog-footer"},v1={class:"form-content"},m1={class:"dialog-footer"},y1=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l,i=e.reactive({visible:!1,width:"840",title:"基础配置"}),o=e.ref([]),f=()=>[{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=Le=>{var se;o.value=f(),(se=o.value)==null||se.forEach(me=>{var ka;const qe=me==null?void 0:me.prop;me.value=(ka=c==null?void 0:c.value)==null?void 0:ka[qe]}),i.visible=!0},m=Le=>{c.value=Le},g=()=>{var Le;i.visible=!1,r("change",(Le=Pe())==null?void 0:Le.compData)},w=e.reactive({visible:!1,width:"840",title:"数据配置"}),d=e.ref([]),N=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],_=e.ref({}),J=()=>{const Le=d.value,se=M.cloneDeep(Le);return se==null||se.forEach(me=>{var ka;const qe=me==null?void 0:me.prop;me.value=(ka=_.value)==null?void 0:ka[qe]}),se},A=Le=>{var me;_.value=Le;const se=J();d.value=se,r("change",(me=Pe())==null?void 0:me.compData)},F=async Le=>{const se=await le.getMenusContent(),me=J();me==null||me.forEach(qe=>{(qe==null?void 0:qe.prop)==="menu"&&(qe.contents=se)}),d.value=me,w.visible=!0,await Ae(_.value.menu),await ne(_.value.group)},L=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:[]}],k=e.ref({}),y=()=>{const Le=E.value,se=M.cloneDeep(Le);return se==null||se.forEach(me=>{var ka;const qe=me==null?void 0:me.prop;me.value=(ka=k.value)==null?void 0:ka[qe]}),se},x=Le=>{var me;k.value=Le;const se=y();E.value=se,r("change",(me=Pe())==null?void 0:me.compData)},O=async Le=>{await j();const se=M.cloneDeep(I.value),me=y();me==null||me.forEach(qe=>{var _a;const ka=qe==null?void 0:qe.prop;qe.value=(_a=k==null?void 0:k.value)==null?void 0:_a[ka],ka==="mainKey"&&(qe.contents=se)}),E.value=me,L.visible=!0},I=e.ref([]),W=e.ref([]),Y=e.ref({}),fe=e.ref({}),de=()=>{const{compData:Le}=q.value||{},se=Le==null?void 0:Le.find(ae=>{const{key:pe}=ae;return pe==="header"}),me=(se==null?void 0:se.contents)||[],qe=me==null?void 0:me.filter((ae,pe)=>{const{label:ve}=ae;return ve!=="操作"}),ka=qe==null?void 0:qe.findIndex((ae,pe)=>{const{isMainKey:ve}=ae;return ve});if(ka<0)return[];const _a=Le==null?void 0:Le.find(ae=>{const{key:pe}=ae;return pe==="tableContents"}),H=(_a==null?void 0:_a.contents)||[];return H==null?void 0:H.map(ae=>{const pe=ae==null?void 0:ae[0];let ve=ka;Ja.isObject(pe)&&(pe!=null&&pe.id)&&(ve=ve+1);const da=ae==null?void 0:ae[ve];return{label:da,value:da}})},j=async()=>{const Le=await de();I.value=Le},U=async Le=>{const se=sessionStorage.getItem("systemKey");return await le.getItemData(Le,se,"")},Z=async Le=>{const se=Le;W.value=se==null?void 0:se.map(me=>{const{name:qe}=me;return Y.value[qe]=me,{label:qe,value:qe}})},ee=Le=>{const{comp:se,compData:me}=fe.value||{};if(se==="Table"){let qe=y();qe=qe.filter(ka=>{const{prop:_a}=ka;return _a!=="formItems"}),Qe(qe,me),E.value=qe}},ge=async()=>{var me,qe;const Le=(me=k==null?void 0:k.value)==null?void 0:me.mainKey,se=(qe=_==null?void 0:_.value)==null?void 0:qe.menu;if(Le){const _a=`${se==null?void 0:se.join("/")}^${Le}`,H=await U(_a);await Z(H);const V=y();V==null||V.forEach(ae=>{(ae==null?void 0:ae.prop)==="group"&&(ae.contents=W.value)}),E.value=V}};e.watch(()=>{var Le;return(Le=k==null?void 0:k.value)==null?void 0:Le.mainKey},async(Le,se)=>{Le!=se&&Le&&await ge()});const Ie=async Le=>{const se=Y.value[Le];fe.value=se,await ee()};e.watch(()=>{var Le;return(Le=k==null?void 0:k.value)==null?void 0:Le.group},async(Le,se)=>{Le!=se&&Le&&Ie(Le)});const ue=async()=>{var se;await ge();const Le=(se=k.value)==null?void 0:se.group;await Ie(Le)},B=e.ref([]),oe=e.ref({}),q=e.ref({}),ye=async Le=>{const se=Le==null?void 0:Le.join("/"),me=sessionStorage.getItem("systemKey");return await le.getItemData(se,me,"")},Ke=async Le=>{const se=await ye(Le);B.value=se==null?void 0:se.map(me=>{const{name:qe}=me;return oe.value[qe]=me,{label:qe,value:qe}})},Ae=async(Le,se)=>{await Ke(Le);const me=J();me==null||me.forEach(qe=>{(qe==null?void 0:qe.prop)==="group"&&(qe.contents=B.value)}),d.value=me};e.watch(()=>{var Le;return(Le=_==null?void 0:_.value)==null?void 0:Le.menu},async(Le,se)=>{const me=Le==null?void 0:Le.join("/"),qe=se==null?void 0:se.join("/");me!=qe&&await Ae(Le)});const Qe=(Le,se)=>{const me=se==null?void 0:se.find(H=>{const{key:V}=H;return V==="header"}),qe=(me==null?void 0:me.contents)||[],ka=qe==null?void 0:qe.filter((H,V)=>{const{label:ae}=H;return ae!=="操作"}),_a=ka==null?void 0:ka.map((H,V)=>{const{label:ae}=H;return{label:ae,value:V}});Le==null||Le.forEach(H=>{const V=H==null?void 0:H.prop;(V==="nameCol"||V==="valueCol")&&(H.contents=_a)})},Ea=Le=>{const{comp:se,compData:me}=q.value||{};if(se==="Table"){_.value.formItems=[];let qe=J();qe=qe.filter(ka=>{const{prop:_a}=ka;return _a!=="formItems"}),Qe(qe,me),d.value=qe}},ne=async Le=>{const se=oe.value[Le];q.value=se,await Ea()};e.watch(()=>{var Le;return(Le=_==null?void 0:_.value)==null?void 0:Le.group},async(Le,se)=>{Le!=se&&ne(Le)});const ua=async()=>{var me,qe;const Le=(me=_.value)==null?void 0:me.menu;await Ae(Le);const se=(qe=_.value)==null?void 0:qe.group;await ne(se)},Pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:c.value},{key:"chartDataConfig",contents:_.value},{key:"chartDetailConfig",contents:k.value}]}),Re=()=>{i.visible=!1,w.visible=!1,L.visible=!1};return e.onMounted(async()=>{var se,me,qe;d.value=N(),E.value=S();const Le=n==null?void 0:n.itemContents;c.value=((se=Le==null?void 0:Le.find(ka=>ka.key==="chartBaseConfig"))==null?void 0:se.contents)??{},_.value=((me=Le==null?void 0:Le.find(ka=>ka.key==="chartDataConfig"))==null?void 0:me.contents)??{},await ua(),k.value=((qe=Le==null?void 0:Le.find(ka=>ka.key==="chartDetailConfig"))==null?void 0:qe.contents)??{},await ue()}),(Le,se)=>{const me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",s1,[se[4]||(se[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(me,{id:"themeButton",onClick:se[0]||(se[0]=qe=>u())},{default:e.withCtx(()=>se[3]||(se[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",c1,[se[6]||(se[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(me,{id:"themeButton",onClick:se[1]||(se[1]=qe=>F())},{default:e.withCtx(()=>se[5]||(se[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",u1,[se[8]||(se[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(me,{id:"themeButton",onClick:se[2]||(se[2]=qe=>O())},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Ir.ssDialog,{visible:i.visible,title:i.title,onBeforeDestroy:Re,width:i.width},{default:e.withCtx(()=>[e.createElementVNode("div",d1,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:o.value,key:o.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",p1,[e.createVNode(me,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(me,{class:"ok-button button",onClick:g,id:"themeButton"},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Ir.ssDialog,{visible:w.visible,title:w.title,onBeforeDestroy:Re,width:w.width},{default:e.withCtx(()=>[e.createElementVNode("div",f1,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:A},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",h1,[e.createVNode(me,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>se[11]||(se[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(me,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>se[12]||(se[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Ir.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:Re,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",v1,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:x},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",m1,[e.createVNode(me,{class:"cancel-button button",onClick:Re,id:"themeBorderButton"},{default:e.withCtx(()=>se[13]||(se[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(me,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>se[14]||(se[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),g1=nr._export_sfc(y1,[["__scopeId","data-v-88c50cdb"]]),b1={class:"layout"},k1=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const n=l,r=a;e.onMounted(async()=>{});const i=e.computed(()=>M.cloneDeep(r==null?void 0:r.itemData)||[]),o=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(w=>{const{key:d}=w;return d==="baseConfig"});return m==null?void 0:m.contents}),f=e.computed(()=>{var g;const m=(g=i==null?void 0:i.value)==null?void 0:g.find(w=>{const{key:d}=w;return d==="children"});return m==null?void 0:m.contents}),c=e.computed(()=>{let m=M.cloneDeep(f.value)||[];const g=m.length;let w=0;const d=[];if(m=m.map(N=>{const _=N.span;return _?(N.span=Number(_),w=w+N.span):d.push(N),N}),w<24){const N=Math.floor((24-w)/g);d.forEach(_=>{_.span=N})}return m}),u=m=>{n("rowClick",m)};return(m,g)=>{var N;const w=e.resolveComponent("el-col"),d=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",b1,[e.createVNode(d,{style:e.normalizeStyle({height:(N=o.value)==null?void 0:N.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(_,J)=>(e.openBlock(),e.createBlock(w,{span:_==null?void 0:_.span},{default:e.withCtx(()=>{var A;return[e.unref(Li)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)(_.comp)),{key:e.unref(ai),compName:_.name,index:(_==null?void 0:_.id)??J,height:(A=o.value)==null?void 0:A.height,itemData:_==null?void 0:_.compData,childItemData:_==null?void 0:_.itemChildData,onChange:e.unref(Ao),onContentChange:e.unref(zo),onPageChange:e.unref(Mo),onRowClick:u},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),x1=nr._export_sfc(k1,[["__scopeId","data-v-ab9a36ed"]]),w1={class:"layout-operate"},_1={class:"layout-module"},S1={class:"collapse-title-item"},E1={class:"collapse-title"},C1={class:"icon-content"},D1=["onClick"],T1={class:"comp-child"},B1=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const n=a,r=l;e.onMounted(()=>{J()});const i=e.ref({}),o=e.ref({}),f=e.ref([]),c=k=>[{label:"高度",prop:"height",type:"input",value:k==null?void 0:k.height}],u=k=>{o.value=k,r("change",S(),!0)},m=e.ref([]),g=e.ref([]),w=k=>[{label:"占比",prop:"span",type:"input",value:k==null?void 0:k.span}],d=e.computed(()=>{const k=n==null?void 0:n.itemContents;return M.cloneDeep(k)}),N=e.computed(()=>{const k=d==null?void 0:d.value,y=k==null?void 0:k.find(x=>{const{key:O}=x;return O==="baseConfig"});return y==null?void 0:y.contents}),_=e.computed(()=>{const k=d==null?void 0:d.value,y=k==null?void 0:k.find(x=>{const{key:O}=x;return O==="children"});return y==null?void 0:y.contents}),J=()=>{var k;i.value=d.value||{},m.value=(_==null?void 0:_.value)||[],f.value=c(),f.value=(k=f.value)==null?void 0:k.map(y=>{var O;const{prop:x}=y;return y.value=(O=N.value)==null?void 0:O[x],y})};e.watch(()=>{var k;return(k=_==null?void 0:_.value)==null?void 0:k.length},()=>{var k;m.value=(_==null?void 0:_.value)||[],g.value=(k=_.value)==null?void 0:k.map(y=>w(y))},{immediate:!0});const A=(k,y)=>{const x=M.cloneDeep(_==null?void 0:_.value);x[y].span=k.span,m.value=x,r("change",S(),!0)},F=k=>Ri(k),L=(k,y,x)=>{if(!k)return;const O=M.cloneDeep(_==null?void 0:_.value);O[x]&&(O[x].compData=k,m.value=O,r("change",S(),!0))},E=k=>{M.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let y=M.cloneDeep(_==null?void 0:_.value);y=y==null?void 0:y.filter((x,O)=>k!==O),m.value=y,r("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(k,y)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",w1,[e.createElementVNode("div",_1,[y[1]||(y[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(pl.ssForm,{rowContents:f.value,isEnableWrap:!0,onChange:y[0]||(y[0]=O=>u(O))},null,8,["rowContents"])])]),e.createVNode(oc.default,{class:"collapse-content",collapseContents:_.value},{title:e.withCtx(({item:O,index:I})=>[e.createElementVNode("div",S1,[e.createElementVNode("div",E1,e.toDisplayString(O.name),1),e.createElementVNode("div",C1,[e.createElementVNode("div",{onClick:e.withModifiers(W=>E(I),["stop"]),class:"icon-content"},[e.createVNode(x,{name:"Delete",style:{width:"16px",height:"16px"}})],8,D1)])])]),content:e.withCtx(({item:O,index:I})=>[e.createElementVNode("div",T1,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(pl.ssForm,{rowContents:g.value[I],key:I,isEnableWrap:!0,onChange:W=>A(W,I)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(O.comp+"Operate")),{itemContents:O==null?void 0:O.compData,originalItemContents:O.compData,onChange:W=>L(W,O,I)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),N1=nr._export_sfc(B1,[["__scopeId","data-v-ba05456e"]]),A1=typeof window<"u";var Ms;A1&&((Ms=window==null?void 0:window.navigator)!=null&&Ms.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function _n(a){return a==null}function Zc(){}const z1=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(z1)));function M1(){const a=new Map;return{on(l,n){const r=a.get(l);r!=null&&r.add(n)||a.set(l,new Set([n]))},off(l,n){const r=a.get(l);r&&r.delete(n)},clear(l){const n=a.get(l);n&&n.clear()},clearAll(){a.clear()},emit(l,...n){const r=a.get(l);r&&r.forEach(i=>{i(...n)})}}}function Is(a,l=16){if(typeof a!="function")return Zc;const n=(...o)=>{a(...o)};if(l<=0)return Qc(n);let r=0,i;return function(...o){const f=Date.now(),c=f-r;clearTimeout(i),c>=l?(r=f,n(...o)):i=setTimeout(()=>{r=Date.now(),n(...o)},Math.max(0,l-c))}}function I1(a,l=100){if(typeof a!="function")return Zc;const n=(...i)=>{a(...i)};if(l<=0)return Qc(n);let r;return function(...i){clearTimeout(r),r=setTimeout(()=>{n(...i)},l)}}function Qc(a){if(typeof a!="function")return a;let l=!1,n,r;return function(...i){return n=i,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,a(...n)))),r}}const Yi=new Set,eu=new WeakMap;function O1(){Yi.forEach(a=>{a(...eu.get(a))}),Yi.clear()}function yn(a,...l){if(typeof a!="function")return a;eu.set(a,l),!Yi.has(a)&&(Yi.add(a),Yi.size===1&&Promise.resolve().then(O1))}const au=Symbol("LAYOUT_KEY"),lu=Symbol("EMITTER_KEY");function L1(a){let l=0,n;for(let r=0,i=a.length;r<i;r++)n=a[r].y+a[r].h,n>l&&(l=n);return l}function At(a){const l=Array(a.length);for(let n=0,r=a.length;n<r;n++)l[n]=R1(a[n]);return l}function R1(a){return{...a}}function ru(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,n){const r=iu(a),i=ou(a),o=Array(a.length);for(let f=0,c=i.length;f<c;f++){let u=i[f];u.static||(u=$1(r,u,l,n),r.push(u)),o[a.findIndex(m=>m.i===u.i)]=u,u.moved=!1}return o}function $1(a,l,n,r){if(n)for(;l.y>0&&!Ji(a,l);)l.y--;else if(r){const o=r[l.i].y;for(;l.y>o&&!Ji(a,l);)l.y--}let i;for(;i=Ji(a,l);)l.y=i.y+i.h;return l}function V1(a,l){const n=iu(a);for(let r=0,i=a.length;r<i;r++){const o=a[r];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)n.push(o);else for(;Ji(n,o);)o.y++}return a}function Os(a,l){for(let n=0,r=a.length;n<r;n++)if(a[n].i===l)return a[n]}function Ji(a,l){for(let n=0,r=a.length;n<r;n++)if(ru(a[n],l))return a[n]}function nu(a,l){return a.filter(n=>ru(n,l))}function iu(a){return a.filter(l=>l.static)}function zt(a,l,n,r,i=!1,o=!1){if(l.static)return a;const f=l.x,c=l.y,u=r&&l.y>r;typeof n=="number"&&(l.x=n),typeof r=="number"&&(l.y=r),l.moved=!0;let m=ou(a);u&&(m=m.reverse());const g=nu(m,l);if(o&&g.length)return l.x=f,l.y=c,l.moved=!1,a;for(let w=0,d=g.length;w<d;w++){const N=g[w];N.moved||l.y>N.y&&l.y-N.y>N.h/4||(N.static?a=Ls(a,N,l,i):a=Ls(a,l,N,i))}return a}function Ls(a,l,n,r){if(r){const i={x:n.x,y:n.y,w:n.w,h:n.h};if(i.y=Math.max(l.y-n.h,0),!Ji(a,i))return zt(a,n,void 0,i.y,!1)}return zt(a,n,void 0,n.y+1,!1)}function F1(a,l,n,r){const i="translate3d("+l+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:n+"px",height:r+"px",position:"absolute"}}function P1(a,l,n,r){const i="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:n+"px",height:r+"px",position:"absolute"}}function j1(a,l,n,r){return{top:a+"px",left:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function H1(a,l,n,r){return{top:a+"px",right:l+"px",width:n+"px",height:r+"px",position:"absolute"}}function ou(a){return Array.from(a).sort(function(l,n){return l.y===n.y&&l.x===n.x?0:l.y>n.y||l.y===n.y&&l.x>n.x?1:-1})}function U1(a,l){l=l||"Layout";const n=["x","y","w","h"],r=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let i=0,o=a.length;i<o;i++){const f=a[i];for(let c=0;c<n.length;c++)if(typeof f[n[c]]!="number")throw new Error("VueGridLayout: "+l+"["+i+"]."+n[c]+" must be a number!");if(f.i===void 0||f.i===null)throw new Error("VueGridLayout: "+l+"["+i+"].i cannot be null!");if(typeof f.i!="number"&&typeof f.i!="string")throw new Error("VueGridLayout: "+l+"["+i+"].i must be a string or number!");if(r.indexOf(f.i)>=0)throw new Error("VueGridLayout: "+l+"["+i+"].i must be unique!");if(r.push(f.i),f.static!==void 0&&typeof f.static!="boolean")throw new Error("VueGridLayout: "+l+"["+i+"].static must be a boolean!")}}function q1(a,l="vgl"){const n=()=>`${l}-${a}`;return{b:n,be:r=>`${n()}__${r}`,bm:r=>`${n()}--${r}`,bem:(r,i)=>`${n()}__${r}--${i}`}}function Rs(a){return W1(a)}function W1(a){var l;const n=((l=a.target)==null?void 0:l.offsetParent)||document.body,r=a.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),i=a.clientX+n.scrollLeft-r.left,o=a.clientY+n.scrollTop-r.top;return{x:i,y:o}}function $s(a,l,n,r){return G1(a)?{deltaX:n-a,deltaY:r-l,lastX:a,lastY:l,x:n,y:r}:{deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}}function G1(a){return typeof a=="number"&&!Number.isNaN(a)}function K1(a,l){const n=su(a);let r=n[0];for(let i=1,o=n.length;i<o;i++){const f=n[i];l>a[f]&&(r=f)}return r}function tu(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function Y1(a,l,n,r,i,o,f){if(l[r])return At(l[r]);let c=a;const u=su(n),m=u.slice(u.indexOf(r));for(let g=0,w=m.length;g<w;g++){const d=m[g];if(l[d]){c=l[d];break}}return c=At(c||[]),Ai(V1(c,{cols:o}),f)}function su(a){return Object.keys(a).sort((l,n)=>a[l]-a[n])}let J1="auto";function X1(){return typeof document<"u"}function Vs(){return X1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):J1}var Gi={exports:{}},Z1=Gi.exports,Fs;function Q1(){return Fs||(Fs=1,function(a,l){(function(n,r){a.exports=r()})(Z1,function(){function n(s,t){var h=Object.keys(s);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(s);t&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(s,C).enumerable})),h.push.apply(h,b)}return h}function r(s){for(var t=1;t<arguments.length;t++){var h=arguments[t]!=null?arguments[t]:{};t%2?n(Object(h),!0).forEach(function(b){u(s,b,h[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(h)):n(Object(h)).forEach(function(b){Object.defineProperty(s,b,Object.getOwnPropertyDescriptor(h,b))})}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 f(s,t){for(var h=0;h<t.length;h++){var b=t[h];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(s,J(b.key),b)}}function c(s,t,h){return t&&f(s.prototype,t),Object.defineProperty(s,"prototype",{writable:!1}),s}function u(s,t,h){return(t=J(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&&w(s,t)}function g(s){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(s)}function w(s,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,b){return h.__proto__=b,h},w(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 N(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,b=g(s);if(t){var C=g(this).constructor;h=Reflect.construct(b,arguments,C)}else h=b.apply(this,arguments);return function($,K){if(K&&(typeof K=="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d($)}(this,h)}}function _(){return _=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(s,t,h){var b=function($,K){for(;!Object.prototype.hasOwnProperty.call($,K)&&($=g($))!==null;);return $}(s,t);if(b){var C=Object.getOwnPropertyDescriptor(b,t);return C.get?C.get.call(arguments.length<3?s:h):C.value}},_.apply(this,arguments)}function J(s){var t=function(h,b){if(typeof h!="object"||h===null)return h;var C=h[Symbol.toPrimitive];if(C!==void 0){var $=C.call(h,b);if(typeof $!="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}(s,"string");return typeof t=="symbol"?t:t+""}var A=function(s){return!(!s||!s.Window)&&s instanceof s.Window},F=void 0,L=void 0;function E(s){F=s;var t=s.document.createTextNode("");t.ownerDocument!==s.document&&typeof s.wrap=="function"&&s.wrap(t)===t&&(s=s.wrap(s)),L=s}function S(s){return A(s)?s:(s.ownerDocument||s).defaultView||L.window}typeof window<"u"&&window&&E(window);var k=function(s){return!!s&&i(s)==="object"},y=function(s){return typeof s=="function"},x={window:function(s){return s===L||A(s)},docFrag:function(s){return k(s)&&s.nodeType===11},object:k,func:y,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)||L;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 k(s)&&!!s.constructor&&/function Object\b/.test(s.constructor.toString())},array:function(s){return k(s)&&s.length!==void 0&&y(s.splice)}};function O(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 I(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="drag"){var b=h.prepared.axis;if(b==="x"||b==="y"){var C=b==="x"?"y":"x";t.page[C]=h.coords.start.page[C],t.client[C]=h.coords.start.client[C],t.delta[C]=0}}}var W={id:"actions/drag",install:function(s){var t=s.actions,h=s.Interactable,b=s.defaults;h.prototype.draggable=W.draggable,t.map.drag=W,t.methodDict.drag="draggable",b.actions.drag=W.defaults},listeners:{"interactions:before-action-move":O,"interactions:action-resume":O,"interactions:action-move":I,"auto-start:check":function(s){var t=s.interaction,h=s.interactable,b=s.buttons,C=h.options.drag;if(C&&C.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(b&h.options.drag.mouseButtons)!=0))return s.action={name:"drag",axis:C.lockAxis==="start"?C.startAxis:C.lockAxis},!1}},draggable:function(s){return x.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):x.bool(s)?(this.options.drag.enabled=s,this):this.options.drag},beforeMove:O,move:I,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(s){return s.search("drag")===0}},Y=W,fe={init:function(s){var t=s;fe.document=t.document,fe.DocumentFragment=t.DocumentFragment||de,fe.SVGElement=t.SVGElement||de,fe.SVGSVGElement=t.SVGSVGElement||de,fe.SVGElementInstance=t.SVGElementInstance||de,fe.Element=t.Element||de,fe.HTMLElement=t.HTMLElement||fe.Element,fe.Event=t.Event,fe.Touch=t.Touch||de,fe.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function de(){}var j=fe,U={init:function(s){var t=j.Element,h=s.navigator||{};U.supportsTouch="ontouchstart"in s||x.func(s.DocumentTouch)&&j.document instanceof s.DocumentTouch,U.supportsPointerEvent=h.pointerEnabled!==!1&&!!j.PointerEvent,U.isIOS=/iP(hone|od|ad)/.test(h.platform),U.isIOS7=/iP(hone|od|ad)/.test(h.platform)&&/OS 7[^\d]/.test(h.appVersion),U.isIe9=/MSIE 9/.test(h.userAgent),U.isOperaMobile=h.appName==="Opera"&&U.supportsTouch&&/Presto/.test(h.userAgent),U.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",U.pEventTypes=U.supportsPointerEvent?j.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,U.wheelEvent=j.document&&"onmousewheel"in j.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Z=U;function ee(s,t){if(s.contains)return s.contains(t);for(;t;){if(t===s)return!0;t=t.parentNode}return!1}function ge(s,t){for(;x.element(s);){if(ue(s,t))return s;s=Ie(s)}return null}function Ie(s){var t=s.parentNode;if(x.docFrag(t)){for(;(t=t.host)&&x.docFrag(t););return t}return t}function ue(s,t){return L!==F&&(t=t.replace(/\/deep\//g," ")),s[Z.prefixedMatchesSelector](t)}var B=function(s){return s.parentNode||s.host};function oe(s,t){for(var h,b=[],C=s;(h=B(C))&&C!==t&&h!==C.ownerDocument;)b.unshift(C),C=h;return b}function q(s,t,h){for(;x.element(s);){if(ue(s,t))return!0;if((s=Ie(s))===h)return ue(s,t)}return!1}function ye(s){return s.correspondingUseElement||s}function Ke(s){var t=s instanceof j.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 Ae(s){var t,h=Ke(s);if(!Z.isIOS7&&h){var b={x:(t=(t=S(s))||L).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};h.left+=b.x,h.right+=b.x,h.top+=b.y,h.bottom+=b.y}return h}function Qe(s){for(var t=[];s;)t.push(s),s=Ie(s);return t}function Ea(s){return!!x.string(s)&&(j.document.querySelector(s),!0)}function ne(s,t){for(var h in t)s[h]=t[h];return s}function ua(s,t,h){return s==="parent"?Ie(h):s==="self"?t.getRect(h):ge(h,s)}function Pe(s,t,h,b){var C=s;return x.string(C)?C=ua(C,t,h):x.func(C)&&(C=C.apply(void 0,b)),x.element(C)&&(C=Ae(C)),C}function Re(s){return s&&{x:"x"in s?s.x:s.left,y:"y"in s?s.y:s.top}}function Le(s){return!s||"x"in s&&"y"in s||((s=ne({},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 se(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 me(s,t,h){var b=h&&s.options[h];return Re(Pe(b&&b.origin||s.options.origin,s,t,[s&&t]))||{x:0,y:0}}function qe(s,t){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(_e){return!0},b=arguments.length>3?arguments[3]:void 0;if(b=b||{},x.string(s)&&s.search(" ")!==-1&&(s=ka(s)),x.array(s))return s.forEach(function(_e){return qe(_e,t,h,b)}),b;if(x.object(s)&&(t=s,s=""),x.func(t)&&h(s))b[s]=b[s]||[],b[s].push(t);else if(x.array(t))for(var C=0,$=t;C<$.length;C++){var K=$[C];qe(s,K,h,b)}else if(x.object(t))for(var X in t)qe(ka(X).map(function(_e){return"".concat(s).concat(_e)}),t[X],h,b);return b}function ka(s){return s.trim().split(/ +/)}var _a=function(s,t){return Math.sqrt(s*s+t*t)},H=["webkit","moz"];function V(s,t){s.__set||(s.__set={});var h=function(C){if(H.some(function($){return C.indexOf($)===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($){s.__set[C]=$},configurable:!0})};for(var b in t)h(b);return s}function ae(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 pe(s){s.page.x=0,s.page.y=0,s.client.x=0,s.client.y=0}function ve(s){return s instanceof j.Event||s instanceof j.Touch}function da(s,t,h){return s=s||"page",(h=h||{}).x=t[s+"X"],h.y=t[s+"Y"],h}function ca(s,t){return t=t||{x:0,y:0},Z.isOperaMobile&&ve(s)?(da("screen",s,t),t.x+=window.scrollX,t.y+=window.scrollY):da("page",s,t),t}function Ue(s){return x.number(s.pointerId)?s.pointerId:s.identifier}function Sa(s,t,h){var b=t.length>1?Te(t):t[0];ca(b,s.page),function(C,$){$=$||{},Z.isOperaMobile&&ve(C)?da("screen",C,$):da("client",C,$)}(b,s.client),s.timeStamp=h}function Ma(s){var t=[];return x.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 Te(s){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},h=0;h<s.length;h++){var b=s[h];for(var C in t)t[C]+=b[C]}for(var $ in t)t[$]/=s.length;return t}function Fa(s){if(!s.length)return null;var t=Ma(s),h=Math.min(t[0].pageX,t[1].pageX),b=Math.min(t[0].pageY,t[1].pageY),C=Math.max(t[0].pageX,t[1].pageX),$=Math.max(t[0].pageY,t[1].pageY);return{x:h,y:b,left:h,top:b,right:C,bottom:$,width:C-h,height:$-b}}function Na(s,t){var h=t+"X",b=t+"Y",C=Ma(s),$=C[0][h]-C[1][h],K=C[0][b]-C[1][b];return _a($,K)}function oa(s,t){var h=t+"X",b=t+"Y",C=Ma(s),$=C[1][h]-C[0][h],K=C[1][b]-C[0][b];return 180*Math.atan2(K,$)/Math.PI}function ja(s){return x.string(s.pointerType)?s.pointerType:x.number(s.pointerType)?[void 0,void 0,"touch","pen","mouse"][s.pointerType]:/touch/.test(s.type||"")||s instanceof j.Touch?"touch":"mouse"}function aa(s){var t=x.func(s.composedPath)?s.composedPath():s.path;return[ye(t?t[0]:s.target),ye(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 pa=function(s,t){for(var h=0;h<t.length;h++){var b=t[h];s.push(b)}return s},te=function(s){return pa([],s)},ce=function(s,t){for(var h=0;h<s.length;h++)if(t(s[h],h,s))return h;return-1},Se=function(s,t){return s[ce(s,t)]},we=function(s){m(h,s);var t=N(h);function h(b,C,$){var K;o(this,h),(K=t.call(this,C._interaction)).dropzone=void 0,K.dragEvent=void 0,K.relatedTarget=void 0,K.draggable=void 0,K.propagationStopped=!1,K.immediatePropagationStopped=!1;var X=$==="dragleave"?b.prev:b.cur,_e=X.element,We=X.dropzone;return K.type=$,K.target=_e,K.currentTarget=_e,K.dropzone=We,K.dragEvent=C,K.relatedTarget=C.target,K.draggable=C.interactable,K.timeStamp=C.timeStamp,K}return c(h,[{key:"reject",value:function(){var b=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 $=C.activeDrops,K=ce($,function(_e){var We=_e.dropzone,Ce=_e.element;return We===b.dropzone&&Ce===b.target});C.activeDrops.splice(K,1);var X=new h(C,this.dragEvent,"dropdeactivate");X.dropzone=this.dropzone,X.target=this.target,this.dropzone.fire(X)}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 fa(s,t){for(var h=0,b=s.slice();h<b.length;h++){var C=b[h],$=C.dropzone,K=C.element;t.dropzone=$,t.target=K,$.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ea(s,t){for(var h=function($,K){for(var X=[],_e=0,We=$.interactables.list;_e<We.length;_e++){var Ce=We[_e];if(Ce.options.drop.enabled){var na=Ce.options.drop.accept;if(!(x.element(na)&&na!==K||x.string(na)&&!ue(K,na)||x.func(na)&&!na({dropzone:Ce,draggableElement:K})))for(var Oa=0,ll=Ce.getAllElements();Oa<ll.length;Oa++){var Qa=ll[Oa];Qa!==K&&X.push({dropzone:Ce,element:Qa,rect:Ce.getRect(Qa)})}}}return X}(s,t),b=0;b<h.length;b++){var C=h[b];C.rect=C.dropzone.getRect(C.element)}return h}function Ta(s,t,h){for(var b=s.dropState,C=s.interactable,$=s.element,K=[],X=0,_e=b.activeDrops;X<_e.length;X++){var We=_e[X],Ce=We.dropzone,na=We.element,Oa=We.rect,ll=Ce.dropCheck(t,h,C,$,na,Oa);K.push(ll?na:null)}var Qa=function(cl){for(var Cl,_l,Vl,Xl=[],cr=0;cr<cl.length;cr++){var Ul=cl[cr],Ql=cl[Cl];if(Ul&&cr!==Cl)if(Ql){var cn=B(Ul),Gl=B(Ql);if(cn!==Ul.ownerDocument)if(Gl!==Ul.ownerDocument)if(cn!==Gl){Xl=Xl.length?Xl:oe(Ql);var mn=void 0;if(Ql instanceof j.HTMLElement&&Ul instanceof j.SVGElement&&!(Ul instanceof j.SVGSVGElement)){if(Ul===Gl)continue;mn=Ul.ownerSVGElement}else mn=Ul;for(var Kr=oe(mn,Ql.ownerDocument),Nn=0;Kr[Nn]&&Kr[Nn]===Xl[Nn];)Nn++;var hn=[Kr[Nn-1],Kr[Nn],Xl[Nn]];if(hn[0])for(var ui=hn[0].lastChild;ui;){if(ui===hn[1]){Cl=cr,Xl=Kr;break}if(ui===hn[2])break;ui=ui.previousSibling}}else Vl=Ql,(parseInt(S(_l=Ul).getComputedStyle(_l).zIndex,10)||0)>=(parseInt(S(Vl).getComputedStyle(Vl).zIndex,10)||0)&&(Cl=cr);else Cl=cr}else Cl=cr}return Cl}(K);return b.activeDrops[Qa]||null}function Ee(s,t,h){var b=s.dropState,C={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return h.type==="dragstart"&&(C.activate=new we(b,h,"dropactivate"),C.activate.target=null,C.activate.dropzone=null),h.type==="dragend"&&(C.deactivate=new we(b,h,"dropdeactivate"),C.deactivate.target=null,C.deactivate.dropzone=null),b.rejected||(b.cur.element!==b.prev.element&&(b.prev.dropzone&&(C.leave=new we(b,h,"dragleave"),h.dragLeave=C.leave.target=b.prev.element,h.prevDropzone=C.leave.dropzone=b.prev.dropzone),b.cur.dropzone&&(C.enter=new we(b,h,"dragenter"),h.dragEnter=b.cur.element,h.dropzone=b.cur.dropzone)),h.type==="dragend"&&b.cur.dropzone&&(C.drop=new we(b,h,"drop"),h.dropzone=b.cur.dropzone,h.relatedTarget=b.cur.element),h.type==="dragmove"&&b.cur.dropzone&&(C.move=new we(b,h,"dropmove"),h.dropzone=b.cur.dropzone)),C}function Me(s,t){var h=s.dropState,b=h.activeDrops,C=h.cur,$=h.prev;t.leave&&$.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&&fa(b,t.deactivate),h.prev.dropzone=C.dropzone,h.prev.element=C.element}function Fe(s,t){var h=s.interaction,b=s.iEvent,C=s.event;if(b.type==="dragmove"||b.type==="dragend"){var $=h.dropState;t.dynamicDrop&&($.activeDrops=ea(t,h.element));var K=b,X=Ta(h,K,C);$.rejected=$.rejected&&!!X&&X.dropzone===$.cur.dropzone&&X.element===$.cur.element,$.cur.dropzone=X&&X.dropzone,$.cur.element=X&&X.element,$.events=Ee(h,0,K)}}var $e={id:"actions/drop",install:function(s){var t=s.actions,h=s.interactStatic,b=s.Interactable,C=s.defaults;s.usePlugin(Y),b.prototype.dropzone=function($){return function(K,X){if(x.object(X)){if(K.options.drop.enabled=X.enabled!==!1,X.listeners){var _e=qe(X.listeners),We=Object.keys(_e).reduce(function(na,Oa){return na[/^(enter|leave)/.test(Oa)?"drag".concat(Oa):/^(activate|deactivate|move)/.test(Oa)?"drop".concat(Oa):Oa]=_e[Oa],na},{}),Ce=K.options.drop.listeners;Ce&&K.off(Ce),K.on(We),K.options.drop.listeners=We}return x.func(X.ondrop)&&K.on("drop",X.ondrop),x.func(X.ondropactivate)&&K.on("dropactivate",X.ondropactivate),x.func(X.ondropdeactivate)&&K.on("dropdeactivate",X.ondropdeactivate),x.func(X.ondragenter)&&K.on("dragenter",X.ondragenter),x.func(X.ondragleave)&&K.on("dragleave",X.ondragleave),x.func(X.ondropmove)&&K.on("dropmove",X.ondropmove),/^(pointer|center)$/.test(X.overlap)?K.options.drop.overlap=X.overlap:x.number(X.overlap)&&(K.options.drop.overlap=Math.max(Math.min(1,X.overlap),0)),"accept"in X&&(K.options.drop.accept=X.accept),"checker"in X&&(K.options.drop.checker=X.checker),K}return x.bool(X)?(K.options.drop.enabled=X,K):K.options.drop}(this,$)},b.prototype.dropCheck=function($,K,X,_e,We,Ce){return function(na,Oa,ll,Qa,cl,Cl,_l){var Vl=!1;if(!(_l=_l||na.getRect(Cl)))return!!na.options.drop.checker&&na.options.drop.checker(Oa,ll,Vl,na,Cl,Qa,cl);var Xl=na.options.drop.overlap;if(Xl==="pointer"){var cr=me(Qa,cl,"drag"),Ul=ca(Oa);Ul.x+=cr.x,Ul.y+=cr.y;var Ql=Ul.x>_l.left&&Ul.x<_l.right,cn=Ul.y>_l.top&&Ul.y<_l.bottom;Vl=Ql&&cn}var Gl=Qa.getRect(cl);if(Gl&&Xl==="center"){var mn=Gl.left+Gl.width/2,Kr=Gl.top+Gl.height/2;Vl=mn>=_l.left&&mn<=_l.right&&Kr>=_l.top&&Kr<=_l.bottom}return Gl&&x.number(Xl)&&(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)>=Xl),na.options.drop.checker&&(Vl=na.options.drop.checker(Oa,ll,Vl,na,Cl,Qa,cl)),Vl}(this,$,K,X,_e,We,Ce)},h.dynamicDrop=function($){return x.bool($)?(s.dynamicDrop=$,h):s.dynamicDrop},ne(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",s.dynamicDrop=!1,C.actions.drop=$e.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,b=(s.event,s.iEvent);if(h.prepared.name==="drag"){var C=h.dropState;C.activeDrops=[],C.events={},C.activeDrops=ea(t,h.element),C.events=Ee(h,0,b),C.events.activate&&(fa(C.activeDrops,C.events.activate),t.fire("actions/drop:start",{interaction:h,dragEvent:b}))}},"interactions:action-move":Fe,"interactions:after-action-move":function(s,t){var h=s.interaction,b=s.iEvent;if(h.prepared.name==="drag"){var C=h.dropState;Me(h,C.events),t.fire("actions/drop:move",{interaction:h,dragEvent:b}),C.events={}}},"interactions:action-end":function(s,t){if(s.interaction.prepared.name==="drag"){var h=s.interaction,b=s.iEvent;Fe(s,t),Me(h,h.dropState.events),t.fire("actions/drop:end",{interaction:h,dragEvent:b})}},"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:ea,getDrop:Ta,getDropEvents:Ee,fireDropEvents:Me,filterEventType:function(s){return s.search("drag")===0||s.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},he=$e;function tl(s){var t=s.interaction,h=s.iEvent,b=s.phase;if(t.prepared.name==="gesture"){var C=t.pointers.map(function(We){return We.pointer}),$=b==="start",K=b==="end",X=t.interactable.options.deltaSource;if(h.touches=[C[0],C[1]],$)h.distance=Na(C,X),h.box=Fa(C),h.scale=1,h.ds=0,h.angle=oa(C,X),h.da=0,t.gesture.startDistance=h.distance,t.gesture.startAngle=h.angle;else if(K||t.pointers.length<2){var _e=t.prevEvent;h.distance=_e.distance,h.box=_e.box,h.scale=_e.scale,h.ds=0,h.angle=_e.angle,h.da=0}else h.distance=Na(C,X),h.box=Fa(C),h.scale=h.distance/t.gesture.startDistance,h.angle=oa(C,X),h.ds=h.scale-t.gesture.scale,h.da=h.angle-t.gesture.angle;t.gesture.distance=h.distance,t.gesture.angle=h.angle,x.number(h.scale)&&h.scale!==1/0&&!isNaN(h.scale)&&(t.gesture.scale=h.scale)}}var El={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(s){var t=s.actions,h=s.Interactable,b=s.defaults;h.prototype.gesturable=function(C){return x.object(C)?(this.options.gesture.enabled=C.enabled!==!1,this.setPerAction("gesture",C),this.setOnEvents("gesture",C),this):x.bool(C)?(this.options.gesture.enabled=C,this):this.options.gesture},t.map.gesture=El,t.methodDict.gesture="gesturable",b.actions.gesture=El.defaults},listeners:{"interactions:action-start":tl,"interactions:action-move":tl,"interactions:action-end":tl,"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}},Ml=El;function Hl(s,t,h,b,C,$,K){if(!t)return!1;if(t===!0){var X=x.number($.width)?$.width:$.right-$.left,_e=x.number($.height)?$.height:$.bottom-$.top;if(K=Math.min(K,Math.abs((s==="left"||s==="right"?X:_e)/2)),X<0&&(s==="left"?s="right":s==="right"&&(s="left")),_e<0&&(s==="top"?s="bottom":s==="bottom"&&(s="top")),s==="left"){var We=X>=0?$.left:$.right;return h.x<We+K}if(s==="top"){var Ce=_e>=0?$.top:$.bottom;return h.y<Ce+K}if(s==="right")return h.x>(X>=0?$.right:$.left)-K;if(s==="bottom")return h.y>(_e>=0?$.bottom:$.top)-K}return!!x.element(b)&&(x.element(t)?t===b:q(b,t,C))}function Bl(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.resizeAxes){var b=t;h.interactable.options.resize.square?(h.resizeAxes==="y"?b.delta.x=b.delta.y:b.delta.y=b.delta.x,b.axes="xy"):(b.axes=h.resizeAxes,h.resizeAxes==="x"?b.delta.y=0:h.resizeAxes==="y"&&(b.delta.x=0))}}var jl,el,$l={id:"actions/resize",before:["actions/drag"],install:function(s){var t=s.actions,h=s.browser,b=s.Interactable,C=s.defaults;$l.cursors=function($){return $.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),$l.defaultMargin=h.supportsTouch||h.supportsPointerEvent?20:10,b.prototype.resizable=function($){return function(K,X,_e){return x.object(X)?(K.options.resize.enabled=X.enabled!==!1,K.setPerAction("resize",X),K.setOnEvents("resize",X),x.string(X.axis)&&/^x$|^y$|^xy$/.test(X.axis)?K.options.resize.axis=X.axis:X.axis===null&&(K.options.resize.axis=_e.defaults.actions.resize.axis),x.bool(X.preserveAspectRatio)?K.options.resize.preserveAspectRatio=X.preserveAspectRatio:x.bool(X.square)&&(K.options.resize.square=X.square),K):x.bool(X)?(K.options.resize.enabled=X,K):K.options.resize}(this,$,s)},t.map.resize=$l,t.methodDict.resize="resizable",C.actions.resize=$l.defaults},listeners:{"interactions:new":function(s){s.interaction.resizeAxes="xy"},"interactions:action-start":function(s){(function(t){var h=t.iEvent,b=t.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var C=h,$=b.rect;b._rects={start:ne({},$),corrected:ne({},$),previous:ne({},$),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},C.edges=b.prepared.edges,C.rect=b._rects.corrected,C.deltaRect=b._rects.delta}})(s),Bl(s)},"interactions:action-move":function(s){(function(t){var h=t.iEvent,b=t.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var C=h,$=b.interactable.options.resize.invert,K=$==="reposition"||$==="negate",X=b.rect,_e=b._rects,We=_e.start,Ce=_e.corrected,na=_e.delta,Oa=_e.previous;if(ne(Oa,Ce),K){if(ne(Ce,X),$==="reposition"){if(Ce.top>Ce.bottom){var ll=Ce.top;Ce.top=Ce.bottom,Ce.bottom=ll}if(Ce.left>Ce.right){var Qa=Ce.left;Ce.left=Ce.right,Ce.right=Qa}}}else Ce.top=Math.min(X.top,We.bottom),Ce.bottom=Math.max(X.bottom,We.top),Ce.left=Math.min(X.left,We.right),Ce.right=Math.max(X.right,We.left);for(var cl in Ce.width=Ce.right-Ce.left,Ce.height=Ce.bottom-Ce.top,Ce)na[cl]=Ce[cl]-Oa[cl];C.edges=b.prepared.edges,C.rect=Ce,C.deltaRect=na}})(s),Bl(s)},"interactions:action-end":function(s){var t=s.iEvent,h=s.interaction;if(h.prepared.name==="resize"&&h.prepared.edges){var b=t;b.edges=h.prepared.edges,b.rect=h._rects.corrected,b.deltaRect=h._rects.delta}},"auto-start:check":function(s){var t=s.interaction,h=s.interactable,b=s.element,C=s.rect,$=s.buttons;if(C){var K=ne({},t.coords.cur.page),X=h.options.resize;if(X&&X.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||($&X.mouseButtons)!=0)){if(x.object(X.edges)){var _e={left:!1,right:!1,top:!1,bottom:!1};for(var We in _e)_e[We]=Hl(We,X.edges[We],K,t._latestPointer.eventTarget,b,C,X.margin||$l.defaultMargin);_e.left=_e.left&&!_e.right,_e.top=_e.top&&!_e.bottom,(_e.left||_e.right||_e.top||_e.bottom)&&(s.action={name:"resize",edges:_e})}else{var Ce=X.axis!=="y"&&K.x>C.right-$l.defaultMargin,na=X.axis!=="x"&&K.y>C.bottom-$l.defaultMargin;(Ce||na)&&(s.action={name:"resize",axes:(Ce?"x":"")+(na?"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,b=s.name,C=$l.cursors,$=null;if(h)$=C[b+h];else if(t){for(var K="",X=0,_e=["top","bottom","left","right"];X<_e.length;X++){var We=_e[X];t[We]&&(K+=We)}$=C[K]}return $},filterEventType:function(s){return s.search("resize")===0},defaultMargin:null},Wa=$l,Kl={id:"actions",install:function(s){s.usePlugin(Ml),s.usePlugin(Wa),s.usePlugin(Y),s.usePlugin(he)}},Jl=0,ar={request:function(s){return jl(s)},cancel:function(s){return el(s)},init:function(s){if(jl=s.requestAnimationFrame,el=s.cancelAnimationFrame,!jl)for(var t=["ms","moz","webkit","o"],h=0;h<t.length;h++){var b=t[h];jl=s["".concat(b,"RequestAnimationFrame")],el=s["".concat(b,"CancelAnimationFrame")]||s["".concat(b,"CancelRequestAnimationFrame")]}jl=jl&&jl.bind(s),el=el&&el.bind(s),jl||(jl=function(C){var $=Date.now(),K=Math.max(0,16-($-Jl)),X=s.setTimeout(function(){C($+K)},K);return Jl=$+K,X},el=function(C){return clearTimeout(C)})}},xl={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){xl.isScrolling=!0,ar.cancel(xl.i),s.autoScroll=xl,xl.interaction=s,xl.prevTime=xl.now(),xl.i=ar.request(xl.scroll)},stop:function(){xl.isScrolling=!1,xl.interaction&&(xl.interaction.autoScroll=null),ar.cancel(xl.i)},scroll:function(){var s=xl.interaction,t=s.interactable,h=s.element,b=s.prepared.name,C=t.options[b].autoScroll,$=br(C.container,t,h),K=xl.now(),X=(K-xl.prevTime)/1e3,_e=C.speed*X;if(_e>=1){var We={x:xl.x*_e,y:xl.y*_e};if(We.x||We.y){var Ce=ya($);x.window($)?$.scrollBy(We.x,We.y):$&&($.scrollLeft+=We.x,$.scrollTop+=We.y);var na=ya($),Oa={x:na.x-Ce.x,y:na.y-Ce.y};(Oa.x||Oa.y)&&t.fire({type:"autoscroll",target:h,interactable:t,delta:Oa,interaction:s,container:$})}xl.prevTime=K}xl.isScrolling&&(ar.cancel(xl.i),xl.i=ar.request(xl.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()&&xl.check(t.interactable,t.prepared.name))if(t.simulation)xl.x=xl.y=0;else{var b,C,$,K,X=t.interactable,_e=t.element,We=t.prepared.name,Ce=X.options[We].autoScroll,na=br(Ce.container,X,_e);if(x.window(na))K=h.clientX<xl.margin,b=h.clientY<xl.margin,C=h.clientX>na.innerWidth-xl.margin,$=h.clientY>na.innerHeight-xl.margin;else{var Oa=Ke(na);K=h.clientX<Oa.left+xl.margin,b=h.clientY<Oa.top+xl.margin,C=h.clientX>Oa.right-xl.margin,$=h.clientY>Oa.bottom-xl.margin}xl.x=C?1:K?-1:0,xl.y=$?1:b?-1:0,xl.isScrolling||(xl.margin=Ce.margin,xl.speed=Ce.speed,xl.start(t))}}};function br(s,t,h){return(x.string(s)?ua(s,t,h):s)||S(h)}function ya(s){return x.window(s)&&(s=window.document.body),{x:s.scrollLeft,y:s.scrollTop}}var sl={id:"auto-scroll",install:function(s){var t=s.defaults,h=s.actions;s.autoScroll=xl,xl.now=function(){return s.now()},h.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=xl.defaults},listeners:{"interactions:new":function(s){s.interaction.autoScroll=null},"interactions:destroy":function(s){s.interaction.autoScroll=null,xl.stop(),xl.interaction&&(xl.interaction=null)},"interactions:stop":xl.stop,"interactions:action-move":function(s){return xl.onInteractionMove(s)}}},ha=sl;function Ha(s,t){var h=!1;return function(){return h||(L.console.warn(t),h=!0),s.apply(this,arguments)}}function ra(s,t){return s.name=t.name,s.axis=t.axis,s.edges=t.edges,s}function Ga(s){return x.bool(s)?(this.options.styleCursor=s,this):s===null?(delete this.options.styleCursor,this):this.options.styleCursor}function wl(s){return x.func(s)?(this.options.actionChecker=s,this):s===null?(delete this.options.actionChecker,this):this.options.actionChecker}var De={id:"auto-start/interactableMethods",install:function(s){var t=s.Interactable;t.prototype.getAction=function(h,b,C,$){var K=function(X,_e,We,Ce,na){var Oa=X.getRect(Ce),ll=_e.buttons||{0:1,1:4,3:8,4:16}[_e.button],Qa={action:null,interactable:X,interaction:We,element:Ce,rect:Oa,buttons:ll};return na.fire("auto-start:check",Qa),Qa.action}(this,b,C,$,s);return this.options.actionChecker?this.options.actionChecker(h,b,K,this,$,C):K},t.prototype.ignoreFrom=Ha(function(h){return this._backCompatOption("ignoreFrom",h)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Ha(function(h){return this._backCompatOption("allowFrom",h)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=wl,t.prototype.styleCursor=Ga}};function ia(s,t,h,b,C){return t.testIgnoreAllow(t.options[s.name],h,b)&&t.options[s.name].enabled&&al(t,h,s,C)?s:null}function Pa(s,t,h,b,C,$,K){for(var X=0,_e=b.length;X<_e;X++){var We=b[X],Ce=C[X],na=We.getAction(t,h,s,Ce);if(na){var Oa=ia(na,We,Ce,$,K);if(Oa)return{action:Oa,interactable:We,element:Ce}}}return{action:null,interactable:null,element:null}}function Be(s,t,h,b,C){var $=[],K=[],X=b;function _e(Ce){$.push(Ce),K.push(X)}for(;x.element(X);){$=[],K=[],C.interactables.forEachMatch(X,_e);var We=Pa(s,t,h,$,K,b,C);if(We.action&&!We.interactable.options[We.action.name].manualStart)return We;X=Ie(X)}return{action:null,interactable:null,element:null}}function La(s,t,h){var b=t.action,C=t.interactable,$=t.element;b=b||{name:null},s.interactable=C,s.element=$,ra(s.prepared,b),s.rect=C&&b.name?C.getRect($):null,Oe(s,h),h.fire("autoStart:prepared",{interaction:s})}function al(s,t,h,b){var C=s.options,$=C[h.name].max,K=C[h.name].maxPerElement,X=b.autoStart.maxInteractions,_e=0,We=0,Ce=0;if(!($&&K&&X))return!1;for(var na=0,Oa=b.interactions.list;na<Oa.length;na++){var ll=Oa[na],Qa=ll.prepared.name;if(ll.interacting()&&(++_e>=X||ll.interactable===s&&((We+=Qa===h.name?1:0)>=$||ll.element===t&&(Ce++,Qa===h.name&&Ce>=K))))return!1}return X>0}function bl(s,t){return x.number(s)?(t.autoStart.maxInteractions=s,this):t.autoStart.maxInteractions}function Tl(s,t,h){var b=h.autoStart.cursorElement;b&&b!==s&&(b.style.cursor=""),s.ownerDocument.documentElement.style.cursor=t,s.style.cursor=t,h.autoStart.cursorElement=t?s:null}function Oe(s,t){var h=s.interactable,b=s.element,C=s.prepared;if(s.pointerType==="mouse"&&h&&h.options.styleCursor){var $="";if(C.name){var K=h.options[C.name].cursorChecker;$=x.func(K)?K(C,h,b,s._interacting):t.actions.map[C.name].getCursor(C)}Tl(s.element,$||"",t)}else t.autoStart.cursorElement&&Tl(t.autoStart.cursorElement,"",t)}var ma={id:"auto-start/base",before:["actions"],install:function(s){var t=s.interactStatic,h=s.defaults;s.usePlugin(De),h.base.actionChecker=null,h.base.styleCursor=!0,ne(h.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(b){return bl(b,s)},s.autoStart={maxInteractions:1/0,withinInteractionLimit:al,cursorElement:null}},listeners:{"interactions:down":function(s,t){var h=s.interaction,b=s.pointer,C=s.event,$=s.eventTarget;h.interacting()||La(h,Be(h,b,C,$,t),t)},"interactions:move":function(s,t){(function(h,b){var C=h.interaction,$=h.pointer,K=h.event,X=h.eventTarget;C.pointerType!=="mouse"||C.pointerIsDown||C.interacting()||La(C,Be(C,$,K,X,b),b)})(s,t),function(h,b){var C=h.interaction;if(C.pointerIsDown&&!C.interacting()&&C.pointerWasMoved&&C.prepared.name){b.fire("autoStart:before-start",h);var $=C.interactable,K=C.prepared.name;K&&$&&($.options[K].manualStart||!al($,C.element,C.prepared,b)?C.stop():(C.start(C.prepared,$,C.element),Oe(C,b)))}}(s,t)},"interactions:stop":function(s,t){var h=s.interaction,b=h.interactable;b&&b.options.styleCursor&&Tl(h.element,"",t)}},maxInteractions:bl,withinInteractionLimit:al,validateAction:ia},ta=ma,xa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(s,t){var h=s.interaction,b=s.eventTarget,C=s.dx,$=s.dy;if(h.prepared.name==="drag"){var K=Math.abs(C),X=Math.abs($),_e=h.interactable.options.drag,We=_e.startAxis,Ce=K>X?"x":K<X?"y":"xy";if(h.prepared.axis=_e.lockAxis==="start"?Ce[0]:_e.lockAxis,Ce!=="xy"&&We!=="xy"&&We!==Ce){h.prepared.name=null;for(var na=b,Oa=function(Qa){if(Qa!==h.interactable){var cl=h.interactable.options.drag;if(!cl.manualStart&&Qa.testIgnoreAllow(cl,na,b)){var Cl=Qa.getAction(h.downPointer,h.downEvent,h,na);if(Cl&&Cl.name==="drag"&&function(_l,Vl){if(!Vl)return!1;var Xl=Vl.options.drag.startAxis;return _l==="xy"||Xl==="xy"||Xl===_l}(Ce,Qa)&&ta.validateAction(Cl,Qa,na,b,t))return Qa}}};x.element(na);){var ll=t.interactables.forEachMatch(na,Oa);if(ll){h.prepared.name="drag",h.interactable=ll,h.element=na;break}na=Ie(na)}}}}}};function ga(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 fl={id:"auto-start/hold",install:function(s){var t=s.defaults;s.usePlugin(ta),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=ga(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;ga(t)>0&&(t.prepared.name=null)}},getHoldDuration:ga},Ve=fl,ml={id:"auto-start",install:function(s){s.usePlugin(ta),s.usePlugin(Ve),s.usePlugin(xa)}},Ne=function(s){return/^(always|never|auto)$/.test(s)?(this.options.preventDefault=s,this):x.bool(s)?(this.options.preventDefault=s?"always":"never",this):this.options.preventDefault};function Pl(s){var t=s.interaction,h=s.event;t.interactable&&t.interactable.checkAndPreventDefault(h)}var Da={id:"core/interactablePreventDefault",install:function(s){var t=s.Interactable;t.prototype.preventDefault=Ne,t.prototype.checkAndPreventDefault=function(h){return function(b,C,$){var K=b.options.preventDefault;if(K!=="never")if(K!=="always"){if(C.events.supportsPassive&&/^touch(start|move)$/.test($.type)){var X=S($.target).document,_e=C.getDocOptions(X);if(!_e||!_e.events||_e.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test($.type)||x.element($.target)&&ue($.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||$.preventDefault()}else $.preventDefault()}(this,s,h)},s.interactions.docEvents.push({type:"dragstart",listener:function(h){for(var b=0,C=s.interactions.list;b<C.length;b++){var $=C[b];if($.element&&($.element===h.target||ee($.element,h.target)))return void $.interactable.checkAndPreventDefault(h)}}})},listeners:["down","move","up","cancel"].reduce(function(s,t){return s["interactions:".concat(t)]=Pl,s},{})};function ul(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 Za(s){var t={};for(var h in s){var b=s[h];x.plainObject(b)?t[h]=Za(b):x.array(b)?t[h]=te(b):t[h]=b}return t}var Nl=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=Ba(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return c(s,[{key:"start",value:function(t,h){var b,C,$=t.phase,K=this.interaction,X=function(We){var Ce=We.interactable.options[We.prepared.name],na=Ce.modifiers;return na&&na.length?na:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Oa){var ll=Ce[Oa];return ll&&ll.enabled&&{options:ll,methods:ll._methods}}).filter(function(Oa){return!!Oa})}(K);this.prepareStates(X),this.startEdges=ne({},K.edges),this.edges=ne({},this.startEdges),this.startOffset=(b=K.rect,C=h,b?{left:C.x-b.left,top:C.y-b.top,right:b.right-C.x,bottom:b.bottom-C.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var _e=this.fillArg({phase:$,pageCoords:h,preEnd:!1});return this.result=Ba(),this.startAll(_e),this.result=this.setAll(_e)}},{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,b=this.states;h<b.length;h++){var C=b[h];C.methods.start&&(t.state=C,C.methods.start(t))}}},{key:"setAll",value:function(t){var h=t.phase,b=t.preEnd,C=t.skipModifiers,$=t.rect,K=t.edges;t.coords=ne({},t.pageCoords),t.rect=ne({},$),t.edges=ne({},K);for(var X=C?this.states.slice(C):this.states,_e=Ba(t.coords,t.rect),We=0;We<X.length;We++){var Ce,na=X[We],Oa=na.options,ll=ne({},t.coords),Qa=null;(Ce=na.methods)!=null&&Ce.set&&this.shouldDo(Oa,b,h)&&(t.state=na,Qa=na.methods.set(t),se(t.edges,t.rect,{x:t.coords.x-ll.x,y:t.coords.y-ll.y})),_e.eventProps.push(Qa)}ne(this.edges,t.edges),_e.delta.x=t.coords.x-t.pageCoords.x,_e.delta.y=t.coords.y-t.pageCoords.y,_e.rectDelta.left=t.rect.left-$.left,_e.rectDelta.right=t.rect.right-$.right,_e.rectDelta.top=t.rect.top-$.top,_e.rectDelta.bottom=t.rect.bottom-$.bottom;var cl=this.result.coords,Cl=this.result.rect;if(cl&&Cl){var _l=_e.rect.left!==Cl.left||_e.rect.right!==Cl.right||_e.rect.top!==Cl.top||_e.rect.bottom!==Cl.bottom;_e.changed=_l||cl.x!==_e.coords.x||cl.y!==_e.coords.y}return _e}},{key:"applyToInteraction",value:function(t){var h=this.interaction,b=t.phase,C=h.coords.cur,$=h.coords.start,K=this.result,X=this.startDelta,_e=K.delta;b==="start"&&ne(this.startDelta,K.delta);for(var We=0,Ce=[[$,X],[C,_e]];We<Ce.length;We++){var na=Ce[We],Oa=na[0],ll=na[1];Oa.page.x+=ll.x,Oa.page.y+=ll.y,Oa.client.x+=ll.x,Oa.client.y+=ll.y}var Qa=this.result.rectDelta,cl=t.rect||h.rect;cl.left+=Qa.left,cl.right+=Qa.right,cl.top+=Qa.top,cl.bottom+=Qa.bottom,cl.width=cl.right-cl.left,cl.height=cl.bottom-cl.top}},{key:"setAndApply",value:function(t){var h=this.interaction,b=t.phase,C=t.preEnd,$=t.skipModifiers,K=this.setAll(this.fillArg({preEnd:C,phase:b,pageCoords:t.modifiedCoords||h.coords.cur.page}));if(this.result=K,!K.changed&&(!$||$<this.states.length)&&h.interacting())return!1;if(t.modifiedCoords){var X=h.coords.cur.page,_e={x:t.modifiedCoords.x-X.x,y:t.modifiedCoords.y-X.y};K.coords.x+=_e.x,K.coords.y+=_e.y,K.delta.x+=_e.x,K.delta.y+=_e.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var h=t.interaction,b=t.event,C=this.states;if(C&&C.length){for(var $=!1,K=0;K<C.length;K++){var X=C[K];t.state=X;var _e=X.options,We=X.methods,Ce=We.beforeEnd&&We.beforeEnd(t);if(Ce)return this.endResult=Ce,!1;$=$||!$&&this.shouldDo(_e,!0,t.phase,!0)}$&&h.move({event:b,preEnd:!0})}}},{key:"stop",value:function(t){var h=t.interaction;if(this.states&&this.states.length){var b=ne({states:this.states,interactable:h.interactable,element:h.element,rect:null},t);this.fillArg(b);for(var C=0,$=this.states;C<$.length;C++){var K=$[C];b.state=K,K.methods.stop&&K.methods.stop(b)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var h=0;h<t.length;h++){var b=t[h],C=b.options,$=b.methods,K=b.name;this.states.push({options:C,methods:$,index:h,name:K})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var h=t.interaction,b=h.coords,C=h.rect,$=h.modification;if($.result){for(var K=$.startDelta,X=$.result,_e=X.delta,We=X.rectDelta,Ce=0,na=[[b.start,K],[b.cur,_e]];Ce<na.length;Ce++){var Oa=na[Ce],ll=Oa[0],Qa=Oa[1];ll.page.x-=Qa.x,ll.page.y-=Qa.y,ll.client.x-=Qa.x,ll.client.y-=Qa.y}C.left-=We.left,C.right-=We.right,C.top-=We.top,C.bottom-=We.bottom}}},{key:"shouldDo",value:function(t,h,b,C){return!(!t||t.enabled===!1||C&&!t.endOnly||t.endOnly&&!h||b==="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 Za(h)}),this.result=Ba(ne({},t.result.coords),ne({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),s}();function Ba(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 Rl(s,t){var h=s.defaults,b={start:s.start,set:s.set,beforeEnd:s.beforeEnd,stop:s.stop},C=function($){var K=$||{};for(var X in K.enabled=K.enabled!==!1,h)X in K||(K[X]=h[X]);var _e={options:K,methods:b,name:t,enable:function(){return K.enabled=!0,_e},disable:function(){return K.enabled=!1,_e}};return _e};return t&&typeof t=="string"&&(C._defaults=h,C._methods=b),C}function Er(s){var t=s.iEvent,h=s.interaction.modification.result;h&&(t.modifiers=h.eventProps)}var tn={id:"modifiers/base",before:["actions"],install:function(s){s.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(s){var t=s.interaction;t.modification=new Nl(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,b=h.setAndApply(s);return t.edges=h.edges,b},"interactions:before-action-end":function(s){var t=s.interaction,h=t.modification,b=h.beforeEnd(s);return t.edges=h.startEdges,b},"interactions:action-start":Er,"interactions:action-move":Er,"interactions:action-end":Er,"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)}}},Fr=tn,ir={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ur=function(s){m(h,s);var t=N(h);function h(b,C,$,K,X,_e,We){var Ce;o(this,h),(Ce=t.call(this,b)).relatedTarget=null,Ce.screenX=void 0,Ce.screenY=void 0,Ce.button=void 0,Ce.buttons=void 0,Ce.ctrlKey=void 0,Ce.shiftKey=void 0,Ce.altKey=void 0,Ce.metaKey=void 0,Ce.page=void 0,Ce.client=void 0,Ce.delta=void 0,Ce.rect=void 0,Ce.x0=void 0,Ce.y0=void 0,Ce.t0=void 0,Ce.dt=void 0,Ce.duration=void 0,Ce.clientX0=void 0,Ce.clientY0=void 0,Ce.velocity=void 0,Ce.speed=void 0,Ce.swipe=void 0,Ce.axes=void 0,Ce.preEnd=void 0,X=X||b.element;var na=b.interactable,Oa=(na&&na.options||ir).deltaSource,ll=me(na,X,$),Qa=K==="start",cl=K==="end",Cl=Qa?d(Ce):b.prevEvent,_l=Qa?b.coords.start:cl?{page:Cl.page,client:Cl.client,timeStamp:b.coords.cur.timeStamp}:b.coords.cur;return Ce.page=ne({},_l.page),Ce.client=ne({},_l.client),Ce.rect=ne({},b.rect),Ce.timeStamp=_l.timeStamp,cl||(Ce.page.x-=ll.x,Ce.page.y-=ll.y,Ce.client.x-=ll.x,Ce.client.y-=ll.y),Ce.ctrlKey=C.ctrlKey,Ce.altKey=C.altKey,Ce.shiftKey=C.shiftKey,Ce.metaKey=C.metaKey,Ce.button=C.button,Ce.buttons=C.buttons,Ce.target=X,Ce.currentTarget=X,Ce.preEnd=_e,Ce.type=We||$+(K||""),Ce.interactable=na,Ce.t0=Qa?b.pointers[b.pointers.length-1].downTime:Cl.t0,Ce.x0=b.coords.start.page.x-ll.x,Ce.y0=b.coords.start.page.y-ll.y,Ce.clientX0=b.coords.start.client.x-ll.x,Ce.clientY0=b.coords.start.client.y-ll.y,Ce.delta=Qa||cl?{x:0,y:0}:{x:Ce[Oa].x-Cl[Oa].x,y:Ce[Oa].y-Cl[Oa].y},Ce.dt=b.coords.delta.timeStamp,Ce.duration=Ce.timeStamp-Ce.t0,Ce.velocity=ne({},b.coords.velocity[Oa]),Ce.speed=_a(Ce.velocity.x,Ce.velocity.y),Ce.swipe=cl||K==="inertiastart"?Ce.getSwipe():null,Ce}return c(h,[{key:"getSwipe",value:function(){var b=this._interaction;if(b.prevEvent.speed<600||this.timeStamp-b.prevEvent.timeStamp>150)return null;var C=180*Math.atan2(b.prevEvent.velocityY,b.prevEvent.velocityX)/Math.PI;C<0&&(C+=360);var $=112.5<=C&&C<247.5,K=202.5<=C&&C<337.5;return{up:K,down:!K&&22.5<=C&&C<157.5,left:$,right:!$&&(292.5<=C||C<67.5),angle:C,speed:b.prevEvent.speed,velocity:{x:b.prevEvent.velocityX,y:b.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(Ur.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 Zr=c(function s(t,h,b,C,$){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=b,this.downTime=C,this.downTarget=$}),Or=function(s){return s.interactable="",s.element="",s.prepared="",s.pointerIsDown="",s.pointerWasMoved="",s._proxy="",s}({}),rr=function(s){return s.start="",s.move="",s.end="",s.stop="",s.interacting="",s}({}),en=0,Gr=function(){function s(t){var h=this,b=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=Ha(function(Ce){this.move(Ce)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=en++,this._scopeFire=C,this.pointerType=b;var $=this;this._proxy={};var K=function(Ce){Object.defineProperty(h._proxy,Ce,{get:function(){return $[Ce]}})};for(var X in Or)K(X);var _e=function(Ce){Object.defineProperty(h._proxy,Ce,{value:function(){return $[Ce].apply($,arguments)}})};for(var We in rr)_e(We);this._scopeFire("interactions:new",{interaction:this})}return c(s,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,h,b){var C=this.updatePointer(t,h,b,!0),$=this.pointers[C];this._scopeFire("interactions:down",{pointer:t,event:h,eventTarget:b,pointerIndex:C,pointerInfo:$,type:"down",interaction:this})}},{key:"start",value:function(t,h,b){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!h.options[t.name].enabled)&&(ra(this.prepared,t),this.interactable=h,this.element=b,this.rect=h.getRect(b),this.edges=this.prepared.edges?ne({},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,b){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,h,b,!1);var C,$,K=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(C=this.coords.cur.client.x-this.coords.start.client.x,$=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=_a(C,$)>this.pointerMoveTolerance);var X,_e,We,Ce=this.getPointerIndex(t),na={pointer:t,pointerIndex:Ce,pointerInfo:this.pointers[Ce],event:h,type:"move",eventTarget:b,dx:C,dy:$,duplicate:K,interaction:this};K||(X=this.coords.velocity,_e=this.coords.delta,We=Math.max(_e.timeStamp/1e3,.001),X.page.x=_e.page.x/We,X.page.y=_e.page.y/We,X.client.x=_e.client.x/We,X.client.y=_e.client.y/We,X.timeStamp=We),this._scopeFire("interactions:move",na),K||this.simulation||(this.interacting()&&(na.type=null,this.move(na)),this.pointerWasMoved&&ae(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||pe(this.coords.delta),(t=ne({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,b,C){var $=this.getPointerIndex(t);$===-1&&($=this.updatePointer(t,h,b,!1));var K=/cancel$/i.test(h.type)?"cancel":"up";this._scopeFire("interactions:".concat(K),{pointer:t,pointerIndex:$,pointerInfo:this.pointers[$],event:h,eventTarget:b,type:K,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=Ue(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:ce(this.pointers,function(b){return b.id===h})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,h,b,C){var $,K,X,_e=Ue(t),We=this.getPointerIndex(t),Ce=this.pointers[We];return C=C!==!1&&(C||/(down|start)$/i.test(h.type)),Ce?Ce.pointer=t:(Ce=new Zr(_e,t,h,null,null),We=this.pointers.length,this.pointers.push(Ce)),Sa(this.coords.cur,this.pointers.map(function(na){return na.pointer}),this._now()),$=this.coords.delta,K=this.coords.prev,X=this.coords.cur,$.page.x=X.page.x-K.page.x,$.page.y=X.page.y-K.page.y,$.client.x=X.client.x-K.client.x,$.client.y=X.client.y-K.client.y,$.timeStamp=X.timeStamp-K.timeStamp,C&&(this.pointerIsDown=!0,Ce.downTime=this.coords.cur.timeStamp,Ce.downTarget=b,V(this.downPointer,t),this.interacting()||(ae(this.coords.start,this.coords.cur),ae(this.coords.prev,this.coords.cur),this.downEvent=h,this.pointerWasMoved=!1)),this._updateLatestPointer(t,h,b),this._scopeFire("interactions:update-pointer",{pointer:t,event:h,eventTarget:b,down:C,pointerInfo:Ce,pointerIndex:We,interaction:this}),We}},{key:"removePointer",value:function(t,h){var b=this.getPointerIndex(t);if(b!==-1){var C=this.pointers[b];this._scopeFire("interactions:remove-pointer",{pointer:t,event:h,eventTarget:null,pointerIndex:b,pointerInfo:C,interaction:this}),this.pointers.splice(b,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,h,b){this._latestPointer.pointer=t,this._latestPointer.event=h,this._latestPointer.eventTarget=b}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,h,b,C){return new Ur(this,t,this.prepared.name,h,this.element,b,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,b=t.phase,C=t.preEnd,$=t.type,K=this.rect;if(K&&b==="move"&&(se(this.edges,K,this.coords.delta[this.interactable.options.deltaSource]),K.width=K.right-K.left,K.height=K.bottom-K.top),this._scopeFire("interactions:before-action-".concat(b),t)===!1)return!1;var X=t.iEvent=this._createPreparedEvent(h,b,C,$);return this._scopeFire("interactions:action-".concat(b),t),b==="start"&&(this.prevEvent=X),this._fireEvent(X),this._scopeFire("interactions:after-action-".concat(b),t),!0}},{key:"_now",value:function(){return Date.now()}}]),s}();function or(s){Cr(s.interaction)}function Cr(s){if(!function(h){return!(!h.offset.pending.x&&!h.offset.pending.y)}(s))return!1;var t=s.offset.pending;return Wl(s.coords.cur,t),Wl(s.coords.delta,t),se(s.edges,s.rect,t),t.x=0,t.y=0,!0}function an(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 Wl(s,t){var h=s.page,b=s.client,C=t.x,$=t.y;h.x+=C,h.y+=$,b.x+=C,b.y+=$}rr.offsetBy="";var tr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(s){s.Interaction.prototype.offsetBy=an},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&&(Wl(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(s.interaction)},"interactions:before-action-start":or,"interactions:before-action-move":or,"interactions:before-action-end":function(s){var t=s.interaction;if(Cr(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}}},kr=tr,Lr=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,b=Il(h);if(!b||!b.enabled)return!1;var C=h.coords.velocity.client,$=_a(C.x,C.y),K=this.modification||(this.modification=new Nl(h));if(K.copyFrom(h.modification),this.t0=h._now(),this.allowResume=b.allowResume,this.v0=$,this.currentOffset={x:0,y:0},this.startCoords=h.coords.cur.page,this.modifierArg=K.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-h.coords.cur.timeStamp<50&&$>b.minSpeed&&$>b.endSpeed)this.startInertia();else{if(K.result=K.setAll(this.modifierArg),!K.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,b=Il(this.interaction),C=b.resistance,$=-Math.log(b.endSpeed/this.v0)/C;this.targetOffset={x:(h.x-$)/C,y:(h.y-$)/C},this.te=$,this.lambda_v0=C/this.v0,this.one_ve_v0=1-b.endSpeed/this.v0;var K=this.modification,X=this.modifierArg;X.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},K.result=K.setAll(X),K.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+K.result.delta.x,y:this.targetOffset.y+K.result.delta.y}),this.onNextFrame(function(){return 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,b,C,$,K,X,_e=this,We=this.interaction,Ce=Il(We).resistance,na=(We._now()-this.t0)/1e3;if(na<this.te){var Oa,ll=1-(Math.exp(-Ce*na)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,h=0,b=this.targetOffset.x,C=this.targetOffset.y,$=this.modifiedOffset.x,K=this.modifiedOffset.y,Oa={x:sr(X=ll,t,b,$),y:sr(X,h,C,K)}):Oa={x:this.targetOffset.x*ll,y:this.targetOffset.y*ll};var Qa={x:Oa.x-this.currentOffset.x,y:Oa.y-this.currentOffset.y};this.currentOffset.x+=Qa.x,this.currentOffset.y+=Qa.y,We.offsetBy(Qa),We.move(),this.onNextFrame(function(){return _e.inertiaTick()})}else We.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,b=h._now()-this.t0,C=Il(h).smoothEndDuration;if(b<C){var $={x:_r(b,0,this.targetOffset.x,C),y:_r(b,0,this.targetOffset.y,C)},K={x:$.x-this.currentOffset.x,y:$.y-this.currentOffset.y};this.currentOffset.x+=K.x,this.currentOffset.y+=K.y,h.offsetBy(K),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,b=t.event,C=t.eventTarget,$=this.interaction;$.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),$.updatePointer(h,b,C,!0),$._doPhase({interaction:$,event:b,phase:"resume"}),ae($.coords.prev,$.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 Il(s){var t=s.interactable,h=s.prepared;return t&&t.options&&h.name&&t.options[h.name].inertia}var ln={id:"inertia",before:["modifiers","actions"],install:function(s){var t=s.defaults;s.usePlugin(kr),s.usePlugin(Fr),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 Lr(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,b=t.inertia;if(b.active)for(var C=h;x.element(C);){if(C===t.element){b.resume(s);break}C=Ie(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":Er,"interactions:action-inertiastart":Er,"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 sr(s,t,h,b){var C=1-s;return C*C*t+2*C*s*h+s*s*b}function _r(s,t,h,b){return-h*(s/=b)*(s-2)+t}var Mr=ln;function Br(s,t){for(var h=0;h<t.length;h++){var b=t[h];if(s.immediatePropagationStopped)break;b(s)}}var zn=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=ne({},t||{})}return c(s,[{key:"fire",value:function(t){var h,b=this.global;(h=this.types[t.type])&&Br(t,h),!t.propagationStopped&&b&&(h=b[t.type])&&Br(t,h)}},{key:"on",value:function(t,h){var b=qe(t,h);for(t in b)this.types[t]=pa(this.types[t]||[],b[t])}},{key:"off",value:function(t,h){var b=qe(t,h);for(t in b){var C=this.types[t];if(C&&C.length)for(var $=0,K=b[t];$<K.length;$++){var X=K[$],_e=C.indexOf(X);_e!==-1&&C.splice(_e,1)}}}},{key:"getRect",value:function(t){return null}}]),s}(),ri=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 Mn(s){return x.object(s)?{capture:!!s.capture,passive:!!s.passive}:{capture:!!s,passive:!1}}function wn(s,t){return s===t||(typeof s=="boolean"?!!t.capture===s&&!t.passive:!!s.capture==!!t.capture&&!!s.passive==!!t.passive)}var Gn={id:"events",install:function(s){var t,h=[],b={},C=[],$={add:K,remove:X,addDelegate:function(Ce,na,Oa,ll,Qa){var cl=Mn(Qa);if(!b[Oa]){b[Oa]=[];for(var Cl=0;Cl<C.length;Cl++){var _l=C[Cl];K(_l,Oa,_e),K(_l,Oa,We,!0)}}var Vl=b[Oa],Xl=Se(Vl,function(cr){return cr.selector===Ce&&cr.context===na});Xl||(Xl={selector:Ce,context:na,listeners:[]},Vl.push(Xl)),Xl.listeners.push({func:ll,options:cl})},removeDelegate:function(Ce,na,Oa,ll,Qa){var cl,Cl=Mn(Qa),_l=b[Oa],Vl=!1;if(_l)for(cl=_l.length-1;cl>=0;cl--){var Xl=_l[cl];if(Xl.selector===Ce&&Xl.context===na){for(var cr=Xl.listeners,Ul=cr.length-1;Ul>=0;Ul--){var Ql=cr[Ul];if(Ql.func===ll&&wn(Ql.options,Cl)){cr.splice(Ul,1),cr.length||(_l.splice(cl,1),X(na,Oa,_e),X(na,Oa,We,!0)),Vl=!0;break}}if(Vl)break}}},delegateListener:_e,delegateUseCapture:We,delegatedEvents:b,documents:C,targets:h,supportsOptions:!1,supportsPassive:!1};function K(Ce,na,Oa,ll){if(Ce.addEventListener){var Qa=Mn(ll),cl=Se(h,function(Cl){return Cl.eventTarget===Ce});cl||(cl={eventTarget:Ce,events:{}},h.push(cl)),cl.events[na]||(cl.events[na]=[]),Se(cl.events[na],function(Cl){return Cl.func===Oa&&wn(Cl.options,Qa)})||(Ce.addEventListener(na,Oa,$.supportsOptions?Qa:Qa.capture),cl.events[na].push({func:Oa,options:Qa}))}}function X(Ce,na,Oa,ll){if(Ce.addEventListener&&Ce.removeEventListener){var Qa=ce(h,function(cn){return cn.eventTarget===Ce}),cl=h[Qa];if(cl&&cl.events)if(na!=="all"){var Cl=!1,_l=cl.events[na];if(_l){if(Oa==="all"){for(var Vl=_l.length-1;Vl>=0;Vl--){var Xl=_l[Vl];X(Ce,na,Xl.func,Xl.options)}return}for(var cr=Mn(ll),Ul=0;Ul<_l.length;Ul++){var Ql=_l[Ul];if(Ql.func===Oa&&wn(Ql.options,cr)){Ce.removeEventListener(na,Oa,$.supportsOptions?cr:cr.capture),_l.splice(Ul,1),_l.length===0&&(delete cl.events[na],Cl=!0);break}}}Cl&&!Object.keys(cl.events).length&&h.splice(Qa,1)}else for(na in cl.events)cl.events.hasOwnProperty(na)&&X(Ce,na,"all")}}function _e(Ce,na){for(var Oa=Mn(na),ll=new ri(Ce),Qa=b[Ce.type],cl=aa(Ce)[0],Cl=cl;x.element(Cl);){for(var _l=0;_l<Qa.length;_l++){var Vl=Qa[_l],Xl=Vl.selector,cr=Vl.context;if(ue(Cl,Xl)&&ee(cr,cl)&&ee(cr,Cl)){var Ul=Vl.listeners;ll.currentTarget=Cl;for(var Ql=0;Ql<Ul.length;Ql++){var cn=Ul[Ql];wn(cn.options,Oa)&&cn.func(ll)}}}Cl=Ie(Cl)}}function We(Ce){return _e(Ce,!0)}return(t=s.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return $.supportsOptions=!0},get passive(){return $.supportsPassive=!0}}),s.events=$,$}},pn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(s){for(var t=0,h=pn.methodOrder;t<h.length;t++){var b=h[t],C=pn[b](s);if(C)return C}return null},simulationResume:function(s){var t=s.pointerType,h=s.eventType,b=s.eventTarget,C=s.scope;if(!/down|start/i.test(h))return null;for(var $=0,K=C.interactions.list;$<K.length;$++){var X=K[$],_e=b;if(X.simulation&&X.simulation.allowResume&&X.pointerType===t)for(;_e;){if(_e===X.element)return X;_e=Ie(_e)}}return null},mouseOrPen:function(s){var t,h=s.pointerId,b=s.pointerType,C=s.eventType,$=s.scope;if(b!=="mouse"&&b!=="pen")return null;for(var K=0,X=$.interactions.list;K<X.length;K++){var _e=X[K];if(_e.pointerType===b){if(_e.simulation&&!In(_e,h))continue;if(_e.interacting())return _e;t||(t=_e)}}if(t)return t;for(var We=0,Ce=$.interactions.list;We<Ce.length;We++){var na=Ce[We];if(!(na.pointerType!==b||/down/i.test(C)&&na.simulation))return na}return null},hasPointer:function(s){for(var t=s.pointerId,h=0,b=s.scope.interactions.list;h<b.length;h++){var C=b[h];if(In(C,t))return C}return null},idle:function(s){for(var t=s.pointerType,h=0,b=s.scope.interactions.list;h<b.length;h++){var C=b[h];if(C.pointers.length===1){var $=C.interactable;if($&&(!$.options.gesture||!$.options.gesture.enabled))continue}else if(C.pointers.length>=2)continue;if(!C.interacting()&&t===C.pointerType)return C}return null}};function In(s,t){return s.pointers.some(function(h){return h.id===t})}var ni=pn,fn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function ii(s,t){return function(h){var b=t.interactions.list,C=ja(h),$=aa(h),K=$[0],X=$[1],_e=[];if(/^touch/.test(h.type)){t.prevTouchTime=t.now();for(var We=0,Ce=h.changedTouches;We<Ce.length;We++){var na=Ce[We],Oa={pointer:na,pointerId:Ue(na),pointerType:C,eventType:h.type,eventTarget:K,curEventTarget:X,scope:t},ll=Tn(Oa);_e.push([Oa.pointer,Oa.eventTarget,Oa.curEventTarget,ll])}}else{var Qa=!1;if(!Z.supportsPointerEvent&&/mouse/.test(h.type)){for(var cl=0;cl<b.length&&!Qa;cl++)Qa=b[cl].pointerType!=="mouse"&&b[cl].pointerIsDown;Qa=Qa||t.now()-t.prevTouchTime<500||h.timeStamp===0}if(!Qa){var Cl={pointer:h,pointerId:Ue(h),pointerType:C,eventType:h.type,curEventTarget:X,eventTarget:K,scope:t},_l=Tn(Cl);_e.push([Cl.pointer,Cl.eventTarget,Cl.curEventTarget,_l])}}for(var Vl=0;Vl<_e.length;Vl++){var Xl=_e[Vl],cr=Xl[0],Ul=Xl[1],Ql=Xl[2];Xl[3][s](cr,h,Ul,Ql)}}}function Tn(s){var t=s.pointerType,h=s.scope,b={interaction:ni.search(s),searchDetails:s};return h.fire("interactions:find",b),b.interaction||h.interactions.new({pointerType:t})}function $i(s,t){var h=s.doc,b=s.scope,C=s.options,$=b.interactions.docEvents,K=b.events,X=K[t];for(var _e in b.browser.isIOS&&!C.events&&(C.events={passive:!1}),K.delegatedEvents)X(h,_e,K.delegateListener),X(h,_e,K.delegateUseCapture,!0);for(var We=C&&C.events,Ce=0;Ce<$.length;Ce++){var na=$[Ce];X(h,na.type,na.listener,We)}}var gi={id:"core/interactions",install:function(s){for(var t={},h=0;h<fn.length;h++){var b=fn[h];t[b]=ii(b,s)}var C,$=Z.pEventTypes;function K(){for(var X=0,_e=s.interactions.list;X<_e.length;X++){var We=_e[X];if(We.pointerIsDown&&We.pointerType==="touch"&&!We._interacting)for(var Ce=function(){var ll=Oa[na];s.documents.some(function(Qa){return ee(Qa.doc,ll.downTarget)})||We.removePointer(ll.pointer,ll.event)},na=0,Oa=We.pointers;na<Oa.length;na++)Ce()}}(C=j.PointerEvent?[{type:$.down,listener:K},{type:$.down,listener:t.pointerDown},{type:$.move,listener:t.pointerMove},{type:$.up,listener:t.pointerUp},{type:$.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:K},{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(X){for(var _e=0,We=s.interactions.list;_e<We.length;_e++)We[_e].documentBlur(X)}}),s.prevTouchTime=0,s.Interaction=function(X){m(We,X);var _e=N(We);function We(){return o(this,We),_e.apply(this,arguments)}return c(We,[{key:"pointerMoveTolerance",get:function(){return s.interactions.pointerMoveTolerance},set:function(Ce){s.interactions.pointerMoveTolerance=Ce}},{key:"_now",value:function(){return s.now()}}]),We}(Gr),s.interactions={list:[],new:function(X){X.scopeFire=function(We,Ce){return s.fire(We,Ce)};var _e=new s.Interaction(X);return s.interactions.list.push(_e),_e},listeners:t,docEvents:C,pointerMoveTolerance:1},s.usePlugin(Da)},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,b=t.interactions.list.length-1;b>=0;b--){var C=t.interactions.list[b];C.interactable===h&&(C.stop(),t.fire("interactions:destroy",{interaction:C}),C.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(b,1))}}},onDocSignal:$i,doOnInteractions:ii,methodNames:fn},Vo=gi,Bn=function(s){return s[s.On=0]="On",s[s.Off=1]="Off",s}(Bn||{}),Fo=function(){function s(t,h,b,C){o(this,s),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new zn,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||b,this._win=S(Ea(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 x.func(h.onstart)&&this.on("".concat(t,"start"),h.onstart),x.func(h.onmove)&&this.on("".concat(t,"move"),h.onmove),x.func(h.onend)&&this.on("".concat(t,"end"),h.onend),x.func(h.oninertiastart)&&this.on("".concat(t,"inertiastart"),h.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,h,b){var C,$=this,K=(C=this._actions.map[t])==null?void 0:C.filterEventType,X=function(_e){return(K==null||K(_e))&&ul(_e,$._actions)};(x.array(h)||x.object(h))&&this._onOff(Bn.Off,t,h,void 0,X),(x.array(b)||x.object(b))&&this._onOff(Bn.On,t,b,void 0,X)}},{key:"setPerAction",value:function(t,h){var b=this._defaults;for(var C in h){var $=C,K=this.options[t],X=h[$];$==="listeners"&&this.updatePerActionListeners(t,K.listeners,X),x.array(X)?K[$]=te(X):x.plainObject(X)?(K[$]=ne(K[$]||{},Za(X)),x.object(b.perAction[$])&&"enabled"in b.perAction[$]&&(K[$].enabled=X.enabled!==!1)):x.bool(X)&&x.object(b.perAction[$])?K[$].enabled=X:K[$]=X}}},{key:"getRect",value:function(t){return t=t||(x.element(this.target)?this.target:null),x.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ae(t)}},{key:"rectChecker",value:function(t){var h=this;return x.func(t)?(this.getRect=function(b){var C=ne({},t.apply(h,b));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(Ea(h)||x.object(h)){for(var b in this.options[t]=h,this._actions.map)this.options[b][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 x.string(t)?Array.from(this._context.querySelectorAll(t)):x.func(t)&&t.getAllElements?t.getAllElements():x.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||ee(this._context,t)}},{key:"testIgnoreAllow",value:function(t,h,b){return!this.testIgnore(t.ignoreFrom,h,b)&&this.testAllow(t.allowFrom,h,b)}},{key:"testAllow",value:function(t,h,b){return!t||!!x.element(b)&&(x.string(t)?q(b,t,h):!!x.element(t)&&ee(t,b))}},{key:"testIgnore",value:function(t,h,b){return!(!t||!x.element(b))&&(x.string(t)?q(b,t,h):!!x.element(t)&&ee(t,b))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,h,b,C,$){x.object(h)&&!x.array(h)&&(C=b,b=null);var K=qe(h,b,$);for(var X in K){X==="wheel"&&(X=Z.wheelEvent);for(var _e=0,We=K[X];_e<We.length;_e++){var Ce=We[_e];ul(X,this._actions)?this.events[t===Bn.On?"on":"off"](X,Ce):x.string(this.target)?this._scopeEvents[t===Bn.On?"addDelegate":"removeDelegate"](this.target,this._context,X,Ce,C):this._scopeEvents[t===Bn.On?"add":"remove"](this.target,X,Ce,C)}}return this}},{key:"on",value:function(t,h,b){return this._onOff(Bn.On,t,h,b)}},{key:"off",value:function(t,h,b){return this._onOff(Bn.Off,t,h,b)}},{key:"set",value:function(t){var h=this._defaults;for(var b in x.object(t)||(t={}),this.options=Za(h.base),this._actions.methodDict){var C=b,$=this._actions.methodDict[C];this.options[C]={},this.setPerAction(C,ne(ne({},h.perAction),h.actions[C])),this[$](t[C])}for(var K in t)K!=="getRect"?x.func(this[K])&&this[K](t[K]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(x.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var h=this._scopeEvents.delegatedEvents[t],b=h.length-1;b>=0;b--){var C=h[b],$=C.selector,K=C.context,X=C.listeners;$===this.target&&K===this._context&&h.splice(b,1);for(var _e=X.length-1;_e>=0;_e--)this._scopeEvents.removeDelegate(this.target,this._context,t,X[_e][0],X[_e][1])}else this._scopeEvents.remove(this.target,"all")}}]),s}(),Po=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(b){var C=b.interactable,$=C.target,K=x.string($)?h.selectorMap[$]:$[h.scope.id],X=ce(K,function(_e){return _e===C});K.splice(X,1)}})}return c(s,[{key:"new",value:function(t,h){h=ne(h||{},{actions:this.scope.actions});var b=new this.scope.Interactable(t,h,this.scope.document,this.scope.events);return this.scope.addDocument(b._doc),this.list.push(b),x.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(b)):(b.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(b)),this.scope.fire("interactable:new",{target:t,options:h,interactable:b,win:this.scope._win}),b}},{key:"getExisting",value:function(t,h){var b=h&&h.context||this.scope.document,C=x.string(t),$=C?this.selectorMap[t]:t[this.scope.id];if($)return Se($,function(K){return K._context===b&&(C||K.inContext(t))})}},{key:"forEachMatch",value:function(t,h){for(var b=0,C=this.list;b<C.length;b++){var $=C[b],K=void 0;if((x.string($.target)?x.element(t)&&ue(t,$.target):t===$.target)&&$.inContext(t)&&(K=h($)),K!==void 0)return K}}}]),s}(),jo=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=Za(ir),this.Eventable=zn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(b){var C=function $(K,X){var _e=b.interactables.getExisting(K,X);return _e||((_e=b.interactables.new(K,X)).events.global=$.globalEvents),_e};return C.getPointerAverage=Te,C.getTouchBBox=Fa,C.getTouchDistance=Na,C.getTouchAngle=oa,C.getElementRect=Ae,C.getElementClientRect=Ke,C.matchesSelector=ue,C.closest=ge,C.globalEvents={},C.version="1.10.27",C.scope=b,C.use=function($,K){return this.scope.usePlugin($,K),this},C.isSet=function($,K){return!!this.scope.interactables.get($,K&&K.context)},C.on=Ha(function($,K,X){if(x.string($)&&$.search(" ")!==-1&&($=$.trim().split(/ +/)),x.array($)){for(var _e=0,We=$;_e<We.length;_e++){var Ce=We[_e];this.on(Ce,K,X)}return this}if(x.object($)){for(var na in $)this.on(na,$[na],K);return this}return ul($,this.scope.actions)?this.globalEvents[$]?this.globalEvents[$].push(K):this.globalEvents[$]=[K]:this.scope.events.add(this.scope.document,$,K,{options:X}),this},"The interact.on() method is being deprecated"),C.off=Ha(function($,K,X){if(x.string($)&&$.search(" ")!==-1&&($=$.trim().split(/ +/)),x.array($)){for(var _e=0,We=$;_e<We.length;_e++){var Ce=We[_e];this.off(Ce,K,X)}return this}if(x.object($)){for(var na in $)this.off(na,$[na],K);return this}var Oa;return ul($,this.scope.actions)?$ in this.globalEvents&&(Oa=this.globalEvents[$].indexOf(K))!==-1&&this.globalEvents[$].splice(Oa,1):this.scope.events.remove(this.scope.document,$,K,X),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 $=0,K=this.scope.interactions.list;$<K.length;$++)K[$].stop();return this},C.pointerMoveTolerance=function($){return x.number($)?(this.scope.interactions.pointerMoveTolerance=$,this):this.scope.interactions.pointerMoveTolerance},C.addDocument=function($,K){this.scope.addDocument($,K)},C.removeDocument=function($){this.scope.removeDocument($)},C}(this),this.InteractEvent=Ur,this.Interactable=void 0,this.interactables=new Po(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(b){return t.removeDocument(b.target)};var h=this;this.Interactable=function(b){m($,b);var C=N($);function $(){return o(this,$),C.apply(this,arguments)}return c($,[{key:"_defaults",get:function(){return h.defaults}},{key:"set",value:function(K){return _(g($.prototype),"set",this).call(this,K),h.fire("interactable:set",{options:K,interactable:this}),this}},{key:"unset",value:function(){_(g($.prototype),"unset",this).call(this);var K=h.interactables.list.indexOf(this);K<0||(h.interactables.list.splice(K,1),h.fire("interactable:unset",{interactable:this}))}}]),$}(Fo)}return c(s,[{key:"addListeners",value:function(t,h){this.listenerMaps.push({id:h,map:t})}},{key:"fire",value:function(t,h){for(var b=0,C=this.listenerMaps;b<C.length;b++){var $=C[b].map[t];if($&&$(h,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(h,b){return h.isInitialized=!0,x.window(b)&&E(b),j.init(b),Z.init(b),ar.init(b),h.window=b,h.document=b.document,h.usePlugin(Vo),h.usePlugin(Gn),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 b=0,C=this.listenerMaps.length,$=t.before.reduce(function(X,_e){return X[_e]=!0,X[ao(_e)]=!0,X},{});b<C;b++){var K=this.listenerMaps[b].id;if(K&&($[K]||$[ao(K)]))break}this.listenerMaps.splice(b,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 b=S(t);h=h?ne({},h):{},this.documents.push({doc:t,options:h}),this.events.documents.push(t),t!==this.document&&this.events.add(b,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:b,scope:this,options:h})}},{key:"removeDocument",value:function(t){var h=this.getDocIndex(t),b=S(t),C=this.documents[h].options;this.events.remove(b,"unload",this.onWindowUnload),this.documents.splice(h,1),this.events.documents.splice(h,1),this.fire("scope:remove-document",{doc:t,window:b,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 ao(s){return s&&s.replace(/\/.*$/,"")}var lo=new jo,sn=lo.interactStatic,Ho=typeof globalThis<"u"?globalThis:window;lo.init(Ho);var ro=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(s){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(b){var C=b[0],$=b[1];return C in s||$ in s}),h=function(b,C){for(var $=s.range,K=s.limits,X=K===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:K,_e=s.offset,We=_e===void 0?{x:0,y:0}:_e,Ce={range:$,grid:s,x:null,y:null},na=0;na<t.length;na++){var Oa=t[na],ll=Oa[0],Qa=Oa[1],cl=Math.round((b-We.x)/s[ll]),Cl=Math.round((C-We.y)/s[Qa]);Ce[ll]=Math.max(X.left,Math.min(X.right,cl*s[ll]+We.x)),Ce[Qa]=Math.max(X.top,Math.min(X.bottom,Cl*s[Qa]+We.y))}return Ce};return h.grid=s,h.coordFields=t,h}}),Uo={id:"snappers",install:function(s){var t=s.interactStatic;t.snappers=ne(t.snappers||{},ro),t.createSnapGrid=t.snappers.grid}},qo=Uo,Wo={start:function(s){var t=s.state,h=s.rect,b=s.edges,C=s.pageCoords,$=t.options,K=$.ratio,X=$.enabled,_e=t.options,We=_e.equalDelta,Ce=_e.modifiers;K==="preserve"&&(K=h.width/h.height),t.startCoords=ne({},C),t.startRect=ne({},h),t.ratio=K,t.equalDelta=We;var na=t.linkedEdges={top:b.top||b.left&&!b.bottom,left:b.left||b.top&&!b.right,bottom:b.bottom||b.right&&!b.top,right:b.right||b.bottom&&!b.left};if(t.xIsPrimaryAxis=!(!b.left&&!b.right),t.equalDelta){var Oa=(na.left?1:-1)*(na.top?1:-1);t.edgeSign={x:Oa,y:Oa}}else t.edgeSign={x:na.left?-1:1,y:na.top?-1:1};if(X!==!1&&ne(b,na),Ce!=null&&Ce.length){var ll=new Nl(s.interaction);ll.copyFrom(s.interaction.modification),ll.prepareStates(Ce),t.subModification=ll,ll.startAll(r({},s))}},set:function(s){var t=s.state,h=s.rect,b=s.coords,C=t.linkedEdges,$=ne({},b),K=t.equalDelta?Go:Vi;if(ne(s.edges,C),K(t,t.xIsPrimaryAxis,b,h),!t.subModification)return null;var X=ne({},h);se(C,X,{x:b.x-$.x,y:b.y-$.y});var _e=t.subModification.setAll(r(r({},s),{},{rect:X,edges:C,pageCoords:b,prevCoords:b,prevRect:X})),We=_e.delta;return _e.changed&&(K(t,Math.abs(We.x)>Math.abs(We.y),_e.coords,_e.rect),ne(b,_e.coords)),_e.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Go(s,t,h){var b=s.startCoords,C=s.edgeSign;t?h.y=b.y+(h.x-b.x)*C.y:h.x=b.x+(h.y-b.y)*C.x}function Vi(s,t,h,b){var C=s.startRect,$=s.startCoords,K=s.ratio,X=s.edgeSign;if(t){var _e=b.width/K;h.y=$.y+(_e-C.height)*X.y}else{var We=b.height*K;h.x=$.x+(We-C.width)*X.x}}var Ko=Rl(Wo,"aspectRatio"),bi=function(){};bi._defaults={};var oi=bi;function On(s,t,h){return x.func(s)?Pe(s,t.interactable,t.element,[h.x,h.y,t]):Pe(s,t.interactable,t.element)}var ki={start:function(s){var t=s.rect,h=s.startOffset,b=s.state,C=s.interaction,$=s.pageCoords,K=b.options,X=K.elementRect,_e=ne({left:0,top:0,right:0,bottom:0},K.offset||{});if(t&&X){var We=On(K.restriction,C,$);if(We){var Ce=We.right-We.left-t.width,na=We.bottom-We.top-t.height;Ce<0&&(_e.left+=Ce,_e.right+=Ce),na<0&&(_e.top+=na,_e.bottom+=na)}_e.left+=h.left-t.width*X.left,_e.top+=h.top-t.height*X.top,_e.right+=h.right-t.width*(1-X.right),_e.bottom+=h.bottom-t.height*(1-X.bottom)}b.offset=_e},set:function(s){var t=s.coords,h=s.interaction,b=s.state,C=b.options,$=b.offset,K=On(C.restriction,h,t);if(K){var X=function(_e){return!_e||"left"in _e&&"top"in _e||((_e=ne({},_e)).left=_e.x||0,_e.top=_e.y||0,_e.right=_e.right||_e.left+_e.width,_e.bottom=_e.bottom||_e.top+_e.height),_e}(K);t.x=Math.max(Math.min(X.right-$.right,t.x),X.left+$.left),t.y=Math.max(Math.min(X.bottom-$.bottom,t.y),X.top+$.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Yo=Rl(ki,"restrict"),no={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Kn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Fi(s,t){for(var h=0,b=["top","left","bottom","right"];h<b.length;h++){var C=b[h];C in s||(s[C]=t[C])}return s}var Fn={noInner:no,noOuter:Kn,start:function(s){var t,h=s.interaction,b=s.startOffset,C=s.state,$=C.options;$&&(t=Re(On($.offset,h,h.coords.start.page))),t=t||{x:0,y:0},C.offset={top:t.y+b.top,left:t.x+b.left,bottom:t.y-b.bottom,right:t.x-b.right}},set:function(s){var t=s.coords,h=s.edges,b=s.interaction,C=s.state,$=C.offset,K=C.options;if(h){var X=ne({},t),_e=On(K.inner,b,X)||{},We=On(K.outer,b,X)||{};Fi(_e,no),Fi(We,Kn),h.top?t.y=Math.min(Math.max(We.top+$.top,X.y),_e.top+$.top):h.bottom&&(t.y=Math.max(Math.min(We.bottom+$.bottom,X.y),_e.bottom+$.bottom)),h.left?t.x=Math.min(Math.max(We.left+$.left,X.x),_e.left+$.left):h.right&&(t.x=Math.max(Math.min(We.right+$.right,X.x),_e.right+$.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Jo=Rl(Fn,"restrictEdges"),Xo=ne({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(s){}},ki.defaults),Zo=Rl({start:ki.start,set:ki.set,defaults:Xo},"restrictRect"),Qo={width:-1/0,height:-1/0},io={width:1/0,height:1/0},ti=Rl({start:function(s){return Fn.start(s)},set:function(s){var t=s.interaction,h=s.state,b=s.rect,C=s.edges,$=h.options;if(C){var K=Le(On($.min,t,s.coords))||Qo,X=Le(On($.max,t,s.coords))||io;h.options={endOnly:$.endOnly,inner:ne({},Fn.noInner),outer:ne({},Fn.noOuter)},C.top?(h.options.inner.top=b.bottom-K.height,h.options.outer.top=b.bottom-X.height):C.bottom&&(h.options.inner.bottom=b.top+K.height,h.options.outer.bottom=b.top+X.height),C.left?(h.options.inner.left=b.right-K.width,h.options.outer.left=b.right-X.width):C.right&&(h.options.inner.right=b.left+K.width,h.options.outer.right=b.left+X.width),Fn.set(s),h.options=$}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),xi={start:function(s){var t,h=s.interaction,b=s.interactable,C=s.element,$=s.rect,K=s.state,X=s.startOffset,_e=K.options,We=_e.offsetWithOrigin?function(Oa){var ll=Oa.interaction.element,Qa=Re(Pe(Oa.state.options.origin,null,null,[ll])),cl=Qa||me(Oa.interactable,ll,Oa.interaction.prepared.name);return cl}(s):{x:0,y:0};if(_e.offset==="startCoords")t={x:h.coords.start.page.x,y:h.coords.start.page.y};else{var Ce=Pe(_e.offset,b,C,[h]);(t=Re(Ce)||{x:0,y:0}).x+=We.x,t.y+=We.y}var na=_e.relativePoints;K.offsets=$&&na&&na.length?na.map(function(Oa,ll){return{index:ll,relativePoint:Oa,x:X.left-$.width*Oa.x+t.x,y:X.top-$.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,b=s.state,C=b.options,$=b.offsets,K=me(t.interactable,t.element,t.prepared.name),X=ne({},h),_e=[];C.offsetWithOrigin||(X.x-=K.x,X.y-=K.y);for(var We=0,Ce=$;We<Ce.length;We++)for(var na=Ce[We],Oa=X.x-na.x,ll=X.y-na.y,Qa=0,cl=C.targets.length;Qa<cl;Qa++){var Cl=C.targets[Qa],_l=void 0;(_l=x.func(Cl)?Cl(Oa,ll,t._proxy,na,Qa):Cl)&&_e.push({x:(x.number(_l.x)?_l.x:Oa)+na.x,y:(x.number(_l.y)?_l.y:ll)+na.y,range:x.number(_l.range)?_l.range:C.range,source:Cl,index:Qa,offset:na})}for(var Vl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Xl=0;Xl<_e.length;Xl++){var cr=_e[Xl],Ul=cr.range,Ql=cr.x-X.x,cn=cr.y-X.y,Gl=_a(Ql,cn),mn=Gl<=Ul;Ul===1/0&&Vl.inRange&&Vl.range!==1/0&&(mn=!1),Vl.target&&!(mn?Vl.inRange&&Ul!==1/0?Gl/Ul<Vl.distance/Vl.range:Ul===1/0&&Vl.range!==1/0||Gl<Vl.distance:!Vl.inRange&&Gl<Vl.distance)||(Vl.target=cr,Vl.distance=Gl,Vl.range=Ul,Vl.inRange=mn,Vl.delta.x=Ql,Vl.delta.y=cn)}return Vl.inRange&&(h.x=Vl.target.x,h.y=Vl.target.y),b.closest=Vl,Vl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},oo=Rl(xi,"snap"),Ln={start:function(s){var t=s.state,h=s.edges,b=t.options;if(!h)return null;s.state={options:{targets:null,relativePoints:[{x:h.left?0:1,y:h.top?0:1}],offset:b.offset||"self",origin:{x:0,y:0},range:b.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,b=s.coords,C=h.options,$=h.offsets,K={x:b.x-$[0].x,y:b.y-$[0].y};h.options=ne({},C),h.options.targets=[];for(var X=0,_e=C.targets||[];X<_e.length;X++){var We=_e[X],Ce=void 0;if(Ce=x.func(We)?We(K.x,K.y,t):We){for(var na=0,Oa=h.targetFields;na<Oa.length;na++){var ll=Oa[na],Qa=ll[0],cl=ll[1];if(Qa in Ce||cl in Ce){Ce.x=Ce[Qa],Ce.y=Ce[cl];break}}h.options.targets.push(Ce)}}var Cl=xi.set(s);return h.options=C,Cl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},et=Rl(Ln,"snapSize"),wi={aspectRatio:Ko,restrictEdges:Jo,restrict:Yo,restrictRect:Zo,restrictSize:ti,snapEdges:Rl({start:function(s){var t=s.edges;return t?(s.state.targetFields=s.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ln.start(s)):null},set:Ln.set,defaults:ne(Za(Ln.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:oo,snapSize:et,spring:oi,avoid:oi,transform:oi,rubberband:oi},si={id:"modifiers",install:function(s){var t=s.interactStatic;for(var h in s.usePlugin(Fr),s.usePlugin(qo),t.modifiers=wi,wi){var b=wi[h],C=b._defaults,$=b._methods;C._methods=$,s.defaults.perAction[h]=C}}},at=si,to=function(s){m(h,s);var t=N(h);function h(b,C,$,K,X,_e){var We;if(o(this,h),V(d(We=t.call(this,X)),$),$!==C&&V(d(We),C),We.timeStamp=_e,We.originalEvent=$,We.type=b,We.pointerId=Ue(C),We.pointerType=ja(C),We.target=K,We.currentTarget=null,b==="tap"){var Ce=X.getPointerIndex(C);We.dt=We.timeStamp-X.pointers[Ce].downTime;var na=We.timeStamp-X.tapTime;We.double=!!X.prevTap&&X.prevTap.type!=="doubletap"&&X.prevTap.target===We.target&&na<500}else b==="doubletap"&&(We.dt=C.timeStamp-X.tapTime,We.double=!0);return We}return c(h,[{key:"_subtractOrigin",value:function(b){var C=b.x,$=b.y;return this.pageX-=C,this.pageY-=$,this.clientX-=C,this.clientY-=$,this}},{key:"_addOrigin",value:function(b){var C=b.x,$=b.y;return this.pageX+=C,this.pageY+=$,this.clientX+=C,this.clientY+=$,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,ne(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,b=s.pointer,C=s.event,$=s.eventTarget;s.duplicate||h.pointerIsDown&&!h.pointerWasMoved||(h.pointerIsDown&&Pi(s),Rn({interaction:h,pointer:b,event:C,eventTarget:$,type:"move"},t))},"interactions:down":function(s,t){(function(h,b){for(var C=h.interaction,$=h.pointer,K=h.event,X=h.eventTarget,_e=h.pointerIndex,We=C.pointers[_e].hold,Ce=Qe(X),na={interaction:C,pointer:$,event:K,eventTarget:X,type:"hold",targets:[],path:Ce,node:null},Oa=0;Oa<Ce.length;Oa++){var ll=Ce[Oa];na.node=ll,b.fire("pointerEvents:collect-targets",na)}if(na.targets.length){for(var Qa=1/0,cl=0,Cl=na.targets;cl<Cl.length;cl++){var _l=Cl[cl].eventable.options.holdDuration;_l<Qa&&(Qa=_l)}We.duration=Qa,We.timeout=setTimeout(function(){Rn({interaction:C,eventTarget:X,pointer:$,event:K,type:"hold"},b)},Qa)}})(s,t),Rn(s,t)},"interactions:up":function(s,t){Pi(s),Rn(s,t),function(h,b){var C=h.interaction,$=h.pointer,K=h.event,X=h.eventTarget;C.pointerWasMoved||Rn({interaction:C,eventTarget:X,pointer:$,event:K,type:"tap"},b)}(s,t)},"interactions:cancel":function(s,t){Pi(s),Rn(s,t)}},PointerEvent:to,fire:Rn,collectEventTargets:so,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 Rn(s,t){var h=s.interaction,b=s.pointer,C=s.event,$=s.eventTarget,K=s.type,X=s.targets,_e=X===void 0?so(s,t):X,We=new to(K,b,C,$,h,t.now());t.fire("pointerEvents:new",{pointerEvent:We});for(var Ce={interaction:h,pointer:b,event:C,eventTarget:$,targets:_e,type:K,pointerEvent:We},na=0;na<_e.length;na++){var Oa=_e[na];for(var ll in Oa.props||{})We[ll]=Oa.props[ll];var Qa=me(Oa.eventable,Oa.node);if(We._subtractOrigin(Qa),We.eventable=Oa.eventable,We.currentTarget=Oa.node,Oa.eventable.fire(We),We._addOrigin(Qa),We.immediatePropagationStopped||We.propagationStopped&&na+1<_e.length&&_e[na+1].node!==We.currentTarget)break}if(t.fire("pointerEvents:fired",Ce),K==="tap"){var cl=We.double?Rn({interaction:h,pointer:b,event:C,eventTarget:$,type:"doubletap"},t):We;h.prevTap=cl,h.tapTime=cl.timeStamp}return We}function so(s,t){var h=s.interaction,b=s.pointer,C=s.event,$=s.eventTarget,K=s.type,X=h.getPointerIndex(b),_e=h.pointers[X];if(K==="tap"&&(h.pointerWasMoved||!_e||_e.downTarget!==$))return[];for(var We=Qe($),Ce={interaction:h,pointer:b,event:C,eventTarget:$,type:K,path:We,targets:[],node:null},na=0;na<We.length;na++){var Oa=We[na];Ce.node=Oa,t.fire("pointerEvents:collect-targets",Ce)}return K==="hold"&&(Ce.targets=Ce.targets.filter(function(ll){var Qa,cl;return ll.eventable.options.holdDuration===((Qa=h.pointers[X])==null||(cl=Qa.hold)==null?void 0:cl.duration)})),Ce.targets}function Pi(s){var t=s.interaction,h=s.pointerIndex,b=t.pointers[h].hold;b&&b.timeout&&(clearTimeout(b.timeout),b.timeout=null)}var lt=Object.freeze({__proto__:null,default:ci});function rt(s){var t=s.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var co={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)]=rt,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,b=s.pointerEvent,C=s.eventTarget,$=s.targets;if(b.type==="hold"&&$.length){var K=$[0].eventable.options.holdRepeatInterval;K<=0||(h.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:h,eventTarget:C,type:"hold",pointer:b,event:b},t)},K))}}})},nt=co,it={id:"pointer-events/interactableTargets",install:function(s){var t=s.Interactable;t.prototype.pointerEvents=function(b){return ne(this.events.options,b),this};var h=t.prototype._backCompatOption;t.prototype._backCompatOption=function(b,C){var $=h.call(this,b,C);return $===this&&(this.events.options[b]=C),$}},listeners:{"pointerEvents:collect-targets":function(s,t){var h=s.targets,b=s.node,C=s.type,$=s.eventTarget;t.interactables.forEachMatch(b,function(K){var X=K.events,_e=X.options;X.types[C]&&X.types[C].length&&K.testIgnoreAllow(_e,b,$)&&h.push({node:b,eventable:X,props:{interactable:K}})})},"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,b=s.options;ne(h.events.options,t.pointerEvents.defaults),ne(h.events.options,b.pointerEvents||{})}}},ot=it,tt={id:"pointer-events",install:function(s){s.usePlugin(lt),s.usePlugin(nt),s.usePlugin(ot)}},_i=tt,st={id:"reflow",install:function(s){var t=s.Interactable;s.actions.phases.reflow=!0,t.prototype.reflow=function(h){return function(b,C,$){for(var K=b.getAllElements(),X=$.window.Promise,_e=X?[]:null,We=function(){var na=K[Ce],Oa=b.getRect(na);if(!Oa)return 1;var ll,Qa=Se($.interactions.list,function(_l){return _l.interacting()&&_l.interactable===b&&_l.element===na&&_l.prepared.name===C.name});if(Qa)Qa.move(),_e&&(ll=Qa._reflowPromise||new X(function(_l){Qa._reflowResolve=_l}));else{var cl=Le(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:$.now()});ll=function(_l,Vl,Xl,cr,Ul){var Ql=_l.interactions.new({pointerType:"reflow"}),cn={interaction:Ql,event:Ul,pointer:Ul,eventTarget:Xl,phase:"reflow"};Ql.interactable=Vl,Ql.element=Xl,Ql.prevEvent=Ul,Ql.updatePointer(Ul,Ul,Xl,!0),pe(Ql.coords.delta),ra(Ql.prepared,cr),Ql._doPhase(cn);var Gl=_l.window,mn=Gl.Promise,Kr=mn?new mn(function(Nn){Ql._reflowResolve=Nn}):void 0;return Ql._reflowPromise=Kr,Ql.start(cr,Vl,Xl),Ql._interacting?(Ql.move(cn),Ql.end(Ul)):(Ql.stop(),Ql._reflowResolve()),Ql.removePointer(Ul,Ul),Kr}($,b,na,C,Cl)}_e&&_e.push(ll)},Ce=0;Ce<K.length&&!We();Ce++);return _e&&X.all(_e).then(function(){return b})}(this,h,s)}},listeners:{"interactions:stop":function(s,t){var h=s.interaction;h.pointerType==="reflow"&&(h._reflowResolve&&h._reflowResolve(),function(b,C){b.splice(b.indexOf(C),1)}(t.interactions.list,h))}}},ct=st;if(sn.use(Da),sn.use(kr),sn.use(_i),sn.use(Mr),sn.use(at),sn.use(ml),sn.use(Kl),sn.use(ha),sn.use(ct),sn.default=sn,i(a)==="object"&&a)try{a.exports=sn}catch{}return sn.default=sn,sn})}(Gi,Gi.exports)),Gi.exports}var ev=Q1();const Ps=M.getDefaultExportFromCjs(ev),Oo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:n}){const r=a,i=n,o=e.inject(au),f=e.inject(lu);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,w=NaN,d=NaN,N=NaN,_=NaN,J=-1,A=-1,F=-1,L=-1,E=r.x,S=r.y,k=r.w,y=r.h;const x=e.ref(),O=e.reactive({i:e.toRef(r,"i"),state:u,wrapper:x,calcXY:Pe});function I(ve){qe(ve)}function W(){ka()}function Y(ve){_n(r.isDraggable)&&(u.draggable=ve)}function fe(ve){_n(r.isResizable)&&(u.resizable=ve)}function de(ve){_n(r.isBounded)&&(u.bounded=ve)}function j(ve){u.transformScale=ve}function U(ve){u.rowHeight=ve}function Z(ve){u.maxRows=ve}function ee(){u.rtl=Vs()==="rtl",ka()}function ge(ve){u.cols=Math.floor(ve)}o.increaseItem(O),e.onBeforeMount(()=>{u.rtl=Vs()==="rtl"}),e.onMounted(()=>{o.responsive&&o.lastBreakpoint?u.cols=tu(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,_n(r.isDraggable)?u.draggable=o.isDraggable:u.draggable=r.isDraggable,_n(r.isResizable)?u.resizable=o.isResizable:u.resizable=r.isResizable,_n(r.isBounded)?u.bounded=o.isBounded:u.bounded=r.isBounded,u.transformScale=o.transformScale,u.useCssTransforms=o.useCssTransforms,u.useStyleCursor=o.useStyleCursor,e.watchEffect(()=>{E=r.x,S=r.y,y=r.h,k=r.w,yn(Ae)}),f.on("updateWidth",I),f.on("compact",W),f.on("setDraggable",Y),f.on("setResizable",fe),f.on("setBounded",de),f.on("setTransformScale",j),f.on("setRowHeight",U),f.on("setMaxRows",Z),f.on("directionchange",ee),f.on("setColNum",ge)}),e.onBeforeUnmount(()=>{f.off("updateWidth",I),f.off("compact",W),f.off("setDraggable",Y),f.off("setResizable",fe),f.off("setBounded",de),f.off("setTransformScale",j),f.off("setRowHeight",U),f.off("setMaxRows",Z),f.off("directionchange",ee),f.off("setColNum",ge),c.value&&(c.value.unset(),c.value=null),o.decreaseItem(O)}),l({state:u,wrapper:x});const Ie=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ue=e.computed(()=>u.resizable&&!r.static),B=e.computed(()=>o.isMirrored?!u.rtl:u.rtl),oe=e.computed(()=>(u.draggable||u.resizable)&&!r.static),q=q1("item"),ye=e.computed(()=>({[q.b()]:!0,[q.bm("resizable")]:ue.value,[q.bm("static")]:r.static,[q.bm("resizing")]:u.isResizing,[q.bm("dragging")]:u.isDragging,[q.bm("transform")]:u.useCssTransforms,[q.bm("rtl")]:B.value,[q.bm("no-touch")]:Ie&&oe.value})),Ke=e.computed(()=>[q.be("resizer"),B.value&&q.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,ve=>{u.draggable=ve}),e.watch(()=>r.static,()=>{yn(V),yn(pe)}),e.watch(()=>u.draggable,()=>{yn(V)}),e.watch(()=>r.isResizable,ve=>{u.resizable=ve}),e.watch(()=>r.isBounded,ve=>{u.bounded=ve}),e.watch(()=>u.resizable,()=>{yn(pe)}),e.watch(()=>u.rowHeight,()=>{yn(Ae),yn(Qe)}),e.watch([()=>u.cols,()=>u.containerWidth],()=>{yn(pe),yn(Ae),yn(Qe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{yn(pe)}),e.watch(B,()=>{yn(pe),yn(Ae)}),e.watch([()=>o.margin,()=>o.margin[0],()=>o.margin[1]],()=>{const ve=o.margin;!ve||ve[0]===u.margin[0]&&ve[1]===u.margin[1]||(u.margin=ve.map(Number),yn(Ae),yn(Qe))});function Ae(){r.x+r.w>u.cols?(E=0,k=r.w>u.cols?u.cols:r.w):(E=r.x,k=r.w);const ve=ua(E,S,k,y);u.isDragging&&(ve.top=u.dragging.top,B.value?ve.right=u.dragging.left:ve.left=u.dragging.left),u.isResizing&&(ve.width=u.resizing.width,ve.height=u.resizing.height);let da;u.useCssTransforms?B.value?da=P1(ve.top,ve.right,ve.width,ve.height):da=F1(ve.top,ve.left,ve.width,ve.height):B.value?da=H1(ve.top,ve.right,ve.width,ve.height):da=j1(ve.top,ve.left,ve.width,ve.height),u.style=da}function Qe(){const ve={};for(const da of["width","height"]){const ca=u.style[da].match(/^(\d+)px$/);if(!ca)return;ve[da]=ca[1]}i("container-resized",r.i,r.h,r.w,ve.height,ve.width)}function Ea(ve){if(r.static)return;const da=ve.type;if(da==="resizestart"&&u.isResizing||da!=="resizestart"&&!u.isResizing)return;const ca=Rs(ve);if(_n(ca))return;const{x:Ue,y:Sa}=ca,Ma={width:0,height:0};let Te;switch(da){case"resizestart":{pe(),J=k,A=y,Te=ua(E,S,k,y),Ma.width=Te.width,Ma.height=Te.height,u.resizing=Ma,u.isResizing=!0;break}case"resizemove":{!ve.edges.right&&!ve.edges.left&&(N=Ue),!ve.edges.top&&!ve.edges.bottom&&(_=Sa);const Fa=$s(N,_,Ue,Sa);B.value?Ma.width=u.resizing.width-Fa.deltaX/u.transformScale:Ma.width=u.resizing.width+Fa.deltaX/u.transformScale,Ma.height=u.resizing.height+Fa.deltaY/u.transformScale,u.resizing=Ma;break}case"resizeend":{Te=ua(E,S,k,y),Ma.width=Te.width,Ma.height=Te.height,u.resizing={width:-1,height:-1},u.isResizing=!1;break}}Te=me(Ma.height,Ma.width),Te.w<r.minW&&(Te.w=r.minW),Te.w>r.maxW&&(Te.w=r.maxW),Te.h<r.minH&&(Te.h=r.minH),Te.h>r.maxH&&(Te.h=r.maxH),Te.h<1&&(Te.h=1),Te.w<1&&(Te.w=1),N=Ue,_=Sa,(k!==Te.w||y!==Te.h)&&i("resize",r.i,Te.h,Te.w,Ma.height,Ma.width),ve.type==="resizeend"&&(J!==k||A!==y)&&i("resized",r.i,Te.h,Te.w,Ma.height,Ma.width),f.emit("resizeEvent",ve.type,r.i,E,S,Te.h,Te.w)}function ne(ve){if(r.static||u.isResizing)return;const da=ve.type;if(da==="dragstart"&&u.isDragging||da!=="dragstart"&&!u.isDragging)return;const ca=Rs(ve);if(_n(ca))return;const{x:Ue,y:Sa}=ca,Ma=ve.target;if(!Ma.offsetParent)return;const Te={top:0,left:0};switch(da){case"dragstart":{F=E,L=S;const Na=Ma.offsetParent.getBoundingClientRect(),oa=Ma.getBoundingClientRect(),ja=oa.left/u.transformScale,aa=Na.left/u.transformScale,je=oa.right/u.transformScale,pa=Na.right/u.transformScale,te=oa.top/u.transformScale,ce=Na.top/u.transformScale;B.value?Te.left=(je-pa)*-1:Te.left=ja-aa,Te.top=te-ce,u.dragging=Te,u.isDragging=!0;break}case"dragmove":{const Na=$s(w,d,Ue,Sa);if(B.value?Te.left=u.dragging.left-Na.deltaX/u.transformScale:Te.left=u.dragging.left+Na.deltaX/u.transformScale,Te.top=u.dragging.top+Na.deltaY/u.transformScale,u.bounded){const oa=Ma.offsetParent.clientHeight-Le(r.h,u.rowHeight,u.margin[1]);Te.top=se(Te.top,0,oa);const ja=Re(),aa=u.containerWidth-Le(r.w,ja,u.margin[0]);Te.left=se(Te.left,0,aa)}u.dragging=Te;break}case"dragend":{const Na=Ma.offsetParent.getBoundingClientRect(),oa=Ma.getBoundingClientRect(),ja=oa.left/u.transformScale,aa=Na.left/u.transformScale,je=oa.right/u.transformScale,pa=Na.right/u.transformScale,te=oa.top/u.transformScale,ce=Na.top/u.transformScale;B.value?Te.left=(je-pa)*-1:Te.left=ja-aa,Te.top=te-ce,u.dragging={top:-1,left:-1},u.isDragging=!1;break}}let Fa;B.value,Fa=Pe(Te.top,Te.left),w=Ue,d=Sa,(E!==Fa.x||S!==Fa.y)&&i("move",r.i,Fa.x,Fa.y),ve.type==="dragend"&&(F!==E||L!==S)&&i("moved",r.i,Fa.x,Fa.y),f.emit("dragEvent",ve.type,r.i,Fa.x,Fa.y,y,k)}function ua(ve,da,ca,Ue){const Sa=Re();let Ma;return B.value?Ma={right:Math.round(Sa*ve+(ve+1)*u.margin[0]),top:Math.round(u.rowHeight*da+(da+1)*u.margin[1]),width:ca===1/0?ca:Math.round(Sa*ca+Math.max(0,ca-1)*u.margin[0]),height:Ue===1/0?Ue:Math.round(u.rowHeight*Ue+Math.max(0,Ue-1)*u.margin[1])}:Ma={left:Math.round(Sa*ve+(ve+1)*u.margin[0]),top:Math.round(u.rowHeight*da+(da+1)*u.margin[1]),width:ca===1/0?ca:Math.round(Sa*ca+Math.max(0,ca-1)*u.margin[0]),height:Ue===1/0?Ue:Math.round(u.rowHeight*Ue+Math.max(0,Ue-1)*u.margin[1])},Ma}function Pe(ve,da){const ca=Re();let Ue=Math.round((da-u.margin[0])/(ca+u.margin[0])),Sa=Math.round((ve-u.margin[1])/(u.rowHeight+u.margin[1]));return Ue=Math.max(Math.min(Ue,u.cols-k),0),Sa=Math.max(Math.min(Sa,u.maxRows-y),0),{x:Ue,y:Sa}}function Re(){return(u.containerWidth-u.margin[0]*(u.cols+1))/u.cols}function Le(ve,da,ca){return Number.isFinite(ve)?Math.round(da*ve+Math.max(0,ve-1)*ca):ve}function se(ve,da,ca){return Math.max(Math.min(ve,ca),da)}function me(ve,da,ca=!1){const Ue=Re();let Sa=Math.round((da+u.margin[0])/(Ue+u.margin[0])),Ma=0;return ca?Ma=Math.ceil((ve+u.margin[1])/(u.rowHeight+u.margin[1])):Ma=Math.round((ve+u.margin[1])/(u.rowHeight+u.margin[1])),Sa=Math.max(Math.min(Sa,u.cols-E),0),Ma=Math.max(Math.min(Ma,u.maxRows-S),0),{w:Sa,h:Ma}}function qe(ve,da){u.containerWidth=ve}function ka(){Ae()}function _a(){!c.value&&x.value&&(c.value=Ps(x.value),u.useStyleCursor||c.value.styleCursor(!1))}const H=Is(ne);function V(){if(_a(),!!c.value)if(u.draggable&&!r.static){const ve={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};c.value.draggable(ve),m||(m=!0,c.value.on("dragstart dragmove dragend",da=>{da.type==="dragmove"?H(da):ne(da)}))}else c.value.draggable({enabled:!1})}const ae=Is(Ea);function pe(){if(_a(),!!c.value)if(u.resizable&&!r.static){const ve=ua(0,0,r.maxW,r.maxH),da=ua(0,0,r.minW,r.minH),ca={edges:{left:B.value?`.${Ke.value[0]}`:!1,right:B.value?!1:`.${Ke.value[0]}`,bottom:`.${Ke.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:da.height*u.transformScale,width:da.width*u.transformScale},max:{height:ve.height*u.transformScale,width:ve.width*u.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(ca.modifiers=[Ps.modifiers.aspectRatio({ratio:"preserve"})]),c.value.resizable(ca),g||(g=!0,c.value.on("resizestart resizemove resizeend",Ue=>{Ue.type==="resizemove"?ae(Ue):Ea(Ue)}))}else c.value.resizable({enabled:!1})}return(ve,da)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:x,class:e.normalizeClass(ye.value),style:e.normalizeStyle(u.style)},[e.renderSlot(ve.$slots,"default"),ue.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ke.value)},null,2)):e.createCommentVNode("",!0)],6))}}),yi=typeof window<"u";var js;yi&&(js=window==null?void 0:window.navigator)!=null&&js.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Hs(a){return a!=null}function Us(){}const av=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(av)));const lv=yi&&("ontouchstart"in window||nv()>0),rv=lv?"pointerdown":"click";function nv(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function iv(a,l,n=window.Event){const{type:r,bubbles:i=!1,cancelable:o=!1,...f}=l;if(!Hs(r)||r==="")return!1;let c;return Hs(n)?c=new n(r,{bubbles:i,cancelable:o}):(c=document.createEvent("HTMLEvents"),c.initEvent(r,i,o)),Object.assign(c,f),a.dispatchEvent(c)}const ov="clickoutside",tv=new Set;yi&&document.addEventListener(rv,a=>{const l=a.target,n=a.composedPath&&a.composedPath();tv.forEach(r=>{r!==l&&(n?!n.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&iv(r,{type:ov})})},!0);const sv=[["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 So;if(yi){for(const a of sv)if(a[1]in document){So=a;break}}e.computed(()=>!1);const cv=new Set,uv=new WeakMap;if(yi&&So){const a=So[2],l=So[4];document.addEventListener(l,()=>{if(cv.forEach(n=>{n.value=!1}),document[a]){const n=uv.get(document[a]);n&&(n.value=!0)}},!1)}const cu=new Map;cu.set("x",0);cu.set("y",0);var vi=[],dv=function(){return vi.some(function(a){return a.activeTargets.length>0})},pv=function(){return vi.some(function(a){return a.skippedTargets.length>0})},qs="ResizeObserver loop completed with undelivered notifications.",fv=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:qs}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=qs),window.dispatchEvent(a)},eo;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(eo||(eo={}));var mi=function(a){return Object.freeze(a)},hv=function(){function a(l,n){this.inlineSize=l,this.blockSize=n,mi(this)}return a}(),uu=function(){function a(l,n,r,i){return this.x=l,this.y=n,this.width=r,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,n=l.x,r=l.y,i=l.top,o=l.right,f=l.bottom,c=l.left,u=l.width,m=l.height;return{x:n,y:r,top:i,right:o,bottom:f,left:c,width:u,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Rt=function(a){return a instanceof SVGElement&&"getBBox"in a},du=function(a){if(Rt(a)){var l=a.getBBox(),n=l.width,r=l.height;return!n&&!r}var i=a,o=i.offsetWidth,f=i.offsetHeight;return!(o||f||a.getClientRects().length)},Ws=function(a){var l;if(a instanceof Element)return!0;var n=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(n&&a instanceof n.Element)},vv=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},Xi=typeof window<"u"?window:{},ko=new WeakMap,Gs=/auto|scroll/,mv=/^tb|vertical/,yv=/msie|trident/i.test(Xi.navigator&&Xi.navigator.userAgent),Vn=function(a){return parseFloat(a||"0")},Ii=function(a,l,n){return a===void 0&&(a=0),l===void 0&&(l=0),n===void 0&&(n=!1),new hv((n?l:a)||0,(n?a:l)||0)},Ks=mi({devicePixelContentBoxSize:Ii(),borderBoxSize:Ii(),contentBoxSize:Ii(),contentRect:new uu(0,0,0,0)}),pu=function(a,l){if(l===void 0&&(l=!1),ko.has(a)&&!l)return ko.get(a);if(du(a))return ko.set(a,Ks),Ks;var n=getComputedStyle(a),r=Rt(a)&&a.ownerSVGElement&&a.getBBox(),i=!yv&&n.boxSizing==="border-box",o=mv.test(n.writingMode||""),f=!r&&Gs.test(n.overflowY||""),c=!r&&Gs.test(n.overflowX||""),u=r?0:Vn(n.paddingTop),m=r?0:Vn(n.paddingRight),g=r?0:Vn(n.paddingBottom),w=r?0:Vn(n.paddingLeft),d=r?0:Vn(n.borderTopWidth),N=r?0:Vn(n.borderRightWidth),_=r?0:Vn(n.borderBottomWidth),J=r?0:Vn(n.borderLeftWidth),A=w+m,F=u+g,L=J+N,E=d+_,S=c?a.offsetHeight-E-a.clientHeight:0,k=f?a.offsetWidth-L-a.clientWidth:0,y=i?A+L:0,x=i?F+E:0,O=r?r.width:Vn(n.width)-y-k,I=r?r.height:Vn(n.height)-x-S,W=O+A+k+L,Y=I+F+S+E,fe=mi({devicePixelContentBoxSize:Ii(Math.round(O*devicePixelRatio),Math.round(I*devicePixelRatio),o),borderBoxSize:Ii(W,Y,o),contentBoxSize:Ii(O,I,o),contentRect:new uu(w,u,O,I)});return ko.set(a,fe),fe},fu=function(a,l,n){var r=pu(a,n),i=r.borderBoxSize,o=r.contentBoxSize,f=r.devicePixelContentBoxSize;switch(l){case eo.DEVICE_PIXEL_CONTENT_BOX:return f;case eo.BORDER_BOX:return i;default:return o}},gv=function(){function a(l){var n=pu(l);this.target=l,this.contentRect=n.contentRect,this.borderBoxSize=mi([n.borderBoxSize]),this.contentBoxSize=mi([n.contentBoxSize]),this.devicePixelContentBoxSize=mi([n.devicePixelContentBoxSize])}return a}(),hu=function(a){if(du(a))return 1/0;for(var l=0,n=a.parentNode;n;)l+=1,n=n.parentNode;return l},bv=function(){var a=1/0,l=[];vi.forEach(function(o){if(o.activeTargets.length!==0){var f=[];o.activeTargets.forEach(function(c){var u=new gv(c.target),m=hu(c.target);f.push(u),c.lastReportedSize=fu(c.target,c.observedBox),m<a&&(a=m)}),l.push(function(){o.callback.call(o.observer,f,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=l;n<r.length;n++){var i=r[n];i()}return a},Ys=function(a){vi.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(n){n.isActive()&&(hu(n.target)>a?l.activeTargets.push(n):l.skippedTargets.push(n))})})},kv=function(){var a=0;for(Ys(a);dv();)a=bv(),Ys(a);return pv()&&fv(),a>0},bt,vu=[],xv=function(){return vu.splice(0).forEach(function(a){return a()})},wv=function(a){if(!bt){var l=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return xv()}).observe(n,r),bt=function(){n.textContent="".concat(l?l--:l++)}}vu.push(a),bt()},_v=function(a){wv(function(){requestAnimationFrame(a)})},Eo=0,Sv=function(){return!!Eo},Ev=250,Cv={attributes:!0,characterData:!0,childList:!0,subtree:!0},Js=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Xs=function(a){return a===void 0&&(a=0),Date.now()+a},kt=!1,Dv=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var n=this;if(l===void 0&&(l=Ev),!kt){kt=!0;var r=Xs(l);_v(function(){var i=!1;try{i=kv()}finally{if(kt=!1,l=r-Xs(),!Sv())return;i?n.run(1e3):l>0?n.run(l):n.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,n=function(){return l.observer&&l.observer.observe(document.body,Cv)};document.body?n():Xi.addEventListener("DOMContentLoaded",n)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Js.forEach(function(n){return Xi.addEventListener(n,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Js.forEach(function(n){return Xi.removeEventListener(n,l.listener,!0)}),this.stopped=!0)},a}(),Mt=new Dv,Zs=function(a){!Eo&&a>0&&Mt.start(),Eo+=a,!Eo&&Mt.stop()},Tv=function(a){return!Rt(a)&&!vv(a)&&getComputedStyle(a).display==="inline"},Bv=function(){function a(l,n){this.target=l,this.observedBox=n||eo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=fu(this.target,this.observedBox,!0);return Tv(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),Nv=function(){function a(l,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=n}return a}(),xo=new WeakMap,Qs=function(a,l){for(var n=0;n<a.length;n+=1)if(a[n].target===l)return n;return-1},wo=function(){function a(){}return a.connect=function(l,n){var r=new Nv(l,n);xo.set(l,r)},a.observe=function(l,n,r){var i=xo.get(l),o=i.observationTargets.length===0;Qs(i.observationTargets,n)<0&&(o&&vi.push(i),i.observationTargets.push(new Bv(n,r&&r.box)),Zs(1),Mt.schedule())},a.unobserve=function(l,n){var r=xo.get(l),i=Qs(r.observationTargets,n),o=r.observationTargets.length===1;i>=0&&(o&&vi.splice(vi.indexOf(r),1),r.observationTargets.splice(i,1),Zs(-1))},a.disconnect=function(l){var n=this,r=xo.get(l);r.observationTargets.slice().forEach(function(i){return n.unobserve(l,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},a}(),Av=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.");wo.connect(this,l)}return a.prototype.observe=function(l,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ws(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.observe(this,l,n)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ws(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.unobserve(this,l)},a.prototype.disconnect=function(){wo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Lo=new WeakMap;function zv(a){var l;for(let n=0,r=a.length;n<r;++n){const i=a[n],o=Lo.get(i.target);if(typeof o=="function"){const{inlineSize:f,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:f??u,height:c??m}))}}}const mu=new(yi&&window.ResizeObserver||Av)(zv);function ec(a,l){Lo.set(a,l),mu.observe(a)}function ac(a){Lo.has(a)&&(mu.unobserve(a),Lo.delete(a))}function Mv(a={}){let l=Us;const n=e.watch(()=>e.unref(a.target),i=>{l(),!(!i||typeof a.onResize!="function")&&(ec(i,a.onResize),l=()=>{ac(i),l=Us})},{immediate:!0}),r=()=>{n(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:ec,unobserveResize:ac,unobserve:r}}const Iv=e.ref(!1);e.computed(()=>Iv.value);const lc="__theme_style__",xt="__theme_observer__",rc=e.reactive(new Map),nc=new Map;e.watch(rc,()=>{if(!yi)return;nc.clear();const a=document.head.querySelector(`#${lc}`);a&&document.head.removeChild(a);const l=document.createElement("style");let n=`.${xt} { width: 1px }`,r=1;for(const[i,[o,f]]of rc.entries())n+=` html.${o} .${xt}, .${f} .${xt} { width: ${++r}px }`,nc.set(r,i);l.textContent=n,l.id=lc,document.head.appendChild(l)});const yu=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:n}){const r=a,i=n,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}),f=new Map,c=e.ref(r.layout),u=e.ref(),{observeResize:m,unobserveResize:g}=Mv(),w=M1();w.on("resizeEvent",d),w.on("dragEvent",N),e.onBeforeMount(()=>{i("layout-before-mount",c.value)}),e.onMounted(()=>{i("layout-mounted",c.value),e.nextTick(()=>{U1(c.value),o.originalLayout=c.value,e.nextTick(()=>{I(),u.value&&m(u.value,I1(E,16)),Ai(c.value,r.verticalCompact),i("layout-updated",c.value),L(),E()})})}),e.onBeforeUnmount(()=>{w.clearAll(),u.value&&g(u.value)});function d(Y,fe,de,j,U,Z){x(Y,fe,de,j,U,Z)}function N(Y,fe,de,j,U,Z){y(Y,fe,de,j,U,Z)}e.watch(()=>o.width,(Y,fe)=>{e.nextTick(()=>{w.emit("updateWidth",Y),fe===-1&&e.nextTick(()=>{i("layout-ready",c.value)}),L()})}),e.watch(()=>[r.layout,r.layout.length],()=>{c.value=r.layout,F()}),e.watch(()=>r.colNum,Y=>{w.emit("setColNum",Y)}),e.watch(()=>r.rowHeight,Y=>{w.emit("setRowHeight",Y)}),e.watch(()=>r.isDraggable,Y=>{w.emit("setDraggable",Y)}),e.watch(()=>r.isResizable,Y=>{w.emit("setResizable",Y)}),e.watch(()=>r.isBounded,Y=>{w.emit("setBounded",Y)}),e.watch(()=>r.transformScale,Y=>{w.emit("setTransformScale",Y)}),e.watch(()=>r.responsive,Y=>{Y||(i("update:layout",o.originalLayout),w.emit("setColNum",r.colNum)),E()}),e.watch(()=>r.maxRows,Y=>{w.emit("setMaxRows",Y)}),e.watch([()=>r.margin,()=>r.margin[1]],L),e.provide(au,e.reactive({...e.toRefs(r),...e.toRefs(o),increaseItem:_,decreaseItem:J})),e.provide(lu,w),l({state:o,getItem:A,resizeEvent:x,dragEvent:y,layoutUpdate:F});function _(Y){f.set(Y.i,Y)}function J(Y){f.delete(Y.i)}function A(Y){return f.get(Y)}function F(){if(!_n(c.value)&&!_n(o.originalLayout)){if(c.value.length!==o.originalLayout.length){const Y=W(c.value,o.originalLayout);if(Y.length>0)if(c.value.length>o.originalLayout.length)o.originalLayout=o.originalLayout.concat(Y);else{const fe=new Set(Y.map(de=>de.i));o.originalLayout=o.originalLayout.filter(de=>!fe.has(de.i))}o.lastLayoutLength=c.value.length,I()}Ai(c.value,r.verticalCompact),w.emit("updateWidth",o.width),L(),i("layout-updated",c.value)}}function L(){o.mergedStyle={height:S()}}function E(){u.value&&(o.width=u.value.offsetWidth),w.emit("resizeEvent")}function S(){if(!r.autoSize)return;const Y=parseFloat(r.margin[1]);return L1(c.value)*(r.rowHeight+Y)+Y+"px"}let k;function y(Y,fe,de,j,U,Z){let ee=Os(c.value,fe);_n(ee)&&(ee={h:0,w:0,x:0,y:0,i:""}),Y==="dragstart"&&!r.verticalCompact&&(k=c.value.reduce((ge,{i:Ie,x:ue,y:B})=>({...ge,[Ie]:{x:ue,y:B}}),{})),Y==="dragmove"||Y==="dragstart"?(o.placeholder.i=fe,o.placeholder.x=ee.x,o.placeholder.y=ee.y,o.placeholder.w=Z,o.placeholder.h=U,e.nextTick(()=>{o.isDragging=!0}),w.emit("updateWidth",o.width)):e.nextTick(()=>{o.isDragging=!1}),c.value=zt(c.value,ee,de,j,!0,r.preventCollision),r.restoreOnDrag?(ee.static=!0,Ai(c.value,r.verticalCompact,k),ee.static=!1):Ai(c.value,r.verticalCompact),w.emit("compact"),L(),Y==="dragend"&&(k=void 0,i("layout-updated",c.value))}function x(Y,fe,de,j,U,Z){let ee=Os(c.value,fe);_n(ee)&&(ee={h:0,w:0,x:0,y:0,i:""});let ge;if(r.preventCollision){const Ie=nu(c.value,{...ee,w:Z,h:U}).filter(ue=>ue.i!==ee.i);if(ge=Ie.length>0,ge){let ue=1/0,B=1/0;Ie.forEach(oe=>{oe.x>ee.x&&(ue=Math.min(ue,oe.x)),oe.y>ee.y&&(B=Math.min(B,oe.y))}),Number.isFinite(ue)&&(ee.w=ue-ee.x),Number.isFinite(B)&&(ee.h=B-ee.y)}}ge||(ee.w=Z,ee.h=U),Y==="resizestart"||Y==="resizemove"?(o.placeholder.i=fe,o.placeholder.x=de,o.placeholder.y=j,o.placeholder.w=ee.w,o.placeholder.h=ee.h,e.nextTick(()=>{o.isDragging=!0}),w.emit("updateWidth",o.width)):Y&&e.nextTick(()=>{o.isDragging=!1}),r.responsive&&O(),Ai(c.value,r.verticalCompact),w.emit("compact"),L(),Y==="resizeend"&&i("layout-updated",c.value)}function O(){const Y=K1(r.breakpoints,o.width);if(Y===o.lastBreakpoint)return;const fe=tu(Y,r.cols);!_n(o.lastBreakpoint)&&!o.layouts[o.lastBreakpoint]&&(o.layouts[o.lastBreakpoint]=At(c.value));const de=Y1(o.originalLayout,o.layouts,r.breakpoints,Y,o.lastBreakpoint,fe,r.verticalCompact);o.layouts[Y]=de,o.lastBreakpoint!==Y&&i("breakpoint-changed",Y,de),c.value=de,i("update:layout",de),o.lastBreakpoint=Y,w.emit("setColNum",fe)}function I(){o.layouts=Object.assign({},r.responsiveLayouts)}function W(Y,fe){const de=new Set(fe.map(ee=>ee.i)),j=new Set(Y.map(ee=>ee.i)),U=Y.filter(ee=>!de.has(ee.i)),Z=fe.filter(ee=>!j.has(ee.i));return U.concat(Z)}return(Y,fe)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:u,class:"vgl-layout",style:e.normalizeStyle(o.mergedStyle)},[Y.$slots.default?e.renderSlot(Y.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(c.value,de=>(e.openBlock(),e.createBlock(Oo,e.mergeProps({key:de.i,ref_for:!0},de),{default:e.withCtx(()=>[e.renderSlot(Y.$slots,"item",{item:de})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Oo,{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 Ov={key:0,class:"item-view-group"},Lv={key:0,class:"item-view-group"},Rv=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const n=M.useModelComp(M.pinia),{isEdit:r}=M.storeToRefs(n),i=li(M.pinia),o=l,f=a,c=e.ref(""),u=e.computed(()=>f==null?void 0:f.children),m=e.computed(()=>{var L,E,S,k;return((L=f==null?void 0:f.children)==null?void 0:L.length)>0&&((E=f==null?void 0:f.children)!=null&&E.every(y=>y==null?void 0:y.layout))?(k=(S=f==null?void 0:f.children)==null?void 0:S[0])==null?void 0:k.layout:"vertical"}),g=L=>{c.value=L,o("radioChange",L)},w=e.computed(()=>{var L,E;return((E=(L=f==null?void 0:f.children)==null?void 0:L[0])==null?void 0:E.isGridLayout)||!1}),d=e.ref((f==null?void 0:f.level)+1),N=e.computed(()=>{if(!(f!=null&&f.children)||!Array.isArray(f.children)||f.children.length<2)return!1;const L=f.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),E=f.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return L&&E}),_=e.computed(()=>{var E,S,k,y,x,O;let L=(E=f==null?void 0:f.children)==null?void 0:E.filter(I=>I==null?void 0:I.choice);if(i.setSelectTab((S=L==null?void 0:L[0])==null?void 0:S.choiceName),(c==null?void 0:c.value)!=="")return(k=f==null?void 0:f.children)==null?void 0:k.filter(I=>!(I!=null&&I.choiceName)||(I==null?void 0:I.choiceName)===(c==null?void 0:c.value));{let I=(x=(y=f==null?void 0:f.children)==null?void 0:y.find(W=>W==null?void 0:W.choice))==null?void 0:x.choiceName;return(O=f==null?void 0:f.children)==null?void 0:O.filter(W=>!(W!=null&&W.choiceName)||(W==null?void 0:W.choiceName)===I)}}),J=L=>{const E=(L==null?void 0:L.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(S=>{const k=typeof S=="string"?S:JSON.stringify(S);return k==null?void 0:k.includes("HideGroup=Yes")}))};e.watch(()=>f==null?void 0:f.children,()=>{N.value},{deep:!0});const A=L=>{o("rowClick",L)},F=(L,E)=>{o("routeUrl",L,E)};return(L,E)=>w.value?(e.openBlock(),e.createBlock(e.unref(yu),{key:0,layout:u.value,"onUpdate:layout":E[0]||(E[0]=S=>u.value=S),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(S,k)=>(e.openBlock(),e.createBlock(e.unref(Oo),{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 y,x,O,I,W,Y,fe,de,j,U,Z,ee,ge,Ie;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:k===((y=f==null?void 0:f.children)==null?void 0:y.length)-1?"0px":"24px"})},[((O=(x=S==null?void 0:S.component)==null?void 0:x.comp)==null?void 0:O.toUpperCase())!=="TABLE"&&((I=S==null?void 0:S.component)!=null&&I.name)?(e.openBlock(),e.createElementBlock("div",Ov,[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((W=S==null?void 0:S.component)==null?void 0:W.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Qi)((Y=S==null?void 0:S.component)==null?void 0:Y.comp)),{pageLayout:m.value,config:{showIndex:(fe=e.unref(mr)[k])==null?void 0:fe.showIndex,allowMove:(de=e.unref(mr)[k])==null?void 0:de.allowMove,viewport:(j=e.unref(mr)[k])==null?void 0:j.viewport,status:(U=e.unref(mr)[k])==null?void 0:U.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:e.unref(zc),itemData:(Z=S==null?void 0:S.component)==null?void 0:Z.compData,childItemData:(ee=S==null?void 0:S.component)==null?void 0:ee.itemChildData,key:e.unref(ai),cacheNewData:e.unref(Ac),onChange:e.unref(Ao),index:(S==null?void 0:S.id)??k,onContentChange:e.unref(zo),onPageChange:e.unref(Mo),parentTableId:(ge=S==null?void 0:S.component)==null?void 0:ge.tableId,allMapContents:e.unref(Tt),children:(Ie=S==null?void 0:S.component)==null?void 0:Ie.children,level:d.value,onRowClick:A,onRouteUrl:F,onClickTrigger:e.unref(Mc),onClickMainKey:e.unref(Ic),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(_.value,(S,k)=>{var y,x;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(k)===((y=f==null?void 0:f.children)==null?void 0:y.length)-1?"0px":"24px"})},[((x=S==null?void 0:S.comp)==null?void 0:x.toUpperCase())!=="TABLE"&&S.name?(e.openBlock(),e.createElementBlock("div",Lv,[J(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(Qi)(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(ai),onChange:e.unref(Ao),index:(S==null?void 0:S.id)??k,onContentChange:e.unref(zo),onPageChange:e.unref(Mo),parentTableId:S==null?void 0:S.tableId,allMapContents:e.unref(Tt),children:S==null?void 0:S.children,level:d.value,onRowClick:A,onRouteUrl:F,onRadioChange:g},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),$v=nr._export_sfc(Rv,[["__scopeId","data-v-bafbdd45"]]),Vv={class:"radio-group-container"},Fv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const n=a,r=l,i=e.ref(),o=li(M.pinia),{selectTab:f}=M.storeToRefs(o);e.watch(()=>n==null?void 0:n.itemData,()=>{i.value=f.value},{immediate:!0,deep:!0});const c=u=>{i.value=u,r("radioChange",i.value)};return(u,m)=>(e.openBlock(),e.createElementBlock("div",Vv,[e.createVNode(pl.ssRadio,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g),content:n==null?void 0:n.itemData,onChange:c},null,8,["modelValue","content"])]))}}),Pv=nr._export_sfc(Fv,[["__scopeId","data-v-177d64c3"]]),jv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,()=>{var r,i;n.value=((i=(r=l==null?void 0:l.itemData)==null?void 0:r.find(o=>(o==null?void 0:o.key)==="backGround"))==null?void 0:i.contents)??[]},{deep:!0,immediate:!0}),(r,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(pl.ssCarousel,{carouselList:n.value},null,8,["carouselList"])]))}}),gu=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"}]),Hv={TABLE:Hc,FORM:As,STATICFORM:Uc,TABLEOPERATE:A6,TABLESTYLE:Y6,TABLEEXTEND:X6,TABLEINTERACTION:e4,FORMOPERATE:zs,FOLD:N4,CALCULATOR:L4,METHODBUTTON:V4,AVATARUPLOAD:ds.ssAvatar,SIGNATURE:ds.ssSignature,FORMTOP:As,STEP:X4,STEPOPERATE:x4,TIMELINE:r2,TIMELINEOPERATE:D4,FORMTOPOPERATE:zs,SIGNATUREOPERATE:K4,AVATARUPLOADOPERATE:j4,TABS:o2,TABSOPERATE:q2,CHART:o1,CHARTOPERATE:g1,LAYOUT:x1,LAYOUTOPERATE:N1,PARENTITEM:$v,RADIO:Pv,CAROUSEL:jv};function Ri(a){return Hv[a==null?void 0:a.toUpperCase()]||null}exports.De=yu;exports.activeStepInfo=zi;exports.addContents=Zi;exports.addVisibleDialog=Lt;exports.affixItems=o3;exports.allMapContents=Tt;exports.analyzeMenu=dc;exports.cacheNewData=Ac;exports.clickMainKey=Ic;exports.clickSavePage=i3;exports.clickStep=Lc;exports.clickTrigger=Mc;exports.compId=ai;exports.compNames=zc;exports.compShow=Li;exports.existLayouts=h3;exports.fixChangeValue=Ro;exports.generateLayouts=j6;exports.getComponent=Ri;exports.getComponents=Qi;exports.getPageConstruct=dp;exports.getPageData=Wr;exports.getSliceContLength=k3;exports.gridRowHeight=L6;exports.gridRowHeightHmPg=Yc;exports.isStepLayout=Rc;exports.newGenerateLayouts=q6;exports.onBack=r3;exports.onButtonChange=u3;exports.onChange=Ao;exports.onClick=n3;exports.onClickStep=v3;exports.onContentChange=zo;exports.onExtendTaskEnd=f3;exports.onOk=d3;exports.onPageBack=y3;exports.onPageChange=Mo;exports.onSelectFixContent=l3;exports.renderShowItems=Bc;exports.showItems=mr;exports.sliceTableLength=Nc;exports.slotContent=gu;exports.ssTable=Hc;exports.st=Oo;exports.stepItems=x3;exports.tabChange=m3;exports.toolBar=p3;exports.useFormComp=Ot;exports.useModelLoader=l0;exports.verifyButton=g3;