ss-component-new 1.3.350 → 1.3.352

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/{MTLLoader-7vGXV7sW.js → MTLLoader-DNSomejV.js} +1 -1
  2. package/dist/{MTLLoader-DY3Hl6j-.cjs → MTLLoader-i57osh5b.cjs} +1 -1
  3. package/dist/{OrbitControls-CRBODMmA.js → OrbitControls-BGgkmsGY.js} +1 -1
  4. package/dist/{OrbitControls-hsoE4Hlw.cjs → OrbitControls-DIlIPD3W.cjs} +1 -1
  5. package/dist/{URDFLoader-B1Nc_Dh9.cjs → URDFLoader-CfMpBNNf.cjs} +1 -1
  6. package/dist/{URDFLoader-DPeRX9Cp.js → URDFLoader-vu9hsLDK.js} +2 -2
  7. package/dist/{animationData-CNuxJmpQ.cjs → animationData--_Jgxftr.cjs} +1 -1
  8. package/dist/{animationData-PCweJAcs.js → animationData-DLbblsk6.js} +3 -3
  9. package/dist/{array-DCVTfZOl.js → array-BhCQ70V5.js} +4 -4
  10. package/dist/{array-_DoLK55o.cjs → array-DRz7geMp.cjs} +1 -1
  11. package/dist/{clone-BLQELoZT.js → clone-CeB0J3mT.js} +1 -1
  12. package/dist/clone-cWTYClqD.cjs +1 -0
  13. package/dist/{dayjs.min-CVFsFNkD.js → dayjs.min-DQjPdS-o.js} +1 -1
  14. package/dist/{dayjs.min-BCHkWXhf.cjs → dayjs.min-DxGf9IW4.cjs} +1 -1
  15. package/dist/{iconfont-DzCHVrQU.js → iconfont-B7-uPn-U.js} +2 -2
  16. package/dist/{iconfont-7oIyyAHC.cjs → iconfont-DZ11mQ4k.cjs} +1 -1
  17. package/dist/{index-D-ksaA0U.cjs → index-3IemHI2e.cjs} +1 -1
  18. package/dist/{index-CYMcT3tF.js → index-3y1HRFEG.js} +1 -1
  19. package/dist/{index-CN2pM3sS.js → index-5RtsYQv4.js} +8 -8
  20. package/dist/{index-Cknr7pDi.js → index-7syIBnCV.js} +2 -2
  21. package/dist/index-B1Qux2Li.cjs +25 -0
  22. package/dist/{index-Ck_PsmzJ.js → index-B1lJ5YuZ.js} +9 -9
  23. package/dist/{index-cF5vG_XY.cjs → index-B5Ki9-Cc.cjs} +1 -1
  24. package/dist/{index-CSHQE7Pv.cjs → index-BEARHNUN.cjs} +1 -1
  25. package/dist/{index-BnMaYSsx.js → index-BGa8Ka1a.js} +2 -2
  26. package/dist/{index-hB8oOcC4.cjs → index-BGsFQfDR.cjs} +1 -1
  27. package/dist/{index-BcpWDA7K.cjs → index-BMnLMFMm.cjs} +1 -1
  28. package/dist/{index-4csVCVo1.cjs → index-BOgoQYiv.cjs} +1 -1
  29. package/dist/{index-CUyRmNoF.cjs → index-BOnb8xBn.cjs} +1 -1
  30. package/dist/{index-DczuHp0Y.cjs → index-BZio7Hlb.cjs} +1 -1
  31. package/dist/{index-neZU4YHQ.cjs → index-BeuRXxuN.cjs} +1 -1
  32. package/dist/{index-Ce13_hvK.cjs → index-BhwXqfU4.cjs} +1 -1
  33. package/dist/{index-CUas8YhK.js → index-BmGX-Exn.js} +3 -3
  34. package/dist/{index-B2EVdsBd.cjs → index-BrM7jLJL.cjs} +1 -1
  35. package/dist/{index-BYI3MY7R.cjs → index-C-7bakEI.cjs} +1 -1
  36. package/dist/{index-BIqwOD8-.cjs → index-C5aanpol.cjs} +1 -1
  37. package/dist/{index-BPPX7-U0.cjs → index-C9M3MtHE.cjs} +1 -1
  38. package/dist/{index-MMT4nQRz.js → index-CJnKGBY-.js} +6 -6
  39. package/dist/{index-CSHeXRwi.js → index-CLRvk6NY.js} +8 -8
  40. package/dist/{index-DT9HhVq6.cjs → index-CLauON6B.cjs} +1 -1
  41. package/dist/{index-DRoilgbQ.cjs → index-CPB2ALZC.cjs} +1 -1
  42. package/dist/{index-ChOisoAi.cjs → index-CQ38KA12.cjs} +1 -1
  43. package/dist/{index-VO03oCwK.js → index-CQTqOY0D.js} +1 -1
  44. package/dist/{index-IbSQ7GeZ.js → index-CVZ3qQWW.js} +1 -1
  45. package/dist/{index-BUg_WKKv.cjs → index-CWj0WOBR.cjs} +1 -1
  46. package/dist/{index-Qt5gZVXZ.cjs → index-CjzH1fF4.cjs} +1 -1
  47. package/dist/{index-C8CyUus3.js → index-CkQ8BIUs.js} +2 -2
  48. package/dist/{index-9Vx46Sxc.cjs → index-CvH9Jb4L.cjs} +1 -1
  49. package/dist/{index-DWj6NuH6.js → index-CzHyUDMd.js} +1 -1
  50. package/dist/{index-BhikD67m.js → index-D1hJK-9o.js} +4 -4
  51. package/dist/{index-LlEJq_5n.cjs → index-D3IE7wed.cjs} +1 -1
  52. package/dist/{index-BFOzG2Se.js → index-D8voyHJU.js} +1 -1
  53. package/dist/{index-BpGPIhdP.js → index-DBmKV1jz.js} +4 -4
  54. package/dist/{index-sXJGTe4o.js → index-DN1hUcPz.js} +1 -1
  55. package/dist/{index-LcyKJjLE.js → index-DNZLia-c.js} +4 -4
  56. package/dist/{index-Df-k4R4N.js → index-DPRaizHr.js} +2 -2
  57. package/dist/{index-BtxfLicL.cjs → index-DQNv-wyk.cjs} +1 -1
  58. package/dist/{index-Bx-ShtlQ.js → index-DVPsYqPP.js} +3 -3
  59. package/dist/{index-DQmHQdBz.js → index-DXyDl9_U.js} +4 -4
  60. package/dist/{index-BvJ2ifTU.cjs → index-Dg4DC6K6.cjs} +1 -1
  61. package/dist/{index-B4TKsPrL.cjs → index-DjYbZmMw.cjs} +1 -1
  62. package/dist/{index-D_-mi7mi.js → index-Dno9Jqoj.js} +7181 -7146
  63. package/dist/{index-DbTFVSUQ.js → index-DrpUbCQl.js} +3 -3
  64. package/dist/{index-BgLjLAqb.js → index-Ds7fuxnt.js} +2 -2
  65. package/dist/{index-fE92GR4v.cjs → index-DtWU1yHi.cjs} +1 -1
  66. package/dist/{index-CjGPC4cK.cjs → index-DzniA5Uk.cjs} +1 -1
  67. package/dist/{index-DKNIC1Ms.cjs → index-Iw9M0xR0.cjs} +1 -1
  68. package/dist/{index-DD7VYPqf.js → index-JIjEl9Da.js} +18 -18
  69. package/dist/{index-DxbqlIW9.js → index-YBIN-n5G.js} +2 -2
  70. package/dist/{index-CS90pAAk.js → index-eX3MDwPm.js} +1 -1
  71. package/dist/{index-BXNs8R9m.js → index-ppeAWblu.js} +1 -1
  72. package/dist/{index-DIMq7gAs.js → index-qWuS4sDO.js} +3 -3
  73. package/dist/{index-BvSm2Fx7.cjs → index-qmsVGq6f.cjs} +1 -1
  74. package/dist/{index-BgPH9QSq.js → index-ybUCWSWP.js} +4 -4
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-msS7adTO.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Cjksqppw.js} +1848 -1843
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CN5nXNhz.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DDpPR8Tl.cjs} +62 -62
  77. package/dist/{main-C2cjVG67.js → main-Cz9nKkgC.js} +4 -4
  78. package/dist/{main-BDFYvUH-.cjs → main-h5WURVND.cjs} +1 -1
  79. package/dist/{menu-ChULKpSq.cjs → menu-VIQivToR.cjs} +6 -5
  80. package/dist/{menu-DDxaZsSW.js → menu-nyfb5NCE.js} +494 -582
  81. package/dist/{menuIndex-CyZ_J8rm.cjs → menuIndex-BOqoQK9D.cjs} +1 -1
  82. package/dist/{menuIndex-Dwli781U.js → menuIndex-BUIEopjV.js} +1 -1
  83. package/dist/obj/model.mtl +42 -0
  84. package/dist/obj/model.obj +26110 -0
  85. package/dist/ss-component.cjs +1 -1
  86. package/dist/ss-component.css +2 -2
  87. package/dist/ss-component.js +12 -12
  88. package/dist/ss-component2.cjs +1 -1
  89. package/dist/ss-component2.js +12 -12
  90. package/dist/{threeModel-Cw0iDrQI.js → threeModel-6_7oVDoI.js} +4 -4
  91. package/dist/{threeModel-OuzVc5fQ.cjs → threeModel-Bx8SAdN4.cjs} +1 -1
  92. package/dist/{threePreview-BvA28E6n.js → threePreview-BYs4CSdV.js} +4 -4
  93. package/dist/{threePreview-DZNbcHfD.cjs → threePreview-P-3c4qwi.cjs} +1 -1
  94. package/dist/{threeSceneView-CwYu9lVh.cjs → threeSceneView-CzUytO8X.cjs} +1 -1
  95. package/dist/{threeSceneView-49lN_i23.js → threeSceneView-D7MBn5m5.js} +13 -13
  96. package/dist/{threeSceneViewForCPMPIP-BqZnM1wh.js → threeSceneViewForCPMPIP-CWnh8lPh.js} +8 -8
  97. package/dist/{threeSceneViewForCPMPIP-zIc_W8dZ.cjs → threeSceneViewForCPMPIP-VFsJGOkp.cjs} +1 -1
  98. package/dist/{threeTrackPathView-I7JbRY3m.js → threeTrackPathView-BMxZ7_wn.js} +4 -4
  99. package/dist/{threeTrackPathView-BRMOgSBk.cjs → threeTrackPathView-DtbnFafT.cjs} +1 -1
  100. package/dist/{threeViewerHost-CCbAOQ-F.cjs → threeViewerHost-CwVnYExg.cjs} +1 -1
  101. package/dist/{threeViewerHost-C8iYF2xq.js → threeViewerHost-DrGt3Mcg.js} +3 -3
  102. package/dist/{urdfTree-zTmSS7fi.js → urdfTree-BLn-nNYR.js} +1 -1
  103. package/dist/{urdfTree-LbuYHbdI.cjs → urdfTree-BdUbFFMl.cjs} +1 -1
  104. package/dist/{workpieceTreePanel-DSikZxcZ.js → workpieceTreePanel-Btoejaz0.js} +4 -4
  105. package/dist/{workpieceTreePanel-DmPhEjep.cjs → workpieceTreePanel-C3b06AR6.cjs} +1 -1
  106. package/package.json +1 -1
  107. package/public/obj/model.mtl +42 -0
  108. package/public/obj/model.obj +26110 -0
  109. package/dist/clone-DRuRmztB.cjs +0 -1
  110. package/dist/index-BThCTKji.cjs +0 -25
@@ -0,0 +1,25 @@
1
+ "use strict";var Au=Object.defineProperty;var zu=(l,r,n)=>r in l?Au(l,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[r]=n;var Wr=(l,r,n)=>zu(l,typeof r!="symbol"?r+"":r,n);const a=require("vue"),Ya=require("./request-BC2w2vGr.cjs"),Pn=require("./dayjs.min-DxGf9IW4.cjs"),O=require("./menu-VIQivToR.cjs"),tl=require("./index-BOgoQYiv.cjs"),er=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ze=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DDpPR8Tl.cjs"),_r=require("./index-CUw6nGTo.cjs"),Co=require("./threeViewerHost-CwVnYExg.cjs"),na=require("./index-DtWU1yHi.cjs"),Mu=require("./index-DsNHJYr-.cjs"),Nr=require("./index-CW4qJdP8.cjs"),rs=require("./index-CvH9Jb4L.cjs"),Xs=require("./index-BrM7jLJL.cjs"),Pi=require("./index-W8p89C7t.cjs"),pn=require("./index-CPB2ALZC.cjs");;/* empty css */const Do=require("./isString-DNBlKLZH.cjs"),ns=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Zs=require("./index-BVaHwt5f.cjs"),Iu=require("./index-B5Ki9-Cc.cjs"),Rn=require("./MTLLoader-i57osh5b.cjs"),Ou=require("./URDFLoader-CfMpBNNf.cjs");var Lu="[object Boolean]";function Qs(l){return l===!0||l===!1||Ya.isObjectLike(l)&&Ya.baseGetTag(l)==Lu}function $u(l){return l===void 0}const Ru=l=>l.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(l){const r=l,n=a.ref(null),i=a.ref(!1),s=a.ref(null);return a.watch(()=>r==null?void 0:r.isVisible,()=>{i.value=r==null?void 0:r.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var c,m;(m=(c=n.value)==null?void 0:c.updatePopper)==null||m.call(c)})},{deep:!0,immediate:!0}),(c,m)=>{const p=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(p,{visible:i.value,"onUpdate:visible":m[0]||(m[0]=h=>i.value=h),trigger:r.trigger,title:r==null?void 0:r.title,placement:r==null?void 0:r.placement,width:r==null?void 0:r.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Fu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const r=l,n=a.computed(()=>{const i=String(r.value??"");return i==="已完成"?"task-status-completed":i==="进行中"?"task-status-running":i==="终止"||i==="暂停"?"task-status-stopped":""});return(i,s)=>l.value!==void 0&&l.value!==null?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["task-status-tag",n.value])},a.toDisplayString(l.value===0?"0":l.value),3)):a.createCommentVNode("",!0)}},Pu=er._export_sfc(Fu,[["__scopeId","data-v-d81f59b4"]]);function ju(l,r,n,i={}){if(!l||!r||!n||n.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:c="rgba(255, 235, 59, 0.3)",strokeWidth:m=2,fillOpacity:p=.2}=i,h=l.getBoundingClientRect(),y=r.getBoundingClientRect(),u=r.naturalWidth,x=r.naturalHeight,D=y.width/u,R=y.height/x,E=Math.min(D,R),K=u*E,M=x*E,L=(h.width-K)/2,j=(h.height-M)/2,C=n.map(([S,k])=>{const g=L+S*K,P=j+k*M;return{x:g,y:P}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(C[0].x,C[0].y);for(let S=1;S<C.length;S++)s.lineTo(C[S].x,C[S].y);s.closePath();const _=c.replace(/[\d.]+\)$/,`${p})`);s.fillStyle=_,s.fill(),s.strokeStyle=c.replace(/[\d.]+\)$/,"1)"),s.lineWidth=m,s.stroke()}function wi(l){if(!l)return;const r=l.getContext("2d");r&&r.clearRect(0,0,l.width,l.height)}function is(l,r){if(!l||!r)return null;const n=l[r];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.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=a.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(l,{emit:r}){const n=l,i=r,s=a.computed({get:()=>n.visible,set:T=>i("update:visible",T)});let c=!1,m="",p=0,h=0,y=0,u=0,x=0,D=0,R=null;const E=T=>{var ne,Ne;const q=(Ne=(ne=T==null?void 0:T.target)==null?void 0:ne.closest)==null?void 0:Ne.call(ne,".ocr-img-preview-window");return q||document.querySelector(".ocr-img-preview-window")},K=T=>{if(!T||T==="none")return{tx:0,ty:0};let q=T.match(/matrix\(([^)]+)\)/);if(q){const ne=q[1].split(",").map(Ne=>Number(Ne.trim()));return{tx:(ne==null?void 0:ne[4])||0,ty:(ne==null?void 0:ne[5])||0}}if(q=T.match(/matrix3d\(([^)]+)\)/),q){const ne=q[1].split(",").map(Ne=>Number(Ne.trim()));return{tx:(ne==null?void 0:ne[12])||0,ty:(ne==null?void 0:ne[13])||0}}return q=T.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),q?{tx:Number(q[1])||0,ty:Number(q[2])||0}:{tx:0,ty:0}},M=(T,q,ne)=>{T.style.transform=`translate(${q}px, ${ne}px)`},L=T=>{const q=E(T);if(!q)return;c=!0,R=q,m="move",p=T.clientX,h=T.clientY;const ne=window.getComputedStyle(q),{tx:Ne,ty:we}=K(ne.transform);x=Ne,D=we,document.addEventListener("mousemove",C),document.addEventListener("mouseup",_)},j=(T,q)=>{const ne=E(T);if(!ne)return;c=!0,R=ne,m=q,p=T.clientX,h=T.clientY;const Ne=ne.getBoundingClientRect();y=Ne.width,u=Ne.height;const we=window.getComputedStyle(ne),{tx:Ke,ty:ua}=K(we.transform);x=Ke,D=ua,document.addEventListener("mousemove",C),document.addEventListener("mouseup",_)},C=T=>{if(!c||!R)return;const q=T.clientX-p,ne=T.clientY-h,Ne=360,we=420;let Ke=y,ua=u,za=x,le=D;if(m==="move"){za=x+q,le=D+ne,M(R,za,le);return}if(m.includes("right")&&(Ke=Math.max(Ne,y+q)),m.includes("bottom")&&(ua=Math.max(we,u+ne)),m.includes("left")){const Te=y-q;Te<Ne?(Ke=Ne,za=x+(y-Ne)):(Ke=Te,za=x+q)}if(m.includes("top")){const Te=u-ne;Te<we?(ua=we,le=D+(u-we)):(ua=Te,le=D+ne)}R.style.width=`${Ke}px`,R.style.height=`${ua}px`,M(R,za,le)},_=()=>{c=!1,m="",R=null,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)},S=a.ref([]),k=a.ref(!1);a.watch(()=>n.images,async T=>{if(!Array.isArray(T)||T.length===0){S.value=[];return}k.value=!0;const q=[];for(const ne of T)if(ne.url&&!ne.url.startsWith("blob:")&&!ne.url.startsWith("http"))try{const Ne=await Ze.downloadFile(ne.url),we=URL.createObjectURL(Ne);q.push({...ne,blobUrl:we})}catch(Ne){console.error(`Failed to load image for preview: ${ne.url}`,Ne),q.push({...ne,blobUrl:""})}else q.push({...ne,blobUrl:ne.url});S.value=q,k.value=!1},{deep:!0,immediate:!0});const g=a.ref(0),P=a.ref(null),$=a.ref(null),Y=a.computed(()=>S.value[g.value]||null),pe=()=>{if(!S.value.length){g.value=0;return}if(n.defaultImageName){const T=S.value.findIndex(q=>(q==null?void 0:q.name)===n.defaultImageName);g.value=T>=0?T:0}else g.value=0},ze=T=>{if(!S.value.length)return;const q=Math.max(0,Math.min(T,S.value.length-1));g.value=q},de=()=>ze(g.value-1),Z=()=>ze(g.value+1),he=T=>{if(!T)return;const q=S.value.findIndex(ne=>(ne==null?void 0:ne.name)===T);q>=0&&(g.value=q)},ae=()=>{if(!$.value)return;const T=$.value.parentElement;if(!T)return;const q=T.getBoundingClientRect();$.value.width=q.width,$.value.height=q.height},ue=()=>{var Ne,we;if(!$.value||!P.value||!n.focusedFieldName){$.value&&wi($.value);return}const T=(Ne=P.value.$el)==null?void 0:Ne.querySelector("img");if(!T)return;if(!T.complete||T.naturalWidth===0){T.onload=()=>{a.nextTick(()=>{ue()})};return}const q=((we=Y.value)==null?void 0:we.name)||"",ne=is(n.fieldMeta,n.focusedFieldName);if(!ne){wi($.value);return}if(ne.imageName!==q){wi($.value);return}ae(),ju($.value,T,ne.bboxNorm)},Se=()=>{a.nextTick(()=>{ae(),ue()})};a.watch(()=>n.focusedFieldName,()=>{if(!s.value)return;const T=is(n.fieldMeta,n.focusedFieldName);T!=null&&T.imageName&&he(T.imageName),a.nextTick(()=>{ue()})}),a.watch(()=>{var T;return(T=Y.value)==null?void 0:T.name},()=>{s.value&&a.nextTick(()=>{$.value&&wi($.value),ue()})}),a.watch(()=>n.visible,T=>{T?(pe(),a.nextTick(()=>{ae(),ue()})):$.value&&wi($.value)}),a.watch(()=>n.defaultImageName,()=>{s.value&&pe()});let Ve=null;a.onMounted(()=>{var T;typeof ResizeObserver<"u"&&(Ve=new ResizeObserver(()=>{ae(),a.nextTick(()=>{ue()})}),(T=$.value)!=null&&T.parentElement&&Ve.observe($.value.parentElement))}),a.onUnmounted(()=>{Ve&&(Ve.disconnect(),Ve=null),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)});const ge=()=>{$.value&&wi($.value),i("update:visible",!1),i("close")};return(T,q)=>{var ua,za;const ne=a.resolveComponent("el-button"),Ne=a.resolveComponent("el-image"),we=a.resolveComponent("Loading"),Ke=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",Hu,[q[12]||(q[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Uu,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(L,["stop"])},[q[8]||(q[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:ge},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:q[0]||(q[0]=a.withModifiers(le=>j(le,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:q[1]||(q[1]=a.withModifiers(le=>j(le,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:q[2]||(q[2]=a.withModifiers(le=>j(le,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:q[3]||(q[3]=a.withModifiers(le=>j(le,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:q[4]||(q[4]=a.withModifiers(le=>j(le,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:q[5]||(q[5]=a.withModifiers(le=>j(le,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:q[6]||(q[6]=a.withModifiers(le=>j(le,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:q[7]||(q[7]=a.withModifiers(le=>j(le,"bottom-right"),["stop"]))},null,32),Y.value?(a.openBlock(),a.createElementBlock("div",qu,[a.createElementVNode("div",Wu,[a.createElementVNode("div",Ku,[a.createElementVNode("span",Gu,a.toDisplayString(Y.value.name?Y.value.name+(Y.value.url&&Y.value.url.lastIndexOf(".")!==-1?Y.value.url.substring(Y.value.url.lastIndexOf(".")):""):""),1)]),S.value.length>1?(a.openBlock(),a.createElementBlock("div",Yu,[a.createVNode(ne,{size:"small",disabled:g.value===0,onClick:de},{default:a.withCtx(()=>q[9]||(q[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Ju,a.toDisplayString(g.value+1)+" / "+a.toDisplayString(S.value.length),1),a.createVNode(ne,{size:"small",disabled:g.value===S.value.length-1,onClick:Z},{default:a.withCtx(()=>q[10]||(q[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),S.value.length>1?(a.openBlock(),a.createElementBlock("div",Xu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S.value,(le,Te)=>(a.openBlock(),a.createElementBlock("div",{key:(le.name||"")+"-"+Te,class:a.normalizeClass(["img-thumb-item",{active:Te===g.value}]),onClick:Me=>ze(Te)},[le!=null&&le.blobUrl?(a.openBlock(),a.createBlock(Ne,{key:0,src:le.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[le.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Qu,"加载失败")),a.createElementVNode("div",ed,a.toDisplayString(le.name||"-"),1)],10,Zu))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",ad,[k.value?(a.openBlock(),a.createElementBlock("div",ld,[a.createVNode(Ke,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(we)]),_:1}),q[11]||(q[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(ua=Y.value)!=null&&ua.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(Ne,{ref_key:"imageRef",ref:P,src:Y.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[Y.value.blobUrl],onLoad:Se},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:$,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",rd,[(za=Y.value)!=null&&za.url?(a.openBlock(),a.createElementBlock("span",nd,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",id,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",od,"暂无图片"))])])):a.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=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(""),c=a.ref(""),m=a.computed(()=>(n.versions||[]).find(E=>String(E.versionId)===String(s.value))),p=a.ref({}),h=a.ref(""),y=a.ref("证书附件.pdf"),u=()=>{try{Object.values(p.value||{}).forEach(E=>{E&&URL.revokeObjectURL(E)}),h.value&&URL.revokeObjectURL(h.value)}catch{}p.value={},h.value=""},x=async E=>{if(!E||E.fileType==="pdf")return;const K=Array.isArray(E.images)?E.images:[];for(const M of K){const L=M==null?void 0:M.url;if(!(!L||p.value[L]))try{const j=await O.platformDownloadFile({url:L}),C=URL.createObjectURL(j.data);p.value={...p.value,[L]:C}}catch{}}},D=async E=>{var M;if(!E||E.fileType!=="pdf"){h.value="";return}const K=E.sourceUrl||"";if(!K){h.value="";return}if(h.value){try{URL.revokeObjectURL(h.value)}catch{}h.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:K,versionId:E==null?void 0:E.versionId,certNo:E==null?void 0:E.certNo});const L=await O.platformDownloadFile({url:K});console.log("[CertificatePreview] PDF响应:",{url:K,status:L==null?void 0:L.status,size:(M=L==null?void 0:L.data)==null?void 0:M.size});const j=URL.createObjectURL(L.data);h.value=j;const C=E.certNo?String(E.certNo):"";y.value=C?`${C}.pdf`:"证书附件.pdf"}catch(L){console.error("[CertificatePreview] PDF加载失败:",{url:K,error:L}),h.value=""}};a.watch(()=>n.visible,async E=>{var M;if(!E){u();return}const K=(M=n.versions)==null?void 0:M[0];s.value=(K==null?void 0:K.versionId)||"",await x(K),await D(K)},{immediate:!0}),a.watch(()=>s.value,async()=>{var K,M;const E=m.value;if(!E){c.value="",h.value="";return}if(E.fileType==="pdf"){c.value="",await D(E);return}h.value="",c.value=((M=(K=E.images)==null?void 0:K[0])==null?void 0:M.url)||"",await x(E)},{immediate:!0});const R=()=>{i("update:visible",!1),u()};return a.onBeforeUnmount(()=>{u()}),(E,K)=>{const M=a.resolveComponent("el-empty"),L=a.resolveComponent("el-tab-pane"),j=a.resolveComponent("el-tabs"),C=a.resolveComponent("el-button"),_=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(_,{"model-value":E.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:R},{footer:a.withCtx(()=>[a.createVNode(C,{id:"themeBorderButton",onClick:R},{default:a.withCtx(()=>K[1]||(K[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[E.versions&&E.versions.length>0?(a.openBlock(),a.createBlock(j,{key:0,modelValue:s.value,"onUpdate:modelValue":K[0]||(K[0]=S=>s.value=S),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.versions,S=>(a.openBlock(),a.createBlock(L,{key:S.versionId,name:S.versionId,label:S.label},{default:a.withCtx(()=>[a.createElementVNode("div",cd,[S.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",ud,[h.value?(a.openBlock(),a.createBlock(tl.SsFilePreview,{key:1,fileName:y.value,blobUrl:h.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(M,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",dd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S.images||[],k=>(a.openBlock(),a.createElementBlock("div",{key:k.url,class:a.normalizeClass(["thumb",{active:k.url===c.value}]),onClick:g=>c.value=k.url},[a.createElementVNode("div",fd,[p.value[k.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:p.value[k.url]},null,8,hd)):(a.openBlock(),a.createElementBlock("div",vd,"加载中"))]),a.createElementVNode("div",md,a.toDisplayString(k.name),1)],10,pd))),128))]),a.createElementVNode("div",yd,[c.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[p.value[c.value]?(a.openBlock(),a.createElementBlock("div",gd,[a.createElementVNode("img",{class:"viewer-img",src:p.value[c.value]},null,8,bd)])):(a.openBlock(),a.createElementBlock("div",kd,"加载中"))],64)):(a.openBlock(),a.createBlock(M,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(M,{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(l,{emit:r}){const n=(g=[])=>{const P=[],$=Y=>{(Y||[]).forEach(pe=>{if(!pe)return;const ze=pe.children||pe.childrens||pe.columns;Array.isArray(ze)&&ze.length>0?$(ze):P.push(pe)})};return $(g),P},i=l,s=r,c=a.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowAdd)!==!1}),m=a.computed(()=>{var g;return((g=D.value)==null?void 0:g.allowReplace)!==!1}),p=g=>{if(!g)return[];if(Array.isArray(g))return g;if(typeof g=="string")try{const P=JSON.parse(g);return Array.isArray(P)?P:[]}catch{return[]}return[]},h=g=>{s("preview-file",g)},y=a.ref([]),u=a.ref(0),x=a.ref("");a.watch(()=>i.candidates,g=>{var P,$;y.value=(g||[]).map(Y=>({...Y,...(Y==null?void 0:Y.ocrRow)||{},selectedTargetId:(Y==null?void 0:Y.selectedTargetId)||"",__decision:Y==null?void 0:Y.__decision})),u.value=0,x.value=(($=(P=y.value)==null?void 0:P[0])==null?void 0:$.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>i.visible,g=>{var P,$;g&&(u.value=0,x.value=(($=(P=y.value)==null?void 0:P[0])==null?void 0:$.selectedTargetId)||"")});const D=a.computed(()=>{var P;const g=Number(u.value||0);return((P=y.value||[])==null?void 0:P[g])||null}),R=a.computed(()=>(n(i.columns||[])||[]).filter($=>$&&$.prop).filter($=>$.type!=="operate"&&$.label!=="操作"&&$.prop!=="operate")),E=a.computed(()=>R.value.filter(g=>g.label!=="证书附件"&&g.prop!=="证书附件")),K=g=>{if(!g)return;const P=(y.value||[]).findIndex($=>($==null?void 0:$.idx)===(g==null?void 0:g.idx));P>-1&&(u.value=P,x.value=(g==null?void 0:g.selectedTargetId)||"")},M=g=>{if(!g){x.value="";return}x.value=String((g==null?void 0:g.id)??"")},L=(g,P="")=>{const $=Number(u.value||0),Y=y.value||[],pe=Y[$];pe&&(pe.__decision=g,pe.selectedTargetId=P,x.value=P,y.value=[...Y])},j=()=>L("skip",""),C=()=>L("add",""),_=()=>{if(!x.value){Ya.ElMessage.warning("请先选择要替换的目标记录");return}L("replace",x.value)},S=()=>{s("update:visible",!1)},k=()=>{const g=y.value||[];if(g.find($=>($==null?void 0:$.__decision)==="replace"&&!($!=null&&$.selectedTargetId))){Ya.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",g),s("update:visible",!1)};return(g,P)=>{const $=a.resolveComponent("el-table-column"),Y=a.resolveComponent("svg-icon"),pe=a.resolveComponent("el-table"),ze=a.resolveComponent("el-button"),de=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(_r.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:S},{default:a.withCtx(()=>{var Z,he;return[a.createElementVNode("div",_d,[a.createElementVNode("div",Sd,[P[0]||(P[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(pe,{data:y.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:K},{default:a.withCtx(()=>[a.createVNode($,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.value,ae=>(a.openBlock(),a.createBlock($,{key:ae.prop,label:ae.label,prop:ae.prop,"min-width":ae.minWidth||160},{default:a.withCtx(({row:ue})=>[ae.label==="证书附件"||ae.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[p(ue==null?void 0:ue[ae.prop]).length>0?(a.openBlock(),a.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Se=>h({row:ue,prop:ae.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",Ed,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((ue==null?void 0:ue[ae.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode($,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:ae})=>[a.createTextVNode(a.toDisplayString(((ae==null?void 0:ae.candidates)||[]).length),1)]),_:1}),a.createVNode($,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:ae})=>[(ae==null?void 0:ae.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",Cd,"替换")):(ae==null?void 0:ae.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",Dd,"新增")):(ae==null?void 0:ae.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",Nd,"跳过")):(a.openBlock(),a.createElementBlock("span",Td,"未处理"))]),_:1})]),_:1},8,["data"])]),y.value&&y.value.length>0?(a.openBlock(),a.createElementBlock("div",Bd,[P[4]||(P[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",Ad,[a.createVNode(ze,{id:"themeBorderButton",onClick:j},{default:a.withCtx(()=>P[1]||(P[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(ze,{id:"themeBorderButton",onClick:C,disabled:!c.value},{default:a.withCtx(()=>P[2]||(P[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:_,disabled:!m.value||!x.value},{default:a.withCtx(()=>P[3]||(P[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((Z=D.value)==null?void 0:Z.candidates)||[]).length===0?(a.openBlock(),a.createBlock(de,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(pe,{data:((he=D.value)==null?void 0:he.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:M,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode($,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(R.value,ae=>(a.openBlock(),a.createBlock($,{key:ae.prop,label:ae.label,prop:ae.prop,"min-width":ae.minWidth||160},{default:a.withCtx(({row:ue})=>[ae.label==="证书附件"||ae.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[p(ue==null?void 0:ue[ae.prop]).length>0?(a.openBlock(),a.createBlock(Y,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Se=>h({row:ue,prop:ae.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",zd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((ue==null?void 0:ue[ae.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",Md,[a.createVNode(ze,{id:"themeBorderButton",onClick:S},{default:a.withCtx(()=>P[5]||(P[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:k},{default:a.withCtx(()=>P[6]||(P[6]=[a.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(l,{emit:r}){const n=l,i=r,s=a.ref([]),c=a.ref([]),m=a.ref([]);a.watch(()=>n.visible,R=>{R&&(s.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),c.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),m.value=[...n.ocrSelectedFields])});const p=(R,E)=>{const K=[...m.value];if(E)K.includes(R)||K.push(R);else{const M=K.indexOf(R);M>-1&&K.splice(M,1)}m.value=K,i("update:ocrSelectedFields",K)},h=(R,E,K)=>{i("fieldChange",{rowIndex:R,prop:E,value:K})},y=()=>{i("update:ocrPreviewData",s.value),i("confirm",s.value),i("update:visible",!1)},u=()=>{i("update:visible",!1)},x=R=>typeof R!="number"?"-":`${(R*100).toFixed(1)}%`,D=R=>typeof R!="number"?"#606266":R>=.9?"#67c23a":R>=.7?"#e6a23c":"#f56c6c";return(R,E)=>{const K=a.resolveComponent("el-alert"),M=a.resolveComponent("el-table-column"),L=a.resolveComponent("el-checkbox"),j=a.resolveComponent("el-input"),C=a.resolveComponent("el-table"),_=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(_r.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:u,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",Ld,[a.createElementVNode("div",$d,[a.createVNode(K,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",Rd,[a.createVNode(C,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(M,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,S=>(a.openBlock(),a.createBlock(M,{key:S.prop,prop:S.prop,"min-width":S.minWidth||230,"class-name":S.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",Vd,[S.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(L,{key:0,"model-value":m.value.includes(S.prop),onChange:k=>p(S.prop,k),onClick:E[0]||(E[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(S.label),1)])]),default:a.withCtx(({row:k,$index:g})=>[S.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:D(k[S.prop]),fontWeight:500})},a.toDisplayString(x(k[S.prop])),5)):(a.openBlock(),a.createBlock(j,{key:1,modelValue:k[S.prop],"onUpdate:modelValue":P=>k[S.prop]=P,size:"small",placeholder:"请输入"+S.label,onChange:P=>h(g,S.prop,P)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Fd,[a.createVNode(_,{onClick:u,id:"themeBorderButton"},{default:a.withCtx(()=>E[1]||(E[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode(_,{class:"ok-button",onClick:y,id:"themeButton"},{default:a.withCtx(()=>E[2]||(E[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},jd=er._export_sfc(Pd,[["__scopeId","data-v-df66eb1f"]]),No=l=>{var i;let r=l;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let n=(i=Ze.analyzeSplitToContent(r,","))==null?void 0:i.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),dn(s)));return n=n==null?void 0:n.join(","),n};function ec(l){return Ya.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",l)}function Hd(l){return Ya.axios.get(l,{responseType:"blob"})}let Yl="$R",Ud="http://222.92.178.198:55002/AIRobot",ut=["Form","BarChart","FormText","FormBlock"];const ac=l=>{var n,i;let r=(i=Ze.analyzeSplitToContent(l,"@"))==null?void 0:i[((n=Ze.analyzeSplitToContent(l,"@"))==null?void 0:n.length)-1];return!!(ut!=null&&ut.some(s=>r==null?void 0:r.includes(s)))},qd=async(l,r,n,i)=>{var c,m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le;let s=l;if(ac(s==null?void 0:s[0])){let Te=Zd(s),Me=(c=Te==null?void 0:Te.filter)==null?void 0:c.join(","),Ue=[];(m=Te==null?void 0:Te.hideContents)==null||m.forEach(oe=>{if(oe){const Ie=oe;Ie&&Ue.push(`@Interface(Hide=Yes, prop=${Ie})`)}});let Re=(i==null?void 0:i.menuFilter)??[];return Array.isArray(Re)||(Re=Re?[Re]:[]),Re=[...Re,...Ue],{key:"Form",name:Te==null?void 0:Te.groupName,value:Te==null?void 0:Te.formContents,contents:Array.isArray((p=Te==null?void 0:Te.contents)==null?void 0:p[0])&&((y=(h=Te==null?void 0:Te.contents)==null?void 0:h[0])!=null&&y.every(oe=>Array.isArray(oe)))?[(x=(u=Te==null?void 0:Te.contents)==null?void 0:u[0])==null?void 0:x[n]]:[Te==null?void 0:Te.contents],filter:"("+Me+")",menuFilter:Re,groupFilter:Te==null?void 0:Te.groupFilters}}else if(((D=s==null?void 0:s[0])==null?void 0:D[0])!=="&"){let Te=nc(s,i),Me="";(R=Te==null?void 0:Te.tableFilter)!=null&&R.includes(Yl)?Te.tableFilter=(E=Te==null?void 0:Te.tableFilter)==null?void 0:E.replace(Yl,""):Me=(L=(M=(K=Te==null?void 0:Te.tableFilter)==null?void 0:K.replace("(",Yl))==null?void 0:M.split(Yl))==null?void 0:L[0];let Ue=[];Te!=null&&Te.tableFilter&&((j=Ze.analyzeSplitToContent(Te==null?void 0:Te.tableFilter,","))==null||j.forEach(oe=>{oe!=null&&oe.includes("@InterfaceHide=Yes")&&Ue.push("@InterfaceHide=Yes")}));let Re=(i==null?void 0:i.menuFilter)??[];return Array.isArray(Re)||(Re=Re?[Re]:[]),Re=[...Re,...Ue],{key:"Table",name:Te==null?void 0:Te.groupName,tableColumns:Te==null?void 0:Te.tableColumns,assistColumn:Te==null?void 0:Te.columns,tableContents:r===1?Te==null?void 0:Te.tableContents:(_=(C=Te==null?void 0:Te.tableContents)==null?void 0:C[n])!=null&&_.every(oe=>Array.isArray(oe))?(S=Te==null?void 0:Te.tableContents)==null?void 0:S[n]:[(k=Te==null?void 0:Te.tableContents)==null?void 0:k[n]],filter:Te==null?void 0:Te.tableFilter,menuFilter:Re,quotePage:Me!==""?(($=(P=(g=Me==null?void 0:Me.replace("*",Yl))==null?void 0:g.split(Yl))==null?void 0:P[0])==null?void 0:$.replaceAll(":","/"))??"":void 0,quoteGroup:Me!==""?((ae=(he=(Z=(de=(ze=(pe=(Y=Me==null?void 0:Me.replace("*",Yl))==null?void 0:Y.split(Yl))==null?void 0:pe[1])==null?void 0:ze.replace("{",Yl))==null?void 0:de.split(Yl))==null?void 0:Z[0])==null?void 0:he.split(":"))==null?void 0:ae.filter(oe=>oe!==""))??[]:[],relatedQuotes:Te==null?void 0:Te.relatedQuotes,fatherSyncContents:Te==null?void 0:Te.fatherSyncContents,sonSyncContents:Te==null?void 0:Te.sonSyncContents}}else{let Te=[{label:"序号",prop:"sort"},{label:"函数名称",prop:"函数名称"},{label:"函数关联名",prop:"函数关联名"},{label:"函数参数",prop:"函数参数"},{label:"输出值",prop:"输出值"},{label:"导入文件",prop:"导入文件",formType:"Upload"}],Me=s==null?void 0:s[0];Me=Me==null?void 0:Me.slice(1,Me==null?void 0:Me.length),Me=Ze.analyzeSplitToContent(Me,":"),Me=Me==null?void 0:Me[(Me==null?void 0:Me.length)-1];let Ue=[];Ue.push("1");let Re=Me==null?void 0:Me.replace("(",Yl);Re=(ue=Re==null?void 0:Re.split(Yl))==null?void 0:ue[0],Ue.push(Re);let oe=Me==null?void 0:Me.replace("(",Yl);if(oe=(Se=oe==null?void 0:oe.split(Yl))==null?void 0:Se[1],oe=(ge=(Ve=oe==null?void 0:oe.replace(")",Yl))==null?void 0:Ve.split(Yl))==null?void 0:ge[0],(q=(T=oe==null?void 0:oe.replace(",",Yl))==null?void 0:T.split(Yl))==null||q.forEach(Ie=>{Ue.push(Ie)}),Ue.push(""),Ue.push(""),(ne=Ue==null?void 0:Ue[2])!=null&&ne.includes(".xlsx")||(Ne=Ue==null?void 0:Ue[2])!=null&&Ne.includes(".xls"))try{let Ie=Ud+"/"+(Ue==null?void 0:Ue[2]),He=await Hd(Ie),Ba=`生成js函数名称为${Ue==null?void 0:Ue[1]}的函数,规则为:`+(Ue==null?void 0:Ue[3])+"。根据上述描述获取对应的总结性详细可运行js函数,不需要任何注释。";if((He==null?void 0:He.status)===200){let Oa=He==null?void 0:He.data;const V=new FormData;V.append("file",Oa,Ue==null?void 0:Ue[2]),V.append("query",Ba);let H=await ec(V);H=(ua=(Ke=(we=H==null?void 0:H.data)==null?void 0:we.data)==null?void 0:Ke.response)==null?void 0:ua.replace("generateResult",Ue==null?void 0:Ue[1]),Ue[Ue.length-2]=H,Ue[Ue.length-1]=[{name:(le=(za=Ue==null?void 0:Ue[2])==null?void 0:za.split("."))==null?void 0:le[0],url:Ie}]}}catch{}return Ue=[Ue],{key:"Method",name:[],tableContents:Ue,tableColumns:Te}}},Wd=(l,r)=>{var i,s,c,m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re;let n=(s=(i=Ze.analyzeSplitToContent(l,"="))==null?void 0:i.filter(oe=>oe!=="="))==null?void 0:s.map(oe=>((oe==null?void 0:oe[(oe==null?void 0:oe.length)-1])==="="&&(oe=oe==null?void 0:oe.slice(0,(oe==null?void 0:oe.length)-1)),oe));if(ac(n==null?void 0:n[1])){let oe=Xd(n),Ie=(p=(m=(c=oe==null?void 0:oe.filter)==null?void 0:c.replace("@",Yl))==null?void 0:m.split(Yl))==null?void 0:p[0],He=(u=(y=(h=oe==null?void 0:oe.filter)==null?void 0:h.replace("(",Yl))==null?void 0:y.split(Yl))==null?void 0:u[1],Ba=(R=(D=(x=oe==null?void 0:oe.filter)==null?void 0:x.replace("(",Yl))==null?void 0:D.split(Yl))==null?void 0:R[0];Ba="@"+((E=Ba==null?void 0:Ba.split("@"))==null?void 0:E[1]),He=He==null?void 0:He.slice(0,(He==null?void 0:He.length)-1),He=(M=(K=Ze.analyzeSplitToContent(He,","))==null?void 0:K.map(V=>(V=Ba+V,V)))==null?void 0:M.join("");let Oa=Ie+"("+He+")";return{key:"Form",name:oe==null?void 0:oe.group,filter:Oa,formPage:((C=(j=(L=Ie==null?void 0:Ie.replace("*",Yl))==null?void 0:L.split(Yl))==null?void 0:j[0])==null?void 0:C.replaceAll(":","/"))??"",formGroup:((Y=($=(P=(g=(k=(S=(_=Ie==null?void 0:Ie.replace("*",Yl))==null?void 0:_.split(Yl))==null?void 0:S[1])==null?void 0:k.replace("{",Yl))==null?void 0:g.split(Yl))==null?void 0:P[0])==null?void 0:$.split(":"))==null?void 0:Y.filter(V=>V!==""))??[],value:[],menuFilter:r==null?void 0:r.menuFilter}}else{let oe=nc(n,r,n==null?void 0:n[1]),Ie="";(pe=oe==null?void 0:oe.tableFilter)!=null&&pe.includes(Yl)?oe.tableFilter=(ze=oe==null?void 0:oe.tableFilter)==null?void 0:ze.replace(Yl,""):Ie=(he=(Z=(de=oe==null?void 0:oe.tableFilter)==null?void 0:de.replace("(",Yl))==null?void 0:Z.split(Yl))==null?void 0:he[0];let He=(Se=(ue=(ae=oe==null?void 0:oe.tableFilter)==null?void 0:ae.replace("(",Yl))==null?void 0:ue.split(Yl))==null?void 0:Se[0];He=[{menus:(ge=(Ve=He==null?void 0:He.split("*"))==null?void 0:Ve[0])==null?void 0:ge.replaceAll(":","/"),groups:((q=(T=He==null?void 0:He.split("*"))==null?void 0:T[1])==null?void 0:q.split(":"))??[]}];let Ba=(we=(Ne=(ne=oe==null?void 0:oe.tableFilter)==null?void 0:ne.replace("(",Yl))==null?void 0:Ne.split(Yl))==null?void 0:we[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 Oa=[];oe!=null&&oe.tableFilter&&((Ke=Ze.analyzeSplitToContent(oe==null?void 0:oe.tableFilter,","))==null||Ke.forEach(H=>{H!=null&&H.includes("@InterfaceHide=Yes")&&Oa.push("@InterfaceHide=Yes")}));let V=(r==null?void 0:r.menuFilter)??[];return Array.isArray(V)||(V=V?[V]:[]),V=[...V,...Oa],{key:"Table",name:oe==null?void 0:oe.groupName,filter:oe==null?void 0:oe.tableFilter,tableColumns:oe==null?void 0:oe.tableColumns,quotePage:Ie!==""?((le=(za=(ua=Ie==null?void 0:Ie.replace("*",Yl))==null?void 0:ua.split(Yl))==null?void 0:za[0])==null?void 0:le.replaceAll(":","/"))??"":void 0,quoteGroup:Ie!==""?((Re=(Ue=(Me=(Te=Ie==null?void 0:Ie.replace("*",Yl))==null?void 0:Te.split(Yl))==null?void 0:Me[1])==null?void 0:Ue.split(":"))==null?void 0:Re.filter(H=>H!==""))??[]:[],menuFilter:V,relatedQuotes:He,fatherSyncContents:(oe==null?void 0:oe.fatherSyncContents)??[],sonSyncContents:(oe==null?void 0:oe.sonSyncContents)??[]}}},Kd=async(l,r)=>{let n=[],i=r==null?void 0:r.length;return r=r==null?void 0:r.map(async(s,c)=>{let m=[];s=s==null?void 0:s.map(async p=>{var h,y;if(m.push(p),((h=Ze.analyzeSplitToContent(l,"="))==null?void 0:h.length)<=2){if(((y=Ze.analyzeSplitToContent(l,"="))==null?void 0:y.length)!==0){const u=await qd(Ze.analyzeSplitToContent(l,"="),i,c,p);m.push(u)}}else m.push(Wd(l,p))}),await Promise.all(s),n.push(m)}),await Promise.all(r),n};let Vi="/",Gd="$",vn="$R";const lc=l=>{var n,i,s;let r="";if((l==null?void 0:l.length)>1){let c=l==null?void 0:l.filter((m,p)=>p!==0);c=c==null?void 0:c.join(""),c=Ze.analyzerSplitToWord(c,")"),(c==null?void 0:c.length)!==1?(c==null?void 0:c[(c==null?void 0:c.length)-1])===")"?c=c==null?void 0:c.join(""):c=(n=c==null?void 0:c.filter((m,p)=>p!==(c==null?void 0:c.length)-1))==null?void 0:n.join(""):c=c==null?void 0:c[0],r="("+c,((s=l==null?void 0:l[0])==null?void 0:s[((i=l==null?void 0:l[0])==null?void 0:i.length)-2])==="@"&&(r="@"+r)}return{filter:r}},rc=(l,r=[])=>{let n=(l==null?void 0:l.map(c=>{var m,p;return(p=c==null?void 0:c.key)==null?void 0:p.slice(1,(m=c==null?void 0:c.key)==null?void 0:m.length)}))??[],i=[];n==null||n.forEach(c=>{var m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze;if(c===""&&(c="算法库:通用算法"),c!=null&&c.includes(Gd)){let de="",Z=!0,he=Ze.analyzerSplitToWord(c,"(");(he==null?void 0:he.length)>1&&(de="("+((m=Ze.analyzerSplitToWord(he==null?void 0:he[1],")"))==null?void 0:m[0]),((h=he==null?void 0:he[0])==null?void 0:h[((p=he==null?void 0:he[0])==null?void 0:p.length)-2])==="@"&&(de="@"+de));let ae=c;ae=ae==null?void 0:ae.replace(de,""),de=dn(de),de=(y=Ze.analyzeSplitToContent(de,","))==null?void 0:y.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)),de!=null&&de.includes("@ShowHide=Hide")&&(Z=!1);let ue=(u=ae==null?void 0:ae.replace("$",vn))==null?void 0:u.split(vn),Se=ue==null?void 0:ue[1],Ve=ue==null?void 0:ue[0];Ve!=null&&Ve.includes("[")&&(Ve=(D=(x=Ve==null?void 0:Ve.replace("[",vn))==null?void 0:x.split(vn))==null?void 0:D[0],Se=Se+":["+((K=(E=(R=ue==null?void 0:ue[0])==null?void 0:R.replace("[",vn))==null?void 0:E.split(vn))==null?void 0:K[1])),Ve=(L=(M=Ve==null?void 0:Ve.replaceAll(":","/"))==null?void 0:M.replaceAll("{",""))==null?void 0:L.replaceAll("}",""),(Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])!=="/"&&(Ve=Ve+"/"),Se=((j=Ve==null?void 0:Ve.split("/"))==null?void 0:j[0])+":"+Se;let T="";if(!(Se!=null&&Se.includes("[")))T=Se==null?void 0:Se.replaceAll(":","/"),i==null||i.push({path:T,isShow:Z,filter:de,fatherPath:Ve});else{let q=(_=(C=Se==null?void 0:Se.replace("[",vn))==null?void 0:C.split(vn))==null?void 0:_[1];q=q==null?void 0:q.slice(0,(q==null?void 0:q.length)-1),q=(S=Ze.analyzeSplitToContent(q,","))==null?void 0:S.map(ne=>((ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])===","&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),ne)),q==null||q.forEach(ne=>{var Ne,we;T=((we=(Ne=Se==null?void 0:Se.replace("[",vn))==null?void 0:Ne.split(vn))==null?void 0:we[0])+ne,T=T==null?void 0:T.replaceAll(":","/"),i==null||i.push({path:T,isShow:Z,filter:de,fatherPath:Ve})})}}else{let de="",Z=!0,he=Ze.analyzerSplitToWord(c,"(");(he==null?void 0:he.length)>1&&(de=(k=lc(he))==null?void 0:k.filter);let ae=c;if(ae=ae==null?void 0:ae.replace(de,""),(de==null?void 0:de[0])==="("){de=de==null?void 0:de.slice(1,(de==null?void 0:de.length)-1);let Se=[];(g=Ze.analyzeSplitToContent(de,","))==null||g.forEach(Ve=>{(Ve==null?void 0:Ve[(Ve==null?void 0:Ve.length)-1])===","&&(Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1)),(Ve==null?void 0:Ve[0])==="("&&(Ve=Ve==null?void 0:Ve.slice(1,(Ve==null?void 0:Ve.length)-1)),(Ve==null?void 0:Ve[0])!=="@"&&(Ve="@"+Ve),Se.push(dn(Ve))}),de=Se==null?void 0:Se.join(",")}else de=dn(de);de=(P=Ze.analyzeSplitToContent(de,","))==null?void 0:P.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)),de!=null&&de.includes("@ShowHide=Hide")&&(Z=!1),(ae==null?void 0:ae[(ae==null?void 0:ae.length)-1])==="}"&&(ae=ae+":"),ae=($=ae==null?void 0:ae.replaceAll("{",""))==null?void 0:$.replaceAll("}","");let ue="";if(ae!=null&&ae.includes("[")){let Se=(Y=ae==null?void 0:ae.replace("[",vn))==null?void 0:Y.split(vn),Ve=Se==null?void 0:Se[1];Ve=Ve==null?void 0:Ve.slice(0,(Ve==null?void 0:Ve.length)-1),(ze=(pe=Ze.analyzeSplitToContent(Ve,","))==null?void 0:pe.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||ze.forEach(ge=>{ue=(Se==null?void 0:Se[0])+ge,ue=ue==null?void 0:ue.replaceAll(":","/"),i==null||i.push({path:ue,isShow:Z,filter:de})})}else ue=ae==null?void 0:ae.replaceAll(":","/"),i==null||i.push({path:ue,isShow:Z,filter:de})}});let s=O.cloneDeep(i);return(r==null?void 0:r.length)>0&&(s=r),s=s==null?void 0:s.filter(c=>{var m,p,h,y;return!(c!=null&&c.fatherPath)&&((p=(m=c==null?void 0:c.path)==null?void 0:m.split(Vi))==null?void 0:p.length)>1&&((y=(h=c==null?void 0:c.path)==null?void 0:h.split(Vi))==null?void 0:y[1])===""}),s=s==null?void 0:s.map(c=>{var m;return c.path=(m=c.path)==null?void 0:m.replace(Vi,""),c.path}),(s==null?void 0:s.length)>0&&(i=i==null?void 0:i.map(c=>{var p,h,y,u,x,D,R;let m=s==null?void 0:s.find(E=>{var K;return(K=c==null?void 0:c.path)==null?void 0:K.includes(E)});return!(c!=null&&c.fatherPath)&&m&&!((p=c==null?void 0:c.path)!=null&&p.includes(Vi))&&!(s!=null&&s.find(E=>(c==null?void 0:c.path)===E))&&(c.path=m+Vi+((R=(y=(h=c==null?void 0:c.path)==null?void 0:h.split(m))==null?void 0:y[1])==null?void 0:R.slice(1,(D=(x=(u=c==null?void 0:c.path)==null?void 0:u.split(m))==null?void 0:x[1])==null?void 0:D.length))),c})),i},Yd=(l,r)=>rc([{key:l}],r),Jd=async(l,r)=>{const n=[],i=Yd(l==null?void 0:l.key,r);return i&&(i==null?void 0:i.length)>0&&(i==null||i.forEach(c=>{n.push([{key:"path",value:c==null?void 0:c.path,parentPath:(c==null?void 0:c.parentPath)??"",isShow:c==null?void 0:c.isShow,menuFilter:c==null?void 0:c.filter}])})),await Kd(l==null?void 0:l.value,n)};let kl="$R",ji="[Any]";const Xd=l=>{var m,p;let r={},i=l==null?void 0:l[0];(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":"),r.group=i;let s=l==null?void 0:l[1],c;return s!=null&&s.includes("{")?c=(p=(m=s==null?void 0:s.replaceAll("{",""))==null?void 0:m.replaceAll("}",""))==null?void 0:p.replaceAll(ji,""):c=s==null?void 0:s.replaceAll(ji,""),(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),r.filter=c,r},Zd=l=>{var D,R,E,K,M,L;let r=[],n=[],i=[],s=[],c=[],m=[],p="",h=l==null?void 0:l[0];(h==null?void 0:h[0])==="*"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length));let y=Ze.analyzeSplitToContent(h,":");(D=y==null?void 0:y.filter(j=>(j==null?void 0:j[0])!=="{"&&(j==null?void 0:j[0])!=="["))==null||D.forEach(j=>{var _,S,k;(j==null?void 0:j[(j==null?void 0:j.length)-1])===":"&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1));let C=Ze.analyzerSplitToWord(j,"(");if((C==null?void 0:C.length)>1){p=(_=lc(C))==null?void 0:_.filter;let g=j==null?void 0:j.replace(p,"");if(i.push(g),(p==null?void 0:p[0])==="("){p=p==null?void 0:p.slice(1,(p==null?void 0:p.length)-1);let P=[];(S=Ze.analyzeSplitToContent(p,","))==null||S.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])!=="@"&&($="@"+$),P.push(dn($))}),p=P==null?void 0:P.join(",")}else p=dn(p);p=(k=Ze.analyzeSplitToContent(p,","))==null?void 0:k.map(P=>((P==null?void 0:P[(P==null?void 0:P.length)-1])===","&&(P=P==null?void 0:P.slice(0,(P==null?void 0:P.length)-1)),P)),p!=null&&p.includes("@ShowHide=Hide")&&m.push(g),s=[...s,...p]}else i.push(C==null?void 0:C[0])});let u=(R=y==null?void 0:y.filter(j=>(j==null?void 0:j[0])==="{"))==null?void 0:R[0],x=(E=y==null?void 0:y.filter(j=>(j==null?void 0:j[0])==="["))==null?void 0:E[0];return r=Ni(x??""),r!=null&&r.every(j=>Array.isArray(j))&&(r=[r]),(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)),c=(K=Ze.analyzeSplitToContent(u,"@"))==null?void 0:K[1],c="@"+c,u=u==null?void 0:u.replace(c,""),c=dn(c),c=(M=Ze.analyzeSplitToContent(c,","))==null?void 0:M.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),(u==null?void 0:u[0])==="{"&&(u=u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1)),u=(L=Ze.analyzeSplitToContent(u,","))==null?void 0:L.map(j=>((j==null?void 0:j[(j==null?void 0:j.length)-1])===","&&(j=j==null?void 0:j.slice(0,(j==null?void 0:j.length)-1)),j)),u==null||u.forEach((j,C)=>{var Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa;let _=[],S=[],k=!1,g,P=[],$=[],Y=[],pe="Input",ze=[],de=[];if(j!=null&&j.includes("==")){g=(Z=j==null?void 0:j.split("=="))==null?void 0:Z[0];let Xe=(he=j==null?void 0:j.split("=="))==null?void 0:he[1],ce="";((ae=Ze.analyzeSplitToContent(Xe,"$"))==null?void 0:ae.length)>1&&((ue=Ze.analyzeSplitToContent(Xe,"$"))==null?void 0:ue[0])!=="$"?(ce=(Se=Ze.analyzeSplitToContent(Xe,"$"))==null?void 0:Se[0],ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1)):((Ve=Ze.analyzeSplitToContent(Xe,"}"))==null?void 0:Ve.length)>1&&(ce=(ge=Ze.analyzeSplitToContent(Xe,"}"))==null?void 0:ge[1]);let _e=Xe==null?void 0:Xe.replace(ce,"");(ce==null?void 0:ce[0])==="("&&(ce=ce==null?void 0:ce.slice(1,(ce==null?void 0:ce.length)-1)),(T=Ze.analyzeSplitToContent(ce,","))==null||T.forEach(qe=>{var Ma;(qe==null?void 0:qe[0])!=="@"&&(qe="@"+qe),(qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===","&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1));let La=dn(qe);(Ma=Ze.analyzeSplitToContent(La,","))==null||Ma.forEach(Je=>{(Je==null?void 0:Je[(Je==null?void 0:Je.length)-1])===","&&(Je=Je==null?void 0:Je.slice(0,(Je==null?void 0:Je.length)-1)),_.push(Je)})}),(_e==null?void 0:_e[0])==="$"&&(_e=_e==null?void 0:_e.slice(1,_e==null?void 0:_e.length));let va=(q=_e==null?void 0:_e.replace("*",kl))==null?void 0:q.split(kl);P=(ne=va==null?void 0:va[0])==null?void 0:ne.split(":"),$=(we=(Ne=Ze.analyzeSplitToContent(va==null?void 0:va[1],":"))==null?void 0:Ne.filter((qe,La)=>{var Ma,Je;return La!==((Je=(Ma=va==null?void 0:va[1])==null?void 0:Ma.split(":"))==null?void 0:Je.length)-1}))==null?void 0:we.map(qe=>((qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===":"&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),qe)),Y=(ua=(Ke=Ze.analyzeSplitToContent(va==null?void 0:va[1],":"))==null?void 0:Ke.filter((qe,La)=>{var Ma,Je;return La===((Je=(Ma=va==null?void 0:va[1])==null?void 0:Ma.split(":"))==null?void 0:Je.length)-1}))==null?void 0:ua[0],Y=(le=(za=Y==null?void 0:Y.replaceAll("{",""))==null?void 0:za.replaceAll("}",""))==null?void 0:le.split(":"),pe="Select"}else if(((Te=Ze.analyzeSplitToContent(j,"="))==null?void 0:Te.length)>1)if(pe="Select",g=(Ue=(Me=j==null?void 0:j.replace("=",kl))==null?void 0:Me.split(kl))==null?void 0:Ue[0],!(j!=null&&j.includes("If")))ze=(oe=(Re=j==null?void 0:j.replace("=",kl))==null?void 0:Re.split(kl))==null?void 0:oe[1],ze=ze==null?void 0:ze.split("||");else{let Xe=(He=(Ie=j==null?void 0:j.replace("=",kl))==null?void 0:Ie.split(kl))==null?void 0:He[1];de=(Ba=Ze.analyzeSplitToContent(Xe,")"))==null?void 0:Ba.filter(ce=>!(ce!=null&&ce.includes("If"))),de=de==null?void 0:de.map(ce=>((ce==null?void 0:ce[0])==="("&&(ce=ce==null?void 0:ce.slice(1,(ce==null?void 0:ce.length)-1)),ce=ce==null?void 0:ce.split("||"),ce)),S=(Oa=Ze.analyzeSplitToContent(Xe,")"))==null?void 0:Oa.filter(ce=>ce==null?void 0:ce.includes("If")),S=S==null?void 0:S.map(ce=>((ce==null?void 0:ce[0])==="|"&&(ce=ce==null?void 0:ce.slice(2,ce==null?void 0:ce.length)),(ce==null?void 0:ce[0])==="("&&(ce=ce==null?void 0:ce.slice(1,(ce==null?void 0:ce.length)-1)),(ce==null?void 0:ce[0])!=="@"&&(ce="@"+ce),ce))}else if(((V=Ze.analyzeSplitToContent(j,"@"))==null?void 0:V.length)>1){g=(H=Ze.analyzeSplitToContent(j,"@"))==null?void 0:H[0],(g==null?void 0:g[(g==null?void 0:g.length)-1])==="@"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1));let Xe="@"+((ee=Ze.analyzeSplitToContent(j,"@"))==null?void 0:ee[1]);Xe=dn(Xe),_=(fe=Ze.analyzeSplitToContent(Xe,","))==null?void 0:fe.map(ce=>((ce==null?void 0:ce[(ce==null?void 0:ce.length)-1])===","&&(ce=ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1)),ce)),_!=null&&_.find(ce=>ce==null?void 0:ce.includes("@Type"))&&(pe=(fa=(me=_==null?void 0:_.find(ce=>ce==null?void 0:ce.includes("@Type")))==null?void 0:me.split("="))==null?void 0:fa[1])}else g=j;_!=null&&_.includes("@ShowHide=Hide")&&(k=!0),n.push({prop:g,label:g,value:"",menuPath:P,groups:$,columns:Y,type:pe,options:ze,allContents:de,filters:_,width:u==null?void 0:u.length,isFormColHidden:k,filterContents:S})}),{groupName:i,groupFilters:s,formContents:n,contents:r,filter:c,hideContents:m}},Ni=l=>{var i,s;if(!l||typeof l!="string")return[];let r=[],n=l.slice(1,(l==null?void 0:l.length)-1);if((n==null?void 0:n[0])!=="[")(i=Ze.analyzeSplitToContent(n,","))==null||i.forEach(c=>{(c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c.slice(0,(c==null?void 0:c.length)-1)),r.push(c??"")});else{let c=[];(s=Ze.analyzeSplitToContent(n,","))==null||s.forEach(m=>{(m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),c.push(Ni(m))}),r=c}return r},mt=(l,r)=>{var L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je;let n,i=[],s=[],c=[],m=[],p=[],h=[],y=[],u="Input",x,D="",R="",E="",K=[],M="";if(l!=null&&l.includes("==")||l!=null&&l.includes("=")||l!=null&&l.includes("@")||l!=null&&l.includes("||"))if(n=(L=l==null?void 0:l.split("=="))==null?void 0:L[0],x=(j=l==null?void 0:l.split("=="))==null?void 0:j[0],u="Select",l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((S=(_=(C=l==null?void 0:l.replace("=",kl))==null?void 0:C.split(kl))==null?void 0:_[1])!=null&&S.includes("If")))if(n=Ze.analyzeSplitToContent(l,"@"),n=n==null?void 0:n[0],(n==null?void 0:n[(n==null?void 0:n.length)-1])==="@"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),n=(g=(k=n==null?void 0:n.replace("=",kl))==null?void 0:k.split(kl))==null?void 0:g[0],n!=null&&n.includes("&")&&(n=($=(P=n==null?void 0:n.replace("&",kl))==null?void 0:P.split(kl))==null?void 0:$[0]),x=n,((Y=Ze.analyzeSplitToContent(l,"@"))==null?void 0:Y.length)>1){if(!(l!=null&&l.includes("&"))){let ia=(pe=Ze.analyzeSplitToContent(l,"@"))==null?void 0:pe[1];if((ia==null?void 0:ia[0])!=="@"&&(ia="@"+ia),ia=dn(ia),R=ia,R!=null&&R.includes("@Type")){let se=Ze.analyzeSplitToContent(R,",");se=se==null?void 0:se.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)),se=(ze=se==null?void 0:se.filter(U=>U==null?void 0:U.includes("@Type")))==null?void 0:ze[0],u=(de=se==null?void 0:se.split("="))==null?void 0:de[1]}}}else l!=null&&l.includes("||")?i=(ae=(he=(Z=l==null?void 0:l.split("="))==null?void 0:Z[1])==null?void 0:he.split("||"))==null?void 0:ae.map(ia=>({label:ia==null?void 0:ia.replaceAll("'",""),value:ia==null?void 0:ia.replaceAll("'","")})):(u="Input",D=(Ve=(Se=(ue=l==null?void 0:l.replace("=",kl))==null?void 0:ue.split(kl))==null?void 0:Se[1])==null?void 0:Ve.replaceAll("'",""));else if((q=(T=(ge=l==null?void 0:l.replace("=",kl))==null?void 0:ge.split(kl))==null?void 0:T[1])!=null&&q.includes("||")){n=(ne=l==null?void 0:l.split("="))==null?void 0:ne[0],x=(Ne=l==null?void 0:l.split("="))==null?void 0:Ne[0];let ia=(Ke=(we=l==null?void 0:l.replace("=",kl))==null?void 0:we.split(kl))==null?void 0:Ke[1];ia=Ze.analyzeSplitToContent(ia,")");let se=ia==null?void 0:ia.filter(W=>!(W!=null&&W.includes("If")));se==null||se.forEach(W=>{(W==null?void 0:W[0])==="("&&(W=W==null?void 0:W.slice(1,(W==null?void 0:W.length)-1)),s==null||s.push(W==null?void 0:W.split("||"))});let U=ia==null?void 0:ia.filter(W=>W==null?void 0:W.includes("If"));U=U==null?void 0:U.map(W=>((W==null?void 0:W[0])==="|"&&(W==null?void 0:W[1])==="|"&&(W=W==null?void 0:W.slice(2,W==null?void 0:W.length)),(W==null?void 0:W[0])==="("&&(W=W==null?void 0:W.slice(1,(W==null?void 0:W.length)-1)),(W==null?void 0:W[0])!=="@"&&(W="@"+W),W)),c=U}else{let ia=l==null?void 0:l.split("=="),se=(ua=ia==null?void 0:ia.filter(U=>(U==null?void 0:U.includes("$"))&&(U==null?void 0:U[0])!=="{"))==null?void 0:ua[0];if(se&&!(se!=null&&se.includes("&"))){let U=(za=se==null?void 0:se.replace("*",kl))==null?void 0:za.split(kl),W=(U==null?void 0:U[0])===""?r==null?void 0:r.value:U==null?void 0:U[0];(W==null?void 0:W[0])==="("&&(W=(le=Ze.analyzeSplitToContent(W,")"))==null?void 0:le[1]),W=(Me=(Te=W==null?void 0:W.replaceAll("{",""))==null?void 0:Te.replaceAll("}",""))==null?void 0:Me.replaceAll(ji,""),(W==null?void 0:W[0])==="$"&&(W=(Ue=W==null?void 0:W.slice(1,W==null?void 0:W.length))==null?void 0:Ue.replaceAll(":","/")),m=W==null?void 0:W.split("/");let Be=(oe=(Re=U==null?void 0:U[1])==null?void 0:Re.replace("{",kl))==null?void 0:oe.split(kl),ke=Be==null?void 0:Be[0];(ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])===":"&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),p=ke==null?void 0:ke.split(":"),h=(Oa=(Ba=(He=(Ie=Be==null?void 0:Be[1])==null?void 0:Ie.replace("}",kl))==null?void 0:He.split(kl))==null?void 0:Ba[0])==null?void 0:Oa.split(":");let ra="";((V=Ze.analyzeSplitToContent(se,")"))==null?void 0:V.length)>1&&(ra=(H=Ze.analyzeSplitToContent(se,")"))==null?void 0:H[0]),ra&&ra!==""&&((ra==null?void 0:ra[0])!=="@"&&(ra="@"+ra),R=No(ra))}if(ia!=null&&ia.some(U=>(U==null?void 0:U[0])==="&")){let U=(ee=ia==null?void 0:ia.filter(ke=>(ke==null?void 0:ke[0])==="&"))==null?void 0:ee[0];(U==null?void 0:U[0])==="&"&&(U=U==null?void 0:U.slice(1,U==null?void 0:U.length)),E=(me=(fe=U==null?void 0:U.replace("(",kl))==null?void 0:fe.split(kl))==null?void 0:me[0];let W=(fa=Ze.analyzeSplitToContent(U,")"))==null?void 0:fa[0];W=(ce=(Xe=W==null?void 0:W.replace("(",kl))==null?void 0:Xe.split(kl))==null?void 0:ce[1],W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1),(W==null?void 0:W[0])==="{"&&(W=W==null?void 0:W.slice(1,W==null?void 0:W.length)),(W==null?void 0:W[(W==null?void 0:W.length)-1])==="}"&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),K=W==null?void 0:W.split(",");let Be=(_e=Ze.analyzeSplitToContent(U,")"))==null?void 0:_e[1];Be&&Be!==""&&(M=No(Be))}else if(!se&&((va=ia==null?void 0:ia.filter(U=>(U==null?void 0:U[0])==="{"))==null?void 0:va.length)>0){let U=ia==null?void 0:ia[(ia==null?void 0:ia.length)-1];U=U==null?void 0:U.slice(1,(U==null?void 0:U.length)-1),U=Ze.analyzeSplitToContent(U,","),U=U==null?void 0:U.map(W=>((W==null?void 0:W[(W==null?void 0:W.length)-1])===","&&(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1)),W)),U=U==null?void 0:U.map(W=>{var Be,ke,ra,oa;if(W=W==null?void 0:W.replaceAll("$",""),W!=null&&W.includes("{")){let _a="";W=W==null?void 0:W.replaceAll("{","");let ga=W==null?void 0:W.split("}");_a=((ke=(Be=ga==null?void 0:ga[0])==null?void 0:Be.split(":"))==null?void 0:ke[0])+":"+(ga==null?void 0:ga[1]),W=_a,W=W+":"}if(W!=null&&W.includes(ji)){let _a="",ga=W==null?void 0:W.split(ji);_a=((oa=(ra=ga==null?void 0:ga[0])==null?void 0:ra.split(":"))==null?void 0:oa[0])+":"+(ga==null?void 0:ga[1]),W=_a,W=W+":"}return W=W==null?void 0:W.replaceAll(":","/"),W}),y=U}else!((qe=ia==null?void 0:ia[1])!=null&&qe.includes("$"))&&((La=ia==null?void 0:ia[1])==null?void 0:La[0])!=="("&&h.push(ia==null?void 0:ia[1])}else n=(Ma=l==null?void 0:l.split("&"))==null?void 0:Ma[0],x=(Je=l==null?void 0:l.split("&"))==null?void 0:Je[0];return{label:n,prop:x,options:i,allContents:s,filterContents:c,menus:m,groups:p,words:h,align:"center",formType:u,filter:R,functionName:E,functionRelatedWords:K,calculatorFilter:M,relatedPages:y,value:D}},To=(l,r)=>{var i,s,c,m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae;let n=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((m=(c=(s=(i=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:i.replace(":",kl))==null?void 0:s.split(kl))==null?void 0:c[0])!=null&&m.includes(","))){let ue=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),Se=(p=ue==null?void 0:ue.replace(":",kl))==null?void 0:p.split(kl);if(((h=Ze.analyzeSplitToContent(Se==null?void 0:Se[1],"="))==null?void 0:h.length)===1){let Ve=Se==null?void 0:Se[0],ge=[];(x=Ze.analyzeSplitToContent((u=Se==null?void 0:Se[1])==null?void 0:u.slice(1,((y=Se==null?void 0:Se[1])==null?void 0:y.length)-1),","))==null||x.forEach(T=>{var q,ne;((q=Ze.analyzeSplitToContent(T,"="))==null?void 0:q.length)>1?((T==null?void 0:T[(T==null?void 0:T.length)-1])===","&&(T=T==null?void 0:T.slice(0,(T==null?void 0:T.length)-1)),ge=[...ge,...To(T,r)]):((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)),ge.push((ne=To(T,r))==null?void 0:ne[0]))}),n==null||n.push({label:Ve,prop:Ve,children:ge,align:"center"})}else{let Ve=[];if(((D=Ze.analyzeSplitToContent(ue,"="))==null?void 0:D.length)>=2){let T=(R=Ze.analyzeSplitToContent(ue,"="))==null?void 0:R[1],q=(E=Ze.analyzeSplitToContent(T,"/"))==null?void 0:E.map(ne=>((ne==null?void 0:ne[(ne==null?void 0:ne.length)-1])==="/"&&(ne=ne==null?void 0:ne.slice(0,(ne==null?void 0:ne.length)-1)),ne));Ve=q==null?void 0:q.map(ne=>(ne=Ni(ne),ne))}let ge=(_=(C=(j=(L=(M=(K=ue==null?void 0:ue.replace("{",kl))==null?void 0:K.split(kl))==null?void 0:M[1])==null?void 0:L.replace("}",kl))==null?void 0:j.split(kl))==null?void 0:C[0])==null?void 0:_.split(",");ge==null||ge.forEach((T,q)=>{(Ve==null?void 0:Ve.length)>0&&q===0?n==null||n.push({label:T,prop:T,align:"center",formType:"Select",relatedContents:Ve==null?void 0:Ve.map(ne=>{let Ne={};return ge==null||ge.forEach((we,Ke)=>{Ne[we]=ne==null?void 0:ne[Ke]}),Ne}),options:Ve==null?void 0:Ve.map(ne=>({label:ne==null?void 0:ne[0],value:ne==null?void 0:ne[0]})),mainKey:!0}):n==null||n.push({label:T,prop:T,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((S=Ze.analyzeSplitToContent(l,"="))==null?void 0:S.length)===2&&((g=(k=Ze.analyzeSplitToContent(l,"="))==null?void 0:k[1])==null?void 0:g[0])==="["){let ue=[];if(((P=Ze.analyzeSplitToContent(l,"="))==null?void 0:P.length)>=2){let Ve=($=Ze.analyzeSplitToContent(l,"="))==null?void 0:$[1],ge=(pe=(Y=Ze.analyzeSplitToContent(Ve,"|"))==null?void 0:Y.filter(T=>T!=="|"))==null?void 0:pe.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));ue=ge==null?void 0:ge.map(T=>(T=Ni(T),T))}let Se=(de=(ze=l==null?void 0:l.replace("}",kl))==null?void 0:ze.split(kl))==null?void 0:de[0];Se=(Z=Se==null?void 0:Se.slice(1,Se==null?void 0:Se.length))==null?void 0:Z.split(","),Se==null||Se.forEach((Ve,ge)=>{(ue==null?void 0:ue.length)>0&&ge===0?n==null||n.push({label:Ve,prop:Ve,align:"center",formType:"Select",relatedContents:ue==null?void 0:ue.map(T=>{let q={};return Se==null||Se.forEach((ne,Ne)=>{q[ne]=T==null?void 0:T[Ne]}),q}),options:ue==null?void 0:ue.map(T=>({label:T==null?void 0:T[0],value:T==null?void 0:T[0]})),mainKey:!0}):n==null||n.push({label:Ve,prop:Ve,align:"center"})})}else(he=Ze.analyzeSplitToContent(l,","))==null||he.forEach(ue=>{var Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia,se;if((ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])===","&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),(ue==null?void 0:ue[0])==="{"){let U=Ze.analyzeSplitToContent(ue,"="),W=U==null?void 0:U[(U==null?void 0:U.length)-1],Be=[],ke=[],ra=[],oa="",_a="",ga=[],Pa=[],ma=(Se=W==null?void 0:W.replace("*",kl))==null?void 0:Se.split(kl),Oe=(ma==null?void 0:ma[0])===""?r==null?void 0:r.value:ma==null?void 0:ma[0];Oe=Ze.analyzeSplitToContent(Oe,")");let Ra="";if((Oe==null?void 0:Oe.length)>1&&((Ve=Oe==null?void 0:Oe[0])==null?void 0:Ve[0])!=="&"&&(Ra=Oe==null?void 0:Oe[0],(Ra==null?void 0:Ra[0])!=="@"&&(Ra="@"+Ra),_a=Ra??""),Oe=(ge=Oe==null?void 0:Oe.filter(xl=>(xl==null?void 0:xl[0])==="$"))==null?void 0:ge[0],((T=Ze.analyzeSplitToContent(Oe,"}"))==null?void 0:T.length)>1&&((ne=(q=Ze.analyzeSplitToContent(Oe,"}"))==null?void 0:q[1])==null?void 0:ne[0])==="("&&(Ra=(Ne=Ze.analyzeSplitToContent(Oe,"}"))==null?void 0:Ne[1],(Ra==null?void 0:Ra[0])!=="@"&&(Ra="@"+Ra),_a!==""&&(_a=_a+","),_a=_a+Ra),(we=Oe==null?void 0:Oe.slice(1,(Oe==null?void 0:Oe.length)-1))!=null&&we.includes("$")||(Oe=(Ke=Ze.analyzeSplitToContent(Oe,"}"))==null?void 0:Ke[0]),(Oe==null?void 0:Oe[0])==="$"&&(Oe=(ua=Oe==null?void 0:Oe.replace("{",""))==null?void 0:ua.replace("}",":"),Oe=(za=Oe==null?void 0:Oe.slice(1,Oe==null?void 0:Oe.length))==null?void 0:za.replaceAll(":","/")),Oe!=null&&Oe.includes("$")){let xl=(le=Oe==null?void 0:Oe.split("$"))==null?void 0:le[0];xl=(Te=xl==null?void 0:xl.split("/"))==null?void 0:Te[0],Oe=xl+"/"+((Me=Oe==null?void 0:Oe.split("$"))==null?void 0:Me[1])+"/"}Be=(Oe==null?void 0:Oe.split("/"))??[];let hl=(Re=(Ue=ma==null?void 0:ma[1])==null?void 0:Ue.replace("{",kl))==null?void 0:Re.split(kl);if((He=(Ie=(oe=ma==null?void 0:ma[1])==null?void 0:oe.split("(@"))==null?void 0:Ie[0])!=null&&He.includes("&&")||(V=(Oa=(Ba=ma==null?void 0:ma[1])==null?void 0:Ba.split("@"))==null?void 0:Oa[0])!=null&&V.includes("&&")){let xl=(H=ma==null?void 0:ma[1])!=null&&H.includes("(@")?(me=(fe=(ee=ma==null?void 0:ma[1])==null?void 0:ee.split("(@"))==null?void 0:fe[0])==null?void 0:me.split("&&"):(ce=(Xe=(fa=ma==null?void 0:ma[1])==null?void 0:fa.split("@"))==null?void 0:Xe[0])==null?void 0:ce.split("&&");ga=xl==null?void 0:xl.map(Wa=>{var Rl,ja;return(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(ja=(Rl=Wa==null?void 0:Wa.replace("{",kl))==null?void 0:Rl.split(kl))==null?void 0:ja[0],(Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])===":"&&(Wa=Wa==null?void 0:Wa.slice(0,(Wa==null?void 0:Wa.length)-1)),Wa=Wa==null?void 0:Wa.split(":"),Wa});let Vl=[];xl==null||xl.forEach((Wa,Rl)=>{var ja,ka;(Wa==null?void 0:Wa[0])==="*"&&(Wa=Wa==null?void 0:Wa.slice(1,Wa==null?void 0:Wa.length)),Wa=(ka=(ja=Wa==null?void 0:Wa.replace("{",kl))==null?void 0:ja.split(kl))==null?void 0:ka[1],(Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])==="}"&&(Wa=Wa==null?void 0:Wa.slice(0,(Wa==null?void 0:Wa.length)-1)),Wa=Wa==null?void 0:Wa.split(","),Vl.push(Rl===0?(Wa==null?void 0:Wa.length)-1:Wa==null?void 0:Wa.length),Pa=[...Pa,...Wa]}),Vl=(_e=Ze.prefixSum(Vl))==null?void 0:_e.map(Wa=>Wa==null?void 0:Wa.total),ga=ga==null?void 0:ga.map((Wa,Rl)=>({number:Vl==null?void 0:Vl[Rl],contents:Wa}))}let Cl=hl==null?void 0:hl[0];(Cl==null?void 0:Cl[(Cl==null?void 0:Cl.length)-1])===":"&&(Cl=Cl==null?void 0:Cl.slice(0,(Cl==null?void 0:Cl.length)-1)),ke=(Cl==null?void 0:Cl.split(":"))??[],ra=((Ma=(La=(qe=(va=hl==null?void 0:hl[1])==null?void 0:va.replace("}",kl))==null?void 0:qe.split(kl))==null?void 0:La[0])==null?void 0:Ma.split(","))??[];let Xl=(ia=U==null?void 0:U[0])==null?void 0:ia.slice(1,((Je=U==null?void 0:U[0])==null?void 0:Je.length)-2);_a&&_a!==""&&(oa=No(_a)),(se=Xl==null?void 0:Xl.split(","))==null||se.forEach((xl,Vl)=>{var Wa,Rl,ja,ka,Na;((Wa=Ze.analyzeSplitToContent(xl,"@"))==null?void 0:Wa.length)>1&&(xl=(Rl=Ze.analyzeSplitToContent(xl,"@"))==null?void 0:Rl[0],(xl==null?void 0:xl[(xl==null?void 0:xl.length)-1])==="@"&&(xl=xl==null?void 0:xl.slice(0,(xl==null?void 0:xl.length)-1))),n.push({label:xl,prop:xl,align:"center",menus:Be,groups:(ga==null?void 0:ga.length)===0?ke:(ja=ga==null?void 0:ga.find($a=>($a==null?void 0:$a.number)>=Vl))==null?void 0:ja.contents,words:(Pa==null?void 0:Pa.length)===0?(ka=ra==null?void 0:ra[Vl])==null?void 0:ka.split(":"):(Na=Pa==null?void 0:Pa[Vl])==null?void 0:Na.split(":"),formType:(Be==null?void 0:Be.length)>0?"Select":"Input",mainKey:Vl===0,filter:oa,isMainPath:(ga==null?void 0:ga.findIndex($a=>($a==null?void 0:$a.number)>=Vl))===0})})}else n.push({label:ue,prop:ue,align:"center"})});else{let ue=(ae=Ze.analyzeSplitToContent(l,","))==null?void 0:ae.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));ue==null||ue.forEach(Se=>{n.push(mt(Se,r))})}return n},Qd=(l,r)=>{var m,p,h,y,u;let n=l;if(!l)return;let i="";((m=Ze.analyzeSplitToContent(l,"}"))==null?void 0:m.length)>1&&(n=(p=Ze.analyzeSplitToContent(l,"}"))==null?void 0:p[0],i=(h=Ze.analyzeSplitToContent(l,"}"))==null?void 0:h[1]),(l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let s=[],c=[];return s.push({label:"排序",prop:"sort"}),s.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(y=Ze.analyzeSplitToContent(n,","))==null||y.forEach(x=>{var D;(x==null?void 0:x[(x==null?void 0:x.length)-1])===","&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),(x==null?void 0:x[0])==="{"?(D=To(x,r))==null||D.forEach(R=>{s.push(R)}):s.push(mt(x,r))}),s!=null&&s.some(x=>{var D;return(D=x==null?void 0:x.prop)==null?void 0:D.includes("@")})&&(s=s==null?void 0:s.filter(x=>{var D;return!((D=x==null?void 0:x.prop)!=null&&D.includes("@"))})),i!==""&&((i==null?void 0:i[0])=="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),(u=Ze.analyzeSplitToContent(i,","))==null||u.forEach(x=>{var D;(x==null?void 0:x[(x==null?void 0:x.length)-1])===","&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1)),(x==null?void 0:x[0])==="{"?(D=To(x,r))==null||D.forEach(R=>{c.push(R)}):c.push(mt(x,r))})),{columns:s,secondColumns:c}},dn=l=>{var r,n,i,s,c;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition")||l!=null&&l.includes("@If"))return l;{let m=(n=(r=l==null?void 0:l.replace("(",kl))==null?void 0:r.split(kl))==null?void 0:n[1],p=(s=(i=l==null?void 0:l.replace("(",kl))==null?void 0:i.split(kl))==null?void 0:s[0];return m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1),m=(c=Ze.analyzeSplitToContent(m,","))==null?void 0:c.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==null?void 0:h[0])==="("&&(h=h==null?void 0:h.slice(1,(h==null?void 0:h.length)-1)),p+h)),m=m==null?void 0:m.join(","),l!=null&&l.includes("@Quote")&&(m!=null&&m.includes("@QuoteType")||(m=m===""?m+"@QuoteType=Manual":m+",@QuoteType=Manual"),m!=null&&m.includes("@QuoteSonSync")||(m=m===""?m+"@QuoteSonSync=No":m+",@QuoteSonSync=No"),m!=null&&m.includes("@QuoteFatherSync")||(m=m===""?m+"@QuoteFatherSync=Yes":m+",@QuoteFatherSync=Yes")),m}},os=l=>{let r=l==null?void 0:l.map(n=>{var i,s;return{menus:n==null?void 0:n.menus,content:((i=n==null?void 0:n.menus)==null?void 0:i.join("/"))+kl+((s=n==null?void 0:n.groups)==null?void 0:s.join("/"))}});return r=r==null?void 0:r.filter(n=>{var i;return(n==null?void 0:n.menus)&&((i=n==null?void 0:n.menus)==null?void 0:i.length)>0}),r=r==null?void 0:r.map(n=>n==null?void 0:n.content),r=[...new Set(r)],r=r==null?void 0:r.map(n=>{var i,s;return{menus:(i=n==null?void 0:n.split(kl))==null?void 0:i[0],groups:((s=n==null?void 0:n.split(kl))==null?void 0:s[1])??[]}}),r},ts=l=>{var n;let r=l;return(r==null?void 0:r[0])==="("&&(r==null?void 0:r[1])==="("&&(r=r.slice(1,(r==null?void 0:r.length)-1)),r=(n=Ze.analyzeSplitToContent(r,","))==null?void 0:n.map(i=>((i==null?void 0:i[(i==null?void 0:i.length)-1])===","&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])!=="@"&&(i="@"+i),i=dn(i),i)),r==null?void 0:r.join(",")},nc=(l,r,n="")=>{var j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia,se;let i=[],s=[],c=[],m="",p="",h="",y=[],u=[],x=[],D="";if(((j=l==null?void 0:l[0])==null?void 0:j[0])!=="*"&&((C=l==null?void 0:l[0])==null?void 0:C[0])!=="$"&&!((_=l==null?void 0:l[0])!=null&&_.includes("$")))return;((S=l==null?void 0:l[0])==null?void 0:S[0])!=="*"&&((k=l==null?void 0:l[0])==null?void 0:k[0])!=="$"&&(m=(g=Ze.analyzeSplitToContent(l==null?void 0:l[0],")"))==null?void 0:g[0],(m==null?void 0:m[0])!=="@"&&(m="@"+m),m=No(m),h=(P=Ze.analyzeSplitToContent(l==null?void 0:l[0],")"))==null?void 0:P[1],(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length)),h=h==null?void 0:h.replaceAll(":","/"));let E=Ze.analyzeSplitToContent(l==null?void 0:l[0],":");if(i=($=E==null?void 0:E.filter(U=>(U==null?void 0:U[0])!=="{"&&(U==null?void 0:U[0])!=="["))==null?void 0:$.join(""),p=(Y=l==null?void 0:l[0])==null?void 0:Y.replace(i,""),(i==null?void 0:i[0])==="("&&(i=""),D=(pe=E==null?void 0:E.filter(U=>(U==null?void 0:U[0])!=="["))==null?void 0:pe.join(""),D=(ze=l==null?void 0:l[0])==null?void 0:ze.replace(D,""),p=p==null?void 0:p.replace(D,""),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),(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)),((de=Ze.analyzeSplitToContent(p,"@"))==null?void 0:de.length)>1&&(m=(Z=Ze.analyzeSplitToContent(p,"@"))==null?void 0:Z[1],(m==null?void 0:m[(m==null?void 0:m.length)-1])===":"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m="@"+m,m=dn(m),p=(he=Ze.analyzeSplitToContent(p,"@"))==null?void 0:he[0],p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),((ae=Ze.analyzeSplitToContent(i,"@"))==null?void 0:ae.length)>1){m!==""&&(m=m+",");let U=(ue=Ze.analyzeSplitToContent(i,"@"))==null?void 0:ue[1];U="@"+U,U=dn(U),m=m+U,i=(Se=Ze.analyzeSplitToContent(i,"@"))==null?void 0:Se[0]}if((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=i===""?[]:i==null?void 0:i.split(":"),(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),n!==""){let U=(Ve=Ze.analyzeSplitToContent(n,")"))==null?void 0:Ve[0],W=(ge=Ze.analyzeSplitToContent(n,"@"))==null?void 0:ge[1];h=(q=(T=Ze.analyzeSplitToContent(n,"@"))==null?void 0:T[0])==null?void 0:q.replace(U,""),(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)),U=ts(U),W=ts(W);let Be=U??"";if(Be!==""&&(Be=Be+","),Be=Be+W,(Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be!==""&&m!==""&&(m=m+","),m=m+Be,(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length)),h=(ne=Ze.analyzeSplitToContent(h,":"))==null?void 0:ne.filter((ke,ra)=>{var oa;return!((ke==null?void 0:ke[0])==="{"&&ra===((oa=Ze.analyzeSplitToContent(h,":"))==null?void 0:oa.length)-1)}),h=h==null?void 0:h.join(""),(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)),m!=null&&m.includes("@Sync")||(m=m===""?m+"@Sync=(Yes,Yes)":m+",@Sync=(Yes,Yes)"),h!=null&&h.includes("$")){let ke=(we=(Ne=h==null?void 0:h.replace("*",kl))==null?void 0:Ne.split(kl))==null?void 0:we[1],ra=(ua=(Ke=h==null?void 0:h.replace("*",kl))==null?void 0:Ke.split(kl))==null?void 0:ua[0];ra=ra==null?void 0:ra.split("$"),ra=((le=(za=ra==null?void 0:ra[0])==null?void 0:za.split(":"))==null?void 0:le[0])+":"+(ra==null?void 0:ra[1])+":",h=ra+"*"+ke}else h=(Te=h==null?void 0:h.replaceAll("{",""))==null?void 0:Te.replaceAll("}","")}m!==""&&m&&(m="("+m+")"),m=h+m,((Me=Ze.analyzeSplitToContent(p,"}"))==null?void 0:Me.length)>1&&(p=(Ue=Ze.analyzeSplitToContent(p,"}"))==null?void 0:Ue.filter(U=>(U==null?void 0:U[0])!=="@"),p=p==null?void 0:p.join(""));let K=Qd(p,r);c=p===""?[]:(K==null?void 0:K.columns)??[],x=na.getColumnChild(c);let M=na.getColumnChild(c);c!=null&&c.some(U=>{var W;return Array.isArray(U==null?void 0:U.children)&&((W=U==null?void 0:U.children)==null?void 0:W.length)>0})&&(c=[c]),s=D?Ni(D):[],!(s!=null&&s.every(U=>Array.isArray(U)))&&(s==null?void 0:s.length)>0&&(s=[s]),(s==null?void 0:s.length)>0&&(Array.isArray(s==null?void 0:s[0])&&((Re=s==null?void 0:s[0])!=null&&Re.every(U=>Array.isArray(U)))?s=s==null?void 0:s.map((U,W)=>(U=U.map((Be,ke)=>(Be.unshift("{}"),Be.unshift((ke+1).toString()),Be)),U)):s=s==null?void 0:s.map((U,W)=>(U.unshift("{}"),U.unshift((W+1).toString()),U))),K!=null&&K.secondColumns&&((oe=K==null?void 0:K.secondColumns)==null?void 0:oe.length)>0&&((s==null?void 0:s.length)>0?s=s==null?void 0:s.map((U,W)=>{var Be,ke;return Array.isArray(U==null?void 0:U[0])?U=U==null?void 0:U.map((ra,oa)=>{var _a,ga;return ra.unshift((ga=(_a=K==null?void 0:K.secondColumns)==null?void 0:_a[oa])==null?void 0:ga.prop),ra}):U.unshift((ke=(Be=K==null?void 0:K.secondColumns)==null?void 0:Be[W])==null?void 0:ke.prop),U}):s=(Ie=K==null?void 0:K.secondColumns)==null?void 0:Ie.map((U,W)=>(U=[U==null?void 0:U.label],U.push(W),U)),c.unshift({label:"",prop:"disabled",sortable:!1})),x=x==null?void 0:x.map(U=>{var W,Be;return{menus:U==null?void 0:U.menus,content:((W=U==null?void 0:U.menus)==null?void 0:W.join("/"))+kl+((Be=U==null?void 0:U.groups)==null?void 0:Be.join("/"))}});let L=[];if(((Ba=(He=m==null?void 0:m.replace("(",kl))==null?void 0:He.split(kl))==null?void 0:Ba[0])!==""&&(L=(V=(Oa=m==null?void 0:m.replace("(",kl))==null?void 0:Oa.split(kl))==null?void 0:V[0],L=[L],L=L==null?void 0:L.map(U=>{var Be,ke,ra;let W=U==null?void 0:U.split("*");return{menus:(Be=W==null?void 0:W[0])==null?void 0:Be.split(":"),content:((ke=W==null?void 0:W[0])==null?void 0:ke.replaceAll(":","/"))+kl+((ra=W==null?void 0:W[1])==null?void 0:ra.replaceAll(":","/"))}}),x=[...x,...L]),x=x==null?void 0:x.filter(U=>{var W;return(U==null?void 0:U.menus)&&((W=U==null?void 0:U.menus)==null?void 0:W.length)>0}),x=x==null?void 0:x.map(U=>U==null?void 0:U.content),x=[...new Set(x)],x=x==null?void 0:x.map(U=>{var W,Be;return{menus:(W=U==null?void 0:U.split(kl))==null?void 0:W[0],groups:((Be=U==null?void 0:U.split(kl))==null?void 0:Be[1])??[]}}),y=M==null?void 0:M.filter(U=>{var W;return(U==null?void 0:U.filter)&&((W=U==null?void 0:U.filter)==null?void 0:W.includes("@Sync"))}),(y==null?void 0:y.length)>0&&(y=y==null?void 0:y.filter(U=>{var W,Be,ke,ra;return(ra=(ke=(Be=(W=Ze.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:W.find(oa=>oa==null?void 0:oa.includes("@Sync")))==null?void 0:Be.split(","))==null?void 0:ke[0])==null?void 0:ra.includes("Yes")}),y=os(y)),u=M==null?void 0:M.filter(U=>{var W;return(U==null?void 0:U.filter)&&((W=U==null?void 0:U.filter)==null?void 0:W.includes("@Sync"))}),(u==null?void 0:u.length)>0&&(u=u==null?void 0:u.filter(U=>{var W,Be,ke,ra;return(ra=(ke=(Be=(W=Ze.analyzeSplitToContent(U==null?void 0:U.filter,","))==null?void 0:W.find(oa=>oa==null?void 0:oa.includes("@Sync")))==null?void 0:Be.split(","))==null?void 0:ke[1])==null?void 0:ra.includes("Yes")}),u=os(u)),m!==""&&(m!=null&&m.includes("@Sync"))&&(m==null?void 0:m[0])!=="("){let U=(H=m==null?void 0:m.replace("(",kl))==null?void 0:H.split(kl),W=U==null?void 0:U[1];if(W=W==null?void 0:W.slice(0,(W==null?void 0:W.length)-1),W=Ze.analyzeSplitToContent(W,","),(me=(fe=(ee=W==null?void 0:W.find(Be=>Be==null?void 0:Be.includes("@Sync")))==null?void 0:ee.split(","))==null?void 0:fe[0])!=null&&me.includes("Yes")){let Be=U==null?void 0:U[0];Be=[{menus:(Xe=(fa=Be==null?void 0:Be.split("*"))==null?void 0:fa[0])==null?void 0:Xe.replaceAll(":","/"),groups:((_e=(ce=Be==null?void 0:Be.split("*"))==null?void 0:ce[1])==null?void 0:_e.split(":"))??[]}],y=[...y,...Be]}if((La=(qe=(va=W==null?void 0:W.find(Be=>Be==null?void 0:Be.includes("@Sync")))==null?void 0:va.split(","))==null?void 0:qe[1])!=null&&La.includes("Yes")){let Be=U==null?void 0:U[0];Be=[{menus:(Je=(Ma=Be==null?void 0:Be.split("*"))==null?void 0:Ma[0])==null?void 0:Je.replaceAll(":","/"),groups:((se=(ia=Be==null?void 0:Be.split("*"))==null?void 0:ia[1])==null?void 0:se.split(":"))??[]}],u=[...u,...Be]}}return{groupName:i,tableColumns:c,tableFilter:m,tableContents:s,columns:(K==null?void 0:K.secondColumns)??[],relatedQuotes:x,fatherSyncContents:y,sonSyncContents:u}},ic=(l,r)=>(l=l==null?void 0:l.map((n,i)=>{var s,c,m,p;if(Array.isArray(n))n=n==null?void 0:n.map(h=>{var y,u,x,D;return h!=null&&h.isMainPath||(((y=h==null?void 0:h.children)==null?void 0:y.length)>0?h.children=ic(h.children,r):((u=h==null?void 0:h.menus)==null?void 0:u.length)>0&&!((x=n==null?void 0:n[0])!=null&&x.isMainPath)&&(h.menus=(D=h.menus)==null?void 0:D.map((R,E)=>{var K,M;return((K=h.menus)==null?void 0:K.length)-1===E&&R===""&&(r==null?void 0:r.parentContent)+"/"!==((M=h.menus)==null?void 0:M.join("/"))&&(R=r==null?void 0:r.value),h}),h.bindMenus=h.menus)),h});else{if(i===0&&((s=n.menus)==null?void 0:s.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((c=n.menus)==null?void 0:c.length)>0&&!((m=l==null?void 0:l[0])!=null&&m.isMainPath)&&(n.menus=(p=n.menus)==null?void 0:p.map((h,y)=>{var u,x;return((u=n.menus)==null?void 0:u.length)-1===y&&h===""&&(r==null?void 0:r.parentContent)+"/"!==((x=n.menus)==null?void 0:x.join("/"))&&(h=r==null?void 0:r.value),h}),n.bindMenus=n.menus)}return n}),l),ep=(l,r)=>(l=l==null?void 0:l.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=ic(n.contents,r)),n)),l),yt=(l,r)=>{let n=l;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(i=>(i=yt(i,r),i)):n=n==null?void 0:n.map(i=>{var s,c;return i!=null&&i.children&&((s=i==null?void 0:i.children)==null?void 0:s.length)>0?i.children=yt(i==null?void 0:i.children,r):i!=null&&i.words&&((c=i==null?void 0:i.words)==null?void 0:c.length)>0&&(r!=null&&r.find(m=>{var p,h,y,u;return((u=(p=i==null?void 0:i.prop)==null?void 0:p.split("."))==null?void 0:u[((y=(h=i==null?void 0:i.prop)==null?void 0:h.split("."))==null?void 0:y.length)-1])===m}))&&(i.mainKey=!0),i}),n};let kr="$R";const ap=O.useUnit(O.pinia),{selectTitle:mn}=O.storeToRefs(ap),yn=[{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:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",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=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(ti||{});const lp=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;return r.push({key:"backGround",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},rp=l=>{const r=tc(l==null?void 0:l.filter);return r?sc(l==null?void 0:l.contents,{position:r}):l==null?void 0:l.contents},np=l=>{const r=tc(l==null?void 0:l.filter);return r?sc(l==null?void 0:l.contents,{size:r}):l==null?void 0:l.contents},ip=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;const n=Number(l==null?void 0:l.filter);return r.push({key:"textSize",contents:Number.isNaN(n)?l==null?void 0:l.filter:n}),r}return l==null?void 0:l.contents},op=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;return r.push({key:"textRGBA",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},tp=l=>{var n;return(l==null?void 0:l.filter.toUpperCase())==="ALL"||(l==null?void 0:l.filter.toUpperCase())==="NONE"?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(i=>{var s;return(i==null?void 0:i.key)==="tableContents"&&(i.contents=(s=i.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),i})},sp=async l=>{var r,n,i,s,c,m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z;if((l==null?void 0:l.filter)==="Random")return(r=l==null?void 0:l.contents)==null?void 0:r.map(ae=>((ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=Ze.shuffle(ae.contents)),ae));if((l==null?void 0:l.filter)==="Auto"){let he=(i=(n=l==null?void 0:l.contents)==null?void 0:n.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:i.contents;Array.isArray(he==null?void 0:he[0])&&(he=he==null?void 0:he[0]),he=na.getColumnChild(he);let ae=he==null?void 0:he.filter(Ne=>(Ne==null?void 0:Ne.filter)&&(Ne==null?void 0:Ne.filter)!==""),ue=new Map,Se=[];ae==null||ae.forEach(Ne=>{var we,Ke;ue.get((we=Ne==null?void 0:Ne.menus)==null?void 0:we.join("/"))||(ue.set((Ke=Ne==null?void 0:Ne.menus)==null?void 0:Ke.join("/"),Ne),Se.push(Ne))});let Ve=(c=(s=mn==null?void 0:mn.value)==null?void 0:s.find(Ne=>(Ne==null?void 0:Ne.condition)==="child"))==null?void 0:c.value,ge=Se==null?void 0:Se.map(Ne=>{var we,Ke,ua;return Ne=(we=Ne==null?void 0:Ne.menus)==null?void 0:we.join("/"),(Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])==="/"&&((ua=(Ke=mn==null?void 0:mn.value)==null?void 0:Ke.find(za=>(za==null?void 0:za.condition)==="child"))==null?void 0:ua.parentContent)+"/"!==Ne?Ne=Ne+Ve:(Ne==null?void 0:Ne[(Ne==null?void 0:Ne.length)-1])==="/"&&(Ne=Ne==null?void 0:Ne.slice(0,(Ne==null?void 0:Ne.length)-1)),Ne}),T=Se==null?void 0:Se.map(Ne=>Ne==null?void 0:Ne.groups),q=ge==null?void 0:ge.map(async Ne=>{let we=await Kr(Ne,!1);return{path:Ne,contents:we}});q=await Promise.all(q);let ne=q==null?void 0:q.map((Ne,we)=>{var ua,za,le,Te,Me,Ue,Re;let Ke=(ua=Ne==null?void 0:Ne.contents)==null?void 0:ua.filter(oe=>{var Ie,He;return(oe==null?void 0:oe.name)===((He=T==null?void 0:T[we])==null?void 0:He[((Ie=T==null?void 0:T[we])==null?void 0:Ie.length)-1])});return Ke=(Te=(le=(za=Ke==null?void 0:Ke[0])==null?void 0:za.compData)==null?void 0:le.find(oe=>(oe==null?void 0:oe.key)==="tableContents"))==null?void 0:Te.contents,(Ne==null?void 0:Ne.path)===((Ue=(Me=mn==null?void 0:mn.value)==null?void 0:Me.find(oe=>(oe==null?void 0:oe.condition)==="child"))==null?void 0:Ue.parentContent)&&(Ke=((Re=Ke==null?void 0:Ke.map(oe=>{for(let Ie in oe)if(oe[Ie]===Ve)return oe}))==null?void 0:Re.filter(oe=>oe))??[]),Ke??[]});if(ne=ne==null?void 0:ne.map(Ne=>(Ne=Ne==null?void 0:Ne.map(we=>{var ua;let Ke={};for(let za in we)if(ae!=null&&ae.find(le=>{var Te,Me;return((Me=(Te=le==null?void 0:le.words)==null?void 0:Te[0])==null?void 0:Me.replaceAll("'",""))===za})){let le=(ua=ae==null?void 0:ae.find(Te=>{var Me,Ue;return((Ue=(Me=Te==null?void 0:Te.words)==null?void 0:Me[0])==null?void 0:Ue.replaceAll("'",""))===za}))==null?void 0:ua.prop;Ke[le]=we==null?void 0:we[za]}return Ke}),Ne)),ne=Ze.cartesianProduct(ne),Array.isArray(ne==null?void 0:ne[0])&&(ne=ne==null?void 0:ne[0]),(ne==null?void 0:ne.length)>0&&((x=(p=(m=ae==null?void 0:ae[0])==null?void 0:m.menus)==null?void 0:p.join("/"))==null?void 0:x[((u=(y=(h=ae==null?void 0:ae[0])==null?void 0:h.menus)==null?void 0:y.join("/"))==null?void 0:u.length)-1])==="/")return(D=l==null?void 0:l.contents)==null?void 0:D.map(we=>{var Ke;return(we==null?void 0:we.key)==="tableContents"&&(ne==null?void 0:ne.length)>0&&(we.contents=((Ke=we.contents)==null?void 0:Ke.length)>0?we.contents:ne),we})}if((l==null?void 0:l.filter)==="Manual"){let he=[],ae=[],ue=(E=(R=l==null?void 0:l.contents)==null?void 0:R.find(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:E.contents;(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])===")"?ue=(M=(K=ue==null?void 0:ue.replace("(",kr))==null?void 0:K.split(kr))==null?void 0:M[0]:ue="",ue!==""&&(he=((j=(L=ue==null?void 0:ue.split("*"))==null?void 0:L[0])==null?void 0:j.split(":"))??[],ae=((g=(k=(S=(_=(C=ue==null?void 0:ue.split("*"))==null?void 0:C[1])==null?void 0:_.replace("{",kr))==null?void 0:S.split(kr))==null?void 0:k[0])==null?void 0:g.split(":"))??[]);let Se=($=(P=l==null?void 0:l.contents)==null?void 0:P.find(T=>(T==null?void 0:T.key)==="filter"))==null?void 0:$.contents;Se=(pe=(Y=Se==null?void 0:Se.replace("(",kr))==null?void 0:Y.split(kr))==null?void 0:pe[1],Se=Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1);let Ve=(ze=l==null?void 0:l.contents)==null?void 0:ze.map(T=>{var q,ne,Ne,we,Ke,ua,za,le,Te;return(T==null?void 0:T.key)==="header"&&((q=T==null?void 0:T.contents)!=null&&q.every(Me=>(Me==null?void 0:Me.mainKey)!==!0)&&Array.isArray(T==null?void 0:T.contents)&&!Array.isArray((ne=T==null?void 0:T.contents)==null?void 0:ne[0])?T.contents=(Ne=T==null?void 0:T.contents)==null?void 0:Ne.map((Me,Ue)=>{var Re,oe,Ie;return Me!=null&&Me.isMainPath||(Ue===0?(Me.mainKey=!0,Me.formType="Select",Me.bindMenus=he,Me.groups=((Re=Me.groups)==null?void 0:Re.length)===0?ae:Me.groups,Me.words=((oe=Me.words)==null?void 0:oe.length)===0?[Me==null?void 0:Me.prop]:Me.words,Me.filter=Se,(!(Me!=null&&Me.menus)||((Ie=Me==null?void 0:Me.menus)==null?void 0:Ie.length)===0)&&(Me.menus=he)):(Me.mainKey=!1,Me.bindMenus=he)),Me}):Array.isArray((we=T==null?void 0:T.contents)==null?void 0:we[0])&&((za=(ua=(Ke=T==null?void 0:T.contents)==null?void 0:Ke[0])==null?void 0:ua.filter(()=>(he==null?void 0:he.length)>0))==null?void 0:za.length)>0&&(T.contents[0]=(Te=(le=T==null?void 0:T.contents)==null?void 0:le[0])==null?void 0:Te.map((Me,Ue)=>{var Re,oe,Ie;return Me!=null&&Me.isMainPath||(Ue===0?(Me.mainKey=!0,Me.formType="Select",Me.bindMenus=he,Me.groups=((Re=Me.groups)==null?void 0:Re.length)===0?ae:Me.groups,Me.words=((oe=Me.words)==null?void 0:oe.length)===0?[Me==null?void 0:Me.prop]:Me.words,Me.filter=Se,(!(Me!=null&&Me.menus)||Array.isArray(Me==null?void 0:Me.menus)&&((Ie=Me==null?void 0:Me.menus)==null?void 0:Ie.length)===0)&&(he==null?void 0:he.length)>0&&(Me.menus=he)):(Me.mainKey=!1,Me.bindMenus=he)),Me}))),T}),ge=(de=Ve==null?void 0:Ve.find(T=>(T==null?void 0:T.key)==="header"))==null?void 0:de.contents;if(Array.isArray(ge==null?void 0:ge[0])&&(ge=ge==null?void 0:ge[0]),ge=na.getColumnChild(ge),ge!=null&&ge.some(T=>{var q,ne;return((ne=T==null?void 0:T.menus)==null?void 0:ne[((q=T==null?void 0:T.menus)==null?void 0:q.length)-1])===""})){let T=(Z=mn==null?void 0:mn.value)==null?void 0:Z.find(q=>(q==null?void 0:q.condition)==="child");Ve=ep(Ve,T)}return Ve}return l==null?void 0:l.contents},cp=async l=>{if((l==null?void 0:l.filter)==="Ordin"){let r=l==null?void 0:l.contents;return r.push({key:"enableWrap",contents:1}),r}if((l==null?void 0:l.filter)==="Block"){let r=l==null?void 0:l.contents;return r.push({key:"enableWrap",contents:2}),r}if((l==null?void 0:l.filter)==="Text"){let r=l==null?void 0:l.contents;return r.push({key:"enableWrap",contents:3}),r}return l==null?void 0:l.contents},up=l=>{var i,s,c,m;let r=l==null?void 0:l.filter;if(r!=null&&r.includes("*")&&(r="({"+((s=(i=r==null?void 0:r.replace("{",kr))==null?void 0:i.split(kr))==null?void 0:s[1])),r=(c=r==null?void 0:r.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return l==null?void 0:l.contents;let n=na.calculatorAndToOr(r);if((n==null?void 0:n.length)>0){let p=[];return n==null||n.forEach(y=>{let u={};for(let x in y){let D=x;D!=null&&D.includes("[")||(u[D]=y[x])}p.push(u)}),(m=l==null?void 0:l.contents)==null?void 0:m.map(y=>{var x,D,R;let u=(D=(x=l==null?void 0:l.contents)==null?void 0:x.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:D.contents;if(u=(R=na.getEqualChild(u))==null?void 0:R.filter(E=>(E==null?void 0:E.label)!=="操作"),(y==null?void 0:y.key)==="tableContents"){let K=na.tableToForm(y==null?void 0:y.contents,u);p==null||p.forEach(M=>{var L,j;for(let C in M)!((L=K==null?void 0:K[0])!=null&&L.find(_=>{var S;return(_==null?void 0:_.key)===C||((S=_==null?void 0:_.key)==null?void 0:S.includes(C))}))&&!(K!=null&&K.find(_=>{var S;return(_==null?void 0:_.key)===C||((S=_==null?void 0:_.key)==null?void 0:S.includes(C))}))||(((j=M[C])==null?void 0:j[0])!=="!"?K=K==null?void 0:K.filter(_=>{var S,k;return((S=_==null?void 0:_.find(g=>{var P;return(g==null?void 0:g.key)===C||((P=g==null?void 0:g.key)==null?void 0:P.includes(C))}))==null?void 0:S.value)===M[C]||Array.isArray(M==null?void 0:M[C])&&((k=M==null?void 0:M[C])==null?void 0:k.find(g=>{var P;return((P=_==null?void 0:_.find($=>{var Y;return($==null?void 0:$.key)===C||((Y=$==null?void 0:$.key)==null?void 0:Y.includes(C))}))==null?void 0:P.value)===g}))}):K=K==null?void 0:K.filter(_=>{var S;return((S=_==null?void 0:_.find(k=>{var g;return(k==null?void 0:k.key)===C||((g=k==null?void 0:k.key)==null?void 0:g.includes(C))}))==null?void 0:S.value)!==M[C]}))}),(K==null?void 0:K.length)===0?y.contents=[]:y.contents=K==null?void 0:K.map(M=>{let L={};return M==null||M.forEach(j=>{L[j==null?void 0:j.key]=j==null?void 0:j.value}),L})}return y})}return l==null?void 0:l.contents},dp=l=>l==null?void 0:l.contents,pp=l=>l==null?void 0:l.contents,fp=l=>{var r,n,i,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let c=(i=(n=l==null?void 0:l.filter)==null?void 0:n.slice(1,((r=l==null?void 0:l.filter)==null?void 0:r.length)-1))==null?void 0:i.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(p=>((p==null?void 0:p.key)==="header"&&(p.contents=yt(p.contents,c)),p))}return l==null?void 0:l.contents},hp=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(m=>({label:m,prop:m}))),s}):l==null?void 0:l.contents},vp=l=>l==null?void 0:l.contents,mp=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(m=>({label:m,prop:m}))),s}):l==null?void 0:l.contents},yp=l=>{var n;let r=(l==null?void 0:l.filter)??"";if((r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""){let i=l==null?void 0:l.contents,s=(n=r==null?void 0:r.split(","))==null?void 0:n.map(c=>({label:c,prop:c}));return i.push({key:"bottomButton",contents:s}),i}return l==null?void 0:l.contents},gp=l=>{var r;return(l==null?void 0:l.filter)==="Read"?(r=l==null?void 0:l.contents)==null?void 0:r.map(i=>{var s;return(i==null?void 0:i.key)==="formContent"&&(i.contents=(s=i.contents)==null?void 0:s.map(c=>(c.isNoClick=!0,c))),i}):l==null?void 0:l.contents},bp=l=>{var r;if(l!=null&&l.filter){const n=parseInt(l==null?void 0:l.filter);return!n||Number.isNaN(n)?l==null?void 0:l.contents:(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var c;return(s==null?void 0:s.key)==="formContent"&&(s.contents=(c=s.contents)==null?void 0:c.map(m=>(m.width=n,m))),s})}return l==null?void 0:l.contents},kp=l=>{var r,n,i,s;if(((r=l==null?void 0:l.filter)==null?void 0:r[0])!=="["){const c=parseInt(l==null?void 0:l.filter);return!c||Number.isNaN(c)?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(p=>{var h;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(h=p.contents)==null?void 0:h.map(y=>(y.width=c,y))),p})}if(((i=l==null?void 0:l.filter)==null?void 0:i[0])==="["){let c=Ni(l==null?void 0:l.filter),m=Array.isArray(c)?c.map(h=>parseInt(h)).filter(h=>!!h&&!Number.isNaN(h)):[];return m.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(h=>{if((h==null?void 0:h.key)==="formContent"){const y=h.contents??[];h.contents=y.map((u,x)=>{const D=x+1;let R=0,E=0;for(let M=0;M<m.length;M++){if(E+=m[M],D<=E){R=M;break}M===m.length-1&&(R=m.length-1)}const K=m[R]||m[m.length-1]||1;return u.width=K,u})}return h}):l==null?void 0:l.contents}return l==null?void 0:l.contents},xp=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var c,m,p;return(s==null?void 0:s.key)==="header"&&(Array.isArray((c=s==null?void 0:s.contents)==null?void 0:c[0])?s.contents[0]=(p=s.contents[0])==null?void 0:p.map(h=>(n!=null&&n.find(y=>y===(h==null?void 0:h.prop))&&(h.fixed="left"),h)):s.contents=(m=s.contents)==null?void 0:m.map(h=>(n!=null&&n.find(y=>y===(h==null?void 0:h.prop))&&(h.fixed="left"),h))),s})}return l==null?void 0:l.contents},wp=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;(n==null?void 0:n[0])==="("&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const i=c=>(n!=null&&n.find(m=>m===(c==null?void 0:c.prop))&&(c.required=!0),c!=null&&c.children&&Array.isArray(c.children)&&(c.children=c.children.map(m=>i(m))),c);return(r=l==null?void 0:l.contents)==null?void 0:r.map(c=>{var m,p,h;return(c==null?void 0:c.key)==="header"&&(Array.isArray((m=c==null?void 0:c.contents)==null?void 0:m[0])?c.contents[0]=(h=c.contents[0])==null?void 0:h.map(y=>i(y)):c.contents=(p=c.contents)==null?void 0:p.map(y=>i(y))),c})}return l==null?void 0:l.contents},_p=async l=>{var i,s,c,m,p,h,y,u,x,D,R,E,K,M,L,j,C;const r=O.useUnit(O.pinia),{chooseTitle:n}=O.storeToRefs(r);if((l==null?void 0:l.filter)==="true"){let _=await Kr(((s=(i=n==null?void 0:n.value)==null?void 0:i[0])==null?void 0:s.parentContent)??((m=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:m.relatedContent),!1),S=(h=(p=n==null?void 0:n.value)==null?void 0:p[0])==null?void 0:h.value;(u=(y=_==null?void 0:_[0])==null?void 0:y.compData)!=null&&u.find($=>($==null?void 0:$.key)==="header")?_=(x=_==null?void 0:_[0])==null?void 0:x.compData:_=(R=(D=_==null?void 0:_.filter($=>{var Y;return(Y=$==null?void 0:$.compData)==null?void 0:Y.find(pe=>(pe==null?void 0:pe.key)==="header")}))==null?void 0:D[0])==null?void 0:R.compData;let k=(E=_==null?void 0:_.find($=>($==null?void 0:$.key)==="header"))==null?void 0:E.contents;Array.isArray(k==null?void 0:k[0])&&(k=k==null?void 0:k[0]),k=((K=k==null?void 0:k.find($=>$==null?void 0:$.isMainKey))==null?void 0:K.prop)??((M=k==null?void 0:k[0])==null?void 0:M.prop);let g=(j=(L=_==null?void 0:_.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:L.contents)==null?void 0:j.find($=>($==null?void 0:$[k])===S);return(C=l==null?void 0:l.contents)==null?void 0:C.map($=>{var Y;return($==null?void 0:$.key)==="formContent"&&($.contents=(Y=$.contents)==null?void 0:Y.map(pe=>(pe.value=g==null?void 0:g[pe==null?void 0:pe.prop],pe))),$})}return l==null?void 0:l.contents},Sp=l=>{var r,n,i,s,c;if((r=l==null?void 0:l.extra)!=null&&r.row){let m=l==null?void 0:l.filter;if(m!=null&&m.includes("*")&&(m="({"+((i=(n=m==null?void 0:m.replace("{",kr))==null?void 0:n.split(kr))==null?void 0:i[1])),m=(s=m==null?void 0:m.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(m==null?void 0:m[0])!=="("&&(m="("+m+")"),m.slice(1,(m==null?void 0:m.length)-1)==="undefined")return l==null?void 0:l.contents;let p=na.calculatorAndToOr(m),h=p==null?void 0:p[0],y=(c=l==null?void 0:l.extra)==null?void 0:c.row,u=[];for(let x in h)(h==null?void 0:h[x])===(y==null?void 0:y[x])?u.push(!0):u.push(!1);return u!=null&&u.every(x=>x===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},Ep=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"tab",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Cp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"choice",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Dp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"fixType",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Np=l=>{var r;if(l!=null&&l.filter){let n=l==null?void 0:l.contents,i=l==null?void 0:l.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=(r=Ze.analyzeSplitToContent(i,","))==null?void 0:r.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),s)),n.push({key:"stepName",contents:i}),n}return l==null?void 0:l.contents},Tp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"step",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.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(l,r)=>{var c,m,p,h,y,u,x,D,R,E,K,M;let n="";if(((c=l==null?void 0:l.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(m=l==null?void 0:l.find(L=>(L==null?void 0:L.key)==="filter"))==null?void 0:m.contents),n===""||!n)return l;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(h=(p=n==null?void 0:n.replace("(",kr))==null?void 0:p.split(kr))==null?void 0:h[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(y=Ze.analyzeSplitToContent(n,","))==null?void 0:y.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L!=null&&L.includes("(")||(L=L==null?void 0:L.replaceAll(":","=")),L)),s=l;for(let L in i){let j,C="";j=(D=(x=(u=i==null?void 0:i[L])==null?void 0:u.replace("=",kr))==null?void 0:x.split(kr))==null?void 0:D[0],C=(K=(E=(R=i==null?void 0:i[L])==null?void 0:R.replace("=",kr))==null?void 0:E.split(kr))==null?void 0:K[1];let _=(M=yn==null?void 0:yn.find(S=>(S==null?void 0:S.key)===j))==null?void 0:M.value;if(_){const S=oc[_];s=await S({contents:s,filter:C})}}return s},Nt=async(l,r)=>{var m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$;let n="";if(((m=l==null?void 0:l.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:m.contents)!==""&&(n=(p=l==null?void 0:l.find(Y=>(Y==null?void 0:Y.key)==="filter"))==null?void 0:p.contents),n===""||!n)return l;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(y=(h=n==null?void 0:n.replace("(",kr))==null?void 0:h.split(kr))==null?void 0:y[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let i=(u=Ze.analyzeSplitToContent(n,","))==null?void 0:u.map(Y=>((Y==null?void 0:Y[(Y==null?void 0:Y.length)-1])===","&&(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1)),Y!=null&&Y.includes("(")||(Y=Y==null?void 0:Y.replaceAll(":","=")),Y)),s=l,c=new Map;i==null||i.forEach(Y=>{var ze,de,Z;let pe=(ze=Y==null?void 0:Y.split("="))==null?void 0:ze[0];if(pe==="@MainPam"&&c.get(pe)){let he=c.get(pe);he=he==null?void 0:he.slice(0,(he==null?void 0:he.length)-1);let ae=(Z=(de=Y==null?void 0:Y.replace("{",kr))==null?void 0:de.split(kr))==null?void 0:Z[1];ae=he+","+ae,c.set(pe,ae)}else c.set(pe,Y)}),i=Array.from(c.values()),i=i==null?void 0:i.sort((Y,pe)=>{var ze,de;return((ze=yn==null?void 0:yn.find(Z=>pe==null?void 0:pe.includes(Z==null?void 0:Z.key)))==null?void 0:ze.order)-((de=yn==null?void 0:yn.find(Z=>Y==null?void 0:Y.includes(Z==null?void 0:Z.key)))==null?void 0:de.order)});for(let Y in i){let pe,ze="";(x=i==null?void 0:i[Y])!=null&&x.includes("(")&&((D=i==null?void 0:i[Y])!=null&&D.includes("@If"))?(pe=(K=(E=(R=i==null?void 0:i[Y])==null?void 0:R.replace("(",kr))==null?void 0:E.split(kr))==null?void 0:K[0],ze="("+((j=(L=(M=i==null?void 0:i[Y])==null?void 0:M.replace("(",kr))==null?void 0:L.split(kr))==null?void 0:j[1])):(pe=(S=(_=(C=i==null?void 0:i[Y])==null?void 0:C.replace("=",kr))==null?void 0:_.split(kr))==null?void 0:S[0],ze=(P=(g=(k=i==null?void 0:i[Y])==null?void 0:k.replace("=",kr))==null?void 0:g.split(kr))==null?void 0:P[1]);let de=($=yn==null?void 0:yn.find(Z=>(Z==null?void 0:Z.key)===pe))==null?void 0:$.value;if(de){const Z=oc[de];s=await Z({contents:s,filter:ze,extra:r})}}return s},tc=l=>{if(l==null)return null;const r=String(l).trim();if(!r.startsWith("(")||!r.endsWith(")"))return null;const n=r.slice(1,-1).split(",").map(i=>Number(i.trim()));return n.length<2||n.some(i=>Number.isNaN(i))?null:[n[0],n[1]]},sc=(l,r)=>{var K,M,L,j,C;const n=Array.isArray(l)?l:[],i=n.find(_=>(_==null?void 0:_.key)==="formContent"),s=Array.isArray(i==null?void 0:i.contents)?i.contents:[],c=((K=n.find(_=>(_==null?void 0:_.key)==="_gridLayoutMeta"))==null?void 0:K.contents)??{},m=(s==null?void 0:s[0])??{};let p=((M=r==null?void 0:r.position)==null?void 0:M[0])??(c==null?void 0:c._positionStartRow)??(m==null?void 0:m._positionStartRow),h=((L=r==null?void 0:r.position)==null?void 0:L[1])??(c==null?void 0:c._positionRowSpan)??(m==null?void 0:m._positionRowSpan);(!p||Number.isNaN(p)||p<1)&&(p=1),(!h||Number.isNaN(h)||h<1)&&(h=1);let y=((j=r==null?void 0:r.size)==null?void 0:j[0])??(c==null?void 0:c._sizeStart)??(m==null?void 0:m._sizeStart),u=((C=r==null?void 0:r.size)==null?void 0:C[1])??(c==null?void 0:c._sizeEnd)??(m==null?void 0:m._sizeEnd);(y===void 0||Number.isNaN(y))&&(y=0),(u===void 0||Number.isNaN(u))&&(u=1),y=Math.max(0,Math.min(1,y)),u=Math.max(0,Math.min(1,u)),u<=y&&(y=0,u=1);const x=u-y,D=Math.max(1,Math.round(1/x));let R=n.map(_=>{if((_==null?void 0:_.key)!=="formContent")return _;const S=Array.isArray(_==null?void 0:_.contents)?_.contents:[];return{..._,contents:S.map(k=>({...k,width:D,_positionStartRow:p,_positionRowSpan:h,_sizeStart:y,_sizeEnd:u}))}});const E={_positionStartRow:p,_positionRowSpan:h,_sizeStart:y,_sizeEnd:u};return R.some(_=>(_==null?void 0:_.key)==="_gridLayoutMeta")?R=R.map(_=>(_==null?void 0:_.key)==="_gridLayoutMeta"?{..._,contents:E}:_):R.push({key:"_gridLayoutMeta",contents:E}),R};let ho="$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(l,r,n=!0)=>{let i=[],s=l==null?void 0:l.map(async c=>{var x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia,se,U,W,Be,ke,ra,oa,_a,ga,Pa,ma,Oe,Ra,hl,Cl,Xl,xl,Vl,Wa,Rl;let m=(E=(R=(D=(x=c==null?void 0:c.contents)==null?void 0:x.find(ja=>{var ka;return(ka=ja==null?void 0:ja.key)==null?void 0:ka.includes("struct")}))==null?void 0:D.value)==null?void 0:R[0])==null?void 0:E.类型,p=Object.values(c==null?void 0:c.name);p=p==null?void 0:p.reverse();let h=(K=c==null?void 0:c.contents)==null?void 0:K.map(ja=>ja==null?void 0:ja.key),y={comp:m,isShow:c==null?void 0:c.is_show,name:p==null?void 0:p[0],id:c==null?void 0:c.object_id,order_no:c==null?void 0:c.order_no,relatedTables:h,menuFilter:(M=c==null?void 0:c.filter)==null?void 0:M.menuFilter,status:c==null?void 0:c.status,fatherSyncContents:(L=c==null?void 0:c.filter)==null?void 0:L.fatherSyncs,relatedQuotes:(j=c==null?void 0:c.filter)==null?void 0:j.quotes,sonSyncContents:(C=c==null?void 0:c.filter)==null?void 0:C.sonSyncs,nameContents:(_=O.cloneDeep(p))==null?void 0:_.reverse()};for(let ja in p)parseInt(ja)>=1&&(y[`name${parseInt(ja)-1}`]=p[ja]);let u=Array.isArray((S=c==null?void 0:c.filter)==null?void 0:S.menuFilter)?(k=c==null?void 0:c.filter)==null?void 0:k.menuFilter:[];if(((g=u==null?void 0:u.filter(ja=>ja==null?void 0:ja.includes("@Filter")))==null?void 0:g.length)>0){let ja=u==null?void 0:u.filter(aa=>aa==null?void 0:aa.includes("@Filter"));ja=ja==null?void 0:ja[0],ja=($=(P=ja==null?void 0:ja.replace("(",ho))==null?void 0:P.split(ho))==null?void 0:$[1],ja=ja==null?void 0:ja.slice(0,(ja==null?void 0:ja.length)-1),ja!=null&&ja.includes("*")&&(ja=(pe=(Y=ja==null?void 0:ja.replace("{",ho))==null?void 0:Y.split(ho))==null?void 0:pe[1],ja=ja==null?void 0:ja.replace("}","")),ja=na.calculatorAndToOr(ja);let ka=(r==null?void 0:r.originPath)??"";(ka==null?void 0:ka[(ka==null?void 0:ka.length)-1])==="/"&&(ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1));let Na=await Kr(ka,!1),$a=(ze=Na==null?void 0:Na.filter(aa=>(aa==null?void 0:aa.comp)==="Table"))==null?void 0:ze[0];$a=(Z=(de=$a==null?void 0:$a.compData)==null?void 0:de.find(aa=>(aa==null?void 0:aa.key)==="tableContents"))==null?void 0:Z.contents;let Xa=(ae=(he=zp.value)==null?void 0:he.find(aa=>(aa==null?void 0:aa.condition)==="child"))==null?void 0:ae.value;$a=(ue=$a==null?void 0:$a.map(aa=>{for(let Va in aa)if((aa==null?void 0:aa[Va])===Xa)return aa}))==null?void 0:ue.filter(aa=>aa),$a=$a==null?void 0:$a[0],ja=ja==null?void 0:ja[0];let Za=[];for(let aa in ja){let Va="";Ya.isObject($a)&&(Va=(Ve=(Se=Object.keys($a))==null?void 0:Se.filter(ye=>ye==null?void 0:ye.includes("."+aa)))==null?void 0:Ve[0]),Va!==""&&($a!=null&&$a[Va])&&(ja==null?void 0:ja[aa])===($a==null?void 0:$a[Va])||$a!=null&&$a[aa]&&(ja==null?void 0:ja[aa])===($a==null?void 0:$a[aa])?Za.push(!0):Za.push(!1)}if(Za!=null&&Za.some(aa=>aa===!1)&&((T=r==null?void 0:r.originPath)==null?void 0:T[((ge=r==null?void 0:r.originPath)==null?void 0:ge.length)-1])!=="/")return}if(m==="Table"||m==="Method"){let ja=((q=c==null?void 0:c.contents)==null?void 0:q.find(Le=>{var re;return(re=Le==null?void 0:Le.key)==null?void 0:re.includes("content")}))||[],ka=[];y.comp="Table",ja.value=(ne=ja==null?void 0:ja.value)==null?void 0:ne.sort((Le,re)=>parseInt(Le==null?void 0:Le.id)-parseInt(re==null?void 0:re.id)),ja.value=(Ne=ja==null?void 0:ja.value)==null?void 0:Ne.map(Le=>{let re={};for(let ea in Le)JSON.stringify(Le==null?void 0:Le[ea])==="{}"?re[ea]="":re[ea]=Le==null?void 0:Le[ea];return re}),ka.push({key:"tableContents",contents:ja==null?void 0:ja.value});let Na=(le=(za=(ua=(Ke=(we=c==null?void 0:c.contents)==null?void 0:we.find(Le=>{var re;return(re=Le==null?void 0:Le.key)==null?void 0:re.includes("struct")}))==null?void 0:Ke.value)==null?void 0:ua[0])==null?void 0:za.结构)==null?void 0:le.contents;Array.isArray(Na==null?void 0:Na[0])?Na[0]=(Te=Na==null?void 0:Na[0])==null?void 0:Te.filter(Le=>(Le==null?void 0:Le.prop)!=="sort"&&(Le==null?void 0:Le.prop)!=="relatedId"):Na=Na==null?void 0:Na.filter(Le=>(Le==null?void 0:Le.prop)!=="sort"&&(Le==null?void 0:Le.prop)!=="relatedId"),ka.push({key:"header",contents:Na}),ka.push({key:"filter",contents:(Ie=(oe=(Re=(Ue=(Me=c==null?void 0:c.contents)==null?void 0:Me.find(Le=>{var re;return(re=Le==null?void 0:Le.key)==null?void 0:re.includes("struct")}))==null?void 0:Ue.value)==null?void 0:Re[0])==null?void 0:oe.引用)==null?void 0:Ie.contents});let $a=Mp,Xa=O.cloneDeep(Ip);m==="Method"&&Xa.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(Na==null?void 0:Na[0])&&((He=Na==null?void 0:Na[0])==null?void 0:He.prop)==="disabled"&&($a=Op,Xa=Lp);const Za=["推力","真空","压力","温度","流量"],aa=y.name;aa&&Za.includes(aa)&&($a=[...$a],$a.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let Va=[];if(!Array.isArray(Na==null?void 0:Na[0])&&(Na!=null&&Na.some(Le=>{var re;return(Le==null?void 0:Le.calculatorFilter)&&((re=Le==null?void 0:Le.calculatorFilter)==null?void 0:re.includes("Manual"))}))){let Le=(Ba=Na==null?void 0:Na.map(re=>re==null?void 0:re.calculatorFilter))==null?void 0:Ba.filter(re=>re&&(re==null?void 0:re.includes("Manual")));Le==null||Le.forEach(re=>{var pa;let ea=Ze.analyzeSplitToContent(re,",");if(ea=ea==null?void 0:ea.map(We=>((We==null?void 0:We[(We==null?void 0:We.length)-1])===","&&(We=We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1)),We)),ea!=null&&ea.find(We=>(We==null?void 0:We.includes("Extent"))&&(We==null?void 0:We.includes("Row")))&&(ea!=null&&ea.find(We=>(We==null?void 0:We.includes("Button"))&&(We==null?void 0:We.includes(","))))){let We=ea==null?void 0:ea.find(Sa=>Sa==null?void 0:Sa.includes("@FunctionButton"));We=(pa=We==null?void 0:We.split("="))==null?void 0:pa[1],We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1),We=We==null?void 0:We.split(","),We=We==null?void 0:We[(We==null?void 0:We.length)-1],Va.push(We)}}),Va=[...new Set(Va)],Va=Va==null?void 0:Va.map(re=>({label:re,prop:re,type:"methodButton"}))}else if(Array.isArray(Na==null?void 0:Na[0])&&((Oa=na.getColumnChild(Na==null?void 0:Na[0]))!=null&&Oa.some(Le=>{var re;return(Le==null?void 0:Le.calculatorFilter)&&((re=Le==null?void 0:Le.calculatorFilter)==null?void 0:re.includes("Manual"))}))){let Le=(H=(V=na.getColumnChild(Na==null?void 0:Na[0]))==null?void 0:V.map(re=>re==null?void 0:re.calculatorFilter))==null?void 0:H.filter(re=>re&&(re==null?void 0:re.includes("Manual")));Le==null||Le.forEach(re=>{var pa;let ea=Ze.analyzeSplitToContent(re,",");if(ea=ea==null?void 0:ea.map(We=>((We==null?void 0:We[(We==null?void 0:We.length)-1])===","&&(We=We==null?void 0:We.slice(0,(We==null?void 0:We.length)-1)),We)),ea!=null&&ea.find(We=>(We==null?void 0:We.includes("Extent"))&&(We==null?void 0:We.includes("Row")))&&(ea!=null&&ea.find(We=>(We==null?void 0:We.includes("Button"))&&(We==null?void 0:We.includes(","))))){let We=ea==null?void 0:ea.find(Sa=>Sa==null?void 0:Sa.includes("@FunctionButton"));We=(pa=We==null?void 0:We.split("="))==null?void 0:pa[1],We=We==null?void 0:We.slice(1,(We==null?void 0:We.length)-1),We=We==null?void 0:We.split(","),We=We==null?void 0:We[(We==null?void 0:We.length)-1],Va.push(We)}}),Va=[...new Set(Va)],Va=Va==null?void 0:Va.map(re=>({label:re,prop:re,type:"methodButton"}))}ka.push({key:"extraButton",contents:$a}),ka.push({key:"rowButton",contents:[...Xa,...Va]}),y.compData=await Nt(ka,r),(ee=y.compData)!=null&&ee.find(Le=>(Le==null?void 0:Le.key)==="tab")&&(y.tab=(me=(fe=y.compData)==null?void 0:fe.find(Le=>(Le==null?void 0:Le.key)==="tab"))==null?void 0:me.contents),(fa=y.compData)!=null&&fa.find(Le=>(Le==null?void 0:Le.key)==="step")&&(y.step=(ce=(Xe=y.compData)==null?void 0:Xe.find(Le=>(Le==null?void 0:Le.key)==="step"))==null?void 0:ce.contents),(_e=y.compData)!=null&&_e.find(Le=>(Le==null?void 0:Le.key)==="choice")&&(y.choice=(qe=(va=y.compData)==null?void 0:va.find(Le=>(Le==null?void 0:Le.key)==="choice"))==null?void 0:qe.contents);let ye="",xa=(La=y==null?void 0:y.compData)==null?void 0:La.filter(Le=>(Le==null?void 0:Le.key)==="fixType");(xa==null?void 0:xa.length)>0&&n&&(ye=(Ma=xa==null?void 0:xa[0])==null?void 0:Ma.contents,y.comp=ye)}else if(m==="Form"){let ja=[],ka=(se=(ia=(Je=c==null?void 0:c.contents)==null?void 0:Je.find(aa=>{var Va;return(Va=aa==null?void 0:aa.key)==null?void 0:Va.includes("content")}))==null?void 0:ia.value)==null?void 0:se[0],Na=[],$a=Array.isArray((U=c==null?void 0:c.filter)==null?void 0:U.menuFilter)?(W=c==null?void 0:c.filter)==null?void 0:W.menuFilter:[];$a==null||$a.forEach(aa=>{if(aa!=null&&aa.includes("@Param(Hide=Yes, prop=")||aa!=null&&aa.includes("@Interface(Hide=Yes, prop=")){const Va=aa==null?void 0:aa.match(/prop=([^,)]+)/);Va!=null&&Va[1]&&Na.push(Va==null?void 0:Va[1])}});let Xa=(_a=(oa=(ra=(ke=(Be=c==null?void 0:c.contents)==null?void 0:Be.find(aa=>{var Va;return(Va=aa==null?void 0:aa.key)==null?void 0:Va.includes("struct")}))==null?void 0:ke.value)==null?void 0:ra[0])==null?void 0:oa.结构)==null?void 0:_a.contents,Za=(ga=Xa==null?void 0:Xa.map(aa=>(aa.value=ka==null?void 0:ka[aa==null?void 0:aa.prop],aa)))==null?void 0:ga.filter(aa=>(aa==null?void 0:aa.prop)!=="sort"&&(aa==null?void 0:aa.prop)!=="relatedId");Za=Za==null?void 0:Za.map(aa=>(Na!=null&&Na.includes(aa==null?void 0:aa.prop)&&(aa.isHideInForm=!0),aa)),ja.push({key:"filter",contents:(hl=(Ra=(Oe=(ma=(Pa=c==null?void 0:c.contents)==null?void 0:Pa.find(aa=>{var Va;return(Va=aa==null?void 0:aa.key)==null?void 0:Va.includes("struct")}))==null?void 0:ma.value)==null?void 0:Oe[0])==null?void 0:Ra.引用)==null?void 0:hl.contents}),ja.push({key:"formContent",contents:Za}),ja.push({key:"paramHideProps",contents:Na}),y.compData=await Bp(ja),(Cl=y.compData)!=null&&Cl.find(aa=>(aa==null?void 0:aa.key)==="tab")&&(y.tab=(xl=(Xl=y.compData)==null?void 0:Xl.find(aa=>(aa==null?void 0:aa.key)==="tab"))==null?void 0:xl.contents),(Vl=y.compData)!=null&&Vl.find(aa=>(aa==null?void 0:aa.key)==="step")&&(y.step=(Rl=(Wa=y.compData)==null?void 0:Wa.find(aa=>(aa==null?void 0:aa.key)==="step"))==null?void 0:Rl.contents)}return y});return i=await Promise.all(s),i},$p=O.useLoginState(O.pinia),{loginUserInfo:_i}=O.storeToRefs($p),gt=async(l,r,n="Manual",i=[])=>{var h;let s=l,c;Array.isArray(r==null?void 0:r[0])?c=na.getColumnChild(r==null?void 0:r[0]):c=r;let m=(h=c==null?void 0:c.filter(y=>{var u;return(y==null?void 0:y.calculatorFilter)&&((u=y==null?void 0:y.calculatorFilter)==null?void 0:u.includes(n))||(y==null?void 0:y.calculatorFilter)===""&&(y==null?void 0:y.functionName)}))==null?void 0:h.map(y=>({prop:y==null?void 0:y.prop,label:y==null?void 0:y.label,methods:y==null?void 0:y.calculatorFilter,functionName:y==null?void 0:y.functionName,functionRelatedWords:y==null?void 0:y.functionRelatedWords})),p=s==null?void 0:s.map(async y=>(y=await Hp(y,m,c,n,s,i),y));return p=await Promise.all(p),p},Rp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c;return Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=na.getValueToObjectValue(r,na.getColumnContents(s))),n==null||n.forEach(m=>{var p;if(r!=null&&r[m]){let h=r==null?void 0:r[m];c=c?h?Ze.isEqual(h.toString(),c.toString()):void 0:h}else{let h=(p=s==null?void 0:s.find(u=>(u==null?void 0:u.label)===m))==null?void 0:p.prop,y=(r==null?void 0:r[h])??0;c=c?y?Ze.isEqual(y.toString(),c.toString()):void 0:y}}),r[i]=c===void 0?void 0:c?1:0,r},xr=l=>{const[r,n,i]=O.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(r??0)*3600+(n??0)*60+(i??0)},Xn=l=>{const r=c=>c.toString().padStart(2,"0"),n=Math.floor(l/3600),i=Math.floor(l%3600/60),s=l%60;return`${r(n)}:${r(i)}:${parseInt(r(s))}`},Vp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=na.getValueToObjectValue(r,na.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,x,D,R,E,K,M,L;if(r!=null&&r[h]){if(c==="Row")if(!((u=((y=r==null?void 0:r[h])==null?void 0:y.toString())??"")!=null&&u.includes(":"))&&!((x=p==null?void 0:p.toString())!=null&&x.includes(":"))){let j=+(r==null?void 0:r[h]);p=p+j}else p=xr(p.toString())+xr((D=r==null?void 0:r[h])==null?void 0:D.toString()),p=Xn(p)}else if(c==="Row"){let j=(R=s==null?void 0:s.find(C=>(C==null?void 0:C.label)===h))==null?void 0:R.prop;if(!((K=Number.isNaN(r==null?void 0:r[j])?"":(E=r==null?void 0:r[j])==null?void 0:E.toString())!=null&&K.includes(":"))&&!((M=p==null?void 0:p.toString())!=null&&M.includes(":"))){let C=+((r==null?void 0:r[j])??0);p=p+C}else p=xr(p==null?void 0:p.toString())+xr((L=(r==null?void 0:r[j])??0)==null?void 0:L.toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(x=>{var D;return(x==null?void 0:x[y])??(x==null?void 0:x[(D=s==null?void 0:s.find(R=>(R==null?void 0:R.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let x=0;Number.isNaN(y)||(x=+y);let D=0;return Number.isNaN(u)||(D=+u),x+D},0)}return r[i]=p,r},Fp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=na.getValueToObjectValue(r,na.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,x,D,R,E,K;if(r!=null&&r[h]){if(c==="Row")if(!((u=(y=r==null?void 0:r[h])==null?void 0:y.toString())!=null&&u.includes(":"))&&!((x=p==null?void 0:p.toString())!=null&&x.includes(":"))){let M=+(r==null?void 0:r[h]);p=p===0?p+M:p-M}else p=p===0?xr(p.toString())+xr(r==null?void 0:r[h].toString()):xr(p.toString())-xr(r==null?void 0:r[h].toString()),p=Xn(p)}else if(c==="Row"){let M=(D=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===h))==null?void 0:D.prop;if(!((E=Number.isNaN(r==null?void 0:r[M])?"":(R=r==null?void 0:r[M])==null?void 0:R.toString())!=null&&E.includes(":"))&&!((K=p==null?void 0:p.toString())!=null&&K.includes(":"))){let L=+((r==null?void 0:r[M])??0);p=p===0?p+L:p-L}else p=p===0?xr(p.toString())+xr(((r==null?void 0:r[M])??0).toString()):xr(p.toString())-xr(((r==null?void 0:r[M])??0).toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(x=>{var D;return(x==null?void 0:x[y])??(x==null?void 0:x[(D=s==null?void 0:s.find(R=>(R==null?void 0:R.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let x=0;Number.isNaN(y)||(x=+y);let D=0;return Number.isNaN(u)||(D=+u),x-D},0)}return r[i]=p,r},Pp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=na.getValueToObjectValue(r,na.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,x,D,R,E,K;if(r!=null&&r[h]){if(c==="Row")if(!((u=(y=r==null?void 0:r[h])==null?void 0:y.toString())!=null&&u.includes(":"))&&!((x=p==null?void 0:p.toString())!=null&&x.includes(":"))){let M=+(r==null?void 0:r[h]);p=p===0?p+M:p*M}else p=p===0?xr(p.toString())+xr(r==null?void 0:r[h].toString()):xr(p.toString())*xr(r==null?void 0:r[h].toString()),p=Xn(p)}else if(c==="Row"){let M=(D=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===h))==null?void 0:D.prop;if(!(r!=null&&r[M]))p=void 0;else if(!((E=Number.isNaN(r==null?void 0:r[M])?"":(R=r==null?void 0:r[M])==null?void 0:R.toString())!=null&&E.includes(":"))&&!((K=p==null?void 0:p.toString())!=null&&K.includes(":"))){let L=+((r==null?void 0:r[M])??0);p=p===0?p+L:p*L}else p=p===0?xr(p.toString())+xr(((r==null?void 0:r[M])??0).toString()):xr(p.toString())*xr(((r==null?void 0:r[M])??0).toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(x=>{var D;return(x==null?void 0:x[y])??(x==null?void 0:x[(D=s==null?void 0:s.find(R=>(R==null?void 0:R.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let x=0;Number.isNaN(y)||(x=+y);let D=0;return Number.isNaN(u)||(D=+u),x*D},0)}return r[i]=p,r},jp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,i=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,m=l==null?void 0:l.allContents,p=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=na.getValueToObjectValue(r,na.getColumnContents(s))),n==null||n.forEach(h=>{var y,u,x,D,R,E,K;if(r!=null&&r[h]){if(c==="Row")if(!((u=(y=r==null?void 0:r[h])==null?void 0:y.toString())!=null&&u.includes(":"))&&!((x=p==null?void 0:p.toString())!=null&&x.includes(":"))){let M=+(r==null?void 0:r[h]);p=p===0?p+M:p/M}else p=p===0?xr(p.toString())+xr(r==null?void 0:r[h].toString()):xr(p.toString())/xr(r==null?void 0:r[h].toString()),p=Xn(p)}else if(c==="Row"){let M=(D=s==null?void 0:s.find(L=>(L==null?void 0:L.label)===h))==null?void 0:D.prop;if(!((E=Number.isNaN(r==null?void 0:r[M])?"":(R=r==null?void 0:r[M])==null?void 0:R.toString())!=null&&E.includes(":"))&&!((K=p==null?void 0:p.toString())!=null&&K.includes(":"))){let L=+((r==null?void 0:r[M])??0);p=p===0?p+L:p/L}else p=p===0?xr(p.toString())+xr(((r==null?void 0:r[M])??0).toString()):xr(p.toString())/xr(((r==null?void 0:r[M])??0).toString()),p=Xn(p)}}),c==="Column"){let h=[];n==null||n.forEach(y=>{let u=m==null?void 0:m.map(x=>{var D;return(x==null?void 0:x[y])??(x==null?void 0:x[(D=s==null?void 0:s.find(R=>(R==null?void 0:R.label)===y))==null?void 0:D.prop])});h=[...h,...u]}),p=h.reduce((y,u)=>{let x=0;Number.isNaN(y)||(x=+y);let D=0;return Number.isNaN(u)||(D=+u),x/D},0)}return r[i]=p.toFixed(2),r},vo={Sum:Vp,Substract:Fp,Multiple:Pp,Divide:jp,Compare:Rp},Hp=async(l,r,n,i="Auto",s,c=[])=>{var u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z;let m=l,p=[],h=await O.getPageDataApi({platId:parseInt((u=_i==null?void 0:_i.value)==null?void 0:u.plat_id),pageName:"menu"});h=(R=(D=(x=h==null?void 0:h.data)==null?void 0:x.result)==null?void 0:D.filter(he=>(he==null?void 0:he.property_name)===""))==null?void 0:R[0];let y=[];if(h!=null&&h.object_name){h=h==null?void 0:h.object_name;let he=await O.getPageDataApi({platId:parseInt((E=_i==null?void 0:_i.value)==null?void 0:E.plat_id),pageName:h});he=(C=(j=(L=(M=(K=he==null?void 0:he.data)==null?void 0:K.result)==null?void 0:M[0])==null?void 0:L.contents)==null?void 0:j.find(ae=>{var ue;return(ue=ae==null?void 0:ae.key)==null?void 0:ue.includes("content")}))==null?void 0:C.value,p=(_=he==null?void 0:he.map(ae=>({functionName:ae==null?void 0:ae.函数名称,functionContent:ae==null?void 0:ae.输出值})))==null?void 0:_.filter(ae=>(ae==null?void 0:ae.functionContent)!==""),p==null||p.forEach(ae=>{y.push(ae.functionName),vo[ae.functionName]=new Function("return "+ae.functionContent)()})}if((r==null?void 0:r.length)===0)return m;for(let he in r){let ae=(S=r==null?void 0:r[he])==null?void 0:S.functionName;const ue=vo==null?void 0:vo[ae];let Se=(k=r==null?void 0:r[he])==null?void 0:k.methods;if(Se=Ze.analyzeSplitToContent(Se,","),console.log(Se),(g=Se==null?void 0:Se.find(Ve=>Ve==null?void 0:Ve.includes("@FunctionType")))!=null&&g.includes(i)||(Se==null?void 0:Se.length)===0){let Ve=((Y=($=(P=Se==null?void 0:Se.find(ge=>ge==null?void 0:ge.includes("@FunctionExtent")))==null?void 0:P.replace(":","="))==null?void 0:$.split("="))==null?void 0:Y[1])??[];if(await new Function("return ")(),(y==null?void 0:y.length)>0&&y.find(ge=>ge===ae)){let ge="";try{let q=(pe=r==null?void 0:r[he])==null?void 0:pe.functionRelatedWords,ne=(c==null?void 0:c.length)>0?c==null?void 0:c.map(we=>{var Ke;return we==null?void 0:we[(Ke=r==null?void 0:r[he])==null?void 0:Ke.prop]}):["0"];ne=ne==null?void 0:ne.map(we=>we==null?void 0:we.slice((we==null?void 0:we.length)-5,we==null?void 0:we.length)),ne=ne==null?void 0:ne.map(we=>Ze.isNumber(parseInt(we))&&parseInt(we)?parseInt(we):0);let Ne=Math.max(...ne);q=q==null?void 0:q.map(we=>{if(we!=null&&we.includes("'"))return we==null?void 0:we.replaceAll("'","");if(we!=null&&we.includes("@"))return Ne+1;{let Ke=Object.keys(m);return we=(m==null?void 0:m[we])??(m==null?void 0:m[Ke==null?void 0:Ke.find(ua=>ua==null?void 0:ua.includes("."+we))]),we}}),ge=ue(...q)}catch(q){Ya.ElMessage.warning("关联数据出现错误,"+q.message)}let T=(ze=r==null?void 0:r[he])==null?void 0:ze.prop;m[T]=ge}else m=ue({contents:m,valueString:(de=r==null?void 0:r[he])==null?void 0:de.functionRelatedWords,prop:(Z=r==null?void 0:r[he])==null?void 0:Z.prop,headers:n,typeString:Ve,allContents:s})}}return m},Up=O.useLoginState(O.pinia),{loginUserInfo:Zr}=O.storeToRefs(Up),qp=O.useMenuState(O.pinia),{activeMenuPath:cs,currentMenuPath:mo}=O.storeToRefs(qp),cc=O.useUnit(O.pinia);let us="$R";const{selectTitle:Ci}=O.storeToRefs(cc),uc=async(l,r)=>{var m,p,h,y,u,x,D,R,E,K,M,L,j;let n=cs.value,i="",s=((m=Ci==null?void 0:Ci.value)==null?void 0:m.find(C=>(C==null?void 0:C.condition)==="child"&&!(C!=null&&C.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(n=r?n:(p=l==null?void 0:l[0])==null?void 0:p.object_name,i=(h=l==null?void 0:l[0])==null?void 0:h.father_name);let c=[];if(i!==""){let C=i;(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));let _=await Kr(C,!1);_=(y=_==null?void 0:_[0])==null?void 0:y.compData;let S=(u=_==null?void 0:_.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:u.contents;S=((x=S==null?void 0:S.find(g=>g==null?void 0:g.isMainKey))==null?void 0:x.prop)??((D=S==null?void 0:S[0])==null?void 0:D.prop);let k=(E=(R=_==null?void 0:_.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:R.contents)==null?void 0:E.map(g=>({label:g==null?void 0:g[S],value:g==null?void 0:g[S]}));c=(K=i==null?void 0:i.split("/"))==null?void 0:K.map(g=>(g===""?s?(s.isShow=!0,g=s):g={value:g,condition:"child",options:k,parentContent:(i==null?void 0:i[(i==null?void 0:i.length)-1])==="/"?i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1):i,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(n!==""){let C=(M=n==null?void 0:n.split("/"))==null?void 0:M.map(_=>(_={condition:"normal",value:_.trim(),isShow:!0},_));((L=C==null?void 0:C[0])==null?void 0:L.value)===((j=c==null?void 0:c[0])==null?void 0:j.value)&&(C=C==null?void 0:C.filter((_,S)=>S!==0)),c=[...c??[],...C??[]]}i===""&&s&&((s==null?void 0:s.parentContent)!==cs.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),cc.setSelectTitle(c)},Wp=async l=>{var c,m,p,h,y,u,x,D,R;let r=await O.getPageDataApi({platId:parseInt((c=Zr==null?void 0:Zr.value)==null?void 0:c.plat_id),pageName:"menu"}),n=(m=r==null?void 0:r.data)==null?void 0:m.result,i=(u=(y=(h=(p=l==null?void 0:l.filter(E=>(E==null?void 0:E.comp)==="Table"))==null?void 0:p[0])==null?void 0:h.compData)==null?void 0:y.find(E=>(E==null?void 0:E.key)==="filter"))==null?void 0:u.contents;i=(R=(D=(x=i==null?void 0:i.replace("(",us))==null?void 0:x.split(us))==null?void 0:D[0])==null?void 0:R.replaceAll(":","/");let s=n==null?void 0:n.filter(E=>{var K;return(E==null?void 0:E.object_name)===mo.value+"/"||((K=mo.value)==null?void 0:K.includes(i))&&i+"/"===(E==null?void 0:E.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(E=>{var K;return(E==null?void 0:E.comp)==="Table"&&(E.compData=(K=E==null?void 0:E.compData)==null?void 0:K.map(M=>{var L,j,C;return(M==null?void 0:M.key)==="header"&&(Array.isArray((L=M.contents)==null?void 0:L[0])?M.contents[0]=(C=M.contents[0])==null?void 0:C.map((_,S)=>{var k;return S===0&&(_.isExistChild=!0,(k=mo.value)!=null&&k.includes(i)&&(_.fatherPath=i)),_}):M.contents=(j=M.contents)==null?void 0:j.map((_,S)=>{var k;return S===0&&(_.isExistChild=!0,(k=mo.value)!=null&&k.includes(i)&&(_.fatherPath=i)),_})),M})),E})),l},Kr=async(l,r,n={})=>{var m,p,h,y,u,x,D,R,E,K,M,L;let i=await O.getPageDataApi({platId:parseInt((m=Zr==null?void 0:Zr.value)==null?void 0:m.plat_id),pageName:l}),s=(p=i==null?void 0:i.data)==null?void 0:p.result;if((s==null?void 0:s.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==l){let j=await O.getPageDataApi({platId:parseInt((h=Zr==null?void 0:Zr.value)==null?void 0:h.plat_id),pageName:n==null?void 0:n.originPath});if(((u=(y=j==null?void 0:j.data)==null?void 0:y.result)==null?void 0:u.length)>0){let C=await ss((x=j==null?void 0:j.data)==null?void 0:x.result,n,!1);C=C==null?void 0:C.map(async k=>{var $,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa;let g=[],P=($=Object.keys(k))==null?void 0:$.filter(V=>(V==null?void 0:V.includes("name"))&&V!=="nameContents");for(let V in k)P!=null&&P.find(H=>H===V)&&g.push(k==null?void 0:k[V]);if(g=g.reverse(),(k==null?void 0:k.comp)==="Table"){let V=(ze=(pe=(Y=k==null?void 0:k.compData)==null?void 0:Y.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:pe.contents)==null?void 0:ze.map(ee=>{let fe={};for(let me in ee)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]=ee==null?void 0:ee[me]);return ee=Object.values(fe),ee}),H=(Z=(de=k==null?void 0:k.compData)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Z.contents;if(Array.isArray(H==null?void 0:H[0])?(H[0].push({label:"排序",prop:"sort"}),H[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(he=H[0])!=null&&he.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(H[0]=(ae=H[0])==null?void 0:ae.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),H[0].unshift({label:"",prop:"disabled",sortable:!1}))):(H||(H=[]),H.push({label:"排序",prop:"sort"}),H.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),H!=null&&H.find(ee=>(ee==null?void 0:ee.prop)==="disabled")&&(H=H==null?void 0:H.filter(ee=>(ee==null?void 0:ee.prop)!=="disabled"),H.unshift({label:"",prop:"disabled",sortable:!1}))),H!=null&&H.some(ee=>{var fe;return(ee==null?void 0:ee.calculatorFilter)&&((fe=ee==null?void 0:ee.calculatorFilter)==null?void 0:fe.includes("Auto"))})&&(V=await gt(V,H,"Auto"),V=V==null?void 0:V.map(ee=>Object.values(ee))),k!=null&&k.fatherSyncContents){Array.isArray((ue=k==null?void 0:k.fatherSyncContents)==null?void 0:ue[0])&&(k.fatherSyncContents=(Se=k==null?void 0:k.fatherSyncContents)==null?void 0:Se[0]);let ee=(Ve=Ci.value)==null?void 0:Ve.find(fe=>(fe==null?void 0:fe.condition)==="child");k.fatherSyncContents=(ge=k==null?void 0:k.fatherSyncContents)==null?void 0:ge.map(fe=>{var me,fa,Xe,ce,_e,va;return((fa=fe==null?void 0:fe.menus)==null?void 0:fa[((me=fe==null?void 0:fe.menus)==null?void 0:me.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(ee==null?void 0:ee.value):((ce=fe==null?void 0:fe.menus)==null?void 0:ce[((Xe=fe==null?void 0:fe.menus)==null?void 0:Xe.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(va=fe.menus)==null?void 0:va.slice(0,((_e=fe.menus)==null?void 0:_e.length)-1)),fe})}if(k!=null&&k.sonSyncContents){Array.isArray((T=k==null?void 0:k.sonSyncContents)==null?void 0:T[0])&&(k.sonSyncContents=(q=k==null?void 0:k.sonSyncContents)==null?void 0:q[0]);let ee=(ne=Ci.value)==null?void 0:ne.find(fe=>(fe==null?void 0:fe.condition)==="child");k.sonSyncContents=(Ne=k==null?void 0:k.sonSyncContents)==null?void 0:Ne.map(fe=>{var me,fa,Xe,ce,_e,va;return((fa=fe==null?void 0:fe.menus)==null?void 0:fa[((me=fe==null?void 0:fe.menus)==null?void 0:me.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(ee==null?void 0:ee.value):((ce=fe==null?void 0:fe.menus)==null?void 0:ce[((Xe=fe==null?void 0:fe.menus)==null?void 0:Xe.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(va=fe.menus)==null?void 0:va.slice(0,((_e=fe.menus)==null?void 0:_e.length)-1)),fe})}if(k!=null&&k.relatedQuotes){Array.isArray((we=k==null?void 0:k.relatedQuotes)==null?void 0:we[0])&&(k.relatedQuotes=(Ke=k==null?void 0:k.relatedQuotes)==null?void 0:Ke[0]);let ee=(ua=Ci.value)==null?void 0:ua.find(fe=>(fe==null?void 0:fe.condition)==="child");k.relatedQuotes=(za=k==null?void 0:k.relatedQuotes)==null?void 0:za.map(fe=>{var me,fa,Xe,ce,_e,va;return((fa=fe==null?void 0:fe.menus)==null?void 0:fa[((me=fe==null?void 0:fe.menus)==null?void 0:me.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"!==(fe==null?void 0:fe.menus)?fe.menus=(fe==null?void 0:fe.menus)+(ee==null?void 0:ee.value):((ce=fe==null?void 0:fe.menus)==null?void 0:ce[((Xe=fe==null?void 0:fe.menus)==null?void 0:Xe.length)-1])==="/"&&(ee==null?void 0:ee.parentContent)+"/"===(fe==null?void 0:fe.menus)&&(fe.menus=(va=fe.menus)==null?void 0:va.slice(0,((_e=fe.menus)==null?void 0:_e.length)-1)),fe})}k={filter:(Te=(le=k==null?void 0:k.compData)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:Te.contents,key:k==null?void 0:k.comp,name:g,tableColumns:H,tableContents:V,menuFilter:k==null?void 0:k.menuFilter,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}else{let V=(Re=(Ue=(Me=k==null?void 0:k.compData)==null?void 0:Me.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:Re.map(ee=>(ee==null?void 0:ee.value)??"");V=[V];let H=(He=(Ie=(oe=k==null?void 0:k.compData)==null?void 0:oe.find(ee=>(ee==null?void 0:ee.key)==="formContent"))==null?void 0:Ie.contents)==null?void 0:He.map(ee=>(ee.value="",ee));k={contents:V,filter:(Oa=(Ba=k==null?void 0:k.compData)==null?void 0:Ba.find(ee=>(ee==null?void 0:ee.key)==="filter"))==null?void 0:Oa.contents,key:k==null?void 0:k.comp,name:g,value:H,fatherSyncContents:k==null?void 0:k.fatherSyncContents,relatedQuotes:k==null?void 0:k.relatedQuotes,sonSyncContents:k==null?void 0:k.sonSyncContents}}return k.isShow=!1,k}),C=await Promise.all(C);let _=[{key:"menuPath",contents:[{path:l,fatherPath:(E=(R=(D=j==null?void 0:j.data)==null?void 0:D.result)==null?void 0:R[0])==null?void 0:E.father_name,isShow:!1}]},{key:l,contents:C}];await O.createPlatFormDataApi({platId:parseInt((K=Zr==null?void 0:Zr.value)==null?void 0:K.plat_id),changeData:_});let S=await O.getPageDataApi({platId:parseInt((M=Zr==null?void 0:Zr.value)==null?void 0:M.plat_id),pageName:l});s=(L=S==null?void 0:S.data)==null?void 0:L.result}}r&&await uc(s,!!(n!=null&&n.originPath));let c=await ss(s,n);return r&&(c=await Wp(c)),c==null?void 0:c.filter(j=>j)},ds=async l=>{var i,s,c,m,p,h,y,u,x,D,R;let r=(i=l==null?void 0:l.menus)==null?void 0:i.join("/");l!=null&&l.endChildMenu&&(l==null?void 0:l.endChildMenu)!==""&&(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+(l==null?void 0:l.endChildMenu)),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((c=(s=l.value)==null?void 0:s.split(" "))==null?void 0:c[0]));let n=await Kr(r,!1);if(n=(m=n==null?void 0:n.filter(E=>{var K,M;return(E==null?void 0:E.name)===((M=l==null?void 0:l.groups)==null?void 0:M[((K=l==null?void 0:l.groups)==null?void 0:K.length)-1])}))==null?void 0:m[0],(h=(p=n==null?void 0:n.compData)==null?void 0:p.find(E=>(E==null?void 0:E.key)==="tableContents"))!=null&&h.contents){n=(u=(y=n==null?void 0:n.compData)==null?void 0:y.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:u.contents;let E=((x=l==null?void 0:l.words)==null?void 0:x[0])??(l==null?void 0:l.prop);return n=n==null?void 0:n.filter(K=>{var M,L,j,C;return(K==null?void 0:K[l!=null&&l.endChildMenu?E:(M=l==null?void 0:l.words)==null?void 0:M[0]])===(l!=null&&l.relatedWords&&((L=l==null?void 0:l.relatedWords)==null?void 0:L.length)>0?(C=(j=l.value)==null?void 0:j.split(" "))==null?void 0:C[0]:l.value)}),n==null?void 0:n[0]}else{let E=(R=(D=n==null?void 0:n.compData)==null?void 0:D.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:R.contents,K={};return E==null||E.forEach(M=>{K[M.prop]=M.value}),K}},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(l,{emit:r}){const n=r,i=l,s=()=>{const g=(i==null?void 0:i.menuFilter)||[];return Array.isArray(g)&&(g==null?void 0:g.some(P=>{const $=typeof P=="string"?P:JSON.stringify(P);return $==null?void 0:$.includes("@InterfaceHide=Yes")}))},c=a.ref(""),m=a.ref(!1),p=a.ref([]),h=a.ref([{label:"清空",background:"#999999"},{label:"确认"}]),y=[{label:"新增",icon:"new"},{label:"导入",icon:"import_101"},{label:"导出",icon:"export_101"},{label:"导出paraform",icon:"export_101"},{label:"OCR识别",icon:"OCR识别"},{label:"切换视图",icon:"cardViewport_101"}];function u(g,P){return g.map($=>{const Y={...$};return P.forEach(pe=>{delete Y[pe]}),Y})}function x(g){if(!g||g.t!=="n")return(g==null?void 0:g.v)??"";const P=g.v;if(g.z){const $=String(g.z).toLowerCase(),Y=["yyyy/mm/dd","yyyy-mm-dd","yyyy.mm.dd","yy/mm/dd","yy-mm-dd","yy.mm.dd","mm/dd/yy","mm-dd-yy","mm.dd.yy","dd/mm/yy","dd-mm-yy","dd.mm.yy","m/d/yy","m/d/yyyy","d/m/yy","d/m/yyyy","yyyy年","yy年","m月","d日","yyyy年m月d日","yy年m月d日","[$-f800]","[$-f400]"];for(const de of Y)if($.includes(de))return D(P);const pe=/[ymdhms]/.test($),ze=/^[0#\.\,\s]+$/.test($.replace(/[\\\/\-:]/g,""));if(pe&&!ze)return D(P)}if(P>=1&&P<=73050){if(P<5e3)return P;if(P>=5e3&&P<4e4){const $=Math.floor((P-25569)/365.25)+1970;return $>=1970&&$<=2e3&&g.z&&/[ymd]/.test(String(g.z).toLowerCase())?D(P):P}if(P>=4e4)return D(P)}return P}function D(g){if(typeof g!="number")return g;try{const P=new Date((g-25569)*86400*1e3);if(isNaN(P.getTime()))return g;const $=P.getFullYear(),Y=String(P.getMonth()+1).padStart(2,"0"),pe=String(P.getDate()).padStart(2,"0");return`${$}-${Y}-${pe}`}catch{return g}}const R=g=>{const P=g.raw;if(!P)return;const $=new FileReader;$.onload=Y=>{try{const pe=new Uint8Array(Y.target.result),ze=na.readSync(pe,{type:"array"}),de=ze.SheetNames[0],Z=ze.Sheets[de],ae=na.utils.decode_range(Z["!ref"]).e.c+1,ue=new Array(ae).fill(""),Se=[];for(const ne in Z){if(ne[0]==="!")continue;const{r:Ne,c:we}=na.utils.decode_cell(ne),Ke=Z[ne];let ua=x(Ke);if((ua==null||ua==="")&&(ua=""),Ne===0)ue[we]=ua;else{if(!Se[Ne-1]){Se[Ne-1]={};for(let za=0;za<ae;za++)Se[Ne-1][`col_${za}`]=""}Se[Ne-1][`col_${we}`]=ua}}for(let ne=0;ne<ae;ne++)ue[ne]===void 0&&(ue[ne]="");const Ve=[];for(let ne=0;ne<ue.length;ne++)(!ue[ne]||ue[ne].toString().trim()==="")&&Ve.push(ne);let ge,T;(Ve==null?void 0:Ve.length)>0?(Ya.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),ge=ue.filter((ne,Ne)=>!Ve.includes(Ne)),T=u(Se,Ve==null?void 0:Ve.map(ne=>`col_${ne}`))):(ge=ue,T=Se);const q=Se==null?void 0:Se[0];if(!(q!=null&&q.hasOwnProperty("col_0")))return Ya.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",ge,T)}catch(pe){throw Ya.ElMessage.error(pe.message),new Error(pe.message)}},$.readAsArrayBuffer(P)},E=g=>{var $;const P=($=p.value)==null?void 0:$.reduce((Y,pe,ze)=>(ze===0?Y[pe.label]=g:Y[pe.label]=pe==null?void 0:pe.value,Y),{});n("filter",P,g,!0)},K=(g,P={})=>{n("buttonClick",g,"",P)},M=g=>{var P,$;p.value=($=(P=na.getColumnChild(O.cloneDeep(g)))==null?void 0:P.filter(Y=>(Y==null?void 0:Y.label)!==""&&(Y==null?void 0:Y.label)!=="操作"))==null?void 0:$.map(Y=>({label:(Y==null?void 0:Y.label)??"",value:"",name:(Y==null?void 0:Y.prop)??"",isFormColHidden:Y==null?void 0:Y.isTableColHidden,width:2,prop:(Y==null?void 0:Y.prop)??""}))},L=a.ref(!1),j=g=>{var P;if((g==null?void 0:g.buttonName)==="确认"&&(n("filter",g==null?void 0:g.content),L.value=(g==null?void 0:g.content)&&Object.values(g==null?void 0:g.content).length>0),(g==null?void 0:g.buttonName)==="清空"){const $=O.cloneDeep(g==null?void 0:g.content);for(const Y in $)$[Y]="";p.value=(P=p.value)==null?void 0:P.map(Y=>({...Y,value:""})),n("filter",$),L.value=!1}m.value=!1},C=()=>{m.value=!m.value},_=()=>{var P,$;p.value=(P=p.value)==null?void 0:P.map(Y=>({...Y,value:""}));const g=($=p.value)==null?void 0:$.reduce((Y,pe)=>(Y[pe.label]=pe.value,Y),{});n("filter",g)},S=a.ref(null);let k;return k=g=>{var pe;if(!m.value)return;const P=(pe=S==null?void 0:S.value)==null?void 0:pe.$el,$=P==null?void 0:P.contains(g.target);let Y=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(ze=>{ze.contains(g.target)&&(Y=!0)}),!$&&!Y&&(m.value=!1)},a.onMounted(()=>{document.addEventListener("click",k),M(i.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",k)}),a.watch(()=>i.columns,()=>{M(i.columns)},{deep:!0,immediate:!0}),(g,P)=>{var Z,he,ae,ue,Se,Ve,ge,T;const $=a.resolveComponent("el-icon"),Y=a.resolveComponent("svg-icon"),pe=a.resolveComponent("el-input"),ze=a.resolveComponent("el-upload"),de=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",Kp,[s()?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(i==null?void 0:i.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((i==null?void 0:i.level)-1)*12+"px",fontWeight:600-((i==null?void 0:i.level)-1)*100>=400?600-((i==null?void 0:i.level)-1)*100:400,fontSize:17-(i==null?void 0:i.level)>=14?17-(i==null?void 0:i.level)+"px":"14px"})},a.toDisplayString(l.compName),7)),a.createElementVNode("div",Gp,[i!=null&&i.filterShow?(a.openBlock(),a.createElementBlock("div",Yp,[a.createVNode(Vu,{trigger:"contextmenu",ref_key:"popOverRef",ref:S,title:"",width:800,placement:"bottom-start",isVisible:m.value,"onUpdate:isVisible":P[4]||(P[4]=q=>m.value=q)},{reference:a.withCtx(()=>{var q,ne,Ne,we;return[a.createVNode(pe,{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=Ke=>c.value=Ke),style:{"min-width":"80px"},placeholder:L.value?(Ne=(ne=(q=l.filterValues)==null?void 0:q.filter(Ke=>Ke))==null?void 0:ne.slice(0,3))==null?void 0:Ne.join("/"):"搜索","prefix-icon":a.unref(Ya.search_default),clearable:"",onInput:E,disabled:((we=p.value)==null?void 0:we.length)===0},{suffix:a.withCtx(()=>{var Ke,ua;return[!c.value&&((ua=(Ke=l.filterValues)==null?void 0:Ke.filter(za=>za))!=null&&ua.join("/"))?(a.openBlock(),a.createBlock($,{key:0,style:{cursor:"pointer"},onClick:_},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(C,["stop"])},[a.createVNode(Y,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",{class:"form-content-value",onKeydown:P[1]||(P[1]=a.withModifiers(()=>{},["stop"])),onKeyup:P[2]||(P[2]=a.withModifiers(()=>{},["stop"])),onKeypress:P[3]||(P[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:p.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:j},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((Z=l.buttons)==null?void 0:Z.length)>0?(a.openBlock(),a.createElementBlock("div",Jp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((he=l.buttons)==null?void 0:he.filter(q=>l.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ne)=>{var Ne;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ne},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":R,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var we;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:Ke=>K(q==null?void 0:q.label)},[a.createVNode(Y,{class:"table-op-icon",name:(we=y==null?void 0:y.find(Ke=>(Ke==null?void 0:Ke.label)===(q==null?void 0:q.label)))==null?void 0:we.icon},null,8,["name"]),a.createElementVNode("span",Zp,a.toDisplayString(q==null?void 0:q.label),1)],10,Xp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(tl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var we;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(Y,{class:"table-op-icon",name:(we=y==null?void 0:y.find(Ke=>(Ke==null?void 0:Ke.label)===(q==null?void 0:q.label)))==null?void 0:we.icon},null,8,["name"]),a.createElementVNode("span",Qp,a.toDisplayString(q==null?void 0:q.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",ef,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,we=>{var Ke,ua;return a.openBlock(),a.createElementBlock("div",{key:we==null?void 0:we.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:za=>!l.lockingPage&&K(we==null?void 0:we.label)},[a.createTextVNode(a.toDisplayString(we==null?void 0:we.label),1),(Ke=we==null?void 0:we.label)!=null&&Ke.includes("选中")?(a.openBlock(),a.createElementBlock("span",lf,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(ua=we==null?void 0:we.label)!=null&&ua.includes("全部")?(a.openBlock(),a.createElementBlock("span",rf,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,af)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:we=>!l.lockingPage&&K(q==null?void 0:q.label,q)},[a.createVNode(Y,{class:"table-op-icon",name:(Ne=y==null?void 0:y.find(we=>(we==null?void 0:we.label)===(q==null?void 0:q.label)))==null?void 0:Ne.icon},null,8,["name"]),a.createElementVNode("span",of,a.toDisplayString(q==null?void 0:q.label),1)],10,nf)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",tf,[a.createElementVNode("div",sf,[a.createElementVNode("div",cf,[a.createVNode(pe,{modelValue:c.value,"onUpdate:modelValue":P[5]||(P[5]=q=>c.value=q),style:{"min-width":"80px"},placeholder:L.value?(Se=(ue=(ae=l.filterValues)==null?void 0:ae.filter(q=>q))==null?void 0:ue.slice(0,3))==null?void 0:Se.join("/"):"搜索","prefix-icon":a.unref(Ya.search_default),clearable:"",onInput:E,disabled:((Ve=p.value)==null?void 0:Ve.length)===0},{suffix:a.withCtx(()=>{var q,ne;return[!c.value&&((ne=(q=l.filterValues)==null?void 0:q.filter(Ne=>Ne))!=null&&ne.join("/"))?(a.openBlock(),a.createBlock($,{key:0,style:{cursor:"pointer"},onClick:_},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(C,["stop"])},[a.createVNode(Y,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((ge=l.buttons)==null?void 0:ge.length)>0?(a.openBlock(),a.createElementBlock("div",uf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((T=l.buttons)==null?void 0:T.filter(q=>l.isDevMode||(q==null?void 0:q.label)!=="修改模板"),(q,ne)=>{var Ne;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:ne},[(q==null?void 0:q.type)==="upload"?(a.openBlock(),a.createBlock(ze,{key:0,class:"upload-button-wrap","on-change":R,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var we;return[a.createElementVNode("div",df,[a.createVNode(Y,{class:"table-op-icon",name:(we=y==null?void 0:y.find(Ke=>(Ke==null?void 0:Ke.label)===(q==null?void 0:q.label)))==null?void 0:we.icon},null,8,["name"]),a.createElementVNode("span",pf,a.toDisplayString(q==null?void 0:q.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(tl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(q==null?void 0:q.type)==="popover"?(a.openBlock(),a.createBlock(de,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var we;return[a.createVNode(Y,{class:"table-op-icon",name:(we=y==null?void 0:y.find(Ke=>(Ke==null?void 0:Ke.label)===(q==null?void 0:q.label)))==null?void 0:we.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(q==null?void 0:q.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",ff,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(q==null?void 0:q.contents,we=>(a.openBlock(),a.createBlock(de,{key:we==null?void 0:we.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ke=>K(we==null?void 0:we.label)},{default:a.withCtx(()=>{var Ke,ua;return[a.createTextVNode(a.toDisplayString(we==null?void 0:we.label),1),(Ke=we==null?void 0:we.label)!=null&&Ke.includes("选中")?(a.openBlock(),a.createElementBlock("span",hf,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(ua=we==null?void 0:we.label)!=null&&ua.includes("全部")?(a.openBlock(),a.createElementBlock("span",vf,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(q!=null&&q.type)||(q==null?void 0:q.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:we=>!l.lockingPage&&K(q==null?void 0:q.label,q)},[a.createVNode(Y,{class:"table-op-icon",name:(Ne=y==null?void 0:y.find(we=>(we==null?void 0:we.label)===(q==null?void 0:q.label)))==null?void 0:Ne.icon},null,8,["name"]),a.createElementVNode("span",yf,a.toDisplayString(q==null?void 0:q.label),1)],10,mf)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},bf=er._export_sfc(gf,[["__scopeId","data-v-a6997ec1"]]),kf={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(r,n)=>{const i=a.resolveComponent("el-table-column"),s=a.resolveComponent("el-table");return a.openBlock(),a.createBlock(s,{data:l.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.columns,c=>{var m;return a.openBlock(),a.createBlock(i,{key:c==null?void 0:c.prop,label:c==null?void 0:c.label,prop:c==null?void 0:c.prop,fixed:(c==null?void 0:c.prop)==="operate"?"right":c==null?void 0:c.fixed,align:(c==null?void 0:c.align)??"left","show-overflow-tooltip":(c==null?void 0:c.showOverflowTooltip)??!0,width:c==null?void 0:c.width,"min-width":(c==null?void 0:c.minWidth)||((c==null?void 0:c.prop)==="operate"?80:(((m=c==null?void 0:c.label)==null?void 0:m.length)*2||4)*27)},{default:a.withCtx(p=>[a.renderSlot(r.$slots,"content",{row:p.row,column:p.column,$index:p.$index,scope:p}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.children,(h,y)=>(a.openBlock(),a.createBlock(tl._sfc_main$2,{key:y,column:h,tableData:l.tableData},a.createSlots({_:2},[a.renderList(r.$slots,(u,x)=>({name:x,fn:a.withCtx(({row:D,slotData:R,item:E,column:K})=>[a.renderSlot(r.$slots,x,a.mergeProps({ref_for:!0},R??D,{item:E??h,slotData:R??D,row:D,column:K,columnProp:h}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class xf extends Ze.Loader{constructor(r){super(r),this.littleEndian=!0}load(r,n,i,s){const c=this,m=new Ze.FileLoader(c.manager);m.setPath(c.path),m.setResponseType("arraybuffer"),m.setRequestHeader(c.requestHeader),m.setWithCredentials(c.withCredentials),m.load(r,function(p){try{n(c.parse(p))}catch(h){s?s(h):console.error(h),c.manager.itemError(r)}},i,s)}_getDataView(r,n,i,s){switch(i){case"F":return s===8?r.getFloat64(n,this.littleEndian):r.getFloat32(n,this.littleEndian);case"I":return s===1?r.getInt8(n):s===2?r.getInt16(n,this.littleEndian):r.getInt32(n,this.littleEndian);case"U":return s===1?r.getUint8(n):s===2?r.getUint16(n,this.littleEndian):r.getUint32(n,this.littleEndian)}}parse(r){function n(R,E){const K=R.length,M=new Uint8Array(E);let L=0,j=0,C,_,S;do if(C=R[L++],C<32){if(C++,j+C>E)throw new Error("Output buffer is not large enough");if(L+C>K)throw new Error("Invalid compressed data");do M[j++]=R[L++];while(--C)}else{if(_=C>>5,S=j-((C&31)<<8)-1,L>=K)throw new Error("Invalid compressed data");if(_===7&&(_+=R[L++],L>=K))throw new Error("Invalid compressed data");if(S-=R[L++],j+_+2>E)throw new Error("Output buffer is not large enough");if(S<0)throw new Error("Invalid compressed data");if(S>=j)throw new Error("Invalid compressed data");do M[j++]=M[S++];while(--_+2)}while(L<K);return M}function i(R){const E={},K=new Uint8Array(R);let M="",L="",j=0,C=!1;const _=K.length;for(;j<_&&C===!1;){const P=String.fromCharCode(K[j++]);P===`
2
+ `||P==="\r"?(L.trim().toLowerCase().startsWith("data")&&(C=!0),L=""):L+=P,M+=P}const S=M.search(/[\r\n]DATA\s(\S*)\s/i),k=/[\r\n]DATA\s(\S*)\s/i.exec(M.slice(S-1));if(E.data=k[1],E.headerLen=k[0].length+S,E.str=M.slice(0,E.headerLen),E.str=E.str.replace(/#.*/gi,""),E.version=/^VERSION (.*)/im.exec(E.str),E.fields=/^FIELDS (.*)/im.exec(E.str),E.size=/^SIZE (.*)/im.exec(E.str),E.type=/^TYPE (.*)/im.exec(E.str),E.count=/^COUNT (.*)/im.exec(E.str),E.width=/^WIDTH (.*)/im.exec(E.str),E.height=/^HEIGHT (.*)/im.exec(E.str),E.viewpoint=/^VIEWPOINT (.*)/im.exec(E.str),E.points=/^POINTS (.*)/im.exec(E.str),E.version!==null&&(E.version=parseFloat(E.version[1])),E.fields=E.fields!==null?E.fields[1].split(" "):[],E.type!==null&&(E.type=E.type[1].split(" ")),E.width!==null&&(E.width=parseInt(E.width[1])),E.height!==null&&(E.height=parseInt(E.height[1])),E.viewpoint!==null&&(E.viewpoint=E.viewpoint[1]),E.points!==null&&(E.points=parseInt(E.points[1],10)),E.points===null&&(E.points=E.width*E.height),E.size!==null&&(E.size=E.size[1].split(" ").map(function(P){return parseInt(P,10)})),E.count!==null)E.count=E.count[1].split(" ").map(function(P){return parseInt(P,10)});else{E.count=[];for(let P=0,$=E.fields.length;P<$;P++)E.count.push(1)}E.offset={};let g=0;for(let P=0,$=E.fields.length;P<$;P++)E.data==="ascii"?E.offset[E.fields[P]]=P:(E.offset[E.fields[P]]=g,g+=E.size[P]*E.count[P]);return E.rowSize=g,E}const s=i(r),c=[],m=[],p=[],h=[],y=[],u=new Ze.Color;if(s.data==="ascii"){const R=s.offset,M=new TextDecoder().decode(r).slice(s.headerLen).split(`
3
+ `);for(let L=0,j=M.length;L<j;L++){if(M[L]==="")continue;const C=M[L].split(" ");if(R.x!==void 0&&(c.push(parseFloat(C[R.x])),c.push(parseFloat(C[R.y])),c.push(parseFloat(C[R.z]))),R.rgb!==void 0){const _=s.fields.findIndex(pe=>pe==="rgb"),S=s.type[_],k=parseFloat(C[R.rgb]);let g=k;if(S==="F"){const pe=new Float32Array(1);pe[0]=k,g=new Int32Array(pe.buffer)[0]}const P=(g>>16&255)/255,$=(g>>8&255)/255,Y=(g>>0&255)/255;u.setRGB(P,$,Y,Ze.SRGBColorSpace),p.push(u.r,u.g,u.b)}R.normal_x!==void 0&&(m.push(parseFloat(C[R.normal_x])),m.push(parseFloat(C[R.normal_y])),m.push(parseFloat(C[R.normal_z]))),R.intensity!==void 0&&h.push(parseFloat(C[R.intensity])),R.label!==void 0&&y.push(parseInt(C[R.label]))}}if(s.data==="binary_compressed"){const R=new Uint32Array(r.slice(s.headerLen,s.headerLen+8)),E=R[0],K=R[1],M=n(new Uint8Array(r,s.headerLen+8,E),K),L=new DataView(M.buffer),j=s.offset;for(let C=0;C<s.points;C++){if(j.x!==void 0){const _=s.fields.indexOf("x"),S=s.fields.indexOf("y"),k=s.fields.indexOf("z");c.push(this._getDataView(L,s.points*j.x+s.size[_]*C,s.type[_],s.size[_])),c.push(this._getDataView(L,s.points*j.y+s.size[S]*C,s.type[S],s.size[S])),c.push(this._getDataView(L,s.points*j.z+s.size[k]*C,s.type[k],s.size[k]))}if(j.rgb!==void 0){const _=s.fields.indexOf("rgb"),S=L.getUint8(s.points*j.rgb+s.size[_]*C+2)/255,k=L.getUint8(s.points*j.rgb+s.size[_]*C+1)/255,g=L.getUint8(s.points*j.rgb+s.size[_]*C+0)/255;u.setRGB(S,k,g,Ze.SRGBColorSpace),p.push(u.r,u.g,u.b)}if(j.normal_x!==void 0){const _=s.fields.indexOf("normal_x"),S=s.fields.indexOf("normal_y"),k=s.fields.indexOf("normal_z");m.push(this._getDataView(L,s.points*j.normal_x+s.size[_]*C,s.type[_],s.size[_])),m.push(this._getDataView(L,s.points*j.normal_y+s.size[S]*C,s.type[S],s.size[S])),m.push(this._getDataView(L,s.points*j.normal_z+s.size[k]*C,s.type[k],s.size[k]))}if(j.intensity!==void 0){const _=s.fields.indexOf("intensity");h.push(this._getDataView(L,s.points*j.intensity+s.size[_]*C,s.type[_],s.size[_]))}if(j.label!==void 0){const _=s.fields.indexOf("label");y.push(L.getInt32(s.points*j.label+s.size[_]*C,this.littleEndian))}}}if(s.data==="binary"){const R=new DataView(r,s.headerLen),E=s.offset;for(let K=0,M=0;K<s.points;K++,M+=s.rowSize){if(E.x!==void 0){const L=s.fields.indexOf("x"),j=s.fields.indexOf("y"),C=s.fields.indexOf("z");c.push(this._getDataView(R,M+E.x,s.type[L],s.size[L])),c.push(this._getDataView(R,M+E.y,s.type[j],s.size[j])),c.push(this._getDataView(R,M+E.z,s.type[C],s.size[C]))}if(E.rgb!==void 0){const L=R.getUint8(M+E.rgb+2)/255,j=R.getUint8(M+E.rgb+1)/255,C=R.getUint8(M+E.rgb+0)/255;u.setRGB(L,j,C,Ze.SRGBColorSpace),p.push(u.r,u.g,u.b)}if(E.normal_x!==void 0){const L=s.fields.indexOf("normal_x"),j=s.fields.indexOf("normal_y"),C=s.fields.indexOf("normal_z");m.push(this._getDataView(R,M+E.normal_x,s.type[L],s.size[L])),m.push(this._getDataView(R,M+E.normal_y,s.type[j],s.size[j])),m.push(this._getDataView(R,M+E.normal_z,s.type[C],s.size[C]))}if(E.intensity!==void 0){const L=s.fields.indexOf("intensity");h.push(this._getDataView(R,M+E.intensity,s.type[L],s.size[L]))}E.label!==void 0&&y.push(R.getInt32(M+E.label,this.littleEndian))}}const x=new Ze.BufferGeometry;c.length>0&&x.setAttribute("position",new Ze.Float32BufferAttribute(c,3)),m.length>0&&x.setAttribute("normal",new Ze.Float32BufferAttribute(m,3)),p.length>0&&x.setAttribute("color",new Ze.Float32BufferAttribute(p,3)),h.length>0&&x.setAttribute("intensity",new Ze.Float32BufferAttribute(h,1)),y.length>0&&x.setAttribute("label",new Ze.Int32BufferAttribute(y,1)),x.computeBoundingSphere();const D=new Ze.PointsMaterial({size:.005});return p.length>0&&(D.vertexColors=!0),new Ze.Points(x,D)}}const wf=O.useModelComp(O.pinia),{systemPath:ps}=O.storeToRefs(wf),yo=a.ref(),fs=new WeakMap;function _f(l,r,n,i,s){const c=async D=>{try{const R=await O.platformDownloadFile({url:D});if(R.status!==200)throw new Error(`下载失败: ${R.status}`);return R.data}catch(R){throw console.error("addModelFromUrl失败:",R),R}},m=D=>new Promise((R,E)=>{const K=new FileReader;K.onload=M=>{try{const L=M.target.result,C=new Rn.MTLLoader().parse(L);C.preload(),R(C)}catch(L){E(L)}},K.onerror=()=>{E(new Error("MTL文件读取失败"))},K.readAsText(D)}),p=async D=>{const R={materials:{},create:function(E){return this.materials[E]?this.materials[E]:(console.warn(`Material '${E}' not found, using default material`),new Ze.MeshPhongMaterial({color:8947848,side:Ze.DoubleSide}))},getAsArray:function(){const E=[];for(const K in this.materials)E.push(this.materials[K]);return E},preload:function(){for(const E in this.materials)this.materials[E].map&&(this.materials[E].map.needsUpdate=!0)}};for(const E of D){const K=await m(E);Object.assign(R.materials,K.materials)}return R.preload(),R},h=async(D,R=[])=>new Promise((E,K)=>{const M=new FileReader;M.onload=async L=>{try{const j=L.target.result;let C=null;R&&R.length>0&&(R.length===1?C=await m(R[0]):C=await p(R));const _=new Rn.OBJLoader;C&&_.setMaterials(C);const S=_.parse(j);C||S.traverse(k=>{k.isMesh&&(k.material=new Ze.MeshPhongMaterial({color:8947848,side:Ze.DoubleSide}))}),E(S)}catch(j){K(j)}},M.onerror=()=>{K(new Error("OBJ文件读取失败"))},M.readAsText(D)}),y=async D=>{var R;try{n.value=!0;const{scene:E}=l();if(!E)throw new Error("Scene not initialized");s();const K=[];for(let M=0;M<D.length;M++){const L=D[M];i.value=`正在加载模型 ${M+1}/${D.length}...`;const j=await c(L.objUrl),C=((R=L.objUrl)==null?void 0:R.split("/").pop())||`model_${M}.obj`,_=new File([j],C,{type:j.type});let S=[];if(L.mtlUrls){const g=Array.isArray(L.mtlUrls)?L.mtlUrls:[L.mtlUrls];for(let P=0;P<g.length;P++){const $=g[P],Y=await c($),pe=($==null?void 0:$.split("/").pop())||`material_${M}_${P}.mtl`,ze=new File([Y],pe,{type:Y.type});S.push(ze)}}const k=await h(_,S);E.add(k),r.value.push(k),K.push(k)}return n.value=!1,K}catch(E){throw console.error("加载模型失败:",E),n.value=!1,E}},u=async(D,R,E=[],K=[])=>{let M;const L=D.toLowerCase();switch(L){case".txt":case".cpt":case".obj":const j=await R.text();if(L===".txt"||L===".cpt"){const le=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Me=[...j.matchAll(le)].map(oe=>({x:parseFloat(oe[1]),y:parseFloat(oe[2]),z:parseFloat(oe[3])})),Ue=new Ze.BufferGeometry,Re=Me.flatMap(oe=>[oe.x,oe.y,oe.z]);if(Ue.setAttribute("position",new Ze.Float32BufferAttribute(Re,3)),L===".txt"){const oe=new Ze.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});M=new Ze.Points(Ue,oe)}else if(L===".cpt"){const oe=new Ze.LineBasicMaterial({color:"#5B5C99",linewidth:100});M=new Ze.Line(Ue,oe)}}else if(L===".obj"){const le=new Rn.OBJLoader;if(E&&E.length>0){const Te=new Rn.MTLLoader;for(const Me of E){const Ue=await Me.text(),Re=Te.parse(Ue);Re.preload(),le.setMaterials(Re);break}}M=le.parse(j),(!E||E.length===0)&&M.traverse(Te=>{Te.isMesh&&(Te.material=new Ze.MeshPhongMaterial({color:"#B3B3D4"})),Te instanceof Ze.Mesh&&(Te.material.side=Ze.DoubleSide)})}break;case".stl":const C=await R.arrayBuffer(),S=new Rn.STLLoader().parse(C),k=new Ze.MeshPhongMaterial({color:"#B3B3D4",side:Ze.DoubleSide});M=new Ze.Mesh(S,k);break;case".nc":const g=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],P={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},$=new Ze.Group,Y=g.map(le=>new Promise((Te,Me)=>{new Rn.STLLoader().load(ps.value===""?`/model/${le}`:`${ps.value}\\${le}`,Re=>{const oe=new Ze.MeshPhongMaterial({color:P[le]||"#B3B3D4",side:Ze.DoubleSide}),Ie=new Ze.Mesh(Re,oe);Te(Ie)},void 0,Me)}));try{(await Promise.all(Y)).forEach(Te=>$.add(Te)),M=$}catch(le){throw console.error("加载NC文件对应的STL文件失败:",le),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const pe=new xf,ze=new Ze.Group;try{const le=await Ya.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Te=new Blob([le.data],{type:"application/octet-stream;charset=UTF-8"}),Me=await Ya.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),Ue=new Blob([Me.data],{type:"application/octet-stream;charset=UTF-8"}),Re=await new Promise((Ie,He)=>{const Ba=URL.createObjectURL(Te);pe.load(Ba,Oa=>{const V=new Float32Array(Oa.geometry.attributes.position.count*3);for(let H=0;H<Oa.geometry.attributes.position.count;H++)V[H*3]=1,V[H*3+1]=0,V[H*3+2]=0;Oa.geometry.setAttribute("color",new Ze.BufferAttribute(V,3)),Oa.material.vertexColors=!0,Oa.scale.set(.3,.3,.3),URL.revokeObjectURL(Ba),Ie(Oa)},void 0,He)}),oe=await new Promise((Ie,He)=>{const Ba=URL.createObjectURL(Ue);pe.load(Ba,Oa=>{const V=new Float32Array(Oa.geometry.attributes.position.count*3);for(let H=0;H<Oa.geometry.attributes.position.count;H++)V[H*3]=0,V[H*3+1]=1,V[H*3+2]=0;Oa.geometry.setAttribute("color",new Ze.BufferAttribute(V,3)),Oa.material.vertexColors=!0,Oa.scale.set(.3,.3,.3),URL.revokeObjectURL(Ba),Ie(Oa)},void 0,He)});ze.add(Re),ze.add(oe),M=ze}catch(le){throw console.error("PCD文件加载失败:",le),new Error("无法加载PCD文件")}break;case".urdf":const de=URL.createObjectURL(R),Z=new Ou.URDFLoader,he="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",ae={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},ue=new WeakMap,Se=new WeakMap,Ve=new WeakMap,ge=async le=>{if(ue.has(le))return console.log(`从缓存加载: ${le}`),ue.get(le);try{const Te=await Ya.axios.get(`${he}/${le}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Me=new Blob([Te.data],{type:"application/octet-stream;charset=UTF-8"});return ae.enableCache&&ue.set(le,Me),Me}catch(Te){throw console.error(`加载文件失败: ${le}`,Te),new Error(`无法加载文件: ${le}`)}},T=(le="default")=>{if(Se.has(le))return Se.get(le);const Te=new Ze.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:Ze.FrontSide});return Se.set(le,Te),Te},q=le=>{try{le.isBufferGeometry&&le.mergeVertices&&le.mergeVertices(),le.computeVertexNormals&&le.computeVertexNormals(),le.computeBoundingSphere&&le.computeBoundingSphere(),le.deleteAttribute&&le.deleteAttribute("uv2")}catch(Te){console.warn("几何体优化失败,使用原始几何体:",Te)}return le},ne=async(le,Te,Me)=>{const Ue=`stl_${Te}`;if(Ve.has(Ue)){const He=Ve.get(Ue);return new Ze.Mesh(He,T())}const Re=await le.arrayBuffer();let Ie=new Rn.STLLoader(Me).parse(Re);return Ie=q(Ie),Ve.set(Ue,Ie),new Ze.Mesh(Ie,T())},Ne=async(le,Te,Me)=>{const Ue=`obj_${Te}`;if(ue.has(Ue))return ue.get(Ue).clone();const Re=await le.text(),oe=new Rn.OBJLoader(Me),Ie=Te.replace(".obj",".mtl");try{const Oa=await(await ge(Ie)).text(),H=new Rn.MTLLoader(Me).parse(Oa);H.preload(),oe.setMaterials(H)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Ie}`)}const He=oe.parse(Re);return He.traverse(Ba=>{Ba.isMesh&&(Ba.geometry=q(Ba.geometry),Ba.castShadow=!0,Ba.receiveShadow=!0,Ba.renderOrder=1)}),ue.set(Ue,He),He},we=(le,Te)=>{const Me=new Ze.LOD;if(Me.addLevel(le,0),le.geometry){const Ue=le.geometry.clone(),Re=new Ze.Mesh(Ue,le.material);Me.addLevel(Re,50)}return Me};let Ke=0,ua=0;const za=[];Z.loadMeshCb=async(le,Te,Me,Ue,Re)=>{const oe=le.split("/").pop(),Ie=Me||(()=>{});Ke++;const He=new Promise(async(Ba,Oa)=>{try{const V=await ge(oe);if(!V||V.size===0)throw new Error(`文件为空: ${oe}`);const H=oe.split(".").pop().toLowerCase();let ee;switch(H){case"stl":ee=await ne(V,oe,Te);break;case"obj":ee=await Ne(V,oe,Te);break;default:throw new Error(`不支持的文件格式: ${H}`)}ae.enableLOD&&ee.isMesh&&(ee=we(ee,oe)),Ie(ee),ua++,Ue&&Ue({loaded:ua,total:Ke,progress:ua/Ke}),Ba(ee)}catch(V){console.error(`mesh文件加载失败: ${oe}`,V);const H=new Ze.Group;Ie(H),Ba(H);const ee=new Ze.BoxGeometry(.1,.1,.1),fe=new Ze.MeshStandardMaterial({color:16711680,wireframe:!0});return new Ze.Mesh(ee,fe)}});za.push(He)};try{if(!de){yo.value=void 0;break}if(M=await Z.loadAsync(de),console.log(`URDF文件加载完成,等待${Ke}个mesh文件加载...`),za.length>0)try{await Promise.allSettled(za),console.log(`所有mesh文件处理完成,成功加载: ${ua}/${Ke}`)}catch(Me){console.warn("部分mesh文件加载失败,但继续显示模型",Me)}M.traverse(Me=>{Me.isMesh&&(Me.castShadow=!0,Me.receiveShadow=!0,Me.renderOrder=1,Me.material&&(Me.material.needsUpdate=!0))}),console.time("计算包围盒");const le=new Ze.Box3;le.expandByObject(M);const Te=`urdf_${Date.now()}`;M.userData.boundingBox=le.clone(),M.userData.modelId=Te,fs.set(Te,{box:le.clone(),center:le.getCenter(new Ze.Vector3),size:le.getSize(new Ze.Vector3),maxSize:Math.max(...le.getSize(new Ze.Vector3).toArray())}),yo.value=M,console.log("URDF模型加载完成并优化")}catch(le){console.error("URDF加载失败:",le),yo.value=void 0}finally{de&&URL.revokeObjectURL(de)}break;default:throw new Error(`不支持的文件格式: ${D}`)}return M};return{addModelsFromUrls:y,loadModelByDefaultPath:async D=>{console.log(D);try{n.value=!0,i.value="正在加载模型...";const{scene:R}=l();if(!R)throw new Error("Scene not initialized");s(),await new Promise(K=>setTimeout(K,100));const E=[];for(let K=0;K<D.length;K++){const M=D[K],L=await u(M.suffix,M.blob,M.mtlBlobs||[],M.meshFiles||[]);L&&(R.add(L),r.value.push(L),E.push(L))}return n.value=!1,i.value="",E}catch(R){throw console.error("加载模型失败:",R),n.value=!1,i.value="",R}},urdfModel:yo,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>',(l=>{var r=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var i,s,c,m,p,h=function(x,D){D.parentNode.insertBefore(x,D)};if(r&&!l.__iconfont__svg__cssinject__){l.__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(x){console&&console.log(x)}}i=function(){var x,D=document.createElement("div");D.innerHTML=l._iconfont_svg_string_4827314,(D=D.getElementsByTagName("svg")[0])&&(D.setAttribute("aria-hidden","true"),D.style.position="absolute",D.style.width=0,D.style.height=0,D.style.overflow="hidden",D=D,(x=document.body).firstChild?h(D,x.firstChild):x.appendChild(D))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),i()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(c=i,m=l.document,p=!1,u(),m.onreadystatechange=function(){m.readyState=="complete"&&(m.onreadystatechange=null,y())})}function y(){p||(p=!0,c())}function u(){try{m.documentElement.doScroll("left")}catch{return void setTimeout(u,50)}y()}})(window);const Sf=["onClick"],Ef=a.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(l,{emit:r}){const n=l,i=r,s=a.ref(null),c=a.ref(null),m=S=>{if(Array.isArray(S)&&S.length>=3){const[k,g,P,$]=S;return $!==void 0?`rgba(${k}, ${g}, ${P}, ${$})`:`rgb(${k}, ${g}, ${P})`}if(typeof S=="string"){const k=S.trim();if(k.startsWith("[")&&k.endsWith("]")){const g=k.slice(1,-1).split(",").map(P=>Number(P.trim()));if(g.length>=3&&g.every(P=>!Number.isNaN(P))){const[P,$,Y,pe]=g;return pe!==void 0?`rgba(${P}, ${$}, ${Y}, ${pe})`:`rgb(${P}, ${$}, ${Y})`}}return k}},p=a.computed(()=>{const S=Number(n==null?void 0:n.textSize),k=m(n==null?void 0:n.textColor),g={},P={};return!Number.isNaN(S)&&S&&(g.fontSize=`${S}px`,P.fontSize=`${S}px`),k&&(g.color=k,P.color=k),{label:g,value:P}}),h=a.ref(""),y=a.ref(""),u=a.ref(!1),x=async S=>{if(S){y.value&&(URL.revokeObjectURL(y.value),y.value="");try{const k=await O.platformDownloadFile({url:S}),g=new Blob([k==null?void 0:k.data],{type:(k==null?void 0:k.headers["content-type"])||"image/*"});y.value=URL.createObjectURL(g)}catch{y.value=""}}};a.watch(()=>n==null?void 0:n.backGroundImage,S=>{S&&(h.value=S)},{immediate:!0}),a.watch(h,S=>{x(S)},{immediate:!0});const D=()=>{var S;(S=c.value)==null||S.click()},R=async S=>{var P,$,Y;const k=S.target,g=(P=k==null?void 0:k.files)==null?void 0:P[0];if(!g){k.value="";return}u.value=!0;try{const pe=new FormData;pe.append("file",g);const ze=await O.platformUploadFile(pe),de=(Y=($=ze==null?void 0:ze.data)==null?void 0:$.result)==null?void 0:Y.url;de?(h.value=de,i("update:backGroundImage",de),x(de),Ya.ElMessage.success("背景图片上传成功")):Ya.ElMessage.error("背景图片上传失败")}catch{Ya.ElMessage.error("背景图片上传失败")}finally{u.value=!1,k.value=""}},E=a.computed(()=>y.value?{backgroundImage:`url(${y.value})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),K=S=>tl.getComponent(S),M=S=>{if(!S)return;const k=S.querySelector("input, textarea, .el-input__inner");k&&typeof k.focus=="function"&&k.focus()},L=(S,k,g)=>{n.disabled||S.field&&(s.value=k,a.nextTick(()=>{M(g.currentTarget)}))},j=()=>{s.value=null},C=S=>{var g;const k=((g=S==null?void 0:S.field)==null?void 0:g.value)??(S==null?void 0:S.value);return k==null||k===""?"-":k},_=S=>{const k=S!=null&&S.width&&S.width>0?S.width:1,P=`calc((100% - ${(k-1)*16}px) / ${k})`;return{flex:`0 0 ${P}`,maxWidth:P,minWidth:"140px",boxSizing:"border-box"}};return(S,k)=>(a.openBlock(),a.createElementBlock("div",{class:"statistics-cards-container",style:a.normalizeStyle(E.value),onClick:k[2]||(k[2]=g=>(n==null?void 0:n.backGround)&&D())},[n!=null&&n.backGround?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:k[0]||(k[0]=a.withModifiers(g=>D(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:c,type:"file",accept:"image/*",style:{display:"none"},onChange:R},null,544),k[3]||(k[3]=a.createElementVNode("img",{src:tl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(S.items,(g,P)=>{var $,Y,pe,ze,de,Z,he,ae;return a.openBlock(),a.createElementBlock("div",{class:"statistics-card",key:P,style:a.normalizeStyle(_(g)),onClick:k[1]||(k[1]=a.withModifiers(()=>{},["stop"]))},[a.createElementVNode("div",{class:"statistics-label",style:a.normalizeStyle(p.value.label)},a.toDisplayString(g==null?void 0:g.label),5),a.createElementVNode("div",{class:"statistics-value",style:a.normalizeStyle(p.value.value),onClick:ue=>{var Se;return(Se=g.field)!=null&&Se.isNoClick?null:L(g,P,ue)}},[s.value===P&&g.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(K((($=g.field)==null?void 0:$.type)??"Input")),{key:0,modelValue:g.field.value,"onUpdate:modelValue":ue=>g.field.value=ue,isEdit:!0,disabled:(Y=g.field)==null?void 0:Y.disabled,content:((pe=g.field)==null?void 0:pe.contents)??[],optionUrl:g.field,originalValue:(ze=g.field)==null?void 0:ze.value,config:(de=g.field)==null?void 0:de.config,configModel:((Z=g.field)==null?void 0:Z.prop)??((he=g.field)==null?void 0:he.name),selectedTagList:((ae=g.field)==null?void 0:ae.selectValue)??[],onBlur:j,onBlurChange:j},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(C(g)),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(l){this.selectArray=l},setSelectString(l){this.selectString=l}}}),Df={class:"calculator-content"},Nf={class:"calculator-child"},Tf={class:"calculator-child"},Bf=a.defineComponent({__name:"calculator",setup(l){const r=a.ref(),n=a.ref();return a.onMounted(()=>{r.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(i,s)=>(a.openBlock(),a.createElementBlock("div",Df,[a.createElementVNode("div",Nf,[a.createVNode(tl.ssForm,{rowContents:r.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",Tf,[a.createVNode(tl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Af=er._export_sfc(Bf,[["__scopeId","data-v-73db0fe7"]]),bt=(l,r)=>{let n=l,i=r;return Array.isArray(n)&&(n=n==null?void 0:n.map((s,c)=>{if(Array.isArray(s)){let m={};return s=s==null?void 0:s.forEach((p,h)=>{var y;(y=i==null?void 0:i[h])!=null&&y.prop?m[i[h].prop]=p:Array.isArray(p)&&(m.children=bt(p,i))}),Object.assign(m,{id:c})}else return s})),n},pc=(l,r,n)=>{let i=l,s=r;return i=i==null?void 0:i.map((c,m)=>{var p,h;return!Array.isArray(c)||!((p=s==null?void 0:s[m])!=null&&p.label)&&!n||(c.unshift(((h=s==null?void 0:s[m])==null?void 0:h.label)??""),c.some(y=>Array.isArray(y))&&(c=c==null?void 0:c.map(y=>{var u;return Array.isArray(y)&&(y=pc(y,(u=s==null?void 0:s[m])==null?void 0:u.children,n)),y}))),c}),i},zf=(l,r,n)=>{if(r==="")return l==null?void 0:l.filter(i=>(i==null?void 0:i.id)!==n);{const i=r.split("-");return Mf(l,i,n)}},Mf=(l,r,n)=>{let i=l,s=r;return(s==null?void 0:s.length)===0?i=i==null?void 0:i.filter(c=>c.id!==n):i=i==null?void 0:i.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=fc(c,s,n)),c)),i},fc=(l,r,n)=>{var c,m;let i=l,s=r;return(s==null?void 0:s.length)===0?i.children=(c=i.children)==null?void 0:c.filter(p=>p.id!==n):i.children=(m=i.children)==null?void 0:m.map(p=>(p.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),p=fc(p,s,n)),p)),i},If=(l,r,n)=>{if(r==="")return n;{const i=r.split("-");return Of(l,i,n)}},Of=(l,r,n)=>{let i=l,s=r;return(s==null?void 0:s.length)===0?i=n:i=i==null?void 0:i.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=hc(c,s,n)),c)),i},hc=(l,r,n)=>{var c;let i=l,s=r;return(s==null?void 0:s.length)===0?i.children=n:i.children=(c=i.children)==null?void 0:c.map(m=>(m.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),m=hc(m,s,n)),m)),i};class Lf{constructor(r={}){Wr(this,"url");Wr(this,"heartbeatInterval");Wr(this,"socket",null);Wr(this,"isConnected",!1);Wr(this,"heartTimer",null);Wr(this,"canvas",null);Wr(this,"ctx",null);Wr(this,"mainCamCutMode",0);Wr(this,"pMainShowStartX",0);Wr(this,"pMainShowStartY",0);Wr(this,"onLog");Wr(this,"onDevCount");Wr(this,"onResolution");Wr(this,"onCameraStatus");Wr(this,"onPhoto");this.url=r.url??"ws://127.0.0.1:22225",this.heartbeatInterval=r.heartbeatInterval??3e3}init(r,n,i){var m;(m=this.canvas)!=null&&m.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const s=document.createElement("canvas");s.style.border="solid 1px #A0A0A0",s.id="MainCamCanvas",s.width=n,s.height=i;const c=s.getContext("2d");if(!c)throw new Error("无法获取 CanvasRenderingContext2D");r.appendChild(s),this.canvas=s,this.ctx=c}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((r,n)=>{const i=new WebSocket(this.url);i.binaryType="arraybuffer",i.onopen=()=>{this.socket=i,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),r()},i.onerror=s=>{this.isConnected=!1,this.log("socket.onerror"),n(s)},i.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},i.onmessage=s=>{this.handleMessage(s)}})}destroy(){var r;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,(r=this.canvas)!=null&&r.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(r=0){this.sendBytes(new Uint8Array([119,136,81,r]))}chooseResolution(r){if(!Array.isArray(r)||r.length===0)return null;const n=r.find(s=>s.width===2592&&s.height===1944);return n||[...r].sort((s,c)=>c.width*c.height-s.width*s.height)[0]||null}openCamera(r=0,n=1280,i=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=1,s[3]=r,s[4]=this.canvas.width>>8&255,s[5]=this.canvas.width&255,s[6]=this.canvas.height>>8&255,s[7]=this.canvas.height&255,s[8]=n>>8&255,s[9]=n&255,s[10]=i>>8&255,s[11]=i&255,this.sendBytes(s)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=16,s[3]=0,s[4]=0,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=0,this.sendBytes(s)}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(r){var n;(n=this.onLog)==null||n.call(this,r)}sendBytes(r){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(r.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(r){var s,c,m,p,h,y;const n=new Uint8Array(r.data);if(n.length<=0)return;if(n[0]===17&&n[1]===17&&n[2]===17){this.log("heart socket!!!!");return}if(n[0]!==85||n[1]!==102)return;const i=n[2];if(i===80){const u=n[3],x=n.length-4,D=new Uint8Array(x);for(let K=0;K<x;K++)D[K]=n[4+K];const E=decodeURIComponent(this.byteToString(D)).split("|");(s=this.onDevCount)==null||s.call(this,u,E);return}if(i===81){const u=n[3]||0,x=[];for(let D=0;D<u;D++){const R=(n[4+D*4+0]||0)*256+(n[4+D*4+1]||0),E=(n[4+D*4+2]||0)*256+(n[4+D*4+3]||0);x.push({width:R,height:E,text:`${R}*${E}`})}(c=this.onResolution)==null||c.call(this,u,x);return}if(i===1){n[3]===1&&((m=this.onCameraStatus)==null||m.call(this,"opened")),n[3]===3&&((p=this.onCameraStatus)==null||p.call(this,"closed"));return}if(i===16){if(n[3]===1){const x=n[4]*256+n[5],D=n[6]*65536+n[7]*256+n[8];let R="";if(x>0){const M=new Uint8Array(x);for(let L=0;L<x;L++)M[L]=n[9+L];R=decodeURIComponent(this.byteToString(M))}const E=new Uint8Array(D);for(let M=0;M<D;M++)E[M]=n[9+x+M];const K=this.uint8ArrayToString(E);(h=this.onPhoto)==null||h.call(this,{flag:0,imgPath:R,base64:K})}n[3]===2&&((y=this.onPhoto)==null||y.call(this,{flag:2,imgPath:"",base64:""}));return}if(i===204){if(!this.canvas||!this.ctx)return;const u=n[3]*256+n[4],x=n[5]*256+n[6];this.pMainShowStartX=n[7]*256+n[8],this.pMainShowStartY=n[9]*256+n[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const D=this.ctx.createImageData(u,x);let R=11;for(let E=0;E<D.data.length;E+=4)D.data[E+0]=n[R],D.data[E+1]=n[R+1],D.data[E+2]=n[R+2],D.data[E+3]=255,R+=3;this.ctx.putImageData(D,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(r){let n="";for(let i=0;i<r.length;i++)n+=String.fromCharCode(r[i]);return n}byteToString(r){let n="";for(let i=0;i<r.length;i++)n+=String.fromCharCode(r[i]);return n}}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=a.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(null),c=a.ref(!1),m=a.ref([]),p=a.ref(""),h=a.ref(!1),y=a.ref([]),u=new Lf({url:"ws://127.0.0.1:22225"});function x($,Y){var ae;const pe=$.split(","),ze=((ae=pe[0].match(/:(.*?);/))==null?void 0:ae[1])??"image/jpeg",de=atob(pe[1]);let Z=de.length;const he=new Uint8Array(Z);for(;Z--;)he[Z]=de.charCodeAt(Z);return new File([he],Y,{type:ze})}function D(){u.onLog=$=>{console.log("[GPY]",$)},u.onDevCount=($,Y)=>{if(p.value+=`设备数量=${$},设备=${Y.join(",")}
4
+ `,$>0){p.value+=`检测到设备,正在获取分辨率...
5
+ `;try{u.getResolution(0)}catch(pe){p.value+=`获取分辨率失败:${(pe==null?void 0:pe.message)??pe}
6
+ `}}else p.value+=`未检测到高拍仪设备!
7
+ `},u.onResolution=($,Y)=>{if($<=0||!Array.isArray(Y)||Y.length===0){p.value+=`未获取到可用分辨率,回退使用 1280*720 打开...
8
+ `;try{u.openCamera(0,1280,720)}catch(ze){p.value+=`打开摄像头失败:${(ze==null?void 0:ze.message)??ze}
9
+ `}return}const pe=u.chooseResolution(Y);if(!pe){p.value+=`分辨率选择失败,回退使用 1280*720 打开...
10
+ `;try{u.openCamera(0,1280,720)}catch(ze){p.value+=`打开摄像头失败:${(ze==null?void 0:ze.message)??ze}
11
+ `}return}p.value+=`获取分辨率 ${pe.text}成功,打开摄像头...
12
+ `;try{u.closeCamera(),setTimeout(()=>{try{u.openCamera(0,pe.width,pe.height)}catch(ze){p.value+=`打开摄像头失败:${(ze==null?void 0:ze.message)??ze}
13
+ `}},100)}catch{try{u.openCamera(0,pe.width,pe.height)}catch(ze){p.value+=`打开摄像头失败:${(ze==null?void 0:ze.message)??ze}
14
+ `}}},u.onCameraStatus=$=>{$==="opened"?(c.value=!0,p.value+=`摄像头已打开
15
+ `):(c.value=!1,p.value+=`摄像头已关闭
16
+ `)},u.onPhoto=$=>{if($.flag===0&&$.base64){const Y=`data:image/jpeg;base64,${$.base64}`,pe=x(Y,`gpy-capture-${Date.now()}.jpg`);m.value.push({uid:`${Date.now()}_${Math.random().toString(16).slice(2)}`,url:Y,file:pe}),p.value+=`拍照完成,已接收图片(当前 ${m.value.length} 张)
17
+ `}else p.value+=`拍照失败 flag=${$.flag}
18
+ `}}const R=async()=>{if(await a.nextTick(),!s.value)return;E(),D();const $=s.value.getBoundingClientRect();u.init(s.value,Math.floor($.width),Math.floor($.height)),p.value+=`正在连接设备服务...
19
+ `,await u.connect(),p.value+=`正在获取设备数量...
20
+ `,u.getDevCount()},E=()=>{try{u.destroy()}catch($){console.error($)}c.value=!1,m.value=[],p.value="",h.value=!1,y.value=[]};a.watch(()=>n.visible,$=>{$?R():E()});const K=()=>{try{u.bestSize()}catch($){console.error($)}},M=()=>{try{u.rotateLeft()}catch($){console.error($)}},L=()=>{try{u.rotateRight()}catch($){console.error($)}},j=()=>{try{u.focus()}catch($){console.error($)}},C=()=>{p.value+=`正在拍照...
21
+ `;try{u.photo()}catch($){p.value+=`拍照调用失败:${($==null?void 0:$.message)??$}
22
+ `}},_=()=>{m.value.length>0?i("confirm",m.value.map($=>$.file)):i("confirm",[])},S=$=>{$<0||$>=m.value.length||(m.value.splice($,1),p.value+=`已删除一张图片(剩余 ${m.value.length} 张)
23
+ `)},k=$=>{if(!$)return;const Y=`gpy-preview-${Date.now()}.jpg`;y.value=[{name:Y,blobUrl:$}],h.value=!0},g=()=>{h.value=!1},P=()=>{E(),i("cancel")};return($,Y)=>{const pe=a.resolveComponent("el-input"),ze=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(_r.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:P,width:"1200px",style:{height:"80%"}},{default:a.withCtx(()=>[a.createElementVNode("div",$f,[a.createElementVNode("div",{ref_key:"cameraBox",ref:s,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)"}},[c.value?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Rf,"初始化摄像头..."))],512),a.createElementVNode("div",Vf,[a.createElementVNode("div",Ff,[Y[0]||(Y[0]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),a.createElementVNode("div",Pf,[m.value.length===0?(a.openBlock(),a.createElementBlock("div",jf,"暂无图片")):(a.openBlock(),a.createElementBlock("div",Hf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(de,Z)=>(a.openBlock(),a.createElementBlock("div",{key:de.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[a.createElementVNode("img",{src:de.url,onClick:he=>k(de.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,Uf),a.createElementVNode("div",{onClick:he=>S(Z),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)]),a.createElementVNode("div",Wf,[Y[1]||(Y[1]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),a.createVNode(pe,{type:"textarea",value:p.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Kf,[a.createVNode(ze,{onClick:K,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[2]||(Y[2]=[a.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{onClick:M,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[3]||(Y[3]=[a.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),a.createVNode(ze,{onClick:L,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[4]||(Y[4]=[a.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),a.createVNode(ze,{onClick:j,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>Y[5]||(Y[5]=[a.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),a.createVNode(ze,{onClick:C,disabled:!c.value,id:"themeButton"},{default:a.withCtx(()=>Y[6]||(Y[6]=[a.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),Y[9]||(Y[9]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),a.createVNode(ze,{onClick:_,disabled:m.value.length===0,id:"themeButton"},{default:a.withCtx(()=>Y[7]||(Y[7]=[a.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),a.createVNode(ze,{onClick:P,id:"themeBorderButton"},{default:a.withCtx(()=>Y[8]||(Y[8]=[a.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),h.value?(a.openBlock(),a.createBlock(tl.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:g},null,8,["fileDataList"])):a.createCommentVNode("",!0)],64)}}}),Yf=er._export_sfc(Gf,[["__scopeId","data-v-24a2050a"]]),hs=O.useMenuState(O.pinia),Jf=async l=>{var c,m,p,h,y,u;let r=l==null?void 0:l.导入文件,n=l==null?void 0:l.函数参数,i=(c=r==null?void 0:r[0])==null?void 0:c.url,s="";if(!(i!=null&&i.includes("http"))||!(i!=null&&i.includes("https"))){hs.setContentLoading(!0);const x=await O.platformDownloadFile({url:i});let D=x==null?void 0:x.data;const R=new FormData;R.append("file",D,((m=r==null?void 0:r[0])==null?void 0:m.name)+"."+((p=i==null?void 0:i.split("."))==null?void 0:p[1])),R.append("query",n);let E=await ec(R);E=(u=(y=(h=E==null?void 0:E.data)==null?void 0:h.data)==null?void 0:y.response)==null?void 0:u.replace("generateResult",l==null?void 0:l.函数名称),s=E,hs.setContentLoading(!1)}return s},Tt=O.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(l){this.objUrl=l},setBlobUrls(l){this.blobUrls=l}}}),Xf=O.useLoginState(O.pinia),{extraUrl:si}=O.storeToRefs(Xf);let vc=si.value===""||!si.value?"http://139.196.154.85:20015":si.value;a.watch(()=>si.value,()=>{vc=si.value===""||!si.value?"http://139.196.154.85:20015":si.value},{deep:!0,immediate:!0});const Bo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},vs={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:vc+"/api/public/paddleOCR"};class Zf{constructor(r){Wr(this,"config");this.config={...vs,...r}}updateConfig(r){this.config={...this.config,...r}}getConfig(){return{...this.config}}validateFileSize(r){const n=this.config.maxSize*1024*1024;return r.size<=n}validateFileType(r){return r.type.startsWith("image/")||r.type==="application/pdf"}getAuthorizationToken(){const r=Ya.Local.get(Ya.accessTokenKey);return r?`Bearer ${r}`:""}buildOCRRequest(r,n){return{title:n,form:{OCR图片文件:r}}}async recognize(r,n){const i=this.getAuthorizationToken(),s=this.buildOCRRequest(r,n),c=this.config.apiUrl||vs.apiUrl||"";return(await Ya.axios.post(c,s,{headers:{"Content-Type":"application/json",Authorization:i}})).data}getFieldAliases(r){return Bo[r]?Bo[r]:[r]}extractTableHeaders(r){const n=[],i=new Set,s=m=>{const p=m==null?void 0:m.label;return!(!p||p==="操作"||p===this.config.columnName||(m==null?void 0:m.type)==="operate"||(m==null?void 0:m.prop)==="operate")},c=m=>{(m||[]).forEach(p=>{if(!p)return;const h=(p==null?void 0:p.children)||(p==null?void 0:p.child)||(p==null?void 0:p.columns);if(Array.isArray(h)&&h.length>0){c(h);return}if(s(p)){const y=p.label;if(!i.has(y)){i.add(y);const u=this.getFieldAliases(y);n.push(u)}}})};return c(r||[]),n}}function mc(l){return new Zf(l)}mc();const kt=async(l,r)=>{var m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k;let n=(p=(m=O.cloneDeep(l))==null?void 0:m.optionUrl)==null?void 0:p.menuSelect,i=[];n==null||n.forEach(g=>{});let s="",c=await na.menuToParent(n);if(c==null||c.forEach(g=>{var P,$,Y,pe;(g==null?void 0:g.name)===(((pe=(Y=($=(P=O.cloneDeep(l))==null?void 0:P.optionUrl)==null?void 0:$.groupSelect)==null?void 0:Y[0])==null?void 0:pe.replaceAll("'",""))??"")&&(s=g==null?void 0:g.id)}),r){s=r;const g=await Nr.getInsofDataApi({id:s}),P=(x=(u=(y=(h=g==null?void 0:g.data)==null?void 0:h.result)==null?void 0:y[0])==null?void 0:u.key)==null?void 0:x.pageKey;c=await na.getItemData(P,sessionStorage.getItem("systemKey"),"")}if(s!==""){let g;r?g=(D=c==null?void 0:c.find(Y=>(Y==null?void 0:Y.id)===r))==null?void 0:D.compData:g=(R=c==null?void 0:c.find(Y=>{var pe,ze,de,Z;return(Y==null?void 0:Y.name)===(((ze=(pe=l==null?void 0:l.groupSelect)==null?void 0:pe.split(":"))==null?void 0:ze[0])||((Z=(de=l==null?void 0:l.optionUrl)==null?void 0:de.groupSelect)==null?void 0:Z[0]))}))==null?void 0:R.compData;let P=(K=(E=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:E.contents)==null?void 0:K.map(Y=>Y==null?void 0:Y.label);(L=(M=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:M.contents)!=null&&L.every(Y=>Array.isArray(Y))&&(P=(_=na.getColumnChild((C=(j=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:j.contents)==null?void 0:C[0]))==null?void 0:_.map(Y=>Y==null?void 0:Y.prop));let $=(k=(S=g==null?void 0:g.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:S.contents)==null?void 0:k.map(Y=>{if(Array.isArray(Y))Y=Y==null?void 0:Y.filter(pe=>!(pe!=null&&pe.id));else{let pe={};for(let ze in Y)ze!=="id"&&(pe[ze]=Y==null?void 0:Y[ze]);Y=pe}return Y});$==null||$.forEach(Y=>{Array.isArray(Y)?i.push(na.getValueToObjectValue(Y,P)):i.push(Y)})}return i},Qf=O.useMenuState(O.pinia),{activeMenuPath:iv}=O.storeToRefs(Qf),e0=O.useUnit(O.pinia),{chooseTitle:ov}=O.storeToRefs(e0),a0="col-operate",yc=l=>`${a0}-${l}`,l0=(l,r)=>{const n=new Map;l.forEach(s=>{const{prop:c}=s;n.set(c,s)});const i=s=>{Array.isArray(s)&&s.forEach(c=>{const{prop:m}=c||{},p=n.get(m);r0(p,c),Array.isArray(c==null?void 0:c.children)&&c.children.length>0&&i(c.children)})};return i(r),r},r0=(l,r)=>(l&&(r.sortable=l==null?void 0:l.sortable,r.filterable=l==null?void 0:l.filterable,r.showSummary=l==null?void 0:l.showSummary,r.operable=l==null?void 0:l.operable,r.fixed=l==null?void 0:l.fixed),r),n0=(l,r)=>{const{sortable:n=!1,filterable:i=!1,showSummary:s=!1,operable:c=!1,fixed:m=!1}=r||{};return{prop:l,sortable:n,filterable:i,showSummary:s,operable:c,fixed:m}},i0=async l=>{var c,m;if(!l)return;const r=yc(l),n=await Nr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r}}),i=(c=n==null?void 0:n.data)==null?void 0:c.code,s=(m=n==null?void 0:n.data)==null?void 0:m.result;if(i==200)return s==null?void 0:s[0]},o0=async l=>{if(l)return[]},t0=async(l,r)=>{if(!l||!r)return;const n=yc(l);return await Nr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:r}})},s0=async(l,r)=>!l||!r?void 0:await Nr.updateInsofDataApi({id:l,value:{columns:r}}),ms=async(l,r)=>{const n=sessionStorage.getItem("systemKey");if(!l||!r||!n)return;const i=await i0(l);return i?await s0(i==null?void 0:i.id,r):await t0(l,r)};var _o={exports:{}},c0=_o.exports,ys;function u0(){return ys||(ys=1,function(l,r){(function(n,i){i()})(c0,function(){function n(y,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(y.type)?new Blob(["\uFEFF",y],{type:y.type}):y}function i(y,u,x){var D=new XMLHttpRequest;D.open("GET",y),D.responseType="blob",D.onload=function(){h(D.response,u,x)},D.onerror=function(){console.error("could not download file")},D.send()}function s(y){var u=new XMLHttpRequest;u.open("HEAD",y,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function c(y){try{y.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),y.dispatchEvent(u)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Pn.commonjsGlobal=="object"&&Pn.commonjsGlobal.global===Pn.commonjsGlobal?Pn.commonjsGlobal:void 0,p=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!p?function(y,u,x){var D=m.URL||m.webkitURL,R=document.createElement("a");u=u||y.name||"download",R.download=u,R.rel="noopener",typeof y=="string"?(R.href=y,R.origin===location.origin?c(R):s(R.href)?i(y,u,x):c(R,R.target="_blank")):(R.href=D.createObjectURL(y),setTimeout(function(){D.revokeObjectURL(R.href)},4e4),setTimeout(function(){c(R)},0))}:"msSaveOrOpenBlob"in navigator?function(y,u,x){if(u=u||y.name||"download",typeof y!="string")navigator.msSaveOrOpenBlob(n(y,x),u);else if(s(y))i(y,u,x);else{var D=document.createElement("a");D.href=y,D.target="_blank",setTimeout(function(){c(D)})}}:function(y,u,x,D){if(D=D||open("","_blank"),D&&(D.document.title=D.document.body.innerText="downloading..."),typeof y=="string")return i(y,u,x);var R=y.type==="application/octet-stream",E=/constructor/i.test(m.HTMLElement)||m.safari,K=/CriOS\/[\d]+/.test(navigator.userAgent);if((K||R&&E||p)&&typeof FileReader<"u"){var M=new FileReader;M.onloadend=function(){var C=M.result;C=K?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),D?D.location.href=C:location=C,D=null},M.readAsDataURL(y)}else{var L=m.URL||m.webkitURL,j=L.createObjectURL(y);D?D.location=j:location.href=j,D=null,setTimeout(function(){L.revokeObjectURL(j)},4e4)}});m.saveAs=h.saveAs=h,l.exports=h})}(_o)),_o.exports}u0();const Qn=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(l){this.itemData=l},setCurStructureCompIds(l){this.curStructureCompIds=l},setRefreshCurStructure(l){this.isRefreshCurStructure=l},setOriginalData(l){this.originalData=l},setExtraContents(l){this.extraContents=l},setNodeDev(l){this.nodeDev=l},setIsEdit(l){this.isEdit=l},setSelectTab(l){this.selectTab=l}}}),d0=O.useLoginState(O.pinia),{loginUserInfo:dt}=O.storeToRefs(d0),p0=async l=>{var i,s,c;let r=await O.getAllTables({platId:parseInt((i=dt==null?void 0:dt.value)==null?void 0:i.plat_id),tableNames:[l]});return r=(c=(s=r==null?void 0:r.data)==null?void 0:s.result)==null?void 0:c[0],await uc(r,!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:r}]}]},f0=O.useLoginState(),{loginUserInfo:vl}=O.storeToRefs(f0);let go="$R";const Dr=O.useModelComp(O.pinia),gc=a.ref(!1),{itemData:h0,itemGridData:oi,curStructureCompIds:gs,isSubmitCurStructure:v0,routeToChildPath:m0,pageMapState:xt,itemExtendData:bo,refreshTable:bs}=O.storeToRefs(Dr),Ro=Qn(O.pinia),Ir=O.useMenuState(O.pinia),cr=a.shallowRef([]),{asideMenus:y0,activeTopMenuPath:g0,activeMenuPath:gl,platform:tv,buttonTriggerType:b0,currentMenuPath:Qr}=O.storeToRefs(Ir),fn=O.useUnit(O.pinia),{selectTitle:Jn,chooseTitle:Ao}=O.storeToRefs(fn);a.ref();const Ti=a.ref(!0),Zn=a.ref(0),wt=a.ref([]);a.ref(!1);const Bt=a.ref(!1),Wi=a.ref(),bc=a.ref(),kc=a.ref(),k0=()=>{Dr.setItemGridData([]),Dr.setIsEdit("edit"),Dr.setSubmitCurStructure(gl.value!=="/平台管理/菜单管理")},x0=()=>{Dr.setIsEdit("view"),Dr.setRefreshCurStructure(!0)},w0=async l=>{var s;let r=Jn.value,n=r==null?void 0:r.findIndex(c=>(c==null?void 0:c.value)===(l==null?void 0:l.value)),i=r==null?void 0:r.filter((c,m)=>m<=n);fn.setSelectTitle(tl.safeClone(i)),i=(s=i==null?void 0:i.map(c=>c==null?void 0:c.value))==null?void 0:s.join("/"),Ir.setActiveMenuPath(null),Ir.setActiveMenuPath(i)},pt=async(l,r,n,i="contentConfig")=>{var s;try{if(!Array.isArray(l))return;let c,m;r==="create"?(c={dataList:l==null?void 0:l.map(h=>{var y;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:i,parentTable:"",version:1},value:{pageData:{...h,compData:(y=h==null?void 0:h.compData)==null?void 0:y.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},m=Nr.batchAddInsofDataApi):r==="update"?(c={dataList:l==null?void 0:l.map(h=>{var y;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(y=h==null?void 0:h.compData)==null?void 0:y.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},m=Nr.batchUpdateInsofDataApi):r==="delete"&&(c={ids:l},m=Nr.batchDeleteInsofDataApi);const p=await m(c);if(((s=p==null?void 0:p.data)==null?void 0:s.code)===200)return p.data.result;throw Ya.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{Ya.ElMessage.error("保存响应失败")}},ks=async(l,r,n,i)=>{var s,c,m,p,h,y,u,x,D,R,E;try{const K=(c=(s=l==null?void 0:l.results)==null?void 0:s.filter(S=>!(S!=null&&S.id)||typeof(S==null?void 0:S.id)=="string"))==null?void 0:c.map(S=>({key:{pageKey:l==null?void 0:l.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:n},value:{tableData:S}})),M=(p=(m=l==null?void 0:l.results)==null?void 0:m.filter(S=>(S==null?void 0:S.id)&&typeof(S==null?void 0:S.id)=="number"))==null?void 0:p.map(S=>({id:S==null?void 0:S.id,value:{tableData:S}})),L=JSON.parse(JSON.stringify(l)),j=(h=L==null?void 0:L.results)==null?void 0:h.map(S=>S.id);let C;n?C=(x=(u=(y=xt.value)==null?void 0:y[gl.value])==null?void 0:u.filter(S=>{var k,g,P;return((k=S==null?void 0:S.key)==null?void 0:k.type)===r&&((P=(g=S==null?void 0:S.key)==null?void 0:g.relatedInfo)==null?void 0:P.target)===i}))==null?void 0:x.map(S=>S==null?void 0:S.id):C=(E=(R=(D=xt.value)==null?void 0:D[gl.value])==null?void 0:R.filter(S=>{var k;return((k=S==null?void 0:S.key)==null?void 0:k.type)===r}))==null?void 0:E.map(S=>S==null?void 0:S.id);const _=C==null?void 0:C.filter(S=>!(j!=null&&j.includes(S))&&typeof S=="number");(K==null?void 0:K.length)>0&&await Nr.batchAddInsofDataApi({dataList:K}),(M==null?void 0:M.length)>0&&await Nr.batchUpdateInsofDataApi({dataList:M}),(_==null?void 0:_.length)>0&&await Nr.batchDeleteInsofDataApi({ids:_})}catch(K){throw new Error(K)}},_0=async l=>{var y,u,x,D,R,E,K,M,L,j;Ir.setContentLoading(!0);const r=JSON.parse(JSON.stringify(h0.value));if(!v0.value)return Ir.setCacheStructures({key:b0.value,data:r}),Ya.ElMessage.success("已暂存");const n=r==null?void 0:r.map(C=>C.id),i=n.filter(C=>{var _;return!((_=gs.value)!=null&&_.includes(C))}),s=(y=gs.value)==null?void 0:y.filter(C=>!n.includes(C)),c=[...i,...s].filter(C=>typeof C!==null&&typeof C<"u"),m=r==null?void 0:r.filter(C=>!C.id),p=r==null?void 0:r.filter(C=>C.id);let h=[];if(c&&(c==null?void 0:c.length)>0&&h.push(pt(c,"delete",l)),m&&(m==null?void 0:m.length)>0&&h.push(pt(m,"create",l)),p&&(p==null?void 0:p.length)>0&&h.push(pt(p,"update",l)),oi.value&&((u=oi.value)!=null&&u.isDelete&&((D=(x=oi.value)==null?void 0:x.results)==null?void 0:D.length)>0&&((E=(R=oi.value)==null?void 0:R.results)!=null&&E.every(C=>typeof C=="number"))?await Nr.batchDeleteInsofDataApi({ids:(K=oi.value)==null?void 0:K.results}):(console.log("itemGridData.value",oi.value),h.push(await ks(oi.value,"gridLayout")))),bo.value)for(const C in bo.value)h.push(await ks((M=bo.value)==null?void 0:M[C],"extend",{target:C,compId:(j=(L=bo.value)==null?void 0:L[C])==null?void 0:j.compId},C));await Promise.all(h).then(()=>{Ya.ElMessage.success("保存成功"),Dr.setRefreshCurStructure(!0)}).catch(C=>{Ya.ElMessage.success(C)}),Ir.setContentLoading(!1)},Ki=l=>Bi(l),S0=a.computed(()=>{var l;return(l=cr.value)==null?void 0:l.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),xc=a.computed(()=>{var l;return(l=cr.value)==null?void 0:l.filter(r=>!(r!=null&&r.affix&&(r==null?void 0:r.affix)!=="default"))}),wc=a.ref(0),_c=a.ref(null),E0="ocr_committed_temp_ids_v1",C0=(l,r)=>`${E0}:${String(l??"")}:${String(r??"")}`,D0=(l,r,n)=>{try{const i=C0(l,r),s=sessionStorage.getItem(i),c=s?JSON.parse(s):[],m=Array.isArray(c)?c:[],p=Array.from(new Set([...m,...n||[]].map(h=>String(h)))).slice(-200);sessionStorage.setItem(i,JSON.stringify(p))}catch{}},zo=async(l,r="data",n)=>{var s,c,m,p,h,y,u,x,D,R,E,K,M,L,j,C,_,S,k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia,se,U,W,Be,ke,ra,oa,_a,ga,Pa,ma,Oe,Ra,hl,Cl,Xl,xl,Vl,Wa,Rl,ja;let i=((m=(c=(s=Jn.value)==null?void 0:s.filter(ka=>(ka==null?void 0:ka.condition)==="child"))==null?void 0:c[0])==null?void 0:m.value)??"";if((l==null?void 0:l.buttonName)==="新增"){let ka=(p=l==null?void 0:l.fixContent)==null?void 0:p.map(ye=>{let xa={};for(let Le in ye)Array.isArray(ye==null?void 0:ye[Le])?xa[Le]=JSON.stringify(ye==null?void 0:ye[Le]):xa[Le]=ye==null?void 0:ye[Le];return xa}),Na=await O.quoteApi({platId:parseInt((h=vl==null?void 0:vl.value)==null?void 0:h.plat_id),type:"fatherSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});Na=(y=Na==null?void 0:Na.data)==null?void 0:y.result,Na=Na==null?void 0:Na.filter(ye=>{var xa,Le;return!((ye==null?void 0:ye.fatherPath)!==""&&((Le=(xa=ye==null?void 0:ye.quote)==null?void 0:xa[0])==null?void 0:Le.menus)===(gl==null?void 0:gl.value))});let $a=Na==null?void 0:Na.map(ye=>{var ea,pa;let xa={},Le=ka==null?void 0:ka[0],re;return Array.isArray((ea=ye==null?void 0:ye.struct)==null?void 0:ea[0])?re=na.getColumnChild((pa=ye==null?void 0:ye.struct)==null?void 0:pa[0]):re=ye==null?void 0:ye.struct,re=re==null?void 0:re.filter(We=>(We==null?void 0:We.prop)!=="relatedId"),re==null||re.forEach(We=>{var Sa,ya;xa[We.prop]=((Sa=We==null?void 0:We.words)!=null&&Sa[0]?(Le==null?void 0:Le[(ya=We==null?void 0:We.words)==null?void 0:ya[0]])??(Le==null?void 0:Le[We==null?void 0:We.prop]):Le==null?void 0:Le[We==null?void 0:We.prop])??""}),xa.id="1",xa.relatedId=`[${xa.id}]`,delete xa.sort,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[xa]}}),Xa=[{tableName:(u=l==null?void 0:l.relatedContents)==null?void 0:u.find(ye=>ye==null?void 0:ye.includes("content")),tableContents:ka}];Xa=[...Xa,...$a];let Za=await O.quoteApi({platId:parseInt((x=vl==null?void 0:vl.value)==null?void 0:x.plat_id),type:"sonSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});Za=(R=(D=Za==null?void 0:Za.data)==null?void 0:D.result)==null?void 0:R.filter(ye=>!(Xa!=null&&Xa.find(xa=>(xa==null?void 0:xa.tableName)==="content_"+(ye==null?void 0:ye.id)))),Za=Za==null?void 0:Za.filter(ye=>{var xa,Le;return!((ye==null?void 0:ye.fatherPath)!==""&&((Le=(xa=ye==null?void 0:ye.quote)==null?void 0:xa[0])==null?void 0:Le.menus)===(gl==null?void 0:gl.value))});let aa=Za==null?void 0:Za.map(ye=>{var ea,pa,We,Sa,ya,ml,Ha;let xa={},Le=ka==null?void 0:ka[0],re;return Array.isArray((ea=ye==null?void 0:ye.struct)==null?void 0:ea[0])?re=na.getColumnChild((pa=ye==null?void 0:ye.struct)==null?void 0:pa[0]):re=ye==null?void 0:ye.struct,re=re==null?void 0:re.filter(Ka=>(Ka==null?void 0:Ka.prop)!=="relatedId"),((Sa=(We=re==null?void 0:re[0])==null?void 0:We.words)!=null&&Sa[0]?Le!=null&&Le[(ml=(ya=re==null?void 0:re[0])==null?void 0:ya.words)==null?void 0:ml[0]]:Le!=null&&Le[(Ha=re==null?void 0:re[0])==null?void 0:Ha.prop])?(re==null||re.forEach(Ka=>{var wa,cl;xa[Ka.prop]=((wa=Ka==null?void 0:Ka.words)!=null&&wa[0]?(Le==null?void 0:Le[(cl=Ka==null?void 0:Ka.words)==null?void 0:cl[0]])??(Le==null?void 0:Le[Ka==null?void 0:Ka.prop]):Le==null?void 0:Le[Ka==null?void 0:Ka.prop])??""}),xa.id="1",xa.relatedId=`[${xa.id}]`,delete xa.sort):xa=void 0,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[xa]}});aa=aa==null?void 0:aa.filter(ye=>{var xa;return!((xa=ye==null?void 0:ye.tableContents)!=null&&xa.every(Le=>Le===void 0))}),Xa=[...Xa,...aa],await O.pageBatchAddApi({platId:parseInt((E=vl==null?void 0:vl.value)==null?void 0:E.plat_id),changeContents:Xa});let Va=[];Xa==null||Xa.forEach(ye=>{var xa;(xa=ye==null?void 0:ye.tableContents)==null||xa.forEach(Le=>{Va.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Le),request_result:"{}",is_delete:!1,request_table:ye==null?void 0:ye.tableName,request_type:"add"})})}),await O.pageBatchAddApi({platId:parseInt((K=vl==null?void 0:vl.value)==null?void 0:K.plat_id),changeContents:[{tableName:"log",tableContents:Va}]})}if((l==null?void 0:l.buttonName)==="OCR批量新增"){const ka=((l==null?void 0:l.ocrRows)||[]).map(Za=>Za==null?void 0:Za.id).filter(Za=>Za!=null),Na=((l==null?void 0:l.ocrRows)||[]).map(Za=>{const aa={...Za};return delete aa._isOCRRow,delete aa._ocrTableId,Object.keys(aa).forEach(Va=>{/(^|\.)证书附件$/.test(Va)&&Array.isArray(aa[Va])&&(aa[Va]=JSON.stringify(aa[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)))}),aa});let $a=[{tableName:(M=l==null?void 0:l.relatedContents)==null?void 0:M.find(Za=>Za==null?void 0:Za.includes("content")),tableContents:Na}];await O.pageBatchAddApi({platId:parseInt((L=vl==null?void 0:vl.value)==null?void 0:L.plat_id),changeContents:$a});let Xa=[];$a==null||$a.forEach(Za=>{var aa;(aa=Za==null?void 0:Za.tableContents)==null||aa.forEach(Va=>{Xa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Va),request_result:"{}",is_delete:!1,request_table:Za==null?void 0:Za.tableName,request_type:"ocrBatchAdd"})})}),await O.pageBatchAddApi({platId:parseInt((j=vl==null?void 0:vl.value)==null?void 0:j.plat_id),changeContents:[{tableName:"log",tableContents:Xa}]}),D0(l==null?void 0:l.parentTableId,l==null?void 0:l.index,ka)}if((l==null?void 0:l.buttonName)==="编辑"){const Na=((l==null?void 0:l.fixContent)||(l==null?void 0:l.singleContent)||[]||[]).map(re=>{const ea={...re};return delete ea._isOCRRow,delete ea._ocrTableId,delete ea._isTemp,delete ea.tableEditType,delete ea.index,ea});let $a=Na==null?void 0:Na.map(re=>{let ea={};for(let pa in re)Array.isArray(re==null?void 0:re[pa])?ea[pa]=JSON.stringify(re==null?void 0:re[pa]):ea[pa]=re==null?void 0:re[pa];return ea}),Xa=await O.quoteApi({platId:parseInt((C=vl==null?void 0:vl.value)==null?void 0:C.plat_id),type:"fatherSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});Xa=(_=Xa==null?void 0:Xa.data)==null?void 0:_.result,Xa=Xa==null?void 0:Xa.filter(re=>{var ea,pa;return!((re==null?void 0:re.fatherPath)!==""&&((pa=(ea=re==null?void 0:re.quote)==null?void 0:ea[0])==null?void 0:pa.menus)===(gl==null?void 0:gl.value))});let Za=(S=$a==null?void 0:$a[0])==null?void 0:S.id,aa=[{tableName:(k=l==null?void 0:l.relatedContents)==null?void 0:k.find(re=>re==null?void 0:re.includes("content")),tableContents:$a}],Va=(g=Xa==null?void 0:Xa.map(re=>{var pa,We,Sa,ya,ml;let ea=(pa=re==null?void 0:re.contents)==null?void 0:pa.filter(Ha=>{var Ka,wa;return JSON.stringify(Ha==null?void 0:Ha.relatedId)!=="{}"&&(Ha==null?void 0:Ha.relatedId)!==""&&(Ha!=null&&Ha.relatedId)?(Ka=Ha==null?void 0:Ha.relatedId)==null?void 0:Ka.includes(parseInt(Za)):(Ha==null?void 0:Ha.sort)===((wa=$a==null?void 0:$a[0])==null?void 0:wa.sort)});if((ea==null?void 0:ea.length)>0){let Ha=$a==null?void 0:$a[0];Ha={...Ha,id:(We=ea==null?void 0:ea[0])==null?void 0:We.id};let Ka={},wa=Ha,cl;return Array.isArray((Sa=re==null?void 0:re.struct)==null?void 0:Sa[0])?cl=na.getColumnChild((ya=re==null?void 0:re.struct)==null?void 0:ya[0]):cl=re==null?void 0:re.struct,cl=cl==null?void 0:cl.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),cl==null||cl.forEach(Ia=>{var Ae,Dl;Ka[Ia.prop]=((Ae=Ia==null?void 0:Ia.words)!=null&&Ae[0]?(wa==null?void 0:wa[(Dl=Ia==null?void 0:Ia.words)==null?void 0:Dl[0]])??(wa==null?void 0:wa[Ia==null?void 0:Ia.prop]):wa==null?void 0:wa[Ia==null?void 0:Ia.prop])??""}),Ka.id=(ml=ea==null?void 0:ea[0])==null?void 0:ml.id,delete Ka.sort,delete Ka.relatedId,{tableName:"content_"+(re==null?void 0:re.id),tableContents:[Ka]}}else return}))==null?void 0:g.filter(re=>re);aa=[...aa,...Va];let ye=await O.quoteApi({platId:parseInt((P=vl==null?void 0:vl.value)==null?void 0:P.plat_id),type:"sonSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});ye=(Y=($=ye==null?void 0:ye.data)==null?void 0:$.result)==null?void 0:Y.filter(re=>!(aa!=null&&aa.find(ea=>(ea==null?void 0:ea.tableName)==="content_"+(re==null?void 0:re.id)))),ye=ye==null?void 0:ye.filter(re=>{var ea,pa;return!((re==null?void 0:re.fatherPath)!==""&&((pa=(ea=re==null?void 0:re.quote)==null?void 0:ea[0])==null?void 0:pa.menus)===(gl==null?void 0:gl.value))});let xa=(pe=ye==null?void 0:ye.map(re=>{var pa,We,Sa,ya,ml;let ea=(pa=re==null?void 0:re.contents)==null?void 0:pa.filter(Ha=>{var Ka,wa,cl;return JSON.stringify(Ha==null?void 0:Ha.relatedId)!=="{}"&&(Ha==null?void 0:Ha.relatedId)!==""&&(Ha!=null&&Ha.relatedId)?(Ka=Ha==null?void 0:Ha.relatedId)==null?void 0:Ka.includes(parseInt(Za)):(Ha==null?void 0:Ha.sort)===((wa=$a==null?void 0:$a[0])==null?void 0:wa.sort)||(Ha==null?void 0:Ha.sort)===(parseInt(((cl=$a==null?void 0:$a[0])==null?void 0:cl.sort)??"0")+1).toString()});if((ea==null?void 0:ea.length)>0){let Ha=$a==null?void 0:$a[0];Ha={...Ha,id:(We=ea==null?void 0:ea[0])==null?void 0:We.id};let Ka={},wa=Ha,cl;return Array.isArray((Sa=re==null?void 0:re.struct)==null?void 0:Sa[0])?cl=na.getColumnChild((ya=re==null?void 0:re.struct)==null?void 0:ya[0]):cl=re==null?void 0:re.struct,cl=cl==null?void 0:cl.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),cl==null||cl.forEach(Ia=>{var Ae,Dl,Ol,Gl;((Ae=Ia==null?void 0:Ia.words)!=null&&Ae[0]?(wa==null?void 0:wa[(Dl=Ia==null?void 0:Ia.words)==null?void 0:Dl[0]])??(wa==null?void 0:wa[Ia==null?void 0:Ia.prop]):wa!=null&&wa[Ia==null?void 0:Ia.prop])&&(Ka[Ia.prop]=((Ol=Ia==null?void 0:Ia.words)!=null&&Ol[0]?(wa==null?void 0:wa[(Gl=Ia==null?void 0:Ia.words)==null?void 0:Gl[0]])??(wa==null?void 0:wa[Ia==null?void 0:Ia.prop]):wa==null?void 0:wa[Ia==null?void 0:Ia.prop])??"")}),Ka.id=(ml=ea==null?void 0:ea[0])==null?void 0:ml.id,delete Ka.sort,delete Ka.relatedId,{tableName:"content_"+(re==null?void 0:re.id),tableContents:[Ka]}}else return}))==null?void 0:pe.filter(re=>re);aa=[...aa,...xa],await O.pageBatchUpdateApi({platId:parseInt((ze=vl==null?void 0:vl.value)==null?void 0:ze.plat_id),changeContents:aa});let Le=[];aa==null||aa.forEach(re=>{var ea;(ea=re==null?void 0:re.tableContents)==null||ea.forEach(pa=>{Le.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(pa),request_result:"{}",is_delete:!1,request_table:re==null?void 0:re.tableName,request_type:"update"})})}),await O.pageBatchAddApi({platId:parseInt((de=vl==null?void 0:vl.value)==null?void 0:de.plat_id),changeContents:[{tableName:"log",tableContents:Le}]})}if((l==null?void 0:l.buttonName)==="删除"){let ka=[{tableName:(Z=l==null?void 0:l.relatedContents)==null?void 0:Z.find(ye=>ye==null?void 0:ye.includes("content")),tableContents:l==null?void 0:l.fixContent}],Na=await O.quoteApi({platId:parseInt((he=vl==null?void 0:vl.value)==null?void 0:he.plat_id),type:"fatherSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});Na=(ae=Na==null?void 0:Na.data)==null?void 0:ae.result,Na=Na==null?void 0:Na.filter(ye=>{var xa,Le;return!((ye==null?void 0:ye.fatherPath)!==""&&((Le=(xa=ye==null?void 0:ye.quote)==null?void 0:xa[0])==null?void 0:Le.menus)===(gl==null?void 0:gl.value))});let $a=(Se=(ue=l==null?void 0:l.fixContent)==null?void 0:ue[0])==null?void 0:Se.id,Xa=(Ve=Na==null?void 0:Na.map(ye=>{var Le,re,ea,pa,We,Sa;let xa=(Le=ye==null?void 0:ye.contents)==null?void 0:Le.filter(ya=>{var ml,Ha,Ka;return JSON.stringify(ya==null?void 0:ya.relatedId)!=="{}"&&(ya==null?void 0:ya.relatedId)!==""&&(ya!=null&&ya.relatedId)?(ml=ya==null?void 0:ya.relatedId)==null?void 0:ml.includes(parseInt($a)):(ya==null?void 0:ya.sort)===((Ka=(Ha=l==null?void 0:l.fixContent)==null?void 0:Ha[0])==null?void 0:Ka.sort)});if((xa==null?void 0:xa.length)>0){let ya=(re=l==null?void 0:l.fixContent)==null?void 0:re[0];ya={...ya,id:(ea=xa==null?void 0:xa[0])==null?void 0:ea.id};let ml={},Ha=ya,Ka;return Array.isArray((pa=ye==null?void 0:ye.struct)==null?void 0:pa[0])?Ka=na.getColumnChild((We=ye==null?void 0:ye.struct)==null?void 0:We[0]):Ka=ye==null?void 0:ye.struct,Ka=Ka==null?void 0:Ka.filter(wa=>(wa==null?void 0:wa.prop)!=="relatedId"),Ka==null||Ka.forEach(wa=>{var cl,Ia;ml[wa.prop]=((cl=wa==null?void 0:wa.words)!=null&&cl[0]?(Ha==null?void 0:Ha[(Ia=wa==null?void 0:wa.words)==null?void 0:Ia[0]])??(Ha==null?void 0:Ha[wa==null?void 0:wa.prop]):Ha==null?void 0:Ha[wa==null?void 0:wa.prop])??""}),ml.id=(Sa=xa==null?void 0:xa[0])==null?void 0:Sa.id,delete ml.sort,delete ml.relatedId,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[ml]}}else return}))==null?void 0:Ve.filter(ye=>ye);ka=[...ka,...Xa];let Za=await O.quoteApi({platId:parseInt((ge=vl==null?void 0:vl.value)==null?void 0:ge.plat_id),type:"sonSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});Za=(q=(T=Za==null?void 0:Za.data)==null?void 0:T.result)==null?void 0:q.filter(ye=>!(ka!=null&&ka.find(xa=>(xa==null?void 0:xa.tableName)==="content_"+(ye==null?void 0:ye.id)))),Za=Za==null?void 0:Za.filter(ye=>{var xa,Le;return!((ye==null?void 0:ye.fatherPath)!==""&&((Le=(xa=ye==null?void 0:ye.quote)==null?void 0:xa[0])==null?void 0:Le.menus)===(gl==null?void 0:gl.value))});let aa=(ne=Za==null?void 0:Za.map(ye=>{var Le,re,ea,pa,We,Sa;let xa=(Le=ye==null?void 0:ye.contents)==null?void 0:Le.filter(ya=>{var ml,Ha,Ka;return JSON.stringify(ya==null?void 0:ya.relatedId)!=="{}"&&(ya==null?void 0:ya.relatedId)!==""&&(ya!=null&&ya.relatedId)?(ml=ya==null?void 0:ya.relatedId)==null?void 0:ml.includes(parseInt($a)):(ya==null?void 0:ya.sort)===((Ka=(Ha=l==null?void 0:l.fixContent)==null?void 0:Ha[0])==null?void 0:Ka.sort)});if((xa==null?void 0:xa.length)>0){let ya=(re=l==null?void 0:l.fixContent)==null?void 0:re[0];ya={...ya,id:(ea=xa==null?void 0:xa[0])==null?void 0:ea.id};let ml={},Ha=ya,Ka;return Array.isArray((pa=ye==null?void 0:ye.struct)==null?void 0:pa[0])?Ka=na.getColumnChild((We=ye==null?void 0:ye.struct)==null?void 0:We[0]):Ka=ye==null?void 0:ye.struct,Ka=Ka==null?void 0:Ka.filter(wa=>(wa==null?void 0:wa.prop)!=="relatedId"),Ka==null||Ka.forEach(wa=>{var cl,Ia;ml[wa.prop]=((cl=wa==null?void 0:wa.words)!=null&&cl[0]?(Ha==null?void 0:Ha[(Ia=wa==null?void 0:wa.words)==null?void 0:Ia[0]])??(Ha==null?void 0:Ha[wa==null?void 0:wa.prop]):Ha==null?void 0:Ha[wa==null?void 0:wa.prop])??""}),ml.id=(Sa=xa==null?void 0:xa[0])==null?void 0:Sa.id,delete ml.sort,delete ml.relatedId,{tableName:"content_"+(ye==null?void 0:ye.id),tableContents:[ml]}}else return}))==null?void 0:ne.filter(ye=>ye);ka=[...ka,...aa],await O.pageBatchDeleteApi({platId:parseInt((Ne=vl==null?void 0:vl.value)==null?void 0:Ne.plat_id),changeContents:ka});let Va=[];ka==null||ka.forEach(ye=>{var xa;(xa=ye==null?void 0:ye.tableContents)==null||xa.forEach(Le=>{Va.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(Le),request_result:"{}",is_delete:!1,request_table:ye==null?void 0:ye.tableName,request_type:"delete"})})}),await O.pageBatchAddApi({platId:parseInt((we=vl==null?void 0:vl.value)==null?void 0:we.plat_id),changeContents:[{tableName:"log",tableContents:Va}]})}if((l==null?void 0:l.buttonName)==="复制新增"){let ka=await O.getPageDataApi({platId:parseInt((Ke=vl==null?void 0:vl.value)==null?void 0:Ke.plat_id),pageName:"menu"});if(ka=(ua=ka==null?void 0:ka.data)==null?void 0:ua.result,ka!=null&&ka.find(Na=>(Na==null?void 0:Na.father_name)===gl.value+"/")){kc.value=l,bc.value=ka==null?void 0:ka.filter(Xa=>(Xa==null?void 0:Xa.father_name)===gl.value+"/");let Na=(le=(za=l==null?void 0:l.columns)==null?void 0:za.find(Xa=>Xa==null?void 0:Xa.mainKey))==null?void 0:le.prop,$a=(Me=(Te=l==null?void 0:l.fixContent)==null?void 0:Te[0])==null?void 0:Me[Na];Bt.value=!0,Wi.value=[{prop:Na,label:Na,name:Na,value:$a}]}else{let Na=(Ue=l==null?void 0:l.fixContent)==null?void 0:Ue.map(Za=>{let aa={};for(let Va in Za)Array.isArray(Za==null?void 0:Za[Va])?aa[Va]=JSON.stringify(Za==null?void 0:Za[Va]):aa[Va]=Za==null?void 0:Za[Va];return aa.relatedId="",aa}),$a=[{tableName:(Re=l==null?void 0:l.relatedContents)==null?void 0:Re.find(Za=>Za==null?void 0:Za.includes("content")),tableContents:Na}];await O.pageBatchAddApi({platId:parseInt((oe=vl==null?void 0:vl.value)==null?void 0:oe.plat_id),changeContents:$a});let Xa=[];$a==null||$a.forEach(Za=>{var aa;(aa=Za==null?void 0:Za.tableContents)==null||aa.forEach(Va=>{Xa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Va),request_result:"{}",is_delete:!1,request_table:Za==null?void 0:Za.tableName,request_type:"copyAdd"})})}),await O.pageBatchAddApi({platId:parseInt((Ie=vl==null?void 0:vl.value)==null?void 0:Ie.plat_id),changeContents:[{tableName:"log",tableContents:Xa}]})}}if((l==null?void 0:l.buttonName)==="methodButton"){let ka=((Oa=(Ba=(He=l==null?void 0:l.columns)==null?void 0:He.map(re=>re==null?void 0:re.filter))==null?void 0:Ba.filter(re=>re!==""))==null?void 0:Oa[0])??"";ka=Ze.analyzeSplitToContent(ka,","),ka=(ka==null?void 0:ka.find(re=>re==null?void 0:re.includes("@Filter")))??"";let Na=(V=l==null?void 0:l.fixContent)==null?void 0:V.map(re=>{let ea={};for(let pa in re)Array.isArray(re==null?void 0:re[pa])?ea[pa]=JSON.stringify(re==null?void 0:re[pa]):ea[pa]=re==null?void 0:re[pa];return ea}),$a=await O.quoteApi({platId:parseInt((H=vl==null?void 0:vl.value)==null?void 0:H.plat_id),type:"fatherSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});$a=(ee=$a==null?void 0:$a.data)==null?void 0:ee.result,$a=$a==null?void 0:$a.filter(re=>{var ea,pa;return!((re==null?void 0:re.fatherPath)!==""&&((pa=(ea=re==null?void 0:re.quote)==null?void 0:ea[0])==null?void 0:pa.menus)===(gl==null?void 0:gl.value))});let Xa=(me=(fe=l==null?void 0:l.columns)==null?void 0:fe[0])==null?void 0:me.prop,Za=(fa=Na==null?void 0:Na[0])==null?void 0:fa[Xa],aa=[{tableName:(Xe=l==null?void 0:l.relatedContents)==null?void 0:Xe.find(re=>re==null?void 0:re.includes("content")),tableContents:Na}],Va=(ce=$a==null?void 0:$a.map(re=>{var pa,We,Sa,ya,ml;let ea=(pa=re==null?void 0:re.contents)==null?void 0:pa.filter(Ha=>{var Ka;return(Ka=Object.values(Ha))==null?void 0:Ka.find(wa=>wa===Za)});if((ea==null?void 0:ea.length)>0){let Ha=Na==null?void 0:Na[0];Ha={...Ha,id:(We=ea==null?void 0:ea[0])==null?void 0:We.id};let Ka={},wa=Ha,cl;return Array.isArray((Sa=re==null?void 0:re.struct)==null?void 0:Sa[0])?cl=na.getColumnChild((ya=re==null?void 0:re.struct)==null?void 0:ya[0]):cl=re==null?void 0:re.struct,cl=cl==null?void 0:cl.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),cl==null||cl.forEach(Ia=>{var Ae,Dl;Ka[Ia.prop]=((Ae=Ia==null?void 0:Ia.words)!=null&&Ae[0]?(wa==null?void 0:wa[(Dl=Ia==null?void 0:Ia.words)==null?void 0:Dl[0]])??(wa==null?void 0:wa[Ia==null?void 0:Ia.prop]):wa==null?void 0:wa[Ia==null?void 0:Ia.prop])??""}),Ka.id=(ml=ea==null?void 0:ea[0])==null?void 0:ml.id,delete Ka.sort,{tableName:"content_"+(re==null?void 0:re.id),tableContents:[Ka]}}else return}))==null?void 0:ce.filter(re=>re);aa=[...aa,...Va];let ye=await O.quoteApi({platId:parseInt((_e=vl==null?void 0:vl.value)==null?void 0:_e.plat_id),type:"sonSyncs",related:[{menus:i!==""?gl.value+"/"+i:gl.value,groups:l==null?void 0:l.name}]});if(ye=(qe=(va=ye==null?void 0:ye.data)==null?void 0:va.result)==null?void 0:qe.filter(re=>!(aa!=null&&aa.find(ea=>(ea==null?void 0:ea.tableName)==="content_"+(re==null?void 0:re.id)))),ye=ye==null?void 0:ye.filter(re=>{var ea,pa;return!((re==null?void 0:re.fatherPath)!==""&&((pa=(ea=re==null?void 0:re.quote)==null?void 0:ea[0])==null?void 0:pa.menus)===(gl==null?void 0:gl.value))}),ka&&ka!==""){(ka==null?void 0:ka[(ka==null?void 0:ka.length)-1])===","&&(ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1)),ka=(Ma=(La=ka==null?void 0:ka.replace("(",go))==null?void 0:La.split(go))==null?void 0:Ma[1],ka=ka==null?void 0:ka.slice(0,(ka==null?void 0:ka.length)-1),(ka==null?void 0:ka[0])==="*"&&(ka="{"+((ia=(Je=ka==null?void 0:ka.replace("{",go))==null?void 0:Je.split(go))==null?void 0:ia[1])),ka=(se=ka==null?void 0:ka.replaceAll("{",""))==null?void 0:se.replaceAll("}","");let re=na.calculatorAndToOr(ka);re=re==null?void 0:re[0];let ea;if((U=Object.values(re))!=null&&U.some(pa=>(pa==null?void 0:pa[0])==="*")){let pa=(Be=(W=Jn.value)==null?void 0:W.find(We=>(We==null?void 0:We.condition)==="child"))!=null&&Be.value?(Qr==null?void 0:Qr.value)+"/"+((ra=(ke=Jn.value)==null?void 0:ke.find(We=>(We==null?void 0:We.condition)==="child"))==null?void 0:ra.value):Qr==null?void 0:Qr.value;ea=await Kr(pa,!1)}for(let pa in re)if(((oa=re==null?void 0:re[pa])==null?void 0:oa[0])==="*"){let We=(ma=(Pa=(ga=re[pa])==null?void 0:ga.slice(1,(_a=re[pa])==null?void 0:_a.length))==null?void 0:Pa.split(":"))==null?void 0:ma[0],Sa=(Ra=(Oe=re[pa])==null?void 0:Oe.split(":"))==null?void 0:Ra[1],ya=(hl=ea==null?void 0:ea.filter(ml=>(ml==null?void 0:ml.name)===We))==null?void 0:hl[0];ya=(Xl=(Cl=ya==null?void 0:ya.compData)==null?void 0:Cl.find(ml=>(ml==null?void 0:ml.key)==="tableContents"))==null?void 0:Xl.contents,ya=(xl=ya==null?void 0:ya[0])==null?void 0:xl[Sa],re[pa]=ya}ka=((Vl=Object.values(re))==null?void 0:Vl[0])??""}let xa=(Wa=ye==null?void 0:ye.map(re=>{var pa,We,Sa,ya,ml;let ea=(pa=re==null?void 0:re.contents)==null?void 0:pa.filter(Ha=>{var Ka;return(Ka=Object.values(Ha))==null?void 0:Ka.find(wa=>wa===(ka===""?Za:ka))});if((ea==null?void 0:ea.length)>0){let Ha=Na==null?void 0:Na[0];Ha={...Ha,id:(We=ea==null?void 0:ea[0])==null?void 0:We.id};let Ka={},wa=Ha,cl;return Array.isArray((Sa=re==null?void 0:re.struct)==null?void 0:Sa[0])?cl=na.getColumnChild((ya=re==null?void 0:re.struct)==null?void 0:ya[0]):cl=re==null?void 0:re.struct,cl=cl==null?void 0:cl.filter(Ia=>(Ia==null?void 0:Ia.prop)!=="relatedId"),cl==null||cl.forEach(Ia=>{var Dl,Ol,Gl,Hl;let Ae=(Dl=l==null?void 0:l.columns)==null?void 0:Dl.find(Zl=>{var Sr,Fl,fr;return((Fl=(Sr=Zl==null?void 0:Zl.words)==null?void 0:Sr[0])==null?void 0:Fl.replaceAll("'",""))===(Ia==null?void 0:Ia.prop)&&((fr=Zl==null?void 0:Zl.functionRelatedWords)==null?void 0:fr.length)>0});Ae=(Ol=Ae==null?void 0:Ae.prop)==null?void 0:Ol.replaceAll("'",""),Ka[Ia.prop]=((Gl=Ia==null?void 0:Ia.words)!=null&&Gl[0]?(wa==null?void 0:wa[(Hl=Ia==null?void 0:Ia.words)==null?void 0:Hl[0]])??(wa==null?void 0:wa[Ia==null?void 0:Ia.prop])??(wa==null?void 0:wa[Ae]):(wa==null?void 0:wa[Ia==null?void 0:Ia.prop])??(wa==null?void 0:wa[Ae]))??void 0}),Ka.id=(ml=ea==null?void 0:ea[0])==null?void 0:ml.id,delete Ka.sort,{tableName:"content_"+(re==null?void 0:re.id),tableContents:[Ka]}}else return}))==null?void 0:Wa.filter(re=>re);aa=[...aa,...xa],await O.pageBatchUpdateApi({platId:parseInt((Rl=vl==null?void 0:vl.value)==null?void 0:Rl.plat_id),changeContents:aa});let Le=[];aa==null||aa.forEach(re=>{var ea;(ea=re==null?void 0:re.tableContents)==null||ea.forEach(pa=>{Le.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(pa),request_result:"{}",is_delete:!1,request_table:re==null?void 0:re.tableName,request_type:"method"})})}),await O.pageBatchAddApi({platId:parseInt((ja=vl==null?void 0:vl.value)==null?void 0:ja.plat_id),changeContents:[{tableName:"log",tableContents:Le}]})}Dr.setRefreshCurStructure(!0),await St(l)},_t=async(l,r,n)=>{var s;let i=l==null?void 0:l.find(c=>(c==null?void 0:c.id)===r);if(i){let c=(s=i.compData)==null?void 0:s.map(m=>{var p;if((m==null?void 0:m.key)==="tableContents"){let h={...m,contents:n};return h.contents=(p=(h==null?void 0:h.contents)??[])==null?void 0:p.map(y=>{let u={};for(let x in y)JSON.stringify(y==null?void 0:y[x])==="{}"?u[x]="":u[x]=y==null?void 0:y[x];return u}),h}return m});return i.compData=await Nt(c,{}),l=l==null?void 0:l.map(m=>((m==null?void 0:m.id)===(i==null?void 0:i.id)&&(m=i),m)),l}else{let c=l==null?void 0:l.filter(p=>{var h;return(p==null?void 0:p.children)&&((h=p==null?void 0:p.children)==null?void 0:h.length)>0||(p==null?void 0:p.comp)==="Tabs"}),m=c==null?void 0:c.map(async p=>{var h;return p!=null&&p.children&&((h=p==null?void 0:p.children)==null?void 0:h.length)>0?p.children=await _t(p==null?void 0:p.children,r,n):p.compData=await _t(p==null?void 0:p.compData,r,n),p});return c=await Promise.all(m),c}},St=async l=>{var c,m,p,h,y,u,x;let r=(c=l==null?void 0:l.relatedContents)==null?void 0:c.filter(D=>D==null?void 0:D.includes("content_"));if(!r)return;let n=await O.getAllTables({platId:parseInt((m=vl==null?void 0:vl.value)==null?void 0:m.plat_id),tableNames:r??[]});if(n=(h=(p=n==null?void 0:n.data)==null?void 0:p.result)==null?void 0:h[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(D=>{D==null||delete D.source_table;const R={};for(let E in D){const K=D==null?void 0:D[E],M=K&&Object.prototype.toString.call(K)==="[object Object]"&&Object.keys(K).length===0,L=Array.isArray(K)&&K.length===0;K==null||K==="{}"||M||L?R[E]="":R[E]=K}return R});let i=(u=(y=r==null?void 0:r[0])==null?void 0:y.split("_"))==null?void 0:u[1],s=await _t(cr.value,i,n);cr.value=(x=cr.value)==null?void 0:x.map(D=>{var R,E;return(R=s==null?void 0:s[0])!=null&&R.tabInform&&((E=s==null?void 0:s[0])==null?void 0:E.tabInform)===(D==null?void 0:D.tabInform)?D=s==null?void 0:s[0]:(D!=null&&D.name?(D==null?void 0:D.name)===(s==null?void 0:s.name):(D==null?void 0:D.id)===(s==null?void 0:s.id))&&(D=s),D})},N0=l=>{let r=Wi.value;Wi.value=r==null?void 0:r.map(n=>(n.value=l==null?void 0:l[n==null?void 0:n.prop],n))},T0=async()=>{var D,R,E,K,M,L,j,C,_,S;let l=kc.value,r=bc.value,n=(R=(D=l==null?void 0:l.columns)==null?void 0:D.find(k=>k==null?void 0:k.mainKey))==null?void 0:R.prop,i=(K=(E=Wi.value)==null?void 0:E[0])==null?void 0:K.value,s=(M=l==null?void 0:l.fixContent)==null?void 0:M.map(k=>{var P;let g={};for(let $ in k)Array.isArray(k==null?void 0:k[$])?g[$]=JSON.stringify(k==null?void 0:k[$]):g[$]=k==null?void 0:k[$];return(P=l==null?void 0:l.columns)==null||P.forEach($=>{($==null?void 0:$.formType)==="Upload"&&(g==null?void 0:g[$==null?void 0:$.prop])===""&&(g[$==null?void 0:$.prop]="{}")}),g[n]=i,g}),c=[{tableName:(L=l==null?void 0:l.relatedContents)==null?void 0:L.find(k=>k==null?void 0:k.includes("content")),tableContents:s}];await O.pageBatchAddApi({platId:parseInt((j=vl==null?void 0:vl.value)==null?void 0:j.plat_id),changeContents:c}),r=r==null?void 0:r.filter(k=>{var g,P,$;return($=k==null?void 0:k.object_name)==null?void 0:$.includes((P=(g=l==null?void 0:l.fixContent)==null?void 0:g[0])==null?void 0:P[n])});let m=[],p=new Map;r==null||r.forEach(k=>{m.push(`content_${k==null?void 0:k.object_id}`),m.push(`struct_${k==null?void 0:k.object_id}`),p.set(k==null?void 0:k.object_id,k)});let h=await O.getAllTables({platId:parseInt((C=vl==null?void 0:vl.value)==null?void 0:C.plat_id),tableNames:m??[]});h=(_=h==null?void 0:h.data)==null?void 0:_.result;let y=[],u=[];h=Ze.chunk(h,2),h==null||h.forEach(k=>{var $,Y,pe,ze,de,Z,he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za,le;let g=p.get((ze=(pe=(Y=($=k==null?void 0:k[1])==null?void 0:$[0])==null?void 0:Y.source_table)==null?void 0:pe.split("_"))==null?void 0:ze[1]),P=(he=(Z=(de=g==null?void 0:g.object_name)==null?void 0:de.split("/"))==null?void 0:Z.filter((Te,Me)=>{var Ue,Re;return((Re=(Ue=g==null?void 0:g.object_name)==null?void 0:Ue.split("/"))==null?void 0:Re.length)-1!==Me}))==null?void 0:he.join("/");if(P=P+"/"+i,u!=null&&u.find(Te=>(Te==null?void 0:Te.path)===P)||u.push({fatherPath:g==null?void 0:g.father_name,isShow:g==null?void 0:g.is_show,path:P}),((ue=(ae=k==null?void 0:k[1])==null?void 0:ae[0])==null?void 0:ue.类型)==="Table"){let Te=((ge=(Ve=(Se=k==null?void 0:k[1])==null?void 0:Se[0])==null?void 0:Ve.结构)==null?void 0:ge.contents)??[],Me=tl.safeClone(Te);Array.isArray(Me==null?void 0:Me[0])&&(Me=na.getColumnChild(Me==null?void 0:Me[0]));let Ue=[];if(((T=k==null?void 0:k[0])==null?void 0:T.length)>0&&(Ue=(q=k==null?void 0:k[0])==null?void 0:q.map(Re=>Me==null?void 0:Me.map(Ie=>(Ie=(Re==null?void 0:Re[Ie==null?void 0:Ie.prop])??"",Ie)))),y!=null&&y.find(Re=>(Re==null?void 0:Re.key)===P)){let Re=(ne=y==null?void 0:y.find(Ie=>(Ie==null?void 0:Ie.key)===P))==null?void 0:ne.contents;Re.push({isShow:g==null?void 0:g.is_show,filter:((Ke=(we=(Ne=k==null?void 0:k[1])==null?void 0:Ne[0])==null?void 0:we.引用)==null?void 0:Ke.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:Te,tableContents:Ue});let oe=y==null?void 0:y.findIndex(Ie=>(Ie==null?void 0:Ie.key)===P);y[oe].contents=Re}else y.push({key:P,contents:[{isShow:g==null?void 0:g.is_show,filter:((le=(za=(ua=k==null?void 0:k[1])==null?void 0:ua[0])==null?void 0:za.引用)==null?void 0:le.contents)??"",key:"Table",name:Object.values(g==null?void 0:g.name),tableColumns:Te,tableContents:Ue}]})}});let x=[];x.push({key:"menuPath",contents:u}),x=[...x,...y],await O.createPlatFormDataApi({platId:parseInt((S=vl==null?void 0:vl.value)==null?void 0:S.plat_id),changeData:x}),Bt.value=!1,Dr.setRefreshTable(!0)},Mo=async(l,r)=>{},Io=async l=>{cr.value=await na.getDeepDiffItems(l),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value)};a.ref();const B0=a.ref(null),A0=()=>{var l,r;console.log("倒计时结束时"),pn.ElMessageBox.alert(`超时未提交,【${(r=(l=gl.value)==null?void 0:l.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Sc=a.ref([]),z0=a.computed(()=>{var l,r;return(r=(l=xt.value)==null?void 0:l[gl.value])==null?void 0:r.filter(n=>{var i;return((i=n==null?void 0:n.key)==null?void 0:i.type)==="gridLayout"})});a.watch(()=>[g0.value],()=>{fn.setSelectTitle([]),fn.setChooseTitle([])},{deep:!0});a.watch(()=>Ao.value,async(l,r)=>{var i,s,c,m,p,h;if(JSON.stringify(l)===JSON.stringify(r))return;let n=(i=Ao.value)==null?void 0:i.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Qr.value);if((n==null?void 0:n.length)>0){Ir.setContentLoading(!0);let y=((s=n==null?void 0:n[0])==null?void 0:s.relatedContent)??(gl==null?void 0:gl.value),u=y+"/"+((c=n==null?void 0:n[0])==null?void 0:c.value),x=!!((m=n==null?void 0:n[0])!=null&&m.parentContent),D=await Kr(u,x,{originPath:y});D=(p=D==null?void 0:D.filter(K=>K))==null?void 0:p.map(K=>(K.isShow=!0,K)),console.log(D,"loadingContents");let R=await na.getDeepDiffItems(D),E=R==null?void 0:R.filter(K=>K==null?void 0:K.choice);Ro.setSelectTab((h=E==null?void 0:E[0])==null?void 0:h.choiceName),R=R==null?void 0:R.filter(K=>{var M;return!(K!=null&&K.choiceName)||(K==null?void 0:K.choiceName)===((M=E==null?void 0:E[0])==null?void 0:M.choiceName)}),cr.value=R,Ir.setContentLoading(!1)}});const M0=(l,r)=>{setTimeout(async()=>{var p,h,y;let n=(p=Ao.value)==null?void 0:p.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==Qr.value),i=gl==null?void 0:gl.value,s=gl==null?void 0:gl.value;(n==null?void 0:n.length)>0&&(s=((h=n==null?void 0:n[0])==null?void 0:h.relatedContent)??(gl==null?void 0:gl.value),i=s+"/"+((y=n==null?void 0:n[0])==null?void 0:y.value));let c=await Kr(i,!1,{originPath:s});c=c==null?void 0:c.map(u=>(u.isShow=!0,u));let m=await na.getDeepDiffItems(c);cr.value=m==null?void 0:m.filter(u=>!(u!=null&&u.step)||(u==null?void 0:u.step)===(l==null?void 0:l.title))},10)},I0=l=>{setTimeout(async()=>{var m,p,h;let r=(m=Ao.value)==null?void 0:m.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==Qr.value),n=gl==null?void 0:gl.value,i=gl==null?void 0:gl.value;(r==null?void 0:r.length)>0&&(i=((p=r==null?void 0:r[0])==null?void 0:p.relatedContent)??(gl==null?void 0:gl.value),n=i+"/"+((h=r==null?void 0:r[0])==null?void 0:h.value));let s=await Kr(n,!1,{originPath:i});s=s==null?void 0:s.map(y=>(y.isShow=!0,y)),Ro.setSelectTab(l);let c=await na.getDeepDiffItems(s);cr.value=c==null?void 0:c.filter(y=>!(y!=null&&y.choiceName)||(y==null?void 0:y.choiceName)===l)},10)};a.watch(()=>y0.value,l=>{l!=null&&l.length||(cr.value=[])},{immediate:!0});a.watch(()=>[gl.value],async l=>{var c,m,p,h;if(!gl.value)return;if(gl.value==="/"){cr.value=[];return}Ir.setCurrentMenuPath(gl.value),Dr.setLockingPage(""),cr.value=[];let r=a.getCurrentInstance();(c=r==null?void 0:r.scope)==null||c.stop(),r=null,Ti.value=!1,Ir.setContentLoading(!0),gc.value=!0;let n=l==null?void 0:l[0],i=n,s=(m=Jn.value)==null?void 0:m.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==gl.value&&!(y!=null&&y.relatedContent));if((s==null?void 0:s.length)>0&&(n=n+"/"+((p=s==null?void 0:s[0])==null?void 0:p.value)),n==="系统管理/日志管理")cr.value=await p0("log");else{let y=await Kr(n,!0,{originPath:i});y=y==null?void 0:y.map(D=>(D.isShow=!0,D));let u=await na.getDeepDiffItems(y),x=u==null?void 0:u.filter(D=>D==null?void 0:D.choice);Ro.setSelectTab((h=x==null?void 0:x[0])==null?void 0:h.choiceName),cr.value=u==null?void 0:u.filter(D=>{var R;return!(D!=null&&D.choiceName)||(D==null?void 0:D.choiceName)===((R=x==null?void 0:x[0])==null?void 0:R.choiceName)})}Ir.setContentLoading(!1),Dr.setExtraContents([]),fn.setSelectIndex(""),fn.setSelectMenu(""),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value),Dr.setRefreshTable(!1),a.nextTick(()=>{Zn.value=Zn.value++,Ti.value=!0})},{immediate:!0});a.watch(()=>[bs.value],async()=>{var l,r,n,i;if(bs.value){cr.value=[];let s=a.getCurrentInstance();(l=s==null?void 0:s.scope)==null||l.stop(),s=null,Ti.value=!1,Ir.setContentLoading(!0),gc.value=!0;let c=Qr==null?void 0:Qr.value,m=c,p=(r=Jn.value)==null?void 0:r.filter(x=>(x==null?void 0:x.condition)==="child"&&(x==null?void 0:x.value)!==""&&(x==null?void 0:x.parentContent)!==(Qr==null?void 0:Qr.value));(p==null?void 0:p.length)>0&&(c=c+"/"+((n=p==null?void 0:p[0])==null?void 0:n.value));let h=await Kr(c,!0,{originPath:m});h=h==null?void 0:h.map(x=>(x.isShow=!0,x));let y=await na.getDeepDiffItems(h),u=y==null?void 0:y.filter(x=>x==null?void 0:x.choice);if(Ro.setSelectTab((i=u==null?void 0:u[0])==null?void 0:i.choiceName),cr.value=y==null?void 0:y.filter(x=>{var D;return!(x!=null&&x.choiceName)||(x==null?void 0:x.choiceName)===((D=u==null?void 0:u[0])==null?void 0:D.choiceName)}),Ir.setContentLoading(!1),Dr.setExtraContents([]),fn.setSelectIndex(""),fn.setSelectMenu(""),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value),Dr.setRefreshTable(!1),(p==null?void 0:p.length)>0){let x=[...Jn.value,...p];fn.setSelectTitle(x)}a.nextTick(()=>{Zn.value=Zn.value++,Ti.value=!0})}},{immediate:!0,deep:!0});const O0=async()=>{Ir.setLinkMenuInfo(null),Ir.setActiveMenuPath(m0.value),cr.value=null,Dr.setRouteToChildPath(""),Ir.setChildMenu("")},L0=l=>new RegExp("button","i").test(l),$0=l=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(l),Ec=l=>{if($0(l)){const r=l==null?void 0:l.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Ir.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},Cc=async(l,r,n)=>{var D,R,E,K,M,L,j,C,_,S,k,g;let i="",s="";for(let P in r)(r==null?void 0:r[P])===l&&(s=P);n==null||n.forEach(P=>{(P==null?void 0:P.prop)===s&&(i=P==null?void 0:P.fatherPath)});let c=i===""?gl.value:i;i!==""&&Ir.setCurrentMenuPath(c),Ir.setCurrentMenuPath(c+"/"+l),Ir.setContentLoading(!0),await Kr(c+"/"+l,!0,{originPath:c+"/",row:r});let m=await Kr(c,!1),p=(D=m==null?void 0:m.filter(P=>(P==null?void 0:P.comp)==="Table"))==null?void 0:D[0],h=((M=(K=(E=(R=p==null?void 0:p.compData)==null?void 0:R.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:E.contents)==null?void 0:K[0])==null?void 0:M.prop)??((S=(_=(C=(j=(L=p==null?void 0:p.compData)==null?void 0:L.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:j.contents)==null?void 0:C[0])==null?void 0:_[0])==null?void 0:S.prop),y=(g=(k=p==null?void 0:p.compData)==null?void 0:k.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:g.contents;y=y==null?void 0:y.map(P=>({label:P==null?void 0:P[h],value:P==null?void 0:P[h]}));let u=Jn.value,x={value:l,condition:"child",options:y,relatedContent:c,isShow:!0};u.push(x),fn.setSelectTitle(u),fn.setChooseTitle([x]),Ir.setContentLoading(!1),Dr.setExtraContents([]),fn.setSelectIndex(""),fn.setSelectMenu(""),Dr.setItemData(cr.value),Dr.setOriginalData(cr.value)},R0=l=>{wc.value=l},Ei=a.reactive({index:0,comp:null}),V0=a.computed(()=>{var l;return(l=cr.value)==null?void 0:l.map((r,n)=>({id:r.id,name:r.name,status:F0(r,n)}))}),Dc=(l,r)=>{var h,y,u,x,D;const n=r?l:l-2,i=(h=cr.value)==null?void 0:h[n],s=(u=(y=i==null?void 0:i.compData)==null?void 0:y.find(R=>(R==null?void 0:R.key)==="header"))==null?void 0:u.contents,c=s==null?void 0:s.findIndex(R=>(R==null?void 0:R.isMainKey)&&(R==null?void 0:R.label)!=="操作"),m=c===-1?0:c,p=(D=(x=i==null?void 0:i.compData)==null?void 0:x.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:D.contents;return{valid:p==null?void 0:p.every(R=>R==null?void 0:R[m+1]),length:(p==null?void 0:p.length)||0}},F0=(l,r)=>{var i;let n="process";if(((i=l==null?void 0:l.comp)==null?void 0:i.toUpperCase())==="TABLE"){const{valid:s,length:c}=Dc(r,!0);Ei.index===r?n="process":c===0?n="wait":n=s?"success":"error"}return n},Nc=l=>{var n,i,s,c,m;const r=l+1;if(r>1&&((s=(i=(n=cr.value)==null?void 0:n[l])==null?void 0:i.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:p}=Dc(r);p?(Ei.index=r,Ei.comp=(c=cr.value)==null?void 0:c[l]):Ya.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else Ei.index=r,Ei.comp=(m=cr.value)==null?void 0:m[l]},Tc=a.computed(()=>{var l,r;return(r=(l=xc.value)==null?void 0:l[0])==null?void 0:r.isStepLayout});a.watch(()=>Tc.value,l=>{l&&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:{display:"flex","justify-content":"space-between",gap:"8px"}},I3={style:{display:"flex"}},xs="ss-ocr-upload-history",O3="ss-ocr-cert-history-v1",L3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},groupNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(l,{emit:r}){var jt;const n=a.ref([]),i=Tt(O.pinia),s=a.ref(null),c=a.ref(new Set),m=a.ref(new Map),p=a.ref(new Map),h=new Map,y=a.ref(new Map),u=l,x=a.ref((u==null?void 0:u.allowSelect)??!0),D=a.ref(((jt=u==null?void 0:u.config)==null?void 0:jt.showIndex)??!0),R=a.ref(),E=a.ref(!0),K=a.ref(!1),M=a.ref([]),L={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},j=a.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"}]}]),C=na.useOriginalState(O.pinia);let _="$R";const{originalPath:S}=O.storeToRefs(C),k=S.value,g=a.computed(()=>{var v;const d=(v=na.getAllLeafNodes(de.value)||[])==null?void 0:v.filter(B=>(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate");return d.length>0?d.every(B=>!!(B!=null&&B.sortable)):!1});a.computed(()=>{var v;return(v=de.value)==null?void 0:v.every(B=>B==null?void 0:B.filterable)}),a.computed(()=>{var v;return(v=de.value)==null?void 0:v.every(B=>B==null?void 0:B.operable)});const P=a.ref(!0),$=a.ref([]),Y=a.reactive({column:{},status:!1,text:"合计"}),pe=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),ze=r,de=a.ref([]),Z=a.ref([]),he=a.ref([]),ae=a.reactive({prop:"",order:null}),ue=a.ref([]),Se=a.ref(!1),Ve=a.ref(!1),ge=a.ref(null),{isUseBackdrop:T,initTrackFileType:q,getFileExtension:ne,setData:Ne,getFileInfo:we,getFilesInfo:Ke}=Co.useThreeSystem(),ua=a.ref([]),za=a.ref(!1),le=a.ref(),Te=O.useMenuState(),{importLoading:Me,activeMenuPath:Ue,contentLoading:Re,linkMenuInfo:oe}=O.storeToRefs(Te),Ie=na.useTableComp(O.pinia),He=O.useModelComp(O.pinia),Ba=Qn(O.pinia),{extraContents:Oa,cacheUpdatingData:V,tableViewContents:H,tableLoading:ee,pageMapState:fe,lockingPage:me}=O.storeToRefs(He),{selectTab:fa}=O.storeToRefs(Ba),{compType:Xe,hasEditable:ce}=Xs.useRole(),_e=a.ref([]),va=a.ref([]),qe=a.ref(new Map);a.ref(!1);const La=a.ref("");a.ref();const Ma=a.ref(!0),Je=a.ref(0),ia=a.ref(!0),se=a.ref(""),U=a.ref(!1),W=a.ref(null);a.ref([]);const Be=a.ref({label:"查看三维模型"}),ke=a.ref(!1),ra=a.ref(),oa=a.ref([]),_a=a.ref([]),ga=a.ref(!1),Pa=a.ref([]),ma=a.ref([]),Oe=a.ref([]),Ra=a.ref([]),hl=a.ref([]),Cl=()=>{try{const d=localStorage.getItem(xs),v=d?JSON.parse(d):[];hl.value=Array.isArray(v)?v:[]}catch{hl.value=[]}},Xl=()=>{try{localStorage.setItem(xs,JSON.stringify(hl.value||[]))}catch{}},xl=d=>{var ie,te,G;if(!d)return;const v=d.url||((ie=d==null?void 0:d.uploadResult)==null?void 0:ie.url)||"",B=d.name||((te=d==null?void 0:d.uploadResult)==null?void 0:te.name)||((G=d==null?void 0:d.uploadResult)==null?void 0:G.fileName)||"";if(!v&&!B)return;const z={name:B,url:v,ts:Date.now()},F=String(z.name||"").trim().toLowerCase(),N=(hl.value||[]).findIndex(Ee=>String((Ee==null?void 0:Ee.name)||"").trim().toLowerCase()===F);N>-1&&hl.value.splice(N,1),hl.value.unshift(z),hl.value.length>20&&(hl.value=hl.value.slice(0,20)),Xl()};Cl();const Vl=(d,v)=>`${O3}:${String(d??"")}:${String(v??"")}`,Wa=(d,v)=>{try{const B=sessionStorage.getItem(Vl(d,v)),z=B?JSON.parse(B):[];return Array.isArray(z)?z:[]}catch{return[]}},Rl=(d,v,B)=>{try{sessionStorage.setItem(Vl(d,v),JSON.stringify(Array.isArray(B)?B:[]))}catch{}},ja=(d,v,B)=>{if(!v)return;const z=Wa(d,v),F=[B,...z||[]].filter(Boolean).slice(0,1);return Rl(d,v,F),F},ka=(d,v,B)=>{if(!v||!B)return;const z=Vl(d,v),F=Vl(d,B);try{const N=sessionStorage.getItem(z);if(!N)return;const ie=(()=>{try{const Ee=JSON.parse(N);return Array.isArray(Ee)?Ee:[]}catch{return[]}})(),te=Wa(d,B),G=[...ie,...te||[]].filter(Boolean).sort((Ee,De)=>Number((De==null?void 0:De.ts)||0)-Number((Ee==null?void 0:Ee.ts)||0)).slice(0,1);sessionStorage.setItem(F,JSON.stringify(G)),sessionStorage.removeItem(z)}catch{}},Na=a.ref(!1),$a=a.ref(!1),Xa=a.ref([]),Za=a.ref(null);a.ref(!1),a.ref([]),a.ref(""),a.ref("");const aa=a.ref(!1),Va=a.ref([]),ye=a.ref(1),xa=a.ref(new Map),Le=a.ref(new Map),re=a.ref(0),ea=a.ref(!1),pa=a.ref([]),We=a.ref([]),Sa=d=>{var v;try{const B=(v=na.getAllLeafNodes(de.value)||[])==null?void 0:v.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate");return(B==null?void 0:B.find(z=>(z==null?void 0:z.prop)===d||(z==null?void 0:z.label)===d))||null}catch{return null}},ya=d=>{const v=Sa(d),B=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"Input";return tl.getComponent(B)||tl.getComponent("Input")},ml=a.ref([]),Ha=a.ref(null),Ka=a.ref([]),wa=a.ref(null),cl=a.ref(""),Ia=a.ref(!1),Ae=a.ref([]),Dl=a.ref(""),Ol=a.ref(!1),Gl=a.ref([]),Hl=a.ref([]),Zl=a.ref([]),Sr=a.ref(null),Fl=a.ref([]),fr=a.ref("");a.computed(()=>{var d;try{const v=(d=na.getAllLeafNodes(de.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("编号")||""}catch{return""}});const Fr=a.computed(()=>{var d;try{const v=(d=na.getAllLeafNodes(de.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("名称")||""}catch{return""}}),Ul=a.computed(()=>{var d;try{const v=(d=na.getAllLeafNodes(de.value)||[])==null?void 0:d.filter(z=>(z==null?void 0:z.type)!=="operate"&&(z==null?void 0:z.label)!=="操作"&&(z==null?void 0:z.prop)!=="operate"),B=new Map;return v==null||v.forEach(z=>{z!=null&&z.label&&(z!=null&&z.prop)&&B.set(z.label,z.prop)}),B.get("制造厂")||""}catch{return""}}),rr=()=>{Ol.value=!1,Gl.value=[],Hl.value=[],Zl.value=[],Sr.value=null,Fl.value=[],fr.value=""},$r=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,Tr=(d,v)=>{const B=(d==null?void 0:d.ocrRow)||{};for(const F of Object.keys(B))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||$r(B[F])&&(v[F]=B[F]);const z=va.value.find(F=>F.id===v.id);if(z)for(const F of Object.keys(B))F==="id"||F==="_isOCRRow"||F==="_ocrTableId"||$r(B[F])&&(z[F]=B[F]);qe.value&&qe.value.set(v.id,v),ja(u==null?void 0:u.index,v.id,d==null?void 0:d.versionItem),Hl.value=[...Hl.value||[],JSON.parse(JSON.stringify(v))]},Rr=async(d,v=null)=>{var B,z,F,N,ie,te,G;try{const Ee=(B=na.getAllLeafNodes(de.value)||[])==null?void 0:B.filter(ha=>(ha==null?void 0:ha.type)!=="operate"&&(ha==null?void 0:ha.label)!=="操作"&&(ha==null?void 0:ha.prop)!=="operate"),De=new Map;Ee==null||Ee.forEach(ha=>{ha!=null&&ha.label&&(ha!=null&&ha.prop)&&De.set(ha.label,ha.prop)});const je=De.get("系统编号")||De.get("编号");if(!je){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Pe=v||Sr.value;if((Array.isArray(Pe==null?void 0:Pe.result)?Pe.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ha=0;ha<d.length;ha++){const Fa=d[ha],Ga=Fa[je];if(!Ga){console.warn(`第 ${ha+1} 条匹配行缺少系统编号,跳过`);continue}const sa=`设备管理/试验设备/${Ga}`,ll=await O.getPageDataApi({platId:parseInt((z=zl.value)==null?void 0:z.plat_id),pageName:sa});if(!((F=ll==null?void 0:ll.data)!=null&&F.result)||!Array.isArray(ll.data.result)){console.warn(`未找到详情页数据: ${sa}`);continue}const ba=ll.data.result.find(la=>(la==null?void 0:la.property_name)==="校检记录");if(!ba){console.warn(`详情页 ${sa} 中未找到校检记录表`);continue}const qa=(N=ba.contents)==null?void 0:N.find(la=>(la==null?void 0:la.key)&&la.key.startsWith("content_"));if(!qa||!qa.key){console.warn("校检记录表中未找到 content item");continue}const ve=qa.key,Ca=Array.isArray(qa.value)?qa.value:[];if(Ca.length>=5){const xe=[...Ca].sort((ta,Ta)=>{const sl=Number((ta==null?void 0:ta.create_time)||0),Qa=Number((Ta==null?void 0:Ta.create_time)||0);return sl-Qa})[0];xe!=null&&xe.id&&await O.pageBatchDeleteApi({platId:parseInt((ie=zl.value)==null?void 0:ie.plat_id),changeContents:[{tableName:ve,tableContents:[{id:xe.id}]}]})}const ca=(te=Ee==null?void 0:Ee.find(la=>(la==null?void 0:la.label)==="证书附件"))==null?void 0:te.prop,Ea=String(Date.now()),Da={id:Ea},A=Ca[0]||{},X=new Date().toISOString().split("T")[0];if(Object.keys(A||{}).forEach(la=>{if(la!=="id"){if(la==="证书附件"){Da[la]="";return}if(la==="校检日期"||la==="检校日期"){Da[la]=Fa[la]||Fa.校检日期||Fa.检校日期||X;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(la)){Da[la]=Fa[la]??"";return}Da[la]=Fa[la]??""}}),ca&&Fa[ca]){const la=Fa[ca];if(Array.isArray(la)&&la.length>0)Da.证书附件=JSON.stringify(la.map(xe=>({url:(xe==null?void 0:xe.url)||"",name:(xe==null?void 0:xe.name)||(xe==null?void 0:xe.fileName)||"",fileName:(xe==null?void 0:xe.fileName)||(xe==null?void 0:xe.name)||""})).filter(xe=>xe.url||xe.name));else if(typeof la=="string")try{const xe=JSON.parse(la);Da.证书附件=la}catch{Da.证书附件=JSON.stringify([{url:la,name:la,fileName:la}])}}console.log(ve,"tableName","inspectionRecordRow",Da),await O.pageBatchAddApi({platId:parseInt((G=zl.value)==null?void 0:G.plat_id),changeContents:[{tableName:ve,tableContents:[Da]}]});const $e=ba==null?void 0:ba.object_id;if($e&&Ea){const la=ca&&Fa[ca]?Fa[ca]:null;let xe=[],ta="",Ta=!1;if(Array.isArray(la)&&la.length>0){xe=la.map(fl=>({name:(fl==null?void 0:fl.name)||(fl==null?void 0:fl.fileName)||"",url:(fl==null?void 0:fl.url)||""})).filter(fl=>fl.url||fl.name);const Qa=la[0];ta=(Qa==null?void 0:Qa.url)||"";const pl=(Qa==null?void 0:Qa.name)||(Qa==null?void 0:Qa.fileName)||"";Ta=String(pl).toLowerCase().endsWith(".pdf")||String(ta).toLowerCase().endsWith(".pdf")}else if(typeof la=="string")try{const Qa=JSON.parse(la);Array.isArray(Qa)?(xe=Qa.map(pl=>({name:(pl==null?void 0:pl.name)||(pl==null?void 0:pl.fileName)||"",url:(pl==null?void 0:pl.url)||""})).filter(pl=>pl.url||pl.name),xe.length>0&&(ta=xe[0].url||"",Ta=String(xe[0].name).toLowerCase().endsWith(".pdf")||String(ta).toLowerCase().endsWith(".pdf"))):(ta=la,Ta=String(la).toLowerCase().endsWith(".pdf"))}catch{ta=la,Ta=String(la).toLowerCase().endsWith(".pdf")}const sl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ha),label:new Date().toLocaleString(),certType:Fa.证书类型||"",certNo:Fa.证书编号||"",fileType:Ta?"pdf":"image",sourceUrl:Ta?ta:"",images:xe};ja($e,Ea,sl)}}}catch(Ee){console.error("向校检记录表插入OCR识别结果失败:",Ee),Ya.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},Ar=d=>{const v=Array.isArray(d)?d:Gl.value||[];if(v.length===0){rr();return}if(v.find(N=>(N==null?void 0:N.__decision)==="replace"&&!(N!=null&&N.selectedTargetId))){Ya.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}v.forEach(N=>{var te;const ie=N==null?void 0:N.__decision;if(!(!ie||ie==="skip")){if(ie==="add"){ja(u==null?void 0:u.index,(te=N==null?void 0:N.ocrRow)==null?void 0:te.id,N==null?void 0:N.versionItem),Zl.value=[...Zl.value||[],N.ocrRow];return}if(ie==="replace"){const G=N==null?void 0:N.selectedTargetId,Ee=(_e.value||[]).find(De=>String(De==null?void 0:De.id)===String(G));if(!Ee)return;Tr(N,Ee)}}}),(Hl.value||[]).length>0&&(_e.value=[..._e.value||[]]),(Zl.value||[]).length>0&&(_e.value=[..._e.value||[],...Zl.value||[]],va.value=[...va.value||[],...Zl.value||[]],(Zl.value||[]).forEach(N=>{var ie,te;return(te=(ie=qe.value)==null?void 0:ie.set)==null?void 0:te.call(ie,N.id,N)})),Yr.value=_e.value;const z=Hl.value||[],F=Zl.value||[];if(z.length>0&&(ze("change",{buttonName:"编辑",singleContent:z,content:_e.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:de.value,name:u==null?void 0:u.compName}),Rr(z)),F.length>0){const N=Sr.value;ze("change",{buttonName:"OCR批量新增",content:_e.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:de.value,ocrRows:F,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(N==null?void 0:N.result)?N.result:[]).map(ie=>(Array.isArray(ie==null?void 0:ie.图片信息)?ie.图片信息:[]).map(te=>({url:(te==null?void 0:te.url)||"",name:(te==null?void 0:te.name)||"",fileName:(te==null?void 0:te.name)||""})).filter(te=>te.url)),ocrResult:N,matchedCount:(z||[]).length,newCount:(F||[]).length})}Ya.ElMessage.success("已提交候选处理结果"),rr()},yr=mc(),zr=a.computed(()=>yr.getConfig()),Mr=a.ref(),ir=a.ref(),xn=dc(O.pinia),Yr=a.ref(),rn=a.ref(0),zn=O.useUnit(O.pinia),{selectIndex:wn,selectMenu:gn,selectTitle:nn}=O.storeToRefs(zn),{selectString:ar}=O.storeToRefs(xn),ql=O.useLoginState(O.pinia),{loginUserInfo:zl}=O.storeToRefs(ql),Ll=a.ref(720),Ml=a.ref(!1),gr=a.ref(!1),ur=a.ref([]),jl=a.ref(),Vr=a.ref(!0),Pr=a.ref(!0);a.ref([]);const _n=a.inject("contentRef");a.provide("contentRef",_n),a.provide("getSuggestListForCell",Su),a.provide("getSuggestLoadingForCell",(d,v)=>{const B=`${d==null?void 0:d.id}:${(v==null?void 0:v.prop)||(v==null?void 0:v.property)}`;return y.value.get(B)||!1}),a.watch(()=>{var d;return(d=_e.value)==null?void 0:d.length},d=>{pe.total=d}),a.watch(()=>H.value,async()=>{var v,B,z,F,N,ie,te,G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa;if(((v=H.value)==null?void 0:v.length)===0||!((B=u==null?void 0:u.itemData)!=null&&B.find(ll=>(ll==null?void 0:ll.key)==="columnPath"))||!((z=u==null?void 0:u.itemData)!=null&&z.find(ll=>(ll==null?void 0:ll.key)==="pageColumn")))return;let d=(Ee=(G=(te=(ie=(N=(F=u==null?void 0:u.itemData)==null?void 0:F.find(ll=>(ll==null?void 0:ll.key)==="pageColumn"))==null?void 0:N.contents)==null?void 0:ie.split("["))==null?void 0:te[1])==null?void 0:G.split("]"))==null?void 0:Ee[0];((Ye=(Pe=(je=(De=u==null?void 0:u.itemData)==null?void 0:De.find(ll=>(ll==null?void 0:ll.key)==="pageColumn"))==null?void 0:je.contents)==null?void 0:Pe.split("["))==null?void 0:Ye[0])+((Fa=(ha=H.value)==null?void 0:ha.find(ll=>(ll==null?void 0:ll.key)===d))==null?void 0:Fa.value),(sa=(Ga=u==null?void 0:u.itemData)==null?void 0:Ga.find(ll=>(ll==null?void 0:ll.key)==="pageGroup"))==null||sa.contents,Pt(compData,u.allMapContents)},{deep:!0});const on=d=>{var B,z,F,N,ie;const v=(z=(B=de.value)==null?void 0:B.filter(te=>te==null?void 0:te.mainKey))==null?void 0:z.map(te=>te==null?void 0:te.prop);if(v.length===0){const te=(F=de.value)==null?void 0:F.map(G=>G==null?void 0:G.prop);return(N=te==null?void 0:te.map(G=>d==null?void 0:d[G]))==null?void 0:N.join("|")}return(ie=v==null?void 0:v.map(te=>d==null?void 0:d[te]))==null?void 0:ie.join("|")},ei=d=>{var te,G,Ee,De,je;const v=(G=(te=de.value)==null?void 0:te.filter(Pe=>Pe==null?void 0:Pe.required))==null?void 0:G.map(Pe=>Pe==null?void 0:Pe.prop),B=[];if(d==null||d.forEach(Pe=>{v==null||v.forEach(Ye=>{const ha=Pe[Ye];(ha==null||ha==="")&&(B.includes(Ye)||B.push(Ye))})}),B.length>0)return Ya.ElMessage.warning(`请填写必填项:${B.join("、")}`);const z=new Map,F=new Map;(Ee=_e.value)==null||Ee.forEach(Pe=>{const Ye=on(Pe);z.set(Ye,Pe)}),d==null||d.forEach(Pe=>{const Ye=on(Pe);F.set(Ye,Pe)});const N=d==null?void 0:d.filter(Pe=>z.has(on(Pe))),ie=(De=_e.value)==null?void 0:De.filter(Pe=>F.has(on(Pe)));return(N==null?void 0:N.length)>0&&(o.columns=(je=de.value)==null?void 0:je.filter(Pe=>(Pe==null?void 0:Pe.label)!=="操作"),o.existRows=ie,o.tableData=N,o.show=!0),d==null?void 0:d.filter(Pe=>{const Ye=on(Pe);return!z.has(Ye)})},Mn=a.ref(""),ai=a.ref(null),Sn=async()=>{var d,v,B,z,F,N;try{const ie=await O.quoteApi({related:[{menus:Ue.value,groups:u==null?void 0:u.compName}],platId:parseInt((d=zl.value)==null?void 0:d.plat_id)});if(((v=ie==null?void 0:ie.data)==null?void 0:v.code)===200){ai.value=(B=ie==null?void 0:ie.data)==null?void 0:B.result;const te=(z=de.value)==null?void 0:z.map(De=>(De==null?void 0:De.prop)||(De==null?void 0:De.label)),G=In(te,(F=ie==null?void 0:ie.data)==null?void 0:F.result),Ee=G==null?void 0:G.flatMap(De=>De==null?void 0:De.quote);(Ee==null?void 0:Ee.length)>0&&(Mn.value=(N=Ee==null?void 0:Ee.map(De=>De==null?void 0:De.menus))==null?void 0:N.join("、"))}}catch(ie){throw new Error(ie)}};function In(d,v){var B;return(B=v.filter(z=>z.struct&&Array.isArray(z.struct)?z.struct.some(F=>F.words&&Array.isArray(F.words)?F.words.some(N=>d.includes(N)):!1):!1))==null?void 0:B.map(z=>{const F={...z};return F.struct&&Array.isArray(F.struct)&&(F.struct=F.struct.filter(N=>N.words&&Array.isArray(N.words)?N.words.some(ie=>d.includes(ie)):!1)),F})}const Hn=async(d,v)=>{var B,z,F,N,ie,te,G,Ee,De,je;try{ai.value||await Sn();const Pe=v==null?void 0:v.map(qa=>{const ve=Object.keys(qa),Ca={};return ve.forEach((ca,Ea)=>{Ca[d[Ea]]=qa[ca]}),Ca}),Ye=ei(Pe);if(!Ye||(Ye==null?void 0:Ye.length)===0)return;const ha=[];let Fa=(_e.value||[]).slice();(Ye||[]).forEach(qa=>{const ve={...qa};try{ve.sort=Ln(0,Fa)}catch{}ha.push(ve),Fa.unshift(ve)});let Ga=await O.quoteApi({platId:parseInt((B=zl==null?void 0:zl.value)==null?void 0:B.plat_id),type:"fatherSyncs",related:[{menus:Ue.value,groups:""},{menus:Ue.value,groups:u==null?void 0:u.compName}]});Ga=(z=Ga==null?void 0:Ga.data)==null?void 0:z.result;let sa=Ga==null?void 0:Ga.map(qa=>({tableName:"content_"+(qa==null?void 0:qa.id),tableContents:ha==null?void 0:ha.map((ve,Ca)=>({id:Ca,...ve}))})),ll=[{tableName:(F=u==null?void 0:u.related)==null?void 0:F.find(qa=>qa==null?void 0:qa.includes("content")),tableContents:ha==null?void 0:ha.map((qa,ve)=>({id:ve,...qa}))}];ll=[...ll,...sa];const ba=await O.pageBatchAddApi({platId:parseInt((N=zl.value)==null?void 0:N.plat_id),changeContents:ll});if(((ie=ba==null?void 0:ba.data)==null?void 0:ie.code)===200){const qa={buttonName:"新增",columns:de.value,fixContent:ha==null?void 0:ha.map((Ca,ca)=>({id:ca,...Ca})),relatedContents:u==null?void 0:u.related};await St(qa),((te=o==null?void 0:o.existRows)==null?void 0:te.length)>0?Ya.ElMessage.success("部分数据导入成功"):Ya.ElMessage.success("数据导入成功");let ve=[];ll==null||ll.forEach(Ca=>{var ca;(ca=Ca==null?void 0:Ca.tableContents)==null||ca.forEach(Ea=>{ve.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Ea),request_result:"{}",is_delete:!1,request_table:Ca==null?void 0:Ca.tableName,request_type:"export"})})}),await O.pageBatchAddApi({platId:parseInt((G=zl==null?void 0:zl.value)==null?void 0:G.plat_id),changeContents:[{tableName:"log",tableContents:ve}]})}else{let qa=[];ll==null||ll.forEach(ve=>{var Ca;(Ca=ve==null?void 0:ve.tableContents)==null||Ca.forEach(ca=>{qa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ca),request_result:"{}",is_delete:!1,request_table:ve==null?void 0:ve.tableName,request_type:"error"})})}),await O.pageBatchAddApi({platId:parseInt((Ee=zl==null?void 0:zl.value)==null?void 0:Ee.plat_id),changeContents:[{tableName:"log",tableContents:qa}]}),Ya.ElMessage.error("数据导入响应失败")}}catch(Pe){throw Ya.ElMessage.error("数据导入处理失败"),await O.pageBatchAddApi({platId:parseInt((De=zl==null?void 0:zl.value)==null?void 0:De.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(Pe),is_delete:!1,request_table:(je=u==null?void 0:u.related)==null?void 0:je.find(Ye=>Ye==null?void 0:Ye.includes("content")),request_type:"error"}]}]}),new Error(Pe)}},en=async d=>{var N,ie,te,G,Ee,De,je;let v=he.value;v!=null&&v.find(Pe=>(d==null?void 0:d.key)===(Pe==null?void 0:Pe.key))&&(v=v==null?void 0:v.filter(Pe=>(d==null?void 0:d.key)!==(Pe==null?void 0:Pe.key))),v.push({key:d==null?void 0:d.key,value:[(ie=d==null?void 0:d.value)==null?void 0:ie[((N=d==null?void 0:d.value)==null?void 0:N.length)-1]]});let B=Ra.value;B=B==null?void 0:B.map(Pe=>{var Ye,ha;return(Pe==null?void 0:Pe.type)==="Select"&&(d==null?void 0:d.key)===(Pe==null?void 0:Pe.prop)&&Array.isArray(Pe.value)&&(Ye=Pe.value)!=null&&Ye.every(Fa=>typeof Fa=="string")&&(Pe.selectValue=(ha=v==null?void 0:v.find(Fa=>(Fa==null?void 0:Fa.key)===(Pe==null?void 0:Pe.prop)))==null?void 0:ha.value),Pe});let z=(G=(te=B==null?void 0:B.find(Pe=>(Pe==null?void 0:Pe.prop)===(d==null?void 0:d.key)))==null?void 0:te.optionUrl)==null?void 0:G.menuId,F=B==null?void 0:B.find(Pe=>(Pe==null?void 0:Pe.prop)===(d==null?void 0:d.key));if(z){let Pe=await kt(F==null?void 0:F.optionUrl,z),Ye,ha=$.value,Fa=(je=(De=(Ee=Ra.value)==null?void 0:Ee.find(Ga=>{var sa;return(sa=F==null?void 0:F.optionUrl)==null?void 0:sa.menuId}))==null?void 0:De.selectValue)==null?void 0:je[0];if(Pe==null||Pe.forEach(Ga=>{var sa,ll,ba,qa,ve,Ca,ca,Ea,Da,A;if(z){let X=(ll=(sa=Ra.value)==null?void 0:sa.find(la=>{var xe,ta;return((xe=F==null?void 0:F.optionUrl)==null?void 0:xe.menuId)===((ta=la==null?void 0:la.optionUrl)==null?void 0:ta.menuId)}))==null?void 0:ll.prop,$e=(qa=(ba=B==null?void 0:B.find(la=>(la==null?void 0:la.prop)===X))==null?void 0:ba.selectValue)==null?void 0:qa[0];X!=null&&X.includes("·")&&(X=(ve=X==null?void 0:X.split("·"))==null?void 0:ve[0],$e=(Da=(Ea=(ca=d==null?void 0:d.value)==null?void 0:ca[((Ca=d==null?void 0:d.value)==null?void 0:Ca.length)-1])==null?void 0:Ea.split(" "))==null?void 0:Da[0]),ha!=null&&ha.find(la=>(la==null?void 0:la.value)===Fa)?Ye=(A=ha==null?void 0:ha.find(la=>(la==null?void 0:la.value)===Fa))==null?void 0:A.objectValue:Ga[X]===$e&&(Ye=Ga)}}),Ye){let Ga=B;Ga=Ga==null?void 0:Ga.map(sa=>{var ll,ba,qa,ve,Ca,ca;return z&&(Ye!=null&&Ye[sa==null?void 0:sa.prop])&&se.value==="新增"&&(sa==null?void 0:sa.prop)!==(F==null?void 0:F.prop)?sa.value=(Ye==null?void 0:Ye[sa==null?void 0:sa.prop])||(Ye==null?void 0:Ye[(ve=(qa=(ba=(ll=sa==null?void 0:sa.optionUrl)==null?void 0:ll.groupSelect)==null?void 0:ba[1])==null?void 0:qa.replaceAll("[",""))==null?void 0:ve.replaceAll("]","")]):sa.value=(ca=(Ca=Ra.value)==null?void 0:Ca.find(Ea=>(Ea==null?void 0:Ea.prop)===(sa==null?void 0:sa.prop)))==null?void 0:ca.value,sa}),Ra.value=Ga}}he.value=v},On=async(d,v)=>{var B,z,F,N,ie;if((B=d==null?void 0:d.toString())!=null&&B.includes(".txt")||(z=d==null?void 0:d.toString())!=null&&z.includes(".cpt")||(F=d==null?void 0:d.toString())!=null&&F.includes(".cyd")){const te=await Ya.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),G=new Blob([te.data],{type:"application/octet-stream;charset=UTF-8"});let Ee=URL.createObjectURL(G);le.value=[{name:(ie=d==null?void 0:d.split("/"))==null?void 0:ie[((N=d==null?void 0:d.split("/"))==null?void 0:N.length)-1],blobUrl:Ee}],za.value=!0}else Array.isArray(v)&&(v==null?void 0:v.length)>0&&ze("routeUrl",{isEdit:!1,routerUrl:v})};a.onBeforeUnmount(()=>{Pr.value=!1;let d=rn.value;rn.value=d+1});const En=a.reactive({prop:"",order:null}),Gr=a.computed(()=>{const d=(_e.value??[]).slice(),v=En.prop||ae.prop,B=En.order||ae.order;if(!v||!B)return d;const z=B==="ascending",F=ie=>{if(v)return ie&&Object.prototype.hasOwnProperty.call(ie,v)?ie[v]:v.includes(".")?v.split(".").reduce((te,G)=>te==null?te:te[G],ie):ie==null?void 0:ie[v]},N=ie=>{if(ie==null)return{ok:!1,value:NaN};if(typeof ie=="number")return{ok:Number.isFinite(ie),value:ie};const te=String(ie).trim();if(te==="")return{ok:!1,value:NaN};const G=te.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(G))return{ok:!1,value:NaN};const Ee=Number(G);return{ok:Number.isFinite(Ee),value:Ee}};return d.sort((ie,te)=>{const G=F(ie),Ee=F(te);if(G==null&&Ee==null)return 0;if(G==null)return z?-1:1;if(Ee==null)return z?1:-1;const De=N(G),je=N(Ee);if(De.ok&&je.ok)return z?De.value-je.value:je.value-De.value;const Pe=ve=>{if(ve==null)return{ok:!1,value:NaN};const Ca=String(ve).trim();if(Ca==="")return{ok:!1,value:NaN};const ca=Ca.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ca)return{ok:!1,value:NaN};const Ea=ca[1]?-1:1,Da=Number(ca[2]),A=Number(ca[3]),X=Number(ca[4]);return[Da,A,X].some($e=>Number.isNaN($e))?{ok:!1,value:NaN}:A>=60||X>=60?{ok:!1,value:NaN}:{ok:!0,value:Ea*(Da*3600+A*60+X)}},Ye=Pe(G),ha=Pe(Ee);if(Ye.ok&&ha.ok)return z?Ye.value-ha.value:ha.value-Ye.value;const Fa=new Date(G).getTime(),Ga=new Date(Ee).getTime(),sa=!Number.isNaN(Fa),ll=!Number.isNaN(Ga);if(sa&&ll)return z?Fa-Ga:Ga-Fa;const ba=String(G),qa=String(Ee);return z?ba.localeCompare(qa):qa.localeCompare(ba)})}),Un=a.computed(()=>{var B;const d=(pe.currentPage-1)*pe.pageSize,v=d+pe.pageSize;return ze("getSliceContLength",pe),(B=Gr.value)==null?void 0:B.slice(d,v)}),bn=d=>{pe.currentPage=d,ze("getSliceContLength",pe)},Ai=d=>{var z;pe.pageSize=d;const v=((z=_e.value)==null?void 0:z.length)??0,B=d>0?Math.ceil(v/d):1;pe.currentPage>B&&(pe.currentPage=B||1,Ya.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),ze("getSliceContLength",pe)},Vo=({prop:d,order:v})=>{En.prop=d,En.order=v,pe.currentPage=1};function Fo(d){const v=[];function B(z,F=""){z.forEach(N=>{N.children&&N.children.length>0?B(N.children,N.prop):v.push(N.prop)})}return B(d),v}const Cn=(d,v)=>{var te,G,Ee,De;let B=(G=(te=de.value)==null?void 0:te.map(je=>je==null?void 0:je.prop))==null?void 0:G.filter(je=>je!=="operate");((Ee=de.value)==null?void 0:Ee.some(je=>{var Pe;return((Pe=je==null?void 0:je.children)==null?void 0:Pe.length)>0}))&&(B=Fo((De=de.value)==null?void 0:De.filter(je=>(je==null?void 0:je.prop)!=="operate")));let F;if(F=(d==null?void 0:d.length)===(B==null?void 0:B.length)?d:d.slice(0,B==null?void 0:B.length),!(F==null?void 0:F.every(je=>B==null?void 0:B.find(Pe=>je===Pe))))return Ya.ElMessage.error("导入的数据表头不匹配");Hn(F,v)},Po=(d,v)=>{var F;const B=d==null?void 0:d.filter(N=>N!=="序号"),z=v==null?void 0:v.map(N=>{const ie=Object.entries(N);return ie.shift(),Object.fromEntries(ie)});He.setRefreshCurStructure(!1),((F=de.value)==null?void 0:F.length)===0||Cn(B,z)},jo=(d,v,B,z)=>{const F=[],N=[],ie=Ee=>Object.keys(Ee).length;for(const Ee in d)if(d[Ee]!==void 0){const De=d[Ee],je=[];for(const[Pe,Ye]of Object.entries(De))je.push(Ye),N.length<ie(De)&&N.push(Pe);F.push(je)}F.unshift(N);const te=na.utils.aoa_to_sheet(F),G=na.utils.book_new();na.utils.book_append_sheet(G,te,z),na.writeFileSync(G,`${v}.xlsx`),ur.value=[]},Yi=async(d,v,B,z=!1,F)=>{try{He.setRefreshCurStructure(!1)}catch(N){Ya.ElMessage.error(N)}},Ji=async(d,v)=>{await Yi()},Xi=async(d,v)=>{await Yi("columnType",v,d,!1)},jr=async({newRow:d,targetIndex:v})=>{var F;if(!ce(u.config,{type:Xe.TABLE}))return;const z=(pe.currentPage-1)*pe.pageSize+(v??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Ln(z,_e.value||[]))}catch{}_e.value.splice(z,0,d),await a.nextTick(),m.value.has(d.id)||m.value.set(d.id,O.cloneDeep(d)),_e.value=(F=_e.value)==null?void 0:F.map(N=>({...N,tableEditType:(N==null?void 0:N.id)===d.id?"edit":(N==null?void 0:N.tableEditType)??"text"})),c.value.add(d.id),Ml.value=!0},Ho=(d,v,B,z=[])=>(!Array.isArray(v)||v.length===0||v.forEach(F=>{const N=F==null?void 0:F.prop;if(!N)return;let ie=d==null?void 0:d[N];if(ie==null||String(ie).trim()==="")return;ie=String(ie);const te=new Set([...(Array.isArray(B)?B:[]).filter(De=>(De==null?void 0:De.id)!==(d==null?void 0:d.id)).map(De=>De==null?void 0:De[N]).filter(De=>De!=null).map(De=>String(De)),...(Array.isArray(z)?z:[]).map(De=>De==null?void 0:De[N]).filter(De=>De!=null).map(De=>String(De))]);if(!te.has(ie))return;let G=1,Ee="";for(;Ee=`${ie}(${G})`,!!te.has(Ee);)G++;d[N]=Ee}),d),zi=async()=>{var F,N,ie,te,G,Ee,De,je;const d=Array.from(c.value||[]);if(d.length===0)return;const v=(N=na.getColumnChild((F=O.cloneDeep(de.value))==null?void 0:F.filter(Pe=>(Pe==null?void 0:Pe.label)!=="操作")))==null?void 0:N.filter(Pe=>(Pe==null?void 0:Pe.required)===!0);if((v==null?void 0:v.length)>0)for(let Pe=0;Pe<d.length;Pe++){const Ye=d[Pe],ha=(ie=_e.value)==null?void 0:ie.find(Fa=>(Fa==null?void 0:Fa.id)===Ye);if(ha)for(let Fa=0;Fa<v.length;Fa++){const Ga=v[Fa],sa=Ga==null?void 0:Ga.prop,ll=(Ga==null?void 0:Ga.label)??sa,ba=ha==null?void 0:ha[sa];if(ba===""||ba===null||ba===void 0||Array.isArray(ba)&&ba.length===0){Ya.ElMessage.error(`${ll}不能为空`);return}}}const B=[],z=[];if(d.forEach(Pe=>{var ll;const Ye=(ll=_e.value)==null?void 0:ll.find(ba=>(ba==null?void 0:ba.id)===Pe);if(!Ye)return;if(Ye!=null&&Ye._isTemp){const qa=(na.getAllLeafNodes(de.value)||[]).filter(A=>(A==null?void 0:A.mainKey)===!0||(A==null?void 0:A.isMainKey)===!0),ve=_e.value.findIndex(A=>(A==null?void 0:A.id)===Pe),Ca=ve>=0?ve+1:_e.value.length+1;Ho(Ye,qa,_e.value,B);const ca={id:Ca.toString()};(Ye==null?void 0:Ye.sort)!==void 0&&(Ye==null?void 0:Ye.sort)!==null&&String(Ye.sort).trim()!==""?ca.sort=String(Ye.sort):ca.sort=Ln(ve>=0?ve:_e.value.length-1,_e.value||[]),(na.getAllLeafNodes(de.value)||[]).filter(A=>(A==null?void 0:A.type)!=="operate"&&(A==null?void 0:A.label)!=="操作"&&(A==null?void 0:A.prop)!=="operate").forEach(A=>{const X=A==null?void 0:A.prop;if(X){const $e=Ye[X];$e!==void 0?ca[X]=$e??"":ca[X]=""}}),B.push(ca);return}const Fa=(na.getAllLeafNodes(de.value)||[]).filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),Ga=new Set(Fa.map(ba=>ba==null?void 0:ba.prop).filter(Boolean)),sa={};for(const ba of Ga)Object.prototype.hasOwnProperty.call(Ye,ba)&&(sa[ba]=Ye[ba]);z.push({id:Ye.id,value:{tableData:sa}})}),He.setTableLoading(u==null?void 0:u.index),z.length>0){const Pe=z.map(ha=>{const Fa={id:ha.id,...ha.value.tableData};return delete Fa._isOCRRow,delete Fa._ocrTableId,delete Fa._isTemp,delete Fa.tableEditType,delete Fa.index,Fa}),Ye=[{tableName:(te=u==null?void 0:u.related)==null?void 0:te.find(ha=>ha==null?void 0:ha.includes("content")),tableContents:Pe}];try{await O.pageBatchUpdateApi({platId:parseInt((G=zl.value)==null?void 0:G.plat_id),changeContents:Ye})}catch(ha){Ya.ElMessage.error(((De=(Ee=ha==null?void 0:ha.response)==null?void 0:Ee.data)==null?void 0:De.message)||(ha==null?void 0:ha.message)||"保存失败"),He.setTableLoading(!1);return}}if(B.length>0){const Pe={fixContent:B,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:de.value};ze("change",Pe)}Ya.ElMessage.success("保存成功"),c.value.clear(),m.value.clear(),_e.value=(je=_e.value)==null?void 0:je.map(Pe=>({...Pe,tableEditType:"text"})),Ml.value=!1,He.setRefreshCurStructure(!0)},Uo=()=>{var v;const d=Array.from(c.value||[]);if(d.length===0){Ml.value=!1;return}d.forEach(B=>{var N,ie;const z=m.value.get(B),F=(N=_e.value)==null?void 0:N.find(te=>(te==null?void 0:te.id)===B);if(F!=null&&F._isTemp){_e.value=_e.value.filter(te=>(te==null?void 0:te.id)!==F.id);return}if(z){const te=(ie=_e.value)==null?void 0:ie.findIndex(G=>(G==null?void 0:G.id)===B);te!==-1&&(_e.value[te]={..._e.value[te],...z})}}),c.value.clear(),m.value.clear(),_e.value=(v=_e.value)==null?void 0:v.map(B=>({...B,tableEditType:"text"})),Ml.value=!1},Mi=a.ref(!1),Zi=async d=>{var F,N,ie,te;if(!Ml.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const v=d==null?void 0:d.target;if(((N=(F=v==null?void 0:v.tagName)==null?void 0:F.toLowerCase)==null?void 0:N.call(F))==="textarea")return;const z=document.getElementById("excel-table");z&&!z.contains(v)||((ie=v==null?void 0:v.blur)==null||ie.call(v),(te=d.preventDefault)==null||te.call(d),await a.nextTick(),await Qi())},Qi=async()=>{if(V.value){Ml.value=!1;return}if(!Mi.value){Mi.value=!0;try{Array.from(c.value||[]).length>0?await zi():Ml.value=!1}finally{Promise.resolve().then(()=>{Mi.value=!1})}}},qo=d=>{ur.value=d},Wo=(d,v)=>{jl.value===v?Vr.value=!1:Vr.value=!0,jl.value=v==null?void 0:v.changeProp},eo=d=>{if(!d)return;const{item:v,value:B}=d,z=Ra.value.find(F=>F.prop==v.prop);z&&z.contents.push({label:B,value:B})},Dn=a.computed(()=>{var B,z,F;const d=(B=de.value)==null?void 0:B.some(N=>N==null?void 0:N.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(F=(z=de.value)==null?void 0:z.filter(N=>(N==null?void 0:N.label)!=="操作"))==null?void 0:F.map(N=>({...N,filterable:!!(N!=null&&N.filterable),showSummary:!!(N!=null&&N.showSummary),operable:!!(N!=null&&N.operable),fixed:N==null?void 0:N.fixed}))}),Nn=async(d,v,B)=>{const z=O.cloneDeep(de.value);await a.nextTick();const F=z==null?void 0:z.map(ie=>(B==null?void 0:B.label)===(ie==null?void 0:ie.label)?{...ie,[v]:d}:ie),N=qn(F);await ms(u.index,N),de.value=F,Z.value=N},qn=d=>{var F;const v=d||[];return((F=na.getAllLeafNodes(v)||[])==null?void 0:F.filter(N=>(N==null?void 0:N.prop)&&(N==null?void 0:N.type)!=="operate"&&(N==null?void 0:N.label)!=="操作"&&(N==null?void 0:N.prop)!=="operate")).map(N=>{const{prop:ie}=N;return n0(ie,N)})},Ko=async d=>{let v=await o0(u.index);v||(v=qn(d)),Z.value=v},ao=async(d,v)=>{const B=O.cloneDeep(de.value),z=ie=>Array.isArray(ie)?ie.map(te=>{const G=Array.isArray(te==null?void 0:te.children)&&te.children.length>0,Ee={...te};return(Ee==null?void 0:Ee.prop)==="operate"||(Ee==null?void 0:Ee.label)==="操作"||(Ee==null?void 0:Ee.type)==="operate"?(Ee.sortable=!1,Ee.filterable=!1,Ee.operable=!1):Ee.sortable=G?!1:!!d,G&&(Ee.children=z(Ee.children)),Ee}):ie,F=z(B),N=qn(F);await ms(u.index,N),de.value=F,Z.value=N,await a.nextTick(),rn.value=rn.value+1},lo=()=>{U.value=!1},ro=d=>{ze("clickTrigger",d)},Wn=async d=>{var N,ie,te,G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll,ba;const v=d==null?void 0:d.row,B=d==null?void 0:d.rowData,z=d==null?void 0:d.suffix;if((N=v==null?void 0:v.toString())!=null&&N.includes(".urdf")||d!=null&&d.isUrdf||z!=null&&z.includes(".urdf")){if(v.includes(",")){Ya.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(T(v)){const ve={files:[we(v)],data:{}};Ne(ve);return}Pa.value=[{url:v,extension:ne(v)}],Ve.value=!0,ge.value={data:O.cloneDeep(B)},Se.value=!0;return}let F=[];if((ie=v==null?void 0:v.toString())!=null&&ie.includes(".stl")||(te=v==null?void 0:v.toString())!=null&&te.includes(".STL")||(G=v==null?void 0:v.toString())!=null&&G.includes(".obj")||(Ee=v==null?void 0:v.toString())!=null&&Ee.includes(".mtl")){const qa=(De=v==null?void 0:v.toString())==null?void 0:De.split(","),ve=Ke(qa),Ca=ve==null?void 0:ve[0];if(T(Ca==null?void 0:Ca.extension)){Ne({files:ve,data:{}});return}Pa.value=ve,Ve.value=!1,Se.value=!0;return}if((je=v==null?void 0:v.toString())!=null&&je.includes(".stl")||(Pe=v==null?void 0:v.toString())!=null&&Pe.includes(".STL")||(Ye=v==null?void 0:v.toString())!=null&&Ye.includes(".obj")||(ha=v==null?void 0:v.toString())!=null&&ha.includes(".mtl")||z!=null&&z.includes(".stl")||z!=null&&z.includes(".STL")||z!=null&&z.includes(".obj")||z!=null&&z.includes(".mtl")){let qa,ve=[],Ca={};if(Array.isArray(v)?qa=v:qa=v==null?void 0:v.split(","),qa==null||qa.forEach(ca=>{ca.includes(".mtl")?ve.push(ca):Ca.blob=Ca.blob?Ca.blob+","+ca:ca}),(ve==null?void 0:ve.length)>0&&(Ca.mtlBlobs=ve),z&&(Ca.suffix=z),(Ga=(Fa=Object.values(Ca))==null?void 0:Fa[0])!=null&&Ga.includes("http:"))F.push(Ca);else{const ca=new Blob([Ca.blob],{type:"application/octet-stream;charset=UTF-8"});let Ea=URL.createObjectURL(ca),Da="";(sa=v==null?void 0:v.split("/"))==null||sa.forEach((A,X)=>{var $e;X===(($e=v==null?void 0:v.split("/"))==null?void 0:$e.length)-1&&(Da=A)}),(ll=Ca.blob)!=null&&ll.includes(".stl")&&(Da=(Da==null?void 0:Da.replaceAll(">",""))+".urdf"),le.value=[{name:Da,blobUrl:Ea}],za.value=!0}}else{const qa=await Ya.axios.get(v,{responseType:"blob",headers:{"Content-Type":"application/json"}}),ve=new Blob([qa.data],{type:"application/octet-stream;charset=UTF-8"});let Ca=URL.createObjectURL(ve),ca="";if((ba=v==null?void 0:v.split("/"))==null||ba.forEach((Ea,Da)=>{var A;Da===((A=v==null?void 0:v.split("/"))==null?void 0:A.length)-1&&(ca=Ea)}),T(ca)){const Ea=q(ca),Da=we(v);Ne({files:[Da],data:{trackFileType:Ea}});return}le.value=[{name:ca,blobUrl:Ca}],za.value=!0}(F==null?void 0:F.length)>0&&i.setBlobUrls(F)},li=d=>{var z,F,N,ie;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const v=(ie=(z=d==null?void 0:d.url)==null?void 0:z.split("."))==null?void 0:ie[((N=(F=d==null?void 0:d.url)==null?void 0:F.split("."))==null?void 0:N.length)-1];return(d==null?void 0:d.name)+"."+v},no=d=>{if(!d)return"未知文件";try{const z=li(d);if(typeof z=="string"&&z.includes("."))return z}catch{}const v=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",B=(d==null?void 0:d.suffix)||"";return v.includes(".")?v:`${v}${B}`},io=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const v=d.match(/^(\d+)\_(\d+)$/);if(!v)return d;const B=Number(v[1]),z=Number(v[2]);return!Number.isFinite(B)||!Number.isFinite(z)?d:String(B*1e3+z)},ri=d=>{if(d==null)return null;const v=String(d).trim();if(!v)return null;const B=Number(v);return Number.isFinite(B)?B:null},Go=d=>{if(d==null)return null;const v=String(d).trim();if(!v)return null;if(/^\d+$/.test(v)){const F=Number(v);return Number.isFinite(F)?v.length<=10?F*1e3:F:null}const B=v.includes("T")?v:v.replace(" ","T"),z=Date.parse(B);return Number.isFinite(z)?z:null},oo=(d,v=[])=>{const B=Array.isArray(d)?d.slice():[];if(B.length<=1)return B;const z=new Map((v||[]).map((ie,te)=>[String(ie),te])),F=B.some(ie=>ri(ie==null?void 0:ie.sort)!==null),N=B.map((ie,te)=>({r:ie,idx:te,id:String((ie==null?void 0:ie.id)??""),sortVal:ri(ie==null?void 0:ie.sort),createTimeMs:Go(ie==null?void 0:ie.create_time),prevIdx:z.has(String(ie==null?void 0:ie.id))?z.get(String(ie==null?void 0:ie.id)):Number.POSITIVE_INFINITY}));return N.sort((ie,te)=>{if(F){const De=ie.sortVal,je=te.sortVal;if(De===null&&je!==null)return 1;if(De!==null&&je===null)return-1;if(De!==null&&je!==null&&De!==je)return De-je}const G=ie.createTimeMs,Ee=te.createTimeMs;return G!==null&&Ee!==null&&G!==Ee?Ee-G:G!==null&&Ee===null?-1:G===null&&Ee!==null?1:ie.prevIdx!==te.prevIdx?ie.prevIdx-te.prevIdx:ie.idx-te.idx}),N.map(ie=>ie.r)},Ln=(d,v=[])=>{const B=v==null?void 0:v[d-1],z=v==null?void 0:v[d],F=ri(B==null?void 0:B.sort),N=ri(z==null?void 0:z.sort);let ie=null;F!==null&&N!==null&&N>F?ie=(F+N)/2:F!==null?ie=F+1:N!==null?ie=Math.max(N-1,0):ie=(d??0)+1;const te=Number(ie.toFixed(6));return String(Number.isFinite(te)?te:ie)},Yo=async d=>{let v=null,B=null;if(d!=null&&d.id){const F=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const N=await O.platformDownloadFile(d);v=URL.createObjectURL(N.data),B=no(d)}finally{F.close()}}else if(d!=null&&d.downloadUrl){const F=await fi(),N=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ie=await Ya.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:F,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{N.close()}),te=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(te),B=d==null?void 0:d.name}else{const F=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")?(v=URL.createObjectURL(F.data),B=li(d)):v=d==null?void 0:d.url}if(T(v)){const F={row:`${v}`,suffix:ne(B)};Wn(F);return}const z={name:B,blobUrl:v};le.value=[z],za.value=!0},pi=async d=>{let v=null,B=null;if(d!=null&&d.id){const N=await O.platformDownloadFile(d);v=URL.createObjectURL(N.data),B=no(d)}else if(d!=null&&d.downloadUrl){const N=await fi(),ie=await Ya.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:N,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),te=new Blob([ie.data],{type:"application/octet-stream;charset=UTF-8"});v=URL.createObjectURL(te),B=d==null?void 0:d.name}else{const N=await O.platformDownloadFile({url:d==null?void 0:d.url});v=URL.createObjectURL(N.data),B=li(d)}const z={name:B,blobUrl:v},F=document.createElement("a");F.href=z.blobUrl,F.download=z.name,F.style.display="none",document.body.appendChild(F),F.click(),setTimeout(()=>{document.body.removeChild(F)},100)},Jo=(d,v)=>{var z;if(Object.values(v).length===0)return;let B=d;return Object.values(v).find(F=>{var N,ie,te;return((N=F==null?void 0:F.toString())==null?void 0:N.includes(".txt"))||((ie=F==null?void 0:F.toString())==null?void 0:ie.includes(".cpt"))||((te=F==null?void 0:F.toString())==null?void 0:te.includes(".obj"))})?B=[...d,Be.value]:(z=u==null?void 0:u.config)!=null&&z.allowMove&&(B=[...d,{label:"迁移"}]),B},Ii=()=>{K.value=!0},Xo=a.ref([]),Zo=async(d,v,B=!1)=>{var ie,te,G,Ee;if(!d)return;if(B){_e.value=[...qe.value.values()].filter(De=>Object.values(De).some(je=>typeof je=="string"?je==null?void 0:je.toLowerCase().includes(v==null?void 0:v.toLowerCase()):!1));return}let z={};for(let De in d)(d==null?void 0:d[De])!==""&&(z[De]=d==null?void 0:d[De]);if(JSON.stringify(z)==="{}"){_e.value=Array.from(((ie=qe.value)==null?void 0:ie.values())??[]);return}let F=(te=u==null?void 0:u.related)==null?void 0:te.find(De=>De==null?void 0:De.includes("content_")),N=await O.getFillFind({platId:parseInt((G=zl==null?void 0:zl.value)==null?void 0:G.plat_id),tableName:F,params:z});N=(Ee=N==null?void 0:N.data)==null?void 0:Ee.result,_e.value=N,He.setTableLoading(!1)},to=async d=>{var B,z;if(!ce(u.config,{type:Xe.TABLE})||!d)return;((B=Array.from(c.value))==null?void 0:B.length)>0&&await zi();const v=d==null?void 0:d.id;v!=null&&(c.value.clear(),m.value.clear(),m.value.has(v)||m.value.set(v,O.cloneDeep(d)),_e.value=(z=_e.value)==null?void 0:z.map(F=>({...F,tableEditType:(F==null?void 0:F.id)===v?"edit":"text"})),c.value.add(v),Ml.value=!0)},Kn=async(d,v,B,z)=>{z!=null&&z.isExistChild&&ze("clickMainKey",d,B,de.value)},Tn=()=>{za.value=!1},so=d=>{ze("rowClick",d)};a.watch(()=>u.changedContent,()=>{var B,z;if(!u.changedContent)return;let d=(B=_e.value)==null?void 0:B.map(F=>{var N;return F.id===((N=u.changedContent)==null?void 0:N.id)&&(F={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete F.newId),F});const v=(z=u.itemData)==null?void 0:z.map(F=>((F==null?void 0:F.key)==="tableContents"&&(F.contents=d),F));_e.value=d,ze("contentChange",{contents:v,index:u.index}),ze("change",{content:d,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Oi=()=>{},Qo=async()=>{const d=Ue.value,v=sessionStorage.getItem("systemKey"),B=await na.getItemData(d,v,""),z=(B==null?void 0:B.find(te=>(te==null?void 0:te.name)==="方法明细"))||(B==null?void 0:B[0]),F=(z==null?void 0:z.compData)||[],N=F==null?void 0:F.find(te=>{const G=te==null?void 0:te.key;return G==="formContent"||G==="tableContents"});return N==null?void 0:N.contents},fi=async()=>{const v=Ya.Local.get("access-token");return v?`Bearer ${v}`:""},et=async(d,{token:v,inputData:B}={})=>await Ya.axios.post(d,B,{headers:{Authorization:v}}).catch(F=>(Te.setImportLoading(!1),Promise.reject(F))),at=d=>{var z;let v={};const B=[];return v.form={},(z=O.cloneDeep(d))==null||z.forEach((F,N)=>{var ie,te,G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll,ba;if((F==null?void 0:F.comp)==="Table"){(te=(ie=F==null?void 0:F.compData)==null?void 0:ie.find(ca=>(ca==null?void 0:ca.key)==="header"))==null||te.contents;let qa=(De=(Ee=(G=F==null?void 0:F.compData)==null?void 0:G.find(ca=>(ca==null?void 0:ca.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:De.map(ca=>ca.slice(1));(Fa=(ha=(Ye=(Pe=(je=F==null?void 0:F.compData)==null?void 0:je.find(ca=>(ca==null?void 0:ca.key)==="header"))==null?void 0:Pe.contents)==null?void 0:Ye[0])==null?void 0:ha[0])==null||Fa.label;let ve=(sa=(Ga=F==null?void 0:F.compData)==null?void 0:Ga.find(ca=>(ca==null?void 0:ca.key)==="header"))==null?void 0:sa.contents,Ca=[];qa==null||qa.forEach(ca=>{let Ea=[];ca==null||ca.forEach((Da,A)=>{var $e;let X={};(($e=ve[A])==null?void 0:$e.label)!=="操作"&&(X[ve[A].label]=Da,Ea.push(X))}),Ca.push(Ea)}),v[F.name]=Ca}else{const qa=(ba=(ll=F.compData)==null?void 0:ll.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:ba.contents;qa==null||qa.forEach(ve=>{var Ca,ca;if(ve.prop!==""){let Ea=ve==null?void 0:ve.value;Array.isArray(Ea)?Ea=((Ca=Ea==null?void 0:Ea[0])==null?void 0:Ca.oldUrl)||"http://222.92.178.198:62001/"+((ca=Ea==null?void 0:Ea[0])==null?void 0:ca.url):Ea=Ea.toString(),ve={key:(ve==null?void 0:ve.prop)??(ve==null?void 0:ve.label),value:Ea},B.push(ve)}})}}),v.form=na.getFormContents(B),v},lt=d=>{const v=[],B=z=>{z&&typeof z=="object"&&!Array.isArray(z)?Object.values(z).forEach(B):v.push(z)};return B(d),v},rt=async(d,v,B)=>{var ve,Ca,ca,Ea,Da,A,X,$e,la,xe,ta,Ta,sl,Qa,pl,fl,Pl;Te.setImportLoading(!0),He.setFreshContent(!1);let z=await Qo().catch(Ja=>(Te.setImportLoading(!1),Promise.reject(Ja)));z=z==null?void 0:z.filter(Ja=>{var yl;return((yl=Ja==null?void 0:Ja.find(Ua=>Ua==null?void 0:Ua.id))==null?void 0:yl.id)===(v==null?void 0:v.id)});let F=na.getEqualChild([(ve=de.value)==null?void 0:ve.filter(Ja=>(Ja==null?void 0:Ja.label)!=="操作")]);const N=(ca=(Ca=na.tableToForm(z,F))==null?void 0:Ca[0])==null?void 0:ca.find(Ja=>{const yl=Ja==null?void 0:Ja.key;return yl==="Interface"||yl==="方法体"}),ie=N==null?void 0:N.value;if(!ie){console.log("未搜索到isMain, 缺少算法执行接口"),Te.setImportLoading(!1);return}const te=de.value?na.getEqualChild([de.value]):[],G=te.find(Ja=>{const yl=Ja==null?void 0:Ja.prop;return yl==="Input1"||yl==="输入数据.输入1"||yl==="样本输入数据"}),Ee=G==null?void 0:G.prop;let De=v==null?void 0:v[Ee];const je=await fi().catch(Ja=>(Te.setImportLoading(!1),Promise.reject(Ja)));let Pe=!0,Ye="";(Ea=de.value)==null||Ea.forEach(Ja=>{(Ja==null?void 0:Ja.prop)===Ee&&(Pe=!!(Ja!=null&&Ja.childPath),Ye=Ja==null?void 0:Ja.childPath)});let ha="";if(Pe){let Ja=(A=(Da=de.value)==null?void 0:Da.find(dl=>(dl==null?void 0:dl.isMainKey)===!0))==null?void 0:A.prop;ha=v==null?void 0:v[Ja];let yl=Ye==null?void 0:Ye.split(k),Ua=[];yl==null||yl.forEach((dl,_l)=>{(yl==null?void 0:yl.length)-1===_l&&Ua.push(ha),Ua.push(dl)}),Ua=Ua==null?void 0:Ua[0];let ul=await na.getItemData(Ua,sessionStorage.getItem("systemKey"),""),al=ul==null?void 0:ul.filter(dl=>(dl==null?void 0:dl.name)===Ee);al=al==null?void 0:al.map(dl=>{var _l;return dl.compData=(_l=dl==null?void 0:dl.compData)==null?void 0:_l.map(Tl=>{var wr;return(Tl==null?void 0:Tl.key)==="tableContents"&&(Tl.contents=(wr=Tl==null?void 0:Tl.contents)==null?void 0:wr.filter($l=>($l==null?void 0:$l[1])===(v==null?void 0:v[Ee]))),Tl}),dl}),(!al||(al==null?void 0:al.length)===0)&&(al=ul,al=al==null?void 0:al.map(dl=>{var _l;return dl.compData=(_l=dl==null?void 0:dl.compData)==null?void 0:_l.map(Tl=>{var wr;return(Tl==null?void 0:Tl.key)==="tableContents"&&(Tl.contents=(wr=Tl==null?void 0:Tl.contents)==null?void 0:wr.filter($l=>{var bl,Al;return($l==null?void 0:$l[1])===(v==null?void 0:v[(Al=(bl=de==null?void 0:de.value)==null?void 0:bl[0])==null?void 0:Al.prop])})),Tl}),dl})),De=at(al)}const Fa=await et(ie,{token:je,inputData:De}).catch(Ja=>(Te.setImportLoading(!1),Promise.reject(Ja))),Ga=(X=Fa==null?void 0:Fa.data)==null?void 0:X.data,sa=te.find(Ja=>(Ja==null?void 0:Ja.prop)==="Output1"),ll=sa==null?void 0:sa.prop;let ba=[],qa=[];if(Ga&&(($e=Object.values(Ga))==null?void 0:$e.length)>0){let Ja=[];const yl=new FormData,Ua=(la=lt(Ga))==null?void 0:la.map(async al=>{var dl,_l;if(!Array.isArray(al)&&(al!=null&&al.includes("http"))){let Tl=await Ya.axios.get(al,{responseType:"blob"}),wr=(_l=al==null?void 0:al.split("/"))==null?void 0:_l[((dl=al==null?void 0:al.split("/"))==null?void 0:dl.length)-1];yl.append("files",Tl.data,wr)}else Ja.push(al)});if(await Promise.all(Ua),!na.isFormDataEmpty(yl)){let al=await Mu.uploadAmountApi(yl),dl=(ta=(xe=al==null?void 0:al.data)==null?void 0:xe.result)==null?void 0:ta.map(_l=>{var Tl,wr,$l,bl,Al,Ql;return{name:(Ql=(Al=(bl=(Tl=_l==null?void 0:_l.url)==null?void 0:Tl.split("/"))==null?void 0:bl[(($l=(wr=_l==null?void 0:_l.url)==null?void 0:wr.split("/"))==null?void 0:$l.length)-1])==null?void 0:Al.split("."))==null?void 0:Ql[0],url:_l==null?void 0:_l.url}});Ja=[...Ja,...dl]}let ul={};for(let al in v)al!=="id"&&(ul[al]=v[al]);ul[ll]=Ja,qa.push({id:v==null?void 0:v.id,value:{tableData:ul}})}if((qa==null?void 0:qa.length)>0){const Ja=qa.map(Ua=>{const ul={id:Ua.id,...Ua.value.tableData};return delete ul._isOCRRow,delete ul._ocrTableId,delete ul._isTemp,delete ul.tableEditType,delete ul.index,ul}),yl=[{tableName:(Ta=u==null?void 0:u.related)==null?void 0:Ta.find(Ua=>Ua==null?void 0:Ua.includes("content")),tableContents:Ja}];await O.pageBatchUpdateApi({platId:parseInt((sl=zl.value)==null?void 0:sl.plat_id),changeContents:yl})}if((ba==null?void 0:ba.length)>0)try{await O.pageBatchAddApi({platId:parseInt((Qa=zl.value)==null?void 0:Qa.plat_id),changeContents:[{tableName:(pl=u==null?void 0:u.related)==null?void 0:pl.find(Ja=>Ja==null?void 0:Ja.includes("content")),tableContents:ba.map(Ja=>{var Ua,ul,al;const yl={id:((Ua=Ja==null?void 0:Ja.key)==null?void 0:Ua.id)??((ul=Ja==null?void 0:Ja.key)==null?void 0:ul.rowId)??(Ja==null?void 0:Ja.id),...((al=Ja==null?void 0:Ja.value)==null?void 0:al.tableData)||{}};return delete yl._isOCRRow,delete yl._ocrTableId,delete yl._isTemp,delete yl.tableEditType,delete yl.index,Object.keys(yl).forEach(dl=>{dl==="证书附件"&&Array.isArray(yl[dl])&&(yl[dl]=JSON.stringify(yl[dl]))}),yl})}]})}catch(Ja){Ya.ElMessage.error(((Pl=(fl=Ja==null?void 0:Ja.response)==null?void 0:fl.data)==null?void 0:Pl.message)||(Ja==null?void 0:Ja.message)||"保存失败"),He.setTableLoading(!1);return}Ri(!0),Te.setImportLoading(!1),He.setFreshContent(!0)},co=(d,v)=>(d=d==null?void 0:d.map(B=>{var z,F;return B!=null&&B.children&&((z=B.children)!=null&&z.find(N=>N.id===(v==null?void 0:v.id))?B.children=(F=B.children)==null?void 0:F.filter(N=>(N==null?void 0:N.id)!==(v==null?void 0:v.id)):B.children=co(B.children,v)),B}),d),hi=a.ref(!1),nt=()=>{hi.value=!0},it=async d=>{var B,z,F,N;hi.value=!1;const v=Array.isArray(d)?d:d?[d]:[];if(v.length!==0)for(const ie of v){const te={name:ie.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(ie),raw:ie,uid:Date.now()+Math.random()};Xa.value.push(te),El(te,"uploading"),Il(te,0);try{const G=new FormData;G.append("file",ie,te.name);const Ee=await O.platformUploadFile(G);te.uploadResult=((B=Ee==null?void 0:Ee.data)==null?void 0:B.result)||{name:te.name,url:"",fileName:te.name},xl({name:((z=te.uploadResult)==null?void 0:z.name)||te.name,url:((F=te.uploadResult)==null?void 0:F.url)||"",id:(N=te.uploadResult)==null?void 0:N.id}),El(te,"uploaded"),Il(te,100)}catch(G){console.error("文件上传失败:",G),Ya.ElMessage.error(`文件 ${te.name} 上传失败,请重试`),El(te,"pending"),Il(te,0);const Ee=Xa.value.findIndex(De=>De.uid===te.uid);Ee>-1&&Xa.value.splice(Ee,1)}}},t=a.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(d,v,B)=>{v===(u==null?void 0:u.index)?B(new Error("选择源不能和目标源一致")):B()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),o=a.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],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=()=>{o.show=!1},b=async d=>{var v,B,z,F,N,ie,te,G;try{if(d==="cancel"&&(o.show=!1),d==="replace"&&((v=o==null?void 0:o.existRows)==null?void 0:v.length)>0){await O.pageBatchDeleteApi({platId:parseInt((B=zl.value)==null?void 0:B.plat_id),changeContents:[{tableName:((z=u==null?void 0:u.related)==null?void 0:z.find(De=>De==null?void 0:De.includes("content_")))||((F=u==null?void 0:u.related)==null?void 0:F.find(De=>De==null?void 0:De.includes("content"))),tableContents:o==null?void 0:o.existRows}]});const Ee=await O.pageBatchAddApi({platId:parseInt((N=zl.value)==null?void 0:N.plat_id),changeContents:[{tableName:(ie=u==null?void 0:u.related)==null?void 0:ie.find(De=>De==null?void 0:De.includes("content")),tableContents:(()=>{const De=(_e.value||[]).filter(ha=>!((o==null?void 0:o.existRows)||[]).some(Fa=>String(Fa==null?void 0:Fa.id)===String(ha==null?void 0:ha.id))),je=(o==null?void 0:o.tableData)||[],Pe=[];let Ye=De.slice();return je.forEach(ha=>{const Fa={...ha};try{Fa.sort=Ln(0,Ye)}catch{}Pe.push(Fa),Ye.unshift(Fa)}),Pe.map((ha,Fa)=>({id:Fa,...ha}))})()}]});((te=Ee==null?void 0:Ee.data)==null?void 0:te.code)===200&&(await St({buttonName:"新增",columns:de.value,fixContent:(G=o==null?void 0:o.tableData)==null?void 0:G.map((De,je)=>({id:je,...De})),relatedContents:u==null?void 0:u.related}),Ya.ElMessage.success("数据导入替换成功"))}}catch{throw new Error(e)}finally{o.show=!1,o.columns=[],o.tableData=[],o.existRows=[]}},w=()=>{t.show=!1},I=d=>{var v,B;if((d==null?void 0:d.buttonName)==="取消")return t.show=!1;t.to=d==null?void 0:d.content,!(!(u!=null&&u.index)||!((v=t.to)!=null&&v.groupName))&&(u==null?void 0:u.index)!==((B=t.to)==null?void 0:B.groupName)&&(ze("change",{buttonName:"迁移",value:{from:t.from,to:t.to,data:t.selectRow}}),t.show=!1)},J=async d=>{var v,B,z,F;if(d){if(!yr.validateFileSize(d.raw)){Ya.ElMessage.warning(`文件大小不能超过 ${zr.value.maxSize}MB`);const N=Xa.value.findIndex(ie=>ie.uid===d.uid);N>-1&&Xa.value.splice(N,1),Q();return}if(!yr.validateFileType(d.raw)){Ya.ElMessage.warning("请上传图片文件");const N=Xa.value.findIndex(ie=>ie.uid===d.uid);N>-1&&Xa.value.splice(N,1),Q();return}El(d,"uploading"),Il(d,0);try{const N=new FormData;N.append("file",d.raw,d.name);const ie=await O.platformUploadFile(N);d.uploadResult=((v=ie==null?void 0:ie.data)==null?void 0:v.result)||{name:d.name,url:"",fileName:d.name},xl({name:((B=d.uploadResult)==null?void 0:B.name)||d.name,url:((z=d.uploadResult)==null?void 0:z.url)||"",id:(F=d.uploadResult)==null?void 0:F.id}),El(d,"uploaded"),Il(d,100)}catch(N){console.error("文件上传失败:",N),Ya.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),El(d,"pending"),Il(d,0);const ie=Xa.value.findIndex(te=>te.uid===d.uid);ie>-1&&Xa.value.splice(ie,1)}finally{Q()}}},Q=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},be=async()=>{var B,z;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),Xa.value.length===0){Ya.ElMessage.warning("请先选择要上传的图片");return}if(Xa.value.filter(F=>{const N=ol(F);return N!=="uploaded"&&N!=="completed"&&N!=="failed"}).length>0){Ya.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}$a.value=!0,re.value=0;let v=null;try{Xa.value.forEach(sa=>{El(sa,"processing")});const F=Math.floor(Math.random()*10)+90;v=setInterval(()=>{re.value<F?re.value+=1:clearInterval(v)},50);const N=Xa.value.map(sa=>{var ll,ba,qa;return{name:((ll=sa.uploadResult)==null?void 0:ll.name)||sa.name,url:((ba=sa.uploadResult)==null?void 0:ba.url)||"",fileName:((qa=sa.uploadResult)==null?void 0:qa.fileName)||sa.name}}),ie=yr.extractTableHeaders(de.value),te=N.map(sa=>({name:(sa==null?void 0:sa.fileName)||(sa==null?void 0:sa.name),url:(sa==null?void 0:sa.url)||""})),G=await yr.recognize(te,ie);if(console.log(G,"ocrResult"),clearInterval(v),v=null,(G==null?void 0:G.code)===500||(G==null?void 0:G.type)==="error"||!(G!=null&&G.result)){re.value=0,Xa.value.forEach(sa=>{El(sa,"failed"),Il(sa,0)}),Ya.ElMessage.error((G==null?void 0:G.message)||"OCR识别失败,请重试"),$a.value=!1;return}re.value=F;const Ee=Array.isArray(G==null?void 0:G.result)?G.result:[];if(Ee.length===0){re.value=0,Xa.value.forEach(sa=>{El(sa,"failed"),Il(sa,0)}),Ya.ElMessage.warning("OCR识别未返回有效数据"),$a.value=!1;return}const De=new Set,je=[];Ee.forEach((sa,ll)=>{const ba=sa!=null&&sa.数据&&typeof(sa==null?void 0:sa.数据)=="object"?sa.数据:{},qa=Array.isArray(sa==null?void 0:sa.图片信息)?sa.图片信息:[],ve=new Map;qa.forEach(ca=>{ca!=null&&ca.name&&ve.set(ca.name,ca.url||"")});const Ca={_index:ll,_certType:(sa==null?void 0:sa.证书类型)||"",_certNo:(sa==null?void 0:sa.证书编号)||"",_ocrImages:qa,__ocrFieldMeta:{}};Object.entries(ba).forEach(([ca,Ea])=>{let Da="",A=0,X=[],$e="";Ea&&typeof Ea=="object"&&!Array.isArray(Ea)?(Da=(Ea==null?void 0:Ea.value)??"",A=(Ea==null?void 0:Ea.score)??0,X=Array.isArray(Ea==null?void 0:Ea.bboxNorm)?Ea==null?void 0:Ea.bboxNorm:[],$e=(Ea==null?void 0:Ea.imageName)||""):Array.isArray(Ea)&&Ea.length>=2?(Da=Ea[0]??"",A=Ea[1]??0):(Da=Ea??"",A=0),Ca[ca]=Da,Ca[`${ca}_accuracy`]=A,De.add(ca),Ca.__ocrFieldMeta[ca]={value:Da,score:A,bboxNorm:X,imageName:$e,imageUrl:$e&&ve.get($e)||"",images:qa}}),je.push(Ca)});const Pe=[],Ye=new Set;je.forEach(sa=>{sa&&De.forEach(ll=>{const ba=sa[`${ll}_accuracy`];(typeof ba=="number"?ba>0:ba!=null&&String(ba).trim()!==""&&String(ba)!=="0")&&Ye.add(ll)})}),De.forEach(sa=>{Pe.push({prop:sa,label:sa,editable:!0,minWidth:230}),Ye.has(sa)&&Pe.push({prop:`${sa}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),Xa.value.forEach(sa=>{El(sa,"completed")}),re.value=100,We.value=Pe,pa.value=je,ml.value=N,Ha.value=G;const ha=["出厂编号","设备名称","制造厂"],Fa=Pe.filter(sa=>sa&&!sa.isAccuracy&&typeof sa.prop=="string").map(sa=>sa.prop),Ga=["出厂编号","设备名称","制造厂"];Ka.value=Fa.filter(sa=>Ga.includes(sa)),console.log("[OCR] 默认勾选字段 props:",Ka.value),ye.value=2,$a.value=!1,ea.value=!1}catch(F){console.error("OCR处理失败:",F),v&&(clearInterval(v),v=null),Ya.ElMessage.error(((z=(B=F==null?void 0:F.response)==null?void 0:B.data)==null?void 0:z.message)||"OCR识别失败,请重试"),$a.value=!1,re.value=0,Xa.value.forEach(N=>{El(N,"pending"),Il(N,0)})}},Fe=d=>{if(d==null)return"";let v=String(d);return v=v.replace(/\s+/g," ").trim(),v=v.replace(/[!-~]/g,B=>String.fromCharCode(B.charCodeAt(0)-65248)),v=v.replace(/ /g," "),v=v.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),v},Ce=()=>{var sa,ll;const d=ml.value,v=Ha.value,B=pa.value;if(!B||B.length===0){Ya.ElMessage.warning("暂无数据可添加");return}const z=(sa=na.getAllLeafNodes(de.value)||[])==null?void 0:sa.filter(ba=>(ba==null?void 0:ba.type)!=="operate"&&(ba==null?void 0:ba.label)!=="操作"&&(ba==null?void 0:ba.prop)!=="operate"),F=new Map,N=new Map,ie=(ll=z==null?void 0:z.find(ba=>(ba==null?void 0:ba.label)==="证书附件"))==null?void 0:ll.prop;z==null||z.forEach(ba=>{ba!=null&&ba.label&&(ba!=null&&ba.prop)&&(F.set(ba.label,ba.prop),N.set(ba.prop,ba.label))});const te=Date.now(),G=ba=>String(te*1e3+ba),Ee=[],De=[],je=ba=>{const qa=Bo&&Bo[ba]||[ba];for(const ve of qa){const Ca=F.get(ve);if(Ca)return Ca}return""},Pe=je("出厂编号"),Ye=je("设备名称"),ha=je("制造厂"),Fa=[],Ga=ba=>{var Da,A;if(!ie)return[];const qa=(Array.isArray(d)?d[ba]:null)||null,ve=(qa==null?void 0:qa.url)||"",Ca=(qa==null?void 0:qa.fileName)||(qa==null?void 0:qa.name)||"";return(String(Ca).toLowerCase().endsWith(".pdf")||String(ve).toLowerCase().endsWith(".pdf"))&&ve?[{url:ve,name:Ca,fileName:Ca}]:(Array.isArray((A=(Da=v==null?void 0:v.result)==null?void 0:Da[ba])==null?void 0:A.图片信息)?v.result[ba].图片信息:[]).map(X=>({url:(X==null?void 0:X.url)||"",name:(X==null?void 0:X.name)||"",fileName:(X==null?void 0:X.name)||""})).filter(X=>X.url)};if(B.forEach((ba,qa)=>{var sl;const ve={id:G(qa),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Qa,pl]of F.entries())Object.prototype.hasOwnProperty.call(ba,Qa)&&(ve[pl]=ba[Qa]);ie&&(ve[ie]=Ga(qa));const Ca=(Array.isArray(v==null?void 0:v.result)?v.result[qa]:null)||null,ca=(Array.isArray(d)?d[qa]:null)||null,Ea=(ca==null?void 0:ca.url)||"",Da=(ca==null?void 0:ca.fileName)||(ca==null?void 0:ca.name)||"",A=String(Da).toLowerCase().endsWith(".pdf")||String(Ea).toLowerCase().endsWith(".pdf"),X={ts:Date.now(),versionId:String(Date.now())+"_"+String(qa),label:new Date().toLocaleString(),certType:(Ca==null?void 0:Ca.证书类型)||"",certNo:(Ca==null?void 0:Ca.证书编号)||"",fileType:A?"pdf":"image",sourceUrl:A?Ea:"",images:Array.isArray(Ca==null?void 0:Ca.图片信息)?Ca.图片信息.map(Qa=>({name:(Qa==null?void 0:Qa.name)||"",url:(Qa==null?void 0:Qa.url)||""})).filter(Qa=>Qa.url):[]},$e=Qa=>Fe(Qa?ve==null?void 0:ve[Qa]:""),la=$e(Pe),xe=$e(Ye),ta=$e(ha);if(!!(Pe&&Ye&&ha&&la&&xe&&ta)){const Qa=(_e.value||[]).find(pl=>{const fl=Fe(Pe?pl==null?void 0:pl[Pe]:""),Pl=Fe(Ye?pl==null?void 0:pl[Ye]:""),Ja=Fe(ha?pl==null?void 0:pl[ha]:"");return fl&&Pl&&Ja&&fl===la&&Pl===xe&&Ja===ta});if(Qa){Fa.push({idx:qa,ocrRow:ve,versionItem:X,ocrNo:la,candidates:[Qa],selectedTargetId:String((Qa==null?void 0:Qa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(la&&Pe){const Qa=(_e.value||[]).filter(pl=>{const fl=Fe(Pe?pl==null?void 0:pl[Pe]:"");return fl&&fl===la});if(Qa.length>0){Fa.push({idx:qa,ocrRow:ve,versionItem:X,ocrNo:la,candidates:Qa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(ve.sort===void 0||ve.sort===null||String(ve.sort).trim()===""){const Qa=(_e.value||[]).map(fl=>ri(fl==null?void 0:fl.sort)).filter(fl=>fl!==null),pl=Qa.length>0?Math.max(...Qa):((sl=_e.value)==null?void 0:sl.length)??0;ve.sort=String(Number((pl+1).toFixed(6)))}}catch{}ja(u==null?void 0:u.index,ve.id,X),Fa.push({idx:qa,ocrRow:ve,versionItem:X,ocrNo:la,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),(Fa||[]).length>0){Gl.value=(Fa||[]).map(ba=>({...ba,selectedTargetId:(ba==null?void 0:ba.selectedTargetId)||""})),Ol.value=!0,Hl.value=De,Zl.value=Ee,Sr.value=v,Fl.value=d,fr.value=ie||"";return}},Qe=(d,v,B)=>{pa.value[d]&&(pa.value[d][v]=B)},Aa=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,nl=d=>{if(d==null||d===0)return"#909399";const v=Number(d);return v>=.9?"#67c23a":v>=.7?"#e6a23c":"#f56c6c"},el=d=>{var B,z,F,N;if(wa.value===d){wa.value=null,Ia.value=!1,cl.value="";return}wa.value=d,cl.value="";const v=(B=pa.value)==null?void 0:B[d];if(v&&Array.isArray(v._ocrImages)&&v._ocrImages.length>0){Ae.value=v._ocrImages.map(G=>({name:(G==null?void 0:G.name)||"",url:(G==null?void 0:G.url)||""})).filter(G=>G.name||G.url);const ie=v.__ocrFieldMeta||{},te=(z=Object.values(ie))==null?void 0:z.find(G=>G==null?void 0:G.imageName);Dl.value=(te==null?void 0:te.imageName)||((N=(F=Ae.value)==null?void 0:F[0])==null?void 0:N.name)||"",Ia.value=Ae.value.length>0}else Ae.value=[],Ia.value=!1,Dl.value=""},il=()=>{Na.value=!1,Xa.value=[],Za.value=null,ye.value=1,xa.value.clear(),Le.value.clear(),re.value=0,Ia.value=!1},wl=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",ol=d=>{const v=d.uid||d.name;return xa.value.get(v)||"pending"},Nl=d=>{const v=d.uid||d.name;return Le.value.get(v)||0},Il=(d,v)=>{const B=d.uid||d.name;Le.value.set(B,Math.min(100,Math.max(0,v)))},lr=d=>{const v=ol(d),B=100.53;if(v==="completed"||v==="uploaded")return`${B} ${B}`;if(v==="failed")return`${B} ${B}`;if(v==="uploading"){const z=Nl(d);return`${B*(z/100)} ${B}`}else if(v==="processing")return`${B*.5} ${B}`;return`0 ${B}`},El=(d,v)=>{const B=d.uid||d.name;xa.value.set(B,v),(v==="completed"||v==="uploaded")&&Il(d,100)},Wl=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');if(d)d.value="",d.click();else{const v=document.createElement("input");v.type="file",v.multiple=!0,v.accept="image/*,application/pdf",v.style.display="none",v.onchange=async B=>{const z=Array.from(B.target.files||[]);for(const F of z){const N={name:F.name,raw:F,uid:Date.now()+Math.random()};Xa.value.push(N),await J(N)}B.target.value="",document.body.removeChild(v)},document.body.appendChild(v),v.click()}})},Hr=()=>{ye.value>1&&ye.value--},Er=()=>{ye.value===1?Xa.value.length>0&&!$a.value&&be():ye.value===2&&(Ce(),ye.value=3)},Jr=async d=>{await hn(d==null?void 0:d.row)},tn=async({row:d,prop:v})=>{!d||!v||await hn(d,v)},hn=async(d,v)=>{var F,N;const B=d==null?void 0:d.id;if(!B){Ya.ElMessage.warning("暂无可预览数据");return}let z=Wa(u==null?void 0:u.index,B);if(!z||z.length===0){const ie=sessionStorage.getItem("ocr_root_table_id"),te=ie!==null?Number(ie):null;if(te!=null&&te!==""&&!Number.isNaN(te)){const G=Wa(te,B);Array.isArray(G)&&G.length>0&&(Rl(u==null?void 0:u.index,B,G),z=G)}}if(!z||z.length===0){const ie=(F=na.getAllLeafNodes(de.value)||[])==null?void 0:F.filter(G=>(G==null?void 0:G.type)!=="operate"&&(G==null?void 0:G.label)!=="操作"&&(G==null?void 0:G.prop)!=="operate"),te=v||((N=ie==null?void 0:ie.find(G=>(G==null?void 0:G.label)==="证书附件"))==null?void 0:N.prop);if(te&&d[te]){const G=d[te];let Ee=[],De="",je=!1;if(typeof G=="string")try{const Pe=JSON.parse(G);Array.isArray(Pe)&&(Ee=Pe.map(Ye=>({name:(Ye==null?void 0:Ye.name)||(Ye==null?void 0:Ye.fileName)||"",url:(Ye==null?void 0:Ye.url)||""})).filter(Ye=>Ye.url||Ye.name),Ee.length>0&&(De=Ee[0].url||"",je=String(Ee[0].name).toLowerCase().endsWith(".pdf")||String(De).toLowerCase().endsWith(".pdf")))}catch{De=G,je=String(G).toLowerCase().endsWith(".pdf"),Ee=[{name:G,url:G}]}else Array.isArray(G)&&(Ee=G.map(Pe=>({name:(Pe==null?void 0:Pe.name)||(Pe==null?void 0:Pe.fileName)||"",url:(Pe==null?void 0:Pe.url)||""})).filter(Pe=>Pe.url||Pe.name),Ee.length>0&&(De=Ee[0].url||"",je=String(Ee[0].name).toLowerCase().endsWith(".pdf")||String(De).toLowerCase().endsWith(".pdf")));if(Ee.length>0||De){const Pe={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:je?"pdf":"image",sourceUrl:je?De:"",images:Ee};z=[Pe],ja(u==null?void 0:u.index,B,Pe)}}}if(!z||z.length===0){Ya.ElMessage.warning("暂无可预览数据");return}Va.value=z,aa.value=!0},vi=d=>{Xa.value=Xa.value.filter((v,B)=>B!==d)},$n=async(d,v,B)=>{var z,F,N,ie,te,G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll,ba,qa,ve,Ca,ca;if(ce(u.config,{type:Xe.TABLE,tableOperate:d})){if(La.value="",ga.value=!0,Ma.value=!0,ze("onButtonClick",d,v),$.value=[],d==="删除")pn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Ea,Da,A,X;(Ea=_e.value)!=null&&Ea.find($e=>($e==null?void 0:$e.id)===(v==null?void 0:v.id))?_e.value=(Da=O.cloneDeep(_e.value))==null?void 0:Da.filter($e=>($e==null?void 0:$e.id)!==(v==null?void 0:v.id)):_e.value=co(O.cloneDeep(_e.value),v);try{v!=null&&v.id&&((X=(A=qe.value)==null?void 0:A.has)!=null&&X.call(A,v==null?void 0:v.id))&&qe.value.delete(v.id)}catch{}zf(Yr.value,gn.value,v==null?void 0:v.id),He.setTableLoading(u==null?void 0:u.index),ze("change",{content:_e.value,fixContent:[v],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.groupNames,buttonName:d,columns:de.value,relatedContents:u==null?void 0:u.related}),console.log(v,"item")});else if(d==="批量删除"){if(((z=ur.value)==null?void 0:z.length)===0)return Ya.ElMessage.warning("请先勾选操作的数据");pn.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var A,X,$e,la,xe;const Ea=(A=ur.value)==null?void 0:A.map(ta=>ta.id);_e.value=(X=O.cloneDeep(_e.value))==null?void 0:X.filter(ta=>!(Ea!=null&&Ea.includes(ta.id))),He.setTableLoading(u==null?void 0:u.index),ze("change",{content:_e.value,fixContent:ur.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:d,relatedContents:u==null?void 0:u.related,columns:de.value});const Da=(Ea||[]).filter(Boolean);if(Da.length>0&&Da.every(ta=>ta!=null&&ta!=="")){const ta=(ur.value||[]).map(Ta=>{const sl={...Ta};return delete sl._isOCRRow,delete sl._ocrTableId,delete sl._isTemp,delete sl.tableEditType,delete sl.index,sl});await O.pageBatchDeleteApi({platId:parseInt(($e=zl.value)==null?void 0:$e.plat_id),changeContents:[{tableName:((la=u==null?void 0:u.related)==null?void 0:la.find(Ta=>Ta==null?void 0:Ta.includes("content_")))||((xe=u==null?void 0:u.related)==null?void 0:xe.find(Ta=>Ta==null?void 0:Ta.includes("content"))),tableContents:ta}]})}})}else if(d==="复制新增"){se.value="复制新增",O.cloneDeep(v);const Ea=(F=de.value)==null?void 0:F.find(Da=>Da==null?void 0:Da.isMainKey);Ea||((N=de.value)==null||N[0]),ir.value=v,Ri(!0)}else if(d==="新增")se.value="新增",Li(""),U.value=!0;else if(d==="编辑")se.value="编辑",Li(v),U.value=!0;else if(d==="查看")se.value="查看",Li(v),ga.value=!1,Ma.value=!1,U.value=!0;else if(d==="查看三维模型"){const Ea={};for(let A in v)A!=="id"&&(Ea[A]=v[A]);let Da=(ie=Object.values(Ea))==null?void 0:ie[1];Ie.setTableShowThree(Da)}else if(d==="切换视图")gu();else if(((te=B==null?void 0:B.extra)==null?void 0:te.type)==="modelExample")se.value=d,ke.value=!0;else if(d==="新建"){let Ea=fe.value,Da=[];for(let xe in Ea)xe!=null&&xe.includes(`loading${((G=zl.value)==null?void 0:G.account)||((Ee=zl.value)==null?void 0:Ee.账号)}`)&&(Da=[...Da,...xe]);let A=[];for(let xe in Ea)xe!=null&&xe.includes(`updateLoading${((De=zl.value)==null?void 0:De.account)||((je=zl.value)==null?void 0:je.账号)}`)&&(A=[...A,...xe]);let X=Da==null?void 0:Da.map(xe=>xe==null?void 0:xe.id);const $e=A==null?void 0:A.map(xe=>xe==null?void 0:xe.id);X=[...O.cloneDeep(X),...$e],(X==null?void 0:X.length)>0&&(X!=null&&X.every(xe=>xe!==null&&xe))&&await Nr.batchDeleteInsofDataApi({ids:X});const la=(Pe=Oe.value)==null?void 0:Pe.find(xe=>(xe==null?void 0:xe.label)==="新建");await cu(!1,la)}else if(d==="修改模板"){let Ea=O.cloneDeep(Ue).value;He.setRouteToChildPath(Ea),Te.setActiveMenuPath(Ea+k)}else if(d==="执行")rt(d,v);else if(d==="导出paraform"){const Ea=Pi.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const Da=["推力","真空","压力","温度","流量"],A=bl=>{var Al,Ql,Bl;return bl?typeof(bl==null?void 0:bl.value)=="string"?bl.value:((Bl=(Ql=(Al=bl==null?void 0:bl._custom)==null?void 0:Al.value)==null?void 0:Ql.value)==null?void 0:Bl.value)||"":""},X=Array.isArray(nn.value)?nn.value:[],$e=A(X.find(bl=>(bl==null?void 0:bl.condition)==="child")),la=String($e||"").slice(0,8),xe=bl=>{if(bl==null)return"";const Al=String(bl).trim();if(!Al)return"";if(/^\d{8}$/.test(Al))return Al;const Ql=Al.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Ql){const Jl=Ql[1],or=Ql[2].padStart(2,"0"),Kl=Ql[3].padStart(2,"0");return`${Jl}${or}${Kl}`}const Bl=Al.replace(/\D/g,"");return Bl.length>=8?Bl.slice(0,8):""},ta=async bl=>{var Al,Ql;if(!bl)return"";try{const Bl=await Kr("试验任务/任务管理",!1),Jl=(vr,dr=[])=>{if(!Array.isArray(vr))return dr;for(const pr of vr)(pr==null?void 0:pr.comp)==="Table"&&(pr!=null&&pr.name)&&dr.push(pr),Array.isArray(pr==null?void 0:pr.children)&&Jl(pr.children,dr),Array.isArray(pr==null?void 0:pr.tab)&&Jl(pr.tab,dr),Array.isArray(pr==null?void 0:pr.choice)&&Jl(pr.choice,dr);return dr},Kl=Jl(Bl||[]).find(vr=>(vr==null?void 0:vr.name)==="任务列表"),hr=((Ql=(Al=Kl==null?void 0:Kl.compData)==null?void 0:Al.find(vr=>(vr==null?void 0:vr.key)==="tableContents"))==null?void 0:Ql.contents)||[];if(!Array.isArray(hr)||hr.length===0)return"";const qr=hr.find(vr=>String((vr==null?void 0:vr["试验代号(名称)"])||"").slice(0,8)===bl);return xe(qr==null?void 0:qr.计划试验时间)}catch(Bl){return console.warn("获取任务列表计划试验时间失败:",Bl),""}},Ta=(Ue.value||"").replace(/\/+$/,""),sl=$e?`${Ta}/${$e}`:Ta,Qa=await Kr(sl||Ue.value,!1),pl=String(fa.value||"").trim(),fl=bl=>String(bl||"").trim(),Pl=(bl,Al=[],Ql="")=>{if(!Array.isArray(bl))return Al;for(const Bl of bl){const Jl=fl((Bl==null?void 0:Bl.choiceName)||(Bl==null?void 0:Bl.name0)||Ql);(Bl==null?void 0:Bl.comp)==="Table"&&(Bl==null?void 0:Bl.name)&&Da.includes(Bl.name)&&(!pl||Jl===pl)&&Al.push(Bl),Array.isArray(Bl==null?void 0:Bl.children)&&Pl(Bl.children,Al,Jl),Array.isArray(Bl==null?void 0:Bl.tab)&&Pl(Bl.tab,Al,Jl),Array.isArray(Bl==null?void 0:Bl.choice)&&Pl(Bl.choice,Al,Jl)}return Al},Ja=Pl(Qa||[]),yl=new Map;for(const bl of Ja)bl!=null&&bl.name&&!yl.has(bl.name)&&yl.set(bl.name,bl);const Ua=Da.map(bl=>yl.get(bl)).filter(Boolean);if(!Ua||Ua.length===0)return Ya.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const ul=bl=>{const Al=new Map,Ql=(Bl,Jl=[])=>{if(Array.isArray(Bl))for(const or of Bl){const Kl=((or==null?void 0:or.label)??"").toString().trim(),hr=Kl?[...Jl,Kl]:[...Jl];if(Array.isArray(or==null?void 0:or.children)&&or.children.length>0)Ql(or.children,hr);else{const vr=((or==null?void 0:or.prop)??"").toString();if(!vr)continue;const dr=Kl||vr,pr=(hr.length>0?[...Jl,dr]:[dr]).join(".");Al.set(vr,pr)}}};return Ql(bl,[]),Al},al=(bl,Al)=>{const Ql=ul(bl||[]),Jl=(na.getAllLeafNodes(bl||[])||[]).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"),or=Array.isArray(Al)?Al:[];return or.length===0?[]:or.map(Kl=>{const hr={};return Jl.forEach(qr=>{const vr=String(qr.prop),dr=Ql.get(vr)||String(qr.label||qr.prop);hr[dr]=(Kl==null?void 0:Kl[vr])??""}),hr})},dl=Ua.map(bl=>{var or,Kl;const Al=(bl==null?void 0:bl.compData)||[];let Ql=(or=Al==null?void 0:Al.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:or.contents;Array.isArray(Ql==null?void 0:Ql[0])&&(Ql=Ql[0]);const Bl=((Kl=Al==null?void 0:Al.find(hr=>(hr==null?void 0:hr.key)==="tableContents"))==null?void 0:Kl.contents)||[];if(!Array.isArray(Ql)||Ql.length===0||!Array.isArray(Bl)||Bl.length===0)return null;const Jl=al(Ql||[],Bl||[]);return!Array.isArray(Jl)||Jl.length===0?null:{类型:bl==null?void 0:bl.name,数据:Jl}}).filter(Boolean);if(!dl||dl.length===0)return Ya.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const _l=await ta(la),Tl={试验代号:la,试验日期:_l,ParaForm:dl},wr=await fi().catch(()=>""),$l=await O.exportParaformApi(Tl,wr);if(((Ye=$l==null?void 0:$l.data)==null?void 0:Ye.code)===200&&((Fa=(ha=$l==null?void 0:$l.data)==null?void 0:ha.result)!=null&&Fa.Excel文件)){const bl=$l.data.result.Excel文件,Al=await O.platformDownloadFile({url:bl}),Ql=new Blob([Al.data],{type:"application/vnd.ms-excel"}),Bl=URL.createObjectURL(Ql),Jl=Pn.dayjs().format("YYYYMMDD"),Kl=`${(la||"UNKNOWN").trim()||"UNKNOWN"}_${Jl}_paraform.xls`,hr=document.createElement("a");hr.href=Bl,hr.download=Kl,hr.style.display="none",document.body.appendChild(hr),hr.click(),setTimeout(()=>{document.body.removeChild(hr),URL.revokeObjectURL(Bl)},100);const qr=Array.isArray((sa=(Ga=$l==null?void 0:$l.data)==null?void 0:Ga.result)==null?void 0:sa.warnings)?$l.data.result.warnings:[];if(qr.length>0){const vr=qr.map((dr,pr)=>`${pr+1}. ${(dr==null?void 0:dr.field)||"未知字段"}:${(dr==null?void 0:dr.message)||""}`).join(`
24
+ `);Ya.ElMessage.warning({message:`导出成功,但存在以下提示:
25
+ ${vr}`,duration:5e3,showClose:!0})}else Ya.ElMessage.success("导出成功")}else Ya.ElMessage.error(((ll=$l==null?void 0:$l.data)==null?void 0:ll.message)||"导出失败")}catch(Da){console.error("导出paraform失败:",Da),Ya.ElMessage.error("导出失败:"+((Da==null?void 0:Da.message)||"未知错误"))}finally{Ea.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ba=ur.value)==null?void 0:ba.length)===0)return Ya.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((qa=_e.value)==null?void 0:qa.length)===0)return Ya.ElMessage.warning("暂无数据导出");let Ea=["序号",...(Ca=(ve=de.value)==null?void 0:ve.map($e=>$e==null?void 0:$e.prop))==null?void 0:Ca.filter($e=>$e!=="操作")],Da=d==="导出全部"?_e.value:ur.value;const A=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];Da=Da==null?void 0:Da.map($e=>Object.fromEntries(Object.entries($e).filter(([la])=>!A.includes(la)))),Ea=["序号",...Ea],Da=Da==null?void 0:Da.map(($e,la)=>({序号:la+1,...$e}));let X=(u==null?void 0:u.compName)||"表格信息";jo(Da,X,Ea,X)}else if(d==="OCR识别")Na.value=!0,Xa.value=[],ye.value=1,xa.value.clear(),Le.value.clear(),re.value=0;else if(d==="迁移")t.selectRow=v,t.show=!0;else if(d==="生成方法"){let Ea=await Jf(v),Da;v!==""?Da=[v]:Da=O.cloneDeep(_e.value),Da=Da==null?void 0:Da.map(X=>(X.输出值=Ea,X));const A={fixContent:Da,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:de.value,name:u==null?void 0:u.groupNames};ze("change",A)}else if(((ca=B==null?void 0:B.extra)==null?void 0:ca.type)==="methodButton"){let Ea;v!==""?Ea=[v]:Ea=O.cloneDeep(_e.value);const A={fixContent:await gt(Ea,de==null?void 0:de.value,"Manual",_e.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:de.value,name:u==null?void 0:u.groupNames};ze("change",A)}}},tu=async(d,v)=>{var B,z,F,N,ie,te,G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll,ba,qa,ve;try{let Ca,ca;const Ea=(B=fe.value[Ue.value+k])==null?void 0:B.filter(Ta=>{var sl;return((sl=Ta==null?void 0:Ta.key)==null?void 0:sl.type)==="structureMethod"}),Da=(z=fe.value[Ue.value+k])==null?void 0:z.filter(Ta=>{var sl;return((sl=Ta==null?void 0:Ta.key)==null?void 0:sl.type)==="structure"}),A=Ea==null?void 0:Ea.find(Ta=>{var sl,Qa;return((Qa=(sl=Ta==null?void 0:Ta.value)==null?void 0:sl.pageData)==null?void 0:Qa.method)==="保存"});if(!A)return;const X=(te=(ie=fe.value[(N=(F=A==null?void 0:A.value)==null?void 0:F.pageData)==null?void 0:N.path])==null?void 0:ie.filter(Ta=>{var sl;return((sl=Ta==null?void 0:Ta.key)==null?void 0:sl.type)==="data"}))==null?void 0:te.find(Ta=>{var sl,Qa,pl,fl;return((Qa=(sl=Ta==null?void 0:Ta.value)==null?void 0:sl.tableData)==null?void 0:Qa.算法名称)===((fl=(pl=A==null?void 0:A.value)==null?void 0:pl.pageData)==null?void 0:fl.method)});if(!X)return;const $e={buttonName:(Ee=(G=A==null?void 0:A.value)==null?void 0:G.pageData)==null?void 0:Ee.method,api:(je=(De=X==null?void 0:X.value)==null?void 0:De.tableData)==null?void 0:je.算法体,content:Da==null?void 0:Da.map(Ta=>{var sl;return(sl=Ta==null?void 0:Ta.value)==null?void 0:sl.pageData}),extraContent:[],extraValues:(Ye=(Pe=A==null?void 0:A.value)==null?void 0:Pe.pageData)==null?void 0:Ye.data,methodName:(Fa=(ha=A==null?void 0:A.value)==null?void 0:ha.pageData)==null?void 0:Fa.path};if(!d)return;const la={...d,compData:(Ga=d==null?void 0:d.compData)==null?void 0:Ga.map(Ta=>{var sl;return(Ta==null?void 0:Ta.key)==="formContent"?{...Ta,contents:(sl=Ta==null?void 0:Ta.contents)==null?void 0:sl.map(Qa=>(Qa==null?void 0:Qa.prop)===v?{...Qa,value:""}:Qa)}:Ta})},xe={key:{pageKey:Ue.value+k,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:la}},ta=await Ya.axios.post($e.api,xe,{headers:{"Content-Type":"application/json"}});return((sa=ta==null?void 0:ta.data)==null?void 0:sa.code)===200&&(Ca=(ba=(ll=ta==null?void 0:ta.data)==null?void 0:ll.result)==null?void 0:ba.latestReportCode,ca=(ve=(qa=ta==null?void 0:ta.data)==null?void 0:qa.result)==null?void 0:ve.status),{newMainKeyValue:Ca,newStatus:ca}}catch(Ca){throw Ya.ElMessage.error(Ca),new Error(Ca)}},Mt=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const su=async(d,v,B)=>{var G,Ee;let z=d==null?void 0:d[v==null?void 0:v.prop],F=1,N,ie;const te=O.cloneDeep(Ue).value+k+z;if(te){Mt.value="",N=(G=fe.value[te])==null?void 0:G.filter(Pe=>{var Ye;return((Ye=Pe==null?void 0:Pe.key)==null?void 0:Ye.type)==="structure"});const De=N==null?void 0:N.find(Pe=>{var Ye,ha,Fa;return((Fa=(ha=(Ye=Pe==null?void 0:Pe.value)==null?void 0:Ye.pageData)==null?void 0:ha.comp)==null?void 0:Fa.toUpperCase())==="FORM"});ie={...(Ee=De==null?void 0:De.value)==null?void 0:Ee.pageData,id:De==null?void 0:De.id};const je=await tu(ie,v==null?void 0:v.prop);if(Mt.value=je==null?void 0:je.newStatus,je!=null&&je.newMainKeyValue)return je==null?void 0:je.newMainKeyValue}if(_e.value.some(De=>(De==null?void 0:De[v==null?void 0:v.prop])===z)){const De=z;for(;_e.value.some(je=>(je==null?void 0:je[v==null?void 0:v.prop])===`${De}(${F})`);)F++;z=`${De}(${F})`}return z},cu=async(d,v,B)=>{var N,ie,te,G;let z,F;if(await su(B==null?void 0:B.data,B==null?void 0:B.firstCol),z=O.cloneDeep(Ue).value+k,F=O.cloneDeep(z)+`loading${((N=zl.value)==null?void 0:N.account)||((ie=zl.value)==null?void 0:ie.账号)}`,v){const Ee=(G=(te=fe.value[F])==null?void 0:te.filter(De=>{var je;return((je=De==null?void 0:De.key)==null?void 0:je.parentTable)===""}))==null?void 0:G.map(De=>{var je;return{id:De==null?void 0:De.id,...(je=De==null?void 0:De.value)==null?void 0:je.pageData}});(Ee==null?void 0:Ee.length)>0||await na.loadingConstruct(z,F,null,null,null),He.setRouteToChildPath(O.cloneDeep(Ue).value),Te.setActiveMenuPath(F)}else He.setRouteToChildPath(O.cloneDeep(Ue).value),Te.setActiveMenuPath(F)},uu=()=>{Se.value=!1,Pa.value=[],Ve.value=!1},Li=d=>{var N,ie,te,G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll,ba,qa,ve,Ca,ca,Ea,Da;const v=[];ue.value=O.cloneDeep(de.value),(ie=na.getColumnChild((N=O.cloneDeep(de.value))==null?void 0:N.filter(A=>(A==null?void 0:A.label)!=="操作")))==null||ie.forEach((A,X)=>{var $e,la,xe;A!=null&&A.formType&&(($e=A==null?void 0:A.formType)==null?void 0:$e.toUpperCase())==="SELECT"||A!=null&&A.menuId?v.push({label:(la=A==null?void 0:A.prop)!=null&&la.includes(".")?A==null?void 0:A.prop:(A==null?void 0:A.label)??(A==null?void 0:A.prop)??"",name:(A==null?void 0:A.prop)??"t"+X,prop:A==null?void 0:A.prop,type:"Select",value:(d==null?void 0:d[A==null?void 0:A.prop])??(A==null?void 0:A.value)??"",id:(A==null?void 0:A.id)??X,contents:(A==null?void 0:A.options)??[],multiple:(A==null?void 0:A.multiple)??!1,width:1,isFormColHidden:A==null?void 0:A.isFormColHidden,relatedValueId:A==null?void 0:A.relatedValueId,disabled:A==null?void 0:A.disabled,menus:A==null?void 0:A.menus,groups:A==null?void 0:A.groups,words:A==null?void 0:A.words,allSelectionContents:(A==null?void 0:A.allSelectionContents)??[],filterContent:A==null?void 0:A.filterContent,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled,filter:A==null?void 0:A.filter,bindMenus:A==null?void 0:A.bindMenus,isMainPath:A==null?void 0:A.isMainPath,required:(A==null?void 0:A.required)??!1,relatedContents:A==null?void 0:A.relatedContents,mainKey:A==null?void 0:A.mainKey,relatedContents:A==null?void 0:A.relatedContents,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords,calculatorFilter:A==null?void 0:A.calculatorFilter}):v.push({label:(xe=A==null?void 0:A.prop)!=null&&xe.includes(".")?A==null?void 0:A.prop:(A==null?void 0:A.label)??(A==null?void 0:A.prop)??"",prop:A==null?void 0:A.prop,name:(A==null?void 0:A.prop)??"t"+X,type:!(A!=null&&A.formType)||(A==null?void 0:A.formType)===""?"Input":A==null?void 0:A.formType,value:(A==null?void 0:A.formType)==="Upload"?(d==null?void 0:d[A==null?void 0:A.prop])??"{}":(d==null?void 0:d[A==null?void 0:A.prop])??(A==null?void 0:A.value)??"",id:(A==null?void 0:A.id)??X,contents:(A==null?void 0:A.options)??[],multiple:(A==null?void 0:A.multiple)??!1,width:1,isFormColHidden:A==null?void 0:A.isFormColHidden,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled,relatedValueId:A==null?void 0:A.relatedValueId,menus:A==null?void 0:A.menus,groups:A==null?void 0:A.groups,words:A==null?void 0:A.words,filter:A==null?void 0:A.filter,bindMenus:A==null?void 0:A.bindMenus,isMainPath:A==null?void 0:A.isMainPath,required:(A==null?void 0:A.required)??!1,relatedContents:A==null?void 0:A.relatedContents,mainKey:A==null?void 0:A.mainKey,relatedContents:A==null?void 0:A.relatedContents,functionName:A==null?void 0:A.functionName,functionRelatedWords:A==null?void 0:A.functionRelatedWords,calculatorFilter:A==null?void 0:A.calculatorFilter})}),d===""||!d||(La.value=(d==null?void 0:d.id)??"");let B=na.getColumnChild((te=O.cloneDeep(de.value))==null?void 0:te.filter(A=>(A==null?void 0:A.label)!=="操作"));oa.value&&((G=oa.value)==null?void 0:G.length)>0&&(oa.value=(Ee=O.cloneDeep(oa).value)==null?void 0:Ee.map(A=>{var $e;let X=(A==null?void 0:A.prop)||(($e=B==null?void 0:B.find(la=>(la==null?void 0:la.label)===(A==null?void 0:A.label)))==null?void 0:$e.prop);return X&&(A.value=d[X]),A})),Ra.value=oa.value&&((De=oa.value)==null?void 0:De.length)>0?na.getTableFormToForm(oa.value):v,Ra.value=((je=Ra.value)==null?void 0:je.map(A=>({...A,disabled:(A==null?void 0:A.prop)==="disabled"?!0:A==null?void 0:A.disabled})))??Ra.value;let z=[],F=((ha=(Ye=(Pe=u.itemData)==null?void 0:Pe.filter(A=>(A==null?void 0:A.key)==="filter"))==null?void 0:Ye[0])==null?void 0:ha.contents)??"";if(F=Ze.analyzeSplitToContent(F,","),(F==null?void 0:F.length)>0&&(z=F.flat()),(z==null?void 0:z.length)>0){let A=z==null?void 0:z.filter(ta=>ta==null?void 0:ta.includes("@Type"));if(A=A==null?void 0:A[(A==null?void 0:A.length)-1],(A==null?void 0:A[(A==null?void 0:A.length)-1])===","&&(A=A==null?void 0:A.slice(0,(A==null?void 0:A.length)-1)),A){let ta=(Ga=(Fa=A==null?void 0:A.replace("=",_))==null?void 0:Fa.split(_))==null?void 0:Ga[1];((sa=ta==null?void 0:ta.trim())==null?void 0:sa.toUpperCase())==="MANUAL"&&(u==null||u.index,Ra.value=(ll=Ra.value)==null?void 0:ll.map((Ta,sl)=>Ta))}let X=(ba=Ra.value)==null?void 0:ba.filter(ta=>ta==null?void 0:ta.mainKey),$e;X==null||X.forEach(ta=>{var sl;if($e!==void 0)return;let Ta=ta==null?void 0:ta.menus;((sl=X==null?void 0:X.filter(Qa=>Qa==null?void 0:Qa.mainKey))==null?void 0:sl.length)>1&&($e=Ta,ta==null||ta.groups)});let la=[],xe=new Map;if(X==null||X.forEach(ta=>{var Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul,al,dl,_l;if((Ta=ta==null?void 0:ta.prop)!=null&&Ta.includes(".")){let Tl=[];xe.get(((Qa=(sl=ta==null?void 0:ta.prop)==null?void 0:sl.split("."))==null?void 0:Qa[0])+(ta!=null&&ta.isMainPath?0:1)+((pl=ta==null?void 0:ta.groups)==null?void 0:pl[0]))&&(Tl=xe.get(((Pl=(fl=ta==null?void 0:ta.prop)==null?void 0:fl.split("."))==null?void 0:Pl[0])+(ta!=null&&ta.isMainPath?0:1)+((Ja=ta==null?void 0:ta.groups)==null?void 0:Ja[0]))),Tl.push(ta),xe.set(((Ua=(yl=ta==null?void 0:ta.prop)==null?void 0:yl.split("."))==null?void 0:Ua[0])+(ta!=null&&ta.isMainPath?0:1)+((ul=ta==null?void 0:ta.groups)==null?void 0:ul[0]),Tl)}else{let Tl=[];xe.get("normal"+(ta!=null&&ta.isMainPath?0:1)+((al=ta==null?void 0:ta.groups)==null?void 0:al[0]))&&(Tl=xe.get("normal"+(ta!=null&&ta.isMainPath?0:1)+((dl=ta==null?void 0:ta.groups)==null?void 0:dl[0]))),Tl.push(ta),xe.set("normal"+(ta!=null&&ta.isMainPath?0:1)+((_l=ta==null?void 0:ta.groups)==null?void 0:_l[0]),Tl)}}),la=Array.from(xe.values()),(la==null?void 0:la.length)>0)for(let ta in la){let Ta=la==null?void 0:la[ta];if((Ta==null?void 0:Ta.length)!==1){if((Ta==null?void 0:Ta.length)>1){let sl=Ta==null?void 0:Ta.map(ul=>ul==null?void 0:ul.prop),Qa=Ta==null?void 0:Ta.map(ul=>ul==null?void 0:ul.label),pl=Ta==null?void 0:Ta.map(ul=>ul==null?void 0:ul.value),fl=(qa=O.cloneDeep(Ta))==null?void 0:qa[0],Pl=(ve=Ra.value)==null?void 0:ve.findIndex(ul=>(ul==null?void 0:ul.prop)===(fl==null?void 0:fl.prop)),Ja=(Ca=Ra.value)==null?void 0:Ca.slice(0,Pl),yl=(Ea=Ra.value)==null?void 0:Ea.slice(Pl,(ca=Ra.value)==null?void 0:ca.length);fl.label=Qa==null?void 0:Qa.join("·"),fl.value=pl==null?void 0:pl.join(" "),fl.value.trim()===""&&(fl.value=""),fl.prop=sl==null?void 0:sl.join("·");let Ua=Ta==null?void 0:Ta.map(ul=>{var al;return(al=ul==null?void 0:ul.words)==null?void 0:al.join(".")});fl.relatedWords=Ua,fl.usingType="parent",yl.unshift(fl),Ra.value=[...Ja,...yl],Ra.value=(Da=Ra.value)==null?void 0:Da.map(ul=>(sl!=null&&sl.find(al=>al===(ul==null?void 0:ul.prop))&&(ul.isFormColHidden=!0,ul.relatedWords=Ua),ul))}}}}},du=()=>{var v;const d=(v=s.value)==null?void 0:v.$el;d&&Ze.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:B=>{var ie;const{oldIndex:z,newIndex:F}=B;if(z===F)return;const N=Dn.value.splice(z,1)[0];Dn.value.splice(F,0,N),de.value=(ie=de.value)==null?void 0:ie.slice().sort((te,G)=>{if(te.label==="操作")return 1;if(G.label==="操作")return-1;const Ee=Dn.value.findIndex(je=>je.label===te.label),De=Dn.value.findIndex(je=>je.label===G.label);return Ee-De})}})};a.onMounted(()=>{ra.value=window.innerWidth-240*2,window.addEventListener("keydown",Zi)});const pu=()=>{a.nextTick(()=>{du()})},ot=(d,v)=>{var z;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let B;return d.children=(z=d.children)==null?void 0:z.map(F=>{var N,ie;if((F==null?void 0:F.id)===La.value){let te={};for(let G in F){let Ee=(N=v==null?void 0:v.find(De=>(De==null?void 0:De.prop)===G))==null?void 0:N.label;Ee?te[G]=(ie=ir.value)==null?void 0:ie[Ee]:te[G]=F[G]??""}F=Object.assign(te,ir.value),B=F}else{let te=ot(F,v);F=te==null?void 0:te.contents,B=te==null?void 0:te.currentSelectContents}return F}),{contents:d,currentSelectContents:B}},It=(d,v)=>{let B,z;return d!=null&&d.find(F=>(F==null?void 0:F.id)===La.value)?B=d==null?void 0:d.map(F=>{var N,ie,te;if((F==null?void 0:F.id)===La.value){let G={};for(let De in F){let je=(N=v==null?void 0:v.find(Pe=>(Pe==null?void 0:Pe.prop)===De))==null?void 0:N.label;je?G[De]=((ie=ir.value)==null?void 0:ie[je])??"":G[De]=F[De]??""}let Ee=ir.value;for(let De in G)(te=ir.value)!=null&&te[De]||(Ee[De]=(G==null?void 0:G[De])??"");F=Ee,z=F}return F}):B=d==null?void 0:d.map(F=>{var N,ie,te,G;if((F==null?void 0:F.id)===La.value){let Ee={};for(let De in F){let je=(N=v==null?void 0:v.find(Pe=>(Pe==null?void 0:Pe.prop)===De))==null?void 0:N.label;je?Ee[De]=(ie=ir.value)==null?void 0:ie[je]:Ee[De]=F[De]??""}F=Object.assign(Ee,ir.value),z=F}else F=(te=ot(F,v))==null?void 0:te.contents,z=(G=ot(F,v))==null?void 0:G.currentSelectContents;return F}),{newContents:B,currentSelectContents:z}},Ot=(d,v,B)=>{var z,F;return d[v==null?void 0:v.prop]=B,typeof d.id=="number"&&(d.id=(z=d.id)==null?void 0:z.toString()),d.children&&((F=d.children)==null?void 0:F.length)>0&&(d.children=d.children.map(Ot)),d},Lt=d=>{var B;const v=[];return v.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((B=d.children)==null||B.forEach(z=>{v.push(...Lt(z))})),(v==null?void 0:v.length)>0?v==null?void 0:v.map(z=>{const F={...z};return delete F.children,F}):[]},uo=["Pacific6000数据采集装置.通道号","通道号"],$i=d=>{if(!d)return"";const v=uo.map(B=>d==null?void 0:d[B]).find(B=>B!=null&&String(B).trim()!=="");return v==null?"":String(v).trim()},tt=async(d,v=void 0)=>{if(!d)return!1;try{const B=Ye=>{var ha,Fa,Ga;return Ye?typeof(Ye==null?void 0:Ye.value)=="string"?Ye.value:((Ga=(Fa=(ha=Ye==null?void 0:Ye._custom)==null?void 0:ha.value)==null?void 0:Fa.value)==null?void 0:Ga.value)||"":""},z=Array.isArray(nn.value)?nn.value:[],F=B(z.find(Ye=>(Ye==null?void 0:Ye.condition)==="child")),N=(Ue.value||"").replace(/\/+$/,""),ie=F?`${N}/${F}`:N,te=await Kr(ie||Ue.value,!1),G=String(fa.value||"").trim(),Ee=Ye=>String(Ye||"").trim(),De=(Ye,ha=[],Fa="")=>{if(!Array.isArray(Ye))return ha;for(const Ga of Ye){const sa=Ee((Ga==null?void 0:Ga.choiceName)||(Ga==null?void 0:Ga.name0)||Fa);(Ga==null?void 0:Ga.comp)==="Table"&&(!G||sa===G)&&ha.push(Ga),Array.isArray(Ga==null?void 0:Ga.children)&&De(Ga.children,ha,sa),Array.isArray(Ga==null?void 0:Ga.tab)&&De(Ga.tab,ha,sa),Array.isArray(Ga==null?void 0:Ga.choice)&&De(Ga.choice,ha,sa)}return ha},je=De(te||[]),Pe=String((u==null?void 0:u.compName)||"");return je.some(Ye=>{var Fa,Ga;const ha=((Ga=(Fa=Ye==null?void 0:Ye.compData)==null?void 0:Fa.find(sa=>(sa==null?void 0:sa.key)==="tableContents"))==null?void 0:Ga.contents)||[];return!Array.isArray(ha)||ha.length===0?!1:ha.some(sa=>{if(String((Ye==null?void 0:Ye.name)||"")===Pe&&(sa==null?void 0:sa.id)===v)return!1;const ba=$i(sa);return!!ba&&ba===d})})}catch{return(_e.value||[]).some(z=>{if((z==null?void 0:z.id)===v)return!1;const F=$i(z);return!!F&&F===d})}},Ri=async(d=!0,v,B)=>{var Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll,ba,qa,ve,Ca,ca,Ea,Da,A,X,$e,la,xe,ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl;if(ir.value){const Ua=(De=na.getColumnChild((Ee=O.cloneDeep(de.value))==null?void 0:Ee.filter(al=>(al==null?void 0:al.label)!=="操作")))==null?void 0:De.filter(al=>(al==null?void 0:al.required)===!0);for(let al=0;al<((Ua==null?void 0:Ua.length)??0);al++){const dl=Ua[al],_l=dl==null?void 0:dl.prop,Tl=(dl==null?void 0:dl.label)??_l,wr=(je=ir.value)==null?void 0:je[_l];if(wr===""||wr===null||wr===void 0||Array.isArray(wr)&&wr.length===0){Ya.ElMessage.error(`${Tl}不能为空`);return}}const ul=$i(ir.value);if(ul&&await tt(ul,La.value||void 0)){Ya.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let z=na.getColumnChild((Pe=O.cloneDeep(de.value))==null?void 0:Pe.filter(Ua=>(Ua==null?void 0:Ua.label)!=="操作")),F,N=O.cloneDeep(_e.value);if(!ir.value){U.value=!1;return}if(La.value===""){Je.value++;let Ua;Ua={id:Je.value.toString()};try{Ua.sort=Ln(0,_e.value||[])}catch{}Ua!=null&&Ua.children&&(Ua={...Ua,children:(Ye=Ua.children)==null?void 0:Ye.map(al=>Ot(al,v,B))});const ul=Object.assign(ir.value,Ua);N.unshift(ul),F=ul}else N=(ha=It(N,z))==null?void 0:ha.newContents,F=(Fa=It(N,z))==null?void 0:Fa.currentSelectContents;const ie=(Ga=u.itemData)==null?void 0:Ga.filter(Ua=>(Ua==null?void 0:Ua.key)==="childTree")[0];if(((sa=ie==null?void 0:ie.contents)==null?void 0:sa.length)>0){se.value="编辑";const Ua=[];N==null||N.forEach((dl,_l)=>{var wr;let Tl={};if(Array.isArray(dl)){let $l=[];dl==null||dl.filter(bl=>!(bl!=null&&bl.id)).forEach((bl,Al)=>{var Ql,Bl,Jl,or,Kl,hr,qr;if((Bl=(Ql=Mr.value)==null?void 0:Ql[Al])!=null&&Bl.prop&&!Array.isArray(bl)){let vr={};vr[Mr.value[Al].column]=bl,Oa!=null&&Oa.value&&((Jl=Oa==null?void 0:Oa.value)==null?void 0:Jl.length)>0&&((or=Oa==null?void 0:Oa.value)!=null&&or.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(vr)))&&($l=(Kl=Oa==null?void 0:Oa.value)==null?void 0:Kl.find(dr=>JSON.stringify(dr==null?void 0:dr[0])===JSON.stringify(vr))),$l&&$l.length>0?Tl[Mr.value[Al].prop]=$l!=null&&$l.find(dr=>{var pr;return((pr=Object.keys(dr))==null?void 0:pr[0])===Mr.value[Al].column})?(hr=$l==null?void 0:$l.find(dr=>{var pr;return((pr=Object.keys(dr))==null?void 0:pr[0])===Mr.value[Al].column}))==null?void 0:hr[Mr.value[Al].column]:bl:Tl[Mr.value[Al].prop]=bl}else Array.isArray(bl)&&((qr=Mr.value[Al])!=null&&qr.prop?Tl[Mr.value[Al].prop]=bl:Tl.children=bt(bl,Mr.value))})}else Tl=dl;if(Array.isArray(dl)&&dl.some($l=>$l==null?void 0:$l.id)){const $l=(wr=dl==null?void 0:dl.find(bl=>bl.id))==null?void 0:wr.id;Ua.push(Object.assign(Tl,{id:io($l)}))}else Tl.id?Ua.push(Tl):Ua.push(Object.assign(Tl,{id:_l.toString()}))});const ul=(_e.value||[]).map(dl=>String(dl==null?void 0:dl.id)),al=oo(Ua,ul);_e.value=Ft(al,ie,de.value)}Rt(_e.value),Yr.value=_e.value;const te=If(Yr.value,gn.value,N);let G=[];if(V.value?(G=(ll=O.cloneDeep(V).value.singleContent)==null?void 0:ll.filter(Ua=>(Ua==null?void 0:Ua.id)!==(F==null?void 0:F.id)),G.push(F)):G=[F],Ml.value){const Ua={content:te,singleContent:((ba=ie==null?void 0:ie.contents)==null?void 0:ba.length)>0?G==null?void 0:G.flatMap(Lt):G,index:u==null?void 0:u.index,buttonName:"编辑",column:de.value,parentTableId:u==null?void 0:u.parentTableId};He.setCacheUpdatingData(Ua)}if((qa=de.value)==null||qa.forEach(Ua=>{(Ua==null?void 0:Ua.formType)==="Upload"&&(F[Ua.prop]=F[Ua.prop]===""?"{}":typeof F[Ua.prop]!="string"?JSON.stringify(F[Ua.prop]):F[Ua.prop])}),d){(Ea=(ca=(Ca=(ve=u.itemData)==null?void 0:ve.find(al=>(al==null?void 0:al.key)==="filterAllType"))==null?void 0:Ca.value)==null?void 0:ca.find(al=>(al==null?void 0:al.value)==="onConditionContents"))==null||Ea.content;let Ua=(Da=u.itemData)==null?void 0:Da.filter(al=>(al==null?void 0:al.key)==="filterAllType");Ua=Array.from(new Map(Ua.filter(Boolean).map((al,dl)=>[al.value,{...al,_idx:dl}])).values()).sort((al,dl)=>al._idx-dl._idx).map(({_idx:al,...dl})=>dl),Ua=(A=Ua==null?void 0:Ua[(Ua==null?void 0:Ua.length)-1])==null?void 0:A.value;const ul={fixContent:[F],buttonName:se.value,relatedContents:u==null?void 0:u.related,columns:de.value,name:u==null?void 0:u.groupNames};He.setTableLoading(u==null?void 0:u.index),U.value=!1,ir.value=void 0,ze("change",ul)}if((la=($e=(X=Ra.value)==null?void 0:X[0])==null?void 0:$e.optionUrl)!=null&&la.menuId){U.value=!1;let Ua=(xe=u.itemData)==null?void 0:xe.filter(ul=>(ul==null?void 0:ul.key)==="filterAllType");if((Ua==null?void 0:Ua.length)>0){let ul=Ua==null?void 0:Ua.map(_l=>_l==null?void 0:_l.value),al=(sl=(Ta=(ta=ul.flat().find(_l=>{var Tl;return(Tl=_l==null?void 0:_l.content)==null?void 0:Tl.includes("@Num")}))==null?void 0:ta.content)==null?void 0:Ta.split(":"))==null?void 0:sl[1];((fl=(pl=(Qa=ul.flat().find(_l=>{var Tl;return(Tl=_l==null?void 0:_l.content)==null?void 0:Tl.includes("@Type:")}))==null?void 0:Qa.content)==null?void 0:pl.split(":"))==null?void 0:fl[1])!=="Manual"&&(al=parseInt(al),_e.value=(yl=_e.value)==null?void 0:yl.slice(((Pl=_e.value)==null?void 0:Pl.length)-al,(Ja=_e.value)==null?void 0:Ja.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Zi),de.value=[],_e.value=[],ue.value=[],ua.value=[],oa.value=[],_a.value=[],Pa.value=[],ma.value=[],Ra.value=[],ur.value=[],s.value=null,Mn.value=""});const po=async(d,v,B)=>{var Ye,ha,Fa,Ga,sa,ll,ba,qa,ve,Ca,ca,Ea,Da;jl.value=(B==null?void 0:B.prop)??(B==null?void 0:B.property);const z=O.cloneDeep(u.itemData),F=((Ye=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="header"))==null?void 0:Ye.contents)??[];let N=F==null?void 0:F.find((A,X)=>{var $e,la,xe;return(A==null?void 0:A.prop)===jl.value||(A==null?void 0:A.label)===jl.value||(X==null?void 0:X.toString())===((xe=(la=($e=jl.value)==null?void 0:$e.split("a"))==null?void 0:la[1])==null?void 0:xe.toString())});const ie=na.getColumnChild((ha=O.cloneDeep(de.value))==null?void 0:ha.filter(A=>(A==null?void 0:A.label)!=="操作"));if(N||(N=ie==null?void 0:ie.find(A=>(A==null?void 0:A.prop)===jl.value||(A==null?void 0:A.label)===jl.value)),N&&!((Fa=N==null?void 0:N.menus)!=null&&Fa.length)&&!((Ga=N==null?void 0:N.groups)!=null&&Ga.length)&&!((sa=N==null?void 0:N.words)!=null&&sa.length)){const A=(ll=Ra.value)==null?void 0:ll.find(X=>(X==null?void 0:X.prop)===jl.value);A&&(N={...N,menus:(A==null?void 0:A.menus)??(N==null?void 0:N.menus),groups:(A==null?void 0:A.groups)??(N==null?void 0:N.groups),words:(A==null?void 0:A.words)??(N==null?void 0:N.words),bindMenus:(A==null?void 0:A.bindMenus)??(N==null?void 0:N.bindMenus),isMainPath:(A==null?void 0:A.isMainPath)??(N==null?void 0:N.isMainPath),relatedContents:(A==null?void 0:A.relatedContents)??(N==null?void 0:N.relatedContents),endChildMenu:(A==null?void 0:A.endChildMenu)??(N==null?void 0:N.endChildMenu)})}if(N&&((ba=Ra==null?void 0:Ra.value)==null||ba.forEach(A=>{var X,$e,la,xe,ta;(A==null?void 0:A.prop)===(N==null?void 0:N.prop)&&(A!=null&&A.endChildMenu)&&((X=N==null?void 0:N.prop)!=null&&X.includes(".")&&((la=($e=N==null?void 0:N.prop)==null?void 0:$e.split("."))==null?void 0:la[0])!==((ta=(xe=A==null?void 0:A.prop)==null?void 0:xe.split("."))==null?void 0:ta[0])?N.endChildMenu=A==null?void 0:A.value:N.endChildMenu=A==null?void 0:A.endChildMenu)})),!N)return;const te=jl.value,G=(qa=_e.value)==null?void 0:qa.findIndex(A=>(A==null?void 0:A.id)===(v==null?void 0:v.id));G!==-1&&te&&(_e.value[G]={..._e.value[G],[te]:d});const Ee=A=>{Array.isArray(A)&&A.forEach(X=>{Array.isArray(X==null?void 0:X.allSelectionContents)&&X.allSelectionContents.length>0&&(X.contactValue=_e.value[G]??v),Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&Ee(X.children)})};Ee(de.value),N.value=d,N.endChildMenu=N.endChildMenu||"";let De=N!=null&&N.isMainPath&&(N!=null&&N.mainKey)?N==null?void 0:N.value:"";const je=A=>{Array.isArray(A)&&A.forEach(X=>{var la,xe;if(((X==null?void 0:X.type)==="Select"||(X==null?void 0:X.formType)&&X.formType.toUpperCase()==="SELECT"||(X==null?void 0:X.columnType)&&X.columnType.toUpperCase()==="SELECT")&&Array.isArray(X==null?void 0:X.menus)&&X.menus.length>0&&X.menus[X.menus.length-1]===""&&(N!=null&&N.isMainPath)&&(N!=null&&N.mainKey)){const ta=(la=X==null?void 0:X.prop)!=null&&la.includes(".")?X.prop.split(".")[0]:null,Ta=(xe=N==null?void 0:N.prop)!=null&&xe.includes(".")?N.prop.split(".")[0]:null;(!ta||!Ta||ta===Ta)&&(X.endChildMenu=De)}Array.isArray(X==null?void 0:X.children)&&X.children.length>0&&je(X.children)})};if(je(de.value),!!(N!=null&&N.mainKey)&&Array.isArray(N==null?void 0:N.menus)&&(N==null?void 0:N.menus.length)>0&&(N!=null&&N.value)&&(N==null?void 0:N.value)!==""){let A=N!=null&&N.relatedContents&&((ve=N==null?void 0:N.relatedContents)==null?void 0:ve.length)>0?(Ca=N==null?void 0:N.relatedContents)==null?void 0:Ca.find(X=>{var $e,la,xe,ta;return(X==null?void 0:X[(ta=($e=N==null?void 0:N.prop)==null?void 0:$e.split("."))==null?void 0:ta[((xe=(la=N==null?void 0:N.prop)==null?void 0:la.split("."))==null?void 0:xe.length)-1]])===(N==null?void 0:N.value)}):await ds(N);if(A){const X={...v};ie==null||ie.forEach($e=>{var la,xe,ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul,al,dl,_l;($e==null?void 0:$e.prop)!==(N==null?void 0:N.prop)&&(N!=null&&N.relatedContents&&((la=N==null?void 0:N.relatedContents)==null?void 0:la.length)>0?(xe=$e==null?void 0:$e.prop)!=null&&xe.includes(".")&&((Ta=(ta=$e==null?void 0:$e.prop)==null?void 0:ta.split("."))==null?void 0:Ta[0])===((Qa=(sl=N==null?void 0:N.prop)==null?void 0:sl.split("."))==null?void 0:Qa[0])?X[$e.prop]=A[(Ja=(pl=$e==null?void 0:$e.prop)==null?void 0:pl.split("."))==null?void 0:Ja[((Pl=(fl=$e==null?void 0:$e.prop)==null?void 0:fl.split("."))==null?void 0:Pl.length)-1]]??X[$e.prop]:X[$e.prop]=(A==null?void 0:A[$e.prop])??X[$e.prop]:Ze.same((N==null?void 0:N.menus)??[],($e==null?void 0:$e.menus)??[])&&Ze.same((N==null?void 0:N.groups)??[],($e==null?void 0:$e.groups)??[])&&!Ze.same((N==null?void 0:N.words)??[],($e==null?void 0:$e.words)??[])?(yl=$e==null?void 0:$e.prop)!=null&&yl.includes(".")&&((ul=(Ua=$e==null?void 0:$e.prop)==null?void 0:Ua.split("."))==null?void 0:ul[0])!==((dl=(al=N==null?void 0:N.prop)==null?void 0:al.split("."))==null?void 0:dl[0])||(X[$e.prop]=(A==null?void 0:A[(_l=$e==null?void 0:$e.words)==null?void 0:_l.join(".")])??(A==null?void 0:A[$e.prop])??X[$e.prop]):(!($e!=null&&$e.isMainPath)&&Ze.same((N==null?void 0:N.bindMenus)??[],($e==null?void 0:$e.bindMenus)??[]),X[$e.prop]=(A==null?void 0:A[$e.prop])??X[$e.prop]))}),_e.value=(ca=O.cloneDeep(_e.value))==null?void 0:ca.map($e=>($e==null?void 0:$e.id)===(v==null?void 0:v.id)?{...X,id:$e==null?void 0:$e.id}:$e)}}if((Ea=N==null?void 0:N.optionUrl)!=null&&Ea.menuSelect){let A="";ie==null||ie.forEach(la=>{var xe,ta,Ta,sl,Qa;A===""&&((Ta=(ta=(xe=la==null?void 0:la.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:ta[1])!=null&&Ta.includes("["))&&(A=(Qa=(sl=la==null?void 0:la.optionUrl)==null?void 0:sl.groupSelect)==null?void 0:Qa[1])});let X=await kt(N),$e;if(X==null||X.forEach(la=>{var xe,ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl;A===((ta=(xe=N==null?void 0:N.optionUrl)==null?void 0:xe.groupSelect)==null?void 0:ta[1])&&((Qa=(sl=(Ta=N==null?void 0:N.optionUrl)==null?void 0:Ta.groupSelect)==null?void 0:sl[1])!=null&&Qa.includes("["))&&((yl=O.cloneDeep(la))==null?void 0:yl[(Ja=(Pl=(fl=(pl=N==null?void 0:N.optionUrl)==null?void 0:pl.groupSelect)==null?void 0:fl[1])==null?void 0:Pl.replaceAll("[",""))==null?void 0:Ja.replaceAll("]","")])===(N==null?void 0:N.value)&&($e=la)}),$e){const la={...v};ie==null||ie.forEach(xe=>{var ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul;($e!=null&&$e[xe==null?void 0:xe.label]||$e!=null&&$e[(Qa=(sl=(Ta=(ta=xe==null?void 0:xe.optionUrl)==null?void 0:ta.groupSelect)==null?void 0:Ta[1])==null?void 0:sl.replaceAll("[",""))==null?void 0:Qa.replaceAll("]","")])&&((Pl=(fl=(pl=xe==null?void 0:xe.optionUrl)==null?void 0:pl.groupSelect)==null?void 0:fl[1])!=null&&Pl.includes("["))&&(la[xe.prop]=($e==null?void 0:$e[xe==null?void 0:xe.label])||($e==null?void 0:$e[(ul=(Ua=(yl=(Ja=xe==null?void 0:xe.optionUrl)==null?void 0:Ja.groupSelect)==null?void 0:yl[1])==null?void 0:Ua.replaceAll("[",""))==null?void 0:ul.replaceAll("]","")]))}),_e.value=(Da=O.cloneDeep(_e.value))==null?void 0:Da.map(xe=>(xe==null?void 0:xe.id)===(v==null?void 0:v.id)?{...la,id:xe==null?void 0:xe.id}:xe)}}},fu=async d=>{var Ye,ha,Fa,Ga,sa,ll,ba,qa,ve,Ca,ca,Ea,Da,A;if(!d)return;const v=O.cloneDeep(ir.value||{});ir.value=d;const B=$i(v),z=$i(ir.value);if(z&&z!==B&&await tt(z,La.value||void 0)){Ya.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),uo.forEach($e=>{if(Object.prototype.hasOwnProperty.call(ir.value||{},$e)||Object.prototype.hasOwnProperty.call(v||{},$e)){const la=(v==null?void 0:v[$e])??"";ir.value[$e]=la,d[$e]=la}}),Ra.value=(Ra.value||[]).map($e=>{if(!($e!=null&&$e.prop)||!uo.includes($e.prop))return $e;const la=(v==null?void 0:v[$e.prop])??"";return{...$e,value:la,selectValue:la===""?[]:[la]}});return}let F=O.cloneDeep(u.itemData);F==null||F.map(X=>{var $e,la,xe,ta;return(X==null?void 0:X.key)==="header"&&(Array.isArray(($e=X.contents)==null?void 0:$e[0])?X.contents=(xe=na.getColumnChild((la=X.contents)==null?void 0:la[0]))==null?void 0:xe.map((Ta,sl)=>{var Qa,pl,fl,Pl,Ja,yl;return((fl=(pl=(Qa=Ra.value)==null?void 0:Qa.find(Ua=>(Ua==null?void 0:Ua.prop)===(Ta==null?void 0:Ta.prop)))==null?void 0:pl.optionUrl)==null?void 0:fl.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[sl])?Ta.value=[(Ja=Object.values(d))==null?void 0:Ja[sl]]:Ta.value=(yl=Object.values(d))==null?void 0:yl[sl],Ta}):X.contents=(ta=X.contents)==null?void 0:ta.map((Ta,sl)=>{var Qa,pl,fl,Pl,Ja,yl;return((fl=(pl=(Qa=Ra.value)==null?void 0:Qa.find(Ua=>(Ua==null?void 0:Ua.prop)===(Ta==null?void 0:Ta.prop)))==null?void 0:pl.optionUrl)==null?void 0:fl.multiple)===!0&&!Array.isArray((Pl=Object.values(d))==null?void 0:Pl[sl])?Ta.value=[(Ja=Object.values(d))==null?void 0:Ja[sl]]:Ta.value=(yl=Object.values(d))==null?void 0:yl[sl],Ta})),X});let N=Ra.value,ie=(Ye=F==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Ye.contents;if(jl.value||(N=N==null?void 0:N.map(X=>{var $e;return X.value=X.value??(($e=ie==null?void 0:ie.find((la,xe)=>(la==null?void 0:la.prop)===(X==null?void 0:X.name)))==null?void 0:$e.value),X})),!Vr.value)return;let te=O.cloneDeep(jl.value);(ha=jl.value)!=null&&ha.includes("·")&&(jl.value=(Ga=(Fa=jl.value)==null?void 0:Fa.split("·"))==null?void 0:Ga[0]);let G=(ll=(sa=F==null?void 0:F.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:sa.contents)==null?void 0:ll.find((X,$e)=>(X==null?void 0:X.prop)===jl.value);(ba=Ra==null?void 0:Ra.value)==null||ba.forEach(X=>{var $e,la,xe,ta,Ta,sl,Qa,pl,fl;(X==null?void 0:X.prop)===(G==null?void 0:G.prop)&&(X!=null&&X.endChildMenu)&&(($e=G==null?void 0:G.prop)!=null&&$e.includes(".")&&((xe=(la=G==null?void 0:G.prop)==null?void 0:la.split("."))==null?void 0:xe[0])!==((Ta=(ta=X==null?void 0:X.prop)==null?void 0:ta.split("."))==null?void 0:Ta[0])?G.endChildMenu=(Qa=(sl=X==null?void 0:X.value)==null?void 0:sl.split(" "))==null?void 0:Qa[0]:G.endChildMenu=(fl=(pl=X==null?void 0:X.endChildMenu)==null?void 0:pl.split(" "))==null?void 0:fl[0])});let Ee=G!=null&&G.isMainPath&&(G!=null&&G.mainKey)?G==null?void 0:G.value:"",De=N,je=he.value;if(je!=null&&je.find(X=>(G==null?void 0:G.prop)===(X==null?void 0:X.key))&&(je=je==null?void 0:je.filter(X=>(G==null?void 0:G.prop)!==(X==null?void 0:X.key))),je!=null&&je.find(X=>te===(X==null?void 0:X.key))&&(je=je==null?void 0:je.filter(X=>te!==(X==null?void 0:X.key))),(G==null?void 0:G.formType)==="Select"?De=De==null?void 0:De.map(X=>{var $e,la,xe,ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul,al,dl;return(X==null?void 0:X.type)==="Select"&&((($e=X==null?void 0:X.allSelectionContents)==null?void 0:$e.length)>0&&(X.contactValue=d),((G==null?void 0:G.prop)===(X==null?void 0:X.prop)||te===(X==null?void 0:X.prop))&&G&&(Array.isArray(G.value)&&((la=G.value)==null?void 0:la.length)>0&&((xe=G.value)!=null&&xe.every(_l=>typeof _l=="string"))?(je.push({key:X==null?void 0:X.prop,value:[(Ta=G.value)==null?void 0:Ta[((ta=G.value)==null?void 0:ta.length)-1]]}),X.selectValue=(sl=je==null?void 0:je.find(_l=>(_l==null?void 0:_l.key)===(X==null?void 0:X.prop)))==null?void 0:sl.value):Array.isArray(G.value)&&((Qa=G.value)==null?void 0:Qa.length)===0?(je=[],X.selectValue=[],d[X==null?void 0:X.prop]=""):Array.isArray(X.value)&&je.push({key:X==null?void 0:X.prop,value:[(pl=X.value)==null?void 0:pl[(X==null?void 0:X.length)-1]]})),((Pl=X==null?void 0:X.menus)==null?void 0:Pl[((fl=X==null?void 0:X.menus)==null?void 0:fl.length)-1])===""&&(G!=null&&G.isMainPath)&&(G!=null&&G.mainKey)&&((Ja=X==null?void 0:X.prop)!=null&&Ja.includes(".")&&((Ua=(yl=X==null?void 0:X.prop)==null?void 0:yl.split("."))==null?void 0:Ua[0])!==((al=(ul=G==null?void 0:G.prop)==null?void 0:ul.split("."))==null?void 0:al[0])||(X.endChildMenu=(dl=Ee==null?void 0:Ee.split(" "))==null?void 0:dl[0]))),X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X}):(G==null?void 0:G.formType)!=="Input"&&(De=De==null?void 0:De.map(X=>(X.value=(d==null?void 0:d[X==null?void 0:X.prop])??(X==null?void 0:X.value),X))),he.value=je,De!=null&&De.some(X=>(X==null?void 0:X.functionName)&&(X==null?void 0:X.functionName)!=="")){let X=await gt([d],de==null?void 0:de.value,"Auto",_e.value),$e=[];(qa=De==null?void 0:De.filter(xe=>(xe==null?void 0:xe.functionName)&&(xe==null?void 0:xe.functionName)!==""))==null||qa.forEach(xe=>{var ta;((ta=xe==null?void 0:xe.functionRelatedWords)==null?void 0:ta.length)>0&&($e=[...$e,...xe==null?void 0:xe.functionRelatedWords])}),$e=$e==null?void 0:$e.filter(xe=>(xe==null?void 0:xe[0])!=="@");let la=[];for(let xe in X==null?void 0:X[0])$e!=null&&$e.find(ta=>xe===ta||(xe==null?void 0:xe.includes("."+ta)))&&la.push(((ve=X==null?void 0:X[0])==null?void 0:ve[xe])!=="");(X==null?void 0:X.length)>0&&la.every(xe=>xe)&&(De=De==null?void 0:De.map(xe=>{var ta;return xe.value=((ta=X==null?void 0:X[0])==null?void 0:ta[xe==null?void 0:xe.prop])??xe.value,xe})),ir.value=X==null?void 0:X[0]}if(Ra.value=De,G=Object.assign({},G??{},{relatedWords:(ca=(Ca=Ra==null?void 0:Ra.value)==null?void 0:Ca.find(X=>(X==null?void 0:X.prop)===(G==null?void 0:G.prop)))==null?void 0:ca.relatedWords}),(G==null?void 0:G.mainKey)&&(G!=null&&G.value)&&(G==null?void 0:G.value)!==""){let X=G!=null&&G.relatedContents&&((Ea=G==null?void 0:G.relatedContents)==null?void 0:Ea.length)>0?(Da=G==null?void 0:G.relatedContents)==null?void 0:Da.find($e=>{var la,xe,ta,Ta;return($e==null?void 0:$e[(Ta=(la=G==null?void 0:G.prop)==null?void 0:la.split("."))==null?void 0:Ta[((ta=(xe=G==null?void 0:G.prop)==null?void 0:xe.split("."))==null?void 0:ta.length)-1]])===(G==null?void 0:G.value)}):await ds(G);if(X&&JSON.stringify(X)!=="{}"){let $e=De;$e=$e==null?void 0:$e.map(xe=>{var ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul,al,dl,_l,Tl,wr,$l,bl,Al,Ql,Bl;if((G==null?void 0:G.prop)===(xe==null?void 0:xe.prop))xe.value=(X==null?void 0:X[(ta=xe==null?void 0:xe.words)==null?void 0:ta.join(".")])??(X==null?void 0:X[xe==null?void 0:xe.prop])??X[(pl=(Ta=xe==null?void 0:xe.prop)==null?void 0:Ta.split("."))==null?void 0:pl[((Qa=(sl=xe==null?void 0:xe.prop)==null?void 0:sl.split("."))==null?void 0:Qa.length)-1]];else if(G!=null&&G.relatedContents&&((fl=G==null?void 0:G.relatedContents)==null?void 0:fl.length)>0)xe.value=(Pl=xe==null?void 0:xe.prop)!=null&&Pl.includes(".")&&((yl=(Ja=xe==null?void 0:xe.prop)==null?void 0:Ja.split("."))==null?void 0:yl[0])===((ul=(Ua=G==null?void 0:G.prop)==null?void 0:Ua.split("."))==null?void 0:ul[0])?X[(Tl=(al=xe==null?void 0:xe.prop)==null?void 0:al.split("."))==null?void 0:Tl[((_l=(dl=xe==null?void 0:xe.prop)==null?void 0:dl.split("."))==null?void 0:_l.length)-1]]:(X==null?void 0:X[xe==null?void 0:xe.prop])??(xe==null?void 0:xe.value);else if(Ze.same((G==null?void 0:G.menus)??[],(xe==null?void 0:xe.menus)??[])&&Ze.same((G==null?void 0:G.groups)??[],(xe==null?void 0:xe.groups)??[])&&!Ze.same((G==null?void 0:G.words)??[],(xe==null?void 0:xe.words)??[]))if((wr=xe==null?void 0:xe.prop)!=null&&wr.includes(".")&&((bl=($l=xe==null?void 0:xe.prop)==null?void 0:$l.split("."))==null?void 0:bl[0])!==((Ql=(Al=G==null?void 0:G.prop)==null?void 0:Al.split("."))==null?void 0:Ql[0])){let Jl=Object.keys(X);Jl=Jl==null?void 0:Jl.find(or=>{var Kl;return or==null?void 0:or.includes("."+((Kl=xe==null?void 0:xe.words)==null?void 0:Kl.join(".")))}),xe.value=(X==null?void 0:X[Jl])??(X==null?void 0:X[xe==null?void 0:xe.prop])??xe.value}else{let Jl=Object.keys(X);Jl=Jl==null?void 0:Jl.find(or=>{var Kl;return or==null?void 0:or.includes("."+((Kl=xe==null?void 0:xe.words)==null?void 0:Kl.join(".")))}),xe.value=(X==null?void 0:X[(Bl=xe==null?void 0:xe.words)==null?void 0:Bl.join(".")])??(X==null?void 0:X[Jl])??(X==null?void 0:X[xe==null?void 0:xe.prop])??xe.value}else!(xe!=null&&xe.isMainPath)&&Ze.same((G==null?void 0:G.bindMenus)??[],(xe==null?void 0:xe.bindMenus)??[]),xe.value=(X==null?void 0:X[xe==null?void 0:xe.prop])??xe.value;return xe}),Ra.value=$e;let la={};(A=Ra.value)==null||A.forEach(xe=>{la[xe.prop]=xe==null?void 0:xe.value}),ir.value=la}}Vr.value=!0,K.value=!1},hu=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",vu=d=>{var N,ie;const v=(ie=(N=oa.value)==null?void 0:N.find(te=>(te==null?void 0:te.label)===(d==null?void 0:d.label)))==null?void 0:ie.multiple,B=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;_e.value.forEach(te=>{const G=te==null?void 0:te[B];v&&Do.isString(G)&&(te[B]=[G]),!v&&!Do.isString(G)&&(te[B]="")})},$t=(d,v)=>{var B;return v==null||v.forEach(z=>{d[z==null?void 0:z.prop]=z==null?void 0:z.value}),d.children&&((B=d.children)==null?void 0:B.length)>0&&(d.children=d.children.map(z=>$t(z,v))),d},st=d=>{var B,z,F,N,ie,te;Li("");const v=(B=Ra.value)==null?void 0:B.reduce((G,Ee)=>(G[Ee.name]=Ee.value,G),{});if(((z=Object.keys(v))==null?void 0:z.length)>0){ir.value=v,La.value="",Je.value=(F=_e.value)==null?void 0:F.length,ma.value=(N=Oe.value)==null?void 0:N.filter(Ee=>(Ee==null?void 0:Ee.label)!=="新增");const G=(te=(ie=ue.value)==null?void 0:ie.filter(Ee=>(Ee==null?void 0:Ee.label)!=="操作"))==null?void 0:te.map(Ee=>{var je,Pe,Ye;const De=(Pe=(je=oa.value)==null?void 0:je.find(ha=>(ha==null?void 0:ha.label)===(Ee==null?void 0:Ee.label)))==null?void 0:Pe.multiple;return vu(Ee),{...Ee,contents:(Ee==null?void 0:Ee.options)??[],optionUrl:Ee!=null&&Ee.formMenuSelect&&((Ye=Ee==null?void 0:Ee.formMenuSelect)==null?void 0:Ye.length)>0?{groupSelect:Ee==null?void 0:Ee.groupSelect,menuSelect:Ee==null?void 0:Ee.formMenuSelect,selectRelateType:"",type:Ee==null?void 0:Ee.formType,multiple:De}:null}});de.value=G==null?void 0:G.map(Ee=>$t(Ee,[{prop:"type",value:"edit"},{prop:"columnType",value:hu(Ee==null?void 0:Ee.formType)||(Ee==null?void 0:Ee.columnType)}])),d==="createClick"&&(se.value="新增",Ri(!0))}},mi={START:"开始时间",END:"结束时间",HOURS:"工时"},mu=(d,v)=>Number(Pn.dayjs(v).diff(Pn.dayjs(d),"day",!0).toFixed(1)),Rt=d=>{var N;const v=u.itemData,B=(N=v==null?void 0:v.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:N.contents,z=new Map;return B==null||B.forEach((ie,te)=>{const{label:G}=ie;z.set(G,te)}),!z.has(mi.START)||!z.has(mi.END)||!z.has(mi.HOURS)?d:d==null?void 0:d.map(ie=>{const te=ie==null?void 0:ie[mi.START],G=ie==null?void 0:ie[mi.END],Ee=mu(te,G);return te&&G&&(ie[mi.HOURS]=`${Ee}天`),ie})},Vt=(d,v,B=0)=>{if(B>((v==null?void 0:v.length)??""))return d;const z=v==null?void 0:v[B],F=new Map;for(const ie of d){const te=ie[z];F.has(te)||F.set(te,[]),F.get(te)&&F.get(te).push(ie)}const N=[];for(const[ie,te]of F){const[G,...Ee]=te,De={...G};B+1===((v==null?void 0:v.length)??"")?De.children=te==null?void 0:te.map(je=>(je.level=O.cloneDeep(B)+1,je)).filter((je,Pe)=>Pe!==0):Ee.length>0&&(De.children=Vt(Ee,v,B+1)),De.level=B,N.push(De)}return N},Ft=(d,v,B)=>{var F;if(!(v!=null&&v.contents)||((F=v==null?void 0:v.contents)==null?void 0:F.length)===0)return d;let z=[];return z=Vt(d,v==null?void 0:v.contents,0),z},Pt=async(d,v)=>{var Ga,sa,ll,ba,qa,ve,Ca,ca,Ea,Da,A,X,$e,la,xe,ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul,al,dl,_l,Tl,wr,$l,bl,Al,Ql,Bl,Jl,or,Kl,hr,qr,vr,dr,pr,Ht,Ut,qt;const B=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 z=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="childTree")[0];let F=!0;if((ll=(sa=(Ga=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="filterAllType"))==null?void 0:Ga.value)==null?void 0:sa.find(da=>(da==null?void 0:da.value)==="onPamButtonContents"))!=null&&ll.content){let da=(ve=(qa=(ba=d==null?void 0:d.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:ba.value)==null?void 0:qa.find(Sl=>(Sl==null?void 0:Sl.value)==="onPamButtonContents"))==null?void 0:ve.content;da=(Ca=da==null?void 0:da.split(":"))==null?void 0:Ca[1],da=(ca=da.slice(1,(da==null?void 0:da.length)-1))==null?void 0:ca.split(","),F=!!(da!=null&&da.find(Sl=>Sl==="操作"))}const N=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="page"),ie=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="rowButton"),te=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="extraButton"),G=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="tableContents"),Ee=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="bottomButton"),De=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="tableIndex");oa.value=(Da=(Ea=d==null?void 0:d.filter(da=>(da==null?void 0:da.key)==="tableToForm"))==null?void 0:Ea[0])==null?void 0:Da.contents,ia.value=(N==null?void 0:N.contents)??!0;let je=[];ar.value===""?je=B==null?void 0:B[0]:je=(B==null?void 0:B.find(da=>(da==null?void 0:da.selectLabel)==="("+ar.value+")"))??(B==null?void 0:B.find(da=>!(da!=null&&da.selectLabel)));let Pe=[];ar.value===""?Pe=De==null?void 0:De[0]:Pe=(De==null?void 0:De.find(da=>(da==null?void 0:da.selectLabel)==="("+ar.value+")"))??(De==null?void 0:De.find(da=>!(da!=null&&da.selectLabel)));let Ye=[],ha=[];if(((A=je==null?void 0:je.contents)==null?void 0:A.length)>0){let da=[],Sl=je==null?void 0:je.contents;if(Array.isArray(Sl==null?void 0:Sl[0])&&((X=Sl==null?void 0:Sl[0])!=null&&X.every(rl=>!(rl!=null&&rl.children)))&&(Sl=Sl==null?void 0:Sl[0]),Sl.some(rl=>Array.isArray(rl)&&(rl==null?void 0:rl.find(Ge=>Ge.children))))da=($e=na.getGradeColumns(Sl,F))==null?void 0:$e[0],da!=null&&da.find(rl=>(rl==null?void 0:rl.label)==="操作")||da.push({label:"操作",prop:"operate",type:"operate"});else{let rl=Sl.some(Ge=>Array.isArray(Ge))?Sl==null?void 0:Sl[0]:Sl;rl!=null&&rl.find(Ge=>(Ge==null?void 0:Ge.label)==="操作")||rl.push({label:"操作",prop:"operate",type:"operate"}),rl==null||rl.forEach((Ge,nr)=>{var Or,Br,Lr,Cr,ii,bi,ki,br,kn,Gn,xi,ln,Yn,Yt,Jt,Xt,Zt,Qt,es,as;if((Br=(Or=Ue.value)==null?void 0:Or.split("/"))==null||Br.forEach(tr=>{var mr,Bn,ls;tr!==""&&((ls=(Bn=(mr=tr==null?void 0:tr.split(k+"updateLoading"))==null?void 0:mr[0])==null?void 0:Bn.split(k+"loading"))==null||ls[0])}),Ge!=null&&Ge.methodContent){let tr=(ii=(Cr=(Lr=Ge==null?void 0:Ge.methodContent)==null?void 0:Lr.replace("@","%%#"))==null?void 0:Cr.split("%%#"))==null?void 0:ii[1];if(tr=tr==null?void 0:tr.slice(0,(tr==null?void 0:tr.length)-1),tr=na.contentTransArrayToAllNoExtra(tr??"",","),(bi=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&bi.includes("Prop")&&((ki=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&ki.includes("Manual"))){let mr=(kn=(br=tr==null?void 0:tr.find(Bn=>Bn==null?void 0:Bn.includes("@Button")))==null?void 0:br.split(":"))==null?void 0:kn[1];mr=((ln=(xi=(Gn=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Gn.replaceAll("]",""))==null?void 0:xi.split(","))==null?void 0:ln[1])??"算法执行",Ye.push(mr)}else if((Yn=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("@Button")))!=null&&Yn.includes("Row")&&((Yt=tr==null?void 0:tr.find(mr=>mr==null?void 0:mr.includes("Type")))!=null&&Yt.includes("Manual"))){let mr=(Xt=(Jt=tr==null?void 0:tr.find(Bn=>Bn==null?void 0:Bn.includes("@Button")))==null?void 0:Jt.split(":"))==null?void 0:Xt[1];mr=((es=(Qt=(Zt=mr==null?void 0:mr.replaceAll("[",""))==null?void 0:Zt.replaceAll("]",""))==null?void 0:Qt.split(","))==null?void 0:es[1])??"算法执行",ha.push(mr)}}(as=oa.value)==null||as.find(tr=>(tr==null?void 0:tr.prop)===(Ge==null?void 0:Ge.prop)),da.push({label:(Ge==null?void 0:Ge.label)==="操作"?F?"操作":"":(Ge==null?void 0:Ge.label)??"",prop:(Ge==null?void 0:Ge.label)==="操作"?"operate":(Ge==null?void 0:Ge.prop)??"a"+nr,width:Ge!=null&&Ge.width?parseInt(Ge.width):"",fixed:(Ge==null?void 0:Ge.fixed)??void 0,sortable:(Ge==null?void 0:Ge.sortable)??!1,filterable:(Ge==null?void 0:Ge.filterable)??!1,operable:(Ge==null?void 0:Ge.operable)??!1,showSummary:(Ge==null?void 0:Ge.showSummary)??!1,align:(Ge==null?void 0:Ge.align)??"left",showOverflowTooltip:(Ge==null?void 0:Ge.showOverflowTooltip)??!0,isNotDrag:(Ge==null?void 0:Ge.isNotDrag)??!1,isEditCol:(Ge==null?void 0:Ge.isEditCol)??!1,isOperate:(Ge==null?void 0:Ge.isOperate)??!1,id:(Ge==null?void 0:Ge.id)??nr,type:(Ge==null?void 0:Ge.label)==="操作"?"operate":void 0,formType:(Ge==null?void 0:Ge.formType)??(Ge!=null&&Ge.groupSelect?"Select":""),disabled:Ge==null?void 0:Ge.disabled,options:(Ge==null?void 0:Ge.options)??[],value:(Ge==null?void 0:Ge.value)??"",isExistChild:(Ge==null?void 0:Ge.isExistChild)??!1,mainKey:(Ge==null?void 0:Ge.mainKey)??nr===0,allSelectionContents:(Ge==null?void 0:Ge.allContents)??[],filterContent:Ge==null?void 0:Ge.filterContents,menus:Ge==null?void 0:Ge.menus,groups:Ge==null?void 0:Ge.groups,words:Ge==null?void 0:Ge.words,filter:Ge==null?void 0:Ge.filter,bindMenus:Ge==null?void 0:Ge.bindMenus,fatherPath:Ge==null?void 0:Ge.fatherPath,isMainPath:Ge==null?void 0:Ge.isMainPath,required:(Ge==null?void 0:Ge.required)??!1,relatedContents:Ge==null?void 0:Ge.relatedContents,functionName:Ge==null?void 0:Ge.functionName,functionRelatedWords:Ge==null?void 0:Ge.functionRelatedWords,calculatorFilter:Ge==null?void 0:Ge.calculatorFilter,relatedPages:Ge==null?void 0:Ge.relatedPages,multiple:(Ge==null?void 0:Ge.multiple)??!1})})}M.value=(la=Ee==null?void 0:Ee[0])==null?void 0:la.contents;const sn=na.getNewColumnChild(da),Wt=rl=>Array.isArray(rl)?rl.map(Ge=>(Array.isArray(Ge==null?void 0:Ge.children)&&Ge.children.length>0?(Ge.sortable=!1,Wt(Ge.children)):(Ge==null?void 0:Ge.prop)==="operate"||(Ge==null?void 0:Ge.label)==="操作"||(Ge==null?void 0:Ge.type)==="operate"||(Ge.sortable=!1),Ge)):rl;Wt(sn),await Ko(sn),l0(Z.value,sn),de.value=sn,ua.value=sn,n.value=(xe=de.value)==null?void 0:xe.map(rl=>rl==null?void 0:rl.label);let cn=(Ta=(ta=na.getAllLeafNodes(de.value))==null?void 0:ta.filter(rl=>(rl==null?void 0:rl.type)!=="operate"))==null?void 0:Ta.map((rl,Ge)=>({prop:(rl==null?void 0:rl.prop)??"a"+Ge,column:rl.label}));Mr.value=cn;let an=[];ar.value===""?an=G==null?void 0:G[0]:an=(G==null?void 0:G.find(rl=>(rl==null?void 0:rl.selectLabel)==="("+ar.value+")"))??(G==null?void 0:G.find(rl=>!(rl!=null&&rl.selectLabel)));let ni=Array.isArray((sl=an==null?void 0:an.contents)==null?void 0:sl[0])&&((Qa=an==null?void 0:an.contents)!=null&&Qa[0].every(rl=>Array.isArray(rl)))?(pl=an==null?void 0:an.contents)==null?void 0:pl[0]:an==null?void 0:an.contents;Pe!=null&&Pe.contents&&((fl=Pe==null?void 0:Pe.contents)==null?void 0:fl.length)!==0&&(ni=(Pl=O.cloneDeep(ni))==null?void 0:Pl.map((rl,Ge)=>{if(!Array.isArray(rl)){let nr={};for(let Or in rl)Or!=="id"&&Or!=="index"&&(nr[Or]=rl[Or]);rl=Object.values(nr)}return rl}));const Tu=!!((Ja=de.value)!=null&&Ja.find(rl=>rl.prop==="index"));ni=pc(ni,Pe==null?void 0:Pe.contents,Tu);const yi=[];ni==null||ni.forEach((rl,Ge)=>{var Or;let nr={};if(Array.isArray(rl)){let Br=[];rl==null||rl.filter(Lr=>!(Lr!=null&&Lr.id)).forEach((Lr,Cr)=>{var ii,bi,ki,br,kn,Gn;if((ii=cn==null?void 0:cn[Cr])!=null&&ii.prop&&!Array.isArray(Lr)){let xi={};xi[cn[Cr].column]=Lr,Oa!=null&&Oa.value&&((bi=Oa==null?void 0:Oa.value)==null?void 0:bi.length)>0&&((ki=Oa==null?void 0:Oa.value)!=null&&ki.find(ln=>JSON.stringify(ln==null?void 0:ln[0])===JSON.stringify(xi)))&&(Br=(br=Oa==null?void 0:Oa.value)==null?void 0:br.find(ln=>JSON.stringify(ln==null?void 0:ln[0])===JSON.stringify(xi))),Br&&Br.length>0?nr[cn[Cr].prop]=Br!=null&&Br.find(ln=>{var Yn;return((Yn=Object.keys(ln))==null?void 0:Yn[0])===cn[Cr].column})?(kn=Br==null?void 0:Br.find(ln=>{var Yn;return((Yn=Object.keys(ln))==null?void 0:Yn[0])===cn[Cr].column}))==null?void 0:kn[cn[Cr].column]:Lr:nr[cn[Cr].prop]=Lr}else Array.isArray(Lr)&&((Gn=cn[Cr])!=null&&Gn.prop?nr[cn[Cr].prop]=Lr:nr.children=bt(Lr,cn))})}else nr=rl;if(Array.isArray(rl)&&rl.some(Br=>Br==null?void 0:Br.id)){const Br=(Or=rl==null?void 0:rl.find(Lr=>Lr.id))==null?void 0:Or.id;yi.push(Object.assign(nr,{id:io(Br)}))}else nr.id?yi.push(nr):yi.push(Object.assign(nr,{id:Ge.toString()}))});try{const rl=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),Ge=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),nr=rl==null?void 0:rl.tableId,Or=rl==null?void 0:rl.compIndex;if(nr&&Array.isArray(Ge)&&Ge.length>0&&String(nr)===String(u==null?void 0:u.parentTableId)&&String(Or)===String(u==null?void 0:u.index)){const Br=new Set(yi.map(Cr=>String(Cr==null?void 0:Cr.id))),Lr=Ge.filter(Cr=>!Br.has(String(Cr)));if(Lr.length>0){const Cr=rl==null?void 0:rl.pageKey,ii=Cr!=null&&Cr.startsWith("/")?Cr.substring(1):Cr;((v==null?void 0:v[Cr])||(v==null?void 0:v[ii])||[]).filter(br=>{var kn,Gn;return((kn=br==null?void 0:br.key)==null?void 0:kn.type)==="data"&&String((Gn=br==null?void 0:br.key)==null?void 0:Gn.tableId)===String(nr)&&Lr.includes(br==null?void 0:br.id)}).forEach(br=>{var kn;Br.has(String(br==null?void 0:br.id))||(yi.push({id:br==null?void 0:br.id,...((kn=br==null?void 0:br.value)==null?void 0:kn.tableData)||{}}),Br.add(String(br==null?void 0:br.id)))})}}}catch{}let gi=null;try{const rl=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,Ge=JSON.parse(sessionStorage.getItem(rl)||"null");Array.isArray(Ge)&&Ge.length>0&&(gi=new Set(Ge.map(nr=>String(nr))))}catch{}const Kt=Array.from(((yl=qe.value)==null?void 0:yl.values())||[]).filter(rl=>!(!(rl!=null&&rl._isOCRRow&&(rl==null?void 0:rl._ocrTableId)===(u==null?void 0:u.index))||gi&&gi.has(String(rl==null?void 0:rl.id)))),Bu=(_e.value||[]).map(rl=>String(rl==null?void 0:rl.id)),Gt=oo(yi,Bu);if(_e.value=Ft(Gt,z,de.value),va.value=Gt,(Ua=va.value)==null||Ua.forEach(rl=>{var Ge;(Ge=qe.value)==null||Ge.set(rl.id,rl)}),gi&&gi.size>0)try{const rl=new Set(Array.from(gi.values()));_e.value=(_e.value||[]).filter(Ge=>!rl.has(String(Ge==null?void 0:Ge.id))),va.value=(va.value||[]).filter(Ge=>!rl.has(String(Ge==null?void 0:Ge.id))),rl.forEach(Ge=>{var nr,Or;try{(Or=(nr=qe.value)==null?void 0:nr.delete)==null||Or.call(nr,Ge)}catch{}})}catch{}const fo=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),ct=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(fo&&Array.isArray(ct)&&ct.length>0&&String(fo==null?void 0:fo.compIndex)===String(u==null?void 0:u.index)){const rl=new Set((va.value||[]).map(Ge=>String(Ge==null?void 0:Ge.id)));ct.filter(Ge=>!rl.has(String(Ge)))}if(Kt.length>0){const rl=new Set((_e.value||[]).map(nr=>nr==null?void 0:nr.id)),Ge=Kt.filter(nr=>!rl.has(nr.id));Ge.length>0&&(_e.value=[..._e.value||[],...Ge],va.value=[...va.value||[],...Ge],Ge.forEach(nr=>{var Or;return(Or=qe.value)==null?void 0:Or.set(nr.id,nr)}))}}else de.value=[],ue.value=[],_e.value=[],va.value=[],qe.value=new Map;if(ha=[...new Set(ha)],ha=ha==null?void 0:ha.map(da=>({label:da,type:"methodButton"})),((ul=ie==null?void 0:ie.contents)==null?void 0:ul.length)>0?_a.value=ie==null?void 0:ie.contents:_a.value=[],_a.value=[..._a.value,...ha],Ye=[...new Set(Ye)],Ye=Ye==null?void 0:Ye.map(da=>({label:da,type:"methodButton"})),((al=te==null?void 0:te.contents)==null?void 0:al.length)>0)if((Tl=(_l=(dl=d==null?void 0:d.find(da=>(da==null?void 0:da.key)==="filterAllType"))==null?void 0:dl.value)==null?void 0:_l.find(da=>(da==null?void 0:da.value)==="onButtonContents"))!=null&&Tl.content){let da=(bl=($l=(wr=d==null?void 0:d.find(Sl=>(Sl==null?void 0:Sl.key)==="filterAllType"))==null?void 0:wr.value)==null?void 0:$l.find(Sl=>(Sl==null?void 0:Sl.value)==="onButtonContents"))==null?void 0:bl.content;if(da=(Al=da==null?void 0:da.split(":"))==null?void 0:Al[1],da=(Ql=da.slice(1,(da==null?void 0:da.length)-1))==null?void 0:Ql.split(","),ma.value=(Bl=te==null?void 0:te.contents)==null?void 0:Bl.filter(Sl=>da==null?void 0:da.find(sn=>sn===(Sl==null?void 0:Sl.label))),Oe.value=(Jl=te==null?void 0:te.contents)==null?void 0:Jl.filter(Sl=>da==null?void 0:da.find(sn=>sn===(Sl==null?void 0:Sl.label))),(or=te==null?void 0:te.contents)!=null&&or.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别")&&!((Kl=ma.value)!=null&&Kl.some(Sl=>(Sl==null?void 0:Sl.label)==="OCR识别"))){const Sl=(hr=te==null?void 0:te.contents)==null?void 0:hr.find(sn=>(sn==null?void 0:sn.label)==="OCR识别");ma.value=[...ma.value,Sl],Oe.value=[...Oe.value,Sl]}E.value=!!(da!=null&&da.find(Sl=>Sl==="搜索")),P.value=!!(da!=null&&da.find(Sl=>Sl==="块状显示"))}else ma.value=te==null?void 0:te.contents,Oe.value=te==null?void 0:te.contents;else ma.value=[],Oe.value=[];ma.value=[...ma.value,...Ye],Oe.value=[...Oe.value,...Ye],typeof Ue.value=="string"&&Ue.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((qr=ma.value)!=null&&qr.some(da=>(da==null?void 0:da.label)==="OCR识别")||(ma.value=[...ma.value||[],{label:"OCR识别"}]),(vr=Oe.value)!=null&&vr.some(da=>(da==null?void 0:da.label)==="OCR识别")||(Oe.value=[...Oe.value||[],{label:"OCR识别"}])):(ma.value=(ma.value||[]).filter(da=>(da==null?void 0:da.label)!=="OCR识别"),Oe.value=(Oe.value||[]).filter(da=>(da==null?void 0:da.label)!=="OCR识别")),(dr=ma.value)!=null&&dr.some(da=>(da==null?void 0:da.label)==="切换视图")||(ma.value=[...ma.value||[],{label:"切换视图"}]),(pr=Oe.value)!=null&&pr.some(da=>(da==null?void 0:da.label)==="切换视图")||(Oe.value=[...Oe.value||[],{label:"切换视图"}]),Je.value=((Ht=_e==null?void 0:_e.value)==null?void 0:Ht.length)??0,Rt(_e.value),Yr.value=_e.value,Ml.value&&(de.value=(qt=(Ut=ue.value)==null?void 0:Ut.filter(da=>(da==null?void 0:da.label)!=="操作"))==null?void 0:qt.map(da=>{var Sl;return{...da,type:"edit",optionUrl:da!=null&&da.formMenuSelect&&((Sl=da==null?void 0:da.formMenuSelect)==null?void 0:Sl.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())};a.watch(()=>[u.itemData,ar.value,wn.value,gn.value,Oa==null?void 0:Oa.value],async()=>{var d,v,B,z,F,N;if((d=u==null?void 0:u.itemData)!=null&&d.find(ie=>(ie==null?void 0:ie.key)==="columnPath")&&!((v=H.value)!=null&&v.find(ie=>{var te,G;return(ie==null?void 0:ie.key)===((G=(te=u==null?void 0:u.itemData)==null?void 0:te.find(Ee=>(Ee==null?void 0:Ee.key)==="columnPath"))==null?void 0:G.contents)}))){let ie=H.value,te={key:(z=(B=u==null?void 0:u.itemData)==null?void 0:B.find(G=>(G==null?void 0:G.key)==="columnPath"))==null?void 0:z.contents,value:(N=(F=u==null?void 0:u.itemData)==null?void 0:F.find(G=>(G==null?void 0:G.key)==="columnUsingPath"))==null?void 0:N.contents};ie!=null&&ie.find(G=>(G==null?void 0:G.key)===(te==null?void 0:te.key))?ie=ie==null?void 0:ie.map(G=>((G==null?void 0:G.key)===(te==null?void 0:te.key)&&(G.value=te.value),G)):ie.push(te),He.setTableViewContents(ie)}await Pt(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.operatingForm,d=>{d!=null&&d.form&&(Li(d==null?void 0:d.form),se.value=d==null?void 0:d.dialogTitle,ga.value=!0,U.value=!0)},{immediate:!0,deep:!0});const yu=()=>{var d;(d=R.value)!=null&&d.includes("read")&&(Ml.value=!Ml.value)},gu=()=>{gr.value=!gr.value};a.watch(()=>{var d;return(d=u==null?void 0:u.config)==null?void 0:d.viewport},d=>{var v;R.value=d,(d==null?void 0:d.length)===0?Ml.value=!1:(d!=null&&d.includes("read")||(Ml.value=!0),d!=null&&d.includes("edit")||(Ml.value=!1)),D.value=((v=u==null?void 0:u.config)==null?void 0:v.showIndex)||Ml.value},{immediate:!0}),a.watch(()=>Ml.value,d=>{var v;d?(st("viewChange"),He.setCacheUpdatingData(null)):(ma.value=Oe.value,de.value=ua.value,V.value&&(He.setTableLoading(u==null?void 0:u.index),ze("change",V.value))),D.value=d||((v=u==null?void 0:u.config)==null?void 0:v.showIndex),ur.value=[]},{immediate:!0}),a.watch(()=>{var d;return(d=Un.value)==null?void 0:d.length},d=>{d===0&&(pe.currentPage=1)}),a.watch(()=>u==null?void 0:u.compNames,d=>{t.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),a.ref(!1);const bu=(d,v)=>{var B;st("createClick"),v===pe.pageSize&&(pe.currentPage=Math.ceil(((B=_e.value)==null?void 0:B.length)/pe.pageSize))},ku=async(d,v,B)=>{var F,N,ie,te,G;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop);if(z&&uo.includes(z)&&B!==void 0&&B!==null&&String(B).trim()!==""){const Ee=String(B).trim();if(await tt(Ee,d==null?void 0:d.id)){Ya.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const je=(F=_e.value)==null?void 0:F.findIndex(Ye=>(Ye==null?void 0:Ye.id)===(d==null?void 0:d.id)),Pe=je!==-1?(ie=(N=_e.value)==null?void 0:N[je])==null?void 0:ie[z]:void 0;z&&(d[z]=Pe??"");return}}if(Ml.value){const Ee=d==null?void 0:d.id;Ee!=null&&(m.value.has(Ee)||m.value.set(Ee,O.cloneDeep(d)),c.value.add(Ee));const De=(te=_e.value)==null?void 0:te.findIndex(je=>(je==null?void 0:je.id)===(d==null?void 0:d.id));De!==-1&&z&&(_e.value[De]={..._e.value[De],[z]:B}),po(B,d,v);return}po(B,d,v),ir.value=O.cloneDeep(d),La.value=d==null?void 0:d.id,Je.value=(G=_e.value)==null?void 0:G.length,se.value=d!=null&&d._isTemp?"新增":"编辑",Ri(!1)},xu=async()=>{var d,v;try{const B=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(z=>{if(typeof z=="string"&&z.includes("content_")){const F=z.split("_")[1];F&&(B.push(`content_${F}`),B.push(`struct_${F}`))}})),B.length===0&&(u!=null&&u.itemData)){const z=(v=(d=u.itemData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:v.contents;z&&(B.push(`content_${z}`),B.push(`struct_${z}`))}return B}catch(B){return console.error("获取 tableNames 失败:",B),[]}},wu=async(d,v,B)=>{var N,ie;if(!B||typeof B!="string"||B.trim()===""){const te=(v==null?void 0:v.property)??(v==null?void 0:v.prop),G=`${d==null?void 0:d.id}:${te}`;p.value.delete(G),y.value.set(G,!1);return}const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),F=`${d==null?void 0:d.id}:${z}`;y.value.set(F,!0);try{const te=await xu();if(te.length===0){console.warn("未找到同名表,跳过全局搜索"),p.value.delete(F),y.value.set(F,!1);return}const G=parseInt((N=zl.value)==null?void 0:N.plat_id);if(!G){console.warn("platId 无效,跳过全局搜索"),p.value.delete(F),y.value.set(F,!1);return}const Ee=await O.getAllTables({platId:G,tableNames:te??[]}),De=((ie=Ee==null?void 0:Ee.data)==null?void 0:ie.result)||[],je=[],Pe=[];for(let Ye=0;Ye<De.length;Ye+=2)Ye+1<De.length&&Pe.push([De[Ye],De[Ye+1]]);Pe.forEach(([Ye,ha])=>{var qa;if(!Array.isArray(Ye)||Ye.length===0||!Array.isArray(ha)||ha.length===0)return;const Fa=ha[0];let Ga=((qa=Fa==null?void 0:Fa.结构)==null?void 0:qa.contents)??[];if(!Array.isArray(Ga)||Ga.length===0)return;let sa=O.cloneDeep(Ga);if(Array.isArray(sa==null?void 0:sa[0])&&(sa=na.getColumnChild(sa[0])),!Array.isArray(sa)||sa.length===0||!sa.some(ve=>(ve==null?void 0:ve.prop)===z))return;[...Ye].sort((ve,Ca)=>{const ca=Number((ve==null?void 0:ve.update_time)??0);return Number((Ca==null?void 0:Ca.update_time)??0)-ca}).slice(0,20).forEach(ve=>{const Ca=ve[z];if(Ca!=null){const ca=String(Ca);ca.toLowerCase().includes(B.toLowerCase())&&je.findIndex(Da=>{var A;return ve.id&&((A=Da.rowData)==null?void 0:A.id)===ve.id?!0:Da.label===ca})===-1&&je.push({label:ca,rowData:O.cloneDeep(ve),sourceTable:(Fa==null?void 0:Fa.source_table)||""})}})}),p.value.set(F,je)}catch(te){console.error("全局搜索建议失败:",te),p.value.delete(F)}finally{y.value.set(F,!1)}},_u=(d,v,B)=>{if(!Ml.value)return;const z=(v==null?void 0:v.property)??(v==null?void 0:v.prop),F=(v==null?void 0:v.formType)||(v==null?void 0:v.columnType)||"";if(F&&F.toUpperCase()!=="INPUT"&&F!=="")return;const N=`${d==null?void 0:d.id}:${z}`;if(h.has(N)&&clearTimeout(h.get(N)),!B||B.trim()===""){p.value.delete(N),y.value.set(N,!1);return}const ie=setTimeout(()=>{wu(d,{prop:z,property:z},B),h.delete(N)},300);h.set(N,ie)};function Su(d,v){const B=`${d==null?void 0:d.id}:${(v==null?void 0:v.property)??(v==null?void 0:v.prop)}`;return p.value.get(B)||[]}const Eu=(d,v,B)=>{var De;if(!B||!B.rowData)return;const z=B.rowData,F=d==null?void 0:d.id,N=(v==null?void 0:v.property)??(v==null?void 0:v.prop),te=(na.getAllLeafNodes(de.value)||[]).filter(je=>(je==null?void 0:je.type)!=="operate"&&(je==null?void 0:je.label)!=="操作"&&(je==null?void 0:je.prop)!=="operate");te.forEach(je=>{const Pe=je==null?void 0:je.prop;Pe&&z[Pe]!==void 0&&(d[Pe]=z[Pe])});const G=(De=_e.value)==null?void 0:De.findIndex(je=>(je==null?void 0:je.id)===F);G!==-1&&te.forEach(je=>{const Pe=je==null?void 0:je.prop;Pe&&z[Pe]!==void 0&&(_e.value[G][Pe]=z[Pe])}),F!=null&&(m.value.has(F)||m.value.set(F,O.cloneDeep(d)),c.value.add(F));const Ee=`${F}:${N}`;p.value.delete(Ee),y.value.set(Ee,!1),po(d[N],d,v)},Ur=d=>{var G,Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll;const{row:v,column:B,item:z,slotData:F}=d;let N=v!=null&&v[B==null?void 0:B.prop]||(v==null?void 0:v[B==null?void 0:B.prop])===0?((Ee=(G=v==null?void 0:v[B==null?void 0:B.prop])==null?void 0:G[0])==null?void 0:Ee.contents)??((v==null?void 0:v[B==null?void 0:B.prop])===0?"0":v==null?void 0:v[B==null?void 0:B.prop]):((je=(De=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:De[0])==null?void 0:je.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((Ye=(Pe=F==null?void 0:F[z==null?void 0:z.prop])==null?void 0:Pe[0])==null?void 0:Ye.contents)??(F==null?void 0:F[z==null?void 0:z.prop])??((Ga=(Fa=v==null?void 0:v[(ha=z==null?void 0:z.child)==null?void 0:ha.prop])==null?void 0:Fa[0])==null?void 0:Ga.contents)??(v==null?void 0:v[(sa=z==null?void 0:z.child)==null?void 0:sa.prop]),te=Array.isArray(N)&&!(N!=null&&N.every(ba=>typeof ba=="string"||typeof ba=="number"))?"查看":N;if(te=Array.isArray(te)?te.join(","):te,(B==null?void 0:B.formType)==="Date")if(!te||te===""||te===null||te===void 0)te="";else{const ba=Pn.dayjs(te,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);te=ba.isValid()?ba.format("YYYYMMDD"):te??""}return Array.isArray(B==null?void 0:B.relatedPages)&&((ll=B==null?void 0:B.relatedPages)==null?void 0:ll.length)>0&&(te="详情页"),te},Cu=d=>{var Ee,De,je,Pe,Ye,ha,Fa,Ga,sa,ll;const{row:v,column:B,item:z,slotData:F}=d;let N=v!=null&&v[B==null?void 0:B.prop]?((De=(Ee=v==null?void 0:v[B==null?void 0:B.prop])==null?void 0:Ee[0])==null?void 0:De.contents)??(v==null?void 0:v[B==null?void 0:B.prop]):((Pe=(je=v==null?void 0:v[z==null?void 0:z.prop])==null?void 0:je[0])==null?void 0:Pe.contents)??(v==null?void 0:v[z==null?void 0:z.prop])??((ha=(Ye=F==null?void 0:F[z==null?void 0:z.prop])==null?void 0:Ye[0])==null?void 0:ha.contents)??(F==null?void 0:F[z==null?void 0:z.prop])??((sa=(Ga=v==null?void 0:v[(Fa=z==null?void 0:z.child)==null?void 0:Fa.prop])==null?void 0:Ga[0])==null?void 0:sa.contents)??(v==null?void 0:v[(ll=z==null?void 0:z.child)==null?void 0:ll.prop]);const te=Array.isArray(N)&&!(N!=null&&N.every(ba=>typeof ba=="string"||typeof ba=="number")),G=Array.isArray(N)&&(N==null?void 0:N.find(ba=>ba==null?void 0:ba.url));return te&&G},Du=d=>{var F,N;if(!(d!=null&&d.column))return!1;const v=Ue.value==="试验任务/任务管理",B=(u==null?void 0:u.compName)==="任务列表",z=((F=d==null?void 0:d.column)==null?void 0:F.label)==="任务状态"||((N=d==null?void 0:d.column)==null?void 0:N.prop)==="任务状态";return v&&B&&z},Nu=(d,v)=>d.find(B=>Object.values(B).some(z=>z===v));return a.watch(()=>oe.value,async d=>{if(d){Te.setContentLoading(!0),await a.nextTick();const v=Nu(_e.value,d==null?void 0:d.data);if(!v)return Te.setContentLoading(!1);await Kn(d==null?void 0:d.data,null,v,{data:d==null?void 0:d.data}),Te.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.cacheNewData,d=>{var v;d&&(Array.isArray(d)?d.forEach(B=>{var z,F,N,ie,te;if(换,String(B==null?void 0:B.compId)===String(u==null?void 0:u.index)&&(B!=null&&B.resId)&&((z=B==null?void 0:B.data)!=null&&z.id)){const G=(F=B==null?void 0:B.data)==null?void 0:F.id,Ee=B==null?void 0:B.resId;if(_e.value=(N=_e.value)==null?void 0:N.map(De=>{if((De==null?void 0:De.id)===G){const je={...De,id:Ee};return delete je._isOCRRow,delete je._ocrTableId,je}return De}),(te=(ie=qe.value)==null?void 0:ie.has)!=null&&te.call(ie,G)){const je={...qe.value.get(G)||{},id:Ee};delete je._isOCRRow,delete je._ocrTableId,qe.value.delete(G),qe.value.set(Ee,je)}ka(u==null?void 0:u.index,G,Ee)}}):String(d==null?void 0:d.compId)===String(u==null?void 0:u.index)&&(_e.value=(v=_e.value)==null?void 0:v.map(B=>{var z;if((B==null?void 0:B.id)===((z=d==null?void 0:d.data)==null?void 0:z.id)){const F={...B,id:d==null?void 0:d.resId};return delete F._isOCRRow,delete F._ocrTableId,F}return B})))},{immediate:!0,deep:!0}),(d,v)=>{var sa,ll,ba,qa;const B=a.resolveComponent("svg-icon"),z=a.resolveComponent("el-popover"),F=a.resolveComponent("el-switch"),N=a.resolveComponent("el-checkbox"),ie=a.resolveComponent("el-radio"),te=a.resolveComponent("el-radio-group"),G=a.resolveComponent("el-checkbox-group"),Ee=a.resolveComponent("el-button"),De=a.resolveComponent("el-icon"),je=a.resolveComponent("el-progress"),Pe=a.resolveComponent("el-alert"),Ye=a.resolveComponent("el-table-column"),ha=a.resolveComponent("el-table"),Fa=a.resolveComponent("el-upload"),Ga=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",P0,[Pr.value?(a.openBlock(),a.createBlock(tl.ssTable,{id:"excel-table",pageObj:pe,showIndex:D.value,isTree:(sa=l.compItem)==null?void 0:sa.isTree,summaryInfo:Y,columns:de.value,defaultSort:ae,isCardViewport:gr.value,checkedColumns:n.value,key:rn.value+de.value,tableData:Un.value,isEditViewport:Ml.value,isShowPagination:ia.value,isShowEdit:!1,isShowDelete:!1,allowSelect:x.value,onDbClickRow:to,extraButton:ma.value,rowButton:_a.value,cacheExtraButtons:Oe.value,isClearSelection:((ll=ur.value)==null?void 0:ll.length)===0,onDoCurrentChange:bn,onDoSizeChange:Ai,onSortChange:Vo,onContentClick:Kn,onRowClick:so,onSelectChange:qo,onCellChange:ku,onCellInput:_u,onSelectSuggest:Eu,onChange:po,onPreview:Wn,onSubmitEditingTable:Qi,onHandleColEditChange:Ji,onHandleColTypeChange:Xi,onClickButton:$n,onAddNewRow:jr,bottomButton:M.value},a.createSlots({headerButton:a.withCtx(ve=>{var Ca,ca,Ea,Da;return[l.showHeader?(a.openBlock(),a.createBlock(bf,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(me)===a.unref(Ue),filterValues:Xo.value,selectNums:(Ca=ur.value)==null?void 0:Ca.length,dataNums:(ca=_e.value)==null?void 0:ca.length,compName:l.compName,isDevMode:l.isDevMode,buttons:ve.buttons,menuFilter:(Da=(Ea=l.compItem)==null?void 0:Ea.component)==null?void 0:Da.menuFilter,onButtonClick:v[1]||(v[1]=(A,X,$e)=>$n(A,X,{extra:$e})),columns:de.value,onFilter:Zo,onGetImportData:Po,level:l.level,filterShow:E.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","menuFilter","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var ve,Ca,ca,Ea;return[((ve=_e.value)==null?void 0:ve.length)>0&&l.allowOperate&&P.value?(a.openBlock(),a.createElementBlock("div",U0,[(Ca=R.value)!=null&&Ca.includes("read")&&((ca=R.value)!=null&&ca.includes("edit"))&&((Ea=_a.value)!=null&&Ea.some(Da=>(Da==null?void 0:Da.label)==="编辑"))&&!gr.value&&a.unref(me)!==a.unref(Ue)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:yu},[a.createVNode(B,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:ve,index:Ca})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ca=>bu(ve,Ca)},[a.createVNode(B,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,q0)]),operateCol:a.withCtx(()=>[a.createVNode(z,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:pu},{reference:a.withCtx(()=>[a.createElementVNode("span",W0,[a.createVNode(B,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",K0,[v[20]||(v[20]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(F,{"model-value":g.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:v[2]||(v[2]=ve=>ao(ve))},null,8,["model-value"]),v[21]||(v[21]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(G,{modelValue:n.value,"onUpdate:modelValue":v[3]||(v[3]=ve=>n.value=ve),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Dn.value,ve=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ve.label},[a.createVNode(N,{value:ve.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:ve.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(ve.label),9,G0)]),_:2},1032,["value"]),a.createVNode(z,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(B,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Ca;return[a.createElementVNode("div",Y0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ca=Object.keys(ve))==null?void 0:Ca.filter(ca=>{var Ea;return(Ea=j.value)==null?void 0:Ea.find(Da=>(Da==null?void 0:Da.value)===ca)}),ca=>{var Ea,Da;return a.openBlock(),a.createElementBlock("div",{key:ca},[L[ca]=="radio"?(a.openBlock(),a.createElementBlock("div",J0,[v[19]||(v[19]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(te,{"model-value":ve==null?void 0:ve[ca],onChange:A=>Nn(A,ca,ve)},{default:a.withCtx(()=>{var A,X;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((X=(A=j.value)==null?void 0:A.find($e=>($e==null?void 0:$e.value)===ca))==null?void 0:X.options,$e=>(a.openBlock(),a.createBlock(ie,{key:$e==null?void 0:$e.value,label:$e==null?void 0:$e.value,value:$e==null?void 0:$e.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString($e==null?void 0:$e.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),L[ca]=="switch"?(a.openBlock(),a.createBlock(F,{key:1,"model-value":ve==null?void 0:ve[ca],"active-text":(Da=(Ea=j.value)==null?void 0:Ea.find(A=>(A==null?void 0:A.value)===ca))==null?void 0:Da.label,onChange:A=>Nn(A,ca,ve)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",X0,[a.createVNode(B,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(ve=>{var Ca,ca,Ea,Da,A,X,$e,la,xe,ta,Ta,sl,Qa,pl,fl,Pl,Ja,yl,Ua,ul;return[((Ca=ve==null?void 0:ve.column)==null?void 0:Ca.label)==="证书附件"||((ca=ve==null?void 0:ve.column)==null?void 0:ca.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",Z0,[a.createVNode(B,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(al=>Jr(ve),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):Cu(ve)?(a.openBlock(),a.createBlock(z,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",Q0,a.toDisplayString(Ur(ve)),1)]),default:a.withCtx(()=>{var al,dl;return[a.createElementVNode("div",e3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((dl=ve==null?void 0:ve.row)==null?void 0:dl[(al=ve==null?void 0:ve.column)==null?void 0:al.prop],_l=>(a.openBlock(),a.createElementBlock("div",a3,[a.createElementVNode("div",{class:"prop-url",title:li(_l),onClick:Tl=>Yo(_l)},a.toDisplayString(li(_l)),9,l3),a.createElementVNode("div",{class:"prop-download",onClick:Tl=>pi(_l)}," 下载 ",8,r3)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[Du(ve)?(a.openBlock(),a.createBlock(Pu,{key:0,value:Ur(ve)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Ur(ve))&&((Da=(Ea=Ur(ve))==null?void 0:Ea.toString())!=null&&Da.includes(".txt")||(X=(A=Ur(ve))==null?void 0:A.toString())!=null&&X.includes(".cpt")||(la=($e=Ur(ve))==null?void 0:$e.toString())!=null&&la.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Ur(ve))&&((ta=(xe=Ur(ve))==null?void 0:xe.toString())!=null&&ta.includes(".txt")||(sl=(Ta=Ur(ve))==null?void 0:Ta.toString())!=null&&sl.includes(".cpt")||(pl=(Qa=Ur(ve))==null?void 0:Qa.toString())!=null&&pl.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Ur(ve))&&((Pl=(fl=Ur(ve))==null?void 0:fl.toString())!=null&&Pl.includes(".txt")||(yl=(Ja=Ur(ve))==null?void 0:Ja.toString())!=null&&yl.includes(".cpt")||(ul=(Ua=Ur(ve))==null?void 0:Ua.toString())!=null&&ul.includes(".cyd"))?"pointer":"",marginLeft:(ve==null?void 0:ve.colIndex)===0?`${((ve==null?void 0:ve.level)??0)*20}px`:0}),onClick:al=>{var dl;return On(Ur(ve),((dl=ve==null?void 0:ve.column)==null?void 0:dl.relatedPages)??[])}},a.toDisplayString(Ur(ve)===0?"0":Ur(ve)),13,n3))],64))]}),_:2},[((ba=_a.value)==null?void 0:ba.length)>0?{name:"actions",fn:a.withCtx(({item:ve,fIndex:Ca})=>[a.createVNode(z,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(B,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:v[0]||(v[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",j0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Jo(_a.value,ve),(ca,Ea)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:Ea,onClick:a.withModifiers(Da=>$n(ca==null?void 0:ca.label,ve,{extra:ca}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:ca==null?void 0:ca.textColor}),class:"extra-button-label"},a.toDisplayString(ca==null?void 0:ca.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"])):a.createCommentVNode("",!0),Ml.value?(a.openBlock(),a.createElementBlock("div",i3,[a.createVNode(Ee,{id:"themeBorderButton",onClick:Uo},{default:a.withCtx(()=>v[22]||(v[22]=[a.createTextVNode("取消")])),_:1,__:[22]}),a.createVNode(Ee,{class:"ok-button",id:"themeButton",onClick:zi},{default:a.withCtx(()=>v[23]||(v[23]=[a.createTextVNode("保存")])),_:1,__:[23]})])):a.createCommentVNode("",!0),a.createVNode(_r.ssDialog,{title:se.value,visible:U.value,width:Ll.value,onBeforeDestroy:lo,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",o3,[a.createVNode(tl.ssForm,{ref_key:"formRef",ref:W,rowContents:Ra.value,showOperator:!1,onChange:fu,isEnableWrap:!1,onFixChangeValue:Ii,onClickTrigger:ro,isEdit:Ma.value,onBlurChange:Wo,onCreate:eo,onTagChange:en},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[ga.value?(a.openBlock(),a.createElementBlock("div",t3,[a.createVNode(Ee,{onClick:v[4]||(v[4]=ve=>U.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>v[24]||(v[24]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[24]}),a.createVNode(Ee,{class:"ok-button",onClick:v[5]||(v[5]=ve=>Ri(!0)),id:"themeButton"},{default:a.withCtx(()=>v[25]||(v[25]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[25]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(_r.ssDialog,{title:se.value,visible:ke.value,width:ra.value,onBeforeDestroy:v[7]||(v[7]=ve=>ke.value=!1)},{default:a.withCtx(()=>[a.createVNode(Af)]),footer:a.withCtx(()=>[a.createElementVNode("div",s3,[a.createVNode(Ee,{onClick:v[6]||(v[6]=ve=>ke.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>v[26]||(v[26]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[26]}),a.createVNode(Ee,{class:"ok-button",onClick:Oi,id:"themeButton"},{default:a.withCtx(()=>v[27]||(v[27]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),za.value?(a.openBlock(),a.createBlock(tl.ssFilePreview,{key:2,fileDataList:le.value,onDestroy:Tn},null,8,["fileDataList"])):a.createCommentVNode("",!0),Se.value?(a.openBlock(),a.createBlock(_r.ssDialog,{key:3,visible:Se.value,onBeforeDestroy:uu,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(Co.ThreeViewerHost,{files:Pa.value,threeData:ge.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(_r.ssDialog,{title:"OCR扫描录入",visible:Na.value,"close-on-click-modal":!1,onBeforeDestroy:il,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[v[38]||(v[38]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",c3,[a.createElementVNode("div",u3,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ye.value===1}])},v[28]||(v[28]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),v[31]||(v[31]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ye.value===2}])},v[29]||(v[29]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),v[32]||(v[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:ye.value===3}])},v[30]||(v[30]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),ye.value===1?(a.openBlock(),a.createElementBlock("div",d3,[a.createVNode(Ee,{onClick:nt,class:"ocr-action-btn",disabled:$a.value,size:"default"},{default:a.withCtx(()=>v[33]||(v[33]=[a.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),a.createVNode(Ee,{onClick:Wl,class:"ocr-action-btn",disabled:$a.value,size:"default"},{default:a.withCtx(()=>v[34]||(v[34]=[a.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):a.createCommentVNode("",!0),ye.value===1?(a.openBlock(),a.createElementBlock("div",p3,[a.createElementVNode("div",f3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Xa.value,(ve,Ca)=>{var ca;return a.openBlock(),a.createElementBlock("div",{key:Ca,class:"ocr-file-item"},[a.createElementVNode("div",h3,[ve.raw&&((ca=ve.raw.type)!=null&&ca.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:wl(ve),alt:"预览",class:"thumbnail-image"},null,8,v3)):(a.openBlock(),a.createElementBlock("div",m3,[a.createVNode(De,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:ol(ve)==="uploading",processing:ol(ve)==="processing",completed:ol(ve)==="completed"||ol(ve)==="uploaded",failed:ol(ve)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",y3,[v[35]||(v[35]=a.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),a.createElementVNode("circle",{class:a.normalizeClass(["progress-ring-fill",{completed:ol(ve)==="completed"||ol(ve)==="uploaded",uploading:ol(ve)==="uploading",processing:ol(ve)==="processing",failed:ol(ve)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:ol(ve)==="failed"?"#f56c6c":ol(ve)==="completed"||ol(ve)==="uploaded"?"#67c23a":"#409eff","stroke-width":ol(ve)==="completed"||ol(ve)==="uploaded"||ol(ve)==="failed"?3:2,"stroke-dasharray":lr(ve),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,g3)])),ol(ve)==="completed"||ol(ve)==="uploaded"?(a.openBlock(),a.createElementBlock("div",b3,[a.createVNode(De,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.check_default))]),_:1})])):a.createCommentVNode("",!0),ol(ve)==="failed"?(a.openBlock(),a.createElementBlock("div",k3,[a.createVNode(De,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:Ea=>vi(Ca)},[a.createVNode(De,null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.close_default))]),_:1})],8,x3)]),a.createElementVNode("div",w3,a.toDisplayString(ve.name||"文件名123"),1)])}),128))]),Xa.value.length>0?(a.openBlock(),a.createElementBlock("div",_3,[a.createVNode(Ee,{onClick:be,class:"ocr-start-recognize-btn",disabled:$a.value||Xa.value.length===0,size:"default"},{default:a.withCtx(()=>v[36]||(v[36]=[a.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),ye.value===1?(a.openBlock(),a.createElementBlock("div",S3,[a.createVNode(je,{percentage:re.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),ye.value===2?(a.openBlock(),a.createElementBlock("div",E3,[a.createElementVNode("div",C3,[a.createVNode(Pe,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",D3,[a.createVNode(ha,{data:pa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(Ye,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(We.value,ve=>(a.openBlock(),a.createBlock(Ye,{key:ve.prop,prop:ve.prop,"min-width":ve.minWidth||230,"class-name":ve.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",N3,[a.createElementVNode("span",null,a.toDisplayString(ve.label),1)])]),default:a.withCtx(({row:Ca,$index:ca})=>{var Ea,Da,A;return[ve.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:nl(Ca[ve.prop]),fontWeight:500})},a.toDisplayString(Aa(Ca[ve.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[wa.value!==ca?(a.openBlock(),a.createElementBlock("span",T3,a.toDisplayString(Ca[ve.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(ya(ve.prop)),{key:1,modelValue:Ca[ve.prop],"onUpdate:modelValue":X=>Ca[ve.prop]=X,size:"small",placeholder:"请输入"+ve.label,content:((Ea=Sa(ve.prop))==null?void 0:Ea.contents)??((Da=Sa(ve.prop))==null?void 0:Da.options)??[],optionUrl:(A=Sa(ve.prop))==null?void 0:A.optionUrl,onChange:X=>Qe(ca,ve.prop,X),onFocus:X=>cl.value=ve.prop,onBlur:v[8]||(v[8]=X=>cl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(Ye,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:ve})=>[wa.value===ve?(a.openBlock(),a.createBlock(De,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(Ca=>el(ve),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(B,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(Ca=>el(ve),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),ye.value===3?(a.openBlock(),a.createElementBlock("div",B3,[a.createVNode(De,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ya.check_default))]),_:1}),v[37]||(v[37]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode(Fa,{ref:"ocrUploadRef","file-list":Xa.value,"onUpdate:fileList":v[9]||(v[9]=ve=>Xa.value=ve),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":J,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[ye.value!==3?(a.openBlock(),a.createElementBlock("div",A3,[a.createVNode(Ee,{onClick:Hr,class:"ocr-start-recognize-btn",disabled:ye.value===1||$a.value},{default:a.withCtx(()=>v[39]||(v[39]=[a.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),a.createVNode(Ee,{onClick:Er,class:"ocr-start-recognize-btn",disabled:$a.value},{default:a.withCtx(()=>v[40]||(v[40]=[a.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(Yf,{visible:hi.value,onConfirm:it,onCancel:v[10]||(v[10]=ve=>hi.value=!1)},null,8,["visible"]),a.createVNode(wd,{visible:aa.value,"onUpdate:visible":v[11]||(v[11]=ve=>aa.value=ve),versions:Va.value},null,8,["visible","versions"]),a.createVNode(sd,{visible:Ia.value,"onUpdate:visible":v[12]||(v[12]=ve=>Ia.value=ve),images:Ae.value,"default-image-name":Dl.value,"field-meta":wa.value!==null?((qa=pa.value[wa.value])==null?void 0:qa.__ocrFieldMeta)||{}:{},"focused-field-name":cl.value,onClose:v[13]||(v[13]=ve=>Ia.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(Od,{visible:Ol.value,"onUpdate:visible":v[14]||(v[14]=ve=>Ol.value=ve),candidates:Gl.value,"name-prop":Fr.value,"mfr-prop":Ul.value,columns:de.value,onSubmit:Ar,onPreviewFile:tn},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(jd,{visible:ea.value,"onUpdate:visible":v[15]||(v[15]=ve=>ea.value=ve),ocrPreviewData:pa.value,"onUpdate:ocrPreviewData":v[16]||(v[16]=ve=>pa.value=ve),ocrSelectedFields:Ka.value,"onUpdate:ocrSelectedFields":v[17]||(v[17]=ve=>Ka.value=ve),ocrPreviewColumns:We.value,onConfirm:Ce,onFieldChange:v[18]||(v[18]=({rowIndex:ve,prop:Ca,value:ca})=>Qe(ve,Ca,ca))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(_r.ssDialog,{title:t.title,visible:t.show,width:t.width,onBeforeDestroy:w},{default:a.withCtx(()=>[a.createElementVNode("div",z3,[a.createVNode(tl.ssForm,{rowContents:t==null?void 0:t.contents,formRules:t==null?void 0:t.formRules,showOperator:!1,buttonValue:t.buttonValue,isEdit:Ma.value,isStartJustify:!1,onOnButtonClick:I},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(_r.ssDialog,{title:o.title,visible:o.show,width:o.width,alignCenter:!0,onBeforeDestroy:f},{header:a.withCtx(()=>[a.createVNode(Ga,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>v[41]||(v[41]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[41]})]),footer:a.withCtx(()=>[a.createElementVNode("div",M3,[a.createVNode(Ga,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(Mn.value||"暂无"),1)]),_:1}),a.createElementVNode("div",I3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o==null?void 0:o.buttonValue,ve=>(a.openBlock(),a.createBlock(Ee,{key:ve==null?void 0:ve.label,style:a.normalizeStyle({background:ve==null?void 0:ve.background,color:ve==null?void 0:ve.color}),onClick:Ca=>b(ve==null?void 0:ve.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(ve==null?void 0:ve.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(kf,{columns:o==null?void 0:o.columns,tableData:o==null?void 0:o.tableData},{content:a.withCtx(({row:ve,item:Ca,slotData:ca,scope:Ea,column:Da,columnProp:A,$index:X})=>[a.createTextVNode(a.toDisplayString((ve==null?void 0:ve[(Da==null?void 0:Da.prop)||(Da==null?void 0:Da.label)])||(ca==null?void 0:ca[Da==null?void 0:Da.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},Bc=er._export_sfc(L3,[["__scopeId","data-v-9e786e03"]]),$3={key:1,class:"static-form-body"},R3=["onClick"],V3={key:1},F3=a.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(l,{emit:r}){const n=l,i=r,s=k=>{switch(k){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},c=a.computed(()=>{var $;const k=($=n.itemData)==null?void 0:$.find(Y=>(Y==null?void 0:Y.key)==="formContent"),g=(k==null?void 0:k.contents)||[];return(n.fields&&n.fields.length>0?n.fields:g).filter(Y=>(Y==null?void 0:Y.label)||(Y==null?void 0:Y.isHideInForm)).map(Y=>{let pe=Y==null?void 0:Y.value;Array.isArray(pe)&&(pe=pe.map(he=>he==null?"":typeof he=="object"?he.label??he.value??he.name??JSON.stringify(he):String(he)).filter(Boolean).join(",")),pe!=null&&typeof pe=="object"&&(pe=pe.label??pe.value??pe.name??JSON.stringify(pe));const ze=Y.isHideInForm?"":Y.label??"",de=pe==null||pe===""?"-":String(pe),Z=ze==="使用状态";return{label:ze,value:de,isStatus:Z,tagType:Z?s(de):"",width:Y.width??1,field:Y}})}),m=a.ref(null),p=a.ref(null),h=k=>{if(Array.isArray(k)&&k.length>=3){const[g,P,$,Y]=k;return Y!==void 0?`rgba(${g}, ${P}, ${$}, ${Y})`:`rgb(${g}, ${P}, ${$})`}if(typeof k=="string"){const g=k.trim();if(g.startsWith("[")&&g.endsWith("]")){const P=g.slice(1,-1).split(",").map($=>Number($.trim()));if(P.length>=3&&P.every($=>!Number.isNaN($))){const[$,Y,pe,ze]=P;return ze!==void 0?`rgba(${$}, ${Y}, ${pe}, ${ze})`:`rgb(${$}, ${Y}, ${pe})`}}return g}},y=a.computed(()=>{const k=Number(n==null?void 0:n.textSize),g=h(n==null?void 0:n.textColor),P={},$={},Y={},pe={};return!Number.isNaN(k)&&k&&(P.fontSize=`${k}px`,$.fontSize=`${k+1}px`,Y.fontSize=`${k}px`,pe.fontSize=`${k}px`),g&&($.color=g,Y.color=g,pe.color=g),{item:P,label:$,value:Y,empty:pe}}),u=a.ref(""),x=a.ref(""),D=a.ref(!1),R=async k=>{if(k){x.value&&(URL.revokeObjectURL(x.value),x.value="");try{const g=await O.platformDownloadFile({url:k}),P=new Blob([g==null?void 0:g.data],{type:(g==null?void 0:g.headers["content-type"])||"image/*"});x.value=URL.createObjectURL(P)}catch{x.value=""}}};a.watch(()=>n==null?void 0:n.backGroundImage,k=>{k&&(u.value=k)},{immediate:!0}),a.watch(u,k=>{R(k)},{immediate:!0});const E=()=>{var k;(k=p.value)==null||k.click()},K=async k=>{var $,Y,pe;const g=k.target,P=($=g==null?void 0:g.files)==null?void 0:$[0];if(!P){g.value="";return}D.value=!0;try{const ze=new FormData;ze.append("file",P);const de=await O.platformUploadFile(ze),Z=(pe=(Y=de==null?void 0:de.data)==null?void 0:Y.result)==null?void 0:pe.url;Z?(u.value=Z,i("update:backGroundImage",Z),R(Z),Ya.ElMessage.success("背景图片上传成功")):Ya.ElMessage.error("背景图片上传失败")}catch{Ya.ElMessage.error("背景图片上传失败")}finally{D.value=!1,g.value=""}},M=a.computed(()=>x.value?{backgroundImage:`url(${x.value})`,backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{}),L=k=>tl.getComponent(k),j=k=>{if(!k)return;const g=k.querySelector("input, textarea, .el-input__inner");g&&typeof g.focus=="function"&&g.focus()},C=(k,g,P)=>{n.disabled||(m.value=g,a.nextTick(()=>{j(P.currentTarget)}))},_=()=>{m.value=null},S=k=>{const g=k!=null&&k.width&&k.width>0?k.width:1,$=`calc((100% - ${(g-1)*48}px) / ${g})`;return{flex:`0 0 ${$}`,maxWidth:$,minWidth:"0",boxSizing:"border-box"}};return(k,g)=>{const P=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",{class:"static-form-card",style:a.normalizeStyle(M.value),onClick:g[2]||(g[2]=$=>(n==null?void 0:n.backGround)==="Yes"&&E())},[(n==null?void 0:n.backGround)==="Yes"?(a.openBlock(),a.createElementBlock("div",{key:0,class:"form-backGround-upload",onClick:g[0]||(g[0]=a.withModifiers($=>E(),["stop"]))},[a.createElementVNode("input",{ref_key:"bgUploadRef",ref:p,type:"file",accept:"image/*",style:{display:"none"},onChange:K},null,544),g[3]||(g[3]=a.createElementVNode("img",{src:tl._imports_0,class:"bg-upload-icon",alt:"上传背景"},null,-1))])):a.createCommentVNode("",!0),c.value.length?(a.openBlock(),a.createElementBlock("div",$3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,($,Y)=>{var pe,ze,de,Z,he,ae,ue,Se;return a.openBlock(),a.createElementBlock("div",{key:Y,class:"static-form-item",style:a.normalizeStyle({...S($),...y.value.item}),onClick:g[1]||(g[1]=a.withModifiers(()=>{},["stop"]))},[$.label?(a.openBlock(),a.createElementBlock("div",{key:0,class:"static-form-label",style:a.normalizeStyle(y.value.label)},a.toDisplayString($.label)+": ",5)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"static-form-value",style:a.normalizeStyle(y.value.value),onClick:Ve=>{var ge;return(ge=$.field)!=null&&ge.isNoClick?null:C($,Y,Ve)}},[m.value===Y&&$.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(L(((pe=$.field)==null?void 0:pe.type)??"Input")),{key:0,modelValue:$.field.value,"onUpdate:modelValue":Ve=>$.field.value=Ve,isEdit:!0,disabled:(ze=$.field)==null?void 0:ze.disabled,content:((de=$.field)==null?void 0:de.contents)??[],optionUrl:$.field,originalValue:(Z=$.field)==null?void 0:Z.value,config:(he=$.field)==null?void 0:he.config,configModel:((ae=$.field)==null?void 0:ae.prop)??((ue=$.field)==null?void 0:ue.name),selectedTagList:((Se=$.field)==null?void 0:Se.selectValue)??[],onBlur:_,onBlurChange:_},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[$.isStatus?(a.openBlock(),a.createBlock(P,{key:0,type:$.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString($.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",V3,a.toDisplayString($.value??"-"),1))],64))],12,R3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",{key:2,class:"static-form-empty",style:a.normalizeStyle(y.value.empty)}," 暂无数据 ",4))],4)}}}),Ac=er._export_sfc(F3,[["__scopeId","data-v-d1c46c3f"]]),P3={class:"form-content"},j3={title:"选择标签"},H3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},U3={class:"col-operate-wrap"},q3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},W3={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(l,{emit:r}){const n=()=>{m.value=!1,p.value=!1,h.value=[]},i=l;a.computed(()=>{var W;const se=(W=Ke.value)==null?void 0:W.split("/");return(se==null?void 0:se.some(Be=>(Be==null?void 0:Be.includes("updateLoading"))||(Be==null?void 0:Be.includes("loading"))))?!1:Se.value==="view"});const s=r,c=a.ref([]),m=a.ref(!1),p=a.ref(!1),h=a.ref([]),{getFileExtension:y}=Co.useThreeSystem(),u=a.ref(),x=a.ref(!1),D=a.ref(!1),R=O.useUnit(O.pinia),{chooseTitle:E}=O.storeToRefs(R),K=a.ref([]),M=a.ref(),L=a.ref(!1),j=a.ref([]),C=dc(O.pinia),_=Tt(O.pinia),S=a.ref(!1),k=a.ref(),g=a.ref(),P=a.ref(),$=a.ref(),Y=a.ref(),pe=O.useLoginState(O.pinia),{loginUserInfo:ze}=O.storeToRefs(pe),de=a.ref(),Z=a.ref(!0),he=O.useModelComp(O.pinia),{tableViewContents:ae,itemData:ue,isEdit:Se,routeToChildPath:Ve,lockingPage:ge,homepageBackgroundTableId:T}=O.storeToRefs(he),q=a.ref(null),ne=a.ref(!1),Ne=a.ref(!1),we=O.useMenuState(),{activeMenuPath:Ke}=O.storeToRefs(we),ua=na.useOriginalState(O.pinia),{originalPath:za}=O.storeToRefs(ua),{compType:le,hasEditable:Te}=Xs.useRole(),Me=()=>!Te(i.config,{type:le.FORM});a.computed(()=>Ke.value==="设备管理/试验设备"&&i.compName==="设备概要");const Ue=async()=>{var W,Be,ke;const se=T==null?void 0:T.value,U=(W=ze==null?void 0:ze.value)==null?void 0:W.plat_id;if(!(!se||!U))try{const ra=await O.getAllTables({platId:parseInt(U),tableNames:[`content_${se}`,`struct_${se}`],user_unique_id:"0"}),oa=((ke=(Be=ra==null?void 0:ra.data)==null?void 0:Be.result)==null?void 0:ke[0])??[],_a=String((i==null?void 0:i.index)??""),ga=oa==null?void 0:oa.find(Pa=>String(Pa==null?void 0:Pa.relatedForm_id)===_a);ga!=null&&ga.backgroundImg_url&&($.value=ga.backgroundImg_url)}catch(ra){console.error("获取首页背景图片表数据失败:",ra)}},Re=a.ref([]),oe=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ie=async se=>{Ne.value=se,await fe("disabled",null,se,!0)},He=async se=>{await fe("operable",null,se,!0)};a.watch(()=>Ke.value,async()=>{c.value=[],h.value=[]},{deep:!0,immediate:!0});const Ba=()=>{a.nextTick(()=>{ee()})},Oa=se=>{var U;c.value=(U=c.value)==null?void 0:U.map(W=>({...W,isFormColHidden:!(se!=null&&se.includes(W.label))}))};a.onUnmounted(()=>{q.value=null});const V=se=>{s("clickTrigger",se)},H=async se=>{var U,W,Be,ke,ra,oa;if(se===""){let _a="";(U=c.value)==null||U.forEach(Oe=>{Oe!=null&&Oe.isMain&&(_a=Oe==null?void 0:Oe.value)});let ga=await na.getItemData(Ve.value,sessionStorage.getItem("systemKey"),"");_a=((oa=(ra=(ke=(Be=(W=ga==null?void 0:ga[0])==null?void 0:W.compData)==null?void 0:Be.find(Oe=>(Oe==null?void 0:Oe.key)==="mainRouters"))==null?void 0:ke.contents)==null?void 0:ra[0])==null?void 0:oa.routerContent)+za.value+_a;let ma=await na.getItemData(_a,sessionStorage.getItem("systemKey"),"");L.value=!0,j.value=ma==null?void 0:ma.filter(Oe=>(Oe==null?void 0:Oe.comp)!=="methodButton"),s("routeUrl",j.value)}},ee=()=>{var U;const se=(U=q.value)==null?void 0:U.$el;se&&Ze.Sortable.create(se,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:W=>{const{oldIndex:Be,newIndex:ke}=W;if(Be===ke)return;const ra=c.value.splice(Be,1)[0];c.value.splice(ke,0,ra)}})},fe=async(se,U,W,Be=!1)=>{try{he.setRefreshCurStructure(!1)}catch{Ya.ElMessage.error("编辑处理失败")}},me=async(se,U)=>{await fe()},fa=async(se,U)=>{se&&await fe()},Xe=async(se,U,W)=>{await fe(U,W,se,!1)},ce=(se,U)=>{de.value===U?Z.value=!1:Z.value=!0,de.value=U==null?void 0:U.changeProp},_e=async se=>{var oa;$.value=se;const U=i.itemData,W=U==null?void 0:U.find(_a=>(_a==null?void 0:_a.key)==="backGroundImage");W?W.contents=se:U==null||U.push({key:"backGroundImage",contents:se}),s("change",{key:"backGroundImage",contents:se});const Be=T==null?void 0:T.value,ke=i==null?void 0:i.index,ra=(oa=ze==null?void 0:ze.value)==null?void 0:oa.plat_id;if(!(!Be||!ra||!ke||!se))try{await O.pageBatchAddApi({platId:parseInt(ra),changeContents:[{tableName:`content_${Be}`,tableContents:[{backgroundImg_url:se,relatedForm_id:String(ke)}]}],user_unique_id:"0"})}catch(_a){console.error("保存背景图片记录失败:",_a),Ya.ElMessage.error("背景图片记录保存失败")}},va=async se=>{var W,Be,ke,ra,oa,_a,ga,Pa,ma,Oe,Ra,hl,Cl,Xl,xl;let U=[];if((W=se==null?void 0:se.toString())!=null&&W.includes(".urdf")){if(se.includes(",")){Ya.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[{url:se,extension:y(se)}],p.value=!0,m.value=!0;return}if((Be=se==null?void 0:se.toString())!=null&&Be.includes(".stl")||(ke=se==null?void 0:se.toString())!=null&&ke.includes(".STL")||(ra=se==null?void 0:se.toString())!=null&&ra.includes(".obj")||(oa=se==null?void 0:se.toString())!=null&&oa.includes(".mtl")){const Wa=((_a=se==null?void 0:se.toString())==null?void 0:_a.split(",")).map(Rl=>({url:Rl,extension:y(Rl)}));h.value=Wa,p.value=!1,m.value=!0;return}if((ga=se==null?void 0:se.toString())!=null&&ga.includes(".stl")||(Pa=se==null?void 0:se.toString())!=null&&Pa.includes(".STL")||(ma=se==null?void 0:se.toString())!=null&&ma.includes(".obj")||(Oe=se==null?void 0:se.toString())!=null&&Oe.includes(".mtl")){let Vl,Wa=[],Rl={};if(Array.isArray(se)?Vl=se:Vl=se==null?void 0:se.split(","),Vl==null||Vl.forEach(ja=>{ja.includes(".mtl")?Wa.push(ja):Rl.blob=Rl.blob?Rl.blob+","+ja:ja}),(Wa==null?void 0:Wa.length)>0&&(Rl.mtlBlobs=Wa),(hl=(Ra=Object.values(Rl))==null?void 0:Ra[0])!=null&&hl.includes("http:"))U.push(Rl);else{const ja=new Blob([Rl.blob],{type:"application/octet-stream;charset=UTF-8"});let ka=URL.createObjectURL(ja),Na="";(Cl=se==null?void 0:se.split("/"))==null||Cl.forEach(($a,Xa)=>{var Za;Xa===((Za=se==null?void 0:se.split("/"))==null?void 0:Za.length)-1&&(Na=$a)}),(Xl=Rl.blob)!=null&&Xl.includes(".stl")&&(Na=(Na==null?void 0:Na.replaceAll(">",""))+".urdf"),M.value=[{name:Na,blobUrl:ka}],D.value=!0}}else{const Vl=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Wa=await Ya.axios.get(se,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Vl.close()}),Rl=new Blob([Wa.data],{type:"application/octet-stream;charset=UTF-8"});let ja=URL.createObjectURL(Rl),ka="";(xl=se==null?void 0:se.split("/"))==null||xl.forEach((Na,$a)=>{var Xa;$a===((Xa=se==null?void 0:se.split("/"))==null?void 0:Xa.length)-1&&(ka=Na)}),M.value=[{name:ka,blobUrl:ja}],D.value=!0}(U==null?void 0:U.length)>0&&_.setBlobUrls(U)},qe=()=>{D.value=!1},La=se=>{var ra,oa,_a,ga;const U=(oa=(ra=tl.safeClone(i.itemData))==null?void 0:ra.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent"))==null?void 0:oa.contents,W=tl.safeClone(se.content);let Be={};W&&((_a=Object.values(W))==null?void 0:_a.length)>0&&((ga=Object.values(W))==null||ga.forEach((Pa,ma)=>{Be[U[ma].key]=Pa}));const ke={content:Be,index:i==null?void 0:i.index,buttonName:se==null?void 0:se.buttonName};s("change",ke)};a.computed(()=>"http://222.92.178.198:62001");const Ma=async se=>{var Ra,hl,Cl,Xl,xl,Vl,Wa,Rl,ja,ka,Na,$a,Xa,Za,aa,Va;if(!se)return;(hl=(Ra=i==null?void 0:i.itemData)==null?void 0:Ra.find(ye=>(ye==null?void 0:ye.key)==="parentFormPath"))==null||hl.contents;let U=ae.value;(U==null?void 0:U.length)>0&&(U=U==null?void 0:U.map(ye=>{var Le,re,ea,pa;let xa=(Le=ye==null?void 0:ye.key)==null?void 0:Le.split("/");return(i==null?void 0:i.compName)===(xa==null?void 0:xa[0])&&(re=c.value)!=null&&re.find(We=>(We==null?void 0:We.prop)===(xa==null?void 0:xa[1]))&&(ye.value=(pa=(ea=c.value)==null?void 0:ea.find(We=>(We==null?void 0:We.prop)===(xa==null?void 0:xa[1])))==null?void 0:pa.value),ye}),he.setTableViewContents(U));const W=tl.safeClone(i.itemData);let Be=W==null?void 0:W.map(ye=>{var xa;return(ye==null?void 0:ye.key)==="formContent"&&((xa=ye.contents)==null||xa.map((Le,re)=>{var ea,pa,We,Sa,ya,ml,Ha,Ka,wa,cl,Ia,Ae,Dl,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr;return Le.type=(pa=(ea=c.value)==null?void 0:ea.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:pa.type,Le.options=Le!=null&&Le.options?Le.options:((ya=(Sa=(We=Le==null?void 0:Le.key)==null?void 0:We.split("$"))==null?void 0:Sa[1])==null?void 0:ya.length)>0?(wa=(Ka=Ru((Ha=(ml=Le==null?void 0:Le.key)==null?void 0:ml.split("$"))==null?void 0:Ha[1]))==null?void 0:Ka.split(","))==null?void 0:wa.map(Ul=>({label:Ul,value:Ul})):[],(cl=Le==null?void 0:Le.key)!=null&&cl.includes("$")&&(Le.key=(Ae=(Ia=Le==null?void 0:Le.key)==null?void 0:Ia.split("$"))==null?void 0:Ae[0]),Le.signature=(Ol=(Dl=c.value)==null?void 0:Dl.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Ol.signature,Le.isLoginUser=(Hl=(Gl=c.value)==null?void 0:Gl.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Hl.isLoginUser,Le.value=(Zl=Object.values(se))==null?void 0:Zl[re],Le.isFormColHidden=(Fl=(Sr=c.value)==null?void 0:Sr.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Fl.isFormColHidden,Le.isHideInForm=(Fr=(fr=c.value)==null?void 0:fr.find(Ul=>(Ul==null?void 0:Ul.prop)===(Le==null?void 0:Le.prop)))==null?void 0:Fr.isHideInForm,Le})),ye}),ke=c.value,ra=(Xl=(Cl=tl.safeClone(Be))==null?void 0:Cl.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Xl.contents;if(ke=ke==null?void 0:ke.map(ye=>{var xa,Le;return(ye==null?void 0:ye.type)==="Select"&&((xa=ye==null?void 0:ye.allSelectionContents)==null?void 0:xa.length)>0&&(ye.contactValue=se),ye.value=(Le=ra==null?void 0:ra.find((re,ea)=>((re==null?void 0:re.id)??ea)===(ye==null?void 0:ye.id)))==null?void 0:Le.value,ye}),!Z.value){s("contentChange",{contents:Be,index:i.index});return}let oa="",_a=(Wa=(Vl=(xl=tl.safeClone(Be))==null?void 0:xl.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Vl.contents)==null?void 0:Wa.find((ye,xa)=>{var Le,re,ea;return(ye==null?void 0:ye.label)===de.value||xa.toString()===((ea=(re=(Le=de.value)==null?void 0:Le.split("t"))==null?void 0:re[1])==null?void 0:ea.toString())}),ga=(Rl=_a==null?void 0:_a.optionUrl)==null?void 0:Rl.menuSelect,Pa=!0;if((Na=(ka=(ja=tl.safeClone(Be))==null?void 0:ja.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:ka.contents)==null||Na.forEach(ye=>{var xa,Le,re,ea,pa,We;Pa&&((re=(Le=(xa=ye==null?void 0:ye.optionUrl)==null?void 0:xa.groupSelect)==null?void 0:Le[1])!=null&&re.includes("["))&&(oa=(pa=(ea=ye==null?void 0:ye.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:pa[1],JSON.stringify(ga)===JSON.stringify((We=ye==null?void 0:ye.optionUrl)==null?void 0:We.menuSelect)&&(Pa=!1))}),($a=_a==null?void 0:_a.optionUrl)!=null&&$a.menuSelect&&Z.value){let ye=await kt(_a),xa,Le=(Xa=_a==null?void 0:_a.optionUrl)==null?void 0:Xa.menuSelect;if(ye==null||ye.forEach(re=>{var ea,pa,We,Sa,ya,ml,Ha,Ka,wa,cl;oa===((pa=(ea=_a==null?void 0:_a.optionUrl)==null?void 0:ea.groupSelect)==null?void 0:pa[1])&&((ya=(Sa=(We=_a==null?void 0:_a.optionUrl)==null?void 0:We.groupSelect)==null?void 0:Sa[1])!=null&&ya.includes("["))&&((cl=tl.safeClone(re))==null?void 0:cl[(wa=(Ka=(Ha=(ml=_a==null?void 0:_a.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:Ha[1])==null?void 0:Ka.replaceAll("[",""))==null?void 0:wa.replaceAll("]","")])===(_a==null?void 0:_a.value)&&(xa=re)}),xa){let re=tl.safeClone(ke);re=re==null?void 0:re.map(pa=>{var We,Sa,ya,ml,Ha,Ka,wa,cl,Ia,Ae,Dl;return(xa!=null&&xa[pa==null?void 0:pa.label]||xa!=null&&xa[(ml=(ya=(Sa=(We=pa==null?void 0:pa.optionUrl)==null?void 0:We.groupSelect)==null?void 0:Sa[1])==null?void 0:ya.replaceAll("[",""))==null?void 0:ml.replaceAll("]","")])&&((wa=(Ka=(Ha=pa==null?void 0:pa.optionUrl)==null?void 0:Ha.groupSelect)==null?void 0:Ka[1])!=null&&wa.includes("["))&&Le!=null&&Le.every(Ol=>{var Gl,Hl;return(Hl=(Gl=pa==null?void 0:pa.optionUrl)==null?void 0:Gl.menuSelect)==null?void 0:Hl.includes(Ol)})&&(pa.value=(xa==null?void 0:xa[pa==null?void 0:pa.label])||(xa==null?void 0:xa[(Dl=(Ae=(Ia=(cl=pa==null?void 0:pa.optionUrl)==null?void 0:cl.groupSelect)==null?void 0:Ia[1])==null?void 0:Ae.replaceAll("[",""))==null?void 0:Dl.replaceAll("]","")]),Array.isArray(pa.value)&&pa.value.every(Ol=>(Ol==null?void 0:Ol.url)&&(Ol==null?void 0:Ol.name))&&(pa.type="Upload")),pa}),re=re==null?void 0:re.map(pa=>{var We,Sa,ya;return(We=pa==null?void 0:pa.optionUrl)!=null&&We.oldMenuSelect&&(pa.optionUrl.menuSelect=(ya=(Sa=tl.safeClone(pa))==null?void 0:Sa.optionUrl)==null?void 0:ya.oldMenuSelect),pa}),c.value=tl.safeClone(re);let ea=tl.safeClone(re);ea=ea==null?void 0:ea.map(pa=>{var We,Sa,ya,ml,Ha,Ka;return(Sa=(We=pa==null?void 0:pa.optionUrl)==null?void 0:We.menuSelect)!=null&&Sa.some(wa=>wa==null?void 0:wa.includes("["))&&(pa.optionUrl.oldMenuSelect=(ml=(ya=tl.safeClone(pa))==null?void 0:ya.optionUrl)==null?void 0:ml.menuSelect,pa.optionUrl.menuSelect=(Ka=(Ha=pa==null?void 0:pa.optionUrl)==null?void 0:Ha.menuSelect)==null?void 0:Ka.map(wa=>{var cl,Ia,Ae,Dl;if(wa!=null&&wa.includes("[")){let Ol=(Ia=(cl=wa==null?void 0:wa.replaceAll("[","").replaceAll("]",""))==null?void 0:cl.split(":"))==null?void 0:Ia[1];wa=(Dl=(Ae=tl.safeClone(re))==null?void 0:Ae.find(Gl=>(Gl==null?void 0:Gl.label)===Ol))==null?void 0:Dl.value}return wa})),pa}),c.value=ea}else c.value=ke;Be=Be==null?void 0:Be.map(re=>{var ea;return(re==null?void 0:re.key)==="formContent"&&(re.contents=(ea=re.contents)==null?void 0:ea.map(pa=>{var We,Sa,ya,ml;return pa.value=((Sa=(We=c.value)==null?void 0:We.find(Ha=>(Ha==null?void 0:Ha.label)===(pa==null?void 0:pa.key)))==null?void 0:Sa.value)??(pa==null?void 0:pa.value),pa.type=((ml=(ya=c.value)==null?void 0:ya.find(Ha=>(Ha==null?void 0:Ha.prop)===(pa==null?void 0:pa.key)))==null?void 0:ml.type)??(pa==null?void 0:pa.type),pa})),re})}Z.value=!1,s("contentChange",{contents:Be,index:i.index});let ma=[],Oe=[];if((aa=tl.safeClone((Za=Be==null?void 0:Be.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:Za.contents))==null||aa.forEach(ye=>{var xa;Array.isArray(ye==null?void 0:ye.value)&&((xa=ye==null?void 0:ye.value)!=null&&xa.find(Le=>{var re;return(re=Le==null?void 0:Le.url)==null?void 0:re.includes(".obj")}))&&(Oe=ye==null?void 0:ye.value)}),(Oe==null?void 0:Oe.length)>0){const ye=(Va=tl.safeClone(Oe))==null?void 0:Va.filter(xa=>{var Le;return(Le=xa==null?void 0:xa.url)==null?void 0:Le.includes(".obj")});ye==null||ye.forEach(xa=>{var re,ea,pa,We;const Le=(re=Oe==null?void 0:Oe.filter(Sa=>{var ya;return(Sa==null?void 0:Sa.name)===(xa==null?void 0:xa.name)&&((ya=Sa==null?void 0:Sa.url)==null?void 0:ya.includes(".mtl"))}))==null?void 0:re.map(Sa=>Sa==null?void 0:Sa.url);ma.push({objUrl:xa==null?void 0:xa.url,mtlUrls:((ea=Oe==null?void 0:Oe.filter(Sa=>{var ya;return(Sa==null?void 0:Sa.name)===(xa==null?void 0:xa.name)&&((ya=Sa==null?void 0:Sa.url)==null?void 0:ya.includes(".mtl"))}))==null?void 0:ea.length)===1?(We=(pa=Oe==null?void 0:Oe.filter(Sa=>{var ya;return(Sa==null?void 0:Sa.name)===(xa==null?void 0:xa.name)&&((ya=Sa==null?void 0:Sa.url)==null?void 0:ya.includes(".mtl"))}))==null?void 0:pa[0])==null?void 0:We.url:Le})}),_.setObjUrl(ma)}},Je=(se,U,W)=>{let Be="";const ke=U==null?void 0:U.map(ra=>{var oa;return(oa=ra==null?void 0:ra.value)==null?void 0:oa.pageData});return ke==null||ke.forEach(ra=>{var oa;(ra==null?void 0:ra.name)===(se==null?void 0:se[0])&&((oa=ra==null?void 0:ra.compData)==null||oa.forEach(_a=>{var ga;(_a==null?void 0:_a.key)==="formContent"&&((ga=_a==null?void 0:_a.contents)==null||ga.forEach(Pa=>{var ma;(Pa==null?void 0:Pa.prop)===(se==null?void 0:se[1])&&(Be=(Pa==null?void 0:Pa.value)===""?na.judgeContents((ma=tl.safeClone(Pa))==null?void 0:ma.optionUrl,W):Pa==null?void 0:Pa.value)}))}))}),Be},ia=(se,U,W,Be)=>{var _a,ga;let ke="",ra="";(_a=tl.safeClone(U))==null||_a.forEach((Pa,ma)=>{Pa!=null&&Pa.includes("[")?ra=ra+za.value+se[ma]:ra=ra===""?ra+Pa:ra+"/"+Pa});let oa=(ga=Be[ra])==null?void 0:ga.map(Pa=>{var ma;return(ma=Pa==null?void 0:Pa.value)==null?void 0:ma.pageData});return oa==null||oa.forEach(Pa=>{var ma;(Pa==null?void 0:Pa.name)===(W==null?void 0:W[0])&&((ma=Pa==null?void 0:Pa.compData)==null||ma.forEach(Oe=>{var Ra;(Oe==null?void 0:Oe.key)==="formContent"&&((Ra=Oe==null?void 0:Oe.contents)==null||Ra.forEach(hl=>{(hl==null?void 0:hl.prop)===(W==null?void 0:W[1])&&(ke=hl==null?void 0:hl.value)}))}))}),ke};return a.watch(()=>T==null?void 0:T.value,async()=>{await Ue()},{immediate:!0}),a.watch(()=>i.itemData,async()=>{var Ra,hl,Cl,Xl,xl,Vl,Wa,Rl,ja,ka,Na,$a,Xa,Za,aa,Va,ye,xa,Le,re,ea,pa,We;const se=(Ra=i.itemData)==null?void 0:Ra.find(Sa=>(Sa==null?void 0:Sa.key)==="formContent"),U=(hl=tl.safeClone(i.itemData))==null?void 0:hl.find(Sa=>(Sa==null?void 0:Sa.key)==="formButton"),W=(Cl=tl.safeClone(i.itemData))==null?void 0:Cl.find(Sa=>(Sa==null?void 0:Sa.key)==="formFlex"),Be=(Xl=tl.safeClone(i.itemData))==null?void 0:Xl.find(Sa=>(Sa==null?void 0:Sa.key)==="formWrap"),ke=(xl=tl.safeClone(i.itemData))==null?void 0:xl.find(Sa=>(Sa==null?void 0:Sa.key)==="enableWrap"),ra=(Vl=tl.safeClone(i.itemData))==null?void 0:Vl.find(Sa=>(Sa==null?void 0:Sa.key)==="textSize"),oa=(Wa=tl.safeClone(i.itemData))==null?void 0:Wa.find(Sa=>(Sa==null?void 0:Sa.key)==="textRGBA"),_a=(Rl=tl.safeClone(i.itemData))==null?void 0:Rl.find(Sa=>(Sa==null?void 0:Sa.key)==="backGround"),ga=(ja=tl.safeClone(i.itemData))==null?void 0:ja.find(Sa=>(Sa==null?void 0:Sa.key)==="backGroundImage");(Be==null?void 0:Be.contents)==="纵向"?x.value=!1:x.value=!0;const Pa=Number(ra==null?void 0:ra.contents);k.value=Number.isNaN(Pa)?void 0:Pa,g.value=oa==null?void 0:oa.contents,P.value=_a==null?void 0:_a.contents,$.value=ga==null?void 0:ga.contents;const ma=ke==null?void 0:ke.contents;if(ma===void 0?S.value=ti.BLOCK:typeof ma=="boolean"?S.value=ma?ti.ORDINARY:ti.BLOCK:S.value=ma,Y.value=typeof(W==null?void 0:W.contents)!="boolean"?!(!(W!=null&&W.contents)===""||((ka=W==null?void 0:W.contents)==null?void 0:ka.toUpperCase())==="VERTICAL"):W==null?void 0:W.contents,((Na=se==null?void 0:se.contents)==null?void 0:Na.length)>0&&Array.isArray(se==null?void 0:se.contents)){let Sa=i.allMapContents;const ya=(Xa=($a=tl.safeClone(se))==null?void 0:$a.contents)==null?void 0:Xa.map((Ae,Dl)=>{var Ar,yr,zr,Mr,ir,xn,Yr,rn,zn,wn,gn,nn,ar;let Ol=(Ae==null?void 0:Ae.label)??(Ae==null?void 0:Ae.key)??"";Ae==null||Ae.type;let Gl=(Ae==null?void 0:Ae.options)??[];if((Ar=Ae==null?void 0:Ae.key)!=null&&Ar.includes("$")&&(Ol=(yr=tl.safeClone(Ae==null?void 0:Ae.key).split("$"))==null?void 0:yr[0],((Mr=(zr=tl.safeClone(Ae==null?void 0:Ae.key).split("$"))==null?void 0:zr[1])==null?void 0:Mr.length)>0)){const[ql,zl]=(xn=(ir=tl.safeClone(Ae==null?void 0:Ae.key).split("$"))==null?void 0:ir[1])==null?void 0:xn.split(/[()]/);(Yr=na.FormType.find(Ll=>(Ll==null?void 0:Ll.key)===ql))==null||Yr.value,((rn=zl==null?void 0:zl.split(","))==null?void 0:rn.length)>0&&(Gl=(zn=zl==null?void 0:zl.split(","))==null?void 0:zn.map(Ll=>({label:Ll,value:Ll})))}let Hl=Ae==null?void 0:Ae.options;((wn=Ae==null?void 0:Ae.optionUrl)==null?void 0:wn.selectRelateType)==="自定义绑定"&&(Hl=(nn=(gn=Ae==null?void 0:Ae.optionUrl)==null?void 0:gn.defaultSelect)==null?void 0:nn.map(ql=>({label:ql,value:ql})));let Zl=(Ae==null?void 0:Ae.menuPath)??[],Sr=(Ae==null?void 0:Ae.groups)??[],Fl=(Ae==null?void 0:Ae.columns)??[],fr=!1,Fr=(Ae==null?void 0:Ae.isFormColHidden)??!1,Ul="",rr=Ae!=null&&Ae.value?Ae.value:(Hl==null?void 0:Hl.length)>0?(ar=Hl==null?void 0:Hl[0])==null?void 0:ar.value:(Ae==null?void 0:Ae.value)??"",$r=!1,Tr="Input";return((Hl==null?void 0:Hl.length)>0||(Zl==null?void 0:Zl.length)>0)&&(Tr="Select"),(Array.isArray(Ul)&&(Ul!=null&&Ul.every(ql=>(ql==null?void 0:ql.name)&&(ql==null?void 0:ql.url)))||Array.isArray(rr)&&(rr!=null&&rr.every(ql=>(ql==null?void 0:ql.name)&&(ql==null?void 0:ql.url))))&&(Tr="upload"),Ae!=null&&Ae.isMainUrl&&(Tr="Url"),{label:Ol??"",name:Ol??"t"+Dl,prop:Ol??tl.safeClone(Ae==null?void 0:Ae.key),type:(Ae==null?void 0:Ae.type)??Tr,value:(Ae==null?void 0:Ae.type)==="Date"&&rr===""?new Date:rr,id:(Ae==null?void 0:Ae.id)??Dl,contents:(Hl==null?void 0:Hl.length)>0?Hl:Gl??[],width:(Ae==null?void 0:Ae.width)??1,isLoginUser:fr,config:Ae==null?void 0:Ae.config,optionUrl:(Ae==null?void 0:Ae.optionUrl)??Ae,isFormColHidden:Fr,isHideInForm:(Ae==null?void 0:Ae.isHideInForm)??!1,signature:$r,isMain:Ae==null?void 0:Ae.isMain,required:(Ae==null?void 0:Ae.required)??!1,isMainUrl:Ae==null?void 0:Ae.isMainUrl,operable:(Ae==null?void 0:Ae.operable)??!1,disabled:(Ae==null?void 0:Ae.disabled)??!1,isSync:Ae==null?void 0:Ae.isSync,menus:Zl,groups:Sr,words:Fl,allSelectionContents:Ae==null?void 0:Ae.allContents,filterContent:Ae==null?void 0:Ae.filterContents,isNoClick:(Ae==null?void 0:Ae.isNoClick)??!1}}),ml=ya==null?void 0:ya.map(Ae=>Ae==null?void 0:Ae.value);let Ha="";ml==null||ml.forEach(Ae=>{Ae!==""&&Ae!==void 0&&(Ha=Ha===""?Ae:Ha+"/"+Ae)}),C.setSelectArray(ml),C.setSelectString(Ha);let Ka=(Za=tl.safeClone(ya))==null?void 0:Za.map(Ae=>(Ae!=null&&Ae.value&&na.IsJson(Ae==null?void 0:Ae.value)&&Array.isArray(JSON.parse(Ae==null?void 0:Ae.value))&&(Ae.value=JSON.parse(Ae.value)),Ae)),wa={};Ka==null||Ka.forEach(Ae=>{wa[Ae.label]=Ae==null?void 0:Ae.value}),Ka=Ka==null?void 0:Ka.map(Ae=>{var Dl,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr;if((Ae==null?void 0:Ae.type)==="Select"&&((Dl=Ae==null?void 0:Ae.allSelectionContents)==null?void 0:Dl.length)>0&&(Ae.contactValue=wa),(Gl=(Ol=Ae==null?void 0:Ae.optionUrl)==null?void 0:Ol.menuSelect)!=null&&Gl.some(Ul=>Ul==null?void 0:Ul.includes("["))){let Ul="";Ae.optionUrl.oldMenuSelect=(Zl=(Hl=tl.safeClone(Ae))==null?void 0:Hl.optionUrl)==null?void 0:Zl.menuSelect,Ae.optionUrl.menuSelect=(Fl=(Sr=Ae==null?void 0:Ae.optionUrl)==null?void 0:Sr.menuSelect)==null?void 0:Fl.map(rr=>{var $r,Tr,Rr,Ar,yr,zr;if(rr!=null&&rr.includes("[")){let Mr=(Tr=($r=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:$r.split(":"))==null?void 0:Tr[1];Ul=Je((Rr=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:Rr.split(":"),Sa==null?void 0:Sa[Ke.value],Sa),rr=((yr=(Ar=tl.safeClone(Ka))==null?void 0:Ar.find(ir=>(ir==null?void 0:ir.label)===Mr))==null?void 0:yr.value)||Je((zr=rr==null?void 0:rr.replaceAll("[","").replaceAll("]",""))==null?void 0:zr.split(":"),Sa==null?void 0:Sa[Ke.value],Sa)}return rr}),Ul!==""&&Ae.value===""&&(Ae.value=ia(Ae.optionUrl.menuSelect,Ae.optionUrl.oldMenuSelect,(fr=Ae==null?void 0:Ae.optionUrl)==null?void 0:fr.groupSelect,Sa),Array.isArray(Ae.value)&&((Fr=Ae.value)!=null&&Fr.every(rr=>rr==null?void 0:rr.url))&&(Ae.type="UPLOAD"))}return Ae}),c.value=Ka,Ne.value=((aa=c.value)==null?void 0:aa.every(Ae=>Ae==null?void 0:Ae.disabled))||ge.value===Ke.value,ne.value=(Va=c.value)==null?void 0:Va.every(Ae=>Ae==null?void 0:Ae.operable),Re.value=(ye=c.value)==null?void 0:ye.map(Ae=>Ae==null?void 0:Ae.label);let cl=[],Ia=[];if((xa=tl.safeClone(c.value))==null||xa.forEach(Ae=>{var Dl;Array.isArray(Ae==null?void 0:Ae.value)&&((Dl=Ae==null?void 0:Ae.value)!=null&&Dl.find(Ol=>{var Gl;return(Gl=Ol==null?void 0:Ol.url)==null?void 0:Gl.includes(".obj")}))&&(Ia=Ae==null?void 0:Ae.value)}),(Ia==null?void 0:Ia.length)>0){const Ae=(Le=tl.safeClone(Ia))==null?void 0:Le.filter(Dl=>{var Ol;return(Ol=Dl==null?void 0:Dl.url)==null?void 0:Ol.includes(".obj")});Ae==null||Ae.forEach(Dl=>{var Gl,Hl,Zl,Sr;const Ol=(Gl=Ia==null?void 0:Ia.filter(Fl=>{var fr;return(Fl==null?void 0:Fl.name)===(Dl==null?void 0:Dl.name)&&((fr=Fl==null?void 0:Fl.url)==null?void 0:fr.includes(".mtl"))}))==null?void 0:Gl.map(Fl=>Fl==null?void 0:Fl.url);cl.push({objUrl:Dl==null?void 0:Dl.url,mtlUrls:((Hl=Ia==null?void 0:Ia.filter(Fl=>{var fr;return(Fl==null?void 0:Fl.name)===(Dl==null?void 0:Dl.name)&&((fr=Fl==null?void 0:Fl.url)==null?void 0:fr.includes(".mtl"))}))==null?void 0:Hl.length)===1?(Sr=(Zl=Ia==null?void 0:Ia.filter(Fl=>{var fr;return(Fl==null?void 0:Fl.name)===(Dl==null?void 0:Dl.name)&&((fr=Fl==null?void 0:Fl.url)==null?void 0:fr.includes(".mtl"))}))==null?void 0:Zl[0])==null?void 0:Sr.url:Ol})}),_.setObjUrl(cl)}(re=tl.safeClone(c.value))==null||re.forEach(Ae=>{var Dl,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr,Ul,rr,$r,Tr;if((Ol=(Dl=Ae==null?void 0:Ae.value)==null?void 0:Dl.toString())!=null&&Ol.includes(".stl")||(Hl=(Gl=Ae==null?void 0:Ae.value)==null?void 0:Gl.toString())!=null&&Hl.includes(".STL")||(Sr=(Zl=Ae==null?void 0:Ae.value)==null?void 0:Zl.toString())!=null&&Sr.includes(".obj")||(fr=(Fl=Ae==null?void 0:Ae.value)==null?void 0:Fl.toString())!=null&&fr.includes(".mtl")||(Ul=(Fr=Ae==null?void 0:Ae.value)==null?void 0:Fr.toString())!=null&&Ul.includes(".urdf")){let Rr={},Ar=[],yr;Array.isArray(Ae==null?void 0:Ae.value)?yr=Ae==null?void 0:Ae.value:yr=(rr=Ae==null?void 0:Ae.value)==null?void 0:rr.split(","),yr==null||yr.forEach(zr=>{zr.includes(".mtl")?Ar.push(zr):Rr.blob=Rr.blob==="undefined"?zr:Rr.blob+","+zr}),(Ar==null?void 0:Ar.length)>0&&(Rr.mtlBlobs=Ar),(Tr=($r=Object.values(Rr))==null?void 0:$r[0])!=null&&Tr.includes("http:")}})}else c.value=[];let Oe=ae.value;if((Oe==null?void 0:Oe.length)>0&&(Oe=Oe==null?void 0:Oe.map(Sa=>{var ml,Ha,Ka,wa;let ya=(ml=Sa==null?void 0:Sa.key)==null?void 0:ml.split("/");return(i==null?void 0:i.compName)===(ya==null?void 0:ya[0])&&(Ha=c.value)!=null&&Ha.find(cl=>(cl==null?void 0:cl.prop)===(ya==null?void 0:ya[1]))&&(Sa.value=(wa=(Ka=c.value)==null?void 0:Ka.find(cl=>(cl==null?void 0:cl.prop)===(ya==null?void 0:ya[1])))==null?void 0:wa.value),Sa}),he.setTableViewContents(Oe)),i!=null&&i.formRules)u.value=i==null?void 0:i.formRules;else{let Sa={};(ea=tl.safeClone(c).value)==null||ea.forEach(ya=>{((ya==null?void 0:ya.isMain)===!0||(ya==null?void 0:ya.required)===!0)&&(Sa[(ya==null?void 0:ya.prop)??(ya==null?void 0:ya.name)]=[{required:!0,message:`${(ya==null?void 0:ya.label)||(ya==null?void 0:ya.prop)||(ya==null?void 0:ya.name)}不能为空`}])}),u.value=Sa}if(((pa=U==null?void 0:U.contents)==null?void 0:pa.length)>0){const Sa=[];(We=U==null?void 0:U.contents)==null||We.forEach((ya,ml)=>{(ya==null?void 0:ya.label)!==""&&Sa.push({label:(ya==null?void 0:ya.label)??"",id:(ya==null?void 0:ya.id)??ml,type:(ya==null?void 0:ya.type)??"",background:ya==null?void 0:ya.background})}),K.value=Sa}else K.value=[]},{deep:!0,immediate:!0}),a.watch(()=>ge.value,se=>{Ne.value=se===Ke.value},{immediate:!0}),(se,U)=>{var _a;const W=a.resolveComponent("svg-icon"),Be=a.resolveComponent("el-switch"),ke=a.resolveComponent("el-checkbox"),ra=a.resolveComponent("el-popover"),oa=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",P3,[S.value===a.unref(ti).TEXT?(a.openBlock(),a.createBlock(Ac,{key:0,itemData:l.itemData,compName:l.compName,fields:c.value,textSize:k.value,textColor:g.value,backGround:P.value,backGroundImage:$.value,disabled:Ne.value||Me(),"onUpdate:backGroundImage":_e},null,8,["itemData","compName","fields","textSize","textColor","backGround","backGroundImage","disabled"])):S.value===a.unref(ti).BLOCK?(a.openBlock(),a.createBlock(Cf,{key:1,items:(_a=c.value)==null?void 0:_a.map(ga=>({label:ga!=null&&ga.isHideInForm?"":ga==null?void 0:ga.label,value:ga==null?void 0:ga.value,width:(ga==null?void 0:ga.width)??1,field:ga})),textSize:k.value,textColor:g.value,backGround:P.value,backGroundImage:$.value,disabled:Ne.value||Me(),"onUpdate:backGroundImage":_e},null,8,["items","textSize","textColor","backGround","backGroundImage","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":S.value===a.unref(ti).ORDINARY})},[a.createVNode(tl.ssForm,{rowContents:c.value,formRules:u.value,buttonValue:K.value,isRowFlex:!1,isEnableWrap:!0,textSize:k.value,textColor:g.value,backGround:P.value,backGroundImage:$.value,onOnButtonClick:La,onChange:Ma,formDisabled:Ne.value||Me(),formLabelsOperable:ne.value,isButtonRow:x.value,onPreview:va,onBlurChange:ce,onHandleColEditChange:me,onHandleColTypeChange:fa,onRouteUrl:H,onClickTrigger:V,"onUpdate:backGroundImage":_e},{operateCol:a.withCtx(({renderColumns:ga,formDisabled:Pa,formLabelsOperable:ma})=>[a.createVNode(ra,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ba},{reference:a.withCtx(()=>[a.createElementVNode("span",j3,[a.createVNode(W,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",H3,[U[1]||(U[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(Be,{"model-value":Pa,"active-text":"禁用","inactive-text":"",onChange:Ie,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(Be,{"model-value":ma,"active-text":"编辑所有标签","inactive-text":"",onChange:He},null,8,["model-value"]),U[2]||(U[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(oa,{modelValue:Re.value,"onUpdate:modelValue":U[0]||(U[0]=Oe=>Re.value=Oe),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:q,onChange:Oa},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ga,Oe=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Oe.label},[a.createVNode(ke,{value:Oe.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(Oe.label),1)]),_:2},1032,["value"]),a.createVNode(ra,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(W,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Ra;return[a.createElementVNode("div",U3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ra=Object.keys(Oe))==null?void 0:Ra.filter(hl=>{var Cl;return(Cl=oe.value)==null?void 0:Cl.find(Xl=>(Xl==null?void 0:Xl.value)===hl)}),hl=>{var Cl,Xl;return a.openBlock(),a.createElementBlock("div",{key:hl},[a.createVNode(tl._sfc_main$1,{value:Oe==null?void 0:Oe[hl],"active-text":(Xl=(Cl=oe.value)==null?void 0:Cl.find(xl=>(xl==null?void 0:xl.value)===hl))==null?void 0:Xl.label,inactiveText:"",onChange:xl=>Xe(xl,hl,Oe)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",q3,[a.createVNode(W,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","backGround","backGroundImage","formDisabled","formLabelsOperable","isButtonRow"])],2)),D.value?(a.openBlock(),a.createBlock(tl.ssFilePreview,{key:3,fileDataList:M.value,onDestroy:qe},null,8,["fileDataList"])):a.createCommentVNode("",!0),m.value?(a.openBlock(),a.createBlock(_r.ssDialog,{key:4,visible:m.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(Co.ThreeViewerHost,{files:h.value,onGetAnimationData:se.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},ws=er._export_sfc(W3,[["__scopeId","data-v-7bb009b3"]]),Oo=a.ref(0),zc=l=>{var r;return!l||(l==null?void 0:l.length)===0?[]:(r=O.cloneDeep(l))==null?void 0:r.map(i=>(Oo.value++,i={label:(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":i==null?void 0:i.prop,width:i!=null&&i.width?parseInt(i.width):"",fixed:(i==null?void 0:i.fixed)??void 0,sortable:(i==null?void 0:i.sortable)??!1,align:(i==null?void 0:i.align)??"left",showOverflowTooltip:(i==null?void 0:i.showOverflowTooltip)??!0,isNotDrag:(i==null?void 0:i.isNotDrag)??!1,isEditCol:(i==null?void 0:i.isEditCol)??!1,isOperate:(i==null?void 0:i.isOperate)??!1,id:(i==null?void 0:i.id)??Oo.value,children:zc(i==null?void 0:i.children)},i))},K3=l=>{var n;return(n=O.cloneDeep(l))==null?void 0:n.map(i=>(Oo.value++,i={label:(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":i==null?void 0:i.prop,width:i!=null&&i.width?parseInt(i.width):"",fixed:(i==null?void 0:i.fixed)??void 0,sortable:(i==null?void 0:i.sortable)??!1,align:(i==null?void 0:i.align)??"left",showOverflowTooltip:(i==null?void 0:i.showOverflowTooltip)??!0,isNotDrag:(i==null?void 0:i.isNotDrag)??!1,isEditCol:(i==null?void 0:i.isEditCol)??!1,isOperate:(i==null?void 0:i.isOperate)??!1,id:(i==null?void 0:i.id)??Oo.value,children:zc(i==null?void 0:i.children)},i))},Mc=(l,r)=>{var n;return l!=null&&l.find(i=>(i==null?void 0:i.id)===r)?(n=O.cloneDeep(l))==null?void 0:n.filter(s=>(s==null?void 0:s.id)!==r):(l=l==null?void 0:l.map(i=>(i.children=Mc(i==null?void 0:i.children,r),i)),l)},Ic=(l,r)=>{var n;return l!=null&&l.find(i=>(i==null?void 0:i.id)===(r==null?void 0:r.id))?(n=O.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s=r),s)):(l=l==null?void 0:l.map(i=>(i.children=Ic(i==null?void 0:i.children,r),i)),l)},Oc=(l,r)=>{var n;return l!=null&&l.find(i=>{var s;return(i==null?void 0:i.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)})?(n=O.cloneDeep(l))==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)&&(s=r==null?void 0:r.contents),s}):(l=l==null?void 0:l.map(i=>(i.children=Oc(i==null?void 0:i.children,r),i)),l)},Lc=(l,r)=>{var n;return l!=null&&l.find(i=>(i==null?void 0:i.id)===(r==null?void 0:r.id))?(n=O.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(r.contents)),s)):(l=l==null?void 0:l.map(i=>(i.children=Lc(i==null?void 0:i.children,r),i)),l)},sr=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],G3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Y3=[{label:"新增",value:"add"}],Vn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Y3},{key:"background",label:"按钮背景色",type:"Color"}],Fn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:G3},{key:"textColor",label:"按钮颜色",type:"Color"}],J3={class:"table-header-child"},X3={class:"table-header-child-main"},Z3={class:"table-header-child-content"},Q3={class:"table-header-child-content-item"},e2={class:"fix-button"},a2={key:0},l2={class:"form-content"},r2={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(!1),c=a.ref(""),m=na.useTableComp(O.pinia),{tableIndex:p}=O.storeToRefs(m);a.ref(0);const h=a.ref(""),y=a.ref([]),u=a.ref([]),x=C=>{var S;s.value=!0;let _=[];sr==null||sr.forEach(k=>{let g=O.cloneDeep(p.value)+1;m.setTableIndex(g),_.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:C[k.key],id:p.value,contents:k==null?void 0:k.options})}),C!=null&&C.children&&((S=C==null?void 0:C.children)==null?void 0:S.length)>0&&_.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,y.value=_,u.value=_},D=C=>{i("fixChange",O.cloneDeep(C))},R=C=>{i("deleteChange",O.cloneDeep(C))},E=C=>{s.value=!0;let _=[];sr==null||sr.forEach(S=>{let k=O.cloneDeep(p.value)+1;m.setTableIndex(k),_.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:p.value,contents:S==null?void 0:S.options})}),c.value=C==null?void 0:C.id,y.value=_,u.value=_},K=C=>{let _=O.cloneDeep(u.value);_=_==null?void 0:_.map(S=>(S.children||(S.value=C==null?void 0:C[S.name]),S)),u.value=_},M=()=>{var _,S;y.value=u.value;let C={};if(h.value!=="")C.id=h.value,(_=y.value)==null||_.forEach(k=>{const g=sr==null?void 0:sr.find(P=>(P==null?void 0:P.label)===(k==null?void 0:k.label));g?C[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(C.children=k.children)}),s.value=!1,i("fixChange",{contents:O.cloneDeep(C),id:c.value,type:"fix"});else{let k=O.cloneDeep(p.value)+1;m.setTableIndex(k),C.id="id"+p.value,(S=y.value)==null||S.forEach(g=>{const P=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));P?C[P.key]=g.value:g!=null&&g.children&&g.children.length>0&&(C.children=g.children)}),s.value=!1,i("fixChange",{contents:O.cloneDeep(C),id:c.value,type:"add"})}h.value="",y.value=[],u.value=[]},L=()=>{s.value=!1,h.value="",c.value="",y.value=[],u.value=[]},j=C=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{i("deleteChange",C),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,_)=>{const S=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",J3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(k,g)=>(a.openBlock(),a.createElementBlock("div",X3,[a.createElementVNode("div",Z3,[a.createElementVNode("div",Q3,a.toDisplayString(k.label),1),a.createElementVNode("div",e2,[a.createVNode(S,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:P=>E(k)},null,8,["onClick"]),a.createVNode(S,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:P=>x(k)},null,8,["onClick"]),a.createVNode(S,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:P=>j(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",a2,[a.createVNode($c,{tableChildContents:k==null?void 0:k.children,onDeleteChange:R,onFixChange:D},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(_r.ssDialog,{visible:s.value,onBeforeDestroy:L,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",l2,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:K},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:L,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:M},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},n2=er._export_sfc(r2,[["__scopeId","data-v-e0fef72d"]]),i2={class:"table-header-child"},o2={class:"table-header-child-main"},t2={class:"table-header-child-content"},s2={class:"table-header-child-content-item"},c2={class:"fix-button"},u2={key:0},d2={class:"form-content"},p2={class:"dialog-footer"},f2={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(!1),c=a.ref(""),m=na.useTableComp(O.pinia),{tableIndex:p}=O.storeToRefs(m),h=a.ref(""),y=a.ref([]),u=a.ref([]),x=C=>{i("fixChange",O.cloneDeep(C))},D=C=>{var S;s.value=!0;let _=[];sr==null||sr.forEach(k=>{let g=O.cloneDeep(p.value)+1;m.setTableIndex(g),_.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:C[k.key],id:p.value,contents:k==null?void 0:k.options})}),C!=null&&C.children&&((S=C==null?void 0:C.children)==null?void 0:S.length)>0&&_.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,y.value=_,u.value=_},R=C=>{s.value=!0;let _=[];sr==null||sr.forEach(S=>{let k=O.cloneDeep(p.value)+1;m.setTableIndex(k),_.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:"",id:p.value,contents:S==null?void 0:S.options})}),c.value=C==null?void 0:C.id,y.value=_,u.value=_},E=C=>{let _=O.cloneDeep(u.value);_=_==null?void 0:_.map(S=>(S.children||(S.value=C==null?void 0:C[S.name]),S)),u.value=_},K=()=>{var _,S;y.value=u.value;let C={};if(h.value!=="")C.id=h.value,(_=y.value)==null||_.forEach(k=>{const g=sr==null?void 0:sr.find(P=>(P==null?void 0:P.label)===(k==null?void 0:k.label));g?C[g.key]=k.value:k!=null&&k.children&&k.children.length>0&&(C.children=k.children)}),s.value=!1,i("fixChange",{contents:O.cloneDeep(C),id:c.value,type:"fix"});else{let k=O.cloneDeep(p.value)+1;m.setTableIndex(k),C.id="idChild"+p.value,(S=y.value)==null||S.forEach(g=>{const P=sr==null?void 0:sr.find($=>($==null?void 0:$.label)===(g==null?void 0:g.label));P?C[P.key]=g.value:g!=null&&g.children&&g.children.length>0&&(C.children=g.children)}),s.value=!1,i("fixChange",{contents:O.cloneDeep(C),id:c.value,type:"add"})}h.value="",y.value=[],u.value=[]},M=()=>{s.value=!1,h.value="",c.value="",y.value=[],u.value=[]},L=C=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{i("deleteChange",C),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},j=C=>{i("deleteChange",C)};return(C,_)=>{const S=a.resolveComponent("svg-icon"),k=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",i2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(g,P)=>(a.openBlock(),a.createElementBlock("div",o2,[a.createElementVNode("div",t2,[a.createElementVNode("div",s2,a.toDisplayString(g.label),1),a.createElementVNode("div",c2,[a.createVNode(S,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>R(g)},null,8,["onClick"]),a.createVNode(S,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>D(g)},null,8,["onClick"]),a.createVNode(S,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>L(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(a.openBlock(),a.createElementBlock("div",u2,[a.createVNode(n2,{tableChildContents:g==null?void 0:g.children,onDeleteChange:j,onFixChange:x},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(_r.ssDialog,{visible:s.value,onBeforeDestroy:M,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",d2,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:E},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",p2,[a.createVNode(k,{onClick:M,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>_[0]||(_[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(k,{class:"ok-button button",onClick:K,id:"themeButton"},{default:a.withCtx(()=>_[1]||(_[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},$c=er._export_sfc(f2,[["__scopeId","data-v-ebd68fa1"]]),h2={class:"table-operate-content"},v2={class:"table-operate-item"},m2={class:"operate-title"},y2={class:"operate-content"},g2={class:"fix-content"},b2={class:"fix-content-label"},k2={class:"fix-button"},x2={key:0},w2={class:"operate-title"},_2={class:"operate-content"},S2={class:"fix-content"},E2={class:"fix-content-label"},C2={class:"fix-button"},D2={class:"operate-title"},N2={class:"operate-content"},T2={class:"fix-content"},B2={class:"fix-content-label"},A2={class:"fix-button"},z2={class:"operate-title"},M2={class:"operate-content"},I2={class:"fix-content"},O2={class:"fix-content-label"},L2={class:"fix-button"},$2={class:"operate-content"},R2={style:{display:"flex","justify-content":"space-between"}},V2={class:"form-content"},F2={class:"dialog-footer"},P2={class:"form-content"},j2={class:"dialog-footer"},H2={class:"form-content"},U2={class:"dialog-footer"},q2={class:"form-content"},W2={class:"dialog-footer"},K2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref([]),c=a.ref(!1),m=a.ref(!1),p=a.ref([]),h=a.ref(!1),y=a.ref([]),u=a.ref(!1),x=a.ref([]),D=a.ref(""),R=a.ref(""),E=a.ref([]),K=a.ref([]),M=a.ref([]),L=a.ref([]),j=a.ref(!1),C=a.ref([]),_=a.ref([]),S=a.ref(0),k=a.ref([]),g=a.ref([]),P=a.ref([]),$=()=>{j.value=!0;let V=[];Vn==null||Vn.forEach(H=>{S.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:(H==null?void 0:H.key)==="background"?"var(--ssComponent-primary-color)":"",id:S.value,contents:H==null?void 0:H.options})}),C.value=V,_.value=V},Y=()=>{var H,ee,fe;m.value=!0;let V=[];(fe=(ee=(H=na.FormContent)==null?void 0:H.find(me=>(me==null?void 0:me.key)==="Input"))==null?void 0:ee.value)==null||fe.forEach(me=>{S.value++,V.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:S.value,contents:me==null?void 0:me.options})}),k.value=V,g.value=V},pe=V=>{V||(k.value=g.value)},ze=async V=>{var H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma;if((V==null?void 0:V.类型)!==((ee=(H=g.value)==null?void 0:H.find(Je=>(Je==null?void 0:Je.label)==="类型"))==null?void 0:ee.value)){let Je=[],ia=await((fa=(me=(fe=na.FormContent)==null?void 0:fe.find(se=>(se==null?void 0:se.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:me.value)==null?void 0:fa.value)?await((qe=(va=(_e=na.FormContent)==null?void 0:_e.find(se=>(se==null?void 0:se.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:va.value)==null?void 0:qe.value):(ce=(Xe=na.FormContent)==null?void 0:Xe.find(se=>(se==null?void 0:se.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:ce.value;if(ia==null||ia.forEach(se=>{S.value++,Je.push({label:se==null?void 0:se.label,name:(se==null?void 0:se.name)||(se==null?void 0:se.label),type:se.type,value:se!=null&&se.属性名?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):(V==null?void 0:V[se.label])??"",id:S.value,contents:se==null?void 0:se.options,prop:(se==null?void 0:se.prop)||(se==null?void 0:se.name)||(se==null?void 0:se.label)})}),V!=null&&V.菜单选项&&((La=V==null?void 0:V.菜单选项)==null?void 0:La.length)>0){const se=await na.menuToContentType(V==null?void 0:V.菜单选项);Je=Je==null?void 0:Je.map(U=>((U==null?void 0:U.name)==="组信息选项"&&(U.contents=se),U))}g.value=await na.selectToBase(O.cloneDeep(Je)),k.value=await na.selectToBase(O.cloneDeep(Je))}else{let Je=O.cloneDeep(k.value);if(Je=Je==null?void 0:Je.map(ia=>(ia.value=V==null?void 0:V[ia.name],ia)),V!=null&&V.菜单选项&&((Ma=V==null?void 0:V.菜单选项)==null?void 0:Ma.length)>0){const ia=await na.menuToContentType(V==null?void 0:V.菜单选项);Je=Je==null?void 0:Je.map(se=>((se==null?void 0:se.name)==="组信息选项"&&(se.contents=ia),se))}Je=na.formToOptionsContents(Je),g.value=await na.selectToBase(O.cloneDeep(Je))}},de=async V=>{await ze(V),k.value=g.value},Z=(V,H)=>{if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="selectRelateType"){const ee=H==null?void 0:H.optionUrl;return(ee==null?void 0:ee.selectRelateType)||H[V.key]}if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="menuSelect"){const ee=H==null?void 0:H.optionUrl;return(ee==null?void 0:ee.menuSelect)||H[V.key]}if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="groupSelect"){const ee=H==null?void 0:H.optionUrl;return(ee==null?void 0:ee.groupSelect)||H[V.key]}if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="originalContent")return(H==null?void 0:H.value)||H[V.key];if((H==null?void 0:H.type)=="Select"&&(V==null?void 0:V.key)==="multiple"){const ee=H[V.key];return Qs(ee)?ee:V.default}return(V==null?void 0:V.label)==="类型"&&H[V.key]===""?"Input":(V==null?void 0:V.key)==="isFormColHidden"&&!H[V.key]?!1:H[V.key]},he=async V=>{var fe,me,fa,Xe,ce,_e,va,qe,La;m.value=!0;let H=[];const ee=await((fa=(me=(fe=na.FormContent)==null?void 0:fe.find(Ma=>(Ma==null?void 0:Ma.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:me.value)==null?void 0:fa.value)?await((qe=(va=(_e=na.FormContent)==null?void 0:_e.find(Ma=>(Ma==null?void 0:Ma.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:va.value)==null?void 0:qe.value):(ce=(Xe=na.FormContent)==null?void 0:Xe.find(Ma=>(Ma==null?void 0:Ma.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:ce.value;if(ee==null||ee.forEach(Ma=>{S.value++,H.push({label:Ma==null?void 0:Ma.label,name:(Ma==null?void 0:Ma.name)||(Ma==null?void 0:Ma.label),type:Ma.type,value:(Ma==null?void 0:Ma.label)==="属性名"?(V==null?void 0:V.prop)||(V==null?void 0:V.name)||(V==null?void 0:V.label):Z(Ma,V),id:S.value,contents:Ma==null?void 0:Ma.options})}),V!=null&&V.menuSelect&&((La=V==null?void 0:V.menuSelect)==null?void 0:La.length)>0){const Ma=await na.menuToContentType(V==null?void 0:V.menuSelect);H=H==null?void 0:H.map(Je=>((Je==null?void 0:Je.name)==="组信息选项"&&(Je.contents=Ma),Je))}D.value=V==null?void 0:V.id,k.value=await na.selectToBase(na.formToOptionsContents(H)),g.value=await na.selectToBase(na.formToOptionsContents(H))},ae=V=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,ee;P.value=(H=O.cloneDeep(P.value))==null?void 0:H.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),i("change",(ee=O.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="tableToForm"&&(fe.contents=P.value),fe))),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ue=()=>{m.value=!1,k.value=[],D.value=""},Se=async()=>{var fe,me,fa,Xe,ce,_e,va,qe,La,Ma;k.value=g.value;let V={};D.value!==""?V.id=D.value:(S.value++,V.id="id"+S.value);let H=await((fa=(me=(fe=na.FormContent)==null?void 0:fe.find(Je=>{var ia,se;return(Je==null?void 0:Je.key)===(((se=(ia=k.value)==null?void 0:ia.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:se.value)??"label")}))==null?void 0:me.value)==null?void 0:fa.value)??((ce=(Xe=na.FormContent)==null?void 0:Xe.find(Je=>{var ia,se;return(Je==null?void 0:Je.key)===(((se=(ia=k.value)==null?void 0:ia.find(U=>(U==null?void 0:U.label)==="类型"))==null?void 0:se.value)??"label")}))==null?void 0:ce.value);if((_e=k.value)==null||_e.forEach(Je=>{const ia=H==null?void 0:H.find(se=>(se==null?void 0:se.label)===(Je==null?void 0:Je.label));ia&&(V[ia.key]=Je.value)}),V.name=V.label,(va=P.value)!=null&&va.find(Je=>Je.id===V.id))P.value=(qe=P.value)==null?void 0:qe.map(Je=>(Je.id===V.id&&(Je=V),Je));else{let Je=O.cloneDeep(P.value);P.value||(P.value=[]),Je.push(V),P.value=Je}P.value=P.value.map(({id:Je,...ia})=>ia),m.value=!1,D.value="";let ee=O.cloneDeep(n.originalItemContents);(La=O.cloneDeep(n.originalItemContents))!=null&&La.find(Je=>(Je==null?void 0:Je.key)==="tableToForm")?ee=(Ma=O.cloneDeep(n.originalItemContents))==null?void 0:Ma.map(Je=>((Je==null?void 0:Je.key)==="tableToForm"&&(Je.contents=P.value),Je)):ee.push({key:"tableToForm",contents:P.value}),i("change",ee)},Ve=V=>{j.value=!0;let H=[];Vn==null||Vn.forEach(ee=>{S.value++,H.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:V[ee.key],id:S.value,contents:ee==null?void 0:ee.options})}),D.value=V==null?void 0:V.id,C.value=H,_.value=H};a.watch(()=>u.value,()=>{var H,ee;let V=O.cloneDeep(n.originalItemContents);(H=O.cloneDeep(n.originalItemContents))!=null&&H.find(fe=>(fe==null?void 0:fe.key)==="page")?V=(ee=O.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="page"&&(fe.contents=u.value),fe)):V.push({key:"page",contents:u.value}),i("change",V)},{deep:!0});const ge=V=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,ee;K.value=(H=O.cloneDeep(K.value))==null?void 0:H.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),i("change",(ee=O.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="extraButton"&&(fe.contents=K.value),fe))),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=()=>{var ee,fe,me,fa,Xe;C.value=_.value;let V={};if(D.value!==""?V.id=D.value:(S.value++,V.id="id"+S.value),(ee=C.value)==null||ee.forEach(ce=>{const _e=Vn==null?void 0:Vn.find(va=>(va==null?void 0:va.label)===(ce==null?void 0:ce.label));_e?V[_e.key]=ce.value:ce!=null&&ce.children&&ce.children.length>0&&(V.children=ce.children)}),(fe=K.value)!=null&&fe.find(ce=>ce.id===V.id))K.value=(me=K.value)==null?void 0:me.map(ce=>(ce.id===V.id&&(ce=V),ce));else{let ce=O.cloneDeep(K.value)??[];ce.push(V),K.value=ce}j.value=!1,D.value="";let H=O.cloneDeep(n.originalItemContents);(fa=O.cloneDeep(n.originalItemContents))!=null&&fa.find(ce=>(ce==null?void 0:ce.key)==="extraButton")?H=(Xe=O.cloneDeep(n.originalItemContents))==null?void 0:Xe.map(ce=>((ce==null?void 0:ce.key)==="extraButton"&&(ce.contents=K.value),ce)):H.push({key:"extraButton",contents:K.value}),i("change",H)},q=V=>{let H=O.cloneDeep(_.value);H=H==null?void 0:H.map(ee=>(ee.children||(ee.value=V==null?void 0:V[ee.name]),ee)),_.value=H},ne=()=>{j.value=!1,C.value=[],D.value=""},Ne=V=>{h.value=!0;let H=[];Fn==null||Fn.forEach(ee=>{S.value++,H.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:V[ee.key],id:S.value,contents:ee==null?void 0:ee.options})}),D.value=V==null?void 0:V.id,M.value=H,L.value=H},we=V=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,ee;E.value=(H=O.cloneDeep(E.value))==null?void 0:H.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),i("change",(ee=O.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>((fe==null?void 0:fe.key)==="rowButton"&&(fe.contents=E.value),fe))),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ke=()=>{c.value=!0;let V=[];sr==null||sr.forEach(H=>{S.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:S.value,contents:H==null?void 0:H.options})}),y.value=V,x.value=V},ua=()=>{h.value=!0;let V=[];Fn==null||Fn.forEach(H=>{S.value++,V.push({label:H==null?void 0:H.label,name:H==null?void 0:H.label,type:H.type,value:"",id:S.value,contents:H==null?void 0:H.options})}),M.value=V,L.value=V},za=V=>{let H=O.cloneDeep(L.value);H=H==null?void 0:H.map(ee=>(ee.children||(ee.value=V==null?void 0:V[ee.name]),ee)),L.value=H},le=()=>{var ee,fe,me,fa,Xe;M.value=L.value;let V={};if(D.value!==""?V.id=D.value:(S.value++,V.id="id"+S.value),(ee=M.value)==null||ee.forEach(ce=>{const _e=Fn==null?void 0:Fn.find(va=>(va==null?void 0:va.label)===(ce==null?void 0:ce.label));_e?V[_e.key]=ce.value:ce!=null&&ce.children&&ce.children.length>0&&(V.children=ce.children)}),(fe=E.value)!=null&&fe.find(ce=>ce.id===V.id))E.value=(me=E.value)==null?void 0:me.map(ce=>(ce.id===V.id&&(ce=V),ce));else{let ce=O.cloneDeep(E.value);ce.push(V),E.value=ce}h.value=!1,D.value="";let H=O.cloneDeep(n.originalItemContents);(fa=O.cloneDeep(n.originalItemContents))!=null&&fa.find(ce=>(ce==null?void 0:ce.key)==="rowButton")?H=(Xe=O.cloneDeep(n.originalItemContents))==null?void 0:Xe.map(ce=>((ce==null?void 0:ce.key)==="rowButton"&&(ce.contents=E.value),ce)):H.push({key:"rowButton",contents:E.value}),i("change",H)},Te=()=>{h.value=!1,D.value="",L.value=[],M.value=[]},Me=V=>{c.value=!0;let H=[];sr==null||sr.forEach(ee=>{S.value++,H.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:"",id:S.value,contents:ee==null?void 0:ee.options})}),y.value=H,R.value=V==null?void 0:V.id,x.value=H},Ue=V=>{var H;p.value=Mc(O.cloneDeep(p.value),V==null?void 0:V.id),i("change",(H=O.cloneDeep(n.originalItemContents))==null?void 0:H.map(ee=>{var fe;return(ee==null?void 0:ee.key)==="header"&&(ee.contents=(fe=p.value)!=null&&fe.some(me=>me==null?void 0:me.children)?[p.value]:p.value),ee}))},Re=V=>{var ee,fe,me;V.type==="fix"?V.id!==""?p.value=Oc(p.value,V):p.value=Ic(p.value,V==null?void 0:V.contents):p.value=Lc(p.value,V),p.value=(ee=p.value)!=null&&ee.some(fa=>fa==null?void 0:fa.children)?[p.value]:p.value,D.value="";let H=O.cloneDeep(n.originalItemContents);(fe=O.cloneDeep(n.originalItemContents))!=null&&fe.find(fa=>(fa==null?void 0:fa.key)==="header")?H=(me=O.cloneDeep(n.originalItemContents))==null?void 0:me.map(fa=>((fa==null?void 0:fa.key)==="header"&&(fa.contents=p.value),fa)):H.push({key:"header",contents:p.value}),i("change",H)},oe=V=>{var ee;c.value=!0;let H=[];sr==null||sr.forEach(fe=>{S.value++,H.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:V[fe.key],id:S.value,contents:fe==null?void 0:fe.options})}),V!=null&&V.children&&((ee=V==null?void 0:V.children)==null?void 0:ee.length)>0&&H.push({children:V==null?void 0:V.children,isFormColHidden:!0}),D.value=V==null?void 0:V.id,R.value="",y.value=H,x.value=H},Ie=V=>{let H=O.cloneDeep(x.value);H=H==null?void 0:H.map(ee=>(ee.children||(ee.value=V==null?void 0:V[ee.name]),ee)),x.value=H},He=()=>{c.value=!1,D.value="",R.value="",x.value=[]},Ba=()=>{var ee,fe,me,fa,Xe,ce;y.value=x.value;let V={};if(D.value!==""?V.id=D.value:(S.value++,V.id="id"+S.value),(ee=y.value)==null||ee.forEach(_e=>{const va=sr==null?void 0:sr.find(qe=>(qe==null?void 0:qe.label)===(_e==null?void 0:_e.label));va?V[va.key]=_e.value:_e!=null&&_e.children&&_e.children.length>0&&(V.children=_e.children)}),(fe=p.value)!=null&&fe.find(_e=>_e.id===V.id))p.value=(me=p.value)==null?void 0:me.map(_e=>(_e.id===V.id&&(_e=V),_e));else{let _e=O.cloneDeep(p.value)??[];R.value===""?_e.push(V):_e=_e==null?void 0:_e.map(va=>(va.id===R.value&&(va.children||(va.children=[]),va.children.push(V)),va)),p.value=_e}p.value=(fa=p.value)!=null&&fa.some(_e=>_e==null?void 0:_e.children)?[p.value]:p.value,c.value=!1,D.value="",R.value="";let H=O.cloneDeep(n.originalItemContents);(Xe=O.cloneDeep(n.originalItemContents))!=null&&Xe.find(_e=>(_e==null?void 0:_e.key)==="header")?H=(ce=O.cloneDeep(n.originalItemContents))==null?void 0:ce.map(_e=>((_e==null?void 0:_e.key)==="header"&&(_e.contents=p.value),_e)):H.push({key:"header",contents:p.value}),i("change",H)},Oa=V=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var H,ee;p.value=(H=O.cloneDeep(p.value))==null?void 0:H.filter(fe=>(fe==null?void 0:fe.id)!==(V==null?void 0:V.id)),i("change",(ee=O.cloneDeep(n.originalItemContents))==null?void 0:ee.map(fe=>{var me;return(fe==null?void 0:fe.key)==="header"&&(fe.contents=(me=p.value)!=null&&me.some(fa=>fa==null?void 0:fa.children)?[p.value]:p.value),fe})),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>n.originalItemContents,()=>{var V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia,se,U,W,Be;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(s.value=O.cloneDeep(n.originalItemContents),p.value=(H=(V=s.value)==null?void 0:V.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:H.contents,E.value=(fe=(ee=s.value)==null?void 0:ee.find(ke=>(ke==null?void 0:ke.key)==="rowButton"))==null?void 0:fe.contents,K.value=(fa=(me=s.value)==null?void 0:me.find(ke=>(ke==null?void 0:ke.key)==="extraButton"))==null?void 0:fa.contents,u.value=(ce=(Xe=s.value)==null?void 0:Xe.find(ke=>(ke==null?void 0:ke.key)==="page"))!=null&&ce.contents?!!((va=(_e=s.value)==null?void 0:_e.find(ke=>(ke==null?void 0:ke.key)==="page"))!=null&&va.contents):!1,P.value=(La=(qe=s.value)==null?void 0:qe.find(ke=>(ke==null?void 0:ke.key)==="tableToForm"))==null?void 0:La.contents,p.value=(Ma=p.value)==null?void 0:Ma.map((ke,ra)=>(Array.isArray(ke)?ke=K3(ke):ke={label:(ke==null?void 0:ke.label)??"",prop:(ke==null?void 0:ke.label)==="操作"?"operate":ke==null?void 0:ke.prop,width:ke!=null&&ke.width?parseInt(ke.width):"",fixed:(ke==null?void 0:ke.fixed)??void 0,sortable:(ke==null?void 0:ke.sortable)??!1,align:(ke==null?void 0:ke.align)??"left",showOverflowTooltip:(ke==null?void 0:ke.showOverflowTooltip)??!0,isNotDrag:(ke==null?void 0:ke.isNotDrag)??!1,isEditCol:(ke==null?void 0:ke.isEditCol)??!1,isOperate:(ke==null?void 0:ke.isOperate)??!1,id:(ke==null?void 0:ke.id)??ra,formMenuSelect:(ke==null?void 0:ke.formMenuSelect)??void 0,groupSelect:(ke==null?void 0:ke.groupSelect)??void 0},ke)),p.value=(Je=p.value)!=null&&Je.every(ke=>Array.isArray(ke))?(ia=p.value)==null?void 0:ia[0]:p.value,E.value=(se=E.value)==null?void 0:se.map((ke,ra)=>ke={label:(ke==null?void 0:ke.label)??"",type:(ke==null?void 0:ke.type)??"",textColor:(ke==null?void 0:ke.textColor)??"#000000",id:(ke==null?void 0:ke.id)??ra}),K.value=(U=K.value)==null?void 0:U.map((ke,ra)=>ke={label:(ke==null?void 0:ke.label)??"",type:(ke==null?void 0:ke.type)??"",background:(ke==null?void 0:ke.background)??"var(--ssComponent-primary-color)",id:(ke==null?void 0:ke.id)??ra}),P.value)P.value=(Be=P.value)==null?void 0:Be.map(ke=>{S.value++;let ra=ke;return ra.id=S.value,ra});else{let ke=[];const ra=(W=na.getColumnChild(O.cloneDeep(p.value)))==null?void 0:W.filter(oa=>(oa==null?void 0:oa.prop)!=="operate");ra==null||ra.forEach(oa=>{var _a;S.value++,ke.push({label:oa==null?void 0:oa.label,name:(oa==null?void 0:oa.prop)||(oa==null?void 0:oa.label),type:oa!=null&&oa.groupSelect?"Select":"Input",value:"",id:S.value,contents:oa==null?void 0:oa.options,menuSelect:oa==null?void 0:oa.formMenuSelect,groupSelect:(_a=oa==null?void 0:oa.groupSelect)==null?void 0:_a.split(":"),selectRelateType:"关联绑定列"})}),P.value=ke}},{deep:!0,immediate:!0}),(V,H)=>{const ee=a.resolveComponent("svg-icon"),fe=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",h2,[a.createElementVNode("div",v2,[a.createElementVNode("div",m2,[H[2]||(H[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(fe,{class:"icon-content",onClick:Ke,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[1]||(H[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",y2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(me,fa)=>(a.openBlock(),a.createElementBlock("div",{key:fa},[a.createElementVNode("div",g2,[a.createElementVNode("div",b2,a.toDisplayString(me==null?void 0:me.label),1),a.createElementVNode("div",k2,[a.createVNode(ee,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>Me(me)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>oe(me)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>Oa(me)},null,8,["onClick"])])]),me!=null&&me.children&&me.children.length>0?(a.openBlock(),a.createElementBlock("div",x2,[a.createVNode($c,{tableChildContents:me==null?void 0:me.children,onDeleteChange:Ue,onFixChange:Re},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",w2,[H[4]||(H[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:ua},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[3]||(H[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",_2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(E.value,(me,fa)=>(a.openBlock(),a.createElementBlock("div",{key:fa},[a.createElementVNode("div",S2,[a.createElementVNode("div",E2,a.toDisplayString(me==null?void 0:me.label),1),a.createElementVNode("div",C2,[a.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Xe=>Ne(me)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>we(me)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",D2,[H[6]||(H[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:$},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[5]||(H[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",N2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K.value,(me,fa)=>(a.openBlock(),a.createElementBlock("div",{key:fa},[a.createElementVNode("div",T2,[a.createElementVNode("div",B2,a.toDisplayString(me==null?void 0:me.label),1),a.createElementVNode("div",A2,[a.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Xe=>Ve(me)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>ge(me)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",z2,[H[8]||(H[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:Y},{icon:a.withCtx(()=>[a.createVNode(ee,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[H[7]||(H[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",M2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(P.value,(me,fa)=>(a.openBlock(),a.createElementBlock("div",{key:fa},[a.createElementVNode("div",I2,[a.createElementVNode("div",O2,a.toDisplayString(me==null?void 0:me.label),1),a.createElementVNode("div",L2,[a.createVNode(ee,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Xe=>he(me)},null,8,["onClick"]),a.createVNode(ee,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Xe=>ae(me)},null,8,["onClick"])])])]))),128))]),H[10]||(H[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",$2,[a.createElementVNode("div",R2,[H[9]||(H[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(tl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":H[0]||(H[0]=me=>u.value=me)},null,8,["modelValue"])])])]),a.createVNode(_r.ssDialog,{visible:c.value,onBeforeDestroy:He,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",V2,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:Ie},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",F2,[a.createVNode(fe,{onClick:He,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[11]||(H[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(fe,{class:"ok-button button",onClick:Ba,id:"themeButton"},{default:a.withCtx(()=>H[12]||(H[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:h.value,onBeforeDestroy:Te,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",P2,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:za},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",j2,[a.createVNode(fe,{onClick:Te,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[13]||(H[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(fe,{class:"ok-button button",onClick:le,id:"themeButton"},{default:a.withCtx(()=>H[14]||(H[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:j.value,onBeforeDestroy:ne,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",H2,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",U2,[a.createVNode(fe,{onClick:ne,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[15]||(H[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(fe,{class:"ok-button button",onClick:T,id:"themeButton"},{default:a.withCtx(()=>H[16]||(H[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:m.value,onBeforeDestroy:ue,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",q2,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:ze,onChangeVisible:pe,onBlurChange:de},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",W2,[a.createVNode(fe,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>H[17]||(H[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(fe,{class:"ok-button button",onClick:Se,id:"themeButton"},{default:a.withCtx(()=>H[18]||(H[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},G2=er._export_sfc(K2,[["__scopeId","data-v-7a6b87b5"]]),Y2=O.useModelComp(O.pinia),{pageMapState:J2}=O.storeToRefs(Y2),X2=O.useMenuState(O.pinia),{activeMenuPath:Z2}=O.storeToRefs(X2),Q2=a.ref(24),eh=a.ref(6),ah=a.ref(10),lh=a.ref(70),rh=a.ref(.18),nh=a.ref(45),ih=(l,r,n,i)=>{var s,c,m,p,h,y,u,x,D,R,E,K,M,L,j,C;return{x:((c=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:c.x)||r%2*12,y:((p=(m=l==null?void 0:l.value)==null?void 0:m.tableData)==null?void 0:p.y)||r,w:((y=(h=l==null?void 0:l.value)==null?void 0:h.tableData)==null?void 0:y.w)||Q2.value,h:((x=(u=l==null?void 0:l.value)==null?void 0:u.tableData)==null?void 0:x.h)||n,minW:((R=(D=l==null?void 0:l.value)==null?void 0:D.tableData)==null?void 0:R.minW)||eh.value,minH:((K=(E=l==null?void 0:l.value)==null?void 0:E.tableData)==null?void 0:K.minH)||rh.value,maxH:((L=(M=l==null?void 0:l.value)==null?void 0:M.tableData)==null?void 0:L.maxH)||nh.value,i:((C=(j=l==null?void 0:l.value)==null?void 0:j.tableData)==null?void 0:C.i)||r,id:(l==null?void 0:l.id)||r+"",component:i}},oh=(l,r)=>{var i,s,c,m,p,h,y,u;let n=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((i=l==null?void 0:l.comp)==null?void 0:i.toUpperCase())==="TABLE"){if(((m=(c=(s=l==null?void 0:l.compData)==null?void 0:s.find(D=>(D==null?void 0:D.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:m.length)===0)return 2}else((p=l==null?void 0:l.comp)==null?void 0:p.toUpperCase())==="FORM"&&(n=((u=(y=(h=l==null?void 0:l.compData)==null?void 0:h.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:y.contents)==null?void 0:u.length)/5);return n*2},Rc=(l,r,n)=>{var m,p;const i=(p=(m=J2.value)==null?void 0:m[Z2.value])==null?void 0:p.filter(h=>{var y;return((y=h==null?void 0:h.key)==null?void 0:y.type)==="gridLayout"}),s=i==null?void 0:i.find(h=>{var y,u,x;return((x=(u=(y=h==null?void 0:h.value)==null?void 0:y.tableData)==null?void 0:u.component)==null?void 0:x.id)===l.id}),c=oh(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((h,y)=>Rc(h,y))),{...ih(s,r,c,l)}},th=(l,r)=>{if((l==null?void 0:l.length)===0)return[];const n=O.cloneDeep(l);return Array.isArray(l)?n==null?void 0:n.map((i,s)=>Rc(i,s)):[]},sh=l=>({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}]}]}}),ch=(l,r)=>l==null?void 0:l.map(n=>{for(const i in r)if(i===(n==null?void 0:n.prop))return{...n,value:r[i]};return n}),uh=a.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref([]);a.watch(()=>n.compType,p=>{var u;const h=sh(n==null?void 0:n.optionItems),y=p?(u=h[p==null?void 0:p.toUpperCase()])==null?void 0:u[n==null?void 0:n.target]:[];s.value=y==null?void 0:y.map(x=>{for(const[D,R]of Object.entries((n==null?void 0:n.comp)||{}))if((x==null?void 0:x.prop)===D)return{...x,value:R};return x})},{immediate:!0});const c=p=>tl.getComponent(p),m=p=>{var h,y;(p==null?void 0:p.prop)==="layout"&&(p==null?void 0:p.value)==="horizontal"?s.value=(h=s.value)==null?void 0:h.map(u=>{var x;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(x=u==null?void 0:u.options)==null?void 0:x.map(D=>({...D,disabled:!0}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!0}:u}):s.value=(y=s.value)==null?void 0:y.map(u=>{var x;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(x=u==null?void 0:u.options)==null?void 0:x.map(D=>({...D,disabled:!1}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!1}:u}),i("change",{target:n==null?void 0:n.target,styleConfigs:s.value,prop:p==null?void 0:p.prop})};return(p,h)=>{const y=a.resolveComponent("el-col"),u=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,x=>(a.openBlock(),a.createBlock(u,{class:"style-row",key:x==null?void 0:x.prop},{default:a.withCtx(()=>[a.createVNode(y,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(x==null?void 0:x.label)+":",1)]),_:2},1024),a.createVNode(y,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(x.type)),{modelValue:x.value,"onUpdate:modelValue":D=>x.value=D,content:x==null?void 0:x.options,optionUrl:x==null?void 0:x.optionUrl,disabled:x==null?void 0:x.disabled,activeText:x==null?void 0:x.activeText,inactiveText:x==null?void 0:x.inactiveText,onChange:D=>m(x)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),dh=er._export_sfc(uh,[["__scopeId","data-v-6c233914"]]),ph=a.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(l,{emit:r}){const n=l,i=r,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=a.ref([]),m=L=>L==null?void 0:L.reduce((j,C)=>(j[C==null?void 0:C.prop]=C==null?void 0:C.rule,j),{}),p=a.computed(()=>({formRules:m(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=a.ref([]),y=a.ref(""),u=(L,j,C)=>{var k;let _=[];(n==null?void 0:n.activeTabName)==="任务配置"?(_=[{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:L},{label:"按钮名称",value:"按钮名称",children:j}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(_=[{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:(k=n==null?void 0:n.relatedData)==null?void 0:k.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let S;return C&&(C==null?void 0:C.length)>0?S=[..._,...x(L,j,C)]:S=_,S},x=(L,j,C)=>{const _=[{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 C?_==null?void 0:_.filter(S=>C==null?void 0:C.includes(S==null?void 0:S.prop)):_},D=(L,j)=>{var g,P,$,Y,pe,ze,de,Z,he;const C=((pe=(Y=($=(P=(g=n==null?void 0:n.comp)==null?void 0:g.compData)==null?void 0:P.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:$.contents)==null?void 0:Y.filter(ae=>(ae==null?void 0:ae.label)!=="操作"))==null?void 0:pe.map(ae=>({value:ae==null?void 0:ae.prop,label:ae.label})))||[],_=/button/i,S=((he=(Z=(de=(ze=n==null?void 0:n.comp)==null?void 0:ze.compData)==null?void 0:de.filter(ae=>_.test(ae==null?void 0:ae.key)))==null?void 0:Z.flatMap(ae=>ae==null?void 0:ae.contents))==null?void 0:he.map(ae=>({value:ae==null?void 0:ae.label,label:ae.label})))||[],k=u(C,S,L);h.value=j?ch(k,j):k,L&&(L==null?void 0:L.length)>0&&c.value.push(...L==null?void 0:L.map(ae=>({prop:ae,rule:s})))};a.onMounted(()=>{D(null,n==null?void 0:n.extendItem)});const R=L=>{const j=L==null?void 0:L[y.value];if(y.value==="执行任务"){if(!(j!=null&&j.join("/")))return;const C=j==null?void 0:j.join("/");D(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,L)}},E=L=>{i("change",{target:n==null?void 0:n.target,extendConfigs:L})},K=(L,j)=>{y.value=j==null?void 0:j.changeProp,R(L)},M=L=>{i("onButtonClick",L)};return(L,j)=>(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:p.value.formRules,buttonValue:p.value.buttonValue,onChange:E,onBlurChange:K,onOnButtonClick:M},null,8,["rowContents","formRules","buttonValue"]))}}),fh=er._export_sfc(ph,[["__scopeId","data-v-7c660c1f"]]),hh={};function vh(l,r){return null}const mh=er._export_sfc(hh,[["render",vh]]),yh={class:"form-operate-content"},gh={class:"form-operate-item"},bh={class:"operate-title"},kh={class:"operate-content"},xh={class:"fix-content"},wh={class:"fix-button"},_h={class:"operate-title"},Sh={class:"operate-content"},Eh={class:"fix-content"},Ch={class:"fix-button"},Dh={style:{display:"flex","justify-content":"space-between"}},Nh={class:"form-content"},Th={class:"dialog-footer"},Bh={class:"form-content"},Ah={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(!1),c=a.ref([]),m=a.ref([]),p=a.ref(!1),h=a.ref([]),y=a.ref([]),u=a.ref(""),x=a.ref(!1),D=a.ref(0),R=a.ref([]),E=a.ref([]),K=(Z,he)=>{if((he==null?void 0:he.type)=="Select"&&(Z==null?void 0:Z.key)==="selectRelateType"){const ae=he==null?void 0:he.optionUrl;return(ae==null?void 0:ae.selectRelateType)||he[Z.key]}if((he==null?void 0:he.type)=="Select"&&(Z==null?void 0:Z.key)==="menuSelect"){const ae=he==null?void 0:he.optionUrl;return(ae==null?void 0:ae.menuSelect)||he[Z.key]}if((he==null?void 0:he.type)=="Select"&&(Z==null?void 0:Z.key)==="groupSelect"){const ae=he==null?void 0:he.optionUrl;return(ae==null?void 0:ae.groupSelect)||he[Z.key]}if((he==null?void 0:he.type)=="Select"&&(Z==null?void 0:Z.key)==="originalContent")return(he==null?void 0:he.value)||he[Z.key];if((he==null?void 0:he.type)=="Select"&&(Z==null?void 0:Z.key)==="multiple"){const ae=he[Z.key];return Qs(ae)?ae:Z.default}return(Z==null?void 0:Z.label)==="类型"&&he[Z.key]===""?"Input":(Z==null?void 0:Z.key)==="isFormColHidden"&&!he[Z.key]?!1:he[Z.key]},M=async Z=>{var ue,Se,Ve,ge,T,q;s.value=!0;let he=[];const ae=await((Ve=(Se=(ue=na.FormContent)==null?void 0:ue.find(ne=>(ne==null?void 0:ne.key)===((Z==null?void 0:Z.type)===""?"Input":Z==null?void 0:Z.type)))==null?void 0:Se.value)==null?void 0:Ve.value)??((T=(ge=na.FormContent)==null?void 0:ge.find(ne=>(ne==null?void 0:ne.key)===((Z==null?void 0:Z.type)===""?"Input":Z==null?void 0:Z.type)))==null?void 0:T.value);if(ae==null||ae.forEach(ne=>{D.value++,he.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,prop:ne==null?void 0:ne.prop,value:K(ne,Z),id:D.value,contents:ne==null?void 0:ne.options,width:(Z==null?void 0:Z.width)??1})}),Z!=null&&Z.menuSelect&&((q=Z==null?void 0:Z.menuSelect)==null?void 0:q.length)>0){const ne=await na.menuToContentType(Z==null?void 0:Z.menuSelect);he=he==null?void 0:he.map(Ne=>((Ne==null?void 0:Ne.name)==="组信息选项"&&(Ne.contents=ne),Ne))}u.value=Z==null?void 0:Z.id,c.value=await na.selectToBase(na.formToOptionsContents(he)),m.value=await na.selectToBase(na.formToOptionsContents(he))},L=Z=>{var ae;p.value=!0;let he=[];(ae=na.FormButton)==null||ae.forEach(ue=>{D.value++,he.push({label:ue==null?void 0:ue.label,name:ue==null?void 0:ue.label,type:ue.type,value:(ue==null?void 0:ue.label)==="类型"&&Z[ue.key]===""?"normal":Z[ue.key],id:D.value,contents:ue==null?void 0:ue.options})}),R.value=he,E.value=he,u.value=Z==null?void 0:Z.id};a.watch(()=>x.value,()=>{var he,ae;let Z=O.cloneDeep(n.originalItemContents);(he=O.cloneDeep(n.originalItemContents))!=null&&he.find(ue=>(ue==null?void 0:ue.key)==="enableWrap")?Z=(ae=O.cloneDeep(n.originalItemContents))==null?void 0:ae.map(ue=>((ue==null?void 0:ue.key)==="enableWrap"&&(ue.contents=!x.value),ue)):Z.push({key:"enableWrap",contents:!x.value}),i("change",Z)},{deep:!0});const j=()=>{var ae,ue,Se,Ve,ge;R.value=E.value;let Z={};if(u.value!==""?Z.id=u.value:(D.value++,Z.id="id"+D.value),(ae=R.value)==null||ae.forEach(T=>{var ne;const q=(ne=na.FormButton)==null?void 0:ne.find(Ne=>(Ne==null?void 0:Ne.label)===(T==null?void 0:T.label));q&&(Z[q.key]=T.value)}),(ue=h.value)!=null&&ue.find(T=>T.id===Z.id))h.value=(Se=h.value)==null?void 0:Se.map(T=>(T.id===Z.id&&(T=Z),T));else{let T=O.cloneDeep(h.value);h.value||(h.value=[]),T.push(Z),h.value=T}p.value=!1,u.value="";let he=O.cloneDeep(n.originalItemContents);(Ve=O.cloneDeep(n.originalItemContents))!=null&&Ve.find(T=>(T==null?void 0:T.key)==="formButton")?he=(ge=O.cloneDeep(n.originalItemContents))==null?void 0:ge.map(T=>((T==null?void 0:T.key)==="formButton"&&(T.contents=h.value),T)):he.push({key:"formButton",contents:h.value}),i("change",he)},C=Z=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var he,ae;y.value=(he=O.cloneDeep(y.value))==null?void 0:he.filter(ue=>(ue==null?void 0:ue.id)!==(Z==null?void 0:Z.id)),i("change",(ae=O.cloneDeep(n.originalItemContents))==null?void 0:ae.map(ue=>((ue==null?void 0:ue.key)==="formContent"&&(ue.contents=y.value),ue))),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=Z=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var he,ae;h.value=(he=O.cloneDeep(h.value))==null?void 0:he.filter(ue=>(ue==null?void 0:ue.id)!==(Z==null?void 0:Z.id)),i("change",(ae=O.cloneDeep(n.originalItemContents))==null?void 0:ae.map(ue=>((ue==null?void 0:ue.key)==="formButton"&&(ue.contents=h.value),ue))),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>{var he;p.value=!0;let Z=[];(he=na.FormButton)==null||he.forEach(ae=>{D.value++,Z.push({label:ae==null?void 0:ae.label,name:ae==null?void 0:ae.label,type:ae.type,value:(ae==null?void 0:ae.label)==="类型"?"normal":"",id:D.value,contents:ae==null?void 0:ae.options})}),R.value=Z,E.value=Z},k=()=>{var he,ae,ue;s.value=!0;let Z=[];(ue=(ae=(he=na.FormContent)==null?void 0:he.find(Se=>(Se==null?void 0:Se.key)==="Input"))==null?void 0:ae.value)==null||ue.forEach(Se=>{D.value++,Z.push({label:Se==null?void 0:Se.label,name:Se==null?void 0:Se.label,type:Se.type,value:(Se==null?void 0:Se.label)==="类型"?"Input":"",id:D.value,contents:Se==null?void 0:Se.options})}),c.value=Z,m.value=Z},g=Z=>{let he=O.cloneDeep(E.value);he=he==null?void 0:he.map(ae=>(ae.value=Z==null?void 0:Z[ae.name],ae)),E.value=he},P=Z=>{const he=Z.find(Se=>(Se==null?void 0:Se.name)==="类型");if((he==null?void 0:he.value)!="Select")return;const ae=Z.find(Se=>(Se==null?void 0:Se.name)==="多选"),ue=Z.find(Se=>(Se==null?void 0:Se.name)==="初始值");ae!=null&&ae.value&&Do.isString(ue.value)&&(ue.value=[ue.value]),!(ae!=null&&ae.value)&&!Do.isString(ue.value)&&(ue.value="")},$=async Z=>{var he,ae,ue,Se,Ve,ge,T,q,ne,Ne,we,Ke;if((Z==null?void 0:Z.类型)!==((ae=(he=m.value)==null?void 0:he.find(ua=>(ua==null?void 0:ua.label)==="类型"))==null?void 0:ae.value)){let ua=[];const za=await((Ve=(Se=(ue=na.FormContent)==null?void 0:ue.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:Se.value)==null?void 0:Ve.value)?await((Ne=(ne=(q=na.FormContent)==null?void 0:q.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:ne.value)==null?void 0:Ne.value):(T=(ge=na.FormContent)==null?void 0:ge.find(le=>(le==null?void 0:le.key)===((Z==null?void 0:Z.类型)===""?"Input":Z==null?void 0:Z.类型)))==null?void 0:T.value;if(za==null||za.forEach(le=>{var Me,Ue;D.value++;const Te=$u(le==null?void 0:le.default)?(Z==null?void 0:Z[le.label])??le.value??"":le==null?void 0:le.default;ua.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:Te,prop:le==null?void 0:le.prop,id:D.value,contents:le==null?void 0:le.options,width:((Ue=(Me=m.value)==null?void 0:Me[0])==null?void 0:Ue.width)??1})}),Z!=null&&Z.菜单选项&&((we=Z==null?void 0:Z.菜单选项)==null?void 0:we.length)>0){const le=await na.menuToContentType(Z==null?void 0:Z.菜单选项);ua=ua==null?void 0:ua.map(Te=>((Te==null?void 0:Te.name)==="组信息选项"&&(Te.contents=le),Te))}P(ua),m.value=await na.selectToBase(O.cloneDeep(ua)),c.value=await na.selectToBase(O.cloneDeep(ua))}else{let ua=O.cloneDeep(m.value);if(ua=ua==null?void 0:ua.map(za=>(za.value=Z==null?void 0:Z[za.name],za)),Z!=null&&Z.菜单选项&&((Ke=Z==null?void 0:Z.菜单选项)==null?void 0:Ke.length)>0){const za=await na.menuToContentType(Z==null?void 0:Z.菜单选项);ua=ua==null?void 0:ua.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=za),le))}ua=na.formToOptionsContents(ua),P(ua),m.value=await na.selectToBase(O.cloneDeep(ua))}},Y=Z=>{Z||(c.value=m.value)},pe=async Z=>{await $(Z),c.value=m.value},ze=Ze.debounce(async()=>{var ue,Se,Ve,ge,T,q,ne,Ne,we,Ke,ua,za;c.value=m.value;let Z={};Z.width=((Se=(ue=c.value)==null?void 0:ue[0])==null?void 0:Se.width)??1,u.value!==""?Z.id=u.value:(D.value++,Z.id="id"+D.value);let he=await((T=(ge=(Ve=na.FormContent)==null?void 0:Ve.find(le=>{var Te,Me;return(le==null?void 0:le.key)===(((Me=(Te=c.value)==null?void 0:Te.find(Ue=>(Ue==null?void 0:Ue.label)==="类型"))==null?void 0:Me.value)??"label")}))==null?void 0:ge.value)==null?void 0:T.value)??((ne=(q=na.FormContent)==null?void 0:q.find(le=>{var Te,Me;return(le==null?void 0:le.key)===(((Me=(Te=c.value)==null?void 0:Te.find(Ue=>(Ue==null?void 0:Ue.label)==="类型"))==null?void 0:Me.value)??"label")}))==null?void 0:ne.value);if((Ne=c.value)==null||Ne.forEach(le=>{const Te=he==null?void 0:he.find(Me=>(Me==null?void 0:Me.label)===(le==null?void 0:le.label));Te&&(Z[Te.key]=le.value)}),Z.width=Z.width?Z.width:1,Z.key=Z==null?void 0:Z.label,Z.isFormColHidden=Z==null?void 0:Z.isFormColHidden,(we=y.value)!=null&&we.find(le=>le.id===Z.id))y.value=(Ke=y.value)==null?void 0:Ke.map(le=>(le.id===Z.id&&(le=Z),le));else{let le=O.cloneDeep(y.value);le.push(Z),y.value=le}y.value=y.value.map(({id:le,...Te})=>Te),s.value=!1,u.value="";let ae=O.cloneDeep(n.originalItemContents);(ua=O.cloneDeep(n.originalItemContents))!=null&&ua.find(le=>(le==null?void 0:le.key)==="formContent")?ae=(za=O.cloneDeep(n.originalItemContents))==null?void 0:za.map(le=>((le==null?void 0:le.key)==="formContent"&&(le.contents=y.value),le)):ae.push({key:"formContent",contents:y.value}),i("change",ae)},300),de=()=>{s.value=!1,p.value=!1,u.value="",m.value=[],E.value=[]};return a.watch(()=>n.originalItemContents,()=>{var he,ae,ue,Se,Ve,ge;if(!n.originalItemContents||n.originalItemContents.length===0)return;const Z=O.cloneDeep(n.originalItemContents);y.value=((he=Z==null?void 0:Z.find(T=>(T==null?void 0:T.key)==="formContent"))==null?void 0:he.contents)??[],h.value=((ae=Z==null?void 0:Z.find(T=>(T==null?void 0:T.key)==="formButton"))==null?void 0:ae.contents)??[],x.value=(ue=Z==null?void 0:Z.find(T=>(T==null?void 0:T.key)==="enableWrap"))!=null&&ue.contents?!((Se=Z==null?void 0:Z.find(T=>(T==null?void 0:T.key)==="enableWrap"))!=null&&Se.contents):!0,y.value=(Ve=O.cloneDeep(y.value))==null?void 0:Ve.map((T,q)=>{var Ne;let ne=T;return ne.id=(T==null?void 0:T.id)??q,T!=null&&T.label||(T.label=(T==null?void 0:T.key)??(T==null?void 0:T.label)??""),T!=null&&T.type||(T.type=(T==null?void 0:T.type)??""),T.contents=((Ne=T==null?void 0:T.options)==null?void 0:Ne.length)===0?(T==null?void 0:T.contents)??"":T==null?void 0:T.options,ne}),y.value=na.formToOptionsContents(y.value),h.value=(ge=h.value)==null?void 0:ge.map((T,q)=>T={label:(T==null?void 0:T.label)??"",type:(T==null?void 0:T.type)??"",background:(T==null?void 0:T.background)??"var(--ssComponent-primary-color)",id:q})},{deep:!0,immediate:!0}),(Z,he)=>{const ae=a.resolveComponent("svg-icon"),ue=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",yh,[a.createElementVNode("div",gh,[a.createElementVNode("div",bh,[he[2]||(he[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:k},{icon:a.withCtx(()=>[a.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[he[1]||(he[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(Se,Ve)=>(a.openBlock(),a.createElementBlock("div",{key:Ve},[a.createElementVNode("div",xh,[a.createElementVNode("div",null,a.toDisplayString(Se.label),1),a.createElementVNode("div",wh,[a.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>M(Se)},null,8,["onClick"]),a.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>C(Se)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",_h,[he[4]||(he[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:S},{icon:a.withCtx(()=>[a.createVNode(ae,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[he[3]||(he[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",Sh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(Se,Ve)=>(a.openBlock(),a.createElementBlock("div",{key:Ve},[a.createElementVNode("div",Eh,[a.createElementVNode("div",null,a.toDisplayString(Se.label),1),a.createElementVNode("div",Ch,[a.createVNode(ae,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>L(Se)},null,8,["onClick"]),a.createVNode(ae,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ge=>_(Se)},null,8,["onClick"])])])]))),128))]),he[6]||(he[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",Dh,[he[5]||(he[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(tl._sfc_main$1,{modelValue:x.value,"onUpdate:modelValue":he[0]||(he[0]=Se=>x.value=Se)},null,8,["modelValue"])])]),a.createVNode(_r.ssDialog,{visible:s.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Nh,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:$,onChangeVisible:Y,onBlurChange:pe},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",Th,[a.createVNode(ue,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>he[7]||(he[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(ue,{class:"ok-button button",onClick:a.unref(ze),id:"themeButton"},{default:a.withCtx(()=>he[8]||(he[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(_r.ssDialog,{visible:p.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",Bh,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:de,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:j},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},_s=er._export_sfc(Ah,[["__scopeId","data-v-20850524"]]),zh={class:"step-module content"},Mh={class:"module-data"},Ih={class:"step-module layout"},Oh={class:"form-content"},Lh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.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}]),c=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=a.reactive({visible:!1,width:"40%",title:"步骤条"}),h=a.ref("create"),y=a.ref({}),u=a.ref([]),x=M=>{var L;y.value=M,i("change",(L=E())==null?void 0:L.compData)},D=(M,L)=>{var j,C;switch(M){case"create":(j=c.value)==null||j.forEach(_=>{_.value=""}),h.value="create",p.visible=!0;break;case"update":(C=c.value)==null||C.forEach(_=>{_.value=L[_==null?void 0:_.prop]}),h.value="update",p.visible=!0;break;case"delete":u.value.splice(L,1),h.value="delete";break}},R=M=>{var L,j,C;if((M==null?void 0:M.buttonName)==="确认"){const _=O.cloneDeep(M==null?void 0:M.content);switch(Object.keys(_).forEach(S=>{_[S]===""&&delete _[S]}),h.value){case"create":u.value.push({..._,index:((L=u.value)==null?void 0:L.length)+1});break;case"update":u.value=(j=u.value)==null?void 0:j.map(S=>S.index===(_==null?void 0:_.index)?{...S,title:_==null?void 0:_.title,description:_==null?void 0:_.description}:S);break}i("change",(C=E())==null?void 0:C.compData),p.visible=!1}else p.visible=!1},E=()=>({comp:"Step",compData:[{key:"stepList",contents:u.value},{key:"stepConfig",contents:y.value}]}),K=()=>{p.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,M=>{var L,j;M&&(y.value=((L=M==null?void 0:M.find(C=>C.key==="stepConfig"))==null?void 0:L.contents)??{},u.value=((j=M==null?void 0:M.find(C=>C.key==="stepList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,L)=>{const j=a.resolveComponent("svg-icon"),C=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",zh,[L[2]||(L[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(C,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=_=>D("create"))},{icon:a.withCtx(()=>[a.createVNode(j,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[L[1]||(L[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",Mh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(_,S)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:S},[a.createElementVNode("span",null,a.toDisplayString(_==null?void 0:_.title),1),a.createElementVNode("div",null,[a.createVNode(C,{type:"primary",size:"small",onClick:k=>D("update",{..._,index:S+1})},{default:a.withCtx(()=>L[3]||(L[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(C,{type:"danger",size:"small",onClick:k=>D("delete",S)},{default:a.withCtx(()=>L[4]||(L[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",Ih,[L[5]||(L[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(tl.ssForm,{rowContents:s.value,onChange:x},null,8,["rowContents"])])]),a.createVNode(_r.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:K,width:p.width},{default:a.withCtx(()=>[a.createElementVNode("div",Oh,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:R},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),$h=er._export_sfc(Lh,[["__scopeId","data-v-7dbd17f2"]]),Rh={class:"step-module content"},Vh={class:"module-data"},Fh={class:"step-module layout"},Ph={class:"form-content"},jh=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref("create"),c=a.ref({}),m=a.ref([]),p=a.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}]),h=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),y=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),u=a.reactive({visible:!1,width:"40%",title:"时间线"}),x=M=>{var L;c.value=M,i("change",(L=E())==null?void 0:L.compData)},D=(M,L)=>{var j,C;switch(M){case"create":(j=h.value)==null||j.forEach(_=>{_.value=""}),s.value="create",u.visible=!0;break;case"update":(C=h.value)==null||C.forEach(_=>{_.value=L[_==null?void 0:_.prop]}),s.value="update",u.visible=!0;break;case"delete":m.value.splice(L,1),s.value="delete";break}},R=M=>{var L,j,C,_;if((M==null?void 0:M.buttonName)==="确认"){const S=O.cloneDeep(M==null?void 0:M.content);switch(Object.keys(S).forEach(k=>{S[k]===""&&delete S[k]}),s.value){case"create":(j=m.value)==null||j.push({...S,index:((L=m.value)==null?void 0:L.length)+1});break;case"update":m.value=(C=m.value)==null?void 0:C.map(k=>k.index===(S==null?void 0:S.index)?{...k,content:S==null?void 0:S.content,timestamp:S==null?void 0:S.timestamp}:k);break}i("change",(_=E())==null?void 0:_.compData),u.visible=!1}else u.visible=!1},E=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:m.value},{key:"timeLineConfig",contents:c.value}]}),K=()=>{u.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,M=>{var L,j;M&&(c.value=((L=M==null?void 0:M.find(C=>C.key==="timeLineConfig"))==null?void 0:L.contents)??{},m.value=((j=M==null?void 0:M.find(C=>C.key==="timeLineList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,L)=>{const j=a.resolveComponent("svg-icon"),C=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Rh,[L[2]||(L[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(C,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=_=>D("create"))},{icon:a.withCtx(()=>[a.createVNode(j,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[L[1]||(L[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",Vh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(_,S)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:S},[a.createElementVNode("span",null,a.toDisplayString(_==null?void 0:_.content),1),a.createElementVNode("div",null,[a.createVNode(C,{type:"primary",size:"small",onClick:k=>D("update",{..._,index:S+1})},{default:a.withCtx(()=>L[3]||(L[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(C,{type:"danger",size:"small",onClick:k=>D("delete",S)},{default:a.withCtx(()=>L[4]||(L[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",Fh,[L[5]||(L[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(tl.ssForm,{rowContents:p.value,onChange:x},null,8,["rowContents"])])]),a.createVNode(_r.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:K,width:u.width},{default:a.withCtx(()=>[a.createElementVNode("div",Ph,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:R},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hh=er._export_sfc(jh,[["__scopeId","data-v-39ffc861"]]),Uh={};function qh(l,r){return a.openBlock(),a.createElementBlock("div")}const Wh=er._export_sfc(Uh,[["render",qh]]),Kh={class:"extra-content"},Gh={key:0},Yh={key:1},Jh={class:"dialog-footer"},Xh={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(l,{emit:r}){const n=l,i=a.ref(0),s=a.ref(),c=a.ref(),m=r,p=a.ref(!1),h=a.ref({}),y=a.ref({}),u=a.ref();a.watch(()=>[n.itemData],()=>{var _;const C=O.cloneDeep(n.itemData);s.value=(_=O.cloneDeep(C))==null?void 0:_.map(S=>{var k;if(S.key==="extra"){let g=[];(k=S.value)==null||k.forEach(P=>{var $;g.push(($=Object.values(P))==null?void 0:$[0])}),S.value=g}return S})},{deep:!0,immediate:!0});const x=(C,_,S,k)=>{var P;let g={};((P=C==null?void 0:C[0])==null?void 0:P.contents)==="详情"&&(p.value=!0,g[_]=C,c.value=C==null?void 0:C.filter($=>($==null?void 0:$.key)!=="tableContentName"),h.value=g,y.value=S,u.value=k.id)},D=C=>{var $,Y,pe,ze;const _=(Y=($=Object.values(O.cloneDeep(h.value)))==null?void 0:$[0])==null?void 0:Y.filter(de=>(de==null?void 0:de.key)==="tableContentName"),S=(ze=(pe=Object.values(O.cloneDeep(h.value)))==null?void 0:pe[0])==null?void 0:ze.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),k=S==null?void 0:S.map((de,Z)=>{var he;return Z===C.index&&(de==null?void 0:de.comp)==="Table"&&(de.compData=(he=de.compData)==null?void 0:he.map(ae=>{var ue,Se;return(ae==null?void 0:ae.key)==="tableContents"&&(ae.contents=(Se=(ue=C.content)==null?void 0:ue.map(Ve=>{let ge={};for(let T in Ve)T!=="id"&&(ge[T]=Ve[T]);return ge}))==null?void 0:Se.map(Ve=>Object.values(Ve))),ae})),de});k.unshift(_==null?void 0:_[0]);let g=O.cloneDeep(h.value),P={};for(let de in g)P[de]=k;h.value=P},R=()=>{p.value=!1,h.value={},y.value={},u.value=void 0,i.value++},E=C=>{var $,Y,pe,ze;const _=(Y=($=Object.values(O.cloneDeep(h.value)))==null?void 0:$[0])==null?void 0:Y.filter(de=>(de==null?void 0:de.key)==="tableContentName"),S=(ze=(pe=Object.values(O.cloneDeep(h.value)))==null?void 0:pe[0])==null?void 0:ze.filter(de=>(de==null?void 0:de.key)!=="tableContentName"),k=S==null?void 0:S.map((de,Z)=>(Z===C.index&&(de.compData=C.contents),de));k.unshift(_==null?void 0:_[0]);let g=O.cloneDeep(h.value),P={};for(let de in g)P[de]=k;h.value=P},K=()=>{var _,S;let C={};for(let k in y.value)k===((_=Object.keys(h.value))==null?void 0:_[0])?C[k]=(S=Object.values(h.value))==null?void 0:S[0]:C[k]=y.value[k];m("change",{buttonName:"编辑",index:u.value,singleContent:C},"methodData"),p.value=!1,h.value={},y.value={},u.value=void 0},M=()=>{p.value=!1,h.value={},y.value={},u.value=void 0},L=C=>{m("change",C,"methodData")},j=C=>Bi(C);return(C,_)=>{const S=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",Kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:i.value},[(k==null?void 0:k.key)==="extra"?(a.openBlock(),a.createElementBlock("div",Gh)):(a.openBlock(),a.createElementBlock("div",Yh,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(j(k.comp)),{itemData:k==null?void 0:k.compData,childItemData:k==null?void 0:k.itemChildData,key:g,index:(k==null?void 0:k.id)??g,onContentClick:x,onChange:L},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(_r.ssDialog,{visible:p.value,onBeforeDestroy:M},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(k,g)=>(a.openBlock(),a.createElementBlock("div",{key:g,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(j(k.comp)),{itemData:k==null?void 0:k.compData,onChange:D,childItemData:k==null?void 0:k.itemChildData,key:g,onContentChange:E,index:(k==null?void 0:k.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",Jh,[a.createVNode(S,{class:"cancel-button footer-button",onClick:R,id:"themeBorderButton"},{default:a.withCtx(()=>_[0]||(_[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(S,{class:"confirm-button footer-button",onClick:K,id:"themeButton"},{default:a.withCtx(()=>_[1]||(_[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Zh=er._export_sfc(Xh,[["__scopeId","data-v-2d9c5ab2"]]),Qh={key:0,class:"method-content"},e4={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const r=a.ref([]),n=na.useOriginalState(O.pinia),{originalPath:i}=O.storeToRefs(n),s=l,c=a.ref(!1),m=a.ref(),p=na.useTableComp(O.pinia),{multipleTableConst:h}=O.storeToRefs(p),y=O.useModelComp(O.pinia),u=a.ref(!1),x=O.useMenuState(O.pinia),D=O.useLoginState(O.pinia),{itemData:R,isEdit:E,routeToChildPath:K,tableViewContents:M,lockingPage:L,payloadTypes:j}=O.storeToRefs(y),{activeMenuPath:C,platform:_,childMenu:S}=O.storeToRefs(x),{loginUserInfo:k}=O.storeToRefs(D),g=a.ref(!1),P=async()=>{var ge,T;(ge=r.value)!=null&&ge.find(q=>(q==null?void 0:q.buttonName)==="保存")&&await ae((T=r.value)==null?void 0:T.find(q=>(q==null?void 0:q.buttonName)==="保存")),await na.onSaveBack()};a.watch(()=>R.value,async()=>{E.value==="view"&&!g.value&&await Ve(O.cloneDeep(s.itemData)),g.value=!1},{deep:!0});const $=()=>{c.value=!1,m.value=void 0},Y=ge=>ge.map(T=>{const q={};for(const ne in T){const Ne=T[ne];if(ne.includes(h.value)){const we=ne.split(h.value);let Ke=q;we.forEach((ua,za)=>{za===we.length-1?Ke[ua]=Ne:(Ke[ua]||(Ke[ua]={}),Ke=Ke[ua])})}else q[ne]=Ne}return q}),pe=async(ge,T,q=[])=>{var Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa;let ne=(Ne=O.cloneDeep(T))==null?void 0:Ne.filter(V=>(V==null?void 0:V.comp)!=="methodButton");if(ge!=null&&ge.includes("[")){let V=(le=(za=(ua=(Ke=(we=O.cloneDeep(ge))==null?void 0:we.split("["))==null?void 0:Ke[1])==null?void 0:ua.split("]"))==null?void 0:za[0])==null?void 0:le.split(":"),H="";if(V!=null&&V[0]){let ee=(Te=ne==null?void 0:ne.find(fe=>(fe==null?void 0:fe.name)===(V==null?void 0:V[0])))==null?void 0:Te.compData;if(!ee){let fe=(Me=ge==null?void 0:ge.split("["))==null?void 0:Me[0],me=await na.getItemData(fe,sessionStorage.getItem("systemKey"),"",!1,"","",q);ee=(Ue=me==null?void 0:me.find(fa=>(fa==null?void 0:fa.name)===(V==null?void 0:V[0])))==null?void 0:Ue.compData}ee==null||ee.forEach(fe=>{var me,fa,Xe,ce,_e,va;if((fe==null?void 0:fe.key)==="formContent")(me=fe==null?void 0:fe.contents)==null||me.forEach(qe=>{var La;(qe==null?void 0:qe.key)===(V==null?void 0:V[1])&&(Array.isArray(qe==null?void 0:qe.value)?H=qe==null?void 0:qe.value:H=(La=qe==null?void 0:qe.value)==null?void 0:La.toString())});else if((fe==null?void 0:fe.key)==="tableContents"){let qe=[],La=(fa=ee==null?void 0:ee.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:fa.contents,Ma=(V==null?void 0:V[1])??"";if(La!=null&&La.every(Je=>Array.isArray(Je))){let Je=na.getColumnChild((_e=La==null?void 0:La[0])==null?void 0:_e.filter(ia=>(ia==null?void 0:ia.label)!=="操作"));(va=fe.contents)==null||va.forEach(ia=>{let se={};ia=ia==null?void 0:ia.filter(U=>!(U!=null&&U.id)),Je==null||Je.forEach((U,W)=>{let Be=ia[W];typeof ia[W]=="number"&&(Be=ia[W].toString()),(Ma===""||Ma===U.prop)&&(se[U.prop]=Be)}),qe.push(se)}),qe=Y(qe)}else{let Je=(Xe=La==null?void 0:La.map(ia=>ia==null?void 0:ia.label))==null?void 0:Xe.filter(ia=>ia!=="操作");(ce=fe.contents)==null||ce.forEach(ia=>{let se={};ia=ia==null?void 0:ia.filter(U=>!(U!=null&&U.id)),Je==null||Je.forEach((U,W)=>{let Be=ia[W];typeof ia[W]=="number"&&(Be=ia[W].toString()),(Ma===""||Ma===U)&&(se[U]=Be)}),qe.push(se)})}H=qe}})}return H}else if(ge!=null&&ge.includes("/")){let V={};return(Re=O.cloneDeep(ne))==null||Re.forEach((H,ee)=>{var fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia,se,U,W,Be,ke,ra,oa;if((H==null?void 0:H.comp)==="Table"){let _a=Array.isArray((fa=(me=(fe=H==null?void 0:H.compData)==null?void 0:fe.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:me.contents)==null?void 0:fa[0])?(va=(_e=(ce=(Xe=H==null?void 0:H.compData)==null?void 0:Xe.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:ce.contents)==null?void 0:_e[0])==null?void 0:va.some(Oe=>Oe==null?void 0:Oe.children):[],ga=(Ma=(La=(qe=H==null?void 0:H.compData)==null?void 0:qe.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:La.contents)==null?void 0:Ma.map(Oe=>(Oe!=null&&Oe.find(Ra=>Ra==null?void 0:Ra.id)&&(Oe=Oe.slice(1)),Oe)),Pa=(W=(U=(se=(ia=(Je=H==null?void 0:H.compData)==null?void 0:Je.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:ia.contents)==null?void 0:se[0])==null?void 0:U[0])==null?void 0:W.label,ma=(ke=(Be=H==null?void 0:H.compData)==null?void 0:Be.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:ke.contents;if(_a)(_a==null?void 0:_a.length)===0?V[H.name]=V!=null&&V[H.name]?V[H.name]:na.tableToForm(ga,ma):V[Pa]=na.tableToForm(ga,ma);else{const Oe=[];ma=ma.slice(1,ma.length-1),ma==null||ma.forEach((Ra,hl)=>{ga==null||ga.forEach(Cl=>{Oe.push({key:Ra.label+Cl[0],value:Cl[hl+1]})})}),V["form"+ee]=Oe}}else{const _a=(oa=(ra=H.compData)==null?void 0:ra.find(Pa=>(Pa==null?void 0:Pa.key)==="formContent"))==null?void 0:oa.contents;V!=null&&V.form||(V.form=[]);const ga=[];_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},ga.push(Pa))}),V.form=[...ga,...O.cloneDeep(V==null?void 0:V.form)]}}),V}else{if(ge==="createInsofDataApi"){let V=(oe=O.cloneDeep(T))==null?void 0:oe[0];return V={comp:(Ie=O.cloneDeep(V))==null?void 0:Ie.comp,compData:(He=O.cloneDeep(V))==null?void 0:He.compData,name:(Ba=O.cloneDeep(V))==null?void 0:Ba.name,isShow:(Oa=O.cloneDeep(V))==null?void 0:Oa.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:C.value},value:{pageData:V}}}return ge}},ze=async(ge,T,q)=>{var we,Ke,ua;let ne=await na.getItemData(T,sessionStorage.getItem("systemKey"),""),Ne=ne==null?void 0:ne.find(za=>(za==null?void 0:za.name)===(q==null?void 0:q[0]));if(Ne){if((Ne==null?void 0:Ne.comp)==="Table"){let za={};for(let Ie in O.cloneDeep(ge))O.cloneDeep(ge)[Ie]!=="loginUser"?za[Ie]=O.cloneDeep(ge)[Ie]:za[Ie]=((we=k.value)==null?void 0:we.account)||((Ke=k.value)==null?void 0:Ke.账号);let le=[],Te=za;Array.isArray(ge)||(Te=[za]),Te==null||Te.forEach(Ie=>{le.push({[Ie[q[1]]]:Ie})});let Me=[],Ue=le==null?void 0:le.map(Ie=>{var He;return(He=Object.keys(Ie))==null?void 0:He[0]});ne==null||ne.forEach(Ie=>{var He;(Ie==null?void 0:Ie.name)===(q==null?void 0:q[0])&&((He=Ie==null?void 0:Ie.compData)==null||He.forEach(Ba=>{var Oa;(Ba==null?void 0:Ba.key)==="tableContents"&&((Oa=Ba==null?void 0:Ba.contents)==null||Oa.forEach(V=>{V!=null&&V.some(H=>Ue.includes(H))&&Me.push({[V.find(H=>H.id).id]:V.find(H=>Ue.includes(H))})}))}))});let Re=Me==null?void 0:Me.map(Ie=>{var He;return(He=Object.keys(Ie))==null?void 0:He[0]}),oe=[];if(Re==null||Re.forEach(Ie=>{var Oa;let He=(Oa=Me==null?void 0:Me.find(V=>{var H;return((H=Object.keys(V))==null?void 0:H[0].toString())===Ie.toString()}))==null?void 0:Oa[Ie],Ba=le==null?void 0:le.find(V=>{var H;return((H=Object.keys(V))==null?void 0:H[0])===He});oe.push({id:parseInt(Ie),value:{tableData:Ba[He]}})}),(oe==null?void 0:oe.length)>0)return oe}else if((Ne==null?void 0:Ne.comp)==="Form"){let za=O.cloneDeep(Ne);za.compData=(ua=za.compData)==null?void 0:ua.map(Me=>{var Ue;return(Me==null?void 0:Me.key)==="formContent"&&(Me.contents=(Ue=Me.contents)==null?void 0:Ue.map(Re=>((Re==null?void 0:Re.key)===(q==null?void 0:q[1])&&(Re.value=(ge==null?void 0:ge[Re==null?void 0:Re.prop])||ge),Re))),Me});let le={};for(let Me in za)Me!=="id"&&(le[Me]=za[Me]);let Te=[];if(Te.push({id:Ne==null?void 0:Ne.id,keyType:q==null?void 0:q[1],value:{pageData:le}}),(Te==null?void 0:Te.length)>0)return Te}}},de=async(ge,T,q)=>{var we,Ke,ua,za,le,Te,Me,Ue,Re,oe;let ne=await na.getItemData(T,sessionStorage.getItem("systemKey"),""),Ne=ne==null?void 0:ne.find(Ie=>(Ie==null?void 0:Ie.name)===(q==null?void 0:q[0]));if(Ne){if((Ne==null?void 0:Ne.comp)==="Table"){let Ie={};for(let He in O.cloneDeep(ge))O.cloneDeep(ge)[He]!=="loginUser"?Ie[He]=O.cloneDeep(ge)[He]:Ie[He]=((we=k.value)==null?void 0:we.account)||((Ke=k.value)==null?void 0:Ke.账号);await Nr.createInsofDataApi({key:{type:"data",pageKey:T,tableId:Ne==null?void 0:Ne.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Ie}})}else if((Ne==null?void 0:Ne.comp)==="Form"){let Ie=O.cloneDeep(Ne),He=Object.keys(ge),Ba="";(za=(ua=O.cloneDeep(Ie))==null?void 0:ua.compData)==null||za.forEach(me=>{var fa,Xe;(me==null?void 0:me.key)==="formContent"&&((Xe=(fa=O.cloneDeep(me))==null?void 0:fa.contents)==null||Xe.forEach(ce=>{var _e;He.includes(ce==null?void 0:ce.key)&&(ce==null?void 0:ce.value)===((_e=k.value)==null?void 0:_e.姓名)&&(Ba=ce==null?void 0:ce.key)}))});let Oa=[];(le=Object.values(ge[Ba]))==null||le.forEach(me=>{me!=null&&me.includes("(")&&Oa.push(me)}),Oa=[...new Set(Oa)];const V=Oa==null?void 0:Oa.map(async me=>{var va,qe,La,Ma,Je,ia,se,U,W,Be,ke,ra;let fa="";(ia=(Je=(Ma=(La=(qe=(va=O.cloneDeep(me))==null?void 0:va.split("("))==null?void 0:qe[1])==null?void 0:La.split(")"))==null?void 0:Ma[0])==null?void 0:Je.split(":"))==null||ia.forEach(oa=>{fa=fa===""?fa+oa.replaceAll("'",""):fa+"/"+oa.replaceAll("'","")});let Xe=[];(ra=(ke=(Be=(W=(U=(se=O.cloneDeep(me))==null?void 0:se.split("<"))==null?void 0:U[1])==null?void 0:W.split(">"))==null?void 0:Be[0])==null?void 0:ke.split(":"))==null||ra.forEach(oa=>{Xe.push(oa.replaceAll("'",""))});const ce=await na.getItemData(fa,sessionStorage.getItem("systemKey"),"");let _e="";return ce==null||ce.forEach(oa=>{var _a;oa.name===(Xe==null?void 0:Xe[0])&&((_a=oa==null?void 0:oa.compData)==null||_a.forEach(ga=>{var Pa;(ga==null?void 0:ga.key)==="formContent"&&((Pa=ga.contents)==null||Pa.forEach(ma=>{(ma==null?void 0:ma.key)===(Xe==null?void 0:Xe[1])&&(_e=ma==null?void 0:ma.value)}))}))}),{[me]:_e}}),H=await Promise.all(V);Ie.compData=(Me=(Te=O.cloneDeep(Ie))==null?void 0:Te.compData)==null?void 0:Me.map(me=>{var fa,Xe;return(me==null?void 0:me.key)==="formContent"&&(me.contents=(Xe=(fa=O.cloneDeep(me))==null?void 0:fa.contents)==null?void 0:Xe.map(ce=>{var _e,va,qe,La;return(_e=ge[Ba])!=null&&_e[ce==null?void 0:ce.key]&&(ge[Ba][ce==null?void 0:ce.key].includes("(")?ce.value=(va=H==null?void 0:H.find(Ma=>{var Je;return((Je=Object.keys(Ma))==null?void 0:Je[0])===ge[Ba][ce==null?void 0:ce.key]}))==null?void 0:va[ge[Ba][ce==null?void 0:ce.key]]:ce.value=(La=(qe=O.cloneDeep(ge))==null?void 0:qe[Ba])==null?void 0:La[ce==null?void 0:ce.key]),ce})),me});const ee=await Nr.getInsofDataApi({key:{type:"structure",pageKey:T,systemKey:sessionStorage.getItem("systemKey")}});let fe="";((Ue=ee==null?void 0:ee.data)==null?void 0:Ue.type)==="success"&&((oe=(Re=ee==null?void 0:ee.data)==null?void 0:Re.result)==null||oe.forEach(me=>{var fa,Xe;((Xe=(fa=me==null?void 0:me.value)==null?void 0:fa.pageData)==null?void 0:Xe.name)===(q==null?void 0:q[0])&&(fe=me.id)}),await Nr.updateInsofDataApi({id:fe,value:{pageData:Ie}}))}}},Z=(ge,T="",q={})=>{for(const[ne,Ne]of Object.entries(ge)){const we=T?`${T}.${ne}`:ne;Ne!==null&&typeof Ne=="object"&&!Array.isArray(Ne)&&Object.prototype.toString.call(Ne)!=="[object Date]"?Z(Ne,we,q):q[we]=Ne}return q},he=async(ge,T,q,ne)=>{var Ke,ua,za,le,Te,Me,Ue,Re,oe,Ie,He,Ba,Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La;let Ne=await na.getItemData(T,sessionStorage.getItem("systemKey"),""),we=Ne==null?void 0:Ne.find(Ma=>(Ma==null?void 0:Ma.name)===(q==null?void 0:q[0]));if(we){if(!(q!=null&&q[1])&&(we==null?void 0:we.comp)==="Table"){let Ma={},Je=[],ia=(ua=(Ke=we==null?void 0:we.compData)==null?void 0:Ke.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:ua.contents;ia!=null&&ia.every(W=>Array.isArray(W))?Je=(le=na.getColumnChild((za=ia==null?void 0:ia[0])==null?void 0:za.filter(W=>(W==null?void 0:W.label)!=="操作")))==null?void 0:le.map(W=>W==null?void 0:W.prop):Je=ia==null?void 0:ia.map(W=>W==null?void 0:W.label);for(let W in O.cloneDeep(ge))if(O.cloneDeep(ge)[W]!=="loginUser"){let Be=Z(O.cloneDeep(ge)[W]),ke={};for(let ra in Be)if(Je!=null&&Je.find(oa=>oa===ra))ke[ra]=Be[ra];else if(Je!=null&&Je.find(oa=>(oa==null?void 0:oa.toUpperCase())===(ra==null?void 0:ra.toUpperCase()))){let oa=Je==null?void 0:Je.find(_a=>(_a==null?void 0:_a.toUpperCase())===(ra==null?void 0:ra.toUpperCase()));ke[oa]=Be[ra]}Ma[W]=ke}else Ma[W]=((Te=k.value)==null?void 0:Te.account)||((Me=k.value)==null?void 0:Me.账号);let se=await Nr.getInsofDataApi({keyLikes:{tableId:we==null?void 0:we.id}});if(((Re=(Ue=se==null?void 0:se.data)==null?void 0:Ue.result)==null?void 0:Re.length)>0){let W=(Ie=(oe=se==null?void 0:se.data)==null?void 0:oe.result)==null?void 0:Ie.map(Be=>Be==null?void 0:Be.id);(W==null?void 0:W.length)>0&&await Nr.batchDeleteInsofDataApi({ids:W})}let U=[];if((He=we==null?void 0:we.compData)!=null&&He.find(W=>(W==null?void 0:W.key)==="pageColumn")&&((V=(Oa=(Ba=we==null?void 0:we.compData)==null?void 0:Ba.find(W=>(W==null?void 0:W.key)==="pageColumn"))==null?void 0:Oa.contents)!=null&&V.includes("["))){const W=await Nr.getInsofDataApi({id:we==null?void 0:we.tableId});let Be=((me=(fe=(ee=(H=W==null?void 0:W.data)==null?void 0:H.result)==null?void 0:ee[0])==null?void 0:fe.key)==null?void 0:me.pageKey)??"";(fa=Object.values(Ma))==null||fa.forEach(ke=>{U.push({key:{type:"data",pageKey:Be,tableId:we==null?void 0:we.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ke}})})}else(Xe=Object.values(Ma))==null||Xe.forEach(W=>{U.push({key:{type:"data",pageKey:T,tableId:we==null?void 0:we.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:W}})});(U==null?void 0:U.length)>0&&await Nr.batchAddInsofDataApi({dataList:U})}else if(!(q!=null&&q[1])&&(we==null?void 0:we.comp)==="Form"){let Ma=O.cloneDeep(we);Ma.compData=(_e=(ce=O.cloneDeep(Ma))==null?void 0:ce.compData)==null?void 0:_e.map(se=>{var U,W;return(se==null?void 0:se.key)==="formContent"&&(se.contents=(W=(U=O.cloneDeep(se))==null?void 0:U.contents)==null?void 0:W.map(Be=>{var ke,ra;return(ke=O.cloneDeep(ge))!=null&&ke[Be==null?void 0:Be.key]&&(Be.value=(ra=O.cloneDeep(ge))==null?void 0:ra[Be==null?void 0:Be.key]),Be})),se});const Je=await Nr.getInsofDataApi({key:{type:"structure",pageKey:T,systemKey:sessionStorage.getItem("systemKey")}});let ia="";((va=Je==null?void 0:Je.data)==null?void 0:va.type)==="success"&&((La=(qe=Je==null?void 0:Je.data)==null?void 0:qe.result)==null||La.forEach(se=>{var U,W;((W=(U=se==null?void 0:se.value)==null?void 0:U.pageData)==null?void 0:W.name)===(q==null?void 0:q[0])&&(ia=se.id)}),await Nr.updateInsofDataApi({id:ia,value:{pageData:Ma}}))}}},ae=async ge=>{var T,q,ne,Ne,we,Ke,ua,za,le,Te,Me,Ue,Re,oe;x.setImportLoading(!0);try{if(ge.api){let Ie=new WeakMap,He=await na.getItemData((S==null?void 0:S.value)===""?C.value:S==null?void 0:S.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ie),Ba="";if(He=He==null?void 0:He.map(Xe=>{var ce,_e,va,qe,La,Ma,Je,ia,se,U,W,Be;if((Xe==null?void 0:Xe.comp)==="Form")Xe.compData=(ce=Xe.compData)==null?void 0:ce.map(ke=>{var ra;return(ke==null?void 0:ke.key)==="formContent"&&(ke.contents=(ra=ke.contents)==null?void 0:ra.map(oa=>{var _a;if((oa==null?void 0:oa.value)===""&&(oa==null?void 0:oa.type)==="Select"){let ga=na.judgeContents((_a=O.cloneDeep(oa))==null?void 0:_a.optionUrl,Ie);oa.value=oa.value||ga}return oa})),ke});else if((Xe==null?void 0:Xe.comp)==="Table"&&(_e=Xe.compData)!=null&&_e.find(ke=>(ke==null?void 0:ke.key)==="pageColumn")){let ke=(qe=(va=Xe.compData)==null?void 0:va.find(ga=>(ga==null?void 0:ga.key)==="pageColumn"))==null?void 0:qe.contents,ra=((Ma=(La=Xe.compData)==null?void 0:La.find(ga=>(ga==null?void 0:ga.key)==="pageGroup"))==null?void 0:Ma.contents)??"",oa=(se=(ia=(Je=ke==null?void 0:ke.split("["))==null?void 0:Je[1])==null?void 0:ia.split("]"))==null?void 0:se[0];Ba=((U=ke==null?void 0:ke.split("["))==null?void 0:U[0])+((Be=(W=M.value)==null?void 0:W.find(ga=>(ga==null?void 0:ga.key)===oa))==null?void 0:Be.value)}return Xe}),!(Ba===""||Ba==="")){const Xe=await na.getItemData(Ba,sessionStorage.getItem("systemKey"),"",!1,"","",Ie);He=He==null?void 0:He.map(ce=>{var _e,va,qe,La,Ma,Je,ia,se,U,W,Be,ke,ra;if((ce==null?void 0:ce.comp)==="Table"&&(_e=ce.compData)!=null&&_e.find(oa=>(oa==null?void 0:oa.key)==="pageColumn")){let oa=(qe=(va=ce.compData)==null?void 0:va.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:qe.contents,_a=((Ma=(La=ce.compData)==null?void 0:La.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:Ma.contents)??"",ga=(se=(ia=(Je=oa==null?void 0:oa.split("["))==null?void 0:Je[1])==null?void 0:ia.split("]"))==null?void 0:se[0],Pa=((U=oa==null?void 0:oa.split("["))==null?void 0:U[0])+((Be=(W=M.value)==null?void 0:W.find(Oe=>(Oe==null?void 0:Oe.key)===ga))==null?void 0:Be.value),ma=(ke=Xe==null?void 0:Xe.find(Oe=>(Oe==null?void 0:Oe.name)===(_a===""?s==null?void 0:s.compName:_a)))==null?void 0:ke.compData;ce.compData=(ra=ce.compData)==null?void 0:ra.map(Oe=>{var Ra;return(Oe==null?void 0:Oe.key)==="tableContents"&&(Oe.contents=(Ra=ma==null?void 0:ma.find(hl=>(hl==null?void 0:hl.key)==="tableContents"))==null?void 0:Ra.contents),Oe})}return ce})}let Oa={};if(((q=(T=ge==null?void 0:ge.extraValues)==null?void 0:T.input)==null?void 0:q.length)>0){const Xe=(Ne=(ne=ge==null?void 0:ge.extraValues)==null?void 0:ne.input)==null?void 0:Ne.map(async ce=>{var _e;ue!=null&&ue.find(va=>va===ce)?Oa=await pe(ce,He):Oa[Object.keys(ce)[0]]=await pe((_e=Object.values(ce))==null?void 0:_e[0],He,Ie)});await Promise.all(Xe)}else Oa=await pe("/",He);let V=!1;(Ke=(we=ge==null?void 0:ge.extraValues)==null?void 0:we.output)==null||Ke.forEach(Xe=>{var ce,_e;(_e=(ce=Object.values(Xe))==null?void 0:ce[0])!=null&&_e.includes(".doc")&&(V=!0)});let H;if(V){const Xe=Pi.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await Ya.axios.post(ge.api,Oa,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Xe.close()})}else H=await Ya.axios.post(ge.api,Oa,{headers:{"Content-Type":"application/json"}});let ee=(Te=(le=(za=(ua=O.cloneDeep(ge))==null?void 0:ua.extraValues)==null?void 0:za.output)==null?void 0:le.map(Xe=>{var ce,_e,va,qe,La,Ma,Je,ia,se,U,W,Be,ke,ra,oa,_a;if(!((_e=(ce=Object.values(Xe))==null?void 0:ce[0])!=null&&_e.includes(".doc"))){let ga=(U=(se=(ia=(qe=O.cloneDeep((va=Object.values(Xe))==null?void 0:va[0]))==null?void 0:qe.split("["))==null?void 0:ia[((Je=(Ma=O.cloneDeep((La=Object.values(Xe))==null?void 0:La[0]))==null?void 0:Ma.split("["))==null?void 0:Je.length)-1])==null?void 0:se.split("]"))==null?void 0:U[0],Pa=ga==null?void 0:ga.split(":"),ma=(ke=O.cloneDeep((W=Object.values(Xe))==null?void 0:W[0]))==null?void 0:ke.substring(0,O.cloneDeep((Be=Object.values(Xe))==null?void 0:Be[0]).lastIndexOf("["));if(ma=(oa=O.cloneDeep(ma))==null?void 0:oa.slice(0,((ra=O.cloneDeep(ma))==null?void 0:ra.length)-1),ma!=null&&ma.includes("[")){let Oe="";if((_a=na.contentTransArrayToAll(ma,"/"))==null||_a.forEach(Ra=>{var hl,Cl,Xl,xl,Vl,Wa,Rl;if(!(Ra!=null&&Ra.includes("[")))Oe=Oe===""?Oe+Ra.replaceAll("/",""):Oe+"/"+Ra.replaceAll("/","");else{let ja=O.cloneDeep(Ra).slice(1,((hl=O.cloneDeep(Ra))==null?void 0:hl.length)-1),ka=(Wa=(Vl=(xl=(Xl=(Cl=O.cloneDeep(ja))==null?void 0:Cl.split("["))==null?void 0:Xl[1])==null?void 0:xl.split("]"))==null?void 0:Vl[0])==null?void 0:Wa.split(":"),Na="",$a=(Rl=He==null?void 0:He.find(Xa=>(Xa==null?void 0:Xa.name)===(ka==null?void 0:ka[0])))==null?void 0:Rl.compData;$a==null||$a.forEach(Xa=>{var Za;(Xa==null?void 0:Xa.key)==="formContent"&&((Za=Xa==null?void 0:Xa.contents)==null||Za.forEach(aa=>{(aa==null?void 0:aa.key)===(ka==null?void 0:ka[1])&&(Na=aa==null?void 0:aa.value)}))}),Oe=Oe===""?Oe+Na.replaceAll("/",""):Oe+"/"+Na.replaceAll("/","")}}),ma=Oe,ma[(ma==null?void 0:ma.length)-1]!=="/")return ma}}}))==null?void 0:Te.filter(Xe=>Xe);ee=[...new Set(O.cloneDeep(ee))];let fe=ee==null?void 0:ee.map(async Xe=>{let ce=await na.getItemData(Xe,sessionStorage.getItem("systemKey"),"",!1,"","",Ie);if((ce==null?void 0:ce.length)===0)return await na.getParentContents(Xe)});await Promise.all(fe);let me=[],fa=(Re=(Ue=(Me=O.cloneDeep(ge))==null?void 0:Me.extraValues)==null?void 0:Ue.output)==null?void 0:Re.map(async Xe=>{var ia,se,U,W,Be,ke,ra,oa,_a,ga,Pa,ma,Oe,Ra,hl,Cl,Xl,xl,Vl,Wa,Rl,ja,ka,Na,$a,Xa,Za,aa,Va,ye,xa,Le,re,ea,pa,We,Sa,ya,ml,Ha,Ka,wa,cl,Ia,Ae,Dl,Ol,Gl,Hl,Zl,Sr,Fl,fr,Fr,Ul,rr,$r,Tr,Rr,Ar,yr,zr,Mr,ir,xn,Yr,rn,zn,wn,gn;if((se=(ia=Object.values(Xe))==null?void 0:ia[0])!=null&&se.includes(".doc")){var ce=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),_e=H.headers["content-disposition"],va=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),qe=va.exec(_e),La=qe==null?void 0:qe[1],Ma=document.createElement("a"),Je=window.URL.createObjectURL(ce);m.value=[{name:La,blobUrl:Je}],c.value=!0}else{let nn=(ga=(_a=(oa=(W=O.cloneDeep((U=Object.values(Xe))==null?void 0:U[0]))==null?void 0:W.split("["))==null?void 0:oa[((ra=(ke=O.cloneDeep((Be=Object.values(Xe))==null?void 0:Be[0]))==null?void 0:ke.split("["))==null?void 0:ra.length)-1])==null?void 0:_a.split("]"))==null?void 0:ga[0],ar=nn==null?void 0:nn.split(":"),ql=(Oe=O.cloneDeep((Pa=Object.values(Xe))==null?void 0:Pa[0]))==null?void 0:Oe.substring(0,O.cloneDeep((ma=Object.values(Xe))==null?void 0:ma[0]).lastIndexOf("["));if(ql!=null&&ql.includes("[")?ql=(hl=O.cloneDeep(ql))==null?void 0:hl.slice(0,((Ra=O.cloneDeep(ql))==null?void 0:Ra.length)-1):ql===""&&(ql=C.value),ql=ql.replaceAll("<","[").replaceAll(">","]"),ql!=null&&ql.includes("[")){let Ll="";(Cl=na.contentTransArrayToAll(ql,"/"))==null||Cl.forEach((Ml,gr)=>{var ur,jl,Vr,Pr,_n,on,ei,Mn,ai,Sn,In;if(!(Ml!=null&&Ml.includes("[")))Ll=Ll===""?Ll+Ml.replaceAll("/",""):Ll+"/"+Ml.replaceAll("/","");else{let Hn="",en="";(ur=O.cloneDeep(Ml))!=null&&ur.includes("]")?(Hn=O.cloneDeep(Ml).slice(1,((jl=O.cloneDeep(Ml))==null?void 0:jl.length)-1),en=(ei=(on=(_n=(Pr=(Vr=O.cloneDeep(Hn))==null?void 0:Vr.split("["))==null?void 0:Pr[1])==null?void 0:_n.split("]"))==null?void 0:on[0])==null?void 0:ei.split(":")):(Hn=O.cloneDeep(Ml).slice(1,(Mn=O.cloneDeep(Ml))==null?void 0:Mn.length),en=(ai=O.cloneDeep(Hn))==null?void 0:ai.split("/"));let On="",En=(Sn=He==null?void 0:He.find(Gr=>(Gr==null?void 0:Gr.name)===(en==null?void 0:en[0])))==null?void 0:Sn.compData;En==null||En.forEach(Gr=>{var Un;(Gr==null?void 0:Gr.key)==="formContent"&&((Un=Gr==null?void 0:Gr.contents)==null||Un.forEach(bn=>{(bn==null?void 0:bn.key)===(en==null?void 0:en[1])&&(On=bn==null?void 0:bn.value)}))}),((In=na.contentTransArrayToAll(ql,"/"))==null?void 0:In.length)-1!==gr?Ll=Ll===""?Ll+On.replaceAll("/",""):Ll+"/"+On.replaceAll("/",""):Ll=Ll+i.value+On.replaceAll("/","")}}),(Xl=C.value)!=null&&Xl.includes(Ll)?ql=C.value:ql=Ll}let zl=O.cloneDeep((xl=Object.keys(Xe))==null?void 0:xl[0]);if(((Vl=H==null?void 0:H.data)==null?void 0:Vl.statusCode)===200||((Wa=H==null?void 0:H.data)==null?void 0:Wa.code)===200){if(((ja=(Rl=H==null?void 0:H.data)==null?void 0:Rl.data)!=null&&ja[zl]||(Na=(ka=H==null?void 0:H.data)==null?void 0:ka.result)!=null&&Na[zl])&&(ar==null?void 0:ar.length)===1)return await he(((Xa=($a=H==null?void 0:H.data)==null?void 0:$a.data)==null?void 0:Xa[zl])||((aa=(Za=H==null?void 0:H.data)==null?void 0:Za.result)==null?void 0:aa[zl]),O.cloneDeep(ql),ar,Ba);if((ye=(Va=H==null?void 0:H.data)==null?void 0:Va.data)!=null&&ye[zl]||(Le=(xa=H==null?void 0:H.data)==null?void 0:xa.result)!=null&&Le[zl]){let Ll=await ze(((ea=(re=H==null?void 0:H.data)==null?void 0:re.data)==null?void 0:ea[zl])||((We=(pa=H==null?void 0:H.data)==null?void 0:pa.result)==null?void 0:We[zl]),O.cloneDeep(ql),ar);return Ll&&(me=[...me,...Ll]),Ll}else{if(!((Sa=H==null?void 0:H.data)!=null&&Sa.data)){let Ll=await na.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ie);Ll=Ll==null?void 0:Ll.map(gr=>{var ur;return(gr==null?void 0:gr.name)===(ar==null?void 0:ar[0])&&(gr.compData=(ur=gr.compData)==null?void 0:ur.map(jl=>{var Vr;return(jl==null?void 0:jl.key)==="formContent"&&(jl.contents=(Vr=jl.contents)==null?void 0:Vr.map(Pr=>{var _n,on;return(Pr==null?void 0:Pr.key)===(ar==null?void 0:ar[1])&&(Pr.value=(on=(_n=H==null?void 0:H.data)==null?void 0:_n.result)==null?void 0:on[zl==null?void 0:zl.replaceAll(":","")]),Pr})),jl})),gr});let Ml=[];(ya=Ll==null?void 0:Ll.filter(gr=>(gr==null?void 0:gr.comp)==="Form"))==null||ya.forEach(async gr=>{let ur={};for(let jl in gr)jl!=="id"&&(ur[jl]=gr[jl]);Ml.push({id:gr==null?void 0:gr.id,value:{pageData:ur}})}),(Ml==null?void 0:Ml.length)>0&&await Nr.batchUpdateInsofDataApi({dataList:Ml});return}if((ar==null?void 0:ar.length)===1){const Ll=(Ka=(Ha=(ml=H==null?void 0:H.data)==null?void 0:ml.data)==null?void 0:Ha.path)==null?void 0:Ka.path;let Ml="";(Dl=(Ae=(Ia=(cl=(wa=Ll==null?void 0:Ll.split("("))==null?void 0:wa[1])==null?void 0:cl.split(")"))==null?void 0:Ia[0])==null?void 0:Ae.split(":"))==null||Dl.forEach(jl=>{var Vr,Pr;Ml=Ml===""?Ml+((Vr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Vr.trim()):Ml+"/"+((Pr=jl==null?void 0:jl.replaceAll("'",""))==null?void 0:Pr.trim())});let gr=[(Sr=(Zl=(Hl=(Gl=(Ol=Ll==null?void 0:Ll.split("<"))==null?void 0:Ol[1])==null?void 0:Gl.split(">"))==null?void 0:Hl[0])==null?void 0:Zl.replaceAll("'",""))==null?void 0:Sr.trim()],ur;return(Fr=(fr=(Fl=H==null?void 0:H.data)==null?void 0:Fl.data)==null?void 0:fr.data)!=null&&Fr[ar==null?void 0:ar[0]]?ur=await he(($r=(rr=(Ul=H==null?void 0:H.data)==null?void 0:Ul.data)==null?void 0:rr.data)==null?void 0:$r[ar==null?void 0:ar[0]],Ml,ar,Ba):ur=await de((Rr=(Tr=H==null?void 0:H.data)==null?void 0:Tr.data)==null?void 0:Rr.data,Ml,gr,Ie),ur}else{const Ll=(zr=(yr=(Ar=H==null?void 0:H.data)==null?void 0:Ar.data)==null?void 0:yr.path)==null?void 0:zr.path;let Ml="";return(rn=(Yr=(xn=(ir=(Mr=Ll==null?void 0:Ll.split("("))==null?void 0:Mr[1])==null?void 0:ir.split(")"))==null?void 0:xn[0])==null?void 0:Yr.split(":"))==null||rn.forEach(ur=>{var jl,Vr;Ml=Ml===""?Ml+((jl=ur==null?void 0:ur.replaceAll("'",""))==null?void 0:jl.trim()):Ml+"/"+((Vr=ur==null?void 0:ur.replaceAll("'",""))==null?void 0:Vr.trim())}),await ze((gn=(wn=(zn=H==null?void 0:H.data)==null?void 0:zn.data)==null?void 0:wn.data)==null?void 0:gn[ar==null?void 0:ar[0]],Ml,ar)}}}}});if(await Promise.all(fa),(me==null?void 0:me.length)>0){let Xe=[];me==null||me.forEach(va=>{Xe!=null&&Xe.find(qe=>{var La,Ma,Je,ia;return((Ma=(La=qe==null?void 0:qe.value)==null?void 0:La.pageData)==null?void 0:Ma.name)===((ia=(Je=va==null?void 0:va.value)==null?void 0:Je.pageData)==null?void 0:ia.name)})||Xe.push(va)});let ce=[];Xe==null||Xe.forEach(va=>{var Ma,Je,ia,se;let qe=O.cloneDeep(va);qe.value.pageData.compData=(Ma=qe.value.pageData.compData)==null?void 0:Ma.map(U=>{var W;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(W=U.contents)==null?void 0:W.map(Be=>{var ra,oa,_a,ga;let ke=(ra=O.cloneDeep(me))==null?void 0:ra.find(Pa=>(Pa==null?void 0:Pa.keyType)===(Be==null?void 0:Be.key));if(ke){let Pa=(ga=(_a=(oa=ke.value.pageData.compData)==null?void 0:oa.find(ma=>(ma==null?void 0:ma.key)==="formContent"))==null?void 0:_a.contents)==null?void 0:ga.find(ma=>(ma==null?void 0:ma.key)===(Be==null?void 0:Be.key));Be.value=Pa==null?void 0:Pa.value}return Be})),U}),ce.push({id:qe==null?void 0:qe.id,value:qe==null?void 0:qe.value});let La=[];(se=(ia=(Je=qe==null?void 0:qe.value)==null?void 0:Je.pageData)==null?void 0:ia.compData)==null||se.forEach(U=>{var W;(U==null?void 0:U.key)==="formContent"&&((W=U==null?void 0:U.contents)==null||W.forEach(Be=>{var ke,ra,oa,_a,ga,Pa;if((ra=(ke=Be==null?void 0:Be.optionUrl)==null?void 0:ke.menuSelect)!=null&&ra.find(ma=>ma==null?void 0:ma.includes("[")))if(La!=null&&La.find(ma=>{var Oe,Ra,hl;return((Oe=ma==null?void 0:ma.key)==null?void 0:Oe.join(","))===((hl=(Ra=Be==null?void 0:Be.optionUrl)==null?void 0:Ra.menuSelect)==null?void 0:hl.join(","))})){let ma=(oa=La==null?void 0:La.find(Oe=>{var Ra,hl,Cl;return((Ra=Oe==null?void 0:Oe.key)==null?void 0:Ra.join(","))===((Cl=(hl=Be==null?void 0:Be.optionUrl)==null?void 0:hl.menuSelect)==null?void 0:Cl.join(","))}))==null?void 0:oa.value;ma.push({key:Be==null?void 0:Be.prop,groups:(_a=Be==null?void 0:Be.optionUrl)==null?void 0:_a.groupSelect,value:Be==null?void 0:Be.value}),La=La==null?void 0:La.map(Oe=>{var Ra,hl,Cl;return((Ra=Oe==null?void 0:Oe.key)==null?void 0:Ra.join(","))===((Cl=(hl=Be==null?void 0:Be.optionUrl)==null?void 0:hl.menuSelect)==null?void 0:Cl.join(","))&&(Oe.value=ma),Oe})}else La.push({key:(ga=Be==null?void 0:Be.optionUrl)==null?void 0:ga.menuSelect,value:[{key:Be==null?void 0:Be.prop,groups:(Pa=Be==null?void 0:Be.optionUrl)==null?void 0:Pa.groupSelect,value:Be==null?void 0:Be.value}]})}))}),(La==null?void 0:La.length)>0&&(La=La==null?void 0:La.map(U=>{var Be;let W="";return(Be=U==null?void 0:U.key)==null||Be.forEach(ke=>{var ra;if(!(ke!=null&&ke.includes("[")))W=W===""?W+ke:W+"/"+ke;else{let oa="",_a=(ra=ke==null?void 0:ke.replaceAll("[","").replaceAll("]",""))==null?void 0:ra.split(":");He==null||He.forEach(ga=>{var Pa;(ga==null?void 0:ga.name)===(_a==null?void 0:_a[0])&&((Pa=ga==null?void 0:ga.compData)==null||Pa.forEach(ma=>{var Oe;(ma==null?void 0:ma.key)==="formContent"&&((Oe=ma==null?void 0:ma.contents)==null||Oe.forEach(Ra=>{(Ra==null?void 0:Ra.prop)===(_a==null?void 0:_a[1])&&(oa=Ra==null?void 0:Ra.value)}))}))}),W=W+i.value+oa}}),U.key=W,U})),La==null||La.forEach(U=>{var ra,oa,_a;let W=(ra=Ie[U.key])==null?void 0:ra.find(ga=>{var Pa,ma,Oe,Ra,hl,Cl,Xl;return((ma=(Pa=ga==null?void 0:ga.value)==null?void 0:Pa.pageData)==null?void 0:ma.name)===((hl=(Ra=(Oe=U==null?void 0:U.value)==null?void 0:Oe[0])==null?void 0:Ra.groups)==null?void 0:hl[0])&&((Xl=(Cl=ga==null?void 0:ga.value)==null?void 0:Cl.pageData)==null?void 0:Xl.name)!==void 0}),Be=W==null?void 0:W.id,ke=(oa=W==null?void 0:W.value)==null?void 0:oa.pageData;ke.compData=(_a=ke.compData)==null?void 0:_a.map(ga=>{var Pa;return(ga==null?void 0:ga.key)==="formContent"&&(ga.contents=(Pa=ga.contents)==null?void 0:Pa.map(ma=>{var Ra;let Oe=(Ra=U.value)==null?void 0:Ra.find(hl=>(hl==null?void 0:hl.key)===(ma==null?void 0:ma.prop));return Oe&&(ma.value=Oe.value),ma})),ga}),ce.push({id:Be,value:{pageData:ke}})})});let _e=(oe=O.cloneDeep(me))==null?void 0:oe[0];(ce==null?void 0:ce.length)>0&&await Nr.batchUpdateInsofDataApi({dataList:ce})}y.setFreshContent(!0)}x.setImportLoading(!1)}catch{Ya.ElMessage.error("方法执行错误,请查看方法!"),x.setImportLoading(!1)}g.value=!0},ue=["createInsofDataApi"],Se=Ze.debounce(async ge=>{ae(ge)},100),Ve=async ge=>{var Ke,ua,za;const T=O.cloneDeep(ge);let q,ne=new WeakMap;ge!=null&&ge[0].path&&(q=await(T==null?void 0:T.map(async(le,Te)=>{var Oa,V,H,ee,fe,me,fa,Xe,ce,_e,va,qe,La,Ma,Je,ia;const Ue=(Oa=ne[le==null?void 0:le.path])==null?void 0:Oa.filter(se=>{var U;return((U=se==null?void 0:se.key)==null?void 0:U.type)==="data"});let Re="";const oe=await na.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ne);Ue==null||Ue.forEach(se=>{var U,W,Be,ke,ra;((W=(U=se==null?void 0:se.value)==null?void 0:U.tableData)==null?void 0:W.算法名称)===((Be=T==null?void 0:T[Te])==null?void 0:Be.method)&&(Re=(ra=(ke=se==null?void 0:se.value)==null?void 0:ke.tableData)==null?void 0:ra.算法体)});const Ie=await na.getItemData(le==null?void 0:le.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ne);let He="",Ba=(fe=(ee=(H=(V=Ie==null?void 0:Ie[0])==null?void 0:V.compData)==null?void 0:H.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:ee.contents)==null?void 0:fe.findIndex(se=>(se==null?void 0:se.prop)==="算法体");return(fa=(me=Ie==null?void 0:Ie[0])==null?void 0:me.compData)==null||fa.forEach(se=>{var U;(se==null?void 0:se.key)==="tableContents"&&((U=se==null?void 0:se.contents)==null||U.forEach(W=>{W!=null&&W.find(Be=>Be===(le==null?void 0:le.method))&&(He=W[Ba])}))}),{buttonName:((Xe=T==null?void 0:T[Te])==null?void 0:Xe.method)||((va=(_e=(ce=Ue==null?void 0:Ue[0])==null?void 0:ce.value)==null?void 0:_e.tableData)==null?void 0:va.算法名称),api:(Re===""?(Ma=(La=(qe=Ue==null?void 0:Ue[0])==null?void 0:qe.value)==null?void 0:La.tableData)==null?void 0:Ma.算法体:Re)||He,content:oe==null?void 0:oe.filter(se=>se.comp!=="methodButton"),extraContent:(Je=O.cloneDeep(le.value))==null?void 0:Je.slice(1),methodName:(le==null?void 0:le.path)??"",extraValues:(ia=T==null?void 0:T[Te])==null?void 0:ia.data}})));const Ne=T==null?void 0:T.map(async le=>{var Ie,He,Ba,Oa,V,H;const Te=(Ie=resAll.data.result)==null?void 0:Ie.filter(ee=>{var fe,me,fa;return((fe=ee==null?void 0:ee.key)==null?void 0:fe.parentTable)===""&&((me=ee==null?void 0:ee.key)==null?void 0:me.type)==="method"&&((fa=ee==null?void 0:ee.key)==null?void 0:fa.methodName)===ee.method}),Me=Te==null?void 0:Te[0],Ue=(He=resAll.data.result)==null?void 0:He.filter(ee=>{var fe,me;return((fe=ee==null?void 0:ee.key)==null?void 0:fe.type)==="methodData"&&((me=ee==null?void 0:ee.key)==null?void 0:me.tableId)===(Me==null?void 0:Me.id)}),Re=await na.getItemData(C.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ne),oe=Ue==null?void 0:Ue[0];return{buttonName:(Ba=Me==null?void 0:Me.key)==null?void 0:Ba.methodKey,api:(V=(Oa=oe==null?void 0:oe.value)==null?void 0:Oa.tableData)==null?void 0:V[0],content:Re==null?void 0:Re.filter(ee=>ee.comp!=="methodButton"),extraContent:(H=O.cloneDeep(le.value))==null?void 0:H.slice(1),methodName:(le==null?void 0:le.method)??""}}),we=(Ke=ge==null?void 0:ge[0])!=null&&Ke.path&&((ua=ge==null?void 0:ge[0])==null?void 0:ua.path)!==""?await Promise.all(q):await Promise.all(Ne);r.value=we==null?void 0:we.filter(le=>le==null?void 0:le.extraContent),(za=r.value)==null||za.forEach(le=>{var Te;le.api===""&&((Te=le.content)==null||Te.forEach(Me=>{var Ue;Me.comp=="Table"&&y.setExtraContents(na.methodTableToContent(Me.compData,(Ue=le.extraContent)==null?void 0:Ue[0]))}))})};return a.watch(()=>s.itemData,async()=>{E.value=="view"&&!g.value&&await Ve(O.cloneDeep(s.itemData)),g.value=!1},{immediate:!0,deep:!0}),(ge,T)=>{var q,ne,Ne;return a.unref(E)!=="edit"?(a.openBlock(),a.createElementBlock("div",Qh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((q=r.value)==null?void 0:q.filter(we=>(we==null?void 0:we.buttonName)!=="保存"),we=>{var Ke;return a.openBlock(),a.createElementBlock("div",null,[we.api!==""?(a.openBlock(),a.createBlock(a.unref(ns._sfc_main),{key:0,disabled:a.unref(L)===a.unref(C)&&!((Ke=we==null?void 0:we.buttonName)!=null&&Ke.includes("预览")),class:"calculator-content",modelValue:we.buttonName,onClickTrigger:ua=>a.unref(Se)(we),loading:u.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(K)!==""&&((Ne=a.unref(C))==null?void 0:Ne[((ne=a.unref(C))==null?void 0:ne.length)-1])!==a.unref(i)?(a.openBlock(),a.createBlock(a.unref(ns._sfc_main),{key:0,class:"calculator-content",onClickTrigger:P,modelValue:"保存"})):a.createCommentVNode("",!0)]),c.value?(a.openBlock(),a.createBlock(tl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:$},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},a4=er._export_sfc(e4,[["__scopeId","data-v-063aa9af"]]),l4={};function r4(l,r){return" 567 "}const n4=er._export_sfc(l4,[["render",r4]]),i4={class:"module content"},o4={class:"module data"},t4={class:"module layout"},s4={class:"form-content"},c4=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),c=a.ref("create"),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=a.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}]),h=a.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:""}]),y=a.ref({}),u=a.ref([]),x=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:u.value},{key:"signConfig",contents:y.value}]}),D=M=>{var L;y.value=O.cloneDeep(M),i("change",(L=x())==null?void 0:L.compData)},R=M=>{var L,j;if((M==null?void 0:M.buttonName)==="确认"){const C=O.cloneDeep(M==null?void 0:M.content);switch(c.value){case"create":u.value.push({...C,index:((L=u.value)==null?void 0:L.length)+1});break}i("change",(j=x())==null?void 0:j.compData),s.visible=!1}else s.visible=!1},E=(M,L)=>{var j,C;switch(M){case"create":(j=h.value)==null||j.forEach(_=>{_.value=""}),c.value="create",s.visible=!0;break;case"update":(C=h.value)==null||C.forEach(_=>{_.value=L[_==null?void 0:_.prop]}),c.value="update",s.visible=!0;break;case"delete":u.value.splice(L,1),c.value="delete";break}},K=()=>{s.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,M=>{var L,j;M&&(y.value=((L=M==null?void 0:M.find(C=>C.key==="signConfig"))==null?void 0:L.contents)??{},u.value=((j=M==null?void 0:M.find(C=>C.key==="signTypeList"))==null?void 0:j.contents)??[])},{immediate:!0}),(M,L)=>{const j=a.resolveComponent("svg-icon"),C=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",i4,[L[2]||(L[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(C,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=_=>E("create"))},{icon:a.withCtx(()=>[a.createVNode(j,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[L[1]||(L[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",o4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(_,S)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:S},[a.createElementVNode("span",null,a.toDisplayString(_==null?void 0:_.label),1),a.createElementVNode("div",null,[a.createVNode(C,{type:"primary",size:"small",onClick:k=>E("update",{..._,index:S+1})},{default:a.withCtx(()=>L[3]||(L[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(C,{type:"danger",size:"small",onClick:k=>E("delete",S)},{default:a.withCtx(()=>L[4]||(L[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",t4,[a.createVNode(tl.ssForm,{rowContents:p.value,onChange:D},null,8,["rowContents"])])]),a.createVNode(_r.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:K,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",s4,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:R},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),u4=er._export_sfc(c4,[["__scopeId","data-v-487e0536"]]),d4=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(0),c=a.computed(()=>{var x,D;return(x=n==null?void 0:n.stepConfig)!=null&&x.allowTrigger?s.value:(D=n==null?void 0:n.stepConfig)==null?void 0:D.active}),m=(x,D)=>{s.value=D-1,i("clickStep",x,D)};a.onMounted(()=>{var x;i("clickStep",(x=n==null?void 0:n.stepList)==null?void 0:x[0],0)});const p=x=>tl.getComponent(x),h=()=>{var D;const x=(D=n==null?void 0:n.stepList)==null?void 0:D.find((R,E)=>E+1===c.value);return console.log("findStep",x),x?x==null?void 0:x.children:[]},y=x=>{i("clickTrigger",x)},u=x=>{i("changeTrigger",x)};return(x,D)=>{var K,M,L,j,C;const R=a.resolveComponent("el-step"),E=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(E,{direction:(K=l.stepConfig)==null?void 0:K.direction,active:c.value,"finish-status":"success",simple:(M=l.stepConfig)==null?void 0:M.simple,"align-center":((L=l.stepConfig)==null?void 0:L.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,(_,S)=>(a.openBlock(),a.createBlock(R,{key:S,class:"step-item",onClick:k=>m(_,S+1)},{title:a.withCtx(()=>[a.renderSlot(x.$slots,"title",{title:_==null?void 0:_.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(x.$slots,"description",{descriptions:_==null?void 0:_.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(j=l.stepConfig)!=null&&j.allowTrigger&&((C=l.stepConfig)!=null&&C.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(h(),(_,S)=>(a.openBlock(),a.createElementBlock("div",{key:S,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(p(_==null?void 0:_.type)),{modelValue:_.value,"onUpdate:modelValue":k=>_.value=k,onClickTrigger:y,onChangeTrigger:u,content:_==null?void 0:_.content},a.createSlots({_:2},[a.renderList(x.$slots,(k,g)=>({name:g,fn:a.withCtx(P=>[a.renderSlot(x.$slots,g,a.mergeProps({ref_for:!0},P||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),p4=er._export_sfc(d4,[["__scopeId","data-v-fdbd6832"]]),f4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:r}){const n=l,i=r,s=a.ref({}),c=a.ref([]),m=(p,h)=>{i("clickStep",p,h)};return a.watch(()=>n==null?void 0:n.itemData,p=>{var x,D,R,E;s.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let h=((x=p==null?void 0:p.find(K=>(K==null?void 0:K.key)==="stepName"))==null?void 0:x.contents)??[],y=[];(R=(D=p==null?void 0:p.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:D.contents)==null||R.forEach(K=>{y.push({label:K==null?void 0:K.label,prop:K==null?void 0:K.prop,name:K==null?void 0:K.prop,type:"text",disabled:!0})});let u=((E=p==null?void 0:p.find(K=>(K==null?void 0:K.key)==="tableContents"))==null?void 0:E.contents)??[];h=h==null?void 0:h.map((K,M)=>{let L=y==null?void 0:y.map(j=>{var C;return{...j,value:(C=u==null?void 0:u[M])==null?void 0:C[j==null?void 0:j.prop]}});return{title:K,description:L}}),c.value=h},{immediate:!0,deep:!0}),(p,h)=>{const y=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(p4,{stepConfig:s.value,stepList:c.value,onClickStep:m},{icon:a.withCtx(()=>[a.createVNode(y,{name:"import"})]),title:a.withCtx(({title:u})=>[a.createTextVNode(a.toDisplayString(u),1)]),description:a.withCtx(({descriptions:u})=>[a.createVNode(tl.ssForm,{ref:"formRef",rowContents:u,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),h4=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(r,n)=>{const i=a.resolveComponent("el-timeline-item"),s=a.resolveComponent("el-timeline");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.activities,(c,m)=>(a.openBlock(),a.createBlock(i,{key:m,timestamp:c.timestamp,placement:l.timeLineConfig.placement,center:l.timeLineConfig.isCenter,"hide-timestamp":!0,type:l.timeLineConfig.type,color:l.timeLineConfig.color,size:l.timeLineConfig.size,icon:l.timeLineConfig.icon,hollow:l.timeLineConfig.isHollow},{default:a.withCtx(()=>[a.renderSlot(r.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),v4=er._export_sfc(h4,[["__scopeId","data-v-4172a886"]]),m4={class:"line-content"},y4={class:"line-time"},g4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const r=l,n=a.ref({}),i=a.ref([]);return a.watch(()=>r==null?void 0:r.itemData,s=>{var c,m;i.value=(c=s==null?void 0:s.find(p=>(p==null?void 0:p.key)==="timeLineList"))==null?void 0:c.contents,n.value=(m=s==null?void 0:s.find(p=>(p==null?void 0:p.key)==="timeLineConfig"))==null?void 0:m.contents},{immediate:!0}),(s,c)=>(a.openBlock(),a.createBlock(v4,{activities:i.value,timeLineConfig:n.value},{content:a.withCtx(({content:m,timestamp:p})=>[a.createElementVNode("span",m4,a.toDisplayString(m),1),a.createElementVNode("span",y4,a.toDisplayString(p),1)]),_:1},8,["activities","timeLineConfig"]))}}),b4=er._export_sfc(g4,[["__scopeId","data-v-b4d9deed"]]),k4={class:"tabs-content"},x4=a.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(l,{emit:r}){const n=l,i=r,s=a.ref();a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const c=D=>{i("change",D)},m=(D,R)=>{i("contentChange",D,R)},p=D=>{i("pageChange",D)},h=D=>{i("rowClick",D)},y=(D,R)=>{i("routeUrl",D,R)},u=D=>{i("clickTrigger",D)},x=(D,R)=>{i("clickMainKey",D,R)};return(D,R)=>{var E,K;return a.openBlock(),a.createElementBlock("div",k4,[(E=s.value)!=null&&E.length?(a.openBlock(),a.createBlock(tl.ssTab,{tabsContents:s.value,key:(K=s.value)==null?void 0:K.length},{pane:a.withCtx(({tab:M,index:L})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)(M==null?void 0:M.comp)),{related:M==null?void 0:M.relatedTables,compNames:n==null?void 0:n.compNames,compName:M==null?void 0:M.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:l.isDevMode,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:c,index:(M==null?void 0:M.id)??L,config:{showIndex:M==null?void 0:M.showIndex,allowMove:M==null?void 0:M.allowMove,viewport:M==null?void 0:M.viewport},onContentChange:m,onPageChange:p,onRowClick:h,onRouteUrl:y,parentTableId:M==null?void 0:M.tableId,allMapContents:l.allMapContents,children:M==null?void 0:M.children,level:1,onClickTrigger:u,onClickMainKey:x},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),w4=er._export_sfc(x4,[["__scopeId","data-v-ded4e0d9"]]),_4={class:"type-select"},S4=["onClick"],E4={class:"list-icon"},C4={__name:"modelSelect",setup(l){const r=Qn(O.pinia),{itemData:n}=O.storeToRefs(r),i=s=>{const c=O.cloneDeep(n.value);c.push({comp:s.comp,name:s.name,compData:[]}),r.setItemData(c)};return(s,c)=>{const m=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",_4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(ou),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:h},[a.createElementVNode("div",{class:"list-content",onClick:y=>i(p)},[a.createElementVNode("div",E4,[a.createVNode(m,{name:p.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(p.name),1)],8,S4)]))),128))])}}},D4=er._export_sfc(C4,[["__scopeId","data-v-91799bf8"]]),N4={class:"fill-content"},T4={class:"operate-content"},B4={class:"collapse-title-content"},A4={class:"collapse-title-item"},z4={key:1},M4=["onClick"],I4={class:"icon-content"},O4={key:0,class:"edit-content"},L4=["onClick"],$4={class:"comp-child"},R4={__name:"modelFill",setup(l){const r=Qn(O.pinia),{itemData:n,originalData:i}=O.storeToRefs(r),s=a.ref([]);a.ref([]);const c=a.ref([]),m=a.ref([]),p=R=>{var K;let E=(K=O.cloneDeep(m.value))==null?void 0:K.map((M,L)=>(R===L&&(M.content=!0),M));m.value=E},h=R=>{var K;let E=(K=O.cloneDeep(m.value))==null?void 0:K.map((M,L)=>(R===L&&(M.content=!1),M));m.value=E,s.value=O.cloneDeep(n.value)},y=(R,E)=>{var j;let K=(j=O.cloneDeep(m.value))==null?void 0:j.map((C,_)=>(R===_&&(C.content=!1),C));m.value=K;const M=O.cloneDeep(n.value),L=M==null?void 0:M.filter((C,_)=>(_===R&&(C.name=E),C));r.setOriginalData(L),r.setItemData(L)};a.watch(()=>n.value,()=>{var R,E,K;!n.value||((R=n.value)==null?void 0:R.length)===0?s.value=[]:s.value=(E=O.cloneDeep(n.value))==null?void 0:E.filter(M=>(M==null?void 0:M.comp)!=="methodButton"),c.value=s.value,m.value=(K=O.cloneDeep(c.value))==null?void 0:K.map((M,L)=>({id:L,content:!1}))},{deep:!0,immediate:!0});const u=R=>Bi(R),x=(R,E,K)=>{var L,j;if(!R)return;let M=O.cloneDeep(n.value);M=(L=M==null?void 0:M.map((C,_)=>(_===K&&(C.compData=R),C)))==null?void 0:L.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),m.value=(j=O.cloneDeep(M))==null?void 0:j.map((C,_)=>({id:_,content:!1})),r.setOriginalData(M),r.setItemData(M)},D=R=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const E=O.cloneDeep(n.value),K=E==null?void 0:E.filter((M,L)=>L!==R);r.setOriginalData(K),r.setItemData(K),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(R,E)=>{const K=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",N4,[E[1]||(E[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",T4,[a.createVNode(Zs.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:M,index:L})=>{var j,C,_,S,k,g,P,$,Y,pe;return[a.createElementVNode("div",B4,[a.createElementVNode("div",A4,[(C=(j=m.value)==null?void 0:j.find(ze=>ze.id===L))!=null&&C.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:M.name&&M.name!==""?"8px":"0px"})},a.toDisplayString(M.name),5)),(S=(_=m.value)==null?void 0:_.find(ze=>ze.id===L))!=null&&S.content?(a.openBlock(),a.createElementBlock("div",z4,[a.createVNode(tl.ssInput,{modelValue:M.name,"onUpdate:modelValue":ze=>M.name=ze,onClick:E[0]||(E[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(g=(k=m.value)==null?void 0:k.find(ze=>ze.id===L))!=null&&g.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(ze=>p(L),["stop"]),class:"icon-content"},[a.createVNode(K,{name:"Edit",style:{width:"16px",height:"16px"}})],8,M4))]),a.createElementVNode("div",I4,[($=(P=m.value)==null?void 0:P.find(ze=>ze.id===L))!=null&&$.content?(a.openBlock(),a.createElementBlock("div",O4,[a.createVNode(K,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(ze=>h(L),["stop"])},null,8,["onClick"]),a.createVNode(K,{name:"Save",onClick:a.withModifiers(ze=>y(L,M.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(pe=(Y=m.value)==null?void 0:Y.find(ze=>ze.id===L))!=null&&pe.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(ze=>D(L),["stop"]),class:"icon-content"},[a.createVNode(K,{name:"Delete",style:{width:"16px",height:"16px"}})],8,L4))])])]}),content:a.withCtx(({item:M,index:L})=>{var j,C;return[a.createElementVNode("div",$4,[a.createTextVNode(a.toDisplayString(u(M.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u(M.comp+"Operate")),{itemContents:M==null?void 0:M.compData,originalItemContents:(C=(j=c.value)==null?void 0:j.find((_,S)=>S===L))==null?void 0:C.compData,onChange:_=>x(_,M,L)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},V4=er._export_sfc(R4,[["__scopeId","data-v-a46a44b9"]]),F4={key:0,class:"show-content"},P4={style:{display:"flex"}},j4={__name:"modelShow",setup(l){const r=Qn(O.pinia),{itemData:n}=O.storeToRefs(r),i=a.ref([]);a.watch(()=>n.value,()=>{var c;!n.value||((c=n.value)==null?void 0:c.length)===0?i.value=[]:i.value=O.cloneDeep(n.value)},{deep:!0,immediate:!0});const s=c=>Bi(c);return(c,m)=>{var p;return((p=i.value)==null?void 0:p.length)>0?(a.openBlock(),a.createElementBlock("div",F4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,(h,y)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:y},[a.createElementVNode("div",P4,a.toDisplayString(h.name),1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:y},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},H4=er._export_sfc(j4,[["__scopeId","data-v-3f3e863e"]]),U4={class:"tabs-header"},q4={class:"tabs-list"},W4={class:"tab-name"},K4={class:"tab-actions"},G4=["onClick"],Y4=["onClick"],J4=["onClick"],X4={class:"model-operate"},Z4={class:"model-select",style:{display:"unset"}},Q4={class:"existing-components"},e6={class:"component-list"},a6=["onClick"],l6={class:"component-info"},r6={class:"component-type"},n6={class:"component-name"},i6={class:"model-fill"},o6={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.ref([]),c=a.ref(!1),m=a.ref(""),p=a.ref({title:""}),h=a.ref(-1),y=a.ref(!1),u=a.ref(-1),x=a.ref(new WeakMap),D=a.ref(null),R=Qn(O.pinia),{itemData:E}=O.storeToRefs(R),K=()=>{m.value="新增标签页",p.value.title="",h.value=-1,c.value=!0},M=ge=>{m.value="修改标签页",p.value.title=s.value[ge].title,h.value=ge,c.value=!0},L=ge=>{const T=_(ge);x.value.delete(T),s.value.splice(ge,1),Ve()},j=()=>{if(p.value.title.trim()){if(h.value===-1){const ge={title:p.value.title,value:p.value.title,label:p.value.title,children:[],id:C()};s.value.push(ge)}else s.value[h.value].title=p.value.title,s.value[h.value].value=p.value.title,s.value[h.value].label=p.value.title;c.value=!1,Ve()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,_=ge=>{const T=s.value[ge];return T.id||(T.id=C()),T.id},S=ge=>{var ne;u.value=ge;const T=_(ge);D.value=O.cloneDeep(E.value);let q=x.value.get(T);!q&&((ne=s.value[ge].children)==null?void 0:ne.length)>0&&(q=$(s.value[ge].children)),q?R.setItemData(O.cloneDeep(q)):R.setItemData([]),y.value=!0},k=a.computed(()=>{const ge=O.useModelComp(O.pinia),T=O.storeToRefs(ge).itemData.value;return console.log("可用组件数据",T),!T||!Array.isArray(T)?[]:T.filter(q=>{var ne;if(q.comp==="Tabs"&&u.value>=0){const Ne=_(u.value);if((ne=q.compData)==null?void 0:ne.some(Ke=>{var ua;return Ke.key==="stepList"&&((ua=Ke.contents)==null?void 0:ua.some(za=>za.id===Ne))}))return!1}return!0})}),g=ge=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[ge]||ge,P=ge=>{var T;try{const q=O.cloneDeep(ge);q.id=Date.now()+Math.random(),q.comp==="Tabs"&&((T=q.compData)==null||T.forEach(Ne=>{Ne.key==="stepList"&&Ne.contents&&Ne.contents.forEach(we=>{we.id=C()})}));const ne=O.cloneDeep(E.value);ne.push(q),R.setItemData(ne)}catch(q){console.error("添加组件失败:",q)}},$=ge=>ge.map(T=>{var q;switch(T.type){case"form":return{comp:"Form",name:T.value||"表单",compData:Y(T.content)};case"table":return{comp:"Table",name:T.value||"表格",compData:pe(T.content)};default:return{comp:"Unknown",name:T.value||"",compData:((q=T.content)==null?void 0:q.originalData)||[]}}}),Y=ge=>{if(!ge)return[];const T=[];return ge.rowContents&&T.push({key:"formContent",contents:ge.rowContents}),ge.buttonValue&&T.push({key:"formButton",contents:ge.buttonValue}),typeof ge.isEnableWrap<"u"&&T.push({key:"enableWrap",contents:ge.isEnableWrap}),T},pe=ge=>[],ze=()=>{if(u.value>=0&&u.value<s.value.length){const ge=_(u.value);x.value.set(ge,O.cloneDeep(E.value)),s.value[u.value].children=he(E.value),console.log("保存后的数据",he(E.value))}y.value=!1,u.value=-1,D.value=null,Ve()},de=()=>{D.value&&R.setItemData(O.cloneDeep(D.value)),y.value=!1,u.value=-1,D.value=null},Z=()=>{y.value&&de()},he=ge=>{if(!Array.isArray(ge))throw new Error("sourceData must be an array");return ge.map((T,q)=>{if(!T||typeof T!="object")return T;const{comp:ne,name:Ne,compData:we}=T;switch(ne){case"Form":return{type:"form",content:ae(we||[]),value:"表单"};case"Table":return{type:"table",content:ue(we||[]),value:"表格"};default:return{type:"xxx",content:Se(we||[]),value:""}}})},ae=ge=>{const T={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},q={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return ge.forEach((ne,Ne)=>{if(!ne||typeof ne!="object"){console.warn(`Invalid config at index ${Ne}:`,ne);return}const{key:we,contents:Ke}=ne,ua=q[we];if(!ua){console.warn(`Unknown Form config key: ${we}`);return}we==="enableWrap"?T[ua]=!!Ke:T[ua]=Array.isArray(Ke)?Ke:[]}),T},ue=ge=>{const T={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},q={header:"columns",tableContents:"tableData"};return ge.forEach((ne,Ne)=>{if(!ne||typeof ne!="object"){console.warn(`Invalid config at index ${Ne}:`,ne);return}const{key:we,contents:Ke}=ne,ua=q[we];if(!ua){console.warn(`Unknown Table config key: ${we}`);return}T[ua]=Array.isArray(Ke)?Ke:[]}),T},Se=ge=>(console.log("Default conversion logic - to be implemented"),{originalData:ge,processed:!1,componentType:"unknown"}),Ve=()=>{const ge=[{key:"stepList",contents:s.value}];i("change",ge)};return a.watch(()=>n.itemContents,ge=>{if(ge&&ge.length>0){const T=ge.find(q=>q.key==="stepList");T&&T.contents&&(s.value=T.contents.map(q=>({title:q.title||"",value:q.value||q.title||"",label:q.label||q.title||"",children:q.children||[],id:q.id||C()})))}},{immediate:!0,deep:!0}),(ge,T)=>{const q=a.resolveComponent("svg-icon"),ne=a.resolveComponent("el-input"),Ne=a.resolveComponent("el-form-item"),we=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",U4,[T[6]||(T[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:K},[a.createVNode(q,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),T[5]||(T[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",q4,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(Ke,ua)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:ua},[a.createElementVNode("span",W4,a.toDisplayString(Ke.title),1),a.createElementVNode("div",K4,[a.createElementVNode("button",{onClick:za=>M(ua)},"修改标题",8,G4),a.createElementVNode("button",{onClick:za=>S(ua)},"布局调整",8,Y4),a.createElementVNode("button",{onClick:za=>L(ua)},"删除",8,J4)])]))),128))]),a.createVNode(_r.ssDialog,{modelValue:c.value,"onUpdate:modelValue":T[2]||(T[2]=Ke=>c.value=Ke),title:m.value,onBeforeDestroy:T[3]||(T[3]=Ke=>c.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:T[1]||(T[1]=Ke=>c.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:j},"确定")]),default:a.withCtx(()=>[a.createVNode(we,{model:p.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(Ne,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(ne,{modelValue:p.value.title,"onUpdate:modelValue":T[0]||(T[0]=Ke=>p.value.title=Ke),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(_r.ssDialog,{modelValue:y.value,"onUpdate:modelValue":T[4]||(T[4]=Ke=>y.value=Ke),title:"布局调整",fullScreen:"",onBeforeDestroy:Z},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:de},"取消"),a.createElementVNode("button",{onClick:ze},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",X4,[a.createElementVNode("div",Z4,[a.createVNode(D4),a.createElementVNode("div",Q4,[T[8]||(T[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",e6,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(k.value,Ke=>(a.openBlock(),a.createElementBlock("div",{key:Ke.id,class:"component-item",onClick:ua=>P(Ke)},[a.createElementVNode("div",l6,[a.createElementVNode("span",r6,a.toDisplayString(g(Ke.comp)),1),a.createElementVNode("span",n6,a.toDisplayString(Ke.name),1)]),T[7]||(T[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,a6))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:ge.innerWidth},[a.createVNode(H4)])),a.createElementVNode("div",i6,[a.createVNode(V4)])])]),_:1},8,["modelValue"])])}}},t6=er._export_sfc(o6,[["__scopeId","data-v-9096ed0d"]]);function s6(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function c6(l){return{type:"line",...l}}function u6(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function d6(l){return{type:"bar",barWidth:"60%",...l}}function p6(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function f6(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const jn={line:{initBaseoptions:s6,initSeries:c6},bar:{initBaseoptions:u6,initSeries:d6},pie:{initBaseoptions:p6,initSeries:f6}},Ss=O.useMenuState(O.pinia),Vc=(l,r)=>{var u;const n=[],i=[],{group:s,nameCol:c,valueCol:m}=r||{},p=l==null?void 0:l.find(x=>{const{name:D}=x;return D===s});if(!p)return{names:n,values:i};const h=(u=p==null?void 0:p.compData)==null?void 0:u.find(x=>{const{key:D}=x;return D==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(x=>{const D=x==null?void 0:x[0];let R=!1;Ya.isObject(D)&&(D!=null&&D.id)&&(R=!0);let E=c,K=m;R&&(E=E+1,K=K+1);const M=x==null?void 0:x[E],L=x==null?void 0:x[K];n.push(M),i.push(L)}),{names:n,values:i}},h6=async l=>{const{menu:r,mainKey:n,detailGroup:i,detailNameCol:s,detailValueCol:c,isSelfDetail:m}=l||{};let p=null;const h=sessionStorage.getItem("systemKey");if(m&&Ss.activeMenuPath&&(p=await na.getItemData(`${Ss.activeMenuPath}`,h,"")),!m){const y=r==null?void 0:r.join("/");p=await na.getItemData(`${y}^${n}`,h,"")}return Vc(p,{group:i,nameCol:s,valueCol:c})},v6=async l=>{const{menu:r,group:n,nameCol:i,valueCol:s}=l||{},c=r==null?void 0:r.join("/"),m=sessionStorage.getItem("systemKey"),p=await na.getItemData(c,m,"");return Vc(p,{group:n,nameCol:i,valueCol:s})},At=async(l,r)=>{const n={names:[],values:[]},{menu:i,group:s,nameCol:c,valueCol:m}=l||{};if(!i.length||!s)return n;const{mainKey:p,group:h,nameCol:y,valueCol:u,isSelfDetail:x}=r||{};return p&&h&&tl.isNumber(y)&&tl.isNumber(u)?await h6({menu:i,mainKey:p,detailGroup:h,detailNameCol:y,detailValueCol:u,isSelfDetail:x}):tl.isNumber(c)&&tl.isNumber(m)?await v6({menu:i,group:s,nameCol:c,valueCol:m}):n},m6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:i,title:s}=l||{},c=jn==null?void 0:jn[i];if(!c)return;const{initBaseoptions:m,initSeries:p}=c,h=m();h.title.text=s??"";const{names:y,values:u}=await At(r,n);if(!y||!u)return h;h.xAxis.data=y;const x=p({data:u});return h.series.push(x),h},y6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:i,title:s}=l||{},c=jn==null?void 0:jn[i];if(!c)return;const{initBaseoptions:m,initSeries:p}=c,h=m();h.title.text=s??"";const{names:y,values:u}=await At(r,n);if(!y||!u)return h;h.xAxis.data=y;const x=p({data:u});return h.series.push(x),h},g6=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:i,title:s}=l||{},c=jn==null?void 0:jn[i];if(!c)return;const{initBaseoptions:m,initSeries:p}=c,h=m();h.title.text=s??"";const{names:y,values:u}=await At(r,n);if(!y||!u)return h;const x=[];for(let R=0;R<y.length;R++){const E=y[R],K=u[R];x.push({name:E,value:K})}const D=p({data:x});return h.series.push(D),h},b6=async(l=[])=>{var m,p,h;const r=((m=l==null?void 0:l.find(y=>y.key==="chartBaseConfig"))==null?void 0:m.contents)??{},n=((p=l==null?void 0:l.find(y=>y.key==="chartDataConfig"))==null?void 0:p.contents)??{},i=((h=l==null?void 0:l.find(y=>y.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:s}=r;let c={};return s==="line"&&(c=await m6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:i})),s==="bar"&&(c=await y6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:i})),s==="pie"&&(c=await g6({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:i})),c},k6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(l){const r=l,n=a.ref({});a.onMounted(async()=>{const s=r==null?void 0:r.itemData;n.value=await b6(s)});const i=a.computed(()=>(r==null?void 0:r.height)||"300px");return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:i.value})},[a.createVNode(Iu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),x6=er._export_sfc(k6,[["__scopeId","data-v-d4c081e8"]]),w6={class:"chart-module layout"},_6={class:"chart-module content"},S6={class:"chart-module content"},E6={class:"form-content"},C6={class:"dialog-footer"},D6={class:"form-content"},N6={class:"dialog-footer"},T6={class:"form-content"},B6={class:"dialog-footer"},A6=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),c=a.ref([]),m=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],p=a.ref({}),h=()=>{var Re;c.value=m(),(Re=c.value)==null||Re.forEach(oe=>{var He;const Ie=oe==null?void 0:oe.prop;oe.value=(He=p==null?void 0:p.value)==null?void 0:He[Ie]}),s.visible=!0},y=Re=>{p.value=Re},u=()=>{var Re;s.visible=!1,i("change",(Re=Me())==null?void 0:Re.compData)},x=a.reactive({visible:!1,width:"840",title:"数据配置"}),D=a.ref([]),R=()=>[{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=a.ref({}),K=()=>{const Re=D.value,oe=O.cloneDeep(Re);return oe==null||oe.forEach(Ie=>{var Ba;const He=Ie==null?void 0:Ie.prop;Ie.value=(Ba=E.value)==null?void 0:Ba[He]}),oe},M=Re=>{var Ie;E.value=Re;const oe=K();D.value=oe,i("change",(Ie=Me())==null?void 0:Ie.compData)},L=async()=>{const Re=await na.getMenusContent(),oe=K();oe==null||oe.forEach(Ie=>{(Ie==null?void 0:Ie.prop)==="menu"&&(Ie.contents=Re)}),D.value=oe,x.visible=!0,await Ke(E.value.menu),await le(E.value.group)},j=a.reactive({visible:!1,width:"840",title:"详情页配置"}),C=a.ref([]),_=()=>[{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:[]}],S=a.ref({}),k=()=>{const Re=C.value,oe=O.cloneDeep(Re);return oe==null||oe.forEach(Ie=>{var Ba;const He=Ie==null?void 0:Ie.prop;Ie.value=(Ba=S.value)==null?void 0:Ba[He]}),oe},g=Re=>{var Ie;S.value=Re;const oe=k();C.value=oe,i("change",(Ie=Me())==null?void 0:Ie.compData)},P=async()=>{await Z();const Re=O.cloneDeep($.value),oe=k();oe==null||oe.forEach(Ie=>{var Ba;const He=Ie==null?void 0:Ie.prop;Ie.value=(Ba=S==null?void 0:S.value)==null?void 0:Ba[He],He==="mainKey"&&(Ie.contents=Re)}),C.value=oe,j.visible=!0},$=a.ref([]),Y=a.ref([]),pe=a.ref({}),ze=a.ref({}),de=()=>{const{compData:Re}=ne.value||{},oe=Re==null?void 0:Re.find(ee=>{const{key:fe}=ee;return fe==="header"}),Ie=(oe==null?void 0:oe.contents)||[],He=Ie==null?void 0:Ie.filter((ee,fe)=>{const{label:me}=ee;return me!=="操作"}),Ba=He==null?void 0:He.findIndex((ee,fe)=>{const{isMainKey:me}=ee;return me});if(Ba<0)return[];const Oa=Re==null?void 0:Re.find(ee=>{const{key:fe}=ee;return fe==="tableContents"}),V=(Oa==null?void 0:Oa.contents)||[];return V==null?void 0:V.map(ee=>{const fe=ee==null?void 0:ee[0];let me=Ba;Ya.isObject(fe)&&(fe!=null&&fe.id)&&(me=me+1);const fa=ee==null?void 0:ee[me];return{label:fa,value:fa}})},Z=async()=>{const Re=await de();$.value=Re},he=async Re=>{const oe=sessionStorage.getItem("systemKey");return await na.getItemData(Re,oe,"")},ae=async Re=>{const oe=Re;Y.value=oe==null?void 0:oe.map(Ie=>{const{name:He}=Ie;return pe.value[He]=Ie,{label:He,value:He}})},ue=Re=>{const{comp:oe,compData:Ie}=ze.value||{};if(oe==="Table"){let He=k();He=He.filter(Ba=>{const{prop:Oa}=Ba;return Oa!=="formItems"}),ua(He,Ie),C.value=He}},Se=async()=>{var Ie,He;const Re=(Ie=S==null?void 0:S.value)==null?void 0:Ie.mainKey,oe=(He=E==null?void 0:E.value)==null?void 0:He.menu;if(Re){const Oa=`${oe==null?void 0:oe.join("/")}^${Re}`,V=await he(Oa);await ae(V);const H=k();H==null||H.forEach(ee=>{(ee==null?void 0:ee.prop)==="group"&&(ee.contents=Y.value)}),C.value=H}};a.watch(()=>{var Re;return(Re=S==null?void 0:S.value)==null?void 0:Re.mainKey},async(Re,oe)=>{Re!=oe&&Re&&await Se()});const Ve=async Re=>{const oe=pe.value[Re];ze.value=oe,await ue()};a.watch(()=>{var Re;return(Re=S==null?void 0:S.value)==null?void 0:Re.group},async(Re,oe)=>{Re!=oe&&Re&&Ve(Re)});const ge=async()=>{var oe;await Se();const Re=(oe=S.value)==null?void 0:oe.group;await Ve(Re)},T=a.ref([]),q=a.ref({}),ne=a.ref({}),Ne=async Re=>{const oe=Re==null?void 0:Re.join("/"),Ie=sessionStorage.getItem("systemKey");return await na.getItemData(oe,Ie,"")},we=async Re=>{const oe=await Ne(Re);T.value=oe==null?void 0:oe.map(Ie=>{const{name:He}=Ie;return q.value[He]=Ie,{label:He,value:He}})},Ke=async(Re,oe)=>{await we(Re);const Ie=K();Ie==null||Ie.forEach(He=>{(He==null?void 0:He.prop)==="group"&&(He.contents=T.value)}),D.value=Ie};a.watch(()=>{var Re;return(Re=E==null?void 0:E.value)==null?void 0:Re.menu},async(Re,oe)=>{const Ie=Re==null?void 0:Re.join("/"),He=oe==null?void 0:oe.join("/");Ie!=He&&await Ke(Re)});const ua=(Re,oe)=>{const Ie=oe==null?void 0:oe.find(V=>{const{key:H}=V;return H==="header"}),He=(Ie==null?void 0:Ie.contents)||[],Ba=He==null?void 0:He.filter((V,H)=>{const{label:ee}=V;return ee!=="操作"}),Oa=Ba==null?void 0:Ba.map((V,H)=>{const{label:ee}=V;return{label:ee,value:H}});Re==null||Re.forEach(V=>{const H=V==null?void 0:V.prop;(H==="nameCol"||H==="valueCol")&&(V.contents=Oa)})},za=Re=>{const{comp:oe,compData:Ie}=ne.value||{};if(oe==="Table"){E.value.formItems=[];let He=K();He=He.filter(Ba=>{const{prop:Oa}=Ba;return Oa!=="formItems"}),ua(He,Ie),D.value=He}},le=async Re=>{const oe=q.value[Re];ne.value=oe,await za()};a.watch(()=>{var Re;return(Re=E==null?void 0:E.value)==null?void 0:Re.group},async(Re,oe)=>{Re!=oe&&le(Re)});const Te=async()=>{var Ie,He;const Re=(Ie=E.value)==null?void 0:Ie.menu;await Ke(Re);const oe=(He=E.value)==null?void 0:He.group;await le(oe)},Me=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:p.value},{key:"chartDataConfig",contents:E.value},{key:"chartDetailConfig",contents:S.value}]}),Ue=()=>{s.visible=!1,x.visible=!1,j.visible=!1};return a.onMounted(async()=>{var oe,Ie,He;D.value=R(),C.value=_();const Re=n==null?void 0:n.itemContents;p.value=((oe=Re==null?void 0:Re.find(Ba=>Ba.key==="chartBaseConfig"))==null?void 0:oe.contents)??{},E.value=((Ie=Re==null?void 0:Re.find(Ba=>Ba.key==="chartDataConfig"))==null?void 0:Ie.contents)??{},await Te(),S.value=((He=Re==null?void 0:Re.find(Ba=>Ba.key==="chartDetailConfig"))==null?void 0:He.contents)??{},await ge()}),(Re,oe)=>{const Ie=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",w6,[oe[4]||(oe[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Ie,{id:"themeButton",onClick:oe[0]||(oe[0]=He=>h())},{default:a.withCtx(()=>oe[3]||(oe[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",_6,[oe[6]||(oe[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Ie,{id:"themeButton",onClick:oe[1]||(oe[1]=He=>L())},{default:a.withCtx(()=>oe[5]||(oe[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",S6,[oe[8]||(oe[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Ie,{id:"themeButton",onClick:oe[2]||(oe[2]=He=>P())},{default:a.withCtx(()=>oe[7]||(oe[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(_r.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:Ue,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",E6,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",C6,[a.createVNode(Ie,{class:"cancel-button button",onClick:Ue,id:"themeBorderButton"},{default:a.withCtx(()=>oe[9]||(oe[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Ie,{class:"ok-button button",onClick:u,id:"themeButton"},{default:a.withCtx(()=>oe[10]||(oe[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(_r.ssDialog,{visible:x.visible,title:x.title,onBeforeDestroy:Ue,width:x.width},{default:a.withCtx(()=>[a.createElementVNode("div",D6,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",N6,[a.createVNode(Ie,{class:"cancel-button button",onClick:Ue,id:"themeBorderButton"},{default:a.withCtx(()=>oe[11]||(oe[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Ie,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:a.withCtx(()=>oe[12]||(oe[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(_r.ssDialog,{visible:j.visible,title:j.title,onBeforeDestroy:Ue,width:j.width},{default:a.withCtx(()=>[a.createElementVNode("div",T6,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",B6,[a.createVNode(Ie,{class:"cancel-button button",onClick:Ue,id:"themeBorderButton"},{default:a.withCtx(()=>oe[13]||(oe[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Ie,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:a.withCtx(()=>oe[14]||(oe[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),z6=er._export_sfc(A6,[["__scopeId","data-v-fe119645"]]),M6={class:"layout"},I6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(l,{emit:r}){const n=r,i=l;a.onMounted(async()=>{});const s=a.computed(()=>O.cloneDeep(i==null?void 0:i.itemData)||[]),c=a.computed(()=>{var u;const y=(u=s==null?void 0:s.value)==null?void 0:u.find(x=>{const{key:D}=x;return D==="baseConfig"});return y==null?void 0:y.contents}),m=a.computed(()=>{var u;const y=(u=s==null?void 0:s.value)==null?void 0:u.find(x=>{const{key:D}=x;return D==="children"});return y==null?void 0:y.contents}),p=a.computed(()=>{let y=O.cloneDeep(m.value)||[];const u=y.length;let x=0;const D=[];if(y=y.map(R=>{const E=R.span;return E?(R.span=Number(E),x=x+R.span):D.push(R),R}),x<24){const R=Math.floor((24-x)/u);D.forEach(E=>{E.span=R})}return y}),h=y=>{n("rowClick",y)};return(y,u)=>{var R;const x=a.resolveComponent("el-col"),D=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",M6,[a.createVNode(D,{style:a.normalizeStyle({height:(R=c.value)==null?void 0:R.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(E,K)=>(a.openBlock(),a.createBlock(x,{span:E==null?void 0:E.span},{default:a.withCtx(()=>{var M;return[a.unref(Ti)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)(E.comp)),{key:a.unref(Zn),compName:E.name,index:(E==null?void 0:E.id)??K,height:(M=c.value)==null?void 0:M.height,itemData:E==null?void 0:E.compData,childItemData:E==null?void 0:E.itemChildData,onChange:a.unref(zo),onContentChange:a.unref(Mo),onPageChange:a.unref(Io),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),O6=er._export_sfc(I6,[["__scopeId","data-v-ab9a36ed"]]),L6={class:"layout-operate"},$6={class:"layout-module"},R6={class:"collapse-title-item"},V6={class:"collapse-title"},F6={class:"icon-content"},P6=["onClick"],j6={class:"comp-child"},H6=a.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,i=r;a.onMounted(()=>{K()});const s=a.ref({}),c=a.ref({}),m=a.ref([]),p=S=>[{label:"高度",prop:"height",type:"input",value:S==null?void 0:S.height}],h=S=>{c.value=S,i("change",_(),!0)},y=a.ref([]),u=a.ref([]),x=S=>[{label:"占比",prop:"span",type:"input",value:S==null?void 0:S.span}],D=a.computed(()=>{const S=n==null?void 0:n.itemContents;return O.cloneDeep(S)}),R=a.computed(()=>{const S=D==null?void 0:D.value,k=S==null?void 0:S.find(g=>{const{key:P}=g;return P==="baseConfig"});return k==null?void 0:k.contents}),E=a.computed(()=>{const S=D==null?void 0:D.value,k=S==null?void 0:S.find(g=>{const{key:P}=g;return P==="children"});return k==null?void 0:k.contents}),K=()=>{var S;s.value=D.value||{},y.value=(E==null?void 0:E.value)||[],m.value=p(),m.value=(S=m.value)==null?void 0:S.map(k=>{var P;const{prop:g}=k;return k.value=(P=R.value)==null?void 0:P[g],k})};a.watch(()=>{var S;return(S=E==null?void 0:E.value)==null?void 0:S.length},()=>{var S;y.value=(E==null?void 0:E.value)||[],u.value=(S=E.value)==null?void 0:S.map(k=>x(k))},{immediate:!0});const M=(S,k)=>{const g=O.cloneDeep(E==null?void 0:E.value);g[k].span=S.span,y.value=g,i("change",_(),!0)},L=S=>Bi(S),j=(S,k,g)=>{if(!S)return;const P=O.cloneDeep(E==null?void 0:E.value);P[g]&&(P[g].compData=S,y.value=P,i("change",_(),!0))},C=S=>{pn.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let k=O.cloneDeep(E==null?void 0:E.value);k=k==null?void 0:k.filter((g,P)=>S!==P),y.value=k,i("change",_(),!0),Ya.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},_=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:y==null?void 0:y.value}]});return(S,k)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",L6,[a.createElementVNode("div",$6,[k[1]||(k[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(tl.ssForm,{rowContents:m.value,isEnableWrap:!0,onChange:k[0]||(k[0]=P=>h(P))},null,8,["rowContents"])])]),a.createVNode(Zs.default,{class:"collapse-content",collapseContents:E.value},{title:a.withCtx(({item:P,index:$})=>[a.createElementVNode("div",R6,[a.createElementVNode("div",V6,a.toDisplayString(P.name),1),a.createElementVNode("div",F6,[a.createElementVNode("div",{onClick:a.withModifiers(Y=>C($),["stop"]),class:"icon-content"},[a.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,P6)])])]),content:a.withCtx(({item:P,index:$})=>[a.createElementVNode("div",j6,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(tl.ssForm,{rowContents:u.value[$],key:$,isEnableWrap:!0,onChange:Y=>M(Y,$)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(L(P.comp+"Operate")),{itemContents:P==null?void 0:P.compData,originalItemContents:P.compData,onChange:Y=>j(Y,P,$)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),U6=er._export_sfc(H6,[["__scopeId","data-v-ba05456e"]]),q6=typeof window<"u";var Es;q6&&((Es=window==null?void 0:window.navigator)!=null&&Es.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function un(l){return l==null}function Fc(){}const W6=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(W6)));function K6(){const l=new Map;return{on(r,n){const i=l.get(r);i!=null&&i.add(n)||l.set(r,new Set([n]))},off(r,n){const i=l.get(r);i&&i.delete(n)},clear(r){const n=l.get(r);n&&n.clear()},clearAll(){l.clear()},emit(r,...n){const i=l.get(r);i&&i.forEach(s=>{s(...n)})}}}function Cs(l,r=16){if(typeof l!="function")return Fc;const n=(...c)=>{l(...c)};if(r<=0)return Pc(n);let i=0,s;return function(...c){const m=Date.now(),p=m-i;clearTimeout(s),p>=r?(i=m,n(...c)):s=setTimeout(()=>{i=Date.now(),n(...c)},Math.max(0,r-p))}}function G6(l,r=100){if(typeof l!="function")return Fc;const n=(...s)=>{l(...s)};if(r<=0)return Pc(n);let i;return function(...s){clearTimeout(i),i=setTimeout(()=>{n(...s)},r)}}function Pc(l){if(typeof l!="function")return l;let r=!1,n,i;return function(...s){return n=s,r||(r=!0,i=Promise.resolve().then(()=>(r=!1,i=void 0,l(...n)))),i}}const Hi=new Set,jc=new WeakMap;function Y6(){Hi.forEach(l=>{l(...jc.get(l))}),Hi.clear()}function Xr(l,...r){if(typeof l!="function")return l;jc.set(l,r),!Hi.has(l)&&(Hi.add(l),Hi.size===1&&Promise.resolve().then(Y6))}const Hc=Symbol("LAYOUT_KEY"),Uc=Symbol("EMITTER_KEY");function J6(l){let r=0,n;for(let i=0,s=l.length;i<s;i++)n=l[i].y+l[i].h,n>r&&(r=n);return r}function Et(l){const r=Array(l.length);for(let n=0,i=l.length;n<i;n++)r[n]=X6(l[n]);return r}function X6(l){return{...l}}function qc(l,r){return!(l===r||l.x+l.w<=r.x||l.x>=r.x+r.w||l.y+l.h<=r.y||l.y>=r.y+r.h)}function Si(l,r,n){const i=Kc(l),s=Gc(l),c=Array(l.length);for(let m=0,p=s.length;m<p;m++){let h=s[m];h.static||(h=Z6(i,h,r,n),i.push(h)),c[l.findIndex(y=>y.i===h.i)]=h,h.moved=!1}return c}function Z6(l,r,n,i){if(n)for(;r.y>0&&!Ui(l,r);)r.y--;else if(i){const c=i[r.i].y;for(;r.y>c&&!Ui(l,r);)r.y--}let s;for(;s=Ui(l,r);)r.y=s.y+s.h;return r}function Q6(l,r){const n=Kc(l);for(let i=0,s=l.length;i<s;i++){const c=l[i];if(c.x+c.w>r.cols&&(c.x=r.cols-c.w),c.x<0&&(c.x=0,c.w=r.cols),!c.static)n.push(c);else for(;Ui(n,c);)c.y++}return l}function Ds(l,r){for(let n=0,i=l.length;n<i;n++)if(l[n].i===r)return l[n]}function Ui(l,r){for(let n=0,i=l.length;n<i;n++)if(qc(l[n],r))return l[n]}function Wc(l,r){return l.filter(n=>qc(n,r))}function Kc(l){return l.filter(r=>r.static)}function Ct(l,r,n,i,s=!1,c=!1){if(r.static)return l;const m=r.x,p=r.y,h=i&&r.y>i;typeof n=="number"&&(r.x=n),typeof i=="number"&&(r.y=i),r.moved=!0;let y=Gc(l);h&&(y=y.reverse());const u=Wc(y,r);if(c&&u.length)return r.x=m,r.y=p,r.moved=!1,l;for(let x=0,D=u.length;x<D;x++){const R=u[x];R.moved||r.y>R.y&&r.y-R.y>R.h/4||(R.static?l=Ns(l,R,r,s):l=Ns(l,r,R,s))}return l}function Ns(l,r,n,i){if(i){const s={x:n.x,y:n.y,w:n.w,h:n.h};if(s.y=Math.max(r.y-n.h,0),!Ui(l,s))return Ct(l,n,void 0,s.y,!1)}return Ct(l,n,void 0,n.y+1,!1)}function e1(l,r,n,i){const s="translate3d("+r+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:i+"px",position:"absolute"}}function a1(l,r,n,i){const s="translate3d("+r*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:i+"px",position:"absolute"}}function l1(l,r,n,i){return{top:l+"px",left:r+"px",width:n+"px",height:i+"px",position:"absolute"}}function r1(l,r,n,i){return{top:l+"px",right:r+"px",width:n+"px",height:i+"px",position:"absolute"}}function Gc(l){return Array.from(l).sort(function(r,n){return r.y===n.y&&r.x===n.x?0:r.y>n.y||r.y===n.y&&r.x>n.x?1:-1})}function n1(l,r){r=r||"Layout";const n=["x","y","w","h"],i=[];if(!Array.isArray(l))throw new Error(r+" must be an array!");for(let s=0,c=l.length;s<c;s++){const m=l[s];for(let p=0;p<n.length;p++)if(typeof m[n[p]]!="number")throw new Error("VueGridLayout: "+r+"["+s+"]."+n[p]+" must be a number!");if(m.i===void 0||m.i===null)throw new Error("VueGridLayout: "+r+"["+s+"].i cannot be null!");if(typeof m.i!="number"&&typeof m.i!="string")throw new Error("VueGridLayout: "+r+"["+s+"].i must be a string or number!");if(i.indexOf(m.i)>=0)throw new Error("VueGridLayout: "+r+"["+s+"].i must be unique!");if(i.push(m.i),m.static!==void 0&&typeof m.static!="boolean")throw new Error("VueGridLayout: "+r+"["+s+"].static must be a boolean!")}}function i1(l,r="vgl"){const n=()=>`${r}-${l}`;return{b:n,be:i=>`${n()}__${i}`,bm:i=>`${n()}--${i}`,bem:(i,s)=>`${n()}__${i}--${s}`}}function Ts(l){return o1(l)}function o1(l){var r;const n=((r=l.target)==null?void 0:r.offsetParent)||document.body,i=l.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),s=l.clientX+n.scrollLeft-i.left,c=l.clientY+n.scrollTop-i.top;return{x:s,y:c}}function Bs(l,r,n,i){return s1(l)?{deltaX:n-l,deltaY:i-r,lastX:l,lastY:r,x:n,y:i}:{deltaX:0,deltaY:0,lastX:n,lastY:i,x:n,y:i}}function s1(l){return typeof l=="number"&&!Number.isNaN(l)}function c1(l,r){const n=Jc(l);let i=n[0];for(let s=1,c=n.length;s<c;s++){const m=n[s];r>l[m]&&(i=m)}return i}function Yc(l,r){if(!r[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return r[l]}function u1(l,r,n,i,s,c,m){if(r[i])return Et(r[i]);let p=l;const h=Jc(n),y=h.slice(h.indexOf(i));for(let u=0,x=y.length;u<x;u++){const D=y[u];if(r[D]){p=r[D];break}}return p=Et(p||[]),Si(Q6(p,{cols:c}),m)}function Jc(l){return Object.keys(l).sort((r,n)=>l[r]-l[n])}let d1="auto";function p1(){return typeof document<"u"}function As(){return p1()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):d1}var Fi={exports:{}},f1=Fi.exports,zs;function h1(){return zs||(zs=1,function(l,r){(function(n,i){l.exports=i()})(f1,function(){function n(t,o){var f=Object.keys(t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(t);o&&(b=b.filter(function(w){return Object.getOwnPropertyDescriptor(t,w).enumerable})),f.push.apply(f,b)}return f}function i(t){for(var o=1;o<arguments.length;o++){var f=arguments[o]!=null?arguments[o]:{};o%2?n(Object(f),!0).forEach(function(b){h(t,b,f[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(f)):n(Object(f)).forEach(function(b){Object.defineProperty(t,b,Object.getOwnPropertyDescriptor(f,b))})}return t}function s(t){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},s(t)}function c(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function m(t,o){for(var f=0;f<o.length;f++){var b=o[f];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,K(b.key),b)}}function p(t,o,f){return o&&m(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,o,f){return(o=K(o))in t?Object.defineProperty(t,o,{value:f,enumerable:!0,configurable:!0,writable:!0}):t[o]=f,t}function y(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&x(t,o)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},u(t)}function x(t,o){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,b){return f.__proto__=b,f},x(t,o)}function D(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function R(t){var o=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,b=u(t);if(o){var w=u(this).constructor;f=Reflect.construct(b,arguments,w)}else f=b.apply(this,arguments);return function(I,J){if(J&&(typeof J=="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D(I)}(this,f)}}function E(){return E=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,o,f){var b=function(I,J){for(;!Object.prototype.hasOwnProperty.call(I,J)&&(I=u(I))!==null;);return I}(t,o);if(b){var w=Object.getOwnPropertyDescriptor(b,o);return w.get?w.get.call(arguments.length<3?t:f):w.value}},E.apply(this,arguments)}function K(t){var o=function(f,b){if(typeof f!="object"||f===null)return f;var w=f[Symbol.toPrimitive];if(w!==void 0){var I=w.call(f,b);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(t,"string");return typeof o=="symbol"?o:o+""}var M=function(t){return!(!t||!t.Window)&&t instanceof t.Window},L=void 0,j=void 0;function C(t){L=t;var o=t.document.createTextNode("");o.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(o)===o&&(t=t.wrap(t)),j=t}function _(t){return M(t)?t:(t.ownerDocument||t).defaultView||j.window}typeof window<"u"&&window&&C(window);var S=function(t){return!!t&&s(t)==="object"},k=function(t){return typeof t=="function"},g={window:function(t){return t===j||M(t)},docFrag:function(t){return S(t)&&t.nodeType===11},object:S,func:k,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||s(t)!=="object")return!1;var o=_(t)||j;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?t instanceof Element||t instanceof o.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return S(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return S(t)&&t.length!==void 0&&k(t.splice)}};function P(t){var o=t.interaction;if(o.prepared.name==="drag"){var f=o.prepared.axis;f==="x"?(o.coords.cur.page.y=o.coords.start.page.y,o.coords.cur.client.y=o.coords.start.client.y,o.coords.velocity.client.y=0,o.coords.velocity.page.y=0):f==="y"&&(o.coords.cur.page.x=o.coords.start.page.x,o.coords.cur.client.x=o.coords.start.client.x,o.coords.velocity.client.x=0,o.coords.velocity.page.x=0)}}function $(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="drag"){var b=f.prepared.axis;if(b==="x"||b==="y"){var w=b==="x"?"y":"x";o.page[w]=f.coords.start.page[w],o.client[w]=f.coords.start.client[w],o.delta[w]=0}}}var Y={id:"actions/drag",install:function(t){var o=t.actions,f=t.Interactable,b=t.defaults;f.prototype.draggable=Y.draggable,o.map.drag=Y,o.methodDict.drag="draggable",b.actions.drag=Y.defaults},listeners:{"interactions:before-action-move":P,"interactions:action-resume":P,"interactions:action-move":$,"auto-start:check":function(t){var o=t.interaction,f=t.interactable,b=t.buttons,w=f.options.drag;if(w&&w.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(b&f.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:w.lockAxis==="start"?w.startAxis:w.lockAxis},!1}},draggable:function(t){return g.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):g.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:P,move:$,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},pe=Y,ze={init:function(t){var o=t;ze.document=o.document,ze.DocumentFragment=o.DocumentFragment||de,ze.SVGElement=o.SVGElement||de,ze.SVGSVGElement=o.SVGSVGElement||de,ze.SVGElementInstance=o.SVGElementInstance||de,ze.Element=o.Element||de,ze.HTMLElement=o.HTMLElement||ze.Element,ze.Event=o.Event,ze.Touch=o.Touch||de,ze.PointerEvent=o.PointerEvent||o.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function de(){}var Z=ze,he={init:function(t){var o=Z.Element,f=t.navigator||{};he.supportsTouch="ontouchstart"in t||g.func(t.DocumentTouch)&&Z.document instanceof t.DocumentTouch,he.supportsPointerEvent=f.pointerEnabled!==!1&&!!Z.PointerEvent,he.isIOS=/iP(hone|od|ad)/.test(f.platform),he.isIOS7=/iP(hone|od|ad)/.test(f.platform)&&/OS 7[^\d]/.test(f.appVersion),he.isIe9=/MSIE 9/.test(f.userAgent),he.isOperaMobile=f.appName==="Opera"&&he.supportsTouch&&/Presto/.test(f.userAgent),he.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",he.pEventTypes=he.supportsPointerEvent?Z.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,he.wheelEvent=Z.document&&"onmousewheel"in Z.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ae=he;function ue(t,o){if(t.contains)return t.contains(o);for(;o;){if(o===t)return!0;o=o.parentNode}return!1}function Se(t,o){for(;g.element(t);){if(ge(t,o))return t;t=Ve(t)}return null}function Ve(t){var o=t.parentNode;if(g.docFrag(o)){for(;(o=o.host)&&g.docFrag(o););return o}return o}function ge(t,o){return j!==L&&(o=o.replace(/\/deep\//g," ")),t[ae.prefixedMatchesSelector](o)}var T=function(t){return t.parentNode||t.host};function q(t,o){for(var f,b=[],w=t;(f=T(w))&&w!==o&&f!==w.ownerDocument;)b.unshift(w),w=f;return b}function ne(t,o,f){for(;g.element(t);){if(ge(t,o))return!0;if((t=Ve(t))===f)return ge(t,o)}return!1}function Ne(t){return t.correspondingUseElement||t}function we(t){var o=t instanceof Z.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return o&&{left:o.left,right:o.right,top:o.top,bottom:o.bottom,width:o.width||o.right-o.left,height:o.height||o.bottom-o.top}}function Ke(t){var o,f=we(t);if(!ae.isIOS7&&f){var b={x:(o=(o=_(t))||j).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};f.left+=b.x,f.right+=b.x,f.top+=b.y,f.bottom+=b.y}return f}function ua(t){for(var o=[];t;)o.push(t),t=Ve(t);return o}function za(t){return!!g.string(t)&&(Z.document.querySelector(t),!0)}function le(t,o){for(var f in o)t[f]=o[f];return t}function Te(t,o,f){return t==="parent"?Ve(f):t==="self"?o.getRect(f):Se(f,t)}function Me(t,o,f,b){var w=t;return g.string(w)?w=Te(w,o,f):g.func(w)&&(w=w.apply(void 0,b)),g.element(w)&&(w=Ke(w)),w}function Ue(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Re(t){return!t||"x"in t&&"y"in t||((t=le({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function oe(t,o,f){t.left&&(o.left+=f.x),t.right&&(o.right+=f.x),t.top&&(o.top+=f.y),t.bottom&&(o.bottom+=f.y),o.width=o.right-o.left,o.height=o.bottom-o.top}function Ie(t,o,f){var b=f&&t.options[f];return Ue(Me(b&&b.origin||t.options.origin,t,o,[t&&o]))||{x:0,y:0}}function He(t,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(be){return!0},b=arguments.length>3?arguments[3]:void 0;if(b=b||{},g.string(t)&&t.search(" ")!==-1&&(t=Ba(t)),g.array(t))return t.forEach(function(be){return He(be,o,f,b)}),b;if(g.object(t)&&(o=t,t=""),g.func(o)&&f(t))b[t]=b[t]||[],b[t].push(o);else if(g.array(o))for(var w=0,I=o;w<I.length;w++){var J=I[w];He(t,J,f,b)}else if(g.object(o))for(var Q in o)He(Ba(Q).map(function(be){return"".concat(t).concat(be)}),o[Q],f,b);return b}function Ba(t){return t.trim().split(/ +/)}var Oa=function(t,o){return Math.sqrt(t*t+o*o)},V=["webkit","moz"];function H(t,o){t.__set||(t.__set={});var f=function(w){if(V.some(function(I){return w.indexOf(I)===0}))return 1;typeof t[w]!="function"&&w!=="__set"&&Object.defineProperty(t,w,{get:function(){return w in t.__set?t.__set[w]:t.__set[w]=o[w]},set:function(I){t.__set[w]=I},configurable:!0})};for(var b in o)f(b);return t}function ee(t,o){t.page=t.page||{},t.page.x=o.page.x,t.page.y=o.page.y,t.client=t.client||{},t.client.x=o.client.x,t.client.y=o.client.y,t.timeStamp=o.timeStamp}function fe(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function me(t){return t instanceof Z.Event||t instanceof Z.Touch}function fa(t,o,f){return t=t||"page",(f=f||{}).x=o[t+"X"],f.y=o[t+"Y"],f}function Xe(t,o){return o=o||{x:0,y:0},ae.isOperaMobile&&me(t)?(fa("screen",t,o),o.x+=window.scrollX,o.y+=window.scrollY):fa("page",t,o),o}function ce(t){return g.number(t.pointerId)?t.pointerId:t.identifier}function _e(t,o,f){var b=o.length>1?qe(o):o[0];Xe(b,t.page),function(w,I){I=I||{},ae.isOperaMobile&&me(w)?fa("screen",w,I):fa("client",w,I)}(b,t.client),t.timeStamp=f}function va(t){var o=[];return g.array(t)?(o[0]=t[0],o[1]=t[1]):t.type==="touchend"?t.touches.length===1?(o[0]=t.touches[0],o[1]=t.changedTouches[0]):t.touches.length===0&&(o[0]=t.changedTouches[0],o[1]=t.changedTouches[1]):(o[0]=t.touches[0],o[1]=t.touches[1]),o}function qe(t){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},f=0;f<t.length;f++){var b=t[f];for(var w in o)o[w]+=b[w]}for(var I in o)o[I]/=t.length;return o}function La(t){if(!t.length)return null;var o=va(t),f=Math.min(o[0].pageX,o[1].pageX),b=Math.min(o[0].pageY,o[1].pageY),w=Math.max(o[0].pageX,o[1].pageX),I=Math.max(o[0].pageY,o[1].pageY);return{x:f,y:b,left:f,top:b,right:w,bottom:I,width:w-f,height:I-b}}function Ma(t,o){var f=o+"X",b=o+"Y",w=va(t),I=w[0][f]-w[1][f],J=w[0][b]-w[1][b];return Oa(I,J)}function Je(t,o){var f=o+"X",b=o+"Y",w=va(t),I=w[1][f]-w[0][f],J=w[1][b]-w[0][b];return 180*Math.atan2(J,I)/Math.PI}function ia(t){return g.string(t.pointerType)?t.pointerType:g.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof Z.Touch?"touch":"mouse"}function se(t){var o=g.func(t.composedPath)?t.composedPath():t.path;return[Ne(o?o[0]:t.target),Ne(t.currentTarget)]}var U=function(){function t(o){c(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return p(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t}();Object.defineProperty(U.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var W=function(t,o){for(var f=0;f<o.length;f++){var b=o[f];t.push(b)}return t},Be=function(t){return W([],t)},ke=function(t,o){for(var f=0;f<t.length;f++)if(o(t[f],f,t))return f;return-1},ra=function(t,o){return t[ke(t,o)]},oa=function(t){y(f,t);var o=R(f);function f(b,w,I){var J;c(this,f),(J=o.call(this,w._interaction)).dropzone=void 0,J.dragEvent=void 0,J.relatedTarget=void 0,J.draggable=void 0,J.propagationStopped=!1,J.immediatePropagationStopped=!1;var Q=I==="dragleave"?b.prev:b.cur,be=Q.element,Fe=Q.dropzone;return J.type=I,J.target=be,J.currentTarget=be,J.dropzone=Fe,J.dragEvent=w,J.relatedTarget=w.target,J.draggable=w.interactable,J.timeStamp=w.timeStamp,J}return p(f,[{key:"reject",value:function(){var b=this,w=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&w.cur.dropzone===this.dropzone&&w.cur.element===this.target)if(w.prev.dropzone=this.dropzone,w.prev.element=this.target,w.rejected=!0,w.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var I=w.activeDrops,J=ke(I,function(be){var Fe=be.dropzone,Ce=be.element;return Fe===b.dropzone&&Ce===b.target});w.activeDrops.splice(J,1);var Q=new f(w,this.dragEvent,"dropdeactivate");Q.dropzone=this.dropzone,Q.target=this.target,this.dropzone.fire(Q)}else this.dropzone.fire(new f(w,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),f}(U);function _a(t,o){for(var f=0,b=t.slice();f<b.length;f++){var w=b[f],I=w.dropzone,J=w.element;o.dropzone=I,o.target=J,I.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function ga(t,o){for(var f=function(I,J){for(var Q=[],be=0,Fe=I.interactables.list;be<Fe.length;be++){var Ce=Fe[be];if(Ce.options.drop.enabled){var Qe=Ce.options.drop.accept;if(!(g.element(Qe)&&Qe!==J||g.string(Qe)&&!ge(J,Qe)||g.func(Qe)&&!Qe({dropzone:Ce,draggableElement:J})))for(var Aa=0,nl=Ce.getAllElements();Aa<nl.length;Aa++){var el=nl[Aa];el!==J&&Q.push({dropzone:Ce,element:el,rect:Ce.getRect(el)})}}}return Q}(t,o),b=0;b<f.length;b++){var w=f[b];w.rect=w.dropzone.getRect(w.element)}return f}function Pa(t,o,f){for(var b=t.dropState,w=t.interactable,I=t.element,J=[],Q=0,be=b.activeDrops;Q<be.length;Q++){var Fe=be[Q],Ce=Fe.dropzone,Qe=Fe.element,Aa=Fe.rect,nl=Ce.dropCheck(o,f,w,I,Qe,Aa);J.push(nl?Qe:null)}var el=function(il){for(var wl,ol,Nl,Il=[],lr=0;lr<il.length;lr++){var El=il[lr],Wl=il[wl];if(El&&lr!==wl)if(Wl){var Hr=T(El),Er=T(Wl);if(Hr!==El.ownerDocument)if(Er!==El.ownerDocument)if(Hr!==Er){Il=Il.length?Il:q(Wl);var Jr=void 0;if(Wl instanceof Z.HTMLElement&&El instanceof Z.SVGElement&&!(El instanceof Z.SVGSVGElement)){if(El===Er)continue;Jr=El.ownerSVGElement}else Jr=El;for(var tn=q(Jr,Wl.ownerDocument),hn=0;tn[hn]&&tn[hn]===Il[hn];)hn++;var vi=[tn[hn-1],tn[hn],Il[hn]];if(vi[0])for(var $n=vi[0].lastChild;$n;){if($n===vi[1]){wl=lr,Il=tn;break}if($n===vi[2])break;$n=$n.previousSibling}}else Nl=Wl,(parseInt(_(ol=El).getComputedStyle(ol).zIndex,10)||0)>=(parseInt(_(Nl).getComputedStyle(Nl).zIndex,10)||0)&&(wl=lr);else wl=lr}else wl=lr}return wl}(J);return b.activeDrops[el]||null}function ma(t,o,f){var b=t.dropState,w={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return f.type==="dragstart"&&(w.activate=new oa(b,f,"dropactivate"),w.activate.target=null,w.activate.dropzone=null),f.type==="dragend"&&(w.deactivate=new oa(b,f,"dropdeactivate"),w.deactivate.target=null,w.deactivate.dropzone=null),b.rejected||(b.cur.element!==b.prev.element&&(b.prev.dropzone&&(w.leave=new oa(b,f,"dragleave"),f.dragLeave=w.leave.target=b.prev.element,f.prevDropzone=w.leave.dropzone=b.prev.dropzone),b.cur.dropzone&&(w.enter=new oa(b,f,"dragenter"),f.dragEnter=b.cur.element,f.dropzone=b.cur.dropzone)),f.type==="dragend"&&b.cur.dropzone&&(w.drop=new oa(b,f,"drop"),f.dropzone=b.cur.dropzone,f.relatedTarget=b.cur.element),f.type==="dragmove"&&b.cur.dropzone&&(w.move=new oa(b,f,"dropmove"),f.dropzone=b.cur.dropzone)),w}function Oe(t,o){var f=t.dropState,b=f.activeDrops,w=f.cur,I=f.prev;o.leave&&I.dropzone.fire(o.leave),o.enter&&w.dropzone.fire(o.enter),o.move&&w.dropzone.fire(o.move),o.drop&&w.dropzone.fire(o.drop),o.deactivate&&_a(b,o.deactivate),f.prev.dropzone=w.dropzone,f.prev.element=w.element}function Ra(t,o){var f=t.interaction,b=t.iEvent,w=t.event;if(b.type==="dragmove"||b.type==="dragend"){var I=f.dropState;o.dynamicDrop&&(I.activeDrops=ga(o,f.element));var J=b,Q=Pa(f,J,w);I.rejected=I.rejected&&!!Q&&Q.dropzone===I.cur.dropzone&&Q.element===I.cur.element,I.cur.dropzone=Q&&Q.dropzone,I.cur.element=Q&&Q.element,I.events=ma(f,0,J)}}var hl={id:"actions/drop",install:function(t){var o=t.actions,f=t.interactStatic,b=t.Interactable,w=t.defaults;t.usePlugin(pe),b.prototype.dropzone=function(I){return function(J,Q){if(g.object(Q)){if(J.options.drop.enabled=Q.enabled!==!1,Q.listeners){var be=He(Q.listeners),Fe=Object.keys(be).reduce(function(Qe,Aa){return Qe[/^(enter|leave)/.test(Aa)?"drag".concat(Aa):/^(activate|deactivate|move)/.test(Aa)?"drop".concat(Aa):Aa]=be[Aa],Qe},{}),Ce=J.options.drop.listeners;Ce&&J.off(Ce),J.on(Fe),J.options.drop.listeners=Fe}return g.func(Q.ondrop)&&J.on("drop",Q.ondrop),g.func(Q.ondropactivate)&&J.on("dropactivate",Q.ondropactivate),g.func(Q.ondropdeactivate)&&J.on("dropdeactivate",Q.ondropdeactivate),g.func(Q.ondragenter)&&J.on("dragenter",Q.ondragenter),g.func(Q.ondragleave)&&J.on("dragleave",Q.ondragleave),g.func(Q.ondropmove)&&J.on("dropmove",Q.ondropmove),/^(pointer|center)$/.test(Q.overlap)?J.options.drop.overlap=Q.overlap:g.number(Q.overlap)&&(J.options.drop.overlap=Math.max(Math.min(1,Q.overlap),0)),"accept"in Q&&(J.options.drop.accept=Q.accept),"checker"in Q&&(J.options.drop.checker=Q.checker),J}return g.bool(Q)?(J.options.drop.enabled=Q,J):J.options.drop}(this,I)},b.prototype.dropCheck=function(I,J,Q,be,Fe,Ce){return function(Qe,Aa,nl,el,il,wl,ol){var Nl=!1;if(!(ol=ol||Qe.getRect(wl)))return!!Qe.options.drop.checker&&Qe.options.drop.checker(Aa,nl,Nl,Qe,wl,el,il);var Il=Qe.options.drop.overlap;if(Il==="pointer"){var lr=Ie(el,il,"drag"),El=Xe(Aa);El.x+=lr.x,El.y+=lr.y;var Wl=El.x>ol.left&&El.x<ol.right,Hr=El.y>ol.top&&El.y<ol.bottom;Nl=Wl&&Hr}var Er=el.getRect(il);if(Er&&Il==="center"){var Jr=Er.left+Er.width/2,tn=Er.top+Er.height/2;Nl=Jr>=ol.left&&Jr<=ol.right&&tn>=ol.top&&tn<=ol.bottom}return Er&&g.number(Il)&&(Nl=Math.max(0,Math.min(ol.right,Er.right)-Math.max(ol.left,Er.left))*Math.max(0,Math.min(ol.bottom,Er.bottom)-Math.max(ol.top,Er.top))/(Er.width*Er.height)>=Il),Qe.options.drop.checker&&(Nl=Qe.options.drop.checker(Aa,nl,Nl,Qe,wl,el,il)),Nl}(this,I,J,Q,be,Fe,Ce)},f.dynamicDrop=function(I){return g.bool(I)?(t.dynamicDrop=I,f):t.dynamicDrop},le(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",t.dynamicDrop=!1,w.actions.drop=hl.defaults},listeners:{"interactions:before-action-start":function(t){var o=t.interaction;o.prepared.name==="drag"&&(o.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,o){var f=t.interaction,b=(t.event,t.iEvent);if(f.prepared.name==="drag"){var w=f.dropState;w.activeDrops=[],w.events={},w.activeDrops=ga(o,f.element),w.events=ma(f,0,b),w.events.activate&&(_a(w.activeDrops,w.events.activate),o.fire("actions/drop:start",{interaction:f,dragEvent:b}))}},"interactions:action-move":Ra,"interactions:after-action-move":function(t,o){var f=t.interaction,b=t.iEvent;if(f.prepared.name==="drag"){var w=f.dropState;Oe(f,w.events),o.fire("actions/drop:move",{interaction:f,dragEvent:b}),w.events={}}},"interactions:action-end":function(t,o){if(t.interaction.prepared.name==="drag"){var f=t.interaction,b=t.iEvent;Ra(t,o),Oe(f,f.dropState.events),o.fire("actions/drop:end",{interaction:f,dragEvent:b})}},"interactions:stop":function(t){var o=t.interaction;if(o.prepared.name==="drag"){var f=o.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:ga,getDrop:Pa,getDropEvents:ma,fireDropEvents:Oe,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Cl=hl;function Xl(t){var o=t.interaction,f=t.iEvent,b=t.phase;if(o.prepared.name==="gesture"){var w=o.pointers.map(function(Fe){return Fe.pointer}),I=b==="start",J=b==="end",Q=o.interactable.options.deltaSource;if(f.touches=[w[0],w[1]],I)f.distance=Ma(w,Q),f.box=La(w),f.scale=1,f.ds=0,f.angle=Je(w,Q),f.da=0,o.gesture.startDistance=f.distance,o.gesture.startAngle=f.angle;else if(J||o.pointers.length<2){var be=o.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=Ma(w,Q),f.box=La(w),f.scale=f.distance/o.gesture.startDistance,f.angle=Je(w,Q),f.ds=f.scale-o.gesture.scale,f.da=f.angle-o.gesture.angle;o.gesture.distance=f.distance,o.gesture.angle=f.angle,g.number(f.scale)&&f.scale!==1/0&&!isNaN(f.scale)&&(o.gesture.scale=f.scale)}}var xl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var o=t.actions,f=t.Interactable,b=t.defaults;f.prototype.gesturable=function(w){return g.object(w)?(this.options.gesture.enabled=w.enabled!==!1,this.setPerAction("gesture",w),this.setOnEvents("gesture",w),this):g.bool(w)?(this.options.gesture.enabled=w,this):this.options.gesture},o.map.gesture=xl,o.methodDict.gesture="gesturable",b.actions.gesture=xl.defaults},listeners:{"interactions:action-start":Xl,"interactions:action-move":Xl,"interactions:action-end":Xl,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var o=t.interactable.options.gesture;if(o&&o.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Vl=xl;function Wa(t,o,f,b,w,I,J){if(!o)return!1;if(o===!0){var Q=g.number(I.width)?I.width:I.right-I.left,be=g.number(I.height)?I.height:I.bottom-I.top;if(J=Math.min(J,Math.abs((t==="left"||t==="right"?Q:be)/2)),Q<0&&(t==="left"?t="right":t==="right"&&(t="left")),be<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var Fe=Q>=0?I.left:I.right;return f.x<Fe+J}if(t==="top"){var Ce=be>=0?I.top:I.bottom;return f.y<Ce+J}if(t==="right")return f.x>(Q>=0?I.right:I.left)-J;if(t==="bottom")return f.y>(be>=0?I.bottom:I.top)-J}return!!g.element(b)&&(g.element(o)?o===b:ne(b,o,w))}function Rl(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.resizeAxes){var b=o;f.interactable.options.resize.square?(f.resizeAxes==="y"?b.delta.x=b.delta.y:b.delta.y=b.delta.x,b.axes="xy"):(b.axes=f.resizeAxes,f.resizeAxes==="x"?b.delta.y=0:f.resizeAxes==="y"&&(b.delta.x=0))}}var ja,ka,Na={id:"actions/resize",before:["actions/drag"],install:function(t){var o=t.actions,f=t.browser,b=t.Interactable,w=t.defaults;Na.cursors=function(I){return I.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),Na.defaultMargin=f.supportsTouch||f.supportsPointerEvent?20:10,b.prototype.resizable=function(I){return function(J,Q,be){return g.object(Q)?(J.options.resize.enabled=Q.enabled!==!1,J.setPerAction("resize",Q),J.setOnEvents("resize",Q),g.string(Q.axis)&&/^x$|^y$|^xy$/.test(Q.axis)?J.options.resize.axis=Q.axis:Q.axis===null&&(J.options.resize.axis=be.defaults.actions.resize.axis),g.bool(Q.preserveAspectRatio)?J.options.resize.preserveAspectRatio=Q.preserveAspectRatio:g.bool(Q.square)&&(J.options.resize.square=Q.square),J):g.bool(Q)?(J.options.resize.enabled=Q,J):J.options.resize}(this,I,t)},o.map.resize=Na,o.methodDict.resize="resizable",w.actions.resize=Na.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(o){var f=o.iEvent,b=o.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var w=f,I=b.rect;b._rects={start:le({},I),corrected:le({},I),previous:le({},I),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},w.edges=b.prepared.edges,w.rect=b._rects.corrected,w.deltaRect=b._rects.delta}})(t),Rl(t)},"interactions:action-move":function(t){(function(o){var f=o.iEvent,b=o.interaction;if(b.prepared.name==="resize"&&b.prepared.edges){var w=f,I=b.interactable.options.resize.invert,J=I==="reposition"||I==="negate",Q=b.rect,be=b._rects,Fe=be.start,Ce=be.corrected,Qe=be.delta,Aa=be.previous;if(le(Aa,Ce),J){if(le(Ce,Q),I==="reposition"){if(Ce.top>Ce.bottom){var nl=Ce.top;Ce.top=Ce.bottom,Ce.bottom=nl}if(Ce.left>Ce.right){var el=Ce.left;Ce.left=Ce.right,Ce.right=el}}}else Ce.top=Math.min(Q.top,Fe.bottom),Ce.bottom=Math.max(Q.bottom,Fe.top),Ce.left=Math.min(Q.left,Fe.right),Ce.right=Math.max(Q.right,Fe.left);for(var il in Ce.width=Ce.right-Ce.left,Ce.height=Ce.bottom-Ce.top,Ce)Qe[il]=Ce[il]-Aa[il];w.edges=b.prepared.edges,w.rect=Ce,w.deltaRect=Qe}})(t),Rl(t)},"interactions:action-end":function(t){var o=t.iEvent,f=t.interaction;if(f.prepared.name==="resize"&&f.prepared.edges){var b=o;b.edges=f.prepared.edges,b.rect=f._rects.corrected,b.deltaRect=f._rects.delta}},"auto-start:check":function(t){var o=t.interaction,f=t.interactable,b=t.element,w=t.rect,I=t.buttons;if(w){var J=le({},o.coords.cur.page),Q=f.options.resize;if(Q&&Q.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(I&Q.mouseButtons)!=0)){if(g.object(Q.edges)){var be={left:!1,right:!1,top:!1,bottom:!1};for(var Fe in be)be[Fe]=Wa(Fe,Q.edges[Fe],J,o._latestPointer.eventTarget,b,w,Q.margin||Na.defaultMargin);be.left=be.left&&!be.right,be.top=be.top&&!be.bottom,(be.left||be.right||be.top||be.bottom)&&(t.action={name:"resize",edges:be})}else{var Ce=Q.axis!=="y"&&J.x>w.right-Na.defaultMargin,Qe=Q.axis!=="x"&&J.y>w.bottom-Na.defaultMargin;(Ce||Qe)&&(t.action={name:"resize",axes:(Ce?"x":"")+(Qe?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var o=t.edges,f=t.axis,b=t.name,w=Na.cursors,I=null;if(f)I=w[b+f];else if(o){for(var J="",Q=0,be=["top","bottom","left","right"];Q<be.length;Q++){var Fe=be[Q];o[Fe]&&(J+=Fe)}I=w[J]}return I},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},$a=Na,Xa={id:"actions",install:function(t){t.usePlugin(Vl),t.usePlugin($a),t.usePlugin(pe),t.usePlugin(Cl)}},Za=0,aa={request:function(t){return ja(t)},cancel:function(t){return ka(t)},init:function(t){if(ja=t.requestAnimationFrame,ka=t.cancelAnimationFrame,!ja)for(var o=["ms","moz","webkit","o"],f=0;f<o.length;f++){var b=o[f];ja=t["".concat(b,"RequestAnimationFrame")],ka=t["".concat(b,"CancelAnimationFrame")]||t["".concat(b,"CancelRequestAnimationFrame")]}ja=ja&&ja.bind(t),ka=ka&&ka.bind(t),ja||(ja=function(w){var I=Date.now(),J=Math.max(0,16-(I-Za)),Q=t.setTimeout(function(){w(I+J)},J);return Za=I+J,Q},ka=function(w){return clearTimeout(w)})}},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(t){Va.isScrolling=!0,aa.cancel(Va.i),t.autoScroll=Va,Va.interaction=t,Va.prevTime=Va.now(),Va.i=aa.request(Va.scroll)},stop:function(){Va.isScrolling=!1,Va.interaction&&(Va.interaction.autoScroll=null),aa.cancel(Va.i)},scroll:function(){var t=Va.interaction,o=t.interactable,f=t.element,b=t.prepared.name,w=o.options[b].autoScroll,I=ye(w.container,o,f),J=Va.now(),Q=(J-Va.prevTime)/1e3,be=w.speed*Q;if(be>=1){var Fe={x:Va.x*be,y:Va.y*be};if(Fe.x||Fe.y){var Ce=xa(I);g.window(I)?I.scrollBy(Fe.x,Fe.y):I&&(I.scrollLeft+=Fe.x,I.scrollTop+=Fe.y);var Qe=xa(I),Aa={x:Qe.x-Ce.x,y:Qe.y-Ce.y};(Aa.x||Aa.y)&&o.fire({type:"autoscroll",target:f,interactable:o,delta:Aa,interaction:t,container:I})}Va.prevTime=J}Va.isScrolling&&(aa.cancel(Va.i),Va.i=aa.request(Va.scroll))},check:function(t,o){var f;return(f=t.options[o].autoScroll)==null?void 0:f.enabled},onInteractionMove:function(t){var o=t.interaction,f=t.pointer;if(o.interacting()&&Va.check(o.interactable,o.prepared.name))if(o.simulation)Va.x=Va.y=0;else{var b,w,I,J,Q=o.interactable,be=o.element,Fe=o.prepared.name,Ce=Q.options[Fe].autoScroll,Qe=ye(Ce.container,Q,be);if(g.window(Qe))J=f.clientX<Va.margin,b=f.clientY<Va.margin,w=f.clientX>Qe.innerWidth-Va.margin,I=f.clientY>Qe.innerHeight-Va.margin;else{var Aa=we(Qe);J=f.clientX<Aa.left+Va.margin,b=f.clientY<Aa.top+Va.margin,w=f.clientX>Aa.right-Va.margin,I=f.clientY>Aa.bottom-Va.margin}Va.x=w?1:J?-1:0,Va.y=I?1:b?-1:0,Va.isScrolling||(Va.margin=Ce.margin,Va.speed=Ce.speed,Va.start(o))}}};function ye(t,o,f){return(g.string(t)?Te(t,o,f):t)||_(f)}function xa(t){return g.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Le={id:"auto-scroll",install:function(t){var o=t.defaults,f=t.actions;t.autoScroll=Va,Va.now=function(){return t.now()},f.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=Va.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,Va.stop(),Va.interaction&&(Va.interaction=null)},"interactions:stop":Va.stop,"interactions:action-move":function(t){return Va.onInteractionMove(t)}}},re=Le;function ea(t,o){var f=!1;return function(){return f||(j.console.warn(o),f=!0),t.apply(this,arguments)}}function pa(t,o){return t.name=o.name,t.axis=o.axis,t.edges=o.edges,t}function We(t){return g.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Sa(t){return g.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ya={id:"auto-start/interactableMethods",install:function(t){var o=t.Interactable;o.prototype.getAction=function(f,b,w,I){var J=function(Q,be,Fe,Ce,Qe){var Aa=Q.getRect(Ce),nl=be.buttons||{0:1,1:4,3:8,4:16}[be.button],el={action:null,interactable:Q,interaction:Fe,element:Ce,rect:Aa,buttons:nl};return Qe.fire("auto-start:check",el),el.action}(this,b,w,I,t);return this.options.actionChecker?this.options.actionChecker(f,b,J,this,I,w):J},o.prototype.ignoreFrom=ea(function(f){return this._backCompatOption("ignoreFrom",f)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=ea(function(f){return this._backCompatOption("allowFrom",f)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=Sa,o.prototype.styleCursor=We}};function ml(t,o,f,b,w){return o.testIgnoreAllow(o.options[t.name],f,b)&&o.options[t.name].enabled&&cl(o,f,t,w)?t:null}function Ha(t,o,f,b,w,I,J){for(var Q=0,be=b.length;Q<be;Q++){var Fe=b[Q],Ce=w[Q],Qe=Fe.getAction(o,f,t,Ce);if(Qe){var Aa=ml(Qe,Fe,Ce,I,J);if(Aa)return{action:Aa,interactable:Fe,element:Ce}}}return{action:null,interactable:null,element:null}}function Ka(t,o,f,b,w){var I=[],J=[],Q=b;function be(Ce){I.push(Ce),J.push(Q)}for(;g.element(Q);){I=[],J=[],w.interactables.forEachMatch(Q,be);var Fe=Ha(t,o,f,I,J,b,w);if(Fe.action&&!Fe.interactable.options[Fe.action.name].manualStart)return Fe;Q=Ve(Q)}return{action:null,interactable:null,element:null}}function wa(t,o,f){var b=o.action,w=o.interactable,I=o.element;b=b||{name:null},t.interactable=w,t.element=I,pa(t.prepared,b),t.rect=w&&b.name?w.getRect(I):null,Dl(t,f),f.fire("autoStart:prepared",{interaction:t})}function cl(t,o,f,b){var w=t.options,I=w[f.name].max,J=w[f.name].maxPerElement,Q=b.autoStart.maxInteractions,be=0,Fe=0,Ce=0;if(!(I&&J&&Q))return!1;for(var Qe=0,Aa=b.interactions.list;Qe<Aa.length;Qe++){var nl=Aa[Qe],el=nl.prepared.name;if(nl.interacting()&&(++be>=Q||nl.interactable===t&&((Fe+=el===f.name?1:0)>=I||nl.element===o&&(Ce++,el===f.name&&Ce>=J))))return!1}return Q>0}function Ia(t,o){return g.number(t)?(o.autoStart.maxInteractions=t,this):o.autoStart.maxInteractions}function Ae(t,o,f){var b=f.autoStart.cursorElement;b&&b!==t&&(b.style.cursor=""),t.ownerDocument.documentElement.style.cursor=o,t.style.cursor=o,f.autoStart.cursorElement=o?t:null}function Dl(t,o){var f=t.interactable,b=t.element,w=t.prepared;if(t.pointerType==="mouse"&&f&&f.options.styleCursor){var I="";if(w.name){var J=f.options[w.name].cursorChecker;I=g.func(J)?J(w,f,b,t._interacting):o.actions.map[w.name].getCursor(w)}Ae(t.element,I||"",o)}else o.autoStart.cursorElement&&Ae(o.autoStart.cursorElement,"",o)}var Ol={id:"auto-start/base",before:["actions"],install:function(t){var o=t.interactStatic,f=t.defaults;t.usePlugin(ya),f.base.actionChecker=null,f.base.styleCursor=!0,le(f.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(b){return Ia(b,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:cl,cursorElement:null}},listeners:{"interactions:down":function(t,o){var f=t.interaction,b=t.pointer,w=t.event,I=t.eventTarget;f.interacting()||wa(f,Ka(f,b,w,I,o),o)},"interactions:move":function(t,o){(function(f,b){var w=f.interaction,I=f.pointer,J=f.event,Q=f.eventTarget;w.pointerType!=="mouse"||w.pointerIsDown||w.interacting()||wa(w,Ka(w,I,J,Q,b),b)})(t,o),function(f,b){var w=f.interaction;if(w.pointerIsDown&&!w.interacting()&&w.pointerWasMoved&&w.prepared.name){b.fire("autoStart:before-start",f);var I=w.interactable,J=w.prepared.name;J&&I&&(I.options[J].manualStart||!cl(I,w.element,w.prepared,b)?w.stop():(w.start(w.prepared,I,w.element),Dl(w,b)))}}(t,o)},"interactions:stop":function(t,o){var f=t.interaction,b=f.interactable;b&&b.options.styleCursor&&Ae(f.element,"",o)}},maxInteractions:Ia,withinInteractionLimit:cl,validateAction:ml},Gl=Ol,Hl={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,o){var f=t.interaction,b=t.eventTarget,w=t.dx,I=t.dy;if(f.prepared.name==="drag"){var J=Math.abs(w),Q=Math.abs(I),be=f.interactable.options.drag,Fe=be.startAxis,Ce=J>Q?"x":J<Q?"y":"xy";if(f.prepared.axis=be.lockAxis==="start"?Ce[0]:be.lockAxis,Ce!=="xy"&&Fe!=="xy"&&Fe!==Ce){f.prepared.name=null;for(var Qe=b,Aa=function(el){if(el!==f.interactable){var il=f.interactable.options.drag;if(!il.manualStart&&el.testIgnoreAllow(il,Qe,b)){var wl=el.getAction(f.downPointer,f.downEvent,f,Qe);if(wl&&wl.name==="drag"&&function(ol,Nl){if(!Nl)return!1;var Il=Nl.options.drag.startAxis;return ol==="xy"||Il==="xy"||Il===ol}(Ce,el)&&Gl.validateAction(wl,el,Qe,b,o))return el}}};g.element(Qe);){var nl=o.interactables.forEachMatch(Qe,Aa);if(nl){f.prepared.name="drag",f.interactable=nl,f.element=Qe;break}Qe=Ve(Qe)}}}}}};function Zl(t){var o=t.prepared&&t.prepared.name;if(!o)return null;var f=t.interactable.options;return f[o].hold||f[o].delay}var Sr={id:"auto-start/hold",install:function(t){var o=t.defaults;t.usePlugin(Gl),o.perAction.hold=0,o.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var o=t.interaction,f=Zl(o);f>0&&(o.autoStartHoldTimer=setTimeout(function(){o.start(o.prepared,o.interactable,o.element)},f))},"interactions:move":function(t){var o=t.interaction,f=t.duplicate;o.autoStartHoldTimer&&o.pointerWasMoved&&!f&&(clearTimeout(o.autoStartHoldTimer),o.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var o=t.interaction;Zl(o)>0&&(o.prepared.name=null)}},getHoldDuration:Zl},Fl=Sr,fr={id:"auto-start",install:function(t){t.usePlugin(Gl),t.usePlugin(Fl),t.usePlugin(Hl)}},Fr=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):g.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function Ul(t){var o=t.interaction,f=t.event;o.interactable&&o.interactable.checkAndPreventDefault(f)}var rr={id:"core/interactablePreventDefault",install:function(t){var o=t.Interactable;o.prototype.preventDefault=Fr,o.prototype.checkAndPreventDefault=function(f){return function(b,w,I){var J=b.options.preventDefault;if(J!=="never")if(J!=="always"){if(w.events.supportsPassive&&/^touch(start|move)$/.test(I.type)){var Q=_(I.target).document,be=w.getDocOptions(Q);if(!be||!be.events||be.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(I.type)||g.element(I.target)&&ge(I.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||I.preventDefault()}else I.preventDefault()}(this,t,f)},t.interactions.docEvents.push({type:"dragstart",listener:function(f){for(var b=0,w=t.interactions.list;b<w.length;b++){var I=w[b];if(I.element&&(I.element===f.target||ue(I.element,f.target)))return void I.interactable.checkAndPreventDefault(f)}}})},listeners:["down","move","up","cancel"].reduce(function(t,o){return t["interactions:".concat(o)]=Ul,t},{})};function $r(t,o){if(o.phaselessTypes[t])return!0;for(var f in o.map)if(t.indexOf(f)===0&&t.substr(f.length)in o.phases)return!0;return!1}function Tr(t){var o={};for(var f in t){var b=t[f];g.plainObject(b)?o[f]=Tr(b):g.array(b)?o[f]=Be(b):o[f]=b}return o}var Rr=function(){function t(o){c(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=o,this.result=Ar(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return p(t,[{key:"start",value:function(o,f){var b,w,I=o.phase,J=this.interaction,Q=function(Fe){var Ce=Fe.interactable.options[Fe.prepared.name],Qe=Ce.modifiers;return Qe&&Qe.length?Qe:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Aa){var nl=Ce[Aa];return nl&&nl.enabled&&{options:nl,methods:nl._methods}}).filter(function(Aa){return!!Aa})}(J);this.prepareStates(Q),this.startEdges=le({},J.edges),this.edges=le({},this.startEdges),this.startOffset=(b=J.rect,w=f,b?{left:w.x-b.left,top:w.y-b.top,right:b.right-w.x,bottom:b.bottom-w.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var be=this.fillArg({phase:I,pageCoords:f,preEnd:!1});return this.result=Ar(),this.startAll(be),this.result=this.setAll(be)}},{key:"fillArg",value:function(o){var f=this.interaction;return o.interaction=f,o.interactable=f.interactable,o.element=f.element,o.rect||(o.rect=f.rect),o.edges||(o.edges=this.startEdges),o.startOffset=this.startOffset,o}},{key:"startAll",value:function(o){for(var f=0,b=this.states;f<b.length;f++){var w=b[f];w.methods.start&&(o.state=w,w.methods.start(o))}}},{key:"setAll",value:function(o){var f=o.phase,b=o.preEnd,w=o.skipModifiers,I=o.rect,J=o.edges;o.coords=le({},o.pageCoords),o.rect=le({},I),o.edges=le({},J);for(var Q=w?this.states.slice(w):this.states,be=Ar(o.coords,o.rect),Fe=0;Fe<Q.length;Fe++){var Ce,Qe=Q[Fe],Aa=Qe.options,nl=le({},o.coords),el=null;(Ce=Qe.methods)!=null&&Ce.set&&this.shouldDo(Aa,b,f)&&(o.state=Qe,el=Qe.methods.set(o),oe(o.edges,o.rect,{x:o.coords.x-nl.x,y:o.coords.y-nl.y})),be.eventProps.push(el)}le(this.edges,o.edges),be.delta.x=o.coords.x-o.pageCoords.x,be.delta.y=o.coords.y-o.pageCoords.y,be.rectDelta.left=o.rect.left-I.left,be.rectDelta.right=o.rect.right-I.right,be.rectDelta.top=o.rect.top-I.top,be.rectDelta.bottom=o.rect.bottom-I.bottom;var il=this.result.coords,wl=this.result.rect;if(il&&wl){var ol=be.rect.left!==wl.left||be.rect.right!==wl.right||be.rect.top!==wl.top||be.rect.bottom!==wl.bottom;be.changed=ol||il.x!==be.coords.x||il.y!==be.coords.y}return be}},{key:"applyToInteraction",value:function(o){var f=this.interaction,b=o.phase,w=f.coords.cur,I=f.coords.start,J=this.result,Q=this.startDelta,be=J.delta;b==="start"&&le(this.startDelta,J.delta);for(var Fe=0,Ce=[[I,Q],[w,be]];Fe<Ce.length;Fe++){var Qe=Ce[Fe],Aa=Qe[0],nl=Qe[1];Aa.page.x+=nl.x,Aa.page.y+=nl.y,Aa.client.x+=nl.x,Aa.client.y+=nl.y}var el=this.result.rectDelta,il=o.rect||f.rect;il.left+=el.left,il.right+=el.right,il.top+=el.top,il.bottom+=el.bottom,il.width=il.right-il.left,il.height=il.bottom-il.top}},{key:"setAndApply",value:function(o){var f=this.interaction,b=o.phase,w=o.preEnd,I=o.skipModifiers,J=this.setAll(this.fillArg({preEnd:w,phase:b,pageCoords:o.modifiedCoords||f.coords.cur.page}));if(this.result=J,!J.changed&&(!I||I<this.states.length)&&f.interacting())return!1;if(o.modifiedCoords){var Q=f.coords.cur.page,be={x:o.modifiedCoords.x-Q.x,y:o.modifiedCoords.y-Q.y};J.coords.x+=be.x,J.coords.y+=be.y,J.delta.x+=be.x,J.delta.y+=be.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var f=o.interaction,b=o.event,w=this.states;if(w&&w.length){for(var I=!1,J=0;J<w.length;J++){var Q=w[J];o.state=Q;var be=Q.options,Fe=Q.methods,Ce=Fe.beforeEnd&&Fe.beforeEnd(o);if(Ce)return this.endResult=Ce,!1;I=I||!I&&this.shouldDo(be,!0,o.phase,!0)}I&&f.move({event:b,preEnd:!0})}}},{key:"stop",value:function(o){var f=o.interaction;if(this.states&&this.states.length){var b=le({states:this.states,interactable:f.interactable,element:f.element,rect:null},o);this.fillArg(b);for(var w=0,I=this.states;w<I.length;w++){var J=I[w];b.state=J,J.methods.stop&&J.methods.stop(b)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var f=0;f<o.length;f++){var b=o[f],w=b.options,I=b.methods,J=b.name;this.states.push({options:w,methods:I,index:f,name:J})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var f=o.interaction,b=f.coords,w=f.rect,I=f.modification;if(I.result){for(var J=I.startDelta,Q=I.result,be=Q.delta,Fe=Q.rectDelta,Ce=0,Qe=[[b.start,J],[b.cur,be]];Ce<Qe.length;Ce++){var Aa=Qe[Ce],nl=Aa[0],el=Aa[1];nl.page.x-=el.x,nl.page.y-=el.y,nl.client.x-=el.x,nl.client.y-=el.y}w.left-=Fe.left,w.right-=Fe.right,w.top-=Fe.top,w.bottom-=Fe.bottom}}},{key:"shouldDo",value:function(o,f,b,w){return!(!o||o.enabled===!1||w&&!o.endOnly||o.endOnly&&!f||b==="start"&&!o.setStart)}},{key:"copyFrom",value:function(o){this.startOffset=o.startOffset,this.startDelta=o.startDelta,this.startEdges=o.startEdges,this.edges=o.edges,this.states=o.states.map(function(f){return Tr(f)}),this.result=Ar(le({},o.result.coords),le({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),t}();function Ar(t,o){return{rect:o,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function yr(t,o){var f=t.defaults,b={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},w=function(I){var J=I||{};for(var Q in J.enabled=J.enabled!==!1,f)Q in J||(J[Q]=f[Q]);var be={options:J,methods:b,name:o,enable:function(){return J.enabled=!0,be},disable:function(){return J.enabled=!1,be}};return be};return o&&typeof o=="string"&&(w._defaults=f,w._methods=b),w}function zr(t){var o=t.iEvent,f=t.interaction.modification.result;f&&(o.modifiers=f.eventProps)}var Mr={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var o=t.interaction;o.modification=new Rr(o)},"interactions:before-action-start":function(t){var o=t.interaction,f=t.interaction.modification;f.start(t,o.coords.start.page),o.edges=f.edges,f.applyToInteraction(t)},"interactions:before-action-move":function(t){var o=t.interaction,f=o.modification,b=f.setAndApply(t);return o.edges=f.edges,b},"interactions:before-action-end":function(t){var o=t.interaction,f=o.modification,b=f.beforeEnd(t);return o.edges=f.startEdges,b},"interactions:action-start":zr,"interactions:action-move":zr,"interactions:action-end":zr,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},ir=Mr,xn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Yr=function(t){y(f,t);var o=R(f);function f(b,w,I,J,Q,be,Fe){var Ce;c(this,f),(Ce=o.call(this,b)).relatedTarget=null,Ce.screenX=void 0,Ce.screenY=void 0,Ce.button=void 0,Ce.buttons=void 0,Ce.ctrlKey=void 0,Ce.shiftKey=void 0,Ce.altKey=void 0,Ce.metaKey=void 0,Ce.page=void 0,Ce.client=void 0,Ce.delta=void 0,Ce.rect=void 0,Ce.x0=void 0,Ce.y0=void 0,Ce.t0=void 0,Ce.dt=void 0,Ce.duration=void 0,Ce.clientX0=void 0,Ce.clientY0=void 0,Ce.velocity=void 0,Ce.speed=void 0,Ce.swipe=void 0,Ce.axes=void 0,Ce.preEnd=void 0,Q=Q||b.element;var Qe=b.interactable,Aa=(Qe&&Qe.options||xn).deltaSource,nl=Ie(Qe,Q,I),el=J==="start",il=J==="end",wl=el?D(Ce):b.prevEvent,ol=el?b.coords.start:il?{page:wl.page,client:wl.client,timeStamp:b.coords.cur.timeStamp}:b.coords.cur;return Ce.page=le({},ol.page),Ce.client=le({},ol.client),Ce.rect=le({},b.rect),Ce.timeStamp=ol.timeStamp,il||(Ce.page.x-=nl.x,Ce.page.y-=nl.y,Ce.client.x-=nl.x,Ce.client.y-=nl.y),Ce.ctrlKey=w.ctrlKey,Ce.altKey=w.altKey,Ce.shiftKey=w.shiftKey,Ce.metaKey=w.metaKey,Ce.button=w.button,Ce.buttons=w.buttons,Ce.target=Q,Ce.currentTarget=Q,Ce.preEnd=be,Ce.type=Fe||I+(J||""),Ce.interactable=Qe,Ce.t0=el?b.pointers[b.pointers.length-1].downTime:wl.t0,Ce.x0=b.coords.start.page.x-nl.x,Ce.y0=b.coords.start.page.y-nl.y,Ce.clientX0=b.coords.start.client.x-nl.x,Ce.clientY0=b.coords.start.client.y-nl.y,Ce.delta=el||il?{x:0,y:0}:{x:Ce[Aa].x-wl[Aa].x,y:Ce[Aa].y-wl[Aa].y},Ce.dt=b.coords.delta.timeStamp,Ce.duration=Ce.timeStamp-Ce.t0,Ce.velocity=le({},b.coords.velocity[Aa]),Ce.speed=Oa(Ce.velocity.x,Ce.velocity.y),Ce.swipe=il||J==="inertiastart"?Ce.getSwipe():null,Ce}return p(f,[{key:"getSwipe",value:function(){var b=this._interaction;if(b.prevEvent.speed<600||this.timeStamp-b.prevEvent.timeStamp>150)return null;var w=180*Math.atan2(b.prevEvent.velocityY,b.prevEvent.velocityX)/Math.PI;w<0&&(w+=360);var I=112.5<=w&&w<247.5,J=202.5<=w&&w<337.5;return{up:J,down:!J&&22.5<=w&&w<157.5,left:I,right:!I&&(292.5<=w||w<67.5),angle:w,speed:b.prevEvent.speed,velocity:{x:b.prevEvent.velocityX,y:b.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),f}(U);Object.defineProperties(Yr.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var rn=p(function t(o,f,b,w,I){c(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=o,this.pointer=f,this.event=b,this.downTime=w,this.downTarget=I}),zn=function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t}({}),wn=function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t}({}),gn=0,nn=function(){function t(o){var f=this,b=o.pointerType,w=o.scopeFire;c(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ea(function(Ce){this.move(Ce)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=gn++,this._scopeFire=w,this.pointerType=b;var I=this;this._proxy={};var J=function(Ce){Object.defineProperty(f._proxy,Ce,{get:function(){return I[Ce]}})};for(var Q in zn)J(Q);var be=function(Ce){Object.defineProperty(f._proxy,Ce,{value:function(){return I[Ce].apply(I,arguments)}})};for(var Fe in wn)be(Fe);this._scopeFire("interactions:new",{interaction:this})}return p(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,f,b){var w=this.updatePointer(o,f,b,!0),I=this.pointers[w];this._scopeFire("interactions:down",{pointer:o,event:f,eventTarget:b,pointerIndex:w,pointerInfo:I,type:"down",interaction:this})}},{key:"start",value:function(o,f,b){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!f.options[o.name].enabled)&&(pa(this.prepared,o),this.interactable=f,this.element=b,this.rect=f.getRect(b),this.edges=this.prepared.edges?le({},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(o,f,b){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,f,b,!1);var w,I,J=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(w=this.coords.cur.client.x-this.coords.start.client.x,I=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Oa(w,I)>this.pointerMoveTolerance);var Q,be,Fe,Ce=this.getPointerIndex(o),Qe={pointer:o,pointerIndex:Ce,pointerInfo:this.pointers[Ce],event:f,type:"move",eventTarget:b,dx:w,dy:I,duplicate:J,interaction:this};J||(Q=this.coords.velocity,be=this.coords.delta,Fe=Math.max(be.timeStamp/1e3,.001),Q.page.x=be.page.x/Fe,Q.page.y=be.page.y/Fe,Q.client.x=be.client.x/Fe,Q.client.y=be.client.y/Fe,Q.timeStamp=Fe),this._scopeFire("interactions:move",Qe),J||this.simulation||(this.interacting()&&(Qe.type=null,this.move(Qe)),this.pointerWasMoved&&ee(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||fe(this.coords.delta),(o=le({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},o||{})).phase="move",this._doPhase(o)}},{key:"pointerUp",value:function(o,f,b,w){var I=this.getPointerIndex(o);I===-1&&(I=this.updatePointer(o,f,b,!1));var J=/cancel$/i.test(f.type)?"cancel":"up";this._scopeFire("interactions:".concat(J),{pointer:o,pointerIndex:I,pointerInfo:this.pointers[I],event:f,eventTarget:b,type:J,curEventTarget:w,interaction:this}),this.simulation||this.end(f),this.removePointer(o,f)}},{key:"documentBlur",value:function(o){this.end(o),this._scopeFire("interactions:blur",{event:o,type:"blur",interaction:this})}},{key:"end",value:function(o){var f;this._ending=!0,o=o||this._latestPointer.event,this.interacting()&&(f=this._doPhase({event:o,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(o){var f=ce(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:ke(this.pointers,function(b){return b.id===f})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,f,b,w){var I,J,Q,be=ce(o),Fe=this.getPointerIndex(o),Ce=this.pointers[Fe];return w=w!==!1&&(w||/(down|start)$/i.test(f.type)),Ce?Ce.pointer=o:(Ce=new rn(be,o,f,null,null),Fe=this.pointers.length,this.pointers.push(Ce)),_e(this.coords.cur,this.pointers.map(function(Qe){return Qe.pointer}),this._now()),I=this.coords.delta,J=this.coords.prev,Q=this.coords.cur,I.page.x=Q.page.x-J.page.x,I.page.y=Q.page.y-J.page.y,I.client.x=Q.client.x-J.client.x,I.client.y=Q.client.y-J.client.y,I.timeStamp=Q.timeStamp-J.timeStamp,w&&(this.pointerIsDown=!0,Ce.downTime=this.coords.cur.timeStamp,Ce.downTarget=b,H(this.downPointer,o),this.interacting()||(ee(this.coords.start,this.coords.cur),ee(this.coords.prev,this.coords.cur),this.downEvent=f,this.pointerWasMoved=!1)),this._updateLatestPointer(o,f,b),this._scopeFire("interactions:update-pointer",{pointer:o,event:f,eventTarget:b,down:w,pointerInfo:Ce,pointerIndex:Fe,interaction:this}),Fe}},{key:"removePointer",value:function(o,f){var b=this.getPointerIndex(o);if(b!==-1){var w=this.pointers[b];this._scopeFire("interactions:remove-pointer",{pointer:o,event:f,eventTarget:null,pointerIndex:b,pointerInfo:w,interaction:this}),this.pointers.splice(b,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,f,b){this._latestPointer.pointer=o,this._latestPointer.event=f,this._latestPointer.eventTarget=b}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,f,b,w){return new Yr(this,o,this.prepared.name,f,this.element,b,w)}},{key:"_fireEvent",value:function(o){var f;(f=this.interactable)==null||f.fire(o),(!this.prevEvent||o.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=o)}},{key:"_doPhase",value:function(o){var f=o.event,b=o.phase,w=o.preEnd,I=o.type,J=this.rect;if(J&&b==="move"&&(oe(this.edges,J,this.coords.delta[this.interactable.options.deltaSource]),J.width=J.right-J.left,J.height=J.bottom-J.top),this._scopeFire("interactions:before-action-".concat(b),o)===!1)return!1;var Q=o.iEvent=this._createPreparedEvent(f,b,w,I);return this._scopeFire("interactions:action-".concat(b),o),b==="start"&&(this.prevEvent=Q),this._fireEvent(Q),this._scopeFire("interactions:after-action-".concat(b),o),!0}},{key:"_now",value:function(){return Date.now()}}]),t}();function ar(t){ql(t.interaction)}function ql(t){if(!function(f){return!(!f.offset.pending.x&&!f.offset.pending.y)}(t))return!1;var o=t.offset.pending;return Ll(t.coords.cur,o),Ll(t.coords.delta,o),oe(t.edges,t.rect,o),o.x=0,o.y=0,!0}function zl(t){var o=t.x,f=t.y;this.offset.pending.x+=o,this.offset.pending.y+=f,this.offset.total.x+=o,this.offset.total.y+=f}function Ll(t,o){var f=t.page,b=t.client,w=o.x,I=o.y;f.x+=w,f.y+=I,b.x+=w,b.y+=I}wn.offsetBy="";var Ml={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=zl},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return function(o){o.pointerIsDown&&(Ll(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(t.interaction)},"interactions:before-action-start":ar,"interactions:before-action-move":ar,"interactions:before-action-end":function(t){var o=t.interaction;if(ql(o))return o.move({offset:!0}),o.end(),!1},"interactions:stop":function(t){var o=t.interaction;o.offset.total.x=0,o.offset.total.y=0,o.offset.pending.x=0,o.offset.pending.y=0}}},gr=Ml,ur=function(){function t(o){c(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=o}return p(t,[{key:"start",value:function(o){var f=this.interaction,b=jl(f);if(!b||!b.enabled)return!1;var w=f.coords.velocity.client,I=Oa(w.x,w.y),J=this.modification||(this.modification=new Rr(f));if(J.copyFrom(f.modification),this.t0=f._now(),this.allowResume=b.allowResume,this.v0=I,this.currentOffset={x:0,y:0},this.startCoords=f.coords.cur.page,this.modifierArg=J.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-f.coords.cur.timeStamp<50&&I>b.minSpeed&&I>b.endSpeed)this.startInertia();else{if(J.result=J.setAll(this.modifierArg),!J.result.changed)return!1;this.startSmoothEnd()}return f.modification.result.rect=null,f.offsetBy(this.targetOffset),f._doPhase({interaction:f,event:o,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 o=this,f=this.interaction.coords.velocity.client,b=jl(this.interaction),w=b.resistance,I=-Math.log(b.endSpeed/this.v0)/w;this.targetOffset={x:(f.x-I)/w,y:(f.y-I)/w},this.te=I,this.lambda_v0=w/this.v0,this.one_ve_v0=1-b.endSpeed/this.v0;var J=this.modification,Q=this.modifierArg;Q.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},J.result=J.setAll(Q),J.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+J.result.delta.x,y:this.targetOffset.y+J.result.delta.y}),this.onNextFrame(function(){return o.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var o=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 o.smoothEndTick()})}},{key:"onNextFrame",value:function(o){var f=this;this.timeout=aa.request(function(){f.active&&o()})}},{key:"inertiaTick",value:function(){var o,f,b,w,I,J,Q,be=this,Fe=this.interaction,Ce=jl(Fe).resistance,Qe=(Fe._now()-this.t0)/1e3;if(Qe<this.te){var Aa,nl=1-(Math.exp(-Ce*Qe)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,f=0,b=this.targetOffset.x,w=this.targetOffset.y,I=this.modifiedOffset.x,J=this.modifiedOffset.y,Aa={x:Pr(Q=nl,o,b,I),y:Pr(Q,f,w,J)}):Aa={x:this.targetOffset.x*nl,y:this.targetOffset.y*nl};var el={x:Aa.x-this.currentOffset.x,y:Aa.y-this.currentOffset.y};this.currentOffset.x+=el.x,this.currentOffset.y+=el.y,Fe.offsetBy(el),Fe.move(),this.onNextFrame(function(){return be.inertiaTick()})}else Fe.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var o=this,f=this.interaction,b=f._now()-this.t0,w=jl(f).smoothEndDuration;if(b<w){var I={x:_n(b,0,this.targetOffset.x,w),y:_n(b,0,this.targetOffset.y,w)},J={x:I.x-this.currentOffset.x,y:I.y-this.currentOffset.y};this.currentOffset.x+=J.x,this.currentOffset.y+=J.y,f.offsetBy(J),f.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return o.smoothEndTick()})}else f.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(o){var f=o.pointer,b=o.event,w=o.eventTarget,I=this.interaction;I.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),I.updatePointer(f,b,w,!0),I._doPhase({interaction:I,event:b,phase:"resume"}),ee(I.coords.prev,I.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,aa.cancel(this.timeout)}}]),t}();function jl(t){var o=t.interactable,f=t.prepared;return o&&o.options&&f.name&&o.options[f.name].inertia}var Vr={id:"inertia",before:["modifiers","actions"],install:function(t){var o=t.defaults;t.usePlugin(gr),t.usePlugin(ir),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,o.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var o=t.interaction;o.inertia=new ur(o)},"interactions:before-action-end":function(t){var o=t.interaction,f=t.event;return(!o._interacting||o.simulation||!o.inertia.start(f))&&null},"interactions:down":function(t){var o=t.interaction,f=t.eventTarget,b=o.inertia;if(b.active)for(var w=f;g.element(w);){if(w===o.element){b.resume(t);break}w=Ve(w)}},"interactions:stop":function(t){var o=t.interaction.inertia;o.active&&o.stop()},"interactions:before-action-resume":function(t){var o=t.interaction.modification;o.stop(t),o.start(t,t.interaction.coords.cur.page),o.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":zr,"interactions:action-inertiastart":zr,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Pr(t,o,f,b){var w=1-t;return w*w*o+2*w*t*f+t*t*b}function _n(t,o,f,b){return-f*(t/=b)*(t-2)+o}var on=Vr;function ei(t,o){for(var f=0;f<o.length;f++){var b=o[f];if(t.immediatePropagationStopped)break;b(t)}}var Mn=function(){function t(o){c(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=le({},o||{})}return p(t,[{key:"fire",value:function(o){var f,b=this.global;(f=this.types[o.type])&&ei(o,f),!o.propagationStopped&&b&&(f=b[o.type])&&ei(o,f)}},{key:"on",value:function(o,f){var b=He(o,f);for(o in b)this.types[o]=W(this.types[o]||[],b[o])}},{key:"off",value:function(o,f){var b=He(o,f);for(o in b){var w=this.types[o];if(w&&w.length)for(var I=0,J=b[o];I<J.length;I++){var Q=J[I],be=w.indexOf(Q);be!==-1&&w.splice(be,1)}}}},{key:"getRect",value:function(o){return null}}]),t}(),ai=function(){function t(o){c(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,H(this,o)}return p(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t}();function Sn(t){return g.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function In(t,o){return t===o||(typeof t=="boolean"?!!o.capture===t&&!o.passive:!!t.capture==!!o.capture&&!!t.passive==!!o.passive)}var Hn={id:"events",install:function(t){var o,f=[],b={},w=[],I={add:J,remove:Q,addDelegate:function(Ce,Qe,Aa,nl,el){var il=Sn(el);if(!b[Aa]){b[Aa]=[];for(var wl=0;wl<w.length;wl++){var ol=w[wl];J(ol,Aa,be),J(ol,Aa,Fe,!0)}}var Nl=b[Aa],Il=ra(Nl,function(lr){return lr.selector===Ce&&lr.context===Qe});Il||(Il={selector:Ce,context:Qe,listeners:[]},Nl.push(Il)),Il.listeners.push({func:nl,options:il})},removeDelegate:function(Ce,Qe,Aa,nl,el){var il,wl=Sn(el),ol=b[Aa],Nl=!1;if(ol)for(il=ol.length-1;il>=0;il--){var Il=ol[il];if(Il.selector===Ce&&Il.context===Qe){for(var lr=Il.listeners,El=lr.length-1;El>=0;El--){var Wl=lr[El];if(Wl.func===nl&&In(Wl.options,wl)){lr.splice(El,1),lr.length||(ol.splice(il,1),Q(Qe,Aa,be),Q(Qe,Aa,Fe,!0)),Nl=!0;break}}if(Nl)break}}},delegateListener:be,delegateUseCapture:Fe,delegatedEvents:b,documents:w,targets:f,supportsOptions:!1,supportsPassive:!1};function J(Ce,Qe,Aa,nl){if(Ce.addEventListener){var el=Sn(nl),il=ra(f,function(wl){return wl.eventTarget===Ce});il||(il={eventTarget:Ce,events:{}},f.push(il)),il.events[Qe]||(il.events[Qe]=[]),ra(il.events[Qe],function(wl){return wl.func===Aa&&In(wl.options,el)})||(Ce.addEventListener(Qe,Aa,I.supportsOptions?el:el.capture),il.events[Qe].push({func:Aa,options:el}))}}function Q(Ce,Qe,Aa,nl){if(Ce.addEventListener&&Ce.removeEventListener){var el=ke(f,function(Hr){return Hr.eventTarget===Ce}),il=f[el];if(il&&il.events)if(Qe!=="all"){var wl=!1,ol=il.events[Qe];if(ol){if(Aa==="all"){for(var Nl=ol.length-1;Nl>=0;Nl--){var Il=ol[Nl];Q(Ce,Qe,Il.func,Il.options)}return}for(var lr=Sn(nl),El=0;El<ol.length;El++){var Wl=ol[El];if(Wl.func===Aa&&In(Wl.options,lr)){Ce.removeEventListener(Qe,Aa,I.supportsOptions?lr:lr.capture),ol.splice(El,1),ol.length===0&&(delete il.events[Qe],wl=!0);break}}}wl&&!Object.keys(il.events).length&&f.splice(el,1)}else for(Qe in il.events)il.events.hasOwnProperty(Qe)&&Q(Ce,Qe,"all")}}function be(Ce,Qe){for(var Aa=Sn(Qe),nl=new ai(Ce),el=b[Ce.type],il=se(Ce)[0],wl=il;g.element(wl);){for(var ol=0;ol<el.length;ol++){var Nl=el[ol],Il=Nl.selector,lr=Nl.context;if(ge(wl,Il)&&ue(lr,il)&&ue(lr,wl)){var El=Nl.listeners;nl.currentTarget=wl;for(var Wl=0;Wl<El.length;Wl++){var Hr=El[Wl];In(Hr.options,Aa)&&Hr.func(nl)}}}wl=Ve(wl)}}function Fe(Ce){return be(Ce,!0)}return(o=t.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return I.supportsOptions=!0},get passive(){return I.supportsPassive=!0}}),t.events=I,I}},en={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var o=0,f=en.methodOrder;o<f.length;o++){var b=f[o],w=en[b](t);if(w)return w}return null},simulationResume:function(t){var o=t.pointerType,f=t.eventType,b=t.eventTarget,w=t.scope;if(!/down|start/i.test(f))return null;for(var I=0,J=w.interactions.list;I<J.length;I++){var Q=J[I],be=b;if(Q.simulation&&Q.simulation.allowResume&&Q.pointerType===o)for(;be;){if(be===Q.element)return Q;be=Ve(be)}}return null},mouseOrPen:function(t){var o,f=t.pointerId,b=t.pointerType,w=t.eventType,I=t.scope;if(b!=="mouse"&&b!=="pen")return null;for(var J=0,Q=I.interactions.list;J<Q.length;J++){var be=Q[J];if(be.pointerType===b){if(be.simulation&&!On(be,f))continue;if(be.interacting())return be;o||(o=be)}}if(o)return o;for(var Fe=0,Ce=I.interactions.list;Fe<Ce.length;Fe++){var Qe=Ce[Fe];if(!(Qe.pointerType!==b||/down/i.test(w)&&Qe.simulation))return Qe}return null},hasPointer:function(t){for(var o=t.pointerId,f=0,b=t.scope.interactions.list;f<b.length;f++){var w=b[f];if(On(w,o))return w}return null},idle:function(t){for(var o=t.pointerType,f=0,b=t.scope.interactions.list;f<b.length;f++){var w=b[f];if(w.pointers.length===1){var I=w.interactable;if(I&&(!I.options.gesture||!I.options.gesture.enabled))continue}else if(w.pointers.length>=2)continue;if(!w.interacting()&&o===w.pointerType)return w}return null}};function On(t,o){return t.pointers.some(function(f){return f.id===o})}var En=en,Gr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Un(t,o){return function(f){var b=o.interactions.list,w=ia(f),I=se(f),J=I[0],Q=I[1],be=[];if(/^touch/.test(f.type)){o.prevTouchTime=o.now();for(var Fe=0,Ce=f.changedTouches;Fe<Ce.length;Fe++){var Qe=Ce[Fe],Aa={pointer:Qe,pointerId:ce(Qe),pointerType:w,eventType:f.type,eventTarget:J,curEventTarget:Q,scope:o},nl=bn(Aa);be.push([Aa.pointer,Aa.eventTarget,Aa.curEventTarget,nl])}}else{var el=!1;if(!ae.supportsPointerEvent&&/mouse/.test(f.type)){for(var il=0;il<b.length&&!el;il++)el=b[il].pointerType!=="mouse"&&b[il].pointerIsDown;el=el||o.now()-o.prevTouchTime<500||f.timeStamp===0}if(!el){var wl={pointer:f,pointerId:ce(f),pointerType:w,eventType:f.type,curEventTarget:Q,eventTarget:J,scope:o},ol=bn(wl);be.push([wl.pointer,wl.eventTarget,wl.curEventTarget,ol])}}for(var Nl=0;Nl<be.length;Nl++){var Il=be[Nl],lr=Il[0],El=Il[1],Wl=Il[2];Il[3][t](lr,f,El,Wl)}}}function bn(t){var o=t.pointerType,f=t.scope,b={interaction:En.search(t),searchDetails:t};return f.fire("interactions:find",b),b.interaction||f.interactions.new({pointerType:o})}function Ai(t,o){var f=t.doc,b=t.scope,w=t.options,I=b.interactions.docEvents,J=b.events,Q=J[o];for(var be in b.browser.isIOS&&!w.events&&(w.events={passive:!1}),J.delegatedEvents)Q(f,be,J.delegateListener),Q(f,be,J.delegateUseCapture,!0);for(var Fe=w&&w.events,Ce=0;Ce<I.length;Ce++){var Qe=I[Ce];Q(f,Qe.type,Qe.listener,Fe)}}var Vo={id:"core/interactions",install:function(t){for(var o={},f=0;f<Gr.length;f++){var b=Gr[f];o[b]=Un(b,t)}var w,I=ae.pEventTypes;function J(){for(var Q=0,be=t.interactions.list;Q<be.length;Q++){var Fe=be[Q];if(Fe.pointerIsDown&&Fe.pointerType==="touch"&&!Fe._interacting)for(var Ce=function(){var nl=Aa[Qe];t.documents.some(function(el){return ue(el.doc,nl.downTarget)})||Fe.removePointer(nl.pointer,nl.event)},Qe=0,Aa=Fe.pointers;Qe<Aa.length;Qe++)Ce()}}(w=Z.PointerEvent?[{type:I.down,listener:J},{type:I.down,listener:o.pointerDown},{type:I.move,listener:o.pointerMove},{type:I.up,listener:o.pointerUp},{type:I.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:J},{type:"touchstart",listener:o.pointerDown},{type:"touchmove",listener:o.pointerMove},{type:"touchend",listener:o.pointerUp},{type:"touchcancel",listener:o.pointerUp}]).push({type:"blur",listener:function(Q){for(var be=0,Fe=t.interactions.list;be<Fe.length;be++)Fe[be].documentBlur(Q)}}),t.prevTouchTime=0,t.Interaction=function(Q){y(Fe,Q);var be=R(Fe);function Fe(){return c(this,Fe),be.apply(this,arguments)}return p(Fe,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(Ce){t.interactions.pointerMoveTolerance=Ce}},{key:"_now",value:function(){return t.now()}}]),Fe}(nn),t.interactions={list:[],new:function(Q){Q.scopeFire=function(Fe,Ce){return t.fire(Fe,Ce)};var be=new t.Interaction(Q);return t.interactions.list.push(be),be},listeners:o,docEvents:w,pointerMoveTolerance:1},t.usePlugin(rr)},listeners:{"scope:add-document":function(t){return Ai(t,"add")},"scope:remove-document":function(t){return Ai(t,"remove")},"interactable:unset":function(t,o){for(var f=t.interactable,b=o.interactions.list.length-1;b>=0;b--){var w=o.interactions.list[b];w.interactable===f&&(w.stop(),o.fire("interactions:destroy",{interaction:w}),w.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(b,1))}}},onDocSignal:Ai,doOnInteractions:Un,methodNames:Gr},Fo=Vo,Cn=function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t}(Cn||{}),Po=function(){function t(o,f,b,w){c(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Mn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=f.actions,this.target=o,this._context=f.context||b,this._win=_(za(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=w,this.set(f)}return p(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,f){return g.func(f.onstart)&&this.on("".concat(o,"start"),f.onstart),g.func(f.onmove)&&this.on("".concat(o,"move"),f.onmove),g.func(f.onend)&&this.on("".concat(o,"end"),f.onend),g.func(f.oninertiastart)&&this.on("".concat(o,"inertiastart"),f.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,f,b){var w,I=this,J=(w=this._actions.map[o])==null?void 0:w.filterEventType,Q=function(be){return(J==null||J(be))&&$r(be,I._actions)};(g.array(f)||g.object(f))&&this._onOff(Cn.Off,o,f,void 0,Q),(g.array(b)||g.object(b))&&this._onOff(Cn.On,o,b,void 0,Q)}},{key:"setPerAction",value:function(o,f){var b=this._defaults;for(var w in f){var I=w,J=this.options[o],Q=f[I];I==="listeners"&&this.updatePerActionListeners(o,J.listeners,Q),g.array(Q)?J[I]=Be(Q):g.plainObject(Q)?(J[I]=le(J[I]||{},Tr(Q)),g.object(b.perAction[I])&&"enabled"in b.perAction[I]&&(J[I].enabled=Q.enabled!==!1)):g.bool(Q)&&g.object(b.perAction[I])?J[I].enabled=Q:J[I]=Q}}},{key:"getRect",value:function(o){return o=o||(g.element(this.target)?this.target:null),g.string(this.target)&&(o=o||this._context.querySelector(this.target)),Ke(o)}},{key:"rectChecker",value:function(o){var f=this;return g.func(o)?(this.getRect=function(b){var w=le({},o.apply(f,b));return"width"in w||(w.width=w.right-w.left,w.height=w.bottom-w.top),w},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,f){if(za(f)||g.object(f)){for(var b in this.options[o]=f,this._actions.map)this.options[b][o]=f;return this}return this.options[o]}},{key:"origin",value:function(o){return this._backCompatOption("origin",o)}},{key:"deltaSource",value:function(o){return o==="page"||o==="client"?(this.options.deltaSource=o,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var o=this.target;return g.string(o)?Array.from(this._context.querySelectorAll(o)):g.func(o)&&o.getAllElements?o.getAllElements():g.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||ue(this._context,o)}},{key:"testIgnoreAllow",value:function(o,f,b){return!this.testIgnore(o.ignoreFrom,f,b)&&this.testAllow(o.allowFrom,f,b)}},{key:"testAllow",value:function(o,f,b){return!o||!!g.element(b)&&(g.string(o)?ne(b,o,f):!!g.element(o)&&ue(o,b))}},{key:"testIgnore",value:function(o,f,b){return!(!o||!g.element(b))&&(g.string(o)?ne(b,o,f):!!g.element(o)&&ue(o,b))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,f,b,w,I){g.object(f)&&!g.array(f)&&(w=b,b=null);var J=He(f,b,I);for(var Q in J){Q==="wheel"&&(Q=ae.wheelEvent);for(var be=0,Fe=J[Q];be<Fe.length;be++){var Ce=Fe[be];$r(Q,this._actions)?this.events[o===Cn.On?"on":"off"](Q,Ce):g.string(this.target)?this._scopeEvents[o===Cn.On?"addDelegate":"removeDelegate"](this.target,this._context,Q,Ce,w):this._scopeEvents[o===Cn.On?"add":"remove"](this.target,Q,Ce,w)}}return this}},{key:"on",value:function(o,f,b){return this._onOff(Cn.On,o,f,b)}},{key:"off",value:function(o,f,b){return this._onOff(Cn.Off,o,f,b)}},{key:"set",value:function(o){var f=this._defaults;for(var b in g.object(o)||(o={}),this.options=Tr(f.base),this._actions.methodDict){var w=b,I=this._actions.methodDict[w];this.options[w]={},this.setPerAction(w,le(le({},f.perAction),f.actions[w])),this[I](o[w])}for(var J in o)J!=="getRect"?g.func(this[J])&&this[J](o[J]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var f=this._scopeEvents.delegatedEvents[o],b=f.length-1;b>=0;b--){var w=f[b],I=w.selector,J=w.context,Q=w.listeners;I===this.target&&J===this._context&&f.splice(b,1);for(var be=Q.length-1;be>=0;be--)this._scopeEvents.removeDelegate(this.target,this._context,o,Q[be][0],Q[be][1])}else this._scopeEvents.remove(this.target,"all")}}]),t}(),jo=function(){function t(o){var f=this;c(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(b){var w=b.interactable,I=w.target,J=g.string(I)?f.selectorMap[I]:I[f.scope.id],Q=ke(J,function(be){return be===w});J.splice(Q,1)}})}return p(t,[{key:"new",value:function(o,f){f=le(f||{},{actions:this.scope.actions});var b=new this.scope.Interactable(o,f,this.scope.document,this.scope.events);return this.scope.addDocument(b._doc),this.list.push(b),g.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(b)):(b.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(b)),this.scope.fire("interactable:new",{target:o,options:f,interactable:b,win:this.scope._win}),b}},{key:"getExisting",value:function(o,f){var b=f&&f.context||this.scope.document,w=g.string(o),I=w?this.selectorMap[o]:o[this.scope.id];if(I)return ra(I,function(J){return J._context===b&&(w||J.inContext(o))})}},{key:"forEachMatch",value:function(o,f){for(var b=0,w=this.list;b<w.length;b++){var I=w[b],J=void 0;if((g.string(I.target)?g.element(o)&&ge(o,I.target):o===I.target)&&I.inContext(o)&&(J=f(I)),J!==void 0)return J}}}]),t}(),Yi=function(){function t(){var o=this;c(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ae,this.defaults=Tr(xn),this.Eventable=Mn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(b){var w=function I(J,Q){var be=b.interactables.getExisting(J,Q);return be||((be=b.interactables.new(J,Q)).events.global=I.globalEvents),be};return w.getPointerAverage=qe,w.getTouchBBox=La,w.getTouchDistance=Ma,w.getTouchAngle=Je,w.getElementRect=Ke,w.getElementClientRect=we,w.matchesSelector=ge,w.closest=Se,w.globalEvents={},w.version="1.10.27",w.scope=b,w.use=function(I,J){return this.scope.usePlugin(I,J),this},w.isSet=function(I,J){return!!this.scope.interactables.get(I,J&&J.context)},w.on=ea(function(I,J,Q){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var be=0,Fe=I;be<Fe.length;be++){var Ce=Fe[be];this.on(Ce,J,Q)}return this}if(g.object(I)){for(var Qe in I)this.on(Qe,I[Qe],J);return this}return $r(I,this.scope.actions)?this.globalEvents[I]?this.globalEvents[I].push(J):this.globalEvents[I]=[J]:this.scope.events.add(this.scope.document,I,J,{options:Q}),this},"The interact.on() method is being deprecated"),w.off=ea(function(I,J,Q){if(g.string(I)&&I.search(" ")!==-1&&(I=I.trim().split(/ +/)),g.array(I)){for(var be=0,Fe=I;be<Fe.length;be++){var Ce=Fe[be];this.off(Ce,J,Q)}return this}if(g.object(I)){for(var Qe in I)this.off(Qe,I[Qe],J);return this}var Aa;return $r(I,this.scope.actions)?I in this.globalEvents&&(Aa=this.globalEvents[I].indexOf(J))!==-1&&this.globalEvents[I].splice(Aa,1):this.scope.events.remove(this.scope.document,I,J,Q),this},"The interact.off() method is being deprecated"),w.debug=function(){return this.scope},w.supportsTouch=function(){return ae.supportsTouch},w.supportsPointerEvent=function(){return ae.supportsPointerEvent},w.stop=function(){for(var I=0,J=this.scope.interactions.list;I<J.length;I++)J[I].stop();return this},w.pointerMoveTolerance=function(I){return g.number(I)?(this.scope.interactions.pointerMoveTolerance=I,this):this.scope.interactions.pointerMoveTolerance},w.addDocument=function(I,J){this.scope.addDocument(I,J)},w.removeDocument=function(I){this.scope.removeDocument(I)},w}(this),this.InteractEvent=Yr,this.Interactable=void 0,this.interactables=new jo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(b){return o.removeDocument(b.target)};var f=this;this.Interactable=function(b){y(I,b);var w=R(I);function I(){return c(this,I),w.apply(this,arguments)}return p(I,[{key:"_defaults",get:function(){return f.defaults}},{key:"set",value:function(J){return E(u(I.prototype),"set",this).call(this,J),f.fire("interactable:set",{options:J,interactable:this}),this}},{key:"unset",value:function(){E(u(I.prototype),"unset",this).call(this);var J=f.interactables.list.indexOf(this);J<0||(f.interactables.list.splice(J,1),f.fire("interactable:unset",{interactable:this}))}}]),I}(Po)}return p(t,[{key:"addListeners",value:function(o,f){this.listenerMaps.push({id:f,map:o})}},{key:"fire",value:function(o,f){for(var b=0,w=this.listenerMaps;b<w.length;b++){var I=w[b].map[o];if(I&&I(f,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(f,b){return f.isInitialized=!0,g.window(b)&&C(b),Z.init(b),ae.init(b),aa.init(b),f.window=b,f.document=b.document,f.usePlugin(Fo),f.usePlugin(Hn),f}(this,o)}},{key:"pluginIsInstalled",value:function(o){var f=o.id;return f?!!this._plugins.map[f]:this._plugins.list.indexOf(o)!==-1}},{key:"usePlugin",value:function(o,f){if(!this.isInitialized)return this;if(this.pluginIsInstalled(o))return this;if(o.id&&(this._plugins.map[o.id]=o),this._plugins.list.push(o),o.install&&o.install(this,f),o.listeners&&o.before){for(var b=0,w=this.listenerMaps.length,I=o.before.reduce(function(Q,be){return Q[be]=!0,Q[Ji(be)]=!0,Q},{});b<w;b++){var J=this.listenerMaps[b].id;if(J&&(I[J]||I[Ji(J)]))break}this.listenerMaps.splice(b,0,{id:o.id,map:o.listeners})}else o.listeners&&this.listenerMaps.push({id:o.id,map:o.listeners});return this}},{key:"addDocument",value:function(o,f){if(this.getDocIndex(o)!==-1)return!1;var b=_(o);f=f?le({},f):{},this.documents.push({doc:o,options:f}),this.events.documents.push(o),o!==this.document&&this.events.add(b,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:b,scope:this,options:f})}},{key:"removeDocument",value:function(o){var f=this.getDocIndex(o),b=_(o),w=this.documents[f].options;this.events.remove(b,"unload",this.onWindowUnload),this.documents.splice(f,1),this.events.documents.splice(f,1),this.fire("scope:remove-document",{doc:o,window:b,scope:this,options:w})}},{key:"getDocIndex",value:function(o){for(var f=0;f<this.documents.length;f++)if(this.documents[f].doc===o)return f;return-1}},{key:"getDocOptions",value:function(o){var f=this.getDocIndex(o);return f===-1?null:this.documents[f].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t}();function Ji(t){return t&&t.replace(/\/.*$/,"")}var Xi=new Yi,jr=Xi.interactStatic,Ho=typeof globalThis<"u"?globalThis:window;Xi.init(Ho);var zi=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(b){var w=b[0],I=b[1];return w in t||I in t}),f=function(b,w){for(var I=t.range,J=t.limits,Q=J===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:J,be=t.offset,Fe=be===void 0?{x:0,y:0}:be,Ce={range:I,grid:t,x:null,y:null},Qe=0;Qe<o.length;Qe++){var Aa=o[Qe],nl=Aa[0],el=Aa[1],il=Math.round((b-Fe.x)/t[nl]),wl=Math.round((w-Fe.y)/t[el]);Ce[nl]=Math.max(Q.left,Math.min(Q.right,il*t[nl]+Fe.x)),Ce[el]=Math.max(Q.top,Math.min(Q.bottom,wl*t[el]+Fe.y))}return Ce};return f.grid=t,f.coordFields=o,f}}),Uo={id:"snappers",install:function(t){var o=t.interactStatic;o.snappers=le(o.snappers||{},zi),o.createSnapGrid=o.snappers.grid}},Mi=Uo,Zi={start:function(t){var o=t.state,f=t.rect,b=t.edges,w=t.pageCoords,I=o.options,J=I.ratio,Q=I.enabled,be=o.options,Fe=be.equalDelta,Ce=be.modifiers;J==="preserve"&&(J=f.width/f.height),o.startCoords=le({},w),o.startRect=le({},f),o.ratio=J,o.equalDelta=Fe;var Qe=o.linkedEdges={top:b.top||b.left&&!b.bottom,left:b.left||b.top&&!b.right,bottom:b.bottom||b.right&&!b.top,right:b.right||b.bottom&&!b.left};if(o.xIsPrimaryAxis=!(!b.left&&!b.right),o.equalDelta){var Aa=(Qe.left?1:-1)*(Qe.top?1:-1);o.edgeSign={x:Aa,y:Aa}}else o.edgeSign={x:Qe.left?-1:1,y:Qe.top?-1:1};if(Q!==!1&&le(b,Qe),Ce!=null&&Ce.length){var nl=new Rr(t.interaction);nl.copyFrom(t.interaction.modification),nl.prepareStates(Ce),o.subModification=nl,nl.startAll(i({},t))}},set:function(t){var o=t.state,f=t.rect,b=t.coords,w=o.linkedEdges,I=le({},b),J=o.equalDelta?Qi:qo;if(le(t.edges,w),J(o,o.xIsPrimaryAxis,b,f),!o.subModification)return null;var Q=le({},f);oe(w,Q,{x:b.x-I.x,y:b.y-I.y});var be=o.subModification.setAll(i(i({},t),{},{rect:Q,edges:w,pageCoords:b,prevCoords:b,prevRect:Q})),Fe=be.delta;return be.changed&&(J(o,Math.abs(Fe.x)>Math.abs(Fe.y),be.coords,be.rect),le(b,be.coords)),be.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Qi(t,o,f){var b=t.startCoords,w=t.edgeSign;o?f.y=b.y+(f.x-b.x)*w.y:f.x=b.x+(f.y-b.y)*w.x}function qo(t,o,f,b){var w=t.startRect,I=t.startCoords,J=t.ratio,Q=t.edgeSign;if(o){var be=b.width/J;f.y=I.y+(be-w.height)*Q.y}else{var Fe=b.height*J;f.x=I.x+(Fe-w.width)*Q.x}}var Wo=yr(Zi,"aspectRatio"),eo=function(){};eo._defaults={};var Dn=eo;function Nn(t,o,f){return g.func(t)?Me(t,o.interactable,o.element,[f.x,f.y,o]):Me(t,o.interactable,o.element)}var qn={start:function(t){var o=t.rect,f=t.startOffset,b=t.state,w=t.interaction,I=t.pageCoords,J=b.options,Q=J.elementRect,be=le({left:0,top:0,right:0,bottom:0},J.offset||{});if(o&&Q){var Fe=Nn(J.restriction,w,I);if(Fe){var Ce=Fe.right-Fe.left-o.width,Qe=Fe.bottom-Fe.top-o.height;Ce<0&&(be.left+=Ce,be.right+=Ce),Qe<0&&(be.top+=Qe,be.bottom+=Qe)}be.left+=f.left-o.width*Q.left,be.top+=f.top-o.height*Q.top,be.right+=f.right-o.width*(1-Q.right),be.bottom+=f.bottom-o.height*(1-Q.bottom)}b.offset=be},set:function(t){var o=t.coords,f=t.interaction,b=t.state,w=b.options,I=b.offset,J=Nn(w.restriction,f,o);if(J){var Q=function(be){return!be||"left"in be&&"top"in be||((be=le({},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}(J);o.x=Math.max(Math.min(Q.right-I.right,o.x),Q.left+I.left),o.y=Math.max(Math.min(Q.bottom-I.bottom,o.y),Q.top+I.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Ko=yr(qn,"restrict"),ao={top:1/0,left:1/0,bottom:-1/0,right:-1/0},lo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function ro(t,o){for(var f=0,b=["top","left","bottom","right"];f<b.length;f++){var w=b[f];w in t||(t[w]=o[w])}return t}var Wn={noInner:ao,noOuter:lo,start:function(t){var o,f=t.interaction,b=t.startOffset,w=t.state,I=w.options;I&&(o=Ue(Nn(I.offset,f,f.coords.start.page))),o=o||{x:0,y:0},w.offset={top:o.y+b.top,left:o.x+b.left,bottom:o.y-b.bottom,right:o.x-b.right}},set:function(t){var o=t.coords,f=t.edges,b=t.interaction,w=t.state,I=w.offset,J=w.options;if(f){var Q=le({},o),be=Nn(J.inner,b,Q)||{},Fe=Nn(J.outer,b,Q)||{};ro(be,ao),ro(Fe,lo),f.top?o.y=Math.min(Math.max(Fe.top+I.top,Q.y),be.top+I.top):f.bottom&&(o.y=Math.max(Math.min(Fe.bottom+I.bottom,Q.y),be.bottom+I.bottom)),f.left?o.x=Math.min(Math.max(Fe.left+I.left,Q.x),be.left+I.left):f.right&&(o.x=Math.max(Math.min(Fe.right+I.right,Q.x),be.right+I.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},li=yr(Wn,"restrictEdges"),no=le({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},qn.defaults),io=yr({start:qn.start,set:qn.set,defaults:no},"restrictRect"),ri={width:-1/0,height:-1/0},Go={width:1/0,height:1/0},oo=yr({start:function(t){return Wn.start(t)},set:function(t){var o=t.interaction,f=t.state,b=t.rect,w=t.edges,I=f.options;if(w){var J=Re(Nn(I.min,o,t.coords))||ri,Q=Re(Nn(I.max,o,t.coords))||Go;f.options={endOnly:I.endOnly,inner:le({},Wn.noInner),outer:le({},Wn.noOuter)},w.top?(f.options.inner.top=b.bottom-J.height,f.options.outer.top=b.bottom-Q.height):w.bottom&&(f.options.inner.bottom=b.top+J.height,f.options.outer.bottom=b.top+Q.height),w.left?(f.options.inner.left=b.right-J.width,f.options.outer.left=b.right-Q.width):w.right&&(f.options.inner.right=b.left+J.width,f.options.outer.right=b.left+Q.width),Wn.set(t),f.options=I}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ln={start:function(t){var o,f=t.interaction,b=t.interactable,w=t.element,I=t.rect,J=t.state,Q=t.startOffset,be=J.options,Fe=be.offsetWithOrigin?function(Aa){var nl=Aa.interaction.element,el=Ue(Me(Aa.state.options.origin,null,null,[nl])),il=el||Ie(Aa.interactable,nl,Aa.interaction.prepared.name);return il}(t):{x:0,y:0};if(be.offset==="startCoords")o={x:f.coords.start.page.x,y:f.coords.start.page.y};else{var Ce=Me(be.offset,b,w,[f]);(o=Ue(Ce)||{x:0,y:0}).x+=Fe.x,o.y+=Fe.y}var Qe=be.relativePoints;J.offsets=I&&Qe&&Qe.length?Qe.map(function(Aa,nl){return{index:nl,relativePoint:Aa,x:Q.left-I.width*Aa.x+o.x,y:Q.top-I.height*Aa.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(t){var o=t.interaction,f=t.coords,b=t.state,w=b.options,I=b.offsets,J=Ie(o.interactable,o.element,o.prepared.name),Q=le({},f),be=[];w.offsetWithOrigin||(Q.x-=J.x,Q.y-=J.y);for(var Fe=0,Ce=I;Fe<Ce.length;Fe++)for(var Qe=Ce[Fe],Aa=Q.x-Qe.x,nl=Q.y-Qe.y,el=0,il=w.targets.length;el<il;el++){var wl=w.targets[el],ol=void 0;(ol=g.func(wl)?wl(Aa,nl,o._proxy,Qe,el):wl)&&be.push({x:(g.number(ol.x)?ol.x:Aa)+Qe.x,y:(g.number(ol.y)?ol.y:nl)+Qe.y,range:g.number(ol.range)?ol.range:w.range,source:wl,index:el,offset:Qe})}for(var Nl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Il=0;Il<be.length;Il++){var lr=be[Il],El=lr.range,Wl=lr.x-Q.x,Hr=lr.y-Q.y,Er=Oa(Wl,Hr),Jr=Er<=El;El===1/0&&Nl.inRange&&Nl.range!==1/0&&(Jr=!1),Nl.target&&!(Jr?Nl.inRange&&El!==1/0?Er/El<Nl.distance/Nl.range:El===1/0&&Nl.range!==1/0||Er<Nl.distance:!Nl.inRange&&Er<Nl.distance)||(Nl.target=lr,Nl.distance=Er,Nl.range=El,Nl.inRange=Jr,Nl.delta.x=Wl,Nl.delta.y=Hr)}return Nl.inRange&&(f.x=Nl.target.x,f.y=Nl.target.y),b.closest=Nl,Nl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Yo=yr(Ln,"snap"),pi={start:function(t){var o=t.state,f=t.edges,b=o.options;if(!f)return null;t.state={options:{targets:null,relativePoints:[{x:f.left?0:1,y:f.top?0:1}],offset:b.offset||"self",origin:{x:0,y:0},range:b.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],Ln.start(t),o.offsets=t.state.offsets,t.state=o},set:function(t){var o=t.interaction,f=t.state,b=t.coords,w=f.options,I=f.offsets,J={x:b.x-I[0].x,y:b.y-I[0].y};f.options=le({},w),f.options.targets=[];for(var Q=0,be=w.targets||[];Q<be.length;Q++){var Fe=be[Q],Ce=void 0;if(Ce=g.func(Fe)?Fe(J.x,J.y,o):Fe){for(var Qe=0,Aa=f.targetFields;Qe<Aa.length;Qe++){var nl=Aa[Qe],el=nl[0],il=nl[1];if(el in Ce||il in Ce){Ce.x=Ce[el],Ce.y=Ce[il];break}}f.options.targets.push(Ce)}}var wl=Ln.set(t);return f.options=w,wl},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Jo=yr(pi,"snapSize"),Ii={aspectRatio:Wo,restrictEdges:li,restrict:Ko,restrictRect:io,restrictSize:oo,snapEdges:yr({start:function(t){var o=t.edges;return o?(t.state.targetFields=t.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],pi.start(t)):null},set:pi.set,defaults:le(Tr(pi.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Yo,snapSize:Jo,spring:Dn,avoid:Dn,transform:Dn,rubberband:Dn},Xo={id:"modifiers",install:function(t){var o=t.interactStatic;for(var f in t.usePlugin(ir),t.usePlugin(Mi),o.modifiers=Ii,Ii){var b=Ii[f],w=b._defaults,I=b._methods;w._methods=I,t.defaults.perAction[f]=w}}},Zo=Xo,to=function(t){y(f,t);var o=R(f);function f(b,w,I,J,Q,be){var Fe;if(c(this,f),H(D(Fe=o.call(this,Q)),I),I!==w&&H(D(Fe),w),Fe.timeStamp=be,Fe.originalEvent=I,Fe.type=b,Fe.pointerId=ce(w),Fe.pointerType=ia(w),Fe.target=J,Fe.currentTarget=null,b==="tap"){var Ce=Q.getPointerIndex(w);Fe.dt=Fe.timeStamp-Q.pointers[Ce].downTime;var Qe=Fe.timeStamp-Q.tapTime;Fe.double=!!Q.prevTap&&Q.prevTap.type!=="doubletap"&&Q.prevTap.target===Fe.target&&Qe<500}else b==="doubletap"&&(Fe.dt=w.timeStamp-Q.tapTime,Fe.double=!0);return Fe}return p(f,[{key:"_subtractOrigin",value:function(b){var w=b.x,I=b.y;return this.pageX-=w,this.pageY-=I,this.clientX-=w,this.clientY-=I,this}},{key:"_addOrigin",value:function(b){var w=b.x,I=b.y;return this.pageX+=w,this.pageY+=I,this.clientX+=w,this.clientY+=I,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),f}(U),Kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=Kn,t.defaults.actions.pointerEvents=Kn.defaults,le(t.actions.phaselessTypes,Kn.types)},listeners:{"interactions:new":function(t){var o=t.interaction;o.prevTap=null,o.tapTime=0},"interactions:update-pointer":function(t){var o=t.down,f=t.pointerInfo;!o&&f.hold||(f.hold={duration:1/0,timeout:null})},"interactions:move":function(t,o){var f=t.interaction,b=t.pointer,w=t.event,I=t.eventTarget;t.duplicate||f.pointerIsDown&&!f.pointerWasMoved||(f.pointerIsDown&&Oi(t),Tn({interaction:f,pointer:b,event:w,eventTarget:I,type:"move"},o))},"interactions:down":function(t,o){(function(f,b){for(var w=f.interaction,I=f.pointer,J=f.event,Q=f.eventTarget,be=f.pointerIndex,Fe=w.pointers[be].hold,Ce=ua(Q),Qe={interaction:w,pointer:I,event:J,eventTarget:Q,type:"hold",targets:[],path:Ce,node:null},Aa=0;Aa<Ce.length;Aa++){var nl=Ce[Aa];Qe.node=nl,b.fire("pointerEvents:collect-targets",Qe)}if(Qe.targets.length){for(var el=1/0,il=0,wl=Qe.targets;il<wl.length;il++){var ol=wl[il].eventable.options.holdDuration;ol<el&&(el=ol)}Fe.duration=el,Fe.timeout=setTimeout(function(){Tn({interaction:w,eventTarget:Q,pointer:I,event:J,type:"hold"},b)},el)}})(t,o),Tn(t,o)},"interactions:up":function(t,o){Oi(t),Tn(t,o),function(f,b){var w=f.interaction,I=f.pointer,J=f.event,Q=f.eventTarget;w.pointerWasMoved||Tn({interaction:w,eventTarget:Q,pointer:I,event:J,type:"tap"},b)}(t,o)},"interactions:cancel":function(t,o){Oi(t),Tn(t,o)}},PointerEvent:to,fire:Tn,collectEventTargets:so,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Tn(t,o){var f=t.interaction,b=t.pointer,w=t.event,I=t.eventTarget,J=t.type,Q=t.targets,be=Q===void 0?so(t,o):Q,Fe=new to(J,b,w,I,f,o.now());o.fire("pointerEvents:new",{pointerEvent:Fe});for(var Ce={interaction:f,pointer:b,event:w,eventTarget:I,targets:be,type:J,pointerEvent:Fe},Qe=0;Qe<be.length;Qe++){var Aa=be[Qe];for(var nl in Aa.props||{})Fe[nl]=Aa.props[nl];var el=Ie(Aa.eventable,Aa.node);if(Fe._subtractOrigin(el),Fe.eventable=Aa.eventable,Fe.currentTarget=Aa.node,Aa.eventable.fire(Fe),Fe._addOrigin(el),Fe.immediatePropagationStopped||Fe.propagationStopped&&Qe+1<be.length&&be[Qe+1].node!==Fe.currentTarget)break}if(o.fire("pointerEvents:fired",Ce),J==="tap"){var il=Fe.double?Tn({interaction:f,pointer:b,event:w,eventTarget:I,type:"doubletap"},o):Fe;f.prevTap=il,f.tapTime=il.timeStamp}return Fe}function so(t,o){var f=t.interaction,b=t.pointer,w=t.event,I=t.eventTarget,J=t.type,Q=f.getPointerIndex(b),be=f.pointers[Q];if(J==="tap"&&(f.pointerWasMoved||!be||be.downTarget!==I))return[];for(var Fe=ua(I),Ce={interaction:f,pointer:b,event:w,eventTarget:I,type:J,path:Fe,targets:[],node:null},Qe=0;Qe<Fe.length;Qe++){var Aa=Fe[Qe];Ce.node=Aa,o.fire("pointerEvents:collect-targets",Ce)}return J==="hold"&&(Ce.targets=Ce.targets.filter(function(nl){var el,il;return nl.eventable.options.holdDuration===((el=f.pointers[Q])==null||(il=el.hold)==null?void 0:il.duration)})),Ce.targets}function Oi(t){var o=t.interaction,f=t.pointerIndex,b=o.pointers[f].hold;b&&b.timeout&&(clearTimeout(b.timeout),b.timeout=null)}var Qo=Object.freeze({__proto__:null,default:Kn});function fi(t){var o=t.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var et={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(Kn);var o=t.pointerEvents;o.defaults.holdRepeatInterval=0,o.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(t,o){return t["pointerEvents:".concat(o)]=fi,t},{"pointerEvents:new":function(t){var o=t.pointerEvent;o.type==="hold"&&(o.count=(o.count||0)+1)},"pointerEvents:fired":function(t,o){var f=t.interaction,b=t.pointerEvent,w=t.eventTarget,I=t.targets;if(b.type==="hold"&&I.length){var J=I[0].eventable.options.holdRepeatInterval;J<=0||(f.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:f,eventTarget:w,type:"hold",pointer:b,event:b},o)},J))}}})},at=et,lt={id:"pointer-events/interactableTargets",install:function(t){var o=t.Interactable;o.prototype.pointerEvents=function(b){return le(this.events.options,b),this};var f=o.prototype._backCompatOption;o.prototype._backCompatOption=function(b,w){var I=f.call(this,b,w);return I===this&&(this.events.options[b]=w),I}},listeners:{"pointerEvents:collect-targets":function(t,o){var f=t.targets,b=t.node,w=t.type,I=t.eventTarget;o.interactables.forEachMatch(b,function(J){var Q=J.events,be=Q.options;Q.types[w]&&Q.types[w].length&&J.testIgnoreAllow(be,b,I)&&f.push({node:b,eventable:Q,props:{interactable:J}})})},"interactable:new":function(t){var o=t.interactable;o.events.getRect=function(f){return o.getRect(f)}},"interactable:set":function(t,o){var f=t.interactable,b=t.options;le(f.events.options,o.pointerEvents.defaults),le(f.events.options,b.pointerEvents||{})}}},rt=lt,co={id:"pointer-events",install:function(t){t.usePlugin(Qo),t.usePlugin(at),t.usePlugin(rt)}},hi=co,nt={id:"reflow",install:function(t){var o=t.Interactable;t.actions.phases.reflow=!0,o.prototype.reflow=function(f){return function(b,w,I){for(var J=b.getAllElements(),Q=I.window.Promise,be=Q?[]:null,Fe=function(){var Qe=J[Ce],Aa=b.getRect(Qe);if(!Aa)return 1;var nl,el=ra(I.interactions.list,function(ol){return ol.interacting()&&ol.interactable===b&&ol.element===Qe&&ol.prepared.name===w.name});if(el)el.move(),be&&(nl=el._reflowPromise||new Q(function(ol){el._reflowResolve=ol}));else{var il=Re(Aa),wl=function(ol){return{coords:ol,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:il.x,y:il.y},client:{x:il.x,y:il.y},timeStamp:I.now()});nl=function(ol,Nl,Il,lr,El){var Wl=ol.interactions.new({pointerType:"reflow"}),Hr={interaction:Wl,event:El,pointer:El,eventTarget:Il,phase:"reflow"};Wl.interactable=Nl,Wl.element=Il,Wl.prevEvent=El,Wl.updatePointer(El,El,Il,!0),fe(Wl.coords.delta),pa(Wl.prepared,lr),Wl._doPhase(Hr);var Er=ol.window,Jr=Er.Promise,tn=Jr?new Jr(function(hn){Wl._reflowResolve=hn}):void 0;return Wl._reflowPromise=tn,Wl.start(lr,Nl,Il),Wl._interacting?(Wl.move(Hr),Wl.end(El)):(Wl.stop(),Wl._reflowResolve()),Wl.removePointer(El,El),tn}(I,b,Qe,w,wl)}be&&be.push(nl)},Ce=0;Ce<J.length&&!Fe();Ce++);return be&&Q.all(be).then(function(){return b})}(this,f,t)}},listeners:{"interactions:stop":function(t,o){var f=t.interaction;f.pointerType==="reflow"&&(f._reflowResolve&&f._reflowResolve(),function(b,w){b.splice(b.indexOf(w),1)}(o.interactions.list,f))}}},it=nt;if(jr.use(rr),jr.use(gr),jr.use(hi),jr.use(on),jr.use(Zo),jr.use(fr),jr.use(Xa),jr.use(re),jr.use(it),jr.default=jr,s(l)==="object"&&l)try{l.exports=jr}catch{}return jr.default=jr,jr})}(Fi,Fi.exports)),Fi.exports}var v1=h1();const Ms=Pn.getDefaultExportFromCjs(v1),Lo=a.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(l,{expose:r,emit:n}){const i=l,s=n,c=a.inject(Hc),m=a.inject(Uc);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const p=a.shallowRef(null),h=a.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 y=!1,u=!1,x=NaN,D=NaN,R=NaN,E=NaN,K=-1,M=-1,L=-1,j=-1,C=i.x,_=i.y,S=i.w,k=i.h;const g=a.ref(),P=a.reactive({i:a.toRef(i,"i"),state:h,wrapper:g,calcXY:Me});function $(me){He(me)}function Y(){Ba()}function pe(me){un(i.isDraggable)&&(h.draggable=me)}function ze(me){un(i.isResizable)&&(h.resizable=me)}function de(me){un(i.isBounded)&&(h.bounded=me)}function Z(me){h.transformScale=me}function he(me){h.rowHeight=me}function ae(me){h.maxRows=me}function ue(){h.rtl=As()==="rtl",Ba()}function Se(me){h.cols=Math.floor(me)}c.increaseItem(P),a.onBeforeMount(()=>{h.rtl=As()==="rtl"}),a.onMounted(()=>{c.responsive&&c.lastBreakpoint?h.cols=Yc(c.lastBreakpoint,c.cols):h.cols=c.colNum,h.rowHeight=c.rowHeight,h.containerWidth=c.width!==null?c.width:100,h.margin=c.margin!==void 0?c.margin.map(Number):[10,10],h.maxRows=c.maxRows,un(i.isDraggable)?h.draggable=c.isDraggable:h.draggable=i.isDraggable,un(i.isResizable)?h.resizable=c.isResizable:h.resizable=i.isResizable,un(i.isBounded)?h.bounded=c.isBounded:h.bounded=i.isBounded,h.transformScale=c.transformScale,h.useCssTransforms=c.useCssTransforms,h.useStyleCursor=c.useStyleCursor,a.watchEffect(()=>{C=i.x,_=i.y,k=i.h,S=i.w,Xr(Ke)}),m.on("updateWidth",$),m.on("compact",Y),m.on("setDraggable",pe),m.on("setResizable",ze),m.on("setBounded",de),m.on("setTransformScale",Z),m.on("setRowHeight",he),m.on("setMaxRows",ae),m.on("directionchange",ue),m.on("setColNum",Se)}),a.onBeforeUnmount(()=>{m.off("updateWidth",$),m.off("compact",Y),m.off("setDraggable",pe),m.off("setResizable",ze),m.off("setBounded",de),m.off("setTransformScale",Z),m.off("setRowHeight",he),m.off("setMaxRows",ae),m.off("directionchange",ue),m.off("setColNum",Se),p.value&&(p.value.unset(),p.value=null),c.decreaseItem(P)}),r({state:h,wrapper:g});const Ve=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,ge=a.computed(()=>h.resizable&&!i.static),T=a.computed(()=>c.isMirrored?!h.rtl:h.rtl),q=a.computed(()=>(h.draggable||h.resizable)&&!i.static),ne=i1("item"),Ne=a.computed(()=>({[ne.b()]:!0,[ne.bm("resizable")]:ge.value,[ne.bm("static")]:i.static,[ne.bm("resizing")]:h.isResizing,[ne.bm("dragging")]:h.isDragging,[ne.bm("transform")]:h.useCssTransforms,[ne.bm("rtl")]:T.value,[ne.bm("no-touch")]:Ve&&q.value})),we=a.computed(()=>[ne.be("resizer"),T.value&&ne.bem("resizer","rtl")].filter(Boolean));a.watch(()=>i.isDraggable,me=>{h.draggable=me}),a.watch(()=>i.static,()=>{Xr(H),Xr(fe)}),a.watch(()=>h.draggable,()=>{Xr(H)}),a.watch(()=>i.isResizable,me=>{h.resizable=me}),a.watch(()=>i.isBounded,me=>{h.bounded=me}),a.watch(()=>h.resizable,()=>{Xr(fe)}),a.watch(()=>h.rowHeight,()=>{Xr(Ke),Xr(ua)}),a.watch([()=>h.cols,()=>h.containerWidth],()=>{Xr(fe),Xr(Ke),Xr(ua)}),a.watch([()=>i.minH,()=>i.maxH,()=>i.minW,()=>i.maxW],()=>{Xr(fe)}),a.watch(T,()=>{Xr(fe),Xr(Ke)}),a.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const me=c.margin;!me||me[0]===h.margin[0]&&me[1]===h.margin[1]||(h.margin=me.map(Number),Xr(Ke),Xr(ua))});function Ke(){i.x+i.w>h.cols?(C=0,S=i.w>h.cols?h.cols:i.w):(C=i.x,S=i.w);const me=Te(C,_,S,k);h.isDragging&&(me.top=h.dragging.top,T.value?me.right=h.dragging.left:me.left=h.dragging.left),h.isResizing&&(me.width=h.resizing.width,me.height=h.resizing.height);let fa;h.useCssTransforms?T.value?fa=a1(me.top,me.right,me.width,me.height):fa=e1(me.top,me.left,me.width,me.height):T.value?fa=r1(me.top,me.right,me.width,me.height):fa=l1(me.top,me.left,me.width,me.height),h.style=fa}function ua(){const me={};for(const fa of["width","height"]){const Xe=h.style[fa].match(/^(\d+)px$/);if(!Xe)return;me[fa]=Xe[1]}s("container-resized",i.i,i.h,i.w,me.height,me.width)}function za(me){if(i.static)return;const fa=me.type;if(fa==="resizestart"&&h.isResizing||fa!=="resizestart"&&!h.isResizing)return;const Xe=Ts(me);if(un(Xe))return;const{x:ce,y:_e}=Xe,va={width:0,height:0};let qe;switch(fa){case"resizestart":{fe(),K=S,M=k,qe=Te(C,_,S,k),va.width=qe.width,va.height=qe.height,h.resizing=va,h.isResizing=!0;break}case"resizemove":{!me.edges.right&&!me.edges.left&&(R=ce),!me.edges.top&&!me.edges.bottom&&(E=_e);const La=Bs(R,E,ce,_e);T.value?va.width=h.resizing.width-La.deltaX/h.transformScale:va.width=h.resizing.width+La.deltaX/h.transformScale,va.height=h.resizing.height+La.deltaY/h.transformScale,h.resizing=va;break}case"resizeend":{qe=Te(C,_,S,k),va.width=qe.width,va.height=qe.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}qe=Ie(va.height,va.width),qe.w<i.minW&&(qe.w=i.minW),qe.w>i.maxW&&(qe.w=i.maxW),qe.h<i.minH&&(qe.h=i.minH),qe.h>i.maxH&&(qe.h=i.maxH),qe.h<1&&(qe.h=1),qe.w<1&&(qe.w=1),R=ce,E=_e,(S!==qe.w||k!==qe.h)&&s("resize",i.i,qe.h,qe.w,va.height,va.width),me.type==="resizeend"&&(K!==S||M!==k)&&s("resized",i.i,qe.h,qe.w,va.height,va.width),m.emit("resizeEvent",me.type,i.i,C,_,qe.h,qe.w)}function le(me){if(i.static||h.isResizing)return;const fa=me.type;if(fa==="dragstart"&&h.isDragging||fa!=="dragstart"&&!h.isDragging)return;const Xe=Ts(me);if(un(Xe))return;const{x:ce,y:_e}=Xe,va=me.target;if(!va.offsetParent)return;const qe={top:0,left:0};switch(fa){case"dragstart":{L=C,j=_;const Ma=va.offsetParent.getBoundingClientRect(),Je=va.getBoundingClientRect(),ia=Je.left/h.transformScale,se=Ma.left/h.transformScale,U=Je.right/h.transformScale,W=Ma.right/h.transformScale,Be=Je.top/h.transformScale,ke=Ma.top/h.transformScale;T.value?qe.left=(U-W)*-1:qe.left=ia-se,qe.top=Be-ke,h.dragging=qe,h.isDragging=!0;break}case"dragmove":{const Ma=Bs(x,D,ce,_e);if(T.value?qe.left=h.dragging.left-Ma.deltaX/h.transformScale:qe.left=h.dragging.left+Ma.deltaX/h.transformScale,qe.top=h.dragging.top+Ma.deltaY/h.transformScale,h.bounded){const Je=va.offsetParent.clientHeight-Re(i.h,h.rowHeight,h.margin[1]);qe.top=oe(qe.top,0,Je);const ia=Ue(),se=h.containerWidth-Re(i.w,ia,h.margin[0]);qe.left=oe(qe.left,0,se)}h.dragging=qe;break}case"dragend":{const Ma=va.offsetParent.getBoundingClientRect(),Je=va.getBoundingClientRect(),ia=Je.left/h.transformScale,se=Ma.left/h.transformScale,U=Je.right/h.transformScale,W=Ma.right/h.transformScale,Be=Je.top/h.transformScale,ke=Ma.top/h.transformScale;T.value?qe.left=(U-W)*-1:qe.left=ia-se,qe.top=Be-ke,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let La;T.value,La=Me(qe.top,qe.left),x=ce,D=_e,(C!==La.x||_!==La.y)&&s("move",i.i,La.x,La.y),me.type==="dragend"&&(L!==C||j!==_)&&s("moved",i.i,La.x,La.y),m.emit("dragEvent",me.type,i.i,La.x,La.y,k,S)}function Te(me,fa,Xe,ce){const _e=Ue();let va;return T.value?va={right:Math.round(_e*me+(me+1)*h.margin[0]),top:Math.round(h.rowHeight*fa+(fa+1)*h.margin[1]),width:Xe===1/0?Xe:Math.round(_e*Xe+Math.max(0,Xe-1)*h.margin[0]),height:ce===1/0?ce:Math.round(h.rowHeight*ce+Math.max(0,ce-1)*h.margin[1])}:va={left:Math.round(_e*me+(me+1)*h.margin[0]),top:Math.round(h.rowHeight*fa+(fa+1)*h.margin[1]),width:Xe===1/0?Xe:Math.round(_e*Xe+Math.max(0,Xe-1)*h.margin[0]),height:ce===1/0?ce:Math.round(h.rowHeight*ce+Math.max(0,ce-1)*h.margin[1])},va}function Me(me,fa){const Xe=Ue();let ce=Math.round((fa-h.margin[0])/(Xe+h.margin[0])),_e=Math.round((me-h.margin[1])/(h.rowHeight+h.margin[1]));return ce=Math.max(Math.min(ce,h.cols-S),0),_e=Math.max(Math.min(_e,h.maxRows-k),0),{x:ce,y:_e}}function Ue(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function Re(me,fa,Xe){return Number.isFinite(me)?Math.round(fa*me+Math.max(0,me-1)*Xe):me}function oe(me,fa,Xe){return Math.max(Math.min(me,Xe),fa)}function Ie(me,fa,Xe=!1){const ce=Ue();let _e=Math.round((fa+h.margin[0])/(ce+h.margin[0])),va=0;return Xe?va=Math.ceil((me+h.margin[1])/(h.rowHeight+h.margin[1])):va=Math.round((me+h.margin[1])/(h.rowHeight+h.margin[1])),_e=Math.max(Math.min(_e,h.cols-C),0),va=Math.max(Math.min(va,h.maxRows-_),0),{w:_e,h:va}}function He(me,fa){h.containerWidth=me}function Ba(){Ke()}function Oa(){!p.value&&g.value&&(p.value=Ms(g.value),h.useStyleCursor||p.value.styleCursor(!1))}const V=Cs(le);function H(){if(Oa(),!!p.value)if(h.draggable&&!i.static){const me={ignoreFrom:i.dragIgnoreFrom,allowFrom:i.dragAllowFrom,...i.dragOption};p.value.draggable(me),y||(y=!0,p.value.on("dragstart dragmove dragend",fa=>{fa.type==="dragmove"?V(fa):le(fa)}))}else p.value.draggable({enabled:!1})}const ee=Cs(za);function fe(){if(Oa(),!!p.value)if(h.resizable&&!i.static){const me=Te(0,0,i.maxW,i.maxH),fa=Te(0,0,i.minW,i.minH),Xe={edges:{left:T.value?`.${we.value[0]}`:!1,right:T.value?!1:`.${we.value[0]}`,bottom:`.${we.value[0]}`,top:!1},ignoreFrom:i.resizeIgnoreFrom,restrictSize:{min:{height:fa.height*h.transformScale,width:fa.width*h.transformScale},max:{height:me.height*h.transformScale,width:me.width*h.transformScale}},...i.resizeOption};i.preserveAspectRatio&&(Xe.modifiers=[Ms.modifiers.aspectRatio({ratio:"preserve"})]),p.value.resizable(Xe),u||(u=!0,p.value.on("resizestart resizemove resizeend",ce=>{ce.type==="resizemove"?ee(ce):za(ce)}))}else p.value.resizable({enabled:!1})}return(me,fa)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:g,class:a.normalizeClass(Ne.value),style:a.normalizeStyle(h.style)},[a.renderSlot(me.$slots,"default"),ge.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(we.value)},null,2)):a.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(l){return l!=null}function Ls(){}const m1=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(m1)));const y1=di&&("ontouchstart"in window||b1()>0),g1=y1?"pointerdown":"click";function b1(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function k1(l,r,n=window.Event){const{type:i,bubbles:s=!1,cancelable:c=!1,...m}=r;if(!Os(i)||i==="")return!1;let p;return Os(n)?p=new n(i,{bubbles:s,cancelable:c}):(p=document.createEvent("HTMLEvents"),p.initEvent(i,s,c)),Object.assign(p,m),l.dispatchEvent(p)}const x1="clickoutside",w1=new Set;di&&document.addEventListener(g1,l=>{const r=l.target,n=l.composedPath&&l.composedPath();w1.forEach(i=>{i!==r&&(n?!n.includes(i):!i.contains(r))&&(!i.__transferElement||i.__transferElement!==r&&!i.__transferElement.contains(r))&&k1(i,{type:x1})})},!0);const _1=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let So;if(di){for(const l of _1)if(l[1]in document){So=l;break}}a.computed(()=>!1);const S1=new Set,E1=new WeakMap;if(di&&So){const l=So[2],r=So[4];document.addEventListener(r,()=>{if(S1.forEach(n=>{n.value=!1}),document[l]){const n=E1.get(document[l]);n&&(n.value=!0)}},!1)}const Xc=new Map;Xc.set("x",0);Xc.set("y",0);var ci=[],C1=function(){return ci.some(function(l){return l.activeTargets.length>0})},D1=function(){return ci.some(function(l){return l.skippedTargets.length>0})},$s="ResizeObserver loop completed with undelivered notifications.",N1=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:$s}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=$s),window.dispatchEvent(l)},Gi;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Gi||(Gi={}));var ui=function(l){return Object.freeze(l)},T1=function(){function l(r,n){this.inlineSize=r,this.blockSize=n,ui(this)}return l}(),Zc=function(){function l(r,n,i,s){return this.x=r,this.y=n,this.width=i,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ui(this)}return l.prototype.toJSON=function(){var r=this,n=r.x,i=r.y,s=r.top,c=r.right,m=r.bottom,p=r.left,h=r.width,y=r.height;return{x:n,y:i,top:s,right:c,bottom:m,left:p,width:h,height:y}},l.fromRect=function(r){return new l(r.x,r.y,r.width,r.height)},l}(),zt=function(l){return l instanceof SVGElement&&"getBBox"in l},Qc=function(l){if(zt(l)){var r=l.getBBox(),n=r.width,i=r.height;return!n&&!i}var s=l,c=s.offsetWidth,m=s.offsetHeight;return!(c||m||l.getClientRects().length)},Rs=function(l){var r;if(l instanceof Element)return!0;var n=(r=l==null?void 0:l.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(n&&l instanceof n.Element)},B1=function(l){switch(l.tagName){case"INPUT":if(l.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},qi=typeof window<"u"?window:{},ko=new WeakMap,Vs=/auto|scroll/,A1=/^tb|vertical/,z1=/msie|trident/i.test(qi.navigator&&qi.navigator.userAgent),An=function(l){return parseFloat(l||"0")},Di=function(l,r,n){return l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=!1),new T1((n?r:l)||0,(n?l:r)||0)},Fs=ui({devicePixelContentBoxSize:Di(),borderBoxSize:Di(),contentBoxSize:Di(),contentRect:new Zc(0,0,0,0)}),eu=function(l,r){if(r===void 0&&(r=!1),ko.has(l)&&!r)return ko.get(l);if(Qc(l))return ko.set(l,Fs),Fs;var n=getComputedStyle(l),i=zt(l)&&l.ownerSVGElement&&l.getBBox(),s=!z1&&n.boxSizing==="border-box",c=A1.test(n.writingMode||""),m=!i&&Vs.test(n.overflowY||""),p=!i&&Vs.test(n.overflowX||""),h=i?0:An(n.paddingTop),y=i?0:An(n.paddingRight),u=i?0:An(n.paddingBottom),x=i?0:An(n.paddingLeft),D=i?0:An(n.borderTopWidth),R=i?0:An(n.borderRightWidth),E=i?0:An(n.borderBottomWidth),K=i?0:An(n.borderLeftWidth),M=x+y,L=h+u,j=K+R,C=D+E,_=p?l.offsetHeight-C-l.clientHeight:0,S=m?l.offsetWidth-j-l.clientWidth:0,k=s?M+j:0,g=s?L+C:0,P=i?i.width:An(n.width)-k-S,$=i?i.height:An(n.height)-g-_,Y=P+M+S+j,pe=$+L+_+C,ze=ui({devicePixelContentBoxSize:Di(Math.round(P*devicePixelRatio),Math.round($*devicePixelRatio),c),borderBoxSize:Di(Y,pe,c),contentBoxSize:Di(P,$,c),contentRect:new Zc(x,h,P,$)});return ko.set(l,ze),ze},au=function(l,r,n){var i=eu(l,n),s=i.borderBoxSize,c=i.contentBoxSize,m=i.devicePixelContentBoxSize;switch(r){case Gi.DEVICE_PIXEL_CONTENT_BOX:return m;case Gi.BORDER_BOX:return s;default:return c}},M1=function(){function l(r){var n=eu(r);this.target=r,this.contentRect=n.contentRect,this.borderBoxSize=ui([n.borderBoxSize]),this.contentBoxSize=ui([n.contentBoxSize]),this.devicePixelContentBoxSize=ui([n.devicePixelContentBoxSize])}return l}(),lu=function(l){if(Qc(l))return 1/0;for(var r=0,n=l.parentNode;n;)r+=1,n=n.parentNode;return r},I1=function(){var l=1/0,r=[];ci.forEach(function(c){if(c.activeTargets.length!==0){var m=[];c.activeTargets.forEach(function(p){var h=new M1(p.target),y=lu(p.target);m.push(h),p.lastReportedSize=au(p.target,p.observedBox),y<l&&(l=y)}),r.push(function(){c.callback.call(c.observer,m,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var n=0,i=r;n<i.length;n++){var s=i[n];s()}return l},Ps=function(l){ci.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(n){n.isActive()&&(lu(n.target)>l?r.activeTargets.push(n):r.skippedTargets.push(n))})})},O1=function(){var l=0;for(Ps(l);C1();)l=I1(),Ps(l);return D1()&&N1(),l>0},ft,ru=[],L1=function(){return ru.splice(0).forEach(function(l){return l()})},$1=function(l){if(!ft){var r=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return L1()}).observe(n,i),ft=function(){n.textContent="".concat(r?r--:r++)}}ru.push(l),ft()},R1=function(l){$1(function(){requestAnimationFrame(l)})},Eo=0,V1=function(){return!!Eo},F1=250,P1={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(l){return l===void 0&&(l=0),Date.now()+l},ht=!1,j1=function(){function l(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return l.prototype.run=function(r){var n=this;if(r===void 0&&(r=F1),!ht){ht=!0;var i=Hs(r);R1(function(){var s=!1;try{s=O1()}finally{if(ht=!1,r=i-Hs(),!V1())return;s?n.run(1e3):r>0?n.run(r):n.start()}})}},l.prototype.schedule=function(){this.stop(),this.run()},l.prototype.observe=function(){var r=this,n=function(){return r.observer&&r.observer.observe(document.body,P1)};document.body?n():qi.addEventListener("DOMContentLoaded",n)},l.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),js.forEach(function(n){return qi.addEventListener(n,r.listener,!0)}))},l.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),js.forEach(function(n){return qi.removeEventListener(n,r.listener,!0)}),this.stopped=!0)},l}(),Dt=new j1,Us=function(l){!Eo&&l>0&&Dt.start(),Eo+=l,!Eo&&Dt.stop()},H1=function(l){return!zt(l)&&!B1(l)&&getComputedStyle(l).display==="inline"},U1=function(){function l(r,n){this.target=r,this.observedBox=n||Gi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var r=au(this.target,this.observedBox,!0);return H1(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},l}(),q1=function(){function l(r,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=n}return l}(),xo=new WeakMap,qs=function(l,r){for(var n=0;n<l.length;n+=1)if(l[n].target===r)return n;return-1},wo=function(){function l(){}return l.connect=function(r,n){var i=new q1(r,n);xo.set(r,i)},l.observe=function(r,n,i){var s=xo.get(r),c=s.observationTargets.length===0;qs(s.observationTargets,n)<0&&(c&&ci.push(s),s.observationTargets.push(new U1(n,i&&i.box)),Us(1),Dt.schedule())},l.unobserve=function(r,n){var i=xo.get(r),s=qs(i.observationTargets,n),c=i.observationTargets.length===1;s>=0&&(c&&ci.splice(ci.indexOf(i),1),i.observationTargets.splice(s,1),Us(-1))},l.disconnect=function(r){var n=this,i=xo.get(r);i.observationTargets.slice().forEach(function(s){return n.unobserve(r,s.target)}),i.activeTargets.splice(0,i.activeTargets.length)},l}(),W1=function(){function l(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");wo.connect(this,r)}return l.prototype.observe=function(r,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rs(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.observe(this,r,n)},l.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Rs(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");wo.unobserve(this,r)},l.prototype.disconnect=function(){wo.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const $o=new WeakMap;function K1(l){var r;for(let n=0,i=l.length;n<i;++n){const s=l[n],c=$o.get(s.target);if(typeof c=="function"){const{inlineSize:m,blockSize:p}=((r=s.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:h,offsetHeight:y}=s.target;c(Object.assign(s,{offsetWidth:h,offsetHeight:y,width:m??h,height:p??y}))}}}const nu=new(di&&window.ResizeObserver||W1)(K1);function Ws(l,r){$o.set(l,r),nu.observe(l)}function Ks(l){$o.has(l)&&(nu.unobserve(l),$o.delete(l))}function G1(l={}){let r=Ls;const n=a.watch(()=>a.unref(l.target),s=>{r(),!(!s||typeof l.onResize!="function")&&(Ws(s,l.onResize),r=()=>{Ks(s),r=Ls})},{immediate:!0}),i=()=>{n(),r()};return a.getCurrentScope()&&a.onScopeDispose(i),{observeResize:Ws,unobserveResize:Ks,unobserve:i}}const Y1=a.ref(!1);a.computed(()=>Y1.value);const Gs="__theme_style__",vt="__theme_observer__",Ys=a.reactive(new Map),Js=new Map;a.watch(Ys,()=>{if(!di)return;Js.clear();const l=document.head.querySelector(`#${Gs}`);l&&document.head.removeChild(l);const r=document.createElement("style");let n=`.${vt} { width: 1px }`,i=1;for(const[s,[c,m]]of Ys.entries())n+=` html.${c} .${vt}, .${m} .${vt} { width: ${++i}px }`,Js.set(i,s);r.textContent=n,r.id=Gs,document.head.appendChild(r)});const iu=a.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(l,{expose:r,emit:n}){const i=l,s=n,c=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),m=new Map,p=a.ref(i.layout),h=a.ref(),{observeResize:y,unobserveResize:u}=G1(),x=K6();x.on("resizeEvent",D),x.on("dragEvent",R),a.onBeforeMount(()=>{s("layout-before-mount",p.value)}),a.onMounted(()=>{s("layout-mounted",p.value),a.nextTick(()=>{n1(p.value),c.originalLayout=p.value,a.nextTick(()=>{$(),h.value&&y(h.value,G6(C,16)),Si(p.value,i.verticalCompact),s("layout-updated",p.value),j(),C()})})}),a.onBeforeUnmount(()=>{x.clearAll(),h.value&&u(h.value)});function D(pe,ze,de,Z,he,ae){g(pe,ze,de,Z,he,ae)}function R(pe,ze,de,Z,he,ae){k(pe,ze,de,Z,he,ae)}a.watch(()=>c.width,(pe,ze)=>{a.nextTick(()=>{x.emit("updateWidth",pe),ze===-1&&a.nextTick(()=>{s("layout-ready",p.value)}),j()})}),a.watch(()=>[i.layout,i.layout.length],()=>{p.value=i.layout,L()}),a.watch(()=>i.colNum,pe=>{x.emit("setColNum",pe)}),a.watch(()=>i.rowHeight,pe=>{x.emit("setRowHeight",pe)}),a.watch(()=>i.isDraggable,pe=>{x.emit("setDraggable",pe)}),a.watch(()=>i.isResizable,pe=>{x.emit("setResizable",pe)}),a.watch(()=>i.isBounded,pe=>{x.emit("setBounded",pe)}),a.watch(()=>i.transformScale,pe=>{x.emit("setTransformScale",pe)}),a.watch(()=>i.responsive,pe=>{pe||(s("update:layout",c.originalLayout),x.emit("setColNum",i.colNum)),C()}),a.watch(()=>i.maxRows,pe=>{x.emit("setMaxRows",pe)}),a.watch([()=>i.margin,()=>i.margin[1]],j),a.provide(Hc,a.reactive({...a.toRefs(i),...a.toRefs(c),increaseItem:E,decreaseItem:K})),a.provide(Uc,x),r({state:c,getItem:M,resizeEvent:g,dragEvent:k,layoutUpdate:L});function E(pe){m.set(pe.i,pe)}function K(pe){m.delete(pe.i)}function M(pe){return m.get(pe)}function L(){if(!un(p.value)&&!un(c.originalLayout)){if(p.value.length!==c.originalLayout.length){const pe=Y(p.value,c.originalLayout);if(pe.length>0)if(p.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(pe);else{const ze=new Set(pe.map(de=>de.i));c.originalLayout=c.originalLayout.filter(de=>!ze.has(de.i))}c.lastLayoutLength=p.value.length,$()}Si(p.value,i.verticalCompact),x.emit("updateWidth",c.width),j(),s("layout-updated",p.value)}}function j(){c.mergedStyle={height:_()}}function C(){h.value&&(c.width=h.value.offsetWidth),x.emit("resizeEvent")}function _(){if(!i.autoSize)return;const pe=parseFloat(i.margin[1]);return J6(p.value)*(i.rowHeight+pe)+pe+"px"}let S;function k(pe,ze,de,Z,he,ae){let ue=Ds(p.value,ze);un(ue)&&(ue={h:0,w:0,x:0,y:0,i:""}),pe==="dragstart"&&!i.verticalCompact&&(S=p.value.reduce((Se,{i:Ve,x:ge,y:T})=>({...Se,[Ve]:{x:ge,y:T}}),{})),pe==="dragmove"||pe==="dragstart"?(c.placeholder.i=ze,c.placeholder.x=ue.x,c.placeholder.y=ue.y,c.placeholder.w=ae,c.placeholder.h=he,a.nextTick(()=>{c.isDragging=!0}),x.emit("updateWidth",c.width)):a.nextTick(()=>{c.isDragging=!1}),p.value=Ct(p.value,ue,de,Z,!0,i.preventCollision),i.restoreOnDrag?(ue.static=!0,Si(p.value,i.verticalCompact,S),ue.static=!1):Si(p.value,i.verticalCompact),x.emit("compact"),j(),pe==="dragend"&&(S=void 0,s("layout-updated",p.value))}function g(pe,ze,de,Z,he,ae){let ue=Ds(p.value,ze);un(ue)&&(ue={h:0,w:0,x:0,y:0,i:""});let Se;if(i.preventCollision){const Ve=Wc(p.value,{...ue,w:ae,h:he}).filter(ge=>ge.i!==ue.i);if(Se=Ve.length>0,Se){let ge=1/0,T=1/0;Ve.forEach(q=>{q.x>ue.x&&(ge=Math.min(ge,q.x)),q.y>ue.y&&(T=Math.min(T,q.y))}),Number.isFinite(ge)&&(ue.w=ge-ue.x),Number.isFinite(T)&&(ue.h=T-ue.y)}}Se||(ue.w=ae,ue.h=he),pe==="resizestart"||pe==="resizemove"?(c.placeholder.i=ze,c.placeholder.x=de,c.placeholder.y=Z,c.placeholder.w=ue.w,c.placeholder.h=ue.h,a.nextTick(()=>{c.isDragging=!0}),x.emit("updateWidth",c.width)):pe&&a.nextTick(()=>{c.isDragging=!1}),i.responsive&&P(),Si(p.value,i.verticalCompact),x.emit("compact"),j(),pe==="resizeend"&&s("layout-updated",p.value)}function P(){const pe=c1(i.breakpoints,c.width);if(pe===c.lastBreakpoint)return;const ze=Yc(pe,i.cols);!un(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=Et(p.value));const de=u1(c.originalLayout,c.layouts,i.breakpoints,pe,c.lastBreakpoint,ze,i.verticalCompact);c.layouts[pe]=de,c.lastBreakpoint!==pe&&s("breakpoint-changed",pe,de),p.value=de,s("update:layout",de),c.lastBreakpoint=pe,x.emit("setColNum",ze)}function $(){c.layouts=Object.assign({},i.responsiveLayouts)}function Y(pe,ze){const de=new Set(ze.map(ue=>ue.i)),Z=new Set(pe.map(ue=>ue.i)),he=pe.filter(ue=>!de.has(ue.i)),ae=ze.filter(ue=>!Z.has(ue.i));return he.concat(ae)}return(pe,ze)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:a.normalizeStyle(c.mergedStyle)},[pe.$slots.default?a.renderSlot(pe.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(p.value,de=>(a.openBlock(),a.createBlock(Lo,a.mergeProps({key:de.i,ref_for:!0},de),{default:a.withCtx(()=>[a.renderSlot(pe.$slots,"item",{item:de})]),_:2},1040))),128)),a.withDirectives(a.createVNode(Lo,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.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(l)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const J1={key:0,class:"item-view-group"},X1={key:0,class:"item-view-group"},Z1=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:r}){const n=O.useModelComp(O.pinia),{isEdit:i}=O.storeToRefs(n),s=Qn(O.pinia),c=r,m=l,p=a.ref(""),h=a.computed(()=>m==null?void 0:m.children),y=a.computed(()=>{var j,C,_,S;return((j=m==null?void 0:m.children)==null?void 0:j.length)>0&&((C=m==null?void 0:m.children)!=null&&C.every(k=>k==null?void 0:k.layout))?(S=(_=m==null?void 0:m.children)==null?void 0:_[0])==null?void 0:S.layout:"vertical"}),u=j=>{p.value=j,c("radioChange",j)},x=a.computed(()=>{var j,C;return((C=(j=m==null?void 0:m.children)==null?void 0:j[0])==null?void 0:C.isGridLayout)||!1}),D=a.ref((m==null?void 0:m.level)+1),R=a.computed(()=>{if(!(m!=null&&m.children)||!Array.isArray(m.children)||m.children.length<2)return!1;const j=m.children.some(_=>(_==null?void 0:_.name)==="测量系统配置表"&&(_==null?void 0:_.comp)==="ParentItem"),C=m.children.some(_=>(_==null?void 0:_.name)==="测量系统传递表"&&(_==null?void 0:_.comp)==="ParentItem");return j&&C}),E=a.computed(()=>{var C,_,S,k,g,P;let j=(C=m==null?void 0:m.children)==null?void 0:C.filter($=>$==null?void 0:$.choice);if(s.setSelectTab((_=j==null?void 0:j[0])==null?void 0:_.choiceName),(p==null?void 0:p.value)!=="")return(S=m==null?void 0:m.children)==null?void 0:S.filter($=>!($!=null&&$.choiceName)||($==null?void 0:$.choiceName)===(p==null?void 0:p.value));{let $=(g=(k=m==null?void 0:m.children)==null?void 0:k.find(Y=>Y==null?void 0:Y.choice))==null?void 0:g.choiceName;return(P=m==null?void 0:m.children)==null?void 0:P.filter(Y=>!(Y!=null&&Y.choiceName)||(Y==null?void 0:Y.choiceName)===$)}}),K=j=>{const C=(j==null?void 0:j.menuFilter)||[];return Array.isArray(C)&&(C==null?void 0:C.some(_=>{const S=typeof _=="string"?_:JSON.stringify(_);return S==null?void 0:S.includes("@InterfaceHide=Yes")}))};a.watch(()=>m==null?void 0:m.children,()=>{R.value},{deep:!0});const M=j=>{c("rowClick",j)},L=(j,C)=>{c("routeUrl",j,C)};return(j,C)=>x.value?(a.openBlock(),a.createBlock(a.unref(iu),{key:0,layout:h.value,"onUpdate:layout":C[0]||(C[0]=_=>h.value=_),"is-draggable":a.unref(i)==="edit","is-resizable":a.unref(i)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(_,S)=>(a.openBlock(),a.createBlock(a.unref(Lo),{key:_.i,x:_.x,y:_.y,"min-h":_.minH,"max-h":_.maxH,"min-w":_.minW,w:_.w,h:_.h,i:_.i},{default:a.withCtx(()=>{var k,g,P,$,Y,pe,ze,de,Z,he,ae,ue,Se,Ve;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:S===((k=m==null?void 0:m.children)==null?void 0:k.length)-1?"0px":"24px"})},[((P=(g=_==null?void 0:_.component)==null?void 0:g.comp)==null?void 0:P.toUpperCase())!=="TABLE"&&(($=_==null?void 0:_.component)!=null&&$.name)?(a.openBlock(),a.createElementBlock("div",J1,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},a.toDisplayString((Y=_==null?void 0:_.component)==null?void 0:Y.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)((pe=_==null?void 0:_.component)==null?void 0:pe.comp)),{pageLayout:y.value,config:{showIndex:(ze=a.unref(cr)[S])==null?void 0:ze.showIndex,allowMove:(de=a.unref(cr)[S])==null?void 0:de.allowMove,viewport:(Z=a.unref(cr)[S])==null?void 0:Z.viewport,status:(he=a.unref(cr)[S])==null?void 0:he.status},related:_==null?void 0:_.relatedTables,compName:_==null?void 0:_.component.name,compNames:a.unref(Sc),itemData:(ae=_==null?void 0:_.component)==null?void 0:ae.compData,childItemData:(ue=_==null?void 0:_.component)==null?void 0:ue.itemChildData,key:a.unref(Zn),cacheNewData:a.unref(_c),onChange:a.unref(zo),index:(_==null?void 0:_.id)??S,onContentChange:a.unref(Mo),onPageChange:a.unref(Io),parentTableId:(Se=_==null?void 0:_.component)==null?void 0:Se.tableId,allMapContents:a.unref(wt),children:(Ve=_==null?void 0:_.component)==null?void 0:Ve.children,level:D.value,onRowClick:M,onRouteUrl:L,onClickTrigger:a.unref(Ec),onClickMainKey:a.unref(Cc),onRadioChange:u},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"])):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(E.value,(_,S)=>{var k,g;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(_==null?void 0:_.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(S)===((k=m==null?void 0:m.children)==null?void 0:k.length)-1?"0px":"24px"})},[((g=_==null?void 0:_.comp)==null?void 0:g.toUpperCase())!=="TABLE"&&_.name?(a.openBlock(),a.createElementBlock("div",X1,[K(_)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"12px":"0px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},a.toDisplayString(_.name),5))])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(Ki)(_.comp)),{compName:_.name,groupNames:_==null?void 0:_.nameContents,config:{showIndex:_==null?void 0:_.showIndex,allowMove:_==null?void 0:_.allowMove,viewport:_==null?void 0:_.viewport,status:_==null?void 0:_.status},itemData:_==null?void 0:_.compData,related:_==null?void 0:_.relatedTables,childItemData:_==null?void 0:_.itemChildData,key:a.unref(Zn),onChange:a.unref(zo),index:(_==null?void 0:_.id)??S,onContentChange:a.unref(Mo),onPageChange:a.unref(Io),parentTableId:_==null?void 0:_.tableId,allMapContents:a.unref(wt),children:_==null?void 0:_.children,level:D.value,onRowClick:M,onRouteUrl:L,onRadioChange:u},null,40,["compName","groupNames","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Q1=er._export_sfc(Z1,[["__scopeId","data-v-de5883fb"]]),ev={class:"radio-group-container"},av=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:r}){const n=l,i=r,s=a.ref(),c=Qn(O.pinia),{selectTab:m}=O.storeToRefs(c);a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=m.value},{immediate:!0,deep:!0});const p=h=>{s.value=h,i("radioChange",s.value)};return(h,y)=>(a.openBlock(),a.createElementBlock("div",ev,[a.createVNode(tl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=u=>s.value=u),content:n==null?void 0:n.itemData,onChange:p},null,8,["modelValue","content"])]))}}),lv=er._export_sfc(av,[["__scopeId","data-v-177d64c3"]]),ou=a.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),rv={TABLE:Bc,FORM:ws,STATICFORM:Ac,TABLEOPERATE:G2,TABLESTYLE:dh,TABLEEXTEND:fh,TABLEINTERACTION:mh,FORMOPERATE:_s,FOLD:Wh,CALCULATOR:Zh,METHODBUTTON:a4,AVATARUPLOAD:rs.ssAvatar,SIGNATURE:rs.ssSignature,FORMTOP:ws,STEP:f4,STEPOPERATE:$h,TIMELINE:b4,TIMELINEOPERATE:Hh,FORMTOPOPERATE:_s,SIGNATUREOPERATE:u4,AVATARUPLOADOPERATE:n4,TABS:w4,TABSOPERATE:t6,CHART:x6,CHARTOPERATE:z6,LAYOUT:O6,LAYOUTOPERATE:U6,PARENTITEM:Q1,RADIO:lv};function Bi(l){return rv[l==null?void 0:l.toUpperCase()]||null}exports.De=iu;exports.activeStepInfo=Ei;exports.addContents=Wi;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=Zn;exports.compNames=Sc;exports.compShow=Ti;exports.existLayouts=z0;exports.fixChangeValue=Nt;exports.generateLayouts=th;exports.getComponent=Bi;exports.getComponents=Ki;exports.getPageConstruct=Jd;exports.getPageData=Kr;exports.getSliceContLength=R0;exports.gridRowHeight=lh;exports.gridRowHeightHmPg=ah;exports.isStepLayout=Tc;exports.onBack=x0;exports.onButtonChange=N0;exports.onChange=zo;exports.onClick=w0;exports.onClickStep=M0;exports.onContentChange=Mo;exports.onExtendTaskEnd=A0;exports.onOk=T0;exports.onPageBack=O0;exports.onPageChange=Io;exports.onSelectFixContent=k0;exports.renderShowItems=xc;exports.showItems=cr;exports.sliceTableLength=wc;exports.slotContent=ou;exports.ssTable=Bc;exports.st=Lo;exports.stepItems=V0;exports.tabChange=I0;exports.toolBar=B0;exports.useFormComp=Tt;exports.useModelLoader=_f;exports.verifyButton=L0;