ss-component-new 1.3.309 → 1.3.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MTLLoader-Bo1wV64w.js → MTLLoader-CIEnVGmG.js} +1 -1
- package/dist/{MTLLoader-CNG_nYao.cjs → MTLLoader-OzB6aQ1J.cjs} +1 -1
- package/dist/{OrbitControls-BH8LW1We.js → OrbitControls-AFlrwr_K.js} +1 -1
- package/dist/{OrbitControls-DDAIU013.cjs → OrbitControls-DkGe2Ptd.cjs} +1 -1
- package/dist/{URDFLoader-BxNI_02V.cjs → URDFLoader-DSqxUYRw.cjs} +1 -1
- package/dist/{URDFLoader-Bol9PFUh.js → URDFLoader-SQ3u-Q_8.js} +2 -2
- package/dist/{animationData-DhNrRUji.cjs → animationData-B6OfhxX7.cjs} +1 -1
- package/dist/{animationData-CtNSWsVx.js → animationData-DEAc-sVN.js} +3 -3
- package/dist/{array-CY3ouybd.cjs → array-CAaog6qg.cjs} +1 -1
- package/dist/{array-PWiKLBUl.js → array-Ydde3r7w.js} +4 -4
- package/dist/{clone-BXHgjm5v.js → clone-7AmADFiU.js} +1 -1
- package/dist/clone-DR4pDnuw.cjs +1 -0
- package/dist/{dayjs.min-D5HHSGr1.cjs → dayjs.min-CJNj6LcW.cjs} +1 -1
- package/dist/{dayjs.min-BPKOQl6O.js → dayjs.min-DTIKCUrF.js} +1 -1
- package/dist/{iconfont-C9piaJDU.js → iconfont--3ZMb9Aj.js} +2 -2
- package/dist/{iconfont-BmeJfz0Q.cjs → iconfont-dsQaI5I4.cjs} +1 -1
- package/dist/{index-CJKZT_CV.cjs → index-17CQJTv4.cjs} +1 -1
- package/dist/{index-BuB0yKIt.js → index-2KYbe_7L.js} +2 -2
- package/dist/{index-CuctAwj2.js → index-4dur0sB4.js} +4 -4
- package/dist/{index-CDxB0zrx.cjs → index-5EqtwNP3.cjs} +1 -1
- package/dist/{index-DlIWrxq2.js → index-6-ZsdeZD.js} +4 -4
- package/dist/{index-B-4A72Ju.cjs → index-B0RsEw5m.cjs} +1 -1
- package/dist/{index-D29IWK9R.cjs → index-B2Bsxjo3.cjs} +1 -1
- package/dist/{index-DrVyMHmK.cjs → index-B3t77A1L.cjs} +1 -1
- package/dist/{index-BvkkBMb-.cjs → index-BU3Yohec.cjs} +1 -1
- package/dist/{index-1c2zUnli.cjs → index-Bc-WLx7S.cjs} +1 -1
- package/dist/{index-CwF4Jwpg.js → index-BesmmP6V.js} +4 -4
- package/dist/{index-xVXGJv1n.cjs → index-BhadNQIa.cjs} +1 -1
- package/dist/{index-viJGdi3r.js → index-BkS6ltPu.js} +1 -1
- package/dist/{index-DxrwHdDS.cjs → index-BlLEla5k.cjs} +1 -1
- package/dist/{index-DyY9JgJ7.cjs → index-BsmJfM3E.cjs} +1 -1
- package/dist/{index-DRhv81ty.js → index-BuTyP2j6.js} +1 -1
- package/dist/{index-D0lzijAI.cjs → index-CFZ-f-2F.cjs} +1 -1
- package/dist/{index-Dnx7pVxF.cjs → index-CGaMJ1tM.cjs} +1 -1
- package/dist/{index-Cvcq-T-g.js → index-CIuY1IfZ.js} +1 -1
- package/dist/{index-BasPZ1_1.js → index-CQGipCwR.js} +3 -3
- package/dist/{index-w0mp-zdk.cjs → index-CRqblQs6.cjs} +1 -1
- package/dist/{index-Bbh92DkU.js → index-CT1fhrt6.js} +9 -9
- package/dist/{index-CC2DoRnD.js → index-Cf2gp9fi.js} +3 -3
- package/dist/{index-ClAx-N3V.js → index-Ciy-wUsx.js} +19 -19
- package/dist/{index-Dqx-3m7x.js → index-ClBVw2TK.js} +3 -3
- package/dist/{index-iO7mADz6.cjs → index-Clae5SKB.cjs} +1 -1
- package/dist/{index-BHHFv1hx.cjs → index-CuPeKtNC.cjs} +1 -1
- package/dist/{index-C1dRscDJ.js → index-CyD2ZGI0.js} +2 -2
- package/dist/{index-DkMnnDQf.js → index-D25spbOo.js} +1 -1
- package/dist/{index--Ddu-f4x.js → index-D2crrlxW.js} +6 -6
- package/dist/{index-xDAkaP7q.js → index-D3oAYPfe.js} +13 -13
- package/dist/{index-ClPdK99Q.cjs → index-D6-Yrm0v.cjs} +1 -1
- package/dist/{index-D8TV-F73.cjs → index-DBrsZqeh.cjs} +1 -1
- package/dist/{index-BQjqI876.cjs → index-DEHdaKzw.cjs} +1 -1
- package/dist/{index-D3phz67p.js → index-DIR0HLgr.js} +6 -6
- package/dist/{index-gU6jleLK.cjs → index-DJnMQzMz.cjs} +1 -1
- package/dist/{index-Ceq2PcSk.js → index-DL9VQs02.js} +2 -2
- package/dist/{index-99yVIktb.cjs → index-DMv7whzL.cjs} +1 -1
- package/dist/{index-CMw9yQKL.js → index-DNV_O6Dc.js} +1 -1
- package/dist/{index-DczCIrHK.cjs → index-DSJJfH49.cjs} +1 -1
- package/dist/{index-D7nlPiUG.cjs → index-DeiDI-1m.cjs} +1 -1
- package/dist/{index-Df25kWGR.js → index-Di2VsnFa.js} +2 -2
- package/dist/{index-C_PRhgr-.js → index-DqIM3shB.js} +1 -1
- package/dist/{index-D1-J46nr.cjs → index-Dt6f0dss.cjs} +1 -1
- package/dist/{index-DFlc6bWY.js → index-DyBLFpRg.js} +1 -1
- package/dist/{index-CWvPphGt.cjs → index-EMsSHq7U.cjs} +1 -1
- package/dist/{index-BrqldBPX.cjs → index-FPHxJvUf.cjs} +1 -1
- package/dist/{index-ar6gHlTf.cjs → index-Kt492P5R.cjs} +1 -1
- package/dist/{index-BNkVoRD1.cjs → index-U9njmngc.cjs} +1 -1
- package/dist/{index-Cf_UV6gw.js → index-XSrc1sWV.js} +4 -4
- package/dist/{index-BakymLqz.cjs → index-YmuGsjrw.cjs} +1 -1
- package/dist/{index-CsbhbPY4.cjs → index-hLwB_v-A.cjs} +1 -1
- package/dist/{index-D0y9l598.js → index-krueaJgV.js} +9 -9
- package/dist/{index-BN5E9qKx.js → index-oAsacBj3.js} +2 -2
- package/dist/{index-BKBuEVmV.js → index-r6mcGvmD.js} +1 -1
- package/dist/{index-wkA0gNsh.js → index-tH9fLWoV.js} +2 -2
- package/dist/{index-C0lB0uo5.js → index-vcuXxLeo.js} +4 -4
- package/dist/{index-iLcMp4ja.js → index-wZ9pUfoa.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-WNMmWFZ4.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-D13dnI_4.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-zCJwFQy1.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DniaKXV9.js} +4 -4
- package/dist/{main-BWF0CJLe.js → main-CwH9qJVm.js} +4 -4
- package/dist/{main-Dme1aCrm.cjs → main-DdEjcQ4o.cjs} +1 -1
- package/dist/{menu-BXiMOqYY.js → menu-CN_Tf3mn.js} +256 -259
- package/dist/{menu-Q9XyUX92.cjs → menu-N76i05Ex.cjs} +5 -5
- package/dist/{menuIndex-D2My1A7v.js → menuIndex-CD5tqM1b.js} +1 -1
- package/dist/{menuIndex-DiDPQosR.cjs → menuIndex-r6NllfjR.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +12 -12
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-8Geoh8O6.js → threeModel-BD7DSPW-.js} +4 -4
- package/dist/{threeModel-C1u27I4q.cjs → threeModel-Uk6zD89R.cjs} +1 -1
- package/dist/{threePreview-CMZQ5EQo.cjs → threePreview-BHGQBuXr.cjs} +1 -1
- package/dist/{threePreview-CMxBmSvX.js → threePreview-CZqaZ45g.js} +4 -4
- package/dist/{threeSceneView-DpVfr3S4.cjs → threeSceneView-DN_qbrRS.cjs} +1 -1
- package/dist/{threeSceneView-CtcTcPFi.js → threeSceneView-wkRekazs.js} +14 -14
- package/dist/{threeSceneViewForCPMPIP-jpjoC_az.cjs → threeSceneViewForCPMPIP-BztGaGm9.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-iVE-eafh.js → threeSceneViewForCPMPIP-mwU1RKVh.js} +8 -8
- package/dist/{threeTrackPathView-D-rbUP_B.cjs → threeTrackPathView-BQzCi_23.cjs} +1 -1
- package/dist/{threeTrackPathView-CPQFp1Wu.js → threeTrackPathView-D6IuvNTn.js} +4 -4
- package/dist/{threeViewerHost-BfxYhgC5.cjs → threeViewerHost-BEzl0gjk.cjs} +1 -1
- package/dist/{threeViewerHost-CDrsHERk.js → threeViewerHost-DsDxhyJb.js} +3 -3
- package/dist/{urdfTree-CuhsHBP7.js → urdfTree-6bW1rIxd.js} +1 -1
- package/dist/{urdfTree-lXOpBrP6.cjs → urdfTree-BoRXNADP.cjs} +1 -1
- package/dist/{workpieceTreePanel-Bmd1SBtW.js → workpieceTreePanel-BhCB5YyR.js} +4 -4
- package/dist/{workpieceTreePanel-sXSQ30Jz.cjs → workpieceTreePanel-BunFs5sL.cjs} +1 -1
- package/package.json +1 -1
- package/dist/clone-xTg1sTk2.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const sa=require("./index-CW4qJdP8.cjs"),G=require("./menu-Q9XyUX92.cjs"),fs=require("./request-BC2w2vGr.cjs"),zl=require("vue");require("./index-iO7mADz6.cjs");const yh=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],kh=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],Eh=e=>{var i;let a=e;const r=[];let n="",t=0;for(const s of a)t++,s.includes("(")||n.includes("(")||s.includes(")")||n.includes(")")||s.includes("&")||n.includes("&")||s.includes("|")||n.includes("|")?(n+=s.trim(),(((i=G.cloneDeep(n))==null?void 0:i[(n==null?void 0:n.length)-1])===")"||(a==null?void 0:a[t])==="|"||(a==null?void 0:a[t])==="&")&&!(n!=null&&n.includes("&"))&&!(n!=null&&n.includes("|"))?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):n==="&&"||n==="||"?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):t===(e==null?void 0:e.length)&&(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):n+=s.trim();return(n==null?void 0:n.length)!==0&&r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),r},Vl=(e,a,r,n,t,i)=>{let s=e;return s=s==null?void 0:s.map(f=>{var c,l,o,u,x;if(r!=null&&r.find(h=>{var d,p,m,g,y;return(h===(f==null?void 0:f.prop)||((d=f==null?void 0:f.prop)==null?void 0:d.includes("."+h)))&&((y=(p=f==null?void 0:f.prop)==null?void 0:p.split("."))==null?void 0:y[((g=(m=f==null?void 0:f.prop)==null?void 0:m.split("."))==null?void 0:g.length)-1])===(f==null?void 0:f.label)})&&(f.label=(c=a==null?void 0:a[r==null?void 0:r.findIndex(h=>{var d;return h===(f==null?void 0:f.prop)||((d=f==null?void 0:f.prop)==null?void 0:d.includes("."+h))})])==null?void 0:c.replaceAll('"',""),n!=null&&n.methodContent)){let h=(o=(l=n==null?void 0:n.methodContent)==null?void 0:l.replaceAll('"',""))==null?void 0:o.replaceAll("'","");h!=null&&h.includes("@")?(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h!=null&&h.includes("@Type")||(h=h+",@Type=Auto"),h!=null&&h.includes("@Button")||(h=h+",@Button=Prop"),h!=null&&h.includes("@Extent")||(h=h+",@Extent=Row"),h=h+")"):h=h+"(@Type=Auto,@Button=Prop,@Extent=Row)",f.methodContent=h,f.prop=(f==null?void 0:f.prop)+(n==null?void 0:n.columnPathIndex),(u=i==null?void 0:i.find(d=>d==null?void 0:d.includes("@SonSync")))!=null&&u.includes("Yes")&&(f.methodId=t)}return f!=null&&f.children&&((x=f==null?void 0:f.children)==null?void 0:x.length)>0&&(f.children=Vl(f.children,a,r,n,t,i)),f}),s},jl=e=>{var i;let a=e==null?void 0:e.replaceAll("=","#"),r=(i=Eh(a))==null?void 0:i.map(s=>(s!=null&&s.includes("(")&&(s="("+(s==null?void 0:s.replaceAll("(",""))),s)),n=[],t={};return r==null||r.forEach((s,f)=>{var c,l,o,u,x;if(!(s!=null&&s.includes("&&"))&&!(s!=null&&s.includes("||"))){let h=s;(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"&&(h=s.slice(0,(s==null?void 0:s.length)-1)),(h==null?void 0:h[0])==="("&&(h=h.slice(1,h==null?void 0:h.length)),h!=null&&h.includes("[")&&(h!=null&&h.includes("]")||(h=(u=(c=h==null?void 0:h.slice(1,h==null?void 0:h.length))==null?void 0:c.split(":"))==null?void 0:u[((o=(l=h==null?void 0:h.slice(1,h==null?void 0:h.length))==null?void 0:l.split(":"))==null?void 0:o.length)-1])),h=h==null?void 0:h.split("#");let d=h[0].replaceAll("'","").replaceAll("]","");d!=null&&d.includes(":")&&(d=d==null?void 0:d.replaceAll(":","."));let p=(x=h[1])==null?void 0:x.replaceAll("'","");(d==null?void 0:d[(d==null?void 0:d.length)-1])!=="!"?t[d]=p:t[d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)]="!"+p}else s==="&&"||s==="||"&&(n.push(t),t={});f===r.length-1&&(n.push(t),t={})}),n},Th=(e,a)=>{const r=new Map;let n=[];a.forEach(i=>{for(const[s,f]of Object.entries(i))try{r.set(s.replaceAll("'",""),JSON.parse(f))}catch{r.set(s,[])}});const t=i=>i.map(s=>{var l,o;const f={label:s==null?void 0:s.replaceAll("'","")},c=r.get(s==null?void 0:s.replaceAll("'",""));if(c!=null&&c.length){const u=c.map(x=>e.find(h=>(h==null?void 0:h.replaceAll("'",""))===x)).filter(Boolean);f.children=(f.children||[]).concat(u),f.children=(l=f.children)==null?void 0:l.map(x=>(f==null?void 0:f.label)+"."+(x==null?void 0:x.replaceAll("'",""))),n=[...n,...f.children]}return(o=f.children)!=null&&o.length&&(f.children=t(f.children)),f});return t(e),n},wh=(e,a)=>{const r=(n,t)=>{let i;return i=t==null?void 0:t.map(s=>{var f,c,l,o,u,x,h;if(n!=null&&n.find(d=>{var p;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||((p=s==null?void 0:s.prop)==null?void 0:p.includes("."+(d==null?void 0:d.prop)))})){let d=n==null?void 0:n.find(p=>{var m;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(p==null?void 0:p.prop)))});d!=null&&d.relatedValueId&&(s.relatedValueId=d==null?void 0:d.relatedValueId),d!=null&&d.menuId&&(s.menuId=d==null?void 0:d.menuId,s.directiveLabel="#isMain")}else if(Array.isArray(n==null?void 0:n[0])&&((f=n==null?void 0:n[0])!=null&&f.find(d=>{var p;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||(d==null?void 0:d.prop)===(s==null?void 0:s.prop)||((p=s==null?void 0:s.prop)==null?void 0:p.includes("."+(d==null?void 0:d.prop)))}))){let d=(c=n==null?void 0:n[0])==null?void 0:c.find(p=>{var m;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||(p==null?void 0:p.prop)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(p==null?void 0:p.prop)))});d!=null&&d.relatedValueId&&(s.relatedValueId=d==null?void 0:d.relatedValueId),d!=null&&d.menuId&&(s.menuId=d==null?void 0:d.menuId,s.directiveLabel="#isMain"),s.label=(x=(l=s.label)==null?void 0:l.split("."))==null?void 0:x[((u=(o=s.label)==null?void 0:o.split("."))==null?void 0:u.length)-1]}return s!=null&&s.children&&((h=s==null?void 0:s.children)==null?void 0:h.length)>0&&(s.children=r(n,s.children)),s}),i};return r(e,a)},Bs=G.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Sh=Bs(G.pinia),{multipleTableConst:ft}=G.storeToRefs(Sh),Es=e=>{let a=[];function r(t,i=""){Array.isArray(t)&&(t==null||t.forEach(s=>{Array.isArray(s)||(s=[s]),s==null||s.forEach(f=>{var c,l,o,u,x,h,d,p,m,g,y,v;if(!(f!=null&&f.children)||f.children.length===0)f.prop=i===""?f==null?void 0:f.prop:i+ft.value+((u=(c=f==null?void 0:f.prop)==null?void 0:c.split(ft.value))==null?void 0:u[((o=(l=f==null?void 0:f.prop)==null?void 0:l.split(ft.value))==null?void 0:o.length)-1]),a.push(f.prop);else{let E=i===""?i+((p=(x=f==null?void 0:f.prop)==null?void 0:x.split(ft.value))==null?void 0:p[((d=(h=f==null?void 0:f.prop)==null?void 0:h.split(ft.value))==null?void 0:d.length)-1]):i+ft.value+((v=(m=f==null?void 0:f.prop)==null?void 0:m.split(ft.value))==null?void 0:v[((y=(g=f==null?void 0:f.prop)==null?void 0:g.split(ft.value))==null?void 0:y.length)-1]);n(f.children,E)}})}))}function n(t,i=""){t==null||t.forEach(s=>{var f,c,l,o,u,x,h,d,p,m,g,y;if(!(s!=null&&s.children)||s.children.length===0)s.prop=i===""?s==null?void 0:s.prop:i+ft.value+((o=(f=s==null?void 0:s.prop)==null?void 0:f.split(ft.value))==null?void 0:o[((l=(c=s==null?void 0:s.prop)==null?void 0:c.split(ft.value))==null?void 0:l.length)-1]),a.push(s.prop);else{let v=i===""?i+((d=(u=s==null?void 0:s.prop)==null?void 0:u.split(ft.value))==null?void 0:d[((h=(x=s==null?void 0:s.prop)==null?void 0:x.split(ft.value))==null?void 0:h.length)-1]):i+ft.value+((y=(p=s==null?void 0:s.prop)==null?void 0:p.split(ft.value))==null?void 0:y[((g=(m=s==null?void 0:s.prop)==null?void 0:m.split(ft.value))==null?void 0:g.length)-1]);n(s.children,v)}})}return r(e),a},Ah=(e,a,r)=>{var t;let n=(t=G.cloneDeep(e))==null?void 0:t.map(i=>(i=i.filter(s=>!(s!=null&&s.id)),i));return n=n==null?void 0:n.map(i=>{var s;return i=(s=i.map((f,c)=>{let l={};if(r!=null&&r.find(o=>o===a[c]))return l[a[c]]=f,l}))==null?void 0:s.filter(f=>f),i}),n},Fh=(e,a)=>{var s,f;const r=G.cloneDeep(e),n=(s=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:s.contents,t=(f=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="tableContents"))==null?void 0:f.contents;return Ah(t,Es(n).slice(0,Es(n).length-1),a)},Dh=e=>{let a={};return e==null||e.forEach(r=>{a[r.key]=r.value}),a},df=(e,a)=>{const r=a;return e==null?void 0:e.map(n=>{var i;let t=n;if(!Array.isArray(t)){let s=[];for(let f in t)s.push({key:f,value:t==null?void 0:t[f]});return s}return n=(i=t==null?void 0:t.map((s,f)=>{var c,l;return s!=null&&s.id?{key:"id",value:s==null?void 0:s.id}:r!=null&&r.find(o=>o==null?void 0:o.id)||t!=null&&t.find(o=>o==null?void 0:o.id)?{key:(c=r[f-1])==null?void 0:c.label,value:s}:{key:(l=r[f])==null?void 0:l.label,value:s}}))==null?void 0:i.filter(s=>s.key!=="操作"),n})},Ih=async e=>{var r,n,t,i;let a="";if((n=(r=G.cloneDeep(e))==null?void 0:r.split("/"))==null||n.forEach((s,f)=>{var c,l;f!==((l=(c=G.cloneDeep(e))==null?void 0:c.split("/"))==null?void 0:l.length)-1&&(a=a===""?a+s:a+"/"+s)}),a!==""){let s="";const f=await En(a,sessionStorage.getItem("systemKey"),"");(i=(t=f==null?void 0:f[0])==null?void 0:t.compData)==null||i.forEach(c=>{var l;(c==null?void 0:c.key)==="tableContents"&&((l=c==null?void 0:c.contents)==null||l.forEach((o,u)=>{if(u===0){let x=o==null?void 0:o.filter(h=>!(h!=null&&h.id));s=a+"/"+(x==null?void 0:x[0])}}))}),await Rf(s,e)}},Gt=e=>{try{return JSON.parse(e),!0}catch{return!1}},bh=G.useLoginState(G.pinia),{loginUserInfo:cs}=G.storeToRefs(bh),Oh=G.useUnit(G.pinia),{chooseTitle:Fc}=G.storeToRefs(Oh),Ch=G.useMenuState(),{activeMenuPath:zt}=G.storeToRefs(Ch),K0=[{key:"@MaxRowNum",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1}],Rh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Nh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Ph=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Yl=(e,a,r)=>{let n;return n=e==null?void 0:e.map(t=>{var i;return a!=null&&a.find(s=>{var f;return((f=t==null?void 0:t.prop)==null?void 0:f.includes("."+s))||(t==null?void 0:t.prop)===s})&&(t.menuId=r),t.relatedValueId=!0,t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&(t.children=Yl(t.children,a,r)),t}),n},Mh=(e,a,r)=>{var i,s,f,c,l;let n;Gt(e)?n=JSON.parse(e):n=JSON.parse((c=(f=(s=(i=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:i.replaceAll("““","“"))==null?void 0:s.replaceAll("“",'"'))==null?void 0:f.replaceAll(':",',':"",'))==null?void 0:c.replaceAll(':"}',':""}'));let t;return(a==null?void 0:a[0])==="["?t=(l=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:l.split(","):t=a==null?void 0:a.split(","),n=n==null?void 0:n.map(o=>(o=o==null?void 0:o.map(u=>{var x;return(u==null?void 0:u.key)==="header"&&(u.contents=(x=u.contents)==null?void 0:x.map((h,d)=>{var p,m,g,y,v,E;if(Array.isArray(h)){let w=(g=(m=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:m[((p=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:p.length)-1])==null?void 0:g.contents;h=Yl(h,t,w)}else t!=null&&t.find(w=>w===(h==null?void 0:h.prop))&&(h.menuId=(E=(v=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:v[((y=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:y.length)-1])==null?void 0:E.contents,h.directiveLabel="#isMain"),h.relatedValueId=!0;return h})),u}),o)),n},pf=e=>{let a=e;if(a!=null&&a.every(r=>Array.isArray(r))){let r=[];const n=t=>{t==null||t.forEach(i=>{var s;i!=null&&i.children&&((s=i==null?void 0:i.children)==null?void 0:s.length)>0?n(i==null?void 0:i.children):r.push(i)})};return n(a==null?void 0:a[0]),r}else return a},Lh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Bh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Uh=(e,a,r)=>{let n;Gt(e)?n=JSON.parse(e):n=e;let t=a;if((a==null?void 0:a[0])!=="("&&(t="("+a+")"),t.slice(1,(t==null?void 0:t.length)-1)==="undefined")return n;let i=jl(t);if((i==null?void 0:i.length)>0){let s=[];i==null||i.forEach(f=>{var l,o,u,x,h,d;let c={};for(let p in f){let m=G.cloneDeep(p);if(!(m!=null&&m.includes("[")))if(((l=f[p])==null?void 0:l.toUpperCase())==="@LOGINUSER")c[m]=(o=cs.value)!=null&&o.account?(u=cs.value)==null?void 0:u.account:((x=cs.value)==null?void 0:x.姓名)??((h=cs.value)==null?void 0:h.账号);else if(!((d=f[p])!=null&&d.includes("[")))c[m]=f[p];else{let g="";n==null||n.forEach(y=>{var E,w;let v=(E=y==null?void 0:y.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:E.contents;v=(w=pf(v))==null?void 0:w.filter(S=>(S==null?void 0:S.label)!=="操作"),y=y==null?void 0:y.map(S=>{if((S==null?void 0:S.key)==="tableContents"){let B=df(S==null?void 0:S.contents,v),I=B==null?void 0:B.map(U=>{var L;return(L=U==null?void 0:U.find(W=>(W==null?void 0:W.key)===p))==null?void 0:L.value});I=[...new Set(I)],g=I}})}),c[m]=g}}s.push(c)}),n=n==null?void 0:n.map(f=>{var l,o;let c=(l=f==null?void 0:f.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:l.contents;return c=(o=pf(c))==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作"),f=f==null?void 0:f.map(u=>{if((u==null?void 0:u.key)==="tableContents"){let h=df(u==null?void 0:u.contents,c);s==null||s.forEach(d=>{var p,m;for(let g in d)!((p=h==null?void 0:h[0])!=null&&p.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))&&!(h!=null&&h.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))||(((m=d[g])==null?void 0:m[0])!=="!"?h=h==null?void 0:h.filter(y=>{var v,E;return((v=y==null?void 0:y.find(w=>{var S;return(w==null?void 0:w.key)===g||((S=w==null?void 0:w.key)==null?void 0:S.includes(g))}))==null?void 0:v.value)===d[g]&&!Array.isArray(d==null?void 0:d[g])||Array.isArray(d==null?void 0:d[g])&&((E=d==null?void 0:d[g])==null?void 0:E.find(w=>{var S;return((S=y==null?void 0:y.find(T=>{var B;return(T==null?void 0:T.key)===g||((B=T==null?void 0:T.key)==null?void 0:B.includes(g))}))==null?void 0:S.value)===w}))}):h=h==null?void 0:h.filter(y=>{var v;return((v=y==null?void 0:y.find(E=>{var w;return(E==null?void 0:E.key)===g||((w=E==null?void 0:E.key)==null?void 0:w.includes(g))}))==null?void 0:v.value)!==d[g]}))}),(h==null?void 0:h.length)===0?u.contents=[]:u.contents=h==null?void 0:h.map(d=>{let p={};return d==null||d.forEach(m=>{p[m==null?void 0:m.key]=m==null?void 0:m.value}),p})}return u}),f})}return n},Wh=(e,a,r)=>{var t,i,s,f;let n=[];return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),a.toUpperCase()==="ALL"||a.toUpperCase()==="NONE"||(n=n==null?void 0:n.map(c=>(c=c==null?void 0:c.map(l=>{var o;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(o=l.contents)==null?void 0:o.slice(0,parseInt(a))),l}),c))),n},Hh=e=>{for(let a=e.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[e[a],e[r]]=[e[r],e[a]]}return e},Gh=(e,a,r=0)=>{let n=r;const t=(i,s,f)=>{let c;return c=i==null?void 0:i.map(l=>{var o;return!(l!=null&&l.children)&&n===0?(n=n+1,l.menuId=s):l.relatedValueId=!0,l.relatedValueId=!0,l!=null&&l.children&&((o=l==null?void 0:l.children)==null?void 0:o.length)>0&&(l.children=t(l.children,s)),l}),c};return t(e,a)},Xh=async(e,a,r)=>{var n,t,i,s,f,c,l,o,u,x,h,d,p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_;if(a==="Sequence")return JSON.parse((s=(i=(t=(n=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:n.replaceAll("““","“"))==null?void 0:t.replaceAll("“",'"'))==null?void 0:i.replaceAll(':",',':"",'))==null?void 0:s.replaceAll(':"}',':""}'));if(a==="Auto"){let A=[];Gt(e)?A=JSON.parse(e):A=JSON.parse((o=(l=(c=(f=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:f.replaceAll("““","“"))==null?void 0:c.replaceAll("“",'"'))==null?void 0:l.replaceAll(':",',':"",'))==null?void 0:o.replaceAll(':"}',':""}'));const D=await sa.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:((h=(x=(u=zt==null?void 0:zt.value)==null?void 0:u.split("/"))==null?void 0:x.filter((X,re)=>{var ee,Q;return re!==((Q=(ee=zt==null?void 0:zt.value)==null?void 0:ee.split("/"))==null?void 0:Q.length)-1}))==null?void 0:h.join(""))+"/"}});let b;return(g=(d=r==null?void 0:r.split("["))==null?void 0:d[0])!=null&&g.includes((m=(p=Fc.value)==null?void 0:p[0])==null?void 0:m.parentContent)&&(b=(v=(y=Fc.value)==null?void 0:y[0])==null?void 0:v.value),!b&&((w=(E=D==null?void 0:D.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(b=(I=(S=zt==null?void 0:zt.value)==null?void 0:S.split("/"))==null?void 0:I[((B=(T=zt==null?void 0:zt.value)==null?void 0:T.split("/"))==null?void 0:B.length)-1]),A=A==null?void 0:A.map(X=>(X=X==null?void 0:X.map(re=>{var Q,q,we,P,Pe,Ie,je,Le;let ee=(q=(Q=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Q.contents)==null?void 0:q.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain");return(ee==null?void 0:ee.length)===0&&Array.isArray((P=(we=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:we.contents)==null?void 0:P[0])&&(ee=(je=(Ie=(Pe=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Pe.contents)==null?void 0:Ie[0])==null?void 0:je.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain")),(re==null?void 0:re.key)==="tableContents"&&b&&b!==""&&(re.contents=(Le=re.contents)==null?void 0:Le.filter(ie=>ee==null?void 0:ee.some(ur=>(ie==null?void 0:ie[ur==null?void 0:ur.label])===b))),re}),X)),A}else{let A=[];if(Gt(e)?A=JSON.parse(e):A=JSON.parse((M=(W=(L=(U=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:U.replaceAll("““","“"))==null?void 0:L.replaceAll("“",'"'))==null?void 0:W.replaceAll(':",',':"",'))==null?void 0:M.replaceAll(':"}',':""}')),a.toUpperCase()==="MANUAL"){if(!((ne=(se=A==null?void 0:A[0])==null?void 0:se.find(b=>(b==null?void 0:b.key)==="contentTableId"))!=null&&ne.contents))return A;let D=await sa.getInsofDataApi({id:(Te=(z=(he=A==null?void 0:A[0])==null?void 0:he.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:z[((be=(ce=A==null?void 0:A[0])==null?void 0:ce.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:be.length)-1])==null?void 0:Te.contents});D=(_=(Ae=D==null?void 0:D.data)==null?void 0:Ae.result)==null?void 0:_[0],A=A==null?void 0:A.map(b=>(b=b==null?void 0:b.map(X=>{var re,ee;return(X==null?void 0:X.key)==="header"&&(re=X.contents)!=null&&re.some(Q=>!(Q!=null&&Q.menuId))&&(X.contents=(ee=X.contents)==null?void 0:ee.map((Q,q)=>{var P,Pe,Ie,je,Le,ie,ur;let we=(Ie=(Pe=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Pe[((P=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:P.length)-1])==null?void 0:Ie.contents;return Array.isArray(Q)&&((je=gn(Q==null?void 0:Q[0]))!=null&&je.every(ir=>!(ir!=null&&ir.menuId)))?Q=Gh(Q,we):((Q==null?void 0:Q.directiveLabel)==="#isMain"&&(Q.menuId=(ur=(ie=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:ie[((Le=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Le.length)-1])==null?void 0:ur.contents),Q.relatedValueId=!0),Q})),X}),b))}else A=A==null?void 0:A.map(D=>(D=D==null?void 0:D.map(b=>((b==null?void 0:b.key)==="tableContents"&&(b.contents=Hh(b.contents)),b)),D));return A}},Ii=(e,a)=>Array.isArray(e)?e==null?void 0:e.map(n=>{var t,i,s,f,c,l,o;if(Array.isArray(n)?n=n:n=[n],(t=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&t.every(u=>typeof u!="object"||u===null))return n;if((i=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&i.some(u=>Array.isArray(u)))return n;{let u=[],x=(n==null?void 0:n.find(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number"))??{id:(s=n==null?void 0:n[0])==null?void 0:s.id};if(u.push(x),Array.isArray(a==null?void 0:a[0])){const h=(f=n==null?void 0:n.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:f[0];(c=gn(G.cloneDeep(a==null?void 0:a[0])))==null||c.forEach(d=>{u.push(h==null?void 0:h[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const h=(l=n==null?void 0:n.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:l[0];(o=gn(G.cloneDeep(a)))==null||o.forEach(d=>{u.push(h==null?void 0:h[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return u}}):void 0,d0=(e,a)=>{let r={};return Array.isArray(e)?e!=null&&e.find(n=>n==null?void 0:n.id)?(e==null?void 0:e.length)>1?e==null||e.forEach((n,t)=>{a!=null&&a[t-1]&&!(n!=null&&n.id)?r[a[t-1]]=n:n!=null&&n.id&&(r.id=n==null?void 0:n.id)}):r=e==null?void 0:e[0]:e==null||e.forEach((n,t)=>{a!=null&&a[t]&&(r[a[t]]=n)}):(a==null||a.forEach(n=>{r[n]=e==null?void 0:e[n]}),r.id=e==null?void 0:e.id),r},f0=G.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),$h=G.useModelComp(G.pinia),{routeToChildPath:Dc}=G.storeToRefs($h),Kh=G.useLoginState(G.pinia),{loginUserInfo:Ic,cryptoInfo:sw}=G.storeToRefs(Kh),zh=f0(G.pinia),{originalPath:bc}=G.storeToRefs(zh),Vh=async(e,a)=>{const r=sessionStorage.getItem("authority"),n=JSON.parse(r||"");if(Array.isArray(n)){let t;Dc.value?t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>(f==null?void 0:f.includes(e))||(f==null?void 0:f.includes(Dc.value)))):t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>f==null?void 0:f.includes(e)));const i=t==null?void 0:t.map(f=>{var c;return((c=f==null?void 0:f.split("/"))==null?void 0:c.pop())||""});return a==null?void 0:a.map(f=>{var c;return{...f,compData:(c=f==null?void 0:f.compData)==null?void 0:c.map(l=>{var o;return(l==null?void 0:l.key)==="rowButton"||(l==null?void 0:l.key)==="extraButton"?{...l,contents:(o=l==null?void 0:l.contents)==null?void 0:o.filter(u=>i==null?void 0:i.includes(u==null?void 0:u.label))}:l})}})}else return typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?a:[]},jh=(e,a)=>{var i,s,f,c;const r=(s=(i=a["系统管理/角色管理"])==null?void 0:i.filter(l=>{var o;return((o=l==null?void 0:l.key)==null?void 0:o.type)==="data"}))==null?void 0:s.map(l=>l.value.tableData),n=(c=(f=e==null?void 0:e.value)==null?void 0:f.tableData)==null?void 0:c.角色名称,t=r==null?void 0:r.find(l=>(l==null?void 0:l.角色名称)===n);return t==null?void 0:t.数据范围};var ks=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(ks||{});const Jl=(e,a,r)=>{var s,f,c,l;if(((c=(f=(s=Ic.value)==null?void 0:s.key)==null?void 0:f.layer)==null?void 0:c.toUpperCase())==="SUPERADMIN"||!r)return e;const n=(l=r==null?void 0:r["系统管理/用户管理"])==null?void 0:l.find(o=>{var u;return(o==null?void 0:o.id)===((u=Ic.value)==null?void 0:u.id)}),t=jh(n,r);if(!t)return e;switch(ks==null?void 0:ks[t]){case 0:return e;case 1:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var p,m,g,y,v,E,w,S,T;const h=x==null?void 0:x[1],d=u[(u==null?void 0:u.length)-1]===bc.value;return((m=(p=h==null?void 0:h.key)==null?void 0:p.createUserLayer)==null?void 0:m.toUpperCase())==="SUPERADMIN"||((g=h==null?void 0:h.key)==null?void 0:g.createUserOrg)===((v=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:v.部门名称)||((E=h==null?void 0:h.key)==null?void 0:E.createUserOrg)===((S=(w=n==null?void 0:n.value)==null?void 0:w.tableData)==null?void 0:S.部门名称)&&((T=h==null?void 0:h.key)==null?void 0:T.createUserId)===(n==null?void 0:n.id)||d})):e==null?void 0:e.filter(o=>{var u,x,h,d,p,m,g,y,v;return((x=(u=o==null?void 0:o.key)==null?void 0:u.createUserLayer)==null?void 0:x.toUpperCase())==="SUPERADMIN"||((h=o==null?void 0:o.key)==null?void 0:h.createUserOrg)===((p=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:p.部门名称)||((m=o==null?void 0:o.key)==null?void 0:m.createUserOrg)===((y=(g=n==null?void 0:n.value)==null?void 0:g.tableData)==null?void 0:y.部门名称)&&((v=o==null?void 0:o.key)==null?void 0:v.createUserId)===(n==null?void 0:n.id)});case 2:break;case 3:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var p;const h=x==null?void 0:x[1],d=u[(u==null?void 0:u.length)-1]===bc.value;return((p=h==null?void 0:h.key)==null?void 0:p.createUserId)===(n==null?void 0:n.id)||d})):e==null?void 0:e.filter(o=>{var u;return((u=o==null?void 0:o.key)==null?void 0:u.createUserId)===(n==null?void 0:n.id)})}},Yh=G.useModelComp(G.pinia),{routeToChildPath:dn}=G.storeToRefs(Yh),Fn=G.useMenuState(G.pinia),{activeMenuPath:e0}=G.storeToRefs(Fn),Si=G.useLoginState(),{loginUserInfo:Ra}=G.storeToRefs(Si),Jh=f0(G.pinia),{originalPath:qh}=G.storeToRefs(Jh),ct=qh.value,Zh=e=>{const a=/^name(\d+)$/,r=e==null?void 0:e.map(t=>{const i=[];for(const s in t){const f=s.match(a);f&&i.push({idx:Number(f[1]),value:t[s]})}return!i.length&&t.name&&i.push({idx:-1,value:t.name}),i.sort((s,f)=>s.idx-f.idx),{item:t,names:i}});function n(t,i){if(!t)return[];let s=[];const f=[];t.forEach(x=>{var h;return(((h=x.names)==null?void 0:h.length)>i?s:f).push(x)});const c=f.map(x=>x.item),l=new Map;s=s==null?void 0:s.sort((x,h)=>{var d,p;return((d=x==null?void 0:x.item)==null?void 0:d.orderId)-((p=h==null?void 0:h.item)==null?void 0:p.orderId)});for(const x of s){const h=x.names[x.names.length-i-1].value;l.has(h)||l.set(h,[]),l.get(h).push(x)}return[...Array.from(l.keys()).map(x=>{var m,g,y,v;const h=l.get(x);if(h[0].names.length===1&&(h!=null&&h.every(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)===-1})))return h[0].item;let d=h==null?void 0:h.filter(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)!==-1}),p=new Map;return d==null||d.forEach(E=>{let w=E==null?void 0:E.item,S="";for(let T in w)T!=null&&T.includes("name")&&(S=S===""?w==null?void 0:w[T]:S+"/"+(w==null?void 0:w[T]));for(const[T,B]of p.entries())(T.includes(S)||S!=null&&S.includes(T))&&(S=T);p.set(S,E)}),d=Array.from(p.values()),{name:x,isShow:!0,comp:"ParentItem",children:(m=n(d,i+1))==null?void 0:m.sort((E,w)=>(E==null?void 0:E.orderId)-(w==null?void 0:w.orderId)),orderId:(v=(y=(g=n(d,i+1))==null?void 0:g.sort((E,w)=>((E==null?void 0:E.orderId)??0)-((w==null?void 0:w.orderId)??0)))==null?void 0:y[0])==null?void 0:v.orderId}}),...c]}if(r)return n(r,0)},Qh=async e=>{let a=new WeakMap,r=e;return a!=null&&a[e0.value+"/"]||(r=e==null?void 0:e.map(n=>{var t;return Array.isArray(n==null?void 0:n.compData)&&(n.compData=(t=n.compData)==null?void 0:t.map(i=>{var s;return(i==null?void 0:i.key)==="header"&&(i.contents=(s=i.contents)==null?void 0:s.map(f=>((f==null?void 0:f.directiveLabel)==="#isMain"&&(f.directiveColor=!0),f))),i})),n})),r},e1=e=>{var n;let a=[],r=[];if(e!=null&&e.find(t=>t==null?void 0:t.choice)){let t=e==null?void 0:e.filter(f=>f==null?void 0:f.choice),i="";for(let f in t==null?void 0:t[0])f!=null&&f.includes("name")&&(i=(n=t==null?void 0:t[0])==null?void 0:n[f]);let s=t==null?void 0:t.map(f=>f!=null&&f.name1?f==null?void 0:f.name0:f==null?void 0:f.name);s=[...new Set(s)],s=s==null?void 0:s.map(f=>({label:f,value:f})),r=[{comp:"Radio",compData:s,name:i,isShow:!0}]}if(e!=null&&e.find(t=>t==null?void 0:t.tab)&&(e==null||e.forEach(t=>{if(!(t!=null&&t.tab))a.push(t);else if(a!=null&&a.find(i=>(i==null?void 0:i.tabInform)===(t==null?void 0:t.tab)))a=a==null?void 0:a.map(i=>{if((i==null?void 0:i.comp)==="Tabs"&&(i==null?void 0:i.tabInform)===(t==null?void 0:t.tab)){let s=i.compData,{tab:f,...c}=t;c.label=c==null?void 0:c.name,c.name="",s.push(c),i.compData=s}return i});else{let{tab:i,...s}=t,f=s==null?void 0:s.name0;s.label=s==null?void 0:s.name,s.name="";let c={comp:"Tabs",name:f,tabInform:t==null?void 0:t.tab,compData:[s],choices:t==null?void 0:t.choice};a.push(c)}})),(a==null?void 0:a.length)===0&&(r==null?void 0:r.length)===0)return e;if((r==null?void 0:r.length)===0)return a;if((a==null?void 0:a.length)===0){let t=e==null?void 0:e.findIndex(i=>(i==null?void 0:i.choice)??(i==null?void 0:i.choices));return e.splice(t,0,r==null?void 0:r[0]),e=e==null?void 0:e.map((i,s)=>{if(s>t){let f={};for(let c in i)c!=null&&c.includes("name")||(f[c]=i==null?void 0:i[c]);f.choiceName=i!=null&&i.name1?i==null?void 0:i.name0:i==null?void 0:i.name,i=f}return i}),e}else{let t=a==null?void 0:a.findIndex(i=>(i==null?void 0:i.choice)??(i==null?void 0:i.choices));return a.splice(t,0,r==null?void 0:r[0]),a=a==null?void 0:a.map((i,s)=>{if(s>t){let f={};for(let c in i)c!=null&&c.includes("name")||(f[c]=i==null?void 0:i[c]);f.choiceName=i!=null&&i.name1?i==null?void 0:i.name0:i==null?void 0:i.name,i=f}return i}),a}},r1=async e=>{let a=e;return a=a==null?void 0:a.filter(r=>r),a=e1(a),a!=null&&a.every(r=>{var n,t;return((t=(n=Object.keys(r))==null?void 0:n.filter(i=>i==null?void 0:i.includes("name")))==null?void 0:t.length)===1})?a:Zh(a)},a1=async()=>{var i,s,f,c,l,o,u,x,h,d,p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ya,Fa,Et,Ja,ka,$a,Se,Ne,Be,Ea,Qe,br,me,Fr,Cr,hr;Fn.setImportLoading(!0);let e="";const a=await sa.getInsofDataApi({key:{type:"structure",pageKey:G.cloneDeep(dn).value,systemKey:sessionStorage.getItem("systemKey")}});if(((s=(i=a==null?void 0:a.data)==null?void 0:i.result)==null?void 0:s.length)>0){let kr=(h=(x=(u=(o=(l=(c=(f=a==null?void 0:a.data)==null?void 0:f.result)==null?void 0:c[0])==null?void 0:l.value)==null?void 0:o.pageData)==null?void 0:u.compData)==null?void 0:x.find(ha=>(ha==null?void 0:ha.key)==="header"))==null?void 0:h.contents;e=(p=(d=G.cloneDeep(kr))==null?void 0:d[0])==null?void 0:p.label}let r=e0.value;(y=e0.value)!=null&&y.includes(`updateLoading${((m=Ra.value)==null?void 0:m.account)||((g=Ra.value)==null?void 0:g.账号)}`)?r=G.cloneDeep(e0).value:(w=e0.value)!=null&&w.includes(`loading${((v=Ra.value)==null?void 0:v.account)||((E=Ra.value)==null?void 0:E.账号)}`)&&(r=G.cloneDeep(dn).value+ct+`loading${((S=Ra.value)==null?void 0:S.account)||((T=Ra.value)==null?void 0:T.账号)}`);const n=await sa.getInsofDataApi({key:{pageKey:r,systemKey:sessionStorage.getItem("systemKey")}});let t=[];if(((I=(B=n==null?void 0:n.data)==null?void 0:B.result)==null?void 0:I.length)>0){let kr="",ha=[];(L=(U=n==null?void 0:n.data)==null?void 0:U.result)==null||L.forEach(We=>{var Kr,ta,Ta,ua,fr;((ta=(Kr=We==null?void 0:We.value)==null?void 0:Kr.pageData)==null?void 0:ta.comp)==="Form"&&((fr=(ua=(Ta=We==null?void 0:We.value)==null?void 0:Ta.pageData)==null?void 0:ua.compData)==null||fr.forEach(wr=>{(wr==null?void 0:wr.key)==="formContent"&&(ha=[...ha,...wr==null?void 0:wr.contents])}))});let ra=ha==null?void 0:ha.find(We=>(We==null?void 0:We.isMain)===!0);if(ra?(kr=ra==null?void 0:ra.value,e=ra==null?void 0:ra.key):kr=(Te=(z=(be=(ce=(he=(ne=(se=(M=(W=n==null?void 0:n.data)==null?void 0:W.result)==null?void 0:M[0])==null?void 0:se.value)==null?void 0:ne.pageData)==null?void 0:he.compData)==null?void 0:ce.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:be.contents)==null?void 0:z.find(We=>{var Kr,ta;return(We==null?void 0:We.key)===e||((ta=(Kr=We==null?void 0:We.optionUrl)==null?void 0:Kr.groupSelect)==null?void 0:ta[1])===e}))==null?void 0:Te.value,(A=e0.value)!=null&&A.includes(`updateLoading${((Ae=Ra.value)==null?void 0:Ae.account)||((_=Ra.value)==null?void 0:_.账号)}`)){let We=[],Kr=[];const ta=await sa.getInsofDataApi({key:{pageKey:(Ie=e0.value.split(ct+`updateLoading${((P=Ra.value)==null?void 0:P.account)||((Pe=Ra.value)==null?void 0:Pe.账号)}`))==null?void 0:Ie[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Le=(je=ta==null?void 0:ta.data)==null?void 0:je.result)==null?void 0:Le.length)>0){let Ta=(ie=n==null?void 0:n.data)==null?void 0:ie.result,ua=(ur=G.cloneDeep(Ta))==null?void 0:ur.map(async fr=>{var wr,Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N,F;if(((wr=fr==null?void 0:fr.key)==null?void 0:wr.type)==="structure"){let O=(it=(Ba=(La=(Oa=fr==null?void 0:fr.value)==null?void 0:Oa.pageData)==null?void 0:La.compData)==null?void 0:Ba.find(C=>(C==null?void 0:C.key)==="parentFormPath"))==null?void 0:it.contents;if(O){let C=await En(O,sessionStorage.getItem("systemKey"),""),R=(Ct=(vt=(Ot=(bt=fr==null?void 0:fr.value)==null?void 0:bt.pageData)==null?void 0:Ot.compData)==null?void 0:vt.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:Ct.contents,K=C==null?void 0:C.filter(Y=>(Y==null?void 0:Y.comp)==="Form");K==null||K.forEach(Y=>{var V;(V=Y==null?void 0:Y.compData)==null||V.forEach(j=>{var J,le;if((j==null?void 0:j.key)==="formContent"&&((J=j==null?void 0:j.contents)==null?void 0:J.some(Ee=>R==null?void 0:R.find(ue=>(ue==null?void 0:ue.prop)===(Ee==null?void 0:Ee.prop))))){let Ee=Y;Ee.compData=(le=Ee.compData)==null?void 0:le.map(ge=>{var qe;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(qe=ge.contents)==null?void 0:qe.map(Er=>{var Mr;return R!=null&&R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop))&&(Er.value=(Mr=R==null?void 0:R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop)))==null?void 0:Mr.value),Er})),ge});let ue={};for(let ge in Ee)ge!=="id"&&(ue[ge]=Ee[ge]);t.push({id:Y==null?void 0:Y.id,value:{pageData:ue}})}})})}else if((Nt=(Rt=ta==null?void 0:ta.data)==null?void 0:Rt.result)!=null&&Nt.find(C=>{var R,K,Y,V;return((K=(R=C==null?void 0:C.value)==null?void 0:R.pageData)==null?void 0:K.name)===((V=(Y=fr==null?void 0:fr.value)==null?void 0:Y.pageData)==null?void 0:V.name)})){let C=fr==null?void 0:fr.key;C.pageKey=G.cloneDeep(dn).value+ct+kr,t.push({id:(F=(N=(k=ta==null?void 0:ta.data)==null?void 0:k.result)==null?void 0:N.find(R=>{var K,Y,V,j;return((Y=(K=R==null?void 0:R.value)==null?void 0:K.pageData)==null?void 0:Y.name)===((j=(V=fr==null?void 0:fr.value)==null?void 0:V.pageData)==null?void 0:j.name)}))==null?void 0:F.id,key:C,value:fr==null?void 0:fr.value})}else{let C=fr==null?void 0:fr.key;C.pageKey=G.cloneDeep(dn).value+ct+kr,We.push({key:C,value:fr==null?void 0:fr.value})}}});await Promise.all(ua),(ya=(ir=n==null?void 0:n.data)==null?void 0:ir.result)==null||ya.forEach(fr=>{var Oa,La,Ba;let wr=(Oa=G.cloneDeep(fr))==null?void 0:Oa.key;wr.pageKey=G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((La=Ra.value)==null?void 0:La.account)||((Ba=Ra.value)==null?void 0:Ba.账号)}`,Fn.setChildMenu(wr.pageKey),t.push({id:fr==null?void 0:fr.id,key:wr})})}if(kr===""){fs.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Fn.setImportLoading(!1);return}if((t==null?void 0:t.length)>0){await sa.batchUpdateInsofDataApi({dataList:t}),(Fa=t==null?void 0:t[0])!=null&&Fa.key&&await Si.setLogRecordAsync({type:"保存",data:t},(Et=t==null?void 0:t[0])==null?void 0:Et.key),(We==null?void 0:We.length)>0&&(await sa.batchAddInsofDataApi({dataList:We}),(Ja=We==null?void 0:We[0])!=null&&Ja.key&&await Si.setLogRecordAsync({type:"保存",data:We},(ka=We==null?void 0:We[0])==null?void 0:ka.key));const Ta=await sa.getInsofDataApi({key:{pageKey:(Ne=e0.value.split(ct+`updateLoading${(($a=Ra.value)==null?void 0:$a.account)||((Se=Ra.value)==null?void 0:Se.账号)}`))==null?void 0:Ne[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Ea=(Be=Ta==null?void 0:Ta.data)==null?void 0:Be.result)==null?void 0:Ea.length)>0){let ua=[],fr=(Qe=n==null?void 0:n.data)==null?void 0:Qe.result;(br=G.cloneDeep(fr))==null||br.forEach(wr=>{var Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N;if(((Oa=wr==null?void 0:wr.key)==null?void 0:Oa.type)!=="structure"){let F=(it=(Ba=(La=Ta==null?void 0:Ta.data)==null?void 0:La.result)==null?void 0:Ba.filter(K=>{var Y;return((Y=K==null?void 0:K.key)==null?void 0:Y.type)==="data"}))==null?void 0:it.map(K=>K==null?void 0:K.id);ua=[...ua,...F];let O=(Ct=(vt=(Ot=(bt=G.cloneDeep(fr))==null?void 0:bt.find(K=>{var Y;return((Y=wr==null?void 0:wr.key)==null?void 0:Y.tableId)===(K==null?void 0:K.id)}))==null?void 0:Ot.value)==null?void 0:vt.pageData)==null?void 0:Ct.name,C=(k=(Nt=(Rt=Ta==null?void 0:Ta.data)==null?void 0:Rt.result)==null?void 0:Nt.find(K=>{var Y,V;return((V=(Y=K==null?void 0:K.value)==null?void 0:Y.pageData)==null?void 0:V.name)===O}))==null?void 0:k.id,R=(N=G.cloneDeep(wr))==null?void 0:N.key;R.tableId=C,R.pageKey=G.cloneDeep(dn).value+ct+kr,Kr.push({key:R,value:wr==null?void 0:wr.value})}}),(ua==null?void 0:ua.length)>0&&(ua=[...new Set(ua)],await sa.batchDeleteInsofDataApi({ids:ua})),(Fr=(me=n==null?void 0:n.data)==null?void 0:me.result)==null||Fr.forEach(wr=>{var La,Ba,it;let Oa=(La=G.cloneDeep(wr))==null?void 0:La.key;Oa.pageKey=G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((Ba=Ra.value)==null?void 0:Ba.account)||((it=Ra.value)==null?void 0:it.账号)}`,Fn.setChildMenu(Oa.pageKey),t.push({id:wr==null?void 0:wr.id,key:Oa})})}(Kr==null?void 0:Kr.length)>0&&(await sa.batchAddInsofDataApi({dataList:Kr}),(Cr=We==null?void 0:We[0])!=null&&Cr.key&&await Si.setLogRecordAsync({type:"保存",data:Kr},(hr=Kr==null?void 0:Kr[0])==null?void 0:hr.key)),fs.ElMessage.success("保存成功")}}else{if((b=(D=n==null?void 0:n.data)==null?void 0:D.result)==null||b.forEach(We=>{var ta;let Kr=(ta=G.cloneDeep(We))==null?void 0:ta.key;Kr.pageKey=G.cloneDeep(dn).value+ct+kr,Fn.setChildMenu(Kr.pageKey),t.push({id:We==null?void 0:We.id,key:Kr})}),kr===""){fs.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Fn.setImportLoading(!1),Fn.setChildMenu("");return}(X=t==null?void 0:t[0])!=null&&X.key&&(await sa.batchUpdateInsofDataApi({dataList:t}),await Si.setLogRecordAsync({type:"保存",data:t},(re=t==null?void 0:t[0])==null?void 0:re.key)),await Rf(G.cloneDeep(dn).value+ct+kr,G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((ee=Ra.value)==null?void 0:ee.account)||((Q=Ra.value)==null?void 0:Q.账号)}`),Fn.setActiveMenuPath(G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((q=Ra.value)==null?void 0:q.account)||((we=Ra.value)==null?void 0:we.账号)}`),fs.ElMessage.success("保存成功")}}Fn.setImportLoading(!1)},t1=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),G.cloneDeep(t).split("{").length-1===G.cloneDeep(t).split("}").length-1&&G.cloneDeep(t).split("【").length-1===G.cloneDeep(t).split("】").length-1&&G.cloneDeep(t).split("[").length-1===G.cloneDeep(t).split("]").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("/*").length-1===G.cloneDeep(t).split("*/").length-1&&t[t.length-1]!==","&&t[t.length-1]===a?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,""))):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return n},Oc=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),G.cloneDeep(t).split("{").length-1===G.cloneDeep(t).split("}").length-1&&G.cloneDeep(t).split("【").length-1===G.cloneDeep(t).split("】").length-1&&G.cloneDeep(t).split("[").length-1===G.cloneDeep(t).split("]").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("/*").length-1===G.cloneDeep(t).split("*/").length-1&&(t[t.length-1]===":"&&t[t.length-2]!=="r"||t[t.length-1]===a)&&(t.match(/'/g)||[]).length%2===0?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),((t==null?void 0:t[(t==null?void 0:t.length)-1])===a||t[t.length-1]===":"&&t[t.length-2]!=="r")&&(t.match(/'/g)||[]).length%2===0&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Cc=(e,a)=>{let r=0;for(let n=0;n<e.length;n++)e[n]===a&&r++;return r%2===0},x0=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),G.cloneDeep(t).split("{").length-1===G.cloneDeep(t).split("}").length-1&&G.cloneDeep(t).split("【").length-1===G.cloneDeep(t).split("】").length-1&&G.cloneDeep(t).split("[").length-1===G.cloneDeep(t).split("]").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("/*").length-1===G.cloneDeep(t).split("*/").length-1&&t[t.length-1]===a&&Cc(t,"'")?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&Cc(t,"'")&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},n1=f0(G.pinia),{originalPath:fw}=G.storeToRefs(n1),i1=e=>{var r,n;let a=(n=(r=e==null?void 0:e.slice(1,(e==null?void 0:e.length)-1))==null?void 0:r.split(","))==null?void 0:n.map(t=>{var i,s,f,c,l;return(l=(c=(f=(s=(i=t==null?void 0:t.split("=="))==null?void 0:i[0])==null?void 0:s.replaceAll("'",""))==null?void 0:f.split("#"))==null?void 0:c[0])==null?void 0:l.trim()});return a=JSON.stringify(a),a},mf=e=>{let a=G.cloneDeep(e),r=[],n="",t="",i=(a==null?void 0:a[0])==="["?Oc(a.slice(1,a.length-1),","):Oc(a,",");return i==null||i.forEach((s,f)=>{var l,o,u,x,h,d,p,m;let c=s;if(c[c.length-1]===","&&(c=c.slice(0,c.length-1)),c.slice(1,(c==null?void 0:c.length)-1).includes("[")&&(c==null?void 0:c[0])==="["){let g=mf(c);if((i==null?void 0:i.length)===2&&((o=i==null?void 0:i[0])==null?void 0:o[((l=i==null?void 0:i[0])==null?void 0:l.length)-1])===":"){let y=i[f-1].replaceAll(",","").trim();y[y.length-1]===":"&&(y=y.slice(0,y.length-1));let v=(u=mf(c))==null?void 0:u.parentStringContent;v="["+((x=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1))==null?void 0:x.replaceAll("'",'"'))+"]";let E={[y]:v};r.push(E)}else t=t+c+",";n=n+(g==null?void 0:g.stringContent),t=t+(g==null?void 0:g.parentStringContent),r=[...r,...g==null?void 0:g.parentColumns]}else if((c==null?void 0:c[0])!=="["&&c[c.length-1]===":")c=c.slice(0,c.length-1),n=n+c+",",t=t+((h=c==null?void 0:c.split("#"))==null?void 0:h[0])+",";else if((c==null?void 0:c[0])==="["&&i[f-1]){(p=(d=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1))==null?void 0:d.split(","))==null||p.forEach(v=>{n=n+v+","});let g=i[f-1].replaceAll(",","").trim();g[g.length-1]===":"&&(g=g.slice(0,g.length-1));let y={[g]:i1(c)};r.push(y)}else n=n+c+",",t=t+((m=c==null?void 0:c.split("#"))==null?void 0:m[0])+","}),{parentColumns:r,stringContent:n,parentStringContent:t}},gf=G.useMenuState(G.pinia),{activeMenuPath:ls}=G.storeToRefs(gf),s1=G.useUnit(G.pinia),{chooseTitle:Ti}=G.storeToRefs(s1);let Ir="$R";const f1=Bs(G.pinia),{multipleTableConst:Rc}=G.storeToRefs(f1),c1=G.useLoginState(G.pinia),{loginUserInfo:cw,systemInfo:Nc}=G.storeToRefs(c1),ql=G.useModelComp(G.pinia),l1=f0(G.pinia),{originalPath:o1}=G.storeToRefs(l1),{payloadTypes:lw}=G.storeToRefs(ql),pn=(e,a)=>(a==null?void 0:a.split(",")).some(n=>Object.keys(e).some(t=>t.startsWith("name")&&e[t]===n)),qs={onNumSlice:Wh,onRandomContents:Xh,onConditionContents:Uh,onPaceContents:Bh,onMainTagContents:Mh,onFatherPaceContents:Lh,onButtonContents:Ph,onPamButtonContents:Nh,onRowButtonContents:Rh},Zl=async e=>{const a=e.slice(0,e.indexOf("(")).trim(),r=qs==null?void 0:qs[a];if(typeof r!="function"){console.log(`找不到函数: ${a}`);return}const n=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),t=await new Function(`return [${n}]`)();return r(...Array.isArray(t)?t:[t])},vf=(e,a,r="children")=>{var f;let n=[],t=[],i=[],s=0;for(const c of e){const l=a.some(x=>{var d,p,m,g,y,v,E,w;const[h]=x.split(".");return h===c.prop||h===c.label||h===((g=(d=c.prop)==null?void 0:d.split("."))==null?void 0:g[((m=(p=c.prop)==null?void 0:p.split("."))==null?void 0:m.length)-1])||h===((w=(y=c.prop)==null?void 0:y.split("."))==null?void 0:w[((E=(v=c.prop)==null?void 0:v.split("."))==null?void 0:E.length)-1].replace(/\d+$/,""))}),o=a.filter(x=>x.includes(".")).map(x=>x.split(".").slice(1).join("."));s=s+1;let u;if(l&&(u={...c},t.push(s),i.push(u==null?void 0:u.prop),delete u[r]),c[r]){const x=(f=vf(c[r],(o==null?void 0:o.length)>0?o:a,r))==null?void 0:f.contents;x.length&&(t.push(s),i.push(u==null?void 0:u.prop),s=s+1,u=u||{...c},n=[...n,...x],u=x)}u&&!Array.isArray(u)&&n.push(u)}return{contents:n,ids:t,props:i}},u1=e=>{if(!Gt(e))return[e];const a=new Function(`return ${e}`)(),r=[];return((t,i="")=>{for(const s of t)if(Array.isArray(s)){const[f,c]=s;Array.isArray(c)?c.forEach(l=>r.push(`"${f}:${l}"`)):r.push(i?`"${i}:${f}"`:'"'+f+'"')}else r.push('"'+s+'"')})(a),r},h1=async(e,a,r,n,t,i)=>{var l,o,u,x,h,d,p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ya,Fa,Et,Ja,ka,$a,Se,Ne,Be,Ea,Qe,br,me,Fr,Cr,hr,kr,ha,ra,We,Kr,ta,Ta,ua,fr,wr,Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N,F,O,C,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,tn,nn,sn,Pt,Rn;let s=[],f=(o=(l=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:l.contents)==null?void 0:o.filter(er=>!(er!=null&&er.columnPath)&&(er==null?void 0:er.label)!=="操作"),c=(x=(u=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:u.contents)==null?void 0:x.filter(er=>er==null?void 0:er.columnPath);if(Array.isArray((d=(h=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:h.contents)==null?void 0:d[0])){let er=(g=(m=(p=e==null?void 0:e.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:p.contents)==null?void 0:m[0])==null?void 0:g.filter(de=>de==null?void 0:de.columnPath);c=[...c,...er]}for(let er=0;er<(c==null?void 0:c.length);er++){let de=G.cloneDeep(c==null?void 0:c[er]);if(de.columnPath=(v=(y=de==null?void 0:de.columnPath)==null?void 0:y.replaceAll("{",""))==null?void 0:v.replaceAll("}",""),de||(de=(T=(S=gn((w=(E=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:E.contents)==null?void 0:w[0]))==null?void 0:S.filter(Re=>Re==null?void 0:Re.columnPath))==null?void 0:T[er]),de!=null&&de.columnPath&&(de==null?void 0:de.columnPath)!==""){let Re="";if((B=de==null?void 0:de.columnPath)!=null&&B.includes("@Type")||(Re=Re===""?Re+"@Type:Manual":Re+",@Type:Manual"),(I=de==null?void 0:de.columnPath)!=null&&I.includes("@SonSync")||(Re=Re===""?Re+"@SonSync:No":Re+",@SonSync:No"),(U=de==null?void 0:de.columnPath)!=null&&U.includes("@FatherSync")||(Re=Re===""?Re+"@FatherSync:Yes":Re+",@FatherSync:Yes"),((W=de==null?void 0:de.columnPath)==null?void 0:W[((L=de==null?void 0:de.columnPath)==null?void 0:L.length)-1])===")"){let Lr="";((se=(M=de.columnPath)==null?void 0:M.split("("))==null?void 0:se.length)!==((he=(ne=de.columnPath)==null?void 0:ne.split(")"))==null?void 0:he.length)?Lr=((be=de.columnPath)==null?void 0:be.slice(0,(ce=de.columnPath)==null?void 0:ce.length))+","+Re+")":Lr=((Te=de.columnPath)==null?void 0:Te.slice(0,((z=de.columnPath)==null?void 0:z.length)-1))+","+Re+")",de.columnPath=Re===""?de.columnPath:Lr}else(Ae=de==null?void 0:de.columnPath)!=null&&Ae.includes("@")?de.columnPath=de.columnPath+","+Re+")":de.columnPath=de.columnPath+"("+Re+")"}let Nn=(_=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="dictContents"))==null?void 0:_.contents,P0="",Pn=(b=(D=(A=c==null?void 0:c[er])==null?void 0:A.columnPath)==null?void 0:D.replace("[",Ir))==null?void 0:b.split(Ir),zr=(ee=(re=(X=Pn==null?void 0:Pn[(Pn==null?void 0:Pn.length)-1])==null?void 0:X.replace("(",Ir))==null?void 0:re.split(Ir))==null?void 0:ee[0];zr=zr==null?void 0:zr.slice(0,(zr==null?void 0:zr.length)-1);let Ge=(Pe=(P=(we=(q=G.cloneDeep((Q=c==null?void 0:c[er])==null?void 0:Q.columnPath))==null?void 0:q.split("["+zr+"]"))==null?void 0:we[0])==null?void 0:P.replaceAll("{",""))==null?void 0:Pe.replaceAll("}","");(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&((je=(Ie=Ti.value)==null?void 0:Ie[0])!=null&&je.value)&&(Ge=Ge+((ie=(Le=Ti.value)==null?void 0:Le[0])==null?void 0:ie.value));let xa="",Mn="",cr="",Ua=G.cloneDeep(zr);if(zr=(ir=(ur=zr==null?void 0:zr.split(":"))==null?void 0:ur[0])==null?void 0:ir.replaceAll("'",""),Ge===""&&((Fa=(ya=Ti.value)==null?void 0:ya[0])!=null&&Fa.value&&((Ja=(Et=Ti.value)==null?void 0:Et[0])==null?void 0:Ja.value)!==""?Ge=ls.value+"/"+(($a=(ka=Ti.value)==null?void 0:ka[0])==null?void 0:$a.value):Ge=ls.value),Ge!=null&&Ge.includes("[")){let Re=(Ea=(Be=(Ne=(Se=Ge==null?void 0:Ge.split("["))==null?void 0:Se[1])==null?void 0:Ne.split("]"))==null?void 0:Be[0])==null?void 0:Ea.split("/");Mn=Ge,xa=(me=(br=(Qe=Ge==null?void 0:Ge.split("["))==null?void 0:Qe[1])==null?void 0:br.split("]"))==null?void 0:me[0];let Lr="";r==null||r.forEach(aa=>{var Br,Me,M0,te,H;((Me=(Br=aa==null?void 0:aa.value)==null?void 0:Br.pageData)==null?void 0:Me.name)===(Re==null?void 0:Re[0])&&((H=(te=(M0=aa==null?void 0:aa.value)==null?void 0:M0.pageData)==null?void 0:te.compData)==null||H.forEach(Z=>{var pe;(Z==null?void 0:Z.key)==="formContent"&&((pe=Z==null?void 0:Z.contents)==null||pe.forEach(xe=>{var Sr;if((xe==null?void 0:xe.prop)===(Re==null?void 0:Re[1])){let Zr=fo((Sr=G.cloneDeep(xe))==null?void 0:Sr.optionUrl,n);Lr=(xe==null?void 0:xe.value)||Zr||""}}))}))}),cr=Lr,Ge=((Fr=Ge==null?void 0:Ge.split("["))==null?void 0:Fr[0])+Lr}(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&(Ge=Ge.slice(0,(Ge==null?void 0:Ge.length)-1));let oe=[];s!=null&&s.every(Re=>Array.isArray(Re))&&(s==null?void 0:s.length)>0&&(oe=s==null?void 0:s[0]);let Dr=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});((hr=(Cr=Dr==null?void 0:Dr.data)==null?void 0:Cr.result)==null?void 0:hr.length)===0&&(Ge=(ha=(kr=Ge==null?void 0:Ge.split("/"))==null?void 0:kr.filter((Re,Lr)=>{var aa;return Lr!==((aa=Ge==null?void 0:Ge.split("/"))==null?void 0:aa.length)-1}))==null?void 0:ha.join("/"),Dr=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}));let Ce=(ta=(Kr=(We=(ra=Ua==null?void 0:Ua.split("{"))==null?void 0:ra[0])==null?void 0:We.replace("[",Ir))==null?void 0:Kr.split(Ir))==null?void 0:ta[0];const Ca=await sa.getInsofDataApi({key:{pageKey:t??ls.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}}),qa=[];if((ua=(Ta=Ca==null?void 0:Ca.data)==null?void 0:Ta.result)==null||ua.forEach(Re=>{var Lr;qa.push({id:Re==null?void 0:Re.id,value:Re.value.tableData,parentId:(Lr=Re==null?void 0:Re.key)==null?void 0:Lr.parentId})}),(qa==null?void 0:qa.length)===0){const Re=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}});(wr=(fr=Re==null?void 0:Re.data)==null?void 0:fr.result)==null||wr.forEach(Lr=>{var aa;qa.push({id:Lr==null?void 0:Lr.id,value:Lr.value.tableData,parentId:(aa=Lr==null?void 0:Lr.key)==null?void 0:aa.parentId})})}if(Array.isArray((Oa=Dr==null?void 0:Dr.data)==null?void 0:Oa.result)&&((Ba=(La=Dr==null?void 0:Dr.data)==null?void 0:La.result)==null?void 0:Ba.length)>0){let Re;if((Ce==null?void 0:Ce[(Ce==null?void 0:Ce.length)-1])===":"&&(Ce=Ce==null?void 0:Ce.slice(1,(Ce==null?void 0:Ce.length)-1)),Ce=(Ot=(bt=Ce==null?void 0:Ce.split(":"))==null?void 0:bt[((it=Ce==null?void 0:Ce.split(":"))==null?void 0:it.length)-1])==null?void 0:Ot.replaceAll("'",""),((Ct=(vt=Dr==null?void 0:Dr.data)==null?void 0:vt.result)==null?void 0:Ct.find(te=>{var H;return pn((H=te==null?void 0:te.value)==null?void 0:H.pageData,Ce)}))??((Nt=(Rt=Dr==null?void 0:Dr.data)==null?void 0:Rt.result)==null?void 0:Nt.find(te=>{var H;return pn((H=te==null?void 0:te.value)==null?void 0:H.pageData,zr)}))){let te=(N=(k=Dr==null?void 0:Dr.data)==null?void 0:k.result)==null?void 0:N.sort((H,Z)=>H.id-Z.id);Re=await(te==null?void 0:te.map(async H=>{var pe,xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn,He,Vn,jn,Yn,Jn,lr,or,Xe,fa,Ln,ni,ii,si,fi,ci,li,oi,ui,hi,xi,di,pi,mi,gi,vi,_i,pa,$e,De,Ye,ma,ve,st,vr,sr,Za;let Z;if(pn((pe=H==null?void 0:H.value)==null?void 0:pe.pageData,Ce)||pn((xe=H==null?void 0:H.value)==null?void 0:xe.pageData,zr)&&((Zr=(Sr=H==null?void 0:H.value)==null?void 0:Sr.pageData)==null?void 0:Zr.name)===zr){Z=G.cloneDeep((gr=(na=H==null?void 0:H.value)==null?void 0:na.pageData)==null?void 0:gr.compData);let Ka;pn((da=H==null?void 0:H.value)==null?void 0:da.pageData,Ce)&&Ce===zr?(Or=(Ar=H==null?void 0:H.value)==null?void 0:Ar.pageData)!=null&&Or.name1?Ka={name:(Vr=(Ur=H==null?void 0:H.value)==null?void 0:Ur.pageData)==null?void 0:Vr.name,name0:(Gr=(mr=H==null?void 0:H.value)==null?void 0:mr.pageData)==null?void 0:Gr.name0,name1:(jr=(xr=H==null?void 0:H.value)==null?void 0:xr.pageData)==null?void 0:jr.name1}:Ka={name:(fn=(Tt=H==null?void 0:H.value)==null?void 0:Tt.pageData)==null?void 0:fn.name,name0:(ln=(cn=H==null?void 0:H.value)==null?void 0:cn.pageData)==null?void 0:ln.name0}:Ka={name:((un=(on=H==null?void 0:H.value)==null?void 0:on.pageData)==null?void 0:un.name0)||((xn=(hn=H==null?void 0:H.value)==null?void 0:hn.pageData)==null?void 0:xn.name)},Z.push({key:"name",contents:Ka});const $t=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:H==null?void 0:H.id,type:"data"}});let Tn;if(((Vn=(He=$t==null?void 0:$t.data)==null?void 0:He.result)==null?void 0:Vn.length)>0&&((Yn=(jn=Z==null?void 0:Z.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:jn.contents)!=null&&Yn.every(Fe=>!(Fe!=null&&Fe.columnPath))))if(Tn=(lr=(Jn=$t==null?void 0:$t.data)==null?void 0:Jn.result)==null?void 0:lr.map(Fe=>{var Oe;let Ue=[];return Ue.push({id:Fe==null?void 0:Fe.id}),Ue.push((Oe=Fe==null?void 0:Fe.value)==null?void 0:Oe.tableData),Ue}),Z.push({key:"tableContents",contents:Ii(Tn,(Ln=(fa=(Xe=(or=H==null?void 0:H.value)==null?void 0:or.pageData)==null?void 0:Xe.compData)==null?void 0:fa.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:Ln.contents)}),Z.push({key:"contentTableId",contents:H==null?void 0:H.id}),Z.push({key:"ownerId",contents:H==null?void 0:H.id}),xa!==""&&(Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Mn}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnPath")),Z.push({key:"columnPath",contents:xa}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:zr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let Fe;Array.isArray((ii=(ni=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ni.contents)==null?void 0:ii[0])?Fe=(ci=gn((fi=(si=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:si.contents)==null?void 0:fi[0]))==null?void 0:ci.map(Ue=>Ue==null?void 0:Ue.prop):Fe=(oi=(li=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:li.contents)==null?void 0:oi.map(Ue=>Ue==null?void 0:Ue.prop),Z==null||Z.forEach(Ue=>{var Oe,Kt;if(((Ue==null?void 0:Ue.key)==="contentTableId"||(Ue==null?void 0:Ue.key)==="ownerId")&&(oe==null||oe.push(Ue)),(Ue==null?void 0:Ue.key)==="header"&&(oe=oe==null?void 0:oe.map(_r=>{var Ke,Qa,et,wt,St,At;return(_r==null?void 0:_r.key)==="header"&&(Array.isArray((Ke=Ue==null?void 0:Ue.contents)==null?void 0:Ke[0])&&(Ue.contents=(Qa=Ue==null?void 0:Ue.contents)==null?void 0:Qa[0]),Array.isArray((et=_r==null?void 0:_r.contents)==null?void 0:et[0])?(_r.contents=(wt=_r.contents)==null?void 0:wt[0],_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=[(St=_r.contents)==null?void 0:St.filter(Wa=>(Wa==null?void 0:Wa.prop)!=="")]):(_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=(At=_r.contents)==null?void 0:At.filter(Wa=>(Wa==null?void 0:Wa.prop)!==""))),_r})),(Ue==null?void 0:Ue.key)==="tableContents"){let _r=(Kt=(Oe=Ue==null?void 0:Ue.contents)==null?void 0:Oe.map(Ke=>d0(Ke,Fe)))==null?void 0:Kt.filter(Ke=>{var Qa,et;return!(((Qa=Object.keys(Ke))==null?void 0:Qa.length)===1&&((et=Object.keys(Ke))==null?void 0:et[0])==="id")});oe=oe==null?void 0:oe.map(Ke=>{var Qa,et,wt,St,At,Wa,za,rr,Ze;if((Ke==null?void 0:Ke.key)==="tableContents"){let Mt=[];if((_r==null?void 0:_r.length)===0)Mt=Ke==null?void 0:Ke.contents;else{let ia=(wt=(et=(Qa=de==null?void 0:de.columnPath)==null?void 0:Qa.replace("(",Ir))==null?void 0:et.split(Ir))==null?void 0:wt[1],ga=(St=x0(ia,","))==null?void 0:St.map(Rr=>((Rr==null?void 0:Rr[(Rr==null?void 0:Rr.length)-1])===","&&(Rr=Rr==null?void 0:Rr.slice(0,(Rr==null?void 0:Rr.length)-1)),Rr));ga=(Wa=(At=ga==null?void 0:ga.find(Rr=>Rr==null?void 0:Rr.includes("@Filter")))==null?void 0:At.split("@Filter"))==null?void 0:Wa[1],ga=(za=ga==null?void 0:ga.slice(1,(ga==null?void 0:ga.length)-1))==null?void 0:za.replaceAll("'","");let Ha="";if(ga!=null&&ga.includes("[")){Ha=(rr=ga==null?void 0:ga.split("="))==null?void 0:rr[0];let Rr=(Ze=Ke==null?void 0:Ke.contents)==null?void 0:Ze.map(Lt=>Lt==null?void 0:Lt[Ha]);_r=_r==null?void 0:_r.filter(Lt=>Rr==null?void 0:Rr.find(u0=>(Lt==null?void 0:Lt[Ha])===u0))}_r==null||_r.forEach(Rr=>{var Lt,u0,h0;if(!(!(Ke!=null&&Ke.contents)||((Lt=Ke==null?void 0:Ke.contents)==null?void 0:Lt.length)===0))if(Ha==="")(u0=Ke==null?void 0:Ke.contents)==null||u0.forEach(ze=>{let Je=Object.assign({},Rr,ze);Mt.push(Je)});else{let ze=(h0=Ke==null?void 0:Ke.contents)==null?void 0:h0.find(L0=>(L0==null?void 0:L0[Ha])===(Rr==null?void 0:Rr[Ha])),Je=Object.assign({},Rr,ze);Mt.push(Je)}})}Ke.contents=Mt}return Ke})}})}else{let Fe,Ue=(vi=(gi=(mi=(pi=(di=(xi=(hi=(ui=H==null?void 0:H.value)==null?void 0:ui.pageData)==null?void 0:hi.compData)==null?void 0:xi.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:di.contents)==null?void 0:pi.find(Oe=>Oe==null?void 0:Oe.columnPath))==null?void 0:mi.columnPath)==null?void 0:gi.split("["))==null?void 0:vi[0];if(ls.value!==Ge&&i!==Ge)Fe=await En(Ge,sessionStorage.getItem("systemKey"),"",!1,[],!1,n,Ge);else{let Oe=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),Kt=(De=($e=(pa=(_i=Oe==null?void 0:Oe.data)==null?void 0:_i.result)==null?void 0:pa.find(Ke=>{var Qa,et,wt,St,At,Wa;return pn((Qa=Ke==null?void 0:Ke.value)==null?void 0:Qa.pageData,zr)&&((wt=(et=H==null?void 0:H.value)==null?void 0:et.pageData)==null?void 0:wt.name)===((At=(St=Ke==null?void 0:Ke.value)==null?void 0:St.pageData)==null?void 0:At.name)||pn((Wa=Ke==null?void 0:Ke.value)==null?void 0:Wa.pageData,Ce)&&Ce!==zr}))==null?void 0:$e.value)==null?void 0:De.pageData;P0=(Za=(sr=(vr=(st=(ve=(ma=(Ye=Kt==null?void 0:Kt.compData)==null?void 0:Ye.find(Ke=>(Ke==null?void 0:Ke.key)==="header"))==null?void 0:ma.contents)==null?void 0:ve.find(Ke=>Ke==null?void 0:Ke.columnPath))==null?void 0:st.columnPath)==null?void 0:vr.replace("(",Ir))==null?void 0:sr.split(Ir))==null?void 0:Za[1],Fe=await En(Ue,sessionStorage.getItem("systemKey"),""),(Fe==null?void 0:Fe.length)>0&&(Fe[0].name=Ce)}Fe==null||Fe.forEach(Oe=>{var Kt,_r,Ke,Qa,et,wt,St,At,Wa,za,rr,Ze,Mt,ia,ga,Ha,Rr,Lt,u0;if(pn(Oe,zr)&&((_r=(Kt=H==null?void 0:H.value)==null?void 0:Kt.pageData)==null?void 0:_r.name)===(Oe==null?void 0:Oe.name)||pn(Oe,Ce)&&Ce!==zr){Z=((Ke=Oe==null?void 0:Oe.compData)==null?void 0:Ke.filter(ze=>(ze==null?void 0:ze.key)!=="tableContents"))||[],Fe=(et=(Qa=Oe==null?void 0:Oe.compData)==null?void 0:Qa.find(ze=>(ze==null?void 0:ze.key)==="tableContents"))==null?void 0:et.contents,Tn=Fe;let h0;if((pn(Oe,zr)&&Ce===zr||pn(Oe,Ce)&&Ce!==zr)&&((St=(wt=e==null?void 0:e.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:wt.contents)==null?void 0:St.length)===2?(Wa=(At=H==null?void 0:H.value)==null?void 0:At.pageData)!=null&&Wa.name1?h0={name:Oe==null?void 0:Oe.name,name0:Oe==null?void 0:Oe.name0,name1:Oe==null?void 0:Oe.name1}:h0={name:Oe==null?void 0:Oe.name,name0:Oe==null?void 0:Oe.name0}:h0={name:(Oe==null?void 0:Oe.name0)||(Oe==null?void 0:Oe.name)},Z.push({key:"name",contents:h0}),Z.push({key:"tableContents",contents:Ii(Tn,(rr=(za=Oe==null?void 0:Oe.compData)==null?void 0:za.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:rr.contents)}),Z.push({key:"contentTableId",contents:(Fe==null?void 0:Fe.length)!==0?((Ze=Oe==null?void 0:Oe.compData)==null?void 0:Ze.id)??(Oe==null?void 0:Oe.id):H==null?void 0:H.id}),Z.push({key:"ownerId",contents:Oe==null?void 0:Oe.id}),xa!==""&&(Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Mn}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnPath")),Z.push({key:"columnPath",contents:xa}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:zr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let ze;Array.isArray((ia=(Mt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Mt.contents)==null?void 0:ia[0])?ze=(Rr=gn((Ha=(ga=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:ga.contents)==null?void 0:Ha[0]))==null?void 0:Rr.map(Je=>Je==null?void 0:Je.prop):ze=(u0=(Lt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Lt.contents)==null?void 0:u0.map(Je=>Je==null?void 0:Je.prop),Z==null||Z.forEach(Je=>{var L0,Ec;if(((Je==null?void 0:Je.key)==="contentTableId"||(Je==null?void 0:Je.key)==="ownerId")&&(oe==null||oe.push(Je)),(Je==null?void 0:Je.key)==="header"&&(oe=oe==null?void 0:oe.map(Wr=>{var Xr,qn,Zn,yi,ki,Ei;return(Wr==null?void 0:Wr.key)==="header"&&(Array.isArray((Xr=Je==null?void 0:Je.contents)==null?void 0:Xr[0])&&(Je.contents=(qn=Je==null?void 0:Je.contents)==null?void 0:qn[0]),Array.isArray((Zn=Wr==null?void 0:Wr.contents)==null?void 0:Zn[0])?(Wr.contents=(yi=Wr.contents)==null?void 0:yi[0],Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=[(ki=Wr.contents)==null?void 0:ki.filter(wn=>(wn==null?void 0:wn.prop)!=="")]):(Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=(Ei=Wr.contents)==null?void 0:Ei.filter(wn=>(wn==null?void 0:wn.prop)!==""))),Wr})),(Je==null?void 0:Je.key)==="tableContents"){let Wr=(Ec=(L0=Je==null?void 0:Je.contents)==null?void 0:L0.map(Xr=>d0(Xr,ze)))==null?void 0:Ec.filter(Xr=>{var qn,Zn;return!(((qn=Object.keys(Xr))==null?void 0:qn.length)===1&&((Zn=Object.keys(Xr))==null?void 0:Zn[0])==="id")});oe=oe==null?void 0:oe.map(Xr=>{var qn,Zn,yi,ki,Ei,wn,Tc,wc,Sc;if((Xr==null?void 0:Xr.key)==="tableContents"){let is=[];if((Wr==null?void 0:Wr.length)===0)is=Xr==null?void 0:Xr.contents;else{let _h=(yi=(Zn=(qn=de==null?void 0:de.columnPath)==null?void 0:qn.replace("(",Ir))==null?void 0:Zn.split(Ir))==null?void 0:yi[1],rt=(ki=x0(_h,","))==null?void 0:ki.map(Qr=>((Qr==null?void 0:Qr[(Qr==null?void 0:Qr.length)-1])===","&&(Qr=Qr==null?void 0:Qr.slice(0,(Qr==null?void 0:Qr.length)-1)),Qr));rt=(wn=(Ei=rt==null?void 0:rt.find(Qr=>Qr==null?void 0:Qr.includes("@Filter")))==null?void 0:Ei.split("@Filter"))==null?void 0:wn[1],rt=(Tc=rt==null?void 0:rt.slice(1,(rt==null?void 0:rt.length)-1))==null?void 0:Tc.replaceAll("'","");let B0="";if(rt!=null&&rt.includes("[")){B0=(wc=rt==null?void 0:rt.split("="))==null?void 0:wc[0];let Qr=(Sc=Xr==null?void 0:Xr.contents)==null?void 0:Sc.map(Sn=>Sn==null?void 0:Sn[B0]);Wr=Wr==null?void 0:Wr.filter(Sn=>Qr==null?void 0:Qr.find(ss=>(Sn==null?void 0:Sn[B0])===ss))}Wr==null||Wr.forEach(Qr=>{var Sn,ss,Ac;if(!(!(Xr!=null&&Xr.contents)||((Sn=Xr==null?void 0:Xr.contents)==null?void 0:Sn.length)===0))if(B0==="")(ss=Xr==null?void 0:Xr.contents)==null||ss.forEach(js=>{let Ys=Object.assign({},Qr,js);is.push(Ys)});else{let js=(Ac=Xr==null?void 0:Xr.contents)==null?void 0:Ac.find(Js=>(Js==null?void 0:Js[B0])===(Qr==null?void 0:Qr[B0])),Ys=Object.assign({},Qr,js);is.push(Ys)}})}Xr.contents=is}return Xr})}})}}})}}})),await Promise.all(Re)}let Lr=[];oe!=null&&oe.every(te=>Array.isArray(te))||(oe=[oe]),oe==null||oe.forEach(te=>{Lr!=null&&Lr.find(H=>{var Z,pe,xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn;return((Sr=(xe=(pe=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:pe[((Z=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)==null?void 0:Sr.name)===((da=(gr=(na=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:na[((Zr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Zr.length)-1])==null?void 0:gr.contents)==null?void 0:da.name)&&((Vr=(Ur=(Or=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Or[((Ar=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Ar.length)-1])==null?void 0:Ur.contents)==null?void 0:Vr.name0)===((jr=(xr=(Gr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Gr[((mr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:mr.length)-1])==null?void 0:xr.contents)==null?void 0:jr.name0)&&((ln=(cn=(fn=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:fn[((Tt=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Tt.length)-1])==null?void 0:cn.contents)==null?void 0:ln.name1)===((xn=(hn=(un=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:un[((on=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:on.length)-1])==null?void 0:hn.contents)==null?void 0:xn.name1)})||Lr.push(te)}),Lr=Lr==null?void 0:Lr.map(te=>{var Z,pe;let H=[];return te==null||te.forEach(xe=>{(xe==null?void 0:xe.key)!=="name"&&H.push(xe)}),H.push((pe=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:pe[((Z=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:Z.length)-1]),H}),oe=Lr==null?void 0:Lr.sort((te,H)=>{var Z,pe,xe,Sr,Zr,na;return((xe=(pe=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:pe[((Z=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)-((na=(Zr=H==null?void 0:H.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Zr[((Sr=H==null?void 0:H.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Sr.length)-1])==null?void 0:na.contents)}),oe=oe==null?void 0:oe.filter(te=>te!==void 0),oe=oe==null?void 0:oe.map(te=>{var Z,pe;let H=(pe=Es((Z=te==null?void 0:te.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:Z.contents))==null?void 0:pe.filter(xe=>xe!=="操作"&&xe);return te=te==null?void 0:te.map(xe=>{var Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn,He,Vn,jn,Yn,Jn,lr,or,Xe,fa,Ln,ni,ii,si,fi,ci,li,oi,ui,hi,xi,di,pi,mi,gi,vi,_i;if((xe==null?void 0:xe.key)==="tableContents"){let pa=[];if((gr=(na=(Zr=(Sr=de==null?void 0:de.columnPath)==null?void 0:Sr.split("@Type"))==null?void 0:Zr[1])==null?void 0:na.toUpperCase())!=null&&gr.includes("MANUAL")){qa==null||qa.forEach(Ye=>{Ye.value.id=Ye==null?void 0:Ye.id,pa.push(Ye==null?void 0:Ye.value)});let $e=[];((Ar=(da=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:da.contents)==null?void 0:Ar.length)<=2&&!Array.isArray((Ur=(Or=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:Or.contents)==null?void 0:Ur[0])&&((Vr=xe.contents)==null||Vr.forEach(Ye=>{let ma=(Ye==null?void 0:Ye.length)!==1?d0(Ye,H):Ye==null?void 0:Ye[0];$e.push(ma)}));let De=H==null?void 0:H[0];$e==null||$e.forEach(Ye=>{pa!=null&&pa.find(ma=>(ma==null?void 0:ma[De])===(Ye==null?void 0:Ye[De]))||pa.push(Ye)})}else(fn=(Tt=(jr=x0((xr=(Gr=(mr=de==null?void 0:de.columnPath)==null?void 0:mr.replace("(",Ir))==null?void 0:Gr.split(Ir))==null?void 0:xr[1],","))==null?void 0:jr.find($e=>$e==null?void 0:$e.includes("@FatherSync")))==null?void 0:Tt.toUpperCase())!=null&&fn.includes("YES")?(cn=xe.contents)==null||cn.forEach($e=>{var ma,ve,st;let De=($e==null?void 0:$e.length)!==1?d0($e,H):$e==null?void 0:$e[0],Ye=qa==null?void 0:qa.filter(vr=>(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id));if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Za={};for(let Ka in sr)(sr==null?void 0:sr[Ka])!==void 0&&(Za[Ka]=sr==null?void 0:sr[Ka]);Ye=Za,sr.id=vr==null?void 0:vr.id,pa.push(sr)});else{De.id=((ve=(ma=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ma.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((st=De==null?void 0:De.id)==null?void 0:st.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,pa.push(De)}}):(ln=xe.contents)==null||ln.forEach($e=>{var ma,ve,st;let De=($e==null?void 0:$e.length)!==1?d0($e,H):$e==null?void 0:$e[0],Ye=qa==null?void 0:qa.filter(vr=>{var sr,Za;return(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id)||((sr=vr==null?void 0:vr.id)==null?void 0:sr.toString())===((Za=De==null?void 0:De.id)==null?void 0:Za.toString())});if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Za={};for(let Ka in sr)(sr==null?void 0:sr[Ka])!==void 0&&(Za[Ka]=sr==null?void 0:sr[Ka]);Ye=Za,sr.id=vr==null?void 0:vr.id,pa.push(sr)});else{De.id=((ve=(ma=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ma.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((st=De==null?void 0:De.id)==null?void 0:st.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,pa.push(De)}});xe.contents=pa}if((xe==null?void 0:xe.key)==="header"){let pa=Nn==null?void 0:Nn.find(ve=>{var st,vr,sr,Za,Ka,$t,Tn;return(Tn=de==null?void 0:de.columnPath)==null?void 0:Tn.includes(($t=(vr=(st=ve==null?void 0:ve.value)==null?void 0:st.split("%$%"))==null?void 0:vr[0])==null?void 0:$t.slice(0,((Ka=(Za=(sr=ve==null?void 0:ve.value)==null?void 0:sr.split("%$%"))==null?void 0:Za[0])==null?void 0:Ka.length)-1))}),$e=pa==null?void 0:pa.key;if(((on=$e==null?void 0:$e.split("["))==null?void 0:on.length)>2){let ve=mf($e);$e=Th((hn=(un=ve==null?void 0:ve.stringContent)==null?void 0:un.split(","))==null?void 0:hn.filter(st=>st!==""),ve==null?void 0:ve.parentColumns)}else $e=(Vn=(He=(xn=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:xn.replaceAll("[",""))==null?void 0:He.replaceAll("]",""))==null?void 0:Vn.split(",");let De=(ii=(ni=(Ln=(Jn=(Yn=(jn=pa==null?void 0:pa.value)==null?void 0:jn.split("("))==null?void 0:Yn[0])==null?void 0:Jn.split("["))==null?void 0:Ln[((fa=(Xe=(or=(lr=pa==null?void 0:pa.value)==null?void 0:lr.split("("))==null?void 0:or[0])==null?void 0:Xe.split("["))==null?void 0:fa.length)-1])==null?void 0:ni.split("]"))==null?void 0:ii[0],Ye=(ci=(fi=(si=De==null?void 0:De.replaceAll("'",""))==null?void 0:si.split(","))==null?void 0:fi.filter(ve=>ve==null?void 0:ve.includes('"')))==null?void 0:ci.map(ve=>ve==null?void 0:ve.replaceAll('"',""));De=(oi=(li=De==null?void 0:De.replaceAll("'",""))==null?void 0:li.replaceAll('"',""))==null?void 0:oi.split(","),Array.isArray($e)||($e=(xi=(hi=(ui=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:ui.replaceAll("[",""))==null?void 0:hi.replaceAll("]",""))==null?void 0:xi.split(","));let ma=((pi=(di=xe.contents)==null?void 0:di.find(ve=>ve==null?void 0:ve.menuId))==null?void 0:pi.menuId)??((vi=(gi=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:gi[((mi=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:mi.length)-1])==null?void 0:vi.contents);xe.contents=(_i=xe.contents)==null?void 0:_i.map(ve=>{var st,vr,sr,Za,Ka,$t,Tn,Fe,Ue,Oe,Kt,_r,Ke,Qa,et,wt,St,At,Wa;if(Array.isArray(ve)){(st=gn(ve))!=null&&st.every(Ze=>!(Ze!=null&&Ze.menuId))&&(ma=((sr=(vr=gn(ve))==null?void 0:vr.find(Ze=>Ze==null?void 0:Ze.menuId))==null?void 0:sr.menuId)??ma,ve=ve==null?void 0:ve.map((Ze,Mt)=>{var ia,ga;return Mt===0?Ze!=null&&Ze.children?Ze.children=(ia=Ze.children)==null?void 0:ia.map((Ha,Rr)=>(Rr===0?(Ha.directiveLabel="#isMain",Ha.menuId=ma):(Ha.directiveLabel="",delete Ha.menuId),Ha.relatedValueId=!0,Ha)):(Ze.directiveLabel="#isMain",Ze.menuId=ma):(Ze.directiveLabel="",delete Ze.menuId,Ze.children=(ga=Ze.children)==null?void 0:ga.map(Ha=>(Ha.relatedValueId=!0,Ha))),Ze.relatedValueId=!0,Ze}));let za=($t=(Ka=(Za=de==null?void 0:de.columnPath)==null?void 0:Za.replace("(",Ir))==null?void 0:Ka.split(Ir))==null?void 0:$t[1];za=za==null?void 0:za.slice(0,(za==null?void 0:za.length)-1);let rr=(Tn=x0(za,","))==null?void 0:Tn.map(Ze=>((Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1)),Ze));return ve=Vl(ve,$e,De,de,ma,rr),ve}else if(De!=null&&De.find(za=>za===(ve==null?void 0:ve.prop))){let za=De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop));if($e!=null&&$e.find(rr=>rr==null?void 0:rr.includes('"'))?((Fe=$e==null?void 0:$e[za])!=null&&Fe.includes('"')?(ve.directiveLabel="#isMain",ve.menuId=ma):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0):(Ye==null?void 0:Ye.length)>0&&(Ye!=null&&Ye.find(rr=>rr===(ve==null?void 0:ve.prop))?(ve.directiveLabel="#isMain",ve.menuId=ma):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0),de!=null&&de.methodContent){let rr=(Oe=(Ue=de==null?void 0:de.methodContent)==null?void 0:Ue.replaceAll('"',""))==null?void 0:Oe.replaceAll("'","");rr!=null&&rr.includes("@")?(rr=rr==null?void 0:rr.slice(0,(rr==null?void 0:rr.length)-1),rr!=null&&rr.includes("@Type")||(rr=rr+",@Type=Auto"),rr!=null&&rr.includes("@Button")||(rr=rr+",@Button=Prop"),rr!=null&&rr.includes("@Extent")||(rr=rr+",@Extent=Row"),rr=rr+")"):rr=rr+"(@Type=Auto,@Button=Prop,@Extent=Row)",ve.methodContent=rr,ve.prop=(ve==null?void 0:ve.prop)+(de==null?void 0:de.columnPathIndex);let Ze=(Ke=(_r=(Kt=de==null?void 0:de.columnPath)==null?void 0:Kt.replace("(",Ir))==null?void 0:_r.split(Ir))==null?void 0:Ke[1];Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1);let Mt=(Qa=x0(Ze,","))==null?void 0:Qa.map(ia=>((ia==null?void 0:ia[(ia==null?void 0:ia.length)-1])===","&&(ia=ia==null?void 0:ia.slice(0,(ia==null?void 0:ia.length)-1)),ia));(et=Mt==null?void 0:Mt.find(ia=>ia==null?void 0:ia.includes("@SonSync")))!=null&&et.includes("Yes")&&(ve.methodId=ma)}ve.label=(Wa=(wt=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:wt.split("."))==null?void 0:Wa[((At=(St=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:St.split("."))==null?void 0:At.length)-1]}return ve})}return xe}),te});let aa=(C=(O=(F=de==null?void 0:de.columnPath)==null?void 0:F.replace("(",Ir))==null?void 0:O.split(Ir))==null?void 0:C[1];if(P0!==""&&(aa=(aa==null?void 0:aa.replaceAll(")",""))+","+P0),aa&&(aa==null?void 0:aa.length)>0){aa=(R=aa.slice(0,(aa==null?void 0:aa.length)-1))==null?void 0:R.replaceAll("'","");let te=(K=x0(aa,","))==null?void 0:K.map(pe=>((pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])===","&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),pe));te=te==null?void 0:te.map(pe=>{let xe=K0==null?void 0:K0.find(Sr=>pe==null?void 0:pe.includes(Sr==null?void 0:Sr.key));if(xe)return{order:xe==null?void 0:xe.order,value:xe==null?void 0:xe.value,content:pe}}),te=te==null?void 0:te.sort((pe,xe)=>(xe==null?void 0:xe.order)-(pe==null?void 0:pe.order));let H=[];oe=oe==null?void 0:oe.map(pe=>(pe=pe==null?void 0:pe.map((xe,Sr)=>{var Zr,na,gr,da;return(xe==null?void 0:xe.key)==="header"&&((Zr=xe==null?void 0:xe.contents)!=null&&Zr.every(Ar=>Array.isArray(Ar))?xe.contents=(na=xe.contents)==null?void 0:na.map(Ar=>{var Or;return H.push({index:Sr,content:(Or=G.cloneDeep(Ar))==null?void 0:Or.filter(Ur=>Ur==null?void 0:Ur.columnPath)}),Ar=Ar==null?void 0:Ar.filter(Ur=>!(Ur!=null&&Ur.columnPath)),Ar}):(H.push({index:Sr,content:(gr=G.cloneDeep(xe.contents))==null?void 0:gr.filter(Ar=>Ar==null?void 0:Ar.columnPath)}),xe.contents=(da=xe.contents)==null?void 0:da.filter(Ar=>!(Ar!=null&&Ar.columnPath)))),xe}),pe)),await(async()=>{var pe,xe,Sr,Zr,na,gr,da,Ar;for(const Or of te??[])if(Or){const Ur=(pe=Or==null?void 0:Or.content)!=null&&pe.includes("@Filter")?"("+((Zr=(Sr=(xe=Or==null?void 0:Or.content)==null?void 0:xe.replace("(",Ir))==null?void 0:Sr.split(Ir))==null?void 0:Zr[1]):(da=(gr=(na=Or==null?void 0:Or.content)==null?void 0:na.replace(":",Ir))==null?void 0:gr.split(Ir))==null?void 0:da[1];oe=await Zl((Or==null?void 0:Or.value)+"('"+JSON.stringify(G.cloneDeep(oe)).replaceAll("'",'"')+"','"+Ur+"','"+((Ar=de==null?void 0:de.columnPath)==null?void 0:Ar.replaceAll("'",""))+"')")??[]}})(),oe=oe==null?void 0:oe.map(pe=>(pe.push({key:"filterAllType",value:te}),pe)),oe=oe==null?void 0:oe.map(pe=>(pe=pe==null?void 0:pe.map((xe,Sr)=>{var Zr,na,gr,da,Ar,Or;if((xe==null?void 0:xe.key)==="header")if((Zr=xe==null?void 0:xe.contents)!=null&&Zr.every(Ur=>Array.isArray(Ur)))xe.contents=(na=xe.contents)==null?void 0:na.map(Ur=>{var Vr,mr,Gr,xr;return H!=null&&H.find(jr=>(jr==null?void 0:jr.index)===Sr)&&((mr=(Vr=H==null?void 0:H.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:Vr.content)==null?void 0:mr.length)>0&&Ur.push((xr=(Gr=H==null?void 0:H.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:Gr.content)==null?void 0:xr[0]),Ur});else{let Ur=xe.contents;H!=null&&H.find(Vr=>(Vr==null?void 0:Vr.index)===Sr)&&((da=(gr=H==null?void 0:H.find(Vr=>(Vr==null?void 0:Vr.index)===Sr))==null?void 0:gr.content)==null?void 0:da.length)>0&&Ur.push((Or=(Ar=H==null?void 0:H.find(Vr=>(Vr==null?void 0:Vr.index)===Sr))==null?void 0:Ar.content)==null?void 0:Or[0]),xe.contents=Ur}return xe}),pe))}let Br=(J=(j=(V=(Y=Ua==null?void 0:Ua.replaceAll("{",""))==null?void 0:Y.replaceAll("}",""))==null?void 0:V.replace(":",Ir))==null?void 0:j.split(Ir))==null?void 0:J[1];Br!=null&&Br.includes("[")&&(Br=(le=Br==null?void 0:Br.replaceAll("'",'"'))==null?void 0:le.replaceAll(":",","),Br=(_e=u1(Br))==null?void 0:_e.join(","),Br="["+((ge=(ue=(Ee=Br==null?void 0:Br.replaceAll('":"',Rc.value))==null?void 0:Ee.replaceAll(":",Rc.value))==null?void 0:ue.replaceAll("[",""))==null?void 0:ge.replaceAll("]",""))+"]",Gt(Br==null?void 0:Br.replaceAll("'",'"'))&&(Br=JSON.parse(Br==null?void 0:Br.replaceAll("'",'"')),Br!=null&&Br.find(te=>te==="操作")||Br.push("操作")),oe=oe==null?void 0:oe.map(te=>{let H=[],Z=[];return te=te==null?void 0:te.map(pe=>{var xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr;if((pe==null?void 0:pe.key)==="header")if((xe=pe.contents)!=null&&xe.every(mr=>Array.isArray(mr)))pe.contents=(Zr=(Sr=pe.contents)==null?void 0:Sr.map(mr=>{let Gr=vf(mr,Br);return mr=Gr==null?void 0:Gr.contents,H=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],mr}))==null?void 0:Zr.filter(mr=>!((mr==null?void 0:mr.label)==="操作"&&(mr!=null&&mr.relatedValueId)));else{let mr=(gr=(na=pe.contents)==null?void 0:na[0])==null?void 0:gr.menuId,Gr=vf(pe.contents,Br);H=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],(da=pe.contents)!=null&&da.some(xr=>xr==null?void 0:xr.columnPath)||(pe.contents=(Ar=pe.contents)==null?void 0:Ar.filter(xr=>(Br==null?void 0:Br.find(jr=>{var Tt;return jr===(((Tt=xr==null?void 0:xr.prop)==null?void 0:Tt.replace(/\d+$/,""))||(xr==null?void 0:xr.label))}))&&!((xr==null?void 0:xr.label)==="操作"&&(xr!=null&&xr.relatedValueId))),(Or=pe.contents)!=null&&Or.every(xr=>!(xr!=null&&xr.menuId))&&(pe.contents=(Ur=pe.contents)==null?void 0:Ur.map((xr,jr)=>(jr===0&&(xr.menuId=mr),xr))))}return(pe==null?void 0:pe.key)==="tableContents"&&(H==null?void 0:H.length)>0&&(pe.contents=(Vr=pe.contents)==null?void 0:Vr.map(mr=>{if(Array.isArray(mr))mr=mr==null?void 0:mr.filter((Gr,xr)=>(H==null?void 0:H.find(jr=>jr===xr))||(Gr==null?void 0:Gr.id));else for(let Gr in mr)(Gr==="id"||Z!=null&&Z.find(xr=>xr===Gr))&&(mr==null||mr[Gr]);return mr})),pe}),te}));let Me=[];(Er=(qe=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:qe.contents)!=null&&Er.every(te=>Array.isArray(te))?Me=(tn=($r=(Mr=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Mr.contents)==null?void 0:$r[0])==null?void 0:tn.filter(te=>!(te!=null&&te.columnPath)&&(te==null?void 0:te.label)!=="操作"):Me=f;let M0=Nn==null?void 0:Nn.find(te=>{var H,Z,pe;return(pe=de==null?void 0:de.columnPath)==null?void 0:pe.includes((Z=(H=te==null?void 0:te.value)==null?void 0:H.split("%$%"))==null?void 0:Z[0])});Me&&(Me==null?void 0:Me.length)>0&&(oe=oe==null?void 0:oe.map(te=>(te=te==null?void 0:te.map(H=>{var xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn,He,Vn,jn,Yn,Jn;let Z=(Sr=(xe=e==null?void 0:e.find(lr=>(lr==null?void 0:lr.key)==="header"))==null?void 0:xe.contents)==null?void 0:Sr.filter(lr=>lr==null?void 0:lr.columnPath),pe=(Zr=Z==null?void 0:Z[er])!=null&&Zr.columnPathIndex&&((na=Z==null?void 0:Z[er])==null?void 0:na.columnPathIndex)!==""?parseInt((gr=Z==null?void 0:Z[er])==null?void 0:gr.columnPathIndex):0;if((H==null?void 0:H.key)==="header"){if(((da=H==null?void 0:H.contents)==null?void 0:da.length)===0)return H==null?void 0:H.contents;if((((Or=(Ar=M0==null?void 0:M0.key)==null?void 0:Ar.split("["))==null?void 0:Or.length)??0)<=2){if((Ur=H==null?void 0:H.contents)!=null&&Ur.every(lr=>Array.isArray(lr))){if(pe===0)Array.isArray(Me==null?void 0:Me[0])?H.contents=[...(Vr=H.contents)==null?void 0:Vr[0],...Me==null?void 0:Me[0]]:H.contents=[...(mr=H.contents)==null?void 0:mr[0],...Me];else if(Array.isArray(Me==null?void 0:Me[0])){let lr=((Tt=(Gr=Me==null?void 0:Me[0])==null?void 0:Gr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:Tt.slice(pe,(jr=(xr=Me==null?void 0:Me[0])==null?void 0:xr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:jr.length))??[],or=[...(fn=Me==null?void 0:Me[0])==null?void 0:fn.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作").slice(0,pe),...(cn=H.contents)==null?void 0:cn[0]];or=[...or,...lr],Array.isArray((ln=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""))==null?void 0:ln[0])?H.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""):H.contents=[or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")]}else{let lr=(Me==null?void 0:Me.slice(pe,Me==null?void 0:Me.length))??[],or=[...Me.slice(0,pe),...H.contents];or=[...or,...lr],H.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")}H.contents=(on=H.contents)==null?void 0:on.filter(lr=>(lr==null?void 0:lr.prop)!==""),Array.isArray((un=H.contents)==null?void 0:un[0])||(H.contents=[H.contents])}else if(H.contents=(hn=H.contents)==null?void 0:hn.map((lr,or)=>lr),(Z==null?void 0:Z[er])===0)Array.isArray(Me==null?void 0:Me[0])?H.contents=[...H.contents,...Me==null?void 0:Me[0]]:H.contents=[...H.contents,...Me];else{let lr=pe;if(Array.isArray(Me==null?void 0:Me[0])){let or=((He=Me==null?void 0:Me[0])==null?void 0:He.slice(lr,(xn=Me==null?void 0:Me[0])==null?void 0:xn.length))??[],Xe=[...Me==null?void 0:Me[0].slice(0,lr),...H.contents];Xe=[...Xe,...or],Array.isArray((Vn=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""))==null?void 0:Vn[0])?H.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""):H.contents=[Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")]}else{let or=(Me==null?void 0:Me.slice(lr,Me==null?void 0:Me.length))??[],Xe=[...Me.slice(0,lr),...H.contents];Xe=[...Xe,...or],H.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")}}if(Array.isArray((jn=H.contents)==null?void 0:jn[0])){const lr=new Map;(Yn=H.contents)==null||Yn[0].forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),H.contents=[...lr.values()],H.contents=[H.contents],H.contents=[(Jn=H.contents)==null?void 0:Jn[0].filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Ln=>Ln.label==="操作")===Xe)]}else{const lr=new Map;H.contents.forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),H.contents=[...lr.values()],H.contents=H.contents.filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Ln=>Ln.label==="操作")===Xe)}}else{let lr=wh(H.contents,Me);lr!=null&&lr.find(or=>(or==null?void 0:or.label)==="操作")||lr.push({label:"操作"}),H.contents=[lr]}}return(H==null?void 0:H.key)==="relatedFilter"&&(H.index=pe),H}),te)))}f=(Rn=(Pt=(sn=(nn=G.cloneDeep(oe))==null?void 0:nn[0])==null?void 0:sn.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:Pt.contents)==null?void 0:Rn.filter(Re=>!(Re!=null&&Re.columnPath)&&(Re==null?void 0:Re.label)!=="操作"),s=oe}return s==null?void 0:s.filter(er=>er!==void 0)},En=async(e,a,r="",n=!1,t,i,s,f)=>{var v,E,w,S,T,B;let c,l=new WeakMap;s&&(l=s),(!n||!t)&&(c=(v=l[e])==null?void 0:v.filter(I=>{var U,L;return((U=I==null?void 0:I.key)==null?void 0:U.parentTable)===r||((L=I==null?void 0:I.key)==null?void 0:L.type)==="related"})),ql.setPageMapState(l);const o=(E=l[e])==null?void 0:E.filter(I=>{var U;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="structureMethod"}),u=c==null?void 0:c.map(I=>I.id);if(!u)return;let x=(w=l[e])==null?void 0:w.filter(I=>{var U,L,W,M;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="data"&&(u.includes((L=I==null?void 0:I.key)==null?void 0:L.tableId)||u.includes((M=(W=I==null?void 0:I.key)==null?void 0:W.tableId)==null?void 0:M.toString()))});const h=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),d=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");h&&Array.isArray(d)&&d.length>0&&(e!=null&&e.startsWith("/")&&e.substring(1),(S=h==null?void 0:h.pageKey)!=null&&S.startsWith("/")?h.pageKey.substring(1):h==null||h.pageKey);const p=l[e+o1.value]??[];(p==null?void 0:p.length)===0&&(x=Jl(x,!1,l));let m=[];x==null||x.forEach(I=>{var W;const U=Array.isArray(I.value.tableData)?I.value.tableData:[I.value.tableData];U.unshift({id:I.id});const L=(W=I==null?void 0:I.key)==null?void 0:W.tableId;m!=null&&m.find(M=>(M==null?void 0:M.key)===L)?m=m==null?void 0:m.map(M=>((M==null?void 0:M.key)===L&&(M.contents=[...M.contents,U]),M)):m.push({key:L,contents:[U]})});let g=[];const y=await(c==null?void 0:c.map(async(I,U)=>{var se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ya,Fa,Et,Ja,ka,$a;let L=I.value.pageData;const W=I==null?void 0:I.id;let M=(se=G.cloneDeep(L==null?void 0:L.compData))==null?void 0:se.filter(Se=>(Se==null?void 0:Se.key)!=="tableContents");if(!(L!=null&&L.orderId)&&typeof L!="string"&&(L.orderId=U),M&&(M!=null&&M.find(Se=>(Se==null?void 0:Se.key)==="header"))&&(!Array.isArray((he=(ne=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ne.contents)==null?void 0:he[0])&&((be=(ce=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ce.contents)!=null&&be.every(Se=>!(Se!=null&&Se.columnPath)))||Array.isArray((Te=(z=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:z.contents)==null?void 0:Te[0])&&((A=gn((_=(Ae=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:Ae.contents)==null?void 0:_[0]))!=null&&A.every(Se=>!(Se!=null&&Se.columnPath))))){M=await(M==null?void 0:M.map(async me=>{var Fr,Cr,hr,kr,ha,ra,We,Kr,ta,Ta,ua,fr,wr,Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N,F,O,C,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,tn,nn,sn,Pt,Rn,er,de,Nn,P0,Pn,zr,Ge;if((me==null?void 0:me.key)==="header"){if(((Fr=me.contents)==null?void 0:Fr.length)===0){let xa=(Cr=M==null?void 0:M.find(oe=>(oe==null?void 0:oe.key)==="relatedFilter"))==null?void 0:Cr.contents,Mn=(hr=xa==null?void 0:xa.split("["))==null?void 0:hr[0],cr=(Kr=(We=(ra=(ha=(kr=xa==null?void 0:xa.replace("[",Ir))==null?void 0:kr.split(Ir))==null?void 0:ha[1])==null?void 0:ra.replace("]",Ir))==null?void 0:We.split(Ir))==null?void 0:Kr[0];cr=(ta=cr==null?void 0:cr.split("["))==null?void 0:ta[0],cr=(fr=(ua=cr==null?void 0:cr.split(":"))==null?void 0:ua[((Ta=cr==null?void 0:cr.split(":"))==null?void 0:Ta.length)-1])==null?void 0:fr.replaceAll("'","");let Ua=((bt=(it=(Ba=(La=(Oa=(wr=l==null?void 0:l[Mn])==null?void 0:wr.find(oe=>{var Dr,Ce;return((Ce=(Dr=oe==null?void 0:oe.value)==null?void 0:Dr.pageData)==null?void 0:Ce.name)===cr}))==null?void 0:Oa.value)==null?void 0:La.pageData)==null?void 0:Ba.compData)==null?void 0:it.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:bt.contents)??[];if(Ua!=null&&Ua.some(oe=>oe==null?void 0:oe.columnPath)){let oe=await En(Mn,a,r,n,t,i,l);Ua=(Ct=(vt=(Ot=oe==null?void 0:oe.find(Dr=>(Dr==null?void 0:Dr.name)===cr))==null?void 0:Ot.compData)==null?void 0:vt.find(Dr=>(Dr==null?void 0:Dr.key)==="header"))==null?void 0:Ct.contents}me.contents=Ua}else if((Nt=(Rt=M==null?void 0:M.find(xa=>(xa==null?void 0:xa.key)==="relatedFilter"))==null?void 0:Rt.contents)!=null&&Nt.length){let xa=(k=M==null?void 0:M.find(Ce=>(Ce==null?void 0:Ce.key)==="relatedFilter"))==null?void 0:k.contents,Mn=(N=xa==null?void 0:xa.split("["))==null?void 0:N[0],cr=(K=(R=(C=(O=(F=xa==null?void 0:xa.replace("[",Ir))==null?void 0:F.split(Ir))==null?void 0:O[1])==null?void 0:C.replace("]",Ir))==null?void 0:R.split(Ir))==null?void 0:K[0],Ua=(j=(V=(Y=cr==null?void 0:cr.split("["))==null?void 0:Y[1])==null?void 0:V.replaceAll("'",""))==null?void 0:j.split(",");cr=(J=cr==null?void 0:cr.split("["))==null?void 0:J[0],cr=((Ee=(_e=cr==null?void 0:cr.split(":"))==null?void 0:_e[((le=cr==null?void 0:cr.split(":"))==null?void 0:le.length)-1])==null?void 0:Ee.replaceAll("'",""))===""?(qe=(ge=cr==null?void 0:cr.split(":"))==null?void 0:ge[((ue=cr==null?void 0:cr.split(":"))==null?void 0:ue.length)-2])==null?void 0:qe.replaceAll("'",""):($r=(Mr=cr==null?void 0:cr.split(":"))==null?void 0:Mr[((Er=cr==null?void 0:cr.split(":"))==null?void 0:Er.length)-1])==null?void 0:$r.replaceAll("'","");let oe=((er=(Rn=(Pt=(sn=(nn=(tn=l==null?void 0:l[Mn])==null?void 0:tn.find(Ce=>{var Ca,qa;return((qa=(Ca=Ce==null?void 0:Ce.value)==null?void 0:Ca.pageData)==null?void 0:qa.name)===cr}))==null?void 0:nn.value)==null?void 0:sn.pageData)==null?void 0:Pt.compData)==null?void 0:Rn.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:er.contents)??[];if(oe!=null&&oe.some(Ce=>Ce==null?void 0:Ce.columnPath)){let Ce=await En(Mn,a,r,n,t,i,l);oe=(P0=(Nn=(de=Ce==null?void 0:Ce.find(Ca=>(Ca==null?void 0:Ca.name)===cr))==null?void 0:de.compData)==null?void 0:Nn.find(Ca=>(Ca==null?void 0:Ca.key)==="header"))==null?void 0:P0.contents}(Ua==null?void 0:Ua.length)>0&&(oe=oe==null?void 0:oe.filter(Ce=>Ua==null?void 0:Ua.find(Ca=>Ca===(Ce==null?void 0:Ce.prop))));let Dr=(Pn=M==null?void 0:M.find(Ce=>(Ce==null?void 0:Ce.key)==="relatedFilter"))==null?void 0:Pn.index;if(Dr!==""){Dr=parseInt(Dr);let Ce=((zr=me.contents)==null?void 0:zr.slice(Dr,me.contents.length))??[],Ca=[...(Ge=me.contents)==null?void 0:Ge.slice(0,Dr),...oe];Ca=[...Ca,...Ce],me.contents=Ca}}}return me})),M=await Promise.all(M);const Se=((D=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="contentTableId"))==null?void 0:D.contents)??I.id;let Ne=Ii((b=m==null?void 0:m.find(me=>(me==null?void 0:me.key)===Se))==null?void 0:b.contents,(X=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:X.contents),Be=await D1((re=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:re.contents,e,(ee=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="tableFilter"))==null?void 0:ee.contents,l);if((q=(Q=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Q.contents)!=null&&q.find(me=>(me==null?void 0:me.filterContent)&&(me==null?void 0:me.filterContent)!=="")){let me=(Pe=(P=(we=M==null?void 0:M.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:we.contents)==null?void 0:P.find(hr=>(hr==null?void 0:hr.filterContent)&&(hr==null?void 0:hr.filterContent)!==""))==null?void 0:Pe.filterContent;me=(Ie=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1))==null?void 0:Ie.split(",");let Fr=me==null?void 0:me.map(hr=>{var ha,ra;let kr=K0==null?void 0:K0.find(We=>hr==null?void 0:hr.includes(We==null?void 0:We.key));if(kr)return{order:kr==null?void 0:kr.order,value:kr==null?void 0:kr.value,content:(ra=(ha=hr==null?void 0:hr.replaceAll("/",":"))==null?void 0:ha.replaceAll(":","="))==null?void 0:ra.replace("=",":")}});M!=null&&M.every(hr=>Array.isArray(hr))||(M=[M]),await(async()=>{var hr,kr,ha;for(const ra of Fr??[])if(ra){const We=(ha=(kr=(hr=ra==null?void 0:ra.content)==null?void 0:hr.replace(":",Ir))==null?void 0:kr.split(Ir))==null?void 0:ha[1];M=await Zl((ra==null?void 0:ra.value)+"('"+JSON.stringify(M).replaceAll("'",'"')+"','"+We+"','')")??[]??M}})(),M=M==null?void 0:M[0]}Be!=null&&Be.mainKeys&&M.push({key:"mainRouters",contents:Be==null?void 0:Be.mainKeys});let Ea=[],Qe=[];Array.isArray(Be)&&(Ea=Ii(Be,(je=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:je.contents)),Array.isArray(Be==null?void 0:Be.tableContents)&&(Qe=Ii(Be==null?void 0:Be.tableContents,(Le=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Le.contents));let br=[...Ea,...Qe];Array.isArray(Ne)&&(Ne==null?void 0:Ne.length)>0&&(br=[...br,...Ne]),M.push({key:"tableContents",contents:br}),M=M==null?void 0:M.map(me=>{var Fr,Cr;return(me==null?void 0:me.key)==="header"&&((Fr=me.contents)==null?void 0:Fr.length)!==0&&(me.contents=(Cr=me.contents)==null?void 0:Cr.map(hr=>((hr==null?void 0:hr.prop)===(Be==null?void 0:Be.mainKey)&&(hr.isMainKey=!0),hr))),me})}else M&&((ie=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))!=null&&ie.contents)&&(M=await h1(G.cloneDeep(M),W,c,l,e,f),M!=null&&M.every(Se=>Array.isArray(Se))||(M=[M]));if(typeof L!="string"&&(L.id=I==null?void 0:I.id,L.isShow=(ir=(ur=I==null?void 0:I.value)==null?void 0:ur.pageData)==null?void 0:ir.isShow),(M==null?void 0:M.length)>0&&M.every(Se=>Array.isArray(Se)))M==null||M.forEach(Se=>{var Ea,Qe,br,me,Fr;let Ne=G.cloneDeep(L);Ne.compData=Se,Ne.tableId=(Ea=Se==null?void 0:Se.find(Cr=>(Cr==null?void 0:Cr.key)==="contentTableId"))==null?void 0:Ea.contents;let Be=(Qe=Se==null?void 0:Se.find(Cr=>(Cr==null?void 0:Cr.key)==="name"))==null?void 0:Qe.contents;Be!=null&&Be.name0&&(Be==null?void 0:Be.name0)===(Ne==null?void 0:Ne.name)?(Ne.name0=Ne.name,Ne.name=Be==null?void 0:Be.name):Be!=null&&Be.name0&&(Ne.name1=Ne.name,Ne.name0=Be.name0,Ne.name=Be==null?void 0:Be.name),(br=Ne==null?void 0:Ne.compData)!=null&&br.every(Cr=>Array.isArray(Cr))?((me=Ne==null?void 0:Ne.compData)==null?void 0:me.length)===0?g.push(Ne):(Fr=Ne==null?void 0:Ne.compData)==null||Fr.forEach((Cr,hr)=>{let kr;hr===0?kr={comp:Ne==null?void 0:Ne.comp,compData:Cr,id:Ne==null?void 0:Ne.id,name:Ne==null?void 0:Ne.name,isShow:Ne==null?void 0:Ne.isShow}:kr={comp:Ne==null?void 0:Ne.comp,compData:Cr,id:Ne==null?void 0:Ne.id,name:"",isShow:Ne==null?void 0:Ne.isShow},g.push(kr)}):g.push(Ne)});else if(((ya=I.key)==null?void 0:ya.type)==="structure")L.compData=M,(Fa=L==null?void 0:L.compData)!=null&&Fa.every(Se=>Array.isArray(Se))?((Et=L==null?void 0:L.compData)==null?void 0:Et.length)===0?g.push(L):(Ja=L==null?void 0:L.compData)==null||Ja.forEach((Se,Ne)=>{let Be;Ne===0?Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:L==null?void 0:L.name,isShow:L==null?void 0:L.isShow}:Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:"",isShow:L==null?void 0:L.isShow},g.push(Be)}):g.push(L);else if(((ka=I.key)==null?void 0:ka.type)==="method"){let Se;Se={name:"",compData:[L],comp:"calculator"},g.push(Se)}else if((($a=I==null?void 0:I.key)==null?void 0:$a.type)==="related"){let Se;Se={name:"",compData:L,comp:""},g.push(Se)}}));return await Promise.all(y),((T=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:T.filter(I=>Object.values(I).length>0).length)>0&&g.push({comp:"methodButton",name:"",compData:(B=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:B.filter(I=>Object.values(I).length>0)}),g=g.sort((I,U)=>I.orderId-U.orderId),g=await Qh(g),i?g:await Vh(e,g)},x1=async()=>{var e,a;try{let r=((e=Nc.value)==null?void 0:e.platform)||"browser";const n=((a=Nc.value)==null?void 0:a.chineseName)||"工业软件建模与开发系统";r!=="browser"&&r!=="client"&&r!=="three"&&(r="browser"),gf.setPlatform(r),gf.setPlatName(n)}catch(r){return Promise.reject(r)}},z0=zl.ref(0),d1=G.useMenuState(G.pinia),p1=f0(G.pinia),{originalPath:_f}=G.storeToRefs(p1),m1=G.useLoginState(G.pinia),g1=Bs(G.pinia),{multipleTableConst:ot}=G.storeToRefs(g1),{loginUserInfo:m0}=G.storeToRefs(m1),{activeMenuPath:v1}=G.storeToRefs(d1),_1=G.useModelComp(G.pinia),{pageMapState:Ts}=G.storeToRefs(_1),Qt=_f.value,U0="/",ws=(e,a,r)=>e==null?void 0:e.map(t=>{var i;return z0.value++,Array.isArray(t)?ws(t,a):{label:(t==null?void 0:t.label)==="操作"?a?"操作":"":(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+z0.value,width:(t==null?void 0:t.label)==="操作"?"200":t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!1,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??z0.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:ws(t.children,a)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(i=t==null?void 0:t.groupSelect)==null?void 0:i.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel),allSelectionContents:(t==null?void 0:t.allContents)??[],selectFilter:t==null?void 0:t.selectFilter,menuId:t==null?void 0:t.menuId,relatedValueId:t==null?void 0:t.relatedValueId,filterContent:t==null?void 0:t.filterContents,menus:t==null?void 0:t.menus,groups:t==null?void 0:t.groups,words:t==null?void 0:t.words,isExistChild:(t==null?void 0:t.isExistChild)??!1,mainKey:(t==null?void 0:t.mainKey)??!1,filter:t==null?void 0:t.filter,bindMenus:t==null?void 0:t.bindMenus,fatherPath:t==null?void 0:t.fatherPath,isMainPath:t==null?void 0:t.isMainPath,required:(t==null?void 0:t.required)??!1,functionName:t==null?void 0:t.functionName,functionRelatedWords:t==null?void 0:t.functionRelatedWords,calculatorFilter:t==null?void 0:t.calculatorFilter}}),y1=e=>{const a=[];function r(n){if(Array.isArray(n))for(const t of n)!t.children||t.children.length===0?a.push(t):r(t.children)}return r(e),a},k1=(e,a,r)=>G.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(i=>{var s,f,c;return(f=(s=v1.value)==null?void 0:s.split("/"))==null||f.forEach(l=>{var o,u,x;l!==""&&((x=(u=(o=l==null?void 0:l.split(_f+"updateLoading"))==null?void 0:o[0])==null?void 0:u.split(_f+"loading"))==null||x[0])}),Array.isArray(i)?i=ws(i,a):(i={label:(i==null?void 0:i.label)==="操作"?a?"操作":"":(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":(i==null?void 0:i.prop)??"a"+z0.value,width:(i==null?void 0:i.label)==="操作"?"200":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)??z0.value,type:(i==null?void 0:i.label)==="操作"?"operate":void 0,formType:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":""),isHidden:i==null?void 0:i.isHidden,options:(i==null?void 0:i.options)??[],children:ws(i.children,a),formMenuSelect:(i==null?void 0:i.formMenuSelect)??[],groupSelect:i!=null&&i.groupSelect?(c=i==null?void 0:i.groupSelect)==null?void 0:c.replaceAll('"',"").split(":"):[],isMainKey:(i==null?void 0:i.isMainKey)||!!(i!=null&&i.directiveLabel),allSelectionContents:(i==null?void 0:i.allContents)??[],selectFilter:i==null?void 0:i.selectFilter,menuId:i==null?void 0:i.menuId,relatedValueId:i==null?void 0:i.relatedValueId,filterContent:i==null?void 0:i.filterContents,menus:i==null?void 0:i.menus,groups:i==null?void 0:i.groups,words:i==null?void 0:i.words,isExistChild:(i==null?void 0:i.isExistChild)??!1,mainKey:(i==null?void 0:i.mainKey)??!1,filter:i==null?void 0:i.filter,bindMenus:i==null?void 0:i.bindMenus,fatherPath:i==null?void 0:i.fatherPath,isMainPath:i==null?void 0:i.isMainPath,required:(i==null?void 0:i.required)??!1,functionName:i==null?void 0:i.functionName,functionRelatedWords:i==null?void 0:i.functionRelatedWords,calculatorFilter:i==null?void 0:i.calculatorFilter},z0.value++),i})),t)),gn=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(r==null||r.forEach(s=>{var f,c,l,o,u,x,h,d,p,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(c=s==null?void 0:s.prop)==null?void 0:c.split(ot.value))==null?void 0:u[((o=(l=s==null?void 0:s.prop)==null?void 0:l.split(ot.value))==null?void 0:o.length)-1]):t+ot.value+((p=(x=s==null?void 0:s.prop)==null?void 0:x.split(ot.value))==null?void 0:p[((d=(h=s==null?void 0:s.prop)==null?void 0:h.split(ot.value))==null?void 0:d.length)-1]);i=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ot.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ot.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ot.value))==null?void 0:y.length)-1])),i.push(s)})),i}return a(e)},E1=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(i=r==null?void 0:r.map(s=>{var f,c,l,o,u,x,h,d,p,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(c=s==null?void 0:s.prop)==null?void 0:c.split(ot.value))==null?void 0:u[((o=(l=s==null?void 0:s.prop)==null?void 0:l.split(ot.value))==null?void 0:o.length)-1]):t+ot.value+((p=(x=s==null?void 0:s.prop)==null?void 0:x.split(ot.value))==null?void 0:p[((d=(h=s==null?void 0:s.prop)==null?void 0:h.split(ot.value))==null?void 0:d.length)-1]);s.children=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ot.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ot.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ot.value))==null?void 0:y.length)-1]));return s})),i}return a(e)},T1=e=>{let a=G.cloneDeep(e);return a=a==null?void 0:a.map(r=>((r==null?void 0:r.type)==="Select"?r={label:r==null?void 0:r.label,prop:r==null?void 0:r.prop,name:r==null?void 0:r.name,type:r==null?void 0:r.type,value:(r==null?void 0:r.value)??"",optionUrl:{groupSelect:r==null?void 0:r.groupSelect,menuSelect:r==null?void 0:r.menuSelect,type:"Select",selectRelateType:r==null?void 0:r.selectRelateType,multiple:r==null?void 0:r.multiple}}:(r==null?void 0:r.type)==="Date"&&(r.value=!(r!=null&&r.value)&&(r==null?void 0:r.isNewDate)!==!1?new Date:r==null?void 0:r.value),r.label=r.prop||r.label,r)),a},Ql=e=>{var a,r,n,t,i,s;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let f=(n=(r=e==null?void 0:e.pageData)==null?void 0:r.compData)==null?void 0:n.map(l=>{var o;return(l==null?void 0:l.key)==="formContent"&&(l.contents=(o=l.contents)==null?void 0:o.map(u=>((u==null?void 0:u.type)==="Date"&&(u.value=""),u))),l});return{pageData:{comp:(t=e==null?void 0:e.pageData)==null?void 0:t.comp,compData:f,name:(i=e==null?void 0:e.pageData)==null?void 0:i.name,isShow:(s=e==null?void 0:e.pageData)==null?void 0:s.isShow}}}else return e},eo=(e,a)=>{var n,t,i,s,f,c,l,o,u;let r=(i=(t=(n=a==null?void 0:a.pageData)==null?void 0:n.compData)==null?void 0:t.find(x=>(x==null?void 0:x.key)==="formContent"))==null?void 0:i.contents;if(((s=e==null?void 0:e.pageData)==null?void 0:s.comp)==="Form"){let x=(c=(f=e==null?void 0:e.pageData)==null?void 0:f.compData)==null?void 0:c.map(d=>{var p;return(d==null?void 0:d.key)==="formContent"&&(d.contents=(p=d.contents)==null?void 0:p.map(m=>{var g;return m.value=(g=r==null?void 0:r.find(y=>(y==null?void 0:y.key)===(m==null?void 0:m.key)))==null?void 0:g.value,m})),d});return{pageData:{comp:(l=e==null?void 0:e.pageData)==null?void 0:l.comp,compData:x,name:(o=e==null?void 0:e.pageData)==null?void 0:o.name,isShow:(u=e==null?void 0:e.pageData)==null?void 0:u.isShow}}}else return e},Rf=async(e,a,r,n,t)=>{var p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==Qt&&(i="",(m=(p=G.cloneDeep(e))==null?void 0:p.split(Qt))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=G.cloneDeep(e))==null?void 0:D.split(Qt))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+Qt);let s=[],f=await sa.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let l;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==Qt&&(l={data:{result:(v=Ts.value[i])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=l==null?void 0:l.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(l=(T=(S=G.cloneDeep(l))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=Ts.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==Qt){let _=(L=c==null?void 0:c.data)==null?void 0:L.result;if(!Array.isArray(l))return;l==null||l.forEach(A=>{var b,X,re,ee,Q;let D=(b=_==null?void 0:_.find(q=>{var we,P,Pe,Ie;return((P=(we=A==null?void 0:A.value)==null?void 0:we.pageData)==null?void 0:P.name)===((Ie=(Pe=q==null?void 0:q.value)==null?void 0:Pe.pageData)==null?void 0:Ie.name)}))==null?void 0:b.value;D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((X=D==null?void 0:D.key)==null?void 0:X.parentTable)??"",systemKey:(re=A==null?void 0:A.key)==null?void 0:re.systemKey,type:((ee=D==null?void 0:D.key)==null?void 0:ee.type)??((Q=A==null?void 0:A.key)==null?void 0:Q.type),version:1},value:eo(A==null?void 0:A.value,D)})})}else(M=(W=c==null?void 0:c.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:Ql(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D,b;return((D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null?void 0:D.comp)==="Form"&&(_.value.pageData.compData=(b=_.value.pageData.compData)==null?void 0:b.map(X=>{var re;return(X==null?void 0:X.key)==="formContent"&&(X.contents=(re=X.contents)==null?void 0:re.map(ee=>(r!=null&&r[ee==null?void 0:ee.key]&&(ee==null?void 0:ee.type)!=="Date"&&(ee.value=r[ee.key]),ee))),X}),n&&_.value.pageData.compData.push({key:"parentFormPath",contents:n})),_}),(s==null?void 0:s.length)>0){let _;if(!t)_=s;else{const A=s==null?void 0:s.find(b=>{var X,re;return t==null?void 0:t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)}),D=/^[A-Za-z]+$/;_=A?s==null?void 0:s.map(b=>{var X,re,ee,Q,q,we;return t!=null&&t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)?{...b,value:{pageData:{...(ee=b==null?void 0:b.value)==null?void 0:ee.pageData,compData:(we=(q=(Q=b==null?void 0:b.value)==null?void 0:Q.pageData)==null?void 0:q.compData)==null?void 0:we.map(P=>{var Pe;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(Pe=P==null?void 0:P.contents)==null?void 0:Pe.map(Ie=>D.test(Ie==null?void 0:Ie.prop)?Ie:{...Ie,value:""})}:P})}}}:b}):s}await sa.batchAddInsofDataApi({dataList:_})}let x={};const h=await sa.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=c==null?void 0:c.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=c==null?void 0:c.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b;x[_.id]=(b=(D=(A=h==null?void 0:h.data)==null?void 0:A.result)==null?void 0:D.find(X=>{var re,ee,Q,q;return((ee=(re=X==null?void 0:X.value)==null?void 0:re.pageData)==null?void 0:ee.name)===((q=(Q=_==null?void 0:_.value)==null?void 0:Q.pageData)==null?void 0:q.name)}))==null?void 0:b.id}));let d=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;d.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(d==null?void 0:d.length)>0&&await sa.batchAddInsofDataApi({dataList:d})},w1=async(e,a,r,n,t)=>{var p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==U0&&(i="",(m=(p=G.cloneDeep(e))==null?void 0:p.split(U0))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=G.cloneDeep(e))==null?void 0:D.split(U0))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+U0);let s=[],f=await sa.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let l;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==U0&&(l={data:{result:(v=Ts.value[e])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=l==null?void 0:l.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(l=(T=(S=G.cloneDeep(l))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=Ts.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==U0){let _=(L=c==null?void 0:c.data)==null?void 0:L.result;if(!Array.isArray(l))return;l==null||l.forEach(A=>{var b,X,re,ee,Q,q,we,P;let D;(X=(b=A==null?void 0:A.value)==null?void 0:b.pageData)!=null&&X.name0?D=(re=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie,ur,ir,ya,Fa;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)&&((ir=(ur=A==null?void 0:A.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)===((Fa=(ya=Pe==null?void 0:Pe.value)==null?void 0:ya.pageData)==null?void 0:Fa.name0)}))==null?void 0:re.value:D=(ee=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)}))==null?void 0:ee.value,D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((Q=D==null?void 0:D.key)==null?void 0:Q.parentTable)??"",systemKey:(q=A==null?void 0:A.key)==null?void 0:q.systemKey,type:((we=D==null?void 0:D.key)==null?void 0:we.type)??((P=A==null?void 0:A.key)==null?void 0:P.type),version:1},value:eo(A==null?void 0:A.value,D)})})}else(M=(W=c==null?void 0:c.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:Ql(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D;return(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null||D.comp,_}),(s==null?void 0:s.length)>0){let _;_=s,await sa.batchAddInsofDataApi({dataList:_})}let x={};const h=await sa.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=c==null?void 0:c.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=c==null?void 0:c.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b,X,re,ee,Q,q;(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)!=null&&D.name0?x[_.id]=(re=(X=(b=h==null?void 0:h.data)==null?void 0:b.result)==null?void 0:X.find(we=>{var P,Pe,Ie,je,Le,ie,ur,ir;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)&&((ie=(Le=we==null?void 0:we.value)==null?void 0:Le.pageData)==null?void 0:ie.name0)===((ir=(ur=_==null?void 0:_.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)}))==null?void 0:re.id:x[_.id]=(q=(Q=(ee=h==null?void 0:h.data)==null?void 0:ee.result)==null?void 0:Q.find(we=>{var P,Pe,Ie,je;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)}))==null?void 0:q.id}));let d=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;d.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(d==null?void 0:d.length)>0&&await sa.batchAddInsofDataApi({dataList:d})},ro=(e,a)=>{let r=G.cloneDeep(e);return r=r==null?void 0:r.map(t=>{var c,l,o;let i=[],s=[];for(let u in a)if(u!=null&&u.includes((l=(c=G.cloneDeep(t))==null?void 0:c.key)==null?void 0:l.pageKey)){let x=(o=a[u])==null?void 0:o.filter(h=>{var d,p,m;return((d=h==null?void 0:h.key)==null?void 0:d.type)==="data"&&((p=h==null?void 0:h.key)==null?void 0:p.tableId)===((m=G.cloneDeep(t))==null?void 0:m.id)});s=[...s,...x]}(s==null?void 0:s.length)>0&&(s==null||s.forEach(u=>{i.push(u.value.tableData)}));let f=G.cloneDeep(t).value.pageData.compData;return f.push({key:"tableContents",contents:i}),t.value.pageData.compData=f,t}),r},ao=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var c;(f==null?void 0:f.key)==="header"&&((c=f==null?void 0:f.contents)==null||c.forEach((l,o)=>{(l==null?void 0:l.prop)===(r==null?void 0:r[1])&&(t=o)}))}))}),t},to=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var c;(f==null?void 0:f.key)==="formContent"&&((c=f==null?void 0:f.contents)==null||c.forEach(l=>{(l==null?void 0:l.prop)===(r==null?void 0:r[1])&&(t=l==null?void 0:l.value)}))}))}),t},Pc=(e,a,r,n)=>{var c,l,o;let t=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,i=e==null?void 0:e.map(u=>{var x,h;return(h=(x=u.groupSelect)==null?void 0:x.split(":"))==null?void 0:h[1]}),s="";t==null||t.forEach((u,x)=>{(t==null?void 0:t.length)-1!==x?s=s===""?s+u:s+"/"+u:s=s+Qt+u});let f=[];for(let u in a)if(u!=null&&u.includes(s)){let x=(l=a[u])==null?void 0:l.filter(h=>{var d,p;return((d=h==null?void 0:h.key)==null?void 0:d.type)==="structure"&&((p=h==null?void 0:h.key)==null?void 0:p.parentTable)===""});f=[...f,...x]}if((f==null?void 0:f.length)>0){let u=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Form"}),x=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Table"});x=ro(G.cloneDeep(x),a),u=[...G.cloneDeep(u),...x],u=u==null?void 0:u.map(m=>({[m.key.pageKey]:m}));let h=0;u=u.reduce((m,g)=>(Object.keys(g).forEach(y=>{m[y]||(m[y]=[],m[y].push({index:h})),m[y].push(g[y])}),h++,m),{});let d=(o=Object.values(u))==null?void 0:o.sort((m,g)=>{var E,w;let y=(E=m==null?void 0:m.find(S=>S==null?void 0:S.index))==null?void 0:E.index,v=(w=g==null?void 0:g.find(S=>S==null?void 0:S.index))==null?void 0:w.index;return y-v});u=d==null?void 0:d.map(m=>m==null?void 0:m.filter(g=>{var y,v,E,w;return!(g!=null&&g.index)&&(g==null?void 0:g.index)!==0&&!((v=(y=g==null?void 0:g.key)==null?void 0:y.pageKey)!=null&&v.includes("updateLoading"))&&!((w=(E=g==null?void 0:g.key)==null?void 0:E.pageKey)!=null&&w.includes("loading"))}));let p=[];if(u==null||u.forEach(m=>{var v,E,w,S,T,B,I,U,L,W;const g=m==null?void 0:m.find(M=>{var se,ne,he,ce,be;return((ne=(se=M==null?void 0:M.value)==null?void 0:se.pageData)==null?void 0:ne.name)===((be=(ce=(he=e==null?void 0:e[0])==null?void 0:he.groupSelect)==null?void 0:ce.split(":"))==null?void 0:be[0])});let y=(T=(S=(w=(E=(v=G.cloneDeep(g))==null?void 0:v.value)==null?void 0:E.pageData)==null?void 0:w.compData)==null?void 0:S.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:T.contents;if(y){let M=[];i==null||i.forEach((se,ne)=>{var be,z,Te,Ae,_,A;let he=m==null?void 0:m.find(D=>{var b,X,re,ee,Q;return((X=(b=D==null?void 0:D.value)==null?void 0:b.pageData)==null?void 0:X.name)===((Q=(ee=(re=e==null?void 0:e[ne])==null?void 0:re.groupSelect)==null?void 0:ee.split(":"))==null?void 0:Q[0])}),ce=(_=(Ae=(Te=(z=(be=G.cloneDeep(he))==null?void 0:be.value)==null?void 0:z.pageData)==null?void 0:Te.compData)==null?void 0:Ae.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:_.contents;ce!=null&&ce.find(D=>(D==null?void 0:D.key)===se)?M.push((A=ce==null?void 0:ce.find(D=>(D==null?void 0:D.key)===se))==null?void 0:A.value):M.push("")}),p.push(M)}else y=(W=(L=(U=(I=(B=G.cloneDeep(g))==null?void 0:B.value)==null?void 0:I.pageData)==null?void 0:U.compData)==null?void 0:L.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:W.contents,y==null||y.forEach(M=>{let se=[];i==null||i.forEach(ne=>{M!=null&&M[ne]&&se.push(M==null?void 0:M[ne])}),p.push(se)})}),(r==null?void 0:r.length)>0){let m={};r==null||r.forEach(g=>{var y;for(let v in g){let E=G.cloneDeep(v);if(!(E!=null&&E.includes("[")))(y=g[v])!=null&&y.includes("[")||(m[E]=g[v]);else{let w=to(E,a[n]),S=ao(g[v],a[n]);m[w]=S}}});for(let g in m)p=p==null?void 0:p.filter(y=>y[m[g]]===g)}return p}},S1=(e,a,r,n)=>{var f,c,l,o,u;let t=G.cloneDeep(e),i=a==null?void 0:a.map(x=>x==null?void 0:x.prop),s=[];for(let x in r)if(x!=null&&x.includes(t)){let h=(f=r[x])==null?void 0:f.filter(d=>{var p,m;return((p=d==null?void 0:d.key)==null?void 0:p.type)==="structure"&&((m=d==null?void 0:d.key)==null?void 0:m.parentTable)===""});s=[...s,...h]}if((s==null?void 0:s.length)>0){let x=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(t+Qt))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))}),h=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(t+Qt))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))});h=ro(G.cloneDeep(h),r),x=[...G.cloneDeep(x),...h],x=x==null?void 0:x.map(E=>({[E.key.pageKey]:E}));let d=0;x=x.reduce((E,w)=>(Object.keys(w).forEach(S=>{E[S]||(E[S]=[],E[S].push({index:d})),E[S].push(w[S])}),d++,E),{}),x=Jl(x,!0,r);let p=(c=Object.values(x))==null?void 0:c.sort((E,w)=>{var B,I;let S=(B=E==null?void 0:E.find(U=>U==null?void 0:U.index))==null?void 0:B.index,T=(I=w==null?void 0:w.find(U=>U==null?void 0:U.index))==null?void 0:I.index;return S-T});x=p==null?void 0:p.map(E=>E==null?void 0:E.filter(w=>!(w!=null&&w.index)&&(w==null?void 0:w.index)!==0));let m=(l=G.cloneDeep(x))==null?void 0:l.filter(E=>E==null?void 0:E.find(w=>{var S,T,B,I;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===Qt}));x=x==null?void 0:x.filter(E=>!(E!=null&&E.find(w=>{var S,T,B,I,U,L,W,M;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===Qt||((L=(U=w==null?void 0:w.key)==null?void 0:U.pageKey)==null?void 0:L.includes("updateLoading"))||((M=(W=w==null?void 0:w.key)==null?void 0:W.pageKey)==null?void 0:M.includes("loading"))})));let g=[],y=[];(o=m==null?void 0:m[0])==null||o.forEach(E=>{var w,S,T,B,I;((S=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:S.comp)==="Form"&&((I=(B=(T=E==null?void 0:E.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||I.forEach(U=>{(U==null?void 0:U.key)==="formContent"&&(y=[...y,...U==null?void 0:U.contents])}))});let v=(u=y==null?void 0:y.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:u.key;if(x==null||x.forEach(E=>{let w=[];E==null||E.forEach(T=>{var B,I,U,L,W;((I=(B=T==null?void 0:T.value)==null?void 0:B.pageData)==null?void 0:I.comp)==="Form"&&((W=(L=(U=T==null?void 0:T.value)==null?void 0:U.pageData)==null?void 0:L.compData)==null||W.forEach(M=>{(M==null?void 0:M.key)==="formContent"&&(w=[...w,...M==null?void 0:M.contents])}))});let S={};i==null||i.forEach(T=>{let B=w==null?void 0:w.find(I=>(I==null?void 0:I.key)===T);B!=null&&B.prop&&(S[B.prop]=(B==null?void 0:B.value)??"")}),g.push(S)}),(n==null?void 0:n.length)>0){let E=[];n==null||n.forEach(w=>{var I,U,L,W,M,se,ne,he,ce;let S={};for(let be in w){let z=G.cloneDeep(be);if(!(z!=null&&z.includes("[")))((I=w[be])==null?void 0:I.toUpperCase())==="@LOGINUSER"?S[z]=((U=m0.value)==null?void 0:U.姓名)||((L=m0.value)==null?void 0:L.account)||((W=m0.value)==null?void 0:W.账号)||((M=m0.value)==null?void 0:M.姓名):(se=w[be])!=null&&se.includes("[")||(S[z]=w[be]);else{let Te=to(z,r[e]),Ae=ao(w[be],r[e]);S[Te]=Ae}}let T=[],B=0;for(let be in S)((ne=S[be])==null?void 0:ne[0])!=="!"?T=(he=B>0?T:g)==null?void 0:he.filter(Te=>Te[be]===S[be]):T=(ce=B>0?T:g)==null?void 0:ce.filter(z=>{var Te;return z[be]!==((Te=S[be])==null?void 0:Te.replaceAll("!",""))}),B=1;E=[...E,...T]}),g=[...new Set(E)]}return g=g==null?void 0:g.map(E=>Object.values(E)),{mainKey:v,tableContents:g}}},A1=(e,a)=>{var t,i,s,f,c,l;let r=(i=(t=G.cloneDeep(e))==null?void 0:t.split("/"))==null?void 0:i[0],n=[];for(let o in a)if(o!=null&&o.includes(r)){let u=(s=a[o])==null?void 0:s.filter(x=>{var h,d;return((h=x==null?void 0:x.key)==null?void 0:h.type)==="structure"&&((d=x==null?void 0:x.key)==null?void 0:d.parentTable)===""});n=[...n,...u]}return(n==null?void 0:n.length)>0?!!((l=(c=(f=n==null?void 0:n.filter(u=>{var x;return((x=u==null?void 0:u.key)==null?void 0:x.pageKey)===r}))==null?void 0:f[0])==null?void 0:c.key)==null?void 0:l.parentPageKey):!0},F1=async(e,a,r,n)=>{var s,f,c,l,o,u,x,h,d;let t=(f=(s=G.cloneDeep(e))==null?void 0:s.split("/"))==null?void 0:f[0],i=[];for(let p in n)if(p!=null&&p.includes(t)){let m=(c=n[p])==null?void 0:c.filter(g=>{var y,v;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="structure"&&((v=g==null?void 0:g.key)==null?void 0:v.parentTable)===""});i=[...i,...m]}if((i==null?void 0:i.length)>0){let p=(u=(o=(l=i==null?void 0:i.filter(y=>{var v;return((v=y==null?void 0:y.key)==null?void 0:v.pageKey)===t}))==null?void 0:l[0])==null?void 0:o.key)==null?void 0:u.parentPageKey,m=[];if(p){for(let y in n)if(y!=null&&y.includes(p)){let v=(x=n[y])==null?void 0:x.filter(E=>{var w,S;return((w=E==null?void 0:E.key)==null?void 0:w.type)==="structure"&&((S=E==null?void 0:E.key)==null?void 0:S.parentTable)===""});m=[...m,...v]}}else m=i;let g="";if((m==null?void 0:m.length)>0){let y=[],v;v=(h=m==null?void 0:m.filter(U=>{var L,W,M,se,ne,he;return((M=(W=(L=U==null?void 0:U.key)==null?void 0:L.pageKey)==null?void 0:W.split("/"))==null?void 0:M[0])===p&&((he=(ne=(se=U==null?void 0:U.key)==null?void 0:se.pageKey)==null?void 0:ne.split("/"))==null?void 0:he.length)===2}))==null?void 0:h.map(U=>{var L;return(L=U==null?void 0:U.key)==null?void 0:L.pageKey}),v=[...new Set(v)],v=v==null?void 0:v.filter(U=>!U.includes(Qt));let E=(d=G.cloneDeep(v))==null?void 0:d.map(async U=>{var ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q;let L=await En(U,sessionStorage.getItem("systemKey"),"",!1,[],!1,n),W=(be=(ce=(he=(ne=G.cloneDeep(L))==null?void 0:ne[0])==null?void 0:he.compData)==null?void 0:ce.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:be.contents,M=(D=(A=(_=(Ae=(Te=(z=G.cloneDeep(L))==null?void 0:z[0])==null?void 0:Te.compData)==null?void 0:Ae.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:_.contents)==null?void 0:A.filter(q=>(q==null?void 0:q.label)!=="操作"))==null?void 0:D.map(q=>q==null?void 0:q.prop),se=[];return(Q=(ee=(re=(X=(b=G.cloneDeep(L))==null?void 0:b[0])==null?void 0:X.compData)==null?void 0:re.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:ee.contents)==null||Q.forEach(q=>{(q==null?void 0:q.isMainKey)===!0&&(g=q==null?void 0:q.prop)}),W==null||W.forEach(q=>{let we=d0(q,M);se.push(we),y.push({key:we==null?void 0:we[g],routerContent:U})}),se}),w=await Promise.all(E),S=[];w==null||w.forEach(U=>{(U==null?void 0:U.length)>0&&(U==null||U.forEach(L=>{S.push(L)}))});let T=[];T=a==null?void 0:a.map(U=>{var W,M,se;let L={};for(let ne in U)U[ne].toUpperCase()==="@LOGINUSER"?L[ne]=((W=m0.value)==null?void 0:W.姓名)||((M=m0.value)==null?void 0:M.account)||((se=m0.value)==null?void 0:se.账号):L[ne]=U[ne];return L});let B=[];S==null||S.forEach(U=>{let L=[];T==null||T.forEach(W=>{let M=[];for(let se in W)M.push(U[se]===W[se]);L.push(M)}),L.find(W=>W==null?void 0:W.every(M=>M===!0))&&B.push(U)});let I=[];return B==null||B.forEach(U=>{let L={};r==null||r.forEach(W=>{L[W.prop]=U[W.prop]??""}),I.push(L)}),I=I==null?void 0:I.map(U=>Object.values(U)),{mainKey:g,tableContents:I,mainKeys:y}}else return}else return},D1=async(e,a,r,n)=>{var i,s,f,c;let t=(i=G.cloneDeep(e))==null?void 0:i.filter(l=>(l==null?void 0:l.label)!=="操作");if((r==null?void 0:r.length)>0&&(t!=null&&t.every(l=>!(l!=null&&l.formMenuSelect)))&&A1(a,n)){let l=await F1(a,r,t,n);return l&&((s=l==null?void 0:l.tableContents)==null?void 0:s.length)>0?l:[]}if(!(t!=null&&t.every(l=>{var o,u,x,h;return((o=l==null?void 0:l.formMenuSelect)==null?void 0:o.length)>0&&((x=(u=l==null?void 0:l.groupSelect)==null?void 0:u.split(":"))==null?void 0:x.length)>0||((h=l==null?void 0:l.formMenuGroup)==null?void 0:h.length)>0})))return S1(a,t,n,r);if(t!=null&&t.every(l=>!(l!=null&&l.formMenuGroup)))return Pc(t,n,r,a);{let l=[];(c=(f=t==null?void 0:t[0])==null?void 0:f.formMenuGroup)==null||c.forEach((h,d)=>{let p=[];t==null||t.forEach(m=>{var g,y,v,E,w,S;p.push({columnPath:m==null?void 0:m.columnPath,formMenuSelect:(v=((g=m==null?void 0:m.formMenuGroup)==null?void 0:g[d])??((y=m==null?void 0:m.formMenuGroup)==null?void 0:y[0]))==null?void 0:v.formMenuSelect,groupSelect:(S=((E=m==null?void 0:m.formMenuGroup)==null?void 0:E[d])??((w=m==null?void 0:m.formMenuGroup)==null?void 0:w[0]))==null?void 0:S.groupSelect,isRoute:m==null?void 0:m.isRoute,label:m==null?void 0:m.label,prop:m==null?void 0:m.label})}),l.push(p)});let o=[],x=l==null?void 0:l.map(async h=>Pc(h,n,r,a));return x==null||x.forEach(h=>{h==null||h.forEach(d=>{o.push(d)})}),o}},I1=f0(G.pinia),{originalPath:no}=G.storeToRefs(I1),b1=G.useUnit(G.pinia),{chooseTitle:Bn}=G.storeToRefs(b1),O1=G.useMenuState(G.pinia),{activeMenuPath:Zs}=G.storeToRefs(O1),C1=e=>e==null?void 0:e.map(r=>(r=so(r),r)),Nf=async()=>{var r,n,t,i,s,f,c,l,o,u,x,h;let e;const a=await sa.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(f=(s=(i=(t=(n=(r=a.data.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:t.pageData)==null?void 0:i.compData)==null?void 0:s[0])!=null&&f.contents&&(e=C1((h=(x=(u=(o=(l=(c=a.data.result)==null?void 0:c[0])==null?void 0:l.value)==null?void 0:o.pageData)==null?void 0:u.compData)==null?void 0:x[0])==null?void 0:h.contents)),e},R1=e=>{var n,t,i;const a=(t=(n=e==null?void 0:e.compData)==null?void 0:n.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:t.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:a!=null&&a.every(s=>!Array.isArray(s))?a==null?void 0:a.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label})):(i=gn(a==null?void 0:a[0]))==null?void 0:i.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label}))}},io=async(e,a)=>{var i,s,f,c,l,o,u,x;let r="";(i=G.cloneDeep(e))==null||i.forEach(h=>{var d;h!=null&&h.includes(":")?(d=h==null?void 0:h.split(":"))==null||d.forEach(p=>{r=r===""?r+p:r+"/"+p}):r=r===""?r+h:r+"/"+h}),(r===""||Zs.value===r)&&((f=(s=Bn==null?void 0:Bn.value)==null?void 0:s[0])!=null&&f.value?r=Zs.value+"/"+((l=(c=Bn==null?void 0:Bn.value)==null?void 0:c[0])==null?void 0:l.value):r=Zs.value);let n="";(o=G.cloneDeep(e))==null||o.forEach((h,d)=>{d!==(e==null?void 0:e.length)-1?n=n===""?n+h:n+"/"+h:n=h===""?n:n+no.value+h}),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((x=(u=Bn==null?void 0:Bn.value)==null?void 0:u[0])==null?void 0:x.value));const t=await En(r,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0);return t||await En(n,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0)},N1=e=>e.entries().next().done,P1=async e=>{var n,t,i;const a=await io(e);let r=[];return((n=a==null?void 0:a.data)==null?void 0:n.type)==="success"&&(r=(i=(t=a.data.result)==null?void 0:t.map(s=>s.value.pageData))==null?void 0:i.filter(s=>(s==null?void 0:s.comp)==="Table"),r=r==null?void 0:r.map(s=>R1(s))),r},M1=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],D0=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],L1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"},{key:"isFormColHidden",label:"是否隐藏",name:"是否隐藏",type:"radio",options:[{label:"否",value:!1},{label:"是",value:!0}],value:!1}],B1=async()=>{const e=await Nf();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"multiple",label:"多选",default:!1,type:"Switch"},{key:"originalContent",label:"初始值",type:"Select"},{key:"selectRelateType",label:"下拉绑定类型",type:"Select",options:[{label:"关联绑定列",value:"关联绑定列"},{label:"自定义绑定",value:"自定义绑定"}]},{key:"menuSelect",label:"菜单选项",type:"cascader",options:e},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]},{key:"contents",label:"选项值",type:"Input"}]},U1=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await Nf()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],W1=zl.computed(async()=>await B1()),H1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],G1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"value",label:"固定值",type:"Input"}],X1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"originalContent",label:"初始值",type:"Input"}],Mc=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0}],$1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0}],K1=[{key:"Input",value:L1},{key:"Select",value:W1},{key:"Date",value:H1},{key:"TextArea",value:X1},{key:"Upload",value:Mc},{key:"DragUpload",value:Mc},{key:"Quill",value:$1},{key:"Link",value:G1}],z1=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],V1=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:z1},{key:"background",label:"颜色",type:"Color"}],j1=e=>{var r,n,t,i,s,f,c,l;let a=G.cloneDeep(e);if(((r=a==null?void 0:a.find(o=>(o==null?void 0:o.name)==="类型"))==null?void 0:r.type)==="Select"&&((i=(t=(n=G.cloneDeep(a))==null?void 0:n.find(o=>(o==null?void 0:o.name)==="选项值"))==null?void 0:t.value)==null?void 0:i.length)>0){const o=(l=(c=(f=(s=G.cloneDeep(a))==null?void 0:s.find(u=>(u==null?void 0:u.name)==="选项值"))==null?void 0:f.value)==null?void 0:c.split(","))==null?void 0:l.map(u=>({label:u,value:u}));a=a==null?void 0:a.map(u=>((u==null?void 0:u.name)==="初始值"&&(u.contents=o,u.value=(u==null?void 0:u.value)??""),u))}return a},so=e=>{var t;let a={};const r=(t=e==null?void 0:e.filter(i=>!Array.isArray(i)))==null?void 0:t[0];a.label=r,a.value=r;const n=e==null?void 0:e.filter(i=>Array.isArray(i));return n&&(n==null?void 0:n.length)>0&&(a.children=n==null?void 0:n.map(i=>so(i))),a},Y1=async e=>{var i,s,f,c;let a=G.cloneDeep(e);const r=(i=e==null?void 0:e.find(l=>(l==null?void 0:l.name)==="下拉绑定类型"))==null?void 0:i.value,n=(s=e==null?void 0:e.find(l=>(l==null?void 0:l.name)==="类型"))==null?void 0:s.value,t=await U1();return n==="Select"&&r===""?a=a==null?void 0:a.filter(l=>(l==null?void 0:l.name)!=="菜单选项"&&(l==null?void 0:l.name)!=="组信息选项"&&(l==null?void 0:l.name)!=="选项值"):n==="Select"&&r==="关联绑定列"?a!=null&&a.find(l=>(l==null?void 0:l.name)==="菜单选项"||(l==null?void 0:l.name)==="组信息选项")?a=(f=G.cloneDeep(a))==null?void 0:f.filter(l=>(l==null?void 0:l.name)!=="选项值"):a=[...G.cloneDeep(a),...t].filter(l=>(l==null?void 0:l.name)!=="选项值"):n==="Select"&&r==="自定义绑定"&&(a!=null&&a.find(l=>(l==null?void 0:l.name)==="选项值")?a=(c=G.cloneDeep(a))==null?void 0:c.filter(l=>(l==null?void 0:l.name)!=="菜单选项"&&(l==null?void 0:l.name)!=="组信息选项"):a=[...G.cloneDeep(a),...t].filter(l=>(l==null?void 0:l.name)!=="菜单选项"&&(l==null?void 0:l.name)!=="组信息选项")),a},J1=(e,a)=>{var n;let r=!1;return(n=G.cloneDeep(e))==null||n.forEach(t=>{var i;(t==null?void 0:t.key)==="formContent"&&((i=t==null?void 0:t.contents)==null||i.forEach(s=>{(s==null?void 0:s.key)===a?r=!0:r=r}))}),r},fo=(e,a)=>{var s,f,c,l,o;const r=G.cloneDeep(e);if(!r)return;let n="";(f=(s=G.cloneDeep(r))==null?void 0:s.menuSelect)==null||f.forEach(u=>{u!=null&&u.includes("[")?n=n+no.value:n=n===""?n+u:n+"/"+u});const t=(c=a==null?void 0:a[n])==null?void 0:c.map(u=>{var x;return(x=u==null?void 0:u.value)==null?void 0:x.pageData});let i=t==null?void 0:t.filter(u=>{var x,h;return(u==null?void 0:u.name)===((h=(x=G.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[0])});if((i==null?void 0:i.length)===1?i=i==null?void 0:i[0]:(l=G.cloneDeep(i))==null||l.forEach(u=>{var x,h;(u==null?void 0:u.comp)==="Form"&&J1(u==null?void 0:u.compData,(h=(x=G.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[1])&&(i=u)}),(i==null?void 0:i.comp)==="Form"){let u="";return(o=i==null?void 0:i.compData)==null||o.forEach(x=>{var h;(x==null?void 0:x.key)==="formContent"&&((h=x==null?void 0:x.contents)==null||h.forEach(d=>{var p,m;(d==null?void 0:d.key)===((m=(p=G.cloneDeep(r))==null?void 0:p.groupSelect)==null?void 0:m[1])&&(d.type==="Select"&&!(d!=null&&d.value)?u=void 0:u=d==null?void 0:d.value)}))}),u}};/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Ss={};Ss.version="0.18.5";var co=1252,q1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Pf={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Mf=function(e){q1.indexOf(e)!=-1&&(co=Pf[0]=e)};function Z1(){Mf(1252)}var vn=function(e){Mf(e)};function Lf(){vn(1200),Z1()}function Lc(e){for(var a=[],r=0,n=e.length;r<n;++r)a[r]=e.charCodeAt(r);return a}function Q1(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return a.join("")}function lo(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return a.join("")}var Ai=function(e){var a=e.charCodeAt(0),r=e.charCodeAt(1);return a==255&&r==254?Q1(e.slice(2)):a==254&&r==255?lo(e.slice(2)):a==65279?e.slice(1):e},os=function(a){return String.fromCharCode(a)},Bc=function(a){return String.fromCharCode(a)},yf,r0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Bi(e){for(var a="",r=0,n=0,t=0,i=0,s=0,f=0,c=0,l=0;l<e.length;)r=e.charCodeAt(l++),i=r>>2,n=e.charCodeAt(l++),s=(r&3)<<4|n>>4,t=e.charCodeAt(l++),f=(n&15)<<2|t>>6,c=t&63,isNaN(n)?f=c=64:isNaN(t)&&(c=64),a+=r0.charAt(i)+r0.charAt(s)+r0.charAt(f)+r0.charAt(c);return a}function Xt(e){var a="",r=0,n=0,t=0,i=0,s=0,f=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)i=r0.indexOf(e.charAt(l++)),s=r0.indexOf(e.charAt(l++)),r=i<<2|s>>4,a+=String.fromCharCode(r),f=r0.indexOf(e.charAt(l++)),n=(s&15)<<4|f>>2,f!==64&&(a+=String.fromCharCode(n)),c=r0.indexOf(e.charAt(l++)),t=(f&3)<<6|c,c!==64&&(a+=String.fromCharCode(t));return a}var yr=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),$n=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(a,r){return r?new Buffer(a,r):new Buffer(a)}:Buffer.from.bind(Buffer)}return function(){}}();function t0(e){return yr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Uc(e){return yr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Wt=function(a){return yr?$n(a,"binary"):a.split("").map(function(r){return r.charCodeAt(0)&255})};function Us(e){if(typeof ArrayBuffer>"u")return Wt(e);for(var a=new ArrayBuffer(e.length),r=new Uint8Array(a),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return a}function c0(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var a=[],r=0;r<e.length;++r)a[r]=String.fromCharCode(e[r]);return a.join("")}function ex(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function Bf(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Bf(new Uint8Array(e));for(var a=new Array(e.length),r=0;r<e.length;++r)a[r]=e[r];return a}var ja=yr?function(e){return Buffer.concat(e.map(function(a){return Buffer.isBuffer(a)?a:$n(a)}))}:function(e){if(typeof Uint8Array<"u"){var a=0,r=0;for(a=0;a<e.length;++a)r+=e[a].length;var n=new Uint8Array(r),t=0;for(a=0,r=0;a<e.length;r+=t,++a)if(t=e[a].length,e[a]instanceof Uint8Array)n.set(e[a],r);else{if(typeof e[a]=="string")throw"wtf";n.set(new Uint8Array(e[a]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function rx(e){for(var a=[],r=0,n=e.length+250,t=t0(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)t[r++]=s;else if(s<2048)t[r++]=192|s>>6&31,t[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var f=e.charCodeAt(++i)&1023;t[r++]=240|s>>8&7,t[r++]=128|s>>2&63,t[r++]=128|f>>6&15|(s&3)<<4,t[r++]=128|f&63}else t[r++]=224|s>>12&15,t[r++]=128|s>>6&63,t[r++]=128|s&63;r>n&&(a.push(t.slice(0,r)),r=0,t=t0(65535),n=65530)}return a.push(t.slice(0,r)),ja(a)}var kt=/\u0000/g,Fi=/[\u0001-\u0006]/g;function V0(e){for(var a="",r=e.length-1;r>=0;)a+=e.charAt(r--);return a}function _n(e,a){var r=""+e;return r.length>=a?r:wa("0",a-r.length)+r}function Uf(e,a){var r=""+e;return r.length>=a?r:wa(" ",a-r.length)+r}function As(e,a){var r=""+e;return r.length>=a?r:r+wa(" ",a-r.length)}function ax(e,a){var r=""+Math.round(e);return r.length>=a?r:wa("0",a-r.length)+r}function tx(e,a){var r=""+e;return r.length>=a?r:wa("0",a-r.length)+r}var Wc=Math.pow(2,32);function W0(e,a){if(e>Wc||e<-Wc)return ax(e,a);var r=Math.round(e);return tx(r,a)}function Fs(e,a){return a=a||0,e.length>=7+a&&(e.charCodeAt(a)|32)===103&&(e.charCodeAt(a+1)|32)===101&&(e.charCodeAt(a+2)|32)===110&&(e.charCodeAt(a+3)|32)===101&&(e.charCodeAt(a+4)|32)===114&&(e.charCodeAt(a+5)|32)===97&&(e.charCodeAt(a+6)|32)===108}var Hc=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Qs=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function nx(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var ar={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Gc={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},ix={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Ds(e,a,r){for(var n=e<0?-1:1,t=e*n,i=0,s=1,f=0,c=1,l=0,o=0,u=Math.floor(t);l<a&&(u=Math.floor(t),f=u*s+i,o=u*l+c,!(t-u<5e-8));)t=1/(t-u),i=s,s=f,c=l,l=o;if(o>a&&(l>a?(o=c,f=i):(o=l,f=s)),!r)return[0,n*f,o];var x=Math.floor(n*f/o);return[x,n*f-x*o,o]}function g0(e,a,r){if(e>2958465||e<0)return null;var n=e|0,t=Math.floor(86400*(e-n)),i=0,s=[],f={D:n,T:t,u:86400*(e-n)-t,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(f.u)<1e-6&&(f.u=0),a&&a.date1904&&(n+=1462),f.u>.9999&&(f.u=0,++t==86400&&(f.T=t=0,++n,++f.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],i=c.getDay(),n<60&&(i=(i+6)%7),r&&(i=ux(c,s))}return f.y=s[0],f.m=s[1],f.d=s[2],f.S=t%60,t=Math.floor(t/60),f.M=t%60,t=Math.floor(t/60),f.H=t,f.q=i,f}var oo=new Date(1899,11,31,0,0,0),sx=oo.getTime(),fx=new Date(1900,2,1,0,0,0);function uo(e,a){var r=e.getTime();return a?r-=1461*24*60*60*1e3:e>=fx&&(r+=24*60*60*1e3),(r-(sx+(e.getTimezoneOffset()-oo.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Wf(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function cx(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function lx(e){var a=e<0?12:11,r=Wf(e.toFixed(12));return r.length<=a||(r=e.toPrecision(10),r.length<=a)?r:e.toExponential(5)}function ox(e){var a=Wf(e.toFixed(11));return a.length>(e<0?12:11)||a==="0"||a==="-0"?e.toPrecision(6):a}function Ui(e){var a=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return a>=-4&&a<=-1?r=e.toPrecision(10+a):Math.abs(a)<=9?r=lx(e):a===10?r=e.toFixed(10).substr(0,12):r=ox(e),Wf(cx(r.toUpperCase()))}function E0(e,a){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):Ui(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return rn(14,uo(e,a&&a.date1904),a)}throw new Error("unsupported value in General format: "+e)}function ux(e,a){a[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function hx(e,a,r,n){var t="",i=0,s=0,f=r.y,c,l=0;switch(e){case 98:f=r.y+543;case 121:switch(a.length){case 1:case 2:c=f%100,l=2;break;default:c=f%1e4,l=4;break}break;case 109:switch(a.length){case 1:case 2:c=r.m,l=a.length;break;case 3:return Qs[r.m-1][1];case 5:return Qs[r.m-1][0];default:return Qs[r.m-1][2]}break;case 100:switch(a.length){case 1:case 2:c=r.d,l=a.length;break;case 3:return Hc[r.q][0];default:return Hc[r.q][1]}break;case 104:switch(a.length){case 1:case 2:c=1+(r.H+11)%12,l=a.length;break;default:throw"bad hour format: "+a}break;case 72:switch(a.length){case 1:case 2:c=r.H,l=a.length;break;default:throw"bad hour format: "+a}break;case 77:switch(a.length){case 1:case 2:c=r.M,l=a.length;break;default:throw"bad minute format: "+a}break;case 115:if(a!="s"&&a!="ss"&&a!=".0"&&a!=".00"&&a!=".000")throw"bad second format: "+a;return r.u===0&&(a=="s"||a=="ss")?_n(r.S,a.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),a==="s"?i===0?"0":""+i/s:(t=_n(i,2+n),a==="ss"?t.substr(0,2):"."+t.substr(2,a.length-1)));case 90:switch(a){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+a}l=a.length===3?1:2;break;case 101:c=f,l=1;break}var o=l>0?_n(c,l):"";return o}function a0(e){var a=3;if(e.length<=a)return e;for(var r=e.length%a,n=e.substr(0,r);r!=e.length;r+=a)n+=(n.length>0?",":"")+e.substr(r,a);return n}var ho=/%/g;function xx(e,a,r){var n=a.replace(ho,""),t=a.length-n.length;return Wn(e,n,r*Math.pow(10,2*t))+wa("%",t)}function dx(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Wn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function xo(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+xo(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),r.indexOf("e")===-1){var s=Math.floor(Math.log(a)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,t)+"."+r.substr(2+t),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,c,l,o){return c+l+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var po=/# (\?+)( ?)\/( ?)(\d+)/;function px(e,a,r){var n=parseInt(e[4],10),t=Math.round(a*n),i=Math.floor(t/n),s=t-i*n,f=n;return r+(i===0?"":""+i)+" "+(s===0?wa(" ",e[1].length+1+e[4].length):Uf(s,e[1].length)+e[2]+"/"+e[3]+_n(f,e[4].length))}function mx(e,a,r){return r+(a===0?"":""+a)+wa(" ",e[1].length+2+e[4].length)}var mo=/^#*0*\.([0#]+)/,go=/\).*[0#]/,vo=/\(###\) ###\\?-####/;function _t(e){for(var a="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:a+=" ";break;case 48:a+="0";break;default:a+=String.fromCharCode(r)}return a}function Xc(e,a){var r=Math.pow(10,a);return""+Math.round(e*r)/r}function $c(e,a){var r=e-Math.floor(e),n=Math.pow(10,a);return a<(""+Math.round(r*n)).length?0:Math.round(r*n)}function gx(e,a){return a<(""+Math.round((e-Math.floor(e))*Math.pow(10,a))).length?1:0}function vx(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function jt(e,a,r){if(e.charCodeAt(0)===40&&!a.match(go)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?jt("n",n,r):"("+jt("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return dx(e,a,r);if(a.indexOf("%")!==-1)return xx(e,a,r);if(a.indexOf("E")!==-1)return xo(a,r);if(a.charCodeAt(0)===36)return"$"+jt(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,c=Math.abs(r),l=r<0?"-":"";if(a.match(/^00+$/))return l+W0(c,a.length);if(a.match(/^[#?]+$/))return t=W0(r,0),t==="0"&&(t=""),t.length>a.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(po))return px(i,c,l);if(a.match(/^#+0+$/))return l+W0(c,a.length-a.indexOf("0"));if(i=a.match(mo))return t=Xc(r,i[1].length).replace(/^([^\.]+)$/,"$1."+_t(i[1])).replace(/\.$/,"."+_t(i[1])).replace(/\.(\d*)$/,function(d,p){return"."+p+wa("0",_t(i[1]).length-p.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return l+Xc(c,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return l+a0(W0(c,0));if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+jt(e,a,-r):a0(""+(Math.floor(r)+gx(r,i[1].length)))+"."+_n($c(r,i[1].length),i[1].length);if(i=a.match(/^#,#*,#0/))return jt(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=V0(jt(e,a.replace(/[\\-]/g,""),r)),s=0,V0(V0(a.replace(/\\/g,"")).replace(/[0#]/g,function(d){return s<t.length?t.charAt(s++):d==="0"?"0":""}));if(a.match(vo))return t=jt(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Ds(c,Math.pow(10,s)-1,!1),t=""+l,o=Wn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=As(f[2],s),o.length<i[4].length&&(o=_t(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Ds(c,Math.pow(10,s)-1,!0),l+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Uf(f[1],s)+i[2]+"/"+i[3]+As(f[2],s):wa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=W0(r,0),a.length<=t.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0?]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return _t(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return s=$c(r,i[1].length),r<0?"-"+jt(e,a,-r):a0(vx(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(d){return"00,"+(d.length<3?_n(0,3-d.length):"")+d})+"."+_n(s,i[1].length);switch(a){case"###,##0.00":return jt(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var h=a0(W0(c,0));return h!=="0"?l+h:"";case"###,###.00":return jt(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return jt(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+a+"|")}function _x(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Wn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function yx(e,a,r){var n=a.replace(ho,""),t=a.length-n.length;return Wn(e,n,r*Math.pow(10,2*t))+wa("%",t)}function _o(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+_o(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),!r.match(/[Ee]/)){var s=Math.floor(Math.log(a)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,c,l,o){return c+l+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function Dn(e,a,r){if(e.charCodeAt(0)===40&&!a.match(go)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Dn("n",n,r):"("+Dn("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return _x(e,a,r);if(a.indexOf("%")!==-1)return yx(e,a,r);if(a.indexOf("E")!==-1)return _o(a,r);if(a.charCodeAt(0)===36)return"$"+Dn(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,c=Math.abs(r),l=r<0?"-":"";if(a.match(/^00+$/))return l+_n(c,a.length);if(a.match(/^[#?]+$/))return t=""+r,r===0&&(t=""),t.length>a.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(po))return mx(i,c,l);if(a.match(/^#+0+$/))return l+_n(c,a.length-a.indexOf("0"));if(i=a.match(mo))return t=(""+r).replace(/^([^\.]+)$/,"$1."+_t(i[1])).replace(/\.$/,"."+_t(i[1])),t=t.replace(/\.(\d*)$/,function(d,p){return"."+p+wa("0",_t(i[1]).length-p.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return l+a0(""+c);if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Dn(e,a,-r):a0(""+r)+"."+wa("0",i[1].length);if(i=a.match(/^#,#*,#0/))return Dn(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=V0(Dn(e,a.replace(/[\\-]/g,""),r)),s=0,V0(V0(a.replace(/\\/g,"")).replace(/[0#]/g,function(d){return s<t.length?t.charAt(s++):d==="0"?"0":""}));if(a.match(vo))return t=Dn(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Ds(c,Math.pow(10,s)-1,!1),t=""+l,o=Wn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=As(f[2],s),o.length<i[4].length&&(o=_t(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Ds(c,Math.pow(10,s)-1,!0),l+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Uf(f[1],s)+i[2]+"/"+i[3]+As(f[2],s):wa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=""+r,a.length<=t.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return _t(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return r<0?"-"+Dn(e,a,-r):a0(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(d){return"00,"+(d.length<3?_n(0,3-d.length):"")+d})+"."+_n(0,i[1].length);switch(a){case"###,###":case"##,###":case"#,###":var h=a0(""+c);return h!=="0"?l+h:"";default:if(a.match(/\.[0#?]*$/))return Dn(e,a.slice(0,a.lastIndexOf(".")),r)+_t(a.slice(a.lastIndexOf(".")))}throw new Error("unsupported format |"+a+"|")}function Wn(e,a,r){return(r|0)===r?Dn(e,a,r):jt(e,a,r)}function kx(e){for(var a=[],r=!1,n=0,t=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:a[a.length]=e.substr(t,n-t),t=n+1}if(a[a.length]=e.substr(t),r===!0)throw new Error("Format |"+e+"| unterminated string ");return a}var yo=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ei(e){for(var a=0,r="",n="";a<e.length;)switch(r=e.charAt(a)){case"G":Fs(e,a)&&(a+=6),a++;break;case'"':for(;e.charCodeAt(++a)!==34&&a<e.length;);++a;break;case"\\":a+=2;break;case"_":a+=2;break;case"@":++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(a,3).toUpperCase()==="A/P"||e.substr(a,5).toUpperCase()==="AM/PM"||e.substr(a,5).toUpperCase()==="上午/下午")return!0;++a;break;case"[":for(n=r;e.charAt(a++)!=="]"&&a<e.length;)n+=e.charAt(a);if(n.match(yo))return!0;break;case".":case"0":case"#":for(;a<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++a))>-1||r=="\\"&&e.charAt(a+1)=="-"&&"0#".indexOf(e.charAt(a+2))>-1););break;case"?":for(;e.charAt(++a)===r;);break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;);break;case" ":++a;break;default:++a;break}return!1}function Ex(e,a,r,n){for(var t=[],i="",s=0,f="",c="t",l,o,u,x="H";s<e.length;)switch(f=e.charAt(s)){case"G":if(!Fs(e,s))throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(u=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(u);t[t.length]={t:"t",v:i},++s;break;case"\\":var h=e.charAt(++s),d=h==="("||h===")"?h:"t";t[t.length]={t:d,v:h},++s;break;case"_":t[t.length]={t:"t",v:" "},s+=2;break;case"@":t[t.length]={t:"T",v:a},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(l==null&&(l=g0(a,r,e.charAt(s+1)==="2"),l==null))return"";t[t.length]={t:"X",v:e.substr(s,2)},c=f,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":f=f.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(a<0||l==null&&(l=g0(a,r),l==null))return"";for(i=f;++s<e.length&&e.charAt(s).toLowerCase()===f;)i+=f;f==="m"&&c.toLowerCase()==="h"&&(f="M"),f==="h"&&(f=x),t[t.length]={t:f,v:i},c=f;break;case"A":case"a":case"上":var p={t:f,v:f};if(l==null&&(l=g0(a,r)),e.substr(s,3).toUpperCase()==="A/P"?(l!=null&&(p.v=l.H>=12?"P":"A"),p.t="T",x="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(l!=null&&(p.v=l.H>=12?"PM":"AM"),p.t="T",s+=5,x="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(l!=null&&(p.v=l.H>=12?"下午":"上午"),p.t="T",s+=5,x="h"):(p.t="t",++s),l==null&&p.t==="T")return"";t[t.length]=p,c=f;break;case"[":for(i=f;e.charAt(s++)!=="]"&&s<e.length;)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(yo)){if(l==null&&(l=g0(a,r),l==null))return"";t[t.length]={t:"Z",v:i.toLowerCase()},c=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",ei(e)||(t[t.length]={t:"t",v:i}));break;case".":if(l!=null){for(i=f;++s<e.length&&(f=e.charAt(s))==="0";)i+=f;t[t.length]={t:"s",v:i};break}case"0":case"#":for(i=f;++s<e.length&&"0#?.,E+-%".indexOf(f=e.charAt(s))>-1;)i+=f;t[t.length]={t:"n",v:i};break;case"?":for(i=f;e.charAt(++s)===f;)i+=f;t[t.length]={t:f,v:i},c=f;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":t[t.length]={t:n===1?"t":f,v:f},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=f;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)i+=e.charAt(s);t[t.length]={t:"D",v:i};break;case" ":t[t.length]={t:f,v:f},++s;break;case"$":t[t.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(f)===-1)throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"t",v:f},++s;break}var m=0,g=0,y;for(s=t.length-1,c="t";s>=0;--s)switch(t[s].t){case"h":case"H":t[s].t=x,c="h",m<1&&(m=1);break;case"s":(y=t[s].v.match(/\.0+$/))&&(g=Math.max(g,y[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":c=t[s].t;break;case"m":c==="s"&&(t[s].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&t[s].v.match(/[Hh]/)&&(m=1),m<2&&t[s].v.match(/[Mm]/)&&(m=2),m<3&&t[s].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var v="",E;for(s=0;s<t.length;++s)switch(t[s].t){case"t":case"T":case" ":case"D":break;case"X":t[s].v="",t[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":t[s].v=hx(t[s].t.charCodeAt(0),t[s].v,l,g),t[s].t="t";break;case"n":case"?":for(E=s+1;t[E]!=null&&((f=t[E].t)==="?"||f==="D"||(f===" "||f==="t")&&t[E+1]!=null&&(t[E+1].t==="?"||t[E+1].t==="t"&&t[E+1].v==="/")||t[s].t==="("&&(f===" "||f==="n"||f===")")||f==="t"&&(t[E].v==="/"||t[E].v===" "&&t[E+1]!=null&&t[E+1].t=="?"));)t[s].v+=t[E].v,t[E]={v:"",t:";"},++E;v+=t[s].v,s=E-1;break;case"G":t[s].t="t",t[s].v=E0(a,r);break}var w="",S,T;if(v.length>0){v.charCodeAt(0)==40?(S=a<0&&v.charCodeAt(0)===45?-a:a,T=Wn("n",v,S)):(S=a<0&&n>1?-a:a,T=Wn("n",v,S),S<0&&t[0]&&t[0].t=="t"&&(T=T.substr(1),t[0].v="-"+t[0].v)),E=T.length-1;var B=t.length;for(s=0;s<t.length;++s)if(t[s]!=null&&t[s].t!="t"&&t[s].v.indexOf(".")>-1){B=s;break}var I=t.length;if(B===t.length&&T.indexOf("E")===-1){for(s=t.length-1;s>=0;--s)t[s]==null||"n?".indexOf(t[s].t)===-1||(E>=t[s].v.length-1?(E-=t[s].v.length,t[s].v=T.substr(E+1,t[s].v.length)):E<0?t[s].v="":(t[s].v=T.substr(0,E+1),E=-1),t[s].t="t",I=s);E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v)}else if(B!==t.length&&T.indexOf("E")===-1){for(E=T.indexOf(".")-1,s=B;s>=0;--s)if(!(t[s]==null||"n?".indexOf(t[s].t)===-1)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")-1:t[s].v.length-1,w=t[s].v.substr(o+1);o>=0;--o)E>=0&&(t[s].v.charAt(o)==="0"||t[s].v.charAt(o)==="#")&&(w=T.charAt(E--)+w);t[s].v=w,t[s].t="t",I=s}for(E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v),E=T.indexOf(".")+1,s=B;s<t.length;++s)if(!(t[s]==null||"n?(".indexOf(t[s].t)===-1&&s!==B)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")+1:0,w=t[s].v.substr(0,o);o<t[s].v.length;++o)E<T.length&&(w+=T.charAt(E++));t[s].v=w,t[s].t="t",I=s}}}for(s=0;s<t.length;++s)t[s]!=null&&"n?".indexOf(t[s].t)>-1&&(S=n>1&&a<0&&s>0&&t[s-1].v==="-"?-a:a,t[s].v=Wn(t[s].t,t[s].v,S),t[s].t="t");var U="";for(s=0;s!==t.length;++s)t[s]!=null&&(U+=t[s].v);return U}var Kc=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function zc(e,a){if(a==null)return!1;var r=parseFloat(a[2]);switch(a[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function Tx(e,a){var r=kx(e),n=r.length,t=r[n-1].indexOf("@");if(n<4&&t>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof a!="number")return[4,r.length===4||t>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=t>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=t>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=t>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=a>0?r[0]:a<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(Kc),f=r[1].match(Kc);return zc(a,s)?[n,r[0]]:zc(a,f)?[n,r[1]]:[n,r[s!=null&&f!=null?2:1]]}return[n,i]}function rn(e,a,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:ar)[e],n==null&&(n=r.table&&r.table[Gc[e]]||ar[Gc[e]]),n==null&&(n=ix[e]||"General");break}if(Fs(n,0))return E0(a,r);a instanceof Date&&(a=uo(a,r.date1904));var t=Tx(n,a);if(Fs(t[1]))return E0(a,r);if(a===!0)a="TRUE";else if(a===!1)a="FALSE";else if(a===""||a==null)return"";return Ex(t[1],a,r,t[0])}function Hn(e,a){if(typeof a!="number"){a=+a||-1;for(var r=0;r<392;++r){if(ar[r]==null){a<0&&(a=r);continue}if(ar[r]==e){a=r;break}}a<0&&(a=391)}return ar[a]=e,a}function Ws(e){for(var a=0;a!=392;++a)e[a]!==void 0&&Hn(e[a],a)}function ri(){ar=nx()}var wx={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},ko=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function Sx(e){var a=typeof e=="number"?ar[e]:e;return a=a.replace(ko,"(\\d+)"),new RegExp("^"+a+"$")}function Ax(e,a,r){var n=-1,t=-1,i=-1,s=-1,f=-1,c=-1;(a.match(ko)||[]).forEach(function(u,x){var h=parseInt(r[x+1],10);switch(u.toLowerCase().charAt(0)){case"y":n=h;break;case"d":i=h;break;case"h":s=h;break;case"s":c=h;break;case"m":s>=0?f=h:t=h;break}}),c>=0&&f==-1&&t>=0&&(f=t,t=-1);var l=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(t>=1?t:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var o=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return s==-1&&f==-1&&c==-1?l:n==-1&&t==-1&&i==-1?o:l+"T"+o}var Fx=function(){var e={};e.version="1.2.0";function a(){for(var T=0,B=new Array(256),I=0;I!=256;++I)T=I,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,B[I]=T;return typeof Int32Array<"u"?new Int32Array(B):B}var r=a();function n(T){var B=0,I=0,U=0,L=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)L[U]=T[U];for(U=0;U!=256;++U)for(I=T[U],B=256+U;B<4096;B+=256)I=L[B]=I>>>8^T[I&255];var W=[];for(U=1;U!=16;++U)W[U-1]=typeof Int32Array<"u"?L.subarray(U*256,U*256+256):L.slice(U*256,U*256+256);return W}var t=n(r),i=t[0],s=t[1],f=t[2],c=t[3],l=t[4],o=t[5],u=t[6],x=t[7],h=t[8],d=t[9],p=t[10],m=t[11],g=t[12],y=t[13],v=t[14];function E(T,B){for(var I=B^-1,U=0,L=T.length;U<L;)I=I>>>8^r[(I^T.charCodeAt(U++))&255];return~I}function w(T,B){for(var I=B^-1,U=T.length-15,L=0;L<U;)I=v[T[L++]^I&255]^y[T[L++]^I>>8&255]^g[T[L++]^I>>16&255]^m[T[L++]^I>>>24]^p[T[L++]]^d[T[L++]]^h[T[L++]]^x[T[L++]]^u[T[L++]]^o[T[L++]]^l[T[L++]]^c[T[L++]]^f[T[L++]]^s[T[L++]]^i[T[L++]]^r[T[L++]];for(U+=15;L<U;)I=I>>>8^r[(I^T[L++])&255];return~I}function S(T,B){for(var I=B^-1,U=0,L=T.length,W=0,M=0;U<L;)W=T.charCodeAt(U++),W<128?I=I>>>8^r[(I^W)&255]:W<2048?(I=I>>>8^r[(I^(192|W>>6&31))&255],I=I>>>8^r[(I^(128|W&63))&255]):W>=55296&&W<57344?(W=(W&1023)+64,M=T.charCodeAt(U++)&1023,I=I>>>8^r[(I^(240|W>>8&7))&255],I=I>>>8^r[(I^(128|W>>2&63))&255],I=I>>>8^r[(I^(128|M>>6&15|(W&3)<<4))&255],I=I>>>8^r[(I^(128|M&63))&255]):(I=I>>>8^r[(I^(224|W>>12&15))&255],I=I>>>8^r[(I^(128|W>>6&63))&255],I=I>>>8^r[(I^(128|W&63))&255]);return~I}return e.table=r,e.bstr=E,e.buf=w,e.str=S,e}(),Ve=function(){var a={};a.version="1.2.1";function r(k,N){for(var F=k.split("/"),O=N.split("/"),C=0,R=0,K=Math.min(F.length,O.length);C<K;++C){if(R=F[C].length-O[C].length)return R;if(F[C]!=O[C])return F[C]<O[C]?-1:1}return F.length-O.length}function n(k){if(k.charAt(k.length-1)=="/")return k.slice(0,-1).indexOf("/")===-1?k:n(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(0,N+1)}function t(k){if(k.charAt(k.length-1)=="/")return t(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(N+1)}function i(k,N){typeof N=="string"&&(N=new Date(N));var F=N.getHours();F=F<<6|N.getMinutes(),F=F<<5|N.getSeconds()>>>1,k.write_shift(2,F);var O=N.getFullYear()-1980;O=O<<4|N.getMonth()+1,O=O<<5|N.getDate(),k.write_shift(2,O)}function s(k){var N=k.read_shift(2)&65535,F=k.read_shift(2)&65535,O=new Date,C=F&31;F>>>=5;var R=F&15;F>>>=4,O.setMilliseconds(0),O.setFullYear(F+1980),O.setMonth(R-1),O.setDate(C);var K=N&31;N>>>=5;var Y=N&63;return N>>>=6,O.setHours(N),O.setMinutes(Y),O.setSeconds(K<<1),O}function f(k){tt(k,0);for(var N={},F=0;k.l<=k.length-4;){var O=k.read_shift(2),C=k.read_shift(2),R=k.l+C,K={};switch(O){case 21589:F=k.read_shift(1),F&1&&(K.mtime=k.read_shift(4)),C>5&&(F&2&&(K.atime=k.read_shift(4)),F&4&&(K.ctime=k.read_shift(4))),K.mtime&&(K.mt=new Date(K.mtime*1e3));break}k.l=R,N[O]=K}return N}var c;function l(){return c||(c={})}function o(k,N){if(k[0]==80&&k[1]==75)return Kr(k,N);if((k[0]|32)==109&&(k[1]|32)==105)return it(k,N);if(k.length<512)throw new Error("CFB file size "+k.length+" < 512");var F=3,O=512,C=0,R=0,K=0,Y=0,V=0,j=[],J=k.slice(0,512);tt(J,0);var le=u(J);switch(F=le[0],F){case 3:O=512;break;case 4:O=4096;break;case 0:if(le[1]==0)return Kr(k,N);default:throw new Error("Major Version: Expected 3 or 4 saw "+F)}O!==512&&(J=k.slice(0,O),tt(J,28));var _e=k.slice(0,O);x(J,F);var Ee=J.read_shift(4,"i");if(F===3&&Ee!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ee);J.l+=4,K=J.read_shift(4,"i"),J.l+=4,J.chk("00100000","Mini Stream Cutoff Size: "),Y=J.read_shift(4,"i"),C=J.read_shift(4,"i"),V=J.read_shift(4,"i"),R=J.read_shift(4,"i");for(var ue=-1,ge=0;ge<109&&(ue=J.read_shift(4,"i"),!(ue<0));++ge)j[ge]=ue;var qe=h(k,O);m(V,R,qe,O,j);var Er=y(qe,K,j,O);Er[K].name="!Directory",C>0&&Y!==M&&(Er[Y].name="!MiniFAT"),Er[j[0]].name="!FAT",Er.fat_addrs=j,Er.ssz=O;var Mr={},$r=[],tn=[],nn=[];v(K,Er,qe,$r,C,Mr,tn,Y),d(tn,nn,$r),$r.shift();var sn={FileIndex:tn,FullPaths:nn};return N&&N.raw&&(sn.raw={header:_e,sectors:qe}),sn}function u(k){if(k[k.l]==80&&k[k.l+1]==75)return[0,0];k.chk(se,"Header Signature: "),k.l+=16;var N=k.read_shift(2,"u");return[k.read_shift(2,"u"),N]}function x(k,N){var F=9;switch(k.l+=2,F=k.read_shift(2)){case 9:if(N!=3)throw new Error("Sector Shift: Expected 9 saw "+F);break;case 12:if(N!=4)throw new Error("Sector Shift: Expected 12 saw "+F);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+F)}k.chk("0600","Mini Sector Shift: "),k.chk("000000000000","Reserved: ")}function h(k,N){for(var F=Math.ceil(k.length/N)-1,O=[],C=1;C<F;++C)O[C-1]=k.slice(C*N,(C+1)*N);return O[F-1]=k.slice(F*N),O}function d(k,N,F){for(var O=0,C=0,R=0,K=0,Y=0,V=F.length,j=[],J=[];O<V;++O)j[O]=J[O]=O,N[O]=F[O];for(;Y<J.length;++Y)O=J[Y],C=k[O].L,R=k[O].R,K=k[O].C,j[O]===O&&(C!==-1&&j[C]!==C&&(j[O]=j[C]),R!==-1&&j[R]!==R&&(j[O]=j[R])),K!==-1&&(j[K]=O),C!==-1&&O!=j[O]&&(j[C]=j[O],J.lastIndexOf(C)<Y&&J.push(C)),R!==-1&&O!=j[O]&&(j[R]=j[O],J.lastIndexOf(R)<Y&&J.push(R));for(O=1;O<V;++O)j[O]===O&&(R!==-1&&j[R]!==R?j[O]=j[R]:C!==-1&&j[C]!==C&&(j[O]=j[C]));for(O=1;O<V;++O)if(k[O].type!==0){if(Y=O,Y!=j[Y])do Y=j[Y],N[O]=N[Y]+"/"+N[O];while(Y!==0&&j[Y]!==-1&&Y!=j[Y]);j[O]=-1}for(N[0]+="/",O=1;O<V;++O)k[O].type!==2&&(N[O]+="/")}function p(k,N,F){for(var O=k.start,C=k.size,R=[],K=O;F&&C>0&&K>=0;)R.push(N.slice(K*W,K*W+W)),C-=W,K=p0(F,K*4);return R.length===0?ae(0):ja(R).slice(0,k.size)}function m(k,N,F,O,C){var R=M;if(k===M){if(N!==0)throw new Error("DIFAT chain shorter than expected")}else if(k!==-1){var K=F[k],Y=(O>>>2)-1;if(!K)return;for(var V=0;V<Y&&(R=p0(K,V*4))!==M;++V)C.push(R);m(p0(K,O-4),N-1,F,O,C)}}function g(k,N,F,O,C){var R=[],K=[];C||(C=[]);var Y=O-1,V=0,j=0;for(V=N;V>=0;){C[V]=!0,R[R.length]=V,K.push(k[V]);var J=F[Math.floor(V*4/O)];if(j=V*4&Y,O<4+j)throw new Error("FAT boundary crossed: "+V+" 4 "+O);if(!k[J])break;V=p0(k[J],j)}return{nodes:R,data:nl([K])}}function y(k,N,F,O){var C=k.length,R=[],K=[],Y=[],V=[],j=O-1,J=0,le=0,_e=0,Ee=0;for(J=0;J<C;++J)if(Y=[],_e=J+N,_e>=C&&(_e-=C),!K[_e]){V=[];var ue=[];for(le=_e;le>=0;){ue[le]=!0,K[le]=!0,Y[Y.length]=le,V.push(k[le]);var ge=F[Math.floor(le*4/O)];if(Ee=le*4&j,O<4+Ee)throw new Error("FAT boundary crossed: "+le+" 4 "+O);if(!k[ge]||(le=p0(k[ge],Ee),ue[le]))break}R[_e]={nodes:Y,data:nl([V])}}return R}function v(k,N,F,O,C,R,K,Y){for(var V=0,j=O.length?2:0,J=N[k].data,le=0,_e=0,Ee;le<J.length;le+=128){var ue=J.slice(le,le+128);tt(ue,64),_e=ue.read_shift(2),Ee=Vf(ue,0,_e-j),O.push(Ee);var ge={name:Ee,type:ue.read_shift(1),color:ue.read_shift(1),L:ue.read_shift(4,"i"),R:ue.read_shift(4,"i"),C:ue.read_shift(4,"i"),clsid:ue.read_shift(16),state:ue.read_shift(4,"i"),start:0,size:0},qe=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);qe!==0&&(ge.ct=E(ue,ue.l-8));var Er=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);Er!==0&&(ge.mt=E(ue,ue.l-8)),ge.start=ue.read_shift(4,"i"),ge.size=ue.read_shift(4,"i"),ge.size<0&&ge.start<0&&(ge.size=ge.type=0,ge.start=M,ge.name=""),ge.type===5?(V=ge.start,C>0&&V!==M&&(N[V].name="!StreamData")):ge.size>=4096?(ge.storage="fat",N[ge.start]===void 0&&(N[ge.start]=g(F,ge.start,N.fat_addrs,N.ssz)),N[ge.start].name=ge.name,ge.content=N[ge.start].data.slice(0,ge.size)):(ge.storage="minifat",ge.size<0?ge.size=0:V!==M&&ge.start!==M&&N[V]&&(ge.content=p(ge,N[V].data,(N[Y]||{}).data))),ge.content&&tt(ge.content,0),R[Ee]=ge,K.push(ge)}}function E(k,N){return new Date((Ut(k,N+4)/1e7*Math.pow(2,32)+Ut(k,N)/1e7-11644473600)*1e3)}function w(k,N){return l(),o(c.readFileSync(k),N)}function S(k,N){var F=N&&N.type;switch(F||yr&&Buffer.isBuffer(k)&&(F="buffer"),F||"base64"){case"file":return w(k,N);case"base64":return o(Wt(Xt(k)),N);case"binary":return o(Wt(k),N)}return o(k,N)}function T(k,N){var F=N||{},O=F.root||"Root Entry";if(k.FullPaths||(k.FullPaths=[]),k.FileIndex||(k.FileIndex=[]),k.FullPaths.length!==k.FileIndex.length)throw new Error("inconsistent CFB structure");k.FullPaths.length===0&&(k.FullPaths[0]=O+"/",k.FileIndex[0]={name:O,type:5}),F.CLSID&&(k.FileIndex[0].clsid=F.CLSID),B(k)}function B(k){var N="Sh33tJ5";if(!Ve.find(k,"/"+N)){var F=ae(4);F[0]=55,F[1]=F[3]=50,F[2]=54,k.FileIndex.push({name:N,type:2,content:F,size:4,L:69,R:69,C:69}),k.FullPaths.push(k.FullPaths[0]+N),I(k)}}function I(k,N){T(k);for(var F=!1,O=!1,C=k.FullPaths.length-1;C>=0;--C){var R=k.FileIndex[C];switch(R.type){case 0:O?F=!0:(k.FileIndex.pop(),k.FullPaths.pop());break;case 1:case 2:case 5:O=!0,isNaN(R.R*R.L*R.C)&&(F=!0),R.R>-1&&R.L>-1&&R.R==R.L&&(F=!0);break;default:F=!0;break}}if(!(!F&&!N)){var K=new Date(1987,1,19),Y=0,V=Object.create?Object.create(null):{},j=[];for(C=0;C<k.FullPaths.length;++C)V[k.FullPaths[C]]=!0,k.FileIndex[C].type!==0&&j.push([k.FullPaths[C],k.FileIndex[C]]);for(C=0;C<j.length;++C){var J=n(j[C][0]);O=V[J],O||(j.push([J,{name:t(J).replace("/",""),type:1,clsid:he,ct:K,mt:K,content:null}]),V[J]=!0)}for(j.sort(function(Ee,ue){return r(Ee[0],ue[0])}),k.FullPaths=[],k.FileIndex=[],C=0;C<j.length;++C)k.FullPaths[C]=j[C][0],k.FileIndex[C]=j[C][1];for(C=0;C<j.length;++C){var le=k.FileIndex[C],_e=k.FullPaths[C];if(le.name=t(_e).replace("/",""),le.L=le.R=le.C=-(le.color=1),le.size=le.content?le.content.length:0,le.start=0,le.clsid=le.clsid||he,C===0)le.C=j.length>1?1:-1,le.size=0,le.type=5;else if(_e.slice(-1)=="/"){for(Y=C+1;Y<j.length&&n(k.FullPaths[Y])!=_e;++Y);for(le.C=Y>=j.length?-1:Y,Y=C+1;Y<j.length&&n(k.FullPaths[Y])!=n(_e);++Y);le.R=Y>=j.length?-1:Y,le.type=1}else n(k.FullPaths[C+1]||"")==n(_e)&&(le.R=C+1),le.type=2}}}function U(k,N){var F=N||{};if(F.fileType=="mad")return bt(k,F);switch(I(k),F.fileType){case"zip":return Ta(k,F)}var O=function(Ee){for(var ue=0,ge=0,qe=0;qe<Ee.FileIndex.length;++qe){var Er=Ee.FileIndex[qe];if(Er.content){var Mr=Er.content.length;Mr>0&&(Mr<4096?ue+=Mr+63>>6:ge+=Mr+511>>9)}}for(var $r=Ee.FullPaths.length+3>>2,tn=ue+7>>3,nn=ue+127>>7,sn=tn+ge+$r+nn,Pt=sn+127>>7,Rn=Pt<=109?0:Math.ceil((Pt-109)/127);sn+Pt+Rn+127>>7>Pt;)Rn=++Pt<=109?0:Math.ceil((Pt-109)/127);var er=[1,Rn,Pt,nn,$r,ge,ue,0];return Ee.FileIndex[0].size=ue<<6,er[7]=(Ee.FileIndex[0].start=er[0]+er[1]+er[2]+er[3]+er[4]+er[5])+(er[6]+7>>3),er}(k),C=ae(O[7]<<9),R=0,K=0;{for(R=0;R<8;++R)C.write_shift(1,ne[R]);for(R=0;R<8;++R)C.write_shift(2,0);for(C.write_shift(2,62),C.write_shift(2,3),C.write_shift(2,65534),C.write_shift(2,9),C.write_shift(2,6),R=0;R<3;++R)C.write_shift(2,0);for(C.write_shift(4,0),C.write_shift(4,O[2]),C.write_shift(4,O[0]+O[1]+O[2]+O[3]-1),C.write_shift(4,0),C.write_shift(4,4096),C.write_shift(4,O[3]?O[0]+O[1]+O[2]-1:M),C.write_shift(4,O[3]),C.write_shift(-4,O[1]?O[0]-1:M),C.write_shift(4,O[1]),R=0;R<109;++R)C.write_shift(-4,R<O[2]?O[1]+R:-1)}if(O[1])for(K=0;K<O[1];++K){for(;R<236+K*127;++R)C.write_shift(-4,R<O[2]?O[1]+R:-1);C.write_shift(-4,K===O[1]-1?M:K+1)}var Y=function(Ee){for(K+=Ee;R<K-1;++R)C.write_shift(-4,R+1);Ee&&(++R,C.write_shift(-4,M))};for(K=R=0,K+=O[1];R<K;++R)C.write_shift(-4,ce.DIFSECT);for(K+=O[2];R<K;++R)C.write_shift(-4,ce.FATSECT);Y(O[3]),Y(O[4]);for(var V=0,j=0,J=k.FileIndex[0];V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(j<4096)&&(J.start=K,Y(j+511>>9)));for(Y(O[6]+7>>3);C.l&511;)C.write_shift(-4,ce.ENDOFCHAIN);for(K=R=0,V=0;V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(!j||j>=4096)&&(J.start=K,Y(j+63>>6)));for(;C.l&511;)C.write_shift(-4,ce.ENDOFCHAIN);for(R=0;R<O[4]<<2;++R){var le=k.FullPaths[R];if(!le||le.length===0){for(V=0;V<17;++V)C.write_shift(4,0);for(V=0;V<3;++V)C.write_shift(4,-1);for(V=0;V<12;++V)C.write_shift(4,0);continue}J=k.FileIndex[R],R===0&&(J.start=J.size?J.start-1:M);var _e=R===0&&F.root||J.name;if(j=2*(_e.length+1),C.write_shift(64,_e,"utf16le"),C.write_shift(2,j),C.write_shift(1,J.type),C.write_shift(1,J.color),C.write_shift(-4,J.L),C.write_shift(-4,J.R),C.write_shift(-4,J.C),J.clsid)C.write_shift(16,J.clsid,"hex");else for(V=0;V<4;++V)C.write_shift(4,0);C.write_shift(4,J.state||0),C.write_shift(4,0),C.write_shift(4,0),C.write_shift(4,0),C.write_shift(4,0),C.write_shift(4,J.start),C.write_shift(4,J.size),C.write_shift(4,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>=4096)if(C.l=J.start+1<<9,yr&&Buffer.isBuffer(J.content))J.content.copy(C,C.l,0,J.size),C.l+=J.size+511&-512;else{for(V=0;V<J.size;++V)C.write_shift(1,J.content[V]);for(;V&511;++V)C.write_shift(1,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>0&&J.size<4096)if(yr&&Buffer.isBuffer(J.content))J.content.copy(C,C.l,0,J.size),C.l+=J.size+63&-64;else{for(V=0;V<J.size;++V)C.write_shift(1,J.content[V]);for(;V&63;++V)C.write_shift(1,0)}if(yr)C.l=C.length;else for(;C.l<C.length;)C.write_shift(1,0);return C}function L(k,N){var F=k.FullPaths.map(function(V){return V.toUpperCase()}),O=F.map(function(V){var j=V.split("/");return j[j.length-(V.slice(-1)=="/"?2:1)]}),C=!1;N.charCodeAt(0)===47?(C=!0,N=F[0].slice(0,-1)+N):C=N.indexOf("/")!==-1;var R=N.toUpperCase(),K=C===!0?F.indexOf(R):O.indexOf(R);if(K!==-1)return k.FileIndex[K];var Y=!R.match(Fi);for(R=R.replace(kt,""),Y&&(R=R.replace(Fi,"!")),K=0;K<F.length;++K)if((Y?F[K].replace(Fi,"!"):F[K]).replace(kt,"")==R||(Y?O[K].replace(Fi,"!"):O[K]).replace(kt,"")==R)return k.FileIndex[K];return null}var W=64,M=-2,se="d0cf11e0a1b11ae1",ne=[208,207,17,224,161,177,26,225],he="00000000000000000000000000000000",ce={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:M,FREESECT:-1,HEADER_SIGNATURE:se,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:he,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function be(k,N,F){l();var O=U(k,F);c.writeFileSync(N,O)}function z(k){for(var N=new Array(k.length),F=0;F<k.length;++F)N[F]=String.fromCharCode(k[F]);return N.join("")}function Te(k,N){var F=U(k,N);switch(N&&N.type||"buffer"){case"file":return l(),c.writeFileSync(N.filename,F),F;case"binary":return typeof F=="string"?F:z(F);case"base64":return Bi(typeof F=="string"?F:z(F));case"buffer":if(yr)return Buffer.isBuffer(F)?F:$n(F);case"array":return typeof F=="string"?Wt(F):F}return F}var Ae;function _(k){try{var N=k.InflateRaw,F=new N;if(F._processChunk(new Uint8Array([3,0]),F._finishFlushFlag),F.bytesRead)Ae=k;else throw new Error("zlib does not expose bytesRead")}catch(O){console.error("cannot use native zlib: "+(O.message||O))}}function A(k,N){if(!Ae)return ra(k,N);var F=Ae.InflateRaw,O=new F,C=O._processChunk(k.slice(k.l),O._finishFlushFlag);return k.l+=O.bytesRead,C}function D(k){return Ae?Ae.deflateRawSync(k):Qe(k)}var b=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],re=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ee(k){var N=(k<<1|k<<11)&139536|(k<<5|k<<15)&558144;return(N>>16|N>>8|N)&255}for(var Q=typeof Uint8Array<"u",q=Q?new Uint8Array(256):[],we=0;we<256;++we)q[we]=ee(we);function P(k,N){var F=q[k&255];return N<=8?F>>>8-N:(F=F<<8|q[k>>8&255],N<=16?F>>>16-N:(F=F<<8|q[k>>16&255],F>>>24-N))}function Pe(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=6?0:k[O+1]<<8))>>>F&3}function Ie(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=5?0:k[O+1]<<8))>>>F&7}function je(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=4?0:k[O+1]<<8))>>>F&15}function Le(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=3?0:k[O+1]<<8))>>>F&31}function ie(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=1?0:k[O+1]<<8))>>>F&127}function ur(k,N,F){var O=N&7,C=N>>>3,R=(1<<F)-1,K=k[C]>>>O;return F<8-O||(K|=k[C+1]<<8-O,F<16-O)||(K|=k[C+2]<<16-O,F<24-O)||(K|=k[C+3]<<24-O),K&R}function ir(k,N,F){var O=N&7,C=N>>>3;return O<=5?k[C]|=(F&7)<<O:(k[C]|=F<<O&255,k[C+1]=(F&7)>>8-O),N+3}function ya(k,N,F){var O=N&7,C=N>>>3;return F=(F&1)<<O,k[C]|=F,N+1}function Fa(k,N,F){var O=N&7,C=N>>>3;return F<<=O,k[C]|=F&255,F>>>=8,k[C+1]=F,N+8}function Et(k,N,F){var O=N&7,C=N>>>3;return F<<=O,k[C]|=F&255,F>>>=8,k[C+1]=F&255,k[C+2]=F>>>8,N+16}function Ja(k,N){var F=k.length,O=2*F>N?2*F:N+5,C=0;if(F>=N)return k;if(yr){var R=Uc(O);if(k.copy)k.copy(R);else for(;C<k.length;++C)R[C]=k[C];return R}else if(Q){var K=new Uint8Array(O);if(K.set)K.set(k);else for(;C<F;++C)K[C]=k[C];return K}return k.length=O,k}function ka(k){for(var N=new Array(k),F=0;F<k;++F)N[F]=0;return N}function $a(k,N,F){var O=1,C=0,R=0,K=0,Y=0,V=k.length,j=Q?new Uint16Array(32):ka(32);for(R=0;R<32;++R)j[R]=0;for(R=V;R<F;++R)k[R]=0;V=k.length;var J=Q?new Uint16Array(V):ka(V);for(R=0;R<V;++R)j[C=k[R]]++,O<C&&(O=C),J[R]=0;for(j[0]=0,R=1;R<=O;++R)j[R+16]=Y=Y+j[R-1]<<1;for(R=0;R<V;++R)Y=k[R],Y!=0&&(J[R]=j[Y+16]++);var le=0;for(R=0;R<V;++R)if(le=k[R],le!=0)for(Y=P(J[R],O)>>O-le,K=(1<<O+4-le)-1;K>=0;--K)N[Y|K<<le]=le&15|R<<4;return O}var Se=Q?new Uint16Array(512):ka(512),Ne=Q?new Uint16Array(32):ka(32);if(!Q){for(var Be=0;Be<512;++Be)Se[Be]=0;for(Be=0;Be<32;++Be)Ne[Be]=0}(function(){for(var k=[],N=0;N<32;N++)k.push(5);$a(k,Ne,32);var F=[];for(N=0;N<=143;N++)F.push(8);for(;N<=255;N++)F.push(9);for(;N<=279;N++)F.push(7);for(;N<=287;N++)F.push(8);$a(F,Se,288)})();var Ea=function(){for(var N=Q?new Uint8Array(32768):[],F=0,O=0;F<re.length-1;++F)for(;O<re[F+1];++O)N[O]=F;for(;O<32768;++O)N[O]=29;var C=Q?new Uint8Array(259):[];for(F=0,O=0;F<X.length-1;++F)for(;O<X[F+1];++O)C[O]=F;function R(Y,V){for(var j=0;j<Y.length;){var J=Math.min(65535,Y.length-j),le=j+J==Y.length;for(V.write_shift(1,+le),V.write_shift(2,J),V.write_shift(2,~J&65535);J-- >0;)V[V.l++]=Y[j++]}return V.l}function K(Y,V){for(var j=0,J=0,le=Q?new Uint16Array(32768):[];J<Y.length;){var _e=Math.min(65535,Y.length-J);if(_e<10){for(j=ir(V,j,+(J+_e==Y.length)),j&7&&(j+=8-(j&7)),V.l=j/8|0,V.write_shift(2,_e),V.write_shift(2,~_e&65535);_e-- >0;)V[V.l++]=Y[J++];j=V.l*8;continue}j=ir(V,j,+(J+_e==Y.length)+2);for(var Ee=0;_e-- >0;){var ue=Y[J];Ee=(Ee<<5^ue)&32767;var ge=-1,qe=0;if((ge=le[Ee])&&(ge|=J&-32768,ge>J&&(ge-=32768),ge<J))for(;Y[ge+qe]==Y[J+qe]&&qe<250;)++qe;if(qe>2){ue=C[qe],ue<=22?j=Fa(V,j,q[ue+1]>>1)-1:(Fa(V,j,3),j+=5,Fa(V,j,q[ue-23]>>5),j+=3);var Er=ue<8?0:ue-4>>2;Er>0&&(Et(V,j,qe-X[ue]),j+=Er),ue=N[J-ge],j=Fa(V,j,q[ue]>>3),j-=3;var Mr=ue<4?0:ue-2>>1;Mr>0&&(Et(V,j,J-ge-re[ue]),j+=Mr);for(var $r=0;$r<qe;++$r)le[Ee]=J&32767,Ee=(Ee<<5^Y[J])&32767,++J;_e-=qe-1}else ue<=143?ue=ue+48:j=ya(V,j,1),j=Fa(V,j,q[ue]),le[Ee]=J&32767,++J}j=Fa(V,j,0)-1}return V.l=(j+7)/8|0,V.l}return function(V,j){return V.length<8?R(V,j):K(V,j)}}();function Qe(k){var N=ae(50+Math.floor(k.length*1.1)),F=Ea(k,N);return N.slice(0,F)}var br=Q?new Uint16Array(32768):ka(32768),me=Q?new Uint16Array(32768):ka(32768),Fr=Q?new Uint16Array(128):ka(128),Cr=1,hr=1;function kr(k,N){var F=Le(k,N)+257;N+=5;var O=Le(k,N)+1;N+=5;var C=je(k,N)+4;N+=4;for(var R=0,K=Q?new Uint8Array(19):ka(19),Y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],V=1,j=Q?new Uint8Array(8):ka(8),J=Q?new Uint8Array(8):ka(8),le=K.length,_e=0;_e<C;++_e)K[b[_e]]=R=Ie(k,N),V<R&&(V=R),j[R]++,N+=3;var Ee=0;for(j[0]=0,_e=1;_e<=V;++_e)J[_e]=Ee=Ee+j[_e-1]<<1;for(_e=0;_e<le;++_e)(Ee=K[_e])!=0&&(Y[_e]=J[Ee]++);var ue=0;for(_e=0;_e<le;++_e)if(ue=K[_e],ue!=0){Ee=q[Y[_e]]>>8-ue;for(var ge=(1<<7-ue)-1;ge>=0;--ge)Fr[Ee|ge<<ue]=ue&7|_e<<3}var qe=[];for(V=1;qe.length<F+O;)switch(Ee=Fr[ie(k,N)],N+=Ee&7,Ee>>>=3){case 16:for(R=3+Pe(k,N),N+=2,Ee=qe[qe.length-1];R-- >0;)qe.push(Ee);break;case 17:for(R=3+Ie(k,N),N+=3;R-- >0;)qe.push(0);break;case 18:for(R=11+ie(k,N),N+=7;R-- >0;)qe.push(0);break;default:qe.push(Ee),V<Ee&&(V=Ee);break}var Er=qe.slice(0,F),Mr=qe.slice(F);for(_e=F;_e<286;++_e)Er[_e]=0;for(_e=O;_e<30;++_e)Mr[_e]=0;return Cr=$a(Er,br,286),hr=$a(Mr,me,30),N}function ha(k,N){if(k[0]==3&&!(k[1]&3))return[t0(N),2];for(var F=0,O=0,C=Uc(N||1<<18),R=0,K=C.length>>>0,Y=0,V=0;(O&1)==0;){if(O=Ie(k,F),F+=3,O>>>1)O>>1==1?(Y=9,V=5):(F=kr(k,F),Y=Cr,V=hr);else{F&7&&(F+=8-(F&7));var j=k[F>>>3]|k[(F>>>3)+1]<<8;if(F+=32,j>0)for(!N&&K<R+j&&(C=Ja(C,R+j),K=C.length);j-- >0;)C[R++]=k[F>>>3],F+=8;continue}for(;;){!N&&K<R+32767&&(C=Ja(C,R+32767),K=C.length);var J=ur(k,F,Y),le=O>>>1==1?Se[J]:br[J];if(F+=le&15,le>>>=4,(le>>>8&255)===0)C[R++]=le;else{if(le==256)break;le-=257;var _e=le<8?0:le-4>>2;_e>5&&(_e=0);var Ee=R+X[le];_e>0&&(Ee+=ur(k,F,_e),F+=_e),J=ur(k,F,V),le=O>>>1==1?Ne[J]:me[J],F+=le&15,le>>>=4;var ue=le<4?0:le-2>>1,ge=re[le];for(ue>0&&(ge+=ur(k,F,ue),F+=ue),!N&&K<Ee&&(C=Ja(C,Ee+100),K=C.length);R<Ee;)C[R]=C[R-ge],++R}}}return N?[C,F+7>>>3]:[C.slice(0,R),F+7>>>3]}function ra(k,N){var F=k.slice(k.l||0),O=ha(F,N);return k.l+=O[1],O[0]}function We(k,N){if(k)typeof console<"u"&&console.error(N);else throw new Error(N)}function Kr(k,N){var F=k;tt(F,0);var O=[],C=[],R={FileIndex:O,FullPaths:C};T(R,{root:N.root});for(var K=F.length-4;(F[K]!=80||F[K+1]!=75||F[K+2]!=5||F[K+3]!=6)&&K>=0;)--K;F.l=K+4,F.l+=4;var Y=F.read_shift(2);F.l+=6;var V=F.read_shift(4);for(F.l=V,K=0;K<Y;++K){F.l+=20;var j=F.read_shift(4),J=F.read_shift(4),le=F.read_shift(2),_e=F.read_shift(2),Ee=F.read_shift(2);F.l+=8;var ue=F.read_shift(4),ge=f(F.slice(F.l+le,F.l+le+_e));F.l+=le+_e+Ee;var qe=F.l;F.l=ue+4,ta(F,j,J,R,ge),F.l=qe}return R}function ta(k,N,F,O,C){k.l+=2;var R=k.read_shift(2),K=k.read_shift(2),Y=s(k);if(R&8257)throw new Error("Unsupported ZIP encryption");for(var V=k.read_shift(4),j=k.read_shift(4),J=k.read_shift(4),le=k.read_shift(2),_e=k.read_shift(2),Ee="",ue=0;ue<le;++ue)Ee+=String.fromCharCode(k[k.l++]);if(_e){var ge=f(k.slice(k.l,k.l+_e));(ge[21589]||{}).mt&&(Y=ge[21589].mt),((C||{})[21589]||{}).mt&&(Y=C[21589].mt)}k.l+=_e;var qe=k.slice(k.l,k.l+j);switch(K){case 8:qe=A(k,J);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+K)}var Er=!1;R&8&&(V=k.read_shift(4),V==134695760&&(V=k.read_shift(4),Er=!0),j=k.read_shift(4),J=k.read_shift(4)),j!=N&&We(Er,"Bad compressed size: "+N+" != "+j),J!=F&&We(Er,"Bad uncompressed size: "+F+" != "+J),vt(O,Ee,qe,{unsafe:!0,mt:Y})}function Ta(k,N){var F=N||{},O=[],C=[],R=ae(1),K=F.compression?8:0,Y=0,V=0,j=0,J=0,le=0,_e=k.FullPaths[0],Ee=_e,ue=k.FileIndex[0],ge=[],qe=0;for(V=1;V<k.FullPaths.length;++V)if(Ee=k.FullPaths[V].slice(_e.length),ue=k.FileIndex[V],!(!ue.size||!ue.content||Ee=="Sh33tJ5")){var Er=J,Mr=ae(Ee.length);for(j=0;j<Ee.length;++j)Mr.write_shift(1,Ee.charCodeAt(j)&127);Mr=Mr.slice(0,Mr.l),ge[le]=Fx.buf(ue.content,0);var $r=ue.content;K==8&&($r=D($r)),R=ae(30),R.write_shift(4,67324752),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),ue.mt?i(R,ue.mt):R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),J+=R.length,O.push(R),J+=Mr.length,O.push(Mr),J+=$r.length,O.push($r),R=ae(46),R.write_shift(4,33639248),R.write_shift(2,0),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(4,0),R.write_shift(4,Er),qe+=R.l,C.push(R),qe+=Mr.length,C.push(Mr),++le}return R=ae(22),R.write_shift(4,101010256),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,le),R.write_shift(2,le),R.write_shift(4,qe),R.write_shift(4,J),R.write_shift(2,0),ja([ja(O),ja(C),R])}var ua={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function fr(k,N){if(k.ctype)return k.ctype;var F=k.name||"",O=F.match(/\.([^\.]+)$/);return O&&ua[O[1]]||N&&(O=(F=N).match(/[\.\\]([^\.\\])+$/),O&&ua[O[1]])?ua[O[1]]:"application/octet-stream"}function wr(k){for(var N=Bi(k),F=[],O=0;O<N.length;O+=76)F.push(N.slice(O,O+76));return F.join(`\r
|
|
1
|
+
"use strict";const sa=require("./index-CW4qJdP8.cjs"),G=require("./menu-N76i05Ex.cjs"),fs=require("./request-BC2w2vGr.cjs"),zl=require("vue");require("./index-Clae5SKB.cjs");const yh=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],kh=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],Eh=e=>{var i;let a=e;const r=[];let n="",t=0;for(const s of a)t++,s.includes("(")||n.includes("(")||s.includes(")")||n.includes(")")||s.includes("&")||n.includes("&")||s.includes("|")||n.includes("|")?(n+=s.trim(),(((i=G.cloneDeep(n))==null?void 0:i[(n==null?void 0:n.length)-1])===")"||(a==null?void 0:a[t])==="|"||(a==null?void 0:a[t])==="&")&&!(n!=null&&n.includes("&"))&&!(n!=null&&n.includes("|"))?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):n==="&&"||n==="||"?(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n=""):t===(e==null?void 0:e.length)&&(r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):n+=s.trim();return(n==null?void 0:n.length)!==0&&r.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),r},Vl=(e,a,r,n,t,i)=>{let s=e;return s=s==null?void 0:s.map(f=>{var c,l,o,u,x;if(r!=null&&r.find(h=>{var d,p,m,g,y;return(h===(f==null?void 0:f.prop)||((d=f==null?void 0:f.prop)==null?void 0:d.includes("."+h)))&&((y=(p=f==null?void 0:f.prop)==null?void 0:p.split("."))==null?void 0:y[((g=(m=f==null?void 0:f.prop)==null?void 0:m.split("."))==null?void 0:g.length)-1])===(f==null?void 0:f.label)})&&(f.label=(c=a==null?void 0:a[r==null?void 0:r.findIndex(h=>{var d;return h===(f==null?void 0:f.prop)||((d=f==null?void 0:f.prop)==null?void 0:d.includes("."+h))})])==null?void 0:c.replaceAll('"',""),n!=null&&n.methodContent)){let h=(o=(l=n==null?void 0:n.methodContent)==null?void 0:l.replaceAll('"',""))==null?void 0:o.replaceAll("'","");h!=null&&h.includes("@")?(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1),h!=null&&h.includes("@Type")||(h=h+",@Type=Auto"),h!=null&&h.includes("@Button")||(h=h+",@Button=Prop"),h!=null&&h.includes("@Extent")||(h=h+",@Extent=Row"),h=h+")"):h=h+"(@Type=Auto,@Button=Prop,@Extent=Row)",f.methodContent=h,f.prop=(f==null?void 0:f.prop)+(n==null?void 0:n.columnPathIndex),(u=i==null?void 0:i.find(d=>d==null?void 0:d.includes("@SonSync")))!=null&&u.includes("Yes")&&(f.methodId=t)}return f!=null&&f.children&&((x=f==null?void 0:f.children)==null?void 0:x.length)>0&&(f.children=Vl(f.children,a,r,n,t,i)),f}),s},jl=e=>{var i;let a=e==null?void 0:e.replaceAll("=","#"),r=(i=Eh(a))==null?void 0:i.map(s=>(s!=null&&s.includes("(")&&(s="("+(s==null?void 0:s.replaceAll("(",""))),s)),n=[],t={};return r==null||r.forEach((s,f)=>{var c,l,o,u,x;if(!(s!=null&&s.includes("&&"))&&!(s!=null&&s.includes("||"))){let h=s;(s==null?void 0:s[(s==null?void 0:s.length)-1])===")"&&(h=s.slice(0,(s==null?void 0:s.length)-1)),(h==null?void 0:h[0])==="("&&(h=h.slice(1,h==null?void 0:h.length)),h!=null&&h.includes("[")&&(h!=null&&h.includes("]")||(h=(u=(c=h==null?void 0:h.slice(1,h==null?void 0:h.length))==null?void 0:c.split(":"))==null?void 0:u[((o=(l=h==null?void 0:h.slice(1,h==null?void 0:h.length))==null?void 0:l.split(":"))==null?void 0:o.length)-1])),h=h==null?void 0:h.split("#");let d=h[0].replaceAll("'","").replaceAll("]","");d!=null&&d.includes(":")&&(d=d==null?void 0:d.replaceAll(":","."));let p=(x=h[1])==null?void 0:x.replaceAll("'","");(d==null?void 0:d[(d==null?void 0:d.length)-1])!=="!"?t[d]=p:t[d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)]="!"+p}else s==="&&"||s==="||"&&(n.push(t),t={});f===r.length-1&&(n.push(t),t={})}),n},Th=(e,a)=>{const r=new Map;let n=[];a.forEach(i=>{for(const[s,f]of Object.entries(i))try{r.set(s.replaceAll("'",""),JSON.parse(f))}catch{r.set(s,[])}});const t=i=>i.map(s=>{var l,o;const f={label:s==null?void 0:s.replaceAll("'","")},c=r.get(s==null?void 0:s.replaceAll("'",""));if(c!=null&&c.length){const u=c.map(x=>e.find(h=>(h==null?void 0:h.replaceAll("'",""))===x)).filter(Boolean);f.children=(f.children||[]).concat(u),f.children=(l=f.children)==null?void 0:l.map(x=>(f==null?void 0:f.label)+"."+(x==null?void 0:x.replaceAll("'",""))),n=[...n,...f.children]}return(o=f.children)!=null&&o.length&&(f.children=t(f.children)),f});return t(e),n},wh=(e,a)=>{const r=(n,t)=>{let i;return i=t==null?void 0:t.map(s=>{var f,c,l,o,u,x,h;if(n!=null&&n.find(d=>{var p;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||((p=s==null?void 0:s.prop)==null?void 0:p.includes("."+(d==null?void 0:d.prop)))})){let d=n==null?void 0:n.find(p=>{var m;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(p==null?void 0:p.prop)))});d!=null&&d.relatedValueId&&(s.relatedValueId=d==null?void 0:d.relatedValueId),d!=null&&d.menuId&&(s.menuId=d==null?void 0:d.menuId,s.directiveLabel="#isMain")}else if(Array.isArray(n==null?void 0:n[0])&&((f=n==null?void 0:n[0])!=null&&f.find(d=>{var p;return(d==null?void 0:d.label)===(s==null?void 0:s.prop)||(d==null?void 0:d.prop)===(s==null?void 0:s.prop)||((p=s==null?void 0:s.prop)==null?void 0:p.includes("."+(d==null?void 0:d.prop)))}))){let d=(c=n==null?void 0:n[0])==null?void 0:c.find(p=>{var m;return(p==null?void 0:p.label)===(s==null?void 0:s.prop)||(p==null?void 0:p.prop)===(s==null?void 0:s.prop)||((m=s==null?void 0:s.prop)==null?void 0:m.includes("."+(p==null?void 0:p.prop)))});d!=null&&d.relatedValueId&&(s.relatedValueId=d==null?void 0:d.relatedValueId),d!=null&&d.menuId&&(s.menuId=d==null?void 0:d.menuId,s.directiveLabel="#isMain"),s.label=(x=(l=s.label)==null?void 0:l.split("."))==null?void 0:x[((u=(o=s.label)==null?void 0:o.split("."))==null?void 0:u.length)-1]}return s!=null&&s.children&&((h=s==null?void 0:s.children)==null?void 0:h.length)>0&&(s.children=r(n,s.children)),s}),i};return r(e,a)},Bs=G.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Sh=Bs(G.pinia),{multipleTableConst:ft}=G.storeToRefs(Sh),Es=e=>{let a=[];function r(t,i=""){Array.isArray(t)&&(t==null||t.forEach(s=>{Array.isArray(s)||(s=[s]),s==null||s.forEach(f=>{var c,l,o,u,x,h,d,p,m,g,y,v;if(!(f!=null&&f.children)||f.children.length===0)f.prop=i===""?f==null?void 0:f.prop:i+ft.value+((u=(c=f==null?void 0:f.prop)==null?void 0:c.split(ft.value))==null?void 0:u[((o=(l=f==null?void 0:f.prop)==null?void 0:l.split(ft.value))==null?void 0:o.length)-1]),a.push(f.prop);else{let E=i===""?i+((p=(x=f==null?void 0:f.prop)==null?void 0:x.split(ft.value))==null?void 0:p[((d=(h=f==null?void 0:f.prop)==null?void 0:h.split(ft.value))==null?void 0:d.length)-1]):i+ft.value+((v=(m=f==null?void 0:f.prop)==null?void 0:m.split(ft.value))==null?void 0:v[((y=(g=f==null?void 0:f.prop)==null?void 0:g.split(ft.value))==null?void 0:y.length)-1]);n(f.children,E)}})}))}function n(t,i=""){t==null||t.forEach(s=>{var f,c,l,o,u,x,h,d,p,m,g,y;if(!(s!=null&&s.children)||s.children.length===0)s.prop=i===""?s==null?void 0:s.prop:i+ft.value+((o=(f=s==null?void 0:s.prop)==null?void 0:f.split(ft.value))==null?void 0:o[((l=(c=s==null?void 0:s.prop)==null?void 0:c.split(ft.value))==null?void 0:l.length)-1]),a.push(s.prop);else{let v=i===""?i+((d=(u=s==null?void 0:s.prop)==null?void 0:u.split(ft.value))==null?void 0:d[((h=(x=s==null?void 0:s.prop)==null?void 0:x.split(ft.value))==null?void 0:h.length)-1]):i+ft.value+((y=(p=s==null?void 0:s.prop)==null?void 0:p.split(ft.value))==null?void 0:y[((g=(m=s==null?void 0:s.prop)==null?void 0:m.split(ft.value))==null?void 0:g.length)-1]);n(s.children,v)}})}return r(e),a},Ah=(e,a,r)=>{var t;let n=(t=G.cloneDeep(e))==null?void 0:t.map(i=>(i=i.filter(s=>!(s!=null&&s.id)),i));return n=n==null?void 0:n.map(i=>{var s;return i=(s=i.map((f,c)=>{let l={};if(r!=null&&r.find(o=>o===a[c]))return l[a[c]]=f,l}))==null?void 0:s.filter(f=>f),i}),n},Fh=(e,a)=>{var s,f;const r=G.cloneDeep(e),n=(s=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:s.contents,t=(f=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="tableContents"))==null?void 0:f.contents;return Ah(t,Es(n).slice(0,Es(n).length-1),a)},Dh=e=>{let a={};return e==null||e.forEach(r=>{a[r.key]=r.value}),a},df=(e,a)=>{const r=a;return e==null?void 0:e.map(n=>{var i;let t=n;if(!Array.isArray(t)){let s=[];for(let f in t)s.push({key:f,value:t==null?void 0:t[f]});return s}return n=(i=t==null?void 0:t.map((s,f)=>{var c,l;return s!=null&&s.id?{key:"id",value:s==null?void 0:s.id}:r!=null&&r.find(o=>o==null?void 0:o.id)||t!=null&&t.find(o=>o==null?void 0:o.id)?{key:(c=r[f-1])==null?void 0:c.label,value:s}:{key:(l=r[f])==null?void 0:l.label,value:s}}))==null?void 0:i.filter(s=>s.key!=="操作"),n})},Ih=async e=>{var r,n,t,i;let a="";if((n=(r=G.cloneDeep(e))==null?void 0:r.split("/"))==null||n.forEach((s,f)=>{var c,l;f!==((l=(c=G.cloneDeep(e))==null?void 0:c.split("/"))==null?void 0:l.length)-1&&(a=a===""?a+s:a+"/"+s)}),a!==""){let s="";const f=await En(a,sessionStorage.getItem("systemKey"),"");(i=(t=f==null?void 0:f[0])==null?void 0:t.compData)==null||i.forEach(c=>{var l;(c==null?void 0:c.key)==="tableContents"&&((l=c==null?void 0:c.contents)==null||l.forEach((o,u)=>{if(u===0){let x=o==null?void 0:o.filter(h=>!(h!=null&&h.id));s=a+"/"+(x==null?void 0:x[0])}}))}),await Rf(s,e)}},Gt=e=>{try{return JSON.parse(e),!0}catch{return!1}},bh=G.useLoginState(G.pinia),{loginUserInfo:cs}=G.storeToRefs(bh),Oh=G.useUnit(G.pinia),{chooseTitle:Fc}=G.storeToRefs(Oh),Ch=G.useMenuState(),{activeMenuPath:zt}=G.storeToRefs(Ch),K0=[{key:"@MaxRowNum",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1}],Rh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Nh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Ph=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Yl=(e,a,r)=>{let n;return n=e==null?void 0:e.map(t=>{var i;return a!=null&&a.find(s=>{var f;return((f=t==null?void 0:t.prop)==null?void 0:f.includes("."+s))||(t==null?void 0:t.prop)===s})&&(t.menuId=r),t.relatedValueId=!0,t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&(t.children=Yl(t.children,a,r)),t}),n},Mh=(e,a,r)=>{var i,s,f,c,l;let n;Gt(e)?n=JSON.parse(e):n=JSON.parse((c=(f=(s=(i=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:i.replaceAll("““","“"))==null?void 0:s.replaceAll("“",'"'))==null?void 0:f.replaceAll(':",',':"",'))==null?void 0:c.replaceAll(':"}',':""}'));let t;return(a==null?void 0:a[0])==="["?t=(l=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:l.split(","):t=a==null?void 0:a.split(","),n=n==null?void 0:n.map(o=>(o=o==null?void 0:o.map(u=>{var x;return(u==null?void 0:u.key)==="header"&&(u.contents=(x=u.contents)==null?void 0:x.map((h,d)=>{var p,m,g,y,v,E;if(Array.isArray(h)){let w=(g=(m=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:m[((p=o==null?void 0:o.filter(S=>(S==null?void 0:S.key)==="contentTableId"))==null?void 0:p.length)-1])==null?void 0:g.contents;h=Yl(h,t,w)}else t!=null&&t.find(w=>w===(h==null?void 0:h.prop))&&(h.menuId=(E=(v=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:v[((y=o==null?void 0:o.filter(w=>(w==null?void 0:w.key)==="contentTableId"))==null?void 0:y.length)-1])==null?void 0:E.contents,h.directiveLabel="#isMain"),h.relatedValueId=!0;return h})),u}),o)),n},pf=e=>{let a=e;if(a!=null&&a.every(r=>Array.isArray(r))){let r=[];const n=t=>{t==null||t.forEach(i=>{var s;i!=null&&i.children&&((s=i==null?void 0:i.children)==null?void 0:s.length)>0?n(i==null?void 0:i.children):r.push(i)})};return n(a==null?void 0:a[0]),r}else return a},Lh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Bh=(e,a,r)=>{var t,i,s,f;let n;return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),n},Uh=(e,a,r)=>{let n;Gt(e)?n=JSON.parse(e):n=e;let t=a;if((a==null?void 0:a[0])!=="("&&(t="("+a+")"),t.slice(1,(t==null?void 0:t.length)-1)==="undefined")return n;let i=jl(t);if((i==null?void 0:i.length)>0){let s=[];i==null||i.forEach(f=>{var l,o,u,x,h,d;let c={};for(let p in f){let m=G.cloneDeep(p);if(!(m!=null&&m.includes("[")))if(((l=f[p])==null?void 0:l.toUpperCase())==="@LOGINUSER")c[m]=(o=cs.value)!=null&&o.account?(u=cs.value)==null?void 0:u.account:((x=cs.value)==null?void 0:x.姓名)??((h=cs.value)==null?void 0:h.账号);else if(!((d=f[p])!=null&&d.includes("[")))c[m]=f[p];else{let g="";n==null||n.forEach(y=>{var E,w;let v=(E=y==null?void 0:y.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:E.contents;v=(w=pf(v))==null?void 0:w.filter(S=>(S==null?void 0:S.label)!=="操作"),y=y==null?void 0:y.map(S=>{if((S==null?void 0:S.key)==="tableContents"){let B=df(S==null?void 0:S.contents,v),I=B==null?void 0:B.map(U=>{var L;return(L=U==null?void 0:U.find(W=>(W==null?void 0:W.key)===p))==null?void 0:L.value});I=[...new Set(I)],g=I}})}),c[m]=g}}s.push(c)}),n=n==null?void 0:n.map(f=>{var l,o;let c=(l=f==null?void 0:f.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:l.contents;return c=(o=pf(c))==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作"),f=f==null?void 0:f.map(u=>{if((u==null?void 0:u.key)==="tableContents"){let h=df(u==null?void 0:u.contents,c);s==null||s.forEach(d=>{var p,m;for(let g in d)!((p=h==null?void 0:h[0])!=null&&p.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))&&!(h!=null&&h.find(y=>{var v;return(y==null?void 0:y.key)===g||((v=y==null?void 0:y.key)==null?void 0:v.includes(g))}))||(((m=d[g])==null?void 0:m[0])!=="!"?h=h==null?void 0:h.filter(y=>{var v,E;return((v=y==null?void 0:y.find(w=>{var S;return(w==null?void 0:w.key)===g||((S=w==null?void 0:w.key)==null?void 0:S.includes(g))}))==null?void 0:v.value)===d[g]&&!Array.isArray(d==null?void 0:d[g])||Array.isArray(d==null?void 0:d[g])&&((E=d==null?void 0:d[g])==null?void 0:E.find(w=>{var S;return((S=y==null?void 0:y.find(T=>{var B;return(T==null?void 0:T.key)===g||((B=T==null?void 0:T.key)==null?void 0:B.includes(g))}))==null?void 0:S.value)===w}))}):h=h==null?void 0:h.filter(y=>{var v;return((v=y==null?void 0:y.find(E=>{var w;return(E==null?void 0:E.key)===g||((w=E==null?void 0:E.key)==null?void 0:w.includes(g))}))==null?void 0:v.value)!==d[g]}))}),(h==null?void 0:h.length)===0?u.contents=[]:u.contents=h==null?void 0:h.map(d=>{let p={};return d==null||d.forEach(m=>{p[m==null?void 0:m.key]=m==null?void 0:m.value}),p})}return u}),f})}return n},Wh=(e,a,r)=>{var t,i,s,f;let n=[];return Gt(e)?n=JSON.parse(e):n=JSON.parse((f=(s=(i=(t=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:t.replaceAll("““","“"))==null?void 0:i.replaceAll("“",'"'))==null?void 0:s.replaceAll(':",',':"",'))==null?void 0:f.replaceAll(':"}',':""}')),a.toUpperCase()==="ALL"||a.toUpperCase()==="NONE"||(n=n==null?void 0:n.map(c=>(c=c==null?void 0:c.map(l=>{var o;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(o=l.contents)==null?void 0:o.slice(0,parseInt(a))),l}),c))),n},Hh=e=>{for(let a=e.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[e[a],e[r]]=[e[r],e[a]]}return e},Gh=(e,a,r=0)=>{let n=r;const t=(i,s,f)=>{let c;return c=i==null?void 0:i.map(l=>{var o;return!(l!=null&&l.children)&&n===0?(n=n+1,l.menuId=s):l.relatedValueId=!0,l.relatedValueId=!0,l!=null&&l.children&&((o=l==null?void 0:l.children)==null?void 0:o.length)>0&&(l.children=t(l.children,s)),l}),c};return t(e,a)},Xh=async(e,a,r)=>{var n,t,i,s,f,c,l,o,u,x,h,d,p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_;if(a==="Sequence")return JSON.parse((s=(i=(t=(n=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:n.replaceAll("““","“"))==null?void 0:t.replaceAll("“",'"'))==null?void 0:i.replaceAll(':",',':"",'))==null?void 0:s.replaceAll(':"}',':""}'));if(a==="Auto"){let A=[];Gt(e)?A=JSON.parse(e):A=JSON.parse((o=(l=(c=(f=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:f.replaceAll("““","“"))==null?void 0:c.replaceAll("“",'"'))==null?void 0:l.replaceAll(':",',':"",'))==null?void 0:o.replaceAll(':"}',':""}'));const D=await sa.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:((h=(x=(u=zt==null?void 0:zt.value)==null?void 0:u.split("/"))==null?void 0:x.filter((X,re)=>{var ee,Q;return re!==((Q=(ee=zt==null?void 0:zt.value)==null?void 0:ee.split("/"))==null?void 0:Q.length)-1}))==null?void 0:h.join(""))+"/"}});let b;return(g=(d=r==null?void 0:r.split("["))==null?void 0:d[0])!=null&&g.includes((m=(p=Fc.value)==null?void 0:p[0])==null?void 0:m.parentContent)&&(b=(v=(y=Fc.value)==null?void 0:y[0])==null?void 0:v.value),!b&&((w=(E=D==null?void 0:D.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(b=(I=(S=zt==null?void 0:zt.value)==null?void 0:S.split("/"))==null?void 0:I[((B=(T=zt==null?void 0:zt.value)==null?void 0:T.split("/"))==null?void 0:B.length)-1]),A=A==null?void 0:A.map(X=>(X=X==null?void 0:X.map(re=>{var Q,q,we,P,Pe,Ie,je,Le;let ee=(q=(Q=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Q.contents)==null?void 0:q.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain");return(ee==null?void 0:ee.length)===0&&Array.isArray((P=(we=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:we.contents)==null?void 0:P[0])&&(ee=(je=(Ie=(Pe=X==null?void 0:X.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Pe.contents)==null?void 0:Ie[0])==null?void 0:je.filter(ie=>(ie==null?void 0:ie.directiveLabel)==="#isMain")),(re==null?void 0:re.key)==="tableContents"&&b&&b!==""&&(re.contents=(Le=re.contents)==null?void 0:Le.filter(ie=>ee==null?void 0:ee.some(ur=>(ie==null?void 0:ie[ur==null?void 0:ur.label])===b))),re}),X)),A}else{let A=[];if(Gt(e)?A=JSON.parse(e):A=JSON.parse((M=(W=(L=(U=e==null?void 0:e.replaceAll('"',"“"))==null?void 0:U.replaceAll("““","“"))==null?void 0:L.replaceAll("“",'"'))==null?void 0:W.replaceAll(':",',':"",'))==null?void 0:M.replaceAll(':"}',':""}')),a.toUpperCase()==="MANUAL"){if(!((ne=(se=A==null?void 0:A[0])==null?void 0:se.find(b=>(b==null?void 0:b.key)==="contentTableId"))!=null&&ne.contents))return A;let D=await sa.getInsofDataApi({id:(Te=(z=(he=A==null?void 0:A[0])==null?void 0:he.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:z[((be=(ce=A==null?void 0:A[0])==null?void 0:ce.filter(b=>(b==null?void 0:b.key)==="contentTableId"))==null?void 0:be.length)-1])==null?void 0:Te.contents});D=(_=(Ae=D==null?void 0:D.data)==null?void 0:Ae.result)==null?void 0:_[0],A=A==null?void 0:A.map(b=>(b=b==null?void 0:b.map(X=>{var re,ee;return(X==null?void 0:X.key)==="header"&&(re=X.contents)!=null&&re.some(Q=>!(Q!=null&&Q.menuId))&&(X.contents=(ee=X.contents)==null?void 0:ee.map((Q,q)=>{var P,Pe,Ie,je,Le,ie,ur;let we=(Ie=(Pe=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Pe[((P=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:P.length)-1])==null?void 0:Ie.contents;return Array.isArray(Q)&&((je=gn(Q==null?void 0:Q[0]))!=null&&je.every(ir=>!(ir!=null&&ir.menuId)))?Q=Gh(Q,we):((Q==null?void 0:Q.directiveLabel)==="#isMain"&&(Q.menuId=(ur=(ie=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:ie[((Le=b==null?void 0:b.filter(ir=>(ir==null?void 0:ir.key)==="contentTableId"))==null?void 0:Le.length)-1])==null?void 0:ur.contents),Q.relatedValueId=!0),Q})),X}),b))}else A=A==null?void 0:A.map(D=>(D=D==null?void 0:D.map(b=>((b==null?void 0:b.key)==="tableContents"&&(b.contents=Hh(b.contents)),b)),D));return A}},Ii=(e,a)=>Array.isArray(e)?e==null?void 0:e.map(n=>{var t,i,s,f,c,l,o;if(Array.isArray(n)?n=n:n=[n],(t=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&t.every(u=>typeof u!="object"||u===null))return n;if((i=n==null?void 0:n.filter(u=>!(u!=null&&u.id)||typeof(u==null?void 0:u.id)=="string"))!=null&&i.some(u=>Array.isArray(u)))return n;{let u=[],x=(n==null?void 0:n.find(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number"))??{id:(s=n==null?void 0:n[0])==null?void 0:s.id};if(u.push(x),Array.isArray(a==null?void 0:a[0])){const h=(f=n==null?void 0:n.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:f[0];(c=gn(G.cloneDeep(a==null?void 0:a[0])))==null||c.forEach(d=>{u.push(h==null?void 0:h[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const h=(l=n==null?void 0:n.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:l[0];(o=gn(G.cloneDeep(a)))==null||o.forEach(d=>{u.push(h==null?void 0:h[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return u}}):void 0,d0=(e,a)=>{let r={};return Array.isArray(e)?e!=null&&e.find(n=>n==null?void 0:n.id)?(e==null?void 0:e.length)>1?e==null||e.forEach((n,t)=>{a!=null&&a[t-1]&&!(n!=null&&n.id)?r[a[t-1]]=n:n!=null&&n.id&&(r.id=n==null?void 0:n.id)}):r=e==null?void 0:e[0]:e==null||e.forEach((n,t)=>{a!=null&&a[t]&&(r[a[t]]=n)}):(a==null||a.forEach(n=>{r[n]=e==null?void 0:e[n]}),r.id=e==null?void 0:e.id),r},f0=G.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),$h=G.useModelComp(G.pinia),{routeToChildPath:Dc}=G.storeToRefs($h),Kh=G.useLoginState(G.pinia),{loginUserInfo:Ic,cryptoInfo:sw}=G.storeToRefs(Kh),zh=f0(G.pinia),{originalPath:bc}=G.storeToRefs(zh),Vh=async(e,a)=>{const r=sessionStorage.getItem("authority"),n=JSON.parse(r||"");if(Array.isArray(n)){let t;Dc.value?t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>(f==null?void 0:f.includes(e))||(f==null?void 0:f.includes(Dc.value)))):t=Array.isArray(n)&&(n==null?void 0:n.filter(f=>f==null?void 0:f.includes(e)));const i=t==null?void 0:t.map(f=>{var c;return((c=f==null?void 0:f.split("/"))==null?void 0:c.pop())||""});return a==null?void 0:a.map(f=>{var c;return{...f,compData:(c=f==null?void 0:f.compData)==null?void 0:c.map(l=>{var o;return(l==null?void 0:l.key)==="rowButton"||(l==null?void 0:l.key)==="extraButton"?{...l,contents:(o=l==null?void 0:l.contents)==null?void 0:o.filter(u=>i==null?void 0:i.includes(u==null?void 0:u.label))}:l})}})}else return typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?a:[]},jh=(e,a)=>{var i,s,f,c;const r=(s=(i=a["系统管理/角色管理"])==null?void 0:i.filter(l=>{var o;return((o=l==null?void 0:l.key)==null?void 0:o.type)==="data"}))==null?void 0:s.map(l=>l.value.tableData),n=(c=(f=e==null?void 0:e.value)==null?void 0:f.tableData)==null?void 0:c.角色名称,t=r==null?void 0:r.find(l=>(l==null?void 0:l.角色名称)===n);return t==null?void 0:t.数据范围};var ks=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(ks||{});const Jl=(e,a,r)=>{var s,f,c,l;if(((c=(f=(s=Ic.value)==null?void 0:s.key)==null?void 0:f.layer)==null?void 0:c.toUpperCase())==="SUPERADMIN"||!r)return e;const n=(l=r==null?void 0:r["系统管理/用户管理"])==null?void 0:l.find(o=>{var u;return(o==null?void 0:o.id)===((u=Ic.value)==null?void 0:u.id)}),t=jh(n,r);if(!t)return e;switch(ks==null?void 0:ks[t]){case 0:return e;case 1:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var p,m,g,y,v,E,w,S,T;const h=x==null?void 0:x[1],d=u[(u==null?void 0:u.length)-1]===bc.value;return((m=(p=h==null?void 0:h.key)==null?void 0:p.createUserLayer)==null?void 0:m.toUpperCase())==="SUPERADMIN"||((g=h==null?void 0:h.key)==null?void 0:g.createUserOrg)===((v=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:v.部门名称)||((E=h==null?void 0:h.key)==null?void 0:E.createUserOrg)===((S=(w=n==null?void 0:n.value)==null?void 0:w.tableData)==null?void 0:S.部门名称)&&((T=h==null?void 0:h.key)==null?void 0:T.createUserId)===(n==null?void 0:n.id)||d})):e==null?void 0:e.filter(o=>{var u,x,h,d,p,m,g,y,v;return((x=(u=o==null?void 0:o.key)==null?void 0:u.createUserLayer)==null?void 0:x.toUpperCase())==="SUPERADMIN"||((h=o==null?void 0:o.key)==null?void 0:h.createUserOrg)===((p=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:p.部门名称)||((m=o==null?void 0:o.key)==null?void 0:m.createUserOrg)===((y=(g=n==null?void 0:n.value)==null?void 0:g.tableData)==null?void 0:y.部门名称)&&((v=o==null?void 0:o.key)==null?void 0:v.createUserId)===(n==null?void 0:n.id)});case 2:break;case 3:return a?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([u,x])=>{var p;const h=x==null?void 0:x[1],d=u[(u==null?void 0:u.length)-1]===bc.value;return((p=h==null?void 0:h.key)==null?void 0:p.createUserId)===(n==null?void 0:n.id)||d})):e==null?void 0:e.filter(o=>{var u;return((u=o==null?void 0:o.key)==null?void 0:u.createUserId)===(n==null?void 0:n.id)})}},Yh=G.useModelComp(G.pinia),{routeToChildPath:dn}=G.storeToRefs(Yh),Fn=G.useMenuState(G.pinia),{activeMenuPath:e0}=G.storeToRefs(Fn),Si=G.useLoginState(),{loginUserInfo:Ra}=G.storeToRefs(Si),Jh=f0(G.pinia),{originalPath:qh}=G.storeToRefs(Jh),ct=qh.value,Zh=e=>{const a=/^name(\d+)$/,r=e==null?void 0:e.map(t=>{const i=[];for(const s in t){const f=s.match(a);f&&i.push({idx:Number(f[1]),value:t[s]})}return!i.length&&t.name&&i.push({idx:-1,value:t.name}),i.sort((s,f)=>s.idx-f.idx),{item:t,names:i}});function n(t,i){if(!t)return[];let s=[];const f=[];t.forEach(x=>{var h;return(((h=x.names)==null?void 0:h.length)>i?s:f).push(x)});const c=f.map(x=>x.item),l=new Map;s=s==null?void 0:s.sort((x,h)=>{var d,p;return((d=x==null?void 0:x.item)==null?void 0:d.orderId)-((p=h==null?void 0:h.item)==null?void 0:p.orderId)});for(const x of s){const h=x.names[x.names.length-i-1].value;l.has(h)||l.set(h,[]),l.get(h).push(x)}return[...Array.from(l.keys()).map(x=>{var m,g,y,v;const h=l.get(x);if(h[0].names.length===1&&(h!=null&&h.every(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)===-1})))return h[0].item;let d=h==null?void 0:h.filter(E=>{var w,S;return((S=(w=E==null?void 0:E.names)==null?void 0:w[0])==null?void 0:S.idx)!==-1}),p=new Map;return d==null||d.forEach(E=>{let w=E==null?void 0:E.item,S="";for(let T in w)T!=null&&T.includes("name")&&(S=S===""?w==null?void 0:w[T]:S+"/"+(w==null?void 0:w[T]));for(const[T,B]of p.entries())(T.includes(S)||S!=null&&S.includes(T))&&(S=T);p.set(S,E)}),d=Array.from(p.values()),{name:x,isShow:!0,comp:"ParentItem",children:(m=n(d,i+1))==null?void 0:m.sort((E,w)=>(E==null?void 0:E.orderId)-(w==null?void 0:w.orderId)),orderId:(v=(y=(g=n(d,i+1))==null?void 0:g.sort((E,w)=>((E==null?void 0:E.orderId)??0)-((w==null?void 0:w.orderId)??0)))==null?void 0:y[0])==null?void 0:v.orderId}}),...c]}if(r)return n(r,0)},Qh=async e=>{let a=new WeakMap,r=e;return a!=null&&a[e0.value+"/"]||(r=e==null?void 0:e.map(n=>{var t;return Array.isArray(n==null?void 0:n.compData)&&(n.compData=(t=n.compData)==null?void 0:t.map(i=>{var s;return(i==null?void 0:i.key)==="header"&&(i.contents=(s=i.contents)==null?void 0:s.map(f=>((f==null?void 0:f.directiveLabel)==="#isMain"&&(f.directiveColor=!0),f))),i})),n})),r},e1=e=>{var n;let a=[],r=[];if(e!=null&&e.find(t=>t==null?void 0:t.choice)){let t=e==null?void 0:e.filter(f=>f==null?void 0:f.choice),i="";for(let f in t==null?void 0:t[0])f!=null&&f.includes("name")&&(i=(n=t==null?void 0:t[0])==null?void 0:n[f]);let s=t==null?void 0:t.map(f=>f!=null&&f.name1?f==null?void 0:f.name0:f==null?void 0:f.name);s=[...new Set(s)],s=s==null?void 0:s.map(f=>({label:f,value:f})),r=[{comp:"Radio",compData:s,name:i,isShow:!0}]}if(e!=null&&e.find(t=>t==null?void 0:t.tab)&&(e==null||e.forEach(t=>{if(!(t!=null&&t.tab))a.push(t);else if(a!=null&&a.find(i=>(i==null?void 0:i.tabInform)===(t==null?void 0:t.tab)))a=a==null?void 0:a.map(i=>{if((i==null?void 0:i.comp)==="Tabs"&&(i==null?void 0:i.tabInform)===(t==null?void 0:t.tab)){let s=i.compData,{tab:f,...c}=t;c.label=c==null?void 0:c.name,c.name="",s.push(c),i.compData=s}return i});else{let{tab:i,...s}=t,f=s==null?void 0:s.name0;s.label=s==null?void 0:s.name,s.name="";let c={comp:"Tabs",name:f,tabInform:t==null?void 0:t.tab,compData:[s],choices:t==null?void 0:t.choice};a.push(c)}})),(a==null?void 0:a.length)===0&&(r==null?void 0:r.length)===0)return e;if((r==null?void 0:r.length)===0)return a;if((a==null?void 0:a.length)===0){let t=e==null?void 0:e.findIndex(i=>(i==null?void 0:i.choice)??(i==null?void 0:i.choices));return e.splice(t,0,r==null?void 0:r[0]),e=e==null?void 0:e.map((i,s)=>{if(s>t){let f={};for(let c in i)c!=null&&c.includes("name")||(f[c]=i==null?void 0:i[c]);f.choiceName=i!=null&&i.name1?i==null?void 0:i.name0:i==null?void 0:i.name,i=f}return i}),e}else{let t=a==null?void 0:a.findIndex(i=>(i==null?void 0:i.choice)??(i==null?void 0:i.choices));return a.splice(t,0,r==null?void 0:r[0]),a=a==null?void 0:a.map((i,s)=>{if(s>t){let f={};for(let c in i)c!=null&&c.includes("name")||(f[c]=i==null?void 0:i[c]);f.choiceName=i!=null&&i.name1?i==null?void 0:i.name0:i==null?void 0:i.name,i=f}return i}),a}},r1=async e=>{let a=e;return a=a==null?void 0:a.filter(r=>r),a=e1(a),a!=null&&a.every(r=>{var n,t;return((t=(n=Object.keys(r))==null?void 0:n.filter(i=>i==null?void 0:i.includes("name")))==null?void 0:t.length)===1})?a:Zh(a)},a1=async()=>{var i,s,f,c,l,o,u,x,h,d,p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ya,Fa,Et,Ja,ka,$a,Se,Ne,Be,Ea,Qe,br,me,Fr,Cr,hr;Fn.setImportLoading(!0);let e="";const a=await sa.getInsofDataApi({key:{type:"structure",pageKey:G.cloneDeep(dn).value,systemKey:sessionStorage.getItem("systemKey")}});if(((s=(i=a==null?void 0:a.data)==null?void 0:i.result)==null?void 0:s.length)>0){let kr=(h=(x=(u=(o=(l=(c=(f=a==null?void 0:a.data)==null?void 0:f.result)==null?void 0:c[0])==null?void 0:l.value)==null?void 0:o.pageData)==null?void 0:u.compData)==null?void 0:x.find(ha=>(ha==null?void 0:ha.key)==="header"))==null?void 0:h.contents;e=(p=(d=G.cloneDeep(kr))==null?void 0:d[0])==null?void 0:p.label}let r=e0.value;(y=e0.value)!=null&&y.includes(`updateLoading${((m=Ra.value)==null?void 0:m.account)||((g=Ra.value)==null?void 0:g.账号)}`)?r=G.cloneDeep(e0).value:(w=e0.value)!=null&&w.includes(`loading${((v=Ra.value)==null?void 0:v.account)||((E=Ra.value)==null?void 0:E.账号)}`)&&(r=G.cloneDeep(dn).value+ct+`loading${((S=Ra.value)==null?void 0:S.account)||((T=Ra.value)==null?void 0:T.账号)}`);const n=await sa.getInsofDataApi({key:{pageKey:r,systemKey:sessionStorage.getItem("systemKey")}});let t=[];if(((I=(B=n==null?void 0:n.data)==null?void 0:B.result)==null?void 0:I.length)>0){let kr="",ha=[];(L=(U=n==null?void 0:n.data)==null?void 0:U.result)==null||L.forEach(We=>{var Kr,ta,Ta,ua,fr;((ta=(Kr=We==null?void 0:We.value)==null?void 0:Kr.pageData)==null?void 0:ta.comp)==="Form"&&((fr=(ua=(Ta=We==null?void 0:We.value)==null?void 0:Ta.pageData)==null?void 0:ua.compData)==null||fr.forEach(wr=>{(wr==null?void 0:wr.key)==="formContent"&&(ha=[...ha,...wr==null?void 0:wr.contents])}))});let ra=ha==null?void 0:ha.find(We=>(We==null?void 0:We.isMain)===!0);if(ra?(kr=ra==null?void 0:ra.value,e=ra==null?void 0:ra.key):kr=(Te=(z=(be=(ce=(he=(ne=(se=(M=(W=n==null?void 0:n.data)==null?void 0:W.result)==null?void 0:M[0])==null?void 0:se.value)==null?void 0:ne.pageData)==null?void 0:he.compData)==null?void 0:ce.find(We=>(We==null?void 0:We.key)==="formContent"))==null?void 0:be.contents)==null?void 0:z.find(We=>{var Kr,ta;return(We==null?void 0:We.key)===e||((ta=(Kr=We==null?void 0:We.optionUrl)==null?void 0:Kr.groupSelect)==null?void 0:ta[1])===e}))==null?void 0:Te.value,(A=e0.value)!=null&&A.includes(`updateLoading${((Ae=Ra.value)==null?void 0:Ae.account)||((_=Ra.value)==null?void 0:_.账号)}`)){let We=[],Kr=[];const ta=await sa.getInsofDataApi({key:{pageKey:(Ie=e0.value.split(ct+`updateLoading${((P=Ra.value)==null?void 0:P.account)||((Pe=Ra.value)==null?void 0:Pe.账号)}`))==null?void 0:Ie[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Le=(je=ta==null?void 0:ta.data)==null?void 0:je.result)==null?void 0:Le.length)>0){let Ta=(ie=n==null?void 0:n.data)==null?void 0:ie.result,ua=(ur=G.cloneDeep(Ta))==null?void 0:ur.map(async fr=>{var wr,Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N,F;if(((wr=fr==null?void 0:fr.key)==null?void 0:wr.type)==="structure"){let O=(it=(Ba=(La=(Oa=fr==null?void 0:fr.value)==null?void 0:Oa.pageData)==null?void 0:La.compData)==null?void 0:Ba.find(C=>(C==null?void 0:C.key)==="parentFormPath"))==null?void 0:it.contents;if(O){let C=await En(O,sessionStorage.getItem("systemKey"),""),R=(Ct=(vt=(Ot=(bt=fr==null?void 0:fr.value)==null?void 0:bt.pageData)==null?void 0:Ot.compData)==null?void 0:vt.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:Ct.contents,K=C==null?void 0:C.filter(Y=>(Y==null?void 0:Y.comp)==="Form");K==null||K.forEach(Y=>{var V;(V=Y==null?void 0:Y.compData)==null||V.forEach(j=>{var J,le;if((j==null?void 0:j.key)==="formContent"&&((J=j==null?void 0:j.contents)==null?void 0:J.some(Ee=>R==null?void 0:R.find(ue=>(ue==null?void 0:ue.prop)===(Ee==null?void 0:Ee.prop))))){let Ee=Y;Ee.compData=(le=Ee.compData)==null?void 0:le.map(ge=>{var qe;return(ge==null?void 0:ge.key)==="formContent"&&(ge.contents=(qe=ge.contents)==null?void 0:qe.map(Er=>{var Mr;return R!=null&&R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop))&&(Er.value=(Mr=R==null?void 0:R.find($r=>($r==null?void 0:$r.prop)===(Er==null?void 0:Er.prop)))==null?void 0:Mr.value),Er})),ge});let ue={};for(let ge in Ee)ge!=="id"&&(ue[ge]=Ee[ge]);t.push({id:Y==null?void 0:Y.id,value:{pageData:ue}})}})})}else if((Nt=(Rt=ta==null?void 0:ta.data)==null?void 0:Rt.result)!=null&&Nt.find(C=>{var R,K,Y,V;return((K=(R=C==null?void 0:C.value)==null?void 0:R.pageData)==null?void 0:K.name)===((V=(Y=fr==null?void 0:fr.value)==null?void 0:Y.pageData)==null?void 0:V.name)})){let C=fr==null?void 0:fr.key;C.pageKey=G.cloneDeep(dn).value+ct+kr,t.push({id:(F=(N=(k=ta==null?void 0:ta.data)==null?void 0:k.result)==null?void 0:N.find(R=>{var K,Y,V,j;return((Y=(K=R==null?void 0:R.value)==null?void 0:K.pageData)==null?void 0:Y.name)===((j=(V=fr==null?void 0:fr.value)==null?void 0:V.pageData)==null?void 0:j.name)}))==null?void 0:F.id,key:C,value:fr==null?void 0:fr.value})}else{let C=fr==null?void 0:fr.key;C.pageKey=G.cloneDeep(dn).value+ct+kr,We.push({key:C,value:fr==null?void 0:fr.value})}}});await Promise.all(ua),(ya=(ir=n==null?void 0:n.data)==null?void 0:ir.result)==null||ya.forEach(fr=>{var Oa,La,Ba;let wr=(Oa=G.cloneDeep(fr))==null?void 0:Oa.key;wr.pageKey=G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((La=Ra.value)==null?void 0:La.account)||((Ba=Ra.value)==null?void 0:Ba.账号)}`,Fn.setChildMenu(wr.pageKey),t.push({id:fr==null?void 0:fr.id,key:wr})})}if(kr===""){fs.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Fn.setImportLoading(!1);return}if((t==null?void 0:t.length)>0){await sa.batchUpdateInsofDataApi({dataList:t}),(Fa=t==null?void 0:t[0])!=null&&Fa.key&&await Si.setLogRecordAsync({type:"保存",data:t},(Et=t==null?void 0:t[0])==null?void 0:Et.key),(We==null?void 0:We.length)>0&&(await sa.batchAddInsofDataApi({dataList:We}),(Ja=We==null?void 0:We[0])!=null&&Ja.key&&await Si.setLogRecordAsync({type:"保存",data:We},(ka=We==null?void 0:We[0])==null?void 0:ka.key));const Ta=await sa.getInsofDataApi({key:{pageKey:(Ne=e0.value.split(ct+`updateLoading${(($a=Ra.value)==null?void 0:$a.account)||((Se=Ra.value)==null?void 0:Se.账号)}`))==null?void 0:Ne[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Ea=(Be=Ta==null?void 0:Ta.data)==null?void 0:Be.result)==null?void 0:Ea.length)>0){let ua=[],fr=(Qe=n==null?void 0:n.data)==null?void 0:Qe.result;(br=G.cloneDeep(fr))==null||br.forEach(wr=>{var Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N;if(((Oa=wr==null?void 0:wr.key)==null?void 0:Oa.type)!=="structure"){let F=(it=(Ba=(La=Ta==null?void 0:Ta.data)==null?void 0:La.result)==null?void 0:Ba.filter(K=>{var Y;return((Y=K==null?void 0:K.key)==null?void 0:Y.type)==="data"}))==null?void 0:it.map(K=>K==null?void 0:K.id);ua=[...ua,...F];let O=(Ct=(vt=(Ot=(bt=G.cloneDeep(fr))==null?void 0:bt.find(K=>{var Y;return((Y=wr==null?void 0:wr.key)==null?void 0:Y.tableId)===(K==null?void 0:K.id)}))==null?void 0:Ot.value)==null?void 0:vt.pageData)==null?void 0:Ct.name,C=(k=(Nt=(Rt=Ta==null?void 0:Ta.data)==null?void 0:Rt.result)==null?void 0:Nt.find(K=>{var Y,V;return((V=(Y=K==null?void 0:K.value)==null?void 0:Y.pageData)==null?void 0:V.name)===O}))==null?void 0:k.id,R=(N=G.cloneDeep(wr))==null?void 0:N.key;R.tableId=C,R.pageKey=G.cloneDeep(dn).value+ct+kr,Kr.push({key:R,value:wr==null?void 0:wr.value})}}),(ua==null?void 0:ua.length)>0&&(ua=[...new Set(ua)],await sa.batchDeleteInsofDataApi({ids:ua})),(Fr=(me=n==null?void 0:n.data)==null?void 0:me.result)==null||Fr.forEach(wr=>{var La,Ba,it;let Oa=(La=G.cloneDeep(wr))==null?void 0:La.key;Oa.pageKey=G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((Ba=Ra.value)==null?void 0:Ba.account)||((it=Ra.value)==null?void 0:it.账号)}`,Fn.setChildMenu(Oa.pageKey),t.push({id:wr==null?void 0:wr.id,key:Oa})})}(Kr==null?void 0:Kr.length)>0&&(await sa.batchAddInsofDataApi({dataList:Kr}),(Cr=We==null?void 0:We[0])!=null&&Cr.key&&await Si.setLogRecordAsync({type:"保存",data:Kr},(hr=Kr==null?void 0:Kr[0])==null?void 0:hr.key)),fs.ElMessage.success("保存成功")}}else{if((b=(D=n==null?void 0:n.data)==null?void 0:D.result)==null||b.forEach(We=>{var ta;let Kr=(ta=G.cloneDeep(We))==null?void 0:ta.key;Kr.pageKey=G.cloneDeep(dn).value+ct+kr,Fn.setChildMenu(Kr.pageKey),t.push({id:We==null?void 0:We.id,key:Kr})}),kr===""){fs.ElMessage.error(`保存失败,${e}的必填字段没有填写`),Fn.setImportLoading(!1),Fn.setChildMenu("");return}(X=t==null?void 0:t[0])!=null&&X.key&&(await sa.batchUpdateInsofDataApi({dataList:t}),await Si.setLogRecordAsync({type:"保存",data:t},(re=t==null?void 0:t[0])==null?void 0:re.key)),await Rf(G.cloneDeep(dn).value+ct+kr,G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((ee=Ra.value)==null?void 0:ee.account)||((Q=Ra.value)==null?void 0:Q.账号)}`),Fn.setActiveMenuPath(G.cloneDeep(dn).value+ct+kr+ct+`updateLoading${((q=Ra.value)==null?void 0:q.account)||((we=Ra.value)==null?void 0:we.账号)}`),fs.ElMessage.success("保存成功")}}Fn.setImportLoading(!1)},t1=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),G.cloneDeep(t).split("{").length-1===G.cloneDeep(t).split("}").length-1&&G.cloneDeep(t).split("【").length-1===G.cloneDeep(t).split("】").length-1&&G.cloneDeep(t).split("[").length-1===G.cloneDeep(t).split("]").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("/*").length-1===G.cloneDeep(t).split("*/").length-1&&t[t.length-1]!==","&&t[t.length-1]===a?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,""))):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return n},Oc=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),G.cloneDeep(t).split("{").length-1===G.cloneDeep(t).split("}").length-1&&G.cloneDeep(t).split("【").length-1===G.cloneDeep(t).split("】").length-1&&G.cloneDeep(t).split("[").length-1===G.cloneDeep(t).split("]").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("/*").length-1===G.cloneDeep(t).split("*/").length-1&&(t[t.length-1]===":"&&t[t.length-2]!=="r"||t[t.length-1]===a)&&(t.match(/'/g)||[]).length%2===0?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),((t==null?void 0:t[(t==null?void 0:t.length)-1])===a||t[t.length-1]===":"&&t[t.length-2]!=="r")&&(t.match(/'/g)||[]).length%2===0&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},Cc=(e,a)=>{let r=0;for(let n=0;n<e.length;n++)e[n]===a&&r++;return r%2===0},x0=(e,a)=>{let r=e;const n=[];let t="",i=0;for(const s of r)i++,s.includes("{")||t.includes("{")||s.includes("[")||t.includes("[")||s.includes("【")||t.includes("【")||s.includes("(")||t.includes("(")||s.includes("(")||t.includes("(")||s.includes("/*")||t.includes("/*")?(t+=s.trim(),G.cloneDeep(t).split("{").length-1===G.cloneDeep(t).split("}").length-1&&G.cloneDeep(t).split("【").length-1===G.cloneDeep(t).split("】").length-1&&G.cloneDeep(t).split("[").length-1===G.cloneDeep(t).split("]").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("(").length-1===G.cloneDeep(t).split(")").length-1&&G.cloneDeep(t).split("/*").length-1===G.cloneDeep(t).split("*/").length-1&&t[t.length-1]===a&&Cc(t,"'")?(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""):i===(e==null?void 0:e.length)&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t="")):(t+=s.trim(),(t==null?void 0:t[(t==null?void 0:t.length)-1])===a&&Cc(t,"'")&&(n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),t=""));return(t==null?void 0:t.length)!==0&&n.push(t.replace(/\/\*[\s\S]*?\*\//g,"")),n},n1=f0(G.pinia),{originalPath:fw}=G.storeToRefs(n1),i1=e=>{var r,n;let a=(n=(r=e==null?void 0:e.slice(1,(e==null?void 0:e.length)-1))==null?void 0:r.split(","))==null?void 0:n.map(t=>{var i,s,f,c,l;return(l=(c=(f=(s=(i=t==null?void 0:t.split("=="))==null?void 0:i[0])==null?void 0:s.replaceAll("'",""))==null?void 0:f.split("#"))==null?void 0:c[0])==null?void 0:l.trim()});return a=JSON.stringify(a),a},mf=e=>{let a=G.cloneDeep(e),r=[],n="",t="",i=(a==null?void 0:a[0])==="["?Oc(a.slice(1,a.length-1),","):Oc(a,",");return i==null||i.forEach((s,f)=>{var l,o,u,x,h,d,p,m;let c=s;if(c[c.length-1]===","&&(c=c.slice(0,c.length-1)),c.slice(1,(c==null?void 0:c.length)-1).includes("[")&&(c==null?void 0:c[0])==="["){let g=mf(c);if((i==null?void 0:i.length)===2&&((o=i==null?void 0:i[0])==null?void 0:o[((l=i==null?void 0:i[0])==null?void 0:l.length)-1])===":"){let y=i[f-1].replaceAll(",","").trim();y[y.length-1]===":"&&(y=y.slice(0,y.length-1));let v=(u=mf(c))==null?void 0:u.parentStringContent;v="["+((x=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1))==null?void 0:x.replaceAll("'",'"'))+"]";let E={[y]:v};r.push(E)}else t=t+c+",";n=n+(g==null?void 0:g.stringContent),t=t+(g==null?void 0:g.parentStringContent),r=[...r,...g==null?void 0:g.parentColumns]}else if((c==null?void 0:c[0])!=="["&&c[c.length-1]===":")c=c.slice(0,c.length-1),n=n+c+",",t=t+((h=c==null?void 0:c.split("#"))==null?void 0:h[0])+",";else if((c==null?void 0:c[0])==="["&&i[f-1]){(p=(d=c==null?void 0:c.slice(1,(c==null?void 0:c.length)-1))==null?void 0:d.split(","))==null||p.forEach(v=>{n=n+v+","});let g=i[f-1].replaceAll(",","").trim();g[g.length-1]===":"&&(g=g.slice(0,g.length-1));let y={[g]:i1(c)};r.push(y)}else n=n+c+",",t=t+((m=c==null?void 0:c.split("#"))==null?void 0:m[0])+","}),{parentColumns:r,stringContent:n,parentStringContent:t}},gf=G.useMenuState(G.pinia),{activeMenuPath:ls}=G.storeToRefs(gf),s1=G.useUnit(G.pinia),{chooseTitle:Ti}=G.storeToRefs(s1);let Ir="$R";const f1=Bs(G.pinia),{multipleTableConst:Rc}=G.storeToRefs(f1),c1=G.useLoginState(G.pinia),{loginUserInfo:cw,systemInfo:Nc}=G.storeToRefs(c1),ql=G.useModelComp(G.pinia),l1=f0(G.pinia),{originalPath:o1}=G.storeToRefs(l1),{payloadTypes:lw}=G.storeToRefs(ql),pn=(e,a)=>(a==null?void 0:a.split(",")).some(n=>Object.keys(e).some(t=>t.startsWith("name")&&e[t]===n)),qs={onNumSlice:Wh,onRandomContents:Xh,onConditionContents:Uh,onPaceContents:Bh,onMainTagContents:Mh,onFatherPaceContents:Lh,onButtonContents:Ph,onPamButtonContents:Nh,onRowButtonContents:Rh},Zl=async e=>{const a=e.slice(0,e.indexOf("(")).trim(),r=qs==null?void 0:qs[a];if(typeof r!="function"){console.log(`找不到函数: ${a}`);return}const n=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),t=await new Function(`return [${n}]`)();return r(...Array.isArray(t)?t:[t])},vf=(e,a,r="children")=>{var f;let n=[],t=[],i=[],s=0;for(const c of e){const l=a.some(x=>{var d,p,m,g,y,v,E,w;const[h]=x.split(".");return h===c.prop||h===c.label||h===((g=(d=c.prop)==null?void 0:d.split("."))==null?void 0:g[((m=(p=c.prop)==null?void 0:p.split("."))==null?void 0:m.length)-1])||h===((w=(y=c.prop)==null?void 0:y.split("."))==null?void 0:w[((E=(v=c.prop)==null?void 0:v.split("."))==null?void 0:E.length)-1].replace(/\d+$/,""))}),o=a.filter(x=>x.includes(".")).map(x=>x.split(".").slice(1).join("."));s=s+1;let u;if(l&&(u={...c},t.push(s),i.push(u==null?void 0:u.prop),delete u[r]),c[r]){const x=(f=vf(c[r],(o==null?void 0:o.length)>0?o:a,r))==null?void 0:f.contents;x.length&&(t.push(s),i.push(u==null?void 0:u.prop),s=s+1,u=u||{...c},n=[...n,...x],u=x)}u&&!Array.isArray(u)&&n.push(u)}return{contents:n,ids:t,props:i}},u1=e=>{if(!Gt(e))return[e];const a=new Function(`return ${e}`)(),r=[];return((t,i="")=>{for(const s of t)if(Array.isArray(s)){const[f,c]=s;Array.isArray(c)?c.forEach(l=>r.push(`"${f}:${l}"`)):r.push(i?`"${i}:${f}"`:'"'+f+'"')}else r.push('"'+s+'"')})(a),r},h1=async(e,a,r,n,t,i)=>{var l,o,u,x,h,d,p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ya,Fa,Et,Ja,ka,$a,Se,Ne,Be,Ea,Qe,br,me,Fr,Cr,hr,kr,ha,ra,We,Kr,ta,Ta,ua,fr,wr,Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N,F,O,C,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,tn,nn,sn,Pt,Rn;let s=[],f=(o=(l=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:l.contents)==null?void 0:o.filter(er=>!(er!=null&&er.columnPath)&&(er==null?void 0:er.label)!=="操作"),c=(x=(u=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:u.contents)==null?void 0:x.filter(er=>er==null?void 0:er.columnPath);if(Array.isArray((d=(h=e==null?void 0:e.find(er=>(er==null?void 0:er.key)==="header"))==null?void 0:h.contents)==null?void 0:d[0])){let er=(g=(m=(p=e==null?void 0:e.find(de=>(de==null?void 0:de.key)==="header"))==null?void 0:p.contents)==null?void 0:m[0])==null?void 0:g.filter(de=>de==null?void 0:de.columnPath);c=[...c,...er]}for(let er=0;er<(c==null?void 0:c.length);er++){let de=G.cloneDeep(c==null?void 0:c[er]);if(de.columnPath=(v=(y=de==null?void 0:de.columnPath)==null?void 0:y.replaceAll("{",""))==null?void 0:v.replaceAll("}",""),de||(de=(T=(S=gn((w=(E=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:E.contents)==null?void 0:w[0]))==null?void 0:S.filter(Re=>Re==null?void 0:Re.columnPath))==null?void 0:T[er]),de!=null&&de.columnPath&&(de==null?void 0:de.columnPath)!==""){let Re="";if((B=de==null?void 0:de.columnPath)!=null&&B.includes("@Type")||(Re=Re===""?Re+"@Type:Manual":Re+",@Type:Manual"),(I=de==null?void 0:de.columnPath)!=null&&I.includes("@SonSync")||(Re=Re===""?Re+"@SonSync:No":Re+",@SonSync:No"),(U=de==null?void 0:de.columnPath)!=null&&U.includes("@FatherSync")||(Re=Re===""?Re+"@FatherSync:Yes":Re+",@FatherSync:Yes"),((W=de==null?void 0:de.columnPath)==null?void 0:W[((L=de==null?void 0:de.columnPath)==null?void 0:L.length)-1])===")"){let Lr="";((se=(M=de.columnPath)==null?void 0:M.split("("))==null?void 0:se.length)!==((he=(ne=de.columnPath)==null?void 0:ne.split(")"))==null?void 0:he.length)?Lr=((be=de.columnPath)==null?void 0:be.slice(0,(ce=de.columnPath)==null?void 0:ce.length))+","+Re+")":Lr=((Te=de.columnPath)==null?void 0:Te.slice(0,((z=de.columnPath)==null?void 0:z.length)-1))+","+Re+")",de.columnPath=Re===""?de.columnPath:Lr}else(Ae=de==null?void 0:de.columnPath)!=null&&Ae.includes("@")?de.columnPath=de.columnPath+","+Re+")":de.columnPath=de.columnPath+"("+Re+")"}let Nn=(_=e==null?void 0:e.find(Re=>(Re==null?void 0:Re.key)==="dictContents"))==null?void 0:_.contents,P0="",Pn=(b=(D=(A=c==null?void 0:c[er])==null?void 0:A.columnPath)==null?void 0:D.replace("[",Ir))==null?void 0:b.split(Ir),zr=(ee=(re=(X=Pn==null?void 0:Pn[(Pn==null?void 0:Pn.length)-1])==null?void 0:X.replace("(",Ir))==null?void 0:re.split(Ir))==null?void 0:ee[0];zr=zr==null?void 0:zr.slice(0,(zr==null?void 0:zr.length)-1);let Ge=(Pe=(P=(we=(q=G.cloneDeep((Q=c==null?void 0:c[er])==null?void 0:Q.columnPath))==null?void 0:q.split("["+zr+"]"))==null?void 0:we[0])==null?void 0:P.replaceAll("{",""))==null?void 0:Pe.replaceAll("}","");(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&((je=(Ie=Ti.value)==null?void 0:Ie[0])!=null&&je.value)&&(Ge=Ge+((ie=(Le=Ti.value)==null?void 0:Le[0])==null?void 0:ie.value));let xa="",Mn="",cr="",Ua=G.cloneDeep(zr);if(zr=(ir=(ur=zr==null?void 0:zr.split(":"))==null?void 0:ur[0])==null?void 0:ir.replaceAll("'",""),Ge===""&&((Fa=(ya=Ti.value)==null?void 0:ya[0])!=null&&Fa.value&&((Ja=(Et=Ti.value)==null?void 0:Et[0])==null?void 0:Ja.value)!==""?Ge=ls.value+"/"+(($a=(ka=Ti.value)==null?void 0:ka[0])==null?void 0:$a.value):Ge=ls.value),Ge!=null&&Ge.includes("[")){let Re=(Ea=(Be=(Ne=(Se=Ge==null?void 0:Ge.split("["))==null?void 0:Se[1])==null?void 0:Ne.split("]"))==null?void 0:Be[0])==null?void 0:Ea.split("/");Mn=Ge,xa=(me=(br=(Qe=Ge==null?void 0:Ge.split("["))==null?void 0:Qe[1])==null?void 0:br.split("]"))==null?void 0:me[0];let Lr="";r==null||r.forEach(aa=>{var Br,Me,M0,te,H;((Me=(Br=aa==null?void 0:aa.value)==null?void 0:Br.pageData)==null?void 0:Me.name)===(Re==null?void 0:Re[0])&&((H=(te=(M0=aa==null?void 0:aa.value)==null?void 0:M0.pageData)==null?void 0:te.compData)==null||H.forEach(Z=>{var pe;(Z==null?void 0:Z.key)==="formContent"&&((pe=Z==null?void 0:Z.contents)==null||pe.forEach(xe=>{var Sr;if((xe==null?void 0:xe.prop)===(Re==null?void 0:Re[1])){let Zr=fo((Sr=G.cloneDeep(xe))==null?void 0:Sr.optionUrl,n);Lr=(xe==null?void 0:xe.value)||Zr||""}}))}))}),cr=Lr,Ge=((Fr=Ge==null?void 0:Ge.split("["))==null?void 0:Fr[0])+Lr}(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="/"&&(Ge=Ge.slice(0,(Ge==null?void 0:Ge.length)-1));let oe=[];s!=null&&s.every(Re=>Array.isArray(Re))&&(s==null?void 0:s.length)>0&&(oe=s==null?void 0:s[0]);let Dr=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}});((hr=(Cr=Dr==null?void 0:Dr.data)==null?void 0:Cr.result)==null?void 0:hr.length)===0&&(Ge=(ha=(kr=Ge==null?void 0:Ge.split("/"))==null?void 0:kr.filter((Re,Lr)=>{var aa;return Lr!==((aa=Ge==null?void 0:Ge.split("/"))==null?void 0:aa.length)-1}))==null?void 0:ha.join("/"),Dr=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}));let Ce=(ta=(Kr=(We=(ra=Ua==null?void 0:Ua.split("{"))==null?void 0:ra[0])==null?void 0:We.replace("[",Ir))==null?void 0:Kr.split(Ir))==null?void 0:ta[0];const Ca=await sa.getInsofDataApi({key:{pageKey:t??ls.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}}),qa=[];if((ua=(Ta=Ca==null?void 0:Ca.data)==null?void 0:Ta.result)==null||ua.forEach(Re=>{var Lr;qa.push({id:Re==null?void 0:Re.id,value:Re.value.tableData,parentId:(Lr=Re==null?void 0:Re.key)==null?void 0:Lr.parentId})}),(qa==null?void 0:qa.length)===0){const Re=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(a),type:"data"}});(wr=(fr=Re==null?void 0:Re.data)==null?void 0:fr.result)==null||wr.forEach(Lr=>{var aa;qa.push({id:Lr==null?void 0:Lr.id,value:Lr.value.tableData,parentId:(aa=Lr==null?void 0:Lr.key)==null?void 0:aa.parentId})})}if(Array.isArray((Oa=Dr==null?void 0:Dr.data)==null?void 0:Oa.result)&&((Ba=(La=Dr==null?void 0:Dr.data)==null?void 0:La.result)==null?void 0:Ba.length)>0){let Re;if((Ce==null?void 0:Ce[(Ce==null?void 0:Ce.length)-1])===":"&&(Ce=Ce==null?void 0:Ce.slice(1,(Ce==null?void 0:Ce.length)-1)),Ce=(Ot=(bt=Ce==null?void 0:Ce.split(":"))==null?void 0:bt[((it=Ce==null?void 0:Ce.split(":"))==null?void 0:it.length)-1])==null?void 0:Ot.replaceAll("'",""),((Ct=(vt=Dr==null?void 0:Dr.data)==null?void 0:vt.result)==null?void 0:Ct.find(te=>{var H;return pn((H=te==null?void 0:te.value)==null?void 0:H.pageData,Ce)}))??((Nt=(Rt=Dr==null?void 0:Dr.data)==null?void 0:Rt.result)==null?void 0:Nt.find(te=>{var H;return pn((H=te==null?void 0:te.value)==null?void 0:H.pageData,zr)}))){let te=(N=(k=Dr==null?void 0:Dr.data)==null?void 0:k.result)==null?void 0:N.sort((H,Z)=>H.id-Z.id);Re=await(te==null?void 0:te.map(async H=>{var pe,xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn,He,Vn,jn,Yn,Jn,lr,or,Xe,fa,Ln,ni,ii,si,fi,ci,li,oi,ui,hi,xi,di,pi,mi,gi,vi,_i,pa,$e,De,Ye,ma,ve,st,vr,sr,Za;let Z;if(pn((pe=H==null?void 0:H.value)==null?void 0:pe.pageData,Ce)||pn((xe=H==null?void 0:H.value)==null?void 0:xe.pageData,zr)&&((Zr=(Sr=H==null?void 0:H.value)==null?void 0:Sr.pageData)==null?void 0:Zr.name)===zr){Z=G.cloneDeep((gr=(na=H==null?void 0:H.value)==null?void 0:na.pageData)==null?void 0:gr.compData);let Ka;pn((da=H==null?void 0:H.value)==null?void 0:da.pageData,Ce)&&Ce===zr?(Or=(Ar=H==null?void 0:H.value)==null?void 0:Ar.pageData)!=null&&Or.name1?Ka={name:(Vr=(Ur=H==null?void 0:H.value)==null?void 0:Ur.pageData)==null?void 0:Vr.name,name0:(Gr=(mr=H==null?void 0:H.value)==null?void 0:mr.pageData)==null?void 0:Gr.name0,name1:(jr=(xr=H==null?void 0:H.value)==null?void 0:xr.pageData)==null?void 0:jr.name1}:Ka={name:(fn=(Tt=H==null?void 0:H.value)==null?void 0:Tt.pageData)==null?void 0:fn.name,name0:(ln=(cn=H==null?void 0:H.value)==null?void 0:cn.pageData)==null?void 0:ln.name0}:Ka={name:((un=(on=H==null?void 0:H.value)==null?void 0:on.pageData)==null?void 0:un.name0)||((xn=(hn=H==null?void 0:H.value)==null?void 0:hn.pageData)==null?void 0:xn.name)},Z.push({key:"name",contents:Ka});const $t=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),tableId:H==null?void 0:H.id,type:"data"}});let Tn;if(((Vn=(He=$t==null?void 0:$t.data)==null?void 0:He.result)==null?void 0:Vn.length)>0&&((Yn=(jn=Z==null?void 0:Z.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:jn.contents)!=null&&Yn.every(Fe=>!(Fe!=null&&Fe.columnPath))))if(Tn=(lr=(Jn=$t==null?void 0:$t.data)==null?void 0:Jn.result)==null?void 0:lr.map(Fe=>{var Oe;let Ue=[];return Ue.push({id:Fe==null?void 0:Fe.id}),Ue.push((Oe=Fe==null?void 0:Fe.value)==null?void 0:Oe.tableData),Ue}),Z.push({key:"tableContents",contents:Ii(Tn,(Ln=(fa=(Xe=(or=H==null?void 0:H.value)==null?void 0:or.pageData)==null?void 0:Xe.compData)==null?void 0:fa.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:Ln.contents)}),Z.push({key:"contentTableId",contents:H==null?void 0:H.id}),Z.push({key:"ownerId",contents:H==null?void 0:H.id}),xa!==""&&(Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Mn}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnPath")),Z.push({key:"columnPath",contents:xa}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(Fe=>(Fe==null?void 0:Fe.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(Fe=>(Fe==null?void 0:Fe.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:zr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let Fe;Array.isArray((ii=(ni=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ni.contents)==null?void 0:ii[0])?Fe=(ci=gn((fi=(si=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:si.contents)==null?void 0:fi[0]))==null?void 0:ci.map(Ue=>Ue==null?void 0:Ue.prop):Fe=(oi=(li=Z==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:li.contents)==null?void 0:oi.map(Ue=>Ue==null?void 0:Ue.prop),Z==null||Z.forEach(Ue=>{var Oe,Kt;if(((Ue==null?void 0:Ue.key)==="contentTableId"||(Ue==null?void 0:Ue.key)==="ownerId")&&(oe==null||oe.push(Ue)),(Ue==null?void 0:Ue.key)==="header"&&(oe=oe==null?void 0:oe.map(_r=>{var Ke,Qa,et,wt,St,At;return(_r==null?void 0:_r.key)==="header"&&(Array.isArray((Ke=Ue==null?void 0:Ue.contents)==null?void 0:Ke[0])&&(Ue.contents=(Qa=Ue==null?void 0:Ue.contents)==null?void 0:Qa[0]),Array.isArray((et=_r==null?void 0:_r.contents)==null?void 0:et[0])?(_r.contents=(wt=_r.contents)==null?void 0:wt[0],_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=[(St=_r.contents)==null?void 0:St.filter(Wa=>(Wa==null?void 0:Wa.prop)!=="")]):(_r.contents=[..._r==null?void 0:_r.contents,...Ue==null?void 0:Ue.contents],_r.contents=(At=_r.contents)==null?void 0:At.filter(Wa=>(Wa==null?void 0:Wa.prop)!==""))),_r})),(Ue==null?void 0:Ue.key)==="tableContents"){let _r=(Kt=(Oe=Ue==null?void 0:Ue.contents)==null?void 0:Oe.map(Ke=>d0(Ke,Fe)))==null?void 0:Kt.filter(Ke=>{var Qa,et;return!(((Qa=Object.keys(Ke))==null?void 0:Qa.length)===1&&((et=Object.keys(Ke))==null?void 0:et[0])==="id")});oe=oe==null?void 0:oe.map(Ke=>{var Qa,et,wt,St,At,Wa,za,rr,Ze;if((Ke==null?void 0:Ke.key)==="tableContents"){let Mt=[];if((_r==null?void 0:_r.length)===0)Mt=Ke==null?void 0:Ke.contents;else{let ia=(wt=(et=(Qa=de==null?void 0:de.columnPath)==null?void 0:Qa.replace("(",Ir))==null?void 0:et.split(Ir))==null?void 0:wt[1],ga=(St=x0(ia,","))==null?void 0:St.map(Rr=>((Rr==null?void 0:Rr[(Rr==null?void 0:Rr.length)-1])===","&&(Rr=Rr==null?void 0:Rr.slice(0,(Rr==null?void 0:Rr.length)-1)),Rr));ga=(Wa=(At=ga==null?void 0:ga.find(Rr=>Rr==null?void 0:Rr.includes("@Filter")))==null?void 0:At.split("@Filter"))==null?void 0:Wa[1],ga=(za=ga==null?void 0:ga.slice(1,(ga==null?void 0:ga.length)-1))==null?void 0:za.replaceAll("'","");let Ha="";if(ga!=null&&ga.includes("[")){Ha=(rr=ga==null?void 0:ga.split("="))==null?void 0:rr[0];let Rr=(Ze=Ke==null?void 0:Ke.contents)==null?void 0:Ze.map(Lt=>Lt==null?void 0:Lt[Ha]);_r=_r==null?void 0:_r.filter(Lt=>Rr==null?void 0:Rr.find(u0=>(Lt==null?void 0:Lt[Ha])===u0))}_r==null||_r.forEach(Rr=>{var Lt,u0,h0;if(!(!(Ke!=null&&Ke.contents)||((Lt=Ke==null?void 0:Ke.contents)==null?void 0:Lt.length)===0))if(Ha==="")(u0=Ke==null?void 0:Ke.contents)==null||u0.forEach(ze=>{let Je=Object.assign({},Rr,ze);Mt.push(Je)});else{let ze=(h0=Ke==null?void 0:Ke.contents)==null?void 0:h0.find(L0=>(L0==null?void 0:L0[Ha])===(Rr==null?void 0:Rr[Ha])),Je=Object.assign({},Rr,ze);Mt.push(Je)}})}Ke.contents=Mt}return Ke})}})}else{let Fe,Ue=(vi=(gi=(mi=(pi=(di=(xi=(hi=(ui=H==null?void 0:H.value)==null?void 0:ui.pageData)==null?void 0:hi.compData)==null?void 0:xi.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:di.contents)==null?void 0:pi.find(Oe=>Oe==null?void 0:Oe.columnPath))==null?void 0:mi.columnPath)==null?void 0:gi.split("["))==null?void 0:vi[0];if(ls.value!==Ge&&i!==Ge)Fe=await En(Ge,sessionStorage.getItem("systemKey"),"",!1,[],!1,n,Ge);else{let Oe=await sa.getInsofDataApi({key:{pageKey:Ge,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),Kt=(De=($e=(pa=(_i=Oe==null?void 0:Oe.data)==null?void 0:_i.result)==null?void 0:pa.find(Ke=>{var Qa,et,wt,St,At,Wa;return pn((Qa=Ke==null?void 0:Ke.value)==null?void 0:Qa.pageData,zr)&&((wt=(et=H==null?void 0:H.value)==null?void 0:et.pageData)==null?void 0:wt.name)===((At=(St=Ke==null?void 0:Ke.value)==null?void 0:St.pageData)==null?void 0:At.name)||pn((Wa=Ke==null?void 0:Ke.value)==null?void 0:Wa.pageData,Ce)&&Ce!==zr}))==null?void 0:$e.value)==null?void 0:De.pageData;P0=(Za=(sr=(vr=(st=(ve=(ma=(Ye=Kt==null?void 0:Kt.compData)==null?void 0:Ye.find(Ke=>(Ke==null?void 0:Ke.key)==="header"))==null?void 0:ma.contents)==null?void 0:ve.find(Ke=>Ke==null?void 0:Ke.columnPath))==null?void 0:st.columnPath)==null?void 0:vr.replace("(",Ir))==null?void 0:sr.split(Ir))==null?void 0:Za[1],Fe=await En(Ue,sessionStorage.getItem("systemKey"),""),(Fe==null?void 0:Fe.length)>0&&(Fe[0].name=Ce)}Fe==null||Fe.forEach(Oe=>{var Kt,_r,Ke,Qa,et,wt,St,At,Wa,za,rr,Ze,Mt,ia,ga,Ha,Rr,Lt,u0;if(pn(Oe,zr)&&((_r=(Kt=H==null?void 0:H.value)==null?void 0:Kt.pageData)==null?void 0:_r.name)===(Oe==null?void 0:Oe.name)||pn(Oe,Ce)&&Ce!==zr){Z=((Ke=Oe==null?void 0:Oe.compData)==null?void 0:Ke.filter(ze=>(ze==null?void 0:ze.key)!=="tableContents"))||[],Fe=(et=(Qa=Oe==null?void 0:Oe.compData)==null?void 0:Qa.find(ze=>(ze==null?void 0:ze.key)==="tableContents"))==null?void 0:et.contents,Tn=Fe;let h0;if((pn(Oe,zr)&&Ce===zr||pn(Oe,Ce)&&Ce!==zr)&&((St=(wt=e==null?void 0:e.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:wt.contents)==null?void 0:St.length)===2?(Wa=(At=H==null?void 0:H.value)==null?void 0:At.pageData)!=null&&Wa.name1?h0={name:Oe==null?void 0:Oe.name,name0:Oe==null?void 0:Oe.name0,name1:Oe==null?void 0:Oe.name1}:h0={name:Oe==null?void 0:Oe.name,name0:Oe==null?void 0:Oe.name0}:h0={name:(Oe==null?void 0:Oe.name0)||(Oe==null?void 0:Oe.name)},Z.push({key:"name",contents:h0}),Z.push({key:"tableContents",contents:Ii(Tn,(rr=(za=Oe==null?void 0:Oe.compData)==null?void 0:za.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:rr.contents)}),Z.push({key:"contentTableId",contents:(Fe==null?void 0:Fe.length)!==0?((Ze=Oe==null?void 0:Oe.compData)==null?void 0:Ze.id)??(Oe==null?void 0:Oe.id):H==null?void 0:H.id}),Z.push({key:"ownerId",contents:Oe==null?void 0:Oe.id}),xa!==""&&(Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageColumn")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageColumn")),Z.push({key:"pageColumn",contents:Mn}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnPath")),Z.push({key:"columnPath",contents:xa}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="columnUsingPath")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="columnUsingPath")),Z.push({key:"columnUsingPath",contents:cr}),Z!=null&&Z.find(ze=>(ze==null?void 0:ze.key)==="pageGroup")&&(Z=Z==null?void 0:Z.filter(ze=>(ze==null?void 0:ze.key)!=="pageGroup")),Z.push({key:"pageGroup",contents:zr})),(oe==null?void 0:oe.length)===0)oe.push(Z);else{let ze;Array.isArray((ia=(Mt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Mt.contents)==null?void 0:ia[0])?ze=(Rr=gn((Ha=(ga=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:ga.contents)==null?void 0:Ha[0]))==null?void 0:Rr.map(Je=>Je==null?void 0:Je.prop):ze=(u0=(Lt=Z==null?void 0:Z.find(Je=>(Je==null?void 0:Je.key)==="header"))==null?void 0:Lt.contents)==null?void 0:u0.map(Je=>Je==null?void 0:Je.prop),Z==null||Z.forEach(Je=>{var L0,Ec;if(((Je==null?void 0:Je.key)==="contentTableId"||(Je==null?void 0:Je.key)==="ownerId")&&(oe==null||oe.push(Je)),(Je==null?void 0:Je.key)==="header"&&(oe=oe==null?void 0:oe.map(Wr=>{var Xr,qn,Zn,yi,ki,Ei;return(Wr==null?void 0:Wr.key)==="header"&&(Array.isArray((Xr=Je==null?void 0:Je.contents)==null?void 0:Xr[0])&&(Je.contents=(qn=Je==null?void 0:Je.contents)==null?void 0:qn[0]),Array.isArray((Zn=Wr==null?void 0:Wr.contents)==null?void 0:Zn[0])?(Wr.contents=(yi=Wr.contents)==null?void 0:yi[0],Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=[(ki=Wr.contents)==null?void 0:ki.filter(wn=>(wn==null?void 0:wn.prop)!=="")]):(Wr.contents=[...Wr==null?void 0:Wr.contents,...Je==null?void 0:Je.contents],Wr.contents=(Ei=Wr.contents)==null?void 0:Ei.filter(wn=>(wn==null?void 0:wn.prop)!==""))),Wr})),(Je==null?void 0:Je.key)==="tableContents"){let Wr=(Ec=(L0=Je==null?void 0:Je.contents)==null?void 0:L0.map(Xr=>d0(Xr,ze)))==null?void 0:Ec.filter(Xr=>{var qn,Zn;return!(((qn=Object.keys(Xr))==null?void 0:qn.length)===1&&((Zn=Object.keys(Xr))==null?void 0:Zn[0])==="id")});oe=oe==null?void 0:oe.map(Xr=>{var qn,Zn,yi,ki,Ei,wn,Tc,wc,Sc;if((Xr==null?void 0:Xr.key)==="tableContents"){let is=[];if((Wr==null?void 0:Wr.length)===0)is=Xr==null?void 0:Xr.contents;else{let _h=(yi=(Zn=(qn=de==null?void 0:de.columnPath)==null?void 0:qn.replace("(",Ir))==null?void 0:Zn.split(Ir))==null?void 0:yi[1],rt=(ki=x0(_h,","))==null?void 0:ki.map(Qr=>((Qr==null?void 0:Qr[(Qr==null?void 0:Qr.length)-1])===","&&(Qr=Qr==null?void 0:Qr.slice(0,(Qr==null?void 0:Qr.length)-1)),Qr));rt=(wn=(Ei=rt==null?void 0:rt.find(Qr=>Qr==null?void 0:Qr.includes("@Filter")))==null?void 0:Ei.split("@Filter"))==null?void 0:wn[1],rt=(Tc=rt==null?void 0:rt.slice(1,(rt==null?void 0:rt.length)-1))==null?void 0:Tc.replaceAll("'","");let B0="";if(rt!=null&&rt.includes("[")){B0=(wc=rt==null?void 0:rt.split("="))==null?void 0:wc[0];let Qr=(Sc=Xr==null?void 0:Xr.contents)==null?void 0:Sc.map(Sn=>Sn==null?void 0:Sn[B0]);Wr=Wr==null?void 0:Wr.filter(Sn=>Qr==null?void 0:Qr.find(ss=>(Sn==null?void 0:Sn[B0])===ss))}Wr==null||Wr.forEach(Qr=>{var Sn,ss,Ac;if(!(!(Xr!=null&&Xr.contents)||((Sn=Xr==null?void 0:Xr.contents)==null?void 0:Sn.length)===0))if(B0==="")(ss=Xr==null?void 0:Xr.contents)==null||ss.forEach(js=>{let Ys=Object.assign({},Qr,js);is.push(Ys)});else{let js=(Ac=Xr==null?void 0:Xr.contents)==null?void 0:Ac.find(Js=>(Js==null?void 0:Js[B0])===(Qr==null?void 0:Qr[B0])),Ys=Object.assign({},Qr,js);is.push(Ys)}})}Xr.contents=is}return Xr})}})}}})}}})),await Promise.all(Re)}let Lr=[];oe!=null&&oe.every(te=>Array.isArray(te))||(oe=[oe]),oe==null||oe.forEach(te=>{Lr!=null&&Lr.find(H=>{var Z,pe,xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn;return((Sr=(xe=(pe=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:pe[((Z=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)==null?void 0:Sr.name)===((da=(gr=(na=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:na[((Zr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Zr.length)-1])==null?void 0:gr.contents)==null?void 0:da.name)&&((Vr=(Ur=(Or=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Or[((Ar=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Ar.length)-1])==null?void 0:Ur.contents)==null?void 0:Vr.name0)===((jr=(xr=(Gr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Gr[((mr=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:mr.length)-1])==null?void 0:xr.contents)==null?void 0:jr.name0)&&((ln=(cn=(fn=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:fn[((Tt=H==null?void 0:H.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:Tt.length)-1])==null?void 0:cn.contents)==null?void 0:ln.name1)===((xn=(hn=(un=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:un[((on=te==null?void 0:te.filter(He=>(He==null?void 0:He.key)==="name"))==null?void 0:on.length)-1])==null?void 0:hn.contents)==null?void 0:xn.name1)})||Lr.push(te)}),Lr=Lr==null?void 0:Lr.map(te=>{var Z,pe;let H=[];return te==null||te.forEach(xe=>{(xe==null?void 0:xe.key)!=="name"&&H.push(xe)}),H.push((pe=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:pe[((Z=te==null?void 0:te.filter(xe=>(xe==null?void 0:xe.key)==="name"))==null?void 0:Z.length)-1]),H}),oe=Lr==null?void 0:Lr.sort((te,H)=>{var Z,pe,xe,Sr,Zr,na;return((xe=(pe=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:pe[((Z=te==null?void 0:te.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Z.length)-1])==null?void 0:xe.contents)-((na=(Zr=H==null?void 0:H.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Zr[((Sr=H==null?void 0:H.filter(gr=>(gr==null?void 0:gr.key)==="ownerId"))==null?void 0:Sr.length)-1])==null?void 0:na.contents)}),oe=oe==null?void 0:oe.filter(te=>te!==void 0),oe=oe==null?void 0:oe.map(te=>{var Z,pe;let H=(pe=Es((Z=te==null?void 0:te.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:Z.contents))==null?void 0:pe.filter(xe=>xe!=="操作"&&xe);return te=te==null?void 0:te.map(xe=>{var Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn,He,Vn,jn,Yn,Jn,lr,or,Xe,fa,Ln,ni,ii,si,fi,ci,li,oi,ui,hi,xi,di,pi,mi,gi,vi,_i;if((xe==null?void 0:xe.key)==="tableContents"){let pa=[];if((gr=(na=(Zr=(Sr=de==null?void 0:de.columnPath)==null?void 0:Sr.split("@Type"))==null?void 0:Zr[1])==null?void 0:na.toUpperCase())!=null&&gr.includes("MANUAL")){qa==null||qa.forEach(Ye=>{Ye.value.id=Ye==null?void 0:Ye.id,pa.push(Ye==null?void 0:Ye.value)});let $e=[];((Ar=(da=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:da.contents)==null?void 0:Ar.length)<=2&&!Array.isArray((Ur=(Or=te==null?void 0:te.find(Ye=>(Ye==null?void 0:Ye.key)==="header"))==null?void 0:Or.contents)==null?void 0:Ur[0])&&((Vr=xe.contents)==null||Vr.forEach(Ye=>{let ma=(Ye==null?void 0:Ye.length)!==1?d0(Ye,H):Ye==null?void 0:Ye[0];$e.push(ma)}));let De=H==null?void 0:H[0];$e==null||$e.forEach(Ye=>{pa!=null&&pa.find(ma=>(ma==null?void 0:ma[De])===(Ye==null?void 0:Ye[De]))||pa.push(Ye)})}else(fn=(Tt=(jr=x0((xr=(Gr=(mr=de==null?void 0:de.columnPath)==null?void 0:mr.replace("(",Ir))==null?void 0:Gr.split(Ir))==null?void 0:xr[1],","))==null?void 0:jr.find($e=>$e==null?void 0:$e.includes("@FatherSync")))==null?void 0:Tt.toUpperCase())!=null&&fn.includes("YES")?(cn=xe.contents)==null||cn.forEach($e=>{var ma,ve,st;let De=($e==null?void 0:$e.length)!==1?d0($e,H):$e==null?void 0:$e[0],Ye=qa==null?void 0:qa.filter(vr=>(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id));if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Za={};for(let Ka in sr)(sr==null?void 0:sr[Ka])!==void 0&&(Za[Ka]=sr==null?void 0:sr[Ka]);Ye=Za,sr.id=vr==null?void 0:vr.id,pa.push(sr)});else{De.id=((ve=(ma=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ma.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((st=De==null?void 0:De.id)==null?void 0:st.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,pa.push(De)}}):(ln=xe.contents)==null||ln.forEach($e=>{var ma,ve,st;let De=($e==null?void 0:$e.length)!==1?d0($e,H):$e==null?void 0:$e[0],Ye=qa==null?void 0:qa.filter(vr=>{var sr,Za;return(vr==null?void 0:vr.parentId)===(De==null?void 0:De.id)||((sr=vr==null?void 0:vr.id)==null?void 0:sr.toString())===((Za=De==null?void 0:De.id)==null?void 0:Za.toString())});if((Ye==null?void 0:Ye.length)>0)Ye==null||Ye.forEach(vr=>{let sr=Object.assign({},De,vr==null?void 0:vr.value),Za={};for(let Ka in sr)(sr==null?void 0:sr[Ka])!==void 0&&(Za[Ka]=sr==null?void 0:sr[Ka]);Ye=Za,sr.id=vr==null?void 0:vr.id,pa.push(sr)});else{De.id=((ve=(ma=e==null?void 0:e.find(sr=>(sr==null?void 0:sr.key)==="header"))==null?void 0:ma.contents)==null?void 0:ve.length)===2?parseInt(De==null?void 0:De.id):((st=De==null?void 0:De.id)==null?void 0:st.toString())??"undefined";let vr={};for(let sr in De)(De==null?void 0:De[sr])!==void 0&&(vr[sr]=De==null?void 0:De[sr]);De=vr,pa.push(De)}});xe.contents=pa}if((xe==null?void 0:xe.key)==="header"){let pa=Nn==null?void 0:Nn.find(ve=>{var st,vr,sr,Za,Ka,$t,Tn;return(Tn=de==null?void 0:de.columnPath)==null?void 0:Tn.includes(($t=(vr=(st=ve==null?void 0:ve.value)==null?void 0:st.split("%$%"))==null?void 0:vr[0])==null?void 0:$t.slice(0,((Ka=(Za=(sr=ve==null?void 0:ve.value)==null?void 0:sr.split("%$%"))==null?void 0:Za[0])==null?void 0:Ka.length)-1))}),$e=pa==null?void 0:pa.key;if(((on=$e==null?void 0:$e.split("["))==null?void 0:on.length)>2){let ve=mf($e);$e=Th((hn=(un=ve==null?void 0:ve.stringContent)==null?void 0:un.split(","))==null?void 0:hn.filter(st=>st!==""),ve==null?void 0:ve.parentColumns)}else $e=(Vn=(He=(xn=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:xn.replaceAll("[",""))==null?void 0:He.replaceAll("]",""))==null?void 0:Vn.split(",");let De=(ii=(ni=(Ln=(Jn=(Yn=(jn=pa==null?void 0:pa.value)==null?void 0:jn.split("("))==null?void 0:Yn[0])==null?void 0:Jn.split("["))==null?void 0:Ln[((fa=(Xe=(or=(lr=pa==null?void 0:pa.value)==null?void 0:lr.split("("))==null?void 0:or[0])==null?void 0:Xe.split("["))==null?void 0:fa.length)-1])==null?void 0:ni.split("]"))==null?void 0:ii[0],Ye=(ci=(fi=(si=De==null?void 0:De.replaceAll("'",""))==null?void 0:si.split(","))==null?void 0:fi.filter(ve=>ve==null?void 0:ve.includes('"')))==null?void 0:ci.map(ve=>ve==null?void 0:ve.replaceAll('"',""));De=(oi=(li=De==null?void 0:De.replaceAll("'",""))==null?void 0:li.replaceAll('"',""))==null?void 0:oi.split(","),Array.isArray($e)||($e=(xi=(hi=(ui=$e==null?void 0:$e.replaceAll("'",""))==null?void 0:ui.replaceAll("[",""))==null?void 0:hi.replaceAll("]",""))==null?void 0:xi.split(","));let ma=((pi=(di=xe.contents)==null?void 0:di.find(ve=>ve==null?void 0:ve.menuId))==null?void 0:pi.menuId)??((vi=(gi=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:gi[((mi=te==null?void 0:te.filter(ve=>(ve==null?void 0:ve.key)==="contentTableId"))==null?void 0:mi.length)-1])==null?void 0:vi.contents);xe.contents=(_i=xe.contents)==null?void 0:_i.map(ve=>{var st,vr,sr,Za,Ka,$t,Tn,Fe,Ue,Oe,Kt,_r,Ke,Qa,et,wt,St,At,Wa;if(Array.isArray(ve)){(st=gn(ve))!=null&&st.every(Ze=>!(Ze!=null&&Ze.menuId))&&(ma=((sr=(vr=gn(ve))==null?void 0:vr.find(Ze=>Ze==null?void 0:Ze.menuId))==null?void 0:sr.menuId)??ma,ve=ve==null?void 0:ve.map((Ze,Mt)=>{var ia,ga;return Mt===0?Ze!=null&&Ze.children?Ze.children=(ia=Ze.children)==null?void 0:ia.map((Ha,Rr)=>(Rr===0?(Ha.directiveLabel="#isMain",Ha.menuId=ma):(Ha.directiveLabel="",delete Ha.menuId),Ha.relatedValueId=!0,Ha)):(Ze.directiveLabel="#isMain",Ze.menuId=ma):(Ze.directiveLabel="",delete Ze.menuId,Ze.children=(ga=Ze.children)==null?void 0:ga.map(Ha=>(Ha.relatedValueId=!0,Ha))),Ze.relatedValueId=!0,Ze}));let za=($t=(Ka=(Za=de==null?void 0:de.columnPath)==null?void 0:Za.replace("(",Ir))==null?void 0:Ka.split(Ir))==null?void 0:$t[1];za=za==null?void 0:za.slice(0,(za==null?void 0:za.length)-1);let rr=(Tn=x0(za,","))==null?void 0:Tn.map(Ze=>((Ze==null?void 0:Ze[(Ze==null?void 0:Ze.length)-1])===","&&(Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1)),Ze));return ve=Vl(ve,$e,De,de,ma,rr),ve}else if(De!=null&&De.find(za=>za===(ve==null?void 0:ve.prop))){let za=De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop));if($e!=null&&$e.find(rr=>rr==null?void 0:rr.includes('"'))?((Fe=$e==null?void 0:$e[za])!=null&&Fe.includes('"')?(ve.directiveLabel="#isMain",ve.menuId=ma):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0):(Ye==null?void 0:Ye.length)>0&&(Ye!=null&&Ye.find(rr=>rr===(ve==null?void 0:ve.prop))?(ve.directiveLabel="#isMain",ve.menuId=ma):(ve.directiveLabel="",delete ve.menuId),ve.relatedValueId=!0),de!=null&&de.methodContent){let rr=(Oe=(Ue=de==null?void 0:de.methodContent)==null?void 0:Ue.replaceAll('"',""))==null?void 0:Oe.replaceAll("'","");rr!=null&&rr.includes("@")?(rr=rr==null?void 0:rr.slice(0,(rr==null?void 0:rr.length)-1),rr!=null&&rr.includes("@Type")||(rr=rr+",@Type=Auto"),rr!=null&&rr.includes("@Button")||(rr=rr+",@Button=Prop"),rr!=null&&rr.includes("@Extent")||(rr=rr+",@Extent=Row"),rr=rr+")"):rr=rr+"(@Type=Auto,@Button=Prop,@Extent=Row)",ve.methodContent=rr,ve.prop=(ve==null?void 0:ve.prop)+(de==null?void 0:de.columnPathIndex);let Ze=(Ke=(_r=(Kt=de==null?void 0:de.columnPath)==null?void 0:Kt.replace("(",Ir))==null?void 0:_r.split(Ir))==null?void 0:Ke[1];Ze=Ze==null?void 0:Ze.slice(0,(Ze==null?void 0:Ze.length)-1);let Mt=(Qa=x0(Ze,","))==null?void 0:Qa.map(ia=>((ia==null?void 0:ia[(ia==null?void 0:ia.length)-1])===","&&(ia=ia==null?void 0:ia.slice(0,(ia==null?void 0:ia.length)-1)),ia));(et=Mt==null?void 0:Mt.find(ia=>ia==null?void 0:ia.includes("@SonSync")))!=null&&et.includes("Yes")&&(ve.methodId=ma)}ve.label=(Wa=(wt=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:wt.split("."))==null?void 0:Wa[((At=(St=$e==null?void 0:$e[De==null?void 0:De.findIndex(rr=>rr===(ve==null?void 0:ve.prop.replace(/\d+$/,"")))])==null?void 0:St.split("."))==null?void 0:At.length)-1]}return ve})}return xe}),te});let aa=(C=(O=(F=de==null?void 0:de.columnPath)==null?void 0:F.replace("(",Ir))==null?void 0:O.split(Ir))==null?void 0:C[1];if(P0!==""&&(aa=(aa==null?void 0:aa.replaceAll(")",""))+","+P0),aa&&(aa==null?void 0:aa.length)>0){aa=(R=aa.slice(0,(aa==null?void 0:aa.length)-1))==null?void 0:R.replaceAll("'","");let te=(K=x0(aa,","))==null?void 0:K.map(pe=>((pe==null?void 0:pe[(pe==null?void 0:pe.length)-1])===","&&(pe=pe==null?void 0:pe.slice(0,(pe==null?void 0:pe.length)-1)),pe));te=te==null?void 0:te.map(pe=>{let xe=K0==null?void 0:K0.find(Sr=>pe==null?void 0:pe.includes(Sr==null?void 0:Sr.key));if(xe)return{order:xe==null?void 0:xe.order,value:xe==null?void 0:xe.value,content:pe}}),te=te==null?void 0:te.sort((pe,xe)=>(xe==null?void 0:xe.order)-(pe==null?void 0:pe.order));let H=[];oe=oe==null?void 0:oe.map(pe=>(pe=pe==null?void 0:pe.map((xe,Sr)=>{var Zr,na,gr,da;return(xe==null?void 0:xe.key)==="header"&&((Zr=xe==null?void 0:xe.contents)!=null&&Zr.every(Ar=>Array.isArray(Ar))?xe.contents=(na=xe.contents)==null?void 0:na.map(Ar=>{var Or;return H.push({index:Sr,content:(Or=G.cloneDeep(Ar))==null?void 0:Or.filter(Ur=>Ur==null?void 0:Ur.columnPath)}),Ar=Ar==null?void 0:Ar.filter(Ur=>!(Ur!=null&&Ur.columnPath)),Ar}):(H.push({index:Sr,content:(gr=G.cloneDeep(xe.contents))==null?void 0:gr.filter(Ar=>Ar==null?void 0:Ar.columnPath)}),xe.contents=(da=xe.contents)==null?void 0:da.filter(Ar=>!(Ar!=null&&Ar.columnPath)))),xe}),pe)),await(async()=>{var pe,xe,Sr,Zr,na,gr,da,Ar;for(const Or of te??[])if(Or){const Ur=(pe=Or==null?void 0:Or.content)!=null&&pe.includes("@Filter")?"("+((Zr=(Sr=(xe=Or==null?void 0:Or.content)==null?void 0:xe.replace("(",Ir))==null?void 0:Sr.split(Ir))==null?void 0:Zr[1]):(da=(gr=(na=Or==null?void 0:Or.content)==null?void 0:na.replace(":",Ir))==null?void 0:gr.split(Ir))==null?void 0:da[1];oe=await Zl((Or==null?void 0:Or.value)+"('"+JSON.stringify(G.cloneDeep(oe)).replaceAll("'",'"')+"','"+Ur+"','"+((Ar=de==null?void 0:de.columnPath)==null?void 0:Ar.replaceAll("'",""))+"')")??[]}})(),oe=oe==null?void 0:oe.map(pe=>(pe.push({key:"filterAllType",value:te}),pe)),oe=oe==null?void 0:oe.map(pe=>(pe=pe==null?void 0:pe.map((xe,Sr)=>{var Zr,na,gr,da,Ar,Or;if((xe==null?void 0:xe.key)==="header")if((Zr=xe==null?void 0:xe.contents)!=null&&Zr.every(Ur=>Array.isArray(Ur)))xe.contents=(na=xe.contents)==null?void 0:na.map(Ur=>{var Vr,mr,Gr,xr;return H!=null&&H.find(jr=>(jr==null?void 0:jr.index)===Sr)&&((mr=(Vr=H==null?void 0:H.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:Vr.content)==null?void 0:mr.length)>0&&Ur.push((xr=(Gr=H==null?void 0:H.find(jr=>(jr==null?void 0:jr.index)===Sr))==null?void 0:Gr.content)==null?void 0:xr[0]),Ur});else{let Ur=xe.contents;H!=null&&H.find(Vr=>(Vr==null?void 0:Vr.index)===Sr)&&((da=(gr=H==null?void 0:H.find(Vr=>(Vr==null?void 0:Vr.index)===Sr))==null?void 0:gr.content)==null?void 0:da.length)>0&&Ur.push((Or=(Ar=H==null?void 0:H.find(Vr=>(Vr==null?void 0:Vr.index)===Sr))==null?void 0:Ar.content)==null?void 0:Or[0]),xe.contents=Ur}return xe}),pe))}let Br=(J=(j=(V=(Y=Ua==null?void 0:Ua.replaceAll("{",""))==null?void 0:Y.replaceAll("}",""))==null?void 0:V.replace(":",Ir))==null?void 0:j.split(Ir))==null?void 0:J[1];Br!=null&&Br.includes("[")&&(Br=(le=Br==null?void 0:Br.replaceAll("'",'"'))==null?void 0:le.replaceAll(":",","),Br=(_e=u1(Br))==null?void 0:_e.join(","),Br="["+((ge=(ue=(Ee=Br==null?void 0:Br.replaceAll('":"',Rc.value))==null?void 0:Ee.replaceAll(":",Rc.value))==null?void 0:ue.replaceAll("[",""))==null?void 0:ge.replaceAll("]",""))+"]",Gt(Br==null?void 0:Br.replaceAll("'",'"'))&&(Br=JSON.parse(Br==null?void 0:Br.replaceAll("'",'"')),Br!=null&&Br.find(te=>te==="操作")||Br.push("操作")),oe=oe==null?void 0:oe.map(te=>{let H=[],Z=[];return te=te==null?void 0:te.map(pe=>{var xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr;if((pe==null?void 0:pe.key)==="header")if((xe=pe.contents)!=null&&xe.every(mr=>Array.isArray(mr)))pe.contents=(Zr=(Sr=pe.contents)==null?void 0:Sr.map(mr=>{let Gr=vf(mr,Br);return mr=Gr==null?void 0:Gr.contents,H=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],mr}))==null?void 0:Zr.filter(mr=>!((mr==null?void 0:mr.label)==="操作"&&(mr!=null&&mr.relatedValueId)));else{let mr=(gr=(na=pe.contents)==null?void 0:na[0])==null?void 0:gr.menuId,Gr=vf(pe.contents,Br);H=[...new Set(Gr.ids)],Z=[...new Set(Gr.props)],(da=pe.contents)!=null&&da.some(xr=>xr==null?void 0:xr.columnPath)||(pe.contents=(Ar=pe.contents)==null?void 0:Ar.filter(xr=>(Br==null?void 0:Br.find(jr=>{var Tt;return jr===(((Tt=xr==null?void 0:xr.prop)==null?void 0:Tt.replace(/\d+$/,""))||(xr==null?void 0:xr.label))}))&&!((xr==null?void 0:xr.label)==="操作"&&(xr!=null&&xr.relatedValueId))),(Or=pe.contents)!=null&&Or.every(xr=>!(xr!=null&&xr.menuId))&&(pe.contents=(Ur=pe.contents)==null?void 0:Ur.map((xr,jr)=>(jr===0&&(xr.menuId=mr),xr))))}return(pe==null?void 0:pe.key)==="tableContents"&&(H==null?void 0:H.length)>0&&(pe.contents=(Vr=pe.contents)==null?void 0:Vr.map(mr=>{if(Array.isArray(mr))mr=mr==null?void 0:mr.filter((Gr,xr)=>(H==null?void 0:H.find(jr=>jr===xr))||(Gr==null?void 0:Gr.id));else for(let Gr in mr)(Gr==="id"||Z!=null&&Z.find(xr=>xr===Gr))&&(mr==null||mr[Gr]);return mr})),pe}),te}));let Me=[];(Er=(qe=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:qe.contents)!=null&&Er.every(te=>Array.isArray(te))?Me=(tn=($r=(Mr=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Mr.contents)==null?void 0:$r[0])==null?void 0:tn.filter(te=>!(te!=null&&te.columnPath)&&(te==null?void 0:te.label)!=="操作"):Me=f;let M0=Nn==null?void 0:Nn.find(te=>{var H,Z,pe;return(pe=de==null?void 0:de.columnPath)==null?void 0:pe.includes((Z=(H=te==null?void 0:te.value)==null?void 0:H.split("%$%"))==null?void 0:Z[0])});Me&&(Me==null?void 0:Me.length)>0&&(oe=oe==null?void 0:oe.map(te=>(te=te==null?void 0:te.map(H=>{var xe,Sr,Zr,na,gr,da,Ar,Or,Ur,Vr,mr,Gr,xr,jr,Tt,fn,cn,ln,on,un,hn,xn,He,Vn,jn,Yn,Jn;let Z=(Sr=(xe=e==null?void 0:e.find(lr=>(lr==null?void 0:lr.key)==="header"))==null?void 0:xe.contents)==null?void 0:Sr.filter(lr=>lr==null?void 0:lr.columnPath),pe=(Zr=Z==null?void 0:Z[er])!=null&&Zr.columnPathIndex&&((na=Z==null?void 0:Z[er])==null?void 0:na.columnPathIndex)!==""?parseInt((gr=Z==null?void 0:Z[er])==null?void 0:gr.columnPathIndex):0;if((H==null?void 0:H.key)==="header"){if(((da=H==null?void 0:H.contents)==null?void 0:da.length)===0)return H==null?void 0:H.contents;if((((Or=(Ar=M0==null?void 0:M0.key)==null?void 0:Ar.split("["))==null?void 0:Or.length)??0)<=2){if((Ur=H==null?void 0:H.contents)!=null&&Ur.every(lr=>Array.isArray(lr))){if(pe===0)Array.isArray(Me==null?void 0:Me[0])?H.contents=[...(Vr=H.contents)==null?void 0:Vr[0],...Me==null?void 0:Me[0]]:H.contents=[...(mr=H.contents)==null?void 0:mr[0],...Me];else if(Array.isArray(Me==null?void 0:Me[0])){let lr=((Tt=(Gr=Me==null?void 0:Me[0])==null?void 0:Gr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:Tt.slice(pe,(jr=(xr=Me==null?void 0:Me[0])==null?void 0:xr.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作"))==null?void 0:jr.length))??[],or=[...(fn=Me==null?void 0:Me[0])==null?void 0:fn.filter(Xe=>(Xe==null?void 0:Xe.label)!=="操作").slice(0,pe),...(cn=H.contents)==null?void 0:cn[0]];or=[...or,...lr],Array.isArray((ln=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""))==null?void 0:ln[0])?H.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!==""):H.contents=[or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")]}else{let lr=(Me==null?void 0:Me.slice(pe,Me==null?void 0:Me.length))??[],or=[...Me.slice(0,pe),...H.contents];or=[...or,...lr],H.contents=or==null?void 0:or.filter(Xe=>(Xe==null?void 0:Xe.prop)!=="")}H.contents=(on=H.contents)==null?void 0:on.filter(lr=>(lr==null?void 0:lr.prop)!==""),Array.isArray((un=H.contents)==null?void 0:un[0])||(H.contents=[H.contents])}else if(H.contents=(hn=H.contents)==null?void 0:hn.map((lr,or)=>lr),(Z==null?void 0:Z[er])===0)Array.isArray(Me==null?void 0:Me[0])?H.contents=[...H.contents,...Me==null?void 0:Me[0]]:H.contents=[...H.contents,...Me];else{let lr=pe;if(Array.isArray(Me==null?void 0:Me[0])){let or=((He=Me==null?void 0:Me[0])==null?void 0:He.slice(lr,(xn=Me==null?void 0:Me[0])==null?void 0:xn.length))??[],Xe=[...Me==null?void 0:Me[0].slice(0,lr),...H.contents];Xe=[...Xe,...or],Array.isArray((Vn=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""))==null?void 0:Vn[0])?H.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!==""):H.contents=[Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")]}else{let or=(Me==null?void 0:Me.slice(lr,Me==null?void 0:Me.length))??[],Xe=[...Me.slice(0,lr),...H.contents];Xe=[...Xe,...or],H.contents=Xe==null?void 0:Xe.filter(fa=>(fa==null?void 0:fa.prop)!=="")}}if(Array.isArray((jn=H.contents)==null?void 0:jn[0])){const lr=new Map;(Yn=H.contents)==null||Yn[0].forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),H.contents=[...lr.values()],H.contents=[H.contents],H.contents=[(Jn=H.contents)==null?void 0:Jn[0].filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Ln=>Ln.label==="操作")===Xe)]}else{const lr=new Map;H.contents.forEach(or=>{lr.has(or.label)||lr.set(or.label,or)}),H.contents=[...lr.values()],H.contents=H.contents.filter((or,Xe,fa)=>or.label!=="操作"||fa.findIndex(Ln=>Ln.label==="操作")===Xe)}}else{let lr=wh(H.contents,Me);lr!=null&&lr.find(or=>(or==null?void 0:or.label)==="操作")||lr.push({label:"操作"}),H.contents=[lr]}}return(H==null?void 0:H.key)==="relatedFilter"&&(H.index=pe),H}),te)))}f=(Rn=(Pt=(sn=(nn=G.cloneDeep(oe))==null?void 0:nn[0])==null?void 0:sn.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:Pt.contents)==null?void 0:Rn.filter(Re=>!(Re!=null&&Re.columnPath)&&(Re==null?void 0:Re.label)!=="操作"),s=oe}return s==null?void 0:s.filter(er=>er!==void 0)},En=async(e,a,r="",n=!1,t,i,s,f)=>{var v,E,w,S,T,B;let c,l=new WeakMap;s&&(l=s),(!n||!t)&&(c=(v=l[e])==null?void 0:v.filter(I=>{var U,L;return((U=I==null?void 0:I.key)==null?void 0:U.parentTable)===r||((L=I==null?void 0:I.key)==null?void 0:L.type)==="related"})),ql.setPageMapState(l);const o=(E=l[e])==null?void 0:E.filter(I=>{var U;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="structureMethod"}),u=c==null?void 0:c.map(I=>I.id);if(!u)return;let x=(w=l[e])==null?void 0:w.filter(I=>{var U,L,W,M;return((U=I==null?void 0:I.key)==null?void 0:U.type)==="data"&&(u.includes((L=I==null?void 0:I.key)==null?void 0:L.tableId)||u.includes((M=(W=I==null?void 0:I.key)==null?void 0:W.tableId)==null?void 0:M.toString()))});const h=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),d=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");h&&Array.isArray(d)&&d.length>0&&(e!=null&&e.startsWith("/")&&e.substring(1),(S=h==null?void 0:h.pageKey)!=null&&S.startsWith("/")?h.pageKey.substring(1):h==null||h.pageKey);const p=l[e+o1.value]??[];(p==null?void 0:p.length)===0&&(x=Jl(x,!1,l));let m=[];x==null||x.forEach(I=>{var W;const U=Array.isArray(I.value.tableData)?I.value.tableData:[I.value.tableData];U.unshift({id:I.id});const L=(W=I==null?void 0:I.key)==null?void 0:W.tableId;m!=null&&m.find(M=>(M==null?void 0:M.key)===L)?m=m==null?void 0:m.map(M=>((M==null?void 0:M.key)===L&&(M.contents=[...M.contents,U]),M)):m.push({key:L,contents:[U]})});let g=[];const y=await(c==null?void 0:c.map(async(I,U)=>{var se,ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q,q,we,P,Pe,Ie,je,Le,ie,ur,ir,ya,Fa,Et,Ja,ka,$a;let L=I.value.pageData;const W=I==null?void 0:I.id;let M=(se=G.cloneDeep(L==null?void 0:L.compData))==null?void 0:se.filter(Se=>(Se==null?void 0:Se.key)!=="tableContents");if(!(L!=null&&L.orderId)&&typeof L!="string"&&(L.orderId=U),M&&(M!=null&&M.find(Se=>(Se==null?void 0:Se.key)==="header"))&&(!Array.isArray((he=(ne=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ne.contents)==null?void 0:he[0])&&((be=(ce=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:ce.contents)!=null&&be.every(Se=>!(Se!=null&&Se.columnPath)))||Array.isArray((Te=(z=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:z.contents)==null?void 0:Te[0])&&((A=gn((_=(Ae=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))==null?void 0:Ae.contents)==null?void 0:_[0]))!=null&&A.every(Se=>!(Se!=null&&Se.columnPath))))){M=await(M==null?void 0:M.map(async me=>{var Fr,Cr,hr,kr,ha,ra,We,Kr,ta,Ta,ua,fr,wr,Oa,La,Ba,it,bt,Ot,vt,Ct,Rt,Nt,k,N,F,O,C,R,K,Y,V,j,J,le,_e,Ee,ue,ge,qe,Er,Mr,$r,tn,nn,sn,Pt,Rn,er,de,Nn,P0,Pn,zr,Ge;if((me==null?void 0:me.key)==="header"){if(((Fr=me.contents)==null?void 0:Fr.length)===0){let xa=(Cr=M==null?void 0:M.find(oe=>(oe==null?void 0:oe.key)==="relatedFilter"))==null?void 0:Cr.contents,Mn=(hr=xa==null?void 0:xa.split("["))==null?void 0:hr[0],cr=(Kr=(We=(ra=(ha=(kr=xa==null?void 0:xa.replace("[",Ir))==null?void 0:kr.split(Ir))==null?void 0:ha[1])==null?void 0:ra.replace("]",Ir))==null?void 0:We.split(Ir))==null?void 0:Kr[0];cr=(ta=cr==null?void 0:cr.split("["))==null?void 0:ta[0],cr=(fr=(ua=cr==null?void 0:cr.split(":"))==null?void 0:ua[((Ta=cr==null?void 0:cr.split(":"))==null?void 0:Ta.length)-1])==null?void 0:fr.replaceAll("'","");let Ua=((bt=(it=(Ba=(La=(Oa=(wr=l==null?void 0:l[Mn])==null?void 0:wr.find(oe=>{var Dr,Ce;return((Ce=(Dr=oe==null?void 0:oe.value)==null?void 0:Dr.pageData)==null?void 0:Ce.name)===cr}))==null?void 0:Oa.value)==null?void 0:La.pageData)==null?void 0:Ba.compData)==null?void 0:it.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:bt.contents)??[];if(Ua!=null&&Ua.some(oe=>oe==null?void 0:oe.columnPath)){let oe=await En(Mn,a,r,n,t,i,l);Ua=(Ct=(vt=(Ot=oe==null?void 0:oe.find(Dr=>(Dr==null?void 0:Dr.name)===cr))==null?void 0:Ot.compData)==null?void 0:vt.find(Dr=>(Dr==null?void 0:Dr.key)==="header"))==null?void 0:Ct.contents}me.contents=Ua}else if((Nt=(Rt=M==null?void 0:M.find(xa=>(xa==null?void 0:xa.key)==="relatedFilter"))==null?void 0:Rt.contents)!=null&&Nt.length){let xa=(k=M==null?void 0:M.find(Ce=>(Ce==null?void 0:Ce.key)==="relatedFilter"))==null?void 0:k.contents,Mn=(N=xa==null?void 0:xa.split("["))==null?void 0:N[0],cr=(K=(R=(C=(O=(F=xa==null?void 0:xa.replace("[",Ir))==null?void 0:F.split(Ir))==null?void 0:O[1])==null?void 0:C.replace("]",Ir))==null?void 0:R.split(Ir))==null?void 0:K[0],Ua=(j=(V=(Y=cr==null?void 0:cr.split("["))==null?void 0:Y[1])==null?void 0:V.replaceAll("'",""))==null?void 0:j.split(",");cr=(J=cr==null?void 0:cr.split("["))==null?void 0:J[0],cr=((Ee=(_e=cr==null?void 0:cr.split(":"))==null?void 0:_e[((le=cr==null?void 0:cr.split(":"))==null?void 0:le.length)-1])==null?void 0:Ee.replaceAll("'",""))===""?(qe=(ge=cr==null?void 0:cr.split(":"))==null?void 0:ge[((ue=cr==null?void 0:cr.split(":"))==null?void 0:ue.length)-2])==null?void 0:qe.replaceAll("'",""):($r=(Mr=cr==null?void 0:cr.split(":"))==null?void 0:Mr[((Er=cr==null?void 0:cr.split(":"))==null?void 0:Er.length)-1])==null?void 0:$r.replaceAll("'","");let oe=((er=(Rn=(Pt=(sn=(nn=(tn=l==null?void 0:l[Mn])==null?void 0:tn.find(Ce=>{var Ca,qa;return((qa=(Ca=Ce==null?void 0:Ce.value)==null?void 0:Ca.pageData)==null?void 0:qa.name)===cr}))==null?void 0:nn.value)==null?void 0:sn.pageData)==null?void 0:Pt.compData)==null?void 0:Rn.find(Ce=>(Ce==null?void 0:Ce.key)==="header"))==null?void 0:er.contents)??[];if(oe!=null&&oe.some(Ce=>Ce==null?void 0:Ce.columnPath)){let Ce=await En(Mn,a,r,n,t,i,l);oe=(P0=(Nn=(de=Ce==null?void 0:Ce.find(Ca=>(Ca==null?void 0:Ca.name)===cr))==null?void 0:de.compData)==null?void 0:Nn.find(Ca=>(Ca==null?void 0:Ca.key)==="header"))==null?void 0:P0.contents}(Ua==null?void 0:Ua.length)>0&&(oe=oe==null?void 0:oe.filter(Ce=>Ua==null?void 0:Ua.find(Ca=>Ca===(Ce==null?void 0:Ce.prop))));let Dr=(Pn=M==null?void 0:M.find(Ce=>(Ce==null?void 0:Ce.key)==="relatedFilter"))==null?void 0:Pn.index;if(Dr!==""){Dr=parseInt(Dr);let Ce=((zr=me.contents)==null?void 0:zr.slice(Dr,me.contents.length))??[],Ca=[...(Ge=me.contents)==null?void 0:Ge.slice(0,Dr),...oe];Ca=[...Ca,...Ce],me.contents=Ca}}}return me})),M=await Promise.all(M);const Se=((D=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="contentTableId"))==null?void 0:D.contents)??I.id;let Ne=Ii((b=m==null?void 0:m.find(me=>(me==null?void 0:me.key)===Se))==null?void 0:b.contents,(X=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:X.contents),Be=await D1((re=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:re.contents,e,(ee=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="tableFilter"))==null?void 0:ee.contents,l);if((q=(Q=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Q.contents)!=null&&q.find(me=>(me==null?void 0:me.filterContent)&&(me==null?void 0:me.filterContent)!=="")){let me=(Pe=(P=(we=M==null?void 0:M.find(hr=>(hr==null?void 0:hr.key)==="header"))==null?void 0:we.contents)==null?void 0:P.find(hr=>(hr==null?void 0:hr.filterContent)&&(hr==null?void 0:hr.filterContent)!==""))==null?void 0:Pe.filterContent;me=(Ie=me==null?void 0:me.slice(1,(me==null?void 0:me.length)-1))==null?void 0:Ie.split(",");let Fr=me==null?void 0:me.map(hr=>{var ha,ra;let kr=K0==null?void 0:K0.find(We=>hr==null?void 0:hr.includes(We==null?void 0:We.key));if(kr)return{order:kr==null?void 0:kr.order,value:kr==null?void 0:kr.value,content:(ra=(ha=hr==null?void 0:hr.replaceAll("/",":"))==null?void 0:ha.replaceAll(":","="))==null?void 0:ra.replace("=",":")}});M!=null&&M.every(hr=>Array.isArray(hr))||(M=[M]),await(async()=>{var hr,kr,ha;for(const ra of Fr??[])if(ra){const We=(ha=(kr=(hr=ra==null?void 0:ra.content)==null?void 0:hr.replace(":",Ir))==null?void 0:kr.split(Ir))==null?void 0:ha[1];M=await Zl((ra==null?void 0:ra.value)+"('"+JSON.stringify(M).replaceAll("'",'"')+"','"+We+"','')")??[]??M}})(),M=M==null?void 0:M[0]}Be!=null&&Be.mainKeys&&M.push({key:"mainRouters",contents:Be==null?void 0:Be.mainKeys});let Ea=[],Qe=[];Array.isArray(Be)&&(Ea=Ii(Be,(je=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:je.contents)),Array.isArray(Be==null?void 0:Be.tableContents)&&(Qe=Ii(Be==null?void 0:Be.tableContents,(Le=M==null?void 0:M.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:Le.contents));let br=[...Ea,...Qe];Array.isArray(Ne)&&(Ne==null?void 0:Ne.length)>0&&(br=[...br,...Ne]),M.push({key:"tableContents",contents:br}),M=M==null?void 0:M.map(me=>{var Fr,Cr;return(me==null?void 0:me.key)==="header"&&((Fr=me.contents)==null?void 0:Fr.length)!==0&&(me.contents=(Cr=me.contents)==null?void 0:Cr.map(hr=>((hr==null?void 0:hr.prop)===(Be==null?void 0:Be.mainKey)&&(hr.isMainKey=!0),hr))),me})}else M&&((ie=M==null?void 0:M.find(Se=>(Se==null?void 0:Se.key)==="header"))!=null&&ie.contents)&&(M=await h1(G.cloneDeep(M),W,c,l,e,f),M!=null&&M.every(Se=>Array.isArray(Se))||(M=[M]));if(typeof L!="string"&&(L.id=I==null?void 0:I.id,L.isShow=(ir=(ur=I==null?void 0:I.value)==null?void 0:ur.pageData)==null?void 0:ir.isShow),(M==null?void 0:M.length)>0&&M.every(Se=>Array.isArray(Se)))M==null||M.forEach(Se=>{var Ea,Qe,br,me,Fr;let Ne=G.cloneDeep(L);Ne.compData=Se,Ne.tableId=(Ea=Se==null?void 0:Se.find(Cr=>(Cr==null?void 0:Cr.key)==="contentTableId"))==null?void 0:Ea.contents;let Be=(Qe=Se==null?void 0:Se.find(Cr=>(Cr==null?void 0:Cr.key)==="name"))==null?void 0:Qe.contents;Be!=null&&Be.name0&&(Be==null?void 0:Be.name0)===(Ne==null?void 0:Ne.name)?(Ne.name0=Ne.name,Ne.name=Be==null?void 0:Be.name):Be!=null&&Be.name0&&(Ne.name1=Ne.name,Ne.name0=Be.name0,Ne.name=Be==null?void 0:Be.name),(br=Ne==null?void 0:Ne.compData)!=null&&br.every(Cr=>Array.isArray(Cr))?((me=Ne==null?void 0:Ne.compData)==null?void 0:me.length)===0?g.push(Ne):(Fr=Ne==null?void 0:Ne.compData)==null||Fr.forEach((Cr,hr)=>{let kr;hr===0?kr={comp:Ne==null?void 0:Ne.comp,compData:Cr,id:Ne==null?void 0:Ne.id,name:Ne==null?void 0:Ne.name,isShow:Ne==null?void 0:Ne.isShow}:kr={comp:Ne==null?void 0:Ne.comp,compData:Cr,id:Ne==null?void 0:Ne.id,name:"",isShow:Ne==null?void 0:Ne.isShow},g.push(kr)}):g.push(Ne)});else if(((ya=I.key)==null?void 0:ya.type)==="structure")L.compData=M,(Fa=L==null?void 0:L.compData)!=null&&Fa.every(Se=>Array.isArray(Se))?((Et=L==null?void 0:L.compData)==null?void 0:Et.length)===0?g.push(L):(Ja=L==null?void 0:L.compData)==null||Ja.forEach((Se,Ne)=>{let Be;Ne===0?Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:L==null?void 0:L.name,isShow:L==null?void 0:L.isShow}:Be={comp:L==null?void 0:L.comp,compData:Se,id:L==null?void 0:L.id,name:"",isShow:L==null?void 0:L.isShow},g.push(Be)}):g.push(L);else if(((ka=I.key)==null?void 0:ka.type)==="method"){let Se;Se={name:"",compData:[L],comp:"calculator"},g.push(Se)}else if((($a=I==null?void 0:I.key)==null?void 0:$a.type)==="related"){let Se;Se={name:"",compData:L,comp:""},g.push(Se)}}));return await Promise.all(y),((T=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:T.filter(I=>Object.values(I).length>0).length)>0&&g.push({comp:"methodButton",name:"",compData:(B=o==null?void 0:o.map(I=>I.value.pageData))==null?void 0:B.filter(I=>Object.values(I).length>0)}),g=g.sort((I,U)=>I.orderId-U.orderId),g=await Qh(g),i?g:await Vh(e,g)},x1=async()=>{var e,a;try{let r=((e=Nc.value)==null?void 0:e.platform)||"browser";const n=((a=Nc.value)==null?void 0:a.chineseName)||"工业软件建模与开发系统";r!=="browser"&&r!=="client"&&r!=="three"&&(r="browser"),gf.setPlatform(r),gf.setPlatName(n)}catch(r){return Promise.reject(r)}},z0=zl.ref(0),d1=G.useMenuState(G.pinia),p1=f0(G.pinia),{originalPath:_f}=G.storeToRefs(p1),m1=G.useLoginState(G.pinia),g1=Bs(G.pinia),{multipleTableConst:ot}=G.storeToRefs(g1),{loginUserInfo:m0}=G.storeToRefs(m1),{activeMenuPath:v1}=G.storeToRefs(d1),_1=G.useModelComp(G.pinia),{pageMapState:Ts}=G.storeToRefs(_1),Qt=_f.value,U0="/",ws=(e,a,r)=>e==null?void 0:e.map(t=>{var i;return z0.value++,Array.isArray(t)?ws(t,a):{label:(t==null?void 0:t.label)==="操作"?a?"操作":"":(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+z0.value,width:(t==null?void 0:t.label)==="操作"?"200":t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!1,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??z0.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:ws(t.children,a)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(i=t==null?void 0:t.groupSelect)==null?void 0:i.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel),allSelectionContents:(t==null?void 0:t.allContents)??[],selectFilter:t==null?void 0:t.selectFilter,menuId:t==null?void 0:t.menuId,relatedValueId:t==null?void 0:t.relatedValueId,filterContent:t==null?void 0:t.filterContents,menus:t==null?void 0:t.menus,groups:t==null?void 0:t.groups,words:t==null?void 0:t.words,isExistChild:(t==null?void 0:t.isExistChild)??!1,mainKey:(t==null?void 0:t.mainKey)??!1,filter:t==null?void 0:t.filter,bindMenus:t==null?void 0:t.bindMenus,fatherPath:t==null?void 0:t.fatherPath,isMainPath:t==null?void 0:t.isMainPath,required:(t==null?void 0:t.required)??!1,functionName:t==null?void 0:t.functionName,functionRelatedWords:t==null?void 0:t.functionRelatedWords,calculatorFilter:t==null?void 0:t.calculatorFilter}}),y1=e=>{const a=[];function r(n){if(Array.isArray(n))for(const t of n)!t.children||t.children.length===0?a.push(t):r(t.children)}return r(e),a},k1=(e,a,r)=>G.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(i=>{var s,f,c;return(f=(s=v1.value)==null?void 0:s.split("/"))==null||f.forEach(l=>{var o,u,x;l!==""&&((x=(u=(o=l==null?void 0:l.split(_f+"updateLoading"))==null?void 0:o[0])==null?void 0:u.split(_f+"loading"))==null||x[0])}),Array.isArray(i)?i=ws(i,a):(i={label:(i==null?void 0:i.label)==="操作"?a?"操作":"":(i==null?void 0:i.label)??"",prop:(i==null?void 0:i.label)==="操作"?"operate":(i==null?void 0:i.prop)??"a"+z0.value,width:(i==null?void 0:i.label)==="操作"?"200":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)??z0.value,type:(i==null?void 0:i.label)==="操作"?"operate":void 0,formType:(i==null?void 0:i.formType)??(i!=null&&i.groupSelect?"Select":""),isHidden:i==null?void 0:i.isHidden,options:(i==null?void 0:i.options)??[],children:ws(i.children,a),formMenuSelect:(i==null?void 0:i.formMenuSelect)??[],groupSelect:i!=null&&i.groupSelect?(c=i==null?void 0:i.groupSelect)==null?void 0:c.replaceAll('"',"").split(":"):[],isMainKey:(i==null?void 0:i.isMainKey)||!!(i!=null&&i.directiveLabel),allSelectionContents:(i==null?void 0:i.allContents)??[],selectFilter:i==null?void 0:i.selectFilter,menuId:i==null?void 0:i.menuId,relatedValueId:i==null?void 0:i.relatedValueId,filterContent:i==null?void 0:i.filterContents,menus:i==null?void 0:i.menus,groups:i==null?void 0:i.groups,words:i==null?void 0:i.words,isExistChild:(i==null?void 0:i.isExistChild)??!1,mainKey:(i==null?void 0:i.mainKey)??!1,filter:i==null?void 0:i.filter,bindMenus:i==null?void 0:i.bindMenus,fatherPath:i==null?void 0:i.fatherPath,isMainPath:i==null?void 0:i.isMainPath,required:(i==null?void 0:i.required)??!1,functionName:i==null?void 0:i.functionName,functionRelatedWords:i==null?void 0:i.functionRelatedWords,calculatorFilter:i==null?void 0:i.calculatorFilter},z0.value++),i})),t)),gn=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(r==null||r.forEach(s=>{var f,c,l,o,u,x,h,d,p,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(c=s==null?void 0:s.prop)==null?void 0:c.split(ot.value))==null?void 0:u[((o=(l=s==null?void 0:s.prop)==null?void 0:l.split(ot.value))==null?void 0:o.length)-1]):t+ot.value+((p=(x=s==null?void 0:s.prop)==null?void 0:x.split(ot.value))==null?void 0:p[((d=(h=s==null?void 0:s.prop)==null?void 0:h.split(ot.value))==null?void 0:d.length)-1]);i=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ot.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ot.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ot.value))==null?void 0:y.length)-1])),i.push(s)})),i}return a(e)},E1=e=>{function a(r,n=[],t=""){if(!r||r.length===0)return[];let i=n;return Array.isArray(r)&&(i=r==null?void 0:r.map(s=>{var f,c,l,o,u,x,h,d,p,m,g,y,v;if(s!=null&&s.children&&((f=s.children)==null?void 0:f.length)>0){let E=t===""?t+((u=(c=s==null?void 0:s.prop)==null?void 0:c.split(ot.value))==null?void 0:u[((o=(l=s==null?void 0:s.prop)==null?void 0:l.split(ot.value))==null?void 0:o.length)-1]):t+ot.value+((p=(x=s==null?void 0:s.prop)==null?void 0:x.split(ot.value))==null?void 0:p[((d=(h=s==null?void 0:s.prop)==null?void 0:h.split(ot.value))==null?void 0:d.length)-1]);s.children=a(s==null?void 0:s.children,i,E)}else t!==""&&(s.prop=t+ot.value+((v=(m=s==null?void 0:s.prop)==null?void 0:m.split(ot.value))==null?void 0:v[((y=(g=s==null?void 0:s.prop)==null?void 0:g.split(ot.value))==null?void 0:y.length)-1]));return s})),i}return a(e)},T1=e=>{let a=G.cloneDeep(e);return a=a==null?void 0:a.map(r=>((r==null?void 0:r.type)==="Select"?r={label:r==null?void 0:r.label,prop:r==null?void 0:r.prop,name:r==null?void 0:r.name,type:r==null?void 0:r.type,value:(r==null?void 0:r.value)??"",optionUrl:{groupSelect:r==null?void 0:r.groupSelect,menuSelect:r==null?void 0:r.menuSelect,type:"Select",selectRelateType:r==null?void 0:r.selectRelateType,multiple:r==null?void 0:r.multiple}}:(r==null?void 0:r.type)==="Date"&&(r.value=!(r!=null&&r.value)&&(r==null?void 0:r.isNewDate)!==!1?new Date:r==null?void 0:r.value),r.label=r.prop||r.label,r)),a},Ql=e=>{var a,r,n,t,i,s;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let f=(n=(r=e==null?void 0:e.pageData)==null?void 0:r.compData)==null?void 0:n.map(l=>{var o;return(l==null?void 0:l.key)==="formContent"&&(l.contents=(o=l.contents)==null?void 0:o.map(u=>((u==null?void 0:u.type)==="Date"&&(u.value=""),u))),l});return{pageData:{comp:(t=e==null?void 0:e.pageData)==null?void 0:t.comp,compData:f,name:(i=e==null?void 0:e.pageData)==null?void 0:i.name,isShow:(s=e==null?void 0:e.pageData)==null?void 0:s.isShow}}}else return e},eo=(e,a)=>{var n,t,i,s,f,c,l,o,u;let r=(i=(t=(n=a==null?void 0:a.pageData)==null?void 0:n.compData)==null?void 0:t.find(x=>(x==null?void 0:x.key)==="formContent"))==null?void 0:i.contents;if(((s=e==null?void 0:e.pageData)==null?void 0:s.comp)==="Form"){let x=(c=(f=e==null?void 0:e.pageData)==null?void 0:f.compData)==null?void 0:c.map(d=>{var p;return(d==null?void 0:d.key)==="formContent"&&(d.contents=(p=d.contents)==null?void 0:p.map(m=>{var g;return m.value=(g=r==null?void 0:r.find(y=>(y==null?void 0:y.key)===(m==null?void 0:m.key)))==null?void 0:g.value,m})),d});return{pageData:{comp:(l=e==null?void 0:e.pageData)==null?void 0:l.comp,compData:x,name:(o=e==null?void 0:e.pageData)==null?void 0:o.name,isShow:(u=e==null?void 0:e.pageData)==null?void 0:u.isShow}}}else return e},Rf=async(e,a,r,n,t)=>{var p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==Qt&&(i="",(m=(p=G.cloneDeep(e))==null?void 0:p.split(Qt))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=G.cloneDeep(e))==null?void 0:D.split(Qt))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+Qt);let s=[],f=await sa.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let l;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==Qt&&(l={data:{result:(v=Ts.value[i])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=l==null?void 0:l.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(l=(T=(S=G.cloneDeep(l))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=Ts.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==Qt){let _=(L=c==null?void 0:c.data)==null?void 0:L.result;if(!Array.isArray(l))return;l==null||l.forEach(A=>{var b,X,re,ee,Q;let D=(b=_==null?void 0:_.find(q=>{var we,P,Pe,Ie;return((P=(we=A==null?void 0:A.value)==null?void 0:we.pageData)==null?void 0:P.name)===((Ie=(Pe=q==null?void 0:q.value)==null?void 0:Pe.pageData)==null?void 0:Ie.name)}))==null?void 0:b.value;D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((X=D==null?void 0:D.key)==null?void 0:X.parentTable)??"",systemKey:(re=A==null?void 0:A.key)==null?void 0:re.systemKey,type:((ee=D==null?void 0:D.key)==null?void 0:ee.type)??((Q=A==null?void 0:A.key)==null?void 0:Q.type),version:1},value:eo(A==null?void 0:A.value,D)})})}else(M=(W=c==null?void 0:c.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:Ql(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D,b;return((D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null?void 0:D.comp)==="Form"&&(_.value.pageData.compData=(b=_.value.pageData.compData)==null?void 0:b.map(X=>{var re;return(X==null?void 0:X.key)==="formContent"&&(X.contents=(re=X.contents)==null?void 0:re.map(ee=>(r!=null&&r[ee==null?void 0:ee.key]&&(ee==null?void 0:ee.type)!=="Date"&&(ee.value=r[ee.key]),ee))),X}),n&&_.value.pageData.compData.push({key:"parentFormPath",contents:n})),_}),(s==null?void 0:s.length)>0){let _;if(!t)_=s;else{const A=s==null?void 0:s.find(b=>{var X,re;return t==null?void 0:t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)}),D=/^[A-Za-z]+$/;_=A?s==null?void 0:s.map(b=>{var X,re,ee,Q,q,we;return t!=null&&t.includes((re=(X=b==null?void 0:b.value)==null?void 0:X.pageData)==null?void 0:re.name)?{...b,value:{pageData:{...(ee=b==null?void 0:b.value)==null?void 0:ee.pageData,compData:(we=(q=(Q=b==null?void 0:b.value)==null?void 0:Q.pageData)==null?void 0:q.compData)==null?void 0:we.map(P=>{var Pe;return(P==null?void 0:P.key)==="formContent"?{...P,contents:(Pe=P==null?void 0:P.contents)==null?void 0:Pe.map(Ie=>D.test(Ie==null?void 0:Ie.prop)?Ie:{...Ie,value:""})}:P})}}}:b}):s}await sa.batchAddInsofDataApi({dataList:_})}let x={};const h=await sa.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=c==null?void 0:c.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=c==null?void 0:c.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b;x[_.id]=(b=(D=(A=h==null?void 0:h.data)==null?void 0:A.result)==null?void 0:D.find(X=>{var re,ee,Q,q;return((ee=(re=X==null?void 0:X.value)==null?void 0:re.pageData)==null?void 0:ee.name)===((q=(Q=_==null?void 0:_.value)==null?void 0:Q.pageData)==null?void 0:q.name)}))==null?void 0:b.id}));let d=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;d.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(d==null?void 0:d.length)>0&&await sa.batchAddInsofDataApi({dataList:d})},w1=async(e,a,r,n,t)=>{var p,m,g,y,v,E,w,S,T,B,I,U,L,W,M,se,ne,he,ce,be,z,Te,Ae;let i=e;(i==null?void 0:i[(i==null?void 0:i.length)-1])!==U0&&(i="",(m=(p=G.cloneDeep(e))==null?void 0:p.split(U0))==null||m.forEach((_,A)=>{var D,b;A!==((b=(D=G.cloneDeep(e))==null?void 0:D.split(U0))==null?void 0:b.length)-1&&(i=i===""?i+_:i+"/"+_)}),i=i+U0);let s=[],f=await sa.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(y=(g=f==null?void 0:f.data)==null?void 0:g.result)==null?void 0:y.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}};let l;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==U0&&(l={data:{result:(v=Ts.value[e])==null?void 0:v.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structure"})}},((w=(E=l==null?void 0:l.data)==null?void 0:E.result)==null?void 0:w.length)>0&&(l=(T=(S=G.cloneDeep(l))==null?void 0:S.data)==null?void 0:T.result));const o={data:{result:(B=Ts.value[i])==null?void 0:B.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="structureMethod"})}},u={data:{result:(U=(I=f==null?void 0:f.data)==null?void 0:I.result)==null?void 0:U.filter(_=>{var A;return((A=_==null?void 0:_.key)==null?void 0:A.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==U0){let _=(L=c==null?void 0:c.data)==null?void 0:L.result;if(!Array.isArray(l))return;l==null||l.forEach(A=>{var b,X,re,ee,Q,q,we,P;let D;(X=(b=A==null?void 0:A.value)==null?void 0:b.pageData)!=null&&X.name0?D=(re=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie,ur,ir,ya,Fa;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)&&((ir=(ur=A==null?void 0:A.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)===((Fa=(ya=Pe==null?void 0:Pe.value)==null?void 0:ya.pageData)==null?void 0:Fa.name0)}))==null?void 0:re.value:D=(ee=_==null?void 0:_.find(Pe=>{var Ie,je,Le,ie;return((je=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:je.name)===((ie=(Le=Pe==null?void 0:Pe.value)==null?void 0:Le.pageData)==null?void 0:ie.name)}))==null?void 0:ee.value,D?D=D:D=void 0,s.push({key:{pageKey:a,parentTable:((Q=D==null?void 0:D.key)==null?void 0:Q.parentTable)??"",systemKey:(q=A==null?void 0:A.key)==null?void 0:q.systemKey,type:((we=D==null?void 0:D.key)==null?void 0:we.type)??((P=A==null?void 0:A.key)==null?void 0:P.type),version:1},value:eo(A==null?void 0:A.value,D)})})}else(M=(W=c==null?void 0:c.data)==null?void 0:W.result)==null||M.forEach(_=>{var A,D,b;s.push({key:{pageKey:a,parentTable:(A=_==null?void 0:_.key)==null?void 0:A.parentTable,systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type,version:1},value:Ql(_==null?void 0:_.value)})});if((ne=(se=o==null?void 0:o.data)==null?void 0:se.result)==null||ne.forEach(_=>{var A,D;s.push({key:{pageKey:a,systemKey:(A=_==null?void 0:_.key)==null?void 0:A.systemKey,type:(D=_==null?void 0:_.key)==null?void 0:D.type,version:1},value:_==null?void 0:_.value})}),s=s==null?void 0:s.map(_=>{var A,D;return(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)==null||D.comp,_}),(s==null?void 0:s.length)>0){let _;_=s,await sa.batchAddInsofDataApi({dataList:_})}let x={};const h=await sa.getInsofDataApi({key:{pageKey:a,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((ce=(he=c==null?void 0:c.data)==null?void 0:he.result)==null?void 0:ce.length)>0&&((z=(be=c==null?void 0:c.data)==null?void 0:be.result)==null||z.forEach(_=>{var A,D,b,X,re,ee,Q,q;(D=(A=_==null?void 0:_.value)==null?void 0:A.pageData)!=null&&D.name0?x[_.id]=(re=(X=(b=h==null?void 0:h.data)==null?void 0:b.result)==null?void 0:X.find(we=>{var P,Pe,Ie,je,Le,ie,ur,ir;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)&&((ie=(Le=we==null?void 0:we.value)==null?void 0:Le.pageData)==null?void 0:ie.name0)===((ir=(ur=_==null?void 0:_.value)==null?void 0:ur.pageData)==null?void 0:ir.name0)}))==null?void 0:re.id:x[_.id]=(q=(Q=(ee=h==null?void 0:h.data)==null?void 0:ee.result)==null?void 0:Q.find(we=>{var P,Pe,Ie,je;return((Pe=(P=we==null?void 0:we.value)==null?void 0:P.pageData)==null?void 0:Pe.name)===((je=(Ie=_==null?void 0:_.value)==null?void 0:Ie.pageData)==null?void 0:je.name)}))==null?void 0:q.id}));let d=[];(Ae=(Te=u==null?void 0:u.data)==null?void 0:Te.result)==null||Ae.forEach(_=>{var A,D,b;d.push({key:{pageKey:a,tableId:x[(A=_==null?void 0:_.key)==null?void 0:A.tableId],systemKey:(D=_==null?void 0:_.key)==null?void 0:D.systemKey,type:(b=_==null?void 0:_.key)==null?void 0:b.type},value:_==null?void 0:_.value})}),(d==null?void 0:d.length)>0&&await sa.batchAddInsofDataApi({dataList:d})},ro=(e,a)=>{let r=G.cloneDeep(e);return r=r==null?void 0:r.map(t=>{var c,l,o;let i=[],s=[];for(let u in a)if(u!=null&&u.includes((l=(c=G.cloneDeep(t))==null?void 0:c.key)==null?void 0:l.pageKey)){let x=(o=a[u])==null?void 0:o.filter(h=>{var d,p,m;return((d=h==null?void 0:h.key)==null?void 0:d.type)==="data"&&((p=h==null?void 0:h.key)==null?void 0:p.tableId)===((m=G.cloneDeep(t))==null?void 0:m.id)});s=[...s,...x]}(s==null?void 0:s.length)>0&&(s==null||s.forEach(u=>{i.push(u.value.tableData)}));let f=G.cloneDeep(t).value.pageData.compData;return f.push({key:"tableContents",contents:i}),t.value.pageData.compData=f,t}),r},ao=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var c;(f==null?void 0:f.key)==="header"&&((c=f==null?void 0:f.contents)==null||c.forEach((l,o)=>{(l==null?void 0:l.prop)===(r==null?void 0:r[1])&&(t=o)}))}))}),t},to=(e,a)=>{if(!(e!=null&&e.includes("[")))return e;let r=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),n=a==null?void 0:a.map(i=>{var s;return(s=i==null?void 0:i.value)==null?void 0:s.pageData}),t="";return n==null||n.forEach(i=>{var s;(i==null?void 0:i.name)===(r==null?void 0:r[0])&&((s=i==null?void 0:i.compData)==null||s.forEach(f=>{var c;(f==null?void 0:f.key)==="formContent"&&((c=f==null?void 0:f.contents)==null||c.forEach(l=>{(l==null?void 0:l.prop)===(r==null?void 0:r[1])&&(t=l==null?void 0:l.value)}))}))}),t},Pc=(e,a,r,n)=>{var c,l,o;let t=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,i=e==null?void 0:e.map(u=>{var x,h;return(h=(x=u.groupSelect)==null?void 0:x.split(":"))==null?void 0:h[1]}),s="";t==null||t.forEach((u,x)=>{(t==null?void 0:t.length)-1!==x?s=s===""?s+u:s+"/"+u:s=s+Qt+u});let f=[];for(let u in a)if(u!=null&&u.includes(s)){let x=(l=a[u])==null?void 0:l.filter(h=>{var d,p;return((d=h==null?void 0:h.key)==null?void 0:d.type)==="structure"&&((p=h==null?void 0:h.key)==null?void 0:p.parentTable)===""});f=[...f,...x]}if((f==null?void 0:f.length)>0){let u=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Form"}),x=f==null?void 0:f.filter(m=>{var g,y,v;return((g=m==null?void 0:m.key)==null?void 0:g.pageKey)!==s&&((v=(y=m==null?void 0:m.value)==null?void 0:y.pageData)==null?void 0:v.comp)==="Table"});x=ro(G.cloneDeep(x),a),u=[...G.cloneDeep(u),...x],u=u==null?void 0:u.map(m=>({[m.key.pageKey]:m}));let h=0;u=u.reduce((m,g)=>(Object.keys(g).forEach(y=>{m[y]||(m[y]=[],m[y].push({index:h})),m[y].push(g[y])}),h++,m),{});let d=(o=Object.values(u))==null?void 0:o.sort((m,g)=>{var E,w;let y=(E=m==null?void 0:m.find(S=>S==null?void 0:S.index))==null?void 0:E.index,v=(w=g==null?void 0:g.find(S=>S==null?void 0:S.index))==null?void 0:w.index;return y-v});u=d==null?void 0:d.map(m=>m==null?void 0:m.filter(g=>{var y,v,E,w;return!(g!=null&&g.index)&&(g==null?void 0:g.index)!==0&&!((v=(y=g==null?void 0:g.key)==null?void 0:y.pageKey)!=null&&v.includes("updateLoading"))&&!((w=(E=g==null?void 0:g.key)==null?void 0:E.pageKey)!=null&&w.includes("loading"))}));let p=[];if(u==null||u.forEach(m=>{var v,E,w,S,T,B,I,U,L,W;const g=m==null?void 0:m.find(M=>{var se,ne,he,ce,be;return((ne=(se=M==null?void 0:M.value)==null?void 0:se.pageData)==null?void 0:ne.name)===((be=(ce=(he=e==null?void 0:e[0])==null?void 0:he.groupSelect)==null?void 0:ce.split(":"))==null?void 0:be[0])});let y=(T=(S=(w=(E=(v=G.cloneDeep(g))==null?void 0:v.value)==null?void 0:E.pageData)==null?void 0:w.compData)==null?void 0:S.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:T.contents;if(y){let M=[];i==null||i.forEach((se,ne)=>{var be,z,Te,Ae,_,A;let he=m==null?void 0:m.find(D=>{var b,X,re,ee,Q;return((X=(b=D==null?void 0:D.value)==null?void 0:b.pageData)==null?void 0:X.name)===((Q=(ee=(re=e==null?void 0:e[ne])==null?void 0:re.groupSelect)==null?void 0:ee.split(":"))==null?void 0:Q[0])}),ce=(_=(Ae=(Te=(z=(be=G.cloneDeep(he))==null?void 0:be.value)==null?void 0:z.pageData)==null?void 0:Te.compData)==null?void 0:Ae.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:_.contents;ce!=null&&ce.find(D=>(D==null?void 0:D.key)===se)?M.push((A=ce==null?void 0:ce.find(D=>(D==null?void 0:D.key)===se))==null?void 0:A.value):M.push("")}),p.push(M)}else y=(W=(L=(U=(I=(B=G.cloneDeep(g))==null?void 0:B.value)==null?void 0:I.pageData)==null?void 0:U.compData)==null?void 0:L.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:W.contents,y==null||y.forEach(M=>{let se=[];i==null||i.forEach(ne=>{M!=null&&M[ne]&&se.push(M==null?void 0:M[ne])}),p.push(se)})}),(r==null?void 0:r.length)>0){let m={};r==null||r.forEach(g=>{var y;for(let v in g){let E=G.cloneDeep(v);if(!(E!=null&&E.includes("[")))(y=g[v])!=null&&y.includes("[")||(m[E]=g[v]);else{let w=to(E,a[n]),S=ao(g[v],a[n]);m[w]=S}}});for(let g in m)p=p==null?void 0:p.filter(y=>y[m[g]]===g)}return p}},S1=(e,a,r,n)=>{var f,c,l,o,u;let t=G.cloneDeep(e),i=a==null?void 0:a.map(x=>x==null?void 0:x.prop),s=[];for(let x in r)if(x!=null&&x.includes(t)){let h=(f=r[x])==null?void 0:f.filter(d=>{var p,m;return((p=d==null?void 0:d.key)==null?void 0:p.type)==="structure"&&((m=d==null?void 0:d.key)==null?void 0:m.parentTable)===""});s=[...s,...h]}if((s==null?void 0:s.length)>0){let x=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(t+Qt))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))}),h=s==null?void 0:s.filter(E=>{var w,S,T,B;return((w=E==null?void 0:E.key)==null?void 0:w.pageKey)!==t&&((T=(S=E==null?void 0:E.value)==null?void 0:S.pageData)==null?void 0:T.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(t+Qt))&&!((B=E==null?void 0:E.key.pageKey)!=null&&B.includes("@"))});h=ro(G.cloneDeep(h),r),x=[...G.cloneDeep(x),...h],x=x==null?void 0:x.map(E=>({[E.key.pageKey]:E}));let d=0;x=x.reduce((E,w)=>(Object.keys(w).forEach(S=>{E[S]||(E[S]=[],E[S].push({index:d})),E[S].push(w[S])}),d++,E),{}),x=Jl(x,!0,r);let p=(c=Object.values(x))==null?void 0:c.sort((E,w)=>{var B,I;let S=(B=E==null?void 0:E.find(U=>U==null?void 0:U.index))==null?void 0:B.index,T=(I=w==null?void 0:w.find(U=>U==null?void 0:U.index))==null?void 0:I.index;return S-T});x=p==null?void 0:p.map(E=>E==null?void 0:E.filter(w=>!(w!=null&&w.index)&&(w==null?void 0:w.index)!==0));let m=(l=G.cloneDeep(x))==null?void 0:l.filter(E=>E==null?void 0:E.find(w=>{var S,T,B,I;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===Qt}));x=x==null?void 0:x.filter(E=>!(E!=null&&E.find(w=>{var S,T,B,I,U,L,W,M;return((I=(S=w==null?void 0:w.key)==null?void 0:S.pageKey)==null?void 0:I[((B=(T=w==null?void 0:w.key)==null?void 0:T.pageKey)==null?void 0:B.length)-1])===Qt||((L=(U=w==null?void 0:w.key)==null?void 0:U.pageKey)==null?void 0:L.includes("updateLoading"))||((M=(W=w==null?void 0:w.key)==null?void 0:W.pageKey)==null?void 0:M.includes("loading"))})));let g=[],y=[];(o=m==null?void 0:m[0])==null||o.forEach(E=>{var w,S,T,B,I;((S=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:S.comp)==="Form"&&((I=(B=(T=E==null?void 0:E.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||I.forEach(U=>{(U==null?void 0:U.key)==="formContent"&&(y=[...y,...U==null?void 0:U.contents])}))});let v=(u=y==null?void 0:y.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:u.key;if(x==null||x.forEach(E=>{let w=[];E==null||E.forEach(T=>{var B,I,U,L,W;((I=(B=T==null?void 0:T.value)==null?void 0:B.pageData)==null?void 0:I.comp)==="Form"&&((W=(L=(U=T==null?void 0:T.value)==null?void 0:U.pageData)==null?void 0:L.compData)==null||W.forEach(M=>{(M==null?void 0:M.key)==="formContent"&&(w=[...w,...M==null?void 0:M.contents])}))});let S={};i==null||i.forEach(T=>{let B=w==null?void 0:w.find(I=>(I==null?void 0:I.key)===T);B!=null&&B.prop&&(S[B.prop]=(B==null?void 0:B.value)??"")}),g.push(S)}),(n==null?void 0:n.length)>0){let E=[];n==null||n.forEach(w=>{var I,U,L,W,M,se,ne,he,ce;let S={};for(let be in w){let z=G.cloneDeep(be);if(!(z!=null&&z.includes("[")))((I=w[be])==null?void 0:I.toUpperCase())==="@LOGINUSER"?S[z]=((U=m0.value)==null?void 0:U.姓名)||((L=m0.value)==null?void 0:L.account)||((W=m0.value)==null?void 0:W.账号)||((M=m0.value)==null?void 0:M.姓名):(se=w[be])!=null&&se.includes("[")||(S[z]=w[be]);else{let Te=to(z,r[e]),Ae=ao(w[be],r[e]);S[Te]=Ae}}let T=[],B=0;for(let be in S)((ne=S[be])==null?void 0:ne[0])!=="!"?T=(he=B>0?T:g)==null?void 0:he.filter(Te=>Te[be]===S[be]):T=(ce=B>0?T:g)==null?void 0:ce.filter(z=>{var Te;return z[be]!==((Te=S[be])==null?void 0:Te.replaceAll("!",""))}),B=1;E=[...E,...T]}),g=[...new Set(E)]}return g=g==null?void 0:g.map(E=>Object.values(E)),{mainKey:v,tableContents:g}}},A1=(e,a)=>{var t,i,s,f,c,l;let r=(i=(t=G.cloneDeep(e))==null?void 0:t.split("/"))==null?void 0:i[0],n=[];for(let o in a)if(o!=null&&o.includes(r)){let u=(s=a[o])==null?void 0:s.filter(x=>{var h,d;return((h=x==null?void 0:x.key)==null?void 0:h.type)==="structure"&&((d=x==null?void 0:x.key)==null?void 0:d.parentTable)===""});n=[...n,...u]}return(n==null?void 0:n.length)>0?!!((l=(c=(f=n==null?void 0:n.filter(u=>{var x;return((x=u==null?void 0:u.key)==null?void 0:x.pageKey)===r}))==null?void 0:f[0])==null?void 0:c.key)==null?void 0:l.parentPageKey):!0},F1=async(e,a,r,n)=>{var s,f,c,l,o,u,x,h,d;let t=(f=(s=G.cloneDeep(e))==null?void 0:s.split("/"))==null?void 0:f[0],i=[];for(let p in n)if(p!=null&&p.includes(t)){let m=(c=n[p])==null?void 0:c.filter(g=>{var y,v;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="structure"&&((v=g==null?void 0:g.key)==null?void 0:v.parentTable)===""});i=[...i,...m]}if((i==null?void 0:i.length)>0){let p=(u=(o=(l=i==null?void 0:i.filter(y=>{var v;return((v=y==null?void 0:y.key)==null?void 0:v.pageKey)===t}))==null?void 0:l[0])==null?void 0:o.key)==null?void 0:u.parentPageKey,m=[];if(p){for(let y in n)if(y!=null&&y.includes(p)){let v=(x=n[y])==null?void 0:x.filter(E=>{var w,S;return((w=E==null?void 0:E.key)==null?void 0:w.type)==="structure"&&((S=E==null?void 0:E.key)==null?void 0:S.parentTable)===""});m=[...m,...v]}}else m=i;let g="";if((m==null?void 0:m.length)>0){let y=[],v;v=(h=m==null?void 0:m.filter(U=>{var L,W,M,se,ne,he;return((M=(W=(L=U==null?void 0:U.key)==null?void 0:L.pageKey)==null?void 0:W.split("/"))==null?void 0:M[0])===p&&((he=(ne=(se=U==null?void 0:U.key)==null?void 0:se.pageKey)==null?void 0:ne.split("/"))==null?void 0:he.length)===2}))==null?void 0:h.map(U=>{var L;return(L=U==null?void 0:U.key)==null?void 0:L.pageKey}),v=[...new Set(v)],v=v==null?void 0:v.filter(U=>!U.includes(Qt));let E=(d=G.cloneDeep(v))==null?void 0:d.map(async U=>{var ne,he,ce,be,z,Te,Ae,_,A,D,b,X,re,ee,Q;let L=await En(U,sessionStorage.getItem("systemKey"),"",!1,[],!1,n),W=(be=(ce=(he=(ne=G.cloneDeep(L))==null?void 0:ne[0])==null?void 0:he.compData)==null?void 0:ce.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:be.contents,M=(D=(A=(_=(Ae=(Te=(z=G.cloneDeep(L))==null?void 0:z[0])==null?void 0:Te.compData)==null?void 0:Ae.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:_.contents)==null?void 0:A.filter(q=>(q==null?void 0:q.label)!=="操作"))==null?void 0:D.map(q=>q==null?void 0:q.prop),se=[];return(Q=(ee=(re=(X=(b=G.cloneDeep(L))==null?void 0:b[0])==null?void 0:X.compData)==null?void 0:re.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:ee.contents)==null||Q.forEach(q=>{(q==null?void 0:q.isMainKey)===!0&&(g=q==null?void 0:q.prop)}),W==null||W.forEach(q=>{let we=d0(q,M);se.push(we),y.push({key:we==null?void 0:we[g],routerContent:U})}),se}),w=await Promise.all(E),S=[];w==null||w.forEach(U=>{(U==null?void 0:U.length)>0&&(U==null||U.forEach(L=>{S.push(L)}))});let T=[];T=a==null?void 0:a.map(U=>{var W,M,se;let L={};for(let ne in U)U[ne].toUpperCase()==="@LOGINUSER"?L[ne]=((W=m0.value)==null?void 0:W.姓名)||((M=m0.value)==null?void 0:M.account)||((se=m0.value)==null?void 0:se.账号):L[ne]=U[ne];return L});let B=[];S==null||S.forEach(U=>{let L=[];T==null||T.forEach(W=>{let M=[];for(let se in W)M.push(U[se]===W[se]);L.push(M)}),L.find(W=>W==null?void 0:W.every(M=>M===!0))&&B.push(U)});let I=[];return B==null||B.forEach(U=>{let L={};r==null||r.forEach(W=>{L[W.prop]=U[W.prop]??""}),I.push(L)}),I=I==null?void 0:I.map(U=>Object.values(U)),{mainKey:g,tableContents:I,mainKeys:y}}else return}else return},D1=async(e,a,r,n)=>{var i,s,f,c;let t=(i=G.cloneDeep(e))==null?void 0:i.filter(l=>(l==null?void 0:l.label)!=="操作");if((r==null?void 0:r.length)>0&&(t!=null&&t.every(l=>!(l!=null&&l.formMenuSelect)))&&A1(a,n)){let l=await F1(a,r,t,n);return l&&((s=l==null?void 0:l.tableContents)==null?void 0:s.length)>0?l:[]}if(!(t!=null&&t.every(l=>{var o,u,x,h;return((o=l==null?void 0:l.formMenuSelect)==null?void 0:o.length)>0&&((x=(u=l==null?void 0:l.groupSelect)==null?void 0:u.split(":"))==null?void 0:x.length)>0||((h=l==null?void 0:l.formMenuGroup)==null?void 0:h.length)>0})))return S1(a,t,n,r);if(t!=null&&t.every(l=>!(l!=null&&l.formMenuGroup)))return Pc(t,n,r,a);{let l=[];(c=(f=t==null?void 0:t[0])==null?void 0:f.formMenuGroup)==null||c.forEach((h,d)=>{let p=[];t==null||t.forEach(m=>{var g,y,v,E,w,S;p.push({columnPath:m==null?void 0:m.columnPath,formMenuSelect:(v=((g=m==null?void 0:m.formMenuGroup)==null?void 0:g[d])??((y=m==null?void 0:m.formMenuGroup)==null?void 0:y[0]))==null?void 0:v.formMenuSelect,groupSelect:(S=((E=m==null?void 0:m.formMenuGroup)==null?void 0:E[d])??((w=m==null?void 0:m.formMenuGroup)==null?void 0:w[0]))==null?void 0:S.groupSelect,isRoute:m==null?void 0:m.isRoute,label:m==null?void 0:m.label,prop:m==null?void 0:m.label})}),l.push(p)});let o=[],x=l==null?void 0:l.map(async h=>Pc(h,n,r,a));return x==null||x.forEach(h=>{h==null||h.forEach(d=>{o.push(d)})}),o}},I1=f0(G.pinia),{originalPath:no}=G.storeToRefs(I1),b1=G.useUnit(G.pinia),{chooseTitle:Bn}=G.storeToRefs(b1),O1=G.useMenuState(G.pinia),{activeMenuPath:Zs}=G.storeToRefs(O1),C1=e=>e==null?void 0:e.map(r=>(r=so(r),r)),Nf=async()=>{var r,n,t,i,s,f,c,l,o,u,x,h;let e;const a=await sa.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(f=(s=(i=(t=(n=(r=a.data.result)==null?void 0:r[0])==null?void 0:n.value)==null?void 0:t.pageData)==null?void 0:i.compData)==null?void 0:s[0])!=null&&f.contents&&(e=C1((h=(x=(u=(o=(l=(c=a.data.result)==null?void 0:c[0])==null?void 0:l.value)==null?void 0:o.pageData)==null?void 0:u.compData)==null?void 0:x[0])==null?void 0:h.contents)),e},R1=e=>{var n,t,i;const a=(t=(n=e==null?void 0:e.compData)==null?void 0:n.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:t.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:a!=null&&a.every(s=>!Array.isArray(s))?a==null?void 0:a.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label})):(i=gn(a==null?void 0:a[0]))==null?void 0:i.map(s=>({label:s==null?void 0:s.label,value:s==null?void 0:s.label}))}},io=async(e,a)=>{var i,s,f,c,l,o,u,x;let r="";(i=G.cloneDeep(e))==null||i.forEach(h=>{var d;h!=null&&h.includes(":")?(d=h==null?void 0:h.split(":"))==null||d.forEach(p=>{r=r===""?r+p:r+"/"+p}):r=r===""?r+h:r+"/"+h}),(r===""||Zs.value===r)&&((f=(s=Bn==null?void 0:Bn.value)==null?void 0:s[0])!=null&&f.value?r=Zs.value+"/"+((l=(c=Bn==null?void 0:Bn.value)==null?void 0:c[0])==null?void 0:l.value):r=Zs.value);let n="";(o=G.cloneDeep(e))==null||o.forEach((h,d)=>{d!==(e==null?void 0:e.length)-1?n=n===""?n+h:n+"/"+h:n=h===""?n:n+no.value+h}),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((x=(u=Bn==null?void 0:Bn.value)==null?void 0:u[0])==null?void 0:x.value));const t=await En(r,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0);return t||await En(n,sessionStorage.getItem("systemKey"),"",!1,[],!1,void 0)},N1=e=>e.entries().next().done,P1=async e=>{var n,t,i;const a=await io(e);let r=[];return((n=a==null?void 0:a.data)==null?void 0:n.type)==="success"&&(r=(i=(t=a.data.result)==null?void 0:t.map(s=>s.value.pageData))==null?void 0:i.filter(s=>(s==null?void 0:s.comp)==="Table"),r=r==null?void 0:r.map(s=>R1(s))),r},M1=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],D0=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],L1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"},{key:"isFormColHidden",label:"是否隐藏",name:"是否隐藏",type:"radio",options:[{label:"否",value:!1},{label:"是",value:!0}],value:!1}],B1=async()=>{const e=await Nf();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"multiple",label:"多选",default:!1,type:"Switch"},{key:"originalContent",label:"初始值",type:"Select"},{key:"selectRelateType",label:"下拉绑定类型",type:"Select",options:[{label:"关联绑定列",value:"关联绑定列"},{label:"自定义绑定",value:"自定义绑定"}]},{key:"menuSelect",label:"菜单选项",type:"cascader",options:e},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]},{key:"contents",label:"选项值",type:"Input"}]},U1=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await Nf()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],W1=zl.computed(async()=>await B1()),H1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],G1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"value",label:"固定值",type:"Input"}],X1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0},{key:"originalContent",label:"初始值",type:"Input"}],Mc=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0}],$1=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:D0}],K1=[{key:"Input",value:L1},{key:"Select",value:W1},{key:"Date",value:H1},{key:"TextArea",value:X1},{key:"Upload",value:Mc},{key:"DragUpload",value:Mc},{key:"Quill",value:$1},{key:"Link",value:G1}],z1=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],V1=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:z1},{key:"background",label:"颜色",type:"Color"}],j1=e=>{var r,n,t,i,s,f,c,l;let a=G.cloneDeep(e);if(((r=a==null?void 0:a.find(o=>(o==null?void 0:o.name)==="类型"))==null?void 0:r.type)==="Select"&&((i=(t=(n=G.cloneDeep(a))==null?void 0:n.find(o=>(o==null?void 0:o.name)==="选项值"))==null?void 0:t.value)==null?void 0:i.length)>0){const o=(l=(c=(f=(s=G.cloneDeep(a))==null?void 0:s.find(u=>(u==null?void 0:u.name)==="选项值"))==null?void 0:f.value)==null?void 0:c.split(","))==null?void 0:l.map(u=>({label:u,value:u}));a=a==null?void 0:a.map(u=>((u==null?void 0:u.name)==="初始值"&&(u.contents=o,u.value=(u==null?void 0:u.value)??""),u))}return a},so=e=>{var t;let a={};const r=(t=e==null?void 0:e.filter(i=>!Array.isArray(i)))==null?void 0:t[0];a.label=r,a.value=r;const n=e==null?void 0:e.filter(i=>Array.isArray(i));return n&&(n==null?void 0:n.length)>0&&(a.children=n==null?void 0:n.map(i=>so(i))),a},Y1=async e=>{var i,s,f,c;let a=G.cloneDeep(e);const r=(i=e==null?void 0:e.find(l=>(l==null?void 0:l.name)==="下拉绑定类型"))==null?void 0:i.value,n=(s=e==null?void 0:e.find(l=>(l==null?void 0:l.name)==="类型"))==null?void 0:s.value,t=await U1();return n==="Select"&&r===""?a=a==null?void 0:a.filter(l=>(l==null?void 0:l.name)!=="菜单选项"&&(l==null?void 0:l.name)!=="组信息选项"&&(l==null?void 0:l.name)!=="选项值"):n==="Select"&&r==="关联绑定列"?a!=null&&a.find(l=>(l==null?void 0:l.name)==="菜单选项"||(l==null?void 0:l.name)==="组信息选项")?a=(f=G.cloneDeep(a))==null?void 0:f.filter(l=>(l==null?void 0:l.name)!=="选项值"):a=[...G.cloneDeep(a),...t].filter(l=>(l==null?void 0:l.name)!=="选项值"):n==="Select"&&r==="自定义绑定"&&(a!=null&&a.find(l=>(l==null?void 0:l.name)==="选项值")?a=(c=G.cloneDeep(a))==null?void 0:c.filter(l=>(l==null?void 0:l.name)!=="菜单选项"&&(l==null?void 0:l.name)!=="组信息选项"):a=[...G.cloneDeep(a),...t].filter(l=>(l==null?void 0:l.name)!=="菜单选项"&&(l==null?void 0:l.name)!=="组信息选项")),a},J1=(e,a)=>{var n;let r=!1;return(n=G.cloneDeep(e))==null||n.forEach(t=>{var i;(t==null?void 0:t.key)==="formContent"&&((i=t==null?void 0:t.contents)==null||i.forEach(s=>{(s==null?void 0:s.key)===a?r=!0:r=r}))}),r},fo=(e,a)=>{var s,f,c,l,o;const r=G.cloneDeep(e);if(!r)return;let n="";(f=(s=G.cloneDeep(r))==null?void 0:s.menuSelect)==null||f.forEach(u=>{u!=null&&u.includes("[")?n=n+no.value:n=n===""?n+u:n+"/"+u});const t=(c=a==null?void 0:a[n])==null?void 0:c.map(u=>{var x;return(x=u==null?void 0:u.value)==null?void 0:x.pageData});let i=t==null?void 0:t.filter(u=>{var x,h;return(u==null?void 0:u.name)===((h=(x=G.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[0])});if((i==null?void 0:i.length)===1?i=i==null?void 0:i[0]:(l=G.cloneDeep(i))==null||l.forEach(u=>{var x,h;(u==null?void 0:u.comp)==="Form"&&J1(u==null?void 0:u.compData,(h=(x=G.cloneDeep(r))==null?void 0:x.groupSelect)==null?void 0:h[1])&&(i=u)}),(i==null?void 0:i.comp)==="Form"){let u="";return(o=i==null?void 0:i.compData)==null||o.forEach(x=>{var h;(x==null?void 0:x.key)==="formContent"&&((h=x==null?void 0:x.contents)==null||h.forEach(d=>{var p,m;(d==null?void 0:d.key)===((m=(p=G.cloneDeep(r))==null?void 0:p.groupSelect)==null?void 0:m[1])&&(d.type==="Select"&&!(d!=null&&d.value)?u=void 0:u=d==null?void 0:d.value)}))}),u}};/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Ss={};Ss.version="0.18.5";var co=1252,q1=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Pf={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Mf=function(e){q1.indexOf(e)!=-1&&(co=Pf[0]=e)};function Z1(){Mf(1252)}var vn=function(e){Mf(e)};function Lf(){vn(1200),Z1()}function Lc(e){for(var a=[],r=0,n=e.length;r<n;++r)a[r]=e.charCodeAt(r);return a}function Q1(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return a.join("")}function lo(e){for(var a=[],r=0;r<e.length>>1;++r)a[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return a.join("")}var Ai=function(e){var a=e.charCodeAt(0),r=e.charCodeAt(1);return a==255&&r==254?Q1(e.slice(2)):a==254&&r==255?lo(e.slice(2)):a==65279?e.slice(1):e},os=function(a){return String.fromCharCode(a)},Bc=function(a){return String.fromCharCode(a)},yf,r0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Bi(e){for(var a="",r=0,n=0,t=0,i=0,s=0,f=0,c=0,l=0;l<e.length;)r=e.charCodeAt(l++),i=r>>2,n=e.charCodeAt(l++),s=(r&3)<<4|n>>4,t=e.charCodeAt(l++),f=(n&15)<<2|t>>6,c=t&63,isNaN(n)?f=c=64:isNaN(t)&&(c=64),a+=r0.charAt(i)+r0.charAt(s)+r0.charAt(f)+r0.charAt(c);return a}function Xt(e){var a="",r=0,n=0,t=0,i=0,s=0,f=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)i=r0.indexOf(e.charAt(l++)),s=r0.indexOf(e.charAt(l++)),r=i<<2|s>>4,a+=String.fromCharCode(r),f=r0.indexOf(e.charAt(l++)),n=(s&15)<<4|f>>2,f!==64&&(a+=String.fromCharCode(n)),c=r0.indexOf(e.charAt(l++)),t=(f&3)<<6|c,c!==64&&(a+=String.fromCharCode(t));return a}var yr=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),$n=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(a,r){return r?new Buffer(a,r):new Buffer(a)}:Buffer.from.bind(Buffer)}return function(){}}();function t0(e){return yr?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function Uc(e){return yr?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Wt=function(a){return yr?$n(a,"binary"):a.split("").map(function(r){return r.charCodeAt(0)&255})};function Us(e){if(typeof ArrayBuffer>"u")return Wt(e);for(var a=new ArrayBuffer(e.length),r=new Uint8Array(a),n=0;n!=e.length;++n)r[n]=e.charCodeAt(n)&255;return a}function c0(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var a=[],r=0;r<e.length;++r)a[r]=String.fromCharCode(e[r]);return a.join("")}function ex(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function Bf(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Bf(new Uint8Array(e));for(var a=new Array(e.length),r=0;r<e.length;++r)a[r]=e[r];return a}var ja=yr?function(e){return Buffer.concat(e.map(function(a){return Buffer.isBuffer(a)?a:$n(a)}))}:function(e){if(typeof Uint8Array<"u"){var a=0,r=0;for(a=0;a<e.length;++a)r+=e[a].length;var n=new Uint8Array(r),t=0;for(a=0,r=0;a<e.length;r+=t,++a)if(t=e[a].length,e[a]instanceof Uint8Array)n.set(e[a],r);else{if(typeof e[a]=="string")throw"wtf";n.set(new Uint8Array(e[a]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function rx(e){for(var a=[],r=0,n=e.length+250,t=t0(e.length+255),i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s<128)t[r++]=s;else if(s<2048)t[r++]=192|s>>6&31,t[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var f=e.charCodeAt(++i)&1023;t[r++]=240|s>>8&7,t[r++]=128|s>>2&63,t[r++]=128|f>>6&15|(s&3)<<4,t[r++]=128|f&63}else t[r++]=224|s>>12&15,t[r++]=128|s>>6&63,t[r++]=128|s&63;r>n&&(a.push(t.slice(0,r)),r=0,t=t0(65535),n=65530)}return a.push(t.slice(0,r)),ja(a)}var kt=/\u0000/g,Fi=/[\u0001-\u0006]/g;function V0(e){for(var a="",r=e.length-1;r>=0;)a+=e.charAt(r--);return a}function _n(e,a){var r=""+e;return r.length>=a?r:wa("0",a-r.length)+r}function Uf(e,a){var r=""+e;return r.length>=a?r:wa(" ",a-r.length)+r}function As(e,a){var r=""+e;return r.length>=a?r:r+wa(" ",a-r.length)}function ax(e,a){var r=""+Math.round(e);return r.length>=a?r:wa("0",a-r.length)+r}function tx(e,a){var r=""+e;return r.length>=a?r:wa("0",a-r.length)+r}var Wc=Math.pow(2,32);function W0(e,a){if(e>Wc||e<-Wc)return ax(e,a);var r=Math.round(e);return tx(r,a)}function Fs(e,a){return a=a||0,e.length>=7+a&&(e.charCodeAt(a)|32)===103&&(e.charCodeAt(a+1)|32)===101&&(e.charCodeAt(a+2)|32)===110&&(e.charCodeAt(a+3)|32)===101&&(e.charCodeAt(a+4)|32)===114&&(e.charCodeAt(a+5)|32)===97&&(e.charCodeAt(a+6)|32)===108}var Hc=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],Qs=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function nx(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var ar={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Gc={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},ix={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Ds(e,a,r){for(var n=e<0?-1:1,t=e*n,i=0,s=1,f=0,c=1,l=0,o=0,u=Math.floor(t);l<a&&(u=Math.floor(t),f=u*s+i,o=u*l+c,!(t-u<5e-8));)t=1/(t-u),i=s,s=f,c=l,l=o;if(o>a&&(l>a?(o=c,f=i):(o=l,f=s)),!r)return[0,n*f,o];var x=Math.floor(n*f/o);return[x,n*f-x*o,o]}function g0(e,a,r){if(e>2958465||e<0)return null;var n=e|0,t=Math.floor(86400*(e-n)),i=0,s=[],f={D:n,T:t,u:86400*(e-n)-t,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(f.u)<1e-6&&(f.u=0),a&&a.date1904&&(n+=1462),f.u>.9999&&(f.u=0,++t==86400&&(f.T=t=0,++n,++f.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),s=[c.getFullYear(),c.getMonth()+1,c.getDate()],i=c.getDay(),n<60&&(i=(i+6)%7),r&&(i=ux(c,s))}return f.y=s[0],f.m=s[1],f.d=s[2],f.S=t%60,t=Math.floor(t/60),f.M=t%60,t=Math.floor(t/60),f.H=t,f.q=i,f}var oo=new Date(1899,11,31,0,0,0),sx=oo.getTime(),fx=new Date(1900,2,1,0,0,0);function uo(e,a){var r=e.getTime();return a?r-=1461*24*60*60*1e3:e>=fx&&(r+=24*60*60*1e3),(r-(sx+(e.getTimezoneOffset()-oo.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Wf(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function cx(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function lx(e){var a=e<0?12:11,r=Wf(e.toFixed(12));return r.length<=a||(r=e.toPrecision(10),r.length<=a)?r:e.toExponential(5)}function ox(e){var a=Wf(e.toFixed(11));return a.length>(e<0?12:11)||a==="0"||a==="-0"?e.toPrecision(6):a}function Ui(e){var a=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return a>=-4&&a<=-1?r=e.toPrecision(10+a):Math.abs(a)<=9?r=lx(e):a===10?r=e.toFixed(10).substr(0,12):r=ox(e),Wf(cx(r.toUpperCase()))}function E0(e,a){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):Ui(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return rn(14,uo(e,a&&a.date1904),a)}throw new Error("unsupported value in General format: "+e)}function ux(e,a){a[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function hx(e,a,r,n){var t="",i=0,s=0,f=r.y,c,l=0;switch(e){case 98:f=r.y+543;case 121:switch(a.length){case 1:case 2:c=f%100,l=2;break;default:c=f%1e4,l=4;break}break;case 109:switch(a.length){case 1:case 2:c=r.m,l=a.length;break;case 3:return Qs[r.m-1][1];case 5:return Qs[r.m-1][0];default:return Qs[r.m-1][2]}break;case 100:switch(a.length){case 1:case 2:c=r.d,l=a.length;break;case 3:return Hc[r.q][0];default:return Hc[r.q][1]}break;case 104:switch(a.length){case 1:case 2:c=1+(r.H+11)%12,l=a.length;break;default:throw"bad hour format: "+a}break;case 72:switch(a.length){case 1:case 2:c=r.H,l=a.length;break;default:throw"bad hour format: "+a}break;case 77:switch(a.length){case 1:case 2:c=r.M,l=a.length;break;default:throw"bad minute format: "+a}break;case 115:if(a!="s"&&a!="ss"&&a!=".0"&&a!=".00"&&a!=".000")throw"bad second format: "+a;return r.u===0&&(a=="s"||a=="ss")?_n(r.S,a.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),a==="s"?i===0?"0":""+i/s:(t=_n(i,2+n),a==="ss"?t.substr(0,2):"."+t.substr(2,a.length-1)));case 90:switch(a){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+a}l=a.length===3?1:2;break;case 101:c=f,l=1;break}var o=l>0?_n(c,l):"";return o}function a0(e){var a=3;if(e.length<=a)return e;for(var r=e.length%a,n=e.substr(0,r);r!=e.length;r+=a)n+=(n.length>0?",":"")+e.substr(r,a);return n}var ho=/%/g;function xx(e,a,r){var n=a.replace(ho,""),t=a.length-n.length;return Wn(e,n,r*Math.pow(10,2*t))+wa("%",t)}function dx(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Wn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function xo(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+xo(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),r.indexOf("e")===-1){var s=Math.floor(Math.log(a)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,t)+"."+r.substr(2+t),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,c,l,o){return c+l+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var po=/# (\?+)( ?)\/( ?)(\d+)/;function px(e,a,r){var n=parseInt(e[4],10),t=Math.round(a*n),i=Math.floor(t/n),s=t-i*n,f=n;return r+(i===0?"":""+i)+" "+(s===0?wa(" ",e[1].length+1+e[4].length):Uf(s,e[1].length)+e[2]+"/"+e[3]+_n(f,e[4].length))}function mx(e,a,r){return r+(a===0?"":""+a)+wa(" ",e[1].length+2+e[4].length)}var mo=/^#*0*\.([0#]+)/,go=/\).*[0#]/,vo=/\(###\) ###\\?-####/;function _t(e){for(var a="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:a+=" ";break;case 48:a+="0";break;default:a+=String.fromCharCode(r)}return a}function Xc(e,a){var r=Math.pow(10,a);return""+Math.round(e*r)/r}function $c(e,a){var r=e-Math.floor(e),n=Math.pow(10,a);return a<(""+Math.round(r*n)).length?0:Math.round(r*n)}function gx(e,a){return a<(""+Math.round((e-Math.floor(e))*Math.pow(10,a))).length?1:0}function vx(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function jt(e,a,r){if(e.charCodeAt(0)===40&&!a.match(go)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?jt("n",n,r):"("+jt("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return dx(e,a,r);if(a.indexOf("%")!==-1)return xx(e,a,r);if(a.indexOf("E")!==-1)return xo(a,r);if(a.charCodeAt(0)===36)return"$"+jt(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,c=Math.abs(r),l=r<0?"-":"";if(a.match(/^00+$/))return l+W0(c,a.length);if(a.match(/^[#?]+$/))return t=W0(r,0),t==="0"&&(t=""),t.length>a.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(po))return px(i,c,l);if(a.match(/^#+0+$/))return l+W0(c,a.length-a.indexOf("0"));if(i=a.match(mo))return t=Xc(r,i[1].length).replace(/^([^\.]+)$/,"$1."+_t(i[1])).replace(/\.$/,"."+_t(i[1])).replace(/\.(\d*)$/,function(d,p){return"."+p+wa("0",_t(i[1]).length-p.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return l+Xc(c,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return l+a0(W0(c,0));if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+jt(e,a,-r):a0(""+(Math.floor(r)+gx(r,i[1].length)))+"."+_n($c(r,i[1].length),i[1].length);if(i=a.match(/^#,#*,#0/))return jt(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=V0(jt(e,a.replace(/[\\-]/g,""),r)),s=0,V0(V0(a.replace(/\\/g,"")).replace(/[0#]/g,function(d){return s<t.length?t.charAt(s++):d==="0"?"0":""}));if(a.match(vo))return t=jt(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Ds(c,Math.pow(10,s)-1,!1),t=""+l,o=Wn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=As(f[2],s),o.length<i[4].length&&(o=_t(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Ds(c,Math.pow(10,s)-1,!0),l+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Uf(f[1],s)+i[2]+"/"+i[3]+As(f[2],s):wa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=W0(r,0),a.length<=t.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0?]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return _t(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return s=$c(r,i[1].length),r<0?"-"+jt(e,a,-r):a0(vx(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(d){return"00,"+(d.length<3?_n(0,3-d.length):"")+d})+"."+_n(s,i[1].length);switch(a){case"###,##0.00":return jt(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var h=a0(W0(c,0));return h!=="0"?l+h:"";case"###,###.00":return jt(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return jt(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+a+"|")}function _x(e,a,r){for(var n=a.length-1;a.charCodeAt(n-1)===44;)--n;return Wn(e,a.substr(0,n),r/Math.pow(10,3*(a.length-n)))}function yx(e,a,r){var n=a.replace(ho,""),t=a.length-n.length;return Wn(e,n,r*Math.pow(10,2*t))+wa("%",t)}function _o(e,a){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(a==0)return"0.0E+0";if(a<0)return"-"+_o(e,-a);var t=e.indexOf(".");t===-1&&(t=e.indexOf("E"));var i=Math.floor(Math.log(a)*Math.LOG10E)%t;if(i<0&&(i+=t),r=(a/Math.pow(10,i)).toPrecision(n+1+(t+i)%t),!r.match(/[Ee]/)){var s=Math.floor(Math.log(a)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(f,c,l,o){return c+l+o.substr(0,(t+i)%t)+"."+o.substr(i)+"E"})}else r=a.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function Dn(e,a,r){if(e.charCodeAt(0)===40&&!a.match(go)){var n=a.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Dn("n",n,r):"("+Dn("n",n,-r)+")"}if(a.charCodeAt(a.length-1)===44)return _x(e,a,r);if(a.indexOf("%")!==-1)return yx(e,a,r);if(a.indexOf("E")!==-1)return _o(a,r);if(a.charCodeAt(0)===36)return"$"+Dn(e,a.substr(a.charAt(1)==" "?2:1),r);var t,i,s,f,c=Math.abs(r),l=r<0?"-":"";if(a.match(/^00+$/))return l+_n(c,a.length);if(a.match(/^[#?]+$/))return t=""+r,r===0&&(t=""),t.length>a.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(po))return mx(i,c,l);if(a.match(/^#+0+$/))return l+_n(c,a.length-a.indexOf("0"));if(i=a.match(mo))return t=(""+r).replace(/^([^\.]+)$/,"$1."+_t(i[1])).replace(/\.$/,"."+_t(i[1])),t=t.replace(/\.(\d*)$/,function(d,p){return"."+p+wa("0",_t(i[1]).length-p.length)}),a.indexOf("0.")!==-1?t:t.replace(/^0\./,".");if(a=a.replace(/^#+([0.])/,"$1"),i=a.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=a.match(/^#{1,3},##0(\.?)$/))return l+a0(""+c);if(i=a.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Dn(e,a,-r):a0(""+r)+"."+wa("0",i[1].length);if(i=a.match(/^#,#*,#0/))return Dn(e,a.replace(/^#,#*,/,""),r);if(i=a.match(/^([0#]+)(\\?-([0#]+))+$/))return t=V0(Dn(e,a.replace(/[\\-]/g,""),r)),s=0,V0(V0(a.replace(/\\/g,"")).replace(/[0#]/g,function(d){return s<t.length?t.charAt(s++):d==="0"?"0":""}));if(a.match(vo))return t=Dn(e,"##########",r),"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6);var o="";if(i=a.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),f=Ds(c,Math.pow(10,s)-1,!1),t=""+l,o=Wn("n",i[1],f[1]),o.charAt(o.length-1)==" "&&(o=o.substr(0,o.length-1)+"0"),t+=o+i[2]+"/"+i[3],o=As(f[2],s),o.length<i[4].length&&(o=_t(i[4].substr(i[4].length-o.length))+o),t+=o,t;if(i=a.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),f=Ds(c,Math.pow(10,s)-1,!0),l+(f[0]||(f[1]?"":"0"))+" "+(f[1]?Uf(f[1],s)+i[2]+"/"+i[3]+As(f[2],s):wa(" ",2*s+1+i[2].length+i[3].length));if(i=a.match(/^[#0?]+$/))return t=""+r,a.length<=t.length?t:_t(a.substr(0,a.length-t.length))+t;if(i=a.match(/^([#0]+)\.([#0]+)$/)){t=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=t.indexOf(".");var u=a.indexOf(".")-s,x=a.length-t.length-u;return _t(a.substr(0,u)+t+a.substr(a.length-x))}if(i=a.match(/^00,000\.([#0]*0)$/))return r<0?"-"+Dn(e,a,-r):a0(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(d){return"00,"+(d.length<3?_n(0,3-d.length):"")+d})+"."+_n(0,i[1].length);switch(a){case"###,###":case"##,###":case"#,###":var h=a0(""+c);return h!=="0"?l+h:"";default:if(a.match(/\.[0#?]*$/))return Dn(e,a.slice(0,a.lastIndexOf(".")),r)+_t(a.slice(a.lastIndexOf(".")))}throw new Error("unsupported format |"+a+"|")}function Wn(e,a,r){return(r|0)===r?Dn(e,a,r):jt(e,a,r)}function kx(e){for(var a=[],r=!1,n=0,t=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:a[a.length]=e.substr(t,n-t),t=n+1}if(a[a.length]=e.substr(t),r===!0)throw new Error("Format |"+e+"| unterminated string ");return a}var yo=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function ei(e){for(var a=0,r="",n="";a<e.length;)switch(r=e.charAt(a)){case"G":Fs(e,a)&&(a+=6),a++;break;case'"':for(;e.charCodeAt(++a)!==34&&a<e.length;);++a;break;case"\\":a+=2;break;case"_":a+=2;break;case"@":++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(a,3).toUpperCase()==="A/P"||e.substr(a,5).toUpperCase()==="AM/PM"||e.substr(a,5).toUpperCase()==="上午/下午")return!0;++a;break;case"[":for(n=r;e.charAt(a++)!=="]"&&a<e.length;)n+=e.charAt(a);if(n.match(yo))return!0;break;case".":case"0":case"#":for(;a<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++a))>-1||r=="\\"&&e.charAt(a+1)=="-"&&"0#".indexOf(e.charAt(a+2))>-1););break;case"?":for(;e.charAt(++a)===r;);break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;);break;case" ":++a;break;default:++a;break}return!1}function Ex(e,a,r,n){for(var t=[],i="",s=0,f="",c="t",l,o,u,x="H";s<e.length;)switch(f=e.charAt(s)){case"G":if(!Fs(e,s))throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(u=e.charCodeAt(++s))!==34&&s<e.length;)i+=String.fromCharCode(u);t[t.length]={t:"t",v:i},++s;break;case"\\":var h=e.charAt(++s),d=h==="("||h===")"?h:"t";t[t.length]={t:d,v:h},++s;break;case"_":t[t.length]={t:"t",v:" "},s+=2;break;case"@":t[t.length]={t:"T",v:a},++s;break;case"B":case"b":if(e.charAt(s+1)==="1"||e.charAt(s+1)==="2"){if(l==null&&(l=g0(a,r,e.charAt(s+1)==="2"),l==null))return"";t[t.length]={t:"X",v:e.substr(s,2)},c=f,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":f=f.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(a<0||l==null&&(l=g0(a,r),l==null))return"";for(i=f;++s<e.length&&e.charAt(s).toLowerCase()===f;)i+=f;f==="m"&&c.toLowerCase()==="h"&&(f="M"),f==="h"&&(f=x),t[t.length]={t:f,v:i},c=f;break;case"A":case"a":case"上":var p={t:f,v:f};if(l==null&&(l=g0(a,r)),e.substr(s,3).toUpperCase()==="A/P"?(l!=null&&(p.v=l.H>=12?"P":"A"),p.t="T",x="h",s+=3):e.substr(s,5).toUpperCase()==="AM/PM"?(l!=null&&(p.v=l.H>=12?"PM":"AM"),p.t="T",s+=5,x="h"):e.substr(s,5).toUpperCase()==="上午/下午"?(l!=null&&(p.v=l.H>=12?"下午":"上午"),p.t="T",s+=5,x="h"):(p.t="t",++s),l==null&&p.t==="T")return"";t[t.length]=p,c=f;break;case"[":for(i=f;e.charAt(s++)!=="]"&&s<e.length;)i+=e.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(yo)){if(l==null&&(l=g0(a,r),l==null))return"";t[t.length]={t:"Z",v:i.toLowerCase()},c=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",ei(e)||(t[t.length]={t:"t",v:i}));break;case".":if(l!=null){for(i=f;++s<e.length&&(f=e.charAt(s))==="0";)i+=f;t[t.length]={t:"s",v:i};break}case"0":case"#":for(i=f;++s<e.length&&"0#?.,E+-%".indexOf(f=e.charAt(s))>-1;)i+=f;t[t.length]={t:"n",v:i};break;case"?":for(i=f;e.charAt(++s)===f;)i+=f;t[t.length]={t:f,v:i},c=f;break;case"*":++s,(e.charAt(s)==" "||e.charAt(s)=="*")&&++s;break;case"(":case")":t[t.length]={t:n===1?"t":f,v:f},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=f;s<e.length&&"0123456789".indexOf(e.charAt(++s))>-1;)i+=e.charAt(s);t[t.length]={t:"D",v:i};break;case" ":t[t.length]={t:f,v:f},++s;break;case"$":t[t.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(f)===-1)throw new Error("unrecognized character "+f+" in "+e);t[t.length]={t:"t",v:f},++s;break}var m=0,g=0,y;for(s=t.length-1,c="t";s>=0;--s)switch(t[s].t){case"h":case"H":t[s].t=x,c="h",m<1&&(m=1);break;case"s":(y=t[s].v.match(/\.0+$/))&&(g=Math.max(g,y[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":c=t[s].t;break;case"m":c==="s"&&(t[s].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&t[s].v.match(/[Hh]/)&&(m=1),m<2&&t[s].v.match(/[Mm]/)&&(m=2),m<3&&t[s].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var v="",E;for(s=0;s<t.length;++s)switch(t[s].t){case"t":case"T":case" ":case"D":break;case"X":t[s].v="",t[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":t[s].v=hx(t[s].t.charCodeAt(0),t[s].v,l,g),t[s].t="t";break;case"n":case"?":for(E=s+1;t[E]!=null&&((f=t[E].t)==="?"||f==="D"||(f===" "||f==="t")&&t[E+1]!=null&&(t[E+1].t==="?"||t[E+1].t==="t"&&t[E+1].v==="/")||t[s].t==="("&&(f===" "||f==="n"||f===")")||f==="t"&&(t[E].v==="/"||t[E].v===" "&&t[E+1]!=null&&t[E+1].t=="?"));)t[s].v+=t[E].v,t[E]={v:"",t:";"},++E;v+=t[s].v,s=E-1;break;case"G":t[s].t="t",t[s].v=E0(a,r);break}var w="",S,T;if(v.length>0){v.charCodeAt(0)==40?(S=a<0&&v.charCodeAt(0)===45?-a:a,T=Wn("n",v,S)):(S=a<0&&n>1?-a:a,T=Wn("n",v,S),S<0&&t[0]&&t[0].t=="t"&&(T=T.substr(1),t[0].v="-"+t[0].v)),E=T.length-1;var B=t.length;for(s=0;s<t.length;++s)if(t[s]!=null&&t[s].t!="t"&&t[s].v.indexOf(".")>-1){B=s;break}var I=t.length;if(B===t.length&&T.indexOf("E")===-1){for(s=t.length-1;s>=0;--s)t[s]==null||"n?".indexOf(t[s].t)===-1||(E>=t[s].v.length-1?(E-=t[s].v.length,t[s].v=T.substr(E+1,t[s].v.length)):E<0?t[s].v="":(t[s].v=T.substr(0,E+1),E=-1),t[s].t="t",I=s);E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v)}else if(B!==t.length&&T.indexOf("E")===-1){for(E=T.indexOf(".")-1,s=B;s>=0;--s)if(!(t[s]==null||"n?".indexOf(t[s].t)===-1)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")-1:t[s].v.length-1,w=t[s].v.substr(o+1);o>=0;--o)E>=0&&(t[s].v.charAt(o)==="0"||t[s].v.charAt(o)==="#")&&(w=T.charAt(E--)+w);t[s].v=w,t[s].t="t",I=s}for(E>=0&&I<t.length&&(t[I].v=T.substr(0,E+1)+t[I].v),E=T.indexOf(".")+1,s=B;s<t.length;++s)if(!(t[s]==null||"n?(".indexOf(t[s].t)===-1&&s!==B)){for(o=t[s].v.indexOf(".")>-1&&s===B?t[s].v.indexOf(".")+1:0,w=t[s].v.substr(0,o);o<t[s].v.length;++o)E<T.length&&(w+=T.charAt(E++));t[s].v=w,t[s].t="t",I=s}}}for(s=0;s<t.length;++s)t[s]!=null&&"n?".indexOf(t[s].t)>-1&&(S=n>1&&a<0&&s>0&&t[s-1].v==="-"?-a:a,t[s].v=Wn(t[s].t,t[s].v,S),t[s].t="t");var U="";for(s=0;s!==t.length;++s)t[s]!=null&&(U+=t[s].v);return U}var Kc=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function zc(e,a){if(a==null)return!1;var r=parseFloat(a[2]);switch(a[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function Tx(e,a){var r=kx(e),n=r.length,t=r[n-1].indexOf("@");if(n<4&&t>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof a!="number")return[4,r.length===4||t>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=t>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=t>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=t>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=a>0?r[0]:a<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(Kc),f=r[1].match(Kc);return zc(a,s)?[n,r[0]]:zc(a,f)?[n,r[1]]:[n,r[s!=null&&f!=null?2:1]]}return[n,i]}function rn(e,a,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:ar)[e],n==null&&(n=r.table&&r.table[Gc[e]]||ar[Gc[e]]),n==null&&(n=ix[e]||"General");break}if(Fs(n,0))return E0(a,r);a instanceof Date&&(a=uo(a,r.date1904));var t=Tx(n,a);if(Fs(t[1]))return E0(a,r);if(a===!0)a="TRUE";else if(a===!1)a="FALSE";else if(a===""||a==null)return"";return Ex(t[1],a,r,t[0])}function Hn(e,a){if(typeof a!="number"){a=+a||-1;for(var r=0;r<392;++r){if(ar[r]==null){a<0&&(a=r);continue}if(ar[r]==e){a=r;break}}a<0&&(a=391)}return ar[a]=e,a}function Ws(e){for(var a=0;a!=392;++a)e[a]!==void 0&&Hn(e[a],a)}function ri(){ar=nx()}var wx={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},ko=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function Sx(e){var a=typeof e=="number"?ar[e]:e;return a=a.replace(ko,"(\\d+)"),new RegExp("^"+a+"$")}function Ax(e,a,r){var n=-1,t=-1,i=-1,s=-1,f=-1,c=-1;(a.match(ko)||[]).forEach(function(u,x){var h=parseInt(r[x+1],10);switch(u.toLowerCase().charAt(0)){case"y":n=h;break;case"d":i=h;break;case"h":s=h;break;case"s":c=h;break;case"m":s>=0?f=h:t=h;break}}),c>=0&&f==-1&&t>=0&&(f=t,t=-1);var l=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(t>=1?t:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var o=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(f>=0?f:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return s==-1&&f==-1&&c==-1?l:n==-1&&t==-1&&i==-1?o:l+"T"+o}var Fx=function(){var e={};e.version="1.2.0";function a(){for(var T=0,B=new Array(256),I=0;I!=256;++I)T=I,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,T=T&1?-306674912^T>>>1:T>>>1,B[I]=T;return typeof Int32Array<"u"?new Int32Array(B):B}var r=a();function n(T){var B=0,I=0,U=0,L=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)L[U]=T[U];for(U=0;U!=256;++U)for(I=T[U],B=256+U;B<4096;B+=256)I=L[B]=I>>>8^T[I&255];var W=[];for(U=1;U!=16;++U)W[U-1]=typeof Int32Array<"u"?L.subarray(U*256,U*256+256):L.slice(U*256,U*256+256);return W}var t=n(r),i=t[0],s=t[1],f=t[2],c=t[3],l=t[4],o=t[5],u=t[6],x=t[7],h=t[8],d=t[9],p=t[10],m=t[11],g=t[12],y=t[13],v=t[14];function E(T,B){for(var I=B^-1,U=0,L=T.length;U<L;)I=I>>>8^r[(I^T.charCodeAt(U++))&255];return~I}function w(T,B){for(var I=B^-1,U=T.length-15,L=0;L<U;)I=v[T[L++]^I&255]^y[T[L++]^I>>8&255]^g[T[L++]^I>>16&255]^m[T[L++]^I>>>24]^p[T[L++]]^d[T[L++]]^h[T[L++]]^x[T[L++]]^u[T[L++]]^o[T[L++]]^l[T[L++]]^c[T[L++]]^f[T[L++]]^s[T[L++]]^i[T[L++]]^r[T[L++]];for(U+=15;L<U;)I=I>>>8^r[(I^T[L++])&255];return~I}function S(T,B){for(var I=B^-1,U=0,L=T.length,W=0,M=0;U<L;)W=T.charCodeAt(U++),W<128?I=I>>>8^r[(I^W)&255]:W<2048?(I=I>>>8^r[(I^(192|W>>6&31))&255],I=I>>>8^r[(I^(128|W&63))&255]):W>=55296&&W<57344?(W=(W&1023)+64,M=T.charCodeAt(U++)&1023,I=I>>>8^r[(I^(240|W>>8&7))&255],I=I>>>8^r[(I^(128|W>>2&63))&255],I=I>>>8^r[(I^(128|M>>6&15|(W&3)<<4))&255],I=I>>>8^r[(I^(128|M&63))&255]):(I=I>>>8^r[(I^(224|W>>12&15))&255],I=I>>>8^r[(I^(128|W>>6&63))&255],I=I>>>8^r[(I^(128|W&63))&255]);return~I}return e.table=r,e.bstr=E,e.buf=w,e.str=S,e}(),Ve=function(){var a={};a.version="1.2.1";function r(k,N){for(var F=k.split("/"),O=N.split("/"),C=0,R=0,K=Math.min(F.length,O.length);C<K;++C){if(R=F[C].length-O[C].length)return R;if(F[C]!=O[C])return F[C]<O[C]?-1:1}return F.length-O.length}function n(k){if(k.charAt(k.length-1)=="/")return k.slice(0,-1).indexOf("/")===-1?k:n(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(0,N+1)}function t(k){if(k.charAt(k.length-1)=="/")return t(k.slice(0,-1));var N=k.lastIndexOf("/");return N===-1?k:k.slice(N+1)}function i(k,N){typeof N=="string"&&(N=new Date(N));var F=N.getHours();F=F<<6|N.getMinutes(),F=F<<5|N.getSeconds()>>>1,k.write_shift(2,F);var O=N.getFullYear()-1980;O=O<<4|N.getMonth()+1,O=O<<5|N.getDate(),k.write_shift(2,O)}function s(k){var N=k.read_shift(2)&65535,F=k.read_shift(2)&65535,O=new Date,C=F&31;F>>>=5;var R=F&15;F>>>=4,O.setMilliseconds(0),O.setFullYear(F+1980),O.setMonth(R-1),O.setDate(C);var K=N&31;N>>>=5;var Y=N&63;return N>>>=6,O.setHours(N),O.setMinutes(Y),O.setSeconds(K<<1),O}function f(k){tt(k,0);for(var N={},F=0;k.l<=k.length-4;){var O=k.read_shift(2),C=k.read_shift(2),R=k.l+C,K={};switch(O){case 21589:F=k.read_shift(1),F&1&&(K.mtime=k.read_shift(4)),C>5&&(F&2&&(K.atime=k.read_shift(4)),F&4&&(K.ctime=k.read_shift(4))),K.mtime&&(K.mt=new Date(K.mtime*1e3));break}k.l=R,N[O]=K}return N}var c;function l(){return c||(c={})}function o(k,N){if(k[0]==80&&k[1]==75)return Kr(k,N);if((k[0]|32)==109&&(k[1]|32)==105)return it(k,N);if(k.length<512)throw new Error("CFB file size "+k.length+" < 512");var F=3,O=512,C=0,R=0,K=0,Y=0,V=0,j=[],J=k.slice(0,512);tt(J,0);var le=u(J);switch(F=le[0],F){case 3:O=512;break;case 4:O=4096;break;case 0:if(le[1]==0)return Kr(k,N);default:throw new Error("Major Version: Expected 3 or 4 saw "+F)}O!==512&&(J=k.slice(0,O),tt(J,28));var _e=k.slice(0,O);x(J,F);var Ee=J.read_shift(4,"i");if(F===3&&Ee!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Ee);J.l+=4,K=J.read_shift(4,"i"),J.l+=4,J.chk("00100000","Mini Stream Cutoff Size: "),Y=J.read_shift(4,"i"),C=J.read_shift(4,"i"),V=J.read_shift(4,"i"),R=J.read_shift(4,"i");for(var ue=-1,ge=0;ge<109&&(ue=J.read_shift(4,"i"),!(ue<0));++ge)j[ge]=ue;var qe=h(k,O);m(V,R,qe,O,j);var Er=y(qe,K,j,O);Er[K].name="!Directory",C>0&&Y!==M&&(Er[Y].name="!MiniFAT"),Er[j[0]].name="!FAT",Er.fat_addrs=j,Er.ssz=O;var Mr={},$r=[],tn=[],nn=[];v(K,Er,qe,$r,C,Mr,tn,Y),d(tn,nn,$r),$r.shift();var sn={FileIndex:tn,FullPaths:nn};return N&&N.raw&&(sn.raw={header:_e,sectors:qe}),sn}function u(k){if(k[k.l]==80&&k[k.l+1]==75)return[0,0];k.chk(se,"Header Signature: "),k.l+=16;var N=k.read_shift(2,"u");return[k.read_shift(2,"u"),N]}function x(k,N){var F=9;switch(k.l+=2,F=k.read_shift(2)){case 9:if(N!=3)throw new Error("Sector Shift: Expected 9 saw "+F);break;case 12:if(N!=4)throw new Error("Sector Shift: Expected 12 saw "+F);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+F)}k.chk("0600","Mini Sector Shift: "),k.chk("000000000000","Reserved: ")}function h(k,N){for(var F=Math.ceil(k.length/N)-1,O=[],C=1;C<F;++C)O[C-1]=k.slice(C*N,(C+1)*N);return O[F-1]=k.slice(F*N),O}function d(k,N,F){for(var O=0,C=0,R=0,K=0,Y=0,V=F.length,j=[],J=[];O<V;++O)j[O]=J[O]=O,N[O]=F[O];for(;Y<J.length;++Y)O=J[Y],C=k[O].L,R=k[O].R,K=k[O].C,j[O]===O&&(C!==-1&&j[C]!==C&&(j[O]=j[C]),R!==-1&&j[R]!==R&&(j[O]=j[R])),K!==-1&&(j[K]=O),C!==-1&&O!=j[O]&&(j[C]=j[O],J.lastIndexOf(C)<Y&&J.push(C)),R!==-1&&O!=j[O]&&(j[R]=j[O],J.lastIndexOf(R)<Y&&J.push(R));for(O=1;O<V;++O)j[O]===O&&(R!==-1&&j[R]!==R?j[O]=j[R]:C!==-1&&j[C]!==C&&(j[O]=j[C]));for(O=1;O<V;++O)if(k[O].type!==0){if(Y=O,Y!=j[Y])do Y=j[Y],N[O]=N[Y]+"/"+N[O];while(Y!==0&&j[Y]!==-1&&Y!=j[Y]);j[O]=-1}for(N[0]+="/",O=1;O<V;++O)k[O].type!==2&&(N[O]+="/")}function p(k,N,F){for(var O=k.start,C=k.size,R=[],K=O;F&&C>0&&K>=0;)R.push(N.slice(K*W,K*W+W)),C-=W,K=p0(F,K*4);return R.length===0?ae(0):ja(R).slice(0,k.size)}function m(k,N,F,O,C){var R=M;if(k===M){if(N!==0)throw new Error("DIFAT chain shorter than expected")}else if(k!==-1){var K=F[k],Y=(O>>>2)-1;if(!K)return;for(var V=0;V<Y&&(R=p0(K,V*4))!==M;++V)C.push(R);m(p0(K,O-4),N-1,F,O,C)}}function g(k,N,F,O,C){var R=[],K=[];C||(C=[]);var Y=O-1,V=0,j=0;for(V=N;V>=0;){C[V]=!0,R[R.length]=V,K.push(k[V]);var J=F[Math.floor(V*4/O)];if(j=V*4&Y,O<4+j)throw new Error("FAT boundary crossed: "+V+" 4 "+O);if(!k[J])break;V=p0(k[J],j)}return{nodes:R,data:nl([K])}}function y(k,N,F,O){var C=k.length,R=[],K=[],Y=[],V=[],j=O-1,J=0,le=0,_e=0,Ee=0;for(J=0;J<C;++J)if(Y=[],_e=J+N,_e>=C&&(_e-=C),!K[_e]){V=[];var ue=[];for(le=_e;le>=0;){ue[le]=!0,K[le]=!0,Y[Y.length]=le,V.push(k[le]);var ge=F[Math.floor(le*4/O)];if(Ee=le*4&j,O<4+Ee)throw new Error("FAT boundary crossed: "+le+" 4 "+O);if(!k[ge]||(le=p0(k[ge],Ee),ue[le]))break}R[_e]={nodes:Y,data:nl([V])}}return R}function v(k,N,F,O,C,R,K,Y){for(var V=0,j=O.length?2:0,J=N[k].data,le=0,_e=0,Ee;le<J.length;le+=128){var ue=J.slice(le,le+128);tt(ue,64),_e=ue.read_shift(2),Ee=Vf(ue,0,_e-j),O.push(Ee);var ge={name:Ee,type:ue.read_shift(1),color:ue.read_shift(1),L:ue.read_shift(4,"i"),R:ue.read_shift(4,"i"),C:ue.read_shift(4,"i"),clsid:ue.read_shift(16),state:ue.read_shift(4,"i"),start:0,size:0},qe=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);qe!==0&&(ge.ct=E(ue,ue.l-8));var Er=ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2)+ue.read_shift(2);Er!==0&&(ge.mt=E(ue,ue.l-8)),ge.start=ue.read_shift(4,"i"),ge.size=ue.read_shift(4,"i"),ge.size<0&&ge.start<0&&(ge.size=ge.type=0,ge.start=M,ge.name=""),ge.type===5?(V=ge.start,C>0&&V!==M&&(N[V].name="!StreamData")):ge.size>=4096?(ge.storage="fat",N[ge.start]===void 0&&(N[ge.start]=g(F,ge.start,N.fat_addrs,N.ssz)),N[ge.start].name=ge.name,ge.content=N[ge.start].data.slice(0,ge.size)):(ge.storage="minifat",ge.size<0?ge.size=0:V!==M&&ge.start!==M&&N[V]&&(ge.content=p(ge,N[V].data,(N[Y]||{}).data))),ge.content&&tt(ge.content,0),R[Ee]=ge,K.push(ge)}}function E(k,N){return new Date((Ut(k,N+4)/1e7*Math.pow(2,32)+Ut(k,N)/1e7-11644473600)*1e3)}function w(k,N){return l(),o(c.readFileSync(k),N)}function S(k,N){var F=N&&N.type;switch(F||yr&&Buffer.isBuffer(k)&&(F="buffer"),F||"base64"){case"file":return w(k,N);case"base64":return o(Wt(Xt(k)),N);case"binary":return o(Wt(k),N)}return o(k,N)}function T(k,N){var F=N||{},O=F.root||"Root Entry";if(k.FullPaths||(k.FullPaths=[]),k.FileIndex||(k.FileIndex=[]),k.FullPaths.length!==k.FileIndex.length)throw new Error("inconsistent CFB structure");k.FullPaths.length===0&&(k.FullPaths[0]=O+"/",k.FileIndex[0]={name:O,type:5}),F.CLSID&&(k.FileIndex[0].clsid=F.CLSID),B(k)}function B(k){var N="Sh33tJ5";if(!Ve.find(k,"/"+N)){var F=ae(4);F[0]=55,F[1]=F[3]=50,F[2]=54,k.FileIndex.push({name:N,type:2,content:F,size:4,L:69,R:69,C:69}),k.FullPaths.push(k.FullPaths[0]+N),I(k)}}function I(k,N){T(k);for(var F=!1,O=!1,C=k.FullPaths.length-1;C>=0;--C){var R=k.FileIndex[C];switch(R.type){case 0:O?F=!0:(k.FileIndex.pop(),k.FullPaths.pop());break;case 1:case 2:case 5:O=!0,isNaN(R.R*R.L*R.C)&&(F=!0),R.R>-1&&R.L>-1&&R.R==R.L&&(F=!0);break;default:F=!0;break}}if(!(!F&&!N)){var K=new Date(1987,1,19),Y=0,V=Object.create?Object.create(null):{},j=[];for(C=0;C<k.FullPaths.length;++C)V[k.FullPaths[C]]=!0,k.FileIndex[C].type!==0&&j.push([k.FullPaths[C],k.FileIndex[C]]);for(C=0;C<j.length;++C){var J=n(j[C][0]);O=V[J],O||(j.push([J,{name:t(J).replace("/",""),type:1,clsid:he,ct:K,mt:K,content:null}]),V[J]=!0)}for(j.sort(function(Ee,ue){return r(Ee[0],ue[0])}),k.FullPaths=[],k.FileIndex=[],C=0;C<j.length;++C)k.FullPaths[C]=j[C][0],k.FileIndex[C]=j[C][1];for(C=0;C<j.length;++C){var le=k.FileIndex[C],_e=k.FullPaths[C];if(le.name=t(_e).replace("/",""),le.L=le.R=le.C=-(le.color=1),le.size=le.content?le.content.length:0,le.start=0,le.clsid=le.clsid||he,C===0)le.C=j.length>1?1:-1,le.size=0,le.type=5;else if(_e.slice(-1)=="/"){for(Y=C+1;Y<j.length&&n(k.FullPaths[Y])!=_e;++Y);for(le.C=Y>=j.length?-1:Y,Y=C+1;Y<j.length&&n(k.FullPaths[Y])!=n(_e);++Y);le.R=Y>=j.length?-1:Y,le.type=1}else n(k.FullPaths[C+1]||"")==n(_e)&&(le.R=C+1),le.type=2}}}function U(k,N){var F=N||{};if(F.fileType=="mad")return bt(k,F);switch(I(k),F.fileType){case"zip":return Ta(k,F)}var O=function(Ee){for(var ue=0,ge=0,qe=0;qe<Ee.FileIndex.length;++qe){var Er=Ee.FileIndex[qe];if(Er.content){var Mr=Er.content.length;Mr>0&&(Mr<4096?ue+=Mr+63>>6:ge+=Mr+511>>9)}}for(var $r=Ee.FullPaths.length+3>>2,tn=ue+7>>3,nn=ue+127>>7,sn=tn+ge+$r+nn,Pt=sn+127>>7,Rn=Pt<=109?0:Math.ceil((Pt-109)/127);sn+Pt+Rn+127>>7>Pt;)Rn=++Pt<=109?0:Math.ceil((Pt-109)/127);var er=[1,Rn,Pt,nn,$r,ge,ue,0];return Ee.FileIndex[0].size=ue<<6,er[7]=(Ee.FileIndex[0].start=er[0]+er[1]+er[2]+er[3]+er[4]+er[5])+(er[6]+7>>3),er}(k),C=ae(O[7]<<9),R=0,K=0;{for(R=0;R<8;++R)C.write_shift(1,ne[R]);for(R=0;R<8;++R)C.write_shift(2,0);for(C.write_shift(2,62),C.write_shift(2,3),C.write_shift(2,65534),C.write_shift(2,9),C.write_shift(2,6),R=0;R<3;++R)C.write_shift(2,0);for(C.write_shift(4,0),C.write_shift(4,O[2]),C.write_shift(4,O[0]+O[1]+O[2]+O[3]-1),C.write_shift(4,0),C.write_shift(4,4096),C.write_shift(4,O[3]?O[0]+O[1]+O[2]-1:M),C.write_shift(4,O[3]),C.write_shift(-4,O[1]?O[0]-1:M),C.write_shift(4,O[1]),R=0;R<109;++R)C.write_shift(-4,R<O[2]?O[1]+R:-1)}if(O[1])for(K=0;K<O[1];++K){for(;R<236+K*127;++R)C.write_shift(-4,R<O[2]?O[1]+R:-1);C.write_shift(-4,K===O[1]-1?M:K+1)}var Y=function(Ee){for(K+=Ee;R<K-1;++R)C.write_shift(-4,R+1);Ee&&(++R,C.write_shift(-4,M))};for(K=R=0,K+=O[1];R<K;++R)C.write_shift(-4,ce.DIFSECT);for(K+=O[2];R<K;++R)C.write_shift(-4,ce.FATSECT);Y(O[3]),Y(O[4]);for(var V=0,j=0,J=k.FileIndex[0];V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(j<4096)&&(J.start=K,Y(j+511>>9)));for(Y(O[6]+7>>3);C.l&511;)C.write_shift(-4,ce.ENDOFCHAIN);for(K=R=0,V=0;V<k.FileIndex.length;++V)J=k.FileIndex[V],J.content&&(j=J.content.length,!(!j||j>=4096)&&(J.start=K,Y(j+63>>6)));for(;C.l&511;)C.write_shift(-4,ce.ENDOFCHAIN);for(R=0;R<O[4]<<2;++R){var le=k.FullPaths[R];if(!le||le.length===0){for(V=0;V<17;++V)C.write_shift(4,0);for(V=0;V<3;++V)C.write_shift(4,-1);for(V=0;V<12;++V)C.write_shift(4,0);continue}J=k.FileIndex[R],R===0&&(J.start=J.size?J.start-1:M);var _e=R===0&&F.root||J.name;if(j=2*(_e.length+1),C.write_shift(64,_e,"utf16le"),C.write_shift(2,j),C.write_shift(1,J.type),C.write_shift(1,J.color),C.write_shift(-4,J.L),C.write_shift(-4,J.R),C.write_shift(-4,J.C),J.clsid)C.write_shift(16,J.clsid,"hex");else for(V=0;V<4;++V)C.write_shift(4,0);C.write_shift(4,J.state||0),C.write_shift(4,0),C.write_shift(4,0),C.write_shift(4,0),C.write_shift(4,0),C.write_shift(4,J.start),C.write_shift(4,J.size),C.write_shift(4,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>=4096)if(C.l=J.start+1<<9,yr&&Buffer.isBuffer(J.content))J.content.copy(C,C.l,0,J.size),C.l+=J.size+511&-512;else{for(V=0;V<J.size;++V)C.write_shift(1,J.content[V]);for(;V&511;++V)C.write_shift(1,0)}for(R=1;R<k.FileIndex.length;++R)if(J=k.FileIndex[R],J.size>0&&J.size<4096)if(yr&&Buffer.isBuffer(J.content))J.content.copy(C,C.l,0,J.size),C.l+=J.size+63&-64;else{for(V=0;V<J.size;++V)C.write_shift(1,J.content[V]);for(;V&63;++V)C.write_shift(1,0)}if(yr)C.l=C.length;else for(;C.l<C.length;)C.write_shift(1,0);return C}function L(k,N){var F=k.FullPaths.map(function(V){return V.toUpperCase()}),O=F.map(function(V){var j=V.split("/");return j[j.length-(V.slice(-1)=="/"?2:1)]}),C=!1;N.charCodeAt(0)===47?(C=!0,N=F[0].slice(0,-1)+N):C=N.indexOf("/")!==-1;var R=N.toUpperCase(),K=C===!0?F.indexOf(R):O.indexOf(R);if(K!==-1)return k.FileIndex[K];var Y=!R.match(Fi);for(R=R.replace(kt,""),Y&&(R=R.replace(Fi,"!")),K=0;K<F.length;++K)if((Y?F[K].replace(Fi,"!"):F[K]).replace(kt,"")==R||(Y?O[K].replace(Fi,"!"):O[K]).replace(kt,"")==R)return k.FileIndex[K];return null}var W=64,M=-2,se="d0cf11e0a1b11ae1",ne=[208,207,17,224,161,177,26,225],he="00000000000000000000000000000000",ce={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:M,FREESECT:-1,HEADER_SIGNATURE:se,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:he,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function be(k,N,F){l();var O=U(k,F);c.writeFileSync(N,O)}function z(k){for(var N=new Array(k.length),F=0;F<k.length;++F)N[F]=String.fromCharCode(k[F]);return N.join("")}function Te(k,N){var F=U(k,N);switch(N&&N.type||"buffer"){case"file":return l(),c.writeFileSync(N.filename,F),F;case"binary":return typeof F=="string"?F:z(F);case"base64":return Bi(typeof F=="string"?F:z(F));case"buffer":if(yr)return Buffer.isBuffer(F)?F:$n(F);case"array":return typeof F=="string"?Wt(F):F}return F}var Ae;function _(k){try{var N=k.InflateRaw,F=new N;if(F._processChunk(new Uint8Array([3,0]),F._finishFlushFlag),F.bytesRead)Ae=k;else throw new Error("zlib does not expose bytesRead")}catch(O){console.error("cannot use native zlib: "+(O.message||O))}}function A(k,N){if(!Ae)return ra(k,N);var F=Ae.InflateRaw,O=new F,C=O._processChunk(k.slice(k.l),O._finishFlushFlag);return k.l+=O.bytesRead,C}function D(k){return Ae?Ae.deflateRawSync(k):Qe(k)}var b=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],re=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function ee(k){var N=(k<<1|k<<11)&139536|(k<<5|k<<15)&558144;return(N>>16|N>>8|N)&255}for(var Q=typeof Uint8Array<"u",q=Q?new Uint8Array(256):[],we=0;we<256;++we)q[we]=ee(we);function P(k,N){var F=q[k&255];return N<=8?F>>>8-N:(F=F<<8|q[k>>8&255],N<=16?F>>>16-N:(F=F<<8|q[k>>16&255],F>>>24-N))}function Pe(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=6?0:k[O+1]<<8))>>>F&3}function Ie(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=5?0:k[O+1]<<8))>>>F&7}function je(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=4?0:k[O+1]<<8))>>>F&15}function Le(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=3?0:k[O+1]<<8))>>>F&31}function ie(k,N){var F=N&7,O=N>>>3;return(k[O]|(F<=1?0:k[O+1]<<8))>>>F&127}function ur(k,N,F){var O=N&7,C=N>>>3,R=(1<<F)-1,K=k[C]>>>O;return F<8-O||(K|=k[C+1]<<8-O,F<16-O)||(K|=k[C+2]<<16-O,F<24-O)||(K|=k[C+3]<<24-O),K&R}function ir(k,N,F){var O=N&7,C=N>>>3;return O<=5?k[C]|=(F&7)<<O:(k[C]|=F<<O&255,k[C+1]=(F&7)>>8-O),N+3}function ya(k,N,F){var O=N&7,C=N>>>3;return F=(F&1)<<O,k[C]|=F,N+1}function Fa(k,N,F){var O=N&7,C=N>>>3;return F<<=O,k[C]|=F&255,F>>>=8,k[C+1]=F,N+8}function Et(k,N,F){var O=N&7,C=N>>>3;return F<<=O,k[C]|=F&255,F>>>=8,k[C+1]=F&255,k[C+2]=F>>>8,N+16}function Ja(k,N){var F=k.length,O=2*F>N?2*F:N+5,C=0;if(F>=N)return k;if(yr){var R=Uc(O);if(k.copy)k.copy(R);else for(;C<k.length;++C)R[C]=k[C];return R}else if(Q){var K=new Uint8Array(O);if(K.set)K.set(k);else for(;C<F;++C)K[C]=k[C];return K}return k.length=O,k}function ka(k){for(var N=new Array(k),F=0;F<k;++F)N[F]=0;return N}function $a(k,N,F){var O=1,C=0,R=0,K=0,Y=0,V=k.length,j=Q?new Uint16Array(32):ka(32);for(R=0;R<32;++R)j[R]=0;for(R=V;R<F;++R)k[R]=0;V=k.length;var J=Q?new Uint16Array(V):ka(V);for(R=0;R<V;++R)j[C=k[R]]++,O<C&&(O=C),J[R]=0;for(j[0]=0,R=1;R<=O;++R)j[R+16]=Y=Y+j[R-1]<<1;for(R=0;R<V;++R)Y=k[R],Y!=0&&(J[R]=j[Y+16]++);var le=0;for(R=0;R<V;++R)if(le=k[R],le!=0)for(Y=P(J[R],O)>>O-le,K=(1<<O+4-le)-1;K>=0;--K)N[Y|K<<le]=le&15|R<<4;return O}var Se=Q?new Uint16Array(512):ka(512),Ne=Q?new Uint16Array(32):ka(32);if(!Q){for(var Be=0;Be<512;++Be)Se[Be]=0;for(Be=0;Be<32;++Be)Ne[Be]=0}(function(){for(var k=[],N=0;N<32;N++)k.push(5);$a(k,Ne,32);var F=[];for(N=0;N<=143;N++)F.push(8);for(;N<=255;N++)F.push(9);for(;N<=279;N++)F.push(7);for(;N<=287;N++)F.push(8);$a(F,Se,288)})();var Ea=function(){for(var N=Q?new Uint8Array(32768):[],F=0,O=0;F<re.length-1;++F)for(;O<re[F+1];++O)N[O]=F;for(;O<32768;++O)N[O]=29;var C=Q?new Uint8Array(259):[];for(F=0,O=0;F<X.length-1;++F)for(;O<X[F+1];++O)C[O]=F;function R(Y,V){for(var j=0;j<Y.length;){var J=Math.min(65535,Y.length-j),le=j+J==Y.length;for(V.write_shift(1,+le),V.write_shift(2,J),V.write_shift(2,~J&65535);J-- >0;)V[V.l++]=Y[j++]}return V.l}function K(Y,V){for(var j=0,J=0,le=Q?new Uint16Array(32768):[];J<Y.length;){var _e=Math.min(65535,Y.length-J);if(_e<10){for(j=ir(V,j,+(J+_e==Y.length)),j&7&&(j+=8-(j&7)),V.l=j/8|0,V.write_shift(2,_e),V.write_shift(2,~_e&65535);_e-- >0;)V[V.l++]=Y[J++];j=V.l*8;continue}j=ir(V,j,+(J+_e==Y.length)+2);for(var Ee=0;_e-- >0;){var ue=Y[J];Ee=(Ee<<5^ue)&32767;var ge=-1,qe=0;if((ge=le[Ee])&&(ge|=J&-32768,ge>J&&(ge-=32768),ge<J))for(;Y[ge+qe]==Y[J+qe]&&qe<250;)++qe;if(qe>2){ue=C[qe],ue<=22?j=Fa(V,j,q[ue+1]>>1)-1:(Fa(V,j,3),j+=5,Fa(V,j,q[ue-23]>>5),j+=3);var Er=ue<8?0:ue-4>>2;Er>0&&(Et(V,j,qe-X[ue]),j+=Er),ue=N[J-ge],j=Fa(V,j,q[ue]>>3),j-=3;var Mr=ue<4?0:ue-2>>1;Mr>0&&(Et(V,j,J-ge-re[ue]),j+=Mr);for(var $r=0;$r<qe;++$r)le[Ee]=J&32767,Ee=(Ee<<5^Y[J])&32767,++J;_e-=qe-1}else ue<=143?ue=ue+48:j=ya(V,j,1),j=Fa(V,j,q[ue]),le[Ee]=J&32767,++J}j=Fa(V,j,0)-1}return V.l=(j+7)/8|0,V.l}return function(V,j){return V.length<8?R(V,j):K(V,j)}}();function Qe(k){var N=ae(50+Math.floor(k.length*1.1)),F=Ea(k,N);return N.slice(0,F)}var br=Q?new Uint16Array(32768):ka(32768),me=Q?new Uint16Array(32768):ka(32768),Fr=Q?new Uint16Array(128):ka(128),Cr=1,hr=1;function kr(k,N){var F=Le(k,N)+257;N+=5;var O=Le(k,N)+1;N+=5;var C=je(k,N)+4;N+=4;for(var R=0,K=Q?new Uint8Array(19):ka(19),Y=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],V=1,j=Q?new Uint8Array(8):ka(8),J=Q?new Uint8Array(8):ka(8),le=K.length,_e=0;_e<C;++_e)K[b[_e]]=R=Ie(k,N),V<R&&(V=R),j[R]++,N+=3;var Ee=0;for(j[0]=0,_e=1;_e<=V;++_e)J[_e]=Ee=Ee+j[_e-1]<<1;for(_e=0;_e<le;++_e)(Ee=K[_e])!=0&&(Y[_e]=J[Ee]++);var ue=0;for(_e=0;_e<le;++_e)if(ue=K[_e],ue!=0){Ee=q[Y[_e]]>>8-ue;for(var ge=(1<<7-ue)-1;ge>=0;--ge)Fr[Ee|ge<<ue]=ue&7|_e<<3}var qe=[];for(V=1;qe.length<F+O;)switch(Ee=Fr[ie(k,N)],N+=Ee&7,Ee>>>=3){case 16:for(R=3+Pe(k,N),N+=2,Ee=qe[qe.length-1];R-- >0;)qe.push(Ee);break;case 17:for(R=3+Ie(k,N),N+=3;R-- >0;)qe.push(0);break;case 18:for(R=11+ie(k,N),N+=7;R-- >0;)qe.push(0);break;default:qe.push(Ee),V<Ee&&(V=Ee);break}var Er=qe.slice(0,F),Mr=qe.slice(F);for(_e=F;_e<286;++_e)Er[_e]=0;for(_e=O;_e<30;++_e)Mr[_e]=0;return Cr=$a(Er,br,286),hr=$a(Mr,me,30),N}function ha(k,N){if(k[0]==3&&!(k[1]&3))return[t0(N),2];for(var F=0,O=0,C=Uc(N||1<<18),R=0,K=C.length>>>0,Y=0,V=0;(O&1)==0;){if(O=Ie(k,F),F+=3,O>>>1)O>>1==1?(Y=9,V=5):(F=kr(k,F),Y=Cr,V=hr);else{F&7&&(F+=8-(F&7));var j=k[F>>>3]|k[(F>>>3)+1]<<8;if(F+=32,j>0)for(!N&&K<R+j&&(C=Ja(C,R+j),K=C.length);j-- >0;)C[R++]=k[F>>>3],F+=8;continue}for(;;){!N&&K<R+32767&&(C=Ja(C,R+32767),K=C.length);var J=ur(k,F,Y),le=O>>>1==1?Se[J]:br[J];if(F+=le&15,le>>>=4,(le>>>8&255)===0)C[R++]=le;else{if(le==256)break;le-=257;var _e=le<8?0:le-4>>2;_e>5&&(_e=0);var Ee=R+X[le];_e>0&&(Ee+=ur(k,F,_e),F+=_e),J=ur(k,F,V),le=O>>>1==1?Ne[J]:me[J],F+=le&15,le>>>=4;var ue=le<4?0:le-2>>1,ge=re[le];for(ue>0&&(ge+=ur(k,F,ue),F+=ue),!N&&K<Ee&&(C=Ja(C,Ee+100),K=C.length);R<Ee;)C[R]=C[R-ge],++R}}}return N?[C,F+7>>>3]:[C.slice(0,R),F+7>>>3]}function ra(k,N){var F=k.slice(k.l||0),O=ha(F,N);return k.l+=O[1],O[0]}function We(k,N){if(k)typeof console<"u"&&console.error(N);else throw new Error(N)}function Kr(k,N){var F=k;tt(F,0);var O=[],C=[],R={FileIndex:O,FullPaths:C};T(R,{root:N.root});for(var K=F.length-4;(F[K]!=80||F[K+1]!=75||F[K+2]!=5||F[K+3]!=6)&&K>=0;)--K;F.l=K+4,F.l+=4;var Y=F.read_shift(2);F.l+=6;var V=F.read_shift(4);for(F.l=V,K=0;K<Y;++K){F.l+=20;var j=F.read_shift(4),J=F.read_shift(4),le=F.read_shift(2),_e=F.read_shift(2),Ee=F.read_shift(2);F.l+=8;var ue=F.read_shift(4),ge=f(F.slice(F.l+le,F.l+le+_e));F.l+=le+_e+Ee;var qe=F.l;F.l=ue+4,ta(F,j,J,R,ge),F.l=qe}return R}function ta(k,N,F,O,C){k.l+=2;var R=k.read_shift(2),K=k.read_shift(2),Y=s(k);if(R&8257)throw new Error("Unsupported ZIP encryption");for(var V=k.read_shift(4),j=k.read_shift(4),J=k.read_shift(4),le=k.read_shift(2),_e=k.read_shift(2),Ee="",ue=0;ue<le;++ue)Ee+=String.fromCharCode(k[k.l++]);if(_e){var ge=f(k.slice(k.l,k.l+_e));(ge[21589]||{}).mt&&(Y=ge[21589].mt),((C||{})[21589]||{}).mt&&(Y=C[21589].mt)}k.l+=_e;var qe=k.slice(k.l,k.l+j);switch(K){case 8:qe=A(k,J);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+K)}var Er=!1;R&8&&(V=k.read_shift(4),V==134695760&&(V=k.read_shift(4),Er=!0),j=k.read_shift(4),J=k.read_shift(4)),j!=N&&We(Er,"Bad compressed size: "+N+" != "+j),J!=F&&We(Er,"Bad uncompressed size: "+F+" != "+J),vt(O,Ee,qe,{unsafe:!0,mt:Y})}function Ta(k,N){var F=N||{},O=[],C=[],R=ae(1),K=F.compression?8:0,Y=0,V=0,j=0,J=0,le=0,_e=k.FullPaths[0],Ee=_e,ue=k.FileIndex[0],ge=[],qe=0;for(V=1;V<k.FullPaths.length;++V)if(Ee=k.FullPaths[V].slice(_e.length),ue=k.FileIndex[V],!(!ue.size||!ue.content||Ee=="Sh33tJ5")){var Er=J,Mr=ae(Ee.length);for(j=0;j<Ee.length;++j)Mr.write_shift(1,Ee.charCodeAt(j)&127);Mr=Mr.slice(0,Mr.l),ge[le]=Fx.buf(ue.content,0);var $r=ue.content;K==8&&($r=D($r)),R=ae(30),R.write_shift(4,67324752),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),ue.mt?i(R,ue.mt):R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),J+=R.length,O.push(R),J+=Mr.length,O.push(Mr),J+=$r.length,O.push($r),R=ae(46),R.write_shift(4,33639248),R.write_shift(2,0),R.write_shift(2,20),R.write_shift(2,Y),R.write_shift(2,K),R.write_shift(4,0),R.write_shift(-4,ge[le]),R.write_shift(4,$r.length),R.write_shift(4,ue.content.length),R.write_shift(2,Mr.length),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(4,0),R.write_shift(4,Er),qe+=R.l,C.push(R),qe+=Mr.length,C.push(Mr),++le}return R=ae(22),R.write_shift(4,101010256),R.write_shift(2,0),R.write_shift(2,0),R.write_shift(2,le),R.write_shift(2,le),R.write_shift(4,qe),R.write_shift(4,J),R.write_shift(2,0),ja([ja(O),ja(C),R])}var ua={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function fr(k,N){if(k.ctype)return k.ctype;var F=k.name||"",O=F.match(/\.([^\.]+)$/);return O&&ua[O[1]]||N&&(O=(F=N).match(/[\.\\]([^\.\\])+$/),O&&ua[O[1]])?ua[O[1]]:"application/octet-stream"}function wr(k){for(var N=Bi(k),F=[],O=0;O<N.length;O+=76)F.push(N.slice(O,O+76));return F.join(`\r
|
|
2
2
|
`)+`\r
|
|
3
3
|
`}function Oa(k){var N=k.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(j){var J=j.charCodeAt(0).toString(16).toUpperCase();return"="+(J.length==1?"0"+J:J)});N=N.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),N.charAt(0)==`
|
|
4
4
|
`&&(N="=0D"+N.slice(1)),N=N.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
|