@pubinfo/core 2.1.11 → 2.1.13-beta.1
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/AppSetting-BBCop_0D.js +107 -0
- package/dist/{HButton-Dt6qGhhR.js → HButton-pEqyd918.js} +13 -11
- package/dist/HCheckList-cef4jGrw.js +35 -0
- package/dist/HDivider-BSj2DiEY.js +13 -0
- package/dist/HInput-DfpH43DV.js +36 -0
- package/dist/HSlideover-B6gEDfA5.js +3223 -0
- package/dist/HToggle-BTft_PNT.js +32 -0
- package/dist/HTooltip-B8aoK5uN.js +19 -0
- package/dist/PreferencesContent-CuNffqV_.js +703 -0
- package/dist/SettingBreadcrumb-CMn0gojs.js +47 -0
- package/dist/SettingCopyright-DKwdXYr3.js +47 -0
- package/dist/SettingEnableTransition-Bn37z29E.js +70 -0
- package/dist/SettingHome-HttuaN-N.js +33 -0
- package/dist/SettingMenu-CEvBV2Wj.js +113 -0
- package/dist/SettingMode-DpAUEZUv.js +62 -0
- package/dist/SettingNavSearch-Cem0LL54.js +33 -0
- package/dist/SettingOther-DcrlPnMd.js +50 -0
- package/dist/SettingPage-UhL5e6_m.js +24 -0
- package/dist/SettingTabbar-Ct3S8jS2.js +144 -0
- package/dist/SettingThemes-DaRKZ2Q3.js +123 -0
- package/dist/SettingToolbar-Cx_Mz_EP.js +52 -0
- package/dist/SettingTopbar-Ckg-OGSj.js +51 -0
- package/dist/SettingWidthMode-CZ2i-kzC.js +58 -0
- package/dist/_plugin-vue_export-helper-CsLplWgU.js +8 -0
- package/dist/auth-BVTDpkDr.js +4635 -0
- package/dist/{change-organization-hsqeSzDu.js → change-organization-EdR25ifs.js} +51 -48
- package/dist/{change-password-EtccCDRX.js → change-password-D-ZqBAmY.js} +85 -81
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{components-DFNyaAb9.js → components-CKVAXENc.js} +681 -674
- package/dist/{core-DJIGzMMM.js → core-Dg8YES9i.js} +1003 -938
- package/dist/dist-HLiWAOC7.js +472 -0
- package/dist/{engine-oniguruma-CaNXwGSv.js → engine-oniguruma-DCGL4yXX.js} +58 -56
- package/dist/form-CGzMvzKZ.js +2968 -0
- package/dist/index.js +4989 -4877
- package/dist/json-BFBcpML_.js +3 -0
- package/dist/{modal-Bl5xHbxa.js → modal-ybprgEqf.js} +12543 -9070
- package/dist/not-found-CuHR6H_g.js +44 -0
- package/dist/not-permission-BcQAkzxI.js +41 -0
- package/dist/profile-Bsc6FIbI.js +19533 -0
- package/dist/{question-line-BG__Ycfv.js → question-line-BzrfPWnG.js} +9 -7
- package/dist/reload-BClJy4MY.js +15 -0
- package/dist/{right-BxBlFUwj.js → right-CCqcGubr.js} +15 -13
- package/dist/{tree-select-B8cTcGLa.js → tree-select-gPCwtMia.js} +2906 -2659
- package/dist/useContext-Dlqfap_7.js +11 -0
- package/dist/vitesse-dark-DrB9-RFK.js +4 -0
- package/dist/vitesse-light-CmcnEl2T.js +4 -0
- package/dist/wasm-C92aTsEJ.js +4 -0
- package/dist/watchDiff-DJP3s9bb.js +883 -0
- package/package.json +8 -8
- package/dist/AppSetting-7jlhUzze.js +0 -105
- package/dist/HCheckList-cPBgATmv.js +0 -33
- package/dist/HDivider-BwvBr5OE.js +0 -11
- package/dist/HInput-KJ5nFBpF.js +0 -34
- package/dist/HSlideover-DVQDc9q6.js +0 -3151
- package/dist/HToggle-Ce_2-yhZ.js +0 -30
- package/dist/HTooltip-DjAU-Evn.js +0 -16
- package/dist/PreferencesContent-BAIH81yS.js +0 -701
- package/dist/SettingBreadcrumb-O9-PhAFT.js +0 -45
- package/dist/SettingCopyright-DIKsWTuf.js +0 -45
- package/dist/SettingEnableTransition-61O7W00b.js +0 -68
- package/dist/SettingHome-Sv65TPH8.js +0 -31
- package/dist/SettingMenu-BvwJOUZV.js +0 -111
- package/dist/SettingMode-B8H_eQc8.js +0 -60
- package/dist/SettingNavSearch-BHsmYBA7.js +0 -31
- package/dist/SettingOther-CyyNnaDX.js +0 -48
- package/dist/SettingPage-B82lW41P.js +0 -22
- package/dist/SettingTabbar-Bky2xvH-.js +0 -142
- package/dist/SettingThemes-CkdzS1xt.js +0 -121
- package/dist/SettingToolbar-CD4qns1J.js +0 -50
- package/dist/SettingTopbar-1shjoe3s.js +0 -49
- package/dist/SettingWidthMode-DlG6lXjA.js +0 -56
- package/dist/_plugin-vue_export-helper-sUTDUeGO.js +0 -6
- package/dist/auth-BLGKOyc5.js +0 -4432
- package/dist/chunk-CD4vhpVs.js +0 -18
- package/dist/dist-7OjQvlya.js +0 -468
- package/dist/form-C3VHofnN.js +0 -2768
- package/dist/json-Bu_Zprin.js +0 -2
- package/dist/not-found-BCjngLzt.js +0 -42
- package/dist/not-permission-C26vTMvf.js +0 -39
- package/dist/profile-BVXIFuBG.js +0 -19269
- package/dist/reload-DHx5Vwus.js +0 -12
- package/dist/useContext-DLtu9F7E.js +0 -9
- package/dist/vitesse-dark-CTe40QT_.js +0 -2
- package/dist/vitesse-light-BWXC_WeB.js +0 -2
- package/dist/wasm-2zDVqo-C.js +0 -2
- package/dist/watchDiff-CPZFtaOC.js +0 -655
|
@@ -0,0 +1,4635 @@
|
|
|
1
|
+
import { r as e, t } from "./chunk-BdsCSvBP.js";
|
|
2
|
+
import { Fr as n, Gn as r, Gr as i, Hr as a, Kr as o, Pr as s, Qr as c, Wr as l, Zr as u, qr as d, t as f } from "./modal-ybprgEqf.js";
|
|
3
|
+
import { A as p, B as m, C as h, D as g, E as _, F as v, H as y, I as b, L as x, M as S, N as C, O as w, P as ee, R as T, S as te, T as E, U as D, V as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, j as fe, k as pe, l as me, m as he, n as ge, o as _e, p as ve, r as ye, s as O, t as be, u as xe, v as Se, w as Ce, x as we, y as Te, z as Ee } from "./watchDiff-DJP3s9bb.js";
|
|
4
|
+
import { f as De, s as Oe, t as ke } from "./dist-HLiWAOC7.js";
|
|
5
|
+
import { defineStore as k, getActivePinia as Ae } from "pinia";
|
|
6
|
+
import { computed as A, createVNode as je, reactive as Me, ref as j, toRaw as Ne, watch as Pe } from "vue";
|
|
7
|
+
import { useRoute as Fe } from "vue-router";
|
|
8
|
+
import Ie from "vue-m-message";
|
|
9
|
+
//#region src/features/context/index.ts
|
|
10
|
+
var Le = u("ctx", { stateKey: "state" });
|
|
11
|
+
function Re(e) {
|
|
12
|
+
Le.set(e), Le.use();
|
|
13
|
+
}
|
|
14
|
+
function ze() {
|
|
15
|
+
return Le.use();
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/features/stores/enum.ts
|
|
19
|
+
var M = /* @__PURE__ */ function(e) {
|
|
20
|
+
return e.FAVORITES = "favorites", e.IFRAME = "iframe", e.KEEP_ALIVE = "keepAlive", e.MENU = "menu", e.NOTIFICATION = "notification", e.ROUTE = "route", e.SETTINGS = "settings", e.TABBAR = "tabbar", e.USER = "user", e;
|
|
21
|
+
}({}), Be = k(M.FAVORITES, () => {
|
|
22
|
+
let e = j([]);
|
|
23
|
+
function t(e) {
|
|
24
|
+
let t = !0;
|
|
25
|
+
return e.children?.every((e) => e.meta?.sidebar === !1) && (t = !1), t;
|
|
26
|
+
}
|
|
27
|
+
function n(e, r) {
|
|
28
|
+
let i = [];
|
|
29
|
+
for (let a of e) a.meta?.sidebar !== !1 && (a.children && t(a) ? i.push(...n(a.children, R(r, a.path))) : i.push(a.redirect ?? R(r, a.path)));
|
|
30
|
+
return i;
|
|
31
|
+
}
|
|
32
|
+
function r(e = []) {
|
|
33
|
+
let t = [];
|
|
34
|
+
return e.forEach((e) => {
|
|
35
|
+
if (e.children) {
|
|
36
|
+
let r = n(e.children);
|
|
37
|
+
t.push(...r);
|
|
38
|
+
}
|
|
39
|
+
}), t;
|
|
40
|
+
}
|
|
41
|
+
function i(e, t = []) {
|
|
42
|
+
return r(t).includes(e);
|
|
43
|
+
}
|
|
44
|
+
function a(t) {
|
|
45
|
+
return e.value.some((e) => e.fullPath === t);
|
|
46
|
+
}
|
|
47
|
+
function o(t) {
|
|
48
|
+
let n = t.matched.at(-1)?.meta;
|
|
49
|
+
e.value.find((e) => e.fullPath === t.fullPath) || e.value.push({
|
|
50
|
+
fullPath: t.fullPath,
|
|
51
|
+
title: n?.title,
|
|
52
|
+
icon: n?.icon ?? n?.breadcrumbNeste?.findLast((e) => e.icon)?.icon
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function s(t) {
|
|
56
|
+
e.value = e.value.filter((e) => e.fullPath !== t);
|
|
57
|
+
}
|
|
58
|
+
function c(t, n) {
|
|
59
|
+
e.value.splice(t, 0, e.value.splice(n, 1)[0]);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
list: e,
|
|
63
|
+
canAdd: i,
|
|
64
|
+
isAdd: a,
|
|
65
|
+
add: o,
|
|
66
|
+
remove: s,
|
|
67
|
+
sort: c
|
|
68
|
+
};
|
|
69
|
+
}), Ve = /\s/;
|
|
70
|
+
function He(e) {
|
|
71
|
+
for (var t = e.length; t-- && Ve.test(e.charAt(t)););
|
|
72
|
+
return t;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js
|
|
76
|
+
var Ue = /^\s+/;
|
|
77
|
+
function We(e) {
|
|
78
|
+
return e && e.slice(0, He(e) + 1).replace(Ue, "");
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js
|
|
82
|
+
var Ge = NaN, Ke = /^[-+]0x[0-9a-f]+$/i, qe = /^0b[01]+$/i, Je = /^0o[0-7]+$/i, Ye = parseInt;
|
|
83
|
+
function Xe(e) {
|
|
84
|
+
if (typeof e == "number") return e;
|
|
85
|
+
if (y(e)) return Ge;
|
|
86
|
+
if (i(e)) {
|
|
87
|
+
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
88
|
+
e = i(t) ? t + "" : t;
|
|
89
|
+
}
|
|
90
|
+
if (typeof e != "string") return e === 0 ? e : +e;
|
|
91
|
+
e = We(e);
|
|
92
|
+
var n = qe.test(e);
|
|
93
|
+
return n || Je.test(e) ? Ye(e.slice(2), n ? 2 : 8) : Ke.test(e) ? Ge : +e;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js
|
|
97
|
+
var Ze = Infinity, Qe = 17976931348623157e292;
|
|
98
|
+
function $e(e) {
|
|
99
|
+
return e ? (e = Xe(e), e === Ze || e === -Ze ? (e < 0 ? -1 : 1) * Qe : e === e ? e : 0) : e === 0 ? e : 0;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js
|
|
103
|
+
function et(e) {
|
|
104
|
+
var t = $e(e), n = t % 1;
|
|
105
|
+
return t === t ? n ? t - n : t : 0;
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFindIndex.js
|
|
109
|
+
function tt(e, t, n, r) {
|
|
110
|
+
for (var i = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < i;) if (t(e[a], a, e)) return a;
|
|
111
|
+
return -1;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js
|
|
115
|
+
function nt(e, t) {
|
|
116
|
+
return b(fe(e, t, Ee), e + "");
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js
|
|
120
|
+
function rt(e, t, n) {
|
|
121
|
+
if (!i(n)) return !1;
|
|
122
|
+
var r = typeof t;
|
|
123
|
+
return (r == "number" ? p(n) && v(t, n.length) : r == "string" && t in n) ? C(n[t], e) : !1;
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js
|
|
127
|
+
function it(e) {
|
|
128
|
+
return nt(function(t, n) {
|
|
129
|
+
var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
|
|
130
|
+
for (a = e.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && rt(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), t = Object(t); ++r < i;) {
|
|
131
|
+
var s = n[r];
|
|
132
|
+
s && e(t, s, r, a);
|
|
133
|
+
}
|
|
134
|
+
return t;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/assignInWith.js
|
|
139
|
+
var at = it(function(e, t, n, r) {
|
|
140
|
+
S(t, E(t), e, r);
|
|
141
|
+
});
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/get.js
|
|
144
|
+
function N(e, t, n) {
|
|
145
|
+
var r = e == null ? void 0 : Te(e, t);
|
|
146
|
+
return r === void 0 ? n : r;
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js
|
|
150
|
+
var ot = "[object Object]", st = Function.prototype, ct = Object.prototype, lt = st.toString, ut = ct.hasOwnProperty, dt = lt.call(Object);
|
|
151
|
+
function ft(e) {
|
|
152
|
+
if (!D(e) || o(e) != ot) return !1;
|
|
153
|
+
var t = re(e);
|
|
154
|
+
if (t === null) return !0;
|
|
155
|
+
var n = ut.call(t, "constructor") && t.constructor;
|
|
156
|
+
return typeof n == "function" && n instanceof n && lt.call(n) == dt;
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isError.js
|
|
160
|
+
var pt = "[object DOMException]", mt = "[object Error]";
|
|
161
|
+
function ht(e) {
|
|
162
|
+
if (!D(e)) return !1;
|
|
163
|
+
var t = o(e);
|
|
164
|
+
return t == mt || t == pt || typeof e.message == "string" && typeof e.name == "string" && !ft(e);
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/attempt.js
|
|
168
|
+
var gt = nt(function(e, t) {
|
|
169
|
+
try {
|
|
170
|
+
return T(e, void 0, t);
|
|
171
|
+
} catch (e) {
|
|
172
|
+
return ht(e) ? e : Error(e);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.js
|
|
177
|
+
function _t(e, t, n) {
|
|
178
|
+
var r = -1, i = e.length;
|
|
179
|
+
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
180
|
+
for (var a = Array(i); ++r < i;) a[r] = e[r + t];
|
|
181
|
+
return a;
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayReduce.js
|
|
185
|
+
function vt(e, t, n, r) {
|
|
186
|
+
var i = -1, a = e == null ? 0 : e.length;
|
|
187
|
+
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
188
|
+
return n;
|
|
189
|
+
}
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyOf.js
|
|
192
|
+
function yt(e) {
|
|
193
|
+
return function(t) {
|
|
194
|
+
return e?.[t];
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js
|
|
199
|
+
var bt = "__lodash_hash_undefined__";
|
|
200
|
+
function xt(e) {
|
|
201
|
+
return this.__data__.set(e, bt), this;
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js
|
|
205
|
+
function St(e) {
|
|
206
|
+
return this.__data__.has(e);
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js
|
|
210
|
+
function Ct(e) {
|
|
211
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
212
|
+
for (this.__data__ = new h(); ++t < n;) this.add(e[t]);
|
|
213
|
+
}
|
|
214
|
+
Ct.prototype.add = Ct.prototype.push = xt, Ct.prototype.has = St;
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js
|
|
217
|
+
function wt(e, t) {
|
|
218
|
+
for (var n = -1, r = e == null ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0;
|
|
219
|
+
return !1;
|
|
220
|
+
}
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js
|
|
223
|
+
function Tt(e, t) {
|
|
224
|
+
return e.has(t);
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js
|
|
228
|
+
var Et = 1, Dt = 2;
|
|
229
|
+
function Ot(e, t, n, r, i, a) {
|
|
230
|
+
var o = n & Et, s = e.length, c = t.length;
|
|
231
|
+
if (s != c && !(o && c > s)) return !1;
|
|
232
|
+
var l = a.get(e), u = a.get(t);
|
|
233
|
+
if (l && u) return l == t && u == e;
|
|
234
|
+
var d = -1, f = !0, p = n & Dt ? new Ct() : void 0;
|
|
235
|
+
for (a.set(e, t), a.set(t, e); ++d < s;) {
|
|
236
|
+
var m = e[d], h = t[d];
|
|
237
|
+
if (r) var g = o ? r(h, m, d, t, e, a) : r(m, h, d, e, t, a);
|
|
238
|
+
if (g !== void 0) {
|
|
239
|
+
if (g) continue;
|
|
240
|
+
f = !1;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
if (p) {
|
|
244
|
+
if (!wt(t, function(e, t) {
|
|
245
|
+
if (!Tt(p, t) && (m === e || i(m, e, n, r, a))) return p.push(t);
|
|
246
|
+
})) {
|
|
247
|
+
f = !1;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
} else if (!(m === h || i(m, h, n, r, a))) {
|
|
251
|
+
f = !1;
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return a.delete(e), a.delete(t), f;
|
|
256
|
+
}
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js
|
|
259
|
+
function kt(e) {
|
|
260
|
+
var t = -1, n = Array(e.size);
|
|
261
|
+
return e.forEach(function(e, r) {
|
|
262
|
+
n[++t] = [r, e];
|
|
263
|
+
}), n;
|
|
264
|
+
}
|
|
265
|
+
//#endregion
|
|
266
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js
|
|
267
|
+
function At(e) {
|
|
268
|
+
var t = -1, n = Array(e.size);
|
|
269
|
+
return e.forEach(function(e) {
|
|
270
|
+
n[++t] = e;
|
|
271
|
+
}), n;
|
|
272
|
+
}
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js
|
|
275
|
+
var jt = 1, Mt = 2, Nt = "[object Boolean]", Pt = "[object Date]", Ft = "[object Error]", It = "[object Map]", Lt = "[object Number]", Rt = "[object RegExp]", zt = "[object Set]", Bt = "[object String]", Vt = "[object Symbol]", Ht = "[object ArrayBuffer]", Ut = "[object DataView]", Wt = d ? d.prototype : void 0, Gt = Wt ? Wt.valueOf : void 0;
|
|
276
|
+
function Kt(e, t, n, r, i, a, o) {
|
|
277
|
+
switch (n) {
|
|
278
|
+
case Ut:
|
|
279
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
|
|
280
|
+
e = e.buffer, t = t.buffer;
|
|
281
|
+
case Ht: return !(e.byteLength != t.byteLength || !a(new se(e), new se(t)));
|
|
282
|
+
case Nt:
|
|
283
|
+
case Pt:
|
|
284
|
+
case Lt: return C(+e, +t);
|
|
285
|
+
case Ft: return e.name == t.name && e.message == t.message;
|
|
286
|
+
case Rt:
|
|
287
|
+
case Bt: return e == t + "";
|
|
288
|
+
case It: var s = kt;
|
|
289
|
+
case zt:
|
|
290
|
+
var c = r & jt;
|
|
291
|
+
if (s ||= At, e.size != t.size && !c) return !1;
|
|
292
|
+
var l = o.get(e);
|
|
293
|
+
if (l) return l == t;
|
|
294
|
+
r |= Mt, o.set(e, t);
|
|
295
|
+
var u = Ot(s(e), s(t), r, i, a, o);
|
|
296
|
+
return o.delete(e), u;
|
|
297
|
+
case Vt: if (Gt) return Gt.call(e) == Gt.call(t);
|
|
298
|
+
}
|
|
299
|
+
return !1;
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js
|
|
303
|
+
var qt = 1, Jt = Object.prototype.hasOwnProperty;
|
|
304
|
+
function Yt(e, t, n, r, i, a) {
|
|
305
|
+
var o = n & qt, s = he(e), c = s.length;
|
|
306
|
+
if (c != he(t).length && !o) return !1;
|
|
307
|
+
for (var l = c; l--;) {
|
|
308
|
+
var u = s[l];
|
|
309
|
+
if (!(o ? u in t : Jt.call(t, u))) return !1;
|
|
310
|
+
}
|
|
311
|
+
var d = a.get(e), f = a.get(t);
|
|
312
|
+
if (d && f) return d == t && f == e;
|
|
313
|
+
var p = !0;
|
|
314
|
+
a.set(e, t), a.set(t, e);
|
|
315
|
+
for (var m = o; ++l < c;) {
|
|
316
|
+
u = s[l];
|
|
317
|
+
var h = e[u], g = t[u];
|
|
318
|
+
if (r) var _ = o ? r(g, h, u, t, e, a) : r(h, g, u, e, t, a);
|
|
319
|
+
if (!(_ === void 0 ? h === g || i(h, g, n, r, a) : _)) {
|
|
320
|
+
p = !1;
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
m ||= u == "constructor";
|
|
324
|
+
}
|
|
325
|
+
if (p && !m) {
|
|
326
|
+
var v = e.constructor, y = t.constructor;
|
|
327
|
+
v != y && "constructor" in e && "constructor" in t && !(typeof v == "function" && v instanceof v && typeof y == "function" && y instanceof y) && (p = !1);
|
|
328
|
+
}
|
|
329
|
+
return a.delete(e), a.delete(t), p;
|
|
330
|
+
}
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js
|
|
333
|
+
var Xt = 1, Zt = "[object Arguments]", Qt = "[object Array]", $t = "[object Object]", en = Object.prototype.hasOwnProperty;
|
|
334
|
+
function tn(e, t, n, r, i, a) {
|
|
335
|
+
var o = m(e), s = m(t), c = o ? Qt : ce(e), l = s ? Qt : ce(t);
|
|
336
|
+
c = c == Zt ? $t : c, l = l == Zt ? $t : l;
|
|
337
|
+
var u = c == $t, d = l == $t, f = c == l;
|
|
338
|
+
if (f && w(e)) {
|
|
339
|
+
if (!w(t)) return !1;
|
|
340
|
+
o = !0, u = !1;
|
|
341
|
+
}
|
|
342
|
+
if (f && !u) return a ||= new le(), o || g(e) ? Ot(e, t, n, r, i, a) : Kt(e, t, c, n, r, i, a);
|
|
343
|
+
if (!(n & Xt)) {
|
|
344
|
+
var p = u && en.call(e, "__wrapped__"), h = d && en.call(t, "__wrapped__");
|
|
345
|
+
if (p || h) {
|
|
346
|
+
var _ = p ? e.value() : e, v = h ? t.value() : t;
|
|
347
|
+
return a ||= new le(), i(_, v, n, r, a);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return f ? (a ||= new le(), Yt(e, t, n, r, i, a)) : !1;
|
|
351
|
+
}
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js
|
|
354
|
+
function nn(e, t, n, r, i) {
|
|
355
|
+
return e === t ? !0 : e == null || t == null || !D(e) && !D(t) ? e !== e && t !== t : tn(e, t, n, r, nn, i);
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js
|
|
359
|
+
var rn = 1, an = 2;
|
|
360
|
+
function on(e, t, n, r) {
|
|
361
|
+
var i = n.length, a = i, o = !r;
|
|
362
|
+
if (e == null) return !a;
|
|
363
|
+
for (e = Object(e); i--;) {
|
|
364
|
+
var s = n[i];
|
|
365
|
+
if (o && s[2] ? s[1] !== e[s[0]] : !(s[0] in e)) return !1;
|
|
366
|
+
}
|
|
367
|
+
for (; ++i < a;) {
|
|
368
|
+
s = n[i];
|
|
369
|
+
var c = s[0], l = e[c], u = s[1];
|
|
370
|
+
if (o && s[2]) {
|
|
371
|
+
if (l === void 0 && !(c in e)) return !1;
|
|
372
|
+
} else {
|
|
373
|
+
var d = new le();
|
|
374
|
+
if (r) var f = r(l, u, c, e, t, d);
|
|
375
|
+
if (!(f === void 0 ? nn(u, l, rn | an, r, d) : f)) return !1;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return !0;
|
|
379
|
+
}
|
|
380
|
+
//#endregion
|
|
381
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js
|
|
382
|
+
function sn(e) {
|
|
383
|
+
return e === e && !i(e);
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js
|
|
387
|
+
function cn(e) {
|
|
388
|
+
for (var t = _(e), n = t.length; n--;) {
|
|
389
|
+
var r = t[n], i = e[r];
|
|
390
|
+
t[n] = [
|
|
391
|
+
r,
|
|
392
|
+
i,
|
|
393
|
+
sn(i)
|
|
394
|
+
];
|
|
395
|
+
}
|
|
396
|
+
return t;
|
|
397
|
+
}
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js
|
|
400
|
+
function ln(e, t) {
|
|
401
|
+
return function(n) {
|
|
402
|
+
return n == null ? !1 : n[e] === t && (t !== void 0 || e in Object(n));
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js
|
|
407
|
+
function un(e) {
|
|
408
|
+
var t = cn(e);
|
|
409
|
+
return t.length == 1 && t[0][2] ? ln(t[0][0], t[0][1]) : function(n) {
|
|
410
|
+
return n === e || on(n, e, t);
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js
|
|
415
|
+
var dn = 1, fn = 2;
|
|
416
|
+
function pn(e, t) {
|
|
417
|
+
return Ce(e) && sn(t) ? ln(ae(e), t) : function(n) {
|
|
418
|
+
var r = N(n, e);
|
|
419
|
+
return r === void 0 && r === t ? ie(n, e) : nn(t, r, dn | fn);
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js
|
|
424
|
+
function mn(e) {
|
|
425
|
+
return function(t) {
|
|
426
|
+
return t?.[e];
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js
|
|
431
|
+
function hn(e) {
|
|
432
|
+
return function(t) {
|
|
433
|
+
return Te(t, e);
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/property.js
|
|
438
|
+
function gn(e) {
|
|
439
|
+
return Ce(e) ? mn(ae(e)) : hn(e);
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js
|
|
443
|
+
function _n(e) {
|
|
444
|
+
return typeof e == "function" ? e : e == null ? Ee : typeof e == "object" ? m(e) ? pn(e[0], e[1]) : un(e) : gn(e);
|
|
445
|
+
}
|
|
446
|
+
//#endregion
|
|
447
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js
|
|
448
|
+
function vn(e) {
|
|
449
|
+
return function(t, n, r) {
|
|
450
|
+
for (var i = -1, a = Object(t), o = r(t), s = o.length; s--;) {
|
|
451
|
+
var c = o[e ? s : ++i];
|
|
452
|
+
if (n(a[c], c, a) === !1) break;
|
|
453
|
+
}
|
|
454
|
+
return t;
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js
|
|
459
|
+
var yn = vn();
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseForOwn.js
|
|
462
|
+
function bn(e, t) {
|
|
463
|
+
return e && yn(e, t, _);
|
|
464
|
+
}
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createBaseEach.js
|
|
467
|
+
function xn(e, t) {
|
|
468
|
+
return function(n, r) {
|
|
469
|
+
if (n == null) return n;
|
|
470
|
+
if (!p(n)) return e(n, r);
|
|
471
|
+
for (var i = n.length, a = t ? i : -1, o = Object(n); (t ? a-- : ++a < i) && r(o[a], a, o) !== !1;);
|
|
472
|
+
return n;
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
//#endregion
|
|
476
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseEach.js
|
|
477
|
+
var Sn = xn(bn);
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/defaultTo.js
|
|
480
|
+
function Cn(e, t) {
|
|
481
|
+
return e == null || e !== e ? t : e;
|
|
482
|
+
}
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js
|
|
485
|
+
function wn(e, t, n) {
|
|
486
|
+
(n !== void 0 && !C(e[t], n) || n === void 0 && !(t in e)) && ee(e, t, n);
|
|
487
|
+
}
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js
|
|
490
|
+
function Tn(e) {
|
|
491
|
+
return D(e) && p(e);
|
|
492
|
+
}
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js
|
|
495
|
+
function En(e, t) {
|
|
496
|
+
if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__") return e[t];
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js
|
|
500
|
+
function Dn(e) {
|
|
501
|
+
return S(e, E(e));
|
|
502
|
+
}
|
|
503
|
+
//#endregion
|
|
504
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js
|
|
505
|
+
function On(e, t, n, r, a, o, s) {
|
|
506
|
+
var c = En(e, n), u = En(t, n), d = s.get(u);
|
|
507
|
+
if (d) {
|
|
508
|
+
wn(e, n, d);
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
var f = o ? o(c, u, n + "", e, t, s) : void 0, p = f === void 0;
|
|
512
|
+
if (p) {
|
|
513
|
+
var h = m(u), _ = !h && w(u), v = !h && !_ && g(u);
|
|
514
|
+
f = u, h || _ || v ? m(c) ? f = c : Tn(c) ? f = x(c) : _ ? (p = !1, f = ue(u, !0)) : v ? (p = !1, f = xe(u, !0)) : f = [] : ft(u) || pe(u) ? (f = c, pe(c) ? f = Dn(c) : (!i(c) || l(c)) && (f = me(u))) : p = !1;
|
|
515
|
+
}
|
|
516
|
+
p && (s.set(u, f), a(f, u, r, o, s), s.delete(u)), wn(e, n, f);
|
|
517
|
+
}
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js
|
|
520
|
+
function kn(e, t, n, r, a) {
|
|
521
|
+
e !== t && yn(t, function(o, s) {
|
|
522
|
+
if (a ||= new le(), i(o)) On(e, t, s, n, kn, r, a);
|
|
523
|
+
else {
|
|
524
|
+
var c = r ? r(En(e, s), o, s + "", e, t, a) : void 0;
|
|
525
|
+
c === void 0 && (c = o), wn(e, s, c);
|
|
526
|
+
}
|
|
527
|
+
}, E);
|
|
528
|
+
}
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customDefaultsMerge.js
|
|
531
|
+
function An(e, t, n, r, a, o) {
|
|
532
|
+
return i(e) && i(t) && (o.set(t, e), kn(e, t, void 0, An, o), o.delete(t)), e;
|
|
533
|
+
}
|
|
534
|
+
//#endregion
|
|
535
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/mergeWith.js
|
|
536
|
+
var jn = it(function(e, t, n, r) {
|
|
537
|
+
kn(e, t, n, r);
|
|
538
|
+
}), Mn = nt(function(e) {
|
|
539
|
+
return e.push(void 0, An), T(jn, void 0, e);
|
|
540
|
+
});
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js
|
|
543
|
+
function Nn(e) {
|
|
544
|
+
var t = e == null ? 0 : e.length;
|
|
545
|
+
return t ? e[t - 1] : void 0;
|
|
546
|
+
}
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_escapeHtmlChar.js
|
|
549
|
+
var Pn = yt({
|
|
550
|
+
"&": "&",
|
|
551
|
+
"<": "<",
|
|
552
|
+
">": ">",
|
|
553
|
+
"\"": """,
|
|
554
|
+
"'": "'"
|
|
555
|
+
}), Fn = /[&<>"']/g, In = RegExp(Fn.source);
|
|
556
|
+
function Ln(e) {
|
|
557
|
+
return e = te(e), e && In.test(e) ? e.replace(Fn, Pn) : e;
|
|
558
|
+
}
|
|
559
|
+
//#endregion
|
|
560
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js
|
|
561
|
+
function Rn(e) {
|
|
562
|
+
return function(t, n, r) {
|
|
563
|
+
var i = Object(t);
|
|
564
|
+
if (!p(t)) {
|
|
565
|
+
var a = _n(n, 3);
|
|
566
|
+
t = _(t), n = function(e) {
|
|
567
|
+
return a(i[e], e, i);
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
var o = e(t, n, r);
|
|
571
|
+
return o > -1 ? i[a ? t[o] : o] : void 0;
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js
|
|
576
|
+
var zn = Math.max;
|
|
577
|
+
function Bn(e, t, n) {
|
|
578
|
+
var r = e == null ? 0 : e.length;
|
|
579
|
+
if (!r) return -1;
|
|
580
|
+
var i = n == null ? 0 : et(n);
|
|
581
|
+
return i < 0 && (i = zn(r + i, 0)), tt(e, _n(t, 3), i);
|
|
582
|
+
}
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/find.js
|
|
585
|
+
var Vn = Rn(Bn), Hn = Object.prototype.hasOwnProperty;
|
|
586
|
+
function Un(e, t) {
|
|
587
|
+
return e != null && Hn.call(e, t);
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/has.js
|
|
591
|
+
function Wn(e, t) {
|
|
592
|
+
return e != null && _e(e, t, Un);
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isString.js
|
|
596
|
+
var Gn = "[object String]";
|
|
597
|
+
function Kn(e) {
|
|
598
|
+
return typeof e == "string" || !m(e) && D(e) && o(e) == Gn;
|
|
599
|
+
}
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseValues.js
|
|
602
|
+
function qn(e, t) {
|
|
603
|
+
return ne(t, function(t) {
|
|
604
|
+
return e[t];
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.js
|
|
609
|
+
function Jn(e, t) {
|
|
610
|
+
return t.length < 2 ? e : Te(e, _t(t, 0, -1));
|
|
611
|
+
}
|
|
612
|
+
//#endregion
|
|
613
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isNumber.js
|
|
614
|
+
var Yn = "[object Number]";
|
|
615
|
+
function Xn(e) {
|
|
616
|
+
return typeof e == "number" || D(e) && o(e) == Yn;
|
|
617
|
+
}
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isUndefined.js
|
|
620
|
+
function Zn(e) {
|
|
621
|
+
return e === void 0;
|
|
622
|
+
}
|
|
623
|
+
//#endregion
|
|
624
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/merge.js
|
|
625
|
+
var Qn = it(function(e, t, n) {
|
|
626
|
+
kn(e, t, n);
|
|
627
|
+
}), $n = "Expected a function";
|
|
628
|
+
function er(e) {
|
|
629
|
+
if (typeof e != "function") throw TypeError($n);
|
|
630
|
+
return function() {
|
|
631
|
+
var t = arguments;
|
|
632
|
+
switch (t.length) {
|
|
633
|
+
case 0: return !e.call(this);
|
|
634
|
+
case 1: return !e.call(this, t[0]);
|
|
635
|
+
case 2: return !e.call(this, t[0], t[1]);
|
|
636
|
+
case 3: return !e.call(this, t[0], t[1], t[2]);
|
|
637
|
+
}
|
|
638
|
+
return !e.apply(this, t);
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.js
|
|
643
|
+
var tr = Object.prototype.hasOwnProperty;
|
|
644
|
+
function nr(e, t) {
|
|
645
|
+
t = we(t, e);
|
|
646
|
+
var n = -1, r = t.length;
|
|
647
|
+
if (!r) return !0;
|
|
648
|
+
for (var i = e == null || typeof e != "object" && typeof e != "function"; ++n < r;) {
|
|
649
|
+
var a = t[n];
|
|
650
|
+
if (typeof a == "string") {
|
|
651
|
+
if (a === "__proto__" && !tr.call(e, "__proto__")) return !1;
|
|
652
|
+
if (a === "constructor" && n + 1 < r && typeof t[n + 1] == "string" && t[n + 1] === "prototype") {
|
|
653
|
+
if (i && n === 0) continue;
|
|
654
|
+
return !1;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
var o = Jn(e, t);
|
|
659
|
+
return o == null || delete o[ae(Nn(t))];
|
|
660
|
+
}
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.js
|
|
663
|
+
function rr(e) {
|
|
664
|
+
return ft(e) ? void 0 : e;
|
|
665
|
+
}
|
|
666
|
+
//#endregion
|
|
667
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.js
|
|
668
|
+
var ir = 1, ar = 2, or = 4, sr = Se(function(e, t) {
|
|
669
|
+
var n = {};
|
|
670
|
+
if (e == null) return n;
|
|
671
|
+
var r = !1;
|
|
672
|
+
t = ne(t, function(t) {
|
|
673
|
+
return t = we(t, e), r ||= t.length > 1, t;
|
|
674
|
+
}), S(e, ve(e), n), r && (n = oe(n, ir | ar | or, rr));
|
|
675
|
+
for (var i = t.length; i--;) nr(n, t[i]);
|
|
676
|
+
return n;
|
|
677
|
+
});
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/pickBy.js
|
|
680
|
+
function cr(e, t) {
|
|
681
|
+
if (e == null) return {};
|
|
682
|
+
var n = ne(ve(e), function(e) {
|
|
683
|
+
return [e];
|
|
684
|
+
});
|
|
685
|
+
return t = _n(t), ge(e, n, function(e, n) {
|
|
686
|
+
return t(e, n[0]);
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omitBy.js
|
|
691
|
+
function lr(e, t) {
|
|
692
|
+
return cr(e, er(_n(t)));
|
|
693
|
+
}
|
|
694
|
+
//#endregion
|
|
695
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseReduce.js
|
|
696
|
+
function ur(e, t, n, r, i) {
|
|
697
|
+
return i(e, function(e, i, a) {
|
|
698
|
+
n = r ? (r = !1, e) : t(n, e, i, a);
|
|
699
|
+
}), n;
|
|
700
|
+
}
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/reduce.js
|
|
703
|
+
function dr(e, t, n) {
|
|
704
|
+
var r = m(e) ? vt : ur, i = arguments.length < 3;
|
|
705
|
+
return r(e, _n(t, 4), n, i, Sn);
|
|
706
|
+
}
|
|
707
|
+
//#endregion
|
|
708
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/set.js
|
|
709
|
+
function fr(e, t, n) {
|
|
710
|
+
return e == null ? e : ye(e, t, n);
|
|
711
|
+
}
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customDefaultsAssignIn.js
|
|
714
|
+
var pr = Object.prototype, mr = pr.hasOwnProperty;
|
|
715
|
+
function hr(e, t, n, r) {
|
|
716
|
+
return e === void 0 || C(e, pr[n]) && !mr.call(r, n) ? t : e;
|
|
717
|
+
}
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_escapeStringChar.js
|
|
720
|
+
var gr = {
|
|
721
|
+
"\\": "\\",
|
|
722
|
+
"'": "'",
|
|
723
|
+
"\n": "n",
|
|
724
|
+
"\r": "r",
|
|
725
|
+
"\u2028": "u2028",
|
|
726
|
+
"\u2029": "u2029"
|
|
727
|
+
};
|
|
728
|
+
function _r(e) {
|
|
729
|
+
return "\\" + gr[e];
|
|
730
|
+
}
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_reInterpolate.js
|
|
733
|
+
var vr = /<%=([\s\S]+?)%>/g, yr = {
|
|
734
|
+
escape: /<%-([\s\S]+?)%>/g,
|
|
735
|
+
evaluate: /<%([\s\S]+?)%>/g,
|
|
736
|
+
interpolate: vr,
|
|
737
|
+
variable: "",
|
|
738
|
+
imports: { _: { escape: Ln } }
|
|
739
|
+
}, br = "Invalid `variable` option passed into `_.template`", xr = /\b__p \+= '';/g, Sr = /\b(__p \+=) '' \+/g, Cr = /(__e\(.*?\)|\b__t\)) \+\n'';/g, wr = /[()=,{}\[\]\/\s]/, Tr = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, Er = /($^)/, Dr = /['\n\r\u2028\u2029\\]/g, Or = Object.prototype.hasOwnProperty;
|
|
740
|
+
function kr(e, t, n) {
|
|
741
|
+
var r = yr.imports._.templateSettings || yr;
|
|
742
|
+
n && rt(e, t, n) && (t = void 0), e = te(e), t = at({}, t, r, hr);
|
|
743
|
+
var i = at({}, t.imports, r.imports, hr), a = _(i), o = qn(i, a), s, c, l = 0, u = t.interpolate || Er, d = "__p += '", f = RegExp((t.escape || Er).source + "|" + u.source + "|" + (u === vr ? Tr : Er).source + "|" + (t.evaluate || Er).source + "|$", "g"), p = Or.call(t, "sourceURL") ? "//# sourceURL=" + (t.sourceURL + "").replace(/\s/g, " ") + "\n" : "";
|
|
744
|
+
e.replace(f, function(t, n, r, i, a, o) {
|
|
745
|
+
return r ||= i, d += e.slice(l, o).replace(Dr, _r), n && (s = !0, d += "' +\n__e(" + n + ") +\n'"), a && (c = !0, d += "';\n" + a + ";\n__p += '"), r && (d += "' +\n((__t = (" + r + ")) == null ? '' : __t) +\n'"), l = o + t.length, t;
|
|
746
|
+
}), d += "';\n";
|
|
747
|
+
var m = Or.call(t, "variable") && t.variable;
|
|
748
|
+
if (!m) d = "with (obj) {\n" + d + "\n}\n";
|
|
749
|
+
else if (wr.test(m)) throw Error(br);
|
|
750
|
+
d = (c ? d.replace(xr, "") : d).replace(Sr, "$1").replace(Cr, "$1;"), d = "function(" + (m || "obj") + ") {\n" + (m ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (s ? ", __e = _.escape" : "") + (c ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + d + "return __p\n}";
|
|
751
|
+
var h = gt(function() {
|
|
752
|
+
return Function(a, p + "return " + d).apply(void 0, o);
|
|
753
|
+
});
|
|
754
|
+
if (h.source = d, ht(h)) throw h;
|
|
755
|
+
return h;
|
|
756
|
+
}
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region src/features/stores/modules/iframe.ts
|
|
759
|
+
var Ar = k(M.IFRAME, () => {
|
|
760
|
+
let e = j(!1), t = j([]), n = j([]), r = A(() => t.value.filter((e) => e.isOpen));
|
|
761
|
+
async function i(n, r) {
|
|
762
|
+
for (let e of n) e.meta.iframe && !e.meta.link && (l(e.meta.iframe) && (e.meta.iframe = await e.meta.iframe(Ne(r))), t.value.push({
|
|
763
|
+
path: e.path,
|
|
764
|
+
src: e.meta.iframe,
|
|
765
|
+
isOpen: !1,
|
|
766
|
+
isLoading: !0
|
|
767
|
+
}));
|
|
768
|
+
e.value = !0;
|
|
769
|
+
}
|
|
770
|
+
function a(e) {
|
|
771
|
+
let n = t.value.findIndex((t) => t.path === e);
|
|
772
|
+
t.value[n].isLoading = !~n;
|
|
773
|
+
}
|
|
774
|
+
function o(e) {
|
|
775
|
+
let r = t.value.find((t) => t.path === e);
|
|
776
|
+
if (r) {
|
|
777
|
+
r.isOpen = !0;
|
|
778
|
+
let t = n.value.findIndex((t) => t === e);
|
|
779
|
+
~t ? (n.value.splice(0, 0, n.value[t]), n.value.splice(t)) : n.value.unshift(e);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
function s(e, r = !1) {
|
|
783
|
+
function i(e) {
|
|
784
|
+
let i = t.value.findIndex((t) => t.path === e);
|
|
785
|
+
~i && r && (t.value[i].isOpen = !1, t.value[i].isLoading = !0), n.value = n.value.filter((t) => t !== e);
|
|
786
|
+
}
|
|
787
|
+
Kn(e) ? i(e) : e.forEach(i);
|
|
788
|
+
}
|
|
789
|
+
function c() {
|
|
790
|
+
t.value = [], e.value = !1;
|
|
791
|
+
}
|
|
792
|
+
return {
|
|
793
|
+
isGenerate: e,
|
|
794
|
+
openedList: r,
|
|
795
|
+
generateList: i,
|
|
796
|
+
closeLoading: a,
|
|
797
|
+
open: o,
|
|
798
|
+
close: s,
|
|
799
|
+
clean: c,
|
|
800
|
+
recentPathList: n,
|
|
801
|
+
list: t
|
|
802
|
+
};
|
|
803
|
+
});
|
|
804
|
+
//#endregion
|
|
805
|
+
//#region src/features/composables/auth.ts
|
|
806
|
+
function jr() {
|
|
807
|
+
function e(e) {
|
|
808
|
+
let t = qi(), n = Yi();
|
|
809
|
+
return t.settings.app.enablePermission ? n.user.permissions.includes(e) : !0;
|
|
810
|
+
}
|
|
811
|
+
function t(t) {
|
|
812
|
+
let n;
|
|
813
|
+
return n = typeof t == "string" ? t === "" ? !0 : e(t) : t.length > 0 ? t.some((t) => e(t)) : !0, n;
|
|
814
|
+
}
|
|
815
|
+
function n(t) {
|
|
816
|
+
return t.length > 0 ? t.every((t) => e(t)) : !0;
|
|
817
|
+
}
|
|
818
|
+
return {
|
|
819
|
+
auth: t,
|
|
820
|
+
authAll: n
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
//#endregion
|
|
824
|
+
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
|
|
825
|
+
var P = {
|
|
826
|
+
silent: -Infinity,
|
|
827
|
+
fatal: 0,
|
|
828
|
+
error: 0,
|
|
829
|
+
warn: 1,
|
|
830
|
+
log: 2,
|
|
831
|
+
info: 3,
|
|
832
|
+
success: 3,
|
|
833
|
+
fail: 3,
|
|
834
|
+
ready: 3,
|
|
835
|
+
start: 3,
|
|
836
|
+
box: 3,
|
|
837
|
+
debug: 4,
|
|
838
|
+
trace: 5,
|
|
839
|
+
verbose: Infinity
|
|
840
|
+
}, Mr = {
|
|
841
|
+
silent: { level: -1 },
|
|
842
|
+
fatal: { level: P.fatal },
|
|
843
|
+
error: { level: P.error },
|
|
844
|
+
warn: { level: P.warn },
|
|
845
|
+
log: { level: P.log },
|
|
846
|
+
info: { level: P.info },
|
|
847
|
+
success: { level: P.success },
|
|
848
|
+
fail: { level: P.fail },
|
|
849
|
+
ready: { level: P.info },
|
|
850
|
+
start: { level: P.info },
|
|
851
|
+
box: { level: P.info },
|
|
852
|
+
debug: { level: P.debug },
|
|
853
|
+
trace: { level: P.trace },
|
|
854
|
+
verbose: { level: P.verbose }
|
|
855
|
+
};
|
|
856
|
+
function Nr(e) {
|
|
857
|
+
if (typeof e != "object" || !e) return !1;
|
|
858
|
+
let t = Object.getPrototypeOf(e);
|
|
859
|
+
return t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Symbol.iterator in e ? !1 : Symbol.toStringTag in e ? Object.prototype.toString.call(e) === "[object Module]" : !0;
|
|
860
|
+
}
|
|
861
|
+
function Pr(e, t, n = ".", r) {
|
|
862
|
+
if (!Nr(t)) return Pr(e, {}, n, r);
|
|
863
|
+
let i = Object.assign({}, t);
|
|
864
|
+
for (let t in e) {
|
|
865
|
+
if (t === "__proto__" || t === "constructor") continue;
|
|
866
|
+
let a = e[t];
|
|
867
|
+
a != null && (r && r(i, t, a, n) || (Array.isArray(a) && Array.isArray(i[t]) ? i[t] = [...a, ...i[t]] : Nr(a) && Nr(i[t]) ? i[t] = Pr(a, i[t], (n ? `${n}.` : "") + t.toString(), r) : i[t] = a));
|
|
868
|
+
}
|
|
869
|
+
return i;
|
|
870
|
+
}
|
|
871
|
+
function Fr(e) {
|
|
872
|
+
return (...t) => t.reduce((t, n) => Pr(t, n, "", e), {});
|
|
873
|
+
}
|
|
874
|
+
var Ir = Fr();
|
|
875
|
+
function Lr(e) {
|
|
876
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
877
|
+
}
|
|
878
|
+
function Rr(e) {
|
|
879
|
+
return !(!Lr(e) || !e.message && !e.args || e.stack);
|
|
880
|
+
}
|
|
881
|
+
var zr = !1, Br = [], F = class e {
|
|
882
|
+
options;
|
|
883
|
+
_lastLog;
|
|
884
|
+
_mockFn;
|
|
885
|
+
constructor(e = {}) {
|
|
886
|
+
let t = e.types || Mr;
|
|
887
|
+
this.options = Ir({
|
|
888
|
+
...e,
|
|
889
|
+
defaults: { ...e.defaults },
|
|
890
|
+
level: Vr(e.level, t),
|
|
891
|
+
reporters: [...e.reporters || []]
|
|
892
|
+
}, {
|
|
893
|
+
types: Mr,
|
|
894
|
+
throttle: 1e3,
|
|
895
|
+
throttleMin: 5,
|
|
896
|
+
formatOptions: {
|
|
897
|
+
date: !0,
|
|
898
|
+
colors: !1,
|
|
899
|
+
compact: !0
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
for (let e in t) {
|
|
903
|
+
let n = {
|
|
904
|
+
type: e,
|
|
905
|
+
...this.options.defaults,
|
|
906
|
+
...t[e]
|
|
907
|
+
};
|
|
908
|
+
this[e] = this._wrapLogFn(n), this[e].raw = this._wrapLogFn(n, !0);
|
|
909
|
+
}
|
|
910
|
+
this.options.mockFn && this.mockTypes(), this._lastLog = {};
|
|
911
|
+
}
|
|
912
|
+
get level() {
|
|
913
|
+
return this.options.level;
|
|
914
|
+
}
|
|
915
|
+
set level(e) {
|
|
916
|
+
this.options.level = Vr(e, this.options.types, this.options.level);
|
|
917
|
+
}
|
|
918
|
+
prompt(e, t) {
|
|
919
|
+
if (!this.options.prompt) throw Error("prompt is not supported!");
|
|
920
|
+
return this.options.prompt(e, t);
|
|
921
|
+
}
|
|
922
|
+
create(t) {
|
|
923
|
+
let n = new e({
|
|
924
|
+
...this.options,
|
|
925
|
+
...t
|
|
926
|
+
});
|
|
927
|
+
return this._mockFn && n.mockTypes(this._mockFn), n;
|
|
928
|
+
}
|
|
929
|
+
withDefaults(e) {
|
|
930
|
+
return this.create({
|
|
931
|
+
...this.options,
|
|
932
|
+
defaults: {
|
|
933
|
+
...this.options.defaults,
|
|
934
|
+
...e
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
withTag(e) {
|
|
939
|
+
return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + e : e });
|
|
940
|
+
}
|
|
941
|
+
addReporter(e) {
|
|
942
|
+
return this.options.reporters.push(e), this;
|
|
943
|
+
}
|
|
944
|
+
removeReporter(e) {
|
|
945
|
+
if (e) {
|
|
946
|
+
let t = this.options.reporters.indexOf(e);
|
|
947
|
+
if (t !== -1) return this.options.reporters.splice(t, 1);
|
|
948
|
+
} else this.options.reporters.splice(0);
|
|
949
|
+
return this;
|
|
950
|
+
}
|
|
951
|
+
setReporters(e) {
|
|
952
|
+
return this.options.reporters = Array.isArray(e) ? e : [e], this;
|
|
953
|
+
}
|
|
954
|
+
wrapAll() {
|
|
955
|
+
this.wrapConsole(), this.wrapStd();
|
|
956
|
+
}
|
|
957
|
+
restoreAll() {
|
|
958
|
+
this.restoreConsole(), this.restoreStd();
|
|
959
|
+
}
|
|
960
|
+
wrapConsole() {
|
|
961
|
+
for (let e in this.options.types) console["__" + e] || (console["__" + e] = console[e]), console[e] = this[e].raw;
|
|
962
|
+
}
|
|
963
|
+
restoreConsole() {
|
|
964
|
+
for (let e in this.options.types) console["__" + e] && (console[e] = console["__" + e], delete console["__" + e]);
|
|
965
|
+
}
|
|
966
|
+
wrapStd() {
|
|
967
|
+
this._wrapStream(this.options.stdout, "log"), this._wrapStream(this.options.stderr, "log");
|
|
968
|
+
}
|
|
969
|
+
_wrapStream(e, t) {
|
|
970
|
+
e && (e.__write ||= e.write, e.write = (e) => {
|
|
971
|
+
this[t].raw(String(e).trim());
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
restoreStd() {
|
|
975
|
+
this._restoreStream(this.options.stdout), this._restoreStream(this.options.stderr);
|
|
976
|
+
}
|
|
977
|
+
_restoreStream(e) {
|
|
978
|
+
e && e.__write && (e.write = e.__write, delete e.__write);
|
|
979
|
+
}
|
|
980
|
+
pauseLogs() {
|
|
981
|
+
zr = !0;
|
|
982
|
+
}
|
|
983
|
+
resumeLogs() {
|
|
984
|
+
zr = !1;
|
|
985
|
+
let e = Br.splice(0);
|
|
986
|
+
for (let t of e) t[0]._logFn(t[1], t[2]);
|
|
987
|
+
}
|
|
988
|
+
mockTypes(e) {
|
|
989
|
+
let t = e || this.options.mockFn;
|
|
990
|
+
if (this._mockFn = t, typeof t == "function") for (let e in this.options.types) this[e] = t(e, this.options.types[e]) || this[e], this[e].raw = this[e];
|
|
991
|
+
}
|
|
992
|
+
_wrapLogFn(e, t) {
|
|
993
|
+
return (...n) => {
|
|
994
|
+
if (zr) {
|
|
995
|
+
Br.push([
|
|
996
|
+
this,
|
|
997
|
+
e,
|
|
998
|
+
n,
|
|
999
|
+
t
|
|
1000
|
+
]);
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
return this._logFn(e, n, t);
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
_logFn(e, t, n) {
|
|
1007
|
+
if ((e.level || 0) > this.level) return !1;
|
|
1008
|
+
let r = {
|
|
1009
|
+
date: /* @__PURE__ */ new Date(),
|
|
1010
|
+
args: [],
|
|
1011
|
+
...e,
|
|
1012
|
+
level: Vr(e.level, this.options.types)
|
|
1013
|
+
};
|
|
1014
|
+
!n && t.length === 1 && Rr(t[0]) ? Object.assign(r, t[0]) : r.args = [...t], r.message && (r.args.unshift(r.message), delete r.message), r.additional && (Array.isArray(r.additional) || (r.additional = r.additional.split("\n")), r.args.push("\n" + r.additional.join("\n")), delete r.additional), r.type = typeof r.type == "string" ? r.type.toLowerCase() : "log", r.tag = typeof r.tag == "string" ? r.tag : "";
|
|
1015
|
+
let i = (e = !1) => {
|
|
1016
|
+
let t = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
1017
|
+
if (this._lastLog.object && t > 0) {
|
|
1018
|
+
let e = [...this._lastLog.object.args];
|
|
1019
|
+
t > 1 && e.push(`(repeated ${t} times)`), this._log({
|
|
1020
|
+
...this._lastLog.object,
|
|
1021
|
+
args: e
|
|
1022
|
+
}), this._lastLog.count = 1;
|
|
1023
|
+
}
|
|
1024
|
+
e && (this._lastLog.object = r, this._log(r));
|
|
1025
|
+
};
|
|
1026
|
+
clearTimeout(this._lastLog.timeout);
|
|
1027
|
+
let a = this._lastLog.time && r.date ? r.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
1028
|
+
if (this._lastLog.time = r.date, a < this.options.throttle) try {
|
|
1029
|
+
let e = JSON.stringify([
|
|
1030
|
+
r.type,
|
|
1031
|
+
r.tag,
|
|
1032
|
+
r.args
|
|
1033
|
+
]), t = this._lastLog.serialized === e;
|
|
1034
|
+
if (this._lastLog.serialized = e, t && (this._lastLog.count = (this._lastLog.count || 0) + 1, this._lastLog.count > this.options.throttleMin)) {
|
|
1035
|
+
this._lastLog.timeout = setTimeout(i, this.options.throttle);
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
} catch {}
|
|
1039
|
+
i(!0);
|
|
1040
|
+
}
|
|
1041
|
+
_log(e) {
|
|
1042
|
+
for (let t of this.options.reporters) t.log(e, { options: this.options });
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
function Vr(e, t = {}, n = 3) {
|
|
1046
|
+
return e === void 0 ? n : typeof e == "number" ? e : t[e] && t[e].level !== void 0 ? t[e].level : n;
|
|
1047
|
+
}
|
|
1048
|
+
F.prototype.add = F.prototype.addReporter, F.prototype.remove = F.prototype.removeReporter, F.prototype.clear = F.prototype.removeReporter, F.prototype.withScope = F.prototype.withTag, F.prototype.mock = F.prototype.mockTypes, F.prototype.pause = F.prototype.pauseLogs, F.prototype.resume = F.prototype.resumeLogs;
|
|
1049
|
+
function Hr(e = {}) {
|
|
1050
|
+
return new F(e);
|
|
1051
|
+
}
|
|
1052
|
+
//#endregion
|
|
1053
|
+
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/browser.mjs
|
|
1054
|
+
var Ur = class {
|
|
1055
|
+
options;
|
|
1056
|
+
defaultColor;
|
|
1057
|
+
levelColorMap;
|
|
1058
|
+
typeColorMap;
|
|
1059
|
+
constructor(e) {
|
|
1060
|
+
this.options = { ...e }, this.defaultColor = "#7f8c8d", this.levelColorMap = {
|
|
1061
|
+
0: "#c0392b",
|
|
1062
|
+
1: "#f39c12",
|
|
1063
|
+
3: "#00BCD4"
|
|
1064
|
+
}, this.typeColorMap = { success: "#2ecc71" };
|
|
1065
|
+
}
|
|
1066
|
+
_getLogFn(e) {
|
|
1067
|
+
return e < 1 ? console.__error || console.error : e === 1 ? console.__warn || console.warn : console.__log || console.log;
|
|
1068
|
+
}
|
|
1069
|
+
log(e) {
|
|
1070
|
+
let t = this._getLogFn(e.level), n = e.type === "log" ? "" : e.type, r = e.tag || "", i = `
|
|
1071
|
+
background: ${this.typeColorMap[e.type] || this.levelColorMap[e.level] || this.defaultColor};
|
|
1072
|
+
border-radius: 0.5em;
|
|
1073
|
+
color: white;
|
|
1074
|
+
font-weight: bold;
|
|
1075
|
+
padding: 2px 0.5em;
|
|
1076
|
+
`, a = `%c${[r, n].filter(Boolean).join(":")}`;
|
|
1077
|
+
typeof e.args[0] == "string" ? t(`${a}%c ${e.args[0]}`, i, "", ...e.args.slice(1)) : t(a, i, ...e.args);
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
function Wr(e = {}) {
|
|
1081
|
+
return Hr({
|
|
1082
|
+
reporters: e.reporters || [new Ur({})],
|
|
1083
|
+
prompt(e, t = {}) {
|
|
1084
|
+
return t.type === "confirm" ? Promise.resolve(confirm(e)) : Promise.resolve(prompt(e));
|
|
1085
|
+
},
|
|
1086
|
+
...e
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
Wr().withTag("[PUBINFO]");
|
|
1090
|
+
//#endregion
|
|
1091
|
+
//#region src/features/composables/log.ts
|
|
1092
|
+
var Gr = /* @__PURE__ */ function(e) {
|
|
1093
|
+
return e.ERROR = "error", e.SUCCESS = "success", e.WARN = "warn", e.INFO = "info", e.START = "start", e.BOX = "box", e;
|
|
1094
|
+
}(Gr || {}), Kr = /* @__PURE__ */ function(e) {
|
|
1095
|
+
return e.ERROR = "🔴", e.SUCCESS = "🟢", e.WARN = "🟡", e.INFO = "🔵", e.START = "🟩", e.BOX = "🟧", e;
|
|
1096
|
+
}(Kr || {});
|
|
1097
|
+
function qr(e, t) {
|
|
1098
|
+
return (e) => {};
|
|
1099
|
+
}
|
|
1100
|
+
var Jr = qr(Gr.ERROR, Kr.ERROR), Yr = qr(Gr.SUCCESS, Kr.SUCCESS), I = qr(Gr.WARN, Kr.WARN), Xr = qr(Gr.INFO, Kr.INFO), Zr = qr(Gr.START, Kr.START), Qr = qr(Gr.BOX, Kr.BOX), $r = new Set([
|
|
1101
|
+
"user",
|
|
1102
|
+
"settings",
|
|
1103
|
+
"menu",
|
|
1104
|
+
"route",
|
|
1105
|
+
"tabbar",
|
|
1106
|
+
"iframe",
|
|
1107
|
+
"keepAlive",
|
|
1108
|
+
"favorites"
|
|
1109
|
+
]), ei = /* @__PURE__ */ new Set();
|
|
1110
|
+
function ti(e) {
|
|
1111
|
+
ei.has(e) || (ei.add(e), console.warn(`[usePartyLogin] Pinia instance is not ready when trying to access the "${e}" store. Provide a Pinia instance via usePartyLogin(..., { pinia }) or ensure Pinia is registered before calling this hook.`));
|
|
1112
|
+
}
|
|
1113
|
+
function ni(e, t) {
|
|
1114
|
+
if (!e || !t) return "";
|
|
1115
|
+
let n = t.split("."), r = e;
|
|
1116
|
+
for (let e of n) if (r && typeof r == "object" && e in r) r = r[e];
|
|
1117
|
+
else return "";
|
|
1118
|
+
return r ?? "";
|
|
1119
|
+
}
|
|
1120
|
+
function ri(e, t) {
|
|
1121
|
+
return (e?._s)?.get(t);
|
|
1122
|
+
}
|
|
1123
|
+
function ii(e, t, n) {
|
|
1124
|
+
switch (e.type) {
|
|
1125
|
+
case "string":
|
|
1126
|
+
case "number": return e.value ?? "";
|
|
1127
|
+
case "boolean": return e.value === "true";
|
|
1128
|
+
case "system": {
|
|
1129
|
+
if (!e.field) return "";
|
|
1130
|
+
let [t, r] = e.field.split(":");
|
|
1131
|
+
if (!t || !r) return "";
|
|
1132
|
+
try {
|
|
1133
|
+
if (!$r.has(t)) return console.warn(`Store "${t}" is not supported in usePartyLogin.`), "";
|
|
1134
|
+
let e = n ?? Ae();
|
|
1135
|
+
if (!e) return ti(t), "";
|
|
1136
|
+
let i = ri(e, t);
|
|
1137
|
+
return i ? ni(i, r) : (gi(t), "");
|
|
1138
|
+
} catch (t) {
|
|
1139
|
+
return console.error(`Error accessing store field ${e.field}:`, t), "";
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
case "request": return !e.field || !t ? "" : ni(t, e.field);
|
|
1143
|
+
default: return e.value ?? "";
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
function ai(e, t, n) {
|
|
1147
|
+
let r = {};
|
|
1148
|
+
return e.forEach((e) => {
|
|
1149
|
+
e.key && (r[e.key] = ii(e, t, n));
|
|
1150
|
+
}), r;
|
|
1151
|
+
}
|
|
1152
|
+
function oi(e, t, n, r) {
|
|
1153
|
+
let i = ai(t, n, r), a = Object.entries(i);
|
|
1154
|
+
if (a.length === 0) return di(e);
|
|
1155
|
+
let o = new URLSearchParams();
|
|
1156
|
+
a.forEach(([e, t]) => {
|
|
1157
|
+
o.append(e, String(t));
|
|
1158
|
+
});
|
|
1159
|
+
let s = o.toString(), c = e.indexOf("#"), l = c >= 0, u = l ? e.slice(0, c) : e, d = l ? e.slice(c + 1) : "";
|
|
1160
|
+
if (l && si(d)) return di(`${u}#${ci(d, s)}`);
|
|
1161
|
+
let f = li(u, o, s);
|
|
1162
|
+
return di(l ? `${f}#${d}` : f);
|
|
1163
|
+
}
|
|
1164
|
+
function si(e) {
|
|
1165
|
+
if (!e) return !1;
|
|
1166
|
+
let t = e.trim();
|
|
1167
|
+
return t ? t.startsWith("/") || t.startsWith("!/") || t.startsWith("?") : !1;
|
|
1168
|
+
}
|
|
1169
|
+
function ci(e, t) {
|
|
1170
|
+
return t ? e ? `${e}${ui(e)}${t}` : `?${t}` : e;
|
|
1171
|
+
}
|
|
1172
|
+
function li(e, t, n) {
|
|
1173
|
+
if (!n) return e;
|
|
1174
|
+
if (!e) return `?${n}`;
|
|
1175
|
+
try {
|
|
1176
|
+
let n = new URL(e);
|
|
1177
|
+
return t.forEach((e, t) => {
|
|
1178
|
+
n.searchParams.append(t, e);
|
|
1179
|
+
}), n.toString();
|
|
1180
|
+
} catch {
|
|
1181
|
+
return `${e}${ui(e)}${n}`;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
function ui(e) {
|
|
1185
|
+
return !e || !e.includes("?") ? "?" : /[?&]$/.test(e) ? "" : "&";
|
|
1186
|
+
}
|
|
1187
|
+
function di(e) {
|
|
1188
|
+
try {
|
|
1189
|
+
return decodeURIComponent(e);
|
|
1190
|
+
} catch {
|
|
1191
|
+
return e;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
function fi(e) {
|
|
1195
|
+
let t = new URLSearchParams();
|
|
1196
|
+
return Object.entries(e).forEach(([e, n]) => {
|
|
1197
|
+
n != null && t.append(e, String(n));
|
|
1198
|
+
}), t.toString();
|
|
1199
|
+
}
|
|
1200
|
+
function pi(e, t) {
|
|
1201
|
+
let n = t["Content-Type"] || t["content-type"] || "application/json";
|
|
1202
|
+
if (!e || Object.keys(e).length === 0) return;
|
|
1203
|
+
let r = n.split(";")[0].trim().toLowerCase();
|
|
1204
|
+
if (r === "application/json") return JSON.stringify(e);
|
|
1205
|
+
if (r === "application/x-www-form-urlencoded") {
|
|
1206
|
+
let t = new URLSearchParams();
|
|
1207
|
+
return Object.entries(e).forEach(([e, n]) => {
|
|
1208
|
+
n != null && t.append(e, String(n));
|
|
1209
|
+
}), t.toString();
|
|
1210
|
+
}
|
|
1211
|
+
if (r === "multipart/form-data") {
|
|
1212
|
+
let n = new FormData();
|
|
1213
|
+
return Object.entries(e).forEach(([e, t]) => {
|
|
1214
|
+
t != null && n.append(e, t);
|
|
1215
|
+
}), delete t["Content-Type"], delete t["content-type"], n;
|
|
1216
|
+
}
|
|
1217
|
+
return JSON.stringify(e);
|
|
1218
|
+
}
|
|
1219
|
+
function mi(e) {
|
|
1220
|
+
if (e == null) return e;
|
|
1221
|
+
if (typeof e == "string") try {
|
|
1222
|
+
return mi(JSON.parse(e));
|
|
1223
|
+
} catch {
|
|
1224
|
+
return e;
|
|
1225
|
+
}
|
|
1226
|
+
if (Array.isArray(e)) return e.map((e) => mi(e));
|
|
1227
|
+
if (typeof e == "object") {
|
|
1228
|
+
let t = {};
|
|
1229
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = mi(e[n]));
|
|
1230
|
+
return t;
|
|
1231
|
+
}
|
|
1232
|
+
return e;
|
|
1233
|
+
}
|
|
1234
|
+
async function hi(e, t, n = {}) {
|
|
1235
|
+
let { execute: r = !0, pinia: i } = n, a = j(""), o = j(!1), s = j(null);
|
|
1236
|
+
async function c() {
|
|
1237
|
+
if (!e || e.length < 2) throw Error("PartyLogin config must have at least 2 steps");
|
|
1238
|
+
if (!t) throw Error("Target URL is required for OAuth redirect");
|
|
1239
|
+
let n = e.find((e) => e.step === 1), r = e.find((e) => e.step === 2);
|
|
1240
|
+
if (!n || !r) throw Error("Step 1 and Step 2 configurations are required");
|
|
1241
|
+
if (!n.request) throw Error("Step 1 must have request configuration");
|
|
1242
|
+
if (!r.oauth) throw Error("Step 2 must have OAuth configuration");
|
|
1243
|
+
let { url: c, method: l, params: u } = n.request, d = i ?? Ae(), f = u.query ? ai(u.query, void 0, d) : {}, p = u.body ? ai(u.body, void 0, d) : {}, m = u.header ? ai(u.header, void 0, d) : {}, h = u.cookie ? ai(u.cookie, void 0, d) : {}, g = {};
|
|
1244
|
+
Object.entries(m).forEach(([e, t]) => {
|
|
1245
|
+
g[e] = String(t);
|
|
1246
|
+
});
|
|
1247
|
+
let _ = Object.entries(h).map(([e, t]) => `${e}=${t}`);
|
|
1248
|
+
_.length > 0 && (g.Cookie = _.join("; "));
|
|
1249
|
+
let v = c, y = fi(f);
|
|
1250
|
+
y && (v = `${c}${c.includes("?") ? "&" : "?"}${y}`);
|
|
1251
|
+
let b;
|
|
1252
|
+
["GET", "HEAD"].includes(l) || (!g["Content-Type"] && !g["content-type"] && (g["Content-Type"] = "application/json"), b = pi(p, g)), o.value = !0, s.value = null;
|
|
1253
|
+
try {
|
|
1254
|
+
let e = await fetch(v, {
|
|
1255
|
+
method: l,
|
|
1256
|
+
headers: g,
|
|
1257
|
+
body: b,
|
|
1258
|
+
credentials: _.length > 0 ? "include" : "same-origin",
|
|
1259
|
+
mode: "cors"
|
|
1260
|
+
});
|
|
1261
|
+
if (!e.ok) throw Error(`HTTP ${e.status}: ${e.statusText}`);
|
|
1262
|
+
let n = e.headers.get("content-type") || "", i = {};
|
|
1263
|
+
if (n.includes("application/json")) i = mi(await e.json());
|
|
1264
|
+
else {
|
|
1265
|
+
let t = await e.text();
|
|
1266
|
+
try {
|
|
1267
|
+
i = mi(JSON.parse(t));
|
|
1268
|
+
} catch {
|
|
1269
|
+
i = { data: t };
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
let o = oi(t, r.oauth.params, i, d);
|
|
1273
|
+
return a.value = o, o;
|
|
1274
|
+
} catch (e) {
|
|
1275
|
+
throw s.value = /* @__PURE__ */ Error(`第一步请求失败: ${e?.message || String(e)}`), s.value;
|
|
1276
|
+
} finally {
|
|
1277
|
+
o.value = !1;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
return r && await c(), {
|
|
1281
|
+
url: a,
|
|
1282
|
+
loading: o,
|
|
1283
|
+
error: s,
|
|
1284
|
+
execute: c
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
function gi(e) {
|
|
1288
|
+
console.warn(`[usePartyLogin] Store "${e}" is not registered in Pinia.`);
|
|
1289
|
+
}
|
|
1290
|
+
//#endregion
|
|
1291
|
+
//#region src/features/composables/theme.ts
|
|
1292
|
+
function _i() {
|
|
1293
|
+
let e = qi();
|
|
1294
|
+
return { isDark: A({
|
|
1295
|
+
get() {
|
|
1296
|
+
return e.settings.app.colorScheme === "dark";
|
|
1297
|
+
},
|
|
1298
|
+
set(t) {
|
|
1299
|
+
e.settings.app.colorScheme = t ? "dark" : "light";
|
|
1300
|
+
}
|
|
1301
|
+
}) };
|
|
1302
|
+
}
|
|
1303
|
+
//#endregion
|
|
1304
|
+
//#region src/features/stores/modules/keepAlive.ts
|
|
1305
|
+
var vi = k(M.KEEP_ALIVE, () => {
|
|
1306
|
+
let e = j([]);
|
|
1307
|
+
function t(n) {
|
|
1308
|
+
if (Kn(n)) return !e.value.includes(n) && e.value.push(n);
|
|
1309
|
+
if (m(n)) {
|
|
1310
|
+
n.forEach((e) => t(e));
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
I(`KeepAlive 需要接受一个字符串或者字符串数组作为参数, 但是接受到了 ${typeof n} 类型`);
|
|
1314
|
+
}
|
|
1315
|
+
function n(t) {
|
|
1316
|
+
Kn(t) && (e.value = e.value.filter((e) => e !== t)), m(t) && (e.value = e.value.filter((e) => !t.includes(e)));
|
|
1317
|
+
}
|
|
1318
|
+
function r() {
|
|
1319
|
+
e.value = [];
|
|
1320
|
+
}
|
|
1321
|
+
return {
|
|
1322
|
+
list: e,
|
|
1323
|
+
add: t,
|
|
1324
|
+
remove: n,
|
|
1325
|
+
clean: r
|
|
1326
|
+
};
|
|
1327
|
+
}), yi = /* @__PURE__ */ t(((e) => {
|
|
1328
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.PathError = e.TokenData = void 0, e.compile = u, e.match = p;
|
|
1329
|
+
var t = "/", n = (e) => e, r = /^[$_\p{ID_Start}]$/u, i = /^[$\u200c\u200d\p{ID_Continue}]$/u, a = {
|
|
1330
|
+
"{": "{",
|
|
1331
|
+
"}": "}",
|
|
1332
|
+
"(": "(",
|
|
1333
|
+
")": ")",
|
|
1334
|
+
"[": "[",
|
|
1335
|
+
"]": "]",
|
|
1336
|
+
"+": "+",
|
|
1337
|
+
"?": "?",
|
|
1338
|
+
"!": "!"
|
|
1339
|
+
};
|
|
1340
|
+
function o(e) {
|
|
1341
|
+
return e.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
1342
|
+
}
|
|
1343
|
+
var s = class {
|
|
1344
|
+
constructor(e, t) {
|
|
1345
|
+
this.tokens = e, this.originalPath = t;
|
|
1346
|
+
}
|
|
1347
|
+
};
|
|
1348
|
+
e.TokenData = s;
|
|
1349
|
+
var c = class extends TypeError {
|
|
1350
|
+
constructor(e, t) {
|
|
1351
|
+
let n = e;
|
|
1352
|
+
t && (n += `: ${t}`), n += "; visit https://git.new/pathToRegexpError for info", super(n), this.originalPath = t;
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
e.PathError = c;
|
|
1356
|
+
function l(e, t = {}) {
|
|
1357
|
+
let { encodePath: o = n } = t, l = [...e], u = [], d = 0, f = 0;
|
|
1358
|
+
function p() {
|
|
1359
|
+
let t = "";
|
|
1360
|
+
if (r.test(l[d])) do
|
|
1361
|
+
t += l[d++];
|
|
1362
|
+
while (i.test(l[d]));
|
|
1363
|
+
else if (l[d] === "\"") {
|
|
1364
|
+
let n = d;
|
|
1365
|
+
for (; d++ < l.length;) {
|
|
1366
|
+
if (l[d] === "\"") {
|
|
1367
|
+
d++, n = 0;
|
|
1368
|
+
break;
|
|
1369
|
+
}
|
|
1370
|
+
l[d] === "\\" && d++, t += l[d];
|
|
1371
|
+
}
|
|
1372
|
+
if (n) throw new c(`Unterminated quote at index ${n}`, e);
|
|
1373
|
+
}
|
|
1374
|
+
if (!t) throw new c(`Missing parameter name at index ${d}`, e);
|
|
1375
|
+
return t;
|
|
1376
|
+
}
|
|
1377
|
+
for (; d < l.length;) {
|
|
1378
|
+
let e = l[d], t = a[e];
|
|
1379
|
+
t ? u.push({
|
|
1380
|
+
type: t,
|
|
1381
|
+
index: d++,
|
|
1382
|
+
value: e
|
|
1383
|
+
}) : e === "\\" ? u.push({
|
|
1384
|
+
type: "escape",
|
|
1385
|
+
index: d++,
|
|
1386
|
+
value: l[d++]
|
|
1387
|
+
}) : e === ":" ? u.push({
|
|
1388
|
+
type: "param",
|
|
1389
|
+
index: d++,
|
|
1390
|
+
value: p()
|
|
1391
|
+
}) : e === "*" ? u.push({
|
|
1392
|
+
type: "wildcard",
|
|
1393
|
+
index: d++,
|
|
1394
|
+
value: p()
|
|
1395
|
+
}) : u.push({
|
|
1396
|
+
type: "char",
|
|
1397
|
+
index: d++,
|
|
1398
|
+
value: e
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
u.push({
|
|
1402
|
+
type: "end",
|
|
1403
|
+
index: d,
|
|
1404
|
+
value: ""
|
|
1405
|
+
});
|
|
1406
|
+
function m(t) {
|
|
1407
|
+
let n = [];
|
|
1408
|
+
for (;;) {
|
|
1409
|
+
let r = u[f++];
|
|
1410
|
+
if (r.type === t) break;
|
|
1411
|
+
if (r.type === "char" || r.type === "escape") {
|
|
1412
|
+
let e = r.value, t = u[f];
|
|
1413
|
+
for (; t.type === "char" || t.type === "escape";) e += t.value, t = u[++f];
|
|
1414
|
+
n.push({
|
|
1415
|
+
type: "text",
|
|
1416
|
+
value: o(e)
|
|
1417
|
+
});
|
|
1418
|
+
continue;
|
|
1419
|
+
}
|
|
1420
|
+
if (r.type === "param" || r.type === "wildcard") {
|
|
1421
|
+
n.push({
|
|
1422
|
+
type: r.type,
|
|
1423
|
+
name: r.value
|
|
1424
|
+
});
|
|
1425
|
+
continue;
|
|
1426
|
+
}
|
|
1427
|
+
if (r.type === "{") {
|
|
1428
|
+
n.push({
|
|
1429
|
+
type: "group",
|
|
1430
|
+
tokens: m("}")
|
|
1431
|
+
});
|
|
1432
|
+
continue;
|
|
1433
|
+
}
|
|
1434
|
+
throw new c(`Unexpected ${r.type} at index ${r.index}, expected ${t}`, e);
|
|
1435
|
+
}
|
|
1436
|
+
return n;
|
|
1437
|
+
}
|
|
1438
|
+
return new s(m("end"), e);
|
|
1439
|
+
}
|
|
1440
|
+
function u(e, n = {}) {
|
|
1441
|
+
let { encode: r = encodeURIComponent, delimiter: i = t } = n, a = d((typeof e == "object" ? e : l(e, n)).tokens, i, r);
|
|
1442
|
+
return function(e = {}) {
|
|
1443
|
+
let [t, ...n] = a(e);
|
|
1444
|
+
if (n.length) throw TypeError(`Missing parameters: ${n.join(", ")}`);
|
|
1445
|
+
return t;
|
|
1446
|
+
};
|
|
1447
|
+
}
|
|
1448
|
+
function d(e, t, n) {
|
|
1449
|
+
let r = e.map((e) => f(e, t, n));
|
|
1450
|
+
return (e) => {
|
|
1451
|
+
let t = [""];
|
|
1452
|
+
for (let n of r) {
|
|
1453
|
+
let [r, ...i] = n(e);
|
|
1454
|
+
t[0] += r, t.push(...i);
|
|
1455
|
+
}
|
|
1456
|
+
return t;
|
|
1457
|
+
};
|
|
1458
|
+
}
|
|
1459
|
+
function f(e, t, r) {
|
|
1460
|
+
if (e.type === "text") return () => [e.value];
|
|
1461
|
+
if (e.type === "group") {
|
|
1462
|
+
let n = d(e.tokens, t, r);
|
|
1463
|
+
return (e) => {
|
|
1464
|
+
let [t, ...r] = n(e);
|
|
1465
|
+
return r.length ? [""] : [t];
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
let i = r || n;
|
|
1469
|
+
return e.type === "wildcard" && r !== !1 ? (n) => {
|
|
1470
|
+
let r = n[e.name];
|
|
1471
|
+
if (r == null) return ["", e.name];
|
|
1472
|
+
if (!Array.isArray(r) || r.length === 0) throw TypeError(`Expected "${e.name}" to be a non-empty array`);
|
|
1473
|
+
return [r.map((t, n) => {
|
|
1474
|
+
if (typeof t != "string") throw TypeError(`Expected "${e.name}/${n}" to be a string`);
|
|
1475
|
+
return i(t);
|
|
1476
|
+
}).join(t)];
|
|
1477
|
+
} : (t) => {
|
|
1478
|
+
let n = t[e.name];
|
|
1479
|
+
if (n == null) return ["", e.name];
|
|
1480
|
+
if (typeof n != "string") throw TypeError(`Expected "${e.name}" to be a string`);
|
|
1481
|
+
return [i(n)];
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
function p(e, r = {}) {
|
|
1485
|
+
let { decode: i = decodeURIComponent, delimiter: a = t } = r, { regexp: o, keys: s } = m(e, r), c = s.map((e) => i === !1 ? n : e.type === "param" ? i : (e) => e.split(a).map(i));
|
|
1486
|
+
return function(e) {
|
|
1487
|
+
let t = o.exec(e);
|
|
1488
|
+
if (!t) return !1;
|
|
1489
|
+
let n = t[0], r = Object.create(null);
|
|
1490
|
+
for (let e = 1; e < t.length; e++) {
|
|
1491
|
+
if (t[e] === void 0) continue;
|
|
1492
|
+
let n = s[e - 1], i = c[e - 1];
|
|
1493
|
+
r[n.name] = i(t[e]);
|
|
1494
|
+
}
|
|
1495
|
+
return {
|
|
1496
|
+
path: n,
|
|
1497
|
+
params: r
|
|
1498
|
+
};
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
function m(e, n = {}) {
|
|
1502
|
+
let { delimiter: r = t, end: i = !0, sensitive: a = !1, trailing: s = !0 } = n, c = [], u = a ? "" : "i", d = [];
|
|
1503
|
+
for (let t of h(e, [])) {
|
|
1504
|
+
let e = typeof t == "object" ? t : l(t, n);
|
|
1505
|
+
for (let t of g(e.tokens, 0, [])) d.push(_(t, r, c, e.originalPath));
|
|
1506
|
+
}
|
|
1507
|
+
let f = `^(?:${d.join("|")})`;
|
|
1508
|
+
return s && (f += `(?:${o(r)}$)?`), f += i ? "$" : `(?=${o(r)}|$)`, {
|
|
1509
|
+
regexp: new RegExp(f, u),
|
|
1510
|
+
keys: c
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
function h(e, t) {
|
|
1514
|
+
if (Array.isArray(e)) for (let n of e) h(n, t);
|
|
1515
|
+
else t.push(e);
|
|
1516
|
+
return t;
|
|
1517
|
+
}
|
|
1518
|
+
function* g(e, t, n) {
|
|
1519
|
+
if (t === e.length) return yield n;
|
|
1520
|
+
let r = e[t];
|
|
1521
|
+
if (r.type === "group") for (let i of g(r.tokens, 0, n.slice())) yield* g(e, t + 1, i);
|
|
1522
|
+
else n.push(r);
|
|
1523
|
+
yield* g(e, t + 1, n);
|
|
1524
|
+
}
|
|
1525
|
+
function _(e, t, n, r) {
|
|
1526
|
+
let i = "", a = "", s = !0;
|
|
1527
|
+
for (let l of e) {
|
|
1528
|
+
if (l.type === "text") {
|
|
1529
|
+
i += o(l.value), a += l.value, s ||= l.value.includes(t);
|
|
1530
|
+
continue;
|
|
1531
|
+
}
|
|
1532
|
+
if (l.type === "param" || l.type === "wildcard") {
|
|
1533
|
+
if (!s && !a) throw new c(`Missing text before "${l.name}" ${l.type}`, r);
|
|
1534
|
+
l.type === "param" ? i += `(${v(t, s ? "" : a)}+)` : i += "([\\s\\S]+)", n.push(l), a = "", s = !1;
|
|
1535
|
+
continue;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
return i;
|
|
1539
|
+
}
|
|
1540
|
+
function v(e, t) {
|
|
1541
|
+
return t.length < 2 ? e.length < 2 ? `[^${o(e + t)}]` : `(?:(?!${o(e)})[^${o(t)}])` : e.length < 2 ? `(?:(?!${o(t)})[^${o(e)}])` : `(?:(?!${o(t)}|${o(e)})[\\s\\S])`;
|
|
1542
|
+
}
|
|
1543
|
+
}));
|
|
1544
|
+
//#endregion
|
|
1545
|
+
//#region src/features/api/modules/rbac/yonghujiekou.ts
|
|
1546
|
+
function bi(e, t) {
|
|
1547
|
+
return $.Put("/rbac/user/changePassword", {}, {
|
|
1548
|
+
params: { ...e },
|
|
1549
|
+
...t || {}
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
function xi(e) {
|
|
1553
|
+
return $.Get("/rbac/user/userEntireInfo", { ...e || {} });
|
|
1554
|
+
}
|
|
1555
|
+
//#endregion
|
|
1556
|
+
//#region src/features/api/modules/rbac/ziyuanjiekou.ts
|
|
1557
|
+
function Si(e) {
|
|
1558
|
+
return $.Get("/rbac/resource/grantedResources", { ...e || {} });
|
|
1559
|
+
}
|
|
1560
|
+
function Ci(e, t) {
|
|
1561
|
+
return $.Post("/rbac/resource/mineOrAllResourceTree", {}, {
|
|
1562
|
+
params: {
|
|
1563
|
+
enable: "true",
|
|
1564
|
+
...e
|
|
1565
|
+
},
|
|
1566
|
+
...t || {}
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
//#endregion
|
|
1570
|
+
//#region src/features/enum.ts
|
|
1571
|
+
var L = /* @__PURE__ */ function(e) {
|
|
1572
|
+
return e.APP = "1", e.INDEX = "2", e.MENU = "3", e.BUTTON = "4", e.NON_MENU = "5", e.DYNAMIC_APP = "7", e.IFRAME = "8", e.LINK = "9", e;
|
|
1573
|
+
}({}), wi = [];
|
|
1574
|
+
function Ti(e, t) {
|
|
1575
|
+
return wi.push({
|
|
1576
|
+
routes: e,
|
|
1577
|
+
sort: t?.sort ?? 0
|
|
1578
|
+
}), e;
|
|
1579
|
+
}
|
|
1580
|
+
function Ei() {
|
|
1581
|
+
return wi.sort((e, t) => e?.sort - t?.sort).map((e) => e.routes).flat();
|
|
1582
|
+
}
|
|
1583
|
+
//#endregion
|
|
1584
|
+
//#region src/features/router/systemRoutes.ts
|
|
1585
|
+
var Di = [{
|
|
1586
|
+
path: "/",
|
|
1587
|
+
meta: {
|
|
1588
|
+
title: () => qi().settings.home.title,
|
|
1589
|
+
breadcrumb: !1
|
|
1590
|
+
},
|
|
1591
|
+
children: [{
|
|
1592
|
+
path: "profile",
|
|
1593
|
+
name: "Profile",
|
|
1594
|
+
component: () => import("./profile-Bsc6FIbI.js"),
|
|
1595
|
+
meta: {
|
|
1596
|
+
title: "个人中心",
|
|
1597
|
+
icon: "i-iconamoon-profile-duotone"
|
|
1598
|
+
}
|
|
1599
|
+
}]
|
|
1600
|
+
}];
|
|
1601
|
+
function Oi(e) {
|
|
1602
|
+
Di[0].children?.push(...e);
|
|
1603
|
+
}
|
|
1604
|
+
function ki() {
|
|
1605
|
+
return Di[0].component || (Di[0].component = n()), Di;
|
|
1606
|
+
}
|
|
1607
|
+
//#endregion
|
|
1608
|
+
//#region src/features/stores/utils/routerHelper.ts
|
|
1609
|
+
function Ai(e = [], t = {}) {
|
|
1610
|
+
let n = ji(e, [L.BUTTON]).map((e) => {
|
|
1611
|
+
let n = e?.children && e.children.length > 0 ? Ai(e.children, e) : [], r = lr({
|
|
1612
|
+
id: e?.id,
|
|
1613
|
+
title: e?.name ?? "",
|
|
1614
|
+
auth: e?.code,
|
|
1615
|
+
icon: e?.icon,
|
|
1616
|
+
...e?.meta,
|
|
1617
|
+
...e.type === L.APP || e.type === L.DYNAMIC_APP ? {
|
|
1618
|
+
sidebar: !0,
|
|
1619
|
+
tabbar: !0,
|
|
1620
|
+
devText: e?.meta?.devText || "该功能暂未上线,敬请期待!"
|
|
1621
|
+
} : {},
|
|
1622
|
+
...e.type === L.INDEX ? { tabbar: !0 } : {}
|
|
1623
|
+
}, Zn), i = O(lr({
|
|
1624
|
+
name: e?.meta?.routeName ?? void 0,
|
|
1625
|
+
path: e?.meta?.url ?? void 0,
|
|
1626
|
+
component: e?.meta?.component ?? void 0,
|
|
1627
|
+
children: n,
|
|
1628
|
+
meta: r
|
|
1629
|
+
}, Zn));
|
|
1630
|
+
switch (e.type) {
|
|
1631
|
+
case L.DYNAMIC_APP: return i;
|
|
1632
|
+
case L.INDEX: return Ni(i, t);
|
|
1633
|
+
case L.MENU:
|
|
1634
|
+
case L.IFRAME:
|
|
1635
|
+
case L.LINK: return Pi(i, t);
|
|
1636
|
+
case L.NON_MENU: return Fi(i, t);
|
|
1637
|
+
default: return i;
|
|
1638
|
+
}
|
|
1639
|
+
});
|
|
1640
|
+
return de(t) ? Mi(n) : n;
|
|
1641
|
+
}
|
|
1642
|
+
function ji(e = [], t) {
|
|
1643
|
+
return e.filter((e) => e.type ? !t.includes(e.type) : !1);
|
|
1644
|
+
}
|
|
1645
|
+
function Mi(e, t = 3) {
|
|
1646
|
+
function n(e) {
|
|
1647
|
+
let t = e.children?.map(n).filter(Boolean);
|
|
1648
|
+
if (t && t.length > 0) return {
|
|
1649
|
+
...e,
|
|
1650
|
+
children: t
|
|
1651
|
+
};
|
|
1652
|
+
if (t?.length === 0 && e.component) {
|
|
1653
|
+
let { children: t, ...n } = e;
|
|
1654
|
+
return {
|
|
1655
|
+
...n,
|
|
1656
|
+
children: []
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
return null;
|
|
1660
|
+
}
|
|
1661
|
+
function r(e) {
|
|
1662
|
+
return !e.children || e.children.length === 0 ? 1 : 1 + Math.max(...e.children.map(r));
|
|
1663
|
+
}
|
|
1664
|
+
return e.map(n).filter((e) => !!e).filter((e) => r(e) >= t);
|
|
1665
|
+
}
|
|
1666
|
+
function Ni(e, t = {}) {
|
|
1667
|
+
switch (t.type) {
|
|
1668
|
+
case L.DYNAMIC_APP: return {
|
|
1669
|
+
...e,
|
|
1670
|
+
path: Ii(e.path),
|
|
1671
|
+
component: n()
|
|
1672
|
+
};
|
|
1673
|
+
case L.INDEX: return {
|
|
1674
|
+
...e,
|
|
1675
|
+
path: e.path,
|
|
1676
|
+
component: void 0
|
|
1677
|
+
};
|
|
1678
|
+
default: return e;
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
function Pi(e, t = {}) {
|
|
1682
|
+
!e?.component && !e?.meta?.iframe && !e?.meta?.link && console.warn(`[PUBINFO] 资源"${e.meta.title}"的component字段不存在, 将会导致未知错误!`);
|
|
1683
|
+
let r = O(e), i = [{
|
|
1684
|
+
path: "",
|
|
1685
|
+
name: e.name,
|
|
1686
|
+
component: Li(e.component, e.meta?.scope),
|
|
1687
|
+
meta: {
|
|
1688
|
+
...e.meta,
|
|
1689
|
+
title: e.meta.title,
|
|
1690
|
+
sidebar: !1,
|
|
1691
|
+
breadcrumb: !1
|
|
1692
|
+
},
|
|
1693
|
+
children: []
|
|
1694
|
+
}, ...e.children];
|
|
1695
|
+
switch (t.type) {
|
|
1696
|
+
case L.DYNAMIC_APP:
|
|
1697
|
+
r = {
|
|
1698
|
+
...e,
|
|
1699
|
+
path: Ii(e.path),
|
|
1700
|
+
name: void 0,
|
|
1701
|
+
component: n(),
|
|
1702
|
+
children: i
|
|
1703
|
+
};
|
|
1704
|
+
break;
|
|
1705
|
+
case L.INDEX:
|
|
1706
|
+
r = {
|
|
1707
|
+
...e,
|
|
1708
|
+
path: e.path,
|
|
1709
|
+
name: void 0,
|
|
1710
|
+
component: void 0,
|
|
1711
|
+
children: i
|
|
1712
|
+
};
|
|
1713
|
+
break;
|
|
1714
|
+
}
|
|
1715
|
+
return r;
|
|
1716
|
+
}
|
|
1717
|
+
function Fi(e, t = {}) {
|
|
1718
|
+
switch (t.type) {
|
|
1719
|
+
case L.INDEX:
|
|
1720
|
+
case L.MENU:
|
|
1721
|
+
case L.NON_MENU: return {
|
|
1722
|
+
...e,
|
|
1723
|
+
path: e.path,
|
|
1724
|
+
component: Li(e.component, e.meta?.scope),
|
|
1725
|
+
meta: {
|
|
1726
|
+
...e.meta,
|
|
1727
|
+
sidebar: !1
|
|
1728
|
+
}
|
|
1729
|
+
};
|
|
1730
|
+
default: return e;
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
function Ii(e) {
|
|
1734
|
+
return e ? e.startsWith("/") ? e : `/${e}` : "/";
|
|
1735
|
+
}
|
|
1736
|
+
function Li(e, t) {
|
|
1737
|
+
return s(e, t);
|
|
1738
|
+
}
|
|
1739
|
+
//#endregion
|
|
1740
|
+
//#region src/features/api/modules/configData/xitongpeizhifuwu.ts
|
|
1741
|
+
function Ri(e, t) {
|
|
1742
|
+
return $.Post("/sysconfig/addOrEditUserThemeStyleConfig", e, {
|
|
1743
|
+
headers: { "Content-Type": "application/json" },
|
|
1744
|
+
...t || {}
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
function zi(e) {
|
|
1748
|
+
return $.Get("/sysconfig/getSysThemeStyleConfig", { ...e || {} });
|
|
1749
|
+
}
|
|
1750
|
+
function Bi(e) {
|
|
1751
|
+
return $.Get("/sysconfig/getThemeStyleConfig", { ...e || {} });
|
|
1752
|
+
}
|
|
1753
|
+
function Vi(e) {
|
|
1754
|
+
return $.Get("/sysconfig/getUserThemeStyleConfig", { ...e || {} });
|
|
1755
|
+
}
|
|
1756
|
+
function Hi(e) {
|
|
1757
|
+
return $.Post("/sysconfig/resetUserThemeStyleConfig", {}, { ...e || {} });
|
|
1758
|
+
}
|
|
1759
|
+
//#endregion
|
|
1760
|
+
//#region src/features/settings/index.ts
|
|
1761
|
+
var Ui = {
|
|
1762
|
+
app: {
|
|
1763
|
+
lightTheme: "classic",
|
|
1764
|
+
darkTheme: "dark",
|
|
1765
|
+
colorScheme: "light",
|
|
1766
|
+
defaultLang: "zh-cn",
|
|
1767
|
+
enablePermission: !0,
|
|
1768
|
+
enableProgress: !0,
|
|
1769
|
+
enableDynamicTitle: !0,
|
|
1770
|
+
storagePrefix: "wsy_rbac",
|
|
1771
|
+
enableUserPreferences: !0,
|
|
1772
|
+
enableSettingPreferences: !0,
|
|
1773
|
+
enableAppSetting: !0
|
|
1774
|
+
},
|
|
1775
|
+
home: {
|
|
1776
|
+
enable: !1,
|
|
1777
|
+
title: "主页"
|
|
1778
|
+
},
|
|
1779
|
+
layout: {
|
|
1780
|
+
widthMode: "adaption",
|
|
1781
|
+
enableMobileAdaptation: !1
|
|
1782
|
+
},
|
|
1783
|
+
menu: {
|
|
1784
|
+
menuMode: "head",
|
|
1785
|
+
isRounded: !0,
|
|
1786
|
+
menuActiveStyle: "",
|
|
1787
|
+
switchMainMenuAndPageJump: !0,
|
|
1788
|
+
subMenuUniqueOpened: !0,
|
|
1789
|
+
subMenuOnlyOneHide: !0,
|
|
1790
|
+
subMenuCollapse: !1,
|
|
1791
|
+
enableSubMenuCollapseButton: !0,
|
|
1792
|
+
enableHotkeys: !1,
|
|
1793
|
+
showWithoutPermission: !1
|
|
1794
|
+
},
|
|
1795
|
+
topbar: {
|
|
1796
|
+
mode: "fixed",
|
|
1797
|
+
switchTabbarAndToolbar: !1
|
|
1798
|
+
},
|
|
1799
|
+
tabbar: {
|
|
1800
|
+
enable: !0,
|
|
1801
|
+
style: "fashion",
|
|
1802
|
+
enableIcon: !0,
|
|
1803
|
+
mergeTabsBy: "activeMenu",
|
|
1804
|
+
enableMemory: !0,
|
|
1805
|
+
enableHotkeys: !0,
|
|
1806
|
+
storageTo: "local"
|
|
1807
|
+
},
|
|
1808
|
+
toolbar: {
|
|
1809
|
+
enableNotification: !0,
|
|
1810
|
+
enableFullscreen: !0,
|
|
1811
|
+
enablePageReload: !0,
|
|
1812
|
+
enableColorScheme: !0
|
|
1813
|
+
},
|
|
1814
|
+
favorites: {
|
|
1815
|
+
enable: !0,
|
|
1816
|
+
storageTo: "local"
|
|
1817
|
+
},
|
|
1818
|
+
breadcrumb: {
|
|
1819
|
+
enable: !0,
|
|
1820
|
+
style: "",
|
|
1821
|
+
enableMainMenu: !0
|
|
1822
|
+
},
|
|
1823
|
+
mainPage: {
|
|
1824
|
+
enableHotkeys: !0,
|
|
1825
|
+
iframeCacheMax: 3,
|
|
1826
|
+
enableTransition: !0,
|
|
1827
|
+
transitionMode: "fade"
|
|
1828
|
+
},
|
|
1829
|
+
navSearch: {
|
|
1830
|
+
enable: !0,
|
|
1831
|
+
enableHotkeys: !0
|
|
1832
|
+
},
|
|
1833
|
+
copyright: {
|
|
1834
|
+
enable: !1,
|
|
1835
|
+
dates: "2024-2025",
|
|
1836
|
+
company: "浙江省公众信息产业有限公司",
|
|
1837
|
+
website: "",
|
|
1838
|
+
beian: ""
|
|
1839
|
+
},
|
|
1840
|
+
watermark: {
|
|
1841
|
+
enable: !1,
|
|
1842
|
+
text: "PUBINFO",
|
|
1843
|
+
width: 150,
|
|
1844
|
+
x: 0,
|
|
1845
|
+
y: 0,
|
|
1846
|
+
x_space: 50,
|
|
1847
|
+
y_space: 50,
|
|
1848
|
+
alpha: .1
|
|
1849
|
+
}
|
|
1850
|
+
};
|
|
1851
|
+
function Wi(e) {
|
|
1852
|
+
return Ui = Mn(e, Ui), e;
|
|
1853
|
+
}
|
|
1854
|
+
function Gi() {
|
|
1855
|
+
return Ui;
|
|
1856
|
+
}
|
|
1857
|
+
//#endregion
|
|
1858
|
+
//#region src/features/stores/modules/settings.ts
|
|
1859
|
+
function Ki(e, t = "") {
|
|
1860
|
+
return dr(e, (e, n, r) => {
|
|
1861
|
+
let a = t.length ? `${t}.${r}` : r;
|
|
1862
|
+
return i(n) && !m(n) && !de(n) ? e = e.concat(Ki(n, a)) : e.push(a), e;
|
|
1863
|
+
}, []);
|
|
1864
|
+
}
|
|
1865
|
+
var qi = k(M.SETTINGS, () => {
|
|
1866
|
+
let e = Gi(), t = j(e), n = j({}), i = j(e), a = j(!1);
|
|
1867
|
+
be(i, (e) => {
|
|
1868
|
+
if (!a.value) return;
|
|
1869
|
+
let i = Ki(e);
|
|
1870
|
+
if (Ki(n.value).includes(i.at(0))) {
|
|
1871
|
+
if (Eo.session.has("userSettingIsGod")) return;
|
|
1872
|
+
f.confirm({
|
|
1873
|
+
title: "系统设置提示",
|
|
1874
|
+
icon: je(r),
|
|
1875
|
+
content: "当前设置被个人设置覆盖无法预览当前全局系统配置,是否需要恢复个人设置为系统默认设置",
|
|
1876
|
+
okText: "重置个人配置",
|
|
1877
|
+
cancelText: "不在提示",
|
|
1878
|
+
onOk() {
|
|
1879
|
+
ae();
|
|
1880
|
+
},
|
|
1881
|
+
onCancel() {
|
|
1882
|
+
Eo.session.set("userSettingIsGod", "");
|
|
1883
|
+
}
|
|
1884
|
+
});
|
|
1885
|
+
} else {
|
|
1886
|
+
let n = N(e, i.at(0));
|
|
1887
|
+
fr(t.value, i.at(0), n);
|
|
1888
|
+
}
|
|
1889
|
+
}, { flush: "post" }), Pe([
|
|
1890
|
+
() => t.value.app.colorScheme,
|
|
1891
|
+
() => t.value.app.lightTheme,
|
|
1892
|
+
() => t.value.app.darkTheme
|
|
1893
|
+
], ([e, t, n]) => {
|
|
1894
|
+
switch (e === "" && (e = Oe() ? "dark" : "light"), e) {
|
|
1895
|
+
case "light":
|
|
1896
|
+
document.documentElement.classList.remove("dark"), document.body.setAttribute("data-theme", t);
|
|
1897
|
+
break;
|
|
1898
|
+
case "dark":
|
|
1899
|
+
document.documentElement.classList.add("dark"), document.body.setAttribute("data-theme", n);
|
|
1900
|
+
break;
|
|
1901
|
+
}
|
|
1902
|
+
}, { immediate: !0 }), Pe(() => t.value.layout.widthMode, (e) => {
|
|
1903
|
+
document.body.setAttribute("data-app-width-mode", e);
|
|
1904
|
+
}, { immediate: !0 }), Pe(() => t.value.menu.menuMode, (e) => {
|
|
1905
|
+
document.body.setAttribute("data-menu-mode", e);
|
|
1906
|
+
}, { immediate: !0 });
|
|
1907
|
+
let o = j("other"), s = navigator.userAgent.toLowerCase();
|
|
1908
|
+
switch (!0) {
|
|
1909
|
+
case s.includes("mac os"):
|
|
1910
|
+
o.value = "mac";
|
|
1911
|
+
break;
|
|
1912
|
+
case s.includes("windows"):
|
|
1913
|
+
o.value = "windows";
|
|
1914
|
+
break;
|
|
1915
|
+
case s.includes("linux"):
|
|
1916
|
+
o.value = "linux";
|
|
1917
|
+
break;
|
|
1918
|
+
}
|
|
1919
|
+
let c = j();
|
|
1920
|
+
function l(e) {
|
|
1921
|
+
Array.isArray(e) ? (I("在使用数据范围的时候,router auth字段不能为数组"), c.value = e[0] || "") : c.value = e;
|
|
1922
|
+
}
|
|
1923
|
+
let u = j();
|
|
1924
|
+
function d(e) {
|
|
1925
|
+
u.value = e;
|
|
1926
|
+
}
|
|
1927
|
+
let p = j([]);
|
|
1928
|
+
function m(e, t) {
|
|
1929
|
+
let n = p.value.findIndex((t) => t.fullPath === e);
|
|
1930
|
+
n > -1 ? p.value[n].title = t : p.value.push({
|
|
1931
|
+
fullPath: e,
|
|
1932
|
+
title: t
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
function h(e) {
|
|
1936
|
+
let t = p.value.findIndex((t) => t.fullPath === e);
|
|
1937
|
+
t > -1 && p.value.splice(t, 1);
|
|
1938
|
+
}
|
|
1939
|
+
let g = j("pc");
|
|
1940
|
+
function _(e) {
|
|
1941
|
+
t.value.layout.enableMobileAdaptation ? /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ? g.value = "mobile" : g.value = e < 992 ? "mobile" : "pc" : g.value = "pc";
|
|
1942
|
+
}
|
|
1943
|
+
let v = j(e.menu.subMenuCollapse);
|
|
1944
|
+
function y() {
|
|
1945
|
+
t.value.menu.subMenuCollapse = !t.value.menu.subMenuCollapse, g.value === "pc" && (v.value = !v.value);
|
|
1946
|
+
}
|
|
1947
|
+
Pe(g, (e) => {
|
|
1948
|
+
switch (e) {
|
|
1949
|
+
case "pc":
|
|
1950
|
+
t.value.menu.subMenuCollapse = v.value;
|
|
1951
|
+
break;
|
|
1952
|
+
case "mobile":
|
|
1953
|
+
t.value.menu.subMenuCollapse = !0;
|
|
1954
|
+
break;
|
|
1955
|
+
}
|
|
1956
|
+
document.body.setAttribute("data-mode", e);
|
|
1957
|
+
}, { immediate: !0 });
|
|
1958
|
+
function b(e) {
|
|
1959
|
+
t.value.app.defaultLang = e;
|
|
1960
|
+
}
|
|
1961
|
+
function x(e) {
|
|
1962
|
+
t.value.app.colorScheme = e;
|
|
1963
|
+
}
|
|
1964
|
+
let [S, C] = De(!1);
|
|
1965
|
+
function w(n, r = !1) {
|
|
1966
|
+
t.value = Mn(n, r ? e : t.value);
|
|
1967
|
+
}
|
|
1968
|
+
function ee(t) {
|
|
1969
|
+
i.value = Mn(t, e);
|
|
1970
|
+
}
|
|
1971
|
+
function T(e) {
|
|
1972
|
+
Object.keys(e).length > 0 ? n.value = Mn(e, O(n.value)) : n.value = {};
|
|
1973
|
+
}
|
|
1974
|
+
function te(e = !0) {
|
|
1975
|
+
a.value = e;
|
|
1976
|
+
}
|
|
1977
|
+
async function E() {
|
|
1978
|
+
let e = (await Bi())?.data?.content;
|
|
1979
|
+
e && w(JSON.parse(e || "{}"), !0);
|
|
1980
|
+
}
|
|
1981
|
+
async function D() {
|
|
1982
|
+
let e = (await Vi())?.data?.content;
|
|
1983
|
+
e && T(JSON.parse(e || "{}"));
|
|
1984
|
+
}
|
|
1985
|
+
async function ne() {
|
|
1986
|
+
let e = (await zi())?.data?.content;
|
|
1987
|
+
e && ee(JSON.parse(e || "{}"));
|
|
1988
|
+
}
|
|
1989
|
+
async function re() {
|
|
1990
|
+
await Promise.all([
|
|
1991
|
+
E(),
|
|
1992
|
+
ne(),
|
|
1993
|
+
D()
|
|
1994
|
+
]), te(!0);
|
|
1995
|
+
}
|
|
1996
|
+
async function ie(e) {
|
|
1997
|
+
await Ri({ content: JSON.stringify(e) }), T(e);
|
|
1998
|
+
}
|
|
1999
|
+
async function ae() {
|
|
2000
|
+
await Hi(), await E(), await D(), Ie.success("已还原系统设置");
|
|
2001
|
+
}
|
|
2002
|
+
return {
|
|
2003
|
+
settings: t,
|
|
2004
|
+
os: o,
|
|
2005
|
+
auth: c,
|
|
2006
|
+
setAuth: l,
|
|
2007
|
+
title: u,
|
|
2008
|
+
setTitle: d,
|
|
2009
|
+
customTitleList: p,
|
|
2010
|
+
setCustomTitle: m,
|
|
2011
|
+
resetCustomTitle: h,
|
|
2012
|
+
mode: g,
|
|
2013
|
+
setMode: _,
|
|
2014
|
+
subMenuCollapseLastStatus: v,
|
|
2015
|
+
toggleSidebarCollapse: y,
|
|
2016
|
+
setDefaultLang: b,
|
|
2017
|
+
setColorScheme: x,
|
|
2018
|
+
mainPageMaximizeStatus: S,
|
|
2019
|
+
setMainPageMaximize: C,
|
|
2020
|
+
updateSettings: w,
|
|
2021
|
+
globalSettings: i,
|
|
2022
|
+
updateGlobalSettings: ee,
|
|
2023
|
+
userSettings: n,
|
|
2024
|
+
updateUserSettings: T,
|
|
2025
|
+
setGlobaleSettingsFlag: te,
|
|
2026
|
+
getPreferencesAll: re,
|
|
2027
|
+
setPreferencesSetting: ie,
|
|
2028
|
+
resetSettings: ae
|
|
2029
|
+
};
|
|
2030
|
+
}), Ji = k(M.TABBAR, () => {
|
|
2031
|
+
let e = qi(), t = Xi(), n = vi(), r = Ar(), i = j([]), a = j(-1);
|
|
2032
|
+
function o() {
|
|
2033
|
+
let n = [];
|
|
2034
|
+
function r(t) {
|
|
2035
|
+
t.children && t.children.forEach((t) => {
|
|
2036
|
+
if (t.meta?.permanent && t.meta?.breadcrumbNeste && t.meta?.tabbar !== !1) {
|
|
2037
|
+
let r = t.meta.breadcrumbNeste.at(-1)?.path, i = e.settings.tabbar.mergeTabsBy === "activeMenu" && t.meta.activeMenu || r;
|
|
2038
|
+
n.push({
|
|
2039
|
+
tabId: i,
|
|
2040
|
+
fullPath: r,
|
|
2041
|
+
routeName: t.name,
|
|
2042
|
+
activeMenu: t.meta.activeMenu,
|
|
2043
|
+
title: typeof t.meta.title == "function" ? t.meta.title() : t.meta.title,
|
|
2044
|
+
iframe: t.meta.iframe,
|
|
2045
|
+
icon: t.meta?.icon ?? t.meta?.breadcrumbNeste?.findLast((e) => e.icon)?.icon,
|
|
2046
|
+
activeIcon: t.meta?.activeIcon ?? t.meta?.breadcrumbNeste?.findLast((e) => e.activeIcon)?.activeIcon,
|
|
2047
|
+
name: t.name ? [t.name] : [],
|
|
2048
|
+
customTitleList: [],
|
|
2049
|
+
isPin: t.meta?.pin === void 0 ? !1 : t.meta?.pin,
|
|
2050
|
+
isTabbar: t.meta?.tabbar !== !1,
|
|
2051
|
+
isPermanent: !0
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
});
|
|
2055
|
+
}
|
|
2056
|
+
t.flatSystemRoutes.forEach(r), t.flatRoutes.forEach(r), n.length && i.value.unshift(...n);
|
|
2057
|
+
}
|
|
2058
|
+
async function s(t) {
|
|
2059
|
+
let n = [];
|
|
2060
|
+
t.matched.forEach((e, t) => {
|
|
2061
|
+
t > 0 && e.components?.default.name && n.push(e.components.default.name);
|
|
2062
|
+
});
|
|
2063
|
+
let r = t.matched.at(-1)?.meta, o = e.settings.tabbar.mergeTabsBy === "activeMenu" ? r?.activeMenu ?? t.fullPath : t.fullPath;
|
|
2064
|
+
if (t.name !== "Reload" && r?.tabbar !== !1) {
|
|
2065
|
+
let s = i.value.find((n) => e.settings.tabbar.mergeTabsBy === "routeName" && n.routeName ? n.routeName === t.name : n.tabId === o);
|
|
2066
|
+
if (s) e.settings.tabbar.mergeTabsBy !== "" && (s.tabId = o, s.fullPath = t.fullPath, s.routeName = t.name, s.activeMenu = r?.activeMenu, s.title = typeof r?.title == "function" ? r.title() : r?.title, s.iframe = r?.iframe, s.icon = r?.icon ?? r?.breadcrumbNeste?.findLast((e) => e.icon)?.icon, s.activeIcon = r?.activeIcon ?? r?.breadcrumbNeste?.findLast((e) => e.activeIcon)?.activeIcon, s.isTabbar = r?.tabbar !== !1);
|
|
2067
|
+
else {
|
|
2068
|
+
let e = {
|
|
2069
|
+
tabId: o,
|
|
2070
|
+
fullPath: t.fullPath,
|
|
2071
|
+
routeName: t.name,
|
|
2072
|
+
activeMenu: r?.activeMenu,
|
|
2073
|
+
title: typeof r?.title == "function" ? r.title() : r?.title,
|
|
2074
|
+
iframe: r?.iframe,
|
|
2075
|
+
icon: r?.icon ?? r?.breadcrumbNeste?.findLast((e) => e.icon)?.icon,
|
|
2076
|
+
activeIcon: r?.activeIcon ?? r?.breadcrumbNeste?.findLast((e) => e.activeIcon)?.activeIcon,
|
|
2077
|
+
name: n,
|
|
2078
|
+
customTitleList: [],
|
|
2079
|
+
isPin: r?.pin === void 0 ? !1 : r?.pin,
|
|
2080
|
+
isTabbar: r?.tabbar !== !1,
|
|
2081
|
+
isPermanent: !1
|
|
2082
|
+
};
|
|
2083
|
+
a.value >= 0 ? (i.value.splice(a.value + 1, 0, e), a.value = -1) : i.value.push(e);
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
function c(e) {
|
|
2088
|
+
let t = [], a = [], o = [];
|
|
2089
|
+
i.value.forEach((n, r) => {
|
|
2090
|
+
e(n, r) ? n.iframe ? o.push(n.tabId) : a.push(...n.name) : t.push(...n.name);
|
|
2091
|
+
}), n.remove(a.filter((e) => !t.includes(e))), r.close(o);
|
|
2092
|
+
}
|
|
2093
|
+
function l(e) {
|
|
2094
|
+
c((t) => t.tabId === e), i.value = i.value.filter((t) => t.tabId !== e);
|
|
2095
|
+
}
|
|
2096
|
+
function u(e) {
|
|
2097
|
+
c((t) => t.tabId !== e && !t.isPermanent && !t.isPin), i.value = i.value.filter((t) => t.tabId === e || t.isPermanent || t.isPin);
|
|
2098
|
+
}
|
|
2099
|
+
function d(e) {
|
|
2100
|
+
let t = i.value.findIndex((t) => t.tabId === e);
|
|
2101
|
+
c((e, n) => n < t && !e.isPermanent && !e.isPin), i.value = i.value.filter((e, n) => n >= t || e.isPermanent || e.isPin);
|
|
2102
|
+
}
|
|
2103
|
+
function f(e) {
|
|
2104
|
+
let t = i.value.findIndex((t) => t.tabId === e);
|
|
2105
|
+
c((e, n) => n > t && !e.isPermanent && !e.isPin), i.value = i.value.filter((e, n) => n <= t || e.isPermanent || e.isPin);
|
|
2106
|
+
}
|
|
2107
|
+
function p(e) {
|
|
2108
|
+
let t = i.value.findIndex((t) => t.tabId === e), n = -1;
|
|
2109
|
+
i.value.forEach((e, t) => {
|
|
2110
|
+
(e.isPermanent || e.isPin) && (n = t);
|
|
2111
|
+
}), t > n && (i.value.splice(n + 1, 0, i.value[t]), i.value.splice(t + 1, 1)), i.value.forEach((t) => {
|
|
2112
|
+
t.tabId === e && (t.isPin = !0);
|
|
2113
|
+
});
|
|
2114
|
+
}
|
|
2115
|
+
function m(e) {
|
|
2116
|
+
let t = i.value.findIndex((t) => t.tabId === e), n = -1;
|
|
2117
|
+
i.value.forEach((e, t) => {
|
|
2118
|
+
(e.isPermanent || e.isPin) && (n = t);
|
|
2119
|
+
}), i.value.splice(n + 1, 0, i.value[t]), i.value.splice(t, 1), i.value.forEach((t) => {
|
|
2120
|
+
t.tabId === e && (t.isPin = !1);
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
function h() {
|
|
2124
|
+
i.value = [];
|
|
2125
|
+
}
|
|
2126
|
+
function g(e, t) {
|
|
2127
|
+
i.value.splice(e, 0, i.value.splice(t, 1)[0]);
|
|
2128
|
+
}
|
|
2129
|
+
function _({ tabId: e, title: t }) {
|
|
2130
|
+
i.value.forEach((n) => {
|
|
2131
|
+
if (n.tabId === e) {
|
|
2132
|
+
let e = n.customTitleList.find((e) => e.fullPath === n.fullPath);
|
|
2133
|
+
e ? e.title = t : n.customTitleList.push({
|
|
2134
|
+
fullPath: n.fullPath,
|
|
2135
|
+
title: t
|
|
2136
|
+
});
|
|
2137
|
+
}
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
function v(e) {
|
|
2141
|
+
i.value.forEach((t) => {
|
|
2142
|
+
if (t.tabId === e) {
|
|
2143
|
+
let e = t.customTitleList.findIndex((e) => e.fullPath === t.fullPath);
|
|
2144
|
+
e > -1 && t.customTitleList.splice(e, 1);
|
|
2145
|
+
}
|
|
2146
|
+
});
|
|
2147
|
+
}
|
|
2148
|
+
return {
|
|
2149
|
+
list: i,
|
|
2150
|
+
leaveIndex: a,
|
|
2151
|
+
initPermanentTab: o,
|
|
2152
|
+
add: s,
|
|
2153
|
+
remove: l,
|
|
2154
|
+
removeOtherSide: u,
|
|
2155
|
+
removeLeftSide: d,
|
|
2156
|
+
removeRightSide: f,
|
|
2157
|
+
pin: p,
|
|
2158
|
+
unPin: m,
|
|
2159
|
+
clean: h,
|
|
2160
|
+
sort: g,
|
|
2161
|
+
setCustomTitle: _,
|
|
2162
|
+
resetCustomTitle: v
|
|
2163
|
+
};
|
|
2164
|
+
}), Yi = k(M.USER, () => {
|
|
2165
|
+
let { router: e } = ze(), t = Me({
|
|
2166
|
+
account: "",
|
|
2167
|
+
userId: "",
|
|
2168
|
+
token: "",
|
|
2169
|
+
avatar: "",
|
|
2170
|
+
refreshToken: "",
|
|
2171
|
+
orgList: [],
|
|
2172
|
+
orgId: "",
|
|
2173
|
+
permissions: [],
|
|
2174
|
+
department: ""
|
|
2175
|
+
}), n = A(() => !!t.token), r = A(() => {
|
|
2176
|
+
let e;
|
|
2177
|
+
return e = t.orgId ? Vn(t.orgList, ["orgId", t.orgId])?.orgName : Vn(t.orgList, ["main", !0])?.orgName, e || "";
|
|
2178
|
+
});
|
|
2179
|
+
async function i(e) {
|
|
2180
|
+
let { account: t, password: n, captchaHash: r, captchas: i, loginType: a = "password" } = e, o = await ko({
|
|
2181
|
+
loginType: a,
|
|
2182
|
+
loginName: t,
|
|
2183
|
+
loginPwd: await To(n),
|
|
2184
|
+
codeHash: r,
|
|
2185
|
+
code: i
|
|
2186
|
+
}), { accessToken: s, refreshToken: c } = o.data;
|
|
2187
|
+
return u(s, c), o;
|
|
2188
|
+
}
|
|
2189
|
+
async function a(e) {
|
|
2190
|
+
let { account: t, password: n, captchaHash: r, captchas: i, loginType: a = "password", captchaType: o } = e, s = await jo({
|
|
2191
|
+
loginType: a,
|
|
2192
|
+
loginName: t,
|
|
2193
|
+
loginPwd: await To(n),
|
|
2194
|
+
codeHash: r,
|
|
2195
|
+
code: i,
|
|
2196
|
+
captchaType: o
|
|
2197
|
+
}), { accessToken: c, refreshToken: l } = s.data;
|
|
2198
|
+
return u(c, l), s;
|
|
2199
|
+
}
|
|
2200
|
+
function o() {
|
|
2201
|
+
e?.push({ name: "Login" });
|
|
2202
|
+
}
|
|
2203
|
+
function s() {
|
|
2204
|
+
t.account = "", t.userId = "", t.token = "", t.refreshToken = "", t.avatar = "", t.permissions = [], t.orgId = "", t.orgList = [];
|
|
2205
|
+
}
|
|
2206
|
+
async function c() {
|
|
2207
|
+
let e = await xi(), n = e.data;
|
|
2208
|
+
return t.account = n.realName || n.loginName, t.avatar = n.userPic, t.userId = n.id, t.orgList = n.userOrgList, n.userOrgList?.length && !t.orgId && (t.orgId = Vn(n.userOrgList, ["main", !0]).orgId), e;
|
|
2209
|
+
}
|
|
2210
|
+
async function l(e) {
|
|
2211
|
+
let t = {};
|
|
2212
|
+
return e.token && (t.authorization = e.token), await bi({
|
|
2213
|
+
oldPassword: await To(e.oldPassword),
|
|
2214
|
+
newPassword: await To(e.newPassword)
|
|
2215
|
+
}, { headers: t });
|
|
2216
|
+
}
|
|
2217
|
+
function u(e, n) {
|
|
2218
|
+
t.token = e, t.refreshToken = n;
|
|
2219
|
+
}
|
|
2220
|
+
async function d() {
|
|
2221
|
+
return t.permissions = (await Si()).data, t.permissions;
|
|
2222
|
+
}
|
|
2223
|
+
async function f(n) {
|
|
2224
|
+
let { accessToken: r, refreshToken: i } = (await Oo({ orgId: n })).data;
|
|
2225
|
+
u(r, i), t.orgId = n, e?.push({ path: "/" });
|
|
2226
|
+
}
|
|
2227
|
+
return {
|
|
2228
|
+
user: t,
|
|
2229
|
+
userOrgName: r,
|
|
2230
|
+
isLogin: n,
|
|
2231
|
+
getUserInfo: c,
|
|
2232
|
+
getPermissions: d,
|
|
2233
|
+
login: i,
|
|
2234
|
+
signIn: a,
|
|
2235
|
+
logout: o,
|
|
2236
|
+
changePassword: l,
|
|
2237
|
+
changeOrg: f,
|
|
2238
|
+
setToken: u,
|
|
2239
|
+
clean: s
|
|
2240
|
+
};
|
|
2241
|
+
}, { persist: !0 }), Xi = k(M.ROUTE, () => {
|
|
2242
|
+
let e = Ei(), t = qi(), r = Yi(), i = Ji(), o = j(!1), s = j([]), c = j([]), l = j([]), u = j([]), d = A(() => {
|
|
2243
|
+
let { app: e, menu: n } = t.settings;
|
|
2244
|
+
return e.enablePermission && !n.showWithoutPermission;
|
|
2245
|
+
});
|
|
2246
|
+
function f(e, t) {
|
|
2247
|
+
let { title: n, icon: r, activeIcon: i, breadcrumb: a = !0 } = Cn(e.meta, {});
|
|
2248
|
+
return {
|
|
2249
|
+
path: Cn(t, e.path),
|
|
2250
|
+
title: n,
|
|
2251
|
+
icon: r,
|
|
2252
|
+
activeIcon: i,
|
|
2253
|
+
hide: !a
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
function p(e, t, n, r) {
|
|
2257
|
+
let i = O(r), a = f(e, t);
|
|
2258
|
+
i.push(a);
|
|
2259
|
+
function o(e) {
|
|
2260
|
+
return Wn(e, "children") ? sr(e, "children") : e;
|
|
2261
|
+
}
|
|
2262
|
+
let s = {
|
|
2263
|
+
path: t,
|
|
2264
|
+
meta: {
|
|
2265
|
+
auth: n,
|
|
2266
|
+
breadcrumbNeste: i
|
|
2267
|
+
}
|
|
2268
|
+
};
|
|
2269
|
+
return Qn(o(O(Ne(e))), s);
|
|
2270
|
+
}
|
|
2271
|
+
function h(e) {
|
|
2272
|
+
return e.children &&= g(e.children, [f(e)], e.path, e.meta?.auth), e;
|
|
2273
|
+
}
|
|
2274
|
+
function g(e, t = [], n = "", r) {
|
|
2275
|
+
return Ne(e).reduce((e, i) => {
|
|
2276
|
+
let a = R(n, i.path), o = Cn(i.meta?.auth, r), s = p(i, a, o, t);
|
|
2277
|
+
return e.push(s), i.children && g(i.children, s?.meta?.breadcrumbNeste, a, o).forEach((t) => {
|
|
2278
|
+
e.some((e) => e.path === t.path) ? e.forEach((n, r) => {
|
|
2279
|
+
n.path === t.path && (e[r] = t);
|
|
2280
|
+
}) : e.push(t);
|
|
2281
|
+
}), e;
|
|
2282
|
+
}, []);
|
|
2283
|
+
}
|
|
2284
|
+
let _ = A(() => {
|
|
2285
|
+
let e = [];
|
|
2286
|
+
return s.value.length && (s.value.forEach((t) => {
|
|
2287
|
+
if (N(t, "meta.isDev", !1)) {
|
|
2288
|
+
I(`开发模式应用"${t.meta?.title}"的子路由将不会被注册到vue-router中`);
|
|
2289
|
+
return;
|
|
2290
|
+
}
|
|
2291
|
+
if (t.children?.length) {
|
|
2292
|
+
let n = O(t.children);
|
|
2293
|
+
n = n.map((e) => Qn(e, { meta: { auth: Cn(e.meta?.auth, t.meta?.auth) } })), e.push(...n);
|
|
2294
|
+
}
|
|
2295
|
+
}), e.forEach((e) => h(e))), e;
|
|
2296
|
+
}), v = A(() => {
|
|
2297
|
+
let e = [...ki()];
|
|
2298
|
+
return e.forEach((e) => h(e)), e;
|
|
2299
|
+
});
|
|
2300
|
+
function y(e, t) {
|
|
2301
|
+
if (Zn(t.meta?.auth)) return !0;
|
|
2302
|
+
let n = t.meta.auth;
|
|
2303
|
+
return Ne(e).some((e) => Kn(n) ? n === "" ? !0 : n === e : m(n) ? n.length === 0 ? !0 : n.includes(e) : (I("路由权限类型配置错误, 请检查路由 meta.auth"), !1));
|
|
2304
|
+
}
|
|
2305
|
+
function b(e, t) {
|
|
2306
|
+
let n = [];
|
|
2307
|
+
return e.forEach((e) => {
|
|
2308
|
+
if (y(t, e)) {
|
|
2309
|
+
let r = O(e);
|
|
2310
|
+
r.children && r.children.length > 0 ? (r.children = b(r.children, t), (r.children.length || N(r, "meta.isDev", !1)) && n.push(r)) : (N(r, "meta.isDev", !1) && (r.children = []), n.push(r));
|
|
2311
|
+
}
|
|
2312
|
+
}), n;
|
|
2313
|
+
}
|
|
2314
|
+
let x = A(() => d.value ? b(s.value, r?.user?.permissions ?? []) : O(s.value));
|
|
2315
|
+
function S(e) {
|
|
2316
|
+
return e.map((e) => {
|
|
2317
|
+
let t = n(e?.meta?.layoutComponent);
|
|
2318
|
+
return e.children && e.children.length > 0 && e.children.forEach((n, r, i) => {
|
|
2319
|
+
if (n.meta?.singleMenu) {
|
|
2320
|
+
let { name: e, ...a } = n;
|
|
2321
|
+
i[r] = {
|
|
2322
|
+
...a,
|
|
2323
|
+
component: t,
|
|
2324
|
+
children: [{
|
|
2325
|
+
path: "",
|
|
2326
|
+
name: e,
|
|
2327
|
+
component: n.component,
|
|
2328
|
+
meta: {
|
|
2329
|
+
title: n.meta.title,
|
|
2330
|
+
sidebar: !1,
|
|
2331
|
+
breadcrumb: !1
|
|
2332
|
+
}
|
|
2333
|
+
}]
|
|
2334
|
+
}, delete i[r].meta.singleMenu;
|
|
2335
|
+
}
|
|
2336
|
+
n.component ||= t, e.meta?.provider && (n.meta = {
|
|
2337
|
+
...n.meta,
|
|
2338
|
+
provider: e.meta.provider
|
|
2339
|
+
});
|
|
2340
|
+
}), e;
|
|
2341
|
+
}), e;
|
|
2342
|
+
}
|
|
2343
|
+
function C(e) {
|
|
2344
|
+
return e.length ? e.filter((e) => (e.children && e.children.length > 0 && (e.children = C(e.children)), e?.meta?.enabled !== !1)) : [];
|
|
2345
|
+
}
|
|
2346
|
+
async function w() {
|
|
2347
|
+
t.settings.app.enablePermission && await r.getPermissions();
|
|
2348
|
+
let n = await Ci({ needAll: !d.value });
|
|
2349
|
+
if (n.success) {
|
|
2350
|
+
c.value = n?.data ?? [];
|
|
2351
|
+
let t = S(C(O(e))), r = n.data?.map((e) => {
|
|
2352
|
+
if (e.type === L.APP) {
|
|
2353
|
+
let n = t.find((t) => t.meta?.auth === e.code);
|
|
2354
|
+
return n && N(n, "meta.isDev", !1) && I(`静态应用"${n.meta?.title}"处于开发模式,将在TopMode中显示开发状态`), n;
|
|
2355
|
+
}
|
|
2356
|
+
return e.type === L.DYNAMIC_APP ? (e.meta?.isDev && I(`动态应用"${e.name}"处于开发模式,将在TopMode中显示开发状态`), Ai([e])[0]) : !1;
|
|
2357
|
+
}).filter((e) => !!e) ?? [], i = t.filter((e) => {
|
|
2358
|
+
let { auth: t } = e.meta ?? {};
|
|
2359
|
+
return Kn(t) ? !n.data?.map((e) => e.code).includes(t) : !0;
|
|
2360
|
+
});
|
|
2361
|
+
s.value = await a("route:transform", ee([...r, ...i], n.data ?? []));
|
|
2362
|
+
}
|
|
2363
|
+
o.value = !0, t.settings.tabbar.enable && i.initPermanentTab();
|
|
2364
|
+
}
|
|
2365
|
+
function ee(e, t) {
|
|
2366
|
+
let n = new Map(t.map((e, t) => [e.code, t])), r = e.filter((e) => n.has(e.meta?.auth)), i = e.filter((e) => !n.has(e.meta?.auth));
|
|
2367
|
+
return r.sort((e, t) => (n.get(e.meta.auth) ?? Infinity) - (n.get(t.meta.auth) ?? Infinity)), [...r, ...i];
|
|
2368
|
+
}
|
|
2369
|
+
function T(e) {
|
|
2370
|
+
u.value = e;
|
|
2371
|
+
}
|
|
2372
|
+
function te(e = !1) {
|
|
2373
|
+
o.value = !1, s.value = [], l.value = [], e ? u.value = u.value.filter((e) => e.system) : (u.value.forEach((e) => e()), u.value = []);
|
|
2374
|
+
}
|
|
2375
|
+
function E(e) {
|
|
2376
|
+
let t = e ?? (typeof Fe == "function" ? Fe() : void 0);
|
|
2377
|
+
if (!t) {
|
|
2378
|
+
I("getRemoteRouteById: 无法获取路由对象");
|
|
2379
|
+
return;
|
|
2380
|
+
}
|
|
2381
|
+
let n = t.meta?.id;
|
|
2382
|
+
if (!n) {
|
|
2383
|
+
I("getRemoteRouteById: 路由 meta 中未找到 id");
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
function r(e) {
|
|
2387
|
+
for (let t of e) {
|
|
2388
|
+
if (t.id === n) return t;
|
|
2389
|
+
if (t.children && t.children.length > 0) {
|
|
2390
|
+
let e = r(t.children);
|
|
2391
|
+
if (e) return e;
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
return r(c.value);
|
|
2396
|
+
}
|
|
2397
|
+
function D(e) {
|
|
2398
|
+
let t = e ?? (typeof Fe == "function" ? Fe() : void 0);
|
|
2399
|
+
if (!t) {
|
|
2400
|
+
I("getRemoteAppRouteById: 无法获取路由对象");
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
let n = t.meta?.id;
|
|
2404
|
+
if (!n) {
|
|
2405
|
+
I("getRemoteAppRouteById: 路由 meta 中未找到 id");
|
|
2406
|
+
return;
|
|
2407
|
+
}
|
|
2408
|
+
function r(e, t) {
|
|
2409
|
+
for (let i of e) {
|
|
2410
|
+
let e = i.type === L.APP || i.type === L.DYNAMIC_APP ? i : t;
|
|
2411
|
+
if (i.id === n) return e;
|
|
2412
|
+
if (i.children && i.children.length > 0) {
|
|
2413
|
+
let t = r(i.children, e);
|
|
2414
|
+
if (t) return t;
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
return r(c.value);
|
|
2419
|
+
}
|
|
2420
|
+
return {
|
|
2421
|
+
isGenerate: o,
|
|
2422
|
+
routes: x,
|
|
2423
|
+
currentRemoveRoutes: u,
|
|
2424
|
+
flatRoutes: _,
|
|
2425
|
+
flatSystemRoutes: v,
|
|
2426
|
+
remoteRoutesRaw: c,
|
|
2427
|
+
generateRoutes: w,
|
|
2428
|
+
setCurrentRemoveRoutes: T,
|
|
2429
|
+
removeRoutes: te,
|
|
2430
|
+
getRemoteRouteById: E,
|
|
2431
|
+
getRemoteAppRouteById: D
|
|
2432
|
+
};
|
|
2433
|
+
}), Zi = yi(), Qi = k(M.MENU, () => {
|
|
2434
|
+
let e = qi(), t = Xi(), n = j([{
|
|
2435
|
+
meta: {},
|
|
2436
|
+
children: []
|
|
2437
|
+
}]), r = j(0);
|
|
2438
|
+
function i(e = [], t = "") {
|
|
2439
|
+
return e.map((e) => (e.path = R(t, e.path), e.children &&= i(e.children, e.path), e));
|
|
2440
|
+
}
|
|
2441
|
+
let o = ke(async () => {
|
|
2442
|
+
let n = [{
|
|
2443
|
+
meta: {},
|
|
2444
|
+
children: []
|
|
2445
|
+
}];
|
|
2446
|
+
return e.settings.menu.menuMode === "single" ? (n[0].children = [], t.routes.forEach((e) => {
|
|
2447
|
+
N(e, "meta.isDev", !1) ? I(`侧边栏模式(不含主导航)下省略${e.meta.title}的子集菜单,因为该菜单开启了isDev属性。`) : n[0].children?.push(...e.children);
|
|
2448
|
+
})) : n = t.routes, n.forEach((e) => i(e.children)), await a("menu:transform", n);
|
|
2449
|
+
}, []), s = A(() => {
|
|
2450
|
+
if (o.value.filter((e) => !N(e, "meta.isDev", !1)).length === 0) return [];
|
|
2451
|
+
for (;;) {
|
|
2452
|
+
let e = o.value[r.value];
|
|
2453
|
+
if (r.value >= o.value.length - 1 || e.children.length > 0 && !N(e, "meta.isDev", !1)) break;
|
|
2454
|
+
r.value++;
|
|
2455
|
+
}
|
|
2456
|
+
return o.value[r.value].children ?? [];
|
|
2457
|
+
}), c = A(() => s.value.length > 0 ? l(s.value[0]) : "/");
|
|
2458
|
+
function l(e, t = "") {
|
|
2459
|
+
let n = "";
|
|
2460
|
+
if (e.children && e.children.length > 0) {
|
|
2461
|
+
let r = e.children.find((e) => e.meta?.sidebar !== !1);
|
|
2462
|
+
r ? n = l(r, R(t, e.path)) : e.children.some((e) => e.meta?.sidebar !== !1 || e.children && e.children.length > 0) ? n = l(e.children[0], R(t, e.path)) : (I(`目录"${e.meta?.title || e.path}"下没有可显示的菜单项`), n = R(t, e.path));
|
|
2463
|
+
} else n = R(t, e.path);
|
|
2464
|
+
return n;
|
|
2465
|
+
}
|
|
2466
|
+
let u = A(() => {
|
|
2467
|
+
let e = [];
|
|
2468
|
+
return o.value.forEach((t) => {
|
|
2469
|
+
e.push(...d(t.children));
|
|
2470
|
+
}), e;
|
|
2471
|
+
});
|
|
2472
|
+
function d(e = [], t = "") {
|
|
2473
|
+
let n = [];
|
|
2474
|
+
return e.forEach((e) => {
|
|
2475
|
+
if (e.meta?.defaultOpened && e.children) {
|
|
2476
|
+
n.push(R(t, e.path));
|
|
2477
|
+
let r = d(e.children, R(t, e.path));
|
|
2478
|
+
r.length > 0 && n.push(...r);
|
|
2479
|
+
}
|
|
2480
|
+
}), n;
|
|
2481
|
+
}
|
|
2482
|
+
function f(e) {
|
|
2483
|
+
if (Xn(e)) r.value = e;
|
|
2484
|
+
else {
|
|
2485
|
+
let t = p(o.value, e);
|
|
2486
|
+
t >= 0 && (r.value = t);
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
function p(e, t) {
|
|
2490
|
+
function n(e) {
|
|
2491
|
+
return (0, Zi.match)(e.path ?? "", { decode: decodeURIComponent })(t) ? !0 : e.children ? e.children.some((e) => n(e)) : !1;
|
|
2492
|
+
}
|
|
2493
|
+
for (let t = 0; t < e.length; t++) if (n(e[t])) return t;
|
|
2494
|
+
return 0;
|
|
2495
|
+
}
|
|
2496
|
+
return {
|
|
2497
|
+
menus: n,
|
|
2498
|
+
actived: r,
|
|
2499
|
+
allMenus: o,
|
|
2500
|
+
sidebarMenus: s,
|
|
2501
|
+
sidebarMenusFirstDeepestPath: c,
|
|
2502
|
+
defaultOpenedPaths: u,
|
|
2503
|
+
setActived: f
|
|
2504
|
+
};
|
|
2505
|
+
});
|
|
2506
|
+
//#endregion
|
|
2507
|
+
//#region src/utils/cleanup.ts
|
|
2508
|
+
function $i() {
|
|
2509
|
+
Yi().clean(), ea();
|
|
2510
|
+
}
|
|
2511
|
+
function ea() {
|
|
2512
|
+
Ji().clean(), Ar().clean(), Xi().removeRoutes(), Qi().setActived(0);
|
|
2513
|
+
}
|
|
2514
|
+
//#endregion
|
|
2515
|
+
//#region src/utils/path.ts
|
|
2516
|
+
var ta = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
2517
|
+
function n(e) {
|
|
2518
|
+
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
2519
|
+
}
|
|
2520
|
+
function r(e, t) {
|
|
2521
|
+
for (var n = "", r = 0, i = -1, a = 0, o, s = 0; s <= e.length; ++s) {
|
|
2522
|
+
if (s < e.length) o = e.charCodeAt(s);
|
|
2523
|
+
else if (o === 47) break;
|
|
2524
|
+
else o = 47;
|
|
2525
|
+
if (o === 47) {
|
|
2526
|
+
if (!(i === s - 1 || a === 1)) if (i !== s - 1 && a === 2) {
|
|
2527
|
+
if (n.length < 2 || r !== 2 || n.charCodeAt(n.length - 1) !== 46 || n.charCodeAt(n.length - 2) !== 46) {
|
|
2528
|
+
if (n.length > 2) {
|
|
2529
|
+
var c = n.lastIndexOf("/");
|
|
2530
|
+
if (c !== n.length - 1) {
|
|
2531
|
+
c === -1 ? (n = "", r = 0) : (n = n.slice(0, c), r = n.length - 1 - n.lastIndexOf("/")), i = s, a = 0;
|
|
2532
|
+
continue;
|
|
2533
|
+
}
|
|
2534
|
+
} else if (n.length === 2 || n.length === 1) {
|
|
2535
|
+
n = "", r = 0, i = s, a = 0;
|
|
2536
|
+
continue;
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
t && (n.length > 0 ? n += "/.." : n = "..", r = 2);
|
|
2540
|
+
} else n.length > 0 ? n += "/" + e.slice(i + 1, s) : n = e.slice(i + 1, s), r = s - i - 1;
|
|
2541
|
+
i = s, a = 0;
|
|
2542
|
+
} else o === 46 && a !== -1 ? ++a : a = -1;
|
|
2543
|
+
}
|
|
2544
|
+
return n;
|
|
2545
|
+
}
|
|
2546
|
+
function i(e, t) {
|
|
2547
|
+
var n = t.dir || t.root, r = t.base || (t.name || "") + (t.ext || "");
|
|
2548
|
+
return n ? n === t.root ? n + r : n + e + r : r;
|
|
2549
|
+
}
|
|
2550
|
+
var a = {
|
|
2551
|
+
resolve: function() {
|
|
2552
|
+
for (var e = "", t = !1, i, a = arguments.length - 1; a >= -1 && !t; a--) {
|
|
2553
|
+
var o;
|
|
2554
|
+
a >= 0 ? o = arguments[a] : (i === void 0 && (i = process.cwd()), o = i), n(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
|
|
2555
|
+
}
|
|
2556
|
+
return e = r(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
2557
|
+
},
|
|
2558
|
+
normalize: function(e) {
|
|
2559
|
+
if (n(e), e.length === 0) return ".";
|
|
2560
|
+
var t = e.charCodeAt(0) === 47, i = e.charCodeAt(e.length - 1) === 47;
|
|
2561
|
+
return e = r(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && i && (e += "/"), t ? "/" + e : e;
|
|
2562
|
+
},
|
|
2563
|
+
isAbsolute: function(e) {
|
|
2564
|
+
return n(e), e.length > 0 && e.charCodeAt(0) === 47;
|
|
2565
|
+
},
|
|
2566
|
+
join: function() {
|
|
2567
|
+
if (arguments.length === 0) return ".";
|
|
2568
|
+
for (var e, t = 0; t < arguments.length; ++t) {
|
|
2569
|
+
var r = arguments[t];
|
|
2570
|
+
n(r), r.length > 0 && (e === void 0 ? e = r : e += "/" + r);
|
|
2571
|
+
}
|
|
2572
|
+
return e === void 0 ? "." : a.normalize(e);
|
|
2573
|
+
},
|
|
2574
|
+
relative: function(e, t) {
|
|
2575
|
+
if (n(e), n(t), e === t || (e = a.resolve(e), t = a.resolve(t), e === t)) return "";
|
|
2576
|
+
for (var r = 1; r < e.length && e.charCodeAt(r) === 47; ++r);
|
|
2577
|
+
for (var i = e.length, o = i - r, s = 1; s < t.length && t.charCodeAt(s) === 47; ++s);
|
|
2578
|
+
for (var c = t.length - s, l = o < c ? o : c, u = -1, d = 0; d <= l; ++d) {
|
|
2579
|
+
if (d === l) {
|
|
2580
|
+
if (c > l) {
|
|
2581
|
+
if (t.charCodeAt(s + d) === 47) return t.slice(s + d + 1);
|
|
2582
|
+
if (d === 0) return t.slice(s + d);
|
|
2583
|
+
} else o > l && (e.charCodeAt(r + d) === 47 ? u = d : d === 0 && (u = 0));
|
|
2584
|
+
break;
|
|
2585
|
+
}
|
|
2586
|
+
var f = e.charCodeAt(r + d);
|
|
2587
|
+
if (f !== t.charCodeAt(s + d)) break;
|
|
2588
|
+
f === 47 && (u = d);
|
|
2589
|
+
}
|
|
2590
|
+
var p = "";
|
|
2591
|
+
for (d = r + u + 1; d <= i; ++d) (d === i || e.charCodeAt(d) === 47) && (p.length === 0 ? p += ".." : p += "/..");
|
|
2592
|
+
return p.length > 0 ? p + t.slice(s + u) : (s += u, t.charCodeAt(s) === 47 && ++s, t.slice(s));
|
|
2593
|
+
},
|
|
2594
|
+
_makeLong: function(e) {
|
|
2595
|
+
return e;
|
|
2596
|
+
},
|
|
2597
|
+
dirname: function(e) {
|
|
2598
|
+
if (n(e), e.length === 0) return ".";
|
|
2599
|
+
for (var t = e.charCodeAt(0), r = t === 47, i = -1, a = !0, o = e.length - 1; o >= 1; --o) if (t = e.charCodeAt(o), t === 47) {
|
|
2600
|
+
if (!a) {
|
|
2601
|
+
i = o;
|
|
2602
|
+
break;
|
|
2603
|
+
}
|
|
2604
|
+
} else a = !1;
|
|
2605
|
+
return i === -1 ? r ? "/" : "." : r && i === 1 ? "//" : e.slice(0, i);
|
|
2606
|
+
},
|
|
2607
|
+
basename: function(e, t) {
|
|
2608
|
+
if (t !== void 0 && typeof t != "string") throw TypeError("\"ext\" argument must be a string");
|
|
2609
|
+
n(e);
|
|
2610
|
+
var r = 0, i = -1, a = !0, o;
|
|
2611
|
+
if (t !== void 0 && t.length > 0 && t.length <= e.length) {
|
|
2612
|
+
if (t.length === e.length && t === e) return "";
|
|
2613
|
+
var s = t.length - 1, c = -1;
|
|
2614
|
+
for (o = e.length - 1; o >= 0; --o) {
|
|
2615
|
+
var l = e.charCodeAt(o);
|
|
2616
|
+
if (l === 47) {
|
|
2617
|
+
if (!a) {
|
|
2618
|
+
r = o + 1;
|
|
2619
|
+
break;
|
|
2620
|
+
}
|
|
2621
|
+
} else c === -1 && (a = !1, c = o + 1), s >= 0 && (l === t.charCodeAt(s) ? --s === -1 && (i = o) : (s = -1, i = c));
|
|
2622
|
+
}
|
|
2623
|
+
return r === i ? i = c : i === -1 && (i = e.length), e.slice(r, i);
|
|
2624
|
+
} else {
|
|
2625
|
+
for (o = e.length - 1; o >= 0; --o) if (e.charCodeAt(o) === 47) {
|
|
2626
|
+
if (!a) {
|
|
2627
|
+
r = o + 1;
|
|
2628
|
+
break;
|
|
2629
|
+
}
|
|
2630
|
+
} else i === -1 && (a = !1, i = o + 1);
|
|
2631
|
+
return i === -1 ? "" : e.slice(r, i);
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
extname: function(e) {
|
|
2635
|
+
n(e);
|
|
2636
|
+
for (var t = -1, r = 0, i = -1, a = !0, o = 0, s = e.length - 1; s >= 0; --s) {
|
|
2637
|
+
var c = e.charCodeAt(s);
|
|
2638
|
+
if (c === 47) {
|
|
2639
|
+
if (!a) {
|
|
2640
|
+
r = s + 1;
|
|
2641
|
+
break;
|
|
2642
|
+
}
|
|
2643
|
+
continue;
|
|
2644
|
+
}
|
|
2645
|
+
i === -1 && (a = !1, i = s + 1), c === 46 ? t === -1 ? t = s : o !== 1 && (o = 1) : t !== -1 && (o = -1);
|
|
2646
|
+
}
|
|
2647
|
+
return t === -1 || i === -1 || o === 0 || o === 1 && t === i - 1 && t === r + 1 ? "" : e.slice(t, i);
|
|
2648
|
+
},
|
|
2649
|
+
format: function(e) {
|
|
2650
|
+
if (typeof e != "object" || !e) throw TypeError("The \"pathObject\" argument must be of type Object. Received type " + typeof e);
|
|
2651
|
+
return i("/", e);
|
|
2652
|
+
},
|
|
2653
|
+
parse: function(e) {
|
|
2654
|
+
n(e);
|
|
2655
|
+
var t = {
|
|
2656
|
+
root: "",
|
|
2657
|
+
dir: "",
|
|
2658
|
+
base: "",
|
|
2659
|
+
ext: "",
|
|
2660
|
+
name: ""
|
|
2661
|
+
};
|
|
2662
|
+
if (e.length === 0) return t;
|
|
2663
|
+
var r = e.charCodeAt(0), i = r === 47, a;
|
|
2664
|
+
i ? (t.root = "/", a = 1) : a = 0;
|
|
2665
|
+
for (var o = -1, s = 0, c = -1, l = !0, u = e.length - 1, d = 0; u >= a; --u) {
|
|
2666
|
+
if (r = e.charCodeAt(u), r === 47) {
|
|
2667
|
+
if (!l) {
|
|
2668
|
+
s = u + 1;
|
|
2669
|
+
break;
|
|
2670
|
+
}
|
|
2671
|
+
continue;
|
|
2672
|
+
}
|
|
2673
|
+
c === -1 && (l = !1, c = u + 1), r === 46 ? o === -1 ? o = u : d !== 1 && (d = 1) : o !== -1 && (d = -1);
|
|
2674
|
+
}
|
|
2675
|
+
return o === -1 || c === -1 || d === 0 || d === 1 && o === c - 1 && o === s + 1 ? c !== -1 && (s === 0 && i ? t.base = t.name = e.slice(1, c) : t.base = t.name = e.slice(s, c)) : (s === 0 && i ? (t.name = e.slice(1, o), t.base = e.slice(1, c)) : (t.name = e.slice(s, o), t.base = e.slice(s, c)), t.ext = e.slice(o, c)), s > 0 ? t.dir = e.slice(0, s - 1) : i && (t.dir = "/"), t;
|
|
2676
|
+
},
|
|
2677
|
+
sep: "/",
|
|
2678
|
+
delimiter: ":",
|
|
2679
|
+
win32: null,
|
|
2680
|
+
posix: null
|
|
2681
|
+
};
|
|
2682
|
+
a.posix = a, t.exports = a;
|
|
2683
|
+
})))(), 1);
|
|
2684
|
+
function R(e, t) {
|
|
2685
|
+
return e ? ta.default.resolve(e, t ?? "") : t ?? "";
|
|
2686
|
+
}
|
|
2687
|
+
//#endregion
|
|
2688
|
+
//#region src/utils/proxy.ts
|
|
2689
|
+
function na(e, t) {
|
|
2690
|
+
return new Proxy({}, { get(n, r) {
|
|
2691
|
+
let i;
|
|
2692
|
+
try {
|
|
2693
|
+
i = e();
|
|
2694
|
+
} catch (e) {
|
|
2695
|
+
let n = c("state");
|
|
2696
|
+
if (n && n[t]) {
|
|
2697
|
+
let e = n[t], i = e[r];
|
|
2698
|
+
return typeof i == "function" ? i.bind(e) : i;
|
|
2699
|
+
}
|
|
2700
|
+
throw e;
|
|
2701
|
+
}
|
|
2702
|
+
let a = i[t];
|
|
2703
|
+
if (!a) throw Error(`Instance "${String(t)}" has not been set. Please call createContext() before using "${String(r)}".`);
|
|
2704
|
+
let o = a[r];
|
|
2705
|
+
return typeof o == "function" ? o.bind(a) : o;
|
|
2706
|
+
} });
|
|
2707
|
+
}
|
|
2708
|
+
//#endregion
|
|
2709
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/util.js
|
|
2710
|
+
var ra = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
2711
|
+
function z(e) {
|
|
2712
|
+
return ra.charAt(e);
|
|
2713
|
+
}
|
|
2714
|
+
function ia(e, t) {
|
|
2715
|
+
return e & t;
|
|
2716
|
+
}
|
|
2717
|
+
function aa(e, t) {
|
|
2718
|
+
return e | t;
|
|
2719
|
+
}
|
|
2720
|
+
function oa(e, t) {
|
|
2721
|
+
return e ^ t;
|
|
2722
|
+
}
|
|
2723
|
+
function sa(e, t) {
|
|
2724
|
+
return e & ~t;
|
|
2725
|
+
}
|
|
2726
|
+
function ca(e) {
|
|
2727
|
+
if (e == 0) return -1;
|
|
2728
|
+
var t = 0;
|
|
2729
|
+
return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
|
|
2730
|
+
}
|
|
2731
|
+
function la(e) {
|
|
2732
|
+
for (var t = 0; e != 0;) e &= e - 1, ++t;
|
|
2733
|
+
return t;
|
|
2734
|
+
}
|
|
2735
|
+
//#endregion
|
|
2736
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/base64.js
|
|
2737
|
+
var ua = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", da = "=";
|
|
2738
|
+
function fa(e) {
|
|
2739
|
+
var t, n, r = "";
|
|
2740
|
+
for (t = 0; t + 3 <= e.length; t += 3) n = parseInt(e.substring(t, t + 3), 16), r += ua.charAt(n >> 6) + ua.charAt(n & 63);
|
|
2741
|
+
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16), r += ua.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16), r += ua.charAt(n >> 2) + ua.charAt((n & 3) << 4)); (r.length & 3) > 0;) r += da;
|
|
2742
|
+
return r;
|
|
2743
|
+
}
|
|
2744
|
+
function pa(e) {
|
|
2745
|
+
var t = "", n, r = 0, i = 0;
|
|
2746
|
+
for (n = 0; n < e.length && e.charAt(n) != da; ++n) {
|
|
2747
|
+
var a = ua.indexOf(e.charAt(n));
|
|
2748
|
+
a < 0 || (r == 0 ? (t += z(a >> 2), i = a & 3, r = 1) : r == 1 ? (t += z(i << 2 | a >> 4), i = a & 15, r = 2) : r == 2 ? (t += z(i), t += z(a >> 2), i = a & 3, r = 3) : (t += z(i << 2 | a >> 4), t += z(a & 15), r = 0));
|
|
2749
|
+
}
|
|
2750
|
+
return r == 1 && (t += z(i << 2)), t;
|
|
2751
|
+
}
|
|
2752
|
+
//#endregion
|
|
2753
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/asn1js/hex.js
|
|
2754
|
+
var ma, ha = { decode: function(e) {
|
|
2755
|
+
var t;
|
|
2756
|
+
if (ma === void 0) {
|
|
2757
|
+
var n = "0123456789ABCDEF", r = " \f\n\r \xA0\u2028\u2029";
|
|
2758
|
+
for (ma = {}, t = 0; t < 16; ++t) ma[n.charAt(t)] = t;
|
|
2759
|
+
for (n = n.toLowerCase(), t = 10; t < 16; ++t) ma[n.charAt(t)] = t;
|
|
2760
|
+
for (t = 0; t < r.length; ++t) ma[r.charAt(t)] = -1;
|
|
2761
|
+
}
|
|
2762
|
+
var i = [], a = 0, o = 0;
|
|
2763
|
+
for (t = 0; t < e.length; ++t) {
|
|
2764
|
+
var s = e.charAt(t);
|
|
2765
|
+
if (s == "=") break;
|
|
2766
|
+
if (s = ma[s], s != -1) {
|
|
2767
|
+
if (s === void 0) throw Error("Illegal character at offset " + t);
|
|
2768
|
+
a |= s, ++o >= 2 ? (i[i.length] = a, a = 0, o = 0) : a <<= 4;
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
if (o) throw Error("Hex encoding incomplete: 4 bits missing");
|
|
2772
|
+
return i;
|
|
2773
|
+
} }, ga, _a = {
|
|
2774
|
+
decode: function(e) {
|
|
2775
|
+
var t;
|
|
2776
|
+
if (ga === void 0) {
|
|
2777
|
+
var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = "= \f\n\r \xA0\u2028\u2029";
|
|
2778
|
+
for (ga = Object.create(null), t = 0; t < 64; ++t) ga[n.charAt(t)] = t;
|
|
2779
|
+
for (ga["-"] = 62, ga._ = 63, t = 0; t < r.length; ++t) ga[r.charAt(t)] = -1;
|
|
2780
|
+
}
|
|
2781
|
+
var i = [], a = 0, o = 0;
|
|
2782
|
+
for (t = 0; t < e.length; ++t) {
|
|
2783
|
+
var s = e.charAt(t);
|
|
2784
|
+
if (s == "=") break;
|
|
2785
|
+
if (s = ga[s], s != -1) {
|
|
2786
|
+
if (s === void 0) throw Error("Illegal character at offset " + t);
|
|
2787
|
+
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;
|
|
2788
|
+
}
|
|
2789
|
+
}
|
|
2790
|
+
switch (o) {
|
|
2791
|
+
case 1: throw Error("Base64 encoding incomplete: at least 2 bits missing");
|
|
2792
|
+
case 2:
|
|
2793
|
+
i[i.length] = a >> 10;
|
|
2794
|
+
break;
|
|
2795
|
+
case 3:
|
|
2796
|
+
i[i.length] = a >> 16, i[i.length] = a >> 8 & 255;
|
|
2797
|
+
break;
|
|
2798
|
+
}
|
|
2799
|
+
return i;
|
|
2800
|
+
},
|
|
2801
|
+
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
2802
|
+
unarmor: function(e) {
|
|
2803
|
+
var t = _a.re.exec(e);
|
|
2804
|
+
if (t) if (t[1]) e = t[1];
|
|
2805
|
+
else if (t[2]) e = t[2];
|
|
2806
|
+
else throw Error("RegExp out of sync");
|
|
2807
|
+
return _a.decode(e);
|
|
2808
|
+
}
|
|
2809
|
+
}, va = 0x9184e72a000, ya = function() {
|
|
2810
|
+
function e(e) {
|
|
2811
|
+
this.buf = [+e || 0];
|
|
2812
|
+
}
|
|
2813
|
+
return e.prototype.mulAdd = function(e, t) {
|
|
2814
|
+
var n = this.buf, r = n.length, i, a;
|
|
2815
|
+
for (i = 0; i < r; ++i) a = n[i] * e + t, a < va ? t = 0 : (t = 0 | a / va, a -= t * va), n[i] = a;
|
|
2816
|
+
t > 0 && (n[i] = t);
|
|
2817
|
+
}, e.prototype.sub = function(e) {
|
|
2818
|
+
var t = this.buf, n = t.length, r, i;
|
|
2819
|
+
for (r = 0; r < n; ++r) i = t[r] - e, i < 0 ? (i += va, e = 1) : e = 0, t[r] = i;
|
|
2820
|
+
for (; t[t.length - 1] === 0;) t.pop();
|
|
2821
|
+
}, e.prototype.toString = function(e) {
|
|
2822
|
+
if ((e || 10) != 10) throw Error("only base 10 is supported");
|
|
2823
|
+
for (var t = this.buf, n = t[t.length - 1].toString(), r = t.length - 2; r >= 0; --r) n += (va + t[r]).toString().substring(1);
|
|
2824
|
+
return n;
|
|
2825
|
+
}, e.prototype.valueOf = function() {
|
|
2826
|
+
for (var e = this.buf, t = 0, n = e.length - 1; n >= 0; --n) t = t * va + e[n];
|
|
2827
|
+
return t;
|
|
2828
|
+
}, e.prototype.simplify = function() {
|
|
2829
|
+
var e = this.buf;
|
|
2830
|
+
return e.length == 1 ? e[0] : this;
|
|
2831
|
+
}, e;
|
|
2832
|
+
}(), ba = "…", xa = /^(\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)?)?$/, Sa = /^(\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)?)?$/;
|
|
2833
|
+
function Ca(e, t) {
|
|
2834
|
+
return e.length > t && (e = e.substring(0, t) + ba), e;
|
|
2835
|
+
}
|
|
2836
|
+
var wa = function() {
|
|
2837
|
+
function e(t, n) {
|
|
2838
|
+
this.hexDigits = "0123456789ABCDEF", t instanceof e ? (this.enc = t.enc, this.pos = t.pos) : (this.enc = t, this.pos = n);
|
|
2839
|
+
}
|
|
2840
|
+
return e.prototype.get = function(e) {
|
|
2841
|
+
if (e === void 0 && (e = this.pos++), e >= this.enc.length) throw Error(`Requesting byte offset ${e} on a stream of length ${this.enc.length}`);
|
|
2842
|
+
return typeof this.enc == "string" ? this.enc.charCodeAt(e) : this.enc[e];
|
|
2843
|
+
}, e.prototype.hexByte = function(e) {
|
|
2844
|
+
return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(e & 15);
|
|
2845
|
+
}, e.prototype.hexDump = function(e, t, n) {
|
|
2846
|
+
for (var r = "", i = e; i < t; ++i) if (r += this.hexByte(this.get(i)), n !== !0) switch (i & 15) {
|
|
2847
|
+
case 7:
|
|
2848
|
+
r += " ";
|
|
2849
|
+
break;
|
|
2850
|
+
case 15:
|
|
2851
|
+
r += "\n";
|
|
2852
|
+
break;
|
|
2853
|
+
default: r += " ";
|
|
2854
|
+
}
|
|
2855
|
+
return r;
|
|
2856
|
+
}, e.prototype.isASCII = function(e, t) {
|
|
2857
|
+
for (var n = e; n < t; ++n) {
|
|
2858
|
+
var r = this.get(n);
|
|
2859
|
+
if (r < 32 || r > 176) return !1;
|
|
2860
|
+
}
|
|
2861
|
+
return !0;
|
|
2862
|
+
}, e.prototype.parseStringISO = function(e, t) {
|
|
2863
|
+
for (var n = "", r = e; r < t; ++r) n += String.fromCharCode(this.get(r));
|
|
2864
|
+
return n;
|
|
2865
|
+
}, e.prototype.parseStringUTF = function(e, t) {
|
|
2866
|
+
for (var n = "", r = e; r < t;) {
|
|
2867
|
+
var i = this.get(r++);
|
|
2868
|
+
i < 128 ? n += String.fromCharCode(i) : i > 191 && i < 224 ? n += String.fromCharCode((i & 31) << 6 | this.get(r++) & 63) : n += String.fromCharCode((i & 15) << 12 | (this.get(r++) & 63) << 6 | this.get(r++) & 63);
|
|
2869
|
+
}
|
|
2870
|
+
return n;
|
|
2871
|
+
}, e.prototype.parseStringBMP = function(e, t) {
|
|
2872
|
+
for (var n = "", r, i, a = e; a < t;) r = this.get(a++), i = this.get(a++), n += String.fromCharCode(r << 8 | i);
|
|
2873
|
+
return n;
|
|
2874
|
+
}, e.prototype.parseTime = function(e, t, n) {
|
|
2875
|
+
var r = this.parseStringISO(e, t), i = (n ? xa : Sa).exec(r);
|
|
2876
|
+
return i ? (n && (i[1] = +i[1], i[1] += +i[1] < 70 ? 2e3 : 1900), r = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4], i[5] && (r += ":" + i[5], i[6] && (r += ":" + i[6], i[7] && (r += "." + i[7]))), i[8] && (r += " UTC", i[8] != "Z" && (r += i[8], i[9] && (r += ":" + i[9]))), r) : "Unrecognized time: " + r;
|
|
2877
|
+
}, e.prototype.parseInteger = function(e, t) {
|
|
2878
|
+
for (var n = this.get(e), r = n > 127, i = r ? 255 : 0, a, o = ""; n == i && ++e < t;) n = this.get(e);
|
|
2879
|
+
if (a = t - e, a === 0) return r ? -1 : 0;
|
|
2880
|
+
if (a > 4) {
|
|
2881
|
+
for (o = n, a <<= 3; !((+o ^ i) & 128);) o <<= 1, --a;
|
|
2882
|
+
o = "(" + a + " bit)\n";
|
|
2883
|
+
}
|
|
2884
|
+
r && (n -= 256);
|
|
2885
|
+
for (var s = new ya(n), c = e + 1; c < t; ++c) s.mulAdd(256, this.get(c));
|
|
2886
|
+
return o + s.toString();
|
|
2887
|
+
}, e.prototype.parseBitString = function(e, t, n) {
|
|
2888
|
+
for (var r = this.get(e), i = "(" + ((t - e - 1 << 3) - r) + " bit)\n", a = "", o = e + 1; o < t; ++o) {
|
|
2889
|
+
for (var s = this.get(o), c = o == t - 1 ? r : 0, l = 7; l >= c; --l) a += s >> l & 1 ? "1" : "0";
|
|
2890
|
+
if (a.length > n) return i + Ca(a, n);
|
|
2891
|
+
}
|
|
2892
|
+
return i + a;
|
|
2893
|
+
}, e.prototype.parseOctetString = function(e, t, n) {
|
|
2894
|
+
if (this.isASCII(e, t)) return Ca(this.parseStringISO(e, t), n);
|
|
2895
|
+
var r = t - e, i = "(" + r + " byte)\n";
|
|
2896
|
+
n /= 2, r > n && (t = e + n);
|
|
2897
|
+
for (var a = e; a < t; ++a) i += this.hexByte(this.get(a));
|
|
2898
|
+
return r > n && (i += ba), i;
|
|
2899
|
+
}, e.prototype.parseOID = function(e, t, n) {
|
|
2900
|
+
for (var r = "", i = new ya(), a = 0, o = e; o < t; ++o) {
|
|
2901
|
+
var s = this.get(o);
|
|
2902
|
+
if (i.mulAdd(128, s & 127), a += 7, !(s & 128)) {
|
|
2903
|
+
if (r === "") if (i = i.simplify(), i instanceof ya) i.sub(80), r = "2." + i.toString();
|
|
2904
|
+
else {
|
|
2905
|
+
var c = i < 80 ? i < 40 ? 0 : 1 : 2;
|
|
2906
|
+
r = c + "." + (i - c * 40);
|
|
2907
|
+
}
|
|
2908
|
+
else r += "." + i.toString();
|
|
2909
|
+
if (r.length > n) return Ca(r, n);
|
|
2910
|
+
i = new ya(), a = 0;
|
|
2911
|
+
}
|
|
2912
|
+
}
|
|
2913
|
+
return a > 0 && (r += ".incomplete"), r;
|
|
2914
|
+
}, e;
|
|
2915
|
+
}(), Ta = function() {
|
|
2916
|
+
function e(e, t, n, r, i) {
|
|
2917
|
+
if (!(r instanceof Ea)) throw Error("Invalid tag value.");
|
|
2918
|
+
this.stream = e, this.header = t, this.length = n, this.tag = r, this.sub = i;
|
|
2919
|
+
}
|
|
2920
|
+
return e.prototype.typeName = function() {
|
|
2921
|
+
switch (this.tag.tagClass) {
|
|
2922
|
+
case 0:
|
|
2923
|
+
switch (this.tag.tagNumber) {
|
|
2924
|
+
case 0: return "EOC";
|
|
2925
|
+
case 1: return "BOOLEAN";
|
|
2926
|
+
case 2: return "INTEGER";
|
|
2927
|
+
case 3: return "BIT_STRING";
|
|
2928
|
+
case 4: return "OCTET_STRING";
|
|
2929
|
+
case 5: return "NULL";
|
|
2930
|
+
case 6: return "OBJECT_IDENTIFIER";
|
|
2931
|
+
case 7: return "ObjectDescriptor";
|
|
2932
|
+
case 8: return "EXTERNAL";
|
|
2933
|
+
case 9: return "REAL";
|
|
2934
|
+
case 10: return "ENUMERATED";
|
|
2935
|
+
case 11: return "EMBEDDED_PDV";
|
|
2936
|
+
case 12: return "UTF8String";
|
|
2937
|
+
case 16: return "SEQUENCE";
|
|
2938
|
+
case 17: return "SET";
|
|
2939
|
+
case 18: return "NumericString";
|
|
2940
|
+
case 19: return "PrintableString";
|
|
2941
|
+
case 20: return "TeletexString";
|
|
2942
|
+
case 21: return "VideotexString";
|
|
2943
|
+
case 22: return "IA5String";
|
|
2944
|
+
case 23: return "UTCTime";
|
|
2945
|
+
case 24: return "GeneralizedTime";
|
|
2946
|
+
case 25: return "GraphicString";
|
|
2947
|
+
case 26: return "VisibleString";
|
|
2948
|
+
case 27: return "GeneralString";
|
|
2949
|
+
case 28: return "UniversalString";
|
|
2950
|
+
case 30: return "BMPString";
|
|
2951
|
+
}
|
|
2952
|
+
return "Universal_" + this.tag.tagNumber.toString();
|
|
2953
|
+
case 1: return "Application_" + this.tag.tagNumber.toString();
|
|
2954
|
+
case 2: return "[" + this.tag.tagNumber.toString() + "]";
|
|
2955
|
+
case 3: return "Private_" + this.tag.tagNumber.toString();
|
|
2956
|
+
}
|
|
2957
|
+
}, e.prototype.content = function(e) {
|
|
2958
|
+
if (this.tag === void 0) return null;
|
|
2959
|
+
e === void 0 && (e = Infinity);
|
|
2960
|
+
var t = this.posContent(), n = Math.abs(this.length);
|
|
2961
|
+
if (!this.tag.isUniversal()) return this.sub === null ? this.stream.parseOctetString(t, t + n, e) : "(" + this.sub.length + " elem)";
|
|
2962
|
+
switch (this.tag.tagNumber) {
|
|
2963
|
+
case 1: return this.stream.get(t) === 0 ? "false" : "true";
|
|
2964
|
+
case 2: return this.stream.parseInteger(t, t + n);
|
|
2965
|
+
case 3: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(t, t + n, e);
|
|
2966
|
+
case 4: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + n, e);
|
|
2967
|
+
case 6: return this.stream.parseOID(t, t + n, e);
|
|
2968
|
+
case 16:
|
|
2969
|
+
case 17: return this.sub === null ? "(no elem)" : "(" + this.sub.length + " elem)";
|
|
2970
|
+
case 12: return Ca(this.stream.parseStringUTF(t, t + n), e);
|
|
2971
|
+
case 18:
|
|
2972
|
+
case 19:
|
|
2973
|
+
case 20:
|
|
2974
|
+
case 21:
|
|
2975
|
+
case 22:
|
|
2976
|
+
case 26: return Ca(this.stream.parseStringISO(t, t + n), e);
|
|
2977
|
+
case 30: return Ca(this.stream.parseStringBMP(t, t + n), e);
|
|
2978
|
+
case 23:
|
|
2979
|
+
case 24: return this.stream.parseTime(t, t + n, this.tag.tagNumber == 23);
|
|
2980
|
+
}
|
|
2981
|
+
return null;
|
|
2982
|
+
}, e.prototype.toString = function() {
|
|
2983
|
+
return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
|
|
2984
|
+
}, e.prototype.toPrettyString = function(e) {
|
|
2985
|
+
e === void 0 && (e = "");
|
|
2986
|
+
var t = e + this.typeName() + " @" + this.stream.pos;
|
|
2987
|
+
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 += "\n", this.sub !== null) {
|
|
2988
|
+
e += " ";
|
|
2989
|
+
for (var n = 0, r = this.sub.length; n < r; ++n) t += this.sub[n].toPrettyString(e);
|
|
2990
|
+
}
|
|
2991
|
+
return t;
|
|
2992
|
+
}, e.prototype.posStart = function() {
|
|
2993
|
+
return this.stream.pos;
|
|
2994
|
+
}, e.prototype.posContent = function() {
|
|
2995
|
+
return this.stream.pos + this.header;
|
|
2996
|
+
}, e.prototype.posEnd = function() {
|
|
2997
|
+
return this.stream.pos + this.header + Math.abs(this.length);
|
|
2998
|
+
}, e.prototype.toHexString = function() {
|
|
2999
|
+
return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
|
|
3000
|
+
}, e.decodeLength = function(e) {
|
|
3001
|
+
var t = e.get(), n = t & 127;
|
|
3002
|
+
if (n == t) return n;
|
|
3003
|
+
if (n > 6) throw Error("Length over 48 bits not supported at position " + (e.pos - 1));
|
|
3004
|
+
if (n === 0) return null;
|
|
3005
|
+
t = 0;
|
|
3006
|
+
for (var r = 0; r < n; ++r) t = t * 256 + e.get();
|
|
3007
|
+
return t;
|
|
3008
|
+
}, e.prototype.getHexStringValue = function() {
|
|
3009
|
+
var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
|
|
3010
|
+
return e.substring(t, t + n);
|
|
3011
|
+
}, e.decode = function(t) {
|
|
3012
|
+
var n = t instanceof wa ? t : new wa(t, 0), r = new wa(n), i = new Ea(n), a = e.decodeLength(n), o = n.pos, s = o - r.pos, c = null, l = function() {
|
|
3013
|
+
var t = [];
|
|
3014
|
+
if (a !== null) {
|
|
3015
|
+
for (var r = o + a; n.pos < r;) t[t.length] = e.decode(n);
|
|
3016
|
+
if (n.pos != r) throw Error("Content size is not correct for container starting at offset " + o);
|
|
3017
|
+
} else try {
|
|
3018
|
+
for (;;) {
|
|
3019
|
+
var i = e.decode(n);
|
|
3020
|
+
if (i.tag.isEOC()) break;
|
|
3021
|
+
t[t.length] = i;
|
|
3022
|
+
}
|
|
3023
|
+
a = o - n.pos;
|
|
3024
|
+
} catch (e) {
|
|
3025
|
+
throw Error("Exception while decoding undefined length content: " + e);
|
|
3026
|
+
}
|
|
3027
|
+
return t;
|
|
3028
|
+
};
|
|
3029
|
+
if (i.tagConstructed) c = l();
|
|
3030
|
+
else if (i.isUniversal() && (i.tagNumber == 3 || i.tagNumber == 4)) try {
|
|
3031
|
+
if (i.tagNumber == 3 && n.get() != 0) throw Error("BIT STRINGs with unused bits cannot encapsulate.");
|
|
3032
|
+
c = l();
|
|
3033
|
+
for (var u = 0; u < c.length; ++u) if (c[u].tag.isEOC()) throw Error("EOC is not supposed to be actual content.");
|
|
3034
|
+
} catch {
|
|
3035
|
+
c = null;
|
|
3036
|
+
}
|
|
3037
|
+
if (c === null) {
|
|
3038
|
+
if (a === null) throw Error("We can't skip over an invalid tag with undefined length at offset " + o);
|
|
3039
|
+
n.pos = o + Math.abs(a);
|
|
3040
|
+
}
|
|
3041
|
+
return new e(r, s, a, i, c);
|
|
3042
|
+
}, e;
|
|
3043
|
+
}(), Ea = function() {
|
|
3044
|
+
function e(e) {
|
|
3045
|
+
var t = e.get();
|
|
3046
|
+
if (this.tagClass = t >> 6, this.tagConstructed = (t & 32) != 0, this.tagNumber = t & 31, this.tagNumber == 31) {
|
|
3047
|
+
var n = new ya();
|
|
3048
|
+
do
|
|
3049
|
+
t = e.get(), n.mulAdd(128, t & 127);
|
|
3050
|
+
while (t & 128);
|
|
3051
|
+
this.tagNumber = n.simplify();
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
return e.prototype.isUniversal = function() {
|
|
3055
|
+
return this.tagClass === 0;
|
|
3056
|
+
}, e.prototype.isEOC = function() {
|
|
3057
|
+
return this.tagClass === 0 && this.tagNumber === 0;
|
|
3058
|
+
}, e;
|
|
3059
|
+
}(), B, Da = !0, V = [
|
|
3060
|
+
2,
|
|
3061
|
+
3,
|
|
3062
|
+
5,
|
|
3063
|
+
7,
|
|
3064
|
+
11,
|
|
3065
|
+
13,
|
|
3066
|
+
17,
|
|
3067
|
+
19,
|
|
3068
|
+
23,
|
|
3069
|
+
29,
|
|
3070
|
+
31,
|
|
3071
|
+
37,
|
|
3072
|
+
41,
|
|
3073
|
+
43,
|
|
3074
|
+
47,
|
|
3075
|
+
53,
|
|
3076
|
+
59,
|
|
3077
|
+
61,
|
|
3078
|
+
67,
|
|
3079
|
+
71,
|
|
3080
|
+
73,
|
|
3081
|
+
79,
|
|
3082
|
+
83,
|
|
3083
|
+
89,
|
|
3084
|
+
97,
|
|
3085
|
+
101,
|
|
3086
|
+
103,
|
|
3087
|
+
107,
|
|
3088
|
+
109,
|
|
3089
|
+
113,
|
|
3090
|
+
127,
|
|
3091
|
+
131,
|
|
3092
|
+
137,
|
|
3093
|
+
139,
|
|
3094
|
+
149,
|
|
3095
|
+
151,
|
|
3096
|
+
157,
|
|
3097
|
+
163,
|
|
3098
|
+
167,
|
|
3099
|
+
173,
|
|
3100
|
+
179,
|
|
3101
|
+
181,
|
|
3102
|
+
191,
|
|
3103
|
+
193,
|
|
3104
|
+
197,
|
|
3105
|
+
199,
|
|
3106
|
+
211,
|
|
3107
|
+
223,
|
|
3108
|
+
227,
|
|
3109
|
+
229,
|
|
3110
|
+
233,
|
|
3111
|
+
239,
|
|
3112
|
+
241,
|
|
3113
|
+
251,
|
|
3114
|
+
257,
|
|
3115
|
+
263,
|
|
3116
|
+
269,
|
|
3117
|
+
271,
|
|
3118
|
+
277,
|
|
3119
|
+
281,
|
|
3120
|
+
283,
|
|
3121
|
+
293,
|
|
3122
|
+
307,
|
|
3123
|
+
311,
|
|
3124
|
+
313,
|
|
3125
|
+
317,
|
|
3126
|
+
331,
|
|
3127
|
+
337,
|
|
3128
|
+
347,
|
|
3129
|
+
349,
|
|
3130
|
+
353,
|
|
3131
|
+
359,
|
|
3132
|
+
367,
|
|
3133
|
+
373,
|
|
3134
|
+
379,
|
|
3135
|
+
383,
|
|
3136
|
+
389,
|
|
3137
|
+
397,
|
|
3138
|
+
401,
|
|
3139
|
+
409,
|
|
3140
|
+
419,
|
|
3141
|
+
421,
|
|
3142
|
+
431,
|
|
3143
|
+
433,
|
|
3144
|
+
439,
|
|
3145
|
+
443,
|
|
3146
|
+
449,
|
|
3147
|
+
457,
|
|
3148
|
+
461,
|
|
3149
|
+
463,
|
|
3150
|
+
467,
|
|
3151
|
+
479,
|
|
3152
|
+
487,
|
|
3153
|
+
491,
|
|
3154
|
+
499,
|
|
3155
|
+
503,
|
|
3156
|
+
509,
|
|
3157
|
+
521,
|
|
3158
|
+
523,
|
|
3159
|
+
541,
|
|
3160
|
+
547,
|
|
3161
|
+
557,
|
|
3162
|
+
563,
|
|
3163
|
+
569,
|
|
3164
|
+
571,
|
|
3165
|
+
577,
|
|
3166
|
+
587,
|
|
3167
|
+
593,
|
|
3168
|
+
599,
|
|
3169
|
+
601,
|
|
3170
|
+
607,
|
|
3171
|
+
613,
|
|
3172
|
+
617,
|
|
3173
|
+
619,
|
|
3174
|
+
631,
|
|
3175
|
+
641,
|
|
3176
|
+
643,
|
|
3177
|
+
647,
|
|
3178
|
+
653,
|
|
3179
|
+
659,
|
|
3180
|
+
661,
|
|
3181
|
+
673,
|
|
3182
|
+
677,
|
|
3183
|
+
683,
|
|
3184
|
+
691,
|
|
3185
|
+
701,
|
|
3186
|
+
709,
|
|
3187
|
+
719,
|
|
3188
|
+
727,
|
|
3189
|
+
733,
|
|
3190
|
+
739,
|
|
3191
|
+
743,
|
|
3192
|
+
751,
|
|
3193
|
+
757,
|
|
3194
|
+
761,
|
|
3195
|
+
769,
|
|
3196
|
+
773,
|
|
3197
|
+
787,
|
|
3198
|
+
797,
|
|
3199
|
+
809,
|
|
3200
|
+
811,
|
|
3201
|
+
821,
|
|
3202
|
+
823,
|
|
3203
|
+
827,
|
|
3204
|
+
829,
|
|
3205
|
+
839,
|
|
3206
|
+
853,
|
|
3207
|
+
857,
|
|
3208
|
+
859,
|
|
3209
|
+
863,
|
|
3210
|
+
877,
|
|
3211
|
+
881,
|
|
3212
|
+
883,
|
|
3213
|
+
887,
|
|
3214
|
+
907,
|
|
3215
|
+
911,
|
|
3216
|
+
919,
|
|
3217
|
+
929,
|
|
3218
|
+
937,
|
|
3219
|
+
941,
|
|
3220
|
+
947,
|
|
3221
|
+
953,
|
|
3222
|
+
967,
|
|
3223
|
+
971,
|
|
3224
|
+
977,
|
|
3225
|
+
983,
|
|
3226
|
+
991,
|
|
3227
|
+
997
|
|
3228
|
+
], Oa = (1 << 26) / V[V.length - 1], H = function() {
|
|
3229
|
+
function e(e, t, n) {
|
|
3230
|
+
e != null && (typeof e == "number" ? this.fromNumber(e, t, n) : t == null && typeof e != "string" ? this.fromString(e, 256) : this.fromString(e, t));
|
|
3231
|
+
}
|
|
3232
|
+
return e.prototype.toString = function(e) {
|
|
3233
|
+
if (this.s < 0) return "-" + this.negate().toString(e);
|
|
3234
|
+
var t;
|
|
3235
|
+
if (e == 16) t = 4;
|
|
3236
|
+
else if (e == 8) t = 3;
|
|
3237
|
+
else if (e == 2) t = 1;
|
|
3238
|
+
else if (e == 32) t = 5;
|
|
3239
|
+
else if (e == 4) t = 2;
|
|
3240
|
+
else return this.toRadix(e);
|
|
3241
|
+
var n = (1 << t) - 1, r, i = !1, a = "", o = this.t, s = this.DB - o * this.DB % t;
|
|
3242
|
+
if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a = z(r)); o >= 0;) s < t ? (r = (this[o] & (1 << s) - 1) << t - s, r |= this[--o] >> (s += this.DB - t)) : (r = this[o] >> (s -= t) & n, s <= 0 && (s += this.DB, --o)), r > 0 && (i = !0), i && (a += z(r));
|
|
3243
|
+
return i ? a : "0";
|
|
3244
|
+
}, e.prototype.negate = function() {
|
|
3245
|
+
var t = U();
|
|
3246
|
+
return e.ZERO.subTo(this, t), t;
|
|
3247
|
+
}, e.prototype.abs = function() {
|
|
3248
|
+
return this.s < 0 ? this.negate() : this;
|
|
3249
|
+
}, e.prototype.compareTo = function(e) {
|
|
3250
|
+
var t = this.s - e.s;
|
|
3251
|
+
if (t != 0) return t;
|
|
3252
|
+
var n = this.t;
|
|
3253
|
+
if (t = n - e.t, t != 0) return this.s < 0 ? -t : t;
|
|
3254
|
+
for (; --n >= 0;) if ((t = this[n] - e[n]) != 0) return t;
|
|
3255
|
+
return 0;
|
|
3256
|
+
}, e.prototype.bitLength = function() {
|
|
3257
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Ra(this[this.t - 1] ^ this.s & this.DM);
|
|
3258
|
+
}, e.prototype.mod = function(t) {
|
|
3259
|
+
var n = U();
|
|
3260
|
+
return this.abs().divRemTo(t, null, n), this.s < 0 && n.compareTo(e.ZERO) > 0 && t.subTo(n, n), n;
|
|
3261
|
+
}, e.prototype.modPowInt = function(e, t) {
|
|
3262
|
+
var n = e < 256 || t.isEven() ? new Aa(t) : new ja(t);
|
|
3263
|
+
return this.exp(e, n);
|
|
3264
|
+
}, e.prototype.clone = function() {
|
|
3265
|
+
var e = U();
|
|
3266
|
+
return this.copyTo(e), e;
|
|
3267
|
+
}, e.prototype.intValue = function() {
|
|
3268
|
+
if (this.s < 0) {
|
|
3269
|
+
if (this.t == 1) return this[0] - this.DV;
|
|
3270
|
+
if (this.t == 0) return -1;
|
|
3271
|
+
} else if (this.t == 1) return this[0];
|
|
3272
|
+
else if (this.t == 0) return 0;
|
|
3273
|
+
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
|
|
3274
|
+
}, e.prototype.byteValue = function() {
|
|
3275
|
+
return this.t == 0 ? this.s : this[0] << 24 >> 24;
|
|
3276
|
+
}, e.prototype.shortValue = function() {
|
|
3277
|
+
return this.t == 0 ? this.s : this[0] << 16 >> 16;
|
|
3278
|
+
}, e.prototype.signum = function() {
|
|
3279
|
+
return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
|
|
3280
|
+
}, e.prototype.toByteArray = function() {
|
|
3281
|
+
var e = this.t, t = [];
|
|
3282
|
+
t[0] = this.s;
|
|
3283
|
+
var n = this.DB - e * this.DB % 8, r, i = 0;
|
|
3284
|
+
if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
|
|
3285
|
+
return t;
|
|
3286
|
+
}, e.prototype.equals = function(e) {
|
|
3287
|
+
return this.compareTo(e) == 0;
|
|
3288
|
+
}, e.prototype.min = function(e) {
|
|
3289
|
+
return this.compareTo(e) < 0 ? this : e;
|
|
3290
|
+
}, e.prototype.max = function(e) {
|
|
3291
|
+
return this.compareTo(e) > 0 ? this : e;
|
|
3292
|
+
}, e.prototype.and = function(e) {
|
|
3293
|
+
var t = U();
|
|
3294
|
+
return this.bitwiseTo(e, ia, t), t;
|
|
3295
|
+
}, e.prototype.or = function(e) {
|
|
3296
|
+
var t = U();
|
|
3297
|
+
return this.bitwiseTo(e, aa, t), t;
|
|
3298
|
+
}, e.prototype.xor = function(e) {
|
|
3299
|
+
var t = U();
|
|
3300
|
+
return this.bitwiseTo(e, oa, t), t;
|
|
3301
|
+
}, e.prototype.andNot = function(e) {
|
|
3302
|
+
var t = U();
|
|
3303
|
+
return this.bitwiseTo(e, sa, t), t;
|
|
3304
|
+
}, e.prototype.not = function() {
|
|
3305
|
+
for (var e = U(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
|
|
3306
|
+
return e.t = this.t, e.s = ~this.s, e;
|
|
3307
|
+
}, e.prototype.shiftLeft = function(e) {
|
|
3308
|
+
var t = U();
|
|
3309
|
+
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
3310
|
+
}, e.prototype.shiftRight = function(e) {
|
|
3311
|
+
var t = U();
|
|
3312
|
+
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
3313
|
+
}, e.prototype.getLowestSetBit = function() {
|
|
3314
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + ca(this[e]);
|
|
3315
|
+
return this.s < 0 ? this.t * this.DB : -1;
|
|
3316
|
+
}, e.prototype.bitCount = function() {
|
|
3317
|
+
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += la(this[n] ^ t);
|
|
3318
|
+
return e;
|
|
3319
|
+
}, e.prototype.testBit = function(e) {
|
|
3320
|
+
var t = Math.floor(e / this.DB);
|
|
3321
|
+
return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
|
|
3322
|
+
}, e.prototype.setBit = function(e) {
|
|
3323
|
+
return this.changeBit(e, aa);
|
|
3324
|
+
}, e.prototype.clearBit = function(e) {
|
|
3325
|
+
return this.changeBit(e, sa);
|
|
3326
|
+
}, e.prototype.flipBit = function(e) {
|
|
3327
|
+
return this.changeBit(e, oa);
|
|
3328
|
+
}, e.prototype.add = function(e) {
|
|
3329
|
+
var t = U();
|
|
3330
|
+
return this.addTo(e, t), t;
|
|
3331
|
+
}, e.prototype.subtract = function(e) {
|
|
3332
|
+
var t = U();
|
|
3333
|
+
return this.subTo(e, t), t;
|
|
3334
|
+
}, e.prototype.multiply = function(e) {
|
|
3335
|
+
var t = U();
|
|
3336
|
+
return this.multiplyTo(e, t), t;
|
|
3337
|
+
}, e.prototype.divide = function(e) {
|
|
3338
|
+
var t = U();
|
|
3339
|
+
return this.divRemTo(e, t, null), t;
|
|
3340
|
+
}, e.prototype.remainder = function(e) {
|
|
3341
|
+
var t = U();
|
|
3342
|
+
return this.divRemTo(e, null, t), t;
|
|
3343
|
+
}, e.prototype.divideAndRemainder = function(e) {
|
|
3344
|
+
var t = U(), n = U();
|
|
3345
|
+
return this.divRemTo(e, t, n), [t, n];
|
|
3346
|
+
}, e.prototype.modPow = function(e, t) {
|
|
3347
|
+
var n = e.bitLength(), r, i = K(1), a;
|
|
3348
|
+
if (n <= 0) return i;
|
|
3349
|
+
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new Aa(t) : t.isEven() ? new Ma(t) : new ja(t);
|
|
3350
|
+
var o = [], s = 3, c = r - 1, l = (1 << r) - 1;
|
|
3351
|
+
if (o[1] = a.convert(this), r > 1) {
|
|
3352
|
+
var u = U();
|
|
3353
|
+
for (a.sqrTo(o[1], u); s <= l;) o[s] = U(), a.mulTo(u, o[s - 2], o[s]), s += 2;
|
|
3354
|
+
}
|
|
3355
|
+
var d = e.t - 1, f, p = !0, m = U(), h;
|
|
3356
|
+
for (n = Ra(e[d]) - 1; d >= 0;) {
|
|
3357
|
+
for (n >= c ? f = e[d] >> n - c & l : (f = (e[d] & (1 << n + 1) - 1) << c - n, d > 0 && (f |= e[d - 1] >> this.DB + n - c)), s = r; !(f & 1);) f >>= 1, --s;
|
|
3358
|
+
if ((n -= s) < 0 && (n += this.DB, --d), p) o[f].copyTo(i), p = !1;
|
|
3359
|
+
else {
|
|
3360
|
+
for (; s > 1;) a.sqrTo(i, m), a.sqrTo(m, i), s -= 2;
|
|
3361
|
+
s > 0 ? a.sqrTo(i, m) : (h = i, i = m, m = h), a.mulTo(m, o[f], i);
|
|
3362
|
+
}
|
|
3363
|
+
for (; d >= 0 && !(e[d] & 1 << n);) a.sqrTo(i, m), h = i, i = m, m = h, --n < 0 && (n = this.DB - 1, --d);
|
|
3364
|
+
}
|
|
3365
|
+
return a.revert(i);
|
|
3366
|
+
}, e.prototype.modInverse = function(t) {
|
|
3367
|
+
var n = t.isEven();
|
|
3368
|
+
if (this.isEven() && n || t.signum() == 0) return e.ZERO;
|
|
3369
|
+
for (var r = t.clone(), i = this.clone(), a = K(1), o = K(0), s = K(0), c = K(1); r.signum() != 0;) {
|
|
3370
|
+
for (; r.isEven();) r.rShiftTo(1, r), n ? ((!a.isEven() || !o.isEven()) && (a.addTo(this, a), o.subTo(t, o)), a.rShiftTo(1, a)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
|
|
3371
|
+
for (; i.isEven();) i.rShiftTo(1, i), n ? ((!s.isEven() || !c.isEven()) && (s.addTo(this, s), c.subTo(t, c)), s.rShiftTo(1, s)) : c.isEven() || c.subTo(t, c), c.rShiftTo(1, c);
|
|
3372
|
+
r.compareTo(i) >= 0 ? (r.subTo(i, r), n && a.subTo(s, a), o.subTo(c, o)) : (i.subTo(r, i), n && s.subTo(a, s), c.subTo(o, c));
|
|
3373
|
+
}
|
|
3374
|
+
if (i.compareTo(e.ONE) != 0) return e.ZERO;
|
|
3375
|
+
if (c.compareTo(t) >= 0) return c.subtract(t);
|
|
3376
|
+
if (c.signum() < 0) c.addTo(t, c);
|
|
3377
|
+
else return c;
|
|
3378
|
+
return c.signum() < 0 ? c.add(t) : c;
|
|
3379
|
+
}, e.prototype.pow = function(e) {
|
|
3380
|
+
return this.exp(e, new ka());
|
|
3381
|
+
}, e.prototype.gcd = function(e) {
|
|
3382
|
+
var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
|
|
3383
|
+
if (t.compareTo(n) < 0) {
|
|
3384
|
+
var r = t;
|
|
3385
|
+
t = n, n = r;
|
|
3386
|
+
}
|
|
3387
|
+
var i = t.getLowestSetBit(), a = n.getLowestSetBit();
|
|
3388
|
+
if (a < 0) return t;
|
|
3389
|
+
for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
|
|
3390
|
+
return a > 0 && n.lShiftTo(a, n), n;
|
|
3391
|
+
}, e.prototype.isProbablePrime = function(e) {
|
|
3392
|
+
var t, n = this.abs();
|
|
3393
|
+
if (n.t == 1 && n[0] <= V[V.length - 1]) {
|
|
3394
|
+
for (t = 0; t < V.length; ++t) if (n[0] == V[t]) return !0;
|
|
3395
|
+
return !1;
|
|
3396
|
+
}
|
|
3397
|
+
if (n.isEven()) return !1;
|
|
3398
|
+
for (t = 1; t < V.length;) {
|
|
3399
|
+
for (var r = V[t], i = t + 1; i < V.length && r < Oa;) r *= V[i++];
|
|
3400
|
+
for (r = n.modInt(r); t < i;) if (r % V[t++] == 0) return !1;
|
|
3401
|
+
}
|
|
3402
|
+
return n.millerRabin(e);
|
|
3403
|
+
}, e.prototype.copyTo = function(e) {
|
|
3404
|
+
for (var t = this.t - 1; t >= 0; --t) e[t] = this[t];
|
|
3405
|
+
e.t = this.t, e.s = this.s;
|
|
3406
|
+
}, e.prototype.fromInt = function(e) {
|
|
3407
|
+
this.t = 1, this.s = e < 0 ? -1 : 0, e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0;
|
|
3408
|
+
}, e.prototype.fromString = function(t, n) {
|
|
3409
|
+
var r;
|
|
3410
|
+
if (n == 16) r = 4;
|
|
3411
|
+
else if (n == 8) r = 3;
|
|
3412
|
+
else if (n == 256) r = 8;
|
|
3413
|
+
else if (n == 2) r = 1;
|
|
3414
|
+
else if (n == 32) r = 5;
|
|
3415
|
+
else if (n == 4) r = 2;
|
|
3416
|
+
else {
|
|
3417
|
+
this.fromRadix(t, n);
|
|
3418
|
+
return;
|
|
3419
|
+
}
|
|
3420
|
+
this.t = 0, this.s = 0;
|
|
3421
|
+
for (var i = t.length, a = !1, o = 0; --i >= 0;) {
|
|
3422
|
+
var s = r == 8 ? t[i] & 255 : La(t, i);
|
|
3423
|
+
if (s < 0) {
|
|
3424
|
+
t.charAt(i) == "-" && (a = !0);
|
|
3425
|
+
continue;
|
|
3426
|
+
}
|
|
3427
|
+
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);
|
|
3428
|
+
}
|
|
3429
|
+
r == 8 && t[0] & 128 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), a && e.ZERO.subTo(this, this);
|
|
3430
|
+
}, e.prototype.clamp = function() {
|
|
3431
|
+
for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;) --this.t;
|
|
3432
|
+
}, e.prototype.dlShiftTo = function(e, t) {
|
|
3433
|
+
var n;
|
|
3434
|
+
for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n];
|
|
3435
|
+
for (n = e - 1; n >= 0; --n) t[n] = 0;
|
|
3436
|
+
t.t = this.t + e, t.s = this.s;
|
|
3437
|
+
}, e.prototype.drShiftTo = function(e, t) {
|
|
3438
|
+
for (var n = e; n < this.t; ++n) t[n - e] = this[n];
|
|
3439
|
+
t.t = Math.max(this.t - e, 0), t.s = this.s;
|
|
3440
|
+
}, e.prototype.lShiftTo = function(e, t) {
|
|
3441
|
+
for (var n = e % this.DB, r = this.DB - n, i = (1 << r) - 1, a = Math.floor(e / this.DB), o = this.s << n & this.DM, s = this.t - 1; s >= 0; --s) t[s + a + 1] = this[s] >> r | o, o = (this[s] & i) << n;
|
|
3442
|
+
for (var s = a - 1; s >= 0; --s) t[s] = 0;
|
|
3443
|
+
t[a] = o, t.t = this.t + a + 1, t.s = this.s, t.clamp();
|
|
3444
|
+
}, e.prototype.rShiftTo = function(e, t) {
|
|
3445
|
+
t.s = this.s;
|
|
3446
|
+
var n = Math.floor(e / this.DB);
|
|
3447
|
+
if (n >= this.t) {
|
|
3448
|
+
t.t = 0;
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3451
|
+
var r = e % this.DB, i = this.DB - r, a = (1 << r) - 1;
|
|
3452
|
+
t[0] = this[n] >> r;
|
|
3453
|
+
for (var o = n + 1; o < this.t; ++o) t[o - n - 1] |= (this[o] & a) << i, t[o - n] = this[o] >> r;
|
|
3454
|
+
r > 0 && (t[this.t - n - 1] |= (this.s & a) << i), t.t = this.t - n, t.clamp();
|
|
3455
|
+
}, e.prototype.subTo = function(e, t) {
|
|
3456
|
+
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] - e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3457
|
+
if (e.t < this.t) {
|
|
3458
|
+
for (r -= e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3459
|
+
r += this.s;
|
|
3460
|
+
} else {
|
|
3461
|
+
for (r += this.s; n < e.t;) r -= e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3462
|
+
r -= e.s;
|
|
3463
|
+
}
|
|
3464
|
+
t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
|
|
3465
|
+
}, e.prototype.multiplyTo = function(t, n) {
|
|
3466
|
+
var r = this.abs(), i = t.abs(), a = r.t;
|
|
3467
|
+
for (n.t = a + i.t; --a >= 0;) n[a] = 0;
|
|
3468
|
+
for (a = 0; a < i.t; ++a) n[a + r.t] = r.am(0, i[a], n, a, 0, r.t);
|
|
3469
|
+
n.s = 0, n.clamp(), this.s != t.s && e.ZERO.subTo(n, n);
|
|
3470
|
+
}, e.prototype.squareTo = function(e) {
|
|
3471
|
+
for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;) e[n] = 0;
|
|
3472
|
+
for (n = 0; n < t.t - 1; ++n) {
|
|
3473
|
+
var r = t.am(n, t[n], e, 2 * n, 0, 1);
|
|
3474
|
+
(e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, r, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV, e[n + t.t + 1] = 1);
|
|
3475
|
+
}
|
|
3476
|
+
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
|
|
3477
|
+
}, e.prototype.divRemTo = function(t, n, r) {
|
|
3478
|
+
var i = t.abs();
|
|
3479
|
+
if (!(i.t <= 0)) {
|
|
3480
|
+
var a = this.abs();
|
|
3481
|
+
if (a.t < i.t) {
|
|
3482
|
+
n?.fromInt(0), r != null && this.copyTo(r);
|
|
3483
|
+
return;
|
|
3484
|
+
}
|
|
3485
|
+
r ??= U();
|
|
3486
|
+
var o = U(), s = this.s, c = t.s, l = this.DB - Ra(i[i.t - 1]);
|
|
3487
|
+
l > 0 ? (i.lShiftTo(l, o), a.lShiftTo(l, r)) : (i.copyTo(o), a.copyTo(r));
|
|
3488
|
+
var u = o.t, d = o[u - 1];
|
|
3489
|
+
if (d != 0) {
|
|
3490
|
+
var f = d * (1 << this.F1) + (u > 1 ? o[u - 2] >> this.F2 : 0), p = this.FV / f, m = (1 << this.F1) / f, h = 1 << this.F2, g = r.t, _ = g - u, v = n ?? U();
|
|
3491
|
+
for (o.dlShiftTo(_, v), r.compareTo(v) >= 0 && (r[r.t++] = 1, r.subTo(v, r)), e.ONE.dlShiftTo(u, v), v.subTo(o, o); o.t < u;) o[o.t++] = 0;
|
|
3492
|
+
for (; --_ >= 0;) {
|
|
3493
|
+
var y = r[--g] == d ? this.DM : Math.floor(r[g] * p + (r[g - 1] + h) * m);
|
|
3494
|
+
if ((r[g] += o.am(0, y, r, _, 0, u)) < y) for (o.dlShiftTo(_, v), r.subTo(v, r); r[g] < --y;) r.subTo(v, r);
|
|
3495
|
+
}
|
|
3496
|
+
n != null && (r.drShiftTo(u, n), s != c && e.ZERO.subTo(n, n)), r.t = u, r.clamp(), l > 0 && r.rShiftTo(l, r), s < 0 && e.ZERO.subTo(r, r);
|
|
3497
|
+
}
|
|
3498
|
+
}
|
|
3499
|
+
}, e.prototype.invDigit = function() {
|
|
3500
|
+
if (this.t < 1) return 0;
|
|
3501
|
+
var e = this[0];
|
|
3502
|
+
if (!(e & 1)) return 0;
|
|
3503
|
+
var t = e & 3;
|
|
3504
|
+
return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
|
|
3505
|
+
}, e.prototype.isEven = function() {
|
|
3506
|
+
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
3507
|
+
}, e.prototype.exp = function(t, n) {
|
|
3508
|
+
if (t > 4294967295 || t < 1) return e.ONE;
|
|
3509
|
+
var r = U(), i = U(), a = n.convert(this), o = Ra(t) - 1;
|
|
3510
|
+
for (a.copyTo(r); --o >= 0;) if (n.sqrTo(r, i), (t & 1 << o) > 0) n.mulTo(i, a, r);
|
|
3511
|
+
else {
|
|
3512
|
+
var s = r;
|
|
3513
|
+
r = i, i = s;
|
|
3514
|
+
}
|
|
3515
|
+
return n.revert(r);
|
|
3516
|
+
}, e.prototype.chunkSize = function(e) {
|
|
3517
|
+
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
3518
|
+
}, e.prototype.toRadix = function(e) {
|
|
3519
|
+
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
3520
|
+
var t = this.chunkSize(e), n = e ** +t, r = K(n), i = U(), a = U(), o = "";
|
|
3521
|
+
for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substring(1) + o, i.divRemTo(r, i, a);
|
|
3522
|
+
return a.intValue().toString(e) + o;
|
|
3523
|
+
}, e.prototype.fromRadix = function(t, n) {
|
|
3524
|
+
this.fromInt(0), n ??= 10;
|
|
3525
|
+
for (var r = this.chunkSize(n), i = n ** +r, a = !1, o = 0, s = 0, c = 0; c < t.length; ++c) {
|
|
3526
|
+
var l = La(t, c);
|
|
3527
|
+
if (l < 0) {
|
|
3528
|
+
t.charAt(c) == "-" && this.signum() == 0 && (a = !0);
|
|
3529
|
+
continue;
|
|
3530
|
+
}
|
|
3531
|
+
s = n * s + l, ++o >= r && (this.dMultiply(i), this.dAddOffset(s, 0), o = 0, s = 0);
|
|
3532
|
+
}
|
|
3533
|
+
o > 0 && (this.dMultiply(n ** +o), this.dAddOffset(s, 0)), a && e.ZERO.subTo(this, this);
|
|
3534
|
+
}, e.prototype.fromNumber = function(t, n, r) {
|
|
3535
|
+
if (typeof n == "number") if (t < 2) this.fromInt(1);
|
|
3536
|
+
else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), aa, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n);) this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(e.ONE.shiftLeft(t - 1), this);
|
|
3537
|
+
else {
|
|
3538
|
+
var i = [], a = t & 7;
|
|
3539
|
+
i.length = (t >> 3) + 1, n.nextBytes(i), a > 0 ? i[0] &= (1 << a) - 1 : i[0] = 0, this.fromString(i, 256);
|
|
3540
|
+
}
|
|
3541
|
+
}, e.prototype.bitwiseTo = function(e, t, n) {
|
|
3542
|
+
var r, i, a = Math.min(e.t, this.t);
|
|
3543
|
+
for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
|
|
3544
|
+
if (e.t < this.t) {
|
|
3545
|
+
for (i = e.s & this.DM, r = a; r < this.t; ++r) n[r] = t(this[r], i);
|
|
3546
|
+
n.t = this.t;
|
|
3547
|
+
} else {
|
|
3548
|
+
for (i = this.s & this.DM, r = a; r < e.t; ++r) n[r] = t(i, e[r]);
|
|
3549
|
+
n.t = e.t;
|
|
3550
|
+
}
|
|
3551
|
+
n.s = t(this.s, e.s), n.clamp();
|
|
3552
|
+
}, e.prototype.changeBit = function(t, n) {
|
|
3553
|
+
var r = e.ONE.shiftLeft(t);
|
|
3554
|
+
return this.bitwiseTo(r, n, r), r;
|
|
3555
|
+
}, e.prototype.addTo = function(e, t) {
|
|
3556
|
+
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3557
|
+
if (e.t < this.t) {
|
|
3558
|
+
for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3559
|
+
r += this.s;
|
|
3560
|
+
} else {
|
|
3561
|
+
for (r += this.s; n < e.t;) r += e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3562
|
+
r += e.s;
|
|
3563
|
+
}
|
|
3564
|
+
t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
|
|
3565
|
+
}, e.prototype.dMultiply = function(e) {
|
|
3566
|
+
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
|
|
3567
|
+
}, e.prototype.dAddOffset = function(e, t) {
|
|
3568
|
+
if (e != 0) {
|
|
3569
|
+
for (; this.t <= t;) this[this.t++] = 0;
|
|
3570
|
+
for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
|
|
3571
|
+
}
|
|
3572
|
+
}, e.prototype.multiplyLowerTo = function(e, t, n) {
|
|
3573
|
+
var r = Math.min(this.t + e.t, t);
|
|
3574
|
+
for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
|
|
3575
|
+
for (var i = n.t - this.t; r < i; ++r) n[r + this.t] = this.am(0, e[r], n, r, 0, this.t);
|
|
3576
|
+
for (var i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
|
|
3577
|
+
n.clamp();
|
|
3578
|
+
}, e.prototype.multiplyUpperTo = function(e, t, n) {
|
|
3579
|
+
--t;
|
|
3580
|
+
var r = n.t = this.t + e.t - t;
|
|
3581
|
+
for (n.s = 0; --r >= 0;) n[r] = 0;
|
|
3582
|
+
for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
|
|
3583
|
+
n.clamp(), n.drShiftTo(1, n);
|
|
3584
|
+
}, e.prototype.modInt = function(e) {
|
|
3585
|
+
if (e <= 0) return 0;
|
|
3586
|
+
var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
|
|
3587
|
+
if (this.t > 0) if (t == 0) n = this[0] % e;
|
|
3588
|
+
else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
|
|
3589
|
+
return n;
|
|
3590
|
+
}, e.prototype.millerRabin = function(t) {
|
|
3591
|
+
var n = this.subtract(e.ONE), r = n.getLowestSetBit();
|
|
3592
|
+
if (r <= 0) return !1;
|
|
3593
|
+
var i = n.shiftRight(r);
|
|
3594
|
+
t = t + 1 >> 1, t > V.length && (t = V.length);
|
|
3595
|
+
for (var a = U(), o = 0; o < t; ++o) {
|
|
3596
|
+
a.fromInt(V[Math.floor(Math.random() * V.length)]);
|
|
3597
|
+
var s = a.modPow(i, this);
|
|
3598
|
+
if (s.compareTo(e.ONE) != 0 && s.compareTo(n) != 0) {
|
|
3599
|
+
for (var c = 1; c++ < r && s.compareTo(n) != 0;) if (s = s.modPowInt(2, this), s.compareTo(e.ONE) == 0) return !1;
|
|
3600
|
+
if (s.compareTo(n) != 0) return !1;
|
|
3601
|
+
}
|
|
3602
|
+
}
|
|
3603
|
+
return !0;
|
|
3604
|
+
}, e.prototype.square = function() {
|
|
3605
|
+
var e = U();
|
|
3606
|
+
return this.squareTo(e), e;
|
|
3607
|
+
}, e.prototype.gcda = function(e, t) {
|
|
3608
|
+
var n = this.s < 0 ? this.negate() : this.clone(), r = e.s < 0 ? e.negate() : e.clone();
|
|
3609
|
+
if (n.compareTo(r) < 0) {
|
|
3610
|
+
var i = n;
|
|
3611
|
+
n = r, r = i;
|
|
3612
|
+
}
|
|
3613
|
+
var a = n.getLowestSetBit(), o = r.getLowestSetBit();
|
|
3614
|
+
if (o < 0) {
|
|
3615
|
+
t(n);
|
|
3616
|
+
return;
|
|
3617
|
+
}
|
|
3618
|
+
a < o && (o = a), o > 0 && (n.rShiftTo(o, n), r.rShiftTo(o, r));
|
|
3619
|
+
var s = function() {
|
|
3620
|
+
(a = n.getLowestSetBit()) > 0 && n.rShiftTo(a, n), (a = r.getLowestSetBit()) > 0 && r.rShiftTo(a, r), n.compareTo(r) >= 0 ? (n.subTo(r, n), n.rShiftTo(1, n)) : (r.subTo(n, r), r.rShiftTo(1, r)), n.signum() > 0 ? setTimeout(s, 0) : (o > 0 && r.lShiftTo(o, r), setTimeout(function() {
|
|
3621
|
+
t(r);
|
|
3622
|
+
}, 0));
|
|
3623
|
+
};
|
|
3624
|
+
setTimeout(s, 10);
|
|
3625
|
+
}, e.prototype.fromNumberAsync = function(t, n, r, i) {
|
|
3626
|
+
if (typeof n == "number") if (t < 2) this.fromInt(1);
|
|
3627
|
+
else {
|
|
3628
|
+
this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), aa, this), this.isEven() && this.dAddOffset(1, 0);
|
|
3629
|
+
var a = this, o = function() {
|
|
3630
|
+
a.dAddOffset(2, 0), a.bitLength() > t && a.subTo(e.ONE.shiftLeft(t - 1), a), a.isProbablePrime(n) ? setTimeout(function() {
|
|
3631
|
+
i();
|
|
3632
|
+
}, 0) : setTimeout(o, 0);
|
|
3633
|
+
};
|
|
3634
|
+
setTimeout(o, 0);
|
|
3635
|
+
}
|
|
3636
|
+
else {
|
|
3637
|
+
var s = [], c = t & 7;
|
|
3638
|
+
s.length = (t >> 3) + 1, n.nextBytes(s), c > 0 ? s[0] &= (1 << c) - 1 : s[0] = 0, this.fromString(s, 256);
|
|
3639
|
+
}
|
|
3640
|
+
}, e;
|
|
3641
|
+
}(), ka = function() {
|
|
3642
|
+
function e() {}
|
|
3643
|
+
return e.prototype.convert = function(e) {
|
|
3644
|
+
return e;
|
|
3645
|
+
}, e.prototype.revert = function(e) {
|
|
3646
|
+
return e;
|
|
3647
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3648
|
+
e.multiplyTo(t, n);
|
|
3649
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3650
|
+
e.squareTo(t);
|
|
3651
|
+
}, e;
|
|
3652
|
+
}(), Aa = function() {
|
|
3653
|
+
function e(e) {
|
|
3654
|
+
this.m = e;
|
|
3655
|
+
}
|
|
3656
|
+
return e.prototype.convert = function(e) {
|
|
3657
|
+
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
|
|
3658
|
+
}, e.prototype.revert = function(e) {
|
|
3659
|
+
return e;
|
|
3660
|
+
}, e.prototype.reduce = function(e) {
|
|
3661
|
+
e.divRemTo(this.m, null, e);
|
|
3662
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3663
|
+
e.multiplyTo(t, n), this.reduce(n);
|
|
3664
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3665
|
+
e.squareTo(t), this.reduce(t);
|
|
3666
|
+
}, e;
|
|
3667
|
+
}(), ja = function() {
|
|
3668
|
+
function e(e) {
|
|
3669
|
+
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
3670
|
+
}
|
|
3671
|
+
return e.prototype.convert = function(e) {
|
|
3672
|
+
var t = U();
|
|
3673
|
+
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(H.ZERO) > 0 && this.m.subTo(t, t), t;
|
|
3674
|
+
}, e.prototype.revert = function(e) {
|
|
3675
|
+
var t = U();
|
|
3676
|
+
return e.copyTo(t), this.reduce(t), t;
|
|
3677
|
+
}, e.prototype.reduce = function(e) {
|
|
3678
|
+
for (; e.t <= this.mt2;) e[e.t++] = 0;
|
|
3679
|
+
for (var t = 0; t < this.m.t; ++t) {
|
|
3680
|
+
var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
|
|
3681
|
+
for (n = t + this.m.t, e[n] += this.m.am(0, r, e, t, 0, this.m.t); e[n] >= e.DV;) e[n] -= e.DV, e[++n]++;
|
|
3682
|
+
}
|
|
3683
|
+
e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
|
|
3684
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3685
|
+
e.multiplyTo(t, n), this.reduce(n);
|
|
3686
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3687
|
+
e.squareTo(t), this.reduce(t);
|
|
3688
|
+
}, e;
|
|
3689
|
+
}(), Ma = function() {
|
|
3690
|
+
function e(e) {
|
|
3691
|
+
this.m = e, this.r2 = U(), this.q3 = U(), H.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
|
|
3692
|
+
}
|
|
3693
|
+
return e.prototype.convert = function(e) {
|
|
3694
|
+
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
|
|
3695
|
+
if (e.compareTo(this.m) < 0) return e;
|
|
3696
|
+
var t = U();
|
|
3697
|
+
return e.copyTo(t), this.reduce(t), t;
|
|
3698
|
+
}, e.prototype.revert = function(e) {
|
|
3699
|
+
return e;
|
|
3700
|
+
}, e.prototype.reduce = function(e) {
|
|
3701
|
+
for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
|
|
3702
|
+
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
|
|
3703
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3704
|
+
e.multiplyTo(t, n), this.reduce(n);
|
|
3705
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3706
|
+
e.squareTo(t), this.reduce(t);
|
|
3707
|
+
}, e;
|
|
3708
|
+
}();
|
|
3709
|
+
function U() {
|
|
3710
|
+
return new H(null);
|
|
3711
|
+
}
|
|
3712
|
+
function W(e, t) {
|
|
3713
|
+
return new H(e, t);
|
|
3714
|
+
}
|
|
3715
|
+
var Na = typeof navigator < "u";
|
|
3716
|
+
Na && Da && navigator.appName == "Microsoft Internet Explorer" ? (H.prototype.am = function(e, t, n, r, i, a) {
|
|
3717
|
+
for (var o = t & 32767, s = t >> 15; --a >= 0;) {
|
|
3718
|
+
var c = this[e] & 32767, l = this[e++] >> 15, u = s * c + l * o;
|
|
3719
|
+
c = o * c + ((u & 32767) << 15) + n[r] + (i & 1073741823), i = (c >>> 30) + (u >>> 15) + s * l + (i >>> 30), n[r++] = c & 1073741823;
|
|
3720
|
+
}
|
|
3721
|
+
return i;
|
|
3722
|
+
}, B = 30) : Na && Da && navigator.appName != "Netscape" ? (H.prototype.am = function(e, t, n, r, i, a) {
|
|
3723
|
+
for (; --a >= 0;) {
|
|
3724
|
+
var o = t * this[e++] + n[r] + i;
|
|
3725
|
+
i = Math.floor(o / 67108864), n[r++] = o & 67108863;
|
|
3726
|
+
}
|
|
3727
|
+
return i;
|
|
3728
|
+
}, B = 26) : (H.prototype.am = function(e, t, n, r, i, a) {
|
|
3729
|
+
for (var o = t & 16383, s = t >> 14; --a >= 0;) {
|
|
3730
|
+
var c = this[e] & 16383, l = this[e++] >> 14, u = s * c + l * o;
|
|
3731
|
+
c = o * c + ((u & 16383) << 14) + n[r] + i, i = (c >> 28) + (u >> 14) + s * l, n[r++] = c & 268435455;
|
|
3732
|
+
}
|
|
3733
|
+
return i;
|
|
3734
|
+
}, B = 28), H.prototype.DB = B, H.prototype.DM = (1 << B) - 1, H.prototype.DV = 1 << B;
|
|
3735
|
+
var Pa = 52;
|
|
3736
|
+
H.prototype.FV = 2 ** Pa, H.prototype.F1 = Pa - B, H.prototype.F2 = 2 * B - Pa;
|
|
3737
|
+
var Fa = [], Ia = 48, G;
|
|
3738
|
+
for (G = 0; G <= 9; ++G) Fa[Ia++] = G;
|
|
3739
|
+
for (Ia = 97, G = 10; G < 36; ++G) Fa[Ia++] = G;
|
|
3740
|
+
for (Ia = 65, G = 10; G < 36; ++G) Fa[Ia++] = G;
|
|
3741
|
+
function La(e, t) {
|
|
3742
|
+
return Fa[e.charCodeAt(t)] ?? -1;
|
|
3743
|
+
}
|
|
3744
|
+
function K(e) {
|
|
3745
|
+
var t = U();
|
|
3746
|
+
return t.fromInt(e), t;
|
|
3747
|
+
}
|
|
3748
|
+
function Ra(e) {
|
|
3749
|
+
var t = 1, n;
|
|
3750
|
+
return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
|
|
3751
|
+
}
|
|
3752
|
+
H.ZERO = K(0), H.ONE = K(1);
|
|
3753
|
+
//#endregion
|
|
3754
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/prng4.js
|
|
3755
|
+
var za = function() {
|
|
3756
|
+
function e() {
|
|
3757
|
+
this.i = 0, this.j = 0, this.S = [];
|
|
3758
|
+
}
|
|
3759
|
+
return e.prototype.init = function(e) {
|
|
3760
|
+
var t, n, r;
|
|
3761
|
+
for (t = 0; t < 256; ++t) this.S[t] = t;
|
|
3762
|
+
for (n = 0, t = 0; t < 256; ++t) n = n + this.S[t] + e[t % e.length] & 255, r = this.S[t], this.S[t] = this.S[n], this.S[n] = r;
|
|
3763
|
+
this.i = 0, this.j = 0;
|
|
3764
|
+
}, e.prototype.next = function() {
|
|
3765
|
+
var e;
|
|
3766
|
+
return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
|
|
3767
|
+
}, e;
|
|
3768
|
+
}();
|
|
3769
|
+
function Ba() {
|
|
3770
|
+
return new za();
|
|
3771
|
+
}
|
|
3772
|
+
//#endregion
|
|
3773
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rng.js
|
|
3774
|
+
var Va, Ha = null, q;
|
|
3775
|
+
if (Ha == null) {
|
|
3776
|
+
Ha = [], q = 0;
|
|
3777
|
+
var Ua = void 0;
|
|
3778
|
+
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
3779
|
+
var Wa = new Uint32Array(256);
|
|
3780
|
+
for (self.crypto.getRandomValues(Wa), Ua = 0; Ua < Wa.length; ++Ua) Ha[q++] = Wa[Ua] & 255;
|
|
3781
|
+
}
|
|
3782
|
+
var Ga = 0, Ka = function(e) {
|
|
3783
|
+
if (Ga ||= 0, Ga >= 256 || q >= 256) {
|
|
3784
|
+
self.removeEventListener ? self.removeEventListener("mousemove", Ka, !1) : self.detachEvent && self.detachEvent("onmousemove", Ka);
|
|
3785
|
+
return;
|
|
3786
|
+
}
|
|
3787
|
+
try {
|
|
3788
|
+
var t = e.x + e.y;
|
|
3789
|
+
Ha[q++] = t & 255, Ga += 1;
|
|
3790
|
+
} catch {}
|
|
3791
|
+
};
|
|
3792
|
+
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Ka, !1) : self.attachEvent && self.attachEvent("onmousemove", Ka));
|
|
3793
|
+
}
|
|
3794
|
+
function qa() {
|
|
3795
|
+
if (Va == null) {
|
|
3796
|
+
for (Va = Ba(); q < 256;) {
|
|
3797
|
+
var e = Math.floor(65536 * Math.random());
|
|
3798
|
+
Ha[q++] = e & 255;
|
|
3799
|
+
}
|
|
3800
|
+
for (Va.init(Ha), q = 0; q < Ha.length; ++q) Ha[q] = 0;
|
|
3801
|
+
q = 0;
|
|
3802
|
+
}
|
|
3803
|
+
return Va.next();
|
|
3804
|
+
}
|
|
3805
|
+
var Ja = function() {
|
|
3806
|
+
function e() {}
|
|
3807
|
+
return e.prototype.nextBytes = function(e) {
|
|
3808
|
+
for (var t = 0; t < e.length; ++t) e[t] = qa();
|
|
3809
|
+
}, e;
|
|
3810
|
+
}();
|
|
3811
|
+
//#endregion
|
|
3812
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/sha256.js
|
|
3813
|
+
function Ya(e) {
|
|
3814
|
+
return Qa(so(Za(e), e.length * 8));
|
|
3815
|
+
}
|
|
3816
|
+
function Xa(e) {
|
|
3817
|
+
for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
|
|
3818
|
+
var i = e.charCodeAt(r);
|
|
3819
|
+
n += t.charAt(i >>> 4 & 15) + t.charAt(i & 15);
|
|
3820
|
+
}
|
|
3821
|
+
return n;
|
|
3822
|
+
}
|
|
3823
|
+
function Za(e) {
|
|
3824
|
+
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
|
|
3825
|
+
for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
|
|
3826
|
+
return t;
|
|
3827
|
+
}
|
|
3828
|
+
function Qa(e) {
|
|
3829
|
+
for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
|
|
3830
|
+
return t;
|
|
3831
|
+
}
|
|
3832
|
+
function J(e, t) {
|
|
3833
|
+
return e >>> t | e << 32 - t;
|
|
3834
|
+
}
|
|
3835
|
+
function $a(e, t) {
|
|
3836
|
+
return e >>> t;
|
|
3837
|
+
}
|
|
3838
|
+
function eo(e, t, n) {
|
|
3839
|
+
return e & t ^ ~e & n;
|
|
3840
|
+
}
|
|
3841
|
+
function to(e, t, n) {
|
|
3842
|
+
return e & t ^ e & n ^ t & n;
|
|
3843
|
+
}
|
|
3844
|
+
function no(e) {
|
|
3845
|
+
return J(e, 2) ^ J(e, 13) ^ J(e, 22);
|
|
3846
|
+
}
|
|
3847
|
+
function ro(e) {
|
|
3848
|
+
return J(e, 6) ^ J(e, 11) ^ J(e, 25);
|
|
3849
|
+
}
|
|
3850
|
+
function io(e) {
|
|
3851
|
+
return J(e, 7) ^ J(e, 18) ^ $a(e, 3);
|
|
3852
|
+
}
|
|
3853
|
+
function ao(e) {
|
|
3854
|
+
return J(e, 17) ^ J(e, 19) ^ $a(e, 10);
|
|
3855
|
+
}
|
|
3856
|
+
var oo = [
|
|
3857
|
+
1116352408,
|
|
3858
|
+
1899447441,
|
|
3859
|
+
-1245643825,
|
|
3860
|
+
-373957723,
|
|
3861
|
+
961987163,
|
|
3862
|
+
1508970993,
|
|
3863
|
+
-1841331548,
|
|
3864
|
+
-1424204075,
|
|
3865
|
+
-670586216,
|
|
3866
|
+
310598401,
|
|
3867
|
+
607225278,
|
|
3868
|
+
1426881987,
|
|
3869
|
+
1925078388,
|
|
3870
|
+
-2132889090,
|
|
3871
|
+
-1680079193,
|
|
3872
|
+
-1046744716,
|
|
3873
|
+
-459576895,
|
|
3874
|
+
-272742522,
|
|
3875
|
+
264347078,
|
|
3876
|
+
604807628,
|
|
3877
|
+
770255983,
|
|
3878
|
+
1249150122,
|
|
3879
|
+
1555081692,
|
|
3880
|
+
1996064986,
|
|
3881
|
+
-1740746414,
|
|
3882
|
+
-1473132947,
|
|
3883
|
+
-1341970488,
|
|
3884
|
+
-1084653625,
|
|
3885
|
+
-958395405,
|
|
3886
|
+
-710438585,
|
|
3887
|
+
113926993,
|
|
3888
|
+
338241895,
|
|
3889
|
+
666307205,
|
|
3890
|
+
773529912,
|
|
3891
|
+
1294757372,
|
|
3892
|
+
1396182291,
|
|
3893
|
+
1695183700,
|
|
3894
|
+
1986661051,
|
|
3895
|
+
-2117940946,
|
|
3896
|
+
-1838011259,
|
|
3897
|
+
-1564481375,
|
|
3898
|
+
-1474664885,
|
|
3899
|
+
-1035236496,
|
|
3900
|
+
-949202525,
|
|
3901
|
+
-778901479,
|
|
3902
|
+
-694614492,
|
|
3903
|
+
-200395387,
|
|
3904
|
+
275423344,
|
|
3905
|
+
430227734,
|
|
3906
|
+
506948616,
|
|
3907
|
+
659060556,
|
|
3908
|
+
883997877,
|
|
3909
|
+
958139571,
|
|
3910
|
+
1322822218,
|
|
3911
|
+
1537002063,
|
|
3912
|
+
1747873779,
|
|
3913
|
+
1955562222,
|
|
3914
|
+
2024104815,
|
|
3915
|
+
-2067236844,
|
|
3916
|
+
-1933114872,
|
|
3917
|
+
-1866530822,
|
|
3918
|
+
-1538233109,
|
|
3919
|
+
-1090935817,
|
|
3920
|
+
-965641998
|
|
3921
|
+
];
|
|
3922
|
+
function so(e, t) {
|
|
3923
|
+
var n = [
|
|
3924
|
+
1779033703,
|
|
3925
|
+
-1150833019,
|
|
3926
|
+
1013904242,
|
|
3927
|
+
-1521486534,
|
|
3928
|
+
1359893119,
|
|
3929
|
+
-1694144372,
|
|
3930
|
+
528734635,
|
|
3931
|
+
1541459225
|
|
3932
|
+
], r = Array(64), i, a, o, s, c, l, u, d, f, p, m, h;
|
|
3933
|
+
for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, f = 0; f < e.length; f += 16) {
|
|
3934
|
+
for (i = n[0], a = n[1], o = n[2], s = n[3], c = n[4], l = n[5], u = n[6], d = n[7], p = 0; p < 64; p++) p < 16 ? r[p] = e[p + f] : r[p] = Y(Y(Y(ao(r[p - 2]), r[p - 7]), io(r[p - 15])), r[p - 16]), m = Y(Y(Y(Y(d, ro(c)), eo(c, l, u)), oo[p]), r[p]), h = Y(no(i), to(i, a, o)), d = u, u = l, l = c, c = Y(s, m), s = o, o = a, a = i, i = Y(m, h);
|
|
3935
|
+
n[0] = Y(i, n[0]), n[1] = Y(a, n[1]), n[2] = Y(o, n[2]), n[3] = Y(s, n[3]), n[4] = Y(c, n[4]), n[5] = Y(l, n[5]), n[6] = Y(u, n[6]), n[7] = Y(d, n[7]);
|
|
3936
|
+
}
|
|
3937
|
+
return n;
|
|
3938
|
+
}
|
|
3939
|
+
function Y(e, t) {
|
|
3940
|
+
var n = (e & 65535) + (t & 65535);
|
|
3941
|
+
return (e >> 16) + (t >> 16) + (n >> 16) << 16 | n & 65535;
|
|
3942
|
+
}
|
|
3943
|
+
//#endregion
|
|
3944
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rsa.js
|
|
3945
|
+
function co(e, t) {
|
|
3946
|
+
if (t < e.length + 22) return console.error("Message too long for RSA"), null;
|
|
3947
|
+
for (var n = t - e.length - 6, r = "", i = 0; i < n; i += 2) r += "ff";
|
|
3948
|
+
return W("0001" + r + "00" + e, 16);
|
|
3949
|
+
}
|
|
3950
|
+
function lo(e, t) {
|
|
3951
|
+
if (t < e.length + 11) return console.error("Message too long for RSA"), null;
|
|
3952
|
+
for (var n = [], r = e.length - 1; r >= 0 && t > 0;) {
|
|
3953
|
+
var i = e.charCodeAt(r--);
|
|
3954
|
+
i < 128 ? n[--t] = i : i > 127 && i < 2048 ? (n[--t] = i & 63 | 128, n[--t] = i >> 6 | 192) : (n[--t] = i & 63 | 128, n[--t] = i >> 6 & 63 | 128, n[--t] = i >> 12 | 224);
|
|
3955
|
+
}
|
|
3956
|
+
n[--t] = 0;
|
|
3957
|
+
for (var a = new Ja(), o = []; t > 2;) {
|
|
3958
|
+
for (o[0] = 0; o[0] == 0;) a.nextBytes(o);
|
|
3959
|
+
n[--t] = o[0];
|
|
3960
|
+
}
|
|
3961
|
+
return n[--t] = 2, n[--t] = 0, new H(n);
|
|
3962
|
+
}
|
|
3963
|
+
function uo(e, t, n) {
|
|
3964
|
+
for (var r = "", i = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
|
|
3965
|
+
(i & 4278190080) >> 24,
|
|
3966
|
+
(i & 16711680) >> 16,
|
|
3967
|
+
(i & 65280) >> 8,
|
|
3968
|
+
i & 255
|
|
3969
|
+
]))), i += 1;
|
|
3970
|
+
return r;
|
|
3971
|
+
}
|
|
3972
|
+
var fo = 32;
|
|
3973
|
+
function po(e, t) {
|
|
3974
|
+
var n = fo, r = Ya;
|
|
3975
|
+
if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
|
|
3976
|
+
var i = "", a;
|
|
3977
|
+
for (a = 0; a < t - e.length - 2 * n - 2; a += 1) i += "\0";
|
|
3978
|
+
var o = r("") + i + "" + e, s = Array(n);
|
|
3979
|
+
new Ja().nextBytes(s);
|
|
3980
|
+
var c = uo(s, o.length, r), l = [];
|
|
3981
|
+
for (a = 0; a < o.length; a += 1) l[a] = o.charCodeAt(a) ^ c.charCodeAt(a);
|
|
3982
|
+
var u = uo(l, s.length, r), d = [0];
|
|
3983
|
+
for (a = 0; a < s.length; a += 1) d[a + 1] = s[a] ^ u.charCodeAt(a);
|
|
3984
|
+
return new H(d.concat(l));
|
|
3985
|
+
}
|
|
3986
|
+
var mo = function() {
|
|
3987
|
+
function e() {
|
|
3988
|
+
this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
|
|
3989
|
+
}
|
|
3990
|
+
return e.prototype.doPublic = function(e) {
|
|
3991
|
+
return e.modPowInt(this.e, this.n);
|
|
3992
|
+
}, e.prototype.doPrivate = function(e) {
|
|
3993
|
+
if (this.p == null || this.q == null) return e.modPow(this.d, this.n);
|
|
3994
|
+
for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0;) t = t.add(this.p);
|
|
3995
|
+
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
|
|
3996
|
+
}, e.prototype.setPublic = function(e, t) {
|
|
3997
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = W(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
|
|
3998
|
+
}, e.prototype.encrypt = function(e, t) {
|
|
3999
|
+
t === void 0 && (t = lo);
|
|
4000
|
+
var n = this.n.bitLength() + 7 >> 3, r = t(e, n);
|
|
4001
|
+
if (r == null) return null;
|
|
4002
|
+
var i = this.doPublic(r);
|
|
4003
|
+
if (i == null) return null;
|
|
4004
|
+
for (var a = i.toString(16), o = a.length, s = 0; s < n * 2 - o; s++) a = "0" + a;
|
|
4005
|
+
return a;
|
|
4006
|
+
}, e.prototype.setPrivate = function(e, t, n) {
|
|
4007
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = W(e, 16), this.e = parseInt(t, 16), this.d = W(n, 16)) : console.error("Invalid RSA private key");
|
|
4008
|
+
}, e.prototype.setPrivateEx = function(e, t, n, r, i, a, o, s) {
|
|
4009
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = W(e, 16), this.e = parseInt(t, 16), this.d = W(n, 16), this.p = W(r, 16), this.q = W(i, 16), this.dmp1 = W(a, 16), this.dmq1 = W(o, 16), this.coeff = W(s, 16)) : console.error("Invalid RSA private key");
|
|
4010
|
+
}, e.prototype.generate = function(e, t) {
|
|
4011
|
+
var n = new Ja(), r = e >> 1;
|
|
4012
|
+
this.e = parseInt(t, 16);
|
|
4013
|
+
for (var i = new H(t, 16);;) {
|
|
4014
|
+
for (; this.p = new H(e - r, 1, n), !(this.p.subtract(H.ONE).gcd(i).compareTo(H.ONE) == 0 && this.p.isProbablePrime(10)););
|
|
4015
|
+
for (; this.q = new H(r, 1, n), !(this.q.subtract(H.ONE).gcd(i).compareTo(H.ONE) == 0 && this.q.isProbablePrime(10)););
|
|
4016
|
+
if (this.p.compareTo(this.q) <= 0) {
|
|
4017
|
+
var a = this.p;
|
|
4018
|
+
this.p = this.q, this.q = a;
|
|
4019
|
+
}
|
|
4020
|
+
var o = this.p.subtract(H.ONE), s = this.q.subtract(H.ONE), c = o.multiply(s);
|
|
4021
|
+
if (c.gcd(i).compareTo(H.ONE) == 0) {
|
|
4022
|
+
this.n = this.p.multiply(this.q), this.d = i.modInverse(c), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(s), this.coeff = this.q.modInverse(this.p);
|
|
4023
|
+
break;
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
}, e.prototype.decrypt = function(e) {
|
|
4027
|
+
var t = W(e, 16), n = this.doPrivate(t);
|
|
4028
|
+
return n == null ? null : ho(n, this.n.bitLength() + 7 >> 3);
|
|
4029
|
+
}, e.prototype.generateAsync = function(e, t, n) {
|
|
4030
|
+
var r = new Ja(), i = e >> 1;
|
|
4031
|
+
this.e = parseInt(t, 16);
|
|
4032
|
+
var a = new H(t, 16), o = this, s = function() {
|
|
4033
|
+
var t = function() {
|
|
4034
|
+
if (o.p.compareTo(o.q) <= 0) {
|
|
4035
|
+
var e = o.p;
|
|
4036
|
+
o.p = o.q, o.q = e;
|
|
4037
|
+
}
|
|
4038
|
+
var t = o.p.subtract(H.ONE), r = o.q.subtract(H.ONE), i = t.multiply(r);
|
|
4039
|
+
i.gcd(a).compareTo(H.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(i), o.dmp1 = o.d.mod(t), o.dmq1 = o.d.mod(r), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
|
|
4040
|
+
n();
|
|
4041
|
+
}, 0)) : setTimeout(s, 0);
|
|
4042
|
+
}, c = function() {
|
|
4043
|
+
o.q = U(), o.q.fromNumberAsync(i, 1, r, function() {
|
|
4044
|
+
o.q.subtract(H.ONE).gcda(a, function(e) {
|
|
4045
|
+
e.compareTo(H.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(t, 0) : setTimeout(c, 0);
|
|
4046
|
+
});
|
|
4047
|
+
});
|
|
4048
|
+
}, l = function() {
|
|
4049
|
+
o.p = U(), o.p.fromNumberAsync(e - i, 1, r, function() {
|
|
4050
|
+
o.p.subtract(H.ONE).gcda(a, function(e) {
|
|
4051
|
+
e.compareTo(H.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(l, 0);
|
|
4052
|
+
});
|
|
4053
|
+
});
|
|
4054
|
+
};
|
|
4055
|
+
setTimeout(l, 0);
|
|
4056
|
+
};
|
|
4057
|
+
setTimeout(s, 0);
|
|
4058
|
+
}, e.prototype.sign = function(e, t, n) {
|
|
4059
|
+
var r = _o(n) + t(e).toString(), i = this.n.bitLength() / 4, a = co(r, i);
|
|
4060
|
+
if (a == null) return null;
|
|
4061
|
+
var o = this.doPrivate(a);
|
|
4062
|
+
if (o == null) return null;
|
|
4063
|
+
for (var s = o.toString(16), c = s.length, l = 0; l < i - c; l++) s = "0" + s;
|
|
4064
|
+
return s;
|
|
4065
|
+
}, e.prototype.verify = function(e, t, n) {
|
|
4066
|
+
var r = W(t, 16), i = this.doPublic(r);
|
|
4067
|
+
return i == null ? null : vo(i.toString(16).replace(/^1f+00/, "")) == n(e).toString();
|
|
4068
|
+
}, e;
|
|
4069
|
+
}();
|
|
4070
|
+
function ho(e, t) {
|
|
4071
|
+
for (var n = e.toByteArray(), r = 0; r < n.length && n[r] == 0;) ++r;
|
|
4072
|
+
if (n.length - r != t - 1 || n[r] != 2) return null;
|
|
4073
|
+
for (++r; n[r] != 0;) if (++r >= n.length) return null;
|
|
4074
|
+
for (var i = ""; ++r < n.length;) {
|
|
4075
|
+
var a = n[r] & 255;
|
|
4076
|
+
a < 128 ? i += String.fromCharCode(a) : a > 191 && a < 224 ? (i += String.fromCharCode((a & 31) << 6 | n[r + 1] & 63), ++r) : (i += String.fromCharCode((a & 15) << 12 | (n[r + 1] & 63) << 6 | n[r + 2] & 63), r += 2);
|
|
4077
|
+
}
|
|
4078
|
+
return i;
|
|
4079
|
+
}
|
|
4080
|
+
var go = {
|
|
4081
|
+
md2: "3020300c06082a864886f70d020205000410",
|
|
4082
|
+
md5: "3020300c06082a864886f70d020505000410",
|
|
4083
|
+
sha1: "3021300906052b0e03021a05000414",
|
|
4084
|
+
sha224: "302d300d06096086480165030402040500041c",
|
|
4085
|
+
sha256: "3031300d060960864801650304020105000420",
|
|
4086
|
+
sha384: "3041300d060960864801650304020205000430",
|
|
4087
|
+
sha512: "3051300d060960864801650304020305000440",
|
|
4088
|
+
ripemd160: "3021300906052b2403020105000414"
|
|
4089
|
+
};
|
|
4090
|
+
function _o(e) {
|
|
4091
|
+
return go[e] || "";
|
|
4092
|
+
}
|
|
4093
|
+
function vo(e) {
|
|
4094
|
+
for (var t in go) if (go.hasOwnProperty(t)) {
|
|
4095
|
+
var n = go[t], r = n.length;
|
|
4096
|
+
if (e.substring(0, r) == n) return e.substring(r);
|
|
4097
|
+
}
|
|
4098
|
+
return e;
|
|
4099
|
+
}
|
|
4100
|
+
//#endregion
|
|
4101
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js
|
|
4102
|
+
function X(e, t, n) {
|
|
4103
|
+
if (!t || !e) throw Error("extend failed, please check that all dependencies are included.");
|
|
4104
|
+
var r = function() {};
|
|
4105
|
+
if (r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e, e.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), n) {
|
|
4106
|
+
for (var i in n) e.prototype[i] = n[i];
|
|
4107
|
+
var a = function() {}, o = ["toString", "valueOf"];
|
|
4108
|
+
try {
|
|
4109
|
+
/MSIE/.test(navigator.userAgent) && (a = function(e, t) {
|
|
4110
|
+
for (i = 0; i < o.length; i += 1) {
|
|
4111
|
+
var n = o[i], r = t[n];
|
|
4112
|
+
typeof r == "function" && r != Object.prototype[n] && (e[n] = r);
|
|
4113
|
+
}
|
|
4114
|
+
});
|
|
4115
|
+
} catch {}
|
|
4116
|
+
a(e.prototype, n);
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
var Z = {};
|
|
4120
|
+
(Z.asn1 === void 0 || !Z.asn1) && (Z.asn1 = {}), Z.asn1.ASN1Util = new function() {
|
|
4121
|
+
this.integerToByteHex = function(e) {
|
|
4122
|
+
var t = e.toString(16);
|
|
4123
|
+
return t.length % 2 == 1 && (t = "0" + t), t;
|
|
4124
|
+
}, this.bigIntToMinTwosComplementsHex = function(e) {
|
|
4125
|
+
var t = e.toString(16);
|
|
4126
|
+
if (t.substring(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
|
|
4127
|
+
else {
|
|
4128
|
+
var n = t.substring(1).length;
|
|
4129
|
+
n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
|
|
4130
|
+
for (var r = "", i = 0; i < n; i++) r += "f";
|
|
4131
|
+
t = new H(r, 16).xor(e).add(H.ONE).toString(16).replace(/^-/, "");
|
|
4132
|
+
}
|
|
4133
|
+
return t;
|
|
4134
|
+
}, this.getPEMStringFromHex = function(e, t) {
|
|
4135
|
+
return hextopem(e, t);
|
|
4136
|
+
}, this.newObject = function(e) {
|
|
4137
|
+
var t = Z.asn1, n = t.DERBoolean, r = t.DERInteger, i = t.DERBitString, a = t.DEROctetString, o = t.DERNull, s = t.DERObjectIdentifier, c = t.DEREnumerated, l = t.DERUTF8String, u = t.DERNumericString, d = t.DERPrintableString, f = t.DERTeletexString, p = t.DERIA5String, m = t.DERUTCTime, h = t.DERGeneralizedTime, g = t.DERSequence, _ = t.DERSet, v = t.DERTaggedObject, y = t.ASN1Util.newObject, b = Object.keys(e);
|
|
4138
|
+
if (b.length != 1) throw "key of param shall be only one.";
|
|
4139
|
+
var x = b[0];
|
|
4140
|
+
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + x + ":") == -1) throw "undefined key: " + x;
|
|
4141
|
+
if (x == "bool") return new n(e[x]);
|
|
4142
|
+
if (x == "int") return new r(e[x]);
|
|
4143
|
+
if (x == "bitstr") return new i(e[x]);
|
|
4144
|
+
if (x == "octstr") return new a(e[x]);
|
|
4145
|
+
if (x == "null") return new o(e[x]);
|
|
4146
|
+
if (x == "oid") return new s(e[x]);
|
|
4147
|
+
if (x == "enum") return new c(e[x]);
|
|
4148
|
+
if (x == "utf8str") return new l(e[x]);
|
|
4149
|
+
if (x == "numstr") return new u(e[x]);
|
|
4150
|
+
if (x == "prnstr") return new d(e[x]);
|
|
4151
|
+
if (x == "telstr") return new f(e[x]);
|
|
4152
|
+
if (x == "ia5str") return new p(e[x]);
|
|
4153
|
+
if (x == "utctime") return new m(e[x]);
|
|
4154
|
+
if (x == "gentime") return new h(e[x]);
|
|
4155
|
+
if (x == "seq") {
|
|
4156
|
+
for (var S = e[x], C = [], w = 0; w < S.length; w++) {
|
|
4157
|
+
var ee = y(S[w]);
|
|
4158
|
+
C.push(ee);
|
|
4159
|
+
}
|
|
4160
|
+
return new g({ array: C });
|
|
4161
|
+
}
|
|
4162
|
+
if (x == "set") {
|
|
4163
|
+
for (var S = e[x], C = [], w = 0; w < S.length; w++) {
|
|
4164
|
+
var ee = y(S[w]);
|
|
4165
|
+
C.push(ee);
|
|
4166
|
+
}
|
|
4167
|
+
return new _({ array: C });
|
|
4168
|
+
}
|
|
4169
|
+
if (x == "tag") {
|
|
4170
|
+
var T = e[x];
|
|
4171
|
+
if (Object.prototype.toString.call(T) === "[object Array]" && T.length == 3) {
|
|
4172
|
+
var te = y(T[2]);
|
|
4173
|
+
return new v({
|
|
4174
|
+
tag: T[0],
|
|
4175
|
+
explicit: T[1],
|
|
4176
|
+
obj: te
|
|
4177
|
+
});
|
|
4178
|
+
} else {
|
|
4179
|
+
var E = {};
|
|
4180
|
+
if (T.explicit !== void 0 && (E.explicit = T.explicit), T.tag !== void 0 && (E.tag = T.tag), T.obj === void 0) throw "obj shall be specified for 'tag'.";
|
|
4181
|
+
return E.obj = y(T.obj), new v(E);
|
|
4182
|
+
}
|
|
4183
|
+
}
|
|
4184
|
+
}, this.jsonToASN1HEX = function(e) {
|
|
4185
|
+
return this.newObject(e).getEncodedHex();
|
|
4186
|
+
};
|
|
4187
|
+
}(), Z.asn1.ASN1Util.oidHexToInt = function(e) {
|
|
4188
|
+
for (var t = "", n = parseInt(e.substring(0, 2), 16), r = Math.floor(n / 40), i = n % 40, t = r + "." + i, a = "", o = 2; o < e.length; o += 2) {
|
|
4189
|
+
var s = ("00000000" + parseInt(e.substring(o, o + 2), 16).toString(2)).slice(-8);
|
|
4190
|
+
if (a += s.substring(1, 8), s.substring(0, 1) == "0") {
|
|
4191
|
+
var c = new H(a, 2);
|
|
4192
|
+
t = t + "." + c.toString(10), a = "";
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
return t;
|
|
4196
|
+
}, Z.asn1.ASN1Util.oidIntToHex = function(e) {
|
|
4197
|
+
var t = function(e) {
|
|
4198
|
+
var t = e.toString(16);
|
|
4199
|
+
return t.length == 1 && (t = "0" + t), t;
|
|
4200
|
+
}, n = function(e) {
|
|
4201
|
+
var n = "", r = new H(e, 10).toString(2), i = 7 - r.length % 7;
|
|
4202
|
+
i == 7 && (i = 0);
|
|
4203
|
+
for (var a = "", o = 0; o < i; o++) a += "0";
|
|
4204
|
+
r = a + r;
|
|
4205
|
+
for (var o = 0; o < r.length - 1; o += 7) {
|
|
4206
|
+
var s = r.substring(o, o + 7);
|
|
4207
|
+
o != r.length - 7 && (s = "1" + s), n += t(parseInt(s, 2));
|
|
4208
|
+
}
|
|
4209
|
+
return n;
|
|
4210
|
+
};
|
|
4211
|
+
if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
|
|
4212
|
+
var r = "", i = e.split("."), a = parseInt(i[0]) * 40 + parseInt(i[1]);
|
|
4213
|
+
r += t(a), i.splice(0, 2);
|
|
4214
|
+
for (var o = 0; o < i.length; o++) r += n(i[o]);
|
|
4215
|
+
return r;
|
|
4216
|
+
}, Z.asn1.ASN1Object = function() {
|
|
4217
|
+
var e = "";
|
|
4218
|
+
this.getLengthHexFromValue = function() {
|
|
4219
|
+
if (this.hV === void 0 || this.hV == null) throw "this.hV is null or undefined.";
|
|
4220
|
+
if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + e.length + ",v=" + this.hV;
|
|
4221
|
+
var t = this.hV.length / 2, n = t.toString(16);
|
|
4222
|
+
if (n.length % 2 == 1 && (n = "0" + n), t < 128) return n;
|
|
4223
|
+
var r = n.length / 2;
|
|
4224
|
+
if (r > 15) throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
|
|
4225
|
+
return (128 + r).toString(16) + n;
|
|
4226
|
+
}, this.getEncodedHex = function() {
|
|
4227
|
+
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;
|
|
4228
|
+
}, this.getValueHex = function() {
|
|
4229
|
+
return this.getEncodedHex(), this.hV;
|
|
4230
|
+
}, this.getFreshValueHex = function() {
|
|
4231
|
+
return "";
|
|
4232
|
+
};
|
|
4233
|
+
}, Z.asn1.DERAbstractString = function(e) {
|
|
4234
|
+
Z.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
|
|
4235
|
+
return this.s;
|
|
4236
|
+
}, this.setString = function(e) {
|
|
4237
|
+
this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(this.s);
|
|
4238
|
+
}, this.setStringHex = function(e) {
|
|
4239
|
+
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
|
|
4240
|
+
}, this.getFreshValueHex = function() {
|
|
4241
|
+
return this.hV;
|
|
4242
|
+
}, e !== void 0 && (typeof e == "string" ? this.setString(e) : e.str === void 0 ? e.hex !== void 0 && this.setStringHex(e.hex) : this.setString(e.str));
|
|
4243
|
+
}, X(Z.asn1.DERAbstractString, Z.asn1.ASN1Object), Z.asn1.DERAbstractTime = function(e) {
|
|
4244
|
+
Z.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
|
|
4245
|
+
return utc = e.getTime() + e.getTimezoneOffset() * 6e4, new Date(utc);
|
|
4246
|
+
}, this.formatDate = function(e, t, n) {
|
|
4247
|
+
var r = this.zeroPadding, i = this.localDateToUTC(e), a = String(i.getFullYear());
|
|
4248
|
+
t == "utc" && (a = a.substring(2, 4));
|
|
4249
|
+
var o = r(String(i.getMonth() + 1), 2), s = r(String(i.getDate()), 2), c = r(String(i.getHours()), 2), l = r(String(i.getMinutes()), 2), u = r(String(i.getSeconds()), 2), d = a + o + s + c + l + u;
|
|
4250
|
+
if (n === !0) {
|
|
4251
|
+
var f = i.getMilliseconds();
|
|
4252
|
+
if (f != 0) {
|
|
4253
|
+
var p = r(String(f), 3);
|
|
4254
|
+
p = p.replace(/[0]+$/, ""), d = d + "." + p;
|
|
4255
|
+
}
|
|
4256
|
+
}
|
|
4257
|
+
return d + "Z";
|
|
4258
|
+
}, this.zeroPadding = function(e, t) {
|
|
4259
|
+
return e.length >= t ? e : Array(t - e.length + 1).join("0") + e;
|
|
4260
|
+
}, this.getString = function() {
|
|
4261
|
+
return this.s;
|
|
4262
|
+
}, this.setString = function(e) {
|
|
4263
|
+
this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(e);
|
|
4264
|
+
}, this.setByDateValue = function(e, t, n, r, i, a) {
|
|
4265
|
+
var o = new Date(Date.UTC(e, t - 1, n, r, i, a, 0));
|
|
4266
|
+
this.setByDate(o);
|
|
4267
|
+
}, this.getFreshValueHex = function() {
|
|
4268
|
+
return this.hV;
|
|
4269
|
+
};
|
|
4270
|
+
}, X(Z.asn1.DERAbstractTime, Z.asn1.ASN1Object), Z.asn1.DERAbstractStructured = function(e) {
|
|
4271
|
+
Z.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
|
|
4272
|
+
this.hTLV = null, this.isModified = !0, this.asn1Array = e;
|
|
4273
|
+
}, this.appendASN1Object = function(e) {
|
|
4274
|
+
this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
|
|
4275
|
+
}, this.asn1Array = [], e !== void 0 && e.array !== void 0 && (this.asn1Array = e.array);
|
|
4276
|
+
}, X(Z.asn1.DERAbstractStructured, Z.asn1.ASN1Object), Z.asn1.DERBoolean = function() {
|
|
4277
|
+
Z.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
|
|
4278
|
+
}, X(Z.asn1.DERBoolean, Z.asn1.ASN1Object), Z.asn1.DERInteger = function(e) {
|
|
4279
|
+
Z.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
|
|
4280
|
+
this.hTLV = null, this.isModified = !0, this.hV = Z.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
4281
|
+
}, this.setByInteger = function(e) {
|
|
4282
|
+
var t = new H(String(e), 10);
|
|
4283
|
+
this.setByBigInteger(t);
|
|
4284
|
+
}, this.setValueHex = function(e) {
|
|
4285
|
+
this.hV = e;
|
|
4286
|
+
}, this.getFreshValueHex = function() {
|
|
4287
|
+
return this.hV;
|
|
4288
|
+
}, e !== void 0 && (e.bigint === void 0 ? e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int) : this.setByBigInteger(e.bigint));
|
|
4289
|
+
}, X(Z.asn1.DERInteger, Z.asn1.ASN1Object), Z.asn1.DERBitString = function(e) {
|
|
4290
|
+
e !== void 0 && e.obj !== void 0 && (e.hex = "00" + Z.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), Z.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
|
|
4291
|
+
this.hTLV = null, this.isModified = !0, this.hV = e;
|
|
4292
|
+
}, this.setUnusedBitsAndHexValue = function(e, t) {
|
|
4293
|
+
if (e < 0 || 7 < e) throw "unused bits shall be from 0 to 7: u = " + e;
|
|
4294
|
+
var n = "0" + e;
|
|
4295
|
+
this.hTLV = null, this.isModified = !0, this.hV = n + t;
|
|
4296
|
+
}, this.setByBinaryString = function(e) {
|
|
4297
|
+
e = e.replace(/0+$/, "");
|
|
4298
|
+
var t = 8 - e.length % 8;
|
|
4299
|
+
t == 8 && (t = 0);
|
|
4300
|
+
for (var n = 0; n <= t; n++) e += "0";
|
|
4301
|
+
for (var r = "", n = 0; n < e.length - 1; n += 8) {
|
|
4302
|
+
var i = e.substring(n, n + 8), a = parseInt(i, 2).toString(16);
|
|
4303
|
+
a.length == 1 && (a = "0" + a), r += a;
|
|
4304
|
+
}
|
|
4305
|
+
this.hTLV = null, this.isModified = !0, this.hV = "0" + t + r;
|
|
4306
|
+
}, this.setByBooleanArray = function(e) {
|
|
4307
|
+
for (var t = "", n = 0; n < e.length; n++) e[n] == 1 ? t += "1" : t += "0";
|
|
4308
|
+
this.setByBinaryString(t);
|
|
4309
|
+
}, this.newFalseArray = function(e) {
|
|
4310
|
+
for (var t = Array(e), n = 0; n < e; n++) t[n] = !1;
|
|
4311
|
+
return t;
|
|
4312
|
+
}, this.getFreshValueHex = function() {
|
|
4313
|
+
return this.hV;
|
|
4314
|
+
}, e !== void 0 && (typeof e == "string" && e.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(e) : e.hex === void 0 ? e.bin === void 0 ? e.array !== void 0 && this.setByBooleanArray(e.array) : this.setByBinaryString(e.bin) : this.setHexValueIncludingUnusedBits(e.hex));
|
|
4315
|
+
}, X(Z.asn1.DERBitString, Z.asn1.ASN1Object), Z.asn1.DEROctetString = function(e) {
|
|
4316
|
+
e !== void 0 && e.obj !== void 0 && (e.hex = Z.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), Z.asn1.DEROctetString.superclass.constructor.call(this, e), this.hT = "04";
|
|
4317
|
+
}, X(Z.asn1.DEROctetString, Z.asn1.DERAbstractString), Z.asn1.DERNull = function() {
|
|
4318
|
+
Z.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
|
|
4319
|
+
}, X(Z.asn1.DERNull, Z.asn1.ASN1Object), Z.asn1.DERObjectIdentifier = function(e) {
|
|
4320
|
+
var t = function(e) {
|
|
4321
|
+
var t = e.toString(16);
|
|
4322
|
+
return t.length == 1 && (t = "0" + t), t;
|
|
4323
|
+
}, n = function(e) {
|
|
4324
|
+
var n = "", r = new H(e, 10).toString(2), i = 7 - r.length % 7;
|
|
4325
|
+
i == 7 && (i = 0);
|
|
4326
|
+
for (var a = "", o = 0; o < i; o++) a += "0";
|
|
4327
|
+
r = a + r;
|
|
4328
|
+
for (var o = 0; o < r.length - 1; o += 7) {
|
|
4329
|
+
var s = r.substring(o, o + 7);
|
|
4330
|
+
o != r.length - 7 && (s = "1" + s), n += t(parseInt(s, 2));
|
|
4331
|
+
}
|
|
4332
|
+
return n;
|
|
4333
|
+
};
|
|
4334
|
+
Z.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(e) {
|
|
4335
|
+
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
|
|
4336
|
+
}, this.setValueOidString = function(e) {
|
|
4337
|
+
if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
|
|
4338
|
+
var r = "", i = e.split("."), a = parseInt(i[0]) * 40 + parseInt(i[1]);
|
|
4339
|
+
r += t(a), i.splice(0, 2);
|
|
4340
|
+
for (var o = 0; o < i.length; o++) r += n(i[o]);
|
|
4341
|
+
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = r;
|
|
4342
|
+
}, this.setValueName = function(e) {
|
|
4343
|
+
var t = Z.asn1.x509.OID.name2oid(e);
|
|
4344
|
+
if (t !== "") this.setValueOidString(t);
|
|
4345
|
+
else throw "DERObjectIdentifier oidName undefined: " + e;
|
|
4346
|
+
}, this.getFreshValueHex = function() {
|
|
4347
|
+
return this.hV;
|
|
4348
|
+
}, e !== void 0 && (typeof e == "string" ? e.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(e) : this.setValueName(e) : e.oid === void 0 ? e.hex === void 0 ? e.name !== void 0 && this.setValueName(e.name) : this.setValueHex(e.hex) : this.setValueOidString(e.oid));
|
|
4349
|
+
}, X(Z.asn1.DERObjectIdentifier, Z.asn1.ASN1Object), Z.asn1.DEREnumerated = function(e) {
|
|
4350
|
+
Z.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
|
|
4351
|
+
this.hTLV = null, this.isModified = !0, this.hV = Z.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
4352
|
+
}, this.setByInteger = function(e) {
|
|
4353
|
+
var t = new H(String(e), 10);
|
|
4354
|
+
this.setByBigInteger(t);
|
|
4355
|
+
}, this.setValueHex = function(e) {
|
|
4356
|
+
this.hV = e;
|
|
4357
|
+
}, this.getFreshValueHex = function() {
|
|
4358
|
+
return this.hV;
|
|
4359
|
+
}, e !== void 0 && (e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int));
|
|
4360
|
+
}, X(Z.asn1.DEREnumerated, Z.asn1.ASN1Object), Z.asn1.DERUTF8String = function(e) {
|
|
4361
|
+
Z.asn1.DERUTF8String.superclass.constructor.call(this, e), this.hT = "0c";
|
|
4362
|
+
}, X(Z.asn1.DERUTF8String, Z.asn1.DERAbstractString), Z.asn1.DERNumericString = function(e) {
|
|
4363
|
+
Z.asn1.DERNumericString.superclass.constructor.call(this, e), this.hT = "12";
|
|
4364
|
+
}, X(Z.asn1.DERNumericString, Z.asn1.DERAbstractString), Z.asn1.DERPrintableString = function(e) {
|
|
4365
|
+
Z.asn1.DERPrintableString.superclass.constructor.call(this, e), this.hT = "13";
|
|
4366
|
+
}, X(Z.asn1.DERPrintableString, Z.asn1.DERAbstractString), Z.asn1.DERTeletexString = function(e) {
|
|
4367
|
+
Z.asn1.DERTeletexString.superclass.constructor.call(this, e), this.hT = "14";
|
|
4368
|
+
}, X(Z.asn1.DERTeletexString, Z.asn1.DERAbstractString), Z.asn1.DERIA5String = function(e) {
|
|
4369
|
+
Z.asn1.DERIA5String.superclass.constructor.call(this, e), this.hT = "16";
|
|
4370
|
+
}, X(Z.asn1.DERIA5String, Z.asn1.DERAbstractString), Z.asn1.DERUTCTime = function(e) {
|
|
4371
|
+
Z.asn1.DERUTCTime.superclass.constructor.call(this, e), this.hT = "17", this.setByDate = function(e) {
|
|
4372
|
+
this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
|
|
4373
|
+
}, this.getFreshValueHex = function() {
|
|
4374
|
+
return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
|
|
4375
|
+
}, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{12}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str));
|
|
4376
|
+
}, X(Z.asn1.DERUTCTime, Z.asn1.DERAbstractTime), Z.asn1.DERGeneralizedTime = function(e) {
|
|
4377
|
+
Z.asn1.DERGeneralizedTime.superclass.constructor.call(this, e), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
|
|
4378
|
+
this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
|
|
4379
|
+
}, this.getFreshValueHex = function() {
|
|
4380
|
+
return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
|
|
4381
|
+
}, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{14}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str), e.millis === !0 && (this.withMillis = !0));
|
|
4382
|
+
}, X(Z.asn1.DERGeneralizedTime, Z.asn1.DERAbstractTime), Z.asn1.DERSequence = function(e) {
|
|
4383
|
+
Z.asn1.DERSequence.superclass.constructor.call(this, e), this.hT = "30", this.getFreshValueHex = function() {
|
|
4384
|
+
for (var e = "", t = 0; t < this.asn1Array.length; t++) {
|
|
4385
|
+
var n = this.asn1Array[t];
|
|
4386
|
+
e += n.getEncodedHex();
|
|
4387
|
+
}
|
|
4388
|
+
return this.hV = e, this.hV;
|
|
4389
|
+
};
|
|
4390
|
+
}, X(Z.asn1.DERSequence, Z.asn1.DERAbstractStructured), Z.asn1.DERSet = function(e) {
|
|
4391
|
+
Z.asn1.DERSet.superclass.constructor.call(this, e), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
|
|
4392
|
+
for (var e = [], t = 0; t < this.asn1Array.length; t++) {
|
|
4393
|
+
var n = this.asn1Array[t];
|
|
4394
|
+
e.push(n.getEncodedHex());
|
|
4395
|
+
}
|
|
4396
|
+
return this.sortFlag == 1 && e.sort(), this.hV = e.join(""), this.hV;
|
|
4397
|
+
}, e !== void 0 && e.sortflag !== void 0 && e.sortflag == 0 && (this.sortFlag = !1);
|
|
4398
|
+
}, X(Z.asn1.DERSet, Z.asn1.DERAbstractStructured), Z.asn1.DERTaggedObject = function(e) {
|
|
4399
|
+
Z.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(e, t, n) {
|
|
4400
|
+
this.hT = t, this.isExplicit = e, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, t), this.isModified = !1);
|
|
4401
|
+
}, this.getFreshValueHex = function() {
|
|
4402
|
+
return this.hV;
|
|
4403
|
+
}, e !== void 0 && (e.tag !== void 0 && (this.hT = e.tag), e.explicit !== void 0 && (this.isExplicit = e.explicit), e.obj !== void 0 && (this.asn1Object = e.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
|
|
4404
|
+
}, X(Z.asn1.DERTaggedObject, Z.asn1.ASN1Object);
|
|
4405
|
+
//#endregion
|
|
4406
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/JSEncryptRSAKey.js
|
|
4407
|
+
var yo = (function() {
|
|
4408
|
+
var e = function(t, n) {
|
|
4409
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
4410
|
+
e.__proto__ = t;
|
|
4411
|
+
} || function(e, t) {
|
|
4412
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
4413
|
+
}, e(t, n);
|
|
4414
|
+
};
|
|
4415
|
+
return function(t, n) {
|
|
4416
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
4417
|
+
e(t, n);
|
|
4418
|
+
function r() {
|
|
4419
|
+
this.constructor = t;
|
|
4420
|
+
}
|
|
4421
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
4422
|
+
};
|
|
4423
|
+
})(), bo = function(e) {
|
|
4424
|
+
yo(t, e);
|
|
4425
|
+
function t(n) {
|
|
4426
|
+
var r = e.call(this) || this;
|
|
4427
|
+
return n && (typeof n == "string" ? r.parseKey(n) : (t.hasPrivateKeyProperty(n) || t.hasPublicKeyProperty(n)) && r.parsePropertiesFrom(n)), r;
|
|
4428
|
+
}
|
|
4429
|
+
return t.prototype.parseKey = function(e) {
|
|
4430
|
+
try {
|
|
4431
|
+
var t = 0, n = 0, r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ? ha.decode(e) : _a.unarmor(e), i = Ta.decode(r);
|
|
4432
|
+
if (i.sub.length === 3 && (i = i.sub[2].sub[0]), i.sub.length === 9) t = i.sub[1].getHexStringValue(), this.n = W(t, 16), n = i.sub[2].getHexStringValue(), this.e = parseInt(n, 16), this.d = W(i.sub[3].getHexStringValue(), 16), this.p = W(i.sub[4].getHexStringValue(), 16), this.q = W(i.sub[5].getHexStringValue(), 16), this.dmp1 = W(i.sub[6].getHexStringValue(), 16), this.dmq1 = W(i.sub[7].getHexStringValue(), 16), this.coeff = W(i.sub[8].getHexStringValue(), 16);
|
|
4433
|
+
else if (i.sub.length === 2) if (i.sub[0].sub) {
|
|
4434
|
+
var a = i.sub[1].sub[0];
|
|
4435
|
+
t = a.sub[0].getHexStringValue(), this.n = W(t, 16), n = a.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
|
|
4436
|
+
} else t = i.sub[0].getHexStringValue(), this.n = W(t, 16), n = i.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
|
|
4437
|
+
else return !1;
|
|
4438
|
+
return !0;
|
|
4439
|
+
} catch {
|
|
4440
|
+
return !1;
|
|
4441
|
+
}
|
|
4442
|
+
}, t.prototype.getPrivateBaseKey = function() {
|
|
4443
|
+
var e = { array: [
|
|
4444
|
+
new Z.asn1.DERInteger({ int: 0 }),
|
|
4445
|
+
new Z.asn1.DERInteger({ bigint: this.n }),
|
|
4446
|
+
new Z.asn1.DERInteger({ int: this.e }),
|
|
4447
|
+
new Z.asn1.DERInteger({ bigint: this.d }),
|
|
4448
|
+
new Z.asn1.DERInteger({ bigint: this.p }),
|
|
4449
|
+
new Z.asn1.DERInteger({ bigint: this.q }),
|
|
4450
|
+
new Z.asn1.DERInteger({ bigint: this.dmp1 }),
|
|
4451
|
+
new Z.asn1.DERInteger({ bigint: this.dmq1 }),
|
|
4452
|
+
new Z.asn1.DERInteger({ bigint: this.coeff })
|
|
4453
|
+
] };
|
|
4454
|
+
return new Z.asn1.DERSequence(e).getEncodedHex();
|
|
4455
|
+
}, t.prototype.getPrivateBaseKeyB64 = function() {
|
|
4456
|
+
return fa(this.getPrivateBaseKey());
|
|
4457
|
+
}, t.prototype.getPublicBaseKey = function() {
|
|
4458
|
+
var e = new Z.asn1.DERSequence({ array: [new Z.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }), new Z.asn1.DERNull()] }), t = new Z.asn1.DERSequence({ array: [new Z.asn1.DERInteger({ bigint: this.n }), new Z.asn1.DERInteger({ int: this.e })] }), n = new Z.asn1.DERBitString({ hex: "00" + t.getEncodedHex() });
|
|
4459
|
+
return new Z.asn1.DERSequence({ array: [e, n] }).getEncodedHex();
|
|
4460
|
+
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
4461
|
+
return fa(this.getPublicBaseKey());
|
|
4462
|
+
}, t.wordwrap = function(e, t) {
|
|
4463
|
+
if (t ||= 64, !e) return e;
|
|
4464
|
+
var n = "(.{1," + t + "})( +|$\n?)|(.{1," + t + "})";
|
|
4465
|
+
return e.match(RegExp(n, "g")).join("\n");
|
|
4466
|
+
}, t.prototype.getPrivateKey = function() {
|
|
4467
|
+
var e = "-----BEGIN RSA PRIVATE KEY-----\n";
|
|
4468
|
+
return e += t.wordwrap(this.getPrivateBaseKeyB64()) + "\n", e += "-----END RSA PRIVATE KEY-----", e;
|
|
4469
|
+
}, t.prototype.getPublicKey = function() {
|
|
4470
|
+
var e = "-----BEGIN PUBLIC KEY-----\n";
|
|
4471
|
+
return e += t.wordwrap(this.getPublicBaseKeyB64()) + "\n", e += "-----END PUBLIC KEY-----", e;
|
|
4472
|
+
}, t.hasPublicKeyProperty = function(e) {
|
|
4473
|
+
return e ||= {}, e.hasOwnProperty("n") && e.hasOwnProperty("e");
|
|
4474
|
+
}, t.hasPrivateKeyProperty = function(e) {
|
|
4475
|
+
return e ||= {}, e.hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff");
|
|
4476
|
+
}, t.prototype.parsePropertiesFrom = function(e) {
|
|
4477
|
+
this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
|
|
4478
|
+
}, t;
|
|
4479
|
+
}(mo), xo = typeof process < "u" ? process.env?.npm_package_version : void 0, So = function() {
|
|
4480
|
+
function e(e) {
|
|
4481
|
+
e === void 0 && (e = {}), this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key = e.key || null;
|
|
4482
|
+
}
|
|
4483
|
+
return e.prototype.setKey = function(e) {
|
|
4484
|
+
e ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new bo(e)) : !this.key && this.log && console.error("A key was not set.");
|
|
4485
|
+
}, e.prototype.setPrivateKey = function(e) {
|
|
4486
|
+
this.setKey(e);
|
|
4487
|
+
}, e.prototype.setPublicKey = function(e) {
|
|
4488
|
+
this.setKey(e);
|
|
4489
|
+
}, e.prototype.decrypt = function(e) {
|
|
4490
|
+
try {
|
|
4491
|
+
return this.getKey().decrypt(pa(e));
|
|
4492
|
+
} catch {
|
|
4493
|
+
return !1;
|
|
4494
|
+
}
|
|
4495
|
+
}, e.prototype.encrypt = function(e) {
|
|
4496
|
+
try {
|
|
4497
|
+
return fa(this.getKey().encrypt(e));
|
|
4498
|
+
} catch {
|
|
4499
|
+
return !1;
|
|
4500
|
+
}
|
|
4501
|
+
}, e.prototype.encryptOAEP = function(e) {
|
|
4502
|
+
try {
|
|
4503
|
+
return fa(this.getKey().encrypt(e, po));
|
|
4504
|
+
} catch {
|
|
4505
|
+
return !1;
|
|
4506
|
+
}
|
|
4507
|
+
}, e.prototype.sign = function(e, t, n) {
|
|
4508
|
+
t === void 0 && (t = function(e) {
|
|
4509
|
+
return e;
|
|
4510
|
+
}), n === void 0 && (n = "");
|
|
4511
|
+
try {
|
|
4512
|
+
return fa(this.getKey().sign(e, t, n));
|
|
4513
|
+
} catch {
|
|
4514
|
+
return !1;
|
|
4515
|
+
}
|
|
4516
|
+
}, e.prototype.signSha256 = function(e) {
|
|
4517
|
+
return this.sign(e, function(e) {
|
|
4518
|
+
return Xa(Ya(e));
|
|
4519
|
+
}, "sha256");
|
|
4520
|
+
}, e.prototype.verify = function(e, t, n) {
|
|
4521
|
+
n === void 0 && (n = function(e) {
|
|
4522
|
+
return e;
|
|
4523
|
+
});
|
|
4524
|
+
try {
|
|
4525
|
+
return this.getKey().verify(e, pa(t), n);
|
|
4526
|
+
} catch {
|
|
4527
|
+
return !1;
|
|
4528
|
+
}
|
|
4529
|
+
}, e.prototype.verifySha256 = function(e, t) {
|
|
4530
|
+
return this.verify(e, t, function(e) {
|
|
4531
|
+
return Xa(Ya(e));
|
|
4532
|
+
});
|
|
4533
|
+
}, e.prototype.getKey = function(e) {
|
|
4534
|
+
if (!this.key) {
|
|
4535
|
+
if (this.key = new bo(), e && {}.toString.call(e) === "[object Function]") {
|
|
4536
|
+
this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
|
|
4537
|
+
return;
|
|
4538
|
+
}
|
|
4539
|
+
this.key.generate(this.default_key_size, this.default_public_exponent);
|
|
4540
|
+
}
|
|
4541
|
+
return this.key;
|
|
4542
|
+
}, e.prototype.getPrivateKey = function() {
|
|
4543
|
+
return this.getKey().getPrivateKey();
|
|
4544
|
+
}, e.prototype.getPrivateKeyB64 = function() {
|
|
4545
|
+
return this.getKey().getPrivateBaseKeyB64();
|
|
4546
|
+
}, e.prototype.getPublicKey = function() {
|
|
4547
|
+
return this.getKey().getPublicKey();
|
|
4548
|
+
}, e.prototype.getPublicKeyB64 = function() {
|
|
4549
|
+
return this.getKey().getPublicBaseKeyB64();
|
|
4550
|
+
}, e.version = xo, e;
|
|
4551
|
+
}();
|
|
4552
|
+
//#endregion
|
|
4553
|
+
//#region src/utils/publicKey.ts
|
|
4554
|
+
function Co(e) {
|
|
4555
|
+
return kr("-----BEGIN PUBLIC KEY-----\n<%= publickKey %>\n-----END PUBLIC KEY-----")({ publickKey: e });
|
|
4556
|
+
}
|
|
4557
|
+
async function wo() {
|
|
4558
|
+
return Co((await Ao()).data ?? "");
|
|
4559
|
+
}
|
|
4560
|
+
async function To(e) {
|
|
4561
|
+
let t = await wo(), n = new So();
|
|
4562
|
+
return n.setPublicKey(t), n.encrypt(e);
|
|
4563
|
+
}
|
|
4564
|
+
//#endregion
|
|
4565
|
+
//#region src/utils/storage.ts
|
|
4566
|
+
function Q() {
|
|
4567
|
+
return Gi()?.app?.storagePrefix;
|
|
4568
|
+
}
|
|
4569
|
+
var Eo = {
|
|
4570
|
+
local: {
|
|
4571
|
+
has: (e) => Object.prototype.hasOwnProperty.call(localStorage, `${Q()}${e}`),
|
|
4572
|
+
get: (e) => localStorage.getItem(`${Q()}${e}`),
|
|
4573
|
+
set: (e, t) => {
|
|
4574
|
+
localStorage.setItem(`${Q()}${e}`, t);
|
|
4575
|
+
},
|
|
4576
|
+
remove: (e) => {
|
|
4577
|
+
localStorage.removeItem(`${Q()}${e}`);
|
|
4578
|
+
},
|
|
4579
|
+
clear: () => {
|
|
4580
|
+
localStorage.clear();
|
|
4581
|
+
},
|
|
4582
|
+
getItem: (e) => localStorage.getItem(`${Q()}${e}`),
|
|
4583
|
+
setItem: (e, t) => {
|
|
4584
|
+
localStorage.setItem(`${Q()}${e}`, t);
|
|
4585
|
+
}
|
|
4586
|
+
},
|
|
4587
|
+
session: {
|
|
4588
|
+
has: (e) => Object.prototype.hasOwnProperty.call(sessionStorage, `${Q()}${e}`),
|
|
4589
|
+
get: (e) => sessionStorage.getItem(`${Q()}${e}`),
|
|
4590
|
+
set: (e, t) => {
|
|
4591
|
+
sessionStorage.setItem(`${Q()}${e}`, t);
|
|
4592
|
+
},
|
|
4593
|
+
remove: (e) => {
|
|
4594
|
+
sessionStorage.removeItem(`${Q()}${e}`);
|
|
4595
|
+
},
|
|
4596
|
+
clear: () => {
|
|
4597
|
+
sessionStorage.clear();
|
|
4598
|
+
},
|
|
4599
|
+
getItem: (e) => sessionStorage.getItem(`${Q()}${e}`),
|
|
4600
|
+
setItem: (e, t) => {
|
|
4601
|
+
sessionStorage.setItem(`${Q()}${e}`, t);
|
|
4602
|
+
}
|
|
4603
|
+
}
|
|
4604
|
+
}, $ = na(ze, "requestBasic"), Do = na(ze, "requestAuth");
|
|
4605
|
+
//#endregion
|
|
4606
|
+
//#region src/features/api/modules/auth/renzhengfuwu.ts
|
|
4607
|
+
function Oo(e, t) {
|
|
4608
|
+
return Do.Post("/auth/changeLoginOrg", {}, {
|
|
4609
|
+
params: { ...e },
|
|
4610
|
+
...t || {}
|
|
4611
|
+
});
|
|
4612
|
+
}
|
|
4613
|
+
function ko(e, t) {
|
|
4614
|
+
return Do.Post("/auth/login", e, {
|
|
4615
|
+
headers: { "Content-Type": "application/json" },
|
|
4616
|
+
...t || {}
|
|
4617
|
+
});
|
|
4618
|
+
}
|
|
4619
|
+
function Ao(e) {
|
|
4620
|
+
return Do.Get("/auth/login/key", { ...e || {} });
|
|
4621
|
+
}
|
|
4622
|
+
function jo(e, t) {
|
|
4623
|
+
return Do.Post("/auth/loginNew", e, {
|
|
4624
|
+
headers: { "Content-Type": "application/json" },
|
|
4625
|
+
...t || {}
|
|
4626
|
+
});
|
|
4627
|
+
}
|
|
4628
|
+
function Mo(e, t) {
|
|
4629
|
+
return Do.Post("/auth/token/refresh", {}, {
|
|
4630
|
+
params: { ...e },
|
|
4631
|
+
...t || {}
|
|
4632
|
+
});
|
|
4633
|
+
}
|
|
4634
|
+
//#endregion
|
|
4635
|
+
export { Yr as A, Re as B, vi as C, Jr as D, Qr as E, Bn as F, nt as I, Xe as L, jr as M, Ar as N, Xr as O, Zn as P, Be as R, yi as S, hi as T, ki as _, na as a, L as b, ea as c, Yi as d, Ji as f, Oi as g, Gi as h, To as i, I as j, Zr as k, Qi as l, Wi as m, $ as n, R as o, qi as p, Eo as r, $i as s, Mo as t, Xi as u, Ti as v, _i as w, xi as x, Ei as y, M as z };
|