ss-component-new 1.2.30 → 1.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MTLLoader-CGJ_BoN_.cjs → MTLLoader-BEzdg_n9.cjs} +1 -1
- package/dist/{MTLLoader-DKu2hJu8.js → MTLLoader-Z8ZGYUTC.js} +1 -1
- package/dist/{OrbitControls-CcSIJs8U.cjs → OrbitControls-BFINqrV9.cjs} +1 -1
- package/dist/{OrbitControls-BqqUzhiB.js → OrbitControls-Q1TqyUXu.js} +1 -1
- package/dist/{animationData-CqnPk9Xj.cjs → animationData-BO1iYg0c.cjs} +1 -1
- package/dist/{animationData-C9-csPUd.js → animationData-HN2Qpzop.js} +4 -4
- package/dist/{array-CNff52dF.cjs → array-APBnfTdN.cjs} +1 -1
- package/dist/{array-GAxUIYkk.js → array-JFsgRmGM.js} +35 -35
- package/dist/{dataUtil-CUqnwA-C.js → dataUtil-DBo_IUtz.js} +2 -2
- package/dist/{dataUtil-B8GQMfU9.cjs → dataUtil-iMD7jDCB.cjs} +1 -1
- package/dist/{fileUtil-2jbB0UOW.js → fileUtil-DDzutuN5.js} +1 -1
- package/dist/{fileUtil-DmlOwzdA.cjs → fileUtil-J9MqAIz-.cjs} +1 -1
- package/dist/{iconfont-BRjtaT1w.cjs → iconfont-JC-HM1AP.cjs} +1 -1
- package/dist/{iconfont-Clbumxhq.js → iconfont-pHpASXka.js} +2 -2
- package/dist/{index-Ct1BlKod.cjs → index-0cpRHKgT.cjs} +1 -1
- package/dist/{index-B1TG4KX4.js → index-1520C_MS.js} +2 -2
- package/dist/{index-ZxdNFChm.js → index-3etjTM0B.js} +2 -2
- package/dist/{index-CkTqgfCV.js → index-B3sDwg_c.js} +1 -1
- package/dist/{index-CLYAJN6W.js → index-B6eMVlq_.js} +1268 -1267
- package/dist/{index-Bg67M1I0.cjs → index-BBt1dN9v.cjs} +1 -1
- package/dist/{index-CF3_9CuM.js → index-BJFJz2Wr.js} +2 -2
- package/dist/index-BKzdTjbV.cjs +1 -0
- package/dist/{index-DKQfWQa7.js → index-BLTsYYci.js} +1 -1
- package/dist/{index-B5KCSN4c.cjs → index-BbzUzdxF.cjs} +1 -1
- package/dist/{index-DOqV1gv2.js → index-BgYH4jXI.js} +10 -10
- package/dist/{index-Bf_EwhXB.js → index-BpV5B3M6.js} +40 -40
- package/dist/{index-BuPMGirQ.js → index-Brw5PROY.js} +3877 -3855
- package/dist/{index-BVx8ubcY.js → index-Bvi5eCLI.js} +3 -3
- package/dist/{index-CQGU-KUl.cjs → index-Bvj6jYoD.cjs} +1 -1
- package/dist/{index-B524ZAt_.js → index-Bxdk6jUw.js} +52 -52
- package/dist/{index-D_vF-xur.js → index-Bz81bcMt.js} +8 -8
- package/dist/{index-DPJaR6_y.cjs → index-C08bzirq.cjs} +1 -1
- package/dist/{index-BH-dztWs.js → index-C0WGJJvd.js} +2 -2
- package/dist/{index-Dc_H7_4Q.cjs → index-C1sBZ-g-.cjs} +1 -1
- package/dist/{index-C4sVFEb2.cjs → index-C3hB7DUu.cjs} +1 -1
- package/dist/{index-CVduLh5F.js → index-C5z_2Sai.js} +4 -4
- package/dist/{index-CPUuPtdW.cjs → index-C85kQrtV.cjs} +1 -1
- package/dist/index-C8qRkCgn.cjs +21 -0
- package/dist/{index-DBDeHECn.js → index-CExeGHij.js} +5410 -5111
- package/dist/{index-DnxJ5v5h.js → index-CIj1lkQs.js} +2 -2
- package/dist/{index-BKH5yrms.cjs → index-CWUiKqKG.cjs} +1 -1
- package/dist/{index-eU4qzdNW.cjs → index-CYB6xJh-.cjs} +1 -1
- package/dist/{index-Bnlo1Vn9.cjs → index-C_3GL3yA.cjs} +1 -1
- package/dist/{index-BDHmuN0R.cjs → index-CabJqmEY.cjs} +1 -1
- package/dist/{index-Cx-hhVVM.js → index-Cfk8LYBf.js} +6 -6
- package/dist/{index-DC41esc7.cjs → index-CjbNsa1v.cjs} +1 -1
- package/dist/{index-DNmodmj5.js → index-Cm-Hrdjx.js} +3 -3
- package/dist/{index-BR2gy9VY.js → index-CnYjq6df.js} +12 -12
- package/dist/{index-CJz9KUlK.js → index-CsZ4nNJs.js} +24 -24
- package/dist/{index-D-vSuC_W.cjs → index-CtraluW6.cjs} +1 -1
- package/dist/{index-zfSd0dDx.cjs → index-Cw1lJZv0.cjs} +1 -1
- package/dist/{index-Dyk6Ept4.cjs → index-CwPJ3pzq.cjs} +1 -1
- package/dist/{index-BUqXSmZN.cjs → index-Cywb88rW.cjs} +1 -1
- package/dist/{index-B4kwMjRZ.cjs → index-DBWRlEbN.cjs} +1 -1
- package/dist/{index-CVfE7lev.cjs → index-DOiiKHFM.cjs} +1 -1
- package/dist/index-DQNedpKE.js +2874 -0
- package/dist/{index-DLNYVMBT.js → index-DXQxqWrp.js} +33 -34
- package/dist/{index-M0XPuhvZ.cjs → index-Dip_WZjn.cjs} +1 -1
- package/dist/{index-B1K65cVA.js → index-DoSboF7F.js} +4 -4
- package/dist/{index-h2jxROLW.js → index-DsquuKHD.js} +2 -2
- package/dist/{index-CGrK7vLD.cjs → index-DxYGQx1N.cjs} +13 -13
- package/dist/{index-CSkbFCKk.js → index-DzLCC6b6.js} +8 -8
- package/dist/{index-C5bKf4Rc.cjs → index-E7jxNEpB.cjs} +1 -1
- package/dist/{index-T8lPGzLV.cjs → index-FPLJiENY.cjs} +1 -1
- package/dist/{index-LjM9Nk8B.js → index-OFjkeEv6.js} +16 -16
- package/dist/{index-4vFpZiro.cjs → index-SUHcp1zf.cjs} +1 -1
- package/dist/{index-CWvU6SMj.js → index-XWRkLaDr.js} +3 -3
- package/dist/{index-C8YYklCT.cjs → index-Z3NUprRN.cjs} +1 -1
- package/dist/{index-DpHuDey-.js → index-gbPPATBf.js} +6 -6
- package/dist/{index-DQEoNTv9.js → index-pWe97r37.js} +1 -1
- package/dist/{index-NsYVgt6J.cjs → index-vF2NWzY4.cjs} +1 -1
- package/dist/index-weSOyrGp.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-5BvnpRk0.cjs +37 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DrkfyooA.js +38947 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-1Mv6nQqI.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BNj7ru7N.cjs} +124 -124
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-jN5HQ4-h.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CqCT12Ro.js} +1649 -1644
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B5pFO8Nu.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Be-tRwnn.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-CfeHVTqR.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CRy5ZV97.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Dn15anMU.cjs → index.vue_vue_type_style_index_1_lang-CBRqGtXo.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-C_-spRZf.js → index.vue_vue_type_style_index_1_lang-DD8dDtXi.js} +5 -5
- package/dist/index.vue_vue_type_style_index_1_lang-Dn9wyUpm.js +8285 -0
- package/dist/index.vue_vue_type_style_index_1_lang-FhKrfUdd.cjs +32 -0
- package/dist/{isString-D6Z6SOrb.cjs → isString--eJE54G5.cjs} +1 -1
- package/dist/{isString-DBnuELeA.js → isString-By6KKNvg.js} +1 -1
- package/dist/{main-D13CgkQa.js → main-BMuvvTEw.js} +5 -5
- package/dist/{main-Cqs48dh5.cjs → main-BiS4kmpg.cjs} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-CdhAh8Bx.js → threeModel-7vT_TmEA.js} +5 -5
- package/dist/{threeModel-B1Q-W8uT.cjs → threeModel-SXjNCIdA.cjs} +1 -1
- package/dist/{threePreview-qK1L0B-6.js → threePreview-CUNhS2JQ.js} +4 -4
- package/dist/{threePreview-DFaqe_Df.cjs → threePreview-DAxRdO5_.cjs} +1 -1
- package/dist/{threeSceneView-D7A2EUjB.js → threeSceneView-Dn0zGGas.js} +87 -87
- package/dist/{threeSceneView-MV6u29zj.cjs → threeSceneView-ajiHvyVj.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CFMeh1a1.js → threeSceneViewForCPMPIP-CvUephwy.js} +57 -57
- package/dist/{threeSceneViewForCPMPIP-DWIRSSMI.cjs → threeSceneViewForCPMPIP-ew4R95gs.cjs} +1 -1
- package/dist/{threeTrackPathView-zpNY2aoY.js → threeTrackPathView-B-RI6BTv.js} +6 -6
- package/dist/{threeTrackPathView-jcnhqw1L.cjs → threeTrackPathView-DvOzQxA9.cjs} +1 -1
- package/dist/{threeViewerHost-Bmk1dyAX.cjs → threeViewerHost-BwX43DOd.cjs} +1 -1
- package/dist/{threeViewerHost-SnFuinLz.js → threeViewerHost-Cj8btQNs.js} +14 -14
- package/dist/{urdfTree-BhIdc1in.cjs → urdfTree-C9yAbL54.cjs} +1 -1
- package/dist/{urdfTree-BqMKYhyU.js → urdfTree-ChRPu76z.js} +1 -1
- package/dist/{workpieceTreePanel-ugZl4wP-.cjs → workpieceTreePanel-BpB-ePlV.cjs} +1 -1
- package/dist/{workpieceTreePanel-CrJBeLgr.js → workpieceTreePanel-D62LmCa2.js} +5 -5
- package/package.json +2 -2
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-B6nEh_Jv.js +0 -2865
- package/dist/index-BQ4Ui0xZ.cjs +0 -1
- package/dist/index-CBzeyNqc.cjs +0 -1
- package/dist/index-DEBf-IBT.cjs +0 -21
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BAJOxaYG.js +0 -38119
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bz5a6KNq.cjs +0 -56
- package/dist/index.vue_vue_type_style_index_1_lang-C_c9xkIT.js +0 -8381
- package/dist/index.vue_vue_type_style_index_1_lang-Dk9u-CTP.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 $o=800,Uo=16,zo=Date.now;function qo(e){var n=0,t=0;return function(){var r=zo(),i=Uo-(r-t);if(t=r,i>0){if(++n>=$o)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 Sr(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?Sr(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?Sr(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 Yt(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new f.MapCache;++n<t;)this.add(e[n])}Yt.prototype.add=Yt.prototype.push=Jo;Yt.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 Yt: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 O=o?r(S,b,g,n,e,a):r(b,S,g,e,n,a);if(!(O===void 0?b===S||i(b,S,t,r,a):O)){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]",on="[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?on:c,u=u==Pi?on:u;var p=c==on,h=u==on,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 Er(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,Er,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 Er(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 Dn="update:modelValue",rr="change",ir="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 Ma=e=>f.isClient?window.requestAnimationFrame(e):setTimeout(e,16),Ca=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 sn;const Ra=e=>{var n;if(!f.isClient)return 0;if(sn!==void 0)return sn;const t=document.createElement("div");t.className=`${e}-scrollbar__wrap`,t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const r=t.offsetWidth;t.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",t.appendChild(i);const a=i.offsetWidth;return(n=t.parentNode)==null||n.removeChild(t),sn=r-a,sn};function Ms(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 Cs(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=Ma(s):f.isFunction(i)&&i()};return s(),()=>{o&&Ca(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 Ve;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;Ve||(Ve=document.createElement("textarea"),document.body.appendChild(Ve));const{paddingSize:i,borderSize:a,boxSizing:o,contextStyle:s}=Fs(e);s.forEach(([h,g])=>Ve==null?void 0:Ve.style.setProperty(h,g)),Object.entries(Os).forEach(([h,g])=>Ve==null?void 0:Ve.style.setProperty(h,g,"important")),Ve.value=e.value||e.placeholder||"";let c=Ve.scrollHeight;const u={};o==="border-box"?c=c+a:o==="content-box"&&(c=c-i),Ve.value="";const p=Ve.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=Ve.parentNode)==null||r.removeChild(Ve),Ve=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={[Dn]: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(()=>({})))},ar={prefix:Math.floor(Math.random()*1e4),current:0},Hs=Symbol("elIdInjection"),La=()=>l.getCurrentInstance()?l.inject(Hs,ar):ar,kn=e=>{const n=La();!f.isClient&&n===ar&&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++}`)},Rn=Symbol("formContextKey"),Tr=Symbol("formItemContextKey"),Dr=()=>{const e=l.inject(Rn,void 0),n=l.inject(Tr,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:kn().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]})},kr=(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(Rn,void 0),o=n.formItem?{size:void 0}:l.inject(Tr,void 0);return l.computed(()=>r.value||l.unref(e)||(o==null?void 0:o.size)||(a==null?void 0:a.size)||i.value||"")},Qt=e=>{const n=_a("disabled"),t=l.inject(Rn,void 0);return l.computed(()=>n.value||l.unref(e)||(t==null?void 0:t.disabled)||!1)},$s='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Us=e=>process.env.NODE_ENV==="test"?!0:getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,_i=e=>Array.from(e.querySelectorAll($s)).filter(n=>Nn(n)&&Us(n)),Nn=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},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=Qt(),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||Nn(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 $a({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 Ua="ElInput",Ys=l.defineComponent({name:Ua,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",N.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}=Dr(),{inputId:h}=Ka(r,{formItemContext:p}),g=kr(),y=Qt(),d=f.useNamespace("input"),m=f.useNamespace("textarea"),v=l.shallowRef(),b=l.shallowRef(),S=l.ref(!1),O=l.ref(!1),D=l.ref(),x=l.shallowRef(r.inputStyle),I=l.computed(()=>v.value||b.value),{wrapperRef:w,isFocused:k,handleFocus:V,handleBlur:T}=Ha(I,{beforeFocus(){return y.value},afterBlur(){var L;r.validateEvent&&((L=p==null?void 0:p.validate)==null||L.call(p,"blur").catch(me=>f.debugWarn(me)))}}),B=l.computed(()=>{var L;return(L=u==null?void 0:u.statusIcon)!=null?L:!1}),_=l.computed(()=>(p==null?void 0:p.validateState)||""),H=l.computed(()=>_.value&&f.ValidateComponentsMap[_.value]),re=l.computed(()=>O.value?f.view_default:f.hide_default),ue=l.computed(()=>[i.style]),z=l.computed(()=>[r.inputStyle,x.value,{resize:r.resize}]),U=l.computed(()=>f.isNil(r.modelValue)?"":String(r.modelValue)),Z=l.computed(()=>r.clearable&&!y.value&&!r.readonly&&!!U.value&&(k.value||S.value)),ae=l.computed(()=>r.showPassword&&!y.value&&!!U.value),de=l.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!y.value&&!r.readonly&&!r.showPassword),j=l.computed(()=>U.value.length),N=l.computed(()=>!!de.value&&j.value>Number(r.maxlength)),$=l.computed(()=>!!o.suffix||!!r.suffixIcon||Z.value||r.showPassword||de.value||!!_.value&&B.value),[q,X]=Ws(v);f.useResizeObserver(b,L=>{if(ie(),!de.value||r.resize!=="both")return;const me=L[0],{width:Je}=me.contentRect;D.value={right:`calc(100% - ${Je+15+6}px)`}});const Q=()=>{const{type:L,autosize:me}=r;if(!(!f.isClient||L!=="textarea"||!b.value))if(me){const Je=f.isObject$1(me)?me.minRows:void 0,Lt=f.isObject$1(me)?me.maxRows:void 0,Kt=Ki(b.value,Je,Lt);x.value={overflowY:"hidden",...Kt},l.nextTick(()=>{b.value.offsetHeight,x.value=Kt})}else x.value={minHeight:Ki(b.value).minHeight}},ie=(L=>{let me=!1;return()=>{var Je;if(me||!r.autosize)return;((Je=b.value)==null?void 0:Je.offsetParent)===null||(L(),me=!0)}})(Q),ce=()=>{const L=I.value,me=r.formatter?r.formatter(U.value):U.value;!L||L.value===me||(L.value=me)},Y=async L=>{q();let{value:me}=L.target;if(r.formatter&&r.parser&&(me=r.parser(me)),!ve.value){if(me===U.value){ce();return}t(Dn,me),t(ir,me),await l.nextTick(),ce(),X()}},Se=L=>{let{value:me}=L.target;r.formatter&&r.parser&&(me=r.parser(me)),t(rr,me)},{isComposing:ve,handleCompositionStart:M,handleCompositionUpdate:P,handleCompositionEnd:he}=$a({emit:t,afterComposition:Y}),Ae=()=>{q(),O.value=!O.value,setTimeout(X)},Pe=()=>{var L;return(L=I.value)==null?void 0:L.focus()},pe=()=>{var L;return(L=I.value)==null?void 0:L.blur()},We=L=>{S.value=!1,t("mouseleave",L)},He=L=>{S.value=!0,t("mouseenter",L)},Ie=L=>{t("keydown",L)},gt=()=>{var L;(L=I.value)==null||L.select()},Ye=()=>{t(Dn,""),t(rr,""),t("clear"),t(ir,"")};return l.watch(()=>r.modelValue,()=>{var L;l.nextTick(()=>Q()),r.validateEvent&&((L=p==null?void 0:p.validate)==null||L.call(p,"change").catch(me=>f.debugWarn(me)))}),l.watch(U,()=>ce()),l.watch(()=>r.type,async()=>{await l.nextTick(),ce(),Q()}),l.onMounted(()=>{!r.formatter&&r.parser&&f.debugWarn(Ua,"If you set the parser, you also need to set the formatter."),ce(),l.nextTick(Q)}),n({input:v,textarea:b,ref:I,textareaStyle:z,autosize:l.toRef(r,"autosize"),isComposing:ve,focus:Pe,blur:pe,select:gt,clear:Ye,resizeTextarea:Q}),(L,me)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass([l.unref(s),{[l.unref(d).bm("group","append")]:L.$slots.append,[l.unref(d).bm("group","prepend")]:L.$slots.prepend}]),style:l.normalizeStyle(l.unref(ue)),onMouseenter:He,onMouseleave:We},[l.createCommentVNode(" input "),L.type!=="textarea"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createCommentVNode(" prepend slot "),L.$slots.prepend?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(l.unref(d).be("group","prepend"))},[l.renderSlot(L.$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 "),L.$slots.prefix||L.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(L.$slots,"prefix"),L.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(L.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:L.minlength,maxlength:L.maxlength,type:L.showPassword?O.value?"text":"password":L.type,disabled:l.unref(y),readonly:L.readonly,autocomplete:L.autocomplete,tabindex:L.tabindex,"aria-label":L.ariaLabel,placeholder:L.placeholder,style:L.inputStyle,form:L.form,autofocus:L.autofocus,role:L.containerRole,onCompositionstart:l.unref(M),onCompositionupdate:l.unref(P),onCompositionend:l.unref(he),onInput:Y,onChange:Se,onKeydown:Ie}),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($)?(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(de)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.renderSlot(L.$slots,"suffix"),L.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(L.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:Ye},{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:Ae},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(re))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.unref(de)?(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(L.maxlength),3)],2)):l.createCommentVNode("v-if",!0),l.unref(_)&&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(_)==="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 "),L.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(l.unref(d).be("group","append"))},[l.renderSlot(L.$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:L.minlength,maxlength:L.maxlength,tabindex:L.tabindex,disabled:l.unref(y),readonly:L.readonly,autocomplete:L.autocomplete,style:l.unref(z),"aria-label":L.ariaLabel,placeholder:L.placeholder,form:L.form,autofocus:L.autofocus,rows:L.rows,role:L.containerRole,onCompositionstart:l.unref(M),onCompositionupdate:l.unref(P),onCompositionend:l.unref(he),onInput:Y,onFocus:l.unref(V),onBlur:l.unref(T),onChange:Se,onKeydown:Ie}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),l.unref(de)?(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(L.maxlength),7)):l.createCommentVNode("v-if",!0)],64))],38))}});var Zs=f._export_sfc(Js,[["__file","input.vue"]]);const za=f.withInstall(Zs),Un="focus-trap.focus-after-trapped",zn="focus-trap.focus-after-released",Xs="focus-trap.focusout-prevented",Vi={cancelable:!0,bubbles:!1},Qs={cancelable:!0,bubbles:!1},Hi="focusAfterTrapped",$i="focusAfterReleased",qa=Symbol("elFocusTrap"),Ar=l.ref(),On=l.ref(0),wr=l.ref(0);let ln=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},Ui=(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=Ui(n,e),r=Ui(n.reverse(),e);return[t,r]},nl=e=>e instanceof HTMLInputElement&&"select"in e,Qe=(e,n)=>{if(e&&e.focus){const t=document.activeElement;let r=!1;f.isElement(e)&&!Nn(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),wr.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(Qe(r,n),document.activeElement!==t)return},qi=rl(),al=()=>On.value>wr.value,un=()=>{Ar.value="pointer",On.value=window.performance.now()},ji=()=>{Ar.value="keyboard",On.value=window.performance.now()},ol=()=>(l.onMounted(()=>{ln===0&&(document.addEventListener("mousedown",un),document.addEventListener("touchstart",un),document.addEventListener("keydown",ji)),ln++}),l.onBeforeUnmount(()=>{ln--,ln<=0&&(document.removeEventListener("mousedown",un),document.removeEventListener("touchstart",un),document.removeEventListener("keydown",ji))}),{focusReason:Ar,lastUserFocusTimestamp:On,lastAutomatedFocusTimestamp:wr}),cn=e=>new CustomEvent(Xs,{...Qs,detail:e});let St=[];const Gi=e=>{e.code===f.EVENT_CODE.esc&&St.forEach(n=>n(e))},sl=e=>{l.onMounted(()=>{St.length===0&&document.addEventListener("keydown",Gi),f.isClient&&St.push(e)}),l.onBeforeUnmount(()=>{St=St.filter(n=>n!==e),St.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,$i,"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:O,shiftKey:D}=d,{loop:x}=e,I=m===f.EVENT_CODE.tab&&!v&&!b&&!S,w=document.activeElement;if(I&&w){const k=O,[V,T]=tl(k);if(V&&T){if(!D&&w===T){const _=cn({focusReason:a.value});n("focusout-prevented",_),_.defaultPrevented||(d.preventDefault(),x&&Qe(V,!0))}else if(D&&[V,k].includes(w)){const _=cn({focusReason:a.value});n("focusout-prevented",_),_.defaultPrevented||(d.preventDefault(),x&&Qe(T,!0))}}else if(w===k){const _=cn({focusReason:a.value});n("focusout-prevented",_),_.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($i,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:Qe(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=cn({focusReason:a.value});n("focusout-prevented",b),b.defaultPrevented||Qe(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(Un,Vi);d.addEventListener(Un,c),d.dispatchEvent(b),b.defaultPrevented||l.nextTick(()=>{let S=e.focusStartEl;f.isString(S)||(Qe(S),document.activeElement!==S&&(S="first")),S==="first"&&il(ja(d),!0),(document.activeElement===m||S==="container")&&Qe(d)})}}}function y(){const d=l.unref(t);if(d){d.removeEventListener(Un,c);const m=new CustomEvent(zn,{...Vi,detail:{focusReason:a.value}});d.addEventListener(zn,u),d.dispatchEvent(m),!m.defaultPrevented&&(a.value=="keyboard"||!al()||d.contains(document.activeElement))&&Qe(r??document.body),d.removeEventListener(zn,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}=Dr(),a=kr(l.computed(()=>t==null?void 0:t.size)),o=Qt(),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 O=S.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(O.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"],or=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 Ce(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 fn(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 hn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function ft(e){return e.length===1?"0"+e:String(e)}function yl(e,n,t){return{r:Ce(e,255)*255,g:Ce(n,255)*255,b:Ce(t,255)*255}}function Wi(e,n,t){e=Ce(e,255),n=Ce(n,255),t=Ce(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 qn(e,n,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?e+(n-e)*(6*t):t<1/2?n:t<2/3?e+(n-e)*(2/3-t)*6:e}function gl(e,n,t){var r,i,a;if(e=Ce(e,360),n=Ce(n,100),t=Ce(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=qn(s,o,e+1/3),i=qn(s,o,e),a=qn(s,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function Yi(e,n,t){e=Ce(e,255),n=Ce(n,255),t=Ce(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=Ce(e,360)*6,n=Ce(n,100),t=Ce(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=[ft(Math.round(e).toString(16)),ft(Math.round(n).toString(16)),ft(Math.round(t).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function ml(e,n,t,r,i){var a=[ft(Math.round(e).toString(16)),ft(Math.round(n).toString(16)),ft(Math.round(t).toString(16)),ft(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 $e(e)/255}function $e(e){return parseInt(e,16)}function Sl(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function 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"&&(Ze(e.r)&&Ze(e.g)&&Ze(e.b)?(n=yl(e.r,e.g,e.b),o=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ze(e.h)&&Ze(e.s)&&Ze(e.v)?(r=hn(e.s),i=hn(e.v),n=vl(e.h,r,i),o=!0,s="hsv"):Ze(e.h)&&Ze(e.s)&&Ze(e.l)&&(r=hn(e.s),a=hn(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+%?",at="(?:".concat(Dl,")|(?:").concat(Tl,")"),jn="[\\s|\\(]+(".concat(at,")[,|\\s]+(").concat(at,")[,|\\s]+(").concat(at,")\\s*\\)?"),Gn="[\\s|\\(]+(".concat(at,")[,|\\s]+(").concat(at,")[,|\\s]+(").concat(at,")[,|\\s]+(").concat(at,")\\s*\\)?"),je={CSS_UNIT:new RegExp(at),rgb:new RegExp("rgb"+jn),rgba:new RegExp("rgba"+Gn),hsl:new RegExp("hsl"+jn),hsla:new RegExp("hsla"+Gn),hsv:new RegExp("hsv"+jn),hsva:new RegExp("hsva"+Gn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function kl(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var n=!1;if(sr[e])e=sr[e],n=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=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:$e(t[1]),g:$e(t[2]),b:$e(t[3]),a:Zi(t[4]),format:n?"name":"hex8"}:(t=je.hex6.exec(e),t?{r:$e(t[1]),g:$e(t[2]),b:$e(t[3]),format:n?"name":"hex"}:(t=je.hex4.exec(e),t?{r:$e(t[1]+t[1]),g:$e(t[2]+t[2]),b:$e(t[3]+t[3]),a:Zi(t[4]+t[4]),format:n?"name":"hex8"}:(t=je.hex3.exec(e),t?{r:$e(t[1]+t[1]),g:$e(t[2]+t[2]),b:$e(t[3]+t[3]),format:n?"name":"hex"}:!1)))))))))}function Ze(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(Ce(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(Ce(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(sr);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=fn(t.l),new e(t)},e.prototype.brighten=function(n){n===void 0&&(n=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(n/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(n/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(n/100)))),new e(t)},e.prototype.darken=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.l-=n/100,t.l=fn(t.l),new e(t)},e.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},e.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},e.prototype.desaturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s-=n/100,t.s=fn(t.s),new e(t)},e.prototype.saturate=function(n){n===void 0&&(n=10);var t=this.toHsl();return t.s+=n/100,t.s=fn(t.s),new e(t)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(n){var t=this.toHsl(),r=(t.h+n)%360;return t.h=r<0?360+r:r,new e(t)},e.prototype.mix=function(n,t){t===void 0&&(t=50);var r=this.toRgb(),i=new e(n).toRgb(),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 nt(e,n=20){return e.mix("#141414",n).toString()}function Al(e){const n=Qt(),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():nt(o,20);if(e.plain)r=t.cssVarBlock({"bg-color":e.dark?nt(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?nt(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?nt(o,90):o.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=e.dark?nt(o,50):o.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=e.dark?nt(o,80):o.tint(80).toString());else{const c=e.dark?nt(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?nt(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:or,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:or.size,type:or.type},Ml=l.defineComponent({name:"ElButtonGroup"}),Cl=l.defineComponent({...Ml,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(Cl,[["__file","button-group.vue"]]);const eo=f.withInstall(xl,{ButtonGroup:Qa}),Rl=f.withNoopInstall(Qa),Nl="utils/vue/vnode";var jt=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(jt||{});function 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]},Ut=e=>{const n=f.isArray$1(e)?e:[e],t=[];return n.forEach(r=>{var i;f.isArray$1(r)?t.push(...Ut(r)):l.isVNode(r)&&((i=r.component)!=null&&i.subTree)?t.push(r,...Ut(r.component.subTree)):l.isVNode(r)&&f.isArray$1(r.children)?t.push(...Ut(r.children)):l.isVNode(r)&&r.shapeFlag===2?t.push(...Ut(r.type())):t.push(r)}),t},Ir=e=>{if(!e)return{onClick: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}=Ir(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")],jt.STYLE|jt.CLASS|jt.PROPS,["onClick","onMouseup","onMousedown"]):l.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[l.renderSlot(n,"default")])}});const 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,O=m.height,D=document.documentElement.clientWidth,x=document.documentElement.clientHeight,I=-v+y,w=-b+d,k=D-v-S+y,V=x-b-(O<x?O:0)+d;r!=null&&r.value||(h=Math.min(Math.max(h,I),k),g=Math.min(Math.max(g,w),V)),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 O=d+S.clientX-g,D=m+S.clientY-y;a(O,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),lr="_trap-focus-children",ht=[],Xi=e=>{var n;if(ht.length===0)return;const t=ht[ht.length-1][lr];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())}}},$l={beforeMount(e){e[lr]=_i(e),ht.push(e),ht.length<=1&&document.addEventListener("keydown",Xi)},updated(e){l.nextTick(()=>{e[lr]=_i(e)})},unmounted(){ht.shift(),ht.length===0&&document.removeEventListener("keydown",Xi)}},Ul=l.defineComponent({name:"ElMessageBox",directives:{TrapFocus:$l},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=kn(),g=kn(),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(),O=l.ref(),D=l.computed(()=>u.confirmButtonClass);l.watch(()=>u.inputValue,async z=>{await l.nextTick(),e.boxType==="prompt"&&z&&_()},{immediate:!0}),l.watch(()=>c.value,z=>{var U,Z;z&&(e.boxType!=="prompt"&&(u.autofocus?b.value=(Z=(U=O.value)==null?void 0:U.$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")},V=Ir(k),T=z=>{if(u.inputType!=="textarea")return z.preventDefault(),B("confirm")},B=z=>{var U;e.boxType==="prompt"&&z==="confirm"&&!_()||(u.action=z,u.beforeClose?(U=u.beforeClose)==null||U.call(u,z,u,w):w())},_=()=>{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=u.inputValidator;if(f.isFunction(U)){const Z=U(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,U;const Z=(z=S.value)==null?void 0:z.$refs;return(U=Z==null?void 0:Z.input)!=null?U:Z==null?void 0:Z.textarea},re=()=>{B("close")},ue=()=>{e.closeOnPressEscape&&re()};return e.lockScroll&&io(c),{...l.toRefs(u),ns:i,overlayEvent:V,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:O,doClose:w,handleClose:re,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(Ul,[["render",zl],["__file","index.vue"]]);const Jt=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),Jt.delete(i)},e.onAction=a=>{const o=Jt.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 Ot(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??Ot._context);Jt.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=>{Ot[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,Ot(Object.assign({title:a,message:n,type:"",...Zl[e]},r,{boxType:e}),i)}}Ot.close=()=>{Jt.forEach((e,n)=>{n.doClose()}),Jt.clear()};Ot._context=null;const rt=Ot;rt.install=e=>{rt._context=e._context,e.config.globalProperties.$msgbox=rt,e.config.globalProperties.$messageBox=rt,e.config.globalProperties.$alert=rt.alert,e.config.globalProperties.$confirm=rt.confirm,e.config.globalProperties.$prompt=rt.prompt};const oo=rt,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}]}],en=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},Pn=f.defineStore("modelTableComp",{state:()=>({tableIndex:0,tableShowThree:"",multipleTableConst:"."}),actions:{setTableIndex(e){this.tableIndex=e},setTableShowThree(e){this.tableShowThree=e}}}),iu=Pn(f.pinia),{multipleTableConst:Ne}=f.storeToRefs(iu),tt=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,O;if(!(s!=null&&s.children)||s.children.length===0)s.prop=a===""?s==null?void 0:s.prop:a+Ne.value+((h=(c=s==null?void 0:s.prop)==null?void 0:c.split(Ne.value))==null?void 0:h[((p=(u=s==null?void 0:s.prop)==null?void 0:u.split(Ne.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(Ne.value))==null?void 0:m[((d=(y=s==null?void 0:s.prop)==null?void 0:y.split(Ne.value))==null?void 0:d.length)-1]):a+Ne.value+((O=(v=s==null?void 0:s.prop)==null?void 0:v.split(Ne.value))==null?void 0:O[((S=(b=s==null?void 0:s.prop)==null?void 0:b.split(Ne.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+Ne.value+((p=(s=o==null?void 0:o.prop)==null?void 0:s.split(Ne.value))==null?void 0:p[((u=(c=o==null?void 0:o.prop)==null?void 0:c.split(Ne.value))==null?void 0:u.length)-1]),n.push(o.prop);else{let O=a===""?a+((d=(h=o==null?void 0:o.prop)==null?void 0:h.split(Ne.value))==null?void 0:d[((y=(g=o==null?void 0:o.prop)==null?void 0:g.split(Ne.value))==null?void 0:y.length)-1]):a+Ne.value+((S=(m=o==null?void 0:o.prop)==null?void 0:m.split(Ne.value))==null?void 0:S[((b=(v=o==null?void 0:o.prop)==null?void 0:v.split(Ne.value))==null?void 0:b.length)-1]);r(o.children,O)}})}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,tt(r).slice(0,tt(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 ut(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 Wt(o,e)}},Fn=e=>{try{return JSON.parse(e),!0}catch{return!1}},Qi=(e,n)=>xa(e,n),lu=f.useLoginState(f.pinia),{loginUserInfo:pn}=f.storeToRefs(lu),Wn=[{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;Fn(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=pn.value)!=null&&c.account?(u=pn.value)==null?void 0:u.account:((p=pn.value)==null?void 0:p.姓名)??((h=pn.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}},wt=(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=Nt(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=Nt(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,O,D,x,I,w,k,V,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 _;return(B==null?void 0:B.key)==="tableContents"&&(B.contents=(_=B.contents)==null?void 0:_[0]),B}),[n]):[n];{let B=[];const _=n.compData,H=(d=f.cloneDeep(_))==null?void 0:d.find(j=>(j==null?void 0:j.key)==="tableIndexColumn"),re=(m=f.cloneDeep(_))==null?void 0:m.find(j=>(j==null?void 0:j.key)==="extraButton"),ue=(v=f.cloneDeep(_))==null?void 0:v.find(j=>(j==null?void 0:j.key)==="rowButton"),z=vu((S=(b=f.cloneDeep(_))==null?void 0:b.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:S.contents),U=(O=f.cloneDeep(_))==null?void 0:O.find(j=>(j==null?void 0:j.key)==="tableIndex"),Z=gu((x=(D=f.cloneDeep(_))==null?void 0:D.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:x.contents),ae=ea((w=(I=f.cloneDeep(_))==null?void 0:I.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:w.contents,U==null?void 0:U.contents),de=yu(ea((V=(k=f.cloneDeep(_))==null?void 0:k.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:V.contents,U==null?void 0:U.contents));if(U)return(T=du(U.contents))==null||T.forEach((j,N)=>{var q;let $=[];$.push({key:"tableIndex",contents:j}),$.push(H),$.push(re),$.push(ue),$.push({key:"tableContents",contents:Z[N]}),$.push({key:"header",contents:z!=null&&z[N]?[z==null?void 0:z[N]]:[z==null?void 0:z[0]]}),B.push({comp:"Table",compData:$,name:"",parentTableContents:((q=mu(de[N],ae))==null?void 0:q.contents)??""})}),B}}else return[n]},st=(e,n)=>{let t={};return Array.isArray(e)?e!=null&&e.find(r=>r==null?void 0:r.id)?e==null||e.forEach((r,i)=>{n!=null&&n[i-1]&&!(r!=null&&r.id)?t[n[i-1]]=r:r!=null&&r.id&&(t.id=r==null?void 0:r.id)}):e==null||e.forEach((r,i)=>{n!=null&&n[i]&&(t[n[i]]=r)}):[e].forEach((r,i)=>{t[n[i]]=r}),t},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)},Pt=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}}}),xr=f.defineStore("authorityState",{state:()=>({routerPageStructures:[]}),actions:{setRouterPageStructure(e){this.routerPageStructures=e}}}),Tu=en(f.pinia),{activeMenuPath:Sn}=f.storeToRefs(Tu),co=f.useLoginState(f.pinia),{structureData:Du,loginUserInfo:Yn}=f.storeToRefs(co),ku=xr(f.pinia),{routerPageStructures:Au}=f.storeToRefs(ku),An=Pt(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([]),ur=l.ref([]),ho=l.ref(""),Mu=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,ur.value=(i=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:i.filter(s=>(s==null?void 0:s.label)!=="操作");const 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 At.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[]}),Cu=e=>{An.setRefreshCurStructure(!1),Pr(e.singleContent,e.buttonName,Kn.value,e==null?void 0:e.selectItems)},Dt=l.ref({}),Br=l.ref(),Zt=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},Sn.value),f.ElMessage.success("保存成功"),An.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{An.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=Br.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},Cr=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},Ln=(e,n="",t=new Map)=>e==null?void 0:e.map(r=>{const i=n?`${n}/${r.title}`:r.title;if(t.has(i))return t.get(i);const a={...r,path:i};return r.children&&r.children.length>0&&(a.children=Ln(r.children,i,t)),t.set(i,a),a}),Rr=(e,n)=>e.reduce((t,r)=>{const i=r[n];return t[i]||(t[i]=[]),t[i].push(r),t},{}),Nr=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},Or=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},kt=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);kt.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(Dt.value=f.cloneDeep(n),An.setRefreshCurStructure(!1),(t=It.value)==null||t.splice(0),e==="授权"){if(!kt.value){f.ElMessage.error("请正确定义角色权限");return}const r=Fu(Dt.value[kt.value]);let i;if(r)i=Dt.value[kt.value];else{const a=Cr(Dt.value[kt.value]),o=Ln(a),s=Nr(o),c=Rr(s,"parentPath");i=Or(c)}if(!i||!Array.isArray(i)){f.ElMessage.error("权限数据处理出错了,请联系管理员");return}pt.title=`【${n.角色名称}】授权`,pt.show=!0,await l.nextTick(),Nu(Mt.value,i),Ru(i,Mt.value)}},Hu=()=>{pt.show=!1},cr=l.ref(),$u=async e=>{const n=await Zt(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}})},Xt=(e,n)=>{let t={};if(n==null||n.forEach(r=>{r.label&&e&&(t[r.label]=(e==null?void 0:e[r==null?void 0:r.prop])??null)}),t!=null&&t.id){const{id:r,...i}=t;return i}return t},Uu=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=Sn.value)!=null&&c.startsWith("/")?(u=Sn.value)==null?void 0:u.substring(1):Sn.value,tableId:n,createUserId:(p=Yn.value)==null?void 0:p.id,createUserOrg:((h=Yn.value)==null?void 0:h.dept)||((g=Yn.value)==null?void 0:g.部门名称)},value:{tableData:Xt(s,ur.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:Xt(s,ur.value)}}));r.length>0&&await Zt(f.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await Zt(f.batchUpdateInsofDataApi,{dataList:i},"编辑"),pt.show=!1)},Pr=async(e,n,t,r)=>{if(!(n!=null&&n.includes("删除")))await Uu(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 Zt(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(Mt.value),n=Ku(e),t=Lu(n),r=mo(t),i=_u(r);cr.value={...Dt.value,[kt.value]:i},l.nextTick(()=>{Pr(cr.value,"编辑",Kn.value)})},pt=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":""},Kn=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,Kn.value=n),n},Mt=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):[]},It=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)?It.value.push(n.path):(e==null?void 0:e.length)===0&&(It.value=(i=It.value)==null?void 0:i.filter(a=>a!==n.path))};l.watch(()=>It.value.length,()=>{var e;(e=Br.value)==null||e.setCheckedKeys([...It.value])});l.watch(()=>pt.show,e=>{e||(Mt.value=yo(Mt.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:Ln,authorizeDialog:pt,buttonValue:Iu,changedRow:cr,clickRow:Dt,clickRowButton:Vu,clickSubmitAuthority:zu,closeAuthorizeDialog:Hu,compName:ho,convertArrayToTree:Cr,convertIndexToLabel:Xt,customNodeClass:qu,getActivePageStructureId:To,getAuthorityKey:vo,getFirstArrayProperty:Mr,getLeafNodesRecursive:Nr,getPageDataAsync:$u,groupByField:Rr,handleAddSysMenusButtons:Yu,handleItemDataChange:Cu,handleNodeBtnChange:Wu,handleNodeCheckChange:Gu,handleQueryChange:Bu,handleRowAuthorityRender:Or,handleSubmitAsync:Zt,isPageDataExist:xu,menuData:Mt,menusButtons:ju,pageData:fo,pageDataFiltered:Mu,queryFormData:wu,structureButtons:Do,structureId:Kn,submitTableAsyncByVerify:Pr,tempRolePageData:Ju,tempSysMenus:ko,treeRef:Br},Symbol.toStringTag,{value:"Module"}));var Xu="0123456789abcdefghijklmnopqrstuvwxyz";function et(e){return Xu.charAt(e)}function Qu(e,n){return e&n}function dn(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 Et="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wo="=";function wn(e){var n,t,r="";for(n=0;n+3<=e.length;n+=3)t=parseInt(e.substring(n,n+3),16),r+=Et.charAt(t>>6)+Et.charAt(t&63);for(n+1==e.length?(t=parseInt(e.substring(n,n+1),16),r+=Et.charAt(t<<2)):n+2==e.length&&(t=parseInt(e.substring(n,n+2),16),r+=Et.charAt(t>>2)+Et.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=Et.indexOf(e.charAt(t));a<0||(r==0?(n+=et(a>>2),i=a&3,r=1):r==1?(n+=et(i<<2|a>>4),i=a&15,r=2):r==2?(n+=et(i),n+=et(a>>2),i=a&3,r=3):(n+=et(i<<2|a>>4),n+=et(a&15),r=0))}return r==1&&(n+=et(i<<2)),n}var mt,nc={decode:function(e){var n;if(mt===void 0){var t="0123456789ABCDEF",r=` \f
|
|
8
|
-
\r \u2028\u2029`;for(mt={},n=0;n<16;++n)mt[t.charAt(n)]=n;for(t=t.toLowerCase(),n=10;n<16;++n)mt[t.charAt(n)]=n;for(n=0;n<r.length;++n)mt[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=mt[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}},ct,fr={decode:function(e){var n;if(ct===void 0){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=`= \f
|
|
9
|
-
\r \u2028\u2029`;for(ct=Object.create(null),n=0;n<64;++n)ct[t.charAt(n)]=n;for(ct["-"]=62,ct._=63,n=0;n<r.length;++n)ct[r.charAt(n)]=-1}var i=[],a=0,o=0;for(n=0;n<e.length;++n){var s=e.charAt(n);if(s=="=")break;if(s=ct[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+n);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=fr.re.exec(e);if(n)if(n[1])e=n[1];else if(n[2])e=n[2];else throw new Error("RegExp out of sync");return fr.decode(e)}},bt=1e13,zt=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<bt?t=0:(t=0|o/bt,o-=t*bt),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+=bt,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+=(bt+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*bt+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 xt(e,n){return e.length>n&&(e=e.substring(0,n)+Io),e}var Jn=function(){function e(n,t){this.hexDigits="0123456789ABCDEF",n instanceof e?(this.enc=n.enc,this.pos=n.pos):(this.enc=n,this.pos=t)}return e.prototype.get=function(n){if(n===void 0&&(n=this.pos++),n>=this.enc.length)throw new Error("Requesting byte offset ".concat(n," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(n):this.enc[n]},e.prototype.hexByte=function(n){return this.hexDigits.charAt(n>>4&15)+this.hexDigits.charAt(n&15)},e.prototype.hexDump=function(n,t,r){for(var i="",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 zt(r),u=n+1;u<t;++u)c.mulAdd(256,this.get(u));return s+c.toString()},e.prototype.parseBitString=function(n,t,r){for(var i=this.get(n),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+xt(s,r)}return o+s},e.prototype.parseOctetString=function(n,t,r){if(this.isASCII(n,t))return xt(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 zt,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 zt)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 xt(i,r);a=new zt,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 xt(this.stream.parseStringUTF(t,t+r),n);case 18:case 19:case 20:case 21:case 22:case 26:return xt(this.stream.parseStringISO(t,t+r),n);case 30:return xt(this.stream.parseStringBMP(t,t+r),n);case 23:case 24:return this.stream.parseTime(t,t+r,this.tag.tagNumber==23)}return null},e.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},e.prototype.toPrettyString=function(n){n===void 0&&(n="");var t=n+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(t+=" (encapsulates)"),t+=`
|
|
14
|
-
`,this.sub!==null){n+=" ";for(var r=0,i=this.sub.length;r<i;++r)t+=this.sub[r].toPrettyString(n)}return t},e.prototype.posStart=function(){return this.stream.pos},e.prototype.posContent=function(){return this.stream.pos+this.header},e.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},e.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},e.decodeLength=function(n){var t=n.get(),r=t&127;if(r==t)return r;if(r>6)throw new Error("Length over 48 bits not supported at position "+(n.pos-1));if(r===0)return null;t=0;for(var i=0;i<r;++i)t=t*256+n.get();return t},e.prototype.getHexStringValue=function(){var n=this.toHexString(),t=this.header*2,r=this.length*2;return n.substr(t,r)},e.decode=function(n){var t;n instanceof Jn?t=n:t=new Jn(n,0);var r=new Jn(t),i=new 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 zt;do t=n.get(),r.mulAdd(128,t&127);while(t&128);this.tagNumber=r.simplify()}}return e.prototype.isUniversal=function(){return this.tagClass===0},e.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},e}(),lt,oc=0xdeadbeefcafe,sa=(oc&16777215)==15715070,Fe=[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)/Fe[Fe.length-1],fe=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=et(i));s>=0;)c<t?(i=(this[s]&(1<<c)-1)<<t-c,i|=this[--s]>>(c+=this.DB-t)):(i=this[s]>>(c-=t)&r,c<=0&&(c+=this.DB,--s)),i>0&&(a=!0),a&&(o+=et(i));return a?o:"0"},e.prototype.negate=function(){var n=ye();return e.ZERO.subTo(this,n),n},e.prototype.abs=function(){return this.s<0?this.negate():this},e.prototype.compareTo=function(n){var t=this.s-n.s;if(t!=0)return t;var r=this.t;if(t=r-n.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-n[r])!=0)return t;return 0},e.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+yn(this[this.t-1]^this.s&this.DM)},e.prototype.mod=function(n){var t=ye();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=ye();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=ye();return this.bitwiseTo(n,Qu,t),t},e.prototype.or=function(n){var t=ye();return this.bitwiseTo(n,dn,t),t},e.prototype.xor=function(n){var t=ye();return this.bitwiseTo(n,ra,t),t},e.prototype.andNot=function(n){var t=ye();return this.bitwiseTo(n,ia,t),t},e.prototype.not=function(){for(var n=ye(),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=ye();return n<0?this.rShiftTo(-n,t):this.lShiftTo(n,t),t},e.prototype.shiftRight=function(n){var t=ye();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,dn)},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=ye();return this.addTo(n,t),t},e.prototype.subtract=function(n){var t=ye();return this.subTo(n,t),t},e.prototype.multiply=function(n){var t=ye();return this.multiplyTo(n,t),t},e.prototype.divide=function(n){var t=ye();return this.divRemTo(n,t,null),t},e.prototype.remainder=function(n){var t=ye();return this.divRemTo(n,null,t),t},e.prototype.divideAndRemainder=function(n){var t=ye(),r=ye();return this.divRemTo(n,t,r),[t,r]},e.prototype.modPow=function(n,t){var r=n.bitLength(),i,a=it(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=ye();for(o.sqrTo(s[1],h);c<=p;)s[c]=ye(),o.mulTo(h,s[c-2],s[c]),c+=2}var g=n.t-1,y,d=!0,m=ye(),v;for(r=yn(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=it(1),o=it(0),s=it(0),c=it(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]<=Fe[Fe.length-1]){for(t=0;t<Fe.length;++t)if(r[0]==Fe[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<Fe.length;){for(var i=Fe[t],a=t+1;a<Fe.length&&i<sc;)i*=Fe[a++];for(i=r.modInt(i);t<a;)if(i%Fe[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=ye());var o=ye(),s=this.s,c=n.s,u=this.DB-yn(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??ye();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 O=r[--v]==h?this.DM:Math.floor(r[v]*y+(r[v-1]+m)*d);if((r[v]+=o.am(0,O,r,b,0,p))<O)for(o.dlShiftTo(b,S),r.subTo(S,r);r[v]<--O;)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=ye(),i=ye(),a=t.convert(this),o=yn(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=it(r),a=ye(),o=ye(),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),dn,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>n&&this.subTo(e.ONE.shiftLeft(n-1),this);else{var i=[],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>Fe.length&&(n=Fe.length);for(var a=ye(),o=0;o<n;++o){a.fromInt(Fe[Math.floor(Math.random()*Fe.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=ye();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),dn,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=ye();return n.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),n.s<0&&t.compareTo(fe.ZERO)>0&&this.m.subTo(t,t),t},e.prototype.revert=function(n){var t=ye();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=ye(),this.q3=ye(),fe.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=ye();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 ye(){return new fe(null)}function De(e,n){return new fe(e,n)}var ca=typeof navigator<"u";ca&&sa&&navigator.appName=="Microsoft Internet Explorer"?(fe.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},lt=30):ca&&sa&&navigator.appName!="Netscape"?(fe.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},lt=26):(fe.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},lt=28);fe.prototype.DB=lt;fe.prototype.DM=(1<<lt)-1;fe.prototype.DV=1<<lt;var Fr=52;fe.prototype.FV=Math.pow(2,Fr);fe.prototype.F1=Fr-lt;fe.prototype.F2=2*lt-Fr;var _n=[],Ft,qe;Ft=48;for(qe=0;qe<=9;++qe)_n[Ft++]=qe;Ft=97;for(qe=10;qe<36;++qe)_n[Ft++]=qe;Ft=65;for(qe=10;qe<36;++qe)_n[Ft++]=qe;function fa(e,n){var t=_n[e.charCodeAt(n)];return t??-1}function it(e){var n=ye();return n.fromInt(e),n}function yn(e){var n=1,t;return(t=e>>>16)!=0&&(e=t,n+=16),(t=e>>8)!=0&&(e=t,n+=8),(t=e>>4)!=0&&(e=t,n+=4),(t=e>>2)!=0&&(e=t,n+=2),(t=e>>1)!=0&&(e=t,n+=1),n}fe.ZERO=it(0);fe.ONE=it(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,gn,ot=null,Ge;if(ot==null){ot=[],Ge=0;var vn=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Zn=new Uint32Array(256);for(window.crypto.getRandomValues(Zn),vn=0;vn<Zn.length;++vn)ot[Ge++]=Zn[vn]&255}var mn=0,bn=function(e){if(mn=mn||0,mn>=256||Ge>=xo){window.removeEventListener?window.removeEventListener("mousemove",bn,!1):window.detachEvent&&window.detachEvent("onmousemove",bn);return}try{var n=e.x+e.y;ot[Ge++]=n&255,mn+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",bn,!1):window.attachEvent&&window.attachEvent("onmousemove",bn))}function hc(){if(gn==null){for(gn=fc();Ge<xo;){var e=Math.floor(65536*Math.random());ot[Ge++]=e&255}for(gn.init(ot),Ge=0;Ge<ot.length;++Ge)ot[Ge]=0;Ge=0}return gn.next()}var hr=function(){function e(){}return e.prototype.nextBytes=function(n){for(var t=0;t<n.length;++t)n[t]=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 De(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 hr,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 fe(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=De(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=De(n,16),this.e=parseInt(t,16),this.d=De(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=De(n,16),this.e=parseInt(t,16),this.d=De(r,16),this.p=De(i,16),this.q=De(a,16),this.dmp1=De(o,16),this.dmq1=De(s,16),this.coeff=De(c,16)):console.error("Invalid RSA private key")},e.prototype.generate=function(n,t){var r=new hr,i=n>>1;this.e=parseInt(t,16);for(var a=new fe(t,16);;){for(;this.p=new fe(n-i,1,r),!(this.p.subtract(fe.ONE).gcd(a).compareTo(fe.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new fe(i,1,r),!(this.q.subtract(fe.ONE).gcd(a).compareTo(fe.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(fe.ONE),c=this.q.subtract(fe.ONE),u=s.multiply(c);if(u.gcd(a).compareTo(fe.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=De(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 hr,a=n>>1;this.e=parseInt(t,16);var o=new fe(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(fe.ONE),d=s.q.subtract(fe.ONE),m=y.multiply(d);m.gcd(o).compareTo(fe.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=ye(),s.q.fromNumberAsync(a,1,i,function(){s.q.subtract(fe.ONE).gcda(o,function(g){g.compareTo(fe.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(p,0)})})},h=function(){s.p=ye(),s.p.fromNumberAsync(n-a,1,i,function(){s.p.subtract(fe.ONE).gcda(o,function(g){g.compareTo(fe.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=De(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 En={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function vc(e){return En[e]||""}function mc(e){for(var n in En)if(En.hasOwnProperty(n)){var t=En[n],r=t.length;if(e.substr(0,r)==t)return e.substr(r)}return e}/*!
|
|
15
|
-
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
|
|
16
|
-
Code licensed under the BSD License:
|
|
17
|
-
http://developer.yahoo.com/yui/license.html
|
|
18
|
-
version: 2.9.0
|
|
19
|
-
*/var ke={};ke.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 R={};(typeof R.asn1>"u"||!R.asn1)&&(R.asn1={});R.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var n=e.toString(16);return n.length%2==1&&(n="0"+n),n},this.bigIntToMinTwosComplementsHex=function(e){var n=e.toString(16);if(n.substr(0,1)!="-")n.length%2==1?n="0"+n:n.match(/^[0-7]/)||(n="00"+n);else{var t=n.substr(1),r=t.length;r%2==1?r+=1:n.match(/^[0-7]/)||(r+=2);for(var i="",a=0;a<r;a++)i+="f";var o=new fe(i,16),s=o.xor(e).add(fe.ONE);n=s.toString(16).replace(/^-/,"")}return n},this.getPEMStringFromHex=function(e,n){return hextopem(e,n)},this.newObject=function(e){var n=R,t=n.asn1,r=t.DERBoolean,i=t.DERInteger,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,O=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=[],V=0;V<w.length;V++){var T=D(w[V]);k.push(T)}return new b({array:k})}if(I=="set"){for(var w=e[I],k=[],V=0;V<w.length;V++){var T=D(w[V]);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 _=D(B[2]);return new O({tag:B[0],explicit:B[1],obj:_})}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 O(H)}}},this.jsonToASN1HEX=function(e){var n=this.newObject(e);return n.getEncodedHex()}};R.asn1.ASN1Util.oidHexToInt=function(e){for(var i="",n=parseInt(e.substr(0,2),16),t=Math.floor(n/40),r=n%40,i=t+"."+r,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 fe(a,2);i=i+"."+u.toString(10),a=""}}return i};R.asn1.ASN1Util.oidIntToHex=function(e){var n=function(s){var c=s.toString(16);return c.length==1&&(c="0"+c),c},t=function(s){var c="",u=new fe(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};R.asn1.ASN1Object=function(){var e="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+e.length+",v="+this.hV;var n=this.hV.length/2,t=n.toString(16);if(t.length%2==1&&(t="0"+t),n<128)return t;var r=t.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+n.toString(16);var i=128+r;return i.toString(16)+t},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};R.asn1.DERAbstractString=function(e){R.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=stohex(this.s)},this.setStringHex=function(n){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"?this.setString(e):typeof e.str<"u"?this.setString(e.str):typeof e.hex<"u"&&this.setStringHex(e.hex))};ke.lang.extend(R.asn1.DERAbstractString,R.asn1.ASN1Object);R.asn1.DERAbstractTime=function(e){R.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(n){utc=n.getTime()+n.getTimezoneOffset()*6e4;var t=new Date(utc);return t},this.formatDate=function(n,t,r){var i=this.zeroPadding,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}};ke.lang.extend(R.asn1.DERAbstractTime,R.asn1.ASN1Object);R.asn1.DERAbstractStructured=function(e){R.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array=n},this.appendASN1Object=function(n){this.hTLV=null,this.isModified=!0,this.asn1Array.push(n)},this.asn1Array=new Array,typeof e<"u"&&typeof e.array<"u"&&(this.asn1Array=e.array)};ke.lang.extend(R.asn1.DERAbstractStructured,R.asn1.ASN1Object);R.asn1.DERBoolean=function(){R.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};ke.lang.extend(R.asn1.DERBoolean,R.asn1.ASN1Object);R.asn1.DERInteger=function(e){R.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=R.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new fe(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))};ke.lang.extend(R.asn1.DERInteger,R.asn1.ASN1Object);R.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=R.asn1.ASN1Util.newObject(e.obj);e.hex="00"+n.getEncodedHex()}R.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,r){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+r},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var r=8-t.length%8;r==8&&(r=0);for(var i=0;i<=r;i++)t+="0";for(var 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))};ke.lang.extend(R.asn1.DERBitString,R.asn1.ASN1Object);R.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var n=R.asn1.ASN1Util.newObject(e.obj);e.hex=n.getEncodedHex()}R.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};ke.lang.extend(R.asn1.DEROctetString,R.asn1.DERAbstractString);R.asn1.DERNull=function(){R.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};ke.lang.extend(R.asn1.DERNull,R.asn1.ASN1Object);R.asn1.DERObjectIdentifier=function(e){var n=function(r){var i=r.toString(16);return i.length==1&&(i="0"+i),i},t=function(r){var i="",a=new fe(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};R.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueOidString=function(r){if(!r.match(/^[0-9.]+$/))throw"malformed oid string: "+r;var i="",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=R.asn1.x509.OID.name2oid(r);if(i!=="")this.setValueOidString(i);else throw"DERObjectIdentifier oidName undefined: "+r},this.getFreshValueHex=function(){return this.hV},e!==void 0&&(typeof e=="string"?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):e.oid!==void 0?this.setValueOidString(e.oid):e.hex!==void 0?this.setValueHex(e.hex):e.name!==void 0&&this.setValueName(e.name))};ke.lang.extend(R.asn1.DERObjectIdentifier,R.asn1.ASN1Object);R.asn1.DEREnumerated=function(e){R.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(n){this.hTLV=null,this.isModified=!0,this.hV=R.asn1.ASN1Util.bigIntToMinTwosComplementsHex(n)},this.setByInteger=function(n){var t=new fe(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))};ke.lang.extend(R.asn1.DEREnumerated,R.asn1.ASN1Object);R.asn1.DERUTF8String=function(e){R.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};ke.lang.extend(R.asn1.DERUTF8String,R.asn1.DERAbstractString);R.asn1.DERNumericString=function(e){R.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};ke.lang.extend(R.asn1.DERNumericString,R.asn1.DERAbstractString);R.asn1.DERPrintableString=function(e){R.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};ke.lang.extend(R.asn1.DERPrintableString,R.asn1.DERAbstractString);R.asn1.DERTeletexString=function(e){R.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};ke.lang.extend(R.asn1.DERTeletexString,R.asn1.DERAbstractString);R.asn1.DERIA5String=function(e){R.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};ke.lang.extend(R.asn1.DERIA5String,R.asn1.DERAbstractString);R.asn1.DERUTCTime=function(e){R.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{12}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date))};ke.lang.extend(R.asn1.DERUTCTime,R.asn1.DERAbstractTime);R.asn1.DERGeneralizedTime=function(e){R.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.date=n,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},e!==void 0&&(e.str!==void 0?this.setString(e.str):typeof e=="string"&&e.match(/^[0-9]{14}Z$/)?this.setString(e):e.hex!==void 0?this.setStringHex(e.hex):e.date!==void 0&&this.setByDate(e.date),e.millis===!0&&(this.withMillis=!0))};ke.lang.extend(R.asn1.DERGeneralizedTime,R.asn1.DERAbstractTime);R.asn1.DERSequence=function(e){R.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var n="",t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n+=r.getEncodedHex()}return this.hV=n,this.hV}};ke.lang.extend(R.asn1.DERSequence,R.asn1.DERAbstractStructured);R.asn1.DERSet=function(e){R.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var n=new Array,t=0;t<this.asn1Array.length;t++){var r=this.asn1Array[t];n.push(r.getEncodedHex())}return this.sortFlag==!0&&n.sort(),this.hV=n.join(""),this.hV},typeof e<"u"&&typeof e.sortflag<"u"&&e.sortflag==!1&&(this.sortFlag=!1)};ke.lang.extend(R.asn1.DERSet,R.asn1.DERAbstractStructured);R.asn1.DERTaggedObject=function(e){R.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(n,t,r){this.hT=t,this.isExplicit=n,this.asn1Object=r,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=r.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.tag<"u"&&(this.hT=e.tag),typeof e.explicit<"u"&&(this.isExplicit=e.explicit),typeof e.obj<"u"&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};ke.lang.extend(R.asn1.DERTaggedObject,R.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):fr.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=De(r,16),i=s.sub[2].getHexStringValue(),this.e=parseInt(i,16);var c=s.sub[3].getHexStringValue();this.d=De(c,16);var u=s.sub[4].getHexStringValue();this.p=De(u,16);var p=s.sub[5].getHexStringValue();this.q=De(p,16);var h=s.sub[6].getHexStringValue();this.dmp1=De(h,16);var g=s.sub[7].getHexStringValue();this.dmq1=De(g,16);var y=s.sub[8].getHexStringValue();this.coeff=De(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=De(r,16),i=m.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else r=s.sub[0].getHexStringValue(),this.n=De(r,16),i=s.sub[1].getHexStringValue(),this.e=parseInt(i,16);else return!1;return!0}catch{return!1}},n.prototype.getPrivateBaseKey=function(){var t={array:[new R.asn1.DERInteger({int:0}),new R.asn1.DERInteger({bigint:this.n}),new R.asn1.DERInteger({int:this.e}),new R.asn1.DERInteger({bigint:this.d}),new R.asn1.DERInteger({bigint:this.p}),new R.asn1.DERInteger({bigint:this.q}),new R.asn1.DERInteger({bigint:this.dmp1}),new R.asn1.DERInteger({bigint:this.dmq1}),new R.asn1.DERInteger({bigint:this.coeff})]},r=new R.asn1.DERSequence(t);return r.getEncodedHex()},n.prototype.getPrivateBaseKeyB64=function(){return wn(this.getPrivateBaseKey())},n.prototype.getPublicBaseKey=function(){var t=new R.asn1.DERSequence({array:[new R.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new R.asn1.DERNull]}),r=new R.asn1.DERSequence({array:[new R.asn1.DERInteger({bigint:this.n}),new R.asn1.DERInteger({int:this.e})]}),i=new R.asn1.DERBitString({hex:"00"+r.getEncodedHex()}),a=new R.asn1.DERSequence({array:[t,i]});return a.getEncodedHex()},n.prototype.getPublicBaseKeyB64=function(){return wn(this.getPublicBaseKey())},n.wordwrap=function(t,r){if(r=r||64,!t)return t;var i="(.{1,"+r+`})( +|$
|
|
27
|
-
?)|(.{1,`+r+"})";return t.match(RegExp(i,"g")).join(`
|
|
28
|
-
`)},n.prototype.getPrivateKey=function(){var t=`-----BEGIN RSA PRIVATE KEY-----
|
|
29
|
-
`;return t+=n.wordwrap(this.getPrivateBaseKeyB64())+`
|
|
30
|
-
`,t+="-----END RSA PRIVATE KEY-----",t},n.prototype.getPublicKey=function(){var t=`-----BEGIN PUBLIC KEY-----
|
|
31
|
-
`;return t+=n.wordwrap(this.getPublicBaseKeyB64())+`
|
|
32
|
-
`,t+="-----END PUBLIC KEY-----",t},n.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},n.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},n.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},n}(yc),Xn,Sc=typeof process<"u"?(Xn=process.env)===null||Xn===void 0?void 0:Xn.npm_package_version:void 0,Vn=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 wn(this.getKey().encrypt(n))}catch{return!1}},e.prototype.sign=function(n,t,r){try{return wn(this.getKey().sign(n,t,r))}catch{return!1}},e.prototype.verify=function(n,t,r){try{return this.getKey().verify(n,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 Vn({default_key_size:"2048"});return{publicKey:e.getPublicKey(),privateKey:e.getPrivateKey()}}function qt(e,n){const t=new Vn;return t.setPublicKey(n),t.encrypt(e)||""}function Lr(e,n){const t=new Vn;return t.setPrivateKey(n),t.decrypt(e)||""}function pa(){return typeof new Vn().encrypt=="function"}const Bo=f.useLoginState(f.pinia),{superAdminInfo:Tc,cryptoInfo:Le,loginUserInfo:Qn}=f.storeToRefs(Bo),Dc=en(f.pinia),{activeMenuPath:Gt}=f.storeToRefs(Dc),pr=Pt(f.pinia),Ct="123456",kc=xr(f.pinia),{routerPageStructures:Ac}=f.storeToRefs(kc),Kr=l.ref(0),wc=l.ref([{label:"用户名称",value:"",name:"userName"}]),At=l.computed(()=>{const e=sessionStorage.getItem("isSuperAdmin");return e?JSON.parse(e):!1}),Ic=e=>{console.log("handleQueryChange",e)},In=l.ref([]),Mo=l.ref(""),xn=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?(Mo.value=e.name,In.value=(i=(r=(t=e==null?void 0:e.compData)==null?void 0:t.find(s=>(s==null?void 0:s.key)==="header"))==null?void 0:r.contents)==null?void 0:i.filter(s=>(s==null?void 0:s.label)!=="操作"),(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=>{pr.setRefreshCurStructure(!1),Hn(e.singleContent,e.buttonName,Kr.value,e==null?void 0:e.selectItems)},dr=l.ref(),Bc=e=>{console.log("onDoubleClick",e)},Mc=(e,n)=>{e==="重置密码"&&oo.confirm(`该操作将会重置【${(n==null?void 0:n.account)||(n==null?void 0:n.账号)}】的密码为【${Ct}】,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{dr.value={...n,password:Ct},Hn(dr.value,e,Kr.value)}).catch(()=>{f.ElMessage.info("取消重置")})},Cc=()=>{Bn(Gt.value).then(e=>{var t;const n=Array.isArray(e)&&(e==null?void 0:e.filter(r=>(r==null?void 0:r.account)!==Tc.value.account));xn.value=(t=xn.value)==null?void 0:t.map(r=>r.key==="tableContents"?{...r,contents:n==null?void 0:n.map(i=>{var a;return{...i,password:Lr(i==null?void 0:i.password,(a=Le==null?void 0:Le.value)==null?void 0:a.privateKey)}})}:r)})},Rt=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},Gt.value),f.ElMessage.success("保存成功"),pr.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{pr.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=Xt(s,In.value);return pa()&&c&&(!c.password&&At.value?c.password=qt(Ct,(u=Le==null?void 0:Le.value)==null?void 0:u.publicKey):c.password&&At.value&&(c.password=qt(c==null?void 0:c.password,(p=Le==null?void 0:Le.value)==null?void 0:p.publicKey))),{key:{type:"data",layer:s==null?void 0:s.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(h=Gt.value)!=null&&h.startsWith("/")?(g=Gt.value)==null?void 0:g.substring(1):Gt.value,tableId:n,createUserId:(y=Qn.value)==null?void 0:y.id,createUserOrg:((d=Qn.value)==null?void 0:d.dept)||((m=Qn.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=Xt(s,In.value);return pa()&&c&&(!c.password&&At.value?c.password=qt(Ct,(u=Le==null?void 0:Le.value)==null?void 0:u.publicKey):c.password&&At.value&&(c.password=qt(c==null?void 0:c.password,(p=Le==null?void 0:Le.value)==null?void 0:p.publicKey))),{id:s==null?void 0:s.id,value:{tableData:c}}});r.length>0&&await Rt(f.batchAddInsofDataApi,{dataList:r},"新增"),i.length>0&&(await Rt(f.batchUpdateInsofDataApi,{dataList:i},"编辑"),pt.show=!1)},Hn=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 Rt(f.batchDeleteInsofDataApi,{ids:i},"编辑")}},Bn=async e=>{const n=await Rt(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:xn.value,name:""}]}]},Oc=Object.freeze(Object.defineProperty({__proto__:null,changedRow:dr,clickRowButton:Mc,columns:In,compName:Mo,getPageDataAsync:Bn,handleItemDataChange:xc,handleQueryChange:Ic,handleSubmitAsync:Rt,loginUserIsSuper:At,onDoubleClick:Bc,pageData:xn,queryFormData:wc,refreshUserTableData:Cc,resetPassword:Ct,structureId:Kr,submitTableAsyncByVerify:Hn,tempUserPageData:Nc},Symbol.toStringTag,{value:"Module"})),tn=f.defineStore("originalState",{state:()=>({originalPath:"^"}),actions:{}}),Pc=Pt(f.pinia),{routeToChildPath:da}=f.storeToRefs(Pc),Fc=f.useLoginState(f.pinia),{loginUserInfo:Mn,cryptoInfo:er}=f.storeToRefs(Fc),Lc=tn(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=Bn("/系统管理/角色管理"),i=Bn("/系统管理/部门管理");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)?Lr(v==null?void 0:v.password,(b=er==null?void 0:er.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 Tn=(e=>(e[e.全部数据权限=0]="全部数据权限",e[e.本部门数据权限=1]="本部门数据权限",e[e.本部门及以下数据权限=2]="本部门及以下数据权限",e[e.仅本人数据权限=3]="仅本人数据权限",e[e.自定义数据权限=4]="自定义数据权限",e))(Tn||{});const Co=(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(Tn==null?void 0:Tn[i]){case 0:return e;case 1:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([h,g])=>{var m,v,b,S,O,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)===((O=(S=r==null?void 0:r.value)==null?void 0:S.tableData)==null?void 0:O.部门名称)||((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,O;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.部门名称)&&((O=p==null?void 0:p.key)==null?void 0:O.createUserId)===(r==null?void 0:r.id)});case 2:break;case 3:return n?e===null&&typeof e!="object"?e:Object.fromEntries(Object.entries(e).filter(([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)})}},yr=en(f.pinia),{activeMenuPath:$c}=f.storeToRefs(yr);let ze="$R";const Uc=Pn(f.pinia),{multipleTableConst:ga}=f.storeToRefs(Uc),zc=f.useLoginState(f.pinia),{loginUserInfo:tr}=f.storeToRefs(zc),dt=Pt(f.pinia),qc=tn(f.pinia),{originalPath:Ro}=f.storeToRefs(qc),{payloadTypes:jc}=f.storeToRefs(dt),Xe=(e,n)=>(n==null?void 0:n.split(",")).some(r=>Object.keys(e).some(i=>i.startsWith("name")&&e[i]===r)),nr={onNumSlice:uu,onRandomContents:fu,onConditionContents:uo},Gc=e=>{const n=e.slice(0,e.indexOf("(")).trim(),t=nr==null?void 0:nr[n];if(typeof t!="function")throw new Error(`找不到函数: ${n}`);const r=e.slice(e.indexOf("(")+1,e.lastIndexOf(")")),i=new Function(`return [${r}]`)();return t(...Array.isArray(i)?i:[i])},gr=(e,n,t="children")=>{var 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=gr(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(!Fn(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,O,D,x,I,w,k,V,T,B,_,H,re,ue,z,U,Z,ae,de,j,N,$,q,X,Q,ge,ie,ce,Y,Se,ve,M,P,he,Ae,Pe,pe,We,He,Ie,gt,Ye,L,me,Je,Lt,Kt,Vr,Hr,$r,Ur,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(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:b.contents)==null?void 0:S.find(ee=>ee==null?void 0:ee.columnPath);i||(i=(x=Nt((D=(O=e==null?void 0:e.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:O.contents)==null?void 0:D[0]))==null?void 0:x.find(ee=>ee==null?void 0:ee.columnPath));let a=(w=(I=f.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:I.replace("[",ze))==null?void 0:w.split(ze),o=(T=(V=(k=a==null?void 0:a[(a==null?void 0:a.length)-1])==null?void 0:k.replace("(",ze))==null?void 0:V.split(ze))==null?void 0:T[0];o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1);let s=(_=(B=f.cloneDeep(i==null?void 0:i.columnPath))==null?void 0:B.split("["+o+"]"))==null?void 0:_[0],c="",u="",p="",h=o;if(o=(re=(H=o==null?void 0:o.split(":"))==null?void 0:H[0])==null?void 0:re.replaceAll("'",""),s.includes("[")){let ee=(Z=(U=(z=(ue=s==null?void 0:s.split("["))==null?void 0:ue[1])==null?void 0:z.split("]"))==null?void 0:U[0])==null?void 0:Z.split("/");u=s,c=(j=(de=(ae=s==null?void 0:s.split("["))==null?void 0:ae[1])==null?void 0:de.split("]"))==null?void 0:j[0];let be="";t==null||t.forEach(se=>{var we,Re,C,A,E;((Re=(we=se==null?void 0:se.value)==null?void 0:we.pageData)==null?void 0:Re.name)===(ee==null?void 0:ee[0])&&((E=(A=(C=se==null?void 0:se.value)==null?void 0:C.pageData)==null?void 0:A.compData)==null||E.forEach(K=>{var F;(K==null?void 0:K.key)==="formContent"&&((F=K==null?void 0:K.contents)==null||F.forEach(te=>{var Ee;if((te==null?void 0:te.prop)===(ee==null?void 0:ee[1])){let ne=Vo((Ee=f.cloneDeep(te))==null?void 0:Ee.optionUrl,r);be=(te==null?void 0:te.value)||ne||""}}))}))}),p=be,s=((N=s==null?void 0:s.split("["))==null?void 0:N[0])+be}let g=[];const y=await f.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),type:"structure"}}),d=await f.getInsofDataApi({key:{pageKey:$c.value,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}}),m=[];if((q=($=d==null?void 0:d.data)==null?void 0:$.result)==null||q.forEach(ee=>{var be;m.push({id:ee==null?void 0:ee.id,value:ee.value.tableData,parentId:(be=ee==null?void 0:ee.key)==null?void 0:be.parentId})}),(m==null?void 0:m.length)===0){const ee=await f.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),tableId:parseInt(n),type:"data"}});(Q=(X=ee==null?void 0:ee.data)==null?void 0:X.result)==null||Q.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=(ie=(ge=h==null?void 0:h.replace("[",ze))==null?void 0:ge.split(ze))==null?void 0:ie[0];if(Array.isArray((ce=y==null?void 0:y.data)==null?void 0:ce.result)&&((Se=(Y=y==null?void 0:y.data)==null?void 0:Y.result)==null?void 0:Se.length)>0){let ee;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=(P=(M=v==null?void 0:v.split(":"))==null?void 0:M[((ve=v==null?void 0:v.split(":"))==null?void 0:ve.length)-1])==null?void 0:P.replaceAll("'",""),((Ae=(he=y==null?void 0:y.data)==null?void 0:he.result)==null?void 0:Ae.find(C=>{var A;return Xe((A=C==null?void 0:C.value)==null?void 0:A.pageData,v)}))??((pe=(Pe=y==null?void 0:y.data)==null?void 0:Pe.result)==null?void 0:pe.find(C=>{var A;return Xe((A=C==null?void 0:C.value)==null?void 0:A.pageData,o)}))){let C=(He=(We=y==null?void 0:y.data)==null?void 0:We.result)==null?void 0:He.sort((A,E)=>A.id-E.id);ee=await(C==null?void 0:C.map(async A=>{var K,F,te,Ee,ne,J,Te,G,Be,xe,Me,_t,Vt,Ht,_e,ai,oi,si,li,ui,ci,fi,hi,pi,di,yi,gi,vi,mi,bi,Si,Ei,Ti;let E;if(Xe((K=A==null?void 0:A.value)==null?void 0:K.pageData,v)||Xe((F=A==null?void 0:A.value)==null?void 0:F.pageData,o)&&((Ee=(te=A==null?void 0:A.value)==null?void 0:te.pageData)==null?void 0:Ee.name)===o){E=f.cloneDeep((J=(ne=A==null?void 0:A.value)==null?void 0:ne.pageData)==null?void 0:J.compData);let nn;Xe((Te=A==null?void 0:A.value)==null?void 0:Te.pageData,v)&&v===o?(Be=(G=A==null?void 0:A.value)==null?void 0:G.pageData)!=null&&Be.name1?nn={name:(Me=(xe=A==null?void 0:A.value)==null?void 0:xe.pageData)==null?void 0:Me.name,name0:(Vt=(_t=A==null?void 0:A.value)==null?void 0:_t.pageData)==null?void 0:Vt.name0,name1:(_e=(Ht=A==null?void 0:A.value)==null?void 0:Ht.pageData)==null?void 0:_e.name1}:nn={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}:nn={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:nn});const vt=await f.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey"),tableId:A==null?void 0:A.id,type:"data"}});let rn;if(((di=(pi=vt==null?void 0:vt.data)==null?void 0:pi.result)==null?void 0:di.length)>0&&((gi=(yi=E==null?void 0:E.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:yi.contents)!=null&&gi.every(W=>!(W!=null&&W.columnPath))))rn=(mi=(vi=vt==null?void 0:vt.data)==null?void 0:vi.result)==null?void 0:mi.map(W=>{var $t;let oe=[];return oe.push({id:W==null?void 0:W.id}),oe.push(($t=W==null?void 0:W.value)==null?void 0:$t.tableData),oe}),E.push({key:"tableContents",contents:wt(rn,(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(W=>(W==null?void 0:W.key)==="header"))==null?void 0:Ti.contents)}),E.push({key:"contentTableId",contents:A==null?void 0:A.id}),c!==""&&(E!=null&&E.find(W=>(W==null?void 0:W.key)==="pageColumn")&&(E=E==null?void 0:E.filter(W=>(W==null?void 0:W.key)!=="pageColumn")),E.push({key:"pageColumn",contents:u}),E!=null&&E.find(W=>(W==null?void 0:W.key)==="columnPath")&&(E=E==null?void 0:E.filter(W=>(W==null?void 0:W.key)!=="columnPath")),E.push({key:"columnPath",contents:c}),E!=null&&E.find(W=>(W==null?void 0:W.key)==="columnUsingPath")&&(E=E==null?void 0:E.filter(W=>(W==null?void 0:W.key)!=="columnUsingPath")),E.push({key:"columnUsingPath",contents:p}),E!=null&&E.find(W=>(W==null?void 0:W.key)==="pageGroup")&&(E=E==null?void 0:E.filter(W=>(W==null?void 0:W.key)!=="pageGroup")),E.push({key:"pageGroup",contents:o})),g.push(E);else{let W=await ut(s,sessionStorage.getItem("systemKey"),"");W==null||W.forEach(oe=>{var $t,Di,ki,Ai,wi,Ii,xi,Bi,Mi,Ci;if(Xe(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)||Xe(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"))||[],W=(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,rn=W;let an;Xe(oe,o)&&v===o||Xe(oe,v)&&v!==o?(xi=(Ii=A==null?void 0:A.value)==null?void 0:Ii.pageData)!=null&&xi.name1?an={name:oe==null?void 0:oe.name,name0:oe==null?void 0:oe.name0,name1:oe==null?void 0:oe.name1}:an={name:oe==null?void 0:oe.name,name0:oe==null?void 0:oe.name0}:an={name:(oe==null?void 0:oe.name0)||(oe==null?void 0:oe.name)},E.push({key:"name",contents:an}),E.push({key:"tableContents",contents:wt(rn,(Mi=(Bi=oe==null?void 0:oe.compData)==null?void 0:Bi.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:Mi.contents)}),E.push({key:"contentTableId",contents:(W==null?void 0:W.length)!==0?(Ci=oe==null?void 0:oe.compData)==null?void 0:Ci.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(ee)}let be=[];g==null||g.forEach(C=>{be!=null&&be.find(A=>{var E,K,F,te,Ee,ne,J,Te;return((te=(F=(K=A==null?void 0:A.filter(G=>(G==null?void 0:G.key)==="name"))==null?void 0:K[((E=A==null?void 0:A.filter(G=>(G==null?void 0:G.key)==="name"))==null?void 0:E.length)-1])==null?void 0:F.contents)==null?void 0:te.name)===((Te=(J=(ne=C==null?void 0:C.find(G=>(G==null?void 0:G.key)==="name"))==null?void 0:ne[((Ee=C==null?void 0:C.find(G=>(G==null?void 0:G.key)==="name"))==null?void 0:Ee.length)-1])==null?void 0:J.contents)==null?void 0:Te.name)})&&(be!=null&&be.find(A=>{var E,K,F,te,Ee,ne,J,Te;return((te=(F=(K=A==null?void 0:A.filter(G=>(G==null?void 0:G.key)==="name"))==null?void 0:K[((E=A==null?void 0:A.filter(G=>(G==null?void 0:G.key)==="name"))==null?void 0:E.length)-1])==null?void 0:F.contents)==null?void 0:te.name0)===((Te=(J=(ne=C==null?void 0:C.find(G=>(G==null?void 0:G.key)==="name"))==null?void 0:ne[((Ee=C==null?void 0:C.find(G=>(G==null?void 0:G.key)==="name"))==null?void 0:Ee.length)-1])==null?void 0:J.contents)==null?void 0:Te.name0)}))||be.push(C)}),be=be==null?void 0:be.map(C=>{var E,K;let A=[];return C==null||C.forEach(F=>{(F==null?void 0:F.key)!=="name"&&A.push(F)}),A.push((K=C==null?void 0:C.filter(F=>(F==null?void 0:F.key)==="name"))==null?void 0:K[((E=C==null?void 0:C.filter(F=>(F==null?void 0:F.key)==="name"))==null?void 0:E.length)-1]),A}),g=be,g=g==null?void 0:g.filter(C=>C!==void 0);let se=(gt=(Ie=h==null?void 0:h.replace(":",ze))==null?void 0:Ie.split(ze))==null?void 0:gt[1];se!=null&&se.includes("[")&&(se=(Ye=se==null?void 0:se.replaceAll("'",'"'))==null?void 0:Ye.replaceAll(":",","),se=(L=Wc(se))==null?void 0:L.join(","),se="["+((Lt=(Je=(me=se==null?void 0:se.replaceAll('":"',ga.value))==null?void 0:me.replaceAll(":",ga.value))==null?void 0:Je.replaceAll("[",""))==null?void 0:Lt.replaceAll("]",""))+"]",Fn(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 K,F,te,Ee;if((E==null?void 0:E.key)==="header")if((K=E.contents)!=null&&K.every(ne=>Array.isArray(ne)))E.contents=(F=E.contents)==null?void 0:F.map(ne=>{let J=gr(ne,se);return ne=J==null?void 0:J.contents,A=[...new Set(J.ids)],ne});else{let ne=gr(E.contents,se);A=[...new Set(ne.ids)],E.contents=(te=E.contents)==null?void 0:te.filter(J=>se==null?void 0:se.find(Te=>Te===((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=(Ee=E.contents)==null?void 0:Ee.map(ne=>(ne=ne==null?void 0:ne.filter((J,Te)=>(A==null?void 0:A.find(G=>G===Te))||(J==null?void 0:J.id)),ne))),E}),C})),g=g==null?void 0:g.map(C=>{var E,K;let A=(K=tt((E=C==null?void 0:C.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:E.contents))==null?void 0:K.filter(F=>F!=="操作"&&F);return C=C==null?void 0:C.map(F=>{var te;if((F==null?void 0:F.key)==="tableContents"){let Ee=(te=F.contents)==null?void 0:te.map(ne=>{var G;let J=(ne==null?void 0:ne.length)!==1?st(ne==null?void 0:ne.filter(Be=>Be),A):ne==null?void 0:ne[0],Te=m==null?void 0:m.find(Be=>(Be==null?void 0:Be.parentId)===(J==null?void 0:J.id));if(Te){let Be=Object.assign(Te==null?void 0:Te.value,J);return Be.id=Te==null?void 0:Te.id,Be}else return J.id=((G=J==null?void 0:J.id)==null?void 0:G.toString())??"undefined",J});F.contents=Ee}return F}),C}),g=g==null?void 0:g.sort((C,A)=>{var E,K;return((E=C==null?void 0:C.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:E.contents)-((K=A==null?void 0:A.find(F=>(F==null?void 0:F.key)==="contentTableId"))==null?void 0:K.contents)});let we=(Hr=(Vr=(Kt=i==null?void 0:i.columnPath)==null?void 0:Kt.replace("(",ze))==null?void 0:Vr.split(ze))==null?void 0:Hr[1];if(we&&(we==null?void 0:we.length)>0){we=($r=we.slice(0,(we==null?void 0:we.length)-1))==null?void 0:$r.replaceAll("'","");let C=we==null?void 0:we.split(",");C=C==null?void 0:C.map(K=>{let F=Wn==null?void 0:Wn.find(te=>K==null?void 0:K.includes(te==null?void 0:te.key));if(F)return{order:F==null?void 0:F.order,value:F==null?void 0:F.value,content:K}}),C=C==null?void 0:C.sort((K,F)=>(F==null?void 0:F.order)-(K==null?void 0:K.order));let A=[];g=g==null?void 0:g.map(K=>(K=K==null?void 0:K.map((F,te)=>{var Ee,ne,J,Te;return(F==null?void 0:F.key)==="header"&&((Ee=F==null?void 0:F.contents)!=null&&Ee.every(G=>Array.isArray(G))?F.contents=(ne=F.contents)==null?void 0:ne.map(G=>{var Be;return A.push({index:te,content:(Be=f.cloneDeep(G))==null?void 0:Be.filter(xe=>xe==null?void 0:xe.columnPath)}),G=G==null?void 0:G.filter(xe=>!(xe!=null&&xe.columnPath)),G}):(A.push({index:te,content:(J=f.cloneDeep(F.contents))==null?void 0:J.filter(G=>G==null?void 0:G.columnPath)}),F.contents=(Te=F.contents)==null?void 0:Te.filter(G=>!(G!=null&&G.columnPath)))),F}),K));const E=C==null?void 0:C.map(async K=>{var te,Ee,ne,J;let F=(ne=(Ee=(te=K==null?void 0:K.content)==null?void 0:te.replace(":",ze))==null?void 0:Ee.split(ze))==null?void 0:ne[1];g=await Gc((K==null?void 0:K.value)+"('"+((J=JSON.stringify(f.cloneDeep(g)))==null?void 0:J.replaceAll("'",'"'))+"','"+F+"')")});await Promise.all(E),g=g==null?void 0:g.map(K=>(K.push({key:"filterAllType",value:C}),K)),g=g==null?void 0:g.map(K=>(K=K==null?void 0:K.map((F,te)=>{var Ee,ne,J,Te,G,Be;if((F==null?void 0:F.key)==="header")if((Ee=F==null?void 0:F.contents)!=null&&Ee.every(xe=>Array.isArray(xe)))F.contents=(ne=F.contents)==null?void 0:ne.map(xe=>{var Me,_t,Vt,Ht;return A!=null&&A.find(_e=>(_e==null?void 0:_e.index)===te)&&((_t=(Me=A==null?void 0:A.find(_e=>(_e==null?void 0:_e.index)===te))==null?void 0:Me.content)==null?void 0:_t.length)>0&&xe.push((Ht=(Vt=A==null?void 0:A.find(_e=>(_e==null?void 0:_e.index)===te))==null?void 0:Vt.content)==null?void 0:Ht[0]),xe});else{let xe=F.contents;A!=null&&A.find(Me=>(Me==null?void 0:Me.index)===te)&&((Te=(J=A==null?void 0:A.find(Me=>(Me==null?void 0:Me.index)===te))==null?void 0:J.content)==null?void 0:Te.length)>0&&xe.push((Be=(G=A==null?void 0:A.find(Me=>(Me==null?void 0:Me.index)===te))==null?void 0:G.content)==null?void 0:Be[0]),F.contents=xe}return F}),K))}let Re=[];(zr=(Ur=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="header"))==null?void 0:Ur.contents)!=null&&zr.every(C=>Array.isArray(C))?Re=(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)!=="操作"):Re=(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)!=="操作"),Re&&(Re==null?void 0:Re.length)>0&&(g=g==null?void 0:g.map(C=>(C=C==null?void 0:C.map(A=>{var E,K;return(A==null?void 0:A.key)==="header"&&((E=A==null?void 0:A.contents)!=null&&E.every(F=>Array.isArray(F))?(A.contents=[...(K=A.contents)==null?void 0:K[0],...Re],A.contents=[A.contents]):A.contents=[...A.contents,...Re]),A}),C)))}else{let ee="",be="";(Jr=s==null?void 0:s.split("/"))==null||Jr.forEach((E,K)=>{var F;K<((F=s==null?void 0:s.split("/"))==null?void 0:F.length)-1?ee=ee===""?ee+E:ee+"/"+E:be=E});let se=await ut(ee,sessionStorage.getItem("systemKey"),""),we;(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,K)=>{E!=null&&E.isMainKey&&(we=K)});let Re=[];(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(K=>K===be)&&(we||we===0)&&Re.push(E==null?void 0:E[we])});let C=[],A=await(Re==null?void 0:Re.map(async E=>{let K=await ut(ee+Ro.value+E,sessionStorage.getItem("systemKey"),""),F=K==null?void 0:K.find(te=>(te==null?void 0:te.name)===o);C.push(F)}));await Promise.all(A),C==null||C.forEach(E=>{var F,te,Ee,ne;let K=f.cloneDeep(E==null?void 0:E.compData);K&&(K=K==null?void 0:K.filter(J=>(J==null?void 0:J.key)!=="tableContents"),K.push({key:"tableContents",contents:wt((te=(F=E==null?void 0:E.compData)==null?void 0:F.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:te.contents,(ne=(Ee=E==null?void 0:E.compData)==null?void 0:Ee.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:ne.contents)}),K.push({key:"contentTableId",contents:E==null?void 0:E.id}),g.push(K))})}return g==null?void 0:g.filter(ee=>ee!==void 0)},ut=async(e,n,t="",r=!1,i,a,o)=>{var v,b,S,O,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 V,T;return((V=k==null?void 0:k.key)==null?void 0:V.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})),dt.setPageMapState(c);const u=(O=c[e])==null?void 0:O.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,V,T,B;return((k=w==null?void 0:w.key)==null?void 0:k.type)==="data"&&(p.includes((V=w==null?void 0:w.key)==null?void 0:V.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=Co(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 V=(T=w==null?void 0:w.key)==null?void 0:T.tableId;y!=null&&y.find(B=>(B==null?void 0:B.key)===V)?y=y==null?void 0:y.map(B=>((B==null?void 0:B.key)===V&&(B.contents=[...B.contents,k]),B)):y.push({key:V,contents:[k]})});let d=[];const m=await(s==null?void 0:s.map(async w=>{var B,_,H,re,ue,z,U,Z,ae,de,j,N,$,q,X,Q,ge,ie,ce,Y,Se,ve;const k=w.value.pageData,V=w==null?void 0:w.id;let T=(B=f.cloneDeep(k==null?void 0:k.compData))==null?void 0:B.filter(M=>(M==null?void 0:M.key)!=="tableContents");if(T&&(T!=null&&T.find(M=>(M==null?void 0:M.key)==="header"))&&(!Array.isArray((H=(_=T==null?void 0:T.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:_.contents)==null?void 0:H[0])&&((ue=(re=T==null?void 0:T.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:re.contents)!=null&&ue.every(M=>!(M!=null&&M.columnPath)))||Array.isArray((U=(z=T==null?void 0:T.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:z.contents)==null?void 0:U[0])&&((de=Nt((ae=(Z=T==null?void 0:T.find(M=>(M==null?void 0:M.key)==="header"))==null?void 0:Z.contents)==null?void 0:ae[0]))!=null&&de.every(M=>!(M!=null&&M.columnPath))))){let M=wt((j=y==null?void 0:y.find(pe=>(pe==null?void 0:pe.key)===w.id))==null?void 0:j.contents,(N=T==null?void 0:T.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:N.contents),P=await df(($=T==null?void 0:T.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:$.contents,e,(q=T==null?void 0:T.find(pe=>(pe==null?void 0:pe.key)==="tableFilter"))==null?void 0:q.contents,c);P!=null&&P.mainKeys&&T.push({key:"mainRouters",contents:P==null?void 0:P.mainKeys});let he=[],Ae=[];Array.isArray(P)&&(he=wt(P,(X=T==null?void 0:T.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:X.contents)),Array.isArray(P==null?void 0:P.tableContents)&&(Ae=wt(P==null?void 0:P.tableContents,(Q=T==null?void 0:T.find(pe=>(pe==null?void 0:pe.key)==="header"))==null?void 0:Q.contents));let Pe=[...he,...Ae];Array.isArray(M)&&(M==null?void 0:M.length)>0&&(Pe=[...Pe,...M]),T.push({key:"tableContents",contents:Pe}),T=T==null?void 0:T.map(pe=>{var We;return(pe==null?void 0:pe.key)==="header"&&(pe.contents=(We=pe.contents)==null?void 0:We.map(He=>((He==null?void 0:He.prop)===(P==null?void 0:P.mainKey)&&(He.isMainKey=!0),He))),pe})}else T&&(T!=null&&T.find(M=>(M==null?void 0:M.key)==="header"))&&(T=await Yc(f.cloneDeep(T),V,s,c),T.every(M=>Array.isArray(M))||(T=[T]));if(k.id=w==null?void 0:w.id,k.isShow=(ie=(ge=w==null?void 0:w.value)==null?void 0:ge.pageData)==null?void 0:ie.isShow,(T==null?void 0:T.length)>0&&T.every(M=>Array.isArray(M)))T==null||T.forEach(M=>{var Ae,Pe,pe,We,He;let P=f.cloneDeep(k);P.compData=M,P.tableId=(Ae=M==null?void 0:M.find(Ie=>(Ie==null?void 0:Ie.key)==="contentTableId"))==null?void 0:Ae.contents;let he=(Pe=M==null?void 0:M.find(Ie=>(Ie==null?void 0:Ie.key)==="name"))==null?void 0:Pe.contents;he!=null&&he.name0&&(he==null?void 0:he.name0)===(P==null?void 0:P.name)?(P.name0=P.name,P.name=he==null?void 0:he.name):he!=null&&he.name0&&(P.name1=P.name,P.name0=he.name0,P.name=he==null?void 0:he.name),(pe=P==null?void 0:P.compData)!=null&&pe.every(Ie=>Array.isArray(Ie))?((We=P==null?void 0:P.compData)==null?void 0:We.length)===0?d.push(P):(He=P==null?void 0:P.compData)==null||He.forEach((Ie,gt)=>{let Ye;gt===0?Ye={comp:P==null?void 0:P.comp,compData:Ie,id:P==null?void 0:P.id,name:P==null?void 0:P.name,isShow:P==null?void 0:P.isShow}:Ye={comp:P==null?void 0:P.comp,compData:Ie,id:P==null?void 0:P.id,name:"",isShow:P==null?void 0:P.isShow},d.push(Ye)}):d.push(P)});else if(((ce=w.key)==null?void 0:ce.type)!=="method")k.compData=T,(Y=k==null?void 0:k.compData)!=null&&Y.every(M=>Array.isArray(M))?((Se=k==null?void 0:k.compData)==null?void 0:Se.length)===0?d.push(k):(ve=k==null?void 0:k.compData)==null||ve.forEach((M,P)=>{let he;P===0?he={comp:k==null?void 0:k.comp,compData:M,id:k==null?void 0:k.id,name:k==null?void 0:k.name,isShow:k==null?void 0:k.isShow}:he={comp:k==null?void 0:k.comp,compData:M,id:k==null?void 0:k.id,name:"",isShow:k==null?void 0:k.isShow},d.push(he)}):d.push(k);else{let M;M={name:"",compData:[k],comp:"calculator"},d.push(M)}}));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}),dt.setTableLoading(!1)},Zc=async(e,n,t,r,i,a,o,s)=>{var h,g,y,d,m,v,b,S,O,D,x,I,w,k,V,T,B,_,H,re,ue,z,U,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 de=((D=(O=(S=(b=ae==null?void 0:ae.data)==null?void 0:b.result)==null?void 0:S[0])==null?void 0:O.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 N=await f.createInsofDataApi({key:{type:e,pageKey:u||j||n,tableId:de||t,systemKey:r},value:{tableData:st(i,(V=tt(a))==null?void 0:V.filter($=>$!=="操作"))}});((T=N==null?void 0:N.data)==null?void 0:T.code)===200?(p=(B=N==null?void 0:N.data)==null?void 0:B.result,f.ElMessage.success("保存成功")):f.ElMessage.error("保存响应失败"),dt.setTableLoading(!1)}else{let ae;if(o!=null&&o.parentTableId){let j=await f.getInsofDataApi({id:o==null?void 0:o.parentTableId});ae=(ue=(re=(H=(_=j==null?void 0:j.data)==null?void 0:_.result)==null?void 0:H[0])==null?void 0:re.key)==null?void 0:ue.pageKey}const de=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:st(i,(z=tt(a))==null?void 0:z.filter(j=>j!=="操作"))}});((U=de==null?void 0:de.data)==null?void 0:U.code)===200?(p=(Z=de==null?void 0:de.data)==null?void 0:Z.result,f.ElMessage.success("保存成功")):f.ElMessage.error("保存响应失败"),dt.setTableLoading(!1)}return p},No=(e,n)=>{if(!Object.keys(e).some(t=>t in n))return!1;for(let t in e)if((e==null?void 0:e[t])!==(n==null?void 0:n[t])&&!(!e[t]||!n[t]))return!1;return!0},Xc=async(e,n,t,r,i,a,o,s)=>{var c,u,p,h,g,y,d,m,v,b,S,O,D,x,I,w,k,V,T,B,_,H,re,ue,z,U,Z,ae,de,j,N,$,q,X;if(r)if((s==null?void 0:s.parentTableId)===0){const Q=await f.getInsofDataApi({id:r});let ge=((h=(p=(u=(c=Q==null?void 0:Q.data)==null?void 0:c.result)==null?void 0:u[0])==null?void 0:p.key)==null?void 0:h.tableId)??"",ie=((m=(d=(y=(g=Q==null?void 0:Q.data)==null?void 0:g.result)==null?void 0:y[0])==null?void 0:d.key)==null?void 0:m.pageKey)??"";if(ge&&ge!==""){const ce=await f.updateInsofDataApi({key:{type:e,pageKey:ie,tableId:ge,systemKey:i},value:{tableData:st(a,(v=tt(o))==null?void 0:v.filter(Y=>Y!=="操作"))},id:r});((b=ce==null?void 0:ce.data)==null?void 0:b.code)===200?f.ElMessage.success("保存成功"):f.ElMessage.error("保存响应失败"),dt.setTableLoading(!1)}else{const ce=await f.updateInsofDataApi({key:{type:e,pageKey:n,tableId:t,systemKey:i},value:{tableData:st(a,(S=tt(o))==null?void 0:S.filter(Y=>Y!=="操作"))},id:r});((O=ce==null?void 0:ce.data)==null?void 0:O.code)===200?f.ElMessage.success("保存成功"):f.ElMessage.error("保存响应失败"),dt.setTableLoading(!1)}}else{let Q=(D=tt(o))==null?void 0:D.filter(M=>M!=="operate"),ge=st(a,Q),ie=await f.getInsofDataApi({key:{tableId:t}});ie=(I=(x=ie==null?void 0:ie.data)==null?void 0:x.result)==null?void 0:I.map(M=>{var P,he;return{id:M==null?void 0:M.id,value:(P=M==null?void 0:M.value)==null?void 0:P.tableData,parentId:(he=M==null?void 0:M.key)==null?void 0:he.parentId}});let ce=await f.getInsofDataApi({key:{tableId:s==null?void 0:s.parentTableId}});ce=(k=(w=ce==null?void 0:ce.data)==null?void 0:w.result)==null?void 0:k.map(M=>{var P;return{id:M==null?void 0:M.id,value:(P=M==null?void 0:M.value)==null?void 0:P.tableData}});let Y="";ce==null||ce.forEach(M=>{if(Y===""){let P=M==null?void 0:M.value;No(P,ge)&&(Y=M==null?void 0:M.id)}});let Se=(V=ie==null?void 0:ie.find(M=>(M==null?void 0:M.parentId)===Y))==null?void 0:V.id;Se=r||Se;let ve=s==null?void 0:s.singleContent;if(ve==null||delete ve.id,typeof Se=="number"){let M=(T=ie==null?void 0:ie.find(Ae=>(Ae==null?void 0:Ae.id)===Se))==null?void 0:T.parentId,P=await f.getInsofDataApi({id:M});P=(re=(H=(_=(B=P==null?void 0:P.data)==null?void 0:B.result)==null?void 0:_[0])==null?void 0:H.value)==null?void 0:re.tableData;let he={};for(let Ae in P)he[Ae]=(ve==null?void 0:ve[Ae])??(P==null?void 0:P[Ae]);await f.batchUpdateInsofDataApi({dataList:[{id:Se,value:{tableData:ve}},{id:M,value:{tableData:he}}]})}else{let M=await f.getInsofDataApi({id:parseInt(Se)});M=(Z=(U=(z=(ue=M==null?void 0:M.data)==null?void 0:ue.result)==null?void 0:z[0])==null?void 0:U.value)==null?void 0:Z.tableData;let P={};for(let Pe in M)P[Pe]=(ve==null?void 0:ve[Pe])??(M==null?void 0:M[Pe]);let he=await f.getInsofDataApi({id:Se}),Ae=((N=(j=(de=(ae=he==null?void 0:he.data)==null?void 0:ae.result)==null?void 0:de[0])==null?void 0:j.key)==null?void 0:N.pageKey)??"";await f.createInsofDataApi({key:{type:e,pageKey:Ae,tableId:t,systemKey:i,version:1,parentId:parseInt(Se),createUserId:($=tr.value)==null?void 0:$.id,createUserLayer:((q=tr.value)==null?void 0:q.dept)||((X=tr.value)==null?void 0:X.部门名称)},value:{tableData:ve}}),await f.batchUpdateInsofDataApi({dataList:[{id:parseInt(Se),value:{tableData:P}}]})}}},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"),yr.setPlatform(h),yr.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)}},Bt=l.ref(0),vr=en(f.pinia),tf=tn(f.pinia),{originalPath:Tt}=f.storeToRefs(tf),nf=f.useLoginState(f.pinia),rf=Pn(f.pinia),{multipleTableConst:Oe}=f.storeToRefs(rf),{loginUserInfo:Ke}=f.storeToRefs(nf),{activeMenuPath:Ff}=f.storeToRefs(vr),mr=Pt(f.pinia),{pageMapState:br}=f.storeToRefs(mr),Ue=Tt.value,Cn=e=>e==null?void 0:e.map(t=>{var r;return Bt.value++,Array.isArray(t)?Cn(t):{label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":(t==null?void 0:t.prop)??"a"+Bt.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)??Bt.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:Cn(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)}}),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=Cn(r):(r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":(r==null?void 0:r.prop)??"a"+Bt.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)??Bt.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:Cn(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)},Bt.value++),r})),t)),Nt=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,O;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(Oe.value))==null?void 0:h[((p=(u=o==null?void 0:o.prop)==null?void 0:u.split(Oe.value))==null?void 0:p.length)-1]):i+Oe.value+((m=(g=o==null?void 0:o.prop)==null?void 0:g.split(Oe.value))==null?void 0:m[((d=(y=o==null?void 0:o.prop)==null?void 0:y.split(Oe.value))==null?void 0:d.length)-1]);a=n(o==null?void 0:o.children,a,D)}else i!==""&&(o.prop=i+Oe.value+((O=(v=o==null?void 0:o.prop)==null?void 0:v.split(Oe.value))==null?void 0:O[((S=(b=o==null?void 0:o.prop)==null?void 0:b.split(Oe.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,O;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(Oe.value))==null?void 0:h[((p=(u=o==null?void 0:o.prop)==null?void 0:u.split(Oe.value))==null?void 0:p.length)-1]):i+Oe.value+((m=(g=o==null?void 0:o.prop)==null?void 0:g.split(Oe.value))==null?void 0:m[((d=(y=o==null?void 0:o.prop)==null?void 0:y.split(Oe.value))==null?void 0:d.length)-1]);o.children=n(o==null?void 0:o.children,a,D)}else i!==""&&(o.prop=i+Oe.value+((O=(v=o==null?void 0:o.prop)==null?void 0:v.split(Oe.value))==null?void 0:O[((S=(b=o==null?void 0:o.prop)==null?void 0:b.split(Oe.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},Wt=async(e,n,t,r,i)=>{var m,v,b,S,O,D,x,I,w,k,V,T,B,_,H,re,ue,z,U,Z,ae,de,j;let a=e;(a==null?void 0:a[(a==null?void 0:a.length)-1])!==Ue&&(a="",(v=(m=f.cloneDeep(e))==null?void 0:m.split(Ue))==null||v.forEach((N,$)=>{var q,X;$!==((X=(q=f.cloneDeep(e))==null?void 0:q.split(Ue))==null?void 0:X.length)-1&&(a=a===""?a+N:a+"/"+N)}),a=a+Ue);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(N=>{var $;return(($=N==null?void 0:N.key)==null?void 0:$.type)==="structure"})}};let u;(e==null?void 0:e[(e==null?void 0:e.length)-1])!==Ue&&(u={data:{result:(O=br.value[a])==null?void 0:O.filter(N=>{var $;return(($=N==null?void 0:N.key)==null?void 0:$.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=br.value[a])==null?void 0:k.filter(N=>{var $;return(($=N==null?void 0:N.key)==null?void 0:$.type)==="structureMethod"})}},h={data:{result:(T=(V=s==null?void 0:s.data)==null?void 0:V.result)==null?void 0:T.filter(N=>{var $;return(($=N==null?void 0:N.key)==null?void 0:$.type)==="data"})}};if((e==null?void 0:e[(e==null?void 0:e.length)-1])!==Ue){let N=(B=c==null?void 0:c.data)==null?void 0:B.result;if(!Array.isArray(u))return;u==null||u.forEach($=>{var X,Q,ge,ie,ce;let q=(X=N==null?void 0:N.find(Y=>{var Se,ve,M,P;return((ve=(Se=$==null?void 0:$.value)==null?void 0:Se.pageData)==null?void 0:ve.name)===((P=(M=Y==null?void 0:Y.value)==null?void 0:M.pageData)==null?void 0:P.name)}))==null?void 0:X.value;q?q=q:q=void 0,o.push({key:{pageKey:n,parentTable:((Q=q==null?void 0:q.key)==null?void 0:Q.parentTable)??"",systemKey:(ge=$==null?void 0:$.key)==null?void 0:ge.systemKey,type:((ie=q==null?void 0:q.key)==null?void 0:ie.type)??((ce=$==null?void 0:$.key)==null?void 0:ce.type),version:1},value:cf($==null?void 0:$.value,q)})})}else(H=(_=c==null?void 0:c.data)==null?void 0:_.result)==null||H.forEach(N=>{var $,q,X;o.push({key:{pageKey:n,parentTable:($=N==null?void 0:N.key)==null?void 0:$.parentTable,systemKey:(q=N==null?void 0:N.key)==null?void 0:q.systemKey,type:(X=N==null?void 0:N.key)==null?void 0:X.type,version:1},value:uf(N==null?void 0:N.value)})});if((ue=(re=p==null?void 0:p.data)==null?void 0:re.result)==null||ue.forEach(N=>{var $,q;o.push({key:{pageKey:n,systemKey:($=N==null?void 0:N.key)==null?void 0:$.systemKey,type:(q=N==null?void 0:N.key)==null?void 0:q.type,version:1},value:N==null?void 0:N.value})}),o=o==null?void 0:o.map(N=>{var $,q,X;return((q=($=N==null?void 0:N.value)==null?void 0:$.pageData)==null?void 0:q.comp)==="Form"&&(N.value.pageData.compData=(X=N.value.pageData.compData)==null?void 0:X.map(Q=>{var ge;return(Q==null?void 0:Q.key)==="formContent"&&(Q.contents=(ge=Q.contents)==null?void 0:ge.map(ie=>(t!=null&&t[ie==null?void 0:ie.key]&&(ie==null?void 0:ie.type)!=="Date"&&(ie.value=t[ie.key]),ie))),Q}),r&&N.value.pageData.compData.push({key:"parentFormPath",contents:r})),N}),(o==null?void 0:o.length)>0){let N;if(!i)N=o;else{const $=o==null?void 0:o.find(X=>{var Q,ge;return i==null?void 0:i.includes((ge=(Q=X==null?void 0:X.value)==null?void 0:Q.pageData)==null?void 0:ge.name)}),q=/^[A-Za-z]+$/;N=$?o==null?void 0:o.map(X=>{var Q,ge,ie,ce,Y,Se;return i!=null&&i.includes((ge=(Q=X==null?void 0:X.value)==null?void 0:Q.pageData)==null?void 0:ge.name)?{...X,value:{pageData:{...(ie=X==null?void 0:X.value)==null?void 0:ie.pageData,compData:(Se=(Y=(ce=X==null?void 0:X.value)==null?void 0:ce.pageData)==null?void 0:Y.compData)==null?void 0:Se.map(ve=>{var M;return(ve==null?void 0:ve.key)==="formContent"?{...ve,contents:(M=ve==null?void 0:ve.contents)==null?void 0:M.map(P=>q.test(P==null?void 0:P.prop)?P:{...P,value:""})}:ve})}}}:X}):o}await f.batchAddInsofDataApi({dataList:N})}let g={};const y=await f.getInsofDataApi({key:{pageKey:n,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});((U=(z=c==null?void 0:c.data)==null?void 0:z.result)==null?void 0:U.length)>0&&((ae=(Z=c==null?void 0:c.data)==null?void 0:Z.result)==null||ae.forEach(N=>{var $,q,X;g[N.id]=(X=(q=($=y==null?void 0:y.data)==null?void 0:$.result)==null?void 0:q.find(Q=>{var ge,ie,ce,Y;return((ie=(ge=Q==null?void 0:Q.value)==null?void 0:ge.pageData)==null?void 0:ie.name)===((Y=(ce=N==null?void 0:N.value)==null?void 0:ce.pageData)==null?void 0:Y.name)}))==null?void 0:X.id}));let d=[];(j=(de=h==null?void 0:h.data)==null?void 0:de.result)==null||j.forEach(N=>{var $,q,X;d.push({key:{pageKey:n,tableId:g[($=N==null?void 0:N.key)==null?void 0:$.tableId],systemKey:(q=N==null?void 0:N.key)==null?void 0:q.systemKey,type:(X=N==null?void 0:N.key)==null?void 0:X.type},value:N==null?void 0:N.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+Ue+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,O;return((b=v==null?void 0:v.key)==null?void 0:b.pageKey)!==o&&((O=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:O.comp)==="Form"}),g=s==null?void 0:s.filter(v=>{var b,S,O;return((b=v==null?void 0:v.key)==null?void 0:b.pageKey)!==o&&((O=(S=v==null?void 0:v.value)==null?void 0:S.pageData)==null?void 0:O.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,O=(x=b==null?void 0:b.find(I=>I==null?void 0:I.index))==null?void 0:x.index;return S-O});h=d==null?void 0:d.map(v=>v==null?void 0:v.filter(b=>{var S,O,D,x;return!(b!=null&&b.index)&&(b==null?void 0:b.index)!==0&&!((O=(S=b==null?void 0:b.key)==null?void 0:S.pageKey)!=null&&O.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 O,D,x,I,w,k,V,T,B,_;const b=v==null?void 0:v.find(H=>{var re,ue,z,U,Z;return((ue=(re=H==null?void 0:H.value)==null?void 0:re.pageData)==null?void 0:ue.name)===((Z=(U=(z=e==null?void 0:e[0])==null?void 0:z.groupSelect)==null?void 0:U.split(":"))==null?void 0:Z[0])});let S=(w=(I=(x=(D=(O=f.cloneDeep(b))==null?void 0:O.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((re,ue)=>{var Z,ae,de,j,N,$;let z=v==null?void 0:v.find(q=>{var X,Q,ge,ie,ce;return((Q=(X=q==null?void 0:q.value)==null?void 0:X.pageData)==null?void 0:Q.name)===((ce=(ie=(ge=e==null?void 0:e[ue])==null?void 0:ge.groupSelect)==null?void 0:ie.split(":"))==null?void 0:ce[0])}),U=(N=(j=(de=(ae=(Z=f.cloneDeep(z))==null?void 0:Z.value)==null?void 0:ae.pageData)==null?void 0:de.compData)==null?void 0:j.find(q=>(q==null?void 0:q.key)==="formContent"))==null?void 0:N.contents;U!=null&&U.find(q=>(q==null?void 0:q.key)===re)?H.push(($=U==null?void 0:U.find(q=>(q==null?void 0:q.key)===re))==null?void 0:$.value):H.push("")}),m.push(H)}else S=(_=(B=(T=(V=(k=f.cloneDeep(b))==null?void 0:k.value)==null?void 0:V.pageData)==null?void 0:T.compData)==null?void 0:B.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:_.contents,S==null||S.forEach(H=>{let re=[];a==null||a.forEach(ue=>{H!=null&&H[ue]&&re.push(H==null?void 0:H[ue])}),m.push(re)})}),(t==null?void 0:t.length)>0){let v={};t==null||t.forEach(b=>{var S;for(let O in b){let D=f.cloneDeep(O);if(!(D!=null&&D.includes("[")))(S=b[O])!=null&&S.includes("[")||(v[D]=b[O]);else{let x=Fo(D,n[r]),I=Po(b[O],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+Ue))&&!((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+Ue))&&!((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=Co(g,!0,t);let m=(c=Object.values(g))==null?void 0:c.sort((D,x)=>{var k,V;let I=(k=D==null?void 0:D.find(T=>T==null?void 0:T.index))==null?void 0:k.index,w=(V=x==null?void 0:x.find(T=>T==null?void 0:T.index))==null?void 0:V.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,V;return((V=(I=x==null?void 0:x.key)==null?void 0:I.pageKey)==null?void 0:V[((k=(w=x==null?void 0:x.key)==null?void 0:w.pageKey)==null?void 0:k.length)-1])===Ue}));g=g==null?void 0:g.filter(D=>!(D!=null&&D.find(x=>{var I,w,k,V,T,B,_,H;return((V=(I=x==null?void 0:x.key)==null?void 0:I.pageKey)==null?void 0:V[((k=(w=x==null?void 0:x.key)==null?void 0:w.pageKey)==null?void 0:k.length)-1])===Ue||((B=(T=x==null?void 0:x.key)==null?void 0:T.pageKey)==null?void 0:B.includes("updateLoading"))||((H=(_=x==null?void 0:x.key)==null?void 0:_.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,V;((I=(x=D==null?void 0:D.value)==null?void 0:x.pageData)==null?void 0:I.comp)==="Form"&&((V=(k=(w=D==null?void 0:D.value)==null?void 0:w.pageData)==null?void 0:k.compData)==null||V.forEach(T=>{(T==null?void 0:T.key)==="formContent"&&(S=[...S,...T==null?void 0:T.contents])}))});let O=(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,V,T,B,_;((V=(k=w==null?void 0:w.value)==null?void 0:k.pageData)==null?void 0:V.comp)==="Form"&&((_=(B=(T=w==null?void 0:w.value)==null?void 0:T.pageData)==null?void 0:B.compData)==null||_.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(V=>(V==null?void 0:V.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 V,T,B,_,H,re,ue,z;let I={};for(let U in x){let Z=f.cloneDeep(U);if(!(Z!=null&&Z.includes("[")))x[U].toUpperCase()==="@LOGINUSER"?I[Z]=((V=Ke.value)==null?void 0:V.姓名)||((T=Ke.value)==null?void 0:T.account)||((B=Ke.value)==null?void 0:B.账号)||((_=Ke.value)==null?void 0:_.姓名):(H=x[U])!=null&&H.includes("[")||(I[Z]=x[U]);else{let ae=Fo(Z,t[e]),de=Po(x[U],t[e]);I[ae]=de}}let w=[],k=0;for(let U in I)((re=I[U])==null?void 0:re[0])!=="!"?w=(ue=k>0?w:b)==null?void 0:ue.filter(ae=>ae[U]===I[U]):w=(z=k>0?w:b)==null?void 0:z.filter(Z=>{var ae;return Z[U]!==((ae=I[U])==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:O,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,O;return((S=b==null?void 0:b.key)==null?void 0:S.type)==="structure"&&((O=b==null?void 0:b.key)==null?void 0:O.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 O;return((O=S==null?void 0:S.key)==null?void 0:O.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 O=(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,...O]}}else v=a;let b="";if((v==null?void 0:v.length)>0){let S=[],O;O=(y=v==null?void 0:v.filter(T=>{var B,_,H,re,ue,z;return((H=(_=(B=T==null?void 0:T.key)==null?void 0:B.pageKey)==null?void 0:_.split("/"))==null?void 0:H[0])===m&&((z=(ue=(re=T==null?void 0:T.key)==null?void 0:re.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}),O=[...new Set(O)],O=O==null?void 0:O.filter(T=>!T.includes(Ue));let D=(d=f.cloneDeep(O))==null?void 0:d.map(async T=>{var ue,z,U,Z,ae,de,j,N,$,q,X,Q,ge,ie,ce;let B=await ut(T,sessionStorage.getItem("systemKey"),"",!1,[],!1,r),_=(Z=(U=(z=(ue=f.cloneDeep(B))==null?void 0:ue[0])==null?void 0:z.compData)==null?void 0:U.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:Z.contents,H=(q=($=(N=(j=(de=(ae=f.cloneDeep(B))==null?void 0:ae[0])==null?void 0:de.compData)==null?void 0:j.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:N.contents)==null?void 0:$.filter(Y=>(Y==null?void 0:Y.label)!=="操作"))==null?void 0:q.map(Y=>Y==null?void 0:Y.prop),re=[];return(ce=(ie=(ge=(Q=(X=f.cloneDeep(B))==null?void 0:X[0])==null?void 0:Q.compData)==null?void 0:ge.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:ie.contents)==null||ce.forEach(Y=>{(Y==null?void 0:Y.isMainKey)===!0&&(b=Y==null?void 0:Y.prop)}),_==null||_.forEach(Y=>{let Se=st(Y,H);re.push(Se),S.push({key:Se==null?void 0:Se[b],routerContent:T})}),re}),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 _,H,re;let B={};for(let ue in T)T[ue].toUpperCase()==="@LOGINUSER"?B[ue]=((_=Ke.value)==null?void 0:_.姓名)||((H=Ke.value)==null?void 0:H.account)||((re=Ke.value)==null?void 0:re.账号):B[ue]=T[ue];return B});let k=[];I==null||I.forEach(T=>{let B=[];w==null||w.forEach(_=>{let H=[];for(let re in _)H.push(T[re]===_[re]);B.push(H)}),B.find(_=>_==null?void 0:_.every(H=>H===!0))&&k.push(T)});let V=[];return k==null||k.forEach(T=>{let B={};t==null||t.forEach(_=>{B[_.prop]=T[_.prop]??""}),V.push(B)}),V=V==null?void 0:V.map(T=>Object.values(T)),{mainKey:b,tableContents:V,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,O,D,x,I;m.push({columnPath:v==null?void 0:v.columnPath,formMenuSelect:(O=((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:O.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+Ue+n,r=e,i=(s=(o=br.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 Wt(t,t+Tt+`updateLoading${((c=Ke.value)==null?void 0:c.account)||((u=Ke.value)==null?void 0:u.账号)}`),mr.setRouteToChildPath(r),vr.setActiveMenuPath(t+Tt+`updateLoading${((p=Ke.value)==null?void 0:p.account)||((h=Ke.value)==null?void 0:h.账号)}`)):(await Wt(r+Tt,t,a),await Wt(t,t+Tt+`updateLoading${((g=Ke.value)==null?void 0:g.account)||((y=Ke.value)==null?void 0:y.账号)}`),mr.setRouteToChildPath(r),vr.setActiveMenuPath(t+Tt+`updateLoading${((d=Ke.value)==null?void 0:d.account)||((m=Ke.value)==null?void 0:m.账号)}`))},gf=tn(f.pinia),{originalPath:Lo}=f.storeToRefs(gf),vf=e=>e==null?void 0:e.map(t=>(t=_o(t),t)),_r=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=Nt(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 ut(n,sessionStorage.getItem("systemKey"),"");return r||await ut(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"}],yt=[{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:yt},{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 _r();return[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:yt},{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 _r()},{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:yt},{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:yt},{key:"value",label:"固定值",type:"Input"}],xf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:yt},{key:"originalContent",label:"初始值",type:"Input"}],ma=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:yt}],Bf=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"type",label:"类型",type:"Select",options:yt}],Mf=[{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}],Cf=[{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:Cf},{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=rr;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=Mf;exports.FormType=Ef;exports.INPUT_EVENT=ir;exports.IsJson=Fn;exports.PatchFlags=jt;exports.SetCache=Yt;exports.State=Oc;exports.State$1=Zu;exports.TinyColor=Xa;exports.UPDATE_MODEL_EVENT=Dn;exports.addPathToTree=Ln;exports.addTableContents=Zc;exports.animateScrollTo=Cs;exports.baseFlatten=Sr;exports.baseIsEqual=Er;exports.buttonTypes=Ja;exports.cAF=Ca;exports.cacheHas=ka;exports.convertArrayToTree=Cr;exports.copyAdd=yf;exports.decryptData=Lr;exports.deleteTableContents=Jc;exports.encryptData=qt;exports.ensureOnlyChild=Ll;exports.fixFormContents=Qc;exports.fixTableContents=Xc;exports.flatRest=Da;exports.flattedChildren=Ut;exports.flatten=Ta;exports.focusNode=js;exports.formContextKey=Rn;exports.formItemContextKey=Tr;exports.formToOptionsContents=Nf;exports.generateKeyPair=Ec;exports.getActivePageStructureId=To;exports.getAllLeafNodes=af;exports.getColumnChild=Nt;exports.getColumnContents=tt;exports.getEqualChild=lo;exports.getFirstArrayProperty=Mr;exports.getGradeColumns=of;exports.getItemData=ut;exports.getLeafNodesRecursive=Nr;exports.getMenusContent=_r;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=st;exports.groupByField=Rr;exports.handleRowAuthorityRender=Or;exports.handleSubmitAsync=Rt;exports.hasIn=Ia;exports.identity=ba;exports.inputProps=Pa;exports.isEqual=xa;exports.isFirefox=Na;exports.isFocusable=Nn;exports.isFormDataEmpty=bf;exports.isFragment=to;exports.isLeaf=Va;exports.isValidComponentSize=ao;exports.isValidElementNode=Pl;exports.judgeContents=Vo;exports.loadingConstruct=Wt;exports.loadingSystemType=ef;exports.menuToContentType=Sf;exports.menuToParent=Ko;exports.methodTableToContent=ou;exports.onConditionContents=uo;exports.overRest=Ea;exports.pick=Ba;exports.rAF=Ma;exports.resetPassword=Ct;exports.sameKeys=No;exports.scrollIntoView=Ms;exports.selectToBase=Of;exports.setToArray=wa;exports.setToString=Sa;exports.submitTableAsyncByVerify=Hn;exports.tableEveryContents=bu;exports.tableToContents=pu;exports.tableToForm=so;exports.tableToStruct=hu;exports.triggerEvent=zs;exports.tryFocus=Qe;exports.useAriaProps=Oa;exports.useAttrs=Fa;exports.useAuthorityState=xr;exports.useComposition=$a;exports.useDeprecated=Ya;exports.useDraggable=ro;exports.useFocusController=Ha;exports.useFormDisabled=Qt;exports.useFormItem=Dr;exports.useFormItemInputId=Ka;exports.useFormSize=kr;exports.useId=kn;exports.useIdInjection=La;exports.useLockscreen=io;exports.useMenuState=en;exports.useModelComp=Pt;exports.useOriginalState=tn;exports.useSameTarget=Ir;exports.useTableComp=Pn;exports.viewChildDict=tu;exports.viewMainDict=eu;
|