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