ss-component-new 1.2.3 → 1.2.4

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 (130) hide show
  1. package/dist/{OrbitControls-C0QRmW6_.js → OrbitControls-DA4VpOM_.js} +1 -1
  2. package/dist/{STLLoader-CiUjaQtA.js → STLLoader-DmGTF0Nv.js} +1 -1
  3. package/dist/{animationData-8FTxP8vs.js → animationData-9n1X4UvO.js} +14 -14
  4. package/dist/animationData-CfT99nMO.cjs +1 -0
  5. package/dist/array-BPHS7JFA.cjs +11 -0
  6. package/dist/array-pg68Qbs1.js +1207 -0
  7. package/dist/config.js +1 -1
  8. package/dist/{iconfont-pt17sMx3.js → iconfont-ljBfzBSE.js} +2 -2
  9. package/dist/{index-DnDcbPOW.js → index---6UATT0.js} +5 -5
  10. package/dist/{index-D4F0CrLQ.cjs → index-1DtctdYW.cjs} +1 -1
  11. package/dist/index-5hLZZ6t-.cjs +1 -0
  12. package/dist/{index-CEdmOpLw.js → index-8CcD03tl.js} +6 -6
  13. package/dist/{index-BkoHg0EZ.js → index-B5gNufYw.js} +5 -5
  14. package/dist/{index-CwFSFQX2.js → index-B5srJr0o.js} +6 -6
  15. package/dist/{index-Kn3M4A0O.cjs → index-B5vIeQUq.cjs} +1 -1
  16. package/dist/{index-CSeo-uxt.cjs → index-B8J_v2Ky.cjs} +1 -1
  17. package/dist/{index-CgqgVzlH.cjs → index-B9nZeing.cjs} +1 -1
  18. package/dist/{index-CH7Xo-Sp.js → index-BAj0dyBF.js} +3 -3
  19. package/dist/{index-BileCy93.js → index-BEJOd_29.js} +4 -4
  20. package/dist/{index-kGrlXtNc.cjs → index-BKhDFqMM.cjs} +1 -1
  21. package/dist/{index-CfduEaC5.js → index-BNNxPuEV.js} +1 -1
  22. package/dist/{index-CoR64Xpr.cjs → index-BOVdAFDH.cjs} +1 -1
  23. package/dist/{index-BS8EpPTs.cjs → index-Bi7yv8jC.cjs} +1 -1
  24. package/dist/{index-Be9Zt5tl.js → index-BjXcyVvp.js} +2 -2
  25. package/dist/{index-CxnH4vfV.cjs → index-BrsIZVyD.cjs} +1 -1
  26. package/dist/index-Bsdjuxq1.cjs +1 -0
  27. package/dist/{index-CvrTrN91.js → index-BuKHInQb.js} +1 -1
  28. package/dist/{index-DeuO5bnv.cjs → index-Bx4qIiIa.cjs} +1 -1
  29. package/dist/{index-CpaF7pM_.cjs → index-C-AOuDkl.cjs} +1 -1
  30. package/dist/{index-DJ40Hyyr.cjs → index-C0HHmjrg.cjs} +1 -1
  31. package/dist/{index-sB_mbukA.js → index-C1lB8apW.js} +4 -4
  32. package/dist/{index-C_AbUtWk.cjs → index-CAHYTZ1Q.cjs} +1 -1
  33. package/dist/{index-Ct9LJbIa.cjs → index-CCIJ-P3X.cjs} +1 -1
  34. package/dist/{index-hOfuCmcV.js → index-CCsSOTaB.js} +2 -2
  35. package/dist/{index-CjqqJUqa.js → index-CDXq3gs4.js} +1013 -1010
  36. package/dist/{index-BAkiJ74E.cjs → index-CK_O7QdV.cjs} +1 -1
  37. package/dist/{index-D6k9CkOL.js → index-CLtFz5gE.js} +13 -13
  38. package/dist/{index-DyLtJwnU.cjs → index-CMlYJD5U.cjs} +1 -1
  39. package/dist/index-CdPbJekh.js +7294 -0
  40. package/dist/{index-CjI5pDiU.cjs → index-CmlXlH2b.cjs} +1 -1
  41. package/dist/{index-BcyUCzHm.js → index-CpE8hbs0.js} +6 -6
  42. package/dist/{index-7XENlCpz.cjs → index-CxNBcsll.cjs} +1 -1
  43. package/dist/{index-ClODZ600.js → index-CyP2hcVu.js} +6 -6
  44. package/dist/{index-flJIivzF.cjs → index-D-r_YKrq.cjs} +13 -13
  45. package/dist/{index-CElxXJY-.js → index-D0_4keB8.js} +7 -7
  46. package/dist/index-DBScQH7L.js +2643 -0
  47. package/dist/{index-BNO8srTI.cjs → index-DCf7Tz40.cjs} +1 -1
  48. package/dist/{index-Da8foj5C.js → index-DEwcUkb-.js} +5 -5
  49. package/dist/{index-Bfs3oOac.js → index-DFg-bhPI.js} +1 -1
  50. package/dist/{index-BqB108UB.cjs → index-DJ1PTHpx.cjs} +1 -1
  51. package/dist/{index-BGr_ESuH.cjs → index-DOlPMLvf.cjs} +1 -1
  52. package/dist/{index-BnGZhWPa.cjs → index-DPaTtF3h.cjs} +1 -1
  53. package/dist/{index-Bzf_z3RK.cjs → index-DPyzaxnq.cjs} +1 -1
  54. package/dist/{index-DkcEb3i0.js → index-DS5z17Mc.js} +2123 -2130
  55. package/dist/{index-D7Z7_kkD.js → index-DSsZtYMz.js} +2 -2
  56. package/dist/{index-hm9E8BQd.js → index-Dk8D9SRm.js} +1 -1
  57. package/dist/{index-CDcMFEYg.js → index-DsHRVZ0E.js} +2 -2
  58. package/dist/{index-ZP8xxEio.cjs → index-DszzdQnM.cjs} +1 -1
  59. package/dist/{index-CKHNyMzP.js → index-FxX6NP0J.js} +1 -1
  60. package/dist/{index-BhmbDqk0.cjs → index-LXb5DfDE.cjs} +1 -1
  61. package/dist/{index-BFjyLFP1.cjs → index-NFCeQcv4.cjs} +1 -1
  62. package/dist/{index-BCqSX1fo.js → index-PIEkAjRf.js} +12 -12
  63. package/dist/{index-DbzvXPKu.js → index-UN4JU0ly.js} +176 -176
  64. package/dist/{index-Bry_sSrG.js → index-Y7MUJdPv.js} +4 -4
  65. package/dist/{index-CISjtweI.js → index-bj8hK6Pe.js} +24 -24
  66. package/dist/{index-1z9RrjZc.cjs → index-d6tSWKtY.cjs} +1 -1
  67. package/dist/{index-CiktIOnl.cjs → index-nUEWiqy9.cjs} +1 -1
  68. package/dist/{index-Bmv3M7uZ.js → index-pLeOyTaj.js} +6 -6
  69. package/dist/{index-D0FR_AhB.js → index-xHEf6hcO.js} +2 -2
  70. package/dist/index-zQVJFawn.cjs +1 -0
  71. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BnK7zR_5.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BTu7I4mn.js} +10362 -10383
  72. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C5Xqazal.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cmc1oALS.cjs} +123 -123
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-Bu0MMp-F.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Bg_c-oAL.js} +6 -6
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-D-u_Cg-8.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-C795GAHK.cjs} +1 -1
  75. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-9kDr7Iek.js +37436 -0
  76. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-Bn5qXF4J.cjs +56 -0
  77. package/dist/{index.vue_vue_type_style_index_1_lang-Ca71BDvm.cjs → index.vue_vue_type_style_index_1_lang-Bn7P4fYM.cjs} +1 -1
  78. package/dist/{index.vue_vue_type_style_index_1_lang-DMTvCBLP.js → index.vue_vue_type_style_index_1_lang-D1n_3_F6.js} +5 -5
  79. package/dist/index.vue_vue_type_style_index_1_lang-Exyt6qTf.js +7798 -0
  80. package/dist/index.vue_vue_type_style_index_1_lang-zN5mc8b0.cjs +32 -0
  81. package/dist/{isString-CZMLuMzD.js → isString-BAN9KLwf.js} +1 -1
  82. package/dist/{isString-BmAegMGI.cjs → isString-ChvWbctO.cjs} +1 -1
  83. package/dist/{main-gNJqytEB.cjs → main-BUEuCNq-.cjs} +1 -1
  84. package/dist/{main-Dji-qcpb.js → main-Dk3BZDsa.js} +5 -5
  85. package/dist/ss-component.cjs +1 -1
  86. package/dist/ss-component.css +2 -2
  87. package/dist/ss-component.js +11 -11
  88. package/dist/ss-component2.cjs +1 -1
  89. package/dist/ss-component2.js +12 -12
  90. package/dist/{three-viewport-gizmo-CkQ98n-T.js → three-viewport-gizmo-BHznJ6W3.js} +2 -2
  91. package/dist/{threeLatheView-BmVBnC8n.js → threeLatheView-DcuDjVv0.js} +4 -4
  92. package/dist/{threeLatheView-CZdorls1.cjs → threeLatheView-DfSxRY8B.cjs} +1 -1
  93. package/dist/{threeModel-AI7JwNc8.cjs → threeModel-DjjtL0-a.cjs} +1 -1
  94. package/dist/{threeModel-ejibS2N7.js → threeModel-YRFvkgXU.js} +5 -5
  95. package/dist/{threePreview-C_mY_TBC.cjs → threePreview-ByUYJkts.cjs} +1 -1
  96. package/dist/{threePreview-CYX5wKoL.js → threePreview-CyYfnbB6.js} +4 -4
  97. package/dist/threeSceneView-mhrcH0WG.cjs +5 -0
  98. package/dist/threeSceneView-zvyCHrp1.js +1469 -0
  99. package/dist/{threeSceneViewForCPMPIP-OOuWUtK1.cjs → threeSceneViewForCPMPIP-DA-twBdG.cjs} +3 -3
  100. package/dist/{threeSceneViewForCPMPIP-CDxxtlbo.js → threeSceneViewForCPMPIP-axjwKt9X.js} +85 -86
  101. package/dist/threeViewerHost-B02OtfCk.cjs +1 -0
  102. package/dist/{threeViewerHost-DTgKwwlG.js → threeViewerHost-D7L1FW__.js} +65 -78
  103. package/dist/{useRayCaster-5KTcOfSB.js → useRayCaster-CAqupK7D.js} +5 -5
  104. package/dist/useRayCaster-ClcofJkf.cjs +1 -0
  105. package/package.json +1 -1
  106. package/public/config.js +1 -1
  107. package/dist/animationData-C3K2hxaU.cjs +0 -1
  108. package/dist/array-B-rkzr_a.js +0 -1142
  109. package/dist/array-DRbhAcfX.cjs +0 -11
  110. package/dist/index-0Pm0ddJB.cjs +0 -1
  111. package/dist/index-8qtn1JAM.cjs +0 -1
  112. package/dist/index-BTh-u_yw.js +0 -3370
  113. package/dist/index-CYNps_oO.js +0 -7210
  114. package/dist/index-DlDK9CYq.cjs +0 -1
  115. package/dist/index-HrI-8Xdy.cjs +0 -1
  116. package/dist/index-hol6Hhnu.js +0 -2567
  117. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BDNNr7wB.cjs +0 -56
  118. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqbQkXoK.js +0 -34117
  119. package/dist/index.vue_vue_type_style_index_1_lang-BayGiM6k.cjs +0 -32
  120. package/dist/index.vue_vue_type_style_index_1_lang-bErlZPyW.js +0 -8085
  121. package/dist/isUndefined-ClRzgwTy.cjs +0 -1
  122. package/dist/isUndefined-chfCDxUU.js +0 -84
  123. package/dist/obj/model.mtl +0 -42
  124. package/dist/obj/model.obj +0 -26110
  125. package/dist/threeSceneView-BO8STZl6.js +0 -1472
  126. package/dist/threeSceneView-CXqoIpeL.cjs +0 -5
  127. package/dist/threeViewerHost-ChVCHaag.cjs +0 -1
  128. package/dist/useRayCaster-C428LZl9.cjs +0 -1
  129. package/public/obj/model.mtl +0 -42
  130. package/public/obj/model.obj +0 -26110
@@ -0,0 +1,32 @@
1
+ "use strict";const p=require("./index-d6tSWKtY.cjs"),l=require("vue");function ni(e){return e}function So(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 Eo=800,To=16,wo=Date.now;function Do(e){var n=0,t=0;return function(){var r=wo(),i=To-(r-t);if(t=r,i>0){if(++n>=Eo)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Ao(e){return function(){return e}}var ko=p.defineProperty?function(e,n){return p.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:Ao(n),writable:!0})}:ni,ri=Do(ko),yr=Math.max;function ii(e,n,t){return n=yr(n===void 0?e.length-1:n,0),function(){for(var r=arguments,i=-1,o=yr(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),So(e,this,s)}}var vr=p.Symbol?p.Symbol.isConcatSpreadable:void 0;function Co(e){return p.isArray(e)||p.isArguments(e)||!!(vr&&e&&e[vr])}function Ln(e,n,t,r,i){var o=-1,a=e.length;for(t||(t=Co),i||(i=[]);++o<a;){var s=e[o];n>0&&t(s)?n>1?Ln(s,n-1,t,r,i):p.arrayPush(i,s):r||(i[i.length]=s)}return i}function oi(e){var n=e==null?0:e.length;return n?Ln(e,1):[]}function ai(e){return ri(ii(e,void 0,oi),e+"")}var Io="__lodash_hash_undefined__";function xo(e){return this.__data__.set(e,Io),this}function Bo(e){return this.__data__.has(e)}function Et(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new p.MapCache;++n<t;)this.add(e[n])}Et.prototype.add=Et.prototype.push=xo;Et.prototype.has=Bo;function Ro(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 si(e,n){return e.has(n)}var Mo=1,No=2;function li(e,n,t,r,i,o){var a=t&Mo,s=e.length,c=n.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(e),f=o.get(n);if(u&&f)return u==n&&f==e;var h=-1,d=!0,v=t&No?new Et:void 0;for(o.set(e,n),o.set(n,e);++h<s;){var g=e[h],m=n[h];if(r)var y=a?r(m,g,h,n,e,o):r(g,m,h,e,n,o);if(y!==void 0){if(y)continue;d=!1;break}if(v){if(!Ro(n,function(b,S){if(!si(v,S)&&(g===b||i(g,b,t,r,o)))return v.push(S)})){d=!1;break}}else if(!(g===m||i(g,m,t,r,o))){d=!1;break}}return o.delete(e),o.delete(n),d}function Oo(e){var n=-1,t=Array(e.size);return e.forEach(function(r,i){t[++n]=[i,r]}),t}function ui(e){var n=-1,t=Array(e.size);return e.forEach(function(r){t[++n]=r}),t}var Po=1,Vo=2,Fo="[object Boolean]",Lo="[object Date]",Ko="[object Error]",_o="[object Map]",Ho="[object Number]",$o="[object RegExp]",Uo="[object Set]",zo="[object String]",jo="[object Symbol]",qo="[object ArrayBuffer]",Go="[object DataView]",br=p.Symbol?p.Symbol.prototype:void 0,cn=br?br.valueOf:void 0;function Wo(e,n,t,r,i,o,a){switch(t){case Go:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case qo:return!(e.byteLength!=n.byteLength||!o(new p.Uint8Array(e),new p.Uint8Array(n)));case Fo:case Lo:case Ho:return p.eq(+e,+n);case Ko:return e.name==n.name&&e.message==n.message;case $o:case zo:return e==n+"";case _o:var s=Oo;case Uo:var c=r&Po;if(s||(s=ui),e.size!=n.size&&!c)return!1;var u=a.get(e);if(u)return u==n;r|=Vo,a.set(e,n);var f=li(s(e),s(n),r,i,o,a);return a.delete(e),f;case jo:if(cn)return cn.call(e)==cn.call(n)}return!1}var Yo=1,Zo=Object.prototype,Jo=Zo.hasOwnProperty;function Xo(e,n,t,r,i,o){var a=t&Yo,s=p.getAllKeys(e),c=s.length,u=p.getAllKeys(n),f=u.length;if(c!=f&&!a)return!1;for(var h=c;h--;){var d=s[h];if(!(a?d in n:Jo.call(n,d)))return!1}var v=o.get(e),g=o.get(n);if(v&&g)return v==n&&g==e;var m=!0;o.set(e,n),o.set(n,e);for(var y=a;++h<c;){d=s[h];var b=e[d],S=n[d];if(r)var x=a?r(S,b,d,n,e,o):r(b,S,d,e,n,o);if(!(x===void 0?b===S||i(b,S,t,r,o):x)){m=!1;break}y||(y=d=="constructor")}if(m&&!y){var E=e.constructor,k=n.constructor;E!=k&&"constructor"in e&&"constructor"in n&&!(typeof E=="function"&&E instanceof E&&typeof k=="function"&&k instanceof k)&&(m=!1)}return o.delete(e),o.delete(n),m}var Qo=1,mr="[object Arguments]",Sr="[object Array]",xt="[object Object]",ea=Object.prototype,Er=ea.hasOwnProperty;function ta(e,n,t,r,i,o){var a=p.isArray(e),s=p.isArray(n),c=a?Sr:p.getTag(e),u=s?Sr:p.getTag(n);c=c==mr?xt:c,u=u==mr?xt:u;var f=c==xt,h=u==xt,d=c==u;if(d&&p.isBuffer(e)){if(!p.isBuffer(n))return!1;a=!0,f=!1}if(d&&!f)return o||(o=new p.Stack),a||p.isTypedArray(e)?li(e,n,t,r,i,o):Wo(e,n,c,t,r,i,o);if(!(t&Qo)){var v=f&&Er.call(e,"__wrapped__"),g=h&&Er.call(n,"__wrapped__");if(v||g){var m=v?e.value():e,y=g?n.value():n;return o||(o=new p.Stack),i(m,y,t,r,o)}}return d?(o||(o=new p.Stack),Xo(e,n,t,r,i,o)):!1}function Kn(e,n,t,r,i){return e===n?!0:e==null||n==null||!p.isObjectLike(e)&&!p.isObjectLike(n)?e!==e&&n!==n:ta(e,n,t,r,Kn,i)}function na(e,n){return e!=null&&n in Object(e)}function ra(e,n,t){n=p.castPath(n,e);for(var r=-1,i=n.length,o=!1;++r<i;){var a=p.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&&p.isLength(i)&&p.isIndex(a,i)&&(p.isArray(e)||p.isArguments(e)))}function ci(e,n){return e!=null&&ra(e,n,na)}function fi(e,n){return Kn(e,n)}function ia(e,n,t){for(var r=-1,i=n.length,o={};++r<i;){var a=n[r],s=p.baseGet(e,a);t(s,a)&&p.baseSet(o,p.castPath(a,e),s)}return o}function oa(e,n){return ia(e,n,function(t,r){return ci(e,r)})}var hi=ai(function(e,n){return e==null?{}:oa(e,n)});const jt="update:modelValue",Tn="change",wn="input";function aa(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 pi=e=>p.isClient?window.requestAnimationFrame(e):setTimeout(e,16),di=e=>p.isClient?window.cancelAnimationFrame(e):clearTimeout(e),sa=(e,n)=>{if(!p.isClient)return!1;const t={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(n)],r=p.getStyle(e,t);return["scroll","auto","overlay"].some(i=>r.includes(i))},la=(e,n)=>{if(!p.isClient)return;let t=e;for(;t;){if([window,document,document.documentElement].includes(t))return window;if(sa(t,n))return t;t=t.parentNode}return t};let Bt;const gi=e=>{var n;if(!p.isClient)return 0;if(Bt!==void 0)return Bt;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),Bt=r-o,Bt};function ua(e,n){if(!p.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 ca(e,n,t,r,i){const o=Date.now();let a;const s=()=>{const u=Date.now()-o,f=aa(u>r?r:u,n,t,r);p.isWindow(e)?e.scrollTo(window.pageXOffset,f):e.scrollTop=f,u<r?a=pi(s):p.isFunction(i)&&i()};return s(),()=>{a&&di(a)}}const fa=(e,n)=>p.isWindow(n)?e.ownerDocument.documentElement:n,ha=e=>p.isWindow(e)?window.scrollY:e.scrollTop,yi=()=>p.isClient&&/firefox/i.test(window.navigator.userAgent);let Te;const pa={height:"0",visibility:"hidden",overflow:yi()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},da=["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 ga(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:da.map(a=>[a,n.getPropertyValue(a)]),paddingSize:r,borderSize:i,boxSizing:t}}function Tr(e,n=1,t){var r;Te||(Te=document.createElement("textarea"),document.body.appendChild(Te));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=ga(e);s.forEach(([h,d])=>Te==null?void 0:Te.style.setProperty(h,d)),Object.entries(pa).forEach(([h,d])=>Te==null?void 0:Te.style.setProperty(h,d,"important")),Te.value=e.value||e.placeholder||"";let c=Te.scrollHeight;const u={};a==="border-box"?c=c+o:a==="content-box"&&(c=c-i),Te.value="";const f=Te.scrollHeight-i;if(p.isNumber(n)){let h=f*n;a==="border-box"&&(h=h+i+o),c=Math.max(h,c),u.minHeight=`${h}px`}if(p.isNumber(t)){let h=f*t;a==="border-box"&&(h=h+i+o),c=Math.min(h,c)}return u.height=`${c}px`,(r=Te.parentNode)==null||r.removeChild(Te),Te=void 0,u}const ya=p.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),vi=e=>hi(ya,e),bi=p.buildProps({id:{type:String,default:void 0},size:p.useSizeProp,disabled:Boolean,modelValue:{type:p.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:p.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:p.iconPropType},prefixIcon:{type:p.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:p.definePropType([Object,Array,String]),default:()=>p.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...vi(["ariaLabel"])}),va={[jt]:e=>p.isString(e),input:e=>p.isString(e),change:e=>p.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},ba=["class","style"],ma=/^on[A-Z]/,mi=(e={})=>{const{excludeListeners:n=!1,excludeKeys:t}=e,r=l.computed(()=>((t==null?void 0:t.value)||[]).concat(ba)),i=l.getCurrentInstance();return i?l.computed(()=>{var o;return p.fromPairs(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([a])=>!r.value.includes(a)&&!(n&&ma.test(a))))}):(p.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),l.computed(()=>({})))},Dn={prefix:Math.floor(Math.random()*1e4),current:0},Sa=Symbol("elIdInjection"),Si=()=>l.getCurrentInstance()?l.inject(Sa,Dn):Dn,qt=e=>{const n=Si();!p.isClient&&n===Dn&&p.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=p.useGetDerivedNamespace();return p.computedEager(()=>l.unref(e)||`${t.value}-id-${n.prefix}-${n.current++}`)},tn=Symbol("formContextKey"),_n=Symbol("formItemContextKey"),Hn=()=>{const e=l.inject(tn,void 0),n=l.inject(_n,void 0);return{form:e,formItem:n}},Ei=(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:qt().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}},Ti=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]})},$n=(e,n={})=>{const t=l.ref(void 0),r=n.prop?t:Ti("size"),i=n.global?t:p.useGlobalSize(),o=n.form?{size:void 0}:l.inject(tn,void 0),a=n.formItem?{size:void 0}:l.inject(_n,void 0);return l.computed(()=>r.value||l.unref(e)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},At=e=>{const n=Ti("disabled"),t=l.inject(tn,void 0);return l.computed(()=>n.value||l.unref(e)||(t==null?void 0:t.disabled)||!1)},Ea='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Ta=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,wr=e=>Array.from(e.querySelectorAll(Ea)).filter(n=>nn(n)&&Ta(n)),nn=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}},wa=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},wi=e=>!e.getAttribute("aria-owns"),Da=(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},Aa=e=>{e&&(e.focus(),!wi(e)&&e.click())};function Di(e,{beforeFocus:n,afterFocus:t,beforeBlur:r,afterBlur:i}={}){const o=l.getCurrentInstance(),{emit:a}=o,s=l.shallowRef(),c=At(),u=l.ref(!1),f=v=>{p.isFunction(n)&&n(v)||u.value||(u.value=!0,a("focus",v),t==null||t())},h=v=>{var g;p.isFunction(r)&&r(v)||v.relatedTarget&&((g=s.value)!=null&&g.contains(v.relatedTarget))||(u.value=!1,a("blur",v),i==null||i())},d=v=>{var g,m;(g=s.value)!=null&&g.contains(document.activeElement)&&s.value!==document.activeElement||nn(v.target)||c.value||(m=e.value)==null||m.focus()};return l.watch([s,c],([v,g])=>{v&&(g?v.removeAttribute("tabindex"):v.setAttribute("tabindex","-1"))}),p.useEventListener(s,"focus",f,!0),p.useEventListener(s,"blur",h,!0),p.useEventListener(s,"click",d,!0),process.env.NODE_ENV==="test"&&l.onMounted(()=>{const v=p.isElement(e.value)?e.value:document.querySelector("input,textarea");v&&(p.useEventListener(v,"focus",f,!0),p.useEventListener(v,"blur",h,!0))}),{isFocused:u,wrapperRef:s,handleFocus:f,handleBlur:h}}const ka=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function Ai({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,f=u[u.length-1]||"";t.value=!ka(f)},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 Ca(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],f=i.indexOf(u,s-1);f!==-1&&(c=f+1)}e.value.setSelectionRange(c,c)}return[t,r]}const ki="ElInput",Ia=l.defineComponent({name:ki,inheritAttrs:!1}),xa=l.defineComponent({...Ia,props:bi,emits:va,setup(e,{expose:n,emit:t}){const r=e,i=l.useAttrs(),o=mi(),a=l.useSlots(),s=l.computed(()=>[r.type==="textarea"?m.b():g.b(),g.m(d.value),g.is("disabled",v.value),g.is("exceed",B.value),{[g.b("group")]:a.prepend||a.append,[g.m("prefix")]:a.prefix||r.prefixIcon,[g.m("suffix")]:a.suffix||r.suffixIcon||r.clearable||r.showPassword,[g.bm("suffix","password-clear")]:$.value&&Z.value,[g.b("hidden")]:r.type==="hidden"},i.class]),c=l.computed(()=>[g.e("wrapper"),g.is("focus",T.value)]),{form:u,formItem:f}=Hn(),{inputId:h}=Ei(r,{formItemContext:f}),d=$n(),v=At(),g=p.useNamespace("input"),m=p.useNamespace("textarea"),y=l.shallowRef(),b=l.shallowRef(),S=l.ref(!1),x=l.ref(!1),E=l.ref(),k=l.shallowRef(r.inputStyle),w=l.computed(()=>y.value||b.value),{wrapperRef:A,isFocused:T,handleFocus:N,handleBlur:D}=Di(w,{beforeFocus(){return v.value},afterBlur(){var R;r.validateEvent&&((R=f==null?void 0:f.validate)==null||R.call(f,"blur").catch(G=>p.debugWarn(G)))}}),C=l.computed(()=>{var R;return(R=u==null?void 0:u.statusIcon)!=null?R:!1}),M=l.computed(()=>(f==null?void 0:f.validateState)||""),O=l.computed(()=>M.value&&p.ValidateComponentsMap[M.value]),Y=l.computed(()=>x.value?p.view_default:p.hide_default),X=l.computed(()=>[i.style]),F=l.computed(()=>[r.inputStyle,k.value,{resize:r.resize}]),V=l.computed(()=>p.isNil(r.modelValue)?"":String(r.modelValue)),$=l.computed(()=>r.clearable&&!v.value&&!r.readonly&&!!V.value&&(T.value||S.value)),Z=l.computed(()=>r.showPassword&&!v.value&&!!V.value),te=l.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!v.value&&!r.readonly&&!r.showPassword),_=l.computed(()=>V.value.length),B=l.computed(()=>!!te.value&&_.value>Number(r.maxlength)),P=l.computed(()=>!!a.suffix||!!r.suffixIcon||$.value||r.showPassword||te.value||!!M.value&&C.value),[L,z]=Ca(y);p.useResizeObserver(b,R=>{if(U(),!te.value||r.resize!=="both")return;const G=R[0],{width:ve}=G.contentRect;E.value={right:`calc(100% - ${ve+15+6}px)`}});const Q=()=>{const{type:R,autosize:G}=r;if(!(!p.isClient||R!=="textarea"||!b.value))if(G){const ve=p.isObject$1(G)?G.minRows:void 0,Re=p.isObject$1(G)?G.maxRows:void 0,he=Tr(b.value,ve,Re);k.value={overflowY:"hidden",...he},l.nextTick(()=>{b.value.offsetHeight,k.value=he})}else k.value={minHeight:Tr(b.value).minHeight}},U=(R=>{let G=!1;return()=>{var ve;if(G||!r.autosize)return;((ve=b.value)==null?void 0:ve.offsetParent)===null||(R(),G=!0)}})(Q),ae=()=>{const R=w.value,G=r.formatter?r.formatter(V.value):V.value;!R||R.value===G||(R.value=G)},j=async R=>{L();let{value:G}=R.target;if(r.formatter&&r.parser&&(G=r.parser(G)),!q.value){if(G===V.value){ae();return}t(jt,G),t(wn,G),await l.nextTick(),ae(),z()}},ce=R=>{let{value:G}=R.target;r.formatter&&r.parser&&(G=r.parser(G)),t(Tn,G)},{isComposing:q,handleCompositionStart:Ee,handleCompositionUpdate:fe,handleCompositionEnd:ne}=Ai({emit:t,afterComposition:j}),re=()=>{L(),x.value=!x.value,setTimeout(z)},le=()=>{var R;return(R=w.value)==null?void 0:R.focus()},ye=()=>{var R;return(R=w.value)==null?void 0:R.blur()},Ae=R=>{S.value=!1,t("mouseleave",R)},ke=R=>{S.value=!0,t("mouseenter",R)},Be=R=>{t("keydown",R)},W=()=>{var R;(R=w.value)==null||R.select()},ie=()=>{t(jt,""),t(Tn,""),t("clear"),t(wn,"")};return l.watch(()=>r.modelValue,()=>{var R;l.nextTick(()=>Q()),r.validateEvent&&((R=f==null?void 0:f.validate)==null||R.call(f,"change").catch(G=>p.debugWarn(G)))}),l.watch(V,()=>ae()),l.watch(()=>r.type,async()=>{await l.nextTick(),ae(),Q()}),l.onMounted(()=>{!r.formatter&&r.parser&&p.debugWarn(ki,"If you set the parser, you also need to set the formatter."),ae(),l.nextTick(Q)}),n({input:y,textarea:b,ref:w,textareaStyle:F,autosize:l.toRef(r,"autosize"),isComposing:q,focus:le,blur:ye,select:W,clear:ie,resizeTextarea:Q}),(R,G)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([l.unref(s),{[l.unref(g).bm("group","append")]:R.$slots.append,[l.unref(g).bm("group","prepend")]:R.$slots.prepend}]),style:l.normalizeStyle(l.unref(X)),onMouseenter:ke,onMouseleave:Ae},[l.createCommentVNode(" input "),R.type!=="textarea"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createCommentVNode(" prepend slot "),R.$slots.prepend?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(l.unref(g).be("group","prepend"))},[l.renderSlot(R.$slots,"prepend")],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{ref_key:"wrapperRef",ref:A,class:l.normalizeClass(l.unref(c))},[l.createCommentVNode(" prefix slot "),R.$slots.prefix||R.prefixIcon?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(g).e("prefix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(g).e("prefix-inner"))},[l.renderSlot(R.$slots,"prefix"),R.prefixIcon?(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:0,class:l.normalizeClass(l.unref(g).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(R.prefixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("input",l.mergeProps({id:l.unref(h),ref_key:"input",ref:y,class:l.unref(g).e("inner")},l.unref(o),{minlength:R.minlength,maxlength:R.maxlength,type:R.showPassword?x.value?"text":"password":R.type,disabled:l.unref(v),readonly:R.readonly,autocomplete:R.autocomplete,tabindex:R.tabindex,"aria-label":R.ariaLabel,placeholder:R.placeholder,style:R.inputStyle,form:R.form,autofocus:R.autofocus,role:R.containerRole,onCompositionstart:l.unref(Ee),onCompositionupdate:l.unref(fe),onCompositionend:l.unref(ne),onInput:j,onChange:ce,onKeydown:Be}),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(P)?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(l.unref(g).e("suffix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(g).e("suffix-inner"))},[!l.unref($)||!l.unref(Z)||!l.unref(te)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(R.$slots,"suffix"),R.suffixIcon?(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:0,class:l.normalizeClass(l.unref(g).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(R.suffixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],64)):l.createCommentVNode("v-if",!0),l.unref($)?(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:1,class:l.normalizeClass([l.unref(g).e("icon"),l.unref(g).e("clear")]),onMousedown:l.withModifiers(l.unref(p.NOOP),["prevent"]),onClick:ie},{default:l.withCtx(()=>[l.createVNode(l.unref(p.circle_close_default))]),_:1},8,["class","onMousedown"])):l.createCommentVNode("v-if",!0),l.unref(Z)?(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:2,class:l.normalizeClass([l.unref(g).e("icon"),l.unref(g).e("password")]),onClick:re},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(Y))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.unref(te)?(l.openBlock(),l.createElementBlock("span",{key:3,class:l.normalizeClass(l.unref(g).e("count"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(g).e("count-inner"))},l.toDisplayString(l.unref(_))+" / "+l.toDisplayString(R.maxlength),3)],2)):l.createCommentVNode("v-if",!0),l.unref(M)&&l.unref(O)&&l.unref(C)?(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:4,class:l.normalizeClass([l.unref(g).e("icon"),l.unref(g).e("validateIcon"),l.unref(g).is("loading",l.unref(M)==="validating")])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(O))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0)],2),l.createCommentVNode(" append slot "),R.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(g).be("group","append"))},[l.renderSlot(R.$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(h),ref_key:"textarea",ref:b,class:[l.unref(m).e("inner"),l.unref(g).is("focus",l.unref(T))]},l.unref(o),{minlength:R.minlength,maxlength:R.maxlength,tabindex:R.tabindex,disabled:l.unref(v),readonly:R.readonly,autocomplete:R.autocomplete,style:l.unref(F),"aria-label":R.ariaLabel,placeholder:R.placeholder,form:R.form,autofocus:R.autofocus,rows:R.rows,role:R.containerRole,onCompositionstart:l.unref(Ee),onCompositionupdate:l.unref(fe),onCompositionend:l.unref(ne),onInput:j,onFocus:l.unref(N),onBlur:l.unref(D),onChange:ce,onKeydown:Be}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),l.unref(te)?(l.openBlock(),l.createElementBlock("span",{key:0,style:l.normalizeStyle(E.value),class:l.normalizeClass(l.unref(g).e("count"))},l.toDisplayString(l.unref(_))+" / "+l.toDisplayString(R.maxlength),7)):l.createCommentVNode("v-if",!0)],64))],38))}});var Ba=p._export_sfc(xa,[["__file","input.vue"]]);const Ci=p.withInstall(Ba),fn="focus-trap.focus-after-trapped",hn="focus-trap.focus-after-released",Ra="focus-trap.focusout-prevented",Dr={cancelable:!0,bubbles:!1},Ma={cancelable:!0,bubbles:!1},Ar="focusAfterTrapped",kr="focusAfterReleased",Ii=Symbol("elFocusTrap"),Un=l.ref(),rn=l.ref(0),zn=l.ref(0);let Rt=0;const xi=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},Cr=(e,n)=>{for(const t of e)if(!Na(t,n))return t},Na=(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},Oa=e=>{const n=xi(e),t=Cr(n,e),r=Cr(n.reverse(),e);return[t,r]},Pa=e=>e instanceof HTMLInputElement&&"select"in e,Ne=(e,n)=>{if(e&&e.focus){const t=document.activeElement;let r=!1;p.isElement(e)&&!nn(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),zn.value=window.performance.now(),e!==t&&Pa(e)&&n&&e.select(),p.isElement(e)&&r&&e.removeAttribute("tabindex")}};function Ir(e,n){const t=[...e],r=e.indexOf(n);return r!==-1&&t.splice(r,1),t}const Va=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=Ir(e,r),e.unshift(r)},remove:r=>{var i,o;e=Ir(e,r),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},Fa=(e,n=!1)=>{const t=document.activeElement;for(const r of e)if(Ne(r,n),document.activeElement!==t)return},xr=Va(),La=()=>rn.value>zn.value,Mt=()=>{Un.value="pointer",rn.value=window.performance.now()},Br=()=>{Un.value="keyboard",rn.value=window.performance.now()},Ka=()=>(l.onMounted(()=>{Rt===0&&(document.addEventListener("mousedown",Mt),document.addEventListener("touchstart",Mt),document.addEventListener("keydown",Br)),Rt++}),l.onBeforeUnmount(()=>{Rt--,Rt<=0&&(document.removeEventListener("mousedown",Mt),document.removeEventListener("touchstart",Mt),document.removeEventListener("keydown",Br))}),{focusReason:Un,lastUserFocusTimestamp:rn,lastAutomatedFocusTimestamp:zn}),Nt=e=>new CustomEvent(Ra,{...Ma,detail:e});let Je=[];const Rr=e=>{e.code===p.EVENT_CODE.esc&&Je.forEach(n=>n(e))},_a=e=>{l.onMounted(()=>{Je.length===0&&document.addEventListener("keydown",Rr),p.isClient&&Je.push(e)}),l.onBeforeUnmount(()=>{Je=Je.filter(n=>n!==e),Je.length===0&&p.isClient&&document.removeEventListener("keydown",Rr)})},Ha=l.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Ar,kr,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const t=l.ref();let r,i;const{focusReason:o}=Ka();_a(g=>{e.trapped&&!a.paused&&n("release-requested",g)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=g=>{if(!e.loop&&!e.trapped||a.paused)return;const{code:m,altKey:y,ctrlKey:b,metaKey:S,currentTarget:x,shiftKey:E}=g,{loop:k}=e,w=m===p.EVENT_CODE.tab&&!y&&!b&&!S,A=document.activeElement;if(w&&A){const T=x,[N,D]=Oa(T);if(N&&D){if(!E&&A===D){const M=Nt({focusReason:o.value});n("focusout-prevented",M),M.defaultPrevented||(g.preventDefault(),k&&Ne(N,!0))}else if(E&&[N,T].includes(A)){const M=Nt({focusReason:o.value});n("focusout-prevented",M),M.defaultPrevented||(g.preventDefault(),k&&Ne(D,!0))}}else if(A===T){const M=Nt({focusReason:o.value});n("focusout-prevented",M),M.defaultPrevented||g.preventDefault()}}};l.provide(Ii,{focusTrapRef:t,onKeydown:s}),l.watch(()=>e.focusTrapEl,g=>{g&&(t.value=g)},{immediate:!0}),l.watch([t],([g],[m])=>{g&&(g.addEventListener("keydown",s),g.addEventListener("focusin",f),g.addEventListener("focusout",h)),m&&(m.removeEventListener("keydown",s),m.removeEventListener("focusin",f),m.removeEventListener("focusout",h))});const c=g=>{n(Ar,g)},u=g=>n(kr,g),f=g=>{const m=l.unref(t);if(!m)return;const y=g.target,b=g.relatedTarget,S=y&&m.contains(y);e.trapped||b&&m.contains(b)||(r=b),S&&n("focusin",g),!a.paused&&e.trapped&&(S?i=y:Ne(i,!0))},h=g=>{const m=l.unref(t);if(!(a.paused||!m))if(e.trapped){const y=g.relatedTarget;!p.isNil(y)&&!m.contains(y)&&setTimeout(()=>{if(!a.paused&&e.trapped){const b=Nt({focusReason:o.value});n("focusout-prevented",b),b.defaultPrevented||Ne(i,!0)}},0)}else{const y=g.target;y&&m.contains(y)||n("focusout",g)}};async function d(){await l.nextTick();const g=l.unref(t);if(g){xr.push(a);const m=g.contains(document.activeElement)?r:document.activeElement;if(r=m,!g.contains(m)){const b=new Event(fn,Dr);g.addEventListener(fn,c),g.dispatchEvent(b),b.defaultPrevented||l.nextTick(()=>{let S=e.focusStartEl;p.isString(S)||(Ne(S),document.activeElement!==S&&(S="first")),S==="first"&&Fa(xi(g),!0),(document.activeElement===m||S==="container")&&Ne(g)})}}}function v(){const g=l.unref(t);if(g){g.removeEventListener(fn,c);const m=new CustomEvent(hn,{...Dr,detail:{focusReason:o.value}});g.addEventListener(hn,u),g.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!La()||g.contains(document.activeElement))&&Ne(r??document.body),g.removeEventListener(hn,u),xr.remove(a)}}return l.onMounted(()=>{e.trapped&&d(),l.watch(()=>e.trapped,g=>{g?d():v()})}),l.onBeforeUnmount(()=>{e.trapped&&v(),t.value&&(t.value.removeEventListener("keydown",s),t.value.removeEventListener("focusin",f),t.value.removeEventListener("focusout",h),t.value=void 0)}),{onKeydown:s}}});function $a(e,n,t,r,i,o){return l.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Bi=p._export_sfc(Ha,[["render",$a],["__file","focus-trap.vue"]]);const Ri=Symbol("buttonGroupContextKey"),Mi=({from:e,replacement:n,scope:t,version:r,ref:i,type:o="API"},a)=>{l.watch(()=>l.unref(a),s=>{s&&p.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})},Ua=(e,n)=>{Mi({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(Ri,void 0),r=p.useGlobalConfig("button"),{form:i}=Hn(),o=$n(l.computed(()=>t==null?void 0:t.size)),a=At(),s=l.ref(),c=l.useSlots(),u=l.computed(()=>{var y;return e.type||(t==null?void 0:t.type)||((y=r.value)==null?void 0:y.type)||""}),f=l.computed(()=>{var y,b,S;return(S=(b=e.autoInsertSpace)!=null?b:(y=r.value)==null?void 0:y.autoInsertSpace)!=null?S:!1}),h=l.computed(()=>{var y,b,S;return(S=(b=e.plain)!=null?b:(y=r.value)==null?void 0:y.plain)!=null?S:!1}),d=l.computed(()=>{var y,b,S;return(S=(b=e.round)!=null?b:(y=r.value)==null?void 0:y.round)!=null?S:!1}),v=l.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),g=l.computed(()=>{var y;const b=(y=c.default)==null?void 0:y.call(c);if(f.value&&(b==null?void 0:b.length)===1){const S=b[0];if((S==null?void 0:S.type)===l.Text){const x=S.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(x.trim())}}return!1});return{_disabled:a,_size:o,_type:u,_ref:s,_props:v,_plain:h,_round:d,shouldAddSpace:g,handleClick:y=>{if(a.value||e.loading){y.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),n("click",y)}}},Ni=["default","primary","success","warning","info","danger","text",""],za=["button","submit","reset"],An=p.buildProps({size:p.useSizeProp,disabled:Boolean,type:{type:String,values:Ni,default:""},icon:{type:p.iconPropType},nativeType:{type:String,values:za,default:"button"},loading:Boolean,loadingIcon:{type:p.iconPropType,default:()=>p.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:p.definePropType([String,Object]),default:"button"}}),ja={click:e=>e instanceof MouseEvent};function pe(e,n){qa(e)&&(e="100%");var t=Ga(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 Ot(e){return Math.min(1,Math.max(0,e))}function qa(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Ga(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Oi(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Pt(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ue(e){return e.length===1?"0"+e:String(e)}function Wa(e,n,t){return{r:pe(e,255)*255,g:pe(n,255)*255,b:pe(t,255)*255}}function Mr(e,n,t){e=pe(e,255),n=pe(n,255),t=pe(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 pn(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 Ya(e,n,t){var r,i,o;if(e=pe(e,360),n=pe(n,100),t=pe(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=pn(s,a,e+1/3),i=pn(s,a,e),o=pn(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function Nr(e,n,t){e=pe(e,255),n=pe(n,255),t=pe(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 Za(e,n,t){e=pe(e,360)*6,n=pe(n,100),t=pe(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],f=[s,t,t,a,o,o][c],h=[o,o,s,t,t,a][c];return{r:u*255,g:f*255,b:h*255}}function Or(e,n,t,r){var i=[Ue(Math.round(e).toString(16)),Ue(Math.round(n).toString(16)),Ue(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 Ja(e,n,t,r,i){var o=[Ue(Math.round(e).toString(16)),Ue(Math.round(n).toString(16)),Ue(Math.round(t).toString(16)),Ue(Xa(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 Xa(e){return Math.round(parseFloat(e)*255).toString(16)}function Pr(e){return we(e)/255}function we(e){return parseInt(e,16)}function Qa(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var kn={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 es(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=rs(e)),typeof e=="object"&&(Me(e.r)&&Me(e.g)&&Me(e.b)?(n=Wa(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Me(e.h)&&Me(e.s)&&Me(e.v)?(r=Pt(e.s),i=Pt(e.v),n=Za(e.h,r,i),a=!0,s="hsv"):Me(e.h)&&Me(e.s)&&Me(e.l)&&(r=Pt(e.s),o=Pt(e.l),n=Ya(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=Oi(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 ts="[-\\+]?\\d+%?",ns="[-\\+]?\\d*\\.\\d+%?",Le="(?:".concat(ns,")|(?:").concat(ts,")"),dn="[\\s|\\(]+(".concat(Le,")[,|\\s]+(").concat(Le,")[,|\\s]+(").concat(Le,")\\s*\\)?"),gn="[\\s|\\(]+(".concat(Le,")[,|\\s]+(").concat(Le,")[,|\\s]+(").concat(Le,")[,|\\s]+(").concat(Le,")\\s*\\)?"),Ie={CSS_UNIT:new RegExp(Le),rgb:new RegExp("rgb"+dn),rgba:new RegExp("rgba"+gn),hsl:new RegExp("hsl"+dn),hsla:new RegExp("hsla"+gn),hsv:new RegExp("hsv"+dn),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 rs(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(kn[e])e=kn[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=Ie.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=Ie.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ie.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=Ie.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ie.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=Ie.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ie.hex8.exec(e),t?{r:we(t[1]),g:we(t[2]),b:we(t[3]),a:Pr(t[4]),format:n?"name":"hex8"}:(t=Ie.hex6.exec(e),t?{r:we(t[1]),g:we(t[2]),b:we(t[3]),format:n?"name":"hex"}:(t=Ie.hex4.exec(e),t?{r:we(t[1]+t[1]),g:we(t[2]+t[2]),b:we(t[3]+t[3]),a:Pr(t[4]+t[4]),format:n?"name":"hex8"}:(t=Ie.hex3.exec(e),t?{r:we(t[1]+t[1]),g:we(t[2]+t[2]),b:we(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Me(e){return!!Ie.CSS_UNIT.exec(String(e))}var Pi=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=Qa(n)),this.originalInput=n;var i=es(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=Oi(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=Nr(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=Nr(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=Mr(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=Mr(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),Or(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),Ja(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(pe(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(pe(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="#"+Or(this.r,this.g,this.b,!1),t=0,r=Object.entries(kn);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=Ot(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=Ot(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=Ot(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=Ot(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 Pe(e,n=20){return e.mix("#141414",n).toString()}function is(e){const n=At(),t=p.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 Pi(i),s=e.dark?a.tint(20).toString():Pe(a,20);if(e.plain)r=t.cssVarBlock({"bg-color":e.dark?Pe(a,90):a.tint(90).toString(),"text-color":i,"border-color":e.dark?Pe(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?Pe(a,90):a.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=e.dark?Pe(a,50):a.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=e.dark?Pe(a,80):a.tint(80).toString());else{const c=e.dark?Pe(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 f=e.dark?Pe(a,50):a.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=f,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")]=f}}}return r})}const os=l.defineComponent({name:"ElButton"}),as=l.defineComponent({...os,props:An,emits:ja,setup(e,{expose:n,emit:t}){const r=e,i=is(r),o=p.useNamespace("button"),{_ref:a,_size:s,_type:c,_disabled:u,_props:f,_plain:h,_round:d,shouldAddSpace:v,handleClick:g}=Ua(r,t),m=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",h.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:v}),(y,b)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(y.tag),l.mergeProps({ref_key:"_ref",ref:a},l.unref(f),{class:l.unref(m),style:l.unref(i),onClick:l.unref(g)}),{default:l.withCtx(()=>[y.loading?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[y.$slots.loading?l.renderSlot(y.$slots,"loading",{key:0}):(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:1,class:l.normalizeClass(l.unref(o).is("loading"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(y.loadingIcon)))]),_:1},8,["class"]))],64)):y.icon||y.$slots.icon?(l.openBlock(),l.createBlock(l.unref(p.ElIcon),{key:1},{default:l.withCtx(()=>[y.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(y.icon),{key:0})):l.renderSlot(y.$slots,"icon",{key:1})]),_:3})):l.createCommentVNode("v-if",!0),y.$slots.default?(l.openBlock(),l.createElementBlock("span",{key:2,class:l.normalizeClass({[l.unref(o).em("text","expand")]:l.unref(v)})},[l.renderSlot(y.$slots,"default")],2)):l.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var ss=p._export_sfc(as,[["__file","button.vue"]]);const ls={size:An.size,type:An.type},us=l.defineComponent({name:"ElButtonGroup"}),cs=l.defineComponent({...us,props:ls,setup(e){const n=e;l.provide(Ri,l.reactive({size:l.toRef(n,"size"),type:l.toRef(n,"type")}));const t=p.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 Vi=p._export_sfc(cs,[["__file","button-group.vue"]]);const Fi=p.withInstall(ss,{ButtonGroup:Vi}),fs=p.withNoopInstall(Vi),hs="utils/vue/vnode";var bt=(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))(bt||{});function Li(e){return l.isVNode(e)&&e.type===l.Fragment}function ps(e){return l.isVNode(e)&&e.type===l.Comment}function ds(e){return l.isVNode(e)&&!Li(e)&&!ps(e)}const gs=e=>{if(!l.isVNode(e))return p.debugWarn(hs,"[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=>{p.hasOwn(t[i],"default")&&(r[i]=t[i].default)}),Object.keys(n).forEach(i=>{r[p.camelize(i)]=n[i]}),r},ys=e=>{if(!p.isArray$1(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},gt=e=>{const n=p.isArray$1(e)?e:[e],t=[];return n.forEach(r=>{var i;p.isArray$1(r)?t.push(...gt(r)):l.isVNode(r)&&((i=r.component)!=null&&i.subTree)?t.push(r,...gt(r.component.subTree)):l.isVNode(r)&&p.isArray$1(r.children)?t.push(...gt(r.children)):l.isVNode(r)&&r.shapeFlag===2?t.push(...gt(r.type())):t.push(r)}),t},jn=e=>{if(!e)return{onClick:p.NOOP,onMousedown:p.NOOP,onMouseup:p.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}}},vs=p.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:p.definePropType([String,Array,Object])},zIndex:{type:p.definePropType([String,Number])}}),bs={click:e=>e instanceof MouseEvent},ms="overlay";var Ss=l.defineComponent({name:"ElOverlay",props:vs,emits:bs,setup(e,{slots:n,emit:t}){const r=p.useNamespace(ms),i=c=>{t("click",c)},{onClick:o,onMousedown:a,onMouseup:s}=jn(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")],bt.STYLE|bt.CLASS|bt.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 Ki=Ss,_i=(e,n,t,r)=>{const i={offsetX:0,offsetY:0},o=(h,d)=>{if(e.value){const{offsetX:v,offsetY:g}=i,m=e.value.getBoundingClientRect(),y=m.left,b=m.top,S=m.width,x=m.height,E=document.documentElement.clientWidth,k=document.documentElement.clientHeight,w=-y+v,A=-b+g,T=E-y-S+v,N=k-b-(x<k?x:0)+g;r!=null&&r.value||(h=Math.min(Math.max(h,w),T),d=Math.min(Math.max(d,A),N)),i.offsetX=h,i.offsetY=d,e.value.style.transform=`translate(${p.addUnit(h)}, ${p.addUnit(d)})`}},a=h=>{const d=h.clientX,v=h.clientY,{offsetX:g,offsetY:m}=i,y=S=>{const x=g+S.clientX-d,E=m+S.clientY-v;o(x,E)},b=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",b)},s=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",a),window.addEventListener("resize",f))},c=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",a),window.removeEventListener("resize",f))},u=()=>{i.offsetX=0,i.offsetY=0,e.value&&(e.value.style.transform="")},f=()=>{const{offsetX:h,offsetY:d}=i;o(h,d)};return l.onMounted(()=>{l.watchEffect(()=>{t.value?s():c()})}),l.onBeforeUnmount(()=>{c()}),{resetPosition:u,updatePosition:f}},Hi=(e,n={})=>{l.isRef(e)||p.throwError("[useLockscreen]","You need to pass a ref param to this function");const t=n.ns||p.useNamespace("popup"),r=l.computed(()=>t.bm("parent","hidden"));if(!p.isClient||p.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,p.removeClass(document.body,r.value))},200)};l.watch(e,c=>{if(!c){s();return}o=!p.hasClass(document.body,r.value),o&&(a=document.body.style.width,p.addClass(document.body,r.value)),i=gi(t.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,f=p.getStyle(document.body,"overflowY");i>0&&(u||f==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`)}),l.onScopeDispose(()=>s())},$i=e=>["",...p.componentSizes].includes(e),Cn="_trap-focus-children",ze=[],Vr=e=>{var n;if(ze.length===0)return;const t=ze[ze.length-1][Cn];if(t.length>0&&e.code===p.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())}}},Es={beforeMount(e){e[Cn]=wr(e),ze.push(e),ze.length<=1&&document.addEventListener("keydown",Vr)},updated(e){l.nextTick(()=>{e[Cn]=wr(e)})},unmounted(){ze.shift(),ze.length===0&&document.removeEventListener("keydown",Vr)}},Ts=l.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Es},components:{ElButton:Fi,ElFocusTrap:Bi,ElInput:Ci,ElOverlay:Ki,ElIcon:p.ElIcon,...p.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:$i},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}=p.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(p.loading_default),cancelButtonLoadingIcon:l.markRaw(p.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),f=l.computed(()=>{const F=u.type;return{[i.bm("icon",F)]:F&&p.TypeComponentsMap[F]}}),h=qt(),d=qt(),v=l.computed(()=>{const F=u.type;return u.icon||F&&p.TypeComponentsMap[F]||""}),g=l.computed(()=>!!u.message),m=l.ref(),y=l.ref(),b=l.ref(),S=l.ref(),x=l.ref(),E=l.computed(()=>u.confirmButtonClass);l.watch(()=>u.inputValue,async F=>{await l.nextTick(),e.boxType==="prompt"&&F&&M()},{immediate:!0}),l.watch(()=>c.value,F=>{var V,$;F&&(e.boxType!=="prompt"&&(u.autofocus?b.value=($=(V=x.value)==null?void 0:V.$el)!=null?$:m.value:b.value=m.value),u.zIndex=s()),e.boxType==="prompt"&&(F?l.nextTick().then(()=>{var Z;S.value&&S.value.$el&&(u.autofocus?b.value=(Z=O())!=null?Z:m.value:b.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const k=l.computed(()=>e.draggable),w=l.computed(()=>e.overflow);_i(m,y,k,w),l.onMounted(async()=>{await l.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",A)}),l.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",A)});function A(){c.value&&(c.value=!1,l.nextTick(()=>{u.action&&n("action",u.action)}))}const T=()=>{e.closeOnClickModal&&C(u.distinguishCancelAndClose?"close":"cancel")},N=jn(T),D=F=>{if(u.inputType!=="textarea")return F.preventDefault(),C("confirm")},C=F=>{var V;e.boxType==="prompt"&&F==="confirm"&&!M()||(u.action=F,u.beforeClose?(V=u.beforeClose)==null||V.call(u,F,u,A):A())},M=()=>{if(e.boxType==="prompt"){const F=u.inputPattern;if(F&&!F.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const V=u.inputValidator;if(p.isFunction(V)){const $=V(u.inputValue);if($===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(p.isString($))return u.editorErrorMessage=$,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},O=()=>{var F,V;const $=(F=S.value)==null?void 0:F.$refs;return(V=$==null?void 0:$.input)!=null?V:$==null?void 0:$.textarea},Y=()=>{C("close")},X=()=>{e.closeOnPressEscape&&Y()};return e.lockScroll&&Hi(c),{...l.toRefs(u),ns:i,overlayEvent:N,visible:c,hasMessage:g,typeClass:f,contentId:h,inputId:d,btnSize:o,iconComponent:v,confirmButtonClasses:E,rootRef:m,focusStartRef:b,headerRef:y,inputRef:S,confirmRef:x,doClose:A,handleClose:Y,onCloseRequested:X,handleWrapperClick:T,handleInputEnter:D,handleAction:C,t:a}}});function ws(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"),f=l.resolveComponent("el-overlay");return l.openBlock(),l.createBlock(l.Transition,{name:"fade-in-linear",onAfterLeave:h=>e.$emit("vanish"),persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(f,{"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:h=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),onKeydown:l.withKeys(l.withModifiers(h=>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":h=>e.inputValue=h,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:h=>e.handleAction("cancel"),onKeydown:l.withKeys(l.withModifiers(h=>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:h=>e.handleAction("confirm"),onKeydown:l.withKeys(l.withModifiers(h=>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 Ds=p._export_sfc(Ts,[["render",ws],["__file","index.vue"]]);const Tt=new Map,As=e=>{let n=document.body;return e.appendTo&&(p.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),p.isElement(e.appendTo)&&(n=e.appendTo),p.isElement(n)||(p.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},ks=(e,n,t=null)=>{const r=l.createVNode(Ds,e,p.isFunction(e.message)||l.isVNode(e.message)?{default:p.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=t,l.render(r,n),As(e).appendChild(n.firstElementChild),r.component},Cs=()=>document.createElement("div"),Is=(e,n)=>{const t=Cs();e.onVanish=()=>{l.render(null,t),Tt.delete(i)},e.onAction=o=>{const a=Tt.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=ks(e,t,n),i=r.proxy;for(const o in e)p.hasOwn(e,o)&&!p.hasOwn(i.$props,o)&&(o==="closeIcon"&&p.isObject$1(e[o])?i[o]=l.markRaw(e[o]):i[o]=e[o]);return i.visible=!0,i};function ht(e,n=null){if(!p.isClient)return Promise.reject();let t;return p.isString(e)||l.isVNode(e)?e={message:e}:t=e.callback,new Promise((r,i)=>{const o=Is(e,n??ht._context);Tt.set(o,{options:e,callback:t,resolve:r,reject:i})})}const xs=["alert","confirm","prompt"],Bs={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};xs.forEach(e=>{ht[e]=Rs(e)});function Rs(e){return(n,t,r,i)=>{let o="";return p.isObject$1(t)?(r=t,o=""):p.isUndefined(t)?o="":o=t,ht(Object.assign({title:o,message:n,type:"",...Bs[e]},r,{boxType:e}),i)}}ht.close=()=>{Tt.forEach((e,n)=>{n.doClose()}),Tt.clear()};ht._context=null;const Ve=ht;Ve.install=e=>{Ve._context=e._context,e.config.globalProperties.$msgbox=Ve,e.config.globalProperties.$messageBox=Ve,e.config.globalProperties.$alert=Ve.alert,e.config.globalProperties.$confirm=Ve.confirm,e.config.globalProperties.$prompt=Ve.prompt};const Ui=Ve,Ms=[{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}]}],kt=p.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=p.cloneDeep(this.activeMenuPath),this.activeMenuPath=e)},setActiveMenuOpenPaths(e){this.activeMenuOpenPaths=e},setRawMenus(e){this.rawMenus=e,this.permissionSideMenus=Ms}}}),rt=(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(f=>!(f!=null&&f.id)||typeof(f==null?void 0:f.id)=="string"))!=null&&i.every(f=>typeof f!="object"||f===null))return r;if((o=r==null?void 0:r.filter(f=>!(f!=null&&f.id)||typeof(f==null?void 0:f.id)=="string"))!=null&&o.some(f=>Array.isArray(f)))return r;{let f=[];if(f.push(r==null?void 0:r.find(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number")),Array.isArray(n==null?void 0:n[0])){const h=(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=en(p.cloneDeep(n==null?void 0:n[0])))==null||s.forEach(d=>{f.push(h==null?void 0:h[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const h=(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=en(p.cloneDeep(n)))==null||u.forEach(d=>{f.push(h==null?void 0:h[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return f}}):void 0,Ns=e=>{try{return JSON.parse(e),!0}catch{return!1}},Fr=(e,n)=>fi(e,n),qn=p.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),Os=qn(p.pinia),{multipleTableConst:de}=p.storeToRefs(Os),je=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,f,h,d,v,g,m,y,b,S,x;if(!(s!=null&&s.children)||s.children.length===0)s.prop=o===""?s==null?void 0:s.prop:o+de.value+((h=(c=s==null?void 0:s.prop)==null?void 0:c.split(de.value))==null?void 0:h[((f=(u=s==null?void 0:s.prop)==null?void 0:u.split(de.value))==null?void 0:f.length)-1]),n.push(s.prop);else{let E=o===""?o+((m=(d=s==null?void 0:s.prop)==null?void 0:d.split(de.value))==null?void 0:m[((g=(v=s==null?void 0:s.prop)==null?void 0:v.split(de.value))==null?void 0:g.length)-1]):o+de.value+((x=(y=s==null?void 0:s.prop)==null?void 0:y.split(de.value))==null?void 0:x[((S=(b=s==null?void 0:s.prop)==null?void 0:b.split(de.value))==null?void 0:S.length)-1]);r(s.children,E)}})}))}function r(i,o=""){i==null||i.forEach(a=>{var s,c,u,f,h,d,v,g,m,y,b,S;if(!(a!=null&&a.children)||a.children.length===0)a.prop=o===""?a==null?void 0:a.prop:o+de.value+((f=(s=a==null?void 0:a.prop)==null?void 0:s.split(de.value))==null?void 0:f[((u=(c=a==null?void 0:a.prop)==null?void 0:c.split(de.value))==null?void 0:u.length)-1]),n.push(a.prop);else{let x=o===""?o+((g=(h=a==null?void 0:a.prop)==null?void 0:h.split(de.value))==null?void 0:g[((v=(d=a==null?void 0:a.prop)==null?void 0:d.split(de.value))==null?void 0:v.length)-1]):o+de.value+((S=(m=a==null?void 0:a.prop)==null?void 0:m.split(de.value))==null?void 0:S[((b=(y=a==null?void 0:a.prop)==null?void 0:y.split(de.value))==null?void 0:b.length)-1]);r(a.children,x)}})}return t(e),n},Ps=(e,n,t)=>{var i;let r=(i=p.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(f=>f===n[c]))return u[n[c]]=s,u}))==null?void 0:a.filter(s=>s),o}),r},Vs=(e,n)=>{var a,s;const t=p.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 Ps(i,je(r).slice(0,je(r).length-1),n)},Fs=e=>{let n={};return e==null||e.forEach(t=>{n[t.key]=t.value}),n},Ls=async e=>{var t,r,i,o;let n="";if((r=(t=p.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((a,s)=>{var c,u;s!==((u=(c=p.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 He(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((f,h)=>{if(h===0){let d=f==null?void 0:f.filter(v=>!(v!=null&&v.id));a=n+"/"+(d==null?void 0:d[0])}}))}),await St(a,e)}},Ks=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=p.cloneDeep(n.compData))==null?void 0:o.find(c=>(c==null?void 0:c.key)==="tableIndexColumn"))==null?void 0:a.contents;return(s=p.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(f=>Array.isArray(f))?u==null||u[0].unshift({label:r}):u.unshift({label:r})),t.push({key:"header",contents:u})}}),n.compData=t,n},_s=e=>{var o,a,s,c,u;const n=(o=e.compData)==null?void 0:o.filter(f=>(f==null?void 0:f.key)==="tableContents"||(f==null?void 0:f.key)==="tableIndex"),t=(s=(a=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableIndex"))==null?void 0:a.contents)==null?void 0:s.map(f=>f.label),r=(c=n==null?void 0:n.find(f=>(f==null?void 0:f.key)==="tableContents"))==null?void 0:c.contents;let i=[];return(t==null?void 0:t.length)>0&&(r!=null&&r.every(f=>Array.isArray(f)))?i=t==null?void 0:t.map((f,h)=>r[h]?[f,...r[h]]:[f]):Array.isArray(r==null?void 0:r[0])&&((u=r==null?void 0:r[0])!=null&&u.every(f=>Array.isArray(f)))?i=r==null?void 0:r[0]:Array.isArray(r==null?void 0:r[0])?i=r:i.push(r),i},Hs=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},$s=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},Us=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},zs=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},js=(e,n)=>{let t;function r(i,o,a=1){var c;if(!i||i.length===0)return;const s=(c=p.cloneDeep(o))==null?void 0:c.map(u=>u==null?void 0:u.filter(f=>!Array.isArray(f)));return s!=null&&s.find(u=>Fr(u,i==null?void 0:i.key))?(o==null||o.forEach(u=>{!r(i,u.find(h=>Array.isArray(h)))&&Fr(u.filter(h=>!Array.isArray(h)),i==null?void 0:i.key)&&(t={type:a,contents:u.filter(h=>!Array.isArray(h))})}),!0):!1}return r(e,n,0),t},Lr=(e,n)=>{function t(r,i){return!r||r.length===0||r==null?void 0:r.map((a,s)=>{var u,f;let c=a;return c.unshift((u=i==null?void 0:i[s])==null?void 0:u.label),c.some(h=>Array.isArray(h))&&(c[c.length-1]=t(c.find(h=>Array.isArray(h)),(f=i==null?void 0:i[s])==null?void 0:f.children)),c})}return t(e,n)},qs=e=>{var t,r,i,o,a,s,c,u,f,h,d,v,g,m,y,b,S,x,E,k,w,A,T,N,D;const n=e;if((e==null?void 0:e.comp)==="Table"){if((i=(r=(t=e.compData)==null?void 0:t.find(C=>(C==null?void 0:C.key)==="tableIndex"))==null?void 0:r.contents)!=null&&i.every(C=>!(C!=null&&C.children))||!((o=e.compData)!=null&&o.find(C=>(C==null?void 0:C.key)==="tableIndex")))return((c=(s=(a=n.compData)==null?void 0:a.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:c.length)===1&&((d=(h=(f=(u=n.compData)==null?void 0:u.find(C=>(C==null?void 0:C.key)==="tableContents"))==null?void 0:f.contents)==null?void 0:h[0])!=null&&d.every(C=>Array.isArray(C)))?(n.compData=(v=n.compData)==null?void 0:v.map(C=>{var M;return(C==null?void 0:C.key)==="tableContents"&&(C.contents=(M=C.contents)==null?void 0:M[0]),C}),[n]):[n];{let C=[];const M=n.compData,O=(g=p.cloneDeep(M))==null?void 0:g.find(_=>(_==null?void 0:_.key)==="tableIndexColumn"),Y=(m=p.cloneDeep(M))==null?void 0:m.find(_=>(_==null?void 0:_.key)==="extraButton"),X=(y=p.cloneDeep(M))==null?void 0:y.find(_=>(_==null?void 0:_.key)==="rowButton"),F=zs((S=(b=p.cloneDeep(M))==null?void 0:b.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:S.contents),V=(x=p.cloneDeep(M))==null?void 0:x.find(_=>(_==null?void 0:_.key)==="tableIndex"),$=Us((k=(E=p.cloneDeep(M))==null?void 0:E.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:k.contents),Z=Lr((A=(w=p.cloneDeep(M))==null?void 0:w.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:A.contents,V==null?void 0:V.contents),te=$s(Lr((N=(T=p.cloneDeep(M))==null?void 0:T.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:N.contents,V==null?void 0:V.contents));if(V)return(D=Hs(V.contents))==null||D.forEach((_,B)=>{var L;let P=[];P.push({key:"tableIndex",contents:_}),P.push(O),P.push(Y),P.push(X),P.push({key:"tableContents",contents:$[B]}),P.push({key:"header",contents:F!=null&&F[B]?[F==null?void 0:F[B]]:[F==null?void 0:F[0]]}),C.push({comp:"Table",compData:P,name:"",parentTableContents:((L=js(te[B],Z))==null?void 0:L.contents)??""})}),C}}else return[n]},st=(e,n)=>{let t={};return Array.isArray(e)?e==null||e.forEach((r,i)=>{n!=null&&n[i]&&(t[n[i]]=r)}):[e].forEach((r,i)=>{t[n[i]]=r}),t},Gs=e=>{var t,r;let n="";return(r=(t=p.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((i,o)=>{var a,s;o<((s=(a=p.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s.length)-1&&(n=n===""?n+i:n+"/"+i)}),n},Ws=async e=>{const n=p.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 p.batchAddInsofDataApi({dataList:i})),o})),await Promise.all(t)},pt=p.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}}}),Gn=p.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),Ys=kt(p.pinia),{activeMenuPath:$t}=p.storeToRefs(Ys),zi=p.useLoginState(p.pinia),{structureData:Zs,loginUserInfo:yn}=p.storeToRefs(zi),Js=Gn(p.pinia),{routerPageStructures:Xs}=p.storeToRefs(Js),Gt=pt(p.pinia),Qs=l.ref([{label:"角色名称",value:"",name:"roleName"}]),el=l.ref([{label:"查询"},{label:"重置"}]),Kr=l.reactive({isFilter:!1,filterForm:{}}),tl=l.ref(!1),nl=e=>{Kr.isFilter=!0,Kr.filterForm=e},ji=l.ref([]),In=l.ref([]),qi=l.ref(""),rl=l.computed(()=>{var n,t,r,i,o;const e=(n=Xs.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){qi.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)!=="操作");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 nt.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 f,h;return{...u,isTableColHidden:(f=u==null?void 0:u.prop)==null?void 0:f.includes("授权"),isFormColHidden:(h=u==null?void 0:u.prop)==null?void 0:h.includes("授权")}})}:s});return Zi(a),a}return[]}),il=e=>{Gt.setRefreshCurStructure(!1),er(e.singleContent,e.buttonName,an.value,e==null?void 0:e.selectItems)},et=l.ref({}),Wn=l.ref(),wt=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 zi.setLogRecordAsync({type:t,data:n},$t.value),p.ElMessage.success("保存成功"),Gt.setRefreshCurStructure(!0),o.data.result||((i=o==null?void 0:o.data)==null?void 0:i.code)===200):null}catch(o){p.ElMessage.error(o)}finally{Gt.setCacheUpdatingData(null)}},Gi=(e,n)=>{const t=[];for(const r of e)n!=null&&n.has(r.path)&&t.push(r),r.children&&t.push(...Gi(r.children,n));return t},ol=(e,n)=>{var t,r;try{const i=new Map(e==null?void 0:e.map(s=>[s.path,s.checkedButtons])),o=Gi(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=Wn.value)==null||r.setCheckedKeys(a)}catch{throw new Error("数据显示处理失败")}},al=(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)},Wi=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=Wi(t.children)),t}),Yn=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},Yi=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=Yi(e[t+1]),t+=2):t+=1,n.push(r)}return n},Zn=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=Yi(e==null?void 0:e[t+1]),t+=2):t+=1,n.push(r)}return n},on=(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=on(r.children,i,t)),t.set(i,o),o}),Jn=(e,n)=>e.reduce((t,r)=>{const i=r[n];return t[i]||(t[i]=[]),t[i].push(r),t},{}),Xn=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},Qn=e=>Object.entries(e).map(([t,r])=>({path:t,checkedButtons:r==null?void 0:r.map(i=>i==null?void 0:i.path)})),sl=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,ll=(e,n)=>{const t={},r=Array.isArray(e)?e==null?void 0:e.filter(i=>{var o;return!(sl(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},tt=l.ref(""),Zi=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=ll(r,t==null?void 0:t.contents);tt.value=Yn(i)},ul=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},cl=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(f=>{let h=s.find(d=>d.title===f);h||(h={title:f,path:i.path,children:[]},s.push(h)),s=h.children})});return n},fl=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},Ji=e=>{let n=[];for(const t of e){let r=[t.title];if(t.children&&Array.isArray(t.children)){let i=Ji(t.children);i.length>0&&r.push(i)}n.push(r)}return n},hl=e=>{const n=[];for(const t of e){if(!Array.isArray(t)||t.length!==2)continue;const[r,i]=t,o=Xi(i),a=n.indexOf(r);a===-1?n.push(r,o):n[a+1]=Qi(n[a+1],o)}return n},Xi=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,Xi(i))}}return n},Qi=(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]=Qi(t[o+1],n[r+1]),r+=2}else t.push(i),r+=1}return t},pl=async(e,n)=>{var t;if(et.value=p.cloneDeep(n),Gt.setRefreshCurStructure(!1),(t=it.value)==null||t.splice(0),e==="授权"){if(!tt.value){p.ElMessage.error("请正确定义角色权限");return}const r=ul(et.value[tt.value]);let i;if(r)i=et.value[tt.value];else{const o=Zn(et.value[tt.value]),a=on(o),s=Xn(a),c=Jn(s,"parentPath");i=Qn(c)}if(!i||!Array.isArray(i)){p.ElMessage.error("权限数据处理出错了,请联系管理员");return}qe.title=`【${n.角色名称}】授权`,qe.show=!0,await l.nextTick(),al(lt.value,i),ol(i,lt.value)}},dl=()=>{qe.show=!1},xn=l.ref(),gl=async e=>{const n=await wt(p.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}})},Dt=(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},yl=async(e,n)=>{var o,a;let t=[];Array.isArray(e)?t=p.cloneDeep(e):t=[p.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,f,h,d;return{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=$t.value)!=null&&c.startsWith("/")?(u=$t.value)==null?void 0:u.substring(1):$t.value,tableId:n,createUserId:(f=yn.value)==null?void 0:f.id,createUserOrg:((h=yn.value)==null?void 0:h.dept)||((d=yn.value)==null?void 0:d.部门名称)},value:{tableData:Dt(s,In.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:Dt(s,In.value)}}));r.length>0&&await wt(p.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await wt(p.batchUpdateInsofDataApi,{dataList:i},"编辑"),qe.show=!1)},er=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await yl(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 wt(p.batchDeleteInsofDataApi,{ids:i},"编辑")}},eo=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(eo(t.children)))}),n},vl=()=>{const e=eo(lt.value),n=fl(e),t=cl(n),r=Ji(t),i=hl(r);xn.value={...et.value,[tt.value]:i},l.nextTick(()=>{er(xn.value,"编辑",an.value)})},qe=l.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0}),bl=({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":""},an=l.ref(0),to=async e=>{var r,i,o,a,s;let n;const t=await p.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,an.value=n),n},lt=l.ref([]),ml=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),Sl=(e,n)=>{var t;e.checkedButtons=n?(t=e.renderButtons)==null?void 0:t.map(r=>r.path):[]},it=l.ref([]),El=(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)?it.value.push(n.path):(e==null?void 0:e.length)===0&&(it.value=(i=it.value)==null?void 0:i.filter(o=>o!==n.path))};l.watch(()=>it.value.length,()=>{var e;(e=Wn.value)==null||e.setCheckedKeys([...it.value])});l.watch(()=>qe.show,e=>{e||(lt.value=Wi(lt.value))});const no=l.computed(()=>{var t;const e=(t=p.cloneDeep(Zs.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,f,h,d,v;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(g=>i.test(g==null?void 0:g.key));return o=Array.from(new Set(o==null?void 0:o.flatMap(g=>g.contents.map(m=>m.label)))),{path:(f=(u=r==null?void 0:r.key)==null?void 0:u.pageKey)!=null&&f.startsWith("/")?(d=(h=r==null?void 0:r.key)==null?void 0:h.pageKey)==null?void 0:d.substring(1):(v=r==null?void 0:r.key)==null?void 0:v.pageKey,buttons:o}}),...ro.value]}),ro=l.ref([]),Tl=(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}})},_r=(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[]},io=(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:_r(t,i),checkedButtons:[],children:io(t.children,no.value)}:{...t,renderButtons:_r(t,i),checkedButtons:[]}})},wl={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:ji.value,name:""}]}]},Dl=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:io,addPathToTree:on,authorizeDialog:qe,buttonValue:el,changedRow:xn,clickRow:et,clickRowButton:pl,clickSubmitAuthority:vl,closeAuthorizeDialog:dl,compName:qi,convertArrayToTree:Zn,convertIndexToLabel:Dt,customNodeClass:bl,getActivePageStructureId:to,getAuthorityKey:Zi,getFirstArrayProperty:Yn,getLeafNodesRecursive:Xn,getPageDataAsync:gl,groupByField:Jn,handleAddSysMenusButtons:Tl,handleItemDataChange:il,handleNodeBtnChange:El,handleNodeCheckChange:Sl,handleQueryChange:nl,handleRowAuthorityRender:Qn,handleSubmitAsync:wt,isPageDataExist:tl,menuData:lt,menusButtons:ml,pageData:ji,pageDataFiltered:rl,queryFormData:Qs,structureButtons:no,structureId:an,submitTableAsyncByVerify:er,tempRolePageData:wl,tempSysMenus:ro,treeRef:Wn},Symbol.toStringTag,{value:"Module"}));var Al="0123456789abcdefghijklmnopqrstuvwxyz";function Oe(e){return Al.charAt(e)}function kl(e,n){return e&n}function Vt(e,n){return e|n}function Hr(e,n){return e^n}function $r(e,n){return e&~n}function Cl(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 Il(e){for(var n=0;e!=0;)e&=e-1,++n;return n}var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oo="=";function Wt(e){var n,t,r="";for(n=0;n+3<=e.length;n+=3)t=parseInt(e.substring(n,n+3),16),r+=Xe.charAt(t>>6)+Xe.charAt(t&63);for(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=Xe.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=Xe.charAt(t>>2)+Xe.charAt((t&3)<<4));(r.length&3)>0;)r+=oo;return r}function Ur(e){var n="",t,r=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=oo;++t){var o=Xe.indexOf(e.charAt(t));o<0||(r==0?(n+=Oe(o>>2),i=o&3,r=1):r==1?(n+=Oe(i<<2|o>>4),i=o&15,r=2):r==2?(n+=Oe(i),n+=Oe(o>>2),i=o&3,r=3):(n+=Oe(i<<2|o>>4),n+=Oe(o&15),r=0))}return r==1&&(n+=Oe(i<<2)),n}var Ye,xl={decode:function(e){var n;if(Ye===void 0){var t="0123456789ABCDEF",r=` \f
8
+ \r  \u2028\u2029`;for(Ye={},n=0;n<16;++n)Ye[t.charAt(n)]=n;for(t=t.toLowerCase(),n=10;n<16;++n)Ye[t.charAt(n)]=n;for(n=0;n<r.length;++n)Ye[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=Ye[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}},$e,Bn={decode:function(e){var n;if($e===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
9
+ \r  \u2028\u2029`;for($e=Object.create(null),n=0;n<64;++n)$e[t.charAt(n)]=n;for($e["-"]=62,$e._=63,n=0;n<r.length;++n)$e[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=$e[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=Bn.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 Bn.decode(e)}},Ze=1e13,yt=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<Ze?t=0:(t=0|a/Ze,a-=t*Ze),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+=Ze,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+=(Ze+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*Ze+n[r];return t},e.prototype.simplify=function(){var n=this.buf;return n.length==1?n[0]:this},e}(),ao="…",Bl=/^(\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)?)?$/,Rl=/^(\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 ot(e,n){return e.length>n&&(e=e.substring(0,n)+ao),e}var vn=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?Bl:Rl).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 yt(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),f=c==t-1?i:0,h=7;h>=f;--h)s+=u>>h&1?"1":"0";if(s.length>r)return a+ot(s,r)}return a+s},e.prototype.parseOctetString=function(n,t,r){if(this.isASCII(n,t))return ot(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+=ao),o},e.prototype.parseOID=function(n,t,r){for(var i="",o=new yt,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 yt)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 ot(i,r);o=new yt,a=0}}return a>0&&(i+=".incomplete"),i},e}(),Ml=function(){function e(n,t,r,i,o){if(!(i instanceof zr))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 ot(this.stream.parseStringUTF(t,t+r),n);case 18:case 19:case 20:case 21:case 22:case 26:return ot(this.stream.parseStringISO(t,t+r),n);case 30:return ot(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 vn?t=n:t=new vn(n,0);var r=new vn(t),i=new zr(t),o=e.decodeLength(t),a=t.pos,s=a-r.pos,c=null,u=function(){var h=[];if(o!==null){for(var d=a+o;t.pos<d;)h[h.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 v=e.decode(t);if(v.tag.isEOC())break;h[h.length]=v}o=a-t.pos}catch(g){throw new Error("Exception while decoding undefined length content: "+g)}return h};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 f=0;f<c.length;++f)if(c[f].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}(),zr=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 yt;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}(),_e,Nl=0xdeadbeefcafe,jr=(Nl&16777215)==15715070,be=[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],Ol=(1<<26)/be[be.length-1],J=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=Oe(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+=Oe(i));return o?a:"0"},e.prototype.negate=function(){var n=ee();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)+Ft(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(n){var t=ee();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 qr(t):r=new Gr(t),this.exp(n,r)},e.prototype.clone=function(){var n=ee();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=ee();return this.bitwiseTo(n,kl,t),t},e.prototype.or=function(n){var t=ee();return this.bitwiseTo(n,Vt,t),t},e.prototype.xor=function(n){var t=ee();return this.bitwiseTo(n,Hr,t),t},e.prototype.andNot=function(n){var t=ee();return this.bitwiseTo(n,$r,t),t},e.prototype.not=function(){for(var n=ee(),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=ee();return n<0?this.rShiftTo(-n,t):this.lShiftTo(n,t),t},e.prototype.shiftRight=function(n){var t=ee();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+Cl(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+=Il(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,Vt)},e.prototype.clearBit=function(n){return this.changeBit(n,$r)},e.prototype.flipBit=function(n){return this.changeBit(n,Hr)},e.prototype.add=function(n){var t=ee();return this.addTo(n,t),t},e.prototype.subtract=function(n){var t=ee();return this.subTo(n,t),t},e.prototype.multiply=function(n){var t=ee();return this.multiplyTo(n,t),t},e.prototype.divide=function(n){var t=ee();return this.divRemTo(n,t,null),t},e.prototype.remainder=function(n){var t=ee();return this.divRemTo(n,null,t),t},e.prototype.divideAndRemainder=function(n){var t=ee(),r=ee();return this.divRemTo(n,t,r),[t,r]},e.prototype.modPow=function(n,t){var r=n.bitLength(),i,o=Fe(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 qr(t):t.isEven()?a=new Vl(t):a=new Gr(t);var s=[],c=3,u=i-1,f=(1<<i)-1;if(s[1]=a.convert(this),i>1){var h=ee();for(a.sqrTo(s[1],h);c<=f;)s[c]=ee(),a.mulTo(h,s[c-2],s[c]),c+=2}var d=n.t-1,v,g=!0,m=ee(),y;for(r=Ft(n[d])-1;d>=0;){for(r>=u?v=n[d]>>r-u&f:(v=(n[d]&(1<<r+1)-1)<<u-r,d>0&&(v|=n[d-1]>>this.DB+r-u)),c=i;(v&1)==0;)v>>=1,--c;if((r-=c)<0&&(r+=this.DB,--d),g)s[v].copyTo(o),g=!1;else{for(;c>1;)a.sqrTo(o,m),a.sqrTo(m,o),c-=2;c>0?a.sqrTo(o,m):(y=o,o=m,m=y),a.mulTo(m,s[v],o)}for(;d>=0&&(n[d]&1<<r)==0;)a.sqrTo(o,m),y=o,o=m,m=y,--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=Fe(1),a=Fe(0),s=Fe(0),c=Fe(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 Pl)},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]<=be[be.length-1]){for(t=0;t<be.length;++t)if(r[0]==be[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<be.length;){for(var i=be[t],o=t+1;o<be.length&&i<Ol;)i*=be[o++];for(i=r.modInt(i);t<o;)if(i%be[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:Yr(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=ee());var a=ee(),s=this.s,c=n.s,u=this.DB-Ft(i[i.t-1]);u>0?(i.lShiftTo(u,a),o.lShiftTo(u,r)):(i.copyTo(a),o.copyTo(r));var f=a.t,h=a[f-1];if(h!=0){var d=h*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),v=this.FV/d,g=(1<<this.F1)/d,m=1<<this.F2,y=r.t,b=y-f,S=t??ee();for(a.dlShiftTo(b,S),r.compareTo(S)>=0&&(r[r.t++]=1,r.subTo(S,r)),e.ONE.dlShiftTo(f,S),S.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--b>=0;){var x=r[--y]==h?this.DM:Math.floor(r[y]*v+(r[y-1]+m)*g);if((r[y]+=a.am(0,x,r,b,0,f))<x)for(a.dlShiftTo(b,S),r.subTo(S,r);r[y]<--x;)r.subTo(S,r)}t!=null&&(r.drShiftTo(f,t),s!=c&&e.ZERO.subTo(t,t)),r.t=f,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=ee(),i=ee(),o=t.convert(this),a=Ft(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=Fe(r),o=ee(),a=ee(),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=Yr(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),Vt,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>be.length&&(n=be.length);for(var o=ee(),a=0;a<n;++a){o.fromInt(be[Math.floor(Math.random()*be.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=ee();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),Vt,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}(),Pl=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}(),qr=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}(),Gr=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=ee();return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(J.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(n){var t=ee();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}(),Vl=function(){function e(n){this.m=n,this.r2=ee(),this.q3=ee(),J.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=ee();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 ee(){return new J(null)}function se(e,n){return new J(e,n)}var Wr=typeof navigator<"u";Wr&&jr&&navigator.appName=="Microsoft Internet Explorer"?(J.prototype.am=function(n,t,r,i,o,a){for(var s=t&32767,c=t>>15;--a>=0;){var u=this[n]&32767,f=this[n++]>>15,h=c*u+f*s;u=s*u+((h&32767)<<15)+r[i]+(o&1073741823),o=(u>>>30)+(h>>>15)+c*f+(o>>>30),r[i++]=u&1073741823}return o},_e=30):Wr&&jr&&navigator.appName!="Netscape"?(J.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},_e=26):(J.prototype.am=function(n,t,r,i,o,a){for(var s=t&16383,c=t>>14;--a>=0;){var u=this[n]&16383,f=this[n++]>>14,h=c*u+f*s;u=s*u+((h&16383)<<14)+r[i]+o,o=(u>>28)+(h>>14)+c*f,r[i++]=u&268435455}return o},_e=28);J.prototype.DB=_e;J.prototype.DM=(1<<_e)-1;J.prototype.DV=1<<_e;var tr=52;J.prototype.FV=Math.pow(2,tr);J.prototype.F1=tr-_e;J.prototype.F2=2*_e-tr;var sn=[],dt,Ce;dt=48;for(Ce=0;Ce<=9;++Ce)sn[dt++]=Ce;dt=97;for(Ce=10;Ce<36;++Ce)sn[dt++]=Ce;dt=65;for(Ce=10;Ce<36;++Ce)sn[dt++]=Ce;function Yr(e,n){var t=sn[e.charCodeAt(n)];return t??-1}function Fe(e){var n=ee();return n.fromInt(e),n}function Ft(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}J.ZERO=Fe(0);J.ONE=Fe(1);var Fl=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 Ll(){return new Fl}var so=256,Lt,Ke=null,xe;if(Ke==null){Ke=[],xe=0;var Kt=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var bn=new Uint32Array(256);for(window.crypto.getRandomValues(bn),Kt=0;Kt<bn.length;++Kt)Ke[xe++]=bn[Kt]&255}var _t=0,Ht=function(e){if(_t=_t||0,_t>=256||xe>=so){window.removeEventListener?window.removeEventListener("mousemove",Ht,!1):window.detachEvent&&window.detachEvent("onmousemove",Ht);return}try{var n=e.x+e.y;Ke[xe++]=n&255,_t+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Ht,!1):window.attachEvent&&window.attachEvent("onmousemove",Ht))}function Kl(){if(Lt==null){for(Lt=Ll();xe<so;){var e=Math.floor(65536*Math.random());Ke[xe++]=e&255}for(Lt.init(Ke),xe=0;xe<Ke.length;++xe)Ke[xe]=0;xe=0}return Lt.next()}var Rn=function(){function e(){}return e.prototype.nextBytes=function(n){for(var t=0;t<n.length;++t)n[t]=Kl()},e}();function _l(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 se(o,16)}function Hl(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 Rn,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 J(t)}var $l=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=se(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=Hl(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=se(n,16),this.e=parseInt(t,16),this.d=se(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=se(n,16),this.e=parseInt(t,16),this.d=se(r,16),this.p=se(i,16),this.q=se(o,16),this.dmp1=se(a,16),this.dmq1=se(s,16),this.coeff=se(c,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(n,t){var r=new Rn,i=n>>1;this.e=parseInt(t,16);for(var o=new J(t,16);;){for(;this.p=new J(n-i,1,r),!(this.p.subtract(J.ONE).gcd(o).compareTo(J.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new J(i,1,r),!(this.q.subtract(J.ONE).gcd(o).compareTo(J.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(J.ONE),c=this.q.subtract(J.ONE),u=s.multiply(c);if(u.gcd(o).compareTo(J.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=se(n,16),r=this.doPrivate(t);return r==null?null:Ul(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(n,t,r){var i=new Rn,o=n>>1;this.e=parseInt(t,16);var a=new J(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 v=s.p.subtract(J.ONE),g=s.q.subtract(J.ONE),m=v.multiply(g);m.gcd(a).compareTo(J.ONE)==0?(s.n=s.p.multiply(s.q),s.d=a.modInverse(m),s.dmp1=s.d.mod(v),s.dmq1=s.d.mod(g),s.coeff=s.q.modInverse(s.p),setTimeout(function(){r()},0)):setTimeout(c,0)},f=function(){s.q=ee(),s.q.fromNumberAsync(o,1,i,function(){s.q.subtract(J.ONE).gcda(a,function(d){d.compareTo(J.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(f,0)})})},h=function(){s.p=ee(),s.p.fromNumberAsync(n-o,1,i,function(){s.p.subtract(J.ONE).gcda(a,function(d){d.compareTo(J.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(f,0):setTimeout(h,0)})})};setTimeout(h,0)};setTimeout(c,0)},e.prototype.sign=function(n,t,r){var i=zl(r),o=i+t(n).toString(),a=_l(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=se(t,16),o=this.doPublic(i);if(o==null)return null;var a=o.toString(16).replace(/^1f+00/,""),s=jl(a);return s==r(n).toString()},e}();function Ul(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 Ut={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function zl(e){return Ut[e]||""}function jl(e){for(var n in Ut)if(Ut.hasOwnProperty(n)){var t=Ut[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 ue={};ue.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],f=c[u];typeof f=="function"&&f!=Object.prototype[u]&&(s[u]=f)}})}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 I={};(typeof I.asn1>"u"||!I.asn1)&&(I.asn1={});I.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 J(i,16),s=a.xor(e).add(J.ONE);n=s.toString(16).replace(/^-/,"")}return n},this.getPEMStringFromHex=function(e,n){return hextopem(e,n)},this.newObject=function(e){var n=I,t=n.asn1,r=t.DERBoolean,i=t.DERInteger,o=t.DERBitString,a=t.DEROctetString,s=t.DERNull,c=t.DERObjectIdentifier,u=t.DEREnumerated,f=t.DERUTF8String,h=t.DERNumericString,d=t.DERPrintableString,v=t.DERTeletexString,g=t.DERIA5String,m=t.DERUTCTime,y=t.DERGeneralizedTime,b=t.DERSequence,S=t.DERSet,x=t.DERTaggedObject,E=t.ASN1Util.newObject,k=Object.keys(e);if(k.length!=1)throw"key of param shall be only one.";var w=k[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+w+":")==-1)throw"undefined key: "+w;if(w=="bool")return new r(e[w]);if(w=="int")return new i(e[w]);if(w=="bitstr")return new o(e[w]);if(w=="octstr")return new a(e[w]);if(w=="null")return new s(e[w]);if(w=="oid")return new c(e[w]);if(w=="enum")return new u(e[w]);if(w=="utf8str")return new f(e[w]);if(w=="numstr")return new h(e[w]);if(w=="prnstr")return new d(e[w]);if(w=="telstr")return new v(e[w]);if(w=="ia5str")return new g(e[w]);if(w=="utctime")return new m(e[w]);if(w=="gentime")return new y(e[w]);if(w=="seq"){for(var A=e[w],T=[],N=0;N<A.length;N++){var D=E(A[N]);T.push(D)}return new b({array:T})}if(w=="set"){for(var A=e[w],T=[],N=0;N<A.length;N++){var D=E(A[N]);T.push(D)}return new S({array:T})}if(w=="tag"){var C=e[w];if(Object.prototype.toString.call(C)==="[object Array]"&&C.length==3){var M=E(C[2]);return new x({tag:C[0],explicit:C[1],obj:M})}else{var O={};if(C.explicit!==void 0&&(O.explicit=C.explicit),C.tag!==void 0&&(O.tag=C.tag),C.obj===void 0)throw"obj shall be specified for 'tag'.";return O.obj=E(C.obj),new x(O)}}},this.jsonToASN1HEX=function(e){var n=this.newObject(e);return n.getEncodedHex()}};I.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 J(o,2);i=i+"."+u.toString(10),o=""}}return i};I.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 J(s,10),f=u.toString(2),h=7-f.length%7;h==7&&(h=0);for(var d="",v=0;v<h;v++)d+="0";f=d+f;for(var v=0;v<f.length-1;v+=7){var g=f.substr(v,7);v!=f.length-7&&(g="1"+g),c+=n(parseInt(g,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};I.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""}};I.asn1.DERAbstractString=function(e){I.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))};ue.lang.extend(I.asn1.DERAbstractString,I.asn1.ASN1Object);I.asn1.DERAbstractTime=function(e){I.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),f=i(String(o.getMinutes()),2),h=i(String(o.getSeconds()),2),d=a+s+c+u+f+h;if(r===!0){var v=o.getMilliseconds();if(v!=0){var g=i(String(v),3);g=g.replace(/[0]+$/,""),d=d+"."+g}}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}};ue.lang.extend(I.asn1.DERAbstractTime,I.asn1.ASN1Object);I.asn1.DERAbstractStructured=function(e){I.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)};ue.lang.extend(I.asn1.DERAbstractStructured,I.asn1.ASN1Object);I.asn1.DERBoolean=function(){I.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};ue.lang.extend(I.asn1.DERBoolean,I.asn1.ASN1Object);I.asn1.DERInteger=function(e){I.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=I.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new J(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))};ue.lang.extend(I.asn1.DERInteger,I.asn1.ASN1Object);I.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=I.asn1.ASN1Util.newObject(e.obj);e.hex="00"+n.getEncodedHex()}I.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))};ue.lang.extend(I.asn1.DERBitString,I.asn1.ASN1Object);I.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=I.asn1.ASN1Util.newObject(e.obj);e.hex=n.getEncodedHex()}I.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};ue.lang.extend(I.asn1.DEROctetString,I.asn1.DERAbstractString);I.asn1.DERNull=function(){I.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};ue.lang.extend(I.asn1.DERNull,I.asn1.ASN1Object);I.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 J(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 f=a.substr(u,7);u!=a.length-7&&(f="1"+f),i+=n(parseInt(f,2))}return i};I.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=I.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))};ue.lang.extend(I.asn1.DERObjectIdentifier,I.asn1.ASN1Object);I.asn1.DEREnumerated=function(e){I.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=I.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new J(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))};ue.lang.extend(I.asn1.DEREnumerated,I.asn1.ASN1Object);I.asn1.DERUTF8String=function(e){I.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};ue.lang.extend(I.asn1.DERUTF8String,I.asn1.DERAbstractString);I.asn1.DERNumericString=function(e){I.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};ue.lang.extend(I.asn1.DERNumericString,I.asn1.DERAbstractString);I.asn1.DERPrintableString=function(e){I.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};ue.lang.extend(I.asn1.DERPrintableString,I.asn1.DERAbstractString);I.asn1.DERTeletexString=function(e){I.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};ue.lang.extend(I.asn1.DERTeletexString,I.asn1.DERAbstractString);I.asn1.DERIA5String=function(e){I.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};ue.lang.extend(I.asn1.DERIA5String,I.asn1.DERAbstractString);I.asn1.DERUTCTime=function(e){I.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))};ue.lang.extend(I.asn1.DERUTCTime,I.asn1.DERAbstractTime);I.asn1.DERGeneralizedTime=function(e){I.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))};ue.lang.extend(I.asn1.DERGeneralizedTime,I.asn1.DERAbstractTime);I.asn1.DERSequence=function(e){I.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}};ue.lang.extend(I.asn1.DERSequence,I.asn1.DERAbstractStructured);I.asn1.DERSet=function(e){I.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)};ue.lang.extend(I.asn1.DERSet,I.asn1.DERAbstractStructured);I.asn1.DERTaggedObject=function(e){I.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)))};ue.lang.extend(I.asn1.DERTaggedObject,I.asn1.ASN1Object);var ql=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)}}(),Zr=function(e){ql(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)?xl.decode(t):Bn.unarmor(t),s=Ml.decode(a);if(s.sub.length===3&&(s=s.sub[2].sub[0]),s.sub.length===9){r=s.sub[1].getHexStringValue(),this.n=se(r,16),i=s.sub[2].getHexStringValue(),this.e=parseInt(i,16);var c=s.sub[3].getHexStringValue();this.d=se(c,16);var u=s.sub[4].getHexStringValue();this.p=se(u,16);var f=s.sub[5].getHexStringValue();this.q=se(f,16);var h=s.sub[6].getHexStringValue();this.dmp1=se(h,16);var d=s.sub[7].getHexStringValue();this.dmq1=se(d,16);var v=s.sub[8].getHexStringValue();this.coeff=se(v,16)}else if(s.sub.length===2)if(s.sub[0].sub){var g=s.sub[1],m=g.sub[0];r=m.sub[0].getHexStringValue(),this.n=se(r,16),i=m.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=s.sub[0].getHexStringValue(),this.n=se(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 I.asn1.DERInteger({int:0}),new I.asn1.DERInteger({bigint:this.n}),new I.asn1.DERInteger({int:this.e}),new I.asn1.DERInteger({bigint:this.d}),new I.asn1.DERInteger({bigint:this.p}),new I.asn1.DERInteger({bigint:this.q}),new I.asn1.DERInteger({bigint:this.dmp1}),new I.asn1.DERInteger({bigint:this.dmq1}),new I.asn1.DERInteger({bigint:this.coeff})]},r=new I.asn1.DERSequence(t);return r.getEncodedHex()},n.prototype.getPrivateBaseKeyB64=function(){return Wt(this.getPrivateBaseKey())},n.prototype.getPublicBaseKey=function(){var t=new I.asn1.DERSequence({array:[new I.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new I.asn1.DERNull]}),r=new I.asn1.DERSequence({array:[new I.asn1.DERInteger({bigint:this.n}),new I.asn1.DERInteger({int:this.e})]}),i=new I.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),o=new I.asn1.DERSequence({array:[t,i]});return o.getEncodedHex()},n.prototype.getPublicBaseKeyB64=function(){return Wt(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}($l),mn,Gl=typeof process<"u"?(mn=process.env)===null||mn===void 0?void 0:mn.npm_package_version:void 0,ln=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 Zr(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(Ur(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return Wt(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,r){try{return Wt(this.getKey().sign(n,t,r))}catch{return!1}},e.prototype.verify=function(n,t,r){try{return this.getKey().verify(n,Ur(t),r)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new Zr,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=Gl,e}();function Wl(){const e=new ln({default_key_size:"2048"});return{publicKey:e.getPublicKey(),privateKey:e.getPrivateKey()}}function vt(e,n){const t=new ln;return t.setPublicKey(n),t.encrypt(e)||""}function nr(e,n){const t=new ln;return t.setPrivateKey(n),t.decrypt(e)||""}function Jr(){return typeof new ln().encrypt=="function"}const lo=p.useLoginState(p.pinia),{superAdminInfo:Yl,cryptoInfo:me,loginUserInfo:Sn}=p.storeToRefs(lo),Zl=kt(p.pinia),{activeMenuPath:mt}=p.storeToRefs(Zl),Mn=pt(p.pinia),ut="123456",Jl=Gn(p.pinia),{routerPageStructures:Xl}=p.storeToRefs(Jl),rr=l.ref(0),Ql=l.ref([{label:"用户名称",value:"",name:"userName"}]),nt=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),eu=e=>{console.log("handleQueryChange",e)},Yt=l.ref([]),uo=l.ref(""),Zt=l.computed(()=>{var n,t,r,i,o;const e=(n=Xl.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?(uo.value=e.name,Yt.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 f,h,d,v;return{...u,isTableColHidden:((f=u==null?void 0:u.prop)==null?void 0:f.includes("头像"))||((h=u==null?void 0:u.prop)==null?void 0:h.includes("签名")),isFormColHidden:((d=u==null?void 0:u.prop)==null?void 0:d.includes("头像"))||((v=u==null?void 0:u.prop)==null?void 0:v.includes("签名"))}})}:s})):[]}),tu=e=>{Mn.setRefreshCurStructure(!1),un(e.singleContent,e.buttonName,rr.value,e==null?void 0:e.selectItems)},Nn=l.ref(),nu=e=>{console.log("onDoubleClick",e)},ru=(e,n)=>{e==="重置密码"&&Ui.confirm(`该操作将会重置【${(n==null?void 0:n.account)||(n==null?void 0:n.账号)}】的密码为【${ut}】,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{Nn.value={...n,password:ut},un(Nn.value,e,rr.value)}).catch(()=>{p.ElMessage.info("取消重置")})},iu=()=>{Jt(mt.value).then(e=>{var t;const n=Array.isArray(e)&&(e==null?void 0:e.filter(r=>(r==null?void 0:r.account)!==Yl.value.account));Zt.value=(t=Zt.value)==null?void 0:t.map(r=>r.key==="tableContents"?{...r,contents:n==null?void 0:n.map(i=>{var o;return{...i,password:nr(i==null?void 0:i.password,(o=me==null?void 0:me.value)==null?void 0:o.privateKey)}})}:r)})},ct=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 lo.setLogRecordAsync({type:t,data:n},mt.value),p.ElMessage.success("保存成功"),Mn.setRefreshCurStructure(!0),o.data.result||((i=o==null?void 0:o.data)==null?void 0:i.code)===200):null}catch(o){p.ElMessage.error(o)}finally{Mn.setCacheUpdatingData(null)}},ou=async(e,n)=>{var o,a;let t=[];Array.isArray(e)?t=p.cloneDeep(e):t=[p.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,f,h,d,v,g,m;const c=Dt(s,Yt.value);return Jr()&&c&&(!c.password&&nt.value?c.password=vt(ut,(u=me==null?void 0:me.value)==null?void 0:u.publicKey):c.password&&nt.value&&(c.password=vt(c==null?void 0:c.password,(f=me==null?void 0:me.value)==null?void 0:f.publicKey))),{key:{type:"data",layer:s==null?void 0:s.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(h=mt.value)!=null&&h.startsWith("/")?(d=mt.value)==null?void 0:d.substring(1):mt.value,tableId:n,createUserId:(v=Sn.value)==null?void 0:v.id,createUserOrg:((g=Sn.value)==null?void 0:g.dept)||((m=Sn.value)==null?void 0:m.部门名称)},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,f;const c=Dt(s,Yt.value);return Jr()&&c&&(!c.password&&nt.value?c.password=vt(ut,(u=me==null?void 0:me.value)==null?void 0:u.publicKey):c.password&&nt.value&&(c.password=vt(c==null?void 0:c.password,(f=me==null?void 0:me.value)==null?void 0:f.publicKey))),{id:s==null?void 0:s.id,value:{tableData:c}}});r.length>0&&await ct(p.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await ct(p.batchUpdateInsofDataApi,{dataList:i},"编辑"),qe.show=!1)},un=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await ou(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 ct(p.batchDeleteInsofDataApi,{ids:i},"编辑")}},Jt=async e=>{const n=await ct(p.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}})},au={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:Zt.value,name:""}]}]},su=Object.freeze(Object.defineProperty({__proto__:null,changedRow:Nn,clickRowButton:ru,columns:Yt,compName:uo,getPageDataAsync:Jt,handleItemDataChange:tu,handleQueryChange:eu,handleSubmitAsync:ct,loginUserIsSuper:nt,onDoubleClick:nu,pageData:Zt,queryFormData:Ql,refreshUserTableData:iu,resetPassword:ut,structureId:rr,submitTableAsyncByVerify:un,tempUserPageData:au},Symbol.toStringTag,{value:"Module"})),Ct=p.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),lu=pt(p.pinia),{routeToChildPath:Xr}=p.storeToRefs(lu),uu=p.useLoginState(p.pinia),{loginUserInfo:Xt,cryptoInfo:En}=p.storeToRefs(uu),cu=Ct(p.pinia),{originalPath:Qr}=p.storeToRefs(cu),fu=e=>{var n,t,r;return((t=(n=Xt.value)==null?void 0:n.layer)==null?void 0:t.toUpperCase())==="SUPERADMIN"?!0:((r=Xt.value)==null?void 0:r.account)===(e==null?void 0:e.account)},hu=async(e,n,t)=>{const r=Jt("/系统管理/角色管理"),i=Jt("/系统管理/部门管理");return await Promise.all([r,i]).then(a=>{var u,f;const s=(u=a==null?void 0:a[0])==null?void 0:u.map(h=>({label:h==null?void 0:h.roleName,value:h==null?void 0:h.roleName})),c=(f=a==null?void 0:a[1])==null?void 0:f.map(h=>({label:h==null?void 0:h.deptName,value:h==null?void 0:h.deptName}));return e==null?void 0:e.map(h=>{var d;return{...h,compData:(d=h==null?void 0:h.compData)==null?void 0:d.map(v=>{var g,m;return(v==null?void 0:v.key)==="header"?{...v,contents:(g=v==null?void 0:v.contents)==null?void 0:g.map(y=>y.prop==="userDept"?{...y,options:c}:y.prop==="userRoles"?{...y,options:s}:y)}:(v==null?void 0:v.key)==="tableContents"?{...v,contents:(m=v==null?void 0:v.contents)==null?void 0:m.map(y=>{var b;return{...y,password:fu(y)?nr(y==null?void 0:y.password,(b=En==null?void 0:En.value)==null?void 0:b.privateKey):y==null?void 0:y.password}})}:v})}})})},pu=async(e,n)=>{const t=sessionStorage.getItem("authority"),r=JSON.parse(t||"");if(Array.isArray(r)){let i;Xr.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(Xr.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 f;return(u==null?void 0:u.key)==="rowButton"||(u==null?void 0:u.key)==="extraButton"?{...u,contents:(f=u==null?void 0:u.contents)==null?void 0:f.filter(h=>o==null?void 0:o.includes(h==null?void 0:h.label))}:u})}})}else return typeof r=="string"&&(r==null?void 0:r.toUpperCase())==="SUPERADMIN"?e==="/系统管理/用户管理"?await hu(n):n:[]},du=(e,n)=>{var o,a,s,c;const t=(a=(o=n["系统管理/角色管理"])==null?void 0:o.filter(u=>{var f;return((f=u==null?void 0:u.key)==null?void 0:f.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 zt=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(zt||{});const co=(e,n,t)=>{var a,s,c,u;if(((c=(s=(a=Xt.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(f=>{var h;return(f==null?void 0:f.id)===((h=Xt.value)==null?void 0:h.id)}),i=du(r,t);if(!i)return e;switch(zt==null?void 0:zt[i]){case 0:return e;case 1:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([h,d])=>{var m,y,b,S,x,E,k,w,A;const v=d==null?void 0:d[1],g=h[(h==null?void 0:h.length)-1]===Qr.value;return((y=(m=v==null?void 0:v.key)==null?void 0:m.createUserLayer)==null?void 0:y.toUpperCase())==="SUPERADMIN"||((b=v==null?void 0:v.key)==null?void 0:b.createUserOrg)===((x=(S=r==null?void 0:r.value)==null?void 0:S.tableData)==null?void 0:x.部门名称)||((E=v==null?void 0:v.key)==null?void 0:E.createUserOrg)===((w=(k=r==null?void 0:r.value)==null?void 0:k.tableData)==null?void 0:w.部门名称)&&((A=v==null?void 0:v.key)==null?void 0:A.createUserId)===(r==null?void 0:r.id)||g})):e==null?void 0:e.filter(f=>{var h,d,v,g,m,y,b,S,x;return((d=(h=f==null?void 0:f.key)==null?void 0:h.createUserLayer)==null?void 0:d.toUpperCase())==="SUPERADMIN"||((v=f==null?void 0:f.key)==null?void 0:v.createUserOrg)===((m=(g=r==null?void 0:r.value)==null?void 0:g.tableData)==null?void 0:m.部门名称)||((y=f==null?void 0:f.key)==null?void 0:y.createUserOrg)===((S=(b=r==null?void 0:r.value)==null?void 0:b.tableData)==null?void 0:S.部门名称)&&((x=f==null?void 0:f.key)==null?void 0:x.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(([h,d])=>{var m;const v=d==null?void 0:d[1],g=h[(h==null?void 0:h.length)-1]===Qr.value;return((m=v==null?void 0:v.key)==null?void 0:m.createUserId)===(r==null?void 0:r.id)||g})):e==null?void 0:e.filter(f=>{var h;return((h=f==null?void 0:f.key)==null?void 0:h.createUserId)===(r==null?void 0:r.id)})}},On=kt(p.pinia),{activeMenuPath:gu}=p.storeToRefs(On),ft=pt(p.pinia),yu=Ct(p.pinia),{originalPath:fo}=p.storeToRefs(yu),vu=async(e,n,t,r)=>{var g,m,y,b,S,x,E,k,w,A,T,N,D,C,M,O,Y,X,F,V,$,Z,te,_,B,P,L,z,Q,K,U,ae,j,ce,q,Ee,fe;const i=(m=(g=e==null?void 0:e.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:g.contents)==null?void 0:m.find(ne=>ne==null?void 0:ne.columnPath);let o=(w=(k=(E=(x=(y=p.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:y.split("["))==null?void 0:x[((S=(b=i==null?void 0:i.columnPath)==null?void 0:b.split("["))==null?void 0:S.length)-1])==null?void 0:E.split("]"))==null?void 0:k[0])==null?void 0:w.replaceAll("'",""),a=(T=(A=p.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:A.split("['"+o+"']"))==null?void 0:T[0],s="",c="",u="";if(a.includes("[")){let ne=(M=(C=(D=(N=a==null?void 0:a.split("["))==null?void 0:N[1])==null?void 0:D.split("]"))==null?void 0:C[0])==null?void 0:M.split("/");c=a,s=(X=(Y=(O=a==null?void 0:a.split("["))==null?void 0:O[1])==null?void 0:Y.split("]"))==null?void 0:X[0];let re="";t==null||t.forEach(le=>{var ye,Ae,ke,Be,W;((Ae=(ye=le==null?void 0:le.value)==null?void 0:ye.pageData)==null?void 0:Ae.name)===(ne==null?void 0:ne[0])&&((W=(Be=(ke=le==null?void 0:le.value)==null?void 0:ke.pageData)==null?void 0:Be.compData)==null||W.forEach(ie=>{var R;(ie==null?void 0:ie.key)==="formContent"&&((R=ie==null?void 0:ie.contents)==null||R.forEach(G=>{var ve;if((G==null?void 0:G.prop)===(ne==null?void 0:ne[1])){let Re=mo((ve=p.cloneDeep(G))==null?void 0:ve.optionUrl,r);re=(G==null?void 0:G.value)||Re||""}}))}))}),u=re,a=((F=a==null?void 0:a.split("["))==null?void 0:F[0])+re}let f=[];const h=await p.getInsofDataApi({key:{pageKey:a,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),d=await p.getInsofDataApi({key:{pageKey:gu.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}}),v=[];if(($=(V=d==null?void 0:d.data)==null?void 0:V.result)==null||$.forEach(ne=>{v.push([{id:ne==null?void 0:ne.id},ne.value.tableData])}),Array.isArray((Z=h==null?void 0:h.data)==null?void 0:Z.result)&&((_=(te=h==null?void 0:h.data)==null?void 0:te.result)==null?void 0:_.length)>0){let ne;(P=(B=h==null?void 0:h.data)==null?void 0:B.result)!=null&&P.find(re=>{var le,ye;return((ye=(le=re==null?void 0:re.value)==null?void 0:le.pageData)==null?void 0:ye.name)===o})&&(ne=await((z=(L=h==null?void 0:h.data)==null?void 0:L.result)==null?void 0:z.map(async re=>{var le,ye,Ae,ke,Be,W,ie,R,G,ve,Re,he,or,ar,sr,lr,ur,cr,fr,hr,pr,dr;if(((ye=(le=re==null?void 0:re.value)==null?void 0:le.pageData)==null?void 0:ye.name)===o){f=p.cloneDeep((ke=(Ae=re==null?void 0:re.value)==null?void 0:Ae.pageData)==null?void 0:ke.compData);const We=await p.getInsofDataApi({key:{pageKey:a,systemKey:sessionStorage.getItem("systemKey"),tableId:re==null?void 0:re.id,type:"data"}});let It;if(((W=(Be=We==null?void 0:We.data)==null?void 0:Be.result)==null?void 0:W.length)>0)It=(R=(ie=We==null?void 0:We.data)==null?void 0:ie.result)==null?void 0:R.map(H=>{var gr;let oe=[];return oe.push({id:H==null?void 0:H.id}),oe.push((gr=H==null?void 0:H.value)==null?void 0:gr.tableData),oe}),f.push({key:"tableContents",contents:rt(It,(he=(Re=(ve=(G=re==null?void 0:re.value)==null?void 0:G.pageData)==null?void 0:ve.compData)==null?void 0:Re.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:he.contents)}),f.push({key:"contentTableId",contents:re==null?void 0:re.id});else{let H=await He(a,sessionStorage.getItem("systemKey"),"");f=(ar=(or=H==null?void 0:H.find(oe=>(oe==null?void 0:oe.name)===o))==null?void 0:or.compData)==null?void 0:ar.filter(oe=>(oe==null?void 0:oe.key)!=="tableContents"),H=(ur=(lr=(sr=H==null?void 0:H.find(oe=>(oe==null?void 0:oe.name)===o))==null?void 0:sr.compData)==null?void 0:lr.find(oe=>(oe==null?void 0:oe.key)==="tableContents"))==null?void 0:ur.contents,It=H,f.push({key:"tableContents",contents:rt(It,(hr=(fr=(cr=H==null?void 0:H.find(oe=>(oe==null?void 0:oe.name)===o))==null?void 0:cr.compData)==null?void 0:fr.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:hr.contents)}),f.push({key:"contentTableId",contents:(H==null?void 0:H.length)!==0?(dr=(pr=H==null?void 0:H.find(oe=>(oe==null?void 0:oe.name)===o))==null?void 0:pr.compData)==null?void 0:dr.id:re==null?void 0:re.id})}s!==""&&(f!=null&&f.find(H=>(H==null?void 0:H.key)==="pageColumn")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="pageColumn")),f.push({key:"pageColumn",contents:c}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="columnPath")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="columnPath")),f.push({key:"columnPath",contents:s}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="columnUsingPath")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="columnUsingPath")),f.push({key:"columnUsingPath",contents:u}),f!=null&&f.find(H=>(H==null?void 0:H.key)==="pageGroup")&&(f=f==null?void 0:f.filter(H=>(H==null?void 0:H.key)!=="pageGroup")),f.push({key:"pageGroup",contents:o}))}})),await Promise.all(ne))}else{let ne="",re="";(Q=a==null?void 0:a.split("/"))==null||Q.forEach((W,ie)=>{var R;ie<((R=a==null?void 0:a.split("/"))==null?void 0:R.length)-1?ne=ne===""?ne+W:ne+"/"+W:re=W});let le=await He(ne,sessionStorage.getItem("systemKey"),""),ye;(j=(ae=(U=(K=le==null?void 0:le[0])==null?void 0:K.compData)==null?void 0:U.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:ae.contents)==null||j.forEach((W,ie)=>{W!=null&&W.isMainKey&&(ye=ie)});let Ae=[];(fe=(Ee=(q=(ce=le==null?void 0:le[0])==null?void 0:ce.compData)==null?void 0:q.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:Ee.contents)==null||fe.forEach(W=>{W.find(ie=>ie===re)&&(ye||ye===0)&&Ae.push(W==null?void 0:W[ye])});let ke=[],Be=await(Ae==null?void 0:Ae.map(async W=>{let ie=await He(ne+fo.value+W,sessionStorage.getItem("systemKey"),""),R=ie==null?void 0:ie.find(G=>(G==null?void 0:G.name)===o);ke.push(R)}));await Promise.all(Be),ke==null||ke.forEach(W=>{var R,G,ve,Re;let ie=p.cloneDeep(W==null?void 0:W.compData);ie&&(ie=ie==null?void 0:ie.filter(he=>(he==null?void 0:he.key)!=="tableContents"),ie.push({key:"tableContents",contents:rt((G=(R=W==null?void 0:W.compData)==null?void 0:R.find(he=>(he==null?void 0:he.key)==="tableContents"))==null?void 0:G.contents,(Re=(ve=W==null?void 0:W.compData)==null?void 0:ve.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:Re.contents)}),ie.push({key:"contentTableId",contents:W==null?void 0:W.id}),f.push(ie))})}return f},He=async(e,n,t="",r=!1,i,o,a)=>{var y,b,S,x,E,k,w;let s,c=new WeakMap;a?c=a:(b=(y=(await p.getPageInsofDataApi({systemKey:n,type:"data,structure,structureMethod"})).data.result)==null?void 0:y.filter(T=>{var N,D;return((N=T==null?void 0:T.key)==null?void 0:N.pageKey)!=="menu"&&((D=T==null?void 0:T.key)==null?void 0:D.pageKey)!=="secret"}))==null||b.forEach(T=>{c[T.key.pageKey]?c[T.key.pageKey]=[...c[T.key.pageKey],T]:c[T.key.pageKey]=[T]}),(!r||!i)&&(s=(S=c[e])==null?void 0:S.filter(A=>{var T;return((T=A==null?void 0:A.key)==null?void 0:T.parentTable)===t})),ft.setPageMapState(c);const u=(x=c[e])==null?void 0:x.filter(A=>{var T;return((T=A==null?void 0:A.key)==null?void 0:T.type)==="structureMethod"}),f=s==null?void 0:s.map(A=>A.id);if(!f)return;let h=(E=c[e])==null?void 0:E.filter(A=>{var T,N,D,C;return((T=A==null?void 0:A.key)==null?void 0:T.type)==="data"&&(f.includes((N=A==null?void 0:A.key)==null?void 0:N.tableId)||f.includes((C=(D=A==null?void 0:A.key)==null?void 0:D.tableId)==null?void 0:C.toString()))});const d=c[e+fo.value]??[];(d==null?void 0:d.length)===0&&(h=co(h,!1,c));let v=[];h==null||h.forEach(A=>{var D;const T=Array.isArray(A.value.tableData)?A.value.tableData:[A.value.tableData];T.unshift({id:A.id});const N=(D=A==null?void 0:A.key)==null?void 0:D.tableId;v!=null&&v.find(C=>(C==null?void 0:C.key)===N)?v=v==null?void 0:v.map(C=>((C==null?void 0:C.key)===N&&(C.contents=[...C.contents,T]),C)):v.push({key:N,contents:[T]})});let g=[];const m=await(s==null?void 0:s.map(async A=>{var C,M,O,Y,X,F,V,$,Z,te,_,B,P,L,z,Q;const T=A.value.pageData,N=A==null?void 0:A.id;let D=(C=p.cloneDeep(T==null?void 0:T.compData))==null?void 0:C.filter(K=>(K==null?void 0:K.key)!=="tableContents");if(D&&(D!=null&&D.find(K=>(K==null?void 0:K.key)==="header"))&&((O=(M=D==null?void 0:D.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:M.contents)!=null&&O.every(K=>!(K!=null&&K.columnPath)))){let K=rt((Y=v==null?void 0:v.find(q=>(q==null?void 0:q.key)===A.id))==null?void 0:Y.contents,(X=D==null?void 0:D.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:X.contents),U=await Pu((F=D==null?void 0:D.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:F.contents,e,(V=D==null?void 0:D.find(q=>(q==null?void 0:q.key)==="tableFilter"))==null?void 0:V.contents,c);U!=null&&U.mainKeys&&D.push({key:"mainRouters",contents:U==null?void 0:U.mainKeys});let ae=[],j=[];Array.isArray(U)&&(ae=rt(U,($=D==null?void 0:D.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:$.contents)),Array.isArray(U==null?void 0:U.tableContents)&&(j=rt(U==null?void 0:U.tableContents,(Z=D==null?void 0:D.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:Z.contents));let ce=[...ae,...j];Array.isArray(K)&&(K==null?void 0:K.length)>0&&(ce=[...ce,...K]),D.push({key:"tableContents",contents:ce}),D=D==null?void 0:D.map(q=>{var Ee;return(q==null?void 0:q.key)==="header"&&(q.contents=(Ee=q.contents)==null?void 0:Ee.map(fe=>((fe==null?void 0:fe.prop)===(U==null?void 0:U.mainKey)&&(fe.isMainKey=!0),fe))),q})}else D&&(D!=null&&D.find(K=>(K==null?void 0:K.key)==="header"))&&(D=await vu(p.cloneDeep(D),N,s,c),T.tableId=(te=D==null?void 0:D.find(K=>(K==null?void 0:K.key)==="contentTableId"))==null?void 0:te.contents);if(T.id=A==null?void 0:A.id,T.isShow=(B=(_=A==null?void 0:A.value)==null?void 0:_.pageData)==null?void 0:B.isShow,T.compData=D,((P=A.key)==null?void 0:P.type)!=="method")(L=T==null?void 0:T.compData)!=null&&L.every(K=>Array.isArray(K))?((z=T==null?void 0:T.compData)==null?void 0:z.length)===0?g.push(T):(Q=T==null?void 0:T.compData)==null||Q.forEach((K,U)=>{let ae;U===0?ae={comp:T==null?void 0:T.comp,compData:K,id:T==null?void 0:T.id,name:T==null?void 0:T.name,isShow:T==null?void 0:T.isShow}:ae={comp:T==null?void 0:T.comp,compData:K,id:T==null?void 0:T.id,name:"",isShow:T==null?void 0:T.isShow},g.push(ae)}):g.push(T);else{let K;K={name:"",compData:[T],comp:"calculator"},g.push(K)}}));return await Promise.all(m),((k=u==null?void 0:u.map(A=>A.value.pageData))==null?void 0:k.filter(A=>Object.values(A).length>0).length)>0&&g.push({comp:"methodButton",name:"",compData:(w=u==null?void 0:u.map(A=>A.value.pageData))==null?void 0:w.filter(A=>Object.values(A).length>0)}),g=g.sort((A,T)=>A.id-T.id),o?g:await pu(e,g)},bu=async e=>{await p.deleteInsofDataApi({id:e}),ft.setTableLoading(!1)},mu=async(e,n,t,r,i,o,a,s)=>{var h,d,v,g,m,y,b,S,x,E,k,w,A,T,N,D,C,M,O,Y,X,F,V,$;let c=((d=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:d.id)??"",u=(v=s==null?void 0:s.param)==null?void 0:v.url,f;if(c!==""&&((g=a==null?void 0:a.content)==null?void 0:g.length)>1&&typeof((y=(m=a==null?void 0:a.content)==null?void 0:m[0])==null?void 0:y.id)!="string"){const Z=await p.getInsofDataApi({id:c});let te=((E=(x=(S=(b=Z==null?void 0:Z.data)==null?void 0:b.result)==null?void 0:S[0])==null?void 0:x.key)==null?void 0:E.tableId)??"",_=((T=(A=(w=(k=Z==null?void 0:Z.data)==null?void 0:k.result)==null?void 0:w[0])==null?void 0:A.key)==null?void 0:T.pageKey)??"";const B=await p.createInsofDataApi({key:{type:e,pageKey:u||_||n,tableId:te||t,systemKey:r},value:{tableData:st(i,(N=je(o))==null?void 0:N.filter(P=>P!=="操作"))}});((D=B==null?void 0:B.data)==null?void 0:D.code)===200?(f=(C=B==null?void 0:B.data)==null?void 0:C.result,p.ElMessage.success("保存成功")):p.ElMessage.error("保存响应失败"),ft.setTableLoading(!1)}else{let Z;if(a!=null&&a.parentTableId){let _=await p.getInsofDataApi({id:a==null?void 0:a.parentTableId});Z=(X=(Y=(O=(M=_==null?void 0:_.data)==null?void 0:M.result)==null?void 0:O[0])==null?void 0:Y.key)==null?void 0:X.pageKey}const te=await p.createInsofDataApi({key:{type:e,pageKey:u||Z||n,tableId:a!=null&&a.parentTableId?a==null?void 0:a.parentTableId:t,systemKey:r},value:{tableData:st(i,(F=je(o))==null?void 0:F.filter(_=>_!=="操作"))}});((V=te==null?void 0:te.data)==null?void 0:V.code)===200?(f=($=te==null?void 0:te.data)==null?void 0:$.result,p.ElMessage.success("保存成功")):p.ElMessage.error("保存响应失败"),ft.setTableLoading(!1)}return f},Su=async(e,n,t,r,i,o,a)=>{var f,h,d,v,g,m,y,b,S,x,E,k;if(!r)return;const s=await p.getInsofDataApi({id:r});let c=((v=(d=(h=(f=s==null?void 0:s.data)==null?void 0:f.result)==null?void 0:h[0])==null?void 0:d.key)==null?void 0:v.tableId)??"",u=((b=(y=(m=(g=s==null?void 0:s.data)==null?void 0:g.result)==null?void 0:m[0])==null?void 0:y.key)==null?void 0:b.pageKey)??"";if(c&&c!==""){const w=await p.updateInsofDataApi({key:{type:e,pageKey:u,tableId:c,systemKey:i},value:{tableData:st(o,(S=je(a))==null?void 0:S.filter(A=>A!=="操作"))},id:r});((x=w==null?void 0:w.data)==null?void 0:x.code)===200?p.ElMessage.success("保存成功"):p.ElMessage.error("保存响应失败"),ft.setTableLoading(!1)}else{const w=await p.updateInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:i},value:{tableData:st(o,(E=je(a))==null?void 0:E.filter(A=>A!=="操作"))},id:r});((k=w==null?void 0:w.data)==null?void 0:k.code)===200?p.ElMessage.success("保存成功"):p.ElMessage.error("保存响应失败"),ft.setTableLoading(!1)}},Eu=async(e,n)=>{await p.updateInsofDataApi({value:{pageData:n},id:e})},Tu=async()=>{var e,n,t,r,i,o,a,s,c;try{const u=await p.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((e=u==null?void 0:u.data)==null?void 0:e.code)===200){const f=(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 h="browser";f==="制造系统"&&(h="client"),f==="三维系统"&&(h="three"),On.setPlatform(h),On.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)}},at=l.ref(0),Pn=kt(p.pinia),wu=Ct(p.pinia),{originalPath:Qe}=p.storeToRefs(wu),Du=p.useLoginState(p.pinia),Au=qn(p.pinia),{multipleTableConst:ge}=p.storeToRefs(Au),{loginUserInfo:Se}=p.storeToRefs(Du),{activeMenuPath:nc}=p.storeToRefs(Pn),Vn=pt(p.pinia),{pageMapState:Fn}=p.storeToRefs(Vn),De=Qe.value,Qt=e=>e==null?void 0:e.map(t=>{var r;return at.value++,Array.isArray(t)?Qt(t):{label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+at.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)??at.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:Qt(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(":"):[]}}),ku=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},Cu=e=>p.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(r=>{var i;return Array.isArray(r)?r=Qt(r):(r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":(r==null?void 0:r.prop)??"a"+at.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)??at.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:Qt(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(":"):[]},at.value++),r})),t)),en=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,f,h,d,v,g,m,y,b,S,x;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let E=i===""?i+((h=(c=a==null?void 0:a.prop)==null?void 0:c.split(ge.value))==null?void 0:h[((f=(u=a==null?void 0:a.prop)==null?void 0:u.split(ge.value))==null?void 0:f.length)-1]):i+ge.value+((m=(d=a==null?void 0:a.prop)==null?void 0:d.split(ge.value))==null?void 0:m[((g=(v=a==null?void 0:a.prop)==null?void 0:v.split(ge.value))==null?void 0:g.length)-1]);o=n(a==null?void 0:a.children,o,E)}else i!==""&&(a.prop=i+ge.value+((x=(y=a==null?void 0:a.prop)==null?void 0:y.split(ge.value))==null?void 0:x[((S=(b=a==null?void 0:a.prop)==null?void 0:b.split(ge.value))==null?void 0:S.length)-1])),o.push(a)})),o}return n(e)},Iu=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,f,h,d,v,g,m,y,b,S,x;if(a!=null&&a.children&&((s=a.children)==null?void 0:s.length)>0){let E=i===""?i+((h=(c=a==null?void 0:a.prop)==null?void 0:c.split(ge.value))==null?void 0:h[((f=(u=a==null?void 0:a.prop)==null?void 0:u.split(ge.value))==null?void 0:f.length)-1]):i+ge.value+((m=(d=a==null?void 0:a.prop)==null?void 0:d.split(ge.value))==null?void 0:m[((g=(v=a==null?void 0:a.prop)==null?void 0:v.split(ge.value))==null?void 0:g.length)-1]);a.children=n(a==null?void 0:a.children,o,E)}else i!==""&&(a.prop=i+ge.value+((x=(y=a==null?void 0:a.prop)==null?void 0:y.split(ge.value))==null?void 0:x[((S=(b=a==null?void 0:a.prop)==null?void 0:b.split(ge.value))==null?void 0:S.length)-1]));return a})),o}return n(e)},xu=e=>{let n=p.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},Bu=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 f;return(u==null?void 0:u.key)==="formContent"&&(u.contents=(f=u.contents)==null?void 0:f.map(h=>((h==null?void 0:h.type)==="Date"&&(h.value=""),h))),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},Ru=(e,n)=>{var r,i,o,a,s,c,u,f,h;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(g=>{var m;return(g==null?void 0:g.key)==="formContent"&&(g.contents=(m=g.contents)==null?void 0:m.map(y=>{var b;return y.value=(b=t==null?void 0:t.find(S=>(S==null?void 0:S.key)===(y==null?void 0:y.key)))==null?void 0:b.value,y})),g});return{pageData:{comp:(u=e==null?void 0:e.pageData)==null?void 0:u.comp,compData:d,name:(f=e==null?void 0:e.pageData)==null?void 0:f.name,isShow:(h=e==null?void 0:e.pageData)==null?void 0:h.isShow}}}else return e},St=async(e,n,t,r,i)=>{var m,y,b,S,x,E,k,w,A,T,N,D,C,M,O,Y,X,F,V,$,Z,te,_;let o=e;(o==null?void 0:o[(o==null?void 0:o.length)-1])!==De&&(o="",(y=(m=p.cloneDeep(e))==null?void 0:m.split(De))==null||y.forEach((B,P)=>{var L,z;P!==((z=(L=p.cloneDeep(e))==null?void 0:L.split(De))==null?void 0:z.length)-1&&(o=o===""?o+B:o+"/"+B)}),o=o+De);let a=[],s=await p.getInsofDataApi({key:{pageKey:e,systemKey:sessionStorage.getItem("systemKey")}});const c={data:{result:(S=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:S.filter(B=>{var P;return((P=B==null?void 0:B.key)==null?void 0:P.type)==="structure"})}};let u;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==De&&(u={data:{result:(x=Fn.value[o])==null?void 0:x.filter(B=>{var P;return((P=B==null?void 0:B.key)==null?void 0:P.type)==="structure"})}},((k=(E=u==null?void 0:u.data)==null?void 0:E.result)==null?void 0:k.length)>0&&(u=(A=(w=p.cloneDeep(u))==null?void 0:w.data)==null?void 0:A.result));const f={data:{result:(T=Fn.value[o])==null?void 0:T.filter(B=>{var P;return((P=B==null?void 0:B.key)==null?void 0:P.type)==="structureMethod"})}},h={data:{result:(D=(N=s==null?void 0:s.data)==null?void 0:N.result)==null?void 0:D.filter(B=>{var P;return((P=B==null?void 0:B.key)==null?void 0:P.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==De){let B=(C=c==null?void 0:c.data)==null?void 0:C.result;if(!Array.isArray(u))return;u==null||u.forEach(P=>{var z,Q,K,U,ae;let L=(z=B==null?void 0:B.find(j=>{var ce,q,Ee,fe;return((q=(ce=P==null?void 0:P.value)==null?void 0:ce.pageData)==null?void 0:q.name)===((fe=(Ee=j==null?void 0:j.value)==null?void 0:Ee.pageData)==null?void 0:fe.name)}))==null?void 0:z.value;L?L=L:L=void 0,a.push({key:{pageKey:n,parentTable:((Q=L==null?void 0:L.key)==null?void 0:Q.parentTable)??"",systemKey:(K=P==null?void 0:P.key)==null?void 0:K.systemKey,type:((U=L==null?void 0:L.key)==null?void 0:U.type)??((ae=P==null?void 0:P.key)==null?void 0:ae.type),version:1},value:Ru(P==null?void 0:P.value,L)})})}else(O=(M=c==null?void 0:c.data)==null?void 0:M.result)==null||O.forEach(B=>{var P,L,z;a.push({key:{pageKey:n,parentTable:(P=B==null?void 0:B.key)==null?void 0:P.parentTable,systemKey:(L=B==null?void 0:B.key)==null?void 0:L.systemKey,type:(z=B==null?void 0:B.key)==null?void 0:z.type,version:1},value:Bu(B==null?void 0:B.value)})});if((X=(Y=f==null?void 0:f.data)==null?void 0:Y.result)==null||X.forEach(B=>{var P,L;a.push({key:{pageKey:n,systemKey:(P=B==null?void 0:B.key)==null?void 0:P.systemKey,type:(L=B==null?void 0:B.key)==null?void 0:L.type,version:1},value:B==null?void 0:B.value})}),a=a==null?void 0:a.map(B=>{var P,L,z;return((L=(P=B==null?void 0:B.value)==null?void 0:P.pageData)==null?void 0:L.comp)==="Form"&&(B.value.pageData.compData=(z=B.value.pageData.compData)==null?void 0:z.map(Q=>{var K;return(Q==null?void 0:Q.key)==="formContent"&&(Q.contents=(K=Q.contents)==null?void 0:K.map(U=>(t!=null&&t[U==null?void 0:U.key]&&(U==null?void 0:U.type)!=="Date"&&(U.value=t[U.key]),U))),Q}),r&&B.value.pageData.compData.push({key:"parentFormPath",contents:r})),B}),(a==null?void 0:a.length)>0){const B=a==null?void 0:a.find(z=>{var Q,K;return i==null?void 0:i.includes((K=(Q=z==null?void 0:z.value)==null?void 0:Q.pageData)==null?void 0:K.name)}),P=/^[A-Za-z]+$/,L=B?a==null?void 0:a.map(z=>{var Q,K,U,ae,j,ce;return i!=null&&i.includes((K=(Q=z==null?void 0:z.value)==null?void 0:Q.pageData)==null?void 0:K.name)?{...z,value:{pageData:{...(U=z==null?void 0:z.value)==null?void 0:U.pageData,compData:(ce=(j=(ae=z==null?void 0:z.value)==null?void 0:ae.pageData)==null?void 0:j.compData)==null?void 0:ce.map(q=>{var Ee;return(q==null?void 0:q.key)==="formContent"?{...q,contents:(Ee=q==null?void 0:q.contents)==null?void 0:Ee.map(fe=>P.test(fe==null?void 0:fe.prop)?fe:{...fe,value:""})}:q})}}}:z}):a;await p.batchAddInsofDataApi({dataList:L})}let d={};const v=await p.getInsofDataApi({key:{pageKey:n,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((V=(F=c==null?void 0:c.data)==null?void 0:F.result)==null?void 0:V.length)>0&&((Z=($=c==null?void 0:c.data)==null?void 0:$.result)==null||Z.forEach(B=>{var P,L,z;d[B.id]=(z=(L=(P=v==null?void 0:v.data)==null?void 0:P.result)==null?void 0:L.find(Q=>{var K,U,ae,j;return((U=(K=Q==null?void 0:Q.value)==null?void 0:K.pageData)==null?void 0:U.name)===((j=(ae=B==null?void 0:B.value)==null?void 0:ae.pageData)==null?void 0:j.name)}))==null?void 0:z.id}));let g=[];(_=(te=h==null?void 0:h.data)==null?void 0:te.result)==null||_.forEach(B=>{var P,L,z;g.push({key:{pageKey:n,tableId:d[(P=B==null?void 0:B.key)==null?void 0:P.tableId],systemKey:(L=B==null?void 0:B.key)==null?void 0:L.systemKey,type:(z=B==null?void 0:B.key)==null?void 0:z.type},value:B==null?void 0:B.value})}),(g==null?void 0:g.length)>0&&await p.batchAddInsofDataApi({dataList:g})},ho=(e,n)=>{let t=p.cloneDeep(e);return t=t==null?void 0:t.map(i=>{var c,u,f;let o=[],a=[];for(let h in n)if(h!=null&&h.includes((u=(c=p.cloneDeep(i))==null?void 0:c.key)==null?void 0:u.pageKey)){let d=(f=n[h])==null?void 0:f.filter(v=>{var g,m,y;return((g=v==null?void 0:v.key)==null?void 0:g.type)==="data"&&((m=v==null?void 0:v.key)==null?void 0:m.tableId)===((y=p.cloneDeep(i))==null?void 0:y.id)});a=[...a,...d]}(a==null?void 0:a.length)>0&&(a==null||a.forEach(h=>{o.push(h.value.tableData)}));let s=p.cloneDeep(i).value.pageData.compData;return s.push({key:"tableContents",contents:o}),i.value.pageData.compData=s,i}),t},po=(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,f)=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(i=f)}))}))}),i},go=(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},ei=(e,n,t,r)=>{var c,u,f;let i=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,o=e==null?void 0:e.map(h=>{var d,v;return(v=(d=h.groupSelect)==null?void 0:d.split(":"))==null?void 0:v[1]}),a="";i==null||i.forEach((h,d)=>{(i==null?void 0:i.length)-1!==d?a=a===""?a+h:a+"/"+h:a=a+De+h});let s=[];for(let h in n)if(h!=null&&h.includes(a)){let d=(u=n[h])==null?void 0:u.filter(v=>{var g,m;return((g=v==null?void 0:v.key)==null?void 0:g.type)==="structure"&&((m=v==null?void 0:v.key)==null?void 0:m.parentTable)===""});s=[...s,...d]}if((s==null?void 0:s.length)>0){let h=s==null?void 0:s.filter(y=>{var b,S,x;return((b=y==null?void 0:y.key)==null?void 0:b.pageKey)!==a&&((x=(S=y==null?void 0:y.value)==null?void 0:S.pageData)==null?void 0:x.comp)==="Form"}),d=s==null?void 0:s.filter(y=>{var b,S,x;return((b=y==null?void 0:y.key)==null?void 0:b.pageKey)!==a&&((x=(S=y==null?void 0:y.value)==null?void 0:S.pageData)==null?void 0:x.comp)==="Table"});d=ho(p.cloneDeep(d),n),h=[...p.cloneDeep(h),...d],h=h==null?void 0:h.map(y=>({[y.key.pageKey]:y}));let v=0;h=h.reduce((y,b)=>(Object.keys(b).forEach(S=>{y[S]||(y[S]=[],y[S].push({index:v})),y[S].push(b[S])}),v++,y),{});let g=(f=Object.values(h))==null?void 0:f.sort((y,b)=>{var E,k;let S=(E=y==null?void 0:y.find(w=>w==null?void 0:w.index))==null?void 0:E.index,x=(k=b==null?void 0:b.find(w=>w==null?void 0:w.index))==null?void 0:k.index;return S-x});h=g==null?void 0:g.map(y=>y==null?void 0:y.filter(b=>{var S,x,E,k;return!(b!=null&&b.index)&&(b==null?void 0:b.index)!==0&&!((x=(S=b==null?void 0:b.key)==null?void 0:S.pageKey)!=null&&x.includes("updateLoading"))&&!((k=(E=b==null?void 0:b.key)==null?void 0:E.pageKey)!=null&&k.includes("loading"))}));let m=[];if(h==null||h.forEach(y=>{var x,E,k,w,A,T,N,D,C,M;const b=y==null?void 0:y.find(O=>{var Y,X,F,V,$;return((X=(Y=O==null?void 0:O.value)==null?void 0:Y.pageData)==null?void 0:X.name)===(($=(V=(F=e==null?void 0:e[0])==null?void 0:F.groupSelect)==null?void 0:V.split(":"))==null?void 0:$[0])});let S=(A=(w=(k=(E=(x=p.cloneDeep(b))==null?void 0:x.value)==null?void 0:E.pageData)==null?void 0:k.compData)==null?void 0:w.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:A.contents;if(S){let O=[];o==null||o.forEach((Y,X)=>{var $,Z,te,_,B,P;let F=y==null?void 0:y.find(L=>{var z,Q,K,U,ae;return((Q=(z=L==null?void 0:L.value)==null?void 0:z.pageData)==null?void 0:Q.name)===((ae=(U=(K=e==null?void 0:e[X])==null?void 0:K.groupSelect)==null?void 0:U.split(":"))==null?void 0:ae[0])}),V=(B=(_=(te=(Z=($=p.cloneDeep(F))==null?void 0:$.value)==null?void 0:Z.pageData)==null?void 0:te.compData)==null?void 0:_.find(L=>(L==null?void 0:L.key)==="formContent"))==null?void 0:B.contents;V!=null&&V.find(L=>(L==null?void 0:L.key)===Y)?O.push((P=V==null?void 0:V.find(L=>(L==null?void 0:L.key)===Y))==null?void 0:P.value):O.push("")}),m.push(O)}else S=(M=(C=(D=(N=(T=p.cloneDeep(b))==null?void 0:T.value)==null?void 0:N.pageData)==null?void 0:D.compData)==null?void 0:C.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:M.contents,S==null||S.forEach(O=>{let Y=[];o==null||o.forEach(X=>{O!=null&&O[X]&&Y.push(O==null?void 0:O[X])}),m.push(Y)})}),(t==null?void 0:t.length)>0){let y={};t==null||t.forEach(b=>{var S;for(let x in b){let E=p.cloneDeep(x);if(!(E!=null&&E.includes("[")))(S=b[x])!=null&&S.includes("[")||(y[E]=b[x]);else{let k=go(E,n[r]),w=po(b[x],n[r]);y[k]=w}}});for(let b in y)m=m==null?void 0:m.filter(S=>S[y[b]]===b)}return m}},Mu=(e,n,t,r)=>{var s,c,u,f,h;let i=p.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 v=(s=t[d])==null?void 0:s.filter(g=>{var m,y;return((m=g==null?void 0:g.key)==null?void 0:m.type)==="structure"&&((y=g==null?void 0:g.key)==null?void 0:y.parentTable)===""});a=[...a,...v]}if((a==null?void 0:a.length)>0){let d=a==null?void 0:a.filter(E=>{var k,w,A,T;return((k=E==null?void 0:E.key)==null?void 0:k.pageKey)!==i&&((A=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:A.comp)==="Form"&&(E==null?void 0:E.key.pageKey.includes(i+De))&&!((T=E==null?void 0:E.key.pageKey)!=null&&T.includes("@"))}),v=a==null?void 0:a.filter(E=>{var k,w,A,T;return((k=E==null?void 0:E.key)==null?void 0:k.pageKey)!==i&&((A=(w=E==null?void 0:E.value)==null?void 0:w.pageData)==null?void 0:A.comp)==="Table"&&(E==null?void 0:E.key.pageKey.includes(i+De))&&!((T=E==null?void 0:E.key.pageKey)!=null&&T.includes("@"))});v=ho(p.cloneDeep(v),t),d=[...p.cloneDeep(d),...v],d=d==null?void 0:d.map(E=>({[E.key.pageKey]:E}));let g=0;d=d.reduce((E,k)=>(Object.keys(k).forEach(w=>{E[w]||(E[w]=[],E[w].push({index:g})),E[w].push(k[w])}),g++,E),{}),d=co(d,!0,t);let m=(c=Object.values(d))==null?void 0:c.sort((E,k)=>{var T,N;let w=(T=E==null?void 0:E.find(D=>D==null?void 0:D.index))==null?void 0:T.index,A=(N=k==null?void 0:k.find(D=>D==null?void 0:D.index))==null?void 0:N.index;return w-A});d=m==null?void 0:m.map(E=>E==null?void 0:E.filter(k=>!(k!=null&&k.index)&&(k==null?void 0:k.index)!==0));let y=(u=p.cloneDeep(d))==null?void 0:u.filter(E=>E==null?void 0:E.find(k=>{var w,A,T,N;return((N=(w=k==null?void 0:k.key)==null?void 0:w.pageKey)==null?void 0:N[((T=(A=k==null?void 0:k.key)==null?void 0:A.pageKey)==null?void 0:T.length)-1])===De}));d=d==null?void 0:d.filter(E=>!(E!=null&&E.find(k=>{var w,A,T,N,D,C,M,O;return((N=(w=k==null?void 0:k.key)==null?void 0:w.pageKey)==null?void 0:N[((T=(A=k==null?void 0:k.key)==null?void 0:A.pageKey)==null?void 0:T.length)-1])===De||((C=(D=k==null?void 0:k.key)==null?void 0:D.pageKey)==null?void 0:C.includes("updateLoading"))||((O=(M=k==null?void 0:k.key)==null?void 0:M.pageKey)==null?void 0:O.includes("loading"))})));let b=[],S=[];(f=y==null?void 0:y[0])==null||f.forEach(E=>{var k,w,A,T,N;((w=(k=E==null?void 0:E.value)==null?void 0:k.pageData)==null?void 0:w.comp)==="Form"&&((N=(T=(A=E==null?void 0:E.value)==null?void 0:A.pageData)==null?void 0:T.compData)==null||N.forEach(D=>{(D==null?void 0:D.key)==="formContent"&&(S=[...S,...D==null?void 0:D.contents])}))});let x=(h=S==null?void 0:S.find(E=>(E==null?void 0:E.isMain)===!0))==null?void 0:h.key;if(d==null||d.forEach(E=>{let k=[];E==null||E.forEach(A=>{var T,N,D,C,M;((N=(T=A==null?void 0:A.value)==null?void 0:T.pageData)==null?void 0:N.comp)==="Form"&&((M=(C=(D=A==null?void 0:A.value)==null?void 0:D.pageData)==null?void 0:C.compData)==null||M.forEach(O=>{(O==null?void 0:O.key)==="formContent"&&(k=[...k,...O==null?void 0:O.contents])}))});let w={};o==null||o.forEach(A=>{let T=k==null?void 0:k.find(N=>(N==null?void 0:N.key)===A);T!=null&&T.prop&&(w[T.prop]=(T==null?void 0:T.value)??"")}),b.push(w)}),(r==null?void 0:r.length)>0){let E=[];r==null||r.forEach(k=>{var N,D,C,M,O,Y,X,F;let w={};for(let V in k){let $=p.cloneDeep(V);if(!($!=null&&$.includes("[")))k[V].toUpperCase()==="@LOGINUSER"?w[$]=((N=Se.value)==null?void 0:N.姓名)||((D=Se.value)==null?void 0:D.account)||((C=Se.value)==null?void 0:C.账号)||((M=Se.value)==null?void 0:M.姓名):(O=k[V])!=null&&O.includes("[")||(w[$]=k[V]);else{let Z=go($,t[e]),te=po(k[V],t[e]);w[Z]=te}}let A=[],T=0;for(let V in w)((Y=w[V])==null?void 0:Y[0])!=="!"?A=(X=T>0?A:b)==null?void 0:X.filter(Z=>Z[V]===w[V]):A=(F=T>0?A:b)==null?void 0:F.filter($=>{var Z;return $[V]!==((Z=w[V])==null?void 0:Z.replaceAll("!",""))}),T=1;E=[...E,...A]}),b=[...new Set(E)]}return b=b==null?void 0:b.map(E=>Object.values(E)),{mainKey:x,tableContents:b}}},Nu=(e,n)=>{var i,o,a,s,c,u;let t=(o=(i=p.cloneDeep(e))==null?void 0:i.split("/"))==null?void 0:o[0],r=[];for(let f in n)if(f!=null&&f.includes(t)){let h=(a=n[f])==null?void 0:a.filter(d=>{var v,g;return((v=d==null?void 0:d.key)==null?void 0:v.type)==="structure"&&((g=d==null?void 0:d.key)==null?void 0:g.parentTable)===""});r=[...r,...h]}return(r==null?void 0:r.length)>0?!!((u=(c=(s=r==null?void 0:r.filter(h=>{var d;return((d=h==null?void 0:h.key)==null?void 0:d.pageKey)===t}))==null?void 0:s[0])==null?void 0:c.key)==null?void 0:u.parentPageKey):!0},Ou=async(e,n,t,r)=>{var a,s,c,u,f,h,d,v,g;let i=(s=(a=p.cloneDeep(e))==null?void 0:a.split("/"))==null?void 0:s[0],o=[];for(let m in r)if(m!=null&&m.includes(i)){let y=(c=r[m])==null?void 0:c.filter(b=>{var S,x;return((S=b==null?void 0:b.key)==null?void 0:S.type)==="structure"&&((x=b==null?void 0:b.key)==null?void 0:x.parentTable)===""});o=[...o,...y]}if((o==null?void 0:o.length)>0){let m=(h=(f=(u=o==null?void 0:o.filter(S=>{var x;return((x=S==null?void 0:S.key)==null?void 0:x.pageKey)===i}))==null?void 0:u[0])==null?void 0:f.key)==null?void 0:h.parentPageKey,y=[];if(m){for(let S in r)if(S!=null&&S.includes(m)){let x=(d=r[S])==null?void 0:d.filter(E=>{var k,w;return((k=E==null?void 0:E.key)==null?void 0:k.type)==="structure"&&((w=E==null?void 0:E.key)==null?void 0:w.parentTable)===""});y=[...y,...x]}}else y=o;let b="";if((y==null?void 0:y.length)>0){let S=[],x;x=(v=y==null?void 0:y.filter(D=>{var C,M,O,Y,X,F;return((O=(M=(C=D==null?void 0:D.key)==null?void 0:C.pageKey)==null?void 0:M.split("/"))==null?void 0:O[0])===m&&((F=(X=(Y=D==null?void 0:D.key)==null?void 0:Y.pageKey)==null?void 0:X.split("/"))==null?void 0:F.length)===2}))==null?void 0:v.map(D=>{var C;return(C=D==null?void 0:D.key)==null?void 0:C.pageKey}),x=[...new Set(x)],x=x==null?void 0:x.filter(D=>!D.includes(De));let E=(g=p.cloneDeep(x))==null?void 0:g.map(async D=>{var X,F,V,$,Z,te,_,B,P,L,z,Q,K,U,ae;let C=await He(D,sessionStorage.getItem("systemKey"),"",!1,[],!1,r),M=($=(V=(F=(X=p.cloneDeep(C))==null?void 0:X[0])==null?void 0:F.compData)==null?void 0:V.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:$.contents,O=(L=(P=(B=(_=(te=(Z=p.cloneDeep(C))==null?void 0:Z[0])==null?void 0:te.compData)==null?void 0:_.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:B.contents)==null?void 0:P.filter(j=>(j==null?void 0:j.label)!=="操作"))==null?void 0:L.map(j=>j==null?void 0:j.prop),Y=[];return(ae=(U=(K=(Q=(z=p.cloneDeep(C))==null?void 0:z[0])==null?void 0:Q.compData)==null?void 0:K.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:U.contents)==null||ae.forEach(j=>{(j==null?void 0:j.isMainKey)===!0&&(b=j==null?void 0:j.prop)}),M==null||M.forEach(j=>{let ce=st(j,O);Y.push(ce),S.push({key:ce==null?void 0:ce[b],routerContent:D})}),Y}),k=await Promise.all(E),w=[];k==null||k.forEach(D=>{(D==null?void 0:D.length)>0&&(D==null||D.forEach(C=>{w.push(C)}))});let A=[];A=n==null?void 0:n.map(D=>{var M,O,Y;let C={};for(let X in D)D[X].toUpperCase()==="@LOGINUSER"?C[X]=((M=Se.value)==null?void 0:M.姓名)||((O=Se.value)==null?void 0:O.account)||((Y=Se.value)==null?void 0:Y.账号):C[X]=D[X];return C});let T=[];w==null||w.forEach(D=>{let C=[];A==null||A.forEach(M=>{let O=[];for(let Y in M)O.push(D[Y]===M[Y]);C.push(O)}),C.find(M=>M==null?void 0:M.every(O=>O===!0))&&T.push(D)});let N=[];return T==null||T.forEach(D=>{let C={};t==null||t.forEach(M=>{C[M.prop]=D[M.prop]??""}),N.push(C)}),N=N==null?void 0:N.map(D=>Object.values(D)),{mainKey:b,tableContents:N,mainKeys:S}}else return}else return},Pu=async(e,n,t,r)=>{var o,a,s,c;let i=(o=p.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)))&&Nu(n,r)){let u=await Ou(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 f,h,d,v;return((f=u==null?void 0:u.formMenuSelect)==null?void 0:f.length)>0&&((d=(h=u==null?void 0:u.groupSelect)==null?void 0:h.split(":"))==null?void 0:d.length)>0||((v=u==null?void 0:u.formMenuGroup)==null?void 0:v.length)>0})))return Mu(n,i,r,t);if(i!=null&&i.every(u=>!(u!=null&&u.formMenuGroup)))return ei(i,r,t,n);{let u=[];(c=(s=i==null?void 0:i[0])==null?void 0:s.formMenuGroup)==null||c.forEach((v,g)=>{let m=[];i==null||i.forEach(y=>{var b,S,x,E,k,w;m.push({columnPath:y==null?void 0:y.columnPath,formMenuSelect:(x=((b=y==null?void 0:y.formMenuGroup)==null?void 0:b[g])??((S=y==null?void 0:y.formMenuGroup)==null?void 0:S[0]))==null?void 0:x.formMenuSelect,groupSelect:(w=((E=y==null?void 0:y.formMenuGroup)==null?void 0:E[g])??((k=y==null?void 0:y.formMenuGroup)==null?void 0:k[0]))==null?void 0:w.groupSelect,isRoute:y==null?void 0:y.isRoute,label:y==null?void 0:y.label,prop:y==null?void 0:y.label})}),u.push(m)});let f=[],d=u==null?void 0:u.map(async v=>ei(v,r,t,n));return d==null||d.forEach(v=>{v==null||v.forEach(g=>{f.push(g)})}),f}},Vu=async(e,n)=>{var a,s,c,u,f,h,d,v,g,m;let t=e+De+n,r=e,i=(s=(a=Fn.value[t])==null?void 0:a.filter(y=>{var b,S;return((b=y==null?void 0:y.key)==null?void 0:b.type)==="structure"&&((S=y==null?void 0:y.key)==null?void 0:S.parentTable)===""}))==null?void 0:s.map(y=>{var b;return(b=y==null?void 0:y.value)==null?void 0:b.pageData}),o={};(i==null?void 0:i.length)>0?(await St(t,t+Qe+`updateLoading${((c=Se.value)==null?void 0:c.account)||((u=Se.value)==null?void 0:u.账号)}`),Vn.setRouteToChildPath(r),Pn.setActiveMenuPath(t+Qe+`updateLoading${((f=Se.value)==null?void 0:f.account)||((h=Se.value)==null?void 0:h.账号)}`)):(await St(r+Qe,t,o),await St(t,t+Qe+`updateLoading${((d=Se.value)==null?void 0:d.account)||((v=Se.value)==null?void 0:v.账号)}`),Vn.setRouteToChildPath(r),Pn.setActiveMenuPath(t+Qe+`updateLoading${((g=Se.value)==null?void 0:g.account)||((m=Se.value)==null?void 0:m.账号)}`))},Fu=Ct(p.pinia),{originalPath:yo}=p.storeToRefs(Fu),Lu=e=>e==null?void 0:e.map(t=>(t=bo(t),t)),ir=async()=>{var t,r,i,o,a,s,c,u,f,h,d,v;let e;const n=await p.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=Lu((v=(d=(h=(f=(u=(c=n.data.result)==null?void 0:c[0])==null?void 0:u.value)==null?void 0:f.pageData)==null?void 0:h.compData)==null?void 0:d[0])==null?void 0:v.contents)),e},Ku=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=en(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}))}},vo=async e=>{var i,o;let n="";(i=p.cloneDeep(e))==null||i.forEach(a=>{n=n===""?n+a:n+"/"+a});let t="";(o=p.cloneDeep(e))==null||o.forEach((a,s)=>{s!==(e==null?void 0:e.length)-1?t=t===""?t+a:t+"/"+a:t=t+yo.value+a});const r=await He(n,sessionStorage.getItem("systemKey"),"");return r||await He(t,sessionStorage.getItem("systemKey"),"")},_u=async e=>{var r,i,o;const n=await vo(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=>Ku(a))),t},Hu=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],Ge=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],$u=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge},{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}],Uu=async()=>{const e=await ir();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge},{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"}]},zu=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await ir()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],ju=l.computed(async()=>await Uu()),qu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],Gu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge},{key:"value",label:"固定值",type:"Input"}],Wu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge},{key:"originalContent",label:"初始值",type:"Input"}],ti=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge}],Yu=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ge}],Zu=[{key:"Input",value:$u},{key:"Select",value:ju},{key:"Date",value:qu},{key:"TextArea",value:Wu},{key:"Upload",value:ti},{key:"DragUpload",value:ti},{key:"Quill",value:Yu},{key:"Link",value:Gu}],Ju=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],Xu=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ju},{key:"background",label:"颜色",type:"Color"}],Qu=e=>{var t,r,i,o,a,s,c,u;let n=p.cloneDeep(e);if(((t=n==null?void 0:n.find(f=>(f==null?void 0:f.name)==="类型"))==null?void 0:t.type)==="Select"&&((o=(i=(r=p.cloneDeep(n))==null?void 0:r.find(f=>(f==null?void 0:f.name)==="选项值"))==null?void 0:i.value)==null?void 0:o.length)>0){const f=(u=(c=(s=(a=p.cloneDeep(n))==null?void 0:a.find(h=>(h==null?void 0:h.name)==="选项值"))==null?void 0:s.value)==null?void 0:c.split(","))==null?void 0:u.map(h=>({label:h,value:h}));n=n==null?void 0:n.map(h=>((h==null?void 0:h.name)==="初始值"&&(h.contents=f,h.value=(h==null?void 0:h.value)??""),h))}return n},bo=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=>bo(o))),n},ec=async e=>{var o,a,s,c;let n=p.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 zu();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=p.cloneDeep(n))==null?void 0:s.filter(u=>(u==null?void 0:u.name)!=="选项值"):n=[...p.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=p.cloneDeep(n))==null?void 0:c.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"):n=[...p.cloneDeep(n),...i].filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项")),n},tc=(e,n)=>{var r;let t=!1;return(r=p.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},mo=(e,n)=>{var a,s,c,u,f;const t=p.cloneDeep(e);if(!t)return;let r="";(s=(a=p.cloneDeep(t))==null?void 0:a.menuSelect)==null||s.forEach(h=>{h!=null&&h.includes("[")?r=r+yo.value:r=r===""?r+h:r+"/"+h});const i=(c=n==null?void 0:n[r])==null?void 0:c.map(h=>{var d;return(d=h==null?void 0:h.value)==null?void 0:d.pageData});let o=i==null?void 0:i.filter(h=>{var d,v;return(h==null?void 0:h.name)===((v=(d=p.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:v[0])});if((o==null?void 0:o.length)===1?o=o==null?void 0:o[0]:(u=p.cloneDeep(o))==null||u.forEach(h=>{var d,v;(h==null?void 0:h.comp)==="Form"&&tc(h==null?void 0:h.compData,(v=(d=p.cloneDeep(t))==null?void 0:d.groupSelect)==null?void 0:v[1])&&(o=h)}),(o==null?void 0:o.comp)==="Form"){let h="";return(f=o==null?void 0:o.compData)==null||f.forEach(d=>{var v;(d==null?void 0:d.key)==="formContent"&&((v=d==null?void 0:d.contents)==null||v.forEach(g=>{var m,y;(g==null?void 0:g.key)===((y=(m=p.cloneDeep(t))==null?void 0:m.groupSelect)==null?void 0:y[1])&&(g.type==="Select"&&!(g!=null&&g.value)?h=void 0:h=g==null?void 0:g.value)}))}),h}};exports.CHANGE_EVENT=Tn;exports.ElButton=Fi;exports.ElButtonGroup=fs;exports.ElFocusTrap=Bi;exports.ElInput=Ci;exports.ElMessageBox=Ui;exports.ElOverlay=Ki;exports.FOCUS_TRAP_INJECTION_KEY=Ii;exports.FormButton=Xu;exports.FormContent=Zu;exports.FormType=Hu;exports.INPUT_EVENT=wn;exports.IsJson=Ns;exports.PatchFlags=bt;exports.SetCache=Et;exports.State=su;exports.State$1=Dl;exports.TinyColor=Pi;exports.UPDATE_MODEL_EVENT=jt;exports.addPathToTree=on;exports.addTableContents=mu;exports.animateScrollTo=ca;exports.baseFlatten=Ln;exports.baseIsEqual=Kn;exports.buttonTypes=Ni;exports.cAF=di;exports.cacheHas=si;exports.convertArrayToTree=Zn;exports.copyAdd=Vu;exports.decryptData=nr;exports.deleteTableContents=bu;exports.encryptData=vt;exports.ensureOnlyChild=ys;exports.fixFormContents=Eu;exports.fixTableContents=Su;exports.flatRest=ai;exports.flattedChildren=gt;exports.flatten=oi;exports.focusNode=Aa;exports.formContextKey=tn;exports.formItemContextKey=_n;exports.formToOptionsContents=Qu;exports.generateKeyPair=Wl;exports.getActivePageStructureId=to;exports.getAllLeafNodes=ku;exports.getColumnChild=en;exports.getColumnContents=je;exports.getFirstArrayProperty=Yn;exports.getFormContents=Fs;exports.getGradeColumns=Cu;exports.getItemData=He;exports.getLeafNodesRecursive=Xn;exports.getMenusContent=ir;exports.getNewColumnChild=Iu;exports.getNormalizedProps=gs;exports.getParentConstruct=Ws;exports.getParentContents=Ls;exports.getParentKey=Gs;exports.getScrollBarWidth=gi;exports.getScrollContainer=la;exports.getScrollElement=fa;exports.getScrollTop=ha;exports.getSibling=Da;exports.getTableFormToForm=xu;exports.getValueToObjectValue=st;exports.groupByField=Jn;exports.handleRowAuthorityRender=Qn;exports.handleSubmitAsync=ct;exports.hasIn=ci;exports.identity=ni;exports.inputProps=bi;exports.isEqual=fi;exports.isFirefox=yi;exports.isFocusable=nn;exports.isFragment=Li;exports.isLeaf=wi;exports.isValidComponentSize=$i;exports.isValidElementNode=ds;exports.judgeContents=mo;exports.loadingConstruct=St;exports.loadingSystemType=Tu;exports.menuToContentType=_u;exports.menuToParent=vo;exports.methodTableToContent=Vs;exports.overRest=ii;exports.pick=hi;exports.rAF=pi;exports.resetPassword=ut;exports.scrollIntoView=ua;exports.selectToBase=ec;exports.setToArray=ui;exports.setToString=ri;exports.submitTableAsyncByVerify=un;exports.tableEveryContents=qs;exports.tableToContents=_s;exports.tableToStruct=Ks;exports.triggerEvent=wa;exports.tryFocus=Ne;exports.useAriaProps=vi;exports.useAttrs=mi;exports.useAuthorityState=Gn;exports.useComposition=Ai;exports.useDeprecated=Mi;exports.useDraggable=_i;exports.useFocusController=Di;exports.useFormDisabled=At;exports.useFormItem=Hn;exports.useFormItemInputId=Ei;exports.useFormSize=$n;exports.useId=qt;exports.useIdInjection=Si;exports.useLockscreen=Hi;exports.useMenuState=kt;exports.useModelComp=pt;exports.useOriginalState=Ct;exports.useSameTarget=jn;exports.useTableComp=qn;
@@ -1,4 +1,4 @@
1
- import { bx as t, m as i, by as s } from "./index-DbzvXPKu.js";
1
+ import { bC as t, h as i, bD as s } from "./index-UN4JU0ly.js";
2
2
  var n = "[object String]";
3
3
  function g(r) {
4
4
  return typeof r == "string" || !i(r) && t(r) && s(r) == n;