ss-component-new 1.2.19 → 1.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/{animationData-DHZB79in.js → animationData-BgVD7m_Z.js} +4 -4
  2. package/dist/{animationData-CM-r9wyr.cjs → animationData-CMbPkqzG.cjs} +1 -1
  3. package/dist/{array-DtLHXuRQ.cjs → array-CFSAyjws.cjs} +1 -1
  4. package/dist/{array-lSB-nT70.js → array-DPyu0w54.js} +2 -2
  5. package/dist/{index-BdpUfLri.cjs → index-10VrsYdM.cjs} +1 -1
  6. package/dist/{index-BA5XOzgo.js → index-B0IAWN2b.js} +6 -6
  7. package/dist/{index-CQF_xosZ.cjs → index-B1GAMEgu.cjs} +1 -1
  8. package/dist/{index-Cwgs7EkD.js → index-B1XSRq6_.js} +1 -1
  9. package/dist/index-B3GHAekq.cjs +1 -0
  10. package/dist/{index-qagc_PIZ.js → index-B3VR9DS9.js} +127 -127
  11. package/dist/{index-CYp77kPp.js → index-B42dCx1W.js} +35 -35
  12. package/dist/{index-BXBJvXWT.js → index-BHMxqTVw.js} +1 -1
  13. package/dist/{index-BZPwTn-e.js → index-BISAvhZU.js} +3 -3
  14. package/dist/{index-B66Gznvh.cjs → index-BIvF4-_X.cjs} +1 -1
  15. package/dist/{index-DLovX_qy.js → index-BIxz3VQK.js} +11 -11
  16. package/dist/{index-CDLzfr4U.js → index-BKM1OHVI.js} +2 -2
  17. package/dist/{index-CYe2gI66.cjs → index-BKPxS6l5.cjs} +1 -1
  18. package/dist/{index-CCZA5OMk.js → index-BKd-eN-X.js} +45 -45
  19. package/dist/{index-d7fMw53g.cjs → index-BSzMEymQ.cjs} +1 -1
  20. package/dist/{index-C0lRDd5G.cjs → index-BVORb8w5.cjs} +1 -1
  21. package/dist/{index-CJ18eFLi.cjs → index-BaEflW9q.cjs} +1 -1
  22. package/dist/{index-C461j30b.js → index-Bgje9P6C.js} +1 -1
  23. package/dist/{index-CKvtRDgL.cjs → index-Bm44NMcZ.cjs} +1 -1
  24. package/dist/{index-DoJxkMbN.js → index-BnP-OVLZ.js} +19 -19
  25. package/dist/{index-CUm-3IJT.cjs → index-BoBLST3L.cjs} +1 -1
  26. package/dist/{index-Cp9R4hVX.cjs → index-Bpa1jsWq.cjs} +1 -1
  27. package/dist/{index-DW-CHCUy.js → index-BsorG9sX.js} +3 -3
  28. package/dist/{index-CohL-xT-.js → index-Byuw-d13.js} +2 -2
  29. package/dist/{index-DWyHMwpG.js → index-CETOzEkF.js} +6 -6
  30. package/dist/{index-BwjuTBrR.js → index-CFrBvay9.js} +1 -1
  31. package/dist/{index-ClF5mrVY.cjs → index-CPVt8Wrk.cjs} +1 -1
  32. package/dist/{index-BkRpCoTx.cjs → index-CTVVACAH.cjs} +1 -1
  33. package/dist/{index-ct6Uwcq4.cjs → index-CahUIEFl.cjs} +1 -1
  34. package/dist/{index--LhAkpOq.cjs → index-CbslhDEf.cjs} +1 -1
  35. package/dist/{index-Dw4KeMlJ.cjs → index-Cu7pB5GB.cjs} +1 -1
  36. package/dist/{index-Cf79bLZO.js → index-Cu_QyXxB.js} +2 -2
  37. package/dist/{index-DcmGr3J0.cjs → index-CyqP7oeY.cjs} +1 -1
  38. package/dist/{index-BKgbkArH.cjs → index-CyzuptEh.cjs} +1 -1
  39. package/dist/{index-n6maO8qu.js → index-D0fqSkIt.js} +2 -2
  40. package/dist/{index-BfNqdIOP.js → index-D3w8CFxz.js} +4 -4
  41. package/dist/{index-Cqd0F9a9.js → index-DAkKNbYV.js} +12 -12
  42. package/dist/{index-DhqF2CA-.js → index-DRGXzdw7.js} +2 -2
  43. package/dist/{index-CijoI-9f.js → index-DZgwOX56.js} +6 -6
  44. package/dist/{index-DFXZiHSV.cjs → index-DaOTArXF.cjs} +1 -1
  45. package/dist/{index-9YqHJG26.js → index-DhcAF24X.js} +8 -8
  46. package/dist/{index-BovzU-BN.js → index-DmmUjSu_.js} +4 -4
  47. package/dist/{index-BWHJGJ1e.cjs → index-Do4CoXhH.cjs} +1 -1
  48. package/dist/{index-CAkJ-S5C.cjs → index-DpmVXC_Q.cjs} +1 -1
  49. package/dist/{index-C26I2eIi.cjs → index-DubsCmcm.cjs} +1 -1
  50. package/dist/{index-CAAtUOzM.cjs → index-DwkFRUcM.cjs} +1 -1
  51. package/dist/{index-CvSBsAV7.cjs → index-FGO3o5gd.cjs} +1 -1
  52. package/dist/{index-CutRp0mU.js → index-IplqGB4d.js} +6 -6
  53. package/dist/{index-Ckc2csf3.js → index-Z-Tg_cZ7.js} +2 -2
  54. package/dist/{index-CY02zKVE.cjs → index-bL_GpYsf.cjs} +1 -1
  55. package/dist/{index-CqnPwWag.js → index-lzrjiUS5.js} +2 -2
  56. package/dist/{index-Cd58A7uv.cjs → index-rhNfaMfG.cjs} +1 -1
  57. package/dist/{index-B19xwKx1.js → index-sUsojzpW.js} +1 -1
  58. package/dist/{index-CwVl7hYK.js → index-w38DtIEl.js} +6 -6
  59. package/dist/{index-BdioXHog.js → index-x1q2XfBL.js} +12 -12
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CqTDROhf.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Be4dFvUC.js} +2 -2
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DMNlG9dC.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CIRzfvAn.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DZZXEjAk.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-6zdxGopn.js} +13 -13
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CM9szr9Y.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-97ZyXl6J.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DCpKvb-8.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BgIXU87c.js} +11641 -11513
  65. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CY0MiFwy.cjs +56 -0
  66. package/dist/{index.vue_vue_type_style_index_1_lang-CecxMizO.cjs → index.vue_vue_type_style_index_1_lang-29vzgcAi.cjs} +1 -1
  67. package/dist/{index.vue_vue_type_style_index_1_lang-BswQV5Lr.js → index.vue_vue_type_style_index_1_lang-CtkjAjQ8.js} +3 -3
  68. package/dist/index.vue_vue_type_style_index_1_lang-DUZFMfkl.js +8310 -0
  69. package/dist/index.vue_vue_type_style_index_1_lang-ckXQqCiT.cjs +32 -0
  70. package/dist/{isString-BNK38WbE.js → isString-BrYdkZh8.js} +1 -1
  71. package/dist/{main-oZpjzC8J.cjs → main-Bt-9WV5Z.cjs} +1 -1
  72. package/dist/{main-DD4ds9VF.js → main-DNN-2mgC.js} +5 -5
  73. package/dist/ss-component.cjs +1 -1
  74. package/dist/ss-component.css +1 -1
  75. package/dist/ss-component.js +11 -11
  76. package/dist/ss-component2.cjs +1 -1
  77. package/dist/ss-component2.js +12 -12
  78. package/dist/{threeLatheView-Bp0kjo_V.js → threeLatheView-DuqX5kKf.js} +2 -2
  79. package/dist/{threeModel-CFk-bjEz.cjs → threeModel-14TQ7qah.cjs} +1 -1
  80. package/dist/{threeModel-od894OgJ.js → threeModel-KPFJkl4n.js} +3 -3
  81. package/dist/{threePreview-DFFjm93P.js → threePreview-B7C8gY5w.js} +1 -1
  82. package/dist/{threeSceneView-DKa3NvXL.cjs → threeSceneView-Bb-MdEV9.cjs} +1 -1
  83. package/dist/{threeSceneView-J9yJnd-8.js → threeSceneView-SrIIrGLz.js} +8 -8
  84. package/dist/{threeSceneViewForCPMPIP-C9RBmFtK.js → threeSceneViewForCPMPIP-CN_9lSRm.js} +25 -25
  85. package/dist/{threeSceneViewForCPMPIP-cGJ49EX2.cjs → threeSceneViewForCPMPIP-Da6YyhFH.cjs} +1 -1
  86. package/dist/{threeViewerHost-Cpea-3lX.js → threeViewerHost-BwiicdtA.js} +10 -10
  87. package/dist/{threeViewerHost-DqllErXG.cjs → threeViewerHost-U-AzJqIN.cjs} +1 -1
  88. package/dist/{useRayCaster-B2SPBFYC.js → useRayCaster-Bx73bXeL.js} +1 -1
  89. package/dist/{useRayCaster-CjOF8Be7.cjs → useRayCaster-CnW80o7b.cjs} +1 -1
  90. package/package.json +1 -1
  91. package/dist/index-BRbH6lIH.cjs +0 -1
  92. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-_Oz7xRLf.cjs +0 -56
  93. package/dist/index.vue_vue_type_style_index_1_lang-CT_2jezv.cjs +0 -32
  94. package/dist/index.vue_vue_type_style_index_1_lang-DMXip4Xp.js +0 -8260
@@ -0,0 +1,32 @@
1
+ "use strict";const h=require("./index-1z9RrjZc.cjs"),l=require("vue");function mo(e){return e}function _a(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)}var Ka=800,Ha=16,$a=Date.now;function Ua(e){var n=0,t=0;return function(){var r=$a(),i=Ha-(r-t);if(t=r,i>0){if(++n>=Ka)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function za(e){return function(){return e}}var qa=h.defineProperty?function(e,n){return h.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:za(n),writable:!0})}:mo,bo=Ua(qa),Ci=Math.max;function So(e,n,t){return n=Ci(n===void 0?e.length-1:n,0),function(){for(var r=arguments,i=-1,o=Ci(r.length-n,0),a=Array(o);++i<o;)a[i]=r[n+i];i=-1;for(var s=Array(n+1);++i<n;)s[i]=r[i];return s[n]=t(a),_a(e,this,s)}}var Ri=h.Symbol?h.Symbol.isConcatSpreadable:void 0;function ja(e){return h.isArray(e)||h.isArguments(e)||!!(Ri&&e&&e[Ri])}function Sr(e,n,t,r,i){var o=-1,a=e.length;for(t||(t=ja),i||(i=[]);++o<a;){var s=e[o];n>0&&t(s)?n>1?Sr(s,n-1,t,r,i):h.arrayPush(i,s):r||(i[i.length]=s)}return i}function Eo(e){var n=e==null?0:e.length;return n?Sr(e,1):[]}function To(e){return bo(So(e,void 0,Eo),e+"")}var Ga="__lodash_hash_undefined__";function Wa(e){return this.__data__.set(e,Ga),this}function Ya(e){return this.__data__.has(e)}function Yt(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new h.MapCache;++n<t;)this.add(e[n])}Yt.prototype.add=Yt.prototype.push=Wa;Yt.prototype.has=Ya;function Ja(e,n){for(var t=-1,r=e==null?0:e.length;++t<r;)if(n(e[t],t,e))return!0;return!1}function ko(e,n){return e.has(n)}var Za=1,Xa=2;function Do(e,n,t,r,i,o){var a=t&Za,s=e.length,c=n.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e),p=o.get(n);if(u&&p)return u==n&&p==e;var f=-1,d=!0,y=t&Xa?new Yt:void 0;for(o.set(e,n),o.set(n,e);++f<s;){var v=e[f],b=n[f];if(r)var g=a?r(b,v,f,n,e,o):r(v,b,f,e,n,o);if(g!==void 0){if(g)continue;d=!1;break}if(y){if(!Ja(n,function(m,E){if(!ko(y,E)&&(v===m||i(v,m,t,r,o)))return y.push(E)})){d=!1;break}}else if(!(v===b||i(v,b,t,r,o))){d=!1;break}}return o.delete(e),o.delete(n),d}function Qa(e){var n=-1,t=Array(e.size);return e.forEach(function(r,i){t[++n]=[i,r]}),t}function Ao(e){var n=-1,t=Array(e.size);return e.forEach(function(r){t[++n]=r}),t}var es=1,ts=2,ns="[object Boolean]",rs="[object Date]",is="[object Error]",os="[object Map]",as="[object Number]",ss="[object RegExp]",ls="[object Set]",us="[object String]",cs="[object Symbol]",fs="[object ArrayBuffer]",hs="[object DataView]",Mi=h.Symbol?h.Symbol.prototype:void 0,$n=Mi?Mi.valueOf:void 0;function ps(e,n,t,r,i,o,a){switch(t){case hs:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case fs:return!(e.byteLength!=n.byteLength||!o(new h.Uint8Array(e),new h.Uint8Array(n)));case ns:case rs:case as:return h.eq(+e,+n);case is:return e.name==n.name&&e.message==n.message;case ss:case us:return e==n+"";case os:var s=Qa;case ls:var c=r&es;if(s||(s=Ao),e.size!=n.size&&!c)return!1;var u=a.get(e);if(u)return u==n;r|=ts,a.set(e,n);var p=Do(s(e),s(n),r,i,o,a);return a.delete(e),p;case cs:if($n)return $n.call(e)==$n.call(n)}return!1}var ds=1,ys=Object.prototype,gs=ys.hasOwnProperty;function vs(e,n,t,r,i,o){var a=t&ds,s=h.getAllKeys(e),c=s.length,u=h.getAllKeys(n),p=u.length;if(c!=p&&!a)return!1;for(var f=c;f--;){var d=s[f];if(!(a?d in n:gs.call(n,d)))return!1}var y=o.get(e),v=o.get(n);if(y&&v)return y==n&&v==e;var b=!0;o.set(e,n),o.set(n,e);for(var g=a;++f<c;){d=s[f];var m=e[d],E=n[d];if(r)var O=a?r(E,m,d,n,e,o):r(m,E,d,e,n,o);if(!(O===void 0?m===E||i(m,E,t,r,o):O)){b=!1;break}g||(g=d=="constructor")}if(b&&!g){var k=e.constructor,x=n.constructor;k!=x&&"constructor"in e&&"constructor"in n&&!(typeof k=="function"&&k instanceof k&&typeof x=="function"&&x instanceof x)&&(b=!1)}return o.delete(e),o.delete(n),b}var ms=1,Oi="[object Arguments]",Ni="[object Array]",an="[object Object]",bs=Object.prototype,Pi=bs.hasOwnProperty;function Ss(e,n,t,r,i,o){var a=h.isArray(e),s=h.isArray(n),c=a?Ni:h.getTag(e),u=s?Ni:h.getTag(n);c=c==Oi?an:c,u=u==Oi?an:u;var p=c==an,f=u==an,d=c==u;if(d&&h.isBuffer(e)){if(!h.isBuffer(n))return!1;a=!0,p=!1}if(d&&!p)return o||(o=new h.Stack),a||h.isTypedArray(e)?Do(e,n,t,r,i,o):ps(e,n,c,t,r,i,o);if(!(t&ms)){var y=p&&Pi.call(e,"__wrapped__"),v=f&&Pi.call(n,"__wrapped__");if(y||v){var b=y?e.value():e,g=v?n.value():n;return o||(o=new h.Stack),i(b,g,t,r,o)}}return d?(o||(o=new h.Stack),vs(e,n,t,r,i,o)):!1}function Er(e,n,t,r,i){return e===n?!0:e==null||n==null||!h.isObjectLike(e)&&!h.isObjectLike(n)?e!==e&&n!==n:Ss(e,n,t,r,Er,i)}function Es(e,n){return e!=null&&n in Object(e)}function Ts(e,n,t){n=h.castPath(n,e);for(var r=-1,i=n.length,o=!1;++r<i;){var a=h.toKey(n[r]);if(!(o=e!=null&&t(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&h.isLength(i)&&h.isIndex(a,i)&&(h.isArray(e)||h.isArguments(e)))}function wo(e,n){return e!=null&&Ts(e,n,Es)}function Io(e,n){return Er(e,n)}function ks(e,n,t){for(var r=-1,i=n.length,o={};++r<i;){var a=n[r],s=h.baseGet(e,a);t(s,a)&&h.baseSet(o,h.castPath(a,e),s)}return o}function Ds(e,n){return ks(e,n,function(t,r){return wo(e,r)})}var xo=To(function(e,n){return e==null?{}:Ds(e,n)});const kn="update:modelValue",rr="change",ir="input";function As(e,n,t,r){const i=t-n;return e/=r/2,e<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}const Bo=e=>h.isClient?window.requestAnimationFrame(e):setTimeout(e,16),Co=e=>h.isClient?window.cancelAnimationFrame(e):clearTimeout(e),ws=(e,n)=>{if(!h.isClient)return!1;const t={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(n)],r=h.getStyle(e,t);return["scroll","auto","overlay"].some(i=>r.includes(i))},Is=(e,n)=>{if(!h.isClient)return;let t=e;for(;t;){if([window,document,document.documentElement].includes(t))return window;if(ws(t,n))return t;t=t.parentNode}return t};let sn;const Ro=e=>{var n;if(!h.isClient)return 0;if(sn!==void 0)return sn;const t=document.createElement("div");t.className=`${e}-scrollbar__wrap`,t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const r=t.offsetWidth;t.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",t.appendChild(i);const o=i.offsetWidth;return(n=t.parentNode)==null||n.removeChild(t),sn=r-o,sn};function xs(e,n){if(!h.isClient)return;if(!n){e.scrollTop=0;return}const t=[];let r=n.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)t.push(r),r=r.offsetParent;const i=n.offsetTop+t.reduce((c,u)=>c+u.offsetTop,0),o=i+n.offsetHeight,a=e.scrollTop,s=a+e.clientHeight;i<a?e.scrollTop=i:o>s&&(e.scrollTop=o-e.clientHeight)}function Bs(e,n,t,r,i){const o=Date.now();let a;const s=()=>{const u=Date.now()-o,p=As(u>r?r:u,n,t,r);h.isWindow(e)?e.scrollTo(window.pageXOffset,p):e.scrollTop=p,u<r?a=Bo(s):h.isFunction(i)&&i()};return s(),()=>{a&&Co(a)}}const Cs=(e,n)=>h.isWindow(n)?e.ownerDocument.documentElement:n,Rs=e=>h.isWindow(e)?window.scrollY:e.scrollTop,Mo=()=>h.isClient&&/firefox/i.test(window.navigator.userAgent);let Ve;const Ms={height:"0",visibility:"hidden",overflow:Mo()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Os=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Ns(e){const n=window.getComputedStyle(e),t=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),i=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Os.map(a=>[a,n.getPropertyValue(a)]),paddingSize:r,borderSize:i,boxSizing:t}}function Fi(e,n=1,t){var r;Ve||(Ve=document.createElement("textarea"),document.body.appendChild(Ve));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=Ns(e);s.forEach(([f,d])=>Ve==null?void 0:Ve.style.setProperty(f,d)),Object.entries(Ms).forEach(([f,d])=>Ve==null?void 0:Ve.style.setProperty(f,d,"important")),Ve.value=e.value||e.placeholder||"";let c=Ve.scrollHeight;const u={};a==="border-box"?c=c+o:a==="content-box"&&(c=c-i),Ve.value="";const p=Ve.scrollHeight-i;if(h.isNumber(n)){let f=p*n;a==="border-box"&&(f=f+i+o),c=Math.max(f,c),u.minHeight=`${f}px`}if(h.isNumber(t)){let f=p*t;a==="border-box"&&(f=f+i+o),c=Math.min(f,c)}return u.height=`${c}px`,(r=Ve.parentNode)==null||r.removeChild(Ve),Ve=void 0,u}const Ps=h.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Oo=e=>xo(Ps,e),No=h.buildProps({id:{type:String,default:void 0},size:h.useSizeProp,disabled:Boolean,modelValue:{type:h.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:h.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:h.iconPropType},prefixIcon:{type:h.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:h.definePropType([Object,Array,String]),default:()=>h.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...Oo(["ariaLabel"])}),Fs={[kn]:e=>h.isString(e),input:e=>h.isString(e),change:e=>h.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Ls=["class","style"],Vs=/^on[A-Z]/,Po=(e={})=>{const{excludeListeners:n=!1,excludeKeys:t}=e,r=l.computed(()=>((t==null?void 0:t.value)||[]).concat(Ls)),i=l.getCurrentInstance();return i?l.computed(()=>{var o;return h.fromPairs(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([a])=>!r.value.includes(a)&&!(n&&Vs.test(a))))}):(h.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),l.computed(()=>({})))},or={prefix:Math.floor(Math.random()*1e4),current:0},_s=Symbol("elIdInjection"),Fo=()=>l.getCurrentInstance()?l.inject(_s,or):or,Dn=e=>{const n=Fo();!h.isClient&&n===or&&h.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
2
+ usage: app.provide(ID_INJECTION_KEY, {
3
+ prefix: number,
4
+ current: number,
5
+ })`);const t=h.useGetDerivedNamespace();return h.computedEager(()=>l.unref(e)||`${t.value}-id-${n.prefix}-${n.current++}`)},Mn=Symbol("formContextKey"),Tr=Symbol("formItemContextKey"),kr=()=>{const e=l.inject(Mn,void 0),n=l.inject(Tr,void 0);return{form:e,formItem:n}},Lo=(e,{formItemContext:n,disableIdGeneration:t,disableIdManagement:r})=>{t||(t=l.ref(!1)),r||(r=l.ref(!1));const i=l.ref();let o;const a=l.computed(()=>{var s;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((s=n.inputIds)==null?void 0:s.length)<=1)});return l.onMounted(()=>{o=l.watch([l.toRef(e,"id"),t],([s,c])=>{const u=s??(c?void 0:Dn().value);u!==i.value&&(n!=null&&n.removeInputId&&(i.value&&n.removeInputId(i.value),!(r!=null&&r.value)&&!c&&u&&n.addInputId(u)),i.value=u)},{immediate:!0})}),l.onUnmounted(()=>{o&&o(),n!=null&&n.removeInputId&&i.value&&n.removeInputId(i.value)}),{isLabeledByFormItem:a,inputId:i}},Vo=e=>{const n=l.getCurrentInstance();return l.computed(()=>{var t,r;return(r=(t=n==null?void 0:n.proxy)==null?void 0:t.$props)==null?void 0:r[e]})},Dr=(e,n={})=>{const t=l.ref(void 0),r=n.prop?t:Vo("size"),i=n.global?t:h.useGlobalSize(),o=n.form?{size:void 0}:l.inject(Mn,void 0),a=n.formItem?{size:void 0}:l.inject(Tr,void 0);return l.computed(()=>r.value||l.unref(e)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},Qt=e=>{const n=Vo("disabled"),t=l.inject(Mn,void 0);return l.computed(()=>n.value||l.unref(e)||(t==null?void 0:t.disabled)||!1)},Ks='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Hs=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Li=e=>Array.from(e.querySelectorAll(Ks)).filter(n=>On(n)&&Hs(n)),On=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},$s=function(e,n,...t){let r;n.includes("mouse")||n.includes("click")?r="MouseEvents":n.includes("key")?r="KeyboardEvent":r="HTMLEvents";const i=document.createEvent(r);return i.initEvent(n,...t),e.dispatchEvent(i),e},_o=e=>!e.getAttribute("aria-owns"),Us=(e,n,t)=>{const{parentNode:r}=e;if(!r)return null;const i=r.querySelectorAll(t),o=Array.prototype.indexOf.call(i,e);return i[o+n]||null},zs=e=>{e&&(e.focus(),!_o(e)&&e.click())};function Ko(e,{beforeFocus:n,afterFocus:t,beforeBlur:r,afterBlur:i}={}){const o=l.getCurrentInstance(),{emit:a}=o,s=l.shallowRef(),c=Qt(),u=l.ref(!1),p=y=>{h.isFunction(n)&&n(y)||u.value||(u.value=!0,a("focus",y),t==null||t())},f=y=>{var v;h.isFunction(r)&&r(y)||y.relatedTarget&&((v=s.value)!=null&&v.contains(y.relatedTarget))||(u.value=!1,a("blur",y),i==null||i())},d=y=>{var v,b;(v=s.value)!=null&&v.contains(document.activeElement)&&s.value!==document.activeElement||On(y.target)||c.value||(b=e.value)==null||b.focus()};return l.watch([s,c],([y,v])=>{y&&(v?y.removeAttribute("tabindex"):y.setAttribute("tabindex","-1"))}),h.useEventListener(s,"focus",p,!0),h.useEventListener(s,"blur",f,!0),h.useEventListener(s,"click",d,!0),process.env.NODE_ENV==="test"&&l.onMounted(()=>{const y=h.isElement(e.value)?e.value:document.querySelector("input,textarea");y&&(h.useEventListener(y,"focus",p,!0),h.useEventListener(y,"blur",f,!0))}),{isFocused:u,wrapperRef:s,handleFocus:p,handleBlur:f}}const qs=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function Ho({afterComposition:e,emit:n}){const t=l.ref(!1),r=s=>{n==null||n("compositionstart",s),t.value=!0},i=s=>{var c;n==null||n("compositionupdate",s);const u=(c=s.target)==null?void 0:c.value,p=u[u.length-1]||"";t.value=!qs(p)},o=s=>{n==null||n("compositionend",s),t.value&&(t.value=!1,l.nextTick(()=>e(s)))};return{isComposing:t,handleComposition:s=>{s.type==="compositionend"?o(s):i(s)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:o}}function js(e){let n;function t(){if(e.value==null)return;const{selectionStart:i,selectionEnd:o,value:a}=e.value;if(i==null||o==null)return;const s=a.slice(0,Math.max(0,i)),c=a.slice(Math.max(0,o));n={selectionStart:i,selectionEnd:o,value:a,beforeTxt:s,afterTxt:c}}function r(){if(e.value==null||n==null)return;const{value:i}=e.value,{beforeTxt:o,afterTxt:a,selectionStart:s}=n;if(o==null||a==null||s==null)return;let c=i.length;if(i.endsWith(a))c=i.length-a.length;else if(i.startsWith(o))c=o.length;else{const u=o[s-1],p=i.indexOf(u,s-1);p!==-1&&(c=p+1)}e.value.setSelectionRange(c,c)}return[t,r]}const $o="ElInput",Gs=l.defineComponent({name:$o,inheritAttrs:!1}),Ws=l.defineComponent({...Gs,props:No,emits:Fs,setup(e,{expose:n,emit:t}){const r=e,i=l.useAttrs(),o=Po(),a=l.useSlots(),s=l.computed(()=>[r.type==="textarea"?b.b():v.b(),v.m(d.value),v.is("disabled",y.value),v.is("exceed",M.value),{[v.b("group")]:a.prepend||a.append,[v.m("prefix")]:a.prefix||r.prefixIcon,[v.m("suffix")]:a.suffix||r.suffixIcon||r.clearable||r.showPassword,[v.bm("suffix","password-clear")]:Z.value&&ne.value,[v.b("hidden")]:r.type==="hidden"},i.class]),c=l.computed(()=>[v.e("wrapper"),v.is("focus",D.value)]),{form:u,formItem:p}=kr(),{inputId:f}=Lo(r,{formItemContext:p}),d=Dr(),y=Qt(),v=h.useNamespace("input"),b=h.useNamespace("textarea"),g=l.shallowRef(),m=l.shallowRef(),E=l.ref(!1),O=l.ref(!1),k=l.ref(),x=l.shallowRef(r.inputStyle),I=l.computed(()=>g.value||m.value),{wrapperRef:w,isFocused:D,handleFocus:H,handleBlur:T}=Ko(I,{beforeFocus(){return y.value},afterBlur(){var P;r.validateEvent&&((P=p==null?void 0:p.validate)==null||P.call(p,"blur").catch(de=>h.debugWarn(de)))}}),B=l.computed(()=>{var P;return(P=u==null?void 0:u.statusIcon)!=null?P:!1}),_=l.computed(()=>(p==null?void 0:p.validateState)||""),F=l.computed(()=>_.value&&h.ValidateComponentsMap[_.value]),Q=l.computed(()=>O.value?h.view_default:h.hide_default),X=l.computed(()=>[i.style]),K=l.computed(()=>[r.inputStyle,x.value,{resize:r.resize}]),$=l.computed(()=>h.isNil(r.modelValue)?"":String(r.modelValue)),Z=l.computed(()=>r.clearable&&!y.value&&!r.readonly&&!!$.value&&(D.value||E.value)),ne=l.computed(()=>r.showPassword&&!y.value&&!!$.value),j=l.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!y.value&&!r.readonly&&!r.showPassword),z=l.computed(()=>$.value.length),M=l.computed(()=>!!j.value&&z.value>Number(r.maxlength)),q=l.computed(()=>!!a.suffix||!!r.suffixIcon||Z.value||r.showPassword||j.value||!!_.value&&B.value),[G,ee]=js(g);h.useResizeObserver(m,P=>{if(pe(),!j.value||r.resize!=="both")return;const de=P[0],{width:Je}=de.contentRect;k.value={right:`calc(100% - ${Je+15+6}px)`}});const fe=()=>{const{type:P,autosize:de}=r;if(!(!h.isClient||P!=="textarea"||!m.value))if(de){const Je=h.isObject$1(de)?de.minRows:void 0,Lt=h.isObject$1(de)?de.maxRows:void 0,Vt=Fi(m.value,Je,Lt);x.value={overflowY:"hidden",...Vt},l.nextTick(()=>{m.value.offsetHeight,x.value=Vt})}else x.value={minHeight:Fi(m.value).minHeight}},pe=(P=>{let de=!1;return()=>{var Je;if(de||!r.autosize)return;((Je=m.value)==null?void 0:Je.offsetParent)===null||(P(),de=!0)}})(fe),me=()=>{const P=I.value,de=r.formatter?r.formatter($.value):$.value;!P||P.value===de||(P.value=de)},te=async P=>{G();let{value:de}=P.target;if(r.formatter&&r.parser&&(de=r.parser(de)),!ke.value){if(de===$.value){me();return}t(kn,de),t(ir,de),await l.nextTick(),me(),ee()}},Ae=P=>{let{value:de}=P.target;r.formatter&&r.parser&&(de=r.parser(de)),t(rr,de)},{isComposing:ke,handleCompositionStart:U,handleCompositionUpdate:V,handleCompositionEnd:ye}=Ho({emit:t,afterComposition:te}),Ge=()=>{G(),O.value=!O.value,setTimeout(ee)},ze=()=>{var P;return(P=I.value)==null?void 0:P.focus()},ue=()=>{var P;return(P=I.value)==null?void 0:P.blur()},We=P=>{E.value=!1,t("mouseleave",P)},_e=P=>{E.value=!0,t("mouseenter",P)},we=P=>{t("keydown",P)},yt=()=>{var P;(P=I.value)==null||P.select()},Ye=()=>{t(kn,""),t(rr,""),t("clear"),t(ir,"")};return l.watch(()=>r.modelValue,()=>{var P;l.nextTick(()=>fe()),r.validateEvent&&((P=p==null?void 0:p.validate)==null||P.call(p,"change").catch(de=>h.debugWarn(de)))}),l.watch($,()=>me()),l.watch(()=>r.type,async()=>{await l.nextTick(),me(),fe()}),l.onMounted(()=>{!r.formatter&&r.parser&&h.debugWarn($o,"If you set the parser, you also need to set the formatter."),me(),l.nextTick(fe)}),n({input:g,textarea:m,ref:I,textareaStyle:K,autosize:l.toRef(r,"autosize"),isComposing:ke,focus:ze,blur:ue,select:yt,clear:Ye,resizeTextarea:fe}),(P,de)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([l.unref(s),{[l.unref(v).bm("group","append")]:P.$slots.append,[l.unref(v).bm("group","prepend")]:P.$slots.prepend}]),style:l.normalizeStyle(l.unref(X)),onMouseenter:_e,onMouseleave:We},[l.createCommentVNode(" input "),P.type!=="textarea"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createCommentVNode(" prepend slot "),P.$slots.prepend?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(l.unref(v).be("group","prepend"))},[l.renderSlot(P.$slots,"prepend")],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{ref_key:"wrapperRef",ref:w,class:l.normalizeClass(l.unref(c))},[l.createCommentVNode(" prefix slot "),P.$slots.prefix||P.prefixIcon?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(v).e("prefix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(v).e("prefix-inner"))},[l.renderSlot(P.$slots,"prefix"),P.prefixIcon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:0,class:l.normalizeClass(l.unref(v).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(P.prefixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("input",l.mergeProps({id:l.unref(f),ref_key:"input",ref:g,class:l.unref(v).e("inner")},l.unref(o),{minlength:P.minlength,maxlength:P.maxlength,type:P.showPassword?O.value?"text":"password":P.type,disabled:l.unref(y),readonly:P.readonly,autocomplete:P.autocomplete,tabindex:P.tabindex,"aria-label":P.ariaLabel,placeholder:P.placeholder,style:P.inputStyle,form:P.form,autofocus:P.autofocus,role:P.containerRole,onCompositionstart:l.unref(U),onCompositionupdate:l.unref(V),onCompositionend:l.unref(ye),onInput:te,onChange:Ae,onKeydown:we}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),l.createCommentVNode(" suffix slot "),l.unref(q)?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(l.unref(v).e("suffix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(v).e("suffix-inner"))},[!l.unref(Z)||!l.unref(ne)||!l.unref(j)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(P.$slots,"suffix"),P.suffixIcon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:0,class:l.normalizeClass(l.unref(v).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(P.suffixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],64)):l.createCommentVNode("v-if",!0),l.unref(Z)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1,class:l.normalizeClass([l.unref(v).e("icon"),l.unref(v).e("clear")]),onMousedown:l.withModifiers(l.unref(h.NOOP),["prevent"]),onClick:Ye},{default:l.withCtx(()=>[l.createVNode(l.unref(h.circle_close_default))]),_:1},8,["class","onMousedown"])):l.createCommentVNode("v-if",!0),l.unref(ne)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:2,class:l.normalizeClass([l.unref(v).e("icon"),l.unref(v).e("password")]),onClick:Ge},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(Q))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.unref(j)?(l.openBlock(),l.createElementBlock("span",{key:3,class:l.normalizeClass(l.unref(v).e("count"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(v).e("count-inner"))},l.toDisplayString(l.unref(z))+" / "+l.toDisplayString(P.maxlength),3)],2)):l.createCommentVNode("v-if",!0),l.unref(_)&&l.unref(F)&&l.unref(B)?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:4,class:l.normalizeClass([l.unref(v).e("icon"),l.unref(v).e("validateIcon"),l.unref(v).is("loading",l.unref(_)==="validating")])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(F))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0)],2),l.createCommentVNode(" append slot "),P.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(v).be("group","append"))},[l.renderSlot(P.$slots,"append")],2)):l.createCommentVNode("v-if",!0)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createCommentVNode(" textarea "),l.createElementVNode("textarea",l.mergeProps({id:l.unref(f),ref_key:"textarea",ref:m,class:[l.unref(b).e("inner"),l.unref(v).is("focus",l.unref(D))]},l.unref(o),{minlength:P.minlength,maxlength:P.maxlength,tabindex:P.tabindex,disabled:l.unref(y),readonly:P.readonly,autocomplete:P.autocomplete,style:l.unref(K),"aria-label":P.ariaLabel,placeholder:P.placeholder,form:P.form,autofocus:P.autofocus,rows:P.rows,role:P.containerRole,onCompositionstart:l.unref(U),onCompositionupdate:l.unref(V),onCompositionend:l.unref(ye),onInput:te,onFocus:l.unref(H),onBlur:l.unref(T),onChange:Ae,onKeydown:we}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),l.unref(j)?(l.openBlock(),l.createElementBlock("span",{key:0,style:l.normalizeStyle(k.value),class:l.normalizeClass(l.unref(v).e("count"))},l.toDisplayString(l.unref(z))+" / "+l.toDisplayString(P.maxlength),7)):l.createCommentVNode("v-if",!0)],64))],38))}});var Ys=h._export_sfc(Ws,[["__file","input.vue"]]);const Uo=h.withInstall(Ys),Un="focus-trap.focus-after-trapped",zn="focus-trap.focus-after-released",Js="focus-trap.focusout-prevented",Vi={cancelable:!0,bubbles:!1},Zs={cancelable:!0,bubbles:!1},_i="focusAfterTrapped",Ki="focusAfterReleased",zo=Symbol("elFocusTrap"),Ar=l.ref(),Nn=l.ref(0),wr=l.ref(0);let ln=0;const qo=e=>{const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n},Hi=(e,n)=>{for(const t of e)if(!Xs(t,n))return t},Xs=(e,n)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Qs=e=>{const n=qo(e),t=Hi(n,e),r=Hi(n.reverse(),e);return[t,r]},el=e=>e instanceof HTMLInputElement&&"select"in e,Qe=(e,n)=>{if(e&&e.focus){const t=document.activeElement;let r=!1;h.isElement(e)&&!On(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),wr.value=window.performance.now(),e!==t&&el(e)&&n&&e.select(),h.isElement(e)&&r&&e.removeAttribute("tabindex")}};function $i(e,n){const t=[...e],r=e.indexOf(n);return r!==-1&&t.splice(r,1),t}const tl=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=$i(e,r),e.unshift(r)},remove:r=>{var i,o;e=$i(e,r),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},nl=(e,n=!1)=>{const t=document.activeElement;for(const r of e)if(Qe(r,n),document.activeElement!==t)return},Ui=tl(),rl=()=>Nn.value>wr.value,un=()=>{Ar.value="pointer",Nn.value=window.performance.now()},zi=()=>{Ar.value="keyboard",Nn.value=window.performance.now()},il=()=>(l.onMounted(()=>{ln===0&&(document.addEventListener("mousedown",un),document.addEventListener("touchstart",un),document.addEventListener("keydown",zi)),ln++}),l.onBeforeUnmount(()=>{ln--,ln<=0&&(document.removeEventListener("mousedown",un),document.removeEventListener("touchstart",un),document.removeEventListener("keydown",zi))}),{focusReason:Ar,lastUserFocusTimestamp:Nn,lastAutomatedFocusTimestamp:wr}),cn=e=>new CustomEvent(Js,{...Zs,detail:e});let bt=[];const qi=e=>{e.code===h.EVENT_CODE.esc&&bt.forEach(n=>n(e))},ol=e=>{l.onMounted(()=>{bt.length===0&&document.addEventListener("keydown",qi),h.isClient&&bt.push(e)}),l.onBeforeUnmount(()=>{bt=bt.filter(n=>n!==e),bt.length===0&&h.isClient&&document.removeEventListener("keydown",qi)})},al=l.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[_i,Ki,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const t=l.ref();let r,i;const{focusReason:o}=il();ol(v=>{e.trapped&&!a.paused&&n("release-requested",v)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=v=>{if(!e.loop&&!e.trapped||a.paused)return;const{code:b,altKey:g,ctrlKey:m,metaKey:E,currentTarget:O,shiftKey:k}=v,{loop:x}=e,I=b===h.EVENT_CODE.tab&&!g&&!m&&!E,w=document.activeElement;if(I&&w){const D=O,[H,T]=Qs(D);if(H&&T){if(!k&&w===T){const _=cn({focusReason:o.value});n("focusout-prevented",_),_.defaultPrevented||(v.preventDefault(),x&&Qe(H,!0))}else if(k&&[H,D].includes(w)){const _=cn({focusReason:o.value});n("focusout-prevented",_),_.defaultPrevented||(v.preventDefault(),x&&Qe(T,!0))}}else if(w===D){const _=cn({focusReason:o.value});n("focusout-prevented",_),_.defaultPrevented||v.preventDefault()}}};l.provide(zo,{focusTrapRef:t,onKeydown:s}),l.watch(()=>e.focusTrapEl,v=>{v&&(t.value=v)},{immediate:!0}),l.watch([t],([v],[b])=>{v&&(v.addEventListener("keydown",s),v.addEventListener("focusin",p),v.addEventListener("focusout",f)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",p),b.removeEventListener("focusout",f))});const c=v=>{n(_i,v)},u=v=>n(Ki,v),p=v=>{const b=l.unref(t);if(!b)return;const g=v.target,m=v.relatedTarget,E=g&&b.contains(g);e.trapped||m&&b.contains(m)||(r=m),E&&n("focusin",v),!a.paused&&e.trapped&&(E?i=g:Qe(i,!0))},f=v=>{const b=l.unref(t);if(!(a.paused||!b))if(e.trapped){const g=v.relatedTarget;!h.isNil(g)&&!b.contains(g)&&setTimeout(()=>{if(!a.paused&&e.trapped){const m=cn({focusReason:o.value});n("focusout-prevented",m),m.defaultPrevented||Qe(i,!0)}},0)}else{const g=v.target;g&&b.contains(g)||n("focusout",v)}};async function d(){await l.nextTick();const v=l.unref(t);if(v){Ui.push(a);const b=v.contains(document.activeElement)?r:document.activeElement;if(r=b,!v.contains(b)){const m=new Event(Un,Vi);v.addEventListener(Un,c),v.dispatchEvent(m),m.defaultPrevented||l.nextTick(()=>{let E=e.focusStartEl;h.isString(E)||(Qe(E),document.activeElement!==E&&(E="first")),E==="first"&&nl(qo(v),!0),(document.activeElement===b||E==="container")&&Qe(v)})}}}function y(){const v=l.unref(t);if(v){v.removeEventListener(Un,c);const b=new CustomEvent(zn,{...Vi,detail:{focusReason:o.value}});v.addEventListener(zn,u),v.dispatchEvent(b),!b.defaultPrevented&&(o.value=="keyboard"||!rl()||v.contains(document.activeElement))&&Qe(r??document.body),v.removeEventListener(zn,u),Ui.remove(a)}}return l.onMounted(()=>{e.trapped&&d(),l.watch(()=>e.trapped,v=>{v?d():y()})}),l.onBeforeUnmount(()=>{e.trapped&&y(),t.value&&(t.value.removeEventListener("keydown",s),t.value.removeEventListener("focusin",p),t.value.removeEventListener("focusout",f),t.value=void 0)}),{onKeydown:s}}});function sl(e,n,t,r,i,o){return l.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var jo=h._export_sfc(al,[["render",sl],["__file","focus-trap.vue"]]);const Go=Symbol("buttonGroupContextKey"),Wo=({from:e,replacement:n,scope:t,version:r,ref:i,type:o="API"},a)=>{l.watch(()=>l.unref(a),s=>{s&&h.debugWarn(t,`[${o}] ${e} is about to be deprecated in version ${r}, please use ${n} instead.
6
+ For more detail, please visit: ${i}
7
+ `)},{immediate:!0})},ll=(e,n)=>{Wo({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},l.computed(()=>e.type==="text"));const t=l.inject(Go,void 0),r=h.useGlobalConfig("button"),{form:i}=kr(),o=Dr(l.computed(()=>t==null?void 0:t.size)),a=Qt(),s=l.ref(),c=l.useSlots(),u=l.computed(()=>{var g;return e.type||(t==null?void 0:t.type)||((g=r.value)==null?void 0:g.type)||""}),p=l.computed(()=>{var g,m,E;return(E=(m=e.autoInsertSpace)!=null?m:(g=r.value)==null?void 0:g.autoInsertSpace)!=null?E:!1}),f=l.computed(()=>{var g,m,E;return(E=(m=e.plain)!=null?m:(g=r.value)==null?void 0:g.plain)!=null?E:!1}),d=l.computed(()=>{var g,m,E;return(E=(m=e.round)!=null?m:(g=r.value)==null?void 0:g.round)!=null?E:!1}),y=l.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),v=l.computed(()=>{var g;const m=(g=c.default)==null?void 0:g.call(c);if(p.value&&(m==null?void 0:m.length)===1){const E=m[0];if((E==null?void 0:E.type)===l.Text){const O=E.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(O.trim())}}return!1});return{_disabled:a,_size:o,_type:u,_ref:s,_props:y,_plain:f,_round:d,shouldAddSpace:v,handleClick:g=>{if(a.value||e.loading){g.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),n("click",g)}}},Yo=["default","primary","success","warning","info","danger","text",""],ul=["button","submit","reset"],ar=h.buildProps({size:h.useSizeProp,disabled:Boolean,type:{type:String,values:Yo,default:""},icon:{type:h.iconPropType},nativeType:{type:String,values:ul,default:"button"},loading:Boolean,loadingIcon:{type:h.iconPropType,default:()=>h.loading_default},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:h.definePropType([String,Object]),default:"button"}}),cl={click:e=>e instanceof MouseEvent};function Be(e,n){fl(e)&&(e="100%");var t=hl(e);return e=n===360?e:Math.min(n,Math.max(0,parseFloat(e))),t&&(e=parseInt(String(e*n),10)/100),Math.abs(e-n)<1e-6?1:(n===360?e=(e<0?e%n+n:e%n)/parseFloat(String(n)):e=e%n/parseFloat(String(n)),e)}function fn(e){return Math.min(1,Math.max(0,e))}function fl(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function hl(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Jo(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function ft(e){return e.length===1?"0"+e:String(e)}function pl(e,n,t){return{r:Be(e,255)*255,g:Be(n,255)*255,b:Be(t,255)*255}}function ji(e,n,t){e=Be(e,255),n=Be(n,255),t=Be(t,255);var r=Math.max(e,n,t),i=Math.min(e,n,t),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var c=r-i;switch(a=s>.5?c/(2-r-i):c/(r+i),r){case e:o=(n-t)/c+(n<t?6:0);break;case n:o=(t-e)/c+2;break;case t:o=(e-n)/c+4;break}o/=6}return{h:o,s:a,l:s}}function qn(e,n,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(n-e)*(6*t):t<1/2?n:t<2/3?e+(n-e)*(2/3-t)*6:e}function dl(e,n,t){var r,i,o;if(e=Be(e,360),n=Be(n,100),t=Be(t,100),n===0)i=t,o=t,r=t;else{var a=t<.5?t*(1+n):t+n-t*n,s=2*t-a;r=qn(s,a,e+1/3),i=qn(s,a,e),o=qn(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function Gi(e,n,t){e=Be(e,255),n=Be(n,255),t=Be(t,255);var r=Math.max(e,n,t),i=Math.min(e,n,t),o=0,a=r,s=r-i,c=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(n-t)/s+(n<t?6:0);break;case n:o=(t-e)/s+2;break;case t:o=(e-n)/s+4;break}o/=6}return{h:o,s:c,v:a}}function yl(e,n,t){e=Be(e,360)*6,n=Be(n,100),t=Be(t,100);var r=Math.floor(e),i=e-r,o=t*(1-n),a=t*(1-i*n),s=t*(1-(1-i)*n),c=r%6,u=[t,a,o,o,s,t][c],p=[s,t,t,a,o,o][c],f=[o,o,s,t,t,a][c];return{r:u*255,g:p*255,b:f*255}}function Wi(e,n,t,r){var i=[ft(Math.round(e).toString(16)),ft(Math.round(n).toString(16)),ft(Math.round(t).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function gl(e,n,t,r,i){var o=[ft(Math.round(e).toString(16)),ft(Math.round(n).toString(16)),ft(Math.round(t).toString(16)),ft(vl(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function vl(e){return Math.round(parseFloat(e)*255).toString(16)}function Yi(e){return Ke(e)/255}function Ke(e){return parseInt(e,16)}function ml(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function bl(e){var n={r:0,g:0,b:0},t=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Tl(e)),typeof e=="object"&&(Ze(e.r)&&Ze(e.g)&&Ze(e.b)?(n=pl(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ze(e.h)&&Ze(e.s)&&Ze(e.v)?(r=hn(e.s),i=hn(e.v),n=yl(e.h,r,i),a=!0,s="hsv"):Ze(e.h)&&Ze(e.s)&&Ze(e.l)&&(r=hn(e.s),o=hn(e.l),n=dl(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=Jo(t),{ok:a,format:e.format||s,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:t}}var Sl="[-\\+]?\\d+%?",El="[-\\+]?\\d*\\.\\d+%?",ot="(?:".concat(El,")|(?:").concat(Sl,")"),jn="[\\s|\\(]+(".concat(ot,")[,|\\s]+(").concat(ot,")[,|\\s]+(").concat(ot,")\\s*\\)?"),Gn="[\\s|\\(]+(".concat(ot,")[,|\\s]+(").concat(ot,")[,|\\s]+(").concat(ot,")[,|\\s]+(").concat(ot,")\\s*\\)?"),qe={CSS_UNIT:new RegExp(ot),rgb:new RegExp("rgb"+jn),rgba:new RegExp("rgba"+Gn),hsl:new RegExp("hsl"+jn),hsla:new RegExp("hsla"+Gn),hsv:new RegExp("hsv"+jn),hsva:new RegExp("hsva"+Gn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Tl(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(sr[e])e=sr[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=qe.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=qe.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=qe.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=qe.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=qe.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=qe.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=qe.hex8.exec(e),t?{r:Ke(t[1]),g:Ke(t[2]),b:Ke(t[3]),a:Yi(t[4]),format:n?"name":"hex8"}:(t=qe.hex6.exec(e),t?{r:Ke(t[1]),g:Ke(t[2]),b:Ke(t[3]),format:n?"name":"hex"}:(t=qe.hex4.exec(e),t?{r:Ke(t[1]+t[1]),g:Ke(t[2]+t[2]),b:Ke(t[3]+t[3]),a:Yi(t[4]+t[4]),format:n?"name":"hex8"}:(t=qe.hex3.exec(e),t?{r:Ke(t[1]+t[1]),g:Ke(t[2]+t[2]),b:Ke(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Ze(e){return!!qe.CSS_UNIT.exec(String(e))}var Zo=function(){function e(n,t){n===void 0&&(n=""),t===void 0&&(t={});var r;if(n instanceof e)return n;typeof n=="number"&&(n=ml(n)),this.originalInput=n;var i=bl(n);this.originalInput=n,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:i.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},e.prototype.getLuminance=function(){var n=this.toRgb(),t,r,i,o=n.r/255,a=n.g/255,s=n.b/255;return o<=.03928?t=o/12.92:t=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*t+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(n){return this.a=Jo(n),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},e.prototype.toHsv=function(){var n=Gi(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},e.prototype.toHsvString=function(){var n=Gi(this.r,this.g,this.b),t=Math.round(n.h*360),r=Math.round(n.s*100),i=Math.round(n.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var n=ji(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},e.prototype.toHslString=function(){var n=ji(this.r,this.g,this.b),t=Math.round(n.h*360),r=Math.round(n.s*100),i=Math.round(n.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(n){return n===void 0&&(n=!1),Wi(this.r,this.g,this.b,n)},e.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},e.prototype.toHex8=function(n){return n===void 0&&(n=!1),gl(this.r,this.g,this.b,this.a,n)},e.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},e.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var n=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(t,", ").concat(r,")"):"rgba(".concat(n,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var n=function(t){return"".concat(Math.round(Be(t,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var n=function(t){return Math.round(Be(t,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+Wi(this.r,this.g,this.b,!1),t=0,r=Object.entries(sr);t<r.length;t++){var i=r[t],o=i[0],a=i[1];if(n===a)return o}return!1},e.prototype.toString=function(n){var t=!!n;n=n??this.format;var r=!1,i=this.a<1&&this.a>=0,o=!t&&i&&(n.startsWith("hex")||n==="name");return o?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l+=n/100,t.l=fn(t.l),new e(t)},e.prototype.brighten=function(n){n===void 0&&(n=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(n/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(n/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(n/100)))),new e(t)},e.prototype.darken=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l-=n/100,t.l=fn(t.l),new e(t)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s-=n/100,t.s=fn(t.s),new e(t)},e.prototype.saturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s+=n/100,t.s=fn(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var t=this.toHsl(),r=(t.h+n)%360;return t.h=r<0?360+r:r,new e(t)},e.prototype.mix=function(n,t){t===void 0&&(t=50);var r=this.toRgb(),i=new e(n).toRgb(),o=t/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(n,t){n===void 0&&(n=6),t===void 0&&(t=30);var r=this.toHsl(),i=360/t,o=[this];for(r.h=(r.h-(i*n>>1)+720)%360;--n;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new e(n)},e.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var t=this.toHsv(),r=t.h,i=t.s,o=t.v,a=[],s=1/n;n--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var n=this.toHsl(),t=n.h;return[this,new e({h:(t+72)%360,s:n.s,l:n.l}),new e({h:(t+216)%360,s:n.s,l:n.l})]},e.prototype.onBackground=function(n){var t=this.toRgb(),r=new e(n).toRgb(),i=t.a+r.a*(1-t.a);return new e({r:(t.r*t.a+r.r*r.a*(1-t.a))/i,g:(t.g*t.a+r.g*r.a*(1-t.a))/i,b:(t.b*t.a+r.b*r.a*(1-t.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(n){for(var t=this.toHsl(),r=t.h,i=[this],o=360/n,a=1;a<n;a++)i.push(new e({h:(r+a*o)%360,s:t.s,l:t.l}));return i},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function nt(e,n=20){return e.mix("#141414",n).toString()}function kl(e){const n=Qt(),t=h.useNamespace("button");return l.computed(()=>{let r={},i=e.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const a=new Zo(i),s=e.dark?a.tint(20).toString():nt(a,20);if(e.plain)r=t.cssVarBlock({"bg-color":e.dark?nt(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?nt(a,50):a.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":s,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":s}),n.value&&(r[t.cssVarBlockName("disabled-bg-color")]=e.dark?nt(a,90):a.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=e.dark?nt(a,50):a.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=e.dark?nt(a,80):a.tint(80).toString());else{const c=e.dark?nt(a,30):a.tint(30).toString(),u=a.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(r=t.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":c,"hover-text-color":u,"hover-border-color":c,"active-bg-color":s,"active-border-color":s}),n.value){const p=e.dark?nt(a,50):a.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=p,r[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,r[t.cssVarBlockName("disabled-border-color")]=p}}}return r})}const Dl=l.defineComponent({name:"ElButton"}),Al=l.defineComponent({...Dl,props:ar,emits:cl,setup(e,{expose:n,emit:t}){const r=e,i=kl(r),o=h.useNamespace("button"),{_ref:a,_size:s,_type:c,_disabled:u,_props:p,_plain:f,_round:d,shouldAddSpace:y,handleClick:v}=ll(r,t),b=l.computed(()=>[o.b(),o.m(c.value),o.m(s.value),o.is("disabled",u.value),o.is("loading",r.loading),o.is("plain",f.value),o.is("round",d.value),o.is("circle",r.circle),o.is("text",r.text),o.is("link",r.link),o.is("has-bg",r.bg)]);return n({ref:a,size:s,type:c,disabled:u,shouldAddSpace:y}),(g,m)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(g.tag),l.mergeProps({ref_key:"_ref",ref:a},l.unref(p),{class:l.unref(b),style:l.unref(i),onClick:l.unref(v)}),{default:l.withCtx(()=>[g.loading?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[g.$slots.loading?l.renderSlot(g.$slots,"loading",{key:0}):(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1,class:l.normalizeClass(l.unref(o).is("loading"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(g.loadingIcon)))]),_:1},8,["class"]))],64)):g.icon||g.$slots.icon?(l.openBlock(),l.createBlock(l.unref(h.ElIcon),{key:1},{default:l.withCtx(()=>[g.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(g.icon),{key:0})):l.renderSlot(g.$slots,"icon",{key:1})]),_:3})):l.createCommentVNode("v-if",!0),g.$slots.default?(l.openBlock(),l.createElementBlock("span",{key:2,class:l.normalizeClass({[l.unref(o).em("text","expand")]:l.unref(y)})},[l.renderSlot(g.$slots,"default")],2)):l.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var wl=h._export_sfc(Al,[["__file","button.vue"]]);const Il={size:ar.size,type:ar.type},xl=l.defineComponent({name:"ElButtonGroup"}),Bl=l.defineComponent({...xl,props:Il,setup(e){const n=e;l.provide(Go,l.reactive({size:l.toRef(n,"size"),type:l.toRef(n,"type")}));const t=h.useNamespace("button");return(r,i)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(l.unref(t).b("group"))},[l.renderSlot(r.$slots,"default")],2))}});var Xo=h._export_sfc(Bl,[["__file","button-group.vue"]]);const Qo=h.withInstall(wl,{ButtonGroup:Xo}),Cl=h.withNoopInstall(Xo),Rl="utils/vue/vnode";var jt=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(jt||{});function ea(e){return l.isVNode(e)&&e.type===l.Fragment}function Ml(e){return l.isVNode(e)&&e.type===l.Comment}function Ol(e){return l.isVNode(e)&&!ea(e)&&!Ml(e)}const Nl=e=>{if(!l.isVNode(e))return h.debugWarn(Rl,"[getNormalizedProps] must be a VNode"),{};const n=e.props||{},t=(l.isVNode(e.type)?e.type.props:void 0)||{},r={};return Object.keys(t).forEach(i=>{h.hasOwn(t[i],"default")&&(r[i]=t[i].default)}),Object.keys(n).forEach(i=>{r[h.camelize(i)]=n[i]}),r},Pl=e=>{if(!h.isArray$1(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},Ut=e=>{const n=h.isArray$1(e)?e:[e],t=[];return n.forEach(r=>{var i;h.isArray$1(r)?t.push(...Ut(r)):l.isVNode(r)&&((i=r.component)!=null&&i.subTree)?t.push(r,...Ut(r.component.subTree)):l.isVNode(r)&&h.isArray$1(r.children)?t.push(...Ut(r.children)):l.isVNode(r)&&r.shapeFlag===2?t.push(...Ut(r.type())):t.push(r)}),t},Ir=e=>{if(!e)return{onClick:h.NOOP,onMousedown:h.NOOP,onMouseup:h.NOOP};let n=!1,t=!1;return{onClick:a=>{n&&t&&e(a),n=t=!1},onMousedown:a=>{n=a.target===a.currentTarget},onMouseup:a=>{t=a.target===a.currentTarget}}},Fl=h.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:h.definePropType([String,Array,Object])},zIndex:{type:h.definePropType([String,Number])}}),Ll={click:e=>e instanceof MouseEvent},Vl="overlay";var _l=l.defineComponent({name:"ElOverlay",props:Fl,emits:Ll,setup(e,{slots:n,emit:t}){const r=h.useNamespace(Vl),i=c=>{t("click",c)},{onClick:o,onMousedown:a,onMouseup:s}=Ir(e.customMaskEvent?void 0:i);return()=>e.mask?l.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:o,onMousedown:a,onMouseup:s},[l.renderSlot(n,"default")],jt.STYLE|jt.CLASS|jt.PROPS,["onClick","onMouseup","onMousedown"]):l.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[l.renderSlot(n,"default")])}});const ta=_l,na=(e,n,t,r)=>{const i={offsetX:0,offsetY:0},o=(f,d)=>{if(e.value){const{offsetX:y,offsetY:v}=i,b=e.value.getBoundingClientRect(),g=b.left,m=b.top,E=b.width,O=b.height,k=document.documentElement.clientWidth,x=document.documentElement.clientHeight,I=-g+y,w=-m+v,D=k-g-E+y,H=x-m-(O<x?O:0)+v;r!=null&&r.value||(f=Math.min(Math.max(f,I),D),d=Math.min(Math.max(d,w),H)),i.offsetX=f,i.offsetY=d,e.value.style.transform=`translate(${h.addUnit(f)}, ${h.addUnit(d)})`}},a=f=>{const d=f.clientX,y=f.clientY,{offsetX:v,offsetY:b}=i,g=E=>{const O=v+E.clientX-d,k=b+E.clientY-y;o(O,k)},m=()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",m)},s=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",a),window.addEventListener("resize",p))},c=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",a),window.removeEventListener("resize",p))},u=()=>{i.offsetX=0,i.offsetY=0,e.value&&(e.value.style.transform="")},p=()=>{const{offsetX:f,offsetY:d}=i;o(f,d)};return l.onMounted(()=>{l.watchEffect(()=>{t.value?s():c()})}),l.onBeforeUnmount(()=>{c()}),{resetPosition:u,updatePosition:p}},ra=(e,n={})=>{l.isRef(e)||h.throwError("[useLockscreen]","You need to pass a ref param to this function");const t=n.ns||h.useNamespace("popup"),r=l.computed(()=>t.bm("parent","hidden"));if(!h.isClient||h.hasClass(document.body,r.value))return;let i=0,o=!1,a="0";const s=()=>{setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=a,h.removeClass(document.body,r.value))},200)};l.watch(e,c=>{if(!c){s();return}o=!h.hasClass(document.body,r.value),o&&(a=document.body.style.width,h.addClass(document.body,r.value)),i=Ro(t.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,p=h.getStyle(document.body,"overflowY");i>0&&(u||p==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`)}),l.onScopeDispose(()=>s())},ia=e=>["",...h.componentSizes].includes(e),lr="_trap-focus-children",ht=[],Ji=e=>{var n;if(ht.length===0)return;const t=ht[ht.length-1][lr];if(t.length>0&&e.code===h.EVENT_CODE.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const r=e.shiftKey,i=e.target===t[0],o=e.target===t[t.length-1];if(i&&r&&(e.preventDefault(),t[t.length-1].focus()),o&&!r&&(e.preventDefault(),t[0].focus()),process.env.NODE_ENV==="test"){const a=t.indexOf(e.target);a!==-1&&((n=t[r?a-1:a+1])==null||n.focus())}}},Kl={beforeMount(e){e[lr]=Li(e),ht.push(e),ht.length<=1&&document.addEventListener("keydown",Ji)},updated(e){l.nextTick(()=>{e[lr]=Li(e)})},unmounted(){ht.shift(),ht.length===0&&document.removeEventListener("keydown",Ji)}},Hl=l.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Kl},components:{ElButton:Qo,ElFocusTrap:jo,ElInput:Uo,ElOverlay:ta,ElIcon:h.ElIcon,...h.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:ia},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:n}){const{locale:t,zIndex:r,ns:i,size:o}=h.useGlobalComponentSettings("message-box",l.computed(()=>e.buttonSize)),{t:a}=t,{nextZIndex:s}=r,c=l.ref(!1),u=l.reactive({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:l.markRaw(h.loading_default),cancelButtonLoadingIcon:l.markRaw(h.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),p=l.computed(()=>{const K=u.type;return{[i.bm("icon",K)]:K&&h.TypeComponentsMap[K]}}),f=Dn(),d=Dn(),y=l.computed(()=>{const K=u.type;return u.icon||K&&h.TypeComponentsMap[K]||""}),v=l.computed(()=>!!u.message),b=l.ref(),g=l.ref(),m=l.ref(),E=l.ref(),O=l.ref(),k=l.computed(()=>u.confirmButtonClass);l.watch(()=>u.inputValue,async K=>{await l.nextTick(),e.boxType==="prompt"&&K&&_()},{immediate:!0}),l.watch(()=>c.value,K=>{var $,Z;K&&(e.boxType!=="prompt"&&(u.autofocus?m.value=(Z=($=O.value)==null?void 0:$.$el)!=null?Z:b.value:m.value=b.value),u.zIndex=s()),e.boxType==="prompt"&&(K?l.nextTick().then(()=>{var ne;E.value&&E.value.$el&&(u.autofocus?m.value=(ne=F())!=null?ne:b.value:m.value=b.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=l.computed(()=>e.draggable),I=l.computed(()=>e.overflow);na(b,g,x,I),l.onMounted(async()=>{await l.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),l.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){c.value&&(c.value=!1,l.nextTick(()=>{u.action&&n("action",u.action)}))}const D=()=>{e.closeOnClickModal&&B(u.distinguishCancelAndClose?"close":"cancel")},H=Ir(D),T=K=>{if(u.inputType!=="textarea")return K.preventDefault(),B("confirm")},B=K=>{var $;e.boxType==="prompt"&&K==="confirm"&&!_()||(u.action=K,u.beforeClose?($=u.beforeClose)==null||$.call(u,K,u,w):w())},_=()=>{if(e.boxType==="prompt"){const K=u.inputPattern;if(K&&!K.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const $=u.inputValidator;if(h.isFunction($)){const Z=$(u.inputValue);if(Z===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(h.isString(Z))return u.editorErrorMessage=Z,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},F=()=>{var K,$;const Z=(K=E.value)==null?void 0:K.$refs;return($=Z==null?void 0:Z.input)!=null?$:Z==null?void 0:Z.textarea},Q=()=>{B("close")},X=()=>{e.closeOnPressEscape&&Q()};return e.lockScroll&&ra(c),{...l.toRefs(u),ns:i,overlayEvent:H,visible:c,hasMessage:v,typeClass:p,contentId:f,inputId:d,btnSize:o,iconComponent:y,confirmButtonClasses:k,rootRef:b,focusStartRef:m,headerRef:g,inputRef:E,confirmRef:O,doClose:w,handleClose:Q,onCloseRequested:X,handleWrapperClick:D,handleInputEnter:T,handleAction:B,t:a}}});function $l(e,n,t,r,i,o){const a=l.resolveComponent("el-icon"),s=l.resolveComponent("el-input"),c=l.resolveComponent("el-button"),u=l.resolveComponent("el-focus-trap"),p=l.resolveComponent("el-overlay");return l.openBlock(),l.createBlock(l.Transition,{name:"fade-in-linear",onAfterLeave:f=>e.$emit("vanish"),persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:l.withCtx(()=>[l.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:l.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[l.createVNode(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:l.withCtx(()=>[l.createElementVNode("div",{ref:"rootRef",class:l.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:l.normalizeStyle(e.customStyle),tabindex:"-1",onClick:l.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(l.openBlock(),l.createElementBlock("div",{key:0,ref:"headerRef",class:l.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(l.openBlock(),l.createBlock(a,{key:0,class:l.normalizeClass([e.ns.e("status"),e.typeClass])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.createElementVNode("span",null,l.toDisplayString(e.title),1)],2),e.showClose?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:l.normalizeClass(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:l.withKeys(l.withModifiers(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[l.createVNode(a,{class:l.normalizeClass(e.ns.e("close"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.closeIcon||"close")))]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):l.createCommentVNode("v-if",!0)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{id:e.contentId,class:l.normalizeClass(e.ns.e("content"))},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(l.openBlock(),l.createBlock(a,{key:0,class:l.normalizeClass([e.ns.e("status"),e.typeClass])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),e.hasMessage?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(e.ns.e("message"))},[l.renderSlot(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):l.createCommentVNode("v-if",!0)],2),l.withDirectives(l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("input"))},[l.createVNode(s,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":f=>e.inputValue=f,type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:l.normalizeClass({invalid:e.validateError}),onKeydown:l.withKeys(e.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("errormsg")),style:l.normalizeStyle({visibility:e.editorErrorMessage?"visible":"hidden"})},l.toDisplayString(e.editorErrorMessage),7)],2),[[l.vShow,e.showInput]])],10,["id"]),l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("btns"))},[e.showCancelButton?(l.openBlock(),l.createBlock(c,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:l.normalizeClass([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:f=>e.handleAction("cancel"),onKeydown:l.withKeys(l.withModifiers(f=>e.handleAction("cancel"),["prevent"]),["enter"])},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):l.createCommentVNode("v-if",!0),l.withDirectives(l.createVNode(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:l.normalizeClass([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:f=>e.handleAction("confirm"),onKeydown:l.withKeys(l.withModifiers(f=>e.handleAction("confirm"),["prevent"]),["enter"])},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[l.vShow,e.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[l.vShow,e.visible]])]),_:3},8,["onAfterLeave"])}var Ul=h._export_sfc(Hl,[["render",$l],["__file","index.vue"]]);const Jt=new Map,zl=e=>{let n=document.body;return e.appendTo&&(h.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),h.isElement(e.appendTo)&&(n=e.appendTo),h.isElement(n)||(h.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},ql=(e,n,t=null)=>{const r=l.createVNode(Ul,e,h.isFunction(e.message)||l.isVNode(e.message)?{default:h.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=t,l.render(r,n),zl(e).appendChild(n.firstElementChild),r.component},jl=()=>document.createElement("div"),Gl=(e,n)=>{const t=jl();e.onVanish=()=>{l.render(null,t),Jt.delete(i)},e.onAction=o=>{const a=Jt.get(i);let s;e.showInput?s={value:i.inputValue,action:o}:s=o,e.callback?e.callback(s,r.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=ql(e,t,n),i=r.proxy;for(const o in e)h.hasOwn(e,o)&&!h.hasOwn(i.$props,o)&&(o==="closeIcon"&&h.isObject$1(e[o])?i[o]=l.markRaw(e[o]):i[o]=e[o]);return i.visible=!0,i};function Nt(e,n=null){if(!h.isClient)return Promise.reject();let t;return h.isString(e)||l.isVNode(e)?e={message:e}:t=e.callback,new Promise((r,i)=>{const o=Gl(e,n??Nt._context);Jt.set(o,{options:e,callback:t,resolve:r,reject:i})})}const Wl=["alert","confirm","prompt"],Yl={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Wl.forEach(e=>{Nt[e]=Jl(e)});function Jl(e){return(n,t,r,i)=>{let o="";return h.isObject$1(t)?(r=t,o=""):h.isUndefined(t)?o="":o=t,Nt(Object.assign({title:o,message:n,type:"",...Yl[e]},r,{boxType:e}),i)}}Nt.close=()=>{Jt.forEach((e,n)=>{n.doClose()}),Jt.clear()};Nt._context=null;const rt=Nt;rt.install=e=>{rt._context=e._context,e.config.globalProperties.$msgbox=rt,e.config.globalProperties.$messageBox=rt,e.config.globalProperties.$alert=rt.alert,e.config.globalProperties.$confirm=rt.confirm,e.config.globalProperties.$prompt=rt.prompt};const oa=rt,Zl=[{title:"系统配置",path:"系统配置",level:0,icon:"系统配置",carryData:!1,show:!0,childMenus:[{title:"站内信",path:"/系统配置/站内信",show:!0,level:1,icon:"站内信",carryData:!0,isRouter:!0},{title:"自动生成",path:"/系统配置/自动生成",show:!0,level:1,icon:"自动生成",carryData:!0,isRouter:!0}]},{title:"系统维护",path:"系统维护",level:0,icon:"平台管理",carryData:!1,show:!0,childMenus:[{title:"登录日志",path:"/系统维护/登录日志",show:!0,level:1,icon:"菜单管理",carryData:!0,isRouter:!0},{title:"操作日志",path:"/系统维护/操作日志",show:!0,level:1,icon:"主菜单管理",carryData:!0,isRouter:!0}]}],en=h.defineStore("menuState",{state:()=>({isRefreshMenus:!1,activeMenuStructureIds:[],cacheInputMenu:{},configMenu:{form:{},options:[],structure:[]},cacheStructures:[],rawMenus:[],menus:[],activeTopMenuPath:"",activeMenuPath:"",activeOldMenuPath:"",activeMainMenu:{},activeAsideMenu:{},activeMenuOpenPaths:[],systemKey:"",buttonTriggerType:"contentConfig",menuTriggerType:"open",permissionSideMenus:[],importLoading:!1,contentLoading:!1,asideMenuLoading:!1,asideMenus:[],platform:"browser",platName:"",childMenu:"",linkMenuInfo:null}),actions:{setLinkMenuInfo(e){this.linkMenuInfo=e},setAsideMenuLoading(e){this.asideMenuLoading=e},setCacheStructures(e){var t,r;const n=(t=this.cacheStructures)==null?void 0:t.map(i=>i.key);e?n!=null&&n.includes(e==null?void 0:e.key)?this.cacheStructures=(r=this.cacheStructures)==null?void 0:r.map(i=>i.key===(e==null?void 0:e.key)?{...i,data:e==null?void 0:e.data}:i):this.cacheStructures.push(e):this.cacheStructures=[]},setChildMenu(e){this.childMenu=e},async setConfigMenu(e){this.configMenu=e},setActiveMainMenu(e){this.activeMainMenu=e},setContentLoading(e){this.contentLoading=e},setActiveAsideMenu(e){this.activeAsideMenu=e},setActiveTopMenuPath(e){this.activeTopMenuPath=e},setCacheInputMenu(e){this.cacheInputMenu=e},setIsRefreshMenus(e){this.isRefreshMenus=e},setButtonTriggerType(e){this.buttonTriggerType=e},setAsideMenus(e){this.asideMenus=e},setMenus(e){this.menus=e},setPlatName(e){this.platName=e},setImportLoading(e){this.importLoading=e},setPlatform(e){this.platform=e},getPlatform(){return this.platform},setMenuTriggerType(e){this.menuTriggerType=e},setSystemKey(e){this.systemKey=e},setActiveMenuPath(e){!e&&e!==null||(this.activeOldMenuPath=h.cloneDeep(this.activeMenuPath),this.activeMenuPath=e)},setActiveMenuOpenPaths(e){this.activeMenuOpenPaths=e},setRawMenus(e){this.rawMenus=e,this.permissionSideMenus=Zl}}}),Xl=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],Ql=[{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"}],eu=e=>{var o;let n=e;const t=[];let r="",i=0;for(const a of n)i++,a.includes("(")||r.includes("(")||a.includes(")")||r.includes(")")||a.includes("&")||r.includes("&")||a.includes("|")||r.includes("|")?(r+=a.trim(),(((o=h.cloneDeep(r))==null?void 0:o[(r==null?void 0:r.length)-1])===")"||(n==null?void 0:n[i])==="|"||(n==null?void 0:n[i])==="&")&&!(r!=null&&r.includes("&"))&&!(r!=null&&r.includes("|"))?(t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r=""):r==="&&"||r==="||"?(t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r=""):i===(e==null?void 0:e.length)&&(t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r="")):r+=a.trim();return(r==null?void 0:r.length)!==0&&t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),t},tu=e=>{var o;let n=e==null?void 0:e.replaceAll("=","#"),t=(o=eu(n))==null?void 0:o.map(a=>(a!=null&&a.includes("(")&&(a="("+(a==null?void 0:a.replaceAll("(",""))),a)),r=[],i={};return t==null||t.forEach((a,s)=>{var c,u,p,f,d;if(!(a!=null&&a.includes("&&"))&&!(a!=null&&a.includes("||"))){let y=a;(a==null?void 0:a[(a==null?void 0:a.length)-1])===")"&&(y=a.slice(0,(a==null?void 0:a.length)-1)),(y==null?void 0:y[0])==="("&&(y=y.slice(1,y==null?void 0:y.length)),y!=null&&y.includes("[")&&(y=(f=(c=y==null?void 0:y.slice(1,y==null?void 0:y.length))==null?void 0:c.split(":"))==null?void 0:f[((p=(u=y==null?void 0:y.slice(1,y==null?void 0:y.length))==null?void 0:u.split(":"))==null?void 0:p.length)-1]),y=y==null?void 0:y.split("#");let v=y[0].replaceAll("'","").replaceAll("]",""),b=(d=y[1])==null?void 0:d.replaceAll("'","");(v==null?void 0:v[(v==null?void 0:v.length)-1])!=="!"?i[v]=b:i[v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)]="!"+b}else a==="&&"||a==="||"&&(r.push(i),i={});s===t.length-1&&(r.push(i),i={})}),r},Pn=h.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),nu=Pn(h.pinia),{multipleTableConst:Re}=h.storeToRefs(nu),tt=e=>{let n=[];function t(i,o=""){Array.isArray(i)&&(i==null||i.forEach(a=>{Array.isArray(a)||(a=[a]),a==null||a.forEach(s=>{var c,u,p,f,d,y,v,b,g,m,E,O;if(!(s!=null&&s.children)||s.children.length===0)s.prop=o===""?s==null?void 0:s.prop:o+Re.value+((f=(c=s==null?void 0:s.prop)==null?void 0:c.split(Re.value))==null?void 0:f[((p=(u=s==null?void 0:s.prop)==null?void 0:u.split(Re.value))==null?void 0:p.length)-1]),n.push(s.prop);else{let k=o===""?o+((b=(d=s==null?void 0:s.prop)==null?void 0:d.split(Re.value))==null?void 0:b[((v=(y=s==null?void 0:s.prop)==null?void 0:y.split(Re.value))==null?void 0:v.length)-1]):o+Re.value+((O=(g=s==null?void 0:s.prop)==null?void 0:g.split(Re.value))==null?void 0:O[((E=(m=s==null?void 0:s.prop)==null?void 0:m.split(Re.value))==null?void 0:E.length)-1]);r(s.children,k)}})}))}function r(i,o=""){i==null||i.forEach(a=>{var s,c,u,p,f,d,y,v,b,g,m,E;if(!(a!=null&&a.children)||a.children.length===0)a.prop=o===""?a==null?void 0:a.prop:o+Re.value+((p=(s=a==null?void 0:a.prop)==null?void 0:s.split(Re.value))==null?void 0:p[((u=(c=a==null?void 0:a.prop)==null?void 0:c.split(Re.value))==null?void 0:u.length)-1]),n.push(a.prop);else{let O=o===""?o+((v=(f=a==null?void 0:a.prop)==null?void 0:f.split(Re.value))==null?void 0:v[((y=(d=a==null?void 0:a.prop)==null?void 0:d.split(Re.value))==null?void 0:y.length)-1]):o+Re.value+((E=(b=a==null?void 0:a.prop)==null?void 0:b.split(Re.value))==null?void 0:E[((m=(g=a==null?void 0:a.prop)==null?void 0:g.split(Re.value))==null?void 0:m.length)-1]);r(a.children,O)}})}return t(e),n},ru=(e,n,t)=>{var i;let r=(i=h.cloneDeep(e))==null?void 0:i.map(o=>(o=o.filter(a=>!(a!=null&&a.id)),o));return r=r==null?void 0:r.map(o=>{var a;return o=(a=o.map((s,c)=>{let u={};if(t!=null&&t.find(p=>p===n[c]))return u[n[c]]=s,u}))==null?void 0:a.filter(s=>s),o}),r},iu=(e,n)=>{var a,s;const t=h.cloneDeep(e),r=(a=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:a.contents,i=(s=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="tableContents"))==null?void 0:s.contents;return ru(i,tt(r).slice(0,tt(r).length-1),n)},aa=(e,n)=>{const t=n;return e==null?void 0:e.map(r=>{var o;let i=r;if(!Array.isArray(i)){let a=[];r!=null&&r.id&&a.push({id:r==null?void 0:r.id}),i==null||delete i.id;let s=Object.values(i);i=[...a,...s]}return r=(o=i==null?void 0:i.map((a,s)=>{var c,u;return a!=null&&a.id?{key:"id",value:a==null?void 0:a.id}:t!=null&&t.find(p=>p==null?void 0:p.id)||i!=null&&i.find(p=>p==null?void 0:p.id)?{key:(c=t[s-1])==null?void 0:c.label,value:a}:{key:(u=t[s])==null?void 0:u.label,value:a}}))==null?void 0:o.filter(a=>a.key!=="操作"),r})},ou=async e=>{var t,r,i,o;let n="";if((r=(t=h.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((a,s)=>{var c,u;s!==((u=(c=h.cloneDeep(e))==null?void 0:c.split("/"))==null?void 0:u.length)-1&&(n=n===""?n+a:n+"/"+a)}),n!==""){let a="";const s=await ut(n,sessionStorage.getItem("systemKey"),"");(o=(i=s==null?void 0:s[0])==null?void 0:i.compData)==null||o.forEach(c=>{var u;(c==null?void 0:c.key)==="tableContents"&&((u=c==null?void 0:c.contents)==null||u.forEach((p,f)=>{if(f===0){let d=p==null?void 0:p.filter(y=>!(y!=null&&y.id));a=n+"/"+(d==null?void 0:d[0])}}))}),await Wt(a,e)}},Fn=e=>{try{return JSON.parse(e),!0}catch{return!1}},Zi=(e,n)=>Io(e,n),au=h.useLoginState(h.pinia),{loginUserInfo:pn}=h.storeToRefs(au),Wn=[{key:"@Num",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Condition",value:"onConditionContents",order:3}],sa=e=>{let n=e;if(n!=null&&n.every(t=>Array.isArray(t))){let t=[];const r=i=>{i==null||i.forEach(o=>{var a;o!=null&&o.children&&((a=o==null?void 0:o.children)==null?void 0:a.length)>0?r(o==null?void 0:o.children):t.push(o)})};return r(n==null?void 0:n[0]),t}else return n},la=(e,n)=>{let t;Fn(e)?t=JSON.parse(e):t=e;let r=tu(n);if((r==null?void 0:r.length)>0){let i=[];r==null||r.forEach(o=>{var s,c,u,p,f;let a={};for(let d in o){let y=h.cloneDeep(d);y!=null&&y.includes("[")||(o[d].toUpperCase()==="@LOGINUSER"?a[y]=(s=pn.value)!=null&&s.account?(c=pn.value)==null?void 0:c.account:((u=pn.value)==null?void 0:u.姓名)??((p=pn.value)==null?void 0:p.账号):(f=o[d])!=null&&f.includes("[")||(a[y]=o[d]))}i.push(a)}),t=t==null?void 0:t.map(o=>{var s;let a=(s=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:s.contents;return a=sa(a),o=o==null?void 0:o.map(c=>{var u;if((c==null?void 0:c.key)==="tableContents"){let f=(u=aa(c==null?void 0:c.contents,a))==null?void 0:u.map(d=>(d=d==null?void 0:d.filter(y=>(y==null?void 0:y.key)!=="id"),d));i==null||i.forEach(d=>{var y;for(let v in d)((y=d[v])==null?void 0:y[0])!=="!"?f=f==null?void 0:f.filter(b=>{var g;return((g=b==null?void 0:b.find(m=>(m==null?void 0:m.key)===v))==null?void 0:g.value)===d[v]}):f=f==null?void 0:f.filter(b=>{var g;return((g=b==null?void 0:b.find(m=>(m==null?void 0:m.key)===v))==null?void 0:g.value)!==d[v]})}),(f==null?void 0:f.length)===0?c.contents=[]:c.contents=f==null?void 0:f.map(d=>(d=d==null?void 0:d.map(y=>y.value),d))}return c}),o})}return t},su=(e,n)=>{let t=JSON.parse(e);return n.toUpperCase()==="ALL"||(t=t==null?void 0:t.map(r=>(r=r==null?void 0:r.map(i=>{var o;return(i==null?void 0:i.key)==="tableContents"&&(i.contents=(o=i.contents)==null?void 0:o.slice(0,parseInt(n))),i}),r))),t},lu=e=>{for(let n=e.length-1;n>0;n--){const t=Math.floor(Math.random()*(n+1));[e[n],e[t]]=[e[t],e[n]]}return e},uu=(e,n)=>{if(n==="Auto")return JSON.parse(e);{let t=JSON.parse(e);return t=t==null?void 0:t.map(r=>(r=r==null?void 0:r.map(i=>((i==null?void 0:i.key)==="tableContents"&&(i.contents=lu(i.contents)),i)),r)),t}},At=(e,n)=>Array.isArray(e)?e==null?void 0:e.map(r=>{var i,o,a,s,c,u;if(Array.isArray(r)?r=r:r=[r],(i=r==null?void 0:r.filter(p=>!(p!=null&&p.id)||typeof(p==null?void 0:p.id)=="string"))!=null&&i.every(p=>typeof p!="object"||p===null))return r;if((o=r==null?void 0:r.filter(p=>!(p!=null&&p.id)||typeof(p==null?void 0:p.id)=="string"))!=null&&o.some(p=>Array.isArray(p)))return r;{let p=[];if(p.push(r==null?void 0:r.find(f=>(f==null?void 0:f.id)&&typeof(f==null?void 0:f.id)=="number")),Array.isArray(n==null?void 0:n[0])){const f=(a=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:a[0];(s=Ot(h.cloneDeep(n==null?void 0:n[0])))==null||s.forEach(d=>{p.push(f==null?void 0:f[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const f=(c=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:c[0];(u=Ot(h.cloneDeep(n)))==null||u.forEach(d=>{p.push(f==null?void 0:f[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return p}}):void 0,cu=e=>{var i,o,a,s;const n=e;let t=[];n.compData=(i=n.compData)==null?void 0:i.filter(c=>(c==null?void 0:c.key)!=="tableContents"&&(c==null?void 0:c.key)!=="tableIndex");const r=(a=(o=h.cloneDeep(n.compData))==null?void 0:o.find(c=>(c==null?void 0:c.key)==="tableIndexColumn"))==null?void 0:a.contents;return(s=h.cloneDeep(n.compData))==null||s.forEach(c=>{if((c==null?void 0:c.key)!=="tableIndexColumn"&&(c==null?void 0:c.key)!=="header")t.push(c);else if((c==null?void 0:c.key)==="header"){let u=c.contents;r&&(u!=null&&u.every(p=>Array.isArray(p))?u==null||u[0].unshift({label:r}):u.unshift({label:r})),t.push({key:"header",contents:u})}}),n.compData=t,n},fu=e=>{var o,a,s,c,u;const n=(o=e.compData)==null?void 0:o.filter(p=>(p==null?void 0:p.key)==="tableContents"||(p==null?void 0:p.key)==="tableIndex"),t=(s=(a=n==null?void 0:n.find(p=>(p==null?void 0:p.key)==="tableIndex"))==null?void 0:a.contents)==null?void 0:s.map(p=>p.label),r=(c=n==null?void 0:n.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:c.contents;let i=[];return(t==null?void 0:t.length)>0&&(r!=null&&r.every(p=>Array.isArray(p)))?i=t==null?void 0:t.map((p,f)=>r[f]?[p,...r[f]]:[p]):Array.isArray(r==null?void 0:r[0])&&((u=r==null?void 0:r[0])!=null&&u.every(p=>Array.isArray(p)))?i=r==null?void 0:r[0]:Array.isArray(r==null?void 0:r[0])?i=r:i.push(r),i},hu=e=>{const n=[];function t(r){!r||r.length===0||(n.push(r==null?void 0:r.map(i=>({label:i.label}))),r==null||r.forEach(i=>{i!=null&&i.children&&(i==null?void 0:i.children.length)>0&&t(i==null?void 0:i.children)}))}return t(e),n},pu=e=>{const n=[];function t(r,i=[]){!r||r.length===0||(n.push({key:i==null?void 0:i.filter(o=>!Array.isArray(o)),value:r}),r==null||r.forEach(o=>{o!=null&&o.some(a=>Array.isArray(a))&&t(o.find(a=>Array.isArray(a)),o)}))}return t(e),n},du=e=>{const n=[];function t(r){!r||r.length===0||(n.push(r==null?void 0:r.map(i=>i==null?void 0:i.filter(o=>!Array.isArray(o)))),r==null||r.forEach(i=>{i!=null&&i.some(o=>Array.isArray(o))&&t(i.find(o=>Array.isArray(o)))}))}return t(e),n},yu=e=>{const n=[];function t(r){var i;!r||r.length===0||(r!=null&&r.every(o=>!Array.isArray(o))?n.push(r):(n.push((i=r==null?void 0:r.map(o=>o==null?void 0:o.filter(a=>!Array.isArray(a))))==null?void 0:i[0]),r==null||r.forEach(o=>{o!=null&&o.some(a=>Array.isArray(a))&&t(o.find(a=>Array.isArray(a)))})))}return t(e),n},gu=(e,n)=>{let t;function r(i,o,a=1){var c;if(!i||i.length===0)return;const s=(c=h.cloneDeep(o))==null?void 0:c.map(u=>u==null?void 0:u.filter(p=>!Array.isArray(p)));return s!=null&&s.find(u=>Zi(u,i==null?void 0:i.key))?(o==null||o.forEach(u=>{!r(i,u.find(f=>Array.isArray(f)))&&Zi(u.filter(f=>!Array.isArray(f)),i==null?void 0:i.key)&&(t={type:a,contents:u.filter(f=>!Array.isArray(f))})}),!0):!1}return r(e,n,0),t},Xi=(e,n)=>{function t(r,i){return!r||r.length===0||r==null?void 0:r.map((a,s)=>{var u,p;let c=a;return c.unshift((u=i==null?void 0:i[s])==null?void 0:u.label),c.some(f=>Array.isArray(f))&&(c[c.length-1]=t(c.find(f=>Array.isArray(f)),(p=i==null?void 0:i[s])==null?void 0:p.children)),c})}return t(e,n)},vu=e=>{var t,r,i,o,a,s,c,u,p,f,d,y,v,b,g,m,E,O,k,x,I,w,D,H,T;const n=e;if((e==null?void 0:e.comp)==="Table"){if((i=(r=(t=e.compData)==null?void 0:t.find(B=>(B==null?void 0:B.key)==="tableIndex"))==null?void 0:r.contents)!=null&&i.every(B=>!(B!=null&&B.children))||!((o=e.compData)!=null&&o.find(B=>(B==null?void 0:B.key)==="tableIndex")))return((c=(s=(a=n.compData)==null?void 0:a.find(B=>(B==null?void 0:B.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:c.length)===1&&((d=(f=(p=(u=n.compData)==null?void 0:u.find(B=>(B==null?void 0:B.key)==="tableContents"))==null?void 0:p.contents)==null?void 0:f[0])!=null&&d.every(B=>Array.isArray(B)))?(n.compData=(y=n.compData)==null?void 0:y.map(B=>{var _;return(B==null?void 0:B.key)==="tableContents"&&(B.contents=(_=B.contents)==null?void 0:_[0]),B}),[n]):[n];{let B=[];const _=n.compData,F=(v=h.cloneDeep(_))==null?void 0:v.find(z=>(z==null?void 0:z.key)==="tableIndexColumn"),Q=(b=h.cloneDeep(_))==null?void 0:b.find(z=>(z==null?void 0:z.key)==="extraButton"),X=(g=h.cloneDeep(_))==null?void 0:g.find(z=>(z==null?void 0:z.key)==="rowButton"),K=yu((E=(m=h.cloneDeep(_))==null?void 0:m.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:E.contents),$=(O=h.cloneDeep(_))==null?void 0:O.find(z=>(z==null?void 0:z.key)==="tableIndex"),Z=du((x=(k=h.cloneDeep(_))==null?void 0:k.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:x.contents),ne=Xi((w=(I=h.cloneDeep(_))==null?void 0:I.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:w.contents,$==null?void 0:$.contents),j=pu(Xi((H=(D=h.cloneDeep(_))==null?void 0:D.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:H.contents,$==null?void 0:$.contents));if($)return(T=hu($.contents))==null||T.forEach((z,M)=>{var G;let q=[];q.push({key:"tableIndex",contents:z}),q.push(F),q.push(Q),q.push(X),q.push({key:"tableContents",contents:Z[M]}),q.push({key:"header",contents:K!=null&&K[M]?[K==null?void 0:K[M]]:[K==null?void 0:K[0]]}),B.push({comp:"Table",compData:q,name:"",parentTableContents:((G=gu(j[M],ne))==null?void 0:G.contents)??""})}),B}}else return[n]},st=(e,n)=>{let t={};return Array.isArray(e)?e!=null&&e.find(r=>r==null?void 0:r.id)?e==null||e.forEach((r,i)=>{n!=null&&n[i-1]&&!(r!=null&&r.id)?t[n[i-1]]=r:r!=null&&r.id&&(t.id=r==null?void 0:r.id)}):e==null||e.forEach((r,i)=>{n!=null&&n[i]&&(t[n[i]]=r)}):[e].forEach((r,i)=>{t[n[i]]=r}),t},mu=e=>{var t,r;let n="";return(r=(t=h.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((i,o)=>{var a,s;o<((s=(a=h.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s.length)-1&&(n=n===""?n+i:n+"/"+i)}),n},bu=async e=>{const n=h.cloneDeep(e);let t=[],r=[];n==null||n.forEach(i=>{!(r!=null&&r.find(o=>(o==null?void 0:o.parentKey)===(i==null?void 0:i.parentKey)))&&(i==null?void 0:i.parentKey)!==""&&r.push(i)}),r=r==null?void 0:r.map(i=>{var o;return i.content=(o=i.content)==null?void 0:o.map(a=>{var s;return a.key={pageKey:(i==null?void 0:i.parentKey)??"",systemKey:((s=a.key)==null?void 0:s.systemKey)??"",version:1,type:"subStructure"},a}),i.content}),(r==null?void 0:r.length)>0&&(t=r==null?void 0:r.map(async i=>{let o;return(i==null?void 0:i.length)>0&&(o=await h.batchAddInsofDataApi({dataList:i})),o})),await Promise.all(t)},Pt=h.defineStore("modelComp",{state:()=>({lockingPage:"",itemData:[],itemGridData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],systemPath:"",freshContent:!1,routeToChildPath:"",cacheUpdatingData:null,tableViewContents:[],activeItemIndex:-1,tableLoading:!1,pageMapState:{}}),actions:{setLockingPage(e){this.lockingPage=e},setPageMapState(e){this.pageMapState=e},setItemGridData(e){this.itemGridData=e},setItemData(e){this.itemData=e},setTableLoading(e){this.tableLoading=e},setTableViewContents(e){this.tableViewContents=e},setCacheUpdatingData(e){this.cacheUpdatingData=e},setFreshContent(e){this.freshContent=e},setRouteToChildPath(e){this.routeToChildPath=e},setSubmitCurStructure(e){this.isSubmitCurStructure=e},setCurStructureCompIds(e){this.curStructureCompIds=e},setRefreshCurStructure(e){this.isRefreshCurStructure=e},setOriginalData(e){this.originalData=e},setExtraContents(e){this.extraContents=e},setNodeDev(e){this.nodeDev=e},setIsEdit(e){this.isEdit=e},setSystemPath(e){this.systemPath=e},setActiveItemIndex(e){this.activeItemIndex=e}}}),xr=h.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),Su=en(h.pinia),{activeMenuPath:Sn}=h.storeToRefs(Su),ua=h.useLoginState(h.pinia),{structureData:Eu,loginUserInfo:Yn}=h.storeToRefs(ua),Tu=xr(h.pinia),{routerPageStructures:ku}=h.storeToRefs(Tu),An=Pt(h.pinia),Du=l.ref([{label:"角色名称",value:"",name:"roleName"}]),Au=l.ref([{label:"查询"},{label:"重置"}]),Qi=l.reactive({isFilter:!1,filterForm:{}}),wu=l.ref(!1),Iu=e=>{Qi.isFilter=!0,Qi.filterForm=e},ca=l.ref([]),ur=l.ref([]),fa=l.ref(""),xu=l.computed(()=>{var n,t,r,i,o;const e=(n=ku.value)==null?void 0:n.find(a=>{var s;return((s=a==null?void 0:a.comp)==null?void 0:s.toUpperCase())==="TABLE"});if(e){fa.value=e.name,ur.value=(i=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:i.filter(s=>(s==null?void 0:s.label)!=="操作");const a=(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){let u=[];return Dt.value?u=[...s==null?void 0:s.contents,{label:"授权"}]:u=s==null?void 0:s.contents,{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var p,f;return{...u,isTableColHidden:(p=u==null?void 0:u.prop)==null?void 0:p.includes("授权"),isFormColHidden:(f=u==null?void 0:u.prop)==null?void 0:f.includes("授权")}})}:s});return ya(a),a}return[]}),Bu=e=>{An.setRefreshCurStructure(!1),Pr(e.singleContent,e.buttonName,Vn.value,e==null?void 0:e.selectItems)},Tt=l.ref({}),Br=l.ref(),Zt=async(e,n,t)=>{var r,i;try{const o=await e(n);return((r=o==null?void 0:o.data)==null?void 0:r.code)===200?(t!=="查询"&&await ua.setLogRecordAsync({type:t,data:n},Sn.value),h.ElMessage.success("保存成功"),An.setRefreshCurStructure(!0),o.data.result||((i=o==null?void 0:o.data)==null?void 0:i.code)===200):null}catch(o){h.ElMessage.error(o)}finally{An.setCacheUpdatingData(null)}},ha=(e,n)=>{const t=[];for(const r of e)n!=null&&n.has(r.path)&&t.push(r),r.children&&t.push(...ha(r.children,n));return t},Cu=(e,n)=>{var t,r;try{const i=new Map(e==null?void 0:e.map(s=>[s.path,s.checkedButtons])),o=ha(n,i),a=(t=o==null?void 0:o.filter(s=>{var c,u;return((c=s==null?void 0:s.checkedButtons)==null?void 0:c.length)===((u=s==null?void 0:s.renderButtons)==null?void 0:u.length)}))==null?void 0:t.map(s=>s==null?void 0:s.path);(r=Br.value)==null||r.setCheckedKeys(a)}catch{throw new Error("数据显示处理失败")}},Ru=(e,n)=>{const t=new Map(n==null?void 0:n.map(i=>[i.path,i.checkedButtons]));function r(i){var a,s;const o=(a=i==null?void 0:i.path)!=null&&a.startsWith("/")?(s=i==null?void 0:i.path)==null?void 0:s.substring(1):i==null?void 0:i.path;t.has(o)&&(i.checkedButtons=t.get(o)),i.children&&i.children.length>0&&i.children.forEach(r)}e.forEach(r)},pa=e=>e==null?void 0:e.map(n=>{var r;const t={...n,checkedButtons:[]};return t.children&&((r=t.children)==null?void 0:r.length)>0&&(t.children=pa(t.children)),t}),Cr=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},da=e=>{const n=[];let t=0;for(;t<e.length;)if(typeof e[t]=="string"){const r={title:e[t]};t+1<e.length&&Array.isArray(e[t+1])?(r.children=da(e[t+1]),t+=2):t+=1,n.push(r)}return n},Rr=e=>{const n=[];let t=0;for(;t<(e==null?void 0:e.length);){const r={title:e==null?void 0:e[t]};t+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[t+1])?(r.children=da(e==null?void 0:e[t+1]),t+=2):t+=1,n.push(r)}return n},Ln=(e,n="",t=new Map)=>e==null?void 0:e.map(r=>{const i=n?`${n}/${r.title}`:r.title;if(t.has(i))return t.get(i);const o={...r,path:i};return r.children&&r.children.length>0&&(o.children=Ln(r.children,i,t)),t.set(i,o),o}),Mr=(e,n)=>e.reduce((t,r)=>{const i=r[n];return t[i]||(t[i]=[]),t[i].push(r),t},{}),Or=e=>{const n=[];function t(r,i){!r.children||r.children.length===0?n.push({...r,parentPath:i||""}):r.children.forEach(o=>t(o,r.path||i))}return e.forEach(r=>t(r,"")),n},Nr=e=>Object.entries(e).map(([t,r])=>({path:t,checkedButtons:r==null?void 0:r.map(i=>i==null?void 0:i.path)})),Mu=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,Ou=(e,n)=>{const t={},r=Array.isArray(e)?e==null?void 0:e.filter(i=>{var o;return!(Mu(i)&&((o=Object.keys(i))!=null&&o.includes("id")))}):null;return r&&(r==null||r.forEach((i,o)=>{var a;t[(a=n[o])==null?void 0:a.prop]=i})),t},kt=l.ref(""),ya=e=>{var o;const n=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="tableContents"),t=e==null?void 0:e.find(a=>(a==null?void 0:a.key)==="header");if(!n||!t)return"";const r=(o=n==null?void 0:n.contents)==null?void 0:o[0],i=Ou(r,t==null?void 0:t.contents);kt.value=Cr(i)},Nu=e=>{if(!Array.isArray(e))return!1;for(let n of e){if(typeof n!="object"||n===null||typeof n.path!="string"||!Array.isArray(n.checkedButtons))return!1;for(let t of n.checkedButtons)if(typeof t!="string")return!1}return!0},Pu=e=>{const n=[];for(const t in e)e[t].forEach(i=>{var c,u;const o=(c=i.path)!=null&&c.startsWith("/")?(u=i.path)==null?void 0:u.substring(1):i.path,a=o==null?void 0:o.split("/");let s=n;a.forEach(p=>{let f=s.find(d=>d.title===p);f||(f={title:p,path:i.path,children:[]},s.push(f)),s=f.children})});return n},Fu=e=>{const n={};return e.forEach(t=>{const{path:r,checkedButtons:i}=t,o=r,a=i.map(s=>({title:s.split("/").pop()||"",path:s,parentPath:o}));n[o]=a}),n},ga=e=>{let n=[];for(const t of e){let r=[t.title];if(t.children&&Array.isArray(t.children)){let i=ga(t.children);i.length>0&&r.push(i)}n.push(r)}return n},Lu=e=>{const n=[];for(const t of e){if(!Array.isArray(t)||t.length!==2)continue;const[r,i]=t,o=va(i),a=n.indexOf(r);a===-1?n.push(r,o):n[a+1]=ma(n[a+1],o)}return n},va=e=>{const n=[];for(const t of e)if(Array.isArray(t)){if(t.length===1&&typeof t[0]=="string")n.push(t[0]);else if(t.length===2&&typeof t[0]=="string"){const[r,i]=t;n.push(r,va(i))}}return n},ma=(e,n)=>{const t=[...e];let r=0;for(;r<n.length;){const i=n[r];if(typeof i=="string"){const o=t.indexOf(i);o===-1?t.push(i,n[r+1]):t[o+1]=ma(t[o+1],n[r+1]),r+=2}else t.push(i),r+=1}return t},Vu=async(e,n)=>{var t;if(Tt.value=h.cloneDeep(n),An.setRefreshCurStructure(!1),(t=wt.value)==null||t.splice(0),e==="授权"){if(!kt.value){h.ElMessage.error("请正确定义角色权限");return}const r=Nu(Tt.value[kt.value]);let i;if(r)i=Tt.value[kt.value];else{const o=Rr(Tt.value[kt.value]),a=Ln(o),s=Or(a),c=Mr(s,"parentPath");i=Nr(c)}if(!i||!Array.isArray(i)){h.ElMessage.error("权限数据处理出错了,请联系管理员");return}pt.title=`【${n.角色名称}】授权`,pt.show=!0,await l.nextTick(),Ru(Bt.value,i),Cu(i,Bt.value)}},_u=()=>{pt.show=!1},cr=l.ref(),Ku=async e=>{const n=await Zt(h.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var i;return{id:r.id,tableData:(i=r==null?void 0:r.value)==null?void 0:i.tableData}});return t==null?void 0:t.map(r=>{var i;if(Array.isArray(r==null?void 0:r.tableData)){let o={id:r.id};return(i=r==null?void 0:r.tableData)==null||i.forEach((a,s)=>{o[`a${s}`]=a}),o}else return{...r.tableData,id:r.id}})},Xt=(e,n)=>{let t={};if(n==null||n.forEach(r=>{r.label&&e&&(t[r.label]=(e==null?void 0:e[r==null?void 0:r.prop])??null)}),t!=null&&t.id){const{id:r,...i}=t;return i}return t},Hu=async(e,n)=>{var o,a;let t=[];Array.isArray(e)?t=h.cloneDeep(e):t=[h.cloneDeep(e)];const r=(o=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:o.map(s=>{var c,u,p,f,d;return{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=Sn.value)!=null&&c.startsWith("/")?(u=Sn.value)==null?void 0:u.substring(1):Sn.value,tableId:n,createUserId:(p=Yn.value)==null?void 0:p.id,createUserOrg:((f=Yn.value)==null?void 0:f.dept)||((d=Yn.value)==null?void 0:d.部门名称)},value:{tableData:Xt(s,ur.value)}}}),i=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:a.map(s=>({id:s==null?void 0:s.id,value:{tableData:Xt(s,ur.value)}}));r.length>0&&await Zt(h.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await Zt(h.batchUpdateInsofDataApi,{dataList:i},"编辑"),pt.show=!1)},Pr=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Hu(e,t);else{let i=[];n!=null&&n.includes("批量")?i=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(o=>o==null?void 0:o.id):[]:i=[e==null?void 0:e.id],await Zt(h.batchDeleteInsofDataApi,{ids:i},"编辑")}},ba=e=>{let n=[];return e==null||e.forEach(t=>{var r;if(t.checkedButtons&&((r=t.checkedButtons)==null?void 0:r.length)>0){const i={path:t.path,checkedButtons:t.checkedButtons};n=n.concat(i)}t.children&&(n=n.concat(ba(t.children)))}),n},$u=()=>{const e=ba(Bt.value),n=Fu(e),t=Pu(n),r=ga(t),i=Lu(r);cr.value={...Tt.value,[kt.value]:i},l.nextTick(()=>{Pr(cr.value,"编辑",Vn.value)})},pt=l.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0}),Uu=({isPenultimate:e},n)=>{var t,r;return console.log("isPenultimate",e,n),((r=(t=n==null?void 0:n.data)==null?void 0:t.renderButtons)==null?void 0:r.length)>0?"is-penultimate":""},Vn=l.ref(0),Sa=async e=>{var r,i,o,a,s;let n;const t=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:e!=null&&e.startsWith("/")?e==null?void 0:e.substring(1):e}});return((r=t==null?void 0:t.data)==null?void 0:r.code)===200&&(i=t==null?void 0:t.data)!=null&&i.result&&((o=t==null?void 0:t.data)==null?void 0:o.result.length)>0&&(n=(s=(a=t==null?void 0:t.data.result)==null?void 0:a[0])==null?void 0:s.id,Vn.value=n),n},Bt=l.ref([]),zu=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),qu=(e,n)=>{var t;e.checkedButtons=n?(t=e.renderButtons)==null?void 0:t.map(r=>r.path):[]},wt=l.ref([]),ju=(e,n)=>{var t,r,i;n.checkedButtons=e,((t=n.checkedButtons)==null?void 0:t.length)===((r=n.renderButtons)==null?void 0:r.length)?wt.value.push(n.path):(e==null?void 0:e.length)===0&&(wt.value=(i=wt.value)==null?void 0:i.filter(o=>o!==n.path))};l.watch(()=>wt.value.length,()=>{var e;(e=Br.value)==null||e.setCheckedKeys([...wt.value])});l.watch(()=>pt.show,e=>{e||(Bt.value=pa(Bt.value))});const Ea=l.computed(()=>{var t;const e=(t=h.cloneDeep(Eu.value))==null?void 0:t.filter(r=>{var i,o;return((o=(i=r==null?void 0:r.key)==null?void 0:i.pageKey)==null?void 0:o.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(r=>{var a,s,c,u,p,f,d,y;const i=/button/i;let o=(c=(s=(a=r==null?void 0:r.value)==null?void 0:a.pageData)==null?void 0:s.compData)==null?void 0:c.filter(v=>i.test(v==null?void 0:v.key));return o=Array.from(new Set(o==null?void 0:o.flatMap(v=>v.contents.map(b=>b.label)))),{path:(p=(u=r==null?void 0:r.key)==null?void 0:u.pageKey)!=null&&p.startsWith("/")?(d=(f=r==null?void 0:r.key)==null?void 0:f.pageKey)==null?void 0:d.substring(1):(y=r==null?void 0:r.key)==null?void 0:y.pageKey,buttons:o}}),...Ta.value]}),Ta=l.ref([]),Gu=(e,n,t)=>{const i=[e==null?void 0:e.find(o=>(o==null?void 0:o.title)===n)].flatMap(o=>o==null?void 0:o.children);return i==null?void 0:i.map(o=>{var a,s;return{path:(a=o==null?void 0:o.path)!=null&&a.startsWith("/")?(s=o==null?void 0:o.path)==null?void 0:s.substring(1):o==null?void 0:o.path,buttons:t}})},eo=(e,n)=>{var t;if(e.carryData){if(e.path==="系统管理/个人中心"){const i=["基本信息","上传头像","签名","修改密码"];return i==null?void 0:i.map(o=>{var a,s;return{title:o,path:(a=e==null?void 0:e.path)!=null&&a.startsWith("/")?((s=e==null?void 0:e.path)==null?void 0:s.substring(1))+"/"+o:e.path+"/"+o}})}if(!(n!=null&&n.buttons)||!Array.isArray(n==null?void 0:n.buttons))return[];const r=(t=n==null?void 0:n.buttons)!=null&&t.includes("查看")?n==null?void 0:n.buttons:["查看",...n==null?void 0:n.buttons];return r==null?void 0:r.map(i=>{var o,a;return{title:i,path:(o=e==null?void 0:e.path)!=null&&o.startsWith("/")?((a=e==null?void 0:e.path)==null?void 0:a.substring(1))+"/"+i:e.path+"/"+i}})}return[]},ka=(e,n)=>{if(Array.isArray(e))return e==null?void 0:e.map(t=>{var o,a;const r=(o=t==null?void 0:t.path)!=null&&o.startsWith("/")?(a=t==null?void 0:t.path)==null?void 0:a.substring(1):t==null?void 0:t.path,i=n==null?void 0:n.find(s=>(s==null?void 0:s.path)===r);return t.children&&t.children.length>0?{...t,renderButtons:eo(t,i),checkedButtons:[],children:ka(t.children,Ea.value)}:{...t,renderButtons:eo(t,i),checkedButtons:[]}})},Wu={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:ca.value,name:""}]}]},Yu=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:ka,addPathToTree:Ln,authorizeDialog:pt,buttonValue:Au,changedRow:cr,clickRow:Tt,clickRowButton:Vu,clickSubmitAuthority:$u,closeAuthorizeDialog:_u,compName:fa,convertArrayToTree:Rr,convertIndexToLabel:Xt,customNodeClass:Uu,getActivePageStructureId:Sa,getAuthorityKey:ya,getFirstArrayProperty:Cr,getLeafNodesRecursive:Or,getPageDataAsync:Ku,groupByField:Mr,handleAddSysMenusButtons:Gu,handleItemDataChange:Bu,handleNodeBtnChange:ju,handleNodeCheckChange:qu,handleQueryChange:Iu,handleRowAuthorityRender:Nr,handleSubmitAsync:Zt,isPageDataExist:wu,menuData:Bt,menusButtons:zu,pageData:ca,pageDataFiltered:xu,queryFormData:Du,structureButtons:Ea,structureId:Vn,submitTableAsyncByVerify:Pr,tempRolePageData:Wu,tempSysMenus:Ta,treeRef:Br},Symbol.toStringTag,{value:"Module"}));var Ju="0123456789abcdefghijklmnopqrstuvwxyz";function et(e){return Ju.charAt(e)}function Zu(e,n){return e&n}function dn(e,n){return e|n}function to(e,n){return e^n}function no(e,n){return e&~n}function Xu(e){if(e==0)return-1;var n=0;return(e&65535)==0&&(e>>=16,n+=16),(e&255)==0&&(e>>=8,n+=8),(e&15)==0&&(e>>=4,n+=4),(e&3)==0&&(e>>=2,n+=2),(e&1)==0&&++n,n}function Qu(e){for(var n=0;e!=0;)e&=e-1,++n;return n}var St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Da="=";function wn(e){var n,t,r="";for(n=0;n+3<=e.length;n+=3)t=parseInt(e.substring(n,n+3),16),r+=St.charAt(t>>6)+St.charAt(t&63);for(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=St.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=St.charAt(t>>2)+St.charAt((t&3)<<4));(r.length&3)>0;)r+=Da;return r}function ro(e){var n="",t,r=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=Da;++t){var o=St.indexOf(e.charAt(t));o<0||(r==0?(n+=et(o>>2),i=o&3,r=1):r==1?(n+=et(i<<2|o>>4),i=o&15,r=2):r==2?(n+=et(i),n+=et(o>>2),i=o&3,r=3):(n+=et(i<<2|o>>4),n+=et(o&15),r=0))}return r==1&&(n+=et(i<<2)),n}var vt,ec={decode:function(e){var n;if(vt===void 0){var t="0123456789ABCDEF",r=` \f
8
+ \r  \u2028\u2029`;for(vt={},n=0;n<16;++n)vt[t.charAt(n)]=n;for(t=t.toLowerCase(),n=10;n<16;++n)vt[t.charAt(n)]=n;for(n=0;n<r.length;++n)vt[r.charAt(n)]=-1}var i=[],o=0,a=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=vt[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},ct,fr={decode:function(e){var n;if(ct===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
9
+ \r  \u2028\u2029`;for(ct=Object.create(null),n=0;n<64;++n)ct[t.charAt(n)]=n;for(ct["-"]=62,ct._=63,n=0;n<r.length;++n)ct[r.charAt(n)]=-1}var i=[],o=0,a=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=ct[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);o|=s,++a>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=o&255,o=0,a=0):o<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255;break}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var n=fr.re.exec(e);if(n)if(n[1])e=n[1];else if(n[2])e=n[2];else throw new Error("RegExp out of sync");return fr.decode(e)}},mt=1e13,zt=function(){function e(n){this.buf=[+n||0]}return e.prototype.mulAdd=function(n,t){var r=this.buf,i=r.length,o,a;for(o=0;o<i;++o)a=r[o]*n+t,a<mt?t=0:(t=0|a/mt,a-=t*mt),r[o]=a;t>0&&(r[o]=t)},e.prototype.sub=function(n){var t=this.buf,r=t.length,i,o;for(i=0;i<r;++i)o=t[i]-n,o<0?(o+=mt,n=1):n=0,t[i]=o;for(;t[t.length-1]===0;)t.pop()},e.prototype.toString=function(n){if((n||10)!=10)throw new Error("only base 10 is supported");for(var t=this.buf,r=t[t.length-1].toString(),i=t.length-2;i>=0;--i)r+=(mt+t[i]).toString().substring(1);return r},e.prototype.valueOf=function(){for(var n=this.buf,t=0,r=n.length-1;r>=0;--r)t=t*mt+n[r];return t},e.prototype.simplify=function(){var n=this.buf;return n.length==1?n[0]:this},e}(),Aa="…",tc=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,nc=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function It(e,n){return e.length>n&&(e=e.substring(0,n)+Aa),e}var Jn=function(){function e(n,t){this.hexDigits="0123456789ABCDEF",n instanceof e?(this.enc=n.enc,this.pos=n.pos):(this.enc=n,this.pos=t)}return e.prototype.get=function(n){if(n===void 0&&(n=this.pos++),n>=this.enc.length)throw new Error("Requesting byte offset ".concat(n," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(n):this.enc[n]},e.prototype.hexByte=function(n){return this.hexDigits.charAt(n>>4&15)+this.hexDigits.charAt(n&15)},e.prototype.hexDump=function(n,t,r){for(var i="",o=n;o<t;++o)if(i+=this.hexByte(this.get(o)),r!==!0)switch(o&15){case 7:i+=" ";break;case 15:i+=`
10
+ `;break;default:i+=" "}return i},e.prototype.isASCII=function(n,t){for(var r=n;r<t;++r){var i=this.get(r);if(i<32||i>176)return!1}return!0},e.prototype.parseStringISO=function(n,t){for(var r="",i=n;i<t;++i)r+=String.fromCharCode(this.get(i));return r},e.prototype.parseStringUTF=function(n,t){for(var r="",i=n;i<t;){var o=this.get(i++);o<128?r+=String.fromCharCode(o):o>191&&o<224?r+=String.fromCharCode((o&31)<<6|this.get(i++)&63):r+=String.fromCharCode((o&15)<<12|(this.get(i++)&63)<<6|this.get(i++)&63)}return r},e.prototype.parseStringBMP=function(n,t){for(var r="",i,o,a=n;a<t;)i=this.get(a++),o=this.get(a++),r+=String.fromCharCode(i<<8|o);return r},e.prototype.parseTime=function(n,t,r){var i=this.parseStringISO(n,t),o=(r?tc:nc).exec(i);return o?(r&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),i=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(i+=":"+o[5],o[6]&&(i+=":"+o[6],o[7]&&(i+="."+o[7]))),o[8]&&(i+=" UTC",o[8]!="Z"&&(i+=o[8],o[9]&&(i+=":"+o[9]))),i):"Unrecognized time: "+i},e.prototype.parseInteger=function(n,t){for(var r=this.get(n),i=r>127,o=i?255:0,a,s="";r==o&&++n<t;)r=this.get(n);if(a=t-n,a===0)return i?-1:0;if(a>4){for(s=r,a<<=3;((+s^o)&128)==0;)s=+s<<1,--a;s="("+a+` bit)
11
+ `}i&&(r=r-256);for(var c=new zt(r),u=n+1;u<t;++u)c.mulAdd(256,this.get(u));return s+c.toString()},e.prototype.parseBitString=function(n,t,r){for(var i=this.get(n),o=(t-n-1<<3)-i,a="("+o+` bit)
12
+ `,s="",c=n+1;c<t;++c){for(var u=this.get(c),p=c==t-1?i:0,f=7;f>=p;--f)s+=u>>f&1?"1":"0";if(s.length>r)return a+It(s,r)}return a+s},e.prototype.parseOctetString=function(n,t,r){if(this.isASCII(n,t))return It(this.parseStringISO(n,t),r);var i=t-n,o="("+i+` byte)
13
+ `;r/=2,i>r&&(t=n+r);for(var a=n;a<t;++a)o+=this.hexByte(this.get(a));return i>r&&(o+=Aa),o},e.prototype.parseOID=function(n,t,r){for(var i="",o=new zt,a=0,s=n;s<t;++s){var c=this.get(s);if(o.mulAdd(128,c&127),a+=7,!(c&128)){if(i==="")if(o=o.simplify(),o instanceof zt)o.sub(80),i="2."+o.toString();else{var u=o<80?o<40?0:1:2;i=u+"."+(o-u*40)}else i+="."+o.toString();if(i.length>r)return It(i,r);o=new zt,a=0}}return a>0&&(i+=".incomplete"),i},e}(),rc=function(){function e(n,t,r,i,o){if(!(i instanceof io))throw new Error("Invalid tag value.");this.stream=n,this.header=t,this.length=r,this.tag=i,this.sub=o}return e.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},e.prototype.content=function(n){if(this.tag===void 0)return null;n===void 0&&(n=1/0);var t=this.posContent(),r=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,n);switch(this.tag.tagNumber){case 1:return this.stream.get(t)===0?"false":"true";case 2:return this.stream.parseInteger(t,t+r);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+r,n);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+r,n);case 6:return this.stream.parseOID(t,t+r,n);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return It(this.stream.parseStringUTF(t,t+r),n);case 18:case 19:case 20:case 21:case 22:case 26:return It(this.stream.parseStringISO(t,t+r),n);case 30:return It(this.stream.parseStringBMP(t,t+r),n);case 23:case 24:return this.stream.parseTime(t,t+r,this.tag.tagNumber==23)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(n){n===void 0&&(n="");var t=n+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(t+=" (encapsulates)"),t+=`
14
+ `,this.sub!==null){n+=" ";for(var r=0,i=this.sub.length;r<i;++r)t+=this.sub[r].toPrettyString(n)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(n){var t=n.get(),r=t&127;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(n.pos-1));if(r===0)return null;t=0;for(var i=0;i<r;++i)t=t*256+n.get();return t},e.prototype.getHexStringValue=function(){var n=this.toHexString(),t=this.header*2,r=this.length*2;return n.substr(t,r)},e.decode=function(n){var t;n instanceof Jn?t=n:t=new Jn(n,0);var r=new Jn(t),i=new io(t),o=e.decodeLength(t),a=t.pos,s=a-r.pos,c=null,u=function(){var f=[];if(o!==null){for(var d=a+o;t.pos<d;)f[f.length]=e.decode(t);if(t.pos!=d)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var y=e.decode(t);if(y.tag.isEOC())break;f[f.length]=y}o=a-t.pos}catch(v){throw new Error("Exception while decoding undefined length content: "+v)}return f};if(i.tagConstructed)c=u();else if(i.isUniversal()&&(i.tagNumber==3||i.tagNumber==4))try{if(i.tagNumber==3&&t.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");c=u();for(var p=0;p<c.length;++p)if(c[p].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{c=null}if(c===null){if(o===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);t.pos=a+Math.abs(o)}return new e(r,s,o,i,c)},e}(),io=function(){function e(n){var t=n.get();if(this.tagClass=t>>6,this.tagConstructed=(t&32)!==0,this.tagNumber=t&31,this.tagNumber==31){var r=new zt;do t=n.get(),r.mulAdd(128,t&127);while(t&128);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return this.tagClass===0},e.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},e}(),lt,ic=0xdeadbeefcafe,oo=(ic&16777215)==15715070,Ne=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],oc=(1<<26)/Ne[Ne.length-1],se=function(){function e(n,t,r){n!=null&&(typeof n=="number"?this.fromNumber(n,t,r):t==null&&typeof n!="string"?this.fromString(n,256):this.fromString(n,t))}return e.prototype.toString=function(n){if(this.s<0)return"-"+this.negate().toString(n);var t;if(n==16)t=4;else if(n==8)t=3;else if(n==2)t=1;else if(n==32)t=5;else if(n==4)t=2;else return this.toRadix(n);var r=(1<<t)-1,i,o=!1,a="",s=this.t,c=this.DB-s*this.DB%t;if(s-- >0)for(c<this.DB&&(i=this[s]>>c)>0&&(o=!0,a=et(i));s>=0;)c<t?(i=(this[s]&(1<<c)-1)<<t-c,i|=this[--s]>>(c+=this.DB-t)):(i=this[s]>>(c-=t)&r,c<=0&&(c+=this.DB,--s)),i>0&&(o=!0),o&&(a+=et(i));return o?a:"0"},e.prototype.negate=function(){var n=he();return e.ZERO.subTo(this,n),n},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(n){var t=this.s-n.s;if(t!=0)return t;var r=this.t;if(t=r-n.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-n[r])!=0)return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+yn(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(n){var t=he();return this.abs().divRemTo(n,null,t),this.s<0&&t.compareTo(e.ZERO)>0&&n.subTo(t,t),t},e.prototype.modPowInt=function(n,t){var r;return n<256||t.isEven()?r=new ao(t):r=new so(t),this.exp(n,r)},e.prototype.clone=function(){var n=he();return this.copyTo(n),n},e.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},e.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},e.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},e.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},e.prototype.toByteArray=function(){var n=this.t,t=[];t[0]=this.s;var r=this.DB-n*this.DB%8,i,o=0;if(n-- >0)for(r<this.DB&&(i=this[n]>>r)!=(this.s&this.DM)>>r&&(t[o++]=i|this.s<<this.DB-r);n>=0;)r<8?(i=(this[n]&(1<<r)-1)<<8-r,i|=this[--n]>>(r+=this.DB-8)):(i=this[n]>>(r-=8)&255,r<=0&&(r+=this.DB,--n)),(i&128)!=0&&(i|=-256),o==0&&(this.s&128)!=(i&128)&&++o,(o>0||i!=this.s)&&(t[o++]=i);return t},e.prototype.equals=function(n){return this.compareTo(n)==0},e.prototype.min=function(n){return this.compareTo(n)<0?this:n},e.prototype.max=function(n){return this.compareTo(n)>0?this:n},e.prototype.and=function(n){var t=he();return this.bitwiseTo(n,Zu,t),t},e.prototype.or=function(n){var t=he();return this.bitwiseTo(n,dn,t),t},e.prototype.xor=function(n){var t=he();return this.bitwiseTo(n,to,t),t},e.prototype.andNot=function(n){var t=he();return this.bitwiseTo(n,no,t),t},e.prototype.not=function(){for(var n=he(),t=0;t<this.t;++t)n[t]=this.DM&~this[t];return n.t=this.t,n.s=~this.s,n},e.prototype.shiftLeft=function(n){var t=he();return n<0?this.rShiftTo(-n,t):this.lShiftTo(n,t),t},e.prototype.shiftRight=function(n){var t=he();return n<0?this.lShiftTo(-n,t):this.rShiftTo(n,t),t},e.prototype.getLowestSetBit=function(){for(var n=0;n<this.t;++n)if(this[n]!=0)return n*this.DB+Xu(this[n]);return this.s<0?this.t*this.DB:-1},e.prototype.bitCount=function(){for(var n=0,t=this.s&this.DM,r=0;r<this.t;++r)n+=Qu(this[r]^t);return n},e.prototype.testBit=function(n){var t=Math.floor(n/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<n%this.DB)!=0},e.prototype.setBit=function(n){return this.changeBit(n,dn)},e.prototype.clearBit=function(n){return this.changeBit(n,no)},e.prototype.flipBit=function(n){return this.changeBit(n,to)},e.prototype.add=function(n){var t=he();return this.addTo(n,t),t},e.prototype.subtract=function(n){var t=he();return this.subTo(n,t),t},e.prototype.multiply=function(n){var t=he();return this.multiplyTo(n,t),t},e.prototype.divide=function(n){var t=he();return this.divRemTo(n,t,null),t},e.prototype.remainder=function(n){var t=he();return this.divRemTo(n,null,t),t},e.prototype.divideAndRemainder=function(n){var t=he(),r=he();return this.divRemTo(n,t,r),[t,r]},e.prototype.modPow=function(n,t){var r=n.bitLength(),i,o=it(1),a;if(r<=0)return o;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?a=new ao(t):t.isEven()?a=new sc(t):a=new so(t);var s=[],c=3,u=i-1,p=(1<<i)-1;if(s[1]=a.convert(this),i>1){var f=he();for(a.sqrTo(s[1],f);c<=p;)s[c]=he(),a.mulTo(f,s[c-2],s[c]),c+=2}var d=n.t-1,y,v=!0,b=he(),g;for(r=yn(n[d])-1;d>=0;){for(r>=u?y=n[d]>>r-u&p:(y=(n[d]&(1<<r+1)-1)<<u-r,d>0&&(y|=n[d-1]>>this.DB+r-u)),c=i;(y&1)==0;)y>>=1,--c;if((r-=c)<0&&(r+=this.DB,--d),v)s[y].copyTo(o),v=!1;else{for(;c>1;)a.sqrTo(o,b),a.sqrTo(b,o),c-=2;c>0?a.sqrTo(o,b):(g=o,o=b,b=g),a.mulTo(b,s[y],o)}for(;d>=0&&(n[d]&1<<r)==0;)a.sqrTo(o,b),g=o,o=b,b=g,--r<0&&(r=this.DB-1,--d)}return a.revert(o)},e.prototype.modInverse=function(n){var t=n.isEven();if(this.isEven()&&t||n.signum()==0)return e.ZERO;for(var r=n.clone(),i=this.clone(),o=it(1),a=it(0),s=it(0),c=it(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!o.isEven()||!a.isEven())&&(o.addTo(this,o),a.subTo(n,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(n,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?((!s.isEven()||!c.isEven())&&(s.addTo(this,s),c.subTo(n,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(n,c),c.rShiftTo(1,c);r.compareTo(i)>=0?(r.subTo(i,r),t&&o.subTo(s,o),a.subTo(c,a)):(i.subTo(r,i),t&&s.subTo(o,s),c.subTo(a,c))}if(i.compareTo(e.ONE)!=0)return e.ZERO;if(c.compareTo(n)>=0)return c.subtract(n);if(c.signum()<0)c.addTo(n,c);else return c;return c.signum()<0?c.add(n):c},e.prototype.pow=function(n){return this.exp(n,new ac)},e.prototype.gcd=function(n){var t=this.s<0?this.negate():this.clone(),r=n.s<0?n.negate():n.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var o=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(o<a&&(a=o),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},e.prototype.isProbablePrime=function(n){var t,r=this.abs();if(r.t==1&&r[0]<=Ne[Ne.length-1]){for(t=0;t<Ne.length;++t)if(r[0]==Ne[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Ne.length;){for(var i=Ne[t],o=t+1;o<Ne.length&&i<oc;)i*=Ne[o++];for(i=r.modInt(i);t<o;)if(i%Ne[t++]==0)return!1}return r.millerRabin(n)},e.prototype.copyTo=function(n){for(var t=this.t-1;t>=0;--t)n[t]=this[t];n.t=this.t,n.s=this.s},e.prototype.fromInt=function(n){this.t=1,this.s=n<0?-1:0,n>0?this[0]=n:n<-1?this[0]=n+this.DV:this.t=0},e.prototype.fromString=function(n,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(n,t);return}this.t=0,this.s=0;for(var i=n.length,o=!1,a=0;--i>=0;){var s=r==8?+n[i]&255:uo(n,i);if(s<0){n.charAt(i)=="-"&&(o=!0);continue}o=!1,a==0?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,a+=r,a>=this.DB&&(a-=this.DB)}r==8&&(+n[0]&128)!=0&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&e.ZERO.subTo(this,this)},e.prototype.clamp=function(){for(var n=this.s&this.DM;this.t>0&&this[this.t-1]==n;)--this.t},e.prototype.dlShiftTo=function(n,t){var r;for(r=this.t-1;r>=0;--r)t[r+n]=this[r];for(r=n-1;r>=0;--r)t[r]=0;t.t=this.t+n,t.s=this.s},e.prototype.drShiftTo=function(n,t){for(var r=n;r<this.t;++r)t[r-n]=this[r];t.t=Math.max(this.t-n,0),t.s=this.s},e.prototype.lShiftTo=function(n,t){for(var r=n%this.DB,i=this.DB-r,o=(1<<i)-1,a=Math.floor(n/this.DB),s=this.s<<r&this.DM,c=this.t-1;c>=0;--c)t[c+a+1]=this[c]>>i|s,s=(this[c]&o)<<r;for(var c=a-1;c>=0;--c)t[c]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},e.prototype.rShiftTo=function(n,t){t.s=this.s;var r=Math.floor(n/this.DB);if(r>=this.t){t.t=0;return}var i=n%this.DB,o=this.DB-i,a=(1<<i)-1;t[0]=this[r]>>i;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&a)<<o,t[s-r]=this[s]>>i;i>0&&(t[this.t-r-1]|=(this.s&a)<<o),t.t=this.t-r,t.clamp()},e.prototype.subTo=function(n,t){for(var r=0,i=0,o=Math.min(n.t,this.t);r<o;)i+=this[r]-n[r],t[r++]=i&this.DM,i>>=this.DB;if(n.t<this.t){for(i-=n.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<n.t;)i-=n[r],t[r++]=i&this.DM,i>>=this.DB;i-=n.s}t.s=i<0?-1:0,i<-1?t[r++]=this.DV+i:i>0&&(t[r++]=i),t.t=r,t.clamp()},e.prototype.multiplyTo=function(n,t){var r=this.abs(),i=n.abs(),o=r.t;for(t.t=o+i.t;--o>=0;)t[o]=0;for(o=0;o<i.t;++o)t[o+r.t]=r.am(0,i[o],t,o,0,r.t);t.s=0,t.clamp(),this.s!=n.s&&e.ZERO.subTo(t,t)},e.prototype.squareTo=function(n){for(var t=this.abs(),r=n.t=2*t.t;--r>=0;)n[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],n,2*r,0,1);(n[r+t.t]+=t.am(r+1,2*t[r],n,2*r+1,i,t.t-r-1))>=t.DV&&(n[r+t.t]-=t.DV,n[r+t.t+1]=1)}n.t>0&&(n[n.t-1]+=t.am(r,t[r],n,2*r,0,1)),n.s=0,n.clamp()},e.prototype.divRemTo=function(n,t,r){var i=n.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=he());var a=he(),s=this.s,c=n.s,u=this.DB-yn(i[i.t-1]);u>0?(i.lShiftTo(u,a),o.lShiftTo(u,r)):(i.copyTo(a),o.copyTo(r));var p=a.t,f=a[p-1];if(f!=0){var d=f*(1<<this.F1)+(p>1?a[p-2]>>this.F2:0),y=this.FV/d,v=(1<<this.F1)/d,b=1<<this.F2,g=r.t,m=g-p,E=t??he();for(a.dlShiftTo(m,E),r.compareTo(E)>=0&&(r[r.t++]=1,r.subTo(E,r)),e.ONE.dlShiftTo(p,E),E.subTo(a,a);a.t<p;)a[a.t++]=0;for(;--m>=0;){var O=r[--g]==f?this.DM:Math.floor(r[g]*y+(r[g-1]+b)*v);if((r[g]+=a.am(0,O,r,m,0,p))<O)for(a.dlShiftTo(m,E),r.subTo(E,r);r[g]<--O;)r.subTo(E,r)}t!=null&&(r.drShiftTo(p,t),s!=c&&e.ZERO.subTo(t,t)),r.t=p,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var n=this[0];if((n&1)==0)return 0;var t=n&3;return t=t*(2-(n&15)*t)&15,t=t*(2-(n&255)*t)&255,t=t*(2-((n&65535)*t&65535))&65535,t=t*(2-n*t%this.DV)%this.DV,t>0?this.DV-t:-t},e.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},e.prototype.exp=function(n,t){if(n>4294967295||n<1)return e.ONE;var r=he(),i=he(),o=t.convert(this),a=yn(n)-1;for(o.copyTo(r);--a>=0;)if(t.sqrTo(r,i),(n&1<<a)>0)t.mulTo(i,o,r);else{var s=r;r=i,i=s}return t.revert(r)},e.prototype.chunkSize=function(n){return Math.floor(Math.LN2*this.DB/Math.log(n))},e.prototype.toRadix=function(n){if(n==null&&(n=10),this.signum()==0||n<2||n>36)return"0";var t=this.chunkSize(n),r=Math.pow(n,t),i=it(r),o=he(),a=he(),s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(r+a.intValue()).toString(n).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(n)+s},e.prototype.fromRadix=function(n,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),o=!1,a=0,s=0,c=0;c<n.length;++c){var u=uo(n,c);if(u<0){n.charAt(c)=="-"&&this.signum()==0&&(o=!0);continue}s=t*s+u,++a>=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0)}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),o&&e.ZERO.subTo(this,this)},e.prototype.fromNumber=function(n,t,r){if(typeof t=="number")if(n<2)this.fromInt(1);else for(this.fromNumber(n,r),this.testBit(n-1)||this.bitwiseTo(e.ONE.shiftLeft(n-1),dn,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>n&&this.subTo(e.ONE.shiftLeft(n-1),this);else{var i=[],o=n&7;i.length=(n>>3)+1,t.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(n,t,r){var i,o,a=Math.min(n.t,this.t);for(i=0;i<a;++i)r[i]=t(this[i],n[i]);if(n.t<this.t){for(o=n.s&this.DM,i=a;i<this.t;++i)r[i]=t(this[i],o);r.t=this.t}else{for(o=this.s&this.DM,i=a;i<n.t;++i)r[i]=t(o,n[i]);r.t=n.t}r.s=t(this.s,n.s),r.clamp()},e.prototype.changeBit=function(n,t){var r=e.ONE.shiftLeft(n);return this.bitwiseTo(r,t,r),r},e.prototype.addTo=function(n,t){for(var r=0,i=0,o=Math.min(n.t,this.t);r<o;)i+=this[r]+n[r],t[r++]=i&this.DM,i>>=this.DB;if(n.t<this.t){for(i+=n.s;r<this.t;)i+=this[r],t[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<n.t;)i+=n[r],t[r++]=i&this.DM,i>>=this.DB;i+=n.s}t.s=i<0?-1:0,i>0?t[r++]=i:i<-1&&(t[r++]=this.DV+i),t.t=r,t.clamp()},e.prototype.dMultiply=function(n){this[this.t]=this.am(0,n-1,this,0,0,this.t),++this.t,this.clamp()},e.prototype.dAddOffset=function(n,t){if(n!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=n;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},e.prototype.multiplyLowerTo=function(n,t,r){var i=Math.min(this.t+n.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(var o=r.t-this.t;i<o;++i)r[i+this.t]=this.am(0,n[i],r,i,0,this.t);for(var o=Math.min(n.t,t);i<o;++i)this.am(0,n[i],r,i,0,t-i);r.clamp()},e.prototype.multiplyUpperTo=function(n,t,r){--t;var i=r.t=this.t+n.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<n.t;++i)r[this.t+i-t]=this.am(t-i,n[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)},e.prototype.modInt=function(n){if(n<=0)return 0;var t=this.DV%n,r=this.s<0?n-1:0;if(this.t>0)if(t==0)r=this[0]%n;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%n;return r},e.prototype.millerRabin=function(n){var t=this.subtract(e.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);n=n+1>>1,n>Ne.length&&(n=Ne.length);for(var o=he(),a=0;a<n;++a){o.fromInt(Ne[Math.floor(Math.random()*Ne.length)]);var s=o.modPow(i,this);if(s.compareTo(e.ONE)!=0&&s.compareTo(t)!=0){for(var c=1;c++<r&&s.compareTo(t)!=0;)if(s=s.modPowInt(2,this),s.compareTo(e.ONE)==0)return!1;if(s.compareTo(t)!=0)return!1}}return!0},e.prototype.square=function(){var n=he();return this.squareTo(n),n},e.prototype.gcda=function(n,t){var r=this.s<0?this.negate():this.clone(),i=n.s<0?n.negate():n.clone();if(r.compareTo(i)<0){var o=r;r=i,i=o}var a=r.getLowestSetBit(),s=i.getLowestSetBit();if(s<0){t(r);return}a<s&&(s=a),s>0&&(r.rShiftTo(s,r),i.rShiftTo(s,i));var c=function(){(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),(a=i.getLowestSetBit())>0&&i.rShiftTo(a,i),r.compareTo(i)>=0?(r.subTo(i,r),r.rShiftTo(1,r)):(i.subTo(r,i),i.rShiftTo(1,i)),r.signum()>0?setTimeout(c,0):(s>0&&i.lShiftTo(s,i),setTimeout(function(){t(i)},0))};setTimeout(c,10)},e.prototype.fromNumberAsync=function(n,t,r,i){if(typeof t=="number")if(n<2)this.fromInt(1);else{this.fromNumber(n,r),this.testBit(n-1)||this.bitwiseTo(e.ONE.shiftLeft(n-1),dn,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>n&&o.subTo(e.ONE.shiftLeft(n-1),o),o.isProbablePrime(t)?setTimeout(function(){i()},0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],c=n&7;s.length=(n>>3)+1,t.nextBytes(s),c>0?s[0]&=(1<<c)-1:s[0]=0,this.fromString(s,256)}},e}(),ac=function(){function e(){}return e.prototype.convert=function(n){return n},e.prototype.revert=function(n){return n},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r)},e.prototype.sqrTo=function(n,t){n.squareTo(t)},e}(),ao=function(){function e(n){this.m=n}return e.prototype.convert=function(n){return n.s<0||n.compareTo(this.m)>=0?n.mod(this.m):n},e.prototype.revert=function(n){return n},e.prototype.reduce=function(n){n.divRemTo(this.m,null,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}(),so=function(){function e(n){this.m=n,this.mp=n.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<n.DB-15)-1,this.mt2=2*n.t}return e.prototype.convert=function(n){var t=he();return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(se.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(n){var t=he();return n.copyTo(t),this.reduce(t),t},e.prototype.reduce=function(n){for(;n.t<=this.mt2;)n[n.t++]=0;for(var t=0;t<this.m.t;++t){var r=n[t]&32767,i=r*this.mpl+((r*this.mph+(n[t]>>15)*this.mpl&this.um)<<15)&n.DM;for(r=t+this.m.t,n[r]+=this.m.am(0,i,n,t,0,this.m.t);n[r]>=n.DV;)n[r]-=n.DV,n[++r]++}n.clamp(),n.drShiftTo(this.m.t,n),n.compareTo(this.m)>=0&&n.subTo(this.m,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}(),sc=function(){function e(n){this.m=n,this.r2=he(),this.q3=he(),se.ONE.dlShiftTo(2*n.t,this.r2),this.mu=this.r2.divide(n)}return e.prototype.convert=function(n){if(n.s<0||n.t>2*this.m.t)return n.mod(this.m);if(n.compareTo(this.m)<0)return n;var t=he();return n.copyTo(t),this.reduce(t),t},e.prototype.revert=function(n){return n},e.prototype.reduce=function(n){for(n.drShiftTo(this.m.t-1,this.r2),n.t>this.m.t+1&&(n.t=this.m.t+1,n.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);n.compareTo(this.r2)<0;)n.dAddOffset(1,this.m.t+1);for(n.subTo(this.r2,n);n.compareTo(this.m)>=0;)n.subTo(this.m,n)},e.prototype.mulTo=function(n,t,r){n.multiplyTo(t,r),this.reduce(r)},e.prototype.sqrTo=function(n,t){n.squareTo(t),this.reduce(t)},e}();function he(){return new se(null)}function Ee(e,n){return new se(e,n)}var lo=typeof navigator<"u";lo&&oo&&navigator.appName=="Microsoft Internet Explorer"?(se.prototype.am=function(n,t,r,i,o,a){for(var s=t&32767,c=t>>15;--a>=0;){var u=this[n]&32767,p=this[n++]>>15,f=c*u+p*s;u=s*u+((f&32767)<<15)+r[i]+(o&1073741823),o=(u>>>30)+(f>>>15)+c*p+(o>>>30),r[i++]=u&1073741823}return o},lt=30):lo&&oo&&navigator.appName!="Netscape"?(se.prototype.am=function(n,t,r,i,o,a){for(;--a>=0;){var s=t*this[n++]+r[i]+o;o=Math.floor(s/67108864),r[i++]=s&67108863}return o},lt=26):(se.prototype.am=function(n,t,r,i,o,a){for(var s=t&16383,c=t>>14;--a>=0;){var u=this[n]&16383,p=this[n++]>>14,f=c*u+p*s;u=s*u+((f&16383)<<14)+r[i]+o,o=(u>>28)+(f>>14)+c*p,r[i++]=u&268435455}return o},lt=28);se.prototype.DB=lt;se.prototype.DM=(1<<lt)-1;se.prototype.DV=1<<lt;var Fr=52;se.prototype.FV=Math.pow(2,Fr);se.prototype.F1=Fr-lt;se.prototype.F2=2*lt-Fr;var _n=[],Ft,Ue;Ft=48;for(Ue=0;Ue<=9;++Ue)_n[Ft++]=Ue;Ft=97;for(Ue=10;Ue<36;++Ue)_n[Ft++]=Ue;Ft=65;for(Ue=10;Ue<36;++Ue)_n[Ft++]=Ue;function uo(e,n){var t=_n[e.charCodeAt(n)];return t??-1}function it(e){var n=he();return n.fromInt(e),n}function yn(e){var n=1,t;return(t=e>>>16)!=0&&(e=t,n+=16),(t=e>>8)!=0&&(e=t,n+=8),(t=e>>4)!=0&&(e=t,n+=4),(t=e>>2)!=0&&(e=t,n+=2),(t=e>>1)!=0&&(e=t,n+=1),n}se.ZERO=it(0);se.ONE=it(1);var lc=function(){function e(){this.i=0,this.j=0,this.S=[]}return e.prototype.init=function(n){var t,r,i;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+n[t%n.length]&255,i=this.S[t],this.S[t]=this.S[r],this.S[r]=i;this.i=0,this.j=0},e.prototype.next=function(){var n;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,n=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=n,this.S[n+this.S[this.i]&255]},e}();function uc(){return new lc}var wa=256,gn,at=null,je;if(at==null){at=[],je=0;var vn=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Zn=new Uint32Array(256);for(window.crypto.getRandomValues(Zn),vn=0;vn<Zn.length;++vn)at[je++]=Zn[vn]&255}var mn=0,bn=function(e){if(mn=mn||0,mn>=256||je>=wa){window.removeEventListener?window.removeEventListener("mousemove",bn,!1):window.detachEvent&&window.detachEvent("onmousemove",bn);return}try{var n=e.x+e.y;at[je++]=n&255,mn+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",bn,!1):window.attachEvent&&window.attachEvent("onmousemove",bn))}function cc(){if(gn==null){for(gn=uc();je<wa;){var e=Math.floor(65536*Math.random());at[je++]=e&255}for(gn.init(at),je=0;je<at.length;++je)at[je]=0;je=0}return gn.next()}var hr=function(){function e(){}return e.prototype.nextBytes=function(n){for(var t=0;t<n.length;++t)n[t]=cc()},e}();function fc(e,n){if(n<e.length+22)return console.error("Message too long for RSA"),null;for(var t=n-e.length-6,r="",i=0;i<t;i+=2)r+="ff";var o="0001"+r+"00"+e;return Ee(o,16)}function hc(e,n){if(n<e.length+11)return console.error("Message too long for RSA"),null;for(var t=[],r=e.length-1;r>=0&&n>0;){var i=e.charCodeAt(r--);i<128?t[--n]=i:i>127&&i<2048?(t[--n]=i&63|128,t[--n]=i>>6|192):(t[--n]=i&63|128,t[--n]=i>>6&63|128,t[--n]=i>>12|224)}t[--n]=0;for(var o=new hr,a=[];n>2;){for(a[0]=0;a[0]==0;)o.nextBytes(a);t[--n]=a[0]}return t[--n]=2,t[--n]=0,new se(t)}var pc=function(){function e(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return e.prototype.doPublic=function(n){return n.modPowInt(this.e,this.n)},e.prototype.doPrivate=function(n){if(this.p==null||this.q==null)return n.modPow(this.d,this.n);for(var t=n.mod(this.p).modPow(this.dmp1,this.p),r=n.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},e.prototype.setPublic=function(n,t){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=Ee(n,16),this.e=parseInt(t,16)):console.error("Invalid RSA public key")},e.prototype.encrypt=function(n){var t=this.n.bitLength()+7>>3,r=hc(n,t);if(r==null)return null;var i=this.doPublic(r);if(i==null)return null;for(var o=i.toString(16),a=o.length,s=0;s<t*2-a;s++)o="0"+o;return o},e.prototype.setPrivate=function(n,t,r){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=Ee(n,16),this.e=parseInt(t,16),this.d=Ee(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(n,t,r,i,o,a,s,c){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=Ee(n,16),this.e=parseInt(t,16),this.d=Ee(r,16),this.p=Ee(i,16),this.q=Ee(o,16),this.dmp1=Ee(a,16),this.dmq1=Ee(s,16),this.coeff=Ee(c,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(n,t){var r=new hr,i=n>>1;this.e=parseInt(t,16);for(var o=new se(t,16);;){for(;this.p=new se(n-i,1,r),!(this.p.subtract(se.ONE).gcd(o).compareTo(se.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new se(i,1,r),!(this.q.subtract(se.ONE).gcd(o).compareTo(se.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var s=this.p.subtract(se.ONE),c=this.q.subtract(se.ONE),u=s.multiply(c);if(u.gcd(o).compareTo(se.ONE)==0){this.n=this.p.multiply(this.q),this.d=o.modInverse(u),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(c),this.coeff=this.q.modInverse(this.p);break}}},e.prototype.decrypt=function(n){var t=Ee(n,16),r=this.doPrivate(t);return r==null?null:dc(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(n,t,r){var i=new hr,o=n>>1;this.e=parseInt(t,16);var a=new se(t,16),s=this,c=function(){var u=function(){if(s.p.compareTo(s.q)<=0){var d=s.p;s.p=s.q,s.q=d}var y=s.p.subtract(se.ONE),v=s.q.subtract(se.ONE),b=y.multiply(v);b.gcd(a).compareTo(se.ONE)==0?(s.n=s.p.multiply(s.q),s.d=a.modInverse(b),s.dmp1=s.d.mod(y),s.dmq1=s.d.mod(v),s.coeff=s.q.modInverse(s.p),setTimeout(function(){r()},0)):setTimeout(c,0)},p=function(){s.q=he(),s.q.fromNumberAsync(o,1,i,function(){s.q.subtract(se.ONE).gcda(a,function(d){d.compareTo(se.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(p,0)})})},f=function(){s.p=he(),s.p.fromNumberAsync(n-o,1,i,function(){s.p.subtract(se.ONE).gcda(a,function(d){d.compareTo(se.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(p,0):setTimeout(f,0)})})};setTimeout(f,0)};setTimeout(c,0)},e.prototype.sign=function(n,t,r){var i=yc(r),o=i+t(n).toString(),a=fc(o,this.n.bitLength()/4);if(a==null)return null;var s=this.doPrivate(a);if(s==null)return null;var c=s.toString(16);return(c.length&1)==0?c:"0"+c},e.prototype.verify=function(n,t,r){var i=Ee(t,16),o=this.doPublic(i);if(o==null)return null;var a=o.toString(16).replace(/^1f+00/,""),s=gc(a);return s==r(n).toString()},e}();function dc(e,n){for(var t=e.toByteArray(),r=0;r<t.length&&t[r]==0;)++r;if(t.length-r!=n-1||t[r]!=2)return null;for(++r;t[r]!=0;)if(++r>=t.length)return null;for(var i="";++r<t.length;){var o=t[r]&255;o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((o&31)<<6|t[r+1]&63),++r):(i+=String.fromCharCode((o&15)<<12|(t[r+1]&63)<<6|t[r+2]&63),r+=2)}return i}var En={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function yc(e){return En[e]||""}function gc(e){for(var n in En)if(En.hasOwnProperty(n)){var t=En[n],r=t.length;if(e.substr(0,r)==t)return e.substr(r)}return e}/*!
15
+ Copyright (c) 2011, Yahoo! Inc. All rights reserved.
16
+ Code licensed under the BSD License:
17
+ http://developer.yahoo.com/yui/license.html
18
+ version: 2.9.0
19
+ */var Te={};Te.lang={extend:function(e,n,t){if(!n||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var r=function(){};if(r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=n.prototype,n.prototype.constructor==Object.prototype.constructor&&(n.prototype.constructor=n),t){var i;for(i in t)e.prototype[i]=t[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(s,c){for(i=0;i<a.length;i=i+1){var u=a[i],p=c[u];typeof p=="function"&&p!=Object.prototype[u]&&(s[u]=p)}})}catch{}o(e.prototype,t)}}};/**
20
+ * @fileOverview
21
+ * @name asn1-1.0.js
22
+ * @author Kenji Urushima kenji.urushima@gmail.com
23
+ * @version asn1 1.0.13 (2017-Jun-02)
24
+ * @since jsrsasign 2.1
25
+ * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
26
+ */var R={};(typeof R.asn1>"u"||!R.asn1)&&(R.asn1={});R.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var n=e.toString(16);return n.length%2==1&&(n="0"+n),n},this.bigIntToMinTwosComplementsHex=function(e){var n=e.toString(16);if(n.substr(0,1)!="-")n.length%2==1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{var t=n.substr(1),r=t.length;r%2==1?r+=1:n.match(/^[0-7]/)||(r+=2);for(var i="",o=0;o<r;o++)i+="f";var a=new se(i,16),s=a.xor(e).add(se.ONE);n=s.toString(16).replace(/^-/,"")}return n},this.getPEMStringFromHex=function(e,n){return hextopem(e,n)},this.newObject=function(e){var n=R,t=n.asn1,r=t.DERBoolean,i=t.DERInteger,o=t.DERBitString,a=t.DEROctetString,s=t.DERNull,c=t.DERObjectIdentifier,u=t.DEREnumerated,p=t.DERUTF8String,f=t.DERNumericString,d=t.DERPrintableString,y=t.DERTeletexString,v=t.DERIA5String,b=t.DERUTCTime,g=t.DERGeneralizedTime,m=t.DERSequence,E=t.DERSet,O=t.DERTaggedObject,k=t.ASN1Util.newObject,x=Object.keys(e);if(x.length!=1)throw"key of param shall be only one.";var I=x[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+I+":")==-1)throw"undefined key: "+I;if(I=="bool")return new r(e[I]);if(I=="int")return new i(e[I]);if(I=="bitstr")return new o(e[I]);if(I=="octstr")return new a(e[I]);if(I=="null")return new s(e[I]);if(I=="oid")return new c(e[I]);if(I=="enum")return new u(e[I]);if(I=="utf8str")return new p(e[I]);if(I=="numstr")return new f(e[I]);if(I=="prnstr")return new d(e[I]);if(I=="telstr")return new y(e[I]);if(I=="ia5str")return new v(e[I]);if(I=="utctime")return new b(e[I]);if(I=="gentime")return new g(e[I]);if(I=="seq"){for(var w=e[I],D=[],H=0;H<w.length;H++){var T=k(w[H]);D.push(T)}return new m({array:D})}if(I=="set"){for(var w=e[I],D=[],H=0;H<w.length;H++){var T=k(w[H]);D.push(T)}return new E({array:D})}if(I=="tag"){var B=e[I];if(Object.prototype.toString.call(B)==="[object Array]"&&B.length==3){var _=k(B[2]);return new O({tag:B[0],explicit:B[1],obj:_})}else{var F={};if(B.explicit!==void 0&&(F.explicit=B.explicit),B.tag!==void 0&&(F.tag=B.tag),B.obj===void 0)throw"obj shall be specified for 'tag'.";return F.obj=k(B.obj),new O(F)}}},this.jsonToASN1HEX=function(e){var n=this.newObject(e);return n.getEncodedHex()}};R.asn1.ASN1Util.oidHexToInt=function(e){for(var i="",n=parseInt(e.substr(0,2),16),t=Math.floor(n/40),r=n%40,i=t+"."+r,o="",a=2;a<e.length;a+=2){var s=parseInt(e.substr(a,2),16),c=("00000000"+s.toString(2)).slice(-8);if(o=o+c.substr(1,7),c.substr(0,1)=="0"){var u=new se(o,2);i=i+"."+u.toString(10),o=""}}return i};R.asn1.ASN1Util.oidIntToHex=function(e){var n=function(s){var c=s.toString(16);return c.length==1&&(c="0"+c),c},t=function(s){var c="",u=new se(s,10),p=u.toString(2),f=7-p.length%7;f==7&&(f=0);for(var d="",y=0;y<f;y++)d+="0";p=d+p;for(var y=0;y<p.length-1;y+=7){var v=p.substr(y,7);y!=p.length-7&&(v="1"+v),c+=n(parseInt(v,2))}return c};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=parseInt(i[0])*40+parseInt(i[1]);r+=n(o),i.splice(0,2);for(var a=0;a<i.length;a++)r+=t(i[a]);return r};R.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var n=this.hV.length/2,t=n.toString(16);if(t.length%2==1&&(t="0"+t),n<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+n.toString(16);var i=128+r;return i.toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};R.asn1.DERAbstractString=function(e){R.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(this.s)},this.setStringHex=function(n){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"?this.setString(e):typeof e.str<"u"?this.setString(e.str):typeof e.hex<"u"&&this.setStringHex(e.hex))};Te.lang.extend(R.asn1.DERAbstractString,R.asn1.ASN1Object);R.asn1.DERAbstractTime=function(e){R.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(n){utc=n.getTime()+n.getTimezoneOffset()*6e4;var t=new Date(utc);return t},this.formatDate=function(n,t,r){var i=this.zeroPadding,o=this.localDateToUTC(n),a=String(o.getFullYear());t=="utc"&&(a=a.substr(2,2));var s=i(String(o.getMonth()+1),2),c=i(String(o.getDate()),2),u=i(String(o.getHours()),2),p=i(String(o.getMinutes()),2),f=i(String(o.getSeconds()),2),d=a+s+c+u+p+f;if(r===!0){var y=o.getMilliseconds();if(y!=0){var v=i(String(y),3);v=v.replace(/[0]+$/,""),d=d+"."+v}}return d+"Z"},this.zeroPadding=function(n,t){return n.length>=t?n:new Array(t-n.length+1).join("0")+n},this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(n)},this.setByDateValue=function(n,t,r,i,o,a){var s=new Date(Date.UTC(n,t-1,r,i,o,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};Te.lang.extend(R.asn1.DERAbstractTime,R.asn1.ASN1Object);R.asn1.DERAbstractStructured=function(e){R.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array=n},this.appendASN1Object=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array.push(n)},this.asn1Array=new Array,typeof e<"u"&&typeof e.array<"u"&&(this.asn1Array=e.array)};Te.lang.extend(R.asn1.DERAbstractStructured,R.asn1.ASN1Object);R.asn1.DERBoolean=function(){R.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};Te.lang.extend(R.asn1.DERBoolean,R.asn1.ASN1Object);R.asn1.DERInteger=function(e){R.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=R.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new se(String(n),10);this.setByBigInteger(t)},this.setValueHex=function(n){this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.bigint<"u"?this.setByBigInteger(e.bigint):typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};Te.lang.extend(R.asn1.DERInteger,R.asn1.ASN1Object);R.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=R.asn1.ASN1Util.newObject(e.obj);e.hex="00"+n.getEncodedHex()}R.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,r){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+r},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var r=8-t.length%8;r==8&&(r=0);for(var i=0;i<=r;i++)t+="0";for(var o="",i=0;i<t.length-1;i+=8){var a=t.substr(i,8),s=parseInt(a,2).toString(16);s.length==1&&(s="0"+s),o+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+r+o},this.setByBooleanArray=function(t){for(var r="",i=0;i<t.length;i++)t[i]==!0?r+="1":r+="0";this.setByBinaryString(r)},this.newFalseArray=function(t){for(var r=new Array(t),i=0;i<t;i++)r[i]=!1;return r},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):typeof e.hex<"u"?this.setHexValueIncludingUnusedBits(e.hex):typeof e.bin<"u"?this.setByBinaryString(e.bin):typeof e.array<"u"&&this.setByBooleanArray(e.array))};Te.lang.extend(R.asn1.DERBitString,R.asn1.ASN1Object);R.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=R.asn1.ASN1Util.newObject(e.obj);e.hex=n.getEncodedHex()}R.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};Te.lang.extend(R.asn1.DEROctetString,R.asn1.DERAbstractString);R.asn1.DERNull=function(){R.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};Te.lang.extend(R.asn1.DERNull,R.asn1.ASN1Object);R.asn1.DERObjectIdentifier=function(e){var n=function(r){var i=r.toString(16);return i.length==1&&(i="0"+i),i},t=function(r){var i="",o=new se(r,10),a=o.toString(2),s=7-a.length%7;s==7&&(s=0);for(var c="",u=0;u<s;u++)c+="0";a=c+a;for(var u=0;u<a.length-1;u+=7){var p=a.substr(u,7);u!=a.length-7&&(p="1"+p),i+=n(parseInt(p,2))}return i};R.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",o=r.split("."),a=parseInt(o[0])*40+parseInt(o[1]);i+=n(a),o.splice(0,2);for(var s=0;s<o.length;s++)i+=t(o[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(r){var i=R.asn1.x509.OID.name2oid(r);if(i!=="")this.setValueOidString(i);else throw"DERObjectIdentifier oidName undefined: "+r},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):e.oid!==void 0?this.setValueOidString(e.oid):e.hex!==void 0?this.setValueHex(e.hex):e.name!==void 0&&this.setValueName(e.name))};Te.lang.extend(R.asn1.DERObjectIdentifier,R.asn1.ASN1Object);R.asn1.DEREnumerated=function(e){R.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=R.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new se(String(n),10);this.setByBigInteger(t)},this.setValueHex=function(n){this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};Te.lang.extend(R.asn1.DEREnumerated,R.asn1.ASN1Object);R.asn1.DERUTF8String=function(e){R.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};Te.lang.extend(R.asn1.DERUTF8String,R.asn1.DERAbstractString);R.asn1.DERNumericString=function(e){R.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};Te.lang.extend(R.asn1.DERNumericString,R.asn1.DERAbstractString);R.asn1.DERPrintableString=function(e){R.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};Te.lang.extend(R.asn1.DERPrintableString,R.asn1.DERAbstractString);R.asn1.DERTeletexString=function(e){R.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};Te.lang.extend(R.asn1.DERTeletexString,R.asn1.DERAbstractString);R.asn1.DERIA5String=function(e){R.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};Te.lang.extend(R.asn1.DERIA5String,R.asn1.DERAbstractString);R.asn1.DERUTCTime=function(e){R.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{12}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date))};Te.lang.extend(R.asn1.DERUTCTime,R.asn1.DERAbstractTime);R.asn1.DERGeneralizedTime=function(e){R.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{14}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date),e.millis===!0&&(this.withMillis=!0))};Te.lang.extend(R.asn1.DERGeneralizedTime,R.asn1.DERAbstractTime);R.asn1.DERSequence=function(e){R.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var n="",t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n+=r.getEncodedHex()}return this.hV=n,this.hV}};Te.lang.extend(R.asn1.DERSequence,R.asn1.DERAbstractStructured);R.asn1.DERSet=function(e){R.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var n=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n.push(r.getEncodedHex())}return this.sortFlag==!0&&n.sort(),this.hV=n.join(""),this.hV},typeof e<"u"&&typeof e.sortflag<"u"&&e.sortflag==!1&&(this.sortFlag=!1)};Te.lang.extend(R.asn1.DERSet,R.asn1.DERAbstractStructured);R.asn1.DERTaggedObject=function(e){R.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(n,t,r){this.hT=t,this.isExplicit=n,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.tag<"u"&&(this.hT=e.tag),typeof e.explicit<"u"&&(this.isExplicit=e.explicit),typeof e.obj<"u"&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};Te.lang.extend(R.asn1.DERTaggedObject,R.asn1.ASN1Object);var vc=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),co=function(e){vc(n,e);function n(t){var r=e.call(this)||this;return t&&(typeof t=="string"?r.parseKey(t):(n.hasPrivateKeyProperty(t)||n.hasPublicKeyProperty(t))&&r.parsePropertiesFrom(t)),r}return n.prototype.parseKey=function(t){try{var r=0,i=0,o=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,a=o.test(t)?ec.decode(t):fr.unarmor(t),s=rc.decode(a);if(s.sub.length===3&&(s=s.sub[2].sub[0]),s.sub.length===9){r=s.sub[1].getHexStringValue(),this.n=Ee(r,16),i=s.sub[2].getHexStringValue(),this.e=parseInt(i,16);var c=s.sub[3].getHexStringValue();this.d=Ee(c,16);var u=s.sub[4].getHexStringValue();this.p=Ee(u,16);var p=s.sub[5].getHexStringValue();this.q=Ee(p,16);var f=s.sub[6].getHexStringValue();this.dmp1=Ee(f,16);var d=s.sub[7].getHexStringValue();this.dmq1=Ee(d,16);var y=s.sub[8].getHexStringValue();this.coeff=Ee(y,16)}else if(s.sub.length===2)if(s.sub[0].sub){var v=s.sub[1],b=v.sub[0];r=b.sub[0].getHexStringValue(),this.n=Ee(r,16),i=b.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=s.sub[0].getHexStringValue(),this.n=Ee(r,16),i=s.sub[1].getHexStringValue(),this.e=parseInt(i,16);else return!1;return!0}catch{return!1}},n.prototype.getPrivateBaseKey=function(){var t={array:[new R.asn1.DERInteger({int:0}),new R.asn1.DERInteger({bigint:this.n}),new R.asn1.DERInteger({int:this.e}),new R.asn1.DERInteger({bigint:this.d}),new R.asn1.DERInteger({bigint:this.p}),new R.asn1.DERInteger({bigint:this.q}),new R.asn1.DERInteger({bigint:this.dmp1}),new R.asn1.DERInteger({bigint:this.dmq1}),new R.asn1.DERInteger({bigint:this.coeff})]},r=new R.asn1.DERSequence(t);return r.getEncodedHex()},n.prototype.getPrivateBaseKeyB64=function(){return wn(this.getPrivateBaseKey())},n.prototype.getPublicBaseKey=function(){var t=new R.asn1.DERSequence({array:[new R.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new R.asn1.DERNull]}),r=new R.asn1.DERSequence({array:[new R.asn1.DERInteger({bigint:this.n}),new R.asn1.DERInteger({int:this.e})]}),i=new R.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new R.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},n.prototype.getPublicBaseKeyB64=function(){return wn(this.getPublicBaseKey())},n.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
27
+ ?)|(.{1,`+r+"})";return t.match(RegExp(i,"g")).join(`
28
+ `)},n.prototype.getPrivateKey=function(){var t=`-----BEGIN RSA PRIVATE KEY-----
29
+ `;return t+=n.wordwrap(this.getPrivateBaseKeyB64())+`
30
+ `,t+="-----END RSA PRIVATE KEY-----",t},n.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
31
+ `;return t+=n.wordwrap(this.getPublicBaseKeyB64())+`
32
+ `,t+="-----END PUBLIC KEY-----",t},n.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},n.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},n.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},n}(pc),Xn,mc=typeof process<"u"?(Xn=process.env)===null||Xn===void 0?void 0:Xn.npm_package_version:void 0,Kn=function(){function e(n){n===void 0&&(n={}),n=n||{},this.default_key_size=n.default_key_size?parseInt(n.default_key_size,10):1024,this.default_public_exponent=n.default_public_exponent||"010001",this.log=n.log||!1,this.key=null}return e.prototype.setKey=function(n){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new co(n)},e.prototype.setPrivateKey=function(n){this.setKey(n)},e.prototype.setPublicKey=function(n){this.setKey(n)},e.prototype.decrypt=function(n){try{return this.getKey().decrypt(ro(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return wn(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,r){try{return wn(this.getKey().sign(n,t,r))}catch{return!1}},e.prototype.verify=function(n,t,r){try{return this.getKey().verify(n,ro(t),r)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new co,n&&{}.toString.call(n)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,n);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},e.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},e.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},e.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},e.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},e.version=mc,e}();function bc(){const e=new Kn({default_key_size:"2048"});return{publicKey:e.getPublicKey(),privateKey:e.getPrivateKey()}}function qt(e,n){const t=new Kn;return t.setPublicKey(n),t.encrypt(e)||""}function Lr(e,n){const t=new Kn;return t.setPrivateKey(n),t.decrypt(e)||""}function fo(){return typeof new Kn().encrypt=="function"}const Ia=h.useLoginState(h.pinia),{superAdminInfo:Sc,cryptoInfo:Pe,loginUserInfo:Qn}=h.storeToRefs(Ia),Ec=en(h.pinia),{activeMenuPath:Gt}=h.storeToRefs(Ec),pr=Pt(h.pinia),Ct="123456",Tc=xr(h.pinia),{routerPageStructures:kc}=h.storeToRefs(Tc),Vr=l.ref(0),Dc=l.ref([{label:"用户名称",value:"",name:"userName"}]),Dt=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Ac=e=>{console.log("handleQueryChange",e)},In=l.ref([]),xa=l.ref(""),xn=l.computed(()=>{var n,t,r,i,o;const e=(n=kc.value)==null?void 0:n.find(a=>{var s;return((s=a==null?void 0:a.comp)==null?void 0:s.toUpperCase())==="TABLE"});return e?(xa.value=e.name,In.value=(i=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:i.filter(s=>(s==null?void 0:s.label)!=="操作"),(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){const u=[...s==null?void 0:s.contents,{label:"重置密码"}];return{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var p,f,d,y;return{...u,isTableColHidden:((p=u==null?void 0:u.prop)==null?void 0:p.includes("头像"))||((f=u==null?void 0:u.prop)==null?void 0:f.includes("签名")),isFormColHidden:((d=u==null?void 0:u.prop)==null?void 0:d.includes("头像"))||((y=u==null?void 0:u.prop)==null?void 0:y.includes("签名"))}})}:s})):[]}),wc=e=>{pr.setRefreshCurStructure(!1),Hn(e.singleContent,e.buttonName,Vr.value,e==null?void 0:e.selectItems)},dr=l.ref(),Ic=e=>{console.log("onDoubleClick",e)},xc=(e,n)=>{e==="重置密码"&&oa.confirm(`该操作将会重置【${(n==null?void 0:n.account)||(n==null?void 0:n.账号)}】的密码为【${Ct}】,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{dr.value={...n,password:Ct},Hn(dr.value,e,Vr.value)}).catch(()=>{h.ElMessage.info("取消重置")})},Bc=()=>{Bn(Gt.value).then(e=>{var t;const n=Array.isArray(e)&&(e==null?void 0:e.filter(r=>(r==null?void 0:r.account)!==Sc.value.account));xn.value=(t=xn.value)==null?void 0:t.map(r=>r.key==="tableContents"?{...r,contents:n==null?void 0:n.map(i=>{var o;return{...i,password:Lr(i==null?void 0:i.password,(o=Pe==null?void 0:Pe.value)==null?void 0:o.privateKey)}})}:r)})},Rt=async(e,n,t)=>{var r,i;try{const o=await e(n);return((r=o==null?void 0:o.data)==null?void 0:r.code)===200?(t!=="查询"&&await Ia.setLogRecordAsync({type:t,data:n},Gt.value),h.ElMessage.success("保存成功"),pr.setRefreshCurStructure(!0),o.data.result||((i=o==null?void 0:o.data)==null?void 0:i.code)===200):null}catch(o){h.ElMessage.error(o)}finally{pr.setCacheUpdatingData(null)}},Cc=async(e,n)=>{var o,a;let t=[];Array.isArray(e)?t=h.cloneDeep(e):t=[h.cloneDeep(e)];const r=(o=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:o.map(s=>{var u,p,f,d,y,v,b;const c=Xt(s,In.value);return fo()&&c&&(!c.password&&Dt.value?c.password=qt(Ct,(u=Pe==null?void 0:Pe.value)==null?void 0:u.publicKey):c.password&&Dt.value&&(c.password=qt(c==null?void 0:c.password,(p=Pe==null?void 0:Pe.value)==null?void 0:p.publicKey))),{key:{type:"data",layer:s==null?void 0:s.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(f=Gt.value)!=null&&f.startsWith("/")?(d=Gt.value)==null?void 0:d.substring(1):Gt.value,tableId:n,createUserId:(y=Qn.value)==null?void 0:y.id,createUserOrg:((v=Qn.value)==null?void 0:v.dept)||((b=Qn.value)==null?void 0:b.部门名称)},value:{tableData:c}}}),i=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:a.map(s=>{var u,p;const c=Xt(s,In.value);return fo()&&c&&(!c.password&&Dt.value?c.password=qt(Ct,(u=Pe==null?void 0:Pe.value)==null?void 0:u.publicKey):c.password&&Dt.value&&(c.password=qt(c==null?void 0:c.password,(p=Pe==null?void 0:Pe.value)==null?void 0:p.publicKey))),{id:s==null?void 0:s.id,value:{tableData:c}}});r.length>0&&await Rt(h.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await Rt(h.batchUpdateInsofDataApi,{dataList:i},"编辑"),pt.show=!1)},Hn=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Cc(e,t);else{let i=[];n!=null&&n.includes("批量")?i=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(o=>o==null?void 0:o.id):[]:i=[e==null?void 0:e.id],await Rt(h.batchDeleteInsofDataApi,{ids:i},"编辑")}},Bn=async e=>{const n=await Rt(h.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var i,o;return{id:r.id,layer:(i=r.key)==null?void 0:i.layer,tableData:(o=r==null?void 0:r.value)==null?void 0:o.tableData}});return t==null?void 0:t.map(r=>{var i;if(!Array.isArray(r==null?void 0:r.tableData))return{...r.tableData,layer:(i=r.key)==null?void 0:i.layer,id:r.id}})},Rc={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:xn.value,name:""}]}]},Mc=Object.freeze(Object.defineProperty({__proto__:null,changedRow:dr,clickRowButton:xc,columns:In,compName:xa,getPageDataAsync:Bn,handleItemDataChange:wc,handleQueryChange:Ac,handleSubmitAsync:Rt,loginUserIsSuper:Dt,onDoubleClick:Ic,pageData:xn,queryFormData:Dc,refreshUserTableData:Bc,resetPassword:Ct,structureId:Vr,submitTableAsyncByVerify:Hn,tempUserPageData:Rc},Symbol.toStringTag,{value:"Module"})),tn=h.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),Oc=Pt(h.pinia),{routeToChildPath:ho}=h.storeToRefs(Oc),Nc=h.useLoginState(h.pinia),{loginUserInfo:Cn,cryptoInfo:er}=h.storeToRefs(Nc),Pc=tn(h.pinia),{originalPath:po}=h.storeToRefs(Pc),Fc=e=>{var n,t,r;return((t=(n=Cn.value)==null?void 0:n.layer)==null?void 0:t.toUpperCase())==="SUPERADMIN"?!0:((r=Cn.value)==null?void 0:r.account)===(e==null?void 0:e.account)},Lc=async(e,n,t)=>{const r=Bn("/系统管理/角色管理"),i=Bn("/系统管理/部门管理");return await Promise.all([r,i]).then(a=>{var u,p;const s=(u=a==null?void 0:a[0])==null?void 0:u.map(f=>({label:f==null?void 0:f.roleName,value:f==null?void 0:f.roleName})),c=(p=a==null?void 0:a[1])==null?void 0:p.map(f=>({label:f==null?void 0:f.deptName,value:f==null?void 0:f.deptName}));return e==null?void 0:e.map(f=>{var d;return{...f,compData:(d=f==null?void 0:f.compData)==null?void 0:d.map(y=>{var v,b;return(y==null?void 0:y.key)==="header"?{...y,contents:(v=y==null?void 0:y.contents)==null?void 0:v.map(g=>g.prop==="userDept"?{...g,options:c}:g.prop==="userRoles"?{...g,options:s}:g)}:(y==null?void 0:y.key)==="tableContents"?{...y,contents:(b=y==null?void 0:y.contents)==null?void 0:b.map(g=>{var m;return{...g,password:Fc(g)?Lr(g==null?void 0:g.password,(m=er==null?void 0:er.value)==null?void 0:m.privateKey):g==null?void 0:g.password}})}:y})}})})},Vc=async(e,n)=>{const t=sessionStorage.getItem("authority"),r=JSON.parse(t||"");if(Array.isArray(r)){let i;ho.value?i=Array.isArray(r)&&(r==null?void 0:r.filter(s=>(s==null?void 0:s.includes(e))||(s==null?void 0:s.includes(ho.value)))):i=Array.isArray(r)&&(r==null?void 0:r.filter(s=>s==null?void 0:s.includes(e)));const o=i==null?void 0:i.map(s=>{var c;return((c=s==null?void 0:s.split("/"))==null?void 0:c.pop())||""});return n==null?void 0:n.map(s=>{var c;return{...s,compData:(c=s==null?void 0:s.compData)==null?void 0:c.map(u=>{var p;return(u==null?void 0:u.key)==="rowButton"||(u==null?void 0:u.key)==="extraButton"?{...u,contents:(p=u==null?void 0:u.contents)==null?void 0:p.filter(f=>o==null?void 0:o.includes(f==null?void 0:f.label))}:u})}})}else return typeof r=="string"&&(r==null?void 0:r.toUpperCase())==="SUPERADMIN"?e==="/系统管理/用户管理"?await Lc(n):n:[]},_c=(e,n)=>{var o,a,s,c;const t=(a=(o=n["系统管理/角色管理"])==null?void 0:o.filter(u=>{var p;return((p=u==null?void 0:u.key)==null?void 0:p.type)==="data"}))==null?void 0:a.map(u=>u.value.tableData),r=(c=(s=e==null?void 0:e.value)==null?void 0:s.tableData)==null?void 0:c.角色名称,i=t==null?void 0:t.find(u=>(u==null?void 0:u.角色名称)===r);return i==null?void 0:i.数据范围};var Tn=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(Tn||{});const Ba=(e,n,t)=>{var a,s,c,u;if(((c=(s=(a=Cn.value)==null?void 0:a.key)==null?void 0:s.layer)==null?void 0:c.toUpperCase())==="SUPERADMIN"||!t)return e;const r=(u=t==null?void 0:t["系统管理/用户管理"])==null?void 0:u.find(p=>{var f;return(p==null?void 0:p.id)===((f=Cn.value)==null?void 0:f.id)}),i=_c(r,t);if(!i)return e;switch(Tn==null?void 0:Tn[i]){case 0:return e;case 1:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([f,d])=>{var b,g,m,E,O,k,x,I,w;const y=d==null?void 0:d[1],v=f[(f==null?void 0:f.length)-1]===po.value;return((g=(b=y==null?void 0:y.key)==null?void 0:b.createUserLayer)==null?void 0:g.toUpperCase())==="SUPERADMIN"||((m=y==null?void 0:y.key)==null?void 0:m.createUserOrg)===((O=(E=r==null?void 0:r.value)==null?void 0:E.tableData)==null?void 0:O.部门名称)||((k=y==null?void 0:y.key)==null?void 0:k.createUserOrg)===((I=(x=r==null?void 0:r.value)==null?void 0:x.tableData)==null?void 0:I.部门名称)&&((w=y==null?void 0:y.key)==null?void 0:w.createUserId)===(r==null?void 0:r.id)||v})):e==null?void 0:e.filter(p=>{var f,d,y,v,b,g,m,E,O;return((d=(f=p==null?void 0:p.key)==null?void 0:f.createUserLayer)==null?void 0:d.toUpperCase())==="SUPERADMIN"||((y=p==null?void 0:p.key)==null?void 0:y.createUserOrg)===((b=(v=r==null?void 0:r.value)==null?void 0:v.tableData)==null?void 0:b.部门名称)||((g=p==null?void 0:p.key)==null?void 0:g.createUserOrg)===((E=(m=r==null?void 0:r.value)==null?void 0:m.tableData)==null?void 0:E.部门名称)&&((O=p==null?void 0:p.key)==null?void 0:O.createUserId)===(r==null?void 0:r.id)});case 2:break;case 3:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([f,d])=>{var b;const y=d==null?void 0:d[1],v=f[(f==null?void 0:f.length)-1]===po.value;return((b=y==null?void 0:y.key)==null?void 0:b.createUserId)===(r==null?void 0:r.id)||v})):e==null?void 0:e.filter(p=>{var f;return((f=p==null?void 0:p.key)==null?void 0:f.createUserId)===(r==null?void 0:r.id)})}},yr=en(h.pinia),{activeMenuPath:Kc}=h.storeToRefs(yr);let $e="$R";const Hc=Pn(h.pinia),{multipleTableConst:yo}=h.storeToRefs(Hc),$c=h.useLoginState(h.pinia),{loginUserInfo:tr}=h.storeToRefs($c),Mt=Pt(h.pinia),Uc=tn(h.pinia),{originalPath:Ca}=h.storeToRefs(Uc),Xe=(e,n)=>(n==null?void 0:n.split(",")).some(r=>Object.keys(e).some(i=>i.startsWith("name")&&e[i]===r)),nr={onNumSlice:su,onRandomContents:uu,onConditionContents:la},zc=e=>{const n=e.slice(0,e.indexOf("(")).trim(),t=nr==null?void 0:nr[n];if(typeof t!="function")throw new Error(`找不到函数: ${n}`);const r=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),i=new Function(`return [${r}]`)();return t(...Array.isArray(i)?i:[i])},gr=(e,n,t="children")=>{var a;const r=[];let i=[],o=0;for(const s of e){const c=n.some(f=>{const[d]=f.split(".");return d===s.prop||d===s.label}),u=n.filter(f=>f.includes(".")).map(f=>f.split(".").slice(1).join("."));o=o+1;let p;if(c&&(p={...s},i.push(o),delete p[t]),s[t]&&u.length){const f=(a=gr(s[t],u,t))==null?void 0:a.contents;f.length&&(i.push(o),o=o+1,p=p||{...s},p[t]=f)}p&&r.push(p)}return{contents:r,ids:i}},qc=e=>{if(!Fn(e))return[e];const n=new Function(`return ${e}`)(),t=[];return((i,o="")=>{for(const a of i)if(Array.isArray(a)){const[s,c]=a;Array.isArray(c)?c.forEach(u=>t.push(`"${s}:${u}"`)):t.push(o?`"${o}:${s}"`:'"'+s+'"')}else t.push('"'+a+'"')})(n),t},jc=async(e,n,t,r)=>{var m,E,O,k,x,I,w,D,H,T,B,_,F,Q,X,K,$,Z,ne,j,z,M,q,G,ee,fe,ve,pe,me,te,Ae,ke,U,V,ye,Ge,ze,ue,We,_e,we,yt,Ye,P,de,Je,Lt,Vt,Kr,Hr,$r,Ur,zr,qr,jr,Gr,Wr,Yr,Jr,Zr,Xr,Qr,ei,ti,ni;let i=(E=(m=e==null?void 0:e.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:m.contents)==null?void 0:E.find(ae=>ae==null?void 0:ae.columnPath);i||(i=(x=Ot((k=(O=e==null?void 0:e.find(ae=>(ae==null?void 0:ae.key)==="header"))==null?void 0:O.contents)==null?void 0:k[0]))==null?void 0:x.find(ae=>ae==null?void 0:ae.columnPath));let o=(w=(I=h.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:I.replace("[",$e))==null?void 0:w.split($e),a=(T=(H=(D=o==null?void 0:o[(o==null?void 0:o.length)-1])==null?void 0:D.replace("(",$e))==null?void 0:H.split($e))==null?void 0:T[0];a=a==null?void 0:a.slice(0,(a==null?void 0:a.length)-1);let s=(_=(B=h.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:B.split("["+a+"]"))==null?void 0:_[0],c="",u="",p="",f=a;if(a=(Q=(F=a==null?void 0:a.split(":"))==null?void 0:F[0])==null?void 0:Q.replaceAll("'",""),s.includes("[")){let ae=(Z=($=(K=(X=s==null?void 0:s.split("["))==null?void 0:X[1])==null?void 0:K.split("]"))==null?void 0:$[0])==null?void 0:Z.split("/");u=s,c=(z=(j=(ne=s==null?void 0:s.split("["))==null?void 0:ne[1])==null?void 0:j.split("]"))==null?void 0:z[0];let Se="";t==null||t.forEach(le=>{var De,Ce,C,A,S;((Ce=(De=le==null?void 0:le.value)==null?void 0:De.pageData)==null?void 0:Ce.name)===(ae==null?void 0:ae[0])&&((S=(A=(C=le==null?void 0:le.value)==null?void 0:C.pageData)==null?void 0:A.compData)==null||S.forEach(L=>{var N;(L==null?void 0:L.key)==="formContent"&&((N=L==null?void 0:L.contents)==null||N.forEach(re=>{var ge;if((re==null?void 0:re.prop)===(ae==null?void 0:ae[1])){let ce=Va((ge=h.cloneDeep(re))==null?void 0:ge.optionUrl,r);Se=(re==null?void 0:re.value)||ce||""}}))}))}),p=Se,s=((M=s==null?void 0:s.split("["))==null?void 0:M[0])+Se}let d=[];const y=await h.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),v=await h.getInsofDataApi({key:{pageKey:Kc.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}}),b=[];(G=(q=v==null?void 0:v.data)==null?void 0:q.result)==null||G.forEach(ae=>{var Se;b.push({id:ae==null?void 0:ae.id,value:ae.value.tableData,parentId:(Se=ae==null?void 0:ae.key)==null?void 0:Se.parentId})});let g=(fe=(ee=f==null?void 0:f.replace("[",$e))==null?void 0:ee.split($e))==null?void 0:fe[0];if(Array.isArray((ve=y==null?void 0:y.data)==null?void 0:ve.result)&&((me=(pe=y==null?void 0:y.data)==null?void 0:pe.result)==null?void 0:me.length)>0){let ae;if((g==null?void 0:g[(g==null?void 0:g.length)-1])===":"&&(g=g==null?void 0:g.slice(1,(g==null?void 0:g.length)-1)),g=(ke=(Ae=g==null?void 0:g.split(":"))==null?void 0:Ae[((te=g==null?void 0:g.split(":"))==null?void 0:te.length)-1])==null?void 0:ke.replaceAll("'",""),((V=(U=y==null?void 0:y.data)==null?void 0:U.result)==null?void 0:V.find(C=>{var A;return Xe((A=C==null?void 0:C.value)==null?void 0:A.pageData,g)}))??((Ge=(ye=y==null?void 0:y.data)==null?void 0:ye.result)==null?void 0:Ge.find(C=>{var A;return Xe((A=C==null?void 0:C.value)==null?void 0:A.pageData,a)}))){let C=(ue=(ze=y==null?void 0:y.data)==null?void 0:ze.result)==null?void 0:ue.sort((A,S)=>A.id-S.id);ae=await(C==null?void 0:C.map(async A=>{var L,N,re,ge,ce,J,be,W,Oe,Ie,xe,_t,Kt,Ht,Le,ri,ii,oi,ai,si,li,ui,ci,fi,hi,pi,di,yi,gi,vi,mi,bi,Si;let S;if(Xe((L=A==null?void 0:A.value)==null?void 0:L.pageData,g)||Xe((N=A==null?void 0:A.value)==null?void 0:N.pageData,a)&&((ge=(re=A==null?void 0:A.value)==null?void 0:re.pageData)==null?void 0:ge.name)===a){S=h.cloneDeep((J=(ce=A==null?void 0:A.value)==null?void 0:ce.pageData)==null?void 0:J.compData);let nn;Xe((be=A==null?void 0:A.value)==null?void 0:be.pageData,g)&&g===a?(Oe=(W=A==null?void 0:A.value)==null?void 0:W.pageData)!=null&&Oe.name1?nn={name:(xe=(Ie=A==null?void 0:A.value)==null?void 0:Ie.pageData)==null?void 0:xe.name,name0:(Kt=(_t=A==null?void 0:A.value)==null?void 0:_t.pageData)==null?void 0:Kt.name0,name1:(Le=(Ht=A==null?void 0:A.value)==null?void 0:Ht.pageData)==null?void 0:Le.name1}:nn={name:(ii=(ri=A==null?void 0:A.value)==null?void 0:ri.pageData)==null?void 0:ii.name,name0:(ai=(oi=A==null?void 0:A.value)==null?void 0:oi.pageData)==null?void 0:ai.name0}:nn={name:((li=(si=A==null?void 0:A.value)==null?void 0:si.pageData)==null?void 0:li.name0)||((ci=(ui=A==null?void 0:A.value)==null?void 0:ui.pageData)==null?void 0:ci.name)},S.push({key:"name",contents:nn});const gt=await h.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),tableId:A==null?void 0:A.id,type:"data"}});let rn;if(((hi=(fi=gt==null?void 0:gt.data)==null?void 0:fi.result)==null?void 0:hi.length)>0&&((di=(pi=S==null?void 0:S.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:pi.contents)!=null&&di.every(Y=>!(Y!=null&&Y.columnPath))))rn=(gi=(yi=gt==null?void 0:gt.data)==null?void 0:yi.result)==null?void 0:gi.map(Y=>{var $t;let ie=[];return ie.push({id:Y==null?void 0:Y.id}),ie.push(($t=Y==null?void 0:Y.value)==null?void 0:$t.tableData),ie}),S.push({key:"tableContents",contents:At(rn,(Si=(bi=(mi=(vi=A==null?void 0:A.value)==null?void 0:vi.pageData)==null?void 0:mi.compData)==null?void 0:bi.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:Si.contents)}),S.push({key:"contentTableId",contents:A==null?void 0:A.id}),c!==""&&(S!=null&&S.find(Y=>(Y==null?void 0:Y.key)==="pageColumn")&&(S=S==null?void 0:S.filter(Y=>(Y==null?void 0:Y.key)!=="pageColumn")),S.push({key:"pageColumn",contents:u}),S!=null&&S.find(Y=>(Y==null?void 0:Y.key)==="columnPath")&&(S=S==null?void 0:S.filter(Y=>(Y==null?void 0:Y.key)!=="columnPath")),S.push({key:"columnPath",contents:c}),S!=null&&S.find(Y=>(Y==null?void 0:Y.key)==="columnUsingPath")&&(S=S==null?void 0:S.filter(Y=>(Y==null?void 0:Y.key)!=="columnUsingPath")),S.push({key:"columnUsingPath",contents:p}),S!=null&&S.find(Y=>(Y==null?void 0:Y.key)==="pageGroup")&&(S=S==null?void 0:S.filter(Y=>(Y==null?void 0:Y.key)!=="pageGroup")),S.push({key:"pageGroup",contents:a})),d.push(S);else{let Y=await ut(s,sessionStorage.getItem("systemKey"),"");Y==null||Y.forEach(ie=>{var $t,Ei,Ti,ki,Di,Ai,wi,Ii,xi,Bi;if(Xe(ie,a)&&((Ei=($t=A==null?void 0:A.value)==null?void 0:$t.pageData)==null?void 0:Ei.name)===(ie==null?void 0:ie.name)||Xe(ie,g)&&g!==a){S=((Ti=ie==null?void 0:ie.compData)==null?void 0:Ti.filter(oe=>(oe==null?void 0:oe.key)!=="tableContents"))||[],Y=(Di=(ki=ie==null?void 0:ie.compData)==null?void 0:ki.find(oe=>(oe==null?void 0:oe.key)==="tableContents"))==null?void 0:Di.contents,rn=Y;let on;Xe(ie,a)&&g===a||Xe(ie,g)&&g!==a?(wi=(Ai=A==null?void 0:A.value)==null?void 0:Ai.pageData)!=null&&wi.name1?on={name:ie==null?void 0:ie.name,name0:ie==null?void 0:ie.name0,name1:ie==null?void 0:ie.name1}:on={name:ie==null?void 0:ie.name,name0:ie==null?void 0:ie.name0}:on={name:(ie==null?void 0:ie.name0)||(ie==null?void 0:ie.name)},S.push({key:"name",contents:on}),S.push({key:"tableContents",contents:At(rn,(xi=(Ii=ie==null?void 0:ie.compData)==null?void 0:Ii.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:xi.contents)}),S.push({key:"contentTableId",contents:(Y==null?void 0:Y.length)!==0?(Bi=ie==null?void 0:ie.compData)==null?void 0:Bi.id:A==null?void 0:A.id}),c!==""&&(S!=null&&S.find(oe=>(oe==null?void 0:oe.key)==="pageColumn")&&(S=S==null?void 0:S.filter(oe=>(oe==null?void 0:oe.key)!=="pageColumn")),S.push({key:"pageColumn",contents:u}),S!=null&&S.find(oe=>(oe==null?void 0:oe.key)==="columnPath")&&(S=S==null?void 0:S.filter(oe=>(oe==null?void 0:oe.key)!=="columnPath")),S.push({key:"columnPath",contents:c}),S!=null&&S.find(oe=>(oe==null?void 0:oe.key)==="columnUsingPath")&&(S=S==null?void 0:S.filter(oe=>(oe==null?void 0:oe.key)!=="columnUsingPath")),S.push({key:"columnUsingPath",contents:p}),S!=null&&S.find(oe=>(oe==null?void 0:oe.key)==="pageGroup")&&(S=S==null?void 0:S.filter(oe=>(oe==null?void 0:oe.key)!=="pageGroup")),S.push({key:"pageGroup",contents:a})),d.push(S)}})}}})),await Promise.all(ae)}let Se=[];d==null||d.forEach(C=>{Se!=null&&Se.find(A=>{var S,L,N,re,ge,ce,J,be;return((re=(N=(L=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:L[((S=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:S.length)-1])==null?void 0:N.contents)==null?void 0:re.name)===((be=(J=(ce=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:ce[((ge=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:ge.length)-1])==null?void 0:J.contents)==null?void 0:be.name)})&&(Se!=null&&Se.find(A=>{var S,L,N,re,ge,ce,J,be;return((re=(N=(L=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:L[((S=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:S.length)-1])==null?void 0:N.contents)==null?void 0:re.name0)===((be=(J=(ce=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:ce[((ge=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:ge.length)-1])==null?void 0:J.contents)==null?void 0:be.name0)}))||Se.push(C)}),Se=Se==null?void 0:Se.map(C=>{var S,L;let A=[];return C==null||C.forEach(N=>{(N==null?void 0:N.key)!=="name"&&A.push(N)}),A.push((L=C==null?void 0:C.filter(N=>(N==null?void 0:N.key)==="name"))==null?void 0:L[((S=C==null?void 0:C.filter(N=>(N==null?void 0:N.key)==="name"))==null?void 0:S.length)-1]),A}),d=Se,d=d==null?void 0:d.filter(C=>C!==void 0);let le=(_e=(We=f==null?void 0:f.replace(":",$e))==null?void 0:We.split($e))==null?void 0:_e[1];le!=null&&le.includes("[")&&(le=(we=le==null?void 0:le.replaceAll("'",'"'))==null?void 0:we.replaceAll(":",","),le=(yt=qc(le))==null?void 0:yt.join(","),le="["+((de=(P=(Ye=le==null?void 0:le.replaceAll('":"',yo.value))==null?void 0:Ye.replaceAll(":",yo.value))==null?void 0:P.replaceAll("[",""))==null?void 0:de.replaceAll("]",""))+"]",Fn(le==null?void 0:le.replaceAll("'",'"'))&&(le=JSON.parse(le==null?void 0:le.replaceAll("'",'"')),le.push("操作")),d=d==null?void 0:d.map(C=>{let A=[];return C=C==null?void 0:C.map(S=>{var L,N,re,ge;if((S==null?void 0:S.key)==="header")if((L=S.contents)!=null&&L.every(ce=>Array.isArray(ce)))S.contents=(N=S.contents)==null?void 0:N.map(ce=>{let J=gr(ce,le);return ce=J==null?void 0:J.contents,A=[...new Set(J.ids)],ce});else{let ce=gr(S.contents,le);A=[...new Set(ce.ids)],S.contents=(re=S.contents)==null?void 0:re.filter(J=>le==null?void 0:le.find(be=>be===((J==null?void 0:J.prop)||(J==null?void 0:J.label))))}return(S==null?void 0:S.key)==="tableContents"&&(A==null?void 0:A.length)>0&&(S.contents=(ge=S.contents)==null?void 0:ge.map(ce=>(ce=ce==null?void 0:ce.filter((J,be)=>(A==null?void 0:A.find(W=>W===be))||(J==null?void 0:J.id)),ce))),S}),C})),d=d==null?void 0:d.map(C=>{var S,L;let A=(L=tt((S=C==null?void 0:C.find(N=>(N==null?void 0:N.key)==="header"))==null?void 0:S.contents))==null?void 0:L.filter(N=>N!=="操作"&&N);return C=C==null?void 0:C.map(N=>{var re;if((N==null?void 0:N.key)==="tableContents"){let ge=(re=N.contents)==null?void 0:re.map(ce=>{var W;let J=st(ce,A),be=b==null?void 0:b.find(Oe=>(Oe==null?void 0:Oe.parentId)===(J==null?void 0:J.id));if(be){let Oe=Object.assign(J,be==null?void 0:be.value);return Oe.id=be==null?void 0:be.id,Oe}else return J.id=(W=J==null?void 0:J.id)==null?void 0:W.toString(),J});N.contents=ge}return N}),C}),d=d==null?void 0:d.sort((C,A)=>{var S,L;return((S=C==null?void 0:C.find(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:S.contents)-((L=A==null?void 0:A.find(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:L.contents)});let De=(Vt=(Lt=(Je=i==null?void 0:i.columnPath)==null?void 0:Je.replace("(",$e))==null?void 0:Lt.split($e))==null?void 0:Vt[1];if(De&&(De==null?void 0:De.length)>0){De=(Kr=De.slice(0,(De==null?void 0:De.length)-1))==null?void 0:Kr.replaceAll("'","");let C=De==null?void 0:De.split(",");C=C==null?void 0:C.map(L=>{let N=Wn==null?void 0:Wn.find(re=>L==null?void 0:L.includes(re==null?void 0:re.key));if(N)return{order:N==null?void 0:N.order,value:N==null?void 0:N.value,content:L}}),C=C==null?void 0:C.sort((L,N)=>(N==null?void 0:N.order)-(L==null?void 0:L.order));let A=[];d=d==null?void 0:d.map(L=>(L=L==null?void 0:L.map((N,re)=>{var ge,ce,J,be;return(N==null?void 0:N.key)==="header"&&((ge=N==null?void 0:N.contents)!=null&&ge.every(W=>Array.isArray(W))?N.contents=(ce=N.contents)==null?void 0:ce.map(W=>{var Oe;return A.push({index:re,content:(Oe=h.cloneDeep(W))==null?void 0:Oe.filter(Ie=>Ie==null?void 0:Ie.columnPath)}),W=W==null?void 0:W.filter(Ie=>!(Ie!=null&&Ie.columnPath)),W}):(A.push({index:re,content:(J=h.cloneDeep(N.contents))==null?void 0:J.filter(W=>W==null?void 0:W.columnPath)}),N.contents=(be=N.contents)==null?void 0:be.filter(W=>!(W!=null&&W.columnPath)))),N}),L));const S=C==null?void 0:C.map(async L=>{var re,ge,ce,J;let N=(ce=(ge=(re=L==null?void 0:L.content)==null?void 0:re.replace(":",$e))==null?void 0:ge.split($e))==null?void 0:ce[1];d=await zc((L==null?void 0:L.value)+"('"+((J=JSON.stringify(h.cloneDeep(d)))==null?void 0:J.replaceAll("'",'"'))+"','"+N+"')")});await Promise.all(S),d=d==null?void 0:d.map(L=>(L.push({key:"filterAllType",value:C}),L)),d=d==null?void 0:d.map(L=>(L=L==null?void 0:L.map((N,re)=>{var ge,ce,J,be,W,Oe;if((N==null?void 0:N.key)==="header")if((ge=N==null?void 0:N.contents)!=null&&ge.every(Ie=>Array.isArray(Ie)))N.contents=(ce=N.contents)==null?void 0:ce.map(Ie=>{var xe,_t,Kt,Ht;return A!=null&&A.find(Le=>(Le==null?void 0:Le.index)===re)&&((_t=(xe=A==null?void 0:A.find(Le=>(Le==null?void 0:Le.index)===re))==null?void 0:xe.content)==null?void 0:_t.length)>0&&Ie.push((Ht=(Kt=A==null?void 0:A.find(Le=>(Le==null?void 0:Le.index)===re))==null?void 0:Kt.content)==null?void 0:Ht[0]),Ie});else{let Ie=N.contents;A!=null&&A.find(xe=>(xe==null?void 0:xe.index)===re)&&((be=(J=A==null?void 0:A.find(xe=>(xe==null?void 0:xe.index)===re))==null?void 0:J.content)==null?void 0:be.length)>0&&Ie.push((Oe=(W=A==null?void 0:A.find(xe=>(xe==null?void 0:xe.index)===re))==null?void 0:W.content)==null?void 0:Oe[0]),N.contents=Ie}return N}),L))}let Ce=[];($r=(Hr=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:Hr.contents)!=null&&$r.every(C=>Array.isArray(C))?Ce=(qr=(zr=(Ur=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:Ur.contents)==null?void 0:zr[0])==null?void 0:qr.filter(C=>!(C!=null&&C.columnPath)&&(C==null?void 0:C.label)!=="操作"):Ce=(Gr=(jr=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:jr.contents)==null?void 0:Gr.filter(C=>!(C!=null&&C.columnPath)&&(C==null?void 0:C.label)!=="操作"),Ce&&(Ce==null?void 0:Ce.length)>0&&(d=d==null?void 0:d.map(C=>(C=C==null?void 0:C.map(A=>{var S,L;return(A==null?void 0:A.key)==="header"&&((S=A==null?void 0:A.contents)!=null&&S.every(N=>Array.isArray(N))?(A.contents=[...(L=A.contents)==null?void 0:L[0],...Ce],A.contents=[A.contents]):A.contents=[...A.contents,...Ce]),A}),C)))}else{let ae="",Se="";(Wr=s==null?void 0:s.split("/"))==null||Wr.forEach((S,L)=>{var N;L<((N=s==null?void 0:s.split("/"))==null?void 0:N.length)-1?ae=ae===""?ae+S:ae+"/"+S:Se=S});let le=await ut(ae,sessionStorage.getItem("systemKey"),""),De;(Xr=(Zr=(Jr=(Yr=le==null?void 0:le[0])==null?void 0:Yr.compData)==null?void 0:Jr.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:Zr.contents)==null||Xr.forEach((S,L)=>{S!=null&&S.isMainKey&&(De=L)});let Ce=[];(ni=(ti=(ei=(Qr=le==null?void 0:le[0])==null?void 0:Qr.compData)==null?void 0:ei.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:ti.contents)==null||ni.forEach(S=>{S.find(L=>L===Se)&&(De||De===0)&&Ce.push(S==null?void 0:S[De])});let C=[],A=await(Ce==null?void 0:Ce.map(async S=>{let L=await ut(ae+Ca.value+S,sessionStorage.getItem("systemKey"),""),N=L==null?void 0:L.find(re=>(re==null?void 0:re.name)===a);C.push(N)}));await Promise.all(A),C==null||C.forEach(S=>{var N,re,ge,ce;let L=h.cloneDeep(S==null?void 0:S.compData);L&&(L=L==null?void 0:L.filter(J=>(J==null?void 0:J.key)!=="tableContents"),L.push({key:"tableContents",contents:At((re=(N=S==null?void 0:S.compData)==null?void 0:N.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:re.contents,(ce=(ge=S==null?void 0:S.compData)==null?void 0:ge.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:ce.contents)}),L.push({key:"contentTableId",contents:S==null?void 0:S.id}),d.push(L))})}return d==null?void 0:d.filter(ae=>ae!==void 0)},ut=async(e,n,t="",r=!1,i,o,a)=>{var g,m,E,O,k,x,I;let s,c=new WeakMap;a?c=a:(m=(g=(await h.getPageInsofDataApi({systemKey:n,type:"data,structure,structureMethod"})).data.result)==null?void 0:g.filter(D=>{var H,T;return((H=D==null?void 0:D.key)==null?void 0:H.pageKey)!=="menu"&&((T=D==null?void 0:D.key)==null?void 0:T.pageKey)!=="secret"}))==null||m.forEach(D=>{c[D.key.pageKey]?c[D.key.pageKey]=[...c[D.key.pageKey],D]:c[D.key.pageKey]=[D]}),(!r||!i)&&(s=(E=c[e])==null?void 0:E.filter(w=>{var D;return((D=w==null?void 0:w.key)==null?void 0:D.parentTable)===t})),Mt.setPageMapState(c);const u=(O=c[e])==null?void 0:O.filter(w=>{var D;return((D=w==null?void 0:w.key)==null?void 0:D.type)==="structureMethod"}),p=s==null?void 0:s.map(w=>w.id);if(!p)return;let f=(k=c[e])==null?void 0:k.filter(w=>{var D,H,T,B;return((D=w==null?void 0:w.key)==null?void 0:D.type)==="data"&&(p.includes((H=w==null?void 0:w.key)==null?void 0:H.tableId)||p.includes((B=(T=w==null?void 0:w.key)==null?void 0:T.tableId)==null?void 0:B.toString()))});const d=c[e+Ca.value]??[];(d==null?void 0:d.length)===0&&(f=Ba(f,!1,c));let y=[];f==null||f.forEach(w=>{var T;const D=Array.isArray(w.value.tableData)?w.value.tableData:[w.value.tableData];D.unshift({id:w.id});const H=(T=w==null?void 0:w.key)==null?void 0:T.tableId;y!=null&&y.find(B=>(B==null?void 0:B.key)===H)?y=y==null?void 0:y.map(B=>((B==null?void 0:B.key)===H&&(B.contents=[...B.contents,D]),B)):y.push({key:H,contents:[D]})});let v=[];const b=await(s==null?void 0:s.map(async w=>{var B,_,F,Q,X,K,$,Z,ne,j,z,M,q,G,ee,fe,ve,pe,me,te,Ae,ke;const D=w.value.pageData,H=w==null?void 0:w.id;let T=(B=h.cloneDeep(D==null?void 0:D.compData))==null?void 0:B.filter(U=>(U==null?void 0:U.key)!=="tableContents");if(T&&(T!=null&&T.find(U=>(U==null?void 0:U.key)==="header"))&&(!Array.isArray((F=(_=T==null?void 0:T.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:_.contents)==null?void 0:F[0])&&((X=(Q=T==null?void 0:T.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:Q.contents)!=null&&X.every(U=>!(U!=null&&U.columnPath)))||Array.isArray(($=(K=T==null?void 0:T.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:K.contents)==null?void 0:$[0])&&((j=Ot((ne=(Z=T==null?void 0:T.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:Z.contents)==null?void 0:ne[0]))!=null&&j.every(U=>!(U!=null&&U.columnPath))))){let U=At((z=y==null?void 0:y.find(ue=>(ue==null?void 0:ue.key)===w.id))==null?void 0:z.contents,(M=T==null?void 0:T.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:M.contents),V=await ff((q=T==null?void 0:T.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:q.contents,e,(G=T==null?void 0:T.find(ue=>(ue==null?void 0:ue.key)==="tableFilter"))==null?void 0:G.contents,c);V!=null&&V.mainKeys&&T.push({key:"mainRouters",contents:V==null?void 0:V.mainKeys});let ye=[],Ge=[];Array.isArray(V)&&(ye=At(V,(ee=T==null?void 0:T.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:ee.contents)),Array.isArray(V==null?void 0:V.tableContents)&&(Ge=At(V==null?void 0:V.tableContents,(fe=T==null?void 0:T.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:fe.contents));let ze=[...ye,...Ge];Array.isArray(U)&&(U==null?void 0:U.length)>0&&(ze=[...ze,...U]),T.push({key:"tableContents",contents:ze}),T=T==null?void 0:T.map(ue=>{var We;return(ue==null?void 0:ue.key)==="header"&&(ue.contents=(We=ue.contents)==null?void 0:We.map(_e=>((_e==null?void 0:_e.prop)===(V==null?void 0:V.mainKey)&&(_e.isMainKey=!0),_e))),ue})}else T&&(T!=null&&T.find(U=>(U==null?void 0:U.key)==="header"))&&(T=await jc(h.cloneDeep(T),H,s,c),T.every(U=>Array.isArray(U))||(T=[T]));if(D.id=w==null?void 0:w.id,D.isShow=(pe=(ve=w==null?void 0:w.value)==null?void 0:ve.pageData)==null?void 0:pe.isShow,(T==null?void 0:T.length)>0&&T.every(U=>Array.isArray(U)))T==null||T.forEach(U=>{var Ge,ze,ue,We,_e;let V=h.cloneDeep(D);V.compData=U,V.tableId=(Ge=U==null?void 0:U.find(we=>(we==null?void 0:we.key)==="contentTableId"))==null?void 0:Ge.contents;let ye=(ze=U==null?void 0:U.find(we=>(we==null?void 0:we.key)==="name"))==null?void 0:ze.contents;ye!=null&&ye.name0&&(ye==null?void 0:ye.name0)===(V==null?void 0:V.name)?(V.name0=V.name,V.name=ye==null?void 0:ye.name):ye!=null&&ye.name0&&(V.name1=V.name,V.name0=ye.name0,V.name=ye==null?void 0:ye.name),(ue=V==null?void 0:V.compData)!=null&&ue.every(we=>Array.isArray(we))?((We=V==null?void 0:V.compData)==null?void 0:We.length)===0?v.push(V):(_e=V==null?void 0:V.compData)==null||_e.forEach((we,yt)=>{let Ye;yt===0?Ye={comp:V==null?void 0:V.comp,compData:we,id:V==null?void 0:V.id,name:V==null?void 0:V.name,isShow:V==null?void 0:V.isShow}:Ye={comp:V==null?void 0:V.comp,compData:we,id:V==null?void 0:V.id,name:"",isShow:V==null?void 0:V.isShow},v.push(Ye)}):v.push(V)});else if(((me=w.key)==null?void 0:me.type)!=="method")D.compData=T,(te=D==null?void 0:D.compData)!=null&&te.every(U=>Array.isArray(U))?((Ae=D==null?void 0:D.compData)==null?void 0:Ae.length)===0?v.push(D):(ke=D==null?void 0:D.compData)==null||ke.forEach((U,V)=>{let ye;V===0?ye={comp:D==null?void 0:D.comp,compData:U,id:D==null?void 0:D.id,name:D==null?void 0:D.name,isShow:D==null?void 0:D.isShow}:ye={comp:D==null?void 0:D.comp,compData:U,id:D==null?void 0:D.id,name:"",isShow:D==null?void 0:D.isShow},v.push(ye)}):v.push(D);else{let U;U={name:"",compData:[D],comp:"calculator"},v.push(U)}}));return await Promise.all(b),((x=u==null?void 0:u.map(w=>w.value.pageData))==null?void 0:x.filter(w=>Object.values(w).length>0).length)>0&&v.push({comp:"methodButton",name:"",compData:(I=u==null?void 0:u.map(w=>w.value.pageData))==null?void 0:I.filter(w=>Object.values(w).length>0)}),v=v.sort((w,D)=>w.id-D.id),o?v:await Vc(e,v)},Gc=async e=>{await h.deleteInsofDataApi({id:e}),Mt.setTableLoading(!1)},Wc=async(e,n,t,r,i,o,a,s)=>{var f,d,y,v,b,g,m,E,O,k,x,I,w,D,H,T,B,_,F,Q,X,K,$,Z;let c=((d=(f=a==null?void 0:a.content)==null?void 0:f[0])==null?void 0:d.id)??"",u=(y=s==null?void 0:s.param)==null?void 0:y.url,p;if(c!==""&&((v=a==null?void 0:a.content)==null?void 0:v.length)>1&&typeof((g=(b=a==null?void 0:a.content)==null?void 0:b[0])==null?void 0:g.id)!="string"){const ne=await h.getInsofDataApi({id:c});let j=((k=(O=(E=(m=ne==null?void 0:ne.data)==null?void 0:m.result)==null?void 0:E[0])==null?void 0:O.key)==null?void 0:k.tableId)??"",z=((D=(w=(I=(x=ne==null?void 0:ne.data)==null?void 0:x.result)==null?void 0:I[0])==null?void 0:w.key)==null?void 0:D.pageKey)??"";const M=await h.createInsofDataApi({key:{type:e,pageKey:u||z||n,tableId:j||t,systemKey:r},value:{tableData:st(i,(H=tt(o))==null?void 0:H.filter(q=>q!=="操作"))}});((T=M==null?void 0:M.data)==null?void 0:T.code)===200?(p=(B=M==null?void 0:M.data)==null?void 0:B.result,h.ElMessage.success("保存成功")):h.ElMessage.error("保存响应失败"),Mt.setTableLoading(!1)}else{let ne;if(a!=null&&a.parentTableId){let z=await h.getInsofDataApi({id:a==null?void 0:a.parentTableId});ne=(X=(Q=(F=(_=z==null?void 0:z.data)==null?void 0:_.result)==null?void 0:F[0])==null?void 0:Q.key)==null?void 0:X.pageKey}const j=await h.createInsofDataApi({key:{type:e,pageKey:u||ne||n,tableId:a!=null&&a.parentTableId?a==null?void 0:a.parentTableId:t,systemKey:r},value:{tableData:st(i,(K=tt(o))==null?void 0:K.filter(z=>z!=="操作"))}});(($=j==null?void 0:j.data)==null?void 0:$.code)===200?(p=(Z=j==null?void 0:j.data)==null?void 0:Z.result,h.ElMessage.success("保存成功")):h.ElMessage.error("保存响应失败"),Mt.setTableLoading(!1)}return p},Ra=(e,n)=>{if(!Object.keys(e).some(t=>t in n))return!1;for(let t in e)if((e==null?void 0:e[t])!==(n==null?void 0:n[t])&&!(!e[t]||!n[t]))return!1;return!0},Yc=async(e,n,t,r,i,o,a,s)=>{var c,u,p,f,d,y,v,b,g,m,E,O,k,x,I,w,D,H,T,B,_;if(r)if((s==null?void 0:s.parentTableId)===0){const F=await h.getInsofDataApi({id:r});let Q=((f=(p=(u=(c=F==null?void 0:F.data)==null?void 0:c.result)==null?void 0:u[0])==null?void 0:p.key)==null?void 0:f.tableId)??"",X=((b=(v=(y=(d=F==null?void 0:F.data)==null?void 0:d.result)==null?void 0:y[0])==null?void 0:v.key)==null?void 0:b.pageKey)??"";if(Q&&Q!==""){const K=await h.updateInsofDataApi({key:{type:e,pageKey:X,tableId:Q,systemKey:i},value:{tableData:st(o,(g=tt(a))==null?void 0:g.filter($=>$!=="操作"))},id:r});((m=K==null?void 0:K.data)==null?void 0:m.code)===200?h.ElMessage.success("保存成功"):h.ElMessage.error("保存响应失败"),Mt.setTableLoading(!1)}else{const K=await h.updateInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:i},value:{tableData:st(o,(E=tt(a))==null?void 0:E.filter($=>$!=="操作"))},id:r});((O=K==null?void 0:K.data)==null?void 0:O.code)===200?h.ElMessage.success("保存成功"):h.ElMessage.error("保存响应失败"),Mt.setTableLoading(!1)}}else{let F=(k=tt(a))==null?void 0:k.filter(j=>j!=="operate"),Q=st(o,F),X=await h.getInsofDataApi({key:{tableId:t}});X=(I=(x=X==null?void 0:X.data)==null?void 0:x.result)==null?void 0:I.map(j=>{var z,M;return{id:j==null?void 0:j.id,value:(z=j==null?void 0:j.value)==null?void 0:z.tableData,parentId:(M=j==null?void 0:j.key)==null?void 0:M.parentId}});let K=await h.getInsofDataApi({key:{tableId:s==null?void 0:s.parentTableId}});K=(D=(w=K==null?void 0:K.data)==null?void 0:w.result)==null?void 0:D.map(j=>{var z;return{id:j==null?void 0:j.id,value:(z=j==null?void 0:j.value)==null?void 0:z.tableData}});let $="";K==null||K.forEach(j=>{if($===""){let z=j==null?void 0:j.value;Ra(z,Q)&&($=j==null?void 0:j.id)}});let Z=(H=X==null?void 0:X.find(j=>(j==null?void 0:j.parentId)===$))==null?void 0:H.id;Z=r||Z;let ne=s==null?void 0:s.singleContent;ne==null||delete ne.id,typeof Z=="number"?await h.updateInsofDataApi({id:Z,value:{tableData:ne}}):await h.createInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:i,version:1,parentId:$,createUserId:(T=tr.value)==null?void 0:T.id,createUserLayer:((B=tr.value)==null?void 0:B.dept)||((_=tr.value)==null?void 0:_.部门名称)},value:{tableData:ne}})}},Jc=async(e,n)=>{await h.updateInsofDataApi({value:{pageData:n},id:e})},Zc=async()=>{var e,n,t,r,i,o,a,s,c;try{const u=await h.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((e=u==null?void 0:u.data)==null?void 0:e.code)===200){const p=(i=(r=(t=(n=u==null?void 0:u.data)==null?void 0:n.result)==null?void 0:t[0])==null?void 0:r.key)==null?void 0:i.systemType;let f="browser";p==="制造系统"&&(f="client"),p==="三维系统"&&(f="three"),yr.setPlatform(f),yr.setPlatName(((c=(s=(a=(o=u==null?void 0:u.data)==null?void 0:o.result)==null?void 0:a[0])==null?void 0:s.key)==null?void 0:c.name)??"")}}catch(u){return Promise.reject(u)}},xt=l.ref(0),vr=en(h.pinia),Xc=tn(h.pinia),{originalPath:Et}=h.storeToRefs(Xc),Qc=h.useLoginState(h.pinia),ef=Pn(h.pinia),{multipleTableConst:Me}=h.storeToRefs(ef),{loginUserInfo:Fe}=h.storeToRefs(Qc),{activeMenuPath:Of}=h.storeToRefs(vr),mr=Pt(h.pinia),{pageMapState:br}=h.storeToRefs(mr),He=Et.value,Rn=e=>e==null?void 0:e.map(t=>{var r;return xt.value++,Array.isArray(t)?Rn(t):{label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+xt.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)??!0,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)??xt.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:Rn(t.children)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(r=t==null?void 0:t.groupSelect)==null?void 0:r.replaceAll('"',"").split(":"):[]}}),tf=e=>{const n=[];function t(r){if(Array.isArray(r))for(const i of r)!i.children||i.children.length===0?n.push(i):t(i.children)}return t(e),n},nf=e=>h.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(r=>{var i;return Array.isArray(r)?r=Rn(r):(r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":(r==null?void 0:r.prop)??"a"+xt.value,width:(r==null?void 0:r.label)==="操作"?"200":r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??xt.value,type:(r==null?void 0:r.label)==="操作"?"operate":void 0,formType:(r==null?void 0:r.formType)??(r!=null&&r.groupSelect?"Select":""),isHidden:r==null?void 0:r.isHidden,options:(r==null?void 0:r.options)??[],children:Rn(r.children),formMenuSelect:(r==null?void 0:r.formMenuSelect)??[],groupSelect:r!=null&&r.groupSelect?(i=r==null?void 0:r.groupSelect)==null?void 0:i.replaceAll('"',"").split(":"):[]},xt.value++),r})),t)),Ot=e=>{function n(t,r=[],i=""){if(!t||t.length===0)return[];let o=r;return Array.isArray(t)&&(t==null||t.forEach(a=>{var s,c,u,p,f,d,y,v,b,g,m,E,O;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let k=i===""?i+((f=(c=a==null?void 0:a.prop)==null?void 0:c.split(Me.value))==null?void 0:f[((p=(u=a==null?void 0:a.prop)==null?void 0:u.split(Me.value))==null?void 0:p.length)-1]):i+Me.value+((b=(d=a==null?void 0:a.prop)==null?void 0:d.split(Me.value))==null?void 0:b[((v=(y=a==null?void 0:a.prop)==null?void 0:y.split(Me.value))==null?void 0:v.length)-1]);o=n(a==null?void 0:a.children,o,k)}else i!==""&&(a.prop=i+Me.value+((O=(g=a==null?void 0:a.prop)==null?void 0:g.split(Me.value))==null?void 0:O[((E=(m=a==null?void 0:a.prop)==null?void 0:m.split(Me.value))==null?void 0:E.length)-1])),o.push(a)})),o}return n(e)},rf=e=>{function n(t,r=[],i=""){if(!t||t.length===0)return[];let o=r;return Array.isArray(t)&&(o=t==null?void 0:t.map(a=>{var s,c,u,p,f,d,y,v,b,g,m,E,O;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let k=i===""?i+((f=(c=a==null?void 0:a.prop)==null?void 0:c.split(Me.value))==null?void 0:f[((p=(u=a==null?void 0:a.prop)==null?void 0:u.split(Me.value))==null?void 0:p.length)-1]):i+Me.value+((b=(d=a==null?void 0:a.prop)==null?void 0:d.split(Me.value))==null?void 0:b[((v=(y=a==null?void 0:a.prop)==null?void 0:y.split(Me.value))==null?void 0:v.length)-1]);a.children=n(a==null?void 0:a.children,o,k)}else i!==""&&(a.prop=i+Me.value+((O=(g=a==null?void 0:a.prop)==null?void 0:g.split(Me.value))==null?void 0:O[((E=(m=a==null?void 0:a.prop)==null?void 0:m.split(Me.value))==null?void 0:E.length)-1]));return a})),o}return n(e)},of=e=>{let n=h.cloneDeep(e);return n=n==null?void 0:n.map(t=>((t==null?void 0:t.type)==="Select"?t={label:t==null?void 0:t.label,prop:t==null?void 0:t.prop,name:t==null?void 0:t.name,type:t==null?void 0:t.type,value:(t==null?void 0:t.value)??"",optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.menuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType,multiple:t==null?void 0:t.multiple}}:(t==null?void 0:t.type)==="Date"&&(t.value=!(t!=null&&t.value)&&(t==null?void 0:t.isNewDate)!==!1?new Date:t==null?void 0:t.value),t.label=t.prop||t.label,t)),n},af=e=>{var n,t,r,i,o,a;if(((n=e==null?void 0:e.pageData)==null?void 0:n.comp)==="Form"){let s=(r=(t=e==null?void 0:e.pageData)==null?void 0:t.compData)==null?void 0:r.map(u=>{var p;return(u==null?void 0:u.key)==="formContent"&&(u.contents=(p=u.contents)==null?void 0:p.map(f=>((f==null?void 0:f.type)==="Date"&&(f.value=""),f))),u});return{pageData:{comp:(i=e==null?void 0:e.pageData)==null?void 0:i.comp,compData:s,name:(o=e==null?void 0:e.pageData)==null?void 0:o.name,isShow:(a=e==null?void 0:e.pageData)==null?void 0:a.isShow}}}else return e},sf=(e,n)=>{var r,i,o,a,s,c,u,p,f;let t=(o=(i=(r=n==null?void 0:n.pageData)==null?void 0:r.compData)==null?void 0:i.find(d=>(d==null?void 0:d.key)==="formContent"))==null?void 0:o.contents;if(((a=e==null?void 0:e.pageData)==null?void 0:a.comp)==="Form"){let d=(c=(s=e==null?void 0:e.pageData)==null?void 0:s.compData)==null?void 0:c.map(v=>{var b;return(v==null?void 0:v.key)==="formContent"&&(v.contents=(b=v.contents)==null?void 0:b.map(g=>{var m;return g.value=(m=t==null?void 0:t.find(E=>(E==null?void 0:E.key)===(g==null?void 0:g.key)))==null?void 0:m.value,g})),v});return{pageData:{comp:(u=e==null?void 0:e.pageData)==null?void 0:u.comp,compData:d,name:(p=e==null?void 0:e.pageData)==null?void 0:p.name,isShow:(f=e==null?void 0:e.pageData)==null?void 0:f.isShow}}}else return e},Wt=async(e,n,t,r,i)=>{var b,g,m,E,O,k,x,I,w,D,H,T,B,_,F,Q,X,K,$,Z,ne,j,z;let o=e;(o==null?void 0:o[(o==null?void 0:o.length)-1])!==He&&(o="",(g=(b=h.cloneDeep(e))==null?void 0:b.split(He))==null||g.forEach((M,q)=>{var G,ee;q!==((ee=(G=h.cloneDeep(e))==null?void 0:G.split(He))==null?void 0:ee.length)-1&&(o=o===""?o+M:o+"/"+M)}),o=o+He);let a=[],s=await h.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(E=(m=s==null?void 0:s.data)==null?void 0:m.result)==null?void 0:E.filter(M=>{var q;return((q=M==null?void 0:M.key)==null?void 0:q.type)==="structure"})}};let u;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==He&&(u={data:{result:(O=br.value[o])==null?void 0:O.filter(M=>{var q;return((q=M==null?void 0:M.key)==null?void 0:q.type)==="structure"})}},((x=(k=u==null?void 0:u.data)==null?void 0:k.result)==null?void 0:x.length)>0&&(u=(w=(I=h.cloneDeep(u))==null?void 0:I.data)==null?void 0:w.result));const p={data:{result:(D=br.value[o])==null?void 0:D.filter(M=>{var q;return((q=M==null?void 0:M.key)==null?void 0:q.type)==="structureMethod"})}},f={data:{result:(T=(H=s==null?void 0:s.data)==null?void 0:H.result)==null?void 0:T.filter(M=>{var q;return((q=M==null?void 0:M.key)==null?void 0:q.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==He){let M=(B=c==null?void 0:c.data)==null?void 0:B.result;if(!Array.isArray(u))return;u==null||u.forEach(q=>{var ee,fe,ve,pe,me;let G=(ee=M==null?void 0:M.find(te=>{var Ae,ke,U,V;return((ke=(Ae=q==null?void 0:q.value)==null?void 0:Ae.pageData)==null?void 0:ke.name)===((V=(U=te==null?void 0:te.value)==null?void 0:U.pageData)==null?void 0:V.name)}))==null?void 0:ee.value;G?G=G:G=void 0,a.push({key:{pageKey:n,parentTable:((fe=G==null?void 0:G.key)==null?void 0:fe.parentTable)??"",systemKey:(ve=q==null?void 0:q.key)==null?void 0:ve.systemKey,type:((pe=G==null?void 0:G.key)==null?void 0:pe.type)??((me=q==null?void 0:q.key)==null?void 0:me.type),version:1},value:sf(q==null?void 0:q.value,G)})})}else(F=(_=c==null?void 0:c.data)==null?void 0:_.result)==null||F.forEach(M=>{var q,G,ee;a.push({key:{pageKey:n,parentTable:(q=M==null?void 0:M.key)==null?void 0:q.parentTable,systemKey:(G=M==null?void 0:M.key)==null?void 0:G.systemKey,type:(ee=M==null?void 0:M.key)==null?void 0:ee.type,version:1},value:af(M==null?void 0:M.value)})});if((X=(Q=p==null?void 0:p.data)==null?void 0:Q.result)==null||X.forEach(M=>{var q,G;a.push({key:{pageKey:n,systemKey:(q=M==null?void 0:M.key)==null?void 0:q.systemKey,type:(G=M==null?void 0:M.key)==null?void 0:G.type,version:1},value:M==null?void 0:M.value})}),a=a==null?void 0:a.map(M=>{var q,G,ee;return((G=(q=M==null?void 0:M.value)==null?void 0:q.pageData)==null?void 0:G.comp)==="Form"&&(M.value.pageData.compData=(ee=M.value.pageData.compData)==null?void 0:ee.map(fe=>{var ve;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(ve=fe.contents)==null?void 0:ve.map(pe=>(t!=null&&t[pe==null?void 0:pe.key]&&(pe==null?void 0:pe.type)!=="Date"&&(pe.value=t[pe.key]),pe))),fe}),r&&M.value.pageData.compData.push({key:"parentFormPath",contents:r})),M}),(a==null?void 0:a.length)>0){let M;if(!i)M=a;else{const q=a==null?void 0:a.find(ee=>{var fe,ve;return i==null?void 0:i.includes((ve=(fe=ee==null?void 0:ee.value)==null?void 0:fe.pageData)==null?void 0:ve.name)}),G=/^[A-Za-z]+$/;M=q?a==null?void 0:a.map(ee=>{var fe,ve,pe,me,te,Ae;return i!=null&&i.includes((ve=(fe=ee==null?void 0:ee.value)==null?void 0:fe.pageData)==null?void 0:ve.name)?{...ee,value:{pageData:{...(pe=ee==null?void 0:ee.value)==null?void 0:pe.pageData,compData:(Ae=(te=(me=ee==null?void 0:ee.value)==null?void 0:me.pageData)==null?void 0:te.compData)==null?void 0:Ae.map(ke=>{var U;return(ke==null?void 0:ke.key)==="formContent"?{...ke,contents:(U=ke==null?void 0:ke.contents)==null?void 0:U.map(V=>G.test(V==null?void 0:V.prop)?V:{...V,value:""})}:ke})}}}:ee}):a}await h.batchAddInsofDataApi({dataList:M})}let d={};const y=await h.getInsofDataApi({key:{pageKey:n,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});(($=(K=c==null?void 0:c.data)==null?void 0:K.result)==null?void 0:$.length)>0&&((ne=(Z=c==null?void 0:c.data)==null?void 0:Z.result)==null||ne.forEach(M=>{var q,G,ee;d[M.id]=(ee=(G=(q=y==null?void 0:y.data)==null?void 0:q.result)==null?void 0:G.find(fe=>{var ve,pe,me,te;return((pe=(ve=fe==null?void 0:fe.value)==null?void 0:ve.pageData)==null?void 0:pe.name)===((te=(me=M==null?void 0:M.value)==null?void 0:me.pageData)==null?void 0:te.name)}))==null?void 0:ee.id}));let v=[];(z=(j=f==null?void 0:f.data)==null?void 0:j.result)==null||z.forEach(M=>{var q,G,ee;v.push({key:{pageKey:n,tableId:d[(q=M==null?void 0:M.key)==null?void 0:q.tableId],systemKey:(G=M==null?void 0:M.key)==null?void 0:G.systemKey,type:(ee=M==null?void 0:M.key)==null?void 0:ee.type},value:M==null?void 0:M.value})}),(v==null?void 0:v.length)>0&&await h.batchAddInsofDataApi({dataList:v})},Ma=(e,n)=>{let t=h.cloneDeep(e);return t=t==null?void 0:t.map(i=>{var c,u,p;let o=[],a=[];for(let f in n)if(f!=null&&f.includes((u=(c=h.cloneDeep(i))==null?void 0:c.key)==null?void 0:u.pageKey)){let d=(p=n[f])==null?void 0:p.filter(y=>{var v,b,g;return((v=y==null?void 0:y.key)==null?void 0:v.type)==="data"&&((b=y==null?void 0:y.key)==null?void 0:b.tableId)===((g=h.cloneDeep(i))==null?void 0:g.id)});a=[...a,...d]}(a==null?void 0:a.length)>0&&(a==null||a.forEach(f=>{o.push(f.value.tableData)}));let s=h.cloneDeep(i).value.pageData.compData;return s.push({key:"tableContents",contents:o}),i.value.pageData.compData=s,i}),t},Oa=(e,n)=>{if(!(e!=null&&e.includes("[")))return e;let t=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),r=n==null?void 0:n.map(o=>{var a;return(a=o==null?void 0:o.value)==null?void 0:a.pageData}),i="";return r==null||r.forEach(o=>{var a;(o==null?void 0:o.name)===(t==null?void 0:t[0])&&((a=o==null?void 0:o.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="header"&&((c=s==null?void 0:s.contents)==null||c.forEach((u,p)=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(i=p)}))}))}),i},Na=(e,n)=>{if(!(e!=null&&e.includes("[")))return e;let t=e==null?void 0:e.replaceAll("[","").replaceAll("]","").split(":"),r=n==null?void 0:n.map(o=>{var a;return(a=o==null?void 0:o.value)==null?void 0:a.pageData}),i="";return r==null||r.forEach(o=>{var a;(o==null?void 0:o.name)===(t==null?void 0:t[0])&&((a=o==null?void 0:o.compData)==null||a.forEach(s=>{var c;(s==null?void 0:s.key)==="formContent"&&((c=s==null?void 0:s.contents)==null||c.forEach(u=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(i=u==null?void 0:u.value)}))}))}),i},go=(e,n,t,r)=>{var c,u,p;let i=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,o=e==null?void 0:e.map(f=>{var d,y;return(y=(d=f.groupSelect)==null?void 0:d.split(":"))==null?void 0:y[1]}),a="";i==null||i.forEach((f,d)=>{(i==null?void 0:i.length)-1!==d?a=a===""?a+f:a+"/"+f:a=a+He+f});let s=[];for(let f in n)if(f!=null&&f.includes(a)){let d=(u=n[f])==null?void 0:u.filter(y=>{var v,b;return((v=y==null?void 0:y.key)==null?void 0:v.type)==="structure"&&((b=y==null?void 0:y.key)==null?void 0:b.parentTable)===""});s=[...s,...d]}if((s==null?void 0:s.length)>0){let f=s==null?void 0:s.filter(g=>{var m,E,O;return((m=g==null?void 0:g.key)==null?void 0:m.pageKey)!==a&&((O=(E=g==null?void 0:g.value)==null?void 0:E.pageData)==null?void 0:O.comp)==="Form"}),d=s==null?void 0:s.filter(g=>{var m,E,O;return((m=g==null?void 0:g.key)==null?void 0:m.pageKey)!==a&&((O=(E=g==null?void 0:g.value)==null?void 0:E.pageData)==null?void 0:O.comp)==="Table"});d=Ma(h.cloneDeep(d),n),f=[...h.cloneDeep(f),...d],f=f==null?void 0:f.map(g=>({[g.key.pageKey]:g}));let y=0;f=f.reduce((g,m)=>(Object.keys(m).forEach(E=>{g[E]||(g[E]=[],g[E].push({index:y})),g[E].push(m[E])}),y++,g),{});let v=(p=Object.values(f))==null?void 0:p.sort((g,m)=>{var k,x;let E=(k=g==null?void 0:g.find(I=>I==null?void 0:I.index))==null?void 0:k.index,O=(x=m==null?void 0:m.find(I=>I==null?void 0:I.index))==null?void 0:x.index;return E-O});f=v==null?void 0:v.map(g=>g==null?void 0:g.filter(m=>{var E,O,k,x;return!(m!=null&&m.index)&&(m==null?void 0:m.index)!==0&&!((O=(E=m==null?void 0:m.key)==null?void 0:E.pageKey)!=null&&O.includes("updateLoading"))&&!((x=(k=m==null?void 0:m.key)==null?void 0:k.pageKey)!=null&&x.includes("loading"))}));let b=[];if(f==null||f.forEach(g=>{var O,k,x,I,w,D,H,T,B,_;const m=g==null?void 0:g.find(F=>{var Q,X,K,$,Z;return((X=(Q=F==null?void 0:F.value)==null?void 0:Q.pageData)==null?void 0:X.name)===((Z=($=(K=e==null?void 0:e[0])==null?void 0:K.groupSelect)==null?void 0:$.split(":"))==null?void 0:Z[0])});let E=(w=(I=(x=(k=(O=h.cloneDeep(m))==null?void 0:O.value)==null?void 0:k.pageData)==null?void 0:x.compData)==null?void 0:I.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:w.contents;if(E){let F=[];o==null||o.forEach((Q,X)=>{var Z,ne,j,z,M,q;let K=g==null?void 0:g.find(G=>{var ee,fe,ve,pe,me;return((fe=(ee=G==null?void 0:G.value)==null?void 0:ee.pageData)==null?void 0:fe.name)===((me=(pe=(ve=e==null?void 0:e[X])==null?void 0:ve.groupSelect)==null?void 0:pe.split(":"))==null?void 0:me[0])}),$=(M=(z=(j=(ne=(Z=h.cloneDeep(K))==null?void 0:Z.value)==null?void 0:ne.pageData)==null?void 0:j.compData)==null?void 0:z.find(G=>(G==null?void 0:G.key)==="formContent"))==null?void 0:M.contents;$!=null&&$.find(G=>(G==null?void 0:G.key)===Q)?F.push((q=$==null?void 0:$.find(G=>(G==null?void 0:G.key)===Q))==null?void 0:q.value):F.push("")}),b.push(F)}else E=(_=(B=(T=(H=(D=h.cloneDeep(m))==null?void 0:D.value)==null?void 0:H.pageData)==null?void 0:T.compData)==null?void 0:B.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:_.contents,E==null||E.forEach(F=>{let Q=[];o==null||o.forEach(X=>{F!=null&&F[X]&&Q.push(F==null?void 0:F[X])}),b.push(Q)})}),(t==null?void 0:t.length)>0){let g={};t==null||t.forEach(m=>{var E;for(let O in m){let k=h.cloneDeep(O);if(!(k!=null&&k.includes("[")))(E=m[O])!=null&&E.includes("[")||(g[k]=m[O]);else{let x=Na(k,n[r]),I=Oa(m[O],n[r]);g[x]=I}}});for(let m in g)b=b==null?void 0:b.filter(E=>E[g[m]]===m)}return b}},lf=(e,n,t,r)=>{var s,c,u,p,f;let i=h.cloneDeep(e),o=n==null?void 0:n.map(d=>d==null?void 0:d.prop),a=[];for(let d in t)if(d!=null&&d.includes(i)){let y=(s=t[d])==null?void 0:s.filter(v=>{var b,g;return((b=v==null?void 0:v.key)==null?void 0:b.type)==="structure"&&((g=v==null?void 0:v.key)==null?void 0:g.parentTable)===""});a=[...a,...y]}if((a==null?void 0:a.length)>0){let d=a==null?void 0:a.filter(k=>{var x,I,w,D;return((x=k==null?void 0:k.key)==null?void 0:x.pageKey)!==i&&((w=(I=k==null?void 0:k.value)==null?void 0:I.pageData)==null?void 0:w.comp)==="Form"&&(k==null?void 0:k.key.pageKey.includes(i+He))&&!((D=k==null?void 0:k.key.pageKey)!=null&&D.includes("@"))}),y=a==null?void 0:a.filter(k=>{var x,I,w,D;return((x=k==null?void 0:k.key)==null?void 0:x.pageKey)!==i&&((w=(I=k==null?void 0:k.value)==null?void 0:I.pageData)==null?void 0:w.comp)==="Table"&&(k==null?void 0:k.key.pageKey.includes(i+He))&&!((D=k==null?void 0:k.key.pageKey)!=null&&D.includes("@"))});y=Ma(h.cloneDeep(y),t),d=[...h.cloneDeep(d),...y],d=d==null?void 0:d.map(k=>({[k.key.pageKey]:k}));let v=0;d=d.reduce((k,x)=>(Object.keys(x).forEach(I=>{k[I]||(k[I]=[],k[I].push({index:v})),k[I].push(x[I])}),v++,k),{}),d=Ba(d,!0,t);let b=(c=Object.values(d))==null?void 0:c.sort((k,x)=>{var D,H;let I=(D=k==null?void 0:k.find(T=>T==null?void 0:T.index))==null?void 0:D.index,w=(H=x==null?void 0:x.find(T=>T==null?void 0:T.index))==null?void 0:H.index;return I-w});d=b==null?void 0:b.map(k=>k==null?void 0:k.filter(x=>!(x!=null&&x.index)&&(x==null?void 0:x.index)!==0));let g=(u=h.cloneDeep(d))==null?void 0:u.filter(k=>k==null?void 0:k.find(x=>{var I,w,D,H;return((H=(I=x==null?void 0:x.key)==null?void 0:I.pageKey)==null?void 0:H[((D=(w=x==null?void 0:x.key)==null?void 0:w.pageKey)==null?void 0:D.length)-1])===He}));d=d==null?void 0:d.filter(k=>!(k!=null&&k.find(x=>{var I,w,D,H,T,B,_,F;return((H=(I=x==null?void 0:x.key)==null?void 0:I.pageKey)==null?void 0:H[((D=(w=x==null?void 0:x.key)==null?void 0:w.pageKey)==null?void 0:D.length)-1])===He||((B=(T=x==null?void 0:x.key)==null?void 0:T.pageKey)==null?void 0:B.includes("updateLoading"))||((F=(_=x==null?void 0:x.key)==null?void 0:_.pageKey)==null?void 0:F.includes("loading"))})));let m=[],E=[];(p=g==null?void 0:g[0])==null||p.forEach(k=>{var x,I,w,D,H;((I=(x=k==null?void 0:k.value)==null?void 0:x.pageData)==null?void 0:I.comp)==="Form"&&((H=(D=(w=k==null?void 0:k.value)==null?void 0:w.pageData)==null?void 0:D.compData)==null||H.forEach(T=>{(T==null?void 0:T.key)==="formContent"&&(E=[...E,...T==null?void 0:T.contents])}))});let O=(f=E==null?void 0:E.find(k=>(k==null?void 0:k.isMain)===!0))==null?void 0:f.key;if(d==null||d.forEach(k=>{let x=[];k==null||k.forEach(w=>{var D,H,T,B,_;((H=(D=w==null?void 0:w.value)==null?void 0:D.pageData)==null?void 0:H.comp)==="Form"&&((_=(B=(T=w==null?void 0:w.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||_.forEach(F=>{(F==null?void 0:F.key)==="formContent"&&(x=[...x,...F==null?void 0:F.contents])}))});let I={};o==null||o.forEach(w=>{let D=x==null?void 0:x.find(H=>(H==null?void 0:H.key)===w);D!=null&&D.prop&&(I[D.prop]=(D==null?void 0:D.value)??"")}),m.push(I)}),(r==null?void 0:r.length)>0){let k=[];r==null||r.forEach(x=>{var H,T,B,_,F,Q,X,K;let I={};for(let $ in x){let Z=h.cloneDeep($);if(!(Z!=null&&Z.includes("[")))x[$].toUpperCase()==="@LOGINUSER"?I[Z]=((H=Fe.value)==null?void 0:H.姓名)||((T=Fe.value)==null?void 0:T.account)||((B=Fe.value)==null?void 0:B.账号)||((_=Fe.value)==null?void 0:_.姓名):(F=x[$])!=null&&F.includes("[")||(I[Z]=x[$]);else{let ne=Na(Z,t[e]),j=Oa(x[$],t[e]);I[ne]=j}}let w=[],D=0;for(let $ in I)((Q=I[$])==null?void 0:Q[0])!=="!"?w=(X=D>0?w:m)==null?void 0:X.filter(ne=>ne[$]===I[$]):w=(K=D>0?w:m)==null?void 0:K.filter(Z=>{var ne;return Z[$]!==((ne=I[$])==null?void 0:ne.replaceAll("!",""))}),D=1;k=[...k,...w]}),m=[...new Set(k)]}return m=m==null?void 0:m.map(k=>Object.values(k)),{mainKey:O,tableContents:m}}},uf=(e,n)=>{var i,o,a,s,c,u;let t=(o=(i=h.cloneDeep(e))==null?void 0:i.split("/"))==null?void 0:o[0],r=[];for(let p in n)if(p!=null&&p.includes(t)){let f=(a=n[p])==null?void 0:a.filter(d=>{var y,v;return((y=d==null?void 0:d.key)==null?void 0:y.type)==="structure"&&((v=d==null?void 0:d.key)==null?void 0:v.parentTable)===""});r=[...r,...f]}return(r==null?void 0:r.length)>0?!!((u=(c=(s=r==null?void 0:r.filter(f=>{var d;return((d=f==null?void 0:f.key)==null?void 0:d.pageKey)===t}))==null?void 0:s[0])==null?void 0:c.key)==null?void 0:u.parentPageKey):!0},cf=async(e,n,t,r)=>{var a,s,c,u,p,f,d,y,v;let i=(s=(a=h.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s[0],o=[];for(let b in r)if(b!=null&&b.includes(i)){let g=(c=r[b])==null?void 0:c.filter(m=>{var E,O;return((E=m==null?void 0:m.key)==null?void 0:E.type)==="structure"&&((O=m==null?void 0:m.key)==null?void 0:O.parentTable)===""});o=[...o,...g]}if((o==null?void 0:o.length)>0){let b=(f=(p=(u=o==null?void 0:o.filter(E=>{var O;return((O=E==null?void 0:E.key)==null?void 0:O.pageKey)===i}))==null?void 0:u[0])==null?void 0:p.key)==null?void 0:f.parentPageKey,g=[];if(b){for(let E in r)if(E!=null&&E.includes(b)){let O=(d=r[E])==null?void 0:d.filter(k=>{var x,I;return((x=k==null?void 0:k.key)==null?void 0:x.type)==="structure"&&((I=k==null?void 0:k.key)==null?void 0:I.parentTable)===""});g=[...g,...O]}}else g=o;let m="";if((g==null?void 0:g.length)>0){let E=[],O;O=(y=g==null?void 0:g.filter(T=>{var B,_,F,Q,X,K;return((F=(_=(B=T==null?void 0:T.key)==null?void 0:B.pageKey)==null?void 0:_.split("/"))==null?void 0:F[0])===b&&((K=(X=(Q=T==null?void 0:T.key)==null?void 0:Q.pageKey)==null?void 0:X.split("/"))==null?void 0:K.length)===2}))==null?void 0:y.map(T=>{var B;return(B=T==null?void 0:T.key)==null?void 0:B.pageKey}),O=[...new Set(O)],O=O==null?void 0:O.filter(T=>!T.includes(He));let k=(v=h.cloneDeep(O))==null?void 0:v.map(async T=>{var X,K,$,Z,ne,j,z,M,q,G,ee,fe,ve,pe,me;let B=await ut(T,sessionStorage.getItem("systemKey"),"",!1,[],!1,r),_=(Z=($=(K=(X=h.cloneDeep(B))==null?void 0:X[0])==null?void 0:K.compData)==null?void 0:$.find(te=>(te==null?void 0:te.key)==="tableContents"))==null?void 0:Z.contents,F=(G=(q=(M=(z=(j=(ne=h.cloneDeep(B))==null?void 0:ne[0])==null?void 0:j.compData)==null?void 0:z.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:M.contents)==null?void 0:q.filter(te=>(te==null?void 0:te.label)!=="操作"))==null?void 0:G.map(te=>te==null?void 0:te.prop),Q=[];return(me=(pe=(ve=(fe=(ee=h.cloneDeep(B))==null?void 0:ee[0])==null?void 0:fe.compData)==null?void 0:ve.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:pe.contents)==null||me.forEach(te=>{(te==null?void 0:te.isMainKey)===!0&&(m=te==null?void 0:te.prop)}),_==null||_.forEach(te=>{let Ae=st(te,F);Q.push(Ae),E.push({key:Ae==null?void 0:Ae[m],routerContent:T})}),Q}),x=await Promise.all(k),I=[];x==null||x.forEach(T=>{(T==null?void 0:T.length)>0&&(T==null||T.forEach(B=>{I.push(B)}))});let w=[];w=n==null?void 0:n.map(T=>{var _,F,Q;let B={};for(let X in T)T[X].toUpperCase()==="@LOGINUSER"?B[X]=((_=Fe.value)==null?void 0:_.姓名)||((F=Fe.value)==null?void 0:F.account)||((Q=Fe.value)==null?void 0:Q.账号):B[X]=T[X];return B});let D=[];I==null||I.forEach(T=>{let B=[];w==null||w.forEach(_=>{let F=[];for(let Q in _)F.push(T[Q]===_[Q]);B.push(F)}),B.find(_=>_==null?void 0:_.every(F=>F===!0))&&D.push(T)});let H=[];return D==null||D.forEach(T=>{let B={};t==null||t.forEach(_=>{B[_.prop]=T[_.prop]??""}),H.push(B)}),H=H==null?void 0:H.map(T=>Object.values(T)),{mainKey:m,tableContents:H,mainKeys:E}}else return}else return},ff=async(e,n,t,r)=>{var o,a,s,c;let i=(o=h.cloneDeep(e))==null?void 0:o.filter(u=>(u==null?void 0:u.label)!=="操作");if((t==null?void 0:t.length)>0&&(i!=null&&i.every(u=>!(u!=null&&u.formMenuSelect)))&&uf(n,r)){let u=await cf(n,t,i,r);return u&&((a=u==null?void 0:u.tableContents)==null?void 0:a.length)>0?u:[]}if(!(i!=null&&i.every(u=>{var p,f,d,y;return((p=u==null?void 0:u.formMenuSelect)==null?void 0:p.length)>0&&((d=(f=u==null?void 0:u.groupSelect)==null?void 0:f.split(":"))==null?void 0:d.length)>0||((y=u==null?void 0:u.formMenuGroup)==null?void 0:y.length)>0})))return lf(n,i,r,t);if(i!=null&&i.every(u=>!(u!=null&&u.formMenuGroup)))return go(i,r,t,n);{let u=[];(c=(s=i==null?void 0:i[0])==null?void 0:s.formMenuGroup)==null||c.forEach((y,v)=>{let b=[];i==null||i.forEach(g=>{var m,E,O,k,x,I;b.push({columnPath:g==null?void 0:g.columnPath,formMenuSelect:(O=((m=g==null?void 0:g.formMenuGroup)==null?void 0:m[v])??((E=g==null?void 0:g.formMenuGroup)==null?void 0:E[0]))==null?void 0:O.formMenuSelect,groupSelect:(I=((k=g==null?void 0:g.formMenuGroup)==null?void 0:k[v])??((x=g==null?void 0:g.formMenuGroup)==null?void 0:x[0]))==null?void 0:I.groupSelect,isRoute:g==null?void 0:g.isRoute,label:g==null?void 0:g.label,prop:g==null?void 0:g.label})}),u.push(b)});let p=[],d=u==null?void 0:u.map(async y=>go(y,r,t,n));return d==null||d.forEach(y=>{y==null||y.forEach(v=>{p.push(v)})}),p}},hf=async(e,n)=>{var a,s,c,u,p,f,d,y,v,b;let t=e+He+n,r=e,i=(s=(a=br.value[t])==null?void 0:a.filter(g=>{var m,E;return((m=g==null?void 0:g.key)==null?void 0:m.type)==="structure"&&((E=g==null?void 0:g.key)==null?void 0:E.parentTable)===""}))==null?void 0:s.map(g=>{var m;return(m=g==null?void 0:g.value)==null?void 0:m.pageData}),o={};(i==null?void 0:i.length)>0?(await Wt(t,t+Et+`updateLoading${((c=Fe.value)==null?void 0:c.account)||((u=Fe.value)==null?void 0:u.账号)}`),mr.setRouteToChildPath(r),vr.setActiveMenuPath(t+Et+`updateLoading${((p=Fe.value)==null?void 0:p.account)||((f=Fe.value)==null?void 0:f.账号)}`)):(await Wt(r+Et,t,o),await Wt(t,t+Et+`updateLoading${((d=Fe.value)==null?void 0:d.account)||((y=Fe.value)==null?void 0:y.账号)}`),mr.setRouteToChildPath(r),vr.setActiveMenuPath(t+Et+`updateLoading${((v=Fe.value)==null?void 0:v.account)||((b=Fe.value)==null?void 0:b.账号)}`))},pf=tn(h.pinia),{originalPath:Pa}=h.storeToRefs(pf),df=e=>e==null?void 0:e.map(t=>(t=La(t),t)),_r=async()=>{var t,r,i,o,a,s,c,u,p,f,d,y;let e;const n=await h.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(s=(a=(o=(i=(r=(t=n.data.result)==null?void 0:t[0])==null?void 0:r.value)==null?void 0:i.pageData)==null?void 0:o.compData)==null?void 0:a[0])!=null&&s.contents&&(e=df((y=(d=(f=(p=(u=(c=n.data.result)==null?void 0:c[0])==null?void 0:u.value)==null?void 0:p.pageData)==null?void 0:f.compData)==null?void 0:d[0])==null?void 0:y.contents)),e},yf=e=>{var r,i,o;const n=(i=(r=e==null?void 0:e.compData)==null?void 0:r.find(a=>(a==null?void 0:a.key)==="header"))==null?void 0:i.contents;return{label:e==null?void 0:e.name,value:e==null?void 0:e.name,children:n!=null&&n.every(a=>!Array.isArray(a))?n==null?void 0:n.map(a=>({label:a==null?void 0:a.label,value:a==null?void 0:a.label})):(o=Ot(n==null?void 0:n[0]))==null?void 0:o.map(a=>({label:a==null?void 0:a.label,value:a==null?void 0:a.label}))}},Fa=async e=>{var i,o;let n="";(i=h.cloneDeep(e))==null||i.forEach(a=>{n=n===""?n+a:n+"/"+a});let t="";(o=h.cloneDeep(e))==null||o.forEach((a,s)=>{s!==(e==null?void 0:e.length)-1?t=t===""?t+a:t+"/"+a:t=t+Pa.value+a});const r=await ut(n,sessionStorage.getItem("systemKey"),"");return r||await ut(t,sessionStorage.getItem("systemKey"),"")},gf=e=>e.entries().next().done,vf=async e=>{var r,i,o;const n=await Fa(e);let t=[];return((r=n==null?void 0:n.data)==null?void 0:r.type)==="success"&&(t=(o=(i=n.data.result)==null?void 0:i.map(a=>a.value.pageData))==null?void 0:o.filter(a=>(a==null?void 0:a.comp)==="Table"),t=t==null?void 0:t.map(a=>yf(a))),t},mf=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],dt=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],bf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt},{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}],Sf=async()=>{const e=await _r();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt},{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"}]},Ef=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await _r()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],Tf=l.computed(async()=>await Sf()),kf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],Df=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt},{key:"value",label:"固定值",type:"Input"}],Af=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt},{key:"originalContent",label:"初始值",type:"Input"}],vo=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt}],wf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:dt}],If=[{key:"Input",value:bf},{key:"Select",value:Tf},{key:"Date",value:kf},{key:"TextArea",value:Af},{key:"Upload",value:vo},{key:"DragUpload",value:vo},{key:"Quill",value:wf},{key:"Link",value:Df}],xf=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],Bf=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:xf},{key:"background",label:"颜色",type:"Color"}],Cf=e=>{var t,r,i,o,a,s,c,u;let n=h.cloneDeep(e);if(((t=n==null?void 0:n.find(p=>(p==null?void 0:p.name)==="类型"))==null?void 0:t.type)==="Select"&&((o=(i=(r=h.cloneDeep(n))==null?void 0:r.find(p=>(p==null?void 0:p.name)==="选项值"))==null?void 0:i.value)==null?void 0:o.length)>0){const p=(u=(c=(s=(a=h.cloneDeep(n))==null?void 0:a.find(f=>(f==null?void 0:f.name)==="选项值"))==null?void 0:s.value)==null?void 0:c.split(","))==null?void 0:u.map(f=>({label:f,value:f}));n=n==null?void 0:n.map(f=>((f==null?void 0:f.name)==="初始值"&&(f.contents=p,f.value=(f==null?void 0:f.value)??""),f))}return n},La=e=>{var i;let n={};const t=(i=e==null?void 0:e.filter(o=>!Array.isArray(o)))==null?void 0:i[0];n.label=t,n.value=t;const r=e==null?void 0:e.filter(o=>Array.isArray(o));return r&&(r==null?void 0:r.length)>0&&(n.children=r==null?void 0:r.map(o=>La(o))),n},Rf=async e=>{var o,a,s,c;let n=h.cloneDeep(e);const t=(o=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="下拉绑定类型"))==null?void 0:o.value,r=(a=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="类型"))==null?void 0:a.value,i=await Ef();return r==="Select"&&t===""?n=n==null?void 0:n.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"&&(u==null?void 0:u.name)!=="选项值"):r==="Select"&&t==="关联绑定列"?n!=null&&n.find(u=>(u==null?void 0:u.name)==="菜单选项"||(u==null?void 0:u.name)==="组信息选项")?n=(s=h.cloneDeep(n))==null?void 0:s.filter(u=>(u==null?void 0:u.name)!=="选项值"):n=[...h.cloneDeep(n),...i].filter(u=>(u==null?void 0:u.name)!=="选项值"):r==="Select"&&t==="自定义绑定"&&(n!=null&&n.find(u=>(u==null?void 0:u.name)==="选项值")?n=(c=h.cloneDeep(n))==null?void 0:c.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"):n=[...h.cloneDeep(n),...i].filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项")),n},Mf=(e,n)=>{var r;let t=!1;return(r=h.cloneDeep(e))==null||r.forEach(i=>{var o;(i==null?void 0:i.key)==="formContent"&&((o=i==null?void 0:i.contents)==null||o.forEach(a=>{(a==null?void 0:a.key)===n?t=!0:t=t}))}),t},Va=(e,n)=>{var a,s,c,u,p;const t=h.cloneDeep(e);if(!t)return;let r="";(s=(a=h.cloneDeep(t))==null?void 0:a.menuSelect)==null||s.forEach(f=>{f!=null&&f.includes("[")?r=r+Pa.value:r=r===""?r+f:r+"/"+f});const i=(c=n==null?void 0:n[r])==null?void 0:c.map(f=>{var d;return(d=f==null?void 0:f.value)==null?void 0:d.pageData});let o=i==null?void 0:i.filter(f=>{var d,y;return(f==null?void 0:f.name)===((y=(d=h.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:y[0])});if((o==null?void 0:o.length)===1?o=o==null?void 0:o[0]:(u=h.cloneDeep(o))==null||u.forEach(f=>{var d,y;(f==null?void 0:f.comp)==="Form"&&Mf(f==null?void 0:f.compData,(y=(d=h.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:y[1])&&(o=f)}),(o==null?void 0:o.comp)==="Form"){let f="";return(p=o==null?void 0:o.compData)==null||p.forEach(d=>{var y;(d==null?void 0:d.key)==="formContent"&&((y=d==null?void 0:d.contents)==null||y.forEach(v=>{var b,g;(v==null?void 0:v.key)===((g=(b=h.cloneDeep(t))==null?void 0:b.groupSelect)==null?void 0:g[1])&&(v.type==="Select"&&!(v!=null&&v.value)?f=void 0:f=v==null?void 0:v.value)}))}),f}};exports.CHANGE_EVENT=rr;exports.ElButton=Qo;exports.ElButtonGroup=Cl;exports.ElFocusTrap=jo;exports.ElInput=Uo;exports.ElMessageBox=oa;exports.ElOverlay=ta;exports.FOCUS_TRAP_INJECTION_KEY=zo;exports.FormButton=Bf;exports.FormContent=If;exports.FormType=mf;exports.INPUT_EVENT=ir;exports.IsJson=Fn;exports.PatchFlags=jt;exports.SetCache=Yt;exports.State=Mc;exports.State$1=Yu;exports.TinyColor=Zo;exports.UPDATE_MODEL_EVENT=kn;exports.addPathToTree=Ln;exports.addTableContents=Wc;exports.animateScrollTo=Bs;exports.baseFlatten=Sr;exports.baseIsEqual=Er;exports.buttonTypes=Yo;exports.cAF=Co;exports.cacheHas=ko;exports.convertArrayToTree=Rr;exports.copyAdd=hf;exports.decryptData=Lr;exports.deleteTableContents=Gc;exports.encryptData=qt;exports.ensureOnlyChild=Pl;exports.fixFormContents=Jc;exports.fixTableContents=Yc;exports.flatRest=To;exports.flattedChildren=Ut;exports.flatten=Eo;exports.focusNode=zs;exports.formContextKey=Mn;exports.formItemContextKey=Tr;exports.formToOptionsContents=Cf;exports.generateKeyPair=bc;exports.getActivePageStructureId=Sa;exports.getAllLeafNodes=tf;exports.getColumnChild=Ot;exports.getColumnContents=tt;exports.getEqualChild=sa;exports.getFirstArrayProperty=Cr;exports.getGradeColumns=nf;exports.getItemData=ut;exports.getLeafNodesRecursive=Or;exports.getMenusContent=_r;exports.getNewColumnChild=rf;exports.getNormalizedProps=Nl;exports.getParentConstruct=bu;exports.getParentContents=ou;exports.getParentKey=mu;exports.getScrollBarWidth=Ro;exports.getScrollContainer=Is;exports.getScrollElement=Cs;exports.getScrollTop=Rs;exports.getSibling=Us;exports.getTableFormToForm=of;exports.getValueToObjectValue=st;exports.groupByField=Mr;exports.handleRowAuthorityRender=Nr;exports.handleSubmitAsync=Rt;exports.hasIn=wo;exports.identity=mo;exports.inputProps=No;exports.isEqual=Io;exports.isFirefox=Mo;exports.isFocusable=On;exports.isFormDataEmpty=gf;exports.isFragment=ea;exports.isLeaf=_o;exports.isValidComponentSize=ia;exports.isValidElementNode=Ol;exports.judgeContents=Va;exports.loadingConstruct=Wt;exports.loadingSystemType=Zc;exports.menuToContentType=vf;exports.menuToParent=Fa;exports.methodTableToContent=iu;exports.onConditionContents=la;exports.overRest=So;exports.pick=xo;exports.rAF=Bo;exports.resetPassword=Ct;exports.sameKeys=Ra;exports.scrollIntoView=xs;exports.selectToBase=Rf;exports.setToArray=Ao;exports.setToString=bo;exports.submitTableAsyncByVerify=Hn;exports.tableEveryContents=vu;exports.tableToContents=fu;exports.tableToForm=aa;exports.tableToStruct=cu;exports.triggerEvent=$s;exports.tryFocus=Qe;exports.useAriaProps=Oo;exports.useAttrs=Po;exports.useAuthorityState=xr;exports.useComposition=Ho;exports.useDeprecated=Wo;exports.useDraggable=na;exports.useFocusController=Ko;exports.useFormDisabled=Qt;exports.useFormItem=kr;exports.useFormItemInputId=Lo;exports.useFormSize=Dr;exports.useId=Dn;exports.useIdInjection=Fo;exports.useLockscreen=ra;exports.useMenuState=en;exports.useModelComp=Pt;exports.useOriginalState=tn;exports.useSameTarget=Ir;exports.useTableComp=Pn;exports.viewChildDict=Ql;exports.viewMainDict=Xl;