@das-fed/utils 7.0.7-dev.1 → 7.0.7-dev.2
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/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.js +1527 -1465
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +1273 -1193
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +1273 -1193
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +1316 -1254
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +1307 -1245
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1317 -1255
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1307 -1245
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +1426 -1346
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1273 -1193
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1759 -1679
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1335 -1237
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1310 -1248
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +1512 -1432
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1307 -1245
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +1273 -1193
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1320 -1258
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1278 -1194
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1273 -1193
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1276 -1196
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +1311 -1249
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1273 -1193
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1307 -1245
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +1273 -1193
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1272 -1192
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.d.ts +1 -1
- package/common-info/set-personal-info/index.js +905 -853
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/index.js +896 -844
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-url-params/index.d.ts +7 -0
- package/common-tools/get-url-params/index.js +45 -38
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/obj-tools/index.js +1 -1
- package/create-api-service/index.js +1306 -1244
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.d.ts +1 -1
- package/create-api-service/sso/index.js +1017 -954
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1153 -1101
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/index.js.gz +0 -0
- package/esm-map.json +2 -1
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/nextTiken/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js +18 -16
- package/pinyin-first-character/index.js.gz +0 -0
- package/process-engine-info/index.js +8 -7
- package/style/index.js +10 -10
- package/style/index.js.gz +0 -0
- package/token-tools/index.js +80 -8
- package/token-tools/index.js.gz +0 -0
- package/use-low-code/index.js.gz +0 -0
- package/webSocket-service/index.js.gz +0 -0
|
@@ -1,62 +1,63 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
import { encryption as
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import { getAccessToken as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { unref as Gt, getCurrentScope as Zt, onScopeDispose as Yt, ref as ue, watch as Le } from "vue";
|
|
2
|
+
import { encryption as en } from "@das-fed/utils/atob";
|
|
3
|
+
import { getConfig as Ne } from "@das-fed/utils/config";
|
|
4
|
+
import { getAccessToken as Q, removeAccessToken as tn, setAccessToken as nn, getAccessTokenInfo as Ee } from "@das-fed/utils/token-tools";
|
|
5
|
+
import { appendQueryParams as wt } from "@das-fed/utils/common-tools";
|
|
6
|
+
import { removeProcessEngineToken as rn, setProcessEngineToken as on } from "@das-fed/utils/process-engine-info";
|
|
7
|
+
import { setPersonalInfo as bt } from "@das-fed/utils/common-info/set-personal-info";
|
|
8
|
+
function Et(e, t) {
|
|
8
9
|
return function() {
|
|
9
10
|
return e.apply(t, arguments);
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
|
-
const { toString:
|
|
13
|
-
const n =
|
|
13
|
+
const { toString: sn } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator: de, toStringTag: St } = Symbol, pe = /* @__PURE__ */ ((e) => (t) => {
|
|
14
|
+
const n = sn.call(t);
|
|
14
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
16
|
-
function
|
|
17
|
-
return e !== null &&
|
|
16
|
+
})(/* @__PURE__ */ Object.create(null)), k = (e) => (e = e.toLowerCase(), (t) => pe(t) === e), he = (e) => (t) => typeof t === e, { isArray: H } = Array, q = he("undefined");
|
|
17
|
+
function G(e) {
|
|
18
|
+
return e !== null && !q(e) && e.constructor !== null && !q(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
19
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
20
|
+
const Rt = k("ArrayBuffer");
|
|
21
|
+
function an(e) {
|
|
21
22
|
let t;
|
|
22
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
23
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Rt(e.buffer), t;
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
25
|
+
const cn = he("string"), O = he("function"), Tt = he("number"), Z = (e) => e !== null && typeof e == "object", ln = (e) => e === !0 || e === !1, ae = (e) => {
|
|
26
|
+
if (pe(e) !== "object")
|
|
26
27
|
return !1;
|
|
27
|
-
const t =
|
|
28
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
29
|
-
},
|
|
30
|
-
if (!
|
|
28
|
+
const t = Fe(e);
|
|
29
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(St in e) && !(de in e);
|
|
30
|
+
}, un = (e) => {
|
|
31
|
+
if (!Z(e) || G(e))
|
|
31
32
|
return !1;
|
|
32
33
|
try {
|
|
33
34
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
34
35
|
} catch {
|
|
35
36
|
return !1;
|
|
36
37
|
}
|
|
37
|
-
},
|
|
38
|
+
}, fn = k("Date"), dn = k("File"), pn = k("Blob"), hn = k("FileList"), mn = (e) => Z(e) && O(e.pipe), yn = (e) => {
|
|
38
39
|
let t;
|
|
39
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
40
|
-
t === "object" &&
|
|
41
|
-
},
|
|
42
|
-
function
|
|
40
|
+
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = pe(e)) === "formdata" || // detect form-data instance
|
|
41
|
+
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
42
|
+
}, gn = k("URLSearchParams"), [wn, bn, En, Sn] = ["ReadableStream", "Request", "Response", "Headers"].map(k), Rn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
43
|
+
function Y(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
43
44
|
if (e === null || typeof e > "u")
|
|
44
45
|
return;
|
|
45
46
|
let r, o;
|
|
46
|
-
if (typeof e != "object" && (e = [e]),
|
|
47
|
+
if (typeof e != "object" && (e = [e]), H(e))
|
|
47
48
|
for (r = 0, o = e.length; r < o; r++)
|
|
48
49
|
t.call(null, e[r], r, e);
|
|
49
50
|
else {
|
|
50
|
-
if (
|
|
51
|
+
if (G(e))
|
|
51
52
|
return;
|
|
52
|
-
const
|
|
53
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = i.length;
|
|
53
54
|
let c;
|
|
54
|
-
for (r = 0; r <
|
|
55
|
-
c =
|
|
55
|
+
for (r = 0; r < s; r++)
|
|
56
|
+
c = i[r], t.call(null, e[c], c, e);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
if (
|
|
59
|
+
function Ot(e, t) {
|
|
60
|
+
if (G(e))
|
|
60
61
|
return null;
|
|
61
62
|
t = t.toLowerCase();
|
|
62
63
|
const n = Object.keys(e);
|
|
@@ -66,75 +67,75 @@ function it(e, t) {
|
|
|
66
67
|
return o;
|
|
67
68
|
return null;
|
|
68
69
|
}
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
const { caseless: e } =
|
|
72
|
-
const s = e &&
|
|
73
|
-
|
|
70
|
+
const D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, At = (e) => !q(e) && e !== D;
|
|
71
|
+
function Ae() {
|
|
72
|
+
const { caseless: e, skipUndefined: t } = At(this) && this || {}, n = {}, r = (o, i) => {
|
|
73
|
+
const s = e && Ot(n, i) || i;
|
|
74
|
+
ae(n[s]) && ae(o) ? n[s] = Ae(n[s], o) : ae(o) ? n[s] = Ae({}, o) : H(o) ? n[s] = o.slice() : (!t || !q(o)) && (n[s] = o);
|
|
74
75
|
};
|
|
75
|
-
for (let
|
|
76
|
-
arguments[
|
|
77
|
-
return
|
|
76
|
+
for (let o = 0, i = arguments.length; o < i; o++)
|
|
77
|
+
arguments[o] && Y(arguments[o], r);
|
|
78
|
+
return n;
|
|
78
79
|
}
|
|
79
|
-
const
|
|
80
|
-
n &&
|
|
81
|
-
}, { allOwnKeys: r }), e),
|
|
80
|
+
const Tn = (e, t, n, { allOwnKeys: r } = {}) => (Y(t, (o, i) => {
|
|
81
|
+
n && O(o) ? e[i] = Et(o, n) : e[i] = o;
|
|
82
|
+
}, { allOwnKeys: r }), e), On = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), An = (e, t, n, r) => {
|
|
82
83
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
83
84
|
value: t.prototype
|
|
84
85
|
}), n && Object.assign(e.prototype, n);
|
|
85
|
-
},
|
|
86
|
-
let o,
|
|
86
|
+
}, _n = (e, t, n, r) => {
|
|
87
|
+
let o, i, s;
|
|
87
88
|
const c = {};
|
|
88
89
|
if (t = t || {}, e == null) return t;
|
|
89
90
|
do {
|
|
90
|
-
for (o = Object.getOwnPropertyNames(e),
|
|
91
|
-
|
|
92
|
-
e = n !== !1 &&
|
|
91
|
+
for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
|
|
92
|
+
s = o[i], (!r || r(s, e, t)) && !c[s] && (t[s] = e[s], c[s] = !0);
|
|
93
|
+
e = n !== !1 && Fe(e);
|
|
93
94
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
94
95
|
return t;
|
|
95
|
-
},
|
|
96
|
+
}, Cn = (e, t, n) => {
|
|
96
97
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
97
98
|
const r = e.indexOf(t, n);
|
|
98
99
|
return r !== -1 && r === n;
|
|
99
|
-
},
|
|
100
|
+
}, xn = (e) => {
|
|
100
101
|
if (!e) return null;
|
|
101
|
-
if (
|
|
102
|
+
if (H(e)) return e;
|
|
102
103
|
let t = e.length;
|
|
103
|
-
if (!
|
|
104
|
+
if (!Tt(t)) return null;
|
|
104
105
|
const n = new Array(t);
|
|
105
106
|
for (; t-- > 0; )
|
|
106
107
|
n[t] = e[t];
|
|
107
108
|
return n;
|
|
108
|
-
},
|
|
109
|
-
const r = (e && e[
|
|
109
|
+
}, kn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Fe(Uint8Array)), Pn = (e, t) => {
|
|
110
|
+
const r = (e && e[de]).call(e);
|
|
110
111
|
let o;
|
|
111
112
|
for (; (o = r.next()) && !o.done; ) {
|
|
112
|
-
const
|
|
113
|
-
t.call(e,
|
|
113
|
+
const i = o.value;
|
|
114
|
+
t.call(e, i[0], i[1]);
|
|
114
115
|
}
|
|
115
|
-
},
|
|
116
|
+
}, Un = (e, t) => {
|
|
116
117
|
let n;
|
|
117
118
|
const r = [];
|
|
118
119
|
for (; (n = e.exec(t)) !== null; )
|
|
119
120
|
r.push(n);
|
|
120
121
|
return r;
|
|
121
|
-
},
|
|
122
|
+
}, Ln = k("HTMLFormElement"), Nn = (e) => e.toLowerCase().replace(
|
|
122
123
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
123
124
|
function(n, r, o) {
|
|
124
125
|
return r.toUpperCase() + o;
|
|
125
126
|
}
|
|
126
|
-
),
|
|
127
|
+
), Je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Fn = k("RegExp"), _t = (e, t) => {
|
|
127
128
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
128
|
-
|
|
129
|
-
let
|
|
130
|
-
(
|
|
129
|
+
Y(n, (o, i) => {
|
|
130
|
+
let s;
|
|
131
|
+
(s = t(o, i, e)) !== !1 && (r[i] = s || o);
|
|
131
132
|
}), Object.defineProperties(e, r);
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
if (
|
|
133
|
+
}, vn = (e) => {
|
|
134
|
+
_t(e, (t, n) => {
|
|
135
|
+
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
135
136
|
return !1;
|
|
136
137
|
const r = e[n];
|
|
137
|
-
if (
|
|
138
|
+
if (O(r)) {
|
|
138
139
|
if (t.enumerable = !1, "writable" in t) {
|
|
139
140
|
t.writable = !1;
|
|
140
141
|
return;
|
|
@@ -144,103 +145,103 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
144
145
|
});
|
|
145
146
|
}
|
|
146
147
|
});
|
|
147
|
-
},
|
|
148
|
+
}, Dn = (e, t) => {
|
|
148
149
|
const n = {}, r = (o) => {
|
|
149
|
-
o.forEach((
|
|
150
|
-
n[
|
|
150
|
+
o.forEach((i) => {
|
|
151
|
+
n[i] = !0;
|
|
151
152
|
});
|
|
152
153
|
};
|
|
153
|
-
return
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
function
|
|
157
|
-
return !!(e &&
|
|
154
|
+
return H(e) ? r(e) : r(String(e).split(t)), n;
|
|
155
|
+
}, In = () => {
|
|
156
|
+
}, Bn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
157
|
+
function jn(e) {
|
|
158
|
+
return !!(e && O(e.append) && e[St] === "FormData" && e[de]);
|
|
158
159
|
}
|
|
159
|
-
const
|
|
160
|
+
const qn = (e) => {
|
|
160
161
|
const t = new Array(10), n = (r, o) => {
|
|
161
|
-
if (
|
|
162
|
+
if (Z(r)) {
|
|
162
163
|
if (t.indexOf(r) >= 0)
|
|
163
164
|
return;
|
|
164
|
-
if (
|
|
165
|
+
if (G(r))
|
|
165
166
|
return r;
|
|
166
167
|
if (!("toJSON" in r)) {
|
|
167
168
|
t[o] = r;
|
|
168
|
-
const
|
|
169
|
-
return
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
}), t[o] = void 0,
|
|
169
|
+
const i = H(r) ? [] : {};
|
|
170
|
+
return Y(r, (s, c) => {
|
|
171
|
+
const d = n(s, o + 1);
|
|
172
|
+
!q(d) && (i[c] = d);
|
|
173
|
+
}), t[o] = void 0, i;
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
return r;
|
|
176
177
|
};
|
|
177
178
|
return n(e, 0);
|
|
178
|
-
},
|
|
179
|
-
o ===
|
|
179
|
+
}, $n = k("AsyncFunction"), Hn = (e) => e && (Z(e) || O(e)) && O(e.then) && O(e.catch), Ct = ((e, t) => e ? setImmediate : t ? ((n, r) => (D.addEventListener("message", ({ source: o, data: i }) => {
|
|
180
|
+
o === D && i === n && r.length && r.shift()();
|
|
180
181
|
}, !1), (o) => {
|
|
181
|
-
r.push(o),
|
|
182
|
+
r.push(o), D.postMessage(n, "*");
|
|
182
183
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
183
184
|
typeof setImmediate == "function",
|
|
184
|
-
|
|
185
|
-
),
|
|
186
|
-
isArray:
|
|
187
|
-
isArrayBuffer:
|
|
188
|
-
isBuffer:
|
|
189
|
-
isFormData:
|
|
190
|
-
isArrayBufferView:
|
|
191
|
-
isString:
|
|
192
|
-
isNumber:
|
|
193
|
-
isBoolean:
|
|
194
|
-
isObject:
|
|
195
|
-
isPlainObject:
|
|
196
|
-
isEmptyObject:
|
|
197
|
-
isReadableStream:
|
|
198
|
-
isRequest:
|
|
199
|
-
isResponse:
|
|
200
|
-
isHeaders:
|
|
201
|
-
isUndefined:
|
|
202
|
-
isDate:
|
|
203
|
-
isFile:
|
|
204
|
-
isBlob:
|
|
205
|
-
isRegExp:
|
|
206
|
-
isFunction:
|
|
207
|
-
isStream:
|
|
208
|
-
isURLSearchParams:
|
|
209
|
-
isTypedArray:
|
|
210
|
-
isFileList:
|
|
211
|
-
forEach:
|
|
212
|
-
merge:
|
|
213
|
-
extend:
|
|
214
|
-
trim:
|
|
215
|
-
stripBOM:
|
|
216
|
-
inherits:
|
|
217
|
-
toFlatObject:
|
|
218
|
-
kindOf:
|
|
219
|
-
kindOfTest:
|
|
220
|
-
endsWith:
|
|
221
|
-
toArray:
|
|
222
|
-
forEachEntry:
|
|
223
|
-
matchAll:
|
|
224
|
-
isHTMLForm:
|
|
225
|
-
hasOwnProperty:
|
|
226
|
-
hasOwnProp:
|
|
185
|
+
O(D.postMessage)
|
|
186
|
+
), Mn = typeof queueMicrotask < "u" ? queueMicrotask.bind(D) : typeof process < "u" && process.nextTick || Ct, zn = (e) => e != null && O(e[de]), a = {
|
|
187
|
+
isArray: H,
|
|
188
|
+
isArrayBuffer: Rt,
|
|
189
|
+
isBuffer: G,
|
|
190
|
+
isFormData: yn,
|
|
191
|
+
isArrayBufferView: an,
|
|
192
|
+
isString: cn,
|
|
193
|
+
isNumber: Tt,
|
|
194
|
+
isBoolean: ln,
|
|
195
|
+
isObject: Z,
|
|
196
|
+
isPlainObject: ae,
|
|
197
|
+
isEmptyObject: un,
|
|
198
|
+
isReadableStream: wn,
|
|
199
|
+
isRequest: bn,
|
|
200
|
+
isResponse: En,
|
|
201
|
+
isHeaders: Sn,
|
|
202
|
+
isUndefined: q,
|
|
203
|
+
isDate: fn,
|
|
204
|
+
isFile: dn,
|
|
205
|
+
isBlob: pn,
|
|
206
|
+
isRegExp: Fn,
|
|
207
|
+
isFunction: O,
|
|
208
|
+
isStream: mn,
|
|
209
|
+
isURLSearchParams: gn,
|
|
210
|
+
isTypedArray: kn,
|
|
211
|
+
isFileList: hn,
|
|
212
|
+
forEach: Y,
|
|
213
|
+
merge: Ae,
|
|
214
|
+
extend: Tn,
|
|
215
|
+
trim: Rn,
|
|
216
|
+
stripBOM: On,
|
|
217
|
+
inherits: An,
|
|
218
|
+
toFlatObject: _n,
|
|
219
|
+
kindOf: pe,
|
|
220
|
+
kindOfTest: k,
|
|
221
|
+
endsWith: Cn,
|
|
222
|
+
toArray: xn,
|
|
223
|
+
forEachEntry: Pn,
|
|
224
|
+
matchAll: Un,
|
|
225
|
+
isHTMLForm: Ln,
|
|
226
|
+
hasOwnProperty: Je,
|
|
227
|
+
hasOwnProp: Je,
|
|
227
228
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
228
|
-
reduceDescriptors:
|
|
229
|
-
freezeMethods:
|
|
230
|
-
toObjectSet:
|
|
231
|
-
toCamelCase:
|
|
232
|
-
noop:
|
|
233
|
-
toFiniteNumber:
|
|
234
|
-
findKey:
|
|
235
|
-
global:
|
|
236
|
-
isContextDefined:
|
|
237
|
-
isSpecCompliantForm:
|
|
238
|
-
toJSONObject:
|
|
239
|
-
isAsyncFn:
|
|
240
|
-
isThenable:
|
|
241
|
-
setImmediate:
|
|
242
|
-
asap:
|
|
243
|
-
isIterable:
|
|
229
|
+
reduceDescriptors: _t,
|
|
230
|
+
freezeMethods: vn,
|
|
231
|
+
toObjectSet: Dn,
|
|
232
|
+
toCamelCase: Nn,
|
|
233
|
+
noop: In,
|
|
234
|
+
toFiniteNumber: Bn,
|
|
235
|
+
findKey: Ot,
|
|
236
|
+
global: D,
|
|
237
|
+
isContextDefined: At,
|
|
238
|
+
isSpecCompliantForm: jn,
|
|
239
|
+
toJSONObject: qn,
|
|
240
|
+
isAsyncFn: $n,
|
|
241
|
+
isThenable: Hn,
|
|
242
|
+
setImmediate: Ct,
|
|
243
|
+
asap: Mn,
|
|
244
|
+
isIterable: zn
|
|
244
245
|
};
|
|
245
246
|
function y(e, t, n, r, o) {
|
|
246
247
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
@@ -266,7 +267,7 @@ a.inherits(y, Error, {
|
|
|
266
267
|
};
|
|
267
268
|
}
|
|
268
269
|
});
|
|
269
|
-
const
|
|
270
|
+
const xt = y.prototype, kt = {};
|
|
270
271
|
[
|
|
271
272
|
"ERR_BAD_OPTION_VALUE",
|
|
272
273
|
"ERR_BAD_OPTION",
|
|
@@ -282,35 +283,37 @@ const ut = y.prototype, ft = {};
|
|
|
282
283
|
"ERR_INVALID_URL"
|
|
283
284
|
// eslint-disable-next-line func-names
|
|
284
285
|
].forEach((e) => {
|
|
285
|
-
|
|
286
|
+
kt[e] = { value: e };
|
|
286
287
|
});
|
|
287
|
-
Object.defineProperties(y,
|
|
288
|
-
Object.defineProperty(
|
|
289
|
-
y.from = (e, t, n, r, o,
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
return
|
|
293
|
-
}, (
|
|
288
|
+
Object.defineProperties(y, kt);
|
|
289
|
+
Object.defineProperty(xt, "isAxiosError", { value: !0 });
|
|
290
|
+
y.from = (e, t, n, r, o, i) => {
|
|
291
|
+
const s = Object.create(xt);
|
|
292
|
+
a.toFlatObject(e, s, function(l) {
|
|
293
|
+
return l !== Error.prototype;
|
|
294
|
+
}, (u) => u !== "isAxiosError");
|
|
295
|
+
const c = e && e.message ? e.message : "Error", d = t == null && e ? e.code : t;
|
|
296
|
+
return y.call(s, c, d, n, r, o), e && s.cause == null && Object.defineProperty(s, "cause", { value: e, configurable: !0 }), s.name = e && e.name || "Error", i && Object.assign(s, i), s;
|
|
294
297
|
};
|
|
295
|
-
const
|
|
296
|
-
function
|
|
298
|
+
const Jn = null;
|
|
299
|
+
function _e(e) {
|
|
297
300
|
return a.isPlainObject(e) || a.isArray(e);
|
|
298
301
|
}
|
|
299
|
-
function
|
|
302
|
+
function Pt(e) {
|
|
300
303
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
301
304
|
}
|
|
302
|
-
function
|
|
303
|
-
return e ? e.concat(t).map(function(o,
|
|
304
|
-
return o =
|
|
305
|
+
function Ve(e, t, n) {
|
|
306
|
+
return e ? e.concat(t).map(function(o, i) {
|
|
307
|
+
return o = Pt(o), !n && i ? "[" + o + "]" : o;
|
|
305
308
|
}).join(n ? "." : "") : t;
|
|
306
309
|
}
|
|
307
|
-
function
|
|
308
|
-
return a.isArray(e) && !e.some(
|
|
310
|
+
function Vn(e) {
|
|
311
|
+
return a.isArray(e) && !e.some(_e);
|
|
309
312
|
}
|
|
310
|
-
const
|
|
313
|
+
const Wn = a.toFlatObject(a, {}, null, function(t) {
|
|
311
314
|
return /^is[A-Z]/.test(t);
|
|
312
315
|
});
|
|
313
|
-
function
|
|
316
|
+
function me(e, t, n) {
|
|
314
317
|
if (!a.isObject(e))
|
|
315
318
|
throw new TypeError("target must be an object");
|
|
316
319
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -320,60 +323,60 @@ function ce(e, t, n) {
|
|
|
320
323
|
}, !1, function(m, h) {
|
|
321
324
|
return !a.isUndefined(h[m]);
|
|
322
325
|
});
|
|
323
|
-
const r = n.metaTokens, o = n.visitor || l,
|
|
326
|
+
const r = n.metaTokens, o = n.visitor || l, i = n.dots, s = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
324
327
|
if (!a.isFunction(o))
|
|
325
328
|
throw new TypeError("visitor must be a function");
|
|
326
|
-
function u(
|
|
327
|
-
if (
|
|
328
|
-
if (a.isDate(
|
|
329
|
-
return
|
|
330
|
-
if (a.isBoolean(
|
|
331
|
-
return
|
|
332
|
-
if (!
|
|
329
|
+
function u(f) {
|
|
330
|
+
if (f === null) return "";
|
|
331
|
+
if (a.isDate(f))
|
|
332
|
+
return f.toISOString();
|
|
333
|
+
if (a.isBoolean(f))
|
|
334
|
+
return f.toString();
|
|
335
|
+
if (!d && a.isBlob(f))
|
|
333
336
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
334
|
-
return a.isArrayBuffer(
|
|
337
|
+
return a.isArrayBuffer(f) || a.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
335
338
|
}
|
|
336
|
-
function l(
|
|
337
|
-
let E =
|
|
338
|
-
if (
|
|
339
|
+
function l(f, m, h) {
|
|
340
|
+
let E = f;
|
|
341
|
+
if (f && !h && typeof f == "object") {
|
|
339
342
|
if (a.endsWith(m, "{}"))
|
|
340
|
-
m = r ? m : m.slice(0, -2),
|
|
341
|
-
else if (a.isArray(
|
|
342
|
-
return m =
|
|
343
|
-
!(a.isUndefined(
|
|
343
|
+
m = r ? m : m.slice(0, -2), f = JSON.stringify(f);
|
|
344
|
+
else if (a.isArray(f) && Vn(f) || (a.isFileList(f) || a.endsWith(m, "[]")) && (E = a.toArray(f)))
|
|
345
|
+
return m = Pt(m), E.forEach(function(S, T) {
|
|
346
|
+
!(a.isUndefined(S) || S === null) && t.append(
|
|
344
347
|
// eslint-disable-next-line no-nested-ternary
|
|
345
|
-
|
|
346
|
-
u(
|
|
348
|
+
s === !0 ? Ve([m], T, i) : s === null ? m : m + "[]",
|
|
349
|
+
u(S)
|
|
347
350
|
);
|
|
348
351
|
}), !1;
|
|
349
352
|
}
|
|
350
|
-
return
|
|
353
|
+
return _e(f) ? !0 : (t.append(Ve(h, m, i), u(f)), !1);
|
|
351
354
|
}
|
|
352
|
-
const
|
|
355
|
+
const p = [], g = Object.assign(Wn, {
|
|
353
356
|
defaultVisitor: l,
|
|
354
357
|
convertValue: u,
|
|
355
|
-
isVisitable:
|
|
358
|
+
isVisitable: _e
|
|
356
359
|
});
|
|
357
|
-
function
|
|
358
|
-
if (!a.isUndefined(
|
|
359
|
-
if (
|
|
360
|
+
function b(f, m) {
|
|
361
|
+
if (!a.isUndefined(f)) {
|
|
362
|
+
if (p.indexOf(f) !== -1)
|
|
360
363
|
throw Error("Circular reference detected in " + m.join("."));
|
|
361
|
-
|
|
364
|
+
p.push(f), a.forEach(f, function(E, _) {
|
|
362
365
|
(!(a.isUndefined(E) || E === null) && o.call(
|
|
363
366
|
t,
|
|
364
367
|
E,
|
|
365
|
-
a.isString(
|
|
368
|
+
a.isString(_) ? _.trim() : _,
|
|
366
369
|
m,
|
|
367
|
-
|
|
368
|
-
)) === !0 &&
|
|
369
|
-
}),
|
|
370
|
+
g
|
|
371
|
+
)) === !0 && b(E, m ? m.concat(_) : [_]);
|
|
372
|
+
}), p.pop();
|
|
370
373
|
}
|
|
371
374
|
}
|
|
372
375
|
if (!a.isObject(e))
|
|
373
376
|
throw new TypeError("data must be an object");
|
|
374
|
-
return
|
|
377
|
+
return b(e), t;
|
|
375
378
|
}
|
|
376
|
-
function
|
|
379
|
+
function We(e) {
|
|
377
380
|
const t = {
|
|
378
381
|
"!": "%21",
|
|
379
382
|
"'": "%27",
|
|
@@ -387,40 +390,40 @@ function Ne(e) {
|
|
|
387
390
|
return t[r];
|
|
388
391
|
});
|
|
389
392
|
}
|
|
390
|
-
function
|
|
391
|
-
this._pairs = [], e &&
|
|
393
|
+
function ve(e, t) {
|
|
394
|
+
this._pairs = [], e && me(e, this, t);
|
|
392
395
|
}
|
|
393
|
-
const
|
|
394
|
-
|
|
396
|
+
const Ut = ve.prototype;
|
|
397
|
+
Ut.append = function(t, n) {
|
|
395
398
|
this._pairs.push([t, n]);
|
|
396
399
|
};
|
|
397
|
-
|
|
400
|
+
Ut.toString = function(t) {
|
|
398
401
|
const n = t ? function(r) {
|
|
399
|
-
return t.call(this, r,
|
|
400
|
-
} :
|
|
402
|
+
return t.call(this, r, We);
|
|
403
|
+
} : We;
|
|
401
404
|
return this._pairs.map(function(o) {
|
|
402
405
|
return n(o[0]) + "=" + n(o[1]);
|
|
403
406
|
}, "").join("&");
|
|
404
407
|
};
|
|
405
|
-
function
|
|
406
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+")
|
|
408
|
+
function Kn(e) {
|
|
409
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
407
410
|
}
|
|
408
|
-
function
|
|
411
|
+
function Lt(e, t, n) {
|
|
409
412
|
if (!t)
|
|
410
413
|
return e;
|
|
411
|
-
const r = n && n.encode ||
|
|
414
|
+
const r = n && n.encode || Kn;
|
|
412
415
|
a.isFunction(n) && (n = {
|
|
413
416
|
serialize: n
|
|
414
417
|
});
|
|
415
418
|
const o = n && n.serialize;
|
|
416
|
-
let
|
|
417
|
-
if (o ?
|
|
418
|
-
const
|
|
419
|
-
|
|
419
|
+
let i;
|
|
420
|
+
if (o ? i = o(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ve(t, n).toString(r), i) {
|
|
421
|
+
const s = e.indexOf("#");
|
|
422
|
+
s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
420
423
|
}
|
|
421
424
|
return e;
|
|
422
425
|
}
|
|
423
|
-
class
|
|
426
|
+
class Ke {
|
|
424
427
|
constructor() {
|
|
425
428
|
this.handlers = [];
|
|
426
429
|
}
|
|
@@ -445,7 +448,7 @@ class Fe {
|
|
|
445
448
|
*
|
|
446
449
|
* @param {Number} id The ID that was returned by `use`
|
|
447
450
|
*
|
|
448
|
-
* @returns {
|
|
451
|
+
* @returns {void}
|
|
449
452
|
*/
|
|
450
453
|
eject(t) {
|
|
451
454
|
this.handlers[t] && (this.handlers[t] = null);
|
|
@@ -474,66 +477,66 @@ class Fe {
|
|
|
474
477
|
});
|
|
475
478
|
}
|
|
476
479
|
}
|
|
477
|
-
const
|
|
480
|
+
const Nt = {
|
|
478
481
|
silentJSONParsing: !0,
|
|
479
482
|
forcedJSONParsing: !0,
|
|
480
483
|
clarifyTimeoutError: !1
|
|
481
|
-
},
|
|
484
|
+
}, Qn = typeof URLSearchParams < "u" ? URLSearchParams : ve, Xn = typeof FormData < "u" ? FormData : null, Gn = typeof Blob < "u" ? Blob : null, Zn = {
|
|
482
485
|
isBrowser: !0,
|
|
483
486
|
classes: {
|
|
484
|
-
URLSearchParams:
|
|
485
|
-
FormData:
|
|
486
|
-
Blob:
|
|
487
|
+
URLSearchParams: Qn,
|
|
488
|
+
FormData: Xn,
|
|
489
|
+
Blob: Gn
|
|
487
490
|
},
|
|
488
491
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
489
|
-
},
|
|
490
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
492
|
+
}, De = typeof window < "u" && typeof document < "u", Ce = typeof navigator == "object" && navigator || void 0, Yn = De && (!Ce || ["ReactNative", "NativeScript", "NS"].indexOf(Ce.product) < 0), er = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
493
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", tr = De && window.location.href || "http://localhost", nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
491
494
|
__proto__: null,
|
|
492
|
-
hasBrowserEnv:
|
|
493
|
-
hasStandardBrowserEnv:
|
|
494
|
-
hasStandardBrowserWebWorkerEnv:
|
|
495
|
-
navigator:
|
|
496
|
-
origin:
|
|
495
|
+
hasBrowserEnv: De,
|
|
496
|
+
hasStandardBrowserEnv: Yn,
|
|
497
|
+
hasStandardBrowserWebWorkerEnv: er,
|
|
498
|
+
navigator: Ce,
|
|
499
|
+
origin: tr
|
|
497
500
|
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
498
|
-
...
|
|
499
|
-
...
|
|
501
|
+
...nr,
|
|
502
|
+
...Zn
|
|
500
503
|
};
|
|
501
|
-
function
|
|
502
|
-
return
|
|
503
|
-
visitor: function(n, r, o,
|
|
504
|
-
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
504
|
+
function rr(e, t) {
|
|
505
|
+
return me(e, new R.classes.URLSearchParams(), {
|
|
506
|
+
visitor: function(n, r, o, i) {
|
|
507
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
505
508
|
},
|
|
506
509
|
...t
|
|
507
510
|
});
|
|
508
511
|
}
|
|
509
|
-
function
|
|
512
|
+
function or(e) {
|
|
510
513
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
511
514
|
}
|
|
512
|
-
function
|
|
515
|
+
function sr(e) {
|
|
513
516
|
const t = {}, n = Object.keys(e);
|
|
514
517
|
let r;
|
|
515
518
|
const o = n.length;
|
|
516
|
-
let
|
|
519
|
+
let i;
|
|
517
520
|
for (r = 0; r < o; r++)
|
|
518
|
-
|
|
521
|
+
i = n[r], t[i] = e[i];
|
|
519
522
|
return t;
|
|
520
523
|
}
|
|
521
|
-
function
|
|
522
|
-
function t(n, r, o,
|
|
523
|
-
let
|
|
524
|
-
if (
|
|
525
|
-
const c = Number.isFinite(+
|
|
526
|
-
return
|
|
524
|
+
function Ft(e) {
|
|
525
|
+
function t(n, r, o, i) {
|
|
526
|
+
let s = n[i++];
|
|
527
|
+
if (s === "__proto__") return !0;
|
|
528
|
+
const c = Number.isFinite(+s), d = i >= n.length;
|
|
529
|
+
return s = !s && a.isArray(o) ? o.length : s, d ? (a.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !c) : ((!o[s] || !a.isObject(o[s])) && (o[s] = []), t(n, r, o[s], i) && a.isArray(o[s]) && (o[s] = sr(o[s])), !c);
|
|
527
530
|
}
|
|
528
531
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
529
532
|
const n = {};
|
|
530
533
|
return a.forEachEntry(e, (r, o) => {
|
|
531
|
-
t(
|
|
534
|
+
t(or(r), o, n, 0);
|
|
532
535
|
}), n;
|
|
533
536
|
}
|
|
534
537
|
return null;
|
|
535
538
|
}
|
|
536
|
-
function
|
|
539
|
+
function ir(e, t, n) {
|
|
537
540
|
if (a.isString(e))
|
|
538
541
|
try {
|
|
539
542
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -543,13 +546,13 @@ function Mn(e, t, n) {
|
|
|
543
546
|
}
|
|
544
547
|
return (n || JSON.stringify)(e);
|
|
545
548
|
}
|
|
546
|
-
const
|
|
547
|
-
transitional:
|
|
549
|
+
const ee = {
|
|
550
|
+
transitional: Nt,
|
|
548
551
|
adapter: ["xhr", "http", "fetch"],
|
|
549
552
|
transformRequest: [function(t, n) {
|
|
550
|
-
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1,
|
|
551
|
-
if (
|
|
552
|
-
return o ? JSON.stringify(
|
|
553
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
554
|
+
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
555
|
+
return o ? JSON.stringify(Ft(t)) : t;
|
|
553
556
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
554
557
|
return t;
|
|
555
558
|
if (a.isArrayBufferView(t))
|
|
@@ -557,30 +560,30 @@ const X = {
|
|
|
557
560
|
if (a.isURLSearchParams(t))
|
|
558
561
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
559
562
|
let c;
|
|
560
|
-
if (
|
|
563
|
+
if (i) {
|
|
561
564
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
562
|
-
return
|
|
565
|
+
return rr(t, this.formSerializer).toString();
|
|
563
566
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
564
|
-
const
|
|
565
|
-
return
|
|
567
|
+
const d = this.env && this.env.FormData;
|
|
568
|
+
return me(
|
|
566
569
|
c ? { "files[]": t } : t,
|
|
567
|
-
|
|
570
|
+
d && new d(),
|
|
568
571
|
this.formSerializer
|
|
569
572
|
);
|
|
570
573
|
}
|
|
571
574
|
}
|
|
572
|
-
return
|
|
575
|
+
return i || o ? (n.setContentType("application/json", !1), ir(t)) : t;
|
|
573
576
|
}],
|
|
574
577
|
transformResponse: [function(t) {
|
|
575
|
-
const n = this.transitional ||
|
|
578
|
+
const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
576
579
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
577
580
|
return t;
|
|
578
581
|
if (t && a.isString(t) && (r && !this.responseType || o)) {
|
|
579
|
-
const
|
|
582
|
+
const s = !(n && n.silentJSONParsing) && o;
|
|
580
583
|
try {
|
|
581
|
-
return JSON.parse(t);
|
|
584
|
+
return JSON.parse(t, this.parseReviver);
|
|
582
585
|
} catch (c) {
|
|
583
|
-
if (
|
|
586
|
+
if (s)
|
|
584
587
|
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
585
588
|
}
|
|
586
589
|
}
|
|
@@ -610,9 +613,9 @@ const X = {
|
|
|
610
613
|
}
|
|
611
614
|
};
|
|
612
615
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
613
|
-
|
|
616
|
+
ee.headers[e] = {};
|
|
614
617
|
});
|
|
615
|
-
const
|
|
618
|
+
const ar = a.toObjectSet([
|
|
616
619
|
"age",
|
|
617
620
|
"authorization",
|
|
618
621
|
"content-length",
|
|
@@ -630,29 +633,29 @@ const $n = a.toObjectSet([
|
|
|
630
633
|
"referer",
|
|
631
634
|
"retry-after",
|
|
632
635
|
"user-agent"
|
|
633
|
-
]),
|
|
636
|
+
]), cr = (e) => {
|
|
634
637
|
const t = {};
|
|
635
638
|
let n, r, o;
|
|
636
639
|
return e && e.split(`
|
|
637
|
-
`).forEach(function(
|
|
638
|
-
o =
|
|
640
|
+
`).forEach(function(s) {
|
|
641
|
+
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && ar[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
639
642
|
}), t;
|
|
640
|
-
},
|
|
641
|
-
function
|
|
643
|
+
}, Qe = Symbol("internals");
|
|
644
|
+
function J(e) {
|
|
642
645
|
return e && String(e).trim().toLowerCase();
|
|
643
646
|
}
|
|
644
|
-
function
|
|
645
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
647
|
+
function ce(e) {
|
|
648
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ce) : String(e);
|
|
646
649
|
}
|
|
647
|
-
function
|
|
650
|
+
function lr(e) {
|
|
648
651
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
649
652
|
let r;
|
|
650
653
|
for (; r = n.exec(e); )
|
|
651
654
|
t[r[1]] = r[2];
|
|
652
655
|
return t;
|
|
653
656
|
}
|
|
654
|
-
const
|
|
655
|
-
function
|
|
657
|
+
const ur = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
658
|
+
function Se(e, t, n, r, o) {
|
|
656
659
|
if (a.isFunction(r))
|
|
657
660
|
return r.call(this, t, n);
|
|
658
661
|
if (o && (t = n), !!a.isString(t)) {
|
|
@@ -662,59 +665,59 @@ function de(e, t, n, r, o) {
|
|
|
662
665
|
return r.test(t);
|
|
663
666
|
}
|
|
664
667
|
}
|
|
665
|
-
function
|
|
668
|
+
function fr(e) {
|
|
666
669
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
667
670
|
}
|
|
668
|
-
function
|
|
671
|
+
function dr(e, t) {
|
|
669
672
|
const n = a.toCamelCase(" " + t);
|
|
670
673
|
["get", "set", "has"].forEach((r) => {
|
|
671
674
|
Object.defineProperty(e, r + n, {
|
|
672
|
-
value: function(o,
|
|
673
|
-
return this[r].call(this, t, o,
|
|
675
|
+
value: function(o, i, s) {
|
|
676
|
+
return this[r].call(this, t, o, i, s);
|
|
674
677
|
},
|
|
675
678
|
configurable: !0
|
|
676
679
|
});
|
|
677
680
|
});
|
|
678
681
|
}
|
|
679
|
-
let
|
|
682
|
+
let A = class {
|
|
680
683
|
constructor(t) {
|
|
681
684
|
t && this.set(t);
|
|
682
685
|
}
|
|
683
686
|
set(t, n, r) {
|
|
684
687
|
const o = this;
|
|
685
|
-
function
|
|
686
|
-
const l =
|
|
688
|
+
function i(c, d, u) {
|
|
689
|
+
const l = J(d);
|
|
687
690
|
if (!l)
|
|
688
691
|
throw new Error("header name must be a non-empty string");
|
|
689
|
-
const
|
|
690
|
-
(!
|
|
692
|
+
const p = a.findKey(o, l);
|
|
693
|
+
(!p || o[p] === void 0 || u === !0 || u === void 0 && o[p] !== !1) && (o[p || d] = ce(c));
|
|
691
694
|
}
|
|
692
|
-
const
|
|
695
|
+
const s = (c, d) => a.forEach(c, (u, l) => i(u, l, d));
|
|
693
696
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
694
|
-
|
|
695
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
696
|
-
|
|
697
|
+
s(t, n);
|
|
698
|
+
else if (a.isString(t) && (t = t.trim()) && !ur(t))
|
|
699
|
+
s(cr(t), n);
|
|
697
700
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
698
|
-
let c = {},
|
|
701
|
+
let c = {}, d, u;
|
|
699
702
|
for (const l of t) {
|
|
700
703
|
if (!a.isArray(l))
|
|
701
704
|
throw TypeError("Object iterator must return a key-value pair");
|
|
702
|
-
c[u = l[0]] = (
|
|
705
|
+
c[u = l[0]] = (d = c[u]) ? a.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
|
|
703
706
|
}
|
|
704
|
-
|
|
707
|
+
s(c, n);
|
|
705
708
|
} else
|
|
706
|
-
t != null &&
|
|
709
|
+
t != null && i(n, t, r);
|
|
707
710
|
return this;
|
|
708
711
|
}
|
|
709
712
|
get(t, n) {
|
|
710
|
-
if (t =
|
|
713
|
+
if (t = J(t), t) {
|
|
711
714
|
const r = a.findKey(this, t);
|
|
712
715
|
if (r) {
|
|
713
716
|
const o = this[r];
|
|
714
717
|
if (!n)
|
|
715
718
|
return o;
|
|
716
719
|
if (n === !0)
|
|
717
|
-
return
|
|
720
|
+
return lr(o);
|
|
718
721
|
if (a.isFunction(n))
|
|
719
722
|
return n.call(this, o, r);
|
|
720
723
|
if (a.isRegExp(n))
|
|
@@ -724,42 +727,42 @@ let _ = class {
|
|
|
724
727
|
}
|
|
725
728
|
}
|
|
726
729
|
has(t, n) {
|
|
727
|
-
if (t =
|
|
730
|
+
if (t = J(t), t) {
|
|
728
731
|
const r = a.findKey(this, t);
|
|
729
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
732
|
+
return !!(r && this[r] !== void 0 && (!n || Se(this, this[r], r, n)));
|
|
730
733
|
}
|
|
731
734
|
return !1;
|
|
732
735
|
}
|
|
733
736
|
delete(t, n) {
|
|
734
737
|
const r = this;
|
|
735
738
|
let o = !1;
|
|
736
|
-
function s
|
|
737
|
-
if (
|
|
738
|
-
const c = a.findKey(r,
|
|
739
|
-
c && (!n ||
|
|
739
|
+
function i(s) {
|
|
740
|
+
if (s = J(s), s) {
|
|
741
|
+
const c = a.findKey(r, s);
|
|
742
|
+
c && (!n || Se(r, r[c], c, n)) && (delete r[c], o = !0);
|
|
740
743
|
}
|
|
741
744
|
}
|
|
742
|
-
return a.isArray(t) ? t.forEach(
|
|
745
|
+
return a.isArray(t) ? t.forEach(i) : i(t), o;
|
|
743
746
|
}
|
|
744
747
|
clear(t) {
|
|
745
748
|
const n = Object.keys(this);
|
|
746
749
|
let r = n.length, o = !1;
|
|
747
750
|
for (; r--; ) {
|
|
748
|
-
const
|
|
749
|
-
(!t ||
|
|
751
|
+
const i = n[r];
|
|
752
|
+
(!t || Se(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
750
753
|
}
|
|
751
754
|
return o;
|
|
752
755
|
}
|
|
753
756
|
normalize(t) {
|
|
754
757
|
const n = this, r = {};
|
|
755
|
-
return a.forEach(this, (o,
|
|
756
|
-
const
|
|
757
|
-
if (
|
|
758
|
-
n[
|
|
758
|
+
return a.forEach(this, (o, i) => {
|
|
759
|
+
const s = a.findKey(r, i);
|
|
760
|
+
if (s) {
|
|
761
|
+
n[s] = ce(o), delete n[i];
|
|
759
762
|
return;
|
|
760
763
|
}
|
|
761
|
-
const c = t ?
|
|
762
|
-
c !==
|
|
764
|
+
const c = t ? fr(i) : String(i).trim();
|
|
765
|
+
c !== i && delete n[i], n[c] = ce(o), r[c] = !0;
|
|
763
766
|
}), this;
|
|
764
767
|
}
|
|
765
768
|
concat(...t) {
|
|
@@ -792,18 +795,18 @@ let _ = class {
|
|
|
792
795
|
return n.forEach((o) => r.set(o)), r;
|
|
793
796
|
}
|
|
794
797
|
static accessor(t) {
|
|
795
|
-
const r = (this[
|
|
798
|
+
const r = (this[Qe] = this[Qe] = {
|
|
796
799
|
accessors: {}
|
|
797
800
|
}).accessors, o = this.prototype;
|
|
798
|
-
function s
|
|
799
|
-
const c =
|
|
800
|
-
r[c] || (
|
|
801
|
+
function i(s) {
|
|
802
|
+
const c = J(s);
|
|
803
|
+
r[c] || (dr(o, s), r[c] = !0);
|
|
801
804
|
}
|
|
802
|
-
return a.isArray(t) ? t.forEach(
|
|
805
|
+
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
803
806
|
}
|
|
804
807
|
};
|
|
805
|
-
|
|
806
|
-
a.reduceDescriptors(
|
|
808
|
+
A.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
809
|
+
a.reduceDescriptors(A.prototype, ({ value: e }, t) => {
|
|
807
810
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
808
811
|
return {
|
|
809
812
|
get: () => e,
|
|
@@ -812,24 +815,24 @@ a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
|
812
815
|
}
|
|
813
816
|
};
|
|
814
817
|
});
|
|
815
|
-
a.freezeMethods(
|
|
816
|
-
function
|
|
817
|
-
const n = this ||
|
|
818
|
-
let
|
|
818
|
+
a.freezeMethods(A);
|
|
819
|
+
function Re(e, t) {
|
|
820
|
+
const n = this || ee, r = t || n, o = A.from(r.headers);
|
|
821
|
+
let i = r.data;
|
|
819
822
|
return a.forEach(e, function(c) {
|
|
820
|
-
|
|
821
|
-
}), o.normalize(),
|
|
823
|
+
i = c.call(n, i, o.normalize(), t ? t.status : void 0);
|
|
824
|
+
}), o.normalize(), i;
|
|
822
825
|
}
|
|
823
|
-
function
|
|
826
|
+
function vt(e) {
|
|
824
827
|
return !!(e && e.__CANCEL__);
|
|
825
828
|
}
|
|
826
|
-
function
|
|
829
|
+
function M(e, t, n) {
|
|
827
830
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
828
831
|
}
|
|
829
|
-
a.inherits(
|
|
832
|
+
a.inherits(M, y, {
|
|
830
833
|
__CANCEL__: !0
|
|
831
834
|
});
|
|
832
|
-
function
|
|
835
|
+
function Dt(e, t, n) {
|
|
833
836
|
const r = n.config.validateStatus;
|
|
834
837
|
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
835
838
|
"Request failed with status code " + n.status,
|
|
@@ -839,80 +842,82 @@ function gt(e, t, n) {
|
|
|
839
842
|
n
|
|
840
843
|
));
|
|
841
844
|
}
|
|
842
|
-
function
|
|
845
|
+
function pr(e) {
|
|
843
846
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
844
847
|
return t && t[1] || "";
|
|
845
848
|
}
|
|
846
|
-
function
|
|
849
|
+
function hr(e, t) {
|
|
847
850
|
e = e || 10;
|
|
848
851
|
const n = new Array(e), r = new Array(e);
|
|
849
|
-
let o = 0,
|
|
850
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
851
|
-
const u = Date.now(), l = r[
|
|
852
|
-
|
|
853
|
-
let
|
|
854
|
-
for (;
|
|
855
|
-
|
|
856
|
-
if (o = (o + 1) % e, o ===
|
|
852
|
+
let o = 0, i = 0, s;
|
|
853
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
854
|
+
const u = Date.now(), l = r[i];
|
|
855
|
+
s || (s = u), n[o] = d, r[o] = u;
|
|
856
|
+
let p = i, g = 0;
|
|
857
|
+
for (; p !== o; )
|
|
858
|
+
g += n[p++], p = p % e;
|
|
859
|
+
if (o = (o + 1) % e, o === i && (i = (i + 1) % e), u - s < t)
|
|
857
860
|
return;
|
|
858
|
-
const
|
|
859
|
-
return
|
|
861
|
+
const b = l && u - l;
|
|
862
|
+
return b ? Math.round(g * 1e3 / b) : void 0;
|
|
860
863
|
};
|
|
861
864
|
}
|
|
862
|
-
function
|
|
863
|
-
let n = 0, r = 1e3 / t, o,
|
|
864
|
-
const
|
|
865
|
-
n = l, o = null,
|
|
865
|
+
function mr(e, t) {
|
|
866
|
+
let n = 0, r = 1e3 / t, o, i;
|
|
867
|
+
const s = (u, l = Date.now()) => {
|
|
868
|
+
n = l, o = null, i && (clearTimeout(i), i = null), e(...u);
|
|
866
869
|
};
|
|
867
870
|
return [(...u) => {
|
|
868
|
-
const l = Date.now(),
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}, r -
|
|
872
|
-
}, () => o &&
|
|
871
|
+
const l = Date.now(), p = l - n;
|
|
872
|
+
p >= r ? s(u, l) : (o = u, i || (i = setTimeout(() => {
|
|
873
|
+
i = null, s(o);
|
|
874
|
+
}, r - p)));
|
|
875
|
+
}, () => o && s(o)];
|
|
873
876
|
}
|
|
874
|
-
const
|
|
877
|
+
const fe = (e, t, n = 3) => {
|
|
875
878
|
let r = 0;
|
|
876
|
-
const o =
|
|
877
|
-
return
|
|
878
|
-
const
|
|
879
|
-
r =
|
|
880
|
-
const
|
|
881
|
-
loaded:
|
|
879
|
+
const o = hr(50, 250);
|
|
880
|
+
return mr((i) => {
|
|
881
|
+
const s = i.loaded, c = i.lengthComputable ? i.total : void 0, d = s - r, u = o(d), l = s <= c;
|
|
882
|
+
r = s;
|
|
883
|
+
const p = {
|
|
884
|
+
loaded: s,
|
|
882
885
|
total: c,
|
|
883
|
-
progress: c ?
|
|
884
|
-
bytes:
|
|
886
|
+
progress: c ? s / c : void 0,
|
|
887
|
+
bytes: d,
|
|
885
888
|
rate: u || void 0,
|
|
886
|
-
estimated: u && c && l ? (c -
|
|
887
|
-
event:
|
|
889
|
+
estimated: u && c && l ? (c - s) / u : void 0,
|
|
890
|
+
event: i,
|
|
888
891
|
lengthComputable: c != null,
|
|
889
892
|
[t ? "download" : "upload"]: !0
|
|
890
893
|
};
|
|
891
|
-
e(
|
|
894
|
+
e(p);
|
|
892
895
|
}, n);
|
|
893
|
-
},
|
|
896
|
+
}, Xe = (e, t) => {
|
|
894
897
|
const n = e != null;
|
|
895
898
|
return [(r) => t[0]({
|
|
896
899
|
lengthComputable: n,
|
|
897
900
|
total: e,
|
|
898
901
|
loaded: r
|
|
899
902
|
}), t[1]];
|
|
900
|
-
},
|
|
903
|
+
}, Ge = (e) => (...t) => a.asap(() => e(...t)), yr = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, R.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
901
904
|
new URL(R.origin),
|
|
902
905
|
R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
|
|
903
|
-
) : () => !0,
|
|
906
|
+
) : () => !0, gr = R.hasStandardBrowserEnv ? (
|
|
904
907
|
// Standard browser envs support document.cookie
|
|
905
908
|
{
|
|
906
|
-
write(e, t, n, r, o, s) {
|
|
907
|
-
|
|
908
|
-
|
|
909
|
+
write(e, t, n, r, o, i, s) {
|
|
910
|
+
if (typeof document > "u") return;
|
|
911
|
+
const c = [`${e}=${encodeURIComponent(t)}`];
|
|
912
|
+
a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(o) && c.push(`domain=${o}`), i === !0 && c.push("secure"), a.isString(s) && c.push(`SameSite=${s}`), document.cookie = c.join("; ");
|
|
909
913
|
},
|
|
910
914
|
read(e) {
|
|
911
|
-
|
|
912
|
-
|
|
915
|
+
if (typeof document > "u") return null;
|
|
916
|
+
const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
|
|
917
|
+
return t ? decodeURIComponent(t[1]) : null;
|
|
913
918
|
},
|
|
914
919
|
remove(e) {
|
|
915
|
-
this.write(e, "", Date.now() - 864e5);
|
|
920
|
+
this.write(e, "", Date.now() - 864e5, "/");
|
|
916
921
|
}
|
|
917
922
|
}
|
|
918
923
|
) : (
|
|
@@ -927,183 +932,184 @@ const re = (e, t, n = 3) => {
|
|
|
927
932
|
}
|
|
928
933
|
}
|
|
929
934
|
);
|
|
930
|
-
function
|
|
935
|
+
function wr(e) {
|
|
931
936
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
932
937
|
}
|
|
933
|
-
function
|
|
938
|
+
function br(e, t) {
|
|
934
939
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
935
940
|
}
|
|
936
|
-
function
|
|
937
|
-
let r = !
|
|
938
|
-
return e && (r || n == !1) ?
|
|
941
|
+
function It(e, t, n) {
|
|
942
|
+
let r = !wr(t);
|
|
943
|
+
return e && (r || n == !1) ? br(e, t) : t;
|
|
939
944
|
}
|
|
940
|
-
const
|
|
941
|
-
function
|
|
945
|
+
const Ze = (e) => e instanceof A ? { ...e } : e;
|
|
946
|
+
function B(e, t) {
|
|
942
947
|
t = t || {};
|
|
943
948
|
const n = {};
|
|
944
|
-
function r(u, l,
|
|
945
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless:
|
|
949
|
+
function r(u, l, p, g) {
|
|
950
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: g }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
946
951
|
}
|
|
947
|
-
function o(u, l,
|
|
952
|
+
function o(u, l, p, g) {
|
|
948
953
|
if (a.isUndefined(l)) {
|
|
949
954
|
if (!a.isUndefined(u))
|
|
950
|
-
return r(void 0, u,
|
|
951
|
-
} else return r(u, l,
|
|
955
|
+
return r(void 0, u, p, g);
|
|
956
|
+
} else return r(u, l, p, g);
|
|
952
957
|
}
|
|
953
|
-
function
|
|
958
|
+
function i(u, l) {
|
|
954
959
|
if (!a.isUndefined(l))
|
|
955
960
|
return r(void 0, l);
|
|
956
961
|
}
|
|
957
|
-
function
|
|
962
|
+
function s(u, l) {
|
|
958
963
|
if (a.isUndefined(l)) {
|
|
959
964
|
if (!a.isUndefined(u))
|
|
960
965
|
return r(void 0, u);
|
|
961
966
|
} else return r(void 0, l);
|
|
962
967
|
}
|
|
963
|
-
function c(u, l,
|
|
964
|
-
if (
|
|
968
|
+
function c(u, l, p) {
|
|
969
|
+
if (p in t)
|
|
965
970
|
return r(u, l);
|
|
966
|
-
if (
|
|
971
|
+
if (p in e)
|
|
967
972
|
return r(void 0, u);
|
|
968
973
|
}
|
|
969
|
-
const
|
|
970
|
-
url:
|
|
971
|
-
method:
|
|
972
|
-
data:
|
|
973
|
-
baseURL:
|
|
974
|
-
transformRequest:
|
|
975
|
-
transformResponse:
|
|
976
|
-
paramsSerializer:
|
|
977
|
-
timeout:
|
|
978
|
-
timeoutMessage:
|
|
979
|
-
withCredentials:
|
|
980
|
-
withXSRFToken:
|
|
981
|
-
adapter:
|
|
982
|
-
responseType:
|
|
983
|
-
xsrfCookieName:
|
|
984
|
-
xsrfHeaderName:
|
|
985
|
-
onUploadProgress:
|
|
986
|
-
onDownloadProgress:
|
|
987
|
-
decompress:
|
|
988
|
-
maxContentLength:
|
|
989
|
-
maxBodyLength:
|
|
990
|
-
beforeRedirect:
|
|
991
|
-
transport:
|
|
992
|
-
httpAgent:
|
|
993
|
-
httpsAgent:
|
|
994
|
-
cancelToken:
|
|
995
|
-
socketPath:
|
|
996
|
-
responseEncoding:
|
|
974
|
+
const d = {
|
|
975
|
+
url: i,
|
|
976
|
+
method: i,
|
|
977
|
+
data: i,
|
|
978
|
+
baseURL: s,
|
|
979
|
+
transformRequest: s,
|
|
980
|
+
transformResponse: s,
|
|
981
|
+
paramsSerializer: s,
|
|
982
|
+
timeout: s,
|
|
983
|
+
timeoutMessage: s,
|
|
984
|
+
withCredentials: s,
|
|
985
|
+
withXSRFToken: s,
|
|
986
|
+
adapter: s,
|
|
987
|
+
responseType: s,
|
|
988
|
+
xsrfCookieName: s,
|
|
989
|
+
xsrfHeaderName: s,
|
|
990
|
+
onUploadProgress: s,
|
|
991
|
+
onDownloadProgress: s,
|
|
992
|
+
decompress: s,
|
|
993
|
+
maxContentLength: s,
|
|
994
|
+
maxBodyLength: s,
|
|
995
|
+
beforeRedirect: s,
|
|
996
|
+
transport: s,
|
|
997
|
+
httpAgent: s,
|
|
998
|
+
httpsAgent: s,
|
|
999
|
+
cancelToken: s,
|
|
1000
|
+
socketPath: s,
|
|
1001
|
+
responseEncoding: s,
|
|
997
1002
|
validateStatus: c,
|
|
998
|
-
headers: (u, l,
|
|
1003
|
+
headers: (u, l, p) => o(Ze(u), Ze(l), p, !0)
|
|
999
1004
|
};
|
|
1000
1005
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1001
|
-
const
|
|
1002
|
-
a.isUndefined(
|
|
1006
|
+
const p = d[l] || o, g = p(e[l], t[l], l);
|
|
1007
|
+
a.isUndefined(g) && p !== c || (n[l] = g);
|
|
1003
1008
|
}), n;
|
|
1004
1009
|
}
|
|
1005
|
-
const
|
|
1006
|
-
const t =
|
|
1007
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName:
|
|
1008
|
-
t.headers =
|
|
1010
|
+
const Bt = (e) => {
|
|
1011
|
+
const t = B({}, e);
|
|
1012
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: c } = t;
|
|
1013
|
+
if (t.headers = s = A.from(s), t.url = Lt(It(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && s.set(
|
|
1009
1014
|
"Authorization",
|
|
1010
1015
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1011
|
-
)
|
|
1012
|
-
let f;
|
|
1013
|
-
if (a.isFormData(n)) {
|
|
1016
|
+
), a.isFormData(n)) {
|
|
1014
1017
|
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
1015
|
-
|
|
1016
|
-
else if ((
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1018
|
+
s.setContentType(void 0);
|
|
1019
|
+
else if (a.isFunction(n.getHeaders)) {
|
|
1020
|
+
const d = n.getHeaders(), u = ["content-type", "content-length"];
|
|
1021
|
+
Object.entries(d).forEach(([l, p]) => {
|
|
1022
|
+
u.includes(l.toLowerCase()) && s.set(l, p);
|
|
1023
|
+
});
|
|
1019
1024
|
}
|
|
1020
1025
|
}
|
|
1021
|
-
if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1026
|
+
if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && yr(t.url))) {
|
|
1027
|
+
const d = o && i && gr.read(i);
|
|
1028
|
+
d && s.set(o, d);
|
|
1024
1029
|
}
|
|
1025
1030
|
return t;
|
|
1026
|
-
},
|
|
1031
|
+
}, Er = typeof XMLHttpRequest < "u", Sr = Er && function(e) {
|
|
1027
1032
|
return new Promise(function(n, r) {
|
|
1028
|
-
const o =
|
|
1029
|
-
let
|
|
1030
|
-
const
|
|
1031
|
-
let { responseType: c, onUploadProgress:
|
|
1033
|
+
const o = Bt(e);
|
|
1034
|
+
let i = o.data;
|
|
1035
|
+
const s = A.from(o.headers).normalize();
|
|
1036
|
+
let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = o, l, p, g, b, f;
|
|
1032
1037
|
function m() {
|
|
1033
|
-
|
|
1038
|
+
b && b(), f && f(), o.cancelToken && o.cancelToken.unsubscribe(l), o.signal && o.signal.removeEventListener("abort", l);
|
|
1034
1039
|
}
|
|
1035
1040
|
let h = new XMLHttpRequest();
|
|
1036
1041
|
h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
|
|
1037
1042
|
function E() {
|
|
1038
1043
|
if (!h)
|
|
1039
1044
|
return;
|
|
1040
|
-
const
|
|
1045
|
+
const S = A.from(
|
|
1041
1046
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1042
|
-
),
|
|
1047
|
+
), x = {
|
|
1043
1048
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1044
1049
|
status: h.status,
|
|
1045
1050
|
statusText: h.statusText,
|
|
1046
|
-
headers:
|
|
1051
|
+
headers: S,
|
|
1047
1052
|
config: e,
|
|
1048
1053
|
request: h
|
|
1049
1054
|
};
|
|
1050
|
-
|
|
1051
|
-
n(
|
|
1052
|
-
}, function(
|
|
1053
|
-
r(
|
|
1054
|
-
},
|
|
1055
|
+
Dt(function(C) {
|
|
1056
|
+
n(C), m();
|
|
1057
|
+
}, function(C) {
|
|
1058
|
+
r(C), m();
|
|
1059
|
+
}, x), h = null;
|
|
1055
1060
|
}
|
|
1056
1061
|
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
1057
1062
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1058
1063
|
}, h.onabort = function() {
|
|
1059
1064
|
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1060
|
-
}, h.onerror = function() {
|
|
1061
|
-
|
|
1065
|
+
}, h.onerror = function(T) {
|
|
1066
|
+
const x = T && T.message ? T.message : "Network Error", F = new y(x, y.ERR_NETWORK, e, h);
|
|
1067
|
+
F.event = T || null, r(F), h = null;
|
|
1062
1068
|
}, h.ontimeout = function() {
|
|
1063
|
-
let
|
|
1064
|
-
const
|
|
1065
|
-
o.timeoutErrorMessage && (
|
|
1066
|
-
|
|
1067
|
-
|
|
1069
|
+
let T = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1070
|
+
const x = o.transitional || Nt;
|
|
1071
|
+
o.timeoutErrorMessage && (T = o.timeoutErrorMessage), r(new y(
|
|
1072
|
+
T,
|
|
1073
|
+
x.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1068
1074
|
e,
|
|
1069
1075
|
h
|
|
1070
1076
|
)), h = null;
|
|
1071
|
-
},
|
|
1072
|
-
h.setRequestHeader(
|
|
1073
|
-
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), u && ([
|
|
1074
|
-
h && (r(!
|
|
1077
|
+
}, i === void 0 && s.setContentType(null), "setRequestHeader" in h && a.forEach(s.toJSON(), function(T, x) {
|
|
1078
|
+
h.setRequestHeader(x, T);
|
|
1079
|
+
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), u && ([g, f] = fe(u, !0), h.addEventListener("progress", g)), d && h.upload && ([p, b] = fe(d), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", b)), (o.cancelToken || o.signal) && (l = (S) => {
|
|
1080
|
+
h && (r(!S || S.type ? new M(null, e, h) : S), h.abort(), h = null);
|
|
1075
1081
|
}, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
|
|
1076
|
-
const
|
|
1077
|
-
if (
|
|
1078
|
-
r(new y("Unsupported protocol " +
|
|
1082
|
+
const _ = pr(o.url);
|
|
1083
|
+
if (_ && R.protocols.indexOf(_) === -1) {
|
|
1084
|
+
r(new y("Unsupported protocol " + _ + ":", y.ERR_BAD_REQUEST, e));
|
|
1079
1085
|
return;
|
|
1080
1086
|
}
|
|
1081
|
-
h.send(
|
|
1087
|
+
h.send(i || null);
|
|
1082
1088
|
});
|
|
1083
|
-
},
|
|
1089
|
+
}, Rr = (e, t) => {
|
|
1084
1090
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1085
1091
|
if (t || n) {
|
|
1086
1092
|
let r = new AbortController(), o;
|
|
1087
|
-
const
|
|
1093
|
+
const i = function(u) {
|
|
1088
1094
|
if (!o) {
|
|
1089
1095
|
o = !0, c();
|
|
1090
1096
|
const l = u instanceof Error ? u : this.reason;
|
|
1091
|
-
r.abort(l instanceof y ? l : new
|
|
1097
|
+
r.abort(l instanceof y ? l : new M(l instanceof Error ? l.message : l));
|
|
1092
1098
|
}
|
|
1093
1099
|
};
|
|
1094
|
-
let
|
|
1095
|
-
|
|
1100
|
+
let s = t && setTimeout(() => {
|
|
1101
|
+
s = null, i(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1096
1102
|
}, t);
|
|
1097
1103
|
const c = () => {
|
|
1098
|
-
e && (
|
|
1099
|
-
u.unsubscribe ? u.unsubscribe(
|
|
1104
|
+
e && (s && clearTimeout(s), s = null, e.forEach((u) => {
|
|
1105
|
+
u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
|
|
1100
1106
|
}), e = null);
|
|
1101
1107
|
};
|
|
1102
|
-
e.forEach((u) => u.addEventListener("abort",
|
|
1103
|
-
const { signal:
|
|
1104
|
-
return
|
|
1108
|
+
e.forEach((u) => u.addEventListener("abort", i));
|
|
1109
|
+
const { signal: d } = r;
|
|
1110
|
+
return d.unsubscribe = () => a.asap(c), d;
|
|
1105
1111
|
}
|
|
1106
|
-
},
|
|
1112
|
+
}, Tr = function* (e, t) {
|
|
1107
1113
|
let n = e.byteLength;
|
|
1108
1114
|
if (n < t) {
|
|
1109
1115
|
yield e;
|
|
@@ -1112,10 +1118,10 @@ const Et = (e) => {
|
|
|
1112
1118
|
let r = 0, o;
|
|
1113
1119
|
for (; r < n; )
|
|
1114
1120
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1115
|
-
},
|
|
1116
|
-
for await (const n of
|
|
1117
|
-
yield*
|
|
1118
|
-
},
|
|
1121
|
+
}, Or = async function* (e, t) {
|
|
1122
|
+
for await (const n of Ar(e))
|
|
1123
|
+
yield* Tr(n, t);
|
|
1124
|
+
}, Ar = async function* (e) {
|
|
1119
1125
|
if (e[Symbol.asyncIterator]) {
|
|
1120
1126
|
yield* e;
|
|
1121
1127
|
return;
|
|
@@ -1131,169 +1137,200 @@ const Et = (e) => {
|
|
|
1131
1137
|
} finally {
|
|
1132
1138
|
await t.cancel();
|
|
1133
1139
|
}
|
|
1134
|
-
},
|
|
1135
|
-
const o =
|
|
1136
|
-
let
|
|
1137
|
-
|
|
1140
|
+
}, Ye = (e, t, n, r) => {
|
|
1141
|
+
const o = Or(e, t);
|
|
1142
|
+
let i = 0, s, c = (d) => {
|
|
1143
|
+
s || (s = !0, r && r(d));
|
|
1138
1144
|
};
|
|
1139
1145
|
return new ReadableStream({
|
|
1140
|
-
async pull(
|
|
1146
|
+
async pull(d) {
|
|
1141
1147
|
try {
|
|
1142
1148
|
const { done: u, value: l } = await o.next();
|
|
1143
1149
|
if (u) {
|
|
1144
|
-
c(),
|
|
1150
|
+
c(), d.close();
|
|
1145
1151
|
return;
|
|
1146
1152
|
}
|
|
1147
|
-
let
|
|
1153
|
+
let p = l.byteLength;
|
|
1148
1154
|
if (n) {
|
|
1149
|
-
let
|
|
1150
|
-
n(
|
|
1155
|
+
let g = i += p;
|
|
1156
|
+
n(g);
|
|
1151
1157
|
}
|
|
1152
|
-
|
|
1158
|
+
d.enqueue(new Uint8Array(l));
|
|
1153
1159
|
} catch (u) {
|
|
1154
1160
|
throw c(u), u;
|
|
1155
1161
|
}
|
|
1156
1162
|
},
|
|
1157
|
-
cancel(
|
|
1158
|
-
return c(
|
|
1163
|
+
cancel(d) {
|
|
1164
|
+
return c(d), o.return();
|
|
1159
1165
|
}
|
|
1160
1166
|
}, {
|
|
1161
1167
|
highWaterMark: 2
|
|
1162
1168
|
});
|
|
1163
|
-
},
|
|
1169
|
+
}, et = 64 * 1024, { isFunction: oe } = a, _r = (({ Request: e, Response: t }) => ({
|
|
1170
|
+
Request: e,
|
|
1171
|
+
Response: t
|
|
1172
|
+
}))(a.global), {
|
|
1173
|
+
ReadableStream: tt,
|
|
1174
|
+
TextEncoder: nt
|
|
1175
|
+
} = a.global, rt = (e, ...t) => {
|
|
1164
1176
|
try {
|
|
1165
1177
|
return !!e(...t);
|
|
1166
1178
|
} catch {
|
|
1167
1179
|
return !1;
|
|
1168
1180
|
}
|
|
1169
|
-
},
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
stream: ge && ((e) => e.body)
|
|
1181
|
-
};
|
|
1182
|
-
le && ((e) => {
|
|
1183
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1184
|
-
!oe[t] && (oe[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1185
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1186
|
-
});
|
|
1187
|
-
});
|
|
1188
|
-
})(new Response());
|
|
1189
|
-
const ur = async (e) => {
|
|
1190
|
-
if (e == null)
|
|
1191
|
-
return 0;
|
|
1192
|
-
if (a.isBlob(e))
|
|
1193
|
-
return e.size;
|
|
1194
|
-
if (a.isSpecCompliantForm(e))
|
|
1195
|
-
return (await new Request(R.origin, {
|
|
1181
|
+
}, Cr = (e) => {
|
|
1182
|
+
e = a.merge.call({
|
|
1183
|
+
skipUndefined: !0
|
|
1184
|
+
}, _r, e);
|
|
1185
|
+
const { fetch: t, Request: n, Response: r } = e, o = t ? oe(t) : typeof fetch == "function", i = oe(n), s = oe(r);
|
|
1186
|
+
if (!o)
|
|
1187
|
+
return !1;
|
|
1188
|
+
const c = o && oe(tt), d = o && (typeof nt == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new nt()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = i && c && rt(() => {
|
|
1189
|
+
let f = !1;
|
|
1190
|
+
const m = new n(R.origin, {
|
|
1191
|
+
body: new tt(),
|
|
1196
1192
|
method: "POST",
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
cancelToken: s,
|
|
1213
|
-
timeout: i,
|
|
1214
|
-
onDownloadProgress: c,
|
|
1215
|
-
onUploadProgress: f,
|
|
1216
|
-
responseType: u,
|
|
1217
|
-
headers: l,
|
|
1218
|
-
withCredentials: d = "same-origin",
|
|
1219
|
-
fetchOptions: w
|
|
1220
|
-
} = Et(e);
|
|
1221
|
-
u = u ? (u + "").toLowerCase() : "text";
|
|
1222
|
-
let g = or([o, s && s.toAbortSignal()], i), p;
|
|
1223
|
-
const m = g && g.unsubscribe && (() => {
|
|
1224
|
-
g.unsubscribe();
|
|
1193
|
+
get duplex() {
|
|
1194
|
+
return f = !0, "half";
|
|
1195
|
+
}
|
|
1196
|
+
}).headers.has("Content-Type");
|
|
1197
|
+
return f && !m;
|
|
1198
|
+
}), l = s && c && rt(() => a.isReadableStream(new r("").body)), p = {
|
|
1199
|
+
stream: l && ((f) => f.body)
|
|
1200
|
+
};
|
|
1201
|
+
o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1202
|
+
!p[f] && (p[f] = (m, h) => {
|
|
1203
|
+
let E = m && m[f];
|
|
1204
|
+
if (E)
|
|
1205
|
+
return E.call(m);
|
|
1206
|
+
throw new y(`Response type '${f}' is not supported`, y.ERR_NOT_SUPPORT, h);
|
|
1207
|
+
});
|
|
1225
1208
|
});
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1209
|
+
const g = async (f) => {
|
|
1210
|
+
if (f == null)
|
|
1211
|
+
return 0;
|
|
1212
|
+
if (a.isBlob(f))
|
|
1213
|
+
return f.size;
|
|
1214
|
+
if (a.isSpecCompliantForm(f))
|
|
1215
|
+
return (await new n(R.origin, {
|
|
1230
1216
|
method: "POST",
|
|
1231
|
-
body:
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1217
|
+
body: f
|
|
1218
|
+
}).arrayBuffer()).byteLength;
|
|
1219
|
+
if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
|
|
1220
|
+
return f.byteLength;
|
|
1221
|
+
if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
|
|
1222
|
+
return (await d(f)).byteLength;
|
|
1223
|
+
}, b = async (f, m) => {
|
|
1224
|
+
const h = a.toFiniteNumber(f.getContentLength());
|
|
1225
|
+
return h ?? g(m);
|
|
1226
|
+
};
|
|
1227
|
+
return async (f) => {
|
|
1228
|
+
let {
|
|
1229
|
+
url: m,
|
|
1230
|
+
method: h,
|
|
1231
|
+
data: E,
|
|
1232
|
+
signal: _,
|
|
1233
|
+
cancelToken: S,
|
|
1234
|
+
timeout: T,
|
|
1235
|
+
onDownloadProgress: x,
|
|
1236
|
+
onUploadProgress: F,
|
|
1237
|
+
responseType: C,
|
|
1238
|
+
headers: we,
|
|
1239
|
+
withCredentials: te = "same-origin",
|
|
1240
|
+
fetchOptions: je
|
|
1241
|
+
} = Bt(f), qe = t || fetch;
|
|
1242
|
+
C = C ? (C + "").toLowerCase() : "text";
|
|
1243
|
+
let ne = Rr([_, S && S.toAbortSignal()], T), z = null;
|
|
1244
|
+
const v = ne && ne.unsubscribe && (() => {
|
|
1245
|
+
ne.unsubscribe();
|
|
1246
|
+
});
|
|
1247
|
+
let $e;
|
|
1248
|
+
try {
|
|
1249
|
+
if (F && u && h !== "get" && h !== "head" && ($e = await b(we, E)) !== 0) {
|
|
1250
|
+
let N = new n(m, {
|
|
1251
|
+
method: "POST",
|
|
1252
|
+
body: E,
|
|
1253
|
+
duplex: "half"
|
|
1254
|
+
}), j;
|
|
1255
|
+
if (a.isFormData(E) && (j = N.headers.get("content-type")) && we.setContentType(j), N.body) {
|
|
1256
|
+
const [be, re] = Xe(
|
|
1257
|
+
$e,
|
|
1258
|
+
fe(Ge(F))
|
|
1259
|
+
);
|
|
1260
|
+
E = Ye(N.body, et, be, re);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
a.isString(te) || (te = te ? "include" : "omit");
|
|
1264
|
+
const P = i && "credentials" in n.prototype, He = {
|
|
1265
|
+
...je,
|
|
1266
|
+
signal: ne,
|
|
1267
|
+
method: h.toUpperCase(),
|
|
1268
|
+
headers: we.normalize().toJSON(),
|
|
1269
|
+
body: E,
|
|
1270
|
+
duplex: "half",
|
|
1271
|
+
credentials: P ? te : void 0
|
|
1272
|
+
};
|
|
1273
|
+
z = i && new n(m, He);
|
|
1274
|
+
let L = await (i ? qe(z, je) : qe(m, He));
|
|
1275
|
+
const Me = l && (C === "stream" || C === "response");
|
|
1276
|
+
if (l && (x || Me && v)) {
|
|
1277
|
+
const N = {};
|
|
1278
|
+
["status", "statusText", "headers"].forEach((ze) => {
|
|
1279
|
+
N[ze] = L[ze];
|
|
1280
|
+
});
|
|
1281
|
+
const j = a.toFiniteNumber(L.headers.get("content-length")), [be, re] = x && Xe(
|
|
1282
|
+
j,
|
|
1283
|
+
fe(Ge(x), !0)
|
|
1284
|
+
) || [];
|
|
1285
|
+
L = new r(
|
|
1286
|
+
Ye(L.body, et, be, () => {
|
|
1287
|
+
re && re(), v && v();
|
|
1288
|
+
}),
|
|
1289
|
+
N
|
|
1238
1290
|
);
|
|
1239
|
-
r = je(O.body, qe, U, G);
|
|
1240
1291
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
});
|
|
1253
|
-
let S = await fetch(p, w);
|
|
1254
|
-
const T = ge && (u === "stream" || u === "response");
|
|
1255
|
-
if (ge && (c || T && m)) {
|
|
1256
|
-
const O = {};
|
|
1257
|
-
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1258
|
-
O[Pe] = S[Pe];
|
|
1292
|
+
C = C || "text";
|
|
1293
|
+
let Xt = await p[a.findKey(p, C) || "text"](L, f);
|
|
1294
|
+
return !Me && v && v(), await new Promise((N, j) => {
|
|
1295
|
+
Dt(N, j, {
|
|
1296
|
+
data: Xt,
|
|
1297
|
+
headers: A.from(L.headers),
|
|
1298
|
+
status: L.status,
|
|
1299
|
+
statusText: L.statusText,
|
|
1300
|
+
config: f,
|
|
1301
|
+
request: z
|
|
1302
|
+
});
|
|
1259
1303
|
});
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
}),
|
|
1268
|
-
O
|
|
1269
|
-
);
|
|
1304
|
+
} catch (P) {
|
|
1305
|
+
throw v && v(), P && P.name === "TypeError" && /Load failed|fetch/i.test(P.message) ? Object.assign(
|
|
1306
|
+
new y("Network Error", y.ERR_NETWORK, f, z),
|
|
1307
|
+
{
|
|
1308
|
+
cause: P.cause || P
|
|
1309
|
+
}
|
|
1310
|
+
) : y.from(P, P && P.code, f, z);
|
|
1270
1311
|
}
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1312
|
+
};
|
|
1313
|
+
}, xr = /* @__PURE__ */ new Map(), jt = (e) => {
|
|
1314
|
+
let t = e && e.env || {};
|
|
1315
|
+
const { fetch: n, Request: r, Response: o } = t, i = [
|
|
1316
|
+
r,
|
|
1317
|
+
o,
|
|
1318
|
+
n
|
|
1319
|
+
];
|
|
1320
|
+
let s = i.length, c = s, d, u, l = xr;
|
|
1321
|
+
for (; c--; )
|
|
1322
|
+
d = i[c], u = l.get(d), u === void 0 && l.set(d, u = c ? /* @__PURE__ */ new Map() : Cr(t)), l = u;
|
|
1323
|
+
return u;
|
|
1324
|
+
};
|
|
1325
|
+
jt();
|
|
1326
|
+
const Ie = {
|
|
1327
|
+
http: Jn,
|
|
1328
|
+
xhr: Sr,
|
|
1329
|
+
fetch: {
|
|
1330
|
+
get: jt
|
|
1290
1331
|
}
|
|
1291
|
-
}), be = {
|
|
1292
|
-
http: xn,
|
|
1293
|
-
xhr: rr,
|
|
1294
|
-
fetch: dr
|
|
1295
1332
|
};
|
|
1296
|
-
a.forEach(
|
|
1333
|
+
a.forEach(Ie, (e, t) => {
|
|
1297
1334
|
if (e) {
|
|
1298
1335
|
try {
|
|
1299
1336
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1302,108 +1339,118 @@ a.forEach(be, (e, t) => {
|
|
|
1302
1339
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1303
1340
|
}
|
|
1304
1341
|
});
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
` + s.map(
|
|
1326
|
-
`) : " " +
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1342
|
+
const ot = (e) => `- ${e}`, kr = (e) => a.isFunction(e) || e === null || e === !1;
|
|
1343
|
+
function Pr(e, t) {
|
|
1344
|
+
e = a.isArray(e) ? e : [e];
|
|
1345
|
+
const { length: n } = e;
|
|
1346
|
+
let r, o;
|
|
1347
|
+
const i = {};
|
|
1348
|
+
for (let s = 0; s < n; s++) {
|
|
1349
|
+
r = e[s];
|
|
1350
|
+
let c;
|
|
1351
|
+
if (o = r, !kr(r) && (o = Ie[(c = String(r)).toLowerCase()], o === void 0))
|
|
1352
|
+
throw new y(`Unknown adapter '${c}'`);
|
|
1353
|
+
if (o && (a.isFunction(o) || (o = o.get(t))))
|
|
1354
|
+
break;
|
|
1355
|
+
i[c || "#" + s] = o;
|
|
1356
|
+
}
|
|
1357
|
+
if (!o) {
|
|
1358
|
+
const s = Object.entries(i).map(
|
|
1359
|
+
([d, u]) => `adapter ${d} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1360
|
+
);
|
|
1361
|
+
let c = n ? s.length > 1 ? `since :
|
|
1362
|
+
` + s.map(ot).join(`
|
|
1363
|
+
`) : " " + ot(s[0]) : "as no adapter specified";
|
|
1364
|
+
throw new y(
|
|
1365
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
1366
|
+
"ERR_NOT_SUPPORT"
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
return o;
|
|
1370
|
+
}
|
|
1371
|
+
const qt = {
|
|
1372
|
+
/**
|
|
1373
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
1374
|
+
* @type {Function}
|
|
1375
|
+
*/
|
|
1376
|
+
getAdapter: Pr,
|
|
1377
|
+
/**
|
|
1378
|
+
* Exposes all known adapters
|
|
1379
|
+
* @type {Object<string, Function|Object>}
|
|
1380
|
+
*/
|
|
1381
|
+
adapters: Ie
|
|
1335
1382
|
};
|
|
1336
|
-
function
|
|
1383
|
+
function Te(e) {
|
|
1337
1384
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1338
|
-
throw new
|
|
1385
|
+
throw new M(null, e);
|
|
1339
1386
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return
|
|
1387
|
+
function st(e) {
|
|
1388
|
+
return Te(e), e.headers = A.from(e.headers), e.data = Re.call(
|
|
1342
1389
|
e,
|
|
1343
1390
|
e.transformRequest
|
|
1344
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1345
|
-
return
|
|
1391
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(e.adapter || ee.adapter, e)(e).then(function(r) {
|
|
1392
|
+
return Te(e), r.data = Re.call(
|
|
1346
1393
|
e,
|
|
1347
1394
|
e.transformResponse,
|
|
1348
1395
|
r
|
|
1349
|
-
), r.headers =
|
|
1396
|
+
), r.headers = A.from(r.headers), r;
|
|
1350
1397
|
}, function(r) {
|
|
1351
|
-
return
|
|
1398
|
+
return vt(r) || (Te(e), r && r.response && (r.response.data = Re.call(
|
|
1352
1399
|
e,
|
|
1353
1400
|
e.transformResponse,
|
|
1354
1401
|
r.response
|
|
1355
|
-
), r.response.headers =
|
|
1402
|
+
), r.response.headers = A.from(r.response.headers))), Promise.reject(r);
|
|
1356
1403
|
});
|
|
1357
1404
|
}
|
|
1358
|
-
const
|
|
1405
|
+
const $t = "1.13.1", ye = {};
|
|
1359
1406
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1360
|
-
|
|
1407
|
+
ye[e] = function(r) {
|
|
1361
1408
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1362
1409
|
};
|
|
1363
1410
|
});
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
function o(
|
|
1367
|
-
return "[Axios v" +
|
|
1411
|
+
const it = {};
|
|
1412
|
+
ye.transitional = function(t, n, r) {
|
|
1413
|
+
function o(i, s) {
|
|
1414
|
+
return "[Axios v" + $t + "] Transitional option '" + i + "'" + s + (r ? ". " + r : "");
|
|
1368
1415
|
}
|
|
1369
|
-
return (
|
|
1416
|
+
return (i, s, c) => {
|
|
1370
1417
|
if (t === !1)
|
|
1371
1418
|
throw new y(
|
|
1372
|
-
o(
|
|
1419
|
+
o(s, " has been removed" + (n ? " in " + n : "")),
|
|
1373
1420
|
y.ERR_DEPRECATED
|
|
1374
1421
|
);
|
|
1375
|
-
return n &&
|
|
1422
|
+
return n && !it[s] && (it[s] = !0), t ? t(i, s, c) : !0;
|
|
1376
1423
|
};
|
|
1377
1424
|
};
|
|
1378
|
-
|
|
1425
|
+
ye.spelling = function(t) {
|
|
1379
1426
|
return (n, r) => !0;
|
|
1380
1427
|
};
|
|
1381
|
-
function
|
|
1428
|
+
function Ur(e, t, n) {
|
|
1382
1429
|
if (typeof e != "object")
|
|
1383
1430
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1384
1431
|
const r = Object.keys(e);
|
|
1385
1432
|
let o = r.length;
|
|
1386
1433
|
for (; o-- > 0; ) {
|
|
1387
|
-
const
|
|
1388
|
-
if (
|
|
1389
|
-
const c = e[
|
|
1390
|
-
if (
|
|
1391
|
-
throw new y("option " +
|
|
1434
|
+
const i = r[o], s = t[i];
|
|
1435
|
+
if (s) {
|
|
1436
|
+
const c = e[i], d = c === void 0 || s(c, i, e);
|
|
1437
|
+
if (d !== !0)
|
|
1438
|
+
throw new y("option " + i + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
1392
1439
|
continue;
|
|
1393
1440
|
}
|
|
1394
1441
|
if (n !== !0)
|
|
1395
|
-
throw new y("Unknown option " +
|
|
1442
|
+
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1396
1443
|
}
|
|
1397
1444
|
}
|
|
1398
|
-
const
|
|
1399
|
-
assertOptions:
|
|
1400
|
-
validators:
|
|
1401
|
-
},
|
|
1402
|
-
let
|
|
1445
|
+
const le = {
|
|
1446
|
+
assertOptions: Ur,
|
|
1447
|
+
validators: ye
|
|
1448
|
+
}, U = le.validators;
|
|
1449
|
+
let I = class {
|
|
1403
1450
|
constructor(t) {
|
|
1404
1451
|
this.defaults = t || {}, this.interceptors = {
|
|
1405
|
-
request: new
|
|
1406
|
-
response: new
|
|
1452
|
+
request: new Ke(),
|
|
1453
|
+
response: new Ke()
|
|
1407
1454
|
};
|
|
1408
1455
|
}
|
|
1409
1456
|
/**
|
|
@@ -1421,10 +1468,10 @@ let N = class {
|
|
|
1421
1468
|
if (r instanceof Error) {
|
|
1422
1469
|
let o = {};
|
|
1423
1470
|
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1424
|
-
const
|
|
1471
|
+
const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1425
1472
|
try {
|
|
1426
|
-
r.stack ?
|
|
1427
|
-
` +
|
|
1473
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1474
|
+
` + i) : r.stack = i;
|
|
1428
1475
|
} catch {
|
|
1429
1476
|
}
|
|
1430
1477
|
}
|
|
@@ -1432,76 +1479,76 @@ let N = class {
|
|
|
1432
1479
|
}
|
|
1433
1480
|
}
|
|
1434
1481
|
_request(t, n) {
|
|
1435
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1436
|
-
const { transitional: r, paramsSerializer: o, headers:
|
|
1437
|
-
r !== void 0 &&
|
|
1438
|
-
silentJSONParsing:
|
|
1439
|
-
forcedJSONParsing:
|
|
1440
|
-
clarifyTimeoutError:
|
|
1482
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = B(this.defaults, n);
|
|
1483
|
+
const { transitional: r, paramsSerializer: o, headers: i } = n;
|
|
1484
|
+
r !== void 0 && le.assertOptions(r, {
|
|
1485
|
+
silentJSONParsing: U.transitional(U.boolean),
|
|
1486
|
+
forcedJSONParsing: U.transitional(U.boolean),
|
|
1487
|
+
clarifyTimeoutError: U.transitional(U.boolean)
|
|
1441
1488
|
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1442
1489
|
serialize: o
|
|
1443
|
-
} :
|
|
1444
|
-
encode:
|
|
1445
|
-
serialize:
|
|
1446
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1447
|
-
baseUrl:
|
|
1448
|
-
withXsrfToken:
|
|
1490
|
+
} : le.assertOptions(o, {
|
|
1491
|
+
encode: U.function,
|
|
1492
|
+
serialize: U.function
|
|
1493
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), le.assertOptions(n, {
|
|
1494
|
+
baseUrl: U.spelling("baseURL"),
|
|
1495
|
+
withXsrfToken: U.spelling("withXSRFToken")
|
|
1449
1496
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1450
|
-
let
|
|
1451
|
-
|
|
1452
|
-
|
|
1497
|
+
let s = i && a.merge(
|
|
1498
|
+
i.common,
|
|
1499
|
+
i[n.method]
|
|
1453
1500
|
);
|
|
1454
|
-
|
|
1501
|
+
i && a.forEach(
|
|
1455
1502
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1456
|
-
(
|
|
1457
|
-
delete
|
|
1503
|
+
(f) => {
|
|
1504
|
+
delete i[f];
|
|
1458
1505
|
}
|
|
1459
|
-
), n.headers =
|
|
1506
|
+
), n.headers = A.concat(s, i);
|
|
1460
1507
|
const c = [];
|
|
1461
|
-
let
|
|
1508
|
+
let d = !0;
|
|
1462
1509
|
this.interceptors.request.forEach(function(m) {
|
|
1463
|
-
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (
|
|
1510
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (d = d && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1464
1511
|
});
|
|
1465
1512
|
const u = [];
|
|
1466
1513
|
this.interceptors.response.forEach(function(m) {
|
|
1467
1514
|
u.push(m.fulfilled, m.rejected);
|
|
1468
1515
|
});
|
|
1469
|
-
let l,
|
|
1470
|
-
if (!
|
|
1471
|
-
const
|
|
1472
|
-
for (
|
|
1473
|
-
l = l.then(p
|
|
1516
|
+
let l, p = 0, g;
|
|
1517
|
+
if (!d) {
|
|
1518
|
+
const f = [st.bind(this), void 0];
|
|
1519
|
+
for (f.unshift(...c), f.push(...u), g = f.length, l = Promise.resolve(n); p < g; )
|
|
1520
|
+
l = l.then(f[p++], f[p++]);
|
|
1474
1521
|
return l;
|
|
1475
1522
|
}
|
|
1476
|
-
|
|
1477
|
-
let
|
|
1478
|
-
for (
|
|
1479
|
-
const
|
|
1523
|
+
g = c.length;
|
|
1524
|
+
let b = n;
|
|
1525
|
+
for (; p < g; ) {
|
|
1526
|
+
const f = c[p++], m = c[p++];
|
|
1480
1527
|
try {
|
|
1481
|
-
|
|
1528
|
+
b = f(b);
|
|
1482
1529
|
} catch (h) {
|
|
1483
1530
|
m.call(this, h);
|
|
1484
1531
|
break;
|
|
1485
1532
|
}
|
|
1486
1533
|
}
|
|
1487
1534
|
try {
|
|
1488
|
-
l =
|
|
1489
|
-
} catch (
|
|
1490
|
-
return Promise.reject(
|
|
1535
|
+
l = st.call(this, b);
|
|
1536
|
+
} catch (f) {
|
|
1537
|
+
return Promise.reject(f);
|
|
1491
1538
|
}
|
|
1492
|
-
for (
|
|
1493
|
-
l = l.then(u[
|
|
1539
|
+
for (p = 0, g = u.length; p < g; )
|
|
1540
|
+
l = l.then(u[p++], u[p++]);
|
|
1494
1541
|
return l;
|
|
1495
1542
|
}
|
|
1496
1543
|
getUri(t) {
|
|
1497
|
-
t =
|
|
1498
|
-
const n =
|
|
1499
|
-
return
|
|
1544
|
+
t = B(this.defaults, t);
|
|
1545
|
+
const n = It(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1546
|
+
return Lt(n, t.params, t.paramsSerializer);
|
|
1500
1547
|
}
|
|
1501
1548
|
};
|
|
1502
1549
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1503
|
-
|
|
1504
|
-
return this.request(
|
|
1550
|
+
I.prototype[t] = function(n, r) {
|
|
1551
|
+
return this.request(B(r || {}, {
|
|
1505
1552
|
method: t,
|
|
1506
1553
|
url: n,
|
|
1507
1554
|
data: (r || {}).data
|
|
@@ -1510,44 +1557,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1510
1557
|
});
|
|
1511
1558
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1512
1559
|
function n(r) {
|
|
1513
|
-
return function(
|
|
1514
|
-
return this.request(
|
|
1560
|
+
return function(i, s, c) {
|
|
1561
|
+
return this.request(B(c || {}, {
|
|
1515
1562
|
method: t,
|
|
1516
1563
|
headers: r ? {
|
|
1517
1564
|
"Content-Type": "multipart/form-data"
|
|
1518
1565
|
} : {},
|
|
1519
|
-
url:
|
|
1520
|
-
data:
|
|
1566
|
+
url: i,
|
|
1567
|
+
data: s
|
|
1521
1568
|
}));
|
|
1522
1569
|
};
|
|
1523
1570
|
}
|
|
1524
|
-
|
|
1571
|
+
I.prototype[t] = n(), I.prototype[t + "Form"] = n(!0);
|
|
1525
1572
|
});
|
|
1526
|
-
let
|
|
1573
|
+
let Lr = class Ht {
|
|
1527
1574
|
constructor(t) {
|
|
1528
1575
|
if (typeof t != "function")
|
|
1529
1576
|
throw new TypeError("executor must be a function.");
|
|
1530
1577
|
let n;
|
|
1531
|
-
this.promise = new Promise(function(
|
|
1532
|
-
n =
|
|
1578
|
+
this.promise = new Promise(function(i) {
|
|
1579
|
+
n = i;
|
|
1533
1580
|
});
|
|
1534
1581
|
const r = this;
|
|
1535
1582
|
this.promise.then((o) => {
|
|
1536
1583
|
if (!r._listeners) return;
|
|
1537
|
-
let
|
|
1538
|
-
for (;
|
|
1539
|
-
r._listeners[
|
|
1584
|
+
let i = r._listeners.length;
|
|
1585
|
+
for (; i-- > 0; )
|
|
1586
|
+
r._listeners[i](o);
|
|
1540
1587
|
r._listeners = null;
|
|
1541
1588
|
}), this.promise.then = (o) => {
|
|
1542
|
-
let
|
|
1543
|
-
const
|
|
1544
|
-
r.subscribe(c),
|
|
1589
|
+
let i;
|
|
1590
|
+
const s = new Promise((c) => {
|
|
1591
|
+
r.subscribe(c), i = c;
|
|
1545
1592
|
}).then(o);
|
|
1546
|
-
return
|
|
1547
|
-
r.unsubscribe(
|
|
1548
|
-
},
|
|
1549
|
-
}, t(function(
|
|
1550
|
-
r.reason || (r.reason = new
|
|
1593
|
+
return s.cancel = function() {
|
|
1594
|
+
r.unsubscribe(i);
|
|
1595
|
+
}, s;
|
|
1596
|
+
}, t(function(i, s, c) {
|
|
1597
|
+
r.reason || (r.reason = new M(i, s, c), n(r.reason));
|
|
1551
1598
|
});
|
|
1552
1599
|
}
|
|
1553
1600
|
/**
|
|
@@ -1589,22 +1636,22 @@ let mr = class At {
|
|
|
1589
1636
|
static source() {
|
|
1590
1637
|
let t;
|
|
1591
1638
|
return {
|
|
1592
|
-
token: new
|
|
1639
|
+
token: new Ht(function(o) {
|
|
1593
1640
|
t = o;
|
|
1594
1641
|
}),
|
|
1595
1642
|
cancel: t
|
|
1596
1643
|
};
|
|
1597
1644
|
}
|
|
1598
1645
|
};
|
|
1599
|
-
function
|
|
1646
|
+
function Nr(e) {
|
|
1600
1647
|
return function(n) {
|
|
1601
1648
|
return e.apply(null, n);
|
|
1602
1649
|
};
|
|
1603
1650
|
}
|
|
1604
|
-
function
|
|
1651
|
+
function Fr(e) {
|
|
1605
1652
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1606
1653
|
}
|
|
1607
|
-
const
|
|
1654
|
+
const xe = {
|
|
1608
1655
|
Continue: 100,
|
|
1609
1656
|
SwitchingProtocols: 101,
|
|
1610
1657
|
Processing: 102,
|
|
@@ -1667,57 +1714,63 @@ const Ee = {
|
|
|
1667
1714
|
InsufficientStorage: 507,
|
|
1668
1715
|
LoopDetected: 508,
|
|
1669
1716
|
NotExtended: 510,
|
|
1670
|
-
NetworkAuthenticationRequired: 511
|
|
1717
|
+
NetworkAuthenticationRequired: 511,
|
|
1718
|
+
WebServerIsDown: 521,
|
|
1719
|
+
ConnectionTimedOut: 522,
|
|
1720
|
+
OriginIsUnreachable: 523,
|
|
1721
|
+
TimeoutOccurred: 524,
|
|
1722
|
+
SslHandshakeFailed: 525,
|
|
1723
|
+
InvalidSslCertificate: 526
|
|
1671
1724
|
};
|
|
1672
|
-
Object.entries(
|
|
1673
|
-
|
|
1725
|
+
Object.entries(xe).forEach(([e, t]) => {
|
|
1726
|
+
xe[t] = e;
|
|
1674
1727
|
});
|
|
1675
|
-
function
|
|
1676
|
-
const t = new
|
|
1677
|
-
return a.extend(n,
|
|
1678
|
-
return
|
|
1728
|
+
function Mt(e) {
|
|
1729
|
+
const t = new I(e), n = Et(I.prototype.request, t);
|
|
1730
|
+
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1731
|
+
return Mt(B(e, o));
|
|
1679
1732
|
}, n;
|
|
1680
1733
|
}
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1734
|
+
const w = Mt(ee);
|
|
1735
|
+
w.Axios = I;
|
|
1736
|
+
w.CanceledError = M;
|
|
1737
|
+
w.CancelToken = Lr;
|
|
1738
|
+
w.isCancel = vt;
|
|
1739
|
+
w.VERSION = $t;
|
|
1740
|
+
w.toFormData = me;
|
|
1741
|
+
w.AxiosError = y;
|
|
1742
|
+
w.Cancel = w.CanceledError;
|
|
1743
|
+
w.all = function(t) {
|
|
1691
1744
|
return Promise.all(t);
|
|
1692
1745
|
};
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1746
|
+
w.spread = Nr;
|
|
1747
|
+
w.isAxiosError = Fr;
|
|
1748
|
+
w.mergeConfig = B;
|
|
1749
|
+
w.AxiosHeaders = A;
|
|
1750
|
+
w.formToJSON = (e) => Ft(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1751
|
+
w.getAdapter = qt.getAdapter;
|
|
1752
|
+
w.HttpStatusCode = xe;
|
|
1753
|
+
w.default = w;
|
|
1701
1754
|
const {
|
|
1702
|
-
Axios:
|
|
1703
|
-
AxiosError:
|
|
1704
|
-
CanceledError:
|
|
1705
|
-
isCancel:
|
|
1706
|
-
CancelToken:
|
|
1707
|
-
VERSION:
|
|
1708
|
-
all:
|
|
1709
|
-
Cancel:
|
|
1710
|
-
isAxiosError:
|
|
1711
|
-
spread:
|
|
1712
|
-
toFormData:
|
|
1713
|
-
AxiosHeaders:
|
|
1714
|
-
HttpStatusCode:
|
|
1715
|
-
formToJSON:
|
|
1716
|
-
getAdapter:
|
|
1717
|
-
mergeConfig:
|
|
1718
|
-
} =
|
|
1755
|
+
Axios: ho,
|
|
1756
|
+
AxiosError: mo,
|
|
1757
|
+
CanceledError: yo,
|
|
1758
|
+
isCancel: go,
|
|
1759
|
+
CancelToken: wo,
|
|
1760
|
+
VERSION: bo,
|
|
1761
|
+
all: Eo,
|
|
1762
|
+
Cancel: So,
|
|
1763
|
+
isAxiosError: Ro,
|
|
1764
|
+
spread: To,
|
|
1765
|
+
toFormData: Oo,
|
|
1766
|
+
AxiosHeaders: Ao,
|
|
1767
|
+
HttpStatusCode: _o,
|
|
1768
|
+
formToJSON: Co,
|
|
1769
|
+
getAdapter: xo,
|
|
1770
|
+
mergeConfig: ko
|
|
1771
|
+
} = w;
|
|
1719
1772
|
/*! js-cookie v3.0.5 | MIT */
|
|
1720
|
-
function
|
|
1773
|
+
function se(e) {
|
|
1721
1774
|
for (var t = 1; t < arguments.length; t++) {
|
|
1722
1775
|
var n = arguments[t];
|
|
1723
1776
|
for (var r in n)
|
|
@@ -1725,7 +1778,7 @@ function Z(e) {
|
|
|
1725
1778
|
}
|
|
1726
1779
|
return e;
|
|
1727
1780
|
}
|
|
1728
|
-
var
|
|
1781
|
+
var vr = {
|
|
1729
1782
|
read: function(e) {
|
|
1730
1783
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1731
1784
|
},
|
|
@@ -1736,48 +1789,48 @@ var gr = {
|
|
|
1736
1789
|
);
|
|
1737
1790
|
}
|
|
1738
1791
|
};
|
|
1739
|
-
function
|
|
1740
|
-
function n(o,
|
|
1792
|
+
function ke(e, t) {
|
|
1793
|
+
function n(o, i, s) {
|
|
1741
1794
|
if (!(typeof document > "u")) {
|
|
1742
|
-
|
|
1795
|
+
s = se({}, t, s), typeof s.expires == "number" && (s.expires = new Date(Date.now() + s.expires * 864e5)), s.expires && (s.expires = s.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1743
1796
|
var c = "";
|
|
1744
|
-
for (var
|
|
1745
|
-
|
|
1746
|
-
return document.cookie = o + "=" + e.write(
|
|
1797
|
+
for (var d in s)
|
|
1798
|
+
s[d] && (c += "; " + d, s[d] !== !0 && (c += "=" + s[d].split(";")[0]));
|
|
1799
|
+
return document.cookie = o + "=" + e.write(i, o) + c;
|
|
1747
1800
|
}
|
|
1748
1801
|
}
|
|
1749
1802
|
function r(o) {
|
|
1750
1803
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
1751
|
-
for (var
|
|
1752
|
-
var
|
|
1804
|
+
for (var i = document.cookie ? document.cookie.split("; ") : [], s = {}, c = 0; c < i.length; c++) {
|
|
1805
|
+
var d = i[c].split("="), u = d.slice(1).join("=");
|
|
1753
1806
|
try {
|
|
1754
|
-
var l = decodeURIComponent(
|
|
1755
|
-
if (
|
|
1807
|
+
var l = decodeURIComponent(d[0]);
|
|
1808
|
+
if (s[l] = e.read(u, l), o === l)
|
|
1756
1809
|
break;
|
|
1757
1810
|
} catch {
|
|
1758
1811
|
}
|
|
1759
1812
|
}
|
|
1760
|
-
return o ?
|
|
1813
|
+
return o ? s[o] : s;
|
|
1761
1814
|
}
|
|
1762
1815
|
}
|
|
1763
1816
|
return Object.create(
|
|
1764
1817
|
{
|
|
1765
1818
|
set: n,
|
|
1766
1819
|
get: r,
|
|
1767
|
-
remove: function(o,
|
|
1820
|
+
remove: function(o, i) {
|
|
1768
1821
|
n(
|
|
1769
1822
|
o,
|
|
1770
1823
|
"",
|
|
1771
|
-
|
|
1824
|
+
se({}, i, {
|
|
1772
1825
|
expires: -1
|
|
1773
1826
|
})
|
|
1774
1827
|
);
|
|
1775
1828
|
},
|
|
1776
1829
|
withAttributes: function(o) {
|
|
1777
|
-
return
|
|
1830
|
+
return ke(this.converter, se({}, this.attributes, o));
|
|
1778
1831
|
},
|
|
1779
1832
|
withConverter: function(o) {
|
|
1780
|
-
return
|
|
1833
|
+
return ke(se({}, this.converter, o), this.attributes);
|
|
1781
1834
|
}
|
|
1782
1835
|
},
|
|
1783
1836
|
{
|
|
@@ -1786,99 +1839,99 @@ function Se(e, t) {
|
|
|
1786
1839
|
}
|
|
1787
1840
|
);
|
|
1788
1841
|
}
|
|
1789
|
-
var
|
|
1790
|
-
const
|
|
1842
|
+
var Dr = ke(vr, { path: "/" }), at;
|
|
1843
|
+
const zt = typeof window < "u", Ir = (e) => typeof e == "string", ct = () => +Date.now(), Pe = () => {
|
|
1791
1844
|
};
|
|
1792
|
-
|
|
1793
|
-
function
|
|
1794
|
-
return typeof e == "function" ? e() :
|
|
1845
|
+
zt && ((at = window == null ? void 0 : window.navigator) != null && at.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1846
|
+
function Be(e) {
|
|
1847
|
+
return typeof e == "function" ? e() : Gt(e);
|
|
1795
1848
|
}
|
|
1796
|
-
function
|
|
1849
|
+
function Br(e, t) {
|
|
1797
1850
|
function n(...r) {
|
|
1798
|
-
return new Promise((o,
|
|
1799
|
-
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(
|
|
1851
|
+
return new Promise((o, i) => {
|
|
1852
|
+
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(i);
|
|
1800
1853
|
});
|
|
1801
1854
|
}
|
|
1802
1855
|
return n;
|
|
1803
1856
|
}
|
|
1804
|
-
function
|
|
1805
|
-
let o = 0,
|
|
1857
|
+
function jr(e, t = !0, n = !0, r = !1) {
|
|
1858
|
+
let o = 0, i, s = !0, c = Pe, d;
|
|
1806
1859
|
const u = () => {
|
|
1807
|
-
|
|
1860
|
+
i && (clearTimeout(i), i = void 0, c(), c = Pe);
|
|
1808
1861
|
};
|
|
1809
|
-
return (
|
|
1810
|
-
const
|
|
1811
|
-
return u(),
|
|
1812
|
-
c = r ? h : m,
|
|
1813
|
-
o = Date.now(),
|
|
1814
|
-
}, Math.max(0,
|
|
1815
|
-
})), !n && !
|
|
1862
|
+
return (p) => {
|
|
1863
|
+
const g = Be(e), b = Date.now() - o, f = () => d = p();
|
|
1864
|
+
return u(), g <= 0 ? (o = Date.now(), f()) : (b > g && (n || !s) ? (o = Date.now(), f()) : t && (d = new Promise((m, h) => {
|
|
1865
|
+
c = r ? h : m, i = setTimeout(() => {
|
|
1866
|
+
o = Date.now(), s = !0, m(f()), u();
|
|
1867
|
+
}, Math.max(0, g - b));
|
|
1868
|
+
})), !n && !i && (i = setTimeout(() => s = !0, g)), s = !1, d);
|
|
1816
1869
|
};
|
|
1817
1870
|
}
|
|
1818
|
-
function
|
|
1871
|
+
function qr(e) {
|
|
1819
1872
|
return e;
|
|
1820
1873
|
}
|
|
1821
|
-
function
|
|
1822
|
-
return
|
|
1874
|
+
function $r(e) {
|
|
1875
|
+
return Zt() ? (Yt(e), !0) : !1;
|
|
1823
1876
|
}
|
|
1824
|
-
function
|
|
1877
|
+
function Hr(e) {
|
|
1825
1878
|
var t;
|
|
1826
|
-
const n =
|
|
1879
|
+
const n = Be(e);
|
|
1827
1880
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1828
1881
|
}
|
|
1829
|
-
const
|
|
1830
|
-
function
|
|
1882
|
+
const Jt = zt ? window : void 0;
|
|
1883
|
+
function lt(...e) {
|
|
1831
1884
|
let t, n, r, o;
|
|
1832
|
-
if (
|
|
1833
|
-
return
|
|
1885
|
+
if (Ir(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Jt) : [t, n, r, o] = e, !t)
|
|
1886
|
+
return Pe;
|
|
1834
1887
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1835
|
-
const
|
|
1836
|
-
|
|
1837
|
-
}, c = (l,
|
|
1838
|
-
|
|
1888
|
+
const i = [], s = () => {
|
|
1889
|
+
i.forEach((l) => l()), i.length = 0;
|
|
1890
|
+
}, c = (l, p, g, b) => (l.addEventListener(p, g, b), () => l.removeEventListener(p, g, b)), d = Le(() => [Hr(t), Be(o)], ([l, p]) => {
|
|
1891
|
+
s(), l && i.push(...n.flatMap((g) => r.map((b) => c(l, g, b, p))));
|
|
1839
1892
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
1840
|
-
|
|
1893
|
+
d(), s();
|
|
1841
1894
|
};
|
|
1842
|
-
return
|
|
1895
|
+
return $r(u), u;
|
|
1843
1896
|
}
|
|
1844
|
-
const
|
|
1845
|
-
|
|
1846
|
-
const
|
|
1847
|
-
function
|
|
1897
|
+
const ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ft = "__vueuse_ssr_handlers__";
|
|
1898
|
+
ut[ft] = ut[ft] || {};
|
|
1899
|
+
const Mr = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], zr = 6e4;
|
|
1900
|
+
function Jr(e = zr, t = {}) {
|
|
1848
1901
|
const {
|
|
1849
1902
|
initialState: n = !1,
|
|
1850
1903
|
listenForVisibilityChange: r = !0,
|
|
1851
|
-
events: o =
|
|
1852
|
-
window:
|
|
1853
|
-
eventFilter:
|
|
1854
|
-
} = t, c =
|
|
1904
|
+
events: o = Mr,
|
|
1905
|
+
window: i = Jt,
|
|
1906
|
+
eventFilter: s = jr(50)
|
|
1907
|
+
} = t, c = ue(n), d = ue(ct());
|
|
1855
1908
|
let u;
|
|
1856
|
-
const l =
|
|
1857
|
-
c.value = !1,
|
|
1909
|
+
const l = Br(s, () => {
|
|
1910
|
+
c.value = !1, d.value = ct(), clearTimeout(u), u = setTimeout(() => c.value = !0, e);
|
|
1858
1911
|
});
|
|
1859
|
-
if (
|
|
1860
|
-
const
|
|
1861
|
-
for (const
|
|
1862
|
-
|
|
1863
|
-
r &&
|
|
1864
|
-
|
|
1912
|
+
if (i) {
|
|
1913
|
+
const p = i.document;
|
|
1914
|
+
for (const g of o)
|
|
1915
|
+
lt(i, g, l, { passive: !0 });
|
|
1916
|
+
r && lt(p, "visibilitychange", () => {
|
|
1917
|
+
p.hidden || l();
|
|
1865
1918
|
});
|
|
1866
1919
|
}
|
|
1867
|
-
return u = setTimeout(() => c.value = !0, e), { idle: c, lastActive:
|
|
1920
|
+
return u = setTimeout(() => c.value = !0, e), { idle: c, lastActive: d };
|
|
1868
1921
|
}
|
|
1869
|
-
var
|
|
1922
|
+
var dt;
|
|
1870
1923
|
(function(e) {
|
|
1871
1924
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1872
|
-
})(
|
|
1873
|
-
var
|
|
1925
|
+
})(dt || (dt = {}));
|
|
1926
|
+
var Vr = Object.defineProperty, pt = Object.getOwnPropertySymbols, Wr = Object.prototype.hasOwnProperty, Kr = Object.prototype.propertyIsEnumerable, ht = (e, t, n) => t in e ? Vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Qr = (e, t) => {
|
|
1874
1927
|
for (var n in t || (t = {}))
|
|
1875
|
-
|
|
1876
|
-
if (
|
|
1877
|
-
for (var n of
|
|
1878
|
-
|
|
1928
|
+
Wr.call(t, n) && ht(e, n, t[n]);
|
|
1929
|
+
if (pt)
|
|
1930
|
+
for (var n of pt(t))
|
|
1931
|
+
Kr.call(t, n) && ht(e, n, t[n]);
|
|
1879
1932
|
return e;
|
|
1880
1933
|
};
|
|
1881
|
-
const
|
|
1934
|
+
const Xr = {
|
|
1882
1935
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1883
1936
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1884
1937
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1904,27 +1957,27 @@ const Nr = {
|
|
|
1904
1957
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1905
1958
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1906
1959
|
};
|
|
1907
|
-
|
|
1908
|
-
linear:
|
|
1909
|
-
},
|
|
1910
|
-
let
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1960
|
+
Qr({
|
|
1961
|
+
linear: qr
|
|
1962
|
+
}, Xr);
|
|
1963
|
+
let Ue;
|
|
1964
|
+
const Vt = { triggerProxySso: "triggerProxySso" }, Gr = () => {
|
|
1965
|
+
Ue = (e) => {
|
|
1913
1966
|
var n;
|
|
1914
1967
|
const { origin: t } = new URL(location.href);
|
|
1915
1968
|
(n = window.top) == null || n.postMessage(
|
|
1916
|
-
{ type:
|
|
1969
|
+
{ type: Vt.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
|
|
1917
1970
|
t
|
|
1918
1971
|
);
|
|
1919
1972
|
};
|
|
1920
|
-
},
|
|
1973
|
+
}, Zr = (e) => {
|
|
1921
1974
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1922
1975
|
const { type: n, data: r } = t.data;
|
|
1923
|
-
n ===
|
|
1976
|
+
n === Vt.triggerProxySso && (e == null || e(r));
|
|
1924
1977
|
});
|
|
1925
1978
|
};
|
|
1926
|
-
window.top !== window.self &&
|
|
1927
|
-
let
|
|
1979
|
+
window.top !== window.self && Gr();
|
|
1980
|
+
let Wt = (e = 21) => {
|
|
1928
1981
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1929
1982
|
for (; e--; ) {
|
|
1930
1983
|
let r = n[e] & 63;
|
|
@@ -1932,145 +1985,155 @@ let Pt = (e = 21) => {
|
|
|
1932
1985
|
}
|
|
1933
1986
|
return t;
|
|
1934
1987
|
};
|
|
1935
|
-
const
|
|
1988
|
+
const ie = (e) => new URL(location.href).searchParams.get(e), $ = {
|
|
1936
1989
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1937
1990
|
// 重定向到登录页
|
|
1938
1991
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1939
1992
|
// 清除登录信息
|
|
1940
1993
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1941
1994
|
// 通过code获取token
|
|
1942
|
-
}, { baseURL:
|
|
1995
|
+
}, { baseURL: mt, noRedireLogin: Yr = !1 } = Ne(), W = location.origin + "/home", K = {
|
|
1943
1996
|
response_type: "code",
|
|
1944
1997
|
scope: "sever",
|
|
1945
1998
|
client_id: "sys",
|
|
1946
|
-
client_secret:
|
|
1999
|
+
client_secret: en("das123"),
|
|
1947
2000
|
state: +/* @__PURE__ */ new Date()
|
|
1948
|
-
},
|
|
2001
|
+
}, yt = (e) => {
|
|
1949
2002
|
const t = new URL(window.location.href), n = new URLSearchParams(t.search);
|
|
1950
2003
|
e.forEach((r) => {
|
|
1951
2004
|
n.delete(r);
|
|
1952
2005
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1953
|
-
},
|
|
2006
|
+
}, Kt = ue(!1), Qt = (e) => {
|
|
1954
2007
|
if (e <= 0) return;
|
|
1955
|
-
const { idle: t } =
|
|
1956
|
-
|
|
2008
|
+
const { idle: t } = Jr(e);
|
|
2009
|
+
Le(
|
|
1957
2010
|
() => t.value,
|
|
1958
2011
|
(n) => {
|
|
1959
|
-
n === !0 && (
|
|
2012
|
+
n === !0 && (Kt.value = !0);
|
|
1960
2013
|
}
|
|
1961
2014
|
);
|
|
1962
2015
|
};
|
|
1963
|
-
localStorage.getItem("idelTime") &&
|
|
1964
|
-
let
|
|
1965
|
-
const
|
|
1966
|
-
const e =
|
|
1967
|
-
if (!e) return
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
et = e, Ye(["code", "state", "kingdee_token", "redirect_url", "loginType"]);
|
|
2016
|
+
localStorage.getItem("idelTime") && Qt(Number(localStorage.getItem("idelTime")));
|
|
2017
|
+
let gt = "";
|
|
2018
|
+
const eo = async () => {
|
|
2019
|
+
const e = ie("code") || "", t = ie("redirect_url") || "/", n = ie("kingdee_token") || "", r = ie("loginType") || "";
|
|
2020
|
+
if (r && localStorage.setItem("loginType", r), !e) return Q();
|
|
2021
|
+
if (e === gt)
|
|
2022
|
+
return yt(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), Q();
|
|
2023
|
+
gt = e, yt(["code", "state", "kingdee_token", "redirect_url"]);
|
|
1972
2024
|
let o = {};
|
|
1973
|
-
const
|
|
2025
|
+
const i = {
|
|
1974
2026
|
grant_type: "authorization_code",
|
|
1975
2027
|
code: e,
|
|
1976
|
-
client_id:
|
|
1977
|
-
client_secret:
|
|
1978
|
-
redirect_uri:
|
|
2028
|
+
client_id: K.client_id,
|
|
2029
|
+
client_secret: K.client_secret,
|
|
2030
|
+
redirect_uri: r ? wt(W, { loginType: r }) : W,
|
|
1979
2031
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1980
|
-
nonce:
|
|
2032
|
+
nonce: Wt()
|
|
1981
2033
|
};
|
|
1982
|
-
n && (sessionStorage.setItem("kingdee_token", n),
|
|
2034
|
+
n && (sessionStorage.setItem("kingdee_token", n), i.redirect_uri = `${i.redirect_uri}?kingdee_token=${n}`);
|
|
1983
2035
|
try {
|
|
1984
|
-
await
|
|
2036
|
+
await w.create().get($.token, { baseURL: mt });
|
|
1985
2037
|
} catch {
|
|
1986
2038
|
}
|
|
1987
2039
|
try {
|
|
1988
|
-
o = await
|
|
1989
|
-
|
|
2040
|
+
o = await w.create().post(
|
|
2041
|
+
$.token,
|
|
1990
2042
|
{},
|
|
1991
2043
|
{
|
|
1992
|
-
baseURL:
|
|
1993
|
-
params:
|
|
2044
|
+
baseURL: mt,
|
|
2045
|
+
params: i,
|
|
1994
2046
|
headers: {
|
|
1995
2047
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
1996
|
-
"csrf-token":
|
|
2048
|
+
"csrf-token": Dr.get("csrf-token")
|
|
1997
2049
|
}
|
|
1998
2050
|
}
|
|
1999
2051
|
);
|
|
2000
|
-
const { access_token:
|
|
2001
|
-
accessToken:
|
|
2052
|
+
const { access_token: s = "", expires_in: c = 0, refresh_token: d = "", refresh_exp: u = 0 } = o.data, l = {
|
|
2053
|
+
accessToken: s,
|
|
2002
2054
|
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(c) * 1e3,
|
|
2003
|
-
refreshToken:
|
|
2055
|
+
refreshToken: d,
|
|
2004
2056
|
info: o.data
|
|
2005
2057
|
};
|
|
2006
|
-
|
|
2007
|
-
const
|
|
2008
|
-
return
|
|
2058
|
+
X().save(l), await bt(s);
|
|
2059
|
+
const p = Number(u) - (/* @__PURE__ */ new Date()).getTime();
|
|
2060
|
+
return p && p > 0 && (Qt(p), p && localStorage.setItem("idelTime", p.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), s;
|
|
2009
2061
|
} catch {
|
|
2010
|
-
return
|
|
2062
|
+
return ge({ ...K, redirect_uri: W });
|
|
2011
2063
|
}
|
|
2012
|
-
},
|
|
2064
|
+
}, V = ue(!1), Po = async (e) => {
|
|
2013
2065
|
if (e.public) return "";
|
|
2014
|
-
if (
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
(
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2066
|
+
if (Kt.value)
|
|
2067
|
+
return ge({ ...K, redirect_uri: W });
|
|
2068
|
+
if (V.value)
|
|
2069
|
+
return await new Promise(async (r) => {
|
|
2070
|
+
Le(
|
|
2071
|
+
() => V.value,
|
|
2072
|
+
(o) => {
|
|
2073
|
+
if (!o) {
|
|
2074
|
+
const i = Q();
|
|
2075
|
+
r(i);
|
|
2023
2076
|
}
|
|
2024
2077
|
}
|
|
2025
2078
|
);
|
|
2026
2079
|
});
|
|
2027
|
-
const { accessTokenExpiredAt: t } =
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
let r = D();
|
|
2031
|
-
H.value = !0;
|
|
2080
|
+
const { accessTokenExpiredAt: t } = X().getData();
|
|
2081
|
+
let n = Q();
|
|
2082
|
+
V.value = !0;
|
|
2032
2083
|
try {
|
|
2033
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (
|
|
2084
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (n = await ro(K)), n = await eo(), V.value = !1;
|
|
2034
2085
|
} catch {
|
|
2035
|
-
|
|
2086
|
+
V.value = !1;
|
|
2036
2087
|
}
|
|
2037
|
-
return
|
|
2038
|
-
},
|
|
2088
|
+
return n;
|
|
2089
|
+
}, to = () => {
|
|
2039
2090
|
let e = !1;
|
|
2040
2091
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
2041
|
-
},
|
|
2092
|
+
}, no = (e) => {
|
|
2042
2093
|
if (localStorage.getItem("thirdLogouSource") === "zhongshen") {
|
|
2043
2094
|
const r = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2044
2095
|
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
2045
2096
|
}
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
if (Re) return Re(t);
|
|
2052
|
-
t.logout = "true", o && (t.locale = "locale");
|
|
2053
|
-
const s = Object.keys(t).filter((c) => c !== "client_secret").map((c) => `${c}=${t[c]}`).join("&"), i = `${r}${I.oauth}?${s}`;
|
|
2054
|
-
if (localStorage.removeItem("idelTime"), localStorage.removeItem("loginType"), sessionStorage.clear(), V().remove(), jr())
|
|
2055
|
-
qr(i);
|
|
2056
|
-
else {
|
|
2097
|
+
};
|
|
2098
|
+
let Oe = !1;
|
|
2099
|
+
const ge = (e) => {
|
|
2100
|
+
if (!Yr && !Oe) {
|
|
2101
|
+
Oe = !0;
|
|
2057
2102
|
try {
|
|
2058
|
-
|
|
2059
|
-
|
|
2103
|
+
const t = { ...e }, n = localStorage.getItem("loginType") || "";
|
|
2104
|
+
n && (t.redirect_uri = wt(t.redirect_uri, { loginType: n }));
|
|
2105
|
+
const { baseURL: r, ssoLocale: o } = Ne();
|
|
2106
|
+
if (Ue) return Ue(t);
|
|
2107
|
+
t.logout = "true", o && (t.locale = "locale");
|
|
2108
|
+
const i = new URLSearchParams();
|
|
2109
|
+
Object.entries(t).forEach(([d, u]) => {
|
|
2110
|
+
d !== "client_secret" && i.set(d, String(u));
|
|
2111
|
+
});
|
|
2112
|
+
const s = i.toString(), c = `${r}${$.oauth}?${s}`;
|
|
2113
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), X().remove(), to())
|
|
2114
|
+
no(c);
|
|
2115
|
+
else {
|
|
2116
|
+
try {
|
|
2117
|
+
w.create().get($.logoutCurpage, { baseURL: r });
|
|
2118
|
+
} catch {
|
|
2119
|
+
}
|
|
2120
|
+
window.__isAutoCloseApp = !1, location.replace(c);
|
|
2121
|
+
}
|
|
2122
|
+
} finally {
|
|
2123
|
+
Oe = !1;
|
|
2060
2124
|
}
|
|
2061
|
-
window.__isAutoCloseApp = !1, location.replace(i);
|
|
2062
2125
|
}
|
|
2063
2126
|
};
|
|
2064
|
-
|
|
2065
|
-
const
|
|
2066
|
-
const { baseURL: t } =
|
|
2127
|
+
Zr(ge);
|
|
2128
|
+
const ro = async (e) => {
|
|
2129
|
+
const { baseURL: t } = Ne(), { refreshToken: n } = X().getData();
|
|
2067
2130
|
try {
|
|
2068
|
-
await
|
|
2131
|
+
await w.create().get($.token, { baseURL: t });
|
|
2069
2132
|
} catch {
|
|
2070
2133
|
}
|
|
2071
2134
|
try {
|
|
2072
|
-
const r = await
|
|
2073
|
-
|
|
2135
|
+
const r = await w.create().post(
|
|
2136
|
+
$.token,
|
|
2074
2137
|
{},
|
|
2075
2138
|
{
|
|
2076
2139
|
baseURL: t,
|
|
@@ -2080,41 +2143,41 @@ const Hr = async (e) => {
|
|
|
2080
2143
|
client_id: e.client_id,
|
|
2081
2144
|
client_secret: e.client_secret,
|
|
2082
2145
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2083
|
-
nonce:
|
|
2146
|
+
nonce: Wt()
|
|
2084
2147
|
}
|
|
2085
2148
|
}
|
|
2086
|
-
), { access_token: o = "", expires_in:
|
|
2149
|
+
), { access_token: o = "", expires_in: i = 0, refresh_token: s = "" } = r.data, c = {
|
|
2087
2150
|
accessToken: o,
|
|
2088
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(
|
|
2089
|
-
refreshToken:
|
|
2151
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(i) * 1e3,
|
|
2152
|
+
refreshToken: s,
|
|
2090
2153
|
info: r.data
|
|
2091
2154
|
};
|
|
2092
|
-
return
|
|
2155
|
+
return X().save(c), await bt(o), o;
|
|
2093
2156
|
} catch {
|
|
2094
|
-
return
|
|
2157
|
+
return ge({ ...e, redirect_uri: W });
|
|
2095
2158
|
}
|
|
2096
|
-
},
|
|
2159
|
+
}, X = () => ({
|
|
2097
2160
|
getData: () => ({
|
|
2098
|
-
accessToken:
|
|
2099
|
-
accessTokenExpiredAt:
|
|
2100
|
-
refreshToken:
|
|
2161
|
+
accessToken: Q(),
|
|
2162
|
+
accessTokenExpiredAt: Ee("accessTokenExpiredAt") ? Number(Ee("accessTokenExpiredAt")) : "",
|
|
2163
|
+
refreshToken: Ee("refreshToken")
|
|
2101
2164
|
}),
|
|
2102
2165
|
save: (e) => {
|
|
2103
|
-
|
|
2166
|
+
nn(e.accessToken ?? "", {
|
|
2104
2167
|
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
2105
2168
|
refreshToken: e.refreshToken
|
|
2106
|
-
}),
|
|
2169
|
+
}), on(e);
|
|
2107
2170
|
},
|
|
2108
2171
|
remove: () => {
|
|
2109
|
-
|
|
2172
|
+
tn(), rn();
|
|
2110
2173
|
}
|
|
2111
2174
|
});
|
|
2112
2175
|
export {
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2176
|
+
ie as getQuery,
|
|
2177
|
+
Po as getToken,
|
|
2178
|
+
eo as getTokenFromCode,
|
|
2179
|
+
K as getTokenParams,
|
|
2180
|
+
ge as login,
|
|
2181
|
+
W as real_uri,
|
|
2182
|
+
X as tokenStorage
|
|
2120
2183
|
};
|