ss-component-new 1.3.355 → 1.3.356
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/{MTLLoader-C7OvulGh.cjs → MTLLoader-BefOV10J.cjs} +1 -1
- package/dist/{MTLLoader-5aLRwabe.js → MTLLoader-Cg0oDB2C.js} +1 -1
- package/dist/{OrbitControls-CDSlnRLN.js → OrbitControls-BWJhT98n.js} +1 -1
- package/dist/{OrbitControls-CIrPqmPS.cjs → OrbitControls-CqaGqoNF.cjs} +1 -1
- package/dist/{URDFLoader-AkFAgt5Y.js → URDFLoader-6foKe0Hk.js} +2 -2
- package/dist/{URDFLoader-BwFJx5UR.cjs → URDFLoader-Cg4tDxf9.cjs} +1 -1
- package/dist/{animationData-12pRw_Qv.cjs → animationData-1O9N8tYh.cjs} +1 -1
- package/dist/{animationData-iL7PIDLd.js → animationData-BmdynDCL.js} +2 -2
- package/dist/{array-BYQWjMT-.js → array-bTlTI7-m.js} +2 -2
- package/dist/{array-DUfexM7c.cjs → array-qJP7qOOm.cjs} +1 -1
- package/dist/{iconfont-DsgGs7UQ.cjs → iconfont-BkToWweJ.cjs} +1 -1
- package/dist/{iconfont-C6j3TodB.js → iconfont-M_-3pVq2.js} +2 -2
- package/dist/icons/svg/normal.svg +1 -0
- package/dist/{index-DQ74Iryx.js → index-B-Cf26_8.js} +2 -2
- package/dist/{index-QXOizZeU.cjs → index-B-w0TQLi.cjs} +1 -1
- package/dist/{index-3U6si0hy.cjs → index-B44yTwpg.cjs} +1 -1
- package/dist/{index-CsQiHOs9.js → index-BD78V5Fk.js} +1 -1
- package/dist/index-BNnoV73x.cjs +1 -0
- package/dist/{index-D6VrG7PD.js → index-BWqS2Db9.js} +1 -1
- package/dist/{index-CMHbvs1r.cjs → index-BnQAOGNI.cjs} +53 -53
- package/dist/{index-0TSZq_QR.js → index-BsCxdb2Q.js} +5 -5
- package/dist/{index-8SEJKzmd.js → index-BskTRZyB.js} +3 -3
- package/dist/{index-CmcJ1rry.js → index-BugbzHvK.js} +1 -1
- package/dist/{index-Dha6rhAJ.cjs → index-BxZ-Sqy1.cjs} +1 -1
- package/dist/{index-IjCgZgl3.cjs → index-CLqESmcJ.cjs} +1 -1
- package/dist/{index-C_e3ZAJu.js → index-CPI-GT09.js} +1 -1
- package/dist/index-CX-LO3gU.js +22927 -0
- package/dist/{index-D0HhfyPk.js → index-CdOAC0QO.js} +1 -1
- package/dist/{index-CRiJbVFR.cjs → index-Ck5mtjKc.cjs} +1 -1
- package/dist/index-CwMvkhaX.cjs +25 -0
- package/dist/{index-CsugrIEn.js → index-CzXy4Rjt.js} +1 -1
- package/dist/{index-D_EVB0Xj.js → index-DCV8AiAq.js} +4 -4
- package/dist/{index-B1f0xvtw.js → index-DIfe_pv9.js} +199 -199
- package/dist/{index-BAAPwqZY.cjs → index-DK5QS19w.cjs} +1 -1
- package/dist/{index-BCXL-Vag.cjs → index-DRno3-U_.cjs} +1 -1
- package/dist/{index-zUcPbdQ8.cjs → index-DTxACO21.cjs} +1 -1
- package/dist/{index-DyEYs8w4.cjs → index-DdLYDrQL.cjs} +1 -1
- package/dist/{index-BAdjupJP.cjs → index-DmmjTRGz.cjs} +1 -1
- package/dist/{index-BGruls3v.js → index-Dv0FPBX0.js} +4026 -4026
- package/dist/{index-B5T4n7g4.js → index-DyS4ycK4.js} +1596 -1593
- package/dist/{index-J-WjNVnM.js → index-G6xUS_LZ.js} +1 -1
- package/dist/{index-DpaJtzsH.cjs → index-MT9m_JvZ.cjs} +12 -12
- package/dist/{index-Dc_o63Jj.js → index-O7h8fPzP.js} +1 -1
- package/dist/{index-DDoHRYY5.cjs → index-Q3o-NsLb.cjs} +1 -1
- package/dist/{index-B-2anWSc.cjs → index-RSfi7VXm.cjs} +1 -1
- package/dist/{index-CI2NS7Ob.cjs → index-WQNqmmuC.cjs} +1 -1
- package/dist/{index-NbGwWzrU.js → index-hJh3eBHb.js} +1 -1
- package/dist/{index-Dobt9Q4Z.js → index-iaOps17f.js} +3 -3
- package/dist/index-l9_qZoks.cjs +2 -0
- package/dist/{index-BGtPvIhL.cjs → index-qVb0YQPi.cjs} +1 -1
- package/dist/{index-BnAAUtPN.js → index-wAZQvSsO.js} +1154 -1151
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-D0uXxWIh.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CmdLcCoO.js} +1845 -1840
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BKbOLELt.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-feyCTReG.cjs} +61 -61
- package/dist/{main-Dxdq3RcS.js → main-205_4Nih.js} +3 -3
- package/dist/{main-Crsz9niF.cjs → main-D-xgau4u.cjs} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-DpsPcuIa.cjs → threeModel-DXueZHTM.cjs} +1 -1
- package/dist/{threeModel-DeRemq5u.js → threeModel-w1ZYoyvs.js} +3 -3
- package/dist/{threePreview-Dfkn0cBK.cjs → threePreview-BA1gosFY.cjs} +1 -1
- package/dist/{threePreview-DT2LkMs6.js → threePreview-D7k4bo5p.js} +3 -3
- package/dist/{threeSceneView-C6tPuxdW.cjs → threeSceneView-Bloj-2Kp.cjs} +1 -1
- package/dist/{threeSceneView-COO6IUge.js → threeSceneView-DeONIC8O.js} +10 -10
- package/dist/{threeSceneViewForCPMPIP-OyTbtTK8.cjs → threeSceneViewForCPMPIP-Cl14yLk7.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DZV8D2vn.js → threeSceneViewForCPMPIP-Cob3ZkMt.js} +7 -7
- package/dist/{threeTrackPathView-DCBgrmNw.js → threeTrackPathView-DOmS1T6b.js} +3 -3
- package/dist/{threeTrackPathView-0JMPjO4k.cjs → threeTrackPathView-DXI6Wos2.cjs} +1 -1
- package/dist/{threeViewerHost-_ubQTgiY.js → threeViewerHost-DQ6Y3XLq.js} +2 -2
- package/dist/{threeViewerHost-DfI5l2__.cjs → threeViewerHost-DtwouxoX.cjs} +1 -1
- package/dist/{urdfTree-CwGYGMf_.js → urdfTree-BEQr2AP4.js} +1 -1
- package/dist/{urdfTree-CRWM03qh.cjs → urdfTree-r9giphpe.cjs} +1 -1
- package/dist/{workpieceTreePanel-DHoXiEkq.cjs → workpieceTreePanel-Bzn5WIm0.cjs} +1 -1
- package/dist/{workpieceTreePanel-DZn1rWeY.js → workpieceTreePanel-CozcD--G.js} +4 -4
- package/package.json +1 -1
- package/public/icons/svg/normal.svg +1 -0
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-DRoBrg1m.cjs +0 -25
- package/dist/index-DpNXljVj.cjs +0 -2
- package/dist/index-DvVR3mog.cjs +0 -1
- package/dist/index-U3ob6rDc.js +0 -22895
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";var Au=Object.defineProperty;var zu=(a,l,r)=>l in a?Au(a,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[l]=r;var qr=(a,l,r)=>zu(a,typeof l!="symbol"?l+"":l,r);const e=require("vue"),Wa=require("./request-BC2w2vGr.cjs"),Vn=require("./dayjs.min-DxGf9IW4.cjs"),O=require("./menu-VIQivToR.cjs"),ll=require("./index-MT9m_JvZ.cjs"),er=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Cl=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-feyCTReG.cjs"),wr=require("./index-CUw6nGTo.cjs"),Eo=require("./threeViewerHost-DtwouxoX.cjs"),ve=require("./index-BnQAOGNI.cjs"),Mu=require("./index-DsNHJYr-.cjs"),Dr=require("./index-CW4qJdP8.cjs"),rs=require("./index-DRno3-U_.cjs"),Xs=require("./index-Q3o-NsLb.cjs"),Fi=require("./index-W8p89C7t.cjs"),pn=require("./index-CPB2ALZC.cjs");;/* empty css */const Co=require("./isString-DNBlKLZH.cjs"),ns=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Zs=require("./index-BVaHwt5f.cjs"),Iu=require("./index-B-w0TQLi.cjs"),Ln=require("./MTLLoader-BefOV10J.cjs"),Ou=require("./URDFLoader-Cg4tDxf9.cjs");var Lu="[object Boolean]";function Qs(a){return a===!0||a===!1||Wa.isObjectLike(a)&&Wa.baseGetTag(a)==Lu}function $u(a){return a===void 0}const Ru=a=>a.match(/\((.*)\)/)[1],Vu={__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 u=e.resolveComponent("el-popover");return e.openBlock(),e.createBlock(u,{visible:n.value,"onUpdate:visible":v[0]||(v[0]=p=>n.value=p),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"])}}},Fu={__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)}},Pu=er._export_sfc(Fu,[["__scopeId","data-v-d81f59b4"]]);function ju(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:u=.2}=n,p=a.getBoundingClientRect(),m=l.getBoundingClientRect(),c=l.naturalWidth,k=l.naturalHeight,C=m.width/c,V=m.height/k,_=Math.min(C,V),G=c*_,z=k*_,I=(p.width-G)/2,P=(p.height-z)/2,E=r.map(([w,b])=>{const y=I+w*G,L=P+b*z;return{x:y,y:L}});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.]+\)$/,`${u})`);t.fillStyle=S,t.fill(),t.strokeStyle=s.replace(/[\d.]+\)$/,"1)"),t.lineWidth=v,t.stroke()}function xi(a){if(!a)return;const l=a.getContext("2d");l&&l.clearRect(0,0,a.width,a.height)}function is(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 Hu={key:0,class:"ocr-img-preview-root"},Uu={class:"ocr-img-preview-window"},qu={key:0,class:"img-preview-body"},Wu={class:"img-preview-header"},Ku={class:"img-header-left"},Gu={class:"img-name"},Yu={key:0,class:"img-header-right"},Ju={class:"img-index"},Xu={key:0,class:"img-thumb-list"},Zu=["onClick"],Qu={key:1,class:"thumb-placeholder"},ed={class:"thumb-name"},ad={class:"img-preview-container"},ld={key:0,class:"img-placeholder"},rd={key:2,class:"img-placeholder"},nd={key:0},id={key:1},od={key:1,class:"img-placeholder"},td=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:N=>n("update:visible",N)});let s=!1,v="",u=0,p=0,m=0,c=0,k=0,C=0,V=null;const _=N=>{var le,Te;const U=(Te=(le=N==null?void 0:N.target)==null?void 0:le.closest)==null?void 0:Te.call(le,".ocr-img-preview-window");return U||document.querySelector(".ocr-img-preview-window")},G=N=>{if(!N||N==="none")return{tx:0,ty:0};let U=N.match(/matrix\(([^)]+)\)/);if(U){const le=U[1].split(",").map(Te=>Number(Te.trim()));return{tx:(le==null?void 0:le[4])||0,ty:(le==null?void 0:le[5])||0}}if(U=N.match(/matrix3d\(([^)]+)\)/),U){const le=U[1].split(",").map(Te=>Number(Te.trim()));return{tx:(le==null?void 0:le[12])||0,ty:(le==null?void 0:le[13])||0}}return U=N.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),U?{tx:Number(U[1])||0,ty:Number(U[2])||0}:{tx:0,ty:0}},z=(N,U,le)=>{N.style.transform=`translate(${U}px, ${le}px)`},I=N=>{const U=_(N);if(!U)return;s=!0,V=U,v="move",u=N.clientX,p=N.clientY;const le=window.getComputedStyle(U),{tx:Te,ty:Ee}=G(le.transform);k=Te,C=Ee,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},P=(N,U)=>{const le=_(N);if(!le)return;s=!0,V=le,v=U,u=N.clientX,p=N.clientY;const Te=le.getBoundingClientRect();m=Te.width,c=Te.height;const Ee=window.getComputedStyle(le),{tx:qe,ty:ca}=G(Ee.transform);k=qe,C=ca,document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},E=N=>{if(!s||!V)return;const U=N.clientX-u,le=N.clientY-p,Te=360,Ee=420;let qe=m,ca=c,Na=k,ae=C;if(v==="move"){Na=k+U,ae=C+le,z(V,Na,ae);return}if(v.includes("right")&&(qe=Math.max(Te,m+U)),v.includes("bottom")&&(ca=Math.max(Ee,c+le)),v.includes("left")){const la=m-U;la<Te?(qe=Te,Na=k+(m-Te)):(qe=la,Na=k+U)}if(v.includes("top")){const la=c-le;la<Ee?(ca=Ee,ae=C+(c-Ee)):(ca=la,ae=C+le)}V.style.width=`${qe}px`,V.style.height=`${ca}px`,z(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 N=>{if(!Array.isArray(N)||N.length===0){w.value=[];return}b.value=!0;const U=[];for(const le of N)if(le.url&&!le.url.startsWith("blob:")&&!le.url.startsWith("http"))try{const Te=await Cl.downloadFile(le.url),Ee=URL.createObjectURL(Te);U.push({...le,blobUrl:Ee})}catch(Te){console.error(`Failed to load image for preview: ${le.url}`,Te),U.push({...le,blobUrl:""})}else U.push({...le,blobUrl:le.url});w.value=U,b.value=!1},{deep:!0,immediate:!0});const y=e.ref(0),L=e.ref(null),$=e.ref(null),K=e.computed(()=>w.value[y.value]||null),ie=()=>{if(!w.value.length){y.value=0;return}if(r.defaultImageName){const N=w.value.findIndex(U=>(U==null?void 0:U.name)===r.defaultImageName);y.value=N>=0?N:0}else y.value=0},Se=N=>{if(!w.value.length)return;const U=Math.max(0,Math.min(N,w.value.length-1));y.value=U},oe=()=>Se(y.value-1),X=()=>Se(y.value+1),pe=N=>{if(!N)return;const U=w.value.findIndex(le=>(le==null?void 0:le.name)===N);U>=0&&(y.value=U)},ee=()=>{if(!$.value)return;const N=$.value.parentElement;if(!N)return;const U=N.getBoundingClientRect();$.value.width=U.width,$.value.height=U.height},te=()=>{var Te,Ee;if(!$.value||!L.value||!r.focusedFieldName){$.value&&xi($.value);return}const N=(Te=L.value.$el)==null?void 0:Te.querySelector("img");if(!N)return;if(!N.complete||N.naturalWidth===0){N.onload=()=>{e.nextTick(()=>{te()})};return}const U=((Ee=K.value)==null?void 0:Ee.name)||"",le=is(r.fieldMeta,r.focusedFieldName);if(!le){xi($.value);return}if(le.imageName!==U){xi($.value);return}ee(),ju($.value,N,le.bboxNorm)},De=()=>{e.nextTick(()=>{ee(),te()})};e.watch(()=>r.focusedFieldName,()=>{if(!t.value)return;const N=is(r.fieldMeta,r.focusedFieldName);N!=null&&N.imageName&&pe(N.imageName),e.nextTick(()=>{te()})}),e.watch(()=>{var N;return(N=K.value)==null?void 0:N.name},()=>{t.value&&e.nextTick(()=>{$.value&&xi($.value),te()})}),e.watch(()=>r.visible,N=>{N?(ie(),e.nextTick(()=>{ee(),te()})):$.value&&xi($.value)}),e.watch(()=>r.defaultImageName,()=>{t.value&&ie()});let Pe=null;e.onMounted(()=>{var N;typeof ResizeObserver<"u"&&(Pe=new ResizeObserver(()=>{ee(),e.nextTick(()=>{te()})}),(N=$.value)!=null&&N.parentElement&&Pe.observe($.value.parentElement))}),e.onUnmounted(()=>{Pe&&(Pe.disconnect(),Pe=null),document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)});const ge=()=>{$.value&&xi($.value),n("update:visible",!1),n("close")};return(N,U)=>{var ca,Na;const le=e.resolveComponent("el-button"),Te=e.resolveComponent("el-image"),Ee=e.resolveComponent("Loading"),qe=e.resolveComponent("el-icon");return t.value?(e.openBlock(),e.createElementBlock("div",Hu,[U[12]||(U[12]=e.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),e.createElementVNode("div",Uu,[e.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:e.withModifiers(I,["stop"])},[U[8]||(U[8]=e.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),e.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ge},"×")],32),e.createElementVNode("div",{class:"resizable-handle top",onMousedown:U[0]||(U[0]=e.withModifiers(ae=>P(ae,"top"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle right",onMousedown:U[1]||(U[1]=e.withModifiers(ae=>P(ae,"right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:U[2]||(U[2]=e.withModifiers(ae=>P(ae,"bottom"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle left",onMousedown:U[3]||(U[3]=e.withModifiers(ae=>P(ae,"left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:U[4]||(U[4]=e.withModifiers(ae=>P(ae,"top-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:U[5]||(U[5]=e.withModifiers(ae=>P(ae,"top-right"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:U[6]||(U[6]=e.withModifiers(ae=>P(ae,"bottom-left"),["stop"]))},null,32),e.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:U[7]||(U[7]=e.withModifiers(ae=>P(ae,"bottom-right"),["stop"]))},null,32),K.value?(e.openBlock(),e.createElementBlock("div",qu,[e.createElementVNode("div",Wu,[e.createElementVNode("div",Ku,[e.createElementVNode("span",Gu,e.toDisplayString(K.value.name?K.value.name+(K.value.url&&K.value.url.lastIndexOf(".")!==-1?K.value.url.substring(K.value.url.lastIndexOf(".")):""):""),1)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Yu,[e.createVNode(le,{size:"small",disabled:y.value===0,onClick:oe},{default:e.withCtx(()=>U[9]||(U[9]=[e.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),e.createElementVNode("span",Ju,e.toDisplayString(y.value+1)+" / "+e.toDisplayString(w.value.length),1),e.createVNode(le,{size:"small",disabled:y.value===w.value.length-1,onClick:X},{default:e.withCtx(()=>U[10]||(U[10]=[e.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):e.createCommentVNode("",!0)]),w.value.length>1?(e.openBlock(),e.createElementBlock("div",Xu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(ae,la)=>(e.openBlock(),e.createElementBlock("div",{key:(ae.name||"")+"-"+la,class:e.normalizeClass(["img-thumb-item",{active:la===y.value}]),onClick:he=>Se(la)},[ae!=null&&ae.blobUrl?(e.openBlock(),e.createBlock(Te,{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",Qu,"加载失败")),e.createElementVNode("div",ed,e.toDisplayString(ae.name||"-"),1)],10,Zu))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ad,[b.value?(e.openBlock(),e.createElementBlock("div",ld,[e.createVNode(qe,{class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(Ee)]),_:1}),U[11]||(U[11]=e.createElementVNode("span",null,"图片加载中...",-1))])):(ca=K.value)!=null&&ca.blobUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(Te,{ref_key:"imageRef",ref:L,src:K.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[K.value.blobUrl],onLoad:De},null,8,["src","preview-src-list"]),e.createElementVNode("canvas",{ref_key:"canvasRef",ref:$,class:"highlight-canvas"},null,512)],64)):(e.openBlock(),e.createElementBlock("div",rd,[(Na=K.value)!=null&&Na.url?(e.openBlock(),e.createElementBlock("span",nd,"图片加载失败")):(e.openBlock(),e.createElementBlock("span",id,"暂无图片"))]))])])):(e.openBlock(),e.createElementBlock("div",od,"暂无图片"))])])):e.createCommentVNode("",!0)}}}),sd=er._export_sfc(td,[["__scopeId","data-v-48a4ecb1"]]),cd={class:"cert-preview-body"},ud={key:0,class:"pdf-preview-container"},dd={class:"thumbs"},pd=["onClick"],fd={class:"thumb-img"},hd=["src"],vd={key:1,class:"thumb-loading"},md={class:"thumb-title"},yd={class:"viewer"},gd={key:0,class:"viewer-img-wrap"},bd=["src"],kd={key:1,class:"viewer-loading"},xd=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))),u=e.ref({}),p=e.ref(""),m=e.ref("证书附件.pdf"),c=()=>{try{Object.values(u.value||{}).forEach(_=>{_&&URL.revokeObjectURL(_)}),p.value&&URL.revokeObjectURL(p.value)}catch{}u.value={},p.value=""},k=async _=>{if(!_||_.fileType==="pdf")return;const G=Array.isArray(_.images)?_.images:[];for(const z of G){const I=z==null?void 0:z.url;if(!(!I||u.value[I]))try{const P=await O.platformDownloadFile({url:I}),E=URL.createObjectURL(P.data);u.value={...u.value,[I]:E}}catch{}}},C=async _=>{var z;if(!_||_.fileType!=="pdf"){p.value="";return}const G=_.sourceUrl||"";if(!G){p.value="";return}if(p.value){try{URL.revokeObjectURL(p.value)}catch{}p.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:G,versionId:_==null?void 0:_.versionId,certNo:_==null?void 0:_.certNo});const I=await O.platformDownloadFile({url:G});console.log("[CertificatePreview] PDF响应:",{url:G,status:I==null?void 0:I.status,size:(z=I==null?void 0:I.data)==null?void 0:z.size});const P=URL.createObjectURL(I.data);p.value=P;const E=_.certNo?String(_.certNo):"";m.value=E?`${E}.pdf`:"证书附件.pdf"}catch(I){console.error("[CertificatePreview] PDF加载失败:",{url:G,error:I}),p.value=""}};e.watch(()=>r.visible,async _=>{var z;if(!_){c();return}const G=(z=r.versions)==null?void 0:z[0];t.value=(G==null?void 0:G.versionId)||"",await k(G),await C(G)},{immediate:!0}),e.watch(()=>t.value,async()=>{var G,z;const _=v.value;if(!_){s.value="",p.value="";return}if(_.fileType==="pdf"){s.value="",await C(_);return}p.value="",s.value=((z=(G=_.images)==null?void 0:G[0])==null?void 0:z.url)||"",await k(_)},{immediate:!0});const V=()=>{n("update:visible",!1),c()};return e.onBeforeUnmount(()=>{c()}),(_,G)=>{const z=e.resolveComponent("el-empty"),I=e.resolveComponent("el-tab-pane"),P=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(P,{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(I,{key:w.versionId,name:w.versionId,label:w.label},{default:e.withCtx(()=>[e.createElementVNode("div",cd,[w.fileType==="pdf"?(e.openBlock(),e.createElementBlock("div",ud,[p.value?(e.openBlock(),e.createBlock(ll.SsFilePreview,{key:1,fileName:m.value,blobUrl:p.value},null,8,["fileName","blobUrl"])):(e.openBlock(),e.createBlock(z,{key:0,description:"加载中"}))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",dd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.images||[],b=>(e.openBlock(),e.createElementBlock("div",{key:b.url,class:e.normalizeClass(["thumb",{active:b.url===s.value}]),onClick:y=>s.value=b.url},[e.createElementVNode("div",fd,[u.value[b.url]?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.value[b.url]},null,8,hd)):(e.openBlock(),e.createElementBlock("div",vd,"加载中"))]),e.createElementVNode("div",md,e.toDisplayString(b.name),1)],10,pd))),128))]),e.createElementVNode("div",yd,[s.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[u.value[s.value]?(e.openBlock(),e.createElementBlock("div",gd,[e.createElementVNode("img",{class:"viewer-img",src:u.value[s.value]},null,8,bd)])):(e.openBlock(),e.createElementBlock("div",kd,"加载中"))],64)):(e.openBlock(),e.createBlock(z,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(e.openBlock(),e.createBlock(z,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),wd=er._export_sfc(xd,[["__scopeId","data-v-220703c0"]]),_d={class:"ocr-candidate-wrap"},Sd={class:"ocr-candidate-left"},Ed={key:1},Cd={key:0},Dd={key:1},Nd={key:2},Td={key:3},Bd={key:0,class:"ocr-candidate-right"},Ad={class:"ocr-candidate-actions"},zd={key:1},Md={class:"dialog-footer"},Id={__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=(y=[])=>{const L=[],$=K=>{(K||[]).forEach(ie=>{if(!ie)return;const Se=ie.children||ie.childrens||ie.columns;Array.isArray(Se)&&Se.length>0?$(Se):L.push(ie)})};return $(y),L},n=a,t=l,s=e.computed(()=>{var y;return((y=C.value)==null?void 0:y.allowAdd)!==!1}),v=e.computed(()=>{var y;return((y=C.value)==null?void 0:y.allowReplace)!==!1}),u=y=>{if(!y)return[];if(Array.isArray(y))return y;if(typeof y=="string")try{const L=JSON.parse(y);return Array.isArray(L)?L:[]}catch{return[]}return[]},p=y=>{t("preview-file",y)},m=e.ref([]),c=e.ref(0),k=e.ref("");e.watch(()=>n.candidates,y=>{var L,$;m.value=(y||[]).map(K=>({...K,...(K==null?void 0:K.ocrRow)||{},selectedTargetId:(K==null?void 0:K.selectedTargetId)||"",__decision:K==null?void 0:K.__decision})),c.value=0,k.value=(($=(L=m.value)==null?void 0:L[0])==null?void 0:$.selectedTargetId)||""},{immediate:!0,deep:!0}),e.watch(()=>n.visible,y=>{var L,$;y&&(c.value=0,k.value=(($=(L=m.value)==null?void 0:L[0])==null?void 0:$.selectedTargetId)||"")});const C=e.computed(()=>{var L;const y=Number(c.value||0);return((L=m.value||[])==null?void 0:L[y])||null}),V=e.computed(()=>(r(n.columns||[])||[]).filter($=>$&&$.prop).filter($=>$.type!=="operate"&&$.label!=="操作"&&$.prop!=="operate")),_=e.computed(()=>V.value.filter(y=>y.label!=="证书附件"&&y.prop!=="证书附件")),G=y=>{if(!y)return;const L=(m.value||[]).findIndex($=>($==null?void 0:$.idx)===(y==null?void 0:y.idx));L>-1&&(c.value=L,k.value=(y==null?void 0:y.selectedTargetId)||"")},z=y=>{if(!y){k.value="";return}k.value=String((y==null?void 0:y.id)??"")},I=(y,L="")=>{const $=Number(c.value||0),K=m.value||[],ie=K[$];ie&&(ie.__decision=y,ie.selectedTargetId=L,k.value=L,m.value=[...K])},P=()=>I("skip",""),E=()=>I("add",""),S=()=>{if(!k.value){Wa.ElMessage.warning("请先选择要替换的目标记录");return}I("replace",k.value)},w=()=>{t("update:visible",!1)},b=()=>{const y=m.value||[];if(y.find($=>($==null?void 0:$.__decision)==="replace"&&!($!=null&&$.selectedTargetId))){Wa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}t("submit",y),t("update:visible",!1)};return(y,L)=>{const $=e.resolveComponent("el-table-column"),K=e.resolveComponent("svg-icon"),ie=e.resolveComponent("el-table"),Se=e.resolveComponent("el-button"),oe=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 X,pe;return[e.createElementVNode("div",_d,[e.createElementVNode("div",Sd,[L[0]||(L[0]=e.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),e.createVNode(ie,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:G},{default:e.withCtx(()=>[e.createVNode($,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,ee=>(e.openBlock(),e.createBlock($,{key:ee.prop,label:ee.label,prop:ee.prop,"min-width":ee.minWidth||160},{default:e.withCtx(({row:te})=>[ee.label==="证书附件"||ee.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u(te==null?void 0:te[ee.prop]).length>0?(e.openBlock(),e.createBlock(K,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(De=>p({row:te,prop:ee.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",Ed,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((te==null?void 0:te[ee.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),e.createVNode($,{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($,{label:"处理状态",width:"120",fixed:"right"},{default:e.withCtx(({row:ee})=>[(ee==null?void 0:ee.__decision)==="replace"?(e.openBlock(),e.createElementBlock("span",Cd,"替换")):(ee==null?void 0:ee.__decision)==="add"?(e.openBlock(),e.createElementBlock("span",Dd,"新增")):(ee==null?void 0:ee.__decision)==="skip"?(e.openBlock(),e.createElementBlock("span",Nd,"跳过")):(e.openBlock(),e.createElementBlock("span",Td,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(e.openBlock(),e.createElementBlock("div",Bd,[L[4]||(L[4]=e.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),e.createElementVNode("div",Ad,[e.createVNode(Se,{id:"themeBorderButton",onClick:P},{default:e.withCtx(()=>L[1]||(L[1]=[e.createTextVNode("跳过本行")])),_:1,__:[1]}),e.createVNode(Se,{id:"themeBorderButton",onClick:E,disabled:!s.value},{default:e.withCtx(()=>L[2]||(L[2]=[e.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),e.createVNode(Se,{class:"ok-button",id:"themeButton",onClick:S,disabled:!v.value||!k.value},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((X=C.value)==null?void 0:X.candidates)||[]).length===0?(e.openBlock(),e.createBlock(oe,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):e.createCommentVNode("",!0),e.createVNode(ie,{data:((pe=C.value)==null?void 0:pe.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:z,"highlight-current-row":""},{default:e.withCtx(()=>[e.createVNode($,{type:"index",label:"序号",width:"60"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,ee=>(e.openBlock(),e.createBlock($,{key:ee.prop,label:ee.label,prop:ee.prop,"min-width":ee.minWidth||160},{default:e.withCtx(({row:te})=>[ee.label==="证书附件"||ee.prop==="证书附件"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u(te==null?void 0:te[ee.prop]).length>0?(e.openBlock(),e.createBlock(K,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(De=>p({row:te,prop:ee.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(e.openBlock(),e.createElementBlock("span",zd,"-"))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((te==null?void 0:te[ee.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):e.createCommentVNode("",!0)])]}),footer:e.withCtx(()=>[e.createElementVNode("div",Md,[e.createVNode(Se,{id:"themeBorderButton",onClick:w},{default:e.withCtx(()=>L[5]||(L[5]=[e.createTextVNode("取消")])),_:1,__:[5]}),e.createVNode(Se,{class:"ok-button",id:"themeButton",onClick:b},{default:e.withCtx(()=>L[6]||(L[6]=[e.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},Od=er._export_sfc(Id,[["__scopeId","data-v-89e0489c"]]),Ld={class:"ocr-preview-content"},$d={class:"ocr-preview-tip"},Rd={class:"ocr-preview-table"},Vd={style:{display:"flex","align-items":"center",gap:"8px"}},Fd={class:"dialog-footer"},Pd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(a,{emit:l}){const 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 u=(V,_)=>{const G=[...v.value];if(_)G.includes(V)||G.push(V);else{const z=G.indexOf(V);z>-1&&G.splice(z,1)}v.value=G,n("update:ocrSelectedFields",G)},p=(V,_,G)=>{n("fieldChange",{rowIndex:V,prop:_,value:G})},m=()=>{n("update:ocrPreviewData",t.value),n("confirm",t.value),n("update:visible",!1)},c=()=>{n("update:visible",!1)},k=V=>typeof V!="number"?"-":`${(V*100).toFixed(1)}%`,C=V=>typeof V!="number"?"#606266":V>=.9?"#67c23a":V>=.7?"#e6a23c":"#f56c6c";return(V,_)=>{const G=e.resolveComponent("el-alert"),z=e.resolveComponent("el-table-column"),I=e.resolveComponent("el-checkbox"),P=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:c,width:"90%",style:{maxWidth:"1200px"}},{default:e.withCtx(()=>[e.createElementVNode("div",Ld,[e.createElementVNode("div",$d,[e.createVNode(G,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",Rd,[e.createVNode(E,{data:t.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(z,{type:"index",label:"序号",width:"60",fixed:""}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,w=>(e.openBlock(),e.createBlock(z,{key:w.prop,prop:w.prop,"min-width":w.minWidth||230,"class-name":w.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",Vd,[w.isAccuracy?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(I,{key:0,"model-value":v.value.includes(w.prop),onChange:b=>u(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:y})=>[w.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:C(b[w.prop]),fontWeight:500})},e.toDisplayString(k(b[w.prop])),5)):(e.openBlock(),e.createBlock(P,{key:1,modelValue:b[w.prop],"onUpdate:modelValue":L=>b[w.prop]=L,size:"small",placeholder:"请输入"+w.label,onChange:L=>p(y,w.prop,L)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Fd,[e.createVNode(S,{onClick:c,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"])}}},jd=er._export_sfc(Pd,[["__scopeId","data-v-df66eb1f"]]),Do=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=ve.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)),dn(t)));return r=r==null?void 0:r.join(","),r};function ec(a){return Wa.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",a)}function Hd(a){return Wa.axios.get(a,{responseType:"blob"})}let Yl="$R",Ud="http://222.92.178.198:55002/AIRobot",ut=["Form","BarChart","FormText","FormBlock"];const ac=a=>{var r,n;let l=(n=ve.analyzeSplitToContent(a,"@"))==null?void 0:n[((r=ve.analyzeSplitToContent(a,"@"))==null?void 0:r.length)-1];return!!(ut!=null&&ut.some(t=>l==null?void 0:l.includes(t)))},qd=async(a,l,r,n)=>{var s,v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la;let t=a;if(ac(t==null?void 0:t[0])){let he=Zd(t),Ke=(s=he==null?void 0:he.filter)==null?void 0:s.join(","),Ie=[];(v=he==null?void 0:he.hideContents)==null||v.forEach(Fe=>{if(Fe){const ba=Fe;ba&&Ie.push(`(HideGroup=Yes, prop=${ba})`)}});let se=(u=he==null?void 0:he.formContents)==null?void 0:u.filter(Fe=>{var ba;return(ba=Fe==null?void 0:Fe.filters)==null?void 0:ba.includes("@ShowHide=Hide")});(se==null?void 0:se.length)>0&&(se==null||se.forEach(Fe=>{if(Fe){const ba=Fe==null?void 0:Fe.prop;ba&&Ie.push(`(Hide=Yes, prop=${ba})`)}}));let Be=(n==null?void 0:n.menuFilter)??[];return Array.isArray(Be)||(Be=Be?[Be]:[]),Be=[...Be,...Ie],{key:"Form",name:he==null?void 0:he.groupName,value:he==null?void 0:he.formContents,contents:Array.isArray((p=he==null?void 0:he.contents)==null?void 0:p[0])&&((c=(m=he==null?void 0:he.contents)==null?void 0:m[0])!=null&&c.every(Fe=>Array.isArray(Fe)))?[(C=(k=he==null?void 0:he.contents)==null?void 0:k[0])==null?void 0:C[r]]:[he==null?void 0:he.contents],filter:"("+Ke+")",menuFilter:Be,groupFilter:he==null?void 0:he.groupFilters}}else if(((V=t==null?void 0:t[0])==null?void 0:V[0])!=="&"){let he=nc(t,n),Ke="";(_=he==null?void 0:he.tableFilter)!=null&&_.includes(Yl)?he.tableFilter=(G=he==null?void 0:he.tableFilter)==null?void 0:G.replace(Yl,""):Ke=(P=(I=(z=he==null?void 0:he.tableFilter)==null?void 0:z.replace("(",Yl))==null?void 0:I.split(Yl))==null?void 0:P[0];let Ie=[];he!=null&&he.tableFilter&&((E=ve.analyzeSplitToContent(he==null?void 0:he.tableFilter,","))==null||E.forEach(Be=>{Be!=null&&Be.includes("@ShowHide=Hide")&&Ie.push("HideGroup=Yes")}));let se=(n==null?void 0:n.menuFilter)??[];return Array.isArray(se)||(se=se?[se]:[]),se=[...se,...Ie],{key:"Table",name:he==null?void 0:he.groupName,tableColumns:he==null?void 0:he.tableColumns,assistColumn:he==null?void 0:he.columns,tableContents:l===1?he==null?void 0:he.tableContents:(w=(S=he==null?void 0:he.tableContents)==null?void 0:S[r])!=null&&w.every(Be=>Array.isArray(Be))?(b=he==null?void 0:he.tableContents)==null?void 0:b[r]:[(y=he==null?void 0:he.tableContents)==null?void 0:y[r]],filter:he==null?void 0:he.tableFilter,menuFilter:se,quotePage:Ke!==""?((K=($=(L=Ke==null?void 0:Ke.replace("*",Yl))==null?void 0:L.split(Yl))==null?void 0:$[0])==null?void 0:K.replaceAll(":","/"))??"":void 0,quoteGroup:Ke!==""?((te=(ee=(pe=(X=(oe=(Se=(ie=Ke==null?void 0:Ke.replace("*",Yl))==null?void 0:ie.split(Yl))==null?void 0:Se[1])==null?void 0:oe.replace("{",Yl))==null?void 0:X.split(Yl))==null?void 0:pe[0])==null?void 0:ee.split(":"))==null?void 0:te.filter(Be=>Be!==""))??[]:[],relatedQuotes:he==null?void 0:he.relatedQuotes,fatherSyncContents:he==null?void 0:he.fatherSyncContents,sonSyncContents:he==null?void 0:he.sonSyncContents}}else{let he=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Ke=t==null?void 0:t[0];Ke=Ke==null?void 0:Ke.slice(1,Ke==null?void 0:Ke.length),Ke=ve.analyzeSplitToContent(Ke,":"),Ke=Ke==null?void 0:Ke[(Ke==null?void 0:Ke.length)-1];let Ie=[];Ie.push("1");let se=Ke==null?void 0:Ke.replace("(",Yl);se=(De=se==null?void 0:se.split(Yl))==null?void 0:De[0],Ie.push(se);let Be=Ke==null?void 0:Ke.replace("(",Yl);if(Be=(Pe=Be==null?void 0:Be.split(Yl))==null?void 0:Pe[1],Be=(N=(ge=Be==null?void 0:Be.replace(")",Yl))==null?void 0:ge.split(Yl))==null?void 0:N[0],(le=(U=Be==null?void 0:Be.replace(",",Yl))==null?void 0:U.split(Yl))==null||le.forEach(Fe=>{Ie.push(Fe)}),Ie.push(""),Ie.push(""),(Te=Ie==null?void 0:Ie[2])!=null&&Te.includes(".xlsx")||(Ee=Ie==null?void 0:Ie[2])!=null&&Ee.includes(".xls"))try{let Fe=Ud+"/"+(Ie==null?void 0:Ie[2]),ba=await Hd(Fe),za=`生成js函数名称为${Ie==null?void 0:Ie[1]}的函数,规则为:`+(Ie==null?void 0:Ie[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((ba==null?void 0:ba.status)===200){let F=ba==null?void 0:ba.data;const j=new FormData;j.append("file",F,Ie==null?void 0:Ie[2]),j.append("query",za);let Z=await ec(j);Z=(Na=(ca=(qe=Z==null?void 0:Z.data)==null?void 0:qe.data)==null?void 0:ca.response)==null?void 0:Na.replace("generateResult",Ie==null?void 0:Ie[1]),Ie[Ie.length-2]=Z,Ie[Ie.length-1]=[{name:(la=(ae=Ie==null?void 0:Ie[2])==null?void 0:ae.split("."))==null?void 0:la[0],url:Fe}]}}catch{}return Ie=[Ie],{key:"Method",name:[],tableContents:Ie,tableColumns:he}}},Wd=(a,l)=>{var n,t,s,v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie;let r=(t=(n=ve.analyzeSplitToContent(a,"="))==null?void 0:n.filter(se=>se!=="="))==null?void 0:t.map(se=>((se==null?void 0:se[(se==null?void 0:se.length)-1])==="="&&(se=se==null?void 0:se.slice(0,(se==null?void 0:se.length)-1)),se));if(ac(r==null?void 0:r[1])){let se=Xd(r),Be=(u=(v=(s=se==null?void 0:se.filter)==null?void 0:s.replace("@",Yl))==null?void 0:v.split(Yl))==null?void 0:u[0],Fe=(c=(m=(p=se==null?void 0:se.filter)==null?void 0:p.replace("(",Yl))==null?void 0:m.split(Yl))==null?void 0:c[1],ba=(V=(C=(k=se==null?void 0:se.filter)==null?void 0:k.replace("(",Yl))==null?void 0:C.split(Yl))==null?void 0:V[0];ba="@"+((_=ba==null?void 0:ba.split("@"))==null?void 0:_[1]),Fe=Fe==null?void 0:Fe.slice(0,(Fe==null?void 0:Fe.length)-1),Fe=(z=(G=ve.analyzeSplitToContent(Fe,","))==null?void 0:G.map(F=>(F=ba+F,F)))==null?void 0:z.join("");let za=Be+"("+Fe+")";return{key:"Form",name:se==null?void 0:se.group,filter:za,formPage:((E=(P=(I=Be==null?void 0:Be.replace("*",Yl))==null?void 0:I.split(Yl))==null?void 0:P[0])==null?void 0:E.replaceAll(":","/"))??"",formGroup:((K=($=(L=(y=(b=(w=(S=Be==null?void 0:Be.replace("*",Yl))==null?void 0:S.split(Yl))==null?void 0:w[1])==null?void 0:b.replace("{",Yl))==null?void 0:y.split(Yl))==null?void 0:L[0])==null?void 0:$.split(":"))==null?void 0:K.filter(F=>F!==""))??[],value:[],menuFilter:l==null?void 0:l.menuFilter}}else{let se=nc(r,l,r==null?void 0:r[1]),Be="";(ie=se==null?void 0:se.tableFilter)!=null&&ie.includes(Yl)?se.tableFilter=(Se=se==null?void 0:se.tableFilter)==null?void 0:Se.replace(Yl,""):Be=(pe=(X=(oe=se==null?void 0:se.tableFilter)==null?void 0:oe.replace("(",Yl))==null?void 0:X.split(Yl))==null?void 0:pe[0];let Fe=(De=(te=(ee=se==null?void 0:se.tableFilter)==null?void 0:ee.replace("(",Yl))==null?void 0:te.split(Yl))==null?void 0:De[0];Fe=[{menus:(ge=(Pe=Fe==null?void 0:Fe.split("*"))==null?void 0:Pe[0])==null?void 0:ge.replaceAll(":","/"),groups:((U=(N=Fe==null?void 0:Fe.split("*"))==null?void 0:N[1])==null?void 0:U.split(":"))??[]}];let ba=(Ee=(Te=(le=se==null?void 0:se.tableFilter)==null?void 0:le.replace("(",Yl))==null?void 0:Te.split(Yl))==null?void 0:Ee[1];(ba==null?void 0:ba[(ba==null?void 0:ba.length)-1])===")"&&(ba=ba==null?void 0:ba.slice(0,(ba==null?void 0:ba.length)-1));let za=[];se!=null&&se.tableFilter&&((qe=ve.analyzeSplitToContent(se==null?void 0:se.tableFilter,","))==null||qe.forEach(j=>{j!=null&&j.includes("@ShowHide=Hide")&&za.push("HideGroup=Yes")}));let F=(l==null?void 0:l.menuFilter)??[];return Array.isArray(F)||(F=F?[F]:[]),F=[...F,...za],{key:"Table",name:se==null?void 0:se.groupName,filter:se==null?void 0:se.tableFilter,tableColumns:se==null?void 0:se.tableColumns,quotePage:Be!==""?((ae=(Na=(ca=Be==null?void 0:Be.replace("*",Yl))==null?void 0:ca.split(Yl))==null?void 0:Na[0])==null?void 0:ae.replaceAll(":","/"))??"":void 0,quoteGroup:Be!==""?((Ie=(Ke=(he=(la=Be==null?void 0:Be.replace("*",Yl))==null?void 0:la.split(Yl))==null?void 0:he[1])==null?void 0:Ke.split(":"))==null?void 0:Ie.filter(j=>j!==""))??[]:[],menuFilter:F,relatedQuotes:Fe,fatherSyncContents:(se==null?void 0:se.fatherSyncContents)??[],sonSyncContents:(se==null?void 0:se.sonSyncContents)??[]}}},Kd=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 u=>{var p,m;if(v.push(u),((p=ve.analyzeSplitToContent(a,"="))==null?void 0:p.length)<=2){if(((m=ve.analyzeSplitToContent(a,"="))==null?void 0:m.length)!==0){const c=await qd(ve.analyzeSplitToContent(a,"="),n,s,u);v.push(c)}}else v.push(Wd(a,u))}),await Promise.all(t),r.push(v)}),await Promise.all(l),r};let Ri="/",Gd="$",hn="$R";const lc=a=>{var r,n,t;let l="";if((a==null?void 0:a.length)>1){let s=a==null?void 0:a.filter((v,u)=>u!==0);s=s==null?void 0:s.join(""),s=ve.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,u)=>u!==(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}},rc=(a,l=[])=>{let r=(a==null?void 0:a.map(s=>{var v,u;return(u=s==null?void 0:s.key)==null?void 0:u.slice(1,(v=s==null?void 0:s.key)==null?void 0:v.length)}))??[],n=[];r==null||r.forEach(s=>{var v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se;if(s===""&&(s="算法库:通用算法"),s!=null&&s.includes(Gd)){let oe="",X=!0,pe=ve.analyzerSplitToWord(s,"(");(pe==null?void 0:pe.length)>1&&(oe="("+((v=ve.analyzerSplitToWord(pe==null?void 0:pe[1],")"))==null?void 0:v[0]),((p=pe==null?void 0:pe[0])==null?void 0:p[((u=pe==null?void 0:pe[0])==null?void 0:u.length)-2])==="@"&&(oe="@"+oe));let ee=s;ee=ee==null?void 0:ee.replace(oe,""),oe=dn(oe),oe=(m=ve.analyzeSplitToContent(oe,","))==null?void 0:m.map(U=>((U==null?void 0:U[(U==null?void 0:U.length)-1])===","&&(U=U==null?void 0:U.slice(0,(U==null?void 0:U.length)-1)),U)),oe!=null&&oe.includes("@ShowHide=Hide")&&(X=!1);let te=(c=ee==null?void 0:ee.replace("$",hn))==null?void 0:c.split(hn),De=te==null?void 0:te[1],Pe=te==null?void 0:te[0];Pe!=null&&Pe.includes("[")&&(Pe=(C=(k=Pe==null?void 0:Pe.replace("[",hn))==null?void 0:k.split(hn))==null?void 0:C[0],De=De+":["+((G=(_=(V=te==null?void 0:te[0])==null?void 0:V.replace("[",hn))==null?void 0:_.split(hn))==null?void 0:G[1])),Pe=(I=(z=Pe==null?void 0:Pe.replaceAll(":","/"))==null?void 0:z.replaceAll("{",""))==null?void 0:I.replaceAll("}",""),(Pe==null?void 0:Pe[(Pe==null?void 0:Pe.length)-1])!=="/"&&(Pe=Pe+"/"),De=((P=Pe==null?void 0:Pe.split("/"))==null?void 0:P[0])+":"+De;let N="";if(!(De!=null&&De.includes("[")))N=De==null?void 0:De.replaceAll(":","/"),n==null||n.push({path:N,isShow:X,filter:oe,fatherPath:Pe});else{let U=(S=(E=De==null?void 0:De.replace("[",hn))==null?void 0:E.split(hn))==null?void 0:S[1];U=U==null?void 0:U.slice(0,(U==null?void 0:U.length)-1),U=(w=ve.analyzeSplitToContent(U,","))==null?void 0:w.map(le=>((le==null?void 0:le[(le==null?void 0:le.length)-1])===","&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1)),le)),U==null||U.forEach(le=>{var Te,Ee;N=((Ee=(Te=De==null?void 0:De.replace("[",hn))==null?void 0:Te.split(hn))==null?void 0:Ee[0])+le,N=N==null?void 0:N.replaceAll(":","/"),n==null||n.push({path:N,isShow:X,filter:oe,fatherPath:Pe})})}}else{let oe="",X=!0,pe=ve.analyzerSplitToWord(s,"(");(pe==null?void 0:pe.length)>1&&(oe=(b=lc(pe))==null?void 0:b.filter);let ee=s;if(ee=ee==null?void 0:ee.replace(oe,""),(oe==null?void 0:oe[0])==="("){oe=oe==null?void 0:oe.slice(1,(oe==null?void 0:oe.length)-1);let De=[];(y=ve.analyzeSplitToContent(oe,","))==null||y.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),De.push(dn(Pe))}),oe=De==null?void 0:De.join(",")}else oe=dn(oe);oe=(L=ve.analyzeSplitToContent(oe,","))==null?void 0:L.map(De=>((De==null?void 0:De[(De==null?void 0:De.length)-1])===","&&(De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1)),De)),oe!=null&&oe.includes("@ShowHide=Hide")&&(X=!1),(ee==null?void 0:ee[(ee==null?void 0:ee.length)-1])==="}"&&(ee=ee+":"),ee=($=ee==null?void 0:ee.replaceAll("{",""))==null?void 0:$.replaceAll("}","");let te="";if(ee!=null&&ee.includes("[")){let De=(K=ee==null?void 0:ee.replace("[",hn))==null?void 0:K.split(hn),Pe=De==null?void 0:De[1];Pe=Pe==null?void 0:Pe.slice(0,(Pe==null?void 0:Pe.length)-1),(Se=(ie=ve.analyzeSplitToContent(Pe,","))==null?void 0:ie.map(ge=>((ge==null?void 0:ge[(ge==null?void 0:ge.length)-1])===","&&(ge=ge==null?void 0:ge.slice(0,(ge==null?void 0:ge.length)-1)),ge)))==null||Se.forEach(ge=>{te=(De==null?void 0:De[0])+ge,te=te==null?void 0:te.replaceAll(":","/"),n==null||n.push({path:te,isShow:X,filter:oe})})}else te=ee==null?void 0:ee.replaceAll(":","/"),n==null||n.push({path:te,isShow:X,filter:oe})}});let t=O.cloneDeep(n);return(l==null?void 0:l.length)>0&&(t=l),t=t==null?void 0:t.filter(s=>{var v,u,p,m;return!(s!=null&&s.fatherPath)&&((u=(v=s==null?void 0:s.path)==null?void 0:v.split(Ri))==null?void 0:u.length)>1&&((m=(p=s==null?void 0:s.path)==null?void 0:p.split(Ri))==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(Ri,""),s.path}),(t==null?void 0:t.length)>0&&(n=n==null?void 0:n.map(s=>{var u,p,m,c,k,C,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&&!((u=s==null?void 0:s.path)!=null&&u.includes(Ri))&&!(t!=null&&t.find(_=>(s==null?void 0:s.path)===_))&&(s.path=v+Ri+((V=(m=(p=s==null?void 0:s.path)==null?void 0:p.split(v))==null?void 0:m[1])==null?void 0:V.slice(1,(C=(k=(c=s==null?void 0:s.path)==null?void 0:c.split(v))==null?void 0:k[1])==null?void 0:C.length))),s})),n},Yd=(a,l)=>rc([{key:a}],l),Jd=async(a,l)=>{const r=[],n=Yd(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 Kd(a==null?void 0:a.value,r)};let gl="$R",Pi="[Any]";const Xd=a=>{var v,u;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=(u=(v=t==null?void 0:t.replaceAll("{",""))==null?void 0:v.replaceAll("}",""))==null?void 0:u.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},Zd=a=>{var C,V,_,G,z,I;let l=[],r=[],n=[],t=[],s=[],v=[],u="",p=a==null?void 0:a[0];(p==null?void 0:p[0])==="*"&&(p=p==null?void 0:p.slice(1,p==null?void 0:p.length));let m=ve.analyzeSplitToContent(p,":");(C=m==null?void 0:m.filter(P=>(P==null?void 0:P[0])!=="{"&&(P==null?void 0:P[0])!=="["))==null||C.forEach(P=>{var S,w,b;(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));let E=ve.analyzerSplitToWord(P,"(");if((E==null?void 0:E.length)>1){u=(S=lc(E))==null?void 0:S.filter;let y=P==null?void 0:P.replace(u,"");if(n.push(y),(u==null?void 0:u[0])==="("){u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1);let L=[];(w=ve.analyzeSplitToContent(u,","))==null||w.forEach($=>{($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),($==null?void 0:$[0])==="("&&($=$==null?void 0:$.slice(1,($==null?void 0:$.length)-1)),($==null?void 0:$[0])!=="@"&&($="@"+$),L.push(dn($))}),u=L==null?void 0:L.join(",")}else u=dn(u);u=(b=ve.analyzeSplitToContent(u,","))==null?void 0:b.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L)),u!=null&&u.includes("@ShowHide=Hide")&&v.push(y),t=[...t,...u]}else n.push(E==null?void 0:E[0])});let c=(V=m==null?void 0:m.filter(P=>(P==null?void 0:P[0])==="{"))==null?void 0:V[0],k=(_=m==null?void 0:m.filter(P=>(P==null?void 0:P[0])==="["))==null?void 0:_[0];return l=Di(k??""),l!=null&&l.every(P=>Array.isArray(P))&&(l=[l]),(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)),s=(G=ve.analyzeSplitToContent(c,"@"))==null?void 0:G[1],s="@"+s,c=c==null?void 0:c.replace(s,""),s=dn(s),s=(z=ve.analyzeSplitToContent(s,","))==null?void 0:z.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)),(c==null?void 0:c[0])==="{"&&(c=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1)),c=(I=ve.analyzeSplitToContent(c,","))==null?void 0:I.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)),c==null||c.forEach((P,E)=>{var X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa;let S=[],w=[],b=!1,y,L=[],$=[],K=[],ie="Input",Se=[],oe=[];if(P!=null&&P.includes("==")){y=(X=P==null?void 0:P.split("=="))==null?void 0:X[0];let Qe=(pe=P==null?void 0:P.split("=="))==null?void 0:pe[1],de="";((ee=ve.analyzeSplitToContent(Qe,"$"))==null?void 0:ee.length)>1&&((te=ve.analyzeSplitToContent(Qe,"$"))==null?void 0:te[0])!=="$"?(de=(De=ve.analyzeSplitToContent(Qe,"$"))==null?void 0:De[0],de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)):((Pe=ve.analyzeSplitToContent(Qe,"}"))==null?void 0:Pe.length)>1&&(de=(ge=ve.analyzeSplitToContent(Qe,"}"))==null?void 0:ge[1]);let Ce=Qe==null?void 0:Qe.replace(de,"");(de==null?void 0:de[0])==="("&&(de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1)),(N=ve.analyzeSplitToContent(de,","))==null||N.forEach(Ue=>{var Ta;(Ue==null?void 0:Ue[0])!=="@"&&(Ue="@"+Ue),(Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])===","&&(Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1));let Ma=dn(Ue);(Ta=ve.analyzeSplitToContent(Ma,","))==null||Ta.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)})}),(Ce==null?void 0:Ce[0])==="$"&&(Ce=Ce==null?void 0:Ce.slice(1,Ce==null?void 0:Ce.length));let ha=(U=Ce==null?void 0:Ce.replace("*",gl))==null?void 0:U.split(gl);L=(le=ha==null?void 0:ha[0])==null?void 0:le.split(":"),$=(Ee=(Te=ve.analyzeSplitToContent(ha==null?void 0:ha[1],":"))==null?void 0:Te.filter((Ue,Ma)=>{var Ta,Ze;return Ma!==((Ze=(Ta=ha==null?void 0:ha[1])==null?void 0:Ta.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:Ee.map(Ue=>((Ue==null?void 0:Ue[(Ue==null?void 0:Ue.length)-1])===":"&&(Ue=Ue==null?void 0:Ue.slice(0,(Ue==null?void 0:Ue.length)-1)),Ue)),K=(ca=(qe=ve.analyzeSplitToContent(ha==null?void 0:ha[1],":"))==null?void 0:qe.filter((Ue,Ma)=>{var Ta,Ze;return Ma===((Ze=(Ta=ha==null?void 0:ha[1])==null?void 0:Ta.split(":"))==null?void 0:Ze.length)-1}))==null?void 0:ca[0],K=(ae=(Na=K==null?void 0:K.replaceAll("{",""))==null?void 0:Na.replaceAll("}",""))==null?void 0:ae.split(":"),ie="Select"}else if(((la=ve.analyzeSplitToContent(P,"="))==null?void 0:la.length)>1)if(ie="Select",y=(Ke=(he=P==null?void 0:P.replace("=",gl))==null?void 0:he.split(gl))==null?void 0:Ke[0],!(P!=null&&P.includes("If")))Se=(se=(Ie=P==null?void 0:P.replace("=",gl))==null?void 0:Ie.split(gl))==null?void 0:se[1],Se=Se==null?void 0:Se.split("||");else{let Qe=(Fe=(Be=P==null?void 0:P.replace("=",gl))==null?void 0:Be.split(gl))==null?void 0:Fe[1];oe=(ba=ve.analyzeSplitToContent(Qe,")"))==null?void 0:ba.filter(de=>!(de!=null&&de.includes("If"))),oe=oe==null?void 0:oe.map(de=>((de==null?void 0:de[0])==="("&&(de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1)),de=de==null?void 0:de.split("||"),de)),w=(za=ve.analyzeSplitToContent(Qe,")"))==null?void 0:za.filter(de=>de==null?void 0:de.includes("If")),w=w==null?void 0:w.map(de=>((de==null?void 0:de[0])==="|"&&(de=de==null?void 0:de.slice(2,de==null?void 0:de.length)),(de==null?void 0:de[0])==="("&&(de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1)),(de==null?void 0:de[0])!=="@"&&(de="@"+de),de))}else if(((F=ve.analyzeSplitToContent(P,"@"))==null?void 0:F.length)>1){y=(j=ve.analyzeSplitToContent(P,"@"))==null?void 0:j[0],(y==null?void 0:y[(y==null?void 0:y.length)-1])==="@"&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1));let Qe="@"+((Z=ve.analyzeSplitToContent(P,"@"))==null?void 0:Z[1]);Qe=dn(Qe),S=(fe=ve.analyzeSplitToContent(Qe,","))==null?void 0:fe.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de)),S!=null&&S.find(de=>de==null?void 0:de.includes("@Type"))&&(ie=(pa=(me=S==null?void 0:S.find(de=>de==null?void 0:de.includes("@Type")))==null?void 0:me.split("="))==null?void 0:pa[1])}else y=P;S!=null&&S.includes("@ShowHide=Hide")&&(b=!0),r.push({prop:y,label:y,value:"",menuPath:L,groups:$,columns:K,type:ie,options:Se,allContents:oe,filters:S,width:c==null?void 0:c.length,isFormColHidden:b,filterContents:w})}),{groupName:n,groupFilters:t,formContents:r,contents:l,filter:s,hideContents:v}},Di=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=ve.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=ve.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(Di(v))}),l=s}return l},mt=(a,l)=>{var I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze;let r,n=[],t=[],s=[],v=[],u=[],p=[],m=[],c="Input",k,C="",V="",_="",G=[],z="";if(a!=null&&a.includes("==")||a!=null&&a.includes("=")||a!=null&&a.includes("@")||a!=null&&a.includes("||"))if(r=(I=a==null?void 0:a.split("=="))==null?void 0:I[0],k=(P=a==null?void 0:a.split("=="))==null?void 0:P[0],c="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=ve.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=(y=(b=r==null?void 0:r.replace("=",gl))==null?void 0:b.split(gl))==null?void 0:y[0],r!=null&&r.includes("&")&&(r=($=(L=r==null?void 0:r.replace("&",gl))==null?void 0:L.split(gl))==null?void 0:$[0]),k=r,((K=ve.analyzeSplitToContent(a,"@"))==null?void 0:K.length)>1){if(!(a!=null&&a.includes("&"))){let oa=(ie=ve.analyzeSplitToContent(a,"@"))==null?void 0:ie[1];if((oa==null?void 0:oa[0])!=="@"&&(oa="@"+oa),oa=dn(oa),V=oa,V!=null&&V.includes("@Type")){let ce=ve.analyzeSplitToContent(V,",");ce=ce==null?void 0:ce.map(H=>((H==null?void 0:H[(H==null?void 0:H.length)-1])===","&&(H=H==null?void 0:H.slice(0,(H==null?void 0:H.length)-1)),H)),ce=(Se=ce==null?void 0:ce.filter(H=>H==null?void 0:H.includes("@Type")))==null?void 0:Se[0],c=(oe=ce==null?void 0:ce.split("="))==null?void 0:oe[1]}}}else a!=null&&a.includes("||")?n=(ee=(pe=(X=a==null?void 0:a.split("="))==null?void 0:X[1])==null?void 0:pe.split("||"))==null?void 0:ee.map(oa=>({label:oa==null?void 0:oa.replaceAll("'",""),value:oa==null?void 0:oa.replaceAll("'","")})):(c="Input",C=(Pe=(De=(te=a==null?void 0:a.replace("=",gl))==null?void 0:te.split(gl))==null?void 0:De[1])==null?void 0:Pe.replaceAll("'",""));else if((U=(N=(ge=a==null?void 0:a.replace("=",gl))==null?void 0:ge.split(gl))==null?void 0:N[1])!=null&&U.includes("||")){r=(le=a==null?void 0:a.split("="))==null?void 0:le[0],k=(Te=a==null?void 0:a.split("="))==null?void 0:Te[0];let oa=(qe=(Ee=a==null?void 0:a.replace("=",gl))==null?void 0:Ee.split(gl))==null?void 0:qe[1];oa=ve.analyzeSplitToContent(oa,")");let ce=oa==null?void 0:oa.filter(q=>!(q!=null&&q.includes("If")));ce==null||ce.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 H=oa==null?void 0:oa.filter(q=>q==null?void 0:q.includes("If"));H=H==null?void 0:H.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=H}else{let oa=a==null?void 0:a.split("=="),ce=(ca=oa==null?void 0:oa.filter(H=>(H==null?void 0:H.includes("$"))&&(H==null?void 0:H[0])!=="{"))==null?void 0:ca[0];if(ce&&!(ce!=null&&ce.includes("&"))){let H=(Na=ce==null?void 0:ce.replace("*",gl))==null?void 0:Na.split(gl),q=(H==null?void 0:H[0])===""?l==null?void 0:l.value:H==null?void 0:H[0];(q==null?void 0:q[0])==="("&&(q=(ae=ve.analyzeSplitToContent(q,")"))==null?void 0:ae[1]),q=(he=(la=q==null?void 0:q.replaceAll("{",""))==null?void 0:la.replaceAll("}",""))==null?void 0:he.replaceAll(Pi,""),(q==null?void 0:q[0])==="$"&&(q=(Ke=q==null?void 0:q.slice(1,q==null?void 0:q.length))==null?void 0:Ke.replaceAll(":","/")),v=q==null?void 0:q.split("/");let ze=(se=(Ie=H==null?void 0:H[1])==null?void 0:Ie.replace("{",gl))==null?void 0:se.split(gl),we=ze==null?void 0:ze[0];(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)),u=we==null?void 0:we.split(":"),p=(za=(ba=(Fe=(Be=ze==null?void 0:ze[1])==null?void 0:Be.replace("}",gl))==null?void 0:Fe.split(gl))==null?void 0:ba[0])==null?void 0:za.split(":");let na="";((F=ve.analyzeSplitToContent(ce,")"))==null?void 0:F.length)>1&&(na=(j=ve.analyzeSplitToContent(ce,")"))==null?void 0:j[0]),na&&na!==""&&((na==null?void 0:na[0])!=="@"&&(na="@"+na),V=Do(na))}if(oa!=null&&oa.some(H=>(H==null?void 0:H[0])==="&")){let H=(Z=oa==null?void 0:oa.filter(we=>(we==null?void 0:we[0])==="&"))==null?void 0:Z[0];(H==null?void 0:H[0])==="&"&&(H=H==null?void 0:H.slice(1,H==null?void 0:H.length)),_=(me=(fe=H==null?void 0:H.replace("(",gl))==null?void 0:fe.split(gl))==null?void 0:me[0];let q=(pa=ve.analyzeSplitToContent(H,")"))==null?void 0:pa[0];q=(de=(Qe=q==null?void 0:q.replace("(",gl))==null?void 0:Qe.split(gl))==null?void 0:de[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=(Ce=ve.analyzeSplitToContent(H,")"))==null?void 0:Ce[1];ze&&ze!==""&&(z=Do(ze))}else if(!ce&&((ha=oa==null?void 0:oa.filter(H=>(H==null?void 0:H[0])==="{"))==null?void 0:ha.length)>0){let H=oa==null?void 0:oa[(oa==null?void 0:oa.length)-1];H=H==null?void 0:H.slice(1,(H==null?void 0:H.length)-1),H=ve.analyzeSplitToContent(H,","),H=H==null?void 0:H.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)),H=H==null?void 0:H.map(q=>{var ze,we,na,ta;if(q=q==null?void 0:q.replaceAll("$",""),q!=null&&q.includes("{")){let _a="";q=q==null?void 0:q.replaceAll("{","");let ya=q==null?void 0:q.split("}");_a=((we=(ze=ya==null?void 0:ya[0])==null?void 0:ze.split(":"))==null?void 0:we[0])+":"+(ya==null?void 0:ya[1]),q=_a,q=q+":"}if(q!=null&&q.includes(Pi)){let _a="",ya=q==null?void 0:q.split(Pi);_a=((ta=(na=ya==null?void 0:ya[0])==null?void 0:na.split(":"))==null?void 0:ta[0])+":"+(ya==null?void 0:ya[1]),q=_a,q=q+":"}return q=q==null?void 0:q.replaceAll(":","/"),q}),m=H}else!((Ue=oa==null?void 0:oa[1])!=null&&Ue.includes("$"))&&((Ma=oa==null?void 0:oa[1])==null?void 0:Ma[0])!=="("&&p.push(oa==null?void 0:oa[1])}else r=(Ta=a==null?void 0:a.split("&"))==null?void 0:Ta[0],k=(Ze=a==null?void 0:a.split("&"))==null?void 0:Ze[0];return{label:r,prop:k,options:n,allContents:t,filterContents:s,menus:v,groups:u,words:p,align:"center",formType:c,filter:V,functionName:_,functionRelatedWords:G,calculatorFilter:z,relatedPages:m,value:C}},No=(a,l)=>{var n,t,s,v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,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 te=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),De=(u=te==null?void 0:te.replace(":",gl))==null?void 0:u.split(gl);if(((p=ve.analyzeSplitToContent(De==null?void 0:De[1],"="))==null?void 0:p.length)===1){let Pe=De==null?void 0:De[0],ge=[];(k=ve.analyzeSplitToContent((c=De==null?void 0:De[1])==null?void 0:c.slice(1,((m=De==null?void 0:De[1])==null?void 0:m.length)-1),","))==null||k.forEach(N=>{var U,le;((U=ve.analyzeSplitToContent(N,"="))==null?void 0:U.length)>1?((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),ge=[...ge,...No(N,l)]):((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),ge.push((le=No(N,l))==null?void 0:le[0]))}),r==null||r.push({label:Pe,prop:Pe,children:ge,align:"center"})}else{let Pe=[];if(((C=ve.analyzeSplitToContent(te,"="))==null?void 0:C.length)>=2){let N=(V=ve.analyzeSplitToContent(te,"="))==null?void 0:V[1],U=(_=ve.analyzeSplitToContent(N,"/"))==null?void 0:_.map(le=>((le==null?void 0:le[(le==null?void 0:le.length)-1])==="/"&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1)),le));Pe=U==null?void 0:U.map(le=>(le=Di(le),le))}let ge=(S=(E=(P=(I=(z=(G=te==null?void 0:te.replace("{",gl))==null?void 0:G.split(gl))==null?void 0:z[1])==null?void 0:I.replace("}",gl))==null?void 0:P.split(gl))==null?void 0:E[0])==null?void 0:S.split(",");ge==null||ge.forEach((N,U)=>{(Pe==null?void 0:Pe.length)>0&&U===0?r==null||r.push({label:N,prop:N,align:"center",formType:"Select",relatedContents:Pe==null?void 0:Pe.map(le=>{let Te={};return ge==null||ge.forEach((Ee,qe)=>{Te[Ee]=le==null?void 0:le[qe]}),Te}),options:Pe==null?void 0:Pe.map(le=>({label:le==null?void 0:le[0],value:le==null?void 0:le[0]})),mainKey:!0}):r==null||r.push({label:N,prop:N,align:"center"})})}}else if((a==null?void 0:a[0])==="{")if(((w=ve.analyzeSplitToContent(a,"="))==null?void 0:w.length)===2&&((y=(b=ve.analyzeSplitToContent(a,"="))==null?void 0:b[1])==null?void 0:y[0])==="["){let te=[];if(((L=ve.analyzeSplitToContent(a,"="))==null?void 0:L.length)>=2){let Pe=($=ve.analyzeSplitToContent(a,"="))==null?void 0:$[1],ge=(ie=(K=ve.analyzeSplitToContent(Pe,"|"))==null?void 0:K.filter(N=>N!=="|"))==null?void 0:ie.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));te=ge==null?void 0:ge.map(N=>(N=Di(N),N))}let De=(oe=(Se=a==null?void 0:a.replace("}",gl))==null?void 0:Se.split(gl))==null?void 0:oe[0];De=(X=De==null?void 0:De.slice(1,De==null?void 0:De.length))==null?void 0:X.split(","),De==null||De.forEach((Pe,ge)=>{(te==null?void 0:te.length)>0&&ge===0?r==null||r.push({label:Pe,prop:Pe,align:"center",formType:"Select",relatedContents:te==null?void 0:te.map(N=>{let U={};return De==null||De.forEach((le,Te)=>{U[le]=N==null?void 0:N[Te]}),U}),options:te==null?void 0:te.map(N=>({label:N==null?void 0:N[0],value:N==null?void 0:N[0]})),mainKey:!0}):r==null||r.push({label:Pe,prop:Pe,align:"center"})})}else(pe=ve.analyzeSplitToContent(a,","))==null||pe.forEach(te=>{var De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce;if((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),(te==null?void 0:te[0])==="{"){let H=ve.analyzeSplitToContent(te,"="),q=H==null?void 0:H[(H==null?void 0:H.length)-1],ze=[],we=[],na=[],ta="",_a="",ya=[],Pa=[],va=(De=q==null?void 0:q.replace("*",gl))==null?void 0:De.split(gl),Le=(va==null?void 0:va[0])===""?l==null?void 0:l.value:va==null?void 0:va[0];Le=ve.analyzeSplitToContent(Le,")");let Ra="";if((Le==null?void 0:Le.length)>1&&((Pe=Le==null?void 0:Le[0])==null?void 0:Pe[0])!=="&"&&(Ra=Le==null?void 0:Le[0],(Ra==null?void 0:Ra[0])!=="@"&&(Ra="@"+Ra),_a=Ra??""),Le=(ge=Le==null?void 0:Le.filter(bl=>(bl==null?void 0:bl[0])==="$"))==null?void 0:ge[0],((N=ve.analyzeSplitToContent(Le,"}"))==null?void 0:N.length)>1&&((le=(U=ve.analyzeSplitToContent(Le,"}"))==null?void 0:U[1])==null?void 0:le[0])==="("&&(Ra=(Te=ve.analyzeSplitToContent(Le,"}"))==null?void 0:Te[1],(Ra==null?void 0:Ra[0])!=="@"&&(Ra="@"+Ra),_a!==""&&(_a=_a+","),_a=_a+Ra),(Ee=Le==null?void 0:Le.slice(1,(Le==null?void 0:Le.length)-1))!=null&&Ee.includes("$")||(Le=(qe=ve.analyzeSplitToContent(Le,"}"))==null?void 0:qe[0]),(Le==null?void 0:Le[0])==="$"&&(Le=(ca=Le==null?void 0:Le.replace("{",""))==null?void 0:ca.replace("}",":"),Le=(Na=Le==null?void 0:Le.slice(1,Le==null?void 0:Le.length))==null?void 0:Na.replaceAll(":","/")),Le!=null&&Le.includes("$")){let bl=(ae=Le==null?void 0:Le.split("$"))==null?void 0:ae[0];bl=(la=bl==null?void 0:bl.split("/"))==null?void 0:la[0],Le=bl+"/"+((he=Le==null?void 0:Le.split("$"))==null?void 0:he[1])+"/"}ze=(Le==null?void 0:Le.split("/"))??[];let pl=(Ie=(Ke=va==null?void 0:va[1])==null?void 0:Ke.replace("{",gl))==null?void 0:Ie.split(gl);if((Fe=(Be=(se=va==null?void 0:va[1])==null?void 0:se.split("(@"))==null?void 0:Be[0])!=null&&Fe.includes("&&")||(F=(za=(ba=va==null?void 0:va[1])==null?void 0:ba.split("@"))==null?void 0:za[0])!=null&&F.includes("&&")){let bl=(j=va==null?void 0:va[1])!=null&&j.includes("(@")?(me=(fe=(Z=va==null?void 0:va[1])==null?void 0:Z.split("(@"))==null?void 0:fe[0])==null?void 0:me.split("&&"):(de=(Qe=(pa=va==null?void 0:va[1])==null?void 0:pa.split("@"))==null?void 0:Qe[0])==null?void 0:de.split("&&");ya=bl==null?void 0:bl.map(Ua=>{var $l,zl;return(Ua==null?void 0:Ua[0])==="*"&&(Ua=Ua==null?void 0:Ua.slice(1,Ua==null?void 0:Ua.length)),Ua=(zl=($l=Ua==null?void 0:Ua.replace("{",gl))==null?void 0:$l.split(gl))==null?void 0:zl[0],(Ua==null?void 0:Ua[(Ua==null?void 0:Ua.length)-1])===":"&&(Ua=Ua==null?void 0:Ua.slice(0,(Ua==null?void 0:Ua.length)-1)),Ua=Ua==null?void 0:Ua.split(":"),Ua});let Vl=[];bl==null||bl.forEach((Ua,$l)=>{var zl,La;(Ua==null?void 0:Ua[0])==="*"&&(Ua=Ua==null?void 0:Ua.slice(1,Ua==null?void 0:Ua.length)),Ua=(La=(zl=Ua==null?void 0:Ua.replace("{",gl))==null?void 0:zl.split(gl))==null?void 0:La[1],(Ua==null?void 0:Ua[(Ua==null?void 0:Ua.length)-1])==="}"&&(Ua=Ua==null?void 0:Ua.slice(0,(Ua==null?void 0:Ua.length)-1)),Ua=Ua==null?void 0:Ua.split(","),Vl.push($l===0?(Ua==null?void 0:Ua.length)-1:Ua==null?void 0:Ua.length),Pa=[...Pa,...Ua]}),Vl=(Ce=ve.prefixSum(Vl))==null?void 0:Ce.map(Ua=>Ua==null?void 0:Ua.total),ya=ya==null?void 0:ya.map((Ua,$l)=>({number:Vl==null?void 0:Vl[$l],contents:Ua}))}let _l=pl==null?void 0:pl[0];(_l==null?void 0:_l[(_l==null?void 0:_l.length)-1])===":"&&(_l=_l==null?void 0:_l.slice(0,(_l==null?void 0:_l.length)-1)),we=(_l==null?void 0:_l.split(":"))??[],na=((Ta=(Ma=(Ue=(ha=pl==null?void 0:pl[1])==null?void 0:ha.replace("}",gl))==null?void 0:Ue.split(gl))==null?void 0:Ma[0])==null?void 0:Ta.split(","))??[];let Xl=(oa=H==null?void 0:H[0])==null?void 0:oa.slice(1,((Ze=H==null?void 0:H[0])==null?void 0:Ze.length)-2);_a&&_a!==""&&(ta=Do(_a)),(ce=Xl==null?void 0:Xl.split(","))==null||ce.forEach((bl,Vl)=>{var Ua,$l,zl,La,al;((Ua=ve.analyzeSplitToContent(bl,"@"))==null?void 0:Ua.length)>1&&(bl=($l=ve.analyzeSplitToContent(bl,"@"))==null?void 0:$l[0],(bl==null?void 0:bl[(bl==null?void 0:bl.length)-1])==="@"&&(bl=bl==null?void 0:bl.slice(0,(bl==null?void 0:bl.length)-1))),r.push({label:bl,prop:bl,align:"center",menus:ze,groups:(ya==null?void 0:ya.length)===0?we:(zl=ya==null?void 0:ya.find(nl=>(nl==null?void 0:nl.number)>=Vl))==null?void 0:zl.contents,words:(Pa==null?void 0:Pa.length)===0?(La=na==null?void 0:na[Vl])==null?void 0:La.split(":"):(al=Pa==null?void 0:Pa[Vl])==null?void 0:al.split(":"),formType:(ze==null?void 0:ze.length)>0?"Select":"Input",mainKey:Vl===0,filter:ta,isMainPath:(ya==null?void 0:ya.findIndex(nl=>(nl==null?void 0:nl.number)>=Vl))===0})})}else r.push({label:te,prop:te,align:"center"})});else{let te=(ee=ve.analyzeSplitToContent(a,","))==null?void 0:ee.map(De=>((De==null?void 0:De[(De==null?void 0:De.length)-1])===","&&(De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1)),De));te==null||te.forEach(De=>{r.push(mt(De,l))})}return r},Qd=(a,l)=>{var v,u,p,m,c;let r=a;if(!a)return;let n="";((v=ve.analyzeSplitToContent(a,"}"))==null?void 0:v.length)>1&&(r=(u=ve.analyzeSplitToContent(a,"}"))==null?void 0:u[0],n=(p=ve.analyzeSplitToContent(a,"}"))==null?void 0:p[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=ve.analyzeSplitToContent(r,","))==null||m.forEach(k=>{var C;(k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),(k==null?void 0:k[0])==="{"?(C=No(k,l))==null||C.forEach(V=>{t.push(V)}):t.push(mt(k,l))}),t!=null&&t.some(k=>{var C;return(C=k==null?void 0:k.prop)==null?void 0:C.includes("@")})&&(t=t==null?void 0:t.filter(k=>{var C;return!((C=k==null?void 0:k.prop)!=null&&C.includes("@"))})),n!==""&&((n==null?void 0:n[0])=="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),(c=ve.analyzeSplitToContent(n,","))==null||c.forEach(k=>{var C;(k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),(k==null?void 0:k[0])==="{"?(C=No(k,l))==null||C.forEach(V=>{s.push(V)}):s.push(mt(k,l))})),{columns:t,secondColumns:s}},dn=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],u=(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=ve.analyzeSplitToContent(v,","))==null?void 0:s.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==null?void 0:p[0])==="("&&(p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1)),u+p)),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}},os=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},ts=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=ve.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=dn(n),n)),l==null?void 0:l.join(",")},nc=(a,l,r="")=>{var P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce;let n=[],t=[],s=[],v="",u="",p="",m=[],c=[],k=[],C="";if(((P=a==null?void 0:a[0])==null?void 0:P[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=(y=ve.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:y[0],(v==null?void 0:v[0])!=="@"&&(v="@"+v),v=Do(v),p=(L=ve.analyzeSplitToContent(a==null?void 0:a[0],")"))==null?void 0:L[1],(p==null?void 0:p[0])==="$"&&(p=p==null?void 0:p.slice(1,p==null?void 0:p.length)),p=p==null?void 0:p.replaceAll(":","/"));let _=ve.analyzeSplitToContent(a==null?void 0:a[0],":");if(n=($=_==null?void 0:_.filter(H=>(H==null?void 0:H[0])!=="{"&&(H==null?void 0:H[0])!=="["))==null?void 0:$.join(""),u=(K=a==null?void 0:a[0])==null?void 0:K.replace(n,""),(n==null?void 0:n[0])==="("&&(n=""),C=(ie=_==null?void 0:_.filter(H=>(H==null?void 0:H[0])!=="["))==null?void 0:ie.join(""),C=(Se=a==null?void 0:a[0])==null?void 0:Se.replace(C,""),u=u==null?void 0:u.replace(C,""),(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)),((oe=ve.analyzeSplitToContent(u,"@"))==null?void 0:oe.length)>1&&(v=(X=ve.analyzeSplitToContent(u,"@"))==null?void 0:X[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=dn(v),u=(pe=ve.analyzeSplitToContent(u,"@"))==null?void 0:pe[0],u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1)),((ee=ve.analyzeSplitToContent(n,"@"))==null?void 0:ee.length)>1){v!==""&&(v=v+",");let H=(te=ve.analyzeSplitToContent(n,"@"))==null?void 0:te[1];H="@"+H,H=dn(H),v=v+H,n=(De=ve.analyzeSplitToContent(n,"@"))==null?void 0:De[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(":"),(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)),r!==""){let H=(Pe=ve.analyzeSplitToContent(r,")"))==null?void 0:Pe[0],q=(ge=ve.analyzeSplitToContent(r,"@"))==null?void 0:ge[1];p=(U=(N=ve.analyzeSplitToContent(r,"@"))==null?void 0:N[0])==null?void 0:U.replace(H,""),(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)),H=ts(H),q=ts(q);let ze=H??"";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,(p==null?void 0:p[0])==="$"&&(p=p==null?void 0:p.slice(1,p==null?void 0:p.length)),p=(le=ve.analyzeSplitToContent(p,":"))==null?void 0:le.filter((we,na)=>{var ta;return!((we==null?void 0:we[0])==="{"&&na===((ta=ve.analyzeSplitToContent(p,":"))==null?void 0:ta.length)-1)}),p=p==null?void 0:p.join(""),(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)),v!=null&&v.includes("@Sync")||(v=v===""?v+"@Sync=(Yes,Yes)":v+",@Sync=(Yes,Yes)"),p!=null&&p.includes("$")){let we=(Ee=(Te=p==null?void 0:p.replace("*",gl))==null?void 0:Te.split(gl))==null?void 0:Ee[1],na=(ca=(qe=p==null?void 0:p.replace("*",gl))==null?void 0:qe.split(gl))==null?void 0:ca[0];na=na==null?void 0:na.split("$"),na=((ae=(Na=na==null?void 0:na[0])==null?void 0:Na.split(":"))==null?void 0:ae[0])+":"+(na==null?void 0:na[1])+":",p=na+"*"+we}else p=(la=p==null?void 0:p.replaceAll("{",""))==null?void 0:la.replaceAll("}","")}v!==""&&v&&(v="("+v+")"),v=p+v,((he=ve.analyzeSplitToContent(u,"}"))==null?void 0:he.length)>1&&(u=(Ke=ve.analyzeSplitToContent(u,"}"))==null?void 0:Ke.filter(H=>(H==null?void 0:H[0])!=="@"),u=u==null?void 0:u.join(""));let G=Qd(u,l);s=u===""?[]:(G==null?void 0:G.columns)??[],k=ve.getColumnChild(s);let z=ve.getColumnChild(s);s!=null&&s.some(H=>{var q;return Array.isArray(H==null?void 0:H.children)&&((q=H==null?void 0:H.children)==null?void 0:q.length)>0})&&(s=[s]),t=C?Di(C):[],!(t!=null&&t.every(H=>Array.isArray(H)))&&(t==null?void 0:t.length)>0&&(t=[t]),(t==null?void 0:t.length)>0&&(Array.isArray(t==null?void 0:t[0])&&((Ie=t==null?void 0:t[0])!=null&&Ie.every(H=>Array.isArray(H)))?t=t==null?void 0:t.map((H,q)=>(H=H.map((ze,we)=>(ze.unshift("{}"),ze.unshift((we+1).toString()),ze)),H)):t=t==null?void 0:t.map((H,q)=>(H.unshift("{}"),H.unshift((q+1).toString()),H))),G!=null&&G.secondColumns&&((se=G==null?void 0:G.secondColumns)==null?void 0:se.length)>0&&((t==null?void 0:t.length)>0?t=t==null?void 0:t.map((H,q)=>{var ze,we;return Array.isArray(H==null?void 0:H[0])?H=H==null?void 0:H.map((na,ta)=>{var _a,ya;return na.unshift((ya=(_a=G==null?void 0:G.secondColumns)==null?void 0:_a[ta])==null?void 0:ya.prop),na}):H.unshift((we=(ze=G==null?void 0:G.secondColumns)==null?void 0:ze[q])==null?void 0:we.prop),H}):t=(Be=G==null?void 0:G.secondColumns)==null?void 0:Be.map((H,q)=>(H=[H==null?void 0:H.label],H.push(q),H)),s.unshift({label:"",prop:"disabled",sortable:!1})),k=k==null?void 0:k.map(H=>{var q,ze;return{menus:H==null?void 0:H.menus,content:((q=H==null?void 0:H.menus)==null?void 0:q.join("/"))+gl+((ze=H==null?void 0:H.groups)==null?void 0:ze.join("/"))}});let I=[];if(((ba=(Fe=v==null?void 0:v.replace("(",gl))==null?void 0:Fe.split(gl))==null?void 0:ba[0])!==""&&(I=(F=(za=v==null?void 0:v.replace("(",gl))==null?void 0:za.split(gl))==null?void 0:F[0],I=[I],I=I==null?void 0:I.map(H=>{var ze,we,na;let q=H==null?void 0:H.split("*");return{menus:(ze=q==null?void 0:q[0])==null?void 0:ze.split(":"),content:((we=q==null?void 0:q[0])==null?void 0:we.replaceAll(":","/"))+gl+((na=q==null?void 0:q[1])==null?void 0:na.replaceAll(":","/"))}}),k=[...k,...I]),k=k==null?void 0:k.filter(H=>{var q;return(H==null?void 0:H.menus)&&((q=H==null?void 0:H.menus)==null?void 0:q.length)>0}),k=k==null?void 0:k.map(H=>H==null?void 0:H.content),k=[...new Set(k)],k=k==null?void 0:k.map(H=>{var q,ze;return{menus:(q=H==null?void 0:H.split(gl))==null?void 0:q[0],groups:((ze=H==null?void 0:H.split(gl))==null?void 0:ze[1])??[]}}),m=z==null?void 0:z.filter(H=>{var q;return(H==null?void 0:H.filter)&&((q=H==null?void 0:H.filter)==null?void 0:q.includes("@Sync"))}),(m==null?void 0:m.length)>0&&(m=m==null?void 0:m.filter(H=>{var q,ze,we,na;return(na=(we=(ze=(q=ve.analyzeSplitToContent(H==null?void 0:H.filter,","))==null?void 0:q.find(ta=>ta==null?void 0:ta.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:we[0])==null?void 0:na.includes("Yes")}),m=os(m)),c=z==null?void 0:z.filter(H=>{var q;return(H==null?void 0:H.filter)&&((q=H==null?void 0:H.filter)==null?void 0:q.includes("@Sync"))}),(c==null?void 0:c.length)>0&&(c=c==null?void 0:c.filter(H=>{var q,ze,we,na;return(na=(we=(ze=(q=ve.analyzeSplitToContent(H==null?void 0:H.filter,","))==null?void 0:q.find(ta=>ta==null?void 0:ta.includes("@Sync")))==null?void 0:ze.split(","))==null?void 0:we[1])==null?void 0:na.includes("Yes")}),c=os(c)),v!==""&&(v!=null&&v.includes("@Sync"))&&(v==null?void 0:v[0])!=="("){let H=(j=v==null?void 0:v.replace("(",gl))==null?void 0:j.split(gl),q=H==null?void 0:H[1];if(q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),q=ve.analyzeSplitToContent(q,","),(me=(fe=(Z=q==null?void 0:q.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:Z.split(","))==null?void 0:fe[0])!=null&&me.includes("Yes")){let ze=H==null?void 0:H[0];ze=[{menus:(Qe=(pa=ze==null?void 0:ze.split("*"))==null?void 0:pa[0])==null?void 0:Qe.replaceAll(":","/"),groups:((Ce=(de=ze==null?void 0:ze.split("*"))==null?void 0:de[1])==null?void 0:Ce.split(":"))??[]}],m=[...m,...ze]}if((Ma=(Ue=(ha=q==null?void 0:q.find(ze=>ze==null?void 0:ze.includes("@Sync")))==null?void 0:ha.split(","))==null?void 0:Ue[1])!=null&&Ma.includes("Yes")){let ze=H==null?void 0:H[0];ze=[{menus:(Ze=(Ta=ze==null?void 0:ze.split("*"))==null?void 0:Ta[0])==null?void 0:Ze.replaceAll(":","/"),groups:((ce=(oa=ze==null?void 0:ze.split("*"))==null?void 0:oa[1])==null?void 0:ce.split(":"))??[]}],c=[...c,...ze]}}return{groupName:n,tableColumns:s,tableFilter:v,tableContents:t,columns:(G==null?void 0:G.secondColumns)??[],relatedQuotes:k,fatherSyncContents:m,sonSyncContents:c}},ic=(a,l)=>(a=a==null?void 0:a.map((r,n)=>{var t,s,v,u;if(Array.isArray(r))r=r==null?void 0:r.map(p=>{var m,c,k,C;return p!=null&&p.isMainPath||(((m=p==null?void 0:p.children)==null?void 0:m.length)>0?p.children=ic(p.children,l):((c=p==null?void 0:p.menus)==null?void 0:c.length)>0&&!((k=r==null?void 0:r[0])!=null&&k.isMainPath)&&(p.menus=(C=p.menus)==null?void 0:C.map((V,_)=>{var G,z;return((G=p.menus)==null?void 0:G.length)-1===_&&V===""&&(l==null?void 0:l.parentContent)+"/"!==((z=p.menus)==null?void 0:z.join("/"))&&(V=l==null?void 0:l.value),p}),p.bindMenus=p.menus)),p});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=(u=r.menus)==null?void 0:u.map((p,m)=>{var c,k;return((c=r.menus)==null?void 0:c.length)-1===m&&p===""&&(l==null?void 0:l.parentContent)+"/"!==((k=r.menus)==null?void 0:k.join("/"))&&(p=l==null?void 0:l.value),p}),r.bindMenus=r.menus)}return r}),a),ep=(a,l)=>(a=a==null?void 0:a.map(r=>((r==null?void 0:r.key)==="header"&&(r.contents=ic(r.contents,l)),r)),a),yt=(a,l)=>{let r=a;return Array.isArray(r==null?void 0:r[0])?r=r==null?void 0:r.map(n=>(n=yt(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=yt(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 u,p,m,c;return((c=(u=n==null?void 0:n.prop)==null?void 0:u.split("."))==null?void 0:c[((m=(p=n==null?void 0:n.prop)==null?void 0:p.split("."))==null?void 0:m.length)-1])===v}))&&(n.mainKey=!0),n}),r};let mr="$R";const ap=O.useUnit(O.pinia),{selectTitle:Xr}=O.storeToRefs(ap),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 ti=(a=>(a[a.ORDINARY=1]="ORDINARY",a[a.BLOCK=2]="BLOCK",a[a.TEXT=3]="TEXT",a))(ti||{});const lp=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},rp=a=>{const l=tc(a==null?void 0:a.filter);return l?sc(a==null?void 0:a.contents,{position:l}):a==null?void 0:a.contents},np=a=>{const l=tc(a==null?void 0:a.filter);return l?sc(a==null?void 0:a.contents,{size:l}):a==null?void 0:a.contents},ip=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},op=a=>{if((a==null?void 0:a.filter)!==void 0&&(a==null?void 0:a.filter)!==null&&(a==null?void 0:a.filter)!==""){let l=a==null?void 0:a.contents;return l.push({key:"textRGBA",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},tp=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})},sp=async a=>{var l,r,n,t,s,v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X;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=ve.shuffle(ee.contents)),ee));if((a==null?void 0:a.filter)==="Auto"){let pe=(n=(r=a==null?void 0:a.contents)==null?void 0:r.find(Te=>(Te==null?void 0:Te.key)==="header"))==null?void 0:n.contents;Array.isArray(pe==null?void 0:pe[0])&&(pe=pe==null?void 0:pe[0]),pe=ve.getColumnChild(pe);let ee=pe==null?void 0:pe.filter(Te=>(Te==null?void 0:Te.filter)&&(Te==null?void 0:Te.filter)!==""),te=new Map,De=[];ee==null||ee.forEach(Te=>{var Ee,qe;te.get((Ee=Te==null?void 0:Te.menus)==null?void 0:Ee.join("/"))||(te.set((qe=Te==null?void 0:Te.menus)==null?void 0:qe.join("/"),Te),De.push(Te))});let Pe=(s=(t=Xr==null?void 0:Xr.value)==null?void 0:t.find(Te=>(Te==null?void 0:Te.condition)==="child"))==null?void 0:s.value,ge=De==null?void 0:De.map(Te=>{var Ee,qe,ca;return Te=(Ee=Te==null?void 0:Te.menus)==null?void 0:Ee.join("/"),(Te==null?void 0:Te[(Te==null?void 0:Te.length)-1])==="/"&&((ca=(qe=Xr==null?void 0:Xr.value)==null?void 0:qe.find(Na=>(Na==null?void 0:Na.condition)==="child"))==null?void 0:ca.parentContent)+"/"!==Te?Te=Te+Pe:(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}),N=De==null?void 0:De.map(Te=>Te==null?void 0:Te.groups),U=ge==null?void 0:ge.map(async Te=>{let Ee=await Kr(Te,!1);return{path:Te,contents:Ee}});U=await Promise.all(U);let le=U==null?void 0:U.map((Te,Ee)=>{var ca,Na,ae,la,he,Ke,Ie;let qe=(ca=Te==null?void 0:Te.contents)==null?void 0:ca.filter(se=>{var Be,Fe;return(se==null?void 0:se.name)===((Fe=N==null?void 0:N[Ee])==null?void 0:Fe[((Be=N==null?void 0:N[Ee])==null?void 0:Be.length)-1])});return qe=(la=(ae=(Na=qe==null?void 0:qe[0])==null?void 0:Na.compData)==null?void 0:ae.find(se=>(se==null?void 0:se.key)==="tableContents"))==null?void 0:la.contents,(Te==null?void 0:Te.path)===((Ke=(he=Xr==null?void 0:Xr.value)==null?void 0:he.find(se=>(se==null?void 0:se.condition)==="child"))==null?void 0:Ke.parentContent)&&(qe=((Ie=qe==null?void 0:qe.map(se=>{for(let Be in se)if(se[Be]===Pe)return se}))==null?void 0:Ie.filter(se=>se))??[]),qe??[]});if(le=le==null?void 0:le.map(Te=>(Te=Te==null?void 0:Te.map(Ee=>{var ca;let qe={};for(let Na in Ee)if(ee!=null&&ee.find(ae=>{var la,he;return((he=(la=ae==null?void 0:ae.words)==null?void 0:la[0])==null?void 0:he.replaceAll("'",""))===Na})){let ae=(ca=ee==null?void 0:ee.find(la=>{var he,Ke;return((Ke=(he=la==null?void 0:la.words)==null?void 0:he[0])==null?void 0:Ke.replaceAll("'",""))===Na}))==null?void 0:ca.prop;qe[ae]=Ee==null?void 0:Ee[Na]}return qe}),Te)),le=ve.cartesianProduct(le),Array.isArray(le==null?void 0:le[0])&&(le=le==null?void 0:le[0]),(le==null?void 0:le.length)>0&&((k=(u=(v=ee==null?void 0:ee[0])==null?void 0:v.menus)==null?void 0:u.join("/"))==null?void 0:k[((c=(m=(p=ee==null?void 0:ee[0])==null?void 0:p.menus)==null?void 0:m.join("/"))==null?void 0:c.length)-1])==="/")return(C=a==null?void 0:a.contents)==null?void 0:C.map(Ee=>{var qe;return(Ee==null?void 0:Ee.key)==="tableContents"&&(le==null?void 0:le.length)>0&&(Ee.contents=((qe=Ee.contents)==null?void 0:qe.length)>0?Ee.contents:le),Ee})}if((a==null?void 0:a.filter)==="Manual"){let pe=[],ee=[],te=(_=(V=a==null?void 0:a.contents)==null?void 0:V.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:_.contents;(te==null?void 0:te[(te==null?void 0:te.length)-1])===")"?te=(z=(G=te==null?void 0:te.replace("(",mr))==null?void 0:G.split(mr))==null?void 0:z[0]:te="",te!==""&&(pe=((P=(I=te==null?void 0:te.split("*"))==null?void 0:I[0])==null?void 0:P.split(":"))??[],ee=((y=(b=(w=(S=(E=te==null?void 0:te.split("*"))==null?void 0:E[1])==null?void 0:S.replace("{",mr))==null?void 0:w.split(mr))==null?void 0:b[0])==null?void 0:y.split(":"))??[]);let De=($=(L=a==null?void 0:a.contents)==null?void 0:L.find(N=>(N==null?void 0:N.key)==="filter"))==null?void 0:$.contents;De=(ie=(K=De==null?void 0:De.replace("(",mr))==null?void 0:K.split(mr))==null?void 0:ie[1],De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1);let Pe=(Se=a==null?void 0:a.contents)==null?void 0:Se.map(N=>{var U,le,Te,Ee,qe,ca,Na,ae,la;return(N==null?void 0:N.key)==="header"&&((U=N==null?void 0:N.contents)!=null&&U.every(he=>(he==null?void 0:he.mainKey)!==!0)&&Array.isArray(N==null?void 0:N.contents)&&!Array.isArray((le=N==null?void 0:N.contents)==null?void 0:le[0])?N.contents=(Te=N==null?void 0:N.contents)==null?void 0:Te.map((he,Ke)=>{var Ie,se,Be;return he!=null&&he.isMainPath||(Ke===0?(he.mainKey=!0,he.formType="Select",he.bindMenus=pe,he.groups=((Ie=he.groups)==null?void 0:Ie.length)===0?ee:he.groups,he.words=((se=he.words)==null?void 0:se.length)===0?[he==null?void 0:he.prop]:he.words,he.filter=De,(!(he!=null&&he.menus)||((Be=he==null?void 0:he.menus)==null?void 0:Be.length)===0)&&(he.menus=pe)):(he.mainKey=!1,he.bindMenus=pe)),he}):Array.isArray((Ee=N==null?void 0:N.contents)==null?void 0:Ee[0])&&((Na=(ca=(qe=N==null?void 0:N.contents)==null?void 0:qe[0])==null?void 0:ca.filter(()=>(pe==null?void 0:pe.length)>0))==null?void 0:Na.length)>0&&(N.contents[0]=(la=(ae=N==null?void 0:N.contents)==null?void 0:ae[0])==null?void 0:la.map((he,Ke)=>{var Ie,se,Be;return he!=null&&he.isMainPath||(Ke===0?(he.mainKey=!0,he.formType="Select",he.bindMenus=pe,he.groups=((Ie=he.groups)==null?void 0:Ie.length)===0?ee:he.groups,he.words=((se=he.words)==null?void 0:se.length)===0?[he==null?void 0:he.prop]:he.words,he.filter=De,(!(he!=null&&he.menus)||Array.isArray(he==null?void 0:he.menus)&&((Be=he==null?void 0:he.menus)==null?void 0:Be.length)===0)&&(pe==null?void 0:pe.length)>0&&(he.menus=pe)):(he.mainKey=!1,he.bindMenus=pe)),he}))),N}),ge=(oe=Pe==null?void 0:Pe.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:oe.contents;if(Array.isArray(ge==null?void 0:ge[0])&&(ge=ge==null?void 0:ge[0]),ge=ve.getColumnChild(ge),ge!=null&&ge.some(N=>{var U,le;return((le=N==null?void 0:N.menus)==null?void 0:le[((U=N==null?void 0:N.menus)==null?void 0:U.length)-1])===""})){let N=(X=Xr==null?void 0:Xr.value)==null?void 0:X.find(U=>(U==null?void 0:U.condition)==="child");Pe=ep(Pe,N)}return Pe}return a==null?void 0:a.contents},cp=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},up=a=>{var n,t,s,v,u,p,m,c,k,C,V,_;let l=a==null?void 0:a.filter;if(l!=null&&l.includes("*")&&(l="({"+((t=(n=l==null?void 0:l.replace(":",mr))==null?void 0:n.split(mr))==null?void 0:t[1])),l=(s=l==null?void 0:l.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(u=(v=l==null?void 0:l.split("="))==null?void 0:v[1])!=null&&u.includes("$")){(l==null?void 0:l[0])==="("&&(l=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1));let G=(p=l==null?void 0:l.split("="))==null?void 0:p[0],z=(m=l==null?void 0:l.split("="))==null?void 0:m[1];(c=z==null?void 0:z.slice(1,z==null?void 0:z.length))!=null&&c.includes("$")&&(z=(V=(C=(k=Xr==null?void 0:Xr.value)==null?void 0:k.filter(I=>(I==null?void 0:I.condition)==="child"))==null?void 0:C[0])==null?void 0:V.value),l=G+"="+z}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=ve.calculatorAndToOr(l);if((r==null?void 0:r.length)>0){let G=[];return r==null||r.forEach(I=>{let P={};for(let E in I){let S=E;S!=null&&S.includes("[")||(P[S]=I[E])}G.push(P)}),(_=a==null?void 0:a.contents)==null?void 0:_.map(I=>{var E,S,w;let P=(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(P=(w=ve.getEqualChild(P))==null?void 0:w.filter(b=>(b==null?void 0:b.label)!=="操作"),(I==null?void 0:I.key)==="tableContents"){let y=ve.tableToForm(I==null?void 0:I.contents,P);G==null||G.forEach(L=>{var $,K;for(let ie in L)!(($=y==null?void 0:y[0])!=null&&$.find(Se=>{var oe;return(Se==null?void 0:Se.key)===ie||((oe=Se==null?void 0:Se.key)==null?void 0:oe.includes(ie))}))&&!(y!=null&&y.find(Se=>{var oe;return(Se==null?void 0:Se.key)===ie||((oe=Se==null?void 0:Se.key)==null?void 0:oe.includes(ie))}))||(((K=L[ie])==null?void 0:K[0])!=="!"?y=y==null?void 0:y.filter(Se=>{var oe,X;return((oe=Se==null?void 0:Se.find(pe=>{var ee;return(pe==null?void 0:pe.key)===ie||((ee=pe==null?void 0:pe.key)==null?void 0:ee.includes(ie))}))==null?void 0:oe.value)===L[ie]||Array.isArray(L==null?void 0:L[ie])&&((X=L==null?void 0:L[ie])==null?void 0:X.find(pe=>{var ee;return((ee=Se==null?void 0:Se.find(te=>{var De;return(te==null?void 0:te.key)===ie||((De=te==null?void 0:te.key)==null?void 0:De.includes(ie))}))==null?void 0:ee.value)===pe}))}):y=y==null?void 0:y.filter(Se=>{var oe;return((oe=Se==null?void 0:Se.find(X=>{var pe;return(X==null?void 0:X.key)===ie||((pe=X==null?void 0:X.key)==null?void 0:pe.includes(ie))}))==null?void 0:oe.value)!==L[ie]}))}),(y==null?void 0:y.length)===0?I.contents=[]:I.contents=y==null?void 0:y.map(L=>{let $={};return L==null||L.forEach(K=>{$[K==null?void 0:K.key]=K==null?void 0:K.value}),$})}return I})}return a==null?void 0:a.contents},dp=a=>a==null?void 0:a.contents,pp=a=>a==null?void 0:a.contents,fp=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(u=>((u==null?void 0:u.key)==="header"&&(u.contents=yt(u.contents,s)),u))}return a==null?void 0:a.contents},hp=a=>{var r,n,t,s,v;let l=(a==null?void 0:a.filter)??"";if(l!==""){let u=(n=(r=l==null?void 0:l.replace("(",mr))==null?void 0:r.split(mr))==null?void 0:n[1];u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),(u==null?void 0:u[(u==null?void 0:u.length)-1])===")"&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),u=(t=ve.analyzeSplitToContent(u,","))==null?void 0:t.map(k=>((k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),k));let p=u==null?void 0:u[0];(p==null?void 0:p[0])==="("&&(p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1));let m=(u==null?void 0:u[1])??"Up",c=(s=a==null?void 0:a.contents)==null?void 0:s.map(k=>{var C,V;return m==="Up"?(k==null?void 0:k.key)==="extraButton"&&(k.contents=(C=p==null?void 0:p.split(","))==null?void 0:C.map(_=>({label:_,prop:_}))):m==="Line"&&(k==null?void 0:k.key)==="rowButton"&&(k.contents=(V=p==null?void 0:p.split(","))==null?void 0:V.map(_=>({label:_,prop:_}))),k});if(m==="Bottom"||m==="Down"){let k=(v=p==null?void 0:p.split(","))==null?void 0:v.map(C=>({label:C,prop:C}));c.push({key:"bottomButton",contents:k})}return c}return a==null?void 0:a.contents},vp=a=>a==null?void 0:a.contents,mp=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},yp=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},gp=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},bp=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},kp=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(u=>{var p;return(u==null?void 0:u.key)==="formContent"&&(u.contents=(p=u.contents)==null?void 0:p.map(m=>(m.width=s,m))),u})}if(((n=a==null?void 0:a.filter)==null?void 0:n[0])==="["){let s=Di(a==null?void 0:a.filter),v=Array.isArray(s)?s.map(p=>parseInt(p)).filter(p=>!!p&&!Number.isNaN(p)):[];return v.length?(t=a==null?void 0:a.contents)==null?void 0:t.map(p=>{if((p==null?void 0:p.key)==="formContent"){const m=p.contents??[];p.contents=m.map((c,k)=>{const C=k+1;let V=0,_=0;for(let z=0;z<v.length;z++){if(_+=v[z],C<=_){V=z;break}z===v.length-1&&(V=v.length-1)}const G=v[V]||v[v.length-1]||1;return c.width=G,c})}return p}):a==null?void 0:a.contents}return a==null?void 0:a.contents},xp=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,u;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]=(u=t.contents[0])==null?void 0:u.map(p=>(r!=null&&r.find(m=>m===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):t.contents=(v=t.contents)==null?void 0:v.map(p=>(r!=null&&r.find(m=>m===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),t})}return a==null?void 0:a.contents},wp=a=>{var l;if((a==null?void 0:a.filter)!==""){let r=a==null?void 0:a.filter;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(",");const n=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,u,p;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]=(p=s.contents[0])==null?void 0:p.map(m=>n(m)):s.contents=(u=s.contents)==null?void 0:u.map(m=>n(m))),s})}return a==null?void 0:a.contents},_p=async a=>{var n,t,s,v,u,p,m,c,k,C,V,_,G,z,I,P,E;const l=O.useUnit(O.pinia),{chooseTitle:r}=O.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=(p=(u=r==null?void 0:r.value)==null?void 0:u[0])==null?void 0:p.value;(c=(m=S==null?void 0:S[0])==null?void 0:m.compData)!=null&&c.find($=>($==null?void 0:$.key)==="header")?S=(k=S==null?void 0:S[0])==null?void 0:k.compData:S=(V=(C=S==null?void 0:S.filter($=>{var K;return(K=$==null?void 0:$.compData)==null?void 0:K.find(ie=>(ie==null?void 0:ie.key)==="header")}))==null?void 0:C[0])==null?void 0:V.compData;let b=(_=S==null?void 0:S.find($=>($==null?void 0:$.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($=>$==null?void 0:$.isMainKey))==null?void 0:G.prop)??((z=b==null?void 0:b[0])==null?void 0:z.prop);let y=(P=(I=S==null?void 0:S.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:I.contents)==null?void 0:P.find($=>($==null?void 0:$[b])===w);return(E=a==null?void 0:a.contents)==null?void 0:E.map($=>{var K;return($==null?void 0:$.key)==="formContent"&&($.contents=(K=$.contents)==null?void 0:K.map(ie=>(ie.value=y==null?void 0:y[ie==null?void 0:ie.prop],ie))),$})}return a==null?void 0:a.contents},Sp=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("{",mr))==null?void 0:r.split(mr))==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 u=ve.calculatorAndToOr(v),p=u==null?void 0:u[0],m=(s=a==null?void 0:a.extra)==null?void 0:s.row,c=[];for(let k in p)(p==null?void 0:p[k])===(m==null?void 0:m[k])?c.push(!0):c.push(!1);return c!=null&&c.every(k=>k===!0)?a==null?void 0:a.contents:[]}else 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:"tab",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Cp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"choice",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Dp=a=>{if(a!=null&&a.filter){let l=a==null?void 0:a.contents;return l.push({key:"fixType",contents:a==null?void 0:a.filter}),l}return a==null?void 0:a.contents},Np=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=ve.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},Tp=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},oc={onNumSlice:tp,onRandomContents:sp,onConditionContents:up,onFatherPaceContents:dp,onPaceContents:pp,onMainTagContents:fp,onButtonContents:hp,onPamButtonContents:vp,onRowButtonContents:mp,onRelated:_p,onRowNum:kp,onFixRow:xp,onReqItem:wp,onBottomButtonContents:yp,onConditionContent:Sp,onTabs:Ep,onSinChoice:Cp,onTextSize:ip,onTextRGBA:op,onPosition:rp,onSize:np,onShowType:Dp,onStepName:Np,onStep:Tp,onInterfaceTypeContents:cp,onBackGround:lp,onMaxColumn:bp,onEditRead:gp},Bp=async(a,l)=>{var s,v,u,p,m,c,k,C,V,_,G,z;let r="";if(((s=a==null?void 0:a.find(I=>(I==null?void 0:I.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(v=a==null?void 0:a.find(I=>(I==null?void 0:I.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=(p=(u=r==null?void 0:r.replace("(",mr))==null?void 0:u.split(mr))==null?void 0:p[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let n=(m=ve.analyzeSplitToContent(r,","))==null?void 0:m.map(I=>((I==null?void 0:I[(I==null?void 0:I.length)-1])===","&&(I=I==null?void 0:I.slice(0,(I==null?void 0:I.length)-1)),I!=null&&I.includes("(")||(I=I==null?void 0:I.replaceAll(":","=")),I)),t=a;for(let I in n){let P,E="";P=(C=(k=(c=n==null?void 0:n[I])==null?void 0:c.replace("=",mr))==null?void 0:k.split(mr))==null?void 0:C[0],E=(G=(_=(V=n==null?void 0:n[I])==null?void 0:V.replace("=",mr))==null?void 0:_.split(mr))==null?void 0:G[1];let S=(z=vn==null?void 0:vn.find(w=>(w==null?void 0:w.key)===P))==null?void 0:z.value;if(S){const w=oc[S];t=await w({contents:t,filter:E})}}return t},Nt=async(a,l)=>{var v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$;let r="";if(((v=a==null?void 0:a.find(K=>(K==null?void 0:K.key)==="filter"))==null?void 0:v.contents)!==""&&(r=(u=a==null?void 0:a.find(K=>(K==null?void 0:K.key)==="filter"))==null?void 0:u.contents),r===""||!r)return a;(r==null?void 0:r[0])===","&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r==null?void 0:r[0])==="@"||(r=(m=(p=r==null?void 0:r.replace("(",mr))==null?void 0:p.split(mr))==null?void 0:m[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let n=(c=ve.analyzeSplitToContent(r,","))==null?void 0:c.map(K=>((K==null?void 0:K[(K==null?void 0:K.length)-1])===","&&(K=K==null?void 0:K.slice(0,(K==null?void 0:K.length)-1)),K!=null&&K.includes("(")||(K=K==null?void 0:K.replaceAll(":","=")),K)),t=a,s=new Map;n==null||n.forEach(K=>{var Se,oe,X;let ie=(Se=K==null?void 0:K.split("="))==null?void 0:Se[0];if(ie==="@MainPam"&&s.get(ie)){let pe=s.get(ie);pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1);let ee=(X=(oe=K==null?void 0:K.replace("{",mr))==null?void 0:oe.split(mr))==null?void 0:X[1];ee=pe+","+ee,s.set(ie,ee)}else s.set(ie,K)}),n=Array.from(s.values()),n=n==null?void 0:n.sort((K,ie)=>{var Se,oe;return((Se=vn==null?void 0:vn.find(X=>ie==null?void 0:ie.includes(X==null?void 0:X.key)))==null?void 0:Se.order)-((oe=vn==null?void 0:vn.find(X=>K==null?void 0:K.includes(X==null?void 0:X.key)))==null?void 0:oe.order)});for(let K in n){let ie,Se="";(k=n==null?void 0:n[K])!=null&&k.includes("(")&&((C=n==null?void 0:n[K])!=null&&C.includes("@If"))?(ie=(G=(_=(V=n==null?void 0:n[K])==null?void 0:V.replace("(",mr))==null?void 0:_.split(mr))==null?void 0:G[0],Se="("+((P=(I=(z=n==null?void 0:n[K])==null?void 0:z.replace("(",mr))==null?void 0:I.split(mr))==null?void 0:P[1])):(ie=(w=(S=(E=n==null?void 0:n[K])==null?void 0:E.replace("=",mr))==null?void 0:S.split(mr))==null?void 0:w[0],Se=(L=(y=(b=n==null?void 0:n[K])==null?void 0:b.replace("=",mr))==null?void 0:y.split(mr))==null?void 0:L[1]);let oe=($=vn==null?void 0:vn.find(X=>(X==null?void 0:X.key)===ie))==null?void 0:$.value;if(oe){const X=oc[oe];t=await X({contents:t,filter:Se,extra:l})}}return t},tc=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]]},sc=(a,l)=>{var G,z,I,P,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 u=((z=l==null?void 0:l.position)==null?void 0:z[0])??(s==null?void 0:s._positionStartRow)??(v==null?void 0:v._positionStartRow),p=((I=l==null?void 0:l.position)==null?void 0:I[1])??(s==null?void 0:s._positionRowSpan)??(v==null?void 0:v._positionRowSpan);(!u||Number.isNaN(u)||u<1)&&(u=1),(!p||Number.isNaN(p)||p<1)&&(p=1);let m=((P=l==null?void 0:l.size)==null?void 0:P[0])??(s==null?void 0:s._sizeStart)??(v==null?void 0:v._sizeStart),c=((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),(c===void 0||Number.isNaN(c))&&(c=1),m=Math.max(0,Math.min(1,m)),c=Math.max(0,Math.min(1,c)),c<=m&&(m=0,c=1);const k=c-m,C=Math.max(1,Math.round(1/k));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:C,_positionStartRow:u,_positionRowSpan:p,_sizeStart:m,_sizeEnd:c}))}});const _={_positionStartRow:u,_positionRowSpan:p,_sizeStart:m,_sizeEnd:c};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 fo="$R";const Ap=O.useUnit(O.pinia),{selectTitle:zp}=O.storeToRefs(Ap);let Mp=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],Op=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],Lp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const ss=async(a,l,r=!0)=>{let n=[],t=a==null?void 0:a.map(async s=>{var k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze,we,na,ta,_a,ya,Pa,va,Le,Ra,pl,_l,Xl,bl,Vl,Ua,$l,zl,La,al,nl;let v=(_=(V=(C=(k=s==null?void 0:s.contents)==null?void 0:k.find(ia=>{var ja;return(ja=ia==null?void 0:ia.key)==null?void 0:ja.includes("struct")}))==null?void 0:C.value)==null?void 0:V[0])==null?void 0:_.类型,u=Object.values(s==null?void 0:s.name);u=u==null?void 0:u.reverse();let p=(G=s==null?void 0:s.contents)==null?void 0:G.map(ia=>ia==null?void 0:ia.key),m={comp:v,isShow:s==null?void 0:s.is_show,name:u==null?void 0:u[0],id:s==null?void 0:s.object_id,order_no:s==null?void 0:s.order_no,relatedTables:p,menuFilter:(z=s==null?void 0:s.filter)==null?void 0:z.menuFilter,status:s==null?void 0:s.status,fatherSyncContents:(I=s==null?void 0:s.filter)==null?void 0:I.fatherSyncs,relatedQuotes:(P=s==null?void 0:s.filter)==null?void 0:P.quotes,sonSyncContents:(E=s==null?void 0:s.filter)==null?void 0:E.sonSyncs,nameContents:(S=O.cloneDeep(u))==null?void 0:S.reverse()};for(let ia in u)parseInt(ia)>=1&&(m[`name${parseInt(ia)-1}`]=u[ia]);let c=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(((y=c==null?void 0:c.filter(ia=>ia==null?void 0:ia.includes("@Filter")))==null?void 0:y.length)>0){let ia=c==null?void 0:c.filter(Oe=>Oe==null?void 0:Oe.includes("@Filter"));ia=ia==null?void 0:ia[0],ia=($=(L=ia==null?void 0:ia.replace("(",fo))==null?void 0:L.split(fo))==null?void 0:$[1],ia=ia==null?void 0:ia.slice(0,(ia==null?void 0:ia.length)-1),ia!=null&&ia.includes("*")&&(ia=(ie=(K=ia==null?void 0:ia.replace("{",fo))==null?void 0:K.split(fo))==null?void 0:ie[1],ia=ia==null?void 0:ia.replace("}","")),ia=ve.calculatorAndToOr(ia);let ja=(l==null?void 0:l.originPath)??"";(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));let Oa=await Kr(ja,!1),Va=(Se=Oa==null?void 0:Oa.filter(Oe=>(Oe==null?void 0:Oe.comp)==="Table"))==null?void 0:Se[0];Va=(X=(oe=Va==null?void 0:Va.compData)==null?void 0:oe.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:X.contents;let ye=(ee=(pe=zp.value)==null?void 0:pe.find(Oe=>(Oe==null?void 0:Oe.condition)==="child"))==null?void 0:ee.value;Va=(te=Va==null?void 0:Va.map(Oe=>{for(let ue in Oe)if((Oe==null?void 0:Oe[ue])===ye)return Oe}))==null?void 0:te.filter(Oe=>Oe),Va=Va==null?void 0:Va[0],ia=ia==null?void 0:ia[0];let ma=[];for(let Oe in ia){let ue="";Wa.isObject(Va)&&(ue=(Pe=(De=Object.keys(Va))==null?void 0:De.filter(ka=>ka==null?void 0:ka.includes("."+Oe)))==null?void 0:Pe[0]),ue!==""&&(Va!=null&&Va[ue])&&(ia==null?void 0:ia[Oe])===(Va==null?void 0:Va[ue])||Va!=null&&Va[Oe]&&(ia==null?void 0:ia[Oe])===(Va==null?void 0:Va[Oe])?ma.push(!0):ma.push(!1)}if(ma!=null&&ma.some(Oe=>Oe===!1)&&((N=l==null?void 0:l.originPath)==null?void 0:N[((ge=l==null?void 0:l.originPath)==null?void 0:ge.length)-1])!=="/")return}if(v==="Table"||v==="Method"){!r&&((U=m==null?void 0:m.fatherSyncContents)==null?void 0:U.length)>0;let ia=((le=s==null?void 0:s.contents)==null?void 0:le.find(ea=>{var Je;return(Je=ea==null?void 0:ea.key)==null?void 0:Je.includes("content")}))||[],ja=[];m.comp="Table",ia.value=(Te=ia==null?void 0:ia.value)==null?void 0:Te.sort((ea,Je)=>parseInt(ea==null?void 0:ea.id)-parseInt(Je==null?void 0:Je.id)),ia.value=(Ee=ia==null?void 0:ia.value)==null?void 0:Ee.map(ea=>{let Je={};for(let Xe in ea)JSON.stringify(ea==null?void 0:ea[Xe])==="{}"?Je[Xe]="":Je[Xe]=ea==null?void 0:ea[Xe];return Je}),ja.push({key:"tableContents",contents:ia==null?void 0:ia.value});let Oa=(la=(ae=(Na=(ca=(qe=s==null?void 0:s.contents)==null?void 0:qe.find(ea=>{var Je;return(Je=ea==null?void 0:ea.key)==null?void 0:Je.includes("struct")}))==null?void 0:ca.value)==null?void 0:Na[0])==null?void 0:ae.结构)==null?void 0:la.contents;Array.isArray(Oa==null?void 0:Oa[0])?Oa[0]=(he=Oa==null?void 0:Oa[0])==null?void 0:he.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"):Oa=Oa==null?void 0:Oa.filter(ea=>(ea==null?void 0:ea.prop)!=="sort"&&(ea==null?void 0:ea.prop)!=="relatedId"),ja.push({key:"header",contents:Oa}),ja.push({key:"filter",contents:(Fe=(Be=(se=(Ie=(Ke=s==null?void 0:s.contents)==null?void 0:Ke.find(ea=>{var Je;return(Je=ea==null?void 0:ea.key)==null?void 0:Je.includes("struct")}))==null?void 0:Ie.value)==null?void 0:se[0])==null?void 0:Be.引用)==null?void 0:Fe.contents});let Va=Mp,ye=O.cloneDeep(Ip);v==="Method"&&ye.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Oa==null?void 0:Oa[0])&&((ba=Oa==null?void 0:Oa[0])==null?void 0:ba.prop)==="disabled"&&(Va=Op,ye=Lp);const ma=["推力","真空","压力","温度","流量"],Oe=m.name;Oe&&ma.includes(Oe)&&(Va=[...Va],Va.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let ue=[];if(!Array.isArray(Oa==null?void 0:Oa[0])&&(Oa!=null&&Oa.some(ea=>{var Je;return(ea==null?void 0:ea.calculatorFilter)&&((Je=ea==null?void 0:ea.calculatorFilter)==null?void 0:Je.includes("Manual"))}))){let ea=(za=Oa==null?void 0:Oa.map(Je=>Je==null?void 0:Je.calculatorFilter))==null?void 0:za.filter(Je=>Je&&(Je==null?void 0:Je.includes("Manual")));ea==null||ea.forEach(Je=>{var cl;let Xe=ve.analyzeSplitToContent(Je,",");if(Xe=Xe==null?void 0:Xe.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)),Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Xe==null?void 0:Xe.find(Fa=>Fa==null?void 0:Fa.includes("@FunctionButton"));Ve=(cl=Ve==null?void 0:Ve.split("="))==null?void 0:cl[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],ue.push(Ve)}}),ue=[...new Set(ue)],ue=ue==null?void 0:ue.map(Je=>({label:Je,prop:Je,type:"methodButton"}))}else if(Array.isArray(Oa==null?void 0:Oa[0])&&((F=ve.getColumnChild(Oa==null?void 0:Oa[0]))!=null&&F.some(ea=>{var Je;return(ea==null?void 0:ea.calculatorFilter)&&((Je=ea==null?void 0:ea.calculatorFilter)==null?void 0:Je.includes("Manual"))}))){let ea=(Z=(j=ve.getColumnChild(Oa==null?void 0:Oa[0]))==null?void 0:j.map(Je=>Je==null?void 0:Je.calculatorFilter))==null?void 0:Z.filter(Je=>Je&&(Je==null?void 0:Je.includes("Manual")));ea==null||ea.forEach(Je=>{var cl;let Xe=ve.analyzeSplitToContent(Je,",");if(Xe=Xe==null?void 0:Xe.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)),Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Extent"))&&(Ve==null?void 0:Ve.includes("Row")))&&(Xe!=null&&Xe.find(Ve=>(Ve==null?void 0:Ve.includes("Button"))&&(Ve==null?void 0:Ve.includes(","))))){let Ve=Xe==null?void 0:Xe.find(Fa=>Fa==null?void 0:Fa.includes("@FunctionButton"));Ve=(cl=Ve==null?void 0:Ve.split("="))==null?void 0:cl[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],ue.push(Ve)}}),ue=[...new Set(ue)],ue=ue==null?void 0:ue.map(Je=>({label:Je,prop:Je,type:"methodButton"}))}ja.push({key:"extraButton",contents:Va}),ja.push({key:"rowButton",contents:[...ye,...ue]}),m.compData=await Nt(ja,l),(fe=m.compData)!=null&&fe.find(ea=>(ea==null?void 0:ea.key)==="tab")&&(m.tab=(pa=(me=m.compData)==null?void 0:me.find(ea=>(ea==null?void 0:ea.key)==="tab"))==null?void 0:pa.contents),(Qe=m.compData)!=null&&Qe.find(ea=>(ea==null?void 0:ea.key)==="step")&&(m.step=(Ce=(de=m.compData)==null?void 0:de.find(ea=>(ea==null?void 0:ea.key)==="step"))==null?void 0:Ce.contents),(ha=m.compData)!=null&&ha.find(ea=>(ea==null?void 0:ea.key)==="choice")&&(m.choice=(Ma=(Ue=m.compData)==null?void 0:Ue.find(ea=>(ea==null?void 0:ea.key)==="choice"))==null?void 0:Ma.contents);let ka="",ua=(Ta=m==null?void 0:m.compData)==null?void 0:Ta.filter(ea=>(ea==null?void 0:ea.key)==="fixType");(ua==null?void 0:ua.length)>0&&r&&(ka=(Ze=ua==null?void 0:ua[0])==null?void 0:Ze.contents,m.comp=ka)}else if(v==="Form"){let ia=[],ja=(H=(ce=(oa=s==null?void 0:s.contents)==null?void 0:oa.find(Oe=>{var ue;return(ue=Oe==null?void 0:Oe.key)==null?void 0:ue.includes("content")}))==null?void 0:ce.value)==null?void 0:H[0],Oa=[],Va=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:[];Va==null||Va.forEach(Oe=>{if(Oe!=null&&Oe.includes("@Param(Hide=Yes, prop=")||Oe!=null&&Oe.includes("(Hide=Yes, prop=")){const ue=Oe==null?void 0:Oe.match(/prop=([^,)]+)/);ue!=null&&ue[1]&&Oa.push(ue==null?void 0:ue[1])}});let ye=(ya=(_a=(ta=(na=(we=s==null?void 0:s.contents)==null?void 0:we.find(Oe=>{var ue;return(ue=Oe==null?void 0:Oe.key)==null?void 0:ue.includes("struct")}))==null?void 0:na.value)==null?void 0:ta[0])==null?void 0:_a.结构)==null?void 0:ya.contents,ma=(Pa=ye==null?void 0:ye.map(Oe=>(Oe.value=ja==null?void 0:ja[Oe==null?void 0:Oe.prop],Oe)))==null?void 0:Pa.filter(Oe=>(Oe==null?void 0:Oe.prop)!=="sort"&&(Oe==null?void 0:Oe.prop)!=="relatedId");ma=ma==null?void 0:ma.map(Oe=>(Oa!=null&&Oa.includes(Oe==null?void 0:Oe.prop)&&(Oe.isHideInForm=!0),Oe)),ia.push({key:"filter",contents:(_l=(pl=(Ra=(Le=(va=s==null?void 0:s.contents)==null?void 0:va.find(Oe=>{var ue;return(ue=Oe==null?void 0:Oe.key)==null?void 0:ue.includes("struct")}))==null?void 0:Le.value)==null?void 0:Ra[0])==null?void 0:pl.引用)==null?void 0:_l.contents}),ia.push({key:"formContent",contents:ma}),ia.push({key:"paramHideProps",contents:Oa}),m.compData=await Bp(ia),(Xl=m.compData)!=null&&Xl.find(Oe=>(Oe==null?void 0:Oe.key)==="tab")&&(m.tab=(Vl=(bl=m.compData)==null?void 0:bl.find(Oe=>(Oe==null?void 0:Oe.key)==="tab"))==null?void 0:Vl.contents),(Ua=m.compData)!=null&&Ua.find(Oe=>(Oe==null?void 0:Oe.key)==="step")&&(m.step=(zl=($l=m.compData)==null?void 0:$l.find(Oe=>(Oe==null?void 0:Oe.key)==="step"))==null?void 0:zl.contents),(La=m.compData)!=null&&La.find(Oe=>(Oe==null?void 0:Oe.key)==="choice")&&(m.choice=(nl=(al=m.compData)==null?void 0:al.find(Oe=>(Oe==null?void 0:Oe.key)==="choice"))==null?void 0:nl.contents)}return m});return n=await Promise.all(t),n},$p=O.useLoginState(O.pinia),{loginUserInfo:wi}=O.storeToRefs($p),gt=async(a,l,r="Manual",n=[])=>{var p;let t=a,s;Array.isArray(l==null?void 0:l[0])?s=ve.getColumnChild(l==null?void 0:l[0]):s=l;let v=(p=s==null?void 0:s.filter(m=>{var c;return(m==null?void 0:m.calculatorFilter)&&((c=m==null?void 0:m.calculatorFilter)==null?void 0:c.includes(r))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:p.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})),u=t==null?void 0:t.map(async m=>(m=await Hp(m,v,s,r,t,n),m));return u=await Promise.all(u),u},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;return Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ve.getValueToObjectValue(l,ve.getColumnContents(t))),r==null||r.forEach(v=>{var u;if(l!=null&&l[v]){let p=l==null?void 0:l[v];s=s?p?Cl.isEqual(p.toString(),s.toString()):void 0:p}else{let p=(u=t==null?void 0:t.find(c=>(c==null?void 0:c.label)===v))==null?void 0:u.prop,m=(l==null?void 0:l[p])??0;s=s?m?Cl.isEqual(m.toString(),s.toString()):void 0:m}}),l[n]=s===void 0?void 0:s?1:0,l},kr=a=>{const[l,r,n]=O.cloneDeep(a).split(":").map(Number);let t=+a;return!a||!(a!=null&&a.includes(":"))?t:(l??0)*3600+(r??0)*60+(n??0)},Yn=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))}`},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,u=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ve.getValueToObjectValue(l,ve.getColumnContents(t))),r==null||r.forEach(p=>{var m,c,k,C,V,_,G,z,I;if(l!=null&&l[p]){if(s==="Row")if(!((c=((m=l==null?void 0:l[p])==null?void 0:m.toString())??"")!=null&&c.includes(":"))&&!((k=u==null?void 0:u.toString())!=null&&k.includes(":"))){let P=+(l==null?void 0:l[p]);u=u+P}else u=kr(u.toString())+kr((C=l==null?void 0:l[p])==null?void 0:C.toString()),u=Yn(u)}else if(s==="Row"){let P=(V=t==null?void 0:t.find(E=>(E==null?void 0:E.label)===p))==null?void 0:V.prop;if(!((G=Number.isNaN(l==null?void 0:l[P])?"":(_=l==null?void 0:l[P])==null?void 0:_.toString())!=null&&G.includes(":"))&&!((z=u==null?void 0:u.toString())!=null&&z.includes(":"))){let E=+((l==null?void 0:l[P])??0);u=u+E}else u=kr(u==null?void 0:u.toString())+kr((I=(l==null?void 0:l[P])??0)==null?void 0:I.toString()),u=Yn(u)}}),s==="Column"){let p=[];r==null||r.forEach(m=>{let c=v==null?void 0:v.map(k=>{var C;return(k==null?void 0:k[m])??(k==null?void 0:k[(C=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:C.prop])});p=[...p,...c]}),u=p.reduce((m,c)=>{let k=0;Number.isNaN(m)||(k=+m);let C=0;return Number.isNaN(c)||(C=+c),k+C},0)}return l[n]=u,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,u=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ve.getValueToObjectValue(l,ve.getColumnContents(t))),r==null||r.forEach(p=>{var m,c,k,C,V,_,G;if(l!=null&&l[p]){if(s==="Row")if(!((c=(m=l==null?void 0:l[p])==null?void 0:m.toString())!=null&&c.includes(":"))&&!((k=u==null?void 0:u.toString())!=null&&k.includes(":"))){let z=+(l==null?void 0:l[p]);u=u===0?u+z:u-z}else u=u===0?kr(u.toString())+kr(l==null?void 0:l[p].toString()):kr(u.toString())-kr(l==null?void 0:l[p].toString()),u=Yn(u)}else if(s==="Row"){let z=(C=t==null?void 0:t.find(I=>(I==null?void 0:I.label)===p))==null?void 0:C.prop;if(!((_=Number.isNaN(l==null?void 0:l[z])?"":(V=l==null?void 0:l[z])==null?void 0:V.toString())!=null&&_.includes(":"))&&!((G=u==null?void 0:u.toString())!=null&&G.includes(":"))){let I=+((l==null?void 0:l[z])??0);u=u===0?u+I:u-I}else u=u===0?kr(u.toString())+kr(((l==null?void 0:l[z])??0).toString()):kr(u.toString())-kr(((l==null?void 0:l[z])??0).toString()),u=Yn(u)}}),s==="Column"){let p=[];r==null||r.forEach(m=>{let c=v==null?void 0:v.map(k=>{var C;return(k==null?void 0:k[m])??(k==null?void 0:k[(C=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:C.prop])});p=[...p,...c]}),u=p.reduce((m,c)=>{let k=0;Number.isNaN(m)||(k=+m);let C=0;return Number.isNaN(c)||(C=+c),k-C},0)}return l[n]=u,l},Pp=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,u=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ve.getValueToObjectValue(l,ve.getColumnContents(t))),r==null||r.forEach(p=>{var m,c,k,C,V,_,G;if(l!=null&&l[p]){if(s==="Row")if(!((c=(m=l==null?void 0:l[p])==null?void 0:m.toString())!=null&&c.includes(":"))&&!((k=u==null?void 0:u.toString())!=null&&k.includes(":"))){let z=+(l==null?void 0:l[p]);u=u===0?u+z:u*z}else u=u===0?kr(u.toString())+kr(l==null?void 0:l[p].toString()):kr(u.toString())*kr(l==null?void 0:l[p].toString()),u=Yn(u)}else if(s==="Row"){let z=(C=t==null?void 0:t.find(I=>(I==null?void 0:I.label)===p))==null?void 0:C.prop;if(!(l!=null&&l[z]))u=void 0;else if(!((_=Number.isNaN(l==null?void 0:l[z])?"":(V=l==null?void 0:l[z])==null?void 0:V.toString())!=null&&_.includes(":"))&&!((G=u==null?void 0:u.toString())!=null&&G.includes(":"))){let I=+((l==null?void 0:l[z])??0);u=u===0?u+I:u*I}else u=u===0?kr(u.toString())+kr(((l==null?void 0:l[z])??0).toString()):kr(u.toString())*kr(((l==null?void 0:l[z])??0).toString()),u=Yn(u)}}),s==="Column"){let p=[];r==null||r.forEach(m=>{let c=v==null?void 0:v.map(k=>{var C;return(k==null?void 0:k[m])??(k==null?void 0:k[(C=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:C.prop])});p=[...p,...c]}),u=p.reduce((m,c)=>{let k=0;Number.isNaN(m)||(k=+m);let C=0;return Number.isNaN(c)||(C=+c),k*C},0)}return l[n]=u,l},jp=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,u=0;if(Array.isArray(l)&&(l==null?void 0:l.length)!==1&&(l=ve.getValueToObjectValue(l,ve.getColumnContents(t))),r==null||r.forEach(p=>{var m,c,k,C,V,_,G;if(l!=null&&l[p]){if(s==="Row")if(!((c=(m=l==null?void 0:l[p])==null?void 0:m.toString())!=null&&c.includes(":"))&&!((k=u==null?void 0:u.toString())!=null&&k.includes(":"))){let z=+(l==null?void 0:l[p]);u=u===0?u+z:u/z}else u=u===0?kr(u.toString())+kr(l==null?void 0:l[p].toString()):kr(u.toString())/kr(l==null?void 0:l[p].toString()),u=Yn(u)}else if(s==="Row"){let z=(C=t==null?void 0:t.find(I=>(I==null?void 0:I.label)===p))==null?void 0:C.prop;if(!((_=Number.isNaN(l==null?void 0:l[z])?"":(V=l==null?void 0:l[z])==null?void 0:V.toString())!=null&&_.includes(":"))&&!((G=u==null?void 0:u.toString())!=null&&G.includes(":"))){let I=+((l==null?void 0:l[z])??0);u=u===0?u+I:u/I}else u=u===0?kr(u.toString())+kr(((l==null?void 0:l[z])??0).toString()):kr(u.toString())/kr(((l==null?void 0:l[z])??0).toString()),u=Yn(u)}}),s==="Column"){let p=[];r==null||r.forEach(m=>{let c=v==null?void 0:v.map(k=>{var C;return(k==null?void 0:k[m])??(k==null?void 0:k[(C=t==null?void 0:t.find(V=>(V==null?void 0:V.label)===m))==null?void 0:C.prop])});p=[...p,...c]}),u=p.reduce((m,c)=>{let k=0;Number.isNaN(m)||(k=+m);let C=0;return Number.isNaN(c)||(C=+c),k/C},0)}return l[n]=u.toFixed(2),l},ho={Sum:Vp,Substract:Fp,Multiple:Pp,Divide:jp,Compare:Rp},Hp=async(a,l,r,n="Auto",t,s=[])=>{var c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X;let v=a,u=[],p=await O.getPageDataApi({platId:parseInt((c=wi==null?void 0:wi.value)==null?void 0:c.plat_id),pageName:"menu"});p=(V=(C=(k=p==null?void 0:p.data)==null?void 0:k.result)==null?void 0:C.filter(pe=>(pe==null?void 0:pe.property_name)===""))==null?void 0:V[0];let m=[];if(p!=null&&p.object_name){p=p==null?void 0:p.object_name;let pe=await O.getPageDataApi({platId:parseInt((_=wi==null?void 0:wi.value)==null?void 0:_.plat_id),pageName:p});pe=(E=(P=(I=(z=(G=pe==null?void 0:pe.data)==null?void 0:G.result)==null?void 0:z[0])==null?void 0:I.contents)==null?void 0:P.find(ee=>{var te;return(te=ee==null?void 0:ee.key)==null?void 0:te.includes("content")}))==null?void 0:E.value,u=(S=pe==null?void 0:pe.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)!==""),u==null||u.forEach(ee=>{m.push(ee.functionName),ho[ee.functionName]=new Function("return "+ee.functionContent)()})}if((l==null?void 0:l.length)===0)return v;for(let pe in l){let ee=(w=l==null?void 0:l[pe])==null?void 0:w.functionName;const te=ho==null?void 0:ho[ee];let De=(b=l==null?void 0:l[pe])==null?void 0:b.methods;if(De=ve.analyzeSplitToContent(De,","),console.log(De),(y=De==null?void 0:De.find(Pe=>Pe==null?void 0:Pe.includes("@FunctionType")))!=null&&y.includes(n)||(De==null?void 0:De.length)===0){let Pe=((K=($=(L=De==null?void 0:De.find(ge=>ge==null?void 0:ge.includes("@FunctionExtent")))==null?void 0:L.replace(":","="))==null?void 0:$.split("="))==null?void 0:K[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(ge=>ge===ee)){let ge="";try{let U=(ie=l==null?void 0:l[pe])==null?void 0:ie.functionRelatedWords,le=(s==null?void 0:s.length)>0?s==null?void 0:s.map(Ee=>{var qe;return Ee==null?void 0:Ee[(qe=l==null?void 0:l[pe])==null?void 0:qe.prop]}):["0"];le=le==null?void 0:le.map(Ee=>Ee==null?void 0:Ee.slice((Ee==null?void 0:Ee.length)-5,Ee==null?void 0:Ee.length)),le=le==null?void 0:le.map(Ee=>ve.isNumber(parseInt(Ee))&&parseInt(Ee)?parseInt(Ee):0);let Te=Math.max(...le);U=U==null?void 0:U.map(Ee=>{if(Ee!=null&&Ee.includes("'"))return Ee==null?void 0:Ee.replaceAll("'","");if(Ee!=null&&Ee.includes("@"))return Te+1;{let qe=Object.keys(v);return Ee=(v==null?void 0:v[Ee])??(v==null?void 0:v[qe==null?void 0:qe.find(ca=>ca==null?void 0:ca.includes("."+Ee))]),Ee}}),ge=te(...U)}catch(U){Wa.ElMessage.warning("关联数据出现错误,"+U.message)}let N=(Se=l==null?void 0:l[pe])==null?void 0:Se.prop;v[N]=ge}else v=te({contents:v,valueString:(oe=l==null?void 0:l[pe])==null?void 0:oe.functionRelatedWords,prop:(X=l==null?void 0:l[pe])==null?void 0:X.prop,headers:r,typeString:Pe,allContents:t})}}return v},Up=O.useLoginState(O.pinia),{loginUserInfo:Zr}=O.storeToRefs(Up),qp=O.useMenuState(O.pinia),{activeMenuPath:cs,currentMenuPath:vo}=O.storeToRefs(qp),cc=O.useUnit(O.pinia);let us="$R";const{selectTitle:Ei}=O.storeToRefs(cc),uc=async(a,l)=>{var v,u,p,m,c,k,C,V,_,G,z,I,P;let r=cs.value,n="",t=((v=Ei==null?void 0:Ei.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:(u=a==null?void 0:a[0])==null?void 0:u.object_name,n=(p=a==null?void 0:a[0])==null?void 0:p.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=(c=S==null?void 0:S.find(y=>(y==null?void 0:y.key)==="header"))==null?void 0:c.contents;w=((k=w==null?void 0:w.find(y=>y==null?void 0:y.isMainKey))==null?void 0:k.prop)??((C=w==null?void 0:w[0])==null?void 0:C.prop);let b=(_=(V=S==null?void 0:S.find(y=>(y==null?void 0:y.key)==="tableContents"))==null?void 0:V.contents)==null?void 0:_.map(y=>({label:y==null?void 0:y[w],value:y==null?void 0:y[w]}));s=(G=n==null?void 0:n.split("/"))==null?void 0:G.map(y=>(y===""?t?(t.isShow=!0,y=t):y={value:y,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}:y={condition:"parent",value:y.trim(),isShow:!0},y))}if(r!==""){let E=(z=r==null?void 0:r.split("/"))==null?void 0:z.map(S=>(S={condition:"normal",value:S.trim(),isShow:!0},S));((I=E==null?void 0:E[0])==null?void 0:I.value)===((P=s==null?void 0:s[0])==null?void 0:P.value)&&(E=E==null?void 0:E.filter((S,w)=>w!==0)),s=[...s??[],...E??[]]}n===""&&t&&((t==null?void 0:t.parentContent)!==cs.value&&(t.isShow=!1),(t==null?void 0:t.value)!==""&&s.push(t)),cc.setSelectTitle(s)},Wp=async a=>{var s,v,u,p,m,c,k,C,V;let l=await O.getPageDataApi({platId:parseInt((s=Zr==null?void 0:Zr.value)==null?void 0:s.plat_id),pageName:"menu"}),r=(v=l==null?void 0:l.data)==null?void 0:v.result,n=(c=(m=(p=(u=a==null?void 0:a.filter(_=>(_==null?void 0:_.comp)==="Table"))==null?void 0:u[0])==null?void 0:p.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="filter"))==null?void 0:c.contents;n=(V=(C=(k=n==null?void 0:n.replace("(",us))==null?void 0:k.split(us))==null?void 0:C[0])==null?void 0:V.replaceAll(":","/");let t=r==null?void 0:r.filter(_=>{var G;return(_==null?void 0:_.object_name)===vo.value+"/"||((G=vo.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(z=>{var I,P,E;return(z==null?void 0:z.key)==="header"&&(Array.isArray((I=z.contents)==null?void 0:I[0])?z.contents[0]=(E=z.contents[0])==null?void 0:E.map((S,w)=>{var b;return w===0&&(S.isExistChild=!0,(b=vo.value)!=null&&b.includes(n)&&(S.fatherPath=n)),S}):z.contents=(P=z.contents)==null?void 0:P.map((S,w)=>{var b;return w===0&&(S.isExistChild=!0,(b=vo.value)!=null&&b.includes(n)&&(S.fatherPath=n)),S})),z})),_})),a},Kr=async(a,l,r={})=>{var v,u,p,m,c,k,C,V,_,G,z,I;let n=await O.getPageDataApi({platId:parseInt((v=Zr==null?void 0:Zr.value)==null?void 0:v.plat_id),pageName:a}),t=(u=n==null?void 0:n.data)==null?void 0:u.result;if((t==null?void 0:t.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==a){let P=await O.getPageDataApi({platId:parseInt((p=Zr==null?void 0:Zr.value)==null?void 0:p.plat_id),pageName:r==null?void 0:r.originPath});if(((c=(m=P==null?void 0:P.data)==null?void 0:m.result)==null?void 0:c.length)>0){let E=await ss((k=P==null?void 0:P.data)==null?void 0:k.result,r,!1);E=E==null?void 0:E.map(async b=>{var $,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za;let y=[],L=($=Object.keys(b))==null?void 0:$.filter(F=>(F==null?void 0:F.includes("name"))&&F!=="nameContents");for(let F in b)L!=null&&L.find(j=>j===F)&&y.push(b==null?void 0:b[F]);if(y=y.reverse(),(b==null?void 0:b.comp)==="Table"){let F=(Se=(ie=(K=b==null?void 0:b.compData)==null?void 0:K.find(Z=>(Z==null?void 0:Z.key)==="tableContents"))==null?void 0:ie.contents)==null?void 0:Se.map(Z=>{let fe={};for(let me in Z)me!=="id"&&me!=="create_time"&&me!=="update_time"&&me!=="sort"&&me!=="create_user_id"&&me!=="update_user_id"&&me!=="department_id"&&me!=="relatedId"&&(fe[me]=Z==null?void 0:Z[me]);return Z=Object.values(fe),Z}),j=(X=(oe=b==null?void 0:b.compData)==null?void 0:oe.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:X.contents;if(Array.isArray(j==null?void 0:j[0])?(j[0].push({label:"排序",prop:"sort"}),j[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(pe=j[0])!=null&&pe.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(j[0]=(ee=j[0])==null?void 0:ee.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),j[0].unshift({label:"",prop:"disabled",sortable:!1}))):(j||(j=[]),j.push({label:"排序",prop:"sort"}),j.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),j!=null&&j.find(Z=>(Z==null?void 0:Z.prop)==="disabled")&&(j=j==null?void 0:j.filter(Z=>(Z==null?void 0:Z.prop)!=="disabled"),j.unshift({label:"",prop:"disabled",sortable:!1}))),j!=null&&j.some(Z=>{var fe;return(Z==null?void 0:Z.calculatorFilter)&&((fe=Z==null?void 0:Z.calculatorFilter)==null?void 0:fe.includes("Auto"))})&&(F=await gt(F,j,"Auto"),F=F==null?void 0:F.map(Z=>Object.values(Z))),b!=null&&b.fatherSyncContents){Array.isArray((te=b==null?void 0:b.fatherSyncContents)==null?void 0:te[0])&&(b.fatherSyncContents=(De=b==null?void 0:b.fatherSyncContents)==null?void 0:De[0]);let Z=(Pe=Ei.value)==null?void 0:Pe.find(fe=>(fe==null?void 0:fe.condition)==="child");b.fatherSyncContents=(ge=b==null?void 0:b.fatherSyncContents)==null?void 0:ge.map(fe=>{var me,pa,Qe,de,Ce,ha;return((pa=fe==null?void 0:fe.menus)==null?void 0:pa[((me=fe==null?void 0:fe.menus)==null?void 0:me.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(Z==null?void 0:Z.value):((de=fe==null?void 0:fe.menus)==null?void 0:de[((Qe=fe==null?void 0:fe.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(ha=fe.menus)==null?void 0:ha.slice(0,((Ce=fe.menus)==null?void 0:Ce.length)-1)),fe})}if(b!=null&&b.sonSyncContents){Array.isArray((N=b==null?void 0:b.sonSyncContents)==null?void 0:N[0])&&(b.sonSyncContents=(U=b==null?void 0:b.sonSyncContents)==null?void 0:U[0]);let Z=(le=Ei.value)==null?void 0:le.find(fe=>(fe==null?void 0:fe.condition)==="child");b.sonSyncContents=(Te=b==null?void 0:b.sonSyncContents)==null?void 0:Te.map(fe=>{var me,pa,Qe,de,Ce,ha;return((pa=fe==null?void 0:fe.menus)==null?void 0:pa[((me=fe==null?void 0:fe.menus)==null?void 0:me.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(Z==null?void 0:Z.value):((de=fe==null?void 0:fe.menus)==null?void 0:de[((Qe=fe==null?void 0:fe.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(ha=fe.menus)==null?void 0:ha.slice(0,((Ce=fe.menus)==null?void 0:Ce.length)-1)),fe})}if(b!=null&&b.relatedQuotes){Array.isArray((Ee=b==null?void 0:b.relatedQuotes)==null?void 0:Ee[0])&&(b.relatedQuotes=(qe=b==null?void 0:b.relatedQuotes)==null?void 0:qe[0]);let Z=(ca=Ei.value)==null?void 0:ca.find(fe=>(fe==null?void 0:fe.condition)==="child");b.relatedQuotes=(Na=b==null?void 0:b.relatedQuotes)==null?void 0:Na.map(fe=>{var me,pa,Qe,de,Ce,ha;return((pa=fe==null?void 0:fe.menus)==null?void 0:pa[((me=fe==null?void 0:fe.menus)==null?void 0:me.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(Z==null?void 0:Z.value):((de=fe==null?void 0:fe.menus)==null?void 0:de[((Qe=fe==null?void 0:fe.menus)==null?void 0:Qe.length)-1])==="/"&&(Z==null?void 0:Z.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(ha=fe.menus)==null?void 0:ha.slice(0,((Ce=fe.menus)==null?void 0:Ce.length)-1)),fe})}b={filter:(la=(ae=b==null?void 0:b.compData)==null?void 0:ae.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:la.contents,key:b==null?void 0:b.comp,name:y,tableColumns:j,tableContents:F,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 F=(Ie=(Ke=(he=b==null?void 0:b.compData)==null?void 0:he.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:Ke.contents)==null?void 0:Ie.map(Z=>(Z==null?void 0:Z.value)??"");F=[F];let j=(Fe=(Be=(se=b==null?void 0:b.compData)==null?void 0:se.find(Z=>(Z==null?void 0:Z.key)==="formContent"))==null?void 0:Be.contents)==null?void 0:Fe.map(Z=>(Z.value="",Z));b={contents:F,filter:(za=(ba=b==null?void 0:b.compData)==null?void 0:ba.find(Z=>(Z==null?void 0:Z.key)==="filter"))==null?void 0:za.contents,key:b==null?void 0:b.comp,name:y,value:j,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=(C=P==null?void 0:P.data)==null?void 0:C.result)==null?void 0:V[0])==null?void 0:_.father_name,isShow:!1}]},{key:a,contents:E}];await O.createPlatFormDataApi({platId:parseInt((G=Zr==null?void 0:Zr.value)==null?void 0:G.plat_id),changeData:S});let w=await O.getPageDataApi({platId:parseInt((z=Zr==null?void 0:Zr.value)==null?void 0:z.plat_id),pageName:a});t=(I=w==null?void 0:w.data)==null?void 0:I.result}}l&&await uc(t,!!(r!=null&&r.originPath));let s=await ss(t,r);return l&&(s=await Wp(s)),s==null?void 0:s.filter(P=>P)},ds=async a=>{var n,t,s,v,u,p,m,c,k,C,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,z;return(_==null?void 0:_.name)===((z=a==null?void 0:a.groups)==null?void 0:z[((G=a==null?void 0:a.groups)==null?void 0:G.length)-1])}))==null?void 0:v[0],(p=(u=r==null?void 0:r.compData)==null?void 0:u.find(_=>(_==null?void 0:_.key)==="tableContents"))!=null&&p.contents){r=(c=(m=r==null?void 0:r.compData)==null?void 0:m.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:c.contents;let _=((k=a==null?void 0:a.words)==null?void 0:k[0])??(a==null?void 0:a.prop);return r=r==null?void 0:r.filter(G=>{var z,I,P,E;return(G==null?void 0:G[a!=null&&a.endChildMenu?_:(z=a==null?void 0:a.words)==null?void 0:z[0]])===(a!=null&&a.relatedWords&&((I=a==null?void 0:a.relatedWords)==null?void 0:I.length)>0?(E=(P=a.value)==null?void 0:P.split(" "))==null?void 0:E[0]:a.value)}),r==null?void 0:r[0]}else{let _=(V=(C=r==null?void 0:r.compData)==null?void 0:C.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:V.contents,G={};return _==null||_.forEach(z=>{G[z.prop]=z.value}),G}},Kp={key:0,class:"extra-button-content"},Gp={class:"table-operator-wrap"},Yp={key:0,class:"extra-button-filter"},Jp={key:1,class:"extra-header"},Xp=["onClick"],Zp={class:"table-op-text"},Qp={class:"table-op-text"},ef={class:"drop-menu",style:{width:"120px"}},af=["onClick"],lf={key:0},rf={key:1},nf=["onClick"],of={class:"table-op-text"},tf={key:1,class:"extra-button-content tabs-button-wrapper"},sf={class:"table-operator-wrap"},cf={class:"extra-button-filter"},uf={key:0,class:"extra-header"},df={class:"table-op-action"},pf={class:"table-op-text"},ff={class:"drop-menu",style:{width:"120px"}},hf={key:0},vf={key:1},mf=["onClick"],yf={class:"table-op-text"},gf={__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 y=(n==null?void 0:n.menuFilter)||[];return Array.isArray(y)&&(y==null?void 0:y.some(L=>{const $=typeof L=="string"?L:JSON.stringify(L);return $==null?void 0:$.includes("HideGroup=Yes")}))},s=e.ref(""),v=e.ref(!1),u=e.ref([]),p=e.ref([{label:"清空",background:"#999999"},{label:"确认"}]),m=[{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(y,L){return y.map($=>{const K={...$};return L.forEach(ie=>{delete K[ie]}),K})}function k(y){if(!y||y.t!=="n")return(y==null?void 0:y.v)??"";const L=y.v;if(y.z){const $=String(y.z).toLowerCase(),K=["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 oe of K)if($.includes(oe))return C(L);const ie=/[ymdhms]/.test($),Se=/^[0#\.\,\s]+$/.test($.replace(/[\\\/\-:]/g,""));if(ie&&!Se)return C(L)}if(L>=1&&L<=73050){if(L<5e3)return L;if(L>=5e3&&L<4e4){const $=Math.floor((L-25569)/365.25)+1970;return $>=1970&&$<=2e3&&y.z&&/[ymd]/.test(String(y.z).toLowerCase())?C(L):L}if(L>=4e4)return C(L)}return L}function C(y){if(typeof y!="number")return y;try{const L=new Date((y-25569)*86400*1e3);if(isNaN(L.getTime()))return y;const $=L.getFullYear(),K=String(L.getMonth()+1).padStart(2,"0"),ie=String(L.getDate()).padStart(2,"0");return`${$}-${K}-${ie}`}catch{return y}}const V=y=>{const L=y.raw;if(!L)return;const $=new FileReader;$.onload=K=>{try{const ie=new Uint8Array(K.target.result),Se=ve.readSync(ie,{type:"array"}),oe=Se.SheetNames[0],X=Se.Sheets[oe],ee=ve.utils.decode_range(X["!ref"]).e.c+1,te=new Array(ee).fill(""),De=[];for(const le in X){if(le[0]==="!")continue;const{r:Te,c:Ee}=ve.utils.decode_cell(le),qe=X[le];let ca=k(qe);if((ca==null||ca==="")&&(ca=""),Te===0)te[Ee]=ca;else{if(!De[Te-1]){De[Te-1]={};for(let Na=0;Na<ee;Na++)De[Te-1][`col_${Na}`]=""}De[Te-1][`col_${Ee}`]=ca}}for(let le=0;le<ee;le++)te[le]===void 0&&(te[le]="");const Pe=[];for(let le=0;le<te.length;le++)(!te[le]||te[le].toString().trim()==="")&&Pe.push(le);let ge,N;(Pe==null?void 0:Pe.length)>0?(Wa.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),ge=te.filter((le,Te)=>!Pe.includes(Te)),N=c(De,Pe==null?void 0:Pe.map(le=>`col_${le}`))):(ge=te,N=De);const U=De==null?void 0:De[0];if(!(U!=null&&U.hasOwnProperty("col_0")))return Wa.ElMessage.error("导入的数据列不匹配,请检查是否错位");r("getImportData",ge,N)}catch(ie){throw Wa.ElMessage.error(ie.message),new Error(ie.message)}},$.readAsArrayBuffer(L)},_=y=>{var $;const L=($=u.value)==null?void 0:$.reduce((K,ie,Se)=>(Se===0?K[ie.label]=y:K[ie.label]=ie==null?void 0:ie.value,K),{});r("filter",L,y,!0)},G=(y,L={})=>{r("buttonClick",y,"",L)},z=y=>{var L,$;u.value=($=(L=ve.getColumnChild(O.cloneDeep(y)))==null?void 0:L.filter(K=>(K==null?void 0:K.label)!==""&&(K==null?void 0:K.label)!=="操作"))==null?void 0:$.map(K=>({label:(K==null?void 0:K.label)??"",value:"",name:(K==null?void 0:K.prop)??"",isFormColHidden:K==null?void 0:K.isTableColHidden,width:2,prop:(K==null?void 0:K.prop)??""}))},I=e.ref(!1),P=y=>{var L;if((y==null?void 0:y.buttonName)==="确认"&&(r("filter",y==null?void 0:y.content),I.value=(y==null?void 0:y.content)&&Object.values(y==null?void 0:y.content).length>0),(y==null?void 0:y.buttonName)==="清空"){const $=O.cloneDeep(y==null?void 0:y.content);for(const K in $)$[K]="";u.value=(L=u.value)==null?void 0:L.map(K=>({...K,value:""})),r("filter",$),I.value=!1}v.value=!1},E=()=>{v.value=!v.value},S=()=>{var L,$;u.value=(L=u.value)==null?void 0:L.map(K=>({...K,value:""}));const y=($=u.value)==null?void 0:$.reduce((K,ie)=>(K[ie.label]=ie.value,K),{});r("filter",y)},w=e.ref(null);let b;return b=y=>{var ie;if(!v.value)return;const L=(ie=w==null?void 0:w.value)==null?void 0:ie.$el,$=L==null?void 0:L.contains(y.target);let K=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(Se=>{Se.contains(y.target)&&(K=!0)}),!$&&!K&&(v.value=!1)},e.onMounted(()=>{document.addEventListener("click",b),z(n.columns)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",b)}),e.watch(()=>n.columns,()=>{z(n.columns)},{deep:!0,immediate:!0}),(y,L)=>{var X,pe,ee,te,De,Pe,ge,N;const $=e.resolveComponent("el-icon"),K=e.resolveComponent("svg-icon"),ie=e.resolveComponent("el-input"),Se=e.resolveComponent("el-upload"),oe=e.resolveComponent("el-button");return a.pageLayout==="vertical"?(e.openBlock(),e.createElementBlock("div",Kp,[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",Gp,[n!=null&&n.filterShow?(e.openBlock(),e.createElementBlock("div",Yp,[e.createVNode(Vu,{trigger:"contextmenu",ref_key:"popOverRef",ref:w,title:"",width:800,placement:"bottom-start",isVisible:v.value,"onUpdate:isVisible":L[4]||(L[4]=U=>v.value=U)},{reference:e.withCtx(()=>{var U,le,Te,Ee;return[e.createVNode(ie,{modelValue:s.value,"onUpdate:modelValue":L[0]||(L[0]=qe=>s.value=qe),style:{"min-width":"80px"},placeholder:I.value?(Te=(le=(U=a.filterValues)==null?void 0:U.filter(qe=>qe))==null?void 0:le.slice(0,3))==null?void 0:Te.join("/"):"搜索","prefix-icon":e.unref(Wa.search_default),clearable:"",onInput:_,disabled:((Ee=u.value)==null?void 0:Ee.length)===0},{suffix:e.withCtx(()=>{var qe,ca;return[!s.value&&((ca=(qe=a.filterValues)==null?void 0:qe.filter(Na=>Na))!=null&&ca.join("/"))?(e.openBlock(),e.createBlock($,{key:0,style:{cursor:"pointer"},onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(E,["stop"])},[e.createVNode(K,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:e.withCtx(()=>[e.createElementVNode("div",{class:"form-content-value",onKeydown:L[1]||(L[1]=e.withModifiers(()=>{},["stop"])),onKeyup:L[2]||(L[2]=e.withModifiers(()=>{},["stop"])),onKeypress:L[3]||(L[3]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:u.value,buttonValue:p.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:p.value,isStartJustify:!1,onOnButtonClick:P},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):e.createCommentVNode("",!0),a.buttons&&((X=a.buttons)==null?void 0:X.length)>0?(e.openBlock(),e.createElementBlock("div",Jp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((pe=a.buttons)==null?void 0:pe.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,le)=>{var Te;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:le},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(Se,{key:0,class:"upload-button-wrap","on-change":V,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!a.lockingPage},{default:e.withCtx(()=>{var Ee;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:qe=>G(U==null?void 0:U.label)},[e.createVNode(K,{class:"table-op-icon",name:(Ee=m==null?void 0:m.find(qe=>(qe==null?void 0:qe.label)===(U==null?void 0:U.label)))==null?void 0:Ee.icon},null,8,["name"]),e.createElementVNode("span",Zp,e.toDisplayString(U==null?void 0:U.label),1)],10,Xp)]}),_:2},1032,["disabled"])):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(ll._sfc_main,{key:1},{dropTitle:e.withCtx(()=>{var Ee;return[e.createElementVNode("div",{class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}])},[e.createVNode(K,{class:"table-op-icon",name:(Ee=m==null?void 0:m.find(qe=>(qe==null?void 0:qe.label)===(U==null?void 0:U.label)))==null?void 0:Ee.icon},null,8,["name"]),e.createElementVNode("span",Qp,e.toDisplayString(U==null?void 0:U.label),1)],2)]}),dropMenu:e.withCtx(()=>[e.createElementVNode("div",ef,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Ee=>{var qe,ca;return e.openBlock(),e.createElementBlock("div",{key:Ee==null?void 0:Ee.label,class:e.normalizeClass(["table-op-drop-item",{"is-disabled":!!a.lockingPage}]),onClick:Na=>!a.lockingPage&&G(Ee==null?void 0:Ee.label)},[e.createTextVNode(e.toDisplayString(Ee==null?void 0:Ee.label),1),(qe=Ee==null?void 0:Ee.label)!=null&&qe.includes("选中")?(e.openBlock(),e.createElementBlock("span",lf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(ca=Ee==null?void 0:Ee.label)!=null&&ca.includes("全部")?(e.openBlock(),e.createElementBlock("span",rf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)],10,af)}),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,id:"themeButton",class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),onClick:Ee=>!a.lockingPage&&G(U==null?void 0:U.label,U)},[e.createVNode(K,{class:"table-op-icon",name:((Te=m==null?void 0:m.find(Ee=>(Ee==null?void 0:Ee.label)===(U==null?void 0:U.label)))==null?void 0:Te.icon)??"normal"},null,8,["name"]),e.createElementVNode("span",of,e.toDisplayString(U==null?void 0:U.label),1)],10,nf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])])):(e.openBlock(),e.createElementBlock("div",tf,[e.createElementVNode("div",sf,[e.createElementVNode("div",cf,[e.createVNode(ie,{modelValue:s.value,"onUpdate:modelValue":L[5]||(L[5]=U=>s.value=U),style:{"min-width":"80px"},placeholder:I.value?(De=(te=(ee=a.filterValues)==null?void 0:ee.filter(U=>U))==null?void 0:te.slice(0,3))==null?void 0:De.join("/"):"搜索","prefix-icon":e.unref(Wa.search_default),clearable:"",onInput:_,disabled:((Pe=u.value)==null?void 0:Pe.length)===0},{suffix:e.withCtx(()=>{var U,le;return[!s.value&&((le=(U=a.filterValues)==null?void 0:U.filter(Te=>Te))!=null&&le.join("/"))?(e.openBlock(),e.createBlock($,{key:0,style:{cursor:"pointer"},onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.circle_close_default))]),_:1})):e.createCommentVNode("",!0)]}),append:e.withCtx(()=>[e.createElementVNode("span",{title:"条件查询",onClick:e.withModifiers(E,["stop"])},[e.createVNode(K,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),a.buttons&&((ge=a.buttons)==null?void 0:ge.length)>0?(e.openBlock(),e.createElementBlock("div",uf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((N=a.buttons)==null?void 0:N.filter(U=>a.isDevMode||(U==null?void 0:U.label)!=="修改模板"),(U,le)=>{var Te;return e.openBlock(),e.createElementBlock("div",{class:"extra-contents",key:le},[(U==null?void 0:U.type)==="upload"?(e.openBlock(),e.createBlock(Se,{key:0,class:"upload-button-wrap","on-change":V,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:e.withCtx(()=>{var Ee;return[e.createElementVNode("div",df,[e.createVNode(K,{class:"table-op-icon",name:(Ee=m==null?void 0:m.find(qe=>(qe==null?void 0:qe.label)===(U==null?void 0:U.label)))==null?void 0:Ee.icon},null,8,["name"]),e.createElementVNode("span",pf,e.toDisplayString(U==null?void 0:U.label),1)])]}),_:2},1024)):e.createCommentVNode("",!0),(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(ll._sfc_main,{key:1},{dropTitle:e.withCtx(()=>[(U==null?void 0:U.type)==="popover"?(e.openBlock(),e.createBlock(oe,{key:0,style:{background:"transparent",color:"#000000"}},{icon:e.withCtx(()=>{var Ee;return[e.createVNode(K,{class:"table-op-icon",name:(Ee=m==null?void 0:m.find(qe=>(qe==null?void 0:qe.label)===(U==null?void 0:U.label)))==null?void 0:Ee.icon},null,8,["name"])]}),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(U==null?void 0:U.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),dropMenu:e.withCtx(()=>[e.createElementVNode("div",ff,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U==null?void 0:U.contents,Ee=>(e.openBlock(),e.createBlock(oe,{key:Ee==null?void 0:Ee.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:qe=>G(Ee==null?void 0:Ee.label)},{default:e.withCtx(()=>{var qe,ca;return[e.createTextVNode(e.toDisplayString(Ee==null?void 0:Ee.label),1),(qe=Ee==null?void 0:Ee.label)!=null&&qe.includes("选中")?(e.openBlock(),e.createElementBlock("span",hf,"("+e.toDisplayString(a.selectNums)+")",1)):e.createCommentVNode("",!0),(ca=Ee==null?void 0:Ee.label)!=null&&ca.includes("全部")?(e.openBlock(),e.createElementBlock("span",vf,"("+e.toDisplayString(a.dataNums)+")",1)):e.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):e.createCommentVNode("",!0),!(U!=null&&U.type)||(U==null?void 0:U.type)==="methodButton"?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["table-op-action",{"is-disabled":!!a.lockingPage}]),id:"themeButton",onClick:Ee=>!a.lockingPage&&G(U==null?void 0:U.label,U)},[e.createVNode(K,{class:"table-op-icon",name:(Te=m==null?void 0:m.find(Ee=>(Ee==null?void 0:Ee.label)===(U==null?void 0:U.label)))==null?void 0:Te.icon},null,8,["name"]),e.createElementVNode("span",yf,e.toDisplayString(U==null?void 0:U.label),1)],10,mf)):e.createCommentVNode("",!0)])}),128))])):e.createCommentVNode("",!0)])]))}}},bf=er._export_sfc(gf,[["__scopeId","data-v-fd6e87f4"]]),kf={__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(u=>[e.renderSlot(l.$slots,"content",{row:u.row,column:u.column,$index:u.$index,scope:u}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.children,(p,m)=>(e.openBlock(),e.createBlock(ll._sfc_main$2,{key:m,column:p,tableData:a.tableData},e.createSlots({_:2},[e.renderList(l.$slots,(c,k)=>({name:k,fn:e.withCtx(({row:C,slotData:V,item:_,column:G})=>[e.renderSlot(l.$slots,k,e.mergeProps({ref_for:!0},V??C,{item:_??p,slotData:V??C,row:C,column:G,columnProp:p}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class xf extends Cl.Loader{constructor(l){super(l),this.littleEndian=!0}load(l,r,n,t){const s=this,v=new Cl.FileLoader(s.manager);v.setPath(s.path),v.setResponseType("arraybuffer"),v.setRequestHeader(s.requestHeader),v.setWithCredentials(s.withCredentials),v.load(l,function(u){try{r(s.parse(u))}catch(p){t?t(p):console.error(p),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,z=new Uint8Array(_);let I=0,P=0,E,S,w;do if(E=V[I++],E<32){if(E++,P+E>_)throw new Error("Output buffer is not large enough");if(I+E>G)throw new Error("Invalid compressed data");do z[P++]=V[I++];while(--E)}else{if(S=E>>5,w=P-((E&31)<<8)-1,I>=G)throw new Error("Invalid compressed data");if(S===7&&(S+=V[I++],I>=G))throw new Error("Invalid compressed data");if(w-=V[I++],P+S+2>_)throw new Error("Output buffer is not large enough");if(w<0)throw new Error("Invalid compressed data");if(w>=P)throw new Error("Invalid compressed data");do z[P++]=z[w++];while(--S+2)}while(I<G);return z}function n(V){const _={},G=new Uint8Array(V);let z="",I="",P=0,E=!1;const S=G.length;for(;P<S&&E===!1;){const L=String.fromCharCode(G[P++]);L===`
|
|
2
|
+
`||L==="\r"?(I.trim().toLowerCase().startsWith("data")&&(E=!0),I=""):I+=L,z+=L}const w=z.search(/[\r\n]DATA\s(\S*)\s/i),b=/[\r\n]DATA\s(\S*)\s/i.exec(z.slice(w-1));if(_.data=b[1],_.headerLen=b[0].length+w,_.str=z.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(L){return parseInt(L,10)})),_.count!==null)_.count=_.count[1].split(" ").map(function(L){return parseInt(L,10)});else{_.count=[];for(let L=0,$=_.fields.length;L<$;L++)_.count.push(1)}_.offset={};let y=0;for(let L=0,$=_.fields.length;L<$;L++)_.data==="ascii"?_.offset[_.fields[L]]=L:(_.offset[_.fields[L]]=y,y+=_.size[L]*_.count[L]);return _.rowSize=y,_}const t=n(l),s=[],v=[],u=[],p=[],m=[],c=new Cl.Color;if(t.data==="ascii"){const V=t.offset,z=new TextDecoder().decode(l).slice(t.headerLen).split(`
|
|
3
|
+
`);for(let I=0,P=z.length;I<P;I++){if(z[I]==="")continue;const E=z[I].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(ie=>ie==="rgb"),w=t.type[S],b=parseFloat(E[V.rgb]);let y=b;if(w==="F"){const ie=new Float32Array(1);ie[0]=b,y=new Int32Array(ie.buffer)[0]}const L=(y>>16&255)/255,$=(y>>8&255)/255,K=(y>>0&255)/255;c.setRGB(L,$,K,Cl.SRGBColorSpace),u.push(c.r,c.g,c.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&&p.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],z=r(new Uint8Array(l,t.headerLen+8,_),G),I=new DataView(z.buffer),P=t.offset;for(let E=0;E<t.points;E++){if(P.x!==void 0){const S=t.fields.indexOf("x"),w=t.fields.indexOf("y"),b=t.fields.indexOf("z");s.push(this._getDataView(I,t.points*P.x+t.size[S]*E,t.type[S],t.size[S])),s.push(this._getDataView(I,t.points*P.y+t.size[w]*E,t.type[w],t.size[w])),s.push(this._getDataView(I,t.points*P.z+t.size[b]*E,t.type[b],t.size[b]))}if(P.rgb!==void 0){const S=t.fields.indexOf("rgb"),w=I.getUint8(t.points*P.rgb+t.size[S]*E+2)/255,b=I.getUint8(t.points*P.rgb+t.size[S]*E+1)/255,y=I.getUint8(t.points*P.rgb+t.size[S]*E+0)/255;c.setRGB(w,b,y,Cl.SRGBColorSpace),u.push(c.r,c.g,c.b)}if(P.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(I,t.points*P.normal_x+t.size[S]*E,t.type[S],t.size[S])),v.push(this._getDataView(I,t.points*P.normal_y+t.size[w]*E,t.type[w],t.size[w])),v.push(this._getDataView(I,t.points*P.normal_z+t.size[b]*E,t.type[b],t.size[b]))}if(P.intensity!==void 0){const S=t.fields.indexOf("intensity");p.push(this._getDataView(I,t.points*P.intensity+t.size[S]*E,t.type[S],t.size[S]))}if(P.label!==void 0){const S=t.fields.indexOf("label");m.push(I.getInt32(t.points*P.label+t.size[S]*E,this.littleEndian))}}}if(t.data==="binary"){const V=new DataView(l,t.headerLen),_=t.offset;for(let G=0,z=0;G<t.points;G++,z+=t.rowSize){if(_.x!==void 0){const I=t.fields.indexOf("x"),P=t.fields.indexOf("y"),E=t.fields.indexOf("z");s.push(this._getDataView(V,z+_.x,t.type[I],t.size[I])),s.push(this._getDataView(V,z+_.y,t.type[P],t.size[P])),s.push(this._getDataView(V,z+_.z,t.type[E],t.size[E]))}if(_.rgb!==void 0){const I=V.getUint8(z+_.rgb+2)/255,P=V.getUint8(z+_.rgb+1)/255,E=V.getUint8(z+_.rgb+0)/255;c.setRGB(I,P,E,Cl.SRGBColorSpace),u.push(c.r,c.g,c.b)}if(_.normal_x!==void 0){const I=t.fields.indexOf("normal_x"),P=t.fields.indexOf("normal_y"),E=t.fields.indexOf("normal_z");v.push(this._getDataView(V,z+_.normal_x,t.type[I],t.size[I])),v.push(this._getDataView(V,z+_.normal_y,t.type[P],t.size[P])),v.push(this._getDataView(V,z+_.normal_z,t.type[E],t.size[E]))}if(_.intensity!==void 0){const I=t.fields.indexOf("intensity");p.push(this._getDataView(V,z+_.intensity,t.type[I],t.size[I]))}_.label!==void 0&&m.push(V.getInt32(z+_.label,this.littleEndian))}}const k=new Cl.BufferGeometry;s.length>0&&k.setAttribute("position",new Cl.Float32BufferAttribute(s,3)),v.length>0&&k.setAttribute("normal",new Cl.Float32BufferAttribute(v,3)),u.length>0&&k.setAttribute("color",new Cl.Float32BufferAttribute(u,3)),p.length>0&&k.setAttribute("intensity",new Cl.Float32BufferAttribute(p,1)),m.length>0&&k.setAttribute("label",new Cl.Int32BufferAttribute(m,1)),k.computeBoundingSphere();const C=new Cl.PointsMaterial({size:.005});return u.length>0&&(C.vertexColors=!0),new Cl.Points(k,C)}}const wf=O.useModelComp(O.pinia),{systemPath:ps}=O.storeToRefs(wf),mo=e.ref(),fs=new WeakMap;function _f(a,l,r,n,t){const s=async C=>{try{const V=await O.platformDownloadFile({url:C});if(V.status!==200)throw new Error(`下载失败: ${V.status}`);return V.data}catch(V){throw console.error("addModelFromUrl失败:",V),V}},v=C=>new Promise((V,_)=>{const G=new FileReader;G.onload=z=>{try{const I=z.target.result,E=new Ln.MTLLoader().parse(I);E.preload(),V(E)}catch(I){_(I)}},G.onerror=()=>{_(new Error("MTL文件读取失败"))},G.readAsText(C)}),u=async C=>{const V={materials:{},create:function(_){return this.materials[_]?this.materials[_]:(console.warn(`Material '${_}' not found, using default material`),new Cl.MeshPhongMaterial({color:8947848,side:Cl.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 C){const G=await v(_);Object.assign(V.materials,G.materials)}return V.preload(),V},p=async(C,V=[])=>new Promise((_,G)=>{const z=new FileReader;z.onload=async I=>{try{const P=I.target.result;let E=null;V&&V.length>0&&(V.length===1?E=await v(V[0]):E=await u(V));const S=new Ln.OBJLoader;E&&S.setMaterials(E);const w=S.parse(P);E||w.traverse(b=>{b.isMesh&&(b.material=new Cl.MeshPhongMaterial({color:8947848,side:Cl.DoubleSide}))}),_(w)}catch(P){G(P)}},z.onerror=()=>{G(new Error("OBJ文件读取失败"))},z.readAsText(C)}),m=async C=>{var V;try{r.value=!0;const{scene:_}=a();if(!_)throw new Error("Scene not initialized");t();const G=[];for(let z=0;z<C.length;z++){const I=C[z];n.value=`正在加载模型 ${z+1}/${C.length}...`;const P=await s(I.objUrl),E=((V=I.objUrl)==null?void 0:V.split("/").pop())||`model_${z}.obj`,S=new File([P],E,{type:P.type});let w=[];if(I.mtlUrls){const y=Array.isArray(I.mtlUrls)?I.mtlUrls:[I.mtlUrls];for(let L=0;L<y.length;L++){const $=y[L],K=await s($),ie=($==null?void 0:$.split("/").pop())||`material_${z}_${L}.mtl`,Se=new File([K],ie,{type:K.type});w.push(Se)}}const b=await p(S,w);_.add(b),l.value.push(b),G.push(b)}return r.value=!1,G}catch(_){throw console.error("加载模型失败:",_),r.value=!1,_}},c=async(C,V,_=[],G=[])=>{let z;const I=C.toLowerCase();switch(I){case".txt":case".cpt":case".obj":const P=await V.text();if(I===".txt"||I===".cpt"){const ae=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,he=[...P.matchAll(ae)].map(se=>({x:parseFloat(se[1]),y:parseFloat(se[2]),z:parseFloat(se[3])})),Ke=new Cl.BufferGeometry,Ie=he.flatMap(se=>[se.x,se.y,se.z]);if(Ke.setAttribute("position",new Cl.Float32BufferAttribute(Ie,3)),I===".txt"){const se=new Cl.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});z=new Cl.Points(Ke,se)}else if(I===".cpt"){const se=new Cl.LineBasicMaterial({color:"#5B5C99",linewidth:100});z=new Cl.Line(Ke,se)}}else if(I===".obj"){const ae=new Ln.OBJLoader;if(_&&_.length>0){const la=new Ln.MTLLoader;for(const he of _){const Ke=await he.text(),Ie=la.parse(Ke);Ie.preload(),ae.setMaterials(Ie);break}}z=ae.parse(P),(!_||_.length===0)&&z.traverse(la=>{la.isMesh&&(la.material=new Cl.MeshPhongMaterial({color:"#B3B3D4"})),la instanceof Cl.Mesh&&(la.material.side=Cl.DoubleSide)})}break;case".stl":const E=await V.arrayBuffer(),w=new Ln.STLLoader().parse(E),b=new Cl.MeshPhongMaterial({color:"#B3B3D4",side:Cl.DoubleSide});z=new Cl.Mesh(w,b);break;case".nc":const y=["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"],L={"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)"},$=new Cl.Group,K=y.map(ae=>new Promise((la,he)=>{new Ln.STLLoader().load(ps.value===""?`/model/${ae}`:`${ps.value}\\${ae}`,Ie=>{const se=new Cl.MeshPhongMaterial({color:L[ae]||"#B3B3D4",side:Cl.DoubleSide}),Be=new Cl.Mesh(Ie,se);la(Be)},void 0,he)}));try{(await Promise.all(K)).forEach(la=>$.add(la)),z=$}catch(ae){throw console.error("加载NC文件对应的STL文件失败:",ae),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const ie=new xf,Se=new Cl.Group;try{const ae=await Wa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),la=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"}),he=await Wa.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ke=new Blob([he.data],{type:"application/octet-stream;charset=UTF-8"}),Ie=await new Promise((Be,Fe)=>{const ba=URL.createObjectURL(la);ie.load(ba,za=>{const F=new Float32Array(za.geometry.attributes.position.count*3);for(let j=0;j<za.geometry.attributes.position.count;j++)F[j*3]=1,F[j*3+1]=0,F[j*3+2]=0;za.geometry.setAttribute("color",new Cl.BufferAttribute(F,3)),za.material.vertexColors=!0,za.scale.set(.3,.3,.3),URL.revokeObjectURL(ba),Be(za)},void 0,Fe)}),se=await new Promise((Be,Fe)=>{const ba=URL.createObjectURL(Ke);ie.load(ba,za=>{const F=new Float32Array(za.geometry.attributes.position.count*3);for(let j=0;j<za.geometry.attributes.position.count;j++)F[j*3]=0,F[j*3+1]=1,F[j*3+2]=0;za.geometry.setAttribute("color",new Cl.BufferAttribute(F,3)),za.material.vertexColors=!0,za.scale.set(.3,.3,.3),URL.revokeObjectURL(ba),Be(za)},void 0,Fe)});Se.add(Ie),Se.add(se),z=Se}catch(ae){throw console.error("PCD文件加载失败:",ae),new Error("无法加载PCD文件")}break;case".urdf":const oe=URL.createObjectURL(V),X=new Ou.URDFLoader,pe="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},te=new WeakMap,De=new WeakMap,Pe=new WeakMap,ge=async ae=>{if(te.has(ae))return console.log(`从缓存加载: ${ae}`),te.get(ae);try{const la=await Wa.axios.get(`${pe}/${ae}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),he=new Blob([la.data],{type:"application/octet-stream;charset=UTF-8"});return ee.enableCache&&te.set(ae,he),he}catch(la){throw console.error(`加载文件失败: ${ae}`,la),new Error(`无法加载文件: ${ae}`)}},N=(ae="default")=>{if(De.has(ae))return De.get(ae);const la=new Cl.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Cl.FrontSide});return De.set(ae,la),la},U=ae=>{try{ae.isBufferGeometry&&ae.mergeVertices&&ae.mergeVertices(),ae.computeVertexNormals&&ae.computeVertexNormals(),ae.computeBoundingSphere&&ae.computeBoundingSphere(),ae.deleteAttribute&&ae.deleteAttribute("uv2")}catch(la){console.warn("几何体优化失败,使用原始几何体:",la)}return ae},le=async(ae,la,he)=>{const Ke=`stl_${la}`;if(Pe.has(Ke)){const Fe=Pe.get(Ke);return new Cl.Mesh(Fe,N())}const Ie=await ae.arrayBuffer();let Be=new Ln.STLLoader(he).parse(Ie);return Be=U(Be),Pe.set(Ke,Be),new Cl.Mesh(Be,N())},Te=async(ae,la,he)=>{const Ke=`obj_${la}`;if(te.has(Ke))return te.get(Ke).clone();const Ie=await ae.text(),se=new Ln.OBJLoader(he),Be=la.replace(".obj",".mtl");try{const za=await(await ge(Be)).text(),j=new Ln.MTLLoader(he).parse(za);j.preload(),se.setMaterials(j)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Be}`)}const Fe=se.parse(Ie);return Fe.traverse(ba=>{ba.isMesh&&(ba.geometry=U(ba.geometry),ba.castShadow=!0,ba.receiveShadow=!0,ba.renderOrder=1)}),te.set(Ke,Fe),Fe},Ee=(ae,la)=>{const he=new Cl.LOD;if(he.addLevel(ae,0),ae.geometry){const Ke=ae.geometry.clone(),Ie=new Cl.Mesh(Ke,ae.material);he.addLevel(Ie,50)}return he};let qe=0,ca=0;const Na=[];X.loadMeshCb=async(ae,la,he,Ke,Ie)=>{const se=ae.split("/").pop(),Be=he||(()=>{});qe++;const Fe=new Promise(async(ba,za)=>{try{const F=await ge(se);if(!F||F.size===0)throw new Error(`文件为空: ${se}`);const j=se.split(".").pop().toLowerCase();let Z;switch(j){case"stl":Z=await le(F,se,la);break;case"obj":Z=await Te(F,se,la);break;default:throw new Error(`不支持的文件格式: ${j}`)}ee.enableLOD&&Z.isMesh&&(Z=Ee(Z,se)),Be(Z),ca++,Ke&&Ke({loaded:ca,total:qe,progress:ca/qe}),ba(Z)}catch(F){console.error(`mesh文件加载失败: ${se}`,F);const j=new Cl.Group;Be(j),ba(j);const Z=new Cl.BoxGeometry(.1,.1,.1),fe=new Cl.MeshStandardMaterial({color:16711680,wireframe:!0});return new Cl.Mesh(Z,fe)}});Na.push(Fe)};try{if(!oe){mo.value=void 0;break}if(z=await X.loadAsync(oe),console.log(`URDF文件加载完成,等待${qe}个mesh文件加载...`),Na.length>0)try{await Promise.allSettled(Na),console.log(`所有mesh文件处理完成,成功加载: ${ca}/${qe}`)}catch(he){console.warn("部分mesh文件加载失败,但继续显示模型",he)}z.traverse(he=>{he.isMesh&&(he.castShadow=!0,he.receiveShadow=!0,he.renderOrder=1,he.material&&(he.material.needsUpdate=!0))}),console.time("计算包围盒");const ae=new Cl.Box3;ae.expandByObject(z);const la=`urdf_${Date.now()}`;z.userData.boundingBox=ae.clone(),z.userData.modelId=la,fs.set(la,{box:ae.clone(),center:ae.getCenter(new Cl.Vector3),size:ae.getSize(new Cl.Vector3),maxSize:Math.max(...ae.getSize(new Cl.Vector3).toArray())}),mo.value=z,console.log("URDF模型加载完成并优化")}catch(ae){console.error("URDF加载失败:",ae),mo.value=void 0}finally{oe&&URL.revokeObjectURL(oe)}break;default:throw new Error(`不支持的文件格式: ${C}`)}return z};return{addModelsFromUrls:m,loadModelByDefaultPath:async C=>{console.log(C);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<C.length;G++){const z=C[G],I=await c(z.suffix,z.blob,z.mtlBlobs||[],z.meshFiles||[]);I&&(V.add(I),l.value.push(I),_.push(I))}return r.value=!1,n.value="",_}catch(V){throw console.error("加载模型失败:",V),r.value=!1,n.value="",V}},urdfModel:mo,modelBoundingBoxes:fs}}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,u,p=function(k,C){C.parentNode.insertBefore(k,C)};if(l&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(k){console&&console.log(k)}}n=function(){var k,C=document.createElement("div");C.innerHTML=a._iconfont_svg_string_4827314,(C=C.getElementsByTagName("svg")[0])&&(C.setAttribute("aria-hidden","true"),C.style.position="absolute",C.style.width=0,C.style.height=0,C.style.overflow="hidden",C=C,(k=document.body).firstChild?p(C,k.firstChild):k.appendChild(C))},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,u=!1,c(),v.onreadystatechange=function(){v.readyState=="complete"&&(v.onreadystatechange=null,m())})}function m(){u||(u=!0,s())}function c(){try{v.documentElement.doScroll("left")}catch{return void setTimeout(c,50)}m()}})(window);const Sf=["onClick"],Ef=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,y,L,$]=w;return $!==void 0?`rgba(${b}, ${y}, ${L}, ${$})`:`rgb(${b}, ${y}, ${L})`}if(typeof w=="string"){const b=w.trim();if(b.startsWith("[")&&b.endsWith("]")){const y=b.slice(1,-1).split(",").map(L=>Number(L.trim()));if(y.length>=3&&y.every(L=>!Number.isNaN(L))){const[L,$,K,ie]=y;return ie!==void 0?`rgba(${L}, ${$}, ${K}, ${ie})`:`rgb(${L}, ${$}, ${K})`}}return b}},u=e.computed(()=>{const w=Number(r==null?void 0:r.textSize),b=v(r==null?void 0:r.textColor),y={},L={};return!Number.isNaN(w)&&w&&(y.fontSize=`${w}px`,L.fontSize=`${w}px`),b&&(y.color=b,L.color=b),{label:y,value:L}}),p=e.ref(""),m=e.ref(""),c=e.ref(!1),k=async w=>{if(w){m.value&&(URL.revokeObjectURL(m.value),m.value="");try{const b=await O.platformDownloadFile({url:w}),y=new Blob([b==null?void 0:b.data],{type:(b==null?void 0:b.headers["content-type"])||"image/*"});m.value=URL.createObjectURL(y)}catch{m.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,w=>{w&&(p.value=w)},{immediate:!0}),e.watch(p,w=>{k(w)},{immediate:!0});const C=()=>{var w;(w=s.value)==null||w.click()},V=async w=>{var L,$,K;const b=w.target,y=(L=b==null?void 0:b.files)==null?void 0:L[0];if(!y){b.value="";return}c.value=!0;try{const ie=new FormData;ie.append("file",y);const Se=await O.platformUploadFile(ie),oe=(K=($=Se==null?void 0:Se.data)==null?void 0:$.result)==null?void 0:K.url;oe?(p.value=oe,n("update:backGroundImage",oe),k(oe),Wa.ElMessage.success("背景图片上传成功")):Wa.ElMessage.error("背景图片上传失败")}catch{Wa.ElMessage.error("背景图片上传失败")}finally{c.value=!1,b.value=""}},_=e.computed(()=>m.value?{backgroundImage:`url(${m.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),G=w=>ll.getComponent(w),z=w=>{if(!w)return;const b=w.querySelector("input, textarea, .el-input__inner");b&&typeof b.focus=="function"&&b.focus()},I=(w,b,y)=>{r.disabled||w.field&&(t.value=b,e.nextTick(()=>{z(y.currentTarget)}))},P=()=>{t.value=null},E=w=>{var y;const b=((y=w==null?void 0:w.field)==null?void 0:y.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,L=`calc((100% - ${(b-1)*16}px) / ${b})`;return{flex:`0 0 ${L}`,maxWidth:L,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]=y=>(r==null?void 0:r.backGround)&&C())},[r!=null&&r.backGround?(e.openBlock(),e.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:b[0]||(b[0]=e.withModifiers(y=>C(),["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,(y,L)=>{var $,K,ie,Se,oe,X,pe,ee;return e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:L,style:e.normalizeStyle(S(y)),onClick:b[1]||(b[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:"statistics-label",style:e.normalizeStyle(u.value.label)},e.toDisplayString(y==null?void 0:y.label),5),e.createElementVNode("div",{class:"statistics-value",style:e.normalizeStyle(u.value.value),onClick:te=>{var De;return(De=y.field)!=null&&De.isNoClick?null:I(y,L,te)}},[t.value===L&&y.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(G((($=y.field)==null?void 0:$.type)??"Input")),{key:0,modelValue:y.field.value,"onUpdate:modelValue":te=>y.field.value=te,isEdit:!0,disabled:(K=y.field)==null?void 0:K.disabled,content:((ie=y.field)==null?void 0:ie.contents)??[],optionUrl:y.field,originalValue:(Se=y.field)==null?void 0:Se.value,config:(oe=y.field)==null?void 0:oe.config,configModel:((X=y.field)==null?void 0:X.prop)??((pe=y.field)==null?void 0:pe.name),selectedTagList:((ee=y.field)==null?void 0:ee.selectValue)??[],onBlur:P,onBlurChange:P},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(y)),1)],64))],12,Sf)],4)}),128))],4))}}),Cf=er._export_sfc(Ef,[["__scopeId","data-v-060d233a"]]),dc=O.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(a){this.selectArray=a},setSelectString(a){this.selectString=a}}}),Df={class:"calculator-content"},Nf={class:"calculator-child"},Tf={class:"calculator-child"},Bf=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",Df,[e.createElementVNode("div",Nf,[e.createVNode(ll.ssForm,{rowContents:l.value,isRowFlex:!0},null,8,["rowContents"])]),e.createElementVNode("div",Tf,[e.createVNode(ll.ssForm,{rowContents:r.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Af=er._export_sfc(Bf,[["__scopeId","data-v-73db0fe7"]]),bt=(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((u,p)=>{var m;(m=n==null?void 0:n[p])!=null&&m.prop?v[n[p].prop]=u:Array.isArray(u)&&(v.children=bt(u,n))}),Object.assign(v,{id:s})}else return t})),r},pc=(a,l,r)=>{let n=a,t=l;return n=n==null?void 0:n.map((s,v)=>{var u,p;return!Array.isArray(s)||!((u=t==null?void 0:t[v])!=null&&u.label)&&!r||(s.unshift(((p=t==null?void 0:t[v])==null?void 0:p.label)??""),s.some(m=>Array.isArray(m))&&(s=s==null?void 0:s.map(m=>{var c;return Array.isArray(m)&&(m=pc(m,(c=t==null?void 0:t[v])==null?void 0:c.children,r)),m}))),s}),n},zf=(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 Mf(a,n,r)}},Mf=(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=fc(s,t,r)),s)),n},fc=(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(u=>u.id!==r):n.children=(v=n.children)==null?void 0:v.map(u=>(u.id.toString()===(t==null?void 0:t[0])&&(t==null||t.shift(),u=fc(u,t,r)),u)),n},If=(a,l,r)=>{if(l==="")return r;{const n=l.split("-");return Of(a,n,r)}},Of=(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=hc(s,t,r)),s)),n},hc=(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=hc(v,t,r)),v)),n};class Lf{constructor(l={}){qr(this,"url");qr(this,"heartbeatInterval");qr(this,"socket",null);qr(this,"isConnected",!1);qr(this,"heartTimer",null);qr(this,"canvas",null);qr(this,"ctx",null);qr(this,"mainCamCutMode",0);qr(this,"pMainShowStartX",0);qr(this,"pMainShowStartY",0);qr(this,"onLog");qr(this,"onDevCount");qr(this,"onResolution");qr(this,"onCameraStatus");qr(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,u,p,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 c=r[3],k=r.length-4,C=new Uint8Array(k);for(let G=0;G<k;G++)C[G]=r[4+G];const _=decodeURIComponent(this.byteToString(C)).split("|");(t=this.onDevCount)==null||t.call(this,c,_);return}if(n===81){const c=r[3]||0,k=[];for(let C=0;C<c;C++){const V=(r[4+C*4+0]||0)*256+(r[4+C*4+1]||0),_=(r[4+C*4+2]||0)*256+(r[4+C*4+3]||0);k.push({width:V,height:_,text:`${V}*${_}`})}(s=this.onResolution)==null||s.call(this,c,k);return}if(n===1){r[3]===1&&((v=this.onCameraStatus)==null||v.call(this,"opened")),r[3]===3&&((u=this.onCameraStatus)==null||u.call(this,"closed"));return}if(n===16){if(r[3]===1){const k=r[4]*256+r[5],C=r[6]*65536+r[7]*256+r[8];let V="";if(k>0){const z=new Uint8Array(k);for(let I=0;I<k;I++)z[I]=r[9+I];V=decodeURIComponent(this.byteToString(z))}const _=new Uint8Array(C);for(let z=0;z<C;z++)_[z]=r[9+k+z];const G=this.uint8ArrayToString(_);(p=this.onPhoto)==null||p.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 c=r[3]*256+r[4],k=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 C=this.ctx.createImageData(c,k);let V=11;for(let _=0;_<C.data.length;_+=4)C.data[_+0]=r[V],C.data[_+1]=r[V+1],C.data[_+2]=r[V+2],C.data[_+3]=255,V+=3;this.ctx.putImageData(C,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 $f={style:{display:"flex",gap:"16px",height:"100%"}},Rf={key:0,style:{color:"var(--el-text-color-secondary)"}},Vf={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},Ff={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},Pf={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"}},jf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},Hf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},Uf=["src","onClick"],qf=["onClick"],Wf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},Kf={class:"dialog-footer"},Gf=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([]),u=e.ref(""),p=e.ref(!1),m=e.ref([]),c=new Lf({url:"ws://127.0.0.1:22225"});function k($,K){var ee;const ie=$.split(","),Se=((ee=ie[0].match(/:(.*?);/))==null?void 0:ee[1])??"image/jpeg",oe=atob(ie[1]);let X=oe.length;const pe=new Uint8Array(X);for(;X--;)pe[X]=oe.charCodeAt(X);return new File([pe],K,{type:Se})}function C(){c.onLog=$=>{console.log("[GPY]",$)},c.onDevCount=($,K)=>{if(u.value+=`设备数量=${$},设备=${K.join(",")}
|
|
4
|
+
`,$>0){u.value+=`检测到设备,正在获取分辨率...
|
|
5
|
+
`;try{c.getResolution(0)}catch(ie){u.value+=`获取分辨率失败:${(ie==null?void 0:ie.message)??ie}
|
|
6
|
+
`}}else u.value+=`未检测到高拍仪设备!
|
|
7
|
+
`},c.onResolution=($,K)=>{if($<=0||!Array.isArray(K)||K.length===0){u.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
|
|
8
|
+
`;try{c.openCamera(0,1280,720)}catch(Se){u.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
|
|
9
|
+
`}return}const ie=c.chooseResolution(K);if(!ie){u.value+=`分辨率选择失败,回退使用 1280*720 打开...
|
|
10
|
+
`;try{c.openCamera(0,1280,720)}catch(Se){u.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
|
|
11
|
+
`}return}u.value+=`获取分辨率 ${ie.text}成功,打开摄像头...
|
|
12
|
+
`;try{c.closeCamera(),setTimeout(()=>{try{c.openCamera(0,ie.width,ie.height)}catch(Se){u.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
|
|
13
|
+
`}},100)}catch{try{c.openCamera(0,ie.width,ie.height)}catch(Se){u.value+=`打开摄像头失败:${(Se==null?void 0:Se.message)??Se}
|
|
14
|
+
`}}},c.onCameraStatus=$=>{$==="opened"?(s.value=!0,u.value+=`摄像头已打开
|
|
15
|
+
`):(s.value=!1,u.value+=`摄像头已关闭
|
|
16
|
+
`)},c.onPhoto=$=>{if($.flag===0&&$.base64){const K=`data:image/jpeg;base64,${$.base64}`,ie=k(K,`gpy-capture-${Date.now()}.jpg`);v.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:K,file:ie}),u.value+=`拍照完成,已接收图片(当前 ${v.value.length} 张)
|
|
17
|
+
`}else u.value+=`拍照失败 flag=${$.flag}
|
|
18
|
+
`}}const V=async()=>{if(await e.nextTick(),!t.value)return;_(),C();const $=t.value.getBoundingClientRect();c.init(t.value,Math.floor($.width),Math.floor($.height)),u.value+=`正在连接设备服务...
|
|
19
|
+
`,await c.connect(),u.value+=`正在获取设备数量...
|
|
20
|
+
`,c.getDevCount()},_=()=>{try{c.destroy()}catch($){console.error($)}s.value=!1,v.value=[],u.value="",p.value=!1,m.value=[]};e.watch(()=>r.visible,$=>{$?V():_()});const G=()=>{try{c.bestSize()}catch($){console.error($)}},z=()=>{try{c.rotateLeft()}catch($){console.error($)}},I=()=>{try{c.rotateRight()}catch($){console.error($)}},P=()=>{try{c.focus()}catch($){console.error($)}},E=()=>{u.value+=`正在拍照...
|
|
21
|
+
`;try{c.photo()}catch($){u.value+=`拍照调用失败:${($==null?void 0:$.message)??$}
|
|
22
|
+
`}},S=()=>{v.value.length>0?n("confirm",v.value.map($=>$.file)):n("confirm",[])},w=$=>{$<0||$>=v.value.length||(v.value.splice($,1),u.value+=`已删除一张图片(剩余 ${v.value.length} 张)
|
|
23
|
+
`)},b=$=>{if(!$)return;const K=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:K,blobUrl:$}],p.value=!0},y=()=>{p.value=!1},L=()=>{_(),n("cancel")};return($,K)=>{const ie=e.resolveComponent("el-input"),Se=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(wr.ssDialog,{title:"扫描录入",visible:r.visible,onBeforeDestroy:L,width:"1200px",style:{height:"80%"}},{default:e.withCtx(()=>[e.createElementVNode("div",$f,[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",Rf,"初始化摄像头..."))],512),e.createElementVNode("div",Vf,[e.createElementVNode("div",Ff,[K[0]||(K[0]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),e.createElementVNode("div",Pf,[v.value.length===0?(e.openBlock(),e.createElementBlock("div",jf,"暂无图片")):(e.openBlock(),e.createElementBlock("div",Hf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(oe,X)=>(e.openBlock(),e.createElementBlock("div",{key:oe.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[e.createElementVNode("img",{src:oe.url,onClick:pe=>b(oe.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Uf),e.createElementVNode("div",{onClick:pe=>w(X),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,qf)]))),128))]))],512)]),e.createElementVNode("div",Wf,[K[1]||(K[1]=e.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),e.createVNode(ie,{type:"textarea",value:u.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Kf,[e.createVNode(Se,{onClick:G,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>K[2]||(K[2]=[e.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),e.createVNode(Se,{onClick:z,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),e.createVNode(Se,{onClick:I,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),e.createVNode(Se,{onClick:P,disabled:!s.value,id:"themeBorderButton"},{default:e.withCtx(()=>K[5]||(K[5]=[e.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),e.createVNode(Se,{onClick:E,disabled:!s.value,id:"themeButton"},{default:e.withCtx(()=>K[6]||(K[6]=[e.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),K[9]||(K[9]=e.createElementVNode("div",{style:{flex:"1"}},null,-1)),e.createVNode(Se,{onClick:S,disabled:v.value.length===0,id:"themeButton"},{default:e.withCtx(()=>K[7]||(K[7]=[e.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),e.createVNode(Se,{onClick:L,id:"themeBorderButton"},{default:e.withCtx(()=>K[8]||(K[8]=[e.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),p.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:y},null,8,["fileDataList"])):e.createCommentVNode("",!0)],64)}}}),Yf=er._export_sfc(Gf,[["__scopeId","data-v-24a2050a"]]),hs=O.useMenuState(O.pinia),Jf=async a=>{var s,v,u,p,m,c;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"))){hs.setContentLoading(!0);const k=await O.platformDownloadFile({url:n});let C=k==null?void 0:k.data;const V=new FormData;V.append("file",C,((v=l==null?void 0:l[0])==null?void 0:v.name)+"."+((u=n==null?void 0:n.split("."))==null?void 0:u[1])),V.append("query",r);let _=await ec(V);_=(c=(m=(p=_==null?void 0:_.data)==null?void 0:p.data)==null?void 0:m.response)==null?void 0:c.replace("generateResult",a==null?void 0:a.函数名称),t=_,hs.setContentLoading(!1)}return t},Tt=O.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(a){this.objUrl=a},setBlobUrls(a){this.blobUrls=a}}}),Xf=O.useLoginState(O.pinia),{extraUrl:si}=O.storeToRefs(Xf);let vc=si.value===""||!si.value?"http://139.196.154.85:20015":si.value;e.watch(()=>si.value,()=>{vc=si.value===""||!si.value?"http://139.196.154.85:20015":si.value},{deep:!0,immediate:!0});const To={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},vs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:vc+"/api/public/paddleOCR"};class Zf{constructor(l){qr(this,"config");this.config={...vs,...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=Wa.Local.get(Wa.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||vs.apiUrl||"";return(await Wa.axios.post(s,t,{headers:{"Content-Type":"application/json",Authorization:n}})).data}getFieldAliases(l){return To[l]?To[l]:[l]}extractTableHeaders(l){const r=[],n=new Set,t=v=>{const u=v==null?void 0:v.label;return!(!u||u==="操作"||u===this.config.columnName||(v==null?void 0:v.type)==="operate"||(v==null?void 0:v.prop)==="operate")},s=v=>{(v||[]).forEach(u=>{if(!u)return;const p=(u==null?void 0:u.children)||(u==null?void 0:u.child)||(u==null?void 0:u.columns);if(Array.isArray(p)&&p.length>0){s(p);return}if(t(u)){const m=u.label;if(!n.has(m)){n.add(m);const c=this.getFieldAliases(m);r.push(c)}}})};return s(l||[]),r}}function mc(a){return new Zf(a)}mc();const kt=async(a,l)=>{var v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b;let r=(u=(v=O.cloneDeep(a))==null?void 0:v.optionUrl)==null?void 0:u.menuSelect,n=[];r==null||r.forEach(y=>{});let t="",s=await ve.menuToParent(r);if(s==null||s.forEach(y=>{var L,$,K,ie;(y==null?void 0:y.name)===(((ie=(K=($=(L=O.cloneDeep(a))==null?void 0:L.optionUrl)==null?void 0:$.groupSelect)==null?void 0:K[0])==null?void 0:ie.replaceAll("'",""))??"")&&(t=y==null?void 0:y.id)}),l){t=l;const y=await Dr.getInsofDataApi({id:t}),L=(k=(c=(m=(p=y==null?void 0:y.data)==null?void 0:p.result)==null?void 0:m[0])==null?void 0:c.key)==null?void 0:k.pageKey;s=await ve.getItemData(L,sessionStorage.getItem("systemKey"),"")}if(t!==""){let y;l?y=(C=s==null?void 0:s.find(K=>(K==null?void 0:K.id)===l))==null?void 0:C.compData:y=(V=s==null?void 0:s.find(K=>{var ie,Se,oe,X;return(K==null?void 0:K.name)===(((Se=(ie=a==null?void 0:a.groupSelect)==null?void 0:ie.split(":"))==null?void 0:Se[0])||((X=(oe=a==null?void 0:a.optionUrl)==null?void 0:oe.groupSelect)==null?void 0:X[0]))}))==null?void 0:V.compData;let L=(G=(_=y==null?void 0:y.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:_.contents)==null?void 0:G.map(K=>K==null?void 0:K.label);(I=(z=y==null?void 0:y.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:z.contents)!=null&&I.every(K=>Array.isArray(K))&&(L=(S=ve.getColumnChild((E=(P=y==null?void 0:y.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:P.contents)==null?void 0:E[0]))==null?void 0:S.map(K=>K==null?void 0:K.prop));let $=(b=(w=y==null?void 0:y.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:w.contents)==null?void 0:b.map(K=>{if(Array.isArray(K))K=K==null?void 0:K.filter(ie=>!(ie!=null&&ie.id));else{let ie={};for(let Se in K)Se!=="id"&&(ie[Se]=K==null?void 0:K[Se]);K=ie}return K});$==null||$.forEach(K=>{Array.isArray(K)?n.push(ve.getValueToObjectValue(K,L)):n.push(K)})}return n},Qf=O.useMenuState(O.pinia),{activeMenuPath:ov}=O.storeToRefs(Qf),e0=O.useUnit(O.pinia),{chooseTitle:tv}=O.storeToRefs(e0),a0="col-operate",yc=a=>`${a0}-${a}`,l0=(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||{},u=r.get(v);r0(u,s),Array.isArray(s==null?void 0:s.children)&&s.children.length>0&&n(s.children)})};return n(l),l},r0=(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),n0=(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}},i0=async a=>{var s,v;if(!a)return;const l=yc(a),r=await Dr.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]},o0=async a=>{if(a)return[]},t0=async(a,l)=>{if(!a||!l)return;const r=yc(a);return await Dr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r},value:{columns:l}})},s0=async(a,l)=>!a||!l?void 0:await Dr.updateInsofDataApi({id:a,value:{columns:l}}),ms=async(a,l)=>{const r=sessionStorage.getItem("systemKey");if(!a||!l||!r)return;const n=await i0(a);return n?await s0(n==null?void 0:n.id,l):await t0(a,l)};var wo={exports:{}},c0=wo.exports,ys;function u0(){return ys||(ys=1,function(a,l){(function(r,n){n()})(c0,function(){function r(m,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.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,c,k){var C=new XMLHttpRequest;C.open("GET",m),C.responseType="blob",C.onload=function(){p(C.response,c,k)},C.onerror=function(){console.error("could not download file")},C.send()}function t(m){var c=new XMLHttpRequest;c.open("HEAD",m,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function s(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(c)}}var v=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Vn.commonjsGlobal=="object"&&Vn.commonjsGlobal.global===Vn.commonjsGlobal?Vn.commonjsGlobal:void 0,u=v.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=v.saveAs||(typeof window!="object"||window!==v?function(){}:"download"in HTMLAnchorElement.prototype&&!u?function(m,c,k){var C=v.URL||v.webkitURL,V=document.createElement("a");c=c||m.name||"download",V.download=c,V.rel="noopener",typeof m=="string"?(V.href=m,V.origin===location.origin?s(V):t(V.href)?n(m,c,k):s(V,V.target="_blank")):(V.href=C.createObjectURL(m),setTimeout(function(){C.revokeObjectURL(V.href)},4e4),setTimeout(function(){s(V)},0))}:"msSaveOrOpenBlob"in navigator?function(m,c,k){if(c=c||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(r(m,k),c);else if(t(m))n(m,c,k);else{var C=document.createElement("a");C.href=m,C.target="_blank",setTimeout(function(){s(C)})}}:function(m,c,k,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof m=="string")return n(m,c,k);var V=m.type==="application/octet-stream",_=/constructor/i.test(v.HTMLElement)||v.safari,G=/CriOS\/[\d]+/.test(navigator.userAgent);if((G||V&&_||u)&&typeof FileReader<"u"){var z=new FileReader;z.onloadend=function(){var E=z.result;E=G?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=E:location=E,C=null},z.readAsDataURL(m)}else{var I=v.URL||v.webkitURL,P=I.createObjectURL(m);C?C.location=P:location.href=P,C=null,setTimeout(function(){I.revokeObjectURL(P)},4e4)}});v.saveAs=p.saveAs=p,a.exports=p})}(wo)),wo.exports}u0();const Xn=O.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}}}),d0=O.useLoginState(O.pinia),{loginUserInfo:dt}=O.storeToRefs(d0),p0=async a=>{var n,t,s;let l=await O.getAllTables({platId:parseInt((n=dt==null?void 0:dt.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 uc(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}]}]},f0=O.useLoginState(),{loginUserInfo:fl}=O.storeToRefs(f0);let yo="$R";const Cr=O.useModelComp(O.pinia),gc=e.ref(!1),{itemData:h0,itemGridData:oi,curStructureCompIds:gs,isSubmitCurStructure:v0,routeToChildPath:m0,pageMapState:xt,itemExtendData:go,refreshTable:bs}=O.storeToRefs(Cr),$o=Xn(O.pinia),Mr=O.useMenuState(O.pinia),sr=e.shallowRef([]),{asideMenus:y0,activeTopMenuPath:g0,activeMenuPath:vl,platform:sv,buttonTriggerType:b0,currentMenuPath:Qr}=O.storeToRefs(Mr),fn=O.useUnit(O.pinia),{selectTitle:Gn,chooseTitle:Bo}=O.storeToRefs(fn);e.ref();const Ni=e.ref(!0),Jn=e.ref(0),wt=e.ref([]);e.ref(!1);const Bt=e.ref(!1),qi=e.ref(),bc=e.ref(),kc=e.ref(),k0=()=>{Cr.setItemGridData([]),Cr.setIsEdit("edit"),Cr.setSubmitCurStructure(vl.value!=="/平台管理/菜单管理")},x0=()=>{Cr.setIsEdit("view"),Cr.setRefreshCurStructure(!0)},w0=async a=>{var t;let l=Gn.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);fn.setSelectTitle(ll.safeClone(n)),n=(t=n==null?void 0:n.map(s=>s==null?void 0:s.value))==null?void 0:t.join("/"),Mr.setActiveMenuPath(null),Mr.setActiveMenuPath(n)},pt=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(p=>{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:{...p,compData:(m=p==null?void 0:p.compData)==null?void 0:m.filter(c=>(c==null?void 0:c.key)!=="tableContents")}}}})},v=Dr.batchAddInsofDataApi):l==="update"?(s={dataList:a==null?void 0:a.map(p=>{var m;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(m=p==null?void 0:p.compData)==null?void 0:m.filter(c=>(c==null?void 0:c.key)!=="tableContents")}}}})},v=Dr.batchUpdateInsofDataApi):l==="delete"&&(s={ids:a},v=Dr.batchDeleteInsofDataApi);const u=await v(s);if(((t=u==null?void 0:u.data)==null?void 0:t.code)===200)return u.data.result;throw Wa.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Wa.ElMessage.error("保存响应失败")}},ks=async(a,l,r,n)=>{var t,s,v,u,p,m,c,k,C,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}})),z=(u=(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:u.map(w=>({id:w==null?void 0:w.id,value:{tableData:w}})),I=JSON.parse(JSON.stringify(a)),P=(p=I==null?void 0:I.results)==null?void 0:p.map(w=>w.id);let E;r?E=(k=(c=(m=xt.value)==null?void 0:m[vl.value])==null?void 0:c.filter(w=>{var b,y,L;return((b=w==null?void 0:w.key)==null?void 0:b.type)===l&&((L=(y=w==null?void 0:w.key)==null?void 0:y.relatedInfo)==null?void 0:L.target)===n}))==null?void 0:k.map(w=>w==null?void 0:w.id):E=(_=(V=(C=xt.value)==null?void 0:C[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=>!(P!=null&&P.includes(w))&&typeof w=="number");(G==null?void 0:G.length)>0&&await Dr.batchAddInsofDataApi({dataList:G}),(z==null?void 0:z.length)>0&&await Dr.batchUpdateInsofDataApi({dataList:z}),(S==null?void 0:S.length)>0&&await Dr.batchDeleteInsofDataApi({ids:S})}catch(G){throw new Error(G)}},_0=async a=>{var m,c,k,C,V,_,G,z,I,P;Mr.setContentLoading(!0);const l=JSON.parse(JSON.stringify(h0.value));if(!v0.value)return Mr.setCacheStructures({key:b0.value,data:l}),Wa.ElMessage.success("已暂存");const r=l==null?void 0:l.map(E=>E.id),n=r.filter(E=>{var S;return!((S=gs.value)!=null&&S.includes(E))}),t=(m=gs.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),u=l==null?void 0:l.filter(E=>E.id);let p=[];if(s&&(s==null?void 0:s.length)>0&&p.push(pt(s,"delete",a)),v&&(v==null?void 0:v.length)>0&&p.push(pt(v,"create",a)),u&&(u==null?void 0:u.length)>0&&p.push(pt(u,"update",a)),oi.value&&((c=oi.value)!=null&&c.isDelete&&((C=(k=oi.value)==null?void 0:k.results)==null?void 0:C.length)>0&&((_=(V=oi.value)==null?void 0:V.results)!=null&&_.every(E=>typeof E=="number"))?await Dr.batchDeleteInsofDataApi({ids:(G=oi.value)==null?void 0:G.results}):(console.log("itemGridData.value",oi.value),p.push(await ks(oi.value,"gridLayout")))),go.value)for(const E in go.value)p.push(await ks((z=go.value)==null?void 0:z[E],"extend",{target:E,compId:(P=(I=go.value)==null?void 0:I[E])==null?void 0:P.compId},E));await Promise.all(p).then(()=>{Wa.ElMessage.success("保存成功"),Cr.setRefreshCurStructure(!0)}).catch(E=>{Wa.ElMessage.success(E)}),Mr.setContentLoading(!1)},Wi=a=>Ti(a),S0=e.computed(()=>{var a;return(a=sr.value)==null?void 0:a.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),xc=e.computed(()=>{var a;return(a=sr.value)==null?void 0:a.filter(l=>!(l!=null&&l.affix&&(l==null?void 0:l.affix)!=="default"))}),wc=e.ref(0),_c=e.ref(null),E0="ocr_committed_temp_ids_v1",C0=(a,l)=>`${E0}:${String(a??"")}:${String(l??"")}`,D0=(a,l,r)=>{try{const n=C0(a,l),t=sessionStorage.getItem(n),s=t?JSON.parse(t):[],v=Array.isArray(s)?s:[],u=Array.from(new Set([...v,...r||[]].map(p=>String(p)))).slice(-200);sessionStorage.setItem(n,JSON.stringify(u))}catch{}},Ao=async(a,l="data",r)=>{var t,s,v,u,p,m,c,k,C,V,_,G,z,I,P,E,S,w,b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze,we,na,ta,_a,ya,Pa,va,Le,Ra,pl,_l,Xl,bl,Vl,Ua,$l,zl;let n=((v=(s=(t=Gn.value)==null?void 0:t.filter(La=>(La==null?void 0:La.condition)==="child"))==null?void 0:s[0])==null?void 0:v.value)??"";if((a==null?void 0:a.buttonName)==="新增"){let La=(u=a==null?void 0:a.fixContent)==null?void 0:u.map(ye=>{let ma={};for(let Oe in ye)Array.isArray(ye==null?void 0:ye[Oe])?ma[Oe]=JSON.stringify(ye==null?void 0:ye[Oe]):ma[Oe]=ye==null?void 0:ye[Oe];return ma}),al=await O.quoteApi({platId:parseInt((p=fl==null?void 0:fl.value)==null?void 0:p.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});al=(m=al==null?void 0:al.data)==null?void 0:m.result,al=al==null?void 0:al.filter(ye=>{var ma,Oe;return!((ye==null?void 0:ye.fatherPath)!==""&&((Oe=(ma=ye==null?void 0:ye.quote)==null?void 0:ma[0])==null?void 0:Oe.menus)===(vl==null?void 0:vl.value))});let nl=al==null?void 0:al.map(ye=>{var ka,ua;let ma={},Oe=La==null?void 0:La[0],ue;return Array.isArray((ka=ye==null?void 0:ye.struct)==null?void 0:ka[0])?ue=ve.getColumnChild((ua=ye==null?void 0:ye.struct)==null?void 0:ua[0]):ue=ye==null?void 0:ye.struct,ue=ue==null?void 0:ue.filter(ea=>(ea==null?void 0:ea.prop)!=="relatedId"),ue==null||ue.forEach(ea=>{var Je,Xe;ma[ea.prop]=((Je=ea==null?void 0:ea.words)!=null&&Je[0]?(Oe==null?void 0:Oe[(Xe=ea==null?void 0:ea.words)==null?void 0:Xe[0]])??(Oe==null?void 0:Oe[ea==null?void 0:ea.prop]):Oe==null?void 0:Oe[ea==null?void 0:ea.prop])??""}),ma.id="1",ma.relatedId=`[${ma.id}]`,delete ma.sort,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[ma]}}),ia=[{tableName:(c=a==null?void 0:a.relatedContents)==null?void 0:c.find(ye=>ye==null?void 0:ye.includes("content")),tableContents:La}];ia=[...ia,...nl];let ja=await O.quoteApi({platId:parseInt((k=fl==null?void 0:fl.value)==null?void 0:k.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});ja=(V=(C=ja==null?void 0:ja.data)==null?void 0:C.result)==null?void 0:V.filter(ye=>!(ia!=null&&ia.find(ma=>(ma==null?void 0:ma.tableName)==="content_"+(ye==null?void 0:ye.id)))),ja=ja==null?void 0:ja.filter(ye=>{var ma,Oe;return!((ye==null?void 0:ye.fatherPath)!==""&&((Oe=(ma=ye==null?void 0:ye.quote)==null?void 0:ma[0])==null?void 0:Oe.menus)===(vl==null?void 0:vl.value))});let Oa=ja==null?void 0:ja.map(ye=>{var ka,ua,ea,Je,Xe,cl,Ve;let ma={},Oe=La==null?void 0:La[0],ue;return Array.isArray((ka=ye==null?void 0:ye.struct)==null?void 0:ka[0])?ue=ve.getColumnChild((ua=ye==null?void 0:ye.struct)==null?void 0:ua[0]):ue=ye==null?void 0:ye.struct,ue=ue==null?void 0:ue.filter(Fa=>(Fa==null?void 0:Fa.prop)!=="relatedId"),((Je=(ea=ue==null?void 0:ue[0])==null?void 0:ea.words)!=null&&Je[0]?Oe!=null&&Oe[(cl=(Xe=ue==null?void 0:ue[0])==null?void 0:Xe.words)==null?void 0:cl[0]]:Oe!=null&&Oe[(Ve=ue==null?void 0:ue[0])==null?void 0:Ve.prop])?(ue==null||ue.forEach(Fa=>{var wa,il;ma[Fa.prop]=((wa=Fa==null?void 0:Fa.words)!=null&&wa[0]?(Oe==null?void 0:Oe[(il=Fa==null?void 0:Fa.words)==null?void 0:il[0]])??(Oe==null?void 0:Oe[Fa==null?void 0:Fa.prop]):Oe==null?void 0:Oe[Fa==null?void 0:Fa.prop])??""}),ma.id="1",ma.relatedId=`[${ma.id}]`,delete ma.sort):ma=void 0,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[ma]}});Oa=Oa==null?void 0:Oa.filter(ye=>{var ma;return!((ma=ye==null?void 0:ye.tableContents)!=null&&ma.every(Oe=>Oe===void 0))}),ia=[...ia,...Oa],await O.pageBatchAddApi({platId:parseInt((_=fl==null?void 0:fl.value)==null?void 0:_.plat_id),changeContents:ia});let Va=[];ia==null||ia.forEach(ye=>{var ma;(ma=ye==null?void 0:ye.tableContents)==null||ma.forEach(Oe=>{Va.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Oe),request_result:"{}",is_delete:!1,request_table:ye==null?void 0:ye.tableName,request_type:"add"})})}),await O.pageBatchAddApi({platId:parseInt((G=fl==null?void 0:fl.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:Va}]})}if((a==null?void 0:a.buttonName)==="OCR批量新增"){const La=((a==null?void 0:a.ocrRows)||[]).map(ja=>ja==null?void 0:ja.id).filter(ja=>ja!=null),al=((a==null?void 0:a.ocrRows)||[]).map(ja=>{const Oa={...ja};return delete Oa._isOCRRow,delete Oa._ocrTableId,Object.keys(Oa).forEach(Va=>{/(^|\.)证书附件$/.test(Va)&&Array.isArray(Oa[Va])&&(Oa[Va]=JSON.stringify(Oa[Va].map(ye=>({url:(ye==null?void 0:ye.url)||"",name:(ye==null?void 0:ye.name)||(ye==null?void 0:ye.fileName)||"",fileName:(ye==null?void 0:ye.fileName)||(ye==null?void 0:ye.name)||""})).filter(ye=>ye.url||ye.name)))}),Oa});let nl=[{tableName:(z=a==null?void 0:a.relatedContents)==null?void 0:z.find(ja=>ja==null?void 0:ja.includes("content")),tableContents:al}];await O.pageBatchAddApi({platId:parseInt((I=fl==null?void 0:fl.value)==null?void 0:I.plat_id),changeContents:nl});let ia=[];nl==null||nl.forEach(ja=>{var Oa;(Oa=ja==null?void 0:ja.tableContents)==null||Oa.forEach(Va=>{ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Va),request_result:"{}",is_delete:!1,request_table:ja==null?void 0:ja.tableName,request_type:"ocrBatchAdd"})})}),await O.pageBatchAddApi({platId:parseInt((P=fl==null?void 0:fl.value)==null?void 0:P.plat_id),changeContents:[{tableName:"log",tableContents:ia}]}),D0(a==null?void 0:a.parentTableId,a==null?void 0:a.index,La)}if((a==null?void 0:a.buttonName)==="编辑"){const al=((a==null?void 0:a.fixContent)||(a==null?void 0:a.singleContent)||[]||[]).map(ue=>{const ka={...ue};return delete ka._isOCRRow,delete ka._ocrTableId,delete ka._isTemp,delete ka.tableEditType,delete ka.index,ka});let nl=al==null?void 0:al.map(ue=>{let ka={};for(let ua in ue)Array.isArray(ue==null?void 0:ue[ua])?ka[ua]=JSON.stringify(ue==null?void 0:ue[ua]):ka[ua]=ue==null?void 0:ue[ua];return ka}),ia=await O.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}]});ia=(S=ia==null?void 0:ia.data)==null?void 0:S.result,ia=ia==null?void 0:ia.filter(ue=>{var ka,ua;return!((ue==null?void 0:ue.fatherPath)!==""&&((ua=(ka=ue==null?void 0:ue.quote)==null?void 0:ka[0])==null?void 0:ua.menus)===(vl==null?void 0:vl.value))});let ja=(w=nl==null?void 0:nl[0])==null?void 0:w.id,Oa=[{tableName:(b=a==null?void 0:a.relatedContents)==null?void 0:b.find(ue=>ue==null?void 0:ue.includes("content")),tableContents:nl}],Va=(y=ia==null?void 0:ia.map(ue=>{var ua,ea,Je,Xe,cl;let ka=(ua=ue==null?void 0:ue.contents)==null?void 0:ua.filter(Ve=>{var Fa,wa;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(ja)):(Ve==null?void 0:Ve.sort)===((wa=nl==null?void 0:nl[0])==null?void 0:wa.sort)});if((ka==null?void 0:ka.length)>0){let Ve=nl==null?void 0:nl[0];Ve={...Ve,id:(ea=ka==null?void 0:ka[0])==null?void 0:ea.id};let Fa={},wa=Ve,il;return Array.isArray((Je=ue==null?void 0:ue.struct)==null?void 0:Je[0])?il=ve.getColumnChild((Xe=ue==null?void 0:ue.struct)==null?void 0:Xe[0]):il=ue==null?void 0:ue.struct,il=il==null?void 0:il.filter(Aa=>(Aa==null?void 0:Aa.prop)!=="relatedId"),il==null||il.forEach(Aa=>{var Me,Sl;Fa[Aa.prop]=((Me=Aa==null?void 0:Aa.words)!=null&&Me[0]?(wa==null?void 0:wa[(Sl=Aa==null?void 0:Aa.words)==null?void 0:Sl[0]])??(wa==null?void 0:wa[Aa==null?void 0:Aa.prop]):wa==null?void 0:wa[Aa==null?void 0:Aa.prop])??""}),Fa.id=(cl=ka==null?void 0:ka[0])==null?void 0:cl.id,delete Fa.sort,delete Fa.relatedId,{tableName:"content_"+(ue==null?void 0:ue.id),tableContents:[Fa]}}else return}))==null?void 0:y.filter(ue=>ue);Oa=[...Oa,...Va];let ye=await O.quoteApi({platId:parseInt((L=fl==null?void 0:fl.value)==null?void 0:L.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});ye=(K=($=ye==null?void 0:ye.data)==null?void 0:$.result)==null?void 0:K.filter(ue=>!(Oa!=null&&Oa.find(ka=>(ka==null?void 0:ka.tableName)==="content_"+(ue==null?void 0:ue.id)))),ye=ye==null?void 0:ye.filter(ue=>{var ka,ua;return!((ue==null?void 0:ue.fatherPath)!==""&&((ua=(ka=ue==null?void 0:ue.quote)==null?void 0:ka[0])==null?void 0:ua.menus)===(vl==null?void 0:vl.value))});let ma=(ie=ye==null?void 0:ye.map(ue=>{var ua,ea,Je,Xe,cl;let ka=(ua=ue==null?void 0:ue.contents)==null?void 0:ua.filter(Ve=>{var Fa,wa,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(ja)):(Ve==null?void 0:Ve.sort)===((wa=nl==null?void 0:nl[0])==null?void 0:wa.sort)||(Ve==null?void 0:Ve.sort)===(parseInt(((il=nl==null?void 0:nl[0])==null?void 0:il.sort)??"0")+1).toString()});if((ka==null?void 0:ka.length)>0){let Ve=nl==null?void 0:nl[0];Ve={...Ve,id:(ea=ka==null?void 0:ka[0])==null?void 0:ea.id};let Fa={},wa=Ve,il;return Array.isArray((Je=ue==null?void 0:ue.struct)==null?void 0:Je[0])?il=ve.getColumnChild((Xe=ue==null?void 0:ue.struct)==null?void 0:Xe[0]):il=ue==null?void 0:ue.struct,il=il==null?void 0:il.filter(Aa=>(Aa==null?void 0:Aa.prop)!=="relatedId"),il==null||il.forEach(Aa=>{var Me,Sl,Il,Gl;((Me=Aa==null?void 0:Aa.words)!=null&&Me[0]?(wa==null?void 0:wa[(Sl=Aa==null?void 0:Aa.words)==null?void 0:Sl[0]])??(wa==null?void 0:wa[Aa==null?void 0:Aa.prop]):wa!=null&&wa[Aa==null?void 0:Aa.prop])&&(Fa[Aa.prop]=((Il=Aa==null?void 0:Aa.words)!=null&&Il[0]?(wa==null?void 0:wa[(Gl=Aa==null?void 0:Aa.words)==null?void 0:Gl[0]])??(wa==null?void 0:wa[Aa==null?void 0:Aa.prop]):wa==null?void 0:wa[Aa==null?void 0:Aa.prop])??"")}),Fa.id=(cl=ka==null?void 0:ka[0])==null?void 0:cl.id,delete Fa.sort,delete Fa.relatedId,{tableName:"content_"+(ue==null?void 0:ue.id),tableContents:[Fa]}}else return}))==null?void 0:ie.filter(ue=>ue);Oa=[...Oa,...ma],await O.pageBatchUpdateApi({platId:parseInt((Se=fl==null?void 0:fl.value)==null?void 0:Se.plat_id),changeContents:Oa});let Oe=[];Oa==null||Oa.forEach(ue=>{var ka;(ka=ue==null?void 0:ue.tableContents)==null||ka.forEach(ua=>{Oe.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(ua),request_result:"{}",is_delete:!1,request_table:ue==null?void 0:ue.tableName,request_type:"update"})})}),await O.pageBatchAddApi({platId:parseInt((oe=fl==null?void 0:fl.value)==null?void 0:oe.plat_id),changeContents:[{tableName:"log",tableContents:Oe}]})}if((a==null?void 0:a.buttonName)==="删除"){let La=[{tableName:(X=a==null?void 0:a.relatedContents)==null?void 0:X.find(ye=>ye==null?void 0:ye.includes("content")),tableContents:a==null?void 0:a.fixContent}],al=await O.quoteApi({platId:parseInt((pe=fl==null?void 0:fl.value)==null?void 0:pe.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});al=(ee=al==null?void 0:al.data)==null?void 0:ee.result,al=al==null?void 0:al.filter(ye=>{var ma,Oe;return!((ye==null?void 0:ye.fatherPath)!==""&&((Oe=(ma=ye==null?void 0:ye.quote)==null?void 0:ma[0])==null?void 0:Oe.menus)===(vl==null?void 0:vl.value))});let nl=(De=(te=a==null?void 0:a.fixContent)==null?void 0:te[0])==null?void 0:De.id,ia=(Pe=al==null?void 0:al.map(ye=>{var Oe,ue,ka,ua,ea,Je;let ma=(Oe=ye==null?void 0:ye.contents)==null?void 0:Oe.filter(Xe=>{var cl,Ve,Fa;return JSON.stringify(Xe==null?void 0:Xe.relatedId)!=="{}"&&(Xe==null?void 0:Xe.relatedId)!==""&&(Xe!=null&&Xe.relatedId)?(cl=Xe==null?void 0:Xe.relatedId)==null?void 0:cl.includes(parseInt(nl)):(Xe==null?void 0:Xe.sort)===((Fa=(Ve=a==null?void 0:a.fixContent)==null?void 0:Ve[0])==null?void 0:Fa.sort)});if((ma==null?void 0:ma.length)>0){let Xe=(ue=a==null?void 0:a.fixContent)==null?void 0:ue[0];Xe={...Xe,id:(ka=ma==null?void 0:ma[0])==null?void 0:ka.id};let cl={},Ve=Xe,Fa;return Array.isArray((ua=ye==null?void 0:ye.struct)==null?void 0:ua[0])?Fa=ve.getColumnChild((ea=ye==null?void 0:ye.struct)==null?void 0:ea[0]):Fa=ye==null?void 0:ye.struct,Fa=Fa==null?void 0:Fa.filter(wa=>(wa==null?void 0:wa.prop)!=="relatedId"),Fa==null||Fa.forEach(wa=>{var il,Aa;cl[wa.prop]=((il=wa==null?void 0:wa.words)!=null&&il[0]?(Ve==null?void 0:Ve[(Aa=wa==null?void 0:wa.words)==null?void 0:Aa[0]])??(Ve==null?void 0:Ve[wa==null?void 0:wa.prop]):Ve==null?void 0:Ve[wa==null?void 0:wa.prop])??""}),cl.id=(Je=ma==null?void 0:ma[0])==null?void 0:Je.id,delete cl.sort,delete cl.relatedId,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[cl]}}else return}))==null?void 0:Pe.filter(ye=>ye);La=[...La,...ia];let ja=await O.quoteApi({platId:parseInt((ge=fl==null?void 0:fl.value)==null?void 0:ge.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});ja=(U=(N=ja==null?void 0:ja.data)==null?void 0:N.result)==null?void 0:U.filter(ye=>!(La!=null&&La.find(ma=>(ma==null?void 0:ma.tableName)==="content_"+(ye==null?void 0:ye.id)))),ja=ja==null?void 0:ja.filter(ye=>{var ma,Oe;return!((ye==null?void 0:ye.fatherPath)!==""&&((Oe=(ma=ye==null?void 0:ye.quote)==null?void 0:ma[0])==null?void 0:Oe.menus)===(vl==null?void 0:vl.value))});let Oa=(le=ja==null?void 0:ja.map(ye=>{var Oe,ue,ka,ua,ea,Je;let ma=(Oe=ye==null?void 0:ye.contents)==null?void 0:Oe.filter(Xe=>{var cl,Ve,Fa;return JSON.stringify(Xe==null?void 0:Xe.relatedId)!=="{}"&&(Xe==null?void 0:Xe.relatedId)!==""&&(Xe!=null&&Xe.relatedId)?(cl=Xe==null?void 0:Xe.relatedId)==null?void 0:cl.includes(parseInt(nl)):(Xe==null?void 0:Xe.sort)===((Fa=(Ve=a==null?void 0:a.fixContent)==null?void 0:Ve[0])==null?void 0:Fa.sort)});if((ma==null?void 0:ma.length)>0){let Xe=(ue=a==null?void 0:a.fixContent)==null?void 0:ue[0];Xe={...Xe,id:(ka=ma==null?void 0:ma[0])==null?void 0:ka.id};let cl={},Ve=Xe,Fa;return Array.isArray((ua=ye==null?void 0:ye.struct)==null?void 0:ua[0])?Fa=ve.getColumnChild((ea=ye==null?void 0:ye.struct)==null?void 0:ea[0]):Fa=ye==null?void 0:ye.struct,Fa=Fa==null?void 0:Fa.filter(wa=>(wa==null?void 0:wa.prop)!=="relatedId"),Fa==null||Fa.forEach(wa=>{var il,Aa;cl[wa.prop]=((il=wa==null?void 0:wa.words)!=null&&il[0]?(Ve==null?void 0:Ve[(Aa=wa==null?void 0:wa.words)==null?void 0:Aa[0]])??(Ve==null?void 0:Ve[wa==null?void 0:wa.prop]):Ve==null?void 0:Ve[wa==null?void 0:wa.prop])??""}),cl.id=(Je=ma==null?void 0:ma[0])==null?void 0:Je.id,delete cl.sort,delete cl.relatedId,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[cl]}}else return}))==null?void 0:le.filter(ye=>ye);La=[...La,...Oa],await O.pageBatchDeleteApi({platId:parseInt((Te=fl==null?void 0:fl.value)==null?void 0:Te.plat_id),changeContents:La});let Va=[];La==null||La.forEach(ye=>{var ma;(ma=ye==null?void 0:ye.tableContents)==null||ma.forEach(Oe=>{Va.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Oe),request_result:"{}",is_delete:!1,request_table:ye==null?void 0:ye.tableName,request_type:"delete"})})}),await O.pageBatchAddApi({platId:parseInt((Ee=fl==null?void 0:fl.value)==null?void 0:Ee.plat_id),changeContents:[{tableName:"log",tableContents:Va}]})}if((a==null?void 0:a.buttonName)==="复制新增"){let La=await O.getPageDataApi({platId:parseInt((qe=fl==null?void 0:fl.value)==null?void 0:qe.plat_id),pageName:"menu"});if(La=(ca=La==null?void 0:La.data)==null?void 0:ca.result,La!=null&&La.find(al=>(al==null?void 0:al.father_name)===vl.value+"/")){kc.value=a,bc.value=La==null?void 0:La.filter(ia=>(ia==null?void 0:ia.father_name)===vl.value+"/");let al=(ae=(Na=a==null?void 0:a.columns)==null?void 0:Na.find(ia=>ia==null?void 0:ia.mainKey))==null?void 0:ae.prop,nl=(he=(la=a==null?void 0:a.fixContent)==null?void 0:la[0])==null?void 0:he[al];Bt.value=!0,qi.value=[{prop:al,label:al,name:al,value:nl}]}else{let al=(Ke=a==null?void 0:a.fixContent)==null?void 0:Ke.map(ja=>{let Oa={};for(let Va in ja)Array.isArray(ja==null?void 0:ja[Va])?Oa[Va]=JSON.stringify(ja==null?void 0:ja[Va]):Oa[Va]=ja==null?void 0:ja[Va];return Oa.relatedId="",Oa}),nl=[{tableName:(Ie=a==null?void 0:a.relatedContents)==null?void 0:Ie.find(ja=>ja==null?void 0:ja.includes("content")),tableContents:al}];await O.pageBatchAddApi({platId:parseInt((se=fl==null?void 0:fl.value)==null?void 0:se.plat_id),changeContents:nl});let ia=[];nl==null||nl.forEach(ja=>{var Oa;(Oa=ja==null?void 0:ja.tableContents)==null||Oa.forEach(Va=>{ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Va),request_result:"{}",is_delete:!1,request_table:ja==null?void 0:ja.tableName,request_type:"copyAdd"})})}),await O.pageBatchAddApi({platId:parseInt((Be=fl==null?void 0:fl.value)==null?void 0:Be.plat_id),changeContents:[{tableName:"log",tableContents:ia}]})}}if((a==null?void 0:a.buttonName)==="methodButton"){let La=((za=(ba=(Fe=a==null?void 0:a.columns)==null?void 0:Fe.map(ue=>ue==null?void 0:ue.filter))==null?void 0:ba.filter(ue=>ue!==""))==null?void 0:za[0])??"";La=ve.analyzeSplitToContent(La,","),La=(La==null?void 0:La.find(ue=>ue==null?void 0:ue.includes("@Filter")))??"";let al=(F=a==null?void 0:a.fixContent)==null?void 0:F.map(ue=>{let ka={};for(let ua in ue)Array.isArray(ue==null?void 0:ue[ua])?ka[ua]=JSON.stringify(ue==null?void 0:ue[ua]):ka[ua]=ue==null?void 0:ue[ua];return ka}),nl=await O.quoteApi({platId:parseInt((j=fl==null?void 0:fl.value)==null?void 0:j.plat_id),type:"fatherSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});nl=(Z=nl==null?void 0:nl.data)==null?void 0:Z.result,nl=nl==null?void 0:nl.filter(ue=>{var ka,ua;return!((ue==null?void 0:ue.fatherPath)!==""&&((ua=(ka=ue==null?void 0:ue.quote)==null?void 0:ka[0])==null?void 0:ua.menus)===(vl==null?void 0:vl.value))});let ia=(me=(fe=a==null?void 0:a.columns)==null?void 0:fe[0])==null?void 0:me.prop,ja=(pa=al==null?void 0:al[0])==null?void 0:pa[ia],Oa=[{tableName:(Qe=a==null?void 0:a.relatedContents)==null?void 0:Qe.find(ue=>ue==null?void 0:ue.includes("content")),tableContents:al}],Va=(de=nl==null?void 0:nl.map(ue=>{var ua,ea,Je,Xe,cl;let ka=(ua=ue==null?void 0:ue.contents)==null?void 0:ua.filter(Ve=>{var Fa;return(Fa=Object.values(Ve))==null?void 0:Fa.find(wa=>wa===ja)});if((ka==null?void 0:ka.length)>0){let Ve=al==null?void 0:al[0];Ve={...Ve,id:(ea=ka==null?void 0:ka[0])==null?void 0:ea.id};let Fa={},wa=Ve,il;return Array.isArray((Je=ue==null?void 0:ue.struct)==null?void 0:Je[0])?il=ve.getColumnChild((Xe=ue==null?void 0:ue.struct)==null?void 0:Xe[0]):il=ue==null?void 0:ue.struct,il=il==null?void 0:il.filter(Aa=>(Aa==null?void 0:Aa.prop)!=="relatedId"),il==null||il.forEach(Aa=>{var Me,Sl;Fa[Aa.prop]=((Me=Aa==null?void 0:Aa.words)!=null&&Me[0]?(wa==null?void 0:wa[(Sl=Aa==null?void 0:Aa.words)==null?void 0:Sl[0]])??(wa==null?void 0:wa[Aa==null?void 0:Aa.prop]):wa==null?void 0:wa[Aa==null?void 0:Aa.prop])??""}),Fa.id=(cl=ka==null?void 0:ka[0])==null?void 0:cl.id,delete Fa.sort,{tableName:"content_"+(ue==null?void 0:ue.id),tableContents:[Fa]}}else return}))==null?void 0:de.filter(ue=>ue);Oa=[...Oa,...Va];let ye=await O.quoteApi({platId:parseInt((Ce=fl==null?void 0:fl.value)==null?void 0:Ce.plat_id),type:"sonSyncs",related:[{menus:n!==""?vl.value+"/"+n:vl.value,groups:a==null?void 0:a.name}]});if(ye=(Ue=(ha=ye==null?void 0:ye.data)==null?void 0:ha.result)==null?void 0:Ue.filter(ue=>!(Oa!=null&&Oa.find(ka=>(ka==null?void 0:ka.tableName)==="content_"+(ue==null?void 0:ue.id)))),ye=ye==null?void 0:ye.filter(ue=>{var ka,ua;return!((ue==null?void 0:ue.fatherPath)!==""&&((ua=(ka=ue==null?void 0:ue.quote)==null?void 0:ka[0])==null?void 0:ua.menus)===(vl==null?void 0:vl.value))}),La&&La!==""){(La==null?void 0:La[(La==null?void 0:La.length)-1])===","&&(La=La==null?void 0:La.slice(0,(La==null?void 0:La.length)-1)),La=(Ta=(Ma=La==null?void 0:La.replace("(",yo))==null?void 0:Ma.split(yo))==null?void 0:Ta[1],La=La==null?void 0:La.slice(0,(La==null?void 0:La.length)-1),(La==null?void 0:La[0])==="*"&&(La="{"+((oa=(Ze=La==null?void 0:La.replace("{",yo))==null?void 0:Ze.split(yo))==null?void 0:oa[1])),La=(ce=La==null?void 0:La.replaceAll("{",""))==null?void 0:ce.replaceAll("}","");let ue=ve.calculatorAndToOr(La);ue=ue==null?void 0:ue[0];let ka;if((H=Object.values(ue))!=null&&H.some(ua=>(ua==null?void 0:ua[0])==="*")){let ua=(ze=(q=Gn.value)==null?void 0:q.find(ea=>(ea==null?void 0:ea.condition)==="child"))!=null&&ze.value?(Qr==null?void 0:Qr.value)+"/"+((na=(we=Gn.value)==null?void 0:we.find(ea=>(ea==null?void 0:ea.condition)==="child"))==null?void 0:na.value):Qr==null?void 0:Qr.value;ka=await Kr(ua,!1)}for(let ua in ue)if(((ta=ue==null?void 0:ue[ua])==null?void 0:ta[0])==="*"){let ea=(va=(Pa=(ya=ue[ua])==null?void 0:ya.slice(1,(_a=ue[ua])==null?void 0:_a.length))==null?void 0:Pa.split(":"))==null?void 0:va[0],Je=(Ra=(Le=ue[ua])==null?void 0:Le.split(":"))==null?void 0:Ra[1],Xe=(pl=ka==null?void 0:ka.filter(cl=>(cl==null?void 0:cl.name)===ea))==null?void 0:pl[0];Xe=(Xl=(_l=Xe==null?void 0:Xe.compData)==null?void 0:_l.find(cl=>(cl==null?void 0:cl.key)==="tableContents"))==null?void 0:Xl.contents,Xe=(bl=Xe==null?void 0:Xe[0])==null?void 0:bl[Je],ue[ua]=Xe}La=((Vl=Object.values(ue))==null?void 0:Vl[0])??""}let ma=(Ua=ye==null?void 0:ye.map(ue=>{var ua,ea,Je,Xe,cl;let ka=(ua=ue==null?void 0:ue.contents)==null?void 0:ua.filter(Ve=>{var Fa;return(Fa=Object.values(Ve))==null?void 0:Fa.find(wa=>wa===(La===""?ja:La))});if((ka==null?void 0:ka.length)>0){let Ve=al==null?void 0:al[0];Ve={...Ve,id:(ea=ka==null?void 0:ka[0])==null?void 0:ea.id};let Fa={},wa=Ve,il;return Array.isArray((Je=ue==null?void 0:ue.struct)==null?void 0:Je[0])?il=ve.getColumnChild((Xe=ue==null?void 0:ue.struct)==null?void 0:Xe[0]):il=ue==null?void 0:ue.struct,il=il==null?void 0:il.filter(Aa=>(Aa==null?void 0:Aa.prop)!=="relatedId"),il==null||il.forEach(Aa=>{var Sl,Il,Gl,Hl;let Me=(Sl=a==null?void 0:a.columns)==null?void 0:Sl.find(Zl=>{var _r,Fl,pr;return((Fl=(_r=Zl==null?void 0:Zl.words)==null?void 0:_r[0])==null?void 0:Fl.replaceAll("'",""))===(Aa==null?void 0:Aa.prop)&&((pr=Zl==null?void 0:Zl.functionRelatedWords)==null?void 0:pr.length)>0});Me=(Il=Me==null?void 0:Me.prop)==null?void 0:Il.replaceAll("'",""),Fa[Aa.prop]=((Gl=Aa==null?void 0:Aa.words)!=null&&Gl[0]?(wa==null?void 0:wa[(Hl=Aa==null?void 0:Aa.words)==null?void 0:Hl[0]])??(wa==null?void 0:wa[Aa==null?void 0:Aa.prop])??(wa==null?void 0:wa[Me]):(wa==null?void 0:wa[Aa==null?void 0:Aa.prop])??(wa==null?void 0:wa[Me]))??void 0}),Fa.id=(cl=ka==null?void 0:ka[0])==null?void 0:cl.id,delete Fa.sort,{tableName:"content_"+(ue==null?void 0:ue.id),tableContents:[Fa]}}else return}))==null?void 0:Ua.filter(ue=>ue);Oa=[...Oa,...ma],await O.pageBatchUpdateApi({platId:parseInt(($l=fl==null?void 0:fl.value)==null?void 0:$l.plat_id),changeContents:Oa});let Oe=[];Oa==null||Oa.forEach(ue=>{var ka;(ka=ue==null?void 0:ue.tableContents)==null||ka.forEach(ua=>{Oe.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ua),request_result:"{}",is_delete:!1,request_table:ue==null?void 0:ue.tableName,request_type:"method"})})}),await O.pageBatchAddApi({platId:parseInt((zl=fl==null?void 0:fl.value)==null?void 0:zl.plat_id),changeContents:[{tableName:"log",tableContents:Oe}]})}Cr.setRefreshCurStructure(!0),await St(a)},_t=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 u;if((v==null?void 0:v.key)==="tableContents"){let p={...v,contents:r};return p.contents=(u=(p==null?void 0:p.contents)??[])==null?void 0:u.map(m=>{let c={};for(let k in m)JSON.stringify(m==null?void 0:m[k])==="{}"?c[k]="":c[k]=m==null?void 0:m[k];return c}),p}return v});return n.compData=await Nt(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(u=>{var p;return(u==null?void 0:u.children)&&((p=u==null?void 0:u.children)==null?void 0:p.length)>0||(u==null?void 0:u.comp)==="Tabs"}),v=s==null?void 0:s.map(async u=>{var p;return u!=null&&u.children&&((p=u==null?void 0:u.children)==null?void 0:p.length)>0?u.children=await _t(u==null?void 0:u.children,l,r):u.compData=await _t(u==null?void 0:u.compData,l,r),u});return s=await Promise.all(v),s}},St=async a=>{var s,v,u,p,m,c,k;let l=(s=a==null?void 0:a.relatedContents)==null?void 0:s.filter(C=>C==null?void 0:C.includes("content_"));if(!l)return;let r=await O.getAllTables({platId:parseInt((v=fl==null?void 0:fl.value)==null?void 0:v.plat_id),tableNames:l??[]});if(r=(p=(u=r==null?void 0:r.data)==null?void 0:u.result)==null?void 0:p[0],!r||!Array.isArray(r))return;r=r==null?void 0:r.map(C=>{C==null||delete C.source_table;const V={};for(let _ in C){const G=C==null?void 0:C[_],z=G&&Object.prototype.toString.call(G)==="[object Object]"&&Object.keys(G).length===0,I=Array.isArray(G)&&G.length===0;G==null||G==="{}"||z||I?V[_]="":V[_]=G}return V});let n=(c=(m=l==null?void 0:l[0])==null?void 0:m.split("_"))==null?void 0:c[1],t=await _t(sr.value,n,r);sr.value=(k=sr.value)==null?void 0:k.map(C=>{var V,_;return(V=t==null?void 0:t[0])!=null&&V.tabInform&&((_=t==null?void 0:t[0])==null?void 0:_.tabInform)===(C==null?void 0:C.tabInform)?C=t==null?void 0:t[0]:(C!=null&&C.name?(C==null?void 0:C.name)===(t==null?void 0:t.name):(C==null?void 0:C.id)===(t==null?void 0:t.id))&&(C=t),C})},N0=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))},T0=async()=>{var C,V,_,G,z,I,P,E,S,w;let a=kc.value,l=bc.value,r=(V=(C=a==null?void 0:a.columns)==null?void 0:C.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=(z=a==null?void 0:a.fixContent)==null?void 0:z.map(b=>{var L;let y={};for(let $ in b)Array.isArray(b==null?void 0:b[$])?y[$]=JSON.stringify(b==null?void 0:b[$]):y[$]=b==null?void 0:b[$];return(L=a==null?void 0:a.columns)==null||L.forEach($=>{($==null?void 0:$.formType)==="Upload"&&(y==null?void 0:y[$==null?void 0:$.prop])===""&&(y[$==null?void 0:$.prop]="{}")}),y[r]=n,y}),s=[{tableName:(I=a==null?void 0:a.relatedContents)==null?void 0:I.find(b=>b==null?void 0:b.includes("content")),tableContents:t}];await O.pageBatchAddApi({platId:parseInt((P=fl==null?void 0:fl.value)==null?void 0:P.plat_id),changeContents:s}),l=l==null?void 0:l.filter(b=>{var y,L,$;return($=b==null?void 0:b.object_name)==null?void 0:$.includes((L=(y=a==null?void 0:a.fixContent)==null?void 0:y[0])==null?void 0:L[r])});let v=[],u=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}`),u.set(b==null?void 0:b.object_id,b)});let p=await O.getAllTables({platId:parseInt((E=fl==null?void 0:fl.value)==null?void 0:E.plat_id),tableNames:v??[]});p=(S=p==null?void 0:p.data)==null?void 0:S.result;let m=[],c=[];p=ve.chunk(p,2),p==null||p.forEach(b=>{var $,K,ie,Se,oe,X,pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na,ae;let y=u.get((Se=(ie=(K=($=b==null?void 0:b[1])==null?void 0:$[0])==null?void 0:K.source_table)==null?void 0:ie.split("_"))==null?void 0:Se[1]),L=(pe=(X=(oe=y==null?void 0:y.object_name)==null?void 0:oe.split("/"))==null?void 0:X.filter((la,he)=>{var Ke,Ie;return((Ie=(Ke=y==null?void 0:y.object_name)==null?void 0:Ke.split("/"))==null?void 0:Ie.length)-1!==he}))==null?void 0:pe.join("/");if(L=L+"/"+n,c!=null&&c.find(la=>(la==null?void 0:la.path)===L)||c.push({fatherPath:y==null?void 0:y.father_name,isShow:y==null?void 0:y.is_show,path:L}),((te=(ee=b==null?void 0:b[1])==null?void 0:ee[0])==null?void 0:te.类型)==="Table"){let la=((ge=(Pe=(De=b==null?void 0:b[1])==null?void 0:De[0])==null?void 0:Pe.结构)==null?void 0:ge.contents)??[],he=ll.safeClone(la);Array.isArray(he==null?void 0:he[0])&&(he=ve.getColumnChild(he==null?void 0:he[0]));let Ke=[];if(((N=b==null?void 0:b[0])==null?void 0:N.length)>0&&(Ke=(U=b==null?void 0:b[0])==null?void 0:U.map(Ie=>he==null?void 0:he.map(Be=>(Be=(Ie==null?void 0:Ie[Be==null?void 0:Be.prop])??"",Be)))),m!=null&&m.find(Ie=>(Ie==null?void 0:Ie.key)===L)){let Ie=(le=m==null?void 0:m.find(Be=>(Be==null?void 0:Be.key)===L))==null?void 0:le.contents;Ie.push({isShow:y==null?void 0:y.is_show,filter:((qe=(Ee=(Te=b==null?void 0:b[1])==null?void 0:Te[0])==null?void 0:Ee.引用)==null?void 0:qe.contents)??"",key:"Table",name:Object.values(y==null?void 0:y.name),tableColumns:la,tableContents:Ke});let se=m==null?void 0:m.findIndex(Be=>(Be==null?void 0:Be.key)===L);m[se].contents=Ie}else m.push({key:L,contents:[{isShow:y==null?void 0:y.is_show,filter:((ae=(Na=(ca=b==null?void 0:b[1])==null?void 0:ca[0])==null?void 0:Na.引用)==null?void 0:ae.contents)??"",key:"Table",name:Object.values(y==null?void 0:y.name),tableColumns:la,tableContents:Ke}]})}});let k=[];k.push({key:"menuPath",contents:c}),k=[...k,...m],await O.createPlatFormDataApi({platId:parseInt((w=fl==null?void 0:fl.value)==null?void 0:w.plat_id),changeData:k}),Bt.value=!1,Cr.setRefreshTable(!0)},zo=async(a,l)=>{},Mo=async a=>{sr.value=await ve.getDeepDiffItems(a),Cr.setItemData(sr.value),Cr.setOriginalData(sr.value)};e.ref();const B0=e.ref(null),A0=()=>{var a,l;console.log("倒计时结束时"),pn.ElMessageBox.alert(`超时未提交,【${(l=(a=vl.value)==null?void 0:a.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Sc=e.ref([]),z0=e.computed(()=>{var a,l;return(l=(a=xt.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(()=>[g0.value],()=>{fn.setSelectTitle([]),fn.setChooseTitle([])},{deep:!0});e.watch(()=>Bo.value,async(a,l)=>{var n,t,s,v,u,p;let r=(n=Bo.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)!==Qr.value);if((r==null?void 0:r.length)>0){Mr.setContentLoading(!0);let m=((t=r==null?void 0:r[0])==null?void 0:t.relatedContent)??(vl==null?void 0:vl.value),c=m+"/"+((s=r==null?void 0:r[0])==null?void 0:s.value),k=!!((v=r==null?void 0:r[0])!=null&&v.parentContent),C=await Kr(c,k,{originPath:m});C=(u=C==null?void 0:C.filter(G=>G))==null?void 0:u.map(G=>(G.isShow=!0,G)),console.log(C,"loadingContents");let V=await ve.getDeepDiffItems(C),_=V==null?void 0:V.filter(G=>G==null?void 0:G.choice);$o.setSelectTab((p=_==null?void 0:_[0])==null?void 0:p.choiceName),V=V==null?void 0:V.filter(G=>{var z;return!(G!=null&&G.choiceName)||(G==null?void 0:G.choiceName)===((z=_==null?void 0:_[0])==null?void 0:z.choiceName)}),sr.value=V,Mr.setContentLoading(!1)}});const M0=(a,l)=>{setTimeout(async()=>{var u,p,m;let r=(u=Bo.value)==null?void 0:u.filter(c=>(c==null?void 0:c.condition)==="child"&&(c==null?void 0:c.value)!==""&&(c==null?void 0:c.parentContent)!==Qr.value),n=vl==null?void 0:vl.value,t=vl==null?void 0:vl.value;(r==null?void 0:r.length)>0&&(t=((p=r==null?void 0:r[0])==null?void 0:p.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(c=>(c.isShow=!0,c));let v=await ve.getDeepDiffItems(s);sr.value=v==null?void 0:v.filter(c=>!(c!=null&&c.step)||(c==null?void 0:c.step)===(a==null?void 0:a.title))},10)},I0=a=>{setTimeout(async()=>{var v,u,p;let l=(v=Bo.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)!==Qr.value),r=vl==null?void 0:vl.value,n=vl==null?void 0:vl.value;(l==null?void 0:l.length)>0&&(n=((u=l==null?void 0:l[0])==null?void 0:u.relatedContent)??(vl==null?void 0:vl.value),r=n+"/"+((p=l==null?void 0:l[0])==null?void 0:p.value));let t=await Kr(r,!1,{originPath:n});t=t==null?void 0:t.map(m=>(m.isShow=!0,m)),$o.setSelectTab(a);let s=await ve.getDeepDiffItems(t);sr.value=s==null?void 0:s.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===a)},10)};e.watch(()=>y0.value,a=>{a!=null&&a.length||(sr.value=[])},{immediate:!0});e.watch(()=>[vl.value],async a=>{var s,v,u,p;if(!vl.value)return;if(vl.value==="/"){sr.value=[];return}Mr.setCurrentMenuPath(vl.value),Cr.setLockingPage(""),sr.value=[];let l=e.getCurrentInstance();(s=l==null?void 0:l.scope)==null||s.stop(),l=null,Ni.value=!1,Mr.setContentLoading(!0),gc.value=!0;let r=a==null?void 0:a[0],n=r,t=(v=Gn.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+"/"+((u=t==null?void 0:t[0])==null?void 0:u.value)),r==="系统管理/日志管理")sr.value=await p0("log");else{let m=await Kr(r,!0,{originPath:n});m=m==null?void 0:m.map(C=>(C.isShow=!0,C));let c=await ve.getDeepDiffItems(m),k=c==null?void 0:c.filter(C=>C==null?void 0:C.choice);$o.setSelectTab((p=k==null?void 0:k[0])==null?void 0:p.choiceName),sr.value=c==null?void 0:c.filter(C=>{var V;return!(C!=null&&C.choiceName)||(C==null?void 0:C.choiceName)===((V=k==null?void 0:k[0])==null?void 0:V.choiceName)})}Mr.setContentLoading(!1),Cr.setExtraContents([]),fn.setSelectIndex(""),fn.setSelectMenu(""),Cr.setItemData(sr.value),Cr.setOriginalData(sr.value),Cr.setRefreshTable(!1),e.nextTick(()=>{Jn.value=Jn.value++,Ni.value=!0})},{immediate:!0});e.watch(()=>[bs.value],async()=>{var a,l,r,n;if(bs.value){sr.value=[];let t=e.getCurrentInstance();(a=t==null?void 0:t.scope)==null||a.stop(),t=null,Ni.value=!1,Mr.setContentLoading(!0),gc.value=!0;let s=Qr==null?void 0:Qr.value,v=s,u=(l=Gn.value)==null?void 0:l.filter(k=>(k==null?void 0:k.condition)==="child"&&(k==null?void 0:k.value)!==""&&(k==null?void 0:k.parentContent)!==(Qr==null?void 0:Qr.value));(u==null?void 0:u.length)>0&&(s=s+"/"+((r=u==null?void 0:u[0])==null?void 0:r.value));let p=await Kr(s,!0,{originPath:v});p=p==null?void 0:p.map(k=>(k.isShow=!0,k));let m=await ve.getDeepDiffItems(p),c=m==null?void 0:m.filter(k=>k==null?void 0:k.choice);if($o.setSelectTab((n=c==null?void 0:c[0])==null?void 0:n.choiceName),sr.value=m==null?void 0:m.filter(k=>{var C;return!(k!=null&&k.choiceName)||(k==null?void 0:k.choiceName)===((C=c==null?void 0:c[0])==null?void 0:C.choiceName)}),Mr.setContentLoading(!1),Cr.setExtraContents([]),fn.setSelectIndex(""),fn.setSelectMenu(""),Cr.setItemData(sr.value),Cr.setOriginalData(sr.value),Cr.setRefreshTable(!1),(u==null?void 0:u.length)>0){let k=[...Gn.value,...u];fn.setSelectTitle(k)}e.nextTick(()=>{Jn.value=Jn.value++,Ni.value=!0})}},{immediate:!0,deep:!0});const O0=async()=>{Mr.setLinkMenuInfo(null),Mr.setActiveMenuPath(m0.value),sr.value=null,Cr.setRouteToChildPath(""),Mr.setChildMenu("")},L0=a=>new RegExp("button","i").test(a),$0=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ec=a=>{if($0(a)){const l=a==null?void 0:a.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Mr.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Cc=async(a,l,r)=>{var C,V,_,G,z,I,P,E,S,w,b,y;let n="",t="";for(let L in l)(l==null?void 0:l[L])===a&&(t=L);r==null||r.forEach(L=>{(L==null?void 0:L.prop)===t&&(n=L==null?void 0:L.fatherPath)});let s=n===""?vl.value:n;n!==""&&Mr.setCurrentMenuPath(s),Mr.setCurrentMenuPath(s+"/"+a),Mr.setContentLoading(!0);let v=await Kr(s,!1),u=(C=v==null?void 0:v.filter(L=>(L==null?void 0:L.comp)==="Table"))==null?void 0:C[0],p=((z=(G=(_=(V=u==null?void 0:u.compData)==null?void 0:V.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:_.contents)==null?void 0:G[0])==null?void 0:z.prop)??((w=(S=(E=(P=(I=u==null?void 0:u.compData)==null?void 0:I.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:P.contents)==null?void 0:E[0])==null?void 0:S[0])==null?void 0:w.prop),m=(y=(b=u==null?void 0:u.compData)==null?void 0:b.find(L=>(L==null?void 0:L.key)==="tableContents"))==null?void 0:y.contents;m=m==null?void 0:m.map(L=>({label:L==null?void 0:L[p],value:L==null?void 0:L[p]}));let c=Gn.value,k={value:a,condition:"child",options:m,relatedContent:s,isShow:!0};c.push(k),fn.setSelectTitle(c),fn.setChooseTitle([k]),Mr.setContentLoading(!1),Cr.setExtraContents([]),fn.setSelectIndex(""),fn.setSelectMenu(""),Cr.setItemData(sr.value),Cr.setOriginalData(sr.value)},R0=a=>{wc.value=a},Si=e.reactive({index:0,comp:null}),V0=e.computed(()=>{var a;return(a=sr.value)==null?void 0:a.map((l,r)=>({id:l.id,name:l.name,status:F0(l,r)}))}),Dc=(a,l)=>{var p,m,c,k,C;const r=l?a:a-2,n=(p=sr.value)==null?void 0:p[r],t=(c=(m=n==null?void 0:n.compData)==null?void 0:m.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:c.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,u=(C=(k=n==null?void 0:n.compData)==null?void 0:k.find(V=>(V==null?void 0:V.key)==="tableContents"))==null?void 0:C.contents;return{valid:u==null?void 0:u.every(V=>V==null?void 0:V[v+1]),length:(u==null?void 0:u.length)||0}},F0=(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}=Dc(l,!0);Si.index===l?r="process":s===0?r="wait":r=t?"success":"error"}return r},Nc=a=>{var r,n,t,s,v;const l=a+1;if(l>1&&((t=(n=(r=sr.value)==null?void 0:r[a])==null?void 0:n.comp)==null?void 0:t.toUpperCase())==="TABLE"){const{valid:u}=Dc(l);u?(Si.index=l,Si.comp=(s=sr.value)==null?void 0:s[a]):Wa.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Si.index=l,Si.comp=(v=sr.value)==null?void 0:v[a]},Tc=e.computed(()=>{var a,l;return(l=(a=xc.value)==null?void 0:a[0])==null?void 0:l.isStepLayout});e.watch(()=>Tc.value,a=>{a&&Nc(0)},{immediate:!0});const P0={class:"table-content"},j0={class:"menu-config-wrap"},H0=["onClick"],U0={key:0,class:"viewport-wrap"},q0=["onClick"],W0={title:"选择显示列信息"},K0={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},G0=["title"],Y0={class:"col-operate-wrap"},J0={key:0,class:"col-operate-radio-wrapper"},X0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Z0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},Q0={class:"pop-view"},e3={class:"pop-wrapper"},a3={class:"file-list-pop"},l3=["title","onClick"],r3=["onClick"],n3=["onClick"],i3={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},o3={class:"form-content"},t3={key:0,class:"dialog-footer"},s3={class:"dialog-footer"},c3={class:"ocr-dialog-content"},u3={class:"ocr-steps"},d3={key:0,class:"ocr-action-buttons"},p3={key:1,class:"ocr-preview-area"},f3={class:"ocr-file-grid"},h3={class:"file-thumbnail"},v3=["src"],m3={key:1,class:"thumbnail-placeholder"},y3={class:"progress-svg",viewBox:"0 0 36 36"},g3=["stroke","stroke-width","stroke-dasharray"],b3={key:0,class:"progress-icon"},k3={key:1,class:"progress-icon"},x3=["onClick"],w3={class:"file-name"},_3={key:0,class:"ocr-recognize-button"},S3={key:2,class:"ocr-progress-section"},E3={key:3,class:"ocr-confirm-area"},C3={class:"ocr-preview-tip"},D3={class:"ocr-preview-table"},N3={style:{display:"flex","align-items":"center",gap:"8px"}},T3={key:0},B3={key:4,class:"ocr-success-area"},A3={key:0,class:"ocr-dialog-footer"},z3={class:"form-content"},M3={style:{width:"100%",margin:"0"}},I3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},O3={style:{display:"flex"}},xs="ss-ocr-upload-history",L3="ss-ocr-cert-history-v1",$3={__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 jt;const r=e.ref([]),n=Tt(O.pinia),t=e.ref(null),s=e.ref(new Set),v=e.ref(new Map),u=e.ref(new Map),p=new Map,m=e.ref(new Map),c=a,k=e.ref((c==null?void 0:c.allowSelect)??!0),C=e.ref(((jt=c==null?void 0:c.config)==null?void 0:jt.showIndex)??!0),V=e.ref(),_=e.ref(!0),G=e.ref(!1),z=e.ref([]),I={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},P=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"}]}]),E=ve.useOriginalState(O.pinia);let S="$R";const{originalPath:w}=O.storeToRefs(E),b=w.value,y=e.computed(()=>{var h;const d=(h=ve.getAllLeafNodes(oe.value)||[])==null?void 0:h.filter(T=>(T==null?void 0:T.type)!=="operate"&&(T==null?void 0:T.label)!=="操作"&&(T==null?void 0:T.prop)!=="operate");return d.length>0?d.every(T=>!!(T!=null&&T.sortable)):!1});e.computed(()=>{var h;return(h=oe.value)==null?void 0:h.every(T=>T==null?void 0:T.filterable)}),e.computed(()=>{var h;return(h=oe.value)==null?void 0:h.every(T=>T==null?void 0:T.operable)});const L=e.ref(!0),$=e.ref([]),K=e.reactive({column:{},status:!1,text:"合计"}),ie=e.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),Se=l,oe=e.ref([]),X=e.ref([]),pe=e.ref([]),ee=e.reactive({prop:"",order:null}),te=e.ref([]),De=e.ref(!1),Pe=e.ref(!1),ge=e.ref(null),{isUseBackdrop:N,initTrackFileType:U,getFileExtension:le,setData:Te,getFileInfo:Ee,getFilesInfo:qe}=Eo.useThreeSystem(),ca=e.ref([]),Na=e.ref(!1),ae=e.ref(),la=O.useMenuState(),{importLoading:he,activeMenuPath:Ke,contentLoading:Ie,linkMenuInfo:se}=O.storeToRefs(la),Be=ve.useTableComp(O.pinia),Fe=O.useModelComp(O.pinia),ba=Xn(O.pinia),{extraContents:za,cacheUpdatingData:F,tableViewContents:j,tableLoading:Z,pageMapState:fe,lockingPage:me}=O.storeToRefs(Fe),{selectTab:pa}=O.storeToRefs(ba),{compType:Qe,hasEditable:de}=Xs.useRole(),Ce=e.ref([]),ha=e.ref([]),Ue=e.ref(new Map);e.ref(!1);const Ma=e.ref("");e.ref();const Ta=e.ref(!0),Ze=e.ref(0),oa=e.ref(!0),ce=e.ref(""),H=e.ref(!1),q=e.ref(null);e.ref([]);const ze=e.ref({label:"查看三维模型"}),we=e.ref(!1),na=e.ref(),ta=e.ref([]),_a=e.ref([]),ya=e.ref(!1),Pa=e.ref([]),va=e.ref([]),Le=e.ref([]),Ra=e.ref([]),pl=e.ref([]),_l=()=>{try{const d=localStorage.getItem(xs),h=d?JSON.parse(d):[];pl.value=Array.isArray(h)?h:[]}catch{pl.value=[]}},Xl=()=>{try{localStorage.setItem(xs,JSON.stringify(pl.value||[]))}catch{}},bl=d=>{var re,ne,W;if(!d)return;const h=d.url||((re=d==null?void 0:d.uploadResult)==null?void 0:re.url)||"",T=d.name||((ne=d==null?void 0:d.uploadResult)==null?void 0:ne.name)||((W=d==null?void 0:d.uploadResult)==null?void 0:W.fileName)||"";if(!h&&!T)return;const A={name:T,url:h,ts:Date.now()},R=String(A.name||"").trim().toLowerCase(),D=(pl.value||[]).findIndex(ke=>String((ke==null?void 0:ke.name)||"").trim().toLowerCase()===R);D>-1&&pl.value.splice(D,1),pl.value.unshift(A),pl.value.length>20&&(pl.value=pl.value.slice(0,20)),Xl()};_l();const Vl=(d,h)=>`${L3}:${String(d??"")}:${String(h??"")}`,Ua=(d,h)=>{try{const T=sessionStorage.getItem(Vl(d,h)),A=T?JSON.parse(T):[];return Array.isArray(A)?A:[]}catch{return[]}},$l=(d,h,T)=>{try{sessionStorage.setItem(Vl(d,h),JSON.stringify(Array.isArray(T)?T:[]))}catch{}},zl=(d,h,T)=>{if(!h)return;const A=Ua(d,h),R=[T,...A||[]].filter(Boolean).slice(0,1);return $l(d,h,R),R},La=(d,h,T)=>{if(!h||!T)return;const A=Vl(d,h),R=Vl(d,T);try{const D=sessionStorage.getItem(A);if(!D)return;const re=(()=>{try{const ke=JSON.parse(D);return Array.isArray(ke)?ke:[]}catch{return[]}})(),ne=Ua(d,T),W=[...re,...ne||[]].filter(Boolean).sort((ke,Ae)=>Number((Ae==null?void 0:Ae.ts)||0)-Number((ke==null?void 0:ke.ts)||0)).slice(0,1);sessionStorage.setItem(R,JSON.stringify(W)),sessionStorage.removeItem(A)}catch{}},al=e.ref(!1),nl=e.ref(!1),ia=e.ref([]),ja=e.ref(null);e.ref(!1),e.ref([]),e.ref(""),e.ref("");const Oa=e.ref(!1),Va=e.ref([]),ye=e.ref(1),ma=e.ref(new Map),Oe=e.ref(new Map),ue=e.ref(0),ka=e.ref(!1),ua=e.ref([]),ea=e.ref([]),Je=d=>{var h;try{const T=(h=ve.getAllLeafNodes(oe.value)||[])==null?void 0:h.filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate");return(T==null?void 0:T.find(A=>(A==null?void 0:A.prop)===d||(A==null?void 0:A.label)===d))||null}catch{return null}},Xe=d=>{const h=Je(d),T=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"Input";return ll.getComponent(T)||ll.getComponent("Input")},cl=e.ref([]),Ve=e.ref(null),Fa=e.ref([]),wa=e.ref(null),il=e.ref(""),Aa=e.ref(!1),Me=e.ref([]),Sl=e.ref(""),Il=e.ref(!1),Gl=e.ref([]),Hl=e.ref([]),Zl=e.ref([]),_r=e.ref(null),Fl=e.ref([]),pr=e.ref("");e.computed(()=>{var d;try{const h=(d=ve.getAllLeafNodes(oe.value)||[])==null?void 0:d.filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate"),T=new Map;return h==null||h.forEach(A=>{A!=null&&A.label&&(A!=null&&A.prop)&&T.set(A.label,A.prop)}),T.get("编号")||""}catch{return""}});const Vr=e.computed(()=>{var d;try{const h=(d=ve.getAllLeafNodes(oe.value)||[])==null?void 0:d.filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate"),T=new Map;return h==null||h.forEach(A=>{A!=null&&A.label&&(A!=null&&A.prop)&&T.set(A.label,A.prop)}),T.get("名称")||""}catch{return""}}),Ul=e.computed(()=>{var d;try{const h=(d=ve.getAllLeafNodes(oe.value)||[])==null?void 0:d.filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate"),T=new Map;return h==null||h.forEach(A=>{A!=null&&A.label&&(A!=null&&A.prop)&&T.set(A.label,A.prop)}),T.get("制造厂")||""}catch{return""}}),lr=()=>{Il.value=!1,Gl.value=[],Hl.value=[],Zl.value=[],_r.value=null,Fl.value=[],pr.value=""},Lr=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,Nr=(d,h)=>{const T=(d==null?void 0:d.ocrRow)||{};for(const R of Object.keys(T))R==="id"||R==="_isOCRRow"||R==="_ocrTableId"||Lr(T[R])&&(h[R]=T[R]);const A=ha.value.find(R=>R.id===h.id);if(A)for(const R of Object.keys(T))R==="id"||R==="_isOCRRow"||R==="_ocrTableId"||Lr(T[R])&&(A[R]=T[R]);Ue.value&&Ue.value.set(h.id,h),zl(c==null?void 0:c.index,h.id,d==null?void 0:d.versionItem),Hl.value=[...Hl.value||[],JSON.parse(JSON.stringify(h))]},$r=async(d,h=null)=>{var T,A,R,D,re,ne,W;try{const ke=(T=ve.getAllLeafNodes(oe.value)||[])==null?void 0:T.filter(xa=>(xa==null?void 0:xa.type)!=="operate"&&(xa==null?void 0:xa.label)!=="操作"&&(xa==null?void 0:xa.prop)!=="operate"),Ae=new Map;ke==null||ke.forEach(xa=>{xa!=null&&xa.label&&(xa!=null&&xa.prop)&&Ae.set(xa.label,xa.prop)});const je=Ae.get("系统编号")||Ae.get("编号");if(!je){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const $e=h||_r.value;if((Array.isArray($e==null?void 0:$e.result)?$e.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let xa=0;xa<d.length;xa++){const Ia=d[xa],Ba=Ia[je];if(!Ba){console.warn(`第 ${xa+1} 条匹配行缺少系统编号,跳过`);continue}const Ye=`设备管理/试验设备/${Ba}`,Za=await O.getPageDataApi({platId:parseInt((A=Tl.value)==null?void 0:A.plat_id),pageName:Ye});if(!((R=Za==null?void 0:Za.data)!=null&&R.result)||!Array.isArray(Za.data.result)){console.warn(`未找到详情页数据: ${Ye}`);continue}const ga=Za.data.result.find(ra=>(ra==null?void 0:ra.property_name)==="校检记录");if(!ga){console.warn(`详情页 ${Ye} 中未找到校检记录表`);continue}const Qa=(D=ga.contents)==null?void 0:D.find(ra=>(ra==null?void 0:ra.key)&&ra.key.startsWith("content_"));if(!Qa||!Qa.key){console.warn("校检记录表中未找到 content item");continue}const xe=Qa.key,$a=Array.isArray(Qa.value)?Qa.value:[];if($a.length>=5){const _e=[...$a].sort((sa,Ca)=>{const rl=Number((sa==null?void 0:sa.create_time)||0),Ka=Number((Ca==null?void 0:Ca.create_time)||0);return rl-Ka})[0];_e!=null&&_e.id&&await O.pageBatchDeleteApi({platId:parseInt((re=Tl.value)==null?void 0:re.plat_id),changeContents:[{tableName:xe,tableContents:[{id:_e.id}]}]})}const fa=(ne=ke==null?void 0:ke.find(ra=>(ra==null?void 0:ra.label)==="证书附件"))==null?void 0:ne.prop,Ea=String(Date.now()),Sa={id:Ea},B=$a[0]||{},J=new Date().toISOString().split("T")[0];if(Object.keys(B||{}).forEach(ra=>{if(ra!=="id"){if(ra==="证书附件"){Sa[ra]="";return}if(ra==="校检日期"||ra==="检校日期"){Sa[ra]=Ia[ra]||Ia.校检日期||Ia.检校日期||J;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ra)){Sa[ra]=Ia[ra]??"";return}Sa[ra]=Ia[ra]??""}}),fa&&Ia[fa]){const ra=Ia[fa];if(Array.isArray(ra)&&ra.length>0)Sa.证书附件=JSON.stringify(ra.map(_e=>({url:(_e==null?void 0:_e.url)||"",name:(_e==null?void 0:_e.name)||(_e==null?void 0:_e.fileName)||"",fileName:(_e==null?void 0:_e.fileName)||(_e==null?void 0:_e.name)||""})).filter(_e=>_e.url||_e.name));else if(typeof ra=="string")try{const _e=JSON.parse(ra);Sa.证书附件=ra}catch{Sa.证书附件=JSON.stringify([{url:ra,name:ra,fileName:ra}])}}console.log(xe,"tableName","inspectionRecordRow",Sa),await O.pageBatchAddApi({platId:parseInt((W=Tl.value)==null?void 0:W.plat_id),changeContents:[{tableName:xe,tableContents:[Sa]}]});const Re=ga==null?void 0:ga.object_id;if(Re&&Ea){const ra=fa&&Ia[fa]?Ia[fa]:null;let _e=[],sa="",Ca=!1;if(Array.isArray(ra)&&ra.length>0){_e=ra.map(ul=>({name:(ul==null?void 0:ul.name)||(ul==null?void 0:ul.fileName)||"",url:(ul==null?void 0:ul.url)||""})).filter(ul=>ul.url||ul.name);const Ka=ra[0];sa=(Ka==null?void 0:Ka.url)||"";const sl=(Ka==null?void 0:Ka.name)||(Ka==null?void 0:Ka.fileName)||"";Ca=String(sl).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf")}else if(typeof ra=="string")try{const Ka=JSON.parse(ra);Array.isArray(Ka)?(_e=Ka.map(sl=>({name:(sl==null?void 0:sl.name)||(sl==null?void 0:sl.fileName)||"",url:(sl==null?void 0:sl.url)||""})).filter(sl=>sl.url||sl.name),_e.length>0&&(sa=_e[0].url||"",Ca=String(_e[0].name).toLowerCase().endsWith(".pdf")||String(sa).toLowerCase().endsWith(".pdf"))):(sa=ra,Ca=String(ra).toLowerCase().endsWith(".pdf"))}catch{sa=ra,Ca=String(ra).toLowerCase().endsWith(".pdf")}const rl={ts:Date.now(),versionId:String(Date.now())+"_"+String(xa),label:new Date().toLocaleString(),certType:Ia.证书类型||"",certNo:Ia.证书编号||"",fileType:Ca?"pdf":"image",sourceUrl:Ca?sa:"",images:_e};zl(Re,Ea,rl)}}}catch(ke){console.error("向校检记录表插入OCR识别结果失败:",ke),Wa.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Br=d=>{const h=Array.isArray(d)?d:Gl.value||[];if(h.length===0){lr();return}if(h.find(D=>(D==null?void 0:D.__decision)==="replace"&&!(D!=null&&D.selectedTargetId))){Wa.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}h.forEach(D=>{var ne;const re=D==null?void 0:D.__decision;if(!(!re||re==="skip")){if(re==="add"){zl(c==null?void 0:c.index,(ne=D==null?void 0:D.ocrRow)==null?void 0:ne.id,D==null?void 0:D.versionItem),Zl.value=[...Zl.value||[],D.ocrRow];return}if(re==="replace"){const W=D==null?void 0:D.selectedTargetId,ke=(Ce.value||[]).find(Ae=>String(Ae==null?void 0:Ae.id)===String(W));if(!ke)return;Nr(D,ke)}}}),(Hl.value||[]).length>0&&(Ce.value=[...Ce.value||[]]),(Zl.value||[]).length>0&&(Ce.value=[...Ce.value||[],...Zl.value||[]],ha.value=[...ha.value||[],...Zl.value||[]],(Zl.value||[]).forEach(D=>{var re,ne;return(ne=(re=Ue.value)==null?void 0:re.set)==null?void 0:ne.call(re,D.id,D)})),Gr.value=Ce.value;const A=Hl.value||[],R=Zl.value||[];if(A.length>0&&(Se("change",{buttonName:"编辑",singleContent:A,content:Ce.value,relatedContents:c==null?void 0:c.related,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,columns:oe.value,name:c==null?void 0:c.compName}),$r(A)),R.length>0){const D=_r.value;Se("change",{buttonName:"OCR批量新增",content:Ce.value,index:c==null?void 0:c.index,parentTableId:c==null?void 0:c.parentTableId,column:oe.value,ocrRows:R,relatedContents:c==null?void 0:c.related,uploadedFiles:(Array.isArray(D==null?void 0:D.result)?D.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:D,matchedCount:(A||[]).length,newCount:(R||[]).length})}Wa.ElMessage.success("已提交候选处理结果"),lr()},yr=mc(),Ar=e.computed(()=>yr.getConfig()),zr=e.ref(),nr=e.ref(),kn=dc(O.pinia),Gr=e.ref(),rn=e.ref(0),An=O.useUnit(O.pinia),{selectIndex:xn,selectMenu:mn,selectTitle:nn}=O.storeToRefs(An),{selectString:ar}=O.storeToRefs(kn),Wl=O.useLoginState(O.pinia),{loginUserInfo:Tl}=O.storeToRefs(Wl),Ol=e.ref(720),Bl=e.ref(!1),gr=e.ref(!1),cr=e.ref([]),jl=e.ref(),Rr=e.ref(!0),Fr=e.ref(!0);e.ref([]);const wn=e.inject("contentRef");e.provide("contentRef",wn),e.provide("getSuggestListForCell",Su),e.provide("getSuggestLoadingForCell",(d,h)=>{const T=`${d==null?void 0:d.id}:${(h==null?void 0:h.prop)||(h==null?void 0:h.property)}`;return m.value.get(T)||!1}),e.watch(()=>{var d;return(d=Ce.value)==null?void 0:d.length},d=>{ie.total=d}),e.watch(()=>j.value,async()=>{var h,T,A,R,D,re,ne,W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye;if(((h=j.value)==null?void 0:h.length)===0||!((T=c==null?void 0:c.itemData)!=null&&T.find(Za=>(Za==null?void 0:Za.key)==="columnPath"))||!((A=c==null?void 0:c.itemData)!=null&&A.find(Za=>(Za==null?void 0:Za.key)==="pageColumn")))return;let d=(ke=(W=(ne=(re=(D=(R=c==null?void 0:c.itemData)==null?void 0:R.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:re.split("["))==null?void 0:ne[1])==null?void 0:W.split("]"))==null?void 0:ke[0];((Ge=($e=(je=(Ae=c==null?void 0:c.itemData)==null?void 0:Ae.find(Za=>(Za==null?void 0:Za.key)==="pageColumn"))==null?void 0:je.contents)==null?void 0:$e.split("["))==null?void 0:Ge[0])+((Ia=(xa=j.value)==null?void 0:xa.find(Za=>(Za==null?void 0:Za.key)===d))==null?void 0:Ia.value),(Ye=(Ba=c==null?void 0:c.itemData)==null?void 0:Ba.find(Za=>(Za==null?void 0:Za.key)==="pageGroup"))==null||Ye.contents,Pt(compData,c.allMapContents)},{deep:!0});const on=d=>{var T,A,R,D,re;const h=(A=(T=oe.value)==null?void 0:T.filter(ne=>ne==null?void 0:ne.mainKey))==null?void 0:A.map(ne=>ne==null?void 0:ne.prop);if(h.length===0){const ne=(R=oe.value)==null?void 0:R.map(W=>W==null?void 0:W.prop);return(D=ne==null?void 0:ne.map(W=>d==null?void 0:d[W]))==null?void 0:D.join("|")}return(re=h==null?void 0:h.map(ne=>d==null?void 0:d[ne]))==null?void 0:re.join("|")},Zn=d=>{var ne,W,ke,Ae,je;const h=(W=(ne=oe.value)==null?void 0:ne.filter($e=>$e==null?void 0:$e.required))==null?void 0:W.map($e=>$e==null?void 0:$e.prop),T=[];if(d==null||d.forEach($e=>{h==null||h.forEach(Ge=>{const xa=$e[Ge];(xa==null||xa==="")&&(T.includes(Ge)||T.push(Ge))})}),T.length>0)return Wa.ElMessage.warning(`请填写必填项:${T.join("、")}`);const A=new Map,R=new Map;(ke=Ce.value)==null||ke.forEach($e=>{const Ge=on($e);A.set(Ge,$e)}),d==null||d.forEach($e=>{const Ge=on($e);R.set(Ge,$e)});const D=d==null?void 0:d.filter($e=>A.has(on($e))),re=(Ae=Ce.value)==null?void 0:Ae.filter($e=>R.has(on($e)));return(D==null?void 0:D.length)>0&&(i.columns=(je=oe.value)==null?void 0:je.filter($e=>($e==null?void 0:$e.label)!=="操作"),i.existRows=re,i.tableData=D,i.show=!0),i.newRows=d==null?void 0:d.filter($e=>{const Ge=on($e);return!A.has(Ge)}),i.newRows},zn=e.ref(""),Qn=e.ref(null),_n=async()=>{var d,h,T,A,R,D;try{const re=await O.quoteApi({related:[{menus:Ke.value,groups:c==null?void 0:c.compName}],platId:parseInt((d=Tl.value)==null?void 0:d.plat_id)});if(((h=re==null?void 0:re.data)==null?void 0:h.code)===200){Qn.value=(T=re==null?void 0:re.data)==null?void 0:T.result;const ne=(A=oe.value)==null?void 0:A.map(Ae=>(Ae==null?void 0:Ae.prop)||(Ae==null?void 0:Ae.label)),W=Mn(ne,(R=re==null?void 0:re.data)==null?void 0:R.result),ke=W==null?void 0:W.flatMap(Ae=>Ae==null?void 0:Ae.quote);(ke==null?void 0:ke.length)>0&&(zn.value=(D=ke==null?void 0:ke.map(Ae=>Ae==null?void 0:Ae.menus))==null?void 0:D.join("、"))}}catch(re){throw new Error(re)}};function Mn(d,h){var T;return(T=h.filter(A=>A.struct&&Array.isArray(A.struct)?A.struct.some(R=>R.words&&Array.isArray(R.words)?R.words.some(D=>d.includes(D)):!1):!1))==null?void 0:T.map(A=>{const R={...A};return R.struct&&Array.isArray(R.struct)&&(R.struct=R.struct.filter(D=>D.words&&Array.isArray(D.words)?D.words.some(re=>d.includes(re)):!1)),R})}const Pn=async(d,h)=>{var T,A;try{Qn.value||await _n();const R=h==null?void 0:h.map(re=>{const ne=Object.keys(re),W={};return ne.forEach((ke,Ae)=>{W[d[Ae]]=re[ke]}),W}),D=Zn(R);if(!D||(D==null?void 0:D.length)===0)return;i.show||await g(D)}catch(R){throw Wa.ElMessage.error("数据导入处理失败"),await O.pageBatchAddApi({platId:parseInt((T=Tl==null?void 0:Tl.value)==null?void 0:T.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(R),is_delete:!1,request_table:(A=c==null?void 0:c.related)==null?void 0:A.find(D=>D==null?void 0:D.includes("content")),request_type:"error"}]}]}),new Error(R)}},en=async d=>{var D,re,ne,W,ke,Ae,je;let h=pe.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[((D=d==null?void 0:d.value)==null?void 0:D.length)-1]]});let T=Ra.value;T=T==null?void 0:T.map($e=>{var Ge,xa;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(Ia=>typeof Ia=="string")&&($e.selectValue=(xa=h==null?void 0:h.find(Ia=>(Ia==null?void 0:Ia.key)===($e==null?void 0:$e.prop)))==null?void 0:xa.value),$e});let A=(W=(ne=T==null?void 0:T.find($e=>($e==null?void 0:$e.prop)===(d==null?void 0:d.key)))==null?void 0:ne.optionUrl)==null?void 0:W.menuId,R=T==null?void 0:T.find($e=>($e==null?void 0:$e.prop)===(d==null?void 0:d.key));if(A){let $e=await kt(R==null?void 0:R.optionUrl,A),Ge,xa=$.value,Ia=(je=(Ae=(ke=Ra.value)==null?void 0:ke.find(Ba=>{var Ye;return(Ye=R==null?void 0:R.optionUrl)==null?void 0:Ye.menuId}))==null?void 0:Ae.selectValue)==null?void 0:je[0];if($e==null||$e.forEach(Ba=>{var Ye,Za,ga,Qa,xe,$a,fa,Ea,Sa,B;if(A){let J=(Za=(Ye=Ra.value)==null?void 0:Ye.find(ra=>{var _e,sa;return((_e=R==null?void 0:R.optionUrl)==null?void 0:_e.menuId)===((sa=ra==null?void 0:ra.optionUrl)==null?void 0:sa.menuId)}))==null?void 0:Za.prop,Re=(Qa=(ga=T==null?void 0:T.find(ra=>(ra==null?void 0:ra.prop)===J))==null?void 0:ga.selectValue)==null?void 0:Qa[0];J!=null&&J.includes("·")&&(J=(xe=J==null?void 0:J.split("·"))==null?void 0:xe[0],Re=(Sa=(Ea=(fa=d==null?void 0:d.value)==null?void 0:fa[(($a=d==null?void 0:d.value)==null?void 0:$a.length)-1])==null?void 0:Ea.split(" "))==null?void 0:Sa[0]),xa!=null&&xa.find(ra=>(ra==null?void 0:ra.value)===Ia)?Ge=(B=xa==null?void 0:xa.find(ra=>(ra==null?void 0:ra.value)===Ia))==null?void 0:B.objectValue:Ba[J]===Re&&(Ge=Ba)}}),Ge){let Ba=T;Ba=Ba==null?void 0:Ba.map(Ye=>{var Za,ga,Qa,xe,$a,fa;return A&&(Ge!=null&&Ge[Ye==null?void 0:Ye.prop])&&ce.value==="新增"&&(Ye==null?void 0:Ye.prop)!==(R==null?void 0:R.prop)?Ye.value=(Ge==null?void 0:Ge[Ye==null?void 0:Ye.prop])||(Ge==null?void 0:Ge[(xe=(Qa=(ga=(Za=Ye==null?void 0:Ye.optionUrl)==null?void 0:Za.groupSelect)==null?void 0:ga[1])==null?void 0:Qa.replaceAll("[",""))==null?void 0:xe.replaceAll("]","")]):Ye.value=(fa=($a=Ra.value)==null?void 0:$a.find(Ea=>(Ea==null?void 0:Ea.prop)===(Ye==null?void 0:Ye.prop)))==null?void 0:fa.value,Ye}),Ra.value=Ba}}pe.value=h},In=async(d,h)=>{var T,A,R,D,re;if((T=d==null?void 0:d.toString())!=null&&T.includes(".txt")||(A=d==null?void 0:d.toString())!=null&&A.includes(".cpt")||(R=d==null?void 0:d.toString())!=null&&R.includes(".cyd")){const ne=await Wa.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),W=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});let ke=URL.createObjectURL(W);ae.value=[{name:(re=d==null?void 0:d.split("/"))==null?void 0:re[((D=d==null?void 0:d.split("/"))==null?void 0:D.length)-1],blobUrl:ke}],Na.value=!0}else Array.isArray(h)&&(h==null?void 0:h.length)>0&&Se("routeUrl",{isEdit:!1,routerUrl:h})};e.onBeforeUnmount(()=>{Fr.value=!1;let d=rn.value;rn.value=d+1});const Sn=e.reactive({prop:"",order:null}),Wr=e.computed(()=>{const d=(Ce.value??[]).slice(),h=Sn.prop||ee.prop,T=Sn.order||ee.order;if(!h||!T)return d;const A=T==="ascending",R=re=>{if(h)return re&&Object.prototype.hasOwnProperty.call(re,h)?re[h]:h.includes(".")?h.split(".").reduce((ne,W)=>ne==null?ne:ne[W],re):re==null?void 0:re[h]},D=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 W=ne.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(W))return{ok:!1,value:NaN};const ke=Number(W);return{ok:Number.isFinite(ke),value:ke}};return d.sort((re,ne)=>{const W=R(re),ke=R(ne);if(W==null&&ke==null)return 0;if(W==null)return A?-1:1;if(ke==null)return A?1:-1;const Ae=D(W),je=D(ke);if(Ae.ok&&je.ok)return A?Ae.value-je.value:je.value-Ae.value;const $e=xe=>{if(xe==null)return{ok:!1,value:NaN};const $a=String(xe).trim();if($a==="")return{ok:!1,value:NaN};const fa=$a.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!fa)return{ok:!1,value:NaN};const Ea=fa[1]?-1:1,Sa=Number(fa[2]),B=Number(fa[3]),J=Number(fa[4]);return[Sa,B,J].some(Re=>Number.isNaN(Re))?{ok:!1,value:NaN}:B>=60||J>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(Sa*3600+B*60+J)}},Ge=$e(W),xa=$e(ke);if(Ge.ok&&xa.ok)return A?Ge.value-xa.value:xa.value-Ge.value;const Ia=new Date(W).getTime(),Ba=new Date(ke).getTime(),Ye=!Number.isNaN(Ia),Za=!Number.isNaN(Ba);if(Ye&&Za)return A?Ia-Ba:Ba-Ia;const ga=String(W),Qa=String(ke);return A?ga.localeCompare(Qa):Qa.localeCompare(ga)})}),jn=e.computed(()=>{var T;const d=(ie.currentPage-1)*ie.pageSize,h=d+ie.pageSize;return Se("getSliceContLength",ie),(T=Wr.value)==null?void 0:T.slice(d,h)}),yn=d=>{ie.currentPage=d,Se("getSliceContLength",ie)},Bi=d=>{var A;ie.pageSize=d;const h=((A=Ce.value)==null?void 0:A.length)??0,T=d>0?Math.ceil(h/d):1;ie.currentPage>T&&(ie.currentPage=T||1,Wa.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),Se("getSliceContLength",ie)},Ro=({prop:d,order:h})=>{Sn.prop=d,Sn.order=h,ie.currentPage=1};function Vo(d){const h=[];function T(A,R=""){A.forEach(D=>{D.children&&D.children.length>0?T(D.children,D.prop):h.push(D.prop)})}return T(d),h}const En=(d,h)=>{var ne,W,ke,Ae;let T=(W=(ne=oe.value)==null?void 0:ne.map(je=>je==null?void 0:je.prop))==null?void 0:W.filter(je=>je!=="operate");((ke=oe.value)==null?void 0:ke.some(je=>{var $e;return(($e=je==null?void 0:je.children)==null?void 0:$e.length)>0}))&&(T=Vo((Ae=oe.value)==null?void 0:Ae.filter(je=>(je==null?void 0:je.prop)!=="operate")));let R;if(R=(d==null?void 0:d.length)===(T==null?void 0:T.length)?d:d.slice(0,T==null?void 0:T.length),!(R==null?void 0:R.every(je=>T==null?void 0:T.find($e=>je===$e))))return Wa.ElMessage.error("导入的数据表头不匹配");Pn(R,h)},Fo=(d,h)=>{var R;const T=d==null?void 0:d.filter(D=>D!=="序号"),A=h==null?void 0:h.map(D=>{const re=Object.entries(D);return re.shift(),Object.fromEntries(re)});Fe.setRefreshCurStructure(!1),((R=oe.value)==null?void 0:R.length)===0||En(T,A)},Po=(d,h,T,A)=>{const R=[],D=[],re=ke=>Object.keys(ke).length;for(const ke in d)if(d[ke]!==void 0){const Ae=d[ke],je=[];for(const[$e,Ge]of Object.entries(Ae))je.push(Ge),D.length<re(Ae)&&D.push($e);R.push(je)}R.unshift(D);const ne=ve.utils.aoa_to_sheet(R),W=ve.utils.book_new();ve.utils.book_append_sheet(W,ne,A),ve.writeFileSync(W,`${h}.xlsx`),cr.value=[]},Gi=async(d,h,T,A=!1,R)=>{try{Fe.setRefreshCurStructure(!1)}catch(D){Wa.ElMessage.error(D)}},Yi=async(d,h)=>{await Gi()},Ji=async(d,h)=>{await Gi("columnType",h,d,!1)},Pr=async({newRow:d,targetIndex:h})=>{var R;if(!de(c.config,{type:Qe.TABLE}))return;const A=(ie.currentPage-1)*ie.pageSize+(h??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=On(A,Ce.value||[]))}catch{}Ce.value.splice(A,0,d),await e.nextTick(),v.value.has(d.id)||v.value.set(d.id,O.cloneDeep(d)),Ce.value=(R=Ce.value)==null?void 0:R.map(D=>({...D,tableEditType:(D==null?void 0:D.id)===d.id?"edit":(D==null?void 0:D.tableEditType)??"text"})),s.value.add(d.id),Bl.value=!0},jo=(d,h,T,A=[])=>(!Array.isArray(h)||h.length===0||h.forEach(R=>{const D=R==null?void 0:R.prop;if(!D)return;let re=d==null?void 0:d[D];if(re==null||String(re).trim()==="")return;re=String(re);const ne=new Set([...(Array.isArray(T)?T:[]).filter(Ae=>(Ae==null?void 0:Ae.id)!==(d==null?void 0:d.id)).map(Ae=>Ae==null?void 0:Ae[D]).filter(Ae=>Ae!=null).map(Ae=>String(Ae)),...(Array.isArray(A)?A:[]).map(Ae=>Ae==null?void 0:Ae[D]).filter(Ae=>Ae!=null).map(Ae=>String(Ae))]);if(!ne.has(re))return;let W=1,ke="";for(;ke=`${re}(${W})`,!!ne.has(ke);)W++;d[D]=ke}),d),Ai=async()=>{var R,D,re,ne,W,ke,Ae,je;const d=Array.from(s.value||[]);if(d.length===0)return;const h=(D=ve.getColumnChild((R=O.cloneDeep(oe.value))==null?void 0:R.filter($e=>($e==null?void 0:$e.label)!=="操作")))==null?void 0:D.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],xa=(re=Ce.value)==null?void 0:re.find(Ia=>(Ia==null?void 0:Ia.id)===Ge);if(xa)for(let Ia=0;Ia<h.length;Ia++){const Ba=h[Ia],Ye=Ba==null?void 0:Ba.prop,Za=(Ba==null?void 0:Ba.label)??Ye,ga=xa==null?void 0:xa[Ye];if(ga===""||ga===null||ga===void 0||Array.isArray(ga)&&ga.length===0){Wa.ElMessage.error(`${Za}不能为空`);return}}}const T=[],A=[];if(d.forEach($e=>{var Za;const Ge=(Za=Ce.value)==null?void 0:Za.find(ga=>(ga==null?void 0:ga.id)===$e);if(!Ge)return;if(Ge!=null&&Ge._isTemp){const Qa=(ve.getAllLeafNodes(oe.value)||[]).filter(B=>(B==null?void 0:B.mainKey)===!0||(B==null?void 0:B.isMainKey)===!0),xe=Ce.value.findIndex(B=>(B==null?void 0:B.id)===$e),$a=xe>=0?xe+1:Ce.value.length+1;jo(Ge,Qa,Ce.value,T);const fa={id:$a.toString()};(Ge==null?void 0:Ge.sort)!==void 0&&(Ge==null?void 0:Ge.sort)!==null&&String(Ge.sort).trim()!==""?fa.sort=String(Ge.sort):fa.sort=On(xe>=0?xe:Ce.value.length-1,Ce.value||[]),(ve.getAllLeafNodes(oe.value)||[]).filter(B=>(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate").forEach(B=>{const J=B==null?void 0:B.prop;if(J){const Re=Ge[J];Re!==void 0?fa[J]=Re??"":fa[J]=""}}),T.push(fa);return}const Ia=(ve.getAllLeafNodes(oe.value)||[]).filter(ga=>(ga==null?void 0:ga.type)!=="operate"&&(ga==null?void 0:ga.label)!=="操作"&&(ga==null?void 0:ga.prop)!=="operate"),Ba=new Set(Ia.map(ga=>ga==null?void 0:ga.prop).filter(Boolean)),Ye={};for(const ga of Ba)Object.prototype.hasOwnProperty.call(Ge,ga)&&(Ye[ga]=Ge[ga]);A.push({id:Ge.id,value:{tableData:Ye}})}),Fe.setTableLoading(c==null?void 0:c.index),A.length>0){const $e=A.map(xa=>{const Ia={id:xa.id,...xa.value.tableData};return delete Ia._isOCRRow,delete Ia._ocrTableId,delete Ia._isTemp,delete Ia.tableEditType,delete Ia.index,Ia}),Ge=[{tableName:((ne=c==null?void 0:c.related)==null?void 0:ne.find(xa=>xa==null?void 0:xa.includes("content")))??"content_"+(c==null?void 0:c.index),tableContents:$e}];try{await O.pageBatchUpdateApi({platId:parseInt((W=Tl.value)==null?void 0:W.plat_id),changeContents:Ge})}catch(xa){Wa.ElMessage.error(((Ae=(ke=xa==null?void 0:xa.response)==null?void 0:ke.data)==null?void 0:Ae.message)||(xa==null?void 0:xa.message)||"保存失败"),Fe.setTableLoading(!1);return}}if(T.length>0){const $e={fixContent:T,buttonName:"新增",relatedContents:c==null?void 0:c.related,name:c==null?void 0:c.compName,columns:oe.value};Se("change",$e)}Wa.ElMessage.success("保存成功"),s.value.clear(),v.value.clear(),Ce.value=(je=Ce.value)==null?void 0:je.map($e=>({...$e,tableEditType:"text"})),Bl.value=!1,Fe.setRefreshCurStructure(!0)},Ho=()=>{var h;const d=Array.from(s.value||[]);if(d.length===0){Bl.value=!1;return}d.forEach(T=>{var D,re;const A=v.value.get(T),R=(D=Ce.value)==null?void 0:D.find(ne=>(ne==null?void 0:ne.id)===T);if(R!=null&&R._isTemp){Ce.value=Ce.value.filter(ne=>(ne==null?void 0:ne.id)!==R.id);return}if(A){const ne=(re=Ce.value)==null?void 0:re.findIndex(W=>(W==null?void 0:W.id)===T);ne!==-1&&(Ce.value[ne]={...Ce.value[ne],...A})}}),s.value.clear(),v.value.clear(),Ce.value=(h=Ce.value)==null?void 0:h.map(T=>({...T,tableEditType:"text"})),Bl.value=!1},zi=e.ref(!1),Xi=async d=>{var R,D,re,ne;if(!Bl.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const h=d==null?void 0:d.target;if(((D=(R=h==null?void 0:h.tagName)==null?void 0:R.toLowerCase)==null?void 0:D.call(R))==="textarea")return;const A=document.getElementById("excel-table");A&&!A.contains(h)||((re=h==null?void 0:h.blur)==null||re.call(h),(ne=d.preventDefault)==null||ne.call(d),await e.nextTick(),await Zi())},Zi=async()=>{if(F.value){Bl.value=!1;return}if(!zi.value){zi.value=!0;try{Array.from(s.value||[]).length>0?await Ai():Bl.value=!1}finally{Promise.resolve().then(()=>{zi.value=!1})}}},Uo=d=>{cr.value=d},qo=(d,h)=>{jl.value===h?Rr.value=!1:Rr.value=!0,jl.value=h==null?void 0:h.changeProp},Qi=d=>{if(!d)return;const{item:h,value:T}=d,A=Ra.value.find(R=>R.prop==h.prop);A&&A.contents.push({label:T,value:T})},Cn=e.computed(()=>{var T,A,R;const d=(T=oe.value)==null?void 0:T.some(D=>D==null?void 0:D.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(R=(A=oe.value)==null?void 0:A.filter(D=>(D==null?void 0:D.label)!=="操作"))==null?void 0:R.map(D=>({...D,filterable:!!(D!=null&&D.filterable),showSummary:!!(D!=null&&D.showSummary),operable:!!(D!=null&&D.operable),fixed:D==null?void 0:D.fixed}))}),Dn=async(d,h,T)=>{const A=O.cloneDeep(oe.value);await e.nextTick();const R=A==null?void 0:A.map(re=>(T==null?void 0:T.label)===(re==null?void 0:re.label)?{...re,[h]:d}:re),D=Hn(R);await ms(c.index,D),oe.value=R,X.value=D},Hn=d=>{var R;const h=d||[];return((R=ve.getAllLeafNodes(h)||[])==null?void 0:R.filter(D=>(D==null?void 0:D.prop)&&(D==null?void 0:D.type)!=="operate"&&(D==null?void 0:D.label)!=="操作"&&(D==null?void 0:D.prop)!=="operate")).map(D=>{const{prop:re}=D;return n0(re,D)})},Wo=async d=>{let h=await o0(c.index);h||(h=Hn(d)),X.value=h},eo=async(d,h)=>{const T=O.cloneDeep(oe.value),A=re=>Array.isArray(re)?re.map(ne=>{const W=Array.isArray(ne==null?void 0:ne.children)&&ne.children.length>0,ke={...ne};return(ke==null?void 0:ke.prop)==="operate"||(ke==null?void 0:ke.label)==="操作"||(ke==null?void 0:ke.type)==="operate"?(ke.sortable=!1,ke.filterable=!1,ke.operable=!1):ke.sortable=W?!1:!!d,W&&(ke.children=A(ke.children)),ke}):re,R=A(T),D=Hn(R);await ms(c.index,D),oe.value=R,X.value=D,await e.nextTick(),rn.value=rn.value+1},ao=()=>{H.value=!1},lo=d=>{Se("clickTrigger",d)},Un=async d=>{var D,re,ne,W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za,ga;const h=d==null?void 0:d.row,T=d==null?void 0:d.rowData,A=d==null?void 0:d.suffix;if((D=h==null?void 0:h.toString())!=null&&D.includes(".urdf")||d!=null&&d.isUrdf||A!=null&&A.includes(".urdf")){if(h.includes(",")){Wa.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(N(h)){const xe={files:[Ee(h)],data:{}};Te(xe);return}Pa.value=[{url:h,extension:le(h)}],Pe.value=!0,ge.value={data:O.cloneDeep(T)},De.value=!0;return}let R=[];if((re=h==null?void 0:h.toString())!=null&&re.includes(".stl")||(ne=h==null?void 0:h.toString())!=null&&ne.includes(".STL")||(W=h==null?void 0:h.toString())!=null&&W.includes(".obj")||(ke=h==null?void 0:h.toString())!=null&&ke.includes(".mtl")){const Qa=(Ae=h==null?void 0:h.toString())==null?void 0:Ae.split(","),xe=qe(Qa),$a=xe==null?void 0:xe[0];if(N($a==null?void 0:$a.extension)){Te({files:xe,data:{}});return}Pa.value=xe,Pe.value=!1,De.value=!0;return}if((je=h==null?void 0:h.toString())!=null&&je.includes(".stl")||($e=h==null?void 0:h.toString())!=null&&$e.includes(".STL")||(Ge=h==null?void 0:h.toString())!=null&&Ge.includes(".obj")||(xa=h==null?void 0:h.toString())!=null&&xa.includes(".mtl")||A!=null&&A.includes(".stl")||A!=null&&A.includes(".STL")||A!=null&&A.includes(".obj")||A!=null&&A.includes(".mtl")){let Qa,xe=[],$a={};if(Array.isArray(h)?Qa=h:Qa=h==null?void 0:h.split(","),Qa==null||Qa.forEach(fa=>{fa.includes(".mtl")?xe.push(fa):$a.blob=$a.blob?$a.blob+","+fa:fa}),(xe==null?void 0:xe.length)>0&&($a.mtlBlobs=xe),A&&($a.suffix=A),(Ba=(Ia=Object.values($a))==null?void 0:Ia[0])!=null&&Ba.includes("http:"))R.push($a);else{const fa=new Blob([$a.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(fa),Sa="";(Ye=h==null?void 0:h.split("/"))==null||Ye.forEach((B,J)=>{var Re;J===((Re=h==null?void 0:h.split("/"))==null?void 0:Re.length)-1&&(Sa=B)}),(Za=$a.blob)!=null&&Za.includes(".stl")&&(Sa=(Sa==null?void 0:Sa.replaceAll(">",""))+".urdf"),ae.value=[{name:Sa,blobUrl:Ea}],Na.value=!0}}else{const Qa=await Wa.axios.get(h,{responseType:"blob",headers:{"Content-Type":"application/json"}}),xe=new Blob([Qa.data],{type:"application/octet-stream;charset=UTF-8"});let $a=URL.createObjectURL(xe),fa="";if((ga=h==null?void 0:h.split("/"))==null||ga.forEach((Ea,Sa)=>{var B;Sa===((B=h==null?void 0:h.split("/"))==null?void 0:B.length)-1&&(fa=Ea)}),N(fa)){const Ea=U(fa),Sa=Ee(h);Te({files:[Sa],data:{trackFileType:Ea}});return}ae.value=[{name:fa,blobUrl:$a}],Na.value=!0}(R==null?void 0:R.length)>0&&n.setBlobUrls(R)},ei=d=>{var A,R,D,re;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const h=(re=(A=d==null?void 0:d.url)==null?void 0:A.split("."))==null?void 0:re[((D=(R=d==null?void 0:d.url)==null?void 0:R.split("."))==null?void 0:D.length)-1];return(d==null?void 0:d.name)+"."+h},ro=d=>{if(!d)return"未知文件";try{const A=ei(d);if(typeof A=="string"&&A.includes("."))return A}catch{}const h=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",T=(d==null?void 0:d.suffix)||"";return h.includes(".")?h:`${h}${T}`},no=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const h=d.match(/^(\d+)\_(\d+)$/);if(!h)return d;const T=Number(h[1]),A=Number(h[2]);return!Number.isFinite(T)||!Number.isFinite(A)?d:String(T*1e3+A)},ai=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;const T=Number(h);return Number.isFinite(T)?T:null},Ko=d=>{if(d==null)return null;const h=String(d).trim();if(!h)return null;if(/^\d+$/.test(h)){const R=Number(h);return Number.isFinite(R)?h.length<=10?R*1e3:R:null}const T=h.includes("T")?h:h.replace(" ","T"),A=Date.parse(T);return Number.isFinite(A)?A:null},io=(d,h=[])=>{const T=Array.isArray(d)?d.slice():[];if(T.length<=1)return T;const A=new Map((h||[]).map((re,ne)=>[String(re),ne])),R=T.some(re=>ai(re==null?void 0:re.sort)!==null),D=T.map((re,ne)=>({r:re,idx:ne,id:String((re==null?void 0:re.id)??""),sortVal:ai(re==null?void 0:re.sort),createTimeMs:Ko(re==null?void 0:re.create_time),prevIdx:A.has(String(re==null?void 0:re.id))?A.get(String(re==null?void 0:re.id)):Number.POSITIVE_INFINITY}));return D.sort((re,ne)=>{if(R){const Ae=re.sortVal,je=ne.sortVal;if(Ae===null&&je!==null)return 1;if(Ae!==null&&je===null)return-1;if(Ae!==null&&je!==null&&Ae!==je)return Ae-je}const W=re.createTimeMs,ke=ne.createTimeMs;return W!==null&&ke!==null&&W!==ke?ke-W:W!==null&&ke===null?-1:W===null&&ke!==null?1:re.prevIdx!==ne.prevIdx?re.prevIdx-ne.prevIdx:re.idx-ne.idx}),D.map(re=>re.r)},On=(d,h=[])=>{const T=h==null?void 0:h[d-1],A=h==null?void 0:h[d],R=ai(T==null?void 0:T.sort),D=ai(A==null?void 0:A.sort);let re=null;R!==null&&D!==null&&D>R?re=(R+D)/2:R!==null?re=R+1:D!==null?re=Math.max(D-1,0):re=(d??0)+1;const ne=Number(re.toFixed(6));return String(Number.isFinite(ne)?ne:re)},Go=async d=>{let h=null,T=null;if(d!=null&&d.id){const R=Fi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const D=await O.platformDownloadFile(d);h=URL.createObjectURL(D.data),T=ro(d)}finally{R.close()}}else if(d!=null&&d.downloadUrl){const R=await fi(),D=Fi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),re=await Wa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:R,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{D.close()}),ne=new Blob([re.data],{type:"application/octet-stream;charset=UTF-8"});h=URL.createObjectURL(ne),T=d==null?void 0:d.name}else{const R=await O.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(R.data),T=ei(d)):h=d==null?void 0:d.url}if(N(h)){const R={row:`${h}`,suffix:le(T)};Un(R);return}const A={name:T,blobUrl:h};ae.value=[A],Na.value=!0},pi=async d=>{let h=null,T=null;if(d!=null&&d.id){const D=await O.platformDownloadFile(d);h=URL.createObjectURL(D.data),T=ro(d)}else if(d!=null&&d.downloadUrl){const D=await fi(),re=await Wa.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:D,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),T=d==null?void 0:d.name}else{const D=await O.platformDownloadFile({url:d==null?void 0:d.url});h=URL.createObjectURL(D.data),T=ei(d)}const A={name:T,blobUrl:h},R=document.createElement("a");R.href=A.blobUrl,R.download=A.name,R.style.display="none",document.body.appendChild(R),R.click(),setTimeout(()=>{document.body.removeChild(R)},100)},Yo=(d,h)=>{var A;if(Object.values(h).length===0)return;let T=d;return Object.values(h).find(R=>{var D,re,ne;return((D=R==null?void 0:R.toString())==null?void 0:D.includes(".txt"))||((re=R==null?void 0:R.toString())==null?void 0:re.includes(".cpt"))||((ne=R==null?void 0:R.toString())==null?void 0:ne.includes(".obj"))})?T=[...d,ze.value]:(A=c==null?void 0:c.config)!=null&&A.allowMove&&(T=[...d,{label:"迁移"}]),T},Mi=()=>{G.value=!0},Jo=e.ref([]),Xo=async(d,h,T=!1)=>{var re,ne,W,ke;if(!d)return;if(T){Ce.value=[...Ue.value.values()].filter(Ae=>Object.values(Ae).some(je=>typeof je=="string"?je==null?void 0:je.toLowerCase().includes(h==null?void 0:h.toLowerCase()):!1));return}let A={};for(let Ae in d)(d==null?void 0:d[Ae])!==""&&(A[Ae]=d==null?void 0:d[Ae]);if(JSON.stringify(A)==="{}"){Ce.value=Array.from(((re=Ue.value)==null?void 0:re.values())??[]);return}let R=(ne=c==null?void 0:c.related)==null?void 0:ne.find(Ae=>Ae==null?void 0:Ae.includes("content_")),D=await O.getFillFind({platId:parseInt((W=Tl==null?void 0:Tl.value)==null?void 0:W.plat_id),tableName:R,params:A});D=(ke=D==null?void 0:D.data)==null?void 0:ke.result,Ce.value=D,Fe.setTableLoading(!1)},oo=async d=>{var T,A;if(!de(c.config,{type:Qe.TABLE})||!d)return;((T=Array.from(s.value))==null?void 0:T.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,O.cloneDeep(d)),Ce.value=(A=Ce.value)==null?void 0:A.map(R=>({...R,tableEditType:(R==null?void 0:R.id)===h?"edit":"text"})),s.value.add(h),Bl.value=!0)},qn=async(d,h,T,A)=>{A!=null&&A.isExistChild&&Se("clickMainKey",d,T,oe.value)},Nn=()=>{Na.value=!1},to=d=>{Se("rowClick",d)};e.watch(()=>c.changedContent,()=>{var T,A;if(!c.changedContent)return;let d=(T=Ce.value)==null?void 0:T.map(R=>{var D;return R.id===((D=c.changedContent)==null?void 0:D.id)&&(R={...c.changedContent,id:c.changedContent.newId?c.changedContent.newId:c.changedContent.id},delete R.newId),R});const h=(A=c.itemData)==null?void 0:A.map(R=>((R==null?void 0:R.key)==="tableContents"&&(R.contents=d),R));Ce.value=d,Se("contentChange",{contents:h,index:c.index}),Se("change",{content:d,index:c==null?void 0:c.index,buttonName:"",id:c==null?void 0:c.index})},{deep:!0,immediate:!0});const Ii=()=>{},Zo=async()=>{const d=Ke.value,h=sessionStorage.getItem("systemKey"),T=await ve.getItemData(d,h,""),A=(T==null?void 0:T.find(ne=>(ne==null?void 0:ne.name)==="方法明细"))||(T==null?void 0:T[0]),R=(A==null?void 0:A.compData)||[],D=R==null?void 0:R.find(ne=>{const W=ne==null?void 0:ne.key;return W==="formContent"||W==="tableContents"});return D==null?void 0:D.contents},fi=async()=>{const h=Wa.Local.get("access-token");return h?`Bearer ${h}`:""},Qo=async(d,{token:h,inputData:T}={})=>await Wa.axios.post(d,T,{headers:{Authorization:h}}).catch(R=>(la.setImportLoading(!1),Promise.reject(R))),et=d=>{var A;let h={};const T=[];return h.form={},(A=O.cloneDeep(d))==null||A.forEach((R,D)=>{var re,ne,W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za,ga;if((R==null?void 0:R.comp)==="Table"){(ne=(re=R==null?void 0:R.compData)==null?void 0:re.find(fa=>(fa==null?void 0:fa.key)==="header"))==null||ne.contents;let Qa=(Ae=(ke=(W=R==null?void 0:R.compData)==null?void 0:W.find(fa=>(fa==null?void 0:fa.key)==="tableContents"))==null?void 0:ke.contents)==null?void 0:Ae.map(fa=>fa.slice(1));(Ia=(xa=(Ge=($e=(je=R==null?void 0:R.compData)==null?void 0:je.find(fa=>(fa==null?void 0:fa.key)==="header"))==null?void 0:$e.contents)==null?void 0:Ge[0])==null?void 0:xa[0])==null||Ia.label;let xe=(Ye=(Ba=R==null?void 0:R.compData)==null?void 0:Ba.find(fa=>(fa==null?void 0:fa.key)==="header"))==null?void 0:Ye.contents,$a=[];Qa==null||Qa.forEach(fa=>{let Ea=[];fa==null||fa.forEach((Sa,B)=>{var Re;let J={};((Re=xe[B])==null?void 0:Re.label)!=="操作"&&(J[xe[B].label]=Sa,Ea.push(J))}),$a.push(Ea)}),h[R.name]=$a}else{const Qa=(ga=(Za=R.compData)==null?void 0:Za.find(xe=>(xe==null?void 0:xe.key)==="formContent"))==null?void 0:ga.contents;Qa==null||Qa.forEach(xe=>{var $a,fa;if(xe.prop!==""){let Ea=xe==null?void 0:xe.value;Array.isArray(Ea)?Ea=(($a=Ea==null?void 0:Ea[0])==null?void 0:$a.oldUrl)||"http://222.92.178.198:62001/"+((fa=Ea==null?void 0:Ea[0])==null?void 0:fa.url):Ea=Ea.toString(),xe={key:(xe==null?void 0:xe.prop)??(xe==null?void 0:xe.label),value:Ea},T.push(xe)}})}}),h.form=ve.getFormContents(T),h},at=d=>{const h=[],T=A=>{A&&typeof A=="object"&&!Array.isArray(A)?Object.values(A).forEach(T):h.push(A)};return T(d),h},lt=async(d,h,T)=>{var xe,$a,fa,Ea,Sa,B,J,Re,ra,_e,sa,Ca,rl,Ka,sl,ul,Pl;la.setImportLoading(!0),Fe.setFreshContent(!1);let A=await Zo().catch(qa=>(la.setImportLoading(!1),Promise.reject(qa)));A=A==null?void 0:A.filter(qa=>{var hl;return((hl=qa==null?void 0:qa.find(Ha=>Ha==null?void 0:Ha.id))==null?void 0:hl.id)===(h==null?void 0:h.id)});let R=ve.getEqualChild([(xe=oe.value)==null?void 0:xe.filter(qa=>(qa==null?void 0:qa.label)!=="操作")]);const D=(fa=($a=ve.tableToForm(A,R))==null?void 0:$a[0])==null?void 0:fa.find(qa=>{const hl=qa==null?void 0:qa.key;return hl==="Interface"||hl==="方法体"}),re=D==null?void 0:D.value;if(!re){console.log("未搜索到isMain, 缺少算法执行接口"),la.setImportLoading(!1);return}const ne=oe.value?ve.getEqualChild([oe.value]):[],W=ne.find(qa=>{const hl=qa==null?void 0:qa.prop;return hl==="Input1"||hl==="输入数据.输入1"||hl==="样本输入数据"}),ke=W==null?void 0:W.prop;let Ae=h==null?void 0:h[ke];const je=await fi().catch(qa=>(la.setImportLoading(!1),Promise.reject(qa)));let $e=!0,Ge="";(Ea=oe.value)==null||Ea.forEach(qa=>{(qa==null?void 0:qa.prop)===ke&&($e=!!(qa!=null&&qa.childPath),Ge=qa==null?void 0:qa.childPath)});let xa="";if($e){let qa=(B=(Sa=oe.value)==null?void 0:Sa.find(tl=>(tl==null?void 0:tl.isMainKey)===!0))==null?void 0:B.prop;xa=h==null?void 0:h[qa];let hl=Ge==null?void 0:Ge.split(b),Ha=[];hl==null||hl.forEach((tl,xl)=>{(hl==null?void 0:hl.length)-1===xl&&Ha.push(xa),Ha.push(tl)}),Ha=Ha==null?void 0:Ha[0];let ol=await ve.getItemData(Ha,sessionStorage.getItem("systemKey"),""),Ga=ol==null?void 0:ol.filter(tl=>(tl==null?void 0:tl.name)===ke);Ga=Ga==null?void 0:Ga.map(tl=>{var xl;return tl.compData=(xl=tl==null?void 0:tl.compData)==null?void 0:xl.map(El=>{var xr;return(El==null?void 0:El.key)==="tableContents"&&(El.contents=(xr=El==null?void 0:El.contents)==null?void 0:xr.filter(Ll=>(Ll==null?void 0:Ll[1])===(h==null?void 0:h[ke]))),El}),tl}),(!Ga||(Ga==null?void 0:Ga.length)===0)&&(Ga=ol,Ga=Ga==null?void 0:Ga.map(tl=>{var xl;return tl.compData=(xl=tl==null?void 0:tl.compData)==null?void 0:xl.map(El=>{var xr;return(El==null?void 0:El.key)==="tableContents"&&(El.contents=(xr=El==null?void 0:El.contents)==null?void 0:xr.filter(Ll=>{var yl,Nl;return(Ll==null?void 0:Ll[1])===(h==null?void 0:h[(Nl=(yl=oe==null?void 0:oe.value)==null?void 0:yl[0])==null?void 0:Nl.prop])})),El}),tl})),Ae=et(Ga)}const Ia=await Qo(re,{token:je,inputData:Ae}).catch(qa=>(la.setImportLoading(!1),Promise.reject(qa))),Ba=(J=Ia==null?void 0:Ia.data)==null?void 0:J.data,Ye=ne.find(qa=>(qa==null?void 0:qa.prop)==="Output1"),Za=Ye==null?void 0:Ye.prop;let ga=[],Qa=[];if(Ba&&((Re=Object.values(Ba))==null?void 0:Re.length)>0){let qa=[];const hl=new FormData,Ha=(ra=at(Ba))==null?void 0:ra.map(async Ga=>{var tl,xl;if(!Array.isArray(Ga)&&(Ga!=null&&Ga.includes("http"))){let El=await Wa.axios.get(Ga,{responseType:"blob"}),xr=(xl=Ga==null?void 0:Ga.split("/"))==null?void 0:xl[((tl=Ga==null?void 0:Ga.split("/"))==null?void 0:tl.length)-1];hl.append("files",El.data,xr)}else qa.push(Ga)});if(await Promise.all(Ha),!ve.isFormDataEmpty(hl)){let Ga=await Mu.uploadAmountApi(hl),tl=(sa=(_e=Ga==null?void 0:Ga.data)==null?void 0:_e.result)==null?void 0:sa.map(xl=>{var El,xr,Ll,yl,Nl,Ql;return{name:(Ql=(Nl=(yl=(El=xl==null?void 0:xl.url)==null?void 0:El.split("/"))==null?void 0:yl[((Ll=(xr=xl==null?void 0:xl.url)==null?void 0:xr.split("/"))==null?void 0:Ll.length)-1])==null?void 0:Nl.split("."))==null?void 0:Ql[0],url:xl==null?void 0:xl.url}});qa=[...qa,...tl]}let ol={};for(let Ga in h)Ga!=="id"&&(ol[Ga]=h[Ga]);ol[Za]=qa,Qa.push({id:h==null?void 0:h.id,value:{tableData:ol}})}if((Qa==null?void 0:Qa.length)>0){const qa=Qa.map(Ha=>{const ol={id:Ha.id,...Ha.value.tableData};return delete ol._isOCRRow,delete ol._ocrTableId,delete ol._isTemp,delete ol.tableEditType,delete ol.index,ol}),hl=[{tableName:(Ca=c==null?void 0:c.related)==null?void 0:Ca.find(Ha=>Ha==null?void 0:Ha.includes("content")),tableContents:qa}];await O.pageBatchUpdateApi({platId:parseInt((rl=Tl.value)==null?void 0:rl.plat_id),changeContents:hl})}if((ga==null?void 0:ga.length)>0)try{await O.pageBatchAddApi({platId:parseInt((Ka=Tl.value)==null?void 0:Ka.plat_id),changeContents:[{tableName:(sl=c==null?void 0:c.related)==null?void 0:sl.find(qa=>qa==null?void 0:qa.includes("content")),tableContents:ga.map(qa=>{var Ha,ol,Ga;const hl={id:((Ha=qa==null?void 0:qa.key)==null?void 0:Ha.id)??((ol=qa==null?void 0:qa.key)==null?void 0:ol.rowId)??(qa==null?void 0:qa.id),...((Ga=qa==null?void 0:qa.value)==null?void 0:Ga.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(qa){Wa.ElMessage.error(((Pl=(ul=qa==null?void 0:qa.response)==null?void 0:ul.data)==null?void 0:Pl.message)||(qa==null?void 0:qa.message)||"保存失败"),Fe.setTableLoading(!1);return}$i(!0),la.setImportLoading(!1),Fe.setFreshContent(!0)},so=(d,h)=>(d=d==null?void 0:d.map(T=>{var A,R;return T!=null&&T.children&&((A=T.children)!=null&&A.find(D=>D.id===(h==null?void 0:h.id))?T.children=(R=T.children)==null?void 0:R.filter(D=>(D==null?void 0:D.id)!==(h==null?void 0:h.id)):T.children=so(T.children,h)),T}),d),hi=e.ref(!1),rt=()=>{hi.value=!0},nt=async d=>{var T,A,R,D;hi.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()};ia.value.push(ne),Al(ne,"uploading"),Rl(ne,0);try{const W=new FormData;W.append("file",re,ne.name);const ke=await O.platformUploadFile(W);ne.uploadResult=((T=ke==null?void 0:ke.data)==null?void 0:T.result)||{name:ne.name,url:"",fileName:ne.name},bl({name:((A=ne.uploadResult)==null?void 0:A.name)||ne.name,url:((R=ne.uploadResult)==null?void 0:R.url)||"",id:(D=ne.uploadResult)==null?void 0:D.id}),Al(ne,"uploaded"),Rl(ne,100)}catch(W){console.error("文件上传失败:",W),Wa.ElMessage.error(`文件 ${ne.name} 上传失败,请重试`),Al(ne,"pending"),Rl(ne,0);const ke=ia.value.findIndex(Ae=>Ae.uid===ne.uid);ke>-1&&ia.value.splice(ke,1)}}},o=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,T)=>{h===(c==null?void 0:c.index)?T(new Error("选择源不能和目标源一致")):T()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),i=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:""}),f=()=>{i.show=!1},g=async d=>{var h,T,A,R,D,re,ne,W;try{const ke=[];let Ae=(h=Ce.value||[])==null?void 0:h.slice();(d||[]).forEach(Ia=>{const Ba={...Ia};try{Ba.sort=On(0,Ae)}catch{}ke.push(Ba),Ae.unshift(Ba)});let je=await O.quoteApi({platId:parseInt((T=Tl==null?void 0:Tl.value)==null?void 0:T.plat_id),type:"fatherSyncs",related:[{menus:Ke.value,groups:""},{menus:Ke.value,groups:c==null?void 0:c.compName}]});je=(A=je==null?void 0:je.data)==null?void 0:A.result;let $e=je==null?void 0:je.map(Ia=>({tableName:"content_"+(Ia==null?void 0:Ia.id),tableContents:ke==null?void 0:ke.map((Ba,Ye)=>({id:Ye,...Ba}))})),Ge=[{tableName:(R=c==null?void 0:c.related)==null?void 0:R.find(Ia=>Ia==null?void 0:Ia.includes("content")),tableContents:ke==null?void 0:ke.map((Ia,Ba)=>({id:Ba,...Ia}))}];Ge=[...Ge,...$e];const xa=await O.pageBatchAddApi({platId:parseInt((D=Tl.value)==null?void 0:D.plat_id),changeContents:Ge});if(((re=xa==null?void 0:xa.data)==null?void 0:re.code)===200){const Ia={buttonName:"新增",columns:oe.value,fixContent:ke==null?void 0:ke.map((Ye,Za)=>({id:Za,...Ye})),relatedContents:c==null?void 0:c.related};await St(Ia),Wa.ElMessage.success("数据导入成功");let Ba=[];Ge==null||Ge.forEach(Ye=>{var Za;(Za=Ye==null?void 0:Ye.tableContents)==null||Za.forEach(ga=>{Ba.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ga),request_result:"{}",is_delete:!1,request_table:Ye==null?void 0:Ye.tableName,request_type:"export"})})}),await O.pageBatchAddApi({platId:parseInt((ne=Tl==null?void 0:Tl.value)==null?void 0:ne.plat_id),changeContents:[{tableName:"log",tableContents:Ba}]})}else{let Ia=[];Ge==null||Ge.forEach(Ba=>{var Ye;(Ye=Ba==null?void 0:Ba.tableContents)==null||Ye.forEach(Za=>{Ia.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Za),request_result:"{}",is_delete:!1,request_table:Ba==null?void 0:Ba.tableName,request_type:"error"})})}),await O.pageBatchAddApi({platId:parseInt((W=Tl==null?void 0:Tl.value)==null?void 0:W.plat_id),changeContents:[{tableName:"log",tableContents:Ia}]}),Wa.ElMessage.error("数据导入响应失败")}}catch(ke){throw new Error(ke)}},x=async d=>{var h,T,A,R,D,re,ne,W,ke,Ae;try{if(d==="cancel"&&(i.show=!1),d==="replace"&&((h=i==null?void 0:i.existRows)==null?void 0:h.length)>0){await O.pageBatchDeleteApi({platId:parseInt((T=Tl.value)==null?void 0:T.plat_id),changeContents:[{tableName:((A=c==null?void 0:c.related)==null?void 0:A.find($e=>$e==null?void 0:$e.includes("content_")))||((R=c==null?void 0:c.related)==null?void 0:R.find($e=>$e==null?void 0:$e.includes("content"))),tableContents:i==null?void 0:i.existRows}]});const je=await O.pageBatchAddApi({platId:parseInt((D=Tl.value)==null?void 0:D.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=(Ce.value||[]).filter(Ba=>!((i==null?void 0:i.existRows)||[]).some(Ye=>String(Ye==null?void 0:Ye.id)===String(Ba==null?void 0:Ba.id))),Ge=(i==null?void 0:i.tableData)||[],xa=[];let Ia=$e.slice();return Ge.forEach(Ba=>{const Ye={...Ba};try{Ye.sort=On(0,Ia)}catch{}xa.push(Ye),Ia.unshift(Ye)}),xa.map((Ba,Ye)=>({id:Ye,...Ba}))})()}]});if(((ne=je==null?void 0:je.data)==null?void 0:ne.code)!==200)return;(W=i.newRows)!=null&&W.length&&await g(i.newRows),await St({buttonName:"新增",columns:oe.value,fixContent:(ke=i==null?void 0:i.tableData)==null?void 0:ke.map(($e,Ge)=>({id:Ge,...$e})),relatedContents:c==null?void 0:c.related}),(Ae=i.newRows)!=null&&Ae.length||Wa.ElMessage.success("数据导入成功")}}catch(je){throw new Error(je)}finally{i.show=!1,i.columns=[],i.tableData=[],i.existRows=[]}},M=()=>{o.show=!1},Y=d=>{var h,T;if((d==null?void 0:d.buttonName)==="取消")return o.show=!1;o.to=d==null?void 0:d.content,!(!(c!=null&&c.index)||!((h=o.to)!=null&&h.groupName))&&(c==null?void 0:c.index)!==((T=o.to)==null?void 0:T.groupName)&&(Se("change",{buttonName:"迁移",value:{from:o.from,to:o.to,data:o.selectRow}}),o.show=!1)},Q=async d=>{var h,T,A,R;if(d){if(!yr.validateFileSize(d.raw)){Wa.ElMessage.warning(`文件大小不能超过 ${Ar.value.maxSize}MB`);const D=ia.value.findIndex(re=>re.uid===d.uid);D>-1&&ia.value.splice(D,1),be();return}if(!yr.validateFileType(d.raw)){Wa.ElMessage.warning("请上传图片文件");const D=ia.value.findIndex(re=>re.uid===d.uid);D>-1&&ia.value.splice(D,1),be();return}Al(d,"uploading"),Rl(d,0);try{const D=new FormData;D.append("file",d.raw,d.name);const re=await O.platformUploadFile(D);d.uploadResult=((h=re==null?void 0:re.data)==null?void 0:h.result)||{name:d.name,url:"",fileName:d.name},bl({name:((T=d.uploadResult)==null?void 0:T.name)||d.name,url:((A=d.uploadResult)==null?void 0:A.url)||"",id:(R=d.uploadResult)==null?void 0:R.id}),Al(d,"uploaded"),Rl(d,100)}catch(D){console.error("文件上传失败:",D),Wa.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),Al(d,"pending"),Rl(d,0);const re=ia.value.findIndex(ne=>ne.uid===d.uid);re>-1&&ia.value.splice(re,1)}finally{be()}}},be=()=>{e.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},He=async()=>{var T,A;if(sessionStorage.setItem("ocr_root_table_id",String((c==null?void 0:c.index)??"")),ia.value.length===0){Wa.ElMessage.warning("请先选择要上传的图片");return}if(ia.value.filter(R=>{const D=dl(R);return D!=="uploaded"&&D!=="completed"&&D!=="failed"}).length>0){Wa.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}nl.value=!0,ue.value=0;let h=null;try{ia.value.forEach(Ye=>{Al(Ye,"processing")});const R=Math.floor(Math.random()*10)+90;h=setInterval(()=>{ue.value<R?ue.value+=1:clearInterval(h)},50);const D=ia.value.map(Ye=>{var Za,ga,Qa;return{name:((Za=Ye.uploadResult)==null?void 0:Za.name)||Ye.name,url:((ga=Ye.uploadResult)==null?void 0:ga.url)||"",fileName:((Qa=Ye.uploadResult)==null?void 0:Qa.fileName)||Ye.name}}),re=yr.extractTableHeaders(oe.value),ne=D.map(Ye=>({name:(Ye==null?void 0:Ye.fileName)||(Ye==null?void 0:Ye.name),url:(Ye==null?void 0:Ye.url)||""})),W=await yr.recognize(ne,re);if(console.log(W,"ocrResult"),clearInterval(h),h=null,(W==null?void 0:W.code)===500||(W==null?void 0:W.type)==="error"||!(W!=null&&W.result)){ue.value=0,ia.value.forEach(Ye=>{Al(Ye,"failed"),Rl(Ye,0)}),Wa.ElMessage.error((W==null?void 0:W.message)||"OCR识别失败,请重试"),nl.value=!1;return}ue.value=R;const ke=Array.isArray(W==null?void 0:W.result)?W.result:[];if(ke.length===0){ue.value=0,ia.value.forEach(Ye=>{Al(Ye,"failed"),Rl(Ye,0)}),Wa.ElMessage.warning("OCR识别未返回有效数据"),nl.value=!1;return}const Ae=new Set,je=[];ke.forEach((Ye,Za)=>{const ga=Ye!=null&&Ye.数据&&typeof(Ye==null?void 0:Ye.数据)=="object"?Ye.数据:{},Qa=Array.isArray(Ye==null?void 0:Ye.图片信息)?Ye.图片信息:[],xe=new Map;Qa.forEach(fa=>{fa!=null&&fa.name&&xe.set(fa.name,fa.url||"")});const $a={_index:Za,_certType:(Ye==null?void 0:Ye.证书类型)||"",_certNo:(Ye==null?void 0:Ye.证书编号)||"",_ocrImages:Qa,__ocrFieldMeta:{}};Object.entries(ga).forEach(([fa,Ea])=>{let Sa="",B=0,J=[],Re="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(Sa=(Ea==null?void 0:Ea.value)??"",B=(Ea==null?void 0:Ea.score)??0,J=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],Re=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(Sa=Ea[0]??"",B=Ea[1]??0):(Sa=Ea??"",B=0),$a[fa]=Sa,$a[`${fa}_accuracy`]=B,Ae.add(fa),$a.__ocrFieldMeta[fa]={value:Sa,score:B,bboxNorm:J,imageName:Re,imageUrl:Re&&xe.get(Re)||"",images:Qa}}),je.push($a)});const $e=[],Ge=new Set;je.forEach(Ye=>{Ye&&Ae.forEach(Za=>{const ga=Ye[`${Za}_accuracy`];(typeof ga=="number"?ga>0:ga!=null&&String(ga).trim()!==""&&String(ga)!=="0")&&Ge.add(Za)})}),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})}),ia.value.forEach(Ye=>{Al(Ye,"completed")}),ue.value=100,ea.value=$e,ua.value=je,cl.value=D,Ve.value=W;const xa=["出厂编号","设备名称","制造厂"],Ia=$e.filter(Ye=>Ye&&!Ye.isAccuracy&&typeof Ye.prop=="string").map(Ye=>Ye.prop),Ba=["出厂编号","设备名称","制造厂"];Fa.value=Ia.filter(Ye=>Ba.includes(Ye)),console.log("[OCR] 默认勾选字段 props:",Fa.value),ye.value=2,nl.value=!1,ka.value=!1}catch(R){console.error("OCR处理失败:",R),h&&(clearInterval(h),h=null),Wa.ElMessage.error(((A=(T=R==null?void 0:R.response)==null?void 0:T.data)==null?void 0:A.message)||"OCR识别失败,请重试"),nl.value=!1,ue.value=0,ia.value.forEach(D=>{Al(D,"pending"),Rl(D,0)})}},Ne=d=>{if(d==null)return"";let h=String(d);return h=h.replace(/\s+/g," ").trim(),h=h.replace(/[!-~]/g,T=>String.fromCharCode(T.charCodeAt(0)-65248)),h=h.replace(/ /g," "),h=h.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),h},aa=()=>{var Ye,Za;const d=cl.value,h=Ve.value,T=ua.value;if(!T||T.length===0){Wa.ElMessage.warning("暂无数据可添加");return}const A=(Ye=ve.getAllLeafNodes(oe.value)||[])==null?void 0:Ye.filter(ga=>(ga==null?void 0:ga.type)!=="operate"&&(ga==null?void 0:ga.label)!=="操作"&&(ga==null?void 0:ga.prop)!=="operate"),R=new Map,D=new Map,re=(Za=A==null?void 0:A.find(ga=>(ga==null?void 0:ga.label)==="证书附件"))==null?void 0:Za.prop;A==null||A.forEach(ga=>{ga!=null&&ga.label&&(ga!=null&&ga.prop)&&(R.set(ga.label,ga.prop),D.set(ga.prop,ga.label))});const ne=Date.now(),W=ga=>String(ne*1e3+ga),ke=[],Ae=[],je=ga=>{const Qa=To&&To[ga]||[ga];for(const xe of Qa){const $a=R.get(xe);if($a)return $a}return""},$e=je("出厂编号"),Ge=je("设备名称"),xa=je("制造厂"),Ia=[],Ba=ga=>{var Sa,B;if(!re)return[];const Qa=(Array.isArray(d)?d[ga]:null)||null,xe=(Qa==null?void 0:Qa.url)||"",$a=(Qa==null?void 0:Qa.fileName)||(Qa==null?void 0:Qa.name)||"";return(String($a).toLowerCase().endsWith(".pdf")||String(xe).toLowerCase().endsWith(".pdf"))&&xe?[{url:xe,name:$a,fileName:$a}]:(Array.isArray((B=(Sa=h==null?void 0:h.result)==null?void 0:Sa[ga])==null?void 0:B.图片信息)?h.result[ga].图片信息:[]).map(J=>({url:(J==null?void 0:J.url)||"",name:(J==null?void 0:J.name)||"",fileName:(J==null?void 0:J.name)||""})).filter(J=>J.url)};if(T.forEach((ga,Qa)=>{var rl;const xe={id:W(Qa),_isOCRRow:!0,_ocrTableId:c==null?void 0:c.index};for(const[Ka,sl]of R.entries())Object.prototype.hasOwnProperty.call(ga,Ka)&&(xe[sl]=ga[Ka]);re&&(xe[re]=Ba(Qa));const $a=(Array.isArray(h==null?void 0:h.result)?h.result[Qa]:null)||null,fa=(Array.isArray(d)?d[Qa]:null)||null,Ea=(fa==null?void 0:fa.url)||"",Sa=(fa==null?void 0:fa.fileName)||(fa==null?void 0:fa.name)||"",B=String(Sa).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),J={ts:Date.now(),versionId:String(Date.now())+"_"+String(Qa),label:new Date().toLocaleString(),certType:($a==null?void 0:$a.证书类型)||"",certNo:($a==null?void 0:$a.证书编号)||"",fileType:B?"pdf":"image",sourceUrl:B?Ea:"",images:Array.isArray($a==null?void 0:$a.图片信息)?$a.图片信息.map(Ka=>({name:(Ka==null?void 0:Ka.name)||"",url:(Ka==null?void 0:Ka.url)||""})).filter(Ka=>Ka.url):[]},Re=Ka=>Ne(Ka?xe==null?void 0:xe[Ka]:""),ra=Re($e),_e=Re(Ge),sa=Re(xa);if(!!($e&&Ge&&xa&&ra&&_e&&sa)){const Ka=(Ce.value||[]).find(sl=>{const ul=Ne($e?sl==null?void 0:sl[$e]:""),Pl=Ne(Ge?sl==null?void 0:sl[Ge]:""),qa=Ne(xa?sl==null?void 0:sl[xa]:"");return ul&&Pl&&qa&&ul===ra&&Pl===_e&&qa===sa});if(Ka){Ia.push({idx:Qa,ocrRow:xe,versionItem:J,ocrNo:ra,candidates:[Ka],selectedTargetId:String((Ka==null?void 0:Ka.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ra&&$e){const Ka=(Ce.value||[]).filter(sl=>{const ul=Ne($e?sl==null?void 0:sl[$e]:"");return ul&&ul===ra});if(Ka.length>0){Ia.push({idx:Qa,ocrRow:xe,versionItem:J,ocrNo:ra,candidates:Ka,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(xe.sort===void 0||xe.sort===null||String(xe.sort).trim()===""){const Ka=(Ce.value||[]).map(ul=>ai(ul==null?void 0:ul.sort)).filter(ul=>ul!==null),sl=Ka.length>0?Math.max(...Ka):((rl=Ce.value)==null?void 0:rl.length)??0;xe.sort=String(Number((sl+1).toFixed(6)))}}catch{}zl(c==null?void 0:c.index,xe.id,J),Ia.push({idx:Qa,ocrRow:xe,versionItem:J,ocrNo:ra,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Ia||[]).length>0){Gl.value=(Ia||[]).map(ga=>({...ga,selectedTargetId:(ga==null?void 0:ga.selectedTargetId)||""})),Il.value=!0,Hl.value=Ae,Zl.value=ke,_r.value=h,Fl.value=d,pr.value=re||"";return}},Da=(d,h,T)=>{ua.value[d]&&(ua.value[d][h]=T)},Xa=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,Ya=d=>{if(d==null||d===0)return"#909399";const h=Number(d);return h>=.9?"#67c23a":h>=.7?"#e6a23c":"#f56c6c"},el=d=>{var T,A,R,D;if(wa.value===d){wa.value=null,Aa.value=!1,il.value="";return}wa.value=d,il.value="";const h=(T=ua.value)==null?void 0:T[d];if(h&&Array.isArray(h._ocrImages)&&h._ocrImages.length>0){Me.value=h._ocrImages.map(W=>({name:(W==null?void 0:W.name)||"",url:(W==null?void 0:W.url)||""})).filter(W=>W.name||W.url);const re=h.__ocrFieldMeta||{},ne=(A=Object.values(re))==null?void 0:A.find(W=>W==null?void 0:W.imageName);Sl.value=(ne==null?void 0:ne.imageName)||((D=(R=Me.value)==null?void 0:R[0])==null?void 0:D.name)||"",Aa.value=Me.value.length>0}else Me.value=[],Aa.value=!1,Sl.value=""},kl=()=>{al.value=!1,ia.value=[],ja.value=null,ye.value=1,ma.value.clear(),Oe.value.clear(),ue.value=0,Aa.value=!1},ml=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",dl=d=>{const h=d.uid||d.name;return ma.value.get(h)||"pending"},ql=d=>{const h=d.uid||d.name;return Oe.value.get(h)||0},Rl=(d,h)=>{const T=d.uid||d.name;Oe.value.set(T,Math.min(100,Math.max(0,h)))},Ml=d=>{const h=dl(d),T=100.53;if(h==="completed"||h==="uploaded")return`${T} ${T}`;if(h==="failed")return`${T} ${T}`;if(h==="uploading"){const A=ql(d);return`${T*(A/100)} ${T}`}else if(h==="processing")return`${T*.5} ${T}`;return`0 ${T}`},Al=(d,h)=>{const T=d.uid||d.name;ma.value.set(T,h),(h==="completed"||h==="uploaded")&&Rl(d,100)},jr=()=>{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 T=>{const A=Array.from(T.target.files||[]);for(const R of A){const D={name:R.name,raw:R,uid:Date.now()+Math.random()};ia.value.push(D),await Q(D)}T.target.value="",document.body.removeChild(h)},document.body.appendChild(h),h.click()}})},Sr=()=>{ye.value>1&&ye.value--},Yr=()=>{ye.value===1?ia.value.length>0&&!nl.value&&He():ye.value===2&&(aa(),ye.value=3)},tn=async d=>{await li(d==null?void 0:d.row)},gn=async({row:d,prop:h})=>{!d||!h||await li(d,h)},li=async(d,h)=>{var R,D;const T=d==null?void 0:d.id;if(!T){Wa.ElMessage.warning("暂无可预览数据");return}let A=Ua(c==null?void 0:c.index,T);if(!A||A.length===0){const re=sessionStorage.getItem("ocr_root_table_id"),ne=re!==null?Number(re):null;if(ne!=null&&ne!==""&&!Number.isNaN(ne)){const W=Ua(ne,T);Array.isArray(W)&&W.length>0&&($l(c==null?void 0:c.index,T,W),A=W)}}if(!A||A.length===0){const re=(R=ve.getAllLeafNodes(oe.value)||[])==null?void 0:R.filter(W=>(W==null?void 0:W.type)!=="operate"&&(W==null?void 0:W.label)!=="操作"&&(W==null?void 0:W.prop)!=="operate"),ne=h||((D=re==null?void 0:re.find(W=>(W==null?void 0:W.label)==="证书附件"))==null?void 0:D.prop);if(ne&&d[ne]){const W=d[ne];let ke=[],Ae="",je=!1;if(typeof W=="string")try{const $e=JSON.parse(W);Array.isArray($e)&&(ke=$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),ke.length>0&&(Ae=ke[0].url||"",je=String(ke[0].name).toLowerCase().endsWith(".pdf")||String(Ae).toLowerCase().endsWith(".pdf")))}catch{Ae=W,je=String(W).toLowerCase().endsWith(".pdf"),ke=[{name:W,url:W}]}else Array.isArray(W)&&(ke=W.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),ke.length>0&&(Ae=ke[0].url||"",je=String(ke[0].name).toLowerCase().endsWith(".pdf")||String(Ae).toLowerCase().endsWith(".pdf")));if(ke.length>0||Ae){const $e={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:je?"pdf":"image",sourceUrl:je?Ae:"",images:ke};A=[$e],zl(c==null?void 0:c.index,T,$e)}}}if(!A||A.length===0){Wa.ElMessage.warning("暂无可预览数据");return}Va.value=A,Oa.value=!0},ri=d=>{ia.value=ia.value.filter((h,T)=>T!==d)},it=async(d,h,T)=>{var A,R,D,re,ne,W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za,ga,Qa,xe,$a,fa;if(de(c.config,{type:Qe.TABLE,tableOperate:d})){if(Ma.value="",ya.value=!0,Ta.value=!0,Se("onButtonClick",d,h),$.value=[],d==="删除")pn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,Sa,B,J;(Ea=Ce.value)!=null&&Ea.find(Re=>(Re==null?void 0:Re.id)===(h==null?void 0:h.id))?Ce.value=(Sa=O.cloneDeep(Ce.value))==null?void 0:Sa.filter(Re=>(Re==null?void 0:Re.id)!==(h==null?void 0:h.id)):Ce.value=so(O.cloneDeep(Ce.value),h);try{h!=null&&h.id&&((J=(B=Ue.value)==null?void 0:B.has)!=null&&J.call(B,h==null?void 0:h.id))&&Ue.value.delete(h.id)}catch{}zf(Gr.value,mn.value,h==null?void 0:h.id),Fe.setTableLoading(c==null?void 0:c.index),Se("change",{content:Ce.value,fixContent:[h],index:c==null?void 0:c.index,type:"delete",name:c==null?void 0:c.groupNames,buttonName:d,columns:oe.value,relatedContents:c==null?void 0:c.related}),console.log(h,"item")});else if(d==="批量删除"){if(((A=cr.value)==null?void 0:A.length)===0)return Wa.ElMessage.warning("请先勾选操作的数据");pn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var B,J,Re,ra,_e;const Ea=(B=cr.value)==null?void 0:B.map(sa=>sa.id);Ce.value=(J=O.cloneDeep(Ce.value))==null?void 0:J.filter(sa=>!(Ea!=null&&Ea.includes(sa.id))),Fe.setTableLoading(c==null?void 0:c.index),Se("change",{content:Ce.value,fixContent:cr.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:oe.value});const Sa=(Ea||[]).filter(Boolean);if(Sa.length>0&&Sa.every(sa=>sa!=null&&sa!=="")){const sa=(cr.value||[]).map(Ca=>{const rl={...Ca};return delete rl._isOCRRow,delete rl._ocrTableId,delete rl._isTemp,delete rl.tableEditType,delete rl.index,rl});await O.pageBatchDeleteApi({platId:parseInt((Re=Tl.value)==null?void 0:Re.plat_id),changeContents:[{tableName:((ra=c==null?void 0:c.related)==null?void 0:ra.find(Ca=>Ca==null?void 0:Ca.includes("content_")))||((_e=c==null?void 0:c.related)==null?void 0:_e.find(Ca=>Ca==null?void 0:Ca.includes("content"))),tableContents:sa}]})}})}else if(d==="复制新增"){ce.value="复制新增",O.cloneDeep(h);const Ea=(R=oe.value)==null?void 0:R.find(Sa=>Sa==null?void 0:Sa.isMainKey);Ea||((D=oe.value)==null||D[0]),nr.value=h,$i(!0)}else if(d==="新增")ce.value="新增",Oi(""),H.value=!0;else if(d==="编辑")ce.value="编辑",Oi(h),H.value=!0;else if(d==="查看")ce.value="查看",Oi(h),ya.value=!1,Ta.value=!1,H.value=!0;else if(d==="查看三维模型"){const Ea={};for(let B in h)B!=="id"&&(Ea[B]=h[B]);let Sa=(re=Object.values(Ea))==null?void 0:re[1];Be.setTableShowThree(Sa)}else if(d==="切换视图")gu();else if(((ne=T==null?void 0:T.extra)==null?void 0:ne.type)==="modelExample")ce.value=d,we.value=!0;else if(d==="新建"){let Ea=fe.value,Sa=[];for(let _e in Ea)_e!=null&&_e.includes(`loading${((W=Tl.value)==null?void 0:W.account)||((ke=Tl.value)==null?void 0:ke.账号)}`)&&(Sa=[...Sa,..._e]);let B=[];for(let _e in Ea)_e!=null&&_e.includes(`updateLoading${((Ae=Tl.value)==null?void 0:Ae.account)||((je=Tl.value)==null?void 0:je.账号)}`)&&(B=[...B,..._e]);let J=Sa==null?void 0:Sa.map(_e=>_e==null?void 0:_e.id);const Re=B==null?void 0:B.map(_e=>_e==null?void 0:_e.id);J=[...O.cloneDeep(J),...Re],(J==null?void 0:J.length)>0&&(J!=null&&J.every(_e=>_e!==null&&_e))&&await Dr.batchDeleteInsofDataApi({ids:J});const ra=($e=Le.value)==null?void 0:$e.find(_e=>(_e==null?void 0:_e.label)==="新建");await cu(!1,ra)}else if(d==="修改模板"){let Ea=O.cloneDeep(Ke).value;Fe.setRouteToChildPath(Ea),la.setActiveMenuPath(Ea+b)}else if(d==="执行")lt(d,h);else if(d==="导出paraform"){const Ea=Fi.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Sa=["推力","真空","压力","温度","流量"],B=yl=>{var Nl,Ql,Dl;return yl?typeof(yl==null?void 0:yl.value)=="string"?yl.value:((Dl=(Ql=(Nl=yl==null?void 0:yl._custom)==null?void 0:Nl.value)==null?void 0:Ql.value)==null?void 0:Dl.value)||"":""},J=Array.isArray(nn.value)?nn.value:[],Re=B(J.find(yl=>(yl==null?void 0:yl.condition)==="child")),ra=String(Re||"").slice(0,8),_e=yl=>{if(yl==null)return"";const Nl=String(yl).trim();if(!Nl)return"";if(/^\d{8}$/.test(Nl))return Nl;const Ql=Nl.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Ql){const Jl=Ql[1],ir=Ql[2].padStart(2,"0"),Kl=Ql[3].padStart(2,"0");return`${Jl}${ir}${Kl}`}const Dl=Nl.replace(/\D/g,"");return Dl.length>=8?Dl.slice(0,8):""},sa=async yl=>{var Nl,Ql;if(!yl)return"";try{const Dl=await Kr("试验任务/任务管理",!1),Jl=(hr,ur=[])=>{if(!Array.isArray(hr))return ur;for(const dr of hr)(dr==null?void 0:dr.comp)==="Table"&&(dr!=null&&dr.name)&&ur.push(dr),Array.isArray(dr==null?void 0:dr.children)&&Jl(dr.children,ur),Array.isArray(dr==null?void 0:dr.tab)&&Jl(dr.tab,ur),Array.isArray(dr==null?void 0:dr.choice)&&Jl(dr.choice,ur);return ur},Kl=Jl(Dl||[]).find(hr=>(hr==null?void 0:hr.name)==="任务列表"),fr=((Ql=(Nl=Kl==null?void 0:Kl.compData)==null?void 0:Nl.find(hr=>(hr==null?void 0:hr.key)==="tableContents"))==null?void 0:Ql.contents)||[];if(!Array.isArray(fr)||fr.length===0)return"";const Ur=fr.find(hr=>String((hr==null?void 0:hr["试验代号(名称)"])||"").slice(0,8)===yl);return _e(Ur==null?void 0:Ur.计划试验时间)}catch(Dl){return console.warn("获取任务列表计划试验时间失败:",Dl),""}},Ca=(Ke.value||"").replace(/\/+$/,""),rl=Re?`${Ca}/${Re}`:Ca,Ka=await Kr(rl||Ke.value,!1),sl=String(pa.value||"").trim(),ul=yl=>String(yl||"").trim(),Pl=(yl,Nl=[],Ql="")=>{if(!Array.isArray(yl))return Nl;for(const Dl of yl){const Jl=ul((Dl==null?void 0:Dl.choiceName)||(Dl==null?void 0:Dl.name0)||Ql);(Dl==null?void 0:Dl.comp)==="Table"&&(Dl==null?void 0:Dl.name)&&Sa.includes(Dl.name)&&(!sl||Jl===sl)&&Nl.push(Dl),Array.isArray(Dl==null?void 0:Dl.children)&&Pl(Dl.children,Nl,Jl),Array.isArray(Dl==null?void 0:Dl.tab)&&Pl(Dl.tab,Nl,Jl),Array.isArray(Dl==null?void 0:Dl.choice)&&Pl(Dl.choice,Nl,Jl)}return Nl},qa=Pl(Ka||[]),hl=new Map;for(const yl of qa)yl!=null&&yl.name&&!hl.has(yl.name)&&hl.set(yl.name,yl);const Ha=Sa.map(yl=>hl.get(yl)).filter(Boolean);if(!Ha||Ha.length===0)return Wa.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const ol=yl=>{const Nl=new Map,Ql=(Dl,Jl=[])=>{if(Array.isArray(Dl))for(const ir of Dl){const Kl=((ir==null?void 0:ir.label)??"").toString().trim(),fr=Kl?[...Jl,Kl]:[...Jl];if(Array.isArray(ir==null?void 0:ir.children)&&ir.children.length>0)Ql(ir.children,fr);else{const hr=((ir==null?void 0:ir.prop)??"").toString();if(!hr)continue;const ur=Kl||hr,dr=(fr.length>0?[...Jl,ur]:[ur]).join(".");Nl.set(hr,dr)}}};return Ql(yl,[]),Nl},Ga=(yl,Nl)=>{const Ql=ol(yl||[]),Jl=(ve.getAllLeafNodes(yl||[])||[]).filter(Kl=>(Kl==null?void 0:Kl.prop)&&(Kl==null?void 0:Kl.type)!=="operate"&&(Kl==null?void 0:Kl.label)!=="操作"&&(Kl==null?void 0:Kl.prop)!=="operate"),ir=Array.isArray(Nl)?Nl:[];return ir.length===0?[]:ir.map(Kl=>{const fr={};return Jl.forEach(Ur=>{const hr=String(Ur.prop),ur=Ql.get(hr)||String(Ur.label||Ur.prop);fr[ur]=(Kl==null?void 0:Kl[hr])??""}),fr})},tl=Ha.map(yl=>{var ir,Kl;const Nl=(yl==null?void 0:yl.compData)||[];let Ql=(ir=Nl==null?void 0:Nl.find(fr=>(fr==null?void 0:fr.key)==="header"))==null?void 0:ir.contents;Array.isArray(Ql==null?void 0:Ql[0])&&(Ql=Ql[0]);const Dl=((Kl=Nl==null?void 0:Nl.find(fr=>(fr==null?void 0:fr.key)==="tableContents"))==null?void 0:Kl.contents)||[];if(!Array.isArray(Ql)||Ql.length===0||!Array.isArray(Dl)||Dl.length===0)return null;const Jl=Ga(Ql||[],Dl||[]);return!Array.isArray(Jl)||Jl.length===0?null:{类型:yl==null?void 0:yl.name,数据:Jl}}).filter(Boolean);if(!tl||tl.length===0)return Wa.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const xl=await sa(ra),El={试验代号:ra,试验日期:xl,ParaForm:tl},xr=await fi().catch(()=>""),Ll=await O.exportParaformApi(El,xr);if(((Ge=Ll==null?void 0:Ll.data)==null?void 0:Ge.code)===200&&((Ia=(xa=Ll==null?void 0:Ll.data)==null?void 0:xa.result)!=null&&Ia.Excel文件)){const yl=Ll.data.result.Excel文件,Nl=await O.platformDownloadFile({url:yl}),Ql=new Blob([Nl.data],{type:"application/vnd.ms-excel"}),Dl=URL.createObjectURL(Ql),Jl=Vn.dayjs().format("YYYYMMDD"),Kl=`${(ra||"UNKNOWN").trim()||"UNKNOWN"}_${Jl}_paraform.xls`,fr=document.createElement("a");fr.href=Dl,fr.download=Kl,fr.style.display="none",document.body.appendChild(fr),fr.click(),setTimeout(()=>{document.body.removeChild(fr),URL.revokeObjectURL(Dl)},100);const Ur=Array.isArray((Ye=(Ba=Ll==null?void 0:Ll.data)==null?void 0:Ba.result)==null?void 0:Ye.warnings)?Ll.data.result.warnings:[];if(Ur.length>0){const hr=Ur.map((ur,dr)=>`${dr+1}. ${(ur==null?void 0:ur.field)||"未知字段"}:${(ur==null?void 0:ur.message)||""}`).join(`
|
|
24
|
+
`);Wa.ElMessage.warning({message:`导出成功,但存在以下提示:
|
|
25
|
+
${hr}`,duration:5e3,showClose:!0})}else Wa.ElMessage.success("导出成功")}else Wa.ElMessage.error(((Za=Ll==null?void 0:Ll.data)==null?void 0:Za.message)||"导出失败")}catch(Sa){console.error("导出paraform失败:",Sa),Wa.ElMessage.error("导出失败:"+((Sa==null?void 0:Sa.message)||"未知错误"))}finally{Ea.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ga=cr.value)==null?void 0:ga.length)===0)return Wa.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((Qa=Ce.value)==null?void 0:Qa.length)===0)return Wa.ElMessage.warning("暂无数据导出");let Ea=["序号",...($a=(xe=oe.value)==null?void 0:xe.map(Re=>Re==null?void 0:Re.prop))==null?void 0:$a.filter(Re=>Re!=="操作")],Sa=d==="导出全部"?Ce.value:cr.value;const B=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Sa=Sa==null?void 0:Sa.map(Re=>Object.fromEntries(Object.entries(Re).filter(([ra])=>!B.includes(ra)))),Ea=["序号",...Ea],Sa=Sa==null?void 0:Sa.map((Re,ra)=>({序号:ra+1,...Re}));let J=(c==null?void 0:c.compName)||"表格信息";Po(Sa,J,Ea,J)}else if(d==="OCR识别")al.value=!0,ia.value=[],ye.value=1,ma.value.clear(),Oe.value.clear(),ue.value=0;else if(d==="迁移")o.selectRow=h,o.show=!0;else if(d==="生成方法"){let Ea=await Jf(h),Sa;h!==""?Sa=[h]:Sa=O.cloneDeep(Ce.value),Sa=Sa==null?void 0:Sa.map(J=>(J.输出值=Ea,J));const B={fixContent:Sa,buttonName:"编辑",relatedContents:c==null?void 0:c.related,columns:oe.value,name:c==null?void 0:c.groupNames};Se("change",B)}else if(((fa=T==null?void 0:T.extra)==null?void 0:fa.type)==="methodButton"){let Ea;h!==""?Ea=[h]:Ea=O.cloneDeep(Ce.value);const B={fixContent:await gt(Ea,oe==null?void 0:oe.value,"Manual",Ce.value),buttonName:"methodButton",relatedContents:c==null?void 0:c.related,columns:oe.value,name:c==null?void 0:c.groupNames};Se("change",B)}}},tu=async(d,h)=>{var T,A,R,D,re,ne,W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za,ga,Qa,xe;try{let $a,fa;const Ea=(T=fe.value[Ke.value+b])==null?void 0:T.filter(Ca=>{var rl;return((rl=Ca==null?void 0:Ca.key)==null?void 0:rl.type)==="structureMethod"}),Sa=(A=fe.value[Ke.value+b])==null?void 0:A.filter(Ca=>{var rl;return((rl=Ca==null?void 0:Ca.key)==null?void 0:rl.type)==="structure"}),B=Ea==null?void 0:Ea.find(Ca=>{var rl,Ka;return((Ka=(rl=Ca==null?void 0:Ca.value)==null?void 0:rl.pageData)==null?void 0:Ka.method)==="保存"});if(!B)return;const J=(ne=(re=fe.value[(D=(R=B==null?void 0:B.value)==null?void 0:R.pageData)==null?void 0:D.path])==null?void 0:re.filter(Ca=>{var rl;return((rl=Ca==null?void 0:Ca.key)==null?void 0:rl.type)==="data"}))==null?void 0:ne.find(Ca=>{var rl,Ka,sl,ul;return((Ka=(rl=Ca==null?void 0:Ca.value)==null?void 0:rl.tableData)==null?void 0:Ka.算法名称)===((ul=(sl=B==null?void 0:B.value)==null?void 0:sl.pageData)==null?void 0:ul.method)});if(!J)return;const Re={buttonName:(ke=(W=B==null?void 0:B.value)==null?void 0:W.pageData)==null?void 0:ke.method,api:(je=(Ae=J==null?void 0:J.value)==null?void 0:Ae.tableData)==null?void 0:je.算法体,content:Sa==null?void 0:Sa.map(Ca=>{var rl;return(rl=Ca==null?void 0:Ca.value)==null?void 0:rl.pageData}),extraContent:[],extraValues:(Ge=($e=B==null?void 0:B.value)==null?void 0:$e.pageData)==null?void 0:Ge.data,methodName:(Ia=(xa=B==null?void 0:B.value)==null?void 0:xa.pageData)==null?void 0:Ia.path};if(!d)return;const ra={...d,compData:(Ba=d==null?void 0:d.compData)==null?void 0:Ba.map(Ca=>{var rl;return(Ca==null?void 0:Ca.key)==="formContent"?{...Ca,contents:(rl=Ca==null?void 0:Ca.contents)==null?void 0:rl.map(Ka=>(Ka==null?void 0:Ka.prop)===h?{...Ka,value:""}:Ka)}:Ca})},_e={key:{pageKey:Ke.value+b,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ra}},sa=await Wa.axios.post(Re.api,_e,{headers:{"Content-Type":"application/json"}});return((Ye=sa==null?void 0:sa.data)==null?void 0:Ye.code)===200&&($a=(ga=(Za=sa==null?void 0:sa.data)==null?void 0:Za.result)==null?void 0:ga.latestReportCode,fa=(xe=(Qa=sa==null?void 0:sa.data)==null?void 0:Qa.result)==null?void 0:xe.status),{newMainKeyValue:$a,newStatus:fa}}catch($a){throw Wa.ElMessage.error($a),new Error($a)}},Mt=e.reactive({prop:"状态",value:""});e.ref(["系统自动生成信息","审批意见"]);const su=async(d,h,T)=>{var W,ke;let A=d==null?void 0:d[h==null?void 0:h.prop],R=1,D,re;const ne=O.cloneDeep(Ke).value+b+A;if(ne){Mt.value="",D=(W=fe.value[ne])==null?void 0:W.filter($e=>{var Ge;return((Ge=$e==null?void 0:$e.key)==null?void 0:Ge.type)==="structure"});const Ae=D==null?void 0:D.find($e=>{var Ge,xa,Ia;return((Ia=(xa=(Ge=$e==null?void 0:$e.value)==null?void 0:Ge.pageData)==null?void 0:xa.comp)==null?void 0:Ia.toUpperCase())==="FORM"});re={...(ke=Ae==null?void 0:Ae.value)==null?void 0:ke.pageData,id:Ae==null?void 0:Ae.id};const je=await tu(re,h==null?void 0:h.prop);if(Mt.value=je==null?void 0:je.newStatus,je!=null&&je.newMainKeyValue)return je==null?void 0:je.newMainKeyValue}if(Ce.value.some(Ae=>(Ae==null?void 0:Ae[h==null?void 0:h.prop])===A)){const Ae=A;for(;Ce.value.some(je=>(je==null?void 0:je[h==null?void 0:h.prop])===`${Ae}(${R})`);)R++;A=`${Ae}(${R})`}return A},cu=async(d,h,T)=>{var D,re,ne,W;let A,R;if(await su(T==null?void 0:T.data,T==null?void 0:T.firstCol),A=O.cloneDeep(Ke).value+b,R=O.cloneDeep(A)+`loading${((D=Tl.value)==null?void 0:D.account)||((re=Tl.value)==null?void 0:re.账号)}`,h){const ke=(W=(ne=fe.value[R])==null?void 0:ne.filter(Ae=>{var je;return((je=Ae==null?void 0:Ae.key)==null?void 0:je.parentTable)===""}))==null?void 0:W.map(Ae=>{var je;return{id:Ae==null?void 0:Ae.id,...(je=Ae==null?void 0:Ae.value)==null?void 0:je.pageData}});(ke==null?void 0:ke.length)>0||await ve.loadingConstruct(A,R,null,null,null),Fe.setRouteToChildPath(O.cloneDeep(Ke).value),la.setActiveMenuPath(R)}else Fe.setRouteToChildPath(O.cloneDeep(Ke).value),la.setActiveMenuPath(R)},uu=()=>{De.value=!1,Pa.value=[],Pe.value=!1},Oi=d=>{var D,re,ne,W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za,ga,Qa,xe,$a,fa,Ea,Sa;const h=[];te.value=O.cloneDeep(oe.value),(re=ve.getColumnChild((D=O.cloneDeep(oe.value))==null?void 0:D.filter(B=>(B==null?void 0:B.label)!=="操作")))==null||re.forEach((B,J)=>{var Re,ra,_e;B!=null&&B.formType&&((Re=B==null?void 0:B.formType)==null?void 0:Re.toUpperCase())==="SELECT"||B!=null&&B.menuId?h.push({label:(ra=B==null?void 0:B.prop)!=null&&ra.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",name:(B==null?void 0:B.prop)??"t"+J,prop:B==null?void 0:B.prop,type:"Select",value:(d==null?void 0:d[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??J,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,width:1,isFormColHidden:B==null?void 0:B.isFormColHidden,relatedValueId:B==null?void 0:B.relatedValueId,disabled:B==null?void 0:B.disabled,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,allSelectionContents:(B==null?void 0:B.allSelectionContents)??[],filterContent:B==null?void 0:B.filterContent,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter}):h.push({label:(_e=B==null?void 0:B.prop)!=null&&_e.includes(".")?B==null?void 0:B.prop:(B==null?void 0:B.label)??(B==null?void 0:B.prop)??"",prop:B==null?void 0:B.prop,name:(B==null?void 0:B.prop)??"t"+J,type:!(B!=null&&B.formType)||(B==null?void 0:B.formType)===""?"Input":B==null?void 0:B.formType,value:(B==null?void 0:B.formType)==="Upload"?(d==null?void 0:d[B==null?void 0:B.prop])??"{}":(d==null?void 0:d[B==null?void 0:B.prop])??(B==null?void 0:B.value)??"",id:(B==null?void 0:B.id)??J,contents:(B==null?void 0:B.options)??[],multiple:(B==null?void 0:B.multiple)??!1,width:1,isFormColHidden:B==null?void 0:B.isFormColHidden,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled,relatedValueId:B==null?void 0:B.relatedValueId,menus:B==null?void 0:B.menus,groups:B==null?void 0:B.groups,words:B==null?void 0:B.words,filter:B==null?void 0:B.filter,bindMenus:B==null?void 0:B.bindMenus,isMainPath:B==null?void 0:B.isMainPath,required:(B==null?void 0:B.required)??!1,relatedContents:B==null?void 0:B.relatedContents,mainKey:B==null?void 0:B.mainKey,relatedContents:B==null?void 0:B.relatedContents,functionName:B==null?void 0:B.functionName,functionRelatedWords:B==null?void 0:B.functionRelatedWords,calculatorFilter:B==null?void 0:B.calculatorFilter})}),d===""||!d||(Ma.value=(d==null?void 0:d.id)??"");let T=ve.getColumnChild((ne=O.cloneDeep(oe.value))==null?void 0:ne.filter(B=>(B==null?void 0:B.label)!=="操作"));ta.value&&((W=ta.value)==null?void 0:W.length)>0&&(ta.value=(ke=O.cloneDeep(ta).value)==null?void 0:ke.map(B=>{var Re;let J=(B==null?void 0:B.prop)||((Re=T==null?void 0:T.find(ra=>(ra==null?void 0:ra.label)===(B==null?void 0:B.label)))==null?void 0:Re.prop);return J&&(B.value=d[J]),B})),Ra.value=ta.value&&((Ae=ta.value)==null?void 0:Ae.length)>0?ve.getTableFormToForm(ta.value):h,Ra.value=((je=Ra.value)==null?void 0:je.map(B=>({...B,disabled:(B==null?void 0:B.prop)==="disabled"?!0:B==null?void 0:B.disabled})))??Ra.value;let A=[],R=((xa=(Ge=($e=c.itemData)==null?void 0:$e.filter(B=>(B==null?void 0:B.key)==="filter"))==null?void 0:Ge[0])==null?void 0:xa.contents)??"";if(R=ve.analyzeSplitToContent(R,","),(R==null?void 0:R.length)>0&&(A=R.flat()),(A==null?void 0:A.length)>0){let B=A==null?void 0:A.filter(sa=>sa==null?void 0:sa.includes("@Type"));if(B=B==null?void 0:B[(B==null?void 0:B.length)-1],(B==null?void 0:B[(B==null?void 0:B.length)-1])===","&&(B=B==null?void 0:B.slice(0,(B==null?void 0:B.length)-1)),B){let sa=(Ba=(Ia=B==null?void 0:B.replace("=",S))==null?void 0:Ia.split(S))==null?void 0:Ba[1];((Ye=sa==null?void 0:sa.trim())==null?void 0:Ye.toUpperCase())==="MANUAL"&&(c==null||c.index,Ra.value=(Za=Ra.value)==null?void 0:Za.map((Ca,rl)=>Ca))}let J=(ga=Ra.value)==null?void 0:ga.filter(sa=>sa==null?void 0:sa.mainKey),Re;J==null||J.forEach(sa=>{var rl;if(Re!==void 0)return;let Ca=sa==null?void 0:sa.menus;((rl=J==null?void 0:J.filter(Ka=>Ka==null?void 0:Ka.mainKey))==null?void 0:rl.length)>1&&(Re=Ca,sa==null||sa.groups)});let ra=[],_e=new Map;if(J==null||J.forEach(sa=>{var Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol,Ga,tl,xl;if((Ca=sa==null?void 0:sa.prop)!=null&&Ca.includes(".")){let El=[];_e.get(((Ka=(rl=sa==null?void 0:sa.prop)==null?void 0:rl.split("."))==null?void 0:Ka[0])+(sa!=null&&sa.isMainPath?0:1)+((sl=sa==null?void 0:sa.groups)==null?void 0:sl[0]))&&(El=_e.get(((Pl=(ul=sa==null?void 0:sa.prop)==null?void 0:ul.split("."))==null?void 0:Pl[0])+(sa!=null&&sa.isMainPath?0:1)+((qa=sa==null?void 0:sa.groups)==null?void 0:qa[0]))),El.push(sa),_e.set(((Ha=(hl=sa==null?void 0:sa.prop)==null?void 0:hl.split("."))==null?void 0:Ha[0])+(sa!=null&&sa.isMainPath?0:1)+((ol=sa==null?void 0:sa.groups)==null?void 0:ol[0]),El)}else{let El=[];_e.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((Ga=sa==null?void 0:sa.groups)==null?void 0:Ga[0]))&&(El=_e.get("normal"+(sa!=null&&sa.isMainPath?0:1)+((tl=sa==null?void 0:sa.groups)==null?void 0:tl[0]))),El.push(sa),_e.set("normal"+(sa!=null&&sa.isMainPath?0:1)+((xl=sa==null?void 0:sa.groups)==null?void 0:xl[0]),El)}}),ra=Array.from(_e.values()),(ra==null?void 0:ra.length)>0)for(let sa in ra){let Ca=ra==null?void 0:ra[sa];if((Ca==null?void 0:Ca.length)!==1){if((Ca==null?void 0:Ca.length)>1){let rl=Ca==null?void 0:Ca.map(ol=>ol==null?void 0:ol.prop),Ka=Ca==null?void 0:Ca.map(ol=>ol==null?void 0:ol.label),sl=Ca==null?void 0:Ca.map(ol=>ol==null?void 0:ol.value),ul=(Qa=O.cloneDeep(Ca))==null?void 0:Qa[0],Pl=(xe=Ra.value)==null?void 0:xe.findIndex(ol=>(ol==null?void 0:ol.prop)===(ul==null?void 0:ul.prop)),qa=($a=Ra.value)==null?void 0:$a.slice(0,Pl),hl=(Ea=Ra.value)==null?void 0:Ea.slice(Pl,(fa=Ra.value)==null?void 0:fa.length);ul.label=Ka==null?void 0:Ka.join("·"),ul.value=sl==null?void 0:sl.join(" "),ul.value.trim()===""&&(ul.value=""),ul.prop=rl==null?void 0:rl.join("·");let Ha=Ca==null?void 0:Ca.map(ol=>{var Ga;return(Ga=ol==null?void 0:ol.words)==null?void 0:Ga.join(".")});ul.relatedWords=Ha,ul.usingType="parent",hl.unshift(ul),Ra.value=[...qa,...hl],Ra.value=(Sa=Ra.value)==null?void 0:Sa.map(ol=>(rl!=null&&rl.find(Ga=>Ga===(ol==null?void 0:ol.prop))&&(ol.isFormColHidden=!0,ol.relatedWords=Ha),ol))}}}}},du=()=>{var h;const d=(h=t.value)==null?void 0:h.$el;d&&Cl.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:T=>{var re;const{oldIndex:A,newIndex:R}=T;if(A===R)return;const D=Cn.value.splice(A,1)[0];Cn.value.splice(R,0,D),oe.value=(re=oe.value)==null?void 0:re.slice().sort((ne,W)=>{if(ne.label==="操作")return 1;if(W.label==="操作")return-1;const ke=Cn.value.findIndex(je=>je.label===ne.label),Ae=Cn.value.findIndex(je=>je.label===W.label);return ke-Ae})}})};e.onMounted(()=>{na.value=window.innerWidth-240*2,window.addEventListener("keydown",Xi)});const pu=()=>{e.nextTick(()=>{du()})},ot=(d,h)=>{var A;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let T;return d.children=(A=d.children)==null?void 0:A.map(R=>{var D,re;if((R==null?void 0:R.id)===Ma.value){let ne={};for(let W in R){let ke=(D=h==null?void 0:h.find(Ae=>(Ae==null?void 0:Ae.prop)===W))==null?void 0:D.label;ke?ne[W]=(re=nr.value)==null?void 0:re[ke]:ne[W]=R[W]??""}R=Object.assign(ne,nr.value),T=R}else{let ne=ot(R,h);R=ne==null?void 0:ne.contents,T=ne==null?void 0:ne.currentSelectContents}return R}),{contents:d,currentSelectContents:T}},It=(d,h)=>{let T,A;return d!=null&&d.find(R=>(R==null?void 0:R.id)===Ma.value)?T=d==null?void 0:d.map(R=>{var D,re,ne;if((R==null?void 0:R.id)===Ma.value){let W={};for(let Ae in R){let je=(D=h==null?void 0:h.find($e=>($e==null?void 0:$e.prop)===Ae))==null?void 0:D.label;je?W[Ae]=((re=nr.value)==null?void 0:re[je])??"":W[Ae]=R[Ae]??""}let ke=nr.value;for(let Ae in W)(ne=nr.value)!=null&&ne[Ae]||(ke[Ae]=(W==null?void 0:W[Ae])??"");R=ke,A=R}return R}):T=d==null?void 0:d.map(R=>{var D,re,ne,W;if((R==null?void 0:R.id)===Ma.value){let ke={};for(let Ae in R){let je=(D=h==null?void 0:h.find($e=>($e==null?void 0:$e.prop)===Ae))==null?void 0:D.label;je?ke[Ae]=(re=nr.value)==null?void 0:re[je]:ke[Ae]=R[Ae]??""}R=Object.assign(ke,nr.value),A=R}else R=(ne=ot(R,h))==null?void 0:ne.contents,A=(W=ot(R,h))==null?void 0:W.currentSelectContents;return R}),{newContents:T,currentSelectContents:A}},Ot=(d,h,T)=>{var A,R;return d[h==null?void 0:h.prop]=T,typeof d.id=="number"&&(d.id=(A=d.id)==null?void 0:A.toString()),d.children&&((R=d.children)==null?void 0:R.length)>0&&(d.children=d.children.map(Ot)),d},Lt=d=>{var T;const h=[];return h.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((T=d.children)==null||T.forEach(A=>{h.push(...Lt(A))})),(h==null?void 0:h.length)>0?h==null?void 0:h.map(A=>{const R={...A};return delete R.children,R}):[]},co=["Pacific6000数据采集装置.通道号","通道号"],Li=d=>{if(!d)return"";const h=co.map(T=>d==null?void 0:d[T]).find(T=>T!=null&&String(T).trim()!=="");return h==null?"":String(h).trim()},tt=async(d,h=void 0)=>{if(!d)return!1;try{const T=Ge=>{var xa,Ia,Ba;return Ge?typeof(Ge==null?void 0:Ge.value)=="string"?Ge.value:((Ba=(Ia=(xa=Ge==null?void 0:Ge._custom)==null?void 0:xa.value)==null?void 0:Ia.value)==null?void 0:Ba.value)||"":""},A=Array.isArray(nn.value)?nn.value:[],R=T(A.find(Ge=>(Ge==null?void 0:Ge.condition)==="child")),D=(Ke.value||"").replace(/\/+$/,""),re=R?`${D}/${R}`:D,ne=await Kr(re||Ke.value,!1),W=String(pa.value||"").trim(),ke=Ge=>String(Ge||"").trim(),Ae=(Ge,xa=[],Ia="")=>{if(!Array.isArray(Ge))return xa;for(const Ba of Ge){const Ye=ke((Ba==null?void 0:Ba.choiceName)||(Ba==null?void 0:Ba.name0)||Ia);(Ba==null?void 0:Ba.comp)==="Table"&&(!W||Ye===W)&&xa.push(Ba),Array.isArray(Ba==null?void 0:Ba.children)&&Ae(Ba.children,xa,Ye),Array.isArray(Ba==null?void 0:Ba.tab)&&Ae(Ba.tab,xa,Ye),Array.isArray(Ba==null?void 0:Ba.choice)&&Ae(Ba.choice,xa,Ye)}return xa},je=Ae(ne||[]),$e=String((c==null?void 0:c.compName)||"");return je.some(Ge=>{var Ia,Ba;const xa=((Ba=(Ia=Ge==null?void 0:Ge.compData)==null?void 0:Ia.find(Ye=>(Ye==null?void 0:Ye.key)==="tableContents"))==null?void 0:Ba.contents)||[];return!Array.isArray(xa)||xa.length===0?!1:xa.some(Ye=>{if(String((Ge==null?void 0:Ge.name)||"")===$e&&(Ye==null?void 0:Ye.id)===h)return!1;const ga=Li(Ye);return!!ga&&ga===d})})}catch{return(Ce.value||[]).some(A=>{if((A==null?void 0:A.id)===h)return!1;const R=Li(A);return!!R&&R===d})}},$i=async(d=!0,h,T)=>{var ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za,ga,Qa,xe,$a,fa,Ea,Sa,B,J,Re,ra,_e,sa,Ca,rl,Ka,sl,ul,Pl,qa,hl;if(nr.value){const Ha=(Ae=ve.getColumnChild((ke=O.cloneDeep(oe.value))==null?void 0:ke.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")))==null?void 0:Ae.filter(Ga=>(Ga==null?void 0:Ga.required)===!0);for(let Ga=0;Ga<((Ha==null?void 0:Ha.length)??0);Ga++){const tl=Ha[Ga],xl=tl==null?void 0:tl.prop,El=(tl==null?void 0:tl.label)??xl,xr=(je=nr.value)==null?void 0:je[xl];if(xr===""||xr===null||xr===void 0||Array.isArray(xr)&&xr.length===0){Wa.ElMessage.error(`${El}不能为空`);return}}const ol=Li(nr.value);if(ol&&await tt(ol,Ma.value||void 0)){Wa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let A=ve.getColumnChild(($e=O.cloneDeep(oe.value))==null?void 0:$e.filter(Ha=>(Ha==null?void 0:Ha.label)!=="操作")),R,D=O.cloneDeep(Ce.value);if(!nr.value){H.value=!1;return}if(Ma.value===""){Ze.value++;let Ha;Ha={id:Ze.value.toString()};try{Ha.sort=On(0,Ce.value||[])}catch{}Ha!=null&&Ha.children&&(Ha={...Ha,children:(Ge=Ha.children)==null?void 0:Ge.map(Ga=>Ot(Ga,h,T))});const ol=Object.assign(nr.value,Ha);D.unshift(ol),R=ol}else D=(xa=It(D,A))==null?void 0:xa.newContents,R=(Ia=It(D,A))==null?void 0:Ia.currentSelectContents;const re=(Ba=c.itemData)==null?void 0:Ba.filter(Ha=>(Ha==null?void 0:Ha.key)==="childTree")[0];if(((Ye=re==null?void 0:re.contents)==null?void 0:Ye.length)>0){ce.value="编辑";const Ha=[];D==null||D.forEach((tl,xl)=>{var xr;let El={};if(Array.isArray(tl)){let Ll=[];tl==null||tl.filter(yl=>!(yl!=null&&yl.id)).forEach((yl,Nl)=>{var Ql,Dl,Jl,ir,Kl,fr,Ur;if((Dl=(Ql=zr.value)==null?void 0:Ql[Nl])!=null&&Dl.prop&&!Array.isArray(yl)){let hr={};hr[zr.value[Nl].column]=yl,za!=null&&za.value&&((Jl=za==null?void 0:za.value)==null?void 0:Jl.length)>0&&((ir=za==null?void 0:za.value)!=null&&ir.find(ur=>JSON.stringify(ur==null?void 0:ur[0])===JSON.stringify(hr)))&&(Ll=(Kl=za==null?void 0:za.value)==null?void 0:Kl.find(ur=>JSON.stringify(ur==null?void 0:ur[0])===JSON.stringify(hr))),Ll&&Ll.length>0?El[zr.value[Nl].prop]=Ll!=null&&Ll.find(ur=>{var dr;return((dr=Object.keys(ur))==null?void 0:dr[0])===zr.value[Nl].column})?(fr=Ll==null?void 0:Ll.find(ur=>{var dr;return((dr=Object.keys(ur))==null?void 0:dr[0])===zr.value[Nl].column}))==null?void 0:fr[zr.value[Nl].column]:yl:El[zr.value[Nl].prop]=yl}else Array.isArray(yl)&&((Ur=zr.value[Nl])!=null&&Ur.prop?El[zr.value[Nl].prop]=yl:El.children=bt(yl,zr.value))})}else El=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;Ha.push(Object.assign(El,{id:no(Ll)}))}else El.id?Ha.push(El):Ha.push(Object.assign(El,{id:xl.toString()}))});const ol=(Ce.value||[]).map(tl=>String(tl==null?void 0:tl.id)),Ga=io(Ha,ol);Ce.value=Ft(Ga,re,oe.value)}Rt(Ce.value),Gr.value=Ce.value;const ne=If(Gr.value,mn.value,D);let W=[];if(F.value?(W=(Za=O.cloneDeep(F).value.singleContent)==null?void 0:Za.filter(Ha=>(Ha==null?void 0:Ha.id)!==(R==null?void 0:R.id)),W.push(R)):W=[R],Bl.value){const Ha={content:ne,singleContent:((ga=re==null?void 0:re.contents)==null?void 0:ga.length)>0?W==null?void 0:W.flatMap(Lt):W,index:c==null?void 0:c.index,buttonName:"编辑",column:oe.value,parentTableId:c==null?void 0:c.parentTableId};Fe.setCacheUpdatingData(Ha)}if((Qa=oe.value)==null||Qa.forEach(Ha=>{(Ha==null?void 0:Ha.formType)==="Upload"&&(R[Ha.prop]=R[Ha.prop]===""?"{}":typeof R[Ha.prop]!="string"?JSON.stringify(R[Ha.prop]):R[Ha.prop])}),d){(Ea=(fa=($a=(xe=c.itemData)==null?void 0:xe.find(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType"))==null?void 0:$a.value)==null?void 0:fa.find(Ga=>(Ga==null?void 0:Ga.value)==="onConditionContents"))==null||Ea.content;let Ha=(Sa=c.itemData)==null?void 0:Sa.filter(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType");Ha=Array.from(new Map(Ha.filter(Boolean).map((Ga,tl)=>[Ga.value,{...Ga,_idx:tl}])).values()).sort((Ga,tl)=>Ga._idx-tl._idx).map(({_idx:Ga,...tl})=>tl),Ha=(B=Ha==null?void 0:Ha[(Ha==null?void 0:Ha.length)-1])==null?void 0:B.value;const ol={fixContent:[R],buttonName:ce.value,relatedContents:c==null?void 0:c.related,columns:oe.value,name:c==null?void 0:c.groupNames};Fe.setTableLoading(c==null?void 0:c.index),H.value=!1,nr.value=void 0,Se("change",ol)}if((ra=(Re=(J=Ra.value)==null?void 0:J[0])==null?void 0:Re.optionUrl)!=null&&ra.menuId){H.value=!1;let Ha=(_e=c.itemData)==null?void 0:_e.filter(ol=>(ol==null?void 0:ol.key)==="filterAllType");if((Ha==null?void 0:Ha.length)>0){let ol=Ha==null?void 0:Ha.map(xl=>xl==null?void 0:xl.value),Ga=(rl=(Ca=(sa=ol.flat().find(xl=>{var El;return(El=xl==null?void 0:xl.content)==null?void 0:El.includes("@Num")}))==null?void 0:sa.content)==null?void 0:Ca.split(":"))==null?void 0:rl[1];((ul=(sl=(Ka=ol.flat().find(xl=>{var El;return(El=xl==null?void 0:xl.content)==null?void 0:El.includes("@Type:")}))==null?void 0:Ka.content)==null?void 0:sl.split(":"))==null?void 0:ul[1])!=="Manual"&&(Ga=parseInt(Ga),Ce.value=(hl=Ce.value)==null?void 0:hl.slice(((Pl=Ce.value)==null?void 0:Pl.length)-Ga,(qa=Ce.value)==null?void 0:qa.length))}}};e.onUnmounted(()=>{window.removeEventListener("keydown",Xi),oe.value=[],Ce.value=[],te.value=[],ca.value=[],ta.value=[],_a.value=[],Pa.value=[],va.value=[],Ra.value=[],cr.value=[],t.value=null,zn.value=""});const uo=async(d,h,T)=>{var Ge,xa,Ia,Ba,Ye,Za,ga,Qa,xe,$a,fa,Ea,Sa;jl.value=(T==null?void 0:T.prop)??(T==null?void 0:T.property);const A=O.cloneDeep(c.itemData),R=((Ge=A==null?void 0:A.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:Ge.contents)??[];let D=R==null?void 0:R.find((B,J)=>{var Re,ra,_e;return(B==null?void 0:B.prop)===jl.value||(B==null?void 0:B.label)===jl.value||(J==null?void 0:J.toString())===((_e=(ra=(Re=jl.value)==null?void 0:Re.split("a"))==null?void 0:ra[1])==null?void 0:_e.toString())});const re=ve.getColumnChild((xa=O.cloneDeep(oe.value))==null?void 0:xa.filter(B=>(B==null?void 0:B.label)!=="操作"));if(D||(D=re==null?void 0:re.find(B=>(B==null?void 0:B.prop)===jl.value||(B==null?void 0:B.label)===jl.value)),D&&!((Ia=D==null?void 0:D.menus)!=null&&Ia.length)&&!((Ba=D==null?void 0:D.groups)!=null&&Ba.length)&&!((Ye=D==null?void 0:D.words)!=null&&Ye.length)){const B=(Za=Ra.value)==null?void 0:Za.find(J=>(J==null?void 0:J.prop)===jl.value);B&&(D={...D,menus:(B==null?void 0:B.menus)??(D==null?void 0:D.menus),groups:(B==null?void 0:B.groups)??(D==null?void 0:D.groups),words:(B==null?void 0:B.words)??(D==null?void 0:D.words),bindMenus:(B==null?void 0:B.bindMenus)??(D==null?void 0:D.bindMenus),isMainPath:(B==null?void 0:B.isMainPath)??(D==null?void 0:D.isMainPath),relatedContents:(B==null?void 0:B.relatedContents)??(D==null?void 0:D.relatedContents),endChildMenu:(B==null?void 0:B.endChildMenu)??(D==null?void 0:D.endChildMenu)})}if(D&&((ga=Ra==null?void 0:Ra.value)==null||ga.forEach(B=>{var J,Re,ra,_e,sa;(B==null?void 0:B.prop)===(D==null?void 0:D.prop)&&(B!=null&&B.endChildMenu)&&((J=D==null?void 0:D.prop)!=null&&J.includes(".")&&((ra=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:ra[0])!==((sa=(_e=B==null?void 0:B.prop)==null?void 0:_e.split("."))==null?void 0:sa[0])?D.endChildMenu=B==null?void 0:B.value:D.endChildMenu=B==null?void 0:B.endChildMenu)})),!D)return;const ne=jl.value,W=(Qa=Ce.value)==null?void 0:Qa.findIndex(B=>(B==null?void 0:B.id)===(h==null?void 0:h.id));W!==-1&&ne&&(Ce.value[W]={...Ce.value[W],[ne]:d});const ke=B=>{Array.isArray(B)&&B.forEach(J=>{Array.isArray(J==null?void 0:J.allSelectionContents)&&J.allSelectionContents.length>0&&(J.contactValue=Ce.value[W]??h),Array.isArray(J==null?void 0:J.children)&&J.children.length>0&&ke(J.children)})};ke(oe.value),D.value=d,D.endChildMenu=D.endChildMenu||"";let Ae=D!=null&&D.isMainPath&&(D!=null&&D.mainKey)?D==null?void 0:D.value:"";const je=B=>{Array.isArray(B)&&B.forEach(J=>{var ra,_e;if(((J==null?void 0:J.type)==="Select"||(J==null?void 0:J.formType)&&J.formType.toUpperCase()==="SELECT"||(J==null?void 0:J.columnType)&&J.columnType.toUpperCase()==="SELECT")&&Array.isArray(J==null?void 0:J.menus)&&J.menus.length>0&&J.menus[J.menus.length-1]===""&&(D!=null&&D.isMainPath)&&(D!=null&&D.mainKey)){const sa=(ra=J==null?void 0:J.prop)!=null&&ra.includes(".")?J.prop.split(".")[0]:null,Ca=(_e=D==null?void 0:D.prop)!=null&&_e.includes(".")?D.prop.split(".")[0]:null;(!sa||!Ca||sa===Ca)&&(J.endChildMenu=Ae)}Array.isArray(J==null?void 0:J.children)&&J.children.length>0&&je(J.children)})};if(je(oe.value),!!(D!=null&&D.mainKey)&&Array.isArray(D==null?void 0:D.menus)&&(D==null?void 0:D.menus.length)>0&&(D!=null&&D.value)&&(D==null?void 0:D.value)!==""){let B=D!=null&&D.relatedContents&&((xe=D==null?void 0:D.relatedContents)==null?void 0:xe.length)>0?($a=D==null?void 0:D.relatedContents)==null?void 0:$a.find(J=>{var Re,ra,_e,sa;return(J==null?void 0:J[(sa=(Re=D==null?void 0:D.prop)==null?void 0:Re.split("."))==null?void 0:sa[((_e=(ra=D==null?void 0:D.prop)==null?void 0:ra.split("."))==null?void 0:_e.length)-1]])===(D==null?void 0:D.value)}):await ds(D);if(B){const J={...h};re==null||re.forEach(Re=>{var ra,_e,sa,Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol,Ga,tl,xl;(Re==null?void 0:Re.prop)!==(D==null?void 0:D.prop)&&(D!=null&&D.relatedContents&&((ra=D==null?void 0:D.relatedContents)==null?void 0:ra.length)>0?(_e=Re==null?void 0:Re.prop)!=null&&_e.includes(".")&&((Ca=(sa=Re==null?void 0:Re.prop)==null?void 0:sa.split("."))==null?void 0:Ca[0])===((Ka=(rl=D==null?void 0:D.prop)==null?void 0:rl.split("."))==null?void 0:Ka[0])?J[Re.prop]=B[(qa=(sl=Re==null?void 0:Re.prop)==null?void 0:sl.split("."))==null?void 0:qa[((Pl=(ul=Re==null?void 0:Re.prop)==null?void 0:ul.split("."))==null?void 0:Pl.length)-1]]??J[Re.prop]:J[Re.prop]=(B==null?void 0:B[Re.prop])??J[Re.prop]:ve.same((D==null?void 0:D.menus)??[],(Re==null?void 0:Re.menus)??[])&&ve.same((D==null?void 0:D.groups)??[],(Re==null?void 0:Re.groups)??[])&&!ve.same((D==null?void 0:D.words)??[],(Re==null?void 0:Re.words)??[])?(hl=Re==null?void 0:Re.prop)!=null&&hl.includes(".")&&((ol=(Ha=Re==null?void 0:Re.prop)==null?void 0:Ha.split("."))==null?void 0:ol[0])!==((tl=(Ga=D==null?void 0:D.prop)==null?void 0:Ga.split("."))==null?void 0:tl[0])||(J[Re.prop]=(B==null?void 0:B[(xl=Re==null?void 0:Re.words)==null?void 0:xl.join(".")])??(B==null?void 0:B[Re.prop])??J[Re.prop]):(!(Re!=null&&Re.isMainPath)&&ve.same((D==null?void 0:D.bindMenus)??[],(Re==null?void 0:Re.bindMenus)??[]),J[Re.prop]=(B==null?void 0:B[Re.prop])??J[Re.prop]))}),Ce.value=(fa=O.cloneDeep(Ce.value))==null?void 0:fa.map(Re=>(Re==null?void 0:Re.id)===(h==null?void 0:h.id)?{...J,id:Re==null?void 0:Re.id}:Re)}}if((Ea=D==null?void 0:D.optionUrl)!=null&&Ea.menuSelect){let B="";re==null||re.forEach(ra=>{var _e,sa,Ca,rl,Ka;B===""&&((Ca=(sa=(_e=ra==null?void 0:ra.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:sa[1])!=null&&Ca.includes("["))&&(B=(Ka=(rl=ra==null?void 0:ra.optionUrl)==null?void 0:rl.groupSelect)==null?void 0:Ka[1])});let J=await kt(D),Re;if(J==null||J.forEach(ra=>{var _e,sa,Ca,rl,Ka,sl,ul,Pl,qa,hl;B===((sa=(_e=D==null?void 0:D.optionUrl)==null?void 0:_e.groupSelect)==null?void 0:sa[1])&&((Ka=(rl=(Ca=D==null?void 0:D.optionUrl)==null?void 0:Ca.groupSelect)==null?void 0:rl[1])!=null&&Ka.includes("["))&&((hl=O.cloneDeep(ra))==null?void 0:hl[(qa=(Pl=(ul=(sl=D==null?void 0:D.optionUrl)==null?void 0:sl.groupSelect)==null?void 0:ul[1])==null?void 0:Pl.replaceAll("[",""))==null?void 0:qa.replaceAll("]","")])===(D==null?void 0:D.value)&&(Re=ra)}),Re){const ra={...h};re==null||re.forEach(_e=>{var sa,Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol;(Re!=null&&Re[_e==null?void 0:_e.label]||Re!=null&&Re[(Ka=(rl=(Ca=(sa=_e==null?void 0:_e.optionUrl)==null?void 0:sa.groupSelect)==null?void 0:Ca[1])==null?void 0:rl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])&&((Pl=(ul=(sl=_e==null?void 0:_e.optionUrl)==null?void 0:sl.groupSelect)==null?void 0:ul[1])!=null&&Pl.includes("["))&&(ra[_e.prop]=(Re==null?void 0:Re[_e==null?void 0:_e.label])||(Re==null?void 0:Re[(ol=(Ha=(hl=(qa=_e==null?void 0:_e.optionUrl)==null?void 0:qa.groupSelect)==null?void 0:hl[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:ol.replaceAll("]","")]))}),Ce.value=(Sa=O.cloneDeep(Ce.value))==null?void 0:Sa.map(_e=>(_e==null?void 0:_e.id)===(h==null?void 0:h.id)?{...ra,id:_e==null?void 0:_e.id}:_e)}}},fu=async d=>{var Ge,xa,Ia,Ba,Ye,Za,ga,Qa,xe,$a,fa,Ea,Sa,B;if(!d)return;const h=O.cloneDeep(nr.value||{});nr.value=d;const T=Li(h),A=Li(nr.value);if(A&&A!==T&&await tt(A,Ma.value||void 0)){Wa.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),co.forEach(Re=>{if(Object.prototype.hasOwnProperty.call(nr.value||{},Re)||Object.prototype.hasOwnProperty.call(h||{},Re)){const ra=(h==null?void 0:h[Re])??"";nr.value[Re]=ra,d[Re]=ra}}),Ra.value=(Ra.value||[]).map(Re=>{if(!(Re!=null&&Re.prop)||!co.includes(Re.prop))return Re;const ra=(h==null?void 0:h[Re.prop])??"";return{...Re,value:ra,selectValue:ra===""?[]:[ra]}});return}let R=O.cloneDeep(c.itemData);R==null||R.map(J=>{var Re,ra,_e,sa;return(J==null?void 0:J.key)==="header"&&(Array.isArray((Re=J.contents)==null?void 0:Re[0])?J.contents=(_e=ve.getColumnChild((ra=J.contents)==null?void 0:ra[0]))==null?void 0:_e.map((Ca,rl)=>{var Ka,sl,ul,Pl,qa,hl;return((ul=(sl=(Ka=Ra.value)==null?void 0:Ka.find(Ha=>(Ha==null?void 0:Ha.prop)===(Ca==null?void 0:Ca.prop)))==null?void 0:sl.optionUrl)==null?void 0:ul.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[rl])?Ca.value=[(qa=Object.values(d))==null?void 0:qa[rl]]:Ca.value=(hl=Object.values(d))==null?void 0:hl[rl],Ca}):J.contents=(sa=J.contents)==null?void 0:sa.map((Ca,rl)=>{var Ka,sl,ul,Pl,qa,hl;return((ul=(sl=(Ka=Ra.value)==null?void 0:Ka.find(Ha=>(Ha==null?void 0:Ha.prop)===(Ca==null?void 0:Ca.prop)))==null?void 0:sl.optionUrl)==null?void 0:ul.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[rl])?Ca.value=[(qa=Object.values(d))==null?void 0:qa[rl]]:Ca.value=(hl=Object.values(d))==null?void 0:hl[rl],Ca})),J});let D=Ra.value,re=(Ge=R==null?void 0:R.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Ge.contents;if(jl.value||(D=D==null?void 0:D.map(J=>{var Re;return J.value=J.value??((Re=re==null?void 0:re.find((ra,_e)=>(ra==null?void 0:ra.prop)===(J==null?void 0:J.name)))==null?void 0:Re.value),J})),!Rr.value)return;let ne=O.cloneDeep(jl.value);(xa=jl.value)!=null&&xa.includes("·")&&(jl.value=(Ba=(Ia=jl.value)==null?void 0:Ia.split("·"))==null?void 0:Ba[0]);let W=(Za=(Ye=R==null?void 0:R.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:Ye.contents)==null?void 0:Za.find((J,Re)=>(J==null?void 0:J.prop)===jl.value);(ga=Ra==null?void 0:Ra.value)==null||ga.forEach(J=>{var Re,ra,_e,sa,Ca,rl,Ka,sl,ul;(J==null?void 0:J.prop)===(W==null?void 0:W.prop)&&(J!=null&&J.endChildMenu)&&((Re=W==null?void 0:W.prop)!=null&&Re.includes(".")&&((_e=(ra=W==null?void 0:W.prop)==null?void 0:ra.split("."))==null?void 0:_e[0])!==((Ca=(sa=J==null?void 0:J.prop)==null?void 0:sa.split("."))==null?void 0:Ca[0])?W.endChildMenu=(Ka=(rl=J==null?void 0:J.value)==null?void 0:rl.split(" "))==null?void 0:Ka[0]:W.endChildMenu=(ul=(sl=J==null?void 0:J.endChildMenu)==null?void 0:sl.split(" "))==null?void 0:ul[0])});let ke=W!=null&&W.isMainPath&&(W!=null&&W.mainKey)?W==null?void 0:W.value:"",Ae=D,je=pe.value;if(je!=null&&je.find(J=>(W==null?void 0:W.prop)===(J==null?void 0:J.key))&&(je=je==null?void 0:je.filter(J=>(W==null?void 0:W.prop)!==(J==null?void 0:J.key))),je!=null&&je.find(J=>ne===(J==null?void 0:J.key))&&(je=je==null?void 0:je.filter(J=>ne!==(J==null?void 0:J.key))),(W==null?void 0:W.formType)==="Select"?Ae=Ae==null?void 0:Ae.map(J=>{var Re,ra,_e,sa,Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol,Ga,tl;return(J==null?void 0:J.type)==="Select"&&(((Re=J==null?void 0:J.allSelectionContents)==null?void 0:Re.length)>0&&(J.contactValue=d),((W==null?void 0:W.prop)===(J==null?void 0:J.prop)||ne===(J==null?void 0:J.prop))&&W&&(Array.isArray(W.value)&&((ra=W.value)==null?void 0:ra.length)>0&&((_e=W.value)!=null&&_e.every(xl=>typeof xl=="string"))?(je.push({key:J==null?void 0:J.prop,value:[(Ca=W.value)==null?void 0:Ca[((sa=W.value)==null?void 0:sa.length)-1]]}),J.selectValue=(rl=je==null?void 0:je.find(xl=>(xl==null?void 0:xl.key)===(J==null?void 0:J.prop)))==null?void 0:rl.value):Array.isArray(W.value)&&((Ka=W.value)==null?void 0:Ka.length)===0?(je=[],J.selectValue=[],d[J==null?void 0:J.prop]=""):Array.isArray(J.value)&&je.push({key:J==null?void 0:J.prop,value:[(sl=J.value)==null?void 0:sl[(J==null?void 0:J.length)-1]]})),((Pl=J==null?void 0:J.menus)==null?void 0:Pl[((ul=J==null?void 0:J.menus)==null?void 0:ul.length)-1])===""&&(W!=null&&W.isMainPath)&&(W!=null&&W.mainKey)&&((qa=J==null?void 0:J.prop)!=null&&qa.includes(".")&&((Ha=(hl=J==null?void 0:J.prop)==null?void 0:hl.split("."))==null?void 0:Ha[0])!==((Ga=(ol=W==null?void 0:W.prop)==null?void 0:ol.split("."))==null?void 0:Ga[0])||(J.endChildMenu=(tl=ke==null?void 0:ke.split(" "))==null?void 0:tl[0]))),J.value=(d==null?void 0:d[J==null?void 0:J.prop])??(J==null?void 0:J.value),J}):(W==null?void 0:W.formType)!=="Input"&&(Ae=Ae==null?void 0:Ae.map(J=>(J.value=(d==null?void 0:d[J==null?void 0:J.prop])??(J==null?void 0:J.value),J))),pe.value=je,Ae!=null&&Ae.some(J=>(J==null?void 0:J.functionName)&&(J==null?void 0:J.functionName)!=="")){let J=await gt([d],oe==null?void 0:oe.value,"Auto",Ce.value),Re=[];(Qa=Ae==null?void 0:Ae.filter(_e=>(_e==null?void 0:_e.functionName)&&(_e==null?void 0:_e.functionName)!==""))==null||Qa.forEach(_e=>{var sa;((sa=_e==null?void 0:_e.functionRelatedWords)==null?void 0:sa.length)>0&&(Re=[...Re,..._e==null?void 0:_e.functionRelatedWords])}),Re=Re==null?void 0:Re.filter(_e=>(_e==null?void 0:_e[0])!=="@");let ra=[];for(let _e in J==null?void 0:J[0])Re!=null&&Re.find(sa=>_e===sa||(_e==null?void 0:_e.includes("."+sa)))&&ra.push(((xe=J==null?void 0:J[0])==null?void 0:xe[_e])!=="");(J==null?void 0:J.length)>0&&ra.every(_e=>_e)&&(Ae=Ae==null?void 0:Ae.map(_e=>{var sa;return _e.value=((sa=J==null?void 0:J[0])==null?void 0:sa[_e==null?void 0:_e.prop])??_e.value,_e})),nr.value=J==null?void 0:J[0]}if(Ra.value=Ae,W=Object.assign({},W??{},{relatedWords:(fa=($a=Ra==null?void 0:Ra.value)==null?void 0:$a.find(J=>(J==null?void 0:J.prop)===(W==null?void 0:W.prop)))==null?void 0:fa.relatedWords}),(W==null?void 0:W.mainKey)&&(W!=null&&W.value)&&(W==null?void 0:W.value)!==""){let J=W!=null&&W.relatedContents&&((Ea=W==null?void 0:W.relatedContents)==null?void 0:Ea.length)>0?(Sa=W==null?void 0:W.relatedContents)==null?void 0:Sa.find(Re=>{var ra,_e,sa,Ca;return(Re==null?void 0:Re[(Ca=(ra=W==null?void 0:W.prop)==null?void 0:ra.split("."))==null?void 0:Ca[((sa=(_e=W==null?void 0:W.prop)==null?void 0:_e.split("."))==null?void 0:sa.length)-1]])===(W==null?void 0:W.value)}):await ds(W);if(J&&JSON.stringify(J)!=="{}"){let Re=Ae;Re=Re==null?void 0:Re.map(_e=>{var sa,Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol,Ga,tl,xl,El,xr,Ll,yl,Nl,Ql,Dl;if((W==null?void 0:W.prop)===(_e==null?void 0:_e.prop))_e.value=(J==null?void 0:J[(sa=_e==null?void 0:_e.words)==null?void 0:sa.join(".")])??(J==null?void 0:J[_e==null?void 0:_e.prop])??J[(sl=(Ca=_e==null?void 0:_e.prop)==null?void 0:Ca.split("."))==null?void 0:sl[((Ka=(rl=_e==null?void 0:_e.prop)==null?void 0:rl.split("."))==null?void 0:Ka.length)-1]];else if(W!=null&&W.relatedContents&&((ul=W==null?void 0:W.relatedContents)==null?void 0:ul.length)>0)_e.value=(Pl=_e==null?void 0:_e.prop)!=null&&Pl.includes(".")&&((hl=(qa=_e==null?void 0:_e.prop)==null?void 0:qa.split("."))==null?void 0:hl[0])===((ol=(Ha=W==null?void 0:W.prop)==null?void 0:Ha.split("."))==null?void 0:ol[0])?J[(El=(Ga=_e==null?void 0:_e.prop)==null?void 0:Ga.split("."))==null?void 0:El[((xl=(tl=_e==null?void 0:_e.prop)==null?void 0:tl.split("."))==null?void 0:xl.length)-1]]:(J==null?void 0:J[_e==null?void 0:_e.prop])??(_e==null?void 0:_e.value);else if(ve.same((W==null?void 0:W.menus)??[],(_e==null?void 0:_e.menus)??[])&&ve.same((W==null?void 0:W.groups)??[],(_e==null?void 0:_e.groups)??[])&&!ve.same((W==null?void 0:W.words)??[],(_e==null?void 0:_e.words)??[]))if((xr=_e==null?void 0:_e.prop)!=null&&xr.includes(".")&&((yl=(Ll=_e==null?void 0:_e.prop)==null?void 0:Ll.split("."))==null?void 0:yl[0])!==((Ql=(Nl=W==null?void 0:W.prop)==null?void 0:Nl.split("."))==null?void 0:Ql[0])){let Jl=Object.keys(J);Jl=Jl==null?void 0:Jl.find(ir=>{var Kl;return ir==null?void 0:ir.includes("."+((Kl=_e==null?void 0:_e.words)==null?void 0:Kl.join(".")))}),_e.value=(J==null?void 0:J[Jl])??(J==null?void 0:J[_e==null?void 0:_e.prop])??_e.value}else{let Jl=Object.keys(J);Jl=Jl==null?void 0:Jl.find(ir=>{var Kl;return ir==null?void 0:ir.includes("."+((Kl=_e==null?void 0:_e.words)==null?void 0:Kl.join(".")))}),_e.value=(J==null?void 0:J[(Dl=_e==null?void 0:_e.words)==null?void 0:Dl.join(".")])??(J==null?void 0:J[Jl])??(J==null?void 0:J[_e==null?void 0:_e.prop])??_e.value}else!(_e!=null&&_e.isMainPath)&&ve.same((W==null?void 0:W.bindMenus)??[],(_e==null?void 0:_e.bindMenus)??[]),_e.value=(J==null?void 0:J[_e==null?void 0:_e.prop])??_e.value;return _e}),Ra.value=Re;let ra={};(B=Ra.value)==null||B.forEach(_e=>{ra[_e.prop]=_e==null?void 0:_e.value}),nr.value=ra}}Rr.value=!0,G.value=!1},hu=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",vu=d=>{var D,re;const h=(re=(D=ta.value)==null?void 0:D.find(ne=>(ne==null?void 0:ne.label)===(d==null?void 0:d.label)))==null?void 0:re.multiple,T=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;Ce.value.forEach(ne=>{const W=ne==null?void 0:ne[T];h&&Co.isString(W)&&(ne[T]=[W]),!h&&!Co.isString(W)&&(ne[T]="")})},$t=(d,h)=>{var T;return h==null||h.forEach(A=>{d[A==null?void 0:A.prop]=A==null?void 0:A.value}),d.children&&((T=d.children)==null?void 0:T.length)>0&&(d.children=d.children.map(A=>$t(A,h))),d},st=d=>{var T,A,R,D,re,ne;Oi("");const h=(T=Ra.value)==null?void 0:T.reduce((W,ke)=>(W[ke.name]=ke.value,W),{});if(((A=Object.keys(h))==null?void 0:A.length)>0){nr.value=h,Ma.value="",Ze.value=(R=Ce.value)==null?void 0:R.length,va.value=(D=Le.value)==null?void 0:D.filter(ke=>(ke==null?void 0:ke.label)!=="新增");const W=(ne=(re=te.value)==null?void 0:re.filter(ke=>(ke==null?void 0:ke.label)!=="操作"))==null?void 0:ne.map(ke=>{var je,$e,Ge;const Ae=($e=(je=ta.value)==null?void 0:je.find(xa=>(xa==null?void 0:xa.label)===(ke==null?void 0:ke.label)))==null?void 0:$e.multiple;return vu(ke),{...ke,contents:(ke==null?void 0:ke.options)??[],optionUrl:ke!=null&&ke.formMenuSelect&&((Ge=ke==null?void 0:ke.formMenuSelect)==null?void 0:Ge.length)>0?{groupSelect:ke==null?void 0:ke.groupSelect,menuSelect:ke==null?void 0:ke.formMenuSelect,selectRelateType:"",type:ke==null?void 0:ke.formType,multiple:Ae}:null}});oe.value=W==null?void 0:W.map(ke=>$t(ke,[{prop:"type",value:"edit"},{prop:"columnType",value:hu(ke==null?void 0:ke.formType)||(ke==null?void 0:ke.columnType)}])),d==="createClick"&&(ce.value="新增",$i(!0))}},vi={START:"开始时间",END:"结束时间",HOURS:"工时"},mu=(d,h)=>Number(Vn.dayjs(h).diff(Vn.dayjs(d),"day",!0).toFixed(1)),Rt=d=>{var D;const h=c.itemData,T=(D=h==null?void 0:h.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:D.contents,A=new Map;return T==null||T.forEach((re,ne)=>{const{label:W}=re;A.set(W,ne)}),!A.has(vi.START)||!A.has(vi.END)||!A.has(vi.HOURS)?d:d==null?void 0:d.map(re=>{const ne=re==null?void 0:re[vi.START],W=re==null?void 0:re[vi.END],ke=mu(ne,W);return ne&&W&&(re[vi.HOURS]=`${ke}天`),re})},Vt=(d,h,T=0)=>{if(T>((h==null?void 0:h.length)??""))return d;const A=h==null?void 0:h[T],R=new Map;for(const re of d){const ne=re[A];R.has(ne)||R.set(ne,[]),R.get(ne)&&R.get(ne).push(re)}const D=[];for(const[re,ne]of R){const[W,...ke]=ne,Ae={...W};T+1===((h==null?void 0:h.length)??"")?Ae.children=ne==null?void 0:ne.map(je=>(je.level=O.cloneDeep(T)+1,je)).filter((je,$e)=>$e!==0):ke.length>0&&(Ae.children=Vt(ke,h,T+1)),Ae.level=T,D.push(Ae)}return D},Ft=(d,h,T)=>{var R;if(!(h!=null&&h.contents)||((R=h==null?void 0:h.contents)==null?void 0:R.length)===0)return d;let A=[];return A=Vt(d,h==null?void 0:h.contents,0),A},Pt=async(d,h)=>{var Ba,Ye,Za,ga,Qa,xe,$a,fa,Ea,Sa,B,J,Re,ra,_e,sa,Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol,Ga,tl,xl,El,xr,Ll,yl,Nl,Ql,Dl,Jl,ir,Kl,fr,Ur,hr,ur,dr,Ht,Ut,qt;const T=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="header");d==null||d.filter(da=>(da==null?void 0:da.key)==="tableIndexColumn")[0];const A=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="childTree")[0];let R=!0;if((Za=(Ye=(Ba=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="filterAllType"))==null?void 0:Ba.value)==null?void 0:Ye.find(da=>(da==null?void 0:da.value)==="onPamButtonContents"))!=null&&Za.content){let da=(xe=(Qa=(ga=d==null?void 0:d.find(wl=>(wl==null?void 0:wl.key)==="filterAllType"))==null?void 0:ga.value)==null?void 0:Qa.find(wl=>(wl==null?void 0:wl.value)==="onPamButtonContents"))==null?void 0:xe.content;da=($a=da==null?void 0:da.split(":"))==null?void 0:$a[1],da=(fa=da.slice(1,(da==null?void 0:da.length)-1))==null?void 0:fa.split(","),R=!!(da!=null&&da.find(wl=>wl==="操作"))}const D=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="page"),re=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="rowButton"),ne=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="extraButton"),W=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="tableContents"),ke=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="bottomButton"),Ae=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="tableIndex");ta.value=(Sa=(Ea=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="tableToForm"))==null?void 0:Ea[0])==null?void 0:Sa.contents,oa.value=(D==null?void 0:D.contents)??!0;let je=[];ar.value===""?je=T==null?void 0:T[0]:je=(T==null?void 0:T.find(da=>(da==null?void 0:da.selectLabel)==="("+ar.value+")"))??(T==null?void 0:T.find(da=>!(da!=null&&da.selectLabel)));let $e=[];ar.value===""?$e=Ae==null?void 0:Ae[0]:$e=(Ae==null?void 0:Ae.find(da=>(da==null?void 0:da.selectLabel)==="("+ar.value+")"))??(Ae==null?void 0:Ae.find(da=>!(da!=null&&da.selectLabel)));let Ge=[],xa=[];if(((B=je==null?void 0:je.contents)==null?void 0:B.length)>0){let da=[],wl=je==null?void 0:je.contents;if(Array.isArray(wl==null?void 0:wl[0])&&((J=wl==null?void 0:wl[0])!=null&&J.every(Ja=>!(Ja!=null&&Ja.children)))&&(wl=wl==null?void 0:wl[0]),wl.some(Ja=>Array.isArray(Ja)&&(Ja==null?void 0:Ja.find(We=>We.children))))da=(Re=ve.getGradeColumns(wl,R))==null?void 0:Re[0],da!=null&&da.find(Ja=>(Ja==null?void 0:Ja.label)==="操作")||da.push({label:"操作",prop:"operate",type:"operate"});else{let Ja=wl.some(We=>Array.isArray(We))?wl==null?void 0:wl[0]:wl;Ja!=null&&Ja.find(We=>(We==null?void 0:We.label)==="操作")||Ja.push({label:"操作",prop:"operate",type:"operate"}),Ja==null||Ja.forEach((We,rr)=>{var Ir,Tr,Or,Er,ii,gi,bi,br,bn,Wn,ki,ln,Kn,Yt,Jt,Xt,Zt,Qt,es,as;if((Tr=(Ir=Ke.value)==null?void 0:Ir.split("/"))==null||Tr.forEach(or=>{var vr,Tn,ls;or!==""&&((ls=(Tn=(vr=or==null?void 0:or.split(b+"updateLoading"))==null?void 0:vr[0])==null?void 0:Tn.split(b+"loading"))==null||ls[0])}),We!=null&&We.methodContent){let or=(ii=(Er=(Or=We==null?void 0:We.methodContent)==null?void 0:Or.replace("@","%%#"))==null?void 0:Er.split("%%#"))==null?void 0:ii[1];if(or=or==null?void 0:or.slice(0,(or==null?void 0:or.length)-1),or=ve.contentTransArrayToAllNoExtra(or??"",","),(gi=or==null?void 0:or.find(vr=>vr==null?void 0:vr.includes("@Button")))!=null&&gi.includes("Prop")&&((bi=or==null?void 0:or.find(vr=>vr==null?void 0:vr.includes("Type")))!=null&&bi.includes("Manual"))){let vr=(bn=(br=or==null?void 0:or.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:br.split(":"))==null?void 0:bn[1];vr=((ln=(ki=(Wn=vr==null?void 0:vr.replaceAll("[",""))==null?void 0:Wn.replaceAll("]",""))==null?void 0:ki.split(","))==null?void 0:ln[1])??"算法执行",Ge.push(vr)}else if((Kn=or==null?void 0:or.find(vr=>vr==null?void 0:vr.includes("@Button")))!=null&&Kn.includes("Row")&&((Yt=or==null?void 0:or.find(vr=>vr==null?void 0:vr.includes("Type")))!=null&&Yt.includes("Manual"))){let vr=(Xt=(Jt=or==null?void 0:or.find(Tn=>Tn==null?void 0:Tn.includes("@Button")))==null?void 0:Jt.split(":"))==null?void 0:Xt[1];vr=((es=(Qt=(Zt=vr==null?void 0:vr.replaceAll("[",""))==null?void 0:Zt.replaceAll("]",""))==null?void 0:Qt.split(","))==null?void 0:es[1])??"算法执行",xa.push(vr)}}(as=ta.value)==null||as.find(or=>(or==null?void 0:or.prop)===(We==null?void 0:We.prop)),da.push({label:(We==null?void 0:We.label)==="操作"?R?"操作":"":(We==null?void 0:We.label)??"",prop:(We==null?void 0:We.label)==="操作"?"operate":(We==null?void 0:We.prop)??"a"+rr,width:We!=null&&We.width?parseInt(We.width):"",fixed:(We==null?void 0:We.fixed)??void 0,sortable:(We==null?void 0:We.sortable)??!1,filterable:(We==null?void 0:We.filterable)??!1,operable:(We==null?void 0:We.operable)??!1,showSummary:(We==null?void 0:We.showSummary)??!1,align:(We==null?void 0:We.align)??"left",showOverflowTooltip:(We==null?void 0:We.showOverflowTooltip)??!0,isNotDrag:(We==null?void 0:We.isNotDrag)??!1,isEditCol:(We==null?void 0:We.isEditCol)??!1,isOperate:(We==null?void 0:We.isOperate)??!1,id:(We==null?void 0:We.id)??rr,type:(We==null?void 0:We.label)==="操作"?"operate":void 0,formType:(We==null?void 0:We.formType)??(We!=null&&We.groupSelect?"Select":""),disabled:We==null?void 0:We.disabled,options:(We==null?void 0:We.options)??[],value:(We==null?void 0:We.value)??"",isExistChild:(We==null?void 0:We.isExistChild)??!1,mainKey:(We==null?void 0:We.mainKey)??rr===0,allSelectionContents:(We==null?void 0:We.allContents)??[],filterContent:We==null?void 0:We.filterContents,menus:We==null?void 0:We.menus,groups:We==null?void 0:We.groups,words:We==null?void 0:We.words,filter:We==null?void 0:We.filter,bindMenus:We==null?void 0:We.bindMenus,fatherPath:We==null?void 0:We.fatherPath,isMainPath:We==null?void 0:We.isMainPath,required:(We==null?void 0:We.required)??!1,relatedContents:We==null?void 0:We.relatedContents,functionName:We==null?void 0:We.functionName,functionRelatedWords:We==null?void 0:We.functionRelatedWords,calculatorFilter:We==null?void 0:We.calculatorFilter,relatedPages:We==null?void 0:We.relatedPages,multiple:(We==null?void 0:We.multiple)??!1})})}z.value=(ra=ke==null?void 0:ke[0])==null?void 0:ra.contents;const sn=ve.getNewColumnChild(da),Wt=Ja=>Array.isArray(Ja)?Ja.map(We=>(Array.isArray(We==null?void 0:We.children)&&We.children.length>0?(We.sortable=!1,Wt(We.children)):(We==null?void 0:We.prop)==="operate"||(We==null?void 0:We.label)==="操作"||(We==null?void 0:We.type)==="operate"||(We.sortable=!1),We)):Ja;Wt(sn),await Wo(sn),l0(X.value,sn),oe.value=sn,ca.value=sn,r.value=(_e=oe.value)==null?void 0:_e.map(Ja=>Ja==null?void 0:Ja.label);let cn=(Ca=(sa=ve.getAllLeafNodes(oe.value))==null?void 0:sa.filter(Ja=>(Ja==null?void 0:Ja.type)!=="operate"))==null?void 0:Ca.map((Ja,We)=>({prop:(Ja==null?void 0:Ja.prop)??"a"+We,column:Ja.label}));zr.value=cn;let an=[];ar.value===""?an=W==null?void 0:W[0]:an=(W==null?void 0:W.find(Ja=>(Ja==null?void 0:Ja.selectLabel)==="("+ar.value+")"))??(W==null?void 0:W.find(Ja=>!(Ja!=null&&Ja.selectLabel)));let ni=Array.isArray((rl=an==null?void 0:an.contents)==null?void 0:rl[0])&&((Ka=an==null?void 0:an.contents)!=null&&Ka[0].every(Ja=>Array.isArray(Ja)))?(sl=an==null?void 0:an.contents)==null?void 0:sl[0]:an==null?void 0:an.contents;$e!=null&&$e.contents&&((ul=$e==null?void 0:$e.contents)==null?void 0:ul.length)!==0&&(ni=(Pl=O.cloneDeep(ni))==null?void 0:Pl.map((Ja,We)=>{if(!Array.isArray(Ja)){let rr={};for(let Ir in Ja)Ir!=="id"&&Ir!=="index"&&(rr[Ir]=Ja[Ir]);Ja=Object.values(rr)}return Ja}));const Tu=!!((qa=oe.value)!=null&&qa.find(Ja=>Ja.prop==="index"));ni=pc(ni,$e==null?void 0:$e.contents,Tu);const mi=[];ni==null||ni.forEach((Ja,We)=>{var Ir;let rr={};if(Array.isArray(Ja)){let Tr=[];Ja==null||Ja.filter(Or=>!(Or!=null&&Or.id)).forEach((Or,Er)=>{var ii,gi,bi,br,bn,Wn;if((ii=cn==null?void 0:cn[Er])!=null&&ii.prop&&!Array.isArray(Or)){let ki={};ki[cn[Er].column]=Or,za!=null&&za.value&&((gi=za==null?void 0:za.value)==null?void 0:gi.length)>0&&((bi=za==null?void 0:za.value)!=null&&bi.find(ln=>JSON.stringify(ln==null?void 0:ln[0])===JSON.stringify(ki)))&&(Tr=(br=za==null?void 0:za.value)==null?void 0:br.find(ln=>JSON.stringify(ln==null?void 0:ln[0])===JSON.stringify(ki))),Tr&&Tr.length>0?rr[cn[Er].prop]=Tr!=null&&Tr.find(ln=>{var Kn;return((Kn=Object.keys(ln))==null?void 0:Kn[0])===cn[Er].column})?(bn=Tr==null?void 0:Tr.find(ln=>{var Kn;return((Kn=Object.keys(ln))==null?void 0:Kn[0])===cn[Er].column}))==null?void 0:bn[cn[Er].column]:Or:rr[cn[Er].prop]=Or}else Array.isArray(Or)&&((Wn=cn[Er])!=null&&Wn.prop?rr[cn[Er].prop]=Or:rr.children=bt(Or,cn))})}else rr=Ja;if(Array.isArray(Ja)&&Ja.some(Tr=>Tr==null?void 0:Tr.id)){const Tr=(Ir=Ja==null?void 0:Ja.find(Or=>Or.id))==null?void 0:Ir.id;mi.push(Object.assign(rr,{id:no(Tr)}))}else rr.id?mi.push(rr):mi.push(Object.assign(rr,{id:We.toString()}))});try{const Ja=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),We=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),rr=Ja==null?void 0:Ja.tableId,Ir=Ja==null?void 0:Ja.compIndex;if(rr&&Array.isArray(We)&&We.length>0&&String(rr)===String(c==null?void 0:c.parentTableId)&&String(Ir)===String(c==null?void 0:c.index)){const Tr=new Set(mi.map(Er=>String(Er==null?void 0:Er.id))),Or=We.filter(Er=>!Tr.has(String(Er)));if(Or.length>0){const Er=Ja==null?void 0:Ja.pageKey,ii=Er!=null&&Er.startsWith("/")?Er.substring(1):Er;((h==null?void 0:h[Er])||(h==null?void 0:h[ii])||[]).filter(br=>{var bn,Wn;return((bn=br==null?void 0:br.key)==null?void 0:bn.type)==="data"&&String((Wn=br==null?void 0:br.key)==null?void 0:Wn.tableId)===String(rr)&&Or.includes(br==null?void 0:br.id)}).forEach(br=>{var bn;Tr.has(String(br==null?void 0:br.id))||(mi.push({id:br==null?void 0:br.id,...((bn=br==null?void 0:br.value)==null?void 0:bn.tableData)||{}}),Tr.add(String(br==null?void 0:br.id)))})}}}catch{}let yi=null;try{const Ja=`ocr_committed_temp_ids_v1:${String((c==null?void 0:c.parentTableId)??"")}:${String((c==null?void 0:c.index)??"")}`,We=JSON.parse(sessionStorage.getItem(Ja)||"null");Array.isArray(We)&&We.length>0&&(yi=new Set(We.map(rr=>String(rr))))}catch{}const Kt=Array.from(((hl=Ue.value)==null?void 0:hl.values())||[]).filter(Ja=>!(!(Ja!=null&&Ja._isOCRRow&&(Ja==null?void 0:Ja._ocrTableId)===(c==null?void 0:c.index))||yi&&yi.has(String(Ja==null?void 0:Ja.id)))),Bu=(Ce.value||[]).map(Ja=>String(Ja==null?void 0:Ja.id)),Gt=io(mi,Bu);if(Ce.value=Ft(Gt,A,oe.value),ha.value=Gt,(Ha=ha.value)==null||Ha.forEach(Ja=>{var We;(We=Ue.value)==null||We.set(Ja.id,Ja)}),yi&&yi.size>0)try{const Ja=new Set(Array.from(yi.values()));Ce.value=(Ce.value||[]).filter(We=>!Ja.has(String(We==null?void 0:We.id))),ha.value=(ha.value||[]).filter(We=>!Ja.has(String(We==null?void 0:We.id))),Ja.forEach(We=>{var rr,Ir;try{(Ir=(rr=Ue.value)==null?void 0:rr.delete)==null||Ir.call(rr,We)}catch{}})}catch{}const po=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ct=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(po&&Array.isArray(ct)&&ct.length>0&&String(po==null?void 0:po.compIndex)===String(c==null?void 0:c.index)){const Ja=new Set((ha.value||[]).map(We=>String(We==null?void 0:We.id)));ct.filter(We=>!Ja.has(String(We)))}if(Kt.length>0){const Ja=new Set((Ce.value||[]).map(rr=>rr==null?void 0:rr.id)),We=Kt.filter(rr=>!Ja.has(rr.id));We.length>0&&(Ce.value=[...Ce.value||[],...We],ha.value=[...ha.value||[],...We],We.forEach(rr=>{var Ir;return(Ir=Ue.value)==null?void 0:Ir.set(rr.id,rr)}))}}else oe.value=[],te.value=[],Ce.value=[],ha.value=[],Ue.value=new Map;if(xa=[...new Set(xa)],xa=xa==null?void 0:xa.map(da=>({label:da,type:"methodButton"})),((ol=re==null?void 0:re.contents)==null?void 0:ol.length)>0?_a.value=re==null?void 0:re.contents:_a.value=[],_a.value=[..._a.value,...xa],Ge=[...new Set(Ge)],Ge=Ge==null?void 0:Ge.map(da=>({label:da,type:"methodButton"})),((Ga=ne==null?void 0:ne.contents)==null?void 0:Ga.length)>0)if((El=(xl=(tl=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="filterAllType"))==null?void 0:tl.value)==null?void 0:xl.find(da=>(da==null?void 0:da.value)==="onButtonContents"))!=null&&El.content){let da=(yl=(Ll=(xr=d==null?void 0:d.find(wl=>(wl==null?void 0:wl.key)==="filterAllType"))==null?void 0:xr.value)==null?void 0:Ll.find(wl=>(wl==null?void 0:wl.value)==="onButtonContents"))==null?void 0:yl.content;if(da=(Nl=da==null?void 0:da.split(":"))==null?void 0:Nl[1],da=(Ql=da.slice(1,(da==null?void 0:da.length)-1))==null?void 0:Ql.split(","),va.value=(Dl=ne==null?void 0:ne.contents)==null?void 0:Dl.filter(wl=>da==null?void 0:da.find(sn=>sn===(wl==null?void 0:wl.label))),Le.value=(Jl=ne==null?void 0:ne.contents)==null?void 0:Jl.filter(wl=>da==null?void 0:da.find(sn=>sn===(wl==null?void 0:wl.label))),(ir=ne==null?void 0:ne.contents)!=null&&ir.some(wl=>(wl==null?void 0:wl.label)==="OCR识别")&&!((Kl=va.value)!=null&&Kl.some(wl=>(wl==null?void 0:wl.label)==="OCR识别"))){const wl=(fr=ne==null?void 0:ne.contents)==null?void 0:fr.find(sn=>(sn==null?void 0:sn.label)==="OCR识别");va.value=[...va.value,wl],Le.value=[...Le.value,wl]}_.value=!!(da!=null&&da.find(wl=>wl==="搜索")),L.value=!!(da!=null&&da.find(wl=>wl==="块状显示"))}else va.value=ne==null?void 0:ne.contents,Le.value=ne==null?void 0:ne.contents;else va.value=[],Le.value=[];va.value=[...va.value,...Ge],Le.value=[...Le.value,...Ge],typeof Ke.value=="string"&&Ke.value==="设备管理/试验设备"&&(c==null?void 0:c.compName)==="设备列表"?((Ur=va.value)!=null&&Ur.some(da=>(da==null?void 0:da.label)==="OCR识别")||(va.value=[...va.value||[],{label:"OCR识别"}]),(hr=Le.value)!=null&&hr.some(da=>(da==null?void 0:da.label)==="OCR识别")||(Le.value=[...Le.value||[],{label:"OCR识别"}])):(va.value=(va.value||[]).filter(da=>(da==null?void 0:da.label)!=="OCR识别"),Le.value=(Le.value||[]).filter(da=>(da==null?void 0:da.label)!=="OCR识别")),(ur=va.value)!=null&&ur.some(da=>(da==null?void 0:da.label)==="切换视图")||(va.value=[...va.value||[],{label:"切换视图"}]),(dr=Le.value)!=null&&dr.some(da=>(da==null?void 0:da.label)==="切换视图")||(Le.value=[...Le.value||[],{label:"切换视图"}]),Ze.value=((Ht=Ce==null?void 0:Ce.value)==null?void 0:Ht.length)??0,Rt(Ce.value),Gr.value=Ce.value,Bl.value&&(oe.value=(qt=(Ut=te.value)==null?void 0:Ut.filter(da=>(da==null?void 0:da.label)!=="操作"))==null?void 0:qt.map(da=>{var wl;return{...da,type:"edit",optionUrl:da!=null&&da.formMenuSelect&&((wl=da==null?void 0:da.formMenuSelect)==null?void 0:wl.length)>0?{groupSelect:da==null?void 0:da.groupSelect,menuSelect:da==null?void 0:da.formMenuSelect,selectRelateType:"",type:da==null?void 0:da.formType}:null}}),st())};e.watch(()=>[c.itemData,ar.value,xn.value,mn.value,za==null?void 0:za.value],async()=>{var d,h,T,A,R,D;if((d=c==null?void 0:c.itemData)!=null&&d.find(re=>(re==null?void 0:re.key)==="columnPath")&&!((h=j.value)!=null&&h.find(re=>{var ne,W;return(re==null?void 0:re.key)===((W=(ne=c==null?void 0:c.itemData)==null?void 0:ne.find(ke=>(ke==null?void 0:ke.key)==="columnPath"))==null?void 0:W.contents)}))){let re=j.value,ne={key:(A=(T=c==null?void 0:c.itemData)==null?void 0:T.find(W=>(W==null?void 0:W.key)==="columnPath"))==null?void 0:A.contents,value:(D=(R=c==null?void 0:c.itemData)==null?void 0:R.find(W=>(W==null?void 0:W.key)==="columnUsingPath"))==null?void 0:D.contents};re!=null&&re.find(W=>(W==null?void 0:W.key)===(ne==null?void 0:ne.key))?re=re==null?void 0:re.map(W=>((W==null?void 0:W.key)===(ne==null?void 0:ne.key)&&(W.value=ne.value),W)):re.push(ne),Fe.setTableViewContents(re)}await Pt(c.itemData,c.allMapContents)},{deep:!0,immediate:!0}),e.watch(()=>c==null?void 0:c.operatingForm,d=>{d!=null&&d.form&&(Oi(d==null?void 0:d.form),ce.value=d==null?void 0:d.dialogTitle,ya.value=!0,H.value=!0)},{immediate:!0,deep:!0});const yu=()=>{var d;(d=V.value)!=null&&d.includes("read")&&(Bl.value=!Bl.value)},gu=()=>{gr.value=!gr.value};e.watch(()=>{var d;return(d=c==null?void 0:c.config)==null?void 0:d.viewport},d=>{var h;V.value=d,(d==null?void 0:d.length)===0?Bl.value=!1:(d!=null&&d.includes("read")||(Bl.value=!0),d!=null&&d.includes("edit")||(Bl.value=!1)),C.value=((h=c==null?void 0:c.config)==null?void 0:h.showIndex)||Bl.value},{immediate:!0}),e.watch(()=>Bl.value,d=>{var h;d?(st("viewChange"),Fe.setCacheUpdatingData(null)):(va.value=Le.value,oe.value=ca.value,F.value&&(Fe.setTableLoading(c==null?void 0:c.index),Se("change",F.value))),C.value=d||((h=c==null?void 0:c.config)==null?void 0:h.showIndex),cr.value=[]},{immediate:!0}),e.watch(()=>{var d;return(d=jn.value)==null?void 0:d.length},d=>{d===0&&(ie.currentPage=1)}),e.watch(()=>c==null?void 0:c.compNames,d=>{o.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),e.ref(!1);const bu=(d,h)=>{var T;st("createClick"),h===ie.pageSize&&(ie.currentPage=Math.ceil(((T=Ce.value)==null?void 0:T.length)/ie.pageSize))},ku=async(d,h,T)=>{var R,D,re,ne,W;const A=(h==null?void 0:h.property)??(h==null?void 0:h.prop);if(A&&co.includes(A)&&T!==void 0&&T!==null&&String(T).trim()!==""){const ke=String(T).trim();if(await tt(ke,d==null?void 0:d.id)){Wa.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const je=(R=Ce.value)==null?void 0:R.findIndex(Ge=>(Ge==null?void 0:Ge.id)===(d==null?void 0:d.id)),$e=je!==-1?(re=(D=Ce.value)==null?void 0:D[je])==null?void 0:re[A]:void 0;A&&(d[A]=$e??"");return}}if(Bl.value){const ke=d==null?void 0:d.id;ke!=null&&(v.value.has(ke)||v.value.set(ke,O.cloneDeep(d)),s.value.add(ke));const Ae=(ne=Ce.value)==null?void 0:ne.findIndex(je=>(je==null?void 0:je.id)===(d==null?void 0:d.id));Ae!==-1&&A&&(Ce.value[Ae]={...Ce.value[Ae],[A]:T}),uo(T,d,h);return}uo(T,d,h),nr.value=O.cloneDeep(d),Ma.value=d==null?void 0:d.id,Ze.value=(W=Ce.value)==null?void 0:W.length,ce.value=d!=null&&d._isTemp?"新增":"编辑",$i(!1)},xu=async()=>{var d,h;try{const T=[];if(c!=null&&c.related&&Array.isArray(c.related)&&(console.log("props.related",c.related),c.related.forEach(A=>{if(typeof A=="string"&&A.includes("content_")){const R=A.split("_")[1];R&&(T.push(`content_${R}`),T.push(`struct_${R}`))}})),T.length===0&&(c!=null&&c.itemData)){const A=(h=(d=c.itemData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="contentTableId"))==null?void 0:h.contents;A&&(T.push(`content_${A}`),T.push(`struct_${A}`))}return T}catch(T){return console.error("获取 tableNames 失败:",T),[]}},wu=async(d,h,T)=>{var D,re;if(!T||typeof T!="string"||T.trim()===""){const ne=(h==null?void 0:h.property)??(h==null?void 0:h.prop),W=`${d==null?void 0:d.id}:${ne}`;u.value.delete(W),m.value.set(W,!1);return}const A=(h==null?void 0:h.property)??(h==null?void 0:h.prop),R=`${d==null?void 0:d.id}:${A}`;m.value.set(R,!0);try{const ne=await xu();if(ne.length===0){console.warn("未找到同名表,跳过全局搜索"),u.value.delete(R),m.value.set(R,!1);return}const W=parseInt((D=Tl.value)==null?void 0:D.plat_id);if(!W){console.warn("platId 无效,跳过全局搜索"),u.value.delete(R),m.value.set(R,!1);return}const ke=await O.getAllTables({platId:W,tableNames:ne??[]}),Ae=((re=ke==null?void 0:ke.data)==null?void 0:re.result)||[],je=[],$e=[];for(let Ge=0;Ge<Ae.length;Ge+=2)Ge+1<Ae.length&&$e.push([Ae[Ge],Ae[Ge+1]]);$e.forEach(([Ge,xa])=>{var Qa;if(!Array.isArray(Ge)||Ge.length===0||!Array.isArray(xa)||xa.length===0)return;const Ia=xa[0];let Ba=((Qa=Ia==null?void 0:Ia.结构)==null?void 0:Qa.contents)??[];if(!Array.isArray(Ba)||Ba.length===0)return;let Ye=O.cloneDeep(Ba);if(Array.isArray(Ye==null?void 0:Ye[0])&&(Ye=ve.getColumnChild(Ye[0])),!Array.isArray(Ye)||Ye.length===0||!Ye.some(xe=>(xe==null?void 0:xe.prop)===A))return;[...Ge].sort((xe,$a)=>{const fa=Number((xe==null?void 0:xe.update_time)??0);return Number(($a==null?void 0:$a.update_time)??0)-fa}).slice(0,20).forEach(xe=>{const $a=xe[A];if($a!=null){const fa=String($a);fa.toLowerCase().includes(T.toLowerCase())&&je.findIndex(Sa=>{var B;return xe.id&&((B=Sa.rowData)==null?void 0:B.id)===xe.id?!0:Sa.label===fa})===-1&&je.push({label:fa,rowData:O.cloneDeep(xe),sourceTable:(Ia==null?void 0:Ia.source_table)||""})}})}),u.value.set(R,je)}catch(ne){console.error("全局搜索建议失败:",ne),u.value.delete(R)}finally{m.value.set(R,!1)}},_u=(d,h,T)=>{if(!Bl.value)return;const A=(h==null?void 0:h.property)??(h==null?void 0:h.prop),R=(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)||"";if(R&&R.toUpperCase()!=="INPUT"&&R!=="")return;const D=`${d==null?void 0:d.id}:${A}`;if(p.has(D)&&clearTimeout(p.get(D)),!T||T.trim()===""){u.value.delete(D),m.value.set(D,!1);return}const re=setTimeout(()=>{wu(d,{prop:A,property:A},T),p.delete(D)},300);p.set(D,re)};function Su(d,h){const T=`${d==null?void 0:d.id}:${(h==null?void 0:h.property)??(h==null?void 0:h.prop)}`;return u.value.get(T)||[]}const Eu=(d,h,T)=>{var Ae;if(!T||!T.rowData)return;const A=T.rowData,R=d==null?void 0:d.id,D=(h==null?void 0:h.property)??(h==null?void 0:h.prop),ne=(ve.getAllLeafNodes(oe.value)||[]).filter(je=>(je==null?void 0:je.type)!=="operate"&&(je==null?void 0:je.label)!=="操作"&&(je==null?void 0:je.prop)!=="operate");ne.forEach(je=>{const $e=je==null?void 0:je.prop;$e&&A[$e]!==void 0&&(d[$e]=A[$e])});const W=(Ae=Ce.value)==null?void 0:Ae.findIndex(je=>(je==null?void 0:je.id)===R);W!==-1&&ne.forEach(je=>{const $e=je==null?void 0:je.prop;$e&&A[$e]!==void 0&&(Ce.value[W][$e]=A[$e])}),R!=null&&(v.value.has(R)||v.value.set(R,O.cloneDeep(d)),s.value.add(R));const ke=`${R}:${D}`;u.value.delete(ke),m.value.set(ke,!1),uo(d[D],d,h)},Hr=d=>{var W,ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za;const{row:h,column:T,item:A,slotData:R}=d;let D=h!=null&&h[T==null?void 0:T.prop]||(h==null?void 0:h[T==null?void 0:T.prop])===0?((ke=(W=h==null?void 0:h[T==null?void 0:T.prop])==null?void 0:W[0])==null?void 0:ke.contents)??((h==null?void 0:h[T==null?void 0:T.prop])===0?"0":h==null?void 0:h[T==null?void 0:T.prop]):((je=(Ae=h==null?void 0:h[A==null?void 0:A.prop])==null?void 0:Ae[0])==null?void 0:je.contents)??(h==null?void 0:h[A==null?void 0:A.prop])??((Ge=($e=R==null?void 0:R[A==null?void 0:A.prop])==null?void 0:$e[0])==null?void 0:Ge.contents)??(R==null?void 0:R[A==null?void 0:A.prop])??((Ba=(Ia=h==null?void 0:h[(xa=A==null?void 0:A.child)==null?void 0:xa.prop])==null?void 0:Ia[0])==null?void 0:Ba.contents)??(h==null?void 0:h[(Ye=A==null?void 0:A.child)==null?void 0:Ye.prop]),ne=Array.isArray(D)&&!(D!=null&&D.every(ga=>typeof ga=="string"||typeof ga=="number"))?"查看":D;if(ne=Array.isArray(ne)?ne.join(","):ne,(T==null?void 0:T.formType)==="Date")if(!ne||ne===""||ne===null||ne===void 0)ne="";else{const ga=Vn.dayjs(ne,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ne=ga.isValid()?ga.format("YYYYMMDD"):ne??""}return Array.isArray(T==null?void 0:T.relatedPages)&&((Za=T==null?void 0:T.relatedPages)==null?void 0:Za.length)>0&&(ne="详情页"),ne},Cu=d=>{var ke,Ae,je,$e,Ge,xa,Ia,Ba,Ye,Za;const{row:h,column:T,item:A,slotData:R}=d;let D=h!=null&&h[T==null?void 0:T.prop]?((Ae=(ke=h==null?void 0:h[T==null?void 0:T.prop])==null?void 0:ke[0])==null?void 0:Ae.contents)??(h==null?void 0:h[T==null?void 0:T.prop]):(($e=(je=h==null?void 0:h[A==null?void 0:A.prop])==null?void 0:je[0])==null?void 0:$e.contents)??(h==null?void 0:h[A==null?void 0:A.prop])??((xa=(Ge=R==null?void 0:R[A==null?void 0:A.prop])==null?void 0:Ge[0])==null?void 0:xa.contents)??(R==null?void 0:R[A==null?void 0:A.prop])??((Ye=(Ba=h==null?void 0:h[(Ia=A==null?void 0:A.child)==null?void 0:Ia.prop])==null?void 0:Ba[0])==null?void 0:Ye.contents)??(h==null?void 0:h[(Za=A==null?void 0:A.child)==null?void 0:Za.prop]);const ne=Array.isArray(D)&&!(D!=null&&D.every(ga=>typeof ga=="string"||typeof ga=="number")),W=Array.isArray(D)&&(D==null?void 0:D.find(ga=>ga==null?void 0:ga.url));return ne&&W},Du=d=>{var R,D;if(!(d!=null&&d.column))return!1;const h=Ke.value==="试验任务/任务管理",T=(c==null?void 0:c.compName)==="任务列表",A=((R=d==null?void 0:d.column)==null?void 0:R.label)==="任务状态"||((D=d==null?void 0:d.column)==null?void 0:D.prop)==="任务状态";return h&&T&&A},Nu=(d,h)=>d.find(T=>Object.values(T).some(A=>A===h));return e.watch(()=>se.value,async d=>{if(d){la.setContentLoading(!0),await e.nextTick();const h=Nu(Ce.value,d==null?void 0:d.data);if(!h)return la.setContentLoading(!1);await qn(d==null?void 0:d.data,null,h,{data:d==null?void 0:d.data}),la.setContentLoading(!1)}},{deep:!0,immediate:!0}),e.watch(()=>c==null?void 0:c.cacheNewData,d=>{var h;d&&(Array.isArray(d)?d.forEach(T=>{var A,R,D,re,ne;if(换,String(T==null?void 0:T.compId)===String(c==null?void 0:c.index)&&(T!=null&&T.resId)&&((A=T==null?void 0:T.data)!=null&&A.id)){const W=(R=T==null?void 0:T.data)==null?void 0:R.id,ke=T==null?void 0:T.resId;if(Ce.value=(D=Ce.value)==null?void 0:D.map(Ae=>{if((Ae==null?void 0:Ae.id)===W){const je={...Ae,id:ke};return delete je._isOCRRow,delete je._ocrTableId,je}return Ae}),(ne=(re=Ue.value)==null?void 0:re.has)!=null&&ne.call(re,W)){const je={...Ue.value.get(W)||{},id:ke};delete je._isOCRRow,delete je._ocrTableId,Ue.value.delete(W),Ue.value.set(ke,je)}La(c==null?void 0:c.index,W,ke)}}):String(d==null?void 0:d.compId)===String(c==null?void 0:c.index)&&(Ce.value=(h=Ce.value)==null?void 0:h.map(T=>{var A;if((T==null?void 0:T.id)===((A=d==null?void 0:d.data)==null?void 0:A.id)){const R={...T,id:d==null?void 0:d.resId};return delete R._isOCRRow,delete R._ocrTableId,R}return T})))},{immediate:!0,deep:!0}),(d,h)=>{var Ye,Za,ga,Qa;const T=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-popover"),R=e.resolveComponent("el-switch"),D=e.resolveComponent("el-checkbox"),re=e.resolveComponent("el-radio"),ne=e.resolveComponent("el-radio-group"),W=e.resolveComponent("el-checkbox-group"),ke=e.resolveComponent("el-button"),Ae=e.resolveComponent("el-icon"),je=e.resolveComponent("el-progress"),$e=e.resolveComponent("el-alert"),Ge=e.resolveComponent("el-table-column"),xa=e.resolveComponent("el-table"),Ia=e.resolveComponent("el-upload"),Ba=e.resolveComponent("el-text");return e.openBlock(),e.createElementBlock("div",P0,[Fr.value?(e.openBlock(),e.createBlock(ll.ssTable,{id:"excel-table",pageObj:ie,showIndex:C.value,isTree:(Ye=a.compItem)==null?void 0:Ye.isTree,summaryInfo:K,columns:oe.value,defaultSort:ee,isCardViewport:gr.value,checkedColumns:r.value,key:rn.value+oe.value,tableData:jn.value,isEditViewport:Bl.value,isShowPagination:oa.value,isShowEdit:!1,isShowDelete:!1,allowSelect:k.value,onDbClickRow:oo,extraButton:va.value,rowButton:_a.value,cacheExtraButtons:Le.value,isClearSelection:((Za=cr.value)==null?void 0:Za.length)===0,onDoCurrentChange:yn,onDoSizeChange:Bi,onSortChange:Ro,onContentClick:qn,onRowClick:to,onSelectChange:Uo,onCellChange:ku,onCellInput:_u,onSelectSuggest:Eu,onChange:uo,onPreview:Un,onSubmitEditingTable:Zi,onHandleColEditChange:Yi,onHandleColTypeChange:Ji,onClickButton:it,onAddNewRow:Pr,bottomButton:z.value},e.createSlots({headerButton:e.withCtx(xe=>{var $a,fa,Ea,Sa;return[a.showHeader?(e.openBlock(),e.createBlock(bf,{key:0,id:"tableHeaderButton",pageLayout:a.pageLayout,lockingPage:e.unref(me)===e.unref(Ke),filterValues:Jo.value,selectNums:($a=cr.value)==null?void 0:$a.length,dataNums:(fa=Ce.value)==null?void 0:fa.length,compName:a.compName,isDevMode:a.isDevMode,buttons:xe.buttons,menuFilter:(Sa=(Ea=a.compItem)==null?void 0:Ea.component)==null?void 0:Sa.menuFilter,onButtonClick:h[1]||(h[1]=(B,J,Re)=>it(B,J,{extra:Re})),columns:oe.value,onFilter:Xo,onGetImportData:Fo,level:a.level,filterShow:_.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):e.createCommentVNode("",!0)]}),viewport:e.withCtx(()=>{var xe,$a,fa,Ea;return[((xe=Ce.value)==null?void 0:xe.length)>0&&a.allowOperate&&L.value?(e.openBlock(),e.createElementBlock("div",U0,[($a=V.value)!=null&&$a.includes("read")&&((fa=V.value)!=null&&fa.includes("edit"))&&((Ea=_a.value)!=null&&Ea.some(Sa=>(Sa==null?void 0:Sa.label)==="编辑"))&&!gr.value&&e.unref(me)!==e.unref(Ke)?(e.openBlock(),e.createElementBlock("span",{key:0,title:"编辑表格",onClick:yu},[e.createVNode(T,{name:"editTable",class:"view-icon"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),rowCreate:e.withCtx(({row:xe,index:$a})=>[e.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:fa=>bu(xe,$a)},[e.createVNode(T,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,q0)]),operateCol:e.withCtx(()=>[e.createVNode(A,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:pu},{reference:e.withCtx(()=>[e.createElementVNode("span",W0,[e.createVNode(T,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",K0,[h[20]||(h[20]=e.createElementVNode("div",{class:"group-title"},"表格操作",-1)),e.createVNode(R,{"model-value":y.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:h[2]||(h[2]=xe=>eo(xe))},null,8,["model-value"]),h[21]||(h[21]=e.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),e.createVNode(W,{modelValue:r.value,"onUpdate:modelValue":h[3]||(h[3]=xe=>r.value=xe),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:t},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Cn.value,xe=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:xe.label},[e.createVNode(D,{value:xe.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",{title:xe.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},e.toDisplayString(xe.label),9,G0)]),_:2},1032,["value"]),e.createVNode(A,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(T,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var $a;return[e.createElementVNode("div",Y0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(($a=Object.keys(xe))==null?void 0:$a.filter(fa=>{var Ea;return(Ea=P.value)==null?void 0:Ea.find(Sa=>(Sa==null?void 0:Sa.value)===fa)}),fa=>{var Ea,Sa;return e.openBlock(),e.createElementBlock("div",{key:fa},[I[fa]=="radio"?(e.openBlock(),e.createElementBlock("div",J0,[h[19]||(h[19]=e.createElementVNode("div",null,"固定:",-1)),e.createVNode(ne,{"model-value":xe==null?void 0:xe[fa],onChange:B=>Dn(B,fa,xe)},{default:e.withCtx(()=>{var B,J;return[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((J=(B=P.value)==null?void 0:B.find(Re=>(Re==null?void 0:Re.value)===fa))==null?void 0:J.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),I[fa]=="switch"?(e.openBlock(),e.createBlock(R,{key:1,"model-value":xe==null?void 0:xe[fa],"active-text":(Sa=(Ea=P.value)==null?void 0:Ea.find(B=>(B==null?void 0:B.value)===fa))==null?void 0:Sa.label,onChange:B=>Dn(B,fa,xe)},null,8,["model-value","active-text","onChange"])):e.createCommentVNode("",!0)])}),128))])]}),_:2},1024),e.createElementVNode("span",X0,[e.createVNode(T,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:e.withCtx(xe=>{var $a,fa,Ea,Sa,B,J,Re,ra,_e,sa,Ca,rl,Ka,sl,ul,Pl,qa,hl,Ha,ol;return[(($a=xe==null?void 0:xe.column)==null?void 0:$a.label)==="证书附件"||((fa=xe==null?void 0:xe.column)==null?void 0:fa.prop)==="证书附件"?(e.openBlock(),e.createElementBlock("div",Z0,[e.createVNode(T,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:e.withModifiers(Ga=>tn(xe),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Cu(xe)?(e.openBlock(),e.createBlock(A,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:e.withCtx(()=>[e.createElementVNode("span",Q0,e.toDisplayString(Hr(xe)),1)]),default:e.withCtx(()=>{var Ga,tl;return[e.createElementVNode("div",e3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((tl=xe==null?void 0:xe.row)==null?void 0:tl[(Ga=xe==null?void 0:xe.column)==null?void 0:Ga.prop],xl=>(e.openBlock(),e.createElementBlock("div",a3,[e.createElementVNode("div",{class:"prop-url",title:ei(xl),onClick:El=>Go(xl)},e.toDisplayString(ei(xl)),9,l3),e.createElementVNode("div",{class:"prop-download",onClick:El=>pi(xl)}," 下载 ",8,r3)]))),256))])]}),_:2},1024)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[Du(xe)?(e.openBlock(),e.createBlock(Pu,{key:0,value:Hr(xe)},null,8,["value"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"table-cell-content",style:e.normalizeStyle({color:!Array.isArray(Hr(xe))&&((Sa=(Ea=Hr(xe))==null?void 0:Ea.toString())!=null&&Sa.includes(".txt")||(J=(B=Hr(xe))==null?void 0:B.toString())!=null&&J.includes(".cpt")||(ra=(Re=Hr(xe))==null?void 0:Re.toString())!=null&&ra.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Hr(xe))&&((sa=(_e=Hr(xe))==null?void 0:_e.toString())!=null&&sa.includes(".txt")||(rl=(Ca=Hr(xe))==null?void 0:Ca.toString())!=null&&rl.includes(".cpt")||(sl=(Ka=Hr(xe))==null?void 0:Ka.toString())!=null&&sl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Hr(xe))&&((Pl=(ul=Hr(xe))==null?void 0:ul.toString())!=null&&Pl.includes(".txt")||(hl=(qa=Hr(xe))==null?void 0:qa.toString())!=null&&hl.includes(".cpt")||(ol=(Ha=Hr(xe))==null?void 0:Ha.toString())!=null&&ol.includes(".cyd"))?"pointer":"",marginLeft:(xe==null?void 0:xe.colIndex)===0?`${((xe==null?void 0:xe.level)??0)*20}px`:0}),onClick:Ga=>{var tl;return In(Hr(xe),((tl=xe==null?void 0:xe.column)==null?void 0:tl.relatedPages)??[])}},e.toDisplayString(Hr(xe)===0?"0":Hr(xe)),13,n3))],64))]}),_:2},[((ga=_a.value)==null?void 0:ga.length)>0?{name:"actions",fn:e.withCtx(({item:xe,fIndex:$a})=>[e.createVNode(A,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:e.withCtx(()=>[e.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"]))})]),default:e.withCtx(()=>[e.createElementVNode("div",j0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Yo(_a.value,xe),(fa,Ea)=>(e.openBlock(),e.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:e.withModifiers(Sa=>it(fa==null?void 0:fa.label,xe,{extra:fa}),["stop"])},[e.createElementVNode("div",{style:e.normalizeStyle({color:fa==null?void 0:fa.textColor}),class:"extra-button-label"},e.toDisplayString(fa==null?void 0:fa.label),5)],8,H0))),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),Bl.value?(e.openBlock(),e.createElementBlock("div",i3,[e.createVNode(ke,{id:"themeBorderButton",onClick:Ho},{default:e.withCtx(()=>h[22]||(h[22]=[e.createTextVNode("取消")])),_:1,__:[22]}),e.createVNode(ke,{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:ce.value,visible:H.value,width:Ol.value,onBeforeDestroy:ao,style:{height:"74%"}},{default:e.withCtx(()=>[e.createElementVNode("div",o3,[e.createVNode(ll.ssForm,{ref_key:"formRef",ref:q,rowContents:Ra.value,showOperator:!1,onChange:fu,isEnableWrap:!1,onFixChangeValue:Mi,onClickTrigger:lo,isEdit:Ta.value,onBlurChange:qo,onCreate:Qi,onTagChange:en},null,8,["rowContents","isEdit"])])]),footer:e.withCtx(()=>[ya.value?(e.openBlock(),e.createElementBlock("div",t3,[e.createVNode(ke,{onClick:h[4]||(h[4]=xe=>H.value=!1),id:"themeBorderButton"},{default:e.withCtx(()=>h[24]||(h[24]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[24]}),e.createVNode(ke,{class:"ok-button",onClick:h[5]||(h[5]=xe=>$i(!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:ce.value,visible:we.value,width:na.value,onBeforeDestroy:h[7]||(h[7]=xe=>we.value=!1)},{default:e.withCtx(()=>[e.createVNode(Af)]),footer:e.withCtx(()=>[e.createElementVNode("div",s3,[e.createVNode(ke,{onClick:h[6]||(h[6]=xe=>we.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:e.withCtx(()=>h[26]||(h[26]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[26]}),e.createVNode(ke,{class:"ok-button",onClick:Ii,id:"themeButton"},{default:e.withCtx(()=>h[27]||(h[27]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),Na.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:2,fileDataList:ae.value,onDestroy:Nn},null,8,["fileDataList"])):e.createCommentVNode("",!0),De.value?(e.openBlock(),e.createBlock(wr.ssDialog,{key:3,visible:De.value,onBeforeDestroy:uu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:e.withCtx(()=>[e.createVNode(Eo.ThreeViewerHost,{files:Pa.value,threeData:ge.value},null,8,["files","threeData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0),e.createVNode(wr.ssDialog,{title:"OCR扫描录入",visible:al.value,"close-on-click-modal":!1,onBeforeDestroy:kl,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",c3,[e.createElementVNode("div",u3,[e.createElementVNode("div",{class:e.normalizeClass(["ocr-step-item",{active:ye.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:ye.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:ye.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)]),ye.value===1?(e.openBlock(),e.createElementBlock("div",d3,[e.createVNode(ke,{onClick:rt,class:"ocr-action-btn",disabled:nl.value,size:"default"},{default:e.withCtx(()=>h[33]||(h[33]=[e.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),e.createVNode(ke,{onClick:jr,class:"ocr-action-btn",disabled:nl.value,size:"default"},{default:e.withCtx(()=>h[34]||(h[34]=[e.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):e.createCommentVNode("",!0),ye.value===1?(e.openBlock(),e.createElementBlock("div",p3,[e.createElementVNode("div",f3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ia.value,(xe,$a)=>{var fa;return e.openBlock(),e.createElementBlock("div",{key:$a,class:"ocr-file-item"},[e.createElementVNode("div",h3,[xe.raw&&((fa=xe.raw.type)!=null&&fa.startsWith("image/"))?(e.openBlock(),e.createElementBlock("img",{key:0,src:ml(xe),alt:"预览",class:"thumbnail-image"},null,8,v3)):(e.openBlock(),e.createElementBlock("div",m3,[e.createVNode(Ae,{size:40},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.document_default))]),_:1})])),e.createElementVNode("div",{class:e.normalizeClass(["file-progress-ring",{uploading:dl(xe)==="uploading",processing:dl(xe)==="processing",completed:dl(xe)==="completed"||dl(xe)==="uploaded",failed:dl(xe)==="failed"}])},[(e.openBlock(),e.createElementBlock("svg",y3,[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:dl(xe)==="completed"||dl(xe)==="uploaded",uploading:dl(xe)==="uploading",processing:dl(xe)==="processing",failed:dl(xe)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:dl(xe)==="failed"?"#f56c6c":dl(xe)==="completed"||dl(xe)==="uploaded"?"#67c23a":"#409eff","stroke-width":dl(xe)==="completed"||dl(xe)==="uploaded"||dl(xe)==="failed"?3:2,"stroke-dasharray":Ml(xe),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,g3)])),dl(xe)==="completed"||dl(xe)==="uploaded"?(e.openBlock(),e.createElementBlock("div",b3,[e.createVNode(Ae,{class:"check-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.check_default))]),_:1})])):e.createCommentVNode("",!0),dl(xe)==="failed"?(e.openBlock(),e.createElementBlock("div",k3,[e.createVNode(Ae,{class:"error-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.close_default))]),_:1})])):e.createCommentVNode("",!0)],2),e.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>ri($a)},[e.createVNode(Ae,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.close_default))]),_:1})],8,x3)]),e.createElementVNode("div",w3,e.toDisplayString(xe.name||"文件名123"),1)])}),128))]),ia.value.length>0?(e.openBlock(),e.createElementBlock("div",_3,[e.createVNode(ke,{onClick:He,class:"ocr-start-recognize-btn",disabled:nl.value||ia.value.length===0,size:"default"},{default:e.withCtx(()=>h[36]||(h[36]=[e.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),ye.value===1?(e.openBlock(),e.createElementBlock("div",S3,[e.createVNode(je,{percentage:ue.value,"stroke-width":8},null,8,["percentage"])])):e.createCommentVNode("",!0),ye.value===2?(e.openBlock(),e.createElementBlock("div",E3,[e.createElementVNode("div",C3,[e.createVNode($e,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),e.createElementVNode("div",D3,[e.createVNode(xa,{data:ua.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(ea.value,xe=>(e.openBlock(),e.createBlock(Ge,{key:xe.prop,prop:xe.prop,"min-width":xe.minWidth||230,"class-name":xe.isAccuracy?"accuracy-column":""},{header:e.withCtx(()=>[e.createElementVNode("div",N3,[e.createElementVNode("span",null,e.toDisplayString(xe.label),1)])]),default:e.withCtx(({row:$a,$index:fa})=>{var Ea,Sa,B;return[xe.isAccuracy?(e.openBlock(),e.createElementBlock("span",{key:0,class:"accuracy-value",style:e.normalizeStyle({color:Ya($a[xe.prop]),fontWeight:500})},e.toDisplayString(Xa($a[xe.prop])),5)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[wa.value!==fa?(e.openBlock(),e.createElementBlock("span",T3,e.toDisplayString($a[xe.prop]),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Xe(xe.prop)),{key:1,modelValue:$a[xe.prop],"onUpdate:modelValue":J=>$a[xe.prop]=J,size:"small",placeholder:"请输入"+xe.label,content:((Ea=Je(xe.prop))==null?void 0:Ea.contents)??((Sa=Je(xe.prop))==null?void 0:Sa.options)??[],optionUrl:(B=Je(xe.prop))==null?void 0:B.optionUrl,onChange:J=>Da(fa,xe.prop,J),onFocus:J=>il.value=xe.prop,onBlur:h[8]||(h[8]=J=>il.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:xe})=>[wa.value===xe?(e.openBlock(),e.createBlock(Ae,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:e.withModifiers($a=>el(xe),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.check_default))]),_:2},1032,["onClick"])):(e.openBlock(),e.createBlock(T,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:e.withModifiers($a=>el(xe),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):e.createCommentVNode("",!0),ye.value===3?(e.openBlock(),e.createElementBlock("div",B3,[e.createVNode(Ae,{size:"32",class:"ocr-success-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Wa.check_default))]),_:1}),h[37]||(h[37]=e.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):e.createCommentVNode("",!0)]),e.createVNode(Ia,{ref:"ocrUploadRef","file-list":ia.value,"onUpdate:fileList":h[9]||(h[9]=xe=>ia.value=xe),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":Q,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:e.withCtx(()=>[ye.value!==3?(e.openBlock(),e.createElementBlock("div",A3,[e.createVNode(ke,{onClick:Sr,class:"ocr-start-recognize-btn",disabled:ye.value===1||nl.value},{default:e.withCtx(()=>h[39]||(h[39]=[e.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),e.createVNode(ke,{onClick:Yr,class:"ocr-start-recognize-btn",disabled:nl.value},{default:e.withCtx(()=>h[40]||(h[40]=[e.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):e.createCommentVNode("",!0)]),_:1},8,["visible"]),e.createVNode(Yf,{visible:hi.value,onConfirm:nt,onCancel:h[10]||(h[10]=xe=>hi.value=!1)},null,8,["visible"]),e.createVNode(wd,{visible:Oa.value,"onUpdate:visible":h[11]||(h[11]=xe=>Oa.value=xe),versions:Va.value},null,8,["visible","versions"]),e.createVNode(sd,{visible:Aa.value,"onUpdate:visible":h[12]||(h[12]=xe=>Aa.value=xe),images:Me.value,"default-image-name":Sl.value,"field-meta":wa.value!==null?((Qa=ua.value[wa.value])==null?void 0:Qa.__ocrFieldMeta)||{}:{},"focused-field-name":il.value,onClose:h[13]||(h[13]=xe=>Aa.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),e.createVNode(Od,{visible:Il.value,"onUpdate:visible":h[14]||(h[14]=xe=>Il.value=xe),candidates:Gl.value,"name-prop":Vr.value,"mfr-prop":Ul.value,columns:oe.value,onSubmit:Br,onPreviewFile:gn},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),e.createVNode(jd,{visible:ka.value,"onUpdate:visible":h[15]||(h[15]=xe=>ka.value=xe),ocrPreviewData:ua.value,"onUpdate:ocrPreviewData":h[16]||(h[16]=xe=>ua.value=xe),ocrSelectedFields:Fa.value,"onUpdate:ocrSelectedFields":h[17]||(h[17]=xe=>Fa.value=xe),ocrPreviewColumns:ea.value,onConfirm:aa,onFieldChange:h[18]||(h[18]=({rowIndex:xe,prop:$a,value:fa})=>Da(xe,$a,fa))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),e.createVNode(wr.ssDialog,{title:o.title,visible:o.show,width:o.width,onBeforeDestroy:M},{default:e.withCtx(()=>[e.createElementVNode("div",z3,[e.createVNode(ll.ssForm,{rowContents:o==null?void 0:o.contents,formRules:o==null?void 0:o.formRules,showOperator:!1,buttonValue:o.buttonValue,isEdit:Ta.value,isStartJustify:!1,onOnButtonClick:Y},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),e.createVNode(wr.ssDialog,{title:"",visible:i.show,width:i.width,alignCenter:!0,onBeforeDestroy:f},{header:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("h3",M3,e.toDisplayString(i.title),1),e.createVNode(Ba,{size:"small",type:"danger",style:{width:"100%"}},{default:e.withCtx(()=>h[41]||(h[41]=[e.createTextVNode(" (选择【覆盖】,可能会影响到原数据的引用关系;选择【跳过】将会放弃重复数据的导入。请谨慎操作!) ")])),_:1,__:[41]})])]),footer:e.withCtx(()=>[e.createElementVNode("div",I3,[e.createVNode(Ba,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:e.withCtx(()=>[e.createTextVNode("引用模块:"+e.toDisplayString(zn.value||"暂无"),1)]),_:1}),e.createElementVNode("div",O3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.buttonValue,xe=>(e.openBlock(),e.createBlock(ke,{key:xe==null?void 0:xe.label,style:e.normalizeStyle({background:xe==null?void 0:xe.background,color:xe==null?void 0:xe.color}),onClick:$a=>x(xe==null?void 0:xe.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(xe==null?void 0:xe.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:e.withCtx(()=>[e.createVNode(kf,{columns:i==null?void 0:i.columns,tableData:i==null?void 0:i.tableData},{content:e.withCtx(({row:xe,item:$a,slotData:fa,scope:Ea,column:Sa,columnProp:B,$index:J})=>[e.createTextVNode(e.toDisplayString((xe==null?void 0:xe[Sa==null?void 0:Sa.prop])||(xe==null?void 0:xe[Sa==null?void 0:Sa.label])||(xe==null?void 0:xe[Sa==null?void 0:Sa.property])||(fa==null?void 0:fa[Sa==null?void 0:Sa.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["visible","width"])])}}},Bc=er._export_sfc($3,[["__scopeId","data-v-e870e86b"]]),R3={key:1,class:"static-form-body"},V3=["onClick"],F3={key:1},P3=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 $;const b=($=r.itemData)==null?void 0:$.find(K=>(K==null?void 0:K.key)==="formContent"),y=(b==null?void 0:b.contents)||[];return(r.fields&&r.fields.length>0?r.fields:y).filter(K=>(K==null?void 0:K.label)||(K==null?void 0:K.isHideInForm)).map(K=>{let ie=K==null?void 0:K.value;Array.isArray(ie)&&(ie=ie.map(pe=>pe==null?"":typeof pe=="object"?pe.label??pe.value??pe.name??JSON.stringify(pe):String(pe)).filter(Boolean).join(",")),ie!=null&&typeof ie=="object"&&(ie=ie.label??ie.value??ie.name??JSON.stringify(ie));const Se=K.isHideInForm?"":K.label??"",oe=ie==null||ie===""?"-":String(ie),X=Se==="使用状态";return{label:Se,value:oe,isStatus:X,tagType:X?t(oe):"",width:K.width??1,field:K}})}),v=e.ref(null),u=e.ref(null),p=b=>{if(Array.isArray(b)&&b.length>=3){const[y,L,$,K]=b;return K!==void 0?`rgba(${y}, ${L}, ${$}, ${K})`:`rgb(${y}, ${L}, ${$})`}if(typeof b=="string"){const y=b.trim();if(y.startsWith("[")&&y.endsWith("]")){const L=y.slice(1,-1).split(",").map($=>Number($.trim()));if(L.length>=3&&L.every($=>!Number.isNaN($))){const[$,K,ie,Se]=L;return Se!==void 0?`rgba(${$}, ${K}, ${ie}, ${Se})`:`rgb(${$}, ${K}, ${ie})`}}return y}},m=e.computed(()=>{const b=Number(r==null?void 0:r.textSize),y=p(r==null?void 0:r.textColor),L={},$={},K={},ie={};return!Number.isNaN(b)&&b&&(L.fontSize=`${b}px`,$.fontSize=`${b+1}px`,K.fontSize=`${b}px`,ie.fontSize=`${b}px`),y&&($.color=y,K.color=y,ie.color=y),{item:L,label:$,value:K,empty:ie}}),c=e.ref(""),k=e.ref(""),C=e.ref(!1),V=async b=>{if(b){k.value&&(URL.revokeObjectURL(k.value),k.value="");try{const y=await O.platformDownloadFile({url:b}),L=new Blob([y==null?void 0:y.data],{type:(y==null?void 0:y.headers["content-type"])||"image/*"});k.value=URL.createObjectURL(L)}catch{k.value=""}}};e.watch(()=>r==null?void 0:r.backGroundImage,b=>{b&&(c.value=b)},{immediate:!0}),e.watch(c,b=>{V(b)},{immediate:!0});const _=()=>{var b;(b=u.value)==null||b.click()},G=async b=>{var $,K,ie;const y=b.target,L=($=y==null?void 0:y.files)==null?void 0:$[0];if(!L){y.value="";return}C.value=!0;try{const Se=new FormData;Se.append("file",L);const oe=await O.platformUploadFile(Se),X=(ie=(K=oe==null?void 0:oe.data)==null?void 0:K.result)==null?void 0:ie.url;X?(c.value=X,n("update:backGroundImage",X),V(X),Wa.ElMessage.success("背景图片上传成功")):Wa.ElMessage.error("背景图片上传失败")}catch{Wa.ElMessage.error("背景图片上传失败")}finally{C.value=!1,y.value=""}},z=e.computed(()=>k.value?{backgroundImage:`url(${k.value})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),I=b=>ll.getComponent(b),P=b=>{if(!b)return;const y=b.querySelector("input, textarea, .el-input__inner");y&&typeof y.focus=="function"&&y.focus()},E=(b,y,L)=>{r.disabled||(v.value=y,e.nextTick(()=>{P(L.currentTarget)}))},S=()=>{v.value=null},w=b=>{const y=b!=null&&b.width&&b.width>0?b.width:1,$=`calc((100% - ${(y-1)*48}px) / ${y})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(b,y)=>{const L=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",{class:"static-form-card",style:e.normalizeStyle(z.value),onClick:y[2]||(y[2]=$=>(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:y[0]||(y[0]=e.withModifiers($=>_(),["stop"]))},[e.createElementVNode("input",{ref_key:"bgUploadRef",ref:u,type:"file",accept:"image/*",style:{display:"none"},onChange:G},null,544),y[3]||(y[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",R3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,($,K)=>{var ie,Se,oe,X,pe,ee,te,De,Pe;return e.openBlock(),e.createElementBlock("div",{key:K,class:"static-form-item",style:e.normalizeStyle({...w($),...m.value.item}),onClick:y[1]||(y[1]=e.withModifiers(()=>{},["stop"]))},[$.label&&!((ie=$==null?void 0:$.field)!=null&&ie.isHideInForm)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"static-form-label",style:e.normalizeStyle(m.value.label)},e.toDisplayString($.label)+": ",5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"static-form-value",style:e.normalizeStyle(m.value.value),onClick:ge=>{var N;return(N=$.field)!=null&&N.isNoClick?null:E($,K,ge)}},[v.value===K&&$.field?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I(((Se=$.field)==null?void 0:Se.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":ge=>$.field.value=ge,isEdit:!0,disabled:(oe=$.field)==null?void 0:oe.disabled,content:((X=$.field)==null?void 0:X.contents)??[],optionUrl:$.field,originalValue:(pe=$.field)==null?void 0:pe.value,config:(ee=$.field)==null?void 0:ee.config,configModel:((te=$.field)==null?void 0:te.prop)??((De=$.field)==null?void 0:De.name),selectedTagList:((Pe=$.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},[$.isStatus?(e.openBlock(),e.createBlock(L,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",F3,e.toDisplayString($.value??"-"),1))],64))],12,V3)],4)}),128))])):(e.openBlock(),e.createElementBlock("div",{key:2,class:"static-form-empty",style:e.normalizeStyle(m.value.empty)}," 暂无数据 ",4))],4)}}}),Ac=er._export_sfc(P3,[["__scopeId","data-v-01ad92e2"]]),j3={class:"form-content"},H3={title:"选择标签"},U3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},q3={class:"col-operate-wrap"},W3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},K3={__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,u.value=!1,p.value=[]},n=a;e.computed(()=>{var q;const ce=(q=qe.value)==null?void 0:q.split("/");return(ce==null?void 0:ce.some(ze=>(ze==null?void 0:ze.includes("updateLoading"))||(ze==null?void 0:ze.includes("loading"))))?!1:De.value==="view"});const t=l,s=e.ref([]),v=e.ref(!1),u=e.ref(!1),p=e.ref([]),{getFileExtension:m}=Eo.useThreeSystem(),c=e.ref(),k=e.ref(!1),C=e.ref(!1),V=O.useUnit(O.pinia),{chooseTitle:_}=O.storeToRefs(V),G=e.ref([]),z=e.ref(),I=e.ref(!1),P=e.ref([]),E=dc(O.pinia),S=Tt(O.pinia),w=e.ref(!1),b=e.ref(),y=e.ref(),L=e.ref(),$=e.ref(),K=e.ref(),ie=O.useLoginState(O.pinia),{loginUserInfo:Se}=O.storeToRefs(ie),oe=e.ref(),X=e.ref(!0),pe=O.useModelComp(O.pinia),{tableViewContents:ee,itemData:te,isEdit:De,routeToChildPath:Pe,lockingPage:ge,homepageBackgroundTableId:N}=O.storeToRefs(pe),U=e.ref(null),le=e.ref(!1),Te=e.ref(!1),Ee=O.useMenuState(),{activeMenuPath:qe}=O.storeToRefs(Ee),ca=ve.useOriginalState(O.pinia),{originalPath:Na}=O.storeToRefs(ca),{compType:ae,hasEditable:la}=Xs.useRole(),he=()=>!la(n.config,{type:ae.FORM});e.computed(()=>qe.value==="设备管理/试验设备"&&n.compName==="设备概要");const Ke=async()=>{var q,ze,we;const ce=N==null?void 0:N.value,H=(q=Se==null?void 0:Se.value)==null?void 0:q.plat_id;if(!(!ce||!H))try{const na=await O.getAllTables({platId:parseInt(H),tableNames:[`content_${ce}`,`struct_${ce}`],user_unique_id:"0"}),ta=((we=(ze=na==null?void 0:na.data)==null?void 0:ze.result)==null?void 0:we[0])??[],_a=String((n==null?void 0:n.index)??""),ya=ta==null?void 0:ta.find(Pa=>String(Pa==null?void 0:Pa.relatedForm_id)===_a);ya!=null&&ya.backgroundImg_url&&($.value=ya.backgroundImg_url)}catch(na){console.error("获取首页背景图片表数据失败:",na)}},Ie=e.ref([]),se=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Be=async ce=>{Te.value=ce,await fe("disabled",null,ce,!0)},Fe=async ce=>{await fe("operable",null,ce,!0)};e.watch(()=>qe.value,async()=>{s.value=[],p.value=[]},{deep:!0,immediate:!0});const ba=()=>{e.nextTick(()=>{Z()})},za=ce=>{var H;s.value=(H=s.value)==null?void 0:H.map(q=>({...q,isFormColHidden:!(ce!=null&&ce.includes(q.label))}))};e.onUnmounted(()=>{U.value=null});const F=ce=>{t("clickTrigger",ce)},j=async ce=>{var H,q,ze,we,na,ta;if(ce===""){let _a="";(H=s.value)==null||H.forEach(Le=>{Le!=null&&Le.isMain&&(_a=Le==null?void 0:Le.value)});let ya=await ve.getItemData(Pe.value,sessionStorage.getItem("systemKey"),"");_a=((ta=(na=(we=(ze=(q=ya==null?void 0:ya[0])==null?void 0:q.compData)==null?void 0:ze.find(Le=>(Le==null?void 0:Le.key)==="mainRouters"))==null?void 0:we.contents)==null?void 0:na[0])==null?void 0:ta.routerContent)+Na.value+_a;let va=await ve.getItemData(_a,sessionStorage.getItem("systemKey"),"");I.value=!0,P.value=va==null?void 0:va.filter(Le=>(Le==null?void 0:Le.comp)!=="methodButton"),t("routeUrl",P.value)}},Z=()=>{var H;const ce=(H=U.value)==null?void 0:H.$el;ce&&Cl.Sortable.create(ce,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:q=>{const{oldIndex:ze,newIndex:we}=q;if(ze===we)return;const na=s.value.splice(ze,1)[0];s.value.splice(we,0,na)}})},fe=async(ce,H,q,ze=!1)=>{try{pe.setRefreshCurStructure(!1)}catch{Wa.ElMessage.error("编辑处理失败")}},me=async(ce,H)=>{await fe()},pa=async(ce,H)=>{ce&&await fe()},Qe=async(ce,H,q)=>{await fe(H,q,ce,!1)},de=(ce,H)=>{oe.value===H?X.value=!1:X.value=!0,oe.value=H==null?void 0:H.changeProp},Ce=async ce=>{var ta;$.value=ce;const H=n.itemData,q=H==null?void 0:H.find(_a=>(_a==null?void 0:_a.key)==="backGroundImage");q?q.contents=ce:H==null||H.push({key:"backGroundImage",contents:ce}),t("change",{key:"backGroundImage",contents:ce});const ze=N==null?void 0:N.value,we=n==null?void 0:n.index,na=(ta=Se==null?void 0:Se.value)==null?void 0:ta.plat_id;if(!(!ze||!na||!we||!ce))try{await O.pageBatchAddApi({platId:parseInt(na),changeContents:[{tableName:`content_${ze}`,tableContents:[{backgroundImg_url:ce,relatedForm_id:String(we)}]}],user_unique_id:"0"})}catch(_a){console.error("保存背景图片记录失败:",_a),Wa.ElMessage.error("背景图片记录保存失败")}},ha=async ce=>{var q,ze,we,na,ta,_a,ya,Pa,va,Le,Ra,pl,_l,Xl,bl;let H=[];if((q=ce==null?void 0:ce.toString())!=null&&q.includes(".urdf")){if(ce.includes(",")){Wa.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:ce,extension:m(ce)}],u.value=!0,v.value=!0;return}if((ze=ce==null?void 0:ce.toString())!=null&&ze.includes(".stl")||(we=ce==null?void 0:ce.toString())!=null&&we.includes(".STL")||(na=ce==null?void 0:ce.toString())!=null&&na.includes(".obj")||(ta=ce==null?void 0:ce.toString())!=null&&ta.includes(".mtl")){const Ua=((_a=ce==null?void 0:ce.toString())==null?void 0:_a.split(",")).map($l=>({url:$l,extension:m($l)}));p.value=Ua,u.value=!1,v.value=!0;return}if((ya=ce==null?void 0:ce.toString())!=null&&ya.includes(".stl")||(Pa=ce==null?void 0:ce.toString())!=null&&Pa.includes(".STL")||(va=ce==null?void 0:ce.toString())!=null&&va.includes(".obj")||(Le=ce==null?void 0:ce.toString())!=null&&Le.includes(".mtl")){let Vl,Ua=[],$l={};if(Array.isArray(ce)?Vl=ce:Vl=ce==null?void 0:ce.split(","),Vl==null||Vl.forEach(zl=>{zl.includes(".mtl")?Ua.push(zl):$l.blob=$l.blob?$l.blob+","+zl:zl}),(Ua==null?void 0:Ua.length)>0&&($l.mtlBlobs=Ua),(pl=(Ra=Object.values($l))==null?void 0:Ra[0])!=null&&pl.includes("http:"))H.push($l);else{const zl=new Blob([$l.blob],{type:"application/octet-stream;charset=UTF-8"});let La=URL.createObjectURL(zl),al="";(_l=ce==null?void 0:ce.split("/"))==null||_l.forEach((nl,ia)=>{var ja;ia===((ja=ce==null?void 0:ce.split("/"))==null?void 0:ja.length)-1&&(al=nl)}),(Xl=$l.blob)!=null&&Xl.includes(".stl")&&(al=(al==null?void 0:al.replaceAll(">",""))+".urdf"),z.value=[{name:al,blobUrl:La}],C.value=!0}}else{const Vl=Fi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ua=await Wa.axios.get(ce,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Vl.close()}),$l=new Blob([Ua.data],{type:"application/octet-stream;charset=UTF-8"});let zl=URL.createObjectURL($l),La="";(bl=ce==null?void 0:ce.split("/"))==null||bl.forEach((al,nl)=>{var ia;nl===((ia=ce==null?void 0:ce.split("/"))==null?void 0:ia.length)-1&&(La=al)}),z.value=[{name:La,blobUrl:zl}],C.value=!0}(H==null?void 0:H.length)>0&&S.setBlobUrls(H)},Ue=()=>{C.value=!1},Ma=ce=>{var na,ta,_a,ya;const H=(ta=(na=ll.safeClone(n.itemData))==null?void 0:na.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent"))==null?void 0:ta.contents,q=ll.safeClone(ce.content);let ze={};q&&((_a=Object.values(q))==null?void 0:_a.length)>0&&((ya=Object.values(q))==null||ya.forEach((Pa,va)=>{ze[H[va].key]=Pa}));const we={content:ze,index:n==null?void 0:n.index,buttonName:ce==null?void 0:ce.buttonName};t("change",we)};e.computed(()=>"http://222.92.178.198:62001");const Ta=async ce=>{var Ra,pl,_l,Xl,bl,Vl,Ua,$l,zl,La,al,nl,ia,ja,Oa,Va;if(!ce)return;(pl=(Ra=n==null?void 0:n.itemData)==null?void 0:Ra.find(ye=>(ye==null?void 0:ye.key)==="parentFormPath"))==null||pl.contents;let H=ee.value;(H==null?void 0:H.length)>0&&(H=H==null?void 0:H.map(ye=>{var Oe,ue,ka,ua;let ma=(Oe=ye==null?void 0:ye.key)==null?void 0:Oe.split("/");return(n==null?void 0:n.compName)===(ma==null?void 0:ma[0])&&(ue=s.value)!=null&&ue.find(ea=>(ea==null?void 0:ea.prop)===(ma==null?void 0:ma[1]))&&(ye.value=(ua=(ka=s.value)==null?void 0:ka.find(ea=>(ea==null?void 0:ea.prop)===(ma==null?void 0:ma[1])))==null?void 0:ua.value),ye}),pe.setTableViewContents(H));const q=ll.safeClone(n.itemData);let ze=q==null?void 0:q.map(ye=>{var ma;return(ye==null?void 0:ye.key)==="formContent"&&((ma=ye.contents)==null||ma.map((Oe,ue)=>{var ka,ua,ea,Je,Xe,cl,Ve,Fa,wa,il,Aa,Me,Sl,Il,Gl,Hl,Zl,_r,Fl,pr,Vr;return Oe.type=(ua=(ka=s.value)==null?void 0:ka.find(Ul=>(Ul==null?void 0:Ul.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:ua.type,Oe.options=Oe!=null&&Oe.options?Oe.options:((Xe=(Je=(ea=Oe==null?void 0:Oe.key)==null?void 0:ea.split("$"))==null?void 0:Je[1])==null?void 0:Xe.length)>0?(wa=(Fa=Ru((Ve=(cl=Oe==null?void 0:Oe.key)==null?void 0:cl.split("$"))==null?void 0:Ve[1]))==null?void 0:Fa.split(","))==null?void 0:wa.map(Ul=>({label:Ul,value:Ul})):[],(il=Oe==null?void 0:Oe.key)!=null&&il.includes("$")&&(Oe.key=(Me=(Aa=Oe==null?void 0:Oe.key)==null?void 0:Aa.split("$"))==null?void 0:Me[0]),Oe.signature=(Il=(Sl=s.value)==null?void 0:Sl.find(Ul=>(Ul==null?void 0:Ul.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Il.signature,Oe.isLoginUser=(Hl=(Gl=s.value)==null?void 0:Gl.find(Ul=>(Ul==null?void 0:Ul.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Hl.isLoginUser,Oe.value=(Zl=Object.values(ce))==null?void 0:Zl[ue],Oe.isFormColHidden=(Fl=(_r=s.value)==null?void 0:_r.find(Ul=>(Ul==null?void 0:Ul.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Fl.isFormColHidden,Oe.isHideInForm=(Vr=(pr=s.value)==null?void 0:pr.find(Ul=>(Ul==null?void 0:Ul.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Vr.isHideInForm,Oe})),ye}),we=s.value,na=(Xl=(_l=ll.safeClone(ze))==null?void 0:_l.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Xl.contents;if(we=we==null?void 0:we.map(ye=>{var ma,Oe;return(ye==null?void 0:ye.type)==="Select"&&((ma=ye==null?void 0:ye.allSelectionContents)==null?void 0:ma.length)>0&&(ye.contactValue=ce),ye.value=(Oe=na==null?void 0:na.find((ue,ka)=>((ue==null?void 0:ue.id)??ka)===(ye==null?void 0:ye.id)))==null?void 0:Oe.value,ye}),!X.value){t("contentChange",{contents:ze,index:n.index});return}let ta="",_a=(Ua=(Vl=(bl=ll.safeClone(ze))==null?void 0:bl.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Vl.contents)==null?void 0:Ua.find((ye,ma)=>{var Oe,ue,ka;return(ye==null?void 0:ye.label)===oe.value||ma.toString()===((ka=(ue=(Oe=oe.value)==null?void 0:Oe.split("t"))==null?void 0:ue[1])==null?void 0:ka.toString())}),ya=($l=_a==null?void 0:_a.optionUrl)==null?void 0:$l.menuSelect,Pa=!0;if((al=(La=(zl=ll.safeClone(ze))==null?void 0:zl.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:La.contents)==null||al.forEach(ye=>{var ma,Oe,ue,ka,ua,ea;Pa&&((ue=(Oe=(ma=ye==null?void 0:ye.optionUrl)==null?void 0:ma.groupSelect)==null?void 0:Oe[1])!=null&&ue.includes("["))&&(ta=(ua=(ka=ye==null?void 0:ye.optionUrl)==null?void 0:ka.groupSelect)==null?void 0:ua[1],JSON.stringify(ya)===JSON.stringify((ea=ye==null?void 0:ye.optionUrl)==null?void 0:ea.menuSelect)&&(Pa=!1))}),(nl=_a==null?void 0:_a.optionUrl)!=null&&nl.menuSelect&&X.value){let ye=await kt(_a),ma,Oe=(ia=_a==null?void 0:_a.optionUrl)==null?void 0:ia.menuSelect;if(ye==null||ye.forEach(ue=>{var ka,ua,ea,Je,Xe,cl,Ve,Fa,wa,il;ta===((ua=(ka=_a==null?void 0:_a.optionUrl)==null?void 0:ka.groupSelect)==null?void 0:ua[1])&&((Xe=(Je=(ea=_a==null?void 0:_a.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:Je[1])!=null&&Xe.includes("["))&&((il=ll.safeClone(ue))==null?void 0:il[(wa=(Fa=(Ve=(cl=_a==null?void 0:_a.optionUrl)==null?void 0:cl.groupSelect)==null?void 0:Ve[1])==null?void 0:Fa.replaceAll("[",""))==null?void 0:wa.replaceAll("]","")])===(_a==null?void 0:_a.value)&&(ma=ue)}),ma){let ue=ll.safeClone(we);ue=ue==null?void 0:ue.map(ua=>{var ea,Je,Xe,cl,Ve,Fa,wa,il,Aa,Me,Sl;return(ma!=null&&ma[ua==null?void 0:ua.label]||ma!=null&&ma[(cl=(Xe=(Je=(ea=ua==null?void 0:ua.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:Je[1])==null?void 0:Xe.replaceAll("[",""))==null?void 0:cl.replaceAll("]","")])&&((wa=(Fa=(Ve=ua==null?void 0:ua.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:Fa[1])!=null&&wa.includes("["))&&Oe!=null&&Oe.every(Il=>{var Gl,Hl;return(Hl=(Gl=ua==null?void 0:ua.optionUrl)==null?void 0:Gl.menuSelect)==null?void 0:Hl.includes(Il)})&&(ua.value=(ma==null?void 0:ma[ua==null?void 0:ua.label])||(ma==null?void 0:ma[(Sl=(Me=(Aa=(il=ua==null?void 0:ua.optionUrl)==null?void 0:il.groupSelect)==null?void 0:Aa[1])==null?void 0:Me.replaceAll("[",""))==null?void 0:Sl.replaceAll("]","")]),Array.isArray(ua.value)&&ua.value.every(Il=>(Il==null?void 0:Il.url)&&(Il==null?void 0:Il.name))&&(ua.type="Upload")),ua}),ue=ue==null?void 0:ue.map(ua=>{var ea,Je,Xe;return(ea=ua==null?void 0:ua.optionUrl)!=null&&ea.oldMenuSelect&&(ua.optionUrl.menuSelect=(Xe=(Je=ll.safeClone(ua))==null?void 0:Je.optionUrl)==null?void 0:Xe.oldMenuSelect),ua}),s.value=ll.safeClone(ue);let ka=ll.safeClone(ue);ka=ka==null?void 0:ka.map(ua=>{var ea,Je,Xe,cl,Ve,Fa;return(Je=(ea=ua==null?void 0:ua.optionUrl)==null?void 0:ea.menuSelect)!=null&&Je.some(wa=>wa==null?void 0:wa.includes("["))&&(ua.optionUrl.oldMenuSelect=(cl=(Xe=ll.safeClone(ua))==null?void 0:Xe.optionUrl)==null?void 0:cl.menuSelect,ua.optionUrl.menuSelect=(Fa=(Ve=ua==null?void 0:ua.optionUrl)==null?void 0:Ve.menuSelect)==null?void 0:Fa.map(wa=>{var il,Aa,Me,Sl;if(wa!=null&&wa.includes("[")){let Il=(Aa=(il=wa==null?void 0:wa.replaceAll("[","").replaceAll("]",""))==null?void 0:il.split(":"))==null?void 0:Aa[1];wa=(Sl=(Me=ll.safeClone(ue))==null?void 0:Me.find(Gl=>(Gl==null?void 0:Gl.label)===Il))==null?void 0:Sl.value}return wa})),ua}),s.value=ka}else s.value=we;ze=ze==null?void 0:ze.map(ue=>{var ka;return(ue==null?void 0:ue.key)==="formContent"&&(ue.contents=(ka=ue.contents)==null?void 0:ka.map(ua=>{var ea,Je,Xe,cl;return ua.value=((Je=(ea=s.value)==null?void 0:ea.find(Ve=>(Ve==null?void 0:Ve.label)===(ua==null?void 0:ua.key)))==null?void 0:Je.value)??(ua==null?void 0:ua.value),ua.type=((cl=(Xe=s.value)==null?void 0:Xe.find(Ve=>(Ve==null?void 0:Ve.prop)===(ua==null?void 0:ua.key)))==null?void 0:cl.type)??(ua==null?void 0:ua.type),ua})),ue})}X.value=!1,t("contentChange",{contents:ze,index:n.index});let va=[],Le=[];if((Oa=ll.safeClone((ja=ze==null?void 0:ze.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:ja.contents))==null||Oa.forEach(ye=>{var ma;Array.isArray(ye==null?void 0:ye.value)&&((ma=ye==null?void 0:ye.value)!=null&&ma.find(Oe=>{var ue;return(ue=Oe==null?void 0:Oe.url)==null?void 0:ue.includes(".obj")}))&&(Le=ye==null?void 0:ye.value)}),(Le==null?void 0:Le.length)>0){const ye=(Va=ll.safeClone(Le))==null?void 0:Va.filter(ma=>{var Oe;return(Oe=ma==null?void 0:ma.url)==null?void 0:Oe.includes(".obj")});ye==null||ye.forEach(ma=>{var ue,ka,ua,ea;const Oe=(ue=Le==null?void 0:Le.filter(Je=>{var Xe;return(Je==null?void 0:Je.name)===(ma==null?void 0:ma.name)&&((Xe=Je==null?void 0:Je.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:ue.map(Je=>Je==null?void 0:Je.url);va.push({objUrl:ma==null?void 0:ma.url,mtlUrls:((ka=Le==null?void 0:Le.filter(Je=>{var Xe;return(Je==null?void 0:Je.name)===(ma==null?void 0:ma.name)&&((Xe=Je==null?void 0:Je.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:ka.length)===1?(ea=(ua=Le==null?void 0:Le.filter(Je=>{var Xe;return(Je==null?void 0:Je.name)===(ma==null?void 0:ma.name)&&((Xe=Je==null?void 0:Je.url)==null?void 0:Xe.includes(".mtl"))}))==null?void 0:ua[0])==null?void 0:ea.url:Oe})}),S.setObjUrl(va)}},Ze=(ce,H,q)=>{let ze="";const we=H==null?void 0:H.map(na=>{var ta;return(ta=na==null?void 0:na.value)==null?void 0:ta.pageData});return we==null||we.forEach(na=>{var ta;(na==null?void 0:na.name)===(ce==null?void 0:ce[0])&&((ta=na==null?void 0:na.compData)==null||ta.forEach(_a=>{var ya;(_a==null?void 0:_a.key)==="formContent"&&((ya=_a==null?void 0:_a.contents)==null||ya.forEach(Pa=>{var va;(Pa==null?void 0:Pa.prop)===(ce==null?void 0:ce[1])&&(ze=(Pa==null?void 0:Pa.value)===""?ve.judgeContents((va=ll.safeClone(Pa))==null?void 0:va.optionUrl,q):Pa==null?void 0:Pa.value)}))}))}),ze},oa=(ce,H,q,ze)=>{var _a,ya;let we="",na="";(_a=ll.safeClone(H))==null||_a.forEach((Pa,va)=>{Pa!=null&&Pa.includes("[")?na=na+Na.value+ce[va]:na=na===""?na+Pa:na+"/"+Pa});let ta=(ya=ze[na])==null?void 0:ya.map(Pa=>{var va;return(va=Pa==null?void 0:Pa.value)==null?void 0:va.pageData});return ta==null||ta.forEach(Pa=>{var va;(Pa==null?void 0:Pa.name)===(q==null?void 0:q[0])&&((va=Pa==null?void 0:Pa.compData)==null||va.forEach(Le=>{var Ra;(Le==null?void 0:Le.key)==="formContent"&&((Ra=Le==null?void 0:Le.contents)==null||Ra.forEach(pl=>{(pl==null?void 0:pl.prop)===(q==null?void 0:q[1])&&(we=pl==null?void 0:pl.value)}))}))}),we};return e.watch(()=>N==null?void 0:N.value,async()=>{await Ke()},{immediate:!0}),e.watch(()=>n.itemData,async()=>{var Ra,pl,_l,Xl,bl,Vl,Ua,$l,zl,La,al,nl,ia,ja,Oa,Va,ye,ma,Oe,ue,ka,ua,ea;const ce=(Ra=n.itemData)==null?void 0:Ra.find(Je=>(Je==null?void 0:Je.key)==="formContent"),H=(pl=ll.safeClone(n.itemData))==null?void 0:pl.find(Je=>(Je==null?void 0:Je.key)==="formButton"),q=(_l=ll.safeClone(n.itemData))==null?void 0:_l.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),ze=(Xl=ll.safeClone(n.itemData))==null?void 0:Xl.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),we=(bl=ll.safeClone(n.itemData))==null?void 0:bl.find(Je=>(Je==null?void 0:Je.key)==="enableWrap"),na=(Vl=ll.safeClone(n.itemData))==null?void 0:Vl.find(Je=>(Je==null?void 0:Je.key)==="textSize"),ta=(Ua=ll.safeClone(n.itemData))==null?void 0:Ua.find(Je=>(Je==null?void 0:Je.key)==="textRGBA"),_a=($l=ll.safeClone(n.itemData))==null?void 0:$l.find(Je=>(Je==null?void 0:Je.key)==="backGround"),ya=(zl=ll.safeClone(n.itemData))==null?void 0:zl.find(Je=>(Je==null?void 0:Je.key)==="backGroundImage");(ze==null?void 0:ze.contents)==="纵向"?k.value=!1:k.value=!0;const Pa=Number(na==null?void 0:na.contents);b.value=Number.isNaN(Pa)?void 0:Pa,y.value=ta==null?void 0:ta.contents,L.value=_a==null?void 0:_a.contents,$.value=ya==null?void 0:ya.contents;const va=we==null?void 0:we.contents;if(va===void 0?w.value=ti.BLOCK:typeof va=="boolean"?w.value=va?ti.ORDINARY:ti.BLOCK:w.value=va,K.value=typeof(q==null?void 0:q.contents)!="boolean"?!(!(q!=null&&q.contents)===""||((La=q==null?void 0:q.contents)==null?void 0:La.toUpperCase())==="VERTICAL"):q==null?void 0:q.contents,((al=ce==null?void 0:ce.contents)==null?void 0:al.length)>0&&Array.isArray(ce==null?void 0:ce.contents)){let Je=n.allMapContents;const Xe=(ia=(nl=ll.safeClone(ce))==null?void 0:nl.contents)==null?void 0:ia.map((Me,Sl)=>{var Br,yr,Ar,zr,nr,kn,Gr,rn,An,xn,mn,nn,ar;let Il=(Me==null?void 0:Me.label)??(Me==null?void 0:Me.key)??"";Me==null||Me.type;let Gl=(Me==null?void 0:Me.options)??[];if((Br=Me==null?void 0:Me.key)!=null&&Br.includes("$")&&(Il=(yr=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:yr[0],((zr=(Ar=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:Ar[1])==null?void 0:zr.length)>0)){const[Wl,Tl]=(kn=(nr=ll.safeClone(Me==null?void 0:Me.key).split("$"))==null?void 0:nr[1])==null?void 0:kn.split(/[()]/);(Gr=ve.FormType.find(Ol=>(Ol==null?void 0:Ol.key)===Wl))==null||Gr.value,((rn=Tl==null?void 0:Tl.split(","))==null?void 0:rn.length)>0&&(Gl=(An=Tl==null?void 0:Tl.split(","))==null?void 0:An.map(Ol=>({label:Ol,value:Ol})))}let Hl=Me==null?void 0:Me.options;((xn=Me==null?void 0:Me.optionUrl)==null?void 0:xn.selectRelateType)==="自定义绑定"&&(Hl=(nn=(mn=Me==null?void 0:Me.optionUrl)==null?void 0:mn.defaultSelect)==null?void 0:nn.map(Wl=>({label:Wl,value:Wl})));let Zl=(Me==null?void 0:Me.menuPath)??[],_r=(Me==null?void 0:Me.groups)??[],Fl=(Me==null?void 0:Me.columns)??[],pr=!1,Vr=(Me==null?void 0:Me.isFormColHidden)??!1,Ul="",lr=Me!=null&&Me.value?Me.value:(Hl==null?void 0:Hl.length)>0?(ar=Hl==null?void 0:Hl[0])==null?void 0:ar.value:(Me==null?void 0:Me.value)??"",Lr=!1,Nr="Input";return((Hl==null?void 0:Hl.length)>0||(Zl==null?void 0:Zl.length)>0)&&(Nr="Select"),(Array.isArray(Ul)&&(Ul!=null&&Ul.every(Wl=>(Wl==null?void 0:Wl.name)&&(Wl==null?void 0:Wl.url)))||Array.isArray(lr)&&(lr!=null&&lr.every(Wl=>(Wl==null?void 0:Wl.name)&&(Wl==null?void 0:Wl.url))))&&(Nr="upload"),Me!=null&&Me.isMainUrl&&(Nr="Url"),{label:Il??"",name:Il??"t"+Sl,prop:Il??ll.safeClone(Me==null?void 0:Me.key),type:(Me==null?void 0:Me.type)??Nr,value:(Me==null?void 0:Me.type)==="Date"&&lr===""?new Date:lr,id:(Me==null?void 0:Me.id)??Sl,contents:(Hl==null?void 0:Hl.length)>0?Hl:Gl??[],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:Vr,isHideInForm:(Me==null?void 0:Me.isHideInForm)??!1,signature:Lr,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:Zl,groups:_r,words:Fl,allSelectionContents:Me==null?void 0:Me.allContents,filterContent:Me==null?void 0:Me.filterContents,isNoClick:(Me==null?void 0:Me.isNoClick)??!1}}),cl=Xe==null?void 0:Xe.map(Me=>Me==null?void 0:Me.value);let Ve="";cl==null||cl.forEach(Me=>{Me!==""&&Me!==void 0&&(Ve=Ve===""?Me:Ve+"/"+Me)}),E.setSelectArray(cl),E.setSelectString(Ve);let Fa=(ja=ll.safeClone(Xe))==null?void 0:ja.map(Me=>(Me!=null&&Me.value&&ve.IsJson(Me==null?void 0:Me.value)&&Array.isArray(JSON.parse(Me==null?void 0:Me.value))&&(Me.value=JSON.parse(Me.value)),Me)),wa={};Fa==null||Fa.forEach(Me=>{wa[Me.label]=Me==null?void 0:Me.value}),Fa=Fa==null?void 0:Fa.map(Me=>{var Sl,Il,Gl,Hl,Zl,_r,Fl,pr,Vr;if((Me==null?void 0:Me.type)==="Select"&&((Sl=Me==null?void 0:Me.allSelectionContents)==null?void 0:Sl.length)>0&&(Me.contactValue=wa),(Gl=(Il=Me==null?void 0:Me.optionUrl)==null?void 0:Il.menuSelect)!=null&&Gl.some(Ul=>Ul==null?void 0:Ul.includes("["))){let Ul="";Me.optionUrl.oldMenuSelect=(Zl=(Hl=ll.safeClone(Me))==null?void 0:Hl.optionUrl)==null?void 0:Zl.menuSelect,Me.optionUrl.menuSelect=(Fl=(_r=Me==null?void 0:Me.optionUrl)==null?void 0:_r.menuSelect)==null?void 0:Fl.map(lr=>{var Lr,Nr,$r,Br,yr,Ar;if(lr!=null&&lr.includes("[")){let zr=(Nr=(Lr=lr==null?void 0:lr.replaceAll("[","").replaceAll("]",""))==null?void 0:Lr.split(":"))==null?void 0:Nr[1];Ul=Ze(($r=lr==null?void 0:lr.replaceAll("[","").replaceAll("]",""))==null?void 0:$r.split(":"),Je==null?void 0:Je[qe.value],Je),lr=((yr=(Br=ll.safeClone(Fa))==null?void 0:Br.find(nr=>(nr==null?void 0:nr.label)===zr))==null?void 0:yr.value)||Ze((Ar=lr==null?void 0:lr.replaceAll("[","").replaceAll("]",""))==null?void 0:Ar.split(":"),Je==null?void 0:Je[qe.value],Je)}return lr}),Ul!==""&&Me.value===""&&(Me.value=oa(Me.optionUrl.menuSelect,Me.optionUrl.oldMenuSelect,(pr=Me==null?void 0:Me.optionUrl)==null?void 0:pr.groupSelect,Je),Array.isArray(Me.value)&&((Vr=Me.value)!=null&&Vr.every(lr=>lr==null?void 0:lr.url))&&(Me.type="UPLOAD"))}return Me}),s.value=Fa,Te.value=((Oa=s.value)==null?void 0:Oa.every(Me=>Me==null?void 0:Me.disabled))||ge.value===qe.value,le.value=(Va=s.value)==null?void 0:Va.every(Me=>Me==null?void 0:Me.operable),Ie.value=(ye=s.value)==null?void 0:ye.map(Me=>Me==null?void 0:Me.label);let il=[],Aa=[];if((ma=ll.safeClone(s.value))==null||ma.forEach(Me=>{var Sl;Array.isArray(Me==null?void 0:Me.value)&&((Sl=Me==null?void 0:Me.value)!=null&&Sl.find(Il=>{var Gl;return(Gl=Il==null?void 0:Il.url)==null?void 0:Gl.includes(".obj")}))&&(Aa=Me==null?void 0:Me.value)}),(Aa==null?void 0:Aa.length)>0){const Me=(Oe=ll.safeClone(Aa))==null?void 0:Oe.filter(Sl=>{var Il;return(Il=Sl==null?void 0:Sl.url)==null?void 0:Il.includes(".obj")});Me==null||Me.forEach(Sl=>{var Gl,Hl,Zl,_r;const Il=(Gl=Aa==null?void 0:Aa.filter(Fl=>{var pr;return(Fl==null?void 0:Fl.name)===(Sl==null?void 0:Sl.name)&&((pr=Fl==null?void 0:Fl.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Gl.map(Fl=>Fl==null?void 0:Fl.url);il.push({objUrl:Sl==null?void 0:Sl.url,mtlUrls:((Hl=Aa==null?void 0:Aa.filter(Fl=>{var pr;return(Fl==null?void 0:Fl.name)===(Sl==null?void 0:Sl.name)&&((pr=Fl==null?void 0:Fl.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Hl.length)===1?(_r=(Zl=Aa==null?void 0:Aa.filter(Fl=>{var pr;return(Fl==null?void 0:Fl.name)===(Sl==null?void 0:Sl.name)&&((pr=Fl==null?void 0:Fl.url)==null?void 0:pr.includes(".mtl"))}))==null?void 0:Zl[0])==null?void 0:_r.url:Il})}),S.setObjUrl(il)}(ue=ll.safeClone(s.value))==null||ue.forEach(Me=>{var Sl,Il,Gl,Hl,Zl,_r,Fl,pr,Vr,Ul,lr,Lr,Nr;if((Il=(Sl=Me==null?void 0:Me.value)==null?void 0:Sl.toString())!=null&&Il.includes(".stl")||(Hl=(Gl=Me==null?void 0:Me.value)==null?void 0:Gl.toString())!=null&&Hl.includes(".STL")||(_r=(Zl=Me==null?void 0:Me.value)==null?void 0:Zl.toString())!=null&&_r.includes(".obj")||(pr=(Fl=Me==null?void 0:Me.value)==null?void 0:Fl.toString())!=null&&pr.includes(".mtl")||(Ul=(Vr=Me==null?void 0:Me.value)==null?void 0:Vr.toString())!=null&&Ul.includes(".urdf")){let $r={},Br=[],yr;Array.isArray(Me==null?void 0:Me.value)?yr=Me==null?void 0:Me.value:yr=(lr=Me==null?void 0:Me.value)==null?void 0:lr.split(","),yr==null||yr.forEach(Ar=>{Ar.includes(".mtl")?Br.push(Ar):$r.blob=$r.blob==="undefined"?Ar:$r.blob+","+Ar}),(Br==null?void 0:Br.length)>0&&($r.mtlBlobs=Br),(Nr=(Lr=Object.values($r))==null?void 0:Lr[0])!=null&&Nr.includes("http:")}})}else s.value=[];let Le=ee.value;if((Le==null?void 0:Le.length)>0&&(Le=Le==null?void 0:Le.map(Je=>{var cl,Ve,Fa,wa;let Xe=(cl=Je==null?void 0:Je.key)==null?void 0:cl.split("/");return(n==null?void 0:n.compName)===(Xe==null?void 0:Xe[0])&&(Ve=s.value)!=null&&Ve.find(il=>(il==null?void 0:il.prop)===(Xe==null?void 0:Xe[1]))&&(Je.value=(wa=(Fa=s.value)==null?void 0:Fa.find(il=>(il==null?void 0:il.prop)===(Xe==null?void 0:Xe[1])))==null?void 0:wa.value),Je}),pe.setTableViewContents(Le)),n!=null&&n.formRules)c.value=n==null?void 0:n.formRules;else{let Je={};(ka=ll.safeClone(s).value)==null||ka.forEach(Xe=>{((Xe==null?void 0:Xe.isMain)===!0||(Xe==null?void 0:Xe.required)===!0)&&(Je[(Xe==null?void 0:Xe.prop)??(Xe==null?void 0:Xe.name)]=[{required:!0,message:`${(Xe==null?void 0:Xe.label)||(Xe==null?void 0:Xe.prop)||(Xe==null?void 0:Xe.name)}不能为空`}])}),c.value=Je}if(((ua=H==null?void 0:H.contents)==null?void 0:ua.length)>0){const Je=[];(ea=H==null?void 0:H.contents)==null||ea.forEach((Xe,cl)=>{(Xe==null?void 0:Xe.label)!==""&&Je.push({label:(Xe==null?void 0:Xe.label)??"",id:(Xe==null?void 0:Xe.id)??cl,type:(Xe==null?void 0:Xe.type)??"",background:Xe==null?void 0:Xe.background})}),G.value=Je}else G.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ge.value,ce=>{Te.value=ce===qe.value},{immediate:!0}),(ce,H)=>{var _a;const q=e.resolveComponent("svg-icon"),ze=e.resolveComponent("el-switch"),we=e.resolveComponent("el-checkbox"),na=e.resolveComponent("el-popover"),ta=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",j3,[w.value===e.unref(ti).TEXT?(e.openBlock(),e.createBlock(Ac,{key:0,itemData:a.itemData,compName:a.compName,fields:s.value,textSize:b.value,textColor:y.value,backGround:L.value,backGroundImage:$.value,disabled:Te.value||he(),"onUpdate:backGroundImage":Ce},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):w.value===e.unref(ti).BLOCK?(e.openBlock(),e.createBlock(Cf,{key:1,items:(_a=s.value)==null?void 0:_a.map(ya=>({label:ya!=null&&ya.isHideInForm?"":ya==null?void 0:ya.label,value:ya==null?void 0:ya.value,width:(ya==null?void 0:ya.width)??1,field:ya})),textSize:b.value,textColor:y.value,backGround:L.value,backGroundImage:$.value,disabled:Te.value||he(),"onUpdate:backGroundImage":Ce},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(ti).ORDINARY})},[e.createVNode(ll.ssForm,{rowContents:s.value,formRules:c.value,buttonValue:G.value,isRowFlex:!1,isEnableWrap:!0,textSize:b.value,textColor:y.value,backGround:L.value,backGroundImage:$.value,onOnButtonClick:Ma,onChange:Ta,formDisabled:Te.value||he(),formLabelsOperable:le.value,isButtonRow:k.value,onPreview:ha,onBlurChange:de,onHandleColEditChange:me,onHandleColTypeChange:pa,onRouteUrl:j,onClickTrigger:F,"onUpdate:backGroundImage":Ce},{operateCol:e.withCtx(({renderColumns:ya,formDisabled:Pa,formLabelsOperable:va})=>[e.createVNode(na,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ba},{reference:e.withCtx(()=>[e.createElementVNode("span",H3,[e.createVNode(q,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",U3,[H[1]||(H[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(ze,{"model-value":Pa,"active-text":"禁用","inactive-text":"",onChange:Be,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(ze,{"model-value":va,"active-text":"编辑所有标签","inactive-text":"",onChange:Fe},null,8,["model-value"]),H[2]||(H[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(ta,{modelValue:Ie.value,"onUpdate:modelValue":H[0]||(H[0]=Le=>Ie.value=Le),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:U,onChange:za},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ya,Le=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Le.label},[e.createVNode(we,{value:Le.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(Le.label),1)]),_:2},1032,["value"]),e.createVNode(na,{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 Ra;return[e.createElementVNode("div",q3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ra=Object.keys(Le))==null?void 0:Ra.filter(pl=>{var _l;return(_l=se.value)==null?void 0:_l.find(Xl=>(Xl==null?void 0:Xl.value)===pl)}),pl=>{var _l,Xl;return e.openBlock(),e.createElementBlock("div",{key:pl},[e.createVNode(ll._sfc_main$1,{value:Le==null?void 0:Le[pl],"active-text":(Xl=(_l=se.value)==null?void 0:_l.find(bl=>(bl==null?void 0:bl.value)===pl))==null?void 0:Xl.label,inactiveText:"",onChange:bl=>Qe(bl,pl,Le)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",W3,[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)),C.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:3,fileDataList:z.value,onDestroy:Ue},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(Eo.ThreeViewerHost,{files:p.value,onGetAnimationData:ce.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},ws=er._export_sfc(K3,[["__scopeId","data-v-7bb009b3"]]),Io=e.ref(0),zc=a=>{var l;return!a||(a==null?void 0:a.length)===0?[]:(l=O.cloneDeep(a))==null?void 0:l.map(n=>(Io.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)??Io.value,children:zc(n==null?void 0:n.children)},n))},G3=a=>{var r;return(r=O.cloneDeep(a))==null?void 0:r.map(n=>(Io.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)??Io.value,children:zc(n==null?void 0:n.children)},n))},Mc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===l)?(r=O.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=Mc(n==null?void 0:n.children,l),n)),a)},Ic=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=O.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=Ic(n==null?void 0:n.children,l),n)),a)},Oc=(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=O.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=Oc(n==null?void 0:n.children,l),n)),a)},Lc=(a,l)=>{var r;return a!=null&&a.find(n=>(n==null?void 0:n.id)===(l==null?void 0:l.id))?(r=O.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=Lc(n==null?void 0:n.children,l),n)),a)},tr=[{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"}],Y3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],J3=[{label:"新增",value:"add"}],$n=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:J3},{key:"background",label:"按钮背景色",type:"Color"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Y3},{key:"textColor",label:"按钮颜色",type:"Color"}],X3={class:"table-header-child"},Z3={class:"table-header-child-main"},Q3={class:"table-header-child-content"},eh={class:"table-header-child-content-item"},ah={class:"fix-button"},lh={key:0},rh={class:"form-content"},nh={__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=ve.useTableComp(O.pinia),{tableIndex:u}=O.storeToRefs(v);e.ref(0);const p=e.ref(""),m=e.ref([]),c=e.ref([]),k=E=>{var w;t.value=!0;let S=[];tr==null||tr.forEach(b=>{let y=O.cloneDeep(u.value)+1;v.setTableIndex(y),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:u.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}),p.value=E==null?void 0:E.id,m.value=S,c.value=S},C=E=>{n("fixChange",O.cloneDeep(E))},V=E=>{n("deleteChange",O.cloneDeep(E))},_=E=>{t.value=!0;let S=[];tr==null||tr.forEach(w=>{let b=O.cloneDeep(u.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:u.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=S,c.value=S},G=E=>{let S=O.cloneDeep(c.value);S=S==null?void 0:S.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),c.value=S},z=()=>{var S,w;m.value=c.value;let E={};if(p.value!=="")E.id=p.value,(S=m.value)==null||S.forEach(b=>{const y=tr==null?void 0:tr.find(L=>(L==null?void 0:L.label)===(b==null?void 0:b.label));y?E[y.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),t.value=!1,n("fixChange",{contents:O.cloneDeep(E),id:s.value,type:"fix"});else{let b=O.cloneDeep(u.value)+1;v.setTableIndex(b),E.id="id"+u.value,(w=m.value)==null||w.forEach(y=>{const L=tr==null?void 0:tr.find($=>($==null?void 0:$.label)===(y==null?void 0:y.label));L?E[L.key]=y.value:y!=null&&y.children&&y.children.length>0&&(E.children=y.children)}),t.value=!1,n("fixChange",{contents:O.cloneDeep(E),id:s.value,type:"add"})}p.value="",m.value=[],c.value=[]},I=()=>{t.value=!1,p.value="",s.value="",m.value=[],c.value=[]},P=E=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(E,S)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",X3,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(b,y)=>(e.openBlock(),e.createElementBlock("div",Z3,[e.createElementVNode("div",Q3,[e.createElementVNode("div",eh,e.toDisplayString(b.label),1),e.createElementVNode("div",ah,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:L=>_(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:L=>k(b)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:L=>P(b)},null,8,["onClick"])])]),b!=null&&b.children&&b.children.length>0?(e.openBlock(),e.createElementBlock("div",lh,[e.createVNode($c,{tableChildContents:b==null?void 0:b.children,onDeleteChange:V,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:I,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",rh,[(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:I,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:z},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ih=er._export_sfc(nh,[["__scopeId","data-v-e0fef72d"]]),oh={class:"table-header-child"},th={class:"table-header-child-main"},sh={class:"table-header-child-content"},ch={class:"table-header-child-content-item"},uh={class:"fix-button"},dh={key:0},ph={class:"form-content"},fh={class:"dialog-footer"},hh={__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=ve.useTableComp(O.pinia),{tableIndex:u}=O.storeToRefs(v),p=e.ref(""),m=e.ref([]),c=e.ref([]),k=E=>{n("fixChange",O.cloneDeep(E))},C=E=>{var w;t.value=!0;let S=[];tr==null||tr.forEach(b=>{let y=O.cloneDeep(u.value)+1;v.setTableIndex(y),S.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:E[b.key],id:u.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}),p.value=E==null?void 0:E.id,m.value=S,c.value=S},V=E=>{t.value=!0;let S=[];tr==null||tr.forEach(w=>{let b=O.cloneDeep(u.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:u.value,contents:w==null?void 0:w.options})}),s.value=E==null?void 0:E.id,m.value=S,c.value=S},_=E=>{let S=O.cloneDeep(c.value);S=S==null?void 0:S.map(w=>(w.children||(w.value=E==null?void 0:E[w.name]),w)),c.value=S},G=()=>{var S,w;m.value=c.value;let E={};if(p.value!=="")E.id=p.value,(S=m.value)==null||S.forEach(b=>{const y=tr==null?void 0:tr.find(L=>(L==null?void 0:L.label)===(b==null?void 0:b.label));y?E[y.key]=b.value:b!=null&&b.children&&b.children.length>0&&(E.children=b.children)}),t.value=!1,n("fixChange",{contents:O.cloneDeep(E),id:s.value,type:"fix"});else{let b=O.cloneDeep(u.value)+1;v.setTableIndex(b),E.id="idChild"+u.value,(w=m.value)==null||w.forEach(y=>{const L=tr==null?void 0:tr.find($=>($==null?void 0:$.label)===(y==null?void 0:y.label));L?E[L.key]=y.value:y!=null&&y.children&&y.children.length>0&&(E.children=y.children)}),t.value=!1,n("fixChange",{contents:O.cloneDeep(E),id:s.value,type:"add"})}p.value="",m.value=[],c.value=[]},z=()=>{t.value=!1,p.value="",s.value="",m.value=[],c.value=[]},I=E=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{n("deleteChange",E),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=E=>{n("deleteChange",E)};return(E,S)=>{const w=e.resolveComponent("svg-icon"),b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(y,L)=>(e.openBlock(),e.createElementBlock("div",th,[e.createElementVNode("div",sh,[e.createElementVNode("div",ch,e.toDisplayString(y.label),1),e.createElementVNode("div",uh,[e.createVNode(w,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>V(y)},null,8,["onClick"]),e.createVNode(w,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>C(y)},null,8,["onClick"]),e.createVNode(w,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>I(y)},null,8,["onClick"])])]),y!=null&&y.children&&y.children.length>0?(e.openBlock(),e.createElementBlock("div",dh,[e.createVNode(ih,{tableChildContents:y==null?void 0:y.children,onDeleteChange:P,onFixChange:k},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:z,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ph,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",fh,[e.createVNode(b,{onClick:z,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"])])}}},$c=er._export_sfc(hh,[["__scopeId","data-v-ebd68fa1"]]),vh={class:"table-operate-content"},mh={class:"table-operate-item"},yh={class:"operate-title"},gh={class:"operate-content"},bh={class:"fix-content"},kh={class:"fix-content-label"},xh={class:"fix-button"},wh={key:0},_h={class:"operate-title"},Sh={class:"operate-content"},Eh={class:"fix-content"},Ch={class:"fix-content-label"},Dh={class:"fix-button"},Nh={class:"operate-title"},Th={class:"operate-content"},Bh={class:"fix-content"},Ah={class:"fix-content-label"},zh={class:"fix-button"},Mh={class:"operate-title"},Ih={class:"operate-content"},Oh={class:"fix-content"},Lh={class:"fix-content-label"},$h={class:"fix-button"},Rh={class:"operate-content"},Vh={style:{display:"flex","justify-content":"space-between"}},Fh={class:"form-content"},Ph={class:"dialog-footer"},jh={class:"form-content"},Hh={class:"dialog-footer"},Uh={class:"form-content"},qh={class:"dialog-footer"},Wh={class:"form-content"},Kh={class:"dialog-footer"},Gh={__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),u=e.ref([]),p=e.ref(!1),m=e.ref([]),c=e.ref(!1),k=e.ref([]),C=e.ref(""),V=e.ref(""),_=e.ref([]),G=e.ref([]),z=e.ref([]),I=e.ref([]),P=e.ref(!1),E=e.ref([]),S=e.ref([]),w=e.ref(0),b=e.ref([]),y=e.ref([]),L=e.ref([]),$=()=>{P.value=!0;let F=[];$n==null||$n.forEach(j=>{w.value++,F.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:(j==null?void 0:j.key)==="background"?"var(--ssComponent-primary-color)":"",id:w.value,contents:j==null?void 0:j.options})}),E.value=F,S.value=F},K=()=>{var j,Z,fe;v.value=!0;let F=[];(fe=(Z=(j=ve.FormContent)==null?void 0:j.find(me=>(me==null?void 0:me.key)==="Input"))==null?void 0:Z.value)==null||fe.forEach(me=>{w.value++,F.push({label:me==null?void 0:me.label,name:(me==null?void 0:me.name)||(me==null?void 0:me.label),type:me.type,value:(me==null?void 0:me.label)==="类型"?"Input":"",id:w.value,contents:me==null?void 0:me.options})}),b.value=F,y.value=F},ie=F=>{F||(b.value=y.value)},Se=async F=>{var j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta;if((F==null?void 0:F.类型)!==((Z=(j=y.value)==null?void 0:j.find(Ze=>(Ze==null?void 0:Ze.label)==="类型"))==null?void 0:Z.value)){let Ze=[],oa=await((pa=(me=(fe=ve.FormContent)==null?void 0:fe.find(ce=>(ce==null?void 0:ce.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:me.value)==null?void 0:pa.value)?await((Ue=(ha=(Ce=ve.FormContent)==null?void 0:Ce.find(ce=>(ce==null?void 0:ce.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:ha.value)==null?void 0:Ue.value):(de=(Qe=ve.FormContent)==null?void 0:Qe.find(ce=>(ce==null?void 0:ce.key)===((F==null?void 0:F.类型)===""?"Input":F==null?void 0:F.类型)))==null?void 0:de.value;if(oa==null||oa.forEach(ce=>{w.value++,Ze.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(F==null?void 0:F.prop)||(F==null?void 0:F.name)||(F==null?void 0:F.label):(F==null?void 0:F[ce.label])??"",id:w.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),F!=null&&F.菜单选项&&((Ma=F==null?void 0:F.菜单选项)==null?void 0:Ma.length)>0){const ce=await ve.menuToContentType(F==null?void 0:F.菜单选项);Ze=Ze==null?void 0:Ze.map(H=>((H==null?void 0:H.name)==="组信息选项"&&(H.contents=ce),H))}y.value=await ve.selectToBase(O.cloneDeep(Ze)),b.value=await ve.selectToBase(O.cloneDeep(Ze))}else{let Ze=O.cloneDeep(b.value);if(Ze=Ze==null?void 0:Ze.map(oa=>(oa.value=F==null?void 0:F[oa.name],oa)),F!=null&&F.菜单选项&&((Ta=F==null?void 0:F.菜单选项)==null?void 0:Ta.length)>0){const oa=await ve.menuToContentType(F==null?void 0:F.菜单选项);Ze=Ze==null?void 0:Ze.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=oa),ce))}Ze=ve.formToOptionsContents(Ze),y.value=await ve.selectToBase(O.cloneDeep(Ze))}},oe=async F=>{await Se(F),b.value=y.value},X=(F,j)=>{if((j==null?void 0:j.type)=="Select"&&(F==null?void 0:F.key)==="selectRelateType"){const Z=j==null?void 0:j.optionUrl;return(Z==null?void 0:Z.selectRelateType)||j[F.key]}if((j==null?void 0:j.type)=="Select"&&(F==null?void 0:F.key)==="menuSelect"){const Z=j==null?void 0:j.optionUrl;return(Z==null?void 0:Z.menuSelect)||j[F.key]}if((j==null?void 0:j.type)=="Select"&&(F==null?void 0:F.key)==="groupSelect"){const Z=j==null?void 0:j.optionUrl;return(Z==null?void 0:Z.groupSelect)||j[F.key]}if((j==null?void 0:j.type)=="Select"&&(F==null?void 0:F.key)==="originalContent")return(j==null?void 0:j.value)||j[F.key];if((j==null?void 0:j.type)=="Select"&&(F==null?void 0:F.key)==="multiple"){const Z=j[F.key];return Qs(Z)?Z:F.default}return(F==null?void 0:F.label)==="类型"&&j[F.key]===""?"Input":(F==null?void 0:F.key)==="isFormColHidden"&&!j[F.key]?!1:j[F.key]},pe=async F=>{var fe,me,pa,Qe,de,Ce,ha,Ue,Ma;v.value=!0;let j=[];const Z=await((pa=(me=(fe=ve.FormContent)==null?void 0:fe.find(Ta=>(Ta==null?void 0:Ta.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:me.value)==null?void 0:pa.value)?await((Ue=(ha=(Ce=ve.FormContent)==null?void 0:Ce.find(Ta=>(Ta==null?void 0:Ta.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:ha.value)==null?void 0:Ue.value):(de=(Qe=ve.FormContent)==null?void 0:Qe.find(Ta=>(Ta==null?void 0:Ta.key)===((F==null?void 0:F.type)===""?"Input":F==null?void 0:F.type)))==null?void 0:de.value;if(Z==null||Z.forEach(Ta=>{w.value++,j.push({label:Ta==null?void 0:Ta.label,name:(Ta==null?void 0:Ta.name)||(Ta==null?void 0:Ta.label),type:Ta.type,value:(Ta==null?void 0:Ta.label)==="属性名"?(F==null?void 0:F.prop)||(F==null?void 0:F.name)||(F==null?void 0:F.label):X(Ta,F),id:w.value,contents:Ta==null?void 0:Ta.options})}),F!=null&&F.menuSelect&&((Ma=F==null?void 0:F.menuSelect)==null?void 0:Ma.length)>0){const Ta=await ve.menuToContentType(F==null?void 0:F.menuSelect);j=j==null?void 0:j.map(Ze=>((Ze==null?void 0:Ze.name)==="组信息选项"&&(Ze.contents=Ta),Ze))}C.value=F==null?void 0:F.id,b.value=await ve.selectToBase(ve.formToOptionsContents(j)),y.value=await ve.selectToBase(ve.formToOptionsContents(j))},ee=F=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var j,Z;L.value=(j=O.cloneDeep(L.value))==null?void 0:j.filter(fe=>(fe==null?void 0:fe.id)!==(F==null?void 0:F.id)),n("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(fe=>((fe==null?void 0:fe.key)==="tableToForm"&&(fe.contents=L.value),fe))),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},te=()=>{v.value=!1,b.value=[],C.value=""},De=async()=>{var fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta;b.value=y.value;let F={};C.value!==""?F.id=C.value:(w.value++,F.id="id"+w.value);let j=await((pa=(me=(fe=ve.FormContent)==null?void 0:fe.find(Ze=>{var oa,ce;return(Ze==null?void 0:Ze.key)===(((ce=(oa=b.value)==null?void 0:oa.find(H=>(H==null?void 0:H.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:me.value)==null?void 0:pa.value)??((de=(Qe=ve.FormContent)==null?void 0:Qe.find(Ze=>{var oa,ce;return(Ze==null?void 0:Ze.key)===(((ce=(oa=b.value)==null?void 0:oa.find(H=>(H==null?void 0:H.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:de.value);if((Ce=b.value)==null||Ce.forEach(Ze=>{const oa=j==null?void 0:j.find(ce=>(ce==null?void 0:ce.label)===(Ze==null?void 0:Ze.label));oa&&(F[oa.key]=Ze.value)}),F.name=F.label,(ha=L.value)!=null&&ha.find(Ze=>Ze.id===F.id))L.value=(Ue=L.value)==null?void 0:Ue.map(Ze=>(Ze.id===F.id&&(Ze=F),Ze));else{let Ze=O.cloneDeep(L.value);L.value||(L.value=[]),Ze.push(F),L.value=Ze}L.value=L.value.map(({id:Ze,...oa})=>oa),v.value=!1,C.value="";let Z=O.cloneDeep(r.originalItemContents);(Ma=O.cloneDeep(r.originalItemContents))!=null&&Ma.find(Ze=>(Ze==null?void 0:Ze.key)==="tableToForm")?Z=(Ta=O.cloneDeep(r.originalItemContents))==null?void 0:Ta.map(Ze=>((Ze==null?void 0:Ze.key)==="tableToForm"&&(Ze.contents=L.value),Ze)):Z.push({key:"tableToForm",contents:L.value}),n("change",Z)},Pe=F=>{P.value=!0;let j=[];$n==null||$n.forEach(Z=>{w.value++,j.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:F[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),C.value=F==null?void 0:F.id,E.value=j,S.value=j};e.watch(()=>c.value,()=>{var j,Z;let F=O.cloneDeep(r.originalItemContents);(j=O.cloneDeep(r.originalItemContents))!=null&&j.find(fe=>(fe==null?void 0:fe.key)==="page")?F=(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(fe=>((fe==null?void 0:fe.key)==="page"&&(fe.contents=c.value),fe)):F.push({key:"page",contents:c.value}),n("change",F)},{deep:!0});const ge=F=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var j,Z;G.value=(j=O.cloneDeep(G.value))==null?void 0:j.filter(fe=>(fe==null?void 0:fe.id)!==(F==null?void 0:F.id)),n("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(fe=>((fe==null?void 0:fe.key)==="extraButton"&&(fe.contents=G.value),fe))),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},N=()=>{var Z,fe,me,pa,Qe;E.value=S.value;let F={};if(C.value!==""?F.id=C.value:(w.value++,F.id="id"+w.value),(Z=E.value)==null||Z.forEach(de=>{const Ce=$n==null?void 0:$n.find(ha=>(ha==null?void 0:ha.label)===(de==null?void 0:de.label));Ce?F[Ce.key]=de.value:de!=null&&de.children&&de.children.length>0&&(F.children=de.children)}),(fe=G.value)!=null&&fe.find(de=>de.id===F.id))G.value=(me=G.value)==null?void 0:me.map(de=>(de.id===F.id&&(de=F),de));else{let de=O.cloneDeep(G.value)??[];de.push(F),G.value=de}P.value=!1,C.value="";let j=O.cloneDeep(r.originalItemContents);(pa=O.cloneDeep(r.originalItemContents))!=null&&pa.find(de=>(de==null?void 0:de.key)==="extraButton")?j=(Qe=O.cloneDeep(r.originalItemContents))==null?void 0:Qe.map(de=>((de==null?void 0:de.key)==="extraButton"&&(de.contents=G.value),de)):j.push({key:"extraButton",contents:G.value}),n("change",j)},U=F=>{let j=O.cloneDeep(S.value);j=j==null?void 0:j.map(Z=>(Z.children||(Z.value=F==null?void 0:F[Z.name]),Z)),S.value=j},le=()=>{P.value=!1,E.value=[],C.value=""},Te=F=>{p.value=!0;let j=[];Rn==null||Rn.forEach(Z=>{w.value++,j.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:F[Z.key],id:w.value,contents:Z==null?void 0:Z.options})}),C.value=F==null?void 0:F.id,z.value=j,I.value=j},Ee=F=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var j,Z;_.value=(j=O.cloneDeep(_.value))==null?void 0:j.filter(fe=>(fe==null?void 0:fe.id)!==(F==null?void 0:F.id)),n("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(fe=>((fe==null?void 0:fe.key)==="rowButton"&&(fe.contents=_.value),fe))),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},qe=()=>{s.value=!0;let F=[];tr==null||tr.forEach(j=>{w.value++,F.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:"",id:w.value,contents:j==null?void 0:j.options})}),m.value=F,k.value=F},ca=()=>{p.value=!0;let F=[];Rn==null||Rn.forEach(j=>{w.value++,F.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:"",id:w.value,contents:j==null?void 0:j.options})}),z.value=F,I.value=F},Na=F=>{let j=O.cloneDeep(I.value);j=j==null?void 0:j.map(Z=>(Z.children||(Z.value=F==null?void 0:F[Z.name]),Z)),I.value=j},ae=()=>{var Z,fe,me,pa,Qe;z.value=I.value;let F={};if(C.value!==""?F.id=C.value:(w.value++,F.id="id"+w.value),(Z=z.value)==null||Z.forEach(de=>{const Ce=Rn==null?void 0:Rn.find(ha=>(ha==null?void 0:ha.label)===(de==null?void 0:de.label));Ce?F[Ce.key]=de.value:de!=null&&de.children&&de.children.length>0&&(F.children=de.children)}),(fe=_.value)!=null&&fe.find(de=>de.id===F.id))_.value=(me=_.value)==null?void 0:me.map(de=>(de.id===F.id&&(de=F),de));else{let de=O.cloneDeep(_.value);de.push(F),_.value=de}p.value=!1,C.value="";let j=O.cloneDeep(r.originalItemContents);(pa=O.cloneDeep(r.originalItemContents))!=null&&pa.find(de=>(de==null?void 0:de.key)==="rowButton")?j=(Qe=O.cloneDeep(r.originalItemContents))==null?void 0:Qe.map(de=>((de==null?void 0:de.key)==="rowButton"&&(de.contents=_.value),de)):j.push({key:"rowButton",contents:_.value}),n("change",j)},la=()=>{p.value=!1,C.value="",I.value=[],z.value=[]},he=F=>{s.value=!0;let j=[];tr==null||tr.forEach(Z=>{w.value++,j.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=j,V.value=F==null?void 0:F.id,k.value=j},Ke=F=>{var j;u.value=Mc(O.cloneDeep(u.value),F==null?void 0:F.id),n("change",(j=O.cloneDeep(r.originalItemContents))==null?void 0:j.map(Z=>{var fe;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(fe=u.value)!=null&&fe.some(me=>me==null?void 0:me.children)?[u.value]:u.value),Z}))},Ie=F=>{var Z,fe,me;F.type==="fix"?F.id!==""?u.value=Oc(u.value,F):u.value=Ic(u.value,F==null?void 0:F.contents):u.value=Lc(u.value,F),u.value=(Z=u.value)!=null&&Z.some(pa=>pa==null?void 0:pa.children)?[u.value]:u.value,C.value="";let j=O.cloneDeep(r.originalItemContents);(fe=O.cloneDeep(r.originalItemContents))!=null&&fe.find(pa=>(pa==null?void 0:pa.key)==="header")?j=(me=O.cloneDeep(r.originalItemContents))==null?void 0:me.map(pa=>((pa==null?void 0:pa.key)==="header"&&(pa.contents=u.value),pa)):j.push({key:"header",contents:u.value}),n("change",j)},se=F=>{var Z;s.value=!0;let j=[];tr==null||tr.forEach(fe=>{w.value++,j.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:F[fe.key],id:w.value,contents:fe==null?void 0:fe.options})}),F!=null&&F.children&&((Z=F==null?void 0:F.children)==null?void 0:Z.length)>0&&j.push({children:F==null?void 0:F.children,isFormColHidden:!0}),C.value=F==null?void 0:F.id,V.value="",m.value=j,k.value=j},Be=F=>{let j=O.cloneDeep(k.value);j=j==null?void 0:j.map(Z=>(Z.children||(Z.value=F==null?void 0:F[Z.name]),Z)),k.value=j},Fe=()=>{s.value=!1,C.value="",V.value="",k.value=[]},ba=()=>{var Z,fe,me,pa,Qe,de;m.value=k.value;let F={};if(C.value!==""?F.id=C.value:(w.value++,F.id="id"+w.value),(Z=m.value)==null||Z.forEach(Ce=>{const ha=tr==null?void 0:tr.find(Ue=>(Ue==null?void 0:Ue.label)===(Ce==null?void 0:Ce.label));ha?F[ha.key]=Ce.value:Ce!=null&&Ce.children&&Ce.children.length>0&&(F.children=Ce.children)}),(fe=u.value)!=null&&fe.find(Ce=>Ce.id===F.id))u.value=(me=u.value)==null?void 0:me.map(Ce=>(Ce.id===F.id&&(Ce=F),Ce));else{let Ce=O.cloneDeep(u.value)??[];V.value===""?Ce.push(F):Ce=Ce==null?void 0:Ce.map(ha=>(ha.id===V.value&&(ha.children||(ha.children=[]),ha.children.push(F)),ha)),u.value=Ce}u.value=(pa=u.value)!=null&&pa.some(Ce=>Ce==null?void 0:Ce.children)?[u.value]:u.value,s.value=!1,C.value="",V.value="";let j=O.cloneDeep(r.originalItemContents);(Qe=O.cloneDeep(r.originalItemContents))!=null&&Qe.find(Ce=>(Ce==null?void 0:Ce.key)==="header")?j=(de=O.cloneDeep(r.originalItemContents))==null?void 0:de.map(Ce=>((Ce==null?void 0:Ce.key)==="header"&&(Ce.contents=u.value),Ce)):j.push({key:"header",contents:u.value}),n("change",j)},za=F=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var j,Z;u.value=(j=O.cloneDeep(u.value))==null?void 0:j.filter(fe=>(fe==null?void 0:fe.id)!==(F==null?void 0:F.id)),n("change",(Z=O.cloneDeep(r.originalItemContents))==null?void 0:Z.map(fe=>{var me;return(fe==null?void 0:fe.key)==="header"&&(fe.contents=(me=u.value)!=null&&me.some(pa=>pa==null?void 0:pa.children)?[u.value]:u.value),fe})),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(t.value=O.cloneDeep(r.originalItemContents),u.value=(j=(F=t.value)==null?void 0:F.find(we=>(we==null?void 0:we.key)==="header"))==null?void 0:j.contents,_.value=(fe=(Z=t.value)==null?void 0:Z.find(we=>(we==null?void 0:we.key)==="rowButton"))==null?void 0:fe.contents,G.value=(pa=(me=t.value)==null?void 0:me.find(we=>(we==null?void 0:we.key)==="extraButton"))==null?void 0:pa.contents,c.value=(de=(Qe=t.value)==null?void 0:Qe.find(we=>(we==null?void 0:we.key)==="page"))!=null&&de.contents?!!((ha=(Ce=t.value)==null?void 0:Ce.find(we=>(we==null?void 0:we.key)==="page"))!=null&&ha.contents):!1,L.value=(Ma=(Ue=t.value)==null?void 0:Ue.find(we=>(we==null?void 0:we.key)==="tableToForm"))==null?void 0:Ma.contents,u.value=(Ta=u.value)==null?void 0:Ta.map((we,na)=>(Array.isArray(we)?we=G3(we):we={label:(we==null?void 0:we.label)??"",prop:(we==null?void 0:we.label)==="操作"?"operate":we==null?void 0:we.prop,width:we!=null&&we.width?parseInt(we.width):"",fixed:(we==null?void 0:we.fixed)??void 0,sortable:(we==null?void 0:we.sortable)??!1,align:(we==null?void 0:we.align)??"left",showOverflowTooltip:(we==null?void 0:we.showOverflowTooltip)??!0,isNotDrag:(we==null?void 0:we.isNotDrag)??!1,isEditCol:(we==null?void 0:we.isEditCol)??!1,isOperate:(we==null?void 0:we.isOperate)??!1,id:(we==null?void 0:we.id)??na,formMenuSelect:(we==null?void 0:we.formMenuSelect)??void 0,groupSelect:(we==null?void 0:we.groupSelect)??void 0},we)),u.value=(Ze=u.value)!=null&&Ze.every(we=>Array.isArray(we))?(oa=u.value)==null?void 0:oa[0]:u.value,_.value=(ce=_.value)==null?void 0:ce.map((we,na)=>we={label:(we==null?void 0:we.label)??"",type:(we==null?void 0:we.type)??"",textColor:(we==null?void 0:we.textColor)??"#000000",id:(we==null?void 0:we.id)??na}),G.value=(H=G.value)==null?void 0:H.map((we,na)=>we={label:(we==null?void 0:we.label)??"",type:(we==null?void 0:we.type)??"",background:(we==null?void 0:we.background)??"var(--ssComponent-primary-color)",id:(we==null?void 0:we.id)??na}),L.value)L.value=(ze=L.value)==null?void 0:ze.map(we=>{w.value++;let na=we;return na.id=w.value,na});else{let we=[];const na=(q=ve.getColumnChild(O.cloneDeep(u.value)))==null?void 0:q.filter(ta=>(ta==null?void 0:ta.prop)!=="operate");na==null||na.forEach(ta=>{var _a;w.value++,we.push({label:ta==null?void 0:ta.label,name:(ta==null?void 0:ta.prop)||(ta==null?void 0:ta.label),type:ta!=null&&ta.groupSelect?"Select":"Input",value:"",id:w.value,contents:ta==null?void 0:ta.options,menuSelect:ta==null?void 0:ta.formMenuSelect,groupSelect:(_a=ta==null?void 0:ta.groupSelect)==null?void 0:_a.split(":"),selectRelateType:"关联绑定列"})}),L.value=we}},{deep:!0,immediate:!0}),(F,j)=>{const Z=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vh,[e.createElementVNode("div",mh,[e.createElementVNode("div",yh,[j[2]||(j[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(fe,{class:"icon-content",onClick:qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[1]||(j[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",gh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(me,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",bh,[e.createElementVNode("div",kh,e.toDisplayString(me==null?void 0:me.label),1),e.createElementVNode("div",xh,[e.createVNode(Z,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>he(me)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>se(me)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>za(me)},null,8,["onClick"])])]),me!=null&&me.children&&me.children.length>0?(e.openBlock(),e.createElementBlock("div",wh,[e.createVNode($c,{tableChildContents:me==null?void 0:me.children,onDeleteChange:Ke,onFixChange:Ie},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",_h,[j[4]||(j[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:ca},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[3]||(j[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Sh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(me,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",Eh,[e.createElementVNode("div",Ch,e.toDisplayString(me==null?void 0:me.label),1),e.createElementVNode("div",Dh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Te(me)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>Ee(me)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Nh,[j[6]||(j[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:$},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[5]||(j[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Th,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,(me,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",Bh,[e.createElementVNode("div",Ah,e.toDisplayString(me==null?void 0:me.label),1),e.createElementVNode("div",zh,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>Pe(me)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ge(me)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Mh,[j[8]||(j[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:K},{icon:e.withCtx(()=>[e.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[j[7]||(j[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ih,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(me,pa)=>(e.openBlock(),e.createElementBlock("div",{key:pa},[e.createElementVNode("div",Oh,[e.createElementVNode("div",Lh,e.toDisplayString(me==null?void 0:me.label),1),e.createElementVNode("div",$h,[e.createVNode(Z,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Qe=>pe(me)},null,8,["onClick"]),e.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Qe=>ee(me)},null,8,["onClick"])])])]))),128))]),j[10]||(j[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Rh,[e.createElementVNode("div",Vh,[j[9]||(j[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(ll._sfc_main$1,{modelValue:c.value,"onUpdate:modelValue":j[0]||(j[0]=me=>c.value=me)},null,8,["modelValue"])])])]),e.createVNode(wr.ssDialog,{visible:s.value,onBeforeDestroy:Fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Fh,[(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",Ph,[e.createVNode(fe,{onClick:Fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>j[11]||(j[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(fe,{class:"ok-button button",onClick:ba,id:"themeButton"},{default:e.withCtx(()=>j[12]||(j[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:p.value,onBeforeDestroy:la,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",jh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:z.value,key:z.value,isEnableWrap:!0,onChange:Na},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hh,[e.createVNode(fe,{onClick:la,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>j[13]||(j[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(fe,{class:"ok-button button",onClick:ae,id:"themeButton"},{default:e.withCtx(()=>j[14]||(j[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:P.value,onBeforeDestroy:le,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Uh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:U},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",qh,[e.createVNode(fe,{onClick:le,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>j[15]||(j[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(fe,{class:"ok-button button",onClick:N,id:"themeButton"},{default:e.withCtx(()=>j[16]||(j[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:v.value,onBeforeDestroy:te,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wh,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:Se,onChangeVisible:ie,onBlurChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Kh,[e.createVNode(fe,{onClick:te,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>j[17]||(j[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(fe,{class:"ok-button button",onClick:De,id:"themeButton"},{default:e.withCtx(()=>j[18]||(j[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Yh=er._export_sfc(Gh,[["__scopeId","data-v-7a6b87b5"]]),Jh=O.useModelComp(O.pinia),{pageMapState:Xh}=O.storeToRefs(Jh),Zh=O.useMenuState(O.pinia),{activeMenuPath:Qh}=O.storeToRefs(Zh),e2=e.ref(24),a2=e.ref(6),l2=e.ref(10),r2=e.ref(70),n2=e.ref(.18),i2=e.ref(45),o2=(a,l,r,n)=>{var t,s,v,u,p,m,c,k,C,V,_,G,z,I,P,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:((u=(v=a==null?void 0:a.value)==null?void 0:v.tableData)==null?void 0:u.y)||l,w:((m=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:m.w)||e2.value,h:((k=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:k.h)||r,minW:((V=(C=a==null?void 0:a.value)==null?void 0:C.tableData)==null?void 0:V.minW)||a2.value,minH:((G=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:G.minH)||n2.value,maxH:((I=(z=a==null?void 0:a.value)==null?void 0:z.tableData)==null?void 0:I.maxH)||i2.value,i:((E=(P=a==null?void 0:a.value)==null?void 0:P.tableData)==null?void 0:E.i)||l,id:(a==null?void 0:a.id)||l+"",component:n}},t2=(a,l)=>{var n,t,s,v,u,p,m,c;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(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:v.length)===0)return 2}else((u=a==null?void 0:a.comp)==null?void 0:u.toUpperCase())==="FORM"&&(r=((c=(m=(p=a==null?void 0:a.compData)==null?void 0:p.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:m.contents)==null?void 0:c.length)/5);return r*2},Rc=(a,l,r)=>{var v,u;const n=(u=(v=Xh.value)==null?void 0:v[Qh.value])==null?void 0:u.filter(p=>{var m;return((m=p==null?void 0:p.key)==null?void 0:m.type)==="gridLayout"}),t=n==null?void 0:n.find(p=>{var m,c,k;return((k=(c=(m=p==null?void 0:p.value)==null?void 0:m.tableData)==null?void 0:c.component)==null?void 0:k.id)===a.id}),s=t2(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((p,m)=>Rc(p,m))),{...o2(t,l,s,a)}},s2=(a,l)=>{if((a==null?void 0:a.length)===0)return[];const r=O.cloneDeep(a);return Array.isArray(a)?r==null?void 0:r.map((n,t)=>Rc(n,t)):[]},c2=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}]}]}}),u2=(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}),d2=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,u=>{var c;const p=c2(r==null?void 0:r.optionItems),m=u?(c=p[u==null?void 0:u.toUpperCase()])==null?void 0:c[r==null?void 0:r.target]:[];t.value=m==null?void 0:m.map(k=>{for(const[C,V]of Object.entries((r==null?void 0:r.comp)||{}))if((k==null?void 0:k.prop)===C)return{...k,value:V};return k})},{immediate:!0});const s=u=>ll.getComponent(u),v=u=>{var p,m;(u==null?void 0:u.prop)==="layout"&&(u==null?void 0:u.value)==="horizontal"?t.value=(p=t.value)==null?void 0:p.map(c=>{var k;return(c==null?void 0:c.prop)==="isStepLayout"?{...c,options:(k=c==null?void 0:c.options)==null?void 0:k.map(C=>({...C,disabled:!0}))}:(c==null?void 0:c.prop)==="isGridLayout"?{...c,disabled:!0}:c}):t.value=(m=t.value)==null?void 0:m.map(c=>{var k;return(c==null?void 0:c.prop)==="isStepLayout"?{...c,options:(k=c==null?void 0:c.options)==null?void 0:k.map(C=>({...C,disabled:!1}))}:(c==null?void 0:c.prop)==="isGridLayout"?{...c,disabled:!1}:c}),n("change",{target:r==null?void 0:r.target,styleConfigs:t.value,prop:u==null?void 0:u.prop})};return(u,p)=>{const m=e.resolveComponent("el-col"),c=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,k=>(e.openBlock(),e.createBlock(c,{class:"style-row",key:k==null?void 0:k.prop},{default:e.withCtx(()=>[e.createVNode(m,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k==null?void 0:k.label)+":",1)]),_:2},1024),e.createVNode(m,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(k.type)),{modelValue:k.value,"onUpdate:modelValue":C=>k.value=C,content:k==null?void 0:k.options,optionUrl:k==null?void 0:k.optionUrl,disabled:k==null?void 0:k.disabled,activeText:k==null?void 0:k.activeText,inactiveText:k==null?void 0:k.inactiveText,onChange:C=>v(k)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),p2=er._export_sfc(d2,[["__scopeId","data-v-6c233914"]]),f2=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=I=>I==null?void 0:I.reduce((P,E)=>(P[E==null?void 0:E.prop]=E==null?void 0:E.rule,P),{}),u=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)"}]})),p=e.ref([]),m=e.ref(""),c=(I,P,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:I},{label:"按钮名称",value:"按钮名称",children:P}]},{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(y=>({label:y==null?void 0:y.任务名称,value:y==null?void 0:y.任务名称}))},{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,...k(I,P,E)]:w=S,w},k=(I,P,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},C=(I,P)=>{var y,L,$,K,ie,Se,oe,X,pe;const E=((ie=(K=($=(L=(y=r==null?void 0:r.comp)==null?void 0:y.compData)==null?void 0:L.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:$.contents)==null?void 0:K.filter(ee=>(ee==null?void 0:ee.label)!=="操作"))==null?void 0:ie.map(ee=>({value:ee==null?void 0:ee.prop,label:ee.label})))||[],S=/button/i,w=((pe=(X=(oe=(Se=r==null?void 0:r.comp)==null?void 0:Se.compData)==null?void 0:oe.filter(ee=>S.test(ee==null?void 0:ee.key)))==null?void 0:X.flatMap(ee=>ee==null?void 0:ee.contents))==null?void 0:pe.map(ee=>({value:ee==null?void 0:ee.label,label:ee.label})))||[],b=c(E,w,I);p.value=P?u2(b,P):b,I&&(I==null?void 0:I.length)>0&&s.value.push(...I==null?void 0:I.map(ee=>({prop:ee,rule:t})))};e.onMounted(()=>{C(null,r==null?void 0:r.extendItem)});const V=I=>{const P=I==null?void 0:I[m.value];if(m.value==="执行任务"){if(!(P!=null&&P.join("/")))return;const E=P==null?void 0:P.join("/");C(E==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:E==="进度设置/进度条"?["进度关键词"]:null,I)}},_=I=>{n("change",{target:r==null?void 0:r.target,extendConfigs:I})},G=(I,P)=>{m.value=P==null?void 0:P.changeProp,V(I)},z=I=>{n("onButtonClick",I)};return(I,P)=>(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:u.value.formRules,buttonValue:u.value.buttonValue,onChange:_,onBlurChange:G,onOnButtonClick:z},null,8,["rowContents","formRules","buttonValue"]))}}),h2=er._export_sfc(f2,[["__scopeId","data-v-7c660c1f"]]),v2={};function m2(a,l){return null}const y2=er._export_sfc(v2,[["render",m2]]),g2={class:"form-operate-content"},b2={class:"form-operate-item"},k2={class:"operate-title"},x2={class:"operate-content"},w2={class:"fix-content"},_2={class:"fix-button"},S2={class:"operate-title"},E2={class:"operate-content"},C2={class:"fix-content"},D2={class:"fix-button"},N2={style:{display:"flex","justify-content":"space-between"}},T2={class:"form-content"},B2={class:"dialog-footer"},A2={class:"form-content"},z2={__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([]),u=e.ref(!1),p=e.ref([]),m=e.ref([]),c=e.ref(""),k=e.ref(!1),C=e.ref(0),V=e.ref([]),_=e.ref([]),G=(X,pe)=>{if((pe==null?void 0:pe.type)=="Select"&&(X==null?void 0:X.key)==="selectRelateType"){const ee=pe==null?void 0:pe.optionUrl;return(ee==null?void 0:ee.selectRelateType)||pe[X.key]}if((pe==null?void 0:pe.type)=="Select"&&(X==null?void 0:X.key)==="menuSelect"){const ee=pe==null?void 0:pe.optionUrl;return(ee==null?void 0:ee.menuSelect)||pe[X.key]}if((pe==null?void 0:pe.type)=="Select"&&(X==null?void 0:X.key)==="groupSelect"){const ee=pe==null?void 0:pe.optionUrl;return(ee==null?void 0:ee.groupSelect)||pe[X.key]}if((pe==null?void 0:pe.type)=="Select"&&(X==null?void 0:X.key)==="originalContent")return(pe==null?void 0:pe.value)||pe[X.key];if((pe==null?void 0:pe.type)=="Select"&&(X==null?void 0:X.key)==="multiple"){const ee=pe[X.key];return Qs(ee)?ee:X.default}return(X==null?void 0:X.label)==="类型"&&pe[X.key]===""?"Input":(X==null?void 0:X.key)==="isFormColHidden"&&!pe[X.key]?!1:pe[X.key]},z=async X=>{var te,De,Pe,ge,N,U;t.value=!0;let pe=[];const ee=await((Pe=(De=(te=ve.FormContent)==null?void 0:te.find(le=>(le==null?void 0:le.key)===((X==null?void 0:X.type)===""?"Input":X==null?void 0:X.type)))==null?void 0:De.value)==null?void 0:Pe.value)??((N=(ge=ve.FormContent)==null?void 0:ge.find(le=>(le==null?void 0:le.key)===((X==null?void 0:X.type)===""?"Input":X==null?void 0:X.type)))==null?void 0:N.value);if(ee==null||ee.forEach(le=>{C.value++,pe.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,prop:le==null?void 0:le.prop,value:G(le,X),id:C.value,contents:le==null?void 0:le.options,width:(X==null?void 0:X.width)??1})}),X!=null&&X.menuSelect&&((U=X==null?void 0:X.menuSelect)==null?void 0:U.length)>0){const le=await ve.menuToContentType(X==null?void 0:X.menuSelect);pe=pe==null?void 0:pe.map(Te=>((Te==null?void 0:Te.name)==="组信息选项"&&(Te.contents=le),Te))}c.value=X==null?void 0:X.id,s.value=await ve.selectToBase(ve.formToOptionsContents(pe)),v.value=await ve.selectToBase(ve.formToOptionsContents(pe))},I=X=>{var ee;u.value=!0;let pe=[];(ee=ve.FormButton)==null||ee.forEach(te=>{C.value++,pe.push({label:te==null?void 0:te.label,name:te==null?void 0:te.label,type:te.type,value:(te==null?void 0:te.label)==="类型"&&X[te.key]===""?"normal":X[te.key],id:C.value,contents:te==null?void 0:te.options})}),V.value=pe,_.value=pe,c.value=X==null?void 0:X.id};e.watch(()=>k.value,()=>{var pe,ee;let X=O.cloneDeep(r.originalItemContents);(pe=O.cloneDeep(r.originalItemContents))!=null&&pe.find(te=>(te==null?void 0:te.key)==="enableWrap")?X=(ee=O.cloneDeep(r.originalItemContents))==null?void 0:ee.map(te=>((te==null?void 0:te.key)==="enableWrap"&&(te.contents=!k.value),te)):X.push({key:"enableWrap",contents:!k.value}),n("change",X)},{deep:!0});const P=()=>{var ee,te,De,Pe,ge;V.value=_.value;let X={};if(c.value!==""?X.id=c.value:(C.value++,X.id="id"+C.value),(ee=V.value)==null||ee.forEach(N=>{var le;const U=(le=ve.FormButton)==null?void 0:le.find(Te=>(Te==null?void 0:Te.label)===(N==null?void 0:N.label));U&&(X[U.key]=N.value)}),(te=p.value)!=null&&te.find(N=>N.id===X.id))p.value=(De=p.value)==null?void 0:De.map(N=>(N.id===X.id&&(N=X),N));else{let N=O.cloneDeep(p.value);p.value||(p.value=[]),N.push(X),p.value=N}u.value=!1,c.value="";let pe=O.cloneDeep(r.originalItemContents);(Pe=O.cloneDeep(r.originalItemContents))!=null&&Pe.find(N=>(N==null?void 0:N.key)==="formButton")?pe=(ge=O.cloneDeep(r.originalItemContents))==null?void 0:ge.map(N=>((N==null?void 0:N.key)==="formButton"&&(N.contents=p.value),N)):pe.push({key:"formButton",contents:p.value}),n("change",pe)},E=X=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var pe,ee;m.value=(pe=O.cloneDeep(m.value))==null?void 0:pe.filter(te=>(te==null?void 0:te.id)!==(X==null?void 0:X.id)),n("change",(ee=O.cloneDeep(r.originalItemContents))==null?void 0:ee.map(te=>((te==null?void 0:te.key)==="formContent"&&(te.contents=m.value),te))),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=X=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var pe,ee;p.value=(pe=O.cloneDeep(p.value))==null?void 0:pe.filter(te=>(te==null?void 0:te.id)!==(X==null?void 0:X.id)),n("change",(ee=O.cloneDeep(r.originalItemContents))==null?void 0:ee.map(te=>((te==null?void 0:te.key)==="formButton"&&(te.contents=p.value),te))),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{var pe;u.value=!0;let X=[];(pe=ve.FormButton)==null||pe.forEach(ee=>{C.value++,X.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:C.value,contents:ee==null?void 0:ee.options})}),V.value=X,_.value=X},b=()=>{var pe,ee,te;t.value=!0;let X=[];(te=(ee=(pe=ve.FormContent)==null?void 0:pe.find(De=>(De==null?void 0:De.key)==="Input"))==null?void 0:ee.value)==null||te.forEach(De=>{C.value++,X.push({label:De==null?void 0:De.label,name:De==null?void 0:De.label,type:De.type,value:(De==null?void 0:De.label)==="类型"?"Input":"",id:C.value,contents:De==null?void 0:De.options})}),s.value=X,v.value=X},y=X=>{let pe=O.cloneDeep(_.value);pe=pe==null?void 0:pe.map(ee=>(ee.value=X==null?void 0:X[ee.name],ee)),_.value=pe},L=X=>{const pe=X.find(De=>(De==null?void 0:De.name)==="类型");if((pe==null?void 0:pe.value)!="Select")return;const ee=X.find(De=>(De==null?void 0:De.name)==="多选"),te=X.find(De=>(De==null?void 0:De.name)==="初始值");ee!=null&&ee.value&&Co.isString(te.value)&&(te.value=[te.value]),!(ee!=null&&ee.value)&&!Co.isString(te.value)&&(te.value="")},$=async X=>{var pe,ee,te,De,Pe,ge,N,U,le,Te,Ee,qe;if((X==null?void 0:X.类型)!==((ee=(pe=v.value)==null?void 0:pe.find(ca=>(ca==null?void 0:ca.label)==="类型"))==null?void 0:ee.value)){let ca=[];const Na=await((Pe=(De=(te=ve.FormContent)==null?void 0:te.find(ae=>(ae==null?void 0:ae.key)===((X==null?void 0:X.类型)===""?"Input":X==null?void 0:X.类型)))==null?void 0:De.value)==null?void 0:Pe.value)?await((Te=(le=(U=ve.FormContent)==null?void 0:U.find(ae=>(ae==null?void 0:ae.key)===((X==null?void 0:X.类型)===""?"Input":X==null?void 0:X.类型)))==null?void 0:le.value)==null?void 0:Te.value):(N=(ge=ve.FormContent)==null?void 0:ge.find(ae=>(ae==null?void 0:ae.key)===((X==null?void 0:X.类型)===""?"Input":X==null?void 0:X.类型)))==null?void 0:N.value;if(Na==null||Na.forEach(ae=>{var he,Ke;C.value++;const la=$u(ae==null?void 0:ae.default)?(X==null?void 0:X[ae.label])??ae.value??"":ae==null?void 0:ae.default;ca.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:la,prop:ae==null?void 0:ae.prop,id:C.value,contents:ae==null?void 0:ae.options,width:((Ke=(he=v.value)==null?void 0:he[0])==null?void 0:Ke.width)??1})}),X!=null&&X.菜单选项&&((Ee=X==null?void 0:X.菜单选项)==null?void 0:Ee.length)>0){const ae=await ve.menuToContentType(X==null?void 0:X.菜单选项);ca=ca==null?void 0:ca.map(la=>((la==null?void 0:la.name)==="组信息选项"&&(la.contents=ae),la))}L(ca),v.value=await ve.selectToBase(O.cloneDeep(ca)),s.value=await ve.selectToBase(O.cloneDeep(ca))}else{let ca=O.cloneDeep(v.value);if(ca=ca==null?void 0:ca.map(Na=>(Na.value=X==null?void 0:X[Na.name],Na)),X!=null&&X.菜单选项&&((qe=X==null?void 0:X.菜单选项)==null?void 0:qe.length)>0){const Na=await ve.menuToContentType(X==null?void 0:X.菜单选项);ca=ca==null?void 0:ca.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=Na),ae))}ca=ve.formToOptionsContents(ca),L(ca),v.value=await ve.selectToBase(O.cloneDeep(ca))}},K=X=>{X||(s.value=v.value)},ie=async X=>{await $(X),s.value=v.value},Se=Cl.debounce(async()=>{var te,De,Pe,ge,N,U,le,Te,Ee,qe,ca,Na;s.value=v.value;let X={};X.width=((De=(te=s.value)==null?void 0:te[0])==null?void 0:De.width)??1,c.value!==""?X.id=c.value:(C.value++,X.id="id"+C.value);let pe=await((N=(ge=(Pe=ve.FormContent)==null?void 0:Pe.find(ae=>{var la,he;return(ae==null?void 0:ae.key)===(((he=(la=s.value)==null?void 0:la.find(Ke=>(Ke==null?void 0:Ke.label)==="类型"))==null?void 0:he.value)??"label")}))==null?void 0:ge.value)==null?void 0:N.value)??((le=(U=ve.FormContent)==null?void 0:U.find(ae=>{var la,he;return(ae==null?void 0:ae.key)===(((he=(la=s.value)==null?void 0:la.find(Ke=>(Ke==null?void 0:Ke.label)==="类型"))==null?void 0:he.value)??"label")}))==null?void 0:le.value);if((Te=s.value)==null||Te.forEach(ae=>{const la=pe==null?void 0:pe.find(he=>(he==null?void 0:he.label)===(ae==null?void 0:ae.label));la&&(X[la.key]=ae.value)}),X.width=X.width?X.width:1,X.key=X==null?void 0:X.label,X.isFormColHidden=X==null?void 0:X.isFormColHidden,(Ee=m.value)!=null&&Ee.find(ae=>ae.id===X.id))m.value=(qe=m.value)==null?void 0:qe.map(ae=>(ae.id===X.id&&(ae=X),ae));else{let ae=O.cloneDeep(m.value);ae.push(X),m.value=ae}m.value=m.value.map(({id:ae,...la})=>la),t.value=!1,c.value="";let ee=O.cloneDeep(r.originalItemContents);(ca=O.cloneDeep(r.originalItemContents))!=null&&ca.find(ae=>(ae==null?void 0:ae.key)==="formContent")?ee=(Na=O.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),oe=()=>{t.value=!1,u.value=!1,c.value="",v.value=[],_.value=[]};return e.watch(()=>r.originalItemContents,()=>{var pe,ee,te,De,Pe,ge;if(!r.originalItemContents||r.originalItemContents.length===0)return;const X=O.cloneDeep(r.originalItemContents);m.value=((pe=X==null?void 0:X.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:pe.contents)??[],p.value=((ee=X==null?void 0:X.find(N=>(N==null?void 0:N.key)==="formButton"))==null?void 0:ee.contents)??[],k.value=(te=X==null?void 0:X.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&te.contents?!((De=X==null?void 0:X.find(N=>(N==null?void 0:N.key)==="enableWrap"))!=null&&De.contents):!0,m.value=(Pe=O.cloneDeep(m.value))==null?void 0:Pe.map((N,U)=>{var Te;let le=N;return le.id=(N==null?void 0:N.id)??U,N!=null&&N.label||(N.label=(N==null?void 0:N.key)??(N==null?void 0:N.label)??""),N!=null&&N.type||(N.type=(N==null?void 0:N.type)??""),N.contents=((Te=N==null?void 0:N.options)==null?void 0:Te.length)===0?(N==null?void 0:N.contents)??"":N==null?void 0:N.options,le}),m.value=ve.formToOptionsContents(m.value),p.value=(ge=p.value)==null?void 0:ge.map((N,U)=>N={label:(N==null?void 0:N.label)??"",type:(N==null?void 0:N.type)??"",background:(N==null?void 0:N.background)??"var(--ssComponent-primary-color)",id:U})},{deep:!0,immediate:!0}),(X,pe)=>{const ee=e.resolveComponent("svg-icon"),te=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",g2,[e.createElementVNode("div",b2,[e.createElementVNode("div",k2,[pe[2]||(pe[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(te,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[pe[1]||(pe[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",x2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(De,Pe)=>(e.openBlock(),e.createElementBlock("div",{key:Pe},[e.createElementVNode("div",w2,[e.createElementVNode("div",null,e.toDisplayString(De.label),1),e.createElementVNode("div",_2,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>z(De)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>E(De)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",S2,[pe[4]||(pe[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(te,{class:"icon-content",id:"themeButton",onClick:w},{icon:e.withCtx(()=>[e.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[pe[3]||(pe[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",E2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(De,Pe)=>(e.openBlock(),e.createElementBlock("div",{key:Pe},[e.createElementVNode("div",C2,[e.createElementVNode("div",null,e.toDisplayString(De.label),1),e.createElementVNode("div",D2,[e.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>I(De)},null,8,["onClick"]),e.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>S(De)},null,8,["onClick"])])])]))),128))]),pe[6]||(pe[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",N2,[pe[5]||(pe[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(ll._sfc_main$1,{modelValue:k.value,"onUpdate:modelValue":pe[0]||(pe[0]=De=>k.value=De)},null,8,["modelValue"])])]),e.createVNode(wr.ssDialog,{visible:t.value,onBeforeDestroy:oe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",T2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:$,onChangeVisible:K,onBlurChange:ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",B2,[e.createVNode(te,{onClick:oe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>pe[7]||(pe[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(te,{class:"ok-button button",onClick:e.unref(Se),id:"themeButton"},{default:e.withCtx(()=>pe[8]||(pe[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(wr.ssDialog,{visible:u.value,onBeforeDestroy:oe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",A2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:oe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:P},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},_s=er._export_sfc(z2,[["__scopeId","data-v-20850524"]]),M2={class:"step-module content"},I2={class:"module-data"},O2={class:"step-module layout"},L2={class:"form-content"},$2=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"}]),u=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),m=e.ref({}),c=e.ref([]),k=z=>{var I;m.value=z,n("change",(I=_())==null?void 0:I.compData)},C=(z,I)=>{var P,E;switch(z){case"create":(P=s.value)==null||P.forEach(S=>{S.value=""}),p.value="create",u.visible=!0;break;case"update":(E=s.value)==null||E.forEach(S=>{S.value=I[S==null?void 0:S.prop]}),p.value="update",u.visible=!0;break;case"delete":c.value.splice(I,1),p.value="delete";break}},V=z=>{var I,P,E;if((z==null?void 0:z.buttonName)==="确认"){const S=O.cloneDeep(z==null?void 0:z.content);switch(Object.keys(S).forEach(w=>{S[w]===""&&delete S[w]}),p.value){case"create":c.value.push({...S,index:((I=c.value)==null?void 0:I.length)+1});break;case"update":c.value=(P=c.value)==null?void 0:P.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),u.visible=!1}else u.visible=!1},_=()=>({comp:"Step",compData:[{key:"stepList",contents:c.value},{key:"stepConfig",contents:m.value}]}),G=()=>{u.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,z=>{var I,P;z&&(m.value=((I=z==null?void 0:z.find(E=>E.key==="stepConfig"))==null?void 0:I.contents)??{},c.value=((P=z==null?void 0:z.find(E=>E.key==="stepList"))==null?void 0:P.contents)??[])},{immediate:!0}),(z,I)=>{const P=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",M2,[I[2]||(I[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:I[0]||(I[0]=S=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[1]||(I[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",I2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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=>C("update",{...S,index:w+1})},{default:e.withCtx(()=>I[3]||(I[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>C("delete",w)},{default:e.withCtx(()=>I[4]||(I[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",O2,[I[5]||(I[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ll.ssForm,{rowContents:t.value,onChange:k},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:G,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",L2,[(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)}}}),R2=er._export_sfc($2,[["__scopeId","data-v-7dbd17f2"]]),V2={class:"step-module content"},F2={class:"module-data"},P2={class:"step-module layout"},j2={class:"form-content"},H2=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([]),u=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}]),p=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"}]),c=e.reactive({visible:!1,width:"40%",title:"时间线"}),k=z=>{var I;s.value=z,n("change",(I=_())==null?void 0:I.compData)},C=(z,I)=>{var P,E;switch(z){case"create":(P=p.value)==null||P.forEach(S=>{S.value=""}),t.value="create",c.visible=!0;break;case"update":(E=p.value)==null||E.forEach(S=>{S.value=I[S==null?void 0:S.prop]}),t.value="update",c.visible=!0;break;case"delete":v.value.splice(I,1),t.value="delete";break}},V=z=>{var I,P,E,S;if((z==null?void 0:z.buttonName)==="确认"){const w=O.cloneDeep(z==null?void 0:z.content);switch(Object.keys(w).forEach(b=>{w[b]===""&&delete w[b]}),t.value){case"create":(P=v.value)==null||P.push({...w,index:((I=v.value)==null?void 0:I.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),c.visible=!1}else c.visible=!1},_=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:v.value},{key:"timeLineConfig",contents:s.value}]}),G=()=>{c.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,z=>{var I,P;z&&(s.value=((I=z==null?void 0:z.find(E=>E.key==="timeLineConfig"))==null?void 0:I.contents)??{},v.value=((P=z==null?void 0:z.find(E=>E.key==="timeLineList"))==null?void 0:P.contents)??[])},{immediate:!0}),(z,I)=>{const P=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",V2,[I[2]||(I[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:I[0]||(I[0]=S=>C("create"))},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[1]||(I[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",F2,[(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=>C("update",{...S,index:w+1})},{default:e.withCtx(()=>I[3]||(I[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>C("delete",w)},{default:e.withCtx(()=>I[4]||(I[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",P2,[I[5]||(I[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ll.ssForm,{rowContents:u.value,onChange:k},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:G,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",j2,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),U2=er._export_sfc(H2,[["__scopeId","data-v-39ffc861"]]),q2={};function W2(a,l){return e.openBlock(),e.createElementBlock("div")}const K2=er._export_sfc(q2,[["render",W2]]),G2={class:"extra-content"},Y2={key:0},J2={key:1},X2={class:"dialog-footer"},Z2={__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,u=e.ref(!1),p=e.ref({}),m=e.ref({}),c=e.ref();e.watch(()=>[r.itemData],()=>{var S;const E=O.cloneDeep(r.itemData);t.value=(S=O.cloneDeep(E))==null?void 0:S.map(w=>{var b;if(w.key==="extra"){let y=[];(b=w.value)==null||b.forEach(L=>{var $;y.push(($=Object.values(L))==null?void 0:$[0])}),w.value=y}return w})},{deep:!0,immediate:!0});const k=(E,S,w,b)=>{var L;let y={};((L=E==null?void 0:E[0])==null?void 0:L.contents)==="详情"&&(u.value=!0,y[S]=E,s.value=E==null?void 0:E.filter($=>($==null?void 0:$.key)!=="tableContentName"),p.value=y,m.value=w,c.value=b.id)},C=E=>{var $,K,ie,Se;const S=(K=($=Object.values(O.cloneDeep(p.value)))==null?void 0:$[0])==null?void 0:K.filter(oe=>(oe==null?void 0:oe.key)==="tableContentName"),w=(Se=(ie=Object.values(O.cloneDeep(p.value)))==null?void 0:ie[0])==null?void 0:Se.filter(oe=>(oe==null?void 0:oe.key)!=="tableContentName"),b=w==null?void 0:w.map((oe,X)=>{var pe;return X===E.index&&(oe==null?void 0:oe.comp)==="Table"&&(oe.compData=(pe=oe.compData)==null?void 0:pe.map(ee=>{var te,De;return(ee==null?void 0:ee.key)==="tableContents"&&(ee.contents=(De=(te=E.content)==null?void 0:te.map(Pe=>{let ge={};for(let N in Pe)N!=="id"&&(ge[N]=Pe[N]);return ge}))==null?void 0:De.map(Pe=>Object.values(Pe))),ee})),oe});b.unshift(S==null?void 0:S[0]);let y=O.cloneDeep(p.value),L={};for(let oe in y)L[oe]=b;p.value=L},V=()=>{u.value=!1,p.value={},m.value={},c.value=void 0,n.value++},_=E=>{var $,K,ie,Se;const S=(K=($=Object.values(O.cloneDeep(p.value)))==null?void 0:$[0])==null?void 0:K.filter(oe=>(oe==null?void 0:oe.key)==="tableContentName"),w=(Se=(ie=Object.values(O.cloneDeep(p.value)))==null?void 0:ie[0])==null?void 0:Se.filter(oe=>(oe==null?void 0:oe.key)!=="tableContentName"),b=w==null?void 0:w.map((oe,X)=>(X===E.index&&(oe.compData=E.contents),oe));b.unshift(S==null?void 0:S[0]);let y=O.cloneDeep(p.value),L={};for(let oe in y)L[oe]=b;p.value=L},G=()=>{var S,w;let E={};for(let b in m.value)b===((S=Object.keys(p.value))==null?void 0:S[0])?E[b]=(w=Object.values(p.value))==null?void 0:w[0]:E[b]=m.value[b];v("change",{buttonName:"编辑",index:c.value,singleContent:E},"methodData"),u.value=!1,p.value={},m.value={},c.value=void 0},z=()=>{u.value=!1,p.value={},m.value={},c.value=void 0},I=E=>{v("change",E,"methodData")},P=E=>Ti(E);return(E,S)=>{const w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",G2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(b,y)=>(e.openBlock(),e.createElementBlock("div",{key:n.value},[(b==null?void 0:b.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Y2)):(e.openBlock(),e.createElementBlock("div",J2,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(b.comp)),{itemData:b==null?void 0:b.compData,childItemData:b==null?void 0:b.itemChildData,key:y,index:(b==null?void 0:b.id)??y,onContentClick:k,onChange:I},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(wr.ssDialog,{visible:u.value,onBeforeDestroy:z},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(b,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(P(b.comp)),{itemData:b==null?void 0:b.compData,onChange:C,childItemData:b==null?void 0:b.itemChildData,key:y,onContentChange:_,index:(b==null?void 0:b.id)??y,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",X2,[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"])])}}},Q2=er._export_sfc(Z2,[["__scopeId","data-v-2d9c5ab2"]]),e4={key:0,class:"method-content"},a4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const l=e.ref([]),r=ve.useOriginalState(O.pinia),{originalPath:n}=O.storeToRefs(r),t=a,s=e.ref(!1),v=e.ref(),u=ve.useTableComp(O.pinia),{multipleTableConst:p}=O.storeToRefs(u),m=O.useModelComp(O.pinia),c=e.ref(!1),k=O.useMenuState(O.pinia),C=O.useLoginState(O.pinia),{itemData:V,isEdit:_,routeToChildPath:G,tableViewContents:z,lockingPage:I,payloadTypes:P}=O.storeToRefs(m),{activeMenuPath:E,platform:S,childMenu:w}=O.storeToRefs(k),{loginUserInfo:b}=O.storeToRefs(C),y=e.ref(!1),L=async()=>{var ge,N;(ge=l.value)!=null&&ge.find(U=>(U==null?void 0:U.buttonName)==="保存")&&await ee((N=l.value)==null?void 0:N.find(U=>(U==null?void 0:U.buttonName)==="保存")),await ve.onSaveBack()};e.watch(()=>V.value,async()=>{_.value==="view"&&!y.value&&await Pe(O.cloneDeep(t.itemData)),y.value=!1},{deep:!0});const $=()=>{s.value=!1,v.value=void 0},K=ge=>ge.map(N=>{const U={};for(const le in N){const Te=N[le];if(le.includes(p.value)){const Ee=le.split(p.value);let qe=U;Ee.forEach((ca,Na)=>{Na===Ee.length-1?qe[ca]=Te:(qe[ca]||(qe[ca]={}),qe=qe[ca])})}else U[le]=Te}return U}),ie=async(ge,N,U=[])=>{var Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za;let le=(Te=O.cloneDeep(N))==null?void 0:Te.filter(F=>(F==null?void 0:F.comp)!=="methodButton");if(ge!=null&&ge.includes("[")){let F=(ae=(Na=(ca=(qe=(Ee=O.cloneDeep(ge))==null?void 0:Ee.split("["))==null?void 0:qe[1])==null?void 0:ca.split("]"))==null?void 0:Na[0])==null?void 0:ae.split(":"),j="";if(F!=null&&F[0]){let Z=(la=le==null?void 0:le.find(fe=>(fe==null?void 0:fe.name)===(F==null?void 0:F[0])))==null?void 0:la.compData;if(!Z){let fe=(he=ge==null?void 0:ge.split("["))==null?void 0:he[0],me=await ve.getItemData(fe,sessionStorage.getItem("systemKey"),"",!1,"","",U);Z=(Ke=me==null?void 0:me.find(pa=>(pa==null?void 0:pa.name)===(F==null?void 0:F[0])))==null?void 0:Ke.compData}Z==null||Z.forEach(fe=>{var me,pa,Qe,de,Ce,ha;if((fe==null?void 0:fe.key)==="formContent")(me=fe==null?void 0:fe.contents)==null||me.forEach(Ue=>{var Ma;(Ue==null?void 0:Ue.key)===(F==null?void 0:F[1])&&(Array.isArray(Ue==null?void 0:Ue.value)?j=Ue==null?void 0:Ue.value:j=(Ma=Ue==null?void 0:Ue.value)==null?void 0:Ma.toString())});else if((fe==null?void 0:fe.key)==="tableContents"){let Ue=[],Ma=(pa=Z==null?void 0:Z.find(Ze=>(Ze==null?void 0:Ze.key)==="header"))==null?void 0:pa.contents,Ta=(F==null?void 0:F[1])??"";if(Ma!=null&&Ma.every(Ze=>Array.isArray(Ze))){let Ze=ve.getColumnChild((Ce=Ma==null?void 0:Ma[0])==null?void 0:Ce.filter(oa=>(oa==null?void 0:oa.label)!=="操作"));(ha=fe.contents)==null||ha.forEach(oa=>{let ce={};oa=oa==null?void 0:oa.filter(H=>!(H!=null&&H.id)),Ze==null||Ze.forEach((H,q)=>{let ze=oa[q];typeof oa[q]=="number"&&(ze=oa[q].toString()),(Ta===""||Ta===H.prop)&&(ce[H.prop]=ze)}),Ue.push(ce)}),Ue=K(Ue)}else{let Ze=(Qe=Ma==null?void 0:Ma.map(oa=>oa==null?void 0:oa.label))==null?void 0:Qe.filter(oa=>oa!=="操作");(de=fe.contents)==null||de.forEach(oa=>{let ce={};oa=oa==null?void 0:oa.filter(H=>!(H!=null&&H.id)),Ze==null||Ze.forEach((H,q)=>{let ze=oa[q];typeof oa[q]=="number"&&(ze=oa[q].toString()),(Ta===""||Ta===H)&&(ce[H]=ze)}),Ue.push(ce)})}j=Ue}})}return j}else if(ge!=null&&ge.includes("/")){let F={};return(Ie=O.cloneDeep(le))==null||Ie.forEach((j,Z)=>{var fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze,we,na,ta;if((j==null?void 0:j.comp)==="Table"){let _a=Array.isArray((pa=(me=(fe=j==null?void 0:j.compData)==null?void 0:fe.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:me.contents)==null?void 0:pa[0])?(ha=(Ce=(de=(Qe=j==null?void 0:j.compData)==null?void 0:Qe.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:de.contents)==null?void 0:Ce[0])==null?void 0:ha.some(Le=>Le==null?void 0:Le.children):[],ya=(Ta=(Ma=(Ue=j==null?void 0:j.compData)==null?void 0:Ue.find(Le=>(Le==null?void 0:Le.key)==="tableContents"))==null?void 0:Ma.contents)==null?void 0:Ta.map(Le=>(Le!=null&&Le.find(Ra=>Ra==null?void 0:Ra.id)&&(Le=Le.slice(1)),Le)),Pa=(q=(H=(ce=(oa=(Ze=j==null?void 0:j.compData)==null?void 0:Ze.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:oa.contents)==null?void 0:ce[0])==null?void 0:H[0])==null?void 0:q.label,va=(we=(ze=j==null?void 0:j.compData)==null?void 0:ze.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:we.contents;if(_a)(_a==null?void 0:_a.length)===0?F[j.name]=F!=null&&F[j.name]?F[j.name]:ve.tableToForm(ya,va):F[Pa]=ve.tableToForm(ya,va);else{const Le=[];va=va.slice(1,va.length-1),va==null||va.forEach((Ra,pl)=>{ya==null||ya.forEach(_l=>{Le.push({key:Ra.label+_l[0],value:_l[pl+1]})})}),F["form"+Z]=Le}}else{const _a=(ta=(na=j.compData)==null?void 0:na.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent"))==null?void 0:ta.contents;F!=null&&F.form||(F.form=[]);const ya=[];_a==null||_a.forEach(Pa=>{Pa.key!==""&&(Pa={key:(Pa==null?void 0:Pa.key)??(Pa==null?void 0:Pa.label),value:Pa==null?void 0:Pa.value},ya.push(Pa))}),F.form=[...ya,...O.cloneDeep(F==null?void 0:F.form)]}}),F}else{if(ge==="createInsofDataApi"){let F=(se=O.cloneDeep(N))==null?void 0:se[0];return F={comp:(Be=O.cloneDeep(F))==null?void 0:Be.comp,compData:(Fe=O.cloneDeep(F))==null?void 0:Fe.compData,name:(ba=O.cloneDeep(F))==null?void 0:ba.name,isShow:(za=O.cloneDeep(F))==null?void 0:za.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:E.value},value:{pageData:F}}}return ge}},Se=async(ge,N,U)=>{var Ee,qe,ca;let le=await ve.getItemData(N,sessionStorage.getItem("systemKey"),""),Te=le==null?void 0:le.find(Na=>(Na==null?void 0:Na.name)===(U==null?void 0:U[0]));if(Te){if((Te==null?void 0:Te.comp)==="Table"){let Na={};for(let Be in O.cloneDeep(ge))O.cloneDeep(ge)[Be]!=="loginUser"?Na[Be]=O.cloneDeep(ge)[Be]:Na[Be]=((Ee=b.value)==null?void 0:Ee.account)||((qe=b.value)==null?void 0:qe.账号);let ae=[],la=Na;Array.isArray(ge)||(la=[Na]),la==null||la.forEach(Be=>{ae.push({[Be[U[1]]]:Be})});let he=[],Ke=ae==null?void 0:ae.map(Be=>{var Fe;return(Fe=Object.keys(Be))==null?void 0:Fe[0]});le==null||le.forEach(Be=>{var Fe;(Be==null?void 0:Be.name)===(U==null?void 0:U[0])&&((Fe=Be==null?void 0:Be.compData)==null||Fe.forEach(ba=>{var za;(ba==null?void 0:ba.key)==="tableContents"&&((za=ba==null?void 0:ba.contents)==null||za.forEach(F=>{F!=null&&F.some(j=>Ke.includes(j))&&he.push({[F.find(j=>j.id).id]:F.find(j=>Ke.includes(j))})}))}))});let Ie=he==null?void 0:he.map(Be=>{var Fe;return(Fe=Object.keys(Be))==null?void 0:Fe[0]}),se=[];if(Ie==null||Ie.forEach(Be=>{var za;let Fe=(za=he==null?void 0:he.find(F=>{var j;return((j=Object.keys(F))==null?void 0:j[0].toString())===Be.toString()}))==null?void 0:za[Be],ba=ae==null?void 0:ae.find(F=>{var j;return((j=Object.keys(F))==null?void 0:j[0])===Fe});se.push({id:parseInt(Be),value:{tableData:ba[Fe]}})}),(se==null?void 0:se.length)>0)return se}else if((Te==null?void 0:Te.comp)==="Form"){let Na=O.cloneDeep(Te);Na.compData=(ca=Na.compData)==null?void 0:ca.map(he=>{var Ke;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(Ke=he.contents)==null?void 0:Ke.map(Ie=>((Ie==null?void 0:Ie.key)===(U==null?void 0:U[1])&&(Ie.value=(ge==null?void 0:ge[Ie==null?void 0:Ie.prop])||ge),Ie))),he});let ae={};for(let he in Na)he!=="id"&&(ae[he]=Na[he]);let la=[];if(la.push({id:Te==null?void 0:Te.id,keyType:U==null?void 0:U[1],value:{pageData:ae}}),(la==null?void 0:la.length)>0)return la}}},oe=async(ge,N,U)=>{var Ee,qe,ca,Na,ae,la,he,Ke,Ie,se;let le=await ve.getItemData(N,sessionStorage.getItem("systemKey"),""),Te=le==null?void 0:le.find(Be=>(Be==null?void 0:Be.name)===(U==null?void 0:U[0]));if(Te){if((Te==null?void 0:Te.comp)==="Table"){let Be={};for(let Fe in O.cloneDeep(ge))O.cloneDeep(ge)[Fe]!=="loginUser"?Be[Fe]=O.cloneDeep(ge)[Fe]:Be[Fe]=((Ee=b.value)==null?void 0:Ee.account)||((qe=b.value)==null?void 0:qe.账号);await Dr.createInsofDataApi({key:{type:"data",pageKey:N,tableId:Te==null?void 0:Te.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Be}})}else if((Te==null?void 0:Te.comp)==="Form"){let Be=O.cloneDeep(Te),Fe=Object.keys(ge),ba="";(Na=(ca=O.cloneDeep(Be))==null?void 0:ca.compData)==null||Na.forEach(me=>{var pa,Qe;(me==null?void 0:me.key)==="formContent"&&((Qe=(pa=O.cloneDeep(me))==null?void 0:pa.contents)==null||Qe.forEach(de=>{var Ce;Fe.includes(de==null?void 0:de.key)&&(de==null?void 0:de.value)===((Ce=b.value)==null?void 0:Ce.姓名)&&(ba=de==null?void 0:de.key)}))});let za=[];(ae=Object.values(ge[ba]))==null||ae.forEach(me=>{me!=null&&me.includes("(")&&za.push(me)}),za=[...new Set(za)];const F=za==null?void 0:za.map(async me=>{var ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze,we,na;let pa="";(oa=(Ze=(Ta=(Ma=(Ue=(ha=O.cloneDeep(me))==null?void 0:ha.split("("))==null?void 0:Ue[1])==null?void 0:Ma.split(")"))==null?void 0:Ta[0])==null?void 0:Ze.split(":"))==null||oa.forEach(ta=>{pa=pa===""?pa+ta.replaceAll("'",""):pa+"/"+ta.replaceAll("'","")});let Qe=[];(na=(we=(ze=(q=(H=(ce=O.cloneDeep(me))==null?void 0:ce.split("<"))==null?void 0:H[1])==null?void 0:q.split(">"))==null?void 0:ze[0])==null?void 0:we.split(":"))==null||na.forEach(ta=>{Qe.push(ta.replaceAll("'",""))});const de=await ve.getItemData(pa,sessionStorage.getItem("systemKey"),"");let Ce="";return de==null||de.forEach(ta=>{var _a;ta.name===(Qe==null?void 0:Qe[0])&&((_a=ta==null?void 0:ta.compData)==null||_a.forEach(ya=>{var Pa;(ya==null?void 0:ya.key)==="formContent"&&((Pa=ya.contents)==null||Pa.forEach(va=>{(va==null?void 0:va.key)===(Qe==null?void 0:Qe[1])&&(Ce=va==null?void 0:va.value)}))}))}),{[me]:Ce}}),j=await Promise.all(F);Be.compData=(he=(la=O.cloneDeep(Be))==null?void 0:la.compData)==null?void 0:he.map(me=>{var pa,Qe;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(Qe=(pa=O.cloneDeep(me))==null?void 0:pa.contents)==null?void 0:Qe.map(de=>{var Ce,ha,Ue,Ma;return(Ce=ge[ba])!=null&&Ce[de==null?void 0:de.key]&&(ge[ba][de==null?void 0:de.key].includes("(")?de.value=(ha=j==null?void 0:j.find(Ta=>{var Ze;return((Ze=Object.keys(Ta))==null?void 0:Ze[0])===ge[ba][de==null?void 0:de.key]}))==null?void 0:ha[ge[ba][de==null?void 0:de.key]]:de.value=(Ma=(Ue=O.cloneDeep(ge))==null?void 0:Ue[ba])==null?void 0:Ma[de==null?void 0:de.key]),de})),me});const Z=await Dr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let fe="";((Ke=Z==null?void 0:Z.data)==null?void 0:Ke.type)==="success"&&((se=(Ie=Z==null?void 0:Z.data)==null?void 0:Ie.result)==null||se.forEach(me=>{var pa,Qe;((Qe=(pa=me==null?void 0:me.value)==null?void 0:pa.pageData)==null?void 0:Qe.name)===(U==null?void 0:U[0])&&(fe=me.id)}),await Dr.updateInsofDataApi({id:fe,value:{pageData:Be}}))}}},X=(ge,N="",U={})=>{for(const[le,Te]of Object.entries(ge)){const Ee=N?`${N}.${le}`:le;Te!==null&&typeof Te=="object"&&!Array.isArray(Te)&&Object.prototype.toString.call(Te)!=="[object Date]"?X(Te,Ee,U):U[Ee]=Te}return U},pe=async(ge,N,U,le)=>{var qe,ca,Na,ae,la,he,Ke,Ie,se,Be,Fe,ba,za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma;let Te=await ve.getItemData(N,sessionStorage.getItem("systemKey"),""),Ee=Te==null?void 0:Te.find(Ta=>(Ta==null?void 0:Ta.name)===(U==null?void 0:U[0]));if(Ee){if(!(U!=null&&U[1])&&(Ee==null?void 0:Ee.comp)==="Table"){let Ta={},Ze=[],oa=(ca=(qe=Ee==null?void 0:Ee.compData)==null?void 0:qe.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:ca.contents;oa!=null&&oa.every(q=>Array.isArray(q))?Ze=(ae=ve.getColumnChild((Na=oa==null?void 0:oa[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=oa==null?void 0:oa.map(q=>q==null?void 0:q.label);for(let q in O.cloneDeep(ge))if(O.cloneDeep(ge)[q]!=="loginUser"){let ze=X(O.cloneDeep(ge)[q]),we={};for(let na in ze)if(Ze!=null&&Ze.find(ta=>ta===na))we[na]=ze[na];else if(Ze!=null&&Ze.find(ta=>(ta==null?void 0:ta.toUpperCase())===(na==null?void 0:na.toUpperCase()))){let ta=Ze==null?void 0:Ze.find(_a=>(_a==null?void 0:_a.toUpperCase())===(na==null?void 0:na.toUpperCase()));we[ta]=ze[na]}Ta[q]=we}else Ta[q]=((la=b.value)==null?void 0:la.account)||((he=b.value)==null?void 0:he.账号);let ce=await Dr.getInsofDataApi({keyLikes:{tableId:Ee==null?void 0:Ee.id}});if(((Ie=(Ke=ce==null?void 0:ce.data)==null?void 0:Ke.result)==null?void 0:Ie.length)>0){let q=(Be=(se=ce==null?void 0:ce.data)==null?void 0:se.result)==null?void 0:Be.map(ze=>ze==null?void 0:ze.id);(q==null?void 0:q.length)>0&&await Dr.batchDeleteInsofDataApi({ids:q})}let H=[];if((Fe=Ee==null?void 0:Ee.compData)!=null&&Fe.find(q=>(q==null?void 0:q.key)==="pageColumn")&&((F=(za=(ba=Ee==null?void 0:Ee.compData)==null?void 0:ba.find(q=>(q==null?void 0:q.key)==="pageColumn"))==null?void 0:za.contents)!=null&&F.includes("["))){const q=await Dr.getInsofDataApi({id:Ee==null?void 0:Ee.tableId});let ze=((me=(fe=(Z=(j=q==null?void 0:q.data)==null?void 0:j.result)==null?void 0:Z[0])==null?void 0:fe.key)==null?void 0:me.pageKey)??"";(pa=Object.values(Ta))==null||pa.forEach(we=>{H.push({key:{type:"data",pageKey:ze,tableId:Ee==null?void 0:Ee.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:we}})})}else(Qe=Object.values(Ta))==null||Qe.forEach(q=>{H.push({key:{type:"data",pageKey:N,tableId:Ee==null?void 0:Ee.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:q}})});(H==null?void 0:H.length)>0&&await Dr.batchAddInsofDataApi({dataList:H})}else if(!(U!=null&&U[1])&&(Ee==null?void 0:Ee.comp)==="Form"){let Ta=O.cloneDeep(Ee);Ta.compData=(Ce=(de=O.cloneDeep(Ta))==null?void 0:de.compData)==null?void 0:Ce.map(ce=>{var H,q;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(q=(H=O.cloneDeep(ce))==null?void 0:H.contents)==null?void 0:q.map(ze=>{var we,na;return(we=O.cloneDeep(ge))!=null&&we[ze==null?void 0:ze.key]&&(ze.value=(na=O.cloneDeep(ge))==null?void 0:na[ze==null?void 0:ze.key]),ze})),ce});const Ze=await Dr.getInsofDataApi({key:{type:"structure",pageKey:N,systemKey:sessionStorage.getItem("systemKey")}});let oa="";((ha=Ze==null?void 0:Ze.data)==null?void 0:ha.type)==="success"&&((Ma=(Ue=Ze==null?void 0:Ze.data)==null?void 0:Ue.result)==null||Ma.forEach(ce=>{var H,q;((q=(H=ce==null?void 0:ce.value)==null?void 0:H.pageData)==null?void 0:q.name)===(U==null?void 0:U[0])&&(oa=ce.id)}),await Dr.updateInsofDataApi({id:oa,value:{pageData:Ta}}))}}},ee=async ge=>{var N,U,le,Te,Ee,qe,ca,Na,ae,la,he,Ke,Ie,se;k.setImportLoading(!0);try{if(ge.api){let Be=new WeakMap,Fe=await ve.getItemData((w==null?void 0:w.value)===""?E.value:w==null?void 0:w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be),ba="";if(Fe=Fe==null?void 0:Fe.map(Qe=>{var de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze;if((Qe==null?void 0:Qe.comp)==="Form")Qe.compData=(de=Qe.compData)==null?void 0:de.map(we=>{var na;return(we==null?void 0:we.key)==="formContent"&&(we.contents=(na=we.contents)==null?void 0:na.map(ta=>{var _a;if((ta==null?void 0:ta.value)===""&&(ta==null?void 0:ta.type)==="Select"){let ya=ve.judgeContents((_a=O.cloneDeep(ta))==null?void 0:_a.optionUrl,Be);ta.value=ta.value||ya}return ta})),we});else if((Qe==null?void 0:Qe.comp)==="Table"&&(Ce=Qe.compData)!=null&&Ce.find(we=>(we==null?void 0:we.key)==="pageColumn")){let we=(Ue=(ha=Qe.compData)==null?void 0:ha.find(ya=>(ya==null?void 0:ya.key)==="pageColumn"))==null?void 0:Ue.contents,na=((Ta=(Ma=Qe.compData)==null?void 0:Ma.find(ya=>(ya==null?void 0:ya.key)==="pageGroup"))==null?void 0:Ta.contents)??"",ta=(ce=(oa=(Ze=we==null?void 0:we.split("["))==null?void 0:Ze[1])==null?void 0:oa.split("]"))==null?void 0:ce[0];ba=((H=we==null?void 0:we.split("["))==null?void 0:H[0])+((ze=(q=z.value)==null?void 0:q.find(ya=>(ya==null?void 0:ya.key)===ta))==null?void 0:ze.value)}return Qe}),!(ba===""||ba==="")){const Qe=await ve.getItemData(ba,sessionStorage.getItem("systemKey"),"",!1,"","",Be);Fe=Fe==null?void 0:Fe.map(de=>{var Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze,we,na;if((de==null?void 0:de.comp)==="Table"&&(Ce=de.compData)!=null&&Ce.find(ta=>(ta==null?void 0:ta.key)==="pageColumn")){let ta=(Ue=(ha=de.compData)==null?void 0:ha.find(Le=>(Le==null?void 0:Le.key)==="pageColumn"))==null?void 0:Ue.contents,_a=((Ta=(Ma=de.compData)==null?void 0:Ma.find(Le=>(Le==null?void 0:Le.key)==="pageGroup"))==null?void 0:Ta.contents)??"",ya=(ce=(oa=(Ze=ta==null?void 0:ta.split("["))==null?void 0:Ze[1])==null?void 0:oa.split("]"))==null?void 0:ce[0],Pa=((H=ta==null?void 0:ta.split("["))==null?void 0:H[0])+((ze=(q=z.value)==null?void 0:q.find(Le=>(Le==null?void 0:Le.key)===ya))==null?void 0:ze.value),va=(we=Qe==null?void 0:Qe.find(Le=>(Le==null?void 0:Le.name)===(_a===""?t==null?void 0:t.compName:_a)))==null?void 0:we.compData;de.compData=(na=de.compData)==null?void 0:na.map(Le=>{var Ra;return(Le==null?void 0:Le.key)==="tableContents"&&(Le.contents=(Ra=va==null?void 0:va.find(pl=>(pl==null?void 0:pl.key)==="tableContents"))==null?void 0:Ra.contents),Le})}return de})}let za={};if(((U=(N=ge==null?void 0:ge.extraValues)==null?void 0:N.input)==null?void 0:U.length)>0){const Qe=(Te=(le=ge==null?void 0:ge.extraValues)==null?void 0:le.input)==null?void 0:Te.map(async de=>{var Ce;te!=null&&te.find(ha=>ha===de)?za=await ie(de,Fe):za[Object.keys(de)[0]]=await ie((Ce=Object.values(de))==null?void 0:Ce[0],Fe,Be)});await Promise.all(Qe)}else za=await ie("/",Fe);let F=!1;(qe=(Ee=ge==null?void 0:ge.extraValues)==null?void 0:Ee.output)==null||qe.forEach(Qe=>{var de,Ce;(Ce=(de=Object.values(Qe))==null?void 0:de[0])!=null&&Ce.includes(".doc")&&(F=!0)});let j;if(F){const Qe=Fi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});j=await Wa.axios.post(ge.api,za,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Qe.close()})}else j=await Wa.axios.post(ge.api,za,{headers:{"Content-Type":"application/json"}});let Z=(la=(ae=(Na=(ca=O.cloneDeep(ge))==null?void 0:ca.extraValues)==null?void 0:Na.output)==null?void 0:ae.map(Qe=>{var de,Ce,ha,Ue,Ma,Ta,Ze,oa,ce,H,q,ze,we,na,ta,_a;if(!((Ce=(de=Object.values(Qe))==null?void 0:de[0])!=null&&Ce.includes(".doc"))){let ya=(H=(ce=(oa=(Ue=O.cloneDeep((ha=Object.values(Qe))==null?void 0:ha[0]))==null?void 0:Ue.split("["))==null?void 0:oa[((Ze=(Ta=O.cloneDeep((Ma=Object.values(Qe))==null?void 0:Ma[0]))==null?void 0:Ta.split("["))==null?void 0:Ze.length)-1])==null?void 0:ce.split("]"))==null?void 0:H[0],Pa=ya==null?void 0:ya.split(":"),va=(we=O.cloneDeep((q=Object.values(Qe))==null?void 0:q[0]))==null?void 0:we.substring(0,O.cloneDeep((ze=Object.values(Qe))==null?void 0:ze[0]).lastIndexOf("["));if(va=(ta=O.cloneDeep(va))==null?void 0:ta.slice(0,((na=O.cloneDeep(va))==null?void 0:na.length)-1),va!=null&&va.includes("[")){let Le="";if((_a=ve.contentTransArrayToAll(va,"/"))==null||_a.forEach(Ra=>{var pl,_l,Xl,bl,Vl,Ua,$l;if(!(Ra!=null&&Ra.includes("[")))Le=Le===""?Le+Ra.replaceAll("/",""):Le+"/"+Ra.replaceAll("/","");else{let zl=O.cloneDeep(Ra).slice(1,((pl=O.cloneDeep(Ra))==null?void 0:pl.length)-1),La=(Ua=(Vl=(bl=(Xl=(_l=O.cloneDeep(zl))==null?void 0:_l.split("["))==null?void 0:Xl[1])==null?void 0:bl.split("]"))==null?void 0:Vl[0])==null?void 0:Ua.split(":"),al="",nl=($l=Fe==null?void 0:Fe.find(ia=>(ia==null?void 0:ia.name)===(La==null?void 0:La[0])))==null?void 0:$l.compData;nl==null||nl.forEach(ia=>{var ja;(ia==null?void 0:ia.key)==="formContent"&&((ja=ia==null?void 0:ia.contents)==null||ja.forEach(Oa=>{(Oa==null?void 0:Oa.key)===(La==null?void 0:La[1])&&(al=Oa==null?void 0:Oa.value)}))}),Le=Le===""?Le+al.replaceAll("/",""):Le+"/"+al.replaceAll("/","")}}),va=Le,va[(va==null?void 0:va.length)-1]!=="/")return va}}}))==null?void 0:la.filter(Qe=>Qe);Z=[...new Set(O.cloneDeep(Z))];let fe=Z==null?void 0:Z.map(async Qe=>{let de=await ve.getItemData(Qe,sessionStorage.getItem("systemKey"),"",!1,"","",Be);if((de==null?void 0:de.length)===0)return await ve.getParentContents(Qe)});await Promise.all(fe);let me=[],pa=(Ie=(Ke=(he=O.cloneDeep(ge))==null?void 0:he.extraValues)==null?void 0:Ke.output)==null?void 0:Ie.map(async Qe=>{var oa,ce,H,q,ze,we,na,ta,_a,ya,Pa,va,Le,Ra,pl,_l,Xl,bl,Vl,Ua,$l,zl,La,al,nl,ia,ja,Oa,Va,ye,ma,Oe,ue,ka,ua,ea,Je,Xe,cl,Ve,Fa,wa,il,Aa,Me,Sl,Il,Gl,Hl,Zl,_r,Fl,pr,Vr,Ul,lr,Lr,Nr,$r,Br,yr,Ar,zr,nr,kn,Gr,rn,An,xn,mn;if((ce=(oa=Object.values(Qe))==null?void 0:oa[0])!=null&&ce.includes(".doc")){var de=new Blob([j.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=j.headers["content-disposition"],ha=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Ue=ha.exec(Ce),Ma=Ue==null?void 0:Ue[1],Ta=document.createElement("a"),Ze=window.URL.createObjectURL(de);v.value=[{name:Ma,blobUrl:Ze}],s.value=!0}else{let nn=(ya=(_a=(ta=(q=O.cloneDeep((H=Object.values(Qe))==null?void 0:H[0]))==null?void 0:q.split("["))==null?void 0:ta[((na=(we=O.cloneDeep((ze=Object.values(Qe))==null?void 0:ze[0]))==null?void 0:we.split("["))==null?void 0:na.length)-1])==null?void 0:_a.split("]"))==null?void 0:ya[0],ar=nn==null?void 0:nn.split(":"),Wl=(Le=O.cloneDeep((Pa=Object.values(Qe))==null?void 0:Pa[0]))==null?void 0:Le.substring(0,O.cloneDeep((va=Object.values(Qe))==null?void 0:va[0]).lastIndexOf("["));if(Wl!=null&&Wl.includes("[")?Wl=(pl=O.cloneDeep(Wl))==null?void 0:pl.slice(0,((Ra=O.cloneDeep(Wl))==null?void 0:Ra.length)-1):Wl===""&&(Wl=E.value),Wl=Wl.replaceAll("<","[").replaceAll(">","]"),Wl!=null&&Wl.includes("[")){let Ol="";(_l=ve.contentTransArrayToAll(Wl,"/"))==null||_l.forEach((Bl,gr)=>{var cr,jl,Rr,Fr,wn,on,Zn,zn,Qn,_n,Mn;if(!(Bl!=null&&Bl.includes("[")))Ol=Ol===""?Ol+Bl.replaceAll("/",""):Ol+"/"+Bl.replaceAll("/","");else{let Pn="",en="";(cr=O.cloneDeep(Bl))!=null&&cr.includes("]")?(Pn=O.cloneDeep(Bl).slice(1,((jl=O.cloneDeep(Bl))==null?void 0:jl.length)-1),en=(Zn=(on=(wn=(Fr=(Rr=O.cloneDeep(Pn))==null?void 0:Rr.split("["))==null?void 0:Fr[1])==null?void 0:wn.split("]"))==null?void 0:on[0])==null?void 0:Zn.split(":")):(Pn=O.cloneDeep(Bl).slice(1,(zn=O.cloneDeep(Bl))==null?void 0:zn.length),en=(Qn=O.cloneDeep(Pn))==null?void 0:Qn.split("/"));let In="",Sn=(_n=Fe==null?void 0:Fe.find(Wr=>(Wr==null?void 0:Wr.name)===(en==null?void 0:en[0])))==null?void 0:_n.compData;Sn==null||Sn.forEach(Wr=>{var jn;(Wr==null?void 0:Wr.key)==="formContent"&&((jn=Wr==null?void 0:Wr.contents)==null||jn.forEach(yn=>{(yn==null?void 0:yn.key)===(en==null?void 0:en[1])&&(In=yn==null?void 0:yn.value)}))}),((Mn=ve.contentTransArrayToAll(Wl,"/"))==null?void 0:Mn.length)-1!==gr?Ol=Ol===""?Ol+In.replaceAll("/",""):Ol+"/"+In.replaceAll("/",""):Ol=Ol+n.value+In.replaceAll("/","")}}),(Xl=E.value)!=null&&Xl.includes(Ol)?Wl=E.value:Wl=Ol}let Tl=O.cloneDeep((bl=Object.keys(Qe))==null?void 0:bl[0]);if(((Vl=j==null?void 0:j.data)==null?void 0:Vl.statusCode)===200||((Ua=j==null?void 0:j.data)==null?void 0:Ua.code)===200){if(((zl=($l=j==null?void 0:j.data)==null?void 0:$l.data)!=null&&zl[Tl]||(al=(La=j==null?void 0:j.data)==null?void 0:La.result)!=null&&al[Tl])&&(ar==null?void 0:ar.length)===1)return await pe(((ia=(nl=j==null?void 0:j.data)==null?void 0:nl.data)==null?void 0:ia[Tl])||((Oa=(ja=j==null?void 0:j.data)==null?void 0:ja.result)==null?void 0:Oa[Tl]),O.cloneDeep(Wl),ar,ba);if((ye=(Va=j==null?void 0:j.data)==null?void 0:Va.data)!=null&&ye[Tl]||(Oe=(ma=j==null?void 0:j.data)==null?void 0:ma.result)!=null&&Oe[Tl]){let Ol=await Se(((ka=(ue=j==null?void 0:j.data)==null?void 0:ue.data)==null?void 0:ka[Tl])||((ea=(ua=j==null?void 0:j.data)==null?void 0:ua.result)==null?void 0:ea[Tl]),O.cloneDeep(Wl),ar);return Ol&&(me=[...me,...Ol]),Ol}else{if(!((Je=j==null?void 0:j.data)!=null&&Je.data)){let Ol=await ve.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,"","",Be);Ol=Ol==null?void 0:Ol.map(gr=>{var cr;return(gr==null?void 0:gr.name)===(ar==null?void 0:ar[0])&&(gr.compData=(cr=gr.compData)==null?void 0:cr.map(jl=>{var Rr;return(jl==null?void 0:jl.key)==="formContent"&&(jl.contents=(Rr=jl.contents)==null?void 0:Rr.map(Fr=>{var wn,on;return(Fr==null?void 0:Fr.key)===(ar==null?void 0:ar[1])&&(Fr.value=(on=(wn=j==null?void 0:j.data)==null?void 0:wn.result)==null?void 0:on[Tl==null?void 0:Tl.replaceAll(":","")]),Fr})),jl})),gr});let Bl=[];(Xe=Ol==null?void 0:Ol.filter(gr=>(gr==null?void 0:gr.comp)==="Form"))==null||Xe.forEach(async gr=>{let cr={};for(let jl in gr)jl!=="id"&&(cr[jl]=gr[jl]);Bl.push({id:gr==null?void 0:gr.id,value:{pageData:cr}})}),(Bl==null?void 0:Bl.length)>0&&await Dr.batchUpdateInsofDataApi({dataList:Bl});return}if((ar==null?void 0:ar.length)===1){const Ol=(Fa=(Ve=(cl=j==null?void 0:j.data)==null?void 0:cl.data)==null?void 0:Ve.path)==null?void 0:Fa.path;let Bl="";(Sl=(Me=(Aa=(il=(wa=Ol==null?void 0:Ol.split("("))==null?void 0:wa[1])==null?void 0:il.split(")"))==null?void 0:Aa[0])==null?void 0:Me.split(":"))==null||Sl.forEach(jl=>{var Rr,Fr;Bl=Bl===""?Bl+((Rr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Rr.trim()):Bl+"/"+((Fr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Fr.trim())});let gr=[(_r=(Zl=(Hl=(Gl=(Il=Ol==null?void 0:Ol.split("<"))==null?void 0:Il[1])==null?void 0:Gl.split(">"))==null?void 0:Hl[0])==null?void 0:Zl.replaceAll("'",""))==null?void 0:_r.trim()],cr;return(Vr=(pr=(Fl=j==null?void 0:j.data)==null?void 0:Fl.data)==null?void 0:pr.data)!=null&&Vr[ar==null?void 0:ar[0]]?cr=await pe((Lr=(lr=(Ul=j==null?void 0:j.data)==null?void 0:Ul.data)==null?void 0:lr.data)==null?void 0:Lr[ar==null?void 0:ar[0]],Bl,ar,ba):cr=await oe(($r=(Nr=j==null?void 0:j.data)==null?void 0:Nr.data)==null?void 0:$r.data,Bl,gr,Be),cr}else{const Ol=(Ar=(yr=(Br=j==null?void 0:j.data)==null?void 0:Br.data)==null?void 0:yr.path)==null?void 0:Ar.path;let Bl="";return(rn=(Gr=(kn=(nr=(zr=Ol==null?void 0:Ol.split("("))==null?void 0:zr[1])==null?void 0:nr.split(")"))==null?void 0:kn[0])==null?void 0:Gr.split(":"))==null||rn.forEach(cr=>{var jl,Rr;Bl=Bl===""?Bl+((jl=cr==null?void 0:cr.replaceAll("'",""))==null?void 0:jl.trim()):Bl+"/"+((Rr=cr==null?void 0:cr.replaceAll("'",""))==null?void 0:Rr.trim())}),await Se((mn=(xn=(An=j==null?void 0:j.data)==null?void 0:An.data)==null?void 0:xn.data)==null?void 0:mn[ar==null?void 0:ar[0]],Bl,ar)}}}}});if(await Promise.all(pa),(me==null?void 0:me.length)>0){let Qe=[];me==null||me.forEach(ha=>{Qe!=null&&Qe.find(Ue=>{var Ma,Ta,Ze,oa;return((Ta=(Ma=Ue==null?void 0:Ue.value)==null?void 0:Ma.pageData)==null?void 0:Ta.name)===((oa=(Ze=ha==null?void 0:ha.value)==null?void 0:Ze.pageData)==null?void 0:oa.name)})||Qe.push(ha)});let de=[];Qe==null||Qe.forEach(ha=>{var Ta,Ze,oa,ce;let Ue=O.cloneDeep(ha);Ue.value.pageData.compData=(Ta=Ue.value.pageData.compData)==null?void 0:Ta.map(H=>{var q;return(H==null?void 0:H.key)==="formContent"&&(H.contents=(q=H.contents)==null?void 0:q.map(ze=>{var na,ta,_a,ya;let we=(na=O.cloneDeep(me))==null?void 0:na.find(Pa=>(Pa==null?void 0:Pa.keyType)===(ze==null?void 0:ze.key));if(we){let Pa=(ya=(_a=(ta=we.value.pageData.compData)==null?void 0:ta.find(va=>(va==null?void 0:va.key)==="formContent"))==null?void 0:_a.contents)==null?void 0:ya.find(va=>(va==null?void 0:va.key)===(ze==null?void 0:ze.key));ze.value=Pa==null?void 0:Pa.value}return ze})),H}),de.push({id:Ue==null?void 0:Ue.id,value:Ue==null?void 0:Ue.value});let Ma=[];(ce=(oa=(Ze=Ue==null?void 0:Ue.value)==null?void 0:Ze.pageData)==null?void 0:oa.compData)==null||ce.forEach(H=>{var q;(H==null?void 0:H.key)==="formContent"&&((q=H==null?void 0:H.contents)==null||q.forEach(ze=>{var we,na,ta,_a,ya,Pa;if((na=(we=ze==null?void 0:ze.optionUrl)==null?void 0:we.menuSelect)!=null&&na.find(va=>va==null?void 0:va.includes("[")))if(Ma!=null&&Ma.find(va=>{var Le,Ra,pl;return((Le=va==null?void 0:va.key)==null?void 0:Le.join(","))===((pl=(Ra=ze==null?void 0:ze.optionUrl)==null?void 0:Ra.menuSelect)==null?void 0:pl.join(","))})){let va=(ta=Ma==null?void 0:Ma.find(Le=>{var Ra,pl,_l;return((Ra=Le==null?void 0:Le.key)==null?void 0:Ra.join(","))===((_l=(pl=ze==null?void 0:ze.optionUrl)==null?void 0:pl.menuSelect)==null?void 0:_l.join(","))}))==null?void 0:ta.value;va.push({key:ze==null?void 0:ze.prop,groups:(_a=ze==null?void 0:ze.optionUrl)==null?void 0:_a.groupSelect,value:ze==null?void 0:ze.value}),Ma=Ma==null?void 0:Ma.map(Le=>{var Ra,pl,_l;return((Ra=Le==null?void 0:Le.key)==null?void 0:Ra.join(","))===((_l=(pl=ze==null?void 0:ze.optionUrl)==null?void 0:pl.menuSelect)==null?void 0:_l.join(","))&&(Le.value=va),Le})}else Ma.push({key:(ya=ze==null?void 0:ze.optionUrl)==null?void 0:ya.menuSelect,value:[{key:ze==null?void 0:ze.prop,groups:(Pa=ze==null?void 0:ze.optionUrl)==null?void 0:Pa.groupSelect,value:ze==null?void 0:ze.value}]})}))}),(Ma==null?void 0:Ma.length)>0&&(Ma=Ma==null?void 0:Ma.map(H=>{var ze;let q="";return(ze=H==null?void 0:H.key)==null||ze.forEach(we=>{var na;if(!(we!=null&&we.includes("[")))q=q===""?q+we:q+"/"+we;else{let ta="",_a=(na=we==null?void 0:we.replaceAll("[","").replaceAll("]",""))==null?void 0:na.split(":");Fe==null||Fe.forEach(ya=>{var Pa;(ya==null?void 0:ya.name)===(_a==null?void 0:_a[0])&&((Pa=ya==null?void 0:ya.compData)==null||Pa.forEach(va=>{var Le;(va==null?void 0:va.key)==="formContent"&&((Le=va==null?void 0:va.contents)==null||Le.forEach(Ra=>{(Ra==null?void 0:Ra.prop)===(_a==null?void 0:_a[1])&&(ta=Ra==null?void 0:Ra.value)}))}))}),q=q+n.value+ta}}),H.key=q,H})),Ma==null||Ma.forEach(H=>{var na,ta,_a;let q=(na=Be[H.key])==null?void 0:na.find(ya=>{var Pa,va,Le,Ra,pl,_l,Xl;return((va=(Pa=ya==null?void 0:ya.value)==null?void 0:Pa.pageData)==null?void 0:va.name)===((pl=(Ra=(Le=H==null?void 0:H.value)==null?void 0:Le[0])==null?void 0:Ra.groups)==null?void 0:pl[0])&&((Xl=(_l=ya==null?void 0:ya.value)==null?void 0:_l.pageData)==null?void 0:Xl.name)!==void 0}),ze=q==null?void 0:q.id,we=(ta=q==null?void 0:q.value)==null?void 0:ta.pageData;we.compData=(_a=we.compData)==null?void 0:_a.map(ya=>{var Pa;return(ya==null?void 0:ya.key)==="formContent"&&(ya.contents=(Pa=ya.contents)==null?void 0:Pa.map(va=>{var Ra;let Le=(Ra=H.value)==null?void 0:Ra.find(pl=>(pl==null?void 0:pl.key)===(va==null?void 0:va.prop));return Le&&(va.value=Le.value),va})),ya}),de.push({id:ze,value:{pageData:we}})})});let Ce=(se=O.cloneDeep(me))==null?void 0:se[0];(de==null?void 0:de.length)>0&&await Dr.batchUpdateInsofDataApi({dataList:de})}m.setFreshContent(!0)}k.setImportLoading(!1)}catch{Wa.ElMessage.error("方法执行错误,请查看方法!"),k.setImportLoading(!1)}y.value=!0},te=["createInsofDataApi"],De=Cl.debounce(async ge=>{ee(ge)},100),Pe=async ge=>{var qe,ca,Na;const N=O.cloneDeep(ge);let U,le=new WeakMap;ge!=null&&ge[0].path&&(U=await(N==null?void 0:N.map(async(ae,la)=>{var za,F,j,Z,fe,me,pa,Qe,de,Ce,ha,Ue,Ma,Ta,Ze,oa;const Ke=(za=le[ae==null?void 0:ae.path])==null?void 0:za.filter(ce=>{var H;return((H=ce==null?void 0:ce.key)==null?void 0:H.type)==="data"});let Ie="";const se=await ve.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,le);Ke==null||Ke.forEach(ce=>{var H,q,ze,we,na;((q=(H=ce==null?void 0:ce.value)==null?void 0:H.tableData)==null?void 0:q.算法名称)===((ze=N==null?void 0:N[la])==null?void 0:ze.method)&&(Ie=(na=(we=ce==null?void 0:ce.value)==null?void 0:we.tableData)==null?void 0:na.算法体)});const Be=await ve.getItemData(ae==null?void 0:ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,le);let Fe="",ba=(fe=(Z=(j=(F=Be==null?void 0:Be[0])==null?void 0:F.compData)==null?void 0:j.find(ce=>(ce==null?void 0:ce.key)==="header"))==null?void 0:Z.contents)==null?void 0:fe.findIndex(ce=>(ce==null?void 0:ce.prop)==="算法体");return(pa=(me=Be==null?void 0:Be[0])==null?void 0:me.compData)==null||pa.forEach(ce=>{var H;(ce==null?void 0:ce.key)==="tableContents"&&((H=ce==null?void 0:ce.contents)==null||H.forEach(q=>{q!=null&&q.find(ze=>ze===(ae==null?void 0:ae.method))&&(Fe=q[ba])}))}),{buttonName:((Qe=N==null?void 0:N[la])==null?void 0:Qe.method)||((ha=(Ce=(de=Ke==null?void 0:Ke[0])==null?void 0:de.value)==null?void 0:Ce.tableData)==null?void 0:ha.算法名称),api:(Ie===""?(Ta=(Ma=(Ue=Ke==null?void 0:Ke[0])==null?void 0:Ue.value)==null?void 0:Ma.tableData)==null?void 0:Ta.算法体:Ie)||Fe,content:se==null?void 0:se.filter(ce=>ce.comp!=="methodButton"),extraContent:(Ze=O.cloneDeep(ae.value))==null?void 0:Ze.slice(1),methodName:(ae==null?void 0:ae.path)??"",extraValues:(oa=N==null?void 0:N[la])==null?void 0:oa.data}})));const Te=N==null?void 0:N.map(async ae=>{var Be,Fe,ba,za,F,j;const la=(Be=resAll.data.result)==null?void 0:Be.filter(Z=>{var fe,me,pa;return((fe=Z==null?void 0:Z.key)==null?void 0:fe.parentTable)===""&&((me=Z==null?void 0:Z.key)==null?void 0:me.type)==="method"&&((pa=Z==null?void 0:Z.key)==null?void 0:pa.methodName)===Z.method}),he=la==null?void 0:la[0],Ke=(Fe=resAll.data.result)==null?void 0:Fe.filter(Z=>{var fe,me;return((fe=Z==null?void 0:Z.key)==null?void 0:fe.type)==="methodData"&&((me=Z==null?void 0:Z.key)==null?void 0:me.tableId)===(he==null?void 0:he.id)}),Ie=await ve.getItemData(E.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,le),se=Ke==null?void 0:Ke[0];return{buttonName:(ba=he==null?void 0:he.key)==null?void 0:ba.methodKey,api:(F=(za=se==null?void 0:se.value)==null?void 0:za.tableData)==null?void 0:F[0],content:Ie==null?void 0:Ie.filter(Z=>Z.comp!=="methodButton"),extraContent:(j=O.cloneDeep(ae.value))==null?void 0:j.slice(1),methodName:(ae==null?void 0:ae.method)??""}}),Ee=(qe=ge==null?void 0:ge[0])!=null&&qe.path&&((ca=ge==null?void 0:ge[0])==null?void 0:ca.path)!==""?await Promise.all(U):await Promise.all(Te);l.value=Ee==null?void 0:Ee.filter(ae=>ae==null?void 0:ae.extraContent),(Na=l.value)==null||Na.forEach(ae=>{var la;ae.api===""&&((la=ae.content)==null||la.forEach(he=>{var Ke;he.comp=="Table"&&m.setExtraContents(ve.methodTableToContent(he.compData,(Ke=ae.extraContent)==null?void 0:Ke[0]))}))})};return e.watch(()=>t.itemData,async()=>{_.value=="view"&&!y.value&&await Pe(O.cloneDeep(t.itemData)),y.value=!1},{immediate:!0,deep:!0}),(ge,N)=>{var U,le,Te;return e.unref(_)!=="edit"?(e.openBlock(),e.createElementBlock("div",e4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((U=l.value)==null?void 0:U.filter(Ee=>(Ee==null?void 0:Ee.buttonName)!=="保存"),Ee=>{var qe;return e.openBlock(),e.createElementBlock("div",null,[Ee.api!==""?(e.openBlock(),e.createBlock(e.unref(ns._sfc_main),{key:0,disabled:e.unref(I)===e.unref(E)&&!((qe=Ee==null?void 0:Ee.buttonName)!=null&&qe.includes("预览")),class:"calculator-content",modelValue:Ee.buttonName,onClickTrigger:ca=>e.unref(De)(Ee),loading:c.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(G)!==""&&((Te=e.unref(E))==null?void 0:Te[((le=e.unref(E))==null?void 0:le.length)-1])!==e.unref(n)?(e.openBlock(),e.createBlock(e.unref(ns._sfc_main),{key:0,class:"calculator-content",onClickTrigger:L,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(ll.ssFilePreview,{key:0,fileDataList:v.value,onDestroy:$},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},l4=er._export_sfc(a4,[["__scopeId","data-v-063aa9af"]]),r4={};function n4(a,l){return" 567 "}const i4=er._export_sfc(r4,[["render",n4]]),o4={class:"module content"},t4={class:"module data"},s4={class:"module layout"},c4={class:"form-content"},u4=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"}]),u=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}]),p=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({}),c=e.ref([]),k=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:c.value},{key:"signConfig",contents:m.value}]}),C=z=>{var I;m.value=O.cloneDeep(z),n("change",(I=k())==null?void 0:I.compData)},V=z=>{var I,P;if((z==null?void 0:z.buttonName)==="确认"){const E=O.cloneDeep(z==null?void 0:z.content);switch(s.value){case"create":c.value.push({...E,index:((I=c.value)==null?void 0:I.length)+1});break}n("change",(P=k())==null?void 0:P.compData),t.visible=!1}else t.visible=!1},_=(z,I)=>{var P,E;switch(z){case"create":(P=p.value)==null||P.forEach(S=>{S.value=""}),s.value="create",t.visible=!0;break;case"update":(E=p.value)==null||E.forEach(S=>{S.value=I[S==null?void 0:S.prop]}),s.value="update",t.visible=!0;break;case"delete":c.value.splice(I,1),s.value="delete";break}},G=()=>{t.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,z=>{var I,P;z&&(m.value=((I=z==null?void 0:z.find(E=>E.key==="signConfig"))==null?void 0:I.contents)??{},c.value=((P=z==null?void 0:z.find(E=>E.key==="signTypeList"))==null?void 0:P.contents)??[])},{immediate:!0}),(z,I)=>{const P=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",o4,[I[2]||(I[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(E,{class:"module-icon",id:"themeButton",onClick:I[0]||(I[0]=S=>_("create"))},{icon:e.withCtx(()=>[e.createVNode(P,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[1]||(I[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",t4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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(()=>I[3]||(I[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(E,{type:"danger",size:"small",onClick:b=>_("delete",w)},{default:e.withCtx(()=>I[4]||(I[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",s4,[e.createVNode(ll.ssForm,{rowContents:u.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(wr.ssDialog,{visible:t.visible,title:t.title,onBeforeDestroy:G,width:t.width},{default:e.withCtx(()=>[e.createElementVNode("div",c4,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:v.value,onOnButtonClick:V},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),d4=er._export_sfc(u4,[["__scopeId","data-v-487e0536"]]),p4=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 k,C;return(k=r==null?void 0:r.stepConfig)!=null&&k.allowTrigger?t.value:(C=r==null?void 0:r.stepConfig)==null?void 0:C.active}),v=(k,C)=>{t.value=C-1,n("clickStep",k,C)};e.onMounted(()=>{var k;n("clickStep",(k=r==null?void 0:r.stepList)==null?void 0:k[0],0)});const u=k=>ll.getComponent(k),p=()=>{var C;const k=(C=r==null?void 0:r.stepList)==null?void 0:C.find((V,_)=>_+1===s.value);return console.log("findStep",k),k?k==null?void 0:k.children:[]},m=k=>{n("clickTrigger",k)},c=k=>{n("changeTrigger",k)};return(k,C)=>{var G,z,I,P,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:(z=a.stepConfig)==null?void 0:z.simple,"align-center":((I=a.stepConfig)==null?void 0:I.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(k.$slots,"title",{title:S==null?void 0:S.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(k.$slots,"description",{descriptions:S==null?void 0:S.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(P=a.stepConfig)!=null&&P.allowTrigger&&((E=a.stepConfig)!=null&&E.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p(),(S,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(S==null?void 0:S.type)),{modelValue:S.value,"onUpdate:modelValue":b=>S.value=b,onClickTrigger:m,onChangeTrigger:c,content:S==null?void 0:S.content},e.createSlots({_:2},[e.renderList(k.$slots,(b,y)=>({name:y,fn:e.withCtx(L=>[e.renderSlot(k.$slots,y,e.mergeProps({ref_for:!0},L||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),f4=er._export_sfc(p4,[["__scopeId","data-v-fdbd6832"]]),h4=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=(u,p)=>{n("clickStep",u,p)};return e.watch(()=>r==null?void 0:r.itemData,u=>{var k,C,V,_;t.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let p=((k=u==null?void 0:u.find(G=>(G==null?void 0:G.key)==="stepName"))==null?void 0:k.contents)??[],m=[];(V=(C=u==null?void 0:u.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:C.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 c=((_=u==null?void 0:u.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:_.contents)??[];p=p==null?void 0:p.map((G,z)=>{let I=m==null?void 0:m.map(P=>{var E;return{...P,value:(E=c==null?void 0:c[z])==null?void 0:E[P==null?void 0:P.prop]}});return{title:G,description:I}}),s.value=p},{immediate:!0,deep:!0}),(u,p)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(f4,{stepConfig:t.value,stepList:s.value,onClickStep:v},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:c})=>[e.createTextVNode(e.toDisplayString(c),1)]),description:e.withCtx(({descriptions:c})=>[e.createVNode(ll.ssForm,{ref:"formRef",rowContents:c,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),v4=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})}}}),m4=er._export_sfc(v4,[["__scopeId","data-v-4172a886"]]),y4={class:"line-content"},g4={class:"line-time"},b4=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(u=>(u==null?void 0:u.key)==="timeLineList"))==null?void 0:s.contents,r.value=(v=t==null?void 0:t.find(u=>(u==null?void 0:u.key)==="timeLineConfig"))==null?void 0:v.contents},{immediate:!0}),(t,s)=>(e.openBlock(),e.createBlock(m4,{activities:n.value,timeLineConfig:r.value},{content:e.withCtx(({content:v,timestamp:u})=>[e.createElementVNode("span",y4,e.toDisplayString(v),1),e.createElementVNode("span",g4,e.toDisplayString(u),1)]),_:1},8,["activities","timeLineConfig"]))}}),k4=er._export_sfc(b4,[["__scopeId","data-v-b4d9deed"]]),x4={class:"tabs-content"},w4=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=C=>{n("change",C)},v=(C,V)=>{n("contentChange",C,V)},u=C=>{n("pageChange",C)},p=C=>{n("rowClick",C)},m=(C,V)=>{n("routeUrl",C,V)},c=C=>{n("clickTrigger",C)},k=(C,V)=>{n("clickMainKey",C,V)};return(C,V)=>{var _,G;return e.openBlock(),e.createElementBlock("div",x4,[(_=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:z,index:I})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)(z==null?void 0:z.comp)),{related:z==null?void 0:z.relatedTables,compNames:r==null?void 0:r.compNames,compName:z==null?void 0:z.name,cacheNewData:r==null?void 0:r.cacheNewData,isDevMode:a.isDevMode,itemData:z==null?void 0:z.compData,childItemData:z==null?void 0:z.itemChildData,onChange:s,index:(z==null?void 0:z.id)??I,config:{showIndex:z==null?void 0:z.showIndex,allowMove:z==null?void 0:z.allowMove,viewport:z==null?void 0:z.viewport},onContentChange:v,onPageChange:u,onRowClick:p,onRouteUrl:m,parentTableId:z==null?void 0:z.tableId,allMapContents:a.allMapContents,children:z==null?void 0:z.children,level:1,onClickTrigger:c,onClickMainKey:k},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])}}}),_4=er._export_sfc(w4,[["__scopeId","data-v-ded4e0d9"]]),S4={class:"type-select"},E4=["onClick"],C4={class:"list-icon"},D4={__name:"modelSelect",setup(a){const l=Xn(O.pinia),{itemData:r}=O.storeToRefs(l),n=t=>{const s=O.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",S4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ou),(u,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:m=>n(u)},[e.createElementVNode("div",C4,[e.createVNode(v,{name:u.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(u.name),1)],8,E4)]))),128))])}}},N4=er._export_sfc(D4,[["__scopeId","data-v-91799bf8"]]),T4={class:"fill-content"},B4={class:"operate-content"},A4={class:"collapse-title-content"},z4={class:"collapse-title-item"},M4={key:1},I4=["onClick"],O4={class:"icon-content"},L4={key:0,class:"edit-content"},$4=["onClick"],R4={class:"comp-child"},V4={__name:"modelFill",setup(a){const l=Xn(O.pinia),{itemData:r,originalData:n}=O.storeToRefs(l),t=e.ref([]);e.ref([]);const s=e.ref([]),v=e.ref([]),u=V=>{var G;let _=(G=O.cloneDeep(v.value))==null?void 0:G.map((z,I)=>(V===I&&(z.content=!0),z));v.value=_},p=V=>{var G;let _=(G=O.cloneDeep(v.value))==null?void 0:G.map((z,I)=>(V===I&&(z.content=!1),z));v.value=_,t.value=O.cloneDeep(r.value)},m=(V,_)=>{var P;let G=(P=O.cloneDeep(v.value))==null?void 0:P.map((E,S)=>(V===S&&(E.content=!1),E));v.value=G;const z=O.cloneDeep(r.value),I=z==null?void 0:z.filter((E,S)=>(S===V&&(E.name=_),E));l.setOriginalData(I),l.setItemData(I)};e.watch(()=>r.value,()=>{var V,_,G;!r.value||((V=r.value)==null?void 0:V.length)===0?t.value=[]:t.value=(_=O.cloneDeep(r.value))==null?void 0:_.filter(z=>(z==null?void 0:z.comp)!=="methodButton"),s.value=t.value,v.value=(G=O.cloneDeep(s.value))==null?void 0:G.map((z,I)=>({id:I,content:!1}))},{deep:!0,immediate:!0});const c=V=>Ti(V),k=(V,_,G)=>{var I,P;if(!V)return;let z=O.cloneDeep(r.value);z=(I=z==null?void 0:z.map((E,S)=>(S===G&&(E.compData=V),E)))==null?void 0:I.filter(E=>(E==null?void 0:E.comp)!=="methodButton"),v.value=(P=O.cloneDeep(z))==null?void 0:P.map((E,S)=>({id:S,content:!1})),l.setOriginalData(z),l.setItemData(z)},C=V=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const _=O.cloneDeep(r.value),G=_==null?void 0:_.filter((z,I)=>I!==V);l.setOriginalData(G),l.setItemData(G),Wa.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(V,_)=>{const G=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",T4,[_[1]||(_[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",B4,[e.createVNode(Zs.default,{class:"collapse-content",collapseContents:t.value},{title:e.withCtx(({item:z,index:I})=>{var P,E,S,w,b,y,L,$,K,ie;return[e.createElementVNode("div",A4,[e.createElementVNode("div",z4,[(E=(P=v.value)==null?void 0:P.find(Se=>Se.id===I))!=null&&E.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:z.name&&z.name!==""?"8px":"0px"})},e.toDisplayString(z.name),5)),(w=(S=v.value)==null?void 0:S.find(Se=>Se.id===I))!=null&&w.content?(e.openBlock(),e.createElementBlock("div",M4,[e.createVNode(ll.ssInput,{modelValue:z.name,"onUpdate:modelValue":Se=>z.name=Se,onClick:_[0]||(_[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(y=(b=v.value)==null?void 0:b.find(Se=>Se.id===I))!=null&&y.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Se=>u(I),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Edit",style:{width:"16px",height:"16px"}})],8,I4))]),e.createElementVNode("div",O4,[($=(L=v.value)==null?void 0:L.find(Se=>Se.id===I))!=null&&$.content?(e.openBlock(),e.createElementBlock("div",L4,[e.createVNode(G,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Se=>p(I),["stop"])},null,8,["onClick"]),e.createVNode(G,{name:"Save",onClick:e.withModifiers(Se=>m(I,z.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ie=(K=v.value)==null?void 0:K.find(Se=>Se.id===I))!=null&&ie.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Se=>C(I),["stop"]),class:"icon-content"},[e.createVNode(G,{name:"Delete",style:{width:"16px",height:"16px"}})],8,$4))])])]}),content:e.withCtx(({item:z,index:I})=>{var P,E;return[e.createElementVNode("div",R4,[e.createTextVNode(e.toDisplayString(c(z.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(z.comp+"Operate")),{itemContents:z==null?void 0:z.compData,originalItemContents:(E=(P=s.value)==null?void 0:P.find((S,w)=>w===I))==null?void 0:E.compData,onChange:S=>k(S,z,I)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},F4=er._export_sfc(V4,[["__scopeId","data-v-a46a44b9"]]),P4={key:0,class:"show-content"},j4={style:{display:"flex"}},H4={__name:"modelShow",setup(a){const l=Xn(O.pinia),{itemData:r}=O.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=O.cloneDeep(r.value)},{deep:!0,immediate:!0});const t=s=>Ti(s);return(s,v)=>{var u;return((u=n.value)==null?void 0:u.length)>0?(e.openBlock(),e.createElementBlock("div",P4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:m},[e.createElementVNode("div",j4,e.toDisplayString(p.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t(p.comp)),{itemData:p==null?void 0:p.compData,childItemData:p==null?void 0:p.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},U4=er._export_sfc(H4,[["__scopeId","data-v-3f3e863e"]]),q4={class:"tabs-header"},W4={class:"tabs-list"},K4={class:"tab-name"},G4={class:"tab-actions"},Y4=["onClick"],J4=["onClick"],X4=["onClick"],Z4={class:"model-operate"},Q4={class:"model-select",style:{display:"unset"}},e6={class:"existing-components"},a6={class:"component-list"},l6=["onClick"],r6={class:"component-info"},n6={class:"component-type"},i6={class:"component-name"},o6={class:"model-fill"},t6={__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(""),u=e.ref({title:""}),p=e.ref(-1),m=e.ref(!1),c=e.ref(-1),k=e.ref(new WeakMap),C=e.ref(null),V=Xn(O.pinia),{itemData:_}=O.storeToRefs(V),G=()=>{v.value="新增标签页",u.value.title="",p.value=-1,s.value=!0},z=ge=>{v.value="修改标签页",u.value.title=t.value[ge].title,p.value=ge,s.value=!0},I=ge=>{const N=S(ge);k.value.delete(N),t.value.splice(ge,1),Pe()},P=()=>{if(u.value.title.trim()){if(p.value===-1){const ge={title:u.value.title,value:u.value.title,label:u.value.title,children:[],id:E()};t.value.push(ge)}else t.value[p.value].title=u.value.title,t.value[p.value].value=u.value.title,t.value[p.value].label=u.value.title;s.value=!1,Pe()}},E=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,S=ge=>{const N=t.value[ge];return N.id||(N.id=E()),N.id},w=ge=>{var le;c.value=ge;const N=S(ge);C.value=O.cloneDeep(_.value);let U=k.value.get(N);!U&&((le=t.value[ge].children)==null?void 0:le.length)>0&&(U=$(t.value[ge].children)),U?V.setItemData(O.cloneDeep(U)):V.setItemData([]),m.value=!0},b=e.computed(()=>{const ge=O.useModelComp(O.pinia),N=O.storeToRefs(ge).itemData.value;return console.log("可用组件数据",N),!N||!Array.isArray(N)?[]:N.filter(U=>{var le;if(U.comp==="Tabs"&&c.value>=0){const Te=S(c.value);if((le=U.compData)==null?void 0:le.some(qe=>{var ca;return qe.key==="stepList"&&((ca=qe.contents)==null?void 0:ca.some(Na=>Na.id===Te))}))return!1}return!0})}),y=ge=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ge]||ge,L=ge=>{var N;try{const U=O.cloneDeep(ge);U.id=Date.now()+Math.random(),U.comp==="Tabs"&&((N=U.compData)==null||N.forEach(Te=>{Te.key==="stepList"&&Te.contents&&Te.contents.forEach(Ee=>{Ee.id=E()})}));const le=O.cloneDeep(_.value);le.push(U),V.setItemData(le)}catch(U){console.error("添加组件失败:",U)}},$=ge=>ge.map(N=>{var U;switch(N.type){case"form":return{comp:"Form",name:N.value||"表单",compData:K(N.content)};case"table":return{comp:"Table",name:N.value||"表格",compData:ie(N.content)};default:return{comp:"Unknown",name:N.value||"",compData:((U=N.content)==null?void 0:U.originalData)||[]}}}),K=ge=>{if(!ge)return[];const N=[];return ge.rowContents&&N.push({key:"formContent",contents:ge.rowContents}),ge.buttonValue&&N.push({key:"formButton",contents:ge.buttonValue}),typeof ge.isEnableWrap<"u"&&N.push({key:"enableWrap",contents:ge.isEnableWrap}),N},ie=ge=>[],Se=()=>{if(c.value>=0&&c.value<t.value.length){const ge=S(c.value);k.value.set(ge,O.cloneDeep(_.value)),t.value[c.value].children=pe(_.value),console.log("保存后的数据",pe(_.value))}m.value=!1,c.value=-1,C.value=null,Pe()},oe=()=>{C.value&&V.setItemData(O.cloneDeep(C.value)),m.value=!1,c.value=-1,C.value=null},X=()=>{m.value&&oe()},pe=ge=>{if(!Array.isArray(ge))throw new Error("sourceData must be an array");return ge.map((N,U)=>{if(!N||typeof N!="object")return N;const{comp:le,name:Te,compData:Ee}=N;switch(le){case"Form":return{type:"form",content:ee(Ee||[]),value:"表单"};case"Table":return{type:"table",content:te(Ee||[]),value:"表格"};default:return{type:"xxx",content:De(Ee||[]),value:""}}})},ee=ge=>{const N={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},U={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ge.forEach((le,Te)=>{if(!le||typeof le!="object"){console.warn(`Invalid config at index ${Te}:`,le);return}const{key:Ee,contents:qe}=le,ca=U[Ee];if(!ca){console.warn(`Unknown Form config key: ${Ee}`);return}Ee==="enableWrap"?N[ca]=!!qe:N[ca]=Array.isArray(qe)?qe:[]}),N},te=ge=>{const N={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},U={header:"columns",tableContents:"tableData"};return ge.forEach((le,Te)=>{if(!le||typeof le!="object"){console.warn(`Invalid config at index ${Te}:`,le);return}const{key:Ee,contents:qe}=le,ca=U[Ee];if(!ca){console.warn(`Unknown Table config key: ${Ee}`);return}N[ca]=Array.isArray(qe)?qe:[]}),N},De=ge=>(console.log("Default conversion logic - to be implemented"),{originalData:ge,processed:!1,componentType:"unknown"}),Pe=()=>{const ge=[{key:"stepList",contents:t.value}];n("change",ge)};return e.watch(()=>r.itemContents,ge=>{if(ge&&ge.length>0){const N=ge.find(U=>U.key==="stepList");N&&N.contents&&(t.value=N.contents.map(U=>({title:U.title||"",value:U.value||U.title||"",label:U.label||U.title||"",children:U.children||[],id:U.id||E()})))}},{immediate:!0,deep:!0}),(ge,N)=>{const U=e.resolveComponent("svg-icon"),le=e.resolveComponent("el-input"),Te=e.resolveComponent("el-form-item"),Ee=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",q4,[N[6]||(N[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:G},[e.createVNode(U,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),N[5]||(N[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",W4,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(qe,ca)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ca},[e.createElementVNode("span",K4,e.toDisplayString(qe.title),1),e.createElementVNode("div",G4,[e.createElementVNode("button",{onClick:Na=>z(ca)},"修改标题",8,Y4),e.createElementVNode("button",{onClick:Na=>w(ca)},"布局调整",8,J4),e.createElementVNode("button",{onClick:Na=>I(ca)},"删除",8,X4)])]))),128))]),e.createVNode(wr.ssDialog,{modelValue:s.value,"onUpdate:modelValue":N[2]||(N[2]=qe=>s.value=qe),title:v.value,onBeforeDestroy:N[3]||(N[3]=qe=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:N[1]||(N[1]=qe=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:P},"确定")]),default:e.withCtx(()=>[e.createVNode(Ee,{model:u.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Te,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(le,{modelValue:u.value.title,"onUpdate:modelValue":N[0]||(N[0]=qe=>u.value.title=qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(wr.ssDialog,{modelValue:m.value,"onUpdate:modelValue":N[4]||(N[4]=qe=>m.value=qe),title:"布局调整",fullScreen:"",onBeforeDestroy:X},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:oe},"取消"),e.createElementVNode("button",{onClick:Se},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Z4,[e.createElementVNode("div",Q4,[e.createVNode(N4),e.createElementVNode("div",e6,[N[8]||(N[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",a6,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,qe=>(e.openBlock(),e.createElementBlock("div",{key:qe.id,class:"component-item",onClick:ca=>L(qe)},[e.createElementVNode("div",r6,[e.createElementVNode("span",n6,e.toDisplayString(y(qe.comp)),1),e.createElementVNode("span",i6,e.toDisplayString(qe.name),1)]),N[7]||(N[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,l6))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:ge.innerWidth},[e.createVNode(U4)])),e.createElementVNode("div",o6,[e.createVNode(F4)])])]),_:1},8,["modelValue"])])}}},s6=er._export_sfc(t6,[["__scopeId","data-v-9096ed0d"]]);function c6(){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 u6(a){return{type:"line",...a}}function d6(){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 p6(a){return{type:"bar",barWidth:"60%",...a}}function f6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function h6(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Fn={line:{initBaseoptions:c6,initSeries:u6},bar:{initBaseoptions:d6,initSeries:p6},pie:{initBaseoptions:f6,initSeries:h6}},Ss=O.useMenuState(O.pinia),Vc=(a,l)=>{var c;const r=[],n=[],{group:t,nameCol:s,valueCol:v}=l||{},u=a==null?void 0:a.find(k=>{const{name:C}=k;return C===t});if(!u)return{names:r,values:n};const p=(c=u==null?void 0:u.compData)==null?void 0:c.find(k=>{const{key:C}=k;return C==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(k=>{const C=k==null?void 0:k[0];let V=!1;Wa.isObject(C)&&(C!=null&&C.id)&&(V=!0);let _=s,G=v;V&&(_=_+1,G=G+1);const z=k==null?void 0:k[_],I=k==null?void 0:k[G];r.push(z),n.push(I)}),{names:r,values:n}},v6=async a=>{const{menu:l,mainKey:r,detailGroup:n,detailNameCol:t,detailValueCol:s,isSelfDetail:v}=a||{};let u=null;const p=sessionStorage.getItem("systemKey");if(v&&Ss.activeMenuPath&&(u=await ve.getItemData(`${Ss.activeMenuPath}`,p,"")),!v){const m=l==null?void 0:l.join("/");u=await ve.getItemData(`${m}^${r}`,p,"")}return Vc(u,{group:n,nameCol:t,valueCol:s})},m6=async a=>{const{menu:l,group:r,nameCol:n,valueCol:t}=a||{},s=l==null?void 0:l.join("/"),v=sessionStorage.getItem("systemKey"),u=await ve.getItemData(s,v,"");return Vc(u,{group:r,nameCol:n,valueCol:t})},At=async(a,l)=>{const r={names:[],values:[]},{menu:n,group:t,nameCol:s,valueCol:v}=a||{};if(!n.length||!t)return r;const{mainKey:u,group:p,nameCol:m,valueCol:c,isSelfDetail:k}=l||{};return u&&p&&ll.isNumber(m)&&ll.isNumber(c)?await v6({menu:n,mainKey:u,detailGroup:p,detailNameCol:m,detailValueCol:c,isSelfDetail:k}):ll.isNumber(s)&&ll.isNumber(v)?await m6({menu:n,group:t,nameCol:s,valueCol:v}):r},y6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=Fn==null?void 0:Fn[n];if(!s)return;const{initBaseoptions:v,initSeries:u}=s,p=v();p.title.text=t??"";const{names:m,values:c}=await At(l,r);if(!m||!c)return p;p.xAxis.data=m;const k=u({data:c});return p.series.push(k),p},g6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=Fn==null?void 0:Fn[n];if(!s)return;const{initBaseoptions:v,initSeries:u}=s,p=v();p.title.text=t??"";const{names:m,values:c}=await At(l,r);if(!m||!c)return p;p.xAxis.data=m;const k=u({data:c});return p.series.push(k),p},b6=async({chartBaseConfig:a,chartDataConfig:l,chartDetailConfig:r})=>{const{type:n,title:t}=a||{},s=Fn==null?void 0:Fn[n];if(!s)return;const{initBaseoptions:v,initSeries:u}=s,p=v();p.title.text=t??"";const{names:m,values:c}=await At(l,r);if(!m||!c)return p;const k=[];for(let V=0;V<m.length;V++){const _=m[V],G=c[V];k.push({name:_,value:G})}const C=u({data:k});return p.series.push(C),p},k6=async(a=[])=>{var v,u,p;const l=((v=a==null?void 0:a.find(m=>m.key==="chartBaseConfig"))==null?void 0:v.contents)??{},r=((u=a==null?void 0:a.find(m=>m.key==="chartDataConfig"))==null?void 0:u.contents)??{},n=((p=a==null?void 0:a.find(m=>m.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:t}=l;let s={};return t==="line"&&(s=await y6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),t==="bar"&&(s=await g6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),t==="pie"&&(s=await b6({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})),s},x6=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 k6(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(Iu.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),w6=er._export_sfc(x6,[["__scopeId","data-v-d4c081e8"]]),_6={class:"chart-module layout"},S6={class:"chart-module content"},E6={class:"chart-module content"},C6={class:"form-content"},D6={class:"dialog-footer"},N6={class:"form-content"},T6={class:"dialog-footer"},B6={class:"form-content"},A6={class:"dialog-footer"},z6=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:""}],u=e.ref({}),p=()=>{var Ie;s.value=v(),(Ie=s.value)==null||Ie.forEach(se=>{var Fe;const Be=se==null?void 0:se.prop;se.value=(Fe=u==null?void 0:u.value)==null?void 0:Fe[Be]}),t.visible=!0},m=Ie=>{u.value=Ie},c=()=>{var Ie;t.visible=!1,n("change",(Ie=he())==null?void 0:Ie.compData)},k=e.reactive({visible:!1,width:"840",title:"数据配置"}),C=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 Ie=C.value,se=O.cloneDeep(Ie);return se==null||se.forEach(Be=>{var ba;const Fe=Be==null?void 0:Be.prop;Be.value=(ba=_.value)==null?void 0:ba[Fe]}),se},z=Ie=>{var Be;_.value=Ie;const se=G();C.value=se,n("change",(Be=he())==null?void 0:Be.compData)},I=async()=>{const Ie=await ve.getMenusContent(),se=G();se==null||se.forEach(Be=>{(Be==null?void 0:Be.prop)==="menu"&&(Be.contents=Ie)}),C.value=se,k.visible=!0,await qe(_.value.menu),await ae(_.value.group)},P=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 Ie=E.value,se=O.cloneDeep(Ie);return se==null||se.forEach(Be=>{var ba;const Fe=Be==null?void 0:Be.prop;Be.value=(ba=w.value)==null?void 0:ba[Fe]}),se},y=Ie=>{var Be;w.value=Ie;const se=b();E.value=se,n("change",(Be=he())==null?void 0:Be.compData)},L=async()=>{await X();const Ie=O.cloneDeep($.value),se=b();se==null||se.forEach(Be=>{var ba;const Fe=Be==null?void 0:Be.prop;Be.value=(ba=w==null?void 0:w.value)==null?void 0:ba[Fe],Fe==="mainKey"&&(Be.contents=Ie)}),E.value=se,P.visible=!0},$=e.ref([]),K=e.ref([]),ie=e.ref({}),Se=e.ref({}),oe=()=>{const{compData:Ie}=le.value||{},se=Ie==null?void 0:Ie.find(Z=>{const{key:fe}=Z;return fe==="header"}),Be=(se==null?void 0:se.contents)||[],Fe=Be==null?void 0:Be.filter((Z,fe)=>{const{label:me}=Z;return me!=="操作"}),ba=Fe==null?void 0:Fe.findIndex((Z,fe)=>{const{isMainKey:me}=Z;return me});if(ba<0)return[];const za=Ie==null?void 0:Ie.find(Z=>{const{key:fe}=Z;return fe==="tableContents"}),F=(za==null?void 0:za.contents)||[];return F==null?void 0:F.map(Z=>{const fe=Z==null?void 0:Z[0];let me=ba;Wa.isObject(fe)&&(fe!=null&&fe.id)&&(me=me+1);const pa=Z==null?void 0:Z[me];return{label:pa,value:pa}})},X=async()=>{const Ie=await oe();$.value=Ie},pe=async Ie=>{const se=sessionStorage.getItem("systemKey");return await ve.getItemData(Ie,se,"")},ee=async Ie=>{const se=Ie;K.value=se==null?void 0:se.map(Be=>{const{name:Fe}=Be;return ie.value[Fe]=Be,{label:Fe,value:Fe}})},te=Ie=>{const{comp:se,compData:Be}=Se.value||{};if(se==="Table"){let Fe=b();Fe=Fe.filter(ba=>{const{prop:za}=ba;return za!=="formItems"}),ca(Fe,Be),E.value=Fe}},De=async()=>{var Be,Fe;const Ie=(Be=w==null?void 0:w.value)==null?void 0:Be.mainKey,se=(Fe=_==null?void 0:_.value)==null?void 0:Fe.menu;if(Ie){const za=`${se==null?void 0:se.join("/")}^${Ie}`,F=await pe(za);await ee(F);const j=b();j==null||j.forEach(Z=>{(Z==null?void 0:Z.prop)==="group"&&(Z.contents=K.value)}),E.value=j}};e.watch(()=>{var Ie;return(Ie=w==null?void 0:w.value)==null?void 0:Ie.mainKey},async(Ie,se)=>{Ie!=se&&Ie&&await De()});const Pe=async Ie=>{const se=ie.value[Ie];Se.value=se,await te()};e.watch(()=>{var Ie;return(Ie=w==null?void 0:w.value)==null?void 0:Ie.group},async(Ie,se)=>{Ie!=se&&Ie&&Pe(Ie)});const ge=async()=>{var se;await De();const Ie=(se=w.value)==null?void 0:se.group;await Pe(Ie)},N=e.ref([]),U=e.ref({}),le=e.ref({}),Te=async Ie=>{const se=Ie==null?void 0:Ie.join("/"),Be=sessionStorage.getItem("systemKey");return await ve.getItemData(se,Be,"")},Ee=async Ie=>{const se=await Te(Ie);N.value=se==null?void 0:se.map(Be=>{const{name:Fe}=Be;return U.value[Fe]=Be,{label:Fe,value:Fe}})},qe=async(Ie,se)=>{await Ee(Ie);const Be=G();Be==null||Be.forEach(Fe=>{(Fe==null?void 0:Fe.prop)==="group"&&(Fe.contents=N.value)}),C.value=Be};e.watch(()=>{var Ie;return(Ie=_==null?void 0:_.value)==null?void 0:Ie.menu},async(Ie,se)=>{const Be=Ie==null?void 0:Ie.join("/"),Fe=se==null?void 0:se.join("/");Be!=Fe&&await qe(Ie)});const ca=(Ie,se)=>{const Be=se==null?void 0:se.find(F=>{const{key:j}=F;return j==="header"}),Fe=(Be==null?void 0:Be.contents)||[],ba=Fe==null?void 0:Fe.filter((F,j)=>{const{label:Z}=F;return Z!=="操作"}),za=ba==null?void 0:ba.map((F,j)=>{const{label:Z}=F;return{label:Z,value:j}});Ie==null||Ie.forEach(F=>{const j=F==null?void 0:F.prop;(j==="nameCol"||j==="valueCol")&&(F.contents=za)})},Na=Ie=>{const{comp:se,compData:Be}=le.value||{};if(se==="Table"){_.value.formItems=[];let Fe=G();Fe=Fe.filter(ba=>{const{prop:za}=ba;return za!=="formItems"}),ca(Fe,Be),C.value=Fe}},ae=async Ie=>{const se=U.value[Ie];le.value=se,await Na()};e.watch(()=>{var Ie;return(Ie=_==null?void 0:_.value)==null?void 0:Ie.group},async(Ie,se)=>{Ie!=se&&ae(Ie)});const la=async()=>{var Be,Fe;const Ie=(Be=_.value)==null?void 0:Be.menu;await qe(Ie);const se=(Fe=_.value)==null?void 0:Fe.group;await ae(se)},he=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:u.value},{key:"chartDataConfig",contents:_.value},{key:"chartDetailConfig",contents:w.value}]}),Ke=()=>{t.visible=!1,k.visible=!1,P.visible=!1};return e.onMounted(async()=>{var se,Be,Fe;C.value=V(),E.value=S();const Ie=r==null?void 0:r.itemContents;u.value=((se=Ie==null?void 0:Ie.find(ba=>ba.key==="chartBaseConfig"))==null?void 0:se.contents)??{},_.value=((Be=Ie==null?void 0:Ie.find(ba=>ba.key==="chartDataConfig"))==null?void 0:Be.contents)??{},await la(),w.value=((Fe=Ie==null?void 0:Ie.find(ba=>ba.key==="chartDetailConfig"))==null?void 0:Fe.contents)??{},await ge()}),(Ie,se)=>{const Be=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",_6,[se[4]||(se[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[0]||(se[0]=Fe=>p())},{default:e.withCtx(()=>se[3]||(se[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",S6,[se[6]||(se[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[1]||(se[1]=Fe=>I())},{default:e.withCtx(()=>se[5]||(se[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",E6,[se[8]||(se[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Be,{id:"themeButton",onClick:se[2]||(se[2]=Fe=>L())},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(wr.ssDialog,{visible:t.visible,title:t.title,onBeforeDestroy:Ke,width:t.width},{default:e.withCtx(()=>[e.createElementVNode("div",C6,[(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",D6,[e.createVNode(Be,{class:"cancel-button button",onClick:Ke,id:"themeBorderButton"},{default:e.withCtx(()=>se[9]||(se[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Be,{class:"ok-button button",onClick:c,id:"themeButton"},{default:e.withCtx(()=>se[10]||(se[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(wr.ssDialog,{visible:k.visible,title:k.title,onBeforeDestroy:Ke,width:k.width},{default:e.withCtx(()=>[e.createElementVNode("div",N6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",T6,[e.createVNode(Be,{class:"cancel-button button",onClick:Ke,id:"themeBorderButton"},{default:e.withCtx(()=>se[11]||(se[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Be,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:e.withCtx(()=>se[12]||(se[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(wr.ssDialog,{visible:P.visible,title:P.title,onBeforeDestroy:Ke,width:P.width},{default:e.withCtx(()=>[e.createElementVNode("div",B6,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",A6,[e.createVNode(Be,{class:"cancel-button button",onClick:Ke,id:"themeBorderButton"},{default:e.withCtx(()=>se[13]||(se[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Be,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:e.withCtx(()=>se[14]||(se[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),M6=er._export_sfc(z6,[["__scopeId","data-v-fe119645"]]),I6={class:"layout"},O6=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(()=>O.cloneDeep(n==null?void 0:n.itemData)||[]),s=e.computed(()=>{var c;const m=(c=t==null?void 0:t.value)==null?void 0:c.find(k=>{const{key:C}=k;return C==="baseConfig"});return m==null?void 0:m.contents}),v=e.computed(()=>{var c;const m=(c=t==null?void 0:t.value)==null?void 0:c.find(k=>{const{key:C}=k;return C==="children"});return m==null?void 0:m.contents}),u=e.computed(()=>{let m=O.cloneDeep(v.value)||[];const c=m.length;let k=0;const C=[];if(m=m.map(V=>{const _=V.span;return _?(V.span=Number(_),k=k+V.span):C.push(V),V}),k<24){const V=Math.floor((24-k)/c);C.forEach(_=>{_.span=V})}return m}),p=m=>{r("rowClick",m)};return(m,c)=>{var V;const k=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",I6,[e.createVNode(C,{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(u.value,(_,G)=>(e.openBlock(),e.createBlock(k,{span:_==null?void 0:_.span},{default:e.withCtx(()=>{var z;return[e.unref(Ni)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)(_.comp)),{key:e.unref(Jn),compName:_.name,index:(_==null?void 0:_.id)??G,height:(z=s.value)==null?void 0:z.height,itemData:_==null?void 0:_.compData,childItemData:_==null?void 0:_.itemChildData,onChange:e.unref(Ao),onContentChange:e.unref(zo),onPageChange:e.unref(Mo),onRowClick:p},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),L6=er._export_sfc(O6,[["__scopeId","data-v-ab9a36ed"]]),$6={class:"layout-operate"},R6={class:"layout-module"},V6={class:"collapse-title-item"},F6={class:"collapse-title"},P6={class:"icon-content"},j6=["onClick"],H6={class:"comp-child"},U6=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([]),u=w=>[{label:"高度",prop:"height",type:"input",value:w==null?void 0:w.height}],p=w=>{s.value=w,n("change",S(),!0)},m=e.ref([]),c=e.ref([]),k=w=>[{label:"占比",prop:"span",type:"input",value:w==null?void 0:w.span}],C=e.computed(()=>{const w=r==null?void 0:r.itemContents;return O.cloneDeep(w)}),V=e.computed(()=>{const w=C==null?void 0:C.value,b=w==null?void 0:w.find(y=>{const{key:L}=y;return L==="baseConfig"});return b==null?void 0:b.contents}),_=e.computed(()=>{const w=C==null?void 0:C.value,b=w==null?void 0:w.find(y=>{const{key:L}=y;return L==="children"});return b==null?void 0:b.contents}),G=()=>{var w;t.value=C.value||{},m.value=(_==null?void 0:_.value)||[],v.value=u(),v.value=(w=v.value)==null?void 0:w.map(b=>{var L;const{prop:y}=b;return b.value=(L=V.value)==null?void 0:L[y],b})};e.watch(()=>{var w;return(w=_==null?void 0:_.value)==null?void 0:w.length},()=>{var w;m.value=(_==null?void 0:_.value)||[],c.value=(w=_.value)==null?void 0:w.map(b=>k(b))},{immediate:!0});const z=(w,b)=>{const y=O.cloneDeep(_==null?void 0:_.value);y[b].span=w.span,m.value=y,n("change",S(),!0)},I=w=>Ti(w),P=(w,b,y)=>{if(!w)return;const L=O.cloneDeep(_==null?void 0:_.value);L[y]&&(L[y].compData=w,m.value=L,n("change",S(),!0))},E=w=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let b=O.cloneDeep(_==null?void 0:_.value);b=b==null?void 0:b.filter((y,L)=>w!==L),m.value=b,n("change",S(),!0),Wa.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 y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",$6,[e.createElementVNode("div",R6,[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]=L=>p(L))},null,8,["rowContents"])])]),e.createVNode(Zs.default,{class:"collapse-content",collapseContents:_.value},{title:e.withCtx(({item:L,index:$})=>[e.createElementVNode("div",V6,[e.createElementVNode("div",F6,e.toDisplayString(L.name),1),e.createElementVNode("div",P6,[e.createElementVNode("div",{onClick:e.withModifiers(K=>E($),["stop"]),class:"icon-content"},[e.createVNode(y,{name:"Delete",style:{width:"16px",height:"16px"}})],8,j6)])])]),content:e.withCtx(({item:L,index:$})=>[e.createElementVNode("div",H6,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(ll.ssForm,{rowContents:c.value[$],key:$,isEnableWrap:!0,onChange:K=>z(K,$)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(I(L.comp+"Operate")),{itemContents:L==null?void 0:L.compData,originalItemContents:L.compData,onChange:K=>P(K,L,$)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),q6=er._export_sfc(U6,[["__scopeId","data-v-ba05456e"]]),W6=typeof window<"u";var Es;W6&&((Es=window==null?void 0:window.navigator)!=null&&Es.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function un(a){return a==null}function Fc(){}const K6=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(K6)));function G6(){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 Cs(a,l=16){if(typeof a!="function")return Fc;const r=(...s)=>{a(...s)};if(l<=0)return Pc(r);let n=0,t;return function(...s){const v=Date.now(),u=v-n;clearTimeout(t),u>=l?(n=v,r(...s)):t=setTimeout(()=>{n=Date.now(),r(...s)},Math.max(0,l-u))}}function Y6(a,l=100){if(typeof a!="function")return Fc;const r=(...t)=>{a(...t)};if(l<=0)return Pc(r);let n;return function(...t){clearTimeout(n),n=setTimeout(()=>{r(...t)},l)}}function Pc(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,jc=new WeakMap;function J6(){ji.forEach(a=>{a(...jc.get(a))}),ji.clear()}function Jr(a,...l){if(typeof a!="function")return a;jc.set(a,l),!ji.has(a)&&(ji.add(a),ji.size===1&&Promise.resolve().then(J6))}const Hc=Symbol("LAYOUT_KEY"),Uc=Symbol("EMITTER_KEY");function X6(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 Et(a){const l=Array(a.length);for(let r=0,n=a.length;r<n;r++)l[r]=Z6(a[r]);return l}function Z6(a){return{...a}}function qc(a,l){return!(a===l||a.x+a.w<=l.x||a.x>=l.x+l.w||a.y+a.h<=l.y||a.y>=l.y+l.h)}function _i(a,l,r){const n=Kc(a),t=Gc(a),s=Array(a.length);for(let v=0,u=t.length;v<u;v++){let p=t[v];p.static||(p=Q6(n,p,l,r),n.push(p)),s[a.findIndex(m=>m.i===p.i)]=p,p.moved=!1}return s}function Q6(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 e1(a,l){const r=Kc(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 Ds(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(qc(a[r],l))return a[r]}function Wc(a,l){return a.filter(r=>qc(r,l))}function Kc(a){return a.filter(l=>l.static)}function Ct(a,l,r,n,t=!1,s=!1){if(l.static)return a;const v=l.x,u=l.y,p=n&&l.y>n;typeof r=="number"&&(l.x=r),typeof n=="number"&&(l.y=n),l.moved=!0;let m=Gc(a);p&&(m=m.reverse());const c=Wc(m,l);if(s&&c.length)return l.x=v,l.y=u,l.moved=!1,a;for(let k=0,C=c.length;k<C;k++){const V=c[k];V.moved||l.y>V.y&&l.y-V.y>V.h/4||(V.static?a=Ns(a,V,l,t):a=Ns(a,l,V,t))}return a}function Ns(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 Ct(a,r,void 0,t.y,!1)}return Ct(a,r,void 0,r.y+1,!1)}function a1(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 l1(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 r1(a,l,r,n){return{top:a+"px",left:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function n1(a,l,r,n){return{top:a+"px",right:l+"px",width:r+"px",height:n+"px",position:"absolute"}}function Gc(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 i1(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 u=0;u<r.length;u++)if(typeof v[r[u]]!="number")throw new Error("VueGridLayout: "+l+"["+t+"]."+r[u]+" 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 o1(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 Ts(a){return s1(a)}function s1(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 Bs(a,l,r,n){return c1(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 c1(a){return typeof a=="number"&&!Number.isNaN(a)}function u1(a,l){const r=Jc(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 Yc(a,l){if(!l[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return l[a]}function d1(a,l,r,n,t,s,v){if(l[n])return Et(l[n]);let u=a;const p=Jc(r),m=p.slice(p.indexOf(n));for(let c=0,k=m.length;c<k;c++){const C=m[c];if(l[C]){u=l[C];break}}return u=Et(u||[]),_i(e1(u,{cols:s}),v)}function Jc(a){return Object.keys(a).sort((l,r)=>a[l]-a[r])}let p1="auto";function f1(){return typeof document<"u"}function As(){return f1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):p1}var Vi={exports:{}},h1=Vi.exports,zs;function v1(){return zs||(zs=1,function(a,l){(function(r,n){a.exports=n()})(h1,function(){function r(o,i){var f=Object.keys(o);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(o);i&&(g=g.filter(function(x){return Object.getOwnPropertyDescriptor(o,x).enumerable})),f.push.apply(f,g)}return f}function n(o){for(var i=1;i<arguments.length;i++){var f=arguments[i]!=null?arguments[i]:{};i%2?r(Object(f),!0).forEach(function(g){p(o,g,f[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(f)):r(Object(f)).forEach(function(g){Object.defineProperty(o,g,Object.getOwnPropertyDescriptor(f,g))})}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 f=0;f<i.length;f++){var g=i[f];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(o,G(g.key),g)}}function u(o,i,f){return i&&v(o.prototype,i),Object.defineProperty(o,"prototype",{writable:!1}),o}function p(o,i,f){return(i=G(i))in o?Object.defineProperty(o,i,{value:f,enumerable:!0,configurable:!0,writable:!0}):o[i]=f,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&&k(o,i)}function c(o){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},c(o)}function k(o,i){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,g){return f.__proto__=g,f},k(o,i)}function C(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 f,g=c(o);if(i){var x=c(this).constructor;f=Reflect.construct(g,arguments,x)}else f=g.apply(this,arguments);return function(M,Y){if(Y&&(typeof Y=="object"||typeof Y=="function"))return Y;if(Y!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C(M)}(this,f)}}function _(){return _=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(o,i,f){var g=function(M,Y){for(;!Object.prototype.hasOwnProperty.call(M,Y)&&(M=c(M))!==null;);return M}(o,i);if(g){var x=Object.getOwnPropertyDescriptor(g,i);return x.get?x.get.call(arguments.length<3?o:f):x.value}},_.apply(this,arguments)}function G(o){var i=function(f,g){if(typeof f!="object"||f===null)return f;var x=f[Symbol.toPrimitive];if(x!==void 0){var M=x.call(f,g);if(typeof M!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(o,"string");return typeof i=="symbol"?i:i+""}var z=function(o){return!(!o||!o.Window)&&o instanceof o.Window},I=void 0,P=void 0;function E(o){I=o;var i=o.document.createTextNode("");i.ownerDocument!==o.document&&typeof o.wrap=="function"&&o.wrap(i)===i&&(o=o.wrap(o)),P=o}function S(o){return z(o)?o:(o.ownerDocument||o).defaultView||P.window}typeof window<"u"&&window&&E(window);var w=function(o){return!!o&&t(o)==="object"},b=function(o){return typeof o=="function"},y={window:function(o){return o===P||z(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)||P;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 L(o){var i=o.interaction;if(i.prepared.name==="drag"){var f=i.prepared.axis;f==="x"?(i.coords.cur.page.y=i.coords.start.page.y,i.coords.cur.client.y=i.coords.start.client.y,i.coords.velocity.client.y=0,i.coords.velocity.page.y=0):f==="y"&&(i.coords.cur.page.x=i.coords.start.page.x,i.coords.cur.client.x=i.coords.start.client.x,i.coords.velocity.client.x=0,i.coords.velocity.page.x=0)}}function $(o){var i=o.iEvent,f=o.interaction;if(f.prepared.name==="drag"){var g=f.prepared.axis;if(g==="x"||g==="y"){var x=g==="x"?"y":"x";i.page[x]=f.coords.start.page[x],i.client[x]=f.coords.start.client[x],i.delta[x]=0}}}var K={id:"actions/drag",install:function(o){var i=o.actions,f=o.Interactable,g=o.defaults;f.prototype.draggable=K.draggable,i.map.drag=K,i.methodDict.drag="draggable",g.actions.drag=K.defaults},listeners:{"interactions:before-action-move":L,"interactions:action-resume":L,"interactions:action-move":$,"auto-start:check":function(o){var i=o.interaction,f=o.interactable,g=o.buttons,x=f.options.drag;if(x&&x.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(g&f.options.drag.mouseButtons)!=0))return o.action={name:"drag",axis:x.lockAxis==="start"?x.startAxis:x.lockAxis},!1}},draggable:function(o){return y.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):y.bool(o)?(this.options.drag.enabled=o,this):this.options.drag},beforeMove:L,move:$,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(o){return o.search("drag")===0}},ie=K,Se={init:function(o){var i=o;Se.document=i.document,Se.DocumentFragment=i.DocumentFragment||oe,Se.SVGElement=i.SVGElement||oe,Se.SVGSVGElement=i.SVGSVGElement||oe,Se.SVGElementInstance=i.SVGElementInstance||oe,Se.Element=i.Element||oe,Se.HTMLElement=i.HTMLElement||Se.Element,Se.Event=i.Event,Se.Touch=i.Touch||oe,Se.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 oe(){}var X=Se,pe={init:function(o){var i=X.Element,f=o.navigator||{};pe.supportsTouch="ontouchstart"in o||y.func(o.DocumentTouch)&&X.document instanceof o.DocumentTouch,pe.supportsPointerEvent=f.pointerEnabled!==!1&&!!X.PointerEvent,pe.isIOS=/iP(hone|od|ad)/.test(f.platform),pe.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),pe.isIe9=/MSIE 9/.test(f.userAgent),pe.isOperaMobile=f.appName==="Opera"&&pe.supportsTouch&&/Presto/.test(f.userAgent),pe.prefixedMatchesSelector="matches"in i.prototype?"matches":"webkitMatchesSelector"in i.prototype?"webkitMatchesSelector":"mozMatchesSelector"in i.prototype?"mozMatchesSelector":"oMatchesSelector"in i.prototype?"oMatchesSelector":"msMatchesSelector",pe.pEventTypes=pe.supportsPointerEvent?X.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,pe.wheelEvent=X.document&&"onmousewheel"in X.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ee=pe;function te(o,i){if(o.contains)return o.contains(i);for(;i;){if(i===o)return!0;i=i.parentNode}return!1}function De(o,i){for(;y.element(o);){if(ge(o,i))return o;o=Pe(o)}return null}function Pe(o){var i=o.parentNode;if(y.docFrag(i)){for(;(i=i.host)&&y.docFrag(i););return i}return i}function ge(o,i){return P!==I&&(i=i.replace(/\/deep\//g," ")),o[ee.prefixedMatchesSelector](i)}var N=function(o){return o.parentNode||o.host};function U(o,i){for(var f,g=[],x=o;(f=N(x))&&x!==i&&f!==x.ownerDocument;)g.unshift(x),x=f;return g}function le(o,i,f){for(;y.element(o);){if(ge(o,i))return!0;if((o=Pe(o))===f)return ge(o,i)}return!1}function Te(o){return o.correspondingUseElement||o}function Ee(o){var i=o instanceof X.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 qe(o){var i,f=Ee(o);if(!ee.isIOS7&&f){var g={x:(i=(i=S(o))||P).scrollX||i.document.documentElement.scrollLeft,y:i.scrollY||i.document.documentElement.scrollTop};f.left+=g.x,f.right+=g.x,f.top+=g.y,f.bottom+=g.y}return f}function ca(o){for(var i=[];o;)i.push(o),o=Pe(o);return i}function Na(o){return!!y.string(o)&&(X.document.querySelector(o),!0)}function ae(o,i){for(var f in i)o[f]=i[f];return o}function la(o,i,f){return o==="parent"?Pe(f):o==="self"?i.getRect(f):De(f,o)}function he(o,i,f,g){var x=o;return y.string(x)?x=la(x,i,f):y.func(x)&&(x=x.apply(void 0,g)),y.element(x)&&(x=qe(x)),x}function Ke(o){return o&&{x:"x"in o?o.x:o.left,y:"y"in o?o.y:o.top}}function Ie(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 se(o,i,f){o.left&&(i.left+=f.x),o.right&&(i.right+=f.x),o.top&&(i.top+=f.y),o.bottom&&(i.bottom+=f.y),i.width=i.right-i.left,i.height=i.bottom-i.top}function Be(o,i,f){var g=f&&o.options[f];return Ke(he(g&&g.origin||o.options.origin,o,i,[o&&i]))||{x:0,y:0}}function Fe(o,i){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(be){return!0},g=arguments.length>3?arguments[3]:void 0;if(g=g||{},y.string(o)&&o.search(" ")!==-1&&(o=ba(o)),y.array(o))return o.forEach(function(be){return Fe(be,i,f,g)}),g;if(y.object(o)&&(i=o,o=""),y.func(i)&&f(o))g[o]=g[o]||[],g[o].push(i);else if(y.array(i))for(var x=0,M=i;x<M.length;x++){var Y=M[x];Fe(o,Y,f,g)}else if(y.object(i))for(var Q in i)Fe(ba(Q).map(function(be){return"".concat(o).concat(be)}),i[Q],f,g);return g}function ba(o){return o.trim().split(/ +/)}var za=function(o,i){return Math.sqrt(o*o+i*i)},F=["webkit","moz"];function j(o,i){o.__set||(o.__set={});var f=function(x){if(F.some(function(M){return x.indexOf(M)===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(M){o.__set[x]=M},configurable:!0})};for(var g in i)f(g);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 fe(o){o.page.x=0,o.page.y=0,o.client.x=0,o.client.y=0}function me(o){return o instanceof X.Event||o instanceof X.Touch}function pa(o,i,f){return o=o||"page",(f=f||{}).x=i[o+"X"],f.y=i[o+"Y"],f}function Qe(o,i){return i=i||{x:0,y:0},ee.isOperaMobile&&me(o)?(pa("screen",o,i),i.x+=window.scrollX,i.y+=window.scrollY):pa("page",o,i),i}function de(o){return y.number(o.pointerId)?o.pointerId:o.identifier}function Ce(o,i,f){var g=i.length>1?Ue(i):i[0];Qe(g,o.page),function(x,M){M=M||{},ee.isOperaMobile&&me(x)?pa("screen",x,M):pa("client",x,M)}(g,o.client),o.timeStamp=f}function ha(o){var i=[];return y.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 Ue(o){for(var i={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<o.length;f++){var g=o[f];for(var x in i)i[x]+=g[x]}for(var M in i)i[M]/=o.length;return i}function Ma(o){if(!o.length)return null;var i=ha(o),f=Math.min(i[0].pageX,i[1].pageX),g=Math.min(i[0].pageY,i[1].pageY),x=Math.max(i[0].pageX,i[1].pageX),M=Math.max(i[0].pageY,i[1].pageY);return{x:f,y:g,left:f,top:g,right:x,bottom:M,width:x-f,height:M-g}}function Ta(o,i){var f=i+"X",g=i+"Y",x=ha(o),M=x[0][f]-x[1][f],Y=x[0][g]-x[1][g];return za(M,Y)}function Ze(o,i){var f=i+"X",g=i+"Y",x=ha(o),M=x[1][f]-x[0][f],Y=x[1][g]-x[0][g];return 180*Math.atan2(Y,M)/Math.PI}function oa(o){return y.string(o.pointerType)?o.pointerType:y.number(o.pointerType)?[void 0,void 0,"touch","pen","mouse"][o.pointerType]:/touch/.test(o.type||"")||o instanceof X.Touch?"touch":"mouse"}function ce(o){var i=y.func(o.composedPath)?o.composedPath():o.path;return[Te(i?i[0]:o.target),Te(o.currentTarget)]}var H=function(){function o(i){s(this,o),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=i}return u(o,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}();Object.defineProperty(H.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var q=function(o,i){for(var f=0;f<i.length;f++){var g=i[f];o.push(g)}return o},ze=function(o){return q([],o)},we=function(o,i){for(var f=0;f<o.length;f++)if(i(o[f],f,o))return f;return-1},na=function(o,i){return o[we(o,i)]},ta=function(o){m(f,o);var i=V(f);function f(g,x,M){var Y;s(this,f),(Y=i.call(this,x._interaction)).dropzone=void 0,Y.dragEvent=void 0,Y.relatedTarget=void 0,Y.draggable=void 0,Y.propagationStopped=!1,Y.immediatePropagationStopped=!1;var Q=M==="dragleave"?g.prev:g.cur,be=Q.element,He=Q.dropzone;return Y.type=M,Y.target=be,Y.currentTarget=be,Y.dropzone=He,Y.dragEvent=x,Y.relatedTarget=x.target,Y.draggable=x.interactable,Y.timeStamp=x.timeStamp,Y}return u(f,[{key:"reject",value:function(){var g=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 M=x.activeDrops,Y=we(M,function(be){var He=be.dropzone,Ne=be.element;return He===g.dropzone&&Ne===g.target});x.activeDrops.splice(Y,1);var Q=new f(x,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new f(x,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(H);function _a(o,i){for(var f=0,g=o.slice();f<g.length;f++){var x=g[f],M=x.dropzone,Y=x.element;i.dropzone=M,i.target=Y,M.fire(i),i.propagationStopped=i.immediatePropagationStopped=!1}}function ya(o,i){for(var f=function(M,Y){for(var Q=[],be=0,He=M.interactables.list;be<He.length;be++){var Ne=He[be];if(Ne.options.drop.enabled){var aa=Ne.options.drop.accept;if(!(y.element(aa)&&aa!==Y||y.string(aa)&&!ge(Y,aa)||y.func(aa)&&!aa({dropzone:Ne,draggableElement:Y})))for(var Da=0,Xa=Ne.getAllElements();Da<Xa.length;Da++){var Ya=Xa[Da];Ya!==Y&&Q.push({dropzone:Ne,element:Ya,rect:Ne.getRect(Ya)})}}}return Q}(o,i),g=0;g<f.length;g++){var x=f[g];x.rect=x.dropzone.getRect(x.element)}return f}function Pa(o,i,f){for(var g=o.dropState,x=o.interactable,M=o.element,Y=[],Q=0,be=g.activeDrops;Q<be.length;Q++){var He=be[Q],Ne=He.dropzone,aa=He.element,Da=He.rect,Xa=Ne.dropCheck(i,f,x,M,aa,Da);Y.push(Xa?aa:null)}var Ya=function(el){for(var kl,ml,dl,ql=[],Rl=0;Rl<el.length;Rl++){var Ml=el[Rl],Al=el[kl];if(Ml&&Rl!==kl)if(Al){var jr=N(Ml),Sr=N(Al);if(jr!==Ml.ownerDocument)if(Sr!==Ml.ownerDocument)if(jr!==Sr){ql=ql.length?ql:U(Al);var Yr=void 0;if(Al instanceof X.HTMLElement&&Ml instanceof X.SVGElement&&!(Ml instanceof X.SVGSVGElement)){if(Ml===Sr)continue;Yr=Ml.ownerSVGElement}else Yr=Ml;for(var tn=U(Yr,Al.ownerDocument),gn=0;tn[gn]&&tn[gn]===ql[gn];)gn++;var li=[tn[gn-1],tn[gn],ql[gn]];if(li[0])for(var ri=li[0].lastChild;ri;){if(ri===li[1]){kl=Rl,ql=tn;break}if(ri===li[2])break;ri=ri.previousSibling}}else dl=Al,(parseInt(S(ml=Ml).getComputedStyle(ml).zIndex,10)||0)>=(parseInt(S(dl).getComputedStyle(dl).zIndex,10)||0)&&(kl=Rl);else kl=Rl}else kl=Rl}return kl}(Y);return g.activeDrops[Ya]||null}function va(o,i,f){var g=o.dropState,x={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(x.activate=new ta(g,f,"dropactivate"),x.activate.target=null,x.activate.dropzone=null),f.type==="dragend"&&(x.deactivate=new ta(g,f,"dropdeactivate"),x.deactivate.target=null,x.deactivate.dropzone=null),g.rejected||(g.cur.element!==g.prev.element&&(g.prev.dropzone&&(x.leave=new ta(g,f,"dragleave"),f.dragLeave=x.leave.target=g.prev.element,f.prevDropzone=x.leave.dropzone=g.prev.dropzone),g.cur.dropzone&&(x.enter=new ta(g,f,"dragenter"),f.dragEnter=g.cur.element,f.dropzone=g.cur.dropzone)),f.type==="dragend"&&g.cur.dropzone&&(x.drop=new ta(g,f,"drop"),f.dropzone=g.cur.dropzone,f.relatedTarget=g.cur.element),f.type==="dragmove"&&g.cur.dropzone&&(x.move=new ta(g,f,"dropmove"),f.dropzone=g.cur.dropzone)),x}function Le(o,i){var f=o.dropState,g=f.activeDrops,x=f.cur,M=f.prev;i.leave&&M.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&&_a(g,i.deactivate),f.prev.dropzone=x.dropzone,f.prev.element=x.element}function Ra(o,i){var f=o.interaction,g=o.iEvent,x=o.event;if(g.type==="dragmove"||g.type==="dragend"){var M=f.dropState;i.dynamicDrop&&(M.activeDrops=ya(i,f.element));var Y=g,Q=Pa(f,Y,x);M.rejected=M.rejected&&!!Q&&Q.dropzone===M.cur.dropzone&&Q.element===M.cur.element,M.cur.dropzone=Q&&Q.dropzone,M.cur.element=Q&&Q.element,M.events=va(f,0,Y)}}var pl={id:"actions/drop",install:function(o){var i=o.actions,f=o.interactStatic,g=o.Interactable,x=o.defaults;o.usePlugin(ie),g.prototype.dropzone=function(M){return function(Y,Q){if(y.object(Q)){if(Y.options.drop.enabled=Q.enabled!==!1,Q.listeners){var be=Fe(Q.listeners),He=Object.keys(be).reduce(function(aa,Da){return aa[/^(enter|leave)/.test(Da)?"drag".concat(Da):/^(activate|deactivate|move)/.test(Da)?"drop".concat(Da):Da]=be[Da],aa},{}),Ne=Y.options.drop.listeners;Ne&&Y.off(Ne),Y.on(He),Y.options.drop.listeners=He}return y.func(Q.ondrop)&&Y.on("drop",Q.ondrop),y.func(Q.ondropactivate)&&Y.on("dropactivate",Q.ondropactivate),y.func(Q.ondropdeactivate)&&Y.on("dropdeactivate",Q.ondropdeactivate),y.func(Q.ondragenter)&&Y.on("dragenter",Q.ondragenter),y.func(Q.ondragleave)&&Y.on("dragleave",Q.ondragleave),y.func(Q.ondropmove)&&Y.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?Y.options.drop.overlap=Q.overlap:y.number(Q.overlap)&&(Y.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(Y.options.drop.accept=Q.accept),"checker"in Q&&(Y.options.drop.checker=Q.checker),Y}return y.bool(Q)?(Y.options.drop.enabled=Q,Y):Y.options.drop}(this,M)},g.prototype.dropCheck=function(M,Y,Q,be,He,Ne){return function(aa,Da,Xa,Ya,el,kl,ml){var dl=!1;if(!(ml=ml||aa.getRect(kl)))return!!aa.options.drop.checker&&aa.options.drop.checker(Da,Xa,dl,aa,kl,Ya,el);var ql=aa.options.drop.overlap;if(ql==="pointer"){var Rl=Be(Ya,el,"drag"),Ml=Qe(Da);Ml.x+=Rl.x,Ml.y+=Rl.y;var Al=Ml.x>ml.left&&Ml.x<ml.right,jr=Ml.y>ml.top&&Ml.y<ml.bottom;dl=Al&&jr}var Sr=Ya.getRect(el);if(Sr&&ql==="center"){var Yr=Sr.left+Sr.width/2,tn=Sr.top+Sr.height/2;dl=Yr>=ml.left&&Yr<=ml.right&&tn>=ml.top&&tn<=ml.bottom}return Sr&&y.number(ql)&&(dl=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)>=ql),aa.options.drop.checker&&(dl=aa.options.drop.checker(Da,Xa,dl,aa,kl,Ya,el)),dl}(this,M,Y,Q,be,He,Ne)},f.dynamicDrop=function(M){return y.bool(M)?(o.dynamicDrop=M,f):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=pl.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 f=o.interaction,g=(o.event,o.iEvent);if(f.prepared.name==="drag"){var x=f.dropState;x.activeDrops=[],x.events={},x.activeDrops=ya(i,f.element),x.events=va(f,0,g),x.events.activate&&(_a(x.activeDrops,x.events.activate),i.fire("actions/drop:start",{interaction:f,dragEvent:g}))}},"interactions:action-move":Ra,"interactions:after-action-move":function(o,i){var f=o.interaction,g=o.iEvent;if(f.prepared.name==="drag"){var x=f.dropState;Le(f,x.events),i.fire("actions/drop:move",{interaction:f,dragEvent:g}),x.events={}}},"interactions:action-end":function(o,i){if(o.interaction.prepared.name==="drag"){var f=o.interaction,g=o.iEvent;Ra(o,i),Le(f,f.dropState.events),i.fire("actions/drop:end",{interaction:f,dragEvent:g})}},"interactions:stop":function(o){var i=o.interaction;if(i.prepared.name==="drag"){var f=i.dropState;f&&(f.activeDrops=null,f.events=null,f.cur.dropzone=null,f.cur.element=null,f.prev.dropzone=null,f.prev.element=null,f.rejected=!1)}}},getActiveDrops:ya,getDrop:Pa,getDropEvents:va,fireDropEvents:Le,filterEventType:function(o){return o.search("drag")===0||o.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},_l=pl;function Xl(o){var i=o.interaction,f=o.iEvent,g=o.phase;if(i.prepared.name==="gesture"){var x=i.pointers.map(function(He){return He.pointer}),M=g==="start",Y=g==="end",Q=i.interactable.options.deltaSource;if(f.touches=[x[0],x[1]],M)f.distance=Ta(x,Q),f.box=Ma(x),f.scale=1,f.ds=0,f.angle=Ze(x,Q),f.da=0,i.gesture.startDistance=f.distance,i.gesture.startAngle=f.angle;else if(Y||i.pointers.length<2){var be=i.prevEvent;f.distance=be.distance,f.box=be.box,f.scale=be.scale,f.ds=0,f.angle=be.angle,f.da=0}else f.distance=Ta(x,Q),f.box=Ma(x),f.scale=f.distance/i.gesture.startDistance,f.angle=Ze(x,Q),f.ds=f.scale-i.gesture.scale,f.da=f.angle-i.gesture.angle;i.gesture.distance=f.distance,i.gesture.angle=f.angle,y.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(i.gesture.scale=f.scale)}}var bl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(o){var i=o.actions,f=o.Interactable,g=o.defaults;f.prototype.gesturable=function(x){return y.object(x)?(this.options.gesture.enabled=x.enabled!==!1,this.setPerAction("gesture",x),this.setOnEvents("gesture",x),this):y.bool(x)?(this.options.gesture.enabled=x,this):this.options.gesture},i.map.gesture=bl,i.methodDict.gesture="gesturable",g.actions.gesture=bl.defaults},listeners:{"interactions:action-start":Xl,"interactions:action-move":Xl,"interactions:action-end":Xl,"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}},Vl=bl;function Ua(o,i,f,g,x,M,Y){if(!i)return!1;if(i===!0){var Q=y.number(M.width)?M.width:M.right-M.left,be=y.number(M.height)?M.height:M.bottom-M.top;if(Y=Math.min(Y,Math.abs((o==="left"||o==="right"?Q:be)/2)),Q<0&&(o==="left"?o="right":o==="right"&&(o="left")),be<0&&(o==="top"?o="bottom":o==="bottom"&&(o="top")),o==="left"){var He=Q>=0?M.left:M.right;return f.x<He+Y}if(o==="top"){var Ne=be>=0?M.top:M.bottom;return f.y<Ne+Y}if(o==="right")return f.x>(Q>=0?M.right:M.left)-Y;if(o==="bottom")return f.y>(be>=0?M.bottom:M.top)-Y}return!!y.element(g)&&(y.element(i)?i===g:le(g,i,x))}function $l(o){var i=o.iEvent,f=o.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var g=i;f.interactable.options.resize.square?(f.resizeAxes==="y"?g.delta.x=g.delta.y:g.delta.y=g.delta.x,g.axes="xy"):(g.axes=f.resizeAxes,f.resizeAxes==="x"?g.delta.y=0:f.resizeAxes==="y"&&(g.delta.x=0))}}var zl,La,al={id:"actions/resize",before:["actions/drag"],install:function(o){var i=o.actions,f=o.browser,g=o.Interactable,x=o.defaults;al.cursors=function(M){return M.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(f),al.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,g.prototype.resizable=function(M){return function(Y,Q,be){return y.object(Q)?(Y.options.resize.enabled=Q.enabled!==!1,Y.setPerAction("resize",Q),Y.setOnEvents("resize",Q),y.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?Y.options.resize.axis=Q.axis:Q.axis===null&&(Y.options.resize.axis=be.defaults.actions.resize.axis),y.bool(Q.preserveAspectRatio)?Y.options.resize.preserveAspectRatio=Q.preserveAspectRatio:y.bool(Q.square)&&(Y.options.resize.square=Q.square),Y):y.bool(Q)?(Y.options.resize.enabled=Q,Y):Y.options.resize}(this,M,o)},i.map.resize=al,i.methodDict.resize="resizable",x.actions.resize=al.defaults},listeners:{"interactions:new":function(o){o.interaction.resizeAxes="xy"},"interactions:action-start":function(o){(function(i){var f=i.iEvent,g=i.interaction;if(g.prepared.name==="resize"&&g.prepared.edges){var x=f,M=g.rect;g._rects={start:ae({},M),corrected:ae({},M),previous:ae({},M),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},x.edges=g.prepared.edges,x.rect=g._rects.corrected,x.deltaRect=g._rects.delta}})(o),$l(o)},"interactions:action-move":function(o){(function(i){var f=i.iEvent,g=i.interaction;if(g.prepared.name==="resize"&&g.prepared.edges){var x=f,M=g.interactable.options.resize.invert,Y=M==="reposition"||M==="negate",Q=g.rect,be=g._rects,He=be.start,Ne=be.corrected,aa=be.delta,Da=be.previous;if(ae(Da,Ne),Y){if(ae(Ne,Q),M==="reposition"){if(Ne.top>Ne.bottom){var Xa=Ne.top;Ne.top=Ne.bottom,Ne.bottom=Xa}if(Ne.left>Ne.right){var Ya=Ne.left;Ne.left=Ne.right,Ne.right=Ya}}}else Ne.top=Math.min(Q.top,He.bottom),Ne.bottom=Math.max(Q.bottom,He.top),Ne.left=Math.min(Q.left,He.right),Ne.right=Math.max(Q.right,He.left);for(var el in Ne.width=Ne.right-Ne.left,Ne.height=Ne.bottom-Ne.top,Ne)aa[el]=Ne[el]-Da[el];x.edges=g.prepared.edges,x.rect=Ne,x.deltaRect=aa}})(o),$l(o)},"interactions:action-end":function(o){var i=o.iEvent,f=o.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var g=i;g.edges=f.prepared.edges,g.rect=f._rects.corrected,g.deltaRect=f._rects.delta}},"auto-start:check":function(o){var i=o.interaction,f=o.interactable,g=o.element,x=o.rect,M=o.buttons;if(x){var Y=ae({},i.coords.cur.page),Q=f.options.resize;if(Q&&Q.enabled&&(!i.pointerIsDown||!/mouse|pointer/.test(i.pointerType)||(M&Q.mouseButtons)!=0)){if(y.object(Q.edges)){var be={left:!1,right:!1,top:!1,bottom:!1};for(var He in be)be[He]=Ua(He,Q.edges[He],Y,i._latestPointer.eventTarget,g,x,Q.margin||al.defaultMargin);be.left=be.left&&!be.right,be.top=be.top&&!be.bottom,(be.left||be.right||be.top||be.bottom)&&(o.action={name:"resize",edges:be})}else{var Ne=Q.axis!=="y"&&Y.x>x.right-al.defaultMargin,aa=Q.axis!=="x"&&Y.y>x.bottom-al.defaultMargin;(Ne||aa)&&(o.action={name:"resize",axes:(Ne?"x":"")+(aa?"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,f=o.axis,g=o.name,x=al.cursors,M=null;if(f)M=x[g+f];else if(i){for(var Y="",Q=0,be=["top","bottom","left","right"];Q<be.length;Q++){var He=be[Q];i[He]&&(Y+=He)}M=x[Y]}return M},filterEventType:function(o){return o.search("resize")===0},defaultMargin:null},nl=al,ia={id:"actions",install:function(o){o.usePlugin(Vl),o.usePlugin(nl),o.usePlugin(ie),o.usePlugin(_l)}},ja=0,Oa={request:function(o){return zl(o)},cancel:function(o){return La(o)},init:function(o){if(zl=o.requestAnimationFrame,La=o.cancelAnimationFrame,!zl)for(var i=["ms","moz","webkit","o"],f=0;f<i.length;f++){var g=i[f];zl=o["".concat(g,"RequestAnimationFrame")],La=o["".concat(g,"CancelAnimationFrame")]||o["".concat(g,"CancelRequestAnimationFrame")]}zl=zl&&zl.bind(o),La=La&&La.bind(o),zl||(zl=function(x){var M=Date.now(),Y=Math.max(0,16-(M-ja)),Q=o.setTimeout(function(){x(M+Y)},Y);return ja=M+Y,Q},La=function(x){return clearTimeout(x)})}},Va={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){Va.isScrolling=!0,Oa.cancel(Va.i),o.autoScroll=Va,Va.interaction=o,Va.prevTime=Va.now(),Va.i=Oa.request(Va.scroll)},stop:function(){Va.isScrolling=!1,Va.interaction&&(Va.interaction.autoScroll=null),Oa.cancel(Va.i)},scroll:function(){var o=Va.interaction,i=o.interactable,f=o.element,g=o.prepared.name,x=i.options[g].autoScroll,M=ye(x.container,i,f),Y=Va.now(),Q=(Y-Va.prevTime)/1e3,be=x.speed*Q;if(be>=1){var He={x:Va.x*be,y:Va.y*be};if(He.x||He.y){var Ne=ma(M);y.window(M)?M.scrollBy(He.x,He.y):M&&(M.scrollLeft+=He.x,M.scrollTop+=He.y);var aa=ma(M),Da={x:aa.x-Ne.x,y:aa.y-Ne.y};(Da.x||Da.y)&&i.fire({type:"autoscroll",target:f,interactable:i,delta:Da,interaction:o,container:M})}Va.prevTime=Y}Va.isScrolling&&(Oa.cancel(Va.i),Va.i=Oa.request(Va.scroll))},check:function(o,i){var f;return(f=o.options[i].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(o){var i=o.interaction,f=o.pointer;if(i.interacting()&&Va.check(i.interactable,i.prepared.name))if(i.simulation)Va.x=Va.y=0;else{var g,x,M,Y,Q=i.interactable,be=i.element,He=i.prepared.name,Ne=Q.options[He].autoScroll,aa=ye(Ne.container,Q,be);if(y.window(aa))Y=f.clientX<Va.margin,g=f.clientY<Va.margin,x=f.clientX>aa.innerWidth-Va.margin,M=f.clientY>aa.innerHeight-Va.margin;else{var Da=Ee(aa);Y=f.clientX<Da.left+Va.margin,g=f.clientY<Da.top+Va.margin,x=f.clientX>Da.right-Va.margin,M=f.clientY>Da.bottom-Va.margin}Va.x=x?1:Y?-1:0,Va.y=M?1:g?-1:0,Va.isScrolling||(Va.margin=Ne.margin,Va.speed=Ne.speed,Va.start(i))}}};function ye(o,i,f){return(y.string(o)?la(o,i,f):o)||S(f)}function ma(o){return y.window(o)&&(o=window.document.body),{x:o.scrollLeft,y:o.scrollTop}}var Oe={id:"auto-scroll",install:function(o){var i=o.defaults,f=o.actions;o.autoScroll=Va,Va.now=function(){return o.now()},f.phaselessTypes.autoscroll=!0,i.perAction.autoScroll=Va.defaults},listeners:{"interactions:new":function(o){o.interaction.autoScroll=null},"interactions:destroy":function(o){o.interaction.autoScroll=null,Va.stop(),Va.interaction&&(Va.interaction=null)},"interactions:stop":Va.stop,"interactions:action-move":function(o){return Va.onInteractionMove(o)}}},ue=Oe;function ka(o,i){var f=!1;return function(){return f||(P.console.warn(i),f=!0),o.apply(this,arguments)}}function ua(o,i){return o.name=i.name,o.axis=i.axis,o.edges=i.edges,o}function ea(o){return y.bool(o)?(this.options.styleCursor=o,this):o===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Je(o){return y.func(o)?(this.options.actionChecker=o,this):o===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Xe={id:"auto-start/interactableMethods",install:function(o){var i=o.Interactable;i.prototype.getAction=function(f,g,x,M){var Y=function(Q,be,He,Ne,aa){var Da=Q.getRect(Ne),Xa=be.buttons||{0:1,1:4,3:8,4:16}[be.button],Ya={action:null,interactable:Q,interaction:He,element:Ne,rect:Da,buttons:Xa};return aa.fire("auto-start:check",Ya),Ya.action}(this,g,x,M,o);return this.options.actionChecker?this.options.actionChecker(f,g,Y,this,M,x):Y},i.prototype.ignoreFrom=ka(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),i.prototype.allowFrom=ka(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),i.prototype.actionChecker=Je,i.prototype.styleCursor=ea}};function cl(o,i,f,g,x){return i.testIgnoreAllow(i.options[o.name],f,g)&&i.options[o.name].enabled&&il(i,f,o,x)?o:null}function Ve(o,i,f,g,x,M,Y){for(var Q=0,be=g.length;Q<be;Q++){var He=g[Q],Ne=x[Q],aa=He.getAction(i,f,o,Ne);if(aa){var Da=cl(aa,He,Ne,M,Y);if(Da)return{action:Da,interactable:He,element:Ne}}}return{action:null,interactable:null,element:null}}function Fa(o,i,f,g,x){var M=[],Y=[],Q=g;function be(Ne){M.push(Ne),Y.push(Q)}for(;y.element(Q);){M=[],Y=[],x.interactables.forEachMatch(Q,be);var He=Ve(o,i,f,M,Y,g,x);if(He.action&&!He.interactable.options[He.action.name].manualStart)return He;Q=Pe(Q)}return{action:null,interactable:null,element:null}}function wa(o,i,f){var g=i.action,x=i.interactable,M=i.element;g=g||{name:null},o.interactable=x,o.element=M,ua(o.prepared,g),o.rect=x&&g.name?x.getRect(M):null,Sl(o,f),f.fire("autoStart:prepared",{interaction:o})}function il(o,i,f,g){var x=o.options,M=x[f.name].max,Y=x[f.name].maxPerElement,Q=g.autoStart.maxInteractions,be=0,He=0,Ne=0;if(!(M&&Y&&Q))return!1;for(var aa=0,Da=g.interactions.list;aa<Da.length;aa++){var Xa=Da[aa],Ya=Xa.prepared.name;if(Xa.interacting()&&(++be>=Q||Xa.interactable===o&&((He+=Ya===f.name?1:0)>=M||Xa.element===i&&(Ne++,Ya===f.name&&Ne>=Y))))return!1}return Q>0}function Aa(o,i){return y.number(o)?(i.autoStart.maxInteractions=o,this):i.autoStart.maxInteractions}function Me(o,i,f){var g=f.autoStart.cursorElement;g&&g!==o&&(g.style.cursor=""),o.ownerDocument.documentElement.style.cursor=i,o.style.cursor=i,f.autoStart.cursorElement=i?o:null}function Sl(o,i){var f=o.interactable,g=o.element,x=o.prepared;if(o.pointerType==="mouse"&&f&&f.options.styleCursor){var M="";if(x.name){var Y=f.options[x.name].cursorChecker;M=y.func(Y)?Y(x,f,g,o._interacting):i.actions.map[x.name].getCursor(x)}Me(o.element,M||"",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,f=o.defaults;o.usePlugin(Xe),f.base.actionChecker=null,f.base.styleCursor=!0,ae(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),i.maxInteractions=function(g){return Aa(g,o)},o.autoStart={maxInteractions:1/0,withinInteractionLimit:il,cursorElement:null}},listeners:{"interactions:down":function(o,i){var f=o.interaction,g=o.pointer,x=o.event,M=o.eventTarget;f.interacting()||wa(f,Fa(f,g,x,M,i),i)},"interactions:move":function(o,i){(function(f,g){var x=f.interaction,M=f.pointer,Y=f.event,Q=f.eventTarget;x.pointerType!=="mouse"||x.pointerIsDown||x.interacting()||wa(x,Fa(x,M,Y,Q,g),g)})(o,i),function(f,g){var x=f.interaction;if(x.pointerIsDown&&!x.interacting()&&x.pointerWasMoved&&x.prepared.name){g.fire("autoStart:before-start",f);var M=x.interactable,Y=x.prepared.name;Y&&M&&(M.options[Y].manualStart||!il(M,x.element,x.prepared,g)?x.stop():(x.start(x.prepared,M,x.element),Sl(x,g)))}}(o,i)},"interactions:stop":function(o,i){var f=o.interaction,g=f.interactable;g&&g.options.styleCursor&&Me(f.element,"",i)}},maxInteractions:Aa,withinInteractionLimit:il,validateAction:cl},Gl=Il,Hl={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(o,i){var f=o.interaction,g=o.eventTarget,x=o.dx,M=o.dy;if(f.prepared.name==="drag"){var Y=Math.abs(x),Q=Math.abs(M),be=f.interactable.options.drag,He=be.startAxis,Ne=Y>Q?"x":Y<Q?"y":"xy";if(f.prepared.axis=be.lockAxis==="start"?Ne[0]:be.lockAxis,Ne!=="xy"&&He!=="xy"&&He!==Ne){f.prepared.name=null;for(var aa=g,Da=function(Ya){if(Ya!==f.interactable){var el=f.interactable.options.drag;if(!el.manualStart&&Ya.testIgnoreAllow(el,aa,g)){var kl=Ya.getAction(f.downPointer,f.downEvent,f,aa);if(kl&&kl.name==="drag"&&function(ml,dl){if(!dl)return!1;var ql=dl.options.drag.startAxis;return ml==="xy"||ql==="xy"||ql===ml}(Ne,Ya)&&Gl.validateAction(kl,Ya,aa,g,i))return Ya}}};y.element(aa);){var Xa=i.interactables.forEachMatch(aa,Da);if(Xa){f.prepared.name="drag",f.interactable=Xa,f.element=aa;break}aa=Pe(aa)}}}}}};function Zl(o){var i=o.prepared&&o.prepared.name;if(!i)return null;var f=o.interactable.options;return f[i].hold||f[i].delay}var _r={id:"auto-start/hold",install:function(o){var i=o.defaults;o.usePlugin(Gl),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,f=Zl(i);f>0&&(i.autoStartHoldTimer=setTimeout(function(){i.start(i.prepared,i.interactable,i.element)},f))},"interactions:move":function(o){var i=o.interaction,f=o.duplicate;i.autoStartHoldTimer&&i.pointerWasMoved&&!f&&(clearTimeout(i.autoStartHoldTimer),i.autoStartHoldTimer=null)},"autoStart:before-start":function(o){var i=o.interaction;Zl(i)>0&&(i.prepared.name=null)}},getHoldDuration:Zl},Fl=_r,pr={id:"auto-start",install:function(o){o.usePlugin(Gl),o.usePlugin(Fl),o.usePlugin(Hl)}},Vr=function(o){return/^(always|never|auto)$/.test(o)?(this.options.preventDefault=o,this):y.bool(o)?(this.options.preventDefault=o?"always":"never",this):this.options.preventDefault};function Ul(o){var i=o.interaction,f=o.event;i.interactable&&i.interactable.checkAndPreventDefault(f)}var lr={id:"core/interactablePreventDefault",install:function(o){var i=o.Interactable;i.prototype.preventDefault=Vr,i.prototype.checkAndPreventDefault=function(f){return function(g,x,M){var Y=g.options.preventDefault;if(Y!=="never")if(Y!=="always"){if(x.events.supportsPassive&&/^touch(start|move)$/.test(M.type)){var Q=S(M.target).document,be=x.getDocOptions(Q);if(!be||!be.events||be.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(M.type)||y.element(M.target)&&ge(M.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||M.preventDefault()}else M.preventDefault()}(this,o,f)},o.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var g=0,x=o.interactions.list;g<x.length;g++){var M=x[g];if(M.element&&(M.element===f.target||te(M.element,f.target)))return void M.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(o,i){return o["interactions:".concat(i)]=Ul,o},{})};function Lr(o,i){if(i.phaselessTypes[o])return!0;for(var f in i.map)if(o.indexOf(f)===0&&o.substr(f.length)in i.phases)return!0;return!1}function Nr(o){var i={};for(var f in o){var g=o[f];y.plainObject(g)?i[f]=Nr(g):y.array(g)?i[f]=ze(g):i[f]=g}return i}var $r=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=Br(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return u(o,[{key:"start",value:function(i,f){var g,x,M=i.phase,Y=this.interaction,Q=function(He){var Ne=He.interactable.options[He.prepared.name],aa=Ne.modifiers;return aa&&aa.length?aa:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Da){var Xa=Ne[Da];return Xa&&Xa.enabled&&{options:Xa,methods:Xa._methods}}).filter(function(Da){return!!Da})}(Y);this.prepareStates(Q),this.startEdges=ae({},Y.edges),this.edges=ae({},this.startEdges),this.startOffset=(g=Y.rect,x=f,g?{left:x.x-g.left,top:x.y-g.top,right:g.right-x.x,bottom:g.bottom-x.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var be=this.fillArg({phase:M,pageCoords:f,preEnd:!1});return this.result=Br(),this.startAll(be),this.result=this.setAll(be)}},{key:"fillArg",value:function(i){var f=this.interaction;return i.interaction=f,i.interactable=f.interactable,i.element=f.element,i.rect||(i.rect=f.rect),i.edges||(i.edges=this.startEdges),i.startOffset=this.startOffset,i}},{key:"startAll",value:function(i){for(var f=0,g=this.states;f<g.length;f++){var x=g[f];x.methods.start&&(i.state=x,x.methods.start(i))}}},{key:"setAll",value:function(i){var f=i.phase,g=i.preEnd,x=i.skipModifiers,M=i.rect,Y=i.edges;i.coords=ae({},i.pageCoords),i.rect=ae({},M),i.edges=ae({},Y);for(var Q=x?this.states.slice(x):this.states,be=Br(i.coords,i.rect),He=0;He<Q.length;He++){var Ne,aa=Q[He],Da=aa.options,Xa=ae({},i.coords),Ya=null;(Ne=aa.methods)!=null&&Ne.set&&this.shouldDo(Da,g,f)&&(i.state=aa,Ya=aa.methods.set(i),se(i.edges,i.rect,{x:i.coords.x-Xa.x,y:i.coords.y-Xa.y})),be.eventProps.push(Ya)}ae(this.edges,i.edges),be.delta.x=i.coords.x-i.pageCoords.x,be.delta.y=i.coords.y-i.pageCoords.y,be.rectDelta.left=i.rect.left-M.left,be.rectDelta.right=i.rect.right-M.right,be.rectDelta.top=i.rect.top-M.top,be.rectDelta.bottom=i.rect.bottom-M.bottom;var el=this.result.coords,kl=this.result.rect;if(el&&kl){var ml=be.rect.left!==kl.left||be.rect.right!==kl.right||be.rect.top!==kl.top||be.rect.bottom!==kl.bottom;be.changed=ml||el.x!==be.coords.x||el.y!==be.coords.y}return be}},{key:"applyToInteraction",value:function(i){var f=this.interaction,g=i.phase,x=f.coords.cur,M=f.coords.start,Y=this.result,Q=this.startDelta,be=Y.delta;g==="start"&&ae(this.startDelta,Y.delta);for(var He=0,Ne=[[M,Q],[x,be]];He<Ne.length;He++){var aa=Ne[He],Da=aa[0],Xa=aa[1];Da.page.x+=Xa.x,Da.page.y+=Xa.y,Da.client.x+=Xa.x,Da.client.y+=Xa.y}var Ya=this.result.rectDelta,el=i.rect||f.rect;el.left+=Ya.left,el.right+=Ya.right,el.top+=Ya.top,el.bottom+=Ya.bottom,el.width=el.right-el.left,el.height=el.bottom-el.top}},{key:"setAndApply",value:function(i){var f=this.interaction,g=i.phase,x=i.preEnd,M=i.skipModifiers,Y=this.setAll(this.fillArg({preEnd:x,phase:g,pageCoords:i.modifiedCoords||f.coords.cur.page}));if(this.result=Y,!Y.changed&&(!M||M<this.states.length)&&f.interacting())return!1;if(i.modifiedCoords){var Q=f.coords.cur.page,be={x:i.modifiedCoords.x-Q.x,y:i.modifiedCoords.y-Q.y};Y.coords.x+=be.x,Y.coords.y+=be.y,Y.delta.x+=be.x,Y.delta.y+=be.y}this.applyToInteraction(i)}},{key:"beforeEnd",value:function(i){var f=i.interaction,g=i.event,x=this.states;if(x&&x.length){for(var M=!1,Y=0;Y<x.length;Y++){var Q=x[Y];i.state=Q;var be=Q.options,He=Q.methods,Ne=He.beforeEnd&&He.beforeEnd(i);if(Ne)return this.endResult=Ne,!1;M=M||!M&&this.shouldDo(be,!0,i.phase,!0)}M&&f.move({event:g,preEnd:!0})}}},{key:"stop",value:function(i){var f=i.interaction;if(this.states&&this.states.length){var g=ae({states:this.states,interactable:f.interactable,element:f.element,rect:null},i);this.fillArg(g);for(var x=0,M=this.states;x<M.length;x++){var Y=M[x];g.state=Y,Y.methods.stop&&Y.methods.stop(g)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(i){this.states=[];for(var f=0;f<i.length;f++){var g=i[f],x=g.options,M=g.methods,Y=g.name;this.states.push({options:x,methods:M,index:f,name:Y})}return this.states}},{key:"restoreInteractionCoords",value:function(i){var f=i.interaction,g=f.coords,x=f.rect,M=f.modification;if(M.result){for(var Y=M.startDelta,Q=M.result,be=Q.delta,He=Q.rectDelta,Ne=0,aa=[[g.start,Y],[g.cur,be]];Ne<aa.length;Ne++){var Da=aa[Ne],Xa=Da[0],Ya=Da[1];Xa.page.x-=Ya.x,Xa.page.y-=Ya.y,Xa.client.x-=Ya.x,Xa.client.y-=Ya.y}x.left-=He.left,x.right-=He.right,x.top-=He.top,x.bottom-=He.bottom}}},{key:"shouldDo",value:function(i,f,g,x){return!(!i||i.enabled===!1||x&&!i.endOnly||i.endOnly&&!f||g==="start"&&!i.setStart)}},{key:"copyFrom",value:function(i){this.startOffset=i.startOffset,this.startDelta=i.startDelta,this.startEdges=i.startEdges,this.edges=i.edges,this.states=i.states.map(function(f){return Nr(f)}),this.result=Br(ae({},i.result.coords),ae({},i.result.rect))}},{key:"destroy",value:function(){for(var i in this)this[i]=null}}]),o}();function Br(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 yr(o,i){var f=o.defaults,g={start:o.start,set:o.set,beforeEnd:o.beforeEnd,stop:o.stop},x=function(M){var Y=M||{};for(var Q in Y.enabled=Y.enabled!==!1,f)Q in Y||(Y[Q]=f[Q]);var be={options:Y,methods:g,name:i,enable:function(){return Y.enabled=!0,be},disable:function(){return Y.enabled=!1,be}};return be};return i&&typeof i=="string"&&(x._defaults=f,x._methods=g),x}function Ar(o){var i=o.iEvent,f=o.interaction.modification.result;f&&(i.modifiers=f.eventProps)}var zr={id:"modifiers/base",before:["actions"],install:function(o){o.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(o){var i=o.interaction;i.modification=new $r(i)},"interactions:before-action-start":function(o){var i=o.interaction,f=o.interaction.modification;f.start(o,i.coords.start.page),i.edges=f.edges,f.applyToInteraction(o)},"interactions:before-action-move":function(o){var i=o.interaction,f=i.modification,g=f.setAndApply(o);return i.edges=f.edges,g},"interactions:before-action-end":function(o){var i=o.interaction,f=i.modification,g=f.beforeEnd(o);return i.edges=f.startEdges,g},"interactions:action-start":Ar,"interactions:action-move":Ar,"interactions:action-end":Ar,"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=zr,kn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Gr=function(o){m(f,o);var i=V(f);function f(g,x,M,Y,Q,be,He){var Ne;s(this,f),(Ne=i.call(this,g)).relatedTarget=null,Ne.screenX=void 0,Ne.screenY=void 0,Ne.button=void 0,Ne.buttons=void 0,Ne.ctrlKey=void 0,Ne.shiftKey=void 0,Ne.altKey=void 0,Ne.metaKey=void 0,Ne.page=void 0,Ne.client=void 0,Ne.delta=void 0,Ne.rect=void 0,Ne.x0=void 0,Ne.y0=void 0,Ne.t0=void 0,Ne.dt=void 0,Ne.duration=void 0,Ne.clientX0=void 0,Ne.clientY0=void 0,Ne.velocity=void 0,Ne.speed=void 0,Ne.swipe=void 0,Ne.axes=void 0,Ne.preEnd=void 0,Q=Q||g.element;var aa=g.interactable,Da=(aa&&aa.options||kn).deltaSource,Xa=Be(aa,Q,M),Ya=Y==="start",el=Y==="end",kl=Ya?C(Ne):g.prevEvent,ml=Ya?g.coords.start:el?{page:kl.page,client:kl.client,timeStamp:g.coords.cur.timeStamp}:g.coords.cur;return Ne.page=ae({},ml.page),Ne.client=ae({},ml.client),Ne.rect=ae({},g.rect),Ne.timeStamp=ml.timeStamp,el||(Ne.page.x-=Xa.x,Ne.page.y-=Xa.y,Ne.client.x-=Xa.x,Ne.client.y-=Xa.y),Ne.ctrlKey=x.ctrlKey,Ne.altKey=x.altKey,Ne.shiftKey=x.shiftKey,Ne.metaKey=x.metaKey,Ne.button=x.button,Ne.buttons=x.buttons,Ne.target=Q,Ne.currentTarget=Q,Ne.preEnd=be,Ne.type=He||M+(Y||""),Ne.interactable=aa,Ne.t0=Ya?g.pointers[g.pointers.length-1].downTime:kl.t0,Ne.x0=g.coords.start.page.x-Xa.x,Ne.y0=g.coords.start.page.y-Xa.y,Ne.clientX0=g.coords.start.client.x-Xa.x,Ne.clientY0=g.coords.start.client.y-Xa.y,Ne.delta=Ya||el?{x:0,y:0}:{x:Ne[Da].x-kl[Da].x,y:Ne[Da].y-kl[Da].y},Ne.dt=g.coords.delta.timeStamp,Ne.duration=Ne.timeStamp-Ne.t0,Ne.velocity=ae({},g.coords.velocity[Da]),Ne.speed=za(Ne.velocity.x,Ne.velocity.y),Ne.swipe=el||Y==="inertiastart"?Ne.getSwipe():null,Ne}return u(f,[{key:"getSwipe",value:function(){var g=this._interaction;if(g.prevEvent.speed<600||this.timeStamp-g.prevEvent.timeStamp>150)return null;var x=180*Math.atan2(g.prevEvent.velocityY,g.prevEvent.velocityX)/Math.PI;x<0&&(x+=360);var M=112.5<=x&&x<247.5,Y=202.5<=x&&x<337.5;return{up:Y,down:!Y&&22.5<=x&&x<157.5,left:M,right:!M&&(292.5<=x||x<67.5),angle:x,speed:g.prevEvent.speed,velocity:{x:g.prevEvent.velocityX,y:g.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),f}(H);Object.defineProperties(Gr.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 rn=u(function o(i,f,g,x,M){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=f,this.event=g,this.downTime=x,this.downTarget=M}),An=function(o){return o.interactable="",o.element="",o.prepared="",o.pointerIsDown="",o.pointerWasMoved="",o._proxy="",o}({}),xn=function(o){return o.start="",o.move="",o.end="",o.stop="",o.interacting="",o}({}),mn=0,nn=function(){function o(i){var f=this,g=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=ka(function(Ne){this.move(Ne)},"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=mn++,this._scopeFire=x,this.pointerType=g;var M=this;this._proxy={};var Y=function(Ne){Object.defineProperty(f._proxy,Ne,{get:function(){return M[Ne]}})};for(var Q in An)Y(Q);var be=function(Ne){Object.defineProperty(f._proxy,Ne,{value:function(){return M[Ne].apply(M,arguments)}})};for(var He in xn)be(He);this._scopeFire("interactions:new",{interaction:this})}return u(o,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(i,f,g){var x=this.updatePointer(i,f,g,!0),M=this.pointers[x];this._scopeFire("interactions:down",{pointer:i,event:f,eventTarget:g,pointerIndex:x,pointerInfo:M,type:"down",interaction:this})}},{key:"start",value:function(i,f,g){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(i.name==="gesture"?2:1)||!f.options[i.name].enabled)&&(ua(this.prepared,i),this.interactable=f,this.element=g,this.rect=f.getRect(g),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,f,g){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(i,f,g,!1);var x,M,Y=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,M=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=za(x,M)>this.pointerMoveTolerance);var Q,be,He,Ne=this.getPointerIndex(i),aa={pointer:i,pointerIndex:Ne,pointerInfo:this.pointers[Ne],event:f,type:"move",eventTarget:g,dx:x,dy:M,duplicate:Y,interaction:this};Y||(Q=this.coords.velocity,be=this.coords.delta,He=Math.max(be.timeStamp/1e3,.001),Q.page.x=be.page.x/He,Q.page.y=be.page.y/He,Q.client.x=be.client.x/He,Q.client.y=be.client.y/He,Q.timeStamp=He),this._scopeFire("interactions:move",aa),Y||this.simulation||(this.interacting()&&(aa.type=null,this.move(aa)),this.pointerWasMoved&&Z(this.coords.prev,this.coords.cur))}},{key:"move",value:function(i){i&&i.event||fe(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,f,g,x){var M=this.getPointerIndex(i);M===-1&&(M=this.updatePointer(i,f,g,!1));var Y=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(Y),{pointer:i,pointerIndex:M,pointerInfo:this.pointers[M],event:f,eventTarget:g,type:Y,curEventTarget:x,interaction:this}),this.simulation||this.end(f),this.removePointer(i,f)}},{key:"documentBlur",value:function(i){this.end(i),this._scopeFire("interactions:blur",{event:i,type:"blur",interaction:this})}},{key:"end",value:function(i){var f;this._ending=!0,i=i||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:i,interaction:this,phase:"end"})),this._ending=!1,f===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(i){var f=de(i);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:we(this.pointers,function(g){return g.id===f})}},{key:"getPointerInfo",value:function(i){return this.pointers[this.getPointerIndex(i)]}},{key:"updatePointer",value:function(i,f,g,x){var M,Y,Q,be=de(i),He=this.getPointerIndex(i),Ne=this.pointers[He];return x=x!==!1&&(x||/(down|start)$/i.test(f.type)),Ne?Ne.pointer=i:(Ne=new rn(be,i,f,null,null),He=this.pointers.length,this.pointers.push(Ne)),Ce(this.coords.cur,this.pointers.map(function(aa){return aa.pointer}),this._now()),M=this.coords.delta,Y=this.coords.prev,Q=this.coords.cur,M.page.x=Q.page.x-Y.page.x,M.page.y=Q.page.y-Y.page.y,M.client.x=Q.client.x-Y.client.x,M.client.y=Q.client.y-Y.client.y,M.timeStamp=Q.timeStamp-Y.timeStamp,x&&(this.pointerIsDown=!0,Ne.downTime=this.coords.cur.timeStamp,Ne.downTarget=g,j(this.downPointer,i),this.interacting()||(Z(this.coords.start,this.coords.cur),Z(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(i,f,g),this._scopeFire("interactions:update-pointer",{pointer:i,event:f,eventTarget:g,down:x,pointerInfo:Ne,pointerIndex:He,interaction:this}),He}},{key:"removePointer",value:function(i,f){var g=this.getPointerIndex(i);if(g!==-1){var x=this.pointers[g];this._scopeFire("interactions:remove-pointer",{pointer:i,event:f,eventTarget:null,pointerIndex:g,pointerInfo:x,interaction:this}),this.pointers.splice(g,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(i,f,g){this._latestPointer.pointer=i,this._latestPointer.event=f,this._latestPointer.eventTarget=g}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(i,f,g,x){return new Gr(this,i,this.prepared.name,f,this.element,g,x)}},{key:"_fireEvent",value:function(i){var f;(f=this.interactable)==null||f.fire(i),(!this.prevEvent||i.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=i)}},{key:"_doPhase",value:function(i){var f=i.event,g=i.phase,x=i.preEnd,M=i.type,Y=this.rect;if(Y&&g==="move"&&(se(this.edges,Y,this.coords.delta[this.interactable.options.deltaSource]),Y.width=Y.right-Y.left,Y.height=Y.bottom-Y.top),this._scopeFire("interactions:before-action-".concat(g),i)===!1)return!1;var Q=i.iEvent=this._createPreparedEvent(f,g,x,M);return this._scopeFire("interactions:action-".concat(g),i),g==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(g),i),!0}},{key:"_now",value:function(){return Date.now()}}]),o}();function ar(o){Wl(o.interaction)}function Wl(o){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(o))return!1;var i=o.offset.pending;return Ol(o.coords.cur,i),Ol(o.coords.delta,i),se(o.edges,o.rect,i),i.x=0,i.y=0,!0}function Tl(o){var i=o.x,f=o.y;this.offset.pending.x+=i,this.offset.pending.y+=f,this.offset.total.x+=i,this.offset.total.y+=f}function Ol(o,i){var f=o.page,g=o.client,x=i.x,M=i.y;f.x+=x,f.y+=M,g.x+=x,g.y+=M}xn.offsetBy="";var Bl={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(o){o.Interaction.prototype.offsetBy=Tl},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&&(Ol(i.coords.cur,i.offset.total),i.offset.pending.x=0,i.offset.pending.y=0)}(o.interaction)},"interactions:before-action-start":ar,"interactions:before-action-move":ar,"interactions:before-action-end":function(o){var i=o.interaction;if(Wl(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}}},gr=Bl,cr=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 u(o,[{key:"start",value:function(i){var f=this.interaction,g=jl(f);if(!g||!g.enabled)return!1;var x=f.coords.velocity.client,M=za(x.x,x.y),Y=this.modification||(this.modification=new $r(f));if(Y.copyFrom(f.modification),this.t0=f._now(),this.allowResume=g.allowResume,this.v0=M,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=Y.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&M>g.minSpeed&&M>g.endSpeed)this.startInertia();else{if(Y.result=Y.setAll(this.modifierArg),!Y.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:i,phase:"inertiastart"}),f.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),f.modification.result.rect=null,this.active=!0,f.simulation=this,!0}},{key:"startInertia",value:function(){var i=this,f=this.interaction.coords.velocity.client,g=jl(this.interaction),x=g.resistance,M=-Math.log(g.endSpeed/this.v0)/x;this.targetOffset={x:(f.x-M)/x,y:(f.y-M)/x},this.te=M,this.lambda_v0=x/this.v0,this.one_ve_v0=1-g.endSpeed/this.v0;var Y=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},Y.result=Y.setAll(Q),Y.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+Y.result.delta.x,y:this.targetOffset.y+Y.result.delta.y}),this.onNextFrame(function(){return i.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var i=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return i.smoothEndTick()})}},{key:"onNextFrame",value:function(i){var f=this;this.timeout=Oa.request(function(){f.active&&i()})}},{key:"inertiaTick",value:function(){var i,f,g,x,M,Y,Q,be=this,He=this.interaction,Ne=jl(He).resistance,aa=(He._now()-this.t0)/1e3;if(aa<this.te){var Da,Xa=1-(Math.exp(-Ne*aa)-this.lambda_v0)/this.one_ve_v0;this.isModified?(i=0,f=0,g=this.targetOffset.x,x=this.targetOffset.y,M=this.modifiedOffset.x,Y=this.modifiedOffset.y,Da={x:Fr(Q=Xa,i,g,M),y:Fr(Q,f,x,Y)}):Da={x:this.targetOffset.x*Xa,y:this.targetOffset.y*Xa};var Ya={x:Da.x-this.currentOffset.x,y:Da.y-this.currentOffset.y};this.currentOffset.x+=Ya.x,this.currentOffset.y+=Ya.y,He.offsetBy(Ya),He.move(),this.onNextFrame(function(){return be.inertiaTick()})}else He.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var i=this,f=this.interaction,g=f._now()-this.t0,x=jl(f).smoothEndDuration;if(g<x){var M={x:wn(g,0,this.targetOffset.x,x),y:wn(g,0,this.targetOffset.y,x)},Y={x:M.x-this.currentOffset.x,y:M.y-this.currentOffset.y};this.currentOffset.x+=Y.x,this.currentOffset.y+=Y.y,f.offsetBy(Y),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return i.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(i){var f=i.pointer,g=i.event,x=i.eventTarget,M=this.interaction;M.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),M.updatePointer(f,g,x,!0),M._doPhase({interaction:M,event:g,phase:"resume"}),Z(M.coords.prev,M.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,Oa.cancel(this.timeout)}}]),o}();function jl(o){var i=o.interactable,f=o.prepared;return i&&i.options&&f.name&&i.options[f.name].inertia}var Rr={id:"inertia",before:["modifiers","actions"],install:function(o){var i=o.defaults;o.usePlugin(gr),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 cr(i)},"interactions:before-action-end":function(o){var i=o.interaction,f=o.event;return(!i._interacting||i.simulation||!i.inertia.start(f))&&null},"interactions:down":function(o){var i=o.interaction,f=o.eventTarget,g=i.inertia;if(g.active)for(var x=f;y.element(x);){if(x===i.element){g.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":Ar,"interactions:action-inertiastart":Ar,"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 Fr(o,i,f,g){var x=1-o;return x*x*i+2*x*o*f+o*o*g}function wn(o,i,f,g){return-f*(o/=g)*(o-2)+i}var on=Rr;function Zn(o,i){for(var f=0;f<i.length;f++){var g=i[f];if(o.immediatePropagationStopped)break;g(o)}}var zn=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 u(o,[{key:"fire",value:function(i){var f,g=this.global;(f=this.types[i.type])&&Zn(i,f),!i.propagationStopped&&g&&(f=g[i.type])&&Zn(i,f)}},{key:"on",value:function(i,f){var g=Fe(i,f);for(i in g)this.types[i]=q(this.types[i]||[],g[i])}},{key:"off",value:function(i,f){var g=Fe(i,f);for(i in g){var x=this.types[i];if(x&&x.length)for(var M=0,Y=g[i];M<Y.length;M++){var Q=Y[M],be=x.indexOf(Q);be!==-1&&x.splice(be,1)}}}},{key:"getRect",value:function(i){return null}}]),o}(),Qn=function(){function o(i){s(this,o),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=i,j(this,i)}return u(o,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),o}();function _n(o){return y.object(o)?{capture:!!o.capture,passive:!!o.passive}:{capture:!!o,passive:!1}}function Mn(o,i){return o===i||(typeof o=="boolean"?!!i.capture===o&&!i.passive:!!o.capture==!!i.capture&&!!o.passive==!!i.passive)}var Pn={id:"events",install:function(o){var i,f=[],g={},x=[],M={add:Y,remove:Q,addDelegate:function(Ne,aa,Da,Xa,Ya){var el=_n(Ya);if(!g[Da]){g[Da]=[];for(var kl=0;kl<x.length;kl++){var ml=x[kl];Y(ml,Da,be),Y(ml,Da,He,!0)}}var dl=g[Da],ql=na(dl,function(Rl){return Rl.selector===Ne&&Rl.context===aa});ql||(ql={selector:Ne,context:aa,listeners:[]},dl.push(ql)),ql.listeners.push({func:Xa,options:el})},removeDelegate:function(Ne,aa,Da,Xa,Ya){var el,kl=_n(Ya),ml=g[Da],dl=!1;if(ml)for(el=ml.length-1;el>=0;el--){var ql=ml[el];if(ql.selector===Ne&&ql.context===aa){for(var Rl=ql.listeners,Ml=Rl.length-1;Ml>=0;Ml--){var Al=Rl[Ml];if(Al.func===Xa&&Mn(Al.options,kl)){Rl.splice(Ml,1),Rl.length||(ml.splice(el,1),Q(aa,Da,be),Q(aa,Da,He,!0)),dl=!0;break}}if(dl)break}}},delegateListener:be,delegateUseCapture:He,delegatedEvents:g,documents:x,targets:f,supportsOptions:!1,supportsPassive:!1};function Y(Ne,aa,Da,Xa){if(Ne.addEventListener){var Ya=_n(Xa),el=na(f,function(kl){return kl.eventTarget===Ne});el||(el={eventTarget:Ne,events:{}},f.push(el)),el.events[aa]||(el.events[aa]=[]),na(el.events[aa],function(kl){return kl.func===Da&&Mn(kl.options,Ya)})||(Ne.addEventListener(aa,Da,M.supportsOptions?Ya:Ya.capture),el.events[aa].push({func:Da,options:Ya}))}}function Q(Ne,aa,Da,Xa){if(Ne.addEventListener&&Ne.removeEventListener){var Ya=we(f,function(jr){return jr.eventTarget===Ne}),el=f[Ya];if(el&&el.events)if(aa!=="all"){var kl=!1,ml=el.events[aa];if(ml){if(Da==="all"){for(var dl=ml.length-1;dl>=0;dl--){var ql=ml[dl];Q(Ne,aa,ql.func,ql.options)}return}for(var Rl=_n(Xa),Ml=0;Ml<ml.length;Ml++){var Al=ml[Ml];if(Al.func===Da&&Mn(Al.options,Rl)){Ne.removeEventListener(aa,Da,M.supportsOptions?Rl:Rl.capture),ml.splice(Ml,1),ml.length===0&&(delete el.events[aa],kl=!0);break}}}kl&&!Object.keys(el.events).length&&f.splice(Ya,1)}else for(aa in el.events)el.events.hasOwnProperty(aa)&&Q(Ne,aa,"all")}}function be(Ne,aa){for(var Da=_n(aa),Xa=new Qn(Ne),Ya=g[Ne.type],el=ce(Ne)[0],kl=el;y.element(kl);){for(var ml=0;ml<Ya.length;ml++){var dl=Ya[ml],ql=dl.selector,Rl=dl.context;if(ge(kl,ql)&&te(Rl,el)&&te(Rl,kl)){var Ml=dl.listeners;Xa.currentTarget=kl;for(var Al=0;Al<Ml.length;Al++){var jr=Ml[Al];Mn(jr.options,Da)&&jr.func(Xa)}}}kl=Pe(kl)}}function He(Ne){return be(Ne,!0)}return(i=o.document)==null||i.createElement("div").addEventListener("test",null,{get capture(){return M.supportsOptions=!0},get passive(){return M.supportsPassive=!0}}),o.events=M,M}},en={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(o){for(var i=0,f=en.methodOrder;i<f.length;i++){var g=f[i],x=en[g](o);if(x)return x}return null},simulationResume:function(o){var i=o.pointerType,f=o.eventType,g=o.eventTarget,x=o.scope;if(!/down|start/i.test(f))return null;for(var M=0,Y=x.interactions.list;M<Y.length;M++){var Q=Y[M],be=g;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===i)for(;be;){if(be===Q.element)return Q;be=Pe(be)}}return null},mouseOrPen:function(o){var i,f=o.pointerId,g=o.pointerType,x=o.eventType,M=o.scope;if(g!=="mouse"&&g!=="pen")return null;for(var Y=0,Q=M.interactions.list;Y<Q.length;Y++){var be=Q[Y];if(be.pointerType===g){if(be.simulation&&!In(be,f))continue;if(be.interacting())return be;i||(i=be)}}if(i)return i;for(var He=0,Ne=M.interactions.list;He<Ne.length;He++){var aa=Ne[He];if(!(aa.pointerType!==g||/down/i.test(x)&&aa.simulation))return aa}return null},hasPointer:function(o){for(var i=o.pointerId,f=0,g=o.scope.interactions.list;f<g.length;f++){var x=g[f];if(In(x,i))return x}return null},idle:function(o){for(var i=o.pointerType,f=0,g=o.scope.interactions.list;f<g.length;f++){var x=g[f];if(x.pointers.length===1){var M=x.interactable;if(M&&(!M.options.gesture||!M.options.gesture.enabled))continue}else if(x.pointers.length>=2)continue;if(!x.interacting()&&i===x.pointerType)return x}return null}};function In(o,i){return o.pointers.some(function(f){return f.id===i})}var Sn=en,Wr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function jn(o,i){return function(f){var g=i.interactions.list,x=oa(f),M=ce(f),Y=M[0],Q=M[1],be=[];if(/^touch/.test(f.type)){i.prevTouchTime=i.now();for(var He=0,Ne=f.changedTouches;He<Ne.length;He++){var aa=Ne[He],Da={pointer:aa,pointerId:de(aa),pointerType:x,eventType:f.type,eventTarget:Y,curEventTarget:Q,scope:i},Xa=yn(Da);be.push([Da.pointer,Da.eventTarget,Da.curEventTarget,Xa])}}else{var Ya=!1;if(!ee.supportsPointerEvent&&/mouse/.test(f.type)){for(var el=0;el<g.length&&!Ya;el++)Ya=g[el].pointerType!=="mouse"&&g[el].pointerIsDown;Ya=Ya||i.now()-i.prevTouchTime<500||f.timeStamp===0}if(!Ya){var kl={pointer:f,pointerId:de(f),pointerType:x,eventType:f.type,curEventTarget:Q,eventTarget:Y,scope:i},ml=yn(kl);be.push([kl.pointer,kl.eventTarget,kl.curEventTarget,ml])}}for(var dl=0;dl<be.length;dl++){var ql=be[dl],Rl=ql[0],Ml=ql[1],Al=ql[2];ql[3][o](Rl,f,Ml,Al)}}}function yn(o){var i=o.pointerType,f=o.scope,g={interaction:Sn.search(o),searchDetails:o};return f.fire("interactions:find",g),g.interaction||f.interactions.new({pointerType:i})}function Bi(o,i){var f=o.doc,g=o.scope,x=o.options,M=g.interactions.docEvents,Y=g.events,Q=Y[i];for(var be in g.browser.isIOS&&!x.events&&(x.events={passive:!1}),Y.delegatedEvents)Q(f,be,Y.delegateListener),Q(f,be,Y.delegateUseCapture,!0);for(var He=x&&x.events,Ne=0;Ne<M.length;Ne++){var aa=M[Ne];Q(f,aa.type,aa.listener,He)}}var Ro={id:"core/interactions",install:function(o){for(var i={},f=0;f<Wr.length;f++){var g=Wr[f];i[g]=jn(g,o)}var x,M=ee.pEventTypes;function Y(){for(var Q=0,be=o.interactions.list;Q<be.length;Q++){var He=be[Q];if(He.pointerIsDown&&He.pointerType==="touch"&&!He._interacting)for(var Ne=function(){var Xa=Da[aa];o.documents.some(function(Ya){return te(Ya.doc,Xa.downTarget)})||He.removePointer(Xa.pointer,Xa.event)},aa=0,Da=He.pointers;aa<Da.length;aa++)Ne()}}(x=X.PointerEvent?[{type:M.down,listener:Y},{type:M.down,listener:i.pointerDown},{type:M.move,listener:i.pointerMove},{type:M.up,listener:i.pointerUp},{type:M.cancel,listener:i.pointerUp}]:[{type:"mousedown",listener:i.pointerDown},{type:"mousemove",listener:i.pointerMove},{type:"mouseup",listener:i.pointerUp},{type:"touchstart",listener:Y},{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 be=0,He=o.interactions.list;be<He.length;be++)He[be].documentBlur(Q)}}),o.prevTouchTime=0,o.Interaction=function(Q){m(He,Q);var be=V(He);function He(){return s(this,He),be.apply(this,arguments)}return u(He,[{key:"pointerMoveTolerance",get:function(){return o.interactions.pointerMoveTolerance},set:function(Ne){o.interactions.pointerMoveTolerance=Ne}},{key:"_now",value:function(){return o.now()}}]),He}(nn),o.interactions={list:[],new:function(Q){Q.scopeFire=function(He,Ne){return o.fire(He,Ne)};var be=new o.Interaction(Q);return o.interactions.list.push(be),be},listeners:i,docEvents:x,pointerMoveTolerance:1},o.usePlugin(lr)},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 f=o.interactable,g=i.interactions.list.length-1;g>=0;g--){var x=i.interactions.list[g];x.interactable===f&&(x.stop(),i.fire("interactions:destroy",{interaction:x}),x.destroy(),i.interactions.list.length>2&&i.interactions.list.splice(g,1))}}},onDocSignal:Bi,doOnInteractions:jn,methodNames:Wr},Vo=Ro,En=function(o){return o[o.On=0]="On",o[o.Off=1]="Off",o}(En||{}),Fo=function(){function o(i,f,g,x){s(this,o),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new zn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=i,this._context=f.context||g,this._win=S(Na(i)?this._context:i),this._doc=this._win.document,this._scopeEvents=x,this.set(f)}return u(o,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(i,f){return y.func(f.onstart)&&this.on("".concat(i,"start"),f.onstart),y.func(f.onmove)&&this.on("".concat(i,"move"),f.onmove),y.func(f.onend)&&this.on("".concat(i,"end"),f.onend),y.func(f.oninertiastart)&&this.on("".concat(i,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(i,f,g){var x,M=this,Y=(x=this._actions.map[i])==null?void 0:x.filterEventType,Q=function(be){return(Y==null||Y(be))&&Lr(be,M._actions)};(y.array(f)||y.object(f))&&this._onOff(En.Off,i,f,void 0,Q),(y.array(g)||y.object(g))&&this._onOff(En.On,i,g,void 0,Q)}},{key:"setPerAction",value:function(i,f){var g=this._defaults;for(var x in f){var M=x,Y=this.options[i],Q=f[M];M==="listeners"&&this.updatePerActionListeners(i,Y.listeners,Q),y.array(Q)?Y[M]=ze(Q):y.plainObject(Q)?(Y[M]=ae(Y[M]||{},Nr(Q)),y.object(g.perAction[M])&&"enabled"in g.perAction[M]&&(Y[M].enabled=Q.enabled!==!1)):y.bool(Q)&&y.object(g.perAction[M])?Y[M].enabled=Q:Y[M]=Q}}},{key:"getRect",value:function(i){return i=i||(y.element(this.target)?this.target:null),y.string(this.target)&&(i=i||this._context.querySelector(this.target)),qe(i)}},{key:"rectChecker",value:function(i){var f=this;return y.func(i)?(this.getRect=function(g){var x=ae({},i.apply(f,g));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,f){if(Na(f)||y.object(f)){for(var g in this.options[i]=f,this._actions.map)this.options[g][i]=f;return this}return this.options[i]}},{key:"origin",value:function(i){return this._backCompatOption("origin",i)}},{key:"deltaSource",value:function(i){return i==="page"||i==="client"?(this.options.deltaSource=i,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var i=this.target;return y.string(i)?Array.from(this._context.querySelectorAll(i)):y.func(i)&&i.getAllElements?i.getAllElements():y.element(i)?[i]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(i){return this._context===i.ownerDocument||te(this._context,i)}},{key:"testIgnoreAllow",value:function(i,f,g){return!this.testIgnore(i.ignoreFrom,f,g)&&this.testAllow(i.allowFrom,f,g)}},{key:"testAllow",value:function(i,f,g){return!i||!!y.element(g)&&(y.string(i)?le(g,i,f):!!y.element(i)&&te(i,g))}},{key:"testIgnore",value:function(i,f,g){return!(!i||!y.element(g))&&(y.string(i)?le(g,i,f):!!y.element(i)&&te(i,g))}},{key:"fire",value:function(i){return this.events.fire(i),this}},{key:"_onOff",value:function(i,f,g,x,M){y.object(f)&&!y.array(f)&&(x=g,g=null);var Y=Fe(f,g,M);for(var Q in Y){Q==="wheel"&&(Q=ee.wheelEvent);for(var be=0,He=Y[Q];be<He.length;be++){var Ne=He[be];Lr(Q,this._actions)?this.events[i===En.On?"on":"off"](Q,Ne):y.string(this.target)?this._scopeEvents[i===En.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Ne,x):this._scopeEvents[i===En.On?"add":"remove"](this.target,Q,Ne,x)}}return this}},{key:"on",value:function(i,f,g){return this._onOff(En.On,i,f,g)}},{key:"off",value:function(i,f,g){return this._onOff(En.Off,i,f,g)}},{key:"set",value:function(i){var f=this._defaults;for(var g in y.object(i)||(i={}),this.options=Nr(f.base),this._actions.methodDict){var x=g,M=this._actions.methodDict[x];this.options[x]={},this.setPerAction(x,ae(ae({},f.perAction),f.actions[x])),this[M](i[x])}for(var Y in i)Y!=="getRect"?y.func(this[Y])&&this[Y](i[Y]):this.rectChecker(i.getRect);return this}},{key:"unset",value:function(){if(y.string(this.target))for(var i in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[i],g=f.length-1;g>=0;g--){var x=f[g],M=x.selector,Y=x.context,Q=x.listeners;M===this.target&&Y===this._context&&f.splice(g,1);for(var be=Q.length-1;be>=0;be--)this._scopeEvents.removeDelegate(this.target,this._context,i,Q[be][0],Q[be][1])}else this._scopeEvents.remove(this.target,"all")}}]),o}(),Po=function(){function o(i){var f=this;s(this,o),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=i,i.addListeners({"interactable:unset":function(g){var x=g.interactable,M=x.target,Y=y.string(M)?f.selectorMap[M]:M[f.scope.id],Q=we(Y,function(be){return be===x});Y.splice(Q,1)}})}return u(o,[{key:"new",value:function(i,f){f=ae(f||{},{actions:this.scope.actions});var g=new this.scope.Interactable(i,f,this.scope.document,this.scope.events);return this.scope.addDocument(g._doc),this.list.push(g),y.string(i)?(this.selectorMap[i]||(this.selectorMap[i]=[]),this.selectorMap[i].push(g)):(g.target[this.scope.id]||Object.defineProperty(i,this.scope.id,{value:[],configurable:!0}),i[this.scope.id].push(g)),this.scope.fire("interactable:new",{target:i,options:f,interactable:g,win:this.scope._win}),g}},{key:"getExisting",value:function(i,f){var g=f&&f.context||this.scope.document,x=y.string(i),M=x?this.selectorMap[i]:i[this.scope.id];if(M)return na(M,function(Y){return Y._context===g&&(x||Y.inContext(i))})}},{key:"forEachMatch",value:function(i,f){for(var g=0,x=this.list;g<x.length;g++){var M=x[g],Y=void 0;if((y.string(M.target)?y.element(i)&&ge(i,M.target):i===M.target)&&M.inContext(i)&&(Y=f(M)),Y!==void 0)return Y}}}]),o}(),Gi=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=Nr(kn),this.Eventable=zn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(g){var x=function M(Y,Q){var be=g.interactables.getExisting(Y,Q);return be||((be=g.interactables.new(Y,Q)).events.global=M.globalEvents),be};return x.getPointerAverage=Ue,x.getTouchBBox=Ma,x.getTouchDistance=Ta,x.getTouchAngle=Ze,x.getElementRect=qe,x.getElementClientRect=Ee,x.matchesSelector=ge,x.closest=De,x.globalEvents={},x.version="1.10.27",x.scope=g,x.use=function(M,Y){return this.scope.usePlugin(M,Y),this},x.isSet=function(M,Y){return!!this.scope.interactables.get(M,Y&&Y.context)},x.on=ka(function(M,Y,Q){if(y.string(M)&&M.search(" ")!==-1&&(M=M.trim().split(/ +/)),y.array(M)){for(var be=0,He=M;be<He.length;be++){var Ne=He[be];this.on(Ne,Y,Q)}return this}if(y.object(M)){for(var aa in M)this.on(aa,M[aa],Y);return this}return Lr(M,this.scope.actions)?this.globalEvents[M]?this.globalEvents[M].push(Y):this.globalEvents[M]=[Y]:this.scope.events.add(this.scope.document,M,Y,{options:Q}),this},"The interact.on() method is being deprecated"),x.off=ka(function(M,Y,Q){if(y.string(M)&&M.search(" ")!==-1&&(M=M.trim().split(/ +/)),y.array(M)){for(var be=0,He=M;be<He.length;be++){var Ne=He[be];this.off(Ne,Y,Q)}return this}if(y.object(M)){for(var aa in M)this.off(aa,M[aa],Y);return this}var Da;return Lr(M,this.scope.actions)?M in this.globalEvents&&(Da=this.globalEvents[M].indexOf(Y))!==-1&&this.globalEvents[M].splice(Da,1):this.scope.events.remove(this.scope.document,M,Y,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 M=0,Y=this.scope.interactions.list;M<Y.length;M++)Y[M].stop();return this},x.pointerMoveTolerance=function(M){return y.number(M)?(this.scope.interactions.pointerMoveTolerance=M,this):this.scope.interactions.pointerMoveTolerance},x.addDocument=function(M,Y){this.scope.addDocument(M,Y)},x.removeDocument=function(M){this.scope.removeDocument(M)},x}(this),this.InteractEvent=Gr,this.Interactable=void 0,this.interactables=new Po(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(g){return i.removeDocument(g.target)};var f=this;this.Interactable=function(g){m(M,g);var x=V(M);function M(){return s(this,M),x.apply(this,arguments)}return u(M,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(Y){return _(c(M.prototype),"set",this).call(this,Y),f.fire("interactable:set",{options:Y,interactable:this}),this}},{key:"unset",value:function(){_(c(M.prototype),"unset",this).call(this);var Y=f.interactables.list.indexOf(this);Y<0||(f.interactables.list.splice(Y,1),f.fire("interactable:unset",{interactable:this}))}}]),M}(Fo)}return u(o,[{key:"addListeners",value:function(i,f){this.listenerMaps.push({id:f,map:i})}},{key:"fire",value:function(i,f){for(var g=0,x=this.listenerMaps;g<x.length;g++){var M=x[g].map[i];if(M&&M(f,this,i)===!1)return!1}}},{key:"init",value:function(i){return this.isInitialized?this:function(f,g){return f.isInitialized=!0,y.window(g)&&E(g),X.init(g),ee.init(g),Oa.init(g),f.window=g,f.document=g.document,f.usePlugin(Vo),f.usePlugin(Pn),f}(this,i)}},{key:"pluginIsInstalled",value:function(i){var f=i.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(i)!==-1}},{key:"usePlugin",value:function(i,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(i))return this;if(i.id&&(this._plugins.map[i.id]=i),this._plugins.list.push(i),i.install&&i.install(this,f),i.listeners&&i.before){for(var g=0,x=this.listenerMaps.length,M=i.before.reduce(function(Q,be){return Q[be]=!0,Q[Yi(be)]=!0,Q},{});g<x;g++){var Y=this.listenerMaps[g].id;if(Y&&(M[Y]||M[Yi(Y)]))break}this.listenerMaps.splice(g,0,{id:i.id,map:i.listeners})}else i.listeners&&this.listenerMaps.push({id:i.id,map:i.listeners});return this}},{key:"addDocument",value:function(i,f){if(this.getDocIndex(i)!==-1)return!1;var g=S(i);f=f?ae({},f):{},this.documents.push({doc:i,options:f}),this.events.documents.push(i),i!==this.document&&this.events.add(g,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:i,window:g,scope:this,options:f})}},{key:"removeDocument",value:function(i){var f=this.getDocIndex(i),g=S(i),x=this.documents[f].options;this.events.remove(g,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:i,window:g,scope:this,options:x})}},{key:"getDocIndex",value:function(i){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===i)return f;return-1}},{key:"getDocOptions",value:function(i){var f=this.getDocIndex(i);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),o}();function Yi(o){return o&&o.replace(/\/.*$/,"")}var Ji=new Gi,Pr=Ji.interactStatic,jo=typeof globalThis<"u"?globalThis:window;Ji.init(jo);var Ai=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(o){var i=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(g){var x=g[0],M=g[1];return x in o||M in o}),f=function(g,x){for(var M=o.range,Y=o.limits,Q=Y===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:Y,be=o.offset,He=be===void 0?{x:0,y:0}:be,Ne={range:M,grid:o,x:null,y:null},aa=0;aa<i.length;aa++){var Da=i[aa],Xa=Da[0],Ya=Da[1],el=Math.round((g-He.x)/o[Xa]),kl=Math.round((x-He.y)/o[Ya]);Ne[Xa]=Math.max(Q.left,Math.min(Q.right,el*o[Xa]+He.x)),Ne[Ya]=Math.max(Q.top,Math.min(Q.bottom,kl*o[Ya]+He.y))}return Ne};return f.grid=o,f.coordFields=i,f}}),Ho={id:"snappers",install:function(o){var i=o.interactStatic;i.snappers=ae(i.snappers||{},Ai),i.createSnapGrid=i.snappers.grid}},zi=Ho,Xi={start:function(o){var i=o.state,f=o.rect,g=o.edges,x=o.pageCoords,M=i.options,Y=M.ratio,Q=M.enabled,be=i.options,He=be.equalDelta,Ne=be.modifiers;Y==="preserve"&&(Y=f.width/f.height),i.startCoords=ae({},x),i.startRect=ae({},f),i.ratio=Y,i.equalDelta=He;var aa=i.linkedEdges={top:g.top||g.left&&!g.bottom,left:g.left||g.top&&!g.right,bottom:g.bottom||g.right&&!g.top,right:g.right||g.bottom&&!g.left};if(i.xIsPrimaryAxis=!(!g.left&&!g.right),i.equalDelta){var Da=(aa.left?1:-1)*(aa.top?1:-1);i.edgeSign={x:Da,y:Da}}else i.edgeSign={x:aa.left?-1:1,y:aa.top?-1:1};if(Q!==!1&&ae(g,aa),Ne!=null&&Ne.length){var Xa=new $r(o.interaction);Xa.copyFrom(o.interaction.modification),Xa.prepareStates(Ne),i.subModification=Xa,Xa.startAll(n({},o))}},set:function(o){var i=o.state,f=o.rect,g=o.coords,x=i.linkedEdges,M=ae({},g),Y=i.equalDelta?Zi:Uo;if(ae(o.edges,x),Y(i,i.xIsPrimaryAxis,g,f),!i.subModification)return null;var Q=ae({},f);se(x,Q,{x:g.x-M.x,y:g.y-M.y});var be=i.subModification.setAll(n(n({},o),{},{rect:Q,edges:x,pageCoords:g,prevCoords:g,prevRect:Q})),He=be.delta;return be.changed&&(Y(i,Math.abs(He.x)>Math.abs(He.y),be.coords,be.rect),ae(g,be.coords)),be.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Zi(o,i,f){var g=o.startCoords,x=o.edgeSign;i?f.y=g.y+(f.x-g.x)*x.y:f.x=g.x+(f.y-g.y)*x.x}function Uo(o,i,f,g){var x=o.startRect,M=o.startCoords,Y=o.ratio,Q=o.edgeSign;if(i){var be=g.width/Y;f.y=M.y+(be-x.height)*Q.y}else{var He=g.height*Y;f.x=M.x+(He-x.width)*Q.x}}var qo=yr(Xi,"aspectRatio"),Qi=function(){};Qi._defaults={};var Cn=Qi;function Dn(o,i,f){return y.func(o)?he(o,i.interactable,i.element,[f.x,f.y,i]):he(o,i.interactable,i.element)}var Hn={start:function(o){var i=o.rect,f=o.startOffset,g=o.state,x=o.interaction,M=o.pageCoords,Y=g.options,Q=Y.elementRect,be=ae({left:0,top:0,right:0,bottom:0},Y.offset||{});if(i&&Q){var He=Dn(Y.restriction,x,M);if(He){var Ne=He.right-He.left-i.width,aa=He.bottom-He.top-i.height;Ne<0&&(be.left+=Ne,be.right+=Ne),aa<0&&(be.top+=aa,be.bottom+=aa)}be.left+=f.left-i.width*Q.left,be.top+=f.top-i.height*Q.top,be.right+=f.right-i.width*(1-Q.right),be.bottom+=f.bottom-i.height*(1-Q.bottom)}g.offset=be},set:function(o){var i=o.coords,f=o.interaction,g=o.state,x=g.options,M=g.offset,Y=Dn(x.restriction,f,i);if(Y){var Q=function(be){return!be||"left"in be&&"top"in be||((be=ae({},be)).left=be.x||0,be.top=be.y||0,be.right=be.right||be.left+be.width,be.bottom=be.bottom||be.top+be.height),be}(Y);i.x=Math.max(Math.min(Q.right-M.right,i.x),Q.left+M.left),i.y=Math.max(Math.min(Q.bottom-M.bottom,i.y),Q.top+M.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Wo=yr(Hn,"restrict"),eo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},ao={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function lo(o,i){for(var f=0,g=["top","left","bottom","right"];f<g.length;f++){var x=g[f];x in o||(o[x]=i[x])}return o}var Un={noInner:eo,noOuter:ao,start:function(o){var i,f=o.interaction,g=o.startOffset,x=o.state,M=x.options;M&&(i=Ke(Dn(M.offset,f,f.coords.start.page))),i=i||{x:0,y:0},x.offset={top:i.y+g.top,left:i.x+g.left,bottom:i.y-g.bottom,right:i.x-g.right}},set:function(o){var i=o.coords,f=o.edges,g=o.interaction,x=o.state,M=x.offset,Y=x.options;if(f){var Q=ae({},i),be=Dn(Y.inner,g,Q)||{},He=Dn(Y.outer,g,Q)||{};lo(be,eo),lo(He,ao),f.top?i.y=Math.min(Math.max(He.top+M.top,Q.y),be.top+M.top):f.bottom&&(i.y=Math.max(Math.min(He.bottom+M.bottom,Q.y),be.bottom+M.bottom)),f.left?i.x=Math.min(Math.max(He.left+M.left,Q.x),be.left+M.left):f.right&&(i.x=Math.max(Math.min(He.right+M.right,Q.x),be.right+M.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ei=yr(Un,"restrictEdges"),ro=ae({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(o){}},Hn.defaults),no=yr({start:Hn.start,set:Hn.set,defaults:ro},"restrictRect"),ai={width:-1/0,height:-1/0},Ko={width:1/0,height:1/0},io=yr({start:function(o){return Un.start(o)},set:function(o){var i=o.interaction,f=o.state,g=o.rect,x=o.edges,M=f.options;if(x){var Y=Ie(Dn(M.min,i,o.coords))||ai,Q=Ie(Dn(M.max,i,o.coords))||Ko;f.options={endOnly:M.endOnly,inner:ae({},Un.noInner),outer:ae({},Un.noOuter)},x.top?(f.options.inner.top=g.bottom-Y.height,f.options.outer.top=g.bottom-Q.height):x.bottom&&(f.options.inner.bottom=g.top+Y.height,f.options.outer.bottom=g.top+Q.height),x.left?(f.options.inner.left=g.right-Y.width,f.options.outer.left=g.right-Q.width):x.right&&(f.options.inner.right=g.left+Y.width,f.options.outer.right=g.left+Q.width),Un.set(o),f.options=M}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),On={start:function(o){var i,f=o.interaction,g=o.interactable,x=o.element,M=o.rect,Y=o.state,Q=o.startOffset,be=Y.options,He=be.offsetWithOrigin?function(Da){var Xa=Da.interaction.element,Ya=Ke(he(Da.state.options.origin,null,null,[Xa])),el=Ya||Be(Da.interactable,Xa,Da.interaction.prepared.name);return el}(o):{x:0,y:0};if(be.offset==="startCoords")i={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Ne=he(be.offset,g,x,[f]);(i=Ke(Ne)||{x:0,y:0}).x+=He.x,i.y+=He.y}var aa=be.relativePoints;Y.offsets=M&&aa&&aa.length?aa.map(function(Da,Xa){return{index:Xa,relativePoint:Da,x:Q.left-M.width*Da.x+i.x,y:Q.top-M.height*Da.y+i.y}}):[{index:0,relativePoint:null,x:i.x,y:i.y}]},set:function(o){var i=o.interaction,f=o.coords,g=o.state,x=g.options,M=g.offsets,Y=Be(i.interactable,i.element,i.prepared.name),Q=ae({},f),be=[];x.offsetWithOrigin||(Q.x-=Y.x,Q.y-=Y.y);for(var He=0,Ne=M;He<Ne.length;He++)for(var aa=Ne[He],Da=Q.x-aa.x,Xa=Q.y-aa.y,Ya=0,el=x.targets.length;Ya<el;Ya++){var kl=x.targets[Ya],ml=void 0;(ml=y.func(kl)?kl(Da,Xa,i._proxy,aa,Ya):kl)&&be.push({x:(y.number(ml.x)?ml.x:Da)+aa.x,y:(y.number(ml.y)?ml.y:Xa)+aa.y,range:y.number(ml.range)?ml.range:x.range,source:kl,index:Ya,offset:aa})}for(var dl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},ql=0;ql<be.length;ql++){var Rl=be[ql],Ml=Rl.range,Al=Rl.x-Q.x,jr=Rl.y-Q.y,Sr=za(Al,jr),Yr=Sr<=Ml;Ml===1/0&&dl.inRange&&dl.range!==1/0&&(Yr=!1),dl.target&&!(Yr?dl.inRange&&Ml!==1/0?Sr/Ml<dl.distance/dl.range:Ml===1/0&&dl.range!==1/0||Sr<dl.distance:!dl.inRange&&Sr<dl.distance)||(dl.target=Rl,dl.distance=Sr,dl.range=Ml,dl.inRange=Yr,dl.delta.x=Al,dl.delta.y=jr)}return dl.inRange&&(f.x=dl.target.x,f.y=dl.target.y),g.closest=dl,dl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Go=yr(On,"snap"),pi={start:function(o){var i=o.state,f=o.edges,g=i.options;if(!f)return null;o.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:g.offset||"self",origin:{x:0,y:0},range:g.range}},i.targetFields=i.targetFields||[["width","height"],["x","y"]],On.start(o),i.offsets=o.state.offsets,o.state=i},set:function(o){var i=o.interaction,f=o.state,g=o.coords,x=f.options,M=f.offsets,Y={x:g.x-M[0].x,y:g.y-M[0].y};f.options=ae({},x),f.options.targets=[];for(var Q=0,be=x.targets||[];Q<be.length;Q++){var He=be[Q],Ne=void 0;if(Ne=y.func(He)?He(Y.x,Y.y,i):He){for(var aa=0,Da=f.targetFields;aa<Da.length;aa++){var Xa=Da[aa],Ya=Xa[0],el=Xa[1];if(Ya in Ne||el in Ne){Ne.x=Ne[Ya],Ne.y=Ne[el];break}}f.options.targets.push(Ne)}}var kl=On.set(o);return f.options=x,kl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Yo=yr(pi,"snapSize"),Mi={aspectRatio:qo,restrictEdges:ei,restrict:Wo,restrictRect:no,restrictSize:io,snapEdges:yr({start:function(o){var i=o.edges;return i?(o.state.targetFields=o.state.targetFields||[[i.left?"left":"right",i.top?"top":"bottom"]],pi.start(o)):null},set:pi.set,defaults:ae(Nr(pi.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Go,snapSize:Yo,spring:Cn,avoid:Cn,transform:Cn,rubberband:Cn},Jo={id:"modifiers",install:function(o){var i=o.interactStatic;for(var f in o.usePlugin(nr),o.usePlugin(zi),i.modifiers=Mi,Mi){var g=Mi[f],x=g._defaults,M=g._methods;x._methods=M,o.defaults.perAction[f]=x}}},Xo=Jo,oo=function(o){m(f,o);var i=V(f);function f(g,x,M,Y,Q,be){var He;if(s(this,f),j(C(He=i.call(this,Q)),M),M!==x&&j(C(He),x),He.timeStamp=be,He.originalEvent=M,He.type=g,He.pointerId=de(x),He.pointerType=oa(x),He.target=Y,He.currentTarget=null,g==="tap"){var Ne=Q.getPointerIndex(x);He.dt=He.timeStamp-Q.pointers[Ne].downTime;var aa=He.timeStamp-Q.tapTime;He.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===He.target&&aa<500}else g==="doubletap"&&(He.dt=x.timeStamp-Q.tapTime,He.double=!0);return He}return u(f,[{key:"_subtractOrigin",value:function(g){var x=g.x,M=g.y;return this.pageX-=x,this.pageY-=M,this.clientX-=x,this.clientY-=M,this}},{key:"_addOrigin",value:function(g){var x=g.x,M=g.y;return this.pageX+=x,this.pageY+=M,this.clientX+=x,this.clientY+=M,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(H),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,f=o.pointerInfo;!i&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(o,i){var f=o.interaction,g=o.pointer,x=o.event,M=o.eventTarget;o.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Ii(o),Nn({interaction:f,pointer:g,event:x,eventTarget:M,type:"move"},i))},"interactions:down":function(o,i){(function(f,g){for(var x=f.interaction,M=f.pointer,Y=f.event,Q=f.eventTarget,be=f.pointerIndex,He=x.pointers[be].hold,Ne=ca(Q),aa={interaction:x,pointer:M,event:Y,eventTarget:Q,type:"hold",targets:[],path:Ne,node:null},Da=0;Da<Ne.length;Da++){var Xa=Ne[Da];aa.node=Xa,g.fire("pointerEvents:collect-targets",aa)}if(aa.targets.length){for(var Ya=1/0,el=0,kl=aa.targets;el<kl.length;el++){var ml=kl[el].eventable.options.holdDuration;ml<Ya&&(Ya=ml)}He.duration=Ya,He.timeout=setTimeout(function(){Nn({interaction:x,eventTarget:Q,pointer:M,event:Y,type:"hold"},g)},Ya)}})(o,i),Nn(o,i)},"interactions:up":function(o,i){Ii(o),Nn(o,i),function(f,g){var x=f.interaction,M=f.pointer,Y=f.event,Q=f.eventTarget;x.pointerWasMoved||Nn({interaction:x,eventTarget:Q,pointer:M,event:Y,type:"tap"},g)}(o,i)},"interactions:cancel":function(o,i){Ii(o),Nn(o,i)}},PointerEvent:oo,fire:Nn,collectEventTargets:to,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 Nn(o,i){var f=o.interaction,g=o.pointer,x=o.event,M=o.eventTarget,Y=o.type,Q=o.targets,be=Q===void 0?to(o,i):Q,He=new oo(Y,g,x,M,f,i.now());i.fire("pointerEvents:new",{pointerEvent:He});for(var Ne={interaction:f,pointer:g,event:x,eventTarget:M,targets:be,type:Y,pointerEvent:He},aa=0;aa<be.length;aa++){var Da=be[aa];for(var Xa in Da.props||{})He[Xa]=Da.props[Xa];var Ya=Be(Da.eventable,Da.node);if(He._subtractOrigin(Ya),He.eventable=Da.eventable,He.currentTarget=Da.node,Da.eventable.fire(He),He._addOrigin(Ya),He.immediatePropagationStopped||He.propagationStopped&&aa+1<be.length&&be[aa+1].node!==He.currentTarget)break}if(i.fire("pointerEvents:fired",Ne),Y==="tap"){var el=He.double?Nn({interaction:f,pointer:g,event:x,eventTarget:M,type:"doubletap"},i):He;f.prevTap=el,f.tapTime=el.timeStamp}return He}function to(o,i){var f=o.interaction,g=o.pointer,x=o.event,M=o.eventTarget,Y=o.type,Q=f.getPointerIndex(g),be=f.pointers[Q];if(Y==="tap"&&(f.pointerWasMoved||!be||be.downTarget!==M))return[];for(var He=ca(M),Ne={interaction:f,pointer:g,event:x,eventTarget:M,type:Y,path:He,targets:[],node:null},aa=0;aa<He.length;aa++){var Da=He[aa];Ne.node=Da,i.fire("pointerEvents:collect-targets",Ne)}return Y==="hold"&&(Ne.targets=Ne.targets.filter(function(Xa){var Ya,el;return Xa.eventable.options.holdDuration===((Ya=f.pointers[Q])==null||(el=Ya.hold)==null?void 0:el.duration)})),Ne.targets}function Ii(o){var i=o.interaction,f=o.pointerIndex,g=i.pointers[f].hold;g&&g.timeout&&(clearTimeout(g.timeout),g.timeout=null)}var Zo=Object.freeze({__proto__:null,default:qn});function fi(o){var i=o.interaction;i.holdIntervalHandle&&(clearInterval(i.holdIntervalHandle),i.holdIntervalHandle=null)}var Qo={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)]=fi,o},{"pointerEvents:new":function(o){var i=o.pointerEvent;i.type==="hold"&&(i.count=(i.count||0)+1)},"pointerEvents:fired":function(o,i){var f=o.interaction,g=o.pointerEvent,x=o.eventTarget,M=o.targets;if(g.type==="hold"&&M.length){var Y=M[0].eventable.options.holdRepeatInterval;Y<=0||(f.holdIntervalHandle=setTimeout(function(){i.pointerEvents.fire({interaction:f,eventTarget:x,type:"hold",pointer:g,event:g},i)},Y))}}})},et=Qo,at={id:"pointer-events/interactableTargets",install:function(o){var i=o.Interactable;i.prototype.pointerEvents=function(g){return ae(this.events.options,g),this};var f=i.prototype._backCompatOption;i.prototype._backCompatOption=function(g,x){var M=f.call(this,g,x);return M===this&&(this.events.options[g]=x),M}},listeners:{"pointerEvents:collect-targets":function(o,i){var f=o.targets,g=o.node,x=o.type,M=o.eventTarget;i.interactables.forEachMatch(g,function(Y){var Q=Y.events,be=Q.options;Q.types[x]&&Q.types[x].length&&Y.testIgnoreAllow(be,g,M)&&f.push({node:g,eventable:Q,props:{interactable:Y}})})},"interactable:new":function(o){var i=o.interactable;i.events.getRect=function(f){return i.getRect(f)}},"interactable:set":function(o,i){var f=o.interactable,g=o.options;ae(f.events.options,i.pointerEvents.defaults),ae(f.events.options,g.pointerEvents||{})}}},lt=at,so={id:"pointer-events",install:function(o){o.usePlugin(Zo),o.usePlugin(et),o.usePlugin(lt)}},hi=so,rt={id:"reflow",install:function(o){var i=o.Interactable;o.actions.phases.reflow=!0,i.prototype.reflow=function(f){return function(g,x,M){for(var Y=g.getAllElements(),Q=M.window.Promise,be=Q?[]:null,He=function(){var aa=Y[Ne],Da=g.getRect(aa);if(!Da)return 1;var Xa,Ya=na(M.interactions.list,function(ml){return ml.interacting()&&ml.interactable===g&&ml.element===aa&&ml.prepared.name===x.name});if(Ya)Ya.move(),be&&(Xa=Ya._reflowPromise||new Q(function(ml){Ya._reflowResolve=ml}));else{var el=Ie(Da),kl=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:el.x,y:el.y},client:{x:el.x,y:el.y},timeStamp:M.now()});Xa=function(ml,dl,ql,Rl,Ml){var Al=ml.interactions.new({pointerType:"reflow"}),jr={interaction:Al,event:Ml,pointer:Ml,eventTarget:ql,phase:"reflow"};Al.interactable=dl,Al.element=ql,Al.prevEvent=Ml,Al.updatePointer(Ml,Ml,ql,!0),fe(Al.coords.delta),ua(Al.prepared,Rl),Al._doPhase(jr);var Sr=ml.window,Yr=Sr.Promise,tn=Yr?new Yr(function(gn){Al._reflowResolve=gn}):void 0;return Al._reflowPromise=tn,Al.start(Rl,dl,ql),Al._interacting?(Al.move(jr),Al.end(Ml)):(Al.stop(),Al._reflowResolve()),Al.removePointer(Ml,Ml),tn}(M,g,aa,x,kl)}be&&be.push(Xa)},Ne=0;Ne<Y.length&&!He();Ne++);return be&&Q.all(be).then(function(){return g})}(this,f,o)}},listeners:{"interactions:stop":function(o,i){var f=o.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(g,x){g.splice(g.indexOf(x),1)}(i.interactions.list,f))}}},nt=rt;if(Pr.use(lr),Pr.use(gr),Pr.use(hi),Pr.use(on),Pr.use(Xo),Pr.use(pr),Pr.use(ia),Pr.use(ue),Pr.use(nt),Pr.default=Pr,t(a)==="object"&&a)try{a.exports=Pr}catch{}return Pr.default=Pr,Pr})}(Vi,Vi.exports)),Vi.exports}var m1=v1();const Ms=Vn.getDefaultExportFromCjs(m1),Oo=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:l,emit:r}){const n=a,t=r,s=e.inject(Hc),v=e.inject(Uc);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const u=e.shallowRef(null),p=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,c=!1,k=NaN,C=NaN,V=NaN,_=NaN,G=-1,z=-1,I=-1,P=-1,E=n.x,S=n.y,w=n.w,b=n.h;const y=e.ref(),L=e.reactive({i:e.toRef(n,"i"),state:p,wrapper:y,calcXY:he});function $(me){Fe(me)}function K(){ba()}function ie(me){un(n.isDraggable)&&(p.draggable=me)}function Se(me){un(n.isResizable)&&(p.resizable=me)}function oe(me){un(n.isBounded)&&(p.bounded=me)}function X(me){p.transformScale=me}function pe(me){p.rowHeight=me}function ee(me){p.maxRows=me}function te(){p.rtl=As()==="rtl",ba()}function De(me){p.cols=Math.floor(me)}s.increaseItem(L),e.onBeforeMount(()=>{p.rtl=As()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?p.cols=Yc(s.lastBreakpoint,s.cols):p.cols=s.colNum,p.rowHeight=s.rowHeight,p.containerWidth=s.width!==null?s.width:100,p.margin=s.margin!==void 0?s.margin.map(Number):[10,10],p.maxRows=s.maxRows,un(n.isDraggable)?p.draggable=s.isDraggable:p.draggable=n.isDraggable,un(n.isResizable)?p.resizable=s.isResizable:p.resizable=n.isResizable,un(n.isBounded)?p.bounded=s.isBounded:p.bounded=n.isBounded,p.transformScale=s.transformScale,p.useCssTransforms=s.useCssTransforms,p.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{E=n.x,S=n.y,b=n.h,w=n.w,Jr(qe)}),v.on("updateWidth",$),v.on("compact",K),v.on("setDraggable",ie),v.on("setResizable",Se),v.on("setBounded",oe),v.on("setTransformScale",X),v.on("setRowHeight",pe),v.on("setMaxRows",ee),v.on("directionchange",te),v.on("setColNum",De)}),e.onBeforeUnmount(()=>{v.off("updateWidth",$),v.off("compact",K),v.off("setDraggable",ie),v.off("setResizable",Se),v.off("setBounded",oe),v.off("setTransformScale",X),v.off("setRowHeight",pe),v.off("setMaxRows",ee),v.off("directionchange",te),v.off("setColNum",De),u.value&&(u.value.unset(),u.value=null),s.decreaseItem(L)}),l({state:p,wrapper:y});const Pe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ge=e.computed(()=>p.resizable&&!n.static),N=e.computed(()=>s.isMirrored?!p.rtl:p.rtl),U=e.computed(()=>(p.draggable||p.resizable)&&!n.static),le=o1("item"),Te=e.computed(()=>({[le.b()]:!0,[le.bm("resizable")]:ge.value,[le.bm("static")]:n.static,[le.bm("resizing")]:p.isResizing,[le.bm("dragging")]:p.isDragging,[le.bm("transform")]:p.useCssTransforms,[le.bm("rtl")]:N.value,[le.bm("no-touch")]:Pe&&U.value})),Ee=e.computed(()=>[le.be("resizer"),N.value&&le.bem("resizer","rtl")].filter(Boolean));e.watch(()=>n.isDraggable,me=>{p.draggable=me}),e.watch(()=>n.static,()=>{Jr(j),Jr(fe)}),e.watch(()=>p.draggable,()=>{Jr(j)}),e.watch(()=>n.isResizable,me=>{p.resizable=me}),e.watch(()=>n.isBounded,me=>{p.bounded=me}),e.watch(()=>p.resizable,()=>{Jr(fe)}),e.watch(()=>p.rowHeight,()=>{Jr(qe),Jr(ca)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{Jr(fe),Jr(qe),Jr(ca)}),e.watch([()=>n.minH,()=>n.maxH,()=>n.minW,()=>n.maxW],()=>{Jr(fe)}),e.watch(N,()=>{Jr(fe),Jr(qe)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const me=s.margin;!me||me[0]===p.margin[0]&&me[1]===p.margin[1]||(p.margin=me.map(Number),Jr(qe),Jr(ca))});function qe(){n.x+n.w>p.cols?(E=0,w=n.w>p.cols?p.cols:n.w):(E=n.x,w=n.w);const me=la(E,S,w,b);p.isDragging&&(me.top=p.dragging.top,N.value?me.right=p.dragging.left:me.left=p.dragging.left),p.isResizing&&(me.width=p.resizing.width,me.height=p.resizing.height);let pa;p.useCssTransforms?N.value?pa=l1(me.top,me.right,me.width,me.height):pa=a1(me.top,me.left,me.width,me.height):N.value?pa=n1(me.top,me.right,me.width,me.height):pa=r1(me.top,me.left,me.width,me.height),p.style=pa}function ca(){const me={};for(const pa of["width","height"]){const Qe=p.style[pa].match(/^(\d+)px$/);if(!Qe)return;me[pa]=Qe[1]}t("container-resized",n.i,n.h,n.w,me.height,me.width)}function Na(me){if(n.static)return;const pa=me.type;if(pa==="resizestart"&&p.isResizing||pa!=="resizestart"&&!p.isResizing)return;const Qe=Ts(me);if(un(Qe))return;const{x:de,y:Ce}=Qe,ha={width:0,height:0};let Ue;switch(pa){case"resizestart":{fe(),G=w,z=b,Ue=la(E,S,w,b),ha.width=Ue.width,ha.height=Ue.height,p.resizing=ha,p.isResizing=!0;break}case"resizemove":{!me.edges.right&&!me.edges.left&&(V=de),!me.edges.top&&!me.edges.bottom&&(_=Ce);const Ma=Bs(V,_,de,Ce);N.value?ha.width=p.resizing.width-Ma.deltaX/p.transformScale:ha.width=p.resizing.width+Ma.deltaX/p.transformScale,ha.height=p.resizing.height+Ma.deltaY/p.transformScale,p.resizing=ha;break}case"resizeend":{Ue=la(E,S,w,b),ha.width=Ue.width,ha.height=Ue.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}Ue=Be(ha.height,ha.width),Ue.w<n.minW&&(Ue.w=n.minW),Ue.w>n.maxW&&(Ue.w=n.maxW),Ue.h<n.minH&&(Ue.h=n.minH),Ue.h>n.maxH&&(Ue.h=n.maxH),Ue.h<1&&(Ue.h=1),Ue.w<1&&(Ue.w=1),V=de,_=Ce,(w!==Ue.w||b!==Ue.h)&&t("resize",n.i,Ue.h,Ue.w,ha.height,ha.width),me.type==="resizeend"&&(G!==w||z!==b)&&t("resized",n.i,Ue.h,Ue.w,ha.height,ha.width),v.emit("resizeEvent",me.type,n.i,E,S,Ue.h,Ue.w)}function ae(me){if(n.static||p.isResizing)return;const pa=me.type;if(pa==="dragstart"&&p.isDragging||pa!=="dragstart"&&!p.isDragging)return;const Qe=Ts(me);if(un(Qe))return;const{x:de,y:Ce}=Qe,ha=me.target;if(!ha.offsetParent)return;const Ue={top:0,left:0};switch(pa){case"dragstart":{I=E,P=S;const Ta=ha.offsetParent.getBoundingClientRect(),Ze=ha.getBoundingClientRect(),oa=Ze.left/p.transformScale,ce=Ta.left/p.transformScale,H=Ze.right/p.transformScale,q=Ta.right/p.transformScale,ze=Ze.top/p.transformScale,we=Ta.top/p.transformScale;N.value?Ue.left=(H-q)*-1:Ue.left=oa-ce,Ue.top=ze-we,p.dragging=Ue,p.isDragging=!0;break}case"dragmove":{const Ta=Bs(k,C,de,Ce);if(N.value?Ue.left=p.dragging.left-Ta.deltaX/p.transformScale:Ue.left=p.dragging.left+Ta.deltaX/p.transformScale,Ue.top=p.dragging.top+Ta.deltaY/p.transformScale,p.bounded){const Ze=ha.offsetParent.clientHeight-Ie(n.h,p.rowHeight,p.margin[1]);Ue.top=se(Ue.top,0,Ze);const oa=Ke(),ce=p.containerWidth-Ie(n.w,oa,p.margin[0]);Ue.left=se(Ue.left,0,ce)}p.dragging=Ue;break}case"dragend":{const Ta=ha.offsetParent.getBoundingClientRect(),Ze=ha.getBoundingClientRect(),oa=Ze.left/p.transformScale,ce=Ta.left/p.transformScale,H=Ze.right/p.transformScale,q=Ta.right/p.transformScale,ze=Ze.top/p.transformScale,we=Ta.top/p.transformScale;N.value?Ue.left=(H-q)*-1:Ue.left=oa-ce,Ue.top=ze-we,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let Ma;N.value,Ma=he(Ue.top,Ue.left),k=de,C=Ce,(E!==Ma.x||S!==Ma.y)&&t("move",n.i,Ma.x,Ma.y),me.type==="dragend"&&(I!==E||P!==S)&&t("moved",n.i,Ma.x,Ma.y),v.emit("dragEvent",me.type,n.i,Ma.x,Ma.y,b,w)}function la(me,pa,Qe,de){const Ce=Ke();let ha;return N.value?ha={right:Math.round(Ce*me+(me+1)*p.margin[0]),top:Math.round(p.rowHeight*pa+(pa+1)*p.margin[1]),width:Qe===1/0?Qe:Math.round(Ce*Qe+Math.max(0,Qe-1)*p.margin[0]),height:de===1/0?de:Math.round(p.rowHeight*de+Math.max(0,de-1)*p.margin[1])}:ha={left:Math.round(Ce*me+(me+1)*p.margin[0]),top:Math.round(p.rowHeight*pa+(pa+1)*p.margin[1]),width:Qe===1/0?Qe:Math.round(Ce*Qe+Math.max(0,Qe-1)*p.margin[0]),height:de===1/0?de:Math.round(p.rowHeight*de+Math.max(0,de-1)*p.margin[1])},ha}function he(me,pa){const Qe=Ke();let de=Math.round((pa-p.margin[0])/(Qe+p.margin[0])),Ce=Math.round((me-p.margin[1])/(p.rowHeight+p.margin[1]));return de=Math.max(Math.min(de,p.cols-w),0),Ce=Math.max(Math.min(Ce,p.maxRows-b),0),{x:de,y:Ce}}function Ke(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function Ie(me,pa,Qe){return Number.isFinite(me)?Math.round(pa*me+Math.max(0,me-1)*Qe):me}function se(me,pa,Qe){return Math.max(Math.min(me,Qe),pa)}function Be(me,pa,Qe=!1){const de=Ke();let Ce=Math.round((pa+p.margin[0])/(de+p.margin[0])),ha=0;return Qe?ha=Math.ceil((me+p.margin[1])/(p.rowHeight+p.margin[1])):ha=Math.round((me+p.margin[1])/(p.rowHeight+p.margin[1])),Ce=Math.max(Math.min(Ce,p.cols-E),0),ha=Math.max(Math.min(ha,p.maxRows-S),0),{w:Ce,h:ha}}function Fe(me,pa){p.containerWidth=me}function ba(){qe()}function za(){!u.value&&y.value&&(u.value=Ms(y.value),p.useStyleCursor||u.value.styleCursor(!1))}const F=Cs(ae);function j(){if(za(),!!u.value)if(p.draggable&&!n.static){const me={ignoreFrom:n.dragIgnoreFrom,allowFrom:n.dragAllowFrom,...n.dragOption};u.value.draggable(me),m||(m=!0,u.value.on("dragstart dragmove dragend",pa=>{pa.type==="dragmove"?F(pa):ae(pa)}))}else u.value.draggable({enabled:!1})}const Z=Cs(Na);function fe(){if(za(),!!u.value)if(p.resizable&&!n.static){const me=la(0,0,n.maxW,n.maxH),pa=la(0,0,n.minW,n.minH),Qe={edges:{left:N.value?`.${Ee.value[0]}`:!1,right:N.value?!1:`.${Ee.value[0]}`,bottom:`.${Ee.value[0]}`,top:!1},ignoreFrom:n.resizeIgnoreFrom,restrictSize:{min:{height:pa.height*p.transformScale,width:pa.width*p.transformScale},max:{height:me.height*p.transformScale,width:me.width*p.transformScale}},...n.resizeOption};n.preserveAspectRatio&&(Qe.modifiers=[Ms.modifiers.aspectRatio({ratio:"preserve"})]),u.value.resizable(Qe),c||(c=!0,u.value.on("resizestart resizemove resizeend",de=>{de.type==="resizemove"?Z(de):Na(de)}))}else u.value.resizable({enabled:!1})}return(me,pa)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:y,class:e.normalizeClass(Te.value),style:e.normalizeStyle(p.style)},[e.renderSlot(me.$slots,"default"),ge.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Ee.value)},null,2)):e.createCommentVNode("",!0)],6))}}),di=typeof window<"u";var Is;di&&(Is=window==null?void 0:window.navigator)!=null&&Is.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Os(a){return a!=null}function Ls(){}const y1=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(y1)));const g1=di&&("ontouchstart"in window||k1()>0),b1=g1?"pointerdown":"click";function k1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function x1(a,l,r=window.Event){const{type:n,bubbles:t=!1,cancelable:s=!1,...v}=l;if(!Os(n)||n==="")return!1;let u;return Os(r)?u=new r(n,{bubbles:t,cancelable:s}):(u=document.createEvent("HTMLEvents"),u.initEvent(n,t,s)),Object.assign(u,v),a.dispatchEvent(u)}const w1="clickoutside",_1=new Set;di&&document.addEventListener(b1,a=>{const l=a.target,r=a.composedPath&&a.composedPath();_1.forEach(n=>{n!==l&&(r?!r.includes(n):!n.contains(l))&&(!n.__transferElement||n.__transferElement!==l&&!n.__transferElement.contains(l))&&x1(n,{type:w1})})},!0);const S1=[["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 _o;if(di){for(const a of S1)if(a[1]in document){_o=a;break}}e.computed(()=>!1);const E1=new Set,C1=new WeakMap;if(di&&_o){const a=_o[2],l=_o[4];document.addEventListener(l,()=>{if(E1.forEach(r=>{r.value=!1}),document[a]){const r=C1.get(document[a]);r&&(r.value=!0)}},!1)}const Xc=new Map;Xc.set("x",0);Xc.set("y",0);var ci=[],D1=function(){return ci.some(function(a){return a.activeTargets.length>0})},N1=function(){return ci.some(function(a){return a.skippedTargets.length>0})},$s="ResizeObserver loop completed with undelivered notifications.",T1=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:$s}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=$s),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 ui=function(a){return Object.freeze(a)},B1=function(){function a(l,r){this.inlineSize=l,this.blockSize=r,ui(this)}return a}(),Zc=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,ui(this)}return a.prototype.toJSON=function(){var l=this,r=l.x,n=l.y,t=l.top,s=l.right,v=l.bottom,u=l.left,p=l.width,m=l.height;return{x:r,y:n,top:t,right:s,bottom:v,left:u,width:p,height:m}},a.fromRect=function(l){return new a(l.x,l.y,l.width,l.height)},a}(),zt=function(a){return a instanceof SVGElement&&"getBBox"in a},Qc=function(a){if(zt(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)},Rs=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)},A1=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:{},bo=new WeakMap,Vs=/auto|scroll/,z1=/^tb|vertical/,M1=/msie|trident/i.test(Ui.navigator&&Ui.navigator.userAgent),Bn=function(a){return parseFloat(a||"0")},Ci=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)},Fs=ui({devicePixelContentBoxSize:Ci(),borderBoxSize:Ci(),contentBoxSize:Ci(),contentRect:new Zc(0,0,0,0)}),eu=function(a,l){if(l===void 0&&(l=!1),bo.has(a)&&!l)return bo.get(a);if(Qc(a))return bo.set(a,Fs),Fs;var r=getComputedStyle(a),n=zt(a)&&a.ownerSVGElement&&a.getBBox(),t=!M1&&r.boxSizing==="border-box",s=z1.test(r.writingMode||""),v=!n&&Vs.test(r.overflowY||""),u=!n&&Vs.test(r.overflowX||""),p=n?0:Bn(r.paddingTop),m=n?0:Bn(r.paddingRight),c=n?0:Bn(r.paddingBottom),k=n?0:Bn(r.paddingLeft),C=n?0:Bn(r.borderTopWidth),V=n?0:Bn(r.borderRightWidth),_=n?0:Bn(r.borderBottomWidth),G=n?0:Bn(r.borderLeftWidth),z=k+m,I=p+c,P=G+V,E=C+_,S=u?a.offsetHeight-E-a.clientHeight:0,w=v?a.offsetWidth-P-a.clientWidth:0,b=t?z+P:0,y=t?I+E:0,L=n?n.width:Bn(r.width)-b-w,$=n?n.height:Bn(r.height)-y-S,K=L+z+w+P,ie=$+I+S+E,Se=ui({devicePixelContentBoxSize:Ci(Math.round(L*devicePixelRatio),Math.round($*devicePixelRatio),s),borderBoxSize:Ci(K,ie,s),contentBoxSize:Ci(L,$,s),contentRect:new Zc(k,p,L,$)});return bo.set(a,Se),Se},au=function(a,l,r){var n=eu(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}},I1=function(){function a(l){var r=eu(l);this.target=l,this.contentRect=r.contentRect,this.borderBoxSize=ui([r.borderBoxSize]),this.contentBoxSize=ui([r.contentBoxSize]),this.devicePixelContentBoxSize=ui([r.devicePixelContentBoxSize])}return a}(),lu=function(a){if(Qc(a))return 1/0;for(var l=0,r=a.parentNode;r;)l+=1,r=r.parentNode;return l},O1=function(){var a=1/0,l=[];ci.forEach(function(s){if(s.activeTargets.length!==0){var v=[];s.activeTargets.forEach(function(u){var p=new I1(u.target),m=lu(u.target);v.push(p),u.lastReportedSize=au(u.target,u.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},Ps=function(a){ci.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(r){r.isActive()&&(lu(r.target)>a?l.activeTargets.push(r):l.skippedTargets.push(r))})})},L1=function(){var a=0;for(Ps(a);D1();)a=O1(),Ps(a);return N1()&&T1(),a>0},ft,ru=[],$1=function(){return ru.splice(0).forEach(function(a){return a()})},R1=function(a){if(!ft){var l=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return $1()}).observe(r,n),ft=function(){r.textContent="".concat(l?l--:l++)}}ru.push(a),ft()},V1=function(a){R1(function(){requestAnimationFrame(a)})},So=0,F1=function(){return!!So},P1=250,j1={attributes:!0,characterData:!0,childList:!0,subtree:!0},js=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Hs=function(a){return a===void 0&&(a=0),Date.now()+a},ht=!1,H1=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=P1),!ht){ht=!0;var n=Hs(l);V1(function(){var t=!1;try{t=L1()}finally{if(ht=!1,l=n-Hs(),!F1())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,j1)};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(),js.forEach(function(r){return Ui.addEventListener(r,l.listener,!0)}))},a.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),js.forEach(function(r){return Ui.removeEventListener(r,l.listener,!0)}),this.stopped=!0)},a}(),Dt=new H1,Us=function(a){!So&&a>0&&Dt.start(),So+=a,!So&&Dt.stop()},U1=function(a){return!zt(a)&&!A1(a)&&getComputedStyle(a).display==="inline"},q1=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=au(this.target,this.observedBox,!0);return U1(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},a}(),W1=function(){function a(l,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=r}return a}(),ko=new WeakMap,qs=function(a,l){for(var r=0;r<a.length;r+=1)if(a[r].target===l)return r;return-1},xo=function(){function a(){}return a.connect=function(l,r){var n=new W1(l,r);ko.set(l,n)},a.observe=function(l,r,n){var t=ko.get(l),s=t.observationTargets.length===0;qs(t.observationTargets,r)<0&&(s&&ci.push(t),t.observationTargets.push(new q1(r,n&&n.box)),Us(1),Dt.schedule())},a.unobserve=function(l,r){var n=ko.get(l),t=qs(n.observationTargets,r),s=n.observationTargets.length===1;t>=0&&(s&&ci.splice(ci.indexOf(n),1),n.observationTargets.splice(t,1),Us(-1))},a.disconnect=function(l){var r=this,n=ko.get(l);n.observationTargets.slice().forEach(function(t){return r.unobserve(l,t.target)}),n.activeTargets.splice(0,n.activeTargets.length)},a}(),K1=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.");xo.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(!Rs(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");xo.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(!Rs(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");xo.unobserve(this,l)},a.prototype.disconnect=function(){xo.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Lo=new WeakMap;function G1(a){var l;for(let r=0,n=a.length;r<n;++r){const t=a[r],s=Lo.get(t.target);if(typeof s=="function"){const{inlineSize:v,blockSize:u}=((l=t.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:p,offsetHeight:m}=t.target;s(Object.assign(t,{offsetWidth:p,offsetHeight:m,width:v??p,height:u??m}))}}}const nu=new(di&&window.ResizeObserver||K1)(G1);function Ws(a,l){Lo.set(a,l),nu.observe(a)}function Ks(a){Lo.has(a)&&(nu.unobserve(a),Lo.delete(a))}function Y1(a={}){let l=Ls;const r=e.watch(()=>e.unref(a.target),t=>{l(),!(!t||typeof a.onResize!="function")&&(Ws(t,a.onResize),l=()=>{Ks(t),l=Ls})},{immediate:!0}),n=()=>{r(),l()};return e.getCurrentScope()&&e.onScopeDispose(n),{observeResize:Ws,unobserveResize:Ks,unobserve:n}}const J1=e.ref(!1);e.computed(()=>J1.value);const Gs="__theme_style__",vt="__theme_observer__",Ys=e.reactive(new Map),Js=new Map;e.watch(Ys,()=>{if(!di)return;Js.clear();const a=document.head.querySelector(`#${Gs}`);a&&document.head.removeChild(a);const l=document.createElement("style");let r=`.${vt} { width: 1px }`,n=1;for(const[t,[s,v]]of Ys.entries())r+=` html.${s} .${vt}, .${v} .${vt} { width: ${++n}px }`,Js.set(n,t);l.textContent=r,l.id=Gs,document.head.appendChild(l)});const iu=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,u=e.ref(n.layout),p=e.ref(),{observeResize:m,unobserveResize:c}=Y1(),k=G6();k.on("resizeEvent",C),k.on("dragEvent",V),e.onBeforeMount(()=>{t("layout-before-mount",u.value)}),e.onMounted(()=>{t("layout-mounted",u.value),e.nextTick(()=>{i1(u.value),s.originalLayout=u.value,e.nextTick(()=>{$(),p.value&&m(p.value,Y6(E,16)),_i(u.value,n.verticalCompact),t("layout-updated",u.value),P(),E()})})}),e.onBeforeUnmount(()=>{k.clearAll(),p.value&&c(p.value)});function C(ie,Se,oe,X,pe,ee){y(ie,Se,oe,X,pe,ee)}function V(ie,Se,oe,X,pe,ee){b(ie,Se,oe,X,pe,ee)}e.watch(()=>s.width,(ie,Se)=>{e.nextTick(()=>{k.emit("updateWidth",ie),Se===-1&&e.nextTick(()=>{t("layout-ready",u.value)}),P()})}),e.watch(()=>[n.layout,n.layout.length],()=>{u.value=n.layout,I()}),e.watch(()=>n.colNum,ie=>{k.emit("setColNum",ie)}),e.watch(()=>n.rowHeight,ie=>{k.emit("setRowHeight",ie)}),e.watch(()=>n.isDraggable,ie=>{k.emit("setDraggable",ie)}),e.watch(()=>n.isResizable,ie=>{k.emit("setResizable",ie)}),e.watch(()=>n.isBounded,ie=>{k.emit("setBounded",ie)}),e.watch(()=>n.transformScale,ie=>{k.emit("setTransformScale",ie)}),e.watch(()=>n.responsive,ie=>{ie||(t("update:layout",s.originalLayout),k.emit("setColNum",n.colNum)),E()}),e.watch(()=>n.maxRows,ie=>{k.emit("setMaxRows",ie)}),e.watch([()=>n.margin,()=>n.margin[1]],P),e.provide(Hc,e.reactive({...e.toRefs(n),...e.toRefs(s),increaseItem:_,decreaseItem:G})),e.provide(Uc,k),l({state:s,getItem:z,resizeEvent:y,dragEvent:b,layoutUpdate:I});function _(ie){v.set(ie.i,ie)}function G(ie){v.delete(ie.i)}function z(ie){return v.get(ie)}function I(){if(!un(u.value)&&!un(s.originalLayout)){if(u.value.length!==s.originalLayout.length){const ie=K(u.value,s.originalLayout);if(ie.length>0)if(u.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(ie);else{const Se=new Set(ie.map(oe=>oe.i));s.originalLayout=s.originalLayout.filter(oe=>!Se.has(oe.i))}s.lastLayoutLength=u.value.length,$()}_i(u.value,n.verticalCompact),k.emit("updateWidth",s.width),P(),t("layout-updated",u.value)}}function P(){s.mergedStyle={height:S()}}function E(){p.value&&(s.width=p.value.offsetWidth),k.emit("resizeEvent")}function S(){if(!n.autoSize)return;const ie=parseFloat(n.margin[1]);return X6(u.value)*(n.rowHeight+ie)+ie+"px"}let w;function b(ie,Se,oe,X,pe,ee){let te=Ds(u.value,Se);un(te)&&(te={h:0,w:0,x:0,y:0,i:""}),ie==="dragstart"&&!n.verticalCompact&&(w=u.value.reduce((De,{i:Pe,x:ge,y:N})=>({...De,[Pe]:{x:ge,y:N}}),{})),ie==="dragmove"||ie==="dragstart"?(s.placeholder.i=Se,s.placeholder.x=te.x,s.placeholder.y=te.y,s.placeholder.w=ee,s.placeholder.h=pe,e.nextTick(()=>{s.isDragging=!0}),k.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),u.value=Ct(u.value,te,oe,X,!0,n.preventCollision),n.restoreOnDrag?(te.static=!0,_i(u.value,n.verticalCompact,w),te.static=!1):_i(u.value,n.verticalCompact),k.emit("compact"),P(),ie==="dragend"&&(w=void 0,t("layout-updated",u.value))}function y(ie,Se,oe,X,pe,ee){let te=Ds(u.value,Se);un(te)&&(te={h:0,w:0,x:0,y:0,i:""});let De;if(n.preventCollision){const Pe=Wc(u.value,{...te,w:ee,h:pe}).filter(ge=>ge.i!==te.i);if(De=Pe.length>0,De){let ge=1/0,N=1/0;Pe.forEach(U=>{U.x>te.x&&(ge=Math.min(ge,U.x)),U.y>te.y&&(N=Math.min(N,U.y))}),Number.isFinite(ge)&&(te.w=ge-te.x),Number.isFinite(N)&&(te.h=N-te.y)}}De||(te.w=ee,te.h=pe),ie==="resizestart"||ie==="resizemove"?(s.placeholder.i=Se,s.placeholder.x=oe,s.placeholder.y=X,s.placeholder.w=te.w,s.placeholder.h=te.h,e.nextTick(()=>{s.isDragging=!0}),k.emit("updateWidth",s.width)):ie&&e.nextTick(()=>{s.isDragging=!1}),n.responsive&&L(),_i(u.value,n.verticalCompact),k.emit("compact"),P(),ie==="resizeend"&&t("layout-updated",u.value)}function L(){const ie=u1(n.breakpoints,s.width);if(ie===s.lastBreakpoint)return;const Se=Yc(ie,n.cols);!un(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=Et(u.value));const oe=d1(s.originalLayout,s.layouts,n.breakpoints,ie,s.lastBreakpoint,Se,n.verticalCompact);s.layouts[ie]=oe,s.lastBreakpoint!==ie&&t("breakpoint-changed",ie,oe),u.value=oe,t("update:layout",oe),s.lastBreakpoint=ie,k.emit("setColNum",Se)}function $(){s.layouts=Object.assign({},n.responsiveLayouts)}function K(ie,Se){const oe=new Set(Se.map(te=>te.i)),X=new Set(ie.map(te=>te.i)),pe=ie.filter(te=>!oe.has(te.i)),ee=Se.filter(te=>!X.has(te.i));return pe.concat(ee)}return(ie,Se)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[ie.$slots.default?e.renderSlot(ie.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u.value,oe=>(e.openBlock(),e.createBlock(Oo,e.mergeProps({key:oe.i,ref_for:!0},oe),{default:e.withCtx(()=>[e.renderSlot(ie.$slots,"item",{item:oe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Oo,{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 X1={key:0,class:"item-view-group"},Z1={key:0,class:"item-view-group"},Q1=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(a,{emit:l}){const r=O.useModelComp(O.pinia),{isEdit:n}=O.storeToRefs(r),t=Xn(O.pinia),s=l,v=a,u=e.ref(""),p=e.computed(()=>v==null?void 0:v.children),m=e.computed(()=>{var P,E,S,w;return((P=v==null?void 0:v.children)==null?void 0:P.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"}),c=P=>{u.value=P,s("radioChange",P)},k=e.computed(()=>{var P,E;return((E=(P=v==null?void 0:v.children)==null?void 0:P[0])==null?void 0:E.isGridLayout)||!1}),C=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 P=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 P&&E}),_=e.computed(()=>{var E,S,w,b,y,L;let P=(E=v==null?void 0:v.children)==null?void 0:E.filter($=>$==null?void 0:$.choice);if(t.setSelectTab((S=P==null?void 0:P[0])==null?void 0:S.choiceName),(u==null?void 0:u.value)!=="")return(w=v==null?void 0:v.children)==null?void 0:w.filter($=>!($!=null&&$.choiceName)||($==null?void 0:$.choiceName)===(u==null?void 0:u.value));{let $=(y=(b=v==null?void 0:v.children)==null?void 0:b.find(K=>K==null?void 0:K.choice))==null?void 0:y.choiceName;return(L=v==null?void 0:v.children)==null?void 0:L.filter(K=>!(K!=null&&K.choiceName)||(K==null?void 0:K.choiceName)===$)}}),G=P=>{const E=(P==null?void 0:P.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 z=P=>{s("rowClick",P)},I=(P,E)=>{s("routeUrl",P,E)};return(P,E)=>k.value?(e.openBlock(),e.createBlock(e.unref(iu),{key:0,layout:p.value,"onUpdate:layout":E[0]||(E[0]=S=>p.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(p.value,(S,w)=>(e.openBlock(),e.createBlock(e.unref(Oo),{key:S.i,x:S.x,y:S.y,"min-h":S.minH,"max-h":S.maxH,"min-w":S.minW,w:S.w,h:S.h,i:S.i},{default:e.withCtx(()=>{var b,y,L,$,K,ie,Se,oe,X,pe,ee,te,De,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"})},[((L=(y=S==null?void 0:S.component)==null?void 0:y.comp)==null?void 0:L.toUpperCase())!=="TABLE"&&(($=S==null?void 0:S.component)!=null&&$.name)?(e.openBlock(),e.createElementBlock("div",X1,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((K=S==null?void 0:S.component)==null?void 0:K.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Wi)((ie=S==null?void 0:S.component)==null?void 0:ie.comp)),{pageLayout:m.value,config:{showIndex:(Se=e.unref(sr)[w])==null?void 0:Se.showIndex,allowMove:(oe=e.unref(sr)[w])==null?void 0:oe.allowMove,viewport:(X=e.unref(sr)[w])==null?void 0:X.viewport,status:(pe=e.unref(sr)[w])==null?void 0:pe.status},related:S==null?void 0:S.relatedTables,compName:S==null?void 0:S.component.name,compNames:e.unref(Sc),itemData:(ee=S==null?void 0:S.component)==null?void 0:ee.compData,childItemData:(te=S==null?void 0:S.component)==null?void 0:te.itemChildData,key:e.unref(Jn),cacheNewData:e.unref(_c),onChange:e.unref(Ao),index:(S==null?void 0:S.id)??w,onContentChange:e.unref(zo),onPageChange:e.unref(Mo),parentTableId:(De=S==null?void 0:S.component)==null?void 0:De.tableId,allMapContents:e.unref(wt),children:(Pe=S==null?void 0:S.component)==null?void 0:Pe.children,level:C.value,onRowClick:z,onRouteUrl:I,onClickTrigger:e.unref(Ec),onClickMainKey:e.unref(Cc),onRadioChange:c},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,y;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"})},[((y=S==null?void 0:S.comp)==null?void 0:y.toUpperCase())!=="TABLE"&&S.name?(e.openBlock(),e.createElementBlock("div",Z1,[G(S)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(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(Jn),onChange:e.unref(Ao),index:(S==null?void 0:S.id)??w,onContentChange:e.unref(zo),onPageChange:e.unref(Mo),parentTableId:S==null?void 0:S.tableId,allMapContents:e.unref(wt),children:S==null?void 0:S.children,level:C.value,onRowClick:z,onRouteUrl:I,onRadioChange:c},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),ev=er._export_sfc(Q1,[["__scopeId","data-v-bafbdd45"]]),av={class:"radio-group-container"},lv=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(a,{emit:l}){const r=a,n=l,t=e.ref(),s=Xn(O.pinia),{selectTab:v}=O.storeToRefs(s);e.watch(()=>r==null?void 0:r.itemData,()=>{t.value=v.value},{immediate:!0,deep:!0});const u=p=>{t.value=p,n("radioChange",t.value)};return(p,m)=>(e.openBlock(),e.createElementBlock("div",av,[e.createVNode(ll.ssRadio,{modelValue:t.value,"onUpdate:modelValue":m[0]||(m[0]=c=>t.value=c),content:r==null?void 0:r.itemData,onChange:u},null,8,["modelValue","content"])]))}}),rv=er._export_sfc(lv,[["__scopeId","data-v-177d64c3"]]),ou=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"}]),nv={TABLE:Bc,FORM:ws,STATICFORM:Ac,TABLEOPERATE:Yh,TABLESTYLE:p2,TABLEEXTEND:h2,TABLEINTERACTION:y2,FORMOPERATE:_s,FOLD:K2,CALCULATOR:Q2,METHODBUTTON:l4,AVATARUPLOAD:rs.ssAvatar,SIGNATURE:rs.ssSignature,FORMTOP:ws,STEP:h4,STEPOPERATE:R2,TIMELINE:k4,TIMELINEOPERATE:U2,FORMTOPOPERATE:_s,SIGNATUREOPERATE:d4,AVATARUPLOADOPERATE:i4,TABS:_4,TABSOPERATE:s6,CHART:w6,CHARTOPERATE:M6,LAYOUT:L6,LAYOUTOPERATE:q6,PARENTITEM:ev,RADIO:rv};function Ti(a){return nv[a==null?void 0:a.toUpperCase()]||null}exports.De=iu;exports.activeStepInfo=Si;exports.addContents=qi;exports.addVisibleDialog=Bt;exports.affixItems=S0;exports.allMapContents=wt;exports.analyzeMenu=rc;exports.cacheNewData=_c;exports.clickMainKey=Cc;exports.clickSavePage=_0;exports.clickStep=Nc;exports.clickTrigger=Ec;exports.compId=Jn;exports.compNames=Sc;exports.compShow=Ni;exports.existLayouts=z0;exports.fixChangeValue=Nt;exports.generateLayouts=s2;exports.getComponent=Ti;exports.getComponents=Wi;exports.getPageConstruct=Jd;exports.getPageData=Kr;exports.getSliceContLength=R0;exports.gridRowHeight=r2;exports.gridRowHeightHmPg=l2;exports.isStepLayout=Tc;exports.onBack=x0;exports.onButtonChange=N0;exports.onChange=Ao;exports.onClick=w0;exports.onClickStep=M0;exports.onContentChange=zo;exports.onExtendTaskEnd=A0;exports.onOk=T0;exports.onPageBack=O0;exports.onPageChange=Mo;exports.onSelectFixContent=k0;exports.renderShowItems=xc;exports.showItems=sr;exports.sliceTableLength=wc;exports.slotContent=ou;exports.ssTable=Bc;exports.st=Oo;exports.stepItems=V0;exports.tabChange=I0;exports.toolBar=B0;exports.useFormComp=Tt;exports.useModelLoader=_f;exports.verifyButton=L0;
|