ss-component-new 1.3.365 → 1.3.366
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.
- package/dist/{array-DQzonH1R.cjs → array-BVGvg9oV.cjs} +1 -1
- package/dist/{array-DbUSkbo3.js → array-Buzpmqxx.js} +2 -2
- package/dist/{index-9ChVXgKw.js → index-14QhNETL.js} +1 -1
- package/dist/{index-10v9wXFg.cjs → index-B8I4TCpA.cjs} +1 -1
- package/dist/{index-seLHFErR.js → index-BCDA7SlU.js} +2 -2
- package/dist/{index-Y0jJ6HZ1.js → index-BLlBVShw.js} +1 -1
- package/dist/{index-BWe1GP27.js → index-BOmb1yOF.js} +2 -2
- package/dist/{index-XHfctZf4.cjs → index-BYaor5QC.cjs} +1 -1
- package/dist/{index-DV60CEJ1.cjs → index-CRWl9Rtz.cjs} +1 -1
- package/dist/{index-i4Kvgrq4.js → index-Cj6n4Zpo.js} +7 -7
- package/dist/{index-BmhTHaY5.cjs → index-CvU3pAZt.cjs} +1 -1
- package/dist/{index-BTqelo7x.cjs → index-D1eUShIF.cjs} +7 -7
- package/dist/{index-D2FGO5M9.js → index-D8ML_f91.js} +1 -1
- package/dist/{index-BE9qQ9Rl.js → index-DMVBf41x.js} +1016 -1016
- package/dist/{index-DsUR-J5w.js → index-DZXpHjYg.js} +3 -3
- package/dist/{index-CbjdOaL7.cjs → index-De3ztqEp.cjs} +1 -1
- package/dist/{index-EvF-0idX.cjs → index-DiScwmD1.cjs} +1 -1
- package/dist/{index-DVv4EpXm.cjs → index-Dkn9zOYg.cjs} +1 -1
- package/dist/{index-CfeJ5uLy.js → index-Drv6LFkE.js} +1 -1
- package/dist/{index-DI-J_Smu.cjs → index-HlbQT-hn.cjs} +1 -1
- package/dist/{index-DvSDsN__.js → index-RfSz1KjM.js} +1 -1
- package/dist/{index-Bhvwjl0K.js → index-TL11JgVE.js} +1 -1
- package/dist/{index-DVP63TDq.cjs → index-UWrNcZe6.cjs} +1 -1
- package/dist/{index-D44ytDdh.cjs → index-WvE1qvnd.cjs} +1 -1
- package/dist/{index-ClFgZBEV.cjs → index-XIzcfEzL.cjs} +1 -1
- package/dist/{index-2EaJ5z1T.js → index-efedHl6M.js} +2 -2
- package/dist/{main-JITebNfa.cjs → main-BDbN4DoS.cjs} +1 -1
- package/dist/{main-D608Hu_s.js → main-Dyi5uw2c.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-Bduj1u5i.js → threeModel-DEqLQS7r.js} +1 -1
- package/dist/{threeModel-zyKQx-mq.cjs → threeModel-DRFFJvFX.cjs} +1 -1
- package/dist/{threeSceneView-DuTljHv-.js → threeSceneView-DgNQEj93.js} +3 -3
- package/dist/{threeSceneView-CGruEwF0.cjs → threeSceneView-Dx3DcgW-.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CEf_gGxk.cjs → threeSceneViewForCPMPIP-CCmSCkIN.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DDjX8AQi.js → threeSceneViewForCPMPIP-tZSXieg8.js} +1 -1
- package/dist/{threeViewerHost-CW7C1w2A.js → threeViewerHost-CDFwFnu2.js} +1 -1
- package/dist/{threeViewerHost-D9Sga3sw.cjs → threeViewerHost-NwCu86-z.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var Tu=Object.defineProperty;var Au=(a,l,r)=>l in a?Tu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[l]=r;var Wr=(a,l,r)=>Au(a,typeof l!="symbol"?l+"":l,r);const e=require("vue"),qa=require("./request-BC2w2vGr.cjs"),A=require("./index-BEli6-9O.cjs"),ll=require("./index-XHfctZf4.cjs"),Xl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DyCuFKb2.cjs"),wr=require("./index-gnhHdovX.cjs"),_o=require("./threeViewerHost-D9Sga3sw.cjs"),he=require("./index-Cot4bEbR.cjs"),Ar=require("./index-CW4qJdP8.cjs"),es=require("./index-DVv4EpXm.cjs"),Gs=require("./index-D8Eqcxyf.cjs");;/* empty css */const So=require("./isString-DNBlKLZH.cjs"),as=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ys=require("./index-BVaHwt5f.cjs"),zu=require("./index-BWqvrlth.cjs"),zn=require("./MTLLoader-DeGVtVNV.cjs"),Mu=require("./URDFLoader-C0UZqx6e.cjs");var Iu="[object Boolean]";function Js(a){return a===!0||a===!1||qa.isObjectLike(a)&&qa.baseGetTag(a)==Iu}function Ou(a){return a===void 0}const Lu=a=>a.match(/\((.*)\)/)[1],$u={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(a){const l=a,r=e.ref(null),n=e.ref(!1),t=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{n.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>t.value,()=>{e.nextTick(()=>{var s,v;(v=(s=r.value)==null?void 0:s.updatePopper)==null||v.call(s)})},{deep:!0,immediate:!0}),(s,v)=>{const p=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(p,{visible:n.value,"onUpdate:visible":v[0]||(v[0]=f=>n.value=f),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:r,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:t})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Ru={__name:"index",props:{value:{type:[String,Number],default:""}},setup(a){const l=a,r=e.computed(()=>{const n=String(l.value??"");return n==="已完成"?"task-status-completed":n==="进行中"?"task-status-running":n==="终止"||n==="暂停"?"task-status-stopped":""});return(n,t)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["task-status-tag",r.value])},e.toDisplayString(a.value===0?"0":a.value),3)):e.createCommentVNode("",!0)}},Vu=Xl._export_sfc(Ru,[["__scopeId","data-v-d81f59b4"]]);function Fu(a,l,r,n={}){if(!a||!l||!r||r.length!==4)return;const t=a.getContext("2d");if(!t)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:v=2,fillOpacity:p=.2}=n,f=a.getBoundingClientRect(),m=l.getBoundingClientRect(),k=l.naturalWidth,c=l.naturalHeight,D=m.width/k,V=m.height/c,_=Math.min(D,V),G=k*_,M=c*_,$=(f.width-G)/2,j=(f.height-M)/2,E=r.map(([w,b])=>{const g=$+w*G,P=j+b*M;return{x:g,y:P}});t.clearRect(0,0,a.width,a.height),t.beginPath(),t.moveTo(E[0].x,E[0].y);for(let w=1;w<E.length;w++)t.lineTo(E[w].x,E[w].y);t.closePath();const S=s.replace(/[\d.]+\)$/,`${p})`);t.fillStyle=S,t.fill(),t.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),t.lineWidth=v,t.stroke()}function ki(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ls(a,l){if(!a||!l)return null;const r=a[l];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const Pu={key:0,class:"ocr-img-preview-root"},ju={class:"ocr-img-preview-window"},Hu={key:0,class:"img-preview-body"},Uu={class:"img-preview-header"},qu={class:"img-header-left"},Wu={class:"img-name"},Ku={key:0,class:"img-header-right"},Gu={class:"img-index"},Yu={key:0,class:"img-thumb-list"},Ju=["onClick"],Xu={key:1,class:"thumb-placeholder"},Zu={class:"thumb-name"},Qu={class:"img-preview-container"},ed={key:0,class:"img-placeholder"},ad={key:2,class:"img-placeholder"},ld={key:0},rd={key:1},nd={key:1,class:"img-placeholder"},id=e.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(a,{emit:l}){const r=a,n=l,t=e.computed({get:()=>r.visible,set:B=>n("update:visible",B)});let s=!1,v="",p=0,f=0,m=0,k=0,c=0,D=0,V=null;const _=B=>{var W,Se;const ce=(Se=(W=B==null?void 0:B.target)==null?void 0:W.closest)==null?void 0:Se.call(W,".ocr-img-preview-window");return ce||document.querySelector(".ocr-img-preview-window")},G=B=>{if(!B||B==="none")return{tx:0,ty:0};let ce=B.match(/matrix\(([^)]+)\)/);if(ce){const W=ce[1].split(",").map(Se=>Number(Se.trim()));return{tx:(W==null?void 0:W[4])||0,ty:(W==null?void 0:W[5])||0}}if(ce=B.match(/matrix3d\(([^)]+)\)/),ce){const W=ce[1].split(",").map(Se=>Number(Se.trim()));return{tx:(W==null?void 0:W[12])||0,ty:(W==null?void 0:W[13])||0}}return ce=B.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),ce?{tx:Number(ce[1])||0,ty:Number(ce[2])||0}:{tx:0,ty:0}},M=(B,ce,W)=>{B.style.transform=`translate(${ce}px, ${W}px)`},$=B=>{const ce=_(B);if(!ce)return;s=!0,V=ce,v="move",p=B.clientX,f=B.clientY;const W=window.getComputedStyle(ce),{tx:Se,ty:Le}=G(W.transform);c=Se,D=Le,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},j=(B,ce)=>{const W=_(B);if(!W)return;s=!0,V=W,v=ce,p=B.clientX,f=B.clientY;const Se=W.getBoundingClientRect();m=Se.width,k=Se.height;const Le=window.getComputedStyle(W),{tx:Fe,ty:aa}=G(Le.transform);c=Fe,D=aa,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=B=>{if(!s||!V)return;const ce=B.clientX-p,W=B.clientY-f,Se=360,Le=420;let Fe=m,aa=k,Na=c,ae=D;if(v==="move"){Na=c+ce,ae=D+W,M(V,Na,ae);return}if(v.includes("right")&&(Fe=Math.max(Se,m+ce)),v.includes("bottom")&&(aa=Math.max(Le,k+W)),v.includes("left")){const ta=m-ce;ta<Se?(Fe=Se,Na=c+(m-Se)):(Fe=ta,Na=c+ce)}if(v.includes("top")){const ta=k-W;ta<Le?(aa=Le,ae=D+(k-Le)):(aa=ta,ae=D+W)}V.style.width=`${Fe}px`,V.style.height=`${aa}px`,M(V,Na,ae)},S=()=>{s=!1,v="",V=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)},w=e.ref([]),b=e.ref(!1);e.watch(()=>r.images,async B=>{if(!Array.isArray(B)||B.length===0){w.value=[];return}b.value=!0;const ce=[];for(const W of B)if(W.url&&!W.url.startsWith("blob:")&&!W.url.startsWith("http"))try{const Se=await Bl.downloadFile(W.url),Le=URL.createObjectURL(Se);ce.push({...W,blobUrl:Le})}catch(Se){console.error(`Failed to load image for preview: ${W.url}`,Se),ce.push({...W,blobUrl:""})}else ce.push({...W,blobUrl:W.url});w.value=ce,b.value=!1},{deep:!0,immediate:!0});const g=e.ref(0),P=e.ref(null),I=e.ref(null),Y=e.computed(()=>w.value[g.value]||null),le=()=>{if(!w.value.length){g.value=0;return}if(r.defaultImageName){const B=w.value.findIndex(ce=>(ce==null?void 0:ce.name)===r.defaultImageName);g.value=B>=0?B:0}else g.value=0},ye=B=>{if(!w.value.length)return;const ce=Math.max(0,Math.min(B,w.value.length-1));g.value=ce},Te=()=>ye(g.value-1),R=()=>ye(g.value+1),se=B=>{if(!B)return;const ce=w.value.findIndex(W=>(W==null?void 0:W.name)===B);ce>=0&&(g.value=ce)},ee=()=>{if(!I.value)return;const B=I.value.parentElement;if(!B)return;const ce=B.getBoundingClientRect();I.value.width=ce.width,I.value.height=ce.height},ue=()=>{var Se,Le;if(!I.value||!P.value||!r.focusedFieldName){I.value&&ki(I.value);return}const B=(Se=P.value.$el)==null?void 0:Se.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{e.nextTick(()=>{ue()})};return}const ce=((Le=Y.value)==null?void 0:Le.name)||"",W=ls(r.fieldMeta,r.focusedFieldName);if(!W){ki(I.value);return}if(W.imageName!==ce){ki(I.value);return}ee(),Fu(I.value,B,W.bboxNorm)},Ce=()=>{e.nextTick(()=>{ee(),ue()})};e.watch(()=>r.focusedFieldName,()=>{if(!t.value)return;const B=ls(r.fieldMeta,r.focusedFieldName);B!=null&&B.imageName&&se(B.imageName),e.nextTick(()=>{ue()})}),e.watch(()=>{var B;return(B=Y.value)==null?void 0:B.name},()=>{t.value&&e.nextTick(()=>{I.value&&ki(I.value),ue()})}),e.watch(()=>r.visible,B=>{B?(le(),e.nextTick(()=>{ee(),ue()})):I.value&&ki(I.value)}),e.watch(()=>r.defaultImageName,()=>{t.value&&le()});let Pe=null;e.onMounted(()=>{var B;typeof ResizeObserver<"u"&&(Pe=new ResizeObserver(()=>{ee(),e.nextTick(()=>{ue()})}),(B=I.value)!=null&&B.parentElement&&Pe.observe(I.value.parentElement))}),e.onUnmounted(()=>{Pe&&(Pe.disconnect(),Pe=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const ve=()=>{I.value&&ki(I.value),n("update:visible",!1),n("close")};return(B,ce)=>{var aa,Na;const W=e.resolveComponent("el-button"),Se=e.resolveComponent("el-image"),Le=e.resolveComponent("Loading"),Fe=e.resolveComponent("el-icon");return t.value?(e.openBlock(),e.createElementBlock("div",Pu,[ce[12]||(ce[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",ju,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers($,["stop"])},[ce[8]||(ce[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ve},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:ce[0]||(ce[0]=e.withModifiers(ae=>j(ae,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:ce[1]||(ce[1]=e.withModifiers(ae=>j(ae,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:ce[2]||(ce[2]=e.withModifiers(ae=>j(ae,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:ce[3]||(ce[3]=e.withModifiers(ae=>j(ae,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:ce[4]||(ce[4]=e.withModifiers(ae=>j(ae,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:ce[5]||(ce[5]=e.withModifiers(ae=>j(ae,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:ce[6]||(ce[6]=e.withModifiers(ae=>j(ae,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:ce[7]||(ce[7]=e.withModifiers(ae=>j(ae,"bottom-right"),["stop"]))},null,32),Y.value?(e.openBlock(),e.createElementBlock("div",Hu,[e.createElementVNode("div",Uu,[e.createElementVNode("div",qu,[e.createElementVNode("span",Wu,e.toDisplayString(Y.value.name?Y.value.name+(Y.value.url&&Y.value.url.lastIndexOf(".")!==-1?Y.value.url.substring(Y.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Ku,[e.createVNode(W,{size:"small",disabled:g.value===0,onClick:Te},{default:e.withCtx(()=>ce[9]||(ce[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Gu,e.toDisplayString(g.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(W,{size:"small",disabled:g.value===w.value.length-1,onClick:R},{default:e.withCtx(()=>ce[10]||(ce[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ae,ta)=>(e.openBlock(),e.createElementBlock("div",{key:(ae.name||"")+"-"+ta,class:e.normalizeClass(["img-thumb-item",{active:ta===g.value}]),onClick:oe=>ye(ta)},[ae!=null&&ae.blobUrl?(e.openBlock(),e.createBlock(Se,{key:0,src:ae.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ae.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Xu,"加载失败")),e.createElementVNode("div",Zu,e.toDisplayString(ae.name||"-"),1)],10,Ju))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Qu,[b.value?(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(Fe,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Le)]),_:1}),ce[11]||(ce[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(aa=Y.value)!=null&&aa.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(Se,{ref_key:"imageRef",ref:P,src:Y.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[Y.value.blobUrl],onLoad:Ce},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",ad,[(Na=Y.value)!=null&&Na.url?(e.openBlock(),e.createElementBlock("span",ld,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",rd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",nd,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),od=Xl._export_sfc(id,[["__scopeId","data-v-48a4ecb1"]]),td={class:"cert-preview-body"},sd={key:0,class:"pdf-preview-container"},cd={class:"thumbs"},ud=["onClick"],dd={class:"thumb-img"},pd=["src"],fd={key:1,class:"thumb-loading"},hd={class:"thumb-title"},vd={class:"viewer"},md={key:0,class:"viewer-img-wrap"},yd=["src"],gd={key:1,class:"viewer-loading"},bd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(""),s=e.ref(""),v=e.computed(()=>(r.versions||[]).find(_=>String(_.versionId)===String(t.value))),p=e.ref({}),f=e.ref(""),m=e.ref("证书附件.pdf"),k=()=>{try{Object.values(p.value||{}).forEach(_=>{_&&URL.revokeObjectURL(_)}),f.value&&URL.revokeObjectURL(f.value)}catch{}p.value={},f.value=""},c=async _=>{if(!_||_.fileType==="pdf")return;const G=Array.isArray(_.images)?_.images:[];for(const M of G){const $=M==null?void 0:M.url;if(!(!$||p.value[$]))try{const j=await A.platformDownloadFile({url:$}),E=URL.createObjectURL(j.data);p.value={...p.value,[$]:E}}catch{}}},D=async _=>{var M;if(!_||_.fileType!=="pdf"){f.value="";return}const G=_.sourceUrl||"";if(!G){f.value="";return}if(f.value){try{URL.revokeObjectURL(f.value)}catch{}f.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:G,versionId:_==null?void 0:_.versionId,certNo:_==null?void 0:_.certNo});const $=await A.platformDownloadFile({url:G});console.log("[CertificatePreview] PDF响应:",{url:G,status:$==null?void 0:$.status,size:(M=$==null?void 0:$.data)==null?void 0:M.size});const j=URL.createObjectURL($.data);f.value=j;const E=_.certNo?String(_.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch($){console.error("[CertificatePreview] PDF加载失败:",{url:G,error:$}),f.value=""}};e.watch(()=>r.visible,async _=>{var M;if(!_){k();return}const G=(M=r.versions)==null?void 0:M[0];t.value=(G==null?void 0:G.versionId)||"",await c(G),await D(G)},{immediate:!0}),e.watch(()=>t.value,async()=>{var G,M;const _=v.value;if(!_){s.value="",f.value="";return}if(_.fileType==="pdf"){s.value="",await D(_);return}f.value="",s.value=((M=(G=_.images)==null?void 0:G[0])==null?void 0:M.url)||"",await c(_)},{immediate:!0});const V=()=>{n("update:visible",!1),k()};return e.onBeforeUnmount(()=>{k()}),(_,G)=>{const M=e.resolveComponent("el-empty"),$=e.resolveComponent("el-tab-pane"),j=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:V},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:V},{default:e.withCtx(()=>G[1]||(G[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[_.versions&&_.versions.length>0?(e.openBlock(),e.createBlock(j,{key:0,modelValue:t.value,"onUpdate:modelValue":G[0]||(G[0]=w=>t.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.versions,w=>(e.openBlock(),e.createBlock($,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",td,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",sd,[f.value?(e.openBlock(),e.createBlock(ll.SsFilePreview,{key:1,fileName:m.value,blobUrl:f.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(M,{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(w.images||[],b=>(e.openBlock(),e.createElementBlock("div",{key:b.url,class:e.normalizeClass(["thumb",{active:b.url===s.value}]),onClick:g=>s.value=b.url},[e.createElementVNode("div",dd,[p.value[b.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:p.value[b.url]},null,8,pd)):(e.openBlock(),e.createElementBlock("div",fd,"加载中"))]),e.createElementVNode("div",hd,e.toDisplayString(b.name),1)],10,ud))),128))]),e.createElementVNode("div",vd,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[p.value[s.value]?(e.openBlock(),e.createElementBlock("div",md,[e.createElementVNode("img",{class:"viewer-img",src:p.value[s.value]},null,8,yd)])):(e.openBlock(),e.createElementBlock("div",gd,"加载中"))],64)):(e.openBlock(),e.createBlock(M,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(M,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),kd=Xl._export_sfc(bd,[["__scopeId","data-v-220703c0"]]),xd={class:"ocr-candidate-wrap"},wd={class:"ocr-candidate-left"},_d={key:1},Sd={key:0},Ed={key:1},Cd={key:2},Dd={key:3},Nd={key:0,class:"ocr-candidate-right"},Bd={class:"ocr-candidate-actions"},Td={key:1},Ad={class:"dialog-footer"},zd={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(a,{emit:l}){const r=(g=[])=>{const P=[],I=Y=>{(Y||[]).forEach(le=>{if(!le)return;const ye=le.children||le.childrens||le.columns;Array.isArray(ye)&&ye.length>0?I(ye):P.push(le)})};return I(g),P},n=a,t=l,s=e.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowAdd)!==!1}),v=e.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowReplace)!==!1}),p=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const P=JSON.parse(g);return Array.isArray(P)?P:[]}catch{return[]}return[]},f=g=>{t("preview-file",g)},m=e.ref([]),k=e.ref(0),c=e.ref("");e.watch(()=>n.candidates,g=>{var P,I;m.value=(g||[]).map(Y=>({...Y,...(Y==null?void 0:Y.ocrRow)||{},selectedTargetId:(Y==null?void 0:Y.selectedTargetId)||"",__decision:Y==null?void 0:Y.__decision})),k.value=0,c.value=((I=(P=m.value)==null?void 0:P[0])==null?void 0:I.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>n.visible,g=>{var P,I;g&&(k.value=0,c.value=((I=(P=m.value)==null?void 0:P[0])==null?void 0:I.selectedTargetId)||"")});const D=e.computed(()=>{var P;const g=Number(k.value||0);return((P=m.value||[])==null?void 0:P[g])||null}),V=e.computed(()=>(r(n.columns||[])||[]).filter(I=>I&&I.prop).filter(I=>I.type!=="operate"&&I.label!=="操作"&&I.prop!=="operate")),_=e.computed(()=>V.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),G=g=>{if(!g)return;const P=(m.value||[]).findIndex(I=>(I==null?void 0:I.idx)===(g==null?void 0:g.idx));P>-1&&(k.value=P,c.value=(g==null?void 0:g.selectedTargetId)||"")},M=g=>{if(!g){c.value="";return}c.value=String((g==null?void 0:g.id)??"")},$=(g,P="")=>{const I=Number(k.value||0),Y=m.value||[],le=Y[I];le&&(le.__decision=g,le.selectedTargetId=P,c.value=P,m.value=[...Y])},j=()=>$("skip",""),E=()=>$("add",""),S=()=>{if(!c.value){qa.ElMessage.warning("请先选择要替换的目标记录");return}$("replace",c.value)},w=()=>{t("update:visible",!1)},b=()=>{const g=m.value||[];if(g.find(I=>(I==null?void 0:I.__decision)==="replace"&&!(I!=null&&I.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}t("submit",g),t("update:visible",!1)};return(g,P)=>{const I=e.resolveComponent("el-table-column"),Y=e.resolveComponent("svg-icon"),le=e.resolveComponent("el-table"),ye=e.resolveComponent("el-button"),Te=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(wr.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var R,se;return[e.createElementVNode("div",xd,[e.createElementVNode("div",wd,[P[0]||(P[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(le,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:G},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,ee=>(e.openBlock(),e.createBlock(I,{key:ee.prop,label:ee.label,prop:ee.prop,"min-width":ee.minWidth||160},{default:e.withCtx(({row:ue})=>[ee.label==="证书附件"||ee.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p(ue==null?void 0:ue[ee.prop]).length>0?(e.openBlock(),e.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ce=>f({row:ue,prop:ee.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",_d,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ue==null?void 0:ue[ee.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(I,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:ee})=>[e.createTextVNode(e.toDisplayString(((ee==null?void 0:ee.candidates)||[]).length),1)]),_:1}),e.createVNode(I,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:ee})=>[(ee==null?void 0:ee.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Sd,"替换")):(ee==null?void 0:ee.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Ed,"新增")):(ee==null?void 0:ee.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Cd,"跳过")):(e.openBlock(),e.createElementBlock("span",Dd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Nd,[P[4]||(P[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Bd,[e.createVNode(ye,{id:"themeBorderButton",onClick:j},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(ye,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>P[2]||(P[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:S,disabled:!v.value||!c.value},{default:e.withCtx(()=>P[3]||(P[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((R=D.value)==null?void 0:R.candidates)||[]).length===0?(e.openBlock(),e.createBlock(Te,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(le,{data:((se=D.value)==null?void 0:se.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:M,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,ee=>(e.openBlock(),e.createBlock(I,{key:ee.prop,label:ee.label,prop:ee.prop,"min-width":ee.minWidth||160},{default:e.withCtx(({row:ue})=>[ee.label==="证书附件"||ee.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p(ue==null?void 0:ue[ee.prop]).length>0?(e.openBlock(),e.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ce=>f({row:ue,prop:ee.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Td,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ue==null?void 0:ue[ee.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Ad,[e.createVNode(ye,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>P[5]||(P[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:b},{default:e.withCtx(()=>P[6]||(P[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Md=Xl._export_sfc(zd,[["__scopeId","data-v-89e0489c"]]),Id={class:"ocr-preview-content"},Od={class:"ocr-preview-tip"},Ld={class:"ocr-preview-table"},$d={style:{display:"flex","align-items":"center",gap:"8px"}},Rd={class:"dialog-footer"},Vd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]),s=e.ref([]),v=e.ref([]);e.watch(()=>r.visible,V=>{V&&(t.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),v.value=[...r.ocrSelectedFields])});const p=(V,_)=>{const G=[...v.value];if(_)G.includes(V)||G.push(V);else{const M=G.indexOf(V);M>-1&&G.splice(M,1)}v.value=G,n("update:ocrSelectedFields",G)},f=(V,_,G)=>{n("fieldChange",{rowIndex:V,prop:_,value:G})},m=()=>{n("update:ocrPreviewData",t.value),n("confirm",t.value),n("update:visible",!1)},k=()=>{n("update:visible",!1)},c=V=>typeof V!="number"?"-":`${(V*100).toFixed(1)}%`,D=V=>typeof V!="number"?"#606266":V>=.9?"#67c23a":V>=.7?"#e6a23c":"#f56c6c";return(V,_)=>{const G=e.resolveComponent("el-alert"),M=e.resolveComponent("el-table-column"),$=e.resolveComponent("el-checkbox"),j=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),S=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(wr.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:k,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Id,[e.createElementVNode("div",Od,[e.createVNode(G,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Ld,[e.createVNode(E,{data:t.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(M,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(M,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",$d,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:0,"model-value":v.value.includes(w.prop),onChange:b=>p(w.prop,b),onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:b,$index:g})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:D(b[w.prop]),fontWeight:500})},e.toDisplayString(c(b[w.prop])),5)):(e.openBlock(),e.createBlock(j,{key:1,modelValue:b[w.prop],"onUpdate:modelValue":P=>b[w.prop]=P,size:"small",placeholder:"请输入"+w.label,onChange:P=>f(g,w.prop,P)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rd,[e.createVNode(S,{onClick:k,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"])}}},Fd=Xl._export_sfc(Vd,[["__scopeId","data-v-df66eb1f"]]),Eo=a=>{var n;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let r=(n=he.analyzeSplitToContent(l,","))==null?void 0:n.map(t=>((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)),un(t)));return r=r==null?void 0:r.join(","),r};function Xs(a){return qa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function Pd(a){return qa.axios.get(a,{responseType:"blob"})}let Wl="$R",jd="http://222.92.178.198:55002/AIRobot",tt=["Form","BarChart","FormText","FormBlock"];const Zs=a=>{var r,n;let l=(n=he.analyzeSplitToContent(a,"@"))==null?void 0:n[((r=he.analyzeSplitToContent(a,"@"))==null?void 0:r.length)-1];return!!(tt!=null&&tt.some(t=>l==null?void 0:l.includes(t)))},Hd=async(a,l,r,n)=>{var s,v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta;let t=a;if(Zs(t==null?void 0:t[0])){let oe=Jd(t),ca=(s=oe==null?void 0:oe.filter)==null?void 0:s.join(","),Ee=[];(v=oe==null?void 0:oe.hideContents)==null||v.forEach(Ue=>{if(Ue){const oa=Ue;oa&&Ee.push(`(HideGroup=Yes, prop=${oa})`)}});let ie=(p=oe==null?void 0:oe.formContents)==null?void 0:p.filter(Ue=>{var oa;return(oa=Ue==null?void 0:Ue.filters)==null?void 0:oa.includes("@ShowHide=Hide")});(ie==null?void 0:ie.length)>0&&(ie==null||ie.forEach(Ue=>{if(Ue){const oa=Ue==null?void 0:Ue.prop;oa&&Ee.push(`(Hide=Yes, prop=${oa})`)}}));let Be=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Be)||(Be=Be?[Be]:[]),Be=[...Be,...Ee],{key:"Form",name:oe==null?void 0:oe.groupName,value:oe==null?void 0:oe.formContents,contents:Array.isArray((f=oe==null?void 0:oe.contents)==null?void 0:f[0])&&((k=(m=oe==null?void 0:oe.contents)==null?void 0:m[0])!=null&&k.every(Ue=>Array.isArray(Ue)))?[(D=(c=oe==null?void 0:oe.contents)==null?void 0:c[0])==null?void 0:D[r]]:[oe==null?void 0:oe.contents],filter:"("+ca+")",menuFilter:Be,groupFilter:oe==null?void 0:oe.groupFilters}}else if(((V=t==null?void 0:t[0])==null?void 0:V[0])!=="&"){let oe=ac(t,n),ca="";(_=oe==null?void 0:oe.tableFilter)!=null&&_.includes(Wl)?oe.tableFilter=(G=oe==null?void 0:oe.tableFilter)==null?void 0:G.replace(Wl,""):ca=(j=($=(M=oe==null?void 0:oe.tableFilter)==null?void 0:M.replace("(",Wl))==null?void 0:$.split(Wl))==null?void 0:j[0];let Ee=[];oe!=null&&oe.tableFilter&&((E=he.analyzeSplitToContent(oe==null?void 0:oe.tableFilter,","))==null||E.forEach(Be=>{Be!=null&&Be.includes("@ShowHide=Hide")&&Ee.push("HideGroup=Yes")}));let ie=(n==null?void 0:n.menuFilter)??[];return Array.isArray(ie)||(ie=ie?[ie]:[]),ie=[...ie,...Ee],{key:"Table",name:oe==null?void 0:oe.groupName,tableColumns:oe==null?void 0:oe.tableColumns,assistColumn:oe==null?void 0:oe.columns,tableContents:l===1?oe==null?void 0:oe.tableContents:(w=(S=oe==null?void 0:oe.tableContents)==null?void 0:S[r])!=null&&w.every(Be=>Array.isArray(Be))?(b=oe==null?void 0:oe.tableContents)==null?void 0:b[r]:[(g=oe==null?void 0:oe.tableContents)==null?void 0:g[r]],filter:oe==null?void 0:oe.tableFilter,menuFilter:ie,quotePage:ca!==""?((Y=(I=(P=ca==null?void 0:ca.replace("*",Wl))==null?void 0:P.split(Wl))==null?void 0:I[0])==null?void 0:Y.replaceAll(":","/"))??"":void 0,quoteGroup:ca!==""?((ue=(ee=(se=(R=(Te=(ye=(le=ca==null?void 0:ca.replace("*",Wl))==null?void 0:le.split(Wl))==null?void 0:ye[1])==null?void 0:Te.replace("{",Wl))==null?void 0:R.split(Wl))==null?void 0:se[0])==null?void 0:ee.split(":"))==null?void 0:ue.filter(Be=>Be!==""))??[]:[],relatedQuotes:oe==null?void 0:oe.relatedQuotes,fatherSyncContents:oe==null?void 0:oe.fatherSyncContents,sonSyncContents:oe==null?void 0:oe.sonSyncContents}}else{let oe=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ca=t==null?void 0:t[0];ca=ca==null?void 0:ca.slice(1,ca==null?void 0:ca.length),ca=he.analyzeSplitToContent(ca,":"),ca=ca==null?void 0:ca[(ca==null?void 0:ca.length)-1];let Ee=[];Ee.push("1");let ie=ca==null?void 0:ca.replace("(",Wl);ie=(Ce=ie==null?void 0:ie.split(Wl))==null?void 0:Ce[0],Ee.push(ie);let Be=ca==null?void 0:ca.replace("(",Wl);if(Be=(Pe=Be==null?void 0:Be.split(Wl))==null?void 0:Pe[1],Be=(B=(ve=Be==null?void 0:Be.replace(")",Wl))==null?void 0:ve.split(Wl))==null?void 0:B[0],(W=(ce=Be==null?void 0:Be.replace(",",Wl))==null?void 0:ce.split(Wl))==null||W.forEach(Ue=>{Ee.push(Ue)}),Ee.push(""),Ee.push(""),(Se=Ee==null?void 0:Ee[2])!=null&&Se.includes(".xlsx")||(Le=Ee==null?void 0:Ee[2])!=null&&Le.includes(".xls"))try{let Ue=jd+"/"+(Ee==null?void 0:Ee[2]),oa=await Pd(Ue),Ja=`生成js函数名称为${Ee==null?void 0:Ee[1]}的函数,规则为:`+(Ee==null?void 0:Ee[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((oa==null?void 0:oa.status)===200){let L=oa==null?void 0:oa.data;const H=new FormData;H.append("file",L,Ee==null?void 0:Ee[2]),H.append("query",Ja);let Z=await Xs(H);Z=(Na=(aa=(Fe=Z==null?void 0:Z.data)==null?void 0:Fe.data)==null?void 0:aa.response)==null?void 0:Na.replace("generateResult",Ee==null?void 0:Ee[1]),Ee[Ee.length-2]=Z,Ee[Ee.length-1]=[{name:(ta=(ae=Ee==null?void 0:Ee[2])==null?void 0:ae.split("."))==null?void 0:ta[0],url:Ue}]}}catch{}return Ee=[Ee],{key:"Method",name:[],tableContents:Ee,tableColumns:oe}}},Ud=(a,l)=>{var n,t,s,v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee;let r=(t=(n=he.analyzeSplitToContent(a,"="))==null?void 0:n.filter(ie=>ie!=="="))==null?void 0:t.map(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));if(Zs(r==null?void 0:r[1])){let ie=Yd(r),Be=(p=(v=(s=ie==null?void 0:ie.filter)==null?void 0:s.replace("@",Wl))==null?void 0:v.split(Wl))==null?void 0:p[0],Ue=(k=(m=(f=ie==null?void 0:ie.filter)==null?void 0:f.replace("(",Wl))==null?void 0:m.split(Wl))==null?void 0:k[1],oa=(V=(D=(c=ie==null?void 0:ie.filter)==null?void 0:c.replace("(",Wl))==null?void 0:D.split(Wl))==null?void 0:V[0];oa="@"+((_=oa==null?void 0:oa.split("@"))==null?void 0:_[1]),Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1),Ue=(M=(G=he.analyzeSplitToContent(Ue,","))==null?void 0:G.map(L=>(L=oa+L,L)))==null?void 0:M.join("");let Ja=Be+"("+Ue+")";return{key:"Form",name:ie==null?void 0:ie.group,filter:Ja,formPage:((E=(j=($=Be==null?void 0:Be.replace("*",Wl))==null?void 0:$.split(Wl))==null?void 0:j[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((Y=(I=(P=(g=(b=(w=(S=Be==null?void 0:Be.replace("*",Wl))==null?void 0:S.split(Wl))==null?void 0:w[1])==null?void 0:b.replace("{",Wl))==null?void 0:g.split(Wl))==null?void 0:P[0])==null?void 0:I.split(":"))==null?void 0:Y.filter(L=>L!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let ie=ac(r,l,r==null?void 0:r[1]),Be="";(le=ie==null?void 0:ie.tableFilter)!=null&&le.includes(Wl)?ie.tableFilter=(ye=ie==null?void 0:ie.tableFilter)==null?void 0:ye.replace(Wl,""):Be=(se=(R=(Te=ie==null?void 0:ie.tableFilter)==null?void 0:Te.replace("(",Wl))==null?void 0:R.split(Wl))==null?void 0:se[0];let Ue=(Ce=(ue=(ee=ie==null?void 0:ie.tableFilter)==null?void 0:ee.replace("(",Wl))==null?void 0:ue.split(Wl))==null?void 0:Ce[0];Ue=[{menus:(ve=(Pe=Ue==null?void 0:Ue.split("*"))==null?void 0:Pe[0])==null?void 0:ve.replaceAll(":","/"),groups:((ce=(B=Ue==null?void 0:Ue.split("*"))==null?void 0:B[1])==null?void 0:ce.split(":"))??[]}];let oa=(Le=(Se=(W=ie==null?void 0:ie.tableFilter)==null?void 0:W.replace("(",Wl))==null?void 0:Se.split(Wl))==null?void 0:Le[1];(oa==null?void 0:oa[(oa==null?void 0:oa.length)-1])===")"&&(oa=oa==null?void 0:oa.slice(0,(oa==null?void 0:oa.length)-1));let Ja=[];ie!=null&&ie.tableFilter&&((Fe=he.analyzeSplitToContent(ie==null?void 0:ie.tableFilter,","))==null||Fe.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ja.push("HideGroup=Yes")}));let L=(l==null?void 0:l.menuFilter)??[];return Array.isArray(L)||(L=L?[L]:[]),L=[...L,...Ja],{key:"Table",name:ie==null?void 0:ie.groupName,filter:ie==null?void 0:ie.tableFilter,tableColumns:ie==null?void 0:ie.tableColumns,quotePage:Be!==""?((ae=(Na=(aa=Be==null?void 0:Be.replace("*",Wl))==null?void 0:aa.split(Wl))==null?void 0:Na[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:Be!==""?((Ee=(ca=(oe=(ta=Be==null?void 0:Be.replace("*",Wl))==null?void 0:ta.split(Wl))==null?void 0:oe[1])==null?void 0:ca.split(":"))==null?void 0:Ee.filter(H=>H!==""))??[]:[],menuFilter:L,relatedQuotes:Ue,fatherSyncContents:(ie==null?void 0:ie.fatherSyncContents)??[],sonSyncContents:(ie==null?void 0:ie.sonSyncContents)??[]}}},qd=async(a,l)=>{let r=[],n=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(t,s)=>{let v=[];t=t==null?void 0:t.map(async p=>{var f,m;if(v.push(p),((f=he.analyzeSplitToContent(a,"="))==null?void 0:f.length)<=2){if(((m=he.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const k=await Hd(he.analyzeSplitToContent(a,"="),n,s,p);v.push(k)}}else v.push(Ud(a,p))}),await Promise.all(t),r.push(v)}),await Promise.all(l),r};let Vi="/",Wd="$",hn="$R";const Qs=a=>{var r,n,t;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((v,p)=>p!==0);s=s==null?void 0:s.join(""),s=he.analyzerSplitToWord(s,")"),(s==null?void 0:s.length)!==1?(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"?s=s==null?void 0:s.join(""):s=(r=s==null?void 0:s.filter((v,p)=>p!==(s==null?void 0:s.length)-1))==null?void 0:r.join(""):s=s==null?void 0:s[0],l="("+s,((t=a==null?void 0:a[0])==null?void 0:t[((n=a==null?void 0:a[0])==null?void 0:n.length)-2])==="@"&&(l="@"+l)}return{filter:l}},ec=(a,l=[])=>{let r=(a==null?void 0:a.map(s=>{var v,p;return(p=s==null?void 0:s.key)==null?void 0:p.slice(1,(v=s==null?void 0:s.key)==null?void 0:v.length)}))??[],n=[];r==null||r.forEach(s=>{var v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Wd)){let Te="",R=!0,se=he.analyzerSplitToWord(s,"(");(se==null?void 0:se.length)>1&&(Te="("+((v=he.analyzerSplitToWord(se==null?void 0:se[1],")"))==null?void 0:v[0]),((f=se==null?void 0:se[0])==null?void 0:f[((p=se==null?void 0:se[0])==null?void 0:p.length)-2])==="@"&&(Te="@"+Te));let ee=s;ee=ee==null?void 0:ee.replace(Te,""),Te=un(Te),Te=(m=he.analyzeSplitToContent(Te,","))==null?void 0:m.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)),Te!=null&&Te.includes("@ShowHide=Hide")&&(R=!1);let ue=(k=ee==null?void 0:ee.replace("$",hn))==null?void 0:k.split(hn),Ce=ue==null?void 0:ue[1],Pe=ue==null?void 0:ue[0];Pe!=null&&Pe.includes("[")&&(Pe=(D=(c=Pe==null?void 0:Pe.replace("[",hn))==null?void 0:c.split(hn))==null?void 0:D[0],Ce=Ce+":["+((G=(_=(V=ue==null?void 0:ue[0])==null?void 0:V.replace("[",hn))==null?void 0:_.split(hn))==null?void 0:G[1])),Pe=($=(M=Pe==null?void 0:Pe.replaceAll(":","/"))==null?void 0:M.replaceAll("{",""))==null?void 0:$.replaceAll("}",""),(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])!=="/"&&(Pe=Pe+"/"),Ce=((j=Pe==null?void 0:Pe.split("/"))==null?void 0:j[0])+":"+Ce;let B="";if(!(Ce!=null&&Ce.includes("[")))B=Ce==null?void 0:Ce.replaceAll(":","/"),n==null||n.push({path:B,isShow:R,filter:Te,fatherPath:Pe});else{let ce=(S=(E=Ce==null?void 0:Ce.replace("[",hn))==null?void 0:E.split(hn))==null?void 0:S[1];ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1),ce=(w=he.analyzeSplitToContent(ce,","))==null?void 0:w.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])===","&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W)),ce==null||ce.forEach(W=>{var Se,Le;B=((Le=(Se=Ce==null?void 0:Ce.replace("[",hn))==null?void 0:Se.split(hn))==null?void 0:Le[0])+W,B=B==null?void 0:B.replaceAll(":","/"),n==null||n.push({path:B,isShow:R,filter:Te,fatherPath:Pe})})}}else{let Te="",R=!0,se=he.analyzerSplitToWord(s,"(");(se==null?void 0:se.length)>1&&(Te=(b=Qs(se))==null?void 0:b.filter);let ee=s;if(ee=ee==null?void 0:ee.replace(Te,""),(Te==null?void 0:Te[0])==="("){Te=Te==null?void 0:Te.slice(1,(Te==null?void 0:Te.length)-1);let Ce=[];(g=he.analyzeSplitToContent(Te,","))==null||g.forEach(Pe=>{(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])===","&&(Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1)),(Pe==null?void 0:Pe[0])==="("&&(Pe=Pe==null?void 0:Pe.slice(1,(Pe==null?void 0:Pe.length)-1)),(Pe==null?void 0:Pe[0])!=="@"&&(Pe="@"+Pe),Ce.push(un(Pe))}),Te=Ce==null?void 0:Ce.join(",")}else Te=un(Te);Te=(P=he.analyzeSplitToContent(Te,","))==null?void 0:P.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)),Te!=null&&Te.includes("@ShowHide=Hide")&&(R=!1),(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])==="}"&&(ee=ee+":"),ee=(I=ee==null?void 0:ee.replaceAll("{",""))==null?void 0:I.replaceAll("}","");let ue="";if(ee!=null&&ee.includes("[")){let Ce=(Y=ee==null?void 0:ee.replace("[",hn))==null?void 0:Y.split(hn),Pe=Ce==null?void 0:Ce[1];Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1),(ye=(le=he.analyzeSplitToContent(Pe,","))==null?void 0:le.map(ve=>((ve==null?void 0:ve[(ve==null?void 0:ve.length)-1])===","&&(ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1)),ve)))==null||ye.forEach(ve=>{ue=(Ce==null?void 0:Ce[0])+ve,ue=ue==null?void 0:ue.replaceAll(":","/"),n==null||n.push({path:ue,isShow:R,filter:Te})})}else ue=ee==null?void 0:ee.replaceAll(":","/"),n==null||n.push({path:ue,isShow:R,filter:Te})}});let t=A.cloneDeep(n);return(l==null?void 0:l.length)>0&&(t=l),t=t==null?void 0:t.filter(s=>{var v,p,f,m;return!(s!=null&&s.fatherPath)&&((p=(v=s==null?void 0:s.path)==null?void 0:v.split(Vi))==null?void 0:p.length)>1&&((m=(f=s==null?void 0:s.path)==null?void 0:f.split(Vi))==null?void 0:m[1])===""}),t=t==null?void 0:t.map(s=>{var v;return s.path=(v=s.path)==null?void 0:v.replace(Vi,""),s.path}),(t==null?void 0:t.length)>0&&(n=n==null?void 0:n.map(s=>{var p,f,m,k,c,D,V;let v=t==null?void 0:t.find(_=>{var G;return(G=s==null?void 0:s.path)==null?void 0:G.includes(_)});return!(s!=null&&s.fatherPath)&&v&&!((p=s==null?void 0:s.path)!=null&&p.includes(Vi))&&!(t!=null&&t.find(_=>(s==null?void 0:s.path)===_))&&(s.path=v+Vi+((V=(m=(f=s==null?void 0:s.path)==null?void 0:f.split(v))==null?void 0:m[1])==null?void 0:V.slice(1,(D=(c=(k=s==null?void 0:s.path)==null?void 0:k.split(v))==null?void 0:c[1])==null?void 0:D.length))),s})),n},Kd=(a,l)=>ec([{key:a}],l),Gd=async(a,l)=>{const r=[],n=Kd(a==null?void 0:a.key,l);return n&&(n==null?void 0:n.length)>0&&(n==null||n.forEach(s=>{r.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await qd(a==null?void 0:a.value,r)};let gl="$R",Pi="[Any]";const Yd=a=>{var v,p;let l={},n=a==null?void 0:a[0];(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),n=n==null?void 0:n.split(":"),l.group=n;let t=a==null?void 0:a[1],s;return t!=null&&t.includes("{")?s=(p=(v=t==null?void 0:t.replaceAll("{",""))==null?void 0:v.replaceAll("}",""))==null?void 0:p.replaceAll(Pi,""):s=t==null?void 0:t.replaceAll(Pi,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},Jd=a=>{var D,V,_,G,M,$;let l=[],r=[],n=[],t=[],s=[],v=[],p="",f=a==null?void 0:a[0];(f==null?void 0:f[0])==="*"&&(f=f==null?void 0:f.slice(1,f==null?void 0:f.length));let m=he.analyzeSplitToContent(f,":");(D=m==null?void 0:m.filter(j=>(j==null?void 0:j[0])!=="{"&&(j==null?void 0:j[0])!=="["))==null||D.forEach(j=>{var S,w,b;(j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1));let E=he.analyzerSplitToWord(j,"(");if((E==null?void 0:E.length)>1){p=(S=Qs(E))==null?void 0:S.filter;let g=j==null?void 0:j.replace(p,"");if(n.push(g),(p==null?void 0:p[0])==="("){p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1);let P=[];(w=he.analyzeSplitToContent(p,","))==null||w.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),P.push(un(I))}),p=P==null?void 0:P.join(",")}else p=un(p);p=(b=he.analyzeSplitToContent(p,","))==null?void 0:b.map(P=>((P==null?void 0:P[(P==null?void 0:P.length)-1])===","&&(P=P==null?void 0:P.slice(0,(P==null?void 0:P.length)-1)),P)),p!=null&&p.includes("@ShowHide=Hide")&&v.push(g),t=[...t,...p]}else n.push(E==null?void 0:E[0])});let k=(V=m==null?void 0:m.filter(j=>(j==null?void 0:j[0])==="{"))==null?void 0:V[0],c=(_=m==null?void 0:m.filter(j=>(j==null?void 0:j[0])==="["))==null?void 0:_[0];return l=Ci(c??""),l!=null&&l.every(j=>Array.isArray(j))&&(l=[l]),(k==null?void 0:k[(k==null?void 0:k.length)-1])===":"&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),s=(G=he.analyzeSplitToContent(k,"@"))==null?void 0:G[1],s="@"+s,k=k==null?void 0:k.replace(s,""),s=un(s),s=(M=he.analyzeSplitToContent(s,","))==null?void 0:M.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),(k==null?void 0:k[0])==="{"&&(k=k==null?void 0:k.slice(1,(k==null?void 0:k.length)-1)),k=($=he.analyzeSplitToContent(k,","))==null?void 0:$.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),k==null||k.forEach((j,E)=>{var R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da;let S=[],w=[],b=!1,g,P=[],I=[],Y=[],le="Input",ye=[],Te=[];if(j!=null&&j.includes("==")){g=(R=j==null?void 0:j.split("=="))==null?void 0:R[0];let Qe=(se=j==null?void 0:j.split("=="))==null?void 0:se[1],te="";((ee=he.analyzeSplitToContent(Qe,"$"))==null?void 0:ee.length)>1&&((ue=he.analyzeSplitToContent(Qe,"$"))==null?void 0:ue[0])!=="$"?(te=(Ce=he.analyzeSplitToContent(Qe,"$"))==null?void 0:Ce[0],te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)):((Pe=he.analyzeSplitToContent(Qe,"}"))==null?void 0:Pe.length)>1&&(te=(ve=he.analyzeSplitToContent(Qe,"}"))==null?void 0:ve[1]);let pa=Qe==null?void 0:Qe.replace(te,"");(te==null?void 0:te[0])==="("&&(te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1)),(B=he.analyzeSplitToContent(te,","))==null||B.forEach(We=>{var Da;(We==null?void 0:We[0])!=="@"&&(We="@"+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));let Aa=un(We);(Da=he.analyzeSplitToContent(Aa,","))==null||Da.forEach(Ze=>{(Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1)),S.push(Ze)})}),(pa==null?void 0:pa[0])==="$"&&(pa=pa==null?void 0:pa.slice(1,pa==null?void 0:pa.length));let Ne=(ce=pa==null?void 0:pa.replace("*",gl))==null?void 0:ce.split(gl);P=(W=Ne==null?void 0:Ne[0])==null?void 0:W.split(":"),I=(Le=(Se=he.analyzeSplitToContent(Ne==null?void 0:Ne[1],":"))==null?void 0:Se.filter((We,Aa)=>{var Da,Ze;return Aa!==((Ze=(Da=Ne==null?void 0:Ne[1])==null?void 0:Da.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:Le.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)),Y=(aa=(Fe=he.analyzeSplitToContent(Ne==null?void 0:Ne[1],":"))==null?void 0:Fe.filter((We,Aa)=>{var Da,Ze;return Aa===((Ze=(Da=Ne==null?void 0:Ne[1])==null?void 0:Da.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:aa[0],Y=(ae=(Na=Y==null?void 0:Y.replaceAll("{",""))==null?void 0:Na.replaceAll("}",""))==null?void 0:ae.split(":"),le="Select"}else if(((ta=he.analyzeSplitToContent(j,"="))==null?void 0:ta.length)>1)if(le="Select",g=(ca=(oe=j==null?void 0:j.replace("=",gl))==null?void 0:oe.split(gl))==null?void 0:ca[0],!(j!=null&&j.includes("If")))ye=(ie=(Ee=j==null?void 0:j.replace("=",gl))==null?void 0:Ee.split(gl))==null?void 0:ie[1],ye=ye==null?void 0:ye.split("||");else{let Qe=(Ue=(Be=j==null?void 0:j.replace("=",gl))==null?void 0:Be.split(gl))==null?void 0:Ue[1];Te=(oa=he.analyzeSplitToContent(Qe,")"))==null?void 0:oa.filter(te=>!(te!=null&&te.includes("If"))),Te=Te==null?void 0:Te.map(te=>((te==null?void 0:te[0])==="("&&(te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1)),te=te==null?void 0:te.split("||"),te)),w=(Ja=he.analyzeSplitToContent(Qe,")"))==null?void 0:Ja.filter(te=>te==null?void 0:te.includes("If")),w=w==null?void 0:w.map(te=>((te==null?void 0:te[0])==="|"&&(te=te==null?void 0:te.slice(2,te==null?void 0:te.length)),(te==null?void 0:te[0])==="("&&(te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1)),(te==null?void 0:te[0])!=="@"&&(te="@"+te),te))}else if(((L=he.analyzeSplitToContent(j,"@"))==null?void 0:L.length)>1){g=(H=he.analyzeSplitToContent(j,"@"))==null?void 0:H[0],(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));let Qe="@"+((Z=he.analyzeSplitToContent(j,"@"))==null?void 0:Z[1]);Qe=un(Qe),S=(me=he.analyzeSplitToContent(Qe,","))==null?void 0:me.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)),S!=null&&S.find(te=>te==null?void 0:te.includes("@Type"))&&(le=(da=(fe=S==null?void 0:S.find(te=>te==null?void 0:te.includes("@Type")))==null?void 0:fe.split("="))==null?void 0:da[1])}else g=j;S!=null&&S.includes("@ShowHide=Hide")&&(b=!0),r.push({prop:g,label:g,value:"",menuPath:P,groups:I,columns:Y,type:le,options:ye,allContents:Te,filters:S,width:k==null?void 0:k.length,isFormColHidden:b,filterContents:w})}),{groupName:n,groupFilters:t,formContents:r,contents:l,filter:s,hideContents:v}},Ci=a=>{var n,t;if(!a||typeof a!="string")return[];let l=[],r=a.slice(1,(a==null?void 0:a.length)-1);if((r==null?void 0:r[0])!=="[")(n=he.analyzeSplitToContent(r,","))==null||n.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),l.push(s??"")});else{let s=[];(t=he.analyzeSplitToContent(r,","))==null||t.forEach(v=>{(v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),s.push(Ci(v))}),l=s}return l},ft=(a,l)=>{var $,j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze;let r,n=[],t=[],s=[],v=[],p=[],f=[],m=[],k="Input",c,D="",V="",_="",G=[],M="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(r=($=a==null?void 0:a.split("=="))==null?void 0:$[0],c=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],k="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(S=(E=a==null?void 0:a.replace("=",gl))==null?void 0:E.split(gl))==null?void 0:S[1])!=null&&w.includes("If")))if(r=he.analyzeSplitToContent(a,"@"),r=r==null?void 0:r[0],(r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=(g=(b=r==null?void 0:r.replace("=",gl))==null?void 0:b.split(gl))==null?void 0:g[0],r!=null&&r.includes("&")&&(r=(I=(P=r==null?void 0:r.replace("&",gl))==null?void 0:P.split(gl))==null?void 0:I[0]),c=r,((Y=he.analyzeSplitToContent(a,"@"))==null?void 0:Y.length)>1){if(!(a!=null&&a.includes("&"))){let ra=(le=he.analyzeSplitToContent(a,"@"))==null?void 0:le[1];if((ra==null?void 0:ra[0])!=="@"&&(ra="@"+ra),ra=un(ra),V=ra,V!=null&&V.includes("@Type")){let pe=he.analyzeSplitToContent(V,",");pe=pe==null?void 0:pe.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)),pe=(ye=pe==null?void 0:pe.filter(U=>U==null?void 0:U.includes("@Type")))==null?void 0:ye[0],k=(Te=pe==null?void 0:pe.split("="))==null?void 0:Te[1]}}}else a!=null&&a.includes("||")?n=(ee=(se=(R=a==null?void 0:a.split("="))==null?void 0:R[1])==null?void 0:se.split("||"))==null?void 0:ee.map(ra=>({label:ra==null?void 0:ra.replaceAll("'",""),value:ra==null?void 0:ra.replaceAll("'","")})):(k="Input",D=(Pe=(Ce=(ue=a==null?void 0:a.replace("=",gl))==null?void 0:ue.split(gl))==null?void 0:Ce[1])==null?void 0:Pe.replaceAll("'",""));else if((ce=(B=(ve=a==null?void 0:a.replace("=",gl))==null?void 0:ve.split(gl))==null?void 0:B[1])!=null&&ce.includes("||")){r=(W=a==null?void 0:a.split("="))==null?void 0:W[0],c=(Se=a==null?void 0:a.split("="))==null?void 0:Se[0];let ra=(Fe=(Le=a==null?void 0:a.replace("=",gl))==null?void 0:Le.split(gl))==null?void 0:Fe[1];ra=he.analyzeSplitToContent(ra,")");let pe=ra==null?void 0:ra.filter(q=>!(q!=null&&q.includes("If")));pe==null||pe.forEach(q=>{(q==null?void 0:q[0])==="("&&(q=q==null?void 0:q.slice(1,(q==null?void 0:q.length)-1)),t==null||t.push(q==null?void 0:q.split("||"))});let U=ra==null?void 0:ra.filter(q=>q==null?void 0:q.includes("If"));U=U==null?void 0:U.map(q=>((q==null?void 0:q[0])==="|"&&(q==null?void 0:q[1])==="|"&&(q=q==null?void 0:q.slice(2,q==null?void 0:q.length)),(q==null?void 0:q[0])==="("&&(q=q==null?void 0:q.slice(1,(q==null?void 0:q.length)-1)),(q==null?void 0:q[0])!=="@"&&(q="@"+q),q)),s=U}else{let ra=a==null?void 0:a.split("=="),pe=(aa=ra==null?void 0:ra.filter(U=>(U==null?void 0:U.includes("$"))&&(U==null?void 0:U[0])!=="{"))==null?void 0:aa[0];if(pe&&!(pe!=null&&pe.includes("&"))){let U=(Na=pe==null?void 0:pe.replace("*",gl))==null?void 0:Na.split(gl),q=(U==null?void 0:U[0])===""?l==null?void 0:l.value:U==null?void 0:U[0];(q==null?void 0:q[0])==="("&&(q=(ae=he.analyzeSplitToContent(q,")"))==null?void 0:ae[1]),q=(oe=(ta=q==null?void 0:q.replaceAll("{",""))==null?void 0:ta.replaceAll("}",""))==null?void 0:oe.replaceAll(Pi,""),(q==null?void 0:q[0])==="$"&&(q=(ca=q==null?void 0:q.slice(1,q==null?void 0:q.length))==null?void 0:ca.replaceAll(":","/")),v=q==null?void 0:q.split("/");let ze=(ie=(Ee=U==null?void 0:U[1])==null?void 0:Ee.replace("{",gl))==null?void 0:ie.split(gl),_e=ze==null?void 0:ze[0];(_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)),p=_e==null?void 0:_e.split(":"),f=(Ja=(oa=(Ue=(Be=ze==null?void 0:ze[1])==null?void 0:Be.replace("}",gl))==null?void 0:Ue.split(gl))==null?void 0:oa[0])==null?void 0:Ja.split(":");let la="";((L=he.analyzeSplitToContent(pe,")"))==null?void 0:L.length)>1&&(la=(H=he.analyzeSplitToContent(pe,")"))==null?void 0:H[0]),la&&la!==""&&((la==null?void 0:la[0])!=="@"&&(la="@"+la),V=Eo(la))}if(ra!=null&&ra.some(U=>(U==null?void 0:U[0])==="&")){let U=(Z=ra==null?void 0:ra.filter(_e=>(_e==null?void 0:_e[0])==="&"))==null?void 0:Z[0];(U==null?void 0:U[0])==="&"&&(U=U==null?void 0:U.slice(1,U==null?void 0:U.length)),_=(fe=(me=U==null?void 0:U.replace("(",gl))==null?void 0:me.split(gl))==null?void 0:fe[0];let q=(da=he.analyzeSplitToContent(U,")"))==null?void 0:da[0];q=(te=(Qe=q==null?void 0:q.replace("(",gl))==null?void 0:Qe.split(gl))==null?void 0:te[1],q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),(q==null?void 0:q[0])==="{"&&(q=q==null?void 0:q.slice(1,q==null?void 0:q.length)),(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)),G=q==null?void 0:q.split(",");let ze=(pa=he.analyzeSplitToContent(U,")"))==null?void 0:pa[1];ze&&ze!==""&&(M=Eo(ze))}else if(!pe&&((Ne=ra==null?void 0:ra.filter(U=>(U==null?void 0:U[0])==="{"))==null?void 0:Ne.length)>0){let U=ra==null?void 0:ra[(ra==null?void 0:ra.length)-1];U=U==null?void 0:U.slice(1,(U==null?void 0:U.length)-1),U=he.analyzeSplitToContent(U,","),U=U==null?void 0:U.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)),U=U==null?void 0:U.map(q=>{var ze,_e,la,fa;if(q=q==null?void 0:q.replaceAll("$",""),q!=null&&q.includes("{")){let ka="";q=q==null?void 0:q.replaceAll("{","");let ha=q==null?void 0:q.split("}");ka=((_e=(ze=ha==null?void 0:ha[0])==null?void 0:ze.split(":"))==null?void 0:_e[0])+":"+(ha==null?void 0:ha[1]),q=ka,q=q+":"}if(q!=null&&q.includes(Pi)){let ka="",ha=q==null?void 0:q.split(Pi);ka=((fa=(la=ha==null?void 0:ha[0])==null?void 0:la.split(":"))==null?void 0:fa[0])+":"+(ha==null?void 0:ha[1]),q=ka,q=q+":"}return q=q==null?void 0:q.replaceAll(":","/"),q}),m=U}else!((We=ra==null?void 0:ra[1])!=null&&We.includes("$"))&&((Aa=ra==null?void 0:ra[1])==null?void 0:Aa[0])!=="("&&f.push(ra==null?void 0:ra[1])}else r=(Da=a==null?void 0:a.split("&"))==null?void 0:Da[0],c=(Ze=a==null?void 0:a.split("&"))==null?void 0:Ze[0];return{label:r,prop:c,options:n,allContents:t,filterContents:s,menus:v,groups:p,words:f,align:"center",formType:k,filter:V,functionName:_,functionRelatedWords:G,calculatorFilter:M,relatedPages:m,value:D}},Co=(a,l)=>{var n,t,s,v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee;let r=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((v=(s=(t=(n=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:n.replace(":",gl))==null?void 0:t.split(gl))==null?void 0:s[0])!=null&&v.includes(","))){let ue=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),Ce=(p=ue==null?void 0:ue.replace(":",gl))==null?void 0:p.split(gl);if(((f=he.analyzeSplitToContent(Ce==null?void 0:Ce[1],"="))==null?void 0:f.length)===1){let Pe=Ce==null?void 0:Ce[0],ve=[];(c=he.analyzeSplitToContent((k=Ce==null?void 0:Ce[1])==null?void 0:k.slice(1,((m=Ce==null?void 0:Ce[1])==null?void 0:m.length)-1),","))==null||c.forEach(B=>{var ce,W;((ce=he.analyzeSplitToContent(B,"="))==null?void 0:ce.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)),ve=[...ve,...Co(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)),ve.push((W=Co(B,l))==null?void 0:W[0]))}),r==null||r.push({label:Pe,prop:Pe,children:ve,align:"center"})}else{let Pe=[];if(((D=he.analyzeSplitToContent(ue,"="))==null?void 0:D.length)>=2){let B=(V=he.analyzeSplitToContent(ue,"="))==null?void 0:V[1],ce=(_=he.analyzeSplitToContent(B,"/"))==null?void 0:_.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));Pe=ce==null?void 0:ce.map(W=>(W=Ci(W),W))}let ve=(S=(E=(j=($=(M=(G=ue==null?void 0:ue.replace("{",gl))==null?void 0:G.split(gl))==null?void 0:M[1])==null?void 0:$.replace("}",gl))==null?void 0:j.split(gl))==null?void 0:E[0])==null?void 0:S.split(",");ve==null||ve.forEach((B,ce)=>{(Pe==null?void 0:Pe.length)>0&&ce===0?r==null||r.push({label:B,prop:B,align:"center",formType:"Select",relatedContents:Pe==null?void 0:Pe.map(W=>{let Se={};return ve==null||ve.forEach((Le,Fe)=>{Se[Le]=W==null?void 0:W[Fe]}),Se}),options:Pe==null?void 0:Pe.map(W=>({label:W==null?void 0:W[0],value:W==null?void 0:W[0]})),mainKey:!0}):r==null||r.push({label:B,prop:B,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=he.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((g=(b=he.analyzeSplitToContent(a,"="))==null?void 0:b[1])==null?void 0:g[0])==="["){let ue=[];if(((P=he.analyzeSplitToContent(a,"="))==null?void 0:P.length)>=2){let Pe=(I=he.analyzeSplitToContent(a,"="))==null?void 0:I[1],ve=(le=(Y=he.analyzeSplitToContent(Pe,"|"))==null?void 0:Y.filter(B=>B!=="|"))==null?void 0:le.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));ue=ve==null?void 0:ve.map(B=>(B=Ci(B),B))}let Ce=(Te=(ye=a==null?void 0:a.replace("}",gl))==null?void 0:ye.split(gl))==null?void 0:Te[0];Ce=(R=Ce==null?void 0:Ce.slice(1,Ce==null?void 0:Ce.length))==null?void 0:R.split(","),Ce==null||Ce.forEach((Pe,ve)=>{(ue==null?void 0:ue.length)>0&&ve===0?r==null||r.push({label:Pe,prop:Pe,align:"center",formType:"Select",relatedContents:ue==null?void 0:ue.map(B=>{let ce={};return Ce==null||Ce.forEach((W,Se)=>{ce[W]=B==null?void 0:B[Se]}),ce}),options:ue==null?void 0:ue.map(B=>({label:B==null?void 0:B[0],value:B==null?void 0:B[0]})),mainKey:!0}):r==null||r.push({label:Pe,prop:Pe,align:"center"})})}else(se=he.analyzeSplitToContent(a,","))==null||se.forEach(ue=>{var Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe;if((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?void 0:ue[0])==="{"){let U=he.analyzeSplitToContent(ue,"="),q=U==null?void 0:U[(U==null?void 0:U.length)-1],ze=[],_e=[],la=[],fa="",ka="",ha=[],Va=[],Sa=(Ce=q==null?void 0:q.replace("*",gl))==null?void 0:Ce.split(gl),Oe=(Sa==null?void 0:Sa[0])===""?l==null?void 0:l.value:Sa==null?void 0:Sa[0];Oe=he.analyzeSplitToContent(Oe,")");let Za="";if((Oe==null?void 0:Oe.length)>1&&((Pe=Oe==null?void 0:Oe[0])==null?void 0:Pe[0])!=="&"&&(Za=Oe==null?void 0:Oe[0],(Za==null?void 0:Za[0])!=="@"&&(Za="@"+Za),ka=Za??""),Oe=(ve=Oe==null?void 0:Oe.filter(kl=>(kl==null?void 0:kl[0])==="$"))==null?void 0:ve[0],((B=he.analyzeSplitToContent(Oe,"}"))==null?void 0:B.length)>1&&((W=(ce=he.analyzeSplitToContent(Oe,"}"))==null?void 0:ce[1])==null?void 0:W[0])==="("&&(Za=(Se=he.analyzeSplitToContent(Oe,"}"))==null?void 0:Se[1],(Za==null?void 0:Za[0])!=="@"&&(Za="@"+Za),ka!==""&&(ka=ka+","),ka=ka+Za),(Le=Oe==null?void 0:Oe.slice(1,(Oe==null?void 0:Oe.length)-1))!=null&&Le.includes("$")||(Oe=(Fe=he.analyzeSplitToContent(Oe,"}"))==null?void 0:Fe[0]),(Oe==null?void 0:Oe[0])==="$"&&(Oe=(aa=Oe==null?void 0:Oe.replace("{",""))==null?void 0:aa.replace("}",":"),Oe=(Na=Oe==null?void 0:Oe.slice(1,Oe==null?void 0:Oe.length))==null?void 0:Na.replaceAll(":","/")),Oe!=null&&Oe.includes("$")){let kl=(ae=Oe==null?void 0:Oe.split("$"))==null?void 0:ae[0];kl=(ta=kl==null?void 0:kl.split("/"))==null?void 0:ta[0],Oe=kl+"/"+((oe=Oe==null?void 0:Oe.split("$"))==null?void 0:oe[1])+"/"}ze=(Oe==null?void 0:Oe.split("/"))??[];let Ha=(Ee=(ca=Sa==null?void 0:Sa[1])==null?void 0:ca.replace("{",gl))==null?void 0:Ee.split(gl);if((Ue=(Be=(ie=Sa==null?void 0:Sa[1])==null?void 0:ie.split("(@"))==null?void 0:Be[0])!=null&&Ue.includes("&&")||(L=(Ja=(oa=Sa==null?void 0:Sa[1])==null?void 0:oa.split("@"))==null?void 0:Ja[0])!=null&&L.includes("&&")){let kl=(H=Sa==null?void 0:Sa[1])!=null&&H.includes("(@")?(fe=(me=(Z=Sa==null?void 0:Sa[1])==null?void 0:Z.split("(@"))==null?void 0:me[0])==null?void 0:fe.split("&&"):(te=(Qe=(da=Sa==null?void 0:Sa[1])==null?void 0:da.split("@"))==null?void 0:Qe[0])==null?void 0:te.split("&&");ha=kl==null?void 0:kl.map(ja=>{var zl,$l;return(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=($l=(zl=ja==null?void 0:ja.replace("{",gl))==null?void 0:zl.split(gl))==null?void 0:$l[0],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])===":"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(":"),ja});let Fl=[];kl==null||kl.forEach((ja,zl)=>{var $l,Ma;(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=(Ma=($l=ja==null?void 0:ja.replace("{",gl))==null?void 0:$l.split(gl))==null?void 0:Ma[1],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])==="}"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(","),Fl.push(zl===0?(ja==null?void 0:ja.length)-1:ja==null?void 0:ja.length),Va=[...Va,...ja]}),Fl=(pa=he.prefixSum(Fl))==null?void 0:pa.map(ja=>ja==null?void 0:ja.total),ha=ha==null?void 0:ha.map((ja,zl)=>({number:Fl==null?void 0:Fl[zl],contents:ja}))}let xl=Ha==null?void 0:Ha[0];(xl==null?void 0:xl[(xl==null?void 0:xl.length)-1])===":"&&(xl=xl==null?void 0:xl.slice(0,(xl==null?void 0:xl.length)-1)),_e=(xl==null?void 0:xl.split(":"))??[],la=((Da=(Aa=(We=(Ne=Ha==null?void 0:Ha[1])==null?void 0:Ne.replace("}",gl))==null?void 0:We.split(gl))==null?void 0:Aa[0])==null?void 0:Da.split(","))??[];let Yl=(ra=U==null?void 0:U[0])==null?void 0:ra.slice(1,((Ze=U==null?void 0:U[0])==null?void 0:Ze.length)-2);ka&&ka!==""&&(fa=Eo(ka)),(pe=Yl==null?void 0:Yl.split(","))==null||pe.forEach((kl,Fl)=>{var ja,zl,$l,Ma,rl;((ja=he.analyzeSplitToContent(kl,"@"))==null?void 0:ja.length)>1&&(kl=(zl=he.analyzeSplitToContent(kl,"@"))==null?void 0:zl[0],(kl==null?void 0:kl[(kl==null?void 0:kl.length)-1])==="@"&&(kl=kl==null?void 0:kl.slice(0,(kl==null?void 0:kl.length)-1))),r.push({label:kl,prop:kl,align:"center",menus:ze,groups:(ha==null?void 0:ha.length)===0?_e:($l=ha==null?void 0:ha.find(sl=>(sl==null?void 0:sl.number)>=Fl))==null?void 0:$l.contents,words:(Va==null?void 0:Va.length)===0?(Ma=la==null?void 0:la[Fl])==null?void 0:Ma.split(":"):(rl=Va==null?void 0:Va[Fl])==null?void 0:rl.split(":"),formType:(ze==null?void 0:ze.length)>0?"Select":"Input",mainKey:Fl===0,filter:fa,isMainPath:(ha==null?void 0:ha.findIndex(sl=>(sl==null?void 0:sl.number)>=Fl))===0})})}else r.push({label:ue,prop:ue,align:"center"})});else{let ue=(ee=he.analyzeSplitToContent(a,","))==null?void 0:ee.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));ue==null||ue.forEach(Ce=>{r.push(ft(Ce,l))})}return r},Xd=(a,l)=>{var v,p,f,m,k;let r=a;if(!a)return;let n="";((v=he.analyzeSplitToContent(a,"}"))==null?void 0:v.length)>1&&(r=(p=he.analyzeSplitToContent(a,"}"))==null?void 0:p[0],n=(f=he.analyzeSplitToContent(a,"}"))==null?void 0:f[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let t=[],s=[];return t.push({label:"排序",prop:"sort"}),t.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=he.analyzeSplitToContent(r,","))==null||m.forEach(c=>{var D;(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==null?void 0:c[0])==="{"?(D=Co(c,l))==null||D.forEach(V=>{t.push(V)}):t.push(ft(c,l))}),t!=null&&t.some(c=>{var D;return(D=c==null?void 0:c.prop)==null?void 0:D.includes("@")})&&(t=t==null?void 0:t.filter(c=>{var D;return!((D=c==null?void 0:c.prop)!=null&&D.includes("@"))})),n!==""&&((n==null?void 0:n[0])=="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),(k=he.analyzeSplitToContent(n,","))==null||k.forEach(c=>{var D;(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==null?void 0:c[0])==="{"?(D=Co(c,l))==null||D.forEach(V=>{s.push(V)}):s.push(ft(c,l))})),{columns:t,secondColumns:s}},un=a=>{var l,r,n,t,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let v=(r=(l=a==null?void 0:a.replace("(",gl))==null?void 0:l.split(gl))==null?void 0:r[1],p=(t=(n=a==null?void 0:a.replace("(",gl))==null?void 0:n.split(gl))==null?void 0:t[0];return v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1),v=(s=he.analyzeSplitToContent(v,","))==null?void 0:s.map(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)),(f==null?void 0:f[0])==="("&&(f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1)),p+f)),v=v==null?void 0:v.join(","),a!=null&&a.includes("@Quote")&&(v!=null&&v.includes("@QuoteType")||(v=v===""?v+"@QuoteType=Manual":v+",@QuoteType=Manual"),v!=null&&v.includes("@QuoteSonSync")||(v=v===""?v+"@QuoteSonSync=No":v+",@QuoteSonSync=No"),v!=null&&v.includes("@QuoteFatherSync")||(v=v===""?v+"@QuoteFatherSync=Yes":v+",@QuoteFatherSync=Yes")),v}},rs=a=>{let l=a==null?void 0:a.map(r=>{var n,t;return{menus:r==null?void 0:r.menus,content:((n=r==null?void 0:r.menus)==null?void 0:n.join("/"))+gl+((t=r==null?void 0:r.groups)==null?void 0:t.join("/"))}});return l=l==null?void 0:l.filter(r=>{var n;return(r==null?void 0:r.menus)&&((n=r==null?void 0:r.menus)==null?void 0:n.length)>0}),l=l==null?void 0:l.map(r=>r==null?void 0:r.content),l=[...new Set(l)],l=l==null?void 0:l.map(r=>{var n,t;return{menus:(n=r==null?void 0:r.split(gl))==null?void 0:n[0],groups:((t=r==null?void 0:r.split(gl))==null?void 0:t[1])??[]}}),l},ns=a=>{var r;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(r=he.analyzeSplitToContent(l,","))==null?void 0:r.map(n=>((n==null?void 0:n[(n==null?void 0:n.length)-1])===","&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),(n==null?void 0:n[0])!=="@"&&(n="@"+n),n=un(n),n)),l==null?void 0:l.join(",")},ac=(a,l,r="")=>{var j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe;let n=[],t=[],s=[],v="",p="",f="",m=[],k=[],c=[],D="";if(((j=a==null?void 0:a[0])==null?void 0:j[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((S=a==null?void 0:a[0])!=null&&S.includes("$")))return;((w=a==null?void 0:a[0])==null?void 0:w[0])!=="*"&&((b=a==null?void 0:a[0])==null?void 0:b[0])!=="$"&&(v=(g=he.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:g[0],(v==null?void 0:v[0])!=="@"&&(v="@"+v),v=Eo(v),f=(P=he.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:P[1],(f==null?void 0:f[0])==="$"&&(f=f==null?void 0:f.slice(1,f==null?void 0:f.length)),f=f==null?void 0:f.replaceAll(":","/"));let _=he.analyzeSplitToContent(a==null?void 0:a[0],":");if(n=(I=_==null?void 0:_.filter(U=>(U==null?void 0:U[0])!=="{"&&(U==null?void 0:U[0])!=="["))==null?void 0:I.join(""),p=(Y=a==null?void 0:a[0])==null?void 0:Y.replace(n,""),(n==null?void 0:n[0])==="("&&(n=""),D=(le=_==null?void 0:_.filter(U=>(U==null?void 0:U[0])!=="["))==null?void 0:le.join(""),D=(ye=a==null?void 0:a[0])==null?void 0:ye.replace(D,""),p=p==null?void 0:p.replace(D,""),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),((Te=he.analyzeSplitToContent(p,"@"))==null?void 0:Te.length)>1&&(v=(R=he.analyzeSplitToContent(p,"@"))==null?void 0:R[1],(v==null?void 0:v[(v==null?void 0:v.length)-1])===":"&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),v="@"+v,v=un(v),p=(se=he.analyzeSplitToContent(p,"@"))==null?void 0:se[0],p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),((ee=he.analyzeSplitToContent(n,"@"))==null?void 0:ee.length)>1){v!==""&&(v=v+",");let U=(ue=he.analyzeSplitToContent(n,"@"))==null?void 0:ue[1];U="@"+U,U=un(U),v=v+U,n=(Ce=he.analyzeSplitToContent(n,"@"))==null?void 0:Ce[0]}if((n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=n===""?[]:n==null?void 0:n.split(":"),(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),r!==""){let U=(Pe=he.analyzeSplitToContent(r,")"))==null?void 0:Pe[0],q=(ve=he.analyzeSplitToContent(r,"@"))==null?void 0:ve[1];f=(ce=(B=he.analyzeSplitToContent(r,"@"))==null?void 0:B[0])==null?void 0:ce.replace(U,""),(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)),U=ns(U),q=ns(q);let ze=U??"";if(ze!==""&&(ze=ze+","),ze=ze+q,(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])===","&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1)),ze!==""&&v!==""&&(v=v+","),v=v+ze,(f==null?void 0:f[0])==="$"&&(f=f==null?void 0:f.slice(1,f==null?void 0:f.length)),f=(W=he.analyzeSplitToContent(f,":"))==null?void 0:W.filter((_e,la)=>{var fa;return!((_e==null?void 0:_e[0])==="{"&&la===((fa=he.analyzeSplitToContent(f,":"))==null?void 0:fa.length)-1)}),f=f==null?void 0:f.join(""),(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)),v!=null&&v.includes("@Sync")||(v=v===""?v+"@Sync=(Yes,Yes)":v+",@Sync=(Yes,Yes)"),f!=null&&f.includes("$")){let _e=(Le=(Se=f==null?void 0:f.replace("*",gl))==null?void 0:Se.split(gl))==null?void 0:Le[1],la=(aa=(Fe=f==null?void 0:f.replace("*",gl))==null?void 0:Fe.split(gl))==null?void 0:aa[0];la=la==null?void 0:la.split("$"),la=((ae=(Na=la==null?void 0:la[0])==null?void 0:Na.split(":"))==null?void 0:ae[0])+":"+(la==null?void 0:la[1])+":",f=la+"*"+_e}else f=(ta=f==null?void 0:f.replaceAll("{",""))==null?void 0:ta.replaceAll("}","")}v!==""&&v&&(v="("+v+")"),v=f+v,((oe=he.analyzeSplitToContent(p,"}"))==null?void 0:oe.length)>1&&(p=(ca=he.analyzeSplitToContent(p,"}"))==null?void 0:ca.filter(U=>(U==null?void 0:U[0])!=="@"),p=p==null?void 0:p.join(""));let G=Xd(p,l);s=p===""?[]:(G==null?void 0:G.columns)??[],c=he.getColumnChild(s);let M=he.getColumnChild(s);s!=null&&s.some(U=>{var q;return Array.isArray(U==null?void 0:U.children)&&((q=U==null?void 0:U.children)==null?void 0:q.length)>0})&&(s=[s]),t=D?Ci(D):[],!(t!=null&&t.every(U=>Array.isArray(U)))&&(t==null?void 0:t.length)>0&&(t=[t]),(t==null?void 0:t.length)>0&&(Array.isArray(t==null?void 0:t[0])&&((Ee=t==null?void 0:t[0])!=null&&Ee.every(U=>Array.isArray(U)))?t=t==null?void 0:t.map((U,q)=>(U=U.map((ze,_e)=>(ze.unshift("{}"),ze.unshift((_e+1).toString()),ze)),U)):t=t==null?void 0:t.map((U,q)=>(U.unshift("{}"),U.unshift((q+1).toString()),U))),G!=null&&G.secondColumns&&((ie=G==null?void 0:G.secondColumns)==null?void 0:ie.length)>0&&((t==null?void 0:t.length)>0?t=t==null?void 0:t.map((U,q)=>{var ze,_e;return Array.isArray(U==null?void 0:U[0])?U=U==null?void 0:U.map((la,fa)=>{var ka,ha;return la.unshift((ha=(ka=G==null?void 0:G.secondColumns)==null?void 0:ka[fa])==null?void 0:ha.prop),la}):U.unshift((_e=(ze=G==null?void 0:G.secondColumns)==null?void 0:ze[q])==null?void 0:_e.prop),U}):t=(Be=G==null?void 0:G.secondColumns)==null?void 0:Be.map((U,q)=>(U=[U==null?void 0:U.label],U.push(q),U)),s.unshift({label:"",prop:"disabled",sortable:!1})),c=c==null?void 0:c.map(U=>{var q,ze;return{menus:U==null?void 0:U.menus,content:((q=U==null?void 0:U.menus)==null?void 0:q.join("/"))+gl+((ze=U==null?void 0:U.groups)==null?void 0:ze.join("/"))}});let $=[];if(((oa=(Ue=v==null?void 0:v.replace("(",gl))==null?void 0:Ue.split(gl))==null?void 0:oa[0])!==""&&($=(L=(Ja=v==null?void 0:v.replace("(",gl))==null?void 0:Ja.split(gl))==null?void 0:L[0],$=[$],$=$==null?void 0:$.map(U=>{var ze,_e,la;let q=U==null?void 0:U.split("*");return{menus:(ze=q==null?void 0:q[0])==null?void 0:ze.split(":"),content:((_e=q==null?void 0:q[0])==null?void 0:_e.replaceAll(":","/"))+gl+((la=q==null?void 0:q[1])==null?void 0:la.replaceAll(":","/"))}}),c=[...c,...$]),c=c==null?void 0:c.filter(U=>{var q;return(U==null?void 0:U.menus)&&((q=U==null?void 0:U.menus)==null?void 0:q.length)>0}),c=c==null?void 0:c.map(U=>U==null?void 0:U.content),c=[...new Set(c)],c=c==null?void 0:c.map(U=>{var q,ze;return{menus:(q=U==null?void 0:U.split(gl))==null?void 0:q[0],groups:((ze=U==null?void 0:U.split(gl))==null?void 0:ze[1])??[]}}),m=M==null?void 0:M.filter(U=>{var q;return(U==null?void 0:U.filter)&&((q=U==null?void 0:U.filter)==null?void 0:q.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(U=>{var q,ze,_e,la;return(la=(_e=(ze=(q=he.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:q.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:_e[0])==null?void 0:la.includes("Yes")}),m=rs(m)),k=M==null?void 0:M.filter(U=>{var q;return(U==null?void 0:U.filter)&&((q=U==null?void 0:U.filter)==null?void 0:q.includes("@Sync"))}),(k==null?void 0:k.length)>0&&(k=k==null?void 0:k.filter(U=>{var q,ze,_e,la;return(la=(_e=(ze=(q=he.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:q.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:_e[1])==null?void 0:la.includes("Yes")}),k=rs(k)),v!==""&&(v!=null&&v.includes("@Sync"))&&(v==null?void 0:v[0])!=="("){let U=(H=v==null?void 0:v.replace("(",gl))==null?void 0:H.split(gl),q=U==null?void 0:U[1];if(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),q=he.analyzeSplitToContent(q,","),(fe=(me=(Z=q==null?void 0:q.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:Z.split(","))==null?void 0:me[0])!=null&&fe.includes("Yes")){let ze=U==null?void 0:U[0];ze=[{menus:(Qe=(da=ze==null?void 0:ze.split("*"))==null?void 0:da[0])==null?void 0:Qe.replaceAll(":","/"),groups:((pa=(te=ze==null?void 0:ze.split("*"))==null?void 0:te[1])==null?void 0:pa.split(":"))??[]}],m=[...m,...ze]}if((Aa=(We=(Ne=q==null?void 0:q.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:Ne.split(","))==null?void 0:We[1])!=null&&Aa.includes("Yes")){let ze=U==null?void 0:U[0];ze=[{menus:(Ze=(Da=ze==null?void 0:ze.split("*"))==null?void 0:Da[0])==null?void 0:Ze.replaceAll(":","/"),groups:((pe=(ra=ze==null?void 0:ze.split("*"))==null?void 0:ra[1])==null?void 0:pe.split(":"))??[]}],k=[...k,...ze]}}return{groupName:n,tableColumns:s,tableFilter:v,tableContents:t,columns:(G==null?void 0:G.secondColumns)??[],relatedQuotes:c,fatherSyncContents:m,sonSyncContents:k}},lc=(a,l)=>(a=a==null?void 0:a.map((r,n)=>{var t,s,v,p;if(Array.isArray(r))r=r==null?void 0:r.map(f=>{var m,k,c,D;return f!=null&&f.isMainPath||(((m=f==null?void 0:f.children)==null?void 0:m.length)>0?f.children=lc(f.children,l):((k=f==null?void 0:f.menus)==null?void 0:k.length)>0&&!((c=r==null?void 0:r[0])!=null&&c.isMainPath)&&(f.menus=(D=f.menus)==null?void 0:D.map((V,_)=>{var G,M;return((G=f.menus)==null?void 0:G.length)-1===_&&V===""&&(l==null?void 0:l.parentContent)+"/"!==((M=f.menus)==null?void 0:M.join("/"))&&(V=l==null?void 0:l.value),f}),f.bindMenus=f.menus)),f});else{if(n===0&&((t=r.menus)==null?void 0:t.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((s=r.menus)==null?void 0:s.length)>0&&!((v=a==null?void 0:a[0])!=null&&v.isMainPath)&&(r.menus=(p=r.menus)==null?void 0:p.map((f,m)=>{var k,c;return((k=r.menus)==null?void 0:k.length)-1===m&&f===""&&(l==null?void 0:l.parentContent)+"/"!==((c=r.menus)==null?void 0:c.join("/"))&&(f=l==null?void 0:l.value),f}),r.bindMenus=r.menus)}return r}),a),Zd=(a,l)=>(a=a==null?void 0:a.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=lc(r.contents,l)),r)),a),ht=(a,l)=>{let r=a;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(n=>(n=ht(n,l),n)):r=r==null?void 0:r.map(n=>{var t,s;return n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0?n.children=ht(n==null?void 0:n.children,l):n!=null&&n.words&&((s=n==null?void 0:n.words)==null?void 0:s.length)>0&&(l!=null&&l.find(v=>{var p,f,m,k;return((k=(p=n==null?void 0:n.prop)==null?void 0:p.split("."))==null?void 0:k[((m=(f=n==null?void 0:n.prop)==null?void 0:f.split("."))==null?void 0:m.length)-1])===v}))&&(n.mainKey=!0),n}),r};let yr="$R";const Qd=A.useUnit(A.pinia),{selectTitle:Jr}=A.storeToRefs(Qd),vn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1},{key:"@BackGround",value:"onBackGround",order:1}];var ri=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(ri||{});const 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;return l.push({key:"backGround",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},ap=a=>{const l=nc(a==null?void 0:a.filter);return l?ic(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},lp=a=>{const l=nc(a==null?void 0:a.filter);return l?ic(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},rp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const r=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(r)?a==null?void 0:a.filter:r}),l}return a==null?void 0:a.contents},np=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},ip=a=>{var r;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(n=>{var t;return(n==null?void 0:n.key)==="tableContents"&&(n.contents=(t=n.contents)==null?void 0:t.slice(0,parseInt(a==null?void 0:a.filter))),n})},op=async a=>{var l,r,n,t,s,v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(ee=>((ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=he.shuffle(ee.contents)),ee));if((a==null?void 0:a.filter)==="Auto"){let se=(n=(r=a==null?void 0:a.contents)==null?void 0:r.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:n.contents;Array.isArray(se==null?void 0:se[0])&&(se=se==null?void 0:se[0]),se=he.getColumnChild(se);let ee=se==null?void 0:se.filter(Se=>(Se==null?void 0:Se.filter)&&(Se==null?void 0:Se.filter)!==""),ue=new Map,Ce=[];ee==null||ee.forEach(Se=>{var Le,Fe;ue.get((Le=Se==null?void 0:Se.menus)==null?void 0:Le.join("/"))||(ue.set((Fe=Se==null?void 0:Se.menus)==null?void 0:Fe.join("/"),Se),Ce.push(Se))});let Pe=(s=(t=Jr==null?void 0:Jr.value)==null?void 0:t.find(Se=>(Se==null?void 0:Se.condition)==="child"))==null?void 0:s.value,ve=Ce==null?void 0:Ce.map(Se=>{var Le,Fe,aa;return Se=(Le=Se==null?void 0:Se.menus)==null?void 0:Le.join("/"),(Se==null?void 0:Se[(Se==null?void 0:Se.length)-1])==="/"&&((aa=(Fe=Jr==null?void 0:Jr.value)==null?void 0:Fe.find(Na=>(Na==null?void 0:Na.condition)==="child"))==null?void 0:aa.parentContent)+"/"!==Se?Se=Se+Pe:(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}),B=Ce==null?void 0:Ce.map(Se=>Se==null?void 0:Se.groups),ce=ve==null?void 0:ve.map(async Se=>{let Le=await Kr(Se,!1);return{path:Se,contents:Le}});ce=await Promise.all(ce);let W=ce==null?void 0:ce.map((Se,Le)=>{var aa,Na,ae,ta,oe,ca,Ee;let Fe=(aa=Se==null?void 0:Se.contents)==null?void 0:aa.filter(ie=>{var Be,Ue;return(ie==null?void 0:ie.name)===((Ue=B==null?void 0:B[Le])==null?void 0:Ue[((Be=B==null?void 0:B[Le])==null?void 0:Be.length)-1])});return Fe=(ta=(ae=(Na=Fe==null?void 0:Fe[0])==null?void 0:Na.compData)==null?void 0:ae.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:ta.contents,(Se==null?void 0:Se.path)===((ca=(oe=Jr==null?void 0:Jr.value)==null?void 0:oe.find(ie=>(ie==null?void 0:ie.condition)==="child"))==null?void 0:ca.parentContent)&&(Fe=((Ee=Fe==null?void 0:Fe.map(ie=>{for(let Be in ie)if(ie[Be]===Pe)return ie}))==null?void 0:Ee.filter(ie=>ie))??[]),Fe??[]});if(W=W==null?void 0:W.map(Se=>(Se=Se==null?void 0:Se.map(Le=>{var aa;let Fe={};for(let Na in Le)if(ee!=null&&ee.find(ae=>{var ta,oe;return((oe=(ta=ae==null?void 0:ae.words)==null?void 0:ta[0])==null?void 0:oe.replaceAll("'",""))===Na})){let ae=(aa=ee==null?void 0:ee.find(ta=>{var oe,ca;return((ca=(oe=ta==null?void 0:ta.words)==null?void 0:oe[0])==null?void 0:ca.replaceAll("'",""))===Na}))==null?void 0:aa.prop;Fe[ae]=Le==null?void 0:Le[Na]}return Fe}),Se)),W=he.cartesianProduct(W),Array.isArray(W==null?void 0:W[0])&&(W=W==null?void 0:W[0]),(W==null?void 0:W.length)>0&&((c=(p=(v=ee==null?void 0:ee[0])==null?void 0:v.menus)==null?void 0:p.join("/"))==null?void 0:c[((k=(m=(f=ee==null?void 0:ee[0])==null?void 0:f.menus)==null?void 0:m.join("/"))==null?void 0:k.length)-1])==="/")return(D=a==null?void 0:a.contents)==null?void 0:D.map(Le=>{var Fe;return(Le==null?void 0:Le.key)==="tableContents"&&(W==null?void 0:W.length)>0&&(Le.contents=((Fe=Le.contents)==null?void 0:Fe.length)>0?Le.contents:W),Le})}if((a==null?void 0:a.filter)==="Manual"){let se=[],ee=[],ue=(_=(V=a==null?void 0:a.contents)==null?void 0:V.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:_.contents;(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])===")"?ue=(M=(G=ue==null?void 0:ue.replace("(",yr))==null?void 0:G.split(yr))==null?void 0:M[0]:ue="",ue!==""&&(se=((j=($=ue==null?void 0:ue.split("*"))==null?void 0:$[0])==null?void 0:j.split(":"))??[],ee=((g=(b=(w=(S=(E=ue==null?void 0:ue.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",yr))==null?void 0:w.split(yr))==null?void 0:b[0])==null?void 0:g.split(":"))??[]);let Ce=(I=(P=a==null?void 0:a.contents)==null?void 0:P.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:I.contents;Ce=(le=(Y=Ce==null?void 0:Ce.replace("(",yr))==null?void 0:Y.split(yr))==null?void 0:le[1],Ce=Ce==null?void 0:Ce.slice(0,(Ce==null?void 0:Ce.length)-1);let Pe=(ye=a==null?void 0:a.contents)==null?void 0:ye.map(B=>{var ce,W,Se,Le,Fe,aa,Na,ae,ta;return(B==null?void 0:B.key)==="header"&&((ce=B==null?void 0:B.contents)!=null&&ce.every(oe=>(oe==null?void 0:oe.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((W=B==null?void 0:B.contents)==null?void 0:W[0])?B.contents=(Se=B==null?void 0:B.contents)==null?void 0:Se.map((oe,ca)=>{var Ee,ie,Be;return oe!=null&&oe.isMainPath||(ca===0?(oe.mainKey=!0,oe.formType="Select",oe.bindMenus=se,oe.groups=((Ee=oe.groups)==null?void 0:Ee.length)===0?ee:oe.groups,oe.words=((ie=oe.words)==null?void 0:ie.length)===0?[oe==null?void 0:oe.prop]:oe.words,oe.filter=Ce,(!(oe!=null&&oe.menus)||((Be=oe==null?void 0:oe.menus)==null?void 0:Be.length)===0)&&(oe.menus=se)):(oe.mainKey=!1,oe.bindMenus=se)),oe}):Array.isArray((Le=B==null?void 0:B.contents)==null?void 0:Le[0])&&((Na=(aa=(Fe=B==null?void 0:B.contents)==null?void 0:Fe[0])==null?void 0:aa.filter(()=>(se==null?void 0:se.length)>0))==null?void 0:Na.length)>0&&(B.contents[0]=(ta=(ae=B==null?void 0:B.contents)==null?void 0:ae[0])==null?void 0:ta.map((oe,ca)=>{var Ee,ie,Be;return oe!=null&&oe.isMainPath||(ca===0?(oe.mainKey=!0,oe.formType="Select",oe.bindMenus=se,oe.groups=((Ee=oe.groups)==null?void 0:Ee.length)===0?ee:oe.groups,oe.words=((ie=oe.words)==null?void 0:ie.length)===0?[oe==null?void 0:oe.prop]:oe.words,oe.filter=Ce,(!(oe!=null&&oe.menus)||Array.isArray(oe==null?void 0:oe.menus)&&((Be=oe==null?void 0:oe.menus)==null?void 0:Be.length)===0)&&(se==null?void 0:se.length)>0&&(oe.menus=se)):(oe.mainKey=!1,oe.bindMenus=se)),oe}))),B}),ve=(Te=Pe==null?void 0:Pe.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:Te.contents;if(Array.isArray(ve==null?void 0:ve[0])&&(ve=ve==null?void 0:ve[0]),ve=he.getColumnChild(ve),ve!=null&&ve.some(B=>{var ce,W;return((W=B==null?void 0:B.menus)==null?void 0:W[((ce=B==null?void 0:B.menus)==null?void 0:ce.length)-1])===""})){let B=(R=Jr==null?void 0:Jr.value)==null?void 0:R.find(ce=>(ce==null?void 0:ce.condition)==="child");Pe=Zd(Pe,B)}return Pe}return a==null?void 0:a.contents},tp=async a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}return a==null?void 0:a.contents},sp=a=>{var n,t,s,v,p,f,m,k,c,D,V,_;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((t=(n=l==null?void 0:l.replace(":",yr))==null?void 0:n.split(yr))==null?void 0:t[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(p=(v=l==null?void 0:l.split("="))==null?void 0:v[1])!=null&&p.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let G=(f=l==null?void 0:l.split("="))==null?void 0:f[0],M=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(k=M==null?void 0:M.slice(1,M==null?void 0:M.length))!=null&&k.includes("$")&&(M=(V=(D=(c=Jr==null?void 0:Jr.value)==null?void 0:c.filter($=>($==null?void 0:$.condition)==="child"))==null?void 0:D[0])==null?void 0:V.value),l=G+"="+M}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let r=he.calculatorAndToOr(l);if((r==null?void 0:r.length)>0){let G=[];return r==null||r.forEach($=>{let j={};for(let E in $){let S=E;S!=null&&S.includes("[")||(j[S]=$[E])}G.push(j)}),(_=a==null?void 0:a.contents)==null?void 0:_.map($=>{var E,S,w;let j=(S=(E=a==null?void 0:a.contents)==null?void 0:E.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:S.contents;if(j=(w=he.getEqualChild(j))==null?void 0:w.filter(b=>(b==null?void 0:b.label)!=="操作"),($==null?void 0:$.key)==="tableContents"){let g=he.tableToForm($==null?void 0:$.contents,j);G==null||G.forEach(P=>{var I,Y;for(let le in P)!((I=g==null?void 0:g[0])!=null&&I.find(ye=>{var Te;return(ye==null?void 0:ye.key)===le||((Te=ye==null?void 0:ye.key)==null?void 0:Te.includes(le))}))&&!(g!=null&&g.find(ye=>{var Te;return(ye==null?void 0:ye.key)===le||((Te=ye==null?void 0:ye.key)==null?void 0:Te.includes(le))}))||(((Y=P[le])==null?void 0:Y[0])!=="!"?g=g==null?void 0:g.filter(ye=>{var Te,R;return((Te=ye==null?void 0:ye.find(se=>{var ee;return(se==null?void 0:se.key)===le||((ee=se==null?void 0:se.key)==null?void 0:ee.includes(le))}))==null?void 0:Te.value)===P[le]||Array.isArray(P==null?void 0:P[le])&&((R=P==null?void 0:P[le])==null?void 0:R.find(se=>{var ee;return((ee=ye==null?void 0:ye.find(ue=>{var Ce;return(ue==null?void 0:ue.key)===le||((Ce=ue==null?void 0:ue.key)==null?void 0:Ce.includes(le))}))==null?void 0:ee.value)===se}))}):g=g==null?void 0:g.filter(ye=>{var Te;return((Te=ye==null?void 0:ye.find(R=>{var se;return(R==null?void 0:R.key)===le||((se=R==null?void 0:R.key)==null?void 0:se.includes(le))}))==null?void 0:Te.value)!==P[le]}))}),(g==null?void 0:g.length)===0?$.contents=[]:$.contents=g==null?void 0:g.map(P=>{let I={};return P==null||P.forEach(Y=>{I[Y==null?void 0:Y.key]=Y==null?void 0:Y.value}),I})}return $})}return a==null?void 0:a.contents},cp=a=>a==null?void 0:a.contents,up=a=>a==null?void 0:a.contents,dp=a=>{var l,r,n,t;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(n=(r=a==null?void 0:a.filter)==null?void 0:r.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:n.split(",");return(t=a==null?void 0:a.contents)==null?void 0:t.map(p=>((p==null?void 0:p.key)==="header"&&(p.contents=ht(p.contents,s)),p))}return a==null?void 0:a.contents},pp=a=>{var r,n,t,s,v;let l=(a==null?void 0:a.filter)??"";if(l!==""){let p=(n=(r=l==null?void 0:l.replace("(",yr))==null?void 0:r.split(yr))==null?void 0:n[1];p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1),(p==null?void 0:p[(p==null?void 0:p.length)-1])===")"&&(p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1)),p=(t=he.analyzeSplitToContent(p,","))==null?void 0:t.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),c));let f=p==null?void 0:p[0];(f==null?void 0:f[0])==="("&&(f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1));let m=(p==null?void 0:p[1])??"Up",k=(s=a==null?void 0:a.contents)==null?void 0:s.map(c=>{var D,V;return m==="Up"?(c==null?void 0:c.key)==="extraButton"&&(c.contents=(D=f==null?void 0:f.split(","))==null?void 0:D.map(_=>({label:_,prop:_}))):m==="Line"&&(c==null?void 0:c.key)==="rowButton"&&(c.contents=(V=f==null?void 0:f.split(","))==null?void 0:V.map(_=>({label:_,prop:_}))),c});if(m==="Bottom"||m==="Down"){let c=(v=f==null?void 0:f.split(","))==null?void 0:v.map(D=>({label:D,prop:D}));k.push({key:"bottomButton",contents:c})}return k}return a==null?void 0:a.contents},fp=a=>a==null?void 0:a.contents,hp=a=>{var r;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(r=a==null?void 0:a.contents)==null?void 0:r.map(t=>{var s;return(t==null?void 0:t.key)==="rowButton"&&(t.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(v=>({label:v,prop:v}))),t}):a==null?void 0:a.contents},vp=a=>{var r;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let n=a==null?void 0:a.contents,t=(r=l==null?void 0:l.split(","))==null?void 0:r.map(s=>({label:s,prop:s}));return n.push({key:"bottomButton",contents:t}),n}return a==null?void 0:a.contents},mp=a=>{var l;return(a==null?void 0:a.filter)==="Read"?(l=a==null?void 0:a.contents)==null?void 0:l.map(n=>{var t;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(t=n.contents)==null?void 0:t.map(s=>(s.isNoClick=!0,s))),n}):a==null?void 0:a.contents},yp=a=>{var l;if(a!=null&&a.filter){const r=parseInt(a==null?void 0:a.filter);return!r||Number.isNaN(r)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(t=>{var s;return(t==null?void 0:t.key)==="formContent"&&(t.contents=(s=t.contents)==null?void 0:s.map(v=>(v.width=r,v))),t})}return a==null?void 0:a.contents},gp=a=>{var l,r,n,t;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(p=>{var f;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(f=p.contents)==null?void 0:f.map(m=>(m.width=s,m))),p})}if(((n=a==null?void 0:a.filter)==null?void 0:n[0])==="["){let s=Ci(a==null?void 0:a.filter),v=Array.isArray(s)?s.map(f=>parseInt(f)).filter(f=>!!f&&!Number.isNaN(f)):[];return v.length?(t=a==null?void 0:a.contents)==null?void 0:t.map(f=>{if((f==null?void 0:f.key)==="formContent"){const m=f.contents??[];f.contents=m.map((k,c)=>{const D=c+1;let V=0,_=0;for(let M=0;M<v.length;M++){if(_+=v[M],D<=_){V=M;break}M===v.length-1&&(V=v.length-1)}const G=v[V]||v[v.length-1]||1;return k.width=G,k})}return f}):a==null?void 0:a.contents}return a==null?void 0:a.contents},bp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(t=>{var s,v,p;return(t==null?void 0:t.key)==="header"&&(Array.isArray((s=t==null?void 0:t.contents)==null?void 0:s[0])?t.contents[0]=(p=t.contents[0])==null?void 0:p.map(f=>(r!=null&&r.find(m=>m===(f==null?void 0:f.prop))&&(f.fixed="left"),f)):t.contents=(v=t.contents)==null?void 0:v.map(f=>(r!=null&&r.find(m=>m===(f==null?void 0:f.prop))&&(f.fixed="left"),f))),t})}return a==null?void 0:a.contents},kp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const n=s=>(r!=null&&r.find(v=>v===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(v=>n(v))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var v,p,f;return(s==null?void 0:s.key)==="header"&&(Array.isArray((v=s==null?void 0:s.contents)==null?void 0:v[0])?s.contents[0]=(f=s.contents[0])==null?void 0:f.map(m=>n(m)):s.contents=(p=s.contents)==null?void 0:p.map(m=>n(m))),s})}return a==null?void 0:a.contents},xp=async a=>{var n,t,s,v,p,f,m,k,c,D,V,_,G,M,$,j,E;const l=A.useUnit(A.pinia),{chooseTitle:r}=A.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let S=await Kr(((t=(n=r==null?void 0:r.value)==null?void 0:n[0])==null?void 0:t.parentContent)??((v=(s=r==null?void 0:r.value)==null?void 0:s[0])==null?void 0:v.relatedContent),!1),w=(f=(p=r==null?void 0:r.value)==null?void 0:p[0])==null?void 0:f.value;(k=(m=S==null?void 0:S[0])==null?void 0:m.compData)!=null&&k.find(I=>(I==null?void 0:I.key)==="header")?S=(c=S==null?void 0:S[0])==null?void 0:c.compData:S=(V=(D=S==null?void 0:S.filter(I=>{var Y;return(Y=I==null?void 0:I.compData)==null?void 0:Y.find(le=>(le==null?void 0:le.key)==="header")}))==null?void 0:D[0])==null?void 0:V.compData;let b=(_=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:_.contents;Array.isArray(b==null?void 0:b[0])&&(b=b==null?void 0:b[0]),b=((G=b==null?void 0:b.find(I=>I==null?void 0:I.isMainKey))==null?void 0:G.prop)??((M=b==null?void 0:b[0])==null?void 0:M.prop);let g=(j=($=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:$.contents)==null?void 0:j.find(I=>(I==null?void 0:I[b])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map(I=>{var Y;return(I==null?void 0:I.key)==="formContent"&&(I.contents=(Y=I.contents)==null?void 0:Y.map(le=>(le.value=g==null?void 0:g[le==null?void 0:le.prop],le))),I})}return a==null?void 0:a.contents},wp=a=>{var l,r,n,t,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let v=a==null?void 0:a.filter;if(v!=null&&v.includes("*")&&(v="({"+((n=(r=v==null?void 0:v.replace("{",yr))==null?void 0:r.split(yr))==null?void 0:n[1])),v=(t=v==null?void 0:v.replaceAll("{",""))==null?void 0:t.replaceAll("}",""),(v==null?void 0:v[0])!=="("&&(v="("+v+")"),v.slice(1,(v==null?void 0:v.length)-1)==="undefined")return a==null?void 0:a.contents;let p=he.calculatorAndToOr(v),f=p==null?void 0:p[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,k=[];for(let c in f)(f==null?void 0:f[c])===(m==null?void 0:m[c])?k.push(!0):k.push(!1);return k!=null&&k.every(c=>c===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},_p=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},Sp=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},Ep=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},Cp=a=>{var l;if(a!=null&&a.filter){let r=a==null?void 0:a.contents,n=a==null?void 0:a.filter;return(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=(l=he.analyzeSplitToContent(n,","))==null?void 0:l.map(t=>((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)),r.push({key:"stepName",contents:n}),r}return a==null?void 0:a.contents},Dp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},rc={onNumSlice:ip,onRandomContents:op,onConditionContents:sp,onFatherPaceContents:cp,onPaceContents:up,onMainTagContents:dp,onButtonContents:pp,onPamButtonContents:fp,onRowButtonContents:hp,onRelated:xp,onRowNum:gp,onFixRow:bp,onReqItem:kp,onBottomButtonContents:vp,onConditionContent:wp,onTabs:_p,onSinChoice:Sp,onTextSize:rp,onTextRGBA:np,onPosition:ap,onSize:lp,onShowType:Ep,onStepName:Cp,onStep:Dp,onInterfaceTypeContents:tp,onBackGround:ep,onMaxColumn:yp,onEditRead:mp},Np=async(a,l)=>{var s,v,p,f,m,k,c,D,V,_,G,M;let r="";if(((s=a==null?void 0:a.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(v=a==null?void 0:a.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:v.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=(f=(p=r==null?void 0:r.replace("(",yr))==null?void 0:p.split(yr))==null?void 0:f[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let n=(m=he.analyzeSplitToContent(r,","))==null?void 0:m.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$!=null&&$.includes("(")||($=$==null?void 0:$.replaceAll(":","=")),$)),t=a;for(let $ in n){let j,E="";j=(D=(c=(k=n==null?void 0:n[$])==null?void 0:k.replace("=",yr))==null?void 0:c.split(yr))==null?void 0:D[0],E=(G=(_=(V=n==null?void 0:n[$])==null?void 0:V.replace("=",yr))==null?void 0:_.split(yr))==null?void 0:G[1];let S=(M=vn==null?void 0:vn.find(w=>(w==null?void 0:w.key)===j))==null?void 0:M.value;if(S){const w=rc[S];t=await w({contents:t,filter:E})}}return t},Et=async(a,l)=>{var v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I;let r="";if(((v=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:v.contents)!==""&&(r=(p=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:p.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=(m=(f=r==null?void 0:r.replace("(",yr))==null?void 0:f.split(yr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let n=(k=he.analyzeSplitToContent(r,","))==null?void 0:k.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)),t=a,s=new Map;n==null||n.forEach(Y=>{var ye,Te,R;let le=(ye=Y==null?void 0:Y.split("="))==null?void 0:ye[0];if(le==="@MainPam"&&s.get(le)){let se=s.get(le);se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1);let ee=(R=(Te=Y==null?void 0:Y.replace("{",yr))==null?void 0:Te.split(yr))==null?void 0:R[1];ee=se+","+ee,s.set(le,ee)}else le==="@Button"&&s.get(le)?s.set(Y,Y):s.set(le,Y)}),n=Array.from(s.values()),n=n==null?void 0:n.sort((Y,le)=>{var ye,Te;return((ye=vn==null?void 0:vn.find(R=>le==null?void 0:le.includes(R==null?void 0:R.key)))==null?void 0:ye.order)-((Te=vn==null?void 0:vn.find(R=>Y==null?void 0:Y.includes(R==null?void 0:R.key)))==null?void 0:Te.order)});for(let Y in n){let le,ye="";(c=n==null?void 0:n[Y])!=null&&c.includes("(")&&((D=n==null?void 0:n[Y])!=null&&D.includes("@If"))?(le=(G=(_=(V=n==null?void 0:n[Y])==null?void 0:V.replace("(",yr))==null?void 0:_.split(yr))==null?void 0:G[0],ye="("+((j=($=(M=n==null?void 0:n[Y])==null?void 0:M.replace("(",yr))==null?void 0:$.split(yr))==null?void 0:j[1])):(le=(w=(S=(E=n==null?void 0:n[Y])==null?void 0:E.replace("=",yr))==null?void 0:S.split(yr))==null?void 0:w[0],ye=(P=(g=(b=n==null?void 0:n[Y])==null?void 0:b.replace("=",yr))==null?void 0:g.split(yr))==null?void 0:P[1]);let Te=(I=vn==null?void 0:vn.find(R=>(R==null?void 0:R.key)===le))==null?void 0:I.value;if(Te){const R=rc[Te];t=await R({contents:t,filter:ye,extra:l})}}return t},nc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const r=l.slice(1,-1).split(",").map(n=>Number(n.trim()));return r.length<2||r.some(n=>Number.isNaN(n))?null:[r[0],r[1]]},ic=(a,l)=>{var G,M,$,j,E;const r=Array.isArray(a)?a:[],n=r.find(S=>(S==null?void 0:S.key)==="formContent"),t=Array.isArray(n==null?void 0:n.contents)?n.contents:[],s=((G=r.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:G.contents)??{},v=(t==null?void 0:t[0])??{};let p=((M=l==null?void 0:l.position)==null?void 0:M[0])??(s==null?void 0:s._positionStartRow)??(v==null?void 0:v._positionStartRow),f=(($=l==null?void 0:l.position)==null?void 0:$[1])??(s==null?void 0:s._positionRowSpan)??(v==null?void 0:v._positionRowSpan);(!p||Number.isNaN(p)||p<1)&&(p=1),(!f||Number.isNaN(f)||f<1)&&(f=1);let m=((j=l==null?void 0:l.size)==null?void 0:j[0])??(s==null?void 0:s._sizeStart)??(v==null?void 0:v._sizeStart),k=((E=l==null?void 0:l.size)==null?void 0:E[1])??(s==null?void 0:s._sizeEnd)??(v==null?void 0:v._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(k===void 0||Number.isNaN(k))&&(k=1),m=Math.max(0,Math.min(1,m)),k=Math.max(0,Math.min(1,k)),k<=m&&(m=0,k=1);const c=k-m,D=Math.max(1,Math.round(1/c));let V=r.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const w=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:w.map(b=>({...b,width:D,_positionStartRow:p,_positionRowSpan:f,_sizeStart:m,_sizeEnd:k}))}});const _={_positionStartRow:p,_positionRowSpan:f,_sizeStart:m,_sizeEnd:k};return V.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?V=V.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:_}:S):V.push({key:"_gridLayoutMeta",contents:_}),V};let uo="$R";const Bp=A.useUnit(A.pinia),{selectTitle:Tp}=A.storeToRefs(Bp);let Ap=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],zp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Mp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const is=async(a,l,r=!0)=>{let n=[],t=a==null?void 0:a.map(async s=>{var c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl;let v=(_=(V=(D=(c=s==null?void 0:s.contents)==null?void 0:c.find(ga=>{var xa;return(xa=ga==null?void 0:ga.key)==null?void 0:xa.includes("struct")}))==null?void 0:D.value)==null?void 0:V[0])==null?void 0:_.类型,p=Object.values(s==null?void 0:s.name);p=p==null?void 0:p.reverse();let f=(G=s==null?void 0:s.contents)==null?void 0:G.map(ga=>ga==null?void 0:ga.key),m={comp:v,isShow:s==null?void 0:s.is_show,name:p==null?void 0:p[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:f,menuFilter:(M=s==null?void 0:s.filter)==null?void 0:M.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:($=s==null?void 0:s.filter)==null?void 0:$.fatherSyncs,relatedQuotes:(j=s==null?void 0:s.filter)==null?void 0:j.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(S=A.cloneDeep(p))==null?void 0:S.reverse()};for(let ga in p)parseInt(ga)>=1&&(m[`name${parseInt(ga)-1}`]=p[ga]);let k=Array.isArray((w=s==null?void 0:s.filter)==null?void 0:w.menuFilter)?(b=s==null?void 0:s.filter)==null?void 0:b.menuFilter:[];if(((g=k==null?void 0:k.filter(ga=>ga==null?void 0:ga.includes("@Filter")))==null?void 0:g.length)>0){let ga=k==null?void 0:k.filter(Ie=>Ie==null?void 0:Ie.includes("@Filter"));ga=ga==null?void 0:ga[0],ga=(I=(P=ga==null?void 0:ga.replace("(",uo))==null?void 0:P.split(uo))==null?void 0:I[1],ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1),ga!=null&&ga.includes("*")&&(ga=(le=(Y=ga==null?void 0:ga.replace("{",uo))==null?void 0:Y.split(uo))==null?void 0:le[1],ga=ga==null?void 0:ga.replace("}","")),ga=he.calculatorAndToOr(ga);let xa=(l==null?void 0:l.originPath)??"";(xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])==="/"&&(xa=xa==null?void 0:xa.slice(0,(xa==null?void 0:xa.length)-1));let La=await Kr(xa,!1),Ra=(ye=La==null?void 0:La.filter(Ie=>(Ie==null?void 0:Ie.comp)==="Table"))==null?void 0:ye[0];Ra=(R=(Te=Ra==null?void 0:Ra.compData)==null?void 0:Te.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:R.contents;let xe=(ee=(se=Tp.value)==null?void 0:se.find(Ie=>(Ie==null?void 0:Ie.condition)==="child"))==null?void 0:ee.value;Ra=(ue=Ra==null?void 0:Ra.map(Ie=>{for(let de in Ie)if((Ie==null?void 0:Ie[de])===xe)return Ie}))==null?void 0:ue.filter(Ie=>Ie),Ra=Ra==null?void 0:Ra[0],ga=ga==null?void 0:ga[0];let ia=[];for(let Ie in ga){let de="";qa.isObject(Ra)&&(de=(Pe=(Ce=Object.keys(Ra))==null?void 0:Ce.filter(ma=>ma==null?void 0:ma.includes("."+Ie)))==null?void 0:Pe[0]),de!==""&&(Ra!=null&&Ra[de])&&(ga==null?void 0:ga[Ie])===(Ra==null?void 0:Ra[de])||Ra!=null&&Ra[Ie]&&(ga==null?void 0:ga[Ie])===(Ra==null?void 0:Ra[Ie])?ia.push(!0):ia.push(!1)}if(ia!=null&&ia.some(Ie=>Ie===!1)&&((B=l==null?void 0:l.originPath)==null?void 0:B[((ve=l==null?void 0:l.originPath)==null?void 0:ve.length)-1])!=="/")return}if(v==="Table"||v==="Method"){!r&&((ce=m==null?void 0:m.fatherSyncContents)==null?void 0:ce.length)>0;let ga=((W=s==null?void 0:s.contents)==null?void 0:W.find(Je=>{var Xe;return(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.includes("content")}))||[],xa=[];m.comp="Table",ga.value=(Se=ga==null?void 0:ga.value)==null?void 0:Se.sort((Je,Xe)=>parseInt(Je==null?void 0:Je.id)-parseInt(Xe==null?void 0:Xe.id)),ga.value=(Le=ga==null?void 0:ga.value)==null?void 0:Le.map(Je=>{let Xe={};for(let Ke in Je)JSON.stringify(Je==null?void 0:Je[Ke])==="{}"?Xe[Ke]="":Xe[Ke]=Je==null?void 0:Je[Ke];return Xe}),xa.push({key:"tableContents",contents:ga==null?void 0:ga.value});let La=(ta=(ae=(Na=(aa=(Fe=s==null?void 0:s.contents)==null?void 0:Fe.find(Je=>{var Xe;return(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.includes("struct")}))==null?void 0:aa.value)==null?void 0:Na[0])==null?void 0:ae.结构)==null?void 0:ta.contents;Array.isArray(La==null?void 0:La[0])?La[0]=(oe=La==null?void 0:La[0])==null?void 0:oe.filter(Je=>(Je==null?void 0:Je.prop)!=="sort"&&(Je==null?void 0:Je.prop)!=="relatedId"):La=La==null?void 0:La.filter(Je=>(Je==null?void 0:Je.prop)!=="sort"&&(Je==null?void 0:Je.prop)!=="relatedId"),xa.push({key:"header",contents:La}),xa.push({key:"filter",contents:(Ue=(Be=(ie=(Ee=(ca=s==null?void 0:s.contents)==null?void 0:ca.find(Je=>{var Xe;return(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.includes("struct")}))==null?void 0:Ee.value)==null?void 0:ie[0])==null?void 0:Be.引用)==null?void 0:Ue.contents});let Ra=Ap,xe=A.cloneDeep(zp);v==="Method"&&xe.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(La==null?void 0:La[0])&&((oa=La==null?void 0:La[0])==null?void 0:oa.prop)==="disabled"&&(Ra=Mp,xe=Ip);const ia=["推力","真空","压力","温度","流量"],Ie=m.name;Ie&&ia.includes(Ie)&&(Ra=[...Ra],Ra.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let de=[];if(!Array.isArray(La==null?void 0:La[0])&&(La!=null&&La.some(Je=>{var Xe;return(Je==null?void 0:Je.calculatorFilter)&&((Xe=Je==null?void 0:Je.calculatorFilter)==null?void 0:Xe.includes("Manual"))}))){let Je=(Ja=La==null?void 0:La.map(Xe=>Xe==null?void 0:Xe.calculatorFilter))==null?void 0:Ja.filter(Xe=>Xe&&(Xe==null?void 0:Xe.includes("Manual")));Je==null||Je.forEach(Xe=>{var pl;let Ke=he.analyzeSplitToContent(Xe,",");if(Ke=Ke==null?void 0:Ke.map(Ve=>((Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),Ve)),Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Ke==null?void 0:Ke.find(Fa=>Fa==null?void 0:Fa.includes("@FunctionButton"));Ve=(pl=Ve==null?void 0:Ve.split("="))==null?void 0:pl[1],Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=Ve==null?void 0:Ve.split(","),Ve=Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1],de.push(Ve)}}),de=[...new Set(de)],de=de==null?void 0:de.map(Xe=>({label:Xe,prop:Xe,type:"methodButton"}))}else if(Array.isArray(La==null?void 0:La[0])&&((L=he.getColumnChild(La==null?void 0:La[0]))!=null&&L.some(Je=>{var Xe;return(Je==null?void 0:Je.calculatorFilter)&&((Xe=Je==null?void 0:Je.calculatorFilter)==null?void 0:Xe.includes("Manual"))}))){let Je=(Z=(H=he.getColumnChild(La==null?void 0:La[0]))==null?void 0:H.map(Xe=>Xe==null?void 0:Xe.calculatorFilter))==null?void 0:Z.filter(Xe=>Xe&&(Xe==null?void 0:Xe.includes("Manual")));Je==null||Je.forEach(Xe=>{var pl;let Ke=he.analyzeSplitToContent(Xe,",");if(Ke=Ke==null?void 0:Ke.map(Ve=>((Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),Ve)),Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Ke==null?void 0:Ke.find(Fa=>Fa==null?void 0:Fa.includes("@FunctionButton"));Ve=(pl=Ve==null?void 0:Ve.split("="))==null?void 0:pl[1],Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=Ve==null?void 0:Ve.split(","),Ve=Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1],de.push(Ve)}}),de=[...new Set(de)],de=de==null?void 0:de.map(Xe=>({label:Xe,prop:Xe,type:"methodButton"}))}xa.push({key:"extraButton",contents:Ra}),xa.push({key:"rowButton",contents:[...xe,...de]}),m.compData=await Et(xa,l),(me=m.compData)!=null&&me.find(Je=>(Je==null?void 0:Je.key)==="tab")&&(m.tab=(da=(fe=m.compData)==null?void 0:fe.find(Je=>(Je==null?void 0:Je.key)==="tab"))==null?void 0:da.contents),(Qe=m.compData)!=null&&Qe.find(Je=>(Je==null?void 0:Je.key)==="step")&&(m.step=(pa=(te=m.compData)==null?void 0:te.find(Je=>(Je==null?void 0:Je.key)==="step"))==null?void 0:pa.contents),(Ne=m.compData)!=null&&Ne.find(Je=>(Je==null?void 0:Je.key)==="choice")&&(m.choice=(Aa=(We=m.compData)==null?void 0:We.find(Je=>(Je==null?void 0:Je.key)==="choice"))==null?void 0:Aa.contents);let ma="",ya=(Da=m==null?void 0:m.compData)==null?void 0:Da.filter(Je=>(Je==null?void 0:Je.key)==="fixType");(ya==null?void 0:ya.length)>0&&r&&(ma=(Ze=ya==null?void 0:ya[0])==null?void 0:Ze.contents,m.comp=ma)}else if(v==="Form"){let ga=[],xa=(U=(pe=(ra=s==null?void 0:s.contents)==null?void 0:ra.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.key)==null?void 0:de.includes("content")}))==null?void 0:pe.value)==null?void 0:U[0],La=[],Ra=Array.isArray((q=s==null?void 0:s.filter)==null?void 0:q.menuFilter)?(ze=s==null?void 0:s.filter)==null?void 0:ze.menuFilter:[];Ra==null||Ra.forEach(Ie=>{if(Ie!=null&&Ie.includes("@Param(Hide=Yes, prop=")||Ie!=null&&Ie.includes("(Hide=Yes, prop=")){const de=Ie==null?void 0:Ie.match(/prop=([^,)]+)/);de!=null&&de[1]&&La.push(de==null?void 0:de[1])}});let xe=(ha=(ka=(fa=(la=(_e=s==null?void 0:s.contents)==null?void 0:_e.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.key)==null?void 0:de.includes("struct")}))==null?void 0:la.value)==null?void 0:fa[0])==null?void 0:ka.结构)==null?void 0:ha.contents,ia=(Va=xe==null?void 0:xe.map(Ie=>(Ie.value=xa==null?void 0:xa[Ie==null?void 0:Ie.prop],Ie)))==null?void 0:Va.filter(Ie=>(Ie==null?void 0:Ie.prop)!=="sort"&&(Ie==null?void 0:Ie.prop)!=="relatedId");ia=ia==null?void 0:ia.map(Ie=>(La!=null&&La.includes(Ie==null?void 0:Ie.prop)&&(Ie.isHideInForm=!0),Ie)),ga.push({key:"filter",contents:(xl=(Ha=(Za=(Oe=(Sa=s==null?void 0:s.contents)==null?void 0:Sa.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.key)==null?void 0:de.includes("struct")}))==null?void 0:Oe.value)==null?void 0:Za[0])==null?void 0:Ha.引用)==null?void 0:xl.contents}),ga.push({key:"formContent",contents:ia}),ga.push({key:"paramHideProps",contents:La}),m.compData=await Np(ga),(Yl=m.compData)!=null&&Yl.find(Ie=>(Ie==null?void 0:Ie.key)==="tab")&&(m.tab=(Fl=(kl=m.compData)==null?void 0:kl.find(Ie=>(Ie==null?void 0:Ie.key)==="tab"))==null?void 0:Fl.contents),(ja=m.compData)!=null&&ja.find(Ie=>(Ie==null?void 0:Ie.key)==="step")&&(m.step=($l=(zl=m.compData)==null?void 0:zl.find(Ie=>(Ie==null?void 0:Ie.key)==="step"))==null?void 0:$l.contents),(Ma=m.compData)!=null&&Ma.find(Ie=>(Ie==null?void 0:Ie.key)==="choice")&&(m.choice=(sl=(rl=m.compData)==null?void 0:rl.find(Ie=>(Ie==null?void 0:Ie.key)==="choice"))==null?void 0:sl.contents)}return m});return n=await Promise.all(t),n},Op=A.useLoginState(A.pinia),{loginUserInfo:xi}=A.storeToRefs(Op),vt=async(a,l,r="Manual",n=[])=>{var f;let t=a,s;Array.isArray(l==null?void 0:l[0])?s=he.getColumnChild(l==null?void 0:l[0]):s=l;let v=(f=s==null?void 0:s.filter(m=>{var k;return(m==null?void 0:m.calculatorFilter)&&((k=m==null?void 0:m.calculatorFilter)==null?void 0:k.includes(r))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:f.map(m=>({prop:m==null?void 0:m.prop,label:m==null?void 0:m.label,methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),p=t==null?void 0:t.map(async m=>(m=await Pp(m,v,s,r,t,n),m));return p=await Promise.all(p),p},Lp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(v=>{var p;if(l!=null&&l[v]){let f=l==null?void 0:l[v];s=s?f?Bl.isEqual(f.toString(),s.toString()):void 0:f}else{let f=(p=t==null?void 0:t.find(k=>(k==null?void 0:k.label)===v))==null?void 0:p.prop,m=(l==null?void 0:l[f])??0;s=s?m?Bl.isEqual(m.toString(),s.toString()):void 0:m}}),l[n]=s===void 0?void 0:s?1:0,l},br=a=>{const[l,r,n]=A.cloneDeep(a).split(":").map(Number);let t=+a;return!a||!(a!=null&&a.includes(":"))?t:(l??0)*3600+(r??0)*60+(n??0)},jn=a=>{const l=s=>s.toString().padStart(2,"0"),r=Math.floor(a/3600),n=Math.floor(a%3600/60),t=a%60;return`${l(r)}:${l(n)}:${parseInt(l(t))}`},$p=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,V,_,G,M,$;if(l!=null&&l[f]){if(s==="Row")if(!((k=((m=l==null?void 0:l[f])==null?void 0:m.toString())??"")!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let j=+(l==null?void 0:l[f]);p=p+j}else p=br(p.toString())+br((D=l==null?void 0:l[f])==null?void 0:D.toString()),p=jn(p)}else if(s==="Row"){let j=(V=t==null?void 0:t.find(E=>(E==null?void 0:E.label)===f))==null?void 0:V.prop;if(!((G=Number.isNaN(l==null?void 0:l[j])?"":(_=l==null?void 0:l[j])==null?void 0:_.toString())!=null&&G.includes(":"))&&!((M=p==null?void 0:p.toString())!=null&&M.includes(":"))){let E=+((l==null?void 0:l[j])??0);p=p+E}else p=br(p==null?void 0:p.toString())+br(($=(l==null?void 0:l[j])??0)==null?void 0:$.toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c+D},0)}return l[n]=p,l},Rp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,V,_,G;if(l!=null&&l[f]){if(s==="Row")if(!((k=(m=l==null?void 0:l[f])==null?void 0:m.toString())!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let M=+(l==null?void 0:l[f]);p=p===0?p+M:p-M}else p=p===0?br(p.toString())+br(l==null?void 0:l[f].toString()):br(p.toString())-br(l==null?void 0:l[f].toString()),p=jn(p)}else if(s==="Row"){let M=(D=t==null?void 0:t.find($=>($==null?void 0:$.label)===f))==null?void 0:D.prop;if(!((_=Number.isNaN(l==null?void 0:l[M])?"":(V=l==null?void 0:l[M])==null?void 0:V.toString())!=null&&_.includes(":"))&&!((G=p==null?void 0:p.toString())!=null&&G.includes(":"))){let $=+((l==null?void 0:l[M])??0);p=p===0?p+$:p-$}else p=p===0?br(p.toString())+br(((l==null?void 0:l[M])??0).toString()):br(p.toString())-br(((l==null?void 0:l[M])??0).toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c-D},0)}return l[n]=p,l},Vp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,V,_,G;if(l!=null&&l[f]){if(s==="Row")if(!((k=(m=l==null?void 0:l[f])==null?void 0:m.toString())!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let M=+(l==null?void 0:l[f]);p=p===0?p+M:p*M}else p=p===0?br(p.toString())+br(l==null?void 0:l[f].toString()):br(p.toString())*br(l==null?void 0:l[f].toString()),p=jn(p)}else if(s==="Row"){let M=(D=t==null?void 0:t.find($=>($==null?void 0:$.label)===f))==null?void 0:D.prop;if(!(l!=null&&l[M]))p=void 0;else if(!((_=Number.isNaN(l==null?void 0:l[M])?"":(V=l==null?void 0:l[M])==null?void 0:V.toString())!=null&&_.includes(":"))&&!((G=p==null?void 0:p.toString())!=null&&G.includes(":"))){let $=+((l==null?void 0:l[M])??0);p=p===0?p+$:p*$}else p=p===0?br(p.toString())+br(((l==null?void 0:l[M])??0).toString()):br(p.toString())*br(((l==null?void 0:l[M])??0).toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c*D},0)}return l[n]=p,l},Fp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,V,_,G;if(l!=null&&l[f]){if(s==="Row")if(!((k=(m=l==null?void 0:l[f])==null?void 0:m.toString())!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let M=+(l==null?void 0:l[f]);p=p===0?p+M:p/M}else p=p===0?br(p.toString())+br(l==null?void 0:l[f].toString()):br(p.toString())/br(l==null?void 0:l[f].toString()),p=jn(p)}else if(s==="Row"){let M=(D=t==null?void 0:t.find($=>($==null?void 0:$.label)===f))==null?void 0:D.prop;if(!((_=Number.isNaN(l==null?void 0:l[M])?"":(V=l==null?void 0:l[M])==null?void 0:V.toString())!=null&&_.includes(":"))&&!((G=p==null?void 0:p.toString())!=null&&G.includes(":"))){let $=+((l==null?void 0:l[M])??0);p=p===0?p+$:p/$}else p=p===0?br(p.toString())+br(((l==null?void 0:l[M])??0).toString()):br(p.toString())/br(((l==null?void 0:l[M])??0).toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c/D},0)}return l[n]=p.toFixed(2),l},po={Sum:$p,Substract:Rp,Multiple:Vp,Divide:Fp,Compare:Lp},Pp=async(a,l,r,n="Auto",t,s=[])=>{var k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R;let v=a,p=[],f=await A.getPageDataApi({platId:parseInt((k=xi==null?void 0:xi.value)==null?void 0:k.plat_id),pageName:"menu"});f=(V=(D=(c=f==null?void 0:f.data)==null?void 0:c.result)==null?void 0:D.filter(se=>(se==null?void 0:se.property_name)===""))==null?void 0:V[0];let m=[];if(f!=null&&f.object_name){f=f==null?void 0:f.object_name;let se=await A.getPageDataApi({platId:parseInt((_=xi==null?void 0:xi.value)==null?void 0:_.plat_id),pageName:f});se=(E=(j=($=(M=(G=se==null?void 0:se.data)==null?void 0:G.result)==null?void 0:M[0])==null?void 0:$.contents)==null?void 0:j.find(ee=>{var ue;return(ue=ee==null?void 0:ee.key)==null?void 0:ue.includes("content")}))==null?void 0:E.value,p=(S=se==null?void 0:se.map(ee=>({functionName:ee==null?void 0:ee.函数名称,functionContent:ee==null?void 0:ee.输出值})))==null?void 0:S.filter(ee=>(ee==null?void 0:ee.functionContent)!==""),p==null||p.forEach(ee=>{m.push(ee.functionName),po[ee.functionName]=new Function("return "+ee.functionContent)()})}if((l==null?void 0:l.length)===0)return v;for(let se in l){let ee=(w=l==null?void 0:l[se])==null?void 0:w.functionName;const ue=po==null?void 0:po[ee];let Ce=(b=l==null?void 0:l[se])==null?void 0:b.methods;if(Ce=he.analyzeSplitToContent(Ce,","),console.log(Ce),(g=Ce==null?void 0:Ce.find(Pe=>Pe==null?void 0:Pe.includes("@FunctionType")))!=null&&g.includes(n)||(Ce==null?void 0:Ce.length)===0){let Pe=((Y=(I=(P=Ce==null?void 0:Ce.find(ve=>ve==null?void 0:ve.includes("@FunctionExtent")))==null?void 0:P.replace(":","="))==null?void 0:I.split("="))==null?void 0:Y[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(ve=>ve===ee)){let ve="";try{let ce=(le=l==null?void 0:l[se])==null?void 0:le.functionRelatedWords,W=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Le=>{var Fe;return Le==null?void 0:Le[(Fe=l==null?void 0:l[se])==null?void 0:Fe.prop]}):["0"];W=W==null?void 0:W.map(Le=>Le==null?void 0:Le.slice((Le==null?void 0:Le.length)-5,Le==null?void 0:Le.length)),W=W==null?void 0:W.map(Le=>he.isNumber(parseInt(Le))&&parseInt(Le)?parseInt(Le):0);let Se=Math.max(...W);ce=ce==null?void 0:ce.map(Le=>{if(Le!=null&&Le.includes("'"))return Le==null?void 0:Le.replaceAll("'","");if(Le!=null&&Le.includes("@"))return Se+1;{let Fe=Object.keys(v);return Le=(v==null?void 0:v[Le])??(v==null?void 0:v[Fe==null?void 0:Fe.find(aa=>aa==null?void 0:aa.includes("."+Le))]),Le}}),ve=ue(...ce)}catch(ce){qa.ElMessage.warning("关联数据出现错误,"+ce.message)}let B=(ye=l==null?void 0:l[se])==null?void 0:ye.prop;v[B]=ve}else v=ue({contents:v,valueString:(Te=l==null?void 0:l[se])==null?void 0:Te.functionRelatedWords,prop:(R=l==null?void 0:l[se])==null?void 0:R.prop,headers:r,typeString:Pe,allContents:t})}}return v},jp=A.useLoginState(A.pinia),{loginUserInfo:Xr}=A.storeToRefs(jp),Hp=A.useMenuState(A.pinia),{activeMenuPath:os,currentMenuPath:fo}=A.storeToRefs(Hp),oc=A.useUnit(A.pinia);let ts="$R";const{selectTitle:Si}=A.storeToRefs(oc),tc=async(a,l)=>{var v,p,f,m,k,c,D,V,_,G,M,$,j;let r=os.value,n="",t=((v=Si==null?void 0:Si.value)==null?void 0:v.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(r=l?r:(p=a==null?void 0:a[0])==null?void 0:p.object_name,n=(f=a==null?void 0:a[0])==null?void 0:f.father_name);let s=[];if(n!==""){let E=n;(E==null?void 0:E[(E==null?void 0:E.length)-1])==="/"&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1));let S=await Kr(E,!1);S=(m=S==null?void 0:S[0])==null?void 0:m.compData;let w=(k=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:k.contents;w=((c=w==null?void 0:w.find(g=>g==null?void 0:g.isMainKey))==null?void 0:c.prop)??((D=w==null?void 0:w[0])==null?void 0:D.prop);let b=(_=(V=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:V.contents)==null?void 0:_.map(g=>({label:g==null?void 0:g[w],value:g==null?void 0:g[w]}));s=(G=n==null?void 0:n.split("/"))==null?void 0:G.map(g=>(g===""?t?(t.isShow=!0,g=t):g={value:g,condition:"child",options:b,parentContent:(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"?n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1):n,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(r!==""){let E=(M=r==null?void 0:r.split("/"))==null?void 0:M.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));(($=E==null?void 0:E[0])==null?void 0:$.value)===((j=s==null?void 0:s[0])==null?void 0:j.value)&&(E=E==null?void 0:E.filter((S,w)=>w!==0)),s=[...s??[],...E??[]]}n===""&&t&&((t==null?void 0:t.parentContent)!==os.value&&(t.isShow=!1),(t==null?void 0:t.value)!==""&&s.push(t)),oc.setSelectTitle(s)},Up=async a=>{var s,v,p,f,m,k,c,D,V;let l=await A.getPageDataApi({platId:parseInt((s=Xr==null?void 0:Xr.value)==null?void 0:s.plat_id),pageName:"menu"}),r=(v=l==null?void 0:l.data)==null?void 0:v.result,n=(k=(m=(f=(p=a==null?void 0:a.filter(_=>(_==null?void 0:_.comp)==="Table"))==null?void 0:p[0])==null?void 0:f.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="filter"))==null?void 0:k.contents;n=(V=(D=(c=n==null?void 0:n.replace("(",ts))==null?void 0:c.split(ts))==null?void 0:D[0])==null?void 0:V.replaceAll(":","/");let t=r==null?void 0:r.filter(_=>{var G;return(_==null?void 0:_.object_name)===fo.value+"/"||((G=fo.value)==null?void 0:G.includes(n))&&n+"/"===(_==null?void 0:_.object_name)});return(t==null?void 0:t.length)>0&&(a=a==null?void 0:a.map(_=>{var G;return(_==null?void 0:_.comp)==="Table"&&(_.compData=(G=_==null?void 0:_.compData)==null?void 0:G.map(M=>{var $,j,E;return(M==null?void 0:M.key)==="header"&&(Array.isArray(($=M.contents)==null?void 0:$[0])?M.contents[0]=(E=M.contents[0])==null?void 0:E.map((S,w)=>{var b;return w===0&&(S.isExistChild=!0,(b=fo.value)!=null&&b.includes(n)&&(S.fatherPath=n)),S}):M.contents=(j=M.contents)==null?void 0:j.map((S,w)=>{var b;return w===0&&(S.isExistChild=!0,(b=fo.value)!=null&&b.includes(n)&&(S.fatherPath=n)),S})),M})),_})),a},Kr=async(a,l,r={})=>{var v,p,f,m,k,c,D,V,_,G,M,$;let n=await A.getPageDataApi({platId:parseInt((v=Xr==null?void 0:Xr.value)==null?void 0:v.plat_id),pageName:a}),t=(p=n==null?void 0:n.data)==null?void 0:p.result;if((t==null?void 0:t.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==a){let j=await A.getPageDataApi({platId:parseInt((f=Xr==null?void 0:Xr.value)==null?void 0:f.plat_id),pageName:r==null?void 0:r.originPath});if(((k=(m=j==null?void 0:j.data)==null?void 0:m.result)==null?void 0:k.length)>0){let E=await is((c=j==null?void 0:j.data)==null?void 0:c.result,r,!1);E=E==null?void 0:E.map(async b=>{var I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja;let g=[],P=(I=Object.keys(b))==null?void 0:I.filter(L=>(L==null?void 0:L.includes("name"))&&L!=="nameContents");for(let L in b)P!=null&&P.find(H=>H===L)&&g.push(b==null?void 0:b[L]);if(g=g.reverse(),(b==null?void 0:b.comp)==="Table"){let L=(ye=(le=(Y=b==null?void 0:b.compData)==null?void 0:Y.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:le.contents)==null?void 0:ye.map(Z=>{let me={};for(let fe in Z)fe!=="id"&&fe!=="create_time"&&fe!=="update_time"&&fe!=="sort"&&fe!=="create_user_id"&&fe!=="update_user_id"&&fe!=="department_id"&&fe!=="relatedId"&&(me[fe]=Z==null?void 0:Z[fe]);return Z=Object.values(me),Z}),H=(R=(Te=b==null?void 0:b.compData)==null?void 0:Te.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:R.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(se=H[0])!=null&&se.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(H[0]=(ee=H[0])==null?void 0:ee.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(H=H==null?void 0:H.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(Z=>{var me;return(Z==null?void 0:Z.calculatorFilter)&&((me=Z==null?void 0:Z.calculatorFilter)==null?void 0:me.includes("Auto"))})&&(L=await vt(L,H,"Auto"),L=L==null?void 0:L.map(Z=>Object.values(Z))),b!=null&&b.fatherSyncContents){Array.isArray((ue=b==null?void 0:b.fatherSyncContents)==null?void 0:ue[0])&&(b.fatherSyncContents=(Ce=b==null?void 0:b.fatherSyncContents)==null?void 0:Ce[0]);let Z=(Pe=Si.value)==null?void 0:Pe.find(me=>(me==null?void 0:me.condition)==="child");b.fatherSyncContents=(ve=b==null?void 0:b.fatherSyncContents)==null?void 0:ve.map(me=>{var fe,da,Qe,te,pa,Ne;return((da=me==null?void 0:me.menus)==null?void 0:da[((fe=me==null?void 0:me.menus)==null?void 0:fe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(me==null?void 0:me.menus)?me.menus=(me==null?void 0:me.menus)+(Z==null?void 0:Z.value):((te=me==null?void 0:me.menus)==null?void 0:te[((Qe=me==null?void 0:me.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(me==null?void 0:me.menus)&&(me.menus=(Ne=me.menus)==null?void 0:Ne.slice(0,((pa=me.menus)==null?void 0:pa.length)-1)),me})}if(b!=null&&b.sonSyncContents){Array.isArray((B=b==null?void 0:b.sonSyncContents)==null?void 0:B[0])&&(b.sonSyncContents=(ce=b==null?void 0:b.sonSyncContents)==null?void 0:ce[0]);let Z=(W=Si.value)==null?void 0:W.find(me=>(me==null?void 0:me.condition)==="child");b.sonSyncContents=(Se=b==null?void 0:b.sonSyncContents)==null?void 0:Se.map(me=>{var fe,da,Qe,te,pa,Ne;return((da=me==null?void 0:me.menus)==null?void 0:da[((fe=me==null?void 0:me.menus)==null?void 0:fe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(me==null?void 0:me.menus)?me.menus=(me==null?void 0:me.menus)+(Z==null?void 0:Z.value):((te=me==null?void 0:me.menus)==null?void 0:te[((Qe=me==null?void 0:me.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(me==null?void 0:me.menus)&&(me.menus=(Ne=me.menus)==null?void 0:Ne.slice(0,((pa=me.menus)==null?void 0:pa.length)-1)),me})}if(b!=null&&b.relatedQuotes){Array.isArray((Le=b==null?void 0:b.relatedQuotes)==null?void 0:Le[0])&&(b.relatedQuotes=(Fe=b==null?void 0:b.relatedQuotes)==null?void 0:Fe[0]);let Z=(aa=Si.value)==null?void 0:aa.find(me=>(me==null?void 0:me.condition)==="child");b.relatedQuotes=(Na=b==null?void 0:b.relatedQuotes)==null?void 0:Na.map(me=>{var fe,da,Qe,te,pa,Ne;return((da=me==null?void 0:me.menus)==null?void 0:da[((fe=me==null?void 0:me.menus)==null?void 0:fe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(me==null?void 0:me.menus)?me.menus=(me==null?void 0:me.menus)+(Z==null?void 0:Z.value):((te=me==null?void 0:me.menus)==null?void 0:te[((Qe=me==null?void 0:me.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(me==null?void 0:me.menus)&&(me.menus=(Ne=me.menus)==null?void 0:Ne.slice(0,((pa=me.menus)==null?void 0:pa.length)-1)),me})}b={filter:(ta=(ae=b==null?void 0:b.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:ta.contents,key:b==null?void 0:b.comp,name:g,tableColumns:H,tableContents:L,menuFilter:b==null?void 0:b.menuFilter,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents}}else{let L=(Ee=(ca=(oe=b==null?void 0:b.compData)==null?void 0:oe.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:ca.contents)==null?void 0:Ee.map(Z=>(Z==null?void 0:Z.value)??"");L=[L];let H=(Ue=(Be=(ie=b==null?void 0:b.compData)==null?void 0:ie.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:Be.contents)==null?void 0:Ue.map(Z=>(Z.value="",Z));b={contents:L,filter:(Ja=(oa=b==null?void 0:b.compData)==null?void 0:oa.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:Ja.contents,key:b==null?void 0:b.comp,name:g,value:H,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents}}return b.isShow=!1,b}),E=await Promise.all(E);let S=[{key:"menuPath",contents:[{path:a,fatherPath:(_=(V=(D=j==null?void 0:j.data)==null?void 0:D.result)==null?void 0:V[0])==null?void 0:_.father_name,isShow:!1}]},{key:a,contents:E}];await A.createPlatFormDataApi({platId:parseInt((G=Xr==null?void 0:Xr.value)==null?void 0:G.plat_id),changeData:S});let w=await A.getPageDataApi({platId:parseInt((M=Xr==null?void 0:Xr.value)==null?void 0:M.plat_id),pageName:a});t=($=w==null?void 0:w.data)==null?void 0:$.result}}l&&await tc(t,!!(r!=null&&r.originPath));let s=await is(t,r);return l&&(s=await Up(s)),s==null?void 0:s.filter(j=>j)},ss=async a=>{var n,t,s,v,p,f,m,k,c,D,V;let l=(n=a==null?void 0:a.menus)==null?void 0:n.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(t=a.value)==null?void 0:t.split(" "))==null?void 0:s[0]));let r=await Kr(l,!1);if(r=(v=r==null?void 0:r.filter(_=>{var G,M;return(_==null?void 0:_.name)===((M=a==null?void 0:a.groups)==null?void 0:M[((G=a==null?void 0:a.groups)==null?void 0:G.length)-1])}))==null?void 0:v[0],(f=(p=r==null?void 0:r.compData)==null?void 0:p.find(_=>(_==null?void 0:_.key)==="tableContents"))!=null&&f.contents){r=(k=(m=r==null?void 0:r.compData)==null?void 0:m.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:k.contents;let _=((c=a==null?void 0:a.words)==null?void 0:c[0])??(a==null?void 0:a.prop);return r=r==null?void 0:r.filter(G=>{var M,$,j,E;return(G==null?void 0:G[a!=null&&a.endChildMenu?_:(M=a==null?void 0:a.words)==null?void 0:M[0]])===(a!=null&&a.relatedWords&&(($=a==null?void 0:a.relatedWords)==null?void 0:$.length)>0?(E=(j=a.value)==null?void 0:j.split(" "))==null?void 0:E[0]:a.value)}),r==null?void 0:r[0]}else{let _=(V=(D=r==null?void 0:r.compData)==null?void 0:D.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:V.contents,G={};return _==null||_.forEach(M=>{G[M.prop]=M.value}),G}},qp={key:0,class:"extra-button-content"},Wp={class:"table-operator-wrap"},Kp={key:0,class:"extra-button-filter"},Gp={key:1,class:"extra-header"},Yp=["onClick"],Jp={class:"table-op-text"},Xp={class:"table-op-text"},Zp={class:"drop-menu",style:{width:"120px"}},Qp=["onClick"],ef={key:0},af={key:1},lf=["onClick"],rf={class:"table-op-text"},nf={key:1,class:"extra-button-content tabs-button-wrapper"},of={class:"table-operator-wrap"},tf={class:"extra-button-filter"},sf={key:0,class:"extra-header"},cf={class:"table-op-action"},uf={class:"table-op-text"},df={class:"drop-menu",style:{width:"120px"}},pf={key:0},ff={key:1},hf=["onClick"],vf={class:"table-op-text"},mf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const r=l,n=a,t=()=>{const P=(n==null?void 0:n.menuFilter)||[];return Array.isArray(P)&&(P==null?void 0:P.some(I=>{const Y=typeof I=="string"?I:JSON.stringify(I);return Y==null?void 0:Y.includes("HideGroup=Yes")}))},s=e.ref(""),v=e.ref(!1),p=e.ref(!1),f=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),k=[{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 c(P,I){return P.map(Y=>{const le={...Y};return I.forEach(ye=>{delete le[ye]}),le})}function D(P){if(!P||P.t!=="n")return(P==null?void 0:P.v)??"";const I=P.v;if(P.z){const Y=String(P.z).toLowerCase(),le=["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 R of le)if(Y.includes(R))return V(I);const ye=/[ymdhms]/.test(Y),Te=/^[0#\.\,\s]+$/.test(Y.replace(/[\\\/\-:]/g,""));if(ye&&!Te)return V(I)}if(I>=1&&I<=73050){if(I<5e3)return I;if(I>=5e3&&I<4e4){const Y=Math.floor((I-25569)/365.25)+1970;return Y>=1970&&Y<=2e3&&P.z&&/[ymd]/.test(String(P.z).toLowerCase())?V(I):I}if(I>=4e4)return V(I)}return I}function V(P){if(typeof P!="number")return P;try{const I=new Date((P-25569)*86400*1e3);if(isNaN(I.getTime()))return P;const Y=I.getFullYear(),le=String(I.getMonth()+1).padStart(2,"0"),ye=String(I.getDate()).padStart(2,"0");return`${Y}-${le}-${ye}`}catch{return P}}const _=P=>{const I=P.raw;if(!I)return;const Y=new FileReader;Y.onload=le=>{try{const ye=new Uint8Array(le.target.result),Te=he.readSync(ye,{type:"array"}),R=Te.SheetNames[0],se=Te.Sheets[R],ue=he.utils.decode_range(se["!ref"]).e.c+1,Ce=new Array(ue).fill(""),Pe=[];for(const Se in se){if(Se[0]==="!")continue;const{r:Le,c:Fe}=he.utils.decode_cell(Se),aa=se[Se];let Na=D(aa);if((Na==null||Na==="")&&(Na=""),Le===0)Ce[Fe]=Na;else{if(!Pe[Le-1]){Pe[Le-1]={};for(let ae=0;ae<ue;ae++)Pe[Le-1][`col_${ae}`]=""}Pe[Le-1][`col_${Fe}`]=Na}}for(let Se=0;Se<ue;Se++)Ce[Se]===void 0&&(Ce[Se]="");const ve=[];for(let Se=0;Se<Ce.length;Se++)(!Ce[Se]||Ce[Se].toString().trim()==="")&&ve.push(Se);let B,ce;(ve==null?void 0:ve.length)>0?(qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),B=Ce.filter((Se,Le)=>!ve.includes(Le)),ce=c(Pe,ve==null?void 0:ve.map(Se=>`col_${Se}`))):(B=Ce,ce=Pe);const W=Pe==null?void 0:Pe[0];if(!(W!=null&&W.hasOwnProperty("col_0")))return qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",B,ce)}catch(ye){throw qa.ElMessage.error(ye.message),new Error(ye.message)}},Y.readAsArrayBuffer(I)},G=P=>{var Y;const I=(Y=f.value)==null?void 0:Y.reduce((le,ye,Te)=>(Te===0?le[ye.label]=P:le[ye.label]=ye==null?void 0:ye.value,le),{});r("filter",I,P,!0)},M=(P,I={})=>{r("buttonClick",P,"",I)},$=P=>{var I,Y;f.value=(Y=(I=he.getColumnChild(A.cloneDeep(P)))==null?void 0:I.filter(le=>(le==null?void 0:le.label)!==""&&(le==null?void 0:le.label)!=="操作"))==null?void 0:Y.map(le=>({label:(le==null?void 0:le.label)??"",value:"",name:(le==null?void 0:le.prop)??"",isFormColHidden:le==null?void 0:le.isTableColHidden,width:2,prop:(le==null?void 0:le.prop)??""}))},j=e.ref(!1),E=P=>{var I;if((P==null?void 0:P.buttonName)==="确认"&&(r("filter",P==null?void 0:P.content),j.value=(P==null?void 0:P.content)&&Object.values(P==null?void 0:P.content).length>0),(P==null?void 0:P.buttonName)==="清空"){const Y=A.cloneDeep(P==null?void 0:P.content);for(const le in Y)Y[le]="";f.value=(I=f.value)==null?void 0:I.map(le=>({...le,value:""})),r("filter",Y),j.value=!1}v.value=!1},S=()=>{v.value=!v.value,p.value=!0},w=()=>{var I,Y;f.value=(I=f.value)==null?void 0:I.map(le=>({...le,value:""}));const P=(Y=f.value)==null?void 0:Y.reduce((le,ye)=>(le[ye.label]=ye.value,le),{});r("filter",P)},b=e.ref(null);let g;return g=P=>{var ye;if(!v.value)return;const I=(ye=b==null?void 0:b.value)==null?void 0:ye.$el,Y=I==null?void 0:I.contains(P.target);let le=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Te=>{Te.contains(P.target)&&(le=!0)}),!Y&&!le&&(v.value=!1)},e.onMounted(()=>{document.addEventListener("click",g),$(n.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",g)}),e.watch(()=>n.columns,()=>{$(n.columns)},{deep:!0,immediate:!0}),(P,I)=>{var se,ee,ue,Ce,Pe,ve,B,ce;const Y=e.resolveComponent("el-icon"),le=e.resolveComponent("svg-icon"),ye=e.resolveComponent("el-input"),Te=e.resolveComponent("el-upload"),R=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",qp,[t()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(n==null?void 0:n.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((n==null?void 0:n.level)-1)*12+"px",fontWeight:600-((n==null?void 0:n.level)-1)*100>=400?600-((n==null?void 0:n.level)-1)*100:400,fontSize:17-(n==null?void 0:n.level)>=14?17-(n==null?void 0:n.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Wp,[n!=null&&n.filterShow?(e.openBlock(),e.createElementBlock("div",Kp,[e.createVNode($u,{trigger:"contextmenu",ref_key:"popOverRef",ref:b,title:"",width:800,placement:"bottom-start",isVisible:v.value,"onUpdate:isVisible":I[4]||(I[4]=W=>v.value=W)},{reference:e.withCtx(()=>{var W,Se,Le,Fe;return[e.createVNode(ye,{modelValue:s.value,"onUpdate:modelValue":I[0]||(I[0]=aa=>s.value=aa),style:{"min-width":"80px"},placeholder:j.value?(Le=(Se=(W=a.filterValues)==null?void 0:W.filter(aa=>aa))==null?void 0:Se.slice(0,3))==null?void 0:Le.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:G,disabled:((Fe=f.value)==null?void 0:Fe.length)===0},{suffix:e.withCtx(()=>{var aa,Na;return[!s.value&&((Na=(aa=a.filterValues)==null?void 0:aa.filter(ae=>ae))!=null&&Na.join("/"))?(e.openBlock(),e.createBlock(Y,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(le,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[p.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(ll.ssForm,{rowContents:f.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:E},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((se=a.buttons)==null?void 0:se.length)>0?(e.openBlock(),e.createElementBlock("div",Gp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ee=a.buttons)==null?void 0:ee.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,Se)=>{var Le;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Se},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(Te,{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 Fe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:aa=>M(W==null?void 0:W.label)},[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"]),e.createElementVNode("span",Jp,e.toDisplayString(W==null?void 0:W.label),1)],10,Yp)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(ll._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Fe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"]),e.createElementVNode("span",Xp,e.toDisplayString(W==null?void 0:W.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,Fe=>{var aa,Na;return e.openBlock(),e.createElementBlock("div",{key:Fe==null?void 0:Fe.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ae=>!a.lockingPage&&M(Fe==null?void 0:Fe.label)},[e.createTextVNode(e.toDisplayString(Fe==null?void 0:Fe.label),1),(aa=Fe==null?void 0:Fe.label)!=null&&aa.includes("选中")?(e.openBlock(),e.createElementBlock("span",ef,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Na=Fe==null?void 0:Fe.label)!=null&&Na.includes("全部")?(e.openBlock(),e.createElementBlock("span",af,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Qp)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Fe=>!a.lockingPage&&M(W==null?void 0:W.label,W)},[e.createVNode(le,{class:"table-op-icon",name:((Le=k==null?void 0:k.find(Fe=>(Fe==null?void 0:Fe.label)===(W==null?void 0:W.label)))==null?void 0:Le.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",rf,e.toDisplayString(W==null?void 0:W.label),1)],10,lf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",nf,[e.createElementVNode("div",of,[e.createElementVNode("div",tf,[e.createVNode(ye,{modelValue:s.value,"onUpdate:modelValue":I[5]||(I[5]=W=>s.value=W),style:{"min-width":"80px"},placeholder:j.value?(Pe=(Ce=(ue=a.filterValues)==null?void 0:ue.filter(W=>W))==null?void 0:Ce.slice(0,3))==null?void 0:Pe.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:G,disabled:((ve=f.value)==null?void 0:ve.length)===0},{suffix:e.withCtx(()=>{var W,Se;return[!s.value&&((Se=(W=a.filterValues)==null?void 0:W.filter(Le=>Le))!=null&&Se.join("/"))?(e.openBlock(),e.createBlock(Y,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(le,{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",sf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ce=a.buttons)==null?void 0:ce.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,Se)=>{var Le;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Se},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(Te,{key:0,class:"upload-button-wrap","on-change":_,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Fe;return[e.createElementVNode("div",cf,[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"]),e.createElementVNode("span",uf,e.toDisplayString(W==null?void 0:W.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(ll._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(R,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Fe;return[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(W==null?void 0:W.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",df,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,Fe=>(e.openBlock(),e.createBlock(R,{key:Fe==null?void 0:Fe.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:aa=>M(Fe==null?void 0:Fe.label)},{default:e.withCtx(()=>{var aa,Na;return[e.createTextVNode(e.toDisplayString(Fe==null?void 0:Fe.label),1),(aa=Fe==null?void 0:Fe.label)!=null&&aa.includes("选中")?(e.openBlock(),e.createElementBlock("span",pf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Na=Fe==null?void 0:Fe.label)!=null&&Na.includes("全部")?(e.openBlock(),e.createElementBlock("span",ff,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Fe=>!a.lockingPage&&M(W==null?void 0:W.label,W)},[e.createVNode(le,{class:"table-op-icon",name:(Le=k==null?void 0:k.find(Fe=>(Fe==null?void 0:Fe.label)===(W==null?void 0:W.label)))==null?void 0:Le.icon},null,8,["name"]),e.createElementVNode("span",vf,e.toDisplayString(W==null?void 0:W.label),1)],10,hf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},yf=Xl._export_sfc(mf,[["__scopeId","data-v-44a17652"]]),gf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,r)=>{const n=e.resolveComponent("el-table-column"),t=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(t,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var v;return e.openBlock(),e.createBlock(n,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((v=s==null?void 0:s.label)==null?void 0:v.length)*2||4)*27)},{default:e.withCtx(p=>[e.renderSlot(l.$slots,"content",{row:p.row,column:p.column,$index:p.$index,scope:p}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(f,m)=>(e.openBlock(),e.createBlock(ll._sfc_main$2,{key:m,column:f,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(k,c)=>({name:c,fn:e.withCtx(({row:D,slotData:V,item:_,column:G})=>[e.renderSlot(l.$slots,c,e.mergeProps({ref_for:!0},V??D,{item:_??f,slotData:V??D,row:D,column:G,columnProp:f}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class bf extends Bl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,r,n,t){const s=this,v=new Bl.FileLoader(s.manager);v.setPath(s.path),v.setResponseType("arraybuffer"),v.setRequestHeader(s.requestHeader),v.setWithCredentials(s.withCredentials),v.load(l,function(p){try{r(s.parse(p))}catch(f){t?t(f):console.error(f),s.manager.itemError(l)}},n,t)}_getDataView(l,r,n,t){switch(n){case"F":return t===8?l.getFloat64(r,this.littleEndian):l.getFloat32(r,this.littleEndian);case"I":return t===1?l.getInt8(r):t===2?l.getInt16(r,this.littleEndian):l.getInt32(r,this.littleEndian);case"U":return t===1?l.getUint8(r):t===2?l.getUint16(r,this.littleEndian):l.getUint32(r,this.littleEndian)}}parse(l){function r(V,_){const G=V.length,M=new Uint8Array(_);let $=0,j=0,E,S,w;do if(E=V[$++],E<32){if(E++,j+E>_)throw new Error("Output buffer is not large enough");if($+E>G)throw new Error("Invalid compressed data");do M[j++]=V[$++];while(--E)}else{if(S=E>>5,w=j-((E&31)<<8)-1,$>=G)throw new Error("Invalid compressed data");if(S===7&&(S+=V[$++],$>=G))throw new Error("Invalid compressed data");if(w-=V[$++],j+S+2>_)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=j)throw new Error("Invalid compressed data");do M[j++]=M[w++];while(--S+2)}while($<G);return M}function n(V){const _={},G=new Uint8Array(V);let M="",$="",j=0,E=!1;const S=G.length;for(;j<S&&E===!1;){const P=String.fromCharCode(G[j++]);P===`
|
|
2
|
-
`||
|
|
3
|
-
`);for(let $=0,j=M.length;$<j;$++){if(M[$]==="")continue;const E=M[$].split(" ");if(V.x!==void 0&&(s.push(parseFloat(E[V.x])),s.push(parseFloat(E[V.y])),s.push(parseFloat(E[V.z]))),V.rgb!==void 0){const S=t.fields.findIndex(le=>le==="rgb"),w=t.type[S],b=parseFloat(E[V.rgb]);let g=b;if(w==="F"){const le=new Float32Array(1);le[0]=b,g=new Int32Array(le.buffer)[0]}const P=(g>>16&255)/255,I=(g>>8&255)/255,Y=(g>>0&255)/255;k.setRGB(P,I,Y,Bl.SRGBColorSpace),p.push(k.r,k.g,k.b)}V.normal_x!==void 0&&(v.push(parseFloat(E[V.normal_x])),v.push(parseFloat(E[V.normal_y])),v.push(parseFloat(E[V.normal_z]))),V.intensity!==void 0&&f.push(parseFloat(E[V.intensity])),V.label!==void 0&&m.push(parseInt(E[V.label]))}}if(t.data==="binary_compressed"){const V=new Uint32Array(l.slice(t.headerLen,t.headerLen+8)),_=V[0],G=V[1],M=r(new Uint8Array(l,t.headerLen+8,_),G),$=new DataView(M.buffer),j=t.offset;for(let E=0;E<t.points;E++){if(j.x!==void 0){const S=t.fields.indexOf("x"),w=t.fields.indexOf("y"),b=t.fields.indexOf("z");s.push(this._getDataView($,t.points*j.x+t.size[S]*E,t.type[S],t.size[S])),s.push(this._getDataView($,t.points*j.y+t.size[w]*E,t.type[w],t.size[w])),s.push(this._getDataView($,t.points*j.z+t.size[b]*E,t.type[b],t.size[b]))}if(j.rgb!==void 0){const S=t.fields.indexOf("rgb"),w=$.getUint8(t.points*j.rgb+t.size[S]*E+2)/255,b=$.getUint8(t.points*j.rgb+t.size[S]*E+1)/255,g=$.getUint8(t.points*j.rgb+t.size[S]*E+0)/255;k.setRGB(w,b,g,Bl.SRGBColorSpace),p.push(k.r,k.g,k.b)}if(j.normal_x!==void 0){const S=t.fields.indexOf("normal_x"),w=t.fields.indexOf("normal_y"),b=t.fields.indexOf("normal_z");v.push(this._getDataView($,t.points*j.normal_x+t.size[S]*E,t.type[S],t.size[S])),v.push(this._getDataView($,t.points*j.normal_y+t.size[w]*E,t.type[w],t.size[w])),v.push(this._getDataView($,t.points*j.normal_z+t.size[b]*E,t.type[b],t.size[b]))}if(j.intensity!==void 0){const S=t.fields.indexOf("intensity");f.push(this._getDataView($,t.points*j.intensity+t.size[S]*E,t.type[S],t.size[S]))}if(j.label!==void 0){const S=t.fields.indexOf("label");m.push($.getInt32(t.points*j.label+t.size[S]*E,this.littleEndian))}}}if(t.data==="binary"){const V=new DataView(l,t.headerLen),_=t.offset;for(let G=0,M=0;G<t.points;G++,M+=t.rowSize){if(_.x!==void 0){const $=t.fields.indexOf("x"),j=t.fields.indexOf("y"),E=t.fields.indexOf("z");s.push(this._getDataView(V,M+_.x,t.type[$],t.size[$])),s.push(this._getDataView(V,M+_.y,t.type[j],t.size[j])),s.push(this._getDataView(V,M+_.z,t.type[E],t.size[E]))}if(_.rgb!==void 0){const $=V.getUint8(M+_.rgb+2)/255,j=V.getUint8(M+_.rgb+1)/255,E=V.getUint8(M+_.rgb+0)/255;k.setRGB($,j,E,Bl.SRGBColorSpace),p.push(k.r,k.g,k.b)}if(_.normal_x!==void 0){const $=t.fields.indexOf("normal_x"),j=t.fields.indexOf("normal_y"),E=t.fields.indexOf("normal_z");v.push(this._getDataView(V,M+_.normal_x,t.type[$],t.size[$])),v.push(this._getDataView(V,M+_.normal_y,t.type[j],t.size[j])),v.push(this._getDataView(V,M+_.normal_z,t.type[E],t.size[E]))}if(_.intensity!==void 0){const $=t.fields.indexOf("intensity");f.push(this._getDataView(V,M+_.intensity,t.type[$],t.size[$]))}_.label!==void 0&&m.push(V.getInt32(M+_.label,this.littleEndian))}}const c=new Bl.BufferGeometry;s.length>0&&c.setAttribute("position",new Bl.Float32BufferAttribute(s,3)),v.length>0&&c.setAttribute("normal",new Bl.Float32BufferAttribute(v,3)),p.length>0&&c.setAttribute("color",new Bl.Float32BufferAttribute(p,3)),f.length>0&&c.setAttribute("intensity",new Bl.Float32BufferAttribute(f,1)),m.length>0&&c.setAttribute("label",new Bl.Int32BufferAttribute(m,1)),c.computeBoundingSphere();const D=new Bl.PointsMaterial({size:.005});return p.length>0&&(D.vertexColors=!0),new Bl.Points(c,D)}}const kf=A.useModelComp(A.pinia),{systemPath:cs}=A.storeToRefs(kf),ho=e.ref(),us=new WeakMap;function xf(a,l,r,n,t){const s=async D=>{try{const V=await A.platformDownloadFile({url:D});if(V.status!==200)throw new Error(`下载失败: ${V.status}`);return V.data}catch(V){throw console.error("addModelFromUrl失败:",V),V}},v=D=>new Promise((V,_)=>{const G=new FileReader;G.onload=M=>{try{const $=M.target.result,E=new zn.MTLLoader().parse($);E.preload(),V(E)}catch($){_($)}},G.onerror=()=>{_(new Error("MTL文件读取失败"))},G.readAsText(D)}),p=async D=>{const V={materials:{},create:function(_){return this.materials[_]?this.materials[_]:(console.warn(`Material '${_}' not found, using default material`),new Bl.MeshPhongMaterial({color:8947848,side:Bl.DoubleSide}))},getAsArray:function(){const _=[];for(const G in this.materials)_.push(this.materials[G]);return _},preload:function(){for(const _ in this.materials)this.materials[_].map&&(this.materials[_].map.needsUpdate=!0)}};for(const _ of D){const G=await v(_);Object.assign(V.materials,G.materials)}return V.preload(),V},f=async(D,V=[])=>new Promise((_,G)=>{const M=new FileReader;M.onload=async $=>{try{const j=$.target.result;let E=null;V&&V.length>0&&(V.length===1?E=await v(V[0]):E=await p(V));const S=new zn.OBJLoader;E&&S.setMaterials(E);const w=S.parse(j);E||w.traverse(b=>{b.isMesh&&(b.material=new Bl.MeshPhongMaterial({color:8947848,side:Bl.DoubleSide}))}),_(w)}catch(j){G(j)}},M.onerror=()=>{G(new Error("OBJ文件读取失败"))},M.readAsText(D)}),m=async D=>{var V;try{r.value=!0;const{scene:_}=a();if(!_)throw new Error("Scene not initialized");t();const G=[];for(let M=0;M<D.length;M++){const $=D[M];n.value=`正在加载模型 ${M+1}/${D.length}...`;const j=await s($.objUrl),E=((V=$.objUrl)==null?void 0:V.split("/").pop())||`model_${M}.obj`,S=new File([j],E,{type:j.type});let w=[];if($.mtlUrls){const g=Array.isArray($.mtlUrls)?$.mtlUrls:[$.mtlUrls];for(let P=0;P<g.length;P++){const I=g[P],Y=await s(I),le=(I==null?void 0:I.split("/").pop())||`material_${M}_${P}.mtl`,ye=new File([Y],le,{type:Y.type});w.push(ye)}}const b=await f(S,w);_.add(b),l.value.push(b),G.push(b)}return r.value=!1,G}catch(_){throw console.error("加载模型失败:",_),r.value=!1,_}},k=async(D,V,_=[],G=[])=>{let M;const $=D.toLowerCase();switch($){case".txt":case".cpt":case".obj":const j=await V.text();if($===".txt"||$===".cpt"){const ae=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,oe=[...j.matchAll(ae)].map(ie=>({x:parseFloat(ie[1]),y:parseFloat(ie[2]),z:parseFloat(ie[3])})),ca=new Bl.BufferGeometry,Ee=oe.flatMap(ie=>[ie.x,ie.y,ie.z]);if(ca.setAttribute("position",new Bl.Float32BufferAttribute(Ee,3)),$===".txt"){const ie=new Bl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});M=new Bl.Points(ca,ie)}else if($===".cpt"){const ie=new Bl.LineBasicMaterial({color:"#5B5C99",linewidth:100});M=new Bl.Line(ca,ie)}}else if($===".obj"){const ae=new zn.OBJLoader;if(_&&_.length>0){const ta=new zn.MTLLoader;for(const oe of _){const ca=await oe.text(),Ee=ta.parse(ca);Ee.preload(),ae.setMaterials(Ee);break}}M=ae.parse(j),(!_||_.length===0)&&M.traverse(ta=>{ta.isMesh&&(ta.material=new Bl.MeshPhongMaterial({color:"#B3B3D4"})),ta instanceof Bl.Mesh&&(ta.material.side=Bl.DoubleSide)})}break;case".stl":const E=await V.arrayBuffer(),w=new zn.STLLoader().parse(E),b=new Bl.MeshPhongMaterial({color:"#B3B3D4",side:Bl.DoubleSide});M=new Bl.Mesh(w,b);break;case".nc":const g=["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"],P={"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 Bl.Group,Y=g.map(ae=>new Promise((ta,oe)=>{new zn.STLLoader().load(cs.value===""?`/model/${ae}`:`${cs.value}\\${ae}`,Ee=>{const ie=new Bl.MeshPhongMaterial({color:P[ae]||"#B3B3D4",side:Bl.DoubleSide}),Be=new Bl.Mesh(Ee,ie);ta(Be)},void 0,oe)}));try{(await Promise.all(Y)).forEach(ta=>I.add(ta)),M=I}catch(ae){throw console.error("加载NC文件对应的STL文件失败:",ae),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const le=new bf,ye=new Bl.Group;try{const ae=await qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ta=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"}),oe=await qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ca=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=await new Promise((Be,Ue)=>{const oa=URL.createObjectURL(ta);le.load(oa,Ja=>{const L=new Float32Array(Ja.geometry.attributes.position.count*3);for(let H=0;H<Ja.geometry.attributes.position.count;H++)L[H*3]=1,L[H*3+1]=0,L[H*3+2]=0;Ja.geometry.setAttribute("color",new Bl.BufferAttribute(L,3)),Ja.material.vertexColors=!0,Ja.scale.set(.3,.3,.3),URL.revokeObjectURL(oa),Be(Ja)},void 0,Ue)}),ie=await new Promise((Be,Ue)=>{const oa=URL.createObjectURL(ca);le.load(oa,Ja=>{const L=new Float32Array(Ja.geometry.attributes.position.count*3);for(let H=0;H<Ja.geometry.attributes.position.count;H++)L[H*3]=0,L[H*3+1]=1,L[H*3+2]=0;Ja.geometry.setAttribute("color",new Bl.BufferAttribute(L,3)),Ja.material.vertexColors=!0,Ja.scale.set(.3,.3,.3),URL.revokeObjectURL(oa),Be(Ja)},void 0,Ue)});ye.add(Ee),ye.add(ie),M=ye}catch(ae){throw console.error("PCD文件加载失败:",ae),new Error("无法加载PCD文件")}break;case".urdf":const Te=URL.createObjectURL(V),R=new Mu.URDFLoader,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",ee={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ue=new WeakMap,Ce=new WeakMap,Pe=new WeakMap,ve=async ae=>{if(ue.has(ae))return console.log(`从缓存加载: ${ae}`),ue.get(ae);try{const ta=await qa.axios.get(`${se}/${ae}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),oe=new Blob([ta.data],{type:"application/octet-stream;charset=UTF-8"});return ee.enableCache&&ue.set(ae,oe),oe}catch(ta){throw console.error(`加载文件失败: ${ae}`,ta),new Error(`无法加载文件: ${ae}`)}},B=(ae="default")=>{if(Ce.has(ae))return Ce.get(ae);const ta=new Bl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Bl.FrontSide});return Ce.set(ae,ta),ta},ce=ae=>{try{ae.isBufferGeometry&&ae.mergeVertices&&ae.mergeVertices(),ae.computeVertexNormals&&ae.computeVertexNormals(),ae.computeBoundingSphere&&ae.computeBoundingSphere(),ae.deleteAttribute&&ae.deleteAttribute("uv2")}catch(ta){console.warn("几何体优化失败,使用原始几何体:",ta)}return ae},W=async(ae,ta,oe)=>{const ca=`stl_${ta}`;if(Pe.has(ca)){const Ue=Pe.get(ca);return new Bl.Mesh(Ue,B())}const Ee=await ae.arrayBuffer();let Be=new zn.STLLoader(oe).parse(Ee);return Be=ce(Be),Pe.set(ca,Be),new Bl.Mesh(Be,B())},Se=async(ae,ta,oe)=>{const ca=`obj_${ta}`;if(ue.has(ca))return ue.get(ca).clone();const Ee=await ae.text(),ie=new zn.OBJLoader(oe),Be=ta.replace(".obj",".mtl");try{const Ja=await(await ve(Be)).text(),H=new zn.MTLLoader(oe).parse(Ja);H.preload(),ie.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Be}`)}const Ue=ie.parse(Ee);return Ue.traverse(oa=>{oa.isMesh&&(oa.geometry=ce(oa.geometry),oa.castShadow=!0,oa.receiveShadow=!0,oa.renderOrder=1)}),ue.set(ca,Ue),Ue},Le=(ae,ta)=>{const oe=new Bl.LOD;if(oe.addLevel(ae,0),ae.geometry){const ca=ae.geometry.clone(),Ee=new Bl.Mesh(ca,ae.material);oe.addLevel(Ee,50)}return oe};let Fe=0,aa=0;const Na=[];R.loadMeshCb=async(ae,ta,oe,ca,Ee)=>{const ie=ae.split("/").pop(),Be=oe||(()=>{});Fe++;const Ue=new Promise(async(oa,Ja)=>{try{const L=await ve(ie);if(!L||L.size===0)throw new Error(`文件为空: ${ie}`);const H=ie.split(".").pop().toLowerCase();let Z;switch(H){case"stl":Z=await W(L,ie,ta);break;case"obj":Z=await Se(L,ie,ta);break;default:throw new Error(`不支持的文件格式: ${H}`)}ee.enableLOD&&Z.isMesh&&(Z=Le(Z,ie)),Be(Z),aa++,ca&&ca({loaded:aa,total:Fe,progress:aa/Fe}),oa(Z)}catch(L){console.error(`mesh文件加载失败: ${ie}`,L);const H=new Bl.Group;Be(H),oa(H);const Z=new Bl.BoxGeometry(.1,.1,.1),me=new Bl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Bl.Mesh(Z,me)}});Na.push(Ue)};try{if(!Te){ho.value=void 0;break}if(M=await R.loadAsync(Te),console.log(`URDF文件加载完成,等待${Fe}个mesh文件加载...`),Na.length>0)try{await Promise.allSettled(Na),console.log(`所有mesh文件处理完成,成功加载: ${aa}/${Fe}`)}catch(oe){console.warn("部分mesh文件加载失败,但继续显示模型",oe)}M.traverse(oe=>{oe.isMesh&&(oe.castShadow=!0,oe.receiveShadow=!0,oe.renderOrder=1,oe.material&&(oe.material.needsUpdate=!0))}),console.time("计算包围盒");const ae=new Bl.Box3;ae.expandByObject(M);const ta=`urdf_${Date.now()}`;M.userData.boundingBox=ae.clone(),M.userData.modelId=ta,us.set(ta,{box:ae.clone(),center:ae.getCenter(new Bl.Vector3),size:ae.getSize(new Bl.Vector3),maxSize:Math.max(...ae.getSize(new Bl.Vector3).toArray())}),ho.value=M,console.log("URDF模型加载完成并优化")}catch(ae){console.error("URDF加载失败:",ae),ho.value=void 0}finally{Te&&URL.revokeObjectURL(Te)}break;default:throw new Error(`不支持的文件格式: ${D}`)}return M};return{addModelsFromUrls:m,loadModelByDefaultPath:async D=>{console.log(D);try{r.value=!0,n.value="正在加载模型...";const{scene:V}=a();if(!V)throw new Error("Scene not initialized");t(),await new Promise(G=>setTimeout(G,100));const _=[];for(let G=0;G<D.length;G++){const M=D[G],$=await k(M.suffix,M.blob,M.mtlBlobs||[],M.meshFiles||[]);$&&(V.add($),l.value.push($),_.push($))}return r.value=!1,n.value="",_}catch(V){throw console.error("加载模型失败:",V),r.value=!1,n.value="",V}},urdfModel:ho,modelBoundingBoxes:us}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(a=>{var l=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,t,s,v,p,f=function(c,D){D.parentNode.insertBefore(c,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(c){console&&console.log(c)}}n=function(){var c,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,(c=document.body).firstChild?f(D,c.firstChild):c.appendChild(D))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),n()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(s=n,v=a.document,p=!1,k(),v.onreadystatechange=function(){v.readyState=="complete"&&(v.onreadystatechange=null,m())})}function m(){p||(p=!0,s())}function k(){try{v.documentElement.doScroll("left")}catch{return void setTimeout(k,50)}m()}})(window);const wf=["onClick"],_f=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}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(null),s=e.ref(null),v=w=>{if(Array.isArray(w)&&w.length>=3){const[b,g,P,I]=w;return I!==void 0?`rgba(${b}, ${g}, ${P}, ${I})`:`rgb(${b}, ${g}, ${P})`}if(typeof w=="string"){const b=w.trim();if(b.startsWith("[")&&b.endsWith("]")){const g=b.slice(1,-1).split(",").map(P=>Number(P.trim()));if(g.length>=3&&g.every(P=>!Number.isNaN(P))){const[P,I,Y,le]=g;return le!==void 0?`rgba(${P}, ${I}, ${Y}, ${le})`:`rgb(${P}, ${I}, ${Y})`}}return b}},p=e.computed(()=>{const w=Number(r==null?void 0:r.textSize),b=v(r==null?void 0:r.textColor),g={},P={};return!Number.isNaN(w)&&w&&(g.fontSize=`${w}px`,P.fontSize=`${w}px`),b&&(g.color=b,P.color=b),{label:g,value:P}}),f=e.ref(""),m=e.ref(""),k=e.ref(!1),c=async w=>{if(w){m.value&&(URL.revokeObjectURL(m.value),m.value="");try{const b=await A.platformDownloadFile({url:w}),g=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});m.value=URL.createObjectURL(g)}catch{m.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,w=>{w&&(f.value=w)},{immediate:!0}),e.watch(f,w=>{c(w)},{immediate:!0});const D=()=>{var w;(w=s.value)==null||w.click()},V=async w=>{var P,I,Y;const b=w.target,g=(P=b==null?void 0:b.files)==null?void 0:P[0];if(!g){b.value="";return}k.value=!0;try{const le=new FormData;le.append("file",g);const ye=await A.platformUploadFile(le),Te=(Y=(I=ye==null?void 0:ye.data)==null?void 0:I.result)==null?void 0:Y.url;Te?(f.value=Te,n("update:backGroundImage",Te),c(Te),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{k.value=!1,b.value=""}},_=e.computed(()=>m.value?{backgroundImage:`url(${m.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),G=w=>ll.getComponent(w),M=w=>{if(!w)return;const b=w.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},$=(w,b,g)=>{r.disabled||w.field&&(t.value=b,e.nextTick(()=>{M(g.currentTarget)}))},j=()=>{t.value=null},E=w=>{var g;const b=((g=w==null?void 0:w.field)==null?void 0:g.value)??(w==null?void 0:w.value);return b==null||b===""?"-":b},S=w=>{const b=w!=null&&w.width&&w.width>0?w.width:1,P=`calc((100% - ${(b-1)*16}px) / ${b})`;return{flex:`0 0 ${P}`,maxWidth:P,minWidth:"140px",boxSizing:"border-box"}};return(w,b)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(_.value),onClick:b[2]||(b[2]=g=>(r==null?void 0:r.backGround)&&D())},[r!=null&&r.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(g=>D(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:V},null,544),b[3]||(b[3]=e.createElementVNode("img",{src:ll._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.items,(g,P)=>{var I,Y,le,ye,Te,R,se,ee;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:P,style:e.normalizeStyle(S(g)),onClick:b[1]||(b[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(p.value.label)},e.toDisplayString(g==null?void 0:g.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(p.value.value),onClick:ue=>{var Ce;return(Ce=g.field)!=null&&Ce.isNoClick?null:$(g,P,ue)}},[t.value===P&&g.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(((I=g.field)==null?void 0:I.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":ue=>g.field.value=ue,isEdit:!0,disabled:(Y=g.field)==null?void 0:Y.disabled,content:((le=g.field)==null?void 0:le.contents)??[],optionUrl:g.field,originalValue:(ye=g.field)==null?void 0:ye.value,config:(Te=g.field)==null?void 0:Te.config,configModel:((R=g.field)==null?void 0:R.prop)??((se=g.field)==null?void 0:se.name),selectedTagList:((ee=g.field)==null?void 0:ee.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(E(g)),1)],64))],12,wf)],4)}),128))],4))}}),Sf=Xl._export_sfc(_f,[["__scopeId","data-v-060d233a"]]),sc=A.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Ef={class:"calculator-content"},Cf={class:"calculator-child"},Df={class:"calculator-child"},Nf=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),r=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],r.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,t)=>(e.openBlock(),e.createElementBlock("div",Ef,[e.createElementVNode("div",Cf,[e.createVNode(ll.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Df,[e.createVNode(ll.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Bf=Xl._export_sfc(Nf,[["__scopeId","data-v-73db0fe7"]]),mt=(a,l)=>{let r=a,n=l;return Array.isArray(r)&&(r=r==null?void 0:r.map((t,s)=>{if(Array.isArray(t)){let v={};return t=t==null?void 0:t.forEach((p,f)=>{var m;(m=n==null?void 0:n[f])!=null&&m.prop?v[n[f].prop]=p:Array.isArray(p)&&(v.children=mt(p,n))}),Object.assign(v,{id:s})}else return t})),r},cc=(a,l,r)=>{let n=a,t=l;return n=n==null?void 0:n.map((s,v)=>{var p,f;return!Array.isArray(s)||!((p=t==null?void 0:t[v])!=null&&p.label)&&!r||(s.unshift(((f=t==null?void 0:t[v])==null?void 0:f.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var k;return Array.isArray(m)&&(m=cc(m,(k=t==null?void 0:t[v])==null?void 0:k.children,r)),m}))),s}),n},Tf=(a,l,r)=>{if(l==="")return a==null?void 0:a.filter(n=>(n==null?void 0:n.id)!==r);{const n=l.split("-");return Af(a,n,r)}},Af=(a,l,r)=>{let n=a,t=l;return(t==null?void 0:t.length)===0?n=n==null?void 0:n.filter(s=>s.id!==r):n=n==null?void 0:n.map(s=>(s.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),s=uc(s,t,r)),s)),n},uc=(a,l,r)=>{var s,v;let n=a,t=l;return(t==null?void 0:t.length)===0?n.children=(s=n.children)==null?void 0:s.filter(p=>p.id!==r):n.children=(v=n.children)==null?void 0:v.map(p=>(p.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),p=uc(p,t,r)),p)),n},zf=(a,l,r)=>{if(l==="")return r;{const n=l.split("-");return Mf(a,n,r)}},Mf=(a,l,r)=>{let n=a,t=l;return(t==null?void 0:t.length)===0?n=r:n=n==null?void 0:n.map(s=>(s.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),s=dc(s,t,r)),s)),n},dc=(a,l,r)=>{var s;let n=a,t=l;return(t==null?void 0:t.length)===0?n.children=r:n.children=(s=n.children)==null?void 0:s.map(v=>(v.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),v=dc(v,t,r)),v)),n};class If{constructor(l={}){Wr(this,"url");Wr(this,"heartbeatInterval");Wr(this,"socket",null);Wr(this,"isConnected",!1);Wr(this,"heartTimer",null);Wr(this,"canvas",null);Wr(this,"ctx",null);Wr(this,"mainCamCutMode",0);Wr(this,"pMainShowStartX",0);Wr(this,"pMainShowStartY",0);Wr(this,"onLog");Wr(this,"onDevCount");Wr(this,"onResolution");Wr(this,"onCameraStatus");Wr(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,r,n){var v;(v=this.canvas)!=null&&v.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const t=document.createElement("canvas");t.style.border="solid 1px #A0A0A0",t.id="MainCamCanvas",t.width=r,t.height=n;const s=t.getContext("2d");if(!s)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(t),this.canvas=t,this.ctx=s}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,r)=>{const n=new WebSocket(this.url);n.binaryType="arraybuffer",n.onopen=()=>{this.socket=n,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},n.onerror=t=>{this.isConnected=!1,this.log("socket.onerror"),r(t)},n.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},n.onmessage=t=>{this.handleMessage(t)}})}destroy(){var l;this.stopHeartbeat();try{this.closeCamera()}catch{}if(this.socket){try{this.socket.onmessage=null}catch{}try{this.socket.onopen=null}catch{}try{this.socket.onerror=null}catch{}try{this.socket.onclose=null}catch{}try{this.socket.close()}catch{}this.socket=null}this.isConnected=!1,(l=this.canvas)!=null&&l.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(l=0){this.sendBytes(new Uint8Array([119,136,81,l]))}chooseResolution(l){if(!Array.isArray(l)||l.length===0)return null;const r=l.find(t=>t.width===2592&&t.height===1944);return r||[...l].sort((t,s)=>s.width*s.height-t.width*t.height)[0]||null}openCamera(l=0,r=1280,n=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const t=new Uint8Array(12);t[0]=119,t[1]=136,t[2]=1,t[3]=l,t[4]=this.canvas.width>>8&255,t[5]=this.canvas.width&255,t[6]=this.canvas.height>>8&255,t[7]=this.canvas.height&255,t[8]=r>>8&255,t[9]=r&255,t[10]=n>>8&255,t[11]=n&255,this.sendBytes(t)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const t=new Uint8Array(12);t[0]=119,t[1]=136,t[2]=16,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=0,this.sendBytes(t)}bestSize(){this.sendBytes(new Uint8Array([119,136,5,0]))}rotateLeft(){this.sendBytes(new Uint8Array([119,136,7,0]))}rotateRight(){this.sendBytes(new Uint8Array([119,136,8,0]))}focus(){this.sendBytes(new Uint8Array([119,136,48,0]))}log(l){var r;(r=this.onLog)==null||r.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var t,s,v,p,f,m;const r=new Uint8Array(l.data);if(r.length<=0)return;if(r[0]===17&&r[1]===17&&r[2]===17){this.log("heart socket!!!!");return}if(r[0]!==85||r[1]!==102)return;const n=r[2];if(n===80){const k=r[3],c=r.length-4,D=new Uint8Array(c);for(let G=0;G<c;G++)D[G]=r[4+G];const _=decodeURIComponent(this.byteToString(D)).split("|");(t=this.onDevCount)==null||t.call(this,k,_);return}if(n===81){const k=r[3]||0,c=[];for(let D=0;D<k;D++){const V=(r[4+D*4+0]||0)*256+(r[4+D*4+1]||0),_=(r[4+D*4+2]||0)*256+(r[4+D*4+3]||0);c.push({width:V,height:_,text:`${V}*${_}`})}(s=this.onResolution)==null||s.call(this,k,c);return}if(n===1){r[3]===1&&((v=this.onCameraStatus)==null||v.call(this,"opened")),r[3]===3&&((p=this.onCameraStatus)==null||p.call(this,"closed"));return}if(n===16){if(r[3]===1){const c=r[4]*256+r[5],D=r[6]*65536+r[7]*256+r[8];let V="";if(c>0){const M=new Uint8Array(c);for(let $=0;$<c;$++)M[$]=r[9+$];V=decodeURIComponent(this.byteToString(M))}const _=new Uint8Array(D);for(let M=0;M<D;M++)_[M]=r[9+c+M];const G=this.uint8ArrayToString(_);(f=this.onPhoto)==null||f.call(this,{flag:0,imgPath:V,base64:G})}r[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(n===204){if(!this.canvas||!this.ctx)return;const k=r[3]*256+r[4],c=r[5]*256+r[6];this.pMainShowStartX=r[7]*256+r[8],this.pMainShowStartY=r[9]*256+r[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const D=this.ctx.createImageData(k,c);let V=11;for(let _=0;_<D.data.length;_+=4)D.data[_+0]=r[V],D.data[_+1]=r[V+1],D.data[_+2]=r[V+2],D.data[_+3]=255,V+=3;this.ctx.putImageData(D,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}byteToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}}const Of={style:{display:"flex",gap:"16px",height:"100%"}},Lf={key:0,style:{color:"var(--el-text-color-secondary)"}},$f={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Rf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Vf={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"auto",padding:"8px"}},Ff={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Pf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},jf=["src","onClick"],Hf=["onClick"],Uf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},qf={class:"dialog-footer"},Wf=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(null),s=e.ref(!1),v=e.ref([]),p=e.ref(""),f=e.ref(!1),m=e.ref([]),k=new If({url:"ws://127.0.0.1:22225"});function c(I,Y){var ee;const le=I.split(","),ye=((ee=le[0].match(/:(.*?);/))==null?void 0:ee[1])??"image/jpeg",Te=atob(le[1]);let R=Te.length;const se=new Uint8Array(R);for(;R--;)se[R]=Te.charCodeAt(R);return new File([se],Y,{type:ye})}function D(){k.onLog=I=>{console.log("[GPY]",I)},k.onDevCount=(I,Y)=>{if(p.value+=`设备数量=${I},设备=${Y.join(",")}
|
|
1
|
+
"use strict";var Tu=Object.defineProperty;var Au=(a,l,r)=>l in a?Tu(a,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[l]=r;var Wr=(a,l,r)=>Au(a,typeof l!="symbol"?l+"":l,r);const e=require("vue"),qa=require("./request-BC2w2vGr.cjs"),A=require("./index-BEli6-9O.cjs"),ll=require("./index-BYaor5QC.cjs"),Xl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DyCuFKb2.cjs"),wr=require("./index-gnhHdovX.cjs"),_o=require("./threeViewerHost-NwCu86-z.cjs"),he=require("./index-Cot4bEbR.cjs"),Ar=require("./index-CW4qJdP8.cjs"),es=require("./index-Dkn9zOYg.cjs"),Gs=require("./index-D8Eqcxyf.cjs");;/* empty css */const So=require("./isString-DNBlKLZH.cjs"),as=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ys=require("./index-BVaHwt5f.cjs"),zu=require("./index-BWqvrlth.cjs"),zn=require("./MTLLoader-DeGVtVNV.cjs"),Mu=require("./URDFLoader-C0UZqx6e.cjs");var Iu="[object Boolean]";function Js(a){return a===!0||a===!1||qa.isObjectLike(a)&&qa.baseGetTag(a)==Iu}function Ou(a){return a===void 0}const Lu=a=>a.match(/\((.*)\)/)[1],$u={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(a){const l=a,r=e.ref(null),n=e.ref(!1),t=e.ref(null);return e.watch(()=>l==null?void 0:l.isVisible,()=>{n.value=l==null?void 0:l.isVisible},{deep:!0,immediate:!0}),e.watch(()=>t.value,()=>{e.nextTick(()=>{var s,v;(v=(s=r.value)==null?void 0:s.updatePopper)==null||v.call(s)})},{deep:!0,immediate:!0}),(s,v)=>{const p=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(p,{visible:n.value,"onUpdate:visible":v[0]||(v[0]=f=>n.value=f),trigger:l.trigger,title:l==null?void 0:l.title,placement:l==null?void 0:l.placement,width:l==null?void 0:l.width,ref_key:"popOverRef",ref:r,"trigger-keys":"[]"},{reference:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"reference",{ref_key:"referenceRef",ref:t})])]),default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Ru={__name:"index",props:{value:{type:[String,Number],default:""}},setup(a){const l=a,r=e.computed(()=>{const n=String(l.value??"");return n==="已完成"?"task-status-completed":n==="进行中"?"task-status-running":n==="终止"||n==="暂停"?"task-status-stopped":""});return(n,t)=>a.value!==void 0&&a.value!==null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["task-status-tag",r.value])},e.toDisplayString(a.value===0?"0":a.value),3)):e.createCommentVNode("",!0)}},Vu=Xl._export_sfc(Ru,[["__scopeId","data-v-d81f59b4"]]);function Fu(a,l,r,n={}){if(!a||!l||!r||r.length!==4)return;const t=a.getContext("2d");if(!t)return;const{color:s="rgba(255, 235, 59, 0.3)",strokeWidth:v=2,fillOpacity:p=.2}=n,f=a.getBoundingClientRect(),m=l.getBoundingClientRect(),k=l.naturalWidth,c=l.naturalHeight,D=m.width/k,F=m.height/c,_=Math.min(D,F),G=k*_,M=c*_,$=(f.width-G)/2,j=(f.height-M)/2,E=r.map(([w,b])=>{const g=$+w*G,R=j+b*M;return{x:g,y:R}});t.clearRect(0,0,a.width,a.height),t.beginPath(),t.moveTo(E[0].x,E[0].y);for(let w=1;w<E.length;w++)t.lineTo(E[w].x,E[w].y);t.closePath();const S=s.replace(/[\d.]+\)$/,`${p})`);t.fillStyle=S,t.fill(),t.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),t.lineWidth=v,t.stroke()}function ki(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function ls(a,l){if(!a||!l)return null;const r=a[l];return!r||!r.bboxNorm||!Array.isArray(r.bboxNorm)||r.bboxNorm.length!==4?null:{bboxNorm:r.bboxNorm,imageName:r.imageName||""}}const Pu={key:0,class:"ocr-img-preview-root"},ju={class:"ocr-img-preview-window"},Hu={key:0,class:"img-preview-body"},Uu={class:"img-preview-header"},qu={class:"img-header-left"},Wu={class:"img-name"},Ku={key:0,class:"img-header-right"},Gu={class:"img-index"},Yu={key:0,class:"img-thumb-list"},Ju=["onClick"],Xu={key:1,class:"thumb-placeholder"},Zu={class:"thumb-name"},Qu={class:"img-preview-container"},ed={key:0,class:"img-placeholder"},ad={key:2,class:"img-placeholder"},ld={key:0},rd={key:1},nd={key:1,class:"img-placeholder"},id=e.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(a,{emit:l}){const r=a,n=l,t=e.computed({get:()=>r.visible,set:B=>n("update:visible",B)});let s=!1,v="",p=0,f=0,m=0,k=0,c=0,D=0,F=null;const _=B=>{var W,Se;const ce=(Se=(W=B==null?void 0:B.target)==null?void 0:W.closest)==null?void 0:Se.call(W,".ocr-img-preview-window");return ce||document.querySelector(".ocr-img-preview-window")},G=B=>{if(!B||B==="none")return{tx:0,ty:0};let ce=B.match(/matrix\(([^)]+)\)/);if(ce){const W=ce[1].split(",").map(Se=>Number(Se.trim()));return{tx:(W==null?void 0:W[4])||0,ty:(W==null?void 0:W[5])||0}}if(ce=B.match(/matrix3d\(([^)]+)\)/),ce){const W=ce[1].split(",").map(Se=>Number(Se.trim()));return{tx:(W==null?void 0:W[12])||0,ty:(W==null?void 0:W[13])||0}}return ce=B.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),ce?{tx:Number(ce[1])||0,ty:Number(ce[2])||0}:{tx:0,ty:0}},M=(B,ce,W)=>{B.style.transform=`translate(${ce}px, ${W}px)`},$=B=>{const ce=_(B);if(!ce)return;s=!0,F=ce,v="move",p=B.clientX,f=B.clientY;const W=window.getComputedStyle(ce),{tx:Se,ty:Le}=G(W.transform);c=Se,D=Le,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},j=(B,ce)=>{const W=_(B);if(!W)return;s=!0,F=W,v=ce,p=B.clientX,f=B.clientY;const Se=W.getBoundingClientRect();m=Se.width,k=Se.height;const Le=window.getComputedStyle(W),{tx:Fe,ty:aa}=G(Le.transform);c=Fe,D=aa,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=B=>{if(!s||!F)return;const ce=B.clientX-p,W=B.clientY-f,Se=360,Le=420;let Fe=m,aa=k,Na=c,ae=D;if(v==="move"){Na=c+ce,ae=D+W,M(F,Na,ae);return}if(v.includes("right")&&(Fe=Math.max(Se,m+ce)),v.includes("bottom")&&(aa=Math.max(Le,k+W)),v.includes("left")){const ta=m-ce;ta<Se?(Fe=Se,Na=c+(m-Se)):(Fe=ta,Na=c+ce)}if(v.includes("top")){const ta=k-W;ta<Le?(aa=Le,ae=D+(k-Le)):(aa=ta,ae=D+W)}F.style.width=`${Fe}px`,F.style.height=`${aa}px`,M(F,Na,ae)},S=()=>{s=!1,v="",F=null,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)},w=e.ref([]),b=e.ref(!1);e.watch(()=>r.images,async B=>{if(!Array.isArray(B)||B.length===0){w.value=[];return}b.value=!0;const ce=[];for(const W of B)if(W.url&&!W.url.startsWith("blob:")&&!W.url.startsWith("http"))try{const Se=await Bl.downloadFile(W.url),Le=URL.createObjectURL(Se);ce.push({...W,blobUrl:Le})}catch(Se){console.error(`Failed to load image for preview: ${W.url}`,Se),ce.push({...W,blobUrl:""})}else ce.push({...W,blobUrl:W.url});w.value=ce,b.value=!1},{deep:!0,immediate:!0});const g=e.ref(0),R=e.ref(null),I=e.ref(null),Y=e.computed(()=>w.value[g.value]||null),le=()=>{if(!w.value.length){g.value=0;return}if(r.defaultImageName){const B=w.value.findIndex(ce=>(ce==null?void 0:ce.name)===r.defaultImageName);g.value=B>=0?B:0}else g.value=0},ye=B=>{if(!w.value.length)return;const ce=Math.max(0,Math.min(B,w.value.length-1));g.value=ce},Te=()=>ye(g.value-1),V=()=>ye(g.value+1),se=B=>{if(!B)return;const ce=w.value.findIndex(W=>(W==null?void 0:W.name)===B);ce>=0&&(g.value=ce)},ee=()=>{if(!I.value)return;const B=I.value.parentElement;if(!B)return;const ce=B.getBoundingClientRect();I.value.width=ce.width,I.value.height=ce.height},ue=()=>{var Se,Le;if(!I.value||!R.value||!r.focusedFieldName){I.value&&ki(I.value);return}const B=(Se=R.value.$el)==null?void 0:Se.querySelector("img");if(!B)return;if(!B.complete||B.naturalWidth===0){B.onload=()=>{e.nextTick(()=>{ue()})};return}const ce=((Le=Y.value)==null?void 0:Le.name)||"",W=ls(r.fieldMeta,r.focusedFieldName);if(!W){ki(I.value);return}if(W.imageName!==ce){ki(I.value);return}ee(),Fu(I.value,B,W.bboxNorm)},Ce=()=>{e.nextTick(()=>{ee(),ue()})};e.watch(()=>r.focusedFieldName,()=>{if(!t.value)return;const B=ls(r.fieldMeta,r.focusedFieldName);B!=null&&B.imageName&&se(B.imageName),e.nextTick(()=>{ue()})}),e.watch(()=>{var B;return(B=Y.value)==null?void 0:B.name},()=>{t.value&&e.nextTick(()=>{I.value&&ki(I.value),ue()})}),e.watch(()=>r.visible,B=>{B?(le(),e.nextTick(()=>{ee(),ue()})):I.value&&ki(I.value)}),e.watch(()=>r.defaultImageName,()=>{t.value&&le()});let Pe=null;e.onMounted(()=>{var B;typeof ResizeObserver<"u"&&(Pe=new ResizeObserver(()=>{ee(),e.nextTick(()=>{ue()})}),(B=I.value)!=null&&B.parentElement&&Pe.observe(I.value.parentElement))}),e.onUnmounted(()=>{Pe&&(Pe.disconnect(),Pe=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const ve=()=>{I.value&&ki(I.value),n("update:visible",!1),n("close")};return(B,ce)=>{var aa,Na;const W=e.resolveComponent("el-button"),Se=e.resolveComponent("el-image"),Le=e.resolveComponent("Loading"),Fe=e.resolveComponent("el-icon");return t.value?(e.openBlock(),e.createElementBlock("div",Pu,[ce[12]||(ce[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",ju,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers($,["stop"])},[ce[8]||(ce[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ve},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:ce[0]||(ce[0]=e.withModifiers(ae=>j(ae,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:ce[1]||(ce[1]=e.withModifiers(ae=>j(ae,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:ce[2]||(ce[2]=e.withModifiers(ae=>j(ae,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:ce[3]||(ce[3]=e.withModifiers(ae=>j(ae,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:ce[4]||(ce[4]=e.withModifiers(ae=>j(ae,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:ce[5]||(ce[5]=e.withModifiers(ae=>j(ae,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:ce[6]||(ce[6]=e.withModifiers(ae=>j(ae,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:ce[7]||(ce[7]=e.withModifiers(ae=>j(ae,"bottom-right"),["stop"]))},null,32),Y.value?(e.openBlock(),e.createElementBlock("div",Hu,[e.createElementVNode("div",Uu,[e.createElementVNode("div",qu,[e.createElementVNode("span",Wu,e.toDisplayString(Y.value.name?Y.value.name+(Y.value.url&&Y.value.url.lastIndexOf(".")!==-1?Y.value.url.substring(Y.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Ku,[e.createVNode(W,{size:"small",disabled:g.value===0,onClick:Te},{default:e.withCtx(()=>ce[9]||(ce[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Gu,e.toDisplayString(g.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(W,{size:"small",disabled:g.value===w.value.length-1,onClick:V},{default:e.withCtx(()=>ce[10]||(ce[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Yu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ae,ta)=>(e.openBlock(),e.createElementBlock("div",{key:(ae.name||"")+"-"+ta,class:e.normalizeClass(["img-thumb-item",{active:ta===g.value}]),onClick:oe=>ye(ta)},[ae!=null&&ae.blobUrl?(e.openBlock(),e.createBlock(Se,{key:0,src:ae.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ae.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(e.openBlock(),e.createElementBlock("div",Xu,"加载失败")),e.createElementVNode("div",Zu,e.toDisplayString(ae.name||"-"),1)],10,Ju))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Qu,[b.value?(e.openBlock(),e.createElementBlock("div",ed,[e.createVNode(Fe,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Le)]),_:1}),ce[11]||(ce[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(aa=Y.value)!=null&&aa.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(Se,{ref_key:"imageRef",ref:R,src:Y.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[Y.value.blobUrl],onLoad:Ce},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",ad,[(Na=Y.value)!=null&&Na.url?(e.openBlock(),e.createElementBlock("span",ld,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",rd,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",nd,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),od=Xl._export_sfc(id,[["__scopeId","data-v-48a4ecb1"]]),td={class:"cert-preview-body"},sd={key:0,class:"pdf-preview-container"},cd={class:"thumbs"},ud=["onClick"],dd={class:"thumb-img"},pd=["src"],fd={key:1,class:"thumb-loading"},hd={class:"thumb-title"},vd={class:"viewer"},md={key:0,class:"viewer-img-wrap"},yd=["src"],gd={key:1,class:"viewer-loading"},bd=e.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(""),s=e.ref(""),v=e.computed(()=>(r.versions||[]).find(_=>String(_.versionId)===String(t.value))),p=e.ref({}),f=e.ref(""),m=e.ref("证书附件.pdf"),k=()=>{try{Object.values(p.value||{}).forEach(_=>{_&&URL.revokeObjectURL(_)}),f.value&&URL.revokeObjectURL(f.value)}catch{}p.value={},f.value=""},c=async _=>{if(!_||_.fileType==="pdf")return;const G=Array.isArray(_.images)?_.images:[];for(const M of G){const $=M==null?void 0:M.url;if(!(!$||p.value[$]))try{const j=await A.platformDownloadFile({url:$}),E=URL.createObjectURL(j.data);p.value={...p.value,[$]:E}}catch{}}},D=async _=>{var M;if(!_||_.fileType!=="pdf"){f.value="";return}const G=_.sourceUrl||"";if(!G){f.value="";return}if(f.value){try{URL.revokeObjectURL(f.value)}catch{}f.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:G,versionId:_==null?void 0:_.versionId,certNo:_==null?void 0:_.certNo});const $=await A.platformDownloadFile({url:G});console.log("[CertificatePreview] PDF响应:",{url:G,status:$==null?void 0:$.status,size:(M=$==null?void 0:$.data)==null?void 0:M.size});const j=URL.createObjectURL($.data);f.value=j;const E=_.certNo?String(_.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch($){console.error("[CertificatePreview] PDF加载失败:",{url:G,error:$}),f.value=""}};e.watch(()=>r.visible,async _=>{var M;if(!_){k();return}const G=(M=r.versions)==null?void 0:M[0];t.value=(G==null?void 0:G.versionId)||"",await c(G),await D(G)},{immediate:!0}),e.watch(()=>t.value,async()=>{var G,M;const _=v.value;if(!_){s.value="",f.value="";return}if(_.fileType==="pdf"){s.value="",await D(_);return}f.value="",s.value=((M=(G=_.images)==null?void 0:G[0])==null?void 0:M.url)||"",await c(_)},{immediate:!0});const F=()=>{n("update:visible",!1),k()};return e.onBeforeUnmount(()=>{k()}),(_,G)=>{const M=e.resolveComponent("el-empty"),$=e.resolveComponent("el-tab-pane"),j=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:F},{footer:e.withCtx(()=>[e.createVNode(E,{id:"themeBorderButton",onClick:F},{default:e.withCtx(()=>G[1]||(G[1]=[e.createTextVNode("关闭")])),_:1,__:[1]})]),default:e.withCtx(()=>[_.versions&&_.versions.length>0?(e.openBlock(),e.createBlock(j,{key:0,modelValue:t.value,"onUpdate:modelValue":G[0]||(G[0]=w=>t.value=w),type:"card",class:"cert-version-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.versions,w=>(e.openBlock(),e.createBlock($,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",td,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",sd,[f.value?(e.openBlock(),e.createBlock(ll.SsFilePreview,{key:1,fileName:m.value,blobUrl:f.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(M,{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(w.images||[],b=>(e.openBlock(),e.createElementBlock("div",{key:b.url,class:e.normalizeClass(["thumb",{active:b.url===s.value}]),onClick:g=>s.value=b.url},[e.createElementVNode("div",dd,[p.value[b.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:p.value[b.url]},null,8,pd)):(e.openBlock(),e.createElementBlock("div",fd,"加载中"))]),e.createElementVNode("div",hd,e.toDisplayString(b.name),1)],10,ud))),128))]),e.createElementVNode("div",vd,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[p.value[s.value]?(e.openBlock(),e.createElementBlock("div",md,[e.createElementVNode("img",{class:"viewer-img",src:p.value[s.value]},null,8,yd)])):(e.openBlock(),e.createElementBlock("div",gd,"加载中"))],64)):(e.openBlock(),e.createBlock(M,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(M,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),kd=Xl._export_sfc(bd,[["__scopeId","data-v-220703c0"]]),xd={class:"ocr-candidate-wrap"},wd={class:"ocr-candidate-left"},_d={key:1},Sd={key:0},Ed={key:1},Cd={key:2},Dd={key:3},Nd={key:0,class:"ocr-candidate-right"},Bd={class:"ocr-candidate-actions"},Td={key:1},Ad={class:"dialog-footer"},zd={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(a,{emit:l}){const r=(g=[])=>{const R=[],I=Y=>{(Y||[]).forEach(le=>{if(!le)return;const ye=le.children||le.childrens||le.columns;Array.isArray(ye)&&ye.length>0?I(ye):R.push(le)})};return I(g),R},n=a,t=l,s=e.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowAdd)!==!1}),v=e.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowReplace)!==!1}),p=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const R=JSON.parse(g);return Array.isArray(R)?R:[]}catch{return[]}return[]},f=g=>{t("preview-file",g)},m=e.ref([]),k=e.ref(0),c=e.ref("");e.watch(()=>n.candidates,g=>{var R,I;m.value=(g||[]).map(Y=>({...Y,...(Y==null?void 0:Y.ocrRow)||{},selectedTargetId:(Y==null?void 0:Y.selectedTargetId)||"",__decision:Y==null?void 0:Y.__decision})),k.value=0,c.value=((I=(R=m.value)==null?void 0:R[0])==null?void 0:I.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>n.visible,g=>{var R,I;g&&(k.value=0,c.value=((I=(R=m.value)==null?void 0:R[0])==null?void 0:I.selectedTargetId)||"")});const D=e.computed(()=>{var R;const g=Number(k.value||0);return((R=m.value||[])==null?void 0:R[g])||null}),F=e.computed(()=>(r(n.columns||[])||[]).filter(I=>I&&I.prop).filter(I=>I.type!=="operate"&&I.label!=="操作"&&I.prop!=="operate")),_=e.computed(()=>F.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),G=g=>{if(!g)return;const R=(m.value||[]).findIndex(I=>(I==null?void 0:I.idx)===(g==null?void 0:g.idx));R>-1&&(k.value=R,c.value=(g==null?void 0:g.selectedTargetId)||"")},M=g=>{if(!g){c.value="";return}c.value=String((g==null?void 0:g.id)??"")},$=(g,R="")=>{const I=Number(k.value||0),Y=m.value||[],le=Y[I];le&&(le.__decision=g,le.selectedTargetId=R,c.value=R,m.value=[...Y])},j=()=>$("skip",""),E=()=>$("add",""),S=()=>{if(!c.value){qa.ElMessage.warning("请先选择要替换的目标记录");return}$("replace",c.value)},w=()=>{t("update:visible",!1)},b=()=>{const g=m.value||[];if(g.find(I=>(I==null?void 0:I.__decision)==="replace"&&!(I!=null&&I.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}t("submit",g),t("update:visible",!1)};return(g,R)=>{const I=e.resolveComponent("el-table-column"),Y=e.resolveComponent("svg-icon"),le=e.resolveComponent("el-table"),ye=e.resolveComponent("el-button"),Te=e.resolveComponent("el-alert");return e.openBlock(),e.createBlock(wr.ssDialog,{title:"OCR候选匹配",visible:a.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:w},{default:e.withCtx(()=>{var V,se;return[e.createElementVNode("div",xd,[e.createElementVNode("div",wd,[R[0]||(R[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(le,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:G},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,ee=>(e.openBlock(),e.createBlock(I,{key:ee.prop,label:ee.label,prop:ee.prop,"min-width":ee.minWidth||160},{default:e.withCtx(({row:ue})=>[ee.label==="证书附件"||ee.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p(ue==null?void 0:ue[ee.prop]).length>0?(e.openBlock(),e.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ce=>f({row:ue,prop:ee.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",_d,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ue==null?void 0:ue[ee.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode(I,{label:"候选数",width:"90",fixed:"right"},{default:e.withCtx(({row:ee})=>[e.createTextVNode(e.toDisplayString(((ee==null?void 0:ee.candidates)||[]).length),1)]),_:1}),e.createVNode(I,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:ee})=>[(ee==null?void 0:ee.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Sd,"替换")):(ee==null?void 0:ee.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Ed,"新增")):(ee==null?void 0:ee.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Cd,"跳过")):(e.openBlock(),e.createElementBlock("span",Dd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Nd,[R[4]||(R[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Bd,[e.createVNode(ye,{id:"themeBorderButton",onClick:j},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(ye,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>R[2]||(R[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:S,disabled:!v.value||!c.value},{default:e.withCtx(()=>R[3]||(R[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((V=D.value)==null?void 0:V.candidates)||[]).length===0?(e.openBlock(),e.createBlock(Te,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(le,{data:((se=D.value)==null?void 0:se.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:M,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode(I,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,ee=>(e.openBlock(),e.createBlock(I,{key:ee.prop,label:ee.label,prop:ee.prop,"min-width":ee.minWidth||160},{default:e.withCtx(({row:ue})=>[ee.label==="证书附件"||ee.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[p(ue==null?void 0:ue[ee.prop]).length>0?(e.openBlock(),e.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ce=>f({row:ue,prop:ee.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Td,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((ue==null?void 0:ue[ee.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Ad,[e.createVNode(ye,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>R[5]||(R[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(ye,{class:"ok-button",id:"themeButton",onClick:b},{default:e.withCtx(()=>R[6]||(R[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Md=Xl._export_sfc(zd,[["__scopeId","data-v-89e0489c"]]),Id={class:"ocr-preview-content"},Od={class:"ocr-preview-tip"},Ld={class:"ocr-preview-table"},$d={style:{display:"flex","align-items":"center",gap:"8px"}},Rd={class:"dialog-footer"},Vd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]),s=e.ref([]),v=e.ref([]);e.watch(()=>r.visible,F=>{F&&(t.value=JSON.parse(JSON.stringify(r.ocrPreviewData)),s.value=JSON.parse(JSON.stringify(r.ocrPreviewColumns)),v.value=[...r.ocrSelectedFields])});const p=(F,_)=>{const G=[...v.value];if(_)G.includes(F)||G.push(F);else{const M=G.indexOf(F);M>-1&&G.splice(M,1)}v.value=G,n("update:ocrSelectedFields",G)},f=(F,_,G)=>{n("fieldChange",{rowIndex:F,prop:_,value:G})},m=()=>{n("update:ocrPreviewData",t.value),n("confirm",t.value),n("update:visible",!1)},k=()=>{n("update:visible",!1)},c=F=>typeof F!="number"?"-":`${(F*100).toFixed(1)}%`,D=F=>typeof F!="number"?"#606266":F>=.9?"#67c23a":F>=.7?"#e6a23c":"#f56c6c";return(F,_)=>{const G=e.resolveComponent("el-alert"),M=e.resolveComponent("el-table-column"),$=e.resolveComponent("el-checkbox"),j=e.resolveComponent("el-input"),E=e.resolveComponent("el-table"),S=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(wr.ssDialog,{title:"OCR识别结果预览",visible:a.visible,onBeforeDestroy:k,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Id,[e.createElementVNode("div",Od,[e.createVNode(G,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Ld,[e.createVNode(E,{data:t.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(M,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(M,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",$d,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:0,"model-value":v.value.includes(w.prop),onChange:b=>p(w.prop,b),onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),e.createElementVNode("span",null,e.toDisplayString(w.label),1)])]),default:e.withCtx(({row:b,$index:g})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:D(b[w.prop]),fontWeight:500})},e.toDisplayString(c(b[w.prop])),5)):(e.openBlock(),e.createBlock(j,{key:1,modelValue:b[w.prop],"onUpdate:modelValue":R=>b[w.prop]=R,size:"small",placeholder:"请输入"+w.label,onChange:R=>f(g,w.prop,R)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rd,[e.createVNode(S,{onClick:k,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"])}}},Fd=Xl._export_sfc(Vd,[["__scopeId","data-v-df66eb1f"]]),Eo=a=>{var n;let l=a;(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let r=(n=he.analyzeSplitToContent(l,","))==null?void 0:n.map(t=>((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)),un(t)));return r=r==null?void 0:r.join(","),r};function Xs(a){return qa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function Pd(a){return qa.axios.get(a,{responseType:"blob"})}let Wl="$R",jd="http://222.92.178.198:55002/AIRobot",tt=["Form","BarChart","FormText","FormBlock"];const Zs=a=>{var r,n;let l=(n=he.analyzeSplitToContent(a,"@"))==null?void 0:n[((r=he.analyzeSplitToContent(a,"@"))==null?void 0:r.length)-1];return!!(tt!=null&&tt.some(t=>l==null?void 0:l.includes(t)))},Hd=async(a,l,r,n)=>{var s,v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta;let t=a;if(Zs(t==null?void 0:t[0])){let oe=Jd(t),ca=(s=oe==null?void 0:oe.filter)==null?void 0:s.join(","),Ee=[];(v=oe==null?void 0:oe.hideContents)==null||v.forEach(Ue=>{if(Ue){const oa=Ue;oa&&Ee.push(`(HideGroup=Yes, prop=${oa})`)}});let ie=(p=oe==null?void 0:oe.formContents)==null?void 0:p.filter(Ue=>{var oa;return(oa=Ue==null?void 0:Ue.filters)==null?void 0:oa.includes("@ShowHide=Hide")});(ie==null?void 0:ie.length)>0&&(ie==null||ie.forEach(Ue=>{if(Ue){const oa=Ue==null?void 0:Ue.prop;oa&&Ee.push(`(Hide=Yes, prop=${oa})`)}}));let Be=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Be)||(Be=Be?[Be]:[]),Be=[...Be,...Ee],{key:"Form",name:oe==null?void 0:oe.groupName,value:oe==null?void 0:oe.formContents,contents:Array.isArray((f=oe==null?void 0:oe.contents)==null?void 0:f[0])&&((k=(m=oe==null?void 0:oe.contents)==null?void 0:m[0])!=null&&k.every(Ue=>Array.isArray(Ue)))?[(D=(c=oe==null?void 0:oe.contents)==null?void 0:c[0])==null?void 0:D[r]]:[oe==null?void 0:oe.contents],filter:"("+ca+")",menuFilter:Be,groupFilter:oe==null?void 0:oe.groupFilters}}else if(((F=t==null?void 0:t[0])==null?void 0:F[0])!=="&"){let oe=ac(t,n),ca="";(_=oe==null?void 0:oe.tableFilter)!=null&&_.includes(Wl)?oe.tableFilter=(G=oe==null?void 0:oe.tableFilter)==null?void 0:G.replace(Wl,""):ca=(j=($=(M=oe==null?void 0:oe.tableFilter)==null?void 0:M.replace("(",Wl))==null?void 0:$.split(Wl))==null?void 0:j[0];let Ee=[];oe!=null&&oe.tableFilter&&((E=he.analyzeSplitToContent(oe==null?void 0:oe.tableFilter,","))==null||E.forEach(Be=>{Be!=null&&Be.includes("@ShowHide=Hide")&&Ee.push("HideGroup=Yes")}));let ie=(n==null?void 0:n.menuFilter)??[];return Array.isArray(ie)||(ie=ie?[ie]:[]),ie=[...ie,...Ee],{key:"Table",name:oe==null?void 0:oe.groupName,tableColumns:oe==null?void 0:oe.tableColumns,assistColumn:oe==null?void 0:oe.columns,tableContents:l===1?oe==null?void 0:oe.tableContents:(w=(S=oe==null?void 0:oe.tableContents)==null?void 0:S[r])!=null&&w.every(Be=>Array.isArray(Be))?(b=oe==null?void 0:oe.tableContents)==null?void 0:b[r]:[(g=oe==null?void 0:oe.tableContents)==null?void 0:g[r]],filter:oe==null?void 0:oe.tableFilter,menuFilter:ie,quotePage:ca!==""?((Y=(I=(R=ca==null?void 0:ca.replace("*",Wl))==null?void 0:R.split(Wl))==null?void 0:I[0])==null?void 0:Y.replaceAll(":","/"))??"":void 0,quoteGroup:ca!==""?((ue=(ee=(se=(V=(Te=(ye=(le=ca==null?void 0:ca.replace("*",Wl))==null?void 0:le.split(Wl))==null?void 0:ye[1])==null?void 0:Te.replace("{",Wl))==null?void 0:V.split(Wl))==null?void 0:se[0])==null?void 0:ee.split(":"))==null?void 0:ue.filter(Be=>Be!==""))??[]:[],relatedQuotes:oe==null?void 0:oe.relatedQuotes,fatherSyncContents:oe==null?void 0:oe.fatherSyncContents,sonSyncContents:oe==null?void 0:oe.sonSyncContents}}else{let oe=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],ca=t==null?void 0:t[0];ca=ca==null?void 0:ca.slice(1,ca==null?void 0:ca.length),ca=he.analyzeSplitToContent(ca,":"),ca=ca==null?void 0:ca[(ca==null?void 0:ca.length)-1];let Ee=[];Ee.push("1");let ie=ca==null?void 0:ca.replace("(",Wl);ie=(Ce=ie==null?void 0:ie.split(Wl))==null?void 0:Ce[0],Ee.push(ie);let Be=ca==null?void 0:ca.replace("(",Wl);if(Be=(Pe=Be==null?void 0:Be.split(Wl))==null?void 0:Pe[1],Be=(B=(ve=Be==null?void 0:Be.replace(")",Wl))==null?void 0:ve.split(Wl))==null?void 0:B[0],(W=(ce=Be==null?void 0:Be.replace(",",Wl))==null?void 0:ce.split(Wl))==null||W.forEach(Ue=>{Ee.push(Ue)}),Ee.push(""),Ee.push(""),(Se=Ee==null?void 0:Ee[2])!=null&&Se.includes(".xlsx")||(Le=Ee==null?void 0:Ee[2])!=null&&Le.includes(".xls"))try{let Ue=jd+"/"+(Ee==null?void 0:Ee[2]),oa=await Pd(Ue),Ja=`生成js函数名称为${Ee==null?void 0:Ee[1]}的函数,规则为:`+(Ee==null?void 0:Ee[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((oa==null?void 0:oa.status)===200){let L=oa==null?void 0:oa.data;const H=new FormData;H.append("file",L,Ee==null?void 0:Ee[2]),H.append("query",Ja);let Z=await Xs(H);Z=(Na=(aa=(Fe=Z==null?void 0:Z.data)==null?void 0:Fe.data)==null?void 0:aa.response)==null?void 0:Na.replace("generateResult",Ee==null?void 0:Ee[1]),Ee[Ee.length-2]=Z,Ee[Ee.length-1]=[{name:(ta=(ae=Ee==null?void 0:Ee[2])==null?void 0:ae.split("."))==null?void 0:ta[0],url:Ue}]}}catch{}return Ee=[Ee],{key:"Method",name:[],tableContents:Ee,tableColumns:oe}}},Ud=(a,l)=>{var n,t,s,v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee;let r=(t=(n=he.analyzeSplitToContent(a,"="))==null?void 0:n.filter(ie=>ie!=="="))==null?void 0:t.map(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));if(Zs(r==null?void 0:r[1])){let ie=Yd(r),Be=(p=(v=(s=ie==null?void 0:ie.filter)==null?void 0:s.replace("@",Wl))==null?void 0:v.split(Wl))==null?void 0:p[0],Ue=(k=(m=(f=ie==null?void 0:ie.filter)==null?void 0:f.replace("(",Wl))==null?void 0:m.split(Wl))==null?void 0:k[1],oa=(F=(D=(c=ie==null?void 0:ie.filter)==null?void 0:c.replace("(",Wl))==null?void 0:D.split(Wl))==null?void 0:F[0];oa="@"+((_=oa==null?void 0:oa.split("@"))==null?void 0:_[1]),Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1),Ue=(M=(G=he.analyzeSplitToContent(Ue,","))==null?void 0:G.map(L=>(L=oa+L,L)))==null?void 0:M.join("");let Ja=Be+"("+Ue+")";return{key:"Form",name:ie==null?void 0:ie.group,filter:Ja,formPage:((E=(j=($=Be==null?void 0:Be.replace("*",Wl))==null?void 0:$.split(Wl))==null?void 0:j[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((Y=(I=(R=(g=(b=(w=(S=Be==null?void 0:Be.replace("*",Wl))==null?void 0:S.split(Wl))==null?void 0:w[1])==null?void 0:b.replace("{",Wl))==null?void 0:g.split(Wl))==null?void 0:R[0])==null?void 0:I.split(":"))==null?void 0:Y.filter(L=>L!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let ie=ac(r,l,r==null?void 0:r[1]),Be="";(le=ie==null?void 0:ie.tableFilter)!=null&&le.includes(Wl)?ie.tableFilter=(ye=ie==null?void 0:ie.tableFilter)==null?void 0:ye.replace(Wl,""):Be=(se=(V=(Te=ie==null?void 0:ie.tableFilter)==null?void 0:Te.replace("(",Wl))==null?void 0:V.split(Wl))==null?void 0:se[0];let Ue=(Ce=(ue=(ee=ie==null?void 0:ie.tableFilter)==null?void 0:ee.replace("(",Wl))==null?void 0:ue.split(Wl))==null?void 0:Ce[0];Ue=[{menus:(ve=(Pe=Ue==null?void 0:Ue.split("*"))==null?void 0:Pe[0])==null?void 0:ve.replaceAll(":","/"),groups:((ce=(B=Ue==null?void 0:Ue.split("*"))==null?void 0:B[1])==null?void 0:ce.split(":"))??[]}];let oa=(Le=(Se=(W=ie==null?void 0:ie.tableFilter)==null?void 0:W.replace("(",Wl))==null?void 0:Se.split(Wl))==null?void 0:Le[1];(oa==null?void 0:oa[(oa==null?void 0:oa.length)-1])===")"&&(oa=oa==null?void 0:oa.slice(0,(oa==null?void 0:oa.length)-1));let Ja=[];ie!=null&&ie.tableFilter&&((Fe=he.analyzeSplitToContent(ie==null?void 0:ie.tableFilter,","))==null||Fe.forEach(H=>{H!=null&&H.includes("@ShowHide=Hide")&&Ja.push("HideGroup=Yes")}));let L=(l==null?void 0:l.menuFilter)??[];return Array.isArray(L)||(L=L?[L]:[]),L=[...L,...Ja],{key:"Table",name:ie==null?void 0:ie.groupName,filter:ie==null?void 0:ie.tableFilter,tableColumns:ie==null?void 0:ie.tableColumns,quotePage:Be!==""?((ae=(Na=(aa=Be==null?void 0:Be.replace("*",Wl))==null?void 0:aa.split(Wl))==null?void 0:Na[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:Be!==""?((Ee=(ca=(oe=(ta=Be==null?void 0:Be.replace("*",Wl))==null?void 0:ta.split(Wl))==null?void 0:oe[1])==null?void 0:ca.split(":"))==null?void 0:Ee.filter(H=>H!==""))??[]:[],menuFilter:L,relatedQuotes:Ue,fatherSyncContents:(ie==null?void 0:ie.fatherSyncContents)??[],sonSyncContents:(ie==null?void 0:ie.sonSyncContents)??[]}}},qd=async(a,l)=>{let r=[],n=l==null?void 0:l.length;return l=l==null?void 0:l.map(async(t,s)=>{let v=[];t=t==null?void 0:t.map(async p=>{var f,m;if(v.push(p),((f=he.analyzeSplitToContent(a,"="))==null?void 0:f.length)<=2){if(((m=he.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const k=await Hd(he.analyzeSplitToContent(a,"="),n,s,p);v.push(k)}}else v.push(Ud(a,p))}),await Promise.all(t),r.push(v)}),await Promise.all(l),r};let Vi="/",Wd="$",hn="$R";const Qs=a=>{var r,n,t;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((v,p)=>p!==0);s=s==null?void 0:s.join(""),s=he.analyzerSplitToWord(s,")"),(s==null?void 0:s.length)!==1?(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"?s=s==null?void 0:s.join(""):s=(r=s==null?void 0:s.filter((v,p)=>p!==(s==null?void 0:s.length)-1))==null?void 0:r.join(""):s=s==null?void 0:s[0],l="("+s,((t=a==null?void 0:a[0])==null?void 0:t[((n=a==null?void 0:a[0])==null?void 0:n.length)-2])==="@"&&(l="@"+l)}return{filter:l}},ec=(a,l=[])=>{let r=(a==null?void 0:a.map(s=>{var v,p;return(p=s==null?void 0:s.key)==null?void 0:p.slice(1,(v=s==null?void 0:s.key)==null?void 0:v.length)}))??[],n=[];r==null||r.forEach(s=>{var v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Wd)){let Te="",V=!0,se=he.analyzerSplitToWord(s,"(");(se==null?void 0:se.length)>1&&(Te="("+((v=he.analyzerSplitToWord(se==null?void 0:se[1],")"))==null?void 0:v[0]),((f=se==null?void 0:se[0])==null?void 0:f[((p=se==null?void 0:se[0])==null?void 0:p.length)-2])==="@"&&(Te="@"+Te));let ee=s;ee=ee==null?void 0:ee.replace(Te,""),Te=un(Te),Te=(m=he.analyzeSplitToContent(Te,","))==null?void 0:m.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)),Te!=null&&Te.includes("@ShowHide=Hide")&&(V=!1);let ue=(k=ee==null?void 0:ee.replace("$",hn))==null?void 0:k.split(hn),Ce=ue==null?void 0:ue[1],Pe=ue==null?void 0:ue[0];Pe!=null&&Pe.includes("[")&&(Pe=(D=(c=Pe==null?void 0:Pe.replace("[",hn))==null?void 0:c.split(hn))==null?void 0:D[0],Ce=Ce+":["+((G=(_=(F=ue==null?void 0:ue[0])==null?void 0:F.replace("[",hn))==null?void 0:_.split(hn))==null?void 0:G[1])),Pe=($=(M=Pe==null?void 0:Pe.replaceAll(":","/"))==null?void 0:M.replaceAll("{",""))==null?void 0:$.replaceAll("}",""),(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])!=="/"&&(Pe=Pe+"/"),Ce=((j=Pe==null?void 0:Pe.split("/"))==null?void 0:j[0])+":"+Ce;let B="";if(!(Ce!=null&&Ce.includes("[")))B=Ce==null?void 0:Ce.replaceAll(":","/"),n==null||n.push({path:B,isShow:V,filter:Te,fatherPath:Pe});else{let ce=(S=(E=Ce==null?void 0:Ce.replace("[",hn))==null?void 0:E.split(hn))==null?void 0:S[1];ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1),ce=(w=he.analyzeSplitToContent(ce,","))==null?void 0:w.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])===","&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W)),ce==null||ce.forEach(W=>{var Se,Le;B=((Le=(Se=Ce==null?void 0:Ce.replace("[",hn))==null?void 0:Se.split(hn))==null?void 0:Le[0])+W,B=B==null?void 0:B.replaceAll(":","/"),n==null||n.push({path:B,isShow:V,filter:Te,fatherPath:Pe})})}}else{let Te="",V=!0,se=he.analyzerSplitToWord(s,"(");(se==null?void 0:se.length)>1&&(Te=(b=Qs(se))==null?void 0:b.filter);let ee=s;if(ee=ee==null?void 0:ee.replace(Te,""),(Te==null?void 0:Te[0])==="("){Te=Te==null?void 0:Te.slice(1,(Te==null?void 0:Te.length)-1);let Ce=[];(g=he.analyzeSplitToContent(Te,","))==null||g.forEach(Pe=>{(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])===","&&(Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1)),(Pe==null?void 0:Pe[0])==="("&&(Pe=Pe==null?void 0:Pe.slice(1,(Pe==null?void 0:Pe.length)-1)),(Pe==null?void 0:Pe[0])!=="@"&&(Pe="@"+Pe),Ce.push(un(Pe))}),Te=Ce==null?void 0:Ce.join(",")}else Te=un(Te);Te=(R=he.analyzeSplitToContent(Te,","))==null?void 0:R.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)),Te!=null&&Te.includes("@ShowHide=Hide")&&(V=!1),(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])==="}"&&(ee=ee+":"),ee=(I=ee==null?void 0:ee.replaceAll("{",""))==null?void 0:I.replaceAll("}","");let ue="";if(ee!=null&&ee.includes("[")){let Ce=(Y=ee==null?void 0:ee.replace("[",hn))==null?void 0:Y.split(hn),Pe=Ce==null?void 0:Ce[1];Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1),(ye=(le=he.analyzeSplitToContent(Pe,","))==null?void 0:le.map(ve=>((ve==null?void 0:ve[(ve==null?void 0:ve.length)-1])===","&&(ve=ve==null?void 0:ve.slice(0,(ve==null?void 0:ve.length)-1)),ve)))==null||ye.forEach(ve=>{ue=(Ce==null?void 0:Ce[0])+ve,ue=ue==null?void 0:ue.replaceAll(":","/"),n==null||n.push({path:ue,isShow:V,filter:Te})})}else ue=ee==null?void 0:ee.replaceAll(":","/"),n==null||n.push({path:ue,isShow:V,filter:Te})}});let t=A.cloneDeep(n);return(l==null?void 0:l.length)>0&&(t=l),t=t==null?void 0:t.filter(s=>{var v,p,f,m;return!(s!=null&&s.fatherPath)&&((p=(v=s==null?void 0:s.path)==null?void 0:v.split(Vi))==null?void 0:p.length)>1&&((m=(f=s==null?void 0:s.path)==null?void 0:f.split(Vi))==null?void 0:m[1])===""}),t=t==null?void 0:t.map(s=>{var v;return s.path=(v=s.path)==null?void 0:v.replace(Vi,""),s.path}),(t==null?void 0:t.length)>0&&(n=n==null?void 0:n.map(s=>{var p,f,m,k,c,D,F;let v=t==null?void 0:t.find(_=>{var G;return(G=s==null?void 0:s.path)==null?void 0:G.includes(_)});return!(s!=null&&s.fatherPath)&&v&&!((p=s==null?void 0:s.path)!=null&&p.includes(Vi))&&!(t!=null&&t.find(_=>(s==null?void 0:s.path)===_))&&(s.path=v+Vi+((F=(m=(f=s==null?void 0:s.path)==null?void 0:f.split(v))==null?void 0:m[1])==null?void 0:F.slice(1,(D=(c=(k=s==null?void 0:s.path)==null?void 0:k.split(v))==null?void 0:c[1])==null?void 0:D.length))),s})),n},Kd=(a,l)=>ec([{key:a}],l),Gd=async(a,l)=>{const r=[],n=Kd(a==null?void 0:a.key,l);return n&&(n==null?void 0:n.length)>0&&(n==null||n.forEach(s=>{r.push([{key:"path",value:s==null?void 0:s.path,parentPath:(s==null?void 0:s.parentPath)??"",isShow:s==null?void 0:s.isShow,menuFilter:s==null?void 0:s.filter}])})),await qd(a==null?void 0:a.value,r)};let gl="$R",Pi="[Any]";const Yd=a=>{var v,p;let l={},n=a==null?void 0:a[0];(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),n=n==null?void 0:n.split(":"),l.group=n;let t=a==null?void 0:a[1],s;return t!=null&&t.includes("{")?s=(p=(v=t==null?void 0:t.replaceAll("{",""))==null?void 0:v.replaceAll("}",""))==null?void 0:p.replaceAll(Pi,""):s=t==null?void 0:t.replaceAll(Pi,""),(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),l.filter=s,l},Jd=a=>{var D,F,_,G,M,$;let l=[],r=[],n=[],t=[],s=[],v=[],p="",f=a==null?void 0:a[0];(f==null?void 0:f[0])==="*"&&(f=f==null?void 0:f.slice(1,f==null?void 0:f.length));let m=he.analyzeSplitToContent(f,":");(D=m==null?void 0:m.filter(j=>(j==null?void 0:j[0])!=="{"&&(j==null?void 0:j[0])!=="["))==null||D.forEach(j=>{var S,w,b;(j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1));let E=he.analyzerSplitToWord(j,"(");if((E==null?void 0:E.length)>1){p=(S=Qs(E))==null?void 0:S.filter;let g=j==null?void 0:j.replace(p,"");if(n.push(g),(p==null?void 0:p[0])==="("){p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1);let R=[];(w=he.analyzeSplitToContent(p,","))==null||w.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),R.push(un(I))}),p=R==null?void 0:R.join(",")}else p=un(p);p=(b=he.analyzeSplitToContent(p,","))==null?void 0:b.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)),p!=null&&p.includes("@ShowHide=Hide")&&v.push(g),t=[...t,...p]}else n.push(E==null?void 0:E[0])});let k=(F=m==null?void 0:m.filter(j=>(j==null?void 0:j[0])==="{"))==null?void 0:F[0],c=(_=m==null?void 0:m.filter(j=>(j==null?void 0:j[0])==="["))==null?void 0:_[0];return l=Ci(c??""),l!=null&&l.every(j=>Array.isArray(j))&&(l=[l]),(k==null?void 0:k[(k==null?void 0:k.length)-1])===":"&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),s=(G=he.analyzeSplitToContent(k,"@"))==null?void 0:G[1],s="@"+s,k=k==null?void 0:k.replace(s,""),s=un(s),s=(M=he.analyzeSplitToContent(s,","))==null?void 0:M.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),(k==null?void 0:k[0])==="{"&&(k=k==null?void 0:k.slice(1,(k==null?void 0:k.length)-1)),k=($=he.analyzeSplitToContent(k,","))==null?void 0:$.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),k==null||k.forEach((j,E)=>{var V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da;let S=[],w=[],b=!1,g,R=[],I=[],Y=[],le="Input",ye=[],Te=[];if(j!=null&&j.includes("==")){g=(V=j==null?void 0:j.split("=="))==null?void 0:V[0];let Qe=(se=j==null?void 0:j.split("=="))==null?void 0:se[1],te="";((ee=he.analyzeSplitToContent(Qe,"$"))==null?void 0:ee.length)>1&&((ue=he.analyzeSplitToContent(Qe,"$"))==null?void 0:ue[0])!=="$"?(te=(Ce=he.analyzeSplitToContent(Qe,"$"))==null?void 0:Ce[0],te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)):((Pe=he.analyzeSplitToContent(Qe,"}"))==null?void 0:Pe.length)>1&&(te=(ve=he.analyzeSplitToContent(Qe,"}"))==null?void 0:ve[1]);let pa=Qe==null?void 0:Qe.replace(te,"");(te==null?void 0:te[0])==="("&&(te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1)),(B=he.analyzeSplitToContent(te,","))==null||B.forEach(We=>{var Da;(We==null?void 0:We[0])!=="@"&&(We="@"+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));let Aa=un(We);(Da=he.analyzeSplitToContent(Aa,","))==null||Da.forEach(Ze=>{(Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1)),S.push(Ze)})}),(pa==null?void 0:pa[0])==="$"&&(pa=pa==null?void 0:pa.slice(1,pa==null?void 0:pa.length));let Ne=(ce=pa==null?void 0:pa.replace("*",gl))==null?void 0:ce.split(gl);R=(W=Ne==null?void 0:Ne[0])==null?void 0:W.split(":"),I=(Le=(Se=he.analyzeSplitToContent(Ne==null?void 0:Ne[1],":"))==null?void 0:Se.filter((We,Aa)=>{var Da,Ze;return Aa!==((Ze=(Da=Ne==null?void 0:Ne[1])==null?void 0:Da.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:Le.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)),Y=(aa=(Fe=he.analyzeSplitToContent(Ne==null?void 0:Ne[1],":"))==null?void 0:Fe.filter((We,Aa)=>{var Da,Ze;return Aa===((Ze=(Da=Ne==null?void 0:Ne[1])==null?void 0:Da.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:aa[0],Y=(ae=(Na=Y==null?void 0:Y.replaceAll("{",""))==null?void 0:Na.replaceAll("}",""))==null?void 0:ae.split(":"),le="Select"}else if(((ta=he.analyzeSplitToContent(j,"="))==null?void 0:ta.length)>1)if(le="Select",g=(ca=(oe=j==null?void 0:j.replace("=",gl))==null?void 0:oe.split(gl))==null?void 0:ca[0],!(j!=null&&j.includes("If")))ye=(ie=(Ee=j==null?void 0:j.replace("=",gl))==null?void 0:Ee.split(gl))==null?void 0:ie[1],ye=ye==null?void 0:ye.split("||");else{let Qe=(Ue=(Be=j==null?void 0:j.replace("=",gl))==null?void 0:Be.split(gl))==null?void 0:Ue[1];Te=(oa=he.analyzeSplitToContent(Qe,")"))==null?void 0:oa.filter(te=>!(te!=null&&te.includes("If"))),Te=Te==null?void 0:Te.map(te=>((te==null?void 0:te[0])==="("&&(te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1)),te=te==null?void 0:te.split("||"),te)),w=(Ja=he.analyzeSplitToContent(Qe,")"))==null?void 0:Ja.filter(te=>te==null?void 0:te.includes("If")),w=w==null?void 0:w.map(te=>((te==null?void 0:te[0])==="|"&&(te=te==null?void 0:te.slice(2,te==null?void 0:te.length)),(te==null?void 0:te[0])==="("&&(te=te==null?void 0:te.slice(1,(te==null?void 0:te.length)-1)),(te==null?void 0:te[0])!=="@"&&(te="@"+te),te))}else if(((L=he.analyzeSplitToContent(j,"@"))==null?void 0:L.length)>1){g=(H=he.analyzeSplitToContent(j,"@"))==null?void 0:H[0],(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));let Qe="@"+((Z=he.analyzeSplitToContent(j,"@"))==null?void 0:Z[1]);Qe=un(Qe),S=(me=he.analyzeSplitToContent(Qe,","))==null?void 0:me.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te)),S!=null&&S.find(te=>te==null?void 0:te.includes("@Type"))&&(le=(da=(fe=S==null?void 0:S.find(te=>te==null?void 0:te.includes("@Type")))==null?void 0:fe.split("="))==null?void 0:da[1])}else g=j;S!=null&&S.includes("@ShowHide=Hide")&&(b=!0),r.push({prop:g,label:g,value:"",menuPath:R,groups:I,columns:Y,type:le,options:ye,allContents:Te,filters:S,width:k==null?void 0:k.length,isFormColHidden:b,filterContents:w})}),{groupName:n,groupFilters:t,formContents:r,contents:l,filter:s,hideContents:v}},Ci=a=>{var n,t;if(!a||typeof a!="string")return[];let l=[],r=a.slice(1,(a==null?void 0:a.length)-1);if((r==null?void 0:r[0])!=="[")(n=he.analyzeSplitToContent(r,","))==null||n.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),l.push(s??"")});else{let s=[];(t=he.analyzeSplitToContent(r,","))==null||t.forEach(v=>{(v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),s.push(Ci(v))}),l=s}return l},ft=(a,l)=>{var $,j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze;let r,n=[],t=[],s=[],v=[],p=[],f=[],m=[],k="Input",c,D="",F="",_="",G=[],M="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(r=($=a==null?void 0:a.split("=="))==null?void 0:$[0],c=(j=a==null?void 0:a.split("=="))==null?void 0:j[0],k="Select",a!=null&&a.includes("=")&&!(a!=null&&a.includes("=="))&&!((w=(S=(E=a==null?void 0:a.replace("=",gl))==null?void 0:E.split(gl))==null?void 0:S[1])!=null&&w.includes("If")))if(r=he.analyzeSplitToContent(a,"@"),r=r==null?void 0:r[0],(r==null?void 0:r[(r==null?void 0:r.length)-1])==="@"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),r=(g=(b=r==null?void 0:r.replace("=",gl))==null?void 0:b.split(gl))==null?void 0:g[0],r!=null&&r.includes("&")&&(r=(I=(R=r==null?void 0:r.replace("&",gl))==null?void 0:R.split(gl))==null?void 0:I[0]),c=r,((Y=he.analyzeSplitToContent(a,"@"))==null?void 0:Y.length)>1){if(!(a!=null&&a.includes("&"))){let ra=(le=he.analyzeSplitToContent(a,"@"))==null?void 0:le[1];if((ra==null?void 0:ra[0])!=="@"&&(ra="@"+ra),ra=un(ra),F=ra,F!=null&&F.includes("@Type")){let pe=he.analyzeSplitToContent(F,",");pe=pe==null?void 0:pe.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)),pe=(ye=pe==null?void 0:pe.filter(U=>U==null?void 0:U.includes("@Type")))==null?void 0:ye[0],k=(Te=pe==null?void 0:pe.split("="))==null?void 0:Te[1]}}}else a!=null&&a.includes("||")?n=(ee=(se=(V=a==null?void 0:a.split("="))==null?void 0:V[1])==null?void 0:se.split("||"))==null?void 0:ee.map(ra=>({label:ra==null?void 0:ra.replaceAll("'",""),value:ra==null?void 0:ra.replaceAll("'","")})):(k="Input",D=(Pe=(Ce=(ue=a==null?void 0:a.replace("=",gl))==null?void 0:ue.split(gl))==null?void 0:Ce[1])==null?void 0:Pe.replaceAll("'",""));else if((ce=(B=(ve=a==null?void 0:a.replace("=",gl))==null?void 0:ve.split(gl))==null?void 0:B[1])!=null&&ce.includes("||")){r=(W=a==null?void 0:a.split("="))==null?void 0:W[0],c=(Se=a==null?void 0:a.split("="))==null?void 0:Se[0];let ra=(Fe=(Le=a==null?void 0:a.replace("=",gl))==null?void 0:Le.split(gl))==null?void 0:Fe[1];ra=he.analyzeSplitToContent(ra,")");let pe=ra==null?void 0:ra.filter(q=>!(q!=null&&q.includes("If")));pe==null||pe.forEach(q=>{(q==null?void 0:q[0])==="("&&(q=q==null?void 0:q.slice(1,(q==null?void 0:q.length)-1)),t==null||t.push(q==null?void 0:q.split("||"))});let U=ra==null?void 0:ra.filter(q=>q==null?void 0:q.includes("If"));U=U==null?void 0:U.map(q=>((q==null?void 0:q[0])==="|"&&(q==null?void 0:q[1])==="|"&&(q=q==null?void 0:q.slice(2,q==null?void 0:q.length)),(q==null?void 0:q[0])==="("&&(q=q==null?void 0:q.slice(1,(q==null?void 0:q.length)-1)),(q==null?void 0:q[0])!=="@"&&(q="@"+q),q)),s=U}else{let ra=a==null?void 0:a.split("=="),pe=(aa=ra==null?void 0:ra.filter(U=>(U==null?void 0:U.includes("$"))&&(U==null?void 0:U[0])!=="{"))==null?void 0:aa[0];if(pe&&!(pe!=null&&pe.includes("&"))){let U=(Na=pe==null?void 0:pe.replace("*",gl))==null?void 0:Na.split(gl),q=(U==null?void 0:U[0])===""?l==null?void 0:l.value:U==null?void 0:U[0];(q==null?void 0:q[0])==="("&&(q=(ae=he.analyzeSplitToContent(q,")"))==null?void 0:ae[1]),q=(oe=(ta=q==null?void 0:q.replaceAll("{",""))==null?void 0:ta.replaceAll("}",""))==null?void 0:oe.replaceAll(Pi,""),(q==null?void 0:q[0])==="$"&&(q=(ca=q==null?void 0:q.slice(1,q==null?void 0:q.length))==null?void 0:ca.replaceAll(":","/")),v=q==null?void 0:q.split("/");let ze=(ie=(Ee=U==null?void 0:U[1])==null?void 0:Ee.replace("{",gl))==null?void 0:ie.split(gl),_e=ze==null?void 0:ze[0];(_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)),p=_e==null?void 0:_e.split(":"),f=(Ja=(oa=(Ue=(Be=ze==null?void 0:ze[1])==null?void 0:Be.replace("}",gl))==null?void 0:Ue.split(gl))==null?void 0:oa[0])==null?void 0:Ja.split(":");let la="";((L=he.analyzeSplitToContent(pe,")"))==null?void 0:L.length)>1&&(la=(H=he.analyzeSplitToContent(pe,")"))==null?void 0:H[0]),la&&la!==""&&((la==null?void 0:la[0])!=="@"&&(la="@"+la),F=Eo(la))}if(ra!=null&&ra.some(U=>(U==null?void 0:U[0])==="&")){let U=(Z=ra==null?void 0:ra.filter(_e=>(_e==null?void 0:_e[0])==="&"))==null?void 0:Z[0];(U==null?void 0:U[0])==="&"&&(U=U==null?void 0:U.slice(1,U==null?void 0:U.length)),_=(fe=(me=U==null?void 0:U.replace("(",gl))==null?void 0:me.split(gl))==null?void 0:fe[0];let q=(da=he.analyzeSplitToContent(U,")"))==null?void 0:da[0];q=(te=(Qe=q==null?void 0:q.replace("(",gl))==null?void 0:Qe.split(gl))==null?void 0:te[1],q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),(q==null?void 0:q[0])==="{"&&(q=q==null?void 0:q.slice(1,q==null?void 0:q.length)),(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)),G=q==null?void 0:q.split(",");let ze=(pa=he.analyzeSplitToContent(U,")"))==null?void 0:pa[1];ze&&ze!==""&&(M=Eo(ze))}else if(!pe&&((Ne=ra==null?void 0:ra.filter(U=>(U==null?void 0:U[0])==="{"))==null?void 0:Ne.length)>0){let U=ra==null?void 0:ra[(ra==null?void 0:ra.length)-1];U=U==null?void 0:U.slice(1,(U==null?void 0:U.length)-1),U=he.analyzeSplitToContent(U,","),U=U==null?void 0:U.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)),U=U==null?void 0:U.map(q=>{var ze,_e,la,fa;if(q=q==null?void 0:q.replaceAll("$",""),q!=null&&q.includes("{")){let ka="";q=q==null?void 0:q.replaceAll("{","");let ha=q==null?void 0:q.split("}");ka=((_e=(ze=ha==null?void 0:ha[0])==null?void 0:ze.split(":"))==null?void 0:_e[0])+":"+(ha==null?void 0:ha[1]),q=ka,q=q+":"}if(q!=null&&q.includes(Pi)){let ka="",ha=q==null?void 0:q.split(Pi);ka=((fa=(la=ha==null?void 0:ha[0])==null?void 0:la.split(":"))==null?void 0:fa[0])+":"+(ha==null?void 0:ha[1]),q=ka,q=q+":"}return q=q==null?void 0:q.replaceAll(":","/"),q}),m=U}else!((We=ra==null?void 0:ra[1])!=null&&We.includes("$"))&&((Aa=ra==null?void 0:ra[1])==null?void 0:Aa[0])!=="("&&f.push(ra==null?void 0:ra[1])}else r=(Da=a==null?void 0:a.split("&"))==null?void 0:Da[0],c=(Ze=a==null?void 0:a.split("&"))==null?void 0:Ze[0];return{label:r,prop:c,options:n,allContents:t,filterContents:s,menus:v,groups:p,words:f,align:"center",formType:k,filter:F,functionName:_,functionRelatedWords:G,calculatorFilter:M,relatedPages:m,value:D}},Co=(a,l)=>{var n,t,s,v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee;let r=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((v=(s=(t=(n=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:n.replace(":",gl))==null?void 0:t.split(gl))==null?void 0:s[0])!=null&&v.includes(","))){let ue=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),Ce=(p=ue==null?void 0:ue.replace(":",gl))==null?void 0:p.split(gl);if(((f=he.analyzeSplitToContent(Ce==null?void 0:Ce[1],"="))==null?void 0:f.length)===1){let Pe=Ce==null?void 0:Ce[0],ve=[];(c=he.analyzeSplitToContent((k=Ce==null?void 0:Ce[1])==null?void 0:k.slice(1,((m=Ce==null?void 0:Ce[1])==null?void 0:m.length)-1),","))==null||c.forEach(B=>{var ce,W;((ce=he.analyzeSplitToContent(B,"="))==null?void 0:ce.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)),ve=[...ve,...Co(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)),ve.push((W=Co(B,l))==null?void 0:W[0]))}),r==null||r.push({label:Pe,prop:Pe,children:ve,align:"center"})}else{let Pe=[];if(((D=he.analyzeSplitToContent(ue,"="))==null?void 0:D.length)>=2){let B=(F=he.analyzeSplitToContent(ue,"="))==null?void 0:F[1],ce=(_=he.analyzeSplitToContent(B,"/"))==null?void 0:_.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));Pe=ce==null?void 0:ce.map(W=>(W=Ci(W),W))}let ve=(S=(E=(j=($=(M=(G=ue==null?void 0:ue.replace("{",gl))==null?void 0:G.split(gl))==null?void 0:M[1])==null?void 0:$.replace("}",gl))==null?void 0:j.split(gl))==null?void 0:E[0])==null?void 0:S.split(",");ve==null||ve.forEach((B,ce)=>{(Pe==null?void 0:Pe.length)>0&&ce===0?r==null||r.push({label:B,prop:B,align:"center",formType:"Select",relatedContents:Pe==null?void 0:Pe.map(W=>{let Se={};return ve==null||ve.forEach((Le,Fe)=>{Se[Le]=W==null?void 0:W[Fe]}),Se}),options:Pe==null?void 0:Pe.map(W=>({label:W==null?void 0:W[0],value:W==null?void 0:W[0]})),mainKey:!0}):r==null||r.push({label:B,prop:B,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=he.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((g=(b=he.analyzeSplitToContent(a,"="))==null?void 0:b[1])==null?void 0:g[0])==="["){let ue=[];if(((R=he.analyzeSplitToContent(a,"="))==null?void 0:R.length)>=2){let Pe=(I=he.analyzeSplitToContent(a,"="))==null?void 0:I[1],ve=(le=(Y=he.analyzeSplitToContent(Pe,"|"))==null?void 0:Y.filter(B=>B!=="|"))==null?void 0:le.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));ue=ve==null?void 0:ve.map(B=>(B=Ci(B),B))}let Ce=(Te=(ye=a==null?void 0:a.replace("}",gl))==null?void 0:ye.split(gl))==null?void 0:Te[0];Ce=(V=Ce==null?void 0:Ce.slice(1,Ce==null?void 0:Ce.length))==null?void 0:V.split(","),Ce==null||Ce.forEach((Pe,ve)=>{(ue==null?void 0:ue.length)>0&&ve===0?r==null||r.push({label:Pe,prop:Pe,align:"center",formType:"Select",relatedContents:ue==null?void 0:ue.map(B=>{let ce={};return Ce==null||Ce.forEach((W,Se)=>{ce[W]=B==null?void 0:B[Se]}),ce}),options:ue==null?void 0:ue.map(B=>({label:B==null?void 0:B[0],value:B==null?void 0:B[0]})),mainKey:!0}):r==null||r.push({label:Pe,prop:Pe,align:"center"})})}else(se=he.analyzeSplitToContent(a,","))==null||se.forEach(ue=>{var Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe;if((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?void 0:ue[0])==="{"){let U=he.analyzeSplitToContent(ue,"="),q=U==null?void 0:U[(U==null?void 0:U.length)-1],ze=[],_e=[],la=[],fa="",ka="",ha=[],Va=[],Sa=(Ce=q==null?void 0:q.replace("*",gl))==null?void 0:Ce.split(gl),Oe=(Sa==null?void 0:Sa[0])===""?l==null?void 0:l.value:Sa==null?void 0:Sa[0];Oe=he.analyzeSplitToContent(Oe,")");let Za="";if((Oe==null?void 0:Oe.length)>1&&((Pe=Oe==null?void 0:Oe[0])==null?void 0:Pe[0])!=="&"&&(Za=Oe==null?void 0:Oe[0],(Za==null?void 0:Za[0])!=="@"&&(Za="@"+Za),ka=Za??""),Oe=(ve=Oe==null?void 0:Oe.filter(kl=>(kl==null?void 0:kl[0])==="$"))==null?void 0:ve[0],((B=he.analyzeSplitToContent(Oe,"}"))==null?void 0:B.length)>1&&((W=(ce=he.analyzeSplitToContent(Oe,"}"))==null?void 0:ce[1])==null?void 0:W[0])==="("&&(Za=(Se=he.analyzeSplitToContent(Oe,"}"))==null?void 0:Se[1],(Za==null?void 0:Za[0])!=="@"&&(Za="@"+Za),ka!==""&&(ka=ka+","),ka=ka+Za),(Le=Oe==null?void 0:Oe.slice(1,(Oe==null?void 0:Oe.length)-1))!=null&&Le.includes("$")||(Oe=(Fe=he.analyzeSplitToContent(Oe,"}"))==null?void 0:Fe[0]),(Oe==null?void 0:Oe[0])==="$"&&(Oe=(aa=Oe==null?void 0:Oe.replace("{",""))==null?void 0:aa.replace("}",":"),Oe=(Na=Oe==null?void 0:Oe.slice(1,Oe==null?void 0:Oe.length))==null?void 0:Na.replaceAll(":","/")),Oe!=null&&Oe.includes("$")){let kl=(ae=Oe==null?void 0:Oe.split("$"))==null?void 0:ae[0];kl=(ta=kl==null?void 0:kl.split("/"))==null?void 0:ta[0],Oe=kl+"/"+((oe=Oe==null?void 0:Oe.split("$"))==null?void 0:oe[1])+"/"}ze=(Oe==null?void 0:Oe.split("/"))??[];let Ha=(Ee=(ca=Sa==null?void 0:Sa[1])==null?void 0:ca.replace("{",gl))==null?void 0:Ee.split(gl);if((Ue=(Be=(ie=Sa==null?void 0:Sa[1])==null?void 0:ie.split("(@"))==null?void 0:Be[0])!=null&&Ue.includes("&&")||(L=(Ja=(oa=Sa==null?void 0:Sa[1])==null?void 0:oa.split("@"))==null?void 0:Ja[0])!=null&&L.includes("&&")){let kl=(H=Sa==null?void 0:Sa[1])!=null&&H.includes("(@")?(fe=(me=(Z=Sa==null?void 0:Sa[1])==null?void 0:Z.split("(@"))==null?void 0:me[0])==null?void 0:fe.split("&&"):(te=(Qe=(da=Sa==null?void 0:Sa[1])==null?void 0:da.split("@"))==null?void 0:Qe[0])==null?void 0:te.split("&&");ha=kl==null?void 0:kl.map(ja=>{var zl,$l;return(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=($l=(zl=ja==null?void 0:ja.replace("{",gl))==null?void 0:zl.split(gl))==null?void 0:$l[0],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])===":"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(":"),ja});let Fl=[];kl==null||kl.forEach((ja,zl)=>{var $l,Ma;(ja==null?void 0:ja[0])==="*"&&(ja=ja==null?void 0:ja.slice(1,ja==null?void 0:ja.length)),ja=(Ma=($l=ja==null?void 0:ja.replace("{",gl))==null?void 0:$l.split(gl))==null?void 0:Ma[1],(ja==null?void 0:ja[(ja==null?void 0:ja.length)-1])==="}"&&(ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1)),ja=ja==null?void 0:ja.split(","),Fl.push(zl===0?(ja==null?void 0:ja.length)-1:ja==null?void 0:ja.length),Va=[...Va,...ja]}),Fl=(pa=he.prefixSum(Fl))==null?void 0:pa.map(ja=>ja==null?void 0:ja.total),ha=ha==null?void 0:ha.map((ja,zl)=>({number:Fl==null?void 0:Fl[zl],contents:ja}))}let xl=Ha==null?void 0:Ha[0];(xl==null?void 0:xl[(xl==null?void 0:xl.length)-1])===":"&&(xl=xl==null?void 0:xl.slice(0,(xl==null?void 0:xl.length)-1)),_e=(xl==null?void 0:xl.split(":"))??[],la=((Da=(Aa=(We=(Ne=Ha==null?void 0:Ha[1])==null?void 0:Ne.replace("}",gl))==null?void 0:We.split(gl))==null?void 0:Aa[0])==null?void 0:Da.split(","))??[];let Yl=(ra=U==null?void 0:U[0])==null?void 0:ra.slice(1,((Ze=U==null?void 0:U[0])==null?void 0:Ze.length)-2);ka&&ka!==""&&(fa=Eo(ka)),(pe=Yl==null?void 0:Yl.split(","))==null||pe.forEach((kl,Fl)=>{var ja,zl,$l,Ma,rl;((ja=he.analyzeSplitToContent(kl,"@"))==null?void 0:ja.length)>1&&(kl=(zl=he.analyzeSplitToContent(kl,"@"))==null?void 0:zl[0],(kl==null?void 0:kl[(kl==null?void 0:kl.length)-1])==="@"&&(kl=kl==null?void 0:kl.slice(0,(kl==null?void 0:kl.length)-1))),r.push({label:kl,prop:kl,align:"center",menus:ze,groups:(ha==null?void 0:ha.length)===0?_e:($l=ha==null?void 0:ha.find(sl=>(sl==null?void 0:sl.number)>=Fl))==null?void 0:$l.contents,words:(Va==null?void 0:Va.length)===0?(Ma=la==null?void 0:la[Fl])==null?void 0:Ma.split(":"):(rl=Va==null?void 0:Va[Fl])==null?void 0:rl.split(":"),formType:(ze==null?void 0:ze.length)>0?"Select":"Input",mainKey:Fl===0,filter:fa,isMainPath:(ha==null?void 0:ha.findIndex(sl=>(sl==null?void 0:sl.number)>=Fl))===0})})}else r.push({label:ue,prop:ue,align:"center"})});else{let ue=(ee=he.analyzeSplitToContent(a,","))==null?void 0:ee.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));ue==null||ue.forEach(Ce=>{r.push(ft(Ce,l))})}return r},Xd=(a,l)=>{var v,p,f,m,k;let r=a;if(!a)return;let n="";((v=he.analyzeSplitToContent(a,"}"))==null?void 0:v.length)>1&&(r=(p=he.analyzeSplitToContent(a,"}"))==null?void 0:p[0],n=(f=he.analyzeSplitToContent(a,"}"))==null?void 0:f[1]),(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let t=[],s=[];return t.push({label:"排序",prop:"sort"}),t.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=he.analyzeSplitToContent(r,","))==null||m.forEach(c=>{var D;(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==null?void 0:c[0])==="{"?(D=Co(c,l))==null||D.forEach(F=>{t.push(F)}):t.push(ft(c,l))}),t!=null&&t.some(c=>{var D;return(D=c==null?void 0:c.prop)==null?void 0:D.includes("@")})&&(t=t==null?void 0:t.filter(c=>{var D;return!((D=c==null?void 0:c.prop)!=null&&D.includes("@"))})),n!==""&&((n==null?void 0:n[0])=="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),(k=he.analyzeSplitToContent(n,","))==null||k.forEach(c=>{var D;(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==null?void 0:c[0])==="{"?(D=Co(c,l))==null||D.forEach(F=>{s.push(F)}):s.push(ft(c,l))})),{columns:t,secondColumns:s}},un=a=>{var l,r,n,t,s;if(a!=null&&a.includes("@Filter")||a!=null&&a.includes("@Condition")||a!=null&&a.includes("@If"))return a;{let v=(r=(l=a==null?void 0:a.replace("(",gl))==null?void 0:l.split(gl))==null?void 0:r[1],p=(t=(n=a==null?void 0:a.replace("(",gl))==null?void 0:n.split(gl))==null?void 0:t[0];return v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1),v=(s=he.analyzeSplitToContent(v,","))==null?void 0:s.map(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)),(f==null?void 0:f[0])==="("&&(f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1)),p+f)),v=v==null?void 0:v.join(","),a!=null&&a.includes("@Quote")&&(v!=null&&v.includes("@QuoteType")||(v=v===""?v+"@QuoteType=Manual":v+",@QuoteType=Manual"),v!=null&&v.includes("@QuoteSonSync")||(v=v===""?v+"@QuoteSonSync=No":v+",@QuoteSonSync=No"),v!=null&&v.includes("@QuoteFatherSync")||(v=v===""?v+"@QuoteFatherSync=Yes":v+",@QuoteFatherSync=Yes")),v}},rs=a=>{let l=a==null?void 0:a.map(r=>{var n,t;return{menus:r==null?void 0:r.menus,content:((n=r==null?void 0:r.menus)==null?void 0:n.join("/"))+gl+((t=r==null?void 0:r.groups)==null?void 0:t.join("/"))}});return l=l==null?void 0:l.filter(r=>{var n;return(r==null?void 0:r.menus)&&((n=r==null?void 0:r.menus)==null?void 0:n.length)>0}),l=l==null?void 0:l.map(r=>r==null?void 0:r.content),l=[...new Set(l)],l=l==null?void 0:l.map(r=>{var n,t;return{menus:(n=r==null?void 0:r.split(gl))==null?void 0:n[0],groups:((t=r==null?void 0:r.split(gl))==null?void 0:t[1])??[]}}),l},ns=a=>{var r;let l=a;return(l==null?void 0:l[0])==="("&&(l==null?void 0:l[1])==="("&&(l=l.slice(1,(l==null?void 0:l.length)-1)),l=(r=he.analyzeSplitToContent(l,","))==null?void 0:r.map(n=>((n==null?void 0:n[(n==null?void 0:n.length)-1])===","&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),(n==null?void 0:n[0])!=="@"&&(n="@"+n),n=un(n),n)),l==null?void 0:l.join(",")},ac=(a,l,r="")=>{var j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe;let n=[],t=[],s=[],v="",p="",f="",m=[],k=[],c=[],D="";if(((j=a==null?void 0:a[0])==null?void 0:j[0])!=="*"&&((E=a==null?void 0:a[0])==null?void 0:E[0])!=="$"&&!((S=a==null?void 0:a[0])!=null&&S.includes("$")))return;((w=a==null?void 0:a[0])==null?void 0:w[0])!=="*"&&((b=a==null?void 0:a[0])==null?void 0:b[0])!=="$"&&(v=(g=he.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:g[0],(v==null?void 0:v[0])!=="@"&&(v="@"+v),v=Eo(v),f=(R=he.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:R[1],(f==null?void 0:f[0])==="$"&&(f=f==null?void 0:f.slice(1,f==null?void 0:f.length)),f=f==null?void 0:f.replaceAll(":","/"));let _=he.analyzeSplitToContent(a==null?void 0:a[0],":");if(n=(I=_==null?void 0:_.filter(U=>(U==null?void 0:U[0])!=="{"&&(U==null?void 0:U[0])!=="["))==null?void 0:I.join(""),p=(Y=a==null?void 0:a[0])==null?void 0:Y.replace(n,""),(n==null?void 0:n[0])==="("&&(n=""),D=(le=_==null?void 0:_.filter(U=>(U==null?void 0:U[0])!=="["))==null?void 0:le.join(""),D=(ye=a==null?void 0:a[0])==null?void 0:ye.replace(D,""),p=p==null?void 0:p.replace(D,""),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),((Te=he.analyzeSplitToContent(p,"@"))==null?void 0:Te.length)>1&&(v=(V=he.analyzeSplitToContent(p,"@"))==null?void 0:V[1],(v==null?void 0:v[(v==null?void 0:v.length)-1])===":"&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),v="@"+v,v=un(v),p=(se=he.analyzeSplitToContent(p,"@"))==null?void 0:se[0],p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),((ee=he.analyzeSplitToContent(n,"@"))==null?void 0:ee.length)>1){v!==""&&(v=v+",");let U=(ue=he.analyzeSplitToContent(n,"@"))==null?void 0:ue[1];U="@"+U,U=un(U),v=v+U,n=(Ce=he.analyzeSplitToContent(n,"@"))==null?void 0:Ce[0]}if((n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=n===""?[]:n==null?void 0:n.split(":"),(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),r!==""){let U=(Pe=he.analyzeSplitToContent(r,")"))==null?void 0:Pe[0],q=(ve=he.analyzeSplitToContent(r,"@"))==null?void 0:ve[1];f=(ce=(B=he.analyzeSplitToContent(r,"@"))==null?void 0:B[0])==null?void 0:ce.replace(U,""),(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)),U=ns(U),q=ns(q);let ze=U??"";if(ze!==""&&(ze=ze+","),ze=ze+q,(ze==null?void 0:ze[(ze==null?void 0:ze.length)-1])===","&&(ze=ze==null?void 0:ze.slice(0,(ze==null?void 0:ze.length)-1)),ze!==""&&v!==""&&(v=v+","),v=v+ze,(f==null?void 0:f[0])==="$"&&(f=f==null?void 0:f.slice(1,f==null?void 0:f.length)),f=(W=he.analyzeSplitToContent(f,":"))==null?void 0:W.filter((_e,la)=>{var fa;return!((_e==null?void 0:_e[0])==="{"&&la===((fa=he.analyzeSplitToContent(f,":"))==null?void 0:fa.length)-1)}),f=f==null?void 0:f.join(""),(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)),v!=null&&v.includes("@Sync")||(v=v===""?v+"@Sync=(Yes,Yes)":v+",@Sync=(Yes,Yes)"),f!=null&&f.includes("$")){let _e=(Le=(Se=f==null?void 0:f.replace("*",gl))==null?void 0:Se.split(gl))==null?void 0:Le[1],la=(aa=(Fe=f==null?void 0:f.replace("*",gl))==null?void 0:Fe.split(gl))==null?void 0:aa[0];la=la==null?void 0:la.split("$"),la=((ae=(Na=la==null?void 0:la[0])==null?void 0:Na.split(":"))==null?void 0:ae[0])+":"+(la==null?void 0:la[1])+":",f=la+"*"+_e}else f=(ta=f==null?void 0:f.replaceAll("{",""))==null?void 0:ta.replaceAll("}","")}v!==""&&v&&(v="("+v+")"),v=f+v,((oe=he.analyzeSplitToContent(p,"}"))==null?void 0:oe.length)>1&&(p=(ca=he.analyzeSplitToContent(p,"}"))==null?void 0:ca.filter(U=>(U==null?void 0:U[0])!=="@"),p=p==null?void 0:p.join(""));let G=Xd(p,l);s=p===""?[]:(G==null?void 0:G.columns)??[],c=he.getColumnChild(s);let M=he.getColumnChild(s);s!=null&&s.some(U=>{var q;return Array.isArray(U==null?void 0:U.children)&&((q=U==null?void 0:U.children)==null?void 0:q.length)>0})&&(s=[s]),t=D?Ci(D):[],!(t!=null&&t.every(U=>Array.isArray(U)))&&(t==null?void 0:t.length)>0&&(t=[t]),(t==null?void 0:t.length)>0&&(Array.isArray(t==null?void 0:t[0])&&((Ee=t==null?void 0:t[0])!=null&&Ee.every(U=>Array.isArray(U)))?t=t==null?void 0:t.map((U,q)=>(U=U.map((ze,_e)=>(ze.unshift("{}"),ze.unshift((_e+1).toString()),ze)),U)):t=t==null?void 0:t.map((U,q)=>(U.unshift("{}"),U.unshift((q+1).toString()),U))),G!=null&&G.secondColumns&&((ie=G==null?void 0:G.secondColumns)==null?void 0:ie.length)>0&&((t==null?void 0:t.length)>0?t=t==null?void 0:t.map((U,q)=>{var ze,_e;return Array.isArray(U==null?void 0:U[0])?U=U==null?void 0:U.map((la,fa)=>{var ka,ha;return la.unshift((ha=(ka=G==null?void 0:G.secondColumns)==null?void 0:ka[fa])==null?void 0:ha.prop),la}):U.unshift((_e=(ze=G==null?void 0:G.secondColumns)==null?void 0:ze[q])==null?void 0:_e.prop),U}):t=(Be=G==null?void 0:G.secondColumns)==null?void 0:Be.map((U,q)=>(U=[U==null?void 0:U.label],U.push(q),U)),s.unshift({label:"",prop:"disabled",sortable:!1})),c=c==null?void 0:c.map(U=>{var q,ze;return{menus:U==null?void 0:U.menus,content:((q=U==null?void 0:U.menus)==null?void 0:q.join("/"))+gl+((ze=U==null?void 0:U.groups)==null?void 0:ze.join("/"))}});let $=[];if(((oa=(Ue=v==null?void 0:v.replace("(",gl))==null?void 0:Ue.split(gl))==null?void 0:oa[0])!==""&&($=(L=(Ja=v==null?void 0:v.replace("(",gl))==null?void 0:Ja.split(gl))==null?void 0:L[0],$=[$],$=$==null?void 0:$.map(U=>{var ze,_e,la;let q=U==null?void 0:U.split("*");return{menus:(ze=q==null?void 0:q[0])==null?void 0:ze.split(":"),content:((_e=q==null?void 0:q[0])==null?void 0:_e.replaceAll(":","/"))+gl+((la=q==null?void 0:q[1])==null?void 0:la.replaceAll(":","/"))}}),c=[...c,...$]),c=c==null?void 0:c.filter(U=>{var q;return(U==null?void 0:U.menus)&&((q=U==null?void 0:U.menus)==null?void 0:q.length)>0}),c=c==null?void 0:c.map(U=>U==null?void 0:U.content),c=[...new Set(c)],c=c==null?void 0:c.map(U=>{var q,ze;return{menus:(q=U==null?void 0:U.split(gl))==null?void 0:q[0],groups:((ze=U==null?void 0:U.split(gl))==null?void 0:ze[1])??[]}}),m=M==null?void 0:M.filter(U=>{var q;return(U==null?void 0:U.filter)&&((q=U==null?void 0:U.filter)==null?void 0:q.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(U=>{var q,ze,_e,la;return(la=(_e=(ze=(q=he.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:q.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:_e[0])==null?void 0:la.includes("Yes")}),m=rs(m)),k=M==null?void 0:M.filter(U=>{var q;return(U==null?void 0:U.filter)&&((q=U==null?void 0:U.filter)==null?void 0:q.includes("@Sync"))}),(k==null?void 0:k.length)>0&&(k=k==null?void 0:k.filter(U=>{var q,ze,_e,la;return(la=(_e=(ze=(q=he.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:q.find(fa=>fa==null?void 0:fa.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:_e[1])==null?void 0:la.includes("Yes")}),k=rs(k)),v!==""&&(v!=null&&v.includes("@Sync"))&&(v==null?void 0:v[0])!=="("){let U=(H=v==null?void 0:v.replace("(",gl))==null?void 0:H.split(gl),q=U==null?void 0:U[1];if(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),q=he.analyzeSplitToContent(q,","),(fe=(me=(Z=q==null?void 0:q.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:Z.split(","))==null?void 0:me[0])!=null&&fe.includes("Yes")){let ze=U==null?void 0:U[0];ze=[{menus:(Qe=(da=ze==null?void 0:ze.split("*"))==null?void 0:da[0])==null?void 0:Qe.replaceAll(":","/"),groups:((pa=(te=ze==null?void 0:ze.split("*"))==null?void 0:te[1])==null?void 0:pa.split(":"))??[]}],m=[...m,...ze]}if((Aa=(We=(Ne=q==null?void 0:q.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:Ne.split(","))==null?void 0:We[1])!=null&&Aa.includes("Yes")){let ze=U==null?void 0:U[0];ze=[{menus:(Ze=(Da=ze==null?void 0:ze.split("*"))==null?void 0:Da[0])==null?void 0:Ze.replaceAll(":","/"),groups:((pe=(ra=ze==null?void 0:ze.split("*"))==null?void 0:ra[1])==null?void 0:pe.split(":"))??[]}],k=[...k,...ze]}}return{groupName:n,tableColumns:s,tableFilter:v,tableContents:t,columns:(G==null?void 0:G.secondColumns)??[],relatedQuotes:c,fatherSyncContents:m,sonSyncContents:k}},lc=(a,l)=>(a=a==null?void 0:a.map((r,n)=>{var t,s,v,p;if(Array.isArray(r))r=r==null?void 0:r.map(f=>{var m,k,c,D;return f!=null&&f.isMainPath||(((m=f==null?void 0:f.children)==null?void 0:m.length)>0?f.children=lc(f.children,l):((k=f==null?void 0:f.menus)==null?void 0:k.length)>0&&!((c=r==null?void 0:r[0])!=null&&c.isMainPath)&&(f.menus=(D=f.menus)==null?void 0:D.map((F,_)=>{var G,M;return((G=f.menus)==null?void 0:G.length)-1===_&&F===""&&(l==null?void 0:l.parentContent)+"/"!==((M=f.menus)==null?void 0:M.join("/"))&&(F=l==null?void 0:l.value),f}),f.bindMenus=f.menus)),f});else{if(n===0&&((t=r.menus)==null?void 0:t.length)>0&&(r.mainKey=!0),r!=null&&r.isMainPath)return r;((s=r.menus)==null?void 0:s.length)>0&&!((v=a==null?void 0:a[0])!=null&&v.isMainPath)&&(r.menus=(p=r.menus)==null?void 0:p.map((f,m)=>{var k,c;return((k=r.menus)==null?void 0:k.length)-1===m&&f===""&&(l==null?void 0:l.parentContent)+"/"!==((c=r.menus)==null?void 0:c.join("/"))&&(f=l==null?void 0:l.value),f}),r.bindMenus=r.menus)}return r}),a),Zd=(a,l)=>(a=a==null?void 0:a.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=lc(r.contents,l)),r)),a),ht=(a,l)=>{let r=a;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(n=>(n=ht(n,l),n)):r=r==null?void 0:r.map(n=>{var t,s;return n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0?n.children=ht(n==null?void 0:n.children,l):n!=null&&n.words&&((s=n==null?void 0:n.words)==null?void 0:s.length)>0&&(l!=null&&l.find(v=>{var p,f,m,k;return((k=(p=n==null?void 0:n.prop)==null?void 0:p.split("."))==null?void 0:k[((m=(f=n==null?void 0:n.prop)==null?void 0:f.split("."))==null?void 0:m.length)-1])===v}))&&(n.mainKey=!0),n}),r};let yr="$R";const Qd=A.useUnit(A.pinia),{selectTitle:Jr}=A.storeToRefs(Qd),vn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@MaxColumn",value:"onMaxColumn",order:1},{key:"@EditRead",value:"onEditRead",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@SubType",value:"onInterfaceTypeContents",order:2},{key:"@If",value:"onConditionContents",order:4},{key:"@QuoteFatherSync",value:"onFatherPaceContents",order:1},{key:"@QuoteSonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@Button",value:"onButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1},{key:"@BackGround",value:"onBackGround",order:1}];var ri=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(ri||{});const 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;return l.push({key:"backGround",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},ap=a=>{const l=nc(a==null?void 0:a.filter);return l?ic(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},lp=a=>{const l=nc(a==null?void 0:a.filter);return l?ic(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},rp=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;const r=Number(a==null?void 0:a.filter);return l.push({key:"textSize",contents:Number.isNaN(r)?a==null?void 0:a.filter:r}),l}return a==null?void 0:a.contents},np=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},ip=a=>{var r;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(n=>{var t;return(n==null?void 0:n.key)==="tableContents"&&(n.contents=(t=n.contents)==null?void 0:t.slice(0,parseInt(a==null?void 0:a.filter))),n})},op=async a=>{var l,r,n,t,s,v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V;if((a==null?void 0:a.filter)==="Random")return(l=a==null?void 0:a.contents)==null?void 0:l.map(ee=>((ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=he.shuffle(ee.contents)),ee));if((a==null?void 0:a.filter)==="Auto"){let se=(n=(r=a==null?void 0:a.contents)==null?void 0:r.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:n.contents;Array.isArray(se==null?void 0:se[0])&&(se=se==null?void 0:se[0]),se=he.getColumnChild(se);let ee=se==null?void 0:se.filter(Se=>(Se==null?void 0:Se.filter)&&(Se==null?void 0:Se.filter)!==""),ue=new Map,Ce=[];ee==null||ee.forEach(Se=>{var Le,Fe;ue.get((Le=Se==null?void 0:Se.menus)==null?void 0:Le.join("/"))||(ue.set((Fe=Se==null?void 0:Se.menus)==null?void 0:Fe.join("/"),Se),Ce.push(Se))});let Pe=(s=(t=Jr==null?void 0:Jr.value)==null?void 0:t.find(Se=>(Se==null?void 0:Se.condition)==="child"))==null?void 0:s.value,ve=Ce==null?void 0:Ce.map(Se=>{var Le,Fe,aa;return Se=(Le=Se==null?void 0:Se.menus)==null?void 0:Le.join("/"),(Se==null?void 0:Se[(Se==null?void 0:Se.length)-1])==="/"&&((aa=(Fe=Jr==null?void 0:Jr.value)==null?void 0:Fe.find(Na=>(Na==null?void 0:Na.condition)==="child"))==null?void 0:aa.parentContent)+"/"!==Se?Se=Se+Pe:(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}),B=Ce==null?void 0:Ce.map(Se=>Se==null?void 0:Se.groups),ce=ve==null?void 0:ve.map(async Se=>{let Le=await Kr(Se,!1);return{path:Se,contents:Le}});ce=await Promise.all(ce);let W=ce==null?void 0:ce.map((Se,Le)=>{var aa,Na,ae,ta,oe,ca,Ee;let Fe=(aa=Se==null?void 0:Se.contents)==null?void 0:aa.filter(ie=>{var Be,Ue;return(ie==null?void 0:ie.name)===((Ue=B==null?void 0:B[Le])==null?void 0:Ue[((Be=B==null?void 0:B[Le])==null?void 0:Be.length)-1])});return Fe=(ta=(ae=(Na=Fe==null?void 0:Fe[0])==null?void 0:Na.compData)==null?void 0:ae.find(ie=>(ie==null?void 0:ie.key)==="tableContents"))==null?void 0:ta.contents,(Se==null?void 0:Se.path)===((ca=(oe=Jr==null?void 0:Jr.value)==null?void 0:oe.find(ie=>(ie==null?void 0:ie.condition)==="child"))==null?void 0:ca.parentContent)&&(Fe=((Ee=Fe==null?void 0:Fe.map(ie=>{for(let Be in ie)if(ie[Be]===Pe)return ie}))==null?void 0:Ee.filter(ie=>ie))??[]),Fe??[]});if(W=W==null?void 0:W.map(Se=>(Se=Se==null?void 0:Se.map(Le=>{var aa;let Fe={};for(let Na in Le)if(ee!=null&&ee.find(ae=>{var ta,oe;return((oe=(ta=ae==null?void 0:ae.words)==null?void 0:ta[0])==null?void 0:oe.replaceAll("'",""))===Na})){let ae=(aa=ee==null?void 0:ee.find(ta=>{var oe,ca;return((ca=(oe=ta==null?void 0:ta.words)==null?void 0:oe[0])==null?void 0:ca.replaceAll("'",""))===Na}))==null?void 0:aa.prop;Fe[ae]=Le==null?void 0:Le[Na]}return Fe}),Se)),W=he.cartesianProduct(W),Array.isArray(W==null?void 0:W[0])&&(W=W==null?void 0:W[0]),(W==null?void 0:W.length)>0&&((c=(p=(v=ee==null?void 0:ee[0])==null?void 0:v.menus)==null?void 0:p.join("/"))==null?void 0:c[((k=(m=(f=ee==null?void 0:ee[0])==null?void 0:f.menus)==null?void 0:m.join("/"))==null?void 0:k.length)-1])==="/")return(D=a==null?void 0:a.contents)==null?void 0:D.map(Le=>{var Fe;return(Le==null?void 0:Le.key)==="tableContents"&&(W==null?void 0:W.length)>0&&(Le.contents=((Fe=Le.contents)==null?void 0:Fe.length)>0?Le.contents:W),Le})}if((a==null?void 0:a.filter)==="Manual"){let se=[],ee=[],ue=(_=(F=a==null?void 0:a.contents)==null?void 0:F.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:_.contents;(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])===")"?ue=(M=(G=ue==null?void 0:ue.replace("(",yr))==null?void 0:G.split(yr))==null?void 0:M[0]:ue="",ue!==""&&(se=((j=($=ue==null?void 0:ue.split("*"))==null?void 0:$[0])==null?void 0:j.split(":"))??[],ee=((g=(b=(w=(S=(E=ue==null?void 0:ue.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",yr))==null?void 0:w.split(yr))==null?void 0:b[0])==null?void 0:g.split(":"))??[]);let Ce=(I=(R=a==null?void 0:a.contents)==null?void 0:R.find(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:I.contents;Ce=(le=(Y=Ce==null?void 0:Ce.replace("(",yr))==null?void 0:Y.split(yr))==null?void 0:le[1],Ce=Ce==null?void 0:Ce.slice(0,(Ce==null?void 0:Ce.length)-1);let Pe=(ye=a==null?void 0:a.contents)==null?void 0:ye.map(B=>{var ce,W,Se,Le,Fe,aa,Na,ae,ta;return(B==null?void 0:B.key)==="header"&&((ce=B==null?void 0:B.contents)!=null&&ce.every(oe=>(oe==null?void 0:oe.mainKey)!==!0)&&Array.isArray(B==null?void 0:B.contents)&&!Array.isArray((W=B==null?void 0:B.contents)==null?void 0:W[0])?B.contents=(Se=B==null?void 0:B.contents)==null?void 0:Se.map((oe,ca)=>{var Ee,ie,Be;return oe!=null&&oe.isMainPath||(ca===0?(oe.mainKey=!0,oe.formType="Select",oe.bindMenus=se,oe.groups=((Ee=oe.groups)==null?void 0:Ee.length)===0?ee:oe.groups,oe.words=((ie=oe.words)==null?void 0:ie.length)===0?[oe==null?void 0:oe.prop]:oe.words,oe.filter=Ce,(!(oe!=null&&oe.menus)||((Be=oe==null?void 0:oe.menus)==null?void 0:Be.length)===0)&&(oe.menus=se)):(oe.mainKey=!1,oe.bindMenus=se)),oe}):Array.isArray((Le=B==null?void 0:B.contents)==null?void 0:Le[0])&&((Na=(aa=(Fe=B==null?void 0:B.contents)==null?void 0:Fe[0])==null?void 0:aa.filter(()=>(se==null?void 0:se.length)>0))==null?void 0:Na.length)>0&&(B.contents[0]=(ta=(ae=B==null?void 0:B.contents)==null?void 0:ae[0])==null?void 0:ta.map((oe,ca)=>{var Ee,ie,Be;return oe!=null&&oe.isMainPath||(ca===0?(oe.mainKey=!0,oe.formType="Select",oe.bindMenus=se,oe.groups=((Ee=oe.groups)==null?void 0:Ee.length)===0?ee:oe.groups,oe.words=((ie=oe.words)==null?void 0:ie.length)===0?[oe==null?void 0:oe.prop]:oe.words,oe.filter=Ce,(!(oe!=null&&oe.menus)||Array.isArray(oe==null?void 0:oe.menus)&&((Be=oe==null?void 0:oe.menus)==null?void 0:Be.length)===0)&&(se==null?void 0:se.length)>0&&(oe.menus=se)):(oe.mainKey=!1,oe.bindMenus=se)),oe}))),B}),ve=(Te=Pe==null?void 0:Pe.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:Te.contents;if(Array.isArray(ve==null?void 0:ve[0])&&(ve=ve==null?void 0:ve[0]),ve=he.getColumnChild(ve),ve!=null&&ve.some(B=>{var ce,W;return((W=B==null?void 0:B.menus)==null?void 0:W[((ce=B==null?void 0:B.menus)==null?void 0:ce.length)-1])===""})){let B=(V=Jr==null?void 0:Jr.value)==null?void 0:V.find(ce=>(ce==null?void 0:ce.condition)==="child");Pe=Zd(Pe,B)}return Pe}return a==null?void 0:a.contents},tp=async a=>{if((a==null?void 0:a.filter)==="Ordin"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:1}),l}if((a==null?void 0:a.filter)==="Block"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:2}),l}if((a==null?void 0:a.filter)==="Text"){let l=a==null?void 0:a.contents;return l.push({key:"enableWrap",contents:3}),l}return a==null?void 0:a.contents},sp=a=>{var n,t,s,v,p,f,m,k,c,D,F,_;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((t=(n=l==null?void 0:l.replace(":",yr))==null?void 0:n.split(yr))==null?void 0:t[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(p=(v=l==null?void 0:l.split("="))==null?void 0:v[1])!=null&&p.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let G=(f=l==null?void 0:l.split("="))==null?void 0:f[0],M=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(k=M==null?void 0:M.slice(1,M==null?void 0:M.length))!=null&&k.includes("$")&&(M=(F=(D=(c=Jr==null?void 0:Jr.value)==null?void 0:c.filter($=>($==null?void 0:$.condition)==="child"))==null?void 0:D[0])==null?void 0:F.value),l=G+"="+M}if((l==null?void 0:l[0])!=="("&&(l="("+l+")"),l.slice(1,(l==null?void 0:l.length)-1)==="undefined")return a==null?void 0:a.contents;let r=he.calculatorAndToOr(l);if((r==null?void 0:r.length)>0){let G=[];return r==null||r.forEach($=>{let j={};for(let E in $){let S=E;S!=null&&S.includes("[")||(j[S]=$[E])}G.push(j)}),(_=a==null?void 0:a.contents)==null?void 0:_.map($=>{var E,S,w;let j=(S=(E=a==null?void 0:a.contents)==null?void 0:E.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:S.contents;if(j=(w=he.getEqualChild(j))==null?void 0:w.filter(b=>(b==null?void 0:b.label)!=="操作"),($==null?void 0:$.key)==="tableContents"){let g=he.tableToForm($==null?void 0:$.contents,j);G==null||G.forEach(R=>{var I,Y;for(let le in R)!((I=g==null?void 0:g[0])!=null&&I.find(ye=>{var Te;return(ye==null?void 0:ye.key)===le||((Te=ye==null?void 0:ye.key)==null?void 0:Te.includes(le))}))&&!(g!=null&&g.find(ye=>{var Te;return(ye==null?void 0:ye.key)===le||((Te=ye==null?void 0:ye.key)==null?void 0:Te.includes(le))}))||(((Y=R[le])==null?void 0:Y[0])!=="!"?g=g==null?void 0:g.filter(ye=>{var Te,V;return((Te=ye==null?void 0:ye.find(se=>{var ee;return(se==null?void 0:se.key)===le||((ee=se==null?void 0:se.key)==null?void 0:ee.includes(le))}))==null?void 0:Te.value)===R[le]||Array.isArray(R==null?void 0:R[le])&&((V=R==null?void 0:R[le])==null?void 0:V.find(se=>{var ee;return((ee=ye==null?void 0:ye.find(ue=>{var Ce;return(ue==null?void 0:ue.key)===le||((Ce=ue==null?void 0:ue.key)==null?void 0:Ce.includes(le))}))==null?void 0:ee.value)===se}))}):g=g==null?void 0:g.filter(ye=>{var Te;return((Te=ye==null?void 0:ye.find(V=>{var se;return(V==null?void 0:V.key)===le||((se=V==null?void 0:V.key)==null?void 0:se.includes(le))}))==null?void 0:Te.value)!==R[le]}))}),(g==null?void 0:g.length)===0?$.contents=[]:$.contents=g==null?void 0:g.map(R=>{let I={};return R==null||R.forEach(Y=>{I[Y==null?void 0:Y.key]=Y==null?void 0:Y.value}),I})}return $})}return a==null?void 0:a.contents},cp=a=>a==null?void 0:a.contents,up=a=>a==null?void 0:a.contents,dp=a=>{var l,r,n,t;if((a==null?void 0:a.filter)!==""&&(a!=null&&a.filter)){let s=(n=(r=a==null?void 0:a.filter)==null?void 0:r.slice(1,((l=a==null?void 0:a.filter)==null?void 0:l.length)-1))==null?void 0:n.split(",");return(t=a==null?void 0:a.contents)==null?void 0:t.map(p=>((p==null?void 0:p.key)==="header"&&(p.contents=ht(p.contents,s)),p))}return a==null?void 0:a.contents},pp=a=>{var r,n,t,s,v;let l=(a==null?void 0:a.filter)??"";if(l!==""){let p=(n=(r=l==null?void 0:l.replace("(",yr))==null?void 0:r.split(yr))==null?void 0:n[1];p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1),(p==null?void 0:p[(p==null?void 0:p.length)-1])===")"&&(p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1)),p=(t=he.analyzeSplitToContent(p,","))==null?void 0:t.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),c));let f=p==null?void 0:p[0];(f==null?void 0:f[0])==="("&&(f=f==null?void 0:f.slice(1,(f==null?void 0:f.length)-1));let m=(p==null?void 0:p[1])??"Up",k=(s=a==null?void 0:a.contents)==null?void 0:s.map(c=>{var D,F;return m==="Up"?(c==null?void 0:c.key)==="extraButton"&&(c.contents=(D=f==null?void 0:f.split(","))==null?void 0:D.map(_=>({label:_,prop:_}))):m==="Line"&&(c==null?void 0:c.key)==="rowButton"&&(c.contents=(F=f==null?void 0:f.split(","))==null?void 0:F.map(_=>({label:_,prop:_}))),c});if(m==="Bottom"||m==="Down"){let c=(v=f==null?void 0:f.split(","))==null?void 0:v.map(D=>({label:D,prop:D}));k.push({key:"bottomButton",contents:c})}return k}return a==null?void 0:a.contents},fp=a=>a==null?void 0:a.contents,hp=a=>{var r;let l=(a==null?void 0:a.filter)??"";return(l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""?(r=a==null?void 0:a.contents)==null?void 0:r.map(t=>{var s;return(t==null?void 0:t.key)==="rowButton"&&(t.contents=(s=l==null?void 0:l.split(","))==null?void 0:s.map(v=>({label:v,prop:v}))),t}):a==null?void 0:a.contents},vp=a=>{var r;let l=(a==null?void 0:a.filter)??"";if((l==null?void 0:l[0])==="{"&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1)),l!==""){let n=a==null?void 0:a.contents,t=(r=l==null?void 0:l.split(","))==null?void 0:r.map(s=>({label:s,prop:s}));return n.push({key:"bottomButton",contents:t}),n}return a==null?void 0:a.contents},mp=a=>{var l;return(a==null?void 0:a.filter)==="Read"?(l=a==null?void 0:a.contents)==null?void 0:l.map(n=>{var t;return(n==null?void 0:n.key)==="formContent"&&(n.contents=(t=n.contents)==null?void 0:t.map(s=>(s.isNoClick=!0,s))),n}):a==null?void 0:a.contents},yp=a=>{var l;if(a!=null&&a.filter){const r=parseInt(a==null?void 0:a.filter);return!r||Number.isNaN(r)?a==null?void 0:a.contents:(l=a==null?void 0:a.contents)==null?void 0:l.map(t=>{var s;return(t==null?void 0:t.key)==="formContent"&&(t.contents=(s=t.contents)==null?void 0:s.map(v=>(v.width=r,v))),t})}return a==null?void 0:a.contents},gp=a=>{var l,r,n,t;if(((l=a==null?void 0:a.filter)==null?void 0:l[0])!=="["){const s=parseInt(a==null?void 0:a.filter);return!s||Number.isNaN(s)?a==null?void 0:a.contents:(r=a==null?void 0:a.contents)==null?void 0:r.map(p=>{var f;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(f=p.contents)==null?void 0:f.map(m=>(m.width=s,m))),p})}if(((n=a==null?void 0:a.filter)==null?void 0:n[0])==="["){let s=Ci(a==null?void 0:a.filter),v=Array.isArray(s)?s.map(f=>parseInt(f)).filter(f=>!!f&&!Number.isNaN(f)):[];return v.length?(t=a==null?void 0:a.contents)==null?void 0:t.map(f=>{if((f==null?void 0:f.key)==="formContent"){const m=f.contents??[];f.contents=m.map((k,c)=>{const D=c+1;let F=0,_=0;for(let M=0;M<v.length;M++){if(_+=v[M],D<=_){F=M;break}M===v.length-1&&(F=v.length-1)}const G=v[F]||v[v.length-1]||1;return k.width=G,k})}return f}):a==null?void 0:a.contents}return a==null?void 0:a.contents},bp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;return(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(","),(l=a==null?void 0:a.contents)==null?void 0:l.map(t=>{var s,v,p;return(t==null?void 0:t.key)==="header"&&(Array.isArray((s=t==null?void 0:t.contents)==null?void 0:s[0])?t.contents[0]=(p=t.contents[0])==null?void 0:p.map(f=>(r!=null&&r.find(m=>m===(f==null?void 0:f.prop))&&(f.fixed="left"),f)):t.contents=(v=t.contents)==null?void 0:v.map(f=>(r!=null&&r.find(m=>m===(f==null?void 0:f.prop))&&(f.fixed="left"),f))),t})}return a==null?void 0:a.contents},kp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const n=s=>(r!=null&&r.find(v=>v===(s==null?void 0:s.prop))&&(s.required=!0),s!=null&&s.children&&Array.isArray(s.children)&&(s.children=s.children.map(v=>n(v))),s);return(l=a==null?void 0:a.contents)==null?void 0:l.map(s=>{var v,p,f;return(s==null?void 0:s.key)==="header"&&(Array.isArray((v=s==null?void 0:s.contents)==null?void 0:v[0])?s.contents[0]=(f=s.contents[0])==null?void 0:f.map(m=>n(m)):s.contents=(p=s.contents)==null?void 0:p.map(m=>n(m))),s})}return a==null?void 0:a.contents},xp=async a=>{var n,t,s,v,p,f,m,k,c,D,F,_,G,M,$,j,E;const l=A.useUnit(A.pinia),{chooseTitle:r}=A.storeToRefs(l);if((a==null?void 0:a.filter)==="true"){let S=await Kr(((t=(n=r==null?void 0:r.value)==null?void 0:n[0])==null?void 0:t.parentContent)??((v=(s=r==null?void 0:r.value)==null?void 0:s[0])==null?void 0:v.relatedContent),!1),w=(f=(p=r==null?void 0:r.value)==null?void 0:p[0])==null?void 0:f.value;(k=(m=S==null?void 0:S[0])==null?void 0:m.compData)!=null&&k.find(I=>(I==null?void 0:I.key)==="header")?S=(c=S==null?void 0:S[0])==null?void 0:c.compData:S=(F=(D=S==null?void 0:S.filter(I=>{var Y;return(Y=I==null?void 0:I.compData)==null?void 0:Y.find(le=>(le==null?void 0:le.key)==="header")}))==null?void 0:D[0])==null?void 0:F.compData;let b=(_=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:_.contents;Array.isArray(b==null?void 0:b[0])&&(b=b==null?void 0:b[0]),b=((G=b==null?void 0:b.find(I=>I==null?void 0:I.isMainKey))==null?void 0:G.prop)??((M=b==null?void 0:b[0])==null?void 0:M.prop);let g=(j=($=S==null?void 0:S.find(I=>(I==null?void 0:I.key)==="tableContents"))==null?void 0:$.contents)==null?void 0:j.find(I=>(I==null?void 0:I[b])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map(I=>{var Y;return(I==null?void 0:I.key)==="formContent"&&(I.contents=(Y=I.contents)==null?void 0:Y.map(le=>(le.value=g==null?void 0:g[le==null?void 0:le.prop],le))),I})}return a==null?void 0:a.contents},wp=a=>{var l,r,n,t,s;if((l=a==null?void 0:a.extra)!=null&&l.row){let v=a==null?void 0:a.filter;if(v!=null&&v.includes("*")&&(v="({"+((n=(r=v==null?void 0:v.replace("{",yr))==null?void 0:r.split(yr))==null?void 0:n[1])),v=(t=v==null?void 0:v.replaceAll("{",""))==null?void 0:t.replaceAll("}",""),(v==null?void 0:v[0])!=="("&&(v="("+v+")"),v.slice(1,(v==null?void 0:v.length)-1)==="undefined")return a==null?void 0:a.contents;let p=he.calculatorAndToOr(v),f=p==null?void 0:p[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,k=[];for(let c in f)(f==null?void 0:f[c])===(m==null?void 0:m[c])?k.push(!0):k.push(!1);return k!=null&&k.every(c=>c===!0)?a==null?void 0:a.contents:[]}else return a==null?void 0:a.contents},_p=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},Sp=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},Ep=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},Cp=a=>{var l;if(a!=null&&a.filter){let r=a==null?void 0:a.contents,n=a==null?void 0:a.filter;return(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=(l=he.analyzeSplitToContent(n,","))==null?void 0:l.map(t=>((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)),r.push({key:"stepName",contents:n}),r}return a==null?void 0:a.contents},Dp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"step",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},rc={onNumSlice:ip,onRandomContents:op,onConditionContents:sp,onFatherPaceContents:cp,onPaceContents:up,onMainTagContents:dp,onButtonContents:pp,onPamButtonContents:fp,onRowButtonContents:hp,onRelated:xp,onRowNum:gp,onFixRow:bp,onReqItem:kp,onBottomButtonContents:vp,onConditionContent:wp,onTabs:_p,onSinChoice:Sp,onTextSize:rp,onTextRGBA:np,onPosition:ap,onSize:lp,onShowType:Ep,onStepName:Cp,onStep:Dp,onInterfaceTypeContents:tp,onBackGround:ep,onMaxColumn:yp,onEditRead:mp},Np=async(a,l)=>{var s,v,p,f,m,k,c,D,F,_,G,M;let r="";if(((s=a==null?void 0:a.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(v=a==null?void 0:a.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:v.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=(f=(p=r==null?void 0:r.replace("(",yr))==null?void 0:p.split(yr))==null?void 0:f[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let n=(m=he.analyzeSplitToContent(r,","))==null?void 0:m.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$!=null&&$.includes("(")||($=$==null?void 0:$.replaceAll(":","=")),$)),t=a;for(let $ in n){let j,E="";j=(D=(c=(k=n==null?void 0:n[$])==null?void 0:k.replace("=",yr))==null?void 0:c.split(yr))==null?void 0:D[0],E=(G=(_=(F=n==null?void 0:n[$])==null?void 0:F.replace("=",yr))==null?void 0:_.split(yr))==null?void 0:G[1];let S=(M=vn==null?void 0:vn.find(w=>(w==null?void 0:w.key)===j))==null?void 0:M.value;if(S){const w=rc[S];t=await w({contents:t,filter:E})}}return t},Et=async(a,l)=>{var v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I;let r="";if(((v=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:v.contents)!==""&&(r=(p=a==null?void 0:a.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:p.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=(m=(f=r==null?void 0:r.replace("(",yr))==null?void 0:f.split(yr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let n=(k=he.analyzeSplitToContent(r,","))==null?void 0:k.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)),t=a,s=new Map;n==null||n.forEach(Y=>{var ye,Te,V;let le=(ye=Y==null?void 0:Y.split("="))==null?void 0:ye[0];if(le==="@MainPam"&&s.get(le)){let se=s.get(le);se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1);let ee=(V=(Te=Y==null?void 0:Y.replace("{",yr))==null?void 0:Te.split(yr))==null?void 0:V[1];ee=se+","+ee,s.set(le,ee)}else le==="@Button"&&s.get(le)?s.set(Y,Y):s.set(le,Y)}),n=Array.from(s.values()),n=n==null?void 0:n.sort((Y,le)=>{var ye,Te;return((ye=vn==null?void 0:vn.find(V=>le==null?void 0:le.includes(V==null?void 0:V.key)))==null?void 0:ye.order)-((Te=vn==null?void 0:vn.find(V=>Y==null?void 0:Y.includes(V==null?void 0:V.key)))==null?void 0:Te.order)});for(let Y in n){let le,ye="";(c=n==null?void 0:n[Y])!=null&&c.includes("(")&&((D=n==null?void 0:n[Y])!=null&&D.includes("@If"))?(le=(G=(_=(F=n==null?void 0:n[Y])==null?void 0:F.replace("(",yr))==null?void 0:_.split(yr))==null?void 0:G[0],ye="("+((j=($=(M=n==null?void 0:n[Y])==null?void 0:M.replace("(",yr))==null?void 0:$.split(yr))==null?void 0:j[1])):(le=(w=(S=(E=n==null?void 0:n[Y])==null?void 0:E.replace("=",yr))==null?void 0:S.split(yr))==null?void 0:w[0],ye=(R=(g=(b=n==null?void 0:n[Y])==null?void 0:b.replace("=",yr))==null?void 0:g.split(yr))==null?void 0:R[1]);let Te=(I=vn==null?void 0:vn.find(V=>(V==null?void 0:V.key)===le))==null?void 0:I.value;if(Te){const V=rc[Te];t=await V({contents:t,filter:ye,extra:l})}}return t},nc=a=>{if(a==null)return null;const l=String(a).trim();if(!l.startsWith("(")||!l.endsWith(")"))return null;const r=l.slice(1,-1).split(",").map(n=>Number(n.trim()));return r.length<2||r.some(n=>Number.isNaN(n))?null:[r[0],r[1]]},ic=(a,l)=>{var G,M,$,j,E;const r=Array.isArray(a)?a:[],n=r.find(S=>(S==null?void 0:S.key)==="formContent"),t=Array.isArray(n==null?void 0:n.contents)?n.contents:[],s=((G=r.find(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"))==null?void 0:G.contents)??{},v=(t==null?void 0:t[0])??{};let p=((M=l==null?void 0:l.position)==null?void 0:M[0])??(s==null?void 0:s._positionStartRow)??(v==null?void 0:v._positionStartRow),f=(($=l==null?void 0:l.position)==null?void 0:$[1])??(s==null?void 0:s._positionRowSpan)??(v==null?void 0:v._positionRowSpan);(!p||Number.isNaN(p)||p<1)&&(p=1),(!f||Number.isNaN(f)||f<1)&&(f=1);let m=((j=l==null?void 0:l.size)==null?void 0:j[0])??(s==null?void 0:s._sizeStart)??(v==null?void 0:v._sizeStart),k=((E=l==null?void 0:l.size)==null?void 0:E[1])??(s==null?void 0:s._sizeEnd)??(v==null?void 0:v._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(k===void 0||Number.isNaN(k))&&(k=1),m=Math.max(0,Math.min(1,m)),k=Math.max(0,Math.min(1,k)),k<=m&&(m=0,k=1);const c=k-m,D=Math.max(1,Math.round(1/c));let F=r.map(S=>{if((S==null?void 0:S.key)!=="formContent")return S;const w=Array.isArray(S==null?void 0:S.contents)?S.contents:[];return{...S,contents:w.map(b=>({...b,width:D,_positionStartRow:p,_positionRowSpan:f,_sizeStart:m,_sizeEnd:k}))}});const _={_positionStartRow:p,_positionRowSpan:f,_sizeStart:m,_sizeEnd:k};return F.some(S=>(S==null?void 0:S.key)==="_gridLayoutMeta")?F=F.map(S=>(S==null?void 0:S.key)==="_gridLayoutMeta"?{...S,contents:_}:S):F.push({key:"_gridLayoutMeta",contents:_}),F};let uo="$R";const Bp=A.useUnit(A.pinia),{selectTitle:Tp}=A.storeToRefs(Bp);let Ap=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],zp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Mp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const is=async(a,l,r=!0)=>{let n=[],t=a==null?void 0:a.map(async s=>{var c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl;let v=(_=(F=(D=(c=s==null?void 0:s.contents)==null?void 0:c.find(ga=>{var xa;return(xa=ga==null?void 0:ga.key)==null?void 0:xa.includes("struct")}))==null?void 0:D.value)==null?void 0:F[0])==null?void 0:_.类型,p=Object.values(s==null?void 0:s.name);p=p==null?void 0:p.reverse();let f=(G=s==null?void 0:s.contents)==null?void 0:G.map(ga=>ga==null?void 0:ga.key),m={comp:v,isShow:s==null?void 0:s.is_show,name:p==null?void 0:p[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:f,menuFilter:(M=s==null?void 0:s.filter)==null?void 0:M.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:($=s==null?void 0:s.filter)==null?void 0:$.fatherSyncs,relatedQuotes:(j=s==null?void 0:s.filter)==null?void 0:j.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(S=A.cloneDeep(p))==null?void 0:S.reverse()};for(let ga in p)parseInt(ga)>=1&&(m[`name${parseInt(ga)-1}`]=p[ga]);let k=Array.isArray((w=s==null?void 0:s.filter)==null?void 0:w.menuFilter)?(b=s==null?void 0:s.filter)==null?void 0:b.menuFilter:[];if(((g=k==null?void 0:k.filter(ga=>ga==null?void 0:ga.includes("@Filter")))==null?void 0:g.length)>0){let ga=k==null?void 0:k.filter(Ie=>Ie==null?void 0:Ie.includes("@Filter"));ga=ga==null?void 0:ga[0],ga=(I=(R=ga==null?void 0:ga.replace("(",uo))==null?void 0:R.split(uo))==null?void 0:I[1],ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1),ga!=null&&ga.includes("*")&&(ga=(le=(Y=ga==null?void 0:ga.replace("{",uo))==null?void 0:Y.split(uo))==null?void 0:le[1],ga=ga==null?void 0:ga.replace("}","")),ga=he.calculatorAndToOr(ga);let xa=(l==null?void 0:l.originPath)??"";(xa==null?void 0:xa[(xa==null?void 0:xa.length)-1])==="/"&&(xa=xa==null?void 0:xa.slice(0,(xa==null?void 0:xa.length)-1));let La=await Kr(xa,!1),Ra=(ye=La==null?void 0:La.filter(Ie=>(Ie==null?void 0:Ie.comp)==="Table"))==null?void 0:ye[0];Ra=(V=(Te=Ra==null?void 0:Ra.compData)==null?void 0:Te.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:V.contents;let xe=(ee=(se=Tp.value)==null?void 0:se.find(Ie=>(Ie==null?void 0:Ie.condition)==="child"))==null?void 0:ee.value;Ra=(ue=Ra==null?void 0:Ra.map(Ie=>{for(let de in Ie)if((Ie==null?void 0:Ie[de])===xe)return Ie}))==null?void 0:ue.filter(Ie=>Ie),Ra=Ra==null?void 0:Ra[0],ga=ga==null?void 0:ga[0];let ia=[];for(let Ie in ga){let de="";qa.isObject(Ra)&&(de=(Pe=(Ce=Object.keys(Ra))==null?void 0:Ce.filter(ma=>ma==null?void 0:ma.includes("."+Ie)))==null?void 0:Pe[0]),de!==""&&(Ra!=null&&Ra[de])&&(ga==null?void 0:ga[Ie])===(Ra==null?void 0:Ra[de])||Ra!=null&&Ra[Ie]&&(ga==null?void 0:ga[Ie])===(Ra==null?void 0:Ra[Ie])?ia.push(!0):ia.push(!1)}if(ia!=null&&ia.some(Ie=>Ie===!1)&&((B=l==null?void 0:l.originPath)==null?void 0:B[((ve=l==null?void 0:l.originPath)==null?void 0:ve.length)-1])!=="/")return}if(v==="Table"||v==="Method"){!r&&((ce=m==null?void 0:m.fatherSyncContents)==null?void 0:ce.length)>0;let ga=((W=s==null?void 0:s.contents)==null?void 0:W.find(Je=>{var Xe;return(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.includes("content")}))||[],xa=[];m.comp="Table",ga.value=(Se=ga==null?void 0:ga.value)==null?void 0:Se.sort((Je,Xe)=>parseInt(Je==null?void 0:Je.id)-parseInt(Xe==null?void 0:Xe.id)),ga.value=(Le=ga==null?void 0:ga.value)==null?void 0:Le.map(Je=>{let Xe={};for(let Ke in Je)JSON.stringify(Je==null?void 0:Je[Ke])==="{}"?Xe[Ke]="":Xe[Ke]=Je==null?void 0:Je[Ke];return Xe}),xa.push({key:"tableContents",contents:ga==null?void 0:ga.value});let La=(ta=(ae=(Na=(aa=(Fe=s==null?void 0:s.contents)==null?void 0:Fe.find(Je=>{var Xe;return(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.includes("struct")}))==null?void 0:aa.value)==null?void 0:Na[0])==null?void 0:ae.结构)==null?void 0:ta.contents;Array.isArray(La==null?void 0:La[0])?La[0]=(oe=La==null?void 0:La[0])==null?void 0:oe.filter(Je=>(Je==null?void 0:Je.prop)!=="sort"&&(Je==null?void 0:Je.prop)!=="relatedId"):La=La==null?void 0:La.filter(Je=>(Je==null?void 0:Je.prop)!=="sort"&&(Je==null?void 0:Je.prop)!=="relatedId"),xa.push({key:"header",contents:La}),xa.push({key:"filter",contents:(Ue=(Be=(ie=(Ee=(ca=s==null?void 0:s.contents)==null?void 0:ca.find(Je=>{var Xe;return(Xe=Je==null?void 0:Je.key)==null?void 0:Xe.includes("struct")}))==null?void 0:Ee.value)==null?void 0:ie[0])==null?void 0:Be.引用)==null?void 0:Ue.contents});let Ra=Ap,xe=A.cloneDeep(zp);v==="Method"&&xe.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(La==null?void 0:La[0])&&((oa=La==null?void 0:La[0])==null?void 0:oa.prop)==="disabled"&&(Ra=Mp,xe=Ip);const ia=["推力","真空","压力","温度","流量"],Ie=m.name;Ie&&ia.includes(Ie)&&(Ra=[...Ra],Ra.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let de=[];if(!Array.isArray(La==null?void 0:La[0])&&(La!=null&&La.some(Je=>{var Xe;return(Je==null?void 0:Je.calculatorFilter)&&((Xe=Je==null?void 0:Je.calculatorFilter)==null?void 0:Xe.includes("Manual"))}))){let Je=(Ja=La==null?void 0:La.map(Xe=>Xe==null?void 0:Xe.calculatorFilter))==null?void 0:Ja.filter(Xe=>Xe&&(Xe==null?void 0:Xe.includes("Manual")));Je==null||Je.forEach(Xe=>{var pl;let Ke=he.analyzeSplitToContent(Xe,",");if(Ke=Ke==null?void 0:Ke.map(Ve=>((Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),Ve)),Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Ke==null?void 0:Ke.find(Fa=>Fa==null?void 0:Fa.includes("@FunctionButton"));Ve=(pl=Ve==null?void 0:Ve.split("="))==null?void 0:pl[1],Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=Ve==null?void 0:Ve.split(","),Ve=Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1],de.push(Ve)}}),de=[...new Set(de)],de=de==null?void 0:de.map(Xe=>({label:Xe,prop:Xe,type:"methodButton"}))}else if(Array.isArray(La==null?void 0:La[0])&&((L=he.getColumnChild(La==null?void 0:La[0]))!=null&&L.some(Je=>{var Xe;return(Je==null?void 0:Je.calculatorFilter)&&((Xe=Je==null?void 0:Je.calculatorFilter)==null?void 0:Xe.includes("Manual"))}))){let Je=(Z=(H=he.getColumnChild(La==null?void 0:La[0]))==null?void 0:H.map(Xe=>Xe==null?void 0:Xe.calculatorFilter))==null?void 0:Z.filter(Xe=>Xe&&(Xe==null?void 0:Xe.includes("Manual")));Je==null||Je.forEach(Xe=>{var pl;let Ke=he.analyzeSplitToContent(Xe,",");if(Ke=Ke==null?void 0:Ke.map(Ve=>((Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),Ve)),Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Ke!=null&&Ke.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Ke==null?void 0:Ke.find(Fa=>Fa==null?void 0:Fa.includes("@FunctionButton"));Ve=(pl=Ve==null?void 0:Ve.split("="))==null?void 0:pl[1],Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1),Ve=Ve==null?void 0:Ve.split(","),Ve=Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1],de.push(Ve)}}),de=[...new Set(de)],de=de==null?void 0:de.map(Xe=>({label:Xe,prop:Xe,type:"methodButton"}))}xa.push({key:"extraButton",contents:Ra}),xa.push({key:"rowButton",contents:[...xe,...de]}),m.compData=await Et(xa,l),(me=m.compData)!=null&&me.find(Je=>(Je==null?void 0:Je.key)==="tab")&&(m.tab=(da=(fe=m.compData)==null?void 0:fe.find(Je=>(Je==null?void 0:Je.key)==="tab"))==null?void 0:da.contents),(Qe=m.compData)!=null&&Qe.find(Je=>(Je==null?void 0:Je.key)==="step")&&(m.step=(pa=(te=m.compData)==null?void 0:te.find(Je=>(Je==null?void 0:Je.key)==="step"))==null?void 0:pa.contents),(Ne=m.compData)!=null&&Ne.find(Je=>(Je==null?void 0:Je.key)==="choice")&&(m.choice=(Aa=(We=m.compData)==null?void 0:We.find(Je=>(Je==null?void 0:Je.key)==="choice"))==null?void 0:Aa.contents);let ma="",ya=(Da=m==null?void 0:m.compData)==null?void 0:Da.filter(Je=>(Je==null?void 0:Je.key)==="fixType");(ya==null?void 0:ya.length)>0&&r&&(ma=(Ze=ya==null?void 0:ya[0])==null?void 0:Ze.contents,m.comp=ma)}else if(v==="Form"){let ga=[],xa=(U=(pe=(ra=s==null?void 0:s.contents)==null?void 0:ra.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.key)==null?void 0:de.includes("content")}))==null?void 0:pe.value)==null?void 0:U[0],La=[],Ra=Array.isArray((q=s==null?void 0:s.filter)==null?void 0:q.menuFilter)?(ze=s==null?void 0:s.filter)==null?void 0:ze.menuFilter:[];Ra==null||Ra.forEach(Ie=>{if(Ie!=null&&Ie.includes("@Param(Hide=Yes, prop=")||Ie!=null&&Ie.includes("(Hide=Yes, prop=")){const de=Ie==null?void 0:Ie.match(/prop=([^,)]+)/);de!=null&&de[1]&&La.push(de==null?void 0:de[1])}});let xe=(ha=(ka=(fa=(la=(_e=s==null?void 0:s.contents)==null?void 0:_e.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.key)==null?void 0:de.includes("struct")}))==null?void 0:la.value)==null?void 0:fa[0])==null?void 0:ka.结构)==null?void 0:ha.contents,ia=(Va=xe==null?void 0:xe.map(Ie=>(Ie.value=xa==null?void 0:xa[Ie==null?void 0:Ie.prop],Ie)))==null?void 0:Va.filter(Ie=>(Ie==null?void 0:Ie.prop)!=="sort"&&(Ie==null?void 0:Ie.prop)!=="relatedId");ia=ia==null?void 0:ia.map(Ie=>(La!=null&&La.includes(Ie==null?void 0:Ie.prop)&&(Ie.isHideInForm=!0),Ie)),ga.push({key:"filter",contents:(xl=(Ha=(Za=(Oe=(Sa=s==null?void 0:s.contents)==null?void 0:Sa.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.key)==null?void 0:de.includes("struct")}))==null?void 0:Oe.value)==null?void 0:Za[0])==null?void 0:Ha.引用)==null?void 0:xl.contents}),ga.push({key:"formContent",contents:ia}),ga.push({key:"paramHideProps",contents:La}),m.compData=await Np(ga),(Yl=m.compData)!=null&&Yl.find(Ie=>(Ie==null?void 0:Ie.key)==="tab")&&(m.tab=(Fl=(kl=m.compData)==null?void 0:kl.find(Ie=>(Ie==null?void 0:Ie.key)==="tab"))==null?void 0:Fl.contents),(ja=m.compData)!=null&&ja.find(Ie=>(Ie==null?void 0:Ie.key)==="step")&&(m.step=($l=(zl=m.compData)==null?void 0:zl.find(Ie=>(Ie==null?void 0:Ie.key)==="step"))==null?void 0:$l.contents),(Ma=m.compData)!=null&&Ma.find(Ie=>(Ie==null?void 0:Ie.key)==="choice")&&(m.choice=(sl=(rl=m.compData)==null?void 0:rl.find(Ie=>(Ie==null?void 0:Ie.key)==="choice"))==null?void 0:sl.contents)}return m});return n=await Promise.all(t),n},Op=A.useLoginState(A.pinia),{loginUserInfo:xi}=A.storeToRefs(Op),vt=async(a,l,r="Manual",n=[])=>{var f;let t=a,s;Array.isArray(l==null?void 0:l[0])?s=he.getColumnChild(l==null?void 0:l[0]):s=l;let v=(f=s==null?void 0:s.filter(m=>{var k;return(m==null?void 0:m.calculatorFilter)&&((k=m==null?void 0:m.calculatorFilter)==null?void 0:k.includes(r))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:f.map(m=>({prop:m==null?void 0:m.prop,label:m==null?void 0:m.label,methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),p=t==null?void 0:t.map(async m=>(m=await Pp(m,v,s,r,t,n),m));return p=await Promise.all(p),p},Lp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(v=>{var p;if(l!=null&&l[v]){let f=l==null?void 0:l[v];s=s?f?Bl.isEqual(f.toString(),s.toString()):void 0:f}else{let f=(p=t==null?void 0:t.find(k=>(k==null?void 0:k.label)===v))==null?void 0:p.prop,m=(l==null?void 0:l[f])??0;s=s?m?Bl.isEqual(m.toString(),s.toString()):void 0:m}}),l[n]=s===void 0?void 0:s?1:0,l},br=a=>{const[l,r,n]=A.cloneDeep(a).split(":").map(Number);let t=+a;return!a||!(a!=null&&a.includes(":"))?t:(l??0)*3600+(r??0)*60+(n??0)},jn=a=>{const l=s=>s.toString().padStart(2,"0"),r=Math.floor(a/3600),n=Math.floor(a%3600/60),t=a%60;return`${l(r)}:${l(n)}:${parseInt(l(t))}`},$p=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,F,_,G,M,$;if(l!=null&&l[f]){if(s==="Row")if(!((k=((m=l==null?void 0:l[f])==null?void 0:m.toString())??"")!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let j=+(l==null?void 0:l[f]);p=p+j}else p=br(p.toString())+br((D=l==null?void 0:l[f])==null?void 0:D.toString()),p=jn(p)}else if(s==="Row"){let j=(F=t==null?void 0:t.find(E=>(E==null?void 0:E.label)===f))==null?void 0:F.prop;if(!((G=Number.isNaN(l==null?void 0:l[j])?"":(_=l==null?void 0:l[j])==null?void 0:_.toString())!=null&&G.includes(":"))&&!((M=p==null?void 0:p.toString())!=null&&M.includes(":"))){let E=+((l==null?void 0:l[j])??0);p=p+E}else p=br(p==null?void 0:p.toString())+br(($=(l==null?void 0:l[j])??0)==null?void 0:$.toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(F=>(F==null?void 0:F.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c+D},0)}return l[n]=p,l},Rp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,F,_,G;if(l!=null&&l[f]){if(s==="Row")if(!((k=(m=l==null?void 0:l[f])==null?void 0:m.toString())!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let M=+(l==null?void 0:l[f]);p=p===0?p+M:p-M}else p=p===0?br(p.toString())+br(l==null?void 0:l[f].toString()):br(p.toString())-br(l==null?void 0:l[f].toString()),p=jn(p)}else if(s==="Row"){let M=(D=t==null?void 0:t.find($=>($==null?void 0:$.label)===f))==null?void 0:D.prop;if(!((_=Number.isNaN(l==null?void 0:l[M])?"":(F=l==null?void 0:l[M])==null?void 0:F.toString())!=null&&_.includes(":"))&&!((G=p==null?void 0:p.toString())!=null&&G.includes(":"))){let $=+((l==null?void 0:l[M])??0);p=p===0?p+$:p-$}else p=p===0?br(p.toString())+br(((l==null?void 0:l[M])??0).toString()):br(p.toString())-br(((l==null?void 0:l[M])??0).toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(F=>(F==null?void 0:F.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c-D},0)}return l[n]=p,l},Vp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,F,_,G;if(l!=null&&l[f]){if(s==="Row")if(!((k=(m=l==null?void 0:l[f])==null?void 0:m.toString())!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let M=+(l==null?void 0:l[f]);p=p===0?p+M:p*M}else p=p===0?br(p.toString())+br(l==null?void 0:l[f].toString()):br(p.toString())*br(l==null?void 0:l[f].toString()),p=jn(p)}else if(s==="Row"){let M=(D=t==null?void 0:t.find($=>($==null?void 0:$.label)===f))==null?void 0:D.prop;if(!(l!=null&&l[M]))p=void 0;else if(!((_=Number.isNaN(l==null?void 0:l[M])?"":(F=l==null?void 0:l[M])==null?void 0:F.toString())!=null&&_.includes(":"))&&!((G=p==null?void 0:p.toString())!=null&&G.includes(":"))){let $=+((l==null?void 0:l[M])??0);p=p===0?p+$:p*$}else p=p===0?br(p.toString())+br(((l==null?void 0:l[M])??0).toString()):br(p.toString())*br(((l==null?void 0:l[M])??0).toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(F=>(F==null?void 0:F.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c*D},0)}return l[n]=p,l},Fp=a=>{let l=a==null?void 0:a.contents,r=a==null?void 0:a.valueString,n=a==null?void 0:a.prop,t=a==null?void 0:a.headers,s=a==null?void 0:a.typeString,v=a==null?void 0:a.allContents,p=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=he.getValueToObjectValue(l,he.getColumnContents(t))),r==null||r.forEach(f=>{var m,k,c,D,F,_,G;if(l!=null&&l[f]){if(s==="Row")if(!((k=(m=l==null?void 0:l[f])==null?void 0:m.toString())!=null&&k.includes(":"))&&!((c=p==null?void 0:p.toString())!=null&&c.includes(":"))){let M=+(l==null?void 0:l[f]);p=p===0?p+M:p/M}else p=p===0?br(p.toString())+br(l==null?void 0:l[f].toString()):br(p.toString())/br(l==null?void 0:l[f].toString()),p=jn(p)}else if(s==="Row"){let M=(D=t==null?void 0:t.find($=>($==null?void 0:$.label)===f))==null?void 0:D.prop;if(!((_=Number.isNaN(l==null?void 0:l[M])?"":(F=l==null?void 0:l[M])==null?void 0:F.toString())!=null&&_.includes(":"))&&!((G=p==null?void 0:p.toString())!=null&&G.includes(":"))){let $=+((l==null?void 0:l[M])??0);p=p===0?p+$:p/$}else p=p===0?br(p.toString())+br(((l==null?void 0:l[M])??0).toString()):br(p.toString())/br(((l==null?void 0:l[M])??0).toString()),p=jn(p)}}),s==="Column"){let f=[];r==null||r.forEach(m=>{let k=v==null?void 0:v.map(c=>{var D;return(c==null?void 0:c[m])??(c==null?void 0:c[(D=t==null?void 0:t.find(F=>(F==null?void 0:F.label)===m))==null?void 0:D.prop])});f=[...f,...k]}),p=f.reduce((m,k)=>{let c=0;Number.isNaN(m)||(c=+m);let D=0;return Number.isNaN(k)||(D=+k),c/D},0)}return l[n]=p.toFixed(2),l},po={Sum:$p,Substract:Rp,Multiple:Vp,Divide:Fp,Compare:Lp},Pp=async(a,l,r,n="Auto",t,s=[])=>{var k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V;let v=a,p=[],f=await A.getPageDataApi({platId:parseInt((k=xi==null?void 0:xi.value)==null?void 0:k.plat_id),pageName:"menu"});f=(F=(D=(c=f==null?void 0:f.data)==null?void 0:c.result)==null?void 0:D.filter(se=>(se==null?void 0:se.property_name)===""))==null?void 0:F[0];let m=[];if(f!=null&&f.object_name){f=f==null?void 0:f.object_name;let se=await A.getPageDataApi({platId:parseInt((_=xi==null?void 0:xi.value)==null?void 0:_.plat_id),pageName:f});se=(E=(j=($=(M=(G=se==null?void 0:se.data)==null?void 0:G.result)==null?void 0:M[0])==null?void 0:$.contents)==null?void 0:j.find(ee=>{var ue;return(ue=ee==null?void 0:ee.key)==null?void 0:ue.includes("content")}))==null?void 0:E.value,p=(S=se==null?void 0:se.map(ee=>({functionName:ee==null?void 0:ee.函数名称,functionContent:ee==null?void 0:ee.输出值})))==null?void 0:S.filter(ee=>(ee==null?void 0:ee.functionContent)!==""),p==null||p.forEach(ee=>{m.push(ee.functionName),po[ee.functionName]=new Function("return "+ee.functionContent)()})}if((l==null?void 0:l.length)===0)return v;for(let se in l){let ee=(w=l==null?void 0:l[se])==null?void 0:w.functionName;const ue=po==null?void 0:po[ee];let Ce=(b=l==null?void 0:l[se])==null?void 0:b.methods;if(Ce=he.analyzeSplitToContent(Ce,","),console.log(Ce),(g=Ce==null?void 0:Ce.find(Pe=>Pe==null?void 0:Pe.includes("@FunctionType")))!=null&&g.includes(n)||(Ce==null?void 0:Ce.length)===0){let Pe=((Y=(I=(R=Ce==null?void 0:Ce.find(ve=>ve==null?void 0:ve.includes("@FunctionExtent")))==null?void 0:R.replace(":","="))==null?void 0:I.split("="))==null?void 0:Y[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(ve=>ve===ee)){let ve="";try{let ce=(le=l==null?void 0:l[se])==null?void 0:le.functionRelatedWords,W=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Le=>{var Fe;return Le==null?void 0:Le[(Fe=l==null?void 0:l[se])==null?void 0:Fe.prop]}):["0"];W=W==null?void 0:W.map(Le=>Le==null?void 0:Le.slice((Le==null?void 0:Le.length)-5,Le==null?void 0:Le.length)),W=W==null?void 0:W.map(Le=>he.isNumber(parseInt(Le))&&parseInt(Le)?parseInt(Le):0);let Se=Math.max(...W);ce=ce==null?void 0:ce.map(Le=>{if(Le!=null&&Le.includes("'"))return Le==null?void 0:Le.replaceAll("'","");if(Le!=null&&Le.includes("@"))return Se+1;{let Fe=Object.keys(v);return Le=(v==null?void 0:v[Le])??(v==null?void 0:v[Fe==null?void 0:Fe.find(aa=>aa==null?void 0:aa.includes("."+Le))]),Le}}),ve=ue(...ce)}catch(ce){qa.ElMessage.warning("关联数据出现错误,"+ce.message)}let B=(ye=l==null?void 0:l[se])==null?void 0:ye.prop;v[B]=ve}else v=ue({contents:v,valueString:(Te=l==null?void 0:l[se])==null?void 0:Te.functionRelatedWords,prop:(V=l==null?void 0:l[se])==null?void 0:V.prop,headers:r,typeString:Pe,allContents:t})}}return v},jp=A.useLoginState(A.pinia),{loginUserInfo:Xr}=A.storeToRefs(jp),Hp=A.useMenuState(A.pinia),{activeMenuPath:os,currentMenuPath:fo}=A.storeToRefs(Hp),oc=A.useUnit(A.pinia);let ts="$R";const{selectTitle:Si}=A.storeToRefs(oc),tc=async(a,l)=>{var v,p,f,m,k,c,D,F,_,G,M,$,j;let r=os.value,n="",t=((v=Si==null?void 0:Si.value)==null?void 0:v.find(E=>(E==null?void 0:E.condition)==="child"&&!(E!=null&&E.relatedContent)))??void 0;(a==null?void 0:a.length)===0||(r=l?r:(p=a==null?void 0:a[0])==null?void 0:p.object_name,n=(f=a==null?void 0:a[0])==null?void 0:f.father_name);let s=[];if(n!==""){let E=n;(E==null?void 0:E[(E==null?void 0:E.length)-1])==="/"&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1));let S=await Kr(E,!1);S=(m=S==null?void 0:S[0])==null?void 0:m.compData;let w=(k=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:k.contents;w=((c=w==null?void 0:w.find(g=>g==null?void 0:g.isMainKey))==null?void 0:c.prop)??((D=w==null?void 0:w[0])==null?void 0:D.prop);let b=(_=(F=S==null?void 0:S.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:_.map(g=>({label:g==null?void 0:g[w],value:g==null?void 0:g[w]}));s=(G=n==null?void 0:n.split("/"))==null?void 0:G.map(g=>(g===""?t?(t.isShow=!0,g=t):g={value:g,condition:"child",options:b,parentContent:(n==null?void 0:n[(n==null?void 0:n.length)-1])==="/"?n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1):n,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(r!==""){let E=(M=r==null?void 0:r.split("/"))==null?void 0:M.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));(($=E==null?void 0:E[0])==null?void 0:$.value)===((j=s==null?void 0:s[0])==null?void 0:j.value)&&(E=E==null?void 0:E.filter((S,w)=>w!==0)),s=[...s??[],...E??[]]}n===""&&t&&((t==null?void 0:t.parentContent)!==os.value&&(t.isShow=!1),(t==null?void 0:t.value)!==""&&s.push(t)),oc.setSelectTitle(s)},Up=async a=>{var s,v,p,f,m,k,c,D,F;let l=await A.getPageDataApi({platId:parseInt((s=Xr==null?void 0:Xr.value)==null?void 0:s.plat_id),pageName:"menu"}),r=(v=l==null?void 0:l.data)==null?void 0:v.result,n=(k=(m=(f=(p=a==null?void 0:a.filter(_=>(_==null?void 0:_.comp)==="Table"))==null?void 0:p[0])==null?void 0:f.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="filter"))==null?void 0:k.contents;n=(F=(D=(c=n==null?void 0:n.replace("(",ts))==null?void 0:c.split(ts))==null?void 0:D[0])==null?void 0:F.replaceAll(":","/");let t=r==null?void 0:r.filter(_=>{var G;return(_==null?void 0:_.object_name)===fo.value+"/"||((G=fo.value)==null?void 0:G.includes(n))&&n+"/"===(_==null?void 0:_.object_name)});return(t==null?void 0:t.length)>0&&(a=a==null?void 0:a.map(_=>{var G;return(_==null?void 0:_.comp)==="Table"&&(_.compData=(G=_==null?void 0:_.compData)==null?void 0:G.map(M=>{var $,j,E;return(M==null?void 0:M.key)==="header"&&(Array.isArray(($=M.contents)==null?void 0:$[0])?M.contents[0]=(E=M.contents[0])==null?void 0:E.map((S,w)=>{var b;return w===0&&(S.isExistChild=!0,(b=fo.value)!=null&&b.includes(n)&&(S.fatherPath=n)),S}):M.contents=(j=M.contents)==null?void 0:j.map((S,w)=>{var b;return w===0&&(S.isExistChild=!0,(b=fo.value)!=null&&b.includes(n)&&(S.fatherPath=n)),S})),M})),_})),a},Kr=async(a,l,r={})=>{var v,p,f,m,k,c,D,F,_,G,M,$;let n=await A.getPageDataApi({platId:parseInt((v=Xr==null?void 0:Xr.value)==null?void 0:v.plat_id),pageName:a}),t=(p=n==null?void 0:n.data)==null?void 0:p.result;if((t==null?void 0:t.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==a){let j=await A.getPageDataApi({platId:parseInt((f=Xr==null?void 0:Xr.value)==null?void 0:f.plat_id),pageName:r==null?void 0:r.originPath});if(((k=(m=j==null?void 0:j.data)==null?void 0:m.result)==null?void 0:k.length)>0){let E=await is((c=j==null?void 0:j.data)==null?void 0:c.result,r,!1);E=E==null?void 0:E.map(async b=>{var I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja;let g=[],R=(I=Object.keys(b))==null?void 0:I.filter(L=>(L==null?void 0:L.includes("name"))&&L!=="nameContents");for(let L in b)R!=null&&R.find(H=>H===L)&&g.push(b==null?void 0:b[L]);if(g=g.reverse(),(b==null?void 0:b.comp)==="Table"){let L=(ye=(le=(Y=b==null?void 0:b.compData)==null?void 0:Y.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:le.contents)==null?void 0:ye.map(Z=>{let me={};for(let fe in Z)fe!=="id"&&fe!=="create_time"&&fe!=="update_time"&&fe!=="sort"&&fe!=="create_user_id"&&fe!=="update_user_id"&&fe!=="department_id"&&fe!=="relatedId"&&(me[fe]=Z==null?void 0:Z[fe]);return Z=Object.values(me),Z}),H=(V=(Te=b==null?void 0:b.compData)==null?void 0:Te.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:V.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(se=H[0])!=null&&se.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(H[0]=(ee=H[0])==null?void 0:ee.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(H=H==null?void 0:H.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(Z=>{var me;return(Z==null?void 0:Z.calculatorFilter)&&((me=Z==null?void 0:Z.calculatorFilter)==null?void 0:me.includes("Auto"))})&&(L=await vt(L,H,"Auto"),L=L==null?void 0:L.map(Z=>Object.values(Z))),b!=null&&b.fatherSyncContents){Array.isArray((ue=b==null?void 0:b.fatherSyncContents)==null?void 0:ue[0])&&(b.fatherSyncContents=(Ce=b==null?void 0:b.fatherSyncContents)==null?void 0:Ce[0]);let Z=(Pe=Si.value)==null?void 0:Pe.find(me=>(me==null?void 0:me.condition)==="child");b.fatherSyncContents=(ve=b==null?void 0:b.fatherSyncContents)==null?void 0:ve.map(me=>{var fe,da,Qe,te,pa,Ne;return((da=me==null?void 0:me.menus)==null?void 0:da[((fe=me==null?void 0:me.menus)==null?void 0:fe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(me==null?void 0:me.menus)?me.menus=(me==null?void 0:me.menus)+(Z==null?void 0:Z.value):((te=me==null?void 0:me.menus)==null?void 0:te[((Qe=me==null?void 0:me.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(me==null?void 0:me.menus)&&(me.menus=(Ne=me.menus)==null?void 0:Ne.slice(0,((pa=me.menus)==null?void 0:pa.length)-1)),me})}if(b!=null&&b.sonSyncContents){Array.isArray((B=b==null?void 0:b.sonSyncContents)==null?void 0:B[0])&&(b.sonSyncContents=(ce=b==null?void 0:b.sonSyncContents)==null?void 0:ce[0]);let Z=(W=Si.value)==null?void 0:W.find(me=>(me==null?void 0:me.condition)==="child");b.sonSyncContents=(Se=b==null?void 0:b.sonSyncContents)==null?void 0:Se.map(me=>{var fe,da,Qe,te,pa,Ne;return((da=me==null?void 0:me.menus)==null?void 0:da[((fe=me==null?void 0:me.menus)==null?void 0:fe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(me==null?void 0:me.menus)?me.menus=(me==null?void 0:me.menus)+(Z==null?void 0:Z.value):((te=me==null?void 0:me.menus)==null?void 0:te[((Qe=me==null?void 0:me.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(me==null?void 0:me.menus)&&(me.menus=(Ne=me.menus)==null?void 0:Ne.slice(0,((pa=me.menus)==null?void 0:pa.length)-1)),me})}if(b!=null&&b.relatedQuotes){Array.isArray((Le=b==null?void 0:b.relatedQuotes)==null?void 0:Le[0])&&(b.relatedQuotes=(Fe=b==null?void 0:b.relatedQuotes)==null?void 0:Fe[0]);let Z=(aa=Si.value)==null?void 0:aa.find(me=>(me==null?void 0:me.condition)==="child");b.relatedQuotes=(Na=b==null?void 0:b.relatedQuotes)==null?void 0:Na.map(me=>{var fe,da,Qe,te,pa,Ne;return((da=me==null?void 0:me.menus)==null?void 0:da[((fe=me==null?void 0:me.menus)==null?void 0:fe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(me==null?void 0:me.menus)?me.menus=(me==null?void 0:me.menus)+(Z==null?void 0:Z.value):((te=me==null?void 0:me.menus)==null?void 0:te[((Qe=me==null?void 0:me.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(me==null?void 0:me.menus)&&(me.menus=(Ne=me.menus)==null?void 0:Ne.slice(0,((pa=me.menus)==null?void 0:pa.length)-1)),me})}b={filter:(ta=(ae=b==null?void 0:b.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:ta.contents,key:b==null?void 0:b.comp,name:g,tableColumns:H,tableContents:L,menuFilter:b==null?void 0:b.menuFilter,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents}}else{let L=(Ee=(ca=(oe=b==null?void 0:b.compData)==null?void 0:oe.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:ca.contents)==null?void 0:Ee.map(Z=>(Z==null?void 0:Z.value)??"");L=[L];let H=(Ue=(Be=(ie=b==null?void 0:b.compData)==null?void 0:ie.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:Be.contents)==null?void 0:Ue.map(Z=>(Z.value="",Z));b={contents:L,filter:(Ja=(oa=b==null?void 0:b.compData)==null?void 0:oa.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:Ja.contents,key:b==null?void 0:b.comp,name:g,value:H,fatherSyncContents:b==null?void 0:b.fatherSyncContents,relatedQuotes:b==null?void 0:b.relatedQuotes,sonSyncContents:b==null?void 0:b.sonSyncContents}}return b.isShow=!1,b}),E=await Promise.all(E);let S=[{key:"menuPath",contents:[{path:a,fatherPath:(_=(F=(D=j==null?void 0:j.data)==null?void 0:D.result)==null?void 0:F[0])==null?void 0:_.father_name,isShow:!1}]},{key:a,contents:E}];await A.createPlatFormDataApi({platId:parseInt((G=Xr==null?void 0:Xr.value)==null?void 0:G.plat_id),changeData:S});let w=await A.getPageDataApi({platId:parseInt((M=Xr==null?void 0:Xr.value)==null?void 0:M.plat_id),pageName:a});t=($=w==null?void 0:w.data)==null?void 0:$.result}}l&&await tc(t,!!(r!=null&&r.originPath));let s=await is(t,r);return l&&(s=await Up(s)),s==null?void 0:s.filter(j=>j)},ss=async a=>{var n,t,s,v,p,f,m,k,c,D,F;let l=(n=a==null?void 0:a.menus)==null?void 0:n.join("/");a!=null&&a.endChildMenu&&(a==null?void 0:a.endChildMenu)!==""&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+(a==null?void 0:a.endChildMenu)),(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"&&(l=l+((s=(t=a.value)==null?void 0:t.split(" "))==null?void 0:s[0]));let r=await Kr(l,!1);if(r=(v=r==null?void 0:r.filter(_=>{var G,M;return(_==null?void 0:_.name)===((M=a==null?void 0:a.groups)==null?void 0:M[((G=a==null?void 0:a.groups)==null?void 0:G.length)-1])}))==null?void 0:v[0],(f=(p=r==null?void 0:r.compData)==null?void 0:p.find(_=>(_==null?void 0:_.key)==="tableContents"))!=null&&f.contents){r=(k=(m=r==null?void 0:r.compData)==null?void 0:m.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:k.contents;let _=((c=a==null?void 0:a.words)==null?void 0:c[0])??(a==null?void 0:a.prop);return r=r==null?void 0:r.filter(G=>{var M,$,j,E;return(G==null?void 0:G[a!=null&&a.endChildMenu?_:(M=a==null?void 0:a.words)==null?void 0:M[0]])===(a!=null&&a.relatedWords&&(($=a==null?void 0:a.relatedWords)==null?void 0:$.length)>0?(E=(j=a.value)==null?void 0:j.split(" "))==null?void 0:E[0]:a.value)}),r==null?void 0:r[0]}else{let _=(F=(D=r==null?void 0:r.compData)==null?void 0:D.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:F.contents,G={};return _==null||_.forEach(M=>{G[M.prop]=M.value}),G}},qp={key:0,class:"extra-button-content"},Wp={class:"table-operator-wrap"},Kp={key:0,class:"extra-button-filter"},Gp={key:1,class:"extra-header"},Yp=["onClick"],Jp={class:"table-op-text"},Xp={class:"table-op-text"},Zp={class:"drop-menu",style:{width:"120px"}},Qp=["onClick"],ef={key:0},af={key:1},lf=["onClick"],rf={class:"table-op-text"},nf={key:1,class:"extra-button-content tabs-button-wrapper"},of={class:"table-operator-wrap"},tf={class:"extra-button-filter"},sf={key:0,class:"extra-header"},cf={class:"table-op-action"},uf={class:"table-op-text"},df={class:"drop-menu",style:{width:"120px"}},pf={key:0},ff={key:1},hf=["onClick"],vf={class:"table-op-text"},mf={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},menuFilter:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(a,{emit:l}){const r=l,n=a,t=()=>{const R=(n==null?void 0:n.menuFilter)||[];return Array.isArray(R)&&(R==null?void 0:R.some(I=>{const Y=typeof I=="string"?I:JSON.stringify(I);return Y==null?void 0:Y.includes("HideGroup=Yes")}))},s=e.ref(""),v=e.ref(!1),p=e.ref(!1),f=e.ref([]),m=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),k=[{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 c(R,I){return R.map(Y=>{const le={...Y};return I.forEach(ye=>{delete le[ye]}),le})}function D(R){if(!R||R.t!=="n")return(R==null?void 0:R.v)??"";const I=R.v;if(R.z){const Y=String(R.z).toLowerCase(),le=["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 V of le)if(Y.includes(V))return F(I);const ye=/[ymdhms]/.test(Y),Te=/^[0#\.\,\s]+$/.test(Y.replace(/[\\\/\-:]/g,""));if(ye&&!Te)return F(I)}if(I>=1&&I<=73050){if(I<5e3)return I;if(I>=5e3&&I<4e4){const Y=Math.floor((I-25569)/365.25)+1970;return Y>=1970&&Y<=2e3&&R.z&&/[ymd]/.test(String(R.z).toLowerCase())?F(I):I}if(I>=4e4)return F(I)}return I}function F(R){if(typeof R!="number")return R;try{const I=new Date((R-25569)*86400*1e3);if(isNaN(I.getTime()))return R;const Y=I.getFullYear(),le=String(I.getMonth()+1).padStart(2,"0"),ye=String(I.getDate()).padStart(2,"0");return`${Y}-${le}-${ye}`}catch{return R}}const _=R=>{const I=R.raw;if(!I)return;const Y=new FileReader;Y.onload=le=>{try{const ye=new Uint8Array(le.target.result),Te=he.readSync(ye,{type:"array"}),V=Te.SheetNames[0],se=Te.Sheets[V],ue=he.utils.decode_range(se["!ref"]).e.c+1,Ce=new Array(ue).fill(""),Pe=[];for(const Se in se){if(Se[0]==="!")continue;const{r:Le,c:Fe}=he.utils.decode_cell(Se),aa=se[Se];let Na=D(aa);if((Na==null||Na==="")&&(Na=""),Le===0)Ce[Fe]=Na;else{if(!Pe[Le-1]){Pe[Le-1]={};for(let ae=0;ae<ue;ae++)Pe[Le-1][`col_${ae}`]=""}Pe[Le-1][`col_${Fe}`]=Na}}for(let Se=0;Se<ue;Se++)Ce[Se]===void 0&&(Ce[Se]="");const ve=[];for(let Se=0;Se<Ce.length;Se++)(!Ce[Se]||Ce[Se].toString().trim()==="")&&ve.push(Se);let B,ce;(ve==null?void 0:ve.length)>0?(qa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),B=Ce.filter((Se,Le)=>!ve.includes(Le)),ce=c(Pe,ve==null?void 0:ve.map(Se=>`col_${Se}`))):(B=Ce,ce=Pe);const W=Pe==null?void 0:Pe[0];if(!(W!=null&&W.hasOwnProperty("col_0")))return qa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",B,ce)}catch(ye){throw qa.ElMessage.error(ye.message),new Error(ye.message)}},Y.readAsArrayBuffer(I)},G=R=>{var Y;const I=(Y=f.value)==null?void 0:Y.reduce((le,ye,Te)=>(Te===0?le[ye.label]=R:le[ye.label]=ye==null?void 0:ye.value,le),{});r("filter",I,R,!0)},M=(R,I={})=>{r("buttonClick",R,"",I)},$=R=>{var I,Y;f.value=(Y=(I=he.getColumnChild(A.cloneDeep(R)))==null?void 0:I.filter(le=>(le==null?void 0:le.label)!==""&&(le==null?void 0:le.label)!=="操作"))==null?void 0:Y.map(le=>({label:(le==null?void 0:le.label)??"",value:"",name:(le==null?void 0:le.prop)??"",isFormColHidden:le==null?void 0:le.isTableColHidden,width:2,prop:(le==null?void 0:le.prop)??""}))},j=e.ref(!1),E=R=>{var I;if((R==null?void 0:R.buttonName)==="确认"&&(r("filter",R==null?void 0:R.content),j.value=(R==null?void 0:R.content)&&Object.values(R==null?void 0:R.content).length>0),(R==null?void 0:R.buttonName)==="清空"){const Y=A.cloneDeep(R==null?void 0:R.content);for(const le in Y)Y[le]="";f.value=(I=f.value)==null?void 0:I.map(le=>({...le,value:""})),r("filter",Y),j.value=!1}v.value=!1},S=()=>{v.value=!v.value,p.value=!0},w=()=>{var I,Y;f.value=(I=f.value)==null?void 0:I.map(le=>({...le,value:""}));const R=(Y=f.value)==null?void 0:Y.reduce((le,ye)=>(le[ye.label]=ye.value,le),{});r("filter",R)},b=e.ref(null);let g;return g=R=>{var ye;if(!v.value)return;const I=(ye=b==null?void 0:b.value)==null?void 0:ye.$el,Y=I==null?void 0:I.contains(R.target);let le=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Te=>{Te.contains(R.target)&&(le=!0)}),!Y&&!le&&(v.value=!1)},e.onMounted(()=>{document.addEventListener("click",g),$(n.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",g)}),e.watch(()=>n.columns,()=>{$(n.columns)},{deep:!0,immediate:!0}),(R,I)=>{var se,ee,ue,Ce,Pe,ve,B,ce;const Y=e.resolveComponent("el-icon"),le=e.resolveComponent("svg-icon"),ye=e.resolveComponent("el-input"),Te=e.resolveComponent("el-upload"),V=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",qp,[t()?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.compName?"table-name-wrap":""),style:e.normalizeStyle({background:(n==null?void 0:n.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((n==null?void 0:n.level)-1)*12+"px",fontWeight:600-((n==null?void 0:n.level)-1)*100>=400?600-((n==null?void 0:n.level)-1)*100:400,fontSize:17-(n==null?void 0:n.level)>=14?17-(n==null?void 0:n.level)+"px":"14px"})},e.toDisplayString(a.compName),7)),e.createElementVNode("div",Wp,[n!=null&&n.filterShow?(e.openBlock(),e.createElementBlock("div",Kp,[e.createVNode($u,{trigger:"contextmenu",ref_key:"popOverRef",ref:b,title:"",width:800,placement:"bottom-start",isVisible:v.value,"onUpdate:isVisible":I[4]||(I[4]=W=>v.value=W)},{reference:e.withCtx(()=>{var W,Se,Le,Fe;return[e.createVNode(ye,{modelValue:s.value,"onUpdate:modelValue":I[0]||(I[0]=aa=>s.value=aa),style:{"min-width":"80px"},placeholder:j.value?(Le=(Se=(W=a.filterValues)==null?void 0:W.filter(aa=>aa))==null?void 0:Se.slice(0,3))==null?void 0:Le.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:G,disabled:((Fe=f.value)==null?void 0:Fe.length)===0},{suffix:e.withCtx(()=>{var aa,Na;return[!s.value&&((Na=(aa=a.filterValues)==null?void 0:aa.filter(ae=>ae))!=null&&Na.join("/"))?(e.openBlock(),e.createBlock(Y,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(le,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[p.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(ll.ssForm,{rowContents:f.value,buttonValue:m.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:m.value,isStartJustify:!1,onOnButtonClick:E},null,8,["rowContents","buttonValue"]))],32)):e.createCommentVNode("",!0)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((se=a.buttons)==null?void 0:se.length)>0?(e.openBlock(),e.createElementBlock("div",Gp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ee=a.buttons)==null?void 0:ee.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,Se)=>{var Le;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Se},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(Te,{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 Fe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:aa=>M(W==null?void 0:W.label)},[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"]),e.createElementVNode("span",Jp,e.toDisplayString(W==null?void 0:W.label),1)],10,Yp)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(ll._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Fe;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"]),e.createElementVNode("span",Xp,e.toDisplayString(W==null?void 0:W.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",Zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,Fe=>{var aa,Na;return e.openBlock(),e.createElementBlock("div",{key:Fe==null?void 0:Fe.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:ae=>!a.lockingPage&&M(Fe==null?void 0:Fe.label)},[e.createTextVNode(e.toDisplayString(Fe==null?void 0:Fe.label),1),(aa=Fe==null?void 0:Fe.label)!=null&&aa.includes("选中")?(e.openBlock(),e.createElementBlock("span",ef,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Na=Fe==null?void 0:Fe.label)!=null&&Na.includes("全部")?(e.openBlock(),e.createElementBlock("span",af,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,Qp)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Fe=>!a.lockingPage&&M(W==null?void 0:W.label,W)},[e.createVNode(le,{class:"table-op-icon",name:((Le=k==null?void 0:k.find(Fe=>(Fe==null?void 0:Fe.label)===(W==null?void 0:W.label)))==null?void 0:Le.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",rf,e.toDisplayString(W==null?void 0:W.label),1)],10,lf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",nf,[e.createElementVNode("div",of,[e.createElementVNode("div",tf,[e.createVNode(ye,{modelValue:s.value,"onUpdate:modelValue":I[5]||(I[5]=W=>s.value=W),style:{"min-width":"80px"},placeholder:j.value?(Pe=(Ce=(ue=a.filterValues)==null?void 0:ue.filter(W=>W))==null?void 0:Ce.slice(0,3))==null?void 0:Pe.join("/"):"搜索","prefix-icon":e.unref(qa.search_default),clearable:"",onInput:G,disabled:((ve=f.value)==null?void 0:ve.length)===0},{suffix:e.withCtx(()=>{var W,Se;return[!s.value&&((Se=(W=a.filterValues)==null?void 0:W.filter(Le=>Le))!=null&&Se.join("/"))?(e.openBlock(),e.createBlock(Y,{key:0,style:{cursor:"pointer"},onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(S,["stop"])},[e.createVNode(le,{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",sf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ce=a.buttons)==null?void 0:ce.filter(W=>a.isDevMode||(W==null?void 0:W.label)!=="修改模板"),(W,Se)=>{var Le;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:Se},[(W==null?void 0:W.type)==="upload"?(e.openBlock(),e.createBlock(Te,{key:0,class:"upload-button-wrap","on-change":_,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Fe;return[e.createElementVNode("div",cf,[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"]),e.createElementVNode("span",uf,e.toDisplayString(W==null?void 0:W.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(ll._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(W==null?void 0:W.type)==="popover"?(e.openBlock(),e.createBlock(V,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Fe;return[e.createVNode(le,{class:"table-op-icon",name:(Fe=k==null?void 0:k.find(aa=>(aa==null?void 0:aa.label)===(W==null?void 0:W.label)))==null?void 0:Fe.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(W==null?void 0:W.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",df,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W==null?void 0:W.contents,Fe=>(e.openBlock(),e.createBlock(V,{key:Fe==null?void 0:Fe.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:aa=>M(Fe==null?void 0:Fe.label)},{default:e.withCtx(()=>{var aa,Na;return[e.createTextVNode(e.toDisplayString(Fe==null?void 0:Fe.label),1),(aa=Fe==null?void 0:Fe.label)!=null&&aa.includes("选中")?(e.openBlock(),e.createElementBlock("span",pf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(Na=Fe==null?void 0:Fe.label)!=null&&Na.includes("全部")?(e.openBlock(),e.createElementBlock("span",ff,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(W!=null&&W.type)||(W==null?void 0:W.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Fe=>!a.lockingPage&&M(W==null?void 0:W.label,W)},[e.createVNode(le,{class:"table-op-icon",name:(Le=k==null?void 0:k.find(Fe=>(Fe==null?void 0:Fe.label)===(W==null?void 0:W.label)))==null?void 0:Le.icon},null,8,["name"]),e.createElementVNode("span",vf,e.toDisplayString(W==null?void 0:W.label),1)],10,hf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},yf=Xl._export_sfc(mf,[["__scopeId","data-v-44a17652"]]),gf={__name:"index",props:{columns:Array,tableData:Array},setup(a){return(l,r)=>{const n=e.resolveComponent("el-table-column"),t=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(t,{data:a.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.columns,s=>{var v;return e.openBlock(),e.createBlock(n,{key:s==null?void 0:s.prop,label:s==null?void 0:s.label,prop:s==null?void 0:s.prop,fixed:(s==null?void 0:s.prop)==="operate"?"right":s==null?void 0:s.fixed,align:(s==null?void 0:s.align)??"left","show-overflow-tooltip":(s==null?void 0:s.showOverflowTooltip)??!0,width:s==null?void 0:s.width,"min-width":(s==null?void 0:s.minWidth)||((s==null?void 0:s.prop)==="operate"?80:(((v=s==null?void 0:s.label)==null?void 0:v.length)*2||4)*27)},{default:e.withCtx(p=>[e.renderSlot(l.$slots,"content",{row:p.row,column:p.column,$index:p.$index,scope:p}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(f,m)=>(e.openBlock(),e.createBlock(ll._sfc_main$2,{key:m,column:f,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(k,c)=>({name:c,fn:e.withCtx(({row:D,slotData:F,item:_,column:G})=>[e.renderSlot(l.$slots,c,e.mergeProps({ref_for:!0},F??D,{item:_??f,slotData:F??D,row:D,column:G,columnProp:f}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class bf extends Bl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,r,n,t){const s=this,v=new Bl.FileLoader(s.manager);v.setPath(s.path),v.setResponseType("arraybuffer"),v.setRequestHeader(s.requestHeader),v.setWithCredentials(s.withCredentials),v.load(l,function(p){try{r(s.parse(p))}catch(f){t?t(f):console.error(f),s.manager.itemError(l)}},n,t)}_getDataView(l,r,n,t){switch(n){case"F":return t===8?l.getFloat64(r,this.littleEndian):l.getFloat32(r,this.littleEndian);case"I":return t===1?l.getInt8(r):t===2?l.getInt16(r,this.littleEndian):l.getInt32(r,this.littleEndian);case"U":return t===1?l.getUint8(r):t===2?l.getUint16(r,this.littleEndian):l.getUint32(r,this.littleEndian)}}parse(l){function r(F,_){const G=F.length,M=new Uint8Array(_);let $=0,j=0,E,S,w;do if(E=F[$++],E<32){if(E++,j+E>_)throw new Error("Output buffer is not large enough");if($+E>G)throw new Error("Invalid compressed data");do M[j++]=F[$++];while(--E)}else{if(S=E>>5,w=j-((E&31)<<8)-1,$>=G)throw new Error("Invalid compressed data");if(S===7&&(S+=F[$++],$>=G))throw new Error("Invalid compressed data");if(w-=F[$++],j+S+2>_)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=j)throw new Error("Invalid compressed data");do M[j++]=M[w++];while(--S+2)}while($<G);return M}function n(F){const _={},G=new Uint8Array(F);let M="",$="",j=0,E=!1;const S=G.length;for(;j<S&&E===!1;){const R=String.fromCharCode(G[j++]);R===`
|
|
2
|
+
`||R==="\r"?($.trim().toLowerCase().startsWith("data")&&(E=!0),$=""):$+=R,M+=R}const w=M.search(/[\r\n]DATA\s(\S*)\s/i),b=/[\r\n]DATA\s(\S*)\s/i.exec(M.slice(w-1));if(_.data=b[1],_.headerLen=b[0].length+w,_.str=M.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(R){return parseInt(R,10)})),_.count!==null)_.count=_.count[1].split(" ").map(function(R){return parseInt(R,10)});else{_.count=[];for(let R=0,I=_.fields.length;R<I;R++)_.count.push(1)}_.offset={};let g=0;for(let R=0,I=_.fields.length;R<I;R++)_.data==="ascii"?_.offset[_.fields[R]]=R:(_.offset[_.fields[R]]=g,g+=_.size[R]*_.count[R]);return _.rowSize=g,_}const t=n(l),s=[],v=[],p=[],f=[],m=[],k=new Bl.Color;if(t.data==="ascii"){const F=t.offset,M=new TextDecoder().decode(l).slice(t.headerLen).split(`
|
|
3
|
+
`);for(let $=0,j=M.length;$<j;$++){if(M[$]==="")continue;const E=M[$].split(" ");if(F.x!==void 0&&(s.push(parseFloat(E[F.x])),s.push(parseFloat(E[F.y])),s.push(parseFloat(E[F.z]))),F.rgb!==void 0){const S=t.fields.findIndex(le=>le==="rgb"),w=t.type[S],b=parseFloat(E[F.rgb]);let g=b;if(w==="F"){const le=new Float32Array(1);le[0]=b,g=new Int32Array(le.buffer)[0]}const R=(g>>16&255)/255,I=(g>>8&255)/255,Y=(g>>0&255)/255;k.setRGB(R,I,Y,Bl.SRGBColorSpace),p.push(k.r,k.g,k.b)}F.normal_x!==void 0&&(v.push(parseFloat(E[F.normal_x])),v.push(parseFloat(E[F.normal_y])),v.push(parseFloat(E[F.normal_z]))),F.intensity!==void 0&&f.push(parseFloat(E[F.intensity])),F.label!==void 0&&m.push(parseInt(E[F.label]))}}if(t.data==="binary_compressed"){const F=new Uint32Array(l.slice(t.headerLen,t.headerLen+8)),_=F[0],G=F[1],M=r(new Uint8Array(l,t.headerLen+8,_),G),$=new DataView(M.buffer),j=t.offset;for(let E=0;E<t.points;E++){if(j.x!==void 0){const S=t.fields.indexOf("x"),w=t.fields.indexOf("y"),b=t.fields.indexOf("z");s.push(this._getDataView($,t.points*j.x+t.size[S]*E,t.type[S],t.size[S])),s.push(this._getDataView($,t.points*j.y+t.size[w]*E,t.type[w],t.size[w])),s.push(this._getDataView($,t.points*j.z+t.size[b]*E,t.type[b],t.size[b]))}if(j.rgb!==void 0){const S=t.fields.indexOf("rgb"),w=$.getUint8(t.points*j.rgb+t.size[S]*E+2)/255,b=$.getUint8(t.points*j.rgb+t.size[S]*E+1)/255,g=$.getUint8(t.points*j.rgb+t.size[S]*E+0)/255;k.setRGB(w,b,g,Bl.SRGBColorSpace),p.push(k.r,k.g,k.b)}if(j.normal_x!==void 0){const S=t.fields.indexOf("normal_x"),w=t.fields.indexOf("normal_y"),b=t.fields.indexOf("normal_z");v.push(this._getDataView($,t.points*j.normal_x+t.size[S]*E,t.type[S],t.size[S])),v.push(this._getDataView($,t.points*j.normal_y+t.size[w]*E,t.type[w],t.size[w])),v.push(this._getDataView($,t.points*j.normal_z+t.size[b]*E,t.type[b],t.size[b]))}if(j.intensity!==void 0){const S=t.fields.indexOf("intensity");f.push(this._getDataView($,t.points*j.intensity+t.size[S]*E,t.type[S],t.size[S]))}if(j.label!==void 0){const S=t.fields.indexOf("label");m.push($.getInt32(t.points*j.label+t.size[S]*E,this.littleEndian))}}}if(t.data==="binary"){const F=new DataView(l,t.headerLen),_=t.offset;for(let G=0,M=0;G<t.points;G++,M+=t.rowSize){if(_.x!==void 0){const $=t.fields.indexOf("x"),j=t.fields.indexOf("y"),E=t.fields.indexOf("z");s.push(this._getDataView(F,M+_.x,t.type[$],t.size[$])),s.push(this._getDataView(F,M+_.y,t.type[j],t.size[j])),s.push(this._getDataView(F,M+_.z,t.type[E],t.size[E]))}if(_.rgb!==void 0){const $=F.getUint8(M+_.rgb+2)/255,j=F.getUint8(M+_.rgb+1)/255,E=F.getUint8(M+_.rgb+0)/255;k.setRGB($,j,E,Bl.SRGBColorSpace),p.push(k.r,k.g,k.b)}if(_.normal_x!==void 0){const $=t.fields.indexOf("normal_x"),j=t.fields.indexOf("normal_y"),E=t.fields.indexOf("normal_z");v.push(this._getDataView(F,M+_.normal_x,t.type[$],t.size[$])),v.push(this._getDataView(F,M+_.normal_y,t.type[j],t.size[j])),v.push(this._getDataView(F,M+_.normal_z,t.type[E],t.size[E]))}if(_.intensity!==void 0){const $=t.fields.indexOf("intensity");f.push(this._getDataView(F,M+_.intensity,t.type[$],t.size[$]))}_.label!==void 0&&m.push(F.getInt32(M+_.label,this.littleEndian))}}const c=new Bl.BufferGeometry;s.length>0&&c.setAttribute("position",new Bl.Float32BufferAttribute(s,3)),v.length>0&&c.setAttribute("normal",new Bl.Float32BufferAttribute(v,3)),p.length>0&&c.setAttribute("color",new Bl.Float32BufferAttribute(p,3)),f.length>0&&c.setAttribute("intensity",new Bl.Float32BufferAttribute(f,1)),m.length>0&&c.setAttribute("label",new Bl.Int32BufferAttribute(m,1)),c.computeBoundingSphere();const D=new Bl.PointsMaterial({size:.005});return p.length>0&&(D.vertexColors=!0),new Bl.Points(c,D)}}const kf=A.useModelComp(A.pinia),{systemPath:cs}=A.storeToRefs(kf),ho=e.ref(),us=new WeakMap;function xf(a,l,r,n,t){const s=async D=>{try{const F=await A.platformDownloadFile({url:D});if(F.status!==200)throw new Error(`下载失败: ${F.status}`);return F.data}catch(F){throw console.error("addModelFromUrl失败:",F),F}},v=D=>new Promise((F,_)=>{const G=new FileReader;G.onload=M=>{try{const $=M.target.result,E=new zn.MTLLoader().parse($);E.preload(),F(E)}catch($){_($)}},G.onerror=()=>{_(new Error("MTL文件读取失败"))},G.readAsText(D)}),p=async D=>{const F={materials:{},create:function(_){return this.materials[_]?this.materials[_]:(console.warn(`Material '${_}' not found, using default material`),new Bl.MeshPhongMaterial({color:8947848,side:Bl.DoubleSide}))},getAsArray:function(){const _=[];for(const G in this.materials)_.push(this.materials[G]);return _},preload:function(){for(const _ in this.materials)this.materials[_].map&&(this.materials[_].map.needsUpdate=!0)}};for(const _ of D){const G=await v(_);Object.assign(F.materials,G.materials)}return F.preload(),F},f=async(D,F=[])=>new Promise((_,G)=>{const M=new FileReader;M.onload=async $=>{try{const j=$.target.result;let E=null;F&&F.length>0&&(F.length===1?E=await v(F[0]):E=await p(F));const S=new zn.OBJLoader;E&&S.setMaterials(E);const w=S.parse(j);E||w.traverse(b=>{b.isMesh&&(b.material=new Bl.MeshPhongMaterial({color:8947848,side:Bl.DoubleSide}))}),_(w)}catch(j){G(j)}},M.onerror=()=>{G(new Error("OBJ文件读取失败"))},M.readAsText(D)}),m=async D=>{var F;try{r.value=!0;const{scene:_}=a();if(!_)throw new Error("Scene not initialized");t();const G=[];for(let M=0;M<D.length;M++){const $=D[M];n.value=`正在加载模型 ${M+1}/${D.length}...`;const j=await s($.objUrl),E=((F=$.objUrl)==null?void 0:F.split("/").pop())||`model_${M}.obj`,S=new File([j],E,{type:j.type});let w=[];if($.mtlUrls){const g=Array.isArray($.mtlUrls)?$.mtlUrls:[$.mtlUrls];for(let R=0;R<g.length;R++){const I=g[R],Y=await s(I),le=(I==null?void 0:I.split("/").pop())||`material_${M}_${R}.mtl`,ye=new File([Y],le,{type:Y.type});w.push(ye)}}const b=await f(S,w);_.add(b),l.value.push(b),G.push(b)}return r.value=!1,G}catch(_){throw console.error("加载模型失败:",_),r.value=!1,_}},k=async(D,F,_=[],G=[])=>{let M;const $=D.toLowerCase();switch($){case".txt":case".cpt":case".obj":const j=await F.text();if($===".txt"||$===".cpt"){const ae=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,oe=[...j.matchAll(ae)].map(ie=>({x:parseFloat(ie[1]),y:parseFloat(ie[2]),z:parseFloat(ie[3])})),ca=new Bl.BufferGeometry,Ee=oe.flatMap(ie=>[ie.x,ie.y,ie.z]);if(ca.setAttribute("position",new Bl.Float32BufferAttribute(Ee,3)),$===".txt"){const ie=new Bl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});M=new Bl.Points(ca,ie)}else if($===".cpt"){const ie=new Bl.LineBasicMaterial({color:"#5B5C99",linewidth:100});M=new Bl.Line(ca,ie)}}else if($===".obj"){const ae=new zn.OBJLoader;if(_&&_.length>0){const ta=new zn.MTLLoader;for(const oe of _){const ca=await oe.text(),Ee=ta.parse(ca);Ee.preload(),ae.setMaterials(Ee);break}}M=ae.parse(j),(!_||_.length===0)&&M.traverse(ta=>{ta.isMesh&&(ta.material=new Bl.MeshPhongMaterial({color:"#B3B3D4"})),ta instanceof Bl.Mesh&&(ta.material.side=Bl.DoubleSide)})}break;case".stl":const E=await F.arrayBuffer(),w=new zn.STLLoader().parse(E),b=new Bl.MeshPhongMaterial({color:"#B3B3D4",side:Bl.DoubleSide});M=new Bl.Mesh(w,b);break;case".nc":const g=["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"],R={"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 Bl.Group,Y=g.map(ae=>new Promise((ta,oe)=>{new zn.STLLoader().load(cs.value===""?`/model/${ae}`:`${cs.value}\\${ae}`,Ee=>{const ie=new Bl.MeshPhongMaterial({color:R[ae]||"#B3B3D4",side:Bl.DoubleSide}),Be=new Bl.Mesh(Ee,ie);ta(Be)},void 0,oe)}));try{(await Promise.all(Y)).forEach(ta=>I.add(ta)),M=I}catch(ae){throw console.error("加载NC文件对应的STL文件失败:",ae),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const le=new bf,ye=new Bl.Group;try{const ae=await qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ta=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"}),oe=await qa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ca=new Blob([oe.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=await new Promise((Be,Ue)=>{const oa=URL.createObjectURL(ta);le.load(oa,Ja=>{const L=new Float32Array(Ja.geometry.attributes.position.count*3);for(let H=0;H<Ja.geometry.attributes.position.count;H++)L[H*3]=1,L[H*3+1]=0,L[H*3+2]=0;Ja.geometry.setAttribute("color",new Bl.BufferAttribute(L,3)),Ja.material.vertexColors=!0,Ja.scale.set(.3,.3,.3),URL.revokeObjectURL(oa),Be(Ja)},void 0,Ue)}),ie=await new Promise((Be,Ue)=>{const oa=URL.createObjectURL(ca);le.load(oa,Ja=>{const L=new Float32Array(Ja.geometry.attributes.position.count*3);for(let H=0;H<Ja.geometry.attributes.position.count;H++)L[H*3]=0,L[H*3+1]=1,L[H*3+2]=0;Ja.geometry.setAttribute("color",new Bl.BufferAttribute(L,3)),Ja.material.vertexColors=!0,Ja.scale.set(.3,.3,.3),URL.revokeObjectURL(oa),Be(Ja)},void 0,Ue)});ye.add(Ee),ye.add(ie),M=ye}catch(ae){throw console.error("PCD文件加载失败:",ae),new Error("无法加载PCD文件")}break;case".urdf":const Te=URL.createObjectURL(F),V=new Mu.URDFLoader,se="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",ee={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ue=new WeakMap,Ce=new WeakMap,Pe=new WeakMap,ve=async ae=>{if(ue.has(ae))return console.log(`从缓存加载: ${ae}`),ue.get(ae);try{const ta=await qa.axios.get(`${se}/${ae}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),oe=new Blob([ta.data],{type:"application/octet-stream;charset=UTF-8"});return ee.enableCache&&ue.set(ae,oe),oe}catch(ta){throw console.error(`加载文件失败: ${ae}`,ta),new Error(`无法加载文件: ${ae}`)}},B=(ae="default")=>{if(Ce.has(ae))return Ce.get(ae);const ta=new Bl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Bl.FrontSide});return Ce.set(ae,ta),ta},ce=ae=>{try{ae.isBufferGeometry&&ae.mergeVertices&&ae.mergeVertices(),ae.computeVertexNormals&&ae.computeVertexNormals(),ae.computeBoundingSphere&&ae.computeBoundingSphere(),ae.deleteAttribute&&ae.deleteAttribute("uv2")}catch(ta){console.warn("几何体优化失败,使用原始几何体:",ta)}return ae},W=async(ae,ta,oe)=>{const ca=`stl_${ta}`;if(Pe.has(ca)){const Ue=Pe.get(ca);return new Bl.Mesh(Ue,B())}const Ee=await ae.arrayBuffer();let Be=new zn.STLLoader(oe).parse(Ee);return Be=ce(Be),Pe.set(ca,Be),new Bl.Mesh(Be,B())},Se=async(ae,ta,oe)=>{const ca=`obj_${ta}`;if(ue.has(ca))return ue.get(ca).clone();const Ee=await ae.text(),ie=new zn.OBJLoader(oe),Be=ta.replace(".obj",".mtl");try{const Ja=await(await ve(Be)).text(),H=new zn.MTLLoader(oe).parse(Ja);H.preload(),ie.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Be}`)}const Ue=ie.parse(Ee);return Ue.traverse(oa=>{oa.isMesh&&(oa.geometry=ce(oa.geometry),oa.castShadow=!0,oa.receiveShadow=!0,oa.renderOrder=1)}),ue.set(ca,Ue),Ue},Le=(ae,ta)=>{const oe=new Bl.LOD;if(oe.addLevel(ae,0),ae.geometry){const ca=ae.geometry.clone(),Ee=new Bl.Mesh(ca,ae.material);oe.addLevel(Ee,50)}return oe};let Fe=0,aa=0;const Na=[];V.loadMeshCb=async(ae,ta,oe,ca,Ee)=>{const ie=ae.split("/").pop(),Be=oe||(()=>{});Fe++;const Ue=new Promise(async(oa,Ja)=>{try{const L=await ve(ie);if(!L||L.size===0)throw new Error(`文件为空: ${ie}`);const H=ie.split(".").pop().toLowerCase();let Z;switch(H){case"stl":Z=await W(L,ie,ta);break;case"obj":Z=await Se(L,ie,ta);break;default:throw new Error(`不支持的文件格式: ${H}`)}ee.enableLOD&&Z.isMesh&&(Z=Le(Z,ie)),Be(Z),aa++,ca&&ca({loaded:aa,total:Fe,progress:aa/Fe}),oa(Z)}catch(L){console.error(`mesh文件加载失败: ${ie}`,L);const H=new Bl.Group;Be(H),oa(H);const Z=new Bl.BoxGeometry(.1,.1,.1),me=new Bl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Bl.Mesh(Z,me)}});Na.push(Ue)};try{if(!Te){ho.value=void 0;break}if(M=await V.loadAsync(Te),console.log(`URDF文件加载完成,等待${Fe}个mesh文件加载...`),Na.length>0)try{await Promise.allSettled(Na),console.log(`所有mesh文件处理完成,成功加载: ${aa}/${Fe}`)}catch(oe){console.warn("部分mesh文件加载失败,但继续显示模型",oe)}M.traverse(oe=>{oe.isMesh&&(oe.castShadow=!0,oe.receiveShadow=!0,oe.renderOrder=1,oe.material&&(oe.material.needsUpdate=!0))}),console.time("计算包围盒");const ae=new Bl.Box3;ae.expandByObject(M);const ta=`urdf_${Date.now()}`;M.userData.boundingBox=ae.clone(),M.userData.modelId=ta,us.set(ta,{box:ae.clone(),center:ae.getCenter(new Bl.Vector3),size:ae.getSize(new Bl.Vector3),maxSize:Math.max(...ae.getSize(new Bl.Vector3).toArray())}),ho.value=M,console.log("URDF模型加载完成并优化")}catch(ae){console.error("URDF加载失败:",ae),ho.value=void 0}finally{Te&&URL.revokeObjectURL(Te)}break;default:throw new Error(`不支持的文件格式: ${D}`)}return M};return{addModelsFromUrls:m,loadModelByDefaultPath:async D=>{console.log(D);try{r.value=!0,n.value="正在加载模型...";const{scene:F}=a();if(!F)throw new Error("Scene not initialized");t(),await new Promise(G=>setTimeout(G,100));const _=[];for(let G=0;G<D.length;G++){const M=D[G],$=await k(M.suffix,M.blob,M.mtlBlobs||[],M.meshFiles||[]);$&&(F.add($),l.value.push($),_.push($))}return r.value=!1,n.value="",_}catch(F){throw console.error("加载模型失败:",F),r.value=!1,n.value="",F}},urdfModel:ho,modelBoundingBoxes:us}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(a=>{var l=(r=(r=document.getElementsByTagName("script"))[r.length-1]).getAttribute("data-injectcss"),r=r.getAttribute("data-disable-injectsvg");if(!r){var n,t,s,v,p,f=function(c,D){D.parentNode.insertBefore(c,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(c){console&&console.log(c)}}n=function(){var c,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,(c=document.body).firstChild?f(D,c.firstChild):c.appendChild(D))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),n()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(s=n,v=a.document,p=!1,k(),v.onreadystatechange=function(){v.readyState=="complete"&&(v.onreadystatechange=null,m())})}function m(){p||(p=!0,s())}function k(){try{v.documentElement.doScroll("left")}catch{return void setTimeout(k,50)}m()}})(window);const wf=["onClick"],_f=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}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(null),s=e.ref(null),v=w=>{if(Array.isArray(w)&&w.length>=3){const[b,g,R,I]=w;return I!==void 0?`rgba(${b}, ${g}, ${R}, ${I})`:`rgb(${b}, ${g}, ${R})`}if(typeof w=="string"){const b=w.trim();if(b.startsWith("[")&&b.endsWith("]")){const g=b.slice(1,-1).split(",").map(R=>Number(R.trim()));if(g.length>=3&&g.every(R=>!Number.isNaN(R))){const[R,I,Y,le]=g;return le!==void 0?`rgba(${R}, ${I}, ${Y}, ${le})`:`rgb(${R}, ${I}, ${Y})`}}return b}},p=e.computed(()=>{const w=Number(r==null?void 0:r.textSize),b=v(r==null?void 0:r.textColor),g={},R={};return!Number.isNaN(w)&&w&&(g.fontSize=`${w}px`,R.fontSize=`${w}px`),b&&(g.color=b,R.color=b),{label:g,value:R}}),f=e.ref(""),m=e.ref(""),k=e.ref(!1),c=async w=>{if(w){m.value&&(URL.revokeObjectURL(m.value),m.value="");try{const b=await A.platformDownloadFile({url:w}),g=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});m.value=URL.createObjectURL(g)}catch{m.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,w=>{w&&(f.value=w)},{immediate:!0}),e.watch(f,w=>{c(w)},{immediate:!0});const D=()=>{var w;(w=s.value)==null||w.click()},F=async w=>{var R,I,Y;const b=w.target,g=(R=b==null?void 0:b.files)==null?void 0:R[0];if(!g){b.value="";return}k.value=!0;try{const le=new FormData;le.append("file",g);const ye=await A.platformUploadFile(le),Te=(Y=(I=ye==null?void 0:ye.data)==null?void 0:I.result)==null?void 0:Y.url;Te?(f.value=Te,n("update:backGroundImage",Te),c(Te),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{k.value=!1,b.value=""}},_=e.computed(()=>m.value?{backgroundImage:`url(${m.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),G=w=>ll.getComponent(w),M=w=>{if(!w)return;const b=w.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},$=(w,b,g)=>{r.disabled||w.field&&(t.value=b,e.nextTick(()=>{M(g.currentTarget)}))},j=()=>{t.value=null},E=w=>{var g;const b=((g=w==null?void 0:w.field)==null?void 0:g.value)??(w==null?void 0:w.value);return b==null||b===""?"-":b},S=w=>{const b=w!=null&&w.width&&w.width>0?w.width:1,R=`calc((100% - ${(b-1)*16}px) / ${b})`;return{flex:`0 0 ${R}`,maxWidth:R,minWidth:"140px",boxSizing:"border-box"}};return(w,b)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-cards-container",style:e.normalizeStyle(_.value),onClick:b[2]||(b[2]=g=>(r==null?void 0:r.backGround)&&D())},[r!=null&&r.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(g=>D(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:s,type:"file",accept:"image/*",style:{display:"none"},onChange:F},null,544),b[3]||(b[3]=e.createElementVNode("img",{src:ll._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.items,(g,R)=>{var I,Y,le,ye,Te,V,se,ee;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:R,style:e.normalizeStyle(S(g)),onClick:b[1]||(b[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(p.value.label)},e.toDisplayString(g==null?void 0:g.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(p.value.value),onClick:ue=>{var Ce;return(Ce=g.field)!=null&&Ce.isNoClick?null:$(g,R,ue)}},[t.value===R&&g.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G(((I=g.field)==null?void 0:I.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":ue=>g.field.value=ue,isEdit:!0,disabled:(Y=g.field)==null?void 0:Y.disabled,content:((le=g.field)==null?void 0:le.contents)??[],optionUrl:g.field,originalValue:(ye=g.field)==null?void 0:ye.value,config:(Te=g.field)==null?void 0:Te.config,configModel:((V=g.field)==null?void 0:V.prop)??((se=g.field)==null?void 0:se.name),selectedTagList:((ee=g.field)==null?void 0:ee.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(E(g)),1)],64))],12,wf)],4)}),128))],4))}}),Sf=Xl._export_sfc(_f,[["__scopeId","data-v-060d233a"]]),sc=A.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Ef={class:"calculator-content"},Cf={class:"calculator-child"},Df={class:"calculator-child"},Nf=e.defineComponent({__name:"calculator",setup(a){const l=e.ref(),r=e.ref();return e.onMounted(()=>{l.value=[{type:"Upload",label:"输入",name:"input"}],r.value=[{type:"Upload",label:"输出",name:"output"}]}),(n,t)=>(e.openBlock(),e.createElementBlock("div",Ef,[e.createElementVNode("div",Cf,[e.createVNode(ll.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Df,[e.createVNode(ll.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Bf=Xl._export_sfc(Nf,[["__scopeId","data-v-73db0fe7"]]),mt=(a,l)=>{let r=a,n=l;return Array.isArray(r)&&(r=r==null?void 0:r.map((t,s)=>{if(Array.isArray(t)){let v={};return t=t==null?void 0:t.forEach((p,f)=>{var m;(m=n==null?void 0:n[f])!=null&&m.prop?v[n[f].prop]=p:Array.isArray(p)&&(v.children=mt(p,n))}),Object.assign(v,{id:s})}else return t})),r},cc=(a,l,r)=>{let n=a,t=l;return n=n==null?void 0:n.map((s,v)=>{var p,f;return!Array.isArray(s)||!((p=t==null?void 0:t[v])!=null&&p.label)&&!r||(s.unshift(((f=t==null?void 0:t[v])==null?void 0:f.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var k;return Array.isArray(m)&&(m=cc(m,(k=t==null?void 0:t[v])==null?void 0:k.children,r)),m}))),s}),n},Tf=(a,l,r)=>{if(l==="")return a==null?void 0:a.filter(n=>(n==null?void 0:n.id)!==r);{const n=l.split("-");return Af(a,n,r)}},Af=(a,l,r)=>{let n=a,t=l;return(t==null?void 0:t.length)===0?n=n==null?void 0:n.filter(s=>s.id!==r):n=n==null?void 0:n.map(s=>(s.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),s=uc(s,t,r)),s)),n},uc=(a,l,r)=>{var s,v;let n=a,t=l;return(t==null?void 0:t.length)===0?n.children=(s=n.children)==null?void 0:s.filter(p=>p.id!==r):n.children=(v=n.children)==null?void 0:v.map(p=>(p.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),p=uc(p,t,r)),p)),n},zf=(a,l,r)=>{if(l==="")return r;{const n=l.split("-");return Mf(a,n,r)}},Mf=(a,l,r)=>{let n=a,t=l;return(t==null?void 0:t.length)===0?n=r:n=n==null?void 0:n.map(s=>(s.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),s=dc(s,t,r)),s)),n},dc=(a,l,r)=>{var s;let n=a,t=l;return(t==null?void 0:t.length)===0?n.children=r:n.children=(s=n.children)==null?void 0:s.map(v=>(v.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),v=dc(v,t,r)),v)),n};class If{constructor(l={}){Wr(this,"url");Wr(this,"heartbeatInterval");Wr(this,"socket",null);Wr(this,"isConnected",!1);Wr(this,"heartTimer",null);Wr(this,"canvas",null);Wr(this,"ctx",null);Wr(this,"mainCamCutMode",0);Wr(this,"pMainShowStartX",0);Wr(this,"pMainShowStartY",0);Wr(this,"onLog");Wr(this,"onDevCount");Wr(this,"onResolution");Wr(this,"onCameraStatus");Wr(this,"onPhoto");this.url=l.url??"ws://127.0.0.1:22225",this.heartbeatInterval=l.heartbeatInterval??3e3}init(l,r,n){var v;(v=this.canvas)!=null&&v.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const t=document.createElement("canvas");t.style.border="solid 1px #A0A0A0",t.id="MainCamCanvas",t.width=r,t.height=n;const s=t.getContext("2d");if(!s)throw new Error("无法获取 CanvasRenderingContext2D");l.appendChild(t),this.canvas=t,this.ctx=s}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((l,r)=>{const n=new WebSocket(this.url);n.binaryType="arraybuffer",n.onopen=()=>{this.socket=n,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),l()},n.onerror=t=>{this.isConnected=!1,this.log("socket.onerror"),r(t)},n.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},n.onmessage=t=>{this.handleMessage(t)}})}destroy(){var l;this.stopHeartbeat();try{this.closeCamera()}catch{}if(this.socket){try{this.socket.onmessage=null}catch{}try{this.socket.onopen=null}catch{}try{this.socket.onerror=null}catch{}try{this.socket.onclose=null}catch{}try{this.socket.close()}catch{}this.socket=null}this.isConnected=!1,(l=this.canvas)!=null&&l.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(l=0){this.sendBytes(new Uint8Array([119,136,81,l]))}chooseResolution(l){if(!Array.isArray(l)||l.length===0)return null;const r=l.find(t=>t.width===2592&&t.height===1944);return r||[...l].sort((t,s)=>s.width*s.height-t.width*t.height)[0]||null}openCamera(l=0,r=1280,n=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const t=new Uint8Array(12);t[0]=119,t[1]=136,t[2]=1,t[3]=l,t[4]=this.canvas.width>>8&255,t[5]=this.canvas.width&255,t[6]=this.canvas.height>>8&255,t[7]=this.canvas.height&255,t[8]=r>>8&255,t[9]=r&255,t[10]=n>>8&255,t[11]=n&255,this.sendBytes(t)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const t=new Uint8Array(12);t[0]=119,t[1]=136,t[2]=16,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=0,this.sendBytes(t)}bestSize(){this.sendBytes(new Uint8Array([119,136,5,0]))}rotateLeft(){this.sendBytes(new Uint8Array([119,136,7,0]))}rotateRight(){this.sendBytes(new Uint8Array([119,136,8,0]))}focus(){this.sendBytes(new Uint8Array([119,136,48,0]))}log(l){var r;(r=this.onLog)==null||r.call(this,l)}sendBytes(l){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(l.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(l){var t,s,v,p,f,m;const r=new Uint8Array(l.data);if(r.length<=0)return;if(r[0]===17&&r[1]===17&&r[2]===17){this.log("heart socket!!!!");return}if(r[0]!==85||r[1]!==102)return;const n=r[2];if(n===80){const k=r[3],c=r.length-4,D=new Uint8Array(c);for(let G=0;G<c;G++)D[G]=r[4+G];const _=decodeURIComponent(this.byteToString(D)).split("|");(t=this.onDevCount)==null||t.call(this,k,_);return}if(n===81){const k=r[3]||0,c=[];for(let D=0;D<k;D++){const F=(r[4+D*4+0]||0)*256+(r[4+D*4+1]||0),_=(r[4+D*4+2]||0)*256+(r[4+D*4+3]||0);c.push({width:F,height:_,text:`${F}*${_}`})}(s=this.onResolution)==null||s.call(this,k,c);return}if(n===1){r[3]===1&&((v=this.onCameraStatus)==null||v.call(this,"opened")),r[3]===3&&((p=this.onCameraStatus)==null||p.call(this,"closed"));return}if(n===16){if(r[3]===1){const c=r[4]*256+r[5],D=r[6]*65536+r[7]*256+r[8];let F="";if(c>0){const M=new Uint8Array(c);for(let $=0;$<c;$++)M[$]=r[9+$];F=decodeURIComponent(this.byteToString(M))}const _=new Uint8Array(D);for(let M=0;M<D;M++)_[M]=r[9+c+M];const G=this.uint8ArrayToString(_);(f=this.onPhoto)==null||f.call(this,{flag:0,imgPath:F,base64:G})}r[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(n===204){if(!this.canvas||!this.ctx)return;const k=r[3]*256+r[4],c=r[5]*256+r[6];this.pMainShowStartX=r[7]*256+r[8],this.pMainShowStartY=r[9]*256+r[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const D=this.ctx.createImageData(k,c);let F=11;for(let _=0;_<D.data.length;_+=4)D.data[_+0]=r[F],D.data[_+1]=r[F+1],D.data[_+2]=r[F+2],D.data[_+3]=255,F+=3;this.ctx.putImageData(D,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}byteToString(l){let r="";for(let n=0;n<l.length;n++)r+=String.fromCharCode(l[n]);return r}}const Of={style:{display:"flex",gap:"16px",height:"100%"}},Lf={key:0,style:{color:"var(--el-text-color-secondary)"}},$f={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Rf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Vf={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"auto",padding:"8px"}},Ff={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Pf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},jf=["src","onClick"],Hf=["onClick"],Uf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},qf={class:"dialog-footer"},Wf=e.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(null),s=e.ref(!1),v=e.ref([]),p=e.ref(""),f=e.ref(!1),m=e.ref([]),k=new If({url:"ws://127.0.0.1:22225"});function c(I,Y){var ee;const le=I.split(","),ye=((ee=le[0].match(/:(.*?);/))==null?void 0:ee[1])??"image/jpeg",Te=atob(le[1]);let V=Te.length;const se=new Uint8Array(V);for(;V--;)se[V]=Te.charCodeAt(V);return new File([se],Y,{type:ye})}function D(){k.onLog=I=>{console.log("[GPY]",I)},k.onDevCount=(I,Y)=>{if(p.value+=`设备数量=${I},设备=${Y.join(",")}
|
|
4
4
|
`,I>0){p.value+=`检测到设备,正在获取分辨率...
|
|
5
5
|
`;try{k.getResolution(0)}catch(le){p.value+=`获取分辨率失败:${(le==null?void 0:le.message)??le}
|
|
6
6
|
`}}else p.value+=`未检测到高拍仪设备!
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
`):(s.value=!1,p.value+=`摄像头已关闭
|
|
16
16
|
`)},k.onPhoto=I=>{if(I.flag===0&&I.base64){const Y=`data:image/jpeg;base64,${I.base64}`,le=c(Y,`gpy-capture-${Date.now()}.jpg`);v.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:Y,file:le}),p.value+=`拍照完成,已接收图片(当前 ${v.value.length} 张)
|
|
17
17
|
`}else p.value+=`拍照失败 flag=${I.flag}
|
|
18
|
-
`}}const
|
|
18
|
+
`}}const F=async()=>{if(await e.nextTick(),!t.value)return;_(),D();const I=t.value.getBoundingClientRect();k.init(t.value,Math.floor(I.width),Math.floor(I.height)),p.value+=`正在连接设备服务...
|
|
19
19
|
`,await k.connect(),p.value+=`正在获取设备数量...
|
|
20
|
-
`,k.getDevCount()},_=()=>{try{k.destroy()}catch(I){console.error(I)}s.value=!1,v.value=[],p.value="",f.value=!1,m.value=[]};e.watch(()=>r.visible,I=>{I?
|
|
20
|
+
`,k.getDevCount()},_=()=>{try{k.destroy()}catch(I){console.error(I)}s.value=!1,v.value=[],p.value="",f.value=!1,m.value=[]};e.watch(()=>r.visible,I=>{I?F():_()});const G=()=>{try{k.bestSize()}catch(I){console.error(I)}},M=()=>{try{k.rotateLeft()}catch(I){console.error(I)}},$=()=>{try{k.rotateRight()}catch(I){console.error(I)}},j=()=>{try{k.focus()}catch(I){console.error(I)}},E=()=>{p.value+=`正在拍照...
|
|
21
21
|
`;try{k.photo()}catch(I){p.value+=`拍照调用失败:${(I==null?void 0:I.message)??I}
|
|
22
22
|
`}},S=()=>{v.value.length>0?n("confirm",v.value.map(I=>I.file)):n("confirm",[])},w=I=>{I<0||I>=v.value.length||(v.value.splice(I,1),p.value+=`已删除一张图片(剩余 ${v.value.length} 张)
|
|
23
|
-
`)},b=I=>{if(!I)return;const Y=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:Y,blobUrl:I}],f.value=!0},g=()=>{f.value=!1},P=()=>{_(),n("cancel")};return(I,Y)=>{const le=e.resolveComponent("el-input"),ye=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(wr.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:P,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Of,[e.createElementVNode("div",{ref_key:"cameraBox",ref:t,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Lf,"初始化摄像头..."))],512),e.createElementVNode("div",$f,[e.createElementVNode("div",Rf,[Y[0]||(Y[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Vf,[v.value.length===0?(e.openBlock(),e.createElementBlock("div",Ff,"暂无图片")):(e.openBlock(),e.createElementBlock("div",Pf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(Te,R)=>(e.openBlock(),e.createElementBlock("div",{key:Te.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:Te.url,onClick:se=>b(Te.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,jf),e.createElementVNode("div",{onClick:se=>w(R),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,Hf)]))),128))]))],512)]),e.createElementVNode("div",Uf,[Y[1]||(Y[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(le,{type:"textarea",value:p.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",qf,[e.createVNode(ye,{onClick:G,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[2]||(Y[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{onClick:M,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[3]||(Y[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(ye,{onClick:$,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[4]||(Y[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(ye,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[5]||(Y[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(ye,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>Y[6]||(Y[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),Y[9]||(Y[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(ye,{onClick:S,disabled:v.value.length===0,id:"themeButton"},{default:e.withCtx(()=>Y[7]||(Y[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(ye,{onClick:P,id:"themeBorderButton"},{default:e.withCtx(()=>Y[8]||(Y[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),f.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:g},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Kf=Xl._export_sfc(Wf,[["__scopeId","data-v-24a2050a"]]),ds=A.useMenuState(A.pinia),Gf=async a=>{var s,v,p,f,m,k;let l=a==null?void 0:a.导入文件,r=a==null?void 0:a.函数参数,n=(s=l==null?void 0:l[0])==null?void 0:s.url,t="";if(!(n!=null&&n.includes("http"))||!(n!=null&&n.includes("https"))){ds.setContentLoading(!0);const c=await A.platformDownloadFile({url:n});let D=c==null?void 0:c.data;const V=new FormData;V.append("file",D,((v=l==null?void 0:l[0])==null?void 0:v.name)+"."+((p=n==null?void 0:n.split("."))==null?void 0:p[1])),V.append("query",r);let _=await Xs(V);_=(k=(m=(f=_==null?void 0:_.data)==null?void 0:f.data)==null?void 0:m.response)==null?void 0:k.replace("generateResult",a==null?void 0:a.函数名称),t=_,ds.setContentLoading(!1)}return t},Ct=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),Yf=A.useModelComp(A.pinia),{extraContents:iv}=A.storeToRefs(Yf),Jf=A.useLoginState(A.pinia),{extraUrl:ni}=A.storeToRefs(Jf);let pc=ni.value===""||!ni.value?"http://139.196.154.85:20015":ni.value;e.watch(()=>ni.value,()=>{pc=ni.value===""||!ni.value?"http://139.196.154.85:20015":ni.value},{deep:!0,immediate:!0});const Do={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},ps={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:pc+"/api/public/paddleOCR"};class Xf{constructor(l){Wr(this,"config");this.config={...ps,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const r=this.config.maxSize*1024*1024;return l.size<=r}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=qa.Local.get(qa.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,r){return{title:r,form:{OCR图片文件:l}}}async recognize(l,r){const n=this.getAuthorizationToken(),t=this.buildOCRRequest(l,r),s=this.config.apiUrl||ps.apiUrl||"";return(await qa.axios.post(s,t,{headers:{"Content-Type":"application/json",Authorization:n}})).data}getFieldAliases(l){return Do[l]?Do[l]:[l]}extractTableHeaders(l){const r=[],n=new Set,t=v=>{const p=v==null?void 0:v.label;return!(!p||p==="操作"||p===this.config.columnName||(v==null?void 0:v.type)==="operate"||(v==null?void 0:v.prop)==="operate")},s=v=>{(v||[]).forEach(p=>{if(!p)return;const f=(p==null?void 0:p.children)||(p==null?void 0:p.child)||(p==null?void 0:p.columns);if(Array.isArray(f)&&f.length>0){s(f);return}if(t(p)){const m=p.label;if(!n.has(m)){n.add(m);const k=this.getFieldAliases(m);r.push(k)}}})};return s(l||[]),r}}function fc(a){return new Xf(a)}fc();const yt=async(a,l)=>{var v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b;let r=(p=(v=A.cloneDeep(a))==null?void 0:v.optionUrl)==null?void 0:p.menuSelect,n=[];r==null||r.forEach(g=>{});let t="",s=await he.menuToParent(r);if(s==null||s.forEach(g=>{var P,I,Y,le;(g==null?void 0:g.name)===(((le=(Y=(I=(P=A.cloneDeep(a))==null?void 0:P.optionUrl)==null?void 0:I.groupSelect)==null?void 0:Y[0])==null?void 0:le.replaceAll("'",""))??"")&&(t=g==null?void 0:g.id)}),l){t=l;const g=await Ar.getInsofDataApi({id:t}),P=(c=(k=(m=(f=g==null?void 0:g.data)==null?void 0:f.result)==null?void 0:m[0])==null?void 0:k.key)==null?void 0:c.pageKey;s=await he.getItemData(P,sessionStorage.getItem("systemKey"),"")}if(t!==""){let g;l?g=(D=s==null?void 0:s.find(Y=>(Y==null?void 0:Y.id)===l))==null?void 0:D.compData:g=(V=s==null?void 0:s.find(Y=>{var le,ye,Te,R;return(Y==null?void 0:Y.name)===(((ye=(le=a==null?void 0:a.groupSelect)==null?void 0:le.split(":"))==null?void 0:ye[0])||((R=(Te=a==null?void 0:a.optionUrl)==null?void 0:Te.groupSelect)==null?void 0:R[0]))}))==null?void 0:V.compData;let P=(G=(_=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:_.contents)==null?void 0:G.map(Y=>Y==null?void 0:Y.label);($=(M=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:M.contents)!=null&&$.every(Y=>Array.isArray(Y))&&(P=(S=he.getColumnChild((E=(j=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:j.contents)==null?void 0:E[0]))==null?void 0:S.map(Y=>Y==null?void 0:Y.prop));let I=(b=(w=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:b.map(Y=>{if(Array.isArray(Y))Y=Y==null?void 0:Y.filter(le=>!(le!=null&&le.id));else{let le={};for(let ye in Y)ye!=="id"&&(le[ye]=Y==null?void 0:Y[ye]);Y=le}return Y});I==null||I.forEach(Y=>{Array.isArray(Y)?n.push(he.getValueToObjectValue(Y,P)):n.push(Y)})}return n},Zf=A.useMenuState(A.pinia),{activeMenuPath:ov}=A.storeToRefs(Zf),Qf=A.useUnit(A.pinia),{chooseTitle:tv}=A.storeToRefs(Qf),e0="col-operate",hc=a=>`${e0}-${a}`,a0=(a,l)=>{const r=new Map;a.forEach(t=>{const{prop:s}=t;r.set(s,t)});const n=t=>{Array.isArray(t)&&t.forEach(s=>{const{prop:v}=s||{},p=r.get(v);l0(p,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&n(s.children)})};return n(l),l},l0=(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),r0=(a,l)=>{const{sortable:r=!1,filterable:n=!1,showSummary:t=!1,operable:s=!1,fixed:v=!1}=l||{};return{prop:a,sortable:r,filterable:n,showSummary:t,operable:s,fixed:v}},n0=async a=>{var s,v;if(!a)return;const l=hc(a),r=await Ar.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),n=(s=r==null?void 0:r.data)==null?void 0:s.code,t=(v=r==null?void 0:r.data)==null?void 0:v.result;if(n==200)return t==null?void 0:t[0]},i0=async a=>{if(a)return[]},o0=async(a,l)=>{if(!a||!l)return;const r=hc(a);return await Ar.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:l}})},t0=async(a,l)=>!a||!l?void 0:await Ar.updateInsofDataApi({id:a,value:{columns:l}}),fs=async(a,l)=>{const r=sessionStorage.getItem("systemKey");if(!a||!l||!r)return;const n=await n0(a);return n?await t0(n==null?void 0:n.id,l):await o0(a,l)};var ko={exports:{}},s0=ko.exports,hs;function c0(){return hs||(hs=1,function(a,l){(function(r,n){n()})(s0,function(){function r(m,k){return typeof k>"u"?k={autoBom:!1}:typeof k!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),k={autoBom:!k}),k.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(m.type)?new Blob(["\uFEFF",m],{type:m.type}):m}function n(m,k,c){var D=new XMLHttpRequest;D.open("GET",m),D.responseType="blob",D.onload=function(){f(D.response,k,c)},D.onerror=function(){console.error("could not download file")},D.send()}function t(m){var k=new XMLHttpRequest;k.open("HEAD",m,!1);try{k.send()}catch{}return 200<=k.status&&299>=k.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var k=document.createEvent("MouseEvents");k.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(k)}}var v=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof A.commonjsGlobal=="object"&&A.commonjsGlobal.global===A.commonjsGlobal?A.commonjsGlobal:void 0,p=v.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=v.saveAs||(typeof window!="object"||window!==v?function(){}:"download"in HTMLAnchorElement.prototype&&!p?function(m,k,c){var D=v.URL||v.webkitURL,V=document.createElement("a");k=k||m.name||"download",V.download=k,V.rel="noopener",typeof m=="string"?(V.href=m,V.origin===location.origin?s(V):t(V.href)?n(m,k,c):s(V,V.target="_blank")):(V.href=D.createObjectURL(m),setTimeout(function(){D.revokeObjectURL(V.href)},4e4),setTimeout(function(){s(V)},0))}:"msSaveOrOpenBlob"in navigator?function(m,k,c){if(k=k||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(r(m,c),k);else if(t(m))n(m,k,c);else{var D=document.createElement("a");D.href=m,D.target="_blank",setTimeout(function(){s(D)})}}:function(m,k,c,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof m=="string")return n(m,k,c);var V=m.type==="application/octet-stream",_=/constructor/i.test(v.HTMLElement)||v.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||V&&_||p)&&typeof FileReader<"u"){var M=new FileReader;M.onloadend=function(){var E=M.result;E=G?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=E:location=E,D=null},M.readAsDataURL(m)}else{var $=v.URL||v.webkitURL,j=$.createObjectURL(m);D?D.location=j:location.href=j,D=null,setTimeout(function(){$.revokeObjectURL(j)},4e4)}});v.saveAs=f.saveAs=f,a.exports=f})}(ko)),ko.exports}c0();const Un=A.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],itemGridData:[],itemExtendData:void 0,payloadTypes:"",lockingPage:"",systemPath:void 0,pageMapState:void 0,cacheUpdatingData:void 0,freshContent:!1,tableLoading:!1,routeToChildPath:"",tableViewContents:[],activeItemIndex:0,fixMenuStatus:!1,refreshTable:!1,selectTab:""}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a},setSelectTab(a){this.selectTab=a}}}),u0=A.useLoginState(A.pinia),{loginUserInfo:st}=A.storeToRefs(u0),d0=async a=>{var n,t,s;let l=await A.getAllTables({platId:parseInt((n=st==null?void 0:st.value)==null?void 0:n.plat_id),tableNames:[a]});return l=(s=(t=l==null?void 0:l.data)==null?void 0:t.result)==null?void 0:s[0],await tc(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}]}]},p0=A.useLoginState(),{loginUserInfo:fl}=A.storeToRefs(p0);let vo="$R";const Br=A.useModelComp(A.pinia),vc=e.ref(!1),{itemData:f0,itemGridData:li,curStructureCompIds:vs,isSubmitCurStructure:h0,routeToChildPath:v0,pageMapState:gt,itemExtendData:mo,refreshTable:ms}=A.storeToRefs(Br),Oo=Un(A.pinia),Or=A.useMenuState(A.pinia),or=e.shallowRef([]),{asideMenus:m0,activeTopMenuPath:y0,activeMenuPath:vl,platform:sv,buttonTriggerType:g0,currentMenuPath:Zr}=A.storeToRefs(Or),dn=A.useUnit(A.pinia),{selectTitle:Pn,chooseTitle:No}=A.storeToRefs(dn);e.ref();const Di=e.ref(!0),Hn=e.ref(0),bt=e.ref([]);e.ref(!1);const Dt=e.ref(!1),qi=e.ref(),mc=e.ref(),yc=e.ref(),b0=()=>{Br.setItemGridData([]),Br.setIsEdit("edit"),Br.setSubmitCurStructure(vl.value!=="/平台管理/菜单管理")},k0=()=>{Br.setIsEdit("view"),Br.setRefreshCurStructure(!0)},x0=async a=>{var t;let l=Pn.value,r=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),n=l==null?void 0:l.filter((s,v)=>v<=r);dn.setSelectTitle(ll.safeClone(n)),n=(t=n==null?void 0:n.map(s=>s==null?void 0:s.value))==null?void 0:t.join("/"),Or.setActiveMenuPath(null),Or.setActiveMenuPath(n)},ct=async(a,l,r,n="contentConfig")=>{var t;try{if(!Array.isArray(a))return;let s,v;l==="create"?(s={dataList:a==null?void 0:a.map(f=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:n,parentTable:"",version:1},value:{pageData:{...f,compData:(m=f==null?void 0:f.compData)==null?void 0:m.filter(k=>(k==null?void 0:k.key)!=="tableContents")}}}})},v=Ar.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(f=>{var m;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(m=f==null?void 0:f.compData)==null?void 0:m.filter(k=>(k==null?void 0:k.key)!=="tableContents")}}}})},v=Ar.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},v=Ar.batchDeleteInsofDataApi);const p=await v(s);if(((t=p==null?void 0:p.data)==null?void 0:t.code)===200)return p.data.result;throw qa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{qa.ElMessage.error("保存响应失败")}},ys=async(a,l,r,n)=>{var t,s,v,p,f,m,k,c,D,V,_;try{const G=(s=(t=a==null?void 0:a.results)==null?void 0:t.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:r},value:{tableData:w}})),M=(p=(v=a==null?void 0:a.results)==null?void 0:v.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:p.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),$=JSON.parse(JSON.stringify(a)),j=(f=$==null?void 0:$.results)==null?void 0:f.map(w=>w.id);let E;r?E=(c=(k=(m=gt.value)==null?void 0:m[vl.value])==null?void 0:k.filter(w=>{var b,g,P;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l&&((P=(g=w==null?void 0:w.key)==null?void 0:g.relatedInfo)==null?void 0:P.target)===n}))==null?void 0:c.map(w=>w==null?void 0:w.id):E=(_=(V=(D=gt.value)==null?void 0:D[vl.value])==null?void 0:V.filter(w=>{var b;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l}))==null?void 0:_.map(w=>w==null?void 0:w.id);const S=E==null?void 0:E.filter(w=>!(j!=null&&j.includes(w))&&typeof w=="number");(G==null?void 0:G.length)>0&&await Ar.batchAddInsofDataApi({dataList:G}),(M==null?void 0:M.length)>0&&await Ar.batchUpdateInsofDataApi({dataList:M}),(S==null?void 0:S.length)>0&&await Ar.batchDeleteInsofDataApi({ids:S})}catch(G){throw new Error(G)}},w0=async a=>{var m,k,c,D,V,_,G,M,$,j;Or.setContentLoading(!0);const l=JSON.parse(JSON.stringify(f0.value));if(!h0.value)return Or.setCacheStructures({key:g0.value,data:l}),qa.ElMessage.success("已暂存");const r=l==null?void 0:l.map(E=>E.id),n=r.filter(E=>{var S;return!((S=vs.value)!=null&&S.includes(E))}),t=(m=vs.value)==null?void 0:m.filter(E=>!r.includes(E)),s=[...n,...t].filter(E=>typeof E!==null&&typeof E<"u"),v=l==null?void 0:l.filter(E=>!E.id),p=l==null?void 0:l.filter(E=>E.id);let f=[];if(s&&(s==null?void 0:s.length)>0&&f.push(ct(s,"delete",a)),v&&(v==null?void 0:v.length)>0&&f.push(ct(v,"create",a)),p&&(p==null?void 0:p.length)>0&&f.push(ct(p,"update",a)),li.value&&((k=li.value)!=null&&k.isDelete&&((D=(c=li.value)==null?void 0:c.results)==null?void 0:D.length)>0&&((_=(V=li.value)==null?void 0:V.results)!=null&&_.every(E=>typeof E=="number"))?await Ar.batchDeleteInsofDataApi({ids:(G=li.value)==null?void 0:G.results}):(console.log("itemGridData.value",li.value),f.push(await ys(li.value,"gridLayout")))),mo.value)for(const E in mo.value)f.push(await ys((M=mo.value)==null?void 0:M[E],"extend",{target:E,compId:(j=($=mo.value)==null?void 0:$[E])==null?void 0:j.compId},E));await Promise.all(f).then(()=>{qa.ElMessage.success("保存成功"),Br.setRefreshCurStructure(!0)}).catch(E=>{qa.ElMessage.success(E)}),Or.setContentLoading(!1)},Wi=a=>Ni(a),_0=e.computed(()=>{var a;return(a=or.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),gc=e.computed(()=>{var a;return(a=or.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),bc=e.ref(0),kc=e.ref(null),S0="ocr_committed_temp_ids_v1",E0=(a,l)=>`${S0}:${String(a??"")}:${String(l??"")}`,C0=(a,l,r)=>{try{const n=E0(a,l),t=sessionStorage.getItem(n),s=t?JSON.parse(t):[],v=Array.isArray(s)?s:[],p=Array.from(new Set([...v,...r||[]].map(f=>String(f)))).slice(-200);sessionStorage.setItem(n,JSON.stringify(p))}catch{}},Bo=async(a,l="data",r)=>{var t,s,v,p,f,m,k,c,D,V,_,G,M,$,j,E,S,w,b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl,Fl,ja,zl,$l;let n=((v=(s=(t=Pn.value)==null?void 0:t.filter(Ma=>(Ma==null?void 0:Ma.condition)==="child"))==null?void 0:s[0])==null?void 0:v.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Ma=(p=a==null?void 0:a.fixContent)==null?void 0:p.map(xe=>{let ia={};for(let Ie in xe)Array.isArray(xe==null?void 0:xe[Ie])?ia[Ie]=JSON.stringify(xe==null?void 0:xe[Ie]):ia[Ie]=xe==null?void 0:xe[Ie];return ia}),rl=await A.quoteApi({platId:parseInt((f=fl==null?void 0:fl.value)==null?void 0:f.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});rl=(m=rl==null?void 0:rl.data)==null?void 0:m.result,rl=rl==null?void 0:rl.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let sl=rl==null?void 0:rl.map(xe=>{var ma,ya;let ia={},Ie=Ma==null?void 0:Ma[0],de;return Array.isArray((ma=xe==null?void 0:xe.struct)==null?void 0:ma[0])?de=he.getColumnChild((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0]):de=xe==null?void 0:xe.struct,de=de==null?void 0:de.filter(Je=>(Je==null?void 0:Je.prop)!=="relatedId"),de==null||de.forEach(Je=>{var Xe,Ke;ia[Je.prop]=((Xe=Je==null?void 0:Je.words)!=null&&Xe[0]?(Ie==null?void 0:Ie[(Ke=Je==null?void 0:Je.words)==null?void 0:Ke[0]])??(Ie==null?void 0:Ie[Je==null?void 0:Je.prop]):Ie==null?void 0:Ie[Je==null?void 0:Je.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[ia]}}),ga=[{tableName:(k=a==null?void 0:a.relatedContents)==null?void 0:k.find(xe=>xe==null?void 0:xe.includes("content")),tableContents:Ma}];ga=[...ga,...sl];let xa=await A.quoteApi({platId:parseInt((c=fl==null?void 0:fl.value)==null?void 0:c.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});xa=(V=(D=xa==null?void 0:xa.data)==null?void 0:D.result)==null?void 0:V.filter(xe=>!(ga!=null&&ga.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(xe==null?void 0:xe.id)))),xa=xa==null?void 0:xa.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let La=xa==null?void 0:xa.map(xe=>{var ma,ya,Je,Xe,Ke,pl,Ve;let ia={},Ie=Ma==null?void 0:Ma[0],de;return Array.isArray((ma=xe==null?void 0:xe.struct)==null?void 0:ma[0])?de=he.getColumnChild((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0]):de=xe==null?void 0:xe.struct,de=de==null?void 0:de.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="relatedId"),((Xe=(Je=de==null?void 0:de[0])==null?void 0:Je.words)!=null&&Xe[0]?Ie!=null&&Ie[(pl=(Ke=de==null?void 0:de[0])==null?void 0:Ke.words)==null?void 0:pl[0]]:Ie!=null&&Ie[(Ve=de==null?void 0:de[0])==null?void 0:Ve.prop])?(de==null||de.forEach(Fa=>{var Ea,il;ia[Fa.prop]=((Ea=Fa==null?void 0:Fa.words)!=null&&Ea[0]?(Ie==null?void 0:Ie[(il=Fa==null?void 0:Fa.words)==null?void 0:il[0]])??(Ie==null?void 0:Ie[Fa==null?void 0:Fa.prop]):Ie==null?void 0:Ie[Fa==null?void 0:Fa.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort):ia=void 0,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[ia]}});La=La==null?void 0:La.filter(xe=>{var ia;return!((ia=xe==null?void 0:xe.tableContents)!=null&&ia.every(Ie=>Ie===void 0))}),ga=[...ga,...La],await A.pageBatchAddApi({platId:parseInt((_=fl==null?void 0:fl.value)==null?void 0:_.plat_id),changeContents:ga});let Ra=[];ga==null||ga.forEach(xe=>{var ia;(ia=xe==null?void 0:xe.tableContents)==null||ia.forEach(Ie=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ie),request_result:"{}",is_delete:!1,request_table:xe==null?void 0:xe.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((G=fl==null?void 0:fl.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Ma=((a==null?void 0:a.ocrRows)||[]).map(xa=>xa==null?void 0:xa.id).filter(xa=>xa!=null),rl=((a==null?void 0:a.ocrRows)||[]).map(xa=>{const La={...xa};return delete La._isOCRRow,delete La._ocrTableId,Object.keys(La).forEach(Ra=>{/(^|\.)证书附件$/.test(Ra)&&Array.isArray(La[Ra])&&(La[Ra]=JSON.stringify(La[Ra].map(xe=>({url:(xe==null?void 0:xe.url)||"",name:(xe==null?void 0:xe.name)||(xe==null?void 0:xe.fileName)||"",fileName:(xe==null?void 0:xe.fileName)||(xe==null?void 0:xe.name)||""})).filter(xe=>xe.url||xe.name)))}),La});let sl=[{tableName:(M=a==null?void 0:a.relatedContents)==null?void 0:M.find(xa=>xa==null?void 0:xa.includes("content")),tableContents:rl}];await A.pageBatchAddApi({platId:parseInt(($=fl==null?void 0:fl.value)==null?void 0:$.plat_id),changeContents:sl});let ga=[];sl==null||sl.forEach(xa=>{var La;(La=xa==null?void 0:xa.tableContents)==null||La.forEach(Ra=>{ga.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ra),request_result:"{}",is_delete:!1,request_table:xa==null?void 0:xa.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((j=fl==null?void 0:fl.value)==null?void 0:j.plat_id),changeContents:[{tableName:"log",tableContents:ga}]}),C0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Ma)}if((a==null?void 0:a.buttonName)==="编辑"){const rl=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(de=>{const ma={...de};return delete ma._isOCRRow,delete ma._ocrTableId,delete ma._isTemp,delete ma.tableEditType,delete ma.index,ma});let sl=rl==null?void 0:rl.map(de=>{let ma={};for(let ya in de)Array.isArray(de==null?void 0:de[ya])?ma[ya]=JSON.stringify(de==null?void 0:de[ya]):ma[ya]=de==null?void 0:de[ya];return ma}),ga=await A.quoteApi({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});ga=(S=ga==null?void 0:ga.data)==null?void 0:S.result,ga=ga==null?void 0:ga.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))});let xa=(w=sl==null?void 0:sl[0])==null?void 0:w.id,La=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(de=>de==null?void 0:de.includes("content")),tableContents:sl}],Ra=(g=ga==null?void 0:ga.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa,Ea;return JSON.stringify(Ve==null?void 0:Ve.relatedId)!=="{}"&&(Ve==null?void 0:Ve.relatedId)!==""&&(Ve!=null&&Ve.relatedId)?(Fa=Ve==null?void 0:Ve.relatedId)==null?void 0:Fa.includes(parseInt(xa)):(Ve==null?void 0:Ve.sort)===((Ea=sl==null?void 0:sl[0])==null?void 0:Ea.sort)});if((ma==null?void 0:ma.length)>0){let Ve=sl==null?void 0:sl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Me,Sl;Fa[Ia.prop]=((Me=Ia==null?void 0:Ia.words)!=null&&Me[0]?(Ea==null?void 0:Ea[(Sl=Ia==null?void 0:Ia.words)==null?void 0:Sl[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??""}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,delete Fa.relatedId,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:g.filter(de=>de);La=[...La,...Ra];let xe=await A.quoteApi({platId:parseInt((P=fl==null?void 0:fl.value)==null?void 0:P.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});xe=(Y=(I=xe==null?void 0:xe.data)==null?void 0:I.result)==null?void 0:Y.filter(de=>!(La!=null&&La.find(ma=>(ma==null?void 0:ma.tableName)==="content_"+(de==null?void 0:de.id)))),xe=xe==null?void 0:xe.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))});let ia=(le=xe==null?void 0:xe.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa,Ea,il;return JSON.stringify(Ve==null?void 0:Ve.relatedId)!=="{}"&&(Ve==null?void 0:Ve.relatedId)!==""&&(Ve!=null&&Ve.relatedId)?(Fa=Ve==null?void 0:Ve.relatedId)==null?void 0:Fa.includes(parseInt(xa)):(Ve==null?void 0:Ve.sort)===((Ea=sl==null?void 0:sl[0])==null?void 0:Ea.sort)||(Ve==null?void 0:Ve.sort)===(parseInt(((il=sl==null?void 0:sl[0])==null?void 0:il.sort)??"0")+1).toString()});if((ma==null?void 0:ma.length)>0){let Ve=sl==null?void 0:sl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Me,Sl,Il,Ul;((Me=Ia==null?void 0:Ia.words)!=null&&Me[0]?(Ea==null?void 0:Ea[(Sl=Ia==null?void 0:Ia.words)==null?void 0:Sl[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea!=null&&Ea[Ia==null?void 0:Ia.prop])&&(Fa[Ia.prop]=((Il=Ia==null?void 0:Ia.words)!=null&&Il[0]?(Ea==null?void 0:Ea[(Ul=Ia==null?void 0:Ia.words)==null?void 0:Ul[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??"")}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,delete Fa.relatedId,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:le.filter(de=>de);La=[...La,...ia],await A.pageBatchUpdateApi({platId:parseInt((ye=fl==null?void 0:fl.value)==null?void 0:ye.plat_id),changeContents:La});let Ie=[];La==null||La.forEach(de=>{var ma;(ma=de==null?void 0:de.tableContents)==null||ma.forEach(ya=>{Ie.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(ya),request_result:"{}",is_delete:!1,request_table:de==null?void 0:de.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((Te=fl==null?void 0:fl.value)==null?void 0:Te.plat_id),changeContents:[{tableName:"log",tableContents:Ie}]})}if((a==null?void 0:a.buttonName)==="删除"){let Ma=[{tableName:(R=a==null?void 0:a.relatedContents)==null?void 0:R.find(xe=>xe==null?void 0:xe.includes("content")),tableContents:a==null?void 0:a.fixContent}],rl=await A.quoteApi({platId:parseInt((se=fl==null?void 0:fl.value)==null?void 0:se.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});rl=(ee=rl==null?void 0:rl.data)==null?void 0:ee.result,rl=rl==null?void 0:rl.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let sl=(Ce=(ue=a==null?void 0:a.fixContent)==null?void 0:ue[0])==null?void 0:Ce.id,ga=(Pe=rl==null?void 0:rl.map(xe=>{var Ie,de,ma,ya,Je,Xe;let ia=(Ie=xe==null?void 0:xe.contents)==null?void 0:Ie.filter(Ke=>{var pl,Ve,Fa;return JSON.stringify(Ke==null?void 0:Ke.relatedId)!=="{}"&&(Ke==null?void 0:Ke.relatedId)!==""&&(Ke!=null&&Ke.relatedId)?(pl=Ke==null?void 0:Ke.relatedId)==null?void 0:pl.includes(parseInt(sl)):(Ke==null?void 0:Ke.sort)===((Fa=(Ve=a==null?void 0:a.fixContent)==null?void 0:Ve[0])==null?void 0:Fa.sort)});if((ia==null?void 0:ia.length)>0){let Ke=(de=a==null?void 0:a.fixContent)==null?void 0:de[0];Ke={...Ke,id:(ma=ia==null?void 0:ia[0])==null?void 0:ma.id};let pl={},Ve=Ke,Fa;return Array.isArray((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0])?Fa=he.getColumnChild((Je=xe==null?void 0:xe.struct)==null?void 0:Je[0]):Fa=xe==null?void 0:xe.struct,Fa=Fa==null?void 0:Fa.filter(Ea=>(Ea==null?void 0:Ea.prop)!=="relatedId"),Fa==null||Fa.forEach(Ea=>{var il,Ia;pl[Ea.prop]=((il=Ea==null?void 0:Ea.words)!=null&&il[0]?(Ve==null?void 0:Ve[(Ia=Ea==null?void 0:Ea.words)==null?void 0:Ia[0]])??(Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop]):Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop])??""}),pl.id=(Xe=ia==null?void 0:ia[0])==null?void 0:Xe.id,delete pl.sort,delete pl.relatedId,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[pl]}}else return}))==null?void 0:Pe.filter(xe=>xe);Ma=[...Ma,...ga];let xa=await A.quoteApi({platId:parseInt((ve=fl==null?void 0:fl.value)==null?void 0:ve.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});xa=(ce=(B=xa==null?void 0:xa.data)==null?void 0:B.result)==null?void 0:ce.filter(xe=>!(Ma!=null&&Ma.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(xe==null?void 0:xe.id)))),xa=xa==null?void 0:xa.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let La=(W=xa==null?void 0:xa.map(xe=>{var Ie,de,ma,ya,Je,Xe;let ia=(Ie=xe==null?void 0:xe.contents)==null?void 0:Ie.filter(Ke=>{var pl,Ve,Fa;return JSON.stringify(Ke==null?void 0:Ke.relatedId)!=="{}"&&(Ke==null?void 0:Ke.relatedId)!==""&&(Ke!=null&&Ke.relatedId)?(pl=Ke==null?void 0:Ke.relatedId)==null?void 0:pl.includes(parseInt(sl)):(Ke==null?void 0:Ke.sort)===((Fa=(Ve=a==null?void 0:a.fixContent)==null?void 0:Ve[0])==null?void 0:Fa.sort)});if((ia==null?void 0:ia.length)>0){let Ke=(de=a==null?void 0:a.fixContent)==null?void 0:de[0];Ke={...Ke,id:(ma=ia==null?void 0:ia[0])==null?void 0:ma.id};let pl={},Ve=Ke,Fa;return Array.isArray((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0])?Fa=he.getColumnChild((Je=xe==null?void 0:xe.struct)==null?void 0:Je[0]):Fa=xe==null?void 0:xe.struct,Fa=Fa==null?void 0:Fa.filter(Ea=>(Ea==null?void 0:Ea.prop)!=="relatedId"),Fa==null||Fa.forEach(Ea=>{var il,Ia;pl[Ea.prop]=((il=Ea==null?void 0:Ea.words)!=null&&il[0]?(Ve==null?void 0:Ve[(Ia=Ea==null?void 0:Ea.words)==null?void 0:Ia[0]])??(Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop]):Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop])??""}),pl.id=(Xe=ia==null?void 0:ia[0])==null?void 0:Xe.id,delete pl.sort,delete pl.relatedId,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[pl]}}else return}))==null?void 0:W.filter(xe=>xe);Ma=[...Ma,...La],await A.pageBatchDeleteApi({platId:parseInt((Se=fl==null?void 0:fl.value)==null?void 0:Se.plat_id),changeContents:Ma});let Ra=[];Ma==null||Ma.forEach(xe=>{var ia;(ia=xe==null?void 0:xe.tableContents)==null||ia.forEach(Ie=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Ie),request_result:"{}",is_delete:!1,request_table:xe==null?void 0:xe.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((Le=fl==null?void 0:fl.value)==null?void 0:Le.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Ma=await A.getPageDataApi({platId:parseInt((Fe=fl==null?void 0:fl.value)==null?void 0:Fe.plat_id),pageName:"menu"});if(Ma=(aa=Ma==null?void 0:Ma.data)==null?void 0:aa.result,Ma!=null&&Ma.find(rl=>(rl==null?void 0:rl.father_name)===vl.value+"/")){yc.value=a,mc.value=Ma==null?void 0:Ma.filter(ga=>(ga==null?void 0:ga.father_name)===vl.value+"/");let rl=(ae=(Na=a==null?void 0:a.columns)==null?void 0:Na.find(ga=>ga==null?void 0:ga.mainKey))==null?void 0:ae.prop,sl=(oe=(ta=a==null?void 0:a.fixContent)==null?void 0:ta[0])==null?void 0:oe[rl];Dt.value=!0,qi.value=[{prop:rl,label:rl,name:rl,value:sl}]}else{let rl=(ca=a==null?void 0:a.fixContent)==null?void 0:ca.map(xa=>{let La={};for(let Ra in xa)Array.isArray(xa==null?void 0:xa[Ra])?La[Ra]=JSON.stringify(xa==null?void 0:xa[Ra]):La[Ra]=xa==null?void 0:xa[Ra];return La.relatedId="",La}),sl=[{tableName:(Ee=a==null?void 0:a.relatedContents)==null?void 0:Ee.find(xa=>xa==null?void 0:xa.includes("content")),tableContents:rl}];await A.pageBatchAddApi({platId:parseInt((ie=fl==null?void 0:fl.value)==null?void 0:ie.plat_id),changeContents:sl});let ga=[];sl==null||sl.forEach(xa=>{var La;(La=xa==null?void 0:xa.tableContents)==null||La.forEach(Ra=>{ga.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ra),request_result:"{}",is_delete:!1,request_table:xa==null?void 0:xa.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((Be=fl==null?void 0:fl.value)==null?void 0:Be.plat_id),changeContents:[{tableName:"log",tableContents:ga}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Ma=((Ja=(oa=(Ue=a==null?void 0:a.columns)==null?void 0:Ue.map(de=>de==null?void 0:de.filter))==null?void 0:oa.filter(de=>de!==""))==null?void 0:Ja[0])??"";Ma=he.analyzeSplitToContent(Ma,","),Ma=(Ma==null?void 0:Ma.find(de=>de==null?void 0:de.includes("@Filter")))??"";let rl=(L=a==null?void 0:a.fixContent)==null?void 0:L.map(de=>{let ma={};for(let ya in de)Array.isArray(de==null?void 0:de[ya])?ma[ya]=JSON.stringify(de==null?void 0:de[ya]):ma[ya]=de==null?void 0:de[ya];return ma}),sl=await A.quoteApi({platId:parseInt((H=fl==null?void 0:fl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});sl=(Z=sl==null?void 0:sl.data)==null?void 0:Z.result,sl=sl==null?void 0:sl.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))});let ga=(fe=(me=a==null?void 0:a.columns)==null?void 0:me[0])==null?void 0:fe.prop,xa=(da=rl==null?void 0:rl[0])==null?void 0:da[ga],La=[{tableName:(Qe=a==null?void 0:a.relatedContents)==null?void 0:Qe.find(de=>de==null?void 0:de.includes("content")),tableContents:rl}],Ra=(te=sl==null?void 0:sl.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa;return(Fa=Object.values(Ve))==null?void 0:Fa.find(Ea=>Ea===xa)});if((ma==null?void 0:ma.length)>0){let Ve=rl==null?void 0:rl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Me,Sl;Fa[Ia.prop]=((Me=Ia==null?void 0:Ia.words)!=null&&Me[0]?(Ea==null?void 0:Ea[(Sl=Ia==null?void 0:Ia.words)==null?void 0:Sl[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??""}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:te.filter(de=>de);La=[...La,...Ra];let xe=await A.quoteApi({platId:parseInt((pa=fl==null?void 0:fl.value)==null?void 0:pa.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});if(xe=(We=(Ne=xe==null?void 0:xe.data)==null?void 0:Ne.result)==null?void 0:We.filter(de=>!(La!=null&&La.find(ma=>(ma==null?void 0:ma.tableName)==="content_"+(de==null?void 0:de.id)))),xe=xe==null?void 0:xe.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))}),Ma&&Ma!==""){(Ma==null?void 0:Ma[(Ma==null?void 0:Ma.length)-1])===","&&(Ma=Ma==null?void 0:Ma.slice(0,(Ma==null?void 0:Ma.length)-1)),Ma=(Da=(Aa=Ma==null?void 0:Ma.replace("(",vo))==null?void 0:Aa.split(vo))==null?void 0:Da[1],Ma=Ma==null?void 0:Ma.slice(0,(Ma==null?void 0:Ma.length)-1),(Ma==null?void 0:Ma[0])==="*"&&(Ma="{"+((ra=(Ze=Ma==null?void 0:Ma.replace("{",vo))==null?void 0:Ze.split(vo))==null?void 0:ra[1])),Ma=(pe=Ma==null?void 0:Ma.replaceAll("{",""))==null?void 0:pe.replaceAll("}","");let de=he.calculatorAndToOr(Ma);de=de==null?void 0:de[0];let ma;if((U=Object.values(de))!=null&&U.some(ya=>(ya==null?void 0:ya[0])==="*")){let ya=(ze=(q=Pn.value)==null?void 0:q.find(Je=>(Je==null?void 0:Je.condition)==="child"))!=null&&ze.value?(Zr==null?void 0:Zr.value)+"/"+((la=(_e=Pn.value)==null?void 0:_e.find(Je=>(Je==null?void 0:Je.condition)==="child"))==null?void 0:la.value):Zr==null?void 0:Zr.value;ma=await Kr(ya,!1)}for(let ya in de)if(((fa=de==null?void 0:de[ya])==null?void 0:fa[0])==="*"){let Je=(Sa=(Va=(ha=de[ya])==null?void 0:ha.slice(1,(ka=de[ya])==null?void 0:ka.length))==null?void 0:Va.split(":"))==null?void 0:Sa[0],Xe=(Za=(Oe=de[ya])==null?void 0:Oe.split(":"))==null?void 0:Za[1],Ke=(Ha=ma==null?void 0:ma.filter(pl=>(pl==null?void 0:pl.name)===Je))==null?void 0:Ha[0];Ke=(Yl=(xl=Ke==null?void 0:Ke.compData)==null?void 0:xl.find(pl=>(pl==null?void 0:pl.key)==="tableContents"))==null?void 0:Yl.contents,Ke=(kl=Ke==null?void 0:Ke[0])==null?void 0:kl[Xe],de[ya]=Ke}Ma=((Fl=Object.values(de))==null?void 0:Fl[0])??""}let ia=(ja=xe==null?void 0:xe.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa;return(Fa=Object.values(Ve))==null?void 0:Fa.find(Ea=>Ea===(Ma===""?xa:Ma))});if((ma==null?void 0:ma.length)>0){let Ve=rl==null?void 0:rl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Sl,Il,Ul,ql;let Me=(Sl=a==null?void 0:a.columns)==null?void 0:Sl.find(Ql=>{var dr,Ol,pr;return((Ol=(dr=Ql==null?void 0:Ql.words)==null?void 0:dr[0])==null?void 0:Ol.replaceAll("'",""))===(Ia==null?void 0:Ia.prop)&&((pr=Ql==null?void 0:Ql.functionRelatedWords)==null?void 0:pr.length)>0});Me=(Il=Me==null?void 0:Me.prop)==null?void 0:Il.replaceAll("'",""),Fa[Ia.prop]=((Ul=Ia==null?void 0:Ia.words)!=null&&Ul[0]?(Ea==null?void 0:Ea[(ql=Ia==null?void 0:Ia.words)==null?void 0:ql[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??(Ea==null?void 0:Ea[Me]):(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??(Ea==null?void 0:Ea[Me]))??void 0}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:ja.filter(de=>de);La=[...La,...ia],await A.pageBatchUpdateApi({platId:parseInt((zl=fl==null?void 0:fl.value)==null?void 0:zl.plat_id),changeContents:La});let Ie=[];La==null||La.forEach(de=>{var ma;(ma=de==null?void 0:de.tableContents)==null||ma.forEach(ya=>{Ie.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ya),request_result:"{}",is_delete:!1,request_table:de==null?void 0:de.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt(($l=fl==null?void 0:fl.value)==null?void 0:$l.plat_id),changeContents:[{tableName:"log",tableContents:Ie}]})}Br.setRefreshCurStructure(!0),await xt(a)},kt=async(a,l,r)=>{var t;let n=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(n){let s=(t=n.compData)==null?void 0:t.map(v=>{var p;if((v==null?void 0:v.key)==="tableContents"){let f={...v,contents:r};return f.contents=(p=(f==null?void 0:f.contents)??[])==null?void 0:p.map(m=>{let k={};for(let c in m)JSON.stringify(m==null?void 0:m[c])==="{}"?k[c]="":k[c]=m==null?void 0:m[c];return k}),f}return v});return n.compData=await Et(s,{}),a=a==null?void 0:a.map(v=>((v==null?void 0:v.id)===(n==null?void 0:n.id)&&(v=n),v)),a}else{let s=a==null?void 0:a.filter(p=>{var f;return(p==null?void 0:p.children)&&((f=p==null?void 0:p.children)==null?void 0:f.length)>0||(p==null?void 0:p.comp)==="Tabs"}),v=s==null?void 0:s.map(async p=>{var f;return p!=null&&p.children&&((f=p==null?void 0:p.children)==null?void 0:f.length)>0?p.children=await kt(p==null?void 0:p.children,l,r):p.compData=await kt(p==null?void 0:p.compData,l,r),p});return s=await Promise.all(v),s}},xt=async a=>{var s,v,p,f,m,k,c;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(D=>D==null?void 0:D.includes("content_"));if(!l)return;let r=await A.getAllTables({platId:parseInt((v=fl==null?void 0:fl.value)==null?void 0:v.plat_id),tableNames:l??[]});if(r=(f=(p=r==null?void 0:r.data)==null?void 0:p.result)==null?void 0:f[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(D=>{D==null||delete D.source_table;const V={};for(let _ in D){const G=D==null?void 0:D[_],M=G&&Object.prototype.toString.call(G)==="[object Object]"&&Object.keys(G).length===0,$=Array.isArray(G)&&G.length===0;G==null||G==="{}"||M||$?V[_]="":V[_]=G}return V});let n=(k=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:k[1],t=await kt(or.value,n,r);or.value=(c=or.value)==null?void 0:c.map(D=>{var V,_;return(V=t==null?void 0:t[0])!=null&&V.tabInform&&((_=t==null?void 0:t[0])==null?void 0:_.tabInform)===(D==null?void 0:D.tabInform)?D=t==null?void 0:t[0]:(D!=null&&D.name?(D==null?void 0:D.name)===(t==null?void 0:t.name):(D==null?void 0:D.id)===(t==null?void 0:t.id))&&(D=t),D})},D0=a=>{let l=qi.value;qi.value=l==null?void 0:l.map(r=>(r.value=a==null?void 0:a[r==null?void 0:r.prop],r))},N0=async()=>{var D,V,_,G,M,$,j,E,S,w;let a=yc.value,l=mc.value,r=(V=(D=a==null?void 0:a.columns)==null?void 0:D.find(b=>b==null?void 0:b.mainKey))==null?void 0:V.prop,n=(G=(_=qi.value)==null?void 0:_[0])==null?void 0:G.value,t=(M=a==null?void 0:a.fixContent)==null?void 0:M.map(b=>{var P;let g={};for(let I in b)Array.isArray(b==null?void 0:b[I])?g[I]=JSON.stringify(b==null?void 0:b[I]):g[I]=b==null?void 0:b[I];return(P=a==null?void 0:a.columns)==null||P.forEach(I=>{(I==null?void 0:I.formType)==="Upload"&&(g==null?void 0:g[I==null?void 0:I.prop])===""&&(g[I==null?void 0:I.prop]="{}")}),g[r]=n,g}),s=[{tableName:($=a==null?void 0:a.relatedContents)==null?void 0:$.find(b=>b==null?void 0:b.includes("content")),tableContents:t}];await A.pageBatchAddApi({platId:parseInt((j=fl==null?void 0:fl.value)==null?void 0:j.plat_id),changeContents:s}),l=l==null?void 0:l.filter(b=>{var g,P,I;return(I=b==null?void 0:b.object_name)==null?void 0:I.includes((P=(g=a==null?void 0:a.fixContent)==null?void 0:g[0])==null?void 0:P[r])});let v=[],p=new Map;l==null||l.forEach(b=>{v.push(`content_${b==null?void 0:b.object_id}`),v.push(`struct_${b==null?void 0:b.object_id}`),p.set(b==null?void 0:b.object_id,b)});let f=await A.getAllTables({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),tableNames:v??[]});f=(S=f==null?void 0:f.data)==null?void 0:S.result;let m=[],k=[];f=he.chunk(f,2),f==null||f.forEach(b=>{var I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae;let g=p.get((ye=(le=(Y=(I=b==null?void 0:b[1])==null?void 0:I[0])==null?void 0:Y.source_table)==null?void 0:le.split("_"))==null?void 0:ye[1]),P=(se=(R=(Te=g==null?void 0:g.object_name)==null?void 0:Te.split("/"))==null?void 0:R.filter((ta,oe)=>{var ca,Ee;return((Ee=(ca=g==null?void 0:g.object_name)==null?void 0:ca.split("/"))==null?void 0:Ee.length)-1!==oe}))==null?void 0:se.join("/");if(P=P+"/"+n,k!=null&&k.find(ta=>(ta==null?void 0:ta.path)===P)||k.push({fatherPath:g==null?void 0:g.father_name,isShow:g==null?void 0:g.is_show,path:P}),((ue=(ee=b==null?void 0:b[1])==null?void 0:ee[0])==null?void 0:ue.类型)==="Table"){let ta=((ve=(Pe=(Ce=b==null?void 0:b[1])==null?void 0:Ce[0])==null?void 0:Pe.结构)==null?void 0:ve.contents)??[],oe=ll.safeClone(ta);Array.isArray(oe==null?void 0:oe[0])&&(oe=he.getColumnChild(oe==null?void 0:oe[0]));let ca=[];if(((B=b==null?void 0:b[0])==null?void 0:B.length)>0&&(ca=(ce=b==null?void 0:b[0])==null?void 0:ce.map(Ee=>oe==null?void 0:oe.map(Be=>(Be=(Ee==null?void 0:Ee[Be==null?void 0:Be.prop])??"",Be)))),m!=null&&m.find(Ee=>(Ee==null?void 0:Ee.key)===P)){let Ee=(W=m==null?void 0:m.find(Be=>(Be==null?void 0:Be.key)===P))==null?void 0:W.contents;Ee.push({isShow:g==null?void 0:g.is_show,filter:((Fe=(Le=(Se=b==null?void 0:b[1])==null?void 0:Se[0])==null?void 0:Le.引用)==null?void 0:Fe.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:ta,tableContents:ca});let ie=m==null?void 0:m.findIndex(Be=>(Be==null?void 0:Be.key)===P);m[ie].contents=Ee}else m.push({key:P,contents:[{isShow:g==null?void 0:g.is_show,filter:((ae=(Na=(aa=b==null?void 0:b[1])==null?void 0:aa[0])==null?void 0:Na.引用)==null?void 0:ae.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:ta,tableContents:ca}]})}});let c=[];c.push({key:"menuPath",contents:k}),c=[...c,...m],await A.createPlatFormDataApi({platId:parseInt((w=fl==null?void 0:fl.value)==null?void 0:w.plat_id),changeData:c}),Dt.value=!1,Br.setRefreshTable(!0)},To=async(a,l)=>{},Ao=async a=>{or.value=await he.getDeepDiffItems(a),Br.setItemData(or.value),Br.setOriginalData(or.value)};e.ref();const B0=e.ref(null),T0=()=>{var a,l;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(l=(a=vl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},xc=e.ref([]),A0=e.computed(()=>{var a,l;return(l=(a=gt.value)==null?void 0:a[vl.value])==null?void 0:l.filter(r=>{var n;return((n=r==null?void 0:r.key)==null?void 0:n.type)==="gridLayout"})});e.watch(()=>[y0.value],()=>{dn.setSelectTitle([]),dn.setChooseTitle([])},{deep:!0});e.watch(()=>No.value,async(a,l)=>{var n,t,s,v,p,f;let r=(n=No.value)==null?void 0:n.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Zr.value);if((r==null?void 0:r.length)>0){Or.setContentLoading(!0);let m=((t=r==null?void 0:r[0])==null?void 0:t.relatedContent)??(vl==null?void 0:vl.value),k=m+"/"+((s=r==null?void 0:r[0])==null?void 0:s.value),c=!!((v=r==null?void 0:r[0])!=null&&v.parentContent),D=await Kr(k,c,{originPath:m});D=(p=D==null?void 0:D.filter(G=>G))==null?void 0:p.map(G=>(G.isShow=!0,G)),console.log(D,"loadingContents");let V=await he.getDeepDiffItems(D),_=V==null?void 0:V.filter(G=>G==null?void 0:G.choice);Oo.setSelectTab((f=_==null?void 0:_[0])==null?void 0:f.choiceName),V=V==null?void 0:V.filter(G=>{var M;return!(G!=null&&G.choiceName)||(G==null?void 0:G.choiceName)===((M=_==null?void 0:_[0])==null?void 0:M.choiceName)}),or.value=V,Or.setContentLoading(!1)}});const z0=(a,l)=>{setTimeout(async()=>{var p,f,m;let r=(p=No.value)==null?void 0:p.filter(k=>(k==null?void 0:k.condition)==="child"&&(k==null?void 0:k.value)!==""&&(k==null?void 0:k.parentContent)!==Zr.value),n=vl==null?void 0:vl.value,t=vl==null?void 0:vl.value;(r==null?void 0:r.length)>0&&(t=((f=r==null?void 0:r[0])==null?void 0:f.relatedContent)??(vl==null?void 0:vl.value),n=t+"/"+((m=r==null?void 0:r[0])==null?void 0:m.value));let s=await Kr(n,!1,{originPath:t});s=s==null?void 0:s.map(k=>(k.isShow=!0,k));let v=await he.getDeepDiffItems(s);or.value=v==null?void 0:v.filter(k=>!(k!=null&&k.step)||(k==null?void 0:k.step)===(a==null?void 0:a.title))},10)},M0=a=>{setTimeout(async()=>{var v,p,f;let l=(v=No.value)==null?void 0:v.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Zr.value),r=vl==null?void 0:vl.value,n=vl==null?void 0:vl.value;(l==null?void 0:l.length)>0&&(n=((p=l==null?void 0:l[0])==null?void 0:p.relatedContent)??(vl==null?void 0:vl.value),r=n+"/"+((f=l==null?void 0:l[0])==null?void 0:f.value));let t=await Kr(r,!1,{originPath:n});t=t==null?void 0:t.map(m=>(m.isShow=!0,m)),Oo.setSelectTab(a);let s=await he.getDeepDiffItems(t);or.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>m0.value,a=>{a!=null&&a.length||(or.value=[])},{immediate:!0});e.watch(()=>[vl.value],async a=>{var s,v,p,f;if(!vl.value)return;if(vl.value==="/"){or.value=[];return}Or.setCurrentMenuPath(vl.value),Br.setLockingPage(""),or.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Di.value=!1,Or.setContentLoading(!0),vc.value=!0;let r=a==null?void 0:a[0],n=r,t=(v=Pn.value)==null?void 0:v.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==vl.value&&!(m!=null&&m.relatedContent));if((t==null?void 0:t.length)>0&&(r=r+"/"+((p=t==null?void 0:t[0])==null?void 0:p.value)),r==="系统管理/日志管理")or.value=await d0("log");else{let m=await Kr(r,!0,{originPath:n});m=m==null?void 0:m.map(D=>(D.isShow=!0,D));let k=await he.getDeepDiffItems(m),c=k==null?void 0:k.filter(D=>D==null?void 0:D.choice);Oo.setSelectTab((f=c==null?void 0:c[0])==null?void 0:f.choiceName),or.value=k==null?void 0:k.filter(D=>{var V;return!(D!=null&&D.choiceName)||(D==null?void 0:D.choiceName)===((V=c==null?void 0:c[0])==null?void 0:V.choiceName)})}Or.setContentLoading(!1),Br.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Br.setItemData(or.value),Br.setOriginalData(or.value),Br.setRefreshTable(!1),e.nextTick(()=>{Hn.value=Hn.value++,Di.value=!0})},{immediate:!0});e.watch(()=>[ms.value],async()=>{var a,l,r,n;if(ms.value){or.value=[];let t=e.getCurrentInstance();(a=t==null?void 0:t.scope)==null||a.stop(),t=null,Di.value=!1,Or.setContentLoading(!0),vc.value=!0;let s=Zr==null?void 0:Zr.value,v=s,p=(l=Pn.value)==null?void 0:l.filter(c=>(c==null?void 0:c.condition)==="child"&&(c==null?void 0:c.value)!==""&&(c==null?void 0:c.parentContent)!==(Zr==null?void 0:Zr.value));(p==null?void 0:p.length)>0&&(s=s+"/"+((r=p==null?void 0:p[0])==null?void 0:r.value));let f=await Kr(s,!0,{originPath:v});f=f==null?void 0:f.map(c=>(c.isShow=!0,c));let m=await he.getDeepDiffItems(f),k=m==null?void 0:m.filter(c=>c==null?void 0:c.choice);if(Oo.setSelectTab((n=k==null?void 0:k[0])==null?void 0:n.choiceName),or.value=m==null?void 0:m.filter(c=>{var D;return!(c!=null&&c.choiceName)||(c==null?void 0:c.choiceName)===((D=k==null?void 0:k[0])==null?void 0:D.choiceName)}),Or.setContentLoading(!1),Br.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Br.setItemData(or.value),Br.setOriginalData(or.value),Br.setRefreshTable(!1),(p==null?void 0:p.length)>0){let c=[...Pn.value,...p];dn.setSelectTitle(c)}e.nextTick(()=>{Hn.value=Hn.value++,Di.value=!0})}},{immediate:!0,deep:!0});const I0=async()=>{Or.setLinkMenuInfo(null),Or.setActiveMenuPath(v0.value),or.value=null,Br.setRouteToChildPath(""),Or.setChildMenu("")},O0=a=>new RegExp("button","i").test(a),L0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),wc=a=>{if(L0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Or.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},_c=async(a,l,r)=>{var D,V,_,G,M,$,j,E,S,w,b,g;let n="",t="";for(let P in l)(l==null?void 0:l[P])===a&&(t=P);r==null||r.forEach(P=>{(P==null?void 0:P.prop)===t&&(n=P==null?void 0:P.fatherPath)});let s=n===""?vl.value:n;n!==""&&Or.setCurrentMenuPath(s),Or.setCurrentMenuPath(s+"/"+a),Or.setContentLoading(!0),or.value=await Kr(s+"/"+a,!0,{originPath:s+"/",row:l});let v=await Kr(s,!1),p=(D=v==null?void 0:v.filter(P=>(P==null?void 0:P.comp)==="Table"))==null?void 0:D[0],f=((M=(G=(_=(V=p==null?void 0:p.compData)==null?void 0:V.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:_.contents)==null?void 0:G[0])==null?void 0:M.prop)??((w=(S=(E=(j=($=p==null?void 0:p.compData)==null?void 0:$.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:j.contents)==null?void 0:E[0])==null?void 0:S[0])==null?void 0:w.prop),m=(g=(b=p==null?void 0:p.compData)==null?void 0:b.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:g.contents;m=m==null?void 0:m.map(P=>({label:P==null?void 0:P[f],value:P==null?void 0:P[f]}));let k=Pn.value,c={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};k.push(c),dn.setSelectTitle(k),dn.setChooseTitle([c]),Or.setContentLoading(!1),Br.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Br.setItemData(or.value),Br.setOriginalData(or.value)},$0=a=>{bc.value=a},_i=e.reactive({index:0,comp:null}),R0=e.computed(()=>{var a;return(a=or.value)==null?void 0:a.map((l,r)=>({id:l.id,name:l.name,status:V0(l,r)}))}),Sc=(a,l)=>{var f,m,k,c,D;const r=l?a:a-2,n=(f=or.value)==null?void 0:f[r],t=(k=(m=n==null?void 0:n.compData)==null?void 0:m.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:k.contents,s=t==null?void 0:t.findIndex(V=>(V==null?void 0:V.isMainKey)&&(V==null?void 0:V.label)!=="操作"),v=s===-1?0:s,p=(D=(c=n==null?void 0:n.compData)==null?void 0:c.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:D.contents;return{valid:p==null?void 0:p.every(V=>V==null?void 0:V[v+1]),length:(p==null?void 0:p.length)||0}},V0=(a,l)=>{var n;let r="process";if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){const{valid:t,length:s}=Sc(l,!0);_i.index===l?r="process":s===0?r="wait":r=t?"success":"error"}return r},Ec=a=>{var r,n,t,s,v;const l=a+1;if(l>1&&((t=(n=(r=or.value)==null?void 0:r[a])==null?void 0:n.comp)==null?void 0:t.toUpperCase())==="TABLE"){const{valid:p}=Sc(l);p?(_i.index=l,_i.comp=(s=or.value)==null?void 0:s[a]):qa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else _i.index=l,_i.comp=(v=or.value)==null?void 0:v[a]},Cc=e.computed(()=>{var a,l;return(l=(a=gc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Cc.value,a=>{a&&Ec(0)},{immediate:!0});const F0={class:"table-content"},P0={class:"menu-config-wrap"},j0=["onClick"],H0={key:0,class:"viewport-wrap"},U0=["onClick"],q0={title:"选择显示列信息"},W0={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"}},K0=["title"],G0={class:"col-operate-wrap"},Y0={key:0,class:"col-operate-radio-wrapper"},J0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},X0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},Z0={class:"pop-view"},Q0={class:"pop-wrapper"},e3={class:"file-list-pop"},a3=["title","onClick"],l3=["onClick"],r3=["onClick"],n3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},i3={class:"form-content"},o3={key:0,class:"dialog-footer"},t3={class:"dialog-footer"},s3={class:"ocr-dialog-content"},c3={class:"ocr-steps"},u3={key:0,class:"ocr-action-buttons"},d3={key:1,class:"ocr-preview-area"},p3={class:"ocr-file-grid"},f3={class:"file-thumbnail"},h3=["src"],v3={key:1,class:"thumbnail-placeholder"},m3={class:"progress-svg",viewBox:"0 0 36 36"},y3=["stroke","stroke-width","stroke-dasharray"],g3={key:0,class:"progress-icon"},b3={key:1,class:"progress-icon"},k3=["onClick"],x3={class:"file-name"},w3={key:0,class:"ocr-recognize-button"},_3={key:2,class:"ocr-progress-section"},S3={key:3,class:"ocr-confirm-area"},E3={class:"ocr-preview-tip"},C3={class:"ocr-preview-table"},D3={style:{display:"flex","align-items":"center",gap:"8px"}},N3={key:0},B3={key:4,class:"ocr-success-area"},T3={key:0,class:"ocr-dialog-footer"},A3={class:"form-content"},z3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},M3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},I3={style:{display:"flex"}},gs="ss-ocr-upload-history",O3="ss-ocr-cert-history-v1",L3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(a,{emit:l}){var Vt;const r=e.ref([]),n=Ct(A.pinia),t=e.ref(null),s=e.ref(new Set),v=e.ref(new Map),p=e.ref(!1),f=e.ref(new Map),m=new Map,k=e.ref(new Map),c=a,D=e.ref((c==null?void 0:c.allowSelect)??!0),V=e.ref(((Vt=c==null?void 0:c.config)==null?void 0:Vt.showIndex)??!0),_=e.ref(),G=e.ref(!0),M=e.ref(!1),$=e.ref([]),j={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=e.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),S=he.useOriginalState(A.pinia);let w="$R";const{originalPath:b}=A.storeToRefs(S),g=b.value,P=e.computed(()=>{var h;const d=(h=he.getAllLeafNodes(R.value)||[])==null?void 0:h.filter(N=>(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate");return d.length>0?d.every(N=>!!(N!=null&&N.sortable)):!1});e.computed(()=>{var h;return(h=R.value)==null?void 0:h.every(N=>N==null?void 0:N.filterable)}),e.computed(()=>{var h;return(h=R.value)==null?void 0:h.every(N=>N==null?void 0:N.operable)});const I=e.ref(!0),Y=e.ref([]),le=e.reactive({column:{},status:!1,text:"合计"}),ye=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Te=l,R=e.ref([]),se=e.ref([]),ee=e.ref([]),ue=e.reactive({prop:"",order:null}),Ce=e.ref([]),Pe=e.ref(!1),ve=e.ref(!1),B=e.ref(null),{isUseBackdrop:ce,initTrackFileType:W,getFileExtension:Se,setData:Le,getFileInfo:Fe,getFilesInfo:aa}=_o.useThreeSystem(),Na=e.ref([]),ae=e.ref(!1),ta=e.ref(),oe=A.useMenuState(),{importLoading:ca,activeMenuPath:Ee,contentLoading:ie,linkMenuInfo:Be}=A.storeToRefs(oe),Ue=he.useTableComp(A.pinia),oa=A.useModelComp(A.pinia),Ja=Un(A.pinia),{extraContents:L,cacheUpdatingData:H,tableViewContents:Z,tableLoading:me,pageMapState:fe,lockingPage:da}=A.storeToRefs(oa),{selectTab:Qe}=A.storeToRefs(Ja),{compType:te,hasEditable:pa}=Gs.useRole(),Ne=e.ref([]),We=e.ref([]),Aa=e.ref(new Map);e.ref(!1);const Da=e.ref("");e.ref();const Ze=e.ref(!0),ra=e.ref(0),pe=e.ref(!0),U=e.ref(""),q=e.ref(!1),ze=e.ref(null);e.ref([]);const _e=e.ref({label:"查看三维模型"}),la=e.ref(!1),fa=e.ref(),ka=e.ref([]),ha=e.ref([]),Va=e.ref(!1),Sa=e.ref([]),Oe=e.ref([]),Za=e.ref([]),Ha=e.ref([]),xl=e.ref([]),Yl=()=>{try{const d=localStorage.getItem(gs),h=d?JSON.parse(d):[];xl.value=Array.isArray(h)?h:[]}catch{xl.value=[]}},kl=()=>{try{localStorage.setItem(gs,JSON.stringify(xl.value||[]))}catch{}},Fl=d=>{var re,ne,K;if(!d)return;const h=d.url||((re=d==null?void 0:d.uploadResult)==null?void 0:re.url)||"",N=d.name||((ne=d==null?void 0:d.uploadResult)==null?void 0:ne.name)||((K=d==null?void 0:d.uploadResult)==null?void 0:K.fileName)||"";if(!h&&!N)return;const z={name:N,url:h,ts:Date.now()},F=String(z.name||"").trim().toLowerCase(),C=(xl.value||[]).findIndex(be=>String((be==null?void 0:be.name)||"").trim().toLowerCase()===F);C>-1&&xl.value.splice(C,1),xl.value.unshift(z),xl.value.length>20&&(xl.value=xl.value.slice(0,20)),kl()};Yl();const ja=(d,h)=>`${O3}:${String(d??"")}:${String(h??"")}`,zl=(d,h)=>{try{const N=sessionStorage.getItem(ja(d,h)),z=N?JSON.parse(N):[];return Array.isArray(z)?z:[]}catch{return[]}},$l=(d,h,N)=>{try{sessionStorage.setItem(ja(d,h),JSON.stringify(Array.isArray(N)?N:[]))}catch{}},Ma=(d,h,N)=>{if(!h)return;const z=zl(d,h),F=[N,...z||[]].filter(Boolean).slice(0,1);return $l(d,h,F),F},rl=(d,h,N)=>{if(!h||!N)return;const z=ja(d,h),F=ja(d,N);try{const C=sessionStorage.getItem(z);if(!C)return;const re=(()=>{try{const be=JSON.parse(C);return Array.isArray(be)?be:[]}catch{return[]}})(),ne=zl(d,N),K=[...re,...ne||[]].filter(Boolean).sort((be,Ae)=>Number((Ae==null?void 0:Ae.ts)||0)-Number((be==null?void 0:be.ts)||0)).slice(0,1);sessionStorage.setItem(F,JSON.stringify(K)),sessionStorage.removeItem(z)}catch{}},sl=e.ref(!1),ga=e.ref(!1),xa=e.ref([]),La=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const Ra=e.ref(!1),xe=e.ref([]),ia=e.ref(1),Ie=e.ref(new Map),de=e.ref(new Map),ma=e.ref(0),ya=e.ref(!1),Je=e.ref([]),Xe=e.ref([]),Ke=d=>{var h;try{const N=(h=he.getAllLeafNodes(R.value)||[])==null?void 0:h.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(N==null?void 0:N.find(z=>(z==null?void 0:z.prop)===d||(z==null?void 0:z.label)===d))||null}catch{return null}},pl=d=>{const h=Ke(d),N=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"Input";return ll.getComponent(N)||ll.getComponent("Input")},Ve=e.ref([]),Fa=e.ref(null),Ea=e.ref([]),il=e.ref(null),Ia=e.ref(""),Me=e.ref(!1),Sl=e.ref([]),Il=e.ref(""),Ul=e.ref(!1),ql=e.ref([]),Ql=e.ref([]),dr=e.ref([]),Ol=e.ref(null),pr=e.ref([]),Fr=e.ref("");e.computed(()=>{var d;try{const h=(d=he.getAllLeafNodes(R.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),N=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&N.set(z.label,z.prop)}),N.get("编号")||""}catch{return""}});const Pl=e.computed(()=>{var d;try{const h=(d=he.getAllLeafNodes(R.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),N=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&N.set(z.label,z.prop)}),N.get("名称")||""}catch{return""}}),ar=e.computed(()=>{var d;try{const h=(d=he.getAllLeafNodes(R.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),N=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&N.set(z.label,z.prop)}),N.get("制造厂")||""}catch{return""}}),Pr=()=>{Ul.value=!1,ql.value=[],Ql.value=[],dr.value=[],Ol.value=null,pr.value=[],Fr.value=""},Tr=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,jr=(d,h)=>{const N=(d==null?void 0:d.ocrRow)||{};for(const F of Object.keys(N))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||Tr(N[F])&&(h[F]=N[F]);const z=We.value.find(F=>F.id===h.id);if(z)for(const F of Object.keys(N))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||Tr(N[F])&&(z[F]=N[F]);Aa.value&&Aa.value.set(h.id,h),Ma(c==null?void 0:c.index,h.id,d==null?void 0:d.versionItem),Ql.value=[...Ql.value||[],JSON.parse(JSON.stringify(h))]},Ir=async(d,h=null)=>{var N,z,F,C,re,ne,K;try{const be=(N=he.getAllLeafNodes(R.value)||[])==null?void 0:N.filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),Ae=new Map;be==null||be.forEach(wa=>{wa!=null&&wa.label&&(wa!=null&&wa.prop)&&Ae.set(wa.label,wa.prop)});const He=Ae.get("系统编号")||Ae.get("编号");if(!He){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const $e=h||Ol.value;if((Array.isArray($e==null?void 0:$e.result)?$e.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let wa=0;wa<d.length;wa++){const Oa=d[wa],za=Oa[He];if(!za){console.warn(`第 ${wa+1} 条匹配行缺少系统编号,跳过`);continue}const Ye=`设备管理/试验设备/${za}`,Qa=await A.getPageDataApi({platId:parseInt((z=cl.value)==null?void 0:z.plat_id),pageName:Ye});if(!((F=Qa==null?void 0:Qa.data)!=null&&F.result)||!Array.isArray(Qa.data.result)){console.warn(`未找到详情页数据: ${Ye}`);continue}const ba=Qa.data.result.find(na=>(na==null?void 0:na.property_name)==="校检记录");if(!ba){console.warn(`详情页 ${Ye} 中未找到校检记录表`);continue}const el=(C=ba.contents)==null?void 0:C.find(na=>(na==null?void 0:na.key)&&na.key.startsWith("content_"));if(!el||!el.key){console.warn("校检记录表中未找到 content item");continue}const ke=el.key,$a=Array.isArray(el.value)?el.value:[];if($a.length>=5){const we=[...$a].sort((sa,Ba)=>{const nl=Number((sa==null?void 0:sa.create_time)||0),Wa=Number((Ba==null?void 0:Ba.create_time)||0);return nl-Wa})[0];we!=null&&we.id&&await A.pageBatchDeleteApi({platId:parseInt((re=cl.value)==null?void 0:re.plat_id),changeContents:[{tableName:ke,tableContents:[{id:we.id}]}]})}const va=(ne=be==null?void 0:be.find(na=>(na==null?void 0:na.label)==="证书附件"))==null?void 0:ne.prop,Ca=String(Date.now()),_a={id:Ca},T=$a[0]||{},X=new Date().toISOString().split("T")[0];if(Object.keys(T||{}).forEach(na=>{if(na!=="id"){if(na==="证书附件"){_a[na]="";return}if(na==="校检日期"||na==="检校日期"){_a[na]=Oa[na]||Oa.校检日期||Oa.检校日期||X;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(na)){_a[na]=Oa[na]??"";return}_a[na]=Oa[na]??""}}),va&&Oa[va]){const na=Oa[va];if(Array.isArray(na)&&na.length>0)_a.证书附件=JSON.stringify(na.map(we=>({url:(we==null?void 0:we.url)||"",name:(we==null?void 0:we.name)||(we==null?void 0:we.fileName)||"",fileName:(we==null?void 0:we.fileName)||(we==null?void 0:we.name)||""})).filter(we=>we.url||we.name));else if(typeof na=="string")try{const we=JSON.parse(na);_a.证书附件=na}catch{_a.证书附件=JSON.stringify([{url:na,name:na,fileName:na}])}}console.log(ke,"tableName","inspectionRecordRow",_a),await A.pageBatchAddApi({platId:parseInt((K=cl.value)==null?void 0:K.plat_id),changeContents:[{tableName:ke,tableContents:[_a]}]});const Re=ba==null?void 0:ba.object_id;if(Re&&Ca){const na=va&&Oa[va]?Oa[va]:null;let we=[],sa="",Ba=!1;if(Array.isArray(na)&&na.length>0){we=na.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 Wa=na[0];sa=(Wa==null?void 0:Wa.url)||"";const ul=(Wa==null?void 0:Wa.name)||(Wa==null?void 0:Wa.fileName)||"";Ba=String(ul).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf")}else if(typeof na=="string")try{const Wa=JSON.parse(na);Array.isArray(Wa)?(we=Wa.map(ul=>({name:(ul==null?void 0:ul.name)||(ul==null?void 0:ul.fileName)||"",url:(ul==null?void 0:ul.url)||""})).filter(ul=>ul.url||ul.name),we.length>0&&(sa=we[0].url||"",Ba=String(we[0].name).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf"))):(sa=na,Ba=String(na).toLowerCase().endsWith(".pdf"))}catch{sa=na,Ba=String(na).toLowerCase().endsWith(".pdf")}const nl={ts:Date.now(),versionId:String(Date.now())+"_"+String(wa),label:new Date().toLocaleString(),certType:Oa.证书类型||"",certNo:Oa.证书编号||"",fileType:Ba?"pdf":"image",sourceUrl:Ba?sa:"",images:we};Ma(Re,Ca,nl)}}}catch(be){console.error("向校检记录表插入OCR识别结果失败:",be),qa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Er=d=>{const h=Array.isArray(d)?d:ql.value||[];if(h.length===0){Pr();return}if(h.find(C=>(C==null?void 0:C.__decision)==="replace"&&!(C!=null&&C.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}h.forEach(C=>{var ne;const re=C==null?void 0:C.__decision;if(!(!re||re==="skip")){if(re==="add"){Ma(c==null?void 0:c.index,(ne=C==null?void 0:C.ocrRow)==null?void 0:ne.id,C==null?void 0:C.versionItem),dr.value=[...dr.value||[],C.ocrRow];return}if(re==="replace"){const K=C==null?void 0:C.selectedTargetId,be=(Ne.value||[]).find(Ae=>String(Ae==null?void 0:Ae.id)===String(K));if(!be)return;jr(C,be)}}}),(Ql.value||[]).length>0&&(Ne.value=[...Ne.value||[]]),(dr.value||[]).length>0&&(Ne.value=[...Ne.value||[],...dr.value||[]],We.value=[...We.value||[],...dr.value||[]],(dr.value||[]).forEach(C=>{var re,ne;return(ne=(re=Aa.value)==null?void 0:re.set)==null?void 0:ne.call(re,C.id,C)})),ln.value=Ne.value;const z=Ql.value||[],F=dr.value||[];if(z.length>0&&(Te("change",{buttonName:"编辑",singleContent:z,content:Ne.value,relatedContents:c==null?void 0:c.related,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,columns:R.value,name:c==null?void 0:c.compName}),Ir(z)),F.length>0){const C=Ol.value;Te("change",{buttonName:"OCR批量新增",content:Ne.value,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,column:R.value,ocrRows:F,relatedContents:c==null?void 0:c.related,uploadedFiles:(Array.isArray(C==null?void 0:C.result)?C.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(ne=>({url:(ne==null?void 0:ne.url)||"",name:(ne==null?void 0:ne.name)||"",fileName:(ne==null?void 0:ne.name)||""})).filter(ne=>ne.url)),ocrResult:C,matchedCount:(z||[]).length,newCount:(F||[]).length})}qa.ElMessage.success("已提交候选处理结果"),Pr()},Cr=fc(),mn=e.computed(()=>Cr.getConfig()),Nr=e.ref(),cr=e.ref(),yn=sc(A.pinia),ln=e.ref(),rn=e.ref(0),Sn=A.useUnit(A.pinia),{selectIndex:Nn,selectMenu:pn,selectTitle:lr}=A.storeToRefs(Sn),{selectString:Ml}=A.storeToRefs(yn),zr=A.useLoginState(A.pinia),{loginUserInfo:cl}=A.storeToRefs(zr),sr=e.ref(720),Rl=e.ref(!1),_r=e.ref(!1),Kl=e.ref([]),fr=e.ref(),Lr=e.ref(!0),gn=e.ref(!0);e.ref([]);const Bn=e.inject("contentRef");e.provide("contentRef",Bn),e.provide("getSuggestListForCell",_u),e.provide("getSuggestLoadingForCell",(d,h)=>{const N=`${d==null?void 0:d.id}:${(h==null?void 0:h.prop)||(h==null?void 0:h.property)}`;return k.value.get(N)||!1}),e.watch(()=>{var d;return(d=Ne.value)==null?void 0:d.length},d=>{ye.total=d}),e.watch(()=>Z.value,async()=>{var h,N,z,F,C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye;if(((h=Z.value)==null?void 0:h.length)===0||!((N=c==null?void 0:c.itemData)!=null&&N.find(Qa=>(Qa==null?void 0:Qa.key)==="columnPath"))||!((z=c==null?void 0:c.itemData)!=null&&z.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn")))return;let d=(be=(K=(ne=(re=(C=(F=c==null?void 0:c.itemData)==null?void 0:F.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn"))==null?void 0:C.contents)==null?void 0:re.split("["))==null?void 0:ne[1])==null?void 0:K.split("]"))==null?void 0:be[0];((Ge=($e=(He=(Ae=c==null?void 0:c.itemData)==null?void 0:Ae.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn"))==null?void 0:He.contents)==null?void 0:$e.split("["))==null?void 0:Ge[0])+((Oa=(wa=Z.value)==null?void 0:wa.find(Qa=>(Qa==null?void 0:Qa.key)===d))==null?void 0:Oa.value),(Ye=(za=c==null?void 0:c.itemData)==null?void 0:za.find(Qa=>(Qa==null?void 0:Qa.key)==="pageGroup"))==null||Ye.contents,Rt(compData,c.allMapContents)},{deep:!0});const bn=d=>{var N,z,F,C,re;const h=(z=(N=R.value)==null?void 0:N.filter(ne=>ne==null?void 0:ne.mainKey))==null?void 0:z.map(ne=>ne==null?void 0:ne.prop);if(h.length===0){const ne=(F=R.value)==null?void 0:F.map(K=>K==null?void 0:K.prop);return(C=ne==null?void 0:ne.map(K=>d==null?void 0:d[K]))==null?void 0:C.join("|")}return(re=h==null?void 0:h.map(ne=>d==null?void 0:d[ne]))==null?void 0:re.join("|")},qn=d=>{var ne,K,be,Ae,He;const h=(K=(ne=R.value)==null?void 0:ne.filter($e=>$e==null?void 0:$e.required))==null?void 0:K.map($e=>$e==null?void 0:$e.prop),N=[];if(d==null||d.forEach($e=>{h==null||h.forEach(Ge=>{const wa=$e[Ge];(wa==null||wa==="")&&(N.includes(Ge)||N.push(Ge))})}),N.length>0)return qa.ElMessage.warning(`请填写必填项:${N.join("、")}`);const z=new Map,F=new Map;(be=Ne.value)==null||be.forEach($e=>{const Ge=bn($e);z.set(Ge,$e)}),d==null||d.forEach($e=>{const Ge=bn($e);F.set(Ge,$e)});const C=d==null?void 0:d.filter($e=>z.has(bn($e))),re=(Ae=Ne.value)==null?void 0:Ae.filter($e=>F.has(bn($e)));return(C==null?void 0:C.length)>0&&(u.columns=(He=R.value)==null?void 0:He.filter($e=>($e==null?void 0:$e.label)!=="操作"),u.existRows=re,u.tableData=C,u.show=!0),u.newRows=d==null?void 0:d.filter($e=>{const Ge=bn($e);return!z.has(Ge)}),u.newRows},Ln=e.ref(""),kn=e.ref(null),Tn=async()=>{var d,h,N,z,F,C;try{const re=await A.quoteApi({related:[{menus:Ee.value,groups:c==null?void 0:c.compName}],platId:parseInt((d=cl.value)==null?void 0:d.plat_id)});if(((h=re==null?void 0:re.data)==null?void 0:h.code)===200){kn.value=(N=re==null?void 0:re.data)==null?void 0:N.result;const ne=(z=R.value)==null?void 0:z.map(Ae=>(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.label)),K=$n(ne,(F=re==null?void 0:re.data)==null?void 0:F.result),be=K==null?void 0:K.flatMap(Ae=>Ae==null?void 0:Ae.quote);(be==null?void 0:be.length)>0&&(Ln.value=(C=be==null?void 0:be.map(Ae=>Ae==null?void 0:Ae.menus))==null?void 0:C.join("、"))}}catch(re){throw new Error(re)}};function $n(d,h){var N;return(N=h.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(F=>F.words&&Array.isArray(F.words)?F.words.some(C=>d.includes(C)):!1):!1))==null?void 0:N.map(z=>{const F={...z};return F.struct&&Array.isArray(F.struct)&&(F.struct=F.struct.filter(C=>C.words&&Array.isArray(C.words)?C.words.some(re=>d.includes(re)):!1)),F})}const Qr=async(d,h)=>{var N,z;try{kn.value||await Tn();const F=h==null?void 0:h.map(re=>{const ne=Object.keys(re),K={};return ne.forEach((be,Ae)=>{K[d[Ae]]=re[be]}),K}),C=qn(F);if(!C||(C==null?void 0:C.length)===0)return;u.show||await x(C)}catch(F){throw qa.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((N=cl==null?void 0:cl.value)==null?void 0:N.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(F),is_delete:!1,request_table:(z=c==null?void 0:c.related)==null?void 0:z.find(C=>C==null?void 0:C.includes("content")),request_type:"error"}]}]}),new Error(F)}},An=async d=>{var C,re,ne,K,be,Ae,He;let h=ee.value;h!=null&&h.find($e=>(d==null?void 0:d.key)===($e==null?void 0:$e.key))&&(h=h==null?void 0:h.filter($e=>(d==null?void 0:d.key)!==($e==null?void 0:$e.key))),h.push({key:d==null?void 0:d.key,value:[(re=d==null?void 0:d.value)==null?void 0:re[((C=d==null?void 0:d.value)==null?void 0:C.length)-1]]});let N=Ha.value;N=N==null?void 0:N.map($e=>{var Ge,wa;return($e==null?void 0:$e.type)==="Select"&&(d==null?void 0:d.key)===($e==null?void 0:$e.prop)&&Array.isArray($e.value)&&(Ge=$e.value)!=null&&Ge.every(Oa=>typeof Oa=="string")&&($e.selectValue=(wa=h==null?void 0:h.find(Oa=>(Oa==null?void 0:Oa.key)===($e==null?void 0:$e.prop)))==null?void 0:wa.value),$e});let z=(K=(ne=N==null?void 0:N.find($e=>($e==null?void 0:$e.prop)===(d==null?void 0:d.key)))==null?void 0:ne.optionUrl)==null?void 0:K.menuId,F=N==null?void 0:N.find($e=>($e==null?void 0:$e.prop)===(d==null?void 0:d.key));if(z){let $e=await yt(F==null?void 0:F.optionUrl,z),Ge,wa=Y.value,Oa=(He=(Ae=(be=Ha.value)==null?void 0:be.find(za=>{var Ye;return(Ye=F==null?void 0:F.optionUrl)==null?void 0:Ye.menuId}))==null?void 0:Ae.selectValue)==null?void 0:He[0];if($e==null||$e.forEach(za=>{var Ye,Qa,ba,el,ke,$a,va,Ca,_a,T;if(z){let X=(Qa=(Ye=Ha.value)==null?void 0:Ye.find(na=>{var we,sa;return((we=F==null?void 0:F.optionUrl)==null?void 0:we.menuId)===((sa=na==null?void 0:na.optionUrl)==null?void 0:sa.menuId)}))==null?void 0:Qa.prop,Re=(el=(ba=N==null?void 0:N.find(na=>(na==null?void 0:na.prop)===X))==null?void 0:ba.selectValue)==null?void 0:el[0];X!=null&&X.includes("·")&&(X=(ke=X==null?void 0:X.split("·"))==null?void 0:ke[0],Re=(_a=(Ca=(va=d==null?void 0:d.value)==null?void 0:va[(($a=d==null?void 0:d.value)==null?void 0:$a.length)-1])==null?void 0:Ca.split(" "))==null?void 0:_a[0]),wa!=null&&wa.find(na=>(na==null?void 0:na.value)===Oa)?Ge=(T=wa==null?void 0:wa.find(na=>(na==null?void 0:na.value)===Oa))==null?void 0:T.objectValue:za[X]===Re&&(Ge=za)}}),Ge){let za=N;za=za==null?void 0:za.map(Ye=>{var Qa,ba,el,ke,$a,va;return z&&(Ge!=null&&Ge[Ye==null?void 0:Ye.prop])&&U.value==="新增"&&(Ye==null?void 0:Ye.prop)!==(F==null?void 0:F.prop)?Ye.value=(Ge==null?void 0:Ge[Ye==null?void 0:Ye.prop])||(Ge==null?void 0:Ge[(ke=(el=(ba=(Qa=Ye==null?void 0:Ye.optionUrl)==null?void 0:Qa.groupSelect)==null?void 0:ba[1])==null?void 0:el.replaceAll("[",""))==null?void 0:ke.replaceAll("]","")]):Ye.value=(va=($a=Ha.value)==null?void 0:$a.find(Ca=>(Ca==null?void 0:Ca.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:va.value,Ye}),Ha.value=za}}ee.value=h},Wn=async(d,h)=>{var N,z,F,C,re;if((N=d==null?void 0:d.toString())!=null&&N.includes(".txt")||(z=d==null?void 0:d.toString())!=null&&z.includes(".cpt")||(F=d==null?void 0:d.toString())!=null&&F.includes(".cyd")){const ne=await qa.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),K=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});let be=URL.createObjectURL(K);ta.value=[{name:(re=d==null?void 0:d.split("/"))==null?void 0:re[((C=d==null?void 0:d.split("/"))==null?void 0:C.length)-1],blobUrl:be}],ae.value=!0}else Array.isArray(h)&&(h==null?void 0:h.length)>0&&Te("routeUrl",{isEdit:!1,routerUrl:h})};e.onBeforeUnmount(()=>{gn.value=!1;let d=rn.value;rn.value=d+1});const $r=e.reactive({prop:"",order:null}),Kn=e.computed(()=>{const d=(Ne.value??[]).slice(),h=$r.prop||ue.prop,N=$r.order||ue.order;if(!h||!N)return d;const z=N==="ascending",F=re=>{if(h)return re&&Object.prototype.hasOwnProperty.call(re,h)?re[h]:h.includes(".")?h.split(".").reduce((ne,K)=>ne==null?ne:ne[K],re):re==null?void 0:re[h]},C=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const ne=String(re).trim();if(ne==="")return{ok:!1,value:NaN};const K=ne.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(K))return{ok:!1,value:NaN};const be=Number(K);return{ok:Number.isFinite(be),value:be}};return d.sort((re,ne)=>{const K=F(re),be=F(ne);if(K==null&&be==null)return 0;if(K==null)return z?-1:1;if(be==null)return z?1:-1;const Ae=C(K),He=C(be);if(Ae.ok&&He.ok)return z?Ae.value-He.value:He.value-Ae.value;const $e=ke=>{if(ke==null)return{ok:!1,value:NaN};const $a=String(ke).trim();if($a==="")return{ok:!1,value:NaN};const va=$a.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!va)return{ok:!1,value:NaN};const Ca=va[1]?-1:1,_a=Number(va[2]),T=Number(va[3]),X=Number(va[4]);return[_a,T,X].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:T>=60||X>=60?{ok:!1,value:NaN}:{ok:!0,value:Ca*(_a*3600+T*60+X)}},Ge=$e(K),wa=$e(be);if(Ge.ok&&wa.ok)return z?Ge.value-wa.value:wa.value-Ge.value;const Oa=new Date(K).getTime(),za=new Date(be).getTime(),Ye=!Number.isNaN(Oa),Qa=!Number.isNaN(za);if(Ye&&Qa)return z?Oa-za:za-Oa;const ba=String(K),el=String(be);return z?ba.localeCompare(el):el.localeCompare(ba)})}),fn=e.computed(()=>{var N;const d=(ye.currentPage-1)*ye.pageSize,h=d+ye.pageSize;return Te("getSliceContLength",ye),(N=Kn.value)==null?void 0:N.slice(d,h)}),Bi=d=>{ye.currentPage=d,Te("getSliceContLength",ye)},Lo=d=>{var z;ye.pageSize=d;const h=((z=Ne.value)==null?void 0:z.length)??0,N=d>0?Math.ceil(h/d):1;ye.currentPage>N&&(ye.currentPage=N||1,qa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Te("getSliceContLength",ye)},$o=({prop:d,order:h})=>{$r.prop=d,$r.order=h,ye.currentPage=1};function En(d){const h=[];function N(z,F=""){z.forEach(C=>{C.children&&C.children.length>0?N(C.children,C.prop):h.push(C.prop)})}return N(d),h}const Ro=(d,h)=>{var ne,K,be,Ae;let N=(K=(ne=R.value)==null?void 0:ne.map(He=>He==null?void 0:He.prop))==null?void 0:K.filter(He=>He!=="operate");((be=R.value)==null?void 0:be.some(He=>{var $e;return(($e=He==null?void 0:He.children)==null?void 0:$e.length)>0}))&&(N=En((Ae=R.value)==null?void 0:Ae.filter(He=>(He==null?void 0:He.prop)!=="operate")));let F;if(F=(d==null?void 0:d.length)===(N==null?void 0:N.length)?d:d.slice(0,N==null?void 0:N.length),!(F==null?void 0:F.every(He=>N==null?void 0:N.find($e=>He===$e))))return qa.ElMessage.error("导入的数据表头不匹配");Qr(F,h)},Vo=(d,h)=>{var F;const N=d==null?void 0:d.filter(C=>C!=="序号"),z=h==null?void 0:h.map(C=>{const re=Object.entries(C);return re.shift(),Object.fromEntries(re)});oa.setRefreshCurStructure(!1),((F=R.value)==null?void 0:F.length)===0||Ro(N,z)},Fo=(d,h,N,z)=>{const F=[],C=[],re=be=>Object.keys(be).length;for(const be in d)if(d[be]!==void 0){const Ae=d[be],He=[];for(const[$e,Ge]of Object.entries(Ae))He.push(Ge),C.length<re(Ae)&&C.push($e);F.push(He)}F.unshift(C);const ne=he.utils.aoa_to_sheet(F),K=he.utils.book_new();he.utils.book_append_sheet(K,ne,z),he.writeFileSync(K,`${h}.xlsx`),Kl.value=[]},Ti=async(d,h,N,z=!1,F)=>{try{oa.setRefreshCurStructure(!1)}catch(C){qa.ElMessage.error(C)}},Gi=async(d,h)=>{await Ti()},Hr=async(d,h)=>{await Ti("columnType",h,d,!1)},Po=async({newRow:d,targetIndex:h})=>{var F;if(!pa(c.config,{type:te.TABLE}))return;const z=(ye.currentPage-1)*ye.pageSize+(h??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Zn(z,Ne.value||[]))}catch{}Ne.value.splice(z,0,d),await e.nextTick(),v.value.has(d.id)||v.value.set(d.id,A.cloneDeep(d)),Ne.value=(F=Ne.value)==null?void 0:F.map(C=>({...C,tableEditType:(C==null?void 0:C.id)===d.id?"edit":(C==null?void 0:C.tableEditType)??"text"})),s.value.add(d.id),Rl.value=!0},jo=(d,h,N,z=[])=>(!Array.isArray(h)||h.length===0||h.forEach(F=>{const C=F==null?void 0:F.prop;if(!C)return;let re=d==null?void 0:d[C];if(re==null||String(re).trim()==="")return;re=String(re);const ne=new Set([...(Array.isArray(N)?N:[]).filter(Ae=>(Ae==null?void 0:Ae.id)!==(d==null?void 0:d.id)).map(Ae=>Ae==null?void 0:Ae[C]).filter(Ae=>Ae!=null).map(Ae=>String(Ae)),...(Array.isArray(z)?z:[]).map(Ae=>Ae==null?void 0:Ae[C]).filter(Ae=>Ae!=null).map(Ae=>String(Ae))]);if(!ne.has(re))return;let K=1,be="";for(;be=`${re}(${K})`,!!ne.has(be);)K++;d[C]=be}),d),Ai=async()=>{var F,C,re,ne,K,be,Ae,He;const d=Array.from(s.value||[]);if(d.length===0)return;const h=(C=he.getColumnChild((F=A.cloneDeep(R.value))==null?void 0:F.filter($e=>($e==null?void 0:$e.label)!=="操作")))==null?void 0:C.filter($e=>($e==null?void 0:$e.required)===!0);if((h==null?void 0:h.length)>0)for(let $e=0;$e<d.length;$e++){const Ge=d[$e],wa=(re=Ne.value)==null?void 0:re.find(Oa=>(Oa==null?void 0:Oa.id)===Ge);if(wa)for(let Oa=0;Oa<h.length;Oa++){const za=h[Oa],Ye=za==null?void 0:za.prop,Qa=(za==null?void 0:za.label)??Ye,ba=wa==null?void 0:wa[Ye];if(ba===""||ba===null||ba===void 0||Array.isArray(ba)&&ba.length===0){qa.ElMessage.error(`${Qa}不能为空`);return}}}const N=[],z=[];if(d.forEach($e=>{var Qa;const Ge=(Qa=Ne.value)==null?void 0:Qa.find(ba=>(ba==null?void 0:ba.id)===$e);if(!Ge)return;if(Ge!=null&&Ge._isTemp){const el=(he.getAllLeafNodes(R.value)||[]).filter(T=>(T==null?void 0:T.mainKey)===!0||(T==null?void 0:T.isMainKey)===!0),ke=Ne.value.findIndex(T=>(T==null?void 0:T.id)===$e),$a=ke>=0?ke+1:Ne.value.length+1;jo(Ge,el,Ne.value,N);const va={id:$a.toString()};(Ge==null?void 0:Ge.sort)!==void 0&&(Ge==null?void 0:Ge.sort)!==null&&String(Ge.sort).trim()!==""?va.sort=String(Ge.sort):va.sort=Zn(ke>=0?ke:Ne.value.length-1,Ne.value||[]),(he.getAllLeafNodes(R.value)||[]).filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate").forEach(T=>{const X=T==null?void 0:T.prop;if(X){const Re=Ge[X];Re!==void 0?va[X]=Re??"":va[X]=""}}),N.push(va);return}const Oa=(he.getAllLeafNodes(R.value)||[]).filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),za=new Set(Oa.map(ba=>ba==null?void 0:ba.prop).filter(Boolean)),Ye={};for(const ba of za)Object.prototype.hasOwnProperty.call(Ge,ba)&&(Ye[ba]=Ge[ba]);z.push({id:Ge.id,value:{tableData:Ye}})}),oa.setTableLoading(c==null?void 0:c.index),z.length>0){const $e=z.map(wa=>{const Oa={id:wa.id,...wa.value.tableData};return delete Oa._isOCRRow,delete Oa._ocrTableId,delete Oa._isTemp,delete Oa.tableEditType,delete Oa.index,Oa}),Ge=[{tableName:((ne=c==null?void 0:c.related)==null?void 0:ne.find(wa=>wa==null?void 0:wa.includes("content")))??"content_"+(c==null?void 0:c.index),tableContents:$e}];try{await A.pageBatchUpdateApi({platId:parseInt((K=cl.value)==null?void 0:K.plat_id),changeContents:Ge})}catch(wa){qa.ElMessage.error(((Ae=(be=wa==null?void 0:wa.response)==null?void 0:be.data)==null?void 0:Ae.message)||(wa==null?void 0:wa.message)||"保存失败"),oa.setTableLoading(!1);return}}if(N.length>0){const $e={fixContent:N,buttonName:"新增",relatedContents:c==null?void 0:c.related,name:c==null?void 0:c.compName,columns:R.value};Te("change",$e)}qa.ElMessage.success("保存成功"),s.value.clear(),v.value.clear(),Ne.value=(He=Ne.value)==null?void 0:He.map($e=>({...$e,tableEditType:"text"})),Rl.value=!1,oa.setRefreshCurStructure(!0)},Ho=()=>{var h;const d=Array.from(s.value||[]);if(d.length===0){Rl.value=!1;return}d.forEach(N=>{var C,re;const z=v.value.get(N),F=(C=Ne.value)==null?void 0:C.find(ne=>(ne==null?void 0:ne.id)===N);if(F!=null&&F._isTemp){Ne.value=Ne.value.filter(ne=>(ne==null?void 0:ne.id)!==F.id);return}if(z){const ne=(re=Ne.value)==null?void 0:re.findIndex(K=>(K==null?void 0:K.id)===N);ne!==-1&&(Ne.value[ne]={...Ne.value[ne],...z})}}),s.value.clear(),v.value.clear(),Ne.value=(h=Ne.value)==null?void 0:h.map(N=>({...N,tableEditType:"text"})),Rl.value=!1},zi=e.ref(!1),Yi=async d=>{var F,C,re,ne;if(!Rl.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const h=d==null?void 0:d.target;if(((C=(F=h==null?void 0:h.tagName)==null?void 0:F.toLowerCase)==null?void 0:C.call(F))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(h)||((re=h==null?void 0:h.blur)==null||re.call(h),(ne=d.preventDefault)==null||ne.call(d),await e.nextTick(),await Ji())},Ji=async()=>{if(H.value){Rl.value=!1;return}if(!zi.value){zi.value=!0;try{Array.from(s.value||[]).length>0?await Ai():Rl.value=!1}finally{Promise.resolve().then(()=>{zi.value=!1})}}},Uo=d=>{Kl.value=d},Xi=(d,h)=>{fr.value===h?Lr.value=!1:Lr.value=!0,fr.value=h==null?void 0:h.changeProp},si=d=>{if(!d)return;const{item:h,value:N}=d,z=Ha.value.find(F=>F.prop==h.prop);z&&z.contents.push({label:N,value:N})},nn=e.computed(()=>{var N,z,F;const d=(N=R.value)==null?void 0:N.some(C=>C==null?void 0:C.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(F=(z=R.value)==null?void 0:z.filter(C=>(C==null?void 0:C.label)!=="操作"))==null?void 0:F.map(C=>({...C,filterable:!!(C!=null&&C.filterable),showSummary:!!(C!=null&&C.showSummary),operable:!!(C!=null&&C.operable),fixed:C==null?void 0:C.fixed}))}),Gn=async(d,h,N)=>{const z=A.cloneDeep(R.value);await e.nextTick();const F=z==null?void 0:z.map(re=>(N==null?void 0:N.label)===(re==null?void 0:re.label)?{...re,[h]:d}:re),C=Mi(F);await fs(c.index,C),R.value=F,se.value=C},Mi=d=>{var F;const h=d||[];return((F=he.getAllLeafNodes(h)||[])==null?void 0:F.filter(C=>(C==null?void 0:C.prop)&&(C==null?void 0:C.type)!=="operate"&&(C==null?void 0:C.label)!=="操作"&&(C==null?void 0:C.prop)!=="operate")).map(C=>{const{prop:re}=C;return r0(re,C)})},Zi=async d=>{let h=await i0(c.index);h||(h=Mi(d)),se.value=h},Qi=async(d,h)=>{const N=A.cloneDeep(R.value),z=re=>Array.isArray(re)?re.map(ne=>{const K=Array.isArray(ne==null?void 0:ne.children)&&ne.children.length>0,be={...ne};return(be==null?void 0:be.prop)==="operate"||(be==null?void 0:be.label)==="操作"||(be==null?void 0:be.type)==="operate"?(be.sortable=!1,be.filterable=!1,be.operable=!1):be.sortable=K?!1:!!d,K&&(be.children=z(be.children)),be}):re,F=z(N),C=Mi(F);await fs(c.index,C),R.value=F,se.value=C,await e.nextTick(),rn.value=rn.value+1},eo=()=>{q.value=!1},Yn=d=>{Te("clickTrigger",d)},ao=async d=>{var C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba;const h=d==null?void 0:d.row,N=d==null?void 0:d.rowData,z=d==null?void 0:d.suffix;if((C=h==null?void 0:h.toString())!=null&&C.includes(".urdf")||d!=null&&d.isUrdf||z!=null&&z.includes(".urdf")){if(h.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(ce(h)){const ke={files:[Fe(h)],data:{}};Le(ke);return}Sa.value=[{url:h,extension:Se(h)}],ve.value=!0,B.value={data:A.cloneDeep(N)},Pe.value=!0;return}let F=[];if((re=h==null?void 0:h.toString())!=null&&re.includes(".stl")||(ne=h==null?void 0:h.toString())!=null&&ne.includes(".STL")||(K=h==null?void 0:h.toString())!=null&&K.includes(".obj")||(be=h==null?void 0:h.toString())!=null&&be.includes(".mtl")){const el=(Ae=h==null?void 0:h.toString())==null?void 0:Ae.split(","),ke=aa(el),$a=ke==null?void 0:ke[0];if(ce($a==null?void 0:$a.extension)){Le({files:ke,data:{}});return}Sa.value=ke,ve.value=!1,Pe.value=!0;return}if((He=h==null?void 0:h.toString())!=null&&He.includes(".stl")||($e=h==null?void 0:h.toString())!=null&&$e.includes(".STL")||(Ge=h==null?void 0:h.toString())!=null&&Ge.includes(".obj")||(wa=h==null?void 0:h.toString())!=null&&wa.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let el,ke=[],$a={};if(Array.isArray(h)?el=h:el=h==null?void 0:h.split(","),el==null||el.forEach(va=>{va.includes(".mtl")?ke.push(va):$a.blob=$a.blob?$a.blob+","+va:va}),(ke==null?void 0:ke.length)>0&&($a.mtlBlobs=ke),z&&($a.suffix=z),(za=(Oa=Object.values($a))==null?void 0:Oa[0])!=null&&za.includes("http:"))F.push($a);else{const va=new Blob([$a.blob],{type:"application/octet-stream;charset=UTF-8"});let Ca=URL.createObjectURL(va),_a="";(Ye=h==null?void 0:h.split("/"))==null||Ye.forEach((T,X)=>{var Re;X===((Re=h==null?void 0:h.split("/"))==null?void 0:Re.length)-1&&(_a=T)}),(Qa=$a.blob)!=null&&Qa.includes(".stl")&&(_a=(_a==null?void 0:_a.replaceAll(">",""))+".urdf"),ta.value=[{name:_a,blobUrl:Ca}],ae.value=!0}}else{const el=await qa.axios.get(h,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ke=new Blob([el.data],{type:"application/octet-stream;charset=UTF-8"});let $a=URL.createObjectURL(ke),va="";if((ba=h==null?void 0:h.split("/"))==null||ba.forEach((Ca,_a)=>{var T;_a===((T=h==null?void 0:h.split("/"))==null?void 0:T.length)-1&&(va=Ca)}),ce(va)){const Ca=W(va),_a=Fe(h);Le({files:[_a],data:{trackFileType:Ca}});return}ta.value=[{name:va,blobUrl:$a}],ae.value=!0}(F==null?void 0:F.length)>0&&n.setBlobUrls(F)},Jn=d=>{var z,F,C,re;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const h=(re=(z=d==null?void 0:d.url)==null?void 0:z.split("."))==null?void 0:re[((C=(F=d==null?void 0:d.url)==null?void 0:F.split("."))==null?void 0:C.length)-1];return(d==null?void 0:d.name)+"."+h},lo=d=>{if(!d)return"未知文件";try{const z=Jn(d);if(typeof z=="string"&&z.includes("."))return z}catch{}const h=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",N=(d==null?void 0:d.suffix)||"";return h.includes(".")?h:`${h}${N}`},ro=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const h=d.match(/^(\d+)\_(\d+)$/);if(!h)return d;const N=Number(h[1]),z=Number(h[2]);return!Number.isFinite(N)||!Number.isFinite(z)?d:String(N*1e3+z)},Xn=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;const N=Number(h);return Number.isFinite(N)?N:null},qo=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;if(/^\d+$/.test(h)){const F=Number(h);return Number.isFinite(F)?h.length<=10?F*1e3:F:null}const N=h.includes("T")?h:h.replace(" ","T"),z=Date.parse(N);return Number.isFinite(z)?z:null},ci=(d,h=[])=>{const N=Array.isArray(d)?d.slice():[];if(N.length<=1)return N;const z=new Map((h||[]).map((re,ne)=>[String(re),ne])),F=N.some(re=>Xn(re==null?void 0:re.sort)!==null),C=N.map((re,ne)=>({r:re,idx:ne,id:String((re==null?void 0:re.id)??""),sortVal:Xn(re==null?void 0:re.sort),createTimeMs:qo(re==null?void 0:re.create_time),prevIdx:z.has(String(re==null?void 0:re.id))?z.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return C.sort((re,ne)=>{if(F){const Ae=re.sortVal,He=ne.sortVal;if(Ae===null&&He!==null)return 1;if(Ae!==null&&He===null)return-1;if(Ae!==null&&He!==null&&Ae!==He)return Ae-He}const K=re.createTimeMs,be=ne.createTimeMs;return K!==null&&be!==null&&K!==be?be-K:K!==null&&be===null?-1:K===null&&be!==null?1:re.prevIdx!==ne.prevIdx?re.prevIdx-ne.prevIdx:re.idx-ne.idx}),C.map(re=>re.r)},Zn=(d,h=[])=>{const N=h==null?void 0:h[d-1],z=h==null?void 0:h[d],F=Xn(N==null?void 0:N.sort),C=Xn(z==null?void 0:z.sort);let re=null;F!==null&&C!==null&&C>F?re=(F+C)/2:F!==null?re=F+1:C!==null?re=Math.max(C-1,0):re=(d??0)+1;const ne=Number(re.toFixed(6));return String(Number.isFinite(ne)?ne:re)},ui=async d=>{let h=null,N=null;if(d!=null&&d.id){const F=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const C=await A.platformDownloadFile(d);h=URL.createObjectURL(C.data),N=lo(d)}finally{F.close()}}else if(d!=null&&d.downloadUrl){const F=await di(),C=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await qa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:F,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{C.close()}),ne=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ne),N=d==null?void 0:d.name}else{const F=await A.platformDownloadFile({url:d==null?void 0:d.url});!d.url.toUpperCase().includes(".OBJ")&&!d.url.toUpperCase().includes(".STL")&&!d.url.toUpperCase().includes(".MTL")&&!d.url.toUpperCase().includes(".URDF")?(h=URL.createObjectURL(F.data),N=Jn(d)):h=d==null?void 0:d.url}if(ce(h)){const F={row:`${h}`,suffix:Se(N)};ao(F);return}const z={name:N,blobUrl:h};ta.value=[z],ae.value=!0},Wo=async d=>{let h=null,N=null;if(d!=null&&d.id){const C=await A.platformDownloadFile(d);h=URL.createObjectURL(C.data),N=lo(d)}else if(d!=null&&d.downloadUrl){const C=await di(),re=await qa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:C,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ne=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ne),N=d==null?void 0:d.name}else{const C=await A.platformDownloadFile({url:d==null?void 0:d.url});h=URL.createObjectURL(C.data),N=Jn(d)}const z={name:N,blobUrl:h},F=document.createElement("a");F.href=z.blobUrl,F.download=z.name,F.style.display="none",document.body.appendChild(F),F.click(),setTimeout(()=>{document.body.removeChild(F)},100)},Ii=(d,h)=>{var z;if(Object.values(h).length===0)return;let N=d;return Object.values(h).find(F=>{var C,re,ne;return((C=F==null?void 0:F.toString())==null?void 0:C.includes(".txt"))||((re=F==null?void 0:F.toString())==null?void 0:re.includes(".cpt"))||((ne=F==null?void 0:F.toString())==null?void 0:ne.includes(".obj"))})?N=[...d,_e.value]:(z=c==null?void 0:c.config)!=null&&z.allowMove&&(N=[...d,{label:"迁移"}]),N},Ko=()=>{M.value=!0},Go=e.ref([]),no=async(d,h,N=!1)=>{var re,ne,K,be;if(!d)return;if(N){Ne.value=[...Aa.value.values()].filter(Ae=>Object.values(Ae).some(He=>typeof He=="string"?He==null?void 0:He.toLowerCase().includes(h==null?void 0:h.toLowerCase()):!1));return}let z={};for(let Ae in d)(d==null?void 0:d[Ae])!==""&&(z[Ae]=d==null?void 0:d[Ae]);if(JSON.stringify(z)==="{}"){Ne.value=Array.from(((re=Aa.value)==null?void 0:re.values())??[]);return}let F=(ne=c==null?void 0:c.related)==null?void 0:ne.find(Ae=>Ae==null?void 0:Ae.includes("content_")),C=await A.getFillFind({platId:parseInt((K=cl==null?void 0:cl.value)==null?void 0:K.plat_id),tableName:F,params:z});C=(be=C==null?void 0:C.data)==null?void 0:be.result,Ne.value=C,oa.setTableLoading(!1)},Qn=async d=>{var N,z;if(!pa(c.config,{type:te.TABLE})||!d)return;((N=Array.from(s.value))==null?void 0:N.length)>0&&await Ai();const h=d==null?void 0:d.id;h!=null&&(s.value.clear(),v.value.clear(),v.value.has(h)||v.value.set(h,A.cloneDeep(d)),Ne.value=(z=Ne.value)==null?void 0:z.map(F=>({...F,tableEditType:(F==null?void 0:F.id)===h?"edit":"text"})),s.value.add(h),Rl.value=!0)},xn=async(d,h,N,z)=>{z!=null&&z.isExistChild&&Te("clickMainKey",d,N,R.value)},io=()=>{ae.value=!1},Oi=d=>{Te("rowClick",d)};e.watch(()=>c.changedContent,()=>{var N,z;if(!c.changedContent)return;let d=(N=Ne.value)==null?void 0:N.map(F=>{var C;return F.id===((C=c.changedContent)==null?void 0:C.id)&&(F={...c.changedContent,id:c.changedContent.newId?c.changedContent.newId:c.changedContent.id},delete F.newId),F});const h=(z=c.itemData)==null?void 0:z.map(F=>((F==null?void 0:F.key)==="tableContents"&&(F.contents=d),F));Ne.value=d,Te("contentChange",{contents:h,index:c.index}),Te("change",{content:d,index:c==null?void 0:c.index,buttonName:"",id:c==null?void 0:c.index})},{deep:!0,immediate:!0});const Yo=()=>{},Jo=async()=>{const d=Ee.value,h=sessionStorage.getItem("systemKey"),N=await he.getItemData(d,h,""),z=(N==null?void 0:N.find(ne=>(ne==null?void 0:ne.name)==="方法明细"))||(N==null?void 0:N[0]),F=(z==null?void 0:z.compData)||[],C=F==null?void 0:F.find(ne=>{const K=ne==null?void 0:ne.key;return K==="formContent"||K==="tableContents"});return C==null?void 0:C.contents},di=async()=>{const h=qa.Local.get("access-token");return h?`Bearer ${h}`:""},Xo=async(d,{token:h,inputData:N}={})=>await qa.axios.post(d,N,{headers:{Authorization:h}}).catch(F=>(oe.setImportLoading(!1),Promise.reject(F))),Zo=d=>{var z;let h={};const N=[];return h.form={},(z=A.cloneDeep(d))==null||z.forEach((F,C)=>{var re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba;if((F==null?void 0:F.comp)==="Table"){(ne=(re=F==null?void 0:F.compData)==null?void 0:re.find(va=>(va==null?void 0:va.key)==="header"))==null||ne.contents;let el=(Ae=(be=(K=F==null?void 0:F.compData)==null?void 0:K.find(va=>(va==null?void 0:va.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:Ae.map(va=>va.slice(1));(Oa=(wa=(Ge=($e=(He=F==null?void 0:F.compData)==null?void 0:He.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:$e.contents)==null?void 0:Ge[0])==null?void 0:wa[0])==null||Oa.label;let ke=(Ye=(za=F==null?void 0:F.compData)==null?void 0:za.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:Ye.contents,$a=[];el==null||el.forEach(va=>{let Ca=[];va==null||va.forEach((_a,T)=>{var Re;let X={};((Re=ke[T])==null?void 0:Re.label)!=="操作"&&(X[ke[T].label]=_a,Ca.push(X))}),$a.push(Ca)}),h[F.name]=$a}else{const el=(ba=(Qa=F.compData)==null?void 0:Qa.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:ba.contents;el==null||el.forEach(ke=>{var $a,va;if(ke.prop!==""){let Ca=ke==null?void 0:ke.value;Array.isArray(Ca)?Ca=(($a=Ca==null?void 0:Ca[0])==null?void 0:$a.oldUrl)||"http://222.92.178.198:62001/"+((va=Ca==null?void 0:Ca[0])==null?void 0:va.url):Ca=Ca.toString(),ke={key:(ke==null?void 0:ke.prop)??(ke==null?void 0:ke.label),value:Ca},N.push(ke)}})}}),h.form=he.getFormContents(N),h},Qo=d=>{const h=[],N=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(N):h.push(z)};return N(d),h},et=async(d,h,N)=>{var ke,$a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl;oe.setImportLoading(!0),oa.setFreshContent(!1);let z=await Jo().catch(Ua=>(oe.setImportLoading(!1),Promise.reject(Ua)));z=z==null?void 0:z.filter(Ua=>{var hl;return((hl=Ua==null?void 0:Ua.find(Pa=>Pa==null?void 0:Pa.id))==null?void 0:hl.id)===(h==null?void 0:h.id)});let F=he.getEqualChild([(ke=R.value)==null?void 0:ke.filter(Ua=>(Ua==null?void 0:Ua.label)!=="操作")]);const C=(va=($a=he.tableToForm(z,F))==null?void 0:$a[0])==null?void 0:va.find(Ua=>{const hl=Ua==null?void 0:Ua.key;return hl==="Interface"||hl==="方法体"}),re=C==null?void 0:C.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),oe.setImportLoading(!1);return}const ne=R.value?he.getEqualChild([R.value]):[],K=ne.find(Ua=>{const hl=Ua==null?void 0:Ua.prop;return hl==="Input1"||hl==="输入数据.输入1"||hl==="样本输入数据"}),be=K==null?void 0:K.prop;let Ae=h==null?void 0:h[be];const He=await di().catch(Ua=>(oe.setImportLoading(!1),Promise.reject(Ua)));let $e=!0,Ge="";(Ca=R.value)==null||Ca.forEach(Ua=>{(Ua==null?void 0:Ua.prop)===be&&($e=!!(Ua!=null&&Ua.childPath),Ge=Ua==null?void 0:Ua.childPath)});let wa="";if($e){let Ua=(T=(_a=R.value)==null?void 0:_a.find(tl=>(tl==null?void 0:tl.isMainKey)===!0))==null?void 0:T.prop;wa=h==null?void 0:h[Ua];let hl=Ge==null?void 0:Ge.split(g),Pa=[];hl==null||hl.forEach((tl,_l)=>{(hl==null?void 0:hl.length)-1===_l&&Pa.push(wa),Pa.push(tl)}),Pa=Pa==null?void 0:Pa[0];let ol=await he.getItemData(Pa,sessionStorage.getItem("systemKey"),""),Ka=ol==null?void 0:ol.filter(tl=>(tl==null?void 0:tl.name)===be);Ka=Ka==null?void 0:Ka.map(tl=>{var _l;return tl.compData=(_l=tl==null?void 0:tl.compData)==null?void 0:_l.map(Nl=>{var xr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(xr=Nl==null?void 0:Nl.contents)==null?void 0:xr.filter(Ll=>(Ll==null?void 0:Ll[1])===(h==null?void 0:h[be]))),Nl}),tl}),(!Ka||(Ka==null?void 0:Ka.length)===0)&&(Ka=ol,Ka=Ka==null?void 0:Ka.map(tl=>{var _l;return tl.compData=(_l=tl==null?void 0:tl.compData)==null?void 0:_l.map(Nl=>{var xr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(xr=Nl==null?void 0:Nl.contents)==null?void 0:xr.filter(Ll=>{var yl,Al;return(Ll==null?void 0:Ll[1])===(h==null?void 0:h[(Al=(yl=R==null?void 0:R.value)==null?void 0:yl[0])==null?void 0:Al.prop])})),Nl}),tl})),Ae=Zo(Ka)}const Oa=await Xo(re,{token:He,inputData:Ae}).catch(Ua=>(oe.setImportLoading(!1),Promise.reject(Ua))),za=(X=Oa==null?void 0:Oa.data)==null?void 0:X.data,Ye=ne.find(Ua=>(Ua==null?void 0:Ua.prop)==="Output1"),Qa=Ye==null?void 0:Ye.prop;let ba=[],el=[];if(za&&((Re=Object.values(za))==null?void 0:Re.length)>0){let Ua=[];const hl=new FormData,Pa=(na=Qo(za))==null?void 0:na.map(async Ka=>{var tl,_l;if(!Array.isArray(Ka)&&(Ka!=null&&Ka.includes("http"))){let Nl=await qa.axios.get(Ka,{responseType:"blob"}),xr=(_l=Ka==null?void 0:Ka.split("/"))==null?void 0:_l[((tl=Ka==null?void 0:Ka.split("/"))==null?void 0:tl.length)-1];hl.append("files",Nl.data,xr)}else Ua.push(Ka)});if(await Promise.all(Pa),!he.isFormDataEmpty(hl)){let Ka=await A.uploadAmountApi(hl),tl=(sa=(we=Ka==null?void 0:Ka.data)==null?void 0:we.result)==null?void 0:sa.map(_l=>{var Nl,xr,Ll,yl,Al,Jl;return{name:(Jl=(Al=(yl=(Nl=_l==null?void 0:_l.url)==null?void 0:Nl.split("/"))==null?void 0:yl[((Ll=(xr=_l==null?void 0:_l.url)==null?void 0:xr.split("/"))==null?void 0:Ll.length)-1])==null?void 0:Al.split("."))==null?void 0:Jl[0],url:_l==null?void 0:_l.url}});Ua=[...Ua,...tl]}let ol={};for(let Ka in h)Ka!=="id"&&(ol[Ka]=h[Ka]);ol[Qa]=Ua,el.push({id:h==null?void 0:h.id,value:{tableData:ol}})}if((el==null?void 0:el.length)>0){const Ua=el.map(Pa=>{const ol={id:Pa.id,...Pa.value.tableData};return delete ol._isOCRRow,delete ol._ocrTableId,delete ol._isTemp,delete ol.tableEditType,delete ol.index,ol}),hl=[{tableName:(Ba=c==null?void 0:c.related)==null?void 0:Ba.find(Pa=>Pa==null?void 0:Pa.includes("content")),tableContents:Ua}];await A.pageBatchUpdateApi({platId:parseInt((nl=cl.value)==null?void 0:nl.plat_id),changeContents:hl})}if((ba==null?void 0:ba.length)>0)try{await A.pageBatchAddApi({platId:parseInt((Wa=cl.value)==null?void 0:Wa.plat_id),changeContents:[{tableName:(ul=c==null?void 0:c.related)==null?void 0:ul.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:ba.map(Ua=>{var Pa,ol,Ka;const hl={id:((Pa=Ua==null?void 0:Ua.key)==null?void 0:Pa.id)??((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.rowId)??(Ua==null?void 0:Ua.id),...((Ka=Ua==null?void 0:Ua.value)==null?void 0:Ka.tableData)||{}};return delete hl._isOCRRow,delete hl._ocrTableId,delete hl._isTemp,delete hl.tableEditType,delete hl.index,Object.keys(hl).forEach(tl=>{tl==="证书附件"&&Array.isArray(hl[tl])&&(hl[tl]=JSON.stringify(hl[tl]))}),hl})}]})}catch(Ua){qa.ElMessage.error(((Vl=(dl=Ua==null?void 0:Ua.response)==null?void 0:dl.data)==null?void 0:Vl.message)||(Ua==null?void 0:Ua.message)||"保存失败"),oa.setTableLoading(!1);return}Ri(!0),oe.setImportLoading(!1),oa.setFreshContent(!0)},oo=(d,h)=>(d=d==null?void 0:d.map(N=>{var z,F;return N!=null&&N.children&&((z=N.children)!=null&&z.find(C=>C.id===(h==null?void 0:h.id))?N.children=(F=N.children)==null?void 0:F.filter(C=>(C==null?void 0:C.id)!==(h==null?void 0:h.id)):N.children=oo(N.children,h)),N}),d),pi=e.ref(!1),at=()=>{pi.value=!0},o=async d=>{var N,z,F,C;pi.value=!1;const h=Array.isArray(d)?d:d?[d]:[];if(h.length!==0)for(const re of h){const ne={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};xa.value.push(ne),kr(ne,"uploading"),Dl(ne,0);try{const K=new FormData;K.append("file",re,ne.name);const be=await A.platformUploadFile(K);ne.uploadResult=((N=be==null?void 0:be.data)==null?void 0:N.result)||{name:ne.name,url:"",fileName:ne.name},Fl({name:((z=ne.uploadResult)==null?void 0:z.name)||ne.name,url:((F=ne.uploadResult)==null?void 0:F.url)||"",id:(C=ne.uploadResult)==null?void 0:C.id}),kr(ne,"uploaded"),Dl(ne,100)}catch(K){console.error("文件上传失败:",K),qa.ElMessage.error(`文件 ${ne.name} 上传失败,请重试`),kr(ne,"pending"),Dl(ne,0);const be=xa.value.findIndex(Ae=>Ae.uid===ne.uid);be>-1&&xa.value.splice(be,1)}}},i=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:c==null?void 0:c.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(d,h,N)=>{h===(c==null?void 0:c.index)?N(new Error("选择源不能和目标源一致")):N()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),u=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],buttonValue:[{label:"跳过",value:"cancel",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"覆盖",render:"popover",value:"replace",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}],result:""}),y=()=>{u.show=!1},x=async d=>{var h,N,z,F,C,re,ne,K;try{const be=[];let Ae=(h=Ne.value||[])==null?void 0:h.slice();(d||[]).forEach(Oa=>{const za={...Oa};try{za.sort=Zn(0,Ae)}catch{}be.push(za),Ae.unshift(za)});let He=await A.quoteApi({platId:parseInt((N=cl==null?void 0:cl.value)==null?void 0:N.plat_id),type:"fatherSyncs",related:[{menus:Ee.value,groups:""},{menus:Ee.value,groups:c==null?void 0:c.compName}]});He=(z=He==null?void 0:He.data)==null?void 0:z.result;let $e=He==null?void 0:He.map(Oa=>({tableName:"content_"+(Oa==null?void 0:Oa.id),tableContents:be==null?void 0:be.map((za,Ye)=>({id:Ye,...za}))})),Ge=[{tableName:(F=c==null?void 0:c.related)==null?void 0:F.find(Oa=>Oa==null?void 0:Oa.includes("content")),tableContents:be==null?void 0:be.map((Oa,za)=>({id:za,...Oa}))}];Ge=[...Ge,...$e];const wa=await A.pageBatchAddApi({platId:parseInt((C=cl.value)==null?void 0:C.plat_id),changeContents:Ge});if(((re=wa==null?void 0:wa.data)==null?void 0:re.code)===200){const Oa={buttonName:"新增",columns:R.value,fixContent:be==null?void 0:be.map((Ye,Qa)=>({id:Qa,...Ye})),relatedContents:c==null?void 0:c.related};await xt(Oa),qa.ElMessage.success("数据导入成功");let za=[];Ge==null||Ge.forEach(Ye=>{var Qa;(Qa=Ye==null?void 0:Ye.tableContents)==null||Qa.forEach(ba=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ba),request_result:"{}",is_delete:!1,request_table:Ye==null?void 0:Ye.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((ne=cl==null?void 0:cl.value)==null?void 0:ne.plat_id),changeContents:[{tableName:"log",tableContents:za}]})}else{let Oa=[];Ge==null||Ge.forEach(za=>{var Ye;(Ye=za==null?void 0:za.tableContents)==null||Ye.forEach(Qa=>{Oa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Qa),request_result:"{}",is_delete:!1,request_table:za==null?void 0:za.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((K=cl==null?void 0:cl.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:Oa}]}),qa.ElMessage.error("数据导入响应失败")}}catch(be){throw new Error(be)}},O=async d=>{var h,N,z,F,C,re,ne,K,be,Ae;try{if(d==="cancel"&&(u.show=!1),d==="replace"&&((h=u==null?void 0:u.existRows)==null?void 0:h.length)>0){await A.pageBatchDeleteApi({platId:parseInt((N=cl.value)==null?void 0:N.plat_id),changeContents:[{tableName:((z=c==null?void 0:c.related)==null?void 0:z.find($e=>$e==null?void 0:$e.includes("content_")))||((F=c==null?void 0:c.related)==null?void 0:F.find($e=>$e==null?void 0:$e.includes("content"))),tableContents:u==null?void 0:u.existRows}]});const He=await A.pageBatchAddApi({platId:parseInt((C=cl.value)==null?void 0:C.plat_id),changeContents:[{tableName:(re=c==null?void 0:c.related)==null?void 0:re.find($e=>$e==null?void 0:$e.includes("content")),tableContents:(()=>{const $e=(Ne.value||[]).filter(za=>!((u==null?void 0:u.existRows)||[]).some(Ye=>String(Ye==null?void 0:Ye.id)===String(za==null?void 0:za.id))),Ge=(u==null?void 0:u.tableData)||[],wa=[];let Oa=$e.slice();return Ge.forEach(za=>{const Ye={...za};try{Ye.sort=Zn(0,Oa)}catch{}wa.push(Ye),Oa.unshift(Ye)}),wa.map((za,Ye)=>({id:Ye,...za}))})()}]});if(((ne=He==null?void 0:He.data)==null?void 0:ne.code)!==200)return;(K=u.newRows)!=null&&K.length&&await x(u.newRows),await xt({buttonName:"新增",columns:R.value,fixContent:(be=u==null?void 0:u.tableData)==null?void 0:be.map(($e,Ge)=>({id:Ge,...$e})),relatedContents:c==null?void 0:c.related}),(Ae=u.newRows)!=null&&Ae.length||qa.ElMessage.success("数据导入成功")}}catch(He){throw new Error(He)}finally{u.show=!1,u.columns=[],u.tableData=[],u.existRows=[]}},J=()=>{i.show=!1},Q=d=>{var h,N;if((d==null?void 0:d.buttonName)==="取消")return i.show=!1;i.to=d==null?void 0:d.content,!(!(c!=null&&c.index)||!((h=i.to)!=null&&h.groupName))&&(c==null?void 0:c.index)!==((N=i.to)==null?void 0:N.groupName)&&(Te("change",{buttonName:"迁移",value:{from:i.from,to:i.to,data:i.selectRow}}),i.show=!1)},ge=async d=>{var h,N,z,F;if(d){if(!Cr.validateFileSize(d.raw)){qa.ElMessage.warning(`文件大小不能超过 ${mn.value.maxSize}MB`);const C=xa.value.findIndex(re=>re.uid===d.uid);C>-1&&xa.value.splice(C,1),je();return}if(!Cr.validateFileType(d.raw)){qa.ElMessage.warning("请上传图片文件");const C=xa.value.findIndex(re=>re.uid===d.uid);C>-1&&xa.value.splice(C,1),je();return}kr(d,"uploading"),Dl(d,0);try{const C=new FormData;C.append("file",d.raw,d.name);const re=await A.platformUploadFile(C);d.uploadResult=((h=re==null?void 0:re.data)==null?void 0:h.result)||{name:d.name,url:"",fileName:d.name},Fl({name:((N=d.uploadResult)==null?void 0:N.name)||d.name,url:((z=d.uploadResult)==null?void 0:z.url)||"",id:(F=d.uploadResult)==null?void 0:F.id}),kr(d,"uploaded"),Dl(d,100)}catch(C){console.error("文件上传失败:",C),qa.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),kr(d,"pending"),Dl(d,0);const re=xa.value.findIndex(ne=>ne.uid===d.uid);re>-1&&xa.value.splice(re,1)}finally{je()}}},je=()=>{e.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},De=async()=>{var N,z;if(sessionStorage.setItem("ocr_root_table_id",String((c==null?void 0:c.index)??"")),xa.value.length===0){qa.ElMessage.warning("请先选择要上传的图片");return}if(xa.value.filter(F=>{const C=wl(F);return C!=="uploaded"&&C!=="completed"&&C!=="failed"}).length>0){qa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ga.value=!0,ma.value=0;let h=null;try{xa.value.forEach(Ye=>{kr(Ye,"processing")});const F=Math.floor(Math.random()*10)+90;h=setInterval(()=>{ma.value<F?ma.value+=1:clearInterval(h)},50);const C=xa.value.map(Ye=>{var Qa,ba,el;return{name:((Qa=Ye.uploadResult)==null?void 0:Qa.name)||Ye.name,url:((ba=Ye.uploadResult)==null?void 0:ba.url)||"",fileName:((el=Ye.uploadResult)==null?void 0:el.fileName)||Ye.name}}),re=Cr.extractTableHeaders(R.value),ne=C.map(Ye=>({name:(Ye==null?void 0:Ye.fileName)||(Ye==null?void 0:Ye.name),url:(Ye==null?void 0:Ye.url)||""})),K=await Cr.recognize(ne,re);if(console.log(K,"ocrResult"),clearInterval(h),h=null,(K==null?void 0:K.code)===500||(K==null?void 0:K.type)==="error"||!(K!=null&&K.result)){ma.value=0,xa.value.forEach(Ye=>{kr(Ye,"failed"),Dl(Ye,0)}),qa.ElMessage.error((K==null?void 0:K.message)||"OCR识别失败,请重试"),ga.value=!1;return}ma.value=F;const be=Array.isArray(K==null?void 0:K.result)?K.result:[];if(be.length===0){ma.value=0,xa.value.forEach(Ye=>{kr(Ye,"failed"),Dl(Ye,0)}),qa.ElMessage.warning("OCR识别未返回有效数据"),ga.value=!1;return}const Ae=new Set,He=[];be.forEach((Ye,Qa)=>{const ba=Ye!=null&&Ye.数据&&typeof(Ye==null?void 0:Ye.数据)=="object"?Ye.数据:{},el=Array.isArray(Ye==null?void 0:Ye.图片信息)?Ye.图片信息:[],ke=new Map;el.forEach(va=>{va!=null&&va.name&&ke.set(va.name,va.url||"")});const $a={_index:Qa,_certType:(Ye==null?void 0:Ye.证书类型)||"",_certNo:(Ye==null?void 0:Ye.证书编号)||"",_ocrImages:el,__ocrFieldMeta:{}};Object.entries(ba).forEach(([va,Ca])=>{let _a="",T=0,X=[],Re="";Ca&&typeof Ca=="object"&&!Array.isArray(Ca)?(_a=(Ca==null?void 0:Ca.value)??"",T=(Ca==null?void 0:Ca.score)??0,X=Array.isArray(Ca==null?void 0:Ca.bboxNorm)?Ca==null?void 0:Ca.bboxNorm:[],Re=(Ca==null?void 0:Ca.imageName)||""):Array.isArray(Ca)&&Ca.length>=2?(_a=Ca[0]??"",T=Ca[1]??0):(_a=Ca??"",T=0),$a[va]=_a,$a[`${va}_accuracy`]=T,Ae.add(va),$a.__ocrFieldMeta[va]={value:_a,score:T,bboxNorm:X,imageName:Re,imageUrl:Re&&ke.get(Re)||"",images:el}}),He.push($a)});const $e=[],Ge=new Set;He.forEach(Ye=>{Ye&&Ae.forEach(Qa=>{const ba=Ye[`${Qa}_accuracy`];(typeof ba=="number"?ba>0:ba!=null&&String(ba).trim()!==""&&String(ba)!=="0")&&Ge.add(Qa)})}),Ae.forEach(Ye=>{$e.push({prop:Ye,label:Ye,editable:!0,minWidth:230}),Ge.has(Ye)&&$e.push({prop:`${Ye}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),xa.value.forEach(Ye=>{kr(Ye,"completed")}),ma.value=100,Xe.value=$e,Je.value=He,Ve.value=C,Fa.value=K;const wa=["出厂编号","设备名称","制造厂"],Oa=$e.filter(Ye=>Ye&&!Ye.isAccuracy&&typeof Ye.prop=="string").map(Ye=>Ye.prop),za=["出厂编号","设备名称","制造厂"];Ea.value=Oa.filter(Ye=>za.includes(Ye)),console.log("[OCR] 默认勾选字段 props:",Ea.value),ia.value=2,ga.value=!1,ya.value=!1}catch(F){console.error("OCR处理失败:",F),h&&(clearInterval(h),h=null),qa.ElMessage.error(((z=(N=F==null?void 0:F.response)==null?void 0:N.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ga.value=!1,ma.value=0,xa.value.forEach(C=>{kr(C,"pending"),Dl(C,0)})}},ea=d=>{if(d==null)return"";let h=String(d);return h=h.replace(/\s+/g," ").trim(),h=h.replace(/[!-~]/g,N=>String.fromCharCode(N.charCodeAt(0)-65248)),h=h.replace(/ /g," "),h=h.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),h},Ta=()=>{var Ye,Qa;const d=Ve.value,h=Fa.value,N=Je.value;if(!N||N.length===0){qa.ElMessage.warning("暂无数据可添加");return}const z=(Ye=he.getAllLeafNodes(R.value)||[])==null?void 0:Ye.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),F=new Map,C=new Map,re=(Qa=z==null?void 0:z.find(ba=>(ba==null?void 0:ba.label)==="证书附件"))==null?void 0:Qa.prop;z==null||z.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&(F.set(ba.label,ba.prop),C.set(ba.prop,ba.label))});const ne=Date.now(),K=ba=>String(ne*1e3+ba),be=[],Ae=[],He=ba=>{const el=Do&&Do[ba]||[ba];for(const ke of el){const $a=F.get(ke);if($a)return $a}return""},$e=He("出厂编号"),Ge=He("设备名称"),wa=He("制造厂"),Oa=[],za=ba=>{var _a,T;if(!re)return[];const el=(Array.isArray(d)?d[ba]:null)||null,ke=(el==null?void 0:el.url)||"",$a=(el==null?void 0:el.fileName)||(el==null?void 0:el.name)||"";return(String($a).toLowerCase().endsWith(".pdf")||String(ke).toLowerCase().endsWith(".pdf"))&&ke?[{url:ke,name:$a,fileName:$a}]:(Array.isArray((T=(_a=h==null?void 0:h.result)==null?void 0:_a[ba])==null?void 0:T.图片信息)?h.result[ba].图片信息:[]).map(X=>({url:(X==null?void 0:X.url)||"",name:(X==null?void 0:X.name)||"",fileName:(X==null?void 0:X.name)||""})).filter(X=>X.url)};if(N.forEach((ba,el)=>{var nl;const ke={id:K(el),_isOCRRow:!0,_ocrTableId:c==null?void 0:c.index};for(const[Wa,ul]of F.entries())Object.prototype.hasOwnProperty.call(ba,Wa)&&(ke[ul]=ba[Wa]);re&&(ke[re]=za(el));const $a=(Array.isArray(h==null?void 0:h.result)?h.result[el]:null)||null,va=(Array.isArray(d)?d[el]:null)||null,Ca=(va==null?void 0:va.url)||"",_a=(va==null?void 0:va.fileName)||(va==null?void 0:va.name)||"",T=String(_a).toLowerCase().endsWith(".pdf")||String(Ca).toLowerCase().endsWith(".pdf"),X={ts:Date.now(),versionId:String(Date.now())+"_"+String(el),label:new Date().toLocaleString(),certType:($a==null?void 0:$a.证书类型)||"",certNo:($a==null?void 0:$a.证书编号)||"",fileType:T?"pdf":"image",sourceUrl:T?Ca:"",images:Array.isArray($a==null?void 0:$a.图片信息)?$a.图片信息.map(Wa=>({name:(Wa==null?void 0:Wa.name)||"",url:(Wa==null?void 0:Wa.url)||""})).filter(Wa=>Wa.url):[]},Re=Wa=>ea(Wa?ke==null?void 0:ke[Wa]:""),na=Re($e),we=Re(Ge),sa=Re(wa);if(!!($e&&Ge&&wa&&na&&we&&sa)){const Wa=(Ne.value||[]).find(ul=>{const dl=ea($e?ul==null?void 0:ul[$e]:""),Vl=ea(Ge?ul==null?void 0:ul[Ge]:""),Ua=ea(wa?ul==null?void 0:ul[wa]:"");return dl&&Vl&&Ua&&dl===na&&Vl===we&&Ua===sa});if(Wa){Oa.push({idx:el,ocrRow:ke,versionItem:X,ocrNo:na,candidates:[Wa],selectedTargetId:String((Wa==null?void 0:Wa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(na&&$e){const Wa=(Ne.value||[]).filter(ul=>{const dl=ea($e?ul==null?void 0:ul[$e]:"");return dl&&dl===na});if(Wa.length>0){Oa.push({idx:el,ocrRow:ke,versionItem:X,ocrNo:na,candidates:Wa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ke.sort===void 0||ke.sort===null||String(ke.sort).trim()===""){const Wa=(Ne.value||[]).map(dl=>Xn(dl==null?void 0:dl.sort)).filter(dl=>dl!==null),ul=Wa.length>0?Math.max(...Wa):((nl=Ne.value)==null?void 0:nl.length)??0;ke.sort=String(Number((ul+1).toFixed(6)))}}catch{}Ma(c==null?void 0:c.index,ke.id,X),Oa.push({idx:el,ocrRow:ke,versionItem:X,ocrNo:na,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Oa||[]).length>0){ql.value=(Oa||[]).map(ba=>({...ba,selectedTargetId:(ba==null?void 0:ba.selectedTargetId)||""})),Ul.value=!0,Ql.value=Ae,dr.value=be,Ol.value=h,pr.value=d,Fr.value=re||"";return}},Xa=(d,h,N)=>{Je.value[d]&&(Je.value[d][h]=N)},Ga=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,al=d=>{if(d==null||d===0)return"#909399";const h=Number(d);return h>=.9?"#67c23a":h>=.7?"#e6a23c":"#f56c6c"},bl=d=>{var N,z,F,C;if(il.value===d){il.value=null,Me.value=!1,Ia.value="";return}il.value=d,Ia.value="";const h=(N=Je.value)==null?void 0:N[d];if(h&&Array.isArray(h._ocrImages)&&h._ocrImages.length>0){Sl.value=h._ocrImages.map(K=>({name:(K==null?void 0:K.name)||"",url:(K==null?void 0:K.url)||""})).filter(K=>K.name||K.url);const re=h.__ocrFieldMeta||{},ne=(z=Object.values(re))==null?void 0:z.find(K=>K==null?void 0:K.imageName);Il.value=(ne==null?void 0:ne.imageName)||((C=(F=Sl.value)==null?void 0:F[0])==null?void 0:C.name)||"",Me.value=Sl.value.length>0}else Sl.value=[],Me.value=!1,Il.value=""},ml=()=>{sl.value=!1,xa.value=[],La.value=null,ia.value=1,Ie.value.clear(),de.value.clear(),ma.value=0,Me.value=!1},Cl=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",wl=d=>{const h=d.uid||d.name;return Ie.value.get(h)||"pending"},Zl=d=>{const h=d.uid||d.name;return de.value.get(h)||0},Dl=(d,h)=>{const N=d.uid||d.name;de.value.set(N,Math.min(100,Math.max(0,h)))},jl=d=>{const h=wl(d),N=100.53;if(h==="completed"||h==="uploaded")return`${N} ${N}`;if(h==="failed")return`${N} ${N}`;if(h==="uploading"){const z=Zl(d);return`${N*(z/100)} ${N}`}else if(h==="processing")return`${N*.5} ${N}`;return`0 ${N}`},kr=(d,h)=>{const N=d.uid||d.name;Ie.value.set(N,h),(h==="completed"||h==="uploaded")&&Dl(d,100)},Sr=()=>{e.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');if(d)d.value="",d.click();else{const h=document.createElement("input");h.type="file",h.multiple=!0,h.accept="image/*,application/pdf",h.style.display="none",h.onchange=async N=>{const z=Array.from(N.target.files||[]);for(const F of z){const C={name:F.name,raw:F,uid:Date.now()+Math.random()};xa.value.push(C),await ge(C)}N.target.value="",document.body.removeChild(h)},document.body.appendChild(h),h.click()}})},Gr=()=>{ia.value>1&&ia.value--},on=()=>{ia.value===1?xa.value.length>0&&!ga.value&&De():ia.value===2&&(Ta(),ia.value=3)},wn=async d=>{await Rn(d==null?void 0:d.row)},fi=async({row:d,prop:h})=>{!d||!h||await Rn(d,h)},Rn=async(d,h)=>{var F,C;const N=d==null?void 0:d.id;if(!N){qa.ElMessage.warning("暂无可预览数据");return}let z=zl(c==null?void 0:c.index,N);if(!z||z.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),ne=re!==null?Number(re):null;if(ne!=null&&ne!==""&&!Number.isNaN(ne)){const K=zl(ne,N);Array.isArray(K)&&K.length>0&&($l(c==null?void 0:c.index,N,K),z=K)}}if(!z||z.length===0){const re=(F=he.getAllLeafNodes(R.value)||[])==null?void 0:F.filter(K=>(K==null?void 0:K.type)!=="operate"&&(K==null?void 0:K.label)!=="操作"&&(K==null?void 0:K.prop)!=="operate"),ne=h||((C=re==null?void 0:re.find(K=>(K==null?void 0:K.label)==="证书附件"))==null?void 0:C.prop);if(ne&&d[ne]){const K=d[ne];let be=[],Ae="",He=!1;if(typeof K=="string")try{const $e=JSON.parse(K);Array.isArray($e)&&(be=$e.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),be.length>0&&(Ae=be[0].url||"",He=String(be[0].name).toLowerCase().endsWith(".pdf")||String(Ae).toLowerCase().endsWith(".pdf")))}catch{Ae=K,He=String(K).toLowerCase().endsWith(".pdf"),be=[{name:K,url:K}]}else Array.isArray(K)&&(be=K.map($e=>({name:($e==null?void 0:$e.name)||($e==null?void 0:$e.fileName)||"",url:($e==null?void 0:$e.url)||""})).filter($e=>$e.url||$e.name),be.length>0&&(Ae=be[0].url||"",He=String(be[0].name).toLowerCase().endsWith(".pdf")||String(Ae).toLowerCase().endsWith(".pdf")));if(be.length>0||Ae){const $e={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:He?"pdf":"image",sourceUrl:He?Ae:"",images:be};z=[$e],Ma(c==null?void 0:c.index,N,$e)}}}if(!z||z.length===0){qa.ElMessage.warning("暂无可预览数据");return}xe.value=z,Ra.value=!0},nu=d=>{xa.value=xa.value.filter((h,N)=>N!==d)},lt=async(d,h,N)=>{var z,F,C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va;if(pa(c.config,{type:te.TABLE,tableOperate:d})){if(Da.value="",Va.value=!0,Ze.value=!0,Te("onButtonClick",d,h),Y.value=[],d==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ca,_a,T,X;(Ca=Ne.value)!=null&&Ca.find(Re=>(Re==null?void 0:Re.id)===(h==null?void 0:h.id))?Ne.value=(_a=A.cloneDeep(Ne.value))==null?void 0:_a.filter(Re=>(Re==null?void 0:Re.id)!==(h==null?void 0:h.id)):Ne.value=oo(A.cloneDeep(Ne.value),h);try{h!=null&&h.id&&((X=(T=Aa.value)==null?void 0:T.has)!=null&&X.call(T,h==null?void 0:h.id))&&Aa.value.delete(h.id)}catch{}Tf(ln.value,pn.value,h==null?void 0:h.id),oa.setTableLoading(c==null?void 0:c.index),Te("change",{content:Ne.value,fixContent:[h],index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.groupNames,buttonName:d,columns:R.value,relatedContents:c==null?void 0:c.related}),console.log(h,"item")});else if(d==="批量删除"){if(((z=Kl.value)==null?void 0:z.length)===0)return qa.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var T,X,Re,na,we;const Ca=(T=Kl.value)==null?void 0:T.map(sa=>sa.id);Ne.value=(X=A.cloneDeep(Ne.value))==null?void 0:X.filter(sa=>!(Ca!=null&&Ca.includes(sa.id))),oa.setTableLoading(c==null?void 0:c.index),Te("change",{content:Ne.value,fixContent:Kl.value,index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.compName,buttonName:d,relatedContents:c==null?void 0:c.related,columns:R.value});const _a=(Ca||[]).filter(Boolean);if(_a.length>0&&_a.every(sa=>sa!=null&&sa!=="")){const sa=(Kl.value||[]).map(Ba=>{const nl={...Ba};return delete nl._isOCRRow,delete nl._ocrTableId,delete nl._isTemp,delete nl.tableEditType,delete nl.index,nl});await A.pageBatchDeleteApi({platId:parseInt((Re=cl.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((na=c==null?void 0:c.related)==null?void 0:na.find(Ba=>Ba==null?void 0:Ba.includes("content_")))||((we=c==null?void 0:c.related)==null?void 0:we.find(Ba=>Ba==null?void 0:Ba.includes("content"))),tableContents:sa}]})}})}else if(d==="复制新增"){U.value="复制新增",A.cloneDeep(h);const Ca=(F=R.value)==null?void 0:F.find(_a=>_a==null?void 0:_a.isMainKey);Ca||((C=R.value)==null||C[0]),cr.value=h,Ri(!0)}else if(d==="新增")U.value="新增",Li(""),q.value=!0;else if(d==="编辑")U.value="编辑",Li(h),q.value=!0;else if(d==="查看")U.value="查看",Li(h),Va.value=!1,Ze.value=!1,q.value=!0;else if(d==="查看三维模型"){const Ca={};for(let T in h)T!=="id"&&(Ca[T]=h[T]);let _a=(re=Object.values(Ca))==null?void 0:re[1];Ue.setTableShowThree(_a)}else if(d==="切换视图")yu();else if(((ne=N==null?void 0:N.extra)==null?void 0:ne.type)==="modelExample")U.value=d,la.value=!0;else if(d==="新建"){let Ca=fe.value,_a=[];for(let we in Ca)we!=null&&we.includes(`loading${((K=cl.value)==null?void 0:K.account)||((be=cl.value)==null?void 0:be.账号)}`)&&(_a=[..._a,...we]);let T=[];for(let we in Ca)we!=null&&we.includes(`updateLoading${((Ae=cl.value)==null?void 0:Ae.account)||((He=cl.value)==null?void 0:He.账号)}`)&&(T=[...T,...we]);let X=_a==null?void 0:_a.map(we=>we==null?void 0:we.id);const Re=T==null?void 0:T.map(we=>we==null?void 0:we.id);X=[...A.cloneDeep(X),...Re],(X==null?void 0:X.length)>0&&(X!=null&&X.every(we=>we!==null&&we))&&await Ar.batchDeleteInsofDataApi({ids:X});const na=($e=Za.value)==null?void 0:$e.find(we=>(we==null?void 0:we.label)==="新建");await tu(!1,na)}else if(d==="修改模板"){let Ca=A.cloneDeep(Ee).value;oa.setRouteToChildPath(Ca),oe.setActiveMenuPath(Ca+g)}else if(d==="执行")et(d,h);else if(d==="导出paraform"){const Ca=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const _a=["推力","真空","压力","温度","流量"],T=yl=>{var Al,Jl,Tl;return yl?typeof(yl==null?void 0:yl.value)=="string"?yl.value:((Tl=(Jl=(Al=yl==null?void 0:yl._custom)==null?void 0:Al.value)==null?void 0:Jl.value)==null?void 0:Tl.value)||"":""},X=Array.isArray(lr.value)?lr.value:[],Re=T(X.find(yl=>(yl==null?void 0:yl.condition)==="child")),na=String(Re||"").slice(0,8),we=yl=>{if(yl==null)return"";const Al=String(yl).trim();if(!Al)return"";if(/^\d{8}$/.test(Al))return Al;const Jl=Al.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Jl){const Gl=Jl[1],rr=Jl[2].padStart(2,"0"),Hl=Jl[3].padStart(2,"0");return`${Gl}${rr}${Hl}`}const Tl=Al.replace(/\D/g,"");return Tl.length>=8?Tl.slice(0,8):""},sa=async yl=>{var Al,Jl;if(!yl)return"";try{const Tl=await Kr("试验任务/任务管理",!1),Gl=(vr,tr=[])=>{if(!Array.isArray(vr))return tr;for(const ur of vr)(ur==null?void 0:ur.comp)==="Table"&&(ur!=null&&ur.name)&&tr.push(ur),Array.isArray(ur==null?void 0:ur.children)&&Gl(ur.children,tr),Array.isArray(ur==null?void 0:ur.tab)&&Gl(ur.tab,tr),Array.isArray(ur==null?void 0:ur.choice)&&Gl(ur.choice,tr);return tr},Hl=Gl(Tl||[]).find(vr=>(vr==null?void 0:vr.name)==="任务列表"),hr=((Jl=(Al=Hl==null?void 0:Hl.compData)==null?void 0:Al.find(vr=>(vr==null?void 0:vr.key)==="tableContents"))==null?void 0:Jl.contents)||[];if(!Array.isArray(hr)||hr.length===0)return"";const qr=hr.find(vr=>String((vr==null?void 0:vr["试验代号(名称)"])||"").slice(0,8)===yl);return we(qr==null?void 0:qr.计划试验时间)}catch(Tl){return console.warn("获取任务列表计划试验时间失败:",Tl),""}},Ba=(Ee.value||"").replace(/\/+$/,""),nl=Re?`${Ba}/${Re}`:Ba,Wa=await Kr(nl||Ee.value,!1),ul=String(Qe.value||"").trim(),dl=yl=>String(yl||"").trim(),Vl=(yl,Al=[],Jl="")=>{if(!Array.isArray(yl))return Al;for(const Tl of yl){const Gl=dl((Tl==null?void 0:Tl.choiceName)||(Tl==null?void 0:Tl.name0)||Jl);(Tl==null?void 0:Tl.comp)==="Table"&&(Tl==null?void 0:Tl.name)&&_a.includes(Tl.name)&&(!ul||Gl===ul)&&Al.push(Tl),Array.isArray(Tl==null?void 0:Tl.children)&&Vl(Tl.children,Al,Gl),Array.isArray(Tl==null?void 0:Tl.tab)&&Vl(Tl.tab,Al,Gl),Array.isArray(Tl==null?void 0:Tl.choice)&&Vl(Tl.choice,Al,Gl)}return Al},Ua=Vl(Wa||[]),hl=new Map;for(const yl of Ua)yl!=null&&yl.name&&!hl.has(yl.name)&&hl.set(yl.name,yl);const Pa=_a.map(yl=>hl.get(yl)).filter(Boolean);if(!Pa||Pa.length===0)return qa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const ol=yl=>{const Al=new Map,Jl=(Tl,Gl=[])=>{if(Array.isArray(Tl))for(const rr of Tl){const Hl=((rr==null?void 0:rr.label)??"").toString().trim(),hr=Hl?[...Gl,Hl]:[...Gl];if(Array.isArray(rr==null?void 0:rr.children)&&rr.children.length>0)Jl(rr.children,hr);else{const vr=((rr==null?void 0:rr.prop)??"").toString();if(!vr)continue;const tr=Hl||vr,ur=(hr.length>0?[...Gl,tr]:[tr]).join(".");Al.set(vr,ur)}}};return Jl(yl,[]),Al},Ka=(yl,Al)=>{const Jl=ol(yl||[]),Gl=(he.getAllLeafNodes(yl||[])||[]).filter(Hl=>(Hl==null?void 0:Hl.prop)&&(Hl==null?void 0:Hl.type)!=="operate"&&(Hl==null?void 0:Hl.label)!=="操作"&&(Hl==null?void 0:Hl.prop)!=="operate"),rr=Array.isArray(Al)?Al:[];return rr.length===0?[]:rr.map(Hl=>{const hr={};return Gl.forEach(qr=>{const vr=String(qr.prop),tr=Jl.get(vr)||String(qr.label||qr.prop);hr[tr]=(Hl==null?void 0:Hl[vr])??""}),hr})},tl=Pa.map(yl=>{var rr,Hl;const Al=(yl==null?void 0:yl.compData)||[];let Jl=(rr=Al==null?void 0:Al.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:rr.contents;Array.isArray(Jl==null?void 0:Jl[0])&&(Jl=Jl[0]);const Tl=((Hl=Al==null?void 0:Al.find(hr=>(hr==null?void 0:hr.key)==="tableContents"))==null?void 0:Hl.contents)||[];if(!Array.isArray(Jl)||Jl.length===0||!Array.isArray(Tl)||Tl.length===0)return null;const Gl=Ka(Jl||[],Tl||[]);return!Array.isArray(Gl)||Gl.length===0?null:{类型:yl==null?void 0:yl.name,数据:Gl}}).filter(Boolean);if(!tl||tl.length===0)return qa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const _l=await sa(na),Nl={试验代号:na,试验日期:_l,ParaForm:tl},xr=await di().catch(()=>""),Ll=await A.exportParaformApi(Nl,xr);if(((Ge=Ll==null?void 0:Ll.data)==null?void 0:Ge.code)===200&&((Oa=(wa=Ll==null?void 0:Ll.data)==null?void 0:wa.result)!=null&&Oa.Excel文件)){const yl=Ll.data.result.Excel文件,Al=await A.platformDownloadFile({url:yl}),Jl=new Blob([Al.data],{type:"application/vnd.ms-excel"}),Tl=URL.createObjectURL(Jl),Gl=A.dayjs().format("YYYYMMDD"),Hl=`${(na||"UNKNOWN").trim()||"UNKNOWN"}_${Gl}_paraform.xls`,hr=document.createElement("a");hr.href=Tl,hr.download=Hl,hr.style.display="none",document.body.appendChild(hr),hr.click(),setTimeout(()=>{document.body.removeChild(hr),URL.revokeObjectURL(Tl)},100);const qr=Array.isArray((Ye=(za=Ll==null?void 0:Ll.data)==null?void 0:za.result)==null?void 0:Ye.warnings)?Ll.data.result.warnings:[];if(qr.length>0){const vr=qr.map((tr,ur)=>`${ur+1}. ${(tr==null?void 0:tr.field)||"未知字段"}:${(tr==null?void 0:tr.message)||""}`).join(`
|
|
23
|
+
`)},b=I=>{if(!I)return;const Y=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:Y,blobUrl:I}],f.value=!0},g=()=>{f.value=!1},R=()=>{_(),n("cancel")};return(I,Y)=>{const le=e.resolveComponent("el-input"),ye=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(wr.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:R,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",Of,[e.createElementVNode("div",{ref_key:"cameraBox",ref:t,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Lf,"初始化摄像头..."))],512),e.createElementVNode("div",$f,[e.createElementVNode("div",Rf,[Y[0]||(Y[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Vf,[v.value.length===0?(e.openBlock(),e.createElementBlock("div",Ff,"暂无图片")):(e.openBlock(),e.createElementBlock("div",Pf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(Te,V)=>(e.openBlock(),e.createElementBlock("div",{key:Te.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:Te.url,onClick:se=>b(Te.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,jf),e.createElementVNode("div",{onClick:se=>w(V),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,Hf)]))),128))]))],512)]),e.createElementVNode("div",Uf,[Y[1]||(Y[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(le,{type:"textarea",value:p.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",qf,[e.createVNode(ye,{onClick:G,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[2]||(Y[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(ye,{onClick:M,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[3]||(Y[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(ye,{onClick:$,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[4]||(Y[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(ye,{onClick:j,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>Y[5]||(Y[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(ye,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>Y[6]||(Y[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),Y[9]||(Y[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(ye,{onClick:S,disabled:v.value.length===0,id:"themeButton"},{default:e.withCtx(()=>Y[7]||(Y[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(ye,{onClick:R,id:"themeBorderButton"},{default:e.withCtx(()=>Y[8]||(Y[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),f.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:g},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Kf=Xl._export_sfc(Wf,[["__scopeId","data-v-24a2050a"]]),ds=A.useMenuState(A.pinia),Gf=async a=>{var s,v,p,f,m,k;let l=a==null?void 0:a.导入文件,r=a==null?void 0:a.函数参数,n=(s=l==null?void 0:l[0])==null?void 0:s.url,t="";if(!(n!=null&&n.includes("http"))||!(n!=null&&n.includes("https"))){ds.setContentLoading(!0);const c=await A.platformDownloadFile({url:n});let D=c==null?void 0:c.data;const F=new FormData;F.append("file",D,((v=l==null?void 0:l[0])==null?void 0:v.name)+"."+((p=n==null?void 0:n.split("."))==null?void 0:p[1])),F.append("query",r);let _=await Xs(F);_=(k=(m=(f=_==null?void 0:_.data)==null?void 0:f.data)==null?void 0:m.response)==null?void 0:k.replace("generateResult",a==null?void 0:a.函数名称),t=_,ds.setContentLoading(!1)}return t},Ct=A.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),Yf=A.useModelComp(A.pinia),{extraContents:iv}=A.storeToRefs(Yf),Jf=A.useLoginState(A.pinia),{extraUrl:ni}=A.storeToRefs(Jf);let pc=ni.value===""||!ni.value?"http://139.196.154.85:20015":ni.value;e.watch(()=>ni.value,()=>{pc=ni.value===""||!ni.value?"http://139.196.154.85:20015":ni.value},{deep:!0,immediate:!0});const Do={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},ps={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:pc+"/api/public/paddleOCR"};class Xf{constructor(l){Wr(this,"config");this.config={...ps,...l}}updateConfig(l){this.config={...this.config,...l}}getConfig(){return{...this.config}}validateFileSize(l){const r=this.config.maxSize*1024*1024;return l.size<=r}validateFileType(l){return l.type.startsWith("image/")||l.type==="application/pdf"}getAuthorizationToken(){const l=qa.Local.get(qa.accessTokenKey);return l?`Bearer ${l}`:""}buildOCRRequest(l,r){return{title:r,form:{OCR图片文件:l}}}async recognize(l,r){const n=this.getAuthorizationToken(),t=this.buildOCRRequest(l,r),s=this.config.apiUrl||ps.apiUrl||"";return(await qa.axios.post(s,t,{headers:{"Content-Type":"application/json",Authorization:n}})).data}getFieldAliases(l){return Do[l]?Do[l]:[l]}extractTableHeaders(l){const r=[],n=new Set,t=v=>{const p=v==null?void 0:v.label;return!(!p||p==="操作"||p===this.config.columnName||(v==null?void 0:v.type)==="operate"||(v==null?void 0:v.prop)==="operate")},s=v=>{(v||[]).forEach(p=>{if(!p)return;const f=(p==null?void 0:p.children)||(p==null?void 0:p.child)||(p==null?void 0:p.columns);if(Array.isArray(f)&&f.length>0){s(f);return}if(t(p)){const m=p.label;if(!n.has(m)){n.add(m);const k=this.getFieldAliases(m);r.push(k)}}})};return s(l||[]),r}}function fc(a){return new Xf(a)}fc();const yt=async(a,l)=>{var v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b;let r=(p=(v=A.cloneDeep(a))==null?void 0:v.optionUrl)==null?void 0:p.menuSelect,n=[];r==null||r.forEach(g=>{});let t="",s=await he.menuToParent(r);if(s==null||s.forEach(g=>{var R,I,Y,le;(g==null?void 0:g.name)===(((le=(Y=(I=(R=A.cloneDeep(a))==null?void 0:R.optionUrl)==null?void 0:I.groupSelect)==null?void 0:Y[0])==null?void 0:le.replaceAll("'",""))??"")&&(t=g==null?void 0:g.id)}),l){t=l;const g=await Ar.getInsofDataApi({id:t}),R=(c=(k=(m=(f=g==null?void 0:g.data)==null?void 0:f.result)==null?void 0:m[0])==null?void 0:k.key)==null?void 0:c.pageKey;s=await he.getItemData(R,sessionStorage.getItem("systemKey"),"")}if(t!==""){let g;l?g=(D=s==null?void 0:s.find(Y=>(Y==null?void 0:Y.id)===l))==null?void 0:D.compData:g=(F=s==null?void 0:s.find(Y=>{var le,ye,Te,V;return(Y==null?void 0:Y.name)===(((ye=(le=a==null?void 0:a.groupSelect)==null?void 0:le.split(":"))==null?void 0:ye[0])||((V=(Te=a==null?void 0:a.optionUrl)==null?void 0:Te.groupSelect)==null?void 0:V[0]))}))==null?void 0:F.compData;let R=(G=(_=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:_.contents)==null?void 0:G.map(Y=>Y==null?void 0:Y.label);($=(M=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:M.contents)!=null&&$.every(Y=>Array.isArray(Y))&&(R=(S=he.getColumnChild((E=(j=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:j.contents)==null?void 0:E[0]))==null?void 0:S.map(Y=>Y==null?void 0:Y.prop));let I=(b=(w=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:b.map(Y=>{if(Array.isArray(Y))Y=Y==null?void 0:Y.filter(le=>!(le!=null&&le.id));else{let le={};for(let ye in Y)ye!=="id"&&(le[ye]=Y==null?void 0:Y[ye]);Y=le}return Y});I==null||I.forEach(Y=>{Array.isArray(Y)?n.push(he.getValueToObjectValue(Y,R)):n.push(Y)})}return n},Zf=A.useMenuState(A.pinia),{activeMenuPath:ov}=A.storeToRefs(Zf),Qf=A.useUnit(A.pinia),{chooseTitle:tv}=A.storeToRefs(Qf),e0="col-operate",hc=a=>`${e0}-${a}`,a0=(a,l)=>{const r=new Map;a.forEach(t=>{const{prop:s}=t;r.set(s,t)});const n=t=>{Array.isArray(t)&&t.forEach(s=>{const{prop:v}=s||{},p=r.get(v);l0(p,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&n(s.children)})};return n(l),l},l0=(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),r0=(a,l)=>{const{sortable:r=!1,filterable:n=!1,showSummary:t=!1,operable:s=!1,fixed:v=!1}=l||{};return{prop:a,sortable:r,filterable:n,showSummary:t,operable:s,fixed:v}},n0=async a=>{var s,v;if(!a)return;const l=hc(a),r=await Ar.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:l}}),n=(s=r==null?void 0:r.data)==null?void 0:s.code,t=(v=r==null?void 0:r.data)==null?void 0:v.result;if(n==200)return t==null?void 0:t[0]},i0=async a=>{if(a)return[]},o0=async(a,l)=>{if(!a||!l)return;const r=hc(a);return await Ar.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:l}})},t0=async(a,l)=>!a||!l?void 0:await Ar.updateInsofDataApi({id:a,value:{columns:l}}),fs=async(a,l)=>{const r=sessionStorage.getItem("systemKey");if(!a||!l||!r)return;const n=await n0(a);return n?await t0(n==null?void 0:n.id,l):await o0(a,l)};var ko={exports:{}},s0=ko.exports,hs;function c0(){return hs||(hs=1,function(a,l){(function(r,n){n()})(s0,function(){function r(m,k){return typeof k>"u"?k={autoBom:!1}:typeof k!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),k={autoBom:!k}),k.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(m.type)?new Blob(["\uFEFF",m],{type:m.type}):m}function n(m,k,c){var D=new XMLHttpRequest;D.open("GET",m),D.responseType="blob",D.onload=function(){f(D.response,k,c)},D.onerror=function(){console.error("could not download file")},D.send()}function t(m){var k=new XMLHttpRequest;k.open("HEAD",m,!1);try{k.send()}catch{}return 200<=k.status&&299>=k.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var k=document.createEvent("MouseEvents");k.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(k)}}var v=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof A.commonjsGlobal=="object"&&A.commonjsGlobal.global===A.commonjsGlobal?A.commonjsGlobal:void 0,p=v.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=v.saveAs||(typeof window!="object"||window!==v?function(){}:"download"in HTMLAnchorElement.prototype&&!p?function(m,k,c){var D=v.URL||v.webkitURL,F=document.createElement("a");k=k||m.name||"download",F.download=k,F.rel="noopener",typeof m=="string"?(F.href=m,F.origin===location.origin?s(F):t(F.href)?n(m,k,c):s(F,F.target="_blank")):(F.href=D.createObjectURL(m),setTimeout(function(){D.revokeObjectURL(F.href)},4e4),setTimeout(function(){s(F)},0))}:"msSaveOrOpenBlob"in navigator?function(m,k,c){if(k=k||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(r(m,c),k);else if(t(m))n(m,k,c);else{var D=document.createElement("a");D.href=m,D.target="_blank",setTimeout(function(){s(D)})}}:function(m,k,c,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof m=="string")return n(m,k,c);var F=m.type==="application/octet-stream",_=/constructor/i.test(v.HTMLElement)||v.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||F&&_||p)&&typeof FileReader<"u"){var M=new FileReader;M.onloadend=function(){var E=M.result;E=G?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=E:location=E,D=null},M.readAsDataURL(m)}else{var $=v.URL||v.webkitURL,j=$.createObjectURL(m);D?D.location=j:location.href=j,D=null,setTimeout(function(){$.revokeObjectURL(j)},4e4)}});v.saveAs=f.saveAs=f,a.exports=f})}(ko)),ko.exports}c0();const Un=A.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],itemGridData:[],itemExtendData:void 0,payloadTypes:"",lockingPage:"",systemPath:void 0,pageMapState:void 0,cacheUpdatingData:void 0,freshContent:!1,tableLoading:!1,routeToChildPath:"",tableViewContents:[],activeItemIndex:0,fixMenuStatus:!1,refreshTable:!1,selectTab:""}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a},setSelectTab(a){this.selectTab=a}}}),u0=A.useLoginState(A.pinia),{loginUserInfo:st}=A.storeToRefs(u0),d0=async a=>{var n,t,s;let l=await A.getAllTables({platId:parseInt((n=st==null?void 0:st.value)==null?void 0:n.plat_id),tableNames:[a]});return l=(s=(t=l==null?void 0:l.data)==null?void 0:t.result)==null?void 0:s[0],await tc(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}]}]},p0=A.useLoginState(),{loginUserInfo:fl}=A.storeToRefs(p0);let vo="$R";const Br=A.useModelComp(A.pinia),vc=e.ref(!1),{itemData:f0,itemGridData:li,curStructureCompIds:vs,isSubmitCurStructure:h0,routeToChildPath:v0,pageMapState:gt,itemExtendData:mo,refreshTable:ms}=A.storeToRefs(Br),Oo=Un(A.pinia),Or=A.useMenuState(A.pinia),or=e.shallowRef([]),{asideMenus:m0,activeTopMenuPath:y0,activeMenuPath:vl,platform:sv,buttonTriggerType:g0,currentMenuPath:Zr}=A.storeToRefs(Or),dn=A.useUnit(A.pinia),{selectTitle:Pn,chooseTitle:No}=A.storeToRefs(dn);e.ref();const Di=e.ref(!0),Hn=e.ref(0),bt=e.ref([]);e.ref(!1);const Dt=e.ref(!1),qi=e.ref(),mc=e.ref(),yc=e.ref(),b0=()=>{Br.setItemGridData([]),Br.setIsEdit("edit"),Br.setSubmitCurStructure(vl.value!=="/平台管理/菜单管理")},k0=()=>{Br.setIsEdit("view"),Br.setRefreshCurStructure(!0)},x0=async a=>{var t;let l=Pn.value,r=l==null?void 0:l.findIndex(s=>(s==null?void 0:s.value)===(a==null?void 0:a.value)),n=l==null?void 0:l.filter((s,v)=>v<=r);dn.setSelectTitle(ll.safeClone(n)),n=(t=n==null?void 0:n.map(s=>s==null?void 0:s.value))==null?void 0:t.join("/"),Or.setActiveMenuPath(null),Or.setActiveMenuPath(n)},ct=async(a,l,r,n="contentConfig")=>{var t;try{if(!Array.isArray(a))return;let s,v;l==="create"?(s={dataList:a==null?void 0:a.map(f=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:n,parentTable:"",version:1},value:{pageData:{...f,compData:(m=f==null?void 0:f.compData)==null?void 0:m.filter(k=>(k==null?void 0:k.key)!=="tableContents")}}}})},v=Ar.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(f=>{var m;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(m=f==null?void 0:f.compData)==null?void 0:m.filter(k=>(k==null?void 0:k.key)!=="tableContents")}}}})},v=Ar.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},v=Ar.batchDeleteInsofDataApi);const p=await v(s);if(((t=p==null?void 0:p.data)==null?void 0:t.code)===200)return p.data.result;throw qa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{qa.ElMessage.error("保存响应失败")}},ys=async(a,l,r,n)=>{var t,s,v,p,f,m,k,c,D,F,_;try{const G=(s=(t=a==null?void 0:a.results)==null?void 0:t.filter(w=>!(w!=null&&w.id)||typeof(w==null?void 0:w.id)=="string"))==null?void 0:s.map(w=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:r},value:{tableData:w}})),M=(p=(v=a==null?void 0:a.results)==null?void 0:v.filter(w=>(w==null?void 0:w.id)&&typeof(w==null?void 0:w.id)=="number"))==null?void 0:p.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),$=JSON.parse(JSON.stringify(a)),j=(f=$==null?void 0:$.results)==null?void 0:f.map(w=>w.id);let E;r?E=(c=(k=(m=gt.value)==null?void 0:m[vl.value])==null?void 0:k.filter(w=>{var b,g,R;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l&&((R=(g=w==null?void 0:w.key)==null?void 0:g.relatedInfo)==null?void 0:R.target)===n}))==null?void 0:c.map(w=>w==null?void 0:w.id):E=(_=(F=(D=gt.value)==null?void 0:D[vl.value])==null?void 0:F.filter(w=>{var b;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l}))==null?void 0:_.map(w=>w==null?void 0:w.id);const S=E==null?void 0:E.filter(w=>!(j!=null&&j.includes(w))&&typeof w=="number");(G==null?void 0:G.length)>0&&await Ar.batchAddInsofDataApi({dataList:G}),(M==null?void 0:M.length)>0&&await Ar.batchUpdateInsofDataApi({dataList:M}),(S==null?void 0:S.length)>0&&await Ar.batchDeleteInsofDataApi({ids:S})}catch(G){throw new Error(G)}},w0=async a=>{var m,k,c,D,F,_,G,M,$,j;Or.setContentLoading(!0);const l=JSON.parse(JSON.stringify(f0.value));if(!h0.value)return Or.setCacheStructures({key:g0.value,data:l}),qa.ElMessage.success("已暂存");const r=l==null?void 0:l.map(E=>E.id),n=r.filter(E=>{var S;return!((S=vs.value)!=null&&S.includes(E))}),t=(m=vs.value)==null?void 0:m.filter(E=>!r.includes(E)),s=[...n,...t].filter(E=>typeof E!==null&&typeof E<"u"),v=l==null?void 0:l.filter(E=>!E.id),p=l==null?void 0:l.filter(E=>E.id);let f=[];if(s&&(s==null?void 0:s.length)>0&&f.push(ct(s,"delete",a)),v&&(v==null?void 0:v.length)>0&&f.push(ct(v,"create",a)),p&&(p==null?void 0:p.length)>0&&f.push(ct(p,"update",a)),li.value&&((k=li.value)!=null&&k.isDelete&&((D=(c=li.value)==null?void 0:c.results)==null?void 0:D.length)>0&&((_=(F=li.value)==null?void 0:F.results)!=null&&_.every(E=>typeof E=="number"))?await Ar.batchDeleteInsofDataApi({ids:(G=li.value)==null?void 0:G.results}):(console.log("itemGridData.value",li.value),f.push(await ys(li.value,"gridLayout")))),mo.value)for(const E in mo.value)f.push(await ys((M=mo.value)==null?void 0:M[E],"extend",{target:E,compId:(j=($=mo.value)==null?void 0:$[E])==null?void 0:j.compId},E));await Promise.all(f).then(()=>{qa.ElMessage.success("保存成功"),Br.setRefreshCurStructure(!0)}).catch(E=>{qa.ElMessage.success(E)}),Or.setContentLoading(!1)},Wi=a=>Ni(a),_0=e.computed(()=>{var a;return(a=or.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),gc=e.computed(()=>{var a;return(a=or.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),bc=e.ref(0),kc=e.ref(null),S0="ocr_committed_temp_ids_v1",E0=(a,l)=>`${S0}:${String(a??"")}:${String(l??"")}`,C0=(a,l,r)=>{try{const n=E0(a,l),t=sessionStorage.getItem(n),s=t?JSON.parse(t):[],v=Array.isArray(s)?s:[],p=Array.from(new Set([...v,...r||[]].map(f=>String(f)))).slice(-200);sessionStorage.setItem(n,JSON.stringify(p))}catch{}},Bo=async(a,l="data",r)=>{var t,s,v,p,f,m,k,c,D,F,_,G,M,$,j,E,S,w,b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl,Fl,ja,zl,$l;let n=((v=(s=(t=Pn.value)==null?void 0:t.filter(Ma=>(Ma==null?void 0:Ma.condition)==="child"))==null?void 0:s[0])==null?void 0:v.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let Ma=(p=a==null?void 0:a.fixContent)==null?void 0:p.map(xe=>{let ia={};for(let Ie in xe)Array.isArray(xe==null?void 0:xe[Ie])?ia[Ie]=JSON.stringify(xe==null?void 0:xe[Ie]):ia[Ie]=xe==null?void 0:xe[Ie];return ia}),rl=await A.quoteApi({platId:parseInt((f=fl==null?void 0:fl.value)==null?void 0:f.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});rl=(m=rl==null?void 0:rl.data)==null?void 0:m.result,rl=rl==null?void 0:rl.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let sl=rl==null?void 0:rl.map(xe=>{var ma,ya;let ia={},Ie=Ma==null?void 0:Ma[0],de;return Array.isArray((ma=xe==null?void 0:xe.struct)==null?void 0:ma[0])?de=he.getColumnChild((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0]):de=xe==null?void 0:xe.struct,de=de==null?void 0:de.filter(Je=>(Je==null?void 0:Je.prop)!=="relatedId"),de==null||de.forEach(Je=>{var Xe,Ke;ia[Je.prop]=((Xe=Je==null?void 0:Je.words)!=null&&Xe[0]?(Ie==null?void 0:Ie[(Ke=Je==null?void 0:Je.words)==null?void 0:Ke[0]])??(Ie==null?void 0:Ie[Je==null?void 0:Je.prop]):Ie==null?void 0:Ie[Je==null?void 0:Je.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[ia]}}),ga=[{tableName:(k=a==null?void 0:a.relatedContents)==null?void 0:k.find(xe=>xe==null?void 0:xe.includes("content")),tableContents:Ma}];ga=[...ga,...sl];let xa=await A.quoteApi({platId:parseInt((c=fl==null?void 0:fl.value)==null?void 0:c.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});xa=(F=(D=xa==null?void 0:xa.data)==null?void 0:D.result)==null?void 0:F.filter(xe=>!(ga!=null&&ga.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(xe==null?void 0:xe.id)))),xa=xa==null?void 0:xa.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let La=xa==null?void 0:xa.map(xe=>{var ma,ya,Je,Xe,Ke,pl,Ve;let ia={},Ie=Ma==null?void 0:Ma[0],de;return Array.isArray((ma=xe==null?void 0:xe.struct)==null?void 0:ma[0])?de=he.getColumnChild((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0]):de=xe==null?void 0:xe.struct,de=de==null?void 0:de.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="relatedId"),((Xe=(Je=de==null?void 0:de[0])==null?void 0:Je.words)!=null&&Xe[0]?Ie!=null&&Ie[(pl=(Ke=de==null?void 0:de[0])==null?void 0:Ke.words)==null?void 0:pl[0]]:Ie!=null&&Ie[(Ve=de==null?void 0:de[0])==null?void 0:Ve.prop])?(de==null||de.forEach(Fa=>{var Ea,il;ia[Fa.prop]=((Ea=Fa==null?void 0:Fa.words)!=null&&Ea[0]?(Ie==null?void 0:Ie[(il=Fa==null?void 0:Fa.words)==null?void 0:il[0]])??(Ie==null?void 0:Ie[Fa==null?void 0:Fa.prop]):Ie==null?void 0:Ie[Fa==null?void 0:Fa.prop])??""}),ia.id="1",ia.relatedId=`[${ia.id}]`,delete ia.sort):ia=void 0,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[ia]}});La=La==null?void 0:La.filter(xe=>{var ia;return!((ia=xe==null?void 0:xe.tableContents)!=null&&ia.every(Ie=>Ie===void 0))}),ga=[...ga,...La],await A.pageBatchAddApi({platId:parseInt((_=fl==null?void 0:fl.value)==null?void 0:_.plat_id),changeContents:ga});let Ra=[];ga==null||ga.forEach(xe=>{var ia;(ia=xe==null?void 0:xe.tableContents)==null||ia.forEach(Ie=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ie),request_result:"{}",is_delete:!1,request_table:xe==null?void 0:xe.tableName,request_type:"add"})})}),await A.pageBatchAddApi({platId:parseInt((G=fl==null?void 0:fl.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const Ma=((a==null?void 0:a.ocrRows)||[]).map(xa=>xa==null?void 0:xa.id).filter(xa=>xa!=null),rl=((a==null?void 0:a.ocrRows)||[]).map(xa=>{const La={...xa};return delete La._isOCRRow,delete La._ocrTableId,Object.keys(La).forEach(Ra=>{/(^|\.)证书附件$/.test(Ra)&&Array.isArray(La[Ra])&&(La[Ra]=JSON.stringify(La[Ra].map(xe=>({url:(xe==null?void 0:xe.url)||"",name:(xe==null?void 0:xe.name)||(xe==null?void 0:xe.fileName)||"",fileName:(xe==null?void 0:xe.fileName)||(xe==null?void 0:xe.name)||""})).filter(xe=>xe.url||xe.name)))}),La});let sl=[{tableName:(M=a==null?void 0:a.relatedContents)==null?void 0:M.find(xa=>xa==null?void 0:xa.includes("content")),tableContents:rl}];await A.pageBatchAddApi({platId:parseInt(($=fl==null?void 0:fl.value)==null?void 0:$.plat_id),changeContents:sl});let ga=[];sl==null||sl.forEach(xa=>{var La;(La=xa==null?void 0:xa.tableContents)==null||La.forEach(Ra=>{ga.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ra),request_result:"{}",is_delete:!1,request_table:xa==null?void 0:xa.tableName,request_type:"ocrBatchAdd"})})}),await A.pageBatchAddApi({platId:parseInt((j=fl==null?void 0:fl.value)==null?void 0:j.plat_id),changeContents:[{tableName:"log",tableContents:ga}]}),C0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,Ma)}if((a==null?void 0:a.buttonName)==="编辑"){const rl=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(de=>{const ma={...de};return delete ma._isOCRRow,delete ma._ocrTableId,delete ma._isTemp,delete ma.tableEditType,delete ma.index,ma});let sl=rl==null?void 0:rl.map(de=>{let ma={};for(let ya in de)Array.isArray(de==null?void 0:de[ya])?ma[ya]=JSON.stringify(de==null?void 0:de[ya]):ma[ya]=de==null?void 0:de[ya];return ma}),ga=await A.quoteApi({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});ga=(S=ga==null?void 0:ga.data)==null?void 0:S.result,ga=ga==null?void 0:ga.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))});let xa=(w=sl==null?void 0:sl[0])==null?void 0:w.id,La=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(de=>de==null?void 0:de.includes("content")),tableContents:sl}],Ra=(g=ga==null?void 0:ga.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa,Ea;return JSON.stringify(Ve==null?void 0:Ve.relatedId)!=="{}"&&(Ve==null?void 0:Ve.relatedId)!==""&&(Ve!=null&&Ve.relatedId)?(Fa=Ve==null?void 0:Ve.relatedId)==null?void 0:Fa.includes(parseInt(xa)):(Ve==null?void 0:Ve.sort)===((Ea=sl==null?void 0:sl[0])==null?void 0:Ea.sort)});if((ma==null?void 0:ma.length)>0){let Ve=sl==null?void 0:sl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Me,Sl;Fa[Ia.prop]=((Me=Ia==null?void 0:Ia.words)!=null&&Me[0]?(Ea==null?void 0:Ea[(Sl=Ia==null?void 0:Ia.words)==null?void 0:Sl[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??""}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,delete Fa.relatedId,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:g.filter(de=>de);La=[...La,...Ra];let xe=await A.quoteApi({platId:parseInt((R=fl==null?void 0:fl.value)==null?void 0:R.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});xe=(Y=(I=xe==null?void 0:xe.data)==null?void 0:I.result)==null?void 0:Y.filter(de=>!(La!=null&&La.find(ma=>(ma==null?void 0:ma.tableName)==="content_"+(de==null?void 0:de.id)))),xe=xe==null?void 0:xe.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))});let ia=(le=xe==null?void 0:xe.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa,Ea,il;return JSON.stringify(Ve==null?void 0:Ve.relatedId)!=="{}"&&(Ve==null?void 0:Ve.relatedId)!==""&&(Ve!=null&&Ve.relatedId)?(Fa=Ve==null?void 0:Ve.relatedId)==null?void 0:Fa.includes(parseInt(xa)):(Ve==null?void 0:Ve.sort)===((Ea=sl==null?void 0:sl[0])==null?void 0:Ea.sort)||(Ve==null?void 0:Ve.sort)===(parseInt(((il=sl==null?void 0:sl[0])==null?void 0:il.sort)??"0")+1).toString()});if((ma==null?void 0:ma.length)>0){let Ve=sl==null?void 0:sl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Me,Sl,Il,Ul;((Me=Ia==null?void 0:Ia.words)!=null&&Me[0]?(Ea==null?void 0:Ea[(Sl=Ia==null?void 0:Ia.words)==null?void 0:Sl[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea!=null&&Ea[Ia==null?void 0:Ia.prop])&&(Fa[Ia.prop]=((Il=Ia==null?void 0:Ia.words)!=null&&Il[0]?(Ea==null?void 0:Ea[(Ul=Ia==null?void 0:Ia.words)==null?void 0:Ul[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??"")}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,delete Fa.relatedId,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:le.filter(de=>de);La=[...La,...ia],await A.pageBatchUpdateApi({platId:parseInt((ye=fl==null?void 0:fl.value)==null?void 0:ye.plat_id),changeContents:La});let Ie=[];La==null||La.forEach(de=>{var ma;(ma=de==null?void 0:de.tableContents)==null||ma.forEach(ya=>{Ie.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(ya),request_result:"{}",is_delete:!1,request_table:de==null?void 0:de.tableName,request_type:"update"})})}),await A.pageBatchAddApi({platId:parseInt((Te=fl==null?void 0:fl.value)==null?void 0:Te.plat_id),changeContents:[{tableName:"log",tableContents:Ie}]})}if((a==null?void 0:a.buttonName)==="删除"){let Ma=[{tableName:(V=a==null?void 0:a.relatedContents)==null?void 0:V.find(xe=>xe==null?void 0:xe.includes("content")),tableContents:a==null?void 0:a.fixContent}],rl=await A.quoteApi({platId:parseInt((se=fl==null?void 0:fl.value)==null?void 0:se.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});rl=(ee=rl==null?void 0:rl.data)==null?void 0:ee.result,rl=rl==null?void 0:rl.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let sl=(Ce=(ue=a==null?void 0:a.fixContent)==null?void 0:ue[0])==null?void 0:Ce.id,ga=(Pe=rl==null?void 0:rl.map(xe=>{var Ie,de,ma,ya,Je,Xe;let ia=(Ie=xe==null?void 0:xe.contents)==null?void 0:Ie.filter(Ke=>{var pl,Ve,Fa;return JSON.stringify(Ke==null?void 0:Ke.relatedId)!=="{}"&&(Ke==null?void 0:Ke.relatedId)!==""&&(Ke!=null&&Ke.relatedId)?(pl=Ke==null?void 0:Ke.relatedId)==null?void 0:pl.includes(parseInt(sl)):(Ke==null?void 0:Ke.sort)===((Fa=(Ve=a==null?void 0:a.fixContent)==null?void 0:Ve[0])==null?void 0:Fa.sort)});if((ia==null?void 0:ia.length)>0){let Ke=(de=a==null?void 0:a.fixContent)==null?void 0:de[0];Ke={...Ke,id:(ma=ia==null?void 0:ia[0])==null?void 0:ma.id};let pl={},Ve=Ke,Fa;return Array.isArray((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0])?Fa=he.getColumnChild((Je=xe==null?void 0:xe.struct)==null?void 0:Je[0]):Fa=xe==null?void 0:xe.struct,Fa=Fa==null?void 0:Fa.filter(Ea=>(Ea==null?void 0:Ea.prop)!=="relatedId"),Fa==null||Fa.forEach(Ea=>{var il,Ia;pl[Ea.prop]=((il=Ea==null?void 0:Ea.words)!=null&&il[0]?(Ve==null?void 0:Ve[(Ia=Ea==null?void 0:Ea.words)==null?void 0:Ia[0]])??(Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop]):Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop])??""}),pl.id=(Xe=ia==null?void 0:ia[0])==null?void 0:Xe.id,delete pl.sort,delete pl.relatedId,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[pl]}}else return}))==null?void 0:Pe.filter(xe=>xe);Ma=[...Ma,...ga];let xa=await A.quoteApi({platId:parseInt((ve=fl==null?void 0:fl.value)==null?void 0:ve.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});xa=(ce=(B=xa==null?void 0:xa.data)==null?void 0:B.result)==null?void 0:ce.filter(xe=>!(Ma!=null&&Ma.find(ia=>(ia==null?void 0:ia.tableName)==="content_"+(xe==null?void 0:xe.id)))),xa=xa==null?void 0:xa.filter(xe=>{var ia,Ie;return!((xe==null?void 0:xe.fatherPath)!==""&&((Ie=(ia=xe==null?void 0:xe.quote)==null?void 0:ia[0])==null?void 0:Ie.menus)===(vl==null?void 0:vl.value))});let La=(W=xa==null?void 0:xa.map(xe=>{var Ie,de,ma,ya,Je,Xe;let ia=(Ie=xe==null?void 0:xe.contents)==null?void 0:Ie.filter(Ke=>{var pl,Ve,Fa;return JSON.stringify(Ke==null?void 0:Ke.relatedId)!=="{}"&&(Ke==null?void 0:Ke.relatedId)!==""&&(Ke!=null&&Ke.relatedId)?(pl=Ke==null?void 0:Ke.relatedId)==null?void 0:pl.includes(parseInt(sl)):(Ke==null?void 0:Ke.sort)===((Fa=(Ve=a==null?void 0:a.fixContent)==null?void 0:Ve[0])==null?void 0:Fa.sort)});if((ia==null?void 0:ia.length)>0){let Ke=(de=a==null?void 0:a.fixContent)==null?void 0:de[0];Ke={...Ke,id:(ma=ia==null?void 0:ia[0])==null?void 0:ma.id};let pl={},Ve=Ke,Fa;return Array.isArray((ya=xe==null?void 0:xe.struct)==null?void 0:ya[0])?Fa=he.getColumnChild((Je=xe==null?void 0:xe.struct)==null?void 0:Je[0]):Fa=xe==null?void 0:xe.struct,Fa=Fa==null?void 0:Fa.filter(Ea=>(Ea==null?void 0:Ea.prop)!=="relatedId"),Fa==null||Fa.forEach(Ea=>{var il,Ia;pl[Ea.prop]=((il=Ea==null?void 0:Ea.words)!=null&&il[0]?(Ve==null?void 0:Ve[(Ia=Ea==null?void 0:Ea.words)==null?void 0:Ia[0]])??(Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop]):Ve==null?void 0:Ve[Ea==null?void 0:Ea.prop])??""}),pl.id=(Xe=ia==null?void 0:ia[0])==null?void 0:Xe.id,delete pl.sort,delete pl.relatedId,{tableName:"content_"+(xe==null?void 0:xe.id),tableContents:[pl]}}else return}))==null?void 0:W.filter(xe=>xe);Ma=[...Ma,...La],await A.pageBatchDeleteApi({platId:parseInt((Se=fl==null?void 0:fl.value)==null?void 0:Se.plat_id),changeContents:Ma});let Ra=[];Ma==null||Ma.forEach(xe=>{var ia;(ia=xe==null?void 0:xe.tableContents)==null||ia.forEach(Ie=>{Ra.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Ie),request_result:"{}",is_delete:!1,request_table:xe==null?void 0:xe.tableName,request_type:"delete"})})}),await A.pageBatchAddApi({platId:parseInt((Le=fl==null?void 0:fl.value)==null?void 0:Le.plat_id),changeContents:[{tableName:"log",tableContents:Ra}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let Ma=await A.getPageDataApi({platId:parseInt((Fe=fl==null?void 0:fl.value)==null?void 0:Fe.plat_id),pageName:"menu"});if(Ma=(aa=Ma==null?void 0:Ma.data)==null?void 0:aa.result,Ma!=null&&Ma.find(rl=>(rl==null?void 0:rl.father_name)===vl.value+"/")){yc.value=a,mc.value=Ma==null?void 0:Ma.filter(ga=>(ga==null?void 0:ga.father_name)===vl.value+"/");let rl=(ae=(Na=a==null?void 0:a.columns)==null?void 0:Na.find(ga=>ga==null?void 0:ga.mainKey))==null?void 0:ae.prop,sl=(oe=(ta=a==null?void 0:a.fixContent)==null?void 0:ta[0])==null?void 0:oe[rl];Dt.value=!0,qi.value=[{prop:rl,label:rl,name:rl,value:sl}]}else{let rl=(ca=a==null?void 0:a.fixContent)==null?void 0:ca.map(xa=>{let La={};for(let Ra in xa)Array.isArray(xa==null?void 0:xa[Ra])?La[Ra]=JSON.stringify(xa==null?void 0:xa[Ra]):La[Ra]=xa==null?void 0:xa[Ra];return La.relatedId="",La}),sl=[{tableName:(Ee=a==null?void 0:a.relatedContents)==null?void 0:Ee.find(xa=>xa==null?void 0:xa.includes("content")),tableContents:rl}];await A.pageBatchAddApi({platId:parseInt((ie=fl==null?void 0:fl.value)==null?void 0:ie.plat_id),changeContents:sl});let ga=[];sl==null||sl.forEach(xa=>{var La;(La=xa==null?void 0:xa.tableContents)==null||La.forEach(Ra=>{ga.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ra),request_result:"{}",is_delete:!1,request_table:xa==null?void 0:xa.tableName,request_type:"copyAdd"})})}),await A.pageBatchAddApi({platId:parseInt((Be=fl==null?void 0:fl.value)==null?void 0:Be.plat_id),changeContents:[{tableName:"log",tableContents:ga}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let Ma=((Ja=(oa=(Ue=a==null?void 0:a.columns)==null?void 0:Ue.map(de=>de==null?void 0:de.filter))==null?void 0:oa.filter(de=>de!==""))==null?void 0:Ja[0])??"";Ma=he.analyzeSplitToContent(Ma,","),Ma=(Ma==null?void 0:Ma.find(de=>de==null?void 0:de.includes("@Filter")))??"";let rl=(L=a==null?void 0:a.fixContent)==null?void 0:L.map(de=>{let ma={};for(let ya in de)Array.isArray(de==null?void 0:de[ya])?ma[ya]=JSON.stringify(de==null?void 0:de[ya]):ma[ya]=de==null?void 0:de[ya];return ma}),sl=await A.quoteApi({platId:parseInt((H=fl==null?void 0:fl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});sl=(Z=sl==null?void 0:sl.data)==null?void 0:Z.result,sl=sl==null?void 0:sl.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))});let ga=(fe=(me=a==null?void 0:a.columns)==null?void 0:me[0])==null?void 0:fe.prop,xa=(da=rl==null?void 0:rl[0])==null?void 0:da[ga],La=[{tableName:(Qe=a==null?void 0:a.relatedContents)==null?void 0:Qe.find(de=>de==null?void 0:de.includes("content")),tableContents:rl}],Ra=(te=sl==null?void 0:sl.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa;return(Fa=Object.values(Ve))==null?void 0:Fa.find(Ea=>Ea===xa)});if((ma==null?void 0:ma.length)>0){let Ve=rl==null?void 0:rl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Me,Sl;Fa[Ia.prop]=((Me=Ia==null?void 0:Ia.words)!=null&&Me[0]?(Ea==null?void 0:Ea[(Sl=Ia==null?void 0:Ia.words)==null?void 0:Sl[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop]):Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??""}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:te.filter(de=>de);La=[...La,...Ra];let xe=await A.quoteApi({platId:parseInt((pa=fl==null?void 0:fl.value)==null?void 0:pa.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});if(xe=(We=(Ne=xe==null?void 0:xe.data)==null?void 0:Ne.result)==null?void 0:We.filter(de=>!(La!=null&&La.find(ma=>(ma==null?void 0:ma.tableName)==="content_"+(de==null?void 0:de.id)))),xe=xe==null?void 0:xe.filter(de=>{var ma,ya;return!((de==null?void 0:de.fatherPath)!==""&&((ya=(ma=de==null?void 0:de.quote)==null?void 0:ma[0])==null?void 0:ya.menus)===(vl==null?void 0:vl.value))}),Ma&&Ma!==""){(Ma==null?void 0:Ma[(Ma==null?void 0:Ma.length)-1])===","&&(Ma=Ma==null?void 0:Ma.slice(0,(Ma==null?void 0:Ma.length)-1)),Ma=(Da=(Aa=Ma==null?void 0:Ma.replace("(",vo))==null?void 0:Aa.split(vo))==null?void 0:Da[1],Ma=Ma==null?void 0:Ma.slice(0,(Ma==null?void 0:Ma.length)-1),(Ma==null?void 0:Ma[0])==="*"&&(Ma="{"+((ra=(Ze=Ma==null?void 0:Ma.replace("{",vo))==null?void 0:Ze.split(vo))==null?void 0:ra[1])),Ma=(pe=Ma==null?void 0:Ma.replaceAll("{",""))==null?void 0:pe.replaceAll("}","");let de=he.calculatorAndToOr(Ma);de=de==null?void 0:de[0];let ma;if((U=Object.values(de))!=null&&U.some(ya=>(ya==null?void 0:ya[0])==="*")){let ya=(ze=(q=Pn.value)==null?void 0:q.find(Je=>(Je==null?void 0:Je.condition)==="child"))!=null&&ze.value?(Zr==null?void 0:Zr.value)+"/"+((la=(_e=Pn.value)==null?void 0:_e.find(Je=>(Je==null?void 0:Je.condition)==="child"))==null?void 0:la.value):Zr==null?void 0:Zr.value;ma=await Kr(ya,!1)}for(let ya in de)if(((fa=de==null?void 0:de[ya])==null?void 0:fa[0])==="*"){let Je=(Sa=(Va=(ha=de[ya])==null?void 0:ha.slice(1,(ka=de[ya])==null?void 0:ka.length))==null?void 0:Va.split(":"))==null?void 0:Sa[0],Xe=(Za=(Oe=de[ya])==null?void 0:Oe.split(":"))==null?void 0:Za[1],Ke=(Ha=ma==null?void 0:ma.filter(pl=>(pl==null?void 0:pl.name)===Je))==null?void 0:Ha[0];Ke=(Yl=(xl=Ke==null?void 0:Ke.compData)==null?void 0:xl.find(pl=>(pl==null?void 0:pl.key)==="tableContents"))==null?void 0:Yl.contents,Ke=(kl=Ke==null?void 0:Ke[0])==null?void 0:kl[Xe],de[ya]=Ke}Ma=((Fl=Object.values(de))==null?void 0:Fl[0])??""}let ia=(ja=xe==null?void 0:xe.map(de=>{var ya,Je,Xe,Ke,pl;let ma=(ya=de==null?void 0:de.contents)==null?void 0:ya.filter(Ve=>{var Fa;return(Fa=Object.values(Ve))==null?void 0:Fa.find(Ea=>Ea===(Ma===""?xa:Ma))});if((ma==null?void 0:ma.length)>0){let Ve=rl==null?void 0:rl[0];Ve={...Ve,id:(Je=ma==null?void 0:ma[0])==null?void 0:Je.id};let Fa={},Ea=Ve,il;return Array.isArray((Xe=de==null?void 0:de.struct)==null?void 0:Xe[0])?il=he.getColumnChild((Ke=de==null?void 0:de.struct)==null?void 0:Ke[0]):il=de==null?void 0:de.struct,il=il==null?void 0:il.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),il==null||il.forEach(Ia=>{var Sl,Il,Ul,ql;let Me=(Sl=a==null?void 0:a.columns)==null?void 0:Sl.find(Ql=>{var dr,Ol,pr;return((Ol=(dr=Ql==null?void 0:Ql.words)==null?void 0:dr[0])==null?void 0:Ol.replaceAll("'",""))===(Ia==null?void 0:Ia.prop)&&((pr=Ql==null?void 0:Ql.functionRelatedWords)==null?void 0:pr.length)>0});Me=(Il=Me==null?void 0:Me.prop)==null?void 0:Il.replaceAll("'",""),Fa[Ia.prop]=((Ul=Ia==null?void 0:Ia.words)!=null&&Ul[0]?(Ea==null?void 0:Ea[(ql=Ia==null?void 0:Ia.words)==null?void 0:ql[0]])??(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??(Ea==null?void 0:Ea[Me]):(Ea==null?void 0:Ea[Ia==null?void 0:Ia.prop])??(Ea==null?void 0:Ea[Me]))??void 0}),Fa.id=(pl=ma==null?void 0:ma[0])==null?void 0:pl.id,delete Fa.sort,{tableName:"content_"+(de==null?void 0:de.id),tableContents:[Fa]}}else return}))==null?void 0:ja.filter(de=>de);La=[...La,...ia],await A.pageBatchUpdateApi({platId:parseInt((zl=fl==null?void 0:fl.value)==null?void 0:zl.plat_id),changeContents:La});let Ie=[];La==null||La.forEach(de=>{var ma;(ma=de==null?void 0:de.tableContents)==null||ma.forEach(ya=>{Ie.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ya),request_result:"{}",is_delete:!1,request_table:de==null?void 0:de.tableName,request_type:"method"})})}),await A.pageBatchAddApi({platId:parseInt(($l=fl==null?void 0:fl.value)==null?void 0:$l.plat_id),changeContents:[{tableName:"log",tableContents:Ie}]})}Br.setRefreshCurStructure(!0),await xt(a)},kt=async(a,l,r)=>{var t;let n=a==null?void 0:a.find(s=>(s==null?void 0:s.id)===l);if(n){let s=(t=n.compData)==null?void 0:t.map(v=>{var p;if((v==null?void 0:v.key)==="tableContents"){let f={...v,contents:r};return f.contents=(p=(f==null?void 0:f.contents)??[])==null?void 0:p.map(m=>{let k={};for(let c in m)JSON.stringify(m==null?void 0:m[c])==="{}"?k[c]="":k[c]=m==null?void 0:m[c];return k}),f}return v});return n.compData=await Et(s,{}),a=a==null?void 0:a.map(v=>((v==null?void 0:v.id)===(n==null?void 0:n.id)&&(v=n),v)),a}else{let s=a==null?void 0:a.filter(p=>{var f;return(p==null?void 0:p.children)&&((f=p==null?void 0:p.children)==null?void 0:f.length)>0||(p==null?void 0:p.comp)==="Tabs"}),v=s==null?void 0:s.map(async p=>{var f;return p!=null&&p.children&&((f=p==null?void 0:p.children)==null?void 0:f.length)>0?p.children=await kt(p==null?void 0:p.children,l,r):p.compData=await kt(p==null?void 0:p.compData,l,r),p});return s=await Promise.all(v),s}},xt=async a=>{var s,v,p,f,m,k,c;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(D=>D==null?void 0:D.includes("content_"));if(!l)return;let r=await A.getAllTables({platId:parseInt((v=fl==null?void 0:fl.value)==null?void 0:v.plat_id),tableNames:l??[]});if(r=(f=(p=r==null?void 0:r.data)==null?void 0:p.result)==null?void 0:f[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(D=>{D==null||delete D.source_table;const F={};for(let _ in D){const G=D==null?void 0:D[_],M=G&&Object.prototype.toString.call(G)==="[object Object]"&&Object.keys(G).length===0,$=Array.isArray(G)&&G.length===0;G==null||G==="{}"||M||$?F[_]="":F[_]=G}return F});let n=(k=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:k[1],t=await kt(or.value,n,r);or.value=(c=or.value)==null?void 0:c.map(D=>{var F,_;return(F=t==null?void 0:t[0])!=null&&F.tabInform&&((_=t==null?void 0:t[0])==null?void 0:_.tabInform)===(D==null?void 0:D.tabInform)?D=t==null?void 0:t[0]:(D!=null&&D.name?(D==null?void 0:D.name)===(t==null?void 0:t.name):(D==null?void 0:D.id)===(t==null?void 0:t.id))&&(D=t),D})},D0=a=>{let l=qi.value;qi.value=l==null?void 0:l.map(r=>(r.value=a==null?void 0:a[r==null?void 0:r.prop],r))},N0=async()=>{var D,F,_,G,M,$,j,E,S,w;let a=yc.value,l=mc.value,r=(F=(D=a==null?void 0:a.columns)==null?void 0:D.find(b=>b==null?void 0:b.mainKey))==null?void 0:F.prop,n=(G=(_=qi.value)==null?void 0:_[0])==null?void 0:G.value,t=(M=a==null?void 0:a.fixContent)==null?void 0:M.map(b=>{var R;let g={};for(let I in b)Array.isArray(b==null?void 0:b[I])?g[I]=JSON.stringify(b==null?void 0:b[I]):g[I]=b==null?void 0:b[I];return(R=a==null?void 0:a.columns)==null||R.forEach(I=>{(I==null?void 0:I.formType)==="Upload"&&(g==null?void 0:g[I==null?void 0:I.prop])===""&&(g[I==null?void 0:I.prop]="{}")}),g[r]=n,g}),s=[{tableName:($=a==null?void 0:a.relatedContents)==null?void 0:$.find(b=>b==null?void 0:b.includes("content")),tableContents:t}];await A.pageBatchAddApi({platId:parseInt((j=fl==null?void 0:fl.value)==null?void 0:j.plat_id),changeContents:s}),l=l==null?void 0:l.filter(b=>{var g,R,I;return(I=b==null?void 0:b.object_name)==null?void 0:I.includes((R=(g=a==null?void 0:a.fixContent)==null?void 0:g[0])==null?void 0:R[r])});let v=[],p=new Map;l==null||l.forEach(b=>{v.push(`content_${b==null?void 0:b.object_id}`),v.push(`struct_${b==null?void 0:b.object_id}`),p.set(b==null?void 0:b.object_id,b)});let f=await A.getAllTables({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),tableNames:v??[]});f=(S=f==null?void 0:f.data)==null?void 0:S.result;let m=[],k=[];f=he.chunk(f,2),f==null||f.forEach(b=>{var I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na,ae;let g=p.get((ye=(le=(Y=(I=b==null?void 0:b[1])==null?void 0:I[0])==null?void 0:Y.source_table)==null?void 0:le.split("_"))==null?void 0:ye[1]),R=(se=(V=(Te=g==null?void 0:g.object_name)==null?void 0:Te.split("/"))==null?void 0:V.filter((ta,oe)=>{var ca,Ee;return((Ee=(ca=g==null?void 0:g.object_name)==null?void 0:ca.split("/"))==null?void 0:Ee.length)-1!==oe}))==null?void 0:se.join("/");if(R=R+"/"+n,k!=null&&k.find(ta=>(ta==null?void 0:ta.path)===R)||k.push({fatherPath:g==null?void 0:g.father_name,isShow:g==null?void 0:g.is_show,path:R}),((ue=(ee=b==null?void 0:b[1])==null?void 0:ee[0])==null?void 0:ue.类型)==="Table"){let ta=((ve=(Pe=(Ce=b==null?void 0:b[1])==null?void 0:Ce[0])==null?void 0:Pe.结构)==null?void 0:ve.contents)??[],oe=ll.safeClone(ta);Array.isArray(oe==null?void 0:oe[0])&&(oe=he.getColumnChild(oe==null?void 0:oe[0]));let ca=[];if(((B=b==null?void 0:b[0])==null?void 0:B.length)>0&&(ca=(ce=b==null?void 0:b[0])==null?void 0:ce.map(Ee=>oe==null?void 0:oe.map(Be=>(Be=(Ee==null?void 0:Ee[Be==null?void 0:Be.prop])??"",Be)))),m!=null&&m.find(Ee=>(Ee==null?void 0:Ee.key)===R)){let Ee=(W=m==null?void 0:m.find(Be=>(Be==null?void 0:Be.key)===R))==null?void 0:W.contents;Ee.push({isShow:g==null?void 0:g.is_show,filter:((Fe=(Le=(Se=b==null?void 0:b[1])==null?void 0:Se[0])==null?void 0:Le.引用)==null?void 0:Fe.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:ta,tableContents:ca});let ie=m==null?void 0:m.findIndex(Be=>(Be==null?void 0:Be.key)===R);m[ie].contents=Ee}else m.push({key:R,contents:[{isShow:g==null?void 0:g.is_show,filter:((ae=(Na=(aa=b==null?void 0:b[1])==null?void 0:aa[0])==null?void 0:Na.引用)==null?void 0:ae.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:ta,tableContents:ca}]})}});let c=[];c.push({key:"menuPath",contents:k}),c=[...c,...m],await A.createPlatFormDataApi({platId:parseInt((w=fl==null?void 0:fl.value)==null?void 0:w.plat_id),changeData:c}),Dt.value=!1,Br.setRefreshTable(!0)},To=async(a,l)=>{},Ao=async a=>{or.value=await he.getDeepDiffItems(a),Br.setItemData(or.value),Br.setOriginalData(or.value)};e.ref();const B0=e.ref(null),T0=()=>{var a,l;console.log("倒计时结束时"),A.ElMessageBox.alert(`超时未提交,【${(l=(a=vl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},xc=e.ref([]),A0=e.computed(()=>{var a,l;return(l=(a=gt.value)==null?void 0:a[vl.value])==null?void 0:l.filter(r=>{var n;return((n=r==null?void 0:r.key)==null?void 0:n.type)==="gridLayout"})});e.watch(()=>[y0.value],()=>{dn.setSelectTitle([]),dn.setChooseTitle([])},{deep:!0});e.watch(()=>No.value,async(a,l)=>{var n,t,s,v,p,f;let r=(n=No.value)==null?void 0:n.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Zr.value);if((r==null?void 0:r.length)>0){Or.setContentLoading(!0);let m=((t=r==null?void 0:r[0])==null?void 0:t.relatedContent)??(vl==null?void 0:vl.value),k=m+"/"+((s=r==null?void 0:r[0])==null?void 0:s.value),c=!!((v=r==null?void 0:r[0])!=null&&v.parentContent),D=await Kr(k,c,{originPath:m});D=(p=D==null?void 0:D.filter(G=>G))==null?void 0:p.map(G=>(G.isShow=!0,G)),console.log(D,"loadingContents");let F=await he.getDeepDiffItems(D),_=F==null?void 0:F.filter(G=>G==null?void 0:G.choice);Oo.setSelectTab((f=_==null?void 0:_[0])==null?void 0:f.choiceName),F=F==null?void 0:F.filter(G=>{var M;return!(G!=null&&G.choiceName)||(G==null?void 0:G.choiceName)===((M=_==null?void 0:_[0])==null?void 0:M.choiceName)}),or.value=F,Or.setContentLoading(!1)}});const z0=(a,l)=>{setTimeout(async()=>{var p,f,m;let r=(p=No.value)==null?void 0:p.filter(k=>(k==null?void 0:k.condition)==="child"&&(k==null?void 0:k.value)!==""&&(k==null?void 0:k.parentContent)!==Zr.value),n=vl==null?void 0:vl.value,t=vl==null?void 0:vl.value;(r==null?void 0:r.length)>0&&(t=((f=r==null?void 0:r[0])==null?void 0:f.relatedContent)??(vl==null?void 0:vl.value),n=t+"/"+((m=r==null?void 0:r[0])==null?void 0:m.value));let s=await Kr(n,!1,{originPath:t});s=s==null?void 0:s.map(k=>(k.isShow=!0,k));let v=await he.getDeepDiffItems(s);or.value=v==null?void 0:v.filter(k=>!(k!=null&&k.step)||(k==null?void 0:k.step)===(a==null?void 0:a.title))},10)},M0=a=>{setTimeout(async()=>{var v,p,f;let l=(v=No.value)==null?void 0:v.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Zr.value),r=vl==null?void 0:vl.value,n=vl==null?void 0:vl.value;(l==null?void 0:l.length)>0&&(n=((p=l==null?void 0:l[0])==null?void 0:p.relatedContent)??(vl==null?void 0:vl.value),r=n+"/"+((f=l==null?void 0:l[0])==null?void 0:f.value));let t=await Kr(r,!1,{originPath:n});t=t==null?void 0:t.map(m=>(m.isShow=!0,m)),Oo.setSelectTab(a);let s=await he.getDeepDiffItems(t);or.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>m0.value,a=>{a!=null&&a.length||(or.value=[])},{immediate:!0});e.watch(()=>[vl.value],async a=>{var s,v,p,f;if(!vl.value)return;if(vl.value==="/"){or.value=[];return}Or.setCurrentMenuPath(vl.value),Br.setLockingPage(""),or.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Di.value=!1,Or.setContentLoading(!0),vc.value=!0;let r=a==null?void 0:a[0],n=r,t=(v=Pn.value)==null?void 0:v.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==vl.value&&!(m!=null&&m.relatedContent));if((t==null?void 0:t.length)>0&&(r=r+"/"+((p=t==null?void 0:t[0])==null?void 0:p.value)),r==="系统管理/日志管理")or.value=await d0("log");else{let m=await Kr(r,!0,{originPath:n});m=m==null?void 0:m.map(D=>(D.isShow=!0,D));let k=await he.getDeepDiffItems(m),c=k==null?void 0:k.filter(D=>D==null?void 0:D.choice);Oo.setSelectTab((f=c==null?void 0:c[0])==null?void 0:f.choiceName),or.value=k==null?void 0:k.filter(D=>{var F;return!(D!=null&&D.choiceName)||(D==null?void 0:D.choiceName)===((F=c==null?void 0:c[0])==null?void 0:F.choiceName)})}Or.setContentLoading(!1),Br.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Br.setItemData(or.value),Br.setOriginalData(or.value),Br.setRefreshTable(!1),e.nextTick(()=>{Hn.value=Hn.value++,Di.value=!0})},{immediate:!0});e.watch(()=>[ms.value],async()=>{var a,l,r,n;if(ms.value){or.value=[];let t=e.getCurrentInstance();(a=t==null?void 0:t.scope)==null||a.stop(),t=null,Di.value=!1,Or.setContentLoading(!0),vc.value=!0;let s=Zr==null?void 0:Zr.value,v=s,p=(l=Pn.value)==null?void 0:l.filter(c=>(c==null?void 0:c.condition)==="child"&&(c==null?void 0:c.value)!==""&&(c==null?void 0:c.parentContent)!==(Zr==null?void 0:Zr.value));(p==null?void 0:p.length)>0&&(s=s+"/"+((r=p==null?void 0:p[0])==null?void 0:r.value));let f=await Kr(s,!0,{originPath:v});f=f==null?void 0:f.map(c=>(c.isShow=!0,c));let m=await he.getDeepDiffItems(f),k=m==null?void 0:m.filter(c=>c==null?void 0:c.choice);if(Oo.setSelectTab((n=k==null?void 0:k[0])==null?void 0:n.choiceName),or.value=m==null?void 0:m.filter(c=>{var D;return!(c!=null&&c.choiceName)||(c==null?void 0:c.choiceName)===((D=k==null?void 0:k[0])==null?void 0:D.choiceName)}),Or.setContentLoading(!1),Br.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Br.setItemData(or.value),Br.setOriginalData(or.value),Br.setRefreshTable(!1),(p==null?void 0:p.length)>0){let c=[...Pn.value,...p];dn.setSelectTitle(c)}e.nextTick(()=>{Hn.value=Hn.value++,Di.value=!0})}},{immediate:!0,deep:!0});const I0=async()=>{Or.setLinkMenuInfo(null),Or.setActiveMenuPath(v0.value),or.value=null,Br.setRouteToChildPath(""),Or.setChildMenu("")},O0=a=>new RegExp("button","i").test(a),L0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),wc=a=>{if(L0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Or.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},_c=async(a,l,r)=>{var D,F,_,G,M,$,j,E,S,w,b,g;let n="",t="";for(let R in l)(l==null?void 0:l[R])===a&&(t=R);r==null||r.forEach(R=>{(R==null?void 0:R.prop)===t&&(n=R==null?void 0:R.fatherPath)});let s=n===""?vl.value:n;n!==""&&Or.setCurrentMenuPath(s),Or.setCurrentMenuPath(s+"/"+a),Or.setContentLoading(!0),or.value=await Kr(s+"/"+a,!0,{originPath:s+"/",row:l});let v=await Kr(s,!1),p=(D=v==null?void 0:v.filter(R=>(R==null?void 0:R.comp)==="Table"))==null?void 0:D[0],f=((M=(G=(_=(F=p==null?void 0:p.compData)==null?void 0:F.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:_.contents)==null?void 0:G[0])==null?void 0:M.prop)??((w=(S=(E=(j=($=p==null?void 0:p.compData)==null?void 0:$.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:j.contents)==null?void 0:E[0])==null?void 0:S[0])==null?void 0:w.prop),m=(g=(b=p==null?void 0:p.compData)==null?void 0:b.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:g.contents;m=m==null?void 0:m.map(R=>({label:R==null?void 0:R[f],value:R==null?void 0:R[f]}));let k=Pn.value,c={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};k=k==null?void 0:k.filter(R=>(R==null?void 0:R.condition)!=="child"),k.push(c),dn.setSelectTitle(k),dn.setChooseTitle([c]),Or.setContentLoading(!1),Br.setExtraContents([]),dn.setSelectIndex(""),dn.setSelectMenu(""),Br.setItemData(or.value),Br.setOriginalData(or.value)},$0=a=>{bc.value=a},_i=e.reactive({index:0,comp:null}),R0=e.computed(()=>{var a;return(a=or.value)==null?void 0:a.map((l,r)=>({id:l.id,name:l.name,status:V0(l,r)}))}),Sc=(a,l)=>{var f,m,k,c,D;const r=l?a:a-2,n=(f=or.value)==null?void 0:f[r],t=(k=(m=n==null?void 0:n.compData)==null?void 0:m.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:k.contents,s=t==null?void 0:t.findIndex(F=>(F==null?void 0:F.isMainKey)&&(F==null?void 0:F.label)!=="操作"),v=s===-1?0:s,p=(D=(c=n==null?void 0:n.compData)==null?void 0:c.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:D.contents;return{valid:p==null?void 0:p.every(F=>F==null?void 0:F[v+1]),length:(p==null?void 0:p.length)||0}},V0=(a,l)=>{var n;let r="process";if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){const{valid:t,length:s}=Sc(l,!0);_i.index===l?r="process":s===0?r="wait":r=t?"success":"error"}return r},Ec=a=>{var r,n,t,s,v;const l=a+1;if(l>1&&((t=(n=(r=or.value)==null?void 0:r[a])==null?void 0:n.comp)==null?void 0:t.toUpperCase())==="TABLE"){const{valid:p}=Sc(l);p?(_i.index=l,_i.comp=(s=or.value)==null?void 0:s[a]):qa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else _i.index=l,_i.comp=(v=or.value)==null?void 0:v[a]},Cc=e.computed(()=>{var a,l;return(l=(a=gc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Cc.value,a=>{a&&Ec(0)},{immediate:!0});const F0={class:"table-content"},P0={class:"menu-config-wrap"},j0=["onClick"],H0={key:0,class:"viewport-wrap"},U0=["onClick"],q0={title:"选择显示列信息"},W0={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"}},K0=["title"],G0={class:"col-operate-wrap"},Y0={key:0,class:"col-operate-radio-wrapper"},J0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},X0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},Z0={class:"pop-view"},Q0={class:"pop-wrapper"},e3={class:"file-list-pop"},a3=["title","onClick"],l3=["onClick"],r3=["onClick"],n3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},i3={class:"form-content"},o3={key:0,class:"dialog-footer"},t3={class:"dialog-footer"},s3={class:"ocr-dialog-content"},c3={class:"ocr-steps"},u3={key:0,class:"ocr-action-buttons"},d3={key:1,class:"ocr-preview-area"},p3={class:"ocr-file-grid"},f3={class:"file-thumbnail"},h3=["src"],v3={key:1,class:"thumbnail-placeholder"},m3={class:"progress-svg",viewBox:"0 0 36 36"},y3=["stroke","stroke-width","stroke-dasharray"],g3={key:0,class:"progress-icon"},b3={key:1,class:"progress-icon"},k3=["onClick"],x3={class:"file-name"},w3={key:0,class:"ocr-recognize-button"},_3={key:2,class:"ocr-progress-section"},S3={key:3,class:"ocr-confirm-area"},E3={class:"ocr-preview-tip"},C3={class:"ocr-preview-table"},D3={style:{display:"flex","align-items":"center",gap:"8px"}},N3={key:0},B3={key:4,class:"ocr-success-area"},T3={key:0,class:"ocr-dialog-footer"},A3={class:"form-content"},z3={style:{width:"100%",margin:"0","font-size":"14px","font-weight":"600"}},M3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},I3={style:{display:"flex"}},gs="ss-ocr-upload-history",O3="ss-ocr-cert-history-v1",L3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(a,{emit:l}){var Vt;const r=e.ref([]),n=Ct(A.pinia),t=e.ref(null),s=e.ref(new Set),v=e.ref(new Map),p=e.ref(!1),f=e.ref(new Map),m=new Map,k=e.ref(new Map),c=a,D=e.ref((c==null?void 0:c.allowSelect)??!0),F=e.ref(((Vt=c==null?void 0:c.config)==null?void 0:Vt.showIndex)??!0),_=e.ref(),G=e.ref(!0),M=e.ref(!1),$=e.ref([]),j={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},E=e.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),S=he.useOriginalState(A.pinia);let w="$R";const{originalPath:b}=A.storeToRefs(S),g=b.value,R=e.computed(()=>{var h;const d=(h=he.getAllLeafNodes(V.value)||[])==null?void 0:h.filter(N=>(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate");return d.length>0?d.every(N=>!!(N!=null&&N.sortable)):!1});e.computed(()=>{var h;return(h=V.value)==null?void 0:h.every(N=>N==null?void 0:N.filterable)}),e.computed(()=>{var h;return(h=V.value)==null?void 0:h.every(N=>N==null?void 0:N.operable)});const I=e.ref(!0),Y=e.ref([]),le=e.reactive({column:{},status:!1,text:"合计"}),ye=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Te=l,V=e.ref([]),se=e.ref([]),ee=e.ref([]),ue=e.reactive({prop:"",order:null}),Ce=e.ref([]),Pe=e.ref(!1),ve=e.ref(!1),B=e.ref(null),{isUseBackdrop:ce,initTrackFileType:W,getFileExtension:Se,setData:Le,getFileInfo:Fe,getFilesInfo:aa}=_o.useThreeSystem(),Na=e.ref([]),ae=e.ref(!1),ta=e.ref(),oe=A.useMenuState(),{importLoading:ca,activeMenuPath:Ee,contentLoading:ie,linkMenuInfo:Be}=A.storeToRefs(oe),Ue=he.useTableComp(A.pinia),oa=A.useModelComp(A.pinia),Ja=Un(A.pinia),{extraContents:L,cacheUpdatingData:H,tableViewContents:Z,tableLoading:me,pageMapState:fe,lockingPage:da}=A.storeToRefs(oa),{selectTab:Qe}=A.storeToRefs(Ja),{compType:te,hasEditable:pa}=Gs.useRole(),Ne=e.ref([]),We=e.ref([]),Aa=e.ref(new Map);e.ref(!1);const Da=e.ref("");e.ref();const Ze=e.ref(!0),ra=e.ref(0),pe=e.ref(!0),U=e.ref(""),q=e.ref(!1),ze=e.ref(null);e.ref([]);const _e=e.ref({label:"查看三维模型"}),la=e.ref(!1),fa=e.ref(),ka=e.ref([]),ha=e.ref([]),Va=e.ref(!1),Sa=e.ref([]),Oe=e.ref([]),Za=e.ref([]),Ha=e.ref([]),xl=e.ref([]),Yl=()=>{try{const d=localStorage.getItem(gs),h=d?JSON.parse(d):[];xl.value=Array.isArray(h)?h:[]}catch{xl.value=[]}},kl=()=>{try{localStorage.setItem(gs,JSON.stringify(xl.value||[]))}catch{}},Fl=d=>{var re,ne,K;if(!d)return;const h=d.url||((re=d==null?void 0:d.uploadResult)==null?void 0:re.url)||"",N=d.name||((ne=d==null?void 0:d.uploadResult)==null?void 0:ne.name)||((K=d==null?void 0:d.uploadResult)==null?void 0:K.fileName)||"";if(!h&&!N)return;const z={name:N,url:h,ts:Date.now()},P=String(z.name||"").trim().toLowerCase(),C=(xl.value||[]).findIndex(be=>String((be==null?void 0:be.name)||"").trim().toLowerCase()===P);C>-1&&xl.value.splice(C,1),xl.value.unshift(z),xl.value.length>20&&(xl.value=xl.value.slice(0,20)),kl()};Yl();const ja=(d,h)=>`${O3}:${String(d??"")}:${String(h??"")}`,zl=(d,h)=>{try{const N=sessionStorage.getItem(ja(d,h)),z=N?JSON.parse(N):[];return Array.isArray(z)?z:[]}catch{return[]}},$l=(d,h,N)=>{try{sessionStorage.setItem(ja(d,h),JSON.stringify(Array.isArray(N)?N:[]))}catch{}},Ma=(d,h,N)=>{if(!h)return;const z=zl(d,h),P=[N,...z||[]].filter(Boolean).slice(0,1);return $l(d,h,P),P},rl=(d,h,N)=>{if(!h||!N)return;const z=ja(d,h),P=ja(d,N);try{const C=sessionStorage.getItem(z);if(!C)return;const re=(()=>{try{const be=JSON.parse(C);return Array.isArray(be)?be:[]}catch{return[]}})(),ne=zl(d,N),K=[...re,...ne||[]].filter(Boolean).sort((be,Ae)=>Number((Ae==null?void 0:Ae.ts)||0)-Number((be==null?void 0:be.ts)||0)).slice(0,1);sessionStorage.setItem(P,JSON.stringify(K)),sessionStorage.removeItem(z)}catch{}},sl=e.ref(!1),ga=e.ref(!1),xa=e.ref([]),La=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const Ra=e.ref(!1),xe=e.ref([]),ia=e.ref(1),Ie=e.ref(new Map),de=e.ref(new Map),ma=e.ref(0),ya=e.ref(!1),Je=e.ref([]),Xe=e.ref([]),Ke=d=>{var h;try{const N=(h=he.getAllLeafNodes(V.value)||[])==null?void 0:h.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(N==null?void 0:N.find(z=>(z==null?void 0:z.prop)===d||(z==null?void 0:z.label)===d))||null}catch{return null}},pl=d=>{const h=Ke(d),N=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"Input";return ll.getComponent(N)||ll.getComponent("Input")},Ve=e.ref([]),Fa=e.ref(null),Ea=e.ref([]),il=e.ref(null),Ia=e.ref(""),Me=e.ref(!1),Sl=e.ref([]),Il=e.ref(""),Ul=e.ref(!1),ql=e.ref([]),Ql=e.ref([]),dr=e.ref([]),Ol=e.ref(null),pr=e.ref([]),Fr=e.ref("");e.computed(()=>{var d;try{const h=(d=he.getAllLeafNodes(V.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),N=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&N.set(z.label,z.prop)}),N.get("编号")||""}catch{return""}});const Pl=e.computed(()=>{var d;try{const h=(d=he.getAllLeafNodes(V.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),N=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&N.set(z.label,z.prop)}),N.get("名称")||""}catch{return""}}),ar=e.computed(()=>{var d;try{const h=(d=he.getAllLeafNodes(V.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),N=new Map;return h==null||h.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&N.set(z.label,z.prop)}),N.get("制造厂")||""}catch{return""}}),Pr=()=>{Ul.value=!1,ql.value=[],Ql.value=[],dr.value=[],Ol.value=null,pr.value=[],Fr.value=""},Tr=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,jr=(d,h)=>{const N=(d==null?void 0:d.ocrRow)||{};for(const P of Object.keys(N))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Tr(N[P])&&(h[P]=N[P]);const z=We.value.find(P=>P.id===h.id);if(z)for(const P of Object.keys(N))P==="id"||P==="_isOCRRow"||P==="_ocrTableId"||Tr(N[P])&&(z[P]=N[P]);Aa.value&&Aa.value.set(h.id,h),Ma(c==null?void 0:c.index,h.id,d==null?void 0:d.versionItem),Ql.value=[...Ql.value||[],JSON.parse(JSON.stringify(h))]},Ir=async(d,h=null)=>{var N,z,P,C,re,ne,K;try{const be=(N=he.getAllLeafNodes(V.value)||[])==null?void 0:N.filter(wa=>(wa==null?void 0:wa.type)!=="operate"&&(wa==null?void 0:wa.label)!=="操作"&&(wa==null?void 0:wa.prop)!=="operate"),Ae=new Map;be==null||be.forEach(wa=>{wa!=null&&wa.label&&(wa!=null&&wa.prop)&&Ae.set(wa.label,wa.prop)});const He=Ae.get("系统编号")||Ae.get("编号");if(!He){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const $e=h||Ol.value;if((Array.isArray($e==null?void 0:$e.result)?$e.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let wa=0;wa<d.length;wa++){const Oa=d[wa],za=Oa[He];if(!za){console.warn(`第 ${wa+1} 条匹配行缺少系统编号,跳过`);continue}const Ye=`设备管理/试验设备/${za}`,Qa=await A.getPageDataApi({platId:parseInt((z=cl.value)==null?void 0:z.plat_id),pageName:Ye});if(!((P=Qa==null?void 0:Qa.data)!=null&&P.result)||!Array.isArray(Qa.data.result)){console.warn(`未找到详情页数据: ${Ye}`);continue}const ba=Qa.data.result.find(na=>(na==null?void 0:na.property_name)==="校检记录");if(!ba){console.warn(`详情页 ${Ye} 中未找到校检记录表`);continue}const el=(C=ba.contents)==null?void 0:C.find(na=>(na==null?void 0:na.key)&&na.key.startsWith("content_"));if(!el||!el.key){console.warn("校检记录表中未找到 content item");continue}const ke=el.key,$a=Array.isArray(el.value)?el.value:[];if($a.length>=5){const we=[...$a].sort((sa,Ba)=>{const nl=Number((sa==null?void 0:sa.create_time)||0),Wa=Number((Ba==null?void 0:Ba.create_time)||0);return nl-Wa})[0];we!=null&&we.id&&await A.pageBatchDeleteApi({platId:parseInt((re=cl.value)==null?void 0:re.plat_id),changeContents:[{tableName:ke,tableContents:[{id:we.id}]}]})}const va=(ne=be==null?void 0:be.find(na=>(na==null?void 0:na.label)==="证书附件"))==null?void 0:ne.prop,Ca=String(Date.now()),_a={id:Ca},T=$a[0]||{},X=new Date().toISOString().split("T")[0];if(Object.keys(T||{}).forEach(na=>{if(na!=="id"){if(na==="证书附件"){_a[na]="";return}if(na==="校检日期"||na==="检校日期"){_a[na]=Oa[na]||Oa.校检日期||Oa.检校日期||X;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(na)){_a[na]=Oa[na]??"";return}_a[na]=Oa[na]??""}}),va&&Oa[va]){const na=Oa[va];if(Array.isArray(na)&&na.length>0)_a.证书附件=JSON.stringify(na.map(we=>({url:(we==null?void 0:we.url)||"",name:(we==null?void 0:we.name)||(we==null?void 0:we.fileName)||"",fileName:(we==null?void 0:we.fileName)||(we==null?void 0:we.name)||""})).filter(we=>we.url||we.name));else if(typeof na=="string")try{const we=JSON.parse(na);_a.证书附件=na}catch{_a.证书附件=JSON.stringify([{url:na,name:na,fileName:na}])}}console.log(ke,"tableName","inspectionRecordRow",_a),await A.pageBatchAddApi({platId:parseInt((K=cl.value)==null?void 0:K.plat_id),changeContents:[{tableName:ke,tableContents:[_a]}]});const Re=ba==null?void 0:ba.object_id;if(Re&&Ca){const na=va&&Oa[va]?Oa[va]:null;let we=[],sa="",Ba=!1;if(Array.isArray(na)&&na.length>0){we=na.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 Wa=na[0];sa=(Wa==null?void 0:Wa.url)||"";const ul=(Wa==null?void 0:Wa.name)||(Wa==null?void 0:Wa.fileName)||"";Ba=String(ul).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf")}else if(typeof na=="string")try{const Wa=JSON.parse(na);Array.isArray(Wa)?(we=Wa.map(ul=>({name:(ul==null?void 0:ul.name)||(ul==null?void 0:ul.fileName)||"",url:(ul==null?void 0:ul.url)||""})).filter(ul=>ul.url||ul.name),we.length>0&&(sa=we[0].url||"",Ba=String(we[0].name).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf"))):(sa=na,Ba=String(na).toLowerCase().endsWith(".pdf"))}catch{sa=na,Ba=String(na).toLowerCase().endsWith(".pdf")}const nl={ts:Date.now(),versionId:String(Date.now())+"_"+String(wa),label:new Date().toLocaleString(),certType:Oa.证书类型||"",certNo:Oa.证书编号||"",fileType:Ba?"pdf":"image",sourceUrl:Ba?sa:"",images:we};Ma(Re,Ca,nl)}}}catch(be){console.error("向校检记录表插入OCR识别结果失败:",be),qa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Er=d=>{const h=Array.isArray(d)?d:ql.value||[];if(h.length===0){Pr();return}if(h.find(C=>(C==null?void 0:C.__decision)==="replace"&&!(C!=null&&C.selectedTargetId))){qa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}h.forEach(C=>{var ne;const re=C==null?void 0:C.__decision;if(!(!re||re==="skip")){if(re==="add"){Ma(c==null?void 0:c.index,(ne=C==null?void 0:C.ocrRow)==null?void 0:ne.id,C==null?void 0:C.versionItem),dr.value=[...dr.value||[],C.ocrRow];return}if(re==="replace"){const K=C==null?void 0:C.selectedTargetId,be=(Ne.value||[]).find(Ae=>String(Ae==null?void 0:Ae.id)===String(K));if(!be)return;jr(C,be)}}}),(Ql.value||[]).length>0&&(Ne.value=[...Ne.value||[]]),(dr.value||[]).length>0&&(Ne.value=[...Ne.value||[],...dr.value||[]],We.value=[...We.value||[],...dr.value||[]],(dr.value||[]).forEach(C=>{var re,ne;return(ne=(re=Aa.value)==null?void 0:re.set)==null?void 0:ne.call(re,C.id,C)})),ln.value=Ne.value;const z=Ql.value||[],P=dr.value||[];if(z.length>0&&(Te("change",{buttonName:"编辑",singleContent:z,content:Ne.value,relatedContents:c==null?void 0:c.related,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,columns:V.value,name:c==null?void 0:c.compName}),Ir(z)),P.length>0){const C=Ol.value;Te("change",{buttonName:"OCR批量新增",content:Ne.value,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,column:V.value,ocrRows:P,relatedContents:c==null?void 0:c.related,uploadedFiles:(Array.isArray(C==null?void 0:C.result)?C.result:[]).map(re=>(Array.isArray(re==null?void 0:re.图片信息)?re.图片信息:[]).map(ne=>({url:(ne==null?void 0:ne.url)||"",name:(ne==null?void 0:ne.name)||"",fileName:(ne==null?void 0:ne.name)||""})).filter(ne=>ne.url)),ocrResult:C,matchedCount:(z||[]).length,newCount:(P||[]).length})}qa.ElMessage.success("已提交候选处理结果"),Pr()},Cr=fc(),mn=e.computed(()=>Cr.getConfig()),Nr=e.ref(),cr=e.ref(),yn=sc(A.pinia),ln=e.ref(),rn=e.ref(0),Sn=A.useUnit(A.pinia),{selectIndex:Nn,selectMenu:pn,selectTitle:lr}=A.storeToRefs(Sn),{selectString:Ml}=A.storeToRefs(yn),zr=A.useLoginState(A.pinia),{loginUserInfo:cl}=A.storeToRefs(zr),sr=e.ref(720),Rl=e.ref(!1),_r=e.ref(!1),Kl=e.ref([]),fr=e.ref(),Lr=e.ref(!0),gn=e.ref(!0);e.ref([]);const Bn=e.inject("contentRef");e.provide("contentRef",Bn),e.provide("getSuggestListForCell",_u),e.provide("getSuggestLoadingForCell",(d,h)=>{const N=`${d==null?void 0:d.id}:${(h==null?void 0:h.prop)||(h==null?void 0:h.property)}`;return k.value.get(N)||!1}),e.watch(()=>{var d;return(d=Ne.value)==null?void 0:d.length},d=>{ye.total=d}),e.watch(()=>Z.value,async()=>{var h,N,z,P,C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye;if(((h=Z.value)==null?void 0:h.length)===0||!((N=c==null?void 0:c.itemData)!=null&&N.find(Qa=>(Qa==null?void 0:Qa.key)==="columnPath"))||!((z=c==null?void 0:c.itemData)!=null&&z.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn")))return;let d=(be=(K=(ne=(re=(C=(P=c==null?void 0:c.itemData)==null?void 0:P.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn"))==null?void 0:C.contents)==null?void 0:re.split("["))==null?void 0:ne[1])==null?void 0:K.split("]"))==null?void 0:be[0];((Ge=($e=(He=(Ae=c==null?void 0:c.itemData)==null?void 0:Ae.find(Qa=>(Qa==null?void 0:Qa.key)==="pageColumn"))==null?void 0:He.contents)==null?void 0:$e.split("["))==null?void 0:Ge[0])+((Oa=(wa=Z.value)==null?void 0:wa.find(Qa=>(Qa==null?void 0:Qa.key)===d))==null?void 0:Oa.value),(Ye=(za=c==null?void 0:c.itemData)==null?void 0:za.find(Qa=>(Qa==null?void 0:Qa.key)==="pageGroup"))==null||Ye.contents,Rt(compData,c.allMapContents)},{deep:!0});const bn=d=>{var N,z,P,C,re;const h=(z=(N=V.value)==null?void 0:N.filter(ne=>ne==null?void 0:ne.mainKey))==null?void 0:z.map(ne=>ne==null?void 0:ne.prop);if(h.length===0){const ne=(P=V.value)==null?void 0:P.map(K=>K==null?void 0:K.prop);return(C=ne==null?void 0:ne.map(K=>d==null?void 0:d[K]))==null?void 0:C.join("|")}return(re=h==null?void 0:h.map(ne=>d==null?void 0:d[ne]))==null?void 0:re.join("|")},qn=d=>{var ne,K,be,Ae,He;const h=(K=(ne=V.value)==null?void 0:ne.filter($e=>$e==null?void 0:$e.required))==null?void 0:K.map($e=>$e==null?void 0:$e.prop),N=[];if(d==null||d.forEach($e=>{h==null||h.forEach(Ge=>{const wa=$e[Ge];(wa==null||wa==="")&&(N.includes(Ge)||N.push(Ge))})}),N.length>0)return qa.ElMessage.warning(`请填写必填项:${N.join("、")}`);const z=new Map,P=new Map;(be=Ne.value)==null||be.forEach($e=>{const Ge=bn($e);z.set(Ge,$e)}),d==null||d.forEach($e=>{const Ge=bn($e);P.set(Ge,$e)});const C=d==null?void 0:d.filter($e=>z.has(bn($e))),re=(Ae=Ne.value)==null?void 0:Ae.filter($e=>P.has(bn($e)));return(C==null?void 0:C.length)>0&&(u.columns=(He=V.value)==null?void 0:He.filter($e=>($e==null?void 0:$e.label)!=="操作"),u.existRows=re,u.tableData=C,u.show=!0),u.newRows=d==null?void 0:d.filter($e=>{const Ge=bn($e);return!z.has(Ge)}),u.newRows},Ln=e.ref(""),kn=e.ref(null),Tn=async()=>{var d,h,N,z,P,C;try{const re=await A.quoteApi({related:[{menus:Ee.value,groups:c==null?void 0:c.compName}],platId:parseInt((d=cl.value)==null?void 0:d.plat_id)});if(((h=re==null?void 0:re.data)==null?void 0:h.code)===200){kn.value=(N=re==null?void 0:re.data)==null?void 0:N.result;const ne=(z=V.value)==null?void 0:z.map(Ae=>(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.label)),K=$n(ne,(P=re==null?void 0:re.data)==null?void 0:P.result),be=K==null?void 0:K.flatMap(Ae=>Ae==null?void 0:Ae.quote);(be==null?void 0:be.length)>0&&(Ln.value=(C=be==null?void 0:be.map(Ae=>Ae==null?void 0:Ae.menus))==null?void 0:C.join("、"))}}catch(re){throw new Error(re)}};function $n(d,h){var N;return(N=h.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(P=>P.words&&Array.isArray(P.words)?P.words.some(C=>d.includes(C)):!1):!1))==null?void 0:N.map(z=>{const P={...z};return P.struct&&Array.isArray(P.struct)&&(P.struct=P.struct.filter(C=>C.words&&Array.isArray(C.words)?C.words.some(re=>d.includes(re)):!1)),P})}const Qr=async(d,h)=>{var N,z;try{kn.value||await Tn();const P=h==null?void 0:h.map(re=>{const ne=Object.keys(re),K={};return ne.forEach((be,Ae)=>{K[d[Ae]]=re[be]}),K}),C=qn(P);if(!C||(C==null?void 0:C.length)===0)return;u.show||await x(C)}catch(P){throw qa.ElMessage.error("数据导入处理失败"),await A.pageBatchAddApi({platId:parseInt((N=cl==null?void 0:cl.value)==null?void 0:N.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(P),is_delete:!1,request_table:(z=c==null?void 0:c.related)==null?void 0:z.find(C=>C==null?void 0:C.includes("content")),request_type:"error"}]}]}),new Error(P)}},An=async d=>{var C,re,ne,K,be,Ae,He;let h=ee.value;h!=null&&h.find($e=>(d==null?void 0:d.key)===($e==null?void 0:$e.key))&&(h=h==null?void 0:h.filter($e=>(d==null?void 0:d.key)!==($e==null?void 0:$e.key))),h.push({key:d==null?void 0:d.key,value:[(re=d==null?void 0:d.value)==null?void 0:re[((C=d==null?void 0:d.value)==null?void 0:C.length)-1]]});let N=Ha.value;N=N==null?void 0:N.map($e=>{var Ge,wa;return($e==null?void 0:$e.type)==="Select"&&(d==null?void 0:d.key)===($e==null?void 0:$e.prop)&&Array.isArray($e.value)&&(Ge=$e.value)!=null&&Ge.every(Oa=>typeof Oa=="string")&&($e.selectValue=(wa=h==null?void 0:h.find(Oa=>(Oa==null?void 0:Oa.key)===($e==null?void 0:$e.prop)))==null?void 0:wa.value),$e});let z=(K=(ne=N==null?void 0:N.find($e=>($e==null?void 0:$e.prop)===(d==null?void 0:d.key)))==null?void 0:ne.optionUrl)==null?void 0:K.menuId,P=N==null?void 0:N.find($e=>($e==null?void 0:$e.prop)===(d==null?void 0:d.key));if(z){let $e=await yt(P==null?void 0:P.optionUrl,z),Ge,wa=Y.value,Oa=(He=(Ae=(be=Ha.value)==null?void 0:be.find(za=>{var Ye;return(Ye=P==null?void 0:P.optionUrl)==null?void 0:Ye.menuId}))==null?void 0:Ae.selectValue)==null?void 0:He[0];if($e==null||$e.forEach(za=>{var Ye,Qa,ba,el,ke,$a,va,Ca,_a,T;if(z){let X=(Qa=(Ye=Ha.value)==null?void 0:Ye.find(na=>{var we,sa;return((we=P==null?void 0:P.optionUrl)==null?void 0:we.menuId)===((sa=na==null?void 0:na.optionUrl)==null?void 0:sa.menuId)}))==null?void 0:Qa.prop,Re=(el=(ba=N==null?void 0:N.find(na=>(na==null?void 0:na.prop)===X))==null?void 0:ba.selectValue)==null?void 0:el[0];X!=null&&X.includes("·")&&(X=(ke=X==null?void 0:X.split("·"))==null?void 0:ke[0],Re=(_a=(Ca=(va=d==null?void 0:d.value)==null?void 0:va[(($a=d==null?void 0:d.value)==null?void 0:$a.length)-1])==null?void 0:Ca.split(" "))==null?void 0:_a[0]),wa!=null&&wa.find(na=>(na==null?void 0:na.value)===Oa)?Ge=(T=wa==null?void 0:wa.find(na=>(na==null?void 0:na.value)===Oa))==null?void 0:T.objectValue:za[X]===Re&&(Ge=za)}}),Ge){let za=N;za=za==null?void 0:za.map(Ye=>{var Qa,ba,el,ke,$a,va;return z&&(Ge!=null&&Ge[Ye==null?void 0:Ye.prop])&&U.value==="新增"&&(Ye==null?void 0:Ye.prop)!==(P==null?void 0:P.prop)?Ye.value=(Ge==null?void 0:Ge[Ye==null?void 0:Ye.prop])||(Ge==null?void 0:Ge[(ke=(el=(ba=(Qa=Ye==null?void 0:Ye.optionUrl)==null?void 0:Qa.groupSelect)==null?void 0:ba[1])==null?void 0:el.replaceAll("[",""))==null?void 0:ke.replaceAll("]","")]):Ye.value=(va=($a=Ha.value)==null?void 0:$a.find(Ca=>(Ca==null?void 0:Ca.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:va.value,Ye}),Ha.value=za}}ee.value=h},Wn=async(d,h)=>{var N,z,P,C,re;if((N=d==null?void 0:d.toString())!=null&&N.includes(".txt")||(z=d==null?void 0:d.toString())!=null&&z.includes(".cpt")||(P=d==null?void 0:d.toString())!=null&&P.includes(".cyd")){const ne=await qa.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),K=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});let be=URL.createObjectURL(K);ta.value=[{name:(re=d==null?void 0:d.split("/"))==null?void 0:re[((C=d==null?void 0:d.split("/"))==null?void 0:C.length)-1],blobUrl:be}],ae.value=!0}else Array.isArray(h)&&(h==null?void 0:h.length)>0&&Te("routeUrl",{isEdit:!1,routerUrl:h})};e.onBeforeUnmount(()=>{gn.value=!1;let d=rn.value;rn.value=d+1});const $r=e.reactive({prop:"",order:null}),Kn=e.computed(()=>{const d=(Ne.value??[]).slice(),h=$r.prop||ue.prop,N=$r.order||ue.order;if(!h||!N)return d;const z=N==="ascending",P=re=>{if(h)return re&&Object.prototype.hasOwnProperty.call(re,h)?re[h]:h.includes(".")?h.split(".").reduce((ne,K)=>ne==null?ne:ne[K],re):re==null?void 0:re[h]},C=re=>{if(re==null)return{ok:!1,value:NaN};if(typeof re=="number")return{ok:Number.isFinite(re),value:re};const ne=String(re).trim();if(ne==="")return{ok:!1,value:NaN};const K=ne.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(K))return{ok:!1,value:NaN};const be=Number(K);return{ok:Number.isFinite(be),value:be}};return d.sort((re,ne)=>{const K=P(re),be=P(ne);if(K==null&&be==null)return 0;if(K==null)return z?-1:1;if(be==null)return z?1:-1;const Ae=C(K),He=C(be);if(Ae.ok&&He.ok)return z?Ae.value-He.value:He.value-Ae.value;const $e=ke=>{if(ke==null)return{ok:!1,value:NaN};const $a=String(ke).trim();if($a==="")return{ok:!1,value:NaN};const va=$a.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!va)return{ok:!1,value:NaN};const Ca=va[1]?-1:1,_a=Number(va[2]),T=Number(va[3]),X=Number(va[4]);return[_a,T,X].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:T>=60||X>=60?{ok:!1,value:NaN}:{ok:!0,value:Ca*(_a*3600+T*60+X)}},Ge=$e(K),wa=$e(be);if(Ge.ok&&wa.ok)return z?Ge.value-wa.value:wa.value-Ge.value;const Oa=new Date(K).getTime(),za=new Date(be).getTime(),Ye=!Number.isNaN(Oa),Qa=!Number.isNaN(za);if(Ye&&Qa)return z?Oa-za:za-Oa;const ba=String(K),el=String(be);return z?ba.localeCompare(el):el.localeCompare(ba)})}),fn=e.computed(()=>{var N;const d=(ye.currentPage-1)*ye.pageSize,h=d+ye.pageSize;return Te("getSliceContLength",ye),(N=Kn.value)==null?void 0:N.slice(d,h)}),Bi=d=>{ye.currentPage=d,Te("getSliceContLength",ye)},Lo=d=>{var z;ye.pageSize=d;const h=((z=Ne.value)==null?void 0:z.length)??0,N=d>0?Math.ceil(h/d):1;ye.currentPage>N&&(ye.currentPage=N||1,qa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Te("getSliceContLength",ye)},$o=({prop:d,order:h})=>{$r.prop=d,$r.order=h,ye.currentPage=1};function En(d){const h=[];function N(z,P=""){z.forEach(C=>{C.children&&C.children.length>0?N(C.children,C.prop):h.push(C.prop)})}return N(d),h}const Ro=(d,h)=>{var ne,K,be,Ae;let N=(K=(ne=V.value)==null?void 0:ne.map(He=>He==null?void 0:He.prop))==null?void 0:K.filter(He=>He!=="operate");((be=V.value)==null?void 0:be.some(He=>{var $e;return(($e=He==null?void 0:He.children)==null?void 0:$e.length)>0}))&&(N=En((Ae=V.value)==null?void 0:Ae.filter(He=>(He==null?void 0:He.prop)!=="operate")));let P;if(P=(d==null?void 0:d.length)===(N==null?void 0:N.length)?d:d.slice(0,N==null?void 0:N.length),!(P==null?void 0:P.every(He=>N==null?void 0:N.find($e=>He===$e))))return qa.ElMessage.error("导入的数据表头不匹配");Qr(P,h)},Vo=(d,h)=>{var P;const N=d==null?void 0:d.filter(C=>C!=="序号"),z=h==null?void 0:h.map(C=>{const re=Object.entries(C);return re.shift(),Object.fromEntries(re)});oa.setRefreshCurStructure(!1),((P=V.value)==null?void 0:P.length)===0||Ro(N,z)},Fo=(d,h,N,z)=>{const P=[],C=[],re=be=>Object.keys(be).length;for(const be in d)if(d[be]!==void 0){const Ae=d[be],He=[];for(const[$e,Ge]of Object.entries(Ae))He.push(Ge),C.length<re(Ae)&&C.push($e);P.push(He)}P.unshift(C);const ne=he.utils.aoa_to_sheet(P),K=he.utils.book_new();he.utils.book_append_sheet(K,ne,z),he.writeFileSync(K,`${h}.xlsx`),Kl.value=[]},Ti=async(d,h,N,z=!1,P)=>{try{oa.setRefreshCurStructure(!1)}catch(C){qa.ElMessage.error(C)}},Gi=async(d,h)=>{await Ti()},Hr=async(d,h)=>{await Ti("columnType",h,d,!1)},Po=async({newRow:d,targetIndex:h})=>{var P;if(!pa(c.config,{type:te.TABLE}))return;const z=(ye.currentPage-1)*ye.pageSize+(h??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Zn(z,Ne.value||[]))}catch{}Ne.value.splice(z,0,d),await e.nextTick(),v.value.has(d.id)||v.value.set(d.id,A.cloneDeep(d)),Ne.value=(P=Ne.value)==null?void 0:P.map(C=>({...C,tableEditType:(C==null?void 0:C.id)===d.id?"edit":(C==null?void 0:C.tableEditType)??"text"})),s.value.add(d.id),Rl.value=!0},jo=(d,h,N,z=[])=>(!Array.isArray(h)||h.length===0||h.forEach(P=>{const C=P==null?void 0:P.prop;if(!C)return;let re=d==null?void 0:d[C];if(re==null||String(re).trim()==="")return;re=String(re);const ne=new Set([...(Array.isArray(N)?N:[]).filter(Ae=>(Ae==null?void 0:Ae.id)!==(d==null?void 0:d.id)).map(Ae=>Ae==null?void 0:Ae[C]).filter(Ae=>Ae!=null).map(Ae=>String(Ae)),...(Array.isArray(z)?z:[]).map(Ae=>Ae==null?void 0:Ae[C]).filter(Ae=>Ae!=null).map(Ae=>String(Ae))]);if(!ne.has(re))return;let K=1,be="";for(;be=`${re}(${K})`,!!ne.has(be);)K++;d[C]=be}),d),Ai=async()=>{var P,C,re,ne,K,be,Ae,He;const d=Array.from(s.value||[]);if(d.length===0)return;const h=(C=he.getColumnChild((P=A.cloneDeep(V.value))==null?void 0:P.filter($e=>($e==null?void 0:$e.label)!=="操作")))==null?void 0:C.filter($e=>($e==null?void 0:$e.required)===!0);if((h==null?void 0:h.length)>0)for(let $e=0;$e<d.length;$e++){const Ge=d[$e],wa=(re=Ne.value)==null?void 0:re.find(Oa=>(Oa==null?void 0:Oa.id)===Ge);if(wa)for(let Oa=0;Oa<h.length;Oa++){const za=h[Oa],Ye=za==null?void 0:za.prop,Qa=(za==null?void 0:za.label)??Ye,ba=wa==null?void 0:wa[Ye];if(ba===""||ba===null||ba===void 0||Array.isArray(ba)&&ba.length===0){qa.ElMessage.error(`${Qa}不能为空`);return}}}const N=[],z=[];if(d.forEach($e=>{var Qa;const Ge=(Qa=Ne.value)==null?void 0:Qa.find(ba=>(ba==null?void 0:ba.id)===$e);if(!Ge)return;if(Ge!=null&&Ge._isTemp){const el=(he.getAllLeafNodes(V.value)||[]).filter(T=>(T==null?void 0:T.mainKey)===!0||(T==null?void 0:T.isMainKey)===!0),ke=Ne.value.findIndex(T=>(T==null?void 0:T.id)===$e),$a=ke>=0?ke+1:Ne.value.length+1;jo(Ge,el,Ne.value,N);const va={id:$a.toString()};(Ge==null?void 0:Ge.sort)!==void 0&&(Ge==null?void 0:Ge.sort)!==null&&String(Ge.sort).trim()!==""?va.sort=String(Ge.sort):va.sort=Zn(ke>=0?ke:Ne.value.length-1,Ne.value||[]),(he.getAllLeafNodes(V.value)||[]).filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate").forEach(T=>{const X=T==null?void 0:T.prop;if(X){const Re=Ge[X];Re!==void 0?va[X]=Re??"":va[X]=""}}),N.push(va);return}const Oa=(he.getAllLeafNodes(V.value)||[]).filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),za=new Set(Oa.map(ba=>ba==null?void 0:ba.prop).filter(Boolean)),Ye={};for(const ba of za)Object.prototype.hasOwnProperty.call(Ge,ba)&&(Ye[ba]=Ge[ba]);z.push({id:Ge.id,value:{tableData:Ye}})}),oa.setTableLoading(c==null?void 0:c.index),z.length>0){const $e=z.map(wa=>{const Oa={id:wa.id,...wa.value.tableData};return delete Oa._isOCRRow,delete Oa._ocrTableId,delete Oa._isTemp,delete Oa.tableEditType,delete Oa.index,Oa}),Ge=[{tableName:((ne=c==null?void 0:c.related)==null?void 0:ne.find(wa=>wa==null?void 0:wa.includes("content")))??"content_"+(c==null?void 0:c.index),tableContents:$e}];try{await A.pageBatchUpdateApi({platId:parseInt((K=cl.value)==null?void 0:K.plat_id),changeContents:Ge})}catch(wa){qa.ElMessage.error(((Ae=(be=wa==null?void 0:wa.response)==null?void 0:be.data)==null?void 0:Ae.message)||(wa==null?void 0:wa.message)||"保存失败"),oa.setTableLoading(!1);return}}if(N.length>0){const $e={fixContent:N,buttonName:"新增",relatedContents:c==null?void 0:c.related,name:c==null?void 0:c.compName,columns:V.value};Te("change",$e)}qa.ElMessage.success("保存成功"),s.value.clear(),v.value.clear(),Ne.value=(He=Ne.value)==null?void 0:He.map($e=>({...$e,tableEditType:"text"})),Rl.value=!1,oa.setRefreshCurStructure(!0)},Ho=()=>{var h;const d=Array.from(s.value||[]);if(d.length===0){Rl.value=!1;return}d.forEach(N=>{var C,re;const z=v.value.get(N),P=(C=Ne.value)==null?void 0:C.find(ne=>(ne==null?void 0:ne.id)===N);if(P!=null&&P._isTemp){Ne.value=Ne.value.filter(ne=>(ne==null?void 0:ne.id)!==P.id);return}if(z){const ne=(re=Ne.value)==null?void 0:re.findIndex(K=>(K==null?void 0:K.id)===N);ne!==-1&&(Ne.value[ne]={...Ne.value[ne],...z})}}),s.value.clear(),v.value.clear(),Ne.value=(h=Ne.value)==null?void 0:h.map(N=>({...N,tableEditType:"text"})),Rl.value=!1},zi=e.ref(!1),Yi=async d=>{var P,C,re,ne;if(!Rl.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const h=d==null?void 0:d.target;if(((C=(P=h==null?void 0:h.tagName)==null?void 0:P.toLowerCase)==null?void 0:C.call(P))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(h)||((re=h==null?void 0:h.blur)==null||re.call(h),(ne=d.preventDefault)==null||ne.call(d),await e.nextTick(),await Ji())},Ji=async()=>{if(H.value){Rl.value=!1;return}if(!zi.value){zi.value=!0;try{Array.from(s.value||[]).length>0?await Ai():Rl.value=!1}finally{Promise.resolve().then(()=>{zi.value=!1})}}},Uo=d=>{Kl.value=d},Xi=(d,h)=>{fr.value===h?Lr.value=!1:Lr.value=!0,fr.value=h==null?void 0:h.changeProp},si=d=>{if(!d)return;const{item:h,value:N}=d,z=Ha.value.find(P=>P.prop==h.prop);z&&z.contents.push({label:N,value:N})},nn=e.computed(()=>{var N,z,P;const d=(N=V.value)==null?void 0:N.some(C=>C==null?void 0:C.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(P=(z=V.value)==null?void 0:z.filter(C=>(C==null?void 0:C.label)!=="操作"))==null?void 0:P.map(C=>({...C,filterable:!!(C!=null&&C.filterable),showSummary:!!(C!=null&&C.showSummary),operable:!!(C!=null&&C.operable),fixed:C==null?void 0:C.fixed}))}),Gn=async(d,h,N)=>{const z=A.cloneDeep(V.value);await e.nextTick();const P=z==null?void 0:z.map(re=>(N==null?void 0:N.label)===(re==null?void 0:re.label)?{...re,[h]:d}:re),C=Mi(P);await fs(c.index,C),V.value=P,se.value=C},Mi=d=>{var P;const h=d||[];return((P=he.getAllLeafNodes(h)||[])==null?void 0:P.filter(C=>(C==null?void 0:C.prop)&&(C==null?void 0:C.type)!=="operate"&&(C==null?void 0:C.label)!=="操作"&&(C==null?void 0:C.prop)!=="operate")).map(C=>{const{prop:re}=C;return r0(re,C)})},Zi=async d=>{let h=await i0(c.index);h||(h=Mi(d)),se.value=h},Qi=async(d,h)=>{const N=A.cloneDeep(V.value),z=re=>Array.isArray(re)?re.map(ne=>{const K=Array.isArray(ne==null?void 0:ne.children)&&ne.children.length>0,be={...ne};return(be==null?void 0:be.prop)==="operate"||(be==null?void 0:be.label)==="操作"||(be==null?void 0:be.type)==="operate"?(be.sortable=!1,be.filterable=!1,be.operable=!1):be.sortable=K?!1:!!d,K&&(be.children=z(be.children)),be}):re,P=z(N),C=Mi(P);await fs(c.index,C),V.value=P,se.value=C,await e.nextTick(),rn.value=rn.value+1},eo=()=>{q.value=!1},Yn=d=>{Te("clickTrigger",d)},ao=async d=>{var C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba;const h=d==null?void 0:d.row,N=d==null?void 0:d.rowData,z=d==null?void 0:d.suffix;if((C=h==null?void 0:h.toString())!=null&&C.includes(".urdf")||d!=null&&d.isUrdf||z!=null&&z.includes(".urdf")){if(h.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(ce(h)){const ke={files:[Fe(h)],data:{}};Le(ke);return}Sa.value=[{url:h,extension:Se(h)}],ve.value=!0,B.value={data:A.cloneDeep(N)},Pe.value=!0;return}let P=[];if((re=h==null?void 0:h.toString())!=null&&re.includes(".stl")||(ne=h==null?void 0:h.toString())!=null&&ne.includes(".STL")||(K=h==null?void 0:h.toString())!=null&&K.includes(".obj")||(be=h==null?void 0:h.toString())!=null&&be.includes(".mtl")){const el=(Ae=h==null?void 0:h.toString())==null?void 0:Ae.split(","),ke=aa(el),$a=ke==null?void 0:ke[0];if(ce($a==null?void 0:$a.extension)){Le({files:ke,data:{}});return}Sa.value=ke,ve.value=!1,Pe.value=!0;return}if((He=h==null?void 0:h.toString())!=null&&He.includes(".stl")||($e=h==null?void 0:h.toString())!=null&&$e.includes(".STL")||(Ge=h==null?void 0:h.toString())!=null&&Ge.includes(".obj")||(wa=h==null?void 0:h.toString())!=null&&wa.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let el,ke=[],$a={};if(Array.isArray(h)?el=h:el=h==null?void 0:h.split(","),el==null||el.forEach(va=>{va.includes(".mtl")?ke.push(va):$a.blob=$a.blob?$a.blob+","+va:va}),(ke==null?void 0:ke.length)>0&&($a.mtlBlobs=ke),z&&($a.suffix=z),(za=(Oa=Object.values($a))==null?void 0:Oa[0])!=null&&za.includes("http:"))P.push($a);else{const va=new Blob([$a.blob],{type:"application/octet-stream;charset=UTF-8"});let Ca=URL.createObjectURL(va),_a="";(Ye=h==null?void 0:h.split("/"))==null||Ye.forEach((T,X)=>{var Re;X===((Re=h==null?void 0:h.split("/"))==null?void 0:Re.length)-1&&(_a=T)}),(Qa=$a.blob)!=null&&Qa.includes(".stl")&&(_a=(_a==null?void 0:_a.replaceAll(">",""))+".urdf"),ta.value=[{name:_a,blobUrl:Ca}],ae.value=!0}}else{const el=await qa.axios.get(h,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ke=new Blob([el.data],{type:"application/octet-stream;charset=UTF-8"});let $a=URL.createObjectURL(ke),va="";if((ba=h==null?void 0:h.split("/"))==null||ba.forEach((Ca,_a)=>{var T;_a===((T=h==null?void 0:h.split("/"))==null?void 0:T.length)-1&&(va=Ca)}),ce(va)){const Ca=W(va),_a=Fe(h);Le({files:[_a],data:{trackFileType:Ca}});return}ta.value=[{name:va,blobUrl:$a}],ae.value=!0}(P==null?void 0:P.length)>0&&n.setBlobUrls(P)},Jn=d=>{var z,P,C,re;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const h=(re=(z=d==null?void 0:d.url)==null?void 0:z.split("."))==null?void 0:re[((C=(P=d==null?void 0:d.url)==null?void 0:P.split("."))==null?void 0:C.length)-1];return(d==null?void 0:d.name)+"."+h},lo=d=>{if(!d)return"未知文件";try{const z=Jn(d);if(typeof z=="string"&&z.includes("."))return z}catch{}const h=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",N=(d==null?void 0:d.suffix)||"";return h.includes(".")?h:`${h}${N}`},ro=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const h=d.match(/^(\d+)\_(\d+)$/);if(!h)return d;const N=Number(h[1]),z=Number(h[2]);return!Number.isFinite(N)||!Number.isFinite(z)?d:String(N*1e3+z)},Xn=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;const N=Number(h);return Number.isFinite(N)?N:null},qo=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;if(/^\d+$/.test(h)){const P=Number(h);return Number.isFinite(P)?h.length<=10?P*1e3:P:null}const N=h.includes("T")?h:h.replace(" ","T"),z=Date.parse(N);return Number.isFinite(z)?z:null},ci=(d,h=[])=>{const N=Array.isArray(d)?d.slice():[];if(N.length<=1)return N;const z=new Map((h||[]).map((re,ne)=>[String(re),ne])),P=N.some(re=>Xn(re==null?void 0:re.sort)!==null),C=N.map((re,ne)=>({r:re,idx:ne,id:String((re==null?void 0:re.id)??""),sortVal:Xn(re==null?void 0:re.sort),createTimeMs:qo(re==null?void 0:re.create_time),prevIdx:z.has(String(re==null?void 0:re.id))?z.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return C.sort((re,ne)=>{if(P){const Ae=re.sortVal,He=ne.sortVal;if(Ae===null&&He!==null)return 1;if(Ae!==null&&He===null)return-1;if(Ae!==null&&He!==null&&Ae!==He)return Ae-He}const K=re.createTimeMs,be=ne.createTimeMs;return K!==null&&be!==null&&K!==be?be-K:K!==null&&be===null?-1:K===null&&be!==null?1:re.prevIdx!==ne.prevIdx?re.prevIdx-ne.prevIdx:re.idx-ne.idx}),C.map(re=>re.r)},Zn=(d,h=[])=>{const N=h==null?void 0:h[d-1],z=h==null?void 0:h[d],P=Xn(N==null?void 0:N.sort),C=Xn(z==null?void 0:z.sort);let re=null;P!==null&&C!==null&&C>P?re=(P+C)/2:P!==null?re=P+1:C!==null?re=Math.max(C-1,0):re=(d??0)+1;const ne=Number(re.toFixed(6));return String(Number.isFinite(ne)?ne:re)},ui=async d=>{let h=null,N=null;if(d!=null&&d.id){const P=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const C=await A.platformDownloadFile(d);h=URL.createObjectURL(C.data),N=lo(d)}finally{P.close()}}else if(d!=null&&d.downloadUrl){const P=await di(),C=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await qa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{C.close()}),ne=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ne),N=d==null?void 0:d.name}else{const P=await A.platformDownloadFile({url:d==null?void 0:d.url});!d.url.toUpperCase().includes(".OBJ")&&!d.url.toUpperCase().includes(".STL")&&!d.url.toUpperCase().includes(".MTL")&&!d.url.toUpperCase().includes(".URDF")?(h=URL.createObjectURL(P.data),N=Jn(d)):h=d==null?void 0:d.url}if(ce(h)){const P={row:`${h}`,suffix:Se(N)};ao(P);return}const z={name:N,blobUrl:h};ta.value=[z],ae.value=!0},Wo=async d=>{let h=null,N=null;if(d!=null&&d.id){const C=await A.platformDownloadFile(d);h=URL.createObjectURL(C.data),N=lo(d)}else if(d!=null&&d.downloadUrl){const C=await di(),re=await qa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:C,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ne=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ne),N=d==null?void 0:d.name}else{const C=await A.platformDownloadFile({url:d==null?void 0:d.url});h=URL.createObjectURL(C.data),N=Jn(d)}const z={name:N,blobUrl:h},P=document.createElement("a");P.href=z.blobUrl,P.download=z.name,P.style.display="none",document.body.appendChild(P),P.click(),setTimeout(()=>{document.body.removeChild(P)},100)},Ii=(d,h)=>{var z;if(Object.values(h).length===0)return;let N=d;return Object.values(h).find(P=>{var C,re,ne;return((C=P==null?void 0:P.toString())==null?void 0:C.includes(".txt"))||((re=P==null?void 0:P.toString())==null?void 0:re.includes(".cpt"))||((ne=P==null?void 0:P.toString())==null?void 0:ne.includes(".obj"))})?N=[...d,_e.value]:(z=c==null?void 0:c.config)!=null&&z.allowMove&&(N=[...d,{label:"迁移"}]),N},Ko=()=>{M.value=!0},Go=e.ref([]),no=async(d,h,N=!1)=>{var re,ne,K,be;if(!d)return;if(N){Ne.value=[...Aa.value.values()].filter(Ae=>Object.values(Ae).some(He=>typeof He=="string"?He==null?void 0:He.toLowerCase().includes(h==null?void 0:h.toLowerCase()):!1));return}let z={};for(let Ae in d)(d==null?void 0:d[Ae])!==""&&(z[Ae]=d==null?void 0:d[Ae]);if(JSON.stringify(z)==="{}"){Ne.value=Array.from(((re=Aa.value)==null?void 0:re.values())??[]);return}let P=(ne=c==null?void 0:c.related)==null?void 0:ne.find(Ae=>Ae==null?void 0:Ae.includes("content_")),C=await A.getFillFind({platId:parseInt((K=cl==null?void 0:cl.value)==null?void 0:K.plat_id),tableName:P,params:z});C=(be=C==null?void 0:C.data)==null?void 0:be.result,Ne.value=C,oa.setTableLoading(!1)},Qn=async d=>{var N,z;if(!pa(c.config,{type:te.TABLE})||!d)return;((N=Array.from(s.value))==null?void 0:N.length)>0&&await Ai();const h=d==null?void 0:d.id;h!=null&&(s.value.clear(),v.value.clear(),v.value.has(h)||v.value.set(h,A.cloneDeep(d)),Ne.value=(z=Ne.value)==null?void 0:z.map(P=>({...P,tableEditType:(P==null?void 0:P.id)===h?"edit":"text"})),s.value.add(h),Rl.value=!0)},xn=async(d,h,N,z)=>{z!=null&&z.isExistChild&&Te("clickMainKey",d,N,V.value)},io=()=>{ae.value=!1},Oi=d=>{Te("rowClick",d)};e.watch(()=>c.changedContent,()=>{var N,z;if(!c.changedContent)return;let d=(N=Ne.value)==null?void 0:N.map(P=>{var C;return P.id===((C=c.changedContent)==null?void 0:C.id)&&(P={...c.changedContent,id:c.changedContent.newId?c.changedContent.newId:c.changedContent.id},delete P.newId),P});const h=(z=c.itemData)==null?void 0:z.map(P=>((P==null?void 0:P.key)==="tableContents"&&(P.contents=d),P));Ne.value=d,Te("contentChange",{contents:h,index:c.index}),Te("change",{content:d,index:c==null?void 0:c.index,buttonName:"",id:c==null?void 0:c.index})},{deep:!0,immediate:!0});const Yo=()=>{},Jo=async()=>{const d=Ee.value,h=sessionStorage.getItem("systemKey"),N=await he.getItemData(d,h,""),z=(N==null?void 0:N.find(ne=>(ne==null?void 0:ne.name)==="方法明细"))||(N==null?void 0:N[0]),P=(z==null?void 0:z.compData)||[],C=P==null?void 0:P.find(ne=>{const K=ne==null?void 0:ne.key;return K==="formContent"||K==="tableContents"});return C==null?void 0:C.contents},di=async()=>{const h=qa.Local.get("access-token");return h?`Bearer ${h}`:""},Xo=async(d,{token:h,inputData:N}={})=>await qa.axios.post(d,N,{headers:{Authorization:h}}).catch(P=>(oe.setImportLoading(!1),Promise.reject(P))),Zo=d=>{var z;let h={};const N=[];return h.form={},(z=A.cloneDeep(d))==null||z.forEach((P,C)=>{var re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba;if((P==null?void 0:P.comp)==="Table"){(ne=(re=P==null?void 0:P.compData)==null?void 0:re.find(va=>(va==null?void 0:va.key)==="header"))==null||ne.contents;let el=(Ae=(be=(K=P==null?void 0:P.compData)==null?void 0:K.find(va=>(va==null?void 0:va.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:Ae.map(va=>va.slice(1));(Oa=(wa=(Ge=($e=(He=P==null?void 0:P.compData)==null?void 0:He.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:$e.contents)==null?void 0:Ge[0])==null?void 0:wa[0])==null||Oa.label;let ke=(Ye=(za=P==null?void 0:P.compData)==null?void 0:za.find(va=>(va==null?void 0:va.key)==="header"))==null?void 0:Ye.contents,$a=[];el==null||el.forEach(va=>{let Ca=[];va==null||va.forEach((_a,T)=>{var Re;let X={};((Re=ke[T])==null?void 0:Re.label)!=="操作"&&(X[ke[T].label]=_a,Ca.push(X))}),$a.push(Ca)}),h[P.name]=$a}else{const el=(ba=(Qa=P.compData)==null?void 0:Qa.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:ba.contents;el==null||el.forEach(ke=>{var $a,va;if(ke.prop!==""){let Ca=ke==null?void 0:ke.value;Array.isArray(Ca)?Ca=(($a=Ca==null?void 0:Ca[0])==null?void 0:$a.oldUrl)||"http://222.92.178.198:62001/"+((va=Ca==null?void 0:Ca[0])==null?void 0:va.url):Ca=Ca.toString(),ke={key:(ke==null?void 0:ke.prop)??(ke==null?void 0:ke.label),value:Ca},N.push(ke)}})}}),h.form=he.getFormContents(N),h},Qo=d=>{const h=[],N=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(N):h.push(z)};return N(d),h},et=async(d,h,N)=>{var ke,$a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl;oe.setImportLoading(!0),oa.setFreshContent(!1);let z=await Jo().catch(Ua=>(oe.setImportLoading(!1),Promise.reject(Ua)));z=z==null?void 0:z.filter(Ua=>{var hl;return((hl=Ua==null?void 0:Ua.find(Pa=>Pa==null?void 0:Pa.id))==null?void 0:hl.id)===(h==null?void 0:h.id)});let P=he.getEqualChild([(ke=V.value)==null?void 0:ke.filter(Ua=>(Ua==null?void 0:Ua.label)!=="操作")]);const C=(va=($a=he.tableToForm(z,P))==null?void 0:$a[0])==null?void 0:va.find(Ua=>{const hl=Ua==null?void 0:Ua.key;return hl==="Interface"||hl==="方法体"}),re=C==null?void 0:C.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),oe.setImportLoading(!1);return}const ne=V.value?he.getEqualChild([V.value]):[],K=ne.find(Ua=>{const hl=Ua==null?void 0:Ua.prop;return hl==="Input1"||hl==="输入数据.输入1"||hl==="样本输入数据"}),be=K==null?void 0:K.prop;let Ae=h==null?void 0:h[be];const He=await di().catch(Ua=>(oe.setImportLoading(!1),Promise.reject(Ua)));let $e=!0,Ge="";(Ca=V.value)==null||Ca.forEach(Ua=>{(Ua==null?void 0:Ua.prop)===be&&($e=!!(Ua!=null&&Ua.childPath),Ge=Ua==null?void 0:Ua.childPath)});let wa="";if($e){let Ua=(T=(_a=V.value)==null?void 0:_a.find(tl=>(tl==null?void 0:tl.isMainKey)===!0))==null?void 0:T.prop;wa=h==null?void 0:h[Ua];let hl=Ge==null?void 0:Ge.split(g),Pa=[];hl==null||hl.forEach((tl,_l)=>{(hl==null?void 0:hl.length)-1===_l&&Pa.push(wa),Pa.push(tl)}),Pa=Pa==null?void 0:Pa[0];let ol=await he.getItemData(Pa,sessionStorage.getItem("systemKey"),""),Ka=ol==null?void 0:ol.filter(tl=>(tl==null?void 0:tl.name)===be);Ka=Ka==null?void 0:Ka.map(tl=>{var _l;return tl.compData=(_l=tl==null?void 0:tl.compData)==null?void 0:_l.map(Nl=>{var xr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(xr=Nl==null?void 0:Nl.contents)==null?void 0:xr.filter(Ll=>(Ll==null?void 0:Ll[1])===(h==null?void 0:h[be]))),Nl}),tl}),(!Ka||(Ka==null?void 0:Ka.length)===0)&&(Ka=ol,Ka=Ka==null?void 0:Ka.map(tl=>{var _l;return tl.compData=(_l=tl==null?void 0:tl.compData)==null?void 0:_l.map(Nl=>{var xr;return(Nl==null?void 0:Nl.key)==="tableContents"&&(Nl.contents=(xr=Nl==null?void 0:Nl.contents)==null?void 0:xr.filter(Ll=>{var yl,Al;return(Ll==null?void 0:Ll[1])===(h==null?void 0:h[(Al=(yl=V==null?void 0:V.value)==null?void 0:yl[0])==null?void 0:Al.prop])})),Nl}),tl})),Ae=Zo(Ka)}const Oa=await Xo(re,{token:He,inputData:Ae}).catch(Ua=>(oe.setImportLoading(!1),Promise.reject(Ua))),za=(X=Oa==null?void 0:Oa.data)==null?void 0:X.data,Ye=ne.find(Ua=>(Ua==null?void 0:Ua.prop)==="Output1"),Qa=Ye==null?void 0:Ye.prop;let ba=[],el=[];if(za&&((Re=Object.values(za))==null?void 0:Re.length)>0){let Ua=[];const hl=new FormData,Pa=(na=Qo(za))==null?void 0:na.map(async Ka=>{var tl,_l;if(!Array.isArray(Ka)&&(Ka!=null&&Ka.includes("http"))){let Nl=await qa.axios.get(Ka,{responseType:"blob"}),xr=(_l=Ka==null?void 0:Ka.split("/"))==null?void 0:_l[((tl=Ka==null?void 0:Ka.split("/"))==null?void 0:tl.length)-1];hl.append("files",Nl.data,xr)}else Ua.push(Ka)});if(await Promise.all(Pa),!he.isFormDataEmpty(hl)){let Ka=await A.uploadAmountApi(hl),tl=(sa=(we=Ka==null?void 0:Ka.data)==null?void 0:we.result)==null?void 0:sa.map(_l=>{var Nl,xr,Ll,yl,Al,Jl;return{name:(Jl=(Al=(yl=(Nl=_l==null?void 0:_l.url)==null?void 0:Nl.split("/"))==null?void 0:yl[((Ll=(xr=_l==null?void 0:_l.url)==null?void 0:xr.split("/"))==null?void 0:Ll.length)-1])==null?void 0:Al.split("."))==null?void 0:Jl[0],url:_l==null?void 0:_l.url}});Ua=[...Ua,...tl]}let ol={};for(let Ka in h)Ka!=="id"&&(ol[Ka]=h[Ka]);ol[Qa]=Ua,el.push({id:h==null?void 0:h.id,value:{tableData:ol}})}if((el==null?void 0:el.length)>0){const Ua=el.map(Pa=>{const ol={id:Pa.id,...Pa.value.tableData};return delete ol._isOCRRow,delete ol._ocrTableId,delete ol._isTemp,delete ol.tableEditType,delete ol.index,ol}),hl=[{tableName:(Ba=c==null?void 0:c.related)==null?void 0:Ba.find(Pa=>Pa==null?void 0:Pa.includes("content")),tableContents:Ua}];await A.pageBatchUpdateApi({platId:parseInt((nl=cl.value)==null?void 0:nl.plat_id),changeContents:hl})}if((ba==null?void 0:ba.length)>0)try{await A.pageBatchAddApi({platId:parseInt((Wa=cl.value)==null?void 0:Wa.plat_id),changeContents:[{tableName:(ul=c==null?void 0:c.related)==null?void 0:ul.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:ba.map(Ua=>{var Pa,ol,Ka;const hl={id:((Pa=Ua==null?void 0:Ua.key)==null?void 0:Pa.id)??((ol=Ua==null?void 0:Ua.key)==null?void 0:ol.rowId)??(Ua==null?void 0:Ua.id),...((Ka=Ua==null?void 0:Ua.value)==null?void 0:Ka.tableData)||{}};return delete hl._isOCRRow,delete hl._ocrTableId,delete hl._isTemp,delete hl.tableEditType,delete hl.index,Object.keys(hl).forEach(tl=>{tl==="证书附件"&&Array.isArray(hl[tl])&&(hl[tl]=JSON.stringify(hl[tl]))}),hl})}]})}catch(Ua){qa.ElMessage.error(((Vl=(dl=Ua==null?void 0:Ua.response)==null?void 0:dl.data)==null?void 0:Vl.message)||(Ua==null?void 0:Ua.message)||"保存失败"),oa.setTableLoading(!1);return}Ri(!0),oe.setImportLoading(!1),oa.setFreshContent(!0)},oo=(d,h)=>(d=d==null?void 0:d.map(N=>{var z,P;return N!=null&&N.children&&((z=N.children)!=null&&z.find(C=>C.id===(h==null?void 0:h.id))?N.children=(P=N.children)==null?void 0:P.filter(C=>(C==null?void 0:C.id)!==(h==null?void 0:h.id)):N.children=oo(N.children,h)),N}),d),pi=e.ref(!1),at=()=>{pi.value=!0},o=async d=>{var N,z,P,C;pi.value=!1;const h=Array.isArray(d)?d:d?[d]:[];if(h.length!==0)for(const re of h){const ne={name:re.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(re),raw:re,uid:Date.now()+Math.random()};xa.value.push(ne),kr(ne,"uploading"),Dl(ne,0);try{const K=new FormData;K.append("file",re,ne.name);const be=await A.platformUploadFile(K);ne.uploadResult=((N=be==null?void 0:be.data)==null?void 0:N.result)||{name:ne.name,url:"",fileName:ne.name},Fl({name:((z=ne.uploadResult)==null?void 0:z.name)||ne.name,url:((P=ne.uploadResult)==null?void 0:P.url)||"",id:(C=ne.uploadResult)==null?void 0:C.id}),kr(ne,"uploaded"),Dl(ne,100)}catch(K){console.error("文件上传失败:",K),qa.ElMessage.error(`文件 ${ne.name} 上传失败,请重试`),kr(ne,"pending"),Dl(ne,0);const be=xa.value.findIndex(Ae=>Ae.uid===ne.uid);be>-1&&xa.value.splice(be,1)}}},i=e.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:c==null?void 0:c.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(d,h,N)=>{h===(c==null?void 0:c.index)?N(new Error("选择源不能和目标源一致")):N()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),u=e.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],newRows:[],buttonValue:[{label:"跳过",value:"cancel",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"覆盖",render:"popover",value:"replace",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}],result:""}),y=()=>{u.show=!1},x=async d=>{var h,N,z,P,C,re,ne,K;try{const be=[];let Ae=(h=Ne.value||[])==null?void 0:h.slice();(d||[]).forEach(Oa=>{const za={...Oa};try{za.sort=Zn(0,Ae)}catch{}be.push(za),Ae.unshift(za)});let He=await A.quoteApi({platId:parseInt((N=cl==null?void 0:cl.value)==null?void 0:N.plat_id),type:"fatherSyncs",related:[{menus:Ee.value,groups:""},{menus:Ee.value,groups:c==null?void 0:c.compName}]});He=(z=He==null?void 0:He.data)==null?void 0:z.result;let $e=He==null?void 0:He.map(Oa=>({tableName:"content_"+(Oa==null?void 0:Oa.id),tableContents:be==null?void 0:be.map((za,Ye)=>({id:Ye,...za}))})),Ge=[{tableName:(P=c==null?void 0:c.related)==null?void 0:P.find(Oa=>Oa==null?void 0:Oa.includes("content")),tableContents:be==null?void 0:be.map((Oa,za)=>({id:za,...Oa}))}];Ge=[...Ge,...$e];const wa=await A.pageBatchAddApi({platId:parseInt((C=cl.value)==null?void 0:C.plat_id),changeContents:Ge});if(((re=wa==null?void 0:wa.data)==null?void 0:re.code)===200){const Oa={buttonName:"新增",columns:V.value,fixContent:be==null?void 0:be.map((Ye,Qa)=>({id:Qa,...Ye})),relatedContents:c==null?void 0:c.related};await xt(Oa),qa.ElMessage.success("数据导入成功");let za=[];Ge==null||Ge.forEach(Ye=>{var Qa;(Qa=Ye==null?void 0:Ye.tableContents)==null||Qa.forEach(ba=>{za.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ba),request_result:"{}",is_delete:!1,request_table:Ye==null?void 0:Ye.tableName,request_type:"export"})})}),await A.pageBatchAddApi({platId:parseInt((ne=cl==null?void 0:cl.value)==null?void 0:ne.plat_id),changeContents:[{tableName:"log",tableContents:za}]})}else{let Oa=[];Ge==null||Ge.forEach(za=>{var Ye;(Ye=za==null?void 0:za.tableContents)==null||Ye.forEach(Qa=>{Oa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Qa),request_result:"{}",is_delete:!1,request_table:za==null?void 0:za.tableName,request_type:"error"})})}),await A.pageBatchAddApi({platId:parseInt((K=cl==null?void 0:cl.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:Oa}]}),qa.ElMessage.error("数据导入响应失败")}}catch(be){throw new Error(be)}},O=async d=>{var h,N,z,P,C,re,ne,K,be,Ae;try{if(d==="cancel"&&(u.show=!1),d==="replace"&&((h=u==null?void 0:u.existRows)==null?void 0:h.length)>0){await A.pageBatchDeleteApi({platId:parseInt((N=cl.value)==null?void 0:N.plat_id),changeContents:[{tableName:((z=c==null?void 0:c.related)==null?void 0:z.find($e=>$e==null?void 0:$e.includes("content_")))||((P=c==null?void 0:c.related)==null?void 0:P.find($e=>$e==null?void 0:$e.includes("content"))),tableContents:u==null?void 0:u.existRows}]});const He=await A.pageBatchAddApi({platId:parseInt((C=cl.value)==null?void 0:C.plat_id),changeContents:[{tableName:(re=c==null?void 0:c.related)==null?void 0:re.find($e=>$e==null?void 0:$e.includes("content")),tableContents:(()=>{const $e=(Ne.value||[]).filter(za=>!((u==null?void 0:u.existRows)||[]).some(Ye=>String(Ye==null?void 0:Ye.id)===String(za==null?void 0:za.id))),Ge=(u==null?void 0:u.tableData)||[],wa=[];let Oa=$e.slice();return Ge.forEach(za=>{const Ye={...za};try{Ye.sort=Zn(0,Oa)}catch{}wa.push(Ye),Oa.unshift(Ye)}),wa.map((za,Ye)=>({id:Ye,...za}))})()}]});if(((ne=He==null?void 0:He.data)==null?void 0:ne.code)!==200)return;(K=u.newRows)!=null&&K.length&&await x(u.newRows),await xt({buttonName:"新增",columns:V.value,fixContent:(be=u==null?void 0:u.tableData)==null?void 0:be.map(($e,Ge)=>({id:Ge,...$e})),relatedContents:c==null?void 0:c.related}),(Ae=u.newRows)!=null&&Ae.length||qa.ElMessage.success("数据导入成功")}}catch(He){throw new Error(He)}finally{u.show=!1,u.columns=[],u.tableData=[],u.existRows=[]}},J=()=>{i.show=!1},Q=d=>{var h,N;if((d==null?void 0:d.buttonName)==="取消")return i.show=!1;i.to=d==null?void 0:d.content,!(!(c!=null&&c.index)||!((h=i.to)!=null&&h.groupName))&&(c==null?void 0:c.index)!==((N=i.to)==null?void 0:N.groupName)&&(Te("change",{buttonName:"迁移",value:{from:i.from,to:i.to,data:i.selectRow}}),i.show=!1)},ge=async d=>{var h,N,z,P;if(d){if(!Cr.validateFileSize(d.raw)){qa.ElMessage.warning(`文件大小不能超过 ${mn.value.maxSize}MB`);const C=xa.value.findIndex(re=>re.uid===d.uid);C>-1&&xa.value.splice(C,1),je();return}if(!Cr.validateFileType(d.raw)){qa.ElMessage.warning("请上传图片文件");const C=xa.value.findIndex(re=>re.uid===d.uid);C>-1&&xa.value.splice(C,1),je();return}kr(d,"uploading"),Dl(d,0);try{const C=new FormData;C.append("file",d.raw,d.name);const re=await A.platformUploadFile(C);d.uploadResult=((h=re==null?void 0:re.data)==null?void 0:h.result)||{name:d.name,url:"",fileName:d.name},Fl({name:((N=d.uploadResult)==null?void 0:N.name)||d.name,url:((z=d.uploadResult)==null?void 0:z.url)||"",id:(P=d.uploadResult)==null?void 0:P.id}),kr(d,"uploaded"),Dl(d,100)}catch(C){console.error("文件上传失败:",C),qa.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),kr(d,"pending"),Dl(d,0);const re=xa.value.findIndex(ne=>ne.uid===d.uid);re>-1&&xa.value.splice(re,1)}finally{je()}}},je=()=>{e.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},De=async()=>{var N,z;if(sessionStorage.setItem("ocr_root_table_id",String((c==null?void 0:c.index)??"")),xa.value.length===0){qa.ElMessage.warning("请先选择要上传的图片");return}if(xa.value.filter(P=>{const C=wl(P);return C!=="uploaded"&&C!=="completed"&&C!=="failed"}).length>0){qa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}ga.value=!0,ma.value=0;let h=null;try{xa.value.forEach(Ye=>{kr(Ye,"processing")});const P=Math.floor(Math.random()*10)+90;h=setInterval(()=>{ma.value<P?ma.value+=1:clearInterval(h)},50);const C=xa.value.map(Ye=>{var Qa,ba,el;return{name:((Qa=Ye.uploadResult)==null?void 0:Qa.name)||Ye.name,url:((ba=Ye.uploadResult)==null?void 0:ba.url)||"",fileName:((el=Ye.uploadResult)==null?void 0:el.fileName)||Ye.name}}),re=Cr.extractTableHeaders(V.value),ne=C.map(Ye=>({name:(Ye==null?void 0:Ye.fileName)||(Ye==null?void 0:Ye.name),url:(Ye==null?void 0:Ye.url)||""})),K=await Cr.recognize(ne,re);if(console.log(K,"ocrResult"),clearInterval(h),h=null,(K==null?void 0:K.code)===500||(K==null?void 0:K.type)==="error"||!(K!=null&&K.result)){ma.value=0,xa.value.forEach(Ye=>{kr(Ye,"failed"),Dl(Ye,0)}),qa.ElMessage.error((K==null?void 0:K.message)||"OCR识别失败,请重试"),ga.value=!1;return}ma.value=P;const be=Array.isArray(K==null?void 0:K.result)?K.result:[];if(be.length===0){ma.value=0,xa.value.forEach(Ye=>{kr(Ye,"failed"),Dl(Ye,0)}),qa.ElMessage.warning("OCR识别未返回有效数据"),ga.value=!1;return}const Ae=new Set,He=[];be.forEach((Ye,Qa)=>{const ba=Ye!=null&&Ye.数据&&typeof(Ye==null?void 0:Ye.数据)=="object"?Ye.数据:{},el=Array.isArray(Ye==null?void 0:Ye.图片信息)?Ye.图片信息:[],ke=new Map;el.forEach(va=>{va!=null&&va.name&&ke.set(va.name,va.url||"")});const $a={_index:Qa,_certType:(Ye==null?void 0:Ye.证书类型)||"",_certNo:(Ye==null?void 0:Ye.证书编号)||"",_ocrImages:el,__ocrFieldMeta:{}};Object.entries(ba).forEach(([va,Ca])=>{let _a="",T=0,X=[],Re="";Ca&&typeof Ca=="object"&&!Array.isArray(Ca)?(_a=(Ca==null?void 0:Ca.value)??"",T=(Ca==null?void 0:Ca.score)??0,X=Array.isArray(Ca==null?void 0:Ca.bboxNorm)?Ca==null?void 0:Ca.bboxNorm:[],Re=(Ca==null?void 0:Ca.imageName)||""):Array.isArray(Ca)&&Ca.length>=2?(_a=Ca[0]??"",T=Ca[1]??0):(_a=Ca??"",T=0),$a[va]=_a,$a[`${va}_accuracy`]=T,Ae.add(va),$a.__ocrFieldMeta[va]={value:_a,score:T,bboxNorm:X,imageName:Re,imageUrl:Re&&ke.get(Re)||"",images:el}}),He.push($a)});const $e=[],Ge=new Set;He.forEach(Ye=>{Ye&&Ae.forEach(Qa=>{const ba=Ye[`${Qa}_accuracy`];(typeof ba=="number"?ba>0:ba!=null&&String(ba).trim()!==""&&String(ba)!=="0")&&Ge.add(Qa)})}),Ae.forEach(Ye=>{$e.push({prop:Ye,label:Ye,editable:!0,minWidth:230}),Ge.has(Ye)&&$e.push({prop:`${Ye}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),xa.value.forEach(Ye=>{kr(Ye,"completed")}),ma.value=100,Xe.value=$e,Je.value=He,Ve.value=C,Fa.value=K;const wa=["出厂编号","设备名称","制造厂"],Oa=$e.filter(Ye=>Ye&&!Ye.isAccuracy&&typeof Ye.prop=="string").map(Ye=>Ye.prop),za=["出厂编号","设备名称","制造厂"];Ea.value=Oa.filter(Ye=>za.includes(Ye)),console.log("[OCR] 默认勾选字段 props:",Ea.value),ia.value=2,ga.value=!1,ya.value=!1}catch(P){console.error("OCR处理失败:",P),h&&(clearInterval(h),h=null),qa.ElMessage.error(((z=(N=P==null?void 0:P.response)==null?void 0:N.data)==null?void 0:z.message)||"OCR识别失败,请重试"),ga.value=!1,ma.value=0,xa.value.forEach(C=>{kr(C,"pending"),Dl(C,0)})}},ea=d=>{if(d==null)return"";let h=String(d);return h=h.replace(/\s+/g," ").trim(),h=h.replace(/[!-~]/g,N=>String.fromCharCode(N.charCodeAt(0)-65248)),h=h.replace(/ /g," "),h=h.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),h},Ta=()=>{var Ye,Qa;const d=Ve.value,h=Fa.value,N=Je.value;if(!N||N.length===0){qa.ElMessage.warning("暂无数据可添加");return}const z=(Ye=he.getAllLeafNodes(V.value)||[])==null?void 0:Ye.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),P=new Map,C=new Map,re=(Qa=z==null?void 0:z.find(ba=>(ba==null?void 0:ba.label)==="证书附件"))==null?void 0:Qa.prop;z==null||z.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&(P.set(ba.label,ba.prop),C.set(ba.prop,ba.label))});const ne=Date.now(),K=ba=>String(ne*1e3+ba),be=[],Ae=[],He=ba=>{const el=Do&&Do[ba]||[ba];for(const ke of el){const $a=P.get(ke);if($a)return $a}return""},$e=He("出厂编号"),Ge=He("设备名称"),wa=He("制造厂"),Oa=[],za=ba=>{var _a,T;if(!re)return[];const el=(Array.isArray(d)?d[ba]:null)||null,ke=(el==null?void 0:el.url)||"",$a=(el==null?void 0:el.fileName)||(el==null?void 0:el.name)||"";return(String($a).toLowerCase().endsWith(".pdf")||String(ke).toLowerCase().endsWith(".pdf"))&&ke?[{url:ke,name:$a,fileName:$a}]:(Array.isArray((T=(_a=h==null?void 0:h.result)==null?void 0:_a[ba])==null?void 0:T.图片信息)?h.result[ba].图片信息:[]).map(X=>({url:(X==null?void 0:X.url)||"",name:(X==null?void 0:X.name)||"",fileName:(X==null?void 0:X.name)||""})).filter(X=>X.url)};if(N.forEach((ba,el)=>{var nl;const ke={id:K(el),_isOCRRow:!0,_ocrTableId:c==null?void 0:c.index};for(const[Wa,ul]of P.entries())Object.prototype.hasOwnProperty.call(ba,Wa)&&(ke[ul]=ba[Wa]);re&&(ke[re]=za(el));const $a=(Array.isArray(h==null?void 0:h.result)?h.result[el]:null)||null,va=(Array.isArray(d)?d[el]:null)||null,Ca=(va==null?void 0:va.url)||"",_a=(va==null?void 0:va.fileName)||(va==null?void 0:va.name)||"",T=String(_a).toLowerCase().endsWith(".pdf")||String(Ca).toLowerCase().endsWith(".pdf"),X={ts:Date.now(),versionId:String(Date.now())+"_"+String(el),label:new Date().toLocaleString(),certType:($a==null?void 0:$a.证书类型)||"",certNo:($a==null?void 0:$a.证书编号)||"",fileType:T?"pdf":"image",sourceUrl:T?Ca:"",images:Array.isArray($a==null?void 0:$a.图片信息)?$a.图片信息.map(Wa=>({name:(Wa==null?void 0:Wa.name)||"",url:(Wa==null?void 0:Wa.url)||""})).filter(Wa=>Wa.url):[]},Re=Wa=>ea(Wa?ke==null?void 0:ke[Wa]:""),na=Re($e),we=Re(Ge),sa=Re(wa);if(!!($e&&Ge&&wa&&na&&we&&sa)){const Wa=(Ne.value||[]).find(ul=>{const dl=ea($e?ul==null?void 0:ul[$e]:""),Vl=ea(Ge?ul==null?void 0:ul[Ge]:""),Ua=ea(wa?ul==null?void 0:ul[wa]:"");return dl&&Vl&&Ua&&dl===na&&Vl===we&&Ua===sa});if(Wa){Oa.push({idx:el,ocrRow:ke,versionItem:X,ocrNo:na,candidates:[Wa],selectedTargetId:String((Wa==null?void 0:Wa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(na&&$e){const Wa=(Ne.value||[]).filter(ul=>{const dl=ea($e?ul==null?void 0:ul[$e]:"");return dl&&dl===na});if(Wa.length>0){Oa.push({idx:el,ocrRow:ke,versionItem:X,ocrNo:na,candidates:Wa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ke.sort===void 0||ke.sort===null||String(ke.sort).trim()===""){const Wa=(Ne.value||[]).map(dl=>Xn(dl==null?void 0:dl.sort)).filter(dl=>dl!==null),ul=Wa.length>0?Math.max(...Wa):((nl=Ne.value)==null?void 0:nl.length)??0;ke.sort=String(Number((ul+1).toFixed(6)))}}catch{}Ma(c==null?void 0:c.index,ke.id,X),Oa.push({idx:el,ocrRow:ke,versionItem:X,ocrNo:na,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Oa||[]).length>0){ql.value=(Oa||[]).map(ba=>({...ba,selectedTargetId:(ba==null?void 0:ba.selectedTargetId)||""})),Ul.value=!0,Ql.value=Ae,dr.value=be,Ol.value=h,pr.value=d,Fr.value=re||"";return}},Xa=(d,h,N)=>{Je.value[d]&&(Je.value[d][h]=N)},Ga=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,al=d=>{if(d==null||d===0)return"#909399";const h=Number(d);return h>=.9?"#67c23a":h>=.7?"#e6a23c":"#f56c6c"},bl=d=>{var N,z,P,C;if(il.value===d){il.value=null,Me.value=!1,Ia.value="";return}il.value=d,Ia.value="";const h=(N=Je.value)==null?void 0:N[d];if(h&&Array.isArray(h._ocrImages)&&h._ocrImages.length>0){Sl.value=h._ocrImages.map(K=>({name:(K==null?void 0:K.name)||"",url:(K==null?void 0:K.url)||""})).filter(K=>K.name||K.url);const re=h.__ocrFieldMeta||{},ne=(z=Object.values(re))==null?void 0:z.find(K=>K==null?void 0:K.imageName);Il.value=(ne==null?void 0:ne.imageName)||((C=(P=Sl.value)==null?void 0:P[0])==null?void 0:C.name)||"",Me.value=Sl.value.length>0}else Sl.value=[],Me.value=!1,Il.value=""},ml=()=>{sl.value=!1,xa.value=[],La.value=null,ia.value=1,Ie.value.clear(),de.value.clear(),ma.value=0,Me.value=!1},Cl=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",wl=d=>{const h=d.uid||d.name;return Ie.value.get(h)||"pending"},Zl=d=>{const h=d.uid||d.name;return de.value.get(h)||0},Dl=(d,h)=>{const N=d.uid||d.name;de.value.set(N,Math.min(100,Math.max(0,h)))},jl=d=>{const h=wl(d),N=100.53;if(h==="completed"||h==="uploaded")return`${N} ${N}`;if(h==="failed")return`${N} ${N}`;if(h==="uploading"){const z=Zl(d);return`${N*(z/100)} ${N}`}else if(h==="processing")return`${N*.5} ${N}`;return`0 ${N}`},kr=(d,h)=>{const N=d.uid||d.name;Ie.value.set(N,h),(h==="completed"||h==="uploaded")&&Dl(d,100)},Sr=()=>{e.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');if(d)d.value="",d.click();else{const h=document.createElement("input");h.type="file",h.multiple=!0,h.accept="image/*,application/pdf",h.style.display="none",h.onchange=async N=>{const z=Array.from(N.target.files||[]);for(const P of z){const C={name:P.name,raw:P,uid:Date.now()+Math.random()};xa.value.push(C),await ge(C)}N.target.value="",document.body.removeChild(h)},document.body.appendChild(h),h.click()}})},Gr=()=>{ia.value>1&&ia.value--},on=()=>{ia.value===1?xa.value.length>0&&!ga.value&&De():ia.value===2&&(Ta(),ia.value=3)},wn=async d=>{await Rn(d==null?void 0:d.row)},fi=async({row:d,prop:h})=>{!d||!h||await Rn(d,h)},Rn=async(d,h)=>{var P,C;const N=d==null?void 0:d.id;if(!N){qa.ElMessage.warning("暂无可预览数据");return}let z=zl(c==null?void 0:c.index,N);if(!z||z.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),ne=re!==null?Number(re):null;if(ne!=null&&ne!==""&&!Number.isNaN(ne)){const K=zl(ne,N);Array.isArray(K)&&K.length>0&&($l(c==null?void 0:c.index,N,K),z=K)}}if(!z||z.length===0){const re=(P=he.getAllLeafNodes(V.value)||[])==null?void 0:P.filter(K=>(K==null?void 0:K.type)!=="operate"&&(K==null?void 0:K.label)!=="操作"&&(K==null?void 0:K.prop)!=="operate"),ne=h||((C=re==null?void 0:re.find(K=>(K==null?void 0:K.label)==="证书附件"))==null?void 0:C.prop);if(ne&&d[ne]){const K=d[ne];let be=[],Ae="",He=!1;if(typeof K=="string")try{const $e=JSON.parse(K);Array.isArray($e)&&(be=$e.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),be.length>0&&(Ae=be[0].url||"",He=String(be[0].name).toLowerCase().endsWith(".pdf")||String(Ae).toLowerCase().endsWith(".pdf")))}catch{Ae=K,He=String(K).toLowerCase().endsWith(".pdf"),be=[{name:K,url:K}]}else Array.isArray(K)&&(be=K.map($e=>({name:($e==null?void 0:$e.name)||($e==null?void 0:$e.fileName)||"",url:($e==null?void 0:$e.url)||""})).filter($e=>$e.url||$e.name),be.length>0&&(Ae=be[0].url||"",He=String(be[0].name).toLowerCase().endsWith(".pdf")||String(Ae).toLowerCase().endsWith(".pdf")));if(be.length>0||Ae){const $e={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:He?"pdf":"image",sourceUrl:He?Ae:"",images:be};z=[$e],Ma(c==null?void 0:c.index,N,$e)}}}if(!z||z.length===0){qa.ElMessage.warning("暂无可预览数据");return}xe.value=z,Ra.value=!0},nu=d=>{xa.value=xa.value.filter((h,N)=>N!==d)},lt=async(d,h,N)=>{var z,P,C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va;if(pa(c.config,{type:te.TABLE,tableOperate:d})){if(Da.value="",Va.value=!0,Ze.value=!0,Te("onButtonClick",d,h),Y.value=[],d==="删除")A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ca,_a,T,X;(Ca=Ne.value)!=null&&Ca.find(Re=>(Re==null?void 0:Re.id)===(h==null?void 0:h.id))?Ne.value=(_a=A.cloneDeep(Ne.value))==null?void 0:_a.filter(Re=>(Re==null?void 0:Re.id)!==(h==null?void 0:h.id)):Ne.value=oo(A.cloneDeep(Ne.value),h);try{h!=null&&h.id&&((X=(T=Aa.value)==null?void 0:T.has)!=null&&X.call(T,h==null?void 0:h.id))&&Aa.value.delete(h.id)}catch{}Tf(ln.value,pn.value,h==null?void 0:h.id),oa.setTableLoading(c==null?void 0:c.index),Te("change",{content:Ne.value,fixContent:[h],index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.groupNames,buttonName:d,columns:V.value,relatedContents:c==null?void 0:c.related}),console.log(h,"item")});else if(d==="批量删除"){if(((z=Kl.value)==null?void 0:z.length)===0)return qa.ElMessage.warning("请先勾选操作的数据");A.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var T,X,Re,na,we;const Ca=(T=Kl.value)==null?void 0:T.map(sa=>sa.id);Ne.value=(X=A.cloneDeep(Ne.value))==null?void 0:X.filter(sa=>!(Ca!=null&&Ca.includes(sa.id))),oa.setTableLoading(c==null?void 0:c.index),Te("change",{content:Ne.value,fixContent:Kl.value,index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.compName,buttonName:d,relatedContents:c==null?void 0:c.related,columns:V.value});const _a=(Ca||[]).filter(Boolean);if(_a.length>0&&_a.every(sa=>sa!=null&&sa!=="")){const sa=(Kl.value||[]).map(Ba=>{const nl={...Ba};return delete nl._isOCRRow,delete nl._ocrTableId,delete nl._isTemp,delete nl.tableEditType,delete nl.index,nl});await A.pageBatchDeleteApi({platId:parseInt((Re=cl.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((na=c==null?void 0:c.related)==null?void 0:na.find(Ba=>Ba==null?void 0:Ba.includes("content_")))||((we=c==null?void 0:c.related)==null?void 0:we.find(Ba=>Ba==null?void 0:Ba.includes("content"))),tableContents:sa}]})}})}else if(d==="复制新增"){U.value="复制新增",A.cloneDeep(h);const Ca=(P=V.value)==null?void 0:P.find(_a=>_a==null?void 0:_a.isMainKey);Ca||((C=V.value)==null||C[0]),cr.value=h,Ri(!0)}else if(d==="新增")U.value="新增",Li(""),q.value=!0;else if(d==="编辑")U.value="编辑",Li(h),q.value=!0;else if(d==="查看")U.value="查看",Li(h),Va.value=!1,Ze.value=!1,q.value=!0;else if(d==="查看三维模型"){const Ca={};for(let T in h)T!=="id"&&(Ca[T]=h[T]);let _a=(re=Object.values(Ca))==null?void 0:re[1];Ue.setTableShowThree(_a)}else if(d==="切换视图")yu();else if(((ne=N==null?void 0:N.extra)==null?void 0:ne.type)==="modelExample")U.value=d,la.value=!0;else if(d==="新建"){let Ca=fe.value,_a=[];for(let we in Ca)we!=null&&we.includes(`loading${((K=cl.value)==null?void 0:K.account)||((be=cl.value)==null?void 0:be.账号)}`)&&(_a=[..._a,...we]);let T=[];for(let we in Ca)we!=null&&we.includes(`updateLoading${((Ae=cl.value)==null?void 0:Ae.account)||((He=cl.value)==null?void 0:He.账号)}`)&&(T=[...T,...we]);let X=_a==null?void 0:_a.map(we=>we==null?void 0:we.id);const Re=T==null?void 0:T.map(we=>we==null?void 0:we.id);X=[...A.cloneDeep(X),...Re],(X==null?void 0:X.length)>0&&(X!=null&&X.every(we=>we!==null&&we))&&await Ar.batchDeleteInsofDataApi({ids:X});const na=($e=Za.value)==null?void 0:$e.find(we=>(we==null?void 0:we.label)==="新建");await tu(!1,na)}else if(d==="修改模板"){let Ca=A.cloneDeep(Ee).value;oa.setRouteToChildPath(Ca),oe.setActiveMenuPath(Ca+g)}else if(d==="执行")et(d,h);else if(d==="导出paraform"){const Ca=A.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const _a=["推力","真空","压力","温度","流量"],T=yl=>{var Al,Jl,Tl;return yl?typeof(yl==null?void 0:yl.value)=="string"?yl.value:((Tl=(Jl=(Al=yl==null?void 0:yl._custom)==null?void 0:Al.value)==null?void 0:Jl.value)==null?void 0:Tl.value)||"":""},X=Array.isArray(lr.value)?lr.value:[],Re=T(X.find(yl=>(yl==null?void 0:yl.condition)==="child")),na=String(Re||"").slice(0,8),we=yl=>{if(yl==null)return"";const Al=String(yl).trim();if(!Al)return"";if(/^\d{8}$/.test(Al))return Al;const Jl=Al.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Jl){const Gl=Jl[1],rr=Jl[2].padStart(2,"0"),Hl=Jl[3].padStart(2,"0");return`${Gl}${rr}${Hl}`}const Tl=Al.replace(/\D/g,"");return Tl.length>=8?Tl.slice(0,8):""},sa=async yl=>{var Al,Jl;if(!yl)return"";try{const Tl=await Kr("试验任务/任务管理",!1),Gl=(vr,tr=[])=>{if(!Array.isArray(vr))return tr;for(const ur of vr)(ur==null?void 0:ur.comp)==="Table"&&(ur!=null&&ur.name)&&tr.push(ur),Array.isArray(ur==null?void 0:ur.children)&&Gl(ur.children,tr),Array.isArray(ur==null?void 0:ur.tab)&&Gl(ur.tab,tr),Array.isArray(ur==null?void 0:ur.choice)&&Gl(ur.choice,tr);return tr},Hl=Gl(Tl||[]).find(vr=>(vr==null?void 0:vr.name)==="任务列表"),hr=((Jl=(Al=Hl==null?void 0:Hl.compData)==null?void 0:Al.find(vr=>(vr==null?void 0:vr.key)==="tableContents"))==null?void 0:Jl.contents)||[];if(!Array.isArray(hr)||hr.length===0)return"";const qr=hr.find(vr=>String((vr==null?void 0:vr["试验代号(名称)"])||"").slice(0,8)===yl);return we(qr==null?void 0:qr.计划试验时间)}catch(Tl){return console.warn("获取任务列表计划试验时间失败:",Tl),""}},Ba=(Ee.value||"").replace(/\/+$/,""),nl=Re?`${Ba}/${Re}`:Ba,Wa=await Kr(nl||Ee.value,!1),ul=String(Qe.value||"").trim(),dl=yl=>String(yl||"").trim(),Vl=(yl,Al=[],Jl="")=>{if(!Array.isArray(yl))return Al;for(const Tl of yl){const Gl=dl((Tl==null?void 0:Tl.choiceName)||(Tl==null?void 0:Tl.name0)||Jl);(Tl==null?void 0:Tl.comp)==="Table"&&(Tl==null?void 0:Tl.name)&&_a.includes(Tl.name)&&(!ul||Gl===ul)&&Al.push(Tl),Array.isArray(Tl==null?void 0:Tl.children)&&Vl(Tl.children,Al,Gl),Array.isArray(Tl==null?void 0:Tl.tab)&&Vl(Tl.tab,Al,Gl),Array.isArray(Tl==null?void 0:Tl.choice)&&Vl(Tl.choice,Al,Gl)}return Al},Ua=Vl(Wa||[]),hl=new Map;for(const yl of Ua)yl!=null&&yl.name&&!hl.has(yl.name)&&hl.set(yl.name,yl);const Pa=_a.map(yl=>hl.get(yl)).filter(Boolean);if(!Pa||Pa.length===0)return qa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const ol=yl=>{const Al=new Map,Jl=(Tl,Gl=[])=>{if(Array.isArray(Tl))for(const rr of Tl){const Hl=((rr==null?void 0:rr.label)??"").toString().trim(),hr=Hl?[...Gl,Hl]:[...Gl];if(Array.isArray(rr==null?void 0:rr.children)&&rr.children.length>0)Jl(rr.children,hr);else{const vr=((rr==null?void 0:rr.prop)??"").toString();if(!vr)continue;const tr=Hl||vr,ur=(hr.length>0?[...Gl,tr]:[tr]).join(".");Al.set(vr,ur)}}};return Jl(yl,[]),Al},Ka=(yl,Al)=>{const Jl=ol(yl||[]),Gl=(he.getAllLeafNodes(yl||[])||[]).filter(Hl=>(Hl==null?void 0:Hl.prop)&&(Hl==null?void 0:Hl.type)!=="operate"&&(Hl==null?void 0:Hl.label)!=="操作"&&(Hl==null?void 0:Hl.prop)!=="operate"),rr=Array.isArray(Al)?Al:[];return rr.length===0?[]:rr.map(Hl=>{const hr={};return Gl.forEach(qr=>{const vr=String(qr.prop),tr=Jl.get(vr)||String(qr.label||qr.prop);hr[tr]=(Hl==null?void 0:Hl[vr])??""}),hr})},tl=Pa.map(yl=>{var rr,Hl;const Al=(yl==null?void 0:yl.compData)||[];let Jl=(rr=Al==null?void 0:Al.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:rr.contents;Array.isArray(Jl==null?void 0:Jl[0])&&(Jl=Jl[0]);const Tl=((Hl=Al==null?void 0:Al.find(hr=>(hr==null?void 0:hr.key)==="tableContents"))==null?void 0:Hl.contents)||[];if(!Array.isArray(Jl)||Jl.length===0||!Array.isArray(Tl)||Tl.length===0)return null;const Gl=Ka(Jl||[],Tl||[]);return!Array.isArray(Gl)||Gl.length===0?null:{类型:yl==null?void 0:yl.name,数据:Gl}}).filter(Boolean);if(!tl||tl.length===0)return qa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const _l=await sa(na),Nl={试验代号:na,试验日期:_l,ParaForm:tl},xr=await di().catch(()=>""),Ll=await A.exportParaformApi(Nl,xr);if(((Ge=Ll==null?void 0:Ll.data)==null?void 0:Ge.code)===200&&((Oa=(wa=Ll==null?void 0:Ll.data)==null?void 0:wa.result)!=null&&Oa.Excel文件)){const yl=Ll.data.result.Excel文件,Al=await A.platformDownloadFile({url:yl}),Jl=new Blob([Al.data],{type:"application/vnd.ms-excel"}),Tl=URL.createObjectURL(Jl),Gl=A.dayjs().format("YYYYMMDD"),Hl=`${(na||"UNKNOWN").trim()||"UNKNOWN"}_${Gl}_paraform.xls`,hr=document.createElement("a");hr.href=Tl,hr.download=Hl,hr.style.display="none",document.body.appendChild(hr),hr.click(),setTimeout(()=>{document.body.removeChild(hr),URL.revokeObjectURL(Tl)},100);const qr=Array.isArray((Ye=(za=Ll==null?void 0:Ll.data)==null?void 0:za.result)==null?void 0:Ye.warnings)?Ll.data.result.warnings:[];if(qr.length>0){const vr=qr.map((tr,ur)=>`${ur+1}. ${(tr==null?void 0:tr.field)||"未知字段"}:${(tr==null?void 0:tr.message)||""}`).join(`
|
|
24
24
|
`);qa.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
-
${vr}`,duration:5e3,showClose:!0})}else qa.ElMessage.success("导出成功")}else qa.ElMessage.error(((Qa=Ll==null?void 0:Ll.data)==null?void 0:Qa.message)||"导出失败")}catch(_a){console.error("导出paraform失败:",_a),qa.ElMessage.error("导出失败:"+((_a==null?void 0:_a.message)||"未知错误"))}finally{Ca.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ba=Kl.value)==null?void 0:ba.length)===0)return qa.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((el=Ne.value)==null?void 0:el.length)===0)return qa.ElMessage.warning("暂无数据导出");let Ca=["序号",...($a=(ke=R.value)==null?void 0:ke.map(Re=>Re==null?void 0:Re.prop))==null?void 0:$a.filter(Re=>Re!=="操作")],_a=d==="导出全部"?Ne.value:Kl.value;const T=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];_a=_a==null?void 0:_a.map(Re=>Object.fromEntries(Object.entries(Re).filter(([na])=>!T.includes(na)))),Ca=["序号",...Ca],_a=_a==null?void 0:_a.map((Re,na)=>({序号:na+1,...Re}));let X=(c==null?void 0:c.compName)||"表格信息";Fo(_a,X,Ca,X)}else if(d==="OCR识别")sl.value=!0,xa.value=[],ia.value=1,Ie.value.clear(),de.value.clear(),ma.value=0;else if(d==="迁移")i.selectRow=h,i.show=!0;else if(d==="生成方法"){let Ca=await Gf(h),_a;h!==""?_a=[h]:_a=A.cloneDeep(Ne.value),_a=_a==null?void 0:_a.map(X=>(X.输出值=Ca,X));const T={fixContent:_a,buttonName:"编辑",relatedContents:c==null?void 0:c.related,columns:R.value,name:c==null?void 0:c.groupNames};Te("change",T)}else if(((va=N==null?void 0:N.extra)==null?void 0:va.type)==="methodButton"){let Ca;h!==""?Ca=[h]:Ca=A.cloneDeep(Ne.value);const T={fixContent:await vt(Ca,R==null?void 0:R.value,"Manual",Ne.value),buttonName:"methodButton",relatedContents:c==null?void 0:c.related,columns:R.value,name:c==null?void 0:c.groupNames};Te("change",T)}}},iu=async(d,h)=>{var N,z,F,C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke;try{let $a,va;const Ca=(N=fe.value[Ee.value+g])==null?void 0:N.filter(Ba=>{var nl;return((nl=Ba==null?void 0:Ba.key)==null?void 0:nl.type)==="structureMethod"}),_a=(z=fe.value[Ee.value+g])==null?void 0:z.filter(Ba=>{var nl;return((nl=Ba==null?void 0:Ba.key)==null?void 0:nl.type)==="structure"}),T=Ca==null?void 0:Ca.find(Ba=>{var nl,Wa;return((Wa=(nl=Ba==null?void 0:Ba.value)==null?void 0:nl.pageData)==null?void 0:Wa.method)==="保存"});if(!T)return;const X=(ne=(re=fe.value[(C=(F=T==null?void 0:T.value)==null?void 0:F.pageData)==null?void 0:C.path])==null?void 0:re.filter(Ba=>{var nl;return((nl=Ba==null?void 0:Ba.key)==null?void 0:nl.type)==="data"}))==null?void 0:ne.find(Ba=>{var nl,Wa,ul,dl;return((Wa=(nl=Ba==null?void 0:Ba.value)==null?void 0:nl.tableData)==null?void 0:Wa.算法名称)===((dl=(ul=T==null?void 0:T.value)==null?void 0:ul.pageData)==null?void 0:dl.method)});if(!X)return;const Re={buttonName:(be=(K=T==null?void 0:T.value)==null?void 0:K.pageData)==null?void 0:be.method,api:(He=(Ae=X==null?void 0:X.value)==null?void 0:Ae.tableData)==null?void 0:He.算法体,content:_a==null?void 0:_a.map(Ba=>{var nl;return(nl=Ba==null?void 0:Ba.value)==null?void 0:nl.pageData}),extraContent:[],extraValues:(Ge=($e=T==null?void 0:T.value)==null?void 0:$e.pageData)==null?void 0:Ge.data,methodName:(Oa=(wa=T==null?void 0:T.value)==null?void 0:wa.pageData)==null?void 0:Oa.path};if(!d)return;const na={...d,compData:(za=d==null?void 0:d.compData)==null?void 0:za.map(Ba=>{var nl;return(Ba==null?void 0:Ba.key)==="formContent"?{...Ba,contents:(nl=Ba==null?void 0:Ba.contents)==null?void 0:nl.map(Wa=>(Wa==null?void 0:Wa.prop)===h?{...Wa,value:""}:Wa)}:Ba})},we={key:{pageKey:Ee.value+g,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:na}},sa=await qa.axios.post(Re.api,we,{headers:{"Content-Type":"application/json"}});return((Ye=sa==null?void 0:sa.data)==null?void 0:Ye.code)===200&&($a=(ba=(Qa=sa==null?void 0:sa.data)==null?void 0:Qa.result)==null?void 0:ba.latestReportCode,va=(ke=(el=sa==null?void 0:sa.data)==null?void 0:el.result)==null?void 0:ke.status),{newMainKeyValue:$a,newStatus:va}}catch($a){throw qa.ElMessage.error($a),new Error($a)}},Tt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const ou=async(d,h,N)=>{var K,be;let z=d==null?void 0:d[h==null?void 0:h.prop],F=1,C,re;const ne=A.cloneDeep(Ee).value+g+z;if(ne){Tt.value="",C=(K=fe.value[ne])==null?void 0:K.filter($e=>{var Ge;return((Ge=$e==null?void 0:$e.key)==null?void 0:Ge.type)==="structure"});const Ae=C==null?void 0:C.find($e=>{var Ge,wa,Oa;return((Oa=(wa=(Ge=$e==null?void 0:$e.value)==null?void 0:Ge.pageData)==null?void 0:wa.comp)==null?void 0:Oa.toUpperCase())==="FORM"});re={...(be=Ae==null?void 0:Ae.value)==null?void 0:be.pageData,id:Ae==null?void 0:Ae.id};const He=await iu(re,h==null?void 0:h.prop);if(Tt.value=He==null?void 0:He.newStatus,He!=null&&He.newMainKeyValue)return He==null?void 0:He.newMainKeyValue}if(Ne.value.some(Ae=>(Ae==null?void 0:Ae[h==null?void 0:h.prop])===z)){const Ae=z;for(;Ne.value.some(He=>(He==null?void 0:He[h==null?void 0:h.prop])===`${Ae}(${F})`);)F++;z=`${Ae}(${F})`}return z},tu=async(d,h,N)=>{var C,re,ne,K;let z,F;if(await ou(N==null?void 0:N.data,N==null?void 0:N.firstCol),z=A.cloneDeep(Ee).value+g,F=A.cloneDeep(z)+`loading${((C=cl.value)==null?void 0:C.account)||((re=cl.value)==null?void 0:re.账号)}`,h){const be=(K=(ne=fe.value[F])==null?void 0:ne.filter(Ae=>{var He;return((He=Ae==null?void 0:Ae.key)==null?void 0:He.parentTable)===""}))==null?void 0:K.map(Ae=>{var He;return{id:Ae==null?void 0:Ae.id,...(He=Ae==null?void 0:Ae.value)==null?void 0:He.pageData}});(be==null?void 0:be.length)>0||await he.loadingConstruct(z,F,null,null,null),oa.setRouteToChildPath(A.cloneDeep(Ee).value),oe.setActiveMenuPath(F)}else oa.setRouteToChildPath(A.cloneDeep(Ee).value),oe.setActiveMenuPath(F)},su=()=>{Pe.value=!1,Sa.value=[],ve.value=!1},Li=d=>{var C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a;const h=[];Ce.value=A.cloneDeep(R.value),(re=he.getColumnChild((C=A.cloneDeep(R.value))==null?void 0:C.filter(T=>(T==null?void 0:T.label)!=="操作")))==null||re.forEach((T,X)=>{var Re,na,we;T!=null&&T.formType&&((Re=T==null?void 0:T.formType)==null?void 0:Re.toUpperCase())==="SELECT"||T!=null&&T.menuId?h.push({label:(na=T==null?void 0:T.prop)!=null&&na.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"+X,prop:T==null?void 0:T.prop,type:"Select",value:(d==null?void 0:d[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??X,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,multipleLimit:T==null?void 0:T.multipleLimit,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,relatedValueId:T==null?void 0:T.relatedValueId,disabled:T==null?void 0:T.disabled,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,allSelectionContents:(T==null?void 0:T.allSelectionContents)??[],filterContent:T==null?void 0:T.filterContent,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter}):h.push({label:(we=T==null?void 0:T.prop)!=null&&we.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"+X,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"?(d==null?void 0:d[T==null?void 0:T.prop])??"{}":(d==null?void 0:d[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??X,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter})}),d===""||!d||(Da.value=(d==null?void 0:d.id)??"");let N=he.getColumnChild((ne=A.cloneDeep(R.value))==null?void 0:ne.filter(T=>(T==null?void 0:T.label)!=="操作"));ka.value&&((K=ka.value)==null?void 0:K.length)>0&&(ka.value=(be=A.cloneDeep(ka).value)==null?void 0:be.map(T=>{var Re;let X=(T==null?void 0:T.prop)||((Re=N==null?void 0:N.find(na=>(na==null?void 0:na.label)===(T==null?void 0:T.label)))==null?void 0:Re.prop);return X&&(T.value=d[X]),T})),Ha.value=ka.value&&((Ae=ka.value)==null?void 0:Ae.length)>0?he.getTableFormToForm(ka.value):h,Ha.value=((He=Ha.value)==null?void 0:He.map(T=>({...T,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled})))??Ha.value;let z=[],F=((wa=(Ge=($e=c.itemData)==null?void 0:$e.filter(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:Ge[0])==null?void 0:wa.contents)??"";if(F=he.analyzeSplitToContent(F,","),(F==null?void 0:F.length)>0&&(z=F.flat()),(z==null?void 0:z.length)>0){let T=z==null?void 0:z.filter(sa=>sa==null?void 0:sa.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 sa=(za=(Oa=T==null?void 0:T.replace("=",w))==null?void 0:Oa.split(w))==null?void 0:za[1];((Ye=sa==null?void 0:sa.trim())==null?void 0:Ye.toUpperCase())==="MANUAL"&&(c==null||c.index,Ha.value=(Qa=Ha.value)==null?void 0:Qa.map((Ba,nl)=>Ba))}let X=(ba=Ha.value)==null?void 0:ba.filter(sa=>sa==null?void 0:sa.mainKey),Re;X==null||X.forEach(sa=>{var nl;if(Re!==void 0)return;let Ba=sa==null?void 0:sa.menus;((nl=X==null?void 0:X.filter(Wa=>Wa==null?void 0:Wa.mainKey))==null?void 0:nl.length)>1&&(Re=Ba,sa==null||sa.groups)});let na=[],we=new Map;if(X==null||X.forEach(sa=>{var Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l;if((Ba=sa==null?void 0:sa.prop)!=null&&Ba.includes(".")){let Nl=[];we.get(((Wa=(nl=sa==null?void 0:sa.prop)==null?void 0:nl.split("."))==null?void 0:Wa[0])+(sa!=null&&sa.isMainPath?0:1)+((ul=sa==null?void 0:sa.groups)==null?void 0:ul[0]))&&(Nl=we.get(((Vl=(dl=sa==null?void 0:sa.prop)==null?void 0:dl.split("."))==null?void 0:Vl[0])+(sa!=null&&sa.isMainPath?0:1)+((Ua=sa==null?void 0:sa.groups)==null?void 0:Ua[0]))),Nl.push(sa),we.set(((Pa=(hl=sa==null?void 0:sa.prop)==null?void 0:hl.split("."))==null?void 0:Pa[0])+(sa!=null&&sa.isMainPath?0:1)+((ol=sa==null?void 0:sa.groups)==null?void 0:ol[0]),Nl)}else{let Nl=[];we.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((Ka=sa==null?void 0:sa.groups)==null?void 0:Ka[0]))&&(Nl=we.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((tl=sa==null?void 0:sa.groups)==null?void 0:tl[0]))),Nl.push(sa),we.set("normal"+(sa!=null&&sa.isMainPath?0:1)+((_l=sa==null?void 0:sa.groups)==null?void 0:_l[0]),Nl)}}),na=Array.from(we.values()),(na==null?void 0:na.length)>0)for(let sa in na){let Ba=na==null?void 0:na[sa];if((Ba==null?void 0:Ba.length)!==1){if((Ba==null?void 0:Ba.length)>1){let nl=Ba==null?void 0:Ba.map(ol=>ol==null?void 0:ol.prop),Wa=Ba==null?void 0:Ba.map(ol=>ol==null?void 0:ol.label),ul=Ba==null?void 0:Ba.map(ol=>ol==null?void 0:ol.value),dl=(el=A.cloneDeep(Ba))==null?void 0:el[0],Vl=(ke=Ha.value)==null?void 0:ke.findIndex(ol=>(ol==null?void 0:ol.prop)===(dl==null?void 0:dl.prop)),Ua=($a=Ha.value)==null?void 0:$a.slice(0,Vl),hl=(Ca=Ha.value)==null?void 0:Ca.slice(Vl,(va=Ha.value)==null?void 0:va.length);dl.label=Wa==null?void 0:Wa.join("·"),dl.value=ul==null?void 0:ul.join(" "),dl.value.trim()===""&&(dl.value=""),dl.prop=nl==null?void 0:nl.join("·");let Pa=Ba==null?void 0:Ba.map(ol=>{var Ka;return(Ka=ol==null?void 0:ol.words)==null?void 0:Ka.join(".")});dl.relatedWords=Pa,dl.usingType="parent",hl.unshift(dl),Ha.value=[...Ua,...hl],Ha.value=(_a=Ha.value)==null?void 0:_a.map(ol=>(nl!=null&&nl.find(Ka=>Ka===(ol==null?void 0:ol.prop))&&(ol.isFormColHidden=!0,ol.relatedWords=Pa),ol))}}}}},cu=()=>{var h;const d=(h=t.value)==null?void 0:h.$el;d&&Bl.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:N=>{var re;const{oldIndex:z,newIndex:F}=N;if(z===F)return;const C=nn.value.splice(z,1)[0];nn.value.splice(F,0,C),R.value=(re=R.value)==null?void 0:re.slice().sort((ne,K)=>{if(ne.label==="操作")return 1;if(K.label==="操作")return-1;const be=nn.value.findIndex(He=>He.label===ne.label),Ae=nn.value.findIndex(He=>He.label===K.label);return be-Ae})}})};e.onMounted(()=>{fa.value=window.innerWidth-240*2,window.addEventListener("keydown",Yi)});const uu=()=>{e.nextTick(()=>{cu()})},du=()=>{p.value=!0},rt=(d,h)=>{var z;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let N;return d.children=(z=d.children)==null?void 0:z.map(F=>{var C,re;if((F==null?void 0:F.id)===Da.value){let ne={};for(let K in F){let be=(C=h==null?void 0:h.find(Ae=>(Ae==null?void 0:Ae.prop)===K))==null?void 0:C.label;be?ne[K]=(re=cr.value)==null?void 0:re[be]:ne[K]=F[K]??""}F=Object.assign(ne,cr.value),N=F}else{let ne=rt(F,h);F=ne==null?void 0:ne.contents,N=ne==null?void 0:ne.currentSelectContents}return F}),{contents:d,currentSelectContents:N}},At=(d,h)=>{let N,z;return d!=null&&d.find(F=>(F==null?void 0:F.id)===Da.value)?N=d==null?void 0:d.map(F=>{var C,re,ne;if((F==null?void 0:F.id)===Da.value){let K={};for(let Ae in F){let He=(C=h==null?void 0:h.find($e=>($e==null?void 0:$e.prop)===Ae))==null?void 0:C.label;He?K[Ae]=((re=cr.value)==null?void 0:re[He])??"":K[Ae]=F[Ae]??""}let be=cr.value;for(let Ae in K)(ne=cr.value)!=null&&ne[Ae]||(be[Ae]=(K==null?void 0:K[Ae])??"");F=be,z=F}return F}):N=d==null?void 0:d.map(F=>{var C,re,ne,K;if((F==null?void 0:F.id)===Da.value){let be={};for(let Ae in F){let He=(C=h==null?void 0:h.find($e=>($e==null?void 0:$e.prop)===Ae))==null?void 0:C.label;He?be[Ae]=(re=cr.value)==null?void 0:re[He]:be[Ae]=F[Ae]??""}F=Object.assign(be,cr.value),z=F}else F=(ne=rt(F,h))==null?void 0:ne.contents,z=(K=rt(F,h))==null?void 0:K.currentSelectContents;return F}),{newContents:N,currentSelectContents:z}},zt=(d,h,N)=>{var z,F;return d[h==null?void 0:h.prop]=N,typeof d.id=="number"&&(d.id=(z=d.id)==null?void 0:z.toString()),d.children&&((F=d.children)==null?void 0:F.length)>0&&(d.children=d.children.map(zt)),d},Mt=d=>{var N;const h=[];return h.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((N=d.children)==null||N.forEach(z=>{h.push(...Mt(z))})),(h==null?void 0:h.length)>0?h==null?void 0:h.map(z=>{const F={...z};return delete F.children,F}):[]},to=["Pacific6000数据采集装置.通道号","通道号"],$i=d=>{if(!d)return"";const h=to.map(N=>d==null?void 0:d[N]).find(N=>N!=null&&String(N).trim()!=="");return h==null?"":String(h).trim()},nt=async(d,h=void 0)=>{if(!d)return!1;try{const N=Ge=>{var wa,Oa,za;return Ge?typeof(Ge==null?void 0:Ge.value)=="string"?Ge.value:((za=(Oa=(wa=Ge==null?void 0:Ge._custom)==null?void 0:wa.value)==null?void 0:Oa.value)==null?void 0:za.value)||"":""},z=Array.isArray(lr.value)?lr.value:[],F=N(z.find(Ge=>(Ge==null?void 0:Ge.condition)==="child")),C=(Ee.value||"").replace(/\/+$/,""),re=F?`${C}/${F}`:C,ne=await Kr(re||Ee.value,!1),K=String(Qe.value||"").trim(),be=Ge=>String(Ge||"").trim(),Ae=(Ge,wa=[],Oa="")=>{if(!Array.isArray(Ge))return wa;for(const za of Ge){const Ye=be((za==null?void 0:za.choiceName)||(za==null?void 0:za.name0)||Oa);(za==null?void 0:za.comp)==="Table"&&(!K||Ye===K)&&wa.push(za),Array.isArray(za==null?void 0:za.children)&&Ae(za.children,wa,Ye),Array.isArray(za==null?void 0:za.tab)&&Ae(za.tab,wa,Ye),Array.isArray(za==null?void 0:za.choice)&&Ae(za.choice,wa,Ye)}return wa},He=Ae(ne||[]),$e=String((c==null?void 0:c.compName)||"");return He.some(Ge=>{var Oa,za;const wa=((za=(Oa=Ge==null?void 0:Ge.compData)==null?void 0:Oa.find(Ye=>(Ye==null?void 0:Ye.key)==="tableContents"))==null?void 0:za.contents)||[];return!Array.isArray(wa)||wa.length===0?!1:wa.some(Ye=>{if(String((Ge==null?void 0:Ge.name)||"")===$e&&(Ye==null?void 0:Ye.id)===h)return!1;const ba=$i(Ye);return!!ba&&ba===d})})}catch{return(Ne.value||[]).some(z=>{if((z==null?void 0:z.id)===h)return!1;const F=$i(z);return!!F&&F===d})}},Ri=async(d=!0,h,N)=>{var be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl;if(cr.value){const Pa=(Ae=he.getColumnChild((be=A.cloneDeep(R.value))==null?void 0:be.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")))==null?void 0:Ae.filter(Ka=>(Ka==null?void 0:Ka.required)===!0);for(let Ka=0;Ka<((Pa==null?void 0:Pa.length)??0);Ka++){const tl=Pa[Ka],_l=tl==null?void 0:tl.prop,Nl=(tl==null?void 0:tl.label)??_l,xr=(He=cr.value)==null?void 0:He[_l];if(xr===""||xr===null||xr===void 0||Array.isArray(xr)&&xr.length===0){qa.ElMessage.error(`${Nl}不能为空`);return}}const ol=$i(cr.value);if(ol&&await nt(ol,Da.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=he.getColumnChild(($e=A.cloneDeep(R.value))==null?void 0:$e.filter(Pa=>(Pa==null?void 0:Pa.label)!=="操作")),F,C=A.cloneDeep(Ne.value);if(!cr.value){q.value=!1;return}if(Da.value===""){ra.value++;let Pa;Pa={id:ra.value.toString()};try{Pa.sort=Zn(0,Ne.value||[])}catch{}Pa!=null&&Pa.children&&(Pa={...Pa,children:(Ge=Pa.children)==null?void 0:Ge.map(Ka=>zt(Ka,h,N))});const ol=Object.assign(cr.value,Pa);C.unshift(ol),F=ol}else C=(wa=At(C,z))==null?void 0:wa.newContents,F=(Oa=At(C,z))==null?void 0:Oa.currentSelectContents;const re=(za=c.itemData)==null?void 0:za.filter(Pa=>(Pa==null?void 0:Pa.key)==="childTree")[0];if(((Ye=re==null?void 0:re.contents)==null?void 0:Ye.length)>0){U.value="编辑";const Pa=[];C==null||C.forEach((tl,_l)=>{var xr;let Nl={};if(Array.isArray(tl)){let Ll=[];tl==null||tl.filter(yl=>!(yl!=null&&yl.id)).forEach((yl,Al)=>{var Jl,Tl,Gl,rr,Hl,hr,qr;if((Tl=(Jl=Nr.value)==null?void 0:Jl[Al])!=null&&Tl.prop&&!Array.isArray(yl)){let vr={};vr[Nr.value[Al].column]=yl,L!=null&&L.value&&((Gl=L==null?void 0:L.value)==null?void 0:Gl.length)>0&&((rr=L==null?void 0:L.value)!=null&&rr.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(vr)))&&(Ll=(Hl=L==null?void 0:L.value)==null?void 0:Hl.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(vr))),Ll&&Ll.length>0?Nl[Nr.value[Al].prop]=Ll!=null&&Ll.find(tr=>{var ur;return((ur=Object.keys(tr))==null?void 0:ur[0])===Nr.value[Al].column})?(hr=Ll==null?void 0:Ll.find(tr=>{var ur;return((ur=Object.keys(tr))==null?void 0:ur[0])===Nr.value[Al].column}))==null?void 0:hr[Nr.value[Al].column]:yl:Nl[Nr.value[Al].prop]=yl}else Array.isArray(yl)&&((qr=Nr.value[Al])!=null&&qr.prop?Nl[Nr.value[Al].prop]=yl:Nl.children=mt(yl,Nr.value))})}else Nl=tl;if(Array.isArray(tl)&&tl.some(Ll=>Ll==null?void 0:Ll.id)){const Ll=(xr=tl==null?void 0:tl.find(yl=>yl.id))==null?void 0:xr.id;Pa.push(Object.assign(Nl,{id:ro(Ll)}))}else Nl.id?Pa.push(Nl):Pa.push(Object.assign(Nl,{id:_l.toString()}))});const ol=(Ne.value||[]).map(tl=>String(tl==null?void 0:tl.id)),Ka=ci(Pa,ol);Ne.value=$t(Ka,re,R.value)}Ot(Ne.value),ln.value=Ne.value;const ne=zf(ln.value,pn.value,C);let K=[];if(H.value?(K=(Qa=A.cloneDeep(H).value.singleContent)==null?void 0:Qa.filter(Pa=>(Pa==null?void 0:Pa.id)!==(F==null?void 0:F.id)),K.push(F)):K=[F],Rl.value){const Pa={content:ne,singleContent:((ba=re==null?void 0:re.contents)==null?void 0:ba.length)>0?K==null?void 0:K.flatMap(Mt):K,index:c==null?void 0:c.index,buttonName:"编辑",column:R.value,parentTableId:c==null?void 0:c.parentTableId};oa.setCacheUpdatingData(Pa)}if((el=R.value)==null||el.forEach(Pa=>{(Pa==null?void 0:Pa.formType)==="Upload"&&(F[Pa.prop]=F[Pa.prop]===""?"{}":typeof F[Pa.prop]!="string"?JSON.stringify(F[Pa.prop]):F[Pa.prop])}),d){(Ca=(va=($a=(ke=c.itemData)==null?void 0:ke.find(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType"))==null?void 0:$a.value)==null?void 0:va.find(Ka=>(Ka==null?void 0:Ka.value)==="onConditionContents"))==null||Ca.content;let Pa=(_a=c.itemData)==null?void 0:_a.filter(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType");Pa=Array.from(new Map(Pa.filter(Boolean).map((Ka,tl)=>[Ka.value,{...Ka,_idx:tl}])).values()).sort((Ka,tl)=>Ka._idx-tl._idx).map(({_idx:Ka,...tl})=>tl),Pa=(T=Pa==null?void 0:Pa[(Pa==null?void 0:Pa.length)-1])==null?void 0:T.value;const ol={fixContent:[F],buttonName:U.value,relatedContents:c==null?void 0:c.related,columns:R.value,name:c==null?void 0:c.groupNames};oa.setTableLoading(c==null?void 0:c.index),q.value=!1,cr.value=void 0,Te("change",ol)}if((na=(Re=(X=Ha.value)==null?void 0:X[0])==null?void 0:Re.optionUrl)!=null&&na.menuId){q.value=!1;let Pa=(we=c.itemData)==null?void 0:we.filter(ol=>(ol==null?void 0:ol.key)==="filterAllType");if((Pa==null?void 0:Pa.length)>0){let ol=Pa==null?void 0:Pa.map(_l=>_l==null?void 0:_l.value),Ka=(nl=(Ba=(sa=ol.flat().find(_l=>{var Nl;return(Nl=_l==null?void 0:_l.content)==null?void 0:Nl.includes("@Num")}))==null?void 0:sa.content)==null?void 0:Ba.split(":"))==null?void 0:nl[1];((dl=(ul=(Wa=ol.flat().find(_l=>{var Nl;return(Nl=_l==null?void 0:_l.content)==null?void 0:Nl.includes("@Type:")}))==null?void 0:Wa.content)==null?void 0:ul.split(":"))==null?void 0:dl[1])!=="Manual"&&(Ka=parseInt(Ka),Ne.value=(hl=Ne.value)==null?void 0:hl.slice(((Vl=Ne.value)==null?void 0:Vl.length)-Ka,(Ua=Ne.value)==null?void 0:Ua.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",Yi),R.value=[],Ne.value=[],Ce.value=[],Na.value=[],ka.value=[],ha.value=[],Sa.value=[],Oe.value=[],Ha.value=[],Kl.value=[],t.value=null,Ln.value=""});const so=async(d,h,N)=>{var Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a;fr.value=(N==null?void 0:N.prop)??(N==null?void 0:N.property);const z=A.cloneDeep(c.itemData),F=((Ge=z==null?void 0:z.find(T=>(T==null?void 0:T.key)==="header"))==null?void 0:Ge.contents)??[];let C=F==null?void 0:F.find((T,X)=>{var Re,na,we;return(T==null?void 0:T.prop)===fr.value||(T==null?void 0:T.label)===fr.value||(X==null?void 0:X.toString())===((we=(na=(Re=fr.value)==null?void 0:Re.split("a"))==null?void 0:na[1])==null?void 0:we.toString())});const re=he.getColumnChild((wa=A.cloneDeep(R.value))==null?void 0:wa.filter(T=>(T==null?void 0:T.label)!=="操作"));if(C||(C=re==null?void 0:re.find(T=>(T==null?void 0:T.prop)===fr.value||(T==null?void 0:T.label)===fr.value)),C&&!((Oa=C==null?void 0:C.menus)!=null&&Oa.length)&&!((za=C==null?void 0:C.groups)!=null&&za.length)&&!((Ye=C==null?void 0:C.words)!=null&&Ye.length)){const T=(Qa=Ha.value)==null?void 0:Qa.find(X=>(X==null?void 0:X.prop)===fr.value);T&&(C={...C,menus:(T==null?void 0:T.menus)??(C==null?void 0:C.menus),groups:(T==null?void 0:T.groups)??(C==null?void 0:C.groups),words:(T==null?void 0:T.words)??(C==null?void 0:C.words),bindMenus:(T==null?void 0:T.bindMenus)??(C==null?void 0:C.bindMenus),isMainPath:(T==null?void 0:T.isMainPath)??(C==null?void 0:C.isMainPath),relatedContents:(T==null?void 0:T.relatedContents)??(C==null?void 0:C.relatedContents),endChildMenu:(T==null?void 0:T.endChildMenu)??(C==null?void 0:C.endChildMenu)})}if(C&&((ba=Ha==null?void 0:Ha.value)==null||ba.forEach(T=>{var X,Re,na,we,sa;(T==null?void 0:T.prop)===(C==null?void 0:C.prop)&&(T!=null&&T.endChildMenu)&&((X=C==null?void 0:C.prop)!=null&&X.includes(".")&&((na=(Re=C==null?void 0:C.prop)==null?void 0:Re.split("."))==null?void 0:na[0])!==((sa=(we=T==null?void 0:T.prop)==null?void 0:we.split("."))==null?void 0:sa[0])?C.endChildMenu=T==null?void 0:T.value:C.endChildMenu=T==null?void 0:T.endChildMenu)})),!C)return;const ne=fr.value,K=(el=Ne.value)==null?void 0:el.findIndex(T=>(T==null?void 0:T.id)===(h==null?void 0:h.id));K!==-1&&ne&&(Ne.value[K]={...Ne.value[K],[ne]:d});const be=T=>{Array.isArray(T)&&T.forEach(X=>{Array.isArray(X==null?void 0:X.allSelectionContents)&&X.allSelectionContents.length>0&&(X.contactValue=Ne.value[K]??h),Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&be(X.children)})};be(R.value),C.value=d,C.endChildMenu=C.endChildMenu||"";let Ae=C!=null&&C.isMainPath&&(C!=null&&C.mainKey)?C==null?void 0:C.value:"";const He=T=>{Array.isArray(T)&&T.forEach(X=>{var na,we;if(((X==null?void 0:X.type)==="Select"||(X==null?void 0:X.formType)&&X.formType.toUpperCase()==="SELECT"||(X==null?void 0:X.columnType)&&X.columnType.toUpperCase()==="SELECT")&&Array.isArray(X==null?void 0:X.menus)&&X.menus.length>0&&X.menus[X.menus.length-1]===""&&(C!=null&&C.isMainPath)&&(C!=null&&C.mainKey)){const sa=(na=X==null?void 0:X.prop)!=null&&na.includes(".")?X.prop.split(".")[0]:null,Ba=(we=C==null?void 0:C.prop)!=null&&we.includes(".")?C.prop.split(".")[0]:null;(!sa||!Ba||sa===Ba)&&(X.endChildMenu=Ae)}Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&He(X.children)})};if(He(R.value),!!(C!=null&&C.mainKey)&&Array.isArray(C==null?void 0:C.menus)&&(C==null?void 0:C.menus.length)>0&&(C!=null&&C.value)&&(C==null?void 0:C.value)!==""){let T=C!=null&&C.relatedContents&&((ke=C==null?void 0:C.relatedContents)==null?void 0:ke.length)>0?($a=C==null?void 0:C.relatedContents)==null?void 0:$a.find(X=>{var Re,na,we,sa;return(X==null?void 0:X[(sa=(Re=C==null?void 0:C.prop)==null?void 0:Re.split("."))==null?void 0:sa[((we=(na=C==null?void 0:C.prop)==null?void 0:na.split("."))==null?void 0:we.length)-1]])===(C==null?void 0:C.value)}):await ss(C);if(T){const X={...h};re==null||re.forEach(Re=>{var na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l;(Re==null?void 0:Re.prop)!==(C==null?void 0:C.prop)&&(C!=null&&C.relatedContents&&((na=C==null?void 0:C.relatedContents)==null?void 0:na.length)>0?(we=Re==null?void 0:Re.prop)!=null&&we.includes(".")&&((Ba=(sa=Re==null?void 0:Re.prop)==null?void 0:sa.split("."))==null?void 0:Ba[0])===((Wa=(nl=C==null?void 0:C.prop)==null?void 0:nl.split("."))==null?void 0:Wa[0])?X[Re.prop]=T[(Ua=(ul=Re==null?void 0:Re.prop)==null?void 0:ul.split("."))==null?void 0:Ua[((Vl=(dl=Re==null?void 0:Re.prop)==null?void 0:dl.split("."))==null?void 0:Vl.length)-1]]??X[Re.prop]:X[Re.prop]=(T==null?void 0:T[Re.prop])??X[Re.prop]:he.same((C==null?void 0:C.menus)??[],(Re==null?void 0:Re.menus)??[])&&he.same((C==null?void 0:C.groups)??[],(Re==null?void 0:Re.groups)??[])&&!he.same((C==null?void 0:C.words)??[],(Re==null?void 0:Re.words)??[])?(hl=Re==null?void 0:Re.prop)!=null&&hl.includes(".")&&((ol=(Pa=Re==null?void 0:Re.prop)==null?void 0:Pa.split("."))==null?void 0:ol[0])!==((tl=(Ka=C==null?void 0:C.prop)==null?void 0:Ka.split("."))==null?void 0:tl[0])||(X[Re.prop]=(T==null?void 0:T[(_l=Re==null?void 0:Re.words)==null?void 0:_l.join(".")])??(T==null?void 0:T[Re.prop])??X[Re.prop]):(!(Re!=null&&Re.isMainPath)&&he.same((C==null?void 0:C.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),X[Re.prop]=(T==null?void 0:T[Re.prop])??X[Re.prop]))}),Ne.value=(va=A.cloneDeep(Ne.value))==null?void 0:va.map(Re=>(Re==null?void 0:Re.id)===(h==null?void 0:h.id)?{...X,id:Re==null?void 0:Re.id}:Re)}}if((Ca=C==null?void 0:C.optionUrl)!=null&&Ca.menuSelect){let T="";re==null||re.forEach(na=>{var we,sa,Ba,nl,Wa;T===""&&((Ba=(sa=(we=na==null?void 0:na.optionUrl)==null?void 0:we.groupSelect)==null?void 0:sa[1])!=null&&Ba.includes("["))&&(T=(Wa=(nl=na==null?void 0:na.optionUrl)==null?void 0:nl.groupSelect)==null?void 0:Wa[1])});let X=await yt(C),Re;if(X==null||X.forEach(na=>{var we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl;T===((sa=(we=C==null?void 0:C.optionUrl)==null?void 0:we.groupSelect)==null?void 0:sa[1])&&((Wa=(nl=(Ba=C==null?void 0:C.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:nl[1])!=null&&Wa.includes("["))&&((hl=A.cloneDeep(na))==null?void 0:hl[(Ua=(Vl=(dl=(ul=C==null?void 0:C.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:dl[1])==null?void 0:Vl.replaceAll("[",""))==null?void 0:Ua.replaceAll("]","")])===(C==null?void 0:C.value)&&(Re=na)}),Re){const na={...h};re==null||re.forEach(we=>{var sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol;(Re!=null&&Re[we==null?void 0:we.label]||Re!=null&&Re[(Wa=(nl=(Ba=(sa=we==null?void 0:we.optionUrl)==null?void 0:sa.groupSelect)==null?void 0:Ba[1])==null?void 0:nl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])&&((Vl=(dl=(ul=we==null?void 0:we.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:dl[1])!=null&&Vl.includes("["))&&(na[we.prop]=(Re==null?void 0:Re[we==null?void 0:we.label])||(Re==null?void 0:Re[(ol=(Pa=(hl=(Ua=we==null?void 0:we.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:hl[1])==null?void 0:Pa.replaceAll("[",""))==null?void 0:ol.replaceAll("]","")]))}),Ne.value=(_a=A.cloneDeep(Ne.value))==null?void 0:_a.map(we=>(we==null?void 0:we.id)===(h==null?void 0:h.id)?{...na,id:we==null?void 0:we.id}:we)}}},pu=async d=>{var Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a,T;if(!d)return;const h=A.cloneDeep(cr.value||{});cr.value=d;const N=$i(h),z=$i(cr.value);if(z&&z!==N&&await nt(z,Da.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),to.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(cr.value||{},Re)||Object.prototype.hasOwnProperty.call(h||{},Re)){const na=(h==null?void 0:h[Re])??"";cr.value[Re]=na,d[Re]=na}}),Ha.value=(Ha.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!to.includes(Re.prop))return Re;const na=(h==null?void 0:h[Re.prop])??"";return{...Re,value:na,selectValue:na===""?[]:[na]}});return}let F=A.cloneDeep(c.itemData);F==null||F.map(X=>{var Re,na,we,sa;return(X==null?void 0:X.key)==="header"&&(Array.isArray((Re=X.contents)==null?void 0:Re[0])?X.contents=(we=he.getColumnChild((na=X.contents)==null?void 0:na[0]))==null?void 0:we.map((Ba,nl)=>{var Wa,ul,dl,Vl,Ua,hl;return((dl=(ul=(Wa=Ha.value)==null?void 0:Wa.find(Pa=>(Pa==null?void 0:Pa.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:ul.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((Vl=Object.values(d))==null?void 0:Vl[nl])?Ba.value=[(Ua=Object.values(d))==null?void 0:Ua[nl]]:Ba.value=(hl=Object.values(d))==null?void 0:hl[nl],Ba}):X.contents=(sa=X.contents)==null?void 0:sa.map((Ba,nl)=>{var Wa,ul,dl,Vl,Ua,hl;return((dl=(ul=(Wa=Ha.value)==null?void 0:Wa.find(Pa=>(Pa==null?void 0:Pa.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:ul.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((Vl=Object.values(d))==null?void 0:Vl[nl])?Ba.value=[(Ua=Object.values(d))==null?void 0:Ua[nl]]:Ba.value=(hl=Object.values(d))==null?void 0:hl[nl],Ba})),X});let C=Ha.value,re=(Ge=F==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Ge.contents;if(fr.value||(C=C==null?void 0:C.map(X=>{var Re;return X.value=X.value??((Re=re==null?void 0:re.find((na,we)=>(na==null?void 0:na.prop)===(X==null?void 0:X.name)))==null?void 0:Re.value),X})),!Lr.value)return;let ne=A.cloneDeep(fr.value);(wa=fr.value)!=null&&wa.includes("·")&&(fr.value=(za=(Oa=fr.value)==null?void 0:Oa.split("·"))==null?void 0:za[0]);let K=(Qa=(Ye=F==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Ye.contents)==null?void 0:Qa.find((X,Re)=>(X==null?void 0:X.prop)===fr.value);(ba=Ha==null?void 0:Ha.value)==null||ba.forEach(X=>{var Re,na,we,sa,Ba,nl,Wa,ul,dl;(X==null?void 0:X.prop)===(K==null?void 0:K.prop)&&(X!=null&&X.endChildMenu)&&((Re=K==null?void 0:K.prop)!=null&&Re.includes(".")&&((we=(na=K==null?void 0:K.prop)==null?void 0:na.split("."))==null?void 0:we[0])!==((Ba=(sa=X==null?void 0:X.prop)==null?void 0:sa.split("."))==null?void 0:Ba[0])?K.endChildMenu=(Wa=(nl=X==null?void 0:X.value)==null?void 0:nl.split(" "))==null?void 0:Wa[0]:K.endChildMenu=(dl=(ul=X==null?void 0:X.endChildMenu)==null?void 0:ul.split(" "))==null?void 0:dl[0])});let be=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",Ae=C,He=ee.value;if(He!=null&&He.find(X=>(K==null?void 0:K.prop)===(X==null?void 0:X.key))&&(He=He==null?void 0:He.filter(X=>(K==null?void 0:K.prop)!==(X==null?void 0:X.key))),He!=null&&He.find(X=>ne===(X==null?void 0:X.key))&&(He=He==null?void 0:He.filter(X=>ne!==(X==null?void 0:X.key))),(K==null?void 0:K.formType)==="Select"?Ae=Ae==null?void 0:Ae.map(X=>{var Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl;return(X==null?void 0:X.type)==="Select"&&(((Re=X==null?void 0:X.allSelectionContents)==null?void 0:Re.length)>0&&(X.contactValue=d),((K==null?void 0:K.prop)===(X==null?void 0:X.prop)||ne===(X==null?void 0:X.prop))&&K&&(Array.isArray(K.value)&&((na=K.value)==null?void 0:na.length)>0&&((we=K.value)!=null&&we.every(_l=>typeof _l=="string"))?(He.push({key:X==null?void 0:X.prop,value:[(Ba=K.value)==null?void 0:Ba[((sa=K.value)==null?void 0:sa.length)-1]]}),X.selectValue=(nl=He==null?void 0:He.find(_l=>(_l==null?void 0:_l.key)===(X==null?void 0:X.prop)))==null?void 0:nl.value):Array.isArray(K.value)&&((Wa=K.value)==null?void 0:Wa.length)===0?(He=[],X.selectValue=[],d[X==null?void 0:X.prop]=""):Array.isArray(X.value)&&He.push({key:X==null?void 0:X.prop,value:[(ul=X.value)==null?void 0:ul[(X==null?void 0:X.length)-1]]})),((Vl=X==null?void 0:X.menus)==null?void 0:Vl[((dl=X==null?void 0:X.menus)==null?void 0:dl.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((Ua=X==null?void 0:X.prop)!=null&&Ua.includes(".")&&((Pa=(hl=X==null?void 0:X.prop)==null?void 0:hl.split("."))==null?void 0:Pa[0])!==((Ka=(ol=K==null?void 0:K.prop)==null?void 0:ol.split("."))==null?void 0:Ka[0])||(X.endChildMenu=(tl=be==null?void 0:be.split(" "))==null?void 0:tl[0]))),X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X}):(K==null?void 0:K.formType)!=="Input"&&(Ae=Ae==null?void 0:Ae.map(X=>(X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X))),ee.value=He,Ae!=null&&Ae.some(X=>(X==null?void 0:X.functionName)&&(X==null?void 0:X.functionName)!=="")){let X=await vt([d],R==null?void 0:R.value,"Auto",Ne.value),Re=[];(el=Ae==null?void 0:Ae.filter(we=>(we==null?void 0:we.functionName)&&(we==null?void 0:we.functionName)!==""))==null||el.forEach(we=>{var sa;((sa=we==null?void 0:we.functionRelatedWords)==null?void 0:sa.length)>0&&(Re=[...Re,...we==null?void 0:we.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(we=>(we==null?void 0:we[0])!=="@");let na=[];for(let we in X==null?void 0:X[0])Re!=null&&Re.find(sa=>we===sa||(we==null?void 0:we.includes("."+sa)))&&na.push(((ke=X==null?void 0:X[0])==null?void 0:ke[we])!=="");(X==null?void 0:X.length)>0&&na.every(we=>we)&&(Ae=Ae==null?void 0:Ae.map(we=>{var sa;return we.value=((sa=X==null?void 0:X[0])==null?void 0:sa[we==null?void 0:we.prop])??we.value,we})),cr.value=X==null?void 0:X[0]}if(Ha.value=Ae,K=Object.assign({},K??{},{relatedWords:(va=($a=Ha==null?void 0:Ha.value)==null?void 0:$a.find(X=>(X==null?void 0:X.prop)===(K==null?void 0:K.prop)))==null?void 0:va.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let X=K!=null&&K.relatedContents&&((Ca=K==null?void 0:K.relatedContents)==null?void 0:Ca.length)>0?(_a=K==null?void 0:K.relatedContents)==null?void 0:_a.find(Re=>{var na,we,sa,Ba;return(Re==null?void 0:Re[(Ba=(na=K==null?void 0:K.prop)==null?void 0:na.split("."))==null?void 0:Ba[((sa=(we=K==null?void 0:K.prop)==null?void 0:we.split("."))==null?void 0:sa.length)-1]])===(K==null?void 0:K.value)}):await ss(K);if(X&&JSON.stringify(X)!=="{}"){let Re=Ae;Re=Re==null?void 0:Re.map(we=>{var sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l,Nl,xr,Ll,yl,Al,Jl,Tl;if((K==null?void 0:K.prop)===(we==null?void 0:we.prop))we.value=(X==null?void 0:X[(sa=we==null?void 0:we.words)==null?void 0:sa.join(".")])??(X==null?void 0:X[we==null?void 0:we.prop])??X[(ul=(Ba=we==null?void 0:we.prop)==null?void 0:Ba.split("."))==null?void 0:ul[((Wa=(nl=we==null?void 0:we.prop)==null?void 0:nl.split("."))==null?void 0:Wa.length)-1]];else if(K!=null&&K.relatedContents&&((dl=K==null?void 0:K.relatedContents)==null?void 0:dl.length)>0)we.value=(Vl=we==null?void 0:we.prop)!=null&&Vl.includes(".")&&((hl=(Ua=we==null?void 0:we.prop)==null?void 0:Ua.split("."))==null?void 0:hl[0])===((ol=(Pa=K==null?void 0:K.prop)==null?void 0:Pa.split("."))==null?void 0:ol[0])?X[(Nl=(Ka=we==null?void 0:we.prop)==null?void 0:Ka.split("."))==null?void 0:Nl[((_l=(tl=we==null?void 0:we.prop)==null?void 0:tl.split("."))==null?void 0:_l.length)-1]]:(X==null?void 0:X[we==null?void 0:we.prop])??(we==null?void 0:we.value);else if(he.same((K==null?void 0:K.menus)??[],(we==null?void 0:we.menus)??[])&&he.same((K==null?void 0:K.groups)??[],(we==null?void 0:we.groups)??[])&&!he.same((K==null?void 0:K.words)??[],(we==null?void 0:we.words)??[]))if((xr=we==null?void 0:we.prop)!=null&&xr.includes(".")&&((yl=(Ll=we==null?void 0:we.prop)==null?void 0:Ll.split("."))==null?void 0:yl[0])!==((Jl=(Al=K==null?void 0:K.prop)==null?void 0:Al.split("."))==null?void 0:Jl[0])){let Gl=Object.keys(X);Gl=Gl==null?void 0:Gl.find(rr=>{var Hl;return rr==null?void 0:rr.includes("."+((Hl=we==null?void 0:we.words)==null?void 0:Hl.join(".")))}),we.value=(X==null?void 0:X[Gl])??(X==null?void 0:X[we==null?void 0:we.prop])??we.value}else{let Gl=Object.keys(X);Gl=Gl==null?void 0:Gl.find(rr=>{var Hl;return rr==null?void 0:rr.includes("."+((Hl=we==null?void 0:we.words)==null?void 0:Hl.join(".")))}),we.value=(X==null?void 0:X[(Tl=we==null?void 0:we.words)==null?void 0:Tl.join(".")])??(X==null?void 0:X[Gl])??(X==null?void 0:X[we==null?void 0:we.prop])??we.value}else!(we!=null&&we.isMainPath)&&he.same((K==null?void 0:K.bindMenus)??[],(we==null?void 0:we.bindMenus)??[]),we.value=(X==null?void 0:X[we==null?void 0:we.prop])??we.value;return we}),Ha.value=Re;let na={};(T=Ha.value)==null||T.forEach(we=>{na[we.prop]=we==null?void 0:we.value}),cr.value=na}}Lr.value=!0,M.value=!1},fu=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",hu=d=>{var C,re;const h=(re=(C=ka.value)==null?void 0:C.find(ne=>(ne==null?void 0:ne.label)===(d==null?void 0:d.label)))==null?void 0:re.multiple,N=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;Ne.value.forEach(ne=>{const K=ne==null?void 0:ne[N];h&&So.isString(K)&&(ne[N]=[K]),!h&&!So.isString(K)&&(ne[N]="")})},It=(d,h)=>{var N;return h==null||h.forEach(z=>{d[z==null?void 0:z.prop]=z==null?void 0:z.value}),d.children&&((N=d.children)==null?void 0:N.length)>0&&(d.children=d.children.map(z=>It(z,h))),d},it=d=>{var N,z,F,C,re,ne;Li("");const h=(N=Ha.value)==null?void 0:N.reduce((K,be)=>(K[be.name]=be.value,K),{});if(((z=Object.keys(h))==null?void 0:z.length)>0){cr.value=h,Da.value="",ra.value=(F=Ne.value)==null?void 0:F.length,Oe.value=(C=Za.value)==null?void 0:C.filter(be=>(be==null?void 0:be.label)!=="新增");const K=(ne=(re=Ce.value)==null?void 0:re.filter(be=>(be==null?void 0:be.label)!=="操作"))==null?void 0:ne.map(be=>{var He,$e,Ge;const Ae=($e=(He=ka.value)==null?void 0:He.find(wa=>(wa==null?void 0:wa.label)===(be==null?void 0:be.label)))==null?void 0:$e.multiple;return hu(be),{...be,contents:(be==null?void 0:be.options)??[],optionUrl:be!=null&&be.formMenuSelect&&((Ge=be==null?void 0:be.formMenuSelect)==null?void 0:Ge.length)>0?{groupSelect:be==null?void 0:be.groupSelect,menuSelect:be==null?void 0:be.formMenuSelect,selectRelateType:"",type:be==null?void 0:be.formType,multiple:Ae}:null}});R.value=K==null?void 0:K.map(be=>It(be,[{prop:"type",value:"edit"},{prop:"columnType",value:fu(be==null?void 0:be.formType)||(be==null?void 0:be.columnType)}])),d==="createClick"&&(U.value="新增",Ri(!0))}},hi={START:"开始时间",END:"结束时间",HOURS:"工时"},vu=(d,h)=>Number(A.dayjs(h).diff(A.dayjs(d),"day",!0).toFixed(1)),Ot=d=>{var C;const h=c.itemData,N=(C=h==null?void 0:h.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:C.contents,z=new Map;return N==null||N.forEach((re,ne)=>{const{label:K}=re;z.set(K,ne)}),!z.has(hi.START)||!z.has(hi.END)||!z.has(hi.HOURS)?d:d==null?void 0:d.map(re=>{const ne=re==null?void 0:re[hi.START],K=re==null?void 0:re[hi.END],be=vu(ne,K);return ne&&K&&(re[hi.HOURS]=`${be}天`),re})},Lt=(d,h,N=0)=>{if(N>((h==null?void 0:h.length)??""))return d;const z=h==null?void 0:h[N],F=new Map;for(const re of d){const ne=re[z];F.has(ne)||F.set(ne,[]),F.get(ne)&&F.get(ne).push(re)}const C=[];for(const[re,ne]of F){const[K,...be]=ne,Ae={...K};N+1===((h==null?void 0:h.length)??"")?Ae.children=ne==null?void 0:ne.map(He=>(He.level=A.cloneDeep(N)+1,He)).filter((He,$e)=>$e!==0):be.length>0&&(Ae.children=Lt(be,h,N+1)),Ae.level=N,C.push(Ae)}return C},$t=(d,h,N)=>{var F;if(!(h!=null&&h.contents)||((F=h==null?void 0:h.contents)==null?void 0:F.length)===0)return d;let z=[];return z=Lt(d,h==null?void 0:h.contents,0),z},Rt=async(d,h)=>{var za,Ye,Qa,ba,el,ke,$a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l,Nl,xr,Ll,yl,Al,Jl,Tl,Gl,rr,Hl,hr,qr,vr,tr,ur,Ft,Pt,jt;const N=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="header");d==null||d.filter(ua=>(ua==null?void 0:ua.key)==="tableIndexColumn")[0];const z=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="childTree")[0];let F=!0;if((Qa=(Ye=(za=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="filterAllType"))==null?void 0:za.value)==null?void 0:Ye.find(ua=>(ua==null?void 0:ua.value)==="onPamButtonContents"))!=null&&Qa.content){let ua=(ke=(el=(ba=d==null?void 0:d.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:ba.value)==null?void 0:el.find(El=>(El==null?void 0:El.value)==="onPamButtonContents"))==null?void 0:ke.content;ua=($a=ua==null?void 0:ua.split(":"))==null?void 0:$a[1],ua=(va=ua.slice(1,(ua==null?void 0:ua.length)-1))==null?void 0:va.split(","),F=!!(ua!=null&&ua.find(El=>El==="操作"))}const C=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="page"),re=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="rowButton"),ne=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="extraButton"),K=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="tableContents"),be=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="bottomButton"),Ae=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="tableIndex");ka.value=(_a=(Ca=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="tableToForm"))==null?void 0:Ca[0])==null?void 0:_a.contents,pe.value=(C==null?void 0:C.contents)??!0;let He=[];Ml.value===""?He=N==null?void 0:N[0]:He=(N==null?void 0:N.find(ua=>(ua==null?void 0:ua.selectLabel)==="("+Ml.value+")"))??(N==null?void 0:N.find(ua=>!(ua!=null&&ua.selectLabel)));let $e=[];Ml.value===""?$e=Ae==null?void 0:Ae[0]:$e=(Ae==null?void 0:Ae.find(ua=>(ua==null?void 0:ua.selectLabel)==="("+Ml.value+")"))??(Ae==null?void 0:Ae.find(ua=>!(ua!=null&&ua.selectLabel)));let Ge=[],wa=[];if(((T=He==null?void 0:He.contents)==null?void 0:T.length)>0){let ua=[],El=He==null?void 0:He.contents;if(Array.isArray(El==null?void 0:El[0])&&((X=El==null?void 0:El[0])!=null&&X.every(Ya=>!(Ya!=null&&Ya.children)))&&(El=El==null?void 0:El[0]),El.some(Ya=>Array.isArray(Ya)&&(Ya==null?void 0:Ya.find(qe=>qe.children))))ua=(Re=he.getGradeColumns(El,F))==null?void 0:Re[0],ua!=null&&ua.find(Ya=>(Ya==null?void 0:Ya.label)==="操作")||ua.push({label:"操作",prop:"operate",type:"operate"});else{let Ya=El.some(qe=>Array.isArray(qe))?El==null?void 0:El[0]:El;Ya!=null&&Ya.find(qe=>(qe==null?void 0:qe.label)==="操作")||Ya.push({label:"操作",prop:"operate",type:"operate"}),Ya==null||Ya.forEach((qe,er)=>{var Rr,Mr,Vr,Dr,ai,yi,gi,gr,_n,Vn,bi,an,Fn,Wt,Kt,Gt,Yt,Jt,Xt,Zt;if((Mr=(Rr=Ee.value)==null?void 0:Rr.split("/"))==null||Mr.forEach(nr=>{var mr,Cn,Qt;nr!==""&&((Qt=(Cn=(mr=nr==null?void 0:nr.split(g+"updateLoading"))==null?void 0:mr[0])==null?void 0:Cn.split(g+"loading"))==null||Qt[0])}),qe!=null&&qe.methodContent){let nr=(ai=(Dr=(Vr=qe==null?void 0:qe.methodContent)==null?void 0:Vr.replace("@","%%#"))==null?void 0:Dr.split("%%#"))==null?void 0:ai[1];if(nr=nr==null?void 0:nr.slice(0,(nr==null?void 0:nr.length)-1),nr=he.contentTransArrayToAllNoExtra(nr??"",","),(yi=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&yi.includes("Prop")&&((gi=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&gi.includes("Manual"))){let mr=(_n=(gr=nr==null?void 0:nr.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:gr.split(":"))==null?void 0:_n[1];mr=((an=(bi=(Vn=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Vn.replaceAll("]",""))==null?void 0:bi.split(","))==null?void 0:an[1])??"算法执行",Ge.push(mr)}else if((Fn=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&Fn.includes("Row")&&((Wt=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&Wt.includes("Manual"))){let mr=(Gt=(Kt=nr==null?void 0:nr.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:Kt.split(":"))==null?void 0:Gt[1];mr=((Xt=(Jt=(Yt=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Yt.replaceAll("]",""))==null?void 0:Jt.split(","))==null?void 0:Xt[1])??"算法执行",wa.push(mr)}}(Zt=ka.value)==null||Zt.find(nr=>(nr==null?void 0:nr.prop)===(qe==null?void 0:qe.prop)),ua.push({label:(qe==null?void 0:qe.label)==="操作"?F?"操作":"":(qe==null?void 0:qe.label)??"",prop:(qe==null?void 0:qe.label)==="操作"?"operate":(qe==null?void 0:qe.prop)??"a"+er,width:qe!=null&&qe.width?parseInt(qe.width):"",fixed:(qe==null?void 0:qe.fixed)??void 0,sortable:(qe==null?void 0:qe.sortable)??!1,filterable:(qe==null?void 0:qe.filterable)??!1,operable:(qe==null?void 0:qe.operable)??!1,showSummary:(qe==null?void 0:qe.showSummary)??!1,align:(qe==null?void 0:qe.align)??"left",showOverflowTooltip:(qe==null?void 0:qe.showOverflowTooltip)??!0,isNotDrag:(qe==null?void 0:qe.isNotDrag)??!1,isEditCol:(qe==null?void 0:qe.isEditCol)??!1,isOperate:(qe==null?void 0:qe.isOperate)??!1,id:(qe==null?void 0:qe.id)??er,type:(qe==null?void 0:qe.label)==="操作"?"operate":void 0,formType:(qe==null?void 0:qe.formType)??(qe!=null&&qe.groupSelect?"Select":""),disabled:qe==null?void 0:qe.disabled,options:(qe==null?void 0:qe.options)??[],value:(qe==null?void 0:qe.value)??"",isExistChild:(qe==null?void 0:qe.isExistChild)??!1,mainKey:(qe==null?void 0:qe.mainKey)??er===0,allSelectionContents:(qe==null?void 0:qe.allContents)??[],filterContent:qe==null?void 0:qe.filterContents,menus:qe==null?void 0:qe.menus,groups:qe==null?void 0:qe.groups,words:qe==null?void 0:qe.words,filter:qe==null?void 0:qe.filter,bindMenus:qe==null?void 0:qe.bindMenus,fatherPath:qe==null?void 0:qe.fatherPath,isMainPath:qe==null?void 0:qe.isMainPath,required:(qe==null?void 0:qe.required)??!1,relatedContents:qe==null?void 0:qe.relatedContents,functionName:qe==null?void 0:qe.functionName,functionRelatedWords:qe==null?void 0:qe.functionRelatedWords,calculatorFilter:qe==null?void 0:qe.calculatorFilter,relatedPages:qe==null?void 0:qe.relatedPages,multiple:(qe==null?void 0:qe.multiple)??!1,multipleLimit:qe==null?void 0:qe.multipleLimit})})}$.value=(na=be==null?void 0:be[0])==null?void 0:na.contents;const tn=he.getNewColumnChild(ua),Ht=Ya=>Array.isArray(Ya)?Ya.map(qe=>(Array.isArray(qe==null?void 0:qe.children)&&qe.children.length>0?(qe.sortable=!1,Ht(qe.children)):(qe==null?void 0:qe.prop)==="operate"||(qe==null?void 0:qe.label)==="操作"||(qe==null?void 0:qe.type)==="operate"||(qe.sortable=!1),qe)):Ya;Ht(tn),await Zi(tn),a0(se.value,tn),R.value=tn,Na.value=tn,r.value=(we=R.value)==null?void 0:we.map(Ya=>Ya==null?void 0:Ya.label);let sn=(Ba=(sa=he.getAllLeafNodes(R.value))==null?void 0:sa.filter(Ya=>(Ya==null?void 0:Ya.type)!=="operate"))==null?void 0:Ba.map((Ya,qe)=>({prop:(Ya==null?void 0:Ya.prop)??"a"+qe,column:Ya.label}));Nr.value=sn;let en=[];Ml.value===""?en=K==null?void 0:K[0]:en=(K==null?void 0:K.find(Ya=>(Ya==null?void 0:Ya.selectLabel)==="("+Ml.value+")"))??(K==null?void 0:K.find(Ya=>!(Ya!=null&&Ya.selectLabel)));let ei=Array.isArray((nl=en==null?void 0:en.contents)==null?void 0:nl[0])&&((Wa=en==null?void 0:en.contents)!=null&&Wa[0].every(Ya=>Array.isArray(Ya)))?(ul=en==null?void 0:en.contents)==null?void 0:ul[0]:en==null?void 0:en.contents;$e!=null&&$e.contents&&((dl=$e==null?void 0:$e.contents)==null?void 0:dl.length)!==0&&(ei=(Vl=A.cloneDeep(ei))==null?void 0:Vl.map((Ya,qe)=>{if(!Array.isArray(Ya)){let er={};for(let Rr in Ya)Rr!=="id"&&Rr!=="index"&&(er[Rr]=Ya[Rr]);Ya=Object.values(er)}return Ya}));const Nu=!!((Ua=R.value)!=null&&Ua.find(Ya=>Ya.prop==="index"));ei=cc(ei,$e==null?void 0:$e.contents,Nu);const vi=[];ei==null||ei.forEach((Ya,qe)=>{var Rr;let er={};if(Array.isArray(Ya)){let Mr=[];Ya==null||Ya.filter(Vr=>!(Vr!=null&&Vr.id)).forEach((Vr,Dr)=>{var ai,yi,gi,gr,_n,Vn;if((ai=sn==null?void 0:sn[Dr])!=null&&ai.prop&&!Array.isArray(Vr)){let bi={};bi[sn[Dr].column]=Vr,L!=null&&L.value&&((yi=L==null?void 0:L.value)==null?void 0:yi.length)>0&&((gi=L==null?void 0:L.value)!=null&&gi.find(an=>JSON.stringify(an==null?void 0:an[0])===JSON.stringify(bi)))&&(Mr=(gr=L==null?void 0:L.value)==null?void 0:gr.find(an=>JSON.stringify(an==null?void 0:an[0])===JSON.stringify(bi))),Mr&&Mr.length>0?er[sn[Dr].prop]=Mr!=null&&Mr.find(an=>{var Fn;return((Fn=Object.keys(an))==null?void 0:Fn[0])===sn[Dr].column})?(_n=Mr==null?void 0:Mr.find(an=>{var Fn;return((Fn=Object.keys(an))==null?void 0:Fn[0])===sn[Dr].column}))==null?void 0:_n[sn[Dr].column]:Vr:er[sn[Dr].prop]=Vr}else Array.isArray(Vr)&&((Vn=sn[Dr])!=null&&Vn.prop?er[sn[Dr].prop]=Vr:er.children=mt(Vr,sn))})}else er=Ya;if(Array.isArray(Ya)&&Ya.some(Mr=>Mr==null?void 0:Mr.id)){const Mr=(Rr=Ya==null?void 0:Ya.find(Vr=>Vr.id))==null?void 0:Rr.id;vi.push(Object.assign(er,{id:ro(Mr)}))}else er.id?vi.push(er):vi.push(Object.assign(er,{id:qe.toString()}))});try{const Ya=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),qe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),er=Ya==null?void 0:Ya.tableId,Rr=Ya==null?void 0:Ya.compIndex;if(er&&Array.isArray(qe)&&qe.length>0&&String(er)===String(c==null?void 0:c.parentTableId)&&String(Rr)===String(c==null?void 0:c.index)){const Mr=new Set(vi.map(Dr=>String(Dr==null?void 0:Dr.id))),Vr=qe.filter(Dr=>!Mr.has(String(Dr)));if(Vr.length>0){const Dr=Ya==null?void 0:Ya.pageKey,ai=Dr!=null&&Dr.startsWith("/")?Dr.substring(1):Dr;((h==null?void 0:h[Dr])||(h==null?void 0:h[ai])||[]).filter(gr=>{var _n,Vn;return((_n=gr==null?void 0:gr.key)==null?void 0:_n.type)==="data"&&String((Vn=gr==null?void 0:gr.key)==null?void 0:Vn.tableId)===String(er)&&Vr.includes(gr==null?void 0:gr.id)}).forEach(gr=>{var _n;Mr.has(String(gr==null?void 0:gr.id))||(vi.push({id:gr==null?void 0:gr.id,...((_n=gr==null?void 0:gr.value)==null?void 0:_n.tableData)||{}}),Mr.add(String(gr==null?void 0:gr.id)))})}}}catch{}let mi=null;try{const Ya=`ocr_committed_temp_ids_v1:${String((c==null?void 0:c.parentTableId)??"")}:${String((c==null?void 0:c.index)??"")}`,qe=JSON.parse(sessionStorage.getItem(Ya)||"null");Array.isArray(qe)&&qe.length>0&&(mi=new Set(qe.map(er=>String(er))))}catch{}const Ut=Array.from(((hl=Aa.value)==null?void 0:hl.values())||[]).filter(Ya=>!(!(Ya!=null&&Ya._isOCRRow&&(Ya==null?void 0:Ya._ocrTableId)===(c==null?void 0:c.index))||mi&&mi.has(String(Ya==null?void 0:Ya.id)))),Bu=(Ne.value||[]).map(Ya=>String(Ya==null?void 0:Ya.id)),qt=ci(vi,Bu);if(Ne.value=$t(qt,z,R.value),We.value=qt,(Pa=We.value)==null||Pa.forEach(Ya=>{var qe;(qe=Aa.value)==null||qe.set(Ya.id,Ya)}),mi&&mi.size>0)try{const Ya=new Set(Array.from(mi.values()));Ne.value=(Ne.value||[]).filter(qe=>!Ya.has(String(qe==null?void 0:qe.id))),We.value=(We.value||[]).filter(qe=>!Ya.has(String(qe==null?void 0:qe.id))),Ya.forEach(qe=>{var er,Rr;try{(Rr=(er=Aa.value)==null?void 0:er.delete)==null||Rr.call(er,qe)}catch{}})}catch{}const co=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ot=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(co&&Array.isArray(ot)&&ot.length>0&&String(co==null?void 0:co.compIndex)===String(c==null?void 0:c.index)){const Ya=new Set((We.value||[]).map(qe=>String(qe==null?void 0:qe.id)));ot.filter(qe=>!Ya.has(String(qe)))}if(Ut.length>0){const Ya=new Set((Ne.value||[]).map(er=>er==null?void 0:er.id)),qe=Ut.filter(er=>!Ya.has(er.id));qe.length>0&&(Ne.value=[...Ne.value||[],...qe],We.value=[...We.value||[],...qe],qe.forEach(er=>{var Rr;return(Rr=Aa.value)==null?void 0:Rr.set(er.id,er)}))}}else R.value=[],Ce.value=[],Ne.value=[],We.value=[],Aa.value=new Map;if(wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(ua=>({label:ua,type:"methodButton"})),((ol=re==null?void 0:re.contents)==null?void 0:ol.length)>0?ha.value=re==null?void 0:re.contents:ha.value=[],ha.value=[...ha.value,...wa],Ge=[...new Set(Ge)],Ge=Ge==null?void 0:Ge.map(ua=>({label:ua,type:"methodButton"})),((Ka=ne==null?void 0:ne.contents)==null?void 0:Ka.length)>0)if((Nl=(_l=(tl=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="filterAllType"))==null?void 0:tl.value)==null?void 0:_l.find(ua=>(ua==null?void 0:ua.value)==="onButtonContents"))!=null&&Nl.content){let ua=(yl=(Ll=(xr=d==null?void 0:d.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:xr.value)==null?void 0:Ll.find(El=>(El==null?void 0:El.value)==="onButtonContents"))==null?void 0:yl.content;if(ua=(Al=ua==null?void 0:ua.split(":"))==null?void 0:Al[1],ua=(Jl=ua.slice(1,(ua==null?void 0:ua.length)-1))==null?void 0:Jl.split(","),Oe.value=(Tl=ne==null?void 0:ne.contents)==null?void 0:Tl.filter(El=>ua==null?void 0:ua.find(tn=>tn===(El==null?void 0:El.label))),Za.value=(Gl=ne==null?void 0:ne.contents)==null?void 0:Gl.filter(El=>ua==null?void 0:ua.find(tn=>tn===(El==null?void 0:El.label))),(rr=ne==null?void 0:ne.contents)!=null&&rr.some(El=>(El==null?void 0:El.label)==="OCR识别")&&!((Hl=Oe.value)!=null&&Hl.some(El=>(El==null?void 0:El.label)==="OCR识别"))){const El=(hr=ne==null?void 0:ne.contents)==null?void 0:hr.find(tn=>(tn==null?void 0:tn.label)==="OCR识别");Oe.value=[...Oe.value,El],Za.value=[...Za.value,El]}G.value=!!(ua!=null&&ua.find(El=>El==="搜索")),I.value=!!(ua!=null&&ua.find(El=>El==="块状显示"))}else Oe.value=ne==null?void 0:ne.contents,Za.value=ne==null?void 0:ne.contents;else Oe.value=[],Za.value=[];Oe.value=[...Oe.value,...Ge],Za.value=[...Za.value,...Ge],typeof Ee.value=="string"&&Ee.value==="设备管理/试验设备"&&(c==null?void 0:c.compName)==="设备列表"?((qr=Oe.value)!=null&&qr.some(ua=>(ua==null?void 0:ua.label)==="OCR识别")||(Oe.value=[...Oe.value||[],{label:"OCR识别"}]),(vr=Za.value)!=null&&vr.some(ua=>(ua==null?void 0:ua.label)==="OCR识别")||(Za.value=[...Za.value||[],{label:"OCR识别"}])):(Oe.value=(Oe.value||[]).filter(ua=>(ua==null?void 0:ua.label)!=="OCR识别"),Za.value=(Za.value||[]).filter(ua=>(ua==null?void 0:ua.label)!=="OCR识别")),(tr=Oe.value)!=null&&tr.some(ua=>(ua==null?void 0:ua.label)==="切换视图")||(Oe.value=[...Oe.value||[],{label:"切换视图"}]),(ur=Za.value)!=null&&ur.some(ua=>(ua==null?void 0:ua.label)==="切换视图")||(Za.value=[...Za.value||[],{label:"切换视图"}]),ra.value=((Ft=Ne==null?void 0:Ne.value)==null?void 0:Ft.length)??0,Ot(Ne.value),ln.value=Ne.value,Rl.value&&(R.value=(jt=(Pt=Ce.value)==null?void 0:Pt.filter(ua=>(ua==null?void 0:ua.label)!=="操作"))==null?void 0:jt.map(ua=>{var El;return{...ua,type:"edit",optionUrl:ua!=null&&ua.formMenuSelect&&((El=ua==null?void 0:ua.formMenuSelect)==null?void 0:El.length)>0?{groupSelect:ua==null?void 0:ua.groupSelect,menuSelect:ua==null?void 0:ua.formMenuSelect,selectRelateType:"",type:ua==null?void 0:ua.formType}:null}}),it())};e.watch(()=>[c.itemData,Ml.value,Nn.value,pn.value,L==null?void 0:L.value],async()=>{var d,h,N,z,F,C;if((d=c==null?void 0:c.itemData)!=null&&d.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((h=Z.value)!=null&&h.find(re=>{var ne,K;return(re==null?void 0:re.key)===((K=(ne=c==null?void 0:c.itemData)==null?void 0:ne.find(be=>(be==null?void 0:be.key)==="columnPath"))==null?void 0:K.contents)}))){let re=Z.value,ne={key:(z=(N=c==null?void 0:c.itemData)==null?void 0:N.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:z.contents,value:(C=(F=c==null?void 0:c.itemData)==null?void 0:F.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:C.contents};re!=null&&re.find(K=>(K==null?void 0:K.key)===(ne==null?void 0:ne.key))?re=re==null?void 0:re.map(K=>((K==null?void 0:K.key)===(ne==null?void 0:ne.key)&&(K.value=ne.value),K)):re.push(ne),oa.setTableViewContents(re)}await Rt(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>c==null?void 0:c.operatingForm,d=>{d!=null&&d.form&&(Li(d==null?void 0:d.form),U.value=d==null?void 0:d.dialogTitle,Va.value=!0,q.value=!0)},{immediate:!0,deep:!0});const mu=()=>{var d;(d=_.value)!=null&&d.includes("read")&&(Rl.value=!Rl.value)},yu=()=>{_r.value=!_r.value};e.watch(()=>{var d;return(d=c==null?void 0:c.config)==null?void 0:d.viewport},d=>{var h;_.value=d,(d==null?void 0:d.length)===0?Rl.value=!1:(d!=null&&d.includes("read")||(Rl.value=!0),d!=null&&d.includes("edit")||(Rl.value=!1)),V.value=((h=c==null?void 0:c.config)==null?void 0:h.showIndex)||Rl.value},{immediate:!0}),e.watch(()=>Rl.value,d=>{var h;d?(it("viewChange"),oa.setCacheUpdatingData(null)):(Oe.value=Za.value,R.value=Na.value,H.value&&(oa.setTableLoading(c==null?void 0:c.index),Te("change",H.value))),V.value=d||((h=c==null?void 0:c.config)==null?void 0:h.showIndex),Kl.value=[]},{immediate:!0}),e.watch(()=>{var d;return(d=fn.value)==null?void 0:d.length},d=>{d===0&&(ye.currentPage=1)}),e.watch(()=>c==null?void 0:c.compNames,d=>{i.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),e.ref(!1);const gu=(d,h)=>{var N;it("createClick"),h===ye.pageSize&&(ye.currentPage=Math.ceil(((N=Ne.value)==null?void 0:N.length)/ye.pageSize))},bu=async(d,h,N)=>{var F,C,re,ne,K;const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop);if(z&&to.includes(z)&&N!==void 0&&N!==null&&String(N).trim()!==""){const be=String(N).trim();if(await nt(be,d==null?void 0:d.id)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const He=(F=Ne.value)==null?void 0:F.findIndex(Ge=>(Ge==null?void 0:Ge.id)===(d==null?void 0:d.id)),$e=He!==-1?(re=(C=Ne.value)==null?void 0:C[He])==null?void 0:re[z]:void 0;z&&(d[z]=$e??"");return}}if(Rl.value){const be=d==null?void 0:d.id;be!=null&&(v.value.has(be)||v.value.set(be,A.cloneDeep(d)),s.value.add(be));const Ae=(ne=Ne.value)==null?void 0:ne.findIndex(He=>(He==null?void 0:He.id)===(d==null?void 0:d.id));Ae!==-1&&z&&(Ne.value[Ae]={...Ne.value[Ae],[z]:N}),so(N,d,h);return}so(N,d,h),cr.value=A.cloneDeep(d),Da.value=d==null?void 0:d.id,ra.value=(K=Ne.value)==null?void 0:K.length,U.value=d!=null&&d._isTemp?"新增":"编辑",Ri(!1)},ku=async()=>{var d,h;try{const N=[];if(c!=null&&c.related&&Array.isArray(c.related)&&(console.log("props.related",c.related),c.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const F=z.split("_")[1];F&&(N.push(`content_${F}`),N.push(`struct_${F}`))}})),N.length===0&&(c!=null&&c.itemData)){const z=(h=(d=c.itemData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:h.contents;z&&(N.push(`content_${z}`),N.push(`struct_${z}`))}return N}catch(N){return console.error("获取 tableNames 失败:",N),[]}},xu=async(d,h,N)=>{var C,re;if(!N||typeof N!="string"||N.trim()===""){const ne=(h==null?void 0:h.property)??(h==null?void 0:h.prop),K=`${d==null?void 0:d.id}:${ne}`;f.value.delete(K),k.value.set(K,!1);return}const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop),F=`${d==null?void 0:d.id}:${z}`;k.value.set(F,!0);try{const ne=await ku();if(ne.length===0){console.warn("未找到同名表,跳过全局搜索"),f.value.delete(F),k.value.set(F,!1);return}const K=parseInt((C=cl.value)==null?void 0:C.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),f.value.delete(F),k.value.set(F,!1);return}const be=await A.getAllTables({platId:K,tableNames:ne??[]}),Ae=((re=be==null?void 0:be.data)==null?void 0:re.result)||[],He=[],$e=[];for(let Ge=0;Ge<Ae.length;Ge+=2)Ge+1<Ae.length&&$e.push([Ae[Ge],Ae[Ge+1]]);$e.forEach(([Ge,wa])=>{var el;if(!Array.isArray(Ge)||Ge.length===0||!Array.isArray(wa)||wa.length===0)return;const Oa=wa[0];let za=((el=Oa==null?void 0:Oa.结构)==null?void 0:el.contents)??[];if(!Array.isArray(za)||za.length===0)return;let Ye=A.cloneDeep(za);if(Array.isArray(Ye==null?void 0:Ye[0])&&(Ye=he.getColumnChild(Ye[0])),!Array.isArray(Ye)||Ye.length===0||!Ye.some(ke=>(ke==null?void 0:ke.prop)===z))return;[...Ge].sort((ke,$a)=>{const va=Number((ke==null?void 0:ke.update_time)??0);return Number(($a==null?void 0:$a.update_time)??0)-va}).slice(0,20).forEach(ke=>{const $a=ke[z];if($a!=null){const va=String($a);va.toLowerCase().includes(N.toLowerCase())&&He.findIndex(_a=>{var T;return ke.id&&((T=_a.rowData)==null?void 0:T.id)===ke.id?!0:_a.label===va})===-1&&He.push({label:va,rowData:A.cloneDeep(ke),sourceTable:(Oa==null?void 0:Oa.source_table)||""})}})}),f.value.set(F,He)}catch(ne){console.error("全局搜索建议失败:",ne),f.value.delete(F)}finally{k.value.set(F,!1)}},wu=(d,h,N)=>{if(!Rl.value)return;const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop),F=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"";if(F&&F.toUpperCase()!=="INPUT"&&F!=="")return;const C=`${d==null?void 0:d.id}:${z}`;if(m.has(C)&&clearTimeout(m.get(C)),!N||N.trim()===""){f.value.delete(C),k.value.set(C,!1);return}const re=setTimeout(()=>{xu(d,{prop:z,property:z},N),m.delete(C)},300);m.set(C,re)};function _u(d,h){const N=`${d==null?void 0:d.id}:${(h==null?void 0:h.property)??(h==null?void 0:h.prop)}`;return f.value.get(N)||[]}const Su=(d,h,N)=>{var Ae;if(!N||!N.rowData)return;const z=N.rowData,F=d==null?void 0:d.id,C=(h==null?void 0:h.property)??(h==null?void 0:h.prop),ne=(he.getAllLeafNodes(R.value)||[]).filter(He=>(He==null?void 0:He.type)!=="operate"&&(He==null?void 0:He.label)!=="操作"&&(He==null?void 0:He.prop)!=="operate");ne.forEach(He=>{const $e=He==null?void 0:He.prop;$e&&z[$e]!==void 0&&(d[$e]=z[$e])});const K=(Ae=Ne.value)==null?void 0:Ae.findIndex(He=>(He==null?void 0:He.id)===F);K!==-1&&ne.forEach(He=>{const $e=He==null?void 0:He.prop;$e&&z[$e]!==void 0&&(Ne.value[K][$e]=z[$e])}),F!=null&&(v.value.has(F)||v.value.set(F,A.cloneDeep(d)),s.value.add(F));const be=`${F}:${C}`;f.value.delete(be),k.value.set(be,!1),so(d[C],d,h)},Ur=d=>{var K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa;const{row:h,column:N,item:z,slotData:F}=d;let C=h!=null&&h[N==null?void 0:N.prop]||(h==null?void 0:h[N==null?void 0:N.prop])===0?((be=(K=h==null?void 0:h[N==null?void 0:N.prop])==null?void 0:K[0])==null?void 0:be.contents)??((h==null?void 0:h[N==null?void 0:N.prop])===0?"0":h==null?void 0:h[N==null?void 0:N.prop]):((He=(Ae=h==null?void 0:h[z==null?void 0:z.prop])==null?void 0:Ae[0])==null?void 0:He.contents)??(h==null?void 0:h[z==null?void 0:z.prop])??((Ge=($e=F==null?void 0:F[z==null?void 0:z.prop])==null?void 0:$e[0])==null?void 0:Ge.contents)??(F==null?void 0:F[z==null?void 0:z.prop])??((za=(Oa=h==null?void 0:h[(wa=z==null?void 0:z.child)==null?void 0:wa.prop])==null?void 0:Oa[0])==null?void 0:za.contents)??(h==null?void 0:h[(Ye=z==null?void 0:z.child)==null?void 0:Ye.prop]),ne=Array.isArray(C)&&!(C!=null&&C.every(ba=>typeof ba=="string"||typeof ba=="number"))?"查看":C;if(ne=Array.isArray(ne)?ne.join(","):ne,(N==null?void 0:N.formType)==="Date")if(!ne||ne===""||ne===null||ne===void 0)ne="";else{const ba=A.dayjs(ne,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ne=ba.isValid()?ba.format("YYYYMMDD"):ne??""}return Array.isArray(N==null?void 0:N.relatedPages)&&((Qa=N==null?void 0:N.relatedPages)==null?void 0:Qa.length)>0&&(ne="详情页"),ne},Eu=d=>{var be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa;const{row:h,column:N,item:z,slotData:F}=d;let C=h!=null&&h[N==null?void 0:N.prop]?((Ae=(be=h==null?void 0:h[N==null?void 0:N.prop])==null?void 0:be[0])==null?void 0:Ae.contents)??(h==null?void 0:h[N==null?void 0:N.prop]):(($e=(He=h==null?void 0:h[z==null?void 0:z.prop])==null?void 0:He[0])==null?void 0:$e.contents)??(h==null?void 0:h[z==null?void 0:z.prop])??((wa=(Ge=F==null?void 0:F[z==null?void 0:z.prop])==null?void 0:Ge[0])==null?void 0:wa.contents)??(F==null?void 0:F[z==null?void 0:z.prop])??((Ye=(za=h==null?void 0:h[(Oa=z==null?void 0:z.child)==null?void 0:Oa.prop])==null?void 0:za[0])==null?void 0:Ye.contents)??(h==null?void 0:h[(Qa=z==null?void 0:z.child)==null?void 0:Qa.prop]);const ne=Array.isArray(C)&&!(C!=null&&C.every(ba=>typeof ba=="string"||typeof ba=="number")),K=Array.isArray(C)&&(C==null?void 0:C.find(ba=>ba==null?void 0:ba.url));return ne&&K},Cu=d=>{var F,C;if(!(d!=null&&d.column))return!1;const h=Ee.value==="试验任务/任务管理",N=(c==null?void 0:c.compName)==="任务列表",z=((F=d==null?void 0:d.column)==null?void 0:F.label)==="任务状态"||((C=d==null?void 0:d.column)==null?void 0:C.prop)==="任务状态";return h&&N&&z},Du=(d,h)=>d.find(N=>Object.values(N).some(z=>z===h));return e.watch(()=>Be.value,async d=>{if(d){oe.setContentLoading(!0),await e.nextTick();const h=Du(Ne.value,d==null?void 0:d.data);if(!h)return oe.setContentLoading(!1);await xn(d==null?void 0:d.data,null,h,{data:d==null?void 0:d.data}),oe.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>c==null?void 0:c.cacheNewData,d=>{var h;d&&(Array.isArray(d)?d.forEach(N=>{var z,F,C,re,ne;if(换,String(N==null?void 0:N.compId)===String(c==null?void 0:c.index)&&(N!=null&&N.resId)&&((z=N==null?void 0:N.data)!=null&&z.id)){const K=(F=N==null?void 0:N.data)==null?void 0:F.id,be=N==null?void 0:N.resId;if(Ne.value=(C=Ne.value)==null?void 0:C.map(Ae=>{if((Ae==null?void 0:Ae.id)===K){const He={...Ae,id:be};return delete He._isOCRRow,delete He._ocrTableId,He}return Ae}),(ne=(re=Aa.value)==null?void 0:re.has)!=null&&ne.call(re,K)){const He={...Aa.value.get(K)||{},id:be};delete He._isOCRRow,delete He._ocrTableId,Aa.value.delete(K),Aa.value.set(be,He)}rl(c==null?void 0:c.index,K,be)}}):String(d==null?void 0:d.compId)===String(c==null?void 0:c.index)&&(Ne.value=(h=Ne.value)==null?void 0:h.map(N=>{var z;if((N==null?void 0:N.id)===((z=d==null?void 0:d.data)==null?void 0:z.id)){const F={...N,id:d==null?void 0:d.resId};return delete F._isOCRRow,delete F._ocrTableId,F}return N})))},{immediate:!0,deep:!0}),(d,h)=>{var Ye,Qa,ba,el;const N=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-popover"),F=e.resolveComponent("el-switch"),C=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),ne=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-checkbox-group"),be=e.resolveComponent("el-button"),Ae=e.resolveComponent("el-icon"),He=e.resolveComponent("el-progress"),$e=e.resolveComponent("el-alert"),Ge=e.resolveComponent("el-table-column"),wa=e.resolveComponent("el-table"),Oa=e.resolveComponent("el-upload"),za=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",F0,[gn.value?(e.openBlock(),e.createBlock(ll.ssTable,{id:"excel-table",pageObj:ye,showIndex:V.value,isTree:(Ye=a.compItem)==null?void 0:Ye.isTree,summaryInfo:le,columns:R.value,defaultSort:ue,isCardViewport:_r.value,checkedColumns:r.value,key:rn.value+R.value,tableData:fn.value,isEditViewport:Rl.value,isShowPagination:pe.value,isShowEdit:!1,isShowDelete:!1,allowSelect:D.value,onDbClickRow:Qn,extraButton:Oe.value,rowButton:ha.value,cacheExtraButtons:Za.value,isClearSelection:((Qa=Kl.value)==null?void 0:Qa.length)===0,onDoCurrentChange:Bi,onDoSizeChange:Lo,onSortChange:$o,onContentClick:xn,onRowClick:Oi,onSelectChange:Uo,onCellChange:bu,onCellInput:wu,onSelectSuggest:Su,onChange:so,onPreview:ao,onSubmitEditingTable:Ji,onHandleColEditChange:Gi,onHandleColTypeChange:Hr,onClickButton:lt,onAddNewRow:Po,bottomButton:$.value},e.createSlots({headerButton:e.withCtx(ke=>{var $a,va,Ca,_a;return[a.showHeader?(e.openBlock(),e.createBlock(yf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(da)===e.unref(Ee),filterValues:Go.value,selectNums:($a=Kl.value)==null?void 0:$a.length,dataNums:(va=Ne.value)==null?void 0:va.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ke.buttons,menuFilter:(_a=(Ca=a.compItem)==null?void 0:Ca.component)==null?void 0:_a.menuFilter,onButtonClick:h[1]||(h[1]=(T,X,Re)=>lt(T,X,{extra:Re})),columns:R.value,onFilter:no,onGetImportData:Vo,level:a.level,filterShow:G.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ke,$a,va,Ca;return[((ke=Ne.value)==null?void 0:ke.length)>0&&a.allowOperate&&I.value?(e.openBlock(),e.createElementBlock("div",H0,[($a=_.value)!=null&&$a.includes("read")&&((va=_.value)!=null&&va.includes("edit"))&&((Ca=ha.value)!=null&&Ca.some(_a=>(_a==null?void 0:_a.label)==="编辑"))&&!_r.value&&e.unref(da)!==e.unref(Ee)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:mu},[e.createVNode(N,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ke,index:$a})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:va=>gu(ke,$a)},[e.createVNode(N,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,U0)]),operateCol:e.withCtx(()=>[e.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:uu,onBeforeEnter:du},{reference:e.withCtx(()=>[e.createElementVNode("span",q0,[e.createVNode(N,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",W0,[h[20]||(h[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(F,{"model-value":P.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:h[2]||(h[2]=ke=>Qi(ke))},null,8,["model-value"]),h[21]||(h[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":h[3]||(h[3]=ke=>r.value=ke),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:t},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nn.value,ke=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[e.createVNode(C,{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,K0)]),_:2},1032,["value"]),e.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(N,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var $a;return[e.createElementVNode("div",G0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(($a=Object.keys(ke))==null?void 0:$a.filter(va=>{var Ca;return(Ca=E.value)==null?void 0:Ca.find(_a=>(_a==null?void 0:_a.value)===va)}),va=>{var Ca,_a;return e.openBlock(),e.createElementBlock("div",{key:va},[j[va]=="radio"?(e.openBlock(),e.createElementBlock("div",Y0,[h[19]||(h[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(ne,{"model-value":ke==null?void 0:ke[va],onChange:T=>Gn(T,va,ke)},{default:e.withCtx(()=>{var T,X;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((X=(T=E.value)==null?void 0:T.find(Re=>(Re==null?void 0:Re.value)===va))==null?void 0:X.options,Re=>(e.openBlock(),e.createBlock(re,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),j[va]=="switch"?(e.openBlock(),e.createBlock(F,{key:1,"model-value":ke==null?void 0:ke[va],"active-text":(_a=(Ca=E.value)==null?void 0:Ca.find(T=>(T==null?void 0:T.value)===va))==null?void 0:_a.label,onChange:T=>Gn(T,va,ke)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",J0,[e.createVNode(N,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(ke=>{var $a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol;return[(($a=ke==null?void 0:ke.column)==null?void 0:$a.label)==="证书附件"||((va=ke==null?void 0:ke.column)==null?void 0:va.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",X0,[e.createVNode(N,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ka=>wn(ke),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Eu(ke)?(e.openBlock(),e.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",Z0,e.toDisplayString(Ur(ke)),1)]),default:e.withCtx(()=>{var Ka,tl;return[e.createElementVNode("div",Q0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((tl=ke==null?void 0:ke.row)==null?void 0:tl[(Ka=ke==null?void 0:ke.column)==null?void 0:Ka.prop],_l=>(e.openBlock(),e.createElementBlock("div",e3,[e.createElementVNode("div",{class:"prop-url",title:Jn(_l),onClick:Nl=>ui(_l)},e.toDisplayString(Jn(_l)),9,a3),e.createElementVNode("div",{class:"prop-download",onClick:Nl=>Wo(_l)}," 下载 ",8,l3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Cu(ke)?(e.openBlock(),e.createBlock(Vu,{key:0,value:Ur(ke)},null,8,["value"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(Ur(ke))&&((_a=(Ca=Ur(ke))==null?void 0:Ca.toString())!=null&&_a.includes(".txt")||(X=(T=Ur(ke))==null?void 0:T.toString())!=null&&X.includes(".cpt")||(na=(Re=Ur(ke))==null?void 0:Re.toString())!=null&&na.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ur(ke))&&((sa=(we=Ur(ke))==null?void 0:we.toString())!=null&&sa.includes(".txt")||(nl=(Ba=Ur(ke))==null?void 0:Ba.toString())!=null&&nl.includes(".cpt")||(ul=(Wa=Ur(ke))==null?void 0:Wa.toString())!=null&&ul.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ur(ke))&&((Vl=(dl=Ur(ke))==null?void 0:dl.toString())!=null&&Vl.includes(".txt")||(hl=(Ua=Ur(ke))==null?void 0:Ua.toString())!=null&&hl.includes(".cpt")||(ol=(Pa=Ur(ke))==null?void 0:Pa.toString())!=null&&ol.includes(".cyd"))?"pointer":"",marginLeft:(ke==null?void 0:ke.colIndex)===0?`${((ke==null?void 0:ke.level)??0)*20}px`:0}),onClick:Ka=>{var tl;return Wn(Ur(ke),((tl=ke==null?void 0:ke.column)==null?void 0:tl.relatedPages)??[])}},e.toDisplayString(Ur(ke)===0?"0":Ur(ke)),13,r3))],64))]}),_:2},[((ba=ha.value)==null?void 0:ba.length)>0?{name:"actions",fn:e.withCtx(({item:ke,fIndex:$a})=>[e.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(N,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",P0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ii(ha.value,ke),(va,Ca)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ca,onClick:e.withModifiers(_a=>lt(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,j0))),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"])):e.createCommentVNode("",!0),Rl.value?(e.openBlock(),e.createElementBlock("div",n3,[e.createVNode(be,{id:"themeBorderButton",onClick:Ho},{default:e.withCtx(()=>h[22]||(h[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(be,{class:"ok-button",id:"themeButton",onClick:Ai},{default:e.withCtx(()=>h[23]||(h[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(wr.ssDialog,{title:U.value,visible:q.value,width:sr.value,onBeforeDestroy:eo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",i3,[e.createVNode(ll.ssForm,{ref_key:"formRef",ref:ze,rowContents:Ha.value,showOperator:!1,onChange:pu,isEnableWrap:!1,onFixChangeValue:Ko,onClickTrigger:Yn,isEdit:Ze.value,onBlurChange:Xi,onCreate:si,onTagChange:An},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Va.value?(e.openBlock(),e.createElementBlock("div",o3,[e.createVNode(be,{onClick:h[4]||(h[4]=ke=>q.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>h[24]||(h[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(be,{class:"ok-button",onClick:h[5]||(h[5]=ke=>Ri(!0)),id:"themeButton"},{default:e.withCtx(()=>h[25]||(h[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(wr.ssDialog,{title:U.value,visible:la.value,width:fa.value,onBeforeDestroy:h[7]||(h[7]=ke=>la.value=!1)},{default:e.withCtx(()=>[e.createVNode(Bf)]),footer:e.withCtx(()=>[e.createElementVNode("div",t3,[e.createVNode(be,{onClick:h[6]||(h[6]=ke=>la.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>h[26]||(h[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(be,{class:"ok-button",onClick:Yo,id:"themeButton"},{default:e.withCtx(()=>h[27]||(h[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ae.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:2,fileDataList:ta.value,onDestroy:io},null,8,["fileDataList"])):e.createCommentVNode("",!0),Pe.value?(e.openBlock(),e.createBlock(wr.ssDialog,{key:3,visible:Pe.value,onBeforeDestroy:su,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(_o.ThreeViewerHost,{files:Sa.value,threeData:B.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(wr.ssDialog,{title:"OCR扫描录入",visible:sl.value,"close-on-click-modal":!1,onBeforeDestroy:ml,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[h[38]||(h[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",s3,[e.createElementVNode("div",c3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ia.value===1}])},h[28]||(h[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),h[31]||(h[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ia.value===2}])},h[29]||(h[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),h[32]||(h[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ia.value===3}])},h[30]||(h[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),ia.value===1?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(be,{onClick:at,class:"ocr-action-btn",disabled:ga.value,size:"default"},{default:e.withCtx(()=>h[33]||(h[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(be,{onClick:Sr,class:"ocr-action-btn",disabled:ga.value,size:"default"},{default:e.withCtx(()=>h[34]||(h[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),ia.value===1?(e.openBlock(),e.createElementBlock("div",d3,[e.createElementVNode("div",p3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xa.value,(ke,$a)=>{var va;return e.openBlock(),e.createElementBlock("div",{key:$a,class:"ocr-file-item"},[e.createElementVNode("div",f3,[ke.raw&&((va=ke.raw.type)!=null&&va.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Cl(ke),alt:"预览",class:"thumbnail-image"},null,8,h3)):(e.openBlock(),e.createElementBlock("div",v3,[e.createVNode(Ae,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:wl(ke)==="uploading",processing:wl(ke)==="processing",completed:wl(ke)==="completed"||wl(ke)==="uploaded",failed:wl(ke)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",m3,[h[35]||(h[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:wl(ke)==="completed"||wl(ke)==="uploaded",uploading:wl(ke)==="uploading",processing:wl(ke)==="processing",failed:wl(ke)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:wl(ke)==="failed"?"#f56c6c":wl(ke)==="completed"||wl(ke)==="uploaded"?"#67c23a":"#409eff","stroke-width":wl(ke)==="completed"||wl(ke)==="uploaded"||wl(ke)==="failed"?3:2,"stroke-dasharray":jl(ke),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,y3)])),wl(ke)==="completed"||wl(ke)==="uploaded"?(e.openBlock(),e.createElementBlock("div",g3,[e.createVNode(Ae,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1})])):e.createCommentVNode("",!0),wl(ke)==="failed"?(e.openBlock(),e.createElementBlock("div",b3,[e.createVNode(Ae,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ca=>nu($a)},[e.createVNode(Ae,null,{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})],8,k3)]),e.createElementVNode("div",x3,e.toDisplayString(ke.name||"文件名123"),1)])}),128))]),xa.value.length>0?(e.openBlock(),e.createElementBlock("div",w3,[e.createVNode(be,{onClick:De,class:"ocr-start-recognize-btn",disabled:ga.value||xa.value.length===0,size:"default"},{default:e.withCtx(()=>h[36]||(h[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),ia.value===1?(e.openBlock(),e.createElementBlock("div",_3,[e.createVNode(He,{percentage:ma.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),ia.value===2?(e.openBlock(),e.createElementBlock("div",S3,[e.createElementVNode("div",E3,[e.createVNode($e,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",C3,[e.createVNode(wa,{data:Je.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Ge,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe.value,ke=>(e.openBlock(),e.createBlock(Ge,{key:ke.prop,prop:ke.prop,"min-width":ke.minWidth||230,"class-name":ke.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",D3,[e.createElementVNode("span",null,e.toDisplayString(ke.label),1)])]),default:e.withCtx(({row:$a,$index:va})=>{var Ca,_a,T;return[ke.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:al($a[ke.prop]),fontWeight:500})},e.toDisplayString(Ga($a[ke.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[il.value!==va?(e.openBlock(),e.createElementBlock("span",N3,e.toDisplayString($a[ke.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pl(ke.prop)),{key:1,modelValue:$a[ke.prop],"onUpdate:modelValue":X=>$a[ke.prop]=X,size:"small",placeholder:"请输入"+ke.label,content:((Ca=Ke(ke.prop))==null?void 0:Ca.contents)??((_a=Ke(ke.prop))==null?void 0:_a.options)??[],optionUrl:(T=Ke(ke.prop))==null?void 0:T.optionUrl,onChange:X=>Xa(va,ke.prop,X),onFocus:X=>Ia.value=ke.prop,onBlur:h[8]||(h[8]=X=>Ia.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Ge,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ke})=>[il.value===ke?(e.openBlock(),e.createBlock(Ae,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers($a=>bl(ke),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(N,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers($a=>bl(ke),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),ia.value===3?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(Ae,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1}),h[37]||(h[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Oa,{ref:"ocrUploadRef","file-list":xa.value,"onUpdate:fileList":h[9]||(h[9]=ke=>xa.value=ke),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":ge,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[ia.value!==3?(e.openBlock(),e.createElementBlock("div",T3,[e.createVNode(be,{onClick:Gr,class:"ocr-start-recognize-btn",disabled:ia.value===1||ga.value},{default:e.withCtx(()=>h[39]||(h[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(be,{onClick:on,class:"ocr-start-recognize-btn",disabled:ga.value},{default:e.withCtx(()=>h[40]||(h[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Kf,{visible:pi.value,onConfirm:o,onCancel:h[10]||(h[10]=ke=>pi.value=!1)},null,8,["visible"]),e.createVNode(kd,{visible:Ra.value,"onUpdate:visible":h[11]||(h[11]=ke=>Ra.value=ke),versions:xe.value},null,8,["visible","versions"]),e.createVNode(od,{visible:Me.value,"onUpdate:visible":h[12]||(h[12]=ke=>Me.value=ke),images:Sl.value,"default-image-name":Il.value,"field-meta":il.value!==null?((el=Je.value[il.value])==null?void 0:el.__ocrFieldMeta)||{}:{},"focused-field-name":Ia.value,onClose:h[13]||(h[13]=ke=>Me.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Md,{visible:Ul.value,"onUpdate:visible":h[14]||(h[14]=ke=>Ul.value=ke),candidates:ql.value,"name-prop":Pl.value,"mfr-prop":ar.value,columns:R.value,onSubmit:Er,onPreviewFile:fi},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Fd,{visible:ya.value,"onUpdate:visible":h[15]||(h[15]=ke=>ya.value=ke),ocrPreviewData:Je.value,"onUpdate:ocrPreviewData":h[16]||(h[16]=ke=>Je.value=ke),ocrSelectedFields:Ea.value,"onUpdate:ocrSelectedFields":h[17]||(h[17]=ke=>Ea.value=ke),ocrPreviewColumns:Xe.value,onConfirm:Ta,onFieldChange:h[18]||(h[18]=({rowIndex:ke,prop:$a,value:va})=>Xa(ke,$a,va))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(wr.ssDialog,{title:i.title,visible:i.show,width:i.width,onBeforeDestroy:J},{default:e.withCtx(()=>[e.createElementVNode("div",A3,[e.createVNode(ll.ssForm,{rowContents:i==null?void 0:i.contents,formRules:i==null?void 0:i.formRules,showOperator:!1,buttonValue:i.buttonValue,isEdit:Ze.value,isStartJustify:!1,onOnButtonClick:Q},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(wr.ssDialog,{title:"",visible:u.show,width:u.width,alignCenter:!0,onBeforeDestroy:y},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",z3,e.toDisplayString(u.title),1),e.createVNode(za,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>h[41]||(h[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",M3,[e.createVNode(za,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Ln.value||"暂无"),1)]),_:1}),e.createElementVNode("div",I3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u==null?void 0:u.buttonValue,ke=>(e.openBlock(),e.createBlock(be,{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:$a=>O(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(gf,{columns:u==null?void 0:u.columns,tableData:u==null?void 0:u.tableData},{content:e.withCtx(({row:ke,item:$a,slotData:va,scope:Ca,column:_a,columnProp:T,$index:X})=>[e.createTextVNode(e.toDisplayString((ke==null?void 0:ke[_a==null?void 0:_a.prop])||(ke==null?void 0:ke[_a==null?void 0:_a.label])||(ke==null?void 0:ke[_a==null?void 0:_a.property])||(va==null?void 0:va[_a==null?void 0:_a.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Dc=Xl._export_sfc(L3,[["__scopeId","data-v-696abaac"]]),$3={key:1,class:"static-form-body"},R3=["onClick"],V3={key:1},F3=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}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,t=b=>{switch(b){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var I;const b=(I=r.itemData)==null?void 0:I.find(Y=>(Y==null?void 0:Y.key)==="formContent"),g=(b==null?void 0:b.contents)||[];return(r.fields&&r.fields.length>0?r.fields:g).filter(Y=>(Y==null?void 0:Y.label)||(Y==null?void 0:Y.isHideInForm)).map(Y=>{let le=Y==null?void 0:Y.value;Array.isArray(le)&&(le=le.map(se=>se==null?"":typeof se=="object"?se.label??se.value??se.name??JSON.stringify(se):String(se)).filter(Boolean).join(",")),le!=null&&typeof le=="object"&&(le=le.label??le.value??le.name??JSON.stringify(le));const ye=Y.isHideInForm?"":Y.label??"",Te=le==null||le===""?"-":String(le),R=ye==="使用状态";return{label:ye,value:Te,isStatus:R,tagType:R?t(Te):"",width:Y.width??1,field:Y}})}),v=e.ref(null),p=e.ref(null),f=b=>{if(Array.isArray(b)&&b.length>=3){const[g,P,I,Y]=b;return Y!==void 0?`rgba(${g}, ${P}, ${I}, ${Y})`:`rgb(${g}, ${P}, ${I})`}if(typeof b=="string"){const g=b.trim();if(g.startsWith("[")&&g.endsWith("]")){const P=g.slice(1,-1).split(",").map(I=>Number(I.trim()));if(P.length>=3&&P.every(I=>!Number.isNaN(I))){const[I,Y,le,ye]=P;return ye!==void 0?`rgba(${I}, ${Y}, ${le}, ${ye})`:`rgb(${I}, ${Y}, ${le})`}}return g}},m=e.computed(()=>{const b=Number(r==null?void 0:r.textSize),g=f(r==null?void 0:r.textColor),P={},I={},Y={},le={};return!Number.isNaN(b)&&b&&(P.fontSize=`${b}px`,I.fontSize=`${b+1}px`,Y.fontSize=`${b}px`,le.fontSize=`${b}px`),g&&(I.color=g,Y.color=g,le.color=g),{item:P,label:I,value:Y,empty:le}}),k=e.ref(""),c=e.ref(""),D=e.ref(!1),V=async b=>{if(b){c.value&&(URL.revokeObjectURL(c.value),c.value="");try{const g=await A.platformDownloadFile({url:b}),P=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});c.value=URL.createObjectURL(P)}catch{c.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,b=>{b&&(k.value=b)},{immediate:!0}),e.watch(k,b=>{V(b)},{immediate:!0});const _=()=>{var b;(b=p.value)==null||b.click()},G=async b=>{var I,Y,le;const g=b.target,P=(I=g==null?void 0:g.files)==null?void 0:I[0];if(!P){g.value="";return}D.value=!0;try{const ye=new FormData;ye.append("file",P);const Te=await A.platformUploadFile(ye),R=(le=(Y=Te==null?void 0:Te.data)==null?void 0:Y.result)==null?void 0:le.url;R?(k.value=R,n("update:backGroundImage",R),V(R),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{D.value=!1,g.value=""}},M=e.computed(()=>c.value?{backgroundImage:`url(${c.value})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),$=b=>ll.getComponent(b),j=b=>{if(!b)return;const g=b.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},E=(b,g,P)=>{r.disabled||(v.value=g,e.nextTick(()=>{j(P.currentTarget)}))},S=()=>{v.value=null},w=b=>{const g=b!=null&&b.width&&b.width>0?b.width:1,I=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${I}`,maxWidth:I,minWidth:"0",boxSizing:"border-box"}};return(b,g)=>{const P=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(M.value),onClick:g[2]||(g[2]=I=>(r==null?void 0:r.backGround)==="Yes"&&_())},[(r==null?void 0:r.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=e.withModifiers(I=>_(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:G},null,544),g[3]||(g[3]=e.createElementVNode("img",{src:ll._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",$3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(I,Y)=>{var le,ye,Te,R,se,ee,ue,Ce,Pe;return e.openBlock(),e.createElementBlock("div",{key:Y,class:"static-form-item",style:e.normalizeStyle({...w(I),...m.value.item}),onClick:g[1]||(g[1]=e.withModifiers(()=>{},["stop"]))},[I.label&&!((le=I==null?void 0:I.field)!=null&&le.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(m.value.label)},e.toDisplayString(I.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(m.value.value),onClick:ve=>{var B;return(B=I.field)!=null&&B.isNoClick?null:E(I,Y,ve)}},[v.value===Y&&I.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(((ye=I.field)==null?void 0:ye.type)??"Input")),{key:0,modelValue:I.field.value,"onUpdate:modelValue":ve=>I.field.value=ve,isEdit:!0,disabled:(Te=I.field)==null?void 0:Te.disabled,content:((R=I.field)==null?void 0:R.contents)??[],optionUrl:I.field,originalValue:(se=I.field)==null?void 0:se.value,config:(ee=I.field)==null?void 0:ee.config,configModel:((ue=I.field)==null?void 0:ue.prop)??((Ce=I.field)==null?void 0:Ce.name),selectedTagList:((Pe=I.field)==null?void 0:Pe.selectValue)??[],onBlur:S,onBlurChange:S},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[I.isStatus?(e.openBlock(),e.createBlock(P,{key:0,type:I.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",V3,e.toDisplayString(I.value??"-"),1))],64))],12,R3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(m.value.empty)}," 暂无数据 ",4))],4)}}}),Nc=Xl._export_sfc(F3,[["__scopeId","data-v-01ad92e2"]]),P3={class:"form-content"},j3={title:"选择标签"},H3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},U3={class:"col-operate-wrap"},q3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},W3={__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 r=()=>{v.value=!1,p.value=!1,f.value=[]},n=a;e.computed(()=>{var q;const pe=(q=Fe.value)==null?void 0:q.split("/");return(pe==null?void 0:pe.some(ze=>(ze==null?void 0:ze.includes("updateLoading"))||(ze==null?void 0:ze.includes("loading"))))?!1:Ce.value==="view"});const t=l,s=e.ref([]),v=e.ref(!1),p=e.ref(!1),f=e.ref([]),{getFileExtension:m}=_o.useThreeSystem(),k=e.ref(),c=e.ref(!1),D=e.ref(!1),V=A.useUnit(A.pinia),{chooseTitle:_}=A.storeToRefs(V),G=e.ref([]),M=e.ref(),$=e.ref(!1),j=e.ref([]),E=sc(A.pinia),S=Ct(A.pinia),w=e.ref(!1),b=e.ref(),g=e.ref(),P=e.ref(),I=e.ref(),Y=e.ref(),le=A.useLoginState(A.pinia),{loginUserInfo:ye}=A.storeToRefs(le),Te=e.ref(),R=e.ref(!0),se=A.useModelComp(A.pinia),{tableViewContents:ee,itemData:ue,isEdit:Ce,routeToChildPath:Pe,lockingPage:ve,homepageBackgroundTableId:B}=A.storeToRefs(se),ce=e.ref(null),W=e.ref(!1),Se=e.ref(!1),Le=A.useMenuState(),{activeMenuPath:Fe}=A.storeToRefs(Le),aa=he.useOriginalState(A.pinia),{originalPath:Na}=A.storeToRefs(aa),{compType:ae,hasEditable:ta}=Gs.useRole(),oe=()=>!ta(n.config,{type:ae.FORM});e.computed(()=>Fe.value==="设备管理/试验设备"&&n.compName==="设备概要");const ca=async()=>{var q,ze,_e;const pe=B==null?void 0:B.value,U=(q=ye==null?void 0:ye.value)==null?void 0:q.plat_id;if(!(!pe||!U))try{const la=await A.getAllTables({platId:parseInt(U),tableNames:[`content_${pe}`,`struct_${pe}`],user_unique_id:"0"}),fa=((_e=(ze=la==null?void 0:la.data)==null?void 0:ze.result)==null?void 0:_e[0])??[],ka=String((n==null?void 0:n.index)??""),ha=fa==null?void 0:fa.find(Va=>String(Va==null?void 0:Va.relatedForm_id)===ka);ha!=null&&ha.backgroundImg_url&&(I.value=ha.backgroundImg_url)}catch(la){console.error("获取首页背景图片表数据失败:",la)}},Ee=e.ref([]),ie=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Be=async pe=>{Se.value=pe,await me("disabled",null,pe,!0)},Ue=async pe=>{await me("operable",null,pe,!0)};e.watch(()=>Fe.value,async()=>{s.value=[],f.value=[]},{deep:!0,immediate:!0});const oa=()=>{e.nextTick(()=>{Z()})},Ja=pe=>{var U;s.value=(U=s.value)==null?void 0:U.map(q=>({...q,isFormColHidden:!(pe!=null&&pe.includes(q.label))}))};e.onUnmounted(()=>{ce.value=null});const L=pe=>{t("clickTrigger",pe)},H=async pe=>{var U,q,ze,_e,la,fa;if(pe===""){let ka="";(U=s.value)==null||U.forEach(Oe=>{Oe!=null&&Oe.isMain&&(ka=Oe==null?void 0:Oe.value)});let ha=await he.getItemData(Pe.value,sessionStorage.getItem("systemKey"),"");ka=((fa=(la=(_e=(ze=(q=ha==null?void 0:ha[0])==null?void 0:q.compData)==null?void 0:ze.find(Oe=>(Oe==null?void 0:Oe.key)==="mainRouters"))==null?void 0:_e.contents)==null?void 0:la[0])==null?void 0:fa.routerContent)+Na.value+ka;let Sa=await he.getItemData(ka,sessionStorage.getItem("systemKey"),"");$.value=!0,j.value=Sa==null?void 0:Sa.filter(Oe=>(Oe==null?void 0:Oe.comp)!=="methodButton"),t("routeUrl",j.value)}},Z=()=>{var U;const pe=(U=ce.value)==null?void 0:U.$el;pe&&Bl.Sortable.create(pe,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:q=>{const{oldIndex:ze,newIndex:_e}=q;if(ze===_e)return;const la=s.value.splice(ze,1)[0];s.value.splice(_e,0,la)}})},me=async(pe,U,q,ze=!1)=>{try{se.setRefreshCurStructure(!1)}catch{qa.ElMessage.error("编辑处理失败")}},fe=async(pe,U)=>{await me()},da=async(pe,U)=>{pe&&await me()},Qe=async(pe,U,q)=>{await me(U,q,pe,!1)},te=(pe,U)=>{Te.value===U?R.value=!1:R.value=!0,Te.value=U==null?void 0:U.changeProp},pa=async pe=>{var fa;I.value=pe;const U=n.itemData,q=U==null?void 0:U.find(ka=>(ka==null?void 0:ka.key)==="backGroundImage");q?q.contents=pe:U==null||U.push({key:"backGroundImage",contents:pe}),t("change",{key:"backGroundImage",contents:pe});const ze=B==null?void 0:B.value,_e=n==null?void 0:n.index,la=(fa=ye==null?void 0:ye.value)==null?void 0:fa.plat_id;if(!(!ze||!la||!_e||!pe))try{await A.pageBatchAddApi({platId:parseInt(la),changeContents:[{tableName:`content_${ze}`,tableContents:[{backgroundImg_url:pe,relatedForm_id:String(_e)}]}],user_unique_id:"0"})}catch(ka){console.error("保存背景图片记录失败:",ka),qa.ElMessage.error("背景图片记录保存失败")}},Ne=async pe=>{var q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl;let U=[];if((q=pe==null?void 0:pe.toString())!=null&&q.includes(".urdf")){if(pe.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:pe,extension:m(pe)}],p.value=!0,v.value=!0;return}if((ze=pe==null?void 0:pe.toString())!=null&&ze.includes(".stl")||(_e=pe==null?void 0:pe.toString())!=null&&_e.includes(".STL")||(la=pe==null?void 0:pe.toString())!=null&&la.includes(".obj")||(fa=pe==null?void 0:pe.toString())!=null&&fa.includes(".mtl")){const ja=((ka=pe==null?void 0:pe.toString())==null?void 0:ka.split(",")).map(zl=>({url:zl,extension:m(zl)}));f.value=ja,p.value=!1,v.value=!0;return}if((ha=pe==null?void 0:pe.toString())!=null&&ha.includes(".stl")||(Va=pe==null?void 0:pe.toString())!=null&&Va.includes(".STL")||(Sa=pe==null?void 0:pe.toString())!=null&&Sa.includes(".obj")||(Oe=pe==null?void 0:pe.toString())!=null&&Oe.includes(".mtl")){let Fl,ja=[],zl={};if(Array.isArray(pe)?Fl=pe:Fl=pe==null?void 0:pe.split(","),Fl==null||Fl.forEach($l=>{$l.includes(".mtl")?ja.push($l):zl.blob=zl.blob?zl.blob+","+$l:$l}),(ja==null?void 0:ja.length)>0&&(zl.mtlBlobs=ja),(Ha=(Za=Object.values(zl))==null?void 0:Za[0])!=null&&Ha.includes("http:"))U.push(zl);else{const $l=new Blob([zl.blob],{type:"application/octet-stream;charset=UTF-8"});let Ma=URL.createObjectURL($l),rl="";(xl=pe==null?void 0:pe.split("/"))==null||xl.forEach((sl,ga)=>{var xa;ga===((xa=pe==null?void 0:pe.split("/"))==null?void 0:xa.length)-1&&(rl=sl)}),(Yl=zl.blob)!=null&&Yl.includes(".stl")&&(rl=(rl==null?void 0:rl.replaceAll(">",""))+".urdf"),M.value=[{name:rl,blobUrl:Ma}],D.value=!0}}else{const Fl=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ja=await qa.axios.get(pe,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Fl.close()}),zl=new Blob([ja.data],{type:"application/octet-stream;charset=UTF-8"});let $l=URL.createObjectURL(zl),Ma="";(kl=pe==null?void 0:pe.split("/"))==null||kl.forEach((rl,sl)=>{var ga;sl===((ga=pe==null?void 0:pe.split("/"))==null?void 0:ga.length)-1&&(Ma=rl)}),M.value=[{name:Ma,blobUrl:$l}],D.value=!0}(U==null?void 0:U.length)>0&&S.setBlobUrls(U)},We=()=>{D.value=!1},Aa=pe=>{var la,fa,ka,ha;const U=(fa=(la=ll.safeClone(n.itemData))==null?void 0:la.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:fa.contents,q=ll.safeClone(pe.content);let ze={};q&&((ka=Object.values(q))==null?void 0:ka.length)>0&&((ha=Object.values(q))==null||ha.forEach((Va,Sa)=>{ze[U[Sa].key]=Va}));const _e={content:ze,index:n==null?void 0:n.index,buttonName:pe==null?void 0:pe.buttonName};t("change",_e)};e.computed(()=>"http://222.92.178.198:62001");const Da=async pe=>{var Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl,ga,xa,La,Ra;if(!pe)return;(Ha=(Za=n==null?void 0:n.itemData)==null?void 0:Za.find(xe=>(xe==null?void 0:xe.key)==="parentFormPath"))==null||Ha.contents;let U=ee.value;(U==null?void 0:U.length)>0&&(U=U==null?void 0:U.map(xe=>{var Ie,de,ma,ya;let ia=(Ie=xe==null?void 0:xe.key)==null?void 0:Ie.split("/");return(n==null?void 0:n.compName)===(ia==null?void 0:ia[0])&&(de=s.value)!=null&&de.find(Je=>(Je==null?void 0:Je.prop)===(ia==null?void 0:ia[1]))&&(xe.value=(ya=(ma=s.value)==null?void 0:ma.find(Je=>(Je==null?void 0:Je.prop)===(ia==null?void 0:ia[1])))==null?void 0:ya.value),xe}),se.setTableViewContents(U));const q=ll.safeClone(n.itemData);let ze=q==null?void 0:q.map(xe=>{var ia;return(xe==null?void 0:xe.key)==="formContent"&&((ia=xe.contents)==null||ia.map((Ie,de)=>{var ma,ya,Je,Xe,Ke,pl,Ve,Fa,Ea,il,Ia,Me,Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr;return Ie.type=(ya=(ma=s.value)==null?void 0:ma.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:ya.type,Ie.options=Ie!=null&&Ie.options?Ie.options:((Ke=(Xe=(Je=Ie==null?void 0:Ie.key)==null?void 0:Je.split("$"))==null?void 0:Xe[1])==null?void 0:Ke.length)>0?(Ea=(Fa=Lu((Ve=(pl=Ie==null?void 0:Ie.key)==null?void 0:pl.split("$"))==null?void 0:Ve[1]))==null?void 0:Fa.split(","))==null?void 0:Ea.map(Pl=>({label:Pl,value:Pl})):[],(il=Ie==null?void 0:Ie.key)!=null&&il.includes("$")&&(Ie.key=(Me=(Ia=Ie==null?void 0:Ie.key)==null?void 0:Ia.split("$"))==null?void 0:Me[0]),Ie.signature=(Il=(Sl=s.value)==null?void 0:Sl.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Il.signature,Ie.isLoginUser=(ql=(Ul=s.value)==null?void 0:Ul.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:ql.isLoginUser,Ie.value=(Ql=Object.values(pe))==null?void 0:Ql[de],Ie.isFormColHidden=(Ol=(dr=s.value)==null?void 0:dr.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Ol.isFormColHidden,Ie.isHideInForm=(Fr=(pr=s.value)==null?void 0:pr.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Fr.isHideInForm,Ie})),xe}),_e=s.value,la=(Yl=(xl=ll.safeClone(ze))==null?void 0:xl.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:Yl.contents;if(_e=_e==null?void 0:_e.map(xe=>{var ia,Ie;return(xe==null?void 0:xe.type)==="Select"&&((ia=xe==null?void 0:xe.allSelectionContents)==null?void 0:ia.length)>0&&(xe.contactValue=pe),xe.value=(Ie=la==null?void 0:la.find((de,ma)=>((de==null?void 0:de.id)??ma)===(xe==null?void 0:xe.id)))==null?void 0:Ie.value,xe}),!R.value){t("contentChange",{contents:ze,index:n.index});return}let fa="",ka=(ja=(Fl=(kl=ll.safeClone(ze))==null?void 0:kl.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:Fl.contents)==null?void 0:ja.find((xe,ia)=>{var Ie,de,ma;return(xe==null?void 0:xe.label)===Te.value||ia.toString()===((ma=(de=(Ie=Te.value)==null?void 0:Ie.split("t"))==null?void 0:de[1])==null?void 0:ma.toString())}),ha=(zl=ka==null?void 0:ka.optionUrl)==null?void 0:zl.menuSelect,Va=!0;if((rl=(Ma=($l=ll.safeClone(ze))==null?void 0:$l.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:Ma.contents)==null||rl.forEach(xe=>{var ia,Ie,de,ma,ya,Je;Va&&((de=(Ie=(ia=xe==null?void 0:xe.optionUrl)==null?void 0:ia.groupSelect)==null?void 0:Ie[1])!=null&&de.includes("["))&&(fa=(ya=(ma=xe==null?void 0:xe.optionUrl)==null?void 0:ma.groupSelect)==null?void 0:ya[1],JSON.stringify(ha)===JSON.stringify((Je=xe==null?void 0:xe.optionUrl)==null?void 0:Je.menuSelect)&&(Va=!1))}),(sl=ka==null?void 0:ka.optionUrl)!=null&&sl.menuSelect&&R.value){let xe=await yt(ka),ia,Ie=(ga=ka==null?void 0:ka.optionUrl)==null?void 0:ga.menuSelect;if(xe==null||xe.forEach(de=>{var ma,ya,Je,Xe,Ke,pl,Ve,Fa,Ea,il;fa===((ya=(ma=ka==null?void 0:ka.optionUrl)==null?void 0:ma.groupSelect)==null?void 0:ya[1])&&((Ke=(Xe=(Je=ka==null?void 0:ka.optionUrl)==null?void 0:Je.groupSelect)==null?void 0:Xe[1])!=null&&Ke.includes("["))&&((il=ll.safeClone(de))==null?void 0:il[(Ea=(Fa=(Ve=(pl=ka==null?void 0:ka.optionUrl)==null?void 0:pl.groupSelect)==null?void 0:Ve[1])==null?void 0:Fa.replaceAll("[",""))==null?void 0:Ea.replaceAll("]","")])===(ka==null?void 0:ka.value)&&(ia=de)}),ia){let de=ll.safeClone(_e);de=de==null?void 0:de.map(ya=>{var Je,Xe,Ke,pl,Ve,Fa,Ea,il,Ia,Me,Sl;return(ia!=null&&ia[ya==null?void 0:ya.label]||ia!=null&&ia[(pl=(Ke=(Xe=(Je=ya==null?void 0:ya.optionUrl)==null?void 0:Je.groupSelect)==null?void 0:Xe[1])==null?void 0:Ke.replaceAll("[",""))==null?void 0:pl.replaceAll("]","")])&&((Ea=(Fa=(Ve=ya==null?void 0:ya.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:Fa[1])!=null&&Ea.includes("["))&&Ie!=null&&Ie.every(Il=>{var Ul,ql;return(ql=(Ul=ya==null?void 0:ya.optionUrl)==null?void 0:Ul.menuSelect)==null?void 0:ql.includes(Il)})&&(ya.value=(ia==null?void 0:ia[ya==null?void 0:ya.label])||(ia==null?void 0:ia[(Sl=(Me=(Ia=(il=ya==null?void 0:ya.optionUrl)==null?void 0:il.groupSelect)==null?void 0:Ia[1])==null?void 0:Me.replaceAll("[",""))==null?void 0:Sl.replaceAll("]","")]),Array.isArray(ya.value)&&ya.value.every(Il=>(Il==null?void 0:Il.url)&&(Il==null?void 0:Il.name))&&(ya.type="Upload")),ya}),de=de==null?void 0:de.map(ya=>{var Je,Xe,Ke;return(Je=ya==null?void 0:ya.optionUrl)!=null&&Je.oldMenuSelect&&(ya.optionUrl.menuSelect=(Ke=(Xe=ll.safeClone(ya))==null?void 0:Xe.optionUrl)==null?void 0:Ke.oldMenuSelect),ya}),s.value=ll.safeClone(de);let ma=ll.safeClone(de);ma=ma==null?void 0:ma.map(ya=>{var Je,Xe,Ke,pl,Ve,Fa;return(Xe=(Je=ya==null?void 0:ya.optionUrl)==null?void 0:Je.menuSelect)!=null&&Xe.some(Ea=>Ea==null?void 0:Ea.includes("["))&&(ya.optionUrl.oldMenuSelect=(pl=(Ke=ll.safeClone(ya))==null?void 0:Ke.optionUrl)==null?void 0:pl.menuSelect,ya.optionUrl.menuSelect=(Fa=(Ve=ya==null?void 0:ya.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Fa.map(Ea=>{var il,Ia,Me,Sl;if(Ea!=null&&Ea.includes("[")){let Il=(Ia=(il=Ea==null?void 0:Ea.replaceAll("[","").replaceAll("]",""))==null?void 0:il.split(":"))==null?void 0:Ia[1];Ea=(Sl=(Me=ll.safeClone(de))==null?void 0:Me.find(Ul=>(Ul==null?void 0:Ul.label)===Il))==null?void 0:Sl.value}return Ea})),ya}),s.value=ma}else s.value=_e;ze=ze==null?void 0:ze.map(de=>{var ma;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(ma=de.contents)==null?void 0:ma.map(ya=>{var Je,Xe,Ke,pl;return ya.value=((Xe=(Je=s.value)==null?void 0:Je.find(Ve=>(Ve==null?void 0:Ve.label)===(ya==null?void 0:ya.key)))==null?void 0:Xe.value)??(ya==null?void 0:ya.value),ya.type=((pl=(Ke=s.value)==null?void 0:Ke.find(Ve=>(Ve==null?void 0:Ve.prop)===(ya==null?void 0:ya.key)))==null?void 0:pl.type)??(ya==null?void 0:ya.type),ya})),de})}R.value=!1,t("contentChange",{contents:ze,index:n.index});let Sa=[],Oe=[];if((La=ll.safeClone((xa=ze==null?void 0:ze.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:xa.contents))==null||La.forEach(xe=>{var ia;Array.isArray(xe==null?void 0:xe.value)&&((ia=xe==null?void 0:xe.value)!=null&&ia.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.url)==null?void 0:de.includes(".obj")}))&&(Oe=xe==null?void 0:xe.value)}),(Oe==null?void 0:Oe.length)>0){const xe=(Ra=ll.safeClone(Oe))==null?void 0:Ra.filter(ia=>{var Ie;return(Ie=ia==null?void 0:ia.url)==null?void 0:Ie.includes(".obj")});xe==null||xe.forEach(ia=>{var de,ma,ya,Je;const Ie=(de=Oe==null?void 0:Oe.filter(Xe=>{var Ke;return(Xe==null?void 0:Xe.name)===(ia==null?void 0:ia.name)&&((Ke=Xe==null?void 0:Xe.url)==null?void 0:Ke.includes(".mtl"))}))==null?void 0:de.map(Xe=>Xe==null?void 0:Xe.url);Sa.push({objUrl:ia==null?void 0:ia.url,mtlUrls:((ma=Oe==null?void 0:Oe.filter(Xe=>{var Ke;return(Xe==null?void 0:Xe.name)===(ia==null?void 0:ia.name)&&((Ke=Xe==null?void 0:Xe.url)==null?void 0:Ke.includes(".mtl"))}))==null?void 0:ma.length)===1?(Je=(ya=Oe==null?void 0:Oe.filter(Xe=>{var Ke;return(Xe==null?void 0:Xe.name)===(ia==null?void 0:ia.name)&&((Ke=Xe==null?void 0:Xe.url)==null?void 0:Ke.includes(".mtl"))}))==null?void 0:ya[0])==null?void 0:Je.url:Ie})}),S.setObjUrl(Sa)}},Ze=(pe,U,q)=>{let ze="";const _e=U==null?void 0:U.map(la=>{var fa;return(fa=la==null?void 0:la.value)==null?void 0:fa.pageData});return _e==null||_e.forEach(la=>{var fa;(la==null?void 0:la.name)===(pe==null?void 0:pe[0])&&((fa=la==null?void 0:la.compData)==null||fa.forEach(ka=>{var ha;(ka==null?void 0:ka.key)==="formContent"&&((ha=ka==null?void 0:ka.contents)==null||ha.forEach(Va=>{var Sa;(Va==null?void 0:Va.prop)===(pe==null?void 0:pe[1])&&(ze=(Va==null?void 0:Va.value)===""?he.judgeContents((Sa=ll.safeClone(Va))==null?void 0:Sa.optionUrl,q):Va==null?void 0:Va.value)}))}))}),ze},ra=(pe,U,q,ze)=>{var ka,ha;let _e="",la="";(ka=ll.safeClone(U))==null||ka.forEach((Va,Sa)=>{Va!=null&&Va.includes("[")?la=la+Na.value+pe[Sa]:la=la===""?la+Va:la+"/"+Va});let fa=(ha=ze[la])==null?void 0:ha.map(Va=>{var Sa;return(Sa=Va==null?void 0:Va.value)==null?void 0:Sa.pageData});return fa==null||fa.forEach(Va=>{var Sa;(Va==null?void 0:Va.name)===(q==null?void 0:q[0])&&((Sa=Va==null?void 0:Va.compData)==null||Sa.forEach(Oe=>{var Za;(Oe==null?void 0:Oe.key)==="formContent"&&((Za=Oe==null?void 0:Oe.contents)==null||Za.forEach(Ha=>{(Ha==null?void 0:Ha.prop)===(q==null?void 0:q[1])&&(_e=Ha==null?void 0:Ha.value)}))}))}),_e};return e.watch(()=>B==null?void 0:B.value,async()=>{await ca()},{immediate:!0}),e.watch(()=>n.itemData,async()=>{var Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl,ga,xa,La,Ra,xe,ia,Ie,de,ma,ya,Je;const pe=(Za=n.itemData)==null?void 0:Za.find(Xe=>(Xe==null?void 0:Xe.key)==="formContent"),U=(Ha=ll.safeClone(n.itemData))==null?void 0:Ha.find(Xe=>(Xe==null?void 0:Xe.key)==="formButton"),q=(xl=ll.safeClone(n.itemData))==null?void 0:xl.find(Xe=>(Xe==null?void 0:Xe.key)==="formFlex"),ze=(Yl=ll.safeClone(n.itemData))==null?void 0:Yl.find(Xe=>(Xe==null?void 0:Xe.key)==="formWrap"),_e=(kl=ll.safeClone(n.itemData))==null?void 0:kl.find(Xe=>(Xe==null?void 0:Xe.key)==="enableWrap"),la=(Fl=ll.safeClone(n.itemData))==null?void 0:Fl.find(Xe=>(Xe==null?void 0:Xe.key)==="textSize"),fa=(ja=ll.safeClone(n.itemData))==null?void 0:ja.find(Xe=>(Xe==null?void 0:Xe.key)==="textRGBA"),ka=(zl=ll.safeClone(n.itemData))==null?void 0:zl.find(Xe=>(Xe==null?void 0:Xe.key)==="backGround"),ha=($l=ll.safeClone(n.itemData))==null?void 0:$l.find(Xe=>(Xe==null?void 0:Xe.key)==="backGroundImage");(ze==null?void 0:ze.contents)==="纵向"?c.value=!1:c.value=!0;const Va=Number(la==null?void 0:la.contents);b.value=Number.isNaN(Va)?void 0:Va,g.value=fa==null?void 0:fa.contents,P.value=ka==null?void 0:ka.contents,I.value=ha==null?void 0:ha.contents;const Sa=_e==null?void 0:_e.contents;if(Sa===void 0?w.value=ri.BLOCK:typeof Sa=="boolean"?w.value=Sa?ri.ORDINARY:ri.BLOCK:w.value=Sa,Y.value=typeof(q==null?void 0:q.contents)!="boolean"?!(!(q!=null&&q.contents)===""||((Ma=q==null?void 0:q.contents)==null?void 0:Ma.toUpperCase())==="VERTICAL"):q==null?void 0:q.contents,((rl=pe==null?void 0:pe.contents)==null?void 0:rl.length)>0&&Array.isArray(pe==null?void 0:pe.contents)){let Xe=n.allMapContents;const Ke=(ga=(sl=ll.safeClone(pe))==null?void 0:sl.contents)==null?void 0:ga.map((Me,Sl)=>{var Ir,Er,Cr,mn,Nr,cr,yn,ln,rn,Sn,Nn,pn,lr;let Il=(Me==null?void 0:Me.label)??(Me==null?void 0:Me.key)??"";Me==null||Me.type;let Ul=(Me==null?void 0:Me.options)??[];if((Ir=Me==null?void 0:Me.key)!=null&&Ir.includes("$")&&(Il=(Er=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Er[0],((mn=(Cr=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Cr[1])==null?void 0:mn.length)>0)){const[Ml,zr]=(cr=(Nr=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Nr[1])==null?void 0:cr.split(/[()]/);(yn=he.FormType.find(cl=>(cl==null?void 0:cl.key)===Ml))==null||yn.value,((ln=zr==null?void 0:zr.split(","))==null?void 0:ln.length)>0&&(Ul=(rn=zr==null?void 0:zr.split(","))==null?void 0:rn.map(cl=>({label:cl,value:cl})))}let ql=Me==null?void 0:Me.options;((Sn=Me==null?void 0:Me.optionUrl)==null?void 0:Sn.selectRelateType)==="自定义绑定"&&(ql=(pn=(Nn=Me==null?void 0:Me.optionUrl)==null?void 0:Nn.defaultSelect)==null?void 0:pn.map(Ml=>({label:Ml,value:Ml})));let Ql=(Me==null?void 0:Me.menuPath)??[],dr=(Me==null?void 0:Me.groups)??[],Ol=(Me==null?void 0:Me.columns)??[],pr=!1,Fr=(Me==null?void 0:Me.isFormColHidden)??!1,Pl="",ar=Me!=null&&Me.value?Me.value:(ql==null?void 0:ql.length)>0?(lr=ql==null?void 0:ql[0])==null?void 0:lr.value:(Me==null?void 0:Me.value)??"",Pr=!1,Tr="Input";return((ql==null?void 0:ql.length)>0||(Ql==null?void 0:Ql.length)>0)&&(Tr="Select"),(Array.isArray(Pl)&&(Pl!=null&&Pl.every(Ml=>(Ml==null?void 0:Ml.name)&&(Ml==null?void 0:Ml.url)))||Array.isArray(ar)&&(ar!=null&&ar.every(Ml=>(Ml==null?void 0:Ml.name)&&(Ml==null?void 0:Ml.url))))&&(Tr="upload"),Me!=null&&Me.isMainUrl&&(Tr="Url"),{label:Il??"",name:Il??"t"+Sl,prop:Il??ll.safeClone(Me==null?void 0:Me.key),type:(Me==null?void 0:Me.type)??Tr,value:(Me==null?void 0:Me.type)==="Date"&&ar===""?new Date:ar,id:(Me==null?void 0:Me.id)??Sl,contents:(ql==null?void 0:ql.length)>0?ql:Ul??[],width:(Me==null?void 0:Me.width)??1,isLoginUser:pr,config:Me==null?void 0:Me.config,optionUrl:(Me==null?void 0:Me.optionUrl)??Me,isFormColHidden:Fr,isHideInForm:(Me==null?void 0:Me.isHideInForm)??!1,signature:Pr,isMain:Me==null?void 0:Me.isMain,required:(Me==null?void 0:Me.required)??!1,isMainUrl:Me==null?void 0:Me.isMainUrl,operable:(Me==null?void 0:Me.operable)??!1,disabled:(Me==null?void 0:Me.disabled)??!1,isSync:Me==null?void 0:Me.isSync,menus:Ql,groups:dr,words:Ol,allSelectionContents:Me==null?void 0:Me.allContents,filterContent:Me==null?void 0:Me.filterContents,isNoClick:(Me==null?void 0:Me.isNoClick)??!1}}),pl=Ke==null?void 0:Ke.map(Me=>Me==null?void 0:Me.value);let Ve="";pl==null||pl.forEach(Me=>{Me!==""&&Me!==void 0&&(Ve=Ve===""?Me:Ve+"/"+Me)}),E.setSelectArray(pl),E.setSelectString(Ve);let Fa=(xa=ll.safeClone(Ke))==null?void 0:xa.map(Me=>(Me!=null&&Me.value&&he.IsJson(Me==null?void 0:Me.value)&&Array.isArray(JSON.parse(Me==null?void 0:Me.value))&&(Me.value=JSON.parse(Me.value)),Me)),Ea={};Fa==null||Fa.forEach(Me=>{Ea[Me.label]=Me==null?void 0:Me.value}),Fa=Fa==null?void 0:Fa.map(Me=>{var Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr;if((Me==null?void 0:Me.type)==="Select"&&((Sl=Me==null?void 0:Me.allSelectionContents)==null?void 0:Sl.length)>0&&(Me.contactValue=Ea),(Ul=(Il=Me==null?void 0:Me.optionUrl)==null?void 0:Il.menuSelect)!=null&&Ul.some(Pl=>Pl==null?void 0:Pl.includes("["))){let Pl="";Me.optionUrl.oldMenuSelect=(Ql=(ql=ll.safeClone(Me))==null?void 0:ql.optionUrl)==null?void 0:Ql.menuSelect,Me.optionUrl.menuSelect=(Ol=(dr=Me==null?void 0:Me.optionUrl)==null?void 0:dr.menuSelect)==null?void 0:Ol.map(ar=>{var Pr,Tr,jr,Ir,Er,Cr;if(ar!=null&&ar.includes("[")){let mn=(Tr=(Pr=ar==null?void 0:ar.replaceAll("[","").replaceAll("]",""))==null?void 0:Pr.split(":"))==null?void 0:Tr[1];Pl=Ze((jr=ar==null?void 0:ar.replaceAll("[","").replaceAll("]",""))==null?void 0:jr.split(":"),Xe==null?void 0:Xe[Fe.value],Xe),ar=((Er=(Ir=ll.safeClone(Fa))==null?void 0:Ir.find(Nr=>(Nr==null?void 0:Nr.label)===mn))==null?void 0:Er.value)||Ze((Cr=ar==null?void 0:ar.replaceAll("[","").replaceAll("]",""))==null?void 0:Cr.split(":"),Xe==null?void 0:Xe[Fe.value],Xe)}return ar}),Pl!==""&&Me.value===""&&(Me.value=ra(Me.optionUrl.menuSelect,Me.optionUrl.oldMenuSelect,(pr=Me==null?void 0:Me.optionUrl)==null?void 0:pr.groupSelect,Xe),Array.isArray(Me.value)&&((Fr=Me.value)!=null&&Fr.every(ar=>ar==null?void 0:ar.url))&&(Me.type="UPLOAD"))}return Me}),s.value=Fa,Se.value=((La=s.value)==null?void 0:La.every(Me=>Me==null?void 0:Me.disabled))||ve.value===Fe.value,W.value=(Ra=s.value)==null?void 0:Ra.every(Me=>Me==null?void 0:Me.operable),Ee.value=(xe=s.value)==null?void 0:xe.map(Me=>Me==null?void 0:Me.label);let il=[],Ia=[];if((ia=ll.safeClone(s.value))==null||ia.forEach(Me=>{var Sl;Array.isArray(Me==null?void 0:Me.value)&&((Sl=Me==null?void 0:Me.value)!=null&&Sl.find(Il=>{var Ul;return(Ul=Il==null?void 0:Il.url)==null?void 0:Ul.includes(".obj")}))&&(Ia=Me==null?void 0:Me.value)}),(Ia==null?void 0:Ia.length)>0){const Me=(Ie=ll.safeClone(Ia))==null?void 0:Ie.filter(Sl=>{var Il;return(Il=Sl==null?void 0:Sl.url)==null?void 0:Il.includes(".obj")});Me==null||Me.forEach(Sl=>{var Ul,ql,Ql,dr;const Il=(Ul=Ia==null?void 0:Ia.filter(Ol=>{var pr;return(Ol==null?void 0:Ol.name)===(Sl==null?void 0:Sl.name)&&((pr=Ol==null?void 0:Ol.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Ul.map(Ol=>Ol==null?void 0:Ol.url);il.push({objUrl:Sl==null?void 0:Sl.url,mtlUrls:((ql=Ia==null?void 0:Ia.filter(Ol=>{var pr;return(Ol==null?void 0:Ol.name)===(Sl==null?void 0:Sl.name)&&((pr=Ol==null?void 0:Ol.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:ql.length)===1?(dr=(Ql=Ia==null?void 0:Ia.filter(Ol=>{var pr;return(Ol==null?void 0:Ol.name)===(Sl==null?void 0:Sl.name)&&((pr=Ol==null?void 0:Ol.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Ql[0])==null?void 0:dr.url:Il})}),S.setObjUrl(il)}(de=ll.safeClone(s.value))==null||de.forEach(Me=>{var Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr,Pl,ar,Pr,Tr;if((Il=(Sl=Me==null?void 0:Me.value)==null?void 0:Sl.toString())!=null&&Il.includes(".stl")||(ql=(Ul=Me==null?void 0:Me.value)==null?void 0:Ul.toString())!=null&&ql.includes(".STL")||(dr=(Ql=Me==null?void 0:Me.value)==null?void 0:Ql.toString())!=null&&dr.includes(".obj")||(pr=(Ol=Me==null?void 0:Me.value)==null?void 0:Ol.toString())!=null&&pr.includes(".mtl")||(Pl=(Fr=Me==null?void 0:Me.value)==null?void 0:Fr.toString())!=null&&Pl.includes(".urdf")){let jr={},Ir=[],Er;Array.isArray(Me==null?void 0:Me.value)?Er=Me==null?void 0:Me.value:Er=(ar=Me==null?void 0:Me.value)==null?void 0:ar.split(","),Er==null||Er.forEach(Cr=>{Cr.includes(".mtl")?Ir.push(Cr):jr.blob=jr.blob==="undefined"?Cr:jr.blob+","+Cr}),(Ir==null?void 0:Ir.length)>0&&(jr.mtlBlobs=Ir),(Tr=(Pr=Object.values(jr))==null?void 0:Pr[0])!=null&&Tr.includes("http:")}})}else s.value=[];let Oe=ee.value;if((Oe==null?void 0:Oe.length)>0&&(Oe=Oe==null?void 0:Oe.map(Xe=>{var pl,Ve,Fa,Ea;let Ke=(pl=Xe==null?void 0:Xe.key)==null?void 0:pl.split("/");return(n==null?void 0:n.compName)===(Ke==null?void 0:Ke[0])&&(Ve=s.value)!=null&&Ve.find(il=>(il==null?void 0:il.prop)===(Ke==null?void 0:Ke[1]))&&(Xe.value=(Ea=(Fa=s.value)==null?void 0:Fa.find(il=>(il==null?void 0:il.prop)===(Ke==null?void 0:Ke[1])))==null?void 0:Ea.value),Xe}),se.setTableViewContents(Oe)),n!=null&&n.formRules)k.value=n==null?void 0:n.formRules;else{let Xe={};(ma=ll.safeClone(s).value)==null||ma.forEach(Ke=>{((Ke==null?void 0:Ke.isMain)===!0||(Ke==null?void 0:Ke.required)===!0)&&(Xe[(Ke==null?void 0:Ke.prop)??(Ke==null?void 0:Ke.name)]=[{required:!0,message:`${(Ke==null?void 0:Ke.label)||(Ke==null?void 0:Ke.prop)||(Ke==null?void 0:Ke.name)}不能为空`}])}),k.value=Xe}if(((ya=U==null?void 0:U.contents)==null?void 0:ya.length)>0){const Xe=[];(Je=U==null?void 0:U.contents)==null||Je.forEach((Ke,pl)=>{(Ke==null?void 0:Ke.label)!==""&&Xe.push({label:(Ke==null?void 0:Ke.label)??"",id:(Ke==null?void 0:Ke.id)??pl,type:(Ke==null?void 0:Ke.type)??"",background:Ke==null?void 0:Ke.background})}),G.value=Xe}else G.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ve.value,pe=>{Se.value=pe===Fe.value},{immediate:!0}),(pe,U)=>{var ka;const q=e.resolveComponent("svg-icon"),ze=e.resolveComponent("el-switch"),_e=e.resolveComponent("el-checkbox"),la=e.resolveComponent("el-popover"),fa=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",P3,[w.value===e.unref(ri).TEXT?(e.openBlock(),e.createBlock(Nc,{key:0,itemData:a.itemData,compName:a.compName,fields:s.value,textSize:b.value,textColor:g.value,backGround:P.value,backGroundImage:I.value,disabled:Se.value||oe(),"onUpdate:backGroundImage":pa},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):w.value===e.unref(ri).BLOCK?(e.openBlock(),e.createBlock(Sf,{key:1,items:(ka=s.value)==null?void 0:ka.map(ha=>({label:ha!=null&&ha.isHideInForm?"":ha==null?void 0:ha.label,value:ha==null?void 0:ha.value,width:(ha==null?void 0:ha.width)??1,field:ha})),textSize:b.value,textColor:g.value,backGround:P.value,backGroundImage:I.value,disabled:Se.value||oe(),"onUpdate:backGroundImage":pa},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":w.value===e.unref(ri).ORDINARY})},[e.createVNode(ll.ssForm,{rowContents:s.value,formRules:k.value,buttonValue:G.value,isRowFlex:!1,isEnableWrap:!0,textSize:b.value,textColor:g.value,backGround:P.value,backGroundImage:I.value,onOnButtonClick:Aa,onChange:Da,formDisabled:Se.value||oe(),formLabelsOperable:W.value,isButtonRow:c.value,onPreview:Ne,onBlurChange:te,onHandleColEditChange:fe,onHandleColTypeChange:da,onRouteUrl:H,onClickTrigger:L,"onUpdate:backGroundImage":pa},{operateCol:e.withCtx(({renderColumns:ha,formDisabled:Va,formLabelsOperable:Sa})=>[e.createVNode(la,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:oa},{reference:e.withCtx(()=>[e.createElementVNode("span",j3,[e.createVNode(q,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",H3,[U[1]||(U[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ze,{"model-value":Va,"active-text":"禁用","inactive-text":"",onChange:Be,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ze,{"model-value":Sa,"active-text":"编辑所有标签","inactive-text":"",onChange:Ue},null,8,["model-value"]),U[2]||(U[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(fa,{modelValue:Ee.value,"onUpdate:modelValue":U[0]||(U[0]=Oe=>Ee.value=Oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ce,onChange:Ja},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ha,Oe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Oe.label},[e.createVNode(_e,{value:Oe.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Oe.label),1)]),_:2},1032,["value"]),e.createVNode(la,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(q,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Za;return[e.createElementVNode("div",U3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Za=Object.keys(Oe))==null?void 0:Za.filter(Ha=>{var xl;return(xl=ie.value)==null?void 0:xl.find(Yl=>(Yl==null?void 0:Yl.value)===Ha)}),Ha=>{var xl,Yl;return e.openBlock(),e.createElementBlock("div",{key:Ha},[e.createVNode(ll._sfc_main$1,{value:Oe==null?void 0:Oe[Ha],"active-text":(Yl=(xl=ie.value)==null?void 0:xl.find(kl=>(kl==null?void 0:kl.value)===Ha))==null?void 0:Yl.label,inactiveText:"",onChange:kl=>Qe(kl,Ha,Oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",q3,[e.createVNode(q,{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"])],2)),D.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:3,fileDataList:M.value,onDestroy:We},null,8,["fileDataList"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createBlock(wr.ssDialog,{key:4,visible:v.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(_o.ThreeViewerHost,{files:f.value,onGetAnimationData:pe.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},bs=Xl._export_sfc(W3,[["__scopeId","data-v-7bb009b3"]]),zo=e.ref(0),Bc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=A.cloneDeep(a))==null?void 0:l.map(n=>(zo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??zo.value,children:Bc(n==null?void 0:n.children)},n))},K3=a=>{var r;return(r=A.cloneDeep(a))==null?void 0:r.map(n=>(zo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??zo.value,children:Bc(n==null?void 0:n.children)},n))},Tc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===l)?(r=A.cloneDeep(a))==null?void 0:r.filter(t=>(t==null?void 0:t.id)!==l):(a=a==null?void 0:a.map(n=>(n.children=Tc(n==null?void 0:n.children,l),n)),a)},Ac=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=A.cloneDeep(a))==null?void 0:r.map(t=>((t==null?void 0:t.id)===(l==null?void 0:l.id)&&(t=l),t)):(a=a==null?void 0:a.map(n=>(n.children=Ac(n==null?void 0:n.children,l),n)),a)},zc=(a,l)=>{var r;return a!=null&&a.find(n=>{var t;return(n==null?void 0:n.id)===((t=l==null?void 0:l.contents)==null?void 0:t.id)})?(r=A.cloneDeep(a))==null?void 0:r.map(t=>{var s;return(t==null?void 0:t.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(t=l==null?void 0:l.contents),t}):(a=a==null?void 0:a.map(n=>(n.children=zc(n==null?void 0:n.children,l),n)),a)},Mc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=A.cloneDeep(a))==null?void 0:r.map(t=>((t==null?void 0:t.id)===(l==null?void 0:l.id)&&(t!=null&&t.children||(t.children=[]),t.children.push(l.contents)),t)):(a=a==null?void 0:a.map(n=>(n.children=Mc(n==null?void 0:n.children,l),n)),a)},ir=[{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"}],G3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Y3=[{label:"新增",value:"add"}],Mn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Y3},{key:"background",label:"按钮背景色",type:"Color"}],In=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:G3},{key:"textColor",label:"按钮颜色",type:"Color"}],J3={class:"table-header-child"},X3={class:"table-header-child-main"},Z3={class:"table-header-child-content"},Q3={class:"table-header-child-content-item"},eh={class:"fix-button"},ah={key:0},lh={class:"form-content"},rh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(!1),s=e.ref(""),v=he.useTableComp(A.pinia),{tableIndex:p}=A.storeToRefs(v);e.ref(0);const f=e.ref(""),m=e.ref([]),k=e.ref([]),c=E=>{var w;t.value=!0;let S=[];ir==null||ir.forEach(b=>{let g=A.cloneDeep(p.value)+1;v.setTableIndex(g),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:p.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),f.value=E==null?void 0:E.id,m.value=S,k.value=S},D=E=>{n("fixChange",A.cloneDeep(E))},V=E=>{n("deleteChange",A.cloneDeep(E))},_=E=>{t.value=!0;let S=[];ir==null||ir.forEach(w=>{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),S.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:p.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=S,k.value=S},G=E=>{let S=A.cloneDeep(k.value);S=S==null?void 0:S.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),k.value=S},M=()=>{var S,w;m.value=k.value;let E={};if(f.value!=="")E.id=f.value,(S=m.value)==null||S.forEach(b=>{const g=ir==null?void 0:ir.find(P=>(P==null?void 0:P.label)===(b==null?void 0:b.label));g?E[g.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),E.id="id"+p.value,(w=m.value)==null||w.forEach(g=>{const P=ir==null?void 0:ir.find(I=>(I==null?void 0:I.label)===(g==null?void 0:g.label));P?E[P.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}f.value="",m.value=[],k.value=[]},$=()=>{t.value=!1,f.value="",s.value="",m.value=[],k.value=[]},j=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",J3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(b,g)=>(e.openBlock(),e.createElementBlock("div",X3,[e.createElementVNode("div",Z3,[e.createElementVNode("div",Q3,e.toDisplayString(b.label),1),e.createElementVNode("div",eh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:P=>_(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:P=>c(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:P=>j(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(Ic,{tableChildContents:b==null?void 0:b.children,onDeleteChange:V,onFixChange:D},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",lh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:G},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:$,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:M},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},nh=Xl._export_sfc(rh,[["__scopeId","data-v-e0fef72d"]]),ih={class:"table-header-child"},oh={class:"table-header-child-main"},th={class:"table-header-child-content"},sh={class:"table-header-child-content-item"},ch={class:"fix-button"},uh={key:0},dh={class:"form-content"},ph={class:"dialog-footer"},fh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(!1),s=e.ref(""),v=he.useTableComp(A.pinia),{tableIndex:p}=A.storeToRefs(v),f=e.ref(""),m=e.ref([]),k=e.ref([]),c=E=>{n("fixChange",A.cloneDeep(E))},D=E=>{var w;t.value=!0;let S=[];ir==null||ir.forEach(b=>{let g=A.cloneDeep(p.value)+1;v.setTableIndex(g),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:p.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),f.value=E==null?void 0:E.id,m.value=S,k.value=S},V=E=>{t.value=!0;let S=[];ir==null||ir.forEach(w=>{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),S.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:p.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=S,k.value=S},_=E=>{let S=A.cloneDeep(k.value);S=S==null?void 0:S.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),k.value=S},G=()=>{var S,w;m.value=k.value;let E={};if(f.value!=="")E.id=f.value,(S=m.value)==null||S.forEach(b=>{const g=ir==null?void 0:ir.find(P=>(P==null?void 0:P.label)===(b==null?void 0:b.label));g?E[g.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),E.id="idChild"+p.value,(w=m.value)==null||w.forEach(g=>{const P=ir==null?void 0:ir.find(I=>(I==null?void 0:I.label)===(g==null?void 0:g.label));P?E[P.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}f.value="",m.value=[],k.value=[]},M=()=>{t.value=!1,f.value="",s.value="",m.value=[],k.value=[]},$=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},j=E=>{n("deleteChange",E)};return(E,S)=>{const w=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ih,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(g,P)=>(e.openBlock(),e.createElementBlock("div",oh,[e.createElementVNode("div",th,[e.createElementVNode("div",sh,e.toDisplayString(g.label),1),e.createElementVNode("div",ch,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>V(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>D(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>$(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",uh,[e.createVNode(nh,{tableChildContents:g==null?void 0:g.children,onDeleteChange:j,onFixChange:c},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:M,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",dh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ph,[e.createVNode(b,{onClick:M,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"ok-button button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ic=Xl._export_sfc(fh,[["__scopeId","data-v-ebd68fa1"]]),hh={class:"table-operate-content"},vh={class:"table-operate-item"},mh={class:"operate-title"},yh={class:"operate-content"},gh={class:"fix-content"},bh={class:"fix-content-label"},kh={class:"fix-button"},xh={key:0},wh={class:"operate-title"},_h={class:"operate-content"},Sh={class:"fix-content"},Eh={class:"fix-content-label"},Ch={class:"fix-button"},Dh={class:"operate-title"},Nh={class:"operate-content"},Bh={class:"fix-content"},Th={class:"fix-content-label"},Ah={class:"fix-button"},zh={class:"operate-title"},Mh={class:"operate-content"},Ih={class:"fix-content"},Oh={class:"fix-content-label"},Lh={class:"fix-button"},$h={class:"operate-content"},Rh={style:{display:"flex","justify-content":"space-between"}},Vh={class:"form-content"},Fh={class:"dialog-footer"},Ph={class:"form-content"},jh={class:"dialog-footer"},Hh={class:"form-content"},Uh={class:"dialog-footer"},qh={class:"form-content"},Wh={class:"dialog-footer"},Kh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]),s=e.ref(!1),v=e.ref(!1),p=e.ref([]),f=e.ref(!1),m=e.ref([]),k=e.ref(!1),c=e.ref([]),D=e.ref(""),V=e.ref(""),_=e.ref([]),G=e.ref([]),M=e.ref([]),$=e.ref([]),j=e.ref(!1),E=e.ref([]),S=e.ref([]),w=e.ref(0),b=e.ref([]),g=e.ref([]),P=e.ref([]),I=()=>{j.value=!0;let L=[];Mn==null||Mn.forEach(H=>{w.value++,L.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:H==null?void 0:H.options})}),E.value=L,S.value=L},Y=()=>{var H,Z,me;v.value=!0;let L=[];(me=(Z=(H=he.FormContent)==null?void 0:H.find(fe=>(fe==null?void 0:fe.key)==="Input"))==null?void 0:Z.value)==null||me.forEach(fe=>{w.value++,L.push({label:fe==null?void 0:fe.label,name:(fe==null?void 0:fe.name)||(fe==null?void 0:fe.label),type:fe.type,value:(fe==null?void 0:fe.label)==="类型"?"Input":"",id:w.value,contents:fe==null?void 0:fe.options})}),b.value=L,g.value=L},le=L=>{L||(b.value=g.value)},ye=async L=>{var H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da;if((L==null?void 0:L.类型)!==((Z=(H=g.value)==null?void 0:H.find(Ze=>(Ze==null?void 0:Ze.label)==="类型"))==null?void 0:Z.value)){let Ze=[],ra=await((da=(fe=(me=he.FormContent)==null?void 0:me.find(pe=>(pe==null?void 0:pe.key)===((L==null?void 0:L.类型)===""?"Input":L==null?void 0:L.类型)))==null?void 0:fe.value)==null?void 0:da.value)?await((We=(Ne=(pa=he.FormContent)==null?void 0:pa.find(pe=>(pe==null?void 0:pe.key)===((L==null?void 0:L.类型)===""?"Input":L==null?void 0:L.类型)))==null?void 0:Ne.value)==null?void 0:We.value):(te=(Qe=he.FormContent)==null?void 0:Qe.find(pe=>(pe==null?void 0:pe.key)===((L==null?void 0:L.类型)===""?"Input":L==null?void 0:L.类型)))==null?void 0:te.value;if(ra==null||ra.forEach(pe=>{w.value++,Ze.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.name)||(pe==null?void 0:pe.label),type:pe.type,value:pe!=null&&pe.属性名?(L==null?void 0:L.prop)||(L==null?void 0:L.name)||(L==null?void 0:L.label):(L==null?void 0:L[pe.label])??"",id:w.value,contents:pe==null?void 0:pe.options,prop:(pe==null?void 0:pe.prop)||(pe==null?void 0:pe.name)||(pe==null?void 0:pe.label)})}),L!=null&&L.菜单选项&&((Aa=L==null?void 0:L.菜单选项)==null?void 0:Aa.length)>0){const pe=await he.menuToContentType(L==null?void 0:L.菜单选项);Ze=Ze==null?void 0:Ze.map(U=>((U==null?void 0:U.name)==="组信息选项"&&(U.contents=pe),U))}g.value=await he.selectToBase(A.cloneDeep(Ze)),b.value=await he.selectToBase(A.cloneDeep(Ze))}else{let Ze=A.cloneDeep(b.value);if(Ze=Ze==null?void 0:Ze.map(ra=>(ra.value=L==null?void 0:L[ra.name],ra)),L!=null&&L.菜单选项&&((Da=L==null?void 0:L.菜单选项)==null?void 0:Da.length)>0){const ra=await he.menuToContentType(L==null?void 0:L.菜单选项);Ze=Ze==null?void 0:Ze.map(pe=>((pe==null?void 0:pe.name)==="组信息选项"&&(pe.contents=ra),pe))}Ze=he.formToOptionsContents(Ze),g.value=await he.selectToBase(A.cloneDeep(Ze))}},Te=async L=>{await ye(L),b.value=g.value},R=(L,H)=>{if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="selectRelateType"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.selectRelateType)||H[L.key]}if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="menuSelect"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.menuSelect)||H[L.key]}if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="groupSelect"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.groupSelect)||H[L.key]}if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="originalContent")return(H==null?void 0:H.value)||H[L.key];if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="multiple"){const Z=H[L.key];return Js(Z)?Z:L.default}return(L==null?void 0:L.label)==="类型"&&H[L.key]===""?"Input":(L==null?void 0:L.key)==="isFormColHidden"&&!H[L.key]?!1:H[L.key]},se=async L=>{var me,fe,da,Qe,te,pa,Ne,We,Aa;v.value=!0;let H=[];const Z=await((da=(fe=(me=he.FormContent)==null?void 0:me.find(Da=>(Da==null?void 0:Da.key)===((L==null?void 0:L.type)===""?"Input":L==null?void 0:L.type)))==null?void 0:fe.value)==null?void 0:da.value)?await((We=(Ne=(pa=he.FormContent)==null?void 0:pa.find(Da=>(Da==null?void 0:Da.key)===((L==null?void 0:L.type)===""?"Input":L==null?void 0:L.type)))==null?void 0:Ne.value)==null?void 0:We.value):(te=(Qe=he.FormContent)==null?void 0:Qe.find(Da=>(Da==null?void 0:Da.key)===((L==null?void 0:L.type)===""?"Input":L==null?void 0:L.type)))==null?void 0:te.value;if(Z==null||Z.forEach(Da=>{w.value++,H.push({label:Da==null?void 0:Da.label,name:(Da==null?void 0:Da.name)||(Da==null?void 0:Da.label),type:Da.type,value:(Da==null?void 0:Da.label)==="属性名"?(L==null?void 0:L.prop)||(L==null?void 0:L.name)||(L==null?void 0:L.label):R(Da,L),id:w.value,contents:Da==null?void 0:Da.options})}),L!=null&&L.menuSelect&&((Aa=L==null?void 0:L.menuSelect)==null?void 0:Aa.length)>0){const Da=await he.menuToContentType(L==null?void 0:L.menuSelect);H=H==null?void 0:H.map(Ze=>((Ze==null?void 0:Ze.name)==="组信息选项"&&(Ze.contents=Da),Ze))}D.value=L==null?void 0:L.id,b.value=await he.selectToBase(he.formToOptionsContents(H)),g.value=await he.selectToBase(he.formToOptionsContents(H))},ee=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;P.value=(H=A.cloneDeep(P.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="tableToForm"&&(me.contents=P.value),me))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ue=()=>{v.value=!1,b.value=[],D.value=""},Ce=async()=>{var me,fe,da,Qe,te,pa,Ne,We,Aa,Da;b.value=g.value;let L={};D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value);let H=await((da=(fe=(me=he.FormContent)==null?void 0:me.find(Ze=>{var ra,pe;return(Ze==null?void 0:Ze.key)===(((pe=(ra=b.value)==null?void 0:ra.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:fe.value)==null?void 0:da.value)??((te=(Qe=he.FormContent)==null?void 0:Qe.find(Ze=>{var ra,pe;return(Ze==null?void 0:Ze.key)===(((pe=(ra=b.value)==null?void 0:ra.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:te.value);if((pa=b.value)==null||pa.forEach(Ze=>{const ra=H==null?void 0:H.find(pe=>(pe==null?void 0:pe.label)===(Ze==null?void 0:Ze.label));ra&&(L[ra.key]=Ze.value)}),L.name=L.label,(Ne=P.value)!=null&&Ne.find(Ze=>Ze.id===L.id))P.value=(We=P.value)==null?void 0:We.map(Ze=>(Ze.id===L.id&&(Ze=L),Ze));else{let Ze=A.cloneDeep(P.value);P.value||(P.value=[]),Ze.push(L),P.value=Ze}P.value=P.value.map(({id:Ze,...ra})=>ra),v.value=!1,D.value="";let Z=A.cloneDeep(r.originalItemContents);(Aa=A.cloneDeep(r.originalItemContents))!=null&&Aa.find(Ze=>(Ze==null?void 0:Ze.key)==="tableToForm")?Z=(Da=A.cloneDeep(r.originalItemContents))==null?void 0:Da.map(Ze=>((Ze==null?void 0:Ze.key)==="tableToForm"&&(Ze.contents=P.value),Ze)):Z.push({key:"tableToForm",contents:P.value}),n("change",Z)},Pe=L=>{j.value=!0;let H=[];Mn==null||Mn.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:L[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),D.value=L==null?void 0:L.id,E.value=H,S.value=H};e.watch(()=>k.value,()=>{var H,Z;let L=A.cloneDeep(r.originalItemContents);(H=A.cloneDeep(r.originalItemContents))!=null&&H.find(me=>(me==null?void 0:me.key)==="page")?L=(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="page"&&(me.contents=k.value),me)):L.push({key:"page",contents:k.value}),n("change",L)},{deep:!0});const ve=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;G.value=(H=A.cloneDeep(G.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="extraButton"&&(me.contents=G.value),me))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var Z,me,fe,da,Qe;E.value=S.value;let L={};if(D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value),(Z=E.value)==null||Z.forEach(te=>{const pa=Mn==null?void 0:Mn.find(Ne=>(Ne==null?void 0:Ne.label)===(te==null?void 0:te.label));pa?L[pa.key]=te.value:te!=null&&te.children&&te.children.length>0&&(L.children=te.children)}),(me=G.value)!=null&&me.find(te=>te.id===L.id))G.value=(fe=G.value)==null?void 0:fe.map(te=>(te.id===L.id&&(te=L),te));else{let te=A.cloneDeep(G.value)??[];te.push(L),G.value=te}j.value=!1,D.value="";let H=A.cloneDeep(r.originalItemContents);(da=A.cloneDeep(r.originalItemContents))!=null&&da.find(te=>(te==null?void 0:te.key)==="extraButton")?H=(Qe=A.cloneDeep(r.originalItemContents))==null?void 0:Qe.map(te=>((te==null?void 0:te.key)==="extraButton"&&(te.contents=G.value),te)):H.push({key:"extraButton",contents:G.value}),n("change",H)},ce=L=>{let H=A.cloneDeep(S.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=L==null?void 0:L[Z.name]),Z)),S.value=H},W=()=>{j.value=!1,E.value=[],D.value=""},Se=L=>{f.value=!0;let H=[];In==null||In.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:L[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),D.value=L==null?void 0:L.id,M.value=H,$.value=H},Le=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;_.value=(H=A.cloneDeep(_.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="rowButton"&&(me.contents=_.value),me))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Fe=()=>{s.value=!0;let L=[];ir==null||ir.forEach(H=>{w.value++,L.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=L,c.value=L},aa=()=>{f.value=!0;let L=[];In==null||In.forEach(H=>{w.value++,L.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),M.value=L,$.value=L},Na=L=>{let H=A.cloneDeep($.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=L==null?void 0:L[Z.name]),Z)),$.value=H},ae=()=>{var Z,me,fe,da,Qe;M.value=$.value;let L={};if(D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value),(Z=M.value)==null||Z.forEach(te=>{const pa=In==null?void 0:In.find(Ne=>(Ne==null?void 0:Ne.label)===(te==null?void 0:te.label));pa?L[pa.key]=te.value:te!=null&&te.children&&te.children.length>0&&(L.children=te.children)}),(me=_.value)!=null&&me.find(te=>te.id===L.id))_.value=(fe=_.value)==null?void 0:fe.map(te=>(te.id===L.id&&(te=L),te));else{let te=A.cloneDeep(_.value);te.push(L),_.value=te}f.value=!1,D.value="";let H=A.cloneDeep(r.originalItemContents);(da=A.cloneDeep(r.originalItemContents))!=null&&da.find(te=>(te==null?void 0:te.key)==="rowButton")?H=(Qe=A.cloneDeep(r.originalItemContents))==null?void 0:Qe.map(te=>((te==null?void 0:te.key)==="rowButton"&&(te.contents=_.value),te)):H.push({key:"rowButton",contents:_.value}),n("change",H)},ta=()=>{f.value=!1,D.value="",$.value=[],M.value=[]},oe=L=>{s.value=!0;let H=[];ir==null||ir.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:"",id:w.value,contents:Z==null?void 0:Z.options})}),m.value=H,V.value=L==null?void 0:L.id,c.value=H},ca=L=>{var H;p.value=Tc(A.cloneDeep(p.value),L==null?void 0:L.id),n("change",(H=A.cloneDeep(r.originalItemContents))==null?void 0:H.map(Z=>{var me;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(me=p.value)!=null&&me.some(fe=>fe==null?void 0:fe.children)?[p.value]:p.value),Z}))},Ee=L=>{var Z,me,fe;L.type==="fix"?L.id!==""?p.value=zc(p.value,L):p.value=Ac(p.value,L==null?void 0:L.contents):p.value=Mc(p.value,L),p.value=(Z=p.value)!=null&&Z.some(da=>da==null?void 0:da.children)?[p.value]:p.value,D.value="";let H=A.cloneDeep(r.originalItemContents);(me=A.cloneDeep(r.originalItemContents))!=null&&me.find(da=>(da==null?void 0:da.key)==="header")?H=(fe=A.cloneDeep(r.originalItemContents))==null?void 0:fe.map(da=>((da==null?void 0:da.key)==="header"&&(da.contents=p.value),da)):H.push({key:"header",contents:p.value}),n("change",H)},ie=L=>{var Z;s.value=!0;let H=[];ir==null||ir.forEach(me=>{w.value++,H.push({label:me==null?void 0:me.label,name:me==null?void 0:me.label,type:me.type,value:L[me.key],id:w.value,contents:me==null?void 0:me.options})}),L!=null&&L.children&&((Z=L==null?void 0:L.children)==null?void 0:Z.length)>0&&H.push({children:L==null?void 0:L.children,isFormColHidden:!0}),D.value=L==null?void 0:L.id,V.value="",m.value=H,c.value=H},Be=L=>{let H=A.cloneDeep(c.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=L==null?void 0:L[Z.name]),Z)),c.value=H},Ue=()=>{s.value=!1,D.value="",V.value="",c.value=[]},oa=()=>{var Z,me,fe,da,Qe,te;m.value=c.value;let L={};if(D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value),(Z=m.value)==null||Z.forEach(pa=>{const Ne=ir==null?void 0:ir.find(We=>(We==null?void 0:We.label)===(pa==null?void 0:pa.label));Ne?L[Ne.key]=pa.value:pa!=null&&pa.children&&pa.children.length>0&&(L.children=pa.children)}),(me=p.value)!=null&&me.find(pa=>pa.id===L.id))p.value=(fe=p.value)==null?void 0:fe.map(pa=>(pa.id===L.id&&(pa=L),pa));else{let pa=A.cloneDeep(p.value)??[];V.value===""?pa.push(L):pa=pa==null?void 0:pa.map(Ne=>(Ne.id===V.value&&(Ne.children||(Ne.children=[]),Ne.children.push(L)),Ne)),p.value=pa}p.value=(da=p.value)!=null&&da.some(pa=>pa==null?void 0:pa.children)?[p.value]:p.value,s.value=!1,D.value="",V.value="";let H=A.cloneDeep(r.originalItemContents);(Qe=A.cloneDeep(r.originalItemContents))!=null&&Qe.find(pa=>(pa==null?void 0:pa.key)==="header")?H=(te=A.cloneDeep(r.originalItemContents))==null?void 0:te.map(pa=>((pa==null?void 0:pa.key)==="header"&&(pa.contents=p.value),pa)):H.push({key:"header",contents:p.value}),n("change",H)},Ja=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;p.value=(H=A.cloneDeep(p.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>{var fe;return(me==null?void 0:me.key)==="header"&&(me.contents=(fe=p.value)!=null&&fe.some(da=>da==null?void 0:da.children)?[p.value]:p.value),me})),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(t.value=A.cloneDeep(r.originalItemContents),p.value=(H=(L=t.value)==null?void 0:L.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:H.contents,_.value=(me=(Z=t.value)==null?void 0:Z.find(_e=>(_e==null?void 0:_e.key)==="rowButton"))==null?void 0:me.contents,G.value=(da=(fe=t.value)==null?void 0:fe.find(_e=>(_e==null?void 0:_e.key)==="extraButton"))==null?void 0:da.contents,k.value=(te=(Qe=t.value)==null?void 0:Qe.find(_e=>(_e==null?void 0:_e.key)==="page"))!=null&&te.contents?!!((Ne=(pa=t.value)==null?void 0:pa.find(_e=>(_e==null?void 0:_e.key)==="page"))!=null&&Ne.contents):!1,P.value=(Aa=(We=t.value)==null?void 0:We.find(_e=>(_e==null?void 0:_e.key)==="tableToForm"))==null?void 0:Aa.contents,p.value=(Da=p.value)==null?void 0:Da.map((_e,la)=>(Array.isArray(_e)?_e=K3(_e):_e={label:(_e==null?void 0:_e.label)??"",prop:(_e==null?void 0:_e.label)==="操作"?"operate":_e==null?void 0:_e.prop,width:_e!=null&&_e.width?parseInt(_e.width):"",fixed:(_e==null?void 0:_e.fixed)??void 0,sortable:(_e==null?void 0:_e.sortable)??!1,align:(_e==null?void 0:_e.align)??"left",showOverflowTooltip:(_e==null?void 0:_e.showOverflowTooltip)??!0,isNotDrag:(_e==null?void 0:_e.isNotDrag)??!1,isEditCol:(_e==null?void 0:_e.isEditCol)??!1,isOperate:(_e==null?void 0:_e.isOperate)??!1,id:(_e==null?void 0:_e.id)??la,formMenuSelect:(_e==null?void 0:_e.formMenuSelect)??void 0,groupSelect:(_e==null?void 0:_e.groupSelect)??void 0},_e)),p.value=(Ze=p.value)!=null&&Ze.every(_e=>Array.isArray(_e))?(ra=p.value)==null?void 0:ra[0]:p.value,_.value=(pe=_.value)==null?void 0:pe.map((_e,la)=>_e={label:(_e==null?void 0:_e.label)??"",type:(_e==null?void 0:_e.type)??"",textColor:(_e==null?void 0:_e.textColor)??"#000000",id:(_e==null?void 0:_e.id)??la}),G.value=(U=G.value)==null?void 0:U.map((_e,la)=>_e={label:(_e==null?void 0:_e.label)??"",type:(_e==null?void 0:_e.type)??"",background:(_e==null?void 0:_e.background)??"var(--ssComponent-primary-color)",id:(_e==null?void 0:_e.id)??la}),P.value)P.value=(ze=P.value)==null?void 0:ze.map(_e=>{w.value++;let la=_e;return la.id=w.value,la});else{let _e=[];const la=(q=he.getColumnChild(A.cloneDeep(p.value)))==null?void 0:q.filter(fa=>(fa==null?void 0:fa.prop)!=="operate");la==null||la.forEach(fa=>{var ka;w.value++,_e.push({label:fa==null?void 0:fa.label,name:(fa==null?void 0:fa.prop)||(fa==null?void 0:fa.label),type:fa!=null&&fa.groupSelect?"Select":"Input",value:"",id:w.value,contents:fa==null?void 0:fa.options,menuSelect:fa==null?void 0:fa.formMenuSelect,groupSelect:(ka=fa==null?void 0:fa.groupSelect)==null?void 0:ka.split(":"),selectRelateType:"关联绑定列"})}),P.value=_e}},{deep:!0,immediate:!0}),(L,H)=>{const Z=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",hh,[e.createElementVNode("div",vh,[e.createElementVNode("div",mh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(me,{class:"icon-content",onClick:Fe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",yh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",gh,[e.createElementVNode("div",bh,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",kh,[e.createVNode(Z,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>oe(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ie(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Ja(fe)},null,8,["onClick"])])]),fe!=null&&fe.children&&fe.children.length>0?(e.openBlock(),e.createElementBlock("div",xh,[e.createVNode(Ic,{tableChildContents:fe==null?void 0:fe.children,onDeleteChange:ca,onFixChange:Ee},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",wh,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:aa},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",_h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",Sh,[e.createElementVNode("div",Eh,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",Ch,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Se(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Le(fe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Dh,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:I},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",Bh,[e.createElementVNode("div",Th,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",Ah,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Pe(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ve(fe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",zh,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:Y},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",Ih,[e.createElementVNode("div",Oh,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",Lh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>se(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ee(fe)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",$h,[e.createElementVNode("div",Rh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(ll._sfc_main$1,{modelValue:k.value,"onUpdate:modelValue":H[0]||(H[0]=fe=>k.value=fe)},null,8,["modelValue"])])])]),e.createVNode(wr.ssDialog,{visible:s.value,onBeforeDestroy:Ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fh,[e.createVNode(me,{onClick:Ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(me,{class:"ok-button button",onClick:oa,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:f.value,onBeforeDestroy:ta,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ph,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:Na},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",jh,[e.createVNode(me,{onClick:ta,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(me,{class:"ok-button button",onClick:ae,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:j.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uh,[e.createVNode(me,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(me,{class:"ok-button button",onClick:B,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:v.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:ye,onChangeVisible:le,onBlurChange:Te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(me,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(me,{class:"ok-button button",onClick:Ce,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Gh=Xl._export_sfc(Kh,[["__scopeId","data-v-7a6b87b5"]]),Yh=A.useModelComp(A.pinia),{pageMapState:Jh}=A.storeToRefs(Yh),Xh=A.useMenuState(A.pinia),{activeMenuPath:Zh}=A.storeToRefs(Xh),Qh=e.ref(24),e2=e.ref(6),a2=e.ref(10),l2=e.ref(70),r2=e.ref(.18),n2=e.ref(45),i2=(a,l,r,n)=>{var t,s,v,p,f,m,k,c,D,V,_,G,M,$,j,E;return{x:((s=(t=a==null?void 0:a.value)==null?void 0:t.tableData)==null?void 0:s.x)||l%2*12,y:((p=(v=a==null?void 0:a.value)==null?void 0:v.tableData)==null?void 0:p.y)||l,w:((m=(f=a==null?void 0:a.value)==null?void 0:f.tableData)==null?void 0:m.w)||Qh.value,h:((c=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:c.h)||r,minW:((V=(D=a==null?void 0:a.value)==null?void 0:D.tableData)==null?void 0:V.minW)||e2.value,minH:((G=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:G.minH)||r2.value,maxH:(($=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:$.maxH)||n2.value,i:((E=(j=a==null?void 0:a.value)==null?void 0:j.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},o2=(a,l)=>{var n,t,s,v,p,f,m,k;let r=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){if(((v=(s=(t=a==null?void 0:a.compData)==null?void 0:t.find(D=>(D==null?void 0:D.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:v.length)===0)return 2}else((p=a==null?void 0:a.comp)==null?void 0:p.toUpperCase())==="FORM"&&(r=((k=(m=(f=a==null?void 0:a.compData)==null?void 0:f.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:m.contents)==null?void 0:k.length)/5);return r*2},Oc=(a,l,r)=>{var v,p;const n=(p=(v=Jh.value)==null?void 0:v[Zh.value])==null?void 0:p.filter(f=>{var m;return((m=f==null?void 0:f.key)==null?void 0:m.type)==="gridLayout"}),t=n==null?void 0:n.find(f=>{var m,k,c;return((c=(k=(m=f==null?void 0:f.value)==null?void 0:m.tableData)==null?void 0:k.component)==null?void 0:c.id)===a.id}),s=o2(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((f,m)=>Oc(f,m))),{...i2(t,l,s,a)}},t2=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=A.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,t)=>Oc(n,t)):[]},s2=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}]}]}}),c2=(a,l)=>a==null?void 0:a.map(r=>{for(const n in l)if(n===(r==null?void 0:r.prop))return{...r,value:l[n]};return r}),u2=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]);e.watch(()=>r.compType,p=>{var k;const f=s2(r==null?void 0:r.optionItems),m=p?(k=f[p==null?void 0:p.toUpperCase()])==null?void 0:k[r==null?void 0:r.target]:[];t.value=m==null?void 0:m.map(c=>{for(const[D,V]of Object.entries((r==null?void 0:r.comp)||{}))if((c==null?void 0:c.prop)===D)return{...c,value:V};return c})},{immediate:!0});const s=p=>ll.getComponent(p),v=p=>{var f,m;(p==null?void 0:p.prop)==="layout"&&(p==null?void 0:p.value)==="horizontal"?t.value=(f=t.value)==null?void 0:f.map(k=>{var c;return(k==null?void 0:k.prop)==="isStepLayout"?{...k,options:(c=k==null?void 0:k.options)==null?void 0:c.map(D=>({...D,disabled:!0}))}:(k==null?void 0:k.prop)==="isGridLayout"?{...k,disabled:!0}:k}):t.value=(m=t.value)==null?void 0:m.map(k=>{var c;return(k==null?void 0:k.prop)==="isStepLayout"?{...k,options:(c=k==null?void 0:k.options)==null?void 0:c.map(D=>({...D,disabled:!1}))}:(k==null?void 0:k.prop)==="isGridLayout"?{...k,disabled:!1}:k}),n("change",{target:r==null?void 0:r.target,styleConfigs:t.value,prop:p==null?void 0:p.prop})};return(p,f)=>{const m=e.resolveComponent("el-col"),k=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,c=>(e.openBlock(),e.createBlock(k,{class:"style-row",key:c==null?void 0:c.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c==null?void 0:c.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(c.type)),{modelValue:c.value,"onUpdate:modelValue":D=>c.value=D,content:c==null?void 0:c.options,optionUrl:c==null?void 0:c.optionUrl,disabled:c==null?void 0:c.disabled,activeText:c==null?void 0:c.activeText,inactiveText:c==null?void 0:c.inactiveText,onChange:D=>v(c)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),d2=Xl._export_sfc(u2,[["__scopeId","data-v-6c233914"]]),p2=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const r=a,n=l,t=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),v=$=>$==null?void 0:$.reduce((j,E)=>(j[E==null?void 0:E.prop]=E==null?void 0:E.rule,j),{}),p=e.computed(()=>({formRules:v(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),m=e.ref(""),k=($,j,E)=>{var b;let S=[];(r==null?void 0:r.activeTabName)==="任务配置"?(S=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:$},{label:"按钮名称",value:"按钮名称",children:j}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"任务名称",rule:t},{prop:"任务关键词",rule:t},{prop:"执行任务",rule:t},{prop:"执行动作",rule:t},{prop:"执行交互",rule:t}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(S=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(b=r==null?void 0:r.relatedData)==null?void 0:b.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:t},{prop:"关联状态",rule:t},{prop:"关联形式",rule:t},{prop:"关联任务集合",rule:t}]);let w;return E&&(E==null?void 0:E.length)>0?w=[...S,...c($,j,E)]:w=S,w},c=($,j,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(w=>E==null?void 0:E.includes(w==null?void 0:w.prop)):S},D=($,j)=>{var g,P,I,Y,le,ye,Te,R,se;const E=((le=(Y=(I=(P=(g=r==null?void 0:r.comp)==null?void 0:g.compData)==null?void 0:P.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:I.contents)==null?void 0:Y.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:le.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],S=/button/i,w=((se=(R=(Te=(ye=r==null?void 0:r.comp)==null?void 0:ye.compData)==null?void 0:Te.filter(ee=>S.test(ee==null?void 0:ee.key)))==null?void 0:R.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:se.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],b=k(E,w,$);f.value=j?c2(b,j):b,$&&($==null?void 0:$.length)>0&&s.value.push(...$==null?void 0:$.map(ee=>({prop:ee,rule:t})))};e.onMounted(()=>{D(null,r==null?void 0:r.extendItem)});const V=$=>{const j=$==null?void 0:$[m.value];if(m.value==="执行任务"){if(!(j!=null&&j.join("/")))return;const E=j==null?void 0:j.join("/");D(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,$)}},_=$=>{n("change",{target:r==null?void 0:r.target,extendConfigs:$})},G=($,j)=>{m.value=j==null?void 0:j.changeProp,V($)},M=$=>{n("onButtonClick",$)};return($,j)=>(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:p.value.formRules,buttonValue:p.value.buttonValue,onChange:_,onBlurChange:G,onOnButtonClick:M},null,8,["rowContents","formRules","buttonValue"]))}}),f2=Xl._export_sfc(p2,[["__scopeId","data-v-7c660c1f"]]),h2={};function v2(a,l){return null}const m2=Xl._export_sfc(h2,[["render",v2]]),y2={class:"form-operate-content"},g2={class:"form-operate-item"},b2={class:"operate-title"},k2={class:"operate-content"},x2={class:"fix-content"},w2={class:"fix-button"},_2={class:"operate-title"},S2={class:"operate-content"},E2={class:"fix-content"},C2={class:"fix-button"},D2={style:{display:"flex","justify-content":"space-between"}},N2={class:"form-content"},B2={class:"dialog-footer"},T2={class:"form-content"},A2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(!1),s=e.ref([]),v=e.ref([]),p=e.ref(!1),f=e.ref([]),m=e.ref([]),k=e.ref(""),c=e.ref(!1),D=e.ref(0),V=e.ref([]),_=e.ref([]),G=(R,se)=>{if((se==null?void 0:se.type)=="Select"&&(R==null?void 0:R.key)==="selectRelateType"){const ee=se==null?void 0:se.optionUrl;return(ee==null?void 0:ee.selectRelateType)||se[R.key]}if((se==null?void 0:se.type)=="Select"&&(R==null?void 0:R.key)==="menuSelect"){const ee=se==null?void 0:se.optionUrl;return(ee==null?void 0:ee.menuSelect)||se[R.key]}if((se==null?void 0:se.type)=="Select"&&(R==null?void 0:R.key)==="groupSelect"){const ee=se==null?void 0:se.optionUrl;return(ee==null?void 0:ee.groupSelect)||se[R.key]}if((se==null?void 0:se.type)=="Select"&&(R==null?void 0:R.key)==="originalContent")return(se==null?void 0:se.value)||se[R.key];if((se==null?void 0:se.type)=="Select"&&(R==null?void 0:R.key)==="multiple"){const ee=se[R.key];return Js(ee)?ee:R.default}return(R==null?void 0:R.label)==="类型"&&se[R.key]===""?"Input":(R==null?void 0:R.key)==="isFormColHidden"&&!se[R.key]?!1:se[R.key]},M=async R=>{var ue,Ce,Pe,ve,B,ce;t.value=!0;let se=[];const ee=await((Pe=(Ce=(ue=he.FormContent)==null?void 0:ue.find(W=>(W==null?void 0:W.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:Ce.value)==null?void 0:Pe.value)??((B=(ve=he.FormContent)==null?void 0:ve.find(W=>(W==null?void 0:W.key)===((R==null?void 0:R.type)===""?"Input":R==null?void 0:R.type)))==null?void 0:B.value);if(ee==null||ee.forEach(W=>{D.value++,se.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,prop:W==null?void 0:W.prop,value:G(W,R),id:D.value,contents:W==null?void 0:W.options,width:(R==null?void 0:R.width)??1})}),R!=null&&R.menuSelect&&((ce=R==null?void 0:R.menuSelect)==null?void 0:ce.length)>0){const W=await he.menuToContentType(R==null?void 0:R.menuSelect);se=se==null?void 0:se.map(Se=>((Se==null?void 0:Se.name)==="组信息选项"&&(Se.contents=W),Se))}k.value=R==null?void 0:R.id,s.value=await he.selectToBase(he.formToOptionsContents(se)),v.value=await he.selectToBase(he.formToOptionsContents(se))},$=R=>{var ee;p.value=!0;let se=[];(ee=he.FormButton)==null||ee.forEach(ue=>{D.value++,se.push({label:ue==null?void 0:ue.label,name:ue==null?void 0:ue.label,type:ue.type,value:(ue==null?void 0:ue.label)==="类型"&&R[ue.key]===""?"normal":R[ue.key],id:D.value,contents:ue==null?void 0:ue.options})}),V.value=se,_.value=se,k.value=R==null?void 0:R.id};e.watch(()=>c.value,()=>{var se,ee;let R=A.cloneDeep(r.originalItemContents);(se=A.cloneDeep(r.originalItemContents))!=null&&se.find(ue=>(ue==null?void 0:ue.key)==="enableWrap")?R=(ee=A.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ue=>((ue==null?void 0:ue.key)==="enableWrap"&&(ue.contents=!c.value),ue)):R.push({key:"enableWrap",contents:!c.value}),n("change",R)},{deep:!0});const j=()=>{var ee,ue,Ce,Pe,ve;V.value=_.value;let R={};if(k.value!==""?R.id=k.value:(D.value++,R.id="id"+D.value),(ee=V.value)==null||ee.forEach(B=>{var W;const ce=(W=he.FormButton)==null?void 0:W.find(Se=>(Se==null?void 0:Se.label)===(B==null?void 0:B.label));ce&&(R[ce.key]=B.value)}),(ue=f.value)!=null&&ue.find(B=>B.id===R.id))f.value=(Ce=f.value)==null?void 0:Ce.map(B=>(B.id===R.id&&(B=R),B));else{let B=A.cloneDeep(f.value);f.value||(f.value=[]),B.push(R),f.value=B}p.value=!1,k.value="";let se=A.cloneDeep(r.originalItemContents);(Pe=A.cloneDeep(r.originalItemContents))!=null&&Pe.find(B=>(B==null?void 0:B.key)==="formButton")?se=(ve=A.cloneDeep(r.originalItemContents))==null?void 0:ve.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=f.value),B)):se.push({key:"formButton",contents:f.value}),n("change",se)},E=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,ee;m.value=(se=A.cloneDeep(m.value))==null?void 0:se.filter(ue=>(ue==null?void 0:ue.id)!==(R==null?void 0:R.id)),n("change",(ee=A.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ue=>((ue==null?void 0:ue.key)==="formContent"&&(ue.contents=m.value),ue))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=R=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,ee;f.value=(se=A.cloneDeep(f.value))==null?void 0:se.filter(ue=>(ue==null?void 0:ue.id)!==(R==null?void 0:R.id)),n("change",(ee=A.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ue=>((ue==null?void 0:ue.key)==="formButton"&&(ue.contents=f.value),ue))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var se;p.value=!0;let R=[];(se=he.FormButton)==null||se.forEach(ee=>{D.value++,R.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)==="类型"?"normal":"",id:D.value,contents:ee==null?void 0:ee.options})}),V.value=R,_.value=R},b=()=>{var se,ee,ue;t.value=!0;let R=[];(ue=(ee=(se=he.FormContent)==null?void 0:se.find(Ce=>(Ce==null?void 0:Ce.key)==="Input"))==null?void 0:ee.value)==null||ue.forEach(Ce=>{D.value++,R.push({label:Ce==null?void 0:Ce.label,name:Ce==null?void 0:Ce.label,type:Ce.type,value:(Ce==null?void 0:Ce.label)==="类型"?"Input":"",id:D.value,contents:Ce==null?void 0:Ce.options})}),s.value=R,v.value=R},g=R=>{let se=A.cloneDeep(_.value);se=se==null?void 0:se.map(ee=>(ee.value=R==null?void 0:R[ee.name],ee)),_.value=se},P=R=>{const se=R.find(Ce=>(Ce==null?void 0:Ce.name)==="类型");if((se==null?void 0:se.value)!="Select")return;const ee=R.find(Ce=>(Ce==null?void 0:Ce.name)==="多选"),ue=R.find(Ce=>(Ce==null?void 0:Ce.name)==="初始值");ee!=null&&ee.value&&So.isString(ue.value)&&(ue.value=[ue.value]),!(ee!=null&&ee.value)&&!So.isString(ue.value)&&(ue.value="")},I=async R=>{var se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe;if((R==null?void 0:R.类型)!==((ee=(se=v.value)==null?void 0:se.find(aa=>(aa==null?void 0:aa.label)==="类型"))==null?void 0:ee.value)){let aa=[];const Na=await((Pe=(Ce=(ue=he.FormContent)==null?void 0:ue.find(ae=>(ae==null?void 0:ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:Ce.value)==null?void 0:Pe.value)?await((Se=(W=(ce=he.FormContent)==null?void 0:ce.find(ae=>(ae==null?void 0:ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:W.value)==null?void 0:Se.value):(B=(ve=he.FormContent)==null?void 0:ve.find(ae=>(ae==null?void 0:ae.key)===((R==null?void 0:R.类型)===""?"Input":R==null?void 0:R.类型)))==null?void 0:B.value;if(Na==null||Na.forEach(ae=>{var oe,ca;D.value++;const ta=Ou(ae==null?void 0:ae.default)?(R==null?void 0:R[ae.label])??ae.value??"":ae==null?void 0:ae.default;aa.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:ta,prop:ae==null?void 0:ae.prop,id:D.value,contents:ae==null?void 0:ae.options,width:((ca=(oe=v.value)==null?void 0:oe[0])==null?void 0:ca.width)??1})}),R!=null&&R.菜单选项&&((Le=R==null?void 0:R.菜单选项)==null?void 0:Le.length)>0){const ae=await he.menuToContentType(R==null?void 0:R.菜单选项);aa=aa==null?void 0:aa.map(ta=>((ta==null?void 0:ta.name)==="组信息选项"&&(ta.contents=ae),ta))}P(aa),v.value=await he.selectToBase(A.cloneDeep(aa)),s.value=await he.selectToBase(A.cloneDeep(aa))}else{let aa=A.cloneDeep(v.value);if(aa=aa==null?void 0:aa.map(Na=>(Na.value=R==null?void 0:R[Na.name],Na)),R!=null&&R.菜单选项&&((Fe=R==null?void 0:R.菜单选项)==null?void 0:Fe.length)>0){const Na=await he.menuToContentType(R==null?void 0:R.菜单选项);aa=aa==null?void 0:aa.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Na),ae))}aa=he.formToOptionsContents(aa),P(aa),v.value=await he.selectToBase(A.cloneDeep(aa))}},Y=R=>{R||(s.value=v.value)},le=async R=>{await I(R),s.value=v.value},ye=Bl.debounce(async()=>{var ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na;s.value=v.value;let R={};R.width=((Ce=(ue=s.value)==null?void 0:ue[0])==null?void 0:Ce.width)??1,k.value!==""?R.id=k.value:(D.value++,R.id="id"+D.value);let se=await((B=(ve=(Pe=he.FormContent)==null?void 0:Pe.find(ae=>{var ta,oe;return(ae==null?void 0:ae.key)===(((oe=(ta=s.value)==null?void 0:ta.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:oe.value)??"label")}))==null?void 0:ve.value)==null?void 0:B.value)??((W=(ce=he.FormContent)==null?void 0:ce.find(ae=>{var ta,oe;return(ae==null?void 0:ae.key)===(((oe=(ta=s.value)==null?void 0:ta.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:oe.value)??"label")}))==null?void 0:W.value);if((Se=s.value)==null||Se.forEach(ae=>{const ta=se==null?void 0:se.find(oe=>(oe==null?void 0:oe.label)===(ae==null?void 0:ae.label));ta&&(R[ta.key]=ae.value)}),R.width=R.width?R.width:1,R.key=R==null?void 0:R.label,R.isFormColHidden=R==null?void 0:R.isFormColHidden,(Le=m.value)!=null&&Le.find(ae=>ae.id===R.id))m.value=(Fe=m.value)==null?void 0:Fe.map(ae=>(ae.id===R.id&&(ae=R),ae));else{let ae=A.cloneDeep(m.value);ae.push(R),m.value=ae}m.value=m.value.map(({id:ae,...ta})=>ta),t.value=!1,k.value="";let ee=A.cloneDeep(r.originalItemContents);(aa=A.cloneDeep(r.originalItemContents))!=null&&aa.find(ae=>(ae==null?void 0:ae.key)==="formContent")?ee=(Na=A.cloneDeep(r.originalItemContents))==null?void 0:Na.map(ae=>((ae==null?void 0:ae.key)==="formContent"&&(ae.contents=m.value),ae)):ee.push({key:"formContent",contents:m.value}),n("change",ee)},300),Te=()=>{t.value=!1,p.value=!1,k.value="",v.value=[],_.value=[]};return e.watch(()=>r.originalItemContents,()=>{var se,ee,ue,Ce,Pe,ve;if(!r.originalItemContents||r.originalItemContents.length===0)return;const R=A.cloneDeep(r.originalItemContents);m.value=((se=R==null?void 0:R.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:se.contents)??[],f.value=((ee=R==null?void 0:R.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:ee.contents)??[],c.value=(ue=R==null?void 0:R.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&ue.contents?!((Ce=R==null?void 0:R.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&Ce.contents):!0,m.value=(Pe=A.cloneDeep(m.value))==null?void 0:Pe.map((B,ce)=>{var Se;let W=B;return W.id=(B==null?void 0:B.id)??ce,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=((Se=B==null?void 0:B.options)==null?void 0:Se.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,W}),m.value=he.formToOptionsContents(m.value),f.value=(ve=f.value)==null?void 0:ve.map((B,ce)=>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:ce})},{deep:!0,immediate:!0}),(R,se)=>{const ee=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",y2,[e.createElementVNode("div",g2,[e.createElementVNode("div",b2,[se[2]||(se[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[1]||(se[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",k2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Ce,Pe)=>(e.openBlock(),e.createElementBlock("div",{key:Pe},[e.createElementVNode("div",x2,[e.createElementVNode("div",null,e.toDisplayString(Ce.label),1),e.createElementVNode("div",w2,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>M(Ce)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>E(Ce)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",_2,[se[4]||(se[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[3]||(se[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",S2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ce,Pe)=>(e.openBlock(),e.createElementBlock("div",{key:Pe},[e.createElementVNode("div",E2,[e.createElementVNode("div",null,e.toDisplayString(Ce.label),1),e.createElementVNode("div",C2,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>$(Ce)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>S(Ce)},null,8,["onClick"])])])]))),128))]),se[6]||(se[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",D2,[se[5]||(se[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(ll._sfc_main$1,{modelValue:c.value,"onUpdate:modelValue":se[0]||(se[0]=Ce=>c.value=Ce)},null,8,["modelValue"])])]),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",N2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:I,onChangeVisible:Y,onBlurChange:le},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B2,[e.createVNode(ue,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ue,{class:"ok-button button",onClick:e.unref(ye),id:"themeButton"},{default:e.withCtx(()=>se[8]||(se[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:p.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Te,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:j},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ks=Xl._export_sfc(A2,[["__scopeId","data-v-20850524"]]),z2={class:"step-module content"},M2={class:"module-data"},I2={class:"step-module layout"},O2={class:"form-content"},L2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),v=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),m=e.ref({}),k=e.ref([]),c=M=>{var $;m.value=M,n("change",($=_())==null?void 0:$.compData)},D=(M,$)=>{var j,E;switch(M){case"create":(j=s.value)==null||j.forEach(S=>{S.value=""}),f.value="create",p.visible=!0;break;case"update":(E=s.value)==null||E.forEach(S=>{S.value=$[S==null?void 0:S.prop]}),f.value="update",p.visible=!0;break;case"delete":k.value.splice($,1),f.value="delete";break}},V=M=>{var $,j,E;if((M==null?void 0:M.buttonName)==="确认"){const S=A.cloneDeep(M==null?void 0:M.content);switch(Object.keys(S).forEach(w=>{S[w]===""&&delete S[w]}),f.value){case"create":k.value.push({...S,index:(($=k.value)==null?void 0:$.length)+1});break;case"update":k.value=(j=k.value)==null?void 0:j.map(w=>w.index===(S==null?void 0:S.index)?{...w,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:w);break}n("change",(E=_())==null?void 0:E.compData),p.visible=!1}else p.visible=!1},_=()=>({comp:"Step",compData:[{key:"stepList",contents:k.value},{key:"stepConfig",contents:m.value}]}),G=()=>{p.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,M=>{var $,j;M&&(m.value=(($=M==null?void 0:M.find(E=>E.key==="stepConfig"))==null?void 0:$.contents)??{},k.value=((j=M==null?void 0:M.find(E=>E.key==="stepList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,$)=>{const j=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",z2,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=S=>D("create"))},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",M2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(S,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>D("update",{...S,index:w+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>D("delete",w)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",I2,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ll.ssForm,{rowContents:t.value,onChange:c},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:G,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",O2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:v.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),$2=Xl._export_sfc(L2,[["__scopeId","data-v-7dbd17f2"]]),R2={class:"step-module content"},V2={class:"module-data"},F2={class:"step-module layout"},P2={class:"form-content"},j2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref("create"),s=e.ref({}),v=e.ref([]),p=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),k=e.reactive({visible:!1,width:"40%",title:"时间线"}),c=M=>{var $;s.value=M,n("change",($=_())==null?void 0:$.compData)},D=(M,$)=>{var j,E;switch(M){case"create":(j=f.value)==null||j.forEach(S=>{S.value=""}),t.value="create",k.visible=!0;break;case"update":(E=f.value)==null||E.forEach(S=>{S.value=$[S==null?void 0:S.prop]}),t.value="update",k.visible=!0;break;case"delete":v.value.splice($,1),t.value="delete";break}},V=M=>{var $,j,E,S;if((M==null?void 0:M.buttonName)==="确认"){const w=A.cloneDeep(M==null?void 0:M.content);switch(Object.keys(w).forEach(b=>{w[b]===""&&delete w[b]}),t.value){case"create":(j=v.value)==null||j.push({...w,index:(($=v.value)==null?void 0:$.length)+1});break;case"update":v.value=(E=v.value)==null?void 0:E.map(b=>b.index===(w==null?void 0:w.index)?{...b,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:b);break}n("change",(S=_())==null?void 0:S.compData),k.visible=!1}else k.visible=!1},_=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:v.value},{key:"timeLineConfig",contents:s.value}]}),G=()=>{k.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,M=>{var $,j;M&&(s.value=(($=M==null?void 0:M.find(E=>E.key==="timeLineConfig"))==null?void 0:$.contents)??{},v.value=((j=M==null?void 0:M.find(E=>E.key==="timeLineList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,$)=>{const j=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",R2,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=S=>D("create"))},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",V2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(S,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>D("update",{...S,index:w+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>D("delete",w)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",F2,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ll.ssForm,{rowContents:p.value,onChange:c},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:k.visible,title:k.title,onBeforeDestroy:G,width:k.width},{default:e.withCtx(()=>[e.createElementVNode("div",P2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),H2=Xl._export_sfc(j2,[["__scopeId","data-v-39ffc861"]]),U2={};function q2(a,l){return e.openBlock(),e.createElementBlock("div")}const W2=Xl._export_sfc(U2,[["render",q2]]),K2={class:"extra-content"},G2={key:0},Y2={key:1},J2={class:"dialog-footer"},X2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const r=a,n=e.ref(0),t=e.ref(),s=e.ref(),v=l,p=e.ref(!1),f=e.ref({}),m=e.ref({}),k=e.ref();e.watch(()=>[r.itemData],()=>{var S;const E=A.cloneDeep(r.itemData);t.value=(S=A.cloneDeep(E))==null?void 0:S.map(w=>{var b;if(w.key==="extra"){let g=[];(b=w.value)==null||b.forEach(P=>{var I;g.push((I=Object.values(P))==null?void 0:I[0])}),w.value=g}return w})},{deep:!0,immediate:!0});const c=(E,S,w,b)=>{var P;let g={};((P=E==null?void 0:E[0])==null?void 0:P.contents)==="详情"&&(p.value=!0,g[S]=E,s.value=E==null?void 0:E.filter(I=>(I==null?void 0:I.key)!=="tableContentName"),f.value=g,m.value=w,k.value=b.id)},D=E=>{var I,Y,le,ye;const S=(Y=(I=Object.values(A.cloneDeep(f.value)))==null?void 0:I[0])==null?void 0:Y.filter(Te=>(Te==null?void 0:Te.key)==="tableContentName"),w=(ye=(le=Object.values(A.cloneDeep(f.value)))==null?void 0:le[0])==null?void 0:ye.filter(Te=>(Te==null?void 0:Te.key)!=="tableContentName"),b=w==null?void 0:w.map((Te,R)=>{var se;return R===E.index&&(Te==null?void 0:Te.comp)==="Table"&&(Te.compData=(se=Te.compData)==null?void 0:se.map(ee=>{var ue,Ce;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(Ce=(ue=E.content)==null?void 0:ue.map(Pe=>{let ve={};for(let B in Pe)B!=="id"&&(ve[B]=Pe[B]);return ve}))==null?void 0:Ce.map(Pe=>Object.values(Pe))),ee})),Te});b.unshift(S==null?void 0:S[0]);let g=A.cloneDeep(f.value),P={};for(let Te in g)P[Te]=b;f.value=P},V=()=>{p.value=!1,f.value={},m.value={},k.value=void 0,n.value++},_=E=>{var I,Y,le,ye;const S=(Y=(I=Object.values(A.cloneDeep(f.value)))==null?void 0:I[0])==null?void 0:Y.filter(Te=>(Te==null?void 0:Te.key)==="tableContentName"),w=(ye=(le=Object.values(A.cloneDeep(f.value)))==null?void 0:le[0])==null?void 0:ye.filter(Te=>(Te==null?void 0:Te.key)!=="tableContentName"),b=w==null?void 0:w.map((Te,R)=>(R===E.index&&(Te.compData=E.contents),Te));b.unshift(S==null?void 0:S[0]);let g=A.cloneDeep(f.value),P={};for(let Te in g)P[Te]=b;f.value=P},G=()=>{var S,w;let E={};for(let b in m.value)b===((S=Object.keys(f.value))==null?void 0:S[0])?E[b]=(w=Object.values(f.value))==null?void 0:w[0]:E[b]=m.value[b];v("change",{buttonName:"编辑",index:k.value,singleContent:E},"methodData"),p.value=!1,f.value={},m.value={},k.value=void 0},M=()=>{p.value=!1,f.value={},m.value={},k.value=void 0},$=E=>{v("change",E,"methodData")},j=E=>Ni(E);return(E,S)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",K2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(b,g)=>(e.openBlock(),e.createElementBlock("div",{key:n.value},[(b==null?void 0:b.key)==="extra"?(e.openBlock(),e.createElementBlock("div",G2)):(e.openBlock(),e.createElementBlock("div",Y2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(b.comp)),{itemData:b==null?void 0:b.compData,childItemData:b==null?void 0:b.itemChildData,key:g,index:(b==null?void 0:b.id)??g,onContentClick:c,onChange:$},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(wr.ssDialog,{visible:p.value,onBeforeDestroy:M},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(b,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(b.comp)),{itemData:b==null?void 0:b.compData,onChange:D,childItemData:b==null?void 0:b.itemChildData,key:g,onContentChange:_,index:(b==null?void 0:b.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",J2,[e.createVNode(w,{class:"cancel-button footer-button",onClick:V,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Z2=Xl._export_sfc(X2,[["__scopeId","data-v-2d9c5ab2"]]),Q2={key:0,class:"method-content"},e4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),r=he.useOriginalState(A.pinia),{originalPath:n}=A.storeToRefs(r),t=a,s=e.ref(!1),v=e.ref(),p=he.useTableComp(A.pinia),{multipleTableConst:f}=A.storeToRefs(p),m=A.useModelComp(A.pinia),k=e.ref(!1),c=A.useMenuState(A.pinia),D=A.useLoginState(A.pinia),{itemData:V,isEdit:_,routeToChildPath:G,tableViewContents:M,lockingPage:$,payloadTypes:j}=A.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:w}=A.storeToRefs(c),{loginUserInfo:b}=A.storeToRefs(D),g=e.ref(!1),P=async()=>{var ve,B;(ve=l.value)!=null&&ve.find(ce=>(ce==null?void 0:ce.buttonName)==="保存")&&await ee((B=l.value)==null?void 0:B.find(ce=>(ce==null?void 0:ce.buttonName)==="保存")),await he.onSaveBack()};e.watch(()=>V.value,async()=>{_.value==="view"&&!g.value&&await Pe(A.cloneDeep(t.itemData)),g.value=!1},{deep:!0});const I=()=>{s.value=!1,v.value=void 0},Y=ve=>ve.map(B=>{const ce={};for(const W in B){const Se=B[W];if(W.includes(f.value)){const Le=W.split(f.value);let Fe=ce;Le.forEach((aa,Na)=>{Na===Le.length-1?Fe[aa]=Se:(Fe[aa]||(Fe[aa]={}),Fe=Fe[aa])})}else ce[W]=Se}return ce}),le=async(ve,B,ce=[])=>{var Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja;let W=(Se=A.cloneDeep(B))==null?void 0:Se.filter(L=>(L==null?void 0:L.comp)!=="methodButton");if(ve!=null&&ve.includes("[")){let L=(ae=(Na=(aa=(Fe=(Le=A.cloneDeep(ve))==null?void 0:Le.split("["))==null?void 0:Fe[1])==null?void 0:aa.split("]"))==null?void 0:Na[0])==null?void 0:ae.split(":"),H="";if(L!=null&&L[0]){let Z=(ta=W==null?void 0:W.find(me=>(me==null?void 0:me.name)===(L==null?void 0:L[0])))==null?void 0:ta.compData;if(!Z){let me=(oe=ve==null?void 0:ve.split("["))==null?void 0:oe[0],fe=await he.getItemData(me,sessionStorage.getItem("systemKey"),"",!1,"","",ce);Z=(ca=fe==null?void 0:fe.find(da=>(da==null?void 0:da.name)===(L==null?void 0:L[0])))==null?void 0:ca.compData}Z==null||Z.forEach(me=>{var fe,da,Qe,te,pa,Ne;if((me==null?void 0:me.key)==="formContent")(fe=me==null?void 0:me.contents)==null||fe.forEach(We=>{var Aa;(We==null?void 0:We.key)===(L==null?void 0:L[1])&&(Array.isArray(We==null?void 0:We.value)?H=We==null?void 0:We.value:H=(Aa=We==null?void 0:We.value)==null?void 0:Aa.toString())});else if((me==null?void 0:me.key)==="tableContents"){let We=[],Aa=(da=Z==null?void 0:Z.find(Ze=>(Ze==null?void 0:Ze.key)==="header"))==null?void 0:da.contents,Da=(L==null?void 0:L[1])??"";if(Aa!=null&&Aa.every(Ze=>Array.isArray(Ze))){let Ze=he.getColumnChild((pa=Aa==null?void 0:Aa[0])==null?void 0:pa.filter(ra=>(ra==null?void 0:ra.label)!=="操作"));(Ne=me.contents)==null||Ne.forEach(ra=>{let pe={};ra=ra==null?void 0:ra.filter(U=>!(U!=null&&U.id)),Ze==null||Ze.forEach((U,q)=>{let ze=ra[q];typeof ra[q]=="number"&&(ze=ra[q].toString()),(Da===""||Da===U.prop)&&(pe[U.prop]=ze)}),We.push(pe)}),We=Y(We)}else{let Ze=(Qe=Aa==null?void 0:Aa.map(ra=>ra==null?void 0:ra.label))==null?void 0:Qe.filter(ra=>ra!=="操作");(te=me.contents)==null||te.forEach(ra=>{let pe={};ra=ra==null?void 0:ra.filter(U=>!(U!=null&&U.id)),Ze==null||Ze.forEach((U,q)=>{let ze=ra[q];typeof ra[q]=="number"&&(ze=ra[q].toString()),(Da===""||Da===U)&&(pe[U]=ze)}),We.push(pe)})}H=We}})}return H}else if(ve!=null&&ve.includes("/")){let L={};return(Ee=A.cloneDeep(W))==null||Ee.forEach((H,Z)=>{var me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa;if((H==null?void 0:H.comp)==="Table"){let ka=Array.isArray((da=(fe=(me=H==null?void 0:H.compData)==null?void 0:me.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:fe.contents)==null?void 0:da[0])?(Ne=(pa=(te=(Qe=H==null?void 0:H.compData)==null?void 0:Qe.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:te.contents)==null?void 0:pa[0])==null?void 0:Ne.some(Oe=>Oe==null?void 0:Oe.children):[],ha=(Da=(Aa=(We=H==null?void 0:H.compData)==null?void 0:We.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:Aa.contents)==null?void 0:Da.map(Oe=>(Oe!=null&&Oe.find(Za=>Za==null?void 0:Za.id)&&(Oe=Oe.slice(1)),Oe)),Va=(q=(U=(pe=(ra=(Ze=H==null?void 0:H.compData)==null?void 0:Ze.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:ra.contents)==null?void 0:pe[0])==null?void 0:U[0])==null?void 0:q.label,Sa=(_e=(ze=H==null?void 0:H.compData)==null?void 0:ze.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:_e.contents;if(ka)(ka==null?void 0:ka.length)===0?L[H.name]=L!=null&&L[H.name]?L[H.name]:he.tableToForm(ha,Sa):L[Va]=he.tableToForm(ha,Sa);else{const Oe=[];Sa=Sa.slice(1,Sa.length-1),Sa==null||Sa.forEach((Za,Ha)=>{ha==null||ha.forEach(xl=>{Oe.push({key:Za.label+xl[0],value:xl[Ha+1]})})}),L["form"+Z]=Oe}}else{const ka=(fa=(la=H.compData)==null?void 0:la.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:fa.contents;L!=null&&L.form||(L.form=[]);const ha=[];ka==null||ka.forEach(Va=>{Va.key!==""&&(Va={key:(Va==null?void 0:Va.key)??(Va==null?void 0:Va.label),value:Va==null?void 0:Va.value},ha.push(Va))}),L.form=[...ha,...A.cloneDeep(L==null?void 0:L.form)]}}),L}else{if(ve==="createInsofDataApi"){let L=(ie=A.cloneDeep(B))==null?void 0:ie[0];return L={comp:(Be=A.cloneDeep(L))==null?void 0:Be.comp,compData:(Ue=A.cloneDeep(L))==null?void 0:Ue.compData,name:(oa=A.cloneDeep(L))==null?void 0:oa.name,isShow:(Ja=A.cloneDeep(L))==null?void 0:Ja.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:L}}}return ve}},ye=async(ve,B,ce)=>{var Le,Fe,aa;let W=await he.getItemData(B,sessionStorage.getItem("systemKey"),""),Se=W==null?void 0:W.find(Na=>(Na==null?void 0:Na.name)===(ce==null?void 0:ce[0]));if(Se){if((Se==null?void 0:Se.comp)==="Table"){let Na={};for(let Be in A.cloneDeep(ve))A.cloneDeep(ve)[Be]!=="loginUser"?Na[Be]=A.cloneDeep(ve)[Be]:Na[Be]=((Le=b.value)==null?void 0:Le.account)||((Fe=b.value)==null?void 0:Fe.账号);let ae=[],ta=Na;Array.isArray(ve)||(ta=[Na]),ta==null||ta.forEach(Be=>{ae.push({[Be[ce[1]]]:Be})});let oe=[],ca=ae==null?void 0:ae.map(Be=>{var Ue;return(Ue=Object.keys(Be))==null?void 0:Ue[0]});W==null||W.forEach(Be=>{var Ue;(Be==null?void 0:Be.name)===(ce==null?void 0:ce[0])&&((Ue=Be==null?void 0:Be.compData)==null||Ue.forEach(oa=>{var Ja;(oa==null?void 0:oa.key)==="tableContents"&&((Ja=oa==null?void 0:oa.contents)==null||Ja.forEach(L=>{L!=null&&L.some(H=>ca.includes(H))&&oe.push({[L.find(H=>H.id).id]:L.find(H=>ca.includes(H))})}))}))});let Ee=oe==null?void 0:oe.map(Be=>{var Ue;return(Ue=Object.keys(Be))==null?void 0:Ue[0]}),ie=[];if(Ee==null||Ee.forEach(Be=>{var Ja;let Ue=(Ja=oe==null?void 0:oe.find(L=>{var H;return((H=Object.keys(L))==null?void 0:H[0].toString())===Be.toString()}))==null?void 0:Ja[Be],oa=ae==null?void 0:ae.find(L=>{var H;return((H=Object.keys(L))==null?void 0:H[0])===Ue});ie.push({id:parseInt(Be),value:{tableData:oa[Ue]}})}),(ie==null?void 0:ie.length)>0)return ie}else if((Se==null?void 0:Se.comp)==="Form"){let Na=A.cloneDeep(Se);Na.compData=(aa=Na.compData)==null?void 0:aa.map(oe=>{var ca;return(oe==null?void 0:oe.key)==="formContent"&&(oe.contents=(ca=oe.contents)==null?void 0:ca.map(Ee=>((Ee==null?void 0:Ee.key)===(ce==null?void 0:ce[1])&&(Ee.value=(ve==null?void 0:ve[Ee==null?void 0:Ee.prop])||ve),Ee))),oe});let ae={};for(let oe in Na)oe!=="id"&&(ae[oe]=Na[oe]);let ta=[];if(ta.push({id:Se==null?void 0:Se.id,keyType:ce==null?void 0:ce[1],value:{pageData:ae}}),(ta==null?void 0:ta.length)>0)return ta}}},Te=async(ve,B,ce)=>{var Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie;let W=await he.getItemData(B,sessionStorage.getItem("systemKey"),""),Se=W==null?void 0:W.find(Be=>(Be==null?void 0:Be.name)===(ce==null?void 0:ce[0]));if(Se){if((Se==null?void 0:Se.comp)==="Table"){let Be={};for(let Ue in A.cloneDeep(ve))A.cloneDeep(ve)[Ue]!=="loginUser"?Be[Ue]=A.cloneDeep(ve)[Ue]:Be[Ue]=((Le=b.value)==null?void 0:Le.account)||((Fe=b.value)==null?void 0:Fe.账号);await Ar.createInsofDataApi({key:{type:"data",pageKey:B,tableId:Se==null?void 0:Se.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Be}})}else if((Se==null?void 0:Se.comp)==="Form"){let Be=A.cloneDeep(Se),Ue=Object.keys(ve),oa="";(Na=(aa=A.cloneDeep(Be))==null?void 0:aa.compData)==null||Na.forEach(fe=>{var da,Qe;(fe==null?void 0:fe.key)==="formContent"&&((Qe=(da=A.cloneDeep(fe))==null?void 0:da.contents)==null||Qe.forEach(te=>{var pa;Ue.includes(te==null?void 0:te.key)&&(te==null?void 0:te.value)===((pa=b.value)==null?void 0:pa.姓名)&&(oa=te==null?void 0:te.key)}))});let Ja=[];(ae=Object.values(ve[oa]))==null||ae.forEach(fe=>{fe!=null&&fe.includes("(")&&Ja.push(fe)}),Ja=[...new Set(Ja)];const L=Ja==null?void 0:Ja.map(async fe=>{var Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la;let da="";(ra=(Ze=(Da=(Aa=(We=(Ne=A.cloneDeep(fe))==null?void 0:Ne.split("("))==null?void 0:We[1])==null?void 0:Aa.split(")"))==null?void 0:Da[0])==null?void 0:Ze.split(":"))==null||ra.forEach(fa=>{da=da===""?da+fa.replaceAll("'",""):da+"/"+fa.replaceAll("'","")});let Qe=[];(la=(_e=(ze=(q=(U=(pe=A.cloneDeep(fe))==null?void 0:pe.split("<"))==null?void 0:U[1])==null?void 0:q.split(">"))==null?void 0:ze[0])==null?void 0:_e.split(":"))==null||la.forEach(fa=>{Qe.push(fa.replaceAll("'",""))});const te=await he.getItemData(da,sessionStorage.getItem("systemKey"),"");let pa="";return te==null||te.forEach(fa=>{var ka;fa.name===(Qe==null?void 0:Qe[0])&&((ka=fa==null?void 0:fa.compData)==null||ka.forEach(ha=>{var Va;(ha==null?void 0:ha.key)==="formContent"&&((Va=ha.contents)==null||Va.forEach(Sa=>{(Sa==null?void 0:Sa.key)===(Qe==null?void 0:Qe[1])&&(pa=Sa==null?void 0:Sa.value)}))}))}),{[fe]:pa}}),H=await Promise.all(L);Be.compData=(oe=(ta=A.cloneDeep(Be))==null?void 0:ta.compData)==null?void 0:oe.map(fe=>{var da,Qe;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(Qe=(da=A.cloneDeep(fe))==null?void 0:da.contents)==null?void 0:Qe.map(te=>{var pa,Ne,We,Aa;return(pa=ve[oa])!=null&&pa[te==null?void 0:te.key]&&(ve[oa][te==null?void 0:te.key].includes("(")?te.value=(Ne=H==null?void 0:H.find(Da=>{var Ze;return((Ze=Object.keys(Da))==null?void 0:Ze[0])===ve[oa][te==null?void 0:te.key]}))==null?void 0:Ne[ve[oa][te==null?void 0:te.key]]:te.value=(Aa=(We=A.cloneDeep(ve))==null?void 0:We[oa])==null?void 0:Aa[te==null?void 0:te.key]),te})),fe});const Z=await Ar.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let me="";((ca=Z==null?void 0:Z.data)==null?void 0:ca.type)==="success"&&((ie=(Ee=Z==null?void 0:Z.data)==null?void 0:Ee.result)==null||ie.forEach(fe=>{var da,Qe;((Qe=(da=fe==null?void 0:fe.value)==null?void 0:da.pageData)==null?void 0:Qe.name)===(ce==null?void 0:ce[0])&&(me=fe.id)}),await Ar.updateInsofDataApi({id:me,value:{pageData:Be}}))}}},R=(ve,B="",ce={})=>{for(const[W,Se]of Object.entries(ve)){const Le=B?`${B}.${W}`:W;Se!==null&&typeof Se=="object"&&!Array.isArray(Se)&&Object.prototype.toString.call(Se)!=="[object Date]"?R(Se,Le,ce):ce[Le]=Se}return ce},se=async(ve,B,ce,W)=>{var Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa;let Se=await he.getItemData(B,sessionStorage.getItem("systemKey"),""),Le=Se==null?void 0:Se.find(Da=>(Da==null?void 0:Da.name)===(ce==null?void 0:ce[0]));if(Le){if(!(ce!=null&&ce[1])&&(Le==null?void 0:Le.comp)==="Table"){let Da={},Ze=[],ra=(aa=(Fe=Le==null?void 0:Le.compData)==null?void 0:Fe.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:aa.contents;ra!=null&&ra.every(q=>Array.isArray(q))?Ze=(ae=he.getColumnChild((Na=ra==null?void 0:ra[0])==null?void 0:Na.filter(q=>(q==null?void 0:q.label)!=="操作")))==null?void 0:ae.map(q=>q==null?void 0:q.prop):Ze=ra==null?void 0:ra.map(q=>q==null?void 0:q.label);for(let q in A.cloneDeep(ve))if(A.cloneDeep(ve)[q]!=="loginUser"){let ze=R(A.cloneDeep(ve)[q]),_e={};for(let la in ze)if(Ze!=null&&Ze.find(fa=>fa===la))_e[la]=ze[la];else if(Ze!=null&&Ze.find(fa=>(fa==null?void 0:fa.toUpperCase())===(la==null?void 0:la.toUpperCase()))){let fa=Ze==null?void 0:Ze.find(ka=>(ka==null?void 0:ka.toUpperCase())===(la==null?void 0:la.toUpperCase()));_e[fa]=ze[la]}Da[q]=_e}else Da[q]=((ta=b.value)==null?void 0:ta.account)||((oe=b.value)==null?void 0:oe.账号);let pe=await Ar.getInsofDataApi({keyLikes:{tableId:Le==null?void 0:Le.id}});if(((Ee=(ca=pe==null?void 0:pe.data)==null?void 0:ca.result)==null?void 0:Ee.length)>0){let q=(Be=(ie=pe==null?void 0:pe.data)==null?void 0:ie.result)==null?void 0:Be.map(ze=>ze==null?void 0:ze.id);(q==null?void 0:q.length)>0&&await Ar.batchDeleteInsofDataApi({ids:q})}let U=[];if((Ue=Le==null?void 0:Le.compData)!=null&&Ue.find(q=>(q==null?void 0:q.key)==="pageColumn")&&((L=(Ja=(oa=Le==null?void 0:Le.compData)==null?void 0:oa.find(q=>(q==null?void 0:q.key)==="pageColumn"))==null?void 0:Ja.contents)!=null&&L.includes("["))){const q=await Ar.getInsofDataApi({id:Le==null?void 0:Le.tableId});let ze=((fe=(me=(Z=(H=q==null?void 0:q.data)==null?void 0:H.result)==null?void 0:Z[0])==null?void 0:me.key)==null?void 0:fe.pageKey)??"";(da=Object.values(Da))==null||da.forEach(_e=>{U.push({key:{type:"data",pageKey:ze,tableId:Le==null?void 0:Le.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})})}else(Qe=Object.values(Da))==null||Qe.forEach(q=>{U.push({key:{type:"data",pageKey:B,tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:q}})});(U==null?void 0:U.length)>0&&await Ar.batchAddInsofDataApi({dataList:U})}else if(!(ce!=null&&ce[1])&&(Le==null?void 0:Le.comp)==="Form"){let Da=A.cloneDeep(Le);Da.compData=(pa=(te=A.cloneDeep(Da))==null?void 0:te.compData)==null?void 0:pa.map(pe=>{var U,q;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(q=(U=A.cloneDeep(pe))==null?void 0:U.contents)==null?void 0:q.map(ze=>{var _e,la;return(_e=A.cloneDeep(ve))!=null&&_e[ze==null?void 0:ze.key]&&(ze.value=(la=A.cloneDeep(ve))==null?void 0:la[ze==null?void 0:ze.key]),ze})),pe});const Ze=await Ar.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let ra="";((Ne=Ze==null?void 0:Ze.data)==null?void 0:Ne.type)==="success"&&((Aa=(We=Ze==null?void 0:Ze.data)==null?void 0:We.result)==null||Aa.forEach(pe=>{var U,q;((q=(U=pe==null?void 0:pe.value)==null?void 0:U.pageData)==null?void 0:q.name)===(ce==null?void 0:ce[0])&&(ra=pe.id)}),await Ar.updateInsofDataApi({id:ra,value:{pageData:Da}}))}}},ee=async ve=>{var B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie;c.setImportLoading(!0);try{if(ve.api){let Be=new WeakMap,Ue=await he.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be),oa="";if(Ue=Ue==null?void 0:Ue.map(Qe=>{var te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze;if((Qe==null?void 0:Qe.comp)==="Form")Qe.compData=(te=Qe.compData)==null?void 0:te.map(_e=>{var la;return(_e==null?void 0:_e.key)==="formContent"&&(_e.contents=(la=_e.contents)==null?void 0:la.map(fa=>{var ka;if((fa==null?void 0:fa.value)===""&&(fa==null?void 0:fa.type)==="Select"){let ha=he.judgeContents((ka=A.cloneDeep(fa))==null?void 0:ka.optionUrl,Be);fa.value=fa.value||ha}return fa})),_e});else if((Qe==null?void 0:Qe.comp)==="Table"&&(pa=Qe.compData)!=null&&pa.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")){let _e=(We=(Ne=Qe.compData)==null?void 0:Ne.find(ha=>(ha==null?void 0:ha.key)==="pageColumn"))==null?void 0:We.contents,la=((Da=(Aa=Qe.compData)==null?void 0:Aa.find(ha=>(ha==null?void 0:ha.key)==="pageGroup"))==null?void 0:Da.contents)??"",fa=(pe=(ra=(Ze=_e==null?void 0:_e.split("["))==null?void 0:Ze[1])==null?void 0:ra.split("]"))==null?void 0:pe[0];oa=((U=_e==null?void 0:_e.split("["))==null?void 0:U[0])+((ze=(q=M.value)==null?void 0:q.find(ha=>(ha==null?void 0:ha.key)===fa))==null?void 0:ze.value)}return Qe}),!(oa===""||oa==="")){const Qe=await he.getItemData(oa,sessionStorage.getItem("systemKey"),"",!1,"","",Be);Ue=Ue==null?void 0:Ue.map(te=>{var pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la;if((te==null?void 0:te.comp)==="Table"&&(pa=te.compData)!=null&&pa.find(fa=>(fa==null?void 0:fa.key)==="pageColumn")){let fa=(We=(Ne=te.compData)==null?void 0:Ne.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:We.contents,ka=((Da=(Aa=te.compData)==null?void 0:Aa.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:Da.contents)??"",ha=(pe=(ra=(Ze=fa==null?void 0:fa.split("["))==null?void 0:Ze[1])==null?void 0:ra.split("]"))==null?void 0:pe[0],Va=((U=fa==null?void 0:fa.split("["))==null?void 0:U[0])+((ze=(q=M.value)==null?void 0:q.find(Oe=>(Oe==null?void 0:Oe.key)===ha))==null?void 0:ze.value),Sa=(_e=Qe==null?void 0:Qe.find(Oe=>(Oe==null?void 0:Oe.name)===(ka===""?t==null?void 0:t.compName:ka)))==null?void 0:_e.compData;te.compData=(la=te.compData)==null?void 0:la.map(Oe=>{var Za;return(Oe==null?void 0:Oe.key)==="tableContents"&&(Oe.contents=(Za=Sa==null?void 0:Sa.find(Ha=>(Ha==null?void 0:Ha.key)==="tableContents"))==null?void 0:Za.contents),Oe})}return te})}let Ja={};if(((ce=(B=ve==null?void 0:ve.extraValues)==null?void 0:B.input)==null?void 0:ce.length)>0){const Qe=(Se=(W=ve==null?void 0:ve.extraValues)==null?void 0:W.input)==null?void 0:Se.map(async te=>{var pa;ue!=null&&ue.find(Ne=>Ne===te)?Ja=await le(te,Ue):Ja[Object.keys(te)[0]]=await le((pa=Object.values(te))==null?void 0:pa[0],Ue,Be)});await Promise.all(Qe)}else Ja=await le("/",Ue);let L=!1;(Fe=(Le=ve==null?void 0:ve.extraValues)==null?void 0:Le.output)==null||Fe.forEach(Qe=>{var te,pa;(pa=(te=Object.values(Qe))==null?void 0:te[0])!=null&&pa.includes(".doc")&&(L=!0)});let H;if(L){const Qe=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await qa.axios.post(ve.api,Ja,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Qe.close()})}else H=await qa.axios.post(ve.api,Ja,{headers:{"Content-Type":"application/json"}});let Z=(ta=(ae=(Na=(aa=A.cloneDeep(ve))==null?void 0:aa.extraValues)==null?void 0:Na.output)==null?void 0:ae.map(Qe=>{var te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa,ka;if(!((pa=(te=Object.values(Qe))==null?void 0:te[0])!=null&&pa.includes(".doc"))){let ha=(U=(pe=(ra=(We=A.cloneDeep((Ne=Object.values(Qe))==null?void 0:Ne[0]))==null?void 0:We.split("["))==null?void 0:ra[((Ze=(Da=A.cloneDeep((Aa=Object.values(Qe))==null?void 0:Aa[0]))==null?void 0:Da.split("["))==null?void 0:Ze.length)-1])==null?void 0:pe.split("]"))==null?void 0:U[0],Va=ha==null?void 0:ha.split(":"),Sa=(_e=A.cloneDeep((q=Object.values(Qe))==null?void 0:q[0]))==null?void 0:_e.substring(0,A.cloneDeep((ze=Object.values(Qe))==null?void 0:ze[0]).lastIndexOf("["));if(Sa=(fa=A.cloneDeep(Sa))==null?void 0:fa.slice(0,((la=A.cloneDeep(Sa))==null?void 0:la.length)-1),Sa!=null&&Sa.includes("[")){let Oe="";if((ka=he.contentTransArrayToAll(Sa,"/"))==null||ka.forEach(Za=>{var Ha,xl,Yl,kl,Fl,ja,zl;if(!(Za!=null&&Za.includes("[")))Oe=Oe===""?Oe+Za.replaceAll("/",""):Oe+"/"+Za.replaceAll("/","");else{let $l=A.cloneDeep(Za).slice(1,((Ha=A.cloneDeep(Za))==null?void 0:Ha.length)-1),Ma=(ja=(Fl=(kl=(Yl=(xl=A.cloneDeep($l))==null?void 0:xl.split("["))==null?void 0:Yl[1])==null?void 0:kl.split("]"))==null?void 0:Fl[0])==null?void 0:ja.split(":"),rl="",sl=(zl=Ue==null?void 0:Ue.find(ga=>(ga==null?void 0:ga.name)===(Ma==null?void 0:Ma[0])))==null?void 0:zl.compData;sl==null||sl.forEach(ga=>{var xa;(ga==null?void 0:ga.key)==="formContent"&&((xa=ga==null?void 0:ga.contents)==null||xa.forEach(La=>{(La==null?void 0:La.key)===(Ma==null?void 0:Ma[1])&&(rl=La==null?void 0:La.value)}))}),Oe=Oe===""?Oe+rl.replaceAll("/",""):Oe+"/"+rl.replaceAll("/","")}}),Sa=Oe,Sa[(Sa==null?void 0:Sa.length)-1]!=="/")return Sa}}}))==null?void 0:ta.filter(Qe=>Qe);Z=[...new Set(A.cloneDeep(Z))];let me=Z==null?void 0:Z.map(async Qe=>{let te=await he.getItemData(Qe,sessionStorage.getItem("systemKey"),"",!1,"","",Be);if((te==null?void 0:te.length)===0)return await he.getParentContents(Qe)});await Promise.all(me);let fe=[],da=(Ee=(ca=(oe=A.cloneDeep(ve))==null?void 0:oe.extraValues)==null?void 0:ca.output)==null?void 0:Ee.map(async Qe=>{var ra,pe,U,q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl,ga,xa,La,Ra,xe,ia,Ie,de,ma,ya,Je,Xe,Ke,pl,Ve,Fa,Ea,il,Ia,Me,Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr,Pl,ar,Pr,Tr,jr,Ir,Er,Cr,mn,Nr,cr,yn,ln,rn,Sn,Nn;if((pe=(ra=Object.values(Qe))==null?void 0:ra[0])!=null&&pe.includes(".doc")){var te=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),pa=H.headers["content-disposition"],Ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),We=Ne.exec(pa),Aa=We==null?void 0:We[1],Da=document.createElement("a"),Ze=window.URL.createObjectURL(te);v.value=[{name:Aa,blobUrl:Ze}],s.value=!0}else{let pn=(ha=(ka=(fa=(q=A.cloneDeep((U=Object.values(Qe))==null?void 0:U[0]))==null?void 0:q.split("["))==null?void 0:fa[((la=(_e=A.cloneDeep((ze=Object.values(Qe))==null?void 0:ze[0]))==null?void 0:_e.split("["))==null?void 0:la.length)-1])==null?void 0:ka.split("]"))==null?void 0:ha[0],lr=pn==null?void 0:pn.split(":"),Ml=(Oe=A.cloneDeep((Va=Object.values(Qe))==null?void 0:Va[0]))==null?void 0:Oe.substring(0,A.cloneDeep((Sa=Object.values(Qe))==null?void 0:Sa[0]).lastIndexOf("["));if(Ml!=null&&Ml.includes("[")?Ml=(Ha=A.cloneDeep(Ml))==null?void 0:Ha.slice(0,((Za=A.cloneDeep(Ml))==null?void 0:Za.length)-1):Ml===""&&(Ml=E.value),Ml=Ml.replaceAll("<","[").replaceAll(">","]"),Ml!=null&&Ml.includes("[")){let cl="";(xl=he.contentTransArrayToAll(Ml,"/"))==null||xl.forEach((sr,Rl)=>{var _r,Kl,fr,Lr,gn,Bn,bn,qn,Ln,kn,Tn;if(!(sr!=null&&sr.includes("[")))cl=cl===""?cl+sr.replaceAll("/",""):cl+"/"+sr.replaceAll("/","");else{let $n="",Qr="";(_r=A.cloneDeep(sr))!=null&&_r.includes("]")?($n=A.cloneDeep(sr).slice(1,((Kl=A.cloneDeep(sr))==null?void 0:Kl.length)-1),Qr=(bn=(Bn=(gn=(Lr=(fr=A.cloneDeep($n))==null?void 0:fr.split("["))==null?void 0:Lr[1])==null?void 0:gn.split("]"))==null?void 0:Bn[0])==null?void 0:bn.split(":")):($n=A.cloneDeep(sr).slice(1,(qn=A.cloneDeep(sr))==null?void 0:qn.length),Qr=(Ln=A.cloneDeep($n))==null?void 0:Ln.split("/"));let An="",Wn=(kn=Ue==null?void 0:Ue.find($r=>($r==null?void 0:$r.name)===(Qr==null?void 0:Qr[0])))==null?void 0:kn.compData;Wn==null||Wn.forEach($r=>{var Kn;($r==null?void 0:$r.key)==="formContent"&&((Kn=$r==null?void 0:$r.contents)==null||Kn.forEach(fn=>{(fn==null?void 0:fn.key)===(Qr==null?void 0:Qr[1])&&(An=fn==null?void 0:fn.value)}))}),((Tn=he.contentTransArrayToAll(Ml,"/"))==null?void 0:Tn.length)-1!==Rl?cl=cl===""?cl+An.replaceAll("/",""):cl+"/"+An.replaceAll("/",""):cl=cl+n.value+An.replaceAll("/","")}}),(Yl=E.value)!=null&&Yl.includes(cl)?Ml=E.value:Ml=cl}let zr=A.cloneDeep((kl=Object.keys(Qe))==null?void 0:kl[0]);if(((Fl=H==null?void 0:H.data)==null?void 0:Fl.statusCode)===200||((ja=H==null?void 0:H.data)==null?void 0:ja.code)===200){if((($l=(zl=H==null?void 0:H.data)==null?void 0:zl.data)!=null&&$l[zr]||(rl=(Ma=H==null?void 0:H.data)==null?void 0:Ma.result)!=null&&rl[zr])&&(lr==null?void 0:lr.length)===1)return await se(((ga=(sl=H==null?void 0:H.data)==null?void 0:sl.data)==null?void 0:ga[zr])||((La=(xa=H==null?void 0:H.data)==null?void 0:xa.result)==null?void 0:La[zr]),A.cloneDeep(Ml),lr,oa);if((xe=(Ra=H==null?void 0:H.data)==null?void 0:Ra.data)!=null&&xe[zr]||(Ie=(ia=H==null?void 0:H.data)==null?void 0:ia.result)!=null&&Ie[zr]){let cl=await ye(((ma=(de=H==null?void 0:H.data)==null?void 0:de.data)==null?void 0:ma[zr])||((Je=(ya=H==null?void 0:H.data)==null?void 0:ya.result)==null?void 0:Je[zr]),A.cloneDeep(Ml),lr);return cl&&(fe=[...fe,...cl]),cl}else{if(!((Xe=H==null?void 0:H.data)!=null&&Xe.data)){let cl=await he.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be);cl=cl==null?void 0:cl.map(Rl=>{var _r;return(Rl==null?void 0:Rl.name)===(lr==null?void 0:lr[0])&&(Rl.compData=(_r=Rl.compData)==null?void 0:_r.map(Kl=>{var fr;return(Kl==null?void 0:Kl.key)==="formContent"&&(Kl.contents=(fr=Kl.contents)==null?void 0:fr.map(Lr=>{var gn,Bn;return(Lr==null?void 0:Lr.key)===(lr==null?void 0:lr[1])&&(Lr.value=(Bn=(gn=H==null?void 0:H.data)==null?void 0:gn.result)==null?void 0:Bn[zr==null?void 0:zr.replaceAll(":","")]),Lr})),Kl})),Rl});let sr=[];(Ke=cl==null?void 0:cl.filter(Rl=>(Rl==null?void 0:Rl.comp)==="Form"))==null||Ke.forEach(async Rl=>{let _r={};for(let Kl in Rl)Kl!=="id"&&(_r[Kl]=Rl[Kl]);sr.push({id:Rl==null?void 0:Rl.id,value:{pageData:_r}})}),(sr==null?void 0:sr.length)>0&&await Ar.batchUpdateInsofDataApi({dataList:sr});return}if((lr==null?void 0:lr.length)===1){const cl=(Fa=(Ve=(pl=H==null?void 0:H.data)==null?void 0:pl.data)==null?void 0:Ve.path)==null?void 0:Fa.path;let sr="";(Sl=(Me=(Ia=(il=(Ea=cl==null?void 0:cl.split("("))==null?void 0:Ea[1])==null?void 0:il.split(")"))==null?void 0:Ia[0])==null?void 0:Me.split(":"))==null||Sl.forEach(Kl=>{var fr,Lr;sr=sr===""?sr+((fr=Kl==null?void 0:Kl.replaceAll("'",""))==null?void 0:fr.trim()):sr+"/"+((Lr=Kl==null?void 0:Kl.replaceAll("'",""))==null?void 0:Lr.trim())});let Rl=[(dr=(Ql=(ql=(Ul=(Il=cl==null?void 0:cl.split("<"))==null?void 0:Il[1])==null?void 0:Ul.split(">"))==null?void 0:ql[0])==null?void 0:Ql.replaceAll("'",""))==null?void 0:dr.trim()],_r;return(Fr=(pr=(Ol=H==null?void 0:H.data)==null?void 0:Ol.data)==null?void 0:pr.data)!=null&&Fr[lr==null?void 0:lr[0]]?_r=await se((Pr=(ar=(Pl=H==null?void 0:H.data)==null?void 0:Pl.data)==null?void 0:ar.data)==null?void 0:Pr[lr==null?void 0:lr[0]],sr,lr,oa):_r=await Te((jr=(Tr=H==null?void 0:H.data)==null?void 0:Tr.data)==null?void 0:jr.data,sr,Rl,Be),_r}else{const cl=(Cr=(Er=(Ir=H==null?void 0:H.data)==null?void 0:Ir.data)==null?void 0:Er.path)==null?void 0:Cr.path;let sr="";return(ln=(yn=(cr=(Nr=(mn=cl==null?void 0:cl.split("("))==null?void 0:mn[1])==null?void 0:Nr.split(")"))==null?void 0:cr[0])==null?void 0:yn.split(":"))==null||ln.forEach(_r=>{var Kl,fr;sr=sr===""?sr+((Kl=_r==null?void 0:_r.replaceAll("'",""))==null?void 0:Kl.trim()):sr+"/"+((fr=_r==null?void 0:_r.replaceAll("'",""))==null?void 0:fr.trim())}),await ye((Nn=(Sn=(rn=H==null?void 0:H.data)==null?void 0:rn.data)==null?void 0:Sn.data)==null?void 0:Nn[lr==null?void 0:lr[0]],sr,lr)}}}}});if(await Promise.all(da),(fe==null?void 0:fe.length)>0){let Qe=[];fe==null||fe.forEach(Ne=>{Qe!=null&&Qe.find(We=>{var Aa,Da,Ze,ra;return((Da=(Aa=We==null?void 0:We.value)==null?void 0:Aa.pageData)==null?void 0:Da.name)===((ra=(Ze=Ne==null?void 0:Ne.value)==null?void 0:Ze.pageData)==null?void 0:ra.name)})||Qe.push(Ne)});let te=[];Qe==null||Qe.forEach(Ne=>{var Da,Ze,ra,pe;let We=A.cloneDeep(Ne);We.value.pageData.compData=(Da=We.value.pageData.compData)==null?void 0:Da.map(U=>{var q;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(q=U.contents)==null?void 0:q.map(ze=>{var la,fa,ka,ha;let _e=(la=A.cloneDeep(fe))==null?void 0:la.find(Va=>(Va==null?void 0:Va.keyType)===(ze==null?void 0:ze.key));if(_e){let Va=(ha=(ka=(fa=_e.value.pageData.compData)==null?void 0:fa.find(Sa=>(Sa==null?void 0:Sa.key)==="formContent"))==null?void 0:ka.contents)==null?void 0:ha.find(Sa=>(Sa==null?void 0:Sa.key)===(ze==null?void 0:ze.key));ze.value=Va==null?void 0:Va.value}return ze})),U}),te.push({id:We==null?void 0:We.id,value:We==null?void 0:We.value});let Aa=[];(pe=(ra=(Ze=We==null?void 0:We.value)==null?void 0:Ze.pageData)==null?void 0:ra.compData)==null||pe.forEach(U=>{var q;(U==null?void 0:U.key)==="formContent"&&((q=U==null?void 0:U.contents)==null||q.forEach(ze=>{var _e,la,fa,ka,ha,Va;if((la=(_e=ze==null?void 0:ze.optionUrl)==null?void 0:_e.menuSelect)!=null&&la.find(Sa=>Sa==null?void 0:Sa.includes("[")))if(Aa!=null&&Aa.find(Sa=>{var Oe,Za,Ha;return((Oe=Sa==null?void 0:Sa.key)==null?void 0:Oe.join(","))===((Ha=(Za=ze==null?void 0:ze.optionUrl)==null?void 0:Za.menuSelect)==null?void 0:Ha.join(","))})){let Sa=(fa=Aa==null?void 0:Aa.find(Oe=>{var Za,Ha,xl;return((Za=Oe==null?void 0:Oe.key)==null?void 0:Za.join(","))===((xl=(Ha=ze==null?void 0:ze.optionUrl)==null?void 0:Ha.menuSelect)==null?void 0:xl.join(","))}))==null?void 0:fa.value;Sa.push({key:ze==null?void 0:ze.prop,groups:(ka=ze==null?void 0:ze.optionUrl)==null?void 0:ka.groupSelect,value:ze==null?void 0:ze.value}),Aa=Aa==null?void 0:Aa.map(Oe=>{var Za,Ha,xl;return((Za=Oe==null?void 0:Oe.key)==null?void 0:Za.join(","))===((xl=(Ha=ze==null?void 0:ze.optionUrl)==null?void 0:Ha.menuSelect)==null?void 0:xl.join(","))&&(Oe.value=Sa),Oe})}else Aa.push({key:(ha=ze==null?void 0:ze.optionUrl)==null?void 0:ha.menuSelect,value:[{key:ze==null?void 0:ze.prop,groups:(Va=ze==null?void 0:ze.optionUrl)==null?void 0:Va.groupSelect,value:ze==null?void 0:ze.value}]})}))}),(Aa==null?void 0:Aa.length)>0&&(Aa=Aa==null?void 0:Aa.map(U=>{var ze;let q="";return(ze=U==null?void 0:U.key)==null||ze.forEach(_e=>{var la;if(!(_e!=null&&_e.includes("[")))q=q===""?q+_e:q+"/"+_e;else{let fa="",ka=(la=_e==null?void 0:_e.replaceAll("[","").replaceAll("]",""))==null?void 0:la.split(":");Ue==null||Ue.forEach(ha=>{var Va;(ha==null?void 0:ha.name)===(ka==null?void 0:ka[0])&&((Va=ha==null?void 0:ha.compData)==null||Va.forEach(Sa=>{var Oe;(Sa==null?void 0:Sa.key)==="formContent"&&((Oe=Sa==null?void 0:Sa.contents)==null||Oe.forEach(Za=>{(Za==null?void 0:Za.prop)===(ka==null?void 0:ka[1])&&(fa=Za==null?void 0:Za.value)}))}))}),q=q+n.value+fa}}),U.key=q,U})),Aa==null||Aa.forEach(U=>{var la,fa,ka;let q=(la=Be[U.key])==null?void 0:la.find(ha=>{var Va,Sa,Oe,Za,Ha,xl,Yl;return((Sa=(Va=ha==null?void 0:ha.value)==null?void 0:Va.pageData)==null?void 0:Sa.name)===((Ha=(Za=(Oe=U==null?void 0:U.value)==null?void 0:Oe[0])==null?void 0:Za.groups)==null?void 0:Ha[0])&&((Yl=(xl=ha==null?void 0:ha.value)==null?void 0:xl.pageData)==null?void 0:Yl.name)!==void 0}),ze=q==null?void 0:q.id,_e=(fa=q==null?void 0:q.value)==null?void 0:fa.pageData;_e.compData=(ka=_e.compData)==null?void 0:ka.map(ha=>{var Va;return(ha==null?void 0:ha.key)==="formContent"&&(ha.contents=(Va=ha.contents)==null?void 0:Va.map(Sa=>{var Za;let Oe=(Za=U.value)==null?void 0:Za.find(Ha=>(Ha==null?void 0:Ha.key)===(Sa==null?void 0:Sa.prop));return Oe&&(Sa.value=Oe.value),Sa})),ha}),te.push({id:ze,value:{pageData:_e}})})});let pa=(ie=A.cloneDeep(fe))==null?void 0:ie[0];(te==null?void 0:te.length)>0&&await Ar.batchUpdateInsofDataApi({dataList:te})}m.setFreshContent(!0)}c.setImportLoading(!1)}catch{qa.ElMessage.error("方法执行错误,请查看方法!"),c.setImportLoading(!1)}g.value=!0},ue=["createInsofDataApi"],Ce=Bl.debounce(async ve=>{ee(ve)},100),Pe=async ve=>{var Fe,aa,Na;const B=A.cloneDeep(ve);let ce,W=new WeakMap;ve!=null&&ve[0].path&&(ce=await(B==null?void 0:B.map(async(ae,ta)=>{var Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra;const ca=(Ja=W[ae==null?void 0:ae.path])==null?void 0:Ja.filter(pe=>{var U;return((U=pe==null?void 0:pe.key)==null?void 0:U.type)==="data"});let Ee="";const ie=await he.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);ca==null||ca.forEach(pe=>{var U,q,ze,_e,la;((q=(U=pe==null?void 0:pe.value)==null?void 0:U.tableData)==null?void 0:q.算法名称)===((ze=B==null?void 0:B[ta])==null?void 0:ze.method)&&(Ee=(la=(_e=pe==null?void 0:pe.value)==null?void 0:_e.tableData)==null?void 0:la.算法体)});const Be=await he.getItemData(ae==null?void 0:ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);let Ue="",oa=(me=(Z=(H=(L=Be==null?void 0:Be[0])==null?void 0:L.compData)==null?void 0:H.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Z.contents)==null?void 0:me.findIndex(pe=>(pe==null?void 0:pe.prop)==="算法体");return(da=(fe=Be==null?void 0:Be[0])==null?void 0:fe.compData)==null||da.forEach(pe=>{var U;(pe==null?void 0:pe.key)==="tableContents"&&((U=pe==null?void 0:pe.contents)==null||U.forEach(q=>{q!=null&&q.find(ze=>ze===(ae==null?void 0:ae.method))&&(Ue=q[oa])}))}),{buttonName:((Qe=B==null?void 0:B[ta])==null?void 0:Qe.method)||((Ne=(pa=(te=ca==null?void 0:ca[0])==null?void 0:te.value)==null?void 0:pa.tableData)==null?void 0:Ne.算法名称),api:(Ee===""?(Da=(Aa=(We=ca==null?void 0:ca[0])==null?void 0:We.value)==null?void 0:Aa.tableData)==null?void 0:Da.算法体:Ee)||Ue,content:ie==null?void 0:ie.filter(pe=>pe.comp!=="methodButton"),extraContent:(Ze=A.cloneDeep(ae.value))==null?void 0:Ze.slice(1),methodName:(ae==null?void 0:ae.path)??"",extraValues:(ra=B==null?void 0:B[ta])==null?void 0:ra.data}})));const Se=B==null?void 0:B.map(async ae=>{var Be,Ue,oa,Ja,L,H;const ta=(Be=resAll.data.result)==null?void 0:Be.filter(Z=>{var me,fe,da;return((me=Z==null?void 0:Z.key)==null?void 0:me.parentTable)===""&&((fe=Z==null?void 0:Z.key)==null?void 0:fe.type)==="method"&&((da=Z==null?void 0:Z.key)==null?void 0:da.methodName)===Z.method}),oe=ta==null?void 0:ta[0],ca=(Ue=resAll.data.result)==null?void 0:Ue.filter(Z=>{var me,fe;return((me=Z==null?void 0:Z.key)==null?void 0:me.type)==="methodData"&&((fe=Z==null?void 0:Z.key)==null?void 0:fe.tableId)===(oe==null?void 0:oe.id)}),Ee=await he.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W),ie=ca==null?void 0:ca[0];return{buttonName:(oa=oe==null?void 0:oe.key)==null?void 0:oa.methodKey,api:(L=(Ja=ie==null?void 0:ie.value)==null?void 0:Ja.tableData)==null?void 0:L[0],content:Ee==null?void 0:Ee.filter(Z=>Z.comp!=="methodButton"),extraContent:(H=A.cloneDeep(ae.value))==null?void 0:H.slice(1),methodName:(ae==null?void 0:ae.method)??""}}),Le=(Fe=ve==null?void 0:ve[0])!=null&&Fe.path&&((aa=ve==null?void 0:ve[0])==null?void 0:aa.path)!==""?await Promise.all(ce):await Promise.all(Se);l.value=Le==null?void 0:Le.filter(ae=>ae==null?void 0:ae.extraContent),(Na=l.value)==null||Na.forEach(ae=>{var ta;ae.api===""&&((ta=ae.content)==null||ta.forEach(oe=>{var ca;oe.comp=="Table"&&m.setExtraContents(he.methodTableToContent(oe.compData,(ca=ae.extraContent)==null?void 0:ca[0]))}))})};return e.watch(()=>t.itemData,async()=>{_.value=="view"&&!g.value&&await Pe(A.cloneDeep(t.itemData)),g.value=!1},{immediate:!0,deep:!0}),(ve,B)=>{var ce,W,Se;return e.unref(_)!=="edit"?(e.openBlock(),e.createElementBlock("div",Q2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ce=l.value)==null?void 0:ce.filter(Le=>(Le==null?void 0:Le.buttonName)!=="保存"),Le=>{var Fe;return e.openBlock(),e.createElementBlock("div",null,[Le.api!==""?(e.openBlock(),e.createBlock(e.unref(as._sfc_main),{key:0,disabled:e.unref($)===e.unref(E)&&!((Fe=Le==null?void 0:Le.buttonName)!=null&&Fe.includes("预览")),class:"calculator-content",modelValue:Le.buttonName,onClickTrigger:aa=>e.unref(Ce)(Le),loading:k.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(G)!==""&&((Se=e.unref(E))==null?void 0:Se[((W=e.unref(E))==null?void 0:W.length)-1])!==e.unref(n)?(e.openBlock(),e.createBlock(e.unref(as._sfc_main),{key:0,class:"calculator-content",onClickTrigger:P,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:0,fileDataList:v.value,onDestroy:I},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},a4=Xl._export_sfc(e4,[["__scopeId","data-v-063aa9af"]]),l4={};function r4(a,l){return" 567 "}const n4=Xl._export_sfc(l4,[["render",r4]]),i4={class:"module content"},o4={class:"module data"},t4={class:"module layout"},s4={class:"form-content"},c4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),v=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),m=e.ref({}),k=e.ref([]),c=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:k.value},{key:"signConfig",contents:m.value}]}),D=M=>{var $;m.value=A.cloneDeep(M),n("change",($=c())==null?void 0:$.compData)},V=M=>{var $,j;if((M==null?void 0:M.buttonName)==="确认"){const E=A.cloneDeep(M==null?void 0:M.content);switch(s.value){case"create":k.value.push({...E,index:(($=k.value)==null?void 0:$.length)+1});break}n("change",(j=c())==null?void 0:j.compData),t.visible=!1}else t.visible=!1},_=(M,$)=>{var j,E;switch(M){case"create":(j=f.value)==null||j.forEach(S=>{S.value=""}),s.value="create",t.visible=!0;break;case"update":(E=f.value)==null||E.forEach(S=>{S.value=$[S==null?void 0:S.prop]}),s.value="update",t.visible=!0;break;case"delete":k.value.splice($,1),s.value="delete";break}},G=()=>{t.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,M=>{var $,j;M&&(m.value=(($=M==null?void 0:M.find(E=>E.key==="signConfig"))==null?void 0:$.contents)??{},k.value=((j=M==null?void 0:M.find(E=>E.key==="signTypeList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,$)=>{const j=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",i4,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=S=>_("create"))},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",o4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(S,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>_("update",{...S,index:w+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>_("delete",w)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",t4,[e.createVNode(ll.ssForm,{rowContents:p.value,onChange:D},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:t.visible,title:t.title,onBeforeDestroy:G,width:t.width},{default:e.withCtx(()=>[e.createElementVNode("div",s4,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:v.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),u4=Xl._export_sfc(c4,[["__scopeId","data-v-487e0536"]]),d4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(0),s=e.computed(()=>{var c,D;return(c=r==null?void 0:r.stepConfig)!=null&&c.allowTrigger?t.value:(D=r==null?void 0:r.stepConfig)==null?void 0:D.active}),v=(c,D)=>{t.value=D-1,n("clickStep",c,D)};e.onMounted(()=>{var c;n("clickStep",(c=r==null?void 0:r.stepList)==null?void 0:c[0],0)});const p=c=>ll.getComponent(c),f=()=>{var D;const c=(D=r==null?void 0:r.stepList)==null?void 0:D.find((V,_)=>_+1===s.value);return console.log("findStep",c),c?c==null?void 0:c.children:[]},m=c=>{n("clickTrigger",c)},k=c=>{n("changeTrigger",c)};return(c,D)=>{var G,M,$,j,E;const V=e.resolveComponent("el-step"),_=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(_,{direction:(G=a.stepConfig)==null?void 0:G.direction,active:s.value,"finish-status":"success",simple:(M=a.stepConfig)==null?void 0:M.simple,"align-center":(($=a.stepConfig)==null?void 0:$.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(S,w)=>(e.openBlock(),e.createBlock(V,{key:w,class:"step-item",onClick:b=>v(S,w+1)},{title:e.withCtx(()=>[e.renderSlot(c.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(c.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(j=a.stepConfig)!=null&&j.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(S,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":b=>S.value=b,onClickTrigger:m,onChangeTrigger:k,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(c.$slots,(b,g)=>({name:g,fn:e.withCtx(P=>[e.renderSlot(c.$slots,g,e.mergeProps({ref_for:!0},P||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),p4=Xl._export_sfc(d4,[["__scopeId","data-v-fdbd6832"]]),f4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const r=a,n=l,t=e.ref({}),s=e.ref([]),v=(p,f)=>{n("clickStep",p,f)};return e.watch(()=>r==null?void 0:r.itemData,p=>{var c,D,V,_;t.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let f=((c=p==null?void 0:p.find(G=>(G==null?void 0:G.key)==="stepName"))==null?void 0:c.contents)??[],m=[];(V=(D=p==null?void 0:p.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:D.contents)==null||V.forEach(G=>{m.push({label:G==null?void 0:G.label,prop:G==null?void 0:G.prop,name:G==null?void 0:G.prop,type:"text",disabled:!0})});let k=((_=p==null?void 0:p.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:_.contents)??[];f=f==null?void 0:f.map((G,M)=>{let $=m==null?void 0:m.map(j=>{var E;return{...j,value:(E=k==null?void 0:k[M])==null?void 0:E[j==null?void 0:j.prop]}});return{title:G,description:$}}),s.value=f},{immediate:!0,deep:!0}),(p,f)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(p4,{stepConfig:t.value,stepList:s.value,onClickStep:v},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:k})=>[e.createTextVNode(e.toDisplayString(k),1)]),description:e.withCtx(({descriptions:k})=>[e.createVNode(ll.ssForm,{ref:"formRef",rowContents:k,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),h4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,r)=>{const n=e.resolveComponent("el-timeline-item"),t=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(t,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,v)=>(e.openBlock(),e.createBlock(n,{key:v,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),v4=Xl._export_sfc(h4,[["__scopeId","data-v-4172a886"]]),m4={class:"line-content"},y4={class:"line-time"},g4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref({}),n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,t=>{var s,v;n.value=(s=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="timeLineList"))==null?void 0:s.contents,r.value=(v=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="timeLineConfig"))==null?void 0:v.contents},{immediate:!0}),(t,s)=>(e.openBlock(),e.createBlock(v4,{activities:n.value,timeLineConfig:r.value},{content:e.withCtx(({content:v,timestamp:p})=>[e.createElementVNode("span",m4,e.toDisplayString(v),1),e.createElementVNode("span",y4,e.toDisplayString(p),1)]),_:1},8,["activities","timeLineConfig"]))}}),b4=Xl._export_sfc(g4,[["__scopeId","data-v-b4d9deed"]]),k4={class:"tabs-content"},x4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(a,{emit:l}){const r=a,n=l,t=e.ref();e.watch(()=>r==null?void 0:r.itemData,()=>{t.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const s=D=>{n("change",D)},v=(D,V)=>{n("contentChange",D,V)},p=D=>{n("pageChange",D)},f=D=>{n("rowClick",D)},m=(D,V)=>{n("routeUrl",D,V)},k=D=>{n("clickTrigger",D)},c=(D,V)=>{n("clickMainKey",D,V)};return(D,V)=>{var _,G;return e.openBlock(),e.createElementBlock("div",k4,[(_=t.value)!=null&&_.length?(e.openBlock(),e.createBlock(ll.ssTab,{tabsContents:t.value,key:(G=t.value)==null?void 0:G.length},{pane:e.withCtx(({tab:M,index:$})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)(M==null?void 0:M.comp)),{related:M==null?void 0:M.relatedTables,compNames:r==null?void 0:r.compNames,compName:M==null?void 0:M.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:a.isDevMode,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:s,index:(M==null?void 0:M.id)??$,config:{showIndex:M==null?void 0:M.showIndex,allowMove:M==null?void 0:M.allowMove,viewport:M==null?void 0:M.viewport,status:M==null?void 0:M.status},onContentChange:v,onPageChange:p,onRowClick:f,onRouteUrl:m,parentTableId:M==null?void 0:M.tableId,allMapContents:a.allMapContents,children:M==null?void 0:M.children,level:1,onClickTrigger:k,onClickMainKey:c},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),w4=Xl._export_sfc(x4,[["__scopeId","data-v-1ea318b4"]]),_4={class:"type-select"},S4=["onClick"],E4={class:"list-icon"},C4={__name:"modelSelect",setup(a){const l=Un(A.pinia),{itemData:r}=A.storeToRefs(l),n=t=>{const s=A.cloneDeep(r.value);s.push({comp:t.comp,name:t.name,compData:[]}),l.setItemData(s)};return(t,s)=>{const v=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ru),(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:m=>n(p)},[e.createElementVNode("div",E4,[e.createVNode(v,{name:p.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(p.name),1)],8,S4)]))),128))])}}},D4=Xl._export_sfc(C4,[["__scopeId","data-v-91799bf8"]]),N4={class:"fill-content"},B4={class:"operate-content"},T4={class:"collapse-title-content"},A4={class:"collapse-title-item"},z4={key:1},M4=["onClick"],I4={class:"icon-content"},O4={key:0,class:"edit-content"},L4=["onClick"],$4={class:"comp-child"},R4={__name:"modelFill",setup(a){const l=Un(A.pinia),{itemData:r,originalData:n}=A.storeToRefs(l),t=e.ref([]);e.ref([]);const s=e.ref([]),v=e.ref([]),p=V=>{var G;let _=(G=A.cloneDeep(v.value))==null?void 0:G.map((M,$)=>(V===$&&(M.content=!0),M));v.value=_},f=V=>{var G;let _=(G=A.cloneDeep(v.value))==null?void 0:G.map((M,$)=>(V===$&&(M.content=!1),M));v.value=_,t.value=A.cloneDeep(r.value)},m=(V,_)=>{var j;let G=(j=A.cloneDeep(v.value))==null?void 0:j.map((E,S)=>(V===S&&(E.content=!1),E));v.value=G;const M=A.cloneDeep(r.value),$=M==null?void 0:M.filter((E,S)=>(S===V&&(E.name=_),E));l.setOriginalData($),l.setItemData($)};e.watch(()=>r.value,()=>{var V,_,G;!r.value||((V=r.value)==null?void 0:V.length)===0?t.value=[]:t.value=(_=A.cloneDeep(r.value))==null?void 0:_.filter(M=>(M==null?void 0:M.comp)!=="methodButton"),s.value=t.value,v.value=(G=A.cloneDeep(s.value))==null?void 0:G.map((M,$)=>({id:$,content:!1}))},{deep:!0,immediate:!0});const k=V=>Ni(V),c=(V,_,G)=>{var $,j;if(!V)return;let M=A.cloneDeep(r.value);M=($=M==null?void 0:M.map((E,S)=>(S===G&&(E.compData=V),E)))==null?void 0:$.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),v.value=(j=A.cloneDeep(M))==null?void 0:j.map((E,S)=>({id:S,content:!1})),l.setOriginalData(M),l.setItemData(M)},D=V=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=A.cloneDeep(r.value),G=_==null?void 0:_.filter((M,$)=>$!==V);l.setOriginalData(G),l.setItemData(G),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(V,_)=>{const G=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",N4,[_[1]||(_[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",B4,[e.createVNode(Ys.default,{class:"collapse-content",collapseContents:t.value},{title:e.withCtx(({item:M,index:$})=>{var j,E,S,w,b,g,P,I,Y,le;return[e.createElementVNode("div",T4,[e.createElementVNode("div",A4,[(E=(j=v.value)==null?void 0:j.find(ye=>ye.id===$))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:M.name&&M.name!==""?"8px":"0px"})},e.toDisplayString(M.name),5)),(w=(S=v.value)==null?void 0:S.find(ye=>ye.id===$))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",z4,[e.createVNode(ll.ssInput,{modelValue:M.name,"onUpdate:modelValue":ye=>M.name=ye,onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(g=(b=v.value)==null?void 0:b.find(ye=>ye.id===$))!=null&&g.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ye=>p($),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Edit",style:{width:"16px",height:"16px"}})],8,M4))]),e.createElementVNode("div",I4,[(I=(P=v.value)==null?void 0:P.find(ye=>ye.id===$))!=null&&I.content?(e.openBlock(),e.createElementBlock("div",O4,[e.createVNode(G,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ye=>f($),["stop"])},null,8,["onClick"]),e.createVNode(G,{name:"Save",onClick:e.withModifiers(ye=>m($,M.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(le=(Y=v.value)==null?void 0:Y.find(ye=>ye.id===$))!=null&&le.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ye=>D($),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Delete",style:{width:"16px",height:"16px"}})],8,L4))])])]}),content:e.withCtx(({item:M,index:$})=>{var j,E;return[e.createElementVNode("div",$4,[e.createTextVNode(e.toDisplayString(k(M.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k(M.comp+"Operate")),{itemContents:M==null?void 0:M.compData,originalItemContents:(E=(j=s.value)==null?void 0:j.find((S,w)=>w===$))==null?void 0:E.compData,onChange:S=>c(S,M,$)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},V4=Xl._export_sfc(R4,[["__scopeId","data-v-a46a44b9"]]),F4={key:0,class:"show-content"},P4={style:{display:"flex"}},j4={__name:"modelShow",setup(a){const l=Un(A.pinia),{itemData:r}=A.storeToRefs(l),n=e.ref([]);e.watch(()=>r.value,()=>{var s;!r.value||((s=r.value)==null?void 0:s.length)===0?n.value=[]:n.value=A.cloneDeep(r.value)},{deep:!0,immediate:!0});const t=s=>Ni(s);return(s,v)=>{var p;return((p=n.value)==null?void 0:p.length)>0?(e.openBlock(),e.createElementBlock("div",F4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",P4,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},H4=Xl._export_sfc(j4,[["__scopeId","data-v-3f3e863e"]]),U4={class:"tabs-header"},q4={class:"tabs-list"},W4={class:"tab-name"},K4={class:"tab-actions"},G4=["onClick"],Y4=["onClick"],J4=["onClick"],X4={class:"model-operate"},Z4={class:"model-select",style:{display:"unset"}},Q4={class:"existing-components"},e6={class:"component-list"},a6=["onClick"],l6={class:"component-info"},r6={class:"component-type"},n6={class:"component-name"},i6={class:"model-fill"},o6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]),s=e.ref(!1),v=e.ref(""),p=e.ref({title:""}),f=e.ref(-1),m=e.ref(!1),k=e.ref(-1),c=e.ref(new WeakMap),D=e.ref(null),V=Un(A.pinia),{itemData:_}=A.storeToRefs(V),G=()=>{v.value="新增标签页",p.value.title="",f.value=-1,s.value=!0},M=ve=>{v.value="修改标签页",p.value.title=t.value[ve].title,f.value=ve,s.value=!0},$=ve=>{const B=S(ve);c.value.delete(B),t.value.splice(ve,1),Pe()},j=()=>{if(p.value.title.trim()){if(f.value===-1){const ve={title:p.value.title,value:p.value.title,label:p.value.title,children:[],id:E()};t.value.push(ve)}else t.value[f.value].title=p.value.title,t.value[f.value].value=p.value.title,t.value[f.value].label=p.value.title;s.value=!1,Pe()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ve=>{const B=t.value[ve];return B.id||(B.id=E()),B.id},w=ve=>{var W;k.value=ve;const B=S(ve);D.value=A.cloneDeep(_.value);let ce=c.value.get(B);!ce&&((W=t.value[ve].children)==null?void 0:W.length)>0&&(ce=I(t.value[ve].children)),ce?V.setItemData(A.cloneDeep(ce)):V.setItemData([]),m.value=!0},b=e.computed(()=>{const ve=A.useModelComp(A.pinia),B=A.storeToRefs(ve).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(ce=>{var W;if(ce.comp==="Tabs"&&k.value>=0){const Se=S(k.value);if((W=ce.compData)==null?void 0:W.some(Fe=>{var aa;return Fe.key==="stepList"&&((aa=Fe.contents)==null?void 0:aa.some(Na=>Na.id===Se))}))return!1}return!0})}),g=ve=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ve]||ve,P=ve=>{var B;try{const ce=A.cloneDeep(ve);ce.id=Date.now()+Math.random(),ce.comp==="Tabs"&&((B=ce.compData)==null||B.forEach(Se=>{Se.key==="stepList"&&Se.contents&&Se.contents.forEach(Le=>{Le.id=E()})}));const W=A.cloneDeep(_.value);W.push(ce),V.setItemData(W)}catch(ce){console.error("添加组件失败:",ce)}},I=ve=>ve.map(B=>{var ce;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:Y(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:le(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((ce=B.content)==null?void 0:ce.originalData)||[]}}}),Y=ve=>{if(!ve)return[];const B=[];return ve.rowContents&&B.push({key:"formContent",contents:ve.rowContents}),ve.buttonValue&&B.push({key:"formButton",contents:ve.buttonValue}),typeof ve.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ve.isEnableWrap}),B},le=ve=>[],ye=()=>{if(k.value>=0&&k.value<t.value.length){const ve=S(k.value);c.value.set(ve,A.cloneDeep(_.value)),t.value[k.value].children=se(_.value),console.log("保存后的数据",se(_.value))}m.value=!1,k.value=-1,D.value=null,Pe()},Te=()=>{D.value&&V.setItemData(A.cloneDeep(D.value)),m.value=!1,k.value=-1,D.value=null},R=()=>{m.value&&Te()},se=ve=>{if(!Array.isArray(ve))throw new Error("sourceData must be an array");return ve.map((B,ce)=>{if(!B||typeof B!="object")return B;const{comp:W,name:Se,compData:Le}=B;switch(W){case"Form":return{type:"form",content:ee(Le||[]),value:"表单"};case"Table":return{type:"table",content:ue(Le||[]),value:"表格"};default:return{type:"xxx",content:Ce(Le||[]),value:""}}})},ee=ve=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ce={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ve.forEach((W,Se)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${Se}:`,W);return}const{key:Le,contents:Fe}=W,aa=ce[Le];if(!aa){console.warn(`Unknown Form config key: ${Le}`);return}Le==="enableWrap"?B[aa]=!!Fe:B[aa]=Array.isArray(Fe)?Fe:[]}),B},ue=ve=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ce={header:"columns",tableContents:"tableData"};return ve.forEach((W,Se)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${Se}:`,W);return}const{key:Le,contents:Fe}=W,aa=ce[Le];if(!aa){console.warn(`Unknown Table config key: ${Le}`);return}B[aa]=Array.isArray(Fe)?Fe:[]}),B},Ce=ve=>(console.log("Default conversion logic - to be implemented"),{originalData:ve,processed:!1,componentType:"unknown"}),Pe=()=>{const ve=[{key:"stepList",contents:t.value}];n("change",ve)};return e.watch(()=>r.itemContents,ve=>{if(ve&&ve.length>0){const B=ve.find(ce=>ce.key==="stepList");B&&B.contents&&(t.value=B.contents.map(ce=>({title:ce.title||"",value:ce.value||ce.title||"",label:ce.label||ce.title||"",children:ce.children||[],id:ce.id||E()})))}},{immediate:!0,deep:!0}),(ve,B)=>{const ce=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-input"),Se=e.resolveComponent("el-form-item"),Le=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",U4,[B[6]||(B[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:G},[e.createVNode(ce,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(Fe,aa)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:aa},[e.createElementVNode("span",W4,e.toDisplayString(Fe.title),1),e.createElementVNode("div",K4,[e.createElementVNode("button",{onClick:Na=>M(aa)},"修改标题",8,G4),e.createElementVNode("button",{onClick:Na=>w(aa)},"布局调整",8,Y4),e.createElementVNode("button",{onClick:Na=>$(aa)},"删除",8,J4)])]))),128))]),e.createVNode(wr.ssDialog,{modelValue:s.value,"onUpdate:modelValue":B[2]||(B[2]=Fe=>s.value=Fe),title:v.value,onBeforeDestroy:B[3]||(B[3]=Fe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:B[1]||(B[1]=Fe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:j},"确定")]),default:e.withCtx(()=>[e.createVNode(Le,{model:p.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Se,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:p.value.title,"onUpdate:modelValue":B[0]||(B[0]=Fe=>p.value.title=Fe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(wr.ssDialog,{modelValue:m.value,"onUpdate:modelValue":B[4]||(B[4]=Fe=>m.value=Fe),title:"布局调整",fullScreen:"",onBeforeDestroy:R},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Te},"取消"),e.createElementVNode("button",{onClick:ye},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",X4,[e.createElementVNode("div",Z4,[e.createVNode(D4),e.createElementVNode("div",Q4,[B[8]||(B[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",e6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,Fe=>(e.openBlock(),e.createElementBlock("div",{key:Fe.id,class:"component-item",onClick:aa=>P(Fe)},[e.createElementVNode("div",l6,[e.createElementVNode("span",r6,e.toDisplayString(g(Fe.comp)),1),e.createElementVNode("span",n6,e.toDisplayString(Fe.name),1)]),B[7]||(B[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,a6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ve.innerWidth},[e.createVNode(H4)])),e.createElementVNode("div",i6,[e.createVNode(V4)])])]),_:1},8,["modelValue"])])}}},t6=Xl._export_sfc(o6,[["__scopeId","data-v-9096ed0d"]]);function s6(){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 c6(a){return{type:"line",...a}}function u6(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function d6(a){return{type:"bar",barWidth:"60%",...a}}function p6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function f6(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const On={line:{initBaseoptions:s6,initSeries:c6},bar:{initBaseoptions:u6,initSeries:d6},pie:{initBaseoptions:p6,initSeries:f6}},xs=A.useMenuState(A.pinia),Lc=(a,l)=>{var k;const r=[],n=[],{group:t,nameCol:s,valueCol:v}=l||{},p=a==null?void 0:a.find(c=>{const{name:D}=c;return D===t});if(!p)return{names:r,values:n};const f=(k=p==null?void 0:p.compData)==null?void 0:k.find(c=>{const{key:D}=c;return D==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(c=>{const D=c==null?void 0:c[0];let V=!1;qa.isObject(D)&&(D!=null&&D.id)&&(V=!0);let _=s,G=v;V&&(_=_+1,G=G+1);const M=c==null?void 0:c[_],$=c==null?void 0:c[G];r.push(M),n.push($)}),{names:r,values:n}},h6=async a=>{const{menu:l,mainKey:r,detailGroup:n,detailNameCol:t,detailValueCol:s,isSelfDetail:v}=a||{};let p=null;const f=sessionStorage.getItem("systemKey");if(v&&xs.activeMenuPath&&(p=await he.getItemData(`${xs.activeMenuPath}`,f,"")),!v){const m=l==null?void 0:l.join("/");p=await he.getItemData(`${m}^${r}`,f,"")}return Lc(p,{group:n,nameCol:t,valueCol:s})},v6=async a=>{const{menu:l,group:r,nameCol:n,valueCol:t}=a||{},s=l==null?void 0:l.join("/"),v=sessionStorage.getItem("systemKey"),p=await he.getItemData(s,v,"");return Lc(p,{group:r,nameCol:n,valueCol:t})},Nt=async(a,l)=>{const r={names:[],values:[]},{menu:n,group:t,nameCol:s,valueCol:v}=a||{};if(!n.length||!t)return r;const{mainKey:p,group:f,nameCol:m,valueCol:k,isSelfDetail:c}=l||{};return p&&f&&ll.isNumber(m)&&ll.isNumber(k)?await h6({menu:n,mainKey:p,detailGroup:f,detailNameCol:m,detailValueCol:k,isSelfDetail:c}):ll.isNumber(s)&&ll.isNumber(v)?await v6({menu:n,group:t,nameCol:s,valueCol:v}):r},m6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=On==null?void 0:On[n];if(!s)return;const{initBaseoptions:v,initSeries:p}=s,f=v();f.title.text=t??"";const{names:m,values:k}=await Nt(l,r);if(!m||!k)return f;f.xAxis.data=m;const c=p({data:k});return f.series.push(c),f},y6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=On==null?void 0:On[n];if(!s)return;const{initBaseoptions:v,initSeries:p}=s,f=v();f.title.text=t??"";const{names:m,values:k}=await Nt(l,r);if(!m||!k)return f;f.xAxis.data=m;const c=p({data:k});return f.series.push(c),f},g6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=On==null?void 0:On[n];if(!s)return;const{initBaseoptions:v,initSeries:p}=s,f=v();f.title.text=t??"";const{names:m,values:k}=await Nt(l,r);if(!m||!k)return f;const c=[];for(let V=0;V<m.length;V++){const _=m[V],G=k[V];c.push({name:_,value:G})}const D=p({data:c});return f.series.push(D),f},b6=async(a=[])=>{var v,p,f;const l=((v=a==null?void 0:a.find(m=>m.key==="chartBaseConfig"))==null?void 0:v.contents)??{},r=((p=a==null?void 0:a.find(m=>m.key==="chartDataConfig"))==null?void 0:p.contents)??{},n=((f=a==null?void 0:a.find(m=>m.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:t}=l;let s={};return t==="line"&&(s=await m6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),t==="bar"&&(s=await y6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),t==="pie"&&(s=await g6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),s},k6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,r=e.ref({});e.onMounted(async()=>{const t=l==null?void 0:l.itemData;r.value=await b6(t)});const n=e.computed(()=>(l==null?void 0:l.height)||"300px");return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:n.value})},[e.createVNode(zu.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),x6=Xl._export_sfc(k6,[["__scopeId","data-v-d4c081e8"]]),w6={class:"chart-module layout"},_6={class:"chart-module content"},S6={class:"chart-module content"},E6={class:"form-content"},C6={class:"dialog-footer"},D6={class:"form-content"},N6={class:"dialog-footer"},B6={class:"form-content"},T6={class:"dialog-footer"},A6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),v=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],p=e.ref({}),f=()=>{var Ee;s.value=v(),(Ee=s.value)==null||Ee.forEach(ie=>{var Ue;const Be=ie==null?void 0:ie.prop;ie.value=(Ue=p==null?void 0:p.value)==null?void 0:Ue[Be]}),t.visible=!0},m=Ee=>{p.value=Ee},k=()=>{var Ee;t.visible=!1,n("change",(Ee=oe())==null?void 0:Ee.compData)},c=e.reactive({visible:!1,width:"840",title:"数据配置"}),D=e.ref([]),V=()=>[{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({}),G=()=>{const Ee=D.value,ie=A.cloneDeep(Ee);return ie==null||ie.forEach(Be=>{var oa;const Ue=Be==null?void 0:Be.prop;Be.value=(oa=_.value)==null?void 0:oa[Ue]}),ie},M=Ee=>{var Be;_.value=Ee;const ie=G();D.value=ie,n("change",(Be=oe())==null?void 0:Be.compData)},$=async()=>{const Ee=await he.getMenusContent(),ie=G();ie==null||ie.forEach(Be=>{(Be==null?void 0:Be.prop)==="menu"&&(Be.contents=Ee)}),D.value=ie,c.visible=!0,await Fe(_.value.menu),await ae(_.value.group)},j=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:[]}],w=e.ref({}),b=()=>{const Ee=E.value,ie=A.cloneDeep(Ee);return ie==null||ie.forEach(Be=>{var oa;const Ue=Be==null?void 0:Be.prop;Be.value=(oa=w.value)==null?void 0:oa[Ue]}),ie},g=Ee=>{var Be;w.value=Ee;const ie=b();E.value=ie,n("change",(Be=oe())==null?void 0:Be.compData)},P=async()=>{await R();const Ee=A.cloneDeep(I.value),ie=b();ie==null||ie.forEach(Be=>{var oa;const Ue=Be==null?void 0:Be.prop;Be.value=(oa=w==null?void 0:w.value)==null?void 0:oa[Ue],Ue==="mainKey"&&(Be.contents=Ee)}),E.value=ie,j.visible=!0},I=e.ref([]),Y=e.ref([]),le=e.ref({}),ye=e.ref({}),Te=()=>{const{compData:Ee}=W.value||{},ie=Ee==null?void 0:Ee.find(Z=>{const{key:me}=Z;return me==="header"}),Be=(ie==null?void 0:ie.contents)||[],Ue=Be==null?void 0:Be.filter((Z,me)=>{const{label:fe}=Z;return fe!=="操作"}),oa=Ue==null?void 0:Ue.findIndex((Z,me)=>{const{isMainKey:fe}=Z;return fe});if(oa<0)return[];const Ja=Ee==null?void 0:Ee.find(Z=>{const{key:me}=Z;return me==="tableContents"}),L=(Ja==null?void 0:Ja.contents)||[];return L==null?void 0:L.map(Z=>{const me=Z==null?void 0:Z[0];let fe=oa;qa.isObject(me)&&(me!=null&&me.id)&&(fe=fe+1);const da=Z==null?void 0:Z[fe];return{label:da,value:da}})},R=async()=>{const Ee=await Te();I.value=Ee},se=async Ee=>{const ie=sessionStorage.getItem("systemKey");return await he.getItemData(Ee,ie,"")},ee=async Ee=>{const ie=Ee;Y.value=ie==null?void 0:ie.map(Be=>{const{name:Ue}=Be;return le.value[Ue]=Be,{label:Ue,value:Ue}})},ue=Ee=>{const{comp:ie,compData:Be}=ye.value||{};if(ie==="Table"){let Ue=b();Ue=Ue.filter(oa=>{const{prop:Ja}=oa;return Ja!=="formItems"}),aa(Ue,Be),E.value=Ue}},Ce=async()=>{var Be,Ue;const Ee=(Be=w==null?void 0:w.value)==null?void 0:Be.mainKey,ie=(Ue=_==null?void 0:_.value)==null?void 0:Ue.menu;if(Ee){const Ja=`${ie==null?void 0:ie.join("/")}^${Ee}`,L=await se(Ja);await ee(L);const H=b();H==null||H.forEach(Z=>{(Z==null?void 0:Z.prop)==="group"&&(Z.contents=Y.value)}),E.value=H}};e.watch(()=>{var Ee;return(Ee=w==null?void 0:w.value)==null?void 0:Ee.mainKey},async(Ee,ie)=>{Ee!=ie&&Ee&&await Ce()});const Pe=async Ee=>{const ie=le.value[Ee];ye.value=ie,await ue()};e.watch(()=>{var Ee;return(Ee=w==null?void 0:w.value)==null?void 0:Ee.group},async(Ee,ie)=>{Ee!=ie&&Ee&&Pe(Ee)});const ve=async()=>{var ie;await Ce();const Ee=(ie=w.value)==null?void 0:ie.group;await Pe(Ee)},B=e.ref([]),ce=e.ref({}),W=e.ref({}),Se=async Ee=>{const ie=Ee==null?void 0:Ee.join("/"),Be=sessionStorage.getItem("systemKey");return await he.getItemData(ie,Be,"")},Le=async Ee=>{const ie=await Se(Ee);B.value=ie==null?void 0:ie.map(Be=>{const{name:Ue}=Be;return ce.value[Ue]=Be,{label:Ue,value:Ue}})},Fe=async(Ee,ie)=>{await Le(Ee);const Be=G();Be==null||Be.forEach(Ue=>{(Ue==null?void 0:Ue.prop)==="group"&&(Ue.contents=B.value)}),D.value=Be};e.watch(()=>{var Ee;return(Ee=_==null?void 0:_.value)==null?void 0:Ee.menu},async(Ee,ie)=>{const Be=Ee==null?void 0:Ee.join("/"),Ue=ie==null?void 0:ie.join("/");Be!=Ue&&await Fe(Ee)});const aa=(Ee,ie)=>{const Be=ie==null?void 0:ie.find(L=>{const{key:H}=L;return H==="header"}),Ue=(Be==null?void 0:Be.contents)||[],oa=Ue==null?void 0:Ue.filter((L,H)=>{const{label:Z}=L;return Z!=="操作"}),Ja=oa==null?void 0:oa.map((L,H)=>{const{label:Z}=L;return{label:Z,value:H}});Ee==null||Ee.forEach(L=>{const H=L==null?void 0:L.prop;(H==="nameCol"||H==="valueCol")&&(L.contents=Ja)})},Na=Ee=>{const{comp:ie,compData:Be}=W.value||{};if(ie==="Table"){_.value.formItems=[];let Ue=G();Ue=Ue.filter(oa=>{const{prop:Ja}=oa;return Ja!=="formItems"}),aa(Ue,Be),D.value=Ue}},ae=async Ee=>{const ie=ce.value[Ee];W.value=ie,await Na()};e.watch(()=>{var Ee;return(Ee=_==null?void 0:_.value)==null?void 0:Ee.group},async(Ee,ie)=>{Ee!=ie&&ae(Ee)});const ta=async()=>{var Be,Ue;const Ee=(Be=_.value)==null?void 0:Be.menu;await Fe(Ee);const ie=(Ue=_.value)==null?void 0:Ue.group;await ae(ie)},oe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:p.value},{key:"chartDataConfig",contents:_.value},{key:"chartDetailConfig",contents:w.value}]}),ca=()=>{t.visible=!1,c.visible=!1,j.visible=!1};return e.onMounted(async()=>{var ie,Be,Ue;D.value=V(),E.value=S();const Ee=r==null?void 0:r.itemContents;p.value=((ie=Ee==null?void 0:Ee.find(oa=>oa.key==="chartBaseConfig"))==null?void 0:ie.contents)??{},_.value=((Be=Ee==null?void 0:Ee.find(oa=>oa.key==="chartDataConfig"))==null?void 0:Be.contents)??{},await ta(),w.value=((Ue=Ee==null?void 0:Ee.find(oa=>oa.key==="chartDetailConfig"))==null?void 0:Ue.contents)??{},await ve()}),(Ee,ie)=>{const Be=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",w6,[ie[4]||(ie[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:ie[0]||(ie[0]=Ue=>f())},{default:e.withCtx(()=>ie[3]||(ie[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",_6,[ie[6]||(ie[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:ie[1]||(ie[1]=Ue=>$())},{default:e.withCtx(()=>ie[5]||(ie[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",S6,[ie[8]||(ie[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:ie[2]||(ie[2]=Ue=>P())},{default:e.withCtx(()=>ie[7]||(ie[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(wr.ssDialog,{visible:t.visible,title:t.title,onBeforeDestroy:ca,width:t.width},{default:e.withCtx(()=>[e.createElementVNode("div",E6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",C6,[e.createVNode(Be,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ie[9]||(ie[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Be,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>ie[10]||(ie[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(wr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ca,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",D6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",N6,[e.createVNode(Be,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ie[11]||(ie[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Be,{class:"ok-button button",onClick:ca,id:"themeButton"},{default:e.withCtx(()=>ie[12]||(ie[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(wr.ssDialog,{visible:j.visible,title:j.title,onBeforeDestroy:ca,width:j.width},{default:e.withCtx(()=>[e.createElementVNode("div",B6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",T6,[e.createVNode(Be,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ie[13]||(ie[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Be,{class:"ok-button button",onClick:ca,id:"themeButton"},{default:e.withCtx(()=>ie[14]||(ie[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),z6=Xl._export_sfc(A6,[["__scopeId","data-v-fe119645"]]),M6={class:"layout"},I6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const r=l,n=a;e.onMounted(async()=>{});const t=e.computed(()=>A.cloneDeep(n==null?void 0:n.itemData)||[]),s=e.computed(()=>{var k;const m=(k=t==null?void 0:t.value)==null?void 0:k.find(c=>{const{key:D}=c;return D==="baseConfig"});return m==null?void 0:m.contents}),v=e.computed(()=>{var k;const m=(k=t==null?void 0:t.value)==null?void 0:k.find(c=>{const{key:D}=c;return D==="children"});return m==null?void 0:m.contents}),p=e.computed(()=>{let m=A.cloneDeep(v.value)||[];const k=m.length;let c=0;const D=[];if(m=m.map(V=>{const _=V.span;return _?(V.span=Number(_),c=c+V.span):D.push(V),V}),c<24){const V=Math.floor((24-c)/k);D.forEach(_=>{_.span=V})}return m}),f=m=>{r("rowClick",m)};return(m,k)=>{var V;const c=e.resolveComponent("el-col"),D=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",M6,[e.createVNode(D,{style:e.normalizeStyle({height:(V=s.value)==null?void 0:V.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(_,G)=>(e.openBlock(),e.createBlock(c,{span:_==null?void 0:_.span},{default:e.withCtx(()=>{var M;return[e.unref(Di)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)(_.comp)),{key:e.unref(Hn),compName:_.name,index:(_==null?void 0:_.id)??G,height:(M=s.value)==null?void 0:M.height,itemData:_==null?void 0:_.compData,childItemData:_==null?void 0:_.itemChildData,onChange:e.unref(Bo),onContentChange:e.unref(To),onPageChange:e.unref(Ao),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),O6=Xl._export_sfc(I6,[["__scopeId","data-v-ab9a36ed"]]),L6={class:"layout-operate"},$6={class:"layout-module"},R6={class:"collapse-title-item"},V6={class:"collapse-title"},F6={class:"icon-content"},P6=["onClick"],j6={class:"comp-child"},H6=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l;e.onMounted(()=>{G()});const t=e.ref({}),s=e.ref({}),v=e.ref([]),p=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],f=w=>{s.value=w,n("change",S(),!0)},m=e.ref([]),k=e.ref([]),c=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],D=e.computed(()=>{const w=r==null?void 0:r.itemContents;return A.cloneDeep(w)}),V=e.computed(()=>{const w=D==null?void 0:D.value,b=w==null?void 0:w.find(g=>{const{key:P}=g;return P==="baseConfig"});return b==null?void 0:b.contents}),_=e.computed(()=>{const w=D==null?void 0:D.value,b=w==null?void 0:w.find(g=>{const{key:P}=g;return P==="children"});return b==null?void 0:b.contents}),G=()=>{var w;t.value=D.value||{},m.value=(_==null?void 0:_.value)||[],v.value=p(),v.value=(w=v.value)==null?void 0:w.map(b=>{var P;const{prop:g}=b;return b.value=(P=V.value)==null?void 0:P[g],b})};e.watch(()=>{var w;return(w=_==null?void 0:_.value)==null?void 0:w.length},()=>{var w;m.value=(_==null?void 0:_.value)||[],k.value=(w=_.value)==null?void 0:w.map(b=>c(b))},{immediate:!0});const M=(w,b)=>{const g=A.cloneDeep(_==null?void 0:_.value);g[b].span=w.span,m.value=g,n("change",S(),!0)},$=w=>Ni(w),j=(w,b,g)=>{if(!w)return;const P=A.cloneDeep(_==null?void 0:_.value);P[g]&&(P[g].compData=w,m.value=P,n("change",S(),!0))},E=w=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let b=A.cloneDeep(_==null?void 0:_.value);b=b==null?void 0:b.filter((g,P)=>w!==P),m.value=b,n("change",S(),!0),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,b)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",L6,[e.createElementVNode("div",$6,[b[1]||(b[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(ll.ssForm,{rowContents:v.value,isEnableWrap:!0,onChange:b[0]||(b[0]=P=>f(P))},null,8,["rowContents"])])]),e.createVNode(Ys.default,{class:"collapse-content",collapseContents:_.value},{title:e.withCtx(({item:P,index:I})=>[e.createElementVNode("div",R6,[e.createElementVNode("div",V6,e.toDisplayString(P.name),1),e.createElementVNode("div",F6,[e.createElementVNode("div",{onClick:e.withModifiers(Y=>E(I),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,P6)])])]),content:e.withCtx(({item:P,index:I})=>[e.createElementVNode("div",j6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:k.value[I],key:I,isEnableWrap:!0,onChange:Y=>M(Y,I)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(P.comp+"Operate")),{itemContents:P==null?void 0:P.compData,originalItemContents:P.compData,onChange:Y=>j(Y,P,I)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),U6=Xl._export_sfc(H6,[["__scopeId","data-v-ba05456e"]]),q6=typeof window<"u";var ws;q6&&((ws=window==null?void 0:window.navigator)!=null&&ws.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(a){return a==null}function $c(){}const W6=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(W6)));function K6(){const a=new Map;return{on(l,r){const n=a.get(l);n!=null&&n.add(r)||a.set(l,new Set([r]))},off(l,r){const n=a.get(l);n&&n.delete(r)},clear(l){const r=a.get(l);r&&r.clear()},clearAll(){a.clear()},emit(l,...r){const n=a.get(l);n&&n.forEach(t=>{t(...r)})}}}function _s(a,l=16){if(typeof a!="function")return $c;const r=(...s)=>{a(...s)};if(l<=0)return Rc(r);let n=0,t;return function(...s){const v=Date.now(),p=v-n;clearTimeout(t),p>=l?(n=v,r(...s)):t=setTimeout(()=>{n=Date.now(),r(...s)},Math.max(0,l-p))}}function G6(a,l=100){if(typeof a!="function")return $c;const r=(...t)=>{a(...t)};if(l<=0)return Rc(r);let n;return function(...t){clearTimeout(n),n=setTimeout(()=>{r(...t)},l)}}function Rc(a){if(typeof a!="function")return a;let l=!1,r,n;return function(...t){return r=t,l||(l=!0,n=Promise.resolve().then(()=>(l=!1,n=void 0,a(...r)))),n}}const ji=new Set,Vc=new WeakMap;function Y6(){ji.forEach(a=>{a(...Vc.get(a))}),ji.clear()}function Yr(a,...l){if(typeof a!="function")return a;Vc.set(a,l),!ji.has(a)&&(ji.add(a),ji.size===1&&Promise.resolve().then(Y6))}const Fc=Symbol("LAYOUT_KEY"),Pc=Symbol("EMITTER_KEY");function J6(a){let l=0,r;for(let n=0,t=a.length;n<t;n++)r=a[n].y+a[n].h,r>l&&(l=r);return l}function wt(a){const l=Array(a.length);for(let r=0,n=a.length;r<n;r++)l[r]=X6(a[r]);return l}function X6(a){return{...a}}function jc(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 wi(a,l,r){const n=Uc(a),t=qc(a),s=Array(a.length);for(let v=0,p=t.length;v<p;v++){let f=t[v];f.static||(f=Z6(n,f,l,r),n.push(f)),s[a.findIndex(m=>m.i===f.i)]=f,f.moved=!1}return s}function Z6(a,l,r,n){if(r)for(;l.y>0&&!Hi(a,l);)l.y--;else if(n){const s=n[l.i].y;for(;l.y>s&&!Hi(a,l);)l.y--}let t;for(;t=Hi(a,l);)l.y=t.y+t.h;return l}function Q6(a,l){const r=Uc(a);for(let n=0,t=a.length;n<t;n++){const s=a[n];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)r.push(s);else for(;Hi(r,s);)s.y++}return a}function Ss(a,l){for(let r=0,n=a.length;r<n;r++)if(a[r].i===l)return a[r]}function Hi(a,l){for(let r=0,n=a.length;r<n;r++)if(jc(a[r],l))return a[r]}function Hc(a,l){return a.filter(r=>jc(r,l))}function Uc(a){return a.filter(l=>l.static)}function _t(a,l,r,n,t=!1,s=!1){if(l.static)return a;const v=l.x,p=l.y,f=n&&l.y>n;typeof r=="number"&&(l.x=r),typeof n=="number"&&(l.y=n),l.moved=!0;let m=qc(a);f&&(m=m.reverse());const k=Hc(m,l);if(s&&k.length)return l.x=v,l.y=p,l.moved=!1,a;for(let c=0,D=k.length;c<D;c++){const V=k[c];V.moved||l.y>V.y&&l.y-V.y>V.h/4||(V.static?a=Es(a,V,l,t):a=Es(a,l,V,t))}return a}function Es(a,l,r,n){if(n){const t={x:r.x,y:r.y,w:r.w,h:r.h};if(t.y=Math.max(l.y-r.h,0),!Hi(a,t))return _t(a,r,void 0,t.y,!1)}return _t(a,r,void 0,r.y+1,!1)}function e1(a,l,r,n){const t="translate3d("+l+"px,"+a+"px, 0)";return{transform:t,WebkitTransform:t,MozTransform:t,msTransform:t,OTransform:t,width:r+"px",height:n+"px",position:"absolute"}}function a1(a,l,r,n){const t="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:t,WebkitTransform:t,MozTransform:t,msTransform:t,OTransform:t,width:r+"px",height:n+"px",position:"absolute"}}function l1(a,l,r,n){return{top:a+"px",left:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function r1(a,l,r,n){return{top:a+"px",right:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function qc(a){return Array.from(a).sort(function(l,r){return l.y===r.y&&l.x===r.x?0:l.y>r.y||l.y===r.y&&l.x>r.x?1:-1})}function n1(a,l){l=l||"Layout";const r=["x","y","w","h"],n=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let t=0,s=a.length;t<s;t++){const v=a[t];for(let p=0;p<r.length;p++)if(typeof v[r[p]]!="number")throw new Error("VueGridLayout: "+l+"["+t+"]."+r[p]+" must be a number!");if(v.i===void 0||v.i===null)throw new Error("VueGridLayout: "+l+"["+t+"].i cannot be null!");if(typeof v.i!="number"&&typeof v.i!="string")throw new Error("VueGridLayout: "+l+"["+t+"].i must be a string or number!");if(n.indexOf(v.i)>=0)throw new Error("VueGridLayout: "+l+"["+t+"].i must be unique!");if(n.push(v.i),v.static!==void 0&&typeof v.static!="boolean")throw new Error("VueGridLayout: "+l+"["+t+"].static must be a boolean!")}}function i1(a,l="vgl"){const r=()=>`${l}-${a}`;return{b:r,be:n=>`${r()}__${n}`,bm:n=>`${r()}--${n}`,bem:(n,t)=>`${r()}__${n}--${t}`}}function Cs(a){return o1(a)}function o1(a){var l;const r=((l=a.target)==null?void 0:l.offsetParent)||document.body,n=a.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),t=a.clientX+r.scrollLeft-n.left,s=a.clientY+r.scrollTop-n.top;return{x:t,y:s}}function Ds(a,l,r,n){return s1(a)?{deltaX:r-a,deltaY:n-l,lastX:a,lastY:l,x:r,y:n}:{deltaX:0,deltaY:0,lastX:r,lastY:n,x:r,y:n}}function s1(a){return typeof a=="number"&&!Number.isNaN(a)}function c1(a,l){const r=Kc(a);let n=r[0];for(let t=1,s=r.length;t<s;t++){const v=r[t];l>a[v]&&(n=v)}return n}function Wc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function u1(a,l,r,n,t,s,v){if(l[n])return wt(l[n]);let p=a;const f=Kc(r),m=f.slice(f.indexOf(n));for(let k=0,c=m.length;k<c;k++){const D=m[k];if(l[D]){p=l[D];break}}return p=wt(p||[]),wi(Q6(p,{cols:s}),v)}function Kc(a){return Object.keys(a).sort((l,r)=>a[l]-a[r])}let d1="auto";function p1(){return typeof document<"u"}function Ns(){return p1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):d1}var Fi={exports:{}},f1=Fi.exports,Bs;function h1(){return Bs||(Bs=1,function(a,l){(function(r,n){a.exports=n()})(f1,function(){function r(o,i){var u=Object.keys(o);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(o);i&&(y=y.filter(function(x){return Object.getOwnPropertyDescriptor(o,x).enumerable})),u.push.apply(u,y)}return u}function n(o){for(var i=1;i<arguments.length;i++){var u=arguments[i]!=null?arguments[i]:{};i%2?r(Object(u),!0).forEach(function(y){f(o,y,u[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(u)):r(Object(u)).forEach(function(y){Object.defineProperty(o,y,Object.getOwnPropertyDescriptor(u,y))})}return o}function t(o){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t(o)}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function v(o,i){for(var u=0;u<i.length;u++){var y=i[u];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(o,G(y.key),y)}}function p(o,i,u){return i&&v(o.prototype,i),Object.defineProperty(o,"prototype",{writable:!1}),o}function f(o,i,u){return(i=G(i))in o?Object.defineProperty(o,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[i]=u,o}function m(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),i&&c(o,i)}function k(o){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},k(o)}function c(o,i){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,y){return u.__proto__=y,u},c(o,i)}function D(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function V(o){var i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,y=k(o);if(i){var x=k(this).constructor;u=Reflect.construct(y,arguments,x)}else u=y.apply(this,arguments);return function(O,J){if(J&&(typeof J=="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(O)}(this,u)}}function _(){return _=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(o,i,u){var y=function(O,J){for(;!Object.prototype.hasOwnProperty.call(O,J)&&(O=k(O))!==null;);return O}(o,i);if(y){var x=Object.getOwnPropertyDescriptor(y,i);return x.get?x.get.call(arguments.length<3?o:u):x.value}},_.apply(this,arguments)}function G(o){var i=function(u,y){if(typeof u!="object"||u===null)return u;var x=u[Symbol.toPrimitive];if(x!==void 0){var O=x.call(u,y);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(u)}(o,"string");return typeof i=="symbol"?i:i+""}var M=function(o){return!(!o||!o.Window)&&o instanceof o.Window},$=void 0,j=void 0;function E(o){$=o;var i=o.document.createTextNode("");i.ownerDocument!==o.document&&typeof o.wrap=="function"&&o.wrap(i)===i&&(o=o.wrap(o)),j=o}function S(o){return M(o)?o:(o.ownerDocument||o).defaultView||j.window}typeof window<"u"&&window&&E(window);var w=function(o){return!!o&&t(o)==="object"},b=function(o){return typeof o=="function"},g={window:function(o){return o===j||M(o)},docFrag:function(o){return w(o)&&o.nodeType===11},object:w,func:b,number:function(o){return typeof o=="number"},bool:function(o){return typeof o=="boolean"},string:function(o){return typeof o=="string"},element:function(o){if(!o||t(o)!=="object")return!1;var i=S(o)||j;return/object|function/.test(typeof Element>"u"?"undefined":t(Element))?o instanceof Element||o instanceof i.Element:o.nodeType===1&&typeof o.nodeName=="string"},plainObject:function(o){return w(o)&&!!o.constructor&&/function Object\b/.test(o.constructor.toString())},array:function(o){return w(o)&&o.length!==void 0&&b(o.splice)}};function P(o){var i=o.interaction;if(i.prepared.name==="drag"){var u=i.prepared.axis;u==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):u==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function I(o){var i=o.iEvent,u=o.interaction;if(u.prepared.name==="drag"){var y=u.prepared.axis;if(y==="x"||y==="y"){var x=y==="x"?"y":"x";i.page[x]=u.coords.start.page[x],i.client[x]=u.coords.start.client[x],i.delta[x]=0}}}var Y={id:"actions/drag",install:function(o){var i=o.actions,u=o.Interactable,y=o.defaults;u.prototype.draggable=Y.draggable,i.map.drag=Y,i.methodDict.drag="draggable",y.actions.drag=Y.defaults},listeners:{"interactions:before-action-move":P,"interactions:action-resume":P,"interactions:action-move":I,"auto-start:check":function(o){var i=o.interaction,u=o.interactable,y=o.buttons,x=u.options.drag;if(x&&x.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(y&u.options.drag.mouseButtons)!=0))return o.action={name:"drag",axis:x.lockAxis==="start"?x.startAxis:x.lockAxis},!1}},draggable:function(o){return g.object(o)?(this.options.drag.enabled=o.enabled!==!1,this.setPerAction("drag",o),this.setOnEvents("drag",o),/^(xy|x|y|start)$/.test(o.lockAxis)&&(this.options.drag.lockAxis=o.lockAxis),/^(xy|x|y)$/.test(o.startAxis)&&(this.options.drag.startAxis=o.startAxis),this):g.bool(o)?(this.options.drag.enabled=o,this):this.options.drag},beforeMove:P,move:I,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(o){return o.search("drag")===0}},le=Y,ye={init:function(o){var i=o;ye.document=i.document,ye.DocumentFragment=i.DocumentFragment||Te,ye.SVGElement=i.SVGElement||Te,ye.SVGSVGElement=i.SVGSVGElement||Te,ye.SVGElementInstance=i.SVGElementInstance||Te,ye.Element=i.Element||Te,ye.HTMLElement=i.HTMLElement||ye.Element,ye.Event=i.Event,ye.Touch=i.Touch||Te,ye.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Te(){}var R=ye,se={init:function(o){var i=R.Element,u=o.navigator||{};se.supportsTouch="ontouchstart"in o||g.func(o.DocumentTouch)&&R.document instanceof o.DocumentTouch,se.supportsPointerEvent=u.pointerEnabled!==!1&&!!R.PointerEvent,se.isIOS=/iP(hone|od|ad)/.test(u.platform),se.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),se.isIe9=/MSIE 9/.test(u.userAgent),se.isOperaMobile=u.appName==="Opera"&&se.supportsTouch&&/Presto/.test(u.userAgent),se.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",se.pEventTypes=se.supportsPointerEvent?R.PointerEvent===o.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,se.wheelEvent=R.document&&"onmousewheel"in R.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=se;function ue(o,i){if(o.contains)return o.contains(i);for(;i;){if(i===o)return!0;i=i.parentNode}return!1}function Ce(o,i){for(;g.element(o);){if(ve(o,i))return o;o=Pe(o)}return null}function Pe(o){var i=o.parentNode;if(g.docFrag(i)){for(;(i=i.host)&&g.docFrag(i););return i}return i}function ve(o,i){return j!==$&&(i=i.replace(/\/deep\//g," ")),o[ee.prefixedMatchesSelector](i)}var B=function(o){return o.parentNode||o.host};function ce(o,i){for(var u,y=[],x=o;(u=B(x))&&x!==i&&u!==x.ownerDocument;)y.unshift(x),x=u;return y}function W(o,i,u){for(;g.element(o);){if(ve(o,i))return!0;if((o=Pe(o))===u)return ve(o,i)}return!1}function Se(o){return o.correspondingUseElement||o}function Le(o){var i=o instanceof R.SVGElement?o.getBoundingClientRect():o.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function Fe(o){var i,u=Le(o);if(!ee.isIOS7&&u){var y={x:(i=(i=S(o))||j).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};u.left+=y.x,u.right+=y.x,u.top+=y.y,u.bottom+=y.y}return u}function aa(o){for(var i=[];o;)i.push(o),o=Pe(o);return i}function Na(o){return!!g.string(o)&&(R.document.querySelector(o),!0)}function ae(o,i){for(var u in i)o[u]=i[u];return o}function ta(o,i,u){return o==="parent"?Pe(u):o==="self"?i.getRect(u):Ce(u,o)}function oe(o,i,u,y){var x=o;return g.string(x)?x=ta(x,i,u):g.func(x)&&(x=x.apply(void 0,y)),g.element(x)&&(x=Fe(x)),x}function ca(o){return o&&{x:"x"in o?o.x:o.left,y:"y"in o?o.y:o.top}}function Ee(o){return!o||"x"in o&&"y"in o||((o=ae({},o)).x=o.left||0,o.y=o.top||0,o.width=o.width||(o.right||0)-o.x,o.height=o.height||(o.bottom||0)-o.y),o}function ie(o,i,u){o.left&&(i.left+=u.x),o.right&&(i.right+=u.x),o.top&&(i.top+=u.y),o.bottom&&(i.bottom+=u.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Be(o,i,u){var y=u&&o.options[u];return ca(oe(y&&y.origin||o.options.origin,o,i,[o&&i]))||{x:0,y:0}}function Ue(o,i){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ge){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},g.string(o)&&o.search(" ")!==-1&&(o=oa(o)),g.array(o))return o.forEach(function(ge){return Ue(ge,i,u,y)}),y;if(g.object(o)&&(i=o,o=""),g.func(i)&&u(o))y[o]=y[o]||[],y[o].push(i);else if(g.array(i))for(var x=0,O=i;x<O.length;x++){var J=O[x];Ue(o,J,u,y)}else if(g.object(i))for(var Q in i)Ue(oa(Q).map(function(ge){return"".concat(o).concat(ge)}),i[Q],u,y);return y}function oa(o){return o.trim().split(/ +/)}var Ja=function(o,i){return Math.sqrt(o*o+i*i)},L=["webkit","moz"];function H(o,i){o.__set||(o.__set={});var u=function(x){if(L.some(function(O){return x.indexOf(O)===0}))return 1;typeof o[x]!="function"&&x!=="__set"&&Object.defineProperty(o,x,{get:function(){return x in o.__set?o.__set[x]:o.__set[x]=i[x]},set:function(O){o.__set[x]=O},configurable:!0})};for(var y in i)u(y);return o}function Z(o,i){o.page=o.page||{},o.page.x=i.page.x,o.page.y=i.page.y,o.client=o.client||{},o.client.x=i.client.x,o.client.y=i.client.y,o.timeStamp=i.timeStamp}function me(o){o.page.x=0,o.page.y=0,o.client.x=0,o.client.y=0}function fe(o){return o instanceof R.Event||o instanceof R.Touch}function da(o,i,u){return o=o||"page",(u=u||{}).x=i[o+"X"],u.y=i[o+"Y"],u}function Qe(o,i){return i=i||{x:0,y:0},ee.isOperaMobile&&fe(o)?(da("screen",o,i),i.x+=window.scrollX,i.y+=window.scrollY):da("page",o,i),i}function te(o){return g.number(o.pointerId)?o.pointerId:o.identifier}function pa(o,i,u){var y=i.length>1?We(i):i[0];Qe(y,o.page),function(x,O){O=O||{},ee.isOperaMobile&&fe(x)?da("screen",x,O):da("client",x,O)}(y,o.client),o.timeStamp=u}function Ne(o){var i=[];return g.array(o)?(i[0]=o[0],i[1]=o[1]):o.type==="touchend"?o.touches.length===1?(i[0]=o.touches[0],i[1]=o.changedTouches[0]):o.touches.length===0&&(i[0]=o.changedTouches[0],i[1]=o.changedTouches[1]):(i[0]=o.touches[0],i[1]=o.touches[1]),i}function We(o){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<o.length;u++){var y=o[u];for(var x in i)i[x]+=y[x]}for(var O in i)i[O]/=o.length;return i}function Aa(o){if(!o.length)return null;var i=Ne(o),u=Math.min(i[0].pageX,i[1].pageX),y=Math.min(i[0].pageY,i[1].pageY),x=Math.max(i[0].pageX,i[1].pageX),O=Math.max(i[0].pageY,i[1].pageY);return{x:u,y,left:u,top:y,right:x,bottom:O,width:x-u,height:O-y}}function Da(o,i){var u=i+"X",y=i+"Y",x=Ne(o),O=x[0][u]-x[1][u],J=x[0][y]-x[1][y];return Ja(O,J)}function Ze(o,i){var u=i+"X",y=i+"Y",x=Ne(o),O=x[1][u]-x[0][u],J=x[1][y]-x[0][y];return 180*Math.atan2(J,O)/Math.PI}function ra(o){return g.string(o.pointerType)?o.pointerType:g.number(o.pointerType)?[void 0,void 0,"touch","pen","mouse"][o.pointerType]:/touch/.test(o.type||"")||o instanceof R.Touch?"touch":"mouse"}function pe(o){var i=g.func(o.composedPath)?o.composedPath():o.path;return[Se(i?i[0]:o.target),Se(o.currentTarget)]}var U=function(){function o(i){s(this,o),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return p(o,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}();Object.defineProperty(U.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var q=function(o,i){for(var u=0;u<i.length;u++){var y=i[u];o.push(y)}return o},ze=function(o){return q([],o)},_e=function(o,i){for(var u=0;u<o.length;u++)if(i(o[u],u,o))return u;return-1},la=function(o,i){return o[_e(o,i)]},fa=function(o){m(u,o);var i=V(u);function u(y,x,O){var J;s(this,u),(J=i.call(this,x._interaction)).dropzone=void 0,J.dragEvent=void 0,J.relatedTarget=void 0,J.draggable=void 0,J.propagationStopped=!1,J.immediatePropagationStopped=!1;var Q=O==="dragleave"?y.prev:y.cur,ge=Q.element,je=Q.dropzone;return J.type=O,J.target=ge,J.currentTarget=ge,J.dropzone=je,J.dragEvent=x,J.relatedTarget=x.target,J.draggable=x.interactable,J.timeStamp=x.timeStamp,J}return p(u,[{key:"reject",value:function(){var y=this,x=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&x.cur.dropzone===this.dropzone&&x.cur.element===this.target)if(x.prev.dropzone=this.dropzone,x.prev.element=this.target,x.rejected=!0,x.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var O=x.activeDrops,J=_e(O,function(ge){var je=ge.dropzone,De=ge.element;return je===y.dropzone&&De===y.target});x.activeDrops.splice(J,1);var Q=new u(x,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new u(x,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(U);function ka(o,i){for(var u=0,y=o.slice();u<y.length;u++){var x=y[u],O=x.dropzone,J=x.element;i.dropzone=O,i.target=J,O.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function ha(o,i){for(var u=function(O,J){for(var Q=[],ge=0,je=O.interactables.list;ge<je.length;ge++){var De=je[ge];if(De.options.drop.enabled){var ea=De.options.drop.accept;if(!(g.element(ea)&&ea!==J||g.string(ea)&&!ve(J,ea)||g.func(ea)&&!ea({dropzone:De,draggableElement:J})))for(var Ta=0,Xa=De.getAllElements();Ta<Xa.length;Ta++){var Ga=Xa[Ta];Ga!==J&&Q.push({dropzone:De,element:Ga,rect:De.getRect(Ga)})}}}return Q}(o,i),y=0;y<u.length;y++){var x=u[y];x.rect=x.dropzone.getRect(x.element)}return u}function Va(o,i,u){for(var y=o.dropState,x=o.interactable,O=o.element,J=[],Q=0,ge=y.activeDrops;Q<ge.length;Q++){var je=ge[Q],De=je.dropzone,ea=je.element,Ta=je.rect,Xa=De.dropCheck(i,u,x,O,ea,Ta);J.push(Xa?ea:null)}var Ga=function(al){for(var bl,ml,Cl,wl=[],Zl=0;Zl<al.length;Zl++){var Dl=al[Zl],jl=al[bl];if(Dl&&Zl!==bl)if(jl){var kr=B(Dl),Sr=B(jl);if(kr!==Dl.ownerDocument)if(Sr!==Dl.ownerDocument)if(kr!==Sr){wl=wl.length?wl:ce(jl);var Gr=void 0;if(jl instanceof R.HTMLElement&&Dl instanceof R.SVGElement&&!(Dl instanceof R.SVGSVGElement)){if(Dl===Sr)continue;Gr=Dl.ownerSVGElement}else Gr=Dl;for(var on=ce(Gr,jl.ownerDocument),wn=0;on[wn]&&on[wn]===wl[wn];)wn++;var fi=[on[wn-1],on[wn],wl[wn]];if(fi[0])for(var Rn=fi[0].lastChild;Rn;){if(Rn===fi[1]){bl=Zl,wl=on;break}if(Rn===fi[2])break;Rn=Rn.previousSibling}}else Cl=jl,(parseInt(S(ml=Dl).getComputedStyle(ml).zIndex,10)||0)>=(parseInt(S(Cl).getComputedStyle(Cl).zIndex,10)||0)&&(bl=Zl);else bl=Zl}else bl=Zl}return bl}(J);return y.activeDrops[Ga]||null}function Sa(o,i,u){var y=o.dropState,x={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(x.activate=new fa(y,u,"dropactivate"),x.activate.target=null,x.activate.dropzone=null),u.type==="dragend"&&(x.deactivate=new fa(y,u,"dropdeactivate"),x.deactivate.target=null,x.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(x.leave=new fa(y,u,"dragleave"),u.dragLeave=x.leave.target=y.prev.element,u.prevDropzone=x.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(x.enter=new fa(y,u,"dragenter"),u.dragEnter=y.cur.element,u.dropzone=y.cur.dropzone)),u.type==="dragend"&&y.cur.dropzone&&(x.drop=new fa(y,u,"drop"),u.dropzone=y.cur.dropzone,u.relatedTarget=y.cur.element),u.type==="dragmove"&&y.cur.dropzone&&(x.move=new fa(y,u,"dropmove"),u.dropzone=y.cur.dropzone)),x}function Oe(o,i){var u=o.dropState,y=u.activeDrops,x=u.cur,O=u.prev;i.leave&&O.dropzone.fire(i.leave),i.enter&&x.dropzone.fire(i.enter),i.move&&x.dropzone.fire(i.move),i.drop&&x.dropzone.fire(i.drop),i.deactivate&&ka(y,i.deactivate),u.prev.dropzone=x.dropzone,u.prev.element=x.element}function Za(o,i){var u=o.interaction,y=o.iEvent,x=o.event;if(y.type==="dragmove"||y.type==="dragend"){var O=u.dropState;i.dynamicDrop&&(O.activeDrops=ha(i,u.element));var J=y,Q=Va(u,J,x);O.rejected=O.rejected&&!!Q&&Q.dropzone===O.cur.dropzone&&Q.element===O.cur.element,O.cur.dropzone=Q&&Q.dropzone,O.cur.element=Q&&Q.element,O.events=Sa(u,0,J)}}var Ha={id:"actions/drop",install:function(o){var i=o.actions,u=o.interactStatic,y=o.Interactable,x=o.defaults;o.usePlugin(le),y.prototype.dropzone=function(O){return function(J,Q){if(g.object(Q)){if(J.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ge=Ue(Q.listeners),je=Object.keys(ge).reduce(function(ea,Ta){return ea[/^(enter|leave)/.test(Ta)?"drag".concat(Ta):/^(activate|deactivate|move)/.test(Ta)?"drop".concat(Ta):Ta]=ge[Ta],ea},{}),De=J.options.drop.listeners;De&&J.off(De),J.on(je),J.options.drop.listeners=je}return g.func(Q.ondrop)&&J.on("drop",Q.ondrop),g.func(Q.ondropactivate)&&J.on("dropactivate",Q.ondropactivate),g.func(Q.ondropdeactivate)&&J.on("dropdeactivate",Q.ondropdeactivate),g.func(Q.ondragenter)&&J.on("dragenter",Q.ondragenter),g.func(Q.ondragleave)&&J.on("dragleave",Q.ondragleave),g.func(Q.ondropmove)&&J.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?J.options.drop.overlap=Q.overlap:g.number(Q.overlap)&&(J.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(J.options.drop.accept=Q.accept),"checker"in Q&&(J.options.drop.checker=Q.checker),J}return g.bool(Q)?(J.options.drop.enabled=Q,J):J.options.drop}(this,O)},y.prototype.dropCheck=function(O,J,Q,ge,je,De){return function(ea,Ta,Xa,Ga,al,bl,ml){var Cl=!1;if(!(ml=ml||ea.getRect(bl)))return!!ea.options.drop.checker&&ea.options.drop.checker(Ta,Xa,Cl,ea,bl,Ga,al);var wl=ea.options.drop.overlap;if(wl==="pointer"){var Zl=Be(Ga,al,"drag"),Dl=Qe(Ta);Dl.x+=Zl.x,Dl.y+=Zl.y;var jl=Dl.x>ml.left&&Dl.x<ml.right,kr=Dl.y>ml.top&&Dl.y<ml.bottom;Cl=jl&&kr}var Sr=Ga.getRect(al);if(Sr&&wl==="center"){var Gr=Sr.left+Sr.width/2,on=Sr.top+Sr.height/2;Cl=Gr>=ml.left&&Gr<=ml.right&&on>=ml.top&&on<=ml.bottom}return Sr&&g.number(wl)&&(Cl=Math.max(0,Math.min(ml.right,Sr.right)-Math.max(ml.left,Sr.left))*Math.max(0,Math.min(ml.bottom,Sr.bottom)-Math.max(ml.top,Sr.top))/(Sr.width*Sr.height)>=wl),ea.options.drop.checker&&(Cl=ea.options.drop.checker(Ta,Xa,Cl,ea,bl,Ga,al)),Cl}(this,O,J,Q,ge,je,De)},u.dynamicDrop=function(O){return g.bool(O)?(o.dynamicDrop=O,u):o.dynamicDrop},ae(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",o.dynamicDrop=!1,x.actions.drop=Ha.defaults},listeners:{"interactions:before-action-start":function(o){var i=o.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(o,i){var u=o.interaction,y=(o.event,o.iEvent);if(u.prepared.name==="drag"){var x=u.dropState;x.activeDrops=[],x.events={},x.activeDrops=ha(i,u.element),x.events=Sa(u,0,y),x.events.activate&&(ka(x.activeDrops,x.events.activate),i.fire("actions/drop:start",{interaction:u,dragEvent:y}))}},"interactions:action-move":Za,"interactions:after-action-move":function(o,i){var u=o.interaction,y=o.iEvent;if(u.prepared.name==="drag"){var x=u.dropState;Oe(u,x.events),i.fire("actions/drop:move",{interaction:u,dragEvent:y}),x.events={}}},"interactions:action-end":function(o,i){if(o.interaction.prepared.name==="drag"){var u=o.interaction,y=o.iEvent;Za(o,i),Oe(u,u.dropState.events),i.fire("actions/drop:end",{interaction:u,dragEvent:y})}},"interactions:stop":function(o){var i=o.interaction;if(i.prepared.name==="drag"){var u=i.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:ha,getDrop:Va,getDropEvents:Sa,fireDropEvents:Oe,filterEventType:function(o){return o.search("drag")===0||o.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},xl=Ha;function Yl(o){var i=o.interaction,u=o.iEvent,y=o.phase;if(i.prepared.name==="gesture"){var x=i.pointers.map(function(je){return je.pointer}),O=y==="start",J=y==="end",Q=i.interactable.options.deltaSource;if(u.touches=[x[0],x[1]],O)u.distance=Da(x,Q),u.box=Aa(x),u.scale=1,u.ds=0,u.angle=Ze(x,Q),u.da=0,i.gesture.startDistance=u.distance,i.gesture.startAngle=u.angle;else if(J||i.pointers.length<2){var ge=i.prevEvent;u.distance=ge.distance,u.box=ge.box,u.scale=ge.scale,u.ds=0,u.angle=ge.angle,u.da=0}else u.distance=Da(x,Q),u.box=Aa(x),u.scale=u.distance/i.gesture.startDistance,u.angle=Ze(x,Q),u.ds=u.scale-i.gesture.scale,u.da=u.angle-i.gesture.angle;i.gesture.distance=u.distance,i.gesture.angle=u.angle,g.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(i.gesture.scale=u.scale)}}var kl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(o){var i=o.actions,u=o.Interactable,y=o.defaults;u.prototype.gesturable=function(x){return g.object(x)?(this.options.gesture.enabled=x.enabled!==!1,this.setPerAction("gesture",x),this.setOnEvents("gesture",x),this):g.bool(x)?(this.options.gesture.enabled=x,this):this.options.gesture},i.map.gesture=kl,i.methodDict.gesture="gesturable",y.actions.gesture=kl.defaults},listeners:{"interactions:action-start":Yl,"interactions:action-move":Yl,"interactions:action-end":Yl,"interactions:new":function(o){o.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(o){if(!(o.interaction.pointers.length<2)){var i=o.interactable.options.gesture;if(i&&i.enabled)return o.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(o){return o.search("gesture")===0}},Fl=kl;function ja(o,i,u,y,x,O,J){if(!i)return!1;if(i===!0){var Q=g.number(O.width)?O.width:O.right-O.left,ge=g.number(O.height)?O.height:O.bottom-O.top;if(J=Math.min(J,Math.abs((o==="left"||o==="right"?Q:ge)/2)),Q<0&&(o==="left"?o="right":o==="right"&&(o="left")),ge<0&&(o==="top"?o="bottom":o==="bottom"&&(o="top")),o==="left"){var je=Q>=0?O.left:O.right;return u.x<je+J}if(o==="top"){var De=ge>=0?O.top:O.bottom;return u.y<De+J}if(o==="right")return u.x>(Q>=0?O.right:O.left)-J;if(o==="bottom")return u.y>(ge>=0?O.bottom:O.top)-J}return!!g.element(y)&&(g.element(i)?i===y:W(y,i,x))}function zl(o){var i=o.iEvent,u=o.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var y=i;u.interactable.options.resize.square?(u.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=u.resizeAxes,u.resizeAxes==="x"?y.delta.y=0:u.resizeAxes==="y"&&(y.delta.x=0))}}var $l,Ma,rl={id:"actions/resize",before:["actions/drag"],install:function(o){var i=o.actions,u=o.browser,y=o.Interactable,x=o.defaults;rl.cursors=function(O){return O.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),rl.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,y.prototype.resizable=function(O){return function(J,Q,ge){return g.object(Q)?(J.options.resize.enabled=Q.enabled!==!1,J.setPerAction("resize",Q),J.setOnEvents("resize",Q),g.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?J.options.resize.axis=Q.axis:Q.axis===null&&(J.options.resize.axis=ge.defaults.actions.resize.axis),g.bool(Q.preserveAspectRatio)?J.options.resize.preserveAspectRatio=Q.preserveAspectRatio:g.bool(Q.square)&&(J.options.resize.square=Q.square),J):g.bool(Q)?(J.options.resize.enabled=Q,J):J.options.resize}(this,O,o)},i.map.resize=rl,i.methodDict.resize="resizable",x.actions.resize=rl.defaults},listeners:{"interactions:new":function(o){o.interaction.resizeAxes="xy"},"interactions:action-start":function(o){(function(i){var u=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var x=u,O=y.rect;y._rects={start:ae({},O),corrected:ae({},O),previous:ae({},O),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},x.edges=y.prepared.edges,x.rect=y._rects.corrected,x.deltaRect=y._rects.delta}})(o),zl(o)},"interactions:action-move":function(o){(function(i){var u=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var x=u,O=y.interactable.options.resize.invert,J=O==="reposition"||O==="negate",Q=y.rect,ge=y._rects,je=ge.start,De=ge.corrected,ea=ge.delta,Ta=ge.previous;if(ae(Ta,De),J){if(ae(De,Q),O==="reposition"){if(De.top>De.bottom){var Xa=De.top;De.top=De.bottom,De.bottom=Xa}if(De.left>De.right){var Ga=De.left;De.left=De.right,De.right=Ga}}}else De.top=Math.min(Q.top,je.bottom),De.bottom=Math.max(Q.bottom,je.top),De.left=Math.min(Q.left,je.right),De.right=Math.max(Q.right,je.left);for(var al in De.width=De.right-De.left,De.height=De.bottom-De.top,De)ea[al]=De[al]-Ta[al];x.edges=y.prepared.edges,x.rect=De,x.deltaRect=ea}})(o),zl(o)},"interactions:action-end":function(o){var i=o.iEvent,u=o.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var y=i;y.edges=u.prepared.edges,y.rect=u._rects.corrected,y.deltaRect=u._rects.delta}},"auto-start:check":function(o){var i=o.interaction,u=o.interactable,y=o.element,x=o.rect,O=o.buttons;if(x){var J=ae({},i.coords.cur.page),Q=u.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(O&Q.mouseButtons)!=0)){if(g.object(Q.edges)){var ge={left:!1,right:!1,top:!1,bottom:!1};for(var je in ge)ge[je]=ja(je,Q.edges[je],J,i._latestPointer.eventTarget,y,x,Q.margin||rl.defaultMargin);ge.left=ge.left&&!ge.right,ge.top=ge.top&&!ge.bottom,(ge.left||ge.right||ge.top||ge.bottom)&&(o.action={name:"resize",edges:ge})}else{var De=Q.axis!=="y"&&J.x>x.right-rl.defaultMargin,ea=Q.axis!=="x"&&J.y>x.bottom-rl.defaultMargin;(De||ea)&&(o.action={name:"resize",axes:(De?"x":"")+(ea?"y":"")})}return!o.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(o){var i=o.edges,u=o.axis,y=o.name,x=rl.cursors,O=null;if(u)O=x[y+u];else if(i){for(var J="",Q=0,ge=["top","bottom","left","right"];Q<ge.length;Q++){var je=ge[Q];i[je]&&(J+=je)}O=x[J]}return O},filterEventType:function(o){return o.search("resize")===0},defaultMargin:null},sl=rl,ga={id:"actions",install:function(o){o.usePlugin(Fl),o.usePlugin(sl),o.usePlugin(le),o.usePlugin(xl)}},xa=0,La={request:function(o){return $l(o)},cancel:function(o){return Ma(o)},init:function(o){if($l=o.requestAnimationFrame,Ma=o.cancelAnimationFrame,!$l)for(var i=["ms","moz","webkit","o"],u=0;u<i.length;u++){var y=i[u];$l=o["".concat(y,"RequestAnimationFrame")],Ma=o["".concat(y,"CancelAnimationFrame")]||o["".concat(y,"CancelRequestAnimationFrame")]}$l=$l&&$l.bind(o),Ma=Ma&&Ma.bind(o),$l||($l=function(x){var O=Date.now(),J=Math.max(0,16-(O-xa)),Q=o.setTimeout(function(){x(O+J)},J);return xa=O+J,Q},Ma=function(x){return clearTimeout(x)})}},Ra={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(o){Ra.isScrolling=!0,La.cancel(Ra.i),o.autoScroll=Ra,Ra.interaction=o,Ra.prevTime=Ra.now(),Ra.i=La.request(Ra.scroll)},stop:function(){Ra.isScrolling=!1,Ra.interaction&&(Ra.interaction.autoScroll=null),La.cancel(Ra.i)},scroll:function(){var o=Ra.interaction,i=o.interactable,u=o.element,y=o.prepared.name,x=i.options[y].autoScroll,O=xe(x.container,i,u),J=Ra.now(),Q=(J-Ra.prevTime)/1e3,ge=x.speed*Q;if(ge>=1){var je={x:Ra.x*ge,y:Ra.y*ge};if(je.x||je.y){var De=ia(O);g.window(O)?O.scrollBy(je.x,je.y):O&&(O.scrollLeft+=je.x,O.scrollTop+=je.y);var ea=ia(O),Ta={x:ea.x-De.x,y:ea.y-De.y};(Ta.x||Ta.y)&&i.fire({type:"autoscroll",target:u,interactable:i,delta:Ta,interaction:o,container:O})}Ra.prevTime=J}Ra.isScrolling&&(La.cancel(Ra.i),Ra.i=La.request(Ra.scroll))},check:function(o,i){var u;return(u=o.options[i].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(o){var i=o.interaction,u=o.pointer;if(i.interacting()&&Ra.check(i.interactable,i.prepared.name))if(i.simulation)Ra.x=Ra.y=0;else{var y,x,O,J,Q=i.interactable,ge=i.element,je=i.prepared.name,De=Q.options[je].autoScroll,ea=xe(De.container,Q,ge);if(g.window(ea))J=u.clientX<Ra.margin,y=u.clientY<Ra.margin,x=u.clientX>ea.innerWidth-Ra.margin,O=u.clientY>ea.innerHeight-Ra.margin;else{var Ta=Le(ea);J=u.clientX<Ta.left+Ra.margin,y=u.clientY<Ta.top+Ra.margin,x=u.clientX>Ta.right-Ra.margin,O=u.clientY>Ta.bottom-Ra.margin}Ra.x=x?1:J?-1:0,Ra.y=O?1:y?-1:0,Ra.isScrolling||(Ra.margin=De.margin,Ra.speed=De.speed,Ra.start(i))}}};function xe(o,i,u){return(g.string(o)?ta(o,i,u):o)||S(u)}function ia(o){return g.window(o)&&(o=window.document.body),{x:o.scrollLeft,y:o.scrollTop}}var Ie={id:"auto-scroll",install:function(o){var i=o.defaults,u=o.actions;o.autoScroll=Ra,Ra.now=function(){return o.now()},u.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=Ra.defaults},listeners:{"interactions:new":function(o){o.interaction.autoScroll=null},"interactions:destroy":function(o){o.interaction.autoScroll=null,Ra.stop(),Ra.interaction&&(Ra.interaction=null)},"interactions:stop":Ra.stop,"interactions:action-move":function(o){return Ra.onInteractionMove(o)}}},de=Ie;function ma(o,i){var u=!1;return function(){return u||(j.console.warn(i),u=!0),o.apply(this,arguments)}}function ya(o,i){return o.name=i.name,o.axis=i.axis,o.edges=i.edges,o}function Je(o){return g.bool(o)?(this.options.styleCursor=o,this):o===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Xe(o){return g.func(o)?(this.options.actionChecker=o,this):o===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ke={id:"auto-start/interactableMethods",install:function(o){var i=o.Interactable;i.prototype.getAction=function(u,y,x,O){var J=function(Q,ge,je,De,ea){var Ta=Q.getRect(De),Xa=ge.buttons||{0:1,1:4,3:8,4:16}[ge.button],Ga={action:null,interactable:Q,interaction:je,element:De,rect:Ta,buttons:Xa};return ea.fire("auto-start:check",Ga),Ga.action}(this,y,x,O,o);return this.options.actionChecker?this.options.actionChecker(u,y,J,this,O,x):J},i.prototype.ignoreFrom=ma(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=ma(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=Xe,i.prototype.styleCursor=Je}};function pl(o,i,u,y,x){return i.testIgnoreAllow(i.options[o.name],u,y)&&i.options[o.name].enabled&&il(i,u,o,x)?o:null}function Ve(o,i,u,y,x,O,J){for(var Q=0,ge=y.length;Q<ge;Q++){var je=y[Q],De=x[Q],ea=je.getAction(i,u,o,De);if(ea){var Ta=pl(ea,je,De,O,J);if(Ta)return{action:Ta,interactable:je,element:De}}}return{action:null,interactable:null,element:null}}function Fa(o,i,u,y,x){var O=[],J=[],Q=y;function ge(De){O.push(De),J.push(Q)}for(;g.element(Q);){O=[],J=[],x.interactables.forEachMatch(Q,ge);var je=Ve(o,i,u,O,J,y,x);if(je.action&&!je.interactable.options[je.action.name].manualStart)return je;Q=Pe(Q)}return{action:null,interactable:null,element:null}}function Ea(o,i,u){var y=i.action,x=i.interactable,O=i.element;y=y||{name:null},o.interactable=x,o.element=O,ya(o.prepared,y),o.rect=x&&y.name?x.getRect(O):null,Sl(o,u),u.fire("autoStart:prepared",{interaction:o})}function il(o,i,u,y){var x=o.options,O=x[u.name].max,J=x[u.name].maxPerElement,Q=y.autoStart.maxInteractions,ge=0,je=0,De=0;if(!(O&&J&&Q))return!1;for(var ea=0,Ta=y.interactions.list;ea<Ta.length;ea++){var Xa=Ta[ea],Ga=Xa.prepared.name;if(Xa.interacting()&&(++ge>=Q||Xa.interactable===o&&((je+=Ga===u.name?1:0)>=O||Xa.element===i&&(De++,Ga===u.name&&De>=J))))return!1}return Q>0}function Ia(o,i){return g.number(o)?(i.autoStart.maxInteractions=o,this):i.autoStart.maxInteractions}function Me(o,i,u){var y=u.autoStart.cursorElement;y&&y!==o&&(y.style.cursor=""),o.ownerDocument.documentElement.style.cursor=i,o.style.cursor=i,u.autoStart.cursorElement=i?o:null}function Sl(o,i){var u=o.interactable,y=o.element,x=o.prepared;if(o.pointerType==="mouse"&&u&&u.options.styleCursor){var O="";if(x.name){var J=u.options[x.name].cursorChecker;O=g.func(J)?J(x,u,y,o._interacting):i.actions.map[x.name].getCursor(x)}Me(o.element,O||"",i)}else i.autoStart.cursorElement&&Me(i.autoStart.cursorElement,"",i)}var Il={id:"auto-start/base",before:["actions"],install:function(o){var i=o.interactStatic,u=o.defaults;o.usePlugin(Ke),u.base.actionChecker=null,u.base.styleCursor=!0,ae(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(y){return Ia(y,o)},o.autoStart={maxInteractions:1/0,withinInteractionLimit:il,cursorElement:null}},listeners:{"interactions:down":function(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget;u.interacting()||Ea(u,Fa(u,y,x,O,i),i)},"interactions:move":function(o,i){(function(u,y){var x=u.interaction,O=u.pointer,J=u.event,Q=u.eventTarget;x.pointerType!=="mouse"||x.pointerIsDown||x.interacting()||Ea(x,Fa(x,O,J,Q,y),y)})(o,i),function(u,y){var x=u.interaction;if(x.pointerIsDown&&!x.interacting()&&x.pointerWasMoved&&x.prepared.name){y.fire("autoStart:before-start",u);var O=x.interactable,J=x.prepared.name;J&&O&&(O.options[J].manualStart||!il(O,x.element,x.prepared,y)?x.stop():(x.start(x.prepared,O,x.element),Sl(x,y)))}}(o,i)},"interactions:stop":function(o,i){var u=o.interaction,y=u.interactable;y&&y.options.styleCursor&&Me(u.element,"",i)}},maxInteractions:Ia,withinInteractionLimit:il,validateAction:pl},Ul=Il,ql={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(o,i){var u=o.interaction,y=o.eventTarget,x=o.dx,O=o.dy;if(u.prepared.name==="drag"){var J=Math.abs(x),Q=Math.abs(O),ge=u.interactable.options.drag,je=ge.startAxis,De=J>Q?"x":J<Q?"y":"xy";if(u.prepared.axis=ge.lockAxis==="start"?De[0]:ge.lockAxis,De!=="xy"&&je!=="xy"&&je!==De){u.prepared.name=null;for(var ea=y,Ta=function(Ga){if(Ga!==u.interactable){var al=u.interactable.options.drag;if(!al.manualStart&&Ga.testIgnoreAllow(al,ea,y)){var bl=Ga.getAction(u.downPointer,u.downEvent,u,ea);if(bl&&bl.name==="drag"&&function(ml,Cl){if(!Cl)return!1;var wl=Cl.options.drag.startAxis;return ml==="xy"||wl==="xy"||wl===ml}(De,Ga)&&Ul.validateAction(bl,Ga,ea,y,i))return Ga}}};g.element(ea);){var Xa=i.interactables.forEachMatch(ea,Ta);if(Xa){u.prepared.name="drag",u.interactable=Xa,u.element=ea;break}ea=Pe(ea)}}}}}};function Ql(o){var i=o.prepared&&o.prepared.name;if(!i)return null;var u=o.interactable.options;return u[i].hold||u[i].delay}var dr={id:"auto-start/hold",install:function(o){var i=o.defaults;o.usePlugin(Ul),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(o){o.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(o){var i=o.interaction,u=Ql(i);u>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},u))},"interactions:move":function(o){var i=o.interaction,u=o.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!u&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(o){var i=o.interaction;Ql(i)>0&&(i.prepared.name=null)}},getHoldDuration:Ql},Ol=dr,pr={id:"auto-start",install:function(o){o.usePlugin(Ul),o.usePlugin(Ol),o.usePlugin(ql)}},Fr=function(o){return/^(always|never|auto)$/.test(o)?(this.options.preventDefault=o,this):g.bool(o)?(this.options.preventDefault=o?"always":"never",this):this.options.preventDefault};function Pl(o){var i=o.interaction,u=o.event;i.interactable&&i.interactable.checkAndPreventDefault(u)}var ar={id:"core/interactablePreventDefault",install:function(o){var i=o.Interactable;i.prototype.preventDefault=Fr,i.prototype.checkAndPreventDefault=function(u){return function(y,x,O){var J=y.options.preventDefault;if(J!=="never")if(J!=="always"){if(x.events.supportsPassive&&/^touch(start|move)$/.test(O.type)){var Q=S(O.target).document,ge=x.getDocOptions(Q);if(!ge||!ge.events||ge.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(O.type)||g.element(O.target)&&ve(O.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||O.preventDefault()}else O.preventDefault()}(this,o,u)},o.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var y=0,x=o.interactions.list;y<x.length;y++){var O=x[y];if(O.element&&(O.element===u.target||ue(O.element,u.target)))return void O.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(o,i){return o["interactions:".concat(i)]=Pl,o},{})};function Pr(o,i){if(i.phaselessTypes[o])return!0;for(var u in i.map)if(o.indexOf(u)===0&&o.substr(u.length)in i.phases)return!0;return!1}function Tr(o){var i={};for(var u in o){var y=o[u];g.plainObject(y)?i[u]=Tr(y):g.array(y)?i[u]=ze(y):i[u]=y}return i}var jr=function(){function o(i){s(this,o),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=i,this.result=Ir(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return p(o,[{key:"start",value:function(i,u){var y,x,O=i.phase,J=this.interaction,Q=function(je){var De=je.interactable.options[je.prepared.name],ea=De.modifiers;return ea&&ea.length?ea:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ta){var Xa=De[Ta];return Xa&&Xa.enabled&&{options:Xa,methods:Xa._methods}}).filter(function(Ta){return!!Ta})}(J);this.prepareStates(Q),this.startEdges=ae({},J.edges),this.edges=ae({},this.startEdges),this.startOffset=(y=J.rect,x=u,y?{left:x.x-y.left,top:x.y-y.top,right:y.right-x.x,bottom:y.bottom-x.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ge=this.fillArg({phase:O,pageCoords:u,preEnd:!1});return this.result=Ir(),this.startAll(ge),this.result=this.setAll(ge)}},{key:"fillArg",value:function(i){var u=this.interaction;return i.interaction=u,i.interactable=u.interactable,i.element=u.element,i.rect||(i.rect=u.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var u=0,y=this.states;u<y.length;u++){var x=y[u];x.methods.start&&(i.state=x,x.methods.start(i))}}},{key:"setAll",value:function(i){var u=i.phase,y=i.preEnd,x=i.skipModifiers,O=i.rect,J=i.edges;i.coords=ae({},i.pageCoords),i.rect=ae({},O),i.edges=ae({},J);for(var Q=x?this.states.slice(x):this.states,ge=Ir(i.coords,i.rect),je=0;je<Q.length;je++){var De,ea=Q[je],Ta=ea.options,Xa=ae({},i.coords),Ga=null;(De=ea.methods)!=null&&De.set&&this.shouldDo(Ta,y,u)&&(i.state=ea,Ga=ea.methods.set(i),ie(i.edges,i.rect,{x:i.coords.x-Xa.x,y:i.coords.y-Xa.y})),ge.eventProps.push(Ga)}ae(this.edges,i.edges),ge.delta.x=i.coords.x-i.pageCoords.x,ge.delta.y=i.coords.y-i.pageCoords.y,ge.rectDelta.left=i.rect.left-O.left,ge.rectDelta.right=i.rect.right-O.right,ge.rectDelta.top=i.rect.top-O.top,ge.rectDelta.bottom=i.rect.bottom-O.bottom;var al=this.result.coords,bl=this.result.rect;if(al&&bl){var ml=ge.rect.left!==bl.left||ge.rect.right!==bl.right||ge.rect.top!==bl.top||ge.rect.bottom!==bl.bottom;ge.changed=ml||al.x!==ge.coords.x||al.y!==ge.coords.y}return ge}},{key:"applyToInteraction",value:function(i){var u=this.interaction,y=i.phase,x=u.coords.cur,O=u.coords.start,J=this.result,Q=this.startDelta,ge=J.delta;y==="start"&&ae(this.startDelta,J.delta);for(var je=0,De=[[O,Q],[x,ge]];je<De.length;je++){var ea=De[je],Ta=ea[0],Xa=ea[1];Ta.page.x+=Xa.x,Ta.page.y+=Xa.y,Ta.client.x+=Xa.x,Ta.client.y+=Xa.y}var Ga=this.result.rectDelta,al=i.rect||u.rect;al.left+=Ga.left,al.right+=Ga.right,al.top+=Ga.top,al.bottom+=Ga.bottom,al.width=al.right-al.left,al.height=al.bottom-al.top}},{key:"setAndApply",value:function(i){var u=this.interaction,y=i.phase,x=i.preEnd,O=i.skipModifiers,J=this.setAll(this.fillArg({preEnd:x,phase:y,pageCoords:i.modifiedCoords||u.coords.cur.page}));if(this.result=J,!J.changed&&(!O||O<this.states.length)&&u.interacting())return!1;if(i.modifiedCoords){var Q=u.coords.cur.page,ge={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};J.coords.x+=ge.x,J.coords.y+=ge.y,J.delta.x+=ge.x,J.delta.y+=ge.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var u=i.interaction,y=i.event,x=this.states;if(x&&x.length){for(var O=!1,J=0;J<x.length;J++){var Q=x[J];i.state=Q;var ge=Q.options,je=Q.methods,De=je.beforeEnd&&je.beforeEnd(i);if(De)return this.endResult=De,!1;O=O||!O&&this.shouldDo(ge,!0,i.phase,!0)}O&&u.move({event:y,preEnd:!0})}}},{key:"stop",value:function(i){var u=i.interaction;if(this.states&&this.states.length){var y=ae({states:this.states,interactable:u.interactable,element:u.element,rect:null},i);this.fillArg(y);for(var x=0,O=this.states;x<O.length;x++){var J=O[x];y.state=J,J.methods.stop&&J.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var u=0;u<i.length;u++){var y=i[u],x=y.options,O=y.methods,J=y.name;this.states.push({options:x,methods:O,index:u,name:J})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var u=i.interaction,y=u.coords,x=u.rect,O=u.modification;if(O.result){for(var J=O.startDelta,Q=O.result,ge=Q.delta,je=Q.rectDelta,De=0,ea=[[y.start,J],[y.cur,ge]];De<ea.length;De++){var Ta=ea[De],Xa=Ta[0],Ga=Ta[1];Xa.page.x-=Ga.x,Xa.page.y-=Ga.y,Xa.client.x-=Ga.x,Xa.client.y-=Ga.y}x.left-=je.left,x.right-=je.right,x.top-=je.top,x.bottom-=je.bottom}}},{key:"shouldDo",value:function(i,u,y,x){return!(!i||i.enabled===!1||x&&!i.endOnly||i.endOnly&&!u||y==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(u){return Tr(u)}),this.result=Ir(ae({},i.result.coords),ae({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),o}();function Ir(o,i){return{rect:i,coords:o,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Er(o,i){var u=o.defaults,y={start:o.start,set:o.set,beforeEnd:o.beforeEnd,stop:o.stop},x=function(O){var J=O||{};for(var Q in J.enabled=J.enabled!==!1,u)Q in J||(J[Q]=u[Q]);var ge={options:J,methods:y,name:i,enable:function(){return J.enabled=!0,ge},disable:function(){return J.enabled=!1,ge}};return ge};return i&&typeof i=="string"&&(x._defaults=u,x._methods=y),x}function Cr(o){var i=o.iEvent,u=o.interaction.modification.result;u&&(i.modifiers=u.eventProps)}var mn={id:"modifiers/base",before:["actions"],install:function(o){o.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(o){var i=o.interaction;i.modification=new jr(i)},"interactions:before-action-start":function(o){var i=o.interaction,u=o.interaction.modification;u.start(o,i.coords.start.page),i.edges=u.edges,u.applyToInteraction(o)},"interactions:before-action-move":function(o){var i=o.interaction,u=i.modification,y=u.setAndApply(o);return i.edges=u.edges,y},"interactions:before-action-end":function(o){var i=o.interaction,u=i.modification,y=u.beforeEnd(o);return i.edges=u.startEdges,y},"interactions:action-start":Cr,"interactions:action-move":Cr,"interactions:action-end":Cr,"interactions:after-action-start":function(o){return o.interaction.modification.restoreInteractionCoords(o)},"interactions:after-action-move":function(o){return o.interaction.modification.restoreInteractionCoords(o)},"interactions:stop":function(o){return o.interaction.modification.stop(o)}}},Nr=mn,cr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yn=function(o){m(u,o);var i=V(u);function u(y,x,O,J,Q,ge,je){var De;s(this,u),(De=i.call(this,y)).relatedTarget=null,De.screenX=void 0,De.screenY=void 0,De.button=void 0,De.buttons=void 0,De.ctrlKey=void 0,De.shiftKey=void 0,De.altKey=void 0,De.metaKey=void 0,De.page=void 0,De.client=void 0,De.delta=void 0,De.rect=void 0,De.x0=void 0,De.y0=void 0,De.t0=void 0,De.dt=void 0,De.duration=void 0,De.clientX0=void 0,De.clientY0=void 0,De.velocity=void 0,De.speed=void 0,De.swipe=void 0,De.axes=void 0,De.preEnd=void 0,Q=Q||y.element;var ea=y.interactable,Ta=(ea&&ea.options||cr).deltaSource,Xa=Be(ea,Q,O),Ga=J==="start",al=J==="end",bl=Ga?D(De):y.prevEvent,ml=Ga?y.coords.start:al?{page:bl.page,client:bl.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return De.page=ae({},ml.page),De.client=ae({},ml.client),De.rect=ae({},y.rect),De.timeStamp=ml.timeStamp,al||(De.page.x-=Xa.x,De.page.y-=Xa.y,De.client.x-=Xa.x,De.client.y-=Xa.y),De.ctrlKey=x.ctrlKey,De.altKey=x.altKey,De.shiftKey=x.shiftKey,De.metaKey=x.metaKey,De.button=x.button,De.buttons=x.buttons,De.target=Q,De.currentTarget=Q,De.preEnd=ge,De.type=je||O+(J||""),De.interactable=ea,De.t0=Ga?y.pointers[y.pointers.length-1].downTime:bl.t0,De.x0=y.coords.start.page.x-Xa.x,De.y0=y.coords.start.page.y-Xa.y,De.clientX0=y.coords.start.client.x-Xa.x,De.clientY0=y.coords.start.client.y-Xa.y,De.delta=Ga||al?{x:0,y:0}:{x:De[Ta].x-bl[Ta].x,y:De[Ta].y-bl[Ta].y},De.dt=y.coords.delta.timeStamp,De.duration=De.timeStamp-De.t0,De.velocity=ae({},y.coords.velocity[Ta]),De.speed=Ja(De.velocity.x,De.velocity.y),De.swipe=al||J==="inertiastart"?De.getSwipe():null,De}return p(u,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var x=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;x<0&&(x+=360);var O=112.5<=x&&x<247.5,J=202.5<=x&&x<337.5;return{up:J,down:!J&&22.5<=x&&x<157.5,left:O,right:!O&&(292.5<=x||x<67.5),angle:x,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(U);Object.defineProperties(yn.prototype,{pageX:{get:function(){return this.page.x},set:function(o){this.page.x=o}},pageY:{get:function(){return this.page.y},set:function(o){this.page.y=o}},clientX:{get:function(){return this.client.x},set:function(o){this.client.x=o}},clientY:{get:function(){return this.client.y},set:function(o){this.client.y=o}},dx:{get:function(){return this.delta.x},set:function(o){this.delta.x=o}},dy:{get:function(){return this.delta.y},set:function(o){this.delta.y=o}},velocityX:{get:function(){return this.velocity.x},set:function(o){this.velocity.x=o}},velocityY:{get:function(){return this.velocity.y},set:function(o){this.velocity.y=o}}});var ln=p(function o(i,u,y,x,O){s(this,o),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=u,this.event=y,this.downTime=x,this.downTarget=O}),rn=function(o){return o.interactable="",o.element="",o.prepared="",o.pointerIsDown="",o.pointerWasMoved="",o._proxy="",o}({}),Sn=function(o){return o.start="",o.move="",o.end="",o.stop="",o.interacting="",o}({}),Nn=0,pn=function(){function o(i){var u=this,y=i.pointerType,x=i.scopeFire;s(this,o),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=ma(function(De){this.move(De)},"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=Nn++,this._scopeFire=x,this.pointerType=y;var O=this;this._proxy={};var J=function(De){Object.defineProperty(u._proxy,De,{get:function(){return O[De]}})};for(var Q in rn)J(Q);var ge=function(De){Object.defineProperty(u._proxy,De,{value:function(){return O[De].apply(O,arguments)}})};for(var je in Sn)ge(je);this._scopeFire("interactions:new",{interaction:this})}return p(o,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,u,y){var x=this.updatePointer(i,u,y,!0),O=this.pointers[x];this._scopeFire("interactions:down",{pointer:i,event:u,eventTarget:y,pointerIndex:x,pointerInfo:O,type:"down",interaction:this})}},{key:"start",value:function(i,u,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!u.options[i.name].enabled)&&(ya(this.prepared,i),this.interactable=u,this.element=y,this.rect=u.getRect(y),this.edges=this.prepared.edges?ae({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(i,u,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,u,y,!1);var x,O,J=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&&(x=this.coords.cur.client.x-this.coords.start.client.x,O=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ja(x,O)>this.pointerMoveTolerance);var Q,ge,je,De=this.getPointerIndex(i),ea={pointer:i,pointerIndex:De,pointerInfo:this.pointers[De],event:u,type:"move",eventTarget:y,dx:x,dy:O,duplicate:J,interaction:this};J||(Q=this.coords.velocity,ge=this.coords.delta,je=Math.max(ge.timeStamp/1e3,.001),Q.page.x=ge.page.x/je,Q.page.y=ge.page.y/je,Q.client.x=ge.client.x/je,Q.client.y=ge.client.y/je,Q.timeStamp=je),this._scopeFire("interactions:move",ea),J||this.simulation||(this.interacting()&&(ea.type=null,this.move(ea)),this.pointerWasMoved&&Z(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||me(this.coords.delta),(i=ae({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,u,y,x){var O=this.getPointerIndex(i);O===-1&&(O=this.updatePointer(i,u,y,!1));var J=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(J),{pointer:i,pointerIndex:O,pointerInfo:this.pointers[O],event:u,eventTarget:y,type:J,curEventTarget:x,interaction:this}),this.simulation||this.end(u),this.removePointer(i,u)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var u;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(i){var u=te(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:_e(this.pointers,function(y){return y.id===u})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,u,y,x){var O,J,Q,ge=te(i),je=this.getPointerIndex(i),De=this.pointers[je];return x=x!==!1&&(x||/(down|start)$/i.test(u.type)),De?De.pointer=i:(De=new ln(ge,i,u,null,null),je=this.pointers.length,this.pointers.push(De)),pa(this.coords.cur,this.pointers.map(function(ea){return ea.pointer}),this._now()),O=this.coords.delta,J=this.coords.prev,Q=this.coords.cur,O.page.x=Q.page.x-J.page.x,O.page.y=Q.page.y-J.page.y,O.client.x=Q.client.x-J.client.x,O.client.y=Q.client.y-J.client.y,O.timeStamp=Q.timeStamp-J.timeStamp,x&&(this.pointerIsDown=!0,De.downTime=this.coords.cur.timeStamp,De.downTarget=y,H(this.downPointer,i),this.interacting()||(Z(this.coords.start,this.coords.cur),Z(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(i,u,y),this._scopeFire("interactions:update-pointer",{pointer:i,event:u,eventTarget:y,down:x,pointerInfo:De,pointerIndex:je,interaction:this}),je}},{key:"removePointer",value:function(i,u){var y=this.getPointerIndex(i);if(y!==-1){var x=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:i,event:u,eventTarget:null,pointerIndex:y,pointerInfo:x,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,u,y){this._latestPointer.pointer=i,this._latestPointer.event=u,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,u,y,x){return new yn(this,i,this.prepared.name,u,this.element,y,x)}},{key:"_fireEvent",value:function(i){var u;(u=this.interactable)==null||u.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var u=i.event,y=i.phase,x=i.preEnd,O=i.type,J=this.rect;if(J&&y==="move"&&(ie(this.edges,J,this.coords.delta[this.interactable.options.deltaSource]),J.width=J.right-J.left,J.height=J.bottom-J.top),this._scopeFire("interactions:before-action-".concat(y),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(u,y,x,O);return this._scopeFire("interactions:action-".concat(y),i),y==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(y),i),!0}},{key:"_now",value:function(){return Date.now()}}]),o}();function lr(o){Ml(o.interaction)}function Ml(o){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(o))return!1;var i=o.offset.pending;return cl(o.coords.cur,i),cl(o.coords.delta,i),ie(o.edges,o.rect,i),i.x=0,i.y=0,!0}function zr(o){var i=o.x,u=o.y;this.offset.pending.x+=i,this.offset.pending.y+=u,this.offset.total.x+=i,this.offset.total.y+=u}function cl(o,i){var u=o.page,y=o.client,x=i.x,O=i.y;u.x+=x,u.y+=O,y.x+=x,y.y+=O}Sn.offsetBy="";var sr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(o){o.Interaction.prototype.offsetBy=zr},listeners:{"interactions:new":function(o){o.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(o){return function(i){i.pointerIsDown&&(cl(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(o.interaction)},"interactions:before-action-start":lr,"interactions:before-action-move":lr,"interactions:before-action-end":function(o){var i=o.interaction;if(Ml(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(o){var i=o.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},Rl=sr,_r=function(){function o(i){s(this,o),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=i}return p(o,[{key:"start",value:function(i){var u=this.interaction,y=Kl(u);if(!y||!y.enabled)return!1;var x=u.coords.velocity.client,O=Ja(x.x,x.y),J=this.modification||(this.modification=new jr(u));if(J.copyFrom(u.modification),this.t0=u._now(),this.allowResume=y.allowResume,this.v0=O,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=J.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&O>y.minSpeed&&O>y.endSpeed)this.startInertia();else{if(J.result=J.setAll(this.modifierArg),!J.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:i,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,u=this.interaction.coords.velocity.client,y=Kl(this.interaction),x=y.resistance,O=-Math.log(y.endSpeed/this.v0)/x;this.targetOffset={x:(u.x-O)/x,y:(u.y-O)/x},this.te=O,this.lambda_v0=x/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var J=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},J.result=J.setAll(Q),J.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+J.result.delta.x,y:this.targetOffset.y+J.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var u=this;this.timeout=La.request(function(){u.active&&i()})}},{key:"inertiaTick",value:function(){var i,u,y,x,O,J,Q,ge=this,je=this.interaction,De=Kl(je).resistance,ea=(je._now()-this.t0)/1e3;if(ea<this.te){var Ta,Xa=1-(Math.exp(-De*ea)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,u=0,y=this.targetOffset.x,x=this.targetOffset.y,O=this.modifiedOffset.x,J=this.modifiedOffset.y,Ta={x:Lr(Q=Xa,i,y,O),y:Lr(Q,u,x,J)}):Ta={x:this.targetOffset.x*Xa,y:this.targetOffset.y*Xa};var Ga={x:Ta.x-this.currentOffset.x,y:Ta.y-this.currentOffset.y};this.currentOffset.x+=Ga.x,this.currentOffset.y+=Ga.y,je.offsetBy(Ga),je.move(),this.onNextFrame(function(){return ge.inertiaTick()})}else je.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,u=this.interaction,y=u._now()-this.t0,x=Kl(u).smoothEndDuration;if(y<x){var O={x:gn(y,0,this.targetOffset.x,x),y:gn(y,0,this.targetOffset.y,x)},J={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=J.x,this.currentOffset.y+=J.y,u.offsetBy(J),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var u=i.pointer,y=i.event,x=i.eventTarget,O=this.interaction;O.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),O.updatePointer(u,y,x,!0),O._doPhase({interaction:O,event:y,phase:"resume"}),Z(O.coords.prev,O.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,La.cancel(this.timeout)}}]),o}();function Kl(o){var i=o.interactable,u=o.prepared;return i&&i.options&&u.name&&i.options[u.name].inertia}var fr={id:"inertia",before:["modifiers","actions"],install:function(o){var i=o.defaults;o.usePlugin(Rl),o.usePlugin(Nr),o.actions.phases.inertiastart=!0,o.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(o){var i=o.interaction;i.inertia=new _r(i)},"interactions:before-action-end":function(o){var i=o.interaction,u=o.event;return(!i._interacting||i.simulation||!i.inertia.start(u))&&null},"interactions:down":function(o){var i=o.interaction,u=o.eventTarget,y=i.inertia;if(y.active)for(var x=u;g.element(x);){if(x===i.element){y.resume(o);break}x=Pe(x)}},"interactions:stop":function(o){var i=o.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(o){var i=o.interaction.modification;i.stop(o),i.start(o,o.interaction.coords.cur.page),i.applyToInteraction(o)},"interactions:before-action-inertiastart":function(o){return o.interaction.modification.setAndApply(o)},"interactions:action-resume":Cr,"interactions:action-inertiastart":Cr,"interactions:after-action-inertiastart":function(o){return o.interaction.modification.restoreInteractionCoords(o)},"interactions:after-action-resume":function(o){return o.interaction.modification.restoreInteractionCoords(o)}}};function Lr(o,i,u,y){var x=1-o;return x*x*i+2*x*o*u+o*o*y}function gn(o,i,u,y){return-u*(o/=y)*(o-2)+i}var Bn=fr;function bn(o,i){for(var u=0;u<i.length;u++){var y=i[u];if(o.immediatePropagationStopped)break;y(o)}}var qn=function(){function o(i){s(this,o),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ae({},i||{})}return p(o,[{key:"fire",value:function(i){var u,y=this.global;(u=this.types[i.type])&&bn(i,u),!i.propagationStopped&&y&&(u=y[i.type])&&bn(i,u)}},{key:"on",value:function(i,u){var y=Ue(i,u);for(i in y)this.types[i]=q(this.types[i]||[],y[i])}},{key:"off",value:function(i,u){var y=Ue(i,u);for(i in y){var x=this.types[i];if(x&&x.length)for(var O=0,J=y[i];O<J.length;O++){var Q=J[O],ge=x.indexOf(Q);ge!==-1&&x.splice(ge,1)}}}},{key:"getRect",value:function(i){return null}}]),o}(),Ln=function(){function o(i){s(this,o),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,H(this,i)}return p(o,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),o}();function kn(o){return g.object(o)?{capture:!!o.capture,passive:!!o.passive}:{capture:!!o,passive:!1}}function Tn(o,i){return o===i||(typeof o=="boolean"?!!i.capture===o&&!i.passive:!!o.capture==!!i.capture&&!!o.passive==!!i.passive)}var $n={id:"events",install:function(o){var i,u=[],y={},x=[],O={add:J,remove:Q,addDelegate:function(De,ea,Ta,Xa,Ga){var al=kn(Ga);if(!y[Ta]){y[Ta]=[];for(var bl=0;bl<x.length;bl++){var ml=x[bl];J(ml,Ta,ge),J(ml,Ta,je,!0)}}var Cl=y[Ta],wl=la(Cl,function(Zl){return Zl.selector===De&&Zl.context===ea});wl||(wl={selector:De,context:ea,listeners:[]},Cl.push(wl)),wl.listeners.push({func:Xa,options:al})},removeDelegate:function(De,ea,Ta,Xa,Ga){var al,bl=kn(Ga),ml=y[Ta],Cl=!1;if(ml)for(al=ml.length-1;al>=0;al--){var wl=ml[al];if(wl.selector===De&&wl.context===ea){for(var Zl=wl.listeners,Dl=Zl.length-1;Dl>=0;Dl--){var jl=Zl[Dl];if(jl.func===Xa&&Tn(jl.options,bl)){Zl.splice(Dl,1),Zl.length||(ml.splice(al,1),Q(ea,Ta,ge),Q(ea,Ta,je,!0)),Cl=!0;break}}if(Cl)break}}},delegateListener:ge,delegateUseCapture:je,delegatedEvents:y,documents:x,targets:u,supportsOptions:!1,supportsPassive:!1};function J(De,ea,Ta,Xa){if(De.addEventListener){var Ga=kn(Xa),al=la(u,function(bl){return bl.eventTarget===De});al||(al={eventTarget:De,events:{}},u.push(al)),al.events[ea]||(al.events[ea]=[]),la(al.events[ea],function(bl){return bl.func===Ta&&Tn(bl.options,Ga)})||(De.addEventListener(ea,Ta,O.supportsOptions?Ga:Ga.capture),al.events[ea].push({func:Ta,options:Ga}))}}function Q(De,ea,Ta,Xa){if(De.addEventListener&&De.removeEventListener){var Ga=_e(u,function(kr){return kr.eventTarget===De}),al=u[Ga];if(al&&al.events)if(ea!=="all"){var bl=!1,ml=al.events[ea];if(ml){if(Ta==="all"){for(var Cl=ml.length-1;Cl>=0;Cl--){var wl=ml[Cl];Q(De,ea,wl.func,wl.options)}return}for(var Zl=kn(Xa),Dl=0;Dl<ml.length;Dl++){var jl=ml[Dl];if(jl.func===Ta&&Tn(jl.options,Zl)){De.removeEventListener(ea,Ta,O.supportsOptions?Zl:Zl.capture),ml.splice(Dl,1),ml.length===0&&(delete al.events[ea],bl=!0);break}}}bl&&!Object.keys(al.events).length&&u.splice(Ga,1)}else for(ea in al.events)al.events.hasOwnProperty(ea)&&Q(De,ea,"all")}}function ge(De,ea){for(var Ta=kn(ea),Xa=new Ln(De),Ga=y[De.type],al=pe(De)[0],bl=al;g.element(bl);){for(var ml=0;ml<Ga.length;ml++){var Cl=Ga[ml],wl=Cl.selector,Zl=Cl.context;if(ve(bl,wl)&&ue(Zl,al)&&ue(Zl,bl)){var Dl=Cl.listeners;Xa.currentTarget=bl;for(var jl=0;jl<Dl.length;jl++){var kr=Dl[jl];Tn(kr.options,Ta)&&kr.func(Xa)}}}bl=Pe(bl)}}function je(De){return ge(De,!0)}return(i=o.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return O.supportsOptions=!0},get passive(){return O.supportsPassive=!0}}),o.events=O,O}},Qr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(o){for(var i=0,u=Qr.methodOrder;i<u.length;i++){var y=u[i],x=Qr[y](o);if(x)return x}return null},simulationResume:function(o){var i=o.pointerType,u=o.eventType,y=o.eventTarget,x=o.scope;if(!/down|start/i.test(u))return null;for(var O=0,J=x.interactions.list;O<J.length;O++){var Q=J[O],ge=y;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ge;){if(ge===Q.element)return Q;ge=Pe(ge)}}return null},mouseOrPen:function(o){var i,u=o.pointerId,y=o.pointerType,x=o.eventType,O=o.scope;if(y!=="mouse"&&y!=="pen")return null;for(var J=0,Q=O.interactions.list;J<Q.length;J++){var ge=Q[J];if(ge.pointerType===y){if(ge.simulation&&!An(ge,u))continue;if(ge.interacting())return ge;i||(i=ge)}}if(i)return i;for(var je=0,De=O.interactions.list;je<De.length;je++){var ea=De[je];if(!(ea.pointerType!==y||/down/i.test(x)&&ea.simulation))return ea}return null},hasPointer:function(o){for(var i=o.pointerId,u=0,y=o.scope.interactions.list;u<y.length;u++){var x=y[u];if(An(x,i))return x}return null},idle:function(o){for(var i=o.pointerType,u=0,y=o.scope.interactions.list;u<y.length;u++){var x=y[u];if(x.pointers.length===1){var O=x.interactable;if(O&&(!O.options.gesture||!O.options.gesture.enabled))continue}else if(x.pointers.length>=2)continue;if(!x.interacting()&&i===x.pointerType)return x}return null}};function An(o,i){return o.pointers.some(function(u){return u.id===i})}var Wn=Qr,$r=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Kn(o,i){return function(u){var y=i.interactions.list,x=ra(u),O=pe(u),J=O[0],Q=O[1],ge=[];if(/^touch/.test(u.type)){i.prevTouchTime=i.now();for(var je=0,De=u.changedTouches;je<De.length;je++){var ea=De[je],Ta={pointer:ea,pointerId:te(ea),pointerType:x,eventType:u.type,eventTarget:J,curEventTarget:Q,scope:i},Xa=fn(Ta);ge.push([Ta.pointer,Ta.eventTarget,Ta.curEventTarget,Xa])}}else{var Ga=!1;if(!ee.supportsPointerEvent&&/mouse/.test(u.type)){for(var al=0;al<y.length&&!Ga;al++)Ga=y[al].pointerType!=="mouse"&&y[al].pointerIsDown;Ga=Ga||i.now()-i.prevTouchTime<500||u.timeStamp===0}if(!Ga){var bl={pointer:u,pointerId:te(u),pointerType:x,eventType:u.type,curEventTarget:Q,eventTarget:J,scope:i},ml=fn(bl);ge.push([bl.pointer,bl.eventTarget,bl.curEventTarget,ml])}}for(var Cl=0;Cl<ge.length;Cl++){var wl=ge[Cl],Zl=wl[0],Dl=wl[1],jl=wl[2];wl[3][o](Zl,u,Dl,jl)}}}function fn(o){var i=o.pointerType,u=o.scope,y={interaction:Wn.search(o),searchDetails:o};return u.fire("interactions:find",y),y.interaction||u.interactions.new({pointerType:i})}function Bi(o,i){var u=o.doc,y=o.scope,x=o.options,O=y.interactions.docEvents,J=y.events,Q=J[i];for(var ge in y.browser.isIOS&&!x.events&&(x.events={passive:!1}),J.delegatedEvents)Q(u,ge,J.delegateListener),Q(u,ge,J.delegateUseCapture,!0);for(var je=x&&x.events,De=0;De<O.length;De++){var ea=O[De];Q(u,ea.type,ea.listener,je)}}var Lo={id:"core/interactions",install:function(o){for(var i={},u=0;u<$r.length;u++){var y=$r[u];i[y]=Kn(y,o)}var x,O=ee.pEventTypes;function J(){for(var Q=0,ge=o.interactions.list;Q<ge.length;Q++){var je=ge[Q];if(je.pointerIsDown&&je.pointerType==="touch"&&!je._interacting)for(var De=function(){var Xa=Ta[ea];o.documents.some(function(Ga){return ue(Ga.doc,Xa.downTarget)})||je.removePointer(Xa.pointer,Xa.event)},ea=0,Ta=je.pointers;ea<Ta.length;ea++)De()}}(x=R.PointerEvent?[{type:O.down,listener:J},{type:O.down,listener:i.pointerDown},{type:O.move,listener:i.pointerMove},{type:O.up,listener:i.pointerUp},{type:O.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:J},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ge=0,je=o.interactions.list;ge<je.length;ge++)je[ge].documentBlur(Q)}}),o.prevTouchTime=0,o.Interaction=function(Q){m(je,Q);var ge=V(je);function je(){return s(this,je),ge.apply(this,arguments)}return p(je,[{key:"pointerMoveTolerance",get:function(){return o.interactions.pointerMoveTolerance},set:function(De){o.interactions.pointerMoveTolerance=De}},{key:"_now",value:function(){return o.now()}}]),je}(pn),o.interactions={list:[],new:function(Q){Q.scopeFire=function(je,De){return o.fire(je,De)};var ge=new o.Interaction(Q);return o.interactions.list.push(ge),ge},listeners:i,docEvents:x,pointerMoveTolerance:1},o.usePlugin(ar)},listeners:{"scope:add-document":function(o){return Bi(o,"add")},"scope:remove-document":function(o){return Bi(o,"remove")},"interactable:unset":function(o,i){for(var u=o.interactable,y=i.interactions.list.length-1;y>=0;y--){var x=i.interactions.list[y];x.interactable===u&&(x.stop(),i.fire("interactions:destroy",{interaction:x}),x.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(y,1))}}},onDocSignal:Bi,doOnInteractions:Kn,methodNames:$r},$o=Lo,En=function(o){return o[o.On=0]="On",o[o.Off=1]="Off",o}(En||{}),Ro=function(){function o(i,u,y,x){s(this,o),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new qn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=i,this._context=u.context||y,this._win=S(Na(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=x,this.set(u)}return p(o,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,u){return g.func(u.onstart)&&this.on("".concat(i,"start"),u.onstart),g.func(u.onmove)&&this.on("".concat(i,"move"),u.onmove),g.func(u.onend)&&this.on("".concat(i,"end"),u.onend),g.func(u.oninertiastart)&&this.on("".concat(i,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,u,y){var x,O=this,J=(x=this._actions.map[i])==null?void 0:x.filterEventType,Q=function(ge){return(J==null||J(ge))&&Pr(ge,O._actions)};(g.array(u)||g.object(u))&&this._onOff(En.Off,i,u,void 0,Q),(g.array(y)||g.object(y))&&this._onOff(En.On,i,y,void 0,Q)}},{key:"setPerAction",value:function(i,u){var y=this._defaults;for(var x in u){var O=x,J=this.options[i],Q=u[O];O==="listeners"&&this.updatePerActionListeners(i,J.listeners,Q),g.array(Q)?J[O]=ze(Q):g.plainObject(Q)?(J[O]=ae(J[O]||{},Tr(Q)),g.object(y.perAction[O])&&"enabled"in y.perAction[O]&&(J[O].enabled=Q.enabled!==!1)):g.bool(Q)&&g.object(y.perAction[O])?J[O].enabled=Q:J[O]=Q}}},{key:"getRect",value:function(i){return i=i||(g.element(this.target)?this.target:null),g.string(this.target)&&(i=i||this._context.querySelector(this.target)),Fe(i)}},{key:"rectChecker",value:function(i){var u=this;return g.func(i)?(this.getRect=function(y){var x=ae({},i.apply(u,y));return"width"in x||(x.width=x.right-x.left,x.height=x.bottom-x.top),x},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,u){if(Na(u)||g.object(u)){for(var y in this.options[i]=u,this._actions.map)this.options[y][i]=u;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return g.string(i)?Array.from(this._context.querySelectorAll(i)):g.func(i)&&i.getAllElements?i.getAllElements():g.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||ue(this._context,i)}},{key:"testIgnoreAllow",value:function(i,u,y){return!this.testIgnore(i.ignoreFrom,u,y)&&this.testAllow(i.allowFrom,u,y)}},{key:"testAllow",value:function(i,u,y){return!i||!!g.element(y)&&(g.string(i)?W(y,i,u):!!g.element(i)&&ue(i,y))}},{key:"testIgnore",value:function(i,u,y){return!(!i||!g.element(y))&&(g.string(i)?W(y,i,u):!!g.element(i)&&ue(i,y))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,u,y,x,O){g.object(u)&&!g.array(u)&&(x=y,y=null);var J=Ue(u,y,O);for(var Q in J){Q==="wheel"&&(Q=ee.wheelEvent);for(var ge=0,je=J[Q];ge<je.length;ge++){var De=je[ge];Pr(Q,this._actions)?this.events[i===En.On?"on":"off"](Q,De):g.string(this.target)?this._scopeEvents[i===En.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,De,x):this._scopeEvents[i===En.On?"add":"remove"](this.target,Q,De,x)}}return this}},{key:"on",value:function(i,u,y){return this._onOff(En.On,i,u,y)}},{key:"off",value:function(i,u,y){return this._onOff(En.Off,i,u,y)}},{key:"set",value:function(i){var u=this._defaults;for(var y in g.object(i)||(i={}),this.options=Tr(u.base),this._actions.methodDict){var x=y,O=this._actions.methodDict[x];this.options[x]={},this.setPerAction(x,ae(ae({},u.perAction),u.actions[x])),this[O](i[x])}for(var J in i)J!=="getRect"?g.func(this[J])&&this[J](i[J]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[i],y=u.length-1;y>=0;y--){var x=u[y],O=x.selector,J=x.context,Q=x.listeners;O===this.target&&J===this._context&&u.splice(y,1);for(var ge=Q.length-1;ge>=0;ge--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ge][0],Q[ge][1])}else this._scopeEvents.remove(this.target,"all")}}]),o}(),Vo=function(){function o(i){var u=this;s(this,o),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(y){var x=y.interactable,O=x.target,J=g.string(O)?u.selectorMap[O]:O[u.scope.id],Q=_e(J,function(ge){return ge===x});J.splice(Q,1)}})}return p(o,[{key:"new",value:function(i,u){u=ae(u||{},{actions:this.scope.actions});var y=new this.scope.Interactable(i,u,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),g.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(y)):(y.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:i,options:u,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(i,u){var y=u&&u.context||this.scope.document,x=g.string(i),O=x?this.selectorMap[i]:i[this.scope.id];if(O)return la(O,function(J){return J._context===y&&(x||J.inContext(i))})}},{key:"forEachMatch",value:function(i,u){for(var y=0,x=this.list;y<x.length;y++){var O=x[y],J=void 0;if((g.string(O.target)?g.element(i)&&ve(i,O.target):i===O.target)&&O.inContext(i)&&(J=u(O)),J!==void 0)return J}}}]),o}(),Fo=function(){function o(){var i=this;s(this,o),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ee,this.defaults=Tr(cr),this.Eventable=qn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var x=function O(J,Q){var ge=y.interactables.getExisting(J,Q);return ge||((ge=y.interactables.new(J,Q)).events.global=O.globalEvents),ge};return x.getPointerAverage=We,x.getTouchBBox=Aa,x.getTouchDistance=Da,x.getTouchAngle=Ze,x.getElementRect=Fe,x.getElementClientRect=Le,x.matchesSelector=ve,x.closest=Ce,x.globalEvents={},x.version="1.10.27",x.scope=y,x.use=function(O,J){return this.scope.usePlugin(O,J),this},x.isSet=function(O,J){return!!this.scope.interactables.get(O,J&&J.context)},x.on=ma(function(O,J,Q){if(g.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),g.array(O)){for(var ge=0,je=O;ge<je.length;ge++){var De=je[ge];this.on(De,J,Q)}return this}if(g.object(O)){for(var ea in O)this.on(ea,O[ea],J);return this}return Pr(O,this.scope.actions)?this.globalEvents[O]?this.globalEvents[O].push(J):this.globalEvents[O]=[J]:this.scope.events.add(this.scope.document,O,J,{options:Q}),this},"The interact.on() method is being deprecated"),x.off=ma(function(O,J,Q){if(g.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),g.array(O)){for(var ge=0,je=O;ge<je.length;ge++){var De=je[ge];this.off(De,J,Q)}return this}if(g.object(O)){for(var ea in O)this.off(ea,O[ea],J);return this}var Ta;return Pr(O,this.scope.actions)?O in this.globalEvents&&(Ta=this.globalEvents[O].indexOf(J))!==-1&&this.globalEvents[O].splice(Ta,1):this.scope.events.remove(this.scope.document,O,J,Q),this},"The interact.off() method is being deprecated"),x.debug=function(){return this.scope},x.supportsTouch=function(){return ee.supportsTouch},x.supportsPointerEvent=function(){return ee.supportsPointerEvent},x.stop=function(){for(var O=0,J=this.scope.interactions.list;O<J.length;O++)J[O].stop();return this},x.pointerMoveTolerance=function(O){return g.number(O)?(this.scope.interactions.pointerMoveTolerance=O,this):this.scope.interactions.pointerMoveTolerance},x.addDocument=function(O,J){this.scope.addDocument(O,J)},x.removeDocument=function(O){this.scope.removeDocument(O)},x}(this),this.InteractEvent=yn,this.Interactable=void 0,this.interactables=new Vo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return i.removeDocument(y.target)};var u=this;this.Interactable=function(y){m(O,y);var x=V(O);function O(){return s(this,O),x.apply(this,arguments)}return p(O,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(J){return _(k(O.prototype),"set",this).call(this,J),u.fire("interactable:set",{options:J,interactable:this}),this}},{key:"unset",value:function(){_(k(O.prototype),"unset",this).call(this);var J=u.interactables.list.indexOf(this);J<0||(u.interactables.list.splice(J,1),u.fire("interactable:unset",{interactable:this}))}}]),O}(Ro)}return p(o,[{key:"addListeners",value:function(i,u){this.listenerMaps.push({id:u,map:i})}},{key:"fire",value:function(i,u){for(var y=0,x=this.listenerMaps;y<x.length;y++){var O=x[y].map[i];if(O&&O(u,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(u,y){return u.isInitialized=!0,g.window(y)&&E(y),R.init(y),ee.init(y),La.init(y),u.window=y,u.document=y.document,u.usePlugin($o),u.usePlugin($n),u}(this,i)}},{key:"pluginIsInstalled",value:function(i){var u=i.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,u),i.listeners&&i.before){for(var y=0,x=this.listenerMaps.length,O=i.before.reduce(function(Q,ge){return Q[ge]=!0,Q[Ti(ge)]=!0,Q},{});y<x;y++){var J=this.listenerMaps[y].id;if(J&&(O[J]||O[Ti(J)]))break}this.listenerMaps.splice(y,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,u){if(this.getDocIndex(i)!==-1)return!1;var y=S(i);u=u?ae({},u):{},this.documents.push({doc:i,options:u}),this.events.documents.push(i),i!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:y,scope:this,options:u})}},{key:"removeDocument",value:function(i){var u=this.getDocIndex(i),y=S(i),x=this.documents[u].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:i,window:y,scope:this,options:x})}},{key:"getDocIndex",value:function(i){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===i)return u;return-1}},{key:"getDocOptions",value:function(i){var u=this.getDocIndex(i);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),o}();function Ti(o){return o&&o.replace(/\/.*$/,"")}var Gi=new Fo,Hr=Gi.interactStatic,Po=typeof globalThis<"u"?globalThis:window;Gi.init(Po);var jo=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(o){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var x=y[0],O=y[1];return x in o||O in o}),u=function(y,x){for(var O=o.range,J=o.limits,Q=J===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:J,ge=o.offset,je=ge===void 0?{x:0,y:0}:ge,De={range:O,grid:o,x:null,y:null},ea=0;ea<i.length;ea++){var Ta=i[ea],Xa=Ta[0],Ga=Ta[1],al=Math.round((y-je.x)/o[Xa]),bl=Math.round((x-je.y)/o[Ga]);De[Xa]=Math.max(Q.left,Math.min(Q.right,al*o[Xa]+je.x)),De[Ga]=Math.max(Q.top,Math.min(Q.bottom,bl*o[Ga]+je.y))}return De};return u.grid=o,u.coordFields=i,u}}),Ai={id:"snappers",install:function(o){var i=o.interactStatic;i.snappers=ae(i.snappers||{},jo),i.createSnapGrid=i.snappers.grid}},Ho=Ai,zi={start:function(o){var i=o.state,u=o.rect,y=o.edges,x=o.pageCoords,O=i.options,J=O.ratio,Q=O.enabled,ge=i.options,je=ge.equalDelta,De=ge.modifiers;J==="preserve"&&(J=u.width/u.height),i.startCoords=ae({},x),i.startRect=ae({},u),i.ratio=J,i.equalDelta=je;var ea=i.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(i.xIsPrimaryAxis=!(!y.left&&!y.right),i.equalDelta){var Ta=(ea.left?1:-1)*(ea.top?1:-1);i.edgeSign={x:Ta,y:Ta}}else i.edgeSign={x:ea.left?-1:1,y:ea.top?-1:1};if(Q!==!1&&ae(y,ea),De!=null&&De.length){var Xa=new jr(o.interaction);Xa.copyFrom(o.interaction.modification),Xa.prepareStates(De),i.subModification=Xa,Xa.startAll(n({},o))}},set:function(o){var i=o.state,u=o.rect,y=o.coords,x=i.linkedEdges,O=ae({},y),J=i.equalDelta?Yi:Ji;if(ae(o.edges,x),J(i,i.xIsPrimaryAxis,y,u),!i.subModification)return null;var Q=ae({},u);ie(x,Q,{x:y.x-O.x,y:y.y-O.y});var ge=i.subModification.setAll(n(n({},o),{},{rect:Q,edges:x,pageCoords:y,prevCoords:y,prevRect:Q})),je=ge.delta;return ge.changed&&(J(i,Math.abs(je.x)>Math.abs(je.y),ge.coords,ge.rect),ae(y,ge.coords)),ge.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Yi(o,i,u){var y=o.startCoords,x=o.edgeSign;i?u.y=y.y+(u.x-y.x)*x.y:u.x=y.x+(u.y-y.y)*x.x}function Ji(o,i,u,y){var x=o.startRect,O=o.startCoords,J=o.ratio,Q=o.edgeSign;if(i){var ge=y.width/J;u.y=O.y+(ge-x.height)*Q.y}else{var je=y.height*J;u.x=O.x+(je-x.width)*Q.x}}var Uo=Er(zi,"aspectRatio"),Xi=function(){};Xi._defaults={};var si=Xi;function nn(o,i,u){return g.func(o)?oe(o,i.interactable,i.element,[u.x,u.y,i]):oe(o,i.interactable,i.element)}var Gn={start:function(o){var i=o.rect,u=o.startOffset,y=o.state,x=o.interaction,O=o.pageCoords,J=y.options,Q=J.elementRect,ge=ae({left:0,top:0,right:0,bottom:0},J.offset||{});if(i&&Q){var je=nn(J.restriction,x,O);if(je){var De=je.right-je.left-i.width,ea=je.bottom-je.top-i.height;De<0&&(ge.left+=De,ge.right+=De),ea<0&&(ge.top+=ea,ge.bottom+=ea)}ge.left+=u.left-i.width*Q.left,ge.top+=u.top-i.height*Q.top,ge.right+=u.right-i.width*(1-Q.right),ge.bottom+=u.bottom-i.height*(1-Q.bottom)}y.offset=ge},set:function(o){var i=o.coords,u=o.interaction,y=o.state,x=y.options,O=y.offset,J=nn(x.restriction,u,i);if(J){var Q=function(ge){return!ge||"left"in ge&&"top"in ge||((ge=ae({},ge)).left=ge.x||0,ge.top=ge.y||0,ge.right=ge.right||ge.left+ge.width,ge.bottom=ge.bottom||ge.top+ge.height),ge}(J);i.x=Math.max(Math.min(Q.right-O.right,i.x),Q.left+O.left),i.y=Math.max(Math.min(Q.bottom-O.bottom,i.y),Q.top+O.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Mi=Er(Gn,"restrict"),Zi={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Qi={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function eo(o,i){for(var u=0,y=["top","left","bottom","right"];u<y.length;u++){var x=y[u];x in o||(o[x]=i[x])}return o}var Yn={noInner:Zi,noOuter:Qi,start:function(o){var i,u=o.interaction,y=o.startOffset,x=o.state,O=x.options;O&&(i=ca(nn(O.offset,u,u.coords.start.page))),i=i||{x:0,y:0},x.offset={top:i.y+y.top,left:i.x+y.left,bottom:i.y-y.bottom,right:i.x-y.right}},set:function(o){var i=o.coords,u=o.edges,y=o.interaction,x=o.state,O=x.offset,J=x.options;if(u){var Q=ae({},i),ge=nn(J.inner,y,Q)||{},je=nn(J.outer,y,Q)||{};eo(ge,Zi),eo(je,Qi),u.top?i.y=Math.min(Math.max(je.top+O.top,Q.y),ge.top+O.top):u.bottom&&(i.y=Math.max(Math.min(je.bottom+O.bottom,Q.y),ge.bottom+O.bottom)),u.left?i.x=Math.min(Math.max(je.left+O.left,Q.x),ge.left+O.left):u.right&&(i.x=Math.max(Math.min(je.right+O.right,Q.x),ge.right+O.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ao=Er(Yn,"restrictEdges"),Jn=ae({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(o){}},Gn.defaults),lo=Er({start:Gn.start,set:Gn.set,defaults:Jn},"restrictRect"),ro={width:-1/0,height:-1/0},Xn={width:1/0,height:1/0},qo=Er({start:function(o){return Yn.start(o)},set:function(o){var i=o.interaction,u=o.state,y=o.rect,x=o.edges,O=u.options;if(x){var J=Ee(nn(O.min,i,o.coords))||ro,Q=Ee(nn(O.max,i,o.coords))||Xn;u.options={endOnly:O.endOnly,inner:ae({},Yn.noInner),outer:ae({},Yn.noOuter)},x.top?(u.options.inner.top=y.bottom-J.height,u.options.outer.top=y.bottom-Q.height):x.bottom&&(u.options.inner.bottom=y.top+J.height,u.options.outer.bottom=y.top+Q.height),x.left?(u.options.inner.left=y.right-J.width,u.options.outer.left=y.right-Q.width):x.right&&(u.options.inner.right=y.left+J.width,u.options.outer.right=y.left+Q.width),Yn.set(o),u.options=O}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ci={start:function(o){var i,u=o.interaction,y=o.interactable,x=o.element,O=o.rect,J=o.state,Q=o.startOffset,ge=J.options,je=ge.offsetWithOrigin?function(Ta){var Xa=Ta.interaction.element,Ga=ca(oe(Ta.state.options.origin,null,null,[Xa])),al=Ga||Be(Ta.interactable,Xa,Ta.interaction.prepared.name);return al}(o):{x:0,y:0};if(ge.offset==="startCoords")i={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var De=oe(ge.offset,y,x,[u]);(i=ca(De)||{x:0,y:0}).x+=je.x,i.y+=je.y}var ea=ge.relativePoints;J.offsets=O&&ea&&ea.length?ea.map(function(Ta,Xa){return{index:Xa,relativePoint:Ta,x:Q.left-O.width*Ta.x+i.x,y:Q.top-O.height*Ta.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(o){var i=o.interaction,u=o.coords,y=o.state,x=y.options,O=y.offsets,J=Be(i.interactable,i.element,i.prepared.name),Q=ae({},u),ge=[];x.offsetWithOrigin||(Q.x-=J.x,Q.y-=J.y);for(var je=0,De=O;je<De.length;je++)for(var ea=De[je],Ta=Q.x-ea.x,Xa=Q.y-ea.y,Ga=0,al=x.targets.length;Ga<al;Ga++){var bl=x.targets[Ga],ml=void 0;(ml=g.func(bl)?bl(Ta,Xa,i._proxy,ea,Ga):bl)&&ge.push({x:(g.number(ml.x)?ml.x:Ta)+ea.x,y:(g.number(ml.y)?ml.y:Xa)+ea.y,range:g.number(ml.range)?ml.range:x.range,source:bl,index:Ga,offset:ea})}for(var Cl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},wl=0;wl<ge.length;wl++){var Zl=ge[wl],Dl=Zl.range,jl=Zl.x-Q.x,kr=Zl.y-Q.y,Sr=Ja(jl,kr),Gr=Sr<=Dl;Dl===1/0&&Cl.inRange&&Cl.range!==1/0&&(Gr=!1),Cl.target&&!(Gr?Cl.inRange&&Dl!==1/0?Sr/Dl<Cl.distance/Cl.range:Dl===1/0&&Cl.range!==1/0||Sr<Cl.distance:!Cl.inRange&&Sr<Cl.distance)||(Cl.target=Zl,Cl.distance=Sr,Cl.range=Dl,Cl.inRange=Gr,Cl.delta.x=jl,Cl.delta.y=kr)}return Cl.inRange&&(u.x=Cl.target.x,u.y=Cl.target.y),y.closest=Cl,Cl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Zn=Er(ci,"snap"),ui={start:function(o){var i=o.state,u=o.edges,y=i.options;if(!u)return null;o.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],ci.start(o),i.offsets=o.state.offsets,o.state=i},set:function(o){var i=o.interaction,u=o.state,y=o.coords,x=u.options,O=u.offsets,J={x:y.x-O[0].x,y:y.y-O[0].y};u.options=ae({},x),u.options.targets=[];for(var Q=0,ge=x.targets||[];Q<ge.length;Q++){var je=ge[Q],De=void 0;if(De=g.func(je)?je(J.x,J.y,i):je){for(var ea=0,Ta=u.targetFields;ea<Ta.length;ea++){var Xa=Ta[ea],Ga=Xa[0],al=Xa[1];if(Ga in De||al in De){De.x=De[Ga],De.y=De[al];break}}u.options.targets.push(De)}}var bl=ci.set(o);return u.options=x,bl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Wo=Er(ui,"snapSize"),Ii={aspectRatio:Uo,restrictEdges:ao,restrict:Mi,restrictRect:lo,restrictSize:qo,snapEdges:Er({start:function(o){var i=o.edges;return i?(o.state.targetFields=o.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],ui.start(o)):null},set:ui.set,defaults:ae(Tr(ui.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Zn,snapSize:Wo,spring:si,avoid:si,transform:si,rubberband:si},Ko={id:"modifiers",install:function(o){var i=o.interactStatic;for(var u in o.usePlugin(Nr),o.usePlugin(Ho),i.modifiers=Ii,Ii){var y=Ii[u],x=y._defaults,O=y._methods;x._methods=O,o.defaults.perAction[u]=x}}},Go=Ko,no=function(o){m(u,o);var i=V(u);function u(y,x,O,J,Q,ge){var je;if(s(this,u),H(D(je=i.call(this,Q)),O),O!==x&&H(D(je),x),je.timeStamp=ge,je.originalEvent=O,je.type=y,je.pointerId=te(x),je.pointerType=ra(x),je.target=J,je.currentTarget=null,y==="tap"){var De=Q.getPointerIndex(x);je.dt=je.timeStamp-Q.pointers[De].downTime;var ea=je.timeStamp-Q.tapTime;je.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===je.target&&ea<500}else y==="doubletap"&&(je.dt=x.timeStamp-Q.tapTime,je.double=!0);return je}return p(u,[{key:"_subtractOrigin",value:function(y){var x=y.x,O=y.y;return this.pageX-=x,this.pageY-=O,this.clientX-=x,this.clientY-=O,this}},{key:"_addOrigin",value:function(y){var x=y.x,O=y.y;return this.pageX+=x,this.pageY+=O,this.clientX+=x,this.clientY+=O,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(U),Qn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(o){o.pointerEvents=Qn,o.defaults.actions.pointerEvents=Qn.defaults,ae(o.actions.phaselessTypes,Qn.types)},listeners:{"interactions:new":function(o){var i=o.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(o){var i=o.down,u=o.pointerInfo;!i&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget;o.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&Oi(o),xn({interaction:u,pointer:y,event:x,eventTarget:O,type:"move"},i))},"interactions:down":function(o,i){(function(u,y){for(var x=u.interaction,O=u.pointer,J=u.event,Q=u.eventTarget,ge=u.pointerIndex,je=x.pointers[ge].hold,De=aa(Q),ea={interaction:x,pointer:O,event:J,eventTarget:Q,type:"hold",targets:[],path:De,node:null},Ta=0;Ta<De.length;Ta++){var Xa=De[Ta];ea.node=Xa,y.fire("pointerEvents:collect-targets",ea)}if(ea.targets.length){for(var Ga=1/0,al=0,bl=ea.targets;al<bl.length;al++){var ml=bl[al].eventable.options.holdDuration;ml<Ga&&(Ga=ml)}je.duration=Ga,je.timeout=setTimeout(function(){xn({interaction:x,eventTarget:Q,pointer:O,event:J,type:"hold"},y)},Ga)}})(o,i),xn(o,i)},"interactions:up":function(o,i){Oi(o),xn(o,i),function(u,y){var x=u.interaction,O=u.pointer,J=u.event,Q=u.eventTarget;x.pointerWasMoved||xn({interaction:x,eventTarget:Q,pointer:O,event:J,type:"tap"},y)}(o,i)},"interactions:cancel":function(o,i){Oi(o),xn(o,i)}},PointerEvent:no,fire:xn,collectEventTargets:io,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 xn(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget,J=o.type,Q=o.targets,ge=Q===void 0?io(o,i):Q,je=new no(J,y,x,O,u,i.now());i.fire("pointerEvents:new",{pointerEvent:je});for(var De={interaction:u,pointer:y,event:x,eventTarget:O,targets:ge,type:J,pointerEvent:je},ea=0;ea<ge.length;ea++){var Ta=ge[ea];for(var Xa in Ta.props||{})je[Xa]=Ta.props[Xa];var Ga=Be(Ta.eventable,Ta.node);if(je._subtractOrigin(Ga),je.eventable=Ta.eventable,je.currentTarget=Ta.node,Ta.eventable.fire(je),je._addOrigin(Ga),je.immediatePropagationStopped||je.propagationStopped&&ea+1<ge.length&&ge[ea+1].node!==je.currentTarget)break}if(i.fire("pointerEvents:fired",De),J==="tap"){var al=je.double?xn({interaction:u,pointer:y,event:x,eventTarget:O,type:"doubletap"},i):je;u.prevTap=al,u.tapTime=al.timeStamp}return je}function io(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget,J=o.type,Q=u.getPointerIndex(y),ge=u.pointers[Q];if(J==="tap"&&(u.pointerWasMoved||!ge||ge.downTarget!==O))return[];for(var je=aa(O),De={interaction:u,pointer:y,event:x,eventTarget:O,type:J,path:je,targets:[],node:null},ea=0;ea<je.length;ea++){var Ta=je[ea];De.node=Ta,i.fire("pointerEvents:collect-targets",De)}return J==="hold"&&(De.targets=De.targets.filter(function(Xa){var Ga,al;return Xa.eventable.options.holdDuration===((Ga=u.pointers[Q])==null||(al=Ga.hold)==null?void 0:al.duration)})),De.targets}function Oi(o){var i=o.interaction,u=o.pointerIndex,y=i.pointers[u].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var Yo=Object.freeze({__proto__:null,default:Qn});function Jo(o){var i=o.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var di={id:"pointer-events/holdRepeat",install:function(o){o.usePlugin(Qn);var i=o.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=o.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(o,i){return o["pointerEvents:".concat(i)]=Jo,o},{"pointerEvents:new":function(o){var i=o.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(o,i){var u=o.interaction,y=o.pointerEvent,x=o.eventTarget,O=o.targets;if(y.type==="hold"&&O.length){var J=O[0].eventable.options.holdRepeatInterval;J<=0||(u.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:u,eventTarget:x,type:"hold",pointer:y,event:y},i)},J))}}})},Xo=di,Zo={id:"pointer-events/interactableTargets",install:function(o){var i=o.Interactable;i.prototype.pointerEvents=function(y){return ae(this.events.options,y),this};var u=i.prototype._backCompatOption;i.prototype._backCompatOption=function(y,x){var O=u.call(this,y,x);return O===this&&(this.events.options[y]=x),O}},listeners:{"pointerEvents:collect-targets":function(o,i){var u=o.targets,y=o.node,x=o.type,O=o.eventTarget;i.interactables.forEachMatch(y,function(J){var Q=J.events,ge=Q.options;Q.types[x]&&Q.types[x].length&&J.testIgnoreAllow(ge,y,O)&&u.push({node:y,eventable:Q,props:{interactable:J}})})},"interactable:new":function(o){var i=o.interactable;i.events.getRect=function(u){return i.getRect(u)}},"interactable:set":function(o,i){var u=o.interactable,y=o.options;ae(u.events.options,i.pointerEvents.defaults),ae(u.events.options,y.pointerEvents||{})}}},Qo=Zo,et={id:"pointer-events",install:function(o){o.usePlugin(Yo),o.usePlugin(Xo),o.usePlugin(Qo)}},oo=et,pi={id:"reflow",install:function(o){var i=o.Interactable;o.actions.phases.reflow=!0,i.prototype.reflow=function(u){return function(y,x,O){for(var J=y.getAllElements(),Q=O.window.Promise,ge=Q?[]:null,je=function(){var ea=J[De],Ta=y.getRect(ea);if(!Ta)return 1;var Xa,Ga=la(O.interactions.list,function(ml){return ml.interacting()&&ml.interactable===y&&ml.element===ea&&ml.prepared.name===x.name});if(Ga)Ga.move(),ge&&(Xa=Ga._reflowPromise||new Q(function(ml){Ga._reflowResolve=ml}));else{var al=Ee(Ta),bl=function(ml){return{coords:ml,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:al.x,y:al.y},client:{x:al.x,y:al.y},timeStamp:O.now()});Xa=function(ml,Cl,wl,Zl,Dl){var jl=ml.interactions.new({pointerType:"reflow"}),kr={interaction:jl,event:Dl,pointer:Dl,eventTarget:wl,phase:"reflow"};jl.interactable=Cl,jl.element=wl,jl.prevEvent=Dl,jl.updatePointer(Dl,Dl,wl,!0),me(jl.coords.delta),ya(jl.prepared,Zl),jl._doPhase(kr);var Sr=ml.window,Gr=Sr.Promise,on=Gr?new Gr(function(wn){jl._reflowResolve=wn}):void 0;return jl._reflowPromise=on,jl.start(Zl,Cl,wl),jl._interacting?(jl.move(kr),jl.end(Dl)):(jl.stop(),jl._reflowResolve()),jl.removePointer(Dl,Dl),on}(O,y,ea,x,bl)}ge&&ge.push(Xa)},De=0;De<J.length&&!je();De++);return ge&&Q.all(ge).then(function(){return y})}(this,u,o)}},listeners:{"interactions:stop":function(o,i){var u=o.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(y,x){y.splice(y.indexOf(x),1)}(i.interactions.list,u))}}},at=pi;if(Hr.use(ar),Hr.use(Rl),Hr.use(oo),Hr.use(Bn),Hr.use(Go),Hr.use(pr),Hr.use(ga),Hr.use(de),Hr.use(at),Hr.default=Hr,t(a)==="object"&&a)try{a.exports=Hr}catch{}return Hr.default=Hr,Hr})}(Fi,Fi.exports)),Fi.exports}var v1=h1();const Ts=A.getDefaultExportFromCjs(v1),Mo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:r}){const n=a,t=r,s=e.inject(Fc),v=e.inject(Pc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const p=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let m=!1,k=!1,c=NaN,D=NaN,V=NaN,_=NaN,G=-1,M=-1,$=-1,j=-1,E=n.x,S=n.y,w=n.w,b=n.h;const g=e.ref(),P=e.reactive({i:e.toRef(n,"i"),state:f,wrapper:g,calcXY:oe});function I(fe){Ue(fe)}function Y(){oa()}function le(fe){cn(n.isDraggable)&&(f.draggable=fe)}function ye(fe){cn(n.isResizable)&&(f.resizable=fe)}function Te(fe){cn(n.isBounded)&&(f.bounded=fe)}function R(fe){f.transformScale=fe}function se(fe){f.rowHeight=fe}function ee(fe){f.maxRows=fe}function ue(){f.rtl=Ns()==="rtl",oa()}function Ce(fe){f.cols=Math.floor(fe)}s.increaseItem(P),e.onBeforeMount(()=>{f.rtl=Ns()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?f.cols=Wc(s.lastBreakpoint,s.cols):f.cols=s.colNum,f.rowHeight=s.rowHeight,f.containerWidth=s.width!==null?s.width:100,f.margin=s.margin!==void 0?s.margin.map(Number):[10,10],f.maxRows=s.maxRows,cn(n.isDraggable)?f.draggable=s.isDraggable:f.draggable=n.isDraggable,cn(n.isResizable)?f.resizable=s.isResizable:f.resizable=n.isResizable,cn(n.isBounded)?f.bounded=s.isBounded:f.bounded=n.isBounded,f.transformScale=s.transformScale,f.useCssTransforms=s.useCssTransforms,f.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=n.x,S=n.y,b=n.h,w=n.w,Yr(Fe)}),v.on("updateWidth",I),v.on("compact",Y),v.on("setDraggable",le),v.on("setResizable",ye),v.on("setBounded",Te),v.on("setTransformScale",R),v.on("setRowHeight",se),v.on("setMaxRows",ee),v.on("directionchange",ue),v.on("setColNum",Ce)}),e.onBeforeUnmount(()=>{v.off("updateWidth",I),v.off("compact",Y),v.off("setDraggable",le),v.off("setResizable",ye),v.off("setBounded",Te),v.off("setTransformScale",R),v.off("setRowHeight",se),v.off("setMaxRows",ee),v.off("directionchange",ue),v.off("setColNum",Ce),p.value&&(p.value.unset(),p.value=null),s.decreaseItem(P)}),l({state:f,wrapper:g});const Pe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ve=e.computed(()=>f.resizable&&!n.static),B=e.computed(()=>s.isMirrored?!f.rtl:f.rtl),ce=e.computed(()=>(f.draggable||f.resizable)&&!n.static),W=i1("item"),Se=e.computed(()=>({[W.b()]:!0,[W.bm("resizable")]:ve.value,[W.bm("static")]:n.static,[W.bm("resizing")]:f.isResizing,[W.bm("dragging")]:f.isDragging,[W.bm("transform")]:f.useCssTransforms,[W.bm("rtl")]:B.value,[W.bm("no-touch")]:Pe&&ce.value})),Le=e.computed(()=>[W.be("resizer"),B.value&&W.bem("resizer","rtl")].filter(Boolean));e.watch(()=>n.isDraggable,fe=>{f.draggable=fe}),e.watch(()=>n.static,()=>{Yr(H),Yr(me)}),e.watch(()=>f.draggable,()=>{Yr(H)}),e.watch(()=>n.isResizable,fe=>{f.resizable=fe}),e.watch(()=>n.isBounded,fe=>{f.bounded=fe}),e.watch(()=>f.resizable,()=>{Yr(me)}),e.watch(()=>f.rowHeight,()=>{Yr(Fe),Yr(aa)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{Yr(me),Yr(Fe),Yr(aa)}),e.watch([()=>n.minH,()=>n.maxH,()=>n.minW,()=>n.maxW],()=>{Yr(me)}),e.watch(B,()=>{Yr(me),Yr(Fe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const fe=s.margin;!fe||fe[0]===f.margin[0]&&fe[1]===f.margin[1]||(f.margin=fe.map(Number),Yr(Fe),Yr(aa))});function Fe(){n.x+n.w>f.cols?(E=0,w=n.w>f.cols?f.cols:n.w):(E=n.x,w=n.w);const fe=ta(E,S,w,b);f.isDragging&&(fe.top=f.dragging.top,B.value?fe.right=f.dragging.left:fe.left=f.dragging.left),f.isResizing&&(fe.width=f.resizing.width,fe.height=f.resizing.height);let da;f.useCssTransforms?B.value?da=a1(fe.top,fe.right,fe.width,fe.height):da=e1(fe.top,fe.left,fe.width,fe.height):B.value?da=r1(fe.top,fe.right,fe.width,fe.height):da=l1(fe.top,fe.left,fe.width,fe.height),f.style=da}function aa(){const fe={};for(const da of["width","height"]){const Qe=f.style[da].match(/^(\d+)px$/);if(!Qe)return;fe[da]=Qe[1]}t("container-resized",n.i,n.h,n.w,fe.height,fe.width)}function Na(fe){if(n.static)return;const da=fe.type;if(da==="resizestart"&&f.isResizing||da!=="resizestart"&&!f.isResizing)return;const Qe=Cs(fe);if(cn(Qe))return;const{x:te,y:pa}=Qe,Ne={width:0,height:0};let We;switch(da){case"resizestart":{me(),G=w,M=b,We=ta(E,S,w,b),Ne.width=We.width,Ne.height=We.height,f.resizing=Ne,f.isResizing=!0;break}case"resizemove":{!fe.edges.right&&!fe.edges.left&&(V=te),!fe.edges.top&&!fe.edges.bottom&&(_=pa);const Aa=Ds(V,_,te,pa);B.value?Ne.width=f.resizing.width-Aa.deltaX/f.transformScale:Ne.width=f.resizing.width+Aa.deltaX/f.transformScale,Ne.height=f.resizing.height+Aa.deltaY/f.transformScale,f.resizing=Ne;break}case"resizeend":{We=ta(E,S,w,b),Ne.width=We.width,Ne.height=We.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}We=Be(Ne.height,Ne.width),We.w<n.minW&&(We.w=n.minW),We.w>n.maxW&&(We.w=n.maxW),We.h<n.minH&&(We.h=n.minH),We.h>n.maxH&&(We.h=n.maxH),We.h<1&&(We.h=1),We.w<1&&(We.w=1),V=te,_=pa,(w!==We.w||b!==We.h)&&t("resize",n.i,We.h,We.w,Ne.height,Ne.width),fe.type==="resizeend"&&(G!==w||M!==b)&&t("resized",n.i,We.h,We.w,Ne.height,Ne.width),v.emit("resizeEvent",fe.type,n.i,E,S,We.h,We.w)}function ae(fe){if(n.static||f.isResizing)return;const da=fe.type;if(da==="dragstart"&&f.isDragging||da!=="dragstart"&&!f.isDragging)return;const Qe=Cs(fe);if(cn(Qe))return;const{x:te,y:pa}=Qe,Ne=fe.target;if(!Ne.offsetParent)return;const We={top:0,left:0};switch(da){case"dragstart":{$=E,j=S;const Da=Ne.offsetParent.getBoundingClientRect(),Ze=Ne.getBoundingClientRect(),ra=Ze.left/f.transformScale,pe=Da.left/f.transformScale,U=Ze.right/f.transformScale,q=Da.right/f.transformScale,ze=Ze.top/f.transformScale,_e=Da.top/f.transformScale;B.value?We.left=(U-q)*-1:We.left=ra-pe,We.top=ze-_e,f.dragging=We,f.isDragging=!0;break}case"dragmove":{const Da=Ds(c,D,te,pa);if(B.value?We.left=f.dragging.left-Da.deltaX/f.transformScale:We.left=f.dragging.left+Da.deltaX/f.transformScale,We.top=f.dragging.top+Da.deltaY/f.transformScale,f.bounded){const Ze=Ne.offsetParent.clientHeight-Ee(n.h,f.rowHeight,f.margin[1]);We.top=ie(We.top,0,Ze);const ra=ca(),pe=f.containerWidth-Ee(n.w,ra,f.margin[0]);We.left=ie(We.left,0,pe)}f.dragging=We;break}case"dragend":{const Da=Ne.offsetParent.getBoundingClientRect(),Ze=Ne.getBoundingClientRect(),ra=Ze.left/f.transformScale,pe=Da.left/f.transformScale,U=Ze.right/f.transformScale,q=Da.right/f.transformScale,ze=Ze.top/f.transformScale,_e=Da.top/f.transformScale;B.value?We.left=(U-q)*-1:We.left=ra-pe,We.top=ze-_e,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Aa;B.value,Aa=oe(We.top,We.left),c=te,D=pa,(E!==Aa.x||S!==Aa.y)&&t("move",n.i,Aa.x,Aa.y),fe.type==="dragend"&&($!==E||j!==S)&&t("moved",n.i,Aa.x,Aa.y),v.emit("dragEvent",fe.type,n.i,Aa.x,Aa.y,b,w)}function ta(fe,da,Qe,te){const pa=ca();let Ne;return B.value?Ne={right:Math.round(pa*fe+(fe+1)*f.margin[0]),top:Math.round(f.rowHeight*da+(da+1)*f.margin[1]),width:Qe===1/0?Qe:Math.round(pa*Qe+Math.max(0,Qe-1)*f.margin[0]),height:te===1/0?te:Math.round(f.rowHeight*te+Math.max(0,te-1)*f.margin[1])}:Ne={left:Math.round(pa*fe+(fe+1)*f.margin[0]),top:Math.round(f.rowHeight*da+(da+1)*f.margin[1]),width:Qe===1/0?Qe:Math.round(pa*Qe+Math.max(0,Qe-1)*f.margin[0]),height:te===1/0?te:Math.round(f.rowHeight*te+Math.max(0,te-1)*f.margin[1])},Ne}function oe(fe,da){const Qe=ca();let te=Math.round((da-f.margin[0])/(Qe+f.margin[0])),pa=Math.round((fe-f.margin[1])/(f.rowHeight+f.margin[1]));return te=Math.max(Math.min(te,f.cols-w),0),pa=Math.max(Math.min(pa,f.maxRows-b),0),{x:te,y:pa}}function ca(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Ee(fe,da,Qe){return Number.isFinite(fe)?Math.round(da*fe+Math.max(0,fe-1)*Qe):fe}function ie(fe,da,Qe){return Math.max(Math.min(fe,Qe),da)}function Be(fe,da,Qe=!1){const te=ca();let pa=Math.round((da+f.margin[0])/(te+f.margin[0])),Ne=0;return Qe?Ne=Math.ceil((fe+f.margin[1])/(f.rowHeight+f.margin[1])):Ne=Math.round((fe+f.margin[1])/(f.rowHeight+f.margin[1])),pa=Math.max(Math.min(pa,f.cols-E),0),Ne=Math.max(Math.min(Ne,f.maxRows-S),0),{w:pa,h:Ne}}function Ue(fe,da){f.containerWidth=fe}function oa(){Fe()}function Ja(){!p.value&&g.value&&(p.value=Ts(g.value),f.useStyleCursor||p.value.styleCursor(!1))}const L=_s(ae);function H(){if(Ja(),!!p.value)if(f.draggable&&!n.static){const fe={ignoreFrom:n.dragIgnoreFrom,allowFrom:n.dragAllowFrom,...n.dragOption};p.value.draggable(fe),m||(m=!0,p.value.on("dragstart dragmove dragend",da=>{da.type==="dragmove"?L(da):ae(da)}))}else p.value.draggable({enabled:!1})}const Z=_s(Na);function me(){if(Ja(),!!p.value)if(f.resizable&&!n.static){const fe=ta(0,0,n.maxW,n.maxH),da=ta(0,0,n.minW,n.minH),Qe={edges:{left:B.value?`.${Le.value[0]}`:!1,right:B.value?!1:`.${Le.value[0]}`,bottom:`.${Le.value[0]}`,top:!1},ignoreFrom:n.resizeIgnoreFrom,restrictSize:{min:{height:da.height*f.transformScale,width:da.width*f.transformScale},max:{height:fe.height*f.transformScale,width:fe.width*f.transformScale}},...n.resizeOption};n.preserveAspectRatio&&(Qe.modifiers=[Ts.modifiers.aspectRatio({ratio:"preserve"})]),p.value.resizable(Qe),k||(k=!0,p.value.on("resizestart resizemove resizeend",te=>{te.type==="resizemove"?Z(te):Na(te)}))}else p.value.resizable({enabled:!1})}return(fe,da)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:g,class:e.normalizeClass(Se.value),style:e.normalizeStyle(f.style)},[e.renderSlot(fe.$slots,"default"),ve.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Le.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ti=typeof window<"u";var As;ti&&(As=window==null?void 0:window.navigator)!=null&&As.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function zs(a){return a!=null}function Ms(){}const m1=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(m1)));const y1=ti&&("ontouchstart"in window||b1()>0),g1=y1?"pointerdown":"click";function b1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function k1(a,l,r=window.Event){const{type:n,bubbles:t=!1,cancelable:s=!1,...v}=l;if(!zs(n)||n==="")return!1;let p;return zs(r)?p=new r(n,{bubbles:t,cancelable:s}):(p=document.createEvent("HTMLEvents"),p.initEvent(n,t,s)),Object.assign(p,v),a.dispatchEvent(p)}const x1="clickoutside",w1=new Set;ti&&document.addEventListener(g1,a=>{const l=a.target,r=a.composedPath&&a.composedPath();w1.forEach(n=>{n!==l&&(r?!r.includes(n):!n.contains(l))&&(!n.__transferElement||n.__transferElement!==l&&!n.__transferElement.contains(l))&&k1(n,{type:x1})})},!0);const _1=[["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 xo;if(ti){for(const a of _1)if(a[1]in document){xo=a;break}}e.computed(()=>!1);const S1=new Set,E1=new WeakMap;if(ti&&xo){const a=xo[2],l=xo[4];document.addEventListener(l,()=>{if(S1.forEach(r=>{r.value=!1}),document[a]){const r=E1.get(document[a]);r&&(r.value=!0)}},!1)}const Gc=new Map;Gc.set("x",0);Gc.set("y",0);var ii=[],C1=function(){return ii.some(function(a){return a.activeTargets.length>0})},D1=function(){return ii.some(function(a){return a.skippedTargets.length>0})},Is="ResizeObserver loop completed with undelivered notifications.",N1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Is}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Is),window.dispatchEvent(a)},Ki;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ki||(Ki={}));var oi=function(a){return Object.freeze(a)},B1=function(){function a(l,r){this.inlineSize=l,this.blockSize=r,oi(this)}return a}(),Yc=function(){function a(l,r,n,t){return this.x=l,this.y=r,this.width=n,this.height=t,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,oi(this)}return a.prototype.toJSON=function(){var l=this,r=l.x,n=l.y,t=l.top,s=l.right,v=l.bottom,p=l.left,f=l.width,m=l.height;return{x:r,y:n,top:t,right:s,bottom:v,left:p,width:f,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Bt=function(a){return a instanceof SVGElement&&"getBBox"in a},Jc=function(a){if(Bt(a)){var l=a.getBBox(),r=l.width,n=l.height;return!r&&!n}var t=a,s=t.offsetWidth,v=t.offsetHeight;return!(s||v||a.getClientRects().length)},Os=function(a){var l;if(a instanceof Element)return!0;var r=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(r&&a instanceof r.Element)},T1=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},Ui=typeof window<"u"?window:{},yo=new WeakMap,Ls=/auto|scroll/,A1=/^tb|vertical/,z1=/msie|trident/i.test(Ui.navigator&&Ui.navigator.userAgent),Dn=function(a){return parseFloat(a||"0")},Ei=function(a,l,r){return a===void 0&&(a=0),l===void 0&&(l=0),r===void 0&&(r=!1),new B1((r?l:a)||0,(r?a:l)||0)},$s=oi({devicePixelContentBoxSize:Ei(),borderBoxSize:Ei(),contentBoxSize:Ei(),contentRect:new Yc(0,0,0,0)}),Xc=function(a,l){if(l===void 0&&(l=!1),yo.has(a)&&!l)return yo.get(a);if(Jc(a))return yo.set(a,$s),$s;var r=getComputedStyle(a),n=Bt(a)&&a.ownerSVGElement&&a.getBBox(),t=!z1&&r.boxSizing==="border-box",s=A1.test(r.writingMode||""),v=!n&&Ls.test(r.overflowY||""),p=!n&&Ls.test(r.overflowX||""),f=n?0:Dn(r.paddingTop),m=n?0:Dn(r.paddingRight),k=n?0:Dn(r.paddingBottom),c=n?0:Dn(r.paddingLeft),D=n?0:Dn(r.borderTopWidth),V=n?0:Dn(r.borderRightWidth),_=n?0:Dn(r.borderBottomWidth),G=n?0:Dn(r.borderLeftWidth),M=c+m,$=f+k,j=G+V,E=D+_,S=p?a.offsetHeight-E-a.clientHeight:0,w=v?a.offsetWidth-j-a.clientWidth:0,b=t?M+j:0,g=t?$+E:0,P=n?n.width:Dn(r.width)-b-w,I=n?n.height:Dn(r.height)-g-S,Y=P+M+w+j,le=I+$+S+E,ye=oi({devicePixelContentBoxSize:Ei(Math.round(P*devicePixelRatio),Math.round(I*devicePixelRatio),s),borderBoxSize:Ei(Y,le,s),contentBoxSize:Ei(P,I,s),contentRect:new Yc(c,f,P,I)});return yo.set(a,ye),ye},Zc=function(a,l,r){var n=Xc(a,r),t=n.borderBoxSize,s=n.contentBoxSize,v=n.devicePixelContentBoxSize;switch(l){case Ki.DEVICE_PIXEL_CONTENT_BOX:return v;case Ki.BORDER_BOX:return t;default:return s}},M1=function(){function a(l){var r=Xc(l);this.target=l,this.contentRect=r.contentRect,this.borderBoxSize=oi([r.borderBoxSize]),this.contentBoxSize=oi([r.contentBoxSize]),this.devicePixelContentBoxSize=oi([r.devicePixelContentBoxSize])}return a}(),Qc=function(a){if(Jc(a))return 1/0;for(var l=0,r=a.parentNode;r;)l+=1,r=r.parentNode;return l},I1=function(){var a=1/0,l=[];ii.forEach(function(s){if(s.activeTargets.length!==0){var v=[];s.activeTargets.forEach(function(p){var f=new M1(p.target),m=Qc(p.target);v.push(f),p.lastReportedSize=Zc(p.target,p.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,v,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var r=0,n=l;r<n.length;r++){var t=n[r];t()}return a},Rs=function(a){ii.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(r){r.isActive()&&(Qc(r.target)>a?l.activeTargets.push(r):l.skippedTargets.push(r))})})},O1=function(){var a=0;for(Rs(a);C1();)a=I1(),Rs(a);return D1()&&N1(),a>0},ut,eu=[],L1=function(){return eu.splice(0).forEach(function(a){return a()})},$1=function(a){if(!ut){var l=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return L1()}).observe(r,n),ut=function(){r.textContent="".concat(l?l--:l++)}}eu.push(a),ut()},R1=function(a){$1(function(){requestAnimationFrame(a)})},wo=0,V1=function(){return!!wo},F1=250,P1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vs=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fs=function(a){return a===void 0&&(a=0),Date.now()+a},dt=!1,j1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var r=this;if(l===void 0&&(l=F1),!dt){dt=!0;var n=Fs(l);R1(function(){var t=!1;try{t=O1()}finally{if(dt=!1,l=n-Fs(),!V1())return;t?r.run(1e3):l>0?r.run(l):r.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,r=function(){return l.observer&&l.observer.observe(document.body,P1)};document.body?r():Ui.addEventListener("DOMContentLoaded",r)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vs.forEach(function(r){return Ui.addEventListener(r,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Vs.forEach(function(r){return Ui.removeEventListener(r,l.listener,!0)}),this.stopped=!0)},a}(),St=new j1,Ps=function(a){!wo&&a>0&&St.start(),wo+=a,!wo&&St.stop()},H1=function(a){return!Bt(a)&&!T1(a)&&getComputedStyle(a).display==="inline"},U1=function(){function a(l,r){this.target=l,this.observedBox=r||Ki.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=Zc(this.target,this.observedBox,!0);return H1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),q1=function(){function a(l,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=r}return a}(),go=new WeakMap,js=function(a,l){for(var r=0;r<a.length;r+=1)if(a[r].target===l)return r;return-1},bo=function(){function a(){}return a.connect=function(l,r){var n=new q1(l,r);go.set(l,n)},a.observe=function(l,r,n){var t=go.get(l),s=t.observationTargets.length===0;js(t.observationTargets,r)<0&&(s&&ii.push(t),t.observationTargets.push(new U1(r,n&&n.box)),Ps(1),St.schedule())},a.unobserve=function(l,r){var n=go.get(l),t=js(n.observationTargets,r),s=n.observationTargets.length===1;t>=0&&(s&&ii.splice(ii.indexOf(n),1),n.observationTargets.splice(t,1),Ps(-1))},a.disconnect=function(l){var r=this,n=go.get(l);n.observationTargets.slice().forEach(function(t){return r.unobserve(l,t.target)}),n.activeTargets.splice(0,n.activeTargets.length)},a}(),W1=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.");bo.connect(this,l)}return a.prototype.observe=function(l,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Os(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");bo.observe(this,l,r)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Os(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");bo.unobserve(this,l)},a.prototype.disconnect=function(){bo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Io=new WeakMap;function K1(a){var l;for(let r=0,n=a.length;r<n;++r){const t=a[r],s=Io.get(t.target);if(typeof s=="function"){const{inlineSize:v,blockSize:p}=((l=t.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:m}=t.target;s(Object.assign(t,{offsetWidth:f,offsetHeight:m,width:v??f,height:p??m}))}}}const au=new(ti&&window.ResizeObserver||W1)(K1);function Hs(a,l){Io.set(a,l),au.observe(a)}function Us(a){Io.has(a)&&(au.unobserve(a),Io.delete(a))}function G1(a={}){let l=Ms;const r=e.watch(()=>e.unref(a.target),t=>{l(),!(!t||typeof a.onResize!="function")&&(Hs(t,a.onResize),l=()=>{Us(t),l=Ms})},{immediate:!0}),n=()=>{r(),l()};return e.getCurrentScope()&&e.onScopeDispose(n),{observeResize:Hs,unobserveResize:Us,unobserve:n}}const Y1=e.ref(!1);e.computed(()=>Y1.value);const qs="__theme_style__",pt="__theme_observer__",Ws=e.reactive(new Map),Ks=new Map;e.watch(Ws,()=>{if(!ti)return;Ks.clear();const a=document.head.querySelector(`#${qs}`);a&&document.head.removeChild(a);const l=document.createElement("style");let r=`.${pt} { width: 1px }`,n=1;for(const[t,[s,v]]of Ws.entries())r+=` html.${s} .${pt}, .${v} .${pt} { width: ${++n}px }`,Ks.set(n,t);l.textContent=r,l.id=qs,document.head.appendChild(l)});const lu=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:r}){const n=a,t=r,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),v=new Map,p=e.ref(n.layout),f=e.ref(),{observeResize:m,unobserveResize:k}=G1(),c=K6();c.on("resizeEvent",D),c.on("dragEvent",V),e.onBeforeMount(()=>{t("layout-before-mount",p.value)}),e.onMounted(()=>{t("layout-mounted",p.value),e.nextTick(()=>{n1(p.value),s.originalLayout=p.value,e.nextTick(()=>{I(),f.value&&m(f.value,G6(E,16)),wi(p.value,n.verticalCompact),t("layout-updated",p.value),j(),E()})})}),e.onBeforeUnmount(()=>{c.clearAll(),f.value&&k(f.value)});function D(le,ye,Te,R,se,ee){g(le,ye,Te,R,se,ee)}function V(le,ye,Te,R,se,ee){b(le,ye,Te,R,se,ee)}e.watch(()=>s.width,(le,ye)=>{e.nextTick(()=>{c.emit("updateWidth",le),ye===-1&&e.nextTick(()=>{t("layout-ready",p.value)}),j()})}),e.watch(()=>[n.layout,n.layout.length],()=>{p.value=n.layout,$()}),e.watch(()=>n.colNum,le=>{c.emit("setColNum",le)}),e.watch(()=>n.rowHeight,le=>{c.emit("setRowHeight",le)}),e.watch(()=>n.isDraggable,le=>{c.emit("setDraggable",le)}),e.watch(()=>n.isResizable,le=>{c.emit("setResizable",le)}),e.watch(()=>n.isBounded,le=>{c.emit("setBounded",le)}),e.watch(()=>n.transformScale,le=>{c.emit("setTransformScale",le)}),e.watch(()=>n.responsive,le=>{le||(t("update:layout",s.originalLayout),c.emit("setColNum",n.colNum)),E()}),e.watch(()=>n.maxRows,le=>{c.emit("setMaxRows",le)}),e.watch([()=>n.margin,()=>n.margin[1]],j),e.provide(Fc,e.reactive({...e.toRefs(n),...e.toRefs(s),increaseItem:_,decreaseItem:G})),e.provide(Pc,c),l({state:s,getItem:M,resizeEvent:g,dragEvent:b,layoutUpdate:$});function _(le){v.set(le.i,le)}function G(le){v.delete(le.i)}function M(le){return v.get(le)}function $(){if(!cn(p.value)&&!cn(s.originalLayout)){if(p.value.length!==s.originalLayout.length){const le=Y(p.value,s.originalLayout);if(le.length>0)if(p.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(le);else{const ye=new Set(le.map(Te=>Te.i));s.originalLayout=s.originalLayout.filter(Te=>!ye.has(Te.i))}s.lastLayoutLength=p.value.length,I()}wi(p.value,n.verticalCompact),c.emit("updateWidth",s.width),j(),t("layout-updated",p.value)}}function j(){s.mergedStyle={height:S()}}function E(){f.value&&(s.width=f.value.offsetWidth),c.emit("resizeEvent")}function S(){if(!n.autoSize)return;const le=parseFloat(n.margin[1]);return J6(p.value)*(n.rowHeight+le)+le+"px"}let w;function b(le,ye,Te,R,se,ee){let ue=Ss(p.value,ye);cn(ue)&&(ue={h:0,w:0,x:0,y:0,i:""}),le==="dragstart"&&!n.verticalCompact&&(w=p.value.reduce((Ce,{i:Pe,x:ve,y:B})=>({...Ce,[Pe]:{x:ve,y:B}}),{})),le==="dragmove"||le==="dragstart"?(s.placeholder.i=ye,s.placeholder.x=ue.x,s.placeholder.y=ue.y,s.placeholder.w=ee,s.placeholder.h=se,e.nextTick(()=>{s.isDragging=!0}),c.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),p.value=_t(p.value,ue,Te,R,!0,n.preventCollision),n.restoreOnDrag?(ue.static=!0,wi(p.value,n.verticalCompact,w),ue.static=!1):wi(p.value,n.verticalCompact),c.emit("compact"),j(),le==="dragend"&&(w=void 0,t("layout-updated",p.value))}function g(le,ye,Te,R,se,ee){let ue=Ss(p.value,ye);cn(ue)&&(ue={h:0,w:0,x:0,y:0,i:""});let Ce;if(n.preventCollision){const Pe=Hc(p.value,{...ue,w:ee,h:se}).filter(ve=>ve.i!==ue.i);if(Ce=Pe.length>0,Ce){let ve=1/0,B=1/0;Pe.forEach(ce=>{ce.x>ue.x&&(ve=Math.min(ve,ce.x)),ce.y>ue.y&&(B=Math.min(B,ce.y))}),Number.isFinite(ve)&&(ue.w=ve-ue.x),Number.isFinite(B)&&(ue.h=B-ue.y)}}Ce||(ue.w=ee,ue.h=se),le==="resizestart"||le==="resizemove"?(s.placeholder.i=ye,s.placeholder.x=Te,s.placeholder.y=R,s.placeholder.w=ue.w,s.placeholder.h=ue.h,e.nextTick(()=>{s.isDragging=!0}),c.emit("updateWidth",s.width)):le&&e.nextTick(()=>{s.isDragging=!1}),n.responsive&&P(),wi(p.value,n.verticalCompact),c.emit("compact"),j(),le==="resizeend"&&t("layout-updated",p.value)}function P(){const le=c1(n.breakpoints,s.width);if(le===s.lastBreakpoint)return;const ye=Wc(le,n.cols);!cn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=wt(p.value));const Te=u1(s.originalLayout,s.layouts,n.breakpoints,le,s.lastBreakpoint,ye,n.verticalCompact);s.layouts[le]=Te,s.lastBreakpoint!==le&&t("breakpoint-changed",le,Te),p.value=Te,t("update:layout",Te),s.lastBreakpoint=le,c.emit("setColNum",ye)}function I(){s.layouts=Object.assign({},n.responsiveLayouts)}function Y(le,ye){const Te=new Set(ye.map(ue=>ue.i)),R=new Set(le.map(ue=>ue.i)),se=le.filter(ue=>!Te.has(ue.i)),ee=ye.filter(ue=>!R.has(ue.i));return se.concat(ee)}return(le,ye)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[le.$slots.default?e.renderSlot(le.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,Te=>(e.openBlock(),e.createBlock(Mo,e.mergeProps({key:Te.i,ref_for:!0},Te),{default:e.withCtx(()=>[e.renderSlot(le.$slots,"item",{item:Te})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Mo,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const J1={key:0,class:"item-view-group"},X1={key:0,class:"item-view-group"},Z1=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const r=A.useModelComp(A.pinia),{isEdit:n}=A.storeToRefs(r),t=Un(A.pinia),s=l,v=a,p=e.ref(""),f=e.computed(()=>v==null?void 0:v.children),m=e.computed(()=>{var j,E,S,w;return((j=v==null?void 0:v.children)==null?void 0:j.length)>0&&((E=v==null?void 0:v.children)!=null&&E.every(b=>b==null?void 0:b.layout))?(w=(S=v==null?void 0:v.children)==null?void 0:S[0])==null?void 0:w.layout:"vertical"}),k=j=>{p.value=j,s("radioChange",j)},c=e.computed(()=>{var j,E;return((E=(j=v==null?void 0:v.children)==null?void 0:j[0])==null?void 0:E.isGridLayout)||!1}),D=e.ref((v==null?void 0:v.level)+1),V=e.computed(()=>{if(!(v!=null&&v.children)||!Array.isArray(v.children)||v.children.length<2)return!1;const j=v.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),E=v.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return j&&E}),_=e.computed(()=>{var E,S,w,b,g,P;let j=(E=v==null?void 0:v.children)==null?void 0:E.filter(I=>I==null?void 0:I.choice);if(t.setSelectTab((S=j==null?void 0:j[0])==null?void 0:S.choiceName),(p==null?void 0:p.value)!=="")return(w=v==null?void 0:v.children)==null?void 0:w.filter(I=>!(I!=null&&I.choiceName)||(I==null?void 0:I.choiceName)===(p==null?void 0:p.value));{let I=(g=(b=v==null?void 0:v.children)==null?void 0:b.find(Y=>Y==null?void 0:Y.choice))==null?void 0:g.choiceName;return(P=v==null?void 0:v.children)==null?void 0:P.filter(Y=>!(Y!=null&&Y.choiceName)||(Y==null?void 0:Y.choiceName)===I)}}),G=j=>{const E=(j==null?void 0:j.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(S=>{const w=typeof S=="string"?S:JSON.stringify(S);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>v==null?void 0:v.children,()=>{V.value},{deep:!0});const M=j=>{s("rowClick",j)},$=(j,E)=>{s("routeUrl",j,E)};return(j,E)=>c.value?(e.openBlock(),e.createBlock(e.unref(lu),{key:0,layout:f.value,"onUpdate:layout":E[0]||(E[0]=S=>f.value=S),"is-draggable":e.unref(n)==="edit","is-resizable":e.unref(n)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(S,w)=>(e.openBlock(),e.createBlock(e.unref(Mo),{key:S.i,x:S.x,y:S.y,"min-h":S.minH,"max-h":S.maxH,"min-w":S.minW,w:S.w,h:S.h,i:S.i},{default:e.withCtx(()=>{var b,g,P,I,Y,le,ye,Te,R,se,ee,ue,Ce,Pe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((b=v==null?void 0:v.children)==null?void 0:b.length)-1?"0px":"24px"})},[((P=(g=S==null?void 0:S.component)==null?void 0:g.comp)==null?void 0:P.toUpperCase())!=="TABLE"&&((I=S==null?void 0:S.component)!=null&&I.name)?(e.openBlock(),e.createElementBlock("div",J1,[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((Y=S==null?void 0:S.component)==null?void 0:Y.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)((le=S==null?void 0:S.component)==null?void 0:le.comp)),{pageLayout:m.value,config:{showIndex:(ye=e.unref(or)[w])==null?void 0:ye.showIndex,allowMove:(Te=e.unref(or)[w])==null?void 0:Te.allowMove,viewport:(R=e.unref(or)[w])==null?void 0:R.viewport,status:(se=e.unref(or)[w])==null?void 0:se.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:e.unref(xc),itemData:(ee=S==null?void 0:S.component)==null?void 0:ee.compData,childItemData:(ue=S==null?void 0:S.component)==null?void 0:ue.itemChildData,key:e.unref(Hn),cacheNewData:e.unref(kc),onChange:e.unref(Bo),index:(S==null?void 0:S.id)??w,onContentChange:e.unref(To),onPageChange:e.unref(Ao),parentTableId:(Ce=S==null?void 0:S.component)==null?void 0:Ce.tableId,allMapContents:e.unref(bt),children:(Pe=S==null?void 0:S.component)==null?void 0:Pe.children,level:D.value,onRowClick:M,onRouteUrl:$,onClickTrigger:e.unref(wc),onClickMainKey:e.unref(_c),onRadioChange:k},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,w)=>{var b,g;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(w)===((b=v==null?void 0:v.children)==null?void 0:b.length)-1?"0px":"24px"})},[((g=S==null?void 0:S.comp)==null?void 0:g.toUpperCase())!=="TABLE"&&S.name?(e.openBlock(),e.createElementBlock("div",X1,[G(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(Wi)(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(Hn),onChange:e.unref(Bo),index:(S==null?void 0:S.id)??w,onContentChange:e.unref(To),onPageChange:e.unref(Ao),parentTableId:S==null?void 0:S.tableId,allMapContents:e.unref(bt),children:S==null?void 0:S.children,level:D.value,onRowClick:M,onRouteUrl:$,onRadioChange:k},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Q1=Xl._export_sfc(Z1,[["__scopeId","data-v-bafbdd45"]]),ev={class:"radio-group-container"},av=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(),s=Un(A.pinia),{selectTab:v}=A.storeToRefs(s);e.watch(()=>r==null?void 0:r.itemData,()=>{t.value=v.value},{immediate:!0,deep:!0});const p=f=>{t.value=f,n("radioChange",t.value)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",ev,[e.createVNode(ll.ssRadio,{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=k=>t.value=k),content:r==null?void 0:r.itemData,onChange:p},null,8,["modelValue","content"])]))}}),lv=Xl._export_sfc(av,[["__scopeId","data-v-ed48c2f8"]]),ru=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"}]),rv={TABLE:Dc,FORM:bs,STATICFORM:Nc,TABLEOPERATE:Gh,TABLESTYLE:d2,TABLEEXTEND:f2,TABLEINTERACTION:m2,FORMOPERATE:ks,FOLD:W2,CALCULATOR:Z2,METHODBUTTON:a4,AVATARUPLOAD:es.ssAvatar,SIGNATURE:es.ssSignature,FORMTOP:bs,STEP:f4,STEPOPERATE:$2,TIMELINE:b4,TIMELINEOPERATE:H2,FORMTOPOPERATE:ks,SIGNATUREOPERATE:u4,AVATARUPLOADOPERATE:n4,TABS:w4,TABSOPERATE:t6,CHART:x6,CHARTOPERATE:z6,LAYOUT:O6,LAYOUTOPERATE:U6,PARENTITEM:Q1,RADIO:lv};function Ni(a){return rv[a==null?void 0:a.toUpperCase()]||null}exports.De=lu;exports.activeStepInfo=_i;exports.addContents=qi;exports.addVisibleDialog=Dt;exports.affixItems=_0;exports.allMapContents=bt;exports.analyzeMenu=ec;exports.cacheNewData=kc;exports.clickMainKey=_c;exports.clickSavePage=w0;exports.clickStep=Ec;exports.clickTrigger=wc;exports.compId=Hn;exports.compNames=xc;exports.compShow=Di;exports.existLayouts=A0;exports.fixChangeValue=Et;exports.generateLayouts=t2;exports.getComponent=Ni;exports.getComponents=Wi;exports.getPageConstruct=Gd;exports.getPageData=Kr;exports.getSliceContLength=$0;exports.gridRowHeight=l2;exports.gridRowHeightHmPg=a2;exports.isStepLayout=Cc;exports.onBack=k0;exports.onButtonChange=D0;exports.onChange=Bo;exports.onClick=x0;exports.onClickStep=z0;exports.onContentChange=To;exports.onExtendTaskEnd=T0;exports.onOk=N0;exports.onPageBack=I0;exports.onPageChange=Ao;exports.onSelectFixContent=b0;exports.renderShowItems=gc;exports.showItems=or;exports.sliceTableLength=bc;exports.slotContent=ru;exports.ssTable=Dc;exports.st=Mo;exports.stepItems=R0;exports.tabChange=M0;exports.toolBar=B0;exports.useFormComp=Ct;exports.useModelLoader=xf;exports.verifyButton=O0;
|
|
25
|
+
${vr}`,duration:5e3,showClose:!0})}else qa.ElMessage.success("导出成功")}else qa.ElMessage.error(((Qa=Ll==null?void 0:Ll.data)==null?void 0:Qa.message)||"导出失败")}catch(_a){console.error("导出paraform失败:",_a),qa.ElMessage.error("导出失败:"+((_a==null?void 0:_a.message)||"未知错误"))}finally{Ca.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ba=Kl.value)==null?void 0:ba.length)===0)return qa.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((el=Ne.value)==null?void 0:el.length)===0)return qa.ElMessage.warning("暂无数据导出");let Ca=["序号",...($a=(ke=V.value)==null?void 0:ke.map(Re=>Re==null?void 0:Re.prop))==null?void 0:$a.filter(Re=>Re!=="操作")],_a=d==="导出全部"?Ne.value:Kl.value;const T=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];_a=_a==null?void 0:_a.map(Re=>Object.fromEntries(Object.entries(Re).filter(([na])=>!T.includes(na)))),Ca=["序号",...Ca],_a=_a==null?void 0:_a.map((Re,na)=>({序号:na+1,...Re}));let X=(c==null?void 0:c.compName)||"表格信息";Fo(_a,X,Ca,X)}else if(d==="OCR识别")sl.value=!0,xa.value=[],ia.value=1,Ie.value.clear(),de.value.clear(),ma.value=0;else if(d==="迁移")i.selectRow=h,i.show=!0;else if(d==="生成方法"){let Ca=await Gf(h),_a;h!==""?_a=[h]:_a=A.cloneDeep(Ne.value),_a=_a==null?void 0:_a.map(X=>(X.输出值=Ca,X));const T={fixContent:_a,buttonName:"编辑",relatedContents:c==null?void 0:c.related,columns:V.value,name:c==null?void 0:c.groupNames};Te("change",T)}else if(((va=N==null?void 0:N.extra)==null?void 0:va.type)==="methodButton"){let Ca;h!==""?Ca=[h]:Ca=A.cloneDeep(Ne.value);const T={fixContent:await vt(Ca,V==null?void 0:V.value,"Manual",Ne.value),buttonName:"methodButton",relatedContents:c==null?void 0:c.related,columns:V.value,name:c==null?void 0:c.groupNames};Te("change",T)}}},iu=async(d,h)=>{var N,z,P,C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke;try{let $a,va;const Ca=(N=fe.value[Ee.value+g])==null?void 0:N.filter(Ba=>{var nl;return((nl=Ba==null?void 0:Ba.key)==null?void 0:nl.type)==="structureMethod"}),_a=(z=fe.value[Ee.value+g])==null?void 0:z.filter(Ba=>{var nl;return((nl=Ba==null?void 0:Ba.key)==null?void 0:nl.type)==="structure"}),T=Ca==null?void 0:Ca.find(Ba=>{var nl,Wa;return((Wa=(nl=Ba==null?void 0:Ba.value)==null?void 0:nl.pageData)==null?void 0:Wa.method)==="保存"});if(!T)return;const X=(ne=(re=fe.value[(C=(P=T==null?void 0:T.value)==null?void 0:P.pageData)==null?void 0:C.path])==null?void 0:re.filter(Ba=>{var nl;return((nl=Ba==null?void 0:Ba.key)==null?void 0:nl.type)==="data"}))==null?void 0:ne.find(Ba=>{var nl,Wa,ul,dl;return((Wa=(nl=Ba==null?void 0:Ba.value)==null?void 0:nl.tableData)==null?void 0:Wa.算法名称)===((dl=(ul=T==null?void 0:T.value)==null?void 0:ul.pageData)==null?void 0:dl.method)});if(!X)return;const Re={buttonName:(be=(K=T==null?void 0:T.value)==null?void 0:K.pageData)==null?void 0:be.method,api:(He=(Ae=X==null?void 0:X.value)==null?void 0:Ae.tableData)==null?void 0:He.算法体,content:_a==null?void 0:_a.map(Ba=>{var nl;return(nl=Ba==null?void 0:Ba.value)==null?void 0:nl.pageData}),extraContent:[],extraValues:(Ge=($e=T==null?void 0:T.value)==null?void 0:$e.pageData)==null?void 0:Ge.data,methodName:(Oa=(wa=T==null?void 0:T.value)==null?void 0:wa.pageData)==null?void 0:Oa.path};if(!d)return;const na={...d,compData:(za=d==null?void 0:d.compData)==null?void 0:za.map(Ba=>{var nl;return(Ba==null?void 0:Ba.key)==="formContent"?{...Ba,contents:(nl=Ba==null?void 0:Ba.contents)==null?void 0:nl.map(Wa=>(Wa==null?void 0:Wa.prop)===h?{...Wa,value:""}:Wa)}:Ba})},we={key:{pageKey:Ee.value+g,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:na}},sa=await qa.axios.post(Re.api,we,{headers:{"Content-Type":"application/json"}});return((Ye=sa==null?void 0:sa.data)==null?void 0:Ye.code)===200&&($a=(ba=(Qa=sa==null?void 0:sa.data)==null?void 0:Qa.result)==null?void 0:ba.latestReportCode,va=(ke=(el=sa==null?void 0:sa.data)==null?void 0:el.result)==null?void 0:ke.status),{newMainKeyValue:$a,newStatus:va}}catch($a){throw qa.ElMessage.error($a),new Error($a)}},Tt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const ou=async(d,h,N)=>{var K,be;let z=d==null?void 0:d[h==null?void 0:h.prop],P=1,C,re;const ne=A.cloneDeep(Ee).value+g+z;if(ne){Tt.value="",C=(K=fe.value[ne])==null?void 0:K.filter($e=>{var Ge;return((Ge=$e==null?void 0:$e.key)==null?void 0:Ge.type)==="structure"});const Ae=C==null?void 0:C.find($e=>{var Ge,wa,Oa;return((Oa=(wa=(Ge=$e==null?void 0:$e.value)==null?void 0:Ge.pageData)==null?void 0:wa.comp)==null?void 0:Oa.toUpperCase())==="FORM"});re={...(be=Ae==null?void 0:Ae.value)==null?void 0:be.pageData,id:Ae==null?void 0:Ae.id};const He=await iu(re,h==null?void 0:h.prop);if(Tt.value=He==null?void 0:He.newStatus,He!=null&&He.newMainKeyValue)return He==null?void 0:He.newMainKeyValue}if(Ne.value.some(Ae=>(Ae==null?void 0:Ae[h==null?void 0:h.prop])===z)){const Ae=z;for(;Ne.value.some(He=>(He==null?void 0:He[h==null?void 0:h.prop])===`${Ae}(${P})`);)P++;z=`${Ae}(${P})`}return z},tu=async(d,h,N)=>{var C,re,ne,K;let z,P;if(await ou(N==null?void 0:N.data,N==null?void 0:N.firstCol),z=A.cloneDeep(Ee).value+g,P=A.cloneDeep(z)+`loading${((C=cl.value)==null?void 0:C.account)||((re=cl.value)==null?void 0:re.账号)}`,h){const be=(K=(ne=fe.value[P])==null?void 0:ne.filter(Ae=>{var He;return((He=Ae==null?void 0:Ae.key)==null?void 0:He.parentTable)===""}))==null?void 0:K.map(Ae=>{var He;return{id:Ae==null?void 0:Ae.id,...(He=Ae==null?void 0:Ae.value)==null?void 0:He.pageData}});(be==null?void 0:be.length)>0||await he.loadingConstruct(z,P,null,null,null),oa.setRouteToChildPath(A.cloneDeep(Ee).value),oe.setActiveMenuPath(P)}else oa.setRouteToChildPath(A.cloneDeep(Ee).value),oe.setActiveMenuPath(P)},su=()=>{Pe.value=!1,Sa.value=[],ve.value=!1},Li=d=>{var C,re,ne,K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a;const h=[];Ce.value=A.cloneDeep(V.value),(re=he.getColumnChild((C=A.cloneDeep(V.value))==null?void 0:C.filter(T=>(T==null?void 0:T.label)!=="操作")))==null||re.forEach((T,X)=>{var Re,na,we;T!=null&&T.formType&&((Re=T==null?void 0:T.formType)==null?void 0:Re.toUpperCase())==="SELECT"||T!=null&&T.menuId?h.push({label:(na=T==null?void 0:T.prop)!=null&&na.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"+X,prop:T==null?void 0:T.prop,type:"Select",value:(d==null?void 0:d[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??X,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,multipleLimit:T==null?void 0:T.multipleLimit,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,relatedValueId:T==null?void 0:T.relatedValueId,disabled:T==null?void 0:T.disabled,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,allSelectionContents:(T==null?void 0:T.allSelectionContents)??[],filterContent:T==null?void 0:T.filterContent,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter}):h.push({label:(we=T==null?void 0:T.prop)!=null&&we.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"+X,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"?(d==null?void 0:d[T==null?void 0:T.prop])??"{}":(d==null?void 0:d[T==null?void 0:T.prop])??(T==null?void 0:T.value)??"",id:(T==null?void 0:T.id)??X,contents:(T==null?void 0:T.options)??[],multiple:(T==null?void 0:T.multiple)??!1,width:1,isFormColHidden:T==null?void 0:T.isFormColHidden,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled,relatedValueId:T==null?void 0:T.relatedValueId,menus:T==null?void 0:T.menus,groups:T==null?void 0:T.groups,words:T==null?void 0:T.words,filter:T==null?void 0:T.filter,bindMenus:T==null?void 0:T.bindMenus,isMainPath:T==null?void 0:T.isMainPath,required:(T==null?void 0:T.required)??!1,relatedContents:T==null?void 0:T.relatedContents,mainKey:T==null?void 0:T.mainKey,relatedContents:T==null?void 0:T.relatedContents,functionName:T==null?void 0:T.functionName,functionRelatedWords:T==null?void 0:T.functionRelatedWords,calculatorFilter:T==null?void 0:T.calculatorFilter})}),d===""||!d||(Da.value=(d==null?void 0:d.id)??"");let N=he.getColumnChild((ne=A.cloneDeep(V.value))==null?void 0:ne.filter(T=>(T==null?void 0:T.label)!=="操作"));ka.value&&((K=ka.value)==null?void 0:K.length)>0&&(ka.value=(be=A.cloneDeep(ka).value)==null?void 0:be.map(T=>{var Re;let X=(T==null?void 0:T.prop)||((Re=N==null?void 0:N.find(na=>(na==null?void 0:na.label)===(T==null?void 0:T.label)))==null?void 0:Re.prop);return X&&(T.value=d[X]),T})),Ha.value=ka.value&&((Ae=ka.value)==null?void 0:Ae.length)>0?he.getTableFormToForm(ka.value):h,Ha.value=((He=Ha.value)==null?void 0:He.map(T=>({...T,disabled:(T==null?void 0:T.prop)==="disabled"?!0:T==null?void 0:T.disabled})))??Ha.value;let z=[],P=((wa=(Ge=($e=c.itemData)==null?void 0:$e.filter(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:Ge[0])==null?void 0:wa.contents)??"";if(P=he.analyzeSplitToContent(P,","),(P==null?void 0:P.length)>0&&(z=P.flat()),(z==null?void 0:z.length)>0){let T=z==null?void 0:z.filter(sa=>sa==null?void 0:sa.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 sa=(za=(Oa=T==null?void 0:T.replace("=",w))==null?void 0:Oa.split(w))==null?void 0:za[1];((Ye=sa==null?void 0:sa.trim())==null?void 0:Ye.toUpperCase())==="MANUAL"&&(c==null||c.index,Ha.value=(Qa=Ha.value)==null?void 0:Qa.map((Ba,nl)=>Ba))}let X=(ba=Ha.value)==null?void 0:ba.filter(sa=>sa==null?void 0:sa.mainKey),Re;X==null||X.forEach(sa=>{var nl;if(Re!==void 0)return;let Ba=sa==null?void 0:sa.menus;((nl=X==null?void 0:X.filter(Wa=>Wa==null?void 0:Wa.mainKey))==null?void 0:nl.length)>1&&(Re=Ba,sa==null||sa.groups)});let na=[],we=new Map;if(X==null||X.forEach(sa=>{var Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l;if((Ba=sa==null?void 0:sa.prop)!=null&&Ba.includes(".")){let Nl=[];we.get(((Wa=(nl=sa==null?void 0:sa.prop)==null?void 0:nl.split("."))==null?void 0:Wa[0])+(sa!=null&&sa.isMainPath?0:1)+((ul=sa==null?void 0:sa.groups)==null?void 0:ul[0]))&&(Nl=we.get(((Vl=(dl=sa==null?void 0:sa.prop)==null?void 0:dl.split("."))==null?void 0:Vl[0])+(sa!=null&&sa.isMainPath?0:1)+((Ua=sa==null?void 0:sa.groups)==null?void 0:Ua[0]))),Nl.push(sa),we.set(((Pa=(hl=sa==null?void 0:sa.prop)==null?void 0:hl.split("."))==null?void 0:Pa[0])+(sa!=null&&sa.isMainPath?0:1)+((ol=sa==null?void 0:sa.groups)==null?void 0:ol[0]),Nl)}else{let Nl=[];we.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((Ka=sa==null?void 0:sa.groups)==null?void 0:Ka[0]))&&(Nl=we.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((tl=sa==null?void 0:sa.groups)==null?void 0:tl[0]))),Nl.push(sa),we.set("normal"+(sa!=null&&sa.isMainPath?0:1)+((_l=sa==null?void 0:sa.groups)==null?void 0:_l[0]),Nl)}}),na=Array.from(we.values()),(na==null?void 0:na.length)>0)for(let sa in na){let Ba=na==null?void 0:na[sa];if((Ba==null?void 0:Ba.length)!==1){if((Ba==null?void 0:Ba.length)>1){let nl=Ba==null?void 0:Ba.map(ol=>ol==null?void 0:ol.prop),Wa=Ba==null?void 0:Ba.map(ol=>ol==null?void 0:ol.label),ul=Ba==null?void 0:Ba.map(ol=>ol==null?void 0:ol.value),dl=(el=A.cloneDeep(Ba))==null?void 0:el[0],Vl=(ke=Ha.value)==null?void 0:ke.findIndex(ol=>(ol==null?void 0:ol.prop)===(dl==null?void 0:dl.prop)),Ua=($a=Ha.value)==null?void 0:$a.slice(0,Vl),hl=(Ca=Ha.value)==null?void 0:Ca.slice(Vl,(va=Ha.value)==null?void 0:va.length);dl.label=Wa==null?void 0:Wa.join("·"),dl.value=ul==null?void 0:ul.join(" "),dl.value.trim()===""&&(dl.value=""),dl.prop=nl==null?void 0:nl.join("·");let Pa=Ba==null?void 0:Ba.map(ol=>{var Ka;return(Ka=ol==null?void 0:ol.words)==null?void 0:Ka.join(".")});dl.relatedWords=Pa,dl.usingType="parent",hl.unshift(dl),Ha.value=[...Ua,...hl],Ha.value=(_a=Ha.value)==null?void 0:_a.map(ol=>(nl!=null&&nl.find(Ka=>Ka===(ol==null?void 0:ol.prop))&&(ol.isFormColHidden=!0,ol.relatedWords=Pa),ol))}}}}},cu=()=>{var h;const d=(h=t.value)==null?void 0:h.$el;d&&Bl.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:N=>{var re;const{oldIndex:z,newIndex:P}=N;if(z===P)return;const C=nn.value.splice(z,1)[0];nn.value.splice(P,0,C),V.value=(re=V.value)==null?void 0:re.slice().sort((ne,K)=>{if(ne.label==="操作")return 1;if(K.label==="操作")return-1;const be=nn.value.findIndex(He=>He.label===ne.label),Ae=nn.value.findIndex(He=>He.label===K.label);return be-Ae})}})};e.onMounted(()=>{fa.value=window.innerWidth-240*2,window.addEventListener("keydown",Yi)});const uu=()=>{e.nextTick(()=>{cu()})},du=()=>{p.value=!0},rt=(d,h)=>{var z;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let N;return d.children=(z=d.children)==null?void 0:z.map(P=>{var C,re;if((P==null?void 0:P.id)===Da.value){let ne={};for(let K in P){let be=(C=h==null?void 0:h.find(Ae=>(Ae==null?void 0:Ae.prop)===K))==null?void 0:C.label;be?ne[K]=(re=cr.value)==null?void 0:re[be]:ne[K]=P[K]??""}P=Object.assign(ne,cr.value),N=P}else{let ne=rt(P,h);P=ne==null?void 0:ne.contents,N=ne==null?void 0:ne.currentSelectContents}return P}),{contents:d,currentSelectContents:N}},At=(d,h)=>{let N,z;return d!=null&&d.find(P=>(P==null?void 0:P.id)===Da.value)?N=d==null?void 0:d.map(P=>{var C,re,ne;if((P==null?void 0:P.id)===Da.value){let K={};for(let Ae in P){let He=(C=h==null?void 0:h.find($e=>($e==null?void 0:$e.prop)===Ae))==null?void 0:C.label;He?K[Ae]=((re=cr.value)==null?void 0:re[He])??"":K[Ae]=P[Ae]??""}let be=cr.value;for(let Ae in K)(ne=cr.value)!=null&&ne[Ae]||(be[Ae]=(K==null?void 0:K[Ae])??"");P=be,z=P}return P}):N=d==null?void 0:d.map(P=>{var C,re,ne,K;if((P==null?void 0:P.id)===Da.value){let be={};for(let Ae in P){let He=(C=h==null?void 0:h.find($e=>($e==null?void 0:$e.prop)===Ae))==null?void 0:C.label;He?be[Ae]=(re=cr.value)==null?void 0:re[He]:be[Ae]=P[Ae]??""}P=Object.assign(be,cr.value),z=P}else P=(ne=rt(P,h))==null?void 0:ne.contents,z=(K=rt(P,h))==null?void 0:K.currentSelectContents;return P}),{newContents:N,currentSelectContents:z}},zt=(d,h,N)=>{var z,P;return d[h==null?void 0:h.prop]=N,typeof d.id=="number"&&(d.id=(z=d.id)==null?void 0:z.toString()),d.children&&((P=d.children)==null?void 0:P.length)>0&&(d.children=d.children.map(zt)),d},Mt=d=>{var N;const h=[];return h.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((N=d.children)==null||N.forEach(z=>{h.push(...Mt(z))})),(h==null?void 0:h.length)>0?h==null?void 0:h.map(z=>{const P={...z};return delete P.children,P}):[]},to=["Pacific6000数据采集装置.通道号","通道号"],$i=d=>{if(!d)return"";const h=to.map(N=>d==null?void 0:d[N]).find(N=>N!=null&&String(N).trim()!=="");return h==null?"":String(h).trim()},nt=async(d,h=void 0)=>{if(!d)return!1;try{const N=Ge=>{var wa,Oa,za;return Ge?typeof(Ge==null?void 0:Ge.value)=="string"?Ge.value:((za=(Oa=(wa=Ge==null?void 0:Ge._custom)==null?void 0:wa.value)==null?void 0:Oa.value)==null?void 0:za.value)||"":""},z=Array.isArray(lr.value)?lr.value:[],P=N(z.find(Ge=>(Ge==null?void 0:Ge.condition)==="child")),C=(Ee.value||"").replace(/\/+$/,""),re=P?`${C}/${P}`:C,ne=await Kr(re||Ee.value,!1),K=String(Qe.value||"").trim(),be=Ge=>String(Ge||"").trim(),Ae=(Ge,wa=[],Oa="")=>{if(!Array.isArray(Ge))return wa;for(const za of Ge){const Ye=be((za==null?void 0:za.choiceName)||(za==null?void 0:za.name0)||Oa);(za==null?void 0:za.comp)==="Table"&&(!K||Ye===K)&&wa.push(za),Array.isArray(za==null?void 0:za.children)&&Ae(za.children,wa,Ye),Array.isArray(za==null?void 0:za.tab)&&Ae(za.tab,wa,Ye),Array.isArray(za==null?void 0:za.choice)&&Ae(za.choice,wa,Ye)}return wa},He=Ae(ne||[]),$e=String((c==null?void 0:c.compName)||"");return He.some(Ge=>{var Oa,za;const wa=((za=(Oa=Ge==null?void 0:Ge.compData)==null?void 0:Oa.find(Ye=>(Ye==null?void 0:Ye.key)==="tableContents"))==null?void 0:za.contents)||[];return!Array.isArray(wa)||wa.length===0?!1:wa.some(Ye=>{if(String((Ge==null?void 0:Ge.name)||"")===$e&&(Ye==null?void 0:Ye.id)===h)return!1;const ba=$i(Ye);return!!ba&&ba===d})})}catch{return(Ne.value||[]).some(z=>{if((z==null?void 0:z.id)===h)return!1;const P=$i(z);return!!P&&P===d})}},Ri=async(d=!0,h,N)=>{var be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl;if(cr.value){const Pa=(Ae=he.getColumnChild((be=A.cloneDeep(V.value))==null?void 0:be.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")))==null?void 0:Ae.filter(Ka=>(Ka==null?void 0:Ka.required)===!0);for(let Ka=0;Ka<((Pa==null?void 0:Pa.length)??0);Ka++){const tl=Pa[Ka],_l=tl==null?void 0:tl.prop,Nl=(tl==null?void 0:tl.label)??_l,xr=(He=cr.value)==null?void 0:He[_l];if(xr===""||xr===null||xr===void 0||Array.isArray(xr)&&xr.length===0){qa.ElMessage.error(`${Nl}不能为空`);return}}const ol=$i(cr.value);if(ol&&await nt(ol,Da.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=he.getColumnChild(($e=A.cloneDeep(V.value))==null?void 0:$e.filter(Pa=>(Pa==null?void 0:Pa.label)!=="操作")),P,C=A.cloneDeep(Ne.value);if(!cr.value){q.value=!1;return}if(Da.value===""){ra.value++;let Pa;Pa={id:ra.value.toString()};try{Pa.sort=Zn(0,Ne.value||[])}catch{}Pa!=null&&Pa.children&&(Pa={...Pa,children:(Ge=Pa.children)==null?void 0:Ge.map(Ka=>zt(Ka,h,N))});const ol=Object.assign(cr.value,Pa);C.unshift(ol),P=ol}else C=(wa=At(C,z))==null?void 0:wa.newContents,P=(Oa=At(C,z))==null?void 0:Oa.currentSelectContents;const re=(za=c.itemData)==null?void 0:za.filter(Pa=>(Pa==null?void 0:Pa.key)==="childTree")[0];if(((Ye=re==null?void 0:re.contents)==null?void 0:Ye.length)>0){U.value="编辑";const Pa=[];C==null||C.forEach((tl,_l)=>{var xr;let Nl={};if(Array.isArray(tl)){let Ll=[];tl==null||tl.filter(yl=>!(yl!=null&&yl.id)).forEach((yl,Al)=>{var Jl,Tl,Gl,rr,Hl,hr,qr;if((Tl=(Jl=Nr.value)==null?void 0:Jl[Al])!=null&&Tl.prop&&!Array.isArray(yl)){let vr={};vr[Nr.value[Al].column]=yl,L!=null&&L.value&&((Gl=L==null?void 0:L.value)==null?void 0:Gl.length)>0&&((rr=L==null?void 0:L.value)!=null&&rr.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(vr)))&&(Ll=(Hl=L==null?void 0:L.value)==null?void 0:Hl.find(tr=>JSON.stringify(tr==null?void 0:tr[0])===JSON.stringify(vr))),Ll&&Ll.length>0?Nl[Nr.value[Al].prop]=Ll!=null&&Ll.find(tr=>{var ur;return((ur=Object.keys(tr))==null?void 0:ur[0])===Nr.value[Al].column})?(hr=Ll==null?void 0:Ll.find(tr=>{var ur;return((ur=Object.keys(tr))==null?void 0:ur[0])===Nr.value[Al].column}))==null?void 0:hr[Nr.value[Al].column]:yl:Nl[Nr.value[Al].prop]=yl}else Array.isArray(yl)&&((qr=Nr.value[Al])!=null&&qr.prop?Nl[Nr.value[Al].prop]=yl:Nl.children=mt(yl,Nr.value))})}else Nl=tl;if(Array.isArray(tl)&&tl.some(Ll=>Ll==null?void 0:Ll.id)){const Ll=(xr=tl==null?void 0:tl.find(yl=>yl.id))==null?void 0:xr.id;Pa.push(Object.assign(Nl,{id:ro(Ll)}))}else Nl.id?Pa.push(Nl):Pa.push(Object.assign(Nl,{id:_l.toString()}))});const ol=(Ne.value||[]).map(tl=>String(tl==null?void 0:tl.id)),Ka=ci(Pa,ol);Ne.value=$t(Ka,re,V.value)}Ot(Ne.value),ln.value=Ne.value;const ne=zf(ln.value,pn.value,C);let K=[];if(H.value?(K=(Qa=A.cloneDeep(H).value.singleContent)==null?void 0:Qa.filter(Pa=>(Pa==null?void 0:Pa.id)!==(P==null?void 0:P.id)),K.push(P)):K=[P],Rl.value){const Pa={content:ne,singleContent:((ba=re==null?void 0:re.contents)==null?void 0:ba.length)>0?K==null?void 0:K.flatMap(Mt):K,index:c==null?void 0:c.index,buttonName:"编辑",column:V.value,parentTableId:c==null?void 0:c.parentTableId};oa.setCacheUpdatingData(Pa)}if((el=V.value)==null||el.forEach(Pa=>{(Pa==null?void 0:Pa.formType)==="Upload"&&(P[Pa.prop]=P[Pa.prop]===""?"{}":typeof P[Pa.prop]!="string"?JSON.stringify(P[Pa.prop]):P[Pa.prop])}),d){(Ca=(va=($a=(ke=c.itemData)==null?void 0:ke.find(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType"))==null?void 0:$a.value)==null?void 0:va.find(Ka=>(Ka==null?void 0:Ka.value)==="onConditionContents"))==null||Ca.content;let Pa=(_a=c.itemData)==null?void 0:_a.filter(Ka=>(Ka==null?void 0:Ka.key)==="filterAllType");Pa=Array.from(new Map(Pa.filter(Boolean).map((Ka,tl)=>[Ka.value,{...Ka,_idx:tl}])).values()).sort((Ka,tl)=>Ka._idx-tl._idx).map(({_idx:Ka,...tl})=>tl),Pa=(T=Pa==null?void 0:Pa[(Pa==null?void 0:Pa.length)-1])==null?void 0:T.value;const ol={fixContent:[P],buttonName:U.value,relatedContents:c==null?void 0:c.related,columns:V.value,name:c==null?void 0:c.groupNames};oa.setTableLoading(c==null?void 0:c.index),q.value=!1,cr.value=void 0,Te("change",ol)}if((na=(Re=(X=Ha.value)==null?void 0:X[0])==null?void 0:Re.optionUrl)!=null&&na.menuId){q.value=!1;let Pa=(we=c.itemData)==null?void 0:we.filter(ol=>(ol==null?void 0:ol.key)==="filterAllType");if((Pa==null?void 0:Pa.length)>0){let ol=Pa==null?void 0:Pa.map(_l=>_l==null?void 0:_l.value),Ka=(nl=(Ba=(sa=ol.flat().find(_l=>{var Nl;return(Nl=_l==null?void 0:_l.content)==null?void 0:Nl.includes("@Num")}))==null?void 0:sa.content)==null?void 0:Ba.split(":"))==null?void 0:nl[1];((dl=(ul=(Wa=ol.flat().find(_l=>{var Nl;return(Nl=_l==null?void 0:_l.content)==null?void 0:Nl.includes("@Type:")}))==null?void 0:Wa.content)==null?void 0:ul.split(":"))==null?void 0:dl[1])!=="Manual"&&(Ka=parseInt(Ka),Ne.value=(hl=Ne.value)==null?void 0:hl.slice(((Vl=Ne.value)==null?void 0:Vl.length)-Ka,(Ua=Ne.value)==null?void 0:Ua.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",Yi),V.value=[],Ne.value=[],Ce.value=[],Na.value=[],ka.value=[],ha.value=[],Sa.value=[],Oe.value=[],Ha.value=[],Kl.value=[],t.value=null,Ln.value=""});const so=async(d,h,N)=>{var Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a;fr.value=(N==null?void 0:N.prop)??(N==null?void 0:N.property);const z=A.cloneDeep(c.itemData),P=((Ge=z==null?void 0:z.find(T=>(T==null?void 0:T.key)==="header"))==null?void 0:Ge.contents)??[];let C=P==null?void 0:P.find((T,X)=>{var Re,na,we;return(T==null?void 0:T.prop)===fr.value||(T==null?void 0:T.label)===fr.value||(X==null?void 0:X.toString())===((we=(na=(Re=fr.value)==null?void 0:Re.split("a"))==null?void 0:na[1])==null?void 0:we.toString())});const re=he.getColumnChild((wa=A.cloneDeep(V.value))==null?void 0:wa.filter(T=>(T==null?void 0:T.label)!=="操作"));if(C||(C=re==null?void 0:re.find(T=>(T==null?void 0:T.prop)===fr.value||(T==null?void 0:T.label)===fr.value)),C&&!((Oa=C==null?void 0:C.menus)!=null&&Oa.length)&&!((za=C==null?void 0:C.groups)!=null&&za.length)&&!((Ye=C==null?void 0:C.words)!=null&&Ye.length)){const T=(Qa=Ha.value)==null?void 0:Qa.find(X=>(X==null?void 0:X.prop)===fr.value);T&&(C={...C,menus:(T==null?void 0:T.menus)??(C==null?void 0:C.menus),groups:(T==null?void 0:T.groups)??(C==null?void 0:C.groups),words:(T==null?void 0:T.words)??(C==null?void 0:C.words),bindMenus:(T==null?void 0:T.bindMenus)??(C==null?void 0:C.bindMenus),isMainPath:(T==null?void 0:T.isMainPath)??(C==null?void 0:C.isMainPath),relatedContents:(T==null?void 0:T.relatedContents)??(C==null?void 0:C.relatedContents),endChildMenu:(T==null?void 0:T.endChildMenu)??(C==null?void 0:C.endChildMenu)})}if(C&&((ba=Ha==null?void 0:Ha.value)==null||ba.forEach(T=>{var X,Re,na,we,sa;(T==null?void 0:T.prop)===(C==null?void 0:C.prop)&&(T!=null&&T.endChildMenu)&&((X=C==null?void 0:C.prop)!=null&&X.includes(".")&&((na=(Re=C==null?void 0:C.prop)==null?void 0:Re.split("."))==null?void 0:na[0])!==((sa=(we=T==null?void 0:T.prop)==null?void 0:we.split("."))==null?void 0:sa[0])?C.endChildMenu=T==null?void 0:T.value:C.endChildMenu=T==null?void 0:T.endChildMenu)})),!C)return;const ne=fr.value,K=(el=Ne.value)==null?void 0:el.findIndex(T=>(T==null?void 0:T.id)===(h==null?void 0:h.id));K!==-1&&ne&&(Ne.value[K]={...Ne.value[K],[ne]:d});const be=T=>{Array.isArray(T)&&T.forEach(X=>{Array.isArray(X==null?void 0:X.allSelectionContents)&&X.allSelectionContents.length>0&&(X.contactValue=Ne.value[K]??h),Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&be(X.children)})};be(V.value),C.value=d,C.endChildMenu=C.endChildMenu||"";let Ae=C!=null&&C.isMainPath&&(C!=null&&C.mainKey)?C==null?void 0:C.value:"";const He=T=>{Array.isArray(T)&&T.forEach(X=>{var na,we;if(((X==null?void 0:X.type)==="Select"||(X==null?void 0:X.formType)&&X.formType.toUpperCase()==="SELECT"||(X==null?void 0:X.columnType)&&X.columnType.toUpperCase()==="SELECT")&&Array.isArray(X==null?void 0:X.menus)&&X.menus.length>0&&X.menus[X.menus.length-1]===""&&(C!=null&&C.isMainPath)&&(C!=null&&C.mainKey)){const sa=(na=X==null?void 0:X.prop)!=null&&na.includes(".")?X.prop.split(".")[0]:null,Ba=(we=C==null?void 0:C.prop)!=null&&we.includes(".")?C.prop.split(".")[0]:null;(!sa||!Ba||sa===Ba)&&(X.endChildMenu=Ae)}Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&He(X.children)})};if(He(V.value),!!(C!=null&&C.mainKey)&&Array.isArray(C==null?void 0:C.menus)&&(C==null?void 0:C.menus.length)>0&&(C!=null&&C.value)&&(C==null?void 0:C.value)!==""){let T=C!=null&&C.relatedContents&&((ke=C==null?void 0:C.relatedContents)==null?void 0:ke.length)>0?($a=C==null?void 0:C.relatedContents)==null?void 0:$a.find(X=>{var Re,na,we,sa;return(X==null?void 0:X[(sa=(Re=C==null?void 0:C.prop)==null?void 0:Re.split("."))==null?void 0:sa[((we=(na=C==null?void 0:C.prop)==null?void 0:na.split("."))==null?void 0:we.length)-1]])===(C==null?void 0:C.value)}):await ss(C);if(T){const X={...h};re==null||re.forEach(Re=>{var na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l;(Re==null?void 0:Re.prop)!==(C==null?void 0:C.prop)&&(C!=null&&C.relatedContents&&((na=C==null?void 0:C.relatedContents)==null?void 0:na.length)>0?(we=Re==null?void 0:Re.prop)!=null&&we.includes(".")&&((Ba=(sa=Re==null?void 0:Re.prop)==null?void 0:sa.split("."))==null?void 0:Ba[0])===((Wa=(nl=C==null?void 0:C.prop)==null?void 0:nl.split("."))==null?void 0:Wa[0])?X[Re.prop]=T[(Ua=(ul=Re==null?void 0:Re.prop)==null?void 0:ul.split("."))==null?void 0:Ua[((Vl=(dl=Re==null?void 0:Re.prop)==null?void 0:dl.split("."))==null?void 0:Vl.length)-1]]??X[Re.prop]:X[Re.prop]=(T==null?void 0:T[Re.prop])??X[Re.prop]:he.same((C==null?void 0:C.menus)??[],(Re==null?void 0:Re.menus)??[])&&he.same((C==null?void 0:C.groups)??[],(Re==null?void 0:Re.groups)??[])&&!he.same((C==null?void 0:C.words)??[],(Re==null?void 0:Re.words)??[])?(hl=Re==null?void 0:Re.prop)!=null&&hl.includes(".")&&((ol=(Pa=Re==null?void 0:Re.prop)==null?void 0:Pa.split("."))==null?void 0:ol[0])!==((tl=(Ka=C==null?void 0:C.prop)==null?void 0:Ka.split("."))==null?void 0:tl[0])||(X[Re.prop]=(T==null?void 0:T[(_l=Re==null?void 0:Re.words)==null?void 0:_l.join(".")])??(T==null?void 0:T[Re.prop])??X[Re.prop]):(!(Re!=null&&Re.isMainPath)&&he.same((C==null?void 0:C.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),X[Re.prop]=(T==null?void 0:T[Re.prop])??X[Re.prop]))}),Ne.value=(va=A.cloneDeep(Ne.value))==null?void 0:va.map(Re=>(Re==null?void 0:Re.id)===(h==null?void 0:h.id)?{...X,id:Re==null?void 0:Re.id}:Re)}}if((Ca=C==null?void 0:C.optionUrl)!=null&&Ca.menuSelect){let T="";re==null||re.forEach(na=>{var we,sa,Ba,nl,Wa;T===""&&((Ba=(sa=(we=na==null?void 0:na.optionUrl)==null?void 0:we.groupSelect)==null?void 0:sa[1])!=null&&Ba.includes("["))&&(T=(Wa=(nl=na==null?void 0:na.optionUrl)==null?void 0:nl.groupSelect)==null?void 0:Wa[1])});let X=await yt(C),Re;if(X==null||X.forEach(na=>{var we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl;T===((sa=(we=C==null?void 0:C.optionUrl)==null?void 0:we.groupSelect)==null?void 0:sa[1])&&((Wa=(nl=(Ba=C==null?void 0:C.optionUrl)==null?void 0:Ba.groupSelect)==null?void 0:nl[1])!=null&&Wa.includes("["))&&((hl=A.cloneDeep(na))==null?void 0:hl[(Ua=(Vl=(dl=(ul=C==null?void 0:C.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:dl[1])==null?void 0:Vl.replaceAll("[",""))==null?void 0:Ua.replaceAll("]","")])===(C==null?void 0:C.value)&&(Re=na)}),Re){const na={...h};re==null||re.forEach(we=>{var sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol;(Re!=null&&Re[we==null?void 0:we.label]||Re!=null&&Re[(Wa=(nl=(Ba=(sa=we==null?void 0:we.optionUrl)==null?void 0:sa.groupSelect)==null?void 0:Ba[1])==null?void 0:nl.replaceAll("[",""))==null?void 0:Wa.replaceAll("]","")])&&((Vl=(dl=(ul=we==null?void 0:we.optionUrl)==null?void 0:ul.groupSelect)==null?void 0:dl[1])!=null&&Vl.includes("["))&&(na[we.prop]=(Re==null?void 0:Re[we==null?void 0:we.label])||(Re==null?void 0:Re[(ol=(Pa=(hl=(Ua=we==null?void 0:we.optionUrl)==null?void 0:Ua.groupSelect)==null?void 0:hl[1])==null?void 0:Pa.replaceAll("[",""))==null?void 0:ol.replaceAll("]","")]))}),Ne.value=(_a=A.cloneDeep(Ne.value))==null?void 0:_a.map(we=>(we==null?void 0:we.id)===(h==null?void 0:h.id)?{...na,id:we==null?void 0:we.id}:we)}}},pu=async d=>{var Ge,wa,Oa,za,Ye,Qa,ba,el,ke,$a,va,Ca,_a,T;if(!d)return;const h=A.cloneDeep(cr.value||{});cr.value=d;const N=$i(h),z=$i(cr.value);if(z&&z!==N&&await nt(z,Da.value||void 0)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),to.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(cr.value||{},Re)||Object.prototype.hasOwnProperty.call(h||{},Re)){const na=(h==null?void 0:h[Re])??"";cr.value[Re]=na,d[Re]=na}}),Ha.value=(Ha.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!to.includes(Re.prop))return Re;const na=(h==null?void 0:h[Re.prop])??"";return{...Re,value:na,selectValue:na===""?[]:[na]}});return}let P=A.cloneDeep(c.itemData);P==null||P.map(X=>{var Re,na,we,sa;return(X==null?void 0:X.key)==="header"&&(Array.isArray((Re=X.contents)==null?void 0:Re[0])?X.contents=(we=he.getColumnChild((na=X.contents)==null?void 0:na[0]))==null?void 0:we.map((Ba,nl)=>{var Wa,ul,dl,Vl,Ua,hl;return((dl=(ul=(Wa=Ha.value)==null?void 0:Wa.find(Pa=>(Pa==null?void 0:Pa.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:ul.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((Vl=Object.values(d))==null?void 0:Vl[nl])?Ba.value=[(Ua=Object.values(d))==null?void 0:Ua[nl]]:Ba.value=(hl=Object.values(d))==null?void 0:hl[nl],Ba}):X.contents=(sa=X.contents)==null?void 0:sa.map((Ba,nl)=>{var Wa,ul,dl,Vl,Ua,hl;return((dl=(ul=(Wa=Ha.value)==null?void 0:Wa.find(Pa=>(Pa==null?void 0:Pa.prop)===(Ba==null?void 0:Ba.prop)))==null?void 0:ul.optionUrl)==null?void 0:dl.multiple)===!0&&!Array.isArray((Vl=Object.values(d))==null?void 0:Vl[nl])?Ba.value=[(Ua=Object.values(d))==null?void 0:Ua[nl]]:Ba.value=(hl=Object.values(d))==null?void 0:hl[nl],Ba})),X});let C=Ha.value,re=(Ge=P==null?void 0:P.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Ge.contents;if(fr.value||(C=C==null?void 0:C.map(X=>{var Re;return X.value=X.value??((Re=re==null?void 0:re.find((na,we)=>(na==null?void 0:na.prop)===(X==null?void 0:X.name)))==null?void 0:Re.value),X})),!Lr.value)return;let ne=A.cloneDeep(fr.value);(wa=fr.value)!=null&&wa.includes("·")&&(fr.value=(za=(Oa=fr.value)==null?void 0:Oa.split("·"))==null?void 0:za[0]);let K=(Qa=(Ye=P==null?void 0:P.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Ye.contents)==null?void 0:Qa.find((X,Re)=>(X==null?void 0:X.prop)===fr.value);(ba=Ha==null?void 0:Ha.value)==null||ba.forEach(X=>{var Re,na,we,sa,Ba,nl,Wa,ul,dl;(X==null?void 0:X.prop)===(K==null?void 0:K.prop)&&(X!=null&&X.endChildMenu)&&((Re=K==null?void 0:K.prop)!=null&&Re.includes(".")&&((we=(na=K==null?void 0:K.prop)==null?void 0:na.split("."))==null?void 0:we[0])!==((Ba=(sa=X==null?void 0:X.prop)==null?void 0:sa.split("."))==null?void 0:Ba[0])?K.endChildMenu=(Wa=(nl=X==null?void 0:X.value)==null?void 0:nl.split(" "))==null?void 0:Wa[0]:K.endChildMenu=(dl=(ul=X==null?void 0:X.endChildMenu)==null?void 0:ul.split(" "))==null?void 0:dl[0])});let be=K!=null&&K.isMainPath&&(K!=null&&K.mainKey)?K==null?void 0:K.value:"",Ae=C,He=ee.value;if(He!=null&&He.find(X=>(K==null?void 0:K.prop)===(X==null?void 0:X.key))&&(He=He==null?void 0:He.filter(X=>(K==null?void 0:K.prop)!==(X==null?void 0:X.key))),He!=null&&He.find(X=>ne===(X==null?void 0:X.key))&&(He=He==null?void 0:He.filter(X=>ne!==(X==null?void 0:X.key))),(K==null?void 0:K.formType)==="Select"?Ae=Ae==null?void 0:Ae.map(X=>{var Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl;return(X==null?void 0:X.type)==="Select"&&(((Re=X==null?void 0:X.allSelectionContents)==null?void 0:Re.length)>0&&(X.contactValue=d),((K==null?void 0:K.prop)===(X==null?void 0:X.prop)||ne===(X==null?void 0:X.prop))&&K&&(Array.isArray(K.value)&&((na=K.value)==null?void 0:na.length)>0&&((we=K.value)!=null&&we.every(_l=>typeof _l=="string"))?(He.push({key:X==null?void 0:X.prop,value:[(Ba=K.value)==null?void 0:Ba[((sa=K.value)==null?void 0:sa.length)-1]]}),X.selectValue=(nl=He==null?void 0:He.find(_l=>(_l==null?void 0:_l.key)===(X==null?void 0:X.prop)))==null?void 0:nl.value):Array.isArray(K.value)&&((Wa=K.value)==null?void 0:Wa.length)===0?(He=[],X.selectValue=[],d[X==null?void 0:X.prop]=""):Array.isArray(X.value)&&He.push({key:X==null?void 0:X.prop,value:[(ul=X.value)==null?void 0:ul[(X==null?void 0:X.length)-1]]})),((Vl=X==null?void 0:X.menus)==null?void 0:Vl[((dl=X==null?void 0:X.menus)==null?void 0:dl.length)-1])===""&&(K!=null&&K.isMainPath)&&(K!=null&&K.mainKey)&&((Ua=X==null?void 0:X.prop)!=null&&Ua.includes(".")&&((Pa=(hl=X==null?void 0:X.prop)==null?void 0:hl.split("."))==null?void 0:Pa[0])!==((Ka=(ol=K==null?void 0:K.prop)==null?void 0:ol.split("."))==null?void 0:Ka[0])||(X.endChildMenu=(tl=be==null?void 0:be.split(" "))==null?void 0:tl[0]))),X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X}):(K==null?void 0:K.formType)!=="Input"&&(Ae=Ae==null?void 0:Ae.map(X=>(X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X))),ee.value=He,Ae!=null&&Ae.some(X=>(X==null?void 0:X.functionName)&&(X==null?void 0:X.functionName)!=="")){let X=await vt([d],V==null?void 0:V.value,"Auto",Ne.value),Re=[];(el=Ae==null?void 0:Ae.filter(we=>(we==null?void 0:we.functionName)&&(we==null?void 0:we.functionName)!==""))==null||el.forEach(we=>{var sa;((sa=we==null?void 0:we.functionRelatedWords)==null?void 0:sa.length)>0&&(Re=[...Re,...we==null?void 0:we.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(we=>(we==null?void 0:we[0])!=="@");let na=[];for(let we in X==null?void 0:X[0])Re!=null&&Re.find(sa=>we===sa||(we==null?void 0:we.includes("."+sa)))&&na.push(((ke=X==null?void 0:X[0])==null?void 0:ke[we])!=="");(X==null?void 0:X.length)>0&&na.every(we=>we)&&(Ae=Ae==null?void 0:Ae.map(we=>{var sa;return we.value=((sa=X==null?void 0:X[0])==null?void 0:sa[we==null?void 0:we.prop])??we.value,we})),cr.value=X==null?void 0:X[0]}if(Ha.value=Ae,K=Object.assign({},K??{},{relatedWords:(va=($a=Ha==null?void 0:Ha.value)==null?void 0:$a.find(X=>(X==null?void 0:X.prop)===(K==null?void 0:K.prop)))==null?void 0:va.relatedWords}),(K==null?void 0:K.mainKey)&&(K!=null&&K.value)&&(K==null?void 0:K.value)!==""){let X=K!=null&&K.relatedContents&&((Ca=K==null?void 0:K.relatedContents)==null?void 0:Ca.length)>0?(_a=K==null?void 0:K.relatedContents)==null?void 0:_a.find(Re=>{var na,we,sa,Ba;return(Re==null?void 0:Re[(Ba=(na=K==null?void 0:K.prop)==null?void 0:na.split("."))==null?void 0:Ba[((sa=(we=K==null?void 0:K.prop)==null?void 0:we.split("."))==null?void 0:sa.length)-1]])===(K==null?void 0:K.value)}):await ss(K);if(X&&JSON.stringify(X)!=="{}"){let Re=Ae;Re=Re==null?void 0:Re.map(we=>{var sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l,Nl,xr,Ll,yl,Al,Jl,Tl;if((K==null?void 0:K.prop)===(we==null?void 0:we.prop))we.value=(X==null?void 0:X[(sa=we==null?void 0:we.words)==null?void 0:sa.join(".")])??(X==null?void 0:X[we==null?void 0:we.prop])??X[(ul=(Ba=we==null?void 0:we.prop)==null?void 0:Ba.split("."))==null?void 0:ul[((Wa=(nl=we==null?void 0:we.prop)==null?void 0:nl.split("."))==null?void 0:Wa.length)-1]];else if(K!=null&&K.relatedContents&&((dl=K==null?void 0:K.relatedContents)==null?void 0:dl.length)>0)we.value=(Vl=we==null?void 0:we.prop)!=null&&Vl.includes(".")&&((hl=(Ua=we==null?void 0:we.prop)==null?void 0:Ua.split("."))==null?void 0:hl[0])===((ol=(Pa=K==null?void 0:K.prop)==null?void 0:Pa.split("."))==null?void 0:ol[0])?X[(Nl=(Ka=we==null?void 0:we.prop)==null?void 0:Ka.split("."))==null?void 0:Nl[((_l=(tl=we==null?void 0:we.prop)==null?void 0:tl.split("."))==null?void 0:_l.length)-1]]:(X==null?void 0:X[we==null?void 0:we.prop])??(we==null?void 0:we.value);else if(he.same((K==null?void 0:K.menus)??[],(we==null?void 0:we.menus)??[])&&he.same((K==null?void 0:K.groups)??[],(we==null?void 0:we.groups)??[])&&!he.same((K==null?void 0:K.words)??[],(we==null?void 0:we.words)??[]))if((xr=we==null?void 0:we.prop)!=null&&xr.includes(".")&&((yl=(Ll=we==null?void 0:we.prop)==null?void 0:Ll.split("."))==null?void 0:yl[0])!==((Jl=(Al=K==null?void 0:K.prop)==null?void 0:Al.split("."))==null?void 0:Jl[0])){let Gl=Object.keys(X);Gl=Gl==null?void 0:Gl.find(rr=>{var Hl;return rr==null?void 0:rr.includes("."+((Hl=we==null?void 0:we.words)==null?void 0:Hl.join(".")))}),we.value=(X==null?void 0:X[Gl])??(X==null?void 0:X[we==null?void 0:we.prop])??we.value}else{let Gl=Object.keys(X);Gl=Gl==null?void 0:Gl.find(rr=>{var Hl;return rr==null?void 0:rr.includes("."+((Hl=we==null?void 0:we.words)==null?void 0:Hl.join(".")))}),we.value=(X==null?void 0:X[(Tl=we==null?void 0:we.words)==null?void 0:Tl.join(".")])??(X==null?void 0:X[Gl])??(X==null?void 0:X[we==null?void 0:we.prop])??we.value}else!(we!=null&&we.isMainPath)&&he.same((K==null?void 0:K.bindMenus)??[],(we==null?void 0:we.bindMenus)??[]),we.value=(X==null?void 0:X[we==null?void 0:we.prop])??we.value;return we}),Ha.value=Re;let na={};(T=Ha.value)==null||T.forEach(we=>{na[we.prop]=we==null?void 0:we.value}),cr.value=na}}Lr.value=!0,M.value=!1},fu=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",hu=d=>{var C,re;const h=(re=(C=ka.value)==null?void 0:C.find(ne=>(ne==null?void 0:ne.label)===(d==null?void 0:d.label)))==null?void 0:re.multiple,N=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;Ne.value.forEach(ne=>{const K=ne==null?void 0:ne[N];h&&So.isString(K)&&(ne[N]=[K]),!h&&!So.isString(K)&&(ne[N]="")})},It=(d,h)=>{var N;return h==null||h.forEach(z=>{d[z==null?void 0:z.prop]=z==null?void 0:z.value}),d.children&&((N=d.children)==null?void 0:N.length)>0&&(d.children=d.children.map(z=>It(z,h))),d},it=d=>{var N,z,P,C,re,ne;Li("");const h=(N=Ha.value)==null?void 0:N.reduce((K,be)=>(K[be.name]=be.value,K),{});if(((z=Object.keys(h))==null?void 0:z.length)>0){cr.value=h,Da.value="",ra.value=(P=Ne.value)==null?void 0:P.length,Oe.value=(C=Za.value)==null?void 0:C.filter(be=>(be==null?void 0:be.label)!=="新增");const K=(ne=(re=Ce.value)==null?void 0:re.filter(be=>(be==null?void 0:be.label)!=="操作"))==null?void 0:ne.map(be=>{var He,$e,Ge;const Ae=($e=(He=ka.value)==null?void 0:He.find(wa=>(wa==null?void 0:wa.label)===(be==null?void 0:be.label)))==null?void 0:$e.multiple;return hu(be),{...be,contents:(be==null?void 0:be.options)??[],optionUrl:be!=null&&be.formMenuSelect&&((Ge=be==null?void 0:be.formMenuSelect)==null?void 0:Ge.length)>0?{groupSelect:be==null?void 0:be.groupSelect,menuSelect:be==null?void 0:be.formMenuSelect,selectRelateType:"",type:be==null?void 0:be.formType,multiple:Ae}:null}});V.value=K==null?void 0:K.map(be=>It(be,[{prop:"type",value:"edit"},{prop:"columnType",value:fu(be==null?void 0:be.formType)||(be==null?void 0:be.columnType)}])),d==="createClick"&&(U.value="新增",Ri(!0))}},hi={START:"开始时间",END:"结束时间",HOURS:"工时"},vu=(d,h)=>Number(A.dayjs(h).diff(A.dayjs(d),"day",!0).toFixed(1)),Ot=d=>{var C;const h=c.itemData,N=(C=h==null?void 0:h.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:C.contents,z=new Map;return N==null||N.forEach((re,ne)=>{const{label:K}=re;z.set(K,ne)}),!z.has(hi.START)||!z.has(hi.END)||!z.has(hi.HOURS)?d:d==null?void 0:d.map(re=>{const ne=re==null?void 0:re[hi.START],K=re==null?void 0:re[hi.END],be=vu(ne,K);return ne&&K&&(re[hi.HOURS]=`${be}天`),re})},Lt=(d,h,N=0)=>{if(N>((h==null?void 0:h.length)??""))return d;const z=h==null?void 0:h[N],P=new Map;for(const re of d){const ne=re[z];P.has(ne)||P.set(ne,[]),P.get(ne)&&P.get(ne).push(re)}const C=[];for(const[re,ne]of P){const[K,...be]=ne,Ae={...K};N+1===((h==null?void 0:h.length)??"")?Ae.children=ne==null?void 0:ne.map(He=>(He.level=A.cloneDeep(N)+1,He)).filter((He,$e)=>$e!==0):be.length>0&&(Ae.children=Lt(be,h,N+1)),Ae.level=N,C.push(Ae)}return C},$t=(d,h,N)=>{var P;if(!(h!=null&&h.contents)||((P=h==null?void 0:h.contents)==null?void 0:P.length)===0)return d;let z=[];return z=Lt(d,h==null?void 0:h.contents,0),z},Rt=async(d,h)=>{var za,Ye,Qa,ba,el,ke,$a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol,Ka,tl,_l,Nl,xr,Ll,yl,Al,Jl,Tl,Gl,rr,Hl,hr,qr,vr,tr,ur,Ft,Pt,jt;const N=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="header");d==null||d.filter(ua=>(ua==null?void 0:ua.key)==="tableIndexColumn")[0];const z=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="childTree")[0];let P=!0;if((Qa=(Ye=(za=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="filterAllType"))==null?void 0:za.value)==null?void 0:Ye.find(ua=>(ua==null?void 0:ua.value)==="onPamButtonContents"))!=null&&Qa.content){let ua=(ke=(el=(ba=d==null?void 0:d.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:ba.value)==null?void 0:el.find(El=>(El==null?void 0:El.value)==="onPamButtonContents"))==null?void 0:ke.content;ua=($a=ua==null?void 0:ua.split(":"))==null?void 0:$a[1],ua=(va=ua.slice(1,(ua==null?void 0:ua.length)-1))==null?void 0:va.split(","),P=!!(ua!=null&&ua.find(El=>El==="操作"))}const C=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="page"),re=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="rowButton"),ne=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="extraButton"),K=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="tableContents"),be=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="bottomButton"),Ae=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="tableIndex");ka.value=(_a=(Ca=d==null?void 0:d.filter(ua=>(ua==null?void 0:ua.key)==="tableToForm"))==null?void 0:Ca[0])==null?void 0:_a.contents,pe.value=(C==null?void 0:C.contents)??!0;let He=[];Ml.value===""?He=N==null?void 0:N[0]:He=(N==null?void 0:N.find(ua=>(ua==null?void 0:ua.selectLabel)==="("+Ml.value+")"))??(N==null?void 0:N.find(ua=>!(ua!=null&&ua.selectLabel)));let $e=[];Ml.value===""?$e=Ae==null?void 0:Ae[0]:$e=(Ae==null?void 0:Ae.find(ua=>(ua==null?void 0:ua.selectLabel)==="("+Ml.value+")"))??(Ae==null?void 0:Ae.find(ua=>!(ua!=null&&ua.selectLabel)));let Ge=[],wa=[];if(((T=He==null?void 0:He.contents)==null?void 0:T.length)>0){let ua=[],El=He==null?void 0:He.contents;if(Array.isArray(El==null?void 0:El[0])&&((X=El==null?void 0:El[0])!=null&&X.every(Ya=>!(Ya!=null&&Ya.children)))&&(El=El==null?void 0:El[0]),El.some(Ya=>Array.isArray(Ya)&&(Ya==null?void 0:Ya.find(qe=>qe.children))))ua=(Re=he.getGradeColumns(El,P))==null?void 0:Re[0],ua!=null&&ua.find(Ya=>(Ya==null?void 0:Ya.label)==="操作")||ua.push({label:"操作",prop:"operate",type:"operate"});else{let Ya=El.some(qe=>Array.isArray(qe))?El==null?void 0:El[0]:El;Ya!=null&&Ya.find(qe=>(qe==null?void 0:qe.label)==="操作")||Ya.push({label:"操作",prop:"operate",type:"operate"}),Ya==null||Ya.forEach((qe,er)=>{var Rr,Mr,Vr,Dr,ai,yi,gi,gr,_n,Vn,bi,an,Fn,Wt,Kt,Gt,Yt,Jt,Xt,Zt;if((Mr=(Rr=Ee.value)==null?void 0:Rr.split("/"))==null||Mr.forEach(nr=>{var mr,Cn,Qt;nr!==""&&((Qt=(Cn=(mr=nr==null?void 0:nr.split(g+"updateLoading"))==null?void 0:mr[0])==null?void 0:Cn.split(g+"loading"))==null||Qt[0])}),qe!=null&&qe.methodContent){let nr=(ai=(Dr=(Vr=qe==null?void 0:qe.methodContent)==null?void 0:Vr.replace("@","%%#"))==null?void 0:Dr.split("%%#"))==null?void 0:ai[1];if(nr=nr==null?void 0:nr.slice(0,(nr==null?void 0:nr.length)-1),nr=he.contentTransArrayToAllNoExtra(nr??"",","),(yi=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&yi.includes("Prop")&&((gi=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&gi.includes("Manual"))){let mr=(_n=(gr=nr==null?void 0:nr.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:gr.split(":"))==null?void 0:_n[1];mr=((an=(bi=(Vn=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Vn.replaceAll("]",""))==null?void 0:bi.split(","))==null?void 0:an[1])??"算法执行",Ge.push(mr)}else if((Fn=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&Fn.includes("Row")&&((Wt=nr==null?void 0:nr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&Wt.includes("Manual"))){let mr=(Gt=(Kt=nr==null?void 0:nr.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:Kt.split(":"))==null?void 0:Gt[1];mr=((Xt=(Jt=(Yt=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Yt.replaceAll("]",""))==null?void 0:Jt.split(","))==null?void 0:Xt[1])??"算法执行",wa.push(mr)}}(Zt=ka.value)==null||Zt.find(nr=>(nr==null?void 0:nr.prop)===(qe==null?void 0:qe.prop)),ua.push({label:(qe==null?void 0:qe.label)==="操作"?P?"操作":"":(qe==null?void 0:qe.label)??"",prop:(qe==null?void 0:qe.label)==="操作"?"operate":(qe==null?void 0:qe.prop)??"a"+er,width:qe!=null&&qe.width?parseInt(qe.width):"",fixed:(qe==null?void 0:qe.fixed)??void 0,sortable:(qe==null?void 0:qe.sortable)??!1,filterable:(qe==null?void 0:qe.filterable)??!1,operable:(qe==null?void 0:qe.operable)??!1,showSummary:(qe==null?void 0:qe.showSummary)??!1,align:(qe==null?void 0:qe.align)??"left",showOverflowTooltip:(qe==null?void 0:qe.showOverflowTooltip)??!0,isNotDrag:(qe==null?void 0:qe.isNotDrag)??!1,isEditCol:(qe==null?void 0:qe.isEditCol)??!1,isOperate:(qe==null?void 0:qe.isOperate)??!1,id:(qe==null?void 0:qe.id)??er,type:(qe==null?void 0:qe.label)==="操作"?"operate":void 0,formType:(qe==null?void 0:qe.formType)??(qe!=null&&qe.groupSelect?"Select":""),disabled:qe==null?void 0:qe.disabled,options:(qe==null?void 0:qe.options)??[],value:(qe==null?void 0:qe.value)??"",isExistChild:(qe==null?void 0:qe.isExistChild)??!1,mainKey:(qe==null?void 0:qe.mainKey)??er===0,allSelectionContents:(qe==null?void 0:qe.allContents)??[],filterContent:qe==null?void 0:qe.filterContents,menus:qe==null?void 0:qe.menus,groups:qe==null?void 0:qe.groups,words:qe==null?void 0:qe.words,filter:qe==null?void 0:qe.filter,bindMenus:qe==null?void 0:qe.bindMenus,fatherPath:qe==null?void 0:qe.fatherPath,isMainPath:qe==null?void 0:qe.isMainPath,required:(qe==null?void 0:qe.required)??!1,relatedContents:qe==null?void 0:qe.relatedContents,functionName:qe==null?void 0:qe.functionName,functionRelatedWords:qe==null?void 0:qe.functionRelatedWords,calculatorFilter:qe==null?void 0:qe.calculatorFilter,relatedPages:qe==null?void 0:qe.relatedPages,multiple:(qe==null?void 0:qe.multiple)??!1,multipleLimit:qe==null?void 0:qe.multipleLimit})})}$.value=(na=be==null?void 0:be[0])==null?void 0:na.contents;const tn=he.getNewColumnChild(ua),Ht=Ya=>Array.isArray(Ya)?Ya.map(qe=>(Array.isArray(qe==null?void 0:qe.children)&&qe.children.length>0?(qe.sortable=!1,Ht(qe.children)):(qe==null?void 0:qe.prop)==="operate"||(qe==null?void 0:qe.label)==="操作"||(qe==null?void 0:qe.type)==="operate"||(qe.sortable=!1),qe)):Ya;Ht(tn),await Zi(tn),a0(se.value,tn),V.value=tn,Na.value=tn,r.value=(we=V.value)==null?void 0:we.map(Ya=>Ya==null?void 0:Ya.label);let sn=(Ba=(sa=he.getAllLeafNodes(V.value))==null?void 0:sa.filter(Ya=>(Ya==null?void 0:Ya.type)!=="operate"))==null?void 0:Ba.map((Ya,qe)=>({prop:(Ya==null?void 0:Ya.prop)??"a"+qe,column:Ya.label}));Nr.value=sn;let en=[];Ml.value===""?en=K==null?void 0:K[0]:en=(K==null?void 0:K.find(Ya=>(Ya==null?void 0:Ya.selectLabel)==="("+Ml.value+")"))??(K==null?void 0:K.find(Ya=>!(Ya!=null&&Ya.selectLabel)));let ei=Array.isArray((nl=en==null?void 0:en.contents)==null?void 0:nl[0])&&((Wa=en==null?void 0:en.contents)!=null&&Wa[0].every(Ya=>Array.isArray(Ya)))?(ul=en==null?void 0:en.contents)==null?void 0:ul[0]:en==null?void 0:en.contents;$e!=null&&$e.contents&&((dl=$e==null?void 0:$e.contents)==null?void 0:dl.length)!==0&&(ei=(Vl=A.cloneDeep(ei))==null?void 0:Vl.map((Ya,qe)=>{if(!Array.isArray(Ya)){let er={};for(let Rr in Ya)Rr!=="id"&&Rr!=="index"&&(er[Rr]=Ya[Rr]);Ya=Object.values(er)}return Ya}));const Nu=!!((Ua=V.value)!=null&&Ua.find(Ya=>Ya.prop==="index"));ei=cc(ei,$e==null?void 0:$e.contents,Nu);const vi=[];ei==null||ei.forEach((Ya,qe)=>{var Rr;let er={};if(Array.isArray(Ya)){let Mr=[];Ya==null||Ya.filter(Vr=>!(Vr!=null&&Vr.id)).forEach((Vr,Dr)=>{var ai,yi,gi,gr,_n,Vn;if((ai=sn==null?void 0:sn[Dr])!=null&&ai.prop&&!Array.isArray(Vr)){let bi={};bi[sn[Dr].column]=Vr,L!=null&&L.value&&((yi=L==null?void 0:L.value)==null?void 0:yi.length)>0&&((gi=L==null?void 0:L.value)!=null&&gi.find(an=>JSON.stringify(an==null?void 0:an[0])===JSON.stringify(bi)))&&(Mr=(gr=L==null?void 0:L.value)==null?void 0:gr.find(an=>JSON.stringify(an==null?void 0:an[0])===JSON.stringify(bi))),Mr&&Mr.length>0?er[sn[Dr].prop]=Mr!=null&&Mr.find(an=>{var Fn;return((Fn=Object.keys(an))==null?void 0:Fn[0])===sn[Dr].column})?(_n=Mr==null?void 0:Mr.find(an=>{var Fn;return((Fn=Object.keys(an))==null?void 0:Fn[0])===sn[Dr].column}))==null?void 0:_n[sn[Dr].column]:Vr:er[sn[Dr].prop]=Vr}else Array.isArray(Vr)&&((Vn=sn[Dr])!=null&&Vn.prop?er[sn[Dr].prop]=Vr:er.children=mt(Vr,sn))})}else er=Ya;if(Array.isArray(Ya)&&Ya.some(Mr=>Mr==null?void 0:Mr.id)){const Mr=(Rr=Ya==null?void 0:Ya.find(Vr=>Vr.id))==null?void 0:Rr.id;vi.push(Object.assign(er,{id:ro(Mr)}))}else er.id?vi.push(er):vi.push(Object.assign(er,{id:qe.toString()}))});try{const Ya=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),qe=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),er=Ya==null?void 0:Ya.tableId,Rr=Ya==null?void 0:Ya.compIndex;if(er&&Array.isArray(qe)&&qe.length>0&&String(er)===String(c==null?void 0:c.parentTableId)&&String(Rr)===String(c==null?void 0:c.index)){const Mr=new Set(vi.map(Dr=>String(Dr==null?void 0:Dr.id))),Vr=qe.filter(Dr=>!Mr.has(String(Dr)));if(Vr.length>0){const Dr=Ya==null?void 0:Ya.pageKey,ai=Dr!=null&&Dr.startsWith("/")?Dr.substring(1):Dr;((h==null?void 0:h[Dr])||(h==null?void 0:h[ai])||[]).filter(gr=>{var _n,Vn;return((_n=gr==null?void 0:gr.key)==null?void 0:_n.type)==="data"&&String((Vn=gr==null?void 0:gr.key)==null?void 0:Vn.tableId)===String(er)&&Vr.includes(gr==null?void 0:gr.id)}).forEach(gr=>{var _n;Mr.has(String(gr==null?void 0:gr.id))||(vi.push({id:gr==null?void 0:gr.id,...((_n=gr==null?void 0:gr.value)==null?void 0:_n.tableData)||{}}),Mr.add(String(gr==null?void 0:gr.id)))})}}}catch{}let mi=null;try{const Ya=`ocr_committed_temp_ids_v1:${String((c==null?void 0:c.parentTableId)??"")}:${String((c==null?void 0:c.index)??"")}`,qe=JSON.parse(sessionStorage.getItem(Ya)||"null");Array.isArray(qe)&&qe.length>0&&(mi=new Set(qe.map(er=>String(er))))}catch{}const Ut=Array.from(((hl=Aa.value)==null?void 0:hl.values())||[]).filter(Ya=>!(!(Ya!=null&&Ya._isOCRRow&&(Ya==null?void 0:Ya._ocrTableId)===(c==null?void 0:c.index))||mi&&mi.has(String(Ya==null?void 0:Ya.id)))),Bu=(Ne.value||[]).map(Ya=>String(Ya==null?void 0:Ya.id)),qt=ci(vi,Bu);if(Ne.value=$t(qt,z,V.value),We.value=qt,(Pa=We.value)==null||Pa.forEach(Ya=>{var qe;(qe=Aa.value)==null||qe.set(Ya.id,Ya)}),mi&&mi.size>0)try{const Ya=new Set(Array.from(mi.values()));Ne.value=(Ne.value||[]).filter(qe=>!Ya.has(String(qe==null?void 0:qe.id))),We.value=(We.value||[]).filter(qe=>!Ya.has(String(qe==null?void 0:qe.id))),Ya.forEach(qe=>{var er,Rr;try{(Rr=(er=Aa.value)==null?void 0:er.delete)==null||Rr.call(er,qe)}catch{}})}catch{}const co=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ot=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(co&&Array.isArray(ot)&&ot.length>0&&String(co==null?void 0:co.compIndex)===String(c==null?void 0:c.index)){const Ya=new Set((We.value||[]).map(qe=>String(qe==null?void 0:qe.id)));ot.filter(qe=>!Ya.has(String(qe)))}if(Ut.length>0){const Ya=new Set((Ne.value||[]).map(er=>er==null?void 0:er.id)),qe=Ut.filter(er=>!Ya.has(er.id));qe.length>0&&(Ne.value=[...Ne.value||[],...qe],We.value=[...We.value||[],...qe],qe.forEach(er=>{var Rr;return(Rr=Aa.value)==null?void 0:Rr.set(er.id,er)}))}}else V.value=[],Ce.value=[],Ne.value=[],We.value=[],Aa.value=new Map;if(wa=[...new Set(wa)],wa=wa==null?void 0:wa.map(ua=>({label:ua,type:"methodButton"})),((ol=re==null?void 0:re.contents)==null?void 0:ol.length)>0?ha.value=re==null?void 0:re.contents:ha.value=[],ha.value=[...ha.value,...wa],Ge=[...new Set(Ge)],Ge=Ge==null?void 0:Ge.map(ua=>({label:ua,type:"methodButton"})),((Ka=ne==null?void 0:ne.contents)==null?void 0:Ka.length)>0)if((Nl=(_l=(tl=d==null?void 0:d.find(ua=>(ua==null?void 0:ua.key)==="filterAllType"))==null?void 0:tl.value)==null?void 0:_l.find(ua=>(ua==null?void 0:ua.value)==="onButtonContents"))!=null&&Nl.content){let ua=(yl=(Ll=(xr=d==null?void 0:d.find(El=>(El==null?void 0:El.key)==="filterAllType"))==null?void 0:xr.value)==null?void 0:Ll.find(El=>(El==null?void 0:El.value)==="onButtonContents"))==null?void 0:yl.content;if(ua=(Al=ua==null?void 0:ua.split(":"))==null?void 0:Al[1],ua=(Jl=ua.slice(1,(ua==null?void 0:ua.length)-1))==null?void 0:Jl.split(","),Oe.value=(Tl=ne==null?void 0:ne.contents)==null?void 0:Tl.filter(El=>ua==null?void 0:ua.find(tn=>tn===(El==null?void 0:El.label))),Za.value=(Gl=ne==null?void 0:ne.contents)==null?void 0:Gl.filter(El=>ua==null?void 0:ua.find(tn=>tn===(El==null?void 0:El.label))),(rr=ne==null?void 0:ne.contents)!=null&&rr.some(El=>(El==null?void 0:El.label)==="OCR识别")&&!((Hl=Oe.value)!=null&&Hl.some(El=>(El==null?void 0:El.label)==="OCR识别"))){const El=(hr=ne==null?void 0:ne.contents)==null?void 0:hr.find(tn=>(tn==null?void 0:tn.label)==="OCR识别");Oe.value=[...Oe.value,El],Za.value=[...Za.value,El]}G.value=!!(ua!=null&&ua.find(El=>El==="搜索")),I.value=!!(ua!=null&&ua.find(El=>El==="块状显示"))}else Oe.value=ne==null?void 0:ne.contents,Za.value=ne==null?void 0:ne.contents;else Oe.value=[],Za.value=[];Oe.value=[...Oe.value,...Ge],Za.value=[...Za.value,...Ge],typeof Ee.value=="string"&&Ee.value==="设备管理/试验设备"&&(c==null?void 0:c.compName)==="设备列表"?((qr=Oe.value)!=null&&qr.some(ua=>(ua==null?void 0:ua.label)==="OCR识别")||(Oe.value=[...Oe.value||[],{label:"OCR识别"}]),(vr=Za.value)!=null&&vr.some(ua=>(ua==null?void 0:ua.label)==="OCR识别")||(Za.value=[...Za.value||[],{label:"OCR识别"}])):(Oe.value=(Oe.value||[]).filter(ua=>(ua==null?void 0:ua.label)!=="OCR识别"),Za.value=(Za.value||[]).filter(ua=>(ua==null?void 0:ua.label)!=="OCR识别")),(tr=Oe.value)!=null&&tr.some(ua=>(ua==null?void 0:ua.label)==="切换视图")||(Oe.value=[...Oe.value||[],{label:"切换视图"}]),(ur=Za.value)!=null&&ur.some(ua=>(ua==null?void 0:ua.label)==="切换视图")||(Za.value=[...Za.value||[],{label:"切换视图"}]),ra.value=((Ft=Ne==null?void 0:Ne.value)==null?void 0:Ft.length)??0,Ot(Ne.value),ln.value=Ne.value,Rl.value&&(V.value=(jt=(Pt=Ce.value)==null?void 0:Pt.filter(ua=>(ua==null?void 0:ua.label)!=="操作"))==null?void 0:jt.map(ua=>{var El;return{...ua,type:"edit",optionUrl:ua!=null&&ua.formMenuSelect&&((El=ua==null?void 0:ua.formMenuSelect)==null?void 0:El.length)>0?{groupSelect:ua==null?void 0:ua.groupSelect,menuSelect:ua==null?void 0:ua.formMenuSelect,selectRelateType:"",type:ua==null?void 0:ua.formType}:null}}),it())};e.watch(()=>[c.itemData,Ml.value,Nn.value,pn.value,L==null?void 0:L.value],async()=>{var d,h,N,z,P,C;if((d=c==null?void 0:c.itemData)!=null&&d.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((h=Z.value)!=null&&h.find(re=>{var ne,K;return(re==null?void 0:re.key)===((K=(ne=c==null?void 0:c.itemData)==null?void 0:ne.find(be=>(be==null?void 0:be.key)==="columnPath"))==null?void 0:K.contents)}))){let re=Z.value,ne={key:(z=(N=c==null?void 0:c.itemData)==null?void 0:N.find(K=>(K==null?void 0:K.key)==="columnPath"))==null?void 0:z.contents,value:(C=(P=c==null?void 0:c.itemData)==null?void 0:P.find(K=>(K==null?void 0:K.key)==="columnUsingPath"))==null?void 0:C.contents};re!=null&&re.find(K=>(K==null?void 0:K.key)===(ne==null?void 0:ne.key))?re=re==null?void 0:re.map(K=>((K==null?void 0:K.key)===(ne==null?void 0:ne.key)&&(K.value=ne.value),K)):re.push(ne),oa.setTableViewContents(re)}await Rt(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>c==null?void 0:c.operatingForm,d=>{d!=null&&d.form&&(Li(d==null?void 0:d.form),U.value=d==null?void 0:d.dialogTitle,Va.value=!0,q.value=!0)},{immediate:!0,deep:!0});const mu=()=>{var d;(d=_.value)!=null&&d.includes("read")&&(Rl.value=!Rl.value)},yu=()=>{_r.value=!_r.value};e.watch(()=>{var d;return(d=c==null?void 0:c.config)==null?void 0:d.viewport},d=>{var h;_.value=d,(d==null?void 0:d.length)===0?Rl.value=!1:(d!=null&&d.includes("read")||(Rl.value=!0),d!=null&&d.includes("edit")||(Rl.value=!1)),F.value=((h=c==null?void 0:c.config)==null?void 0:h.showIndex)||Rl.value},{immediate:!0}),e.watch(()=>Rl.value,d=>{var h;d?(it("viewChange"),oa.setCacheUpdatingData(null)):(Oe.value=Za.value,V.value=Na.value,H.value&&(oa.setTableLoading(c==null?void 0:c.index),Te("change",H.value))),F.value=d||((h=c==null?void 0:c.config)==null?void 0:h.showIndex),Kl.value=[]},{immediate:!0}),e.watch(()=>{var d;return(d=fn.value)==null?void 0:d.length},d=>{d===0&&(ye.currentPage=1)}),e.watch(()=>c==null?void 0:c.compNames,d=>{i.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),e.ref(!1);const gu=(d,h)=>{var N;it("createClick"),h===ye.pageSize&&(ye.currentPage=Math.ceil(((N=Ne.value)==null?void 0:N.length)/ye.pageSize))},bu=async(d,h,N)=>{var P,C,re,ne,K;const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop);if(z&&to.includes(z)&&N!==void 0&&N!==null&&String(N).trim()!==""){const be=String(N).trim();if(await nt(be,d==null?void 0:d.id)){qa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const He=(P=Ne.value)==null?void 0:P.findIndex(Ge=>(Ge==null?void 0:Ge.id)===(d==null?void 0:d.id)),$e=He!==-1?(re=(C=Ne.value)==null?void 0:C[He])==null?void 0:re[z]:void 0;z&&(d[z]=$e??"");return}}if(Rl.value){const be=d==null?void 0:d.id;be!=null&&(v.value.has(be)||v.value.set(be,A.cloneDeep(d)),s.value.add(be));const Ae=(ne=Ne.value)==null?void 0:ne.findIndex(He=>(He==null?void 0:He.id)===(d==null?void 0:d.id));Ae!==-1&&z&&(Ne.value[Ae]={...Ne.value[Ae],[z]:N}),so(N,d,h);return}so(N,d,h),cr.value=A.cloneDeep(d),Da.value=d==null?void 0:d.id,ra.value=(K=Ne.value)==null?void 0:K.length,U.value=d!=null&&d._isTemp?"新增":"编辑",Ri(!1)},ku=async()=>{var d,h;try{const N=[];if(c!=null&&c.related&&Array.isArray(c.related)&&(console.log("props.related",c.related),c.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const P=z.split("_")[1];P&&(N.push(`content_${P}`),N.push(`struct_${P}`))}})),N.length===0&&(c!=null&&c.itemData)){const z=(h=(d=c.itemData)==null?void 0:d.find(P=>(P==null?void 0:P.key)==="contentTableId"))==null?void 0:h.contents;z&&(N.push(`content_${z}`),N.push(`struct_${z}`))}return N}catch(N){return console.error("获取 tableNames 失败:",N),[]}},xu=async(d,h,N)=>{var C,re;if(!N||typeof N!="string"||N.trim()===""){const ne=(h==null?void 0:h.property)??(h==null?void 0:h.prop),K=`${d==null?void 0:d.id}:${ne}`;f.value.delete(K),k.value.set(K,!1);return}const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop),P=`${d==null?void 0:d.id}:${z}`;k.value.set(P,!0);try{const ne=await ku();if(ne.length===0){console.warn("未找到同名表,跳过全局搜索"),f.value.delete(P),k.value.set(P,!1);return}const K=parseInt((C=cl.value)==null?void 0:C.plat_id);if(!K){console.warn("platId 无效,跳过全局搜索"),f.value.delete(P),k.value.set(P,!1);return}const be=await A.getAllTables({platId:K,tableNames:ne??[]}),Ae=((re=be==null?void 0:be.data)==null?void 0:re.result)||[],He=[],$e=[];for(let Ge=0;Ge<Ae.length;Ge+=2)Ge+1<Ae.length&&$e.push([Ae[Ge],Ae[Ge+1]]);$e.forEach(([Ge,wa])=>{var el;if(!Array.isArray(Ge)||Ge.length===0||!Array.isArray(wa)||wa.length===0)return;const Oa=wa[0];let za=((el=Oa==null?void 0:Oa.结构)==null?void 0:el.contents)??[];if(!Array.isArray(za)||za.length===0)return;let Ye=A.cloneDeep(za);if(Array.isArray(Ye==null?void 0:Ye[0])&&(Ye=he.getColumnChild(Ye[0])),!Array.isArray(Ye)||Ye.length===0||!Ye.some(ke=>(ke==null?void 0:ke.prop)===z))return;[...Ge].sort((ke,$a)=>{const va=Number((ke==null?void 0:ke.update_time)??0);return Number(($a==null?void 0:$a.update_time)??0)-va}).slice(0,20).forEach(ke=>{const $a=ke[z];if($a!=null){const va=String($a);va.toLowerCase().includes(N.toLowerCase())&&He.findIndex(_a=>{var T;return ke.id&&((T=_a.rowData)==null?void 0:T.id)===ke.id?!0:_a.label===va})===-1&&He.push({label:va,rowData:A.cloneDeep(ke),sourceTable:(Oa==null?void 0:Oa.source_table)||""})}})}),f.value.set(P,He)}catch(ne){console.error("全局搜索建议失败:",ne),f.value.delete(P)}finally{k.value.set(P,!1)}},wu=(d,h,N)=>{if(!Rl.value)return;const z=(h==null?void 0:h.property)??(h==null?void 0:h.prop),P=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"";if(P&&P.toUpperCase()!=="INPUT"&&P!=="")return;const C=`${d==null?void 0:d.id}:${z}`;if(m.has(C)&&clearTimeout(m.get(C)),!N||N.trim()===""){f.value.delete(C),k.value.set(C,!1);return}const re=setTimeout(()=>{xu(d,{prop:z,property:z},N),m.delete(C)},300);m.set(C,re)};function _u(d,h){const N=`${d==null?void 0:d.id}:${(h==null?void 0:h.property)??(h==null?void 0:h.prop)}`;return f.value.get(N)||[]}const Su=(d,h,N)=>{var Ae;if(!N||!N.rowData)return;const z=N.rowData,P=d==null?void 0:d.id,C=(h==null?void 0:h.property)??(h==null?void 0:h.prop),ne=(he.getAllLeafNodes(V.value)||[]).filter(He=>(He==null?void 0:He.type)!=="operate"&&(He==null?void 0:He.label)!=="操作"&&(He==null?void 0:He.prop)!=="operate");ne.forEach(He=>{const $e=He==null?void 0:He.prop;$e&&z[$e]!==void 0&&(d[$e]=z[$e])});const K=(Ae=Ne.value)==null?void 0:Ae.findIndex(He=>(He==null?void 0:He.id)===P);K!==-1&&ne.forEach(He=>{const $e=He==null?void 0:He.prop;$e&&z[$e]!==void 0&&(Ne.value[K][$e]=z[$e])}),P!=null&&(v.value.has(P)||v.value.set(P,A.cloneDeep(d)),s.value.add(P));const be=`${P}:${C}`;f.value.delete(be),k.value.set(be,!1),so(d[C],d,h)},Ur=d=>{var K,be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa;const{row:h,column:N,item:z,slotData:P}=d;let C=h!=null&&h[N==null?void 0:N.prop]||(h==null?void 0:h[N==null?void 0:N.prop])===0?((be=(K=h==null?void 0:h[N==null?void 0:N.prop])==null?void 0:K[0])==null?void 0:be.contents)??((h==null?void 0:h[N==null?void 0:N.prop])===0?"0":h==null?void 0:h[N==null?void 0:N.prop]):((He=(Ae=h==null?void 0:h[z==null?void 0:z.prop])==null?void 0:Ae[0])==null?void 0:He.contents)??(h==null?void 0:h[z==null?void 0:z.prop])??((Ge=($e=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:$e[0])==null?void 0:Ge.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((za=(Oa=h==null?void 0:h[(wa=z==null?void 0:z.child)==null?void 0:wa.prop])==null?void 0:Oa[0])==null?void 0:za.contents)??(h==null?void 0:h[(Ye=z==null?void 0:z.child)==null?void 0:Ye.prop]),ne=Array.isArray(C)&&!(C!=null&&C.every(ba=>typeof ba=="string"||typeof ba=="number"))?"查看":C;if(ne=Array.isArray(ne)?ne.join(","):ne,(N==null?void 0:N.formType)==="Date")if(!ne||ne===""||ne===null||ne===void 0)ne="";else{const ba=A.dayjs(ne,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ne=ba.isValid()?ba.format("YYYYMMDD"):ne??""}return Array.isArray(N==null?void 0:N.relatedPages)&&((Qa=N==null?void 0:N.relatedPages)==null?void 0:Qa.length)>0&&(ne="详情页"),ne},Eu=d=>{var be,Ae,He,$e,Ge,wa,Oa,za,Ye,Qa;const{row:h,column:N,item:z,slotData:P}=d;let C=h!=null&&h[N==null?void 0:N.prop]?((Ae=(be=h==null?void 0:h[N==null?void 0:N.prop])==null?void 0:be[0])==null?void 0:Ae.contents)??(h==null?void 0:h[N==null?void 0:N.prop]):(($e=(He=h==null?void 0:h[z==null?void 0:z.prop])==null?void 0:He[0])==null?void 0:$e.contents)??(h==null?void 0:h[z==null?void 0:z.prop])??((wa=(Ge=P==null?void 0:P[z==null?void 0:z.prop])==null?void 0:Ge[0])==null?void 0:wa.contents)??(P==null?void 0:P[z==null?void 0:z.prop])??((Ye=(za=h==null?void 0:h[(Oa=z==null?void 0:z.child)==null?void 0:Oa.prop])==null?void 0:za[0])==null?void 0:Ye.contents)??(h==null?void 0:h[(Qa=z==null?void 0:z.child)==null?void 0:Qa.prop]);const ne=Array.isArray(C)&&!(C!=null&&C.every(ba=>typeof ba=="string"||typeof ba=="number")),K=Array.isArray(C)&&(C==null?void 0:C.find(ba=>ba==null?void 0:ba.url));return ne&&K},Cu=d=>{var P,C;if(!(d!=null&&d.column))return!1;const h=Ee.value==="试验任务/任务管理",N=(c==null?void 0:c.compName)==="任务列表",z=((P=d==null?void 0:d.column)==null?void 0:P.label)==="任务状态"||((C=d==null?void 0:d.column)==null?void 0:C.prop)==="任务状态";return h&&N&&z},Du=(d,h)=>d.find(N=>Object.values(N).some(z=>z===h));return e.watch(()=>Be.value,async d=>{if(d){oe.setContentLoading(!0),await e.nextTick();const h=Du(Ne.value,d==null?void 0:d.data);if(!h)return oe.setContentLoading(!1);await xn(d==null?void 0:d.data,null,h,{data:d==null?void 0:d.data}),oe.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>c==null?void 0:c.cacheNewData,d=>{var h;d&&(Array.isArray(d)?d.forEach(N=>{var z,P,C,re,ne;if(换,String(N==null?void 0:N.compId)===String(c==null?void 0:c.index)&&(N!=null&&N.resId)&&((z=N==null?void 0:N.data)!=null&&z.id)){const K=(P=N==null?void 0:N.data)==null?void 0:P.id,be=N==null?void 0:N.resId;if(Ne.value=(C=Ne.value)==null?void 0:C.map(Ae=>{if((Ae==null?void 0:Ae.id)===K){const He={...Ae,id:be};return delete He._isOCRRow,delete He._ocrTableId,He}return Ae}),(ne=(re=Aa.value)==null?void 0:re.has)!=null&&ne.call(re,K)){const He={...Aa.value.get(K)||{},id:be};delete He._isOCRRow,delete He._ocrTableId,Aa.value.delete(K),Aa.value.set(be,He)}rl(c==null?void 0:c.index,K,be)}}):String(d==null?void 0:d.compId)===String(c==null?void 0:c.index)&&(Ne.value=(h=Ne.value)==null?void 0:h.map(N=>{var z;if((N==null?void 0:N.id)===((z=d==null?void 0:d.data)==null?void 0:z.id)){const P={...N,id:d==null?void 0:d.resId};return delete P._isOCRRow,delete P._ocrTableId,P}return N})))},{immediate:!0,deep:!0}),(d,h)=>{var Ye,Qa,ba,el;const N=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-popover"),P=e.resolveComponent("el-switch"),C=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),ne=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-checkbox-group"),be=e.resolveComponent("el-button"),Ae=e.resolveComponent("el-icon"),He=e.resolveComponent("el-progress"),$e=e.resolveComponent("el-alert"),Ge=e.resolveComponent("el-table-column"),wa=e.resolveComponent("el-table"),Oa=e.resolveComponent("el-upload"),za=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",F0,[gn.value?(e.openBlock(),e.createBlock(ll.ssTable,{id:"excel-table",pageObj:ye,showIndex:F.value,isTree:(Ye=a.compItem)==null?void 0:Ye.isTree,summaryInfo:le,columns:V.value,defaultSort:ue,isCardViewport:_r.value,checkedColumns:r.value,key:rn.value+V.value,tableData:fn.value,isEditViewport:Rl.value,isShowPagination:pe.value,isShowEdit:!1,isShowDelete:!1,allowSelect:D.value,onDbClickRow:Qn,extraButton:Oe.value,rowButton:ha.value,cacheExtraButtons:Za.value,isClearSelection:((Qa=Kl.value)==null?void 0:Qa.length)===0,onDoCurrentChange:Bi,onDoSizeChange:Lo,onSortChange:$o,onContentClick:xn,onRowClick:Oi,onSelectChange:Uo,onCellChange:bu,onCellInput:wu,onSelectSuggest:Su,onChange:so,onPreview:ao,onSubmitEditingTable:Ji,onHandleColEditChange:Gi,onHandleColTypeChange:Hr,onClickButton:lt,onAddNewRow:Po,bottomButton:$.value},e.createSlots({headerButton:e.withCtx(ke=>{var $a,va,Ca,_a;return[a.showHeader?(e.openBlock(),e.createBlock(yf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(da)===e.unref(Ee),filterValues:Go.value,selectNums:($a=Kl.value)==null?void 0:$a.length,dataNums:(va=Ne.value)==null?void 0:va.length,compName:a.compName,isDevMode:a.isDevMode,buttons:ke.buttons,menuFilter:(_a=(Ca=a.compItem)==null?void 0:Ca.component)==null?void 0:_a.menuFilter,onButtonClick:h[1]||(h[1]=(T,X,Re)=>lt(T,X,{extra:Re})),columns:V.value,onFilter:no,onGetImportData:Vo,level:a.level,filterShow:G.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var ke,$a,va,Ca;return[((ke=Ne.value)==null?void 0:ke.length)>0&&a.allowOperate&&I.value?(e.openBlock(),e.createElementBlock("div",H0,[($a=_.value)!=null&&$a.includes("read")&&((va=_.value)!=null&&va.includes("edit"))&&((Ca=ha.value)!=null&&Ca.some(_a=>(_a==null?void 0:_a.label)==="编辑"))&&!_r.value&&e.unref(da)!==e.unref(Ee)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:mu},[e.createVNode(N,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:ke,index:$a})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:va=>gu(ke,$a)},[e.createVNode(N,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,U0)]),operateCol:e.withCtx(()=>[e.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:uu,onBeforeEnter:du},{reference:e.withCtx(()=>[e.createElementVNode("span",q0,[e.createVNode(N,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",W0,[h[20]||(h[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(P,{"model-value":R.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:h[2]||(h[2]=ke=>Qi(ke))},null,8,["model-value"]),h[21]||(h[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(K,{modelValue:r.value,"onUpdate:modelValue":h[3]||(h[3]=ke=>r.value=ke),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:t},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(nn.value,ke=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ke.label},[e.createVNode(C,{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,K0)]),_:2},1032,["value"]),e.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(N,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var $a;return[e.createElementVNode("div",G0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(($a=Object.keys(ke))==null?void 0:$a.filter(va=>{var Ca;return(Ca=E.value)==null?void 0:Ca.find(_a=>(_a==null?void 0:_a.value)===va)}),va=>{var Ca,_a;return e.openBlock(),e.createElementBlock("div",{key:va},[j[va]=="radio"?(e.openBlock(),e.createElementBlock("div",Y0,[h[19]||(h[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(ne,{"model-value":ke==null?void 0:ke[va],onChange:T=>Gn(T,va,ke)},{default:e.withCtx(()=>{var T,X;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((X=(T=E.value)==null?void 0:T.find(Re=>(Re==null?void 0:Re.value)===va))==null?void 0:X.options,Re=>(e.openBlock(),e.createBlock(re,{key:Re==null?void 0:Re.value,label:Re==null?void 0:Re.value,value:Re==null?void 0:Re.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Re==null?void 0:Re.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):e.createCommentVNode("",!0),j[va]=="switch"?(e.openBlock(),e.createBlock(P,{key:1,"model-value":ke==null?void 0:ke[va],"active-text":(_a=(Ca=E.value)==null?void 0:Ca.find(T=>(T==null?void 0:T.value)===va))==null?void 0:_a.label,onChange:T=>Gn(T,va,ke)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",J0,[e.createVNode(N,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])):e.createCommentVNode("",!0)]),_:1})]),content:e.withCtx(ke=>{var $a,va,Ca,_a,T,X,Re,na,we,sa,Ba,nl,Wa,ul,dl,Vl,Ua,hl,Pa,ol;return[(($a=ke==null?void 0:ke.column)==null?void 0:$a.label)==="证书附件"||((va=ke==null?void 0:ke.column)==null?void 0:va.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",X0,[e.createVNode(N,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ka=>wn(ke),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Eu(ke)?(e.openBlock(),e.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",Z0,e.toDisplayString(Ur(ke)),1)]),default:e.withCtx(()=>{var Ka,tl;return[e.createElementVNode("div",Q0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((tl=ke==null?void 0:ke.row)==null?void 0:tl[(Ka=ke==null?void 0:ke.column)==null?void 0:Ka.prop],_l=>(e.openBlock(),e.createElementBlock("div",e3,[e.createElementVNode("div",{class:"prop-url",title:Jn(_l),onClick:Nl=>ui(_l)},e.toDisplayString(Jn(_l)),9,a3),e.createElementVNode("div",{class:"prop-download",onClick:Nl=>Wo(_l)}," 下载 ",8,l3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Cu(ke)?(e.openBlock(),e.createBlock(Vu,{key:0,value:Ur(ke)},null,8,["value"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(Ur(ke))&&((_a=(Ca=Ur(ke))==null?void 0:Ca.toString())!=null&&_a.includes(".txt")||(X=(T=Ur(ke))==null?void 0:T.toString())!=null&&X.includes(".cpt")||(na=(Re=Ur(ke))==null?void 0:Re.toString())!=null&&na.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ur(ke))&&((sa=(we=Ur(ke))==null?void 0:we.toString())!=null&&sa.includes(".txt")||(nl=(Ba=Ur(ke))==null?void 0:Ba.toString())!=null&&nl.includes(".cpt")||(ul=(Wa=Ur(ke))==null?void 0:Wa.toString())!=null&&ul.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ur(ke))&&((Vl=(dl=Ur(ke))==null?void 0:dl.toString())!=null&&Vl.includes(".txt")||(hl=(Ua=Ur(ke))==null?void 0:Ua.toString())!=null&&hl.includes(".cpt")||(ol=(Pa=Ur(ke))==null?void 0:Pa.toString())!=null&&ol.includes(".cyd"))?"pointer":"",marginLeft:(ke==null?void 0:ke.colIndex)===0?`${((ke==null?void 0:ke.level)??0)*20}px`:0}),onClick:Ka=>{var tl;return Wn(Ur(ke),((tl=ke==null?void 0:ke.column)==null?void 0:tl.relatedPages)??[])}},e.toDisplayString(Ur(ke)===0?"0":Ur(ke)),13,r3))],64))]}),_:2},[((ba=ha.value)==null?void 0:ba.length)>0?{name:"actions",fn:e.withCtx(({item:ke,fIndex:$a})=>[e.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(N,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",P0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ii(ha.value,ke),(va,Ca)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ca,onClick:e.withModifiers(_a=>lt(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,j0))),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"])):e.createCommentVNode("",!0),Rl.value?(e.openBlock(),e.createElementBlock("div",n3,[e.createVNode(be,{id:"themeBorderButton",onClick:Ho},{default:e.withCtx(()=>h[22]||(h[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(be,{class:"ok-button",id:"themeButton",onClick:Ai},{default:e.withCtx(()=>h[23]||(h[23]=[e.createTextVNode("保存")])),_:1,__:[23]})])):e.createCommentVNode("",!0),e.createVNode(wr.ssDialog,{title:U.value,visible:q.value,width:sr.value,onBeforeDestroy:eo,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",i3,[e.createVNode(ll.ssForm,{ref_key:"formRef",ref:ze,rowContents:Ha.value,showOperator:!1,onChange:pu,isEnableWrap:!1,onFixChangeValue:Ko,onClickTrigger:Yn,isEdit:Ze.value,onBlurChange:Xi,onCreate:si,onTagChange:An},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[Va.value?(e.openBlock(),e.createElementBlock("div",o3,[e.createVNode(be,{onClick:h[4]||(h[4]=ke=>q.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>h[24]||(h[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(be,{class:"ok-button",onClick:h[5]||(h[5]=ke=>Ri(!0)),id:"themeButton"},{default:e.withCtx(()=>h[25]||(h[25]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[25]})])):e.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),e.createVNode(wr.ssDialog,{title:U.value,visible:la.value,width:fa.value,onBeforeDestroy:h[7]||(h[7]=ke=>la.value=!1)},{default:e.withCtx(()=>[e.createVNode(Bf)]),footer:e.withCtx(()=>[e.createElementVNode("div",t3,[e.createVNode(be,{onClick:h[6]||(h[6]=ke=>la.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>h[26]||(h[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(be,{class:"ok-button",onClick:Yo,id:"themeButton"},{default:e.withCtx(()=>h[27]||(h[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ae.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:2,fileDataList:ta.value,onDestroy:io},null,8,["fileDataList"])):e.createCommentVNode("",!0),Pe.value?(e.openBlock(),e.createBlock(wr.ssDialog,{key:3,visible:Pe.value,onBeforeDestroy:su,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(_o.ThreeViewerHost,{files:Sa.value,threeData:B.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(wr.ssDialog,{title:"OCR扫描录入",visible:sl.value,"close-on-click-modal":!1,onBeforeDestroy:ml,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:e.withCtx(()=>[h[38]||(h[38]=e.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),e.createElementVNode("div",s3,[e.createElementVNode("div",c3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ia.value===1}])},h[28]||(h[28]=[e.createElementVNode("div",{class:"step-circle"},"1",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),h[31]||(h[31]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ia.value===2}])},h[29]||(h[29]=[e.createElementVNode("div",{class:"step-circle"},"2",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),h[32]||(h[32]=e.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ia.value===3}])},h[30]||(h[30]=[e.createElementVNode("div",{class:"step-circle"},"3",-1),e.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),ia.value===1?(e.openBlock(),e.createElementBlock("div",u3,[e.createVNode(be,{onClick:at,class:"ocr-action-btn",disabled:ga.value,size:"default"},{default:e.withCtx(()=>h[33]||(h[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(be,{onClick:Sr,class:"ocr-action-btn",disabled:ga.value,size:"default"},{default:e.withCtx(()=>h[34]||(h[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),ia.value===1?(e.openBlock(),e.createElementBlock("div",d3,[e.createElementVNode("div",p3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xa.value,(ke,$a)=>{var va;return e.openBlock(),e.createElementBlock("div",{key:$a,class:"ocr-file-item"},[e.createElementVNode("div",f3,[ke.raw&&((va=ke.raw.type)!=null&&va.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:Cl(ke),alt:"预览",class:"thumbnail-image"},null,8,h3)):(e.openBlock(),e.createElementBlock("div",v3,[e.createVNode(Ae,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:wl(ke)==="uploading",processing:wl(ke)==="processing",completed:wl(ke)==="completed"||wl(ke)==="uploaded",failed:wl(ke)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",m3,[h[35]||(h[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:wl(ke)==="completed"||wl(ke)==="uploaded",uploading:wl(ke)==="uploading",processing:wl(ke)==="processing",failed:wl(ke)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:wl(ke)==="failed"?"#f56c6c":wl(ke)==="completed"||wl(ke)==="uploaded"?"#67c23a":"#409eff","stroke-width":wl(ke)==="completed"||wl(ke)==="uploaded"||wl(ke)==="failed"?3:2,"stroke-dasharray":jl(ke),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,y3)])),wl(ke)==="completed"||wl(ke)==="uploaded"?(e.openBlock(),e.createElementBlock("div",g3,[e.createVNode(Ae,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1})])):e.createCommentVNode("",!0),wl(ke)==="failed"?(e.openBlock(),e.createElementBlock("div",b3,[e.createVNode(Ae,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ca=>nu($a)},[e.createVNode(Ae,null,{default:e.withCtx(()=>[e.createVNode(e.unref(qa.close_default))]),_:1})],8,k3)]),e.createElementVNode("div",x3,e.toDisplayString(ke.name||"文件名123"),1)])}),128))]),xa.value.length>0?(e.openBlock(),e.createElementBlock("div",w3,[e.createVNode(be,{onClick:De,class:"ocr-start-recognize-btn",disabled:ga.value||xa.value.length===0,size:"default"},{default:e.withCtx(()=>h[36]||(h[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),ia.value===1?(e.openBlock(),e.createElementBlock("div",_3,[e.createVNode(He,{percentage:ma.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),ia.value===2?(e.openBlock(),e.createElementBlock("div",S3,[e.createElementVNode("div",E3,[e.createVNode($e,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",C3,[e.createVNode(wa,{data:Je.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(Ge,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xe.value,ke=>(e.openBlock(),e.createBlock(Ge,{key:ke.prop,prop:ke.prop,"min-width":ke.minWidth||230,"class-name":ke.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",D3,[e.createElementVNode("span",null,e.toDisplayString(ke.label),1)])]),default:e.withCtx(({row:$a,$index:va})=>{var Ca,_a,T;return[ke.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:al($a[ke.prop]),fontWeight:500})},e.toDisplayString(Ga($a[ke.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[il.value!==va?(e.openBlock(),e.createElementBlock("span",N3,e.toDisplayString($a[ke.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pl(ke.prop)),{key:1,modelValue:$a[ke.prop],"onUpdate:modelValue":X=>$a[ke.prop]=X,size:"small",placeholder:"请输入"+ke.label,content:((Ca=Ke(ke.prop))==null?void 0:Ca.contents)??((_a=Ke(ke.prop))==null?void 0:_a.options)??[],optionUrl:(T=Ke(ke.prop))==null?void 0:T.optionUrl,onChange:X=>Xa(va,ke.prop,X),onFocus:X=>Ia.value=ke.prop,onBlur:h[8]||(h[8]=X=>Ia.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),e.createVNode(Ge,{label:"编辑",width:"80",fixed:"right"},{default:e.withCtx(({$index:ke})=>[il.value===ke?(e.openBlock(),e.createBlock(Ae,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers($a=>bl(ke),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(N,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers($a=>bl(ke),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),ia.value===3?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(Ae,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(qa.check_default))]),_:1}),h[37]||(h[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Oa,{ref:"ocrUploadRef","file-list":xa.value,"onUpdate:fileList":h[9]||(h[9]=ke=>xa.value=ke),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":ge,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[ia.value!==3?(e.openBlock(),e.createElementBlock("div",T3,[e.createVNode(be,{onClick:Gr,class:"ocr-start-recognize-btn",disabled:ia.value===1||ga.value},{default:e.withCtx(()=>h[39]||(h[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(be,{onClick:on,class:"ocr-start-recognize-btn",disabled:ga.value},{default:e.withCtx(()=>h[40]||(h[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Kf,{visible:pi.value,onConfirm:o,onCancel:h[10]||(h[10]=ke=>pi.value=!1)},null,8,["visible"]),e.createVNode(kd,{visible:Ra.value,"onUpdate:visible":h[11]||(h[11]=ke=>Ra.value=ke),versions:xe.value},null,8,["visible","versions"]),e.createVNode(od,{visible:Me.value,"onUpdate:visible":h[12]||(h[12]=ke=>Me.value=ke),images:Sl.value,"default-image-name":Il.value,"field-meta":il.value!==null?((el=Je.value[il.value])==null?void 0:el.__ocrFieldMeta)||{}:{},"focused-field-name":Ia.value,onClose:h[13]||(h[13]=ke=>Me.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Md,{visible:Ul.value,"onUpdate:visible":h[14]||(h[14]=ke=>Ul.value=ke),candidates:ql.value,"name-prop":Pl.value,"mfr-prop":ar.value,columns:V.value,onSubmit:Er,onPreviewFile:fi},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(Fd,{visible:ya.value,"onUpdate:visible":h[15]||(h[15]=ke=>ya.value=ke),ocrPreviewData:Je.value,"onUpdate:ocrPreviewData":h[16]||(h[16]=ke=>Je.value=ke),ocrSelectedFields:Ea.value,"onUpdate:ocrSelectedFields":h[17]||(h[17]=ke=>Ea.value=ke),ocrPreviewColumns:Xe.value,onConfirm:Ta,onFieldChange:h[18]||(h[18]=({rowIndex:ke,prop:$a,value:va})=>Xa(ke,$a,va))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(wr.ssDialog,{title:i.title,visible:i.show,width:i.width,onBeforeDestroy:J},{default:e.withCtx(()=>[e.createElementVNode("div",A3,[e.createVNode(ll.ssForm,{rowContents:i==null?void 0:i.contents,formRules:i==null?void 0:i.formRules,showOperator:!1,buttonValue:i.buttonValue,isEdit:Ze.value,isStartJustify:!1,onOnButtonClick:Q},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(wr.ssDialog,{title:"",visible:u.show,width:u.width,alignCenter:!0,onBeforeDestroy:y},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",z3,e.toDisplayString(u.title),1),e.createVNode(za,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>h[41]||(h[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",M3,[e.createVNode(za,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(Ln.value||"暂无"),1)]),_:1}),e.createElementVNode("div",I3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u==null?void 0:u.buttonValue,ke=>(e.openBlock(),e.createBlock(be,{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:$a=>O(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(gf,{columns:u==null?void 0:u.columns,tableData:u==null?void 0:u.tableData},{content:e.withCtx(({row:ke,item:$a,slotData:va,scope:Ca,column:_a,columnProp:T,$index:X})=>[e.createTextVNode(e.toDisplayString((ke==null?void 0:ke[_a==null?void 0:_a.prop])||(ke==null?void 0:ke[_a==null?void 0:_a.label])||(ke==null?void 0:ke[_a==null?void 0:_a.property])||(va==null?void 0:va[_a==null?void 0:_a.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Dc=Xl._export_sfc(L3,[["__scopeId","data-v-696abaac"]]),$3={key:1,class:"static-form-body"},R3=["onClick"],V3={key:1},F3=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}},emits:["update:backGroundImage"],setup(a,{emit:l}){const r=a,n=l,t=b=>{switch(b){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},s=e.computed(()=>{var I;const b=(I=r.itemData)==null?void 0:I.find(Y=>(Y==null?void 0:Y.key)==="formContent"),g=(b==null?void 0:b.contents)||[];return(r.fields&&r.fields.length>0?r.fields:g).filter(Y=>(Y==null?void 0:Y.label)||(Y==null?void 0:Y.isHideInForm)).map(Y=>{let le=Y==null?void 0:Y.value;Array.isArray(le)&&(le=le.map(se=>se==null?"":typeof se=="object"?se.label??se.value??se.name??JSON.stringify(se):String(se)).filter(Boolean).join(",")),le!=null&&typeof le=="object"&&(le=le.label??le.value??le.name??JSON.stringify(le));const ye=Y.isHideInForm?"":Y.label??"",Te=le==null||le===""?"-":String(le),V=ye==="使用状态";return{label:ye,value:Te,isStatus:V,tagType:V?t(Te):"",width:Y.width??1,field:Y}})}),v=e.ref(null),p=e.ref(null),f=b=>{if(Array.isArray(b)&&b.length>=3){const[g,R,I,Y]=b;return Y!==void 0?`rgba(${g}, ${R}, ${I}, ${Y})`:`rgb(${g}, ${R}, ${I})`}if(typeof b=="string"){const g=b.trim();if(g.startsWith("[")&&g.endsWith("]")){const R=g.slice(1,-1).split(",").map(I=>Number(I.trim()));if(R.length>=3&&R.every(I=>!Number.isNaN(I))){const[I,Y,le,ye]=R;return ye!==void 0?`rgba(${I}, ${Y}, ${le}, ${ye})`:`rgb(${I}, ${Y}, ${le})`}}return g}},m=e.computed(()=>{const b=Number(r==null?void 0:r.textSize),g=f(r==null?void 0:r.textColor),R={},I={},Y={},le={};return!Number.isNaN(b)&&b&&(R.fontSize=`${b}px`,I.fontSize=`${b+1}px`,Y.fontSize=`${b}px`,le.fontSize=`${b}px`),g&&(I.color=g,Y.color=g,le.color=g),{item:R,label:I,value:Y,empty:le}}),k=e.ref(""),c=e.ref(""),D=e.ref(!1),F=async b=>{if(b){c.value&&(URL.revokeObjectURL(c.value),c.value="");try{const g=await A.platformDownloadFile({url:b}),R=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});c.value=URL.createObjectURL(R)}catch{c.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,b=>{b&&(k.value=b)},{immediate:!0}),e.watch(k,b=>{F(b)},{immediate:!0});const _=()=>{var b;(b=p.value)==null||b.click()},G=async b=>{var I,Y,le;const g=b.target,R=(I=g==null?void 0:g.files)==null?void 0:I[0];if(!R){g.value="";return}D.value=!0;try{const ye=new FormData;ye.append("file",R);const Te=await A.platformUploadFile(ye),V=(le=(Y=Te==null?void 0:Te.data)==null?void 0:Y.result)==null?void 0:le.url;V?(k.value=V,n("update:backGroundImage",V),F(V),qa.ElMessage.success("背景图片上传成功")):qa.ElMessage.error("背景图片上传失败")}catch{qa.ElMessage.error("背景图片上传失败")}finally{D.value=!1,g.value=""}},M=e.computed(()=>c.value?{backgroundImage:`url(${c.value})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),$=b=>ll.getComponent(b),j=b=>{if(!b)return;const g=b.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},E=(b,g,R)=>{r.disabled||(v.value=g,e.nextTick(()=>{j(R.currentTarget)}))},S=()=>{v.value=null},w=b=>{const g=b!=null&&b.width&&b.width>0?b.width:1,I=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${I}`,maxWidth:I,minWidth:"0",boxSizing:"border-box"}};return(b,g)=>{const R=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(M.value),onClick:g[2]||(g[2]=I=>(r==null?void 0:r.backGround)==="Yes"&&_())},[(r==null?void 0:r.backGround)==="Yes"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=e.withModifiers(I=>_(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:G},null,544),g[3]||(g[3]=e.createElementVNode("img",{src:ll._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):e.createCommentVNode("",!0),s.value.length?(e.openBlock(),e.createElementBlock("div",$3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(I,Y)=>{var le,ye,Te,V,se,ee,ue,Ce,Pe;return e.openBlock(),e.createElementBlock("div",{key:Y,class:"static-form-item",style:e.normalizeStyle({...w(I),...m.value.item}),onClick:g[1]||(g[1]=e.withModifiers(()=>{},["stop"]))},[I.label&&!((le=I==null?void 0:I.field)!=null&&le.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(m.value.label)},e.toDisplayString(I.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(m.value.value),onClick:ve=>{var B;return(B=I.field)!=null&&B.isNoClick?null:E(I,Y,ve)}},[v.value===Y&&I.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(((ye=I.field)==null?void 0:ye.type)??"Input")),{key:0,modelValue:I.field.value,"onUpdate:modelValue":ve=>I.field.value=ve,isEdit:!0,disabled:(Te=I.field)==null?void 0:Te.disabled,content:((V=I.field)==null?void 0:V.contents)??[],optionUrl:I.field,originalValue:(se=I.field)==null?void 0:se.value,config:(ee=I.field)==null?void 0:ee.config,configModel:((ue=I.field)==null?void 0:ue.prop)??((Ce=I.field)==null?void 0:Ce.name),selectedTagList:((Pe=I.field)==null?void 0:Pe.selectValue)??[],onBlur:S,onBlurChange:S},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[I.isStatus?(e.openBlock(),e.createBlock(R,{key:0,type:I.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(I.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",V3,e.toDisplayString(I.value??"-"),1))],64))],12,R3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(m.value.empty)}," 暂无数据 ",4))],4)}}}),Nc=Xl._export_sfc(F3,[["__scopeId","data-v-01ad92e2"]]),P3={class:"form-content"},j3={title:"选择标签"},H3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},U3={class:"col-operate-wrap"},q3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},W3={__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 r=()=>{v.value=!1,p.value=!1,f.value=[]},n=a;e.computed(()=>{var q;const pe=(q=Fe.value)==null?void 0:q.split("/");return(pe==null?void 0:pe.some(ze=>(ze==null?void 0:ze.includes("updateLoading"))||(ze==null?void 0:ze.includes("loading"))))?!1:Ce.value==="view"});const t=l,s=e.ref([]),v=e.ref(!1),p=e.ref(!1),f=e.ref([]),{getFileExtension:m}=_o.useThreeSystem(),k=e.ref(),c=e.ref(!1),D=e.ref(!1),F=A.useUnit(A.pinia),{chooseTitle:_}=A.storeToRefs(F),G=e.ref([]),M=e.ref(),$=e.ref(!1),j=e.ref([]),E=sc(A.pinia),S=Ct(A.pinia),w=e.ref(!1),b=e.ref(),g=e.ref(),R=e.ref(),I=e.ref(),Y=e.ref(),le=A.useLoginState(A.pinia),{loginUserInfo:ye}=A.storeToRefs(le),Te=e.ref(),V=e.ref(!0),se=A.useModelComp(A.pinia),{tableViewContents:ee,itemData:ue,isEdit:Ce,routeToChildPath:Pe,lockingPage:ve,homepageBackgroundTableId:B}=A.storeToRefs(se),ce=e.ref(null),W=e.ref(!1),Se=e.ref(!1),Le=A.useMenuState(),{activeMenuPath:Fe}=A.storeToRefs(Le),aa=he.useOriginalState(A.pinia),{originalPath:Na}=A.storeToRefs(aa),{compType:ae,hasEditable:ta}=Gs.useRole(),oe=()=>!ta(n.config,{type:ae.FORM});e.computed(()=>Fe.value==="设备管理/试验设备"&&n.compName==="设备概要");const ca=async()=>{var q,ze,_e;const pe=B==null?void 0:B.value,U=(q=ye==null?void 0:ye.value)==null?void 0:q.plat_id;if(!(!pe||!U))try{const la=await A.getAllTables({platId:parseInt(U),tableNames:[`content_${pe}`,`struct_${pe}`],user_unique_id:"0"}),fa=((_e=(ze=la==null?void 0:la.data)==null?void 0:ze.result)==null?void 0:_e[0])??[],ka=String((n==null?void 0:n.index)??""),ha=fa==null?void 0:fa.find(Va=>String(Va==null?void 0:Va.relatedForm_id)===ka);ha!=null&&ha.backgroundImg_url&&(I.value=ha.backgroundImg_url)}catch(la){console.error("获取首页背景图片表数据失败:",la)}},Ee=e.ref([]),ie=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Be=async pe=>{Se.value=pe,await me("disabled",null,pe,!0)},Ue=async pe=>{await me("operable",null,pe,!0)};e.watch(()=>Fe.value,async()=>{s.value=[],f.value=[]},{deep:!0,immediate:!0});const oa=()=>{e.nextTick(()=>{Z()})},Ja=pe=>{var U;s.value=(U=s.value)==null?void 0:U.map(q=>({...q,isFormColHidden:!(pe!=null&&pe.includes(q.label))}))};e.onUnmounted(()=>{ce.value=null});const L=pe=>{t("clickTrigger",pe)},H=async pe=>{var U,q,ze,_e,la,fa;if(pe===""){let ka="";(U=s.value)==null||U.forEach(Oe=>{Oe!=null&&Oe.isMain&&(ka=Oe==null?void 0:Oe.value)});let ha=await he.getItemData(Pe.value,sessionStorage.getItem("systemKey"),"");ka=((fa=(la=(_e=(ze=(q=ha==null?void 0:ha[0])==null?void 0:q.compData)==null?void 0:ze.find(Oe=>(Oe==null?void 0:Oe.key)==="mainRouters"))==null?void 0:_e.contents)==null?void 0:la[0])==null?void 0:fa.routerContent)+Na.value+ka;let Sa=await he.getItemData(ka,sessionStorage.getItem("systemKey"),"");$.value=!0,j.value=Sa==null?void 0:Sa.filter(Oe=>(Oe==null?void 0:Oe.comp)!=="methodButton"),t("routeUrl",j.value)}},Z=()=>{var U;const pe=(U=ce.value)==null?void 0:U.$el;pe&&Bl.Sortable.create(pe,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:q=>{const{oldIndex:ze,newIndex:_e}=q;if(ze===_e)return;const la=s.value.splice(ze,1)[0];s.value.splice(_e,0,la)}})},me=async(pe,U,q,ze=!1)=>{try{se.setRefreshCurStructure(!1)}catch{qa.ElMessage.error("编辑处理失败")}},fe=async(pe,U)=>{await me()},da=async(pe,U)=>{pe&&await me()},Qe=async(pe,U,q)=>{await me(U,q,pe,!1)},te=(pe,U)=>{Te.value===U?V.value=!1:V.value=!0,Te.value=U==null?void 0:U.changeProp},pa=async pe=>{var fa;I.value=pe;const U=n.itemData,q=U==null?void 0:U.find(ka=>(ka==null?void 0:ka.key)==="backGroundImage");q?q.contents=pe:U==null||U.push({key:"backGroundImage",contents:pe}),t("change",{key:"backGroundImage",contents:pe});const ze=B==null?void 0:B.value,_e=n==null?void 0:n.index,la=(fa=ye==null?void 0:ye.value)==null?void 0:fa.plat_id;if(!(!ze||!la||!_e||!pe))try{await A.pageBatchAddApi({platId:parseInt(la),changeContents:[{tableName:`content_${ze}`,tableContents:[{backgroundImg_url:pe,relatedForm_id:String(_e)}]}],user_unique_id:"0"})}catch(ka){console.error("保存背景图片记录失败:",ka),qa.ElMessage.error("背景图片记录保存失败")}},Ne=async pe=>{var q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl;let U=[];if((q=pe==null?void 0:pe.toString())!=null&&q.includes(".urdf")){if(pe.includes(",")){qa.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:pe,extension:m(pe)}],p.value=!0,v.value=!0;return}if((ze=pe==null?void 0:pe.toString())!=null&&ze.includes(".stl")||(_e=pe==null?void 0:pe.toString())!=null&&_e.includes(".STL")||(la=pe==null?void 0:pe.toString())!=null&&la.includes(".obj")||(fa=pe==null?void 0:pe.toString())!=null&&fa.includes(".mtl")){const ja=((ka=pe==null?void 0:pe.toString())==null?void 0:ka.split(",")).map(zl=>({url:zl,extension:m(zl)}));f.value=ja,p.value=!1,v.value=!0;return}if((ha=pe==null?void 0:pe.toString())!=null&&ha.includes(".stl")||(Va=pe==null?void 0:pe.toString())!=null&&Va.includes(".STL")||(Sa=pe==null?void 0:pe.toString())!=null&&Sa.includes(".obj")||(Oe=pe==null?void 0:pe.toString())!=null&&Oe.includes(".mtl")){let Fl,ja=[],zl={};if(Array.isArray(pe)?Fl=pe:Fl=pe==null?void 0:pe.split(","),Fl==null||Fl.forEach($l=>{$l.includes(".mtl")?ja.push($l):zl.blob=zl.blob?zl.blob+","+$l:$l}),(ja==null?void 0:ja.length)>0&&(zl.mtlBlobs=ja),(Ha=(Za=Object.values(zl))==null?void 0:Za[0])!=null&&Ha.includes("http:"))U.push(zl);else{const $l=new Blob([zl.blob],{type:"application/octet-stream;charset=UTF-8"});let Ma=URL.createObjectURL($l),rl="";(xl=pe==null?void 0:pe.split("/"))==null||xl.forEach((sl,ga)=>{var xa;ga===((xa=pe==null?void 0:pe.split("/"))==null?void 0:xa.length)-1&&(rl=sl)}),(Yl=zl.blob)!=null&&Yl.includes(".stl")&&(rl=(rl==null?void 0:rl.replaceAll(">",""))+".urdf"),M.value=[{name:rl,blobUrl:Ma}],D.value=!0}}else{const Fl=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ja=await qa.axios.get(pe,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Fl.close()}),zl=new Blob([ja.data],{type:"application/octet-stream;charset=UTF-8"});let $l=URL.createObjectURL(zl),Ma="";(kl=pe==null?void 0:pe.split("/"))==null||kl.forEach((rl,sl)=>{var ga;sl===((ga=pe==null?void 0:pe.split("/"))==null?void 0:ga.length)-1&&(Ma=rl)}),M.value=[{name:Ma,blobUrl:$l}],D.value=!0}(U==null?void 0:U.length)>0&&S.setBlobUrls(U)},We=()=>{D.value=!1},Aa=pe=>{var la,fa,ka,ha;const U=(fa=(la=ll.safeClone(n.itemData))==null?void 0:la.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:fa.contents,q=ll.safeClone(pe.content);let ze={};q&&((ka=Object.values(q))==null?void 0:ka.length)>0&&((ha=Object.values(q))==null||ha.forEach((Va,Sa)=>{ze[U[Sa].key]=Va}));const _e={content:ze,index:n==null?void 0:n.index,buttonName:pe==null?void 0:pe.buttonName};t("change",_e)};e.computed(()=>"http://222.92.178.198:62001");const Da=async pe=>{var Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl,ga,xa,La,Ra;if(!pe)return;(Ha=(Za=n==null?void 0:n.itemData)==null?void 0:Za.find(xe=>(xe==null?void 0:xe.key)==="parentFormPath"))==null||Ha.contents;let U=ee.value;(U==null?void 0:U.length)>0&&(U=U==null?void 0:U.map(xe=>{var Ie,de,ma,ya;let ia=(Ie=xe==null?void 0:xe.key)==null?void 0:Ie.split("/");return(n==null?void 0:n.compName)===(ia==null?void 0:ia[0])&&(de=s.value)!=null&&de.find(Je=>(Je==null?void 0:Je.prop)===(ia==null?void 0:ia[1]))&&(xe.value=(ya=(ma=s.value)==null?void 0:ma.find(Je=>(Je==null?void 0:Je.prop)===(ia==null?void 0:ia[1])))==null?void 0:ya.value),xe}),se.setTableViewContents(U));const q=ll.safeClone(n.itemData);let ze=q==null?void 0:q.map(xe=>{var ia;return(xe==null?void 0:xe.key)==="formContent"&&((ia=xe.contents)==null||ia.map((Ie,de)=>{var ma,ya,Je,Xe,Ke,pl,Ve,Fa,Ea,il,Ia,Me,Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr;return Ie.type=(ya=(ma=s.value)==null?void 0:ma.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:ya.type,Ie.options=Ie!=null&&Ie.options?Ie.options:((Ke=(Xe=(Je=Ie==null?void 0:Ie.key)==null?void 0:Je.split("$"))==null?void 0:Xe[1])==null?void 0:Ke.length)>0?(Ea=(Fa=Lu((Ve=(pl=Ie==null?void 0:Ie.key)==null?void 0:pl.split("$"))==null?void 0:Ve[1]))==null?void 0:Fa.split(","))==null?void 0:Ea.map(Pl=>({label:Pl,value:Pl})):[],(il=Ie==null?void 0:Ie.key)!=null&&il.includes("$")&&(Ie.key=(Me=(Ia=Ie==null?void 0:Ie.key)==null?void 0:Ia.split("$"))==null?void 0:Me[0]),Ie.signature=(Il=(Sl=s.value)==null?void 0:Sl.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Il.signature,Ie.isLoginUser=(ql=(Ul=s.value)==null?void 0:Ul.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:ql.isLoginUser,Ie.value=(Ql=Object.values(pe))==null?void 0:Ql[de],Ie.isFormColHidden=(Ol=(dr=s.value)==null?void 0:dr.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Ol.isFormColHidden,Ie.isHideInForm=(Fr=(pr=s.value)==null?void 0:pr.find(Pl=>(Pl==null?void 0:Pl.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Fr.isHideInForm,Ie})),xe}),_e=s.value,la=(Yl=(xl=ll.safeClone(ze))==null?void 0:xl.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:Yl.contents;if(_e=_e==null?void 0:_e.map(xe=>{var ia,Ie;return(xe==null?void 0:xe.type)==="Select"&&((ia=xe==null?void 0:xe.allSelectionContents)==null?void 0:ia.length)>0&&(xe.contactValue=pe),xe.value=(Ie=la==null?void 0:la.find((de,ma)=>((de==null?void 0:de.id)??ma)===(xe==null?void 0:xe.id)))==null?void 0:Ie.value,xe}),!V.value){t("contentChange",{contents:ze,index:n.index});return}let fa="",ka=(ja=(Fl=(kl=ll.safeClone(ze))==null?void 0:kl.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:Fl.contents)==null?void 0:ja.find((xe,ia)=>{var Ie,de,ma;return(xe==null?void 0:xe.label)===Te.value||ia.toString()===((ma=(de=(Ie=Te.value)==null?void 0:Ie.split("t"))==null?void 0:de[1])==null?void 0:ma.toString())}),ha=(zl=ka==null?void 0:ka.optionUrl)==null?void 0:zl.menuSelect,Va=!0;if((rl=(Ma=($l=ll.safeClone(ze))==null?void 0:$l.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:Ma.contents)==null||rl.forEach(xe=>{var ia,Ie,de,ma,ya,Je;Va&&((de=(Ie=(ia=xe==null?void 0:xe.optionUrl)==null?void 0:ia.groupSelect)==null?void 0:Ie[1])!=null&&de.includes("["))&&(fa=(ya=(ma=xe==null?void 0:xe.optionUrl)==null?void 0:ma.groupSelect)==null?void 0:ya[1],JSON.stringify(ha)===JSON.stringify((Je=xe==null?void 0:xe.optionUrl)==null?void 0:Je.menuSelect)&&(Va=!1))}),(sl=ka==null?void 0:ka.optionUrl)!=null&&sl.menuSelect&&V.value){let xe=await yt(ka),ia,Ie=(ga=ka==null?void 0:ka.optionUrl)==null?void 0:ga.menuSelect;if(xe==null||xe.forEach(de=>{var ma,ya,Je,Xe,Ke,pl,Ve,Fa,Ea,il;fa===((ya=(ma=ka==null?void 0:ka.optionUrl)==null?void 0:ma.groupSelect)==null?void 0:ya[1])&&((Ke=(Xe=(Je=ka==null?void 0:ka.optionUrl)==null?void 0:Je.groupSelect)==null?void 0:Xe[1])!=null&&Ke.includes("["))&&((il=ll.safeClone(de))==null?void 0:il[(Ea=(Fa=(Ve=(pl=ka==null?void 0:ka.optionUrl)==null?void 0:pl.groupSelect)==null?void 0:Ve[1])==null?void 0:Fa.replaceAll("[",""))==null?void 0:Ea.replaceAll("]","")])===(ka==null?void 0:ka.value)&&(ia=de)}),ia){let de=ll.safeClone(_e);de=de==null?void 0:de.map(ya=>{var Je,Xe,Ke,pl,Ve,Fa,Ea,il,Ia,Me,Sl;return(ia!=null&&ia[ya==null?void 0:ya.label]||ia!=null&&ia[(pl=(Ke=(Xe=(Je=ya==null?void 0:ya.optionUrl)==null?void 0:Je.groupSelect)==null?void 0:Xe[1])==null?void 0:Ke.replaceAll("[",""))==null?void 0:pl.replaceAll("]","")])&&((Ea=(Fa=(Ve=ya==null?void 0:ya.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:Fa[1])!=null&&Ea.includes("["))&&Ie!=null&&Ie.every(Il=>{var Ul,ql;return(ql=(Ul=ya==null?void 0:ya.optionUrl)==null?void 0:Ul.menuSelect)==null?void 0:ql.includes(Il)})&&(ya.value=(ia==null?void 0:ia[ya==null?void 0:ya.label])||(ia==null?void 0:ia[(Sl=(Me=(Ia=(il=ya==null?void 0:ya.optionUrl)==null?void 0:il.groupSelect)==null?void 0:Ia[1])==null?void 0:Me.replaceAll("[",""))==null?void 0:Sl.replaceAll("]","")]),Array.isArray(ya.value)&&ya.value.every(Il=>(Il==null?void 0:Il.url)&&(Il==null?void 0:Il.name))&&(ya.type="Upload")),ya}),de=de==null?void 0:de.map(ya=>{var Je,Xe,Ke;return(Je=ya==null?void 0:ya.optionUrl)!=null&&Je.oldMenuSelect&&(ya.optionUrl.menuSelect=(Ke=(Xe=ll.safeClone(ya))==null?void 0:Xe.optionUrl)==null?void 0:Ke.oldMenuSelect),ya}),s.value=ll.safeClone(de);let ma=ll.safeClone(de);ma=ma==null?void 0:ma.map(ya=>{var Je,Xe,Ke,pl,Ve,Fa;return(Xe=(Je=ya==null?void 0:ya.optionUrl)==null?void 0:Je.menuSelect)!=null&&Xe.some(Ea=>Ea==null?void 0:Ea.includes("["))&&(ya.optionUrl.oldMenuSelect=(pl=(Ke=ll.safeClone(ya))==null?void 0:Ke.optionUrl)==null?void 0:pl.menuSelect,ya.optionUrl.menuSelect=(Fa=(Ve=ya==null?void 0:ya.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Fa.map(Ea=>{var il,Ia,Me,Sl;if(Ea!=null&&Ea.includes("[")){let Il=(Ia=(il=Ea==null?void 0:Ea.replaceAll("[","").replaceAll("]",""))==null?void 0:il.split(":"))==null?void 0:Ia[1];Ea=(Sl=(Me=ll.safeClone(de))==null?void 0:Me.find(Ul=>(Ul==null?void 0:Ul.label)===Il))==null?void 0:Sl.value}return Ea})),ya}),s.value=ma}else s.value=_e;ze=ze==null?void 0:ze.map(de=>{var ma;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(ma=de.contents)==null?void 0:ma.map(ya=>{var Je,Xe,Ke,pl;return ya.value=((Xe=(Je=s.value)==null?void 0:Je.find(Ve=>(Ve==null?void 0:Ve.label)===(ya==null?void 0:ya.key)))==null?void 0:Xe.value)??(ya==null?void 0:ya.value),ya.type=((pl=(Ke=s.value)==null?void 0:Ke.find(Ve=>(Ve==null?void 0:Ve.prop)===(ya==null?void 0:ya.key)))==null?void 0:pl.type)??(ya==null?void 0:ya.type),ya})),de})}V.value=!1,t("contentChange",{contents:ze,index:n.index});let Sa=[],Oe=[];if((La=ll.safeClone((xa=ze==null?void 0:ze.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:xa.contents))==null||La.forEach(xe=>{var ia;Array.isArray(xe==null?void 0:xe.value)&&((ia=xe==null?void 0:xe.value)!=null&&ia.find(Ie=>{var de;return(de=Ie==null?void 0:Ie.url)==null?void 0:de.includes(".obj")}))&&(Oe=xe==null?void 0:xe.value)}),(Oe==null?void 0:Oe.length)>0){const xe=(Ra=ll.safeClone(Oe))==null?void 0:Ra.filter(ia=>{var Ie;return(Ie=ia==null?void 0:ia.url)==null?void 0:Ie.includes(".obj")});xe==null||xe.forEach(ia=>{var de,ma,ya,Je;const Ie=(de=Oe==null?void 0:Oe.filter(Xe=>{var Ke;return(Xe==null?void 0:Xe.name)===(ia==null?void 0:ia.name)&&((Ke=Xe==null?void 0:Xe.url)==null?void 0:Ke.includes(".mtl"))}))==null?void 0:de.map(Xe=>Xe==null?void 0:Xe.url);Sa.push({objUrl:ia==null?void 0:ia.url,mtlUrls:((ma=Oe==null?void 0:Oe.filter(Xe=>{var Ke;return(Xe==null?void 0:Xe.name)===(ia==null?void 0:ia.name)&&((Ke=Xe==null?void 0:Xe.url)==null?void 0:Ke.includes(".mtl"))}))==null?void 0:ma.length)===1?(Je=(ya=Oe==null?void 0:Oe.filter(Xe=>{var Ke;return(Xe==null?void 0:Xe.name)===(ia==null?void 0:ia.name)&&((Ke=Xe==null?void 0:Xe.url)==null?void 0:Ke.includes(".mtl"))}))==null?void 0:ya[0])==null?void 0:Je.url:Ie})}),S.setObjUrl(Sa)}},Ze=(pe,U,q)=>{let ze="";const _e=U==null?void 0:U.map(la=>{var fa;return(fa=la==null?void 0:la.value)==null?void 0:fa.pageData});return _e==null||_e.forEach(la=>{var fa;(la==null?void 0:la.name)===(pe==null?void 0:pe[0])&&((fa=la==null?void 0:la.compData)==null||fa.forEach(ka=>{var ha;(ka==null?void 0:ka.key)==="formContent"&&((ha=ka==null?void 0:ka.contents)==null||ha.forEach(Va=>{var Sa;(Va==null?void 0:Va.prop)===(pe==null?void 0:pe[1])&&(ze=(Va==null?void 0:Va.value)===""?he.judgeContents((Sa=ll.safeClone(Va))==null?void 0:Sa.optionUrl,q):Va==null?void 0:Va.value)}))}))}),ze},ra=(pe,U,q,ze)=>{var ka,ha;let _e="",la="";(ka=ll.safeClone(U))==null||ka.forEach((Va,Sa)=>{Va!=null&&Va.includes("[")?la=la+Na.value+pe[Sa]:la=la===""?la+Va:la+"/"+Va});let fa=(ha=ze[la])==null?void 0:ha.map(Va=>{var Sa;return(Sa=Va==null?void 0:Va.value)==null?void 0:Sa.pageData});return fa==null||fa.forEach(Va=>{var Sa;(Va==null?void 0:Va.name)===(q==null?void 0:q[0])&&((Sa=Va==null?void 0:Va.compData)==null||Sa.forEach(Oe=>{var Za;(Oe==null?void 0:Oe.key)==="formContent"&&((Za=Oe==null?void 0:Oe.contents)==null||Za.forEach(Ha=>{(Ha==null?void 0:Ha.prop)===(q==null?void 0:q[1])&&(_e=Ha==null?void 0:Ha.value)}))}))}),_e};return e.watch(()=>B==null?void 0:B.value,async()=>{await ca()},{immediate:!0}),e.watch(()=>n.itemData,async()=>{var Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl,ga,xa,La,Ra,xe,ia,Ie,de,ma,ya,Je;const pe=(Za=n.itemData)==null?void 0:Za.find(Xe=>(Xe==null?void 0:Xe.key)==="formContent"),U=(Ha=ll.safeClone(n.itemData))==null?void 0:Ha.find(Xe=>(Xe==null?void 0:Xe.key)==="formButton"),q=(xl=ll.safeClone(n.itemData))==null?void 0:xl.find(Xe=>(Xe==null?void 0:Xe.key)==="formFlex"),ze=(Yl=ll.safeClone(n.itemData))==null?void 0:Yl.find(Xe=>(Xe==null?void 0:Xe.key)==="formWrap"),_e=(kl=ll.safeClone(n.itemData))==null?void 0:kl.find(Xe=>(Xe==null?void 0:Xe.key)==="enableWrap"),la=(Fl=ll.safeClone(n.itemData))==null?void 0:Fl.find(Xe=>(Xe==null?void 0:Xe.key)==="textSize"),fa=(ja=ll.safeClone(n.itemData))==null?void 0:ja.find(Xe=>(Xe==null?void 0:Xe.key)==="textRGBA"),ka=(zl=ll.safeClone(n.itemData))==null?void 0:zl.find(Xe=>(Xe==null?void 0:Xe.key)==="backGround"),ha=($l=ll.safeClone(n.itemData))==null?void 0:$l.find(Xe=>(Xe==null?void 0:Xe.key)==="backGroundImage");(ze==null?void 0:ze.contents)==="纵向"?c.value=!1:c.value=!0;const Va=Number(la==null?void 0:la.contents);b.value=Number.isNaN(Va)?void 0:Va,g.value=fa==null?void 0:fa.contents,R.value=ka==null?void 0:ka.contents,I.value=ha==null?void 0:ha.contents;const Sa=_e==null?void 0:_e.contents;if(Sa===void 0?w.value=ri.BLOCK:typeof Sa=="boolean"?w.value=Sa?ri.ORDINARY:ri.BLOCK:w.value=Sa,Y.value=typeof(q==null?void 0:q.contents)!="boolean"?!(!(q!=null&&q.contents)===""||((Ma=q==null?void 0:q.contents)==null?void 0:Ma.toUpperCase())==="VERTICAL"):q==null?void 0:q.contents,((rl=pe==null?void 0:pe.contents)==null?void 0:rl.length)>0&&Array.isArray(pe==null?void 0:pe.contents)){let Xe=n.allMapContents;const Ke=(ga=(sl=ll.safeClone(pe))==null?void 0:sl.contents)==null?void 0:ga.map((Me,Sl)=>{var Ir,Er,Cr,mn,Nr,cr,yn,ln,rn,Sn,Nn,pn,lr;let Il=(Me==null?void 0:Me.label)??(Me==null?void 0:Me.key)??"";Me==null||Me.type;let Ul=(Me==null?void 0:Me.options)??[];if((Ir=Me==null?void 0:Me.key)!=null&&Ir.includes("$")&&(Il=(Er=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Er[0],((mn=(Cr=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Cr[1])==null?void 0:mn.length)>0)){const[Ml,zr]=(cr=(Nr=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Nr[1])==null?void 0:cr.split(/[()]/);(yn=he.FormType.find(cl=>(cl==null?void 0:cl.key)===Ml))==null||yn.value,((ln=zr==null?void 0:zr.split(","))==null?void 0:ln.length)>0&&(Ul=(rn=zr==null?void 0:zr.split(","))==null?void 0:rn.map(cl=>({label:cl,value:cl})))}let ql=Me==null?void 0:Me.options;((Sn=Me==null?void 0:Me.optionUrl)==null?void 0:Sn.selectRelateType)==="自定义绑定"&&(ql=(pn=(Nn=Me==null?void 0:Me.optionUrl)==null?void 0:Nn.defaultSelect)==null?void 0:pn.map(Ml=>({label:Ml,value:Ml})));let Ql=(Me==null?void 0:Me.menuPath)??[],dr=(Me==null?void 0:Me.groups)??[],Ol=(Me==null?void 0:Me.columns)??[],pr=!1,Fr=(Me==null?void 0:Me.isFormColHidden)??!1,Pl="",ar=Me!=null&&Me.value?Me.value:(ql==null?void 0:ql.length)>0?(lr=ql==null?void 0:ql[0])==null?void 0:lr.value:(Me==null?void 0:Me.value)??"",Pr=!1,Tr="Input";return((ql==null?void 0:ql.length)>0||(Ql==null?void 0:Ql.length)>0)&&(Tr="Select"),(Array.isArray(Pl)&&(Pl!=null&&Pl.every(Ml=>(Ml==null?void 0:Ml.name)&&(Ml==null?void 0:Ml.url)))||Array.isArray(ar)&&(ar!=null&&ar.every(Ml=>(Ml==null?void 0:Ml.name)&&(Ml==null?void 0:Ml.url))))&&(Tr="upload"),Me!=null&&Me.isMainUrl&&(Tr="Url"),{label:Il??"",name:Il??"t"+Sl,prop:Il??ll.safeClone(Me==null?void 0:Me.key),type:(Me==null?void 0:Me.type)??Tr,value:(Me==null?void 0:Me.type)==="Date"&&ar===""?new Date:ar,id:(Me==null?void 0:Me.id)??Sl,contents:(ql==null?void 0:ql.length)>0?ql:Ul??[],width:(Me==null?void 0:Me.width)??1,isLoginUser:pr,config:Me==null?void 0:Me.config,optionUrl:(Me==null?void 0:Me.optionUrl)??Me,isFormColHidden:Fr,isHideInForm:(Me==null?void 0:Me.isHideInForm)??!1,signature:Pr,isMain:Me==null?void 0:Me.isMain,required:(Me==null?void 0:Me.required)??!1,isMainUrl:Me==null?void 0:Me.isMainUrl,operable:(Me==null?void 0:Me.operable)??!1,disabled:(Me==null?void 0:Me.disabled)??!1,isSync:Me==null?void 0:Me.isSync,menus:Ql,groups:dr,words:Ol,allSelectionContents:Me==null?void 0:Me.allContents,filterContent:Me==null?void 0:Me.filterContents,isNoClick:(Me==null?void 0:Me.isNoClick)??!1}}),pl=Ke==null?void 0:Ke.map(Me=>Me==null?void 0:Me.value);let Ve="";pl==null||pl.forEach(Me=>{Me!==""&&Me!==void 0&&(Ve=Ve===""?Me:Ve+"/"+Me)}),E.setSelectArray(pl),E.setSelectString(Ve);let Fa=(xa=ll.safeClone(Ke))==null?void 0:xa.map(Me=>(Me!=null&&Me.value&&he.IsJson(Me==null?void 0:Me.value)&&Array.isArray(JSON.parse(Me==null?void 0:Me.value))&&(Me.value=JSON.parse(Me.value)),Me)),Ea={};Fa==null||Fa.forEach(Me=>{Ea[Me.label]=Me==null?void 0:Me.value}),Fa=Fa==null?void 0:Fa.map(Me=>{var Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr;if((Me==null?void 0:Me.type)==="Select"&&((Sl=Me==null?void 0:Me.allSelectionContents)==null?void 0:Sl.length)>0&&(Me.contactValue=Ea),(Ul=(Il=Me==null?void 0:Me.optionUrl)==null?void 0:Il.menuSelect)!=null&&Ul.some(Pl=>Pl==null?void 0:Pl.includes("["))){let Pl="";Me.optionUrl.oldMenuSelect=(Ql=(ql=ll.safeClone(Me))==null?void 0:ql.optionUrl)==null?void 0:Ql.menuSelect,Me.optionUrl.menuSelect=(Ol=(dr=Me==null?void 0:Me.optionUrl)==null?void 0:dr.menuSelect)==null?void 0:Ol.map(ar=>{var Pr,Tr,jr,Ir,Er,Cr;if(ar!=null&&ar.includes("[")){let mn=(Tr=(Pr=ar==null?void 0:ar.replaceAll("[","").replaceAll("]",""))==null?void 0:Pr.split(":"))==null?void 0:Tr[1];Pl=Ze((jr=ar==null?void 0:ar.replaceAll("[","").replaceAll("]",""))==null?void 0:jr.split(":"),Xe==null?void 0:Xe[Fe.value],Xe),ar=((Er=(Ir=ll.safeClone(Fa))==null?void 0:Ir.find(Nr=>(Nr==null?void 0:Nr.label)===mn))==null?void 0:Er.value)||Ze((Cr=ar==null?void 0:ar.replaceAll("[","").replaceAll("]",""))==null?void 0:Cr.split(":"),Xe==null?void 0:Xe[Fe.value],Xe)}return ar}),Pl!==""&&Me.value===""&&(Me.value=ra(Me.optionUrl.menuSelect,Me.optionUrl.oldMenuSelect,(pr=Me==null?void 0:Me.optionUrl)==null?void 0:pr.groupSelect,Xe),Array.isArray(Me.value)&&((Fr=Me.value)!=null&&Fr.every(ar=>ar==null?void 0:ar.url))&&(Me.type="UPLOAD"))}return Me}),s.value=Fa,Se.value=((La=s.value)==null?void 0:La.every(Me=>Me==null?void 0:Me.disabled))||ve.value===Fe.value,W.value=(Ra=s.value)==null?void 0:Ra.every(Me=>Me==null?void 0:Me.operable),Ee.value=(xe=s.value)==null?void 0:xe.map(Me=>Me==null?void 0:Me.label);let il=[],Ia=[];if((ia=ll.safeClone(s.value))==null||ia.forEach(Me=>{var Sl;Array.isArray(Me==null?void 0:Me.value)&&((Sl=Me==null?void 0:Me.value)!=null&&Sl.find(Il=>{var Ul;return(Ul=Il==null?void 0:Il.url)==null?void 0:Ul.includes(".obj")}))&&(Ia=Me==null?void 0:Me.value)}),(Ia==null?void 0:Ia.length)>0){const Me=(Ie=ll.safeClone(Ia))==null?void 0:Ie.filter(Sl=>{var Il;return(Il=Sl==null?void 0:Sl.url)==null?void 0:Il.includes(".obj")});Me==null||Me.forEach(Sl=>{var Ul,ql,Ql,dr;const Il=(Ul=Ia==null?void 0:Ia.filter(Ol=>{var pr;return(Ol==null?void 0:Ol.name)===(Sl==null?void 0:Sl.name)&&((pr=Ol==null?void 0:Ol.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Ul.map(Ol=>Ol==null?void 0:Ol.url);il.push({objUrl:Sl==null?void 0:Sl.url,mtlUrls:((ql=Ia==null?void 0:Ia.filter(Ol=>{var pr;return(Ol==null?void 0:Ol.name)===(Sl==null?void 0:Sl.name)&&((pr=Ol==null?void 0:Ol.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:ql.length)===1?(dr=(Ql=Ia==null?void 0:Ia.filter(Ol=>{var pr;return(Ol==null?void 0:Ol.name)===(Sl==null?void 0:Sl.name)&&((pr=Ol==null?void 0:Ol.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Ql[0])==null?void 0:dr.url:Il})}),S.setObjUrl(il)}(de=ll.safeClone(s.value))==null||de.forEach(Me=>{var Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr,Pl,ar,Pr,Tr;if((Il=(Sl=Me==null?void 0:Me.value)==null?void 0:Sl.toString())!=null&&Il.includes(".stl")||(ql=(Ul=Me==null?void 0:Me.value)==null?void 0:Ul.toString())!=null&&ql.includes(".STL")||(dr=(Ql=Me==null?void 0:Me.value)==null?void 0:Ql.toString())!=null&&dr.includes(".obj")||(pr=(Ol=Me==null?void 0:Me.value)==null?void 0:Ol.toString())!=null&&pr.includes(".mtl")||(Pl=(Fr=Me==null?void 0:Me.value)==null?void 0:Fr.toString())!=null&&Pl.includes(".urdf")){let jr={},Ir=[],Er;Array.isArray(Me==null?void 0:Me.value)?Er=Me==null?void 0:Me.value:Er=(ar=Me==null?void 0:Me.value)==null?void 0:ar.split(","),Er==null||Er.forEach(Cr=>{Cr.includes(".mtl")?Ir.push(Cr):jr.blob=jr.blob==="undefined"?Cr:jr.blob+","+Cr}),(Ir==null?void 0:Ir.length)>0&&(jr.mtlBlobs=Ir),(Tr=(Pr=Object.values(jr))==null?void 0:Pr[0])!=null&&Tr.includes("http:")}})}else s.value=[];let Oe=ee.value;if((Oe==null?void 0:Oe.length)>0&&(Oe=Oe==null?void 0:Oe.map(Xe=>{var pl,Ve,Fa,Ea;let Ke=(pl=Xe==null?void 0:Xe.key)==null?void 0:pl.split("/");return(n==null?void 0:n.compName)===(Ke==null?void 0:Ke[0])&&(Ve=s.value)!=null&&Ve.find(il=>(il==null?void 0:il.prop)===(Ke==null?void 0:Ke[1]))&&(Xe.value=(Ea=(Fa=s.value)==null?void 0:Fa.find(il=>(il==null?void 0:il.prop)===(Ke==null?void 0:Ke[1])))==null?void 0:Ea.value),Xe}),se.setTableViewContents(Oe)),n!=null&&n.formRules)k.value=n==null?void 0:n.formRules;else{let Xe={};(ma=ll.safeClone(s).value)==null||ma.forEach(Ke=>{((Ke==null?void 0:Ke.isMain)===!0||(Ke==null?void 0:Ke.required)===!0)&&(Xe[(Ke==null?void 0:Ke.prop)??(Ke==null?void 0:Ke.name)]=[{required:!0,message:`${(Ke==null?void 0:Ke.label)||(Ke==null?void 0:Ke.prop)||(Ke==null?void 0:Ke.name)}不能为空`}])}),k.value=Xe}if(((ya=U==null?void 0:U.contents)==null?void 0:ya.length)>0){const Xe=[];(Je=U==null?void 0:U.contents)==null||Je.forEach((Ke,pl)=>{(Ke==null?void 0:Ke.label)!==""&&Xe.push({label:(Ke==null?void 0:Ke.label)??"",id:(Ke==null?void 0:Ke.id)??pl,type:(Ke==null?void 0:Ke.type)??"",background:Ke==null?void 0:Ke.background})}),G.value=Xe}else G.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ve.value,pe=>{Se.value=pe===Fe.value},{immediate:!0}),(pe,U)=>{var ka;const q=e.resolveComponent("svg-icon"),ze=e.resolveComponent("el-switch"),_e=e.resolveComponent("el-checkbox"),la=e.resolveComponent("el-popover"),fa=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",P3,[w.value===e.unref(ri).TEXT?(e.openBlock(),e.createBlock(Nc,{key:0,itemData:a.itemData,compName:a.compName,fields:s.value,textSize:b.value,textColor:g.value,backGround:R.value,backGroundImage:I.value,disabled:Se.value||oe(),"onUpdate:backGroundImage":pa},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):w.value===e.unref(ri).BLOCK?(e.openBlock(),e.createBlock(Sf,{key:1,items:(ka=s.value)==null?void 0:ka.map(ha=>({label:ha!=null&&ha.isHideInForm?"":ha==null?void 0:ha.label,value:ha==null?void 0:ha.value,width:(ha==null?void 0:ha.width)??1,field:ha})),textSize:b.value,textColor:g.value,backGround:R.value,backGroundImage:I.value,disabled:Se.value||oe(),"onUpdate:backGroundImage":pa},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":w.value===e.unref(ri).ORDINARY})},[e.createVNode(ll.ssForm,{rowContents:s.value,formRules:k.value,buttonValue:G.value,isRowFlex:!1,isEnableWrap:!0,textSize:b.value,textColor:g.value,backGround:R.value,backGroundImage:I.value,onOnButtonClick:Aa,onChange:Da,formDisabled:Se.value||oe(),formLabelsOperable:W.value,isButtonRow:c.value,onPreview:Ne,onBlurChange:te,onHandleColEditChange:fe,onHandleColTypeChange:da,onRouteUrl:H,onClickTrigger:L,"onUpdate:backGroundImage":pa},{operateCol:e.withCtx(({renderColumns:ha,formDisabled:Va,formLabelsOperable:Sa})=>[e.createVNode(la,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:oa},{reference:e.withCtx(()=>[e.createElementVNode("span",j3,[e.createVNode(q,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",H3,[U[1]||(U[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ze,{"model-value":Va,"active-text":"禁用","inactive-text":"",onChange:Be,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ze,{"model-value":Sa,"active-text":"编辑所有标签","inactive-text":"",onChange:Ue},null,8,["model-value"]),U[2]||(U[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(fa,{modelValue:Ee.value,"onUpdate:modelValue":U[0]||(U[0]=Oe=>Ee.value=Oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ce,onChange:Ja},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ha,Oe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Oe.label},[e.createVNode(_e,{value:Oe.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Oe.label),1)]),_:2},1032,["value"]),e.createVNode(la,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(q,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Za;return[e.createElementVNode("div",U3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Za=Object.keys(Oe))==null?void 0:Za.filter(Ha=>{var xl;return(xl=ie.value)==null?void 0:xl.find(Yl=>(Yl==null?void 0:Yl.value)===Ha)}),Ha=>{var xl,Yl;return e.openBlock(),e.createElementBlock("div",{key:Ha},[e.createVNode(ll._sfc_main$1,{value:Oe==null?void 0:Oe[Ha],"active-text":(Yl=(xl=ie.value)==null?void 0:xl.find(kl=>(kl==null?void 0:kl.value)===Ha))==null?void 0:Yl.label,inactiveText:"",onChange:kl=>Qe(kl,Ha,Oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",q3,[e.createVNode(q,{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"])],2)),D.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:3,fileDataList:M.value,onDestroy:We},null,8,["fileDataList"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createBlock(wr.ssDialog,{key:4,visible:v.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(_o.ThreeViewerHost,{files:f.value,onGetAnimationData:pe.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},bs=Xl._export_sfc(W3,[["__scopeId","data-v-7bb009b3"]]),zo=e.ref(0),Bc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=A.cloneDeep(a))==null?void 0:l.map(n=>(zo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??zo.value,children:Bc(n==null?void 0:n.children)},n))},K3=a=>{var r;return(r=A.cloneDeep(a))==null?void 0:r.map(n=>(zo.value++,n={label:(n==null?void 0:n.label)??"",prop:(n==null?void 0:n.label)==="操作"?"operate":n==null?void 0:n.prop,width:n!=null&&n.width?parseInt(n.width):"",fixed:(n==null?void 0:n.fixed)??void 0,sortable:(n==null?void 0:n.sortable)??!1,align:(n==null?void 0:n.align)??"left",showOverflowTooltip:(n==null?void 0:n.showOverflowTooltip)??!0,isNotDrag:(n==null?void 0:n.isNotDrag)??!1,isEditCol:(n==null?void 0:n.isEditCol)??!1,isOperate:(n==null?void 0:n.isOperate)??!1,id:(n==null?void 0:n.id)??zo.value,children:Bc(n==null?void 0:n.children)},n))},Tc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===l)?(r=A.cloneDeep(a))==null?void 0:r.filter(t=>(t==null?void 0:t.id)!==l):(a=a==null?void 0:a.map(n=>(n.children=Tc(n==null?void 0:n.children,l),n)),a)},Ac=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=A.cloneDeep(a))==null?void 0:r.map(t=>((t==null?void 0:t.id)===(l==null?void 0:l.id)&&(t=l),t)):(a=a==null?void 0:a.map(n=>(n.children=Ac(n==null?void 0:n.children,l),n)),a)},zc=(a,l)=>{var r;return a!=null&&a.find(n=>{var t;return(n==null?void 0:n.id)===((t=l==null?void 0:l.contents)==null?void 0:t.id)})?(r=A.cloneDeep(a))==null?void 0:r.map(t=>{var s;return(t==null?void 0:t.id)===((s=l==null?void 0:l.contents)==null?void 0:s.id)&&(t=l==null?void 0:l.contents),t}):(a=a==null?void 0:a.map(n=>(n.children=zc(n==null?void 0:n.children,l),n)),a)},Mc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=A.cloneDeep(a))==null?void 0:r.map(t=>((t==null?void 0:t.id)===(l==null?void 0:l.id)&&(t!=null&&t.children||(t.children=[]),t.children.push(l.contents)),t)):(a=a==null?void 0:a.map(n=>(n.children=Mc(n==null?void 0:n.children,l),n)),a)},ir=[{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"}],G3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Y3=[{label:"新增",value:"add"}],Mn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Y3},{key:"background",label:"按钮背景色",type:"Color"}],In=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:G3},{key:"textColor",label:"按钮颜色",type:"Color"}],J3={class:"table-header-child"},X3={class:"table-header-child-main"},Z3={class:"table-header-child-content"},Q3={class:"table-header-child-content-item"},eh={class:"fix-button"},ah={key:0},lh={class:"form-content"},rh={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(!1),s=e.ref(""),v=he.useTableComp(A.pinia),{tableIndex:p}=A.storeToRefs(v);e.ref(0);const f=e.ref(""),m=e.ref([]),k=e.ref([]),c=E=>{var w;t.value=!0;let S=[];ir==null||ir.forEach(b=>{let g=A.cloneDeep(p.value)+1;v.setTableIndex(g),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:p.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),f.value=E==null?void 0:E.id,m.value=S,k.value=S},D=E=>{n("fixChange",A.cloneDeep(E))},F=E=>{n("deleteChange",A.cloneDeep(E))},_=E=>{t.value=!0;let S=[];ir==null||ir.forEach(w=>{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),S.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:p.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=S,k.value=S},G=E=>{let S=A.cloneDeep(k.value);S=S==null?void 0:S.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),k.value=S},M=()=>{var S,w;m.value=k.value;let E={};if(f.value!=="")E.id=f.value,(S=m.value)==null||S.forEach(b=>{const g=ir==null?void 0:ir.find(R=>(R==null?void 0:R.label)===(b==null?void 0:b.label));g?E[g.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),E.id="id"+p.value,(w=m.value)==null||w.forEach(g=>{const R=ir==null?void 0:ir.find(I=>(I==null?void 0:I.label)===(g==null?void 0:g.label));R?E[R.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}f.value="",m.value=[],k.value=[]},$=()=>{t.value=!1,f.value="",s.value="",m.value=[],k.value=[]},j=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",J3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(b,g)=>(e.openBlock(),e.createElementBlock("div",X3,[e.createElementVNode("div",Z3,[e.createElementVNode("div",Q3,e.toDisplayString(b.label),1),e.createElementVNode("div",eh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>_(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>c(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:R=>j(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",ah,[e.createVNode(Ic,{tableChildContents:b==null?void 0:b.children,onDeleteChange:F,onFixChange:D},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",lh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:G},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:$,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:M},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},nh=Xl._export_sfc(rh,[["__scopeId","data-v-e0fef72d"]]),ih={class:"table-header-child"},oh={class:"table-header-child-main"},th={class:"table-header-child-content"},sh={class:"table-header-child-content-item"},ch={class:"fix-button"},uh={key:0},dh={class:"form-content"},ph={class:"dialog-footer"},fh={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(!1),s=e.ref(""),v=he.useTableComp(A.pinia),{tableIndex:p}=A.storeToRefs(v),f=e.ref(""),m=e.ref([]),k=e.ref([]),c=E=>{n("fixChange",A.cloneDeep(E))},D=E=>{var w;t.value=!0;let S=[];ir==null||ir.forEach(b=>{let g=A.cloneDeep(p.value)+1;v.setTableIndex(g),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:p.value,contents:b==null?void 0:b.options})}),E!=null&&E.children&&((w=E==null?void 0:E.children)==null?void 0:w.length)>0&&S.push({children:E==null?void 0:E.children,isFormColHidden:!0}),f.value=E==null?void 0:E.id,m.value=S,k.value=S},F=E=>{t.value=!0;let S=[];ir==null||ir.forEach(w=>{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),S.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:"",id:p.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=S,k.value=S},_=E=>{let S=A.cloneDeep(k.value);S=S==null?void 0:S.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),k.value=S},G=()=>{var S,w;m.value=k.value;let E={};if(f.value!=="")E.id=f.value,(S=m.value)==null||S.forEach(b=>{const g=ir==null?void 0:ir.find(R=>(R==null?void 0:R.label)===(b==null?void 0:b.label));g?E[g.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"fix"});else{let b=A.cloneDeep(p.value)+1;v.setTableIndex(b),E.id="idChild"+p.value,(w=m.value)==null||w.forEach(g=>{const R=ir==null?void 0:ir.find(I=>(I==null?void 0:I.label)===(g==null?void 0:g.label));R?E[R.key]=g.value:g!=null&&g.children&&g.children.length>0&&(E.children=g.children)}),t.value=!1,n("fixChange",{contents:A.cloneDeep(E),id:s.value,type:"add"})}f.value="",m.value=[],k.value=[]},M=()=>{t.value=!1,f.value="",s.value="",m.value=[],k.value=[]},$=E=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},j=E=>{n("deleteChange",E)};return(E,S)=>{const w=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ih,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(g,R)=>(e.openBlock(),e.createElementBlock("div",oh,[e.createElementVNode("div",th,[e.createElementVNode("div",sh,e.toDisplayString(g.label),1),e.createElementVNode("div",ch,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>F(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>D(g)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:I=>$(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",uh,[e.createVNode(nh,{tableChildContents:g==null?void 0:g.children,onDeleteChange:j,onFixChange:c},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:M,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",dh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ph,[e.createVNode(b,{onClick:M,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"ok-button button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ic=Xl._export_sfc(fh,[["__scopeId","data-v-ebd68fa1"]]),hh={class:"table-operate-content"},vh={class:"table-operate-item"},mh={class:"operate-title"},yh={class:"operate-content"},gh={class:"fix-content"},bh={class:"fix-content-label"},kh={class:"fix-button"},xh={key:0},wh={class:"operate-title"},_h={class:"operate-content"},Sh={class:"fix-content"},Eh={class:"fix-content-label"},Ch={class:"fix-button"},Dh={class:"operate-title"},Nh={class:"operate-content"},Bh={class:"fix-content"},Th={class:"fix-content-label"},Ah={class:"fix-button"},zh={class:"operate-title"},Mh={class:"operate-content"},Ih={class:"fix-content"},Oh={class:"fix-content-label"},Lh={class:"fix-button"},$h={class:"operate-content"},Rh={style:{display:"flex","justify-content":"space-between"}},Vh={class:"form-content"},Fh={class:"dialog-footer"},Ph={class:"form-content"},jh={class:"dialog-footer"},Hh={class:"form-content"},Uh={class:"dialog-footer"},qh={class:"form-content"},Wh={class:"dialog-footer"},Kh={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]),s=e.ref(!1),v=e.ref(!1),p=e.ref([]),f=e.ref(!1),m=e.ref([]),k=e.ref(!1),c=e.ref([]),D=e.ref(""),F=e.ref(""),_=e.ref([]),G=e.ref([]),M=e.ref([]),$=e.ref([]),j=e.ref(!1),E=e.ref([]),S=e.ref([]),w=e.ref(0),b=e.ref([]),g=e.ref([]),R=e.ref([]),I=()=>{j.value=!0;let L=[];Mn==null||Mn.forEach(H=>{w.value++,L.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:H==null?void 0:H.options})}),E.value=L,S.value=L},Y=()=>{var H,Z,me;v.value=!0;let L=[];(me=(Z=(H=he.FormContent)==null?void 0:H.find(fe=>(fe==null?void 0:fe.key)==="Input"))==null?void 0:Z.value)==null||me.forEach(fe=>{w.value++,L.push({label:fe==null?void 0:fe.label,name:(fe==null?void 0:fe.name)||(fe==null?void 0:fe.label),type:fe.type,value:(fe==null?void 0:fe.label)==="类型"?"Input":"",id:w.value,contents:fe==null?void 0:fe.options})}),b.value=L,g.value=L},le=L=>{L||(b.value=g.value)},ye=async L=>{var H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da;if((L==null?void 0:L.类型)!==((Z=(H=g.value)==null?void 0:H.find(Ze=>(Ze==null?void 0:Ze.label)==="类型"))==null?void 0:Z.value)){let Ze=[],ra=await((da=(fe=(me=he.FormContent)==null?void 0:me.find(pe=>(pe==null?void 0:pe.key)===((L==null?void 0:L.类型)===""?"Input":L==null?void 0:L.类型)))==null?void 0:fe.value)==null?void 0:da.value)?await((We=(Ne=(pa=he.FormContent)==null?void 0:pa.find(pe=>(pe==null?void 0:pe.key)===((L==null?void 0:L.类型)===""?"Input":L==null?void 0:L.类型)))==null?void 0:Ne.value)==null?void 0:We.value):(te=(Qe=he.FormContent)==null?void 0:Qe.find(pe=>(pe==null?void 0:pe.key)===((L==null?void 0:L.类型)===""?"Input":L==null?void 0:L.类型)))==null?void 0:te.value;if(ra==null||ra.forEach(pe=>{w.value++,Ze.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.name)||(pe==null?void 0:pe.label),type:pe.type,value:pe!=null&&pe.属性名?(L==null?void 0:L.prop)||(L==null?void 0:L.name)||(L==null?void 0:L.label):(L==null?void 0:L[pe.label])??"",id:w.value,contents:pe==null?void 0:pe.options,prop:(pe==null?void 0:pe.prop)||(pe==null?void 0:pe.name)||(pe==null?void 0:pe.label)})}),L!=null&&L.菜单选项&&((Aa=L==null?void 0:L.菜单选项)==null?void 0:Aa.length)>0){const pe=await he.menuToContentType(L==null?void 0:L.菜单选项);Ze=Ze==null?void 0:Ze.map(U=>((U==null?void 0:U.name)==="组信息选项"&&(U.contents=pe),U))}g.value=await he.selectToBase(A.cloneDeep(Ze)),b.value=await he.selectToBase(A.cloneDeep(Ze))}else{let Ze=A.cloneDeep(b.value);if(Ze=Ze==null?void 0:Ze.map(ra=>(ra.value=L==null?void 0:L[ra.name],ra)),L!=null&&L.菜单选项&&((Da=L==null?void 0:L.菜单选项)==null?void 0:Da.length)>0){const ra=await he.menuToContentType(L==null?void 0:L.菜单选项);Ze=Ze==null?void 0:Ze.map(pe=>((pe==null?void 0:pe.name)==="组信息选项"&&(pe.contents=ra),pe))}Ze=he.formToOptionsContents(Ze),g.value=await he.selectToBase(A.cloneDeep(Ze))}},Te=async L=>{await ye(L),b.value=g.value},V=(L,H)=>{if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="selectRelateType"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.selectRelateType)||H[L.key]}if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="menuSelect"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.menuSelect)||H[L.key]}if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="groupSelect"){const Z=H==null?void 0:H.optionUrl;return(Z==null?void 0:Z.groupSelect)||H[L.key]}if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="originalContent")return(H==null?void 0:H.value)||H[L.key];if((H==null?void 0:H.type)=="Select"&&(L==null?void 0:L.key)==="multiple"){const Z=H[L.key];return Js(Z)?Z:L.default}return(L==null?void 0:L.label)==="类型"&&H[L.key]===""?"Input":(L==null?void 0:L.key)==="isFormColHidden"&&!H[L.key]?!1:H[L.key]},se=async L=>{var me,fe,da,Qe,te,pa,Ne,We,Aa;v.value=!0;let H=[];const Z=await((da=(fe=(me=he.FormContent)==null?void 0:me.find(Da=>(Da==null?void 0:Da.key)===((L==null?void 0:L.type)===""?"Input":L==null?void 0:L.type)))==null?void 0:fe.value)==null?void 0:da.value)?await((We=(Ne=(pa=he.FormContent)==null?void 0:pa.find(Da=>(Da==null?void 0:Da.key)===((L==null?void 0:L.type)===""?"Input":L==null?void 0:L.type)))==null?void 0:Ne.value)==null?void 0:We.value):(te=(Qe=he.FormContent)==null?void 0:Qe.find(Da=>(Da==null?void 0:Da.key)===((L==null?void 0:L.type)===""?"Input":L==null?void 0:L.type)))==null?void 0:te.value;if(Z==null||Z.forEach(Da=>{w.value++,H.push({label:Da==null?void 0:Da.label,name:(Da==null?void 0:Da.name)||(Da==null?void 0:Da.label),type:Da.type,value:(Da==null?void 0:Da.label)==="属性名"?(L==null?void 0:L.prop)||(L==null?void 0:L.name)||(L==null?void 0:L.label):V(Da,L),id:w.value,contents:Da==null?void 0:Da.options})}),L!=null&&L.menuSelect&&((Aa=L==null?void 0:L.menuSelect)==null?void 0:Aa.length)>0){const Da=await he.menuToContentType(L==null?void 0:L.menuSelect);H=H==null?void 0:H.map(Ze=>((Ze==null?void 0:Ze.name)==="组信息选项"&&(Ze.contents=Da),Ze))}D.value=L==null?void 0:L.id,b.value=await he.selectToBase(he.formToOptionsContents(H)),g.value=await he.selectToBase(he.formToOptionsContents(H))},ee=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;R.value=(H=A.cloneDeep(R.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="tableToForm"&&(me.contents=R.value),me))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ue=()=>{v.value=!1,b.value=[],D.value=""},Ce=async()=>{var me,fe,da,Qe,te,pa,Ne,We,Aa,Da;b.value=g.value;let L={};D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value);let H=await((da=(fe=(me=he.FormContent)==null?void 0:me.find(Ze=>{var ra,pe;return(Ze==null?void 0:Ze.key)===(((pe=(ra=b.value)==null?void 0:ra.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:fe.value)==null?void 0:da.value)??((te=(Qe=he.FormContent)==null?void 0:Qe.find(Ze=>{var ra,pe;return(Ze==null?void 0:Ze.key)===(((pe=(ra=b.value)==null?void 0:ra.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:te.value);if((pa=b.value)==null||pa.forEach(Ze=>{const ra=H==null?void 0:H.find(pe=>(pe==null?void 0:pe.label)===(Ze==null?void 0:Ze.label));ra&&(L[ra.key]=Ze.value)}),L.name=L.label,(Ne=R.value)!=null&&Ne.find(Ze=>Ze.id===L.id))R.value=(We=R.value)==null?void 0:We.map(Ze=>(Ze.id===L.id&&(Ze=L),Ze));else{let Ze=A.cloneDeep(R.value);R.value||(R.value=[]),Ze.push(L),R.value=Ze}R.value=R.value.map(({id:Ze,...ra})=>ra),v.value=!1,D.value="";let Z=A.cloneDeep(r.originalItemContents);(Aa=A.cloneDeep(r.originalItemContents))!=null&&Aa.find(Ze=>(Ze==null?void 0:Ze.key)==="tableToForm")?Z=(Da=A.cloneDeep(r.originalItemContents))==null?void 0:Da.map(Ze=>((Ze==null?void 0:Ze.key)==="tableToForm"&&(Ze.contents=R.value),Ze)):Z.push({key:"tableToForm",contents:R.value}),n("change",Z)},Pe=L=>{j.value=!0;let H=[];Mn==null||Mn.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:L[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),D.value=L==null?void 0:L.id,E.value=H,S.value=H};e.watch(()=>k.value,()=>{var H,Z;let L=A.cloneDeep(r.originalItemContents);(H=A.cloneDeep(r.originalItemContents))!=null&&H.find(me=>(me==null?void 0:me.key)==="page")?L=(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="page"&&(me.contents=k.value),me)):L.push({key:"page",contents:k.value}),n("change",L)},{deep:!0});const ve=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;G.value=(H=A.cloneDeep(G.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="extraButton"&&(me.contents=G.value),me))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{var Z,me,fe,da,Qe;E.value=S.value;let L={};if(D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value),(Z=E.value)==null||Z.forEach(te=>{const pa=Mn==null?void 0:Mn.find(Ne=>(Ne==null?void 0:Ne.label)===(te==null?void 0:te.label));pa?L[pa.key]=te.value:te!=null&&te.children&&te.children.length>0&&(L.children=te.children)}),(me=G.value)!=null&&me.find(te=>te.id===L.id))G.value=(fe=G.value)==null?void 0:fe.map(te=>(te.id===L.id&&(te=L),te));else{let te=A.cloneDeep(G.value)??[];te.push(L),G.value=te}j.value=!1,D.value="";let H=A.cloneDeep(r.originalItemContents);(da=A.cloneDeep(r.originalItemContents))!=null&&da.find(te=>(te==null?void 0:te.key)==="extraButton")?H=(Qe=A.cloneDeep(r.originalItemContents))==null?void 0:Qe.map(te=>((te==null?void 0:te.key)==="extraButton"&&(te.contents=G.value),te)):H.push({key:"extraButton",contents:G.value}),n("change",H)},ce=L=>{let H=A.cloneDeep(S.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=L==null?void 0:L[Z.name]),Z)),S.value=H},W=()=>{j.value=!1,E.value=[],D.value=""},Se=L=>{f.value=!0;let H=[];In==null||In.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:L[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),D.value=L==null?void 0:L.id,M.value=H,$.value=H},Le=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;_.value=(H=A.cloneDeep(_.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>((me==null?void 0:me.key)==="rowButton"&&(me.contents=_.value),me))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Fe=()=>{s.value=!0;let L=[];ir==null||ir.forEach(H=>{w.value++,L.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),m.value=L,c.value=L},aa=()=>{f.value=!0;let L=[];In==null||In.forEach(H=>{w.value++,L.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:w.value,contents:H==null?void 0:H.options})}),M.value=L,$.value=L},Na=L=>{let H=A.cloneDeep($.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=L==null?void 0:L[Z.name]),Z)),$.value=H},ae=()=>{var Z,me,fe,da,Qe;M.value=$.value;let L={};if(D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value),(Z=M.value)==null||Z.forEach(te=>{const pa=In==null?void 0:In.find(Ne=>(Ne==null?void 0:Ne.label)===(te==null?void 0:te.label));pa?L[pa.key]=te.value:te!=null&&te.children&&te.children.length>0&&(L.children=te.children)}),(me=_.value)!=null&&me.find(te=>te.id===L.id))_.value=(fe=_.value)==null?void 0:fe.map(te=>(te.id===L.id&&(te=L),te));else{let te=A.cloneDeep(_.value);te.push(L),_.value=te}f.value=!1,D.value="";let H=A.cloneDeep(r.originalItemContents);(da=A.cloneDeep(r.originalItemContents))!=null&&da.find(te=>(te==null?void 0:te.key)==="rowButton")?H=(Qe=A.cloneDeep(r.originalItemContents))==null?void 0:Qe.map(te=>((te==null?void 0:te.key)==="rowButton"&&(te.contents=_.value),te)):H.push({key:"rowButton",contents:_.value}),n("change",H)},ta=()=>{f.value=!1,D.value="",$.value=[],M.value=[]},oe=L=>{s.value=!0;let H=[];ir==null||ir.forEach(Z=>{w.value++,H.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:"",id:w.value,contents:Z==null?void 0:Z.options})}),m.value=H,F.value=L==null?void 0:L.id,c.value=H},ca=L=>{var H;p.value=Tc(A.cloneDeep(p.value),L==null?void 0:L.id),n("change",(H=A.cloneDeep(r.originalItemContents))==null?void 0:H.map(Z=>{var me;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(me=p.value)!=null&&me.some(fe=>fe==null?void 0:fe.children)?[p.value]:p.value),Z}))},Ee=L=>{var Z,me,fe;L.type==="fix"?L.id!==""?p.value=zc(p.value,L):p.value=Ac(p.value,L==null?void 0:L.contents):p.value=Mc(p.value,L),p.value=(Z=p.value)!=null&&Z.some(da=>da==null?void 0:da.children)?[p.value]:p.value,D.value="";let H=A.cloneDeep(r.originalItemContents);(me=A.cloneDeep(r.originalItemContents))!=null&&me.find(da=>(da==null?void 0:da.key)==="header")?H=(fe=A.cloneDeep(r.originalItemContents))==null?void 0:fe.map(da=>((da==null?void 0:da.key)==="header"&&(da.contents=p.value),da)):H.push({key:"header",contents:p.value}),n("change",H)},ie=L=>{var Z;s.value=!0;let H=[];ir==null||ir.forEach(me=>{w.value++,H.push({label:me==null?void 0:me.label,name:me==null?void 0:me.label,type:me.type,value:L[me.key],id:w.value,contents:me==null?void 0:me.options})}),L!=null&&L.children&&((Z=L==null?void 0:L.children)==null?void 0:Z.length)>0&&H.push({children:L==null?void 0:L.children,isFormColHidden:!0}),D.value=L==null?void 0:L.id,F.value="",m.value=H,c.value=H},Be=L=>{let H=A.cloneDeep(c.value);H=H==null?void 0:H.map(Z=>(Z.children||(Z.value=L==null?void 0:L[Z.name]),Z)),c.value=H},Ue=()=>{s.value=!1,D.value="",F.value="",c.value=[]},oa=()=>{var Z,me,fe,da,Qe,te;m.value=c.value;let L={};if(D.value!==""?L.id=D.value:(w.value++,L.id="id"+w.value),(Z=m.value)==null||Z.forEach(pa=>{const Ne=ir==null?void 0:ir.find(We=>(We==null?void 0:We.label)===(pa==null?void 0:pa.label));Ne?L[Ne.key]=pa.value:pa!=null&&pa.children&&pa.children.length>0&&(L.children=pa.children)}),(me=p.value)!=null&&me.find(pa=>pa.id===L.id))p.value=(fe=p.value)==null?void 0:fe.map(pa=>(pa.id===L.id&&(pa=L),pa));else{let pa=A.cloneDeep(p.value)??[];F.value===""?pa.push(L):pa=pa==null?void 0:pa.map(Ne=>(Ne.id===F.value&&(Ne.children||(Ne.children=[]),Ne.children.push(L)),Ne)),p.value=pa}p.value=(da=p.value)!=null&&da.some(pa=>pa==null?void 0:pa.children)?[p.value]:p.value,s.value=!1,D.value="",F.value="";let H=A.cloneDeep(r.originalItemContents);(Qe=A.cloneDeep(r.originalItemContents))!=null&&Qe.find(pa=>(pa==null?void 0:pa.key)==="header")?H=(te=A.cloneDeep(r.originalItemContents))==null?void 0:te.map(pa=>((pa==null?void 0:pa.key)==="header"&&(pa.contents=p.value),pa)):H.push({key:"header",contents:p.value}),n("change",H)},Ja=L=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,Z;p.value=(H=A.cloneDeep(p.value))==null?void 0:H.filter(me=>(me==null?void 0:me.id)!==(L==null?void 0:L.id)),n("change",(Z=A.cloneDeep(r.originalItemContents))==null?void 0:Z.map(me=>{var fe;return(me==null?void 0:me.key)==="header"&&(me.contents=(fe=p.value)!=null&&fe.some(da=>da==null?void 0:da.children)?[p.value]:p.value),me})),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(t.value=A.cloneDeep(r.originalItemContents),p.value=(H=(L=t.value)==null?void 0:L.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:H.contents,_.value=(me=(Z=t.value)==null?void 0:Z.find(_e=>(_e==null?void 0:_e.key)==="rowButton"))==null?void 0:me.contents,G.value=(da=(fe=t.value)==null?void 0:fe.find(_e=>(_e==null?void 0:_e.key)==="extraButton"))==null?void 0:da.contents,k.value=(te=(Qe=t.value)==null?void 0:Qe.find(_e=>(_e==null?void 0:_e.key)==="page"))!=null&&te.contents?!!((Ne=(pa=t.value)==null?void 0:pa.find(_e=>(_e==null?void 0:_e.key)==="page"))!=null&&Ne.contents):!1,R.value=(Aa=(We=t.value)==null?void 0:We.find(_e=>(_e==null?void 0:_e.key)==="tableToForm"))==null?void 0:Aa.contents,p.value=(Da=p.value)==null?void 0:Da.map((_e,la)=>(Array.isArray(_e)?_e=K3(_e):_e={label:(_e==null?void 0:_e.label)??"",prop:(_e==null?void 0:_e.label)==="操作"?"operate":_e==null?void 0:_e.prop,width:_e!=null&&_e.width?parseInt(_e.width):"",fixed:(_e==null?void 0:_e.fixed)??void 0,sortable:(_e==null?void 0:_e.sortable)??!1,align:(_e==null?void 0:_e.align)??"left",showOverflowTooltip:(_e==null?void 0:_e.showOverflowTooltip)??!0,isNotDrag:(_e==null?void 0:_e.isNotDrag)??!1,isEditCol:(_e==null?void 0:_e.isEditCol)??!1,isOperate:(_e==null?void 0:_e.isOperate)??!1,id:(_e==null?void 0:_e.id)??la,formMenuSelect:(_e==null?void 0:_e.formMenuSelect)??void 0,groupSelect:(_e==null?void 0:_e.groupSelect)??void 0},_e)),p.value=(Ze=p.value)!=null&&Ze.every(_e=>Array.isArray(_e))?(ra=p.value)==null?void 0:ra[0]:p.value,_.value=(pe=_.value)==null?void 0:pe.map((_e,la)=>_e={label:(_e==null?void 0:_e.label)??"",type:(_e==null?void 0:_e.type)??"",textColor:(_e==null?void 0:_e.textColor)??"#000000",id:(_e==null?void 0:_e.id)??la}),G.value=(U=G.value)==null?void 0:U.map((_e,la)=>_e={label:(_e==null?void 0:_e.label)??"",type:(_e==null?void 0:_e.type)??"",background:(_e==null?void 0:_e.background)??"var(--ssComponent-primary-color)",id:(_e==null?void 0:_e.id)??la}),R.value)R.value=(ze=R.value)==null?void 0:ze.map(_e=>{w.value++;let la=_e;return la.id=w.value,la});else{let _e=[];const la=(q=he.getColumnChild(A.cloneDeep(p.value)))==null?void 0:q.filter(fa=>(fa==null?void 0:fa.prop)!=="operate");la==null||la.forEach(fa=>{var ka;w.value++,_e.push({label:fa==null?void 0:fa.label,name:(fa==null?void 0:fa.prop)||(fa==null?void 0:fa.label),type:fa!=null&&fa.groupSelect?"Select":"Input",value:"",id:w.value,contents:fa==null?void 0:fa.options,menuSelect:fa==null?void 0:fa.formMenuSelect,groupSelect:(ka=fa==null?void 0:fa.groupSelect)==null?void 0:ka.split(":"),selectRelateType:"关联绑定列"})}),R.value=_e}},{deep:!0,immediate:!0}),(L,H)=>{const Z=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",hh,[e.createElementVNode("div",vh,[e.createElementVNode("div",mh,[H[2]||(H[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(me,{class:"icon-content",onClick:Fe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[1]||(H[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",yh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",gh,[e.createElementVNode("div",bh,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",kh,[e.createVNode(Z,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>oe(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ie(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Ja(fe)},null,8,["onClick"])])]),fe!=null&&fe.children&&fe.children.length>0?(e.openBlock(),e.createElementBlock("div",xh,[e.createVNode(Ic,{tableChildContents:fe==null?void 0:fe.children,onDeleteChange:ca,onFixChange:Ee},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",wh,[H[4]||(H[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:aa},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[3]||(H[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",_h,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",Sh,[e.createElementVNode("div",Eh,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",Ch,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Se(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Le(fe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Dh,[H[6]||(H[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:I},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[5]||(H[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Nh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",Bh,[e.createElementVNode("div",Th,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",Ah,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Pe(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ve(fe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",zh,[H[8]||(H[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:Y},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[H[7]||(H[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Mh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(fe,da)=>(e.openBlock(),e.createElementBlock("div",{key:da},[e.createElementVNode("div",Ih,[e.createElementVNode("div",Oh,e.toDisplayString(fe==null?void 0:fe.label),1),e.createElementVNode("div",Lh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>se(fe)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ee(fe)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",$h,[e.createElementVNode("div",Rh,[H[9]||(H[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(ll._sfc_main$1,{modelValue:k.value,"onUpdate:modelValue":H[0]||(H[0]=fe=>k.value=fe)},null,8,["modelValue"])])])]),e.createVNode(wr.ssDialog,{visible:s.value,onBeforeDestroy:Ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Be},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fh,[e.createVNode(me,{onClick:Ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[11]||(H[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(me,{class:"ok-button button",onClick:oa,id:"themeButton"},{default:e.withCtx(()=>H[12]||(H[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:f.value,onBeforeDestroy:ta,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ph,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:Na},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",jh,[e.createVNode(me,{onClick:ta,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[13]||(H[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(me,{class:"ok-button button",onClick:ae,id:"themeButton"},{default:e.withCtx(()=>H[14]||(H[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:j.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Uh,[e.createVNode(me,{onClick:W,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[15]||(H[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(me,{class:"ok-button button",onClick:B,id:"themeButton"},{default:e.withCtx(()=>H[16]||(H[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:v.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",qh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:ye,onChangeVisible:le,onBlurChange:Te},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(me,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>H[17]||(H[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(me,{class:"ok-button button",onClick:Ce,id:"themeButton"},{default:e.withCtx(()=>H[18]||(H[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Gh=Xl._export_sfc(Kh,[["__scopeId","data-v-7a6b87b5"]]),Yh=A.useModelComp(A.pinia),{pageMapState:Jh}=A.storeToRefs(Yh),Xh=A.useMenuState(A.pinia),{activeMenuPath:Zh}=A.storeToRefs(Xh),Qh=e.ref(24),e2=e.ref(6),a2=e.ref(10),l2=e.ref(70),r2=e.ref(.18),n2=e.ref(45),i2=(a,l,r,n)=>{var t,s,v,p,f,m,k,c,D,F,_,G,M,$,j,E;return{x:((s=(t=a==null?void 0:a.value)==null?void 0:t.tableData)==null?void 0:s.x)||l%2*12,y:((p=(v=a==null?void 0:a.value)==null?void 0:v.tableData)==null?void 0:p.y)||l,w:((m=(f=a==null?void 0:a.value)==null?void 0:f.tableData)==null?void 0:m.w)||Qh.value,h:((c=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:c.h)||r,minW:((F=(D=a==null?void 0:a.value)==null?void 0:D.tableData)==null?void 0:F.minW)||e2.value,minH:((G=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:G.minH)||r2.value,maxH:(($=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:$.maxH)||n2.value,i:((E=(j=a==null?void 0:a.value)==null?void 0:j.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},o2=(a,l)=>{var n,t,s,v,p,f,m,k;let r=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((n=a==null?void 0:a.comp)==null?void 0:n.toUpperCase())==="TABLE"){if(((v=(s=(t=a==null?void 0:a.compData)==null?void 0:t.find(D=>(D==null?void 0:D.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:v.length)===0)return 2}else((p=a==null?void 0:a.comp)==null?void 0:p.toUpperCase())==="FORM"&&(r=((k=(m=(f=a==null?void 0:a.compData)==null?void 0:f.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:m.contents)==null?void 0:k.length)/5);return r*2},Oc=(a,l,r)=>{var v,p;const n=(p=(v=Jh.value)==null?void 0:v[Zh.value])==null?void 0:p.filter(f=>{var m;return((m=f==null?void 0:f.key)==null?void 0:m.type)==="gridLayout"}),t=n==null?void 0:n.find(f=>{var m,k,c;return((c=(k=(m=f==null?void 0:f.value)==null?void 0:m.tableData)==null?void 0:k.component)==null?void 0:c.id)===a.id}),s=o2(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((f,m)=>Oc(f,m))),{...i2(t,l,s,a)}},t2=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=A.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,t)=>Oc(n,t)):[]},s2=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}]}]}}),c2=(a,l)=>a==null?void 0:a.map(r=>{for(const n in l)if(n===(r==null?void 0:r.prop))return{...r,value:l[n]};return r}),u2=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]);e.watch(()=>r.compType,p=>{var k;const f=s2(r==null?void 0:r.optionItems),m=p?(k=f[p==null?void 0:p.toUpperCase()])==null?void 0:k[r==null?void 0:r.target]:[];t.value=m==null?void 0:m.map(c=>{for(const[D,F]of Object.entries((r==null?void 0:r.comp)||{}))if((c==null?void 0:c.prop)===D)return{...c,value:F};return c})},{immediate:!0});const s=p=>ll.getComponent(p),v=p=>{var f,m;(p==null?void 0:p.prop)==="layout"&&(p==null?void 0:p.value)==="horizontal"?t.value=(f=t.value)==null?void 0:f.map(k=>{var c;return(k==null?void 0:k.prop)==="isStepLayout"?{...k,options:(c=k==null?void 0:k.options)==null?void 0:c.map(D=>({...D,disabled:!0}))}:(k==null?void 0:k.prop)==="isGridLayout"?{...k,disabled:!0}:k}):t.value=(m=t.value)==null?void 0:m.map(k=>{var c;return(k==null?void 0:k.prop)==="isStepLayout"?{...k,options:(c=k==null?void 0:k.options)==null?void 0:c.map(D=>({...D,disabled:!1}))}:(k==null?void 0:k.prop)==="isGridLayout"?{...k,disabled:!1}:k}),n("change",{target:r==null?void 0:r.target,styleConfigs:t.value,prop:p==null?void 0:p.prop})};return(p,f)=>{const m=e.resolveComponent("el-col"),k=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,c=>(e.openBlock(),e.createBlock(k,{class:"style-row",key:c==null?void 0:c.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c==null?void 0:c.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(c.type)),{modelValue:c.value,"onUpdate:modelValue":D=>c.value=D,content:c==null?void 0:c.options,optionUrl:c==null?void 0:c.optionUrl,disabled:c==null?void 0:c.disabled,activeText:c==null?void 0:c.activeText,inactiveText:c==null?void 0:c.inactiveText,onChange:D=>v(c)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),d2=Xl._export_sfc(u2,[["__scopeId","data-v-6c233914"]]),p2=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:l}){const r=a,n=l,t=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),v=$=>$==null?void 0:$.reduce((j,E)=>(j[E==null?void 0:E.prop]=E==null?void 0:E.rule,j),{}),p=e.computed(()=>({formRules:v(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),m=e.ref(""),k=($,j,E)=>{var b;let S=[];(r==null?void 0:r.activeTabName)==="任务配置"?(S=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:$},{label:"按钮名称",value:"按钮名称",children:j}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"任务名称",rule:t},{prop:"任务关键词",rule:t},{prop:"执行任务",rule:t},{prop:"执行动作",rule:t},{prop:"执行交互",rule:t}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(S=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(b=r==null?void 0:r.relatedData)==null?void 0:b.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:t},{prop:"关联状态",rule:t},{prop:"关联形式",rule:t},{prop:"关联任务集合",rule:t}]);let w;return E&&(E==null?void 0:E.length)>0?w=[...S,...c($,j,E)]:w=S,w},c=($,j,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(w=>E==null?void 0:E.includes(w==null?void 0:w.prop)):S},D=($,j)=>{var g,R,I,Y,le,ye,Te,V,se;const E=((le=(Y=(I=(R=(g=r==null?void 0:r.comp)==null?void 0:g.compData)==null?void 0:R.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:I.contents)==null?void 0:Y.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:le.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],S=/button/i,w=((se=(V=(Te=(ye=r==null?void 0:r.comp)==null?void 0:ye.compData)==null?void 0:Te.filter(ee=>S.test(ee==null?void 0:ee.key)))==null?void 0:V.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:se.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],b=k(E,w,$);f.value=j?c2(b,j):b,$&&($==null?void 0:$.length)>0&&s.value.push(...$==null?void 0:$.map(ee=>({prop:ee,rule:t})))};e.onMounted(()=>{D(null,r==null?void 0:r.extendItem)});const F=$=>{const j=$==null?void 0:$[m.value];if(m.value==="执行任务"){if(!(j!=null&&j.join("/")))return;const E=j==null?void 0:j.join("/");D(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,$)}},_=$=>{n("change",{target:r==null?void 0:r.target,extendConfigs:$})},G=($,j)=>{m.value=j==null?void 0:j.changeProp,F($)},M=$=>{n("onButtonClick",$)};return($,j)=>(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:p.value.formRules,buttonValue:p.value.buttonValue,onChange:_,onBlurChange:G,onOnButtonClick:M},null,8,["rowContents","formRules","buttonValue"]))}}),f2=Xl._export_sfc(p2,[["__scopeId","data-v-7c660c1f"]]),h2={};function v2(a,l){return null}const m2=Xl._export_sfc(h2,[["render",v2]]),y2={class:"form-operate-content"},g2={class:"form-operate-item"},b2={class:"operate-title"},k2={class:"operate-content"},x2={class:"fix-content"},w2={class:"fix-button"},_2={class:"operate-title"},S2={class:"operate-content"},E2={class:"fix-content"},C2={class:"fix-button"},D2={style:{display:"flex","justify-content":"space-between"}},N2={class:"form-content"},B2={class:"dialog-footer"},T2={class:"form-content"},A2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(!1),s=e.ref([]),v=e.ref([]),p=e.ref(!1),f=e.ref([]),m=e.ref([]),k=e.ref(""),c=e.ref(!1),D=e.ref(0),F=e.ref([]),_=e.ref([]),G=(V,se)=>{if((se==null?void 0:se.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const ee=se==null?void 0:se.optionUrl;return(ee==null?void 0:ee.selectRelateType)||se[V.key]}if((se==null?void 0:se.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const ee=se==null?void 0:se.optionUrl;return(ee==null?void 0:ee.menuSelect)||se[V.key]}if((se==null?void 0:se.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const ee=se==null?void 0:se.optionUrl;return(ee==null?void 0:ee.groupSelect)||se[V.key]}if((se==null?void 0:se.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(se==null?void 0:se.value)||se[V.key];if((se==null?void 0:se.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const ee=se[V.key];return Js(ee)?ee:V.default}return(V==null?void 0:V.label)==="类型"&&se[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!se[V.key]?!1:se[V.key]},M=async V=>{var ue,Ce,Pe,ve,B,ce;t.value=!0;let se=[];const ee=await((Pe=(Ce=(ue=he.FormContent)==null?void 0:ue.find(W=>(W==null?void 0:W.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:Ce.value)==null?void 0:Pe.value)??((B=(ve=he.FormContent)==null?void 0:ve.find(W=>(W==null?void 0:W.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:B.value);if(ee==null||ee.forEach(W=>{D.value++,se.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,prop:W==null?void 0:W.prop,value:G(W,V),id:D.value,contents:W==null?void 0:W.options,width:(V==null?void 0:V.width)??1})}),V!=null&&V.menuSelect&&((ce=V==null?void 0:V.menuSelect)==null?void 0:ce.length)>0){const W=await he.menuToContentType(V==null?void 0:V.menuSelect);se=se==null?void 0:se.map(Se=>((Se==null?void 0:Se.name)==="组信息选项"&&(Se.contents=W),Se))}k.value=V==null?void 0:V.id,s.value=await he.selectToBase(he.formToOptionsContents(se)),v.value=await he.selectToBase(he.formToOptionsContents(se))},$=V=>{var ee;p.value=!0;let se=[];(ee=he.FormButton)==null||ee.forEach(ue=>{D.value++,se.push({label:ue==null?void 0:ue.label,name:ue==null?void 0:ue.label,type:ue.type,value:(ue==null?void 0:ue.label)==="类型"&&V[ue.key]===""?"normal":V[ue.key],id:D.value,contents:ue==null?void 0:ue.options})}),F.value=se,_.value=se,k.value=V==null?void 0:V.id};e.watch(()=>c.value,()=>{var se,ee;let V=A.cloneDeep(r.originalItemContents);(se=A.cloneDeep(r.originalItemContents))!=null&&se.find(ue=>(ue==null?void 0:ue.key)==="enableWrap")?V=(ee=A.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ue=>((ue==null?void 0:ue.key)==="enableWrap"&&(ue.contents=!c.value),ue)):V.push({key:"enableWrap",contents:!c.value}),n("change",V)},{deep:!0});const j=()=>{var ee,ue,Ce,Pe,ve;F.value=_.value;let V={};if(k.value!==""?V.id=k.value:(D.value++,V.id="id"+D.value),(ee=F.value)==null||ee.forEach(B=>{var W;const ce=(W=he.FormButton)==null?void 0:W.find(Se=>(Se==null?void 0:Se.label)===(B==null?void 0:B.label));ce&&(V[ce.key]=B.value)}),(ue=f.value)!=null&&ue.find(B=>B.id===V.id))f.value=(Ce=f.value)==null?void 0:Ce.map(B=>(B.id===V.id&&(B=V),B));else{let B=A.cloneDeep(f.value);f.value||(f.value=[]),B.push(V),f.value=B}p.value=!1,k.value="";let se=A.cloneDeep(r.originalItemContents);(Pe=A.cloneDeep(r.originalItemContents))!=null&&Pe.find(B=>(B==null?void 0:B.key)==="formButton")?se=(ve=A.cloneDeep(r.originalItemContents))==null?void 0:ve.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=f.value),B)):se.push({key:"formButton",contents:f.value}),n("change",se)},E=V=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,ee;m.value=(se=A.cloneDeep(m.value))==null?void 0:se.filter(ue=>(ue==null?void 0:ue.id)!==(V==null?void 0:V.id)),n("change",(ee=A.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ue=>((ue==null?void 0:ue.key)==="formContent"&&(ue.contents=m.value),ue))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=V=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,ee;f.value=(se=A.cloneDeep(f.value))==null?void 0:se.filter(ue=>(ue==null?void 0:ue.id)!==(V==null?void 0:V.id)),n("change",(ee=A.cloneDeep(r.originalItemContents))==null?void 0:ee.map(ue=>((ue==null?void 0:ue.key)==="formButton"&&(ue.contents=f.value),ue))),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var se;p.value=!0;let V=[];(se=he.FormButton)==null||se.forEach(ee=>{D.value++,V.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)==="类型"?"normal":"",id:D.value,contents:ee==null?void 0:ee.options})}),F.value=V,_.value=V},b=()=>{var se,ee,ue;t.value=!0;let V=[];(ue=(ee=(se=he.FormContent)==null?void 0:se.find(Ce=>(Ce==null?void 0:Ce.key)==="Input"))==null?void 0:ee.value)==null||ue.forEach(Ce=>{D.value++,V.push({label:Ce==null?void 0:Ce.label,name:Ce==null?void 0:Ce.label,type:Ce.type,value:(Ce==null?void 0:Ce.label)==="类型"?"Input":"",id:D.value,contents:Ce==null?void 0:Ce.options})}),s.value=V,v.value=V},g=V=>{let se=A.cloneDeep(_.value);se=se==null?void 0:se.map(ee=>(ee.value=V==null?void 0:V[ee.name],ee)),_.value=se},R=V=>{const se=V.find(Ce=>(Ce==null?void 0:Ce.name)==="类型");if((se==null?void 0:se.value)!="Select")return;const ee=V.find(Ce=>(Ce==null?void 0:Ce.name)==="多选"),ue=V.find(Ce=>(Ce==null?void 0:Ce.name)==="初始值");ee!=null&&ee.value&&So.isString(ue.value)&&(ue.value=[ue.value]),!(ee!=null&&ee.value)&&!So.isString(ue.value)&&(ue.value="")},I=async V=>{var se,ee,ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe;if((V==null?void 0:V.类型)!==((ee=(se=v.value)==null?void 0:se.find(aa=>(aa==null?void 0:aa.label)==="类型"))==null?void 0:ee.value)){let aa=[];const Na=await((Pe=(Ce=(ue=he.FormContent)==null?void 0:ue.find(ae=>(ae==null?void 0:ae.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:Ce.value)==null?void 0:Pe.value)?await((Se=(W=(ce=he.FormContent)==null?void 0:ce.find(ae=>(ae==null?void 0:ae.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:W.value)==null?void 0:Se.value):(B=(ve=he.FormContent)==null?void 0:ve.find(ae=>(ae==null?void 0:ae.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:B.value;if(Na==null||Na.forEach(ae=>{var oe,ca;D.value++;const ta=Ou(ae==null?void 0:ae.default)?(V==null?void 0:V[ae.label])??ae.value??"":ae==null?void 0:ae.default;aa.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:ta,prop:ae==null?void 0:ae.prop,id:D.value,contents:ae==null?void 0:ae.options,width:((ca=(oe=v.value)==null?void 0:oe[0])==null?void 0:ca.width)??1})}),V!=null&&V.菜单选项&&((Le=V==null?void 0:V.菜单选项)==null?void 0:Le.length)>0){const ae=await he.menuToContentType(V==null?void 0:V.菜单选项);aa=aa==null?void 0:aa.map(ta=>((ta==null?void 0:ta.name)==="组信息选项"&&(ta.contents=ae),ta))}R(aa),v.value=await he.selectToBase(A.cloneDeep(aa)),s.value=await he.selectToBase(A.cloneDeep(aa))}else{let aa=A.cloneDeep(v.value);if(aa=aa==null?void 0:aa.map(Na=>(Na.value=V==null?void 0:V[Na.name],Na)),V!=null&&V.菜单选项&&((Fe=V==null?void 0:V.菜单选项)==null?void 0:Fe.length)>0){const Na=await he.menuToContentType(V==null?void 0:V.菜单选项);aa=aa==null?void 0:aa.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Na),ae))}aa=he.formToOptionsContents(aa),R(aa),v.value=await he.selectToBase(A.cloneDeep(aa))}},Y=V=>{V||(s.value=v.value)},le=async V=>{await I(V),s.value=v.value},ye=Bl.debounce(async()=>{var ue,Ce,Pe,ve,B,ce,W,Se,Le,Fe,aa,Na;s.value=v.value;let V={};V.width=((Ce=(ue=s.value)==null?void 0:ue[0])==null?void 0:Ce.width)??1,k.value!==""?V.id=k.value:(D.value++,V.id="id"+D.value);let se=await((B=(ve=(Pe=he.FormContent)==null?void 0:Pe.find(ae=>{var ta,oe;return(ae==null?void 0:ae.key)===(((oe=(ta=s.value)==null?void 0:ta.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:oe.value)??"label")}))==null?void 0:ve.value)==null?void 0:B.value)??((W=(ce=he.FormContent)==null?void 0:ce.find(ae=>{var ta,oe;return(ae==null?void 0:ae.key)===(((oe=(ta=s.value)==null?void 0:ta.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:oe.value)??"label")}))==null?void 0:W.value);if((Se=s.value)==null||Se.forEach(ae=>{const ta=se==null?void 0:se.find(oe=>(oe==null?void 0:oe.label)===(ae==null?void 0:ae.label));ta&&(V[ta.key]=ae.value)}),V.width=V.width?V.width:1,V.key=V==null?void 0:V.label,V.isFormColHidden=V==null?void 0:V.isFormColHidden,(Le=m.value)!=null&&Le.find(ae=>ae.id===V.id))m.value=(Fe=m.value)==null?void 0:Fe.map(ae=>(ae.id===V.id&&(ae=V),ae));else{let ae=A.cloneDeep(m.value);ae.push(V),m.value=ae}m.value=m.value.map(({id:ae,...ta})=>ta),t.value=!1,k.value="";let ee=A.cloneDeep(r.originalItemContents);(aa=A.cloneDeep(r.originalItemContents))!=null&&aa.find(ae=>(ae==null?void 0:ae.key)==="formContent")?ee=(Na=A.cloneDeep(r.originalItemContents))==null?void 0:Na.map(ae=>((ae==null?void 0:ae.key)==="formContent"&&(ae.contents=m.value),ae)):ee.push({key:"formContent",contents:m.value}),n("change",ee)},300),Te=()=>{t.value=!1,p.value=!1,k.value="",v.value=[],_.value=[]};return e.watch(()=>r.originalItemContents,()=>{var se,ee,ue,Ce,Pe,ve;if(!r.originalItemContents||r.originalItemContents.length===0)return;const V=A.cloneDeep(r.originalItemContents);m.value=((se=V==null?void 0:V.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:se.contents)??[],f.value=((ee=V==null?void 0:V.find(B=>(B==null?void 0:B.key)==="formButton"))==null?void 0:ee.contents)??[],c.value=(ue=V==null?void 0:V.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&ue.contents?!((Ce=V==null?void 0:V.find(B=>(B==null?void 0:B.key)==="enableWrap"))!=null&&Ce.contents):!0,m.value=(Pe=A.cloneDeep(m.value))==null?void 0:Pe.map((B,ce)=>{var Se;let W=B;return W.id=(B==null?void 0:B.id)??ce,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=((Se=B==null?void 0:B.options)==null?void 0:Se.length)===0?(B==null?void 0:B.contents)??"":B==null?void 0:B.options,W}),m.value=he.formToOptionsContents(m.value),f.value=(ve=f.value)==null?void 0:ve.map((B,ce)=>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:ce})},{deep:!0,immediate:!0}),(V,se)=>{const ee=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",y2,[e.createElementVNode("div",g2,[e.createElementVNode("div",b2,[se[2]||(se[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[1]||(se[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",k2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(Ce,Pe)=>(e.openBlock(),e.createElementBlock("div",{key:Pe},[e.createElementVNode("div",x2,[e.createElementVNode("div",null,e.toDisplayString(Ce.label),1),e.createElementVNode("div",w2,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>M(Ce)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>E(Ce)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",_2,[se[4]||(se[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[3]||(se[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",S2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ce,Pe)=>(e.openBlock(),e.createElementBlock("div",{key:Pe},[e.createElementVNode("div",E2,[e.createElementVNode("div",null,e.toDisplayString(Ce.label),1),e.createElementVNode("div",C2,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>$(Ce)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ve=>S(Ce)},null,8,["onClick"])])])]))),128))]),se[6]||(se[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",D2,[se[5]||(se[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(ll._sfc_main$1,{modelValue:c.value,"onUpdate:modelValue":se[0]||(se[0]=Ce=>c.value=Ce)},null,8,["modelValue"])])]),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",N2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:I,onChangeVisible:Y,onBlurChange:le},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B2,[e.createVNode(ue,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ue,{class:"ok-button button",onClick:e.unref(ye),id:"themeButton"},{default:e.withCtx(()=>se[8]||(se[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:p.value,onBeforeDestroy:Te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Te,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:j},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ks=Xl._export_sfc(A2,[["__scopeId","data-v-20850524"]]),z2={class:"step-module content"},M2={class:"module-data"},I2={class:"step-module layout"},O2={class:"form-content"},L2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),v=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),m=e.ref({}),k=e.ref([]),c=M=>{var $;m.value=M,n("change",($=_())==null?void 0:$.compData)},D=(M,$)=>{var j,E;switch(M){case"create":(j=s.value)==null||j.forEach(S=>{S.value=""}),f.value="create",p.visible=!0;break;case"update":(E=s.value)==null||E.forEach(S=>{S.value=$[S==null?void 0:S.prop]}),f.value="update",p.visible=!0;break;case"delete":k.value.splice($,1),f.value="delete";break}},F=M=>{var $,j,E;if((M==null?void 0:M.buttonName)==="确认"){const S=A.cloneDeep(M==null?void 0:M.content);switch(Object.keys(S).forEach(w=>{S[w]===""&&delete S[w]}),f.value){case"create":k.value.push({...S,index:(($=k.value)==null?void 0:$.length)+1});break;case"update":k.value=(j=k.value)==null?void 0:j.map(w=>w.index===(S==null?void 0:S.index)?{...w,title:S==null?void 0:S.title,description:S==null?void 0:S.description}:w);break}n("change",(E=_())==null?void 0:E.compData),p.visible=!1}else p.visible=!1},_=()=>({comp:"Step",compData:[{key:"stepList",contents:k.value},{key:"stepConfig",contents:m.value}]}),G=()=>{p.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,M=>{var $,j;M&&(m.value=(($=M==null?void 0:M.find(E=>E.key==="stepConfig"))==null?void 0:$.contents)??{},k.value=((j=M==null?void 0:M.find(E=>E.key==="stepList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,$)=>{const j=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",z2,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=S=>D("create"))},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",M2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(S,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.title),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>D("update",{...S,index:w+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>D("delete",w)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",I2,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ll.ssForm,{rowContents:t.value,onChange:c},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:G,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",O2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:v.value,onOnButtonClick:F},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),$2=Xl._export_sfc(L2,[["__scopeId","data-v-7dbd17f2"]]),R2={class:"step-module content"},V2={class:"module-data"},F2={class:"step-module layout"},P2={class:"form-content"},j2=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref("create"),s=e.ref({}),v=e.ref([]),p=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),k=e.reactive({visible:!1,width:"40%",title:"时间线"}),c=M=>{var $;s.value=M,n("change",($=_())==null?void 0:$.compData)},D=(M,$)=>{var j,E;switch(M){case"create":(j=f.value)==null||j.forEach(S=>{S.value=""}),t.value="create",k.visible=!0;break;case"update":(E=f.value)==null||E.forEach(S=>{S.value=$[S==null?void 0:S.prop]}),t.value="update",k.visible=!0;break;case"delete":v.value.splice($,1),t.value="delete";break}},F=M=>{var $,j,E,S;if((M==null?void 0:M.buttonName)==="确认"){const w=A.cloneDeep(M==null?void 0:M.content);switch(Object.keys(w).forEach(b=>{w[b]===""&&delete w[b]}),t.value){case"create":(j=v.value)==null||j.push({...w,index:(($=v.value)==null?void 0:$.length)+1});break;case"update":v.value=(E=v.value)==null?void 0:E.map(b=>b.index===(w==null?void 0:w.index)?{...b,content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp}:b);break}n("change",(S=_())==null?void 0:S.compData),k.visible=!1}else k.visible=!1},_=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:v.value},{key:"timeLineConfig",contents:s.value}]}),G=()=>{k.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,M=>{var $,j;M&&(s.value=(($=M==null?void 0:M.find(E=>E.key==="timeLineConfig"))==null?void 0:$.contents)??{},v.value=((j=M==null?void 0:M.find(E=>E.key==="timeLineList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,$)=>{const j=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",R2,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=S=>D("create"))},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",V2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(S,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.content),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>D("update",{...S,index:w+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>D("delete",w)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",F2,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ll.ssForm,{rowContents:p.value,onChange:c},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:k.visible,title:k.title,onBeforeDestroy:G,width:k.width},{default:e.withCtx(()=>[e.createElementVNode("div",P2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:F},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),H2=Xl._export_sfc(j2,[["__scopeId","data-v-39ffc861"]]),U2={};function q2(a,l){return e.openBlock(),e.createElementBlock("div")}const W2=Xl._export_sfc(U2,[["render",q2]]),K2={class:"extra-content"},G2={key:0},Y2={key:1},J2={class:"dialog-footer"},X2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:l}){const r=a,n=e.ref(0),t=e.ref(),s=e.ref(),v=l,p=e.ref(!1),f=e.ref({}),m=e.ref({}),k=e.ref();e.watch(()=>[r.itemData],()=>{var S;const E=A.cloneDeep(r.itemData);t.value=(S=A.cloneDeep(E))==null?void 0:S.map(w=>{var b;if(w.key==="extra"){let g=[];(b=w.value)==null||b.forEach(R=>{var I;g.push((I=Object.values(R))==null?void 0:I[0])}),w.value=g}return w})},{deep:!0,immediate:!0});const c=(E,S,w,b)=>{var R;let g={};((R=E==null?void 0:E[0])==null?void 0:R.contents)==="详情"&&(p.value=!0,g[S]=E,s.value=E==null?void 0:E.filter(I=>(I==null?void 0:I.key)!=="tableContentName"),f.value=g,m.value=w,k.value=b.id)},D=E=>{var I,Y,le,ye;const S=(Y=(I=Object.values(A.cloneDeep(f.value)))==null?void 0:I[0])==null?void 0:Y.filter(Te=>(Te==null?void 0:Te.key)==="tableContentName"),w=(ye=(le=Object.values(A.cloneDeep(f.value)))==null?void 0:le[0])==null?void 0:ye.filter(Te=>(Te==null?void 0:Te.key)!=="tableContentName"),b=w==null?void 0:w.map((Te,V)=>{var se;return V===E.index&&(Te==null?void 0:Te.comp)==="Table"&&(Te.compData=(se=Te.compData)==null?void 0:se.map(ee=>{var ue,Ce;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(Ce=(ue=E.content)==null?void 0:ue.map(Pe=>{let ve={};for(let B in Pe)B!=="id"&&(ve[B]=Pe[B]);return ve}))==null?void 0:Ce.map(Pe=>Object.values(Pe))),ee})),Te});b.unshift(S==null?void 0:S[0]);let g=A.cloneDeep(f.value),R={};for(let Te in g)R[Te]=b;f.value=R},F=()=>{p.value=!1,f.value={},m.value={},k.value=void 0,n.value++},_=E=>{var I,Y,le,ye;const S=(Y=(I=Object.values(A.cloneDeep(f.value)))==null?void 0:I[0])==null?void 0:Y.filter(Te=>(Te==null?void 0:Te.key)==="tableContentName"),w=(ye=(le=Object.values(A.cloneDeep(f.value)))==null?void 0:le[0])==null?void 0:ye.filter(Te=>(Te==null?void 0:Te.key)!=="tableContentName"),b=w==null?void 0:w.map((Te,V)=>(V===E.index&&(Te.compData=E.contents),Te));b.unshift(S==null?void 0:S[0]);let g=A.cloneDeep(f.value),R={};for(let Te in g)R[Te]=b;f.value=R},G=()=>{var S,w;let E={};for(let b in m.value)b===((S=Object.keys(f.value))==null?void 0:S[0])?E[b]=(w=Object.values(f.value))==null?void 0:w[0]:E[b]=m.value[b];v("change",{buttonName:"编辑",index:k.value,singleContent:E},"methodData"),p.value=!1,f.value={},m.value={},k.value=void 0},M=()=>{p.value=!1,f.value={},m.value={},k.value=void 0},$=E=>{v("change",E,"methodData")},j=E=>Ni(E);return(E,S)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",K2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(b,g)=>(e.openBlock(),e.createElementBlock("div",{key:n.value},[(b==null?void 0:b.key)==="extra"?(e.openBlock(),e.createElementBlock("div",G2)):(e.openBlock(),e.createElementBlock("div",Y2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(b.comp)),{itemData:b==null?void 0:b.compData,childItemData:b==null?void 0:b.itemChildData,key:g,index:(b==null?void 0:b.id)??g,onContentClick:c,onChange:$},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(wr.ssDialog,{visible:p.value,onBeforeDestroy:M},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(b,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(j(b.comp)),{itemData:b==null?void 0:b.compData,onChange:D,childItemData:b==null?void 0:b.itemChildData,key:g,onContentChange:_,index:(b==null?void 0:b.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",J2,[e.createVNode(w,{class:"cancel-button footer-button",onClick:F,id:"themeBorderButton"},{default:e.withCtx(()=>S[0]||(S[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(w,{class:"confirm-button footer-button",onClick:G,id:"themeButton"},{default:e.withCtx(()=>S[1]||(S[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Z2=Xl._export_sfc(X2,[["__scopeId","data-v-2d9c5ab2"]]),Q2={key:0,class:"method-content"},e4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),r=he.useOriginalState(A.pinia),{originalPath:n}=A.storeToRefs(r),t=a,s=e.ref(!1),v=e.ref(),p=he.useTableComp(A.pinia),{multipleTableConst:f}=A.storeToRefs(p),m=A.useModelComp(A.pinia),k=e.ref(!1),c=A.useMenuState(A.pinia),D=A.useLoginState(A.pinia),{itemData:F,isEdit:_,routeToChildPath:G,tableViewContents:M,lockingPage:$,payloadTypes:j}=A.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:w}=A.storeToRefs(c),{loginUserInfo:b}=A.storeToRefs(D),g=e.ref(!1),R=async()=>{var ve,B;(ve=l.value)!=null&&ve.find(ce=>(ce==null?void 0:ce.buttonName)==="保存")&&await ee((B=l.value)==null?void 0:B.find(ce=>(ce==null?void 0:ce.buttonName)==="保存")),await he.onSaveBack()};e.watch(()=>F.value,async()=>{_.value==="view"&&!g.value&&await Pe(A.cloneDeep(t.itemData)),g.value=!1},{deep:!0});const I=()=>{s.value=!1,v.value=void 0},Y=ve=>ve.map(B=>{const ce={};for(const W in B){const Se=B[W];if(W.includes(f.value)){const Le=W.split(f.value);let Fe=ce;Le.forEach((aa,Na)=>{Na===Le.length-1?Fe[aa]=Se:(Fe[aa]||(Fe[aa]={}),Fe=Fe[aa])})}else ce[W]=Se}return ce}),le=async(ve,B,ce=[])=>{var Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja;let W=(Se=A.cloneDeep(B))==null?void 0:Se.filter(L=>(L==null?void 0:L.comp)!=="methodButton");if(ve!=null&&ve.includes("[")){let L=(ae=(Na=(aa=(Fe=(Le=A.cloneDeep(ve))==null?void 0:Le.split("["))==null?void 0:Fe[1])==null?void 0:aa.split("]"))==null?void 0:Na[0])==null?void 0:ae.split(":"),H="";if(L!=null&&L[0]){let Z=(ta=W==null?void 0:W.find(me=>(me==null?void 0:me.name)===(L==null?void 0:L[0])))==null?void 0:ta.compData;if(!Z){let me=(oe=ve==null?void 0:ve.split("["))==null?void 0:oe[0],fe=await he.getItemData(me,sessionStorage.getItem("systemKey"),"",!1,"","",ce);Z=(ca=fe==null?void 0:fe.find(da=>(da==null?void 0:da.name)===(L==null?void 0:L[0])))==null?void 0:ca.compData}Z==null||Z.forEach(me=>{var fe,da,Qe,te,pa,Ne;if((me==null?void 0:me.key)==="formContent")(fe=me==null?void 0:me.contents)==null||fe.forEach(We=>{var Aa;(We==null?void 0:We.key)===(L==null?void 0:L[1])&&(Array.isArray(We==null?void 0:We.value)?H=We==null?void 0:We.value:H=(Aa=We==null?void 0:We.value)==null?void 0:Aa.toString())});else if((me==null?void 0:me.key)==="tableContents"){let We=[],Aa=(da=Z==null?void 0:Z.find(Ze=>(Ze==null?void 0:Ze.key)==="header"))==null?void 0:da.contents,Da=(L==null?void 0:L[1])??"";if(Aa!=null&&Aa.every(Ze=>Array.isArray(Ze))){let Ze=he.getColumnChild((pa=Aa==null?void 0:Aa[0])==null?void 0:pa.filter(ra=>(ra==null?void 0:ra.label)!=="操作"));(Ne=me.contents)==null||Ne.forEach(ra=>{let pe={};ra=ra==null?void 0:ra.filter(U=>!(U!=null&&U.id)),Ze==null||Ze.forEach((U,q)=>{let ze=ra[q];typeof ra[q]=="number"&&(ze=ra[q].toString()),(Da===""||Da===U.prop)&&(pe[U.prop]=ze)}),We.push(pe)}),We=Y(We)}else{let Ze=(Qe=Aa==null?void 0:Aa.map(ra=>ra==null?void 0:ra.label))==null?void 0:Qe.filter(ra=>ra!=="操作");(te=me.contents)==null||te.forEach(ra=>{let pe={};ra=ra==null?void 0:ra.filter(U=>!(U!=null&&U.id)),Ze==null||Ze.forEach((U,q)=>{let ze=ra[q];typeof ra[q]=="number"&&(ze=ra[q].toString()),(Da===""||Da===U)&&(pe[U]=ze)}),We.push(pe)})}H=We}})}return H}else if(ve!=null&&ve.includes("/")){let L={};return(Ee=A.cloneDeep(W))==null||Ee.forEach((H,Z)=>{var me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa;if((H==null?void 0:H.comp)==="Table"){let ka=Array.isArray((da=(fe=(me=H==null?void 0:H.compData)==null?void 0:me.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:fe.contents)==null?void 0:da[0])?(Ne=(pa=(te=(Qe=H==null?void 0:H.compData)==null?void 0:Qe.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:te.contents)==null?void 0:pa[0])==null?void 0:Ne.some(Oe=>Oe==null?void 0:Oe.children):[],ha=(Da=(Aa=(We=H==null?void 0:H.compData)==null?void 0:We.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:Aa.contents)==null?void 0:Da.map(Oe=>(Oe!=null&&Oe.find(Za=>Za==null?void 0:Za.id)&&(Oe=Oe.slice(1)),Oe)),Va=(q=(U=(pe=(ra=(Ze=H==null?void 0:H.compData)==null?void 0:Ze.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:ra.contents)==null?void 0:pe[0])==null?void 0:U[0])==null?void 0:q.label,Sa=(_e=(ze=H==null?void 0:H.compData)==null?void 0:ze.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:_e.contents;if(ka)(ka==null?void 0:ka.length)===0?L[H.name]=L!=null&&L[H.name]?L[H.name]:he.tableToForm(ha,Sa):L[Va]=he.tableToForm(ha,Sa);else{const Oe=[];Sa=Sa.slice(1,Sa.length-1),Sa==null||Sa.forEach((Za,Ha)=>{ha==null||ha.forEach(xl=>{Oe.push({key:Za.label+xl[0],value:xl[Ha+1]})})}),L["form"+Z]=Oe}}else{const ka=(fa=(la=H.compData)==null?void 0:la.find(Va=>(Va==null?void 0:Va.key)==="formContent"))==null?void 0:fa.contents;L!=null&&L.form||(L.form=[]);const ha=[];ka==null||ka.forEach(Va=>{Va.key!==""&&(Va={key:(Va==null?void 0:Va.key)??(Va==null?void 0:Va.label),value:Va==null?void 0:Va.value},ha.push(Va))}),L.form=[...ha,...A.cloneDeep(L==null?void 0:L.form)]}}),L}else{if(ve==="createInsofDataApi"){let L=(ie=A.cloneDeep(B))==null?void 0:ie[0];return L={comp:(Be=A.cloneDeep(L))==null?void 0:Be.comp,compData:(Ue=A.cloneDeep(L))==null?void 0:Ue.compData,name:(oa=A.cloneDeep(L))==null?void 0:oa.name,isShow:(Ja=A.cloneDeep(L))==null?void 0:Ja.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:L}}}return ve}},ye=async(ve,B,ce)=>{var Le,Fe,aa;let W=await he.getItemData(B,sessionStorage.getItem("systemKey"),""),Se=W==null?void 0:W.find(Na=>(Na==null?void 0:Na.name)===(ce==null?void 0:ce[0]));if(Se){if((Se==null?void 0:Se.comp)==="Table"){let Na={};for(let Be in A.cloneDeep(ve))A.cloneDeep(ve)[Be]!=="loginUser"?Na[Be]=A.cloneDeep(ve)[Be]:Na[Be]=((Le=b.value)==null?void 0:Le.account)||((Fe=b.value)==null?void 0:Fe.账号);let ae=[],ta=Na;Array.isArray(ve)||(ta=[Na]),ta==null||ta.forEach(Be=>{ae.push({[Be[ce[1]]]:Be})});let oe=[],ca=ae==null?void 0:ae.map(Be=>{var Ue;return(Ue=Object.keys(Be))==null?void 0:Ue[0]});W==null||W.forEach(Be=>{var Ue;(Be==null?void 0:Be.name)===(ce==null?void 0:ce[0])&&((Ue=Be==null?void 0:Be.compData)==null||Ue.forEach(oa=>{var Ja;(oa==null?void 0:oa.key)==="tableContents"&&((Ja=oa==null?void 0:oa.contents)==null||Ja.forEach(L=>{L!=null&&L.some(H=>ca.includes(H))&&oe.push({[L.find(H=>H.id).id]:L.find(H=>ca.includes(H))})}))}))});let Ee=oe==null?void 0:oe.map(Be=>{var Ue;return(Ue=Object.keys(Be))==null?void 0:Ue[0]}),ie=[];if(Ee==null||Ee.forEach(Be=>{var Ja;let Ue=(Ja=oe==null?void 0:oe.find(L=>{var H;return((H=Object.keys(L))==null?void 0:H[0].toString())===Be.toString()}))==null?void 0:Ja[Be],oa=ae==null?void 0:ae.find(L=>{var H;return((H=Object.keys(L))==null?void 0:H[0])===Ue});ie.push({id:parseInt(Be),value:{tableData:oa[Ue]}})}),(ie==null?void 0:ie.length)>0)return ie}else if((Se==null?void 0:Se.comp)==="Form"){let Na=A.cloneDeep(Se);Na.compData=(aa=Na.compData)==null?void 0:aa.map(oe=>{var ca;return(oe==null?void 0:oe.key)==="formContent"&&(oe.contents=(ca=oe.contents)==null?void 0:ca.map(Ee=>((Ee==null?void 0:Ee.key)===(ce==null?void 0:ce[1])&&(Ee.value=(ve==null?void 0:ve[Ee==null?void 0:Ee.prop])||ve),Ee))),oe});let ae={};for(let oe in Na)oe!=="id"&&(ae[oe]=Na[oe]);let ta=[];if(ta.push({id:Se==null?void 0:Se.id,keyType:ce==null?void 0:ce[1],value:{pageData:ae}}),(ta==null?void 0:ta.length)>0)return ta}}},Te=async(ve,B,ce)=>{var Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie;let W=await he.getItemData(B,sessionStorage.getItem("systemKey"),""),Se=W==null?void 0:W.find(Be=>(Be==null?void 0:Be.name)===(ce==null?void 0:ce[0]));if(Se){if((Se==null?void 0:Se.comp)==="Table"){let Be={};for(let Ue in A.cloneDeep(ve))A.cloneDeep(ve)[Ue]!=="loginUser"?Be[Ue]=A.cloneDeep(ve)[Ue]:Be[Ue]=((Le=b.value)==null?void 0:Le.account)||((Fe=b.value)==null?void 0:Fe.账号);await Ar.createInsofDataApi({key:{type:"data",pageKey:B,tableId:Se==null?void 0:Se.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Be}})}else if((Se==null?void 0:Se.comp)==="Form"){let Be=A.cloneDeep(Se),Ue=Object.keys(ve),oa="";(Na=(aa=A.cloneDeep(Be))==null?void 0:aa.compData)==null||Na.forEach(fe=>{var da,Qe;(fe==null?void 0:fe.key)==="formContent"&&((Qe=(da=A.cloneDeep(fe))==null?void 0:da.contents)==null||Qe.forEach(te=>{var pa;Ue.includes(te==null?void 0:te.key)&&(te==null?void 0:te.value)===((pa=b.value)==null?void 0:pa.姓名)&&(oa=te==null?void 0:te.key)}))});let Ja=[];(ae=Object.values(ve[oa]))==null||ae.forEach(fe=>{fe!=null&&fe.includes("(")&&Ja.push(fe)}),Ja=[...new Set(Ja)];const L=Ja==null?void 0:Ja.map(async fe=>{var Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la;let da="";(ra=(Ze=(Da=(Aa=(We=(Ne=A.cloneDeep(fe))==null?void 0:Ne.split("("))==null?void 0:We[1])==null?void 0:Aa.split(")"))==null?void 0:Da[0])==null?void 0:Ze.split(":"))==null||ra.forEach(fa=>{da=da===""?da+fa.replaceAll("'",""):da+"/"+fa.replaceAll("'","")});let Qe=[];(la=(_e=(ze=(q=(U=(pe=A.cloneDeep(fe))==null?void 0:pe.split("<"))==null?void 0:U[1])==null?void 0:q.split(">"))==null?void 0:ze[0])==null?void 0:_e.split(":"))==null||la.forEach(fa=>{Qe.push(fa.replaceAll("'",""))});const te=await he.getItemData(da,sessionStorage.getItem("systemKey"),"");let pa="";return te==null||te.forEach(fa=>{var ka;fa.name===(Qe==null?void 0:Qe[0])&&((ka=fa==null?void 0:fa.compData)==null||ka.forEach(ha=>{var Va;(ha==null?void 0:ha.key)==="formContent"&&((Va=ha.contents)==null||Va.forEach(Sa=>{(Sa==null?void 0:Sa.key)===(Qe==null?void 0:Qe[1])&&(pa=Sa==null?void 0:Sa.value)}))}))}),{[fe]:pa}}),H=await Promise.all(L);Be.compData=(oe=(ta=A.cloneDeep(Be))==null?void 0:ta.compData)==null?void 0:oe.map(fe=>{var da,Qe;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(Qe=(da=A.cloneDeep(fe))==null?void 0:da.contents)==null?void 0:Qe.map(te=>{var pa,Ne,We,Aa;return(pa=ve[oa])!=null&&pa[te==null?void 0:te.key]&&(ve[oa][te==null?void 0:te.key].includes("(")?te.value=(Ne=H==null?void 0:H.find(Da=>{var Ze;return((Ze=Object.keys(Da))==null?void 0:Ze[0])===ve[oa][te==null?void 0:te.key]}))==null?void 0:Ne[ve[oa][te==null?void 0:te.key]]:te.value=(Aa=(We=A.cloneDeep(ve))==null?void 0:We[oa])==null?void 0:Aa[te==null?void 0:te.key]),te})),fe});const Z=await Ar.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let me="";((ca=Z==null?void 0:Z.data)==null?void 0:ca.type)==="success"&&((ie=(Ee=Z==null?void 0:Z.data)==null?void 0:Ee.result)==null||ie.forEach(fe=>{var da,Qe;((Qe=(da=fe==null?void 0:fe.value)==null?void 0:da.pageData)==null?void 0:Qe.name)===(ce==null?void 0:ce[0])&&(me=fe.id)}),await Ar.updateInsofDataApi({id:me,value:{pageData:Be}}))}}},V=(ve,B="",ce={})=>{for(const[W,Se]of Object.entries(ve)){const Le=B?`${B}.${W}`:W;Se!==null&&typeof Se=="object"&&!Array.isArray(Se)&&Object.prototype.toString.call(Se)!=="[object Date]"?V(Se,Le,ce):ce[Le]=Se}return ce},se=async(ve,B,ce,W)=>{var Fe,aa,Na,ae,ta,oe,ca,Ee,ie,Be,Ue,oa,Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa;let Se=await he.getItemData(B,sessionStorage.getItem("systemKey"),""),Le=Se==null?void 0:Se.find(Da=>(Da==null?void 0:Da.name)===(ce==null?void 0:ce[0]));if(Le){if(!(ce!=null&&ce[1])&&(Le==null?void 0:Le.comp)==="Table"){let Da={},Ze=[],ra=(aa=(Fe=Le==null?void 0:Le.compData)==null?void 0:Fe.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:aa.contents;ra!=null&&ra.every(q=>Array.isArray(q))?Ze=(ae=he.getColumnChild((Na=ra==null?void 0:ra[0])==null?void 0:Na.filter(q=>(q==null?void 0:q.label)!=="操作")))==null?void 0:ae.map(q=>q==null?void 0:q.prop):Ze=ra==null?void 0:ra.map(q=>q==null?void 0:q.label);for(let q in A.cloneDeep(ve))if(A.cloneDeep(ve)[q]!=="loginUser"){let ze=V(A.cloneDeep(ve)[q]),_e={};for(let la in ze)if(Ze!=null&&Ze.find(fa=>fa===la))_e[la]=ze[la];else if(Ze!=null&&Ze.find(fa=>(fa==null?void 0:fa.toUpperCase())===(la==null?void 0:la.toUpperCase()))){let fa=Ze==null?void 0:Ze.find(ka=>(ka==null?void 0:ka.toUpperCase())===(la==null?void 0:la.toUpperCase()));_e[fa]=ze[la]}Da[q]=_e}else Da[q]=((ta=b.value)==null?void 0:ta.account)||((oe=b.value)==null?void 0:oe.账号);let pe=await Ar.getInsofDataApi({keyLikes:{tableId:Le==null?void 0:Le.id}});if(((Ee=(ca=pe==null?void 0:pe.data)==null?void 0:ca.result)==null?void 0:Ee.length)>0){let q=(Be=(ie=pe==null?void 0:pe.data)==null?void 0:ie.result)==null?void 0:Be.map(ze=>ze==null?void 0:ze.id);(q==null?void 0:q.length)>0&&await Ar.batchDeleteInsofDataApi({ids:q})}let U=[];if((Ue=Le==null?void 0:Le.compData)!=null&&Ue.find(q=>(q==null?void 0:q.key)==="pageColumn")&&((L=(Ja=(oa=Le==null?void 0:Le.compData)==null?void 0:oa.find(q=>(q==null?void 0:q.key)==="pageColumn"))==null?void 0:Ja.contents)!=null&&L.includes("["))){const q=await Ar.getInsofDataApi({id:Le==null?void 0:Le.tableId});let ze=((fe=(me=(Z=(H=q==null?void 0:q.data)==null?void 0:H.result)==null?void 0:Z[0])==null?void 0:me.key)==null?void 0:fe.pageKey)??"";(da=Object.values(Da))==null||da.forEach(_e=>{U.push({key:{type:"data",pageKey:ze,tableId:Le==null?void 0:Le.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})})}else(Qe=Object.values(Da))==null||Qe.forEach(q=>{U.push({key:{type:"data",pageKey:B,tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:q}})});(U==null?void 0:U.length)>0&&await Ar.batchAddInsofDataApi({dataList:U})}else if(!(ce!=null&&ce[1])&&(Le==null?void 0:Le.comp)==="Form"){let Da=A.cloneDeep(Le);Da.compData=(pa=(te=A.cloneDeep(Da))==null?void 0:te.compData)==null?void 0:pa.map(pe=>{var U,q;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(q=(U=A.cloneDeep(pe))==null?void 0:U.contents)==null?void 0:q.map(ze=>{var _e,la;return(_e=A.cloneDeep(ve))!=null&&_e[ze==null?void 0:ze.key]&&(ze.value=(la=A.cloneDeep(ve))==null?void 0:la[ze==null?void 0:ze.key]),ze})),pe});const Ze=await Ar.getInsofDataApi({key:{type:"structure",pageKey:B,systemKey:sessionStorage.getItem("systemKey")}});let ra="";((Ne=Ze==null?void 0:Ze.data)==null?void 0:Ne.type)==="success"&&((Aa=(We=Ze==null?void 0:Ze.data)==null?void 0:We.result)==null||Aa.forEach(pe=>{var U,q;((q=(U=pe==null?void 0:pe.value)==null?void 0:U.pageData)==null?void 0:q.name)===(ce==null?void 0:ce[0])&&(ra=pe.id)}),await Ar.updateInsofDataApi({id:ra,value:{pageData:Da}}))}}},ee=async ve=>{var B,ce,W,Se,Le,Fe,aa,Na,ae,ta,oe,ca,Ee,ie;c.setImportLoading(!0);try{if(ve.api){let Be=new WeakMap,Ue=await he.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be),oa="";if(Ue=Ue==null?void 0:Ue.map(Qe=>{var te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze;if((Qe==null?void 0:Qe.comp)==="Form")Qe.compData=(te=Qe.compData)==null?void 0:te.map(_e=>{var la;return(_e==null?void 0:_e.key)==="formContent"&&(_e.contents=(la=_e.contents)==null?void 0:la.map(fa=>{var ka;if((fa==null?void 0:fa.value)===""&&(fa==null?void 0:fa.type)==="Select"){let ha=he.judgeContents((ka=A.cloneDeep(fa))==null?void 0:ka.optionUrl,Be);fa.value=fa.value||ha}return fa})),_e});else if((Qe==null?void 0:Qe.comp)==="Table"&&(pa=Qe.compData)!=null&&pa.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")){let _e=(We=(Ne=Qe.compData)==null?void 0:Ne.find(ha=>(ha==null?void 0:ha.key)==="pageColumn"))==null?void 0:We.contents,la=((Da=(Aa=Qe.compData)==null?void 0:Aa.find(ha=>(ha==null?void 0:ha.key)==="pageGroup"))==null?void 0:Da.contents)??"",fa=(pe=(ra=(Ze=_e==null?void 0:_e.split("["))==null?void 0:Ze[1])==null?void 0:ra.split("]"))==null?void 0:pe[0];oa=((U=_e==null?void 0:_e.split("["))==null?void 0:U[0])+((ze=(q=M.value)==null?void 0:q.find(ha=>(ha==null?void 0:ha.key)===fa))==null?void 0:ze.value)}return Qe}),!(oa===""||oa==="")){const Qe=await he.getItemData(oa,sessionStorage.getItem("systemKey"),"",!1,"","",Be);Ue=Ue==null?void 0:Ue.map(te=>{var pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la;if((te==null?void 0:te.comp)==="Table"&&(pa=te.compData)!=null&&pa.find(fa=>(fa==null?void 0:fa.key)==="pageColumn")){let fa=(We=(Ne=te.compData)==null?void 0:Ne.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:We.contents,ka=((Da=(Aa=te.compData)==null?void 0:Aa.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:Da.contents)??"",ha=(pe=(ra=(Ze=fa==null?void 0:fa.split("["))==null?void 0:Ze[1])==null?void 0:ra.split("]"))==null?void 0:pe[0],Va=((U=fa==null?void 0:fa.split("["))==null?void 0:U[0])+((ze=(q=M.value)==null?void 0:q.find(Oe=>(Oe==null?void 0:Oe.key)===ha))==null?void 0:ze.value),Sa=(_e=Qe==null?void 0:Qe.find(Oe=>(Oe==null?void 0:Oe.name)===(ka===""?t==null?void 0:t.compName:ka)))==null?void 0:_e.compData;te.compData=(la=te.compData)==null?void 0:la.map(Oe=>{var Za;return(Oe==null?void 0:Oe.key)==="tableContents"&&(Oe.contents=(Za=Sa==null?void 0:Sa.find(Ha=>(Ha==null?void 0:Ha.key)==="tableContents"))==null?void 0:Za.contents),Oe})}return te})}let Ja={};if(((ce=(B=ve==null?void 0:ve.extraValues)==null?void 0:B.input)==null?void 0:ce.length)>0){const Qe=(Se=(W=ve==null?void 0:ve.extraValues)==null?void 0:W.input)==null?void 0:Se.map(async te=>{var pa;ue!=null&&ue.find(Ne=>Ne===te)?Ja=await le(te,Ue):Ja[Object.keys(te)[0]]=await le((pa=Object.values(te))==null?void 0:pa[0],Ue,Be)});await Promise.all(Qe)}else Ja=await le("/",Ue);let L=!1;(Fe=(Le=ve==null?void 0:ve.extraValues)==null?void 0:Le.output)==null||Fe.forEach(Qe=>{var te,pa;(pa=(te=Object.values(Qe))==null?void 0:te[0])!=null&&pa.includes(".doc")&&(L=!0)});let H;if(L){const Qe=A.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await qa.axios.post(ve.api,Ja,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Qe.close()})}else H=await qa.axios.post(ve.api,Ja,{headers:{"Content-Type":"application/json"}});let Z=(ta=(ae=(Na=(aa=A.cloneDeep(ve))==null?void 0:aa.extraValues)==null?void 0:Na.output)==null?void 0:ae.map(Qe=>{var te,pa,Ne,We,Aa,Da,Ze,ra,pe,U,q,ze,_e,la,fa,ka;if(!((pa=(te=Object.values(Qe))==null?void 0:te[0])!=null&&pa.includes(".doc"))){let ha=(U=(pe=(ra=(We=A.cloneDeep((Ne=Object.values(Qe))==null?void 0:Ne[0]))==null?void 0:We.split("["))==null?void 0:ra[((Ze=(Da=A.cloneDeep((Aa=Object.values(Qe))==null?void 0:Aa[0]))==null?void 0:Da.split("["))==null?void 0:Ze.length)-1])==null?void 0:pe.split("]"))==null?void 0:U[0],Va=ha==null?void 0:ha.split(":"),Sa=(_e=A.cloneDeep((q=Object.values(Qe))==null?void 0:q[0]))==null?void 0:_e.substring(0,A.cloneDeep((ze=Object.values(Qe))==null?void 0:ze[0]).lastIndexOf("["));if(Sa=(fa=A.cloneDeep(Sa))==null?void 0:fa.slice(0,((la=A.cloneDeep(Sa))==null?void 0:la.length)-1),Sa!=null&&Sa.includes("[")){let Oe="";if((ka=he.contentTransArrayToAll(Sa,"/"))==null||ka.forEach(Za=>{var Ha,xl,Yl,kl,Fl,ja,zl;if(!(Za!=null&&Za.includes("[")))Oe=Oe===""?Oe+Za.replaceAll("/",""):Oe+"/"+Za.replaceAll("/","");else{let $l=A.cloneDeep(Za).slice(1,((Ha=A.cloneDeep(Za))==null?void 0:Ha.length)-1),Ma=(ja=(Fl=(kl=(Yl=(xl=A.cloneDeep($l))==null?void 0:xl.split("["))==null?void 0:Yl[1])==null?void 0:kl.split("]"))==null?void 0:Fl[0])==null?void 0:ja.split(":"),rl="",sl=(zl=Ue==null?void 0:Ue.find(ga=>(ga==null?void 0:ga.name)===(Ma==null?void 0:Ma[0])))==null?void 0:zl.compData;sl==null||sl.forEach(ga=>{var xa;(ga==null?void 0:ga.key)==="formContent"&&((xa=ga==null?void 0:ga.contents)==null||xa.forEach(La=>{(La==null?void 0:La.key)===(Ma==null?void 0:Ma[1])&&(rl=La==null?void 0:La.value)}))}),Oe=Oe===""?Oe+rl.replaceAll("/",""):Oe+"/"+rl.replaceAll("/","")}}),Sa=Oe,Sa[(Sa==null?void 0:Sa.length)-1]!=="/")return Sa}}}))==null?void 0:ta.filter(Qe=>Qe);Z=[...new Set(A.cloneDeep(Z))];let me=Z==null?void 0:Z.map(async Qe=>{let te=await he.getItemData(Qe,sessionStorage.getItem("systemKey"),"",!1,"","",Be);if((te==null?void 0:te.length)===0)return await he.getParentContents(Qe)});await Promise.all(me);let fe=[],da=(Ee=(ca=(oe=A.cloneDeep(ve))==null?void 0:oe.extraValues)==null?void 0:ca.output)==null?void 0:Ee.map(async Qe=>{var ra,pe,U,q,ze,_e,la,fa,ka,ha,Va,Sa,Oe,Za,Ha,xl,Yl,kl,Fl,ja,zl,$l,Ma,rl,sl,ga,xa,La,Ra,xe,ia,Ie,de,ma,ya,Je,Xe,Ke,pl,Ve,Fa,Ea,il,Ia,Me,Sl,Il,Ul,ql,Ql,dr,Ol,pr,Fr,Pl,ar,Pr,Tr,jr,Ir,Er,Cr,mn,Nr,cr,yn,ln,rn,Sn,Nn;if((pe=(ra=Object.values(Qe))==null?void 0:ra[0])!=null&&pe.includes(".doc")){var te=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),pa=H.headers["content-disposition"],Ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),We=Ne.exec(pa),Aa=We==null?void 0:We[1],Da=document.createElement("a"),Ze=window.URL.createObjectURL(te);v.value=[{name:Aa,blobUrl:Ze}],s.value=!0}else{let pn=(ha=(ka=(fa=(q=A.cloneDeep((U=Object.values(Qe))==null?void 0:U[0]))==null?void 0:q.split("["))==null?void 0:fa[((la=(_e=A.cloneDeep((ze=Object.values(Qe))==null?void 0:ze[0]))==null?void 0:_e.split("["))==null?void 0:la.length)-1])==null?void 0:ka.split("]"))==null?void 0:ha[0],lr=pn==null?void 0:pn.split(":"),Ml=(Oe=A.cloneDeep((Va=Object.values(Qe))==null?void 0:Va[0]))==null?void 0:Oe.substring(0,A.cloneDeep((Sa=Object.values(Qe))==null?void 0:Sa[0]).lastIndexOf("["));if(Ml!=null&&Ml.includes("[")?Ml=(Ha=A.cloneDeep(Ml))==null?void 0:Ha.slice(0,((Za=A.cloneDeep(Ml))==null?void 0:Za.length)-1):Ml===""&&(Ml=E.value),Ml=Ml.replaceAll("<","[").replaceAll(">","]"),Ml!=null&&Ml.includes("[")){let cl="";(xl=he.contentTransArrayToAll(Ml,"/"))==null||xl.forEach((sr,Rl)=>{var _r,Kl,fr,Lr,gn,Bn,bn,qn,Ln,kn,Tn;if(!(sr!=null&&sr.includes("[")))cl=cl===""?cl+sr.replaceAll("/",""):cl+"/"+sr.replaceAll("/","");else{let $n="",Qr="";(_r=A.cloneDeep(sr))!=null&&_r.includes("]")?($n=A.cloneDeep(sr).slice(1,((Kl=A.cloneDeep(sr))==null?void 0:Kl.length)-1),Qr=(bn=(Bn=(gn=(Lr=(fr=A.cloneDeep($n))==null?void 0:fr.split("["))==null?void 0:Lr[1])==null?void 0:gn.split("]"))==null?void 0:Bn[0])==null?void 0:bn.split(":")):($n=A.cloneDeep(sr).slice(1,(qn=A.cloneDeep(sr))==null?void 0:qn.length),Qr=(Ln=A.cloneDeep($n))==null?void 0:Ln.split("/"));let An="",Wn=(kn=Ue==null?void 0:Ue.find($r=>($r==null?void 0:$r.name)===(Qr==null?void 0:Qr[0])))==null?void 0:kn.compData;Wn==null||Wn.forEach($r=>{var Kn;($r==null?void 0:$r.key)==="formContent"&&((Kn=$r==null?void 0:$r.contents)==null||Kn.forEach(fn=>{(fn==null?void 0:fn.key)===(Qr==null?void 0:Qr[1])&&(An=fn==null?void 0:fn.value)}))}),((Tn=he.contentTransArrayToAll(Ml,"/"))==null?void 0:Tn.length)-1!==Rl?cl=cl===""?cl+An.replaceAll("/",""):cl+"/"+An.replaceAll("/",""):cl=cl+n.value+An.replaceAll("/","")}}),(Yl=E.value)!=null&&Yl.includes(cl)?Ml=E.value:Ml=cl}let zr=A.cloneDeep((kl=Object.keys(Qe))==null?void 0:kl[0]);if(((Fl=H==null?void 0:H.data)==null?void 0:Fl.statusCode)===200||((ja=H==null?void 0:H.data)==null?void 0:ja.code)===200){if((($l=(zl=H==null?void 0:H.data)==null?void 0:zl.data)!=null&&$l[zr]||(rl=(Ma=H==null?void 0:H.data)==null?void 0:Ma.result)!=null&&rl[zr])&&(lr==null?void 0:lr.length)===1)return await se(((ga=(sl=H==null?void 0:H.data)==null?void 0:sl.data)==null?void 0:ga[zr])||((La=(xa=H==null?void 0:H.data)==null?void 0:xa.result)==null?void 0:La[zr]),A.cloneDeep(Ml),lr,oa);if((xe=(Ra=H==null?void 0:H.data)==null?void 0:Ra.data)!=null&&xe[zr]||(Ie=(ia=H==null?void 0:H.data)==null?void 0:ia.result)!=null&&Ie[zr]){let cl=await ye(((ma=(de=H==null?void 0:H.data)==null?void 0:de.data)==null?void 0:ma[zr])||((Je=(ya=H==null?void 0:H.data)==null?void 0:ya.result)==null?void 0:Je[zr]),A.cloneDeep(Ml),lr);return cl&&(fe=[...fe,...cl]),cl}else{if(!((Xe=H==null?void 0:H.data)!=null&&Xe.data)){let cl=await he.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be);cl=cl==null?void 0:cl.map(Rl=>{var _r;return(Rl==null?void 0:Rl.name)===(lr==null?void 0:lr[0])&&(Rl.compData=(_r=Rl.compData)==null?void 0:_r.map(Kl=>{var fr;return(Kl==null?void 0:Kl.key)==="formContent"&&(Kl.contents=(fr=Kl.contents)==null?void 0:fr.map(Lr=>{var gn,Bn;return(Lr==null?void 0:Lr.key)===(lr==null?void 0:lr[1])&&(Lr.value=(Bn=(gn=H==null?void 0:H.data)==null?void 0:gn.result)==null?void 0:Bn[zr==null?void 0:zr.replaceAll(":","")]),Lr})),Kl})),Rl});let sr=[];(Ke=cl==null?void 0:cl.filter(Rl=>(Rl==null?void 0:Rl.comp)==="Form"))==null||Ke.forEach(async Rl=>{let _r={};for(let Kl in Rl)Kl!=="id"&&(_r[Kl]=Rl[Kl]);sr.push({id:Rl==null?void 0:Rl.id,value:{pageData:_r}})}),(sr==null?void 0:sr.length)>0&&await Ar.batchUpdateInsofDataApi({dataList:sr});return}if((lr==null?void 0:lr.length)===1){const cl=(Fa=(Ve=(pl=H==null?void 0:H.data)==null?void 0:pl.data)==null?void 0:Ve.path)==null?void 0:Fa.path;let sr="";(Sl=(Me=(Ia=(il=(Ea=cl==null?void 0:cl.split("("))==null?void 0:Ea[1])==null?void 0:il.split(")"))==null?void 0:Ia[0])==null?void 0:Me.split(":"))==null||Sl.forEach(Kl=>{var fr,Lr;sr=sr===""?sr+((fr=Kl==null?void 0:Kl.replaceAll("'",""))==null?void 0:fr.trim()):sr+"/"+((Lr=Kl==null?void 0:Kl.replaceAll("'",""))==null?void 0:Lr.trim())});let Rl=[(dr=(Ql=(ql=(Ul=(Il=cl==null?void 0:cl.split("<"))==null?void 0:Il[1])==null?void 0:Ul.split(">"))==null?void 0:ql[0])==null?void 0:Ql.replaceAll("'",""))==null?void 0:dr.trim()],_r;return(Fr=(pr=(Ol=H==null?void 0:H.data)==null?void 0:Ol.data)==null?void 0:pr.data)!=null&&Fr[lr==null?void 0:lr[0]]?_r=await se((Pr=(ar=(Pl=H==null?void 0:H.data)==null?void 0:Pl.data)==null?void 0:ar.data)==null?void 0:Pr[lr==null?void 0:lr[0]],sr,lr,oa):_r=await Te((jr=(Tr=H==null?void 0:H.data)==null?void 0:Tr.data)==null?void 0:jr.data,sr,Rl,Be),_r}else{const cl=(Cr=(Er=(Ir=H==null?void 0:H.data)==null?void 0:Ir.data)==null?void 0:Er.path)==null?void 0:Cr.path;let sr="";return(ln=(yn=(cr=(Nr=(mn=cl==null?void 0:cl.split("("))==null?void 0:mn[1])==null?void 0:Nr.split(")"))==null?void 0:cr[0])==null?void 0:yn.split(":"))==null||ln.forEach(_r=>{var Kl,fr;sr=sr===""?sr+((Kl=_r==null?void 0:_r.replaceAll("'",""))==null?void 0:Kl.trim()):sr+"/"+((fr=_r==null?void 0:_r.replaceAll("'",""))==null?void 0:fr.trim())}),await ye((Nn=(Sn=(rn=H==null?void 0:H.data)==null?void 0:rn.data)==null?void 0:Sn.data)==null?void 0:Nn[lr==null?void 0:lr[0]],sr,lr)}}}}});if(await Promise.all(da),(fe==null?void 0:fe.length)>0){let Qe=[];fe==null||fe.forEach(Ne=>{Qe!=null&&Qe.find(We=>{var Aa,Da,Ze,ra;return((Da=(Aa=We==null?void 0:We.value)==null?void 0:Aa.pageData)==null?void 0:Da.name)===((ra=(Ze=Ne==null?void 0:Ne.value)==null?void 0:Ze.pageData)==null?void 0:ra.name)})||Qe.push(Ne)});let te=[];Qe==null||Qe.forEach(Ne=>{var Da,Ze,ra,pe;let We=A.cloneDeep(Ne);We.value.pageData.compData=(Da=We.value.pageData.compData)==null?void 0:Da.map(U=>{var q;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(q=U.contents)==null?void 0:q.map(ze=>{var la,fa,ka,ha;let _e=(la=A.cloneDeep(fe))==null?void 0:la.find(Va=>(Va==null?void 0:Va.keyType)===(ze==null?void 0:ze.key));if(_e){let Va=(ha=(ka=(fa=_e.value.pageData.compData)==null?void 0:fa.find(Sa=>(Sa==null?void 0:Sa.key)==="formContent"))==null?void 0:ka.contents)==null?void 0:ha.find(Sa=>(Sa==null?void 0:Sa.key)===(ze==null?void 0:ze.key));ze.value=Va==null?void 0:Va.value}return ze})),U}),te.push({id:We==null?void 0:We.id,value:We==null?void 0:We.value});let Aa=[];(pe=(ra=(Ze=We==null?void 0:We.value)==null?void 0:Ze.pageData)==null?void 0:ra.compData)==null||pe.forEach(U=>{var q;(U==null?void 0:U.key)==="formContent"&&((q=U==null?void 0:U.contents)==null||q.forEach(ze=>{var _e,la,fa,ka,ha,Va;if((la=(_e=ze==null?void 0:ze.optionUrl)==null?void 0:_e.menuSelect)!=null&&la.find(Sa=>Sa==null?void 0:Sa.includes("[")))if(Aa!=null&&Aa.find(Sa=>{var Oe,Za,Ha;return((Oe=Sa==null?void 0:Sa.key)==null?void 0:Oe.join(","))===((Ha=(Za=ze==null?void 0:ze.optionUrl)==null?void 0:Za.menuSelect)==null?void 0:Ha.join(","))})){let Sa=(fa=Aa==null?void 0:Aa.find(Oe=>{var Za,Ha,xl;return((Za=Oe==null?void 0:Oe.key)==null?void 0:Za.join(","))===((xl=(Ha=ze==null?void 0:ze.optionUrl)==null?void 0:Ha.menuSelect)==null?void 0:xl.join(","))}))==null?void 0:fa.value;Sa.push({key:ze==null?void 0:ze.prop,groups:(ka=ze==null?void 0:ze.optionUrl)==null?void 0:ka.groupSelect,value:ze==null?void 0:ze.value}),Aa=Aa==null?void 0:Aa.map(Oe=>{var Za,Ha,xl;return((Za=Oe==null?void 0:Oe.key)==null?void 0:Za.join(","))===((xl=(Ha=ze==null?void 0:ze.optionUrl)==null?void 0:Ha.menuSelect)==null?void 0:xl.join(","))&&(Oe.value=Sa),Oe})}else Aa.push({key:(ha=ze==null?void 0:ze.optionUrl)==null?void 0:ha.menuSelect,value:[{key:ze==null?void 0:ze.prop,groups:(Va=ze==null?void 0:ze.optionUrl)==null?void 0:Va.groupSelect,value:ze==null?void 0:ze.value}]})}))}),(Aa==null?void 0:Aa.length)>0&&(Aa=Aa==null?void 0:Aa.map(U=>{var ze;let q="";return(ze=U==null?void 0:U.key)==null||ze.forEach(_e=>{var la;if(!(_e!=null&&_e.includes("[")))q=q===""?q+_e:q+"/"+_e;else{let fa="",ka=(la=_e==null?void 0:_e.replaceAll("[","").replaceAll("]",""))==null?void 0:la.split(":");Ue==null||Ue.forEach(ha=>{var Va;(ha==null?void 0:ha.name)===(ka==null?void 0:ka[0])&&((Va=ha==null?void 0:ha.compData)==null||Va.forEach(Sa=>{var Oe;(Sa==null?void 0:Sa.key)==="formContent"&&((Oe=Sa==null?void 0:Sa.contents)==null||Oe.forEach(Za=>{(Za==null?void 0:Za.prop)===(ka==null?void 0:ka[1])&&(fa=Za==null?void 0:Za.value)}))}))}),q=q+n.value+fa}}),U.key=q,U})),Aa==null||Aa.forEach(U=>{var la,fa,ka;let q=(la=Be[U.key])==null?void 0:la.find(ha=>{var Va,Sa,Oe,Za,Ha,xl,Yl;return((Sa=(Va=ha==null?void 0:ha.value)==null?void 0:Va.pageData)==null?void 0:Sa.name)===((Ha=(Za=(Oe=U==null?void 0:U.value)==null?void 0:Oe[0])==null?void 0:Za.groups)==null?void 0:Ha[0])&&((Yl=(xl=ha==null?void 0:ha.value)==null?void 0:xl.pageData)==null?void 0:Yl.name)!==void 0}),ze=q==null?void 0:q.id,_e=(fa=q==null?void 0:q.value)==null?void 0:fa.pageData;_e.compData=(ka=_e.compData)==null?void 0:ka.map(ha=>{var Va;return(ha==null?void 0:ha.key)==="formContent"&&(ha.contents=(Va=ha.contents)==null?void 0:Va.map(Sa=>{var Za;let Oe=(Za=U.value)==null?void 0:Za.find(Ha=>(Ha==null?void 0:Ha.key)===(Sa==null?void 0:Sa.prop));return Oe&&(Sa.value=Oe.value),Sa})),ha}),te.push({id:ze,value:{pageData:_e}})})});let pa=(ie=A.cloneDeep(fe))==null?void 0:ie[0];(te==null?void 0:te.length)>0&&await Ar.batchUpdateInsofDataApi({dataList:te})}m.setFreshContent(!0)}c.setImportLoading(!1)}catch{qa.ElMessage.error("方法执行错误,请查看方法!"),c.setImportLoading(!1)}g.value=!0},ue=["createInsofDataApi"],Ce=Bl.debounce(async ve=>{ee(ve)},100),Pe=async ve=>{var Fe,aa,Na;const B=A.cloneDeep(ve);let ce,W=new WeakMap;ve!=null&&ve[0].path&&(ce=await(B==null?void 0:B.map(async(ae,ta)=>{var Ja,L,H,Z,me,fe,da,Qe,te,pa,Ne,We,Aa,Da,Ze,ra;const ca=(Ja=W[ae==null?void 0:ae.path])==null?void 0:Ja.filter(pe=>{var U;return((U=pe==null?void 0:pe.key)==null?void 0:U.type)==="data"});let Ee="";const ie=await he.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);ca==null||ca.forEach(pe=>{var U,q,ze,_e,la;((q=(U=pe==null?void 0:pe.value)==null?void 0:U.tableData)==null?void 0:q.算法名称)===((ze=B==null?void 0:B[ta])==null?void 0:ze.method)&&(Ee=(la=(_e=pe==null?void 0:pe.value)==null?void 0:_e.tableData)==null?void 0:la.算法体)});const Be=await he.getItemData(ae==null?void 0:ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,W);let Ue="",oa=(me=(Z=(H=(L=Be==null?void 0:Be[0])==null?void 0:L.compData)==null?void 0:H.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Z.contents)==null?void 0:me.findIndex(pe=>(pe==null?void 0:pe.prop)==="算法体");return(da=(fe=Be==null?void 0:Be[0])==null?void 0:fe.compData)==null||da.forEach(pe=>{var U;(pe==null?void 0:pe.key)==="tableContents"&&((U=pe==null?void 0:pe.contents)==null||U.forEach(q=>{q!=null&&q.find(ze=>ze===(ae==null?void 0:ae.method))&&(Ue=q[oa])}))}),{buttonName:((Qe=B==null?void 0:B[ta])==null?void 0:Qe.method)||((Ne=(pa=(te=ca==null?void 0:ca[0])==null?void 0:te.value)==null?void 0:pa.tableData)==null?void 0:Ne.算法名称),api:(Ee===""?(Da=(Aa=(We=ca==null?void 0:ca[0])==null?void 0:We.value)==null?void 0:Aa.tableData)==null?void 0:Da.算法体:Ee)||Ue,content:ie==null?void 0:ie.filter(pe=>pe.comp!=="methodButton"),extraContent:(Ze=A.cloneDeep(ae.value))==null?void 0:Ze.slice(1),methodName:(ae==null?void 0:ae.path)??"",extraValues:(ra=B==null?void 0:B[ta])==null?void 0:ra.data}})));const Se=B==null?void 0:B.map(async ae=>{var Be,Ue,oa,Ja,L,H;const ta=(Be=resAll.data.result)==null?void 0:Be.filter(Z=>{var me,fe,da;return((me=Z==null?void 0:Z.key)==null?void 0:me.parentTable)===""&&((fe=Z==null?void 0:Z.key)==null?void 0:fe.type)==="method"&&((da=Z==null?void 0:Z.key)==null?void 0:da.methodName)===Z.method}),oe=ta==null?void 0:ta[0],ca=(Ue=resAll.data.result)==null?void 0:Ue.filter(Z=>{var me,fe;return((me=Z==null?void 0:Z.key)==null?void 0:me.type)==="methodData"&&((fe=Z==null?void 0:Z.key)==null?void 0:fe.tableId)===(oe==null?void 0:oe.id)}),Ee=await he.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,W),ie=ca==null?void 0:ca[0];return{buttonName:(oa=oe==null?void 0:oe.key)==null?void 0:oa.methodKey,api:(L=(Ja=ie==null?void 0:ie.value)==null?void 0:Ja.tableData)==null?void 0:L[0],content:Ee==null?void 0:Ee.filter(Z=>Z.comp!=="methodButton"),extraContent:(H=A.cloneDeep(ae.value))==null?void 0:H.slice(1),methodName:(ae==null?void 0:ae.method)??""}}),Le=(Fe=ve==null?void 0:ve[0])!=null&&Fe.path&&((aa=ve==null?void 0:ve[0])==null?void 0:aa.path)!==""?await Promise.all(ce):await Promise.all(Se);l.value=Le==null?void 0:Le.filter(ae=>ae==null?void 0:ae.extraContent),(Na=l.value)==null||Na.forEach(ae=>{var ta;ae.api===""&&((ta=ae.content)==null||ta.forEach(oe=>{var ca;oe.comp=="Table"&&m.setExtraContents(he.methodTableToContent(oe.compData,(ca=ae.extraContent)==null?void 0:ca[0]))}))})};return e.watch(()=>t.itemData,async()=>{_.value=="view"&&!g.value&&await Pe(A.cloneDeep(t.itemData)),g.value=!1},{immediate:!0,deep:!0}),(ve,B)=>{var ce,W,Se;return e.unref(_)!=="edit"?(e.openBlock(),e.createElementBlock("div",Q2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ce=l.value)==null?void 0:ce.filter(Le=>(Le==null?void 0:Le.buttonName)!=="保存"),Le=>{var Fe;return e.openBlock(),e.createElementBlock("div",null,[Le.api!==""?(e.openBlock(),e.createBlock(e.unref(as._sfc_main),{key:0,disabled:e.unref($)===e.unref(E)&&!((Fe=Le==null?void 0:Le.buttonName)!=null&&Fe.includes("预览")),class:"calculator-content",modelValue:Le.buttonName,onClickTrigger:aa=>e.unref(Ce)(Le),loading:k.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(G)!==""&&((Se=e.unref(E))==null?void 0:Se[((W=e.unref(E))==null?void 0:W.length)-1])!==e.unref(n)?(e.openBlock(),e.createBlock(e.unref(as._sfc_main),{key:0,class:"calculator-content",onClickTrigger:R,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:0,fileDataList:v.value,onDestroy:I},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},a4=Xl._export_sfc(e4,[["__scopeId","data-v-063aa9af"]]),l4={};function r4(a,l){return" 567 "}const n4=Xl._export_sfc(l4,[["render",r4]]),i4={class:"module content"},o4={class:"module data"},t4={class:"module layout"},s4={class:"form-content"},c4=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),v=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),m=e.ref({}),k=e.ref([]),c=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:k.value},{key:"signConfig",contents:m.value}]}),D=M=>{var $;m.value=A.cloneDeep(M),n("change",($=c())==null?void 0:$.compData)},F=M=>{var $,j;if((M==null?void 0:M.buttonName)==="确认"){const E=A.cloneDeep(M==null?void 0:M.content);switch(s.value){case"create":k.value.push({...E,index:(($=k.value)==null?void 0:$.length)+1});break}n("change",(j=c())==null?void 0:j.compData),t.visible=!1}else t.visible=!1},_=(M,$)=>{var j,E;switch(M){case"create":(j=f.value)==null||j.forEach(S=>{S.value=""}),s.value="create",t.visible=!0;break;case"update":(E=f.value)==null||E.forEach(S=>{S.value=$[S==null?void 0:S.prop]}),s.value="update",t.visible=!0;break;case"delete":k.value.splice($,1),s.value="delete";break}},G=()=>{t.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,M=>{var $,j;M&&(m.value=(($=M==null?void 0:M.find(E=>E.key==="signConfig"))==null?void 0:$.contents)??{},k.value=((j=M==null?void 0:M.find(E=>E.key==="signTypeList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,$)=>{const j=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",i4,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=S=>_("create"))},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",o4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(S,w)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:w},[e.createElementVNode("span",null,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",null,[e.createVNode(E,{type:"primary",size:"small",onClick:b=>_("update",{...S,index:w+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>_("delete",w)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",t4,[e.createVNode(ll.ssForm,{rowContents:p.value,onChange:D},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:t.visible,title:t.title,onBeforeDestroy:G,width:t.width},{default:e.withCtx(()=>[e.createElementVNode("div",s4,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:v.value,onOnButtonClick:F},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),u4=Xl._export_sfc(c4,[["__scopeId","data-v-487e0536"]]),d4=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(0),s=e.computed(()=>{var c,D;return(c=r==null?void 0:r.stepConfig)!=null&&c.allowTrigger?t.value:(D=r==null?void 0:r.stepConfig)==null?void 0:D.active}),v=(c,D)=>{t.value=D-1,n("clickStep",c,D)};e.onMounted(()=>{var c;n("clickStep",(c=r==null?void 0:r.stepList)==null?void 0:c[0],0)});const p=c=>ll.getComponent(c),f=()=>{var D;const c=(D=r==null?void 0:r.stepList)==null?void 0:D.find((F,_)=>_+1===s.value);return console.log("findStep",c),c?c==null?void 0:c.children:[]},m=c=>{n("clickTrigger",c)},k=c=>{n("changeTrigger",c)};return(c,D)=>{var G,M,$,j,E;const F=e.resolveComponent("el-step"),_=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(_,{direction:(G=a.stepConfig)==null?void 0:G.direction,active:s.value,"finish-status":"success",simple:(M=a.stepConfig)==null?void 0:M.simple,"align-center":(($=a.stepConfig)==null?void 0:$.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(S,w)=>(e.openBlock(),e.createBlock(F,{key:w,class:"step-item",onClick:b=>v(S,w+1)},{title:e.withCtx(()=>[e.renderSlot(c.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(c.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(j=a.stepConfig)!=null&&j.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(S,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":b=>S.value=b,onClickTrigger:m,onChangeTrigger:k,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(c.$slots,(b,g)=>({name:g,fn:e.withCtx(R=>[e.renderSlot(c.$slots,g,e.mergeProps({ref_for:!0},R||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),p4=Xl._export_sfc(d4,[["__scopeId","data-v-fdbd6832"]]),f4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:l}){const r=a,n=l,t=e.ref({}),s=e.ref([]),v=(p,f)=>{n("clickStep",p,f)};return e.watch(()=>r==null?void 0:r.itemData,p=>{var c,D,F,_;t.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let f=((c=p==null?void 0:p.find(G=>(G==null?void 0:G.key)==="stepName"))==null?void 0:c.contents)??[],m=[];(F=(D=p==null?void 0:p.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:D.contents)==null||F.forEach(G=>{m.push({label:G==null?void 0:G.label,prop:G==null?void 0:G.prop,name:G==null?void 0:G.prop,type:"text",disabled:!0})});let k=((_=p==null?void 0:p.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:_.contents)??[];f=f==null?void 0:f.map((G,M)=>{let $=m==null?void 0:m.map(j=>{var E;return{...j,value:(E=k==null?void 0:k[M])==null?void 0:E[j==null?void 0:j.prop]}});return{title:G,description:$}}),s.value=f},{immediate:!0,deep:!0}),(p,f)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(p4,{stepConfig:t.value,stepList:s.value,onClickStep:v},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:k})=>[e.createTextVNode(e.toDisplayString(k),1)]),description:e.withCtx(({descriptions:k})=>[e.createVNode(ll.ssForm,{ref:"formRef",rowContents:k,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),h4=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(l,r)=>{const n=e.resolveComponent("el-timeline-item"),t=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(t,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,v)=>(e.openBlock(),e.createBlock(n,{key:v,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),v4=Xl._export_sfc(h4,[["__scopeId","data-v-4172a886"]]),m4={class:"line-content"},y4={class:"line-time"},g4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const l=a,r=e.ref({}),n=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,t=>{var s,v;n.value=(s=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="timeLineList"))==null?void 0:s.contents,r.value=(v=t==null?void 0:t.find(p=>(p==null?void 0:p.key)==="timeLineConfig"))==null?void 0:v.contents},{immediate:!0}),(t,s)=>(e.openBlock(),e.createBlock(v4,{activities:n.value,timeLineConfig:r.value},{content:e.withCtx(({content:v,timestamp:p})=>[e.createElementVNode("span",m4,e.toDisplayString(v),1),e.createElementVNode("span",y4,e.toDisplayString(p),1)]),_:1},8,["activities","timeLineConfig"]))}}),b4=Xl._export_sfc(g4,[["__scopeId","data-v-b4d9deed"]]),k4={class:"tabs-content"},x4=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(a,{emit:l}){const r=a,n=l,t=e.ref();e.watch(()=>r==null?void 0:r.itemData,()=>{t.value=r==null?void 0:r.itemData},{immediate:!0,deep:!0});const s=D=>{n("change",D)},v=(D,F)=>{n("contentChange",D,F)},p=D=>{n("pageChange",D)},f=D=>{n("rowClick",D)},m=(D,F)=>{n("routeUrl",D,F)},k=D=>{n("clickTrigger",D)},c=(D,F)=>{n("clickMainKey",D,F)};return(D,F)=>{var _,G;return e.openBlock(),e.createElementBlock("div",k4,[(_=t.value)!=null&&_.length?(e.openBlock(),e.createBlock(ll.ssTab,{tabsContents:t.value,key:(G=t.value)==null?void 0:G.length},{pane:e.withCtx(({tab:M,index:$})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)(M==null?void 0:M.comp)),{related:M==null?void 0:M.relatedTables,compNames:r==null?void 0:r.compNames,compName:M==null?void 0:M.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:a.isDevMode,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:s,index:(M==null?void 0:M.id)??$,config:{showIndex:M==null?void 0:M.showIndex,allowMove:M==null?void 0:M.allowMove,viewport:M==null?void 0:M.viewport,status:M==null?void 0:M.status},onContentChange:v,onPageChange:p,onRowClick:f,onRouteUrl:m,parentTableId:M==null?void 0:M.tableId,allMapContents:a.allMapContents,children:M==null?void 0:M.children,level:1,onClickTrigger:k,onClickMainKey:c},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),w4=Xl._export_sfc(x4,[["__scopeId","data-v-1ea318b4"]]),_4={class:"type-select"},S4=["onClick"],E4={class:"list-icon"},C4={__name:"modelSelect",setup(a){const l=Un(A.pinia),{itemData:r}=A.storeToRefs(l),n=t=>{const s=A.cloneDeep(r.value);s.push({comp:t.comp,name:t.name,compData:[]}),l.setItemData(s)};return(t,s)=>{const v=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",_4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ru),(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:m=>n(p)},[e.createElementVNode("div",E4,[e.createVNode(v,{name:p.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(p.name),1)],8,S4)]))),128))])}}},D4=Xl._export_sfc(C4,[["__scopeId","data-v-91799bf8"]]),N4={class:"fill-content"},B4={class:"operate-content"},T4={class:"collapse-title-content"},A4={class:"collapse-title-item"},z4={key:1},M4=["onClick"],I4={class:"icon-content"},O4={key:0,class:"edit-content"},L4=["onClick"],$4={class:"comp-child"},R4={__name:"modelFill",setup(a){const l=Un(A.pinia),{itemData:r,originalData:n}=A.storeToRefs(l),t=e.ref([]);e.ref([]);const s=e.ref([]),v=e.ref([]),p=F=>{var G;let _=(G=A.cloneDeep(v.value))==null?void 0:G.map((M,$)=>(F===$&&(M.content=!0),M));v.value=_},f=F=>{var G;let _=(G=A.cloneDeep(v.value))==null?void 0:G.map((M,$)=>(F===$&&(M.content=!1),M));v.value=_,t.value=A.cloneDeep(r.value)},m=(F,_)=>{var j;let G=(j=A.cloneDeep(v.value))==null?void 0:j.map((E,S)=>(F===S&&(E.content=!1),E));v.value=G;const M=A.cloneDeep(r.value),$=M==null?void 0:M.filter((E,S)=>(S===F&&(E.name=_),E));l.setOriginalData($),l.setItemData($)};e.watch(()=>r.value,()=>{var F,_,G;!r.value||((F=r.value)==null?void 0:F.length)===0?t.value=[]:t.value=(_=A.cloneDeep(r.value))==null?void 0:_.filter(M=>(M==null?void 0:M.comp)!=="methodButton"),s.value=t.value,v.value=(G=A.cloneDeep(s.value))==null?void 0:G.map((M,$)=>({id:$,content:!1}))},{deep:!0,immediate:!0});const k=F=>Ni(F),c=(F,_,G)=>{var $,j;if(!F)return;let M=A.cloneDeep(r.value);M=($=M==null?void 0:M.map((E,S)=>(S===G&&(E.compData=F),E)))==null?void 0:$.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),v.value=(j=A.cloneDeep(M))==null?void 0:j.map((E,S)=>({id:S,content:!1})),l.setOriginalData(M),l.setItemData(M)},D=F=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=A.cloneDeep(r.value),G=_==null?void 0:_.filter((M,$)=>$!==F);l.setOriginalData(G),l.setItemData(G),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(F,_)=>{const G=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",N4,[_[1]||(_[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",B4,[e.createVNode(Ys.default,{class:"collapse-content",collapseContents:t.value},{title:e.withCtx(({item:M,index:$})=>{var j,E,S,w,b,g,R,I,Y,le;return[e.createElementVNode("div",T4,[e.createElementVNode("div",A4,[(E=(j=v.value)==null?void 0:j.find(ye=>ye.id===$))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:M.name&&M.name!==""?"8px":"0px"})},e.toDisplayString(M.name),5)),(w=(S=v.value)==null?void 0:S.find(ye=>ye.id===$))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",z4,[e.createVNode(ll.ssInput,{modelValue:M.name,"onUpdate:modelValue":ye=>M.name=ye,onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(g=(b=v.value)==null?void 0:b.find(ye=>ye.id===$))!=null&&g.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(ye=>p($),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Edit",style:{width:"16px",height:"16px"}})],8,M4))]),e.createElementVNode("div",I4,[(I=(R=v.value)==null?void 0:R.find(ye=>ye.id===$))!=null&&I.content?(e.openBlock(),e.createElementBlock("div",O4,[e.createVNode(G,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(ye=>f($),["stop"])},null,8,["onClick"]),e.createVNode(G,{name:"Save",onClick:e.withModifiers(ye=>m($,M.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(le=(Y=v.value)==null?void 0:Y.find(ye=>ye.id===$))!=null&&le.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(ye=>D($),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Delete",style:{width:"16px",height:"16px"}})],8,L4))])])]}),content:e.withCtx(({item:M,index:$})=>{var j,E;return[e.createElementVNode("div",$4,[e.createTextVNode(e.toDisplayString(k(M.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k(M.comp+"Operate")),{itemContents:M==null?void 0:M.compData,originalItemContents:(E=(j=s.value)==null?void 0:j.find((S,w)=>w===$))==null?void 0:E.compData,onChange:S=>c(S,M,$)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},V4=Xl._export_sfc(R4,[["__scopeId","data-v-a46a44b9"]]),F4={key:0,class:"show-content"},P4={style:{display:"flex"}},j4={__name:"modelShow",setup(a){const l=Un(A.pinia),{itemData:r}=A.storeToRefs(l),n=e.ref([]);e.watch(()=>r.value,()=>{var s;!r.value||((s=r.value)==null?void 0:s.length)===0?n.value=[]:n.value=A.cloneDeep(r.value)},{deep:!0,immediate:!0});const t=s=>Ni(s);return(s,v)=>{var p;return((p=n.value)==null?void 0:p.length)>0?(e.openBlock(),e.createElementBlock("div",F4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",P4,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},H4=Xl._export_sfc(j4,[["__scopeId","data-v-3f3e863e"]]),U4={class:"tabs-header"},q4={class:"tabs-list"},W4={class:"tab-name"},K4={class:"tab-actions"},G4=["onClick"],Y4=["onClick"],J4=["onClick"],X4={class:"model-operate"},Z4={class:"model-select",style:{display:"unset"}},Q4={class:"existing-components"},e6={class:"component-list"},a6=["onClick"],l6={class:"component-info"},r6={class:"component-type"},n6={class:"component-name"},i6={class:"model-fill"},o6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.ref([]),s=e.ref(!1),v=e.ref(""),p=e.ref({title:""}),f=e.ref(-1),m=e.ref(!1),k=e.ref(-1),c=e.ref(new WeakMap),D=e.ref(null),F=Un(A.pinia),{itemData:_}=A.storeToRefs(F),G=()=>{v.value="新增标签页",p.value.title="",f.value=-1,s.value=!0},M=ve=>{v.value="修改标签页",p.value.title=t.value[ve].title,f.value=ve,s.value=!0},$=ve=>{const B=S(ve);c.value.delete(B),t.value.splice(ve,1),Pe()},j=()=>{if(p.value.title.trim()){if(f.value===-1){const ve={title:p.value.title,value:p.value.title,label:p.value.title,children:[],id:E()};t.value.push(ve)}else t.value[f.value].title=p.value.title,t.value[f.value].value=p.value.title,t.value[f.value].label=p.value.title;s.value=!1,Pe()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ve=>{const B=t.value[ve];return B.id||(B.id=E()),B.id},w=ve=>{var W;k.value=ve;const B=S(ve);D.value=A.cloneDeep(_.value);let ce=c.value.get(B);!ce&&((W=t.value[ve].children)==null?void 0:W.length)>0&&(ce=I(t.value[ve].children)),ce?F.setItemData(A.cloneDeep(ce)):F.setItemData([]),m.value=!0},b=e.computed(()=>{const ve=A.useModelComp(A.pinia),B=A.storeToRefs(ve).itemData.value;return console.log("可用组件数据",B),!B||!Array.isArray(B)?[]:B.filter(ce=>{var W;if(ce.comp==="Tabs"&&k.value>=0){const Se=S(k.value);if((W=ce.compData)==null?void 0:W.some(Fe=>{var aa;return Fe.key==="stepList"&&((aa=Fe.contents)==null?void 0:aa.some(Na=>Na.id===Se))}))return!1}return!0})}),g=ve=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ve]||ve,R=ve=>{var B;try{const ce=A.cloneDeep(ve);ce.id=Date.now()+Math.random(),ce.comp==="Tabs"&&((B=ce.compData)==null||B.forEach(Se=>{Se.key==="stepList"&&Se.contents&&Se.contents.forEach(Le=>{Le.id=E()})}));const W=A.cloneDeep(_.value);W.push(ce),F.setItemData(W)}catch(ce){console.error("添加组件失败:",ce)}},I=ve=>ve.map(B=>{var ce;switch(B.type){case"form":return{comp:"Form",name:B.value||"表单",compData:Y(B.content)};case"table":return{comp:"Table",name:B.value||"表格",compData:le(B.content)};default:return{comp:"Unknown",name:B.value||"",compData:((ce=B.content)==null?void 0:ce.originalData)||[]}}}),Y=ve=>{if(!ve)return[];const B=[];return ve.rowContents&&B.push({key:"formContent",contents:ve.rowContents}),ve.buttonValue&&B.push({key:"formButton",contents:ve.buttonValue}),typeof ve.isEnableWrap<"u"&&B.push({key:"enableWrap",contents:ve.isEnableWrap}),B},le=ve=>[],ye=()=>{if(k.value>=0&&k.value<t.value.length){const ve=S(k.value);c.value.set(ve,A.cloneDeep(_.value)),t.value[k.value].children=se(_.value),console.log("保存后的数据",se(_.value))}m.value=!1,k.value=-1,D.value=null,Pe()},Te=()=>{D.value&&F.setItemData(A.cloneDeep(D.value)),m.value=!1,k.value=-1,D.value=null},V=()=>{m.value&&Te()},se=ve=>{if(!Array.isArray(ve))throw new Error("sourceData must be an array");return ve.map((B,ce)=>{if(!B||typeof B!="object")return B;const{comp:W,name:Se,compData:Le}=B;switch(W){case"Form":return{type:"form",content:ee(Le||[]),value:"表单"};case"Table":return{type:"table",content:ue(Le||[]),value:"表格"};default:return{type:"xxx",content:Ce(Le||[]),value:""}}})},ee=ve=>{const B={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ce={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ve.forEach((W,Se)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${Se}:`,W);return}const{key:Le,contents:Fe}=W,aa=ce[Le];if(!aa){console.warn(`Unknown Form config key: ${Le}`);return}Le==="enableWrap"?B[aa]=!!Fe:B[aa]=Array.isArray(Fe)?Fe:[]}),B},ue=ve=>{const B={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ce={header:"columns",tableContents:"tableData"};return ve.forEach((W,Se)=>{if(!W||typeof W!="object"){console.warn(`Invalid config at index ${Se}:`,W);return}const{key:Le,contents:Fe}=W,aa=ce[Le];if(!aa){console.warn(`Unknown Table config key: ${Le}`);return}B[aa]=Array.isArray(Fe)?Fe:[]}),B},Ce=ve=>(console.log("Default conversion logic - to be implemented"),{originalData:ve,processed:!1,componentType:"unknown"}),Pe=()=>{const ve=[{key:"stepList",contents:t.value}];n("change",ve)};return e.watch(()=>r.itemContents,ve=>{if(ve&&ve.length>0){const B=ve.find(ce=>ce.key==="stepList");B&&B.contents&&(t.value=B.contents.map(ce=>({title:ce.title||"",value:ce.value||ce.title||"",label:ce.label||ce.title||"",children:ce.children||[],id:ce.id||E()})))}},{immediate:!0,deep:!0}),(ve,B)=>{const ce=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-input"),Se=e.resolveComponent("el-form-item"),Le=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",U4,[B[6]||(B[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:G},[e.createVNode(ce,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),B[5]||(B[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",q4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(Fe,aa)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:aa},[e.createElementVNode("span",W4,e.toDisplayString(Fe.title),1),e.createElementVNode("div",K4,[e.createElementVNode("button",{onClick:Na=>M(aa)},"修改标题",8,G4),e.createElementVNode("button",{onClick:Na=>w(aa)},"布局调整",8,Y4),e.createElementVNode("button",{onClick:Na=>$(aa)},"删除",8,J4)])]))),128))]),e.createVNode(wr.ssDialog,{modelValue:s.value,"onUpdate:modelValue":B[2]||(B[2]=Fe=>s.value=Fe),title:v.value,onBeforeDestroy:B[3]||(B[3]=Fe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:B[1]||(B[1]=Fe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:j},"确定")]),default:e.withCtx(()=>[e.createVNode(Le,{model:p.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Se,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(W,{modelValue:p.value.title,"onUpdate:modelValue":B[0]||(B[0]=Fe=>p.value.title=Fe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(wr.ssDialog,{modelValue:m.value,"onUpdate:modelValue":B[4]||(B[4]=Fe=>m.value=Fe),title:"布局调整",fullScreen:"",onBeforeDestroy:V},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Te},"取消"),e.createElementVNode("button",{onClick:ye},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",X4,[e.createElementVNode("div",Z4,[e.createVNode(D4),e.createElementVNode("div",Q4,[B[8]||(B[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",e6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,Fe=>(e.openBlock(),e.createElementBlock("div",{key:Fe.id,class:"component-item",onClick:aa=>R(Fe)},[e.createElementVNode("div",l6,[e.createElementVNode("span",r6,e.toDisplayString(g(Fe.comp)),1),e.createElementVNode("span",n6,e.toDisplayString(Fe.name),1)]),B[7]||(B[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,a6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ve.innerWidth},[e.createVNode(H4)])),e.createElementVNode("div",i6,[e.createVNode(V4)])])]),_:1},8,["modelValue"])])}}},t6=Xl._export_sfc(o6,[["__scopeId","data-v-9096ed0d"]]);function s6(){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 c6(a){return{type:"line",...a}}function u6(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function d6(a){return{type:"bar",barWidth:"60%",...a}}function p6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function f6(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const On={line:{initBaseoptions:s6,initSeries:c6},bar:{initBaseoptions:u6,initSeries:d6},pie:{initBaseoptions:p6,initSeries:f6}},xs=A.useMenuState(A.pinia),Lc=(a,l)=>{var k;const r=[],n=[],{group:t,nameCol:s,valueCol:v}=l||{},p=a==null?void 0:a.find(c=>{const{name:D}=c;return D===t});if(!p)return{names:r,values:n};const f=(k=p==null?void 0:p.compData)==null?void 0:k.find(c=>{const{key:D}=c;return D==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(c=>{const D=c==null?void 0:c[0];let F=!1;qa.isObject(D)&&(D!=null&&D.id)&&(F=!0);let _=s,G=v;F&&(_=_+1,G=G+1);const M=c==null?void 0:c[_],$=c==null?void 0:c[G];r.push(M),n.push($)}),{names:r,values:n}},h6=async a=>{const{menu:l,mainKey:r,detailGroup:n,detailNameCol:t,detailValueCol:s,isSelfDetail:v}=a||{};let p=null;const f=sessionStorage.getItem("systemKey");if(v&&xs.activeMenuPath&&(p=await he.getItemData(`${xs.activeMenuPath}`,f,"")),!v){const m=l==null?void 0:l.join("/");p=await he.getItemData(`${m}^${r}`,f,"")}return Lc(p,{group:n,nameCol:t,valueCol:s})},v6=async a=>{const{menu:l,group:r,nameCol:n,valueCol:t}=a||{},s=l==null?void 0:l.join("/"),v=sessionStorage.getItem("systemKey"),p=await he.getItemData(s,v,"");return Lc(p,{group:r,nameCol:n,valueCol:t})},Nt=async(a,l)=>{const r={names:[],values:[]},{menu:n,group:t,nameCol:s,valueCol:v}=a||{};if(!n.length||!t)return r;const{mainKey:p,group:f,nameCol:m,valueCol:k,isSelfDetail:c}=l||{};return p&&f&&ll.isNumber(m)&&ll.isNumber(k)?await h6({menu:n,mainKey:p,detailGroup:f,detailNameCol:m,detailValueCol:k,isSelfDetail:c}):ll.isNumber(s)&&ll.isNumber(v)?await v6({menu:n,group:t,nameCol:s,valueCol:v}):r},m6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=On==null?void 0:On[n];if(!s)return;const{initBaseoptions:v,initSeries:p}=s,f=v();f.title.text=t??"";const{names:m,values:k}=await Nt(l,r);if(!m||!k)return f;f.xAxis.data=m;const c=p({data:k});return f.series.push(c),f},y6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=On==null?void 0:On[n];if(!s)return;const{initBaseoptions:v,initSeries:p}=s,f=v();f.title.text=t??"";const{names:m,values:k}=await Nt(l,r);if(!m||!k)return f;f.xAxis.data=m;const c=p({data:k});return f.series.push(c),f},g6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=On==null?void 0:On[n];if(!s)return;const{initBaseoptions:v,initSeries:p}=s,f=v();f.title.text=t??"";const{names:m,values:k}=await Nt(l,r);if(!m||!k)return f;const c=[];for(let F=0;F<m.length;F++){const _=m[F],G=k[F];c.push({name:_,value:G})}const D=p({data:c});return f.series.push(D),f},b6=async(a=[])=>{var v,p,f;const l=((v=a==null?void 0:a.find(m=>m.key==="chartBaseConfig"))==null?void 0:v.contents)??{},r=((p=a==null?void 0:a.find(m=>m.key==="chartDataConfig"))==null?void 0:p.contents)??{},n=((f=a==null?void 0:a.find(m=>m.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:t}=l;let s={};return t==="line"&&(s=await m6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),t==="bar"&&(s=await y6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),t==="pie"&&(s=await g6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),s},k6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const l=a,r=e.ref({});e.onMounted(async()=>{const t=l==null?void 0:l.itemData;r.value=await b6(t)});const n=e.computed(()=>(l==null?void 0:l.height)||"300px");return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:n.value})},[e.createVNode(zu.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),x6=Xl._export_sfc(k6,[["__scopeId","data-v-d4c081e8"]]),w6={class:"chart-module layout"},_6={class:"chart-module content"},S6={class:"chart-module content"},E6={class:"form-content"},C6={class:"dialog-footer"},D6={class:"form-content"},N6={class:"dialog-footer"},B6={class:"form-content"},T6={class:"dialog-footer"},A6=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l,t=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),v=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],p=e.ref({}),f=()=>{var Ee;s.value=v(),(Ee=s.value)==null||Ee.forEach(ie=>{var Ue;const Be=ie==null?void 0:ie.prop;ie.value=(Ue=p==null?void 0:p.value)==null?void 0:Ue[Be]}),t.visible=!0},m=Ee=>{p.value=Ee},k=()=>{var Ee;t.visible=!1,n("change",(Ee=oe())==null?void 0:Ee.compData)},c=e.reactive({visible:!1,width:"840",title:"数据配置"}),D=e.ref([]),F=()=>[{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({}),G=()=>{const Ee=D.value,ie=A.cloneDeep(Ee);return ie==null||ie.forEach(Be=>{var oa;const Ue=Be==null?void 0:Be.prop;Be.value=(oa=_.value)==null?void 0:oa[Ue]}),ie},M=Ee=>{var Be;_.value=Ee;const ie=G();D.value=ie,n("change",(Be=oe())==null?void 0:Be.compData)},$=async()=>{const Ee=await he.getMenusContent(),ie=G();ie==null||ie.forEach(Be=>{(Be==null?void 0:Be.prop)==="menu"&&(Be.contents=Ee)}),D.value=ie,c.visible=!0,await Fe(_.value.menu),await ae(_.value.group)},j=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:[]}],w=e.ref({}),b=()=>{const Ee=E.value,ie=A.cloneDeep(Ee);return ie==null||ie.forEach(Be=>{var oa;const Ue=Be==null?void 0:Be.prop;Be.value=(oa=w.value)==null?void 0:oa[Ue]}),ie},g=Ee=>{var Be;w.value=Ee;const ie=b();E.value=ie,n("change",(Be=oe())==null?void 0:Be.compData)},R=async()=>{await V();const Ee=A.cloneDeep(I.value),ie=b();ie==null||ie.forEach(Be=>{var oa;const Ue=Be==null?void 0:Be.prop;Be.value=(oa=w==null?void 0:w.value)==null?void 0:oa[Ue],Ue==="mainKey"&&(Be.contents=Ee)}),E.value=ie,j.visible=!0},I=e.ref([]),Y=e.ref([]),le=e.ref({}),ye=e.ref({}),Te=()=>{const{compData:Ee}=W.value||{},ie=Ee==null?void 0:Ee.find(Z=>{const{key:me}=Z;return me==="header"}),Be=(ie==null?void 0:ie.contents)||[],Ue=Be==null?void 0:Be.filter((Z,me)=>{const{label:fe}=Z;return fe!=="操作"}),oa=Ue==null?void 0:Ue.findIndex((Z,me)=>{const{isMainKey:fe}=Z;return fe});if(oa<0)return[];const Ja=Ee==null?void 0:Ee.find(Z=>{const{key:me}=Z;return me==="tableContents"}),L=(Ja==null?void 0:Ja.contents)||[];return L==null?void 0:L.map(Z=>{const me=Z==null?void 0:Z[0];let fe=oa;qa.isObject(me)&&(me!=null&&me.id)&&(fe=fe+1);const da=Z==null?void 0:Z[fe];return{label:da,value:da}})},V=async()=>{const Ee=await Te();I.value=Ee},se=async Ee=>{const ie=sessionStorage.getItem("systemKey");return await he.getItemData(Ee,ie,"")},ee=async Ee=>{const ie=Ee;Y.value=ie==null?void 0:ie.map(Be=>{const{name:Ue}=Be;return le.value[Ue]=Be,{label:Ue,value:Ue}})},ue=Ee=>{const{comp:ie,compData:Be}=ye.value||{};if(ie==="Table"){let Ue=b();Ue=Ue.filter(oa=>{const{prop:Ja}=oa;return Ja!=="formItems"}),aa(Ue,Be),E.value=Ue}},Ce=async()=>{var Be,Ue;const Ee=(Be=w==null?void 0:w.value)==null?void 0:Be.mainKey,ie=(Ue=_==null?void 0:_.value)==null?void 0:Ue.menu;if(Ee){const Ja=`${ie==null?void 0:ie.join("/")}^${Ee}`,L=await se(Ja);await ee(L);const H=b();H==null||H.forEach(Z=>{(Z==null?void 0:Z.prop)==="group"&&(Z.contents=Y.value)}),E.value=H}};e.watch(()=>{var Ee;return(Ee=w==null?void 0:w.value)==null?void 0:Ee.mainKey},async(Ee,ie)=>{Ee!=ie&&Ee&&await Ce()});const Pe=async Ee=>{const ie=le.value[Ee];ye.value=ie,await ue()};e.watch(()=>{var Ee;return(Ee=w==null?void 0:w.value)==null?void 0:Ee.group},async(Ee,ie)=>{Ee!=ie&&Ee&&Pe(Ee)});const ve=async()=>{var ie;await Ce();const Ee=(ie=w.value)==null?void 0:ie.group;await Pe(Ee)},B=e.ref([]),ce=e.ref({}),W=e.ref({}),Se=async Ee=>{const ie=Ee==null?void 0:Ee.join("/"),Be=sessionStorage.getItem("systemKey");return await he.getItemData(ie,Be,"")},Le=async Ee=>{const ie=await Se(Ee);B.value=ie==null?void 0:ie.map(Be=>{const{name:Ue}=Be;return ce.value[Ue]=Be,{label:Ue,value:Ue}})},Fe=async(Ee,ie)=>{await Le(Ee);const Be=G();Be==null||Be.forEach(Ue=>{(Ue==null?void 0:Ue.prop)==="group"&&(Ue.contents=B.value)}),D.value=Be};e.watch(()=>{var Ee;return(Ee=_==null?void 0:_.value)==null?void 0:Ee.menu},async(Ee,ie)=>{const Be=Ee==null?void 0:Ee.join("/"),Ue=ie==null?void 0:ie.join("/");Be!=Ue&&await Fe(Ee)});const aa=(Ee,ie)=>{const Be=ie==null?void 0:ie.find(L=>{const{key:H}=L;return H==="header"}),Ue=(Be==null?void 0:Be.contents)||[],oa=Ue==null?void 0:Ue.filter((L,H)=>{const{label:Z}=L;return Z!=="操作"}),Ja=oa==null?void 0:oa.map((L,H)=>{const{label:Z}=L;return{label:Z,value:H}});Ee==null||Ee.forEach(L=>{const H=L==null?void 0:L.prop;(H==="nameCol"||H==="valueCol")&&(L.contents=Ja)})},Na=Ee=>{const{comp:ie,compData:Be}=W.value||{};if(ie==="Table"){_.value.formItems=[];let Ue=G();Ue=Ue.filter(oa=>{const{prop:Ja}=oa;return Ja!=="formItems"}),aa(Ue,Be),D.value=Ue}},ae=async Ee=>{const ie=ce.value[Ee];W.value=ie,await Na()};e.watch(()=>{var Ee;return(Ee=_==null?void 0:_.value)==null?void 0:Ee.group},async(Ee,ie)=>{Ee!=ie&&ae(Ee)});const ta=async()=>{var Be,Ue;const Ee=(Be=_.value)==null?void 0:Be.menu;await Fe(Ee);const ie=(Ue=_.value)==null?void 0:Ue.group;await ae(ie)},oe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:p.value},{key:"chartDataConfig",contents:_.value},{key:"chartDetailConfig",contents:w.value}]}),ca=()=>{t.visible=!1,c.visible=!1,j.visible=!1};return e.onMounted(async()=>{var ie,Be,Ue;D.value=F(),E.value=S();const Ee=r==null?void 0:r.itemContents;p.value=((ie=Ee==null?void 0:Ee.find(oa=>oa.key==="chartBaseConfig"))==null?void 0:ie.contents)??{},_.value=((Be=Ee==null?void 0:Ee.find(oa=>oa.key==="chartDataConfig"))==null?void 0:Be.contents)??{},await ta(),w.value=((Ue=Ee==null?void 0:Ee.find(oa=>oa.key==="chartDetailConfig"))==null?void 0:Ue.contents)??{},await ve()}),(Ee,ie)=>{const Be=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",w6,[ie[4]||(ie[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:ie[0]||(ie[0]=Ue=>f())},{default:e.withCtx(()=>ie[3]||(ie[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",_6,[ie[6]||(ie[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:ie[1]||(ie[1]=Ue=>$())},{default:e.withCtx(()=>ie[5]||(ie[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",S6,[ie[8]||(ie[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:ie[2]||(ie[2]=Ue=>R())},{default:e.withCtx(()=>ie[7]||(ie[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(wr.ssDialog,{visible:t.visible,title:t.title,onBeforeDestroy:ca,width:t.width},{default:e.withCtx(()=>[e.createElementVNode("div",E6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",C6,[e.createVNode(Be,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ie[9]||(ie[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Be,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>ie[10]||(ie[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(wr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:ca,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",D6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",N6,[e.createVNode(Be,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ie[11]||(ie[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Be,{class:"ok-button button",onClick:ca,id:"themeButton"},{default:e.withCtx(()=>ie[12]||(ie[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(wr.ssDialog,{visible:j.visible,title:j.title,onBeforeDestroy:ca,width:j.width},{default:e.withCtx(()=>[e.createElementVNode("div",B6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",T6,[e.createVNode(Be,{class:"cancel-button button",onClick:ca,id:"themeBorderButton"},{default:e.withCtx(()=>ie[13]||(ie[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Be,{class:"ok-button button",onClick:ca,id:"themeButton"},{default:e.withCtx(()=>ie[14]||(ie[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),z6=Xl._export_sfc(A6,[["__scopeId","data-v-fe119645"]]),M6={class:"layout"},I6=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:l}){const r=l,n=a;e.onMounted(async()=>{});const t=e.computed(()=>A.cloneDeep(n==null?void 0:n.itemData)||[]),s=e.computed(()=>{var k;const m=(k=t==null?void 0:t.value)==null?void 0:k.find(c=>{const{key:D}=c;return D==="baseConfig"});return m==null?void 0:m.contents}),v=e.computed(()=>{var k;const m=(k=t==null?void 0:t.value)==null?void 0:k.find(c=>{const{key:D}=c;return D==="children"});return m==null?void 0:m.contents}),p=e.computed(()=>{let m=A.cloneDeep(v.value)||[];const k=m.length;let c=0;const D=[];if(m=m.map(F=>{const _=F.span;return _?(F.span=Number(_),c=c+F.span):D.push(F),F}),c<24){const F=Math.floor((24-c)/k);D.forEach(_=>{_.span=F})}return m}),f=m=>{r("rowClick",m)};return(m,k)=>{var F;const c=e.resolveComponent("el-col"),D=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",M6,[e.createVNode(D,{style:e.normalizeStyle({height:(F=s.value)==null?void 0:F.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(_,G)=>(e.openBlock(),e.createBlock(c,{span:_==null?void 0:_.span},{default:e.withCtx(()=>{var M;return[e.unref(Di)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)(_.comp)),{key:e.unref(Hn),compName:_.name,index:(_==null?void 0:_.id)??G,height:(M=s.value)==null?void 0:M.height,itemData:_==null?void 0:_.compData,childItemData:_==null?void 0:_.itemChildData,onChange:e.unref(Bo),onContentChange:e.unref(To),onPageChange:e.unref(Ao),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),O6=Xl._export_sfc(I6,[["__scopeId","data-v-ab9a36ed"]]),L6={class:"layout-operate"},$6={class:"layout-module"},R6={class:"collapse-title-item"},V6={class:"collapse-title"},F6={class:"icon-content"},P6=["onClick"],j6={class:"comp-child"},H6=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:l}){const r=a,n=l;e.onMounted(()=>{G()});const t=e.ref({}),s=e.ref({}),v=e.ref([]),p=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],f=w=>{s.value=w,n("change",S(),!0)},m=e.ref([]),k=e.ref([]),c=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],D=e.computed(()=>{const w=r==null?void 0:r.itemContents;return A.cloneDeep(w)}),F=e.computed(()=>{const w=D==null?void 0:D.value,b=w==null?void 0:w.find(g=>{const{key:R}=g;return R==="baseConfig"});return b==null?void 0:b.contents}),_=e.computed(()=>{const w=D==null?void 0:D.value,b=w==null?void 0:w.find(g=>{const{key:R}=g;return R==="children"});return b==null?void 0:b.contents}),G=()=>{var w;t.value=D.value||{},m.value=(_==null?void 0:_.value)||[],v.value=p(),v.value=(w=v.value)==null?void 0:w.map(b=>{var R;const{prop:g}=b;return b.value=(R=F.value)==null?void 0:R[g],b})};e.watch(()=>{var w;return(w=_==null?void 0:_.value)==null?void 0:w.length},()=>{var w;m.value=(_==null?void 0:_.value)||[],k.value=(w=_.value)==null?void 0:w.map(b=>c(b))},{immediate:!0});const M=(w,b)=>{const g=A.cloneDeep(_==null?void 0:_.value);g[b].span=w.span,m.value=g,n("change",S(),!0)},$=w=>Ni(w),j=(w,b,g)=>{if(!w)return;const R=A.cloneDeep(_==null?void 0:_.value);R[g]&&(R[g].compData=w,m.value=R,n("change",S(),!0))},E=w=>{A.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let b=A.cloneDeep(_==null?void 0:_.value);b=b==null?void 0:b.filter((g,R)=>w!==R),m.value=b,n("change",S(),!0),qa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:m==null?void 0:m.value}]});return(w,b)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",L6,[e.createElementVNode("div",$6,[b[1]||(b[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(ll.ssForm,{rowContents:v.value,isEnableWrap:!0,onChange:b[0]||(b[0]=R=>f(R))},null,8,["rowContents"])])]),e.createVNode(Ys.default,{class:"collapse-content",collapseContents:_.value},{title:e.withCtx(({item:R,index:I})=>[e.createElementVNode("div",R6,[e.createElementVNode("div",V6,e.toDisplayString(R.name),1),e.createElementVNode("div",F6,[e.createElementVNode("div",{onClick:e.withModifiers(Y=>E(I),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,P6)])])]),content:e.withCtx(({item:R,index:I})=>[e.createElementVNode("div",j6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:k.value[I],key:I,isEnableWrap:!0,onChange:Y=>M(Y,I)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(R.comp+"Operate")),{itemContents:R==null?void 0:R.compData,originalItemContents:R.compData,onChange:Y=>j(Y,R,I)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),U6=Xl._export_sfc(H6,[["__scopeId","data-v-ba05456e"]]),q6=typeof window<"u";var ws;q6&&((ws=window==null?void 0:window.navigator)!=null&&ws.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(a){return a==null}function $c(){}const W6=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(W6)));function K6(){const a=new Map;return{on(l,r){const n=a.get(l);n!=null&&n.add(r)||a.set(l,new Set([r]))},off(l,r){const n=a.get(l);n&&n.delete(r)},clear(l){const r=a.get(l);r&&r.clear()},clearAll(){a.clear()},emit(l,...r){const n=a.get(l);n&&n.forEach(t=>{t(...r)})}}}function _s(a,l=16){if(typeof a!="function")return $c;const r=(...s)=>{a(...s)};if(l<=0)return Rc(r);let n=0,t;return function(...s){const v=Date.now(),p=v-n;clearTimeout(t),p>=l?(n=v,r(...s)):t=setTimeout(()=>{n=Date.now(),r(...s)},Math.max(0,l-p))}}function G6(a,l=100){if(typeof a!="function")return $c;const r=(...t)=>{a(...t)};if(l<=0)return Rc(r);let n;return function(...t){clearTimeout(n),n=setTimeout(()=>{r(...t)},l)}}function Rc(a){if(typeof a!="function")return a;let l=!1,r,n;return function(...t){return r=t,l||(l=!0,n=Promise.resolve().then(()=>(l=!1,n=void 0,a(...r)))),n}}const ji=new Set,Vc=new WeakMap;function Y6(){ji.forEach(a=>{a(...Vc.get(a))}),ji.clear()}function Yr(a,...l){if(typeof a!="function")return a;Vc.set(a,l),!ji.has(a)&&(ji.add(a),ji.size===1&&Promise.resolve().then(Y6))}const Fc=Symbol("LAYOUT_KEY"),Pc=Symbol("EMITTER_KEY");function J6(a){let l=0,r;for(let n=0,t=a.length;n<t;n++)r=a[n].y+a[n].h,r>l&&(l=r);return l}function wt(a){const l=Array(a.length);for(let r=0,n=a.length;r<n;r++)l[r]=X6(a[r]);return l}function X6(a){return{...a}}function jc(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 wi(a,l,r){const n=Uc(a),t=qc(a),s=Array(a.length);for(let v=0,p=t.length;v<p;v++){let f=t[v];f.static||(f=Z6(n,f,l,r),n.push(f)),s[a.findIndex(m=>m.i===f.i)]=f,f.moved=!1}return s}function Z6(a,l,r,n){if(r)for(;l.y>0&&!Hi(a,l);)l.y--;else if(n){const s=n[l.i].y;for(;l.y>s&&!Hi(a,l);)l.y--}let t;for(;t=Hi(a,l);)l.y=t.y+t.h;return l}function Q6(a,l){const r=Uc(a);for(let n=0,t=a.length;n<t;n++){const s=a[n];if(s.x+s.w>l.cols&&(s.x=l.cols-s.w),s.x<0&&(s.x=0,s.w=l.cols),!s.static)r.push(s);else for(;Hi(r,s);)s.y++}return a}function Ss(a,l){for(let r=0,n=a.length;r<n;r++)if(a[r].i===l)return a[r]}function Hi(a,l){for(let r=0,n=a.length;r<n;r++)if(jc(a[r],l))return a[r]}function Hc(a,l){return a.filter(r=>jc(r,l))}function Uc(a){return a.filter(l=>l.static)}function _t(a,l,r,n,t=!1,s=!1){if(l.static)return a;const v=l.x,p=l.y,f=n&&l.y>n;typeof r=="number"&&(l.x=r),typeof n=="number"&&(l.y=n),l.moved=!0;let m=qc(a);f&&(m=m.reverse());const k=Hc(m,l);if(s&&k.length)return l.x=v,l.y=p,l.moved=!1,a;for(let c=0,D=k.length;c<D;c++){const F=k[c];F.moved||l.y>F.y&&l.y-F.y>F.h/4||(F.static?a=Es(a,F,l,t):a=Es(a,l,F,t))}return a}function Es(a,l,r,n){if(n){const t={x:r.x,y:r.y,w:r.w,h:r.h};if(t.y=Math.max(l.y-r.h,0),!Hi(a,t))return _t(a,r,void 0,t.y,!1)}return _t(a,r,void 0,r.y+1,!1)}function e1(a,l,r,n){const t="translate3d("+l+"px,"+a+"px, 0)";return{transform:t,WebkitTransform:t,MozTransform:t,msTransform:t,OTransform:t,width:r+"px",height:n+"px",position:"absolute"}}function a1(a,l,r,n){const t="translate3d("+l*-1+"px,"+a+"px, 0)";return{transform:t,WebkitTransform:t,MozTransform:t,msTransform:t,OTransform:t,width:r+"px",height:n+"px",position:"absolute"}}function l1(a,l,r,n){return{top:a+"px",left:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function r1(a,l,r,n){return{top:a+"px",right:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function qc(a){return Array.from(a).sort(function(l,r){return l.y===r.y&&l.x===r.x?0:l.y>r.y||l.y===r.y&&l.x>r.x?1:-1})}function n1(a,l){l=l||"Layout";const r=["x","y","w","h"],n=[];if(!Array.isArray(a))throw new Error(l+" must be an array!");for(let t=0,s=a.length;t<s;t++){const v=a[t];for(let p=0;p<r.length;p++)if(typeof v[r[p]]!="number")throw new Error("VueGridLayout: "+l+"["+t+"]."+r[p]+" must be a number!");if(v.i===void 0||v.i===null)throw new Error("VueGridLayout: "+l+"["+t+"].i cannot be null!");if(typeof v.i!="number"&&typeof v.i!="string")throw new Error("VueGridLayout: "+l+"["+t+"].i must be a string or number!");if(n.indexOf(v.i)>=0)throw new Error("VueGridLayout: "+l+"["+t+"].i must be unique!");if(n.push(v.i),v.static!==void 0&&typeof v.static!="boolean")throw new Error("VueGridLayout: "+l+"["+t+"].static must be a boolean!")}}function i1(a,l="vgl"){const r=()=>`${l}-${a}`;return{b:r,be:n=>`${r()}__${n}`,bm:n=>`${r()}--${n}`,bem:(n,t)=>`${r()}__${n}--${t}`}}function Cs(a){return o1(a)}function o1(a){var l;const r=((l=a.target)==null?void 0:l.offsetParent)||document.body,n=a.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),t=a.clientX+r.scrollLeft-n.left,s=a.clientY+r.scrollTop-n.top;return{x:t,y:s}}function Ds(a,l,r,n){return s1(a)?{deltaX:r-a,deltaY:n-l,lastX:a,lastY:l,x:r,y:n}:{deltaX:0,deltaY:0,lastX:r,lastY:n,x:r,y:n}}function s1(a){return typeof a=="number"&&!Number.isNaN(a)}function c1(a,l){const r=Kc(a);let n=r[0];for(let t=1,s=r.length;t<s;t++){const v=r[t];l>a[v]&&(n=v)}return n}function Wc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function u1(a,l,r,n,t,s,v){if(l[n])return wt(l[n]);let p=a;const f=Kc(r),m=f.slice(f.indexOf(n));for(let k=0,c=m.length;k<c;k++){const D=m[k];if(l[D]){p=l[D];break}}return p=wt(p||[]),wi(Q6(p,{cols:s}),v)}function Kc(a){return Object.keys(a).sort((l,r)=>a[l]-a[r])}let d1="auto";function p1(){return typeof document<"u"}function Ns(){return p1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):d1}var Fi={exports:{}},f1=Fi.exports,Bs;function h1(){return Bs||(Bs=1,function(a,l){(function(r,n){a.exports=n()})(f1,function(){function r(o,i){var u=Object.keys(o);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(o);i&&(y=y.filter(function(x){return Object.getOwnPropertyDescriptor(o,x).enumerable})),u.push.apply(u,y)}return u}function n(o){for(var i=1;i<arguments.length;i++){var u=arguments[i]!=null?arguments[i]:{};i%2?r(Object(u),!0).forEach(function(y){f(o,y,u[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(u)):r(Object(u)).forEach(function(y){Object.defineProperty(o,y,Object.getOwnPropertyDescriptor(u,y))})}return o}function t(o){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t(o)}function s(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function v(o,i){for(var u=0;u<i.length;u++){var y=i[u];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(o,G(y.key),y)}}function p(o,i,u){return i&&v(o.prototype,i),Object.defineProperty(o,"prototype",{writable:!1}),o}function f(o,i,u){return(i=G(i))in o?Object.defineProperty(o,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[i]=u,o}function m(o,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(i&&i.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),i&&c(o,i)}function k(o){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},k(o)}function c(o,i){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(u,y){return u.__proto__=y,u},c(o,i)}function D(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function F(o){var i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var u,y=k(o);if(i){var x=k(this).constructor;u=Reflect.construct(y,arguments,x)}else u=y.apply(this,arguments);return function(O,J){if(J&&(typeof J=="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(O)}(this,u)}}function _(){return _=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(o,i,u){var y=function(O,J){for(;!Object.prototype.hasOwnProperty.call(O,J)&&(O=k(O))!==null;);return O}(o,i);if(y){var x=Object.getOwnPropertyDescriptor(y,i);return x.get?x.get.call(arguments.length<3?o:u):x.value}},_.apply(this,arguments)}function G(o){var i=function(u,y){if(typeof u!="object"||u===null)return u;var x=u[Symbol.toPrimitive];if(x!==void 0){var O=x.call(u,y);if(typeof O!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(u)}(o,"string");return typeof i=="symbol"?i:i+""}var M=function(o){return!(!o||!o.Window)&&o instanceof o.Window},$=void 0,j=void 0;function E(o){$=o;var i=o.document.createTextNode("");i.ownerDocument!==o.document&&typeof o.wrap=="function"&&o.wrap(i)===i&&(o=o.wrap(o)),j=o}function S(o){return M(o)?o:(o.ownerDocument||o).defaultView||j.window}typeof window<"u"&&window&&E(window);var w=function(o){return!!o&&t(o)==="object"},b=function(o){return typeof o=="function"},g={window:function(o){return o===j||M(o)},docFrag:function(o){return w(o)&&o.nodeType===11},object:w,func:b,number:function(o){return typeof o=="number"},bool:function(o){return typeof o=="boolean"},string:function(o){return typeof o=="string"},element:function(o){if(!o||t(o)!=="object")return!1;var i=S(o)||j;return/object|function/.test(typeof Element>"u"?"undefined":t(Element))?o instanceof Element||o instanceof i.Element:o.nodeType===1&&typeof o.nodeName=="string"},plainObject:function(o){return w(o)&&!!o.constructor&&/function Object\b/.test(o.constructor.toString())},array:function(o){return w(o)&&o.length!==void 0&&b(o.splice)}};function R(o){var i=o.interaction;if(i.prepared.name==="drag"){var u=i.prepared.axis;u==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):u==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function I(o){var i=o.iEvent,u=o.interaction;if(u.prepared.name==="drag"){var y=u.prepared.axis;if(y==="x"||y==="y"){var x=y==="x"?"y":"x";i.page[x]=u.coords.start.page[x],i.client[x]=u.coords.start.client[x],i.delta[x]=0}}}var Y={id:"actions/drag",install:function(o){var i=o.actions,u=o.Interactable,y=o.defaults;u.prototype.draggable=Y.draggable,i.map.drag=Y,i.methodDict.drag="draggable",y.actions.drag=Y.defaults},listeners:{"interactions:before-action-move":R,"interactions:action-resume":R,"interactions:action-move":I,"auto-start:check":function(o){var i=o.interaction,u=o.interactable,y=o.buttons,x=u.options.drag;if(x&&x.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(y&u.options.drag.mouseButtons)!=0))return o.action={name:"drag",axis:x.lockAxis==="start"?x.startAxis:x.lockAxis},!1}},draggable:function(o){return g.object(o)?(this.options.drag.enabled=o.enabled!==!1,this.setPerAction("drag",o),this.setOnEvents("drag",o),/^(xy|x|y|start)$/.test(o.lockAxis)&&(this.options.drag.lockAxis=o.lockAxis),/^(xy|x|y)$/.test(o.startAxis)&&(this.options.drag.startAxis=o.startAxis),this):g.bool(o)?(this.options.drag.enabled=o,this):this.options.drag},beforeMove:R,move:I,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(o){return o.search("drag")===0}},le=Y,ye={init:function(o){var i=o;ye.document=i.document,ye.DocumentFragment=i.DocumentFragment||Te,ye.SVGElement=i.SVGElement||Te,ye.SVGSVGElement=i.SVGSVGElement||Te,ye.SVGElementInstance=i.SVGElementInstance||Te,ye.Element=i.Element||Te,ye.HTMLElement=i.HTMLElement||ye.Element,ye.Event=i.Event,ye.Touch=i.Touch||Te,ye.PointerEvent=i.PointerEvent||i.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Te(){}var V=ye,se={init:function(o){var i=V.Element,u=o.navigator||{};se.supportsTouch="ontouchstart"in o||g.func(o.DocumentTouch)&&V.document instanceof o.DocumentTouch,se.supportsPointerEvent=u.pointerEnabled!==!1&&!!V.PointerEvent,se.isIOS=/iP(hone|od|ad)/.test(u.platform),se.isIOS7=/iP(hone|od|ad)/.test(u.platform)&&/OS 7[^\d]/.test(u.appVersion),se.isIe9=/MSIE 9/.test(u.userAgent),se.isOperaMobile=u.appName==="Opera"&&se.supportsTouch&&/Presto/.test(u.userAgent),se.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",se.pEventTypes=se.supportsPointerEvent?V.PointerEvent===o.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,se.wheelEvent=V.document&&"onmousewheel"in V.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=se;function ue(o,i){if(o.contains)return o.contains(i);for(;i;){if(i===o)return!0;i=i.parentNode}return!1}function Ce(o,i){for(;g.element(o);){if(ve(o,i))return o;o=Pe(o)}return null}function Pe(o){var i=o.parentNode;if(g.docFrag(i)){for(;(i=i.host)&&g.docFrag(i););return i}return i}function ve(o,i){return j!==$&&(i=i.replace(/\/deep\//g," ")),o[ee.prefixedMatchesSelector](i)}var B=function(o){return o.parentNode||o.host};function ce(o,i){for(var u,y=[],x=o;(u=B(x))&&x!==i&&u!==x.ownerDocument;)y.unshift(x),x=u;return y}function W(o,i,u){for(;g.element(o);){if(ve(o,i))return!0;if((o=Pe(o))===u)return ve(o,i)}return!1}function Se(o){return o.correspondingUseElement||o}function Le(o){var i=o instanceof V.SVGElement?o.getBoundingClientRect():o.getClientRects()[0];return i&&{left:i.left,right:i.right,top:i.top,bottom:i.bottom,width:i.width||i.right-i.left,height:i.height||i.bottom-i.top}}function Fe(o){var i,u=Le(o);if(!ee.isIOS7&&u){var y={x:(i=(i=S(o))||j).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};u.left+=y.x,u.right+=y.x,u.top+=y.y,u.bottom+=y.y}return u}function aa(o){for(var i=[];o;)i.push(o),o=Pe(o);return i}function Na(o){return!!g.string(o)&&(V.document.querySelector(o),!0)}function ae(o,i){for(var u in i)o[u]=i[u];return o}function ta(o,i,u){return o==="parent"?Pe(u):o==="self"?i.getRect(u):Ce(u,o)}function oe(o,i,u,y){var x=o;return g.string(x)?x=ta(x,i,u):g.func(x)&&(x=x.apply(void 0,y)),g.element(x)&&(x=Fe(x)),x}function ca(o){return o&&{x:"x"in o?o.x:o.left,y:"y"in o?o.y:o.top}}function Ee(o){return!o||"x"in o&&"y"in o||((o=ae({},o)).x=o.left||0,o.y=o.top||0,o.width=o.width||(o.right||0)-o.x,o.height=o.height||(o.bottom||0)-o.y),o}function ie(o,i,u){o.left&&(i.left+=u.x),o.right&&(i.right+=u.x),o.top&&(i.top+=u.y),o.bottom&&(i.bottom+=u.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Be(o,i,u){var y=u&&o.options[u];return ca(oe(y&&y.origin||o.options.origin,o,i,[o&&i]))||{x:0,y:0}}function Ue(o,i){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(ge){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},g.string(o)&&o.search(" ")!==-1&&(o=oa(o)),g.array(o))return o.forEach(function(ge){return Ue(ge,i,u,y)}),y;if(g.object(o)&&(i=o,o=""),g.func(i)&&u(o))y[o]=y[o]||[],y[o].push(i);else if(g.array(i))for(var x=0,O=i;x<O.length;x++){var J=O[x];Ue(o,J,u,y)}else if(g.object(i))for(var Q in i)Ue(oa(Q).map(function(ge){return"".concat(o).concat(ge)}),i[Q],u,y);return y}function oa(o){return o.trim().split(/ +/)}var Ja=function(o,i){return Math.sqrt(o*o+i*i)},L=["webkit","moz"];function H(o,i){o.__set||(o.__set={});var u=function(x){if(L.some(function(O){return x.indexOf(O)===0}))return 1;typeof o[x]!="function"&&x!=="__set"&&Object.defineProperty(o,x,{get:function(){return x in o.__set?o.__set[x]:o.__set[x]=i[x]},set:function(O){o.__set[x]=O},configurable:!0})};for(var y in i)u(y);return o}function Z(o,i){o.page=o.page||{},o.page.x=i.page.x,o.page.y=i.page.y,o.client=o.client||{},o.client.x=i.client.x,o.client.y=i.client.y,o.timeStamp=i.timeStamp}function me(o){o.page.x=0,o.page.y=0,o.client.x=0,o.client.y=0}function fe(o){return o instanceof V.Event||o instanceof V.Touch}function da(o,i,u){return o=o||"page",(u=u||{}).x=i[o+"X"],u.y=i[o+"Y"],u}function Qe(o,i){return i=i||{x:0,y:0},ee.isOperaMobile&&fe(o)?(da("screen",o,i),i.x+=window.scrollX,i.y+=window.scrollY):da("page",o,i),i}function te(o){return g.number(o.pointerId)?o.pointerId:o.identifier}function pa(o,i,u){var y=i.length>1?We(i):i[0];Qe(y,o.page),function(x,O){O=O||{},ee.isOperaMobile&&fe(x)?da("screen",x,O):da("client",x,O)}(y,o.client),o.timeStamp=u}function Ne(o){var i=[];return g.array(o)?(i[0]=o[0],i[1]=o[1]):o.type==="touchend"?o.touches.length===1?(i[0]=o.touches[0],i[1]=o.changedTouches[0]):o.touches.length===0&&(i[0]=o.changedTouches[0],i[1]=o.changedTouches[1]):(i[0]=o.touches[0],i[1]=o.touches[1]),i}function We(o){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},u=0;u<o.length;u++){var y=o[u];for(var x in i)i[x]+=y[x]}for(var O in i)i[O]/=o.length;return i}function Aa(o){if(!o.length)return null;var i=Ne(o),u=Math.min(i[0].pageX,i[1].pageX),y=Math.min(i[0].pageY,i[1].pageY),x=Math.max(i[0].pageX,i[1].pageX),O=Math.max(i[0].pageY,i[1].pageY);return{x:u,y,left:u,top:y,right:x,bottom:O,width:x-u,height:O-y}}function Da(o,i){var u=i+"X",y=i+"Y",x=Ne(o),O=x[0][u]-x[1][u],J=x[0][y]-x[1][y];return Ja(O,J)}function Ze(o,i){var u=i+"X",y=i+"Y",x=Ne(o),O=x[1][u]-x[0][u],J=x[1][y]-x[0][y];return 180*Math.atan2(J,O)/Math.PI}function ra(o){return g.string(o.pointerType)?o.pointerType:g.number(o.pointerType)?[void 0,void 0,"touch","pen","mouse"][o.pointerType]:/touch/.test(o.type||"")||o instanceof V.Touch?"touch":"mouse"}function pe(o){var i=g.func(o.composedPath)?o.composedPath():o.path;return[Se(i?i[0]:o.target),Se(o.currentTarget)]}var U=function(){function o(i){s(this,o),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return p(o,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}();Object.defineProperty(U.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var q=function(o,i){for(var u=0;u<i.length;u++){var y=i[u];o.push(y)}return o},ze=function(o){return q([],o)},_e=function(o,i){for(var u=0;u<o.length;u++)if(i(o[u],u,o))return u;return-1},la=function(o,i){return o[_e(o,i)]},fa=function(o){m(u,o);var i=F(u);function u(y,x,O){var J;s(this,u),(J=i.call(this,x._interaction)).dropzone=void 0,J.dragEvent=void 0,J.relatedTarget=void 0,J.draggable=void 0,J.propagationStopped=!1,J.immediatePropagationStopped=!1;var Q=O==="dragleave"?y.prev:y.cur,ge=Q.element,je=Q.dropzone;return J.type=O,J.target=ge,J.currentTarget=ge,J.dropzone=je,J.dragEvent=x,J.relatedTarget=x.target,J.draggable=x.interactable,J.timeStamp=x.timeStamp,J}return p(u,[{key:"reject",value:function(){var y=this,x=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&x.cur.dropzone===this.dropzone&&x.cur.element===this.target)if(x.prev.dropzone=this.dropzone,x.prev.element=this.target,x.rejected=!0,x.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var O=x.activeDrops,J=_e(O,function(ge){var je=ge.dropzone,De=ge.element;return je===y.dropzone&&De===y.target});x.activeDrops.splice(J,1);var Q=new u(x,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new u(x,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),u}(U);function ka(o,i){for(var u=0,y=o.slice();u<y.length;u++){var x=y[u],O=x.dropzone,J=x.element;i.dropzone=O,i.target=J,O.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function ha(o,i){for(var u=function(O,J){for(var Q=[],ge=0,je=O.interactables.list;ge<je.length;ge++){var De=je[ge];if(De.options.drop.enabled){var ea=De.options.drop.accept;if(!(g.element(ea)&&ea!==J||g.string(ea)&&!ve(J,ea)||g.func(ea)&&!ea({dropzone:De,draggableElement:J})))for(var Ta=0,Xa=De.getAllElements();Ta<Xa.length;Ta++){var Ga=Xa[Ta];Ga!==J&&Q.push({dropzone:De,element:Ga,rect:De.getRect(Ga)})}}}return Q}(o,i),y=0;y<u.length;y++){var x=u[y];x.rect=x.dropzone.getRect(x.element)}return u}function Va(o,i,u){for(var y=o.dropState,x=o.interactable,O=o.element,J=[],Q=0,ge=y.activeDrops;Q<ge.length;Q++){var je=ge[Q],De=je.dropzone,ea=je.element,Ta=je.rect,Xa=De.dropCheck(i,u,x,O,ea,Ta);J.push(Xa?ea:null)}var Ga=function(al){for(var bl,ml,Cl,wl=[],Zl=0;Zl<al.length;Zl++){var Dl=al[Zl],jl=al[bl];if(Dl&&Zl!==bl)if(jl){var kr=B(Dl),Sr=B(jl);if(kr!==Dl.ownerDocument)if(Sr!==Dl.ownerDocument)if(kr!==Sr){wl=wl.length?wl:ce(jl);var Gr=void 0;if(jl instanceof V.HTMLElement&&Dl instanceof V.SVGElement&&!(Dl instanceof V.SVGSVGElement)){if(Dl===Sr)continue;Gr=Dl.ownerSVGElement}else Gr=Dl;for(var on=ce(Gr,jl.ownerDocument),wn=0;on[wn]&&on[wn]===wl[wn];)wn++;var fi=[on[wn-1],on[wn],wl[wn]];if(fi[0])for(var Rn=fi[0].lastChild;Rn;){if(Rn===fi[1]){bl=Zl,wl=on;break}if(Rn===fi[2])break;Rn=Rn.previousSibling}}else Cl=jl,(parseInt(S(ml=Dl).getComputedStyle(ml).zIndex,10)||0)>=(parseInt(S(Cl).getComputedStyle(Cl).zIndex,10)||0)&&(bl=Zl);else bl=Zl}else bl=Zl}return bl}(J);return y.activeDrops[Ga]||null}function Sa(o,i,u){var y=o.dropState,x={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return u.type==="dragstart"&&(x.activate=new fa(y,u,"dropactivate"),x.activate.target=null,x.activate.dropzone=null),u.type==="dragend"&&(x.deactivate=new fa(y,u,"dropdeactivate"),x.deactivate.target=null,x.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(x.leave=new fa(y,u,"dragleave"),u.dragLeave=x.leave.target=y.prev.element,u.prevDropzone=x.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(x.enter=new fa(y,u,"dragenter"),u.dragEnter=y.cur.element,u.dropzone=y.cur.dropzone)),u.type==="dragend"&&y.cur.dropzone&&(x.drop=new fa(y,u,"drop"),u.dropzone=y.cur.dropzone,u.relatedTarget=y.cur.element),u.type==="dragmove"&&y.cur.dropzone&&(x.move=new fa(y,u,"dropmove"),u.dropzone=y.cur.dropzone)),x}function Oe(o,i){var u=o.dropState,y=u.activeDrops,x=u.cur,O=u.prev;i.leave&&O.dropzone.fire(i.leave),i.enter&&x.dropzone.fire(i.enter),i.move&&x.dropzone.fire(i.move),i.drop&&x.dropzone.fire(i.drop),i.deactivate&&ka(y,i.deactivate),u.prev.dropzone=x.dropzone,u.prev.element=x.element}function Za(o,i){var u=o.interaction,y=o.iEvent,x=o.event;if(y.type==="dragmove"||y.type==="dragend"){var O=u.dropState;i.dynamicDrop&&(O.activeDrops=ha(i,u.element));var J=y,Q=Va(u,J,x);O.rejected=O.rejected&&!!Q&&Q.dropzone===O.cur.dropzone&&Q.element===O.cur.element,O.cur.dropzone=Q&&Q.dropzone,O.cur.element=Q&&Q.element,O.events=Sa(u,0,J)}}var Ha={id:"actions/drop",install:function(o){var i=o.actions,u=o.interactStatic,y=o.Interactable,x=o.defaults;o.usePlugin(le),y.prototype.dropzone=function(O){return function(J,Q){if(g.object(Q)){if(J.options.drop.enabled=Q.enabled!==!1,Q.listeners){var ge=Ue(Q.listeners),je=Object.keys(ge).reduce(function(ea,Ta){return ea[/^(enter|leave)/.test(Ta)?"drag".concat(Ta):/^(activate|deactivate|move)/.test(Ta)?"drop".concat(Ta):Ta]=ge[Ta],ea},{}),De=J.options.drop.listeners;De&&J.off(De),J.on(je),J.options.drop.listeners=je}return g.func(Q.ondrop)&&J.on("drop",Q.ondrop),g.func(Q.ondropactivate)&&J.on("dropactivate",Q.ondropactivate),g.func(Q.ondropdeactivate)&&J.on("dropdeactivate",Q.ondropdeactivate),g.func(Q.ondragenter)&&J.on("dragenter",Q.ondragenter),g.func(Q.ondragleave)&&J.on("dragleave",Q.ondragleave),g.func(Q.ondropmove)&&J.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?J.options.drop.overlap=Q.overlap:g.number(Q.overlap)&&(J.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(J.options.drop.accept=Q.accept),"checker"in Q&&(J.options.drop.checker=Q.checker),J}return g.bool(Q)?(J.options.drop.enabled=Q,J):J.options.drop}(this,O)},y.prototype.dropCheck=function(O,J,Q,ge,je,De){return function(ea,Ta,Xa,Ga,al,bl,ml){var Cl=!1;if(!(ml=ml||ea.getRect(bl)))return!!ea.options.drop.checker&&ea.options.drop.checker(Ta,Xa,Cl,ea,bl,Ga,al);var wl=ea.options.drop.overlap;if(wl==="pointer"){var Zl=Be(Ga,al,"drag"),Dl=Qe(Ta);Dl.x+=Zl.x,Dl.y+=Zl.y;var jl=Dl.x>ml.left&&Dl.x<ml.right,kr=Dl.y>ml.top&&Dl.y<ml.bottom;Cl=jl&&kr}var Sr=Ga.getRect(al);if(Sr&&wl==="center"){var Gr=Sr.left+Sr.width/2,on=Sr.top+Sr.height/2;Cl=Gr>=ml.left&&Gr<=ml.right&&on>=ml.top&&on<=ml.bottom}return Sr&&g.number(wl)&&(Cl=Math.max(0,Math.min(ml.right,Sr.right)-Math.max(ml.left,Sr.left))*Math.max(0,Math.min(ml.bottom,Sr.bottom)-Math.max(ml.top,Sr.top))/(Sr.width*Sr.height)>=wl),ea.options.drop.checker&&(Cl=ea.options.drop.checker(Ta,Xa,Cl,ea,bl,Ga,al)),Cl}(this,O,J,Q,ge,je,De)},u.dynamicDrop=function(O){return g.bool(O)?(o.dynamicDrop=O,u):o.dynamicDrop},ae(i.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),i.methodDict.drop="dropzone",o.dynamicDrop=!1,x.actions.drop=Ha.defaults},listeners:{"interactions:before-action-start":function(o){var i=o.interaction;i.prepared.name==="drag"&&(i.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(o,i){var u=o.interaction,y=(o.event,o.iEvent);if(u.prepared.name==="drag"){var x=u.dropState;x.activeDrops=[],x.events={},x.activeDrops=ha(i,u.element),x.events=Sa(u,0,y),x.events.activate&&(ka(x.activeDrops,x.events.activate),i.fire("actions/drop:start",{interaction:u,dragEvent:y}))}},"interactions:action-move":Za,"interactions:after-action-move":function(o,i){var u=o.interaction,y=o.iEvent;if(u.prepared.name==="drag"){var x=u.dropState;Oe(u,x.events),i.fire("actions/drop:move",{interaction:u,dragEvent:y}),x.events={}}},"interactions:action-end":function(o,i){if(o.interaction.prepared.name==="drag"){var u=o.interaction,y=o.iEvent;Za(o,i),Oe(u,u.dropState.events),i.fire("actions/drop:end",{interaction:u,dragEvent:y})}},"interactions:stop":function(o){var i=o.interaction;if(i.prepared.name==="drag"){var u=i.dropState;u&&(u.activeDrops=null,u.events=null,u.cur.dropzone=null,u.cur.element=null,u.prev.dropzone=null,u.prev.element=null,u.rejected=!1)}}},getActiveDrops:ha,getDrop:Va,getDropEvents:Sa,fireDropEvents:Oe,filterEventType:function(o){return o.search("drag")===0||o.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},xl=Ha;function Yl(o){var i=o.interaction,u=o.iEvent,y=o.phase;if(i.prepared.name==="gesture"){var x=i.pointers.map(function(je){return je.pointer}),O=y==="start",J=y==="end",Q=i.interactable.options.deltaSource;if(u.touches=[x[0],x[1]],O)u.distance=Da(x,Q),u.box=Aa(x),u.scale=1,u.ds=0,u.angle=Ze(x,Q),u.da=0,i.gesture.startDistance=u.distance,i.gesture.startAngle=u.angle;else if(J||i.pointers.length<2){var ge=i.prevEvent;u.distance=ge.distance,u.box=ge.box,u.scale=ge.scale,u.ds=0,u.angle=ge.angle,u.da=0}else u.distance=Da(x,Q),u.box=Aa(x),u.scale=u.distance/i.gesture.startDistance,u.angle=Ze(x,Q),u.ds=u.scale-i.gesture.scale,u.da=u.angle-i.gesture.angle;i.gesture.distance=u.distance,i.gesture.angle=u.angle,g.number(u.scale)&&u.scale!==1/0&&!isNaN(u.scale)&&(i.gesture.scale=u.scale)}}var kl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(o){var i=o.actions,u=o.Interactable,y=o.defaults;u.prototype.gesturable=function(x){return g.object(x)?(this.options.gesture.enabled=x.enabled!==!1,this.setPerAction("gesture",x),this.setOnEvents("gesture",x),this):g.bool(x)?(this.options.gesture.enabled=x,this):this.options.gesture},i.map.gesture=kl,i.methodDict.gesture="gesturable",y.actions.gesture=kl.defaults},listeners:{"interactions:action-start":Yl,"interactions:action-move":Yl,"interactions:action-end":Yl,"interactions:new":function(o){o.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(o){if(!(o.interaction.pointers.length<2)){var i=o.interactable.options.gesture;if(i&&i.enabled)return o.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(o){return o.search("gesture")===0}},Fl=kl;function ja(o,i,u,y,x,O,J){if(!i)return!1;if(i===!0){var Q=g.number(O.width)?O.width:O.right-O.left,ge=g.number(O.height)?O.height:O.bottom-O.top;if(J=Math.min(J,Math.abs((o==="left"||o==="right"?Q:ge)/2)),Q<0&&(o==="left"?o="right":o==="right"&&(o="left")),ge<0&&(o==="top"?o="bottom":o==="bottom"&&(o="top")),o==="left"){var je=Q>=0?O.left:O.right;return u.x<je+J}if(o==="top"){var De=ge>=0?O.top:O.bottom;return u.y<De+J}if(o==="right")return u.x>(Q>=0?O.right:O.left)-J;if(o==="bottom")return u.y>(ge>=0?O.bottom:O.top)-J}return!!g.element(y)&&(g.element(i)?i===y:W(y,i,x))}function zl(o){var i=o.iEvent,u=o.interaction;if(u.prepared.name==="resize"&&u.resizeAxes){var y=i;u.interactable.options.resize.square?(u.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=u.resizeAxes,u.resizeAxes==="x"?y.delta.y=0:u.resizeAxes==="y"&&(y.delta.x=0))}}var $l,Ma,rl={id:"actions/resize",before:["actions/drag"],install:function(o){var i=o.actions,u=o.browser,y=o.Interactable,x=o.defaults;rl.cursors=function(O){return O.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(u),rl.defaultMargin=u.supportsTouch||u.supportsPointerEvent?20:10,y.prototype.resizable=function(O){return function(J,Q,ge){return g.object(Q)?(J.options.resize.enabled=Q.enabled!==!1,J.setPerAction("resize",Q),J.setOnEvents("resize",Q),g.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?J.options.resize.axis=Q.axis:Q.axis===null&&(J.options.resize.axis=ge.defaults.actions.resize.axis),g.bool(Q.preserveAspectRatio)?J.options.resize.preserveAspectRatio=Q.preserveAspectRatio:g.bool(Q.square)&&(J.options.resize.square=Q.square),J):g.bool(Q)?(J.options.resize.enabled=Q,J):J.options.resize}(this,O,o)},i.map.resize=rl,i.methodDict.resize="resizable",x.actions.resize=rl.defaults},listeners:{"interactions:new":function(o){o.interaction.resizeAxes="xy"},"interactions:action-start":function(o){(function(i){var u=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var x=u,O=y.rect;y._rects={start:ae({},O),corrected:ae({},O),previous:ae({},O),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},x.edges=y.prepared.edges,x.rect=y._rects.corrected,x.deltaRect=y._rects.delta}})(o),zl(o)},"interactions:action-move":function(o){(function(i){var u=i.iEvent,y=i.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var x=u,O=y.interactable.options.resize.invert,J=O==="reposition"||O==="negate",Q=y.rect,ge=y._rects,je=ge.start,De=ge.corrected,ea=ge.delta,Ta=ge.previous;if(ae(Ta,De),J){if(ae(De,Q),O==="reposition"){if(De.top>De.bottom){var Xa=De.top;De.top=De.bottom,De.bottom=Xa}if(De.left>De.right){var Ga=De.left;De.left=De.right,De.right=Ga}}}else De.top=Math.min(Q.top,je.bottom),De.bottom=Math.max(Q.bottom,je.top),De.left=Math.min(Q.left,je.right),De.right=Math.max(Q.right,je.left);for(var al in De.width=De.right-De.left,De.height=De.bottom-De.top,De)ea[al]=De[al]-Ta[al];x.edges=y.prepared.edges,x.rect=De,x.deltaRect=ea}})(o),zl(o)},"interactions:action-end":function(o){var i=o.iEvent,u=o.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var y=i;y.edges=u.prepared.edges,y.rect=u._rects.corrected,y.deltaRect=u._rects.delta}},"auto-start:check":function(o){var i=o.interaction,u=o.interactable,y=o.element,x=o.rect,O=o.buttons;if(x){var J=ae({},i.coords.cur.page),Q=u.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(O&Q.mouseButtons)!=0)){if(g.object(Q.edges)){var ge={left:!1,right:!1,top:!1,bottom:!1};for(var je in ge)ge[je]=ja(je,Q.edges[je],J,i._latestPointer.eventTarget,y,x,Q.margin||rl.defaultMargin);ge.left=ge.left&&!ge.right,ge.top=ge.top&&!ge.bottom,(ge.left||ge.right||ge.top||ge.bottom)&&(o.action={name:"resize",edges:ge})}else{var De=Q.axis!=="y"&&J.x>x.right-rl.defaultMargin,ea=Q.axis!=="x"&&J.y>x.bottom-rl.defaultMargin;(De||ea)&&(o.action={name:"resize",axes:(De?"x":"")+(ea?"y":"")})}return!o.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(o){var i=o.edges,u=o.axis,y=o.name,x=rl.cursors,O=null;if(u)O=x[y+u];else if(i){for(var J="",Q=0,ge=["top","bottom","left","right"];Q<ge.length;Q++){var je=ge[Q];i[je]&&(J+=je)}O=x[J]}return O},filterEventType:function(o){return o.search("resize")===0},defaultMargin:null},sl=rl,ga={id:"actions",install:function(o){o.usePlugin(Fl),o.usePlugin(sl),o.usePlugin(le),o.usePlugin(xl)}},xa=0,La={request:function(o){return $l(o)},cancel:function(o){return Ma(o)},init:function(o){if($l=o.requestAnimationFrame,Ma=o.cancelAnimationFrame,!$l)for(var i=["ms","moz","webkit","o"],u=0;u<i.length;u++){var y=i[u];$l=o["".concat(y,"RequestAnimationFrame")],Ma=o["".concat(y,"CancelAnimationFrame")]||o["".concat(y,"CancelRequestAnimationFrame")]}$l=$l&&$l.bind(o),Ma=Ma&&Ma.bind(o),$l||($l=function(x){var O=Date.now(),J=Math.max(0,16-(O-xa)),Q=o.setTimeout(function(){x(O+J)},J);return xa=O+J,Q},Ma=function(x){return clearTimeout(x)})}},Ra={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(o){Ra.isScrolling=!0,La.cancel(Ra.i),o.autoScroll=Ra,Ra.interaction=o,Ra.prevTime=Ra.now(),Ra.i=La.request(Ra.scroll)},stop:function(){Ra.isScrolling=!1,Ra.interaction&&(Ra.interaction.autoScroll=null),La.cancel(Ra.i)},scroll:function(){var o=Ra.interaction,i=o.interactable,u=o.element,y=o.prepared.name,x=i.options[y].autoScroll,O=xe(x.container,i,u),J=Ra.now(),Q=(J-Ra.prevTime)/1e3,ge=x.speed*Q;if(ge>=1){var je={x:Ra.x*ge,y:Ra.y*ge};if(je.x||je.y){var De=ia(O);g.window(O)?O.scrollBy(je.x,je.y):O&&(O.scrollLeft+=je.x,O.scrollTop+=je.y);var ea=ia(O),Ta={x:ea.x-De.x,y:ea.y-De.y};(Ta.x||Ta.y)&&i.fire({type:"autoscroll",target:u,interactable:i,delta:Ta,interaction:o,container:O})}Ra.prevTime=J}Ra.isScrolling&&(La.cancel(Ra.i),Ra.i=La.request(Ra.scroll))},check:function(o,i){var u;return(u=o.options[i].autoScroll)==null?void 0:u.enabled},onInteractionMove:function(o){var i=o.interaction,u=o.pointer;if(i.interacting()&&Ra.check(i.interactable,i.prepared.name))if(i.simulation)Ra.x=Ra.y=0;else{var y,x,O,J,Q=i.interactable,ge=i.element,je=i.prepared.name,De=Q.options[je].autoScroll,ea=xe(De.container,Q,ge);if(g.window(ea))J=u.clientX<Ra.margin,y=u.clientY<Ra.margin,x=u.clientX>ea.innerWidth-Ra.margin,O=u.clientY>ea.innerHeight-Ra.margin;else{var Ta=Le(ea);J=u.clientX<Ta.left+Ra.margin,y=u.clientY<Ta.top+Ra.margin,x=u.clientX>Ta.right-Ra.margin,O=u.clientY>Ta.bottom-Ra.margin}Ra.x=x?1:J?-1:0,Ra.y=O?1:y?-1:0,Ra.isScrolling||(Ra.margin=De.margin,Ra.speed=De.speed,Ra.start(i))}}};function xe(o,i,u){return(g.string(o)?ta(o,i,u):o)||S(u)}function ia(o){return g.window(o)&&(o=window.document.body),{x:o.scrollLeft,y:o.scrollTop}}var Ie={id:"auto-scroll",install:function(o){var i=o.defaults,u=o.actions;o.autoScroll=Ra,Ra.now=function(){return o.now()},u.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=Ra.defaults},listeners:{"interactions:new":function(o){o.interaction.autoScroll=null},"interactions:destroy":function(o){o.interaction.autoScroll=null,Ra.stop(),Ra.interaction&&(Ra.interaction=null)},"interactions:stop":Ra.stop,"interactions:action-move":function(o){return Ra.onInteractionMove(o)}}},de=Ie;function ma(o,i){var u=!1;return function(){return u||(j.console.warn(i),u=!0),o.apply(this,arguments)}}function ya(o,i){return o.name=i.name,o.axis=i.axis,o.edges=i.edges,o}function Je(o){return g.bool(o)?(this.options.styleCursor=o,this):o===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Xe(o){return g.func(o)?(this.options.actionChecker=o,this):o===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ke={id:"auto-start/interactableMethods",install:function(o){var i=o.Interactable;i.prototype.getAction=function(u,y,x,O){var J=function(Q,ge,je,De,ea){var Ta=Q.getRect(De),Xa=ge.buttons||{0:1,1:4,3:8,4:16}[ge.button],Ga={action:null,interactable:Q,interaction:je,element:De,rect:Ta,buttons:Xa};return ea.fire("auto-start:check",Ga),Ga.action}(this,y,x,O,o);return this.options.actionChecker?this.options.actionChecker(u,y,J,this,O,x):J},i.prototype.ignoreFrom=ma(function(u){return this._backCompatOption("ignoreFrom",u)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=ma(function(u){return this._backCompatOption("allowFrom",u)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=Xe,i.prototype.styleCursor=Je}};function pl(o,i,u,y,x){return i.testIgnoreAllow(i.options[o.name],u,y)&&i.options[o.name].enabled&&il(i,u,o,x)?o:null}function Ve(o,i,u,y,x,O,J){for(var Q=0,ge=y.length;Q<ge;Q++){var je=y[Q],De=x[Q],ea=je.getAction(i,u,o,De);if(ea){var Ta=pl(ea,je,De,O,J);if(Ta)return{action:Ta,interactable:je,element:De}}}return{action:null,interactable:null,element:null}}function Fa(o,i,u,y,x){var O=[],J=[],Q=y;function ge(De){O.push(De),J.push(Q)}for(;g.element(Q);){O=[],J=[],x.interactables.forEachMatch(Q,ge);var je=Ve(o,i,u,O,J,y,x);if(je.action&&!je.interactable.options[je.action.name].manualStart)return je;Q=Pe(Q)}return{action:null,interactable:null,element:null}}function Ea(o,i,u){var y=i.action,x=i.interactable,O=i.element;y=y||{name:null},o.interactable=x,o.element=O,ya(o.prepared,y),o.rect=x&&y.name?x.getRect(O):null,Sl(o,u),u.fire("autoStart:prepared",{interaction:o})}function il(o,i,u,y){var x=o.options,O=x[u.name].max,J=x[u.name].maxPerElement,Q=y.autoStart.maxInteractions,ge=0,je=0,De=0;if(!(O&&J&&Q))return!1;for(var ea=0,Ta=y.interactions.list;ea<Ta.length;ea++){var Xa=Ta[ea],Ga=Xa.prepared.name;if(Xa.interacting()&&(++ge>=Q||Xa.interactable===o&&((je+=Ga===u.name?1:0)>=O||Xa.element===i&&(De++,Ga===u.name&&De>=J))))return!1}return Q>0}function Ia(o,i){return g.number(o)?(i.autoStart.maxInteractions=o,this):i.autoStart.maxInteractions}function Me(o,i,u){var y=u.autoStart.cursorElement;y&&y!==o&&(y.style.cursor=""),o.ownerDocument.documentElement.style.cursor=i,o.style.cursor=i,u.autoStart.cursorElement=i?o:null}function Sl(o,i){var u=o.interactable,y=o.element,x=o.prepared;if(o.pointerType==="mouse"&&u&&u.options.styleCursor){var O="";if(x.name){var J=u.options[x.name].cursorChecker;O=g.func(J)?J(x,u,y,o._interacting):i.actions.map[x.name].getCursor(x)}Me(o.element,O||"",i)}else i.autoStart.cursorElement&&Me(i.autoStart.cursorElement,"",i)}var Il={id:"auto-start/base",before:["actions"],install:function(o){var i=o.interactStatic,u=o.defaults;o.usePlugin(Ke),u.base.actionChecker=null,u.base.styleCursor=!0,ae(u.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(y){return Ia(y,o)},o.autoStart={maxInteractions:1/0,withinInteractionLimit:il,cursorElement:null}},listeners:{"interactions:down":function(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget;u.interacting()||Ea(u,Fa(u,y,x,O,i),i)},"interactions:move":function(o,i){(function(u,y){var x=u.interaction,O=u.pointer,J=u.event,Q=u.eventTarget;x.pointerType!=="mouse"||x.pointerIsDown||x.interacting()||Ea(x,Fa(x,O,J,Q,y),y)})(o,i),function(u,y){var x=u.interaction;if(x.pointerIsDown&&!x.interacting()&&x.pointerWasMoved&&x.prepared.name){y.fire("autoStart:before-start",u);var O=x.interactable,J=x.prepared.name;J&&O&&(O.options[J].manualStart||!il(O,x.element,x.prepared,y)?x.stop():(x.start(x.prepared,O,x.element),Sl(x,y)))}}(o,i)},"interactions:stop":function(o,i){var u=o.interaction,y=u.interactable;y&&y.options.styleCursor&&Me(u.element,"",i)}},maxInteractions:Ia,withinInteractionLimit:il,validateAction:pl},Ul=Il,ql={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(o,i){var u=o.interaction,y=o.eventTarget,x=o.dx,O=o.dy;if(u.prepared.name==="drag"){var J=Math.abs(x),Q=Math.abs(O),ge=u.interactable.options.drag,je=ge.startAxis,De=J>Q?"x":J<Q?"y":"xy";if(u.prepared.axis=ge.lockAxis==="start"?De[0]:ge.lockAxis,De!=="xy"&&je!=="xy"&&je!==De){u.prepared.name=null;for(var ea=y,Ta=function(Ga){if(Ga!==u.interactable){var al=u.interactable.options.drag;if(!al.manualStart&&Ga.testIgnoreAllow(al,ea,y)){var bl=Ga.getAction(u.downPointer,u.downEvent,u,ea);if(bl&&bl.name==="drag"&&function(ml,Cl){if(!Cl)return!1;var wl=Cl.options.drag.startAxis;return ml==="xy"||wl==="xy"||wl===ml}(De,Ga)&&Ul.validateAction(bl,Ga,ea,y,i))return Ga}}};g.element(ea);){var Xa=i.interactables.forEachMatch(ea,Ta);if(Xa){u.prepared.name="drag",u.interactable=Xa,u.element=ea;break}ea=Pe(ea)}}}}}};function Ql(o){var i=o.prepared&&o.prepared.name;if(!i)return null;var u=o.interactable.options;return u[i].hold||u[i].delay}var dr={id:"auto-start/hold",install:function(o){var i=o.defaults;o.usePlugin(Ul),i.perAction.hold=0,i.perAction.delay=0},listeners:{"interactions:new":function(o){o.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(o){var i=o.interaction,u=Ql(i);u>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},u))},"interactions:move":function(o){var i=o.interaction,u=o.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!u&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(o){var i=o.interaction;Ql(i)>0&&(i.prepared.name=null)}},getHoldDuration:Ql},Ol=dr,pr={id:"auto-start",install:function(o){o.usePlugin(Ul),o.usePlugin(Ol),o.usePlugin(ql)}},Fr=function(o){return/^(always|never|auto)$/.test(o)?(this.options.preventDefault=o,this):g.bool(o)?(this.options.preventDefault=o?"always":"never",this):this.options.preventDefault};function Pl(o){var i=o.interaction,u=o.event;i.interactable&&i.interactable.checkAndPreventDefault(u)}var ar={id:"core/interactablePreventDefault",install:function(o){var i=o.Interactable;i.prototype.preventDefault=Fr,i.prototype.checkAndPreventDefault=function(u){return function(y,x,O){var J=y.options.preventDefault;if(J!=="never")if(J!=="always"){if(x.events.supportsPassive&&/^touch(start|move)$/.test(O.type)){var Q=S(O.target).document,ge=x.getDocOptions(Q);if(!ge||!ge.events||ge.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(O.type)||g.element(O.target)&&ve(O.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||O.preventDefault()}else O.preventDefault()}(this,o,u)},o.interactions.docEvents.push({type:"dragstart",listener:function(u){for(var y=0,x=o.interactions.list;y<x.length;y++){var O=x[y];if(O.element&&(O.element===u.target||ue(O.element,u.target)))return void O.interactable.checkAndPreventDefault(u)}}})},listeners:["down","move","up","cancel"].reduce(function(o,i){return o["interactions:".concat(i)]=Pl,o},{})};function Pr(o,i){if(i.phaselessTypes[o])return!0;for(var u in i.map)if(o.indexOf(u)===0&&o.substr(u.length)in i.phases)return!0;return!1}function Tr(o){var i={};for(var u in o){var y=o[u];g.plainObject(y)?i[u]=Tr(y):g.array(y)?i[u]=ze(y):i[u]=y}return i}var jr=function(){function o(i){s(this,o),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=i,this.result=Ir(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return p(o,[{key:"start",value:function(i,u){var y,x,O=i.phase,J=this.interaction,Q=function(je){var De=je.interactable.options[je.prepared.name],ea=De.modifiers;return ea&&ea.length?ea:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Ta){var Xa=De[Ta];return Xa&&Xa.enabled&&{options:Xa,methods:Xa._methods}}).filter(function(Ta){return!!Ta})}(J);this.prepareStates(Q),this.startEdges=ae({},J.edges),this.edges=ae({},this.startEdges),this.startOffset=(y=J.rect,x=u,y?{left:x.x-y.left,top:x.y-y.top,right:y.right-x.x,bottom:y.bottom-x.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var ge=this.fillArg({phase:O,pageCoords:u,preEnd:!1});return this.result=Ir(),this.startAll(ge),this.result=this.setAll(ge)}},{key:"fillArg",value:function(i){var u=this.interaction;return i.interaction=u,i.interactable=u.interactable,i.element=u.element,i.rect||(i.rect=u.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var u=0,y=this.states;u<y.length;u++){var x=y[u];x.methods.start&&(i.state=x,x.methods.start(i))}}},{key:"setAll",value:function(i){var u=i.phase,y=i.preEnd,x=i.skipModifiers,O=i.rect,J=i.edges;i.coords=ae({},i.pageCoords),i.rect=ae({},O),i.edges=ae({},J);for(var Q=x?this.states.slice(x):this.states,ge=Ir(i.coords,i.rect),je=0;je<Q.length;je++){var De,ea=Q[je],Ta=ea.options,Xa=ae({},i.coords),Ga=null;(De=ea.methods)!=null&&De.set&&this.shouldDo(Ta,y,u)&&(i.state=ea,Ga=ea.methods.set(i),ie(i.edges,i.rect,{x:i.coords.x-Xa.x,y:i.coords.y-Xa.y})),ge.eventProps.push(Ga)}ae(this.edges,i.edges),ge.delta.x=i.coords.x-i.pageCoords.x,ge.delta.y=i.coords.y-i.pageCoords.y,ge.rectDelta.left=i.rect.left-O.left,ge.rectDelta.right=i.rect.right-O.right,ge.rectDelta.top=i.rect.top-O.top,ge.rectDelta.bottom=i.rect.bottom-O.bottom;var al=this.result.coords,bl=this.result.rect;if(al&&bl){var ml=ge.rect.left!==bl.left||ge.rect.right!==bl.right||ge.rect.top!==bl.top||ge.rect.bottom!==bl.bottom;ge.changed=ml||al.x!==ge.coords.x||al.y!==ge.coords.y}return ge}},{key:"applyToInteraction",value:function(i){var u=this.interaction,y=i.phase,x=u.coords.cur,O=u.coords.start,J=this.result,Q=this.startDelta,ge=J.delta;y==="start"&&ae(this.startDelta,J.delta);for(var je=0,De=[[O,Q],[x,ge]];je<De.length;je++){var ea=De[je],Ta=ea[0],Xa=ea[1];Ta.page.x+=Xa.x,Ta.page.y+=Xa.y,Ta.client.x+=Xa.x,Ta.client.y+=Xa.y}var Ga=this.result.rectDelta,al=i.rect||u.rect;al.left+=Ga.left,al.right+=Ga.right,al.top+=Ga.top,al.bottom+=Ga.bottom,al.width=al.right-al.left,al.height=al.bottom-al.top}},{key:"setAndApply",value:function(i){var u=this.interaction,y=i.phase,x=i.preEnd,O=i.skipModifiers,J=this.setAll(this.fillArg({preEnd:x,phase:y,pageCoords:i.modifiedCoords||u.coords.cur.page}));if(this.result=J,!J.changed&&(!O||O<this.states.length)&&u.interacting())return!1;if(i.modifiedCoords){var Q=u.coords.cur.page,ge={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};J.coords.x+=ge.x,J.coords.y+=ge.y,J.delta.x+=ge.x,J.delta.y+=ge.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var u=i.interaction,y=i.event,x=this.states;if(x&&x.length){for(var O=!1,J=0;J<x.length;J++){var Q=x[J];i.state=Q;var ge=Q.options,je=Q.methods,De=je.beforeEnd&&je.beforeEnd(i);if(De)return this.endResult=De,!1;O=O||!O&&this.shouldDo(ge,!0,i.phase,!0)}O&&u.move({event:y,preEnd:!0})}}},{key:"stop",value:function(i){var u=i.interaction;if(this.states&&this.states.length){var y=ae({states:this.states,interactable:u.interactable,element:u.element,rect:null},i);this.fillArg(y);for(var x=0,O=this.states;x<O.length;x++){var J=O[x];y.state=J,J.methods.stop&&J.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var u=0;u<i.length;u++){var y=i[u],x=y.options,O=y.methods,J=y.name;this.states.push({options:x,methods:O,index:u,name:J})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var u=i.interaction,y=u.coords,x=u.rect,O=u.modification;if(O.result){for(var J=O.startDelta,Q=O.result,ge=Q.delta,je=Q.rectDelta,De=0,ea=[[y.start,J],[y.cur,ge]];De<ea.length;De++){var Ta=ea[De],Xa=Ta[0],Ga=Ta[1];Xa.page.x-=Ga.x,Xa.page.y-=Ga.y,Xa.client.x-=Ga.x,Xa.client.y-=Ga.y}x.left-=je.left,x.right-=je.right,x.top-=je.top,x.bottom-=je.bottom}}},{key:"shouldDo",value:function(i,u,y,x){return!(!i||i.enabled===!1||x&&!i.endOnly||i.endOnly&&!u||y==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(u){return Tr(u)}),this.result=Ir(ae({},i.result.coords),ae({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),o}();function Ir(o,i){return{rect:i,coords:o,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Er(o,i){var u=o.defaults,y={start:o.start,set:o.set,beforeEnd:o.beforeEnd,stop:o.stop},x=function(O){var J=O||{};for(var Q in J.enabled=J.enabled!==!1,u)Q in J||(J[Q]=u[Q]);var ge={options:J,methods:y,name:i,enable:function(){return J.enabled=!0,ge},disable:function(){return J.enabled=!1,ge}};return ge};return i&&typeof i=="string"&&(x._defaults=u,x._methods=y),x}function Cr(o){var i=o.iEvent,u=o.interaction.modification.result;u&&(i.modifiers=u.eventProps)}var mn={id:"modifiers/base",before:["actions"],install:function(o){o.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(o){var i=o.interaction;i.modification=new jr(i)},"interactions:before-action-start":function(o){var i=o.interaction,u=o.interaction.modification;u.start(o,i.coords.start.page),i.edges=u.edges,u.applyToInteraction(o)},"interactions:before-action-move":function(o){var i=o.interaction,u=i.modification,y=u.setAndApply(o);return i.edges=u.edges,y},"interactions:before-action-end":function(o){var i=o.interaction,u=i.modification,y=u.beforeEnd(o);return i.edges=u.startEdges,y},"interactions:action-start":Cr,"interactions:action-move":Cr,"interactions:action-end":Cr,"interactions:after-action-start":function(o){return o.interaction.modification.restoreInteractionCoords(o)},"interactions:after-action-move":function(o){return o.interaction.modification.restoreInteractionCoords(o)},"interactions:stop":function(o){return o.interaction.modification.stop(o)}}},Nr=mn,cr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},yn=function(o){m(u,o);var i=F(u);function u(y,x,O,J,Q,ge,je){var De;s(this,u),(De=i.call(this,y)).relatedTarget=null,De.screenX=void 0,De.screenY=void 0,De.button=void 0,De.buttons=void 0,De.ctrlKey=void 0,De.shiftKey=void 0,De.altKey=void 0,De.metaKey=void 0,De.page=void 0,De.client=void 0,De.delta=void 0,De.rect=void 0,De.x0=void 0,De.y0=void 0,De.t0=void 0,De.dt=void 0,De.duration=void 0,De.clientX0=void 0,De.clientY0=void 0,De.velocity=void 0,De.speed=void 0,De.swipe=void 0,De.axes=void 0,De.preEnd=void 0,Q=Q||y.element;var ea=y.interactable,Ta=(ea&&ea.options||cr).deltaSource,Xa=Be(ea,Q,O),Ga=J==="start",al=J==="end",bl=Ga?D(De):y.prevEvent,ml=Ga?y.coords.start:al?{page:bl.page,client:bl.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return De.page=ae({},ml.page),De.client=ae({},ml.client),De.rect=ae({},y.rect),De.timeStamp=ml.timeStamp,al||(De.page.x-=Xa.x,De.page.y-=Xa.y,De.client.x-=Xa.x,De.client.y-=Xa.y),De.ctrlKey=x.ctrlKey,De.altKey=x.altKey,De.shiftKey=x.shiftKey,De.metaKey=x.metaKey,De.button=x.button,De.buttons=x.buttons,De.target=Q,De.currentTarget=Q,De.preEnd=ge,De.type=je||O+(J||""),De.interactable=ea,De.t0=Ga?y.pointers[y.pointers.length-1].downTime:bl.t0,De.x0=y.coords.start.page.x-Xa.x,De.y0=y.coords.start.page.y-Xa.y,De.clientX0=y.coords.start.client.x-Xa.x,De.clientY0=y.coords.start.client.y-Xa.y,De.delta=Ga||al?{x:0,y:0}:{x:De[Ta].x-bl[Ta].x,y:De[Ta].y-bl[Ta].y},De.dt=y.coords.delta.timeStamp,De.duration=De.timeStamp-De.t0,De.velocity=ae({},y.coords.velocity[Ta]),De.speed=Ja(De.velocity.x,De.velocity.y),De.swipe=al||J==="inertiastart"?De.getSwipe():null,De}return p(u,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var x=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;x<0&&(x+=360);var O=112.5<=x&&x<247.5,J=202.5<=x&&x<337.5;return{up:J,down:!J&&22.5<=x&&x<157.5,left:O,right:!O&&(292.5<=x||x<67.5),angle:x,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),u}(U);Object.defineProperties(yn.prototype,{pageX:{get:function(){return this.page.x},set:function(o){this.page.x=o}},pageY:{get:function(){return this.page.y},set:function(o){this.page.y=o}},clientX:{get:function(){return this.client.x},set:function(o){this.client.x=o}},clientY:{get:function(){return this.client.y},set:function(o){this.client.y=o}},dx:{get:function(){return this.delta.x},set:function(o){this.delta.x=o}},dy:{get:function(){return this.delta.y},set:function(o){this.delta.y=o}},velocityX:{get:function(){return this.velocity.x},set:function(o){this.velocity.x=o}},velocityY:{get:function(){return this.velocity.y},set:function(o){this.velocity.y=o}}});var ln=p(function o(i,u,y,x,O){s(this,o),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=i,this.pointer=u,this.event=y,this.downTime=x,this.downTarget=O}),rn=function(o){return o.interactable="",o.element="",o.prepared="",o.pointerIsDown="",o.pointerWasMoved="",o._proxy="",o}({}),Sn=function(o){return o.start="",o.move="",o.end="",o.stop="",o.interacting="",o}({}),Nn=0,pn=function(){function o(i){var u=this,y=i.pointerType,x=i.scopeFire;s(this,o),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=ma(function(De){this.move(De)},"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=Nn++,this._scopeFire=x,this.pointerType=y;var O=this;this._proxy={};var J=function(De){Object.defineProperty(u._proxy,De,{get:function(){return O[De]}})};for(var Q in rn)J(Q);var ge=function(De){Object.defineProperty(u._proxy,De,{value:function(){return O[De].apply(O,arguments)}})};for(var je in Sn)ge(je);this._scopeFire("interactions:new",{interaction:this})}return p(o,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,u,y){var x=this.updatePointer(i,u,y,!0),O=this.pointers[x];this._scopeFire("interactions:down",{pointer:i,event:u,eventTarget:y,pointerIndex:x,pointerInfo:O,type:"down",interaction:this})}},{key:"start",value:function(i,u,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!u.options[i.name].enabled)&&(ya(this.prepared,i),this.interactable=u,this.element=y,this.rect=u.getRect(y),this.edges=this.prepared.edges?ae({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(i,u,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,u,y,!1);var x,O,J=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&&(x=this.coords.cur.client.x-this.coords.start.client.x,O=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ja(x,O)>this.pointerMoveTolerance);var Q,ge,je,De=this.getPointerIndex(i),ea={pointer:i,pointerIndex:De,pointerInfo:this.pointers[De],event:u,type:"move",eventTarget:y,dx:x,dy:O,duplicate:J,interaction:this};J||(Q=this.coords.velocity,ge=this.coords.delta,je=Math.max(ge.timeStamp/1e3,.001),Q.page.x=ge.page.x/je,Q.page.y=ge.page.y/je,Q.client.x=ge.client.x/je,Q.client.y=ge.client.y/je,Q.timeStamp=je),this._scopeFire("interactions:move",ea),J||this.simulation||(this.interacting()&&(ea.type=null,this.move(ea)),this.pointerWasMoved&&Z(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||me(this.coords.delta),(i=ae({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},i||{})).phase="move",this._doPhase(i)}},{key:"pointerUp",value:function(i,u,y,x){var O=this.getPointerIndex(i);O===-1&&(O=this.updatePointer(i,u,y,!1));var J=/cancel$/i.test(u.type)?"cancel":"up";this._scopeFire("interactions:".concat(J),{pointer:i,pointerIndex:O,pointerInfo:this.pointers[O],event:u,eventTarget:y,type:J,curEventTarget:x,interaction:this}),this.simulation||this.end(u),this.removePointer(i,u)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var u;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(u=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,u===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(i){var u=te(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:_e(this.pointers,function(y){return y.id===u})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,u,y,x){var O,J,Q,ge=te(i),je=this.getPointerIndex(i),De=this.pointers[je];return x=x!==!1&&(x||/(down|start)$/i.test(u.type)),De?De.pointer=i:(De=new ln(ge,i,u,null,null),je=this.pointers.length,this.pointers.push(De)),pa(this.coords.cur,this.pointers.map(function(ea){return ea.pointer}),this._now()),O=this.coords.delta,J=this.coords.prev,Q=this.coords.cur,O.page.x=Q.page.x-J.page.x,O.page.y=Q.page.y-J.page.y,O.client.x=Q.client.x-J.client.x,O.client.y=Q.client.y-J.client.y,O.timeStamp=Q.timeStamp-J.timeStamp,x&&(this.pointerIsDown=!0,De.downTime=this.coords.cur.timeStamp,De.downTarget=y,H(this.downPointer,i),this.interacting()||(Z(this.coords.start,this.coords.cur),Z(this.coords.prev,this.coords.cur),this.downEvent=u,this.pointerWasMoved=!1)),this._updateLatestPointer(i,u,y),this._scopeFire("interactions:update-pointer",{pointer:i,event:u,eventTarget:y,down:x,pointerInfo:De,pointerIndex:je,interaction:this}),je}},{key:"removePointer",value:function(i,u){var y=this.getPointerIndex(i);if(y!==-1){var x=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:i,event:u,eventTarget:null,pointerIndex:y,pointerInfo:x,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,u,y){this._latestPointer.pointer=i,this._latestPointer.event=u,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,u,y,x){return new yn(this,i,this.prepared.name,u,this.element,y,x)}},{key:"_fireEvent",value:function(i){var u;(u=this.interactable)==null||u.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var u=i.event,y=i.phase,x=i.preEnd,O=i.type,J=this.rect;if(J&&y==="move"&&(ie(this.edges,J,this.coords.delta[this.interactable.options.deltaSource]),J.width=J.right-J.left,J.height=J.bottom-J.top),this._scopeFire("interactions:before-action-".concat(y),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(u,y,x,O);return this._scopeFire("interactions:action-".concat(y),i),y==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(y),i),!0}},{key:"_now",value:function(){return Date.now()}}]),o}();function lr(o){Ml(o.interaction)}function Ml(o){if(!function(u){return!(!u.offset.pending.x&&!u.offset.pending.y)}(o))return!1;var i=o.offset.pending;return cl(o.coords.cur,i),cl(o.coords.delta,i),ie(o.edges,o.rect,i),i.x=0,i.y=0,!0}function zr(o){var i=o.x,u=o.y;this.offset.pending.x+=i,this.offset.pending.y+=u,this.offset.total.x+=i,this.offset.total.y+=u}function cl(o,i){var u=o.page,y=o.client,x=i.x,O=i.y;u.x+=x,u.y+=O,y.x+=x,y.y+=O}Sn.offsetBy="";var sr={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(o){o.Interaction.prototype.offsetBy=zr},listeners:{"interactions:new":function(o){o.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(o){return function(i){i.pointerIsDown&&(cl(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(o.interaction)},"interactions:before-action-start":lr,"interactions:before-action-move":lr,"interactions:before-action-end":function(o){var i=o.interaction;if(Ml(i))return i.move({offset:!0}),i.end(),!1},"interactions:stop":function(o){var i=o.interaction;i.offset.total.x=0,i.offset.total.y=0,i.offset.pending.x=0,i.offset.pending.y=0}}},Rl=sr,_r=function(){function o(i){s(this,o),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=i}return p(o,[{key:"start",value:function(i){var u=this.interaction,y=Kl(u);if(!y||!y.enabled)return!1;var x=u.coords.velocity.client,O=Ja(x.x,x.y),J=this.modification||(this.modification=new jr(u));if(J.copyFrom(u.modification),this.t0=u._now(),this.allowResume=y.allowResume,this.v0=O,this.currentOffset={x:0,y:0},this.startCoords=u.coords.cur.page,this.modifierArg=J.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-u.coords.cur.timeStamp<50&&O>y.minSpeed&&O>y.endSpeed)this.startInertia();else{if(J.result=J.setAll(this.modifierArg),!J.result.changed)return!1;this.startSmoothEnd()}return u.modification.result.rect=null,u.offsetBy(this.targetOffset),u._doPhase({interaction:u,event:i,phase:"inertiastart"}),u.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),u.modification.result.rect=null,this.active=!0,u.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,u=this.interaction.coords.velocity.client,y=Kl(this.interaction),x=y.resistance,O=-Math.log(y.endSpeed/this.v0)/x;this.targetOffset={x:(u.x-O)/x,y:(u.y-O)/x},this.te=O,this.lambda_v0=x/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var J=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},J.result=J.setAll(Q),J.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+J.result.delta.x,y:this.targetOffset.y+J.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var u=this;this.timeout=La.request(function(){u.active&&i()})}},{key:"inertiaTick",value:function(){var i,u,y,x,O,J,Q,ge=this,je=this.interaction,De=Kl(je).resistance,ea=(je._now()-this.t0)/1e3;if(ea<this.te){var Ta,Xa=1-(Math.exp(-De*ea)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,u=0,y=this.targetOffset.x,x=this.targetOffset.y,O=this.modifiedOffset.x,J=this.modifiedOffset.y,Ta={x:Lr(Q=Xa,i,y,O),y:Lr(Q,u,x,J)}):Ta={x:this.targetOffset.x*Xa,y:this.targetOffset.y*Xa};var Ga={x:Ta.x-this.currentOffset.x,y:Ta.y-this.currentOffset.y};this.currentOffset.x+=Ga.x,this.currentOffset.y+=Ga.y,je.offsetBy(Ga),je.move(),this.onNextFrame(function(){return ge.inertiaTick()})}else je.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,u=this.interaction,y=u._now()-this.t0,x=Kl(u).smoothEndDuration;if(y<x){var O={x:gn(y,0,this.targetOffset.x,x),y:gn(y,0,this.targetOffset.y,x)},J={x:O.x-this.currentOffset.x,y:O.y-this.currentOffset.y};this.currentOffset.x+=J.x,this.currentOffset.y+=J.y,u.offsetBy(J),u.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else u.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var u=i.pointer,y=i.event,x=i.eventTarget,O=this.interaction;O.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),O.updatePointer(u,y,x,!0),O._doPhase({interaction:O,event:y,phase:"resume"}),Z(O.coords.prev,O.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,La.cancel(this.timeout)}}]),o}();function Kl(o){var i=o.interactable,u=o.prepared;return i&&i.options&&u.name&&i.options[u.name].inertia}var fr={id:"inertia",before:["modifiers","actions"],install:function(o){var i=o.defaults;o.usePlugin(Rl),o.usePlugin(Nr),o.actions.phases.inertiastart=!0,o.actions.phases.resume=!0,i.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(o){var i=o.interaction;i.inertia=new _r(i)},"interactions:before-action-end":function(o){var i=o.interaction,u=o.event;return(!i._interacting||i.simulation||!i.inertia.start(u))&&null},"interactions:down":function(o){var i=o.interaction,u=o.eventTarget,y=i.inertia;if(y.active)for(var x=u;g.element(x);){if(x===i.element){y.resume(o);break}x=Pe(x)}},"interactions:stop":function(o){var i=o.interaction.inertia;i.active&&i.stop()},"interactions:before-action-resume":function(o){var i=o.interaction.modification;i.stop(o),i.start(o,o.interaction.coords.cur.page),i.applyToInteraction(o)},"interactions:before-action-inertiastart":function(o){return o.interaction.modification.setAndApply(o)},"interactions:action-resume":Cr,"interactions:action-inertiastart":Cr,"interactions:after-action-inertiastart":function(o){return o.interaction.modification.restoreInteractionCoords(o)},"interactions:after-action-resume":function(o){return o.interaction.modification.restoreInteractionCoords(o)}}};function Lr(o,i,u,y){var x=1-o;return x*x*i+2*x*o*u+o*o*y}function gn(o,i,u,y){return-u*(o/=y)*(o-2)+i}var Bn=fr;function bn(o,i){for(var u=0;u<i.length;u++){var y=i[u];if(o.immediatePropagationStopped)break;y(o)}}var qn=function(){function o(i){s(this,o),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ae({},i||{})}return p(o,[{key:"fire",value:function(i){var u,y=this.global;(u=this.types[i.type])&&bn(i,u),!i.propagationStopped&&y&&(u=y[i.type])&&bn(i,u)}},{key:"on",value:function(i,u){var y=Ue(i,u);for(i in y)this.types[i]=q(this.types[i]||[],y[i])}},{key:"off",value:function(i,u){var y=Ue(i,u);for(i in y){var x=this.types[i];if(x&&x.length)for(var O=0,J=y[i];O<J.length;O++){var Q=J[O],ge=x.indexOf(Q);ge!==-1&&x.splice(ge,1)}}}},{key:"getRect",value:function(i){return null}}]),o}(),Ln=function(){function o(i){s(this,o),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,H(this,i)}return p(o,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),o}();function kn(o){return g.object(o)?{capture:!!o.capture,passive:!!o.passive}:{capture:!!o,passive:!1}}function Tn(o,i){return o===i||(typeof o=="boolean"?!!i.capture===o&&!i.passive:!!o.capture==!!i.capture&&!!o.passive==!!i.passive)}var $n={id:"events",install:function(o){var i,u=[],y={},x=[],O={add:J,remove:Q,addDelegate:function(De,ea,Ta,Xa,Ga){var al=kn(Ga);if(!y[Ta]){y[Ta]=[];for(var bl=0;bl<x.length;bl++){var ml=x[bl];J(ml,Ta,ge),J(ml,Ta,je,!0)}}var Cl=y[Ta],wl=la(Cl,function(Zl){return Zl.selector===De&&Zl.context===ea});wl||(wl={selector:De,context:ea,listeners:[]},Cl.push(wl)),wl.listeners.push({func:Xa,options:al})},removeDelegate:function(De,ea,Ta,Xa,Ga){var al,bl=kn(Ga),ml=y[Ta],Cl=!1;if(ml)for(al=ml.length-1;al>=0;al--){var wl=ml[al];if(wl.selector===De&&wl.context===ea){for(var Zl=wl.listeners,Dl=Zl.length-1;Dl>=0;Dl--){var jl=Zl[Dl];if(jl.func===Xa&&Tn(jl.options,bl)){Zl.splice(Dl,1),Zl.length||(ml.splice(al,1),Q(ea,Ta,ge),Q(ea,Ta,je,!0)),Cl=!0;break}}if(Cl)break}}},delegateListener:ge,delegateUseCapture:je,delegatedEvents:y,documents:x,targets:u,supportsOptions:!1,supportsPassive:!1};function J(De,ea,Ta,Xa){if(De.addEventListener){var Ga=kn(Xa),al=la(u,function(bl){return bl.eventTarget===De});al||(al={eventTarget:De,events:{}},u.push(al)),al.events[ea]||(al.events[ea]=[]),la(al.events[ea],function(bl){return bl.func===Ta&&Tn(bl.options,Ga)})||(De.addEventListener(ea,Ta,O.supportsOptions?Ga:Ga.capture),al.events[ea].push({func:Ta,options:Ga}))}}function Q(De,ea,Ta,Xa){if(De.addEventListener&&De.removeEventListener){var Ga=_e(u,function(kr){return kr.eventTarget===De}),al=u[Ga];if(al&&al.events)if(ea!=="all"){var bl=!1,ml=al.events[ea];if(ml){if(Ta==="all"){for(var Cl=ml.length-1;Cl>=0;Cl--){var wl=ml[Cl];Q(De,ea,wl.func,wl.options)}return}for(var Zl=kn(Xa),Dl=0;Dl<ml.length;Dl++){var jl=ml[Dl];if(jl.func===Ta&&Tn(jl.options,Zl)){De.removeEventListener(ea,Ta,O.supportsOptions?Zl:Zl.capture),ml.splice(Dl,1),ml.length===0&&(delete al.events[ea],bl=!0);break}}}bl&&!Object.keys(al.events).length&&u.splice(Ga,1)}else for(ea in al.events)al.events.hasOwnProperty(ea)&&Q(De,ea,"all")}}function ge(De,ea){for(var Ta=kn(ea),Xa=new Ln(De),Ga=y[De.type],al=pe(De)[0],bl=al;g.element(bl);){for(var ml=0;ml<Ga.length;ml++){var Cl=Ga[ml],wl=Cl.selector,Zl=Cl.context;if(ve(bl,wl)&&ue(Zl,al)&&ue(Zl,bl)){var Dl=Cl.listeners;Xa.currentTarget=bl;for(var jl=0;jl<Dl.length;jl++){var kr=Dl[jl];Tn(kr.options,Ta)&&kr.func(Xa)}}}bl=Pe(bl)}}function je(De){return ge(De,!0)}return(i=o.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return O.supportsOptions=!0},get passive(){return O.supportsPassive=!0}}),o.events=O,O}},Qr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(o){for(var i=0,u=Qr.methodOrder;i<u.length;i++){var y=u[i],x=Qr[y](o);if(x)return x}return null},simulationResume:function(o){var i=o.pointerType,u=o.eventType,y=o.eventTarget,x=o.scope;if(!/down|start/i.test(u))return null;for(var O=0,J=x.interactions.list;O<J.length;O++){var Q=J[O],ge=y;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;ge;){if(ge===Q.element)return Q;ge=Pe(ge)}}return null},mouseOrPen:function(o){var i,u=o.pointerId,y=o.pointerType,x=o.eventType,O=o.scope;if(y!=="mouse"&&y!=="pen")return null;for(var J=0,Q=O.interactions.list;J<Q.length;J++){var ge=Q[J];if(ge.pointerType===y){if(ge.simulation&&!An(ge,u))continue;if(ge.interacting())return ge;i||(i=ge)}}if(i)return i;for(var je=0,De=O.interactions.list;je<De.length;je++){var ea=De[je];if(!(ea.pointerType!==y||/down/i.test(x)&&ea.simulation))return ea}return null},hasPointer:function(o){for(var i=o.pointerId,u=0,y=o.scope.interactions.list;u<y.length;u++){var x=y[u];if(An(x,i))return x}return null},idle:function(o){for(var i=o.pointerType,u=0,y=o.scope.interactions.list;u<y.length;u++){var x=y[u];if(x.pointers.length===1){var O=x.interactable;if(O&&(!O.options.gesture||!O.options.gesture.enabled))continue}else if(x.pointers.length>=2)continue;if(!x.interacting()&&i===x.pointerType)return x}return null}};function An(o,i){return o.pointers.some(function(u){return u.id===i})}var Wn=Qr,$r=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Kn(o,i){return function(u){var y=i.interactions.list,x=ra(u),O=pe(u),J=O[0],Q=O[1],ge=[];if(/^touch/.test(u.type)){i.prevTouchTime=i.now();for(var je=0,De=u.changedTouches;je<De.length;je++){var ea=De[je],Ta={pointer:ea,pointerId:te(ea),pointerType:x,eventType:u.type,eventTarget:J,curEventTarget:Q,scope:i},Xa=fn(Ta);ge.push([Ta.pointer,Ta.eventTarget,Ta.curEventTarget,Xa])}}else{var Ga=!1;if(!ee.supportsPointerEvent&&/mouse/.test(u.type)){for(var al=0;al<y.length&&!Ga;al++)Ga=y[al].pointerType!=="mouse"&&y[al].pointerIsDown;Ga=Ga||i.now()-i.prevTouchTime<500||u.timeStamp===0}if(!Ga){var bl={pointer:u,pointerId:te(u),pointerType:x,eventType:u.type,curEventTarget:Q,eventTarget:J,scope:i},ml=fn(bl);ge.push([bl.pointer,bl.eventTarget,bl.curEventTarget,ml])}}for(var Cl=0;Cl<ge.length;Cl++){var wl=ge[Cl],Zl=wl[0],Dl=wl[1],jl=wl[2];wl[3][o](Zl,u,Dl,jl)}}}function fn(o){var i=o.pointerType,u=o.scope,y={interaction:Wn.search(o),searchDetails:o};return u.fire("interactions:find",y),y.interaction||u.interactions.new({pointerType:i})}function Bi(o,i){var u=o.doc,y=o.scope,x=o.options,O=y.interactions.docEvents,J=y.events,Q=J[i];for(var ge in y.browser.isIOS&&!x.events&&(x.events={passive:!1}),J.delegatedEvents)Q(u,ge,J.delegateListener),Q(u,ge,J.delegateUseCapture,!0);for(var je=x&&x.events,De=0;De<O.length;De++){var ea=O[De];Q(u,ea.type,ea.listener,je)}}var Lo={id:"core/interactions",install:function(o){for(var i={},u=0;u<$r.length;u++){var y=$r[u];i[y]=Kn(y,o)}var x,O=ee.pEventTypes;function J(){for(var Q=0,ge=o.interactions.list;Q<ge.length;Q++){var je=ge[Q];if(je.pointerIsDown&&je.pointerType==="touch"&&!je._interacting)for(var De=function(){var Xa=Ta[ea];o.documents.some(function(Ga){return ue(Ga.doc,Xa.downTarget)})||je.removePointer(Xa.pointer,Xa.event)},ea=0,Ta=je.pointers;ea<Ta.length;ea++)De()}}(x=V.PointerEvent?[{type:O.down,listener:J},{type:O.down,listener:i.pointerDown},{type:O.move,listener:i.pointerMove},{type:O.up,listener:i.pointerUp},{type:O.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:J},{type:"touchstart",listener:i.pointerDown},{type:"touchmove",listener:i.pointerMove},{type:"touchend",listener:i.pointerUp},{type:"touchcancel",listener:i.pointerUp}]).push({type:"blur",listener:function(Q){for(var ge=0,je=o.interactions.list;ge<je.length;ge++)je[ge].documentBlur(Q)}}),o.prevTouchTime=0,o.Interaction=function(Q){m(je,Q);var ge=F(je);function je(){return s(this,je),ge.apply(this,arguments)}return p(je,[{key:"pointerMoveTolerance",get:function(){return o.interactions.pointerMoveTolerance},set:function(De){o.interactions.pointerMoveTolerance=De}},{key:"_now",value:function(){return o.now()}}]),je}(pn),o.interactions={list:[],new:function(Q){Q.scopeFire=function(je,De){return o.fire(je,De)};var ge=new o.Interaction(Q);return o.interactions.list.push(ge),ge},listeners:i,docEvents:x,pointerMoveTolerance:1},o.usePlugin(ar)},listeners:{"scope:add-document":function(o){return Bi(o,"add")},"scope:remove-document":function(o){return Bi(o,"remove")},"interactable:unset":function(o,i){for(var u=o.interactable,y=i.interactions.list.length-1;y>=0;y--){var x=i.interactions.list[y];x.interactable===u&&(x.stop(),i.fire("interactions:destroy",{interaction:x}),x.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(y,1))}}},onDocSignal:Bi,doOnInteractions:Kn,methodNames:$r},$o=Lo,En=function(o){return o[o.On=0]="On",o[o.Off=1]="Off",o}(En||{}),Ro=function(){function o(i,u,y,x){s(this,o),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new qn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=u.actions,this.target=i,this._context=u.context||y,this._win=S(Na(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=x,this.set(u)}return p(o,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,u){return g.func(u.onstart)&&this.on("".concat(i,"start"),u.onstart),g.func(u.onmove)&&this.on("".concat(i,"move"),u.onmove),g.func(u.onend)&&this.on("".concat(i,"end"),u.onend),g.func(u.oninertiastart)&&this.on("".concat(i,"inertiastart"),u.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,u,y){var x,O=this,J=(x=this._actions.map[i])==null?void 0:x.filterEventType,Q=function(ge){return(J==null||J(ge))&&Pr(ge,O._actions)};(g.array(u)||g.object(u))&&this._onOff(En.Off,i,u,void 0,Q),(g.array(y)||g.object(y))&&this._onOff(En.On,i,y,void 0,Q)}},{key:"setPerAction",value:function(i,u){var y=this._defaults;for(var x in u){var O=x,J=this.options[i],Q=u[O];O==="listeners"&&this.updatePerActionListeners(i,J.listeners,Q),g.array(Q)?J[O]=ze(Q):g.plainObject(Q)?(J[O]=ae(J[O]||{},Tr(Q)),g.object(y.perAction[O])&&"enabled"in y.perAction[O]&&(J[O].enabled=Q.enabled!==!1)):g.bool(Q)&&g.object(y.perAction[O])?J[O].enabled=Q:J[O]=Q}}},{key:"getRect",value:function(i){return i=i||(g.element(this.target)?this.target:null),g.string(this.target)&&(i=i||this._context.querySelector(this.target)),Fe(i)}},{key:"rectChecker",value:function(i){var u=this;return g.func(i)?(this.getRect=function(y){var x=ae({},i.apply(u,y));return"width"in x||(x.width=x.right-x.left,x.height=x.bottom-x.top),x},this):i===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(i,u){if(Na(u)||g.object(u)){for(var y in this.options[i]=u,this._actions.map)this.options[y][i]=u;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return g.string(i)?Array.from(this._context.querySelectorAll(i)):g.func(i)&&i.getAllElements?i.getAllElements():g.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||ue(this._context,i)}},{key:"testIgnoreAllow",value:function(i,u,y){return!this.testIgnore(i.ignoreFrom,u,y)&&this.testAllow(i.allowFrom,u,y)}},{key:"testAllow",value:function(i,u,y){return!i||!!g.element(y)&&(g.string(i)?W(y,i,u):!!g.element(i)&&ue(i,y))}},{key:"testIgnore",value:function(i,u,y){return!(!i||!g.element(y))&&(g.string(i)?W(y,i,u):!!g.element(i)&&ue(i,y))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,u,y,x,O){g.object(u)&&!g.array(u)&&(x=y,y=null);var J=Ue(u,y,O);for(var Q in J){Q==="wheel"&&(Q=ee.wheelEvent);for(var ge=0,je=J[Q];ge<je.length;ge++){var De=je[ge];Pr(Q,this._actions)?this.events[i===En.On?"on":"off"](Q,De):g.string(this.target)?this._scopeEvents[i===En.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,De,x):this._scopeEvents[i===En.On?"add":"remove"](this.target,Q,De,x)}}return this}},{key:"on",value:function(i,u,y){return this._onOff(En.On,i,u,y)}},{key:"off",value:function(i,u,y){return this._onOff(En.Off,i,u,y)}},{key:"set",value:function(i){var u=this._defaults;for(var y in g.object(i)||(i={}),this.options=Tr(u.base),this._actions.methodDict){var x=y,O=this._actions.methodDict[x];this.options[x]={},this.setPerAction(x,ae(ae({},u.perAction),u.actions[x])),this[O](i[x])}for(var J in i)J!=="getRect"?g.func(this[J])&&this[J](i[J]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var u=this._scopeEvents.delegatedEvents[i],y=u.length-1;y>=0;y--){var x=u[y],O=x.selector,J=x.context,Q=x.listeners;O===this.target&&J===this._context&&u.splice(y,1);for(var ge=Q.length-1;ge>=0;ge--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[ge][0],Q[ge][1])}else this._scopeEvents.remove(this.target,"all")}}]),o}(),Vo=function(){function o(i){var u=this;s(this,o),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(y){var x=y.interactable,O=x.target,J=g.string(O)?u.selectorMap[O]:O[u.scope.id],Q=_e(J,function(ge){return ge===x});J.splice(Q,1)}})}return p(o,[{key:"new",value:function(i,u){u=ae(u||{},{actions:this.scope.actions});var y=new this.scope.Interactable(i,u,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),g.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(y)):(y.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:i,options:u,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(i,u){var y=u&&u.context||this.scope.document,x=g.string(i),O=x?this.selectorMap[i]:i[this.scope.id];if(O)return la(O,function(J){return J._context===y&&(x||J.inContext(i))})}},{key:"forEachMatch",value:function(i,u){for(var y=0,x=this.list;y<x.length;y++){var O=x[y],J=void 0;if((g.string(O.target)?g.element(i)&&ve(i,O.target):i===O.target)&&O.inContext(i)&&(J=u(O)),J!==void 0)return J}}}]),o}(),Fo=function(){function o(){var i=this;s(this,o),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ee,this.defaults=Tr(cr),this.Eventable=qn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var x=function O(J,Q){var ge=y.interactables.getExisting(J,Q);return ge||((ge=y.interactables.new(J,Q)).events.global=O.globalEvents),ge};return x.getPointerAverage=We,x.getTouchBBox=Aa,x.getTouchDistance=Da,x.getTouchAngle=Ze,x.getElementRect=Fe,x.getElementClientRect=Le,x.matchesSelector=ve,x.closest=Ce,x.globalEvents={},x.version="1.10.27",x.scope=y,x.use=function(O,J){return this.scope.usePlugin(O,J),this},x.isSet=function(O,J){return!!this.scope.interactables.get(O,J&&J.context)},x.on=ma(function(O,J,Q){if(g.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),g.array(O)){for(var ge=0,je=O;ge<je.length;ge++){var De=je[ge];this.on(De,J,Q)}return this}if(g.object(O)){for(var ea in O)this.on(ea,O[ea],J);return this}return Pr(O,this.scope.actions)?this.globalEvents[O]?this.globalEvents[O].push(J):this.globalEvents[O]=[J]:this.scope.events.add(this.scope.document,O,J,{options:Q}),this},"The interact.on() method is being deprecated"),x.off=ma(function(O,J,Q){if(g.string(O)&&O.search(" ")!==-1&&(O=O.trim().split(/ +/)),g.array(O)){for(var ge=0,je=O;ge<je.length;ge++){var De=je[ge];this.off(De,J,Q)}return this}if(g.object(O)){for(var ea in O)this.off(ea,O[ea],J);return this}var Ta;return Pr(O,this.scope.actions)?O in this.globalEvents&&(Ta=this.globalEvents[O].indexOf(J))!==-1&&this.globalEvents[O].splice(Ta,1):this.scope.events.remove(this.scope.document,O,J,Q),this},"The interact.off() method is being deprecated"),x.debug=function(){return this.scope},x.supportsTouch=function(){return ee.supportsTouch},x.supportsPointerEvent=function(){return ee.supportsPointerEvent},x.stop=function(){for(var O=0,J=this.scope.interactions.list;O<J.length;O++)J[O].stop();return this},x.pointerMoveTolerance=function(O){return g.number(O)?(this.scope.interactions.pointerMoveTolerance=O,this):this.scope.interactions.pointerMoveTolerance},x.addDocument=function(O,J){this.scope.addDocument(O,J)},x.removeDocument=function(O){this.scope.removeDocument(O)},x}(this),this.InteractEvent=yn,this.Interactable=void 0,this.interactables=new Vo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return i.removeDocument(y.target)};var u=this;this.Interactable=function(y){m(O,y);var x=F(O);function O(){return s(this,O),x.apply(this,arguments)}return p(O,[{key:"_defaults",get:function(){return u.defaults}},{key:"set",value:function(J){return _(k(O.prototype),"set",this).call(this,J),u.fire("interactable:set",{options:J,interactable:this}),this}},{key:"unset",value:function(){_(k(O.prototype),"unset",this).call(this);var J=u.interactables.list.indexOf(this);J<0||(u.interactables.list.splice(J,1),u.fire("interactable:unset",{interactable:this}))}}]),O}(Ro)}return p(o,[{key:"addListeners",value:function(i,u){this.listenerMaps.push({id:u,map:i})}},{key:"fire",value:function(i,u){for(var y=0,x=this.listenerMaps;y<x.length;y++){var O=x[y].map[i];if(O&&O(u,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(u,y){return u.isInitialized=!0,g.window(y)&&E(y),V.init(y),ee.init(y),La.init(y),u.window=y,u.document=y.document,u.usePlugin($o),u.usePlugin($n),u}(this,i)}},{key:"pluginIsInstalled",value:function(i){var u=i.id;return u?!!this._plugins.map[u]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,u){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,u),i.listeners&&i.before){for(var y=0,x=this.listenerMaps.length,O=i.before.reduce(function(Q,ge){return Q[ge]=!0,Q[Ti(ge)]=!0,Q},{});y<x;y++){var J=this.listenerMaps[y].id;if(J&&(O[J]||O[Ti(J)]))break}this.listenerMaps.splice(y,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,u){if(this.getDocIndex(i)!==-1)return!1;var y=S(i);u=u?ae({},u):{},this.documents.push({doc:i,options:u}),this.events.documents.push(i),i!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:y,scope:this,options:u})}},{key:"removeDocument",value:function(i){var u=this.getDocIndex(i),y=S(i),x=this.documents[u].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(u,1),this.events.documents.splice(u,1),this.fire("scope:remove-document",{doc:i,window:y,scope:this,options:x})}},{key:"getDocIndex",value:function(i){for(var u=0;u<this.documents.length;u++)if(this.documents[u].doc===i)return u;return-1}},{key:"getDocOptions",value:function(i){var u=this.getDocIndex(i);return u===-1?null:this.documents[u].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),o}();function Ti(o){return o&&o.replace(/\/.*$/,"")}var Gi=new Fo,Hr=Gi.interactStatic,Po=typeof globalThis<"u"?globalThis:window;Gi.init(Po);var jo=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(o){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var x=y[0],O=y[1];return x in o||O in o}),u=function(y,x){for(var O=o.range,J=o.limits,Q=J===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:J,ge=o.offset,je=ge===void 0?{x:0,y:0}:ge,De={range:O,grid:o,x:null,y:null},ea=0;ea<i.length;ea++){var Ta=i[ea],Xa=Ta[0],Ga=Ta[1],al=Math.round((y-je.x)/o[Xa]),bl=Math.round((x-je.y)/o[Ga]);De[Xa]=Math.max(Q.left,Math.min(Q.right,al*o[Xa]+je.x)),De[Ga]=Math.max(Q.top,Math.min(Q.bottom,bl*o[Ga]+je.y))}return De};return u.grid=o,u.coordFields=i,u}}),Ai={id:"snappers",install:function(o){var i=o.interactStatic;i.snappers=ae(i.snappers||{},jo),i.createSnapGrid=i.snappers.grid}},Ho=Ai,zi={start:function(o){var i=o.state,u=o.rect,y=o.edges,x=o.pageCoords,O=i.options,J=O.ratio,Q=O.enabled,ge=i.options,je=ge.equalDelta,De=ge.modifiers;J==="preserve"&&(J=u.width/u.height),i.startCoords=ae({},x),i.startRect=ae({},u),i.ratio=J,i.equalDelta=je;var ea=i.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(i.xIsPrimaryAxis=!(!y.left&&!y.right),i.equalDelta){var Ta=(ea.left?1:-1)*(ea.top?1:-1);i.edgeSign={x:Ta,y:Ta}}else i.edgeSign={x:ea.left?-1:1,y:ea.top?-1:1};if(Q!==!1&&ae(y,ea),De!=null&&De.length){var Xa=new jr(o.interaction);Xa.copyFrom(o.interaction.modification),Xa.prepareStates(De),i.subModification=Xa,Xa.startAll(n({},o))}},set:function(o){var i=o.state,u=o.rect,y=o.coords,x=i.linkedEdges,O=ae({},y),J=i.equalDelta?Yi:Ji;if(ae(o.edges,x),J(i,i.xIsPrimaryAxis,y,u),!i.subModification)return null;var Q=ae({},u);ie(x,Q,{x:y.x-O.x,y:y.y-O.y});var ge=i.subModification.setAll(n(n({},o),{},{rect:Q,edges:x,pageCoords:y,prevCoords:y,prevRect:Q})),je=ge.delta;return ge.changed&&(J(i,Math.abs(je.x)>Math.abs(je.y),ge.coords,ge.rect),ae(y,ge.coords)),ge.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Yi(o,i,u){var y=o.startCoords,x=o.edgeSign;i?u.y=y.y+(u.x-y.x)*x.y:u.x=y.x+(u.y-y.y)*x.x}function Ji(o,i,u,y){var x=o.startRect,O=o.startCoords,J=o.ratio,Q=o.edgeSign;if(i){var ge=y.width/J;u.y=O.y+(ge-x.height)*Q.y}else{var je=y.height*J;u.x=O.x+(je-x.width)*Q.x}}var Uo=Er(zi,"aspectRatio"),Xi=function(){};Xi._defaults={};var si=Xi;function nn(o,i,u){return g.func(o)?oe(o,i.interactable,i.element,[u.x,u.y,i]):oe(o,i.interactable,i.element)}var Gn={start:function(o){var i=o.rect,u=o.startOffset,y=o.state,x=o.interaction,O=o.pageCoords,J=y.options,Q=J.elementRect,ge=ae({left:0,top:0,right:0,bottom:0},J.offset||{});if(i&&Q){var je=nn(J.restriction,x,O);if(je){var De=je.right-je.left-i.width,ea=je.bottom-je.top-i.height;De<0&&(ge.left+=De,ge.right+=De),ea<0&&(ge.top+=ea,ge.bottom+=ea)}ge.left+=u.left-i.width*Q.left,ge.top+=u.top-i.height*Q.top,ge.right+=u.right-i.width*(1-Q.right),ge.bottom+=u.bottom-i.height*(1-Q.bottom)}y.offset=ge},set:function(o){var i=o.coords,u=o.interaction,y=o.state,x=y.options,O=y.offset,J=nn(x.restriction,u,i);if(J){var Q=function(ge){return!ge||"left"in ge&&"top"in ge||((ge=ae({},ge)).left=ge.x||0,ge.top=ge.y||0,ge.right=ge.right||ge.left+ge.width,ge.bottom=ge.bottom||ge.top+ge.height),ge}(J);i.x=Math.max(Math.min(Q.right-O.right,i.x),Q.left+O.left),i.y=Math.max(Math.min(Q.bottom-O.bottom,i.y),Q.top+O.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Mi=Er(Gn,"restrict"),Zi={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Qi={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function eo(o,i){for(var u=0,y=["top","left","bottom","right"];u<y.length;u++){var x=y[u];x in o||(o[x]=i[x])}return o}var Yn={noInner:Zi,noOuter:Qi,start:function(o){var i,u=o.interaction,y=o.startOffset,x=o.state,O=x.options;O&&(i=ca(nn(O.offset,u,u.coords.start.page))),i=i||{x:0,y:0},x.offset={top:i.y+y.top,left:i.x+y.left,bottom:i.y-y.bottom,right:i.x-y.right}},set:function(o){var i=o.coords,u=o.edges,y=o.interaction,x=o.state,O=x.offset,J=x.options;if(u){var Q=ae({},i),ge=nn(J.inner,y,Q)||{},je=nn(J.outer,y,Q)||{};eo(ge,Zi),eo(je,Qi),u.top?i.y=Math.min(Math.max(je.top+O.top,Q.y),ge.top+O.top):u.bottom&&(i.y=Math.max(Math.min(je.bottom+O.bottom,Q.y),ge.bottom+O.bottom)),u.left?i.x=Math.min(Math.max(je.left+O.left,Q.x),ge.left+O.left):u.right&&(i.x=Math.max(Math.min(je.right+O.right,Q.x),ge.right+O.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ao=Er(Yn,"restrictEdges"),Jn=ae({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(o){}},Gn.defaults),lo=Er({start:Gn.start,set:Gn.set,defaults:Jn},"restrictRect"),ro={width:-1/0,height:-1/0},Xn={width:1/0,height:1/0},qo=Er({start:function(o){return Yn.start(o)},set:function(o){var i=o.interaction,u=o.state,y=o.rect,x=o.edges,O=u.options;if(x){var J=Ee(nn(O.min,i,o.coords))||ro,Q=Ee(nn(O.max,i,o.coords))||Xn;u.options={endOnly:O.endOnly,inner:ae({},Yn.noInner),outer:ae({},Yn.noOuter)},x.top?(u.options.inner.top=y.bottom-J.height,u.options.outer.top=y.bottom-Q.height):x.bottom&&(u.options.inner.bottom=y.top+J.height,u.options.outer.bottom=y.top+Q.height),x.left?(u.options.inner.left=y.right-J.width,u.options.outer.left=y.right-Q.width):x.right&&(u.options.inner.right=y.left+J.width,u.options.outer.right=y.left+Q.width),Yn.set(o),u.options=O}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ci={start:function(o){var i,u=o.interaction,y=o.interactable,x=o.element,O=o.rect,J=o.state,Q=o.startOffset,ge=J.options,je=ge.offsetWithOrigin?function(Ta){var Xa=Ta.interaction.element,Ga=ca(oe(Ta.state.options.origin,null,null,[Xa])),al=Ga||Be(Ta.interactable,Xa,Ta.interaction.prepared.name);return al}(o):{x:0,y:0};if(ge.offset==="startCoords")i={x:u.coords.start.page.x,y:u.coords.start.page.y};else{var De=oe(ge.offset,y,x,[u]);(i=ca(De)||{x:0,y:0}).x+=je.x,i.y+=je.y}var ea=ge.relativePoints;J.offsets=O&&ea&&ea.length?ea.map(function(Ta,Xa){return{index:Xa,relativePoint:Ta,x:Q.left-O.width*Ta.x+i.x,y:Q.top-O.height*Ta.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(o){var i=o.interaction,u=o.coords,y=o.state,x=y.options,O=y.offsets,J=Be(i.interactable,i.element,i.prepared.name),Q=ae({},u),ge=[];x.offsetWithOrigin||(Q.x-=J.x,Q.y-=J.y);for(var je=0,De=O;je<De.length;je++)for(var ea=De[je],Ta=Q.x-ea.x,Xa=Q.y-ea.y,Ga=0,al=x.targets.length;Ga<al;Ga++){var bl=x.targets[Ga],ml=void 0;(ml=g.func(bl)?bl(Ta,Xa,i._proxy,ea,Ga):bl)&&ge.push({x:(g.number(ml.x)?ml.x:Ta)+ea.x,y:(g.number(ml.y)?ml.y:Xa)+ea.y,range:g.number(ml.range)?ml.range:x.range,source:bl,index:Ga,offset:ea})}for(var Cl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},wl=0;wl<ge.length;wl++){var Zl=ge[wl],Dl=Zl.range,jl=Zl.x-Q.x,kr=Zl.y-Q.y,Sr=Ja(jl,kr),Gr=Sr<=Dl;Dl===1/0&&Cl.inRange&&Cl.range!==1/0&&(Gr=!1),Cl.target&&!(Gr?Cl.inRange&&Dl!==1/0?Sr/Dl<Cl.distance/Cl.range:Dl===1/0&&Cl.range!==1/0||Sr<Cl.distance:!Cl.inRange&&Sr<Cl.distance)||(Cl.target=Zl,Cl.distance=Sr,Cl.range=Dl,Cl.inRange=Gr,Cl.delta.x=jl,Cl.delta.y=kr)}return Cl.inRange&&(u.x=Cl.target.x,u.y=Cl.target.y),y.closest=Cl,Cl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Zn=Er(ci,"snap"),ui={start:function(o){var i=o.state,u=o.edges,y=i.options;if(!u)return null;o.state={options:{targets:null,relativePoints:[{x:u.left?0:1,y:u.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],ci.start(o),i.offsets=o.state.offsets,o.state=i},set:function(o){var i=o.interaction,u=o.state,y=o.coords,x=u.options,O=u.offsets,J={x:y.x-O[0].x,y:y.y-O[0].y};u.options=ae({},x),u.options.targets=[];for(var Q=0,ge=x.targets||[];Q<ge.length;Q++){var je=ge[Q],De=void 0;if(De=g.func(je)?je(J.x,J.y,i):je){for(var ea=0,Ta=u.targetFields;ea<Ta.length;ea++){var Xa=Ta[ea],Ga=Xa[0],al=Xa[1];if(Ga in De||al in De){De.x=De[Ga],De.y=De[al];break}}u.options.targets.push(De)}}var bl=ci.set(o);return u.options=x,bl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Wo=Er(ui,"snapSize"),Ii={aspectRatio:Uo,restrictEdges:ao,restrict:Mi,restrictRect:lo,restrictSize:qo,snapEdges:Er({start:function(o){var i=o.edges;return i?(o.state.targetFields=o.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],ui.start(o)):null},set:ui.set,defaults:ae(Tr(ui.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Zn,snapSize:Wo,spring:si,avoid:si,transform:si,rubberband:si},Ko={id:"modifiers",install:function(o){var i=o.interactStatic;for(var u in o.usePlugin(Nr),o.usePlugin(Ho),i.modifiers=Ii,Ii){var y=Ii[u],x=y._defaults,O=y._methods;x._methods=O,o.defaults.perAction[u]=x}}},Go=Ko,no=function(o){m(u,o);var i=F(u);function u(y,x,O,J,Q,ge){var je;if(s(this,u),H(D(je=i.call(this,Q)),O),O!==x&&H(D(je),x),je.timeStamp=ge,je.originalEvent=O,je.type=y,je.pointerId=te(x),je.pointerType=ra(x),je.target=J,je.currentTarget=null,y==="tap"){var De=Q.getPointerIndex(x);je.dt=je.timeStamp-Q.pointers[De].downTime;var ea=je.timeStamp-Q.tapTime;je.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===je.target&&ea<500}else y==="doubletap"&&(je.dt=x.timeStamp-Q.tapTime,je.double=!0);return je}return p(u,[{key:"_subtractOrigin",value:function(y){var x=y.x,O=y.y;return this.pageX-=x,this.pageY-=O,this.clientX-=x,this.clientY-=O,this}},{key:"_addOrigin",value:function(y){var x=y.x,O=y.y;return this.pageX+=x,this.pageY+=O,this.clientX+=x,this.clientY+=O,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),u}(U),Qn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(o){o.pointerEvents=Qn,o.defaults.actions.pointerEvents=Qn.defaults,ae(o.actions.phaselessTypes,Qn.types)},listeners:{"interactions:new":function(o){var i=o.interaction;i.prevTap=null,i.tapTime=0},"interactions:update-pointer":function(o){var i=o.down,u=o.pointerInfo;!i&&u.hold||(u.hold={duration:1/0,timeout:null})},"interactions:move":function(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget;o.duplicate||u.pointerIsDown&&!u.pointerWasMoved||(u.pointerIsDown&&Oi(o),xn({interaction:u,pointer:y,event:x,eventTarget:O,type:"move"},i))},"interactions:down":function(o,i){(function(u,y){for(var x=u.interaction,O=u.pointer,J=u.event,Q=u.eventTarget,ge=u.pointerIndex,je=x.pointers[ge].hold,De=aa(Q),ea={interaction:x,pointer:O,event:J,eventTarget:Q,type:"hold",targets:[],path:De,node:null},Ta=0;Ta<De.length;Ta++){var Xa=De[Ta];ea.node=Xa,y.fire("pointerEvents:collect-targets",ea)}if(ea.targets.length){for(var Ga=1/0,al=0,bl=ea.targets;al<bl.length;al++){var ml=bl[al].eventable.options.holdDuration;ml<Ga&&(Ga=ml)}je.duration=Ga,je.timeout=setTimeout(function(){xn({interaction:x,eventTarget:Q,pointer:O,event:J,type:"hold"},y)},Ga)}})(o,i),xn(o,i)},"interactions:up":function(o,i){Oi(o),xn(o,i),function(u,y){var x=u.interaction,O=u.pointer,J=u.event,Q=u.eventTarget;x.pointerWasMoved||xn({interaction:x,eventTarget:Q,pointer:O,event:J,type:"tap"},y)}(o,i)},"interactions:cancel":function(o,i){Oi(o),xn(o,i)}},PointerEvent:no,fire:xn,collectEventTargets:io,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 xn(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget,J=o.type,Q=o.targets,ge=Q===void 0?io(o,i):Q,je=new no(J,y,x,O,u,i.now());i.fire("pointerEvents:new",{pointerEvent:je});for(var De={interaction:u,pointer:y,event:x,eventTarget:O,targets:ge,type:J,pointerEvent:je},ea=0;ea<ge.length;ea++){var Ta=ge[ea];for(var Xa in Ta.props||{})je[Xa]=Ta.props[Xa];var Ga=Be(Ta.eventable,Ta.node);if(je._subtractOrigin(Ga),je.eventable=Ta.eventable,je.currentTarget=Ta.node,Ta.eventable.fire(je),je._addOrigin(Ga),je.immediatePropagationStopped||je.propagationStopped&&ea+1<ge.length&&ge[ea+1].node!==je.currentTarget)break}if(i.fire("pointerEvents:fired",De),J==="tap"){var al=je.double?xn({interaction:u,pointer:y,event:x,eventTarget:O,type:"doubletap"},i):je;u.prevTap=al,u.tapTime=al.timeStamp}return je}function io(o,i){var u=o.interaction,y=o.pointer,x=o.event,O=o.eventTarget,J=o.type,Q=u.getPointerIndex(y),ge=u.pointers[Q];if(J==="tap"&&(u.pointerWasMoved||!ge||ge.downTarget!==O))return[];for(var je=aa(O),De={interaction:u,pointer:y,event:x,eventTarget:O,type:J,path:je,targets:[],node:null},ea=0;ea<je.length;ea++){var Ta=je[ea];De.node=Ta,i.fire("pointerEvents:collect-targets",De)}return J==="hold"&&(De.targets=De.targets.filter(function(Xa){var Ga,al;return Xa.eventable.options.holdDuration===((Ga=u.pointers[Q])==null||(al=Ga.hold)==null?void 0:al.duration)})),De.targets}function Oi(o){var i=o.interaction,u=o.pointerIndex,y=i.pointers[u].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var Yo=Object.freeze({__proto__:null,default:Qn});function Jo(o){var i=o.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var di={id:"pointer-events/holdRepeat",install:function(o){o.usePlugin(Qn);var i=o.pointerEvents;i.defaults.holdRepeatInterval=0,i.types.holdrepeat=o.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(o,i){return o["pointerEvents:".concat(i)]=Jo,o},{"pointerEvents:new":function(o){var i=o.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(o,i){var u=o.interaction,y=o.pointerEvent,x=o.eventTarget,O=o.targets;if(y.type==="hold"&&O.length){var J=O[0].eventable.options.holdRepeatInterval;J<=0||(u.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:u,eventTarget:x,type:"hold",pointer:y,event:y},i)},J))}}})},Xo=di,Zo={id:"pointer-events/interactableTargets",install:function(o){var i=o.Interactable;i.prototype.pointerEvents=function(y){return ae(this.events.options,y),this};var u=i.prototype._backCompatOption;i.prototype._backCompatOption=function(y,x){var O=u.call(this,y,x);return O===this&&(this.events.options[y]=x),O}},listeners:{"pointerEvents:collect-targets":function(o,i){var u=o.targets,y=o.node,x=o.type,O=o.eventTarget;i.interactables.forEachMatch(y,function(J){var Q=J.events,ge=Q.options;Q.types[x]&&Q.types[x].length&&J.testIgnoreAllow(ge,y,O)&&u.push({node:y,eventable:Q,props:{interactable:J}})})},"interactable:new":function(o){var i=o.interactable;i.events.getRect=function(u){return i.getRect(u)}},"interactable:set":function(o,i){var u=o.interactable,y=o.options;ae(u.events.options,i.pointerEvents.defaults),ae(u.events.options,y.pointerEvents||{})}}},Qo=Zo,et={id:"pointer-events",install:function(o){o.usePlugin(Yo),o.usePlugin(Xo),o.usePlugin(Qo)}},oo=et,pi={id:"reflow",install:function(o){var i=o.Interactable;o.actions.phases.reflow=!0,i.prototype.reflow=function(u){return function(y,x,O){for(var J=y.getAllElements(),Q=O.window.Promise,ge=Q?[]:null,je=function(){var ea=J[De],Ta=y.getRect(ea);if(!Ta)return 1;var Xa,Ga=la(O.interactions.list,function(ml){return ml.interacting()&&ml.interactable===y&&ml.element===ea&&ml.prepared.name===x.name});if(Ga)Ga.move(),ge&&(Xa=Ga._reflowPromise||new Q(function(ml){Ga._reflowResolve=ml}));else{var al=Ee(Ta),bl=function(ml){return{coords:ml,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:al.x,y:al.y},client:{x:al.x,y:al.y},timeStamp:O.now()});Xa=function(ml,Cl,wl,Zl,Dl){var jl=ml.interactions.new({pointerType:"reflow"}),kr={interaction:jl,event:Dl,pointer:Dl,eventTarget:wl,phase:"reflow"};jl.interactable=Cl,jl.element=wl,jl.prevEvent=Dl,jl.updatePointer(Dl,Dl,wl,!0),me(jl.coords.delta),ya(jl.prepared,Zl),jl._doPhase(kr);var Sr=ml.window,Gr=Sr.Promise,on=Gr?new Gr(function(wn){jl._reflowResolve=wn}):void 0;return jl._reflowPromise=on,jl.start(Zl,Cl,wl),jl._interacting?(jl.move(kr),jl.end(Dl)):(jl.stop(),jl._reflowResolve()),jl.removePointer(Dl,Dl),on}(O,y,ea,x,bl)}ge&&ge.push(Xa)},De=0;De<J.length&&!je();De++);return ge&&Q.all(ge).then(function(){return y})}(this,u,o)}},listeners:{"interactions:stop":function(o,i){var u=o.interaction;u.pointerType==="reflow"&&(u._reflowResolve&&u._reflowResolve(),function(y,x){y.splice(y.indexOf(x),1)}(i.interactions.list,u))}}},at=pi;if(Hr.use(ar),Hr.use(Rl),Hr.use(oo),Hr.use(Bn),Hr.use(Go),Hr.use(pr),Hr.use(ga),Hr.use(de),Hr.use(at),Hr.default=Hr,t(a)==="object"&&a)try{a.exports=Hr}catch{}return Hr.default=Hr,Hr})}(Fi,Fi.exports)),Fi.exports}var v1=h1();const Ts=A.getDefaultExportFromCjs(v1),Mo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:r}){const n=a,t=r,s=e.inject(Fc),v=e.inject(Pc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const p=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let m=!1,k=!1,c=NaN,D=NaN,F=NaN,_=NaN,G=-1,M=-1,$=-1,j=-1,E=n.x,S=n.y,w=n.w,b=n.h;const g=e.ref(),R=e.reactive({i:e.toRef(n,"i"),state:f,wrapper:g,calcXY:oe});function I(fe){Ue(fe)}function Y(){oa()}function le(fe){cn(n.isDraggable)&&(f.draggable=fe)}function ye(fe){cn(n.isResizable)&&(f.resizable=fe)}function Te(fe){cn(n.isBounded)&&(f.bounded=fe)}function V(fe){f.transformScale=fe}function se(fe){f.rowHeight=fe}function ee(fe){f.maxRows=fe}function ue(){f.rtl=Ns()==="rtl",oa()}function Ce(fe){f.cols=Math.floor(fe)}s.increaseItem(R),e.onBeforeMount(()=>{f.rtl=Ns()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?f.cols=Wc(s.lastBreakpoint,s.cols):f.cols=s.colNum,f.rowHeight=s.rowHeight,f.containerWidth=s.width!==null?s.width:100,f.margin=s.margin!==void 0?s.margin.map(Number):[10,10],f.maxRows=s.maxRows,cn(n.isDraggable)?f.draggable=s.isDraggable:f.draggable=n.isDraggable,cn(n.isResizable)?f.resizable=s.isResizable:f.resizable=n.isResizable,cn(n.isBounded)?f.bounded=s.isBounded:f.bounded=n.isBounded,f.transformScale=s.transformScale,f.useCssTransforms=s.useCssTransforms,f.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=n.x,S=n.y,b=n.h,w=n.w,Yr(Fe)}),v.on("updateWidth",I),v.on("compact",Y),v.on("setDraggable",le),v.on("setResizable",ye),v.on("setBounded",Te),v.on("setTransformScale",V),v.on("setRowHeight",se),v.on("setMaxRows",ee),v.on("directionchange",ue),v.on("setColNum",Ce)}),e.onBeforeUnmount(()=>{v.off("updateWidth",I),v.off("compact",Y),v.off("setDraggable",le),v.off("setResizable",ye),v.off("setBounded",Te),v.off("setTransformScale",V),v.off("setRowHeight",se),v.off("setMaxRows",ee),v.off("directionchange",ue),v.off("setColNum",Ce),p.value&&(p.value.unset(),p.value=null),s.decreaseItem(R)}),l({state:f,wrapper:g});const Pe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ve=e.computed(()=>f.resizable&&!n.static),B=e.computed(()=>s.isMirrored?!f.rtl:f.rtl),ce=e.computed(()=>(f.draggable||f.resizable)&&!n.static),W=i1("item"),Se=e.computed(()=>({[W.b()]:!0,[W.bm("resizable")]:ve.value,[W.bm("static")]:n.static,[W.bm("resizing")]:f.isResizing,[W.bm("dragging")]:f.isDragging,[W.bm("transform")]:f.useCssTransforms,[W.bm("rtl")]:B.value,[W.bm("no-touch")]:Pe&&ce.value})),Le=e.computed(()=>[W.be("resizer"),B.value&&W.bem("resizer","rtl")].filter(Boolean));e.watch(()=>n.isDraggable,fe=>{f.draggable=fe}),e.watch(()=>n.static,()=>{Yr(H),Yr(me)}),e.watch(()=>f.draggable,()=>{Yr(H)}),e.watch(()=>n.isResizable,fe=>{f.resizable=fe}),e.watch(()=>n.isBounded,fe=>{f.bounded=fe}),e.watch(()=>f.resizable,()=>{Yr(me)}),e.watch(()=>f.rowHeight,()=>{Yr(Fe),Yr(aa)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{Yr(me),Yr(Fe),Yr(aa)}),e.watch([()=>n.minH,()=>n.maxH,()=>n.minW,()=>n.maxW],()=>{Yr(me)}),e.watch(B,()=>{Yr(me),Yr(Fe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const fe=s.margin;!fe||fe[0]===f.margin[0]&&fe[1]===f.margin[1]||(f.margin=fe.map(Number),Yr(Fe),Yr(aa))});function Fe(){n.x+n.w>f.cols?(E=0,w=n.w>f.cols?f.cols:n.w):(E=n.x,w=n.w);const fe=ta(E,S,w,b);f.isDragging&&(fe.top=f.dragging.top,B.value?fe.right=f.dragging.left:fe.left=f.dragging.left),f.isResizing&&(fe.width=f.resizing.width,fe.height=f.resizing.height);let da;f.useCssTransforms?B.value?da=a1(fe.top,fe.right,fe.width,fe.height):da=e1(fe.top,fe.left,fe.width,fe.height):B.value?da=r1(fe.top,fe.right,fe.width,fe.height):da=l1(fe.top,fe.left,fe.width,fe.height),f.style=da}function aa(){const fe={};for(const da of["width","height"]){const Qe=f.style[da].match(/^(\d+)px$/);if(!Qe)return;fe[da]=Qe[1]}t("container-resized",n.i,n.h,n.w,fe.height,fe.width)}function Na(fe){if(n.static)return;const da=fe.type;if(da==="resizestart"&&f.isResizing||da!=="resizestart"&&!f.isResizing)return;const Qe=Cs(fe);if(cn(Qe))return;const{x:te,y:pa}=Qe,Ne={width:0,height:0};let We;switch(da){case"resizestart":{me(),G=w,M=b,We=ta(E,S,w,b),Ne.width=We.width,Ne.height=We.height,f.resizing=Ne,f.isResizing=!0;break}case"resizemove":{!fe.edges.right&&!fe.edges.left&&(F=te),!fe.edges.top&&!fe.edges.bottom&&(_=pa);const Aa=Ds(F,_,te,pa);B.value?Ne.width=f.resizing.width-Aa.deltaX/f.transformScale:Ne.width=f.resizing.width+Aa.deltaX/f.transformScale,Ne.height=f.resizing.height+Aa.deltaY/f.transformScale,f.resizing=Ne;break}case"resizeend":{We=ta(E,S,w,b),Ne.width=We.width,Ne.height=We.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}We=Be(Ne.height,Ne.width),We.w<n.minW&&(We.w=n.minW),We.w>n.maxW&&(We.w=n.maxW),We.h<n.minH&&(We.h=n.minH),We.h>n.maxH&&(We.h=n.maxH),We.h<1&&(We.h=1),We.w<1&&(We.w=1),F=te,_=pa,(w!==We.w||b!==We.h)&&t("resize",n.i,We.h,We.w,Ne.height,Ne.width),fe.type==="resizeend"&&(G!==w||M!==b)&&t("resized",n.i,We.h,We.w,Ne.height,Ne.width),v.emit("resizeEvent",fe.type,n.i,E,S,We.h,We.w)}function ae(fe){if(n.static||f.isResizing)return;const da=fe.type;if(da==="dragstart"&&f.isDragging||da!=="dragstart"&&!f.isDragging)return;const Qe=Cs(fe);if(cn(Qe))return;const{x:te,y:pa}=Qe,Ne=fe.target;if(!Ne.offsetParent)return;const We={top:0,left:0};switch(da){case"dragstart":{$=E,j=S;const Da=Ne.offsetParent.getBoundingClientRect(),Ze=Ne.getBoundingClientRect(),ra=Ze.left/f.transformScale,pe=Da.left/f.transformScale,U=Ze.right/f.transformScale,q=Da.right/f.transformScale,ze=Ze.top/f.transformScale,_e=Da.top/f.transformScale;B.value?We.left=(U-q)*-1:We.left=ra-pe,We.top=ze-_e,f.dragging=We,f.isDragging=!0;break}case"dragmove":{const Da=Ds(c,D,te,pa);if(B.value?We.left=f.dragging.left-Da.deltaX/f.transformScale:We.left=f.dragging.left+Da.deltaX/f.transformScale,We.top=f.dragging.top+Da.deltaY/f.transformScale,f.bounded){const Ze=Ne.offsetParent.clientHeight-Ee(n.h,f.rowHeight,f.margin[1]);We.top=ie(We.top,0,Ze);const ra=ca(),pe=f.containerWidth-Ee(n.w,ra,f.margin[0]);We.left=ie(We.left,0,pe)}f.dragging=We;break}case"dragend":{const Da=Ne.offsetParent.getBoundingClientRect(),Ze=Ne.getBoundingClientRect(),ra=Ze.left/f.transformScale,pe=Da.left/f.transformScale,U=Ze.right/f.transformScale,q=Da.right/f.transformScale,ze=Ze.top/f.transformScale,_e=Da.top/f.transformScale;B.value?We.left=(U-q)*-1:We.left=ra-pe,We.top=ze-_e,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Aa;B.value,Aa=oe(We.top,We.left),c=te,D=pa,(E!==Aa.x||S!==Aa.y)&&t("move",n.i,Aa.x,Aa.y),fe.type==="dragend"&&($!==E||j!==S)&&t("moved",n.i,Aa.x,Aa.y),v.emit("dragEvent",fe.type,n.i,Aa.x,Aa.y,b,w)}function ta(fe,da,Qe,te){const pa=ca();let Ne;return B.value?Ne={right:Math.round(pa*fe+(fe+1)*f.margin[0]),top:Math.round(f.rowHeight*da+(da+1)*f.margin[1]),width:Qe===1/0?Qe:Math.round(pa*Qe+Math.max(0,Qe-1)*f.margin[0]),height:te===1/0?te:Math.round(f.rowHeight*te+Math.max(0,te-1)*f.margin[1])}:Ne={left:Math.round(pa*fe+(fe+1)*f.margin[0]),top:Math.round(f.rowHeight*da+(da+1)*f.margin[1]),width:Qe===1/0?Qe:Math.round(pa*Qe+Math.max(0,Qe-1)*f.margin[0]),height:te===1/0?te:Math.round(f.rowHeight*te+Math.max(0,te-1)*f.margin[1])},Ne}function oe(fe,da){const Qe=ca();let te=Math.round((da-f.margin[0])/(Qe+f.margin[0])),pa=Math.round((fe-f.margin[1])/(f.rowHeight+f.margin[1]));return te=Math.max(Math.min(te,f.cols-w),0),pa=Math.max(Math.min(pa,f.maxRows-b),0),{x:te,y:pa}}function ca(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Ee(fe,da,Qe){return Number.isFinite(fe)?Math.round(da*fe+Math.max(0,fe-1)*Qe):fe}function ie(fe,da,Qe){return Math.max(Math.min(fe,Qe),da)}function Be(fe,da,Qe=!1){const te=ca();let pa=Math.round((da+f.margin[0])/(te+f.margin[0])),Ne=0;return Qe?Ne=Math.ceil((fe+f.margin[1])/(f.rowHeight+f.margin[1])):Ne=Math.round((fe+f.margin[1])/(f.rowHeight+f.margin[1])),pa=Math.max(Math.min(pa,f.cols-E),0),Ne=Math.max(Math.min(Ne,f.maxRows-S),0),{w:pa,h:Ne}}function Ue(fe,da){f.containerWidth=fe}function oa(){Fe()}function Ja(){!p.value&&g.value&&(p.value=Ts(g.value),f.useStyleCursor||p.value.styleCursor(!1))}const L=_s(ae);function H(){if(Ja(),!!p.value)if(f.draggable&&!n.static){const fe={ignoreFrom:n.dragIgnoreFrom,allowFrom:n.dragAllowFrom,...n.dragOption};p.value.draggable(fe),m||(m=!0,p.value.on("dragstart dragmove dragend",da=>{da.type==="dragmove"?L(da):ae(da)}))}else p.value.draggable({enabled:!1})}const Z=_s(Na);function me(){if(Ja(),!!p.value)if(f.resizable&&!n.static){const fe=ta(0,0,n.maxW,n.maxH),da=ta(0,0,n.minW,n.minH),Qe={edges:{left:B.value?`.${Le.value[0]}`:!1,right:B.value?!1:`.${Le.value[0]}`,bottom:`.${Le.value[0]}`,top:!1},ignoreFrom:n.resizeIgnoreFrom,restrictSize:{min:{height:da.height*f.transformScale,width:da.width*f.transformScale},max:{height:fe.height*f.transformScale,width:fe.width*f.transformScale}},...n.resizeOption};n.preserveAspectRatio&&(Qe.modifiers=[Ts.modifiers.aspectRatio({ratio:"preserve"})]),p.value.resizable(Qe),k||(k=!0,p.value.on("resizestart resizemove resizeend",te=>{te.type==="resizemove"?Z(te):Na(te)}))}else p.value.resizable({enabled:!1})}return(fe,da)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:g,class:e.normalizeClass(Se.value),style:e.normalizeStyle(f.style)},[e.renderSlot(fe.$slots,"default"),ve.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Le.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ti=typeof window<"u";var As;ti&&(As=window==null?void 0:window.navigator)!=null&&As.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function zs(a){return a!=null}function Ms(){}const m1=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(m1)));const y1=ti&&("ontouchstart"in window||b1()>0),g1=y1?"pointerdown":"click";function b1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function k1(a,l,r=window.Event){const{type:n,bubbles:t=!1,cancelable:s=!1,...v}=l;if(!zs(n)||n==="")return!1;let p;return zs(r)?p=new r(n,{bubbles:t,cancelable:s}):(p=document.createEvent("HTMLEvents"),p.initEvent(n,t,s)),Object.assign(p,v),a.dispatchEvent(p)}const x1="clickoutside",w1=new Set;ti&&document.addEventListener(g1,a=>{const l=a.target,r=a.composedPath&&a.composedPath();w1.forEach(n=>{n!==l&&(r?!r.includes(n):!n.contains(l))&&(!n.__transferElement||n.__transferElement!==l&&!n.__transferElement.contains(l))&&k1(n,{type:x1})})},!0);const _1=[["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 xo;if(ti){for(const a of _1)if(a[1]in document){xo=a;break}}e.computed(()=>!1);const S1=new Set,E1=new WeakMap;if(ti&&xo){const a=xo[2],l=xo[4];document.addEventListener(l,()=>{if(S1.forEach(r=>{r.value=!1}),document[a]){const r=E1.get(document[a]);r&&(r.value=!0)}},!1)}const Gc=new Map;Gc.set("x",0);Gc.set("y",0);var ii=[],C1=function(){return ii.some(function(a){return a.activeTargets.length>0})},D1=function(){return ii.some(function(a){return a.skippedTargets.length>0})},Is="ResizeObserver loop completed with undelivered notifications.",N1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:Is}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=Is),window.dispatchEvent(a)},Ki;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ki||(Ki={}));var oi=function(a){return Object.freeze(a)},B1=function(){function a(l,r){this.inlineSize=l,this.blockSize=r,oi(this)}return a}(),Yc=function(){function a(l,r,n,t){return this.x=l,this.y=r,this.width=n,this.height=t,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,oi(this)}return a.prototype.toJSON=function(){var l=this,r=l.x,n=l.y,t=l.top,s=l.right,v=l.bottom,p=l.left,f=l.width,m=l.height;return{x:r,y:n,top:t,right:s,bottom:v,left:p,width:f,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),Bt=function(a){return a instanceof SVGElement&&"getBBox"in a},Jc=function(a){if(Bt(a)){var l=a.getBBox(),r=l.width,n=l.height;return!r&&!n}var t=a,s=t.offsetWidth,v=t.offsetHeight;return!(s||v||a.getClientRects().length)},Os=function(a){var l;if(a instanceof Element)return!0;var r=(l=a==null?void 0:a.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(r&&a instanceof r.Element)},T1=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},Ui=typeof window<"u"?window:{},yo=new WeakMap,Ls=/auto|scroll/,A1=/^tb|vertical/,z1=/msie|trident/i.test(Ui.navigator&&Ui.navigator.userAgent),Dn=function(a){return parseFloat(a||"0")},Ei=function(a,l,r){return a===void 0&&(a=0),l===void 0&&(l=0),r===void 0&&(r=!1),new B1((r?l:a)||0,(r?a:l)||0)},$s=oi({devicePixelContentBoxSize:Ei(),borderBoxSize:Ei(),contentBoxSize:Ei(),contentRect:new Yc(0,0,0,0)}),Xc=function(a,l){if(l===void 0&&(l=!1),yo.has(a)&&!l)return yo.get(a);if(Jc(a))return yo.set(a,$s),$s;var r=getComputedStyle(a),n=Bt(a)&&a.ownerSVGElement&&a.getBBox(),t=!z1&&r.boxSizing==="border-box",s=A1.test(r.writingMode||""),v=!n&&Ls.test(r.overflowY||""),p=!n&&Ls.test(r.overflowX||""),f=n?0:Dn(r.paddingTop),m=n?0:Dn(r.paddingRight),k=n?0:Dn(r.paddingBottom),c=n?0:Dn(r.paddingLeft),D=n?0:Dn(r.borderTopWidth),F=n?0:Dn(r.borderRightWidth),_=n?0:Dn(r.borderBottomWidth),G=n?0:Dn(r.borderLeftWidth),M=c+m,$=f+k,j=G+F,E=D+_,S=p?a.offsetHeight-E-a.clientHeight:0,w=v?a.offsetWidth-j-a.clientWidth:0,b=t?M+j:0,g=t?$+E:0,R=n?n.width:Dn(r.width)-b-w,I=n?n.height:Dn(r.height)-g-S,Y=R+M+w+j,le=I+$+S+E,ye=oi({devicePixelContentBoxSize:Ei(Math.round(R*devicePixelRatio),Math.round(I*devicePixelRatio),s),borderBoxSize:Ei(Y,le,s),contentBoxSize:Ei(R,I,s),contentRect:new Yc(c,f,R,I)});return yo.set(a,ye),ye},Zc=function(a,l,r){var n=Xc(a,r),t=n.borderBoxSize,s=n.contentBoxSize,v=n.devicePixelContentBoxSize;switch(l){case Ki.DEVICE_PIXEL_CONTENT_BOX:return v;case Ki.BORDER_BOX:return t;default:return s}},M1=function(){function a(l){var r=Xc(l);this.target=l,this.contentRect=r.contentRect,this.borderBoxSize=oi([r.borderBoxSize]),this.contentBoxSize=oi([r.contentBoxSize]),this.devicePixelContentBoxSize=oi([r.devicePixelContentBoxSize])}return a}(),Qc=function(a){if(Jc(a))return 1/0;for(var l=0,r=a.parentNode;r;)l+=1,r=r.parentNode;return l},I1=function(){var a=1/0,l=[];ii.forEach(function(s){if(s.activeTargets.length!==0){var v=[];s.activeTargets.forEach(function(p){var f=new M1(p.target),m=Qc(p.target);v.push(f),p.lastReportedSize=Zc(p.target,p.observedBox),m<a&&(a=m)}),l.push(function(){s.callback.call(s.observer,v,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var r=0,n=l;r<n.length;r++){var t=n[r];t()}return a},Rs=function(a){ii.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(r){r.isActive()&&(Qc(r.target)>a?l.activeTargets.push(r):l.skippedTargets.push(r))})})},O1=function(){var a=0;for(Rs(a);C1();)a=I1(),Rs(a);return D1()&&N1(),a>0},ut,eu=[],L1=function(){return eu.splice(0).forEach(function(a){return a()})},$1=function(a){if(!ut){var l=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return L1()}).observe(r,n),ut=function(){r.textContent="".concat(l?l--:l++)}}eu.push(a),ut()},R1=function(a){$1(function(){requestAnimationFrame(a)})},wo=0,V1=function(){return!!wo},F1=250,P1={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vs=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Fs=function(a){return a===void 0&&(a=0),Date.now()+a},dt=!1,j1=function(){function a(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return a.prototype.run=function(l){var r=this;if(l===void 0&&(l=F1),!dt){dt=!0;var n=Fs(l);R1(function(){var t=!1;try{t=O1()}finally{if(dt=!1,l=n-Fs(),!V1())return;t?r.run(1e3):l>0?r.run(l):r.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var l=this,r=function(){return l.observer&&l.observer.observe(document.body,P1)};document.body?r():Ui.addEventListener("DOMContentLoaded",r)},a.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vs.forEach(function(r){return Ui.addEventListener(r,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Vs.forEach(function(r){return Ui.removeEventListener(r,l.listener,!0)}),this.stopped=!0)},a}(),St=new j1,Ps=function(a){!wo&&a>0&&St.start(),wo+=a,!wo&&St.stop()},H1=function(a){return!Bt(a)&&!T1(a)&&getComputedStyle(a).display==="inline"},U1=function(){function a(l,r){this.target=l,this.observedBox=r||Ki.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var l=Zc(this.target,this.observedBox,!0);return H1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),q1=function(){function a(l,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=r}return a}(),go=new WeakMap,js=function(a,l){for(var r=0;r<a.length;r+=1)if(a[r].target===l)return r;return-1},bo=function(){function a(){}return a.connect=function(l,r){var n=new q1(l,r);go.set(l,n)},a.observe=function(l,r,n){var t=go.get(l),s=t.observationTargets.length===0;js(t.observationTargets,r)<0&&(s&&ii.push(t),t.observationTargets.push(new U1(r,n&&n.box)),Ps(1),St.schedule())},a.unobserve=function(l,r){var n=go.get(l),t=js(n.observationTargets,r),s=n.observationTargets.length===1;t>=0&&(s&&ii.splice(ii.indexOf(n),1),n.observationTargets.splice(t,1),Ps(-1))},a.disconnect=function(l){var r=this,n=go.get(l);n.observationTargets.slice().forEach(function(t){return r.unobserve(l,t.target)}),n.activeTargets.splice(0,n.activeTargets.length)},a}(),W1=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.");bo.connect(this,l)}return a.prototype.observe=function(l,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Os(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");bo.observe(this,l,r)},a.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Os(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");bo.unobserve(this,l)},a.prototype.disconnect=function(){bo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Io=new WeakMap;function K1(a){var l;for(let r=0,n=a.length;r<n;++r){const t=a[r],s=Io.get(t.target);if(typeof s=="function"){const{inlineSize:v,blockSize:p}=((l=t.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:m}=t.target;s(Object.assign(t,{offsetWidth:f,offsetHeight:m,width:v??f,height:p??m}))}}}const au=new(ti&&window.ResizeObserver||W1)(K1);function Hs(a,l){Io.set(a,l),au.observe(a)}function Us(a){Io.has(a)&&(au.unobserve(a),Io.delete(a))}function G1(a={}){let l=Ms;const r=e.watch(()=>e.unref(a.target),t=>{l(),!(!t||typeof a.onResize!="function")&&(Hs(t,a.onResize),l=()=>{Us(t),l=Ms})},{immediate:!0}),n=()=>{r(),l()};return e.getCurrentScope()&&e.onScopeDispose(n),{observeResize:Hs,unobserveResize:Us,unobserve:n}}const Y1=e.ref(!1);e.computed(()=>Y1.value);const qs="__theme_style__",pt="__theme_observer__",Ws=e.reactive(new Map),Ks=new Map;e.watch(Ws,()=>{if(!ti)return;Ks.clear();const a=document.head.querySelector(`#${qs}`);a&&document.head.removeChild(a);const l=document.createElement("style");let r=`.${pt} { width: 1px }`,n=1;for(const[t,[s,v]]of Ws.entries())r+=` html.${s} .${pt}, .${v} .${pt} { width: ${++n}px }`,Ks.set(n,t);l.textContent=r,l.id=qs,document.head.appendChild(l)});const lu=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:l,emit:r}){const n=a,t=r,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),v=new Map,p=e.ref(n.layout),f=e.ref(),{observeResize:m,unobserveResize:k}=G1(),c=K6();c.on("resizeEvent",D),c.on("dragEvent",F),e.onBeforeMount(()=>{t("layout-before-mount",p.value)}),e.onMounted(()=>{t("layout-mounted",p.value),e.nextTick(()=>{n1(p.value),s.originalLayout=p.value,e.nextTick(()=>{I(),f.value&&m(f.value,G6(E,16)),wi(p.value,n.verticalCompact),t("layout-updated",p.value),j(),E()})})}),e.onBeforeUnmount(()=>{c.clearAll(),f.value&&k(f.value)});function D(le,ye,Te,V,se,ee){g(le,ye,Te,V,se,ee)}function F(le,ye,Te,V,se,ee){b(le,ye,Te,V,se,ee)}e.watch(()=>s.width,(le,ye)=>{e.nextTick(()=>{c.emit("updateWidth",le),ye===-1&&e.nextTick(()=>{t("layout-ready",p.value)}),j()})}),e.watch(()=>[n.layout,n.layout.length],()=>{p.value=n.layout,$()}),e.watch(()=>n.colNum,le=>{c.emit("setColNum",le)}),e.watch(()=>n.rowHeight,le=>{c.emit("setRowHeight",le)}),e.watch(()=>n.isDraggable,le=>{c.emit("setDraggable",le)}),e.watch(()=>n.isResizable,le=>{c.emit("setResizable",le)}),e.watch(()=>n.isBounded,le=>{c.emit("setBounded",le)}),e.watch(()=>n.transformScale,le=>{c.emit("setTransformScale",le)}),e.watch(()=>n.responsive,le=>{le||(t("update:layout",s.originalLayout),c.emit("setColNum",n.colNum)),E()}),e.watch(()=>n.maxRows,le=>{c.emit("setMaxRows",le)}),e.watch([()=>n.margin,()=>n.margin[1]],j),e.provide(Fc,e.reactive({...e.toRefs(n),...e.toRefs(s),increaseItem:_,decreaseItem:G})),e.provide(Pc,c),l({state:s,getItem:M,resizeEvent:g,dragEvent:b,layoutUpdate:$});function _(le){v.set(le.i,le)}function G(le){v.delete(le.i)}function M(le){return v.get(le)}function $(){if(!cn(p.value)&&!cn(s.originalLayout)){if(p.value.length!==s.originalLayout.length){const le=Y(p.value,s.originalLayout);if(le.length>0)if(p.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(le);else{const ye=new Set(le.map(Te=>Te.i));s.originalLayout=s.originalLayout.filter(Te=>!ye.has(Te.i))}s.lastLayoutLength=p.value.length,I()}wi(p.value,n.verticalCompact),c.emit("updateWidth",s.width),j(),t("layout-updated",p.value)}}function j(){s.mergedStyle={height:S()}}function E(){f.value&&(s.width=f.value.offsetWidth),c.emit("resizeEvent")}function S(){if(!n.autoSize)return;const le=parseFloat(n.margin[1]);return J6(p.value)*(n.rowHeight+le)+le+"px"}let w;function b(le,ye,Te,V,se,ee){let ue=Ss(p.value,ye);cn(ue)&&(ue={h:0,w:0,x:0,y:0,i:""}),le==="dragstart"&&!n.verticalCompact&&(w=p.value.reduce((Ce,{i:Pe,x:ve,y:B})=>({...Ce,[Pe]:{x:ve,y:B}}),{})),le==="dragmove"||le==="dragstart"?(s.placeholder.i=ye,s.placeholder.x=ue.x,s.placeholder.y=ue.y,s.placeholder.w=ee,s.placeholder.h=se,e.nextTick(()=>{s.isDragging=!0}),c.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),p.value=_t(p.value,ue,Te,V,!0,n.preventCollision),n.restoreOnDrag?(ue.static=!0,wi(p.value,n.verticalCompact,w),ue.static=!1):wi(p.value,n.verticalCompact),c.emit("compact"),j(),le==="dragend"&&(w=void 0,t("layout-updated",p.value))}function g(le,ye,Te,V,se,ee){let ue=Ss(p.value,ye);cn(ue)&&(ue={h:0,w:0,x:0,y:0,i:""});let Ce;if(n.preventCollision){const Pe=Hc(p.value,{...ue,w:ee,h:se}).filter(ve=>ve.i!==ue.i);if(Ce=Pe.length>0,Ce){let ve=1/0,B=1/0;Pe.forEach(ce=>{ce.x>ue.x&&(ve=Math.min(ve,ce.x)),ce.y>ue.y&&(B=Math.min(B,ce.y))}),Number.isFinite(ve)&&(ue.w=ve-ue.x),Number.isFinite(B)&&(ue.h=B-ue.y)}}Ce||(ue.w=ee,ue.h=se),le==="resizestart"||le==="resizemove"?(s.placeholder.i=ye,s.placeholder.x=Te,s.placeholder.y=V,s.placeholder.w=ue.w,s.placeholder.h=ue.h,e.nextTick(()=>{s.isDragging=!0}),c.emit("updateWidth",s.width)):le&&e.nextTick(()=>{s.isDragging=!1}),n.responsive&&R(),wi(p.value,n.verticalCompact),c.emit("compact"),j(),le==="resizeend"&&t("layout-updated",p.value)}function R(){const le=c1(n.breakpoints,s.width);if(le===s.lastBreakpoint)return;const ye=Wc(le,n.cols);!cn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=wt(p.value));const Te=u1(s.originalLayout,s.layouts,n.breakpoints,le,s.lastBreakpoint,ye,n.verticalCompact);s.layouts[le]=Te,s.lastBreakpoint!==le&&t("breakpoint-changed",le,Te),p.value=Te,t("update:layout",Te),s.lastBreakpoint=le,c.emit("setColNum",ye)}function I(){s.layouts=Object.assign({},n.responsiveLayouts)}function Y(le,ye){const Te=new Set(ye.map(ue=>ue.i)),V=new Set(le.map(ue=>ue.i)),se=le.filter(ue=>!Te.has(ue.i)),ee=ye.filter(ue=>!V.has(ue.i));return se.concat(ee)}return(le,ye)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[le.$slots.default?e.renderSlot(le.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,Te=>(e.openBlock(),e.createBlock(Mo,e.mergeProps({key:Te.i,ref_for:!0},Te),{default:e.withCtx(()=>[e.renderSlot(le.$slots,"item",{item:Te})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Mo,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const J1={key:0,class:"item-view-group"},X1={key:0,class:"item-view-group"},Z1=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const r=A.useModelComp(A.pinia),{isEdit:n}=A.storeToRefs(r),t=Un(A.pinia),s=l,v=a,p=e.ref(""),f=e.computed(()=>v==null?void 0:v.children),m=e.computed(()=>{var j,E,S,w;return((j=v==null?void 0:v.children)==null?void 0:j.length)>0&&((E=v==null?void 0:v.children)!=null&&E.every(b=>b==null?void 0:b.layout))?(w=(S=v==null?void 0:v.children)==null?void 0:S[0])==null?void 0:w.layout:"vertical"}),k=j=>{p.value=j,s("radioChange",j)},c=e.computed(()=>{var j,E;return((E=(j=v==null?void 0:v.children)==null?void 0:j[0])==null?void 0:E.isGridLayout)||!1}),D=e.ref((v==null?void 0:v.level)+1),F=e.computed(()=>{if(!(v!=null&&v.children)||!Array.isArray(v.children)||v.children.length<2)return!1;const j=v.children.some(S=>(S==null?void 0:S.name)==="测量系统配置表"&&(S==null?void 0:S.comp)==="ParentItem"),E=v.children.some(S=>(S==null?void 0:S.name)==="测量系统传递表"&&(S==null?void 0:S.comp)==="ParentItem");return j&&E}),_=e.computed(()=>{var E,S,w,b,g,R;let j=(E=v==null?void 0:v.children)==null?void 0:E.filter(I=>I==null?void 0:I.choice);if(t.setSelectTab((S=j==null?void 0:j[0])==null?void 0:S.choiceName),(p==null?void 0:p.value)!=="")return(w=v==null?void 0:v.children)==null?void 0:w.filter(I=>!(I!=null&&I.choiceName)||(I==null?void 0:I.choiceName)===(p==null?void 0:p.value));{let I=(g=(b=v==null?void 0:v.children)==null?void 0:b.find(Y=>Y==null?void 0:Y.choice))==null?void 0:g.choiceName;return(R=v==null?void 0:v.children)==null?void 0:R.filter(Y=>!(Y!=null&&Y.choiceName)||(Y==null?void 0:Y.choiceName)===I)}}),G=j=>{const E=(j==null?void 0:j.menuFilter)||[];return Array.isArray(E)&&(E==null?void 0:E.some(S=>{const w=typeof S=="string"?S:JSON.stringify(S);return w==null?void 0:w.includes("HideGroup=Yes")}))};e.watch(()=>v==null?void 0:v.children,()=>{F.value},{deep:!0});const M=j=>{s("rowClick",j)},$=(j,E)=>{s("routeUrl",j,E)};return(j,E)=>c.value?(e.openBlock(),e.createBlock(e.unref(lu),{key:0,layout:f.value,"onUpdate:layout":E[0]||(E[0]=S=>f.value=S),"is-draggable":e.unref(n)==="edit","is-resizable":e.unref(n)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(S,w)=>(e.openBlock(),e.createBlock(e.unref(Mo),{key:S.i,x:S.x,y:S.y,"min-h":S.minH,"max-h":S.maxH,"min-w":S.minW,w:S.w,h:S.h,i:S.i},{default:e.withCtx(()=>{var b,g,R,I,Y,le,ye,Te,V,se,ee,ue,Ce,Pe;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:w===((b=v==null?void 0:v.children)==null?void 0:b.length)-1?"0px":"24px"})},[((R=(g=S==null?void 0:S.component)==null?void 0:g.comp)==null?void 0:R.toUpperCase())!=="TABLE"&&((I=S==null?void 0:S.component)!=null&&I.name)?(e.openBlock(),e.createElementBlock("div",J1,[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((Y=S==null?void 0:S.component)==null?void 0:Y.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)((le=S==null?void 0:S.component)==null?void 0:le.comp)),{pageLayout:m.value,config:{showIndex:(ye=e.unref(or)[w])==null?void 0:ye.showIndex,allowMove:(Te=e.unref(or)[w])==null?void 0:Te.allowMove,viewport:(V=e.unref(or)[w])==null?void 0:V.viewport,status:(se=e.unref(or)[w])==null?void 0:se.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:e.unref(xc),itemData:(ee=S==null?void 0:S.component)==null?void 0:ee.compData,childItemData:(ue=S==null?void 0:S.component)==null?void 0:ue.itemChildData,key:e.unref(Hn),cacheNewData:e.unref(kc),onChange:e.unref(Bo),index:(S==null?void 0:S.id)??w,onContentChange:e.unref(To),onPageChange:e.unref(Ao),parentTableId:(Ce=S==null?void 0:S.component)==null?void 0:Ce.tableId,allMapContents:e.unref(bt),children:(Pe=S==null?void 0:S.component)==null?void 0:Pe.children,level:D.value,onRowClick:M,onRouteUrl:$,onClickTrigger:e.unref(wc),onClickMainKey:e.unref(_c),onRadioChange:k},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,w)=>{var b,g;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(w)===((b=v==null?void 0:v.children)==null?void 0:b.length)-1?"0px":"24px"})},[((g=S==null?void 0:S.comp)==null?void 0:g.toUpperCase())!=="TABLE"&&S.name?(e.openBlock(),e.createElementBlock("div",X1,[G(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(Wi)(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(Hn),onChange:e.unref(Bo),index:(S==null?void 0:S.id)??w,onContentChange:e.unref(To),onPageChange:e.unref(Ao),parentTableId:S==null?void 0:S.tableId,allMapContents:e.unref(bt),children:S==null?void 0:S.children,level:D.value,onRowClick:M,onRouteUrl:$,onRadioChange:k},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Q1=Xl._export_sfc(Z1,[["__scopeId","data-v-bafbdd45"]]),ev={class:"radio-group-container"},av=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(),s=Un(A.pinia),{selectTab:v}=A.storeToRefs(s);e.watch(()=>r==null?void 0:r.itemData,()=>{t.value=v.value},{immediate:!0,deep:!0});const p=f=>{t.value=f,n("radioChange",t.value)};return(f,m)=>(e.openBlock(),e.createElementBlock("div",ev,[e.createVNode(ll.ssRadio,{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=k=>t.value=k),content:r==null?void 0:r.itemData,onChange:p},null,8,["modelValue","content"])]))}}),lv=Xl._export_sfc(av,[["__scopeId","data-v-ed48c2f8"]]),ru=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"}]),rv={TABLE:Dc,FORM:bs,STATICFORM:Nc,TABLEOPERATE:Gh,TABLESTYLE:d2,TABLEEXTEND:f2,TABLEINTERACTION:m2,FORMOPERATE:ks,FOLD:W2,CALCULATOR:Z2,METHODBUTTON:a4,AVATARUPLOAD:es.ssAvatar,SIGNATURE:es.ssSignature,FORMTOP:bs,STEP:f4,STEPOPERATE:$2,TIMELINE:b4,TIMELINEOPERATE:H2,FORMTOPOPERATE:ks,SIGNATUREOPERATE:u4,AVATARUPLOADOPERATE:n4,TABS:w4,TABSOPERATE:t6,CHART:x6,CHARTOPERATE:z6,LAYOUT:O6,LAYOUTOPERATE:U6,PARENTITEM:Q1,RADIO:lv};function Ni(a){return rv[a==null?void 0:a.toUpperCase()]||null}exports.De=lu;exports.activeStepInfo=_i;exports.addContents=qi;exports.addVisibleDialog=Dt;exports.affixItems=_0;exports.allMapContents=bt;exports.analyzeMenu=ec;exports.cacheNewData=kc;exports.clickMainKey=_c;exports.clickSavePage=w0;exports.clickStep=Ec;exports.clickTrigger=wc;exports.compId=Hn;exports.compNames=xc;exports.compShow=Di;exports.existLayouts=A0;exports.fixChangeValue=Et;exports.generateLayouts=t2;exports.getComponent=Ni;exports.getComponents=Wi;exports.getPageConstruct=Gd;exports.getPageData=Kr;exports.getSliceContLength=$0;exports.gridRowHeight=l2;exports.gridRowHeightHmPg=a2;exports.isStepLayout=Cc;exports.onBack=k0;exports.onButtonChange=D0;exports.onChange=Bo;exports.onClick=x0;exports.onClickStep=z0;exports.onContentChange=To;exports.onExtendTaskEnd=T0;exports.onOk=N0;exports.onPageBack=I0;exports.onPageChange=Ao;exports.onSelectFixContent=b0;exports.renderShowItems=gc;exports.showItems=or;exports.sliceTableLength=bc;exports.slotContent=ru;exports.ssTable=Dc;exports.st=Mo;exports.stepItems=R0;exports.tabChange=M0;exports.toolBar=B0;exports.useFormComp=Ct;exports.useModelLoader=xf;exports.verifyButton=O0;
|