ss-component-new 1.2.36 → 1.2.37

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 (119) hide show
  1. package/dist/{MTLLoader-CkNQ5SUP.cjs → MTLLoader-Dihj5ymj.cjs} +1 -1
  2. package/dist/{MTLLoader-B4lJr_ku.js → MTLLoader-gxq5Kvds.js} +1 -1
  3. package/dist/{OrbitControls-CpTJa--7.cjs → OrbitControls-Ba8QWDQU.cjs} +1 -1
  4. package/dist/{OrbitControls-CwAfnF56.js → OrbitControls-BonUITsH.js} +1 -1
  5. package/dist/{animationData-CF6-_eBc.cjs → animationData-AAFCWE58.cjs} +1 -1
  6. package/dist/{animationData-ETdtTXwF.js → animationData-DOlVDTlo.js} +4 -4
  7. package/dist/{array-CbzJvO5y.cjs → array-Bvce3EAi.cjs} +1 -1
  8. package/dist/{array-BUiCaQsR.js → array-D7EDjc7l.js} +35 -35
  9. package/dist/config.js +2 -2
  10. package/dist/{dataUtil-DFkONpps.cjs → dataUtil-B98txAs6.cjs} +1 -1
  11. package/dist/{dataUtil-oabcbdyY.js → dataUtil-VNsK7cTO.js} +2 -2
  12. package/dist/{fileUtil-BezA0XEu.cjs → fileUtil-BeIaOSMH.cjs} +1 -1
  13. package/dist/{fileUtil-xUu_aleM.js → fileUtil-D7S_1Tde.js} +1 -1
  14. package/dist/{iconfont-Cj5twyUW.js → iconfont-Dnc_kFzN.js} +2 -2
  15. package/dist/{iconfont-Bc_5-mGm.cjs → iconfont-wtkqkYlV.cjs} +1 -1
  16. package/dist/{index-Cs1m0QHY.cjs → index-A2nYF-1f.cjs} +1 -1
  17. package/dist/{index-C-4KKbC7.js → index-B-xelo5W.js} +3 -3
  18. package/dist/{index-CkTqgfCV.js → index-B3sDwg_c.js} +1 -1
  19. package/dist/{index-LcSS6r-3.cjs → index-B8HWTwDz.cjs} +1 -1
  20. package/dist/{index-7jCqww1w.cjs → index-B8bUR1Ri.cjs} +1 -1
  21. package/dist/{index-B35gkDgD.js → index-BCLRJLSj.js} +1 -1
  22. package/dist/{index-CfKLvZ17.cjs → index-BJoRCnr3.cjs} +1 -1
  23. package/dist/{index-DKQfWQa7.js → index-BLTsYYci.js} +1 -1
  24. package/dist/{index-bFFymrtu.js → index-BMaVaPUc.js} +2 -2
  25. package/dist/{index-DK1sT-Gv.js → index-BPzUmT8-.js} +12 -12
  26. package/dist/{index-CnW0XyMI.cjs → index-BU5DWXf0.cjs} +1 -1
  27. package/dist/{index-B5KCSN4c.cjs → index-BbzUzdxF.cjs} +1 -1
  28. package/dist/{index-BnNI_rxz.js → index-BeawnQ97.js} +3 -3
  29. package/dist/{index-C_FC7JhD.js → index-BiNILQi8.js} +6 -6
  30. package/dist/{index-CvrlW6Kj.cjs → index-BiPzhKBB.cjs} +1 -1
  31. package/dist/{index-Bp59pdeu.js → index-BrvAeT7w.js} +10 -10
  32. package/dist/{index-BjLowWoy.js → index-BwoXi1LQ.js} +2 -2
  33. package/dist/index-C8qRkCgn.cjs +21 -0
  34. package/dist/{index-ixEWAWI8.js → index-CBpSEFvE.js} +4 -4
  35. package/dist/{index-BsQpRUkg.cjs → index-CCAXN_VF.cjs} +1 -1
  36. package/dist/{index-DBDeHECn.js → index-CExeGHij.js} +5410 -5111
  37. package/dist/{index-vDXPLbzt.cjs → index-CQNvplpY.cjs} +13 -13
  38. package/dist/{index-BntUSUuQ.cjs → index-CagsR3TK.cjs} +1 -1
  39. package/dist/{index-Bsj_M3tu.cjs → index-CeJI9fRM.cjs} +1 -1
  40. package/dist/{index-CUeHiWp_.js → index-ChfpFIIo.js} +52 -52
  41. package/dist/{index-GOk9tc6o.js → index-Cjn-Nipt.js} +2 -2
  42. package/dist/{index-BHkXSoxP.cjs → index-ClnJ1K8q.cjs} +1 -1
  43. package/dist/{index-DPLITXsJ.js → index-CqzA5JZV.js} +21 -21
  44. package/dist/{index-DbW_sD5N.cjs → index-Ct6AnOh0.cjs} +1 -1
  45. package/dist/{index-B3_Z46NG.cjs → index-Cv9MOPos.cjs} +1 -1
  46. package/dist/{index-BopRIRaa.js → index-D2FUUF0p.js} +3311 -3300
  47. package/dist/{index-bhZxftEb.js → index-D62RCkPJ.js} +6 -6
  48. package/dist/{index-CV-9wRXp.cjs → index-DATWIRSp.cjs} +1 -1
  49. package/dist/{index-RfA-XD5A.cjs → index-DBiP81co.cjs} +1 -1
  50. package/dist/{index-BahsZur-.cjs → index-DBpviAty.cjs} +1 -1
  51. package/dist/{index-CvI-Xndo.js → index-DHUPGceO.js} +1 -1
  52. package/dist/{index-CizvuDrT.cjs → index-DKnofcM3.cjs} +1 -1
  53. package/dist/{index-BA_mOmgl.js → index-DWR446SX.js} +40 -40
  54. package/dist/{index-CnasZ7DR.cjs → index-DXY5_0gS.cjs} +1 -1
  55. package/dist/{index-D4X5ZbsB.cjs → index-DcSxvtLy.cjs} +1 -1
  56. package/dist/{index-CcKVjgvm.js → index-DdWJf1s4.js} +2 -2
  57. package/dist/{index-DHOgfCKk.js → index-De7WEvrP.js} +6 -6
  58. package/dist/{index-Ci05kJVO.cjs → index-DeakNivq.cjs} +1 -1
  59. package/dist/{index-Bha2dAuG.cjs → index-DfdAKUNR.cjs} +1 -1
  60. package/dist/{index-w9_VhKWc.cjs → index-DpzDQdE3.cjs} +1 -1
  61. package/dist/{index-DynEv7dZ.cjs → index-Idro_h24.cjs} +1 -1
  62. package/dist/{index-CTIVfb14.js → index-K4IHDJhC.js} +3 -3
  63. package/dist/{index-BOfa3R-1.cjs → index-XPbPRVHs.cjs} +1 -1
  64. package/dist/{index-DalL4U6b.js → index-XWSpT0ba.js} +8 -8
  65. package/dist/{index-C8YYklCT.cjs → index-Z3NUprRN.cjs} +1 -1
  66. package/dist/{index-ExjSK4s1.cjs → index-a9MrfjsX.cjs} +1 -1
  67. package/dist/{index-CowSp0mU.js → index-d2eZUUOL.js} +4 -4
  68. package/dist/{index-BwL33eO2.js → index-dg2e5vzL.js} +2 -2
  69. package/dist/{index-CX9ZToOe.js → index-diSrIKAW.js} +303 -303
  70. package/dist/{index-BWDmAGYH.js → index-dz7-iyTs.js} +8 -8
  71. package/dist/{index-CWQAImyg.js → index-nvemkzcE.js} +2 -2
  72. package/dist/{index-h5XWazmL.cjs → index-osFjwxXn.cjs} +1 -1
  73. package/dist/{index-peUgec1X.js → index-rGGHn9oX.js} +1268 -1267
  74. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BV1JZ-3O.js +38949 -0
  75. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DNHgx7h4.cjs +37 -0
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CTRnGkVw.js} +1649 -1644
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DupRlL-E.cjs} +124 -124
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DTRpzofW.js → index.vue_vue_type_style_index_0_scoped_92477073_lang--woCJ_em.js} +13 -13
  79. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DaxZVXAO.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-COe_Ck32.cjs} +1 -1
  80. package/dist/index.vue_vue_type_style_index_1_lang-6KO-EDQa.js +8293 -0
  81. package/dist/{index.vue_vue_type_style_index_1_lang-BgqA98cE.cjs → index.vue_vue_type_style_index_1_lang-CKpfQuiD.cjs} +1 -1
  82. package/dist/index.vue_vue_type_style_index_1_lang-Cb4_k0AS.cjs +32 -0
  83. package/dist/{index.vue_vue_type_style_index_1_lang-BX_Iweoa.js → index.vue_vue_type_style_index_1_lang-jt5oqPmv.js} +5 -5
  84. package/dist/{isString-D6Z6SOrb.cjs → isString--eJE54G5.cjs} +1 -1
  85. package/dist/{isString-DBnuELeA.js → isString-By6KKNvg.js} +1 -1
  86. package/dist/{main-BnGiV5RB.cjs → main-Brifss3R.cjs} +1 -1
  87. package/dist/{main-DHZFoZje.js → main-DENbrJLK.js} +5 -5
  88. package/dist/obj/model.mtl +42 -0
  89. package/dist/obj/model.obj +26110 -0
  90. package/dist/ss-component.cjs +1 -1
  91. package/dist/ss-component.css +1 -1
  92. package/dist/ss-component.js +11 -11
  93. package/dist/ss-component2.cjs +1 -1
  94. package/dist/ss-component2.js +12 -12
  95. package/dist/{threeModel-BkNMl4gC.js → threeModel-CpklGUZ5.js} +5 -5
  96. package/dist/{threeModel-BHsadPD8.cjs → threeModel-DxxkXyt5.cjs} +1 -1
  97. package/dist/{threePreview-BhHpGgi8.js → threePreview-BsPiIokT.js} +4 -4
  98. package/dist/{threePreview-q2XmhoL-.cjs → threePreview-Sh0ABsnX.cjs} +1 -1
  99. package/dist/{threeSceneView-D_2JHUdz.cjs → threeSceneView-DfiXbOBr.cjs} +1 -1
  100. package/dist/{threeSceneView-CDFoPU6x.js → threeSceneView-Dm3k49Mh.js} +87 -87
  101. package/dist/{threeSceneViewForCPMPIP-BBelwG21.js → threeSceneViewForCPMPIP-Czp3KJaA.js} +57 -57
  102. package/dist/{threeSceneViewForCPMPIP-DSIkOvjL.cjs → threeSceneViewForCPMPIP-XTc0zag-.cjs} +1 -1
  103. package/dist/{threeTrackPathView-CeCre9ru.js → threeTrackPathView-DaEDYBsf.js} +6 -6
  104. package/dist/{threeTrackPathView-CClVyd1p.cjs → threeTrackPathView-Dmp5NZVO.cjs} +1 -1
  105. package/dist/{threeViewerHost-B2ROtL1I.cjs → threeViewerHost-C07FM01K.cjs} +1 -1
  106. package/dist/{threeViewerHost-DLd9bynL.js → threeViewerHost-tA5hwts8.js} +14 -14
  107. package/dist/{urdfTree-vu4m_HnH.js → urdfTree-C5eDsIZV.js} +1 -1
  108. package/dist/{urdfTree-B2NsYdY-.cjs → urdfTree-CNAusPWp.cjs} +1 -1
  109. package/dist/{workpieceTreePanel-CXVtdZfX.js → workpieceTreePanel-BE_ayLjw.js} +5 -5
  110. package/dist/{workpieceTreePanel-Dif_gJAG.cjs → workpieceTreePanel-DMnR0vK-.cjs} +1 -1
  111. package/package.json +1 -1
  112. package/public/config.js +2 -2
  113. package/public/obj/model.mtl +42 -0
  114. package/public/obj/model.obj +26110 -0
  115. package/dist/index-DEBf-IBT.cjs +0 -21
  116. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B8Lpp-LG.js +0 -38138
  117. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-yBjOSB4T.cjs +0 -56
  118. package/dist/index.vue_vue_type_style_index_1_lang-CWCaf0OP.js +0 -8415
  119. package/dist/index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs +0 -32
@@ -1,32 +0,0 @@
1
- "use strict";const f=require("./index-DEBf-IBT.cjs"),l=require("vue");function ba(e){return e}function Ho(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 Uo=800,$o=16,zo=Date.now;function qo(e){var n=0,t=0;return function(){var r=zo(),i=$o-(r-t);if(t=r,i>0){if(++n>=Uo)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function jo(e){return function(){return e}}var Go=f.defineProperty?function(e,n){return f.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:jo(n),writable:!0})}:ba,Sa=qo(Go),Ri=Math.max;function Ea(e,n,t){return n=Ri(n===void 0?e.length-1:n,0),function(){for(var r=arguments,i=-1,a=Ri(r.length-n,0),o=Array(a);++i<a;)o[i]=r[n+i];i=-1;for(var s=Array(n+1);++i<n;)s[i]=r[i];return s[n]=t(o),Ho(e,this,s)}}var Ni=f.Symbol?f.Symbol.isConcatSpreadable:void 0;function Wo(e){return f.isArray(e)||f.isArguments(e)||!!(Ni&&e&&e[Ni])}function Er(e,n,t,r,i){var a=-1,o=e.length;for(t||(t=Wo),i||(i=[]);++a<o;){var s=e[a];n>0&&t(s)?n>1?Er(s,n-1,t,r,i):f.arrayPush(i,s):r||(i[i.length]=s)}return i}function Ta(e){var n=e==null?0:e.length;return n?Er(e,1):[]}function Da(e){return Sa(Ea(e,void 0,Ta),e+"")}var Yo="__lodash_hash_undefined__";function Jo(e){return this.__data__.set(e,Yo),this}function Zo(e){return this.__data__.has(e)}function Jt(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new f.MapCache;++n<t;)this.add(e[n])}Jt.prototype.add=Jt.prototype.push=Jo;Jt.prototype.has=Zo;function Xo(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 ka(e,n){return e.has(n)}var Qo=1,es=2;function Aa(e,n,t,r,i,a){var o=t&Qo,s=e.length,c=n.length;if(s!=c&&!(o&&c>s))return!1;var u=a.get(e),p=a.get(n);if(u&&p)return u==n&&p==e;var h=-1,g=!0,y=t&es?new Jt:void 0;for(a.set(e,n),a.set(n,e);++h<s;){var d=e[h],m=n[h];if(r)var v=o?r(m,d,h,n,e,a):r(d,m,h,e,n,a);if(v!==void 0){if(v)continue;g=!1;break}if(y){if(!Xo(n,function(b,S){if(!ka(y,S)&&(d===b||i(d,b,t,r,a)))return y.push(S)})){g=!1;break}}else if(!(d===m||i(d,m,t,r,a))){g=!1;break}}return a.delete(e),a.delete(n),g}function ts(e){var n=-1,t=Array(e.size);return e.forEach(function(r,i){t[++n]=[i,r]}),t}function wa(e){var n=-1,t=Array(e.size);return e.forEach(function(r){t[++n]=r}),t}var ns=1,rs=2,is="[object Boolean]",as="[object Date]",os="[object Error]",ss="[object Map]",ls="[object Number]",us="[object RegExp]",cs="[object Set]",fs="[object String]",hs="[object Symbol]",ps="[object ArrayBuffer]",ds="[object DataView]",Oi=f.Symbol?f.Symbol.prototype:void 0,$n=Oi?Oi.valueOf:void 0;function ys(e,n,t,r,i,a,o){switch(t){case ds:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case ps:return!(e.byteLength!=n.byteLength||!a(new f.Uint8Array(e),new f.Uint8Array(n)));case is:case as:case ls:return f.eq(+e,+n);case os:return e.name==n.name&&e.message==n.message;case us:case fs:return e==n+"";case ss:var s=ts;case cs:var c=r&ns;if(s||(s=wa),e.size!=n.size&&!c)return!1;var u=o.get(e);if(u)return u==n;r|=rs,o.set(e,n);var p=Aa(s(e),s(n),r,i,a,o);return o.delete(e),p;case hs:if($n)return $n.call(e)==$n.call(n)}return!1}var gs=1,vs=Object.prototype,ms=vs.hasOwnProperty;function bs(e,n,t,r,i,a){var o=t&gs,s=f.getAllKeys(e),c=s.length,u=f.getAllKeys(n),p=u.length;if(c!=p&&!o)return!1;for(var h=c;h--;){var g=s[h];if(!(o?g in n:ms.call(n,g)))return!1}var y=a.get(e),d=a.get(n);if(y&&d)return y==n&&d==e;var m=!0;a.set(e,n),a.set(n,e);for(var v=o;++h<c;){g=s[h];var b=e[g],S=n[g];if(r)var N=o?r(S,b,g,n,e,a):r(b,S,g,e,n,a);if(!(N===void 0?b===S||i(b,S,t,r,a):N)){m=!1;break}v||(v=g=="constructor")}if(m&&!v){var D=e.constructor,x=n.constructor;D!=x&&"constructor"in e&&"constructor"in n&&!(typeof D=="function"&&D instanceof D&&typeof x=="function"&&x instanceof x)&&(m=!1)}return a.delete(e),a.delete(n),m}var Ss=1,Pi="[object Arguments]",Fi="[object Array]",sn="[object Object]",Es=Object.prototype,Li=Es.hasOwnProperty;function Ts(e,n,t,r,i,a){var o=f.isArray(e),s=f.isArray(n),c=o?Fi:f.getTag(e),u=s?Fi:f.getTag(n);c=c==Pi?sn:c,u=u==Pi?sn:u;var p=c==sn,h=u==sn,g=c==u;if(g&&f.isBuffer(e)){if(!f.isBuffer(n))return!1;o=!0,p=!1}if(g&&!p)return a||(a=new f.Stack),o||f.isTypedArray(e)?Aa(e,n,t,r,i,a):ys(e,n,c,t,r,i,a);if(!(t&Ss)){var y=p&&Li.call(e,"__wrapped__"),d=h&&Li.call(n,"__wrapped__");if(y||d){var m=y?e.value():e,v=d?n.value():n;return a||(a=new f.Stack),i(m,v,t,r,a)}}return g?(a||(a=new f.Stack),bs(e,n,t,r,i,a)):!1}function Tr(e,n,t,r,i){return e===n?!0:e==null||n==null||!f.isObjectLike(e)&&!f.isObjectLike(n)?e!==e&&n!==n:Ts(e,n,t,r,Tr,i)}function Ds(e,n){return e!=null&&n in Object(e)}function ks(e,n,t){n=f.castPath(n,e);for(var r=-1,i=n.length,a=!1;++r<i;){var o=f.toKey(n[r]);if(!(a=e!=null&&t(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&f.isLength(i)&&f.isIndex(o,i)&&(f.isArray(e)||f.isArguments(e)))}function Ia(e,n){return e!=null&&ks(e,n,Ds)}function xa(e,n){return Tr(e,n)}function As(e,n,t){for(var r=-1,i=n.length,a={};++r<i;){var o=n[r],s=f.baseGet(e,o);t(s,o)&&f.baseSet(a,f.castPath(o,e),s)}return a}function ws(e,n){return As(e,n,function(t,r){return Ia(e,r)})}var Ba=Da(function(e,n){return e==null?{}:ws(e,n)});const kn="update:modelValue",ir="change",ar="input";function Is(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 Ca=e=>f.isClient?window.requestAnimationFrame(e):setTimeout(e,16),Ma=e=>f.isClient?window.cancelAnimationFrame(e):clearTimeout(e),xs=(e,n)=>{if(!f.isClient)return!1;const t={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(n)],r=f.getStyle(e,t);return["scroll","auto","overlay"].some(i=>r.includes(i))},Bs=(e,n)=>{if(!f.isClient)return;let t=e;for(;t;){if([window,document,document.documentElement].includes(t))return window;if(xs(t,n))return t;t=t.parentNode}return t};let ln;const Ra=e=>{var n;if(!f.isClient)return 0;if(ln!==void 0)return ln;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 a=i.offsetWidth;return(n=t.parentNode)==null||n.removeChild(t),ln=r-a,ln};function Cs(e,n){if(!f.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),a=i+n.offsetHeight,o=e.scrollTop,s=o+e.clientHeight;i<o?e.scrollTop=i:a>s&&(e.scrollTop=a-e.clientHeight)}function Ms(e,n,t,r,i){const a=Date.now();let o;const s=()=>{const u=Date.now()-a,p=Is(u>r?r:u,n,t,r);f.isWindow(e)?e.scrollTo(window.pageXOffset,p):e.scrollTop=p,u<r?o=Ca(s):f.isFunction(i)&&i()};return s(),()=>{o&&Ma(o)}}const Rs=(e,n)=>f.isWindow(n)?e.ownerDocument.documentElement:n,Ns=e=>f.isWindow(e)?window.scrollY:e.scrollTop,Na=()=>f.isClient&&/firefox/i.test(window.navigator.userAgent);let qe;const Os={height:"0",visibility:"hidden",overflow:Na()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ps=["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 Fs(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:Ps.map(o=>[o,n.getPropertyValue(o)]),paddingSize:r,borderSize:i,boxSizing:t}}function Ki(e,n=1,t){var r;qe||(qe=document.createElement("textarea"),document.body.appendChild(qe));const{paddingSize:i,borderSize:a,boxSizing:o,contextStyle:s}=Fs(e);s.forEach(([h,g])=>qe==null?void 0:qe.style.setProperty(h,g)),Object.entries(Os).forEach(([h,g])=>qe==null?void 0:qe.style.setProperty(h,g,"important")),qe.value=e.value||e.placeholder||"";let c=qe.scrollHeight;const u={};o==="border-box"?c=c+a:o==="content-box"&&(c=c-i),qe.value="";const p=qe.scrollHeight-i;if(f.isNumber(n)){let h=p*n;o==="border-box"&&(h=h+i+a),c=Math.max(h,c),u.minHeight=`${h}px`}if(f.isNumber(t)){let h=p*t;o==="border-box"&&(h=h+i+a),c=Math.min(h,c)}return u.height=`${c}px`,(r=qe.parentNode)==null||r.removeChild(qe),qe=void 0,u}const Ls=f.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Oa=e=>Ba(Ls,e),Pa=f.buildProps({id:{type:String,default:void 0},size:f.useSizeProp,disabled:Boolean,modelValue:{type:f.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:f.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:f.iconPropType},prefixIcon:{type:f.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:f.definePropType([Object,Array,String]),default:()=>f.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...Oa(["ariaLabel"])}),Ks={[kn]:e=>f.isString(e),input:e=>f.isString(e),change:e=>f.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},_s=["class","style"],Vs=/^on[A-Z]/,Fa=(e={})=>{const{excludeListeners:n=!1,excludeKeys:t}=e,r=l.computed(()=>((t==null?void 0:t.value)||[]).concat(_s)),i=l.getCurrentInstance();return i?l.computed(()=>{var a;return f.fromPairs(Object.entries((a=i.proxy)==null?void 0:a.$attrs).filter(([o])=>!r.value.includes(o)&&!(n&&Vs.test(o))))}):(f.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),l.computed(()=>({})))},or={prefix:Math.floor(Math.random()*1e4),current:0},Hs=Symbol("elIdInjection"),La=()=>l.getCurrentInstance()?l.inject(Hs,or):or,An=e=>{const n=La();!f.isClient&&n===or&&f.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=f.useGetDerivedNamespace();return f.computedEager(()=>l.unref(e)||`${t.value}-id-${n.prefix}-${n.current++}`)},Nn=Symbol("formContextKey"),Dr=Symbol("formItemContextKey"),kr=()=>{const e=l.inject(Nn,void 0),n=l.inject(Dr,void 0);return{form:e,formItem:n}},Ka=(e,{formItemContext:n,disableIdGeneration:t,disableIdManagement:r})=>{t||(t=l.ref(!1)),r||(r=l.ref(!1));const i=l.ref();let a;const o=l.computed(()=>{var s;return!!(!(e.label||e.ariaLabel)&&n&&n.inputIds&&((s=n.inputIds)==null?void 0:s.length)<=1)});return l.onMounted(()=>{a=l.watch([l.toRef(e,"id"),t],([s,c])=>{const u=s??(c?void 0:An().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(()=>{a&&a(),n!=null&&n.removeInputId&&i.value&&n.removeInputId(i.value)}),{isLabeledByFormItem:o,inputId:i}},_a=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]})},Ar=(e,n={})=>{const t=l.ref(void 0),r=n.prop?t:_a("size"),i=n.global?t:f.useGlobalSize(),a=n.form?{size:void 0}:l.inject(Nn,void 0),o=n.formItem?{size:void 0}:l.inject(Dr,void 0);return l.computed(()=>r.value||l.unref(e)||(o==null?void 0:o.size)||(a==null?void 0:a.size)||i.value||"")},en=e=>{const n=_a("disabled"),t=l.inject(Nn,void 0);return l.computed(()=>n.value||l.unref(e)||(t==null?void 0:t.disabled)||!1)},Us='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',$s=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,_i=e=>Array.from(e.querySelectorAll(Us)).filter(n=>On(n)&&$s(n)),On=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},zs=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},Va=e=>!e.getAttribute("aria-owns"),qs=(e,n,t)=>{const{parentNode:r}=e;if(!r)return null;const i=r.querySelectorAll(t),a=Array.prototype.indexOf.call(i,e);return i[a+n]||null},js=e=>{e&&(e.focus(),!Va(e)&&e.click())};function Ha(e,{beforeFocus:n,afterFocus:t,beforeBlur:r,afterBlur:i}={}){const a=l.getCurrentInstance(),{emit:o}=a,s=l.shallowRef(),c=en(),u=l.ref(!1),p=y=>{f.isFunction(n)&&n(y)||u.value||(u.value=!0,o("focus",y),t==null||t())},h=y=>{var d;f.isFunction(r)&&r(y)||y.relatedTarget&&((d=s.value)!=null&&d.contains(y.relatedTarget))||(u.value=!1,o("blur",y),i==null||i())},g=y=>{var d,m;(d=s.value)!=null&&d.contains(document.activeElement)&&s.value!==document.activeElement||On(y.target)||c.value||(m=e.value)==null||m.focus()};return l.watch([s,c],([y,d])=>{y&&(d?y.removeAttribute("tabindex"):y.setAttribute("tabindex","-1"))}),f.useEventListener(s,"focus",p,!0),f.useEventListener(s,"blur",h,!0),f.useEventListener(s,"click",g,!0),process.env.NODE_ENV==="test"&&l.onMounted(()=>{const y=f.isElement(e.value)?e.value:document.querySelector("input,textarea");y&&(f.useEventListener(y,"focus",p,!0),f.useEventListener(y,"blur",h,!0))}),{isFocused:u,wrapperRef:s,handleFocus:p,handleBlur:h}}const Gs=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function Ua({afterComposition:e,emit:n}){const t=l.ref(!1),r=s=>{n==null||n("compositionstart",s),t.value=!0},i=s=>{var c;n==null||n("compositionupdate",s);const u=(c=s.target)==null?void 0:c.value,p=u[u.length-1]||"";t.value=!Gs(p)},a=s=>{n==null||n("compositionend",s),t.value&&(t.value=!1,l.nextTick(()=>e(s)))};return{isComposing:t,handleComposition:s=>{s.type==="compositionend"?a(s):i(s)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:a}}function Ws(e){let n;function t(){if(e.value==null)return;const{selectionStart:i,selectionEnd:a,value:o}=e.value;if(i==null||a==null)return;const s=o.slice(0,Math.max(0,i)),c=o.slice(Math.max(0,a));n={selectionStart:i,selectionEnd:a,value:o,beforeTxt:s,afterTxt:c}}function r(){if(e.value==null||n==null)return;const{value:i}=e.value,{beforeTxt:a,afterTxt:o,selectionStart:s}=n;if(a==null||o==null||s==null)return;let c=i.length;if(i.endsWith(o))c=i.length-o.length;else if(i.startsWith(a))c=a.length;else{const u=a[s-1],p=i.indexOf(u,s-1);p!==-1&&(c=p+1)}e.value.setSelectionRange(c,c)}return[t,r]}const $a="ElInput",Ys=l.defineComponent({name:$a,inheritAttrs:!1}),Js=l.defineComponent({...Ys,props:Pa,emits:Ks,setup(e,{expose:n,emit:t}){const r=e,i=l.useAttrs(),a=Fa(),o=l.useSlots(),s=l.computed(()=>[r.type==="textarea"?m.b():d.b(),d.m(g.value),d.is("disabled",y.value),d.is("exceed",R.value),{[d.b("group")]:o.prepend||o.append,[d.m("prefix")]:o.prefix||r.prefixIcon,[d.m("suffix")]:o.suffix||r.suffixIcon||r.clearable||r.showPassword,[d.bm("suffix","password-clear")]:Z.value&&ae.value,[d.b("hidden")]:r.type==="hidden"},i.class]),c=l.computed(()=>[d.e("wrapper"),d.is("focus",k.value)]),{form:u,formItem:p}=kr(),{inputId:h}=Ka(r,{formItemContext:p}),g=Ar(),y=en(),d=f.useNamespace("input"),m=f.useNamespace("textarea"),v=l.shallowRef(),b=l.shallowRef(),S=l.ref(!1),N=l.ref(!1),D=l.ref(),x=l.shallowRef(r.inputStyle),I=l.computed(()=>v.value||b.value),{wrapperRef:w,isFocused:k,handleFocus:_,handleBlur:T}=Ha(I,{beforeFocus(){return y.value},afterBlur(){var P;r.validateEvent&&((P=p==null?void 0:p.validate)==null||P.call(p,"blur").catch(ge=>f.debugWarn(ge)))}}),B=l.computed(()=>{var P;return(P=u==null?void 0:u.statusIcon)!=null?P:!1}),K=l.computed(()=>(p==null?void 0:p.validateState)||""),H=l.computed(()=>K.value&&f.ValidateComponentsMap[K.value]),ie=l.computed(()=>N.value?f.view_default:f.hide_default),ue=l.computed(()=>[i.style]),z=l.computed(()=>[r.inputStyle,x.value,{resize:r.resize}]),$=l.computed(()=>f.isNil(r.modelValue)?"":String(r.modelValue)),Z=l.computed(()=>r.clearable&&!y.value&&!r.readonly&&!!$.value&&(k.value||S.value)),ae=l.computed(()=>r.showPassword&&!y.value&&!!$.value),he=l.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!y.value&&!r.readonly&&!r.showPassword),j=l.computed(()=>$.value.length),R=l.computed(()=>!!he.value&&j.value>Number(r.maxlength)),U=l.computed(()=>!!o.suffix||!!r.suffixIcon||Z.value||r.showPassword||he.value||!!K.value&&B.value),[q,X]=Ws(v);f.useResizeObserver(b,P=>{if(de(),!he.value||r.resize!=="both")return;const ge=P[0],{width:Oe}=ge.contentRect;D.value={right:`calc(100% - ${Oe+15+6}px)`}});const fe=()=>{const{type:P,autosize:ge}=r;if(!(!f.isClient||P!=="textarea"||!b.value))if(ge){const Oe=f.isObject$1(ge)?ge.minRows:void 0,Xe=f.isObject$1(ge)?ge.maxRows:void 0,it=Ki(b.value,Oe,Xe);x.value={overflowY:"hidden",...it},l.nextTick(()=>{b.value.offsetHeight,x.value=it})}else x.value={minHeight:Ki(b.value).minHeight}},de=(P=>{let ge=!1;return()=>{var Oe;if(ge||!r.autosize)return;((Oe=b.value)==null?void 0:Oe.offsetParent)===null||(P(),ge=!0)}})(fe),Se=()=>{const P=I.value,ge=r.formatter?r.formatter($.value):$.value;!P||P.value===ge||(P.value=ge)},Q=async P=>{q();let{value:ge}=P.target;if(r.formatter&&r.parser&&(ge=r.parser(ge)),!Ae.value){if(ge===$.value){Se();return}t(kn,ge),t(ar,ge),await l.nextTick(),Se(),X()}},Ie=P=>{let{value:ge}=P.target;r.formatter&&r.parser&&(ge=r.parser(ge)),t(ir,ge)},{isComposing:Ae,handleCompositionStart:V,handleCompositionUpdate:F,handleCompositionEnd:ye}=Ua({emit:t,afterComposition:Q}),we=()=>{q(),N.value=!N.value,setTimeout(X)},De=()=>{var P;return(P=I.value)==null?void 0:P.focus()},ee=()=>{var P;return(P=I.value)==null?void 0:P.blur()},Ce=P=>{S.value=!1,t("mouseleave",P)},Ee=P=>{S.value=!0,t("mouseenter",P)},G=P=>{t("keydown",P)},me=()=>{var P;(P=I.value)==null||P.select()},Re=()=>{t(kn,""),t(ir,""),t("clear"),t(ar,"")};return l.watch(()=>r.modelValue,()=>{var P;l.nextTick(()=>fe()),r.validateEvent&&((P=p==null?void 0:p.validate)==null||P.call(p,"change").catch(ge=>f.debugWarn(ge)))}),l.watch($,()=>Se()),l.watch(()=>r.type,async()=>{await l.nextTick(),Se(),fe()}),l.onMounted(()=>{!r.formatter&&r.parser&&f.debugWarn($a,"If you set the parser, you also need to set the formatter."),Se(),l.nextTick(fe)}),n({input:v,textarea:b,ref:I,textareaStyle:z,autosize:l.toRef(r,"autosize"),isComposing:Ae,focus:De,blur:ee,select:me,clear:Re,resizeTextarea:fe}),(P,ge)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([l.unref(s),{[l.unref(d).bm("group","append")]:P.$slots.append,[l.unref(d).bm("group","prepend")]:P.$slots.prepend}]),style:l.normalizeStyle(l.unref(ue)),onMouseenter:Ee,onMouseleave:Ce},[l.createCommentVNode(" input "),P.type!=="textarea"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createCommentVNode(" prepend slot "),P.$slots.prepend?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(l.unref(d).be("group","prepend"))},[l.renderSlot(P.$slots,"prepend")],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{ref_key:"wrapperRef",ref:w,class:l.normalizeClass(l.unref(c))},[l.createCommentVNode(" prefix slot "),P.$slots.prefix||P.prefixIcon?(l.openBlock(),l.createElementBlock("span",{key:0,class:l.normalizeClass(l.unref(d).e("prefix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(d).e("prefix-inner"))},[l.renderSlot(P.$slots,"prefix"),P.prefixIcon?(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:0,class:l.normalizeClass(l.unref(d).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(P.prefixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0),l.createElementVNode("input",l.mergeProps({id:l.unref(h),ref_key:"input",ref:v,class:l.unref(d).e("inner")},l.unref(a),{minlength:P.minlength,maxlength:P.maxlength,type:P.showPassword?N.value?"text":"password":P.type,disabled:l.unref(y),readonly:P.readonly,autocomplete:P.autocomplete,tabindex:P.tabindex,"aria-label":P.ariaLabel,placeholder:P.placeholder,style:P.inputStyle,form:P.form,autofocus:P.autofocus,role:P.containerRole,onCompositionstart:l.unref(V),onCompositionupdate:l.unref(F),onCompositionend:l.unref(ye),onInput:Q,onChange:Ie,onKeydown:G}),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(U)?(l.openBlock(),l.createElementBlock("span",{key:1,class:l.normalizeClass(l.unref(d).e("suffix"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(d).e("suffix-inner"))},[!l.unref(Z)||!l.unref(ae)||!l.unref(he)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(P.$slots,"suffix"),P.suffixIcon?(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:0,class:l.normalizeClass(l.unref(d).e("icon"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(P.suffixIcon)))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],64)):l.createCommentVNode("v-if",!0),l.unref(Z)?(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:1,class:l.normalizeClass([l.unref(d).e("icon"),l.unref(d).e("clear")]),onMousedown:l.withModifiers(l.unref(f.NOOP),["prevent"]),onClick:Re},{default:l.withCtx(()=>[l.createVNode(l.unref(f.circle_close_default))]),_:1},8,["class","onMousedown"])):l.createCommentVNode("v-if",!0),l.unref(ae)?(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:2,class:l.normalizeClass([l.unref(d).e("icon"),l.unref(d).e("password")]),onClick:we},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(ie))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.unref(he)?(l.openBlock(),l.createElementBlock("span",{key:3,class:l.normalizeClass(l.unref(d).e("count"))},[l.createElementVNode("span",{class:l.normalizeClass(l.unref(d).e("count-inner"))},l.toDisplayString(l.unref(j))+" / "+l.toDisplayString(P.maxlength),3)],2)):l.createCommentVNode("v-if",!0),l.unref(K)&&l.unref(H)&&l.unref(B)?(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:4,class:l.normalizeClass([l.unref(d).e("icon"),l.unref(d).e("validateIcon"),l.unref(d).is("loading",l.unref(K)==="validating")])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(H))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0)],2)],2)):l.createCommentVNode("v-if",!0)],2),l.createCommentVNode(" append slot "),P.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(d).be("group","append"))},[l.renderSlot(P.$slots,"append")],2)):l.createCommentVNode("v-if",!0)],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createCommentVNode(" textarea "),l.createElementVNode("textarea",l.mergeProps({id:l.unref(h),ref_key:"textarea",ref:b,class:[l.unref(m).e("inner"),l.unref(d).is("focus",l.unref(k))]},l.unref(a),{minlength:P.minlength,maxlength:P.maxlength,tabindex:P.tabindex,disabled:l.unref(y),readonly:P.readonly,autocomplete:P.autocomplete,style:l.unref(z),"aria-label":P.ariaLabel,placeholder:P.placeholder,form:P.form,autofocus:P.autofocus,rows:P.rows,role:P.containerRole,onCompositionstart:l.unref(V),onCompositionupdate:l.unref(F),onCompositionend:l.unref(ye),onInput:Q,onFocus:l.unref(_),onBlur:l.unref(T),onChange:Ie,onKeydown:G}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),l.unref(he)?(l.openBlock(),l.createElementBlock("span",{key:0,style:l.normalizeStyle(D.value),class:l.normalizeClass(l.unref(d).e("count"))},l.toDisplayString(l.unref(j))+" / "+l.toDisplayString(P.maxlength),7)):l.createCommentVNode("v-if",!0)],64))],38))}});var Zs=f._export_sfc(Js,[["__file","input.vue"]]);const za=f.withInstall(Zs),zn="focus-trap.focus-after-trapped",qn="focus-trap.focus-after-released",Xs="focus-trap.focusout-prevented",Vi={cancelable:!0,bubbles:!1},Qs={cancelable:!0,bubbles:!1},Hi="focusAfterTrapped",Ui="focusAfterReleased",qa=Symbol("elFocusTrap"),wr=l.ref(),Pn=l.ref(0),Ir=l.ref(0);let un=0;const ja=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},$i=(e,n)=>{for(const t of e)if(!el(t,n))return t},el=(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},tl=e=>{const n=ja(e),t=$i(n,e),r=$i(n.reverse(),e);return[t,r]},nl=e=>e instanceof HTMLInputElement&&"select"in e,tt=(e,n)=>{if(e&&e.focus){const t=document.activeElement;let r=!1;f.isElement(e)&&!On(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),Ir.value=window.performance.now(),e!==t&&nl(e)&&n&&e.select(),f.isElement(e)&&r&&e.removeAttribute("tabindex")}};function zi(e,n){const t=[...e],r=e.indexOf(n);return r!==-1&&t.splice(r,1),t}const rl=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=zi(e,r),e.unshift(r)},remove:r=>{var i,a;e=zi(e,r),(a=(i=e[0])==null?void 0:i.resume)==null||a.call(i)}}},il=(e,n=!1)=>{const t=document.activeElement;for(const r of e)if(tt(r,n),document.activeElement!==t)return},qi=rl(),al=()=>Pn.value>Ir.value,cn=()=>{wr.value="pointer",Pn.value=window.performance.now()},ji=()=>{wr.value="keyboard",Pn.value=window.performance.now()},ol=()=>(l.onMounted(()=>{un===0&&(document.addEventListener("mousedown",cn),document.addEventListener("touchstart",cn),document.addEventListener("keydown",ji)),un++}),l.onBeforeUnmount(()=>{un--,un<=0&&(document.removeEventListener("mousedown",cn),document.removeEventListener("touchstart",cn),document.removeEventListener("keydown",ji))}),{focusReason:wr,lastUserFocusTimestamp:Pn,lastAutomatedFocusTimestamp:Ir}),fn=e=>new CustomEvent(Xs,{...Qs,detail:e});let Dt=[];const Gi=e=>{e.code===f.EVENT_CODE.esc&&Dt.forEach(n=>n(e))},sl=e=>{l.onMounted(()=>{Dt.length===0&&document.addEventListener("keydown",Gi),f.isClient&&Dt.push(e)}),l.onBeforeUnmount(()=>{Dt=Dt.filter(n=>n!==e),Dt.length===0&&f.isClient&&document.removeEventListener("keydown",Gi)})},ll=l.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Hi,Ui,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const t=l.ref();let r,i;const{focusReason:a}=ol();sl(d=>{e.trapped&&!o.paused&&n("release-requested",d)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=d=>{if(!e.loop&&!e.trapped||o.paused)return;const{code:m,altKey:v,ctrlKey:b,metaKey:S,currentTarget:N,shiftKey:D}=d,{loop:x}=e,I=m===f.EVENT_CODE.tab&&!v&&!b&&!S,w=document.activeElement;if(I&&w){const k=N,[_,T]=tl(k);if(_&&T){if(!D&&w===T){const K=fn({focusReason:a.value});n("focusout-prevented",K),K.defaultPrevented||(d.preventDefault(),x&&tt(_,!0))}else if(D&&[_,k].includes(w)){const K=fn({focusReason:a.value});n("focusout-prevented",K),K.defaultPrevented||(d.preventDefault(),x&&tt(T,!0))}}else if(w===k){const K=fn({focusReason:a.value});n("focusout-prevented",K),K.defaultPrevented||d.preventDefault()}}};l.provide(qa,{focusTrapRef:t,onKeydown:s}),l.watch(()=>e.focusTrapEl,d=>{d&&(t.value=d)},{immediate:!0}),l.watch([t],([d],[m])=>{d&&(d.addEventListener("keydown",s),d.addEventListener("focusin",p),d.addEventListener("focusout",h)),m&&(m.removeEventListener("keydown",s),m.removeEventListener("focusin",p),m.removeEventListener("focusout",h))});const c=d=>{n(Hi,d)},u=d=>n(Ui,d),p=d=>{const m=l.unref(t);if(!m)return;const v=d.target,b=d.relatedTarget,S=v&&m.contains(v);e.trapped||b&&m.contains(b)||(r=b),S&&n("focusin",d),!o.paused&&e.trapped&&(S?i=v:tt(i,!0))},h=d=>{const m=l.unref(t);if(!(o.paused||!m))if(e.trapped){const v=d.relatedTarget;!f.isNil(v)&&!m.contains(v)&&setTimeout(()=>{if(!o.paused&&e.trapped){const b=fn({focusReason:a.value});n("focusout-prevented",b),b.defaultPrevented||tt(i,!0)}},0)}else{const v=d.target;v&&m.contains(v)||n("focusout",d)}};async function g(){await l.nextTick();const d=l.unref(t);if(d){qi.push(o);const m=d.contains(document.activeElement)?r:document.activeElement;if(r=m,!d.contains(m)){const b=new Event(zn,Vi);d.addEventListener(zn,c),d.dispatchEvent(b),b.defaultPrevented||l.nextTick(()=>{let S=e.focusStartEl;f.isString(S)||(tt(S),document.activeElement!==S&&(S="first")),S==="first"&&il(ja(d),!0),(document.activeElement===m||S==="container")&&tt(d)})}}}function y(){const d=l.unref(t);if(d){d.removeEventListener(zn,c);const m=new CustomEvent(qn,{...Vi,detail:{focusReason:a.value}});d.addEventListener(qn,u),d.dispatchEvent(m),!m.defaultPrevented&&(a.value=="keyboard"||!al()||d.contains(document.activeElement))&&tt(r??document.body),d.removeEventListener(qn,u),qi.remove(o)}}return l.onMounted(()=>{e.trapped&&g(),l.watch(()=>e.trapped,d=>{d?g():y()})}),l.onBeforeUnmount(()=>{e.trapped&&y(),t.value&&(t.value.removeEventListener("keydown",s),t.value.removeEventListener("focusin",p),t.value.removeEventListener("focusout",h),t.value=void 0)}),{onKeydown:s}}});function ul(e,n,t,r,i,a){return l.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ga=f._export_sfc(ll,[["render",ul],["__file","focus-trap.vue"]]);const Wa=Symbol("buttonGroupContextKey"),Ya=({from:e,replacement:n,scope:t,version:r,ref:i,type:a="API"},o)=>{l.watch(()=>l.unref(o),s=>{s&&f.debugWarn(t,`[${a}] ${e} is about to be deprecated in version ${r}, please use ${n} instead.
6
- For more detail, please visit: ${i}
7
- `)},{immediate:!0})},cl=(e,n)=>{Ya({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(Wa,void 0),r=f.useGlobalConfig("button"),{form:i}=kr(),a=Ar(l.computed(()=>t==null?void 0:t.size)),o=en(),s=l.ref(),c=l.useSlots(),u=l.computed(()=>{var v;return e.type||(t==null?void 0:t.type)||((v=r.value)==null?void 0:v.type)||""}),p=l.computed(()=>{var v,b,S;return(S=(b=e.autoInsertSpace)!=null?b:(v=r.value)==null?void 0:v.autoInsertSpace)!=null?S:!1}),h=l.computed(()=>{var v,b,S;return(S=(b=e.plain)!=null?b:(v=r.value)==null?void 0:v.plain)!=null?S:!1}),g=l.computed(()=>{var v,b,S;return(S=(b=e.round)!=null?b:(v=r.value)==null?void 0:v.round)!=null?S:!1}),y=l.computed(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),d=l.computed(()=>{var v;const b=(v=c.default)==null?void 0:v.call(c);if(p.value&&(b==null?void 0:b.length)===1){const S=b[0];if((S==null?void 0:S.type)===l.Text){const N=S.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(N.trim())}}return!1});return{_disabled:o,_size:a,_type:u,_ref:s,_props:y,_plain:h,_round:g,shouldAddSpace:d,handleClick:v=>{if(o.value||e.loading){v.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),n("click",v)}}},Ja=["default","primary","success","warning","info","danger","text",""],fl=["button","submit","reset"],sr=f.buildProps({size:f.useSizeProp,disabled:Boolean,type:{type:String,values:Ja,default:""},icon:{type:f.iconPropType},nativeType:{type:String,values:fl,default:"button"},loading:Boolean,loadingIcon:{type:f.iconPropType,default:()=>f.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:f.definePropType([String,Object]),default:"button"}}),hl={click:e=>e instanceof MouseEvent};function Le(e,n){pl(e)&&(e="100%");var t=dl(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 hn(e){return Math.min(1,Math.max(0,e))}function pl(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function dl(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Za(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function pn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function dt(e){return e.length===1?"0"+e:String(e)}function yl(e,n,t){return{r:Le(e,255)*255,g:Le(n,255)*255,b:Le(t,255)*255}}function Wi(e,n,t){e=Le(e,255),n=Le(n,255),t=Le(t,255);var r=Math.max(e,n,t),i=Math.min(e,n,t),a=0,o=0,s=(r+i)/2;if(r===i)o=0,a=0;else{var c=r-i;switch(o=s>.5?c/(2-r-i):c/(r+i),r){case e:a=(n-t)/c+(n<t?6:0);break;case n:a=(t-e)/c+2;break;case t:a=(e-n)/c+4;break}a/=6}return{h:a,s:o,l:s}}function jn(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 gl(e,n,t){var r,i,a;if(e=Le(e,360),n=Le(n,100),t=Le(t,100),n===0)i=t,a=t,r=t;else{var o=t<.5?t*(1+n):t+n-t*n,s=2*t-o;r=jn(s,o,e+1/3),i=jn(s,o,e),a=jn(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function Yi(e,n,t){e=Le(e,255),n=Le(n,255),t=Le(t,255);var r=Math.max(e,n,t),i=Math.min(e,n,t),a=0,o=r,s=r-i,c=r===0?0:s/r;if(r===i)a=0;else{switch(r){case e:a=(n-t)/s+(n<t?6:0);break;case n:a=(t-e)/s+2;break;case t:a=(e-n)/s+4;break}a/=6}return{h:a,s:c,v:o}}function vl(e,n,t){e=Le(e,360)*6,n=Le(n,100),t=Le(t,100);var r=Math.floor(e),i=e-r,a=t*(1-n),o=t*(1-i*n),s=t*(1-(1-i)*n),c=r%6,u=[t,o,a,a,s,t][c],p=[s,t,t,o,a,a][c],h=[a,a,s,t,t,o][c];return{r:u*255,g:p*255,b:h*255}}function Ji(e,n,t,r){var i=[dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(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 ml(e,n,t,r,i){var a=[dt(Math.round(e).toString(16)),dt(Math.round(n).toString(16)),dt(Math.round(t).toString(16)),dt(bl(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function bl(e){return Math.round(parseFloat(e)*255).toString(16)}function Zi(e){return je(e)/255}function je(e){return parseInt(e,16)}function Sl(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var lr={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 El(e){var n={r:0,g:0,b:0},t=1,r=null,i=null,a=null,o=!1,s=!1;return typeof e=="string"&&(e=kl(e)),typeof e=="object"&&(Qe(e.r)&&Qe(e.g)&&Qe(e.b)?(n=yl(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Qe(e.h)&&Qe(e.s)&&Qe(e.v)?(r=pn(e.s),i=pn(e.v),n=vl(e.h,r,i),o=!0,s="hsv"):Qe(e.h)&&Qe(e.s)&&Qe(e.l)&&(r=pn(e.s),a=pn(e.l),n=gl(e.h,r,a),o=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(t=e.a)),t=Za(t),{ok:o,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 Tl="[-\\+]?\\d+%?",Dl="[-\\+]?\\d*\\.\\d+%?",lt="(?:".concat(Dl,")|(?:").concat(Tl,")"),Gn="[\\s|\\(]+(".concat(lt,")[,|\\s]+(").concat(lt,")[,|\\s]+(").concat(lt,")\\s*\\)?"),Wn="[\\s|\\(]+(".concat(lt,")[,|\\s]+(").concat(lt,")[,|\\s]+(").concat(lt,")[,|\\s]+(").concat(lt,")\\s*\\)?"),Je={CSS_UNIT:new RegExp(lt),rgb:new RegExp("rgb"+Gn),rgba:new RegExp("rgba"+Wn),hsl:new RegExp("hsl"+Gn),hsla:new RegExp("hsla"+Wn),hsv:new RegExp("hsv"+Gn),hsva:new RegExp("hsva"+Wn),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 kl(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(lr[e])e=lr[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=Je.rgb.exec(e);return t?{r:t[1],g:t[2],b:t[3]}:(t=Je.rgba.exec(e),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Je.hsl.exec(e),t?{h:t[1],s:t[2],l:t[3]}:(t=Je.hsla.exec(e),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Je.hsv.exec(e),t?{h:t[1],s:t[2],v:t[3]}:(t=Je.hsva.exec(e),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Je.hex8.exec(e),t?{r:je(t[1]),g:je(t[2]),b:je(t[3]),a:Zi(t[4]),format:n?"name":"hex8"}:(t=Je.hex6.exec(e),t?{r:je(t[1]),g:je(t[2]),b:je(t[3]),format:n?"name":"hex"}:(t=Je.hex4.exec(e),t?{r:je(t[1]+t[1]),g:je(t[2]+t[2]),b:je(t[3]+t[3]),a:Zi(t[4]+t[4]),format:n?"name":"hex8"}:(t=Je.hex3.exec(e),t?{r:je(t[1]+t[1]),g:je(t[2]+t[2]),b:je(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Qe(e){return!!Je.CSS_UNIT.exec(String(e))}var Xa=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=Sl(n)),this.originalInput=n;var i=El(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,a=n.r/255,o=n.g/255,s=n.b/255;return a<=.03928?t=a/12.92:t=Math.pow((a+.055)/1.055,2.4),o<=.03928?r=o/12.92:r=Math.pow((o+.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=Za(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=Yi(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=Yi(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=Wi(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=Wi(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),Ji(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),ml(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(Le(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(Le(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="#"+Ji(this.r,this.g,this.b,!1),t=0,r=Object.entries(lr);t<r.length;t++){var i=r[t],a=i[0],o=i[1];if(n===o)return a}return!1},e.prototype.toString=function(n){var t=!!n;n=n??this.format;var r=!1,i=this.a<1&&this.a>=0,a=!t&&i&&(n.startsWith("hex")||n==="name");return a?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=hn(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=hn(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=hn(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=hn(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(),a=t/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return new e(o)},e.prototype.analogous=function(n,t){n===void 0&&(n=6),t===void 0&&(t=30);var r=this.toHsl(),i=360/t,a=[this];for(r.h=(r.h-(i*n>>1)+720)%360;--n;)r.h=(r.h+i)%360,a.push(new e(r));return a},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,a=t.v,o=[],s=1/n;n--;)o.push(new e({h:r,s:i,v:a})),a=(a+s)%1;return o},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],a=360/n,o=1;o<n;o++)i.push(new e({h:(r+o*a)%360,s:t.s,l:t.l}));return i},e.prototype.equals=function(n){return this.toRgbString()===new e(n).toRgbString()},e}();function at(e,n=20){return e.mix("#141414",n).toString()}function Al(e){const n=en(),t=f.useNamespace("button");return l.computed(()=>{let r={},i=e.color;if(i){const a=i.match(/var\((.*?)\)/);a&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const o=new Xa(i),s=e.dark?o.tint(20).toString():at(o,20);if(e.plain)r=t.cssVarBlock({"bg-color":e.dark?at(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?at(o,50):o.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?at(o,90):o.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=e.dark?at(o,50):o.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=e.dark?at(o,80):o.tint(80).toString());else{const c=e.dark?at(o,30):o.tint(30).toString(),u=o.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(r=t.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":c,"hover-text-color":u,"hover-border-color":c,"active-bg-color":s,"active-border-color":s}),n.value){const p=e.dark?at(o,50):o.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=p,r[t.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,r[t.cssVarBlockName("disabled-border-color")]=p}}}return r})}const wl=l.defineComponent({name:"ElButton"}),Il=l.defineComponent({...wl,props:sr,emits:hl,setup(e,{expose:n,emit:t}){const r=e,i=Al(r),a=f.useNamespace("button"),{_ref:o,_size:s,_type:c,_disabled:u,_props:p,_plain:h,_round:g,shouldAddSpace:y,handleClick:d}=cl(r,t),m=l.computed(()=>[a.b(),a.m(c.value),a.m(s.value),a.is("disabled",u.value),a.is("loading",r.loading),a.is("plain",h.value),a.is("round",g.value),a.is("circle",r.circle),a.is("text",r.text),a.is("link",r.link),a.is("has-bg",r.bg)]);return n({ref:o,size:s,type:c,disabled:u,shouldAddSpace:y}),(v,b)=>(l.openBlock(),l.createBlock(l.resolveDynamicComponent(v.tag),l.mergeProps({ref_key:"_ref",ref:o},l.unref(p),{class:l.unref(m),style:l.unref(i),onClick:l.unref(d)}),{default:l.withCtx(()=>[v.loading?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[v.$slots.loading?l.renderSlot(v.$slots,"loading",{key:0}):(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:1,class:l.normalizeClass(l.unref(a).is("loading"))},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(v.loadingIcon)))]),_:1},8,["class"]))],64)):v.icon||v.$slots.icon?(l.openBlock(),l.createBlock(l.unref(f.ElIcon),{key:1},{default:l.withCtx(()=>[v.icon?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(v.icon),{key:0})):l.renderSlot(v.$slots,"icon",{key:1})]),_:3})):l.createCommentVNode("v-if",!0),v.$slots.default?(l.openBlock(),l.createElementBlock("span",{key:2,class:l.normalizeClass({[l.unref(a).em("text","expand")]:l.unref(y)})},[l.renderSlot(v.$slots,"default")],2)):l.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var xl=f._export_sfc(Il,[["__file","button.vue"]]);const Bl={size:sr.size,type:sr.type},Cl=l.defineComponent({name:"ElButtonGroup"}),Ml=l.defineComponent({...Cl,props:Bl,setup(e){const n=e;l.provide(Wa,l.reactive({size:l.toRef(n,"size"),type:l.toRef(n,"type")}));const t=f.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 Qa=f._export_sfc(Ml,[["__file","button-group.vue"]]);const eo=f.withInstall(xl,{ButtonGroup:Qa}),Rl=f.withNoopInstall(Qa),Nl="utils/vue/vnode";var Gt=(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))(Gt||{});function to(e){return l.isVNode(e)&&e.type===l.Fragment}function Ol(e){return l.isVNode(e)&&e.type===l.Comment}function Pl(e){return l.isVNode(e)&&!to(e)&&!Ol(e)}const Fl=e=>{if(!l.isVNode(e))return f.debugWarn(Nl,"[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=>{f.hasOwn(t[i],"default")&&(r[i]=t[i].default)}),Object.keys(n).forEach(i=>{r[f.camelize(i)]=n[i]}),r},Ll=e=>{if(!f.isArray$1(e)||e.length>1)throw new Error("expect to receive a single Vue element child");return e[0]},zt=e=>{const n=f.isArray$1(e)?e:[e],t=[];return n.forEach(r=>{var i;f.isArray$1(r)?t.push(...zt(r)):l.isVNode(r)&&((i=r.component)!=null&&i.subTree)?t.push(r,...zt(r.component.subTree)):l.isVNode(r)&&f.isArray$1(r.children)?t.push(...zt(r.children)):l.isVNode(r)&&r.shapeFlag===2?t.push(...zt(r.type())):t.push(r)}),t},xr=e=>{if(!e)return{onClick:f.NOOP,onMousedown:f.NOOP,onMouseup:f.NOOP};let n=!1,t=!1;return{onClick:o=>{n&&t&&e(o),n=t=!1},onMousedown:o=>{n=o.target===o.currentTarget},onMouseup:o=>{t=o.target===o.currentTarget}}},Kl=f.buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:f.definePropType([String,Array,Object])},zIndex:{type:f.definePropType([String,Number])}}),_l={click:e=>e instanceof MouseEvent},Vl="overlay";var Hl=l.defineComponent({name:"ElOverlay",props:Kl,emits:_l,setup(e,{slots:n,emit:t}){const r=f.useNamespace(Vl),i=c=>{t("click",c)},{onClick:a,onMousedown:o,onMouseup:s}=xr(e.customMaskEvent?void 0:i);return()=>e.mask?l.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:o,onMouseup:s},[l.renderSlot(n,"default")],Gt.STYLE|Gt.CLASS|Gt.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 no=Hl,ro=(e,n,t,r)=>{const i={offsetX:0,offsetY:0},a=(h,g)=>{if(e.value){const{offsetX:y,offsetY:d}=i,m=e.value.getBoundingClientRect(),v=m.left,b=m.top,S=m.width,N=m.height,D=document.documentElement.clientWidth,x=document.documentElement.clientHeight,I=-v+y,w=-b+d,k=D-v-S+y,_=x-b-(N<x?N:0)+d;r!=null&&r.value||(h=Math.min(Math.max(h,I),k),g=Math.min(Math.max(g,w),_)),i.offsetX=h,i.offsetY=g,e.value.style.transform=`translate(${f.addUnit(h)}, ${f.addUnit(g)})`}},o=h=>{const g=h.clientX,y=h.clientY,{offsetX:d,offsetY:m}=i,v=S=>{const N=d+S.clientX-g,D=m+S.clientY-y;a(N,D)},b=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",v),document.addEventListener("mouseup",b)},s=()=>{n.value&&e.value&&(n.value.addEventListener("mousedown",o),window.addEventListener("resize",p))},c=()=>{n.value&&e.value&&(n.value.removeEventListener("mousedown",o),window.removeEventListener("resize",p))},u=()=>{i.offsetX=0,i.offsetY=0,e.value&&(e.value.style.transform="")},p=()=>{const{offsetX:h,offsetY:g}=i;a(h,g)};return l.onMounted(()=>{l.watchEffect(()=>{t.value?s():c()})}),l.onBeforeUnmount(()=>{c()}),{resetPosition:u,updatePosition:p}},io=(e,n={})=>{l.isRef(e)||f.throwError("[useLockscreen]","You need to pass a ref param to this function");const t=n.ns||f.useNamespace("popup"),r=l.computed(()=>t.bm("parent","hidden"));if(!f.isClient||f.hasClass(document.body,r.value))return;let i=0,a=!1,o="0";const s=()=>{setTimeout(()=>{typeof document>"u"||a&&document&&(document.body.style.width=o,f.removeClass(document.body,r.value))},200)};l.watch(e,c=>{if(!c){s();return}a=!f.hasClass(document.body,r.value),a&&(o=document.body.style.width,f.addClass(document.body,r.value)),i=Ra(t.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,p=f.getStyle(document.body,"overflowY");i>0&&(u||p==="scroll")&&a&&(document.body.style.width=`calc(100% - ${i}px)`)}),l.onScopeDispose(()=>s())},ao=e=>["",...f.componentSizes].includes(e),ur="_trap-focus-children",yt=[],Xi=e=>{var n;if(yt.length===0)return;const t=yt[yt.length-1][ur];if(t.length>0&&e.code===f.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],a=e.target===t[t.length-1];if(i&&r&&(e.preventDefault(),t[t.length-1].focus()),a&&!r&&(e.preventDefault(),t[0].focus()),process.env.NODE_ENV==="test"){const o=t.indexOf(e.target);o!==-1&&((n=t[r?o-1:o+1])==null||n.focus())}}},Ul={beforeMount(e){e[ur]=_i(e),yt.push(e),yt.length<=1&&document.addEventListener("keydown",Xi)},updated(e){l.nextTick(()=>{e[ur]=_i(e)})},unmounted(){yt.shift(),yt.length===0&&document.removeEventListener("keydown",Xi)}},$l=l.defineComponent({name:"ElMessageBox",directives:{TrapFocus:Ul},components:{ElButton:eo,ElFocusTrap:Ga,ElInput:za,ElOverlay:no,ElIcon:f.ElIcon,...f.TypeComponents},inheritAttrs:!1,props:{buttonSize:{type:String,validator:ao},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:a}=f.useGlobalComponentSettings("message-box",l.computed(()=>e.buttonSize)),{t:o}=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(f.loading_default),cancelButtonLoadingIcon:l.markRaw(f.loading_default),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),p=l.computed(()=>{const z=u.type;return{[i.bm("icon",z)]:z&&f.TypeComponentsMap[z]}}),h=An(),g=An(),y=l.computed(()=>{const z=u.type;return u.icon||z&&f.TypeComponentsMap[z]||""}),d=l.computed(()=>!!u.message),m=l.ref(),v=l.ref(),b=l.ref(),S=l.ref(),N=l.ref(),D=l.computed(()=>u.confirmButtonClass);l.watch(()=>u.inputValue,async z=>{await l.nextTick(),e.boxType==="prompt"&&z&&K()},{immediate:!0}),l.watch(()=>c.value,z=>{var $,Z;z&&(e.boxType!=="prompt"&&(u.autofocus?b.value=(Z=($=N.value)==null?void 0:$.$el)!=null?Z:m.value:b.value=m.value),u.zIndex=s()),e.boxType==="prompt"&&(z?l.nextTick().then(()=>{var ae;S.value&&S.value.$el&&(u.autofocus?b.value=(ae=H())!=null?ae:m.value:b.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=l.computed(()=>e.draggable),I=l.computed(()=>e.overflow);ro(m,v,x,I),l.onMounted(async()=>{await l.nextTick(),e.closeOnHashChange&&window.addEventListener("hashchange",w)}),l.onBeforeUnmount(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",w)});function w(){c.value&&(c.value=!1,l.nextTick(()=>{u.action&&n("action",u.action)}))}const k=()=>{e.closeOnClickModal&&B(u.distinguishCancelAndClose?"close":"cancel")},_=xr(k),T=z=>{if(u.inputType!=="textarea")return z.preventDefault(),B("confirm")},B=z=>{var $;e.boxType==="prompt"&&z==="confirm"&&!K()||(u.action=z,u.beforeClose?($=u.beforeClose)==null||$.call(u,z,u,w):w())},K=()=>{if(e.boxType==="prompt"){const z=u.inputPattern;if(z&&!z.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;const $=u.inputValidator;if(f.isFunction($)){const Z=$(u.inputValue);if(Z===!1)return u.editorErrorMessage=u.inputErrorMessage||o("el.messagebox.error"),u.validateError=!0,!1;if(f.isString(Z))return u.editorErrorMessage=Z,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},H=()=>{var z,$;const Z=(z=S.value)==null?void 0:z.$refs;return($=Z==null?void 0:Z.input)!=null?$:Z==null?void 0:Z.textarea},ie=()=>{B("close")},ue=()=>{e.closeOnPressEscape&&ie()};return e.lockScroll&&io(c),{...l.toRefs(u),ns:i,overlayEvent:_,visible:c,hasMessage:d,typeClass:p,contentId:h,inputId:g,btnSize:a,iconComponent:y,confirmButtonClasses:D,rootRef:m,focusStartRef:b,headerRef:v,inputRef:S,confirmRef:N,doClose:w,handleClose:ie,onCloseRequested:ue,handleWrapperClick:k,handleInputEnter:T,handleAction:B,t:o}}});function zl(e,n,t,r,i,a){const o=l.resolveComponent("el-icon"),s=l.resolveComponent("el-input"),c=l.resolveComponent("el-button"),u=l.resolveComponent("el-focus-trap"),p=l.resolveComponent("el-overlay");return l.openBlock(),l.createBlock(l.Transition,{name:"fade-in-linear",onAfterLeave:h=>e.$emit("vanish"),persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createVNode(p,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:l.withCtx(()=>[l.createElementVNode("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:l.normalizeClass(`${e.ns.namespace.value}-overlay-message-box`),onClick:e.overlayEvent.onClick,onMousedown:e.overlayEvent.onMousedown,onMouseup:e.overlayEvent.onMouseup},[l.createVNode(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:l.withCtx(()=>[l.createElementVNode("div",{ref:"rootRef",class:l.normalizeClass([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:l.normalizeStyle(e.customStyle),tabindex:"-1",onClick:l.withModifiers(()=>{},["stop"])},[e.title!==null&&e.title!==void 0?(l.openBlock(),l.createElementBlock("div",{key:0,ref:"headerRef",class:l.normalizeClass([e.ns.e("header"),{"show-close":e.showClose}])},[l.createElementVNode("div",{class:l.normalizeClass(e.ns.e("title"))},[e.iconComponent&&e.center?(l.openBlock(),l.createBlock(o,{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(o,{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(o,{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 ql=f._export_sfc($l,[["render",zl],["__file","index.vue"]]);const Zt=new Map,jl=e=>{let n=document.body;return e.appendTo&&(f.isString(e.appendTo)&&(n=document.querySelector(e.appendTo)),f.isElement(e.appendTo)&&(n=e.appendTo),f.isElement(n)||(f.debugWarn("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body)),n},Gl=(e,n,t=null)=>{const r=l.createVNode(ql,e,f.isFunction(e.message)||l.isVNode(e.message)?{default:f.isFunction(e.message)?e.message:()=>e.message}:null);return r.appContext=t,l.render(r,n),jl(e).appendChild(n.firstElementChild),r.component},Wl=()=>document.createElement("div"),Yl=(e,n)=>{const t=Wl();e.onVanish=()=>{l.render(null,t),Zt.delete(i)},e.onAction=a=>{const o=Zt.get(i);let s;e.showInput?s={value:i.inputValue,action:a}:s=a,e.callback?e.callback(s,r.proxy):a==="cancel"||a==="close"?e.distinguishCancelAndClose&&a!=="cancel"?o.reject("close"):o.reject("cancel"):o.resolve(s)};const r=Gl(e,t,n),i=r.proxy;for(const a in e)f.hasOwn(e,a)&&!f.hasOwn(i.$props,a)&&(a==="closeIcon"&&f.isObject$1(e[a])?i[a]=l.markRaw(e[a]):i[a]=e[a]);return i.visible=!0,i};function Lt(e,n=null){if(!f.isClient)return Promise.reject();let t;return f.isString(e)||l.isVNode(e)?e={message:e}:t=e.callback,new Promise((r,i)=>{const a=Yl(e,n??Lt._context);Zt.set(a,{options:e,callback:t,resolve:r,reject:i})})}const Jl=["alert","confirm","prompt"],Zl={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Jl.forEach(e=>{Lt[e]=Xl(e)});function Xl(e){return(n,t,r,i)=>{let a="";return f.isObject$1(t)?(r=t,a=""):f.isUndefined(t)?a="":a=t,Lt(Object.assign({title:a,message:n,type:"",...Zl[e]},r,{boxType:e}),i)}}Lt.close=()=>{Zt.forEach((e,n)=>{n.doClose()}),Zt.clear()};Lt._context=null;const ot=Lt;ot.install=e=>{ot._context=e._context,e.config.globalProperties.$msgbox=ot,e.config.globalProperties.$messageBox=ot,e.config.globalProperties.$alert=ot.alert,e.config.globalProperties.$confirm=ot.confirm,e.config.globalProperties.$prompt=ot.prompt};const oo=ot,Ql=[{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}]}],tn=f.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=f.cloneDeep(this.activeMenuPath),this.activeMenuPath=e)},setActiveMenuOpenPaths(e){this.activeMenuOpenPaths=e},setRawMenus(e){this.rawMenus=e,this.permissionSideMenus=Ql}}}),eu=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],tu=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}],nu=e=>{var a;let n=e;const t=[];let r="",i=0;for(const o of n)i++,o.includes("(")||r.includes("(")||o.includes(")")||r.includes(")")||o.includes("&")||r.includes("&")||o.includes("|")||r.includes("|")?(r+=o.trim(),(((a=f.cloneDeep(r))==null?void 0:a[(r==null?void 0:r.length)-1])===")"||(n==null?void 0:n[i])==="|"||(n==null?void 0:n[i])==="&")&&!(r!=null&&r.includes("&"))&&!(r!=null&&r.includes("|"))?(t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r=""):r==="&&"||r==="||"?(t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r=""):i===(e==null?void 0:e.length)&&(t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),r="")):r+=o.trim();return(r==null?void 0:r.length)!==0&&t.push(r.replace(/\/\*[\s\S]*?\*\//g,"")),t},ru=e=>{var a;let n=e==null?void 0:e.replaceAll("=","#"),t=(a=nu(n))==null?void 0:a.map(o=>(o!=null&&o.includes("(")&&(o="("+(o==null?void 0:o.replaceAll("(",""))),o)),r=[],i={};return t==null||t.forEach((o,s)=>{var c,u,p,h,g;if(!(o!=null&&o.includes("&&"))&&!(o!=null&&o.includes("||"))){let y=o;(o==null?void 0:o[(o==null?void 0:o.length)-1])===")"&&(y=o.slice(0,(o==null?void 0:o.length)-1)),(y==null?void 0:y[0])==="("&&(y=y.slice(1,y==null?void 0:y.length)),y!=null&&y.includes("[")&&(y=(h=(c=y==null?void 0:y.slice(1,y==null?void 0:y.length))==null?void 0:c.split(":"))==null?void 0:h[((p=(u=y==null?void 0:y.slice(1,y==null?void 0:y.length))==null?void 0:u.split(":"))==null?void 0:p.length)-1]),y=y==null?void 0:y.split("#");let d=y[0].replaceAll("'","").replaceAll("]",""),m=(g=y[1])==null?void 0:g.replaceAll("'","");(d==null?void 0:d[(d==null?void 0:d.length)-1])!=="!"?i[d]=m:i[d==null?void 0:d.slice(0,(d==null?void 0:d.length)-1)]="!"+m}else o==="&&"||o==="||"&&(r.push(i),i={});s===t.length-1&&(r.push(i),i={})}),r},Fn=f.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),iu=Fn(f.pinia),{multipleTableConst:_e}=f.storeToRefs(iu),rt=e=>{let n=[];function t(i,a=""){Array.isArray(i)&&(i==null||i.forEach(o=>{Array.isArray(o)||(o=[o]),o==null||o.forEach(s=>{var c,u,p,h,g,y,d,m,v,b,S,N;if(!(s!=null&&s.children)||s.children.length===0)s.prop=a===""?s==null?void 0:s.prop:a+_e.value+((h=(c=s==null?void 0:s.prop)==null?void 0:c.split(_e.value))==null?void 0:h[((p=(u=s==null?void 0:s.prop)==null?void 0:u.split(_e.value))==null?void 0:p.length)-1]),n.push(s.prop);else{let D=a===""?a+((m=(g=s==null?void 0:s.prop)==null?void 0:g.split(_e.value))==null?void 0:m[((d=(y=s==null?void 0:s.prop)==null?void 0:y.split(_e.value))==null?void 0:d.length)-1]):a+_e.value+((N=(v=s==null?void 0:s.prop)==null?void 0:v.split(_e.value))==null?void 0:N[((S=(b=s==null?void 0:s.prop)==null?void 0:b.split(_e.value))==null?void 0:S.length)-1]);r(s.children,D)}})}))}function r(i,a=""){i==null||i.forEach(o=>{var s,c,u,p,h,g,y,d,m,v,b,S;if(!(o!=null&&o.children)||o.children.length===0)o.prop=a===""?o==null?void 0:o.prop:a+_e.value+((p=(s=o==null?void 0:o.prop)==null?void 0:s.split(_e.value))==null?void 0:p[((u=(c=o==null?void 0:o.prop)==null?void 0:c.split(_e.value))==null?void 0:u.length)-1]),n.push(o.prop);else{let N=a===""?a+((d=(h=o==null?void 0:o.prop)==null?void 0:h.split(_e.value))==null?void 0:d[((y=(g=o==null?void 0:o.prop)==null?void 0:g.split(_e.value))==null?void 0:y.length)-1]):a+_e.value+((S=(m=o==null?void 0:o.prop)==null?void 0:m.split(_e.value))==null?void 0:S[((b=(v=o==null?void 0:o.prop)==null?void 0:v.split(_e.value))==null?void 0:b.length)-1]);r(o.children,N)}})}return t(e),n},au=(e,n,t)=>{var i;let r=(i=f.cloneDeep(e))==null?void 0:i.map(a=>(a=a.filter(o=>!(o!=null&&o.id)),a));return r=r==null?void 0:r.map(a=>{var o;return a=(o=a.map((s,c)=>{let u={};if(t!=null&&t.find(p=>p===n[c]))return u[n[c]]=s,u}))==null?void 0:o.filter(s=>s),a}),r},ou=(e,n)=>{var o,s;const t=f.cloneDeep(e),r=(o=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:o.contents,i=(s=t==null?void 0:t.find(c=>(c==null?void 0:c.key)==="tableContents"))==null?void 0:s.contents;return au(i,rt(r).slice(0,rt(r).length-1),n)},so=(e,n)=>{const t=n;return e==null?void 0:e.map(r=>{var a;let i=r;if(!Array.isArray(i)){let o=[];for(let s in i)o.push({key:s,value:i==null?void 0:i[s]});return o}return r=(a=i==null?void 0:i.map((o,s)=>{var c,u;return o!=null&&o.id?{key:"id",value:o==null?void 0:o.id}:t!=null&&t.find(p=>p==null?void 0:p.id)||i!=null&&i.find(p=>p==null?void 0:p.id)?{key:(c=t[s-1])==null?void 0:c.label,value:o}:{key:(u=t[s])==null?void 0:u.label,value:o}}))==null?void 0:a.filter(o=>o.key!=="操作"),r})},su=async e=>{var t,r,i,a;let n="";if((r=(t=f.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((o,s)=>{var c,u;s!==((u=(c=f.cloneDeep(e))==null?void 0:c.split("/"))==null?void 0:u.length)-1&&(n=n===""?n+o:n+"/"+o)}),n!==""){let o="";const s=await ht(n,sessionStorage.getItem("systemKey"),"");(a=(i=s==null?void 0:s[0])==null?void 0:i.compData)==null||a.forEach(c=>{var u;(c==null?void 0:c.key)==="tableContents"&&((u=c==null?void 0:c.contents)==null||u.forEach((p,h)=>{if(h===0){let g=p==null?void 0:p.filter(y=>!(y!=null&&y.id));o=n+"/"+(g==null?void 0:g[0])}}))}),await Yt(o,e)}},Ln=e=>{try{return JSON.parse(e),!0}catch{return!1}},Qi=(e,n)=>xa(e,n),lu=f.useLoginState(f.pinia),{loginUserInfo:dn}=f.storeToRefs(lu),Yn=[{key:"@Num",value:"onNumSlice",order:1},{key:"@Select",value:"onRandomContents",order:2},{key:"@Condition",value:"onConditionContents",order:3}],lo=e=>{let n=e;if(n!=null&&n.every(t=>Array.isArray(t))){let t=[];const r=i=>{i==null||i.forEach(a=>{var o;a!=null&&a.children&&((o=a==null?void 0:a.children)==null?void 0:o.length)>0?r(a==null?void 0:a.children):t.push(a)})};return r(n==null?void 0:n[0]),t}else return n},uo=(e,n)=>{let t;Ln(e)?t=JSON.parse(e):t=e;let r=n;(n==null?void 0:n[0])!=="("&&(r="("+n+")");let i=ru(r);if((i==null?void 0:i.length)>0){let a=[];i==null||i.forEach(o=>{var c,u,p,h,g;let s={};for(let y in o){let d=f.cloneDeep(y);d!=null&&d.includes("[")||(o[y].toUpperCase()==="@LOGINUSER"?s[d]=(c=dn.value)!=null&&c.account?(u=dn.value)==null?void 0:u.account:((p=dn.value)==null?void 0:p.姓名)??((h=dn.value)==null?void 0:h.账号):(g=o[y])!=null&&g.includes("[")||(s[d]=o[y]))}a.push(s)}),t=t==null?void 0:t.map(o=>{var c,u;let s=(c=o==null?void 0:o.find(p=>(p==null?void 0:p.key)==="header"))==null?void 0:c.contents;return s=(u=lo(s))==null?void 0:u.filter(p=>(p==null?void 0:p.label)!=="操作"),o=o==null?void 0:o.map(p=>{if((p==null?void 0:p.key)==="tableContents"){let g=so(p==null?void 0:p.contents,s);a==null||a.forEach(y=>{var d;for(let m in y)((d=y[m])==null?void 0:d[0])!=="!"?g=g==null?void 0:g.filter(v=>{var b;return((b=v==null?void 0:v.find(S=>(S==null?void 0:S.key)===m))==null?void 0:b.value)===y[m]}):g=g==null?void 0:g.filter(v=>{var b;return((b=v==null?void 0:v.find(S=>(S==null?void 0:S.key)===m))==null?void 0:b.value)!==y[m]})}),(g==null?void 0:g.length)===0?p.contents=[]:p.contents=g==null?void 0:g.map(y=>{let d={};return y==null||y.forEach(m=>{d[m==null?void 0:m.key]=m==null?void 0:m.value}),d})}return p}),o})}return t},uu=(e,n)=>{let t=JSON.parse(e);return n.toUpperCase()==="ALL"||(t=t==null?void 0:t.map(r=>(r=r==null?void 0:r.map(i=>{var a;return(i==null?void 0:i.key)==="tableContents"&&(i.contents=(a=i.contents)==null?void 0:a.slice(0,parseInt(n))),i}),r))),t},cu=e=>{for(let n=e.length-1;n>0;n--){const t=Math.floor(Math.random()*(n+1));[e[n],e[t]]=[e[t],e[n]]}return e},fu=(e,n)=>{if(n==="Auto")return JSON.parse(e);{let t=JSON.parse(e);return t=t==null?void 0:t.map(r=>(r=r==null?void 0:r.map(i=>((i==null?void 0:i.key)==="tableContents"&&(i.contents=cu(i.contents)),i)),r)),t}},Bt=(e,n)=>Array.isArray(e)?e==null?void 0:e.map(r=>{var i,a,o,s,c,u,p;if(Array.isArray(r)?r=r:r=[r],(i=r==null?void 0:r.filter(h=>!(h!=null&&h.id)||typeof(h==null?void 0:h.id)=="string"))!=null&&i.every(h=>typeof h!="object"||h===null))return r;if((a=r==null?void 0:r.filter(h=>!(h!=null&&h.id)||typeof(h==null?void 0:h.id)=="string"))!=null&&a.some(h=>Array.isArray(h)))return r;{let h=[],g=(r==null?void 0:r.find(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))??{id:(o=r==null?void 0:r[0])==null?void 0:o.id};if(h.push(g),Array.isArray(n==null?void 0:n[0])){const y=(s=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:s[0];(c=Ft(f.cloneDeep(n==null?void 0:n[0])))==null||c.forEach(d=>{h.push(y==null?void 0:y[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}else{const y=(u=r==null?void 0:r.filter(d=>!(d!=null&&d.id)||typeof(d==null?void 0:d.id)=="string"))==null?void 0:u[0];(p=Ft(f.cloneDeep(n)))==null||p.forEach(d=>{h.push(y==null?void 0:y[(d==null?void 0:d.prop)??(d==null?void 0:d.label)??d])})}return h}}):void 0,hu=e=>{var i,a,o,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=(o=(a=f.cloneDeep(n.compData))==null?void 0:a.find(c=>(c==null?void 0:c.key)==="tableIndexColumn"))==null?void 0:o.contents;return(s=f.cloneDeep(n.compData))==null||s.forEach(c=>{if((c==null?void 0:c.key)!=="tableIndexColumn"&&(c==null?void 0:c.key)!=="header")t.push(c);else if((c==null?void 0:c.key)==="header"){let u=c.contents;r&&(u!=null&&u.every(p=>Array.isArray(p))?u==null||u[0].unshift({label:r}):u.unshift({label:r})),t.push({key:"header",contents:u})}}),n.compData=t,n},pu=e=>{var a,o,s,c,u;const n=(a=e.compData)==null?void 0:a.filter(p=>(p==null?void 0:p.key)==="tableContents"||(p==null?void 0:p.key)==="tableIndex"),t=(s=(o=n==null?void 0:n.find(p=>(p==null?void 0:p.key)==="tableIndex"))==null?void 0:o.contents)==null?void 0:s.map(p=>p.label),r=(c=n==null?void 0:n.find(p=>(p==null?void 0:p.key)==="tableContents"))==null?void 0:c.contents;let i=[];return(t==null?void 0:t.length)>0&&(r!=null&&r.every(p=>Array.isArray(p)))?i=t==null?void 0:t.map((p,h)=>r[h]?[p,...r[h]]:[p]):Array.isArray(r==null?void 0:r[0])&&((u=r==null?void 0:r[0])!=null&&u.every(p=>Array.isArray(p)))?i=r==null?void 0:r[0]:Array.isArray(r==null?void 0:r[0])?i=r:i.push(r),i},du=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},yu=e=>{const n=[];function t(r,i=[]){!r||r.length===0||(n.push({key:i==null?void 0:i.filter(a=>!Array.isArray(a)),value:r}),r==null||r.forEach(a=>{a!=null&&a.some(o=>Array.isArray(o))&&t(a.find(o=>Array.isArray(o)),a)}))}return t(e),n},gu=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(a=>!Array.isArray(a)))),r==null||r.forEach(i=>{i!=null&&i.some(a=>Array.isArray(a))&&t(i.find(a=>Array.isArray(a)))}))}return t(e),n},vu=e=>{const n=[];function t(r){var i;!r||r.length===0||(r!=null&&r.every(a=>!Array.isArray(a))?n.push(r):(n.push((i=r==null?void 0:r.map(a=>a==null?void 0:a.filter(o=>!Array.isArray(o))))==null?void 0:i[0]),r==null||r.forEach(a=>{a!=null&&a.some(o=>Array.isArray(o))&&t(a.find(o=>Array.isArray(o)))})))}return t(e),n},mu=(e,n)=>{let t;function r(i,a,o=1){var c;if(!i||i.length===0)return;const s=(c=f.cloneDeep(a))==null?void 0:c.map(u=>u==null?void 0:u.filter(p=>!Array.isArray(p)));return s!=null&&s.find(u=>Qi(u,i==null?void 0:i.key))?(a==null||a.forEach(u=>{!r(i,u.find(h=>Array.isArray(h)))&&Qi(u.filter(h=>!Array.isArray(h)),i==null?void 0:i.key)&&(t={type:o,contents:u.filter(h=>!Array.isArray(h))})}),!0):!1}return r(e,n,0),t},ea=(e,n)=>{function t(r,i){return!r||r.length===0||r==null?void 0:r.map((o,s)=>{var u,p;let c=o;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)),(p=i==null?void 0:i[s])==null?void 0:p.children)),c})}return t(e,n)},bu=e=>{var t,r,i,a,o,s,c,u,p,h,g,y,d,m,v,b,S,N,D,x,I,w,k,_,T;const n=e;if((e==null?void 0:e.comp)==="Table"){if((i=(r=(t=e.compData)==null?void 0:t.find(B=>(B==null?void 0:B.key)==="tableIndex"))==null?void 0:r.contents)!=null&&i.every(B=>!(B!=null&&B.children))||!((a=e.compData)!=null&&a.find(B=>(B==null?void 0:B.key)==="tableIndex")))return((c=(s=(o=n.compData)==null?void 0:o.find(B=>(B==null?void 0:B.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:c.length)===1&&((g=(h=(p=(u=n.compData)==null?void 0:u.find(B=>(B==null?void 0:B.key)==="tableContents"))==null?void 0:p.contents)==null?void 0:h[0])!=null&&g.every(B=>Array.isArray(B)))?(n.compData=(y=n.compData)==null?void 0:y.map(B=>{var K;return(B==null?void 0:B.key)==="tableContents"&&(B.contents=(K=B.contents)==null?void 0:K[0]),B}),[n]):[n];{let B=[];const K=n.compData,H=(d=f.cloneDeep(K))==null?void 0:d.find(j=>(j==null?void 0:j.key)==="tableIndexColumn"),ie=(m=f.cloneDeep(K))==null?void 0:m.find(j=>(j==null?void 0:j.key)==="extraButton"),ue=(v=f.cloneDeep(K))==null?void 0:v.find(j=>(j==null?void 0:j.key)==="rowButton"),z=vu((S=(b=f.cloneDeep(K))==null?void 0:b.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:S.contents),$=(N=f.cloneDeep(K))==null?void 0:N.find(j=>(j==null?void 0:j.key)==="tableIndex"),Z=gu((x=(D=f.cloneDeep(K))==null?void 0:D.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:x.contents),ae=ea((w=(I=f.cloneDeep(K))==null?void 0:I.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:w.contents,$==null?void 0:$.contents),he=yu(ea((_=(k=f.cloneDeep(K))==null?void 0:k.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:_.contents,$==null?void 0:$.contents));if($)return(T=du($.contents))==null||T.forEach((j,R)=>{var q;let U=[];U.push({key:"tableIndex",contents:j}),U.push(H),U.push(ie),U.push(ue),U.push({key:"tableContents",contents:Z[R]}),U.push({key:"header",contents:z!=null&&z[R]?[z==null?void 0:z[R]]:[z==null?void 0:z[0]]}),B.push({comp:"Table",compData:U,name:"",parentTableContents:((q=mu(he[R],ae))==null?void 0:q.contents)??""})}),B}}else return[n]},ct=(e,n)=>{let t={};return Array.isArray(e)?e!=null&&e.find(r=>r==null?void 0:r.id)?e==null||e.forEach((r,i)=>{n!=null&&n[i-1]&&!(r!=null&&r.id)?t[n[i-1]]=r:r!=null&&r.id&&(t.id=r==null?void 0:r.id)}):e==null||e.forEach((r,i)=>{n!=null&&n[i]&&(t[n[i]]=r)}):[e].forEach((r,i)=>{t[n[i]]=r}),t},Su=e=>{var t,r;let n="";return(r=(t=f.cloneDeep(e))==null?void 0:t.split("/"))==null||r.forEach((i,a)=>{var o,s;a<((s=(o=f.cloneDeep(e))==null?void 0:o.split("/"))==null?void 0:s.length)-1&&(n=n===""?n+i:n+"/"+i)}),n},Eu=async e=>{const n=f.cloneDeep(e);let t=[],r=[];n==null||n.forEach(i=>{!(r!=null&&r.find(a=>(a==null?void 0:a.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 a;return i.content=(a=i.content)==null?void 0:a.map(o=>{var s;return o.key={pageKey:(i==null?void 0:i.parentKey)??"",systemKey:((s=o.key)==null?void 0:s.systemKey)??"",version:1,type:"subStructure"},o}),i.content}),(r==null?void 0:r.length)>0&&(t=r==null?void 0:r.map(async i=>{let a;return(i==null?void 0:i.length)>0&&(a=await f.batchAddInsofDataApi({dataList:i})),a})),await Promise.all(t)},Kt=f.defineStore("modelComp",{state:()=>({lockingPage:"",itemData:[],itemGridData:[],itemExtendData:{},originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],systemPath:"",freshContent:!1,routeToChildPath:"",cacheUpdatingData:null,tableViewContents:[],activeItemIndex:-1,tableLoading:!1,pageMapState:{},payloadTypes:"data,structure,structureMethod,gridLayout,extend"}),actions:{setLockingPage(e){this.lockingPage=e},setPageMapState(e){this.pageMapState=e},setItemGridData(e){this.itemGridData=e},setItemExtendData(e){this.itemExtendData=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}}}),Br=f.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),Tu=tn(f.pinia),{activeMenuPath:En}=f.storeToRefs(Tu),co=f.useLoginState(f.pinia),{structureData:Du,loginUserInfo:Jn}=f.storeToRefs(co),ku=Br(f.pinia),{routerPageStructures:Au}=f.storeToRefs(ku),wn=Kt(f.pinia),wu=l.ref([{label:"角色名称",value:"",name:"roleName"}]),Iu=l.ref([{label:"查询"},{label:"重置"}]),ta=l.reactive({isFilter:!1,filterForm:{}}),xu=l.ref(!1),Bu=e=>{ta.isFilter=!0,ta.filterForm=e},fo=l.ref([]),cr=l.ref([]),ho=l.ref(""),Cu=l.computed(()=>{var n,t,r,i,a;const e=(n=Au.value)==null?void 0:n.find(o=>{var s;return((s=o==null?void 0:o.comp)==null?void 0:s.toUpperCase())==="TABLE"});if(e){ho.value=e.name,cr.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 o=(a=e==null?void 0:e.compData)==null?void 0:a.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){let u=[];return xt.value?u=[...s==null?void 0:s.contents,{label:"授权"}]:u=s==null?void 0:s.contents,{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var p,h;return{...u,isTableColHidden:(p=u==null?void 0:u.prop)==null?void 0:p.includes("授权"),isFormColHidden:(h=u==null?void 0:u.prop)==null?void 0:h.includes("授权")}})}:s});return vo(o),o}return[]}),Mu=e=>{wn.setRefreshCurStructure(!1),Fr(e.singleContent,e.buttonName,_n.value,e==null?void 0:e.selectItems)},wt=l.ref({}),Cr=l.ref(),Xt=async(e,n,t)=>{var r,i;try{const a=await e(n);return((r=a==null?void 0:a.data)==null?void 0:r.code)===200?(t!=="查询"&&await co.setLogRecordAsync({type:t,data:n},En.value),f.ElMessage.success("保存成功"),wn.setRefreshCurStructure(!0),a.data.result||((i=a==null?void 0:a.data)==null?void 0:i.code)===200):null}catch(a){f.ElMessage.error(a)}finally{wn.setCacheUpdatingData(null)}},po=(e,n)=>{const t=[];for(const r of e)n!=null&&n.has(r.path)&&t.push(r),r.children&&t.push(...po(r.children,n));return t},Ru=(e,n)=>{var t,r;try{const i=new Map(e==null?void 0:e.map(s=>[s.path,s.checkedButtons])),a=po(n,i),o=(t=a==null?void 0:a.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=Cr.value)==null||r.setCheckedKeys(o)}catch{throw new Error("数据显示处理失败")}},Nu=(e,n)=>{const t=new Map(n==null?void 0:n.map(i=>[i.path,i.checkedButtons]));function r(i){var o,s;const a=(o=i==null?void 0:i.path)!=null&&o.startsWith("/")?(s=i==null?void 0:i.path)==null?void 0:s.substring(1):i==null?void 0:i.path;t.has(a)&&(i.checkedButtons=t.get(a)),i.children&&i.children.length>0&&i.children.forEach(r)}e.forEach(r)},yo=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=yo(t.children)),t}),Mr=e=>{for(const n in e)if(Array.isArray(e[n]))return n;return""},go=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=go(e[t+1]),t+=2):t+=1,n.push(r)}return n},Rr=e=>{const n=[];let t=0;for(;t<(e==null?void 0:e.length);){const r={title:e==null?void 0:e[t]};t+1<(e==null?void 0:e.length)&&Array.isArray(e==null?void 0:e[t+1])?(r.children=go(e==null?void 0:e[t+1]),t+=2):t+=1,n.push(r)}return n},Kn=(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 a={...r,path:i};return r.children&&r.children.length>0&&(a.children=Kn(r.children,i,t)),t.set(i,a),a}),Nr=(e,n)=>e.reduce((t,r)=>{const i=r[n];return t[i]||(t[i]=[]),t[i].push(r),t},{}),Or=e=>{const n=[];function t(r,i){!r.children||r.children.length===0?n.push({...r,parentPath:i||""}):r.children.forEach(a=>t(a,r.path||i))}return e.forEach(r=>t(r,"")),n},Pr=e=>Object.entries(e).map(([t,r])=>({path:t,checkedButtons:r==null?void 0:r.map(i=>i==null?void 0:i.path)})),Ou=e=>Object.prototype.toString.call(e)==="[object Object]"&&e!==null,Pu=(e,n)=>{const t={},r=Array.isArray(e)?e==null?void 0:e.filter(i=>{var a;return!(Ou(i)&&((a=Object.keys(i))!=null&&a.includes("id")))}):null;return r&&(r==null||r.forEach((i,a)=>{var o;t[(o=n[a])==null?void 0:o.prop]=i})),t},It=l.ref(""),vo=e=>{var a;const n=e==null?void 0:e.find(o=>(o==null?void 0:o.key)==="tableContents"),t=e==null?void 0:e.find(o=>(o==null?void 0:o.key)==="header");if(!n||!t)return"";const r=(a=n==null?void 0:n.contents)==null?void 0:a[0],i=Pu(r,t==null?void 0:t.contents);It.value=Mr(i)},Fu=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},Lu=e=>{const n=[];for(const t in e)e[t].forEach(i=>{var c,u;const a=(c=i.path)!=null&&c.startsWith("/")?(u=i.path)==null?void 0:u.substring(1):i.path,o=a==null?void 0:a.split("/");let s=n;o.forEach(p=>{let h=s.find(g=>g.title===p);h||(h={title:p,path:i.path,children:[]},s.push(h)),s=h.children})});return n},Ku=e=>{const n={};return e.forEach(t=>{const{path:r,checkedButtons:i}=t,a=r,o=i.map(s=>({title:s.split("/").pop()||"",path:s,parentPath:a}));n[a]=o}),n},mo=e=>{let n=[];for(const t of e){let r=[t.title];if(t.children&&Array.isArray(t.children)){let i=mo(t.children);i.length>0&&r.push(i)}n.push(r)}return n},_u=e=>{const n=[];for(const t of e){if(!Array.isArray(t)||t.length!==2)continue;const[r,i]=t,a=bo(i),o=n.indexOf(r);o===-1?n.push(r,a):n[o+1]=So(n[o+1],a)}return n},bo=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,bo(i))}}return n},So=(e,n)=>{const t=[...e];let r=0;for(;r<n.length;){const i=n[r];if(typeof i=="string"){const a=t.indexOf(i);a===-1?t.push(i,n[r+1]):t[a+1]=So(t[a+1],n[r+1]),r+=2}else t.push(i),r+=1}return t},Vu=async(e,n)=>{var t;if(wt.value=f.cloneDeep(n),wn.setRefreshCurStructure(!1),(t=Ct.value)==null||t.splice(0),e==="授权"){if(!It.value){f.ElMessage.error("请正确定义角色权限");return}const r=Fu(wt.value[It.value]);let i;if(r)i=wt.value[It.value];else{const a=Rr(wt.value[It.value]),o=Kn(a),s=Or(o),c=Nr(s,"parentPath");i=Pr(c)}if(!i||!Array.isArray(i)){f.ElMessage.error("权限数据处理出错了,请联系管理员");return}gt.title=`【${n.角色名称}】授权`,gt.show=!0,await l.nextTick(),Nu(Nt.value,i),Ru(i,Nt.value)}},Hu=()=>{gt.show=!1},fr=l.ref(),Uu=async e=>{const n=await Xt(f.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 a={id:r.id};return(i=r==null?void 0:r.tableData)==null||i.forEach((o,s)=>{a[`a${s}`]=o}),a}else return{...r.tableData,id:r.id}})},Qt=(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},$u=async(e,n)=>{var a,o;let t=[];Array.isArray(e)?t=f.cloneDeep(e):t=[f.cloneDeep(e)];const r=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:a.map(s=>{var c,u,p,h,g;return{key:{type:"data",systemKey:sessionStorage.getItem("systemKey"),pageKey:(c=En.value)!=null&&c.startsWith("/")?(u=En.value)==null?void 0:u.substring(1):En.value,tableId:n,createUserId:(p=Jn.value)==null?void 0:p.id,createUserOrg:((h=Jn.value)==null?void 0:h.dept)||((g=Jn.value)==null?void 0:g.部门名称)},value:{tableData:Qt(s,cr.value)}}}),i=(o=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:o.map(s=>({id:s==null?void 0:s.id,value:{tableData:Qt(s,cr.value)}}));r.length>0&&await Xt(f.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await Xt(f.batchUpdateInsofDataApi,{dataList:i},"编辑"),gt.show=!1)},Fr=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await $u(e,t);else{let i=[];n!=null&&n.includes("批量")?i=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(a=>a==null?void 0:a.id):[]:i=[e==null?void 0:e.id],await Xt(f.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},zu=()=>{const e=Eo(Nt.value),n=Ku(e),t=Lu(n),r=mo(t),i=_u(r);fr.value={...wt.value,[It.value]:i},l.nextTick(()=>{Fr(fr.value,"编辑",_n.value)})},gt=l.reactive({show:!1,title:"角色授权",width:"30%",draggable:!0}),qu=({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":""},_n=l.ref(0),To=async e=>{var r,i,a,o,s;let n;const t=await f.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&&((a=t==null?void 0:t.data)==null?void 0:a.result.length)>0&&(n=(s=(o=t==null?void 0:t.data.result)==null?void 0:o[0])==null?void 0:s.id,_n.value=n),n},Nt=l.ref([]),ju=l.ref([{path:"资源管理",buttons:["查询","新增","编辑","删除"]},{path:"资源管理/人员",buttons:["查询","新增","编辑","删除"]}]),Gu=(e,n)=>{var t;e.checkedButtons=n?(t=e.renderButtons)==null?void 0:t.map(r=>r.path):[]},Ct=l.ref([]),Wu=(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)?Ct.value.push(n.path):(e==null?void 0:e.length)===0&&(Ct.value=(i=Ct.value)==null?void 0:i.filter(a=>a!==n.path))};l.watch(()=>Ct.value.length,()=>{var e;(e=Cr.value)==null||e.setCheckedKeys([...Ct.value])});l.watch(()=>gt.show,e=>{e||(Nt.value=yo(Nt.value))});const Do=l.computed(()=>{var t;const e=(t=f.cloneDeep(Du.value))==null?void 0:t.filter(r=>{var i,a;return((a=(i=r==null?void 0:r.key)==null?void 0:i.pageKey)==null?void 0:a.toUpperCase())!=="MENU"});return[...e==null?void 0:e.map(r=>{var o,s,c,u,p,h,g,y;const i=/button/i;let a=(c=(s=(o=r==null?void 0:r.value)==null?void 0:o.pageData)==null?void 0:s.compData)==null?void 0:c.filter(d=>i.test(d==null?void 0:d.key));return a=Array.from(new Set(a==null?void 0:a.flatMap(d=>d.contents.map(m=>m.label)))),{path:(p=(u=r==null?void 0:r.key)==null?void 0:u.pageKey)!=null&&p.startsWith("/")?(g=(h=r==null?void 0:r.key)==null?void 0:h.pageKey)==null?void 0:g.substring(1):(y=r==null?void 0:r.key)==null?void 0:y.pageKey,buttons:a}}),...ko.value]}),ko=l.ref([]),Yu=(e,n,t)=>{const i=[e==null?void 0:e.find(a=>(a==null?void 0:a.title)===n)].flatMap(a=>a==null?void 0:a.children);return i==null?void 0:i.map(a=>{var o,s;return{path:(o=a==null?void 0:a.path)!=null&&o.startsWith("/")?(s=a==null?void 0:a.path)==null?void 0:s.substring(1):a==null?void 0:a.path,buttons:t}})},na=(e,n)=>{var t;if(e.carryData){if(e.path==="系统管理/个人中心"){const i=["基本信息","上传头像","签名","修改密码"];return i==null?void 0:i.map(a=>{var o,s;return{title:a,path:(o=e==null?void 0:e.path)!=null&&o.startsWith("/")?((s=e==null?void 0:e.path)==null?void 0:s.substring(1))+"/"+a:e.path+"/"+a}})}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 a,o;return{title:i,path:(a=e==null?void 0:e.path)!=null&&a.startsWith("/")?((o=e==null?void 0:e.path)==null?void 0:o.substring(1))+"/"+i:e.path+"/"+i}})}return[]},Ao=(e,n)=>{if(Array.isArray(e))return e==null?void 0:e.map(t=>{var a,o;const r=(a=t==null?void 0:t.path)!=null&&a.startsWith("/")?(o=t==null?void 0:t.path)==null?void 0:o.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:na(t,i),checkedButtons:[],children:Ao(t.children,Do.value)}:{...t,renderButtons:na(t,i),checkedButtons:[]}})},Ju={comp:"Group",name:"/系统管理/角色管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:fo.value,name:""}]}]},Zu=Object.freeze(Object.defineProperty({__proto__:null,addButtonsToTree:Ao,addPathToTree:Kn,authorizeDialog:gt,buttonValue:Iu,changedRow:fr,clickRow:wt,clickRowButton:Vu,clickSubmitAuthority:zu,closeAuthorizeDialog:Hu,compName:ho,convertArrayToTree:Rr,convertIndexToLabel:Qt,customNodeClass:qu,getActivePageStructureId:To,getAuthorityKey:vo,getFirstArrayProperty:Mr,getLeafNodesRecursive:Or,getPageDataAsync:Uu,groupByField:Nr,handleAddSysMenusButtons:Yu,handleItemDataChange:Mu,handleNodeBtnChange:Wu,handleNodeCheckChange:Gu,handleQueryChange:Bu,handleRowAuthorityRender:Pr,handleSubmitAsync:Xt,isPageDataExist:xu,menuData:Nt,menusButtons:ju,pageData:fo,pageDataFiltered:Cu,queryFormData:wu,structureButtons:Do,structureId:_n,submitTableAsyncByVerify:Fr,tempRolePageData:Ju,tempSysMenus:ko,treeRef:Cr},Symbol.toStringTag,{value:"Module"}));var Xu="0123456789abcdefghijklmnopqrstuvwxyz";function nt(e){return Xu.charAt(e)}function Qu(e,n){return e&n}function yn(e,n){return e|n}function ra(e,n){return e^n}function ia(e,n){return e&~n}function ec(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 tc(e){for(var n=0;e!=0;)e&=e-1,++n;return n}var kt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo="=";function In(e){var n,t,r="";for(n=0;n+3<=e.length;n+=3)t=parseInt(e.substring(n,n+3),16),r+=kt.charAt(t>>6)+kt.charAt(t&63);for(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=kt.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=kt.charAt(t>>2)+kt.charAt((t&3)<<4));(r.length&3)>0;)r+=wo;return r}function aa(e){var n="",t,r=0,i=0;for(t=0;t<e.length&&e.charAt(t)!=wo;++t){var a=kt.indexOf(e.charAt(t));a<0||(r==0?(n+=nt(a>>2),i=a&3,r=1):r==1?(n+=nt(i<<2|a>>4),i=a&15,r=2):r==2?(n+=nt(i),n+=nt(a>>2),i=a&3,r=3):(n+=nt(i<<2|a>>4),n+=nt(a&15),r=0))}return r==1&&(n+=nt(i<<2)),n}var Et,nc={decode:function(e){var n;if(Et===void 0){var t="0123456789ABCDEF",r=` \f
8
- \r  \u2028\u2029`;for(Et={},n=0;n<16;++n)Et[t.charAt(n)]=n;for(t=t.toLowerCase(),n=10;n<16;++n)Et[t.charAt(n)]=n;for(n=0;n<r.length;++n)Et[r.charAt(n)]=-1}var i=[],a=0,o=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=Et[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);a|=s,++o>=2?(i[i.length]=a,a=0,o=0):a<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},pt,hr={decode:function(e){var n;if(pt===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
9
- \r  \u2028\u2029`;for(pt=Object.create(null),n=0;n<64;++n)pt[t.charAt(n)]=n;for(pt["-"]=62,pt._=63,n=0;n<r.length;++n)pt[r.charAt(n)]=-1}var i=[],a=0,o=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=pt[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);a|=s,++o>=4?(i[i.length]=a>>16,i[i.length]=a>>8&255,i[i.length]=a&255,a=0,o=0):a<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=a>>10;break;case 3:i[i.length]=a>>16,i[i.length]=a>>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=hr.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 hr.decode(e)}},Tt=1e13,qt=function(){function e(n){this.buf=[+n||0]}return e.prototype.mulAdd=function(n,t){var r=this.buf,i=r.length,a,o;for(a=0;a<i;++a)o=r[a]*n+t,o<Tt?t=0:(t=0|o/Tt,o-=t*Tt),r[a]=o;t>0&&(r[a]=t)},e.prototype.sub=function(n){var t=this.buf,r=t.length,i,a;for(i=0;i<r;++i)a=t[i]-n,a<0?(a+=Tt,n=1):n=0,t[i]=a;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+=(Tt+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*Tt+n[r];return t},e.prototype.simplify=function(){var n=this.buf;return n.length==1?n[0]:this},e}(),Io="…",rc=/^(\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)?)?$/,ic=/^(\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 Mt(e,n){return e.length>n&&(e=e.substring(0,n)+Io),e}var Zn=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="",a=n;a<t;++a)if(i+=this.hexByte(this.get(a)),r!==!0)switch(a&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 a=this.get(i++);a<128?r+=String.fromCharCode(a):a>191&&a<224?r+=String.fromCharCode((a&31)<<6|this.get(i++)&63):r+=String.fromCharCode((a&15)<<12|(this.get(i++)&63)<<6|this.get(i++)&63)}return r},e.prototype.parseStringBMP=function(n,t){for(var r="",i,a,o=n;o<t;)i=this.get(o++),a=this.get(o++),r+=String.fromCharCode(i<<8|a);return r},e.prototype.parseTime=function(n,t,r){var i=this.parseStringISO(n,t),a=(r?rc:ic).exec(i);return a?(r&&(a[1]=+a[1],a[1]+=+a[1]<70?2e3:1900),i=a[1]+"-"+a[2]+"-"+a[3]+" "+a[4],a[5]&&(i+=":"+a[5],a[6]&&(i+=":"+a[6],a[7]&&(i+="."+a[7]))),a[8]&&(i+=" UTC",a[8]!="Z"&&(i+=a[8],a[9]&&(i+=":"+a[9]))),i):"Unrecognized time: "+i},e.prototype.parseInteger=function(n,t){for(var r=this.get(n),i=r>127,a=i?255:0,o,s="";r==a&&++n<t;)r=this.get(n);if(o=t-n,o===0)return i?-1:0;if(o>4){for(s=r,o<<=3;((+s^a)&128)==0;)s=+s<<1,--o;s="("+o+` bit)
11
- `}i&&(r=r-256);for(var c=new qt(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),a=(t-n-1<<3)-i,o="("+a+` bit)
12
- `,s="",c=n+1;c<t;++c){for(var u=this.get(c),p=c==t-1?i:0,h=7;h>=p;--h)s+=u>>h&1?"1":"0";if(s.length>r)return o+Mt(s,r)}return o+s},e.prototype.parseOctetString=function(n,t,r){if(this.isASCII(n,t))return Mt(this.parseStringISO(n,t),r);var i=t-n,a="("+i+` byte)
13
- `;r/=2,i>r&&(t=n+r);for(var o=n;o<t;++o)a+=this.hexByte(this.get(o));return i>r&&(a+=Io),a},e.prototype.parseOID=function(n,t,r){for(var i="",a=new qt,o=0,s=n;s<t;++s){var c=this.get(s);if(a.mulAdd(128,c&127),o+=7,!(c&128)){if(i==="")if(a=a.simplify(),a instanceof qt)a.sub(80),i="2."+a.toString();else{var u=a<80?a<40?0:1:2;i=u+"."+(a-u*40)}else i+="."+a.toString();if(i.length>r)return Mt(i,r);a=new qt,o=0}}return o>0&&(i+=".incomplete"),i},e}(),ac=function(){function e(n,t,r,i,a){if(!(i instanceof oa))throw new Error("Invalid tag value.");this.stream=n,this.header=t,this.length=r,this.tag=i,this.sub=a}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 Mt(this.stream.parseStringUTF(t,t+r),n);case 18:case 19:case 20:case 21:case 22:case 26:return Mt(this.stream.parseStringISO(t,t+r),n);case 30:return Mt(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 Zn?t=n:t=new Zn(n,0);var r=new Zn(t),i=new oa(t),a=e.decodeLength(t),o=t.pos,s=o-r.pos,c=null,u=function(){var h=[];if(a!==null){for(var g=o+a;t.pos<g;)h[h.length]=e.decode(t);if(t.pos!=g)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var y=e.decode(t);if(y.tag.isEOC())break;h[h.length]=y}a=o-t.pos}catch(d){throw new Error("Exception while decoding undefined length content: "+d)}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 p=0;p<c.length;++p)if(c[p].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{c=null}if(c===null){if(a===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);t.pos=o+Math.abs(a)}return new e(r,s,a,i,c)},e}(),oa=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 qt;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}(),ft,oc=0xdeadbeefcafe,sa=(oc&16777215)==15715070,He=[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],sc=(1<<26)/He[He.length-1],ce=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,a=!1,o="",s=this.t,c=this.DB-s*this.DB%t;if(s-- >0)for(c<this.DB&&(i=this[s]>>c)>0&&(a=!0,o=nt(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&&(a=!0),a&&(o+=nt(i));return a?o:"0"},e.prototype.negate=function(){var n=pe();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)+gn(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(n){var t=pe();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 la(t):r=new ua(t),this.exp(n,r)},e.prototype.clone=function(){var n=pe();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,a=0;if(n-- >0)for(r<this.DB&&(i=this[n]>>r)!=(this.s&this.DM)>>r&&(t[a++]=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),a==0&&(this.s&128)!=(i&128)&&++a,(a>0||i!=this.s)&&(t[a++]=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=pe();return this.bitwiseTo(n,Qu,t),t},e.prototype.or=function(n){var t=pe();return this.bitwiseTo(n,yn,t),t},e.prototype.xor=function(n){var t=pe();return this.bitwiseTo(n,ra,t),t},e.prototype.andNot=function(n){var t=pe();return this.bitwiseTo(n,ia,t),t},e.prototype.not=function(){for(var n=pe(),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=pe();return n<0?this.rShiftTo(-n,t):this.lShiftTo(n,t),t},e.prototype.shiftRight=function(n){var t=pe();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+ec(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+=tc(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,yn)},e.prototype.clearBit=function(n){return this.changeBit(n,ia)},e.prototype.flipBit=function(n){return this.changeBit(n,ra)},e.prototype.add=function(n){var t=pe();return this.addTo(n,t),t},e.prototype.subtract=function(n){var t=pe();return this.subTo(n,t),t},e.prototype.multiply=function(n){var t=pe();return this.multiplyTo(n,t),t},e.prototype.divide=function(n){var t=pe();return this.divRemTo(n,t,null),t},e.prototype.remainder=function(n){var t=pe();return this.divRemTo(n,null,t),t},e.prototype.divideAndRemainder=function(n){var t=pe(),r=pe();return this.divRemTo(n,t,r),[t,r]},e.prototype.modPow=function(n,t){var r=n.bitLength(),i,a=st(1),o;if(r<=0)return a;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?o=new la(t):t.isEven()?o=new uc(t):o=new ua(t);var s=[],c=3,u=i-1,p=(1<<i)-1;if(s[1]=o.convert(this),i>1){var h=pe();for(o.sqrTo(s[1],h);c<=p;)s[c]=pe(),o.mulTo(h,s[c-2],s[c]),c+=2}var g=n.t-1,y,d=!0,m=pe(),v;for(r=gn(n[g])-1;g>=0;){for(r>=u?y=n[g]>>r-u&p:(y=(n[g]&(1<<r+1)-1)<<u-r,g>0&&(y|=n[g-1]>>this.DB+r-u)),c=i;(y&1)==0;)y>>=1,--c;if((r-=c)<0&&(r+=this.DB,--g),d)s[y].copyTo(a),d=!1;else{for(;c>1;)o.sqrTo(a,m),o.sqrTo(m,a),c-=2;c>0?o.sqrTo(a,m):(v=a,a=m,m=v),o.mulTo(m,s[y],a)}for(;g>=0&&(n[g]&1<<r)==0;)o.sqrTo(a,m),v=a,a=m,m=v,--r<0&&(r=this.DB-1,--g)}return o.revert(a)},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(),a=st(1),o=st(0),s=st(0),c=st(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!a.isEven()||!o.isEven())&&(a.addTo(this,a),o.subTo(n,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(n,o),o.rShiftTo(1,o);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&&a.subTo(s,a),o.subTo(c,o)):(i.subTo(r,i),t&&s.subTo(a,s),c.subTo(o,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 lc)},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 a=t.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return t;for(a<o&&(o=a),o>0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},e.prototype.isProbablePrime=function(n){var t,r=this.abs();if(r.t==1&&r[0]<=He[He.length-1]){for(t=0;t<He.length;++t)if(r[0]==He[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<He.length;){for(var i=He[t],a=t+1;a<He.length&&i<sc;)i*=He[a++];for(i=r.modInt(i);t<a;)if(i%He[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,a=!1,o=0;--i>=0;){var s=r==8?+n[i]&255:fa(n,i);if(s<0){n.charAt(i)=="-"&&(a=!0);continue}a=!1,o==0?this[this.t++]=s:o+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,o+=r,o>=this.DB&&(o-=this.DB)}r==8&&(+n[0]&128)!=0&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),a&&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,a=(1<<i)-1,o=Math.floor(n/this.DB),s=this.s<<r&this.DM,c=this.t-1;c>=0;--c)t[c+o+1]=this[c]>>i|s,s=(this[c]&a)<<r;for(var c=o-1;c>=0;--c)t[c]=0;t[o]=s,t.t=this.t+o+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,a=this.DB-i,o=(1<<i)-1;t[0]=this[r]>>i;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&o)<<a,t[s-r]=this[s]>>i;i>0&&(t[this.t-r-1]|=(this.s&o)<<a),t.t=this.t-r,t.clamp()},e.prototype.subTo=function(n,t){for(var r=0,i=0,a=Math.min(n.t,this.t);r<a;)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(),a=r.t;for(t.t=a+i.t;--a>=0;)t[a]=0;for(a=0;a<i.t;++a)t[a+r.t]=r.am(0,i[a],t,a,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 a=this.abs();if(a.t<i.t){t!=null&&t.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=pe());var o=pe(),s=this.s,c=n.s,u=this.DB-gn(i[i.t-1]);u>0?(i.lShiftTo(u,o),a.lShiftTo(u,r)):(i.copyTo(o),a.copyTo(r));var p=o.t,h=o[p-1];if(h!=0){var g=h*(1<<this.F1)+(p>1?o[p-2]>>this.F2:0),y=this.FV/g,d=(1<<this.F1)/g,m=1<<this.F2,v=r.t,b=v-p,S=t??pe();for(o.dlShiftTo(b,S),r.compareTo(S)>=0&&(r[r.t++]=1,r.subTo(S,r)),e.ONE.dlShiftTo(p,S),S.subTo(o,o);o.t<p;)o[o.t++]=0;for(;--b>=0;){var N=r[--v]==h?this.DM:Math.floor(r[v]*y+(r[v-1]+m)*d);if((r[v]+=o.am(0,N,r,b,0,p))<N)for(o.dlShiftTo(b,S),r.subTo(S,r);r[v]<--N;)r.subTo(S,r)}t!=null&&(r.drShiftTo(p,t),s!=c&&e.ZERO.subTo(t,t)),r.t=p,r.clamp(),u>0&&r.rShiftTo(u,r),s<0&&e.ZERO.subTo(r,r)}}},e.prototype.invDigit=function(){if(this.t<1)return 0;var n=this[0];if((n&1)==0)return 0;var t=n&3;return t=t*(2-(n&15)*t)&15,t=t*(2-(n&255)*t)&255,t=t*(2-((n&65535)*t&65535))&65535,t=t*(2-n*t%this.DV)%this.DV,t>0?this.DV-t:-t},e.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},e.prototype.exp=function(n,t){if(n>4294967295||n<1)return e.ONE;var r=pe(),i=pe(),a=t.convert(this),o=gn(n)-1;for(a.copyTo(r);--o>=0;)if(t.sqrTo(r,i),(n&1<<o)>0)t.mulTo(i,a,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=st(r),a=pe(),o=pe(),s="";for(this.divRemTo(i,a,o);a.signum()>0;)s=(r+o.intValue()).toString(n).substr(1)+s,a.divRemTo(i,a,o);return o.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),a=!1,o=0,s=0,c=0;c<n.length;++c){var u=fa(n,c);if(u<0){n.charAt(c)=="-"&&this.signum()==0&&(a=!0);continue}s=t*s+u,++o>=r&&(this.dMultiply(i),this.dAddOffset(s,0),o=0,s=0)}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),a&&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),yn,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=[],a=n&7;i.length=(n>>3)+1,t.nextBytes(i),a>0?i[0]&=(1<<a)-1:i[0]=0,this.fromString(i,256)}},e.prototype.bitwiseTo=function(n,t,r){var i,a,o=Math.min(n.t,this.t);for(i=0;i<o;++i)r[i]=t(this[i],n[i]);if(n.t<this.t){for(a=n.s&this.DM,i=o;i<this.t;++i)r[i]=t(this[i],a);r.t=this.t}else{for(a=this.s&this.DM,i=o;i<n.t;++i)r[i]=t(a,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,a=Math.min(n.t,this.t);r<a;)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 a=r.t-this.t;i<a;++i)r[i+this.t]=this.am(0,n[i],r,i,0,this.t);for(var a=Math.min(n.t,t);i<a;++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>He.length&&(n=He.length);for(var a=pe(),o=0;o<n;++o){a.fromInt(He[Math.floor(Math.random()*He.length)]);var s=a.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=pe();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 a=r;r=i,i=a}var o=r.getLowestSetBit(),s=i.getLowestSetBit();if(s<0){t(r);return}o<s&&(s=o),s>0&&(r.rShiftTo(s,r),i.rShiftTo(s,i));var c=function(){(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),(o=i.getLowestSetBit())>0&&i.rShiftTo(o,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),yn,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>n&&a.subTo(e.ONE.shiftLeft(n-1),a),a.isProbablePrime(t)?setTimeout(function(){i()},0):setTimeout(o,0)};setTimeout(o,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}(),lc=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}(),la=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}(),ua=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=pe();return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(ce.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(n){var t=pe();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}(),uc=function(){function e(n){this.m=n,this.r2=pe(),this.q3=pe(),ce.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=pe();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 pe(){return new ce(null)}function xe(e,n){return new ce(e,n)}var ca=typeof navigator<"u";ca&&sa&&navigator.appName=="Microsoft Internet Explorer"?(ce.prototype.am=function(n,t,r,i,a,o){for(var s=t&32767,c=t>>15;--o>=0;){var u=this[n]&32767,p=this[n++]>>15,h=c*u+p*s;u=s*u+((h&32767)<<15)+r[i]+(a&1073741823),a=(u>>>30)+(h>>>15)+c*p+(a>>>30),r[i++]=u&1073741823}return a},ft=30):ca&&sa&&navigator.appName!="Netscape"?(ce.prototype.am=function(n,t,r,i,a,o){for(;--o>=0;){var s=t*this[n++]+r[i]+a;a=Math.floor(s/67108864),r[i++]=s&67108863}return a},ft=26):(ce.prototype.am=function(n,t,r,i,a,o){for(var s=t&16383,c=t>>14;--o>=0;){var u=this[n]&16383,p=this[n++]>>14,h=c*u+p*s;u=s*u+((h&16383)<<14)+r[i]+a,a=(u>>28)+(h>>14)+c*p,r[i++]=u&268435455}return a},ft=28);ce.prototype.DB=ft;ce.prototype.DM=(1<<ft)-1;ce.prototype.DV=1<<ft;var Lr=52;ce.prototype.FV=Math.pow(2,Lr);ce.prototype.F1=Lr-ft;ce.prototype.F2=2*ft-Lr;var Vn=[],_t,Ye;_t=48;for(Ye=0;Ye<=9;++Ye)Vn[_t++]=Ye;_t=97;for(Ye=10;Ye<36;++Ye)Vn[_t++]=Ye;_t=65;for(Ye=10;Ye<36;++Ye)Vn[_t++]=Ye;function fa(e,n){var t=Vn[e.charCodeAt(n)];return t??-1}function st(e){var n=pe();return n.fromInt(e),n}function gn(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}ce.ZERO=st(0);ce.ONE=st(1);var cc=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 fc(){return new cc}var xo=256,vn,ut=null,Ze;if(ut==null){ut=[],Ze=0;var mn=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Xn=new Uint32Array(256);for(window.crypto.getRandomValues(Xn),mn=0;mn<Xn.length;++mn)ut[Ze++]=Xn[mn]&255}var bn=0,Sn=function(e){if(bn=bn||0,bn>=256||Ze>=xo){window.removeEventListener?window.removeEventListener("mousemove",Sn,!1):window.detachEvent&&window.detachEvent("onmousemove",Sn);return}try{var n=e.x+e.y;ut[Ze++]=n&255,bn+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Sn,!1):window.attachEvent&&window.attachEvent("onmousemove",Sn))}function hc(){if(vn==null){for(vn=fc();Ze<xo;){var e=Math.floor(65536*Math.random());ut[Ze++]=e&255}for(vn.init(ut),Ze=0;Ze<ut.length;++Ze)ut[Ze]=0;Ze=0}return vn.next()}var pr=function(){function e(){}return e.prototype.nextBytes=function(n){for(var t=0;t<n.length;++t)n[t]=hc()},e}();function pc(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 a="0001"+r+"00"+e;return xe(a,16)}function dc(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 a=new pr,o=[];n>2;){for(o[0]=0;o[0]==0;)a.nextBytes(o);t[--n]=o[0]}return t[--n]=2,t[--n]=0,new ce(t)}var yc=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=xe(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=dc(n,t);if(r==null)return null;var i=this.doPublic(r);if(i==null)return null;for(var a=i.toString(16),o=a.length,s=0;s<t*2-o;s++)a="0"+a;return a},e.prototype.setPrivate=function(n,t,r){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=xe(n,16),this.e=parseInt(t,16),this.d=xe(r,16)):console.error("Invalid RSA private key")},e.prototype.setPrivateEx=function(n,t,r,i,a,o,s,c){n!=null&&t!=null&&n.length>0&&t.length>0?(this.n=xe(n,16),this.e=parseInt(t,16),this.d=xe(r,16),this.p=xe(i,16),this.q=xe(a,16),this.dmp1=xe(o,16),this.dmq1=xe(s,16),this.coeff=xe(c,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(n,t){var r=new pr,i=n>>1;this.e=parseInt(t,16);for(var a=new ce(t,16);;){for(;this.p=new ce(n-i,1,r),!(this.p.subtract(ce.ONE).gcd(a).compareTo(ce.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new ce(i,1,r),!(this.q.subtract(ce.ONE).gcd(a).compareTo(ce.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(ce.ONE),c=this.q.subtract(ce.ONE),u=s.multiply(c);if(u.gcd(a).compareTo(ce.ONE)==0){this.n=this.p.multiply(this.q),this.d=a.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=xe(n,16),r=this.doPrivate(t);return r==null?null:gc(r,this.n.bitLength()+7>>3)},e.prototype.generateAsync=function(n,t,r){var i=new pr,a=n>>1;this.e=parseInt(t,16);var o=new ce(t,16),s=this,c=function(){var u=function(){if(s.p.compareTo(s.q)<=0){var g=s.p;s.p=s.q,s.q=g}var y=s.p.subtract(ce.ONE),d=s.q.subtract(ce.ONE),m=y.multiply(d);m.gcd(o).compareTo(ce.ONE)==0?(s.n=s.p.multiply(s.q),s.d=o.modInverse(m),s.dmp1=s.d.mod(y),s.dmq1=s.d.mod(d),s.coeff=s.q.modInverse(s.p),setTimeout(function(){r()},0)):setTimeout(c,0)},p=function(){s.q=pe(),s.q.fromNumberAsync(a,1,i,function(){s.q.subtract(ce.ONE).gcda(o,function(g){g.compareTo(ce.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(p,0)})})},h=function(){s.p=pe(),s.p.fromNumberAsync(n-a,1,i,function(){s.p.subtract(ce.ONE).gcda(o,function(g){g.compareTo(ce.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(p,0):setTimeout(h,0)})})};setTimeout(h,0)};setTimeout(c,0)},e.prototype.sign=function(n,t,r){var i=vc(r),a=i+t(n).toString(),o=pc(a,this.n.bitLength()/4);if(o==null)return null;var s=this.doPrivate(o);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=xe(t,16),a=this.doPublic(i);if(a==null)return null;var o=a.toString(16).replace(/^1f+00/,""),s=mc(o);return s==r(n).toString()},e}();function gc(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 a=t[r]&255;a<128?i+=String.fromCharCode(a):a>191&&a<224?(i+=String.fromCharCode((a&31)<<6|t[r+1]&63),++r):(i+=String.fromCharCode((a&15)<<12|(t[r+1]&63)<<6|t[r+2]&63),r+=2)}return i}var Tn={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function vc(e){return Tn[e]||""}function mc(e){for(var n in Tn)if(Tn.hasOwnProperty(n)){var t=Tn[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 Be={};Be.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 a=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(a=function(s,c){for(i=0;i<o.length;i=i+1){var u=o[i],p=c[u];typeof p=="function"&&p!=Object.prototype[u]&&(s[u]=p)}})}catch{}a(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 M={};(typeof M.asn1>"u"||!M.asn1)&&(M.asn1={});M.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="",a=0;a<r;a++)i+="f";var o=new ce(i,16),s=o.xor(e).add(ce.ONE);n=s.toString(16).replace(/^-/,"")}return n},this.getPEMStringFromHex=function(e,n){return hextopem(e,n)},this.newObject=function(e){var n=M,t=n.asn1,r=t.DERBoolean,i=t.DERInteger,a=t.DERBitString,o=t.DEROctetString,s=t.DERNull,c=t.DERObjectIdentifier,u=t.DEREnumerated,p=t.DERUTF8String,h=t.DERNumericString,g=t.DERPrintableString,y=t.DERTeletexString,d=t.DERIA5String,m=t.DERUTCTime,v=t.DERGeneralizedTime,b=t.DERSequence,S=t.DERSet,N=t.DERTaggedObject,D=t.ASN1Util.newObject,x=Object.keys(e);if(x.length!=1)throw"key of param shall be only one.";var I=x[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+I+":")==-1)throw"undefined key: "+I;if(I=="bool")return new r(e[I]);if(I=="int")return new i(e[I]);if(I=="bitstr")return new a(e[I]);if(I=="octstr")return new o(e[I]);if(I=="null")return new s(e[I]);if(I=="oid")return new c(e[I]);if(I=="enum")return new u(e[I]);if(I=="utf8str")return new p(e[I]);if(I=="numstr")return new h(e[I]);if(I=="prnstr")return new g(e[I]);if(I=="telstr")return new y(e[I]);if(I=="ia5str")return new d(e[I]);if(I=="utctime")return new m(e[I]);if(I=="gentime")return new v(e[I]);if(I=="seq"){for(var w=e[I],k=[],_=0;_<w.length;_++){var T=D(w[_]);k.push(T)}return new b({array:k})}if(I=="set"){for(var w=e[I],k=[],_=0;_<w.length;_++){var T=D(w[_]);k.push(T)}return new S({array:k})}if(I=="tag"){var B=e[I];if(Object.prototype.toString.call(B)==="[object Array]"&&B.length==3){var K=D(B[2]);return new N({tag:B[0],explicit:B[1],obj:K})}else{var H={};if(B.explicit!==void 0&&(H.explicit=B.explicit),B.tag!==void 0&&(H.tag=B.tag),B.obj===void 0)throw"obj shall be specified for 'tag'.";return H.obj=D(B.obj),new N(H)}}},this.jsonToASN1HEX=function(e){var n=this.newObject(e);return n.getEncodedHex()}};M.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,a="",o=2;o<e.length;o+=2){var s=parseInt(e.substr(o,2),16),c=("00000000"+s.toString(2)).slice(-8);if(a=a+c.substr(1,7),c.substr(0,1)=="0"){var u=new ce(a,2);i=i+"."+u.toString(10),a=""}}return i};M.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 ce(s,10),p=u.toString(2),h=7-p.length%7;h==7&&(h=0);for(var g="",y=0;y<h;y++)g+="0";p=g+p;for(var y=0;y<p.length-1;y+=7){var d=p.substr(y,7);y!=p.length-7&&(d="1"+d),c+=n(parseInt(d,2))}return c};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),a=parseInt(i[0])*40+parseInt(i[1]);r+=n(a),i.splice(0,2);for(var o=0;o<i.length;o++)r+=t(i[o]);return r};M.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""}};M.asn1.DERAbstractString=function(e){M.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))};Be.lang.extend(M.asn1.DERAbstractString,M.asn1.ASN1Object);M.asn1.DERAbstractTime=function(e){M.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,a=this.localDateToUTC(n),o=String(a.getFullYear());t=="utc"&&(o=o.substr(2,2));var s=i(String(a.getMonth()+1),2),c=i(String(a.getDate()),2),u=i(String(a.getHours()),2),p=i(String(a.getMinutes()),2),h=i(String(a.getSeconds()),2),g=o+s+c+u+p+h;if(r===!0){var y=a.getMilliseconds();if(y!=0){var d=i(String(y),3);d=d.replace(/[0]+$/,""),g=g+"."+d}}return g+"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,a,o){var s=new Date(Date.UTC(n,t-1,r,i,a,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};Be.lang.extend(M.asn1.DERAbstractTime,M.asn1.ASN1Object);M.asn1.DERAbstractStructured=function(e){M.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)};Be.lang.extend(M.asn1.DERAbstractStructured,M.asn1.ASN1Object);M.asn1.DERBoolean=function(){M.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};Be.lang.extend(M.asn1.DERBoolean,M.asn1.ASN1Object);M.asn1.DERInteger=function(e){M.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=M.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new ce(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))};Be.lang.extend(M.asn1.DERInteger,M.asn1.ASN1Object);M.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=M.asn1.ASN1Util.newObject(e.obj);e.hex="00"+n.getEncodedHex()}M.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 a="",i=0;i<t.length-1;i+=8){var o=t.substr(i,8),s=parseInt(o,2).toString(16);s.length==1&&(s="0"+s),a+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+r+a},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))};Be.lang.extend(M.asn1.DERBitString,M.asn1.ASN1Object);M.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=M.asn1.ASN1Util.newObject(e.obj);e.hex=n.getEncodedHex()}M.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};Be.lang.extend(M.asn1.DEROctetString,M.asn1.DERAbstractString);M.asn1.DERNull=function(){M.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};Be.lang.extend(M.asn1.DERNull,M.asn1.ASN1Object);M.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="",a=new ce(r,10),o=a.toString(2),s=7-o.length%7;s==7&&(s=0);for(var c="",u=0;u<s;u++)c+="0";o=c+o;for(var u=0;u<o.length-1;u+=7){var p=o.substr(u,7);u!=o.length-7&&(p="1"+p),i+=n(parseInt(p,2))}return i};M.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="",a=r.split("."),o=parseInt(a[0])*40+parseInt(a[1]);i+=n(o),a.splice(0,2);for(var s=0;s<a.length;s++)i+=t(a[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(r){var i=M.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))};Be.lang.extend(M.asn1.DERObjectIdentifier,M.asn1.ASN1Object);M.asn1.DEREnumerated=function(e){M.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=M.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new ce(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))};Be.lang.extend(M.asn1.DEREnumerated,M.asn1.ASN1Object);M.asn1.DERUTF8String=function(e){M.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};Be.lang.extend(M.asn1.DERUTF8String,M.asn1.DERAbstractString);M.asn1.DERNumericString=function(e){M.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};Be.lang.extend(M.asn1.DERNumericString,M.asn1.DERAbstractString);M.asn1.DERPrintableString=function(e){M.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};Be.lang.extend(M.asn1.DERPrintableString,M.asn1.DERAbstractString);M.asn1.DERTeletexString=function(e){M.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};Be.lang.extend(M.asn1.DERTeletexString,M.asn1.DERAbstractString);M.asn1.DERIA5String=function(e){M.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};Be.lang.extend(M.asn1.DERIA5String,M.asn1.DERAbstractString);M.asn1.DERUTCTime=function(e){M.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))};Be.lang.extend(M.asn1.DERUTCTime,M.asn1.DERAbstractTime);M.asn1.DERGeneralizedTime=function(e){M.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))};Be.lang.extend(M.asn1.DERGeneralizedTime,M.asn1.DERAbstractTime);M.asn1.DERSequence=function(e){M.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}};Be.lang.extend(M.asn1.DERSequence,M.asn1.DERAbstractStructured);M.asn1.DERSet=function(e){M.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)};Be.lang.extend(M.asn1.DERSet,M.asn1.DERAbstractStructured);M.asn1.DERTaggedObject=function(e){M.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)))};Be.lang.extend(M.asn1.DERTaggedObject,M.asn1.ASN1Object);var bc=function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},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)}}(),ha=function(e){bc(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,a=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,o=a.test(t)?nc.decode(t):hr.unarmor(t),s=ac.decode(o);if(s.sub.length===3&&(s=s.sub[2].sub[0]),s.sub.length===9){r=s.sub[1].getHexStringValue(),this.n=xe(r,16),i=s.sub[2].getHexStringValue(),this.e=parseInt(i,16);var c=s.sub[3].getHexStringValue();this.d=xe(c,16);var u=s.sub[4].getHexStringValue();this.p=xe(u,16);var p=s.sub[5].getHexStringValue();this.q=xe(p,16);var h=s.sub[6].getHexStringValue();this.dmp1=xe(h,16);var g=s.sub[7].getHexStringValue();this.dmq1=xe(g,16);var y=s.sub[8].getHexStringValue();this.coeff=xe(y,16)}else if(s.sub.length===2)if(s.sub[0].sub){var d=s.sub[1],m=d.sub[0];r=m.sub[0].getHexStringValue(),this.n=xe(r,16),i=m.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=s.sub[0].getHexStringValue(),this.n=xe(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 M.asn1.DERInteger({int:0}),new M.asn1.DERInteger({bigint:this.n}),new M.asn1.DERInteger({int:this.e}),new M.asn1.DERInteger({bigint:this.d}),new M.asn1.DERInteger({bigint:this.p}),new M.asn1.DERInteger({bigint:this.q}),new M.asn1.DERInteger({bigint:this.dmp1}),new M.asn1.DERInteger({bigint:this.dmq1}),new M.asn1.DERInteger({bigint:this.coeff})]},r=new M.asn1.DERSequence(t);return r.getEncodedHex()},n.prototype.getPrivateBaseKeyB64=function(){return In(this.getPrivateBaseKey())},n.prototype.getPublicBaseKey=function(){var t=new M.asn1.DERSequence({array:[new M.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new M.asn1.DERNull]}),r=new M.asn1.DERSequence({array:[new M.asn1.DERInteger({bigint:this.n}),new M.asn1.DERInteger({int:this.e})]}),i=new M.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),a=new M.asn1.DERSequence({array:[t,i]});return a.getEncodedHex()},n.prototype.getPublicBaseKeyB64=function(){return In(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}(yc),Qn,Sc=typeof process<"u"?(Qn=process.env)===null||Qn===void 0?void 0:Qn.npm_package_version:void 0,Hn=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 ha(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(aa(n))}catch{return!1}},e.prototype.encrypt=function(n){try{return In(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,r){try{return In(this.getKey().sign(n,t,r))}catch{return!1}},e.prototype.verify=function(n,t,r){try{return this.getKey().verify(n,aa(t),r)}catch{return!1}},e.prototype.getKey=function(n){if(!this.key){if(this.key=new ha,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=Sc,e}();function Ec(){const e=new Hn({default_key_size:"2048"});return{publicKey:e.getPublicKey(),privateKey:e.getPrivateKey()}}function jt(e,n){const t=new Hn;return t.setPublicKey(n),t.encrypt(e)||""}function Kr(e,n){const t=new Hn;return t.setPrivateKey(n),t.decrypt(e)||""}function pa(){return typeof new Hn().encrypt=="function"}const Bo=f.useLoginState(f.pinia),{superAdminInfo:Tc,cryptoInfo:Ue,loginUserInfo:er}=f.storeToRefs(Bo),Dc=tn(f.pinia),{activeMenuPath:Wt}=f.storeToRefs(Dc),dr=Kt(f.pinia),Ot="123456",kc=Br(f.pinia),{routerPageStructures:Ac}=f.storeToRefs(kc),_r=l.ref(0),wc=l.ref([{label:"用户名称",value:"",name:"userName"}]),xt=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Ic=e=>{console.log("handleQueryChange",e)},xn=l.ref([]),Co=l.ref(""),Bn=l.computed(()=>{var n,t,r,i,a;const e=(n=Ac.value)==null?void 0:n.find(o=>{var s;return((s=o==null?void 0:o.comp)==null?void 0:s.toUpperCase())==="TABLE"});return e?(Co.value=e.name,xn.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)!=="操作"),(a=e==null?void 0:e.compData)==null?void 0:a.map(s=>{var c;if((s==null?void 0:s.key)==="rowButton"){const u=[...s==null?void 0:s.contents,{label:"重置密码"}];return{...s,contents:u}}return(s==null?void 0:s.key)==="header"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(u=>{var p,h,g,y;return{...u,isTableColHidden:((p=u==null?void 0:u.prop)==null?void 0:p.includes("头像"))||((h=u==null?void 0:u.prop)==null?void 0:h.includes("签名")),isFormColHidden:((g=u==null?void 0:u.prop)==null?void 0:g.includes("头像"))||((y=u==null?void 0:u.prop)==null?void 0:y.includes("签名"))}})}:s})):[]}),xc=e=>{dr.setRefreshCurStructure(!1),Un(e.singleContent,e.buttonName,_r.value,e==null?void 0:e.selectItems)},yr=l.ref(),Bc=e=>{console.log("onDoubleClick",e)},Cc=(e,n)=>{e==="重置密码"&&oo.confirm(`该操作将会重置【${(n==null?void 0:n.account)||(n==null?void 0:n.账号)}】的密码为【${Ot}】,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{yr.value={...n,password:Ot},Un(yr.value,e,_r.value)}).catch(()=>{f.ElMessage.info("取消重置")})},Mc=()=>{Cn(Wt.value).then(e=>{var t;const n=Array.isArray(e)&&(e==null?void 0:e.filter(r=>(r==null?void 0:r.account)!==Tc.value.account));Bn.value=(t=Bn.value)==null?void 0:t.map(r=>r.key==="tableContents"?{...r,contents:n==null?void 0:n.map(i=>{var a;return{...i,password:Kr(i==null?void 0:i.password,(a=Ue==null?void 0:Ue.value)==null?void 0:a.privateKey)}})}:r)})},Pt=async(e,n,t)=>{var r,i;try{const a=await e(n);return((r=a==null?void 0:a.data)==null?void 0:r.code)===200?(t!=="查询"&&await Bo.setLogRecordAsync({type:t,data:n},Wt.value),f.ElMessage.success("保存成功"),dr.setRefreshCurStructure(!0),a.data.result||((i=a==null?void 0:a.data)==null?void 0:i.code)===200):null}catch(a){f.ElMessage.error(a)}finally{dr.setCacheUpdatingData(null)}},Rc=async(e,n)=>{var a,o;let t=[];Array.isArray(e)?t=f.cloneDeep(e):t=[f.cloneDeep(e)];const r=(a=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="string"))==null?void 0:a.map(s=>{var u,p,h,g,y,d,m;const c=Qt(s,xn.value);return pa()&&c&&(!c.password&&xt.value?c.password=jt(Ot,(u=Ue==null?void 0:Ue.value)==null?void 0:u.publicKey):c.password&&xt.value&&(c.password=jt(c==null?void 0:c.password,(p=Ue==null?void 0:Ue.value)==null?void 0:p.publicKey))),{key:{type:"data",layer:s==null?void 0:s.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(h=Wt.value)!=null&&h.startsWith("/")?(g=Wt.value)==null?void 0:g.substring(1):Wt.value,tableId:n,createUserId:(y=er.value)==null?void 0:y.id,createUserOrg:((d=er.value)==null?void 0:d.dept)||((m=er.value)==null?void 0:m.部门名称)},value:{tableData:c}}}),i=(o=t==null?void 0:t.filter(s=>typeof(s==null?void 0:s.id)=="number"))==null?void 0:o.map(s=>{var u,p;const c=Qt(s,xn.value);return pa()&&c&&(!c.password&&xt.value?c.password=jt(Ot,(u=Ue==null?void 0:Ue.value)==null?void 0:u.publicKey):c.password&&xt.value&&(c.password=jt(c==null?void 0:c.password,(p=Ue==null?void 0:Ue.value)==null?void 0:p.publicKey))),{id:s==null?void 0:s.id,value:{tableData:c}}});r.length>0&&await Pt(f.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await Pt(f.batchUpdateInsofDataApi,{dataList:i},"编辑"),gt.show=!1)},Un=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Rc(e,t);else{let i=[];n!=null&&n.includes("批量")?i=r&&(r==null?void 0:r.length)>0?r==null?void 0:r.map(a=>a==null?void 0:a.id):[]:i=[e==null?void 0:e.id],await Pt(f.batchDeleteInsofDataApi,{ids:i},"编辑")}},Cn=async e=>{const n=await Pt(f.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),t=n==null?void 0:n.map(r=>{var i,a;return{id:r.id,layer:(i=r.key)==null?void 0:i.layer,tableData:(a=r==null?void 0:r.value)==null?void 0:a.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}})},Nc={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:Bn.value,name:""}]}]},Oc=Object.freeze(Object.defineProperty({__proto__:null,changedRow:yr,clickRowButton:Cc,columns:xn,compName:Co,getPageDataAsync:Cn,handleItemDataChange:xc,handleQueryChange:Ic,handleSubmitAsync:Pt,loginUserIsSuper:xt,onDoubleClick:Bc,pageData:Bn,queryFormData:wc,refreshUserTableData:Mc,resetPassword:Ot,structureId:_r,submitTableAsyncByVerify:Un,tempUserPageData:Nc},Symbol.toStringTag,{value:"Module"})),nn=f.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),Pc=Kt(f.pinia),{routeToChildPath:da}=f.storeToRefs(Pc),Fc=f.useLoginState(f.pinia),{loginUserInfo:Mn,cryptoInfo:tr}=f.storeToRefs(Fc),Lc=nn(f.pinia),{originalPath:ya}=f.storeToRefs(Lc),Kc=e=>{var n,t,r;return((t=(n=Mn.value)==null?void 0:n.layer)==null?void 0:t.toUpperCase())==="SUPERADMIN"?!0:((r=Mn.value)==null?void 0:r.account)===(e==null?void 0:e.account)},_c=async(e,n,t)=>{const r=Cn("/系统管理/角色管理"),i=Cn("/系统管理/部门管理");return await Promise.all([r,i]).then(o=>{var u,p;const s=(u=o==null?void 0:o[0])==null?void 0:u.map(h=>({label:h==null?void 0:h.roleName,value:h==null?void 0:h.roleName})),c=(p=o==null?void 0:o[1])==null?void 0:p.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 g;return{...h,compData:(g=h==null?void 0:h.compData)==null?void 0:g.map(y=>{var d,m;return(y==null?void 0:y.key)==="header"?{...y,contents:(d=y==null?void 0:y.contents)==null?void 0:d.map(v=>v.prop==="userDept"?{...v,options:c}:v.prop==="userRoles"?{...v,options:s}:v)}:(y==null?void 0:y.key)==="tableContents"?{...y,contents:(m=y==null?void 0:y.contents)==null?void 0:m.map(v=>{var b;return{...v,password:Kc(v)?Kr(v==null?void 0:v.password,(b=tr==null?void 0:tr.value)==null?void 0:b.privateKey):v==null?void 0:v.password}})}:y})}})})},Vc=async(e,n)=>{const t=sessionStorage.getItem("authority"),r=JSON.parse(t||"");if(Array.isArray(r)){let i;da.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(da.value)))):i=Array.isArray(r)&&(r==null?void 0:r.filter(s=>s==null?void 0:s.includes(e)));const a=i==null?void 0:i.map(s=>{var c;return((c=s==null?void 0:s.split("/"))==null?void 0:c.pop())||""});return n==null?void 0:n.map(s=>{var c;return{...s,compData:(c=s==null?void 0:s.compData)==null?void 0:c.map(u=>{var p;return(u==null?void 0:u.key)==="rowButton"||(u==null?void 0:u.key)==="extraButton"?{...u,contents:(p=u==null?void 0:u.contents)==null?void 0:p.filter(h=>a==null?void 0:a.includes(h==null?void 0:h.label))}:u})}})}else return typeof r=="string"&&(r==null?void 0:r.toUpperCase())==="SUPERADMIN"?e==="/系统管理/用户管理"?await _c(n):n:[]},Hc=(e,n)=>{var a,o,s,c;const t=(o=(a=n["系统管理/角色管理"])==null?void 0:a.filter(u=>{var p;return((p=u==null?void 0:u.key)==null?void 0:p.type)==="data"}))==null?void 0:o.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 Dn=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(Dn||{});const Mo=(e,n,t)=>{var o,s,c,u;if(((c=(s=(o=Mn.value)==null?void 0:o.key)==null?void 0:s.layer)==null?void 0:c.toUpperCase())==="SUPERADMIN"||!t)return e;const r=(u=t==null?void 0:t["系统管理/用户管理"])==null?void 0:u.find(p=>{var h;return(p==null?void 0:p.id)===((h=Mn.value)==null?void 0:h.id)}),i=Hc(r,t);if(!i)return e;switch(Dn==null?void 0:Dn[i]){case 0:return e;case 1:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([h,g])=>{var m,v,b,S,N,D,x,I,w;const y=g==null?void 0:g[1],d=h[(h==null?void 0:h.length)-1]===ya.value;return((v=(m=y==null?void 0:y.key)==null?void 0:m.createUserLayer)==null?void 0:v.toUpperCase())==="SUPERADMIN"||((b=y==null?void 0:y.key)==null?void 0:b.createUserOrg)===((N=(S=r==null?void 0:r.value)==null?void 0:S.tableData)==null?void 0:N.部门名称)||((D=y==null?void 0:y.key)==null?void 0:D.createUserOrg)===((I=(x=r==null?void 0:r.value)==null?void 0:x.tableData)==null?void 0:I.部门名称)&&((w=y==null?void 0:y.key)==null?void 0:w.createUserId)===(r==null?void 0:r.id)||d})):e==null?void 0:e.filter(p=>{var h,g,y,d,m,v,b,S,N;return((g=(h=p==null?void 0:p.key)==null?void 0:h.createUserLayer)==null?void 0:g.toUpperCase())==="SUPERADMIN"||((y=p==null?void 0:p.key)==null?void 0:y.createUserOrg)===((m=(d=r==null?void 0:r.value)==null?void 0:d.tableData)==null?void 0:m.部门名称)||((v=p==null?void 0:p.key)==null?void 0:v.createUserOrg)===((S=(b=r==null?void 0:r.value)==null?void 0:b.tableData)==null?void 0:S.部门名称)&&((N=p==null?void 0:p.key)==null?void 0:N.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,g])=>{var m;const y=g==null?void 0:g[1],d=h[(h==null?void 0:h.length)-1]===ya.value;return((m=y==null?void 0:y.key)==null?void 0:m.createUserId)===(r==null?void 0:r.id)||d})):e==null?void 0:e.filter(p=>{var h;return((h=p==null?void 0:p.key)==null?void 0:h.createUserId)===(r==null?void 0:r.id)})}},gr=tn(f.pinia),{activeMenuPath:Uc}=f.storeToRefs(gr);let We="$R";const $c=Fn(f.pinia),{multipleTableConst:ga}=f.storeToRefs($c),zc=f.useLoginState(f.pinia),{loginUserInfo:nr}=f.storeToRefs(zc),vt=Kt(f.pinia),qc=nn(f.pinia),{originalPath:Ro}=f.storeToRefs(qc),{payloadTypes:jc}=f.storeToRefs(vt),et=(e,n)=>(n==null?void 0:n.split(",")).some(r=>Object.keys(e).some(i=>i.startsWith("name")&&e[i]===r)),rr={onNumSlice:uu,onRandomContents:fu,onConditionContents:uo},Gc=e=>{const n=e.slice(0,e.indexOf("(")).trim(),t=rr==null?void 0:rr[n];if(typeof t!="function"){console.log(`找不到函数: ${n}`);return}const r=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),i=new Function(`return [${r}]`)();return t(...Array.isArray(i)?i:[i])},vr=(e,n,t="children")=>{var o;const r=[];let i=[],a=0;for(const s of e){const c=n.some(h=>{const[g]=h.split(".");return g===s.prop||g===s.label}),u=n.filter(h=>h.includes(".")).map(h=>h.split(".").slice(1).join("."));a=a+1;let p;if(c&&(p={...s},i.push(a),delete p[t]),s[t]&&u.length){const h=(o=vr(s[t],u,t))==null?void 0:o.contents;h.length&&(i.push(a),a=a+1,p=p||{...s},p[t]=h)}p&&r.push(p)}return{contents:r,ids:i}},Wc=e=>{if(!Ln(e))return[e];const n=new Function(`return ${e}`)(),t=[];return((i,a="")=>{for(const o of i)if(Array.isArray(o)){const[s,c]=o;Array.isArray(c)?c.forEach(u=>t.push(`"${s}:${u}"`)):t.push(a?`"${a}:${s}"`:'"'+s+'"')}else t.push('"'+o+'"')})(n),t},Yc=async(e,n,t,r)=>{var b,S,N,D,x,I,w,k,_,T,B,K,H,ie,ue,z,$,Z,ae,he,j,R,U,q,X,fe,ve,de,Se,Q,Ie,Ae,V,F,ye,we,De,ee,Ce,Ee,G,me,Re,P,ge,Oe,Xe,it,bt,Hr,Ur,$r,zr,qr,jr,Gr,Wr,Yr,Jr,Zr,Xr,Qr,ei,ti,ni,ri,ii;let i=(S=(b=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:b.contents)==null?void 0:S.find(te=>te==null?void 0:te.columnPath);i||(i=(x=Ft((D=(N=e==null?void 0:e.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:N.contents)==null?void 0:D[0]))==null?void 0:x.find(te=>te==null?void 0:te.columnPath));let a=(w=(I=f.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:I.replace("[",We))==null?void 0:w.split(We),o=(T=(_=(k=a==null?void 0:a[(a==null?void 0:a.length)-1])==null?void 0:k.replace("(",We))==null?void 0:_.split(We))==null?void 0:T[0];o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1);let s=(K=(B=f.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:B.split("["+o+"]"))==null?void 0:K[0],c="",u="",p="",h=o;if(o=(ie=(H=o==null?void 0:o.split(":"))==null?void 0:H[0])==null?void 0:ie.replaceAll("'",""),s.includes("[")){let te=(Z=($=(z=(ue=s==null?void 0:s.split("["))==null?void 0:ue[1])==null?void 0:z.split("]"))==null?void 0:$[0])==null?void 0:Z.split("/");u=s,c=(j=(he=(ae=s==null?void 0:s.split("["))==null?void 0:ae[1])==null?void 0:he.split("]"))==null?void 0:j[0];let be="";t==null||t.forEach(se=>{var Me,Ke,C,A,E;((Ke=(Me=se==null?void 0:se.value)==null?void 0:Me.pageData)==null?void 0:Ke.name)===(te==null?void 0:te[0])&&((E=(A=(C=se==null?void 0:se.value)==null?void 0:C.pageData)==null?void 0:A.compData)==null||E.forEach(L=>{var O;(L==null?void 0:L.key)==="formContent"&&((O=L==null?void 0:L.contents)==null||O.forEach(ne=>{var Te;if((ne==null?void 0:ne.prop)===(te==null?void 0:te[1])){let re=Vo((Te=f.cloneDeep(ne))==null?void 0:Te.optionUrl,r);be=(ne==null?void 0:ne.value)||re||""}}))}))}),p=be,s=((R=s==null?void 0:s.split("["))==null?void 0:R[0])+be}let g=[];const y=await f.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),d=await f.getInsofDataApi({key:{pageKey:Uc.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}}),m=[];if((q=(U=d==null?void 0:d.data)==null?void 0:U.result)==null||q.forEach(te=>{var be;m.push({id:te==null?void 0:te.id,value:te.value.tableData,parentId:(be=te==null?void 0:te.key)==null?void 0:be.parentId})}),(m==null?void 0:m.length)===0){const te=await f.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}});(fe=(X=te==null?void 0:te.data)==null?void 0:X.result)==null||fe.forEach(be=>{var se;m.push({id:be==null?void 0:be.id,value:be.value.tableData,parentId:(se=be==null?void 0:be.key)==null?void 0:se.parentId})})}let v=(de=(ve=h==null?void 0:h.replace("[",We))==null?void 0:ve.split(We))==null?void 0:de[0];if(Array.isArray((Se=y==null?void 0:y.data)==null?void 0:Se.result)&&((Ie=(Q=y==null?void 0:y.data)==null?void 0:Q.result)==null?void 0:Ie.length)>0){let te;if((v==null?void 0:v[(v==null?void 0:v.length)-1])===":"&&(v=v==null?void 0:v.slice(1,(v==null?void 0:v.length)-1)),v=(F=(V=v==null?void 0:v.split(":"))==null?void 0:V[((Ae=v==null?void 0:v.split(":"))==null?void 0:Ae.length)-1])==null?void 0:F.replaceAll("'",""),((we=(ye=y==null?void 0:y.data)==null?void 0:ye.result)==null?void 0:we.find(C=>{var A;return et((A=C==null?void 0:C.value)==null?void 0:A.pageData,v)}))??((ee=(De=y==null?void 0:y.data)==null?void 0:De.result)==null?void 0:ee.find(C=>{var A;return et((A=C==null?void 0:C.value)==null?void 0:A.pageData,o)}))){let C=(Ee=(Ce=y==null?void 0:y.data)==null?void 0:Ce.result)==null?void 0:Ee.sort((A,E)=>A.id-E.id);te=await(C==null?void 0:C.map(async A=>{var L,O,ne,Te,re,J,ke,W,Pe,Ne,Fe,Vt,Ht,Ut,ze,ai,oi,si,li,ui,ci,fi,hi,pi,di,yi,gi,vi,mi,bi,Si,Ei,Ti;let E;if(et((L=A==null?void 0:A.value)==null?void 0:L.pageData,v)||et((O=A==null?void 0:A.value)==null?void 0:O.pageData,o)&&((Te=(ne=A==null?void 0:A.value)==null?void 0:ne.pageData)==null?void 0:Te.name)===o){E=f.cloneDeep((J=(re=A==null?void 0:A.value)==null?void 0:re.pageData)==null?void 0:J.compData);let rn;et((ke=A==null?void 0:A.value)==null?void 0:ke.pageData,v)&&v===o?(Pe=(W=A==null?void 0:A.value)==null?void 0:W.pageData)!=null&&Pe.name1?rn={name:(Fe=(Ne=A==null?void 0:A.value)==null?void 0:Ne.pageData)==null?void 0:Fe.name,name0:(Ht=(Vt=A==null?void 0:A.value)==null?void 0:Vt.pageData)==null?void 0:Ht.name0,name1:(ze=(Ut=A==null?void 0:A.value)==null?void 0:Ut.pageData)==null?void 0:ze.name1}:rn={name:(oi=(ai=A==null?void 0:A.value)==null?void 0:ai.pageData)==null?void 0:oi.name,name0:(li=(si=A==null?void 0:A.value)==null?void 0:si.pageData)==null?void 0:li.name0}:rn={name:((ci=(ui=A==null?void 0:A.value)==null?void 0:ui.pageData)==null?void 0:ci.name0)||((hi=(fi=A==null?void 0:A.value)==null?void 0:fi.pageData)==null?void 0:hi.name)},E.push({key:"name",contents:rn});const St=await f.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),tableId:A==null?void 0:A.id,type:"data"}});let an;if(((di=(pi=St==null?void 0:St.data)==null?void 0:pi.result)==null?void 0:di.length)>0&&((gi=(yi=E==null?void 0:E.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:yi.contents)!=null&&gi.every(Y=>!(Y!=null&&Y.columnPath))))an=(mi=(vi=St==null?void 0:St.data)==null?void 0:vi.result)==null?void 0:mi.map(Y=>{var $t;let oe=[];return oe.push({id:Y==null?void 0:Y.id}),oe.push(($t=Y==null?void 0:Y.value)==null?void 0:$t.tableData),oe}),E.push({key:"tableContents",contents:Bt(an,(Ti=(Ei=(Si=(bi=A==null?void 0:A.value)==null?void 0:bi.pageData)==null?void 0:Si.compData)==null?void 0:Ei.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:Ti.contents)}),E.push({key:"contentTableId",contents:A==null?void 0:A.id}),c!==""&&(E!=null&&E.find(Y=>(Y==null?void 0:Y.key)==="pageColumn")&&(E=E==null?void 0:E.filter(Y=>(Y==null?void 0:Y.key)!=="pageColumn")),E.push({key:"pageColumn",contents:u}),E!=null&&E.find(Y=>(Y==null?void 0:Y.key)==="columnPath")&&(E=E==null?void 0:E.filter(Y=>(Y==null?void 0:Y.key)!=="columnPath")),E.push({key:"columnPath",contents:c}),E!=null&&E.find(Y=>(Y==null?void 0:Y.key)==="columnUsingPath")&&(E=E==null?void 0:E.filter(Y=>(Y==null?void 0:Y.key)!=="columnUsingPath")),E.push({key:"columnUsingPath",contents:p}),E!=null&&E.find(Y=>(Y==null?void 0:Y.key)==="pageGroup")&&(E=E==null?void 0:E.filter(Y=>(Y==null?void 0:Y.key)!=="pageGroup")),E.push({key:"pageGroup",contents:o})),g.push(E);else{let Y=await ht(s,sessionStorage.getItem("systemKey"),"");Y==null||Y.forEach(oe=>{var $t,Di,ki,Ai,wi,Ii,xi,Bi,Ci,Mi;if(et(oe,o)&&((Di=($t=A==null?void 0:A.value)==null?void 0:$t.pageData)==null?void 0:Di.name)===(oe==null?void 0:oe.name)||et(oe,v)&&v!==o){E=((ki=oe==null?void 0:oe.compData)==null?void 0:ki.filter(le=>(le==null?void 0:le.key)!=="tableContents"))||[],Y=(wi=(Ai=oe==null?void 0:oe.compData)==null?void 0:Ai.find(le=>(le==null?void 0:le.key)==="tableContents"))==null?void 0:wi.contents,an=Y;let on;et(oe,o)&&v===o||et(oe,v)&&v!==o?(xi=(Ii=A==null?void 0:A.value)==null?void 0:Ii.pageData)!=null&&xi.name1?on={name:oe==null?void 0:oe.name,name0:oe==null?void 0:oe.name0,name1:oe==null?void 0:oe.name1}:on={name:oe==null?void 0:oe.name,name0:oe==null?void 0:oe.name0}:on={name:(oe==null?void 0:oe.name0)||(oe==null?void 0:oe.name)},E.push({key:"name",contents:on}),E.push({key:"tableContents",contents:Bt(an,(Ci=(Bi=oe==null?void 0:oe.compData)==null?void 0:Bi.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:Ci.contents)}),E.push({key:"contentTableId",contents:(Y==null?void 0:Y.length)!==0?(Mi=oe==null?void 0:oe.compData)==null?void 0:Mi.id:A==null?void 0:A.id}),c!==""&&(E!=null&&E.find(le=>(le==null?void 0:le.key)==="pageColumn")&&(E=E==null?void 0:E.filter(le=>(le==null?void 0:le.key)!=="pageColumn")),E.push({key:"pageColumn",contents:u}),E!=null&&E.find(le=>(le==null?void 0:le.key)==="columnPath")&&(E=E==null?void 0:E.filter(le=>(le==null?void 0:le.key)!=="columnPath")),E.push({key:"columnPath",contents:c}),E!=null&&E.find(le=>(le==null?void 0:le.key)==="columnUsingPath")&&(E=E==null?void 0:E.filter(le=>(le==null?void 0:le.key)!=="columnUsingPath")),E.push({key:"columnUsingPath",contents:p}),E!=null&&E.find(le=>(le==null?void 0:le.key)==="pageGroup")&&(E=E==null?void 0:E.filter(le=>(le==null?void 0:le.key)!=="pageGroup")),E.push({key:"pageGroup",contents:o})),g.push(E)}})}}})),await Promise.all(te)}let be=[];g==null||g.forEach(C=>{be!=null&&be.find(A=>{var E,L,O,ne,Te,re,J,ke;return((ne=(O=(L=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:L[((E=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:E.length)-1])==null?void 0:O.contents)==null?void 0:ne.name)===((ke=(J=(re=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:re[((Te=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:Te.length)-1])==null?void 0:J.contents)==null?void 0:ke.name)})&&(be!=null&&be.find(A=>{var E,L,O,ne,Te,re,J,ke;return((ne=(O=(L=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:L[((E=A==null?void 0:A.filter(W=>(W==null?void 0:W.key)==="name"))==null?void 0:E.length)-1])==null?void 0:O.contents)==null?void 0:ne.name0)===((ke=(J=(re=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:re[((Te=C==null?void 0:C.find(W=>(W==null?void 0:W.key)==="name"))==null?void 0:Te.length)-1])==null?void 0:J.contents)==null?void 0:ke.name0)}))||be.push(C)}),be=be==null?void 0:be.map(C=>{var E,L;let A=[];return C==null||C.forEach(O=>{(O==null?void 0:O.key)!=="name"&&A.push(O)}),A.push((L=C==null?void 0:C.filter(O=>(O==null?void 0:O.key)==="name"))==null?void 0:L[((E=C==null?void 0:C.filter(O=>(O==null?void 0:O.key)==="name"))==null?void 0:E.length)-1]),A}),g=be,g=g==null?void 0:g.filter(C=>C!==void 0);let se=(me=(G=h==null?void 0:h.replace(":",We))==null?void 0:G.split(We))==null?void 0:me[1];se!=null&&se.includes("[")&&(se=(Re=se==null?void 0:se.replaceAll("'",'"'))==null?void 0:Re.replaceAll(":",","),se=(P=Wc(se))==null?void 0:P.join(","),se="["+((Xe=(Oe=(ge=se==null?void 0:se.replaceAll('":"',ga.value))==null?void 0:ge.replaceAll(":",ga.value))==null?void 0:Oe.replaceAll("[",""))==null?void 0:Xe.replaceAll("]",""))+"]",Ln(se==null?void 0:se.replaceAll("'",'"'))&&(se=JSON.parse(se==null?void 0:se.replaceAll("'",'"')),se.push("操作")),g=g==null?void 0:g.map(C=>{let A=[];return C=C==null?void 0:C.map(E=>{var L,O,ne,Te;if((E==null?void 0:E.key)==="header")if((L=E.contents)!=null&&L.every(re=>Array.isArray(re)))E.contents=(O=E.contents)==null?void 0:O.map(re=>{let J=vr(re,se);return re=J==null?void 0:J.contents,A=[...new Set(J.ids)],re});else{let re=vr(E.contents,se);A=[...new Set(re.ids)],E.contents=(ne=E.contents)==null?void 0:ne.filter(J=>se==null?void 0:se.find(ke=>ke===((J==null?void 0:J.prop)||(J==null?void 0:J.label))))}return(E==null?void 0:E.key)==="tableContents"&&(A==null?void 0:A.length)>0&&(E.contents=(Te=E.contents)==null?void 0:Te.map(re=>(re=re==null?void 0:re.filter((J,ke)=>(A==null?void 0:A.find(W=>W===ke))||(J==null?void 0:J.id)),re))),E}),C})),g=g==null?void 0:g.map(C=>{var E,L;let A=(L=rt((E=C==null?void 0:C.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:E.contents))==null?void 0:L.filter(O=>O!=="操作"&&O);return C=C==null?void 0:C.map(O=>{var ne;if((O==null?void 0:O.key)==="tableContents"){let Te=(ne=O.contents)==null?void 0:ne.map(re=>{var W;let J=(re==null?void 0:re.length)!==1?ct(re==null?void 0:re.filter(Pe=>Pe),A):re==null?void 0:re[0],ke=m==null?void 0:m.find(Pe=>(Pe==null?void 0:Pe.parentId)===(J==null?void 0:J.id));if(ke){let Pe=Object.assign(ke==null?void 0:ke.value,J);return Pe.id=ke==null?void 0:ke.id,Pe}else return J.id=((W=J==null?void 0:J.id)==null?void 0:W.toString())??"undefined",J});O.contents=Te}return O}),C}),g=g==null?void 0:g.sort((C,A)=>{var E,L;return((E=C==null?void 0:C.find(O=>(O==null?void 0:O.key)==="contentTableId"))==null?void 0:E.contents)-((L=A==null?void 0:A.find(O=>(O==null?void 0:O.key)==="contentTableId"))==null?void 0:L.contents)});let Me=(Hr=(bt=(it=i==null?void 0:i.columnPath)==null?void 0:it.replace("(",We))==null?void 0:bt.split(We))==null?void 0:Hr[1];if(Me&&(Me==null?void 0:Me.length)>0){Me=(Ur=Me.slice(0,(Me==null?void 0:Me.length)-1))==null?void 0:Ur.replaceAll("'","");let C=Me==null?void 0:Me.split(",");C=C==null?void 0:C.map(L=>{let O=Yn==null?void 0:Yn.find(ne=>L==null?void 0:L.includes(ne==null?void 0:ne.key));if(O)return{order:O==null?void 0:O.order,value:O==null?void 0:O.value,content:L}}),C=C==null?void 0:C.sort((L,O)=>(O==null?void 0:O.order)-(L==null?void 0:L.order));let A=[];g=g==null?void 0:g.map(L=>(L=L==null?void 0:L.map((O,ne)=>{var Te,re,J,ke;return(O==null?void 0:O.key)==="header"&&((Te=O==null?void 0:O.contents)!=null&&Te.every(W=>Array.isArray(W))?O.contents=(re=O.contents)==null?void 0:re.map(W=>{var Pe;return A.push({index:ne,content:(Pe=f.cloneDeep(W))==null?void 0:Pe.filter(Ne=>Ne==null?void 0:Ne.columnPath)}),W=W==null?void 0:W.filter(Ne=>!(Ne!=null&&Ne.columnPath)),W}):(A.push({index:ne,content:(J=f.cloneDeep(O.contents))==null?void 0:J.filter(W=>W==null?void 0:W.columnPath)}),O.contents=(ke=O.contents)==null?void 0:ke.filter(W=>!(W!=null&&W.columnPath)))),O}),L));const E=C==null?void 0:C.map(async L=>{var ne,Te,re,J;let O=(re=(Te=(ne=L==null?void 0:L.content)==null?void 0:ne.replace(":",We))==null?void 0:Te.split(We))==null?void 0:re[1];g=await Gc((L==null?void 0:L.value)+"('"+((J=JSON.stringify(f.cloneDeep(g)))==null?void 0:J.replaceAll("'",'"'))+"','"+O+"')")});await Promise.all(E),g=g==null?void 0:g.map(L=>(L.push({key:"filterAllType",value:C}),L)),g=g==null?void 0:g.map(L=>(L=L==null?void 0:L.map((O,ne)=>{var Te,re,J,ke,W,Pe;if((O==null?void 0:O.key)==="header")if((Te=O==null?void 0:O.contents)!=null&&Te.every(Ne=>Array.isArray(Ne)))O.contents=(re=O.contents)==null?void 0:re.map(Ne=>{var Fe,Vt,Ht,Ut;return A!=null&&A.find(ze=>(ze==null?void 0:ze.index)===ne)&&((Vt=(Fe=A==null?void 0:A.find(ze=>(ze==null?void 0:ze.index)===ne))==null?void 0:Fe.content)==null?void 0:Vt.length)>0&&Ne.push((Ut=(Ht=A==null?void 0:A.find(ze=>(ze==null?void 0:ze.index)===ne))==null?void 0:Ht.content)==null?void 0:Ut[0]),Ne});else{let Ne=O.contents;A!=null&&A.find(Fe=>(Fe==null?void 0:Fe.index)===ne)&&((ke=(J=A==null?void 0:A.find(Fe=>(Fe==null?void 0:Fe.index)===ne))==null?void 0:J.content)==null?void 0:ke.length)>0&&Ne.push((Pe=(W=A==null?void 0:A.find(Fe=>(Fe==null?void 0:Fe.index)===ne))==null?void 0:W.content)==null?void 0:Pe[0]),O.contents=Ne}return O}),L))}let Ke=[];(zr=($r=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:$r.contents)!=null&&zr.every(C=>Array.isArray(C))?Ke=(Gr=(jr=(qr=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:qr.contents)==null?void 0:jr[0])==null?void 0:Gr.filter(C=>!(C!=null&&C.columnPath)&&(C==null?void 0:C.label)!=="操作"):Ke=(Yr=(Wr=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:Wr.contents)==null?void 0:Yr.filter(C=>!(C!=null&&C.columnPath)&&(C==null?void 0:C.label)!=="操作"),Ke&&(Ke==null?void 0:Ke.length)>0&&(g=g==null?void 0:g.map(C=>(C=C==null?void 0:C.map(A=>{var E,L;return(A==null?void 0:A.key)==="header"&&((E=A==null?void 0:A.contents)!=null&&E.every(O=>Array.isArray(O))?(A.contents=[...(L=A.contents)==null?void 0:L[0],...Ke],A.contents=[A.contents]):A.contents=[...A.contents,...Ke]),A}),C)))}else{let te="",be="";(Jr=s==null?void 0:s.split("/"))==null||Jr.forEach((E,L)=>{var O;L<((O=s==null?void 0:s.split("/"))==null?void 0:O.length)-1?te=te===""?te+E:te+"/"+E:be=E});let se=await ht(te,sessionStorage.getItem("systemKey"),""),Me;(ei=(Qr=(Xr=(Zr=se==null?void 0:se[0])==null?void 0:Zr.compData)==null?void 0:Xr.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:Qr.contents)==null||ei.forEach((E,L)=>{E!=null&&E.isMainKey&&(Me=L)});let Ke=[];(ii=(ri=(ni=(ti=se==null?void 0:se[0])==null?void 0:ti.compData)==null?void 0:ni.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:ri.contents)==null||ii.forEach(E=>{E.find(L=>L===be)&&(Me||Me===0)&&Ke.push(E==null?void 0:E[Me])});let C=[],A=await(Ke==null?void 0:Ke.map(async E=>{let L=await ht(te+Ro.value+E,sessionStorage.getItem("systemKey"),""),O=L==null?void 0:L.find(ne=>(ne==null?void 0:ne.name)===o);C.push(O)}));await Promise.all(A),C==null||C.forEach(E=>{var O,ne,Te,re;let L=f.cloneDeep(E==null?void 0:E.compData);L&&(L=L==null?void 0:L.filter(J=>(J==null?void 0:J.key)!=="tableContents"),L.push({key:"tableContents",contents:Bt((ne=(O=E==null?void 0:E.compData)==null?void 0:O.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:ne.contents,(re=(Te=E==null?void 0:E.compData)==null?void 0:Te.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:re.contents)}),L.push({key:"contentTableId",contents:E==null?void 0:E.id}),g.push(L))})}return g==null?void 0:g.filter(te=>te!==void 0)},ht=async(e,n,t="",r=!1,i,a,o)=>{var v,b,S,N,D,x,I;let s,c=new WeakMap;o?c=o:(b=(v=(await f.getPageInsofDataApi({systemKey:n,type:jc.value})).data.result)==null?void 0:v.filter(k=>{var _,T;return((_=k==null?void 0:k.key)==null?void 0:_.pageKey)!=="menu"&&((T=k==null?void 0:k.key)==null?void 0:T.pageKey)!=="secret"}))==null||b.forEach(k=>{c[k.key.pageKey]?c[k.key.pageKey]=[...c[k.key.pageKey],k]:c[k.key.pageKey]=[k]}),(!r||!i)&&(s=(S=c[e])==null?void 0:S.filter(w=>{var k;return((k=w==null?void 0:w.key)==null?void 0:k.parentTable)===t})),vt.setPageMapState(c);const u=(N=c[e])==null?void 0:N.filter(w=>{var k;return((k=w==null?void 0:w.key)==null?void 0:k.type)==="structureMethod"}),p=s==null?void 0:s.map(w=>w.id);if(!p)return;let h=(D=c[e])==null?void 0:D.filter(w=>{var k,_,T,B;return((k=w==null?void 0:w.key)==null?void 0:k.type)==="data"&&(p.includes((_=w==null?void 0:w.key)==null?void 0:_.tableId)||p.includes((B=(T=w==null?void 0:w.key)==null?void 0:T.tableId)==null?void 0:B.toString()))});const g=c[e+Ro.value]??[];(g==null?void 0:g.length)===0&&(h=Mo(h,!1,c));let y=[];h==null||h.forEach(w=>{var T;const k=Array.isArray(w.value.tableData)?w.value.tableData:[w.value.tableData];k.unshift({id:w.id});const _=(T=w==null?void 0:w.key)==null?void 0:T.tableId;y!=null&&y.find(B=>(B==null?void 0:B.key)===_)?y=y==null?void 0:y.map(B=>((B==null?void 0:B.key)===_&&(B.contents=[...B.contents,k]),B)):y.push({key:_,contents:[k]})});let d=[];const m=await(s==null?void 0:s.map(async w=>{var B,K,H,ie,ue,z,$,Z,ae,he,j,R,U,q,X,fe,ve,de,Se,Q,Ie,Ae;const k=w.value.pageData,_=w==null?void 0:w.id;let T=(B=f.cloneDeep(k==null?void 0:k.compData))==null?void 0:B.filter(V=>(V==null?void 0:V.key)!=="tableContents");if(T&&(T!=null&&T.find(V=>(V==null?void 0:V.key)==="header"))&&(!Array.isArray((H=(K=T==null?void 0:T.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:K.contents)==null?void 0:H[0])&&((ue=(ie=T==null?void 0:T.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:ie.contents)!=null&&ue.every(V=>!(V!=null&&V.columnPath)))||Array.isArray(($=(z=T==null?void 0:T.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:z.contents)==null?void 0:$[0])&&((he=Ft((ae=(Z=T==null?void 0:T.find(V=>(V==null?void 0:V.key)==="header"))==null?void 0:Z.contents)==null?void 0:ae[0]))!=null&&he.every(V=>!(V!=null&&V.columnPath))))){let V=Bt((j=y==null?void 0:y.find(ee=>(ee==null?void 0:ee.key)===w.id))==null?void 0:j.contents,(R=T==null?void 0:T.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:R.contents),F=await df((U=T==null?void 0:T.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:U.contents,e,(q=T==null?void 0:T.find(ee=>(ee==null?void 0:ee.key)==="tableFilter"))==null?void 0:q.contents,c);F!=null&&F.mainKeys&&T.push({key:"mainRouters",contents:F==null?void 0:F.mainKeys});let ye=[],we=[];Array.isArray(F)&&(ye=Bt(F,(X=T==null?void 0:T.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:X.contents)),Array.isArray(F==null?void 0:F.tableContents)&&(we=Bt(F==null?void 0:F.tableContents,(fe=T==null?void 0:T.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:fe.contents));let De=[...ye,...we];Array.isArray(V)&&(V==null?void 0:V.length)>0&&(De=[...De,...V]),T.push({key:"tableContents",contents:De}),T=T==null?void 0:T.map(ee=>{var Ce;return(ee==null?void 0:ee.key)==="header"&&(ee.contents=(Ce=ee.contents)==null?void 0:Ce.map(Ee=>((Ee==null?void 0:Ee.prop)===(F==null?void 0:F.mainKey)&&(Ee.isMainKey=!0),Ee))),ee})}else T&&(T!=null&&T.find(V=>(V==null?void 0:V.key)==="header"))&&(T=await Yc(f.cloneDeep(T),_,s,c),T!=null&&T.every(V=>Array.isArray(V))||(T=[T]));if(k.id=w==null?void 0:w.id,k.isShow=(de=(ve=w==null?void 0:w.value)==null?void 0:ve.pageData)==null?void 0:de.isShow,(T==null?void 0:T.length)>0&&T.every(V=>Array.isArray(V)))T==null||T.forEach(V=>{var we,De,ee,Ce,Ee;let F=f.cloneDeep(k);F.compData=V,F.tableId=(we=V==null?void 0:V.find(G=>(G==null?void 0:G.key)==="contentTableId"))==null?void 0:we.contents;let ye=(De=V==null?void 0:V.find(G=>(G==null?void 0:G.key)==="name"))==null?void 0:De.contents;ye!=null&&ye.name0&&(ye==null?void 0:ye.name0)===(F==null?void 0:F.name)?(F.name0=F.name,F.name=ye==null?void 0:ye.name):ye!=null&&ye.name0&&(F.name1=F.name,F.name0=ye.name0,F.name=ye==null?void 0:ye.name),(ee=F==null?void 0:F.compData)!=null&&ee.every(G=>Array.isArray(G))?((Ce=F==null?void 0:F.compData)==null?void 0:Ce.length)===0?d.push(F):(Ee=F==null?void 0:F.compData)==null||Ee.forEach((G,me)=>{let Re;me===0?Re={comp:F==null?void 0:F.comp,compData:G,id:F==null?void 0:F.id,name:F==null?void 0:F.name,isShow:F==null?void 0:F.isShow}:Re={comp:F==null?void 0:F.comp,compData:G,id:F==null?void 0:F.id,name:"",isShow:F==null?void 0:F.isShow},d.push(Re)}):d.push(F)});else if(((Se=w.key)==null?void 0:Se.type)!=="method")k.compData=T,(Q=k==null?void 0:k.compData)!=null&&Q.every(V=>Array.isArray(V))?((Ie=k==null?void 0:k.compData)==null?void 0:Ie.length)===0?d.push(k):(Ae=k==null?void 0:k.compData)==null||Ae.forEach((V,F)=>{let ye;F===0?ye={comp:k==null?void 0:k.comp,compData:V,id:k==null?void 0:k.id,name:k==null?void 0:k.name,isShow:k==null?void 0:k.isShow}:ye={comp:k==null?void 0:k.comp,compData:V,id:k==null?void 0:k.id,name:"",isShow:k==null?void 0:k.isShow},d.push(ye)}):d.push(k);else{let V;V={name:"",compData:[k],comp:"calculator"},d.push(V)}}));return await Promise.all(m),((x=u==null?void 0:u.map(w=>w.value.pageData))==null?void 0:x.filter(w=>Object.values(w).length>0).length)>0&&d.push({comp:"methodButton",name:"",compData:(I=u==null?void 0:u.map(w=>w.value.pageData))==null?void 0:I.filter(w=>Object.values(w).length>0)}),d=d.sort((w,k)=>w.id-k.id),a?d:await Vc(e,d)},Jc=async e=>{await f.deleteInsofDataApi({id:e}),vt.setTableLoading(!1)},Zc=async(e,n,t,r,i,a,o,s)=>{var h,g,y,d,m,v,b,S,N,D,x,I,w,k,_,T,B,K,H,ie,ue,z,$,Z;let c=((g=(h=o==null?void 0:o.content)==null?void 0:h[0])==null?void 0:g.id)??"",u=(y=s==null?void 0:s.param)==null?void 0:y.url,p;if(c!==""&&((d=o==null?void 0:o.content)==null?void 0:d.length)>1&&typeof((v=(m=o==null?void 0:o.content)==null?void 0:m[0])==null?void 0:v.id)!="string"){const ae=await f.getInsofDataApi({id:c});let he=((D=(N=(S=(b=ae==null?void 0:ae.data)==null?void 0:b.result)==null?void 0:S[0])==null?void 0:N.key)==null?void 0:D.tableId)??"",j=((k=(w=(I=(x=ae==null?void 0:ae.data)==null?void 0:x.result)==null?void 0:I[0])==null?void 0:w.key)==null?void 0:k.pageKey)??"";const R=await f.createInsofDataApi({key:{type:e,pageKey:u||j||n,tableId:he||t,systemKey:r},value:{tableData:ct(i,(_=rt(a))==null?void 0:_.filter(U=>U!=="操作"))}});((T=R==null?void 0:R.data)==null?void 0:T.code)===200?(p=(B=R==null?void 0:R.data)==null?void 0:B.result,f.ElMessage.success("保存成功")):f.ElMessage.error("保存响应失败"),vt.setTableLoading(!1)}else{let ae;if(o!=null&&o.parentTableId){let j=await f.getInsofDataApi({id:o==null?void 0:o.parentTableId});ae=(ue=(ie=(H=(K=j==null?void 0:j.data)==null?void 0:K.result)==null?void 0:H[0])==null?void 0:ie.key)==null?void 0:ue.pageKey}const he=await f.createInsofDataApi({key:{type:e,pageKey:u||ae||n,tableId:o!=null&&o.parentTableId?o==null?void 0:o.parentTableId:t,systemKey:r},value:{tableData:ct(i,(z=rt(a))==null?void 0:z.filter(j=>j!=="操作"))}});(($=he==null?void 0:he.data)==null?void 0:$.code)===200?(p=(Z=he==null?void 0:he.data)==null?void 0:Z.result,f.ElMessage.success("保存成功")):f.ElMessage.error("保存响应失败"),vt.setTableLoading(!1)}return p},No=(e,n,t)=>{let r={},i={};if(t&&(t==null?void 0:t.length)>0){for(let a in e)t!=null&&t.find(o=>o===a)&&(e!=null&&e[a])&&(r[a]=e[a]);for(let a in n)t!=null&&t.find(o=>o===a)&&(n!=null&&n[a])&&(i[a]=n[a])}else r=e,i=n;if(!Object.keys(r).some(a=>a in i))return!1;for(let a in r)if((r==null?void 0:r[a])!==(i==null?void 0:i[a])&&!(!r[a]||!i[a]))return!1;return!0},Xc=async(e,n,t,r,i,a,o,s)=>{var c,u,p,h,g,y,d,m,v,b,S,N,D,x,I,w,k,_,T,B,K,H,ie,ue,z,$,Z,ae,he,j,R,U,q,X,fe,ve,de,Se,Q,Ie,Ae,V;if(r)if((s==null?void 0:s.parentTableId)===0){const F=await f.getInsofDataApi({id:r});let ye=((h=(p=(u=(c=F==null?void 0:F.data)==null?void 0:c.result)==null?void 0:u[0])==null?void 0:p.key)==null?void 0:h.tableId)??"",we=((m=(d=(y=(g=F==null?void 0:F.data)==null?void 0:g.result)==null?void 0:y[0])==null?void 0:d.key)==null?void 0:m.pageKey)??"";if(ye&&ye!==""){const De=await f.updateInsofDataApi({key:{type:e,pageKey:we,tableId:ye,systemKey:i},value:{tableData:ct(a,(v=rt(o))==null?void 0:v.filter(ee=>ee!=="操作"))},id:r});((b=De==null?void 0:De.data)==null?void 0:b.code)===200?f.ElMessage.success("保存成功"):f.ElMessage.error("保存响应失败"),vt.setTableLoading(!1)}else{const De=await f.updateInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:i},value:{tableData:ct(a,(S=rt(o))==null?void 0:S.filter(ee=>ee!=="操作"))},id:r});((N=De==null?void 0:De.data)==null?void 0:N.code)===200?f.ElMessage.success("保存成功"):f.ElMessage.error("保存响应失败"),vt.setTableLoading(!1)}}else{let F=(D=rt(o))==null?void 0:D.filter(G=>G!=="operate"),ye=ct(a,F),we=await f.getInsofDataApi({key:{tableId:t}});we=(I=(x=we==null?void 0:we.data)==null?void 0:x.result)==null?void 0:I.map(G=>{var me,Re;return{id:G==null?void 0:G.id,value:(me=G==null?void 0:G.value)==null?void 0:me.tableData,parentId:(Re=G==null?void 0:G.key)==null?void 0:Re.parentId}});let De=await f.getInsofDataApi({key:{tableId:s==null?void 0:s.parentTableId}});De=(k=(w=De==null?void 0:De.data)==null?void 0:w.result)==null?void 0:k.map(G=>{var me;return{id:G==null?void 0:G.id,value:(me=G==null?void 0:G.value)==null?void 0:me.tableData}});let ee="";De==null||De.forEach(G=>{if(ee===""){let me=G==null?void 0:G.value;No(me,ye)&&(ee=G==null?void 0:G.id)}});let Ce=(_=we==null?void 0:we.find(G=>(G==null?void 0:G.parentId)===ee))==null?void 0:_.id;Ce=r||Ce;let Ee=s==null?void 0:s.singleContent;if(Ee==null||delete Ee.id,typeof Ce=="number"){let G=(T=we==null?void 0:we.find(P=>(P==null?void 0:P.id)===Ce))==null?void 0:T.parentId,me=await f.getInsofDataApi({id:G});me=(ie=(H=(K=(B=me==null?void 0:me.data)==null?void 0:B.result)==null?void 0:K[0])==null?void 0:H.value)==null?void 0:ie.tableData;let Re={};for(let P in me)Re[P]=(Ee==null?void 0:Ee[P])??(me==null?void 0:me[P]);await f.batchUpdateInsofDataApi({dataList:[{id:Ce,value:{tableData:Ee}},{id:G,value:{tableData:Re}}]})}else{let G=await f.getInsofDataApi({id:parseInt(Ce)}),me=G;G=(Z=($=(z=(ue=G==null?void 0:G.data)==null?void 0:ue.result)==null?void 0:z[0])==null?void 0:$.value)==null?void 0:Z.tableData;let Re={};for(let Oe in G)Re[Oe]=(Ee==null?void 0:Ee[Oe])??(G==null?void 0:G[Oe]);let P=((R=(j=(he=(ae=me==null?void 0:me.data)==null?void 0:ae.result)==null?void 0:he[0])==null?void 0:j.key)==null?void 0:R.pageKey)??"",ge=((fe=(X=(q=(U=me==null?void 0:me.data)==null?void 0:U.result)==null?void 0:q[0])==null?void 0:X.key)==null?void 0:fe.parentId)??"";if(ge==="")await f.createInsofDataApi({key:{type:e,pageKey:P,tableId:t,systemKey:i,version:1,parentId:parseInt(Ce),createUserId:(ve=nr.value)==null?void 0:ve.id,createUserLayer:((de=nr.value)==null?void 0:de.dept)||((Se=nr.value)==null?void 0:Se.部门名称)},value:{tableData:Ee}}),await f.batchUpdateInsofDataApi({dataList:[{id:parseInt(Ce),value:{tableData:Re}}]});else{let Oe=await f.getInsofDataApi({id:ge}),Xe=(V=(Ae=(Ie=(Q=Oe==null?void 0:Oe.data)==null?void 0:Q.result)==null?void 0:Ie[0])==null?void 0:Ae.value)==null?void 0:V.tableData,it={};for(let bt in Xe)it[bt]=(Ee==null?void 0:Ee[bt])??(Xe==null?void 0:Xe[bt]);await f.batchUpdateInsofDataApi({dataList:[{id:parseInt(Ce),value:{tableData:Re}},{id:parseInt(ge),value:{tableData:it}}]})}}}},Qc=async(e,n)=>{await f.updateInsofDataApi({value:{pageData:n},id:e})},ef=async()=>{var e,n,t,r,i,a,o,s,c;try{const u=await f.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),layer:"superAdmin"}});if(((e=u==null?void 0:u.data)==null?void 0:e.code)===200){const p=(i=(r=(t=(n=u==null?void 0:u.data)==null?void 0:n.result)==null?void 0:t[0])==null?void 0:r.key)==null?void 0:i.systemType;let h="browser";p==="制造系统"&&(h="client"),p==="三维系统"&&(h="three"),gr.setPlatform(h),gr.setPlatName(((c=(s=(o=(a=u==null?void 0:u.data)==null?void 0:a.result)==null?void 0:o[0])==null?void 0:s.key)==null?void 0:c.name)??"")}}catch(u){return Promise.reject(u)}},Rt=l.ref(0),mr=tn(f.pinia),tf=nn(f.pinia),{originalPath:At}=f.storeToRefs(tf),nf=f.useLoginState(f.pinia),rf=Fn(f.pinia),{multipleTableConst:Ve}=f.storeToRefs(rf),{loginUserInfo:$e}=f.storeToRefs(nf),{activeMenuPath:Ff}=f.storeToRefs(mr),br=Kt(f.pinia),{pageMapState:Sr}=f.storeToRefs(br),Ge=At.value,Rn=e=>e==null?void 0:e.map(t=>{var r;return Rt.value++,Array.isArray(t)?Rn(t):{label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+Rt.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)??Rt.value,type:(t==null?void 0:t.label)==="操作"?"operate":void 0,formType:(t==null?void 0:t.formType)??(t!=null&&t.groupSelect?"Select":""),isHidden:t==null?void 0:t.isHidden,options:(t==null?void 0:t.options)??[],children:Rn(t.children)??void 0,formMenuSelect:(t==null?void 0:t.formMenuSelect)??[],groupSelect:t!=null&&t.groupSelect?(r=t==null?void 0:t.groupSelect)==null?void 0:r.replaceAll('"',"").split(":"):[],isMainKey:(t==null?void 0:t.isMainKey)||!!(t!=null&&t.directiveLabel),allSelectionContents:(t==null?void 0:t.allSelectionContents)??[],selectFilter:t==null?void 0:t.selectFilter}}),af=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},of=e=>f.cloneDeep(e).map(t=>(Array.isArray(t)&&(t=t.map(r=>{var i;return Array.isArray(r)?r=Rn(r):(r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":(r==null?void 0:r.prop)??"a"+Rt.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)??Rt.value,type:(r==null?void 0:r.label)==="操作"?"operate":void 0,formType:(r==null?void 0:r.formType)??(r!=null&&r.groupSelect?"Select":""),isHidden:r==null?void 0:r.isHidden,options:(r==null?void 0:r.options)??[],children:Rn(r.children),formMenuSelect:(r==null?void 0:r.formMenuSelect)??[],groupSelect:r!=null&&r.groupSelect?(i=r==null?void 0:r.groupSelect)==null?void 0:i.replaceAll('"',"").split(":"):[],isMainKey:(r==null?void 0:r.isMainKey)||!!(r!=null&&r.directiveLabel),allSelectionContents:(r==null?void 0:r.allSelectionContents)??[],selectFilter:r==null?void 0:r.selectFilter},Rt.value++),r})),t)),Ft=e=>{function n(t,r=[],i=""){if(!t||t.length===0)return[];let a=r;return Array.isArray(t)&&(t==null||t.forEach(o=>{var s,c,u,p,h,g,y,d,m,v,b,S,N;if(o!=null&&o.children&&((s=o.children)==null?void 0:s.length)>0){let D=i===""?i+((h=(c=o==null?void 0:o.prop)==null?void 0:c.split(Ve.value))==null?void 0:h[((p=(u=o==null?void 0:o.prop)==null?void 0:u.split(Ve.value))==null?void 0:p.length)-1]):i+Ve.value+((m=(g=o==null?void 0:o.prop)==null?void 0:g.split(Ve.value))==null?void 0:m[((d=(y=o==null?void 0:o.prop)==null?void 0:y.split(Ve.value))==null?void 0:d.length)-1]);a=n(o==null?void 0:o.children,a,D)}else i!==""&&(o.prop=i+Ve.value+((N=(v=o==null?void 0:o.prop)==null?void 0:v.split(Ve.value))==null?void 0:N[((S=(b=o==null?void 0:o.prop)==null?void 0:b.split(Ve.value))==null?void 0:S.length)-1])),a.push(o)})),a}return n(e)},sf=e=>{function n(t,r=[],i=""){if(!t||t.length===0)return[];let a=r;return Array.isArray(t)&&(a=t==null?void 0:t.map(o=>{var s,c,u,p,h,g,y,d,m,v,b,S,N;if(o!=null&&o.children&&((s=o.children)==null?void 0:s.length)>0){let D=i===""?i+((h=(c=o==null?void 0:o.prop)==null?void 0:c.split(Ve.value))==null?void 0:h[((p=(u=o==null?void 0:o.prop)==null?void 0:u.split(Ve.value))==null?void 0:p.length)-1]):i+Ve.value+((m=(g=o==null?void 0:o.prop)==null?void 0:g.split(Ve.value))==null?void 0:m[((d=(y=o==null?void 0:o.prop)==null?void 0:y.split(Ve.value))==null?void 0:d.length)-1]);o.children=n(o==null?void 0:o.children,a,D)}else i!==""&&(o.prop=i+Ve.value+((N=(v=o==null?void 0:o.prop)==null?void 0:v.split(Ve.value))==null?void 0:N[((S=(b=o==null?void 0:o.prop)==null?void 0:b.split(Ve.value))==null?void 0:S.length)-1]));return o})),a}return n(e)},lf=e=>{let n=f.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},uf=e=>{var n,t,r,i,a,o;if(((n=e==null?void 0:e.pageData)==null?void 0:n.comp)==="Form"){let s=(r=(t=e==null?void 0:e.pageData)==null?void 0:t.compData)==null?void 0:r.map(u=>{var p;return(u==null?void 0:u.key)==="formContent"&&(u.contents=(p=u.contents)==null?void 0:p.map(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:(a=e==null?void 0:e.pageData)==null?void 0:a.name,isShow:(o=e==null?void 0:e.pageData)==null?void 0:o.isShow}}}else return e},cf=(e,n)=>{var r,i,a,o,s,c,u,p,h;let t=(a=(i=(r=n==null?void 0:n.pageData)==null?void 0:r.compData)==null?void 0:i.find(g=>(g==null?void 0:g.key)==="formContent"))==null?void 0:a.contents;if(((o=e==null?void 0:e.pageData)==null?void 0:o.comp)==="Form"){let g=(c=(s=e==null?void 0:e.pageData)==null?void 0:s.compData)==null?void 0:c.map(d=>{var m;return(d==null?void 0:d.key)==="formContent"&&(d.contents=(m=d.contents)==null?void 0:m.map(v=>{var b;return v.value=(b=t==null?void 0:t.find(S=>(S==null?void 0:S.key)===(v==null?void 0:v.key)))==null?void 0:b.value,v})),d});return{pageData:{comp:(u=e==null?void 0:e.pageData)==null?void 0:u.comp,compData:g,name:(p=e==null?void 0:e.pageData)==null?void 0:p.name,isShow:(h=e==null?void 0:e.pageData)==null?void 0:h.isShow}}}else return e},Yt=async(e,n,t,r,i)=>{var m,v,b,S,N,D,x,I,w,k,_,T,B,K,H,ie,ue,z,$,Z,ae,he,j;let a=e;(a==null?void 0:a[(a==null?void 0:a.length)-1])!==Ge&&(a="",(v=(m=f.cloneDeep(e))==null?void 0:m.split(Ge))==null||v.forEach((R,U)=>{var q,X;U!==((X=(q=f.cloneDeep(e))==null?void 0:q.split(Ge))==null?void 0:X.length)-1&&(a=a===""?a+R:a+"/"+R)}),a=a+Ge);let o=[],s=await f.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(R=>{var U;return((U=R==null?void 0:R.key)==null?void 0:U.type)==="structure"})}};let u;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==Ge&&(u={data:{result:(N=Sr.value[a])==null?void 0:N.filter(R=>{var U;return((U=R==null?void 0:R.key)==null?void 0:U.type)==="structure"})}},((x=(D=u==null?void 0:u.data)==null?void 0:D.result)==null?void 0:x.length)>0&&(u=(w=(I=f.cloneDeep(u))==null?void 0:I.data)==null?void 0:w.result));const p={data:{result:(k=Sr.value[a])==null?void 0:k.filter(R=>{var U;return((U=R==null?void 0:R.key)==null?void 0:U.type)==="structureMethod"})}},h={data:{result:(T=(_=s==null?void 0:s.data)==null?void 0:_.result)==null?void 0:T.filter(R=>{var U;return((U=R==null?void 0:R.key)==null?void 0:U.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==Ge){let R=(B=c==null?void 0:c.data)==null?void 0:B.result;if(!Array.isArray(u))return;u==null||u.forEach(U=>{var X,fe,ve,de,Se;let q=(X=R==null?void 0:R.find(Q=>{var Ie,Ae,V,F;return((Ae=(Ie=U==null?void 0:U.value)==null?void 0:Ie.pageData)==null?void 0:Ae.name)===((F=(V=Q==null?void 0:Q.value)==null?void 0:V.pageData)==null?void 0:F.name)}))==null?void 0:X.value;q?q=q:q=void 0,o.push({key:{pageKey:n,parentTable:((fe=q==null?void 0:q.key)==null?void 0:fe.parentTable)??"",systemKey:(ve=U==null?void 0:U.key)==null?void 0:ve.systemKey,type:((de=q==null?void 0:q.key)==null?void 0:de.type)??((Se=U==null?void 0:U.key)==null?void 0:Se.type),version:1},value:cf(U==null?void 0:U.value,q)})})}else(H=(K=c==null?void 0:c.data)==null?void 0:K.result)==null||H.forEach(R=>{var U,q,X;o.push({key:{pageKey:n,parentTable:(U=R==null?void 0:R.key)==null?void 0:U.parentTable,systemKey:(q=R==null?void 0:R.key)==null?void 0:q.systemKey,type:(X=R==null?void 0:R.key)==null?void 0:X.type,version:1},value:uf(R==null?void 0:R.value)})});if((ue=(ie=p==null?void 0:p.data)==null?void 0:ie.result)==null||ue.forEach(R=>{var U,q;o.push({key:{pageKey:n,systemKey:(U=R==null?void 0:R.key)==null?void 0:U.systemKey,type:(q=R==null?void 0:R.key)==null?void 0:q.type,version:1},value:R==null?void 0:R.value})}),o=o==null?void 0:o.map(R=>{var U,q,X;return((q=(U=R==null?void 0:R.value)==null?void 0:U.pageData)==null?void 0:q.comp)==="Form"&&(R.value.pageData.compData=(X=R.value.pageData.compData)==null?void 0:X.map(fe=>{var ve;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(ve=fe.contents)==null?void 0:ve.map(de=>(t!=null&&t[de==null?void 0:de.key]&&(de==null?void 0:de.type)!=="Date"&&(de.value=t[de.key]),de))),fe}),r&&R.value.pageData.compData.push({key:"parentFormPath",contents:r})),R}),(o==null?void 0:o.length)>0){let R;if(!i)R=o;else{const U=o==null?void 0:o.find(X=>{var fe,ve;return i==null?void 0:i.includes((ve=(fe=X==null?void 0:X.value)==null?void 0:fe.pageData)==null?void 0:ve.name)}),q=/^[A-Za-z]+$/;R=U?o==null?void 0:o.map(X=>{var fe,ve,de,Se,Q,Ie;return i!=null&&i.includes((ve=(fe=X==null?void 0:X.value)==null?void 0:fe.pageData)==null?void 0:ve.name)?{...X,value:{pageData:{...(de=X==null?void 0:X.value)==null?void 0:de.pageData,compData:(Ie=(Q=(Se=X==null?void 0:X.value)==null?void 0:Se.pageData)==null?void 0:Q.compData)==null?void 0:Ie.map(Ae=>{var V;return(Ae==null?void 0:Ae.key)==="formContent"?{...Ae,contents:(V=Ae==null?void 0:Ae.contents)==null?void 0:V.map(F=>q.test(F==null?void 0:F.prop)?F:{...F,value:""})}:Ae})}}}:X}):o}await f.batchAddInsofDataApi({dataList:R})}let g={};const y=await f.getInsofDataApi({key:{pageKey:n,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});(($=(z=c==null?void 0:c.data)==null?void 0:z.result)==null?void 0:$.length)>0&&((ae=(Z=c==null?void 0:c.data)==null?void 0:Z.result)==null||ae.forEach(R=>{var U,q,X;g[R.id]=(X=(q=(U=y==null?void 0:y.data)==null?void 0:U.result)==null?void 0:q.find(fe=>{var ve,de,Se,Q;return((de=(ve=fe==null?void 0:fe.value)==null?void 0:ve.pageData)==null?void 0:de.name)===((Q=(Se=R==null?void 0:R.value)==null?void 0:Se.pageData)==null?void 0:Q.name)}))==null?void 0:X.id}));let d=[];(j=(he=h==null?void 0:h.data)==null?void 0:he.result)==null||j.forEach(R=>{var U,q,X;d.push({key:{pageKey:n,tableId:g[(U=R==null?void 0:R.key)==null?void 0:U.tableId],systemKey:(q=R==null?void 0:R.key)==null?void 0:q.systemKey,type:(X=R==null?void 0:R.key)==null?void 0:X.type},value:R==null?void 0:R.value})}),(d==null?void 0:d.length)>0&&await f.batchAddInsofDataApi({dataList:d})},Oo=(e,n)=>{let t=f.cloneDeep(e);return t=t==null?void 0:t.map(i=>{var c,u,p;let a=[],o=[];for(let h in n)if(h!=null&&h.includes((u=(c=f.cloneDeep(i))==null?void 0:c.key)==null?void 0:u.pageKey)){let g=(p=n[h])==null?void 0:p.filter(y=>{var d,m,v;return((d=y==null?void 0:y.key)==null?void 0:d.type)==="data"&&((m=y==null?void 0:y.key)==null?void 0:m.tableId)===((v=f.cloneDeep(i))==null?void 0:v.id)});o=[...o,...g]}(o==null?void 0:o.length)>0&&(o==null||o.forEach(h=>{a.push(h.value.tableData)}));let s=f.cloneDeep(i).value.pageData.compData;return s.push({key:"tableContents",contents:a}),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(a=>{var o;return(o=a==null?void 0:a.value)==null?void 0:o.pageData}),i="";return r==null||r.forEach(a=>{var o;(a==null?void 0:a.name)===(t==null?void 0:t[0])&&((o=a==null?void 0:a.compData)==null||o.forEach(s=>{var c;(s==null?void 0:s.key)==="header"&&((c=s==null?void 0:s.contents)==null||c.forEach((u,p)=>{(u==null?void 0:u.prop)===(t==null?void 0:t[1])&&(i=p)}))}))}),i},Fo=(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(a=>{var o;return(o=a==null?void 0:a.value)==null?void 0:o.pageData}),i="";return r==null||r.forEach(a=>{var o;(a==null?void 0:a.name)===(t==null?void 0:t[0])&&((o=a==null?void 0:a.compData)==null||o.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},va=(e,n,t,r)=>{var c,u,p;let i=(c=e==null?void 0:e[0])==null?void 0:c.formMenuSelect,a=e==null?void 0:e.map(h=>{var g,y;return(y=(g=h.groupSelect)==null?void 0:g.split(":"))==null?void 0:y[1]}),o="";i==null||i.forEach((h,g)=>{(i==null?void 0:i.length)-1!==g?o=o===""?o+h:o+"/"+h:o=o+Ge+h});let s=[];for(let h in n)if(h!=null&&h.includes(o)){let g=(u=n[h])==null?void 0:u.filter(y=>{var d,m;return((d=y==null?void 0:y.key)==null?void 0:d.type)==="structure"&&((m=y==null?void 0:y.key)==null?void 0:m.parentTable)===""});s=[...s,...g]}if((s==null?void 0:s.length)>0){let h=s==null?void 0:s.filter(v=>{var b,S,N;return((b=v==null?void 0:v.key)==null?void 0:b.pageKey)!==o&&((N=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:N.comp)==="Form"}),g=s==null?void 0:s.filter(v=>{var b,S,N;return((b=v==null?void 0:v.key)==null?void 0:b.pageKey)!==o&&((N=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:N.comp)==="Table"});g=Oo(f.cloneDeep(g),n),h=[...f.cloneDeep(h),...g],h=h==null?void 0:h.map(v=>({[v.key.pageKey]:v}));let y=0;h=h.reduce((v,b)=>(Object.keys(b).forEach(S=>{v[S]||(v[S]=[],v[S].push({index:y})),v[S].push(b[S])}),y++,v),{});let d=(p=Object.values(h))==null?void 0:p.sort((v,b)=>{var D,x;let S=(D=v==null?void 0:v.find(I=>I==null?void 0:I.index))==null?void 0:D.index,N=(x=b==null?void 0:b.find(I=>I==null?void 0:I.index))==null?void 0:x.index;return S-N});h=d==null?void 0:d.map(v=>v==null?void 0:v.filter(b=>{var S,N,D,x;return!(b!=null&&b.index)&&(b==null?void 0:b.index)!==0&&!((N=(S=b==null?void 0:b.key)==null?void 0:S.pageKey)!=null&&N.includes("updateLoading"))&&!((x=(D=b==null?void 0:b.key)==null?void 0:D.pageKey)!=null&&x.includes("loading"))}));let m=[];if(h==null||h.forEach(v=>{var N,D,x,I,w,k,_,T,B,K;const b=v==null?void 0:v.find(H=>{var ie,ue,z,$,Z;return((ue=(ie=H==null?void 0:H.value)==null?void 0:ie.pageData)==null?void 0:ue.name)===((Z=($=(z=e==null?void 0:e[0])==null?void 0:z.groupSelect)==null?void 0:$.split(":"))==null?void 0:Z[0])});let S=(w=(I=(x=(D=(N=f.cloneDeep(b))==null?void 0:N.value)==null?void 0:D.pageData)==null?void 0:x.compData)==null?void 0:I.find(H=>(H==null?void 0:H.key)==="formContent"))==null?void 0:w.contents;if(S){let H=[];a==null||a.forEach((ie,ue)=>{var Z,ae,he,j,R,U;let z=v==null?void 0:v.find(q=>{var X,fe,ve,de,Se;return((fe=(X=q==null?void 0:q.value)==null?void 0:X.pageData)==null?void 0:fe.name)===((Se=(de=(ve=e==null?void 0:e[ue])==null?void 0:ve.groupSelect)==null?void 0:de.split(":"))==null?void 0:Se[0])}),$=(R=(j=(he=(ae=(Z=f.cloneDeep(z))==null?void 0:Z.value)==null?void 0:ae.pageData)==null?void 0:he.compData)==null?void 0:j.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:R.contents;$!=null&&$.find(q=>(q==null?void 0:q.key)===ie)?H.push((U=$==null?void 0:$.find(q=>(q==null?void 0:q.key)===ie))==null?void 0:U.value):H.push("")}),m.push(H)}else S=(K=(B=(T=(_=(k=f.cloneDeep(b))==null?void 0:k.value)==null?void 0:_.pageData)==null?void 0:T.compData)==null?void 0:B.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:K.contents,S==null||S.forEach(H=>{let ie=[];a==null||a.forEach(ue=>{H!=null&&H[ue]&&ie.push(H==null?void 0:H[ue])}),m.push(ie)})}),(t==null?void 0:t.length)>0){let v={};t==null||t.forEach(b=>{var S;for(let N in b){let D=f.cloneDeep(N);if(!(D!=null&&D.includes("[")))(S=b[N])!=null&&S.includes("[")||(v[D]=b[N]);else{let x=Fo(D,n[r]),I=Po(b[N],n[r]);v[x]=I}}});for(let b in v)m=m==null?void 0:m.filter(S=>S[v[b]]===b)}return m}},ff=(e,n,t,r)=>{var s,c,u,p,h;let i=f.cloneDeep(e),a=n==null?void 0:n.map(g=>g==null?void 0:g.prop),o=[];for(let g in t)if(g!=null&&g.includes(i)){let y=(s=t[g])==null?void 0:s.filter(d=>{var m,v;return((m=d==null?void 0:d.key)==null?void 0:m.type)==="structure"&&((v=d==null?void 0:d.key)==null?void 0:v.parentTable)===""});o=[...o,...y]}if((o==null?void 0:o.length)>0){let g=o==null?void 0:o.filter(D=>{var x,I,w,k;return((x=D==null?void 0:D.key)==null?void 0:x.pageKey)!==i&&((w=(I=D==null?void 0:D.value)==null?void 0:I.pageData)==null?void 0:w.comp)==="Form"&&(D==null?void 0:D.key.pageKey.includes(i+Ge))&&!((k=D==null?void 0:D.key.pageKey)!=null&&k.includes("@"))}),y=o==null?void 0:o.filter(D=>{var x,I,w,k;return((x=D==null?void 0:D.key)==null?void 0:x.pageKey)!==i&&((w=(I=D==null?void 0:D.value)==null?void 0:I.pageData)==null?void 0:w.comp)==="Table"&&(D==null?void 0:D.key.pageKey.includes(i+Ge))&&!((k=D==null?void 0:D.key.pageKey)!=null&&k.includes("@"))});y=Oo(f.cloneDeep(y),t),g=[...f.cloneDeep(g),...y],g=g==null?void 0:g.map(D=>({[D.key.pageKey]:D}));let d=0;g=g.reduce((D,x)=>(Object.keys(x).forEach(I=>{D[I]||(D[I]=[],D[I].push({index:d})),D[I].push(x[I])}),d++,D),{}),g=Mo(g,!0,t);let m=(c=Object.values(g))==null?void 0:c.sort((D,x)=>{var k,_;let I=(k=D==null?void 0:D.find(T=>T==null?void 0:T.index))==null?void 0:k.index,w=(_=x==null?void 0:x.find(T=>T==null?void 0:T.index))==null?void 0:_.index;return I-w});g=m==null?void 0:m.map(D=>D==null?void 0:D.filter(x=>!(x!=null&&x.index)&&(x==null?void 0:x.index)!==0));let v=(u=f.cloneDeep(g))==null?void 0:u.filter(D=>D==null?void 0:D.find(x=>{var I,w,k,_;return((_=(I=x==null?void 0:x.key)==null?void 0:I.pageKey)==null?void 0:_[((k=(w=x==null?void 0:x.key)==null?void 0:w.pageKey)==null?void 0:k.length)-1])===Ge}));g=g==null?void 0:g.filter(D=>!(D!=null&&D.find(x=>{var I,w,k,_,T,B,K,H;return((_=(I=x==null?void 0:x.key)==null?void 0:I.pageKey)==null?void 0:_[((k=(w=x==null?void 0:x.key)==null?void 0:w.pageKey)==null?void 0:k.length)-1])===Ge||((B=(T=x==null?void 0:x.key)==null?void 0:T.pageKey)==null?void 0:B.includes("updateLoading"))||((H=(K=x==null?void 0:x.key)==null?void 0:K.pageKey)==null?void 0:H.includes("loading"))})));let b=[],S=[];(p=v==null?void 0:v[0])==null||p.forEach(D=>{var x,I,w,k,_;((I=(x=D==null?void 0:D.value)==null?void 0:x.pageData)==null?void 0:I.comp)==="Form"&&((_=(k=(w=D==null?void 0:D.value)==null?void 0:w.pageData)==null?void 0:k.compData)==null||_.forEach(T=>{(T==null?void 0:T.key)==="formContent"&&(S=[...S,...T==null?void 0:T.contents])}))});let N=(h=S==null?void 0:S.find(D=>(D==null?void 0:D.isMain)===!0))==null?void 0:h.key;if(g==null||g.forEach(D=>{let x=[];D==null||D.forEach(w=>{var k,_,T,B,K;((_=(k=w==null?void 0:w.value)==null?void 0:k.pageData)==null?void 0:_.comp)==="Form"&&((K=(B=(T=w==null?void 0:w.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||K.forEach(H=>{(H==null?void 0:H.key)==="formContent"&&(x=[...x,...H==null?void 0:H.contents])}))});let I={};a==null||a.forEach(w=>{let k=x==null?void 0:x.find(_=>(_==null?void 0:_.key)===w);k!=null&&k.prop&&(I[k.prop]=(k==null?void 0:k.value)??"")}),b.push(I)}),(r==null?void 0:r.length)>0){let D=[];r==null||r.forEach(x=>{var _,T,B,K,H,ie,ue,z;let I={};for(let $ in x){let Z=f.cloneDeep($);if(!(Z!=null&&Z.includes("[")))x[$].toUpperCase()==="@LOGINUSER"?I[Z]=((_=$e.value)==null?void 0:_.姓名)||((T=$e.value)==null?void 0:T.account)||((B=$e.value)==null?void 0:B.账号)||((K=$e.value)==null?void 0:K.姓名):(H=x[$])!=null&&H.includes("[")||(I[Z]=x[$]);else{let ae=Fo(Z,t[e]),he=Po(x[$],t[e]);I[ae]=he}}let w=[],k=0;for(let $ in I)((ie=I[$])==null?void 0:ie[0])!=="!"?w=(ue=k>0?w:b)==null?void 0:ue.filter(ae=>ae[$]===I[$]):w=(z=k>0?w:b)==null?void 0:z.filter(Z=>{var ae;return Z[$]!==((ae=I[$])==null?void 0:ae.replaceAll("!",""))}),k=1;D=[...D,...w]}),b=[...new Set(D)]}return b=b==null?void 0:b.map(D=>Object.values(D)),{mainKey:N,tableContents:b}}},hf=(e,n)=>{var i,a,o,s,c,u;let t=(a=(i=f.cloneDeep(e))==null?void 0:i.split("/"))==null?void 0:a[0],r=[];for(let p in n)if(p!=null&&p.includes(t)){let h=(o=n[p])==null?void 0:o.filter(g=>{var y,d;return((y=g==null?void 0:g.key)==null?void 0:y.type)==="structure"&&((d=g==null?void 0:g.key)==null?void 0:d.parentTable)===""});r=[...r,...h]}return(r==null?void 0:r.length)>0?!!((u=(c=(s=r==null?void 0:r.filter(h=>{var g;return((g=h==null?void 0:h.key)==null?void 0:g.pageKey)===t}))==null?void 0:s[0])==null?void 0:c.key)==null?void 0:u.parentPageKey):!0},pf=async(e,n,t,r)=>{var o,s,c,u,p,h,g,y,d;let i=(s=(o=f.cloneDeep(e))==null?void 0:o.split("/"))==null?void 0:s[0],a=[];for(let m in r)if(m!=null&&m.includes(i)){let v=(c=r[m])==null?void 0:c.filter(b=>{var S,N;return((S=b==null?void 0:b.key)==null?void 0:S.type)==="structure"&&((N=b==null?void 0:b.key)==null?void 0:N.parentTable)===""});a=[...a,...v]}if((a==null?void 0:a.length)>0){let m=(h=(p=(u=a==null?void 0:a.filter(S=>{var N;return((N=S==null?void 0:S.key)==null?void 0:N.pageKey)===i}))==null?void 0:u[0])==null?void 0:p.key)==null?void 0:h.parentPageKey,v=[];if(m){for(let S in r)if(S!=null&&S.includes(m)){let N=(g=r[S])==null?void 0:g.filter(D=>{var x,I;return((x=D==null?void 0:D.key)==null?void 0:x.type)==="structure"&&((I=D==null?void 0:D.key)==null?void 0:I.parentTable)===""});v=[...v,...N]}}else v=a;let b="";if((v==null?void 0:v.length)>0){let S=[],N;N=(y=v==null?void 0:v.filter(T=>{var B,K,H,ie,ue,z;return((H=(K=(B=T==null?void 0:T.key)==null?void 0:B.pageKey)==null?void 0:K.split("/"))==null?void 0:H[0])===m&&((z=(ue=(ie=T==null?void 0:T.key)==null?void 0:ie.pageKey)==null?void 0:ue.split("/"))==null?void 0:z.length)===2}))==null?void 0:y.map(T=>{var B;return(B=T==null?void 0:T.key)==null?void 0:B.pageKey}),N=[...new Set(N)],N=N==null?void 0:N.filter(T=>!T.includes(Ge));let D=(d=f.cloneDeep(N))==null?void 0:d.map(async T=>{var ue,z,$,Z,ae,he,j,R,U,q,X,fe,ve,de,Se;let B=await ht(T,sessionStorage.getItem("systemKey"),"",!1,[],!1,r),K=(Z=($=(z=(ue=f.cloneDeep(B))==null?void 0:ue[0])==null?void 0:z.compData)==null?void 0:$.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:Z.contents,H=(q=(U=(R=(j=(he=(ae=f.cloneDeep(B))==null?void 0:ae[0])==null?void 0:he.compData)==null?void 0:j.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:R.contents)==null?void 0:U.filter(Q=>(Q==null?void 0:Q.label)!=="操作"))==null?void 0:q.map(Q=>Q==null?void 0:Q.prop),ie=[];return(Se=(de=(ve=(fe=(X=f.cloneDeep(B))==null?void 0:X[0])==null?void 0:fe.compData)==null?void 0:ve.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:de.contents)==null||Se.forEach(Q=>{(Q==null?void 0:Q.isMainKey)===!0&&(b=Q==null?void 0:Q.prop)}),K==null||K.forEach(Q=>{let Ie=ct(Q,H);ie.push(Ie),S.push({key:Ie==null?void 0:Ie[b],routerContent:T})}),ie}),x=await Promise.all(D),I=[];x==null||x.forEach(T=>{(T==null?void 0:T.length)>0&&(T==null||T.forEach(B=>{I.push(B)}))});let w=[];w=n==null?void 0:n.map(T=>{var K,H,ie;let B={};for(let ue in T)T[ue].toUpperCase()==="@LOGINUSER"?B[ue]=((K=$e.value)==null?void 0:K.姓名)||((H=$e.value)==null?void 0:H.account)||((ie=$e.value)==null?void 0:ie.账号):B[ue]=T[ue];return B});let k=[];I==null||I.forEach(T=>{let B=[];w==null||w.forEach(K=>{let H=[];for(let ie in K)H.push(T[ie]===K[ie]);B.push(H)}),B.find(K=>K==null?void 0:K.every(H=>H===!0))&&k.push(T)});let _=[];return k==null||k.forEach(T=>{let B={};t==null||t.forEach(K=>{B[K.prop]=T[K.prop]??""}),_.push(B)}),_=_==null?void 0:_.map(T=>Object.values(T)),{mainKey:b,tableContents:_,mainKeys:S}}else return}else return},df=async(e,n,t,r)=>{var a,o,s,c;let i=(a=f.cloneDeep(e))==null?void 0:a.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)))&&hf(n,r)){let u=await pf(n,t,i,r);return u&&((o=u==null?void 0:u.tableContents)==null?void 0:o.length)>0?u:[]}if(!(i!=null&&i.every(u=>{var p,h,g,y;return((p=u==null?void 0:u.formMenuSelect)==null?void 0:p.length)>0&&((g=(h=u==null?void 0:u.groupSelect)==null?void 0:h.split(":"))==null?void 0:g.length)>0||((y=u==null?void 0:u.formMenuGroup)==null?void 0:y.length)>0})))return ff(n,i,r,t);if(i!=null&&i.every(u=>!(u!=null&&u.formMenuGroup)))return va(i,r,t,n);{let u=[];(c=(s=i==null?void 0:i[0])==null?void 0:s.formMenuGroup)==null||c.forEach((y,d)=>{let m=[];i==null||i.forEach(v=>{var b,S,N,D,x,I;m.push({columnPath:v==null?void 0:v.columnPath,formMenuSelect:(N=((b=v==null?void 0:v.formMenuGroup)==null?void 0:b[d])??((S=v==null?void 0:v.formMenuGroup)==null?void 0:S[0]))==null?void 0:N.formMenuSelect,groupSelect:(I=((D=v==null?void 0:v.formMenuGroup)==null?void 0:D[d])??((x=v==null?void 0:v.formMenuGroup)==null?void 0:x[0]))==null?void 0:I.groupSelect,isRoute:v==null?void 0:v.isRoute,label:v==null?void 0:v.label,prop:v==null?void 0:v.label})}),u.push(m)});let p=[],g=u==null?void 0:u.map(async y=>va(y,r,t,n));return g==null||g.forEach(y=>{y==null||y.forEach(d=>{p.push(d)})}),p}},yf=async(e,n)=>{var o,s,c,u,p,h,g,y,d,m;let t=e+Ge+n,r=e,i=(s=(o=Sr.value[t])==null?void 0:o.filter(v=>{var b,S;return((b=v==null?void 0:v.key)==null?void 0:b.type)==="structure"&&((S=v==null?void 0:v.key)==null?void 0:S.parentTable)===""}))==null?void 0:s.map(v=>{var b;return(b=v==null?void 0:v.value)==null?void 0:b.pageData}),a={};(i==null?void 0:i.length)>0?(await Yt(t,t+At+`updateLoading${((c=$e.value)==null?void 0:c.account)||((u=$e.value)==null?void 0:u.账号)}`),br.setRouteToChildPath(r),mr.setActiveMenuPath(t+At+`updateLoading${((p=$e.value)==null?void 0:p.account)||((h=$e.value)==null?void 0:h.账号)}`)):(await Yt(r+At,t,a),await Yt(t,t+At+`updateLoading${((g=$e.value)==null?void 0:g.account)||((y=$e.value)==null?void 0:y.账号)}`),br.setRouteToChildPath(r),mr.setActiveMenuPath(t+At+`updateLoading${((d=$e.value)==null?void 0:d.account)||((m=$e.value)==null?void 0:m.账号)}`))},gf=nn(f.pinia),{originalPath:Lo}=f.storeToRefs(gf),vf=e=>e==null?void 0:e.map(t=>(t=_o(t),t)),Vr=async()=>{var t,r,i,a,o,s,c,u,p,h,g,y;let e;const n=await f.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(s=(o=(a=(i=(r=(t=n.data.result)==null?void 0:t[0])==null?void 0:r.value)==null?void 0:i.pageData)==null?void 0:a.compData)==null?void 0:o[0])!=null&&s.contents&&(e=vf((y=(g=(h=(p=(u=(c=n.data.result)==null?void 0:c[0])==null?void 0:u.value)==null?void 0:p.pageData)==null?void 0:h.compData)==null?void 0:g[0])==null?void 0:y.contents)),e},mf=e=>{var r,i,a;const n=(i=(r=e==null?void 0:e.compData)==null?void 0:r.find(o=>(o==null?void 0:o.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(o=>!Array.isArray(o))?n==null?void 0:n.map(o=>({label:o==null?void 0:o.label,value:o==null?void 0:o.label})):(a=Ft(n==null?void 0:n[0]))==null?void 0:a.map(o=>({label:o==null?void 0:o.label,value:o==null?void 0:o.label}))}},Ko=async e=>{var i,a;let n="";(i=f.cloneDeep(e))==null||i.forEach(o=>{n=n===""?n+o:n+"/"+o});let t="";(a=f.cloneDeep(e))==null||a.forEach((o,s)=>{s!==(e==null?void 0:e.length)-1?t=t===""?t+o:t+"/"+o:t=t+Lo.value+o});const r=await ht(n,sessionStorage.getItem("systemKey"),"");return r||await ht(t,sessionStorage.getItem("systemKey"),"")},bf=e=>e.entries().next().done,Sf=async e=>{var r,i,a;const n=await Ko(e);let t=[];return((r=n==null?void 0:n.data)==null?void 0:r.type)==="success"&&(t=(a=(i=n.data.result)==null?void 0:i.map(o=>o.value.pageData))==null?void 0:a.filter(o=>(o==null?void 0:o.comp)==="Table"),t=t==null?void 0:t.map(o=>mf(o))),t},Ef=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"},{key:"富文本",value:"Quill"}],mt=[{label:"输入框",value:"Input"},{label:"下拉框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"},{label:"富文本",value:"Quill"},{label:"链接跳转",value:"Link"}],Tf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt},{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}],Df=async()=>{const e=await Vr();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt},{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"}]},kf=async()=>[{value:"",id:"v1",label:"菜单选项",name:"菜单选项",type:"cascader",contents:await Vr()},{value:"",id:"v2",label:"组信息选项",name:"组信息选项",type:"cascader",contents:[]},{value:"",id:"v2",label:"选项值",name:"选项值",type:"Input",contents:[]}],Af=l.computed(async()=>await Df()),wf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt},{key:"originalContent",label:"初始值",type:"Date"},{key:"isNewDate",label:"当前时间",type:"Switch",value:!1}],If=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt},{key:"value",label:"固定值",type:"Input"}],xf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt},{key:"originalContent",label:"初始值",type:"Input"}],ma=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt}],Bf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:mt}],Cf=[{key:"Input",value:Tf},{key:"Select",value:Af},{key:"Date",value:wf},{key:"TextArea",value:xf},{key:"Upload",value:ma},{key:"DragUpload",value:ma},{key:"Quill",value:Bf},{key:"Link",value:If}],Mf=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],Rf=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Mf},{key:"background",label:"颜色",type:"Color"}],Nf=e=>{var t,r,i,a,o,s,c,u;let n=f.cloneDeep(e);if(((t=n==null?void 0:n.find(p=>(p==null?void 0:p.name)==="类型"))==null?void 0:t.type)==="Select"&&((a=(i=(r=f.cloneDeep(n))==null?void 0:r.find(p=>(p==null?void 0:p.name)==="选项值"))==null?void 0:i.value)==null?void 0:a.length)>0){const p=(u=(c=(s=(o=f.cloneDeep(n))==null?void 0:o.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=p,h.value=(h==null?void 0:h.value)??""),h))}return n},_o=e=>{var i;let n={};const t=(i=e==null?void 0:e.filter(a=>!Array.isArray(a)))==null?void 0:i[0];n.label=t,n.value=t;const r=e==null?void 0:e.filter(a=>Array.isArray(a));return r&&(r==null?void 0:r.length)>0&&(n.children=r==null?void 0:r.map(a=>_o(a))),n},Of=async e=>{var a,o,s,c;let n=f.cloneDeep(e);const t=(a=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="下拉绑定类型"))==null?void 0:a.value,r=(o=e==null?void 0:e.find(u=>(u==null?void 0:u.name)==="类型"))==null?void 0:o.value,i=await kf();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=f.cloneDeep(n))==null?void 0:s.filter(u=>(u==null?void 0:u.name)!=="选项值"):n=[...f.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=f.cloneDeep(n))==null?void 0:c.filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项"):n=[...f.cloneDeep(n),...i].filter(u=>(u==null?void 0:u.name)!=="菜单选项"&&(u==null?void 0:u.name)!=="组信息选项")),n},Pf=(e,n)=>{var r;let t=!1;return(r=f.cloneDeep(e))==null||r.forEach(i=>{var a;(i==null?void 0:i.key)==="formContent"&&((a=i==null?void 0:i.contents)==null||a.forEach(o=>{(o==null?void 0:o.key)===n?t=!0:t=t}))}),t},Vo=(e,n)=>{var o,s,c,u,p;const t=f.cloneDeep(e);if(!t)return;let r="";(s=(o=f.cloneDeep(t))==null?void 0:o.menuSelect)==null||s.forEach(h=>{h!=null&&h.includes("[")?r=r+Lo.value:r=r===""?r+h:r+"/"+h});const i=(c=n==null?void 0:n[r])==null?void 0:c.map(h=>{var g;return(g=h==null?void 0:h.value)==null?void 0:g.pageData});let a=i==null?void 0:i.filter(h=>{var g,y;return(h==null?void 0:h.name)===((y=(g=f.cloneDeep(t))==null?void 0:g.groupSelect)==null?void 0:y[0])});if((a==null?void 0:a.length)===1?a=a==null?void 0:a[0]:(u=f.cloneDeep(a))==null||u.forEach(h=>{var g,y;(h==null?void 0:h.comp)==="Form"&&Pf(h==null?void 0:h.compData,(y=(g=f.cloneDeep(t))==null?void 0:g.groupSelect)==null?void 0:y[1])&&(a=h)}),(a==null?void 0:a.comp)==="Form"){let h="";return(p=a==null?void 0:a.compData)==null||p.forEach(g=>{var y;(g==null?void 0:g.key)==="formContent"&&((y=g==null?void 0:g.contents)==null||y.forEach(d=>{var m,v;(d==null?void 0:d.key)===((v=(m=f.cloneDeep(t))==null?void 0:m.groupSelect)==null?void 0:v[1])&&(d.type==="Select"&&!(d!=null&&d.value)?h=void 0:h=d==null?void 0:d.value)}))}),h}};exports.CHANGE_EVENT=ir;exports.ElButton=eo;exports.ElButtonGroup=Rl;exports.ElFocusTrap=Ga;exports.ElInput=za;exports.ElMessageBox=oo;exports.ElOverlay=no;exports.FOCUS_TRAP_INJECTION_KEY=qa;exports.FormButton=Rf;exports.FormContent=Cf;exports.FormType=Ef;exports.INPUT_EVENT=ar;exports.IsJson=Ln;exports.PatchFlags=Gt;exports.SetCache=Jt;exports.State=Oc;exports.State$1=Zu;exports.TinyColor=Xa;exports.UPDATE_MODEL_EVENT=kn;exports.addPathToTree=Kn;exports.addTableContents=Zc;exports.animateScrollTo=Ms;exports.baseFlatten=Er;exports.baseIsEqual=Tr;exports.buttonTypes=Ja;exports.cAF=Ma;exports.cacheHas=ka;exports.convertArrayToTree=Rr;exports.copyAdd=yf;exports.decryptData=Kr;exports.deleteTableContents=Jc;exports.encryptData=jt;exports.ensureOnlyChild=Ll;exports.fixFormContents=Qc;exports.fixTableContents=Xc;exports.flatRest=Da;exports.flattedChildren=zt;exports.flatten=Ta;exports.focusNode=js;exports.formContextKey=Nn;exports.formItemContextKey=Dr;exports.formToOptionsContents=Nf;exports.generateKeyPair=Ec;exports.getActivePageStructureId=To;exports.getAllLeafNodes=af;exports.getColumnChild=Ft;exports.getColumnContents=rt;exports.getEqualChild=lo;exports.getFirstArrayProperty=Mr;exports.getGradeColumns=of;exports.getItemData=ht;exports.getLeafNodesRecursive=Or;exports.getMenusContent=Vr;exports.getNewColumnChild=sf;exports.getNormalizedProps=Fl;exports.getParentConstruct=Eu;exports.getParentContents=su;exports.getParentKey=Su;exports.getScrollBarWidth=Ra;exports.getScrollContainer=Bs;exports.getScrollElement=Rs;exports.getScrollTop=Ns;exports.getSibling=qs;exports.getTableFormToForm=lf;exports.getValueToObjectValue=ct;exports.groupByField=Nr;exports.handleRowAuthorityRender=Pr;exports.handleSubmitAsync=Pt;exports.hasIn=Ia;exports.identity=ba;exports.inputProps=Pa;exports.isEqual=xa;exports.isFirefox=Na;exports.isFocusable=On;exports.isFormDataEmpty=bf;exports.isFragment=to;exports.isLeaf=Va;exports.isValidComponentSize=ao;exports.isValidElementNode=Pl;exports.judgeContents=Vo;exports.loadingConstruct=Yt;exports.loadingSystemType=ef;exports.menuToContentType=Sf;exports.menuToParent=Ko;exports.methodTableToContent=ou;exports.onConditionContents=uo;exports.overRest=Ea;exports.pick=Ba;exports.rAF=Ca;exports.resetPassword=Ot;exports.sameKeys=No;exports.scrollIntoView=Cs;exports.selectToBase=Of;exports.setToArray=wa;exports.setToString=Sa;exports.submitTableAsyncByVerify=Un;exports.tableEveryContents=bu;exports.tableToContents=pu;exports.tableToForm=so;exports.tableToStruct=hu;exports.triggerEvent=zs;exports.tryFocus=tt;exports.useAriaProps=Oa;exports.useAttrs=Fa;exports.useAuthorityState=Br;exports.useComposition=Ua;exports.useDeprecated=Ya;exports.useDraggable=ro;exports.useFocusController=Ha;exports.useFormDisabled=en;exports.useFormItem=kr;exports.useFormItemInputId=Ka;exports.useFormSize=Ar;exports.useId=An;exports.useIdInjection=La;exports.useLockscreen=io;exports.useMenuState=tn;exports.useModelComp=Kt;exports.useOriginalState=nn;exports.useSameTarget=xr;exports.useTableComp=Fn;exports.viewChildDict=tu;exports.viewMainDict=eu;