@das-fed/utils 7.1.0-dev.3 → 7.1.0-dev.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/api-services/index.js +994 -958
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +487 -470
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +487 -470
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +486 -469
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +753 -718
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +856 -857
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +487 -470
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +844 -809
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +487 -470
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +863 -845
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +1001 -966
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.d.ts +1 -1
  24. package/api-services/modules/justauth/index.js +757 -721
  25. package/api-services/modules/justauth/index.js.gz +0 -0
  26. package/api-services/modules/knowledge/index.js +487 -470
  27. package/api-services/modules/knowledge/index.js.gz +0 -0
  28. package/api-services/modules/link/index.js +487 -470
  29. package/api-services/modules/link/index.js.gz +0 -0
  30. package/api-services/modules/permission/index.js +851 -852
  31. package/api-services/modules/permission/index.js.gz +0 -0
  32. package/api-services/modules/platformManage/index.js +753 -718
  33. package/api-services/modules/platformManage/index.js.gz +0 -0
  34. package/api-services/modules/portal/index.js +487 -470
  35. package/api-services/modules/portal/index.js.gz +0 -0
  36. package/api-services/modules/space-manage/index.js +487 -470
  37. package/api-services/modules/space-manage/index.js.gz +0 -0
  38. package/api-services/modules/super-admin/index.js +757 -722
  39. package/api-services/modules/super-admin/index.js.gz +0 -0
  40. package/api-services/modules/supplier/index.js +757 -722
  41. package/api-services/modules/supplier/index.js.gz +0 -0
  42. package/api-services/modules/supplychain-manage/index.js +753 -718
  43. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  44. package/api-services/modules/systemConfiguration/index.js +487 -470
  45. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  46. package/api-services/modules/tool/index.js +487 -470
  47. package/api-services/modules/tool/index.js.gz +0 -0
  48. package/api-services/src/create-service/index.js +728 -693
  49. package/api-services/src/create-service/index.js.gz +0 -0
  50. package/common-info/index.d.ts +1 -1
  51. package/common-tools/platform-tools/index.d.ts +7 -2
  52. package/common-tools/platform-tools/index.js +27 -15
  53. package/common-tools/platform-tools/index.js.gz +0 -0
  54. package/create-api-service/index.js +850 -851
  55. package/create-api-service/index.js.gz +0 -0
  56. package/create-api-service/sso/authorizer.d.ts +1 -0
  57. package/create-api-service/sso/index.d.ts +13 -17
  58. package/create-api-service/sso/index.js +892 -784
  59. package/create-api-service/sso/index.js.gz +0 -0
  60. package/create-api-service/sso/utils.d.ts +8 -0
  61. package/create-api-service/thirdLogout/index.js +1857 -0
  62. package/create-api-service/thirdLogout/index.js.gz +0 -0
  63. package/create-api-service/thirdLogout/sso/utils.d.ts +8 -0
  64. package/create-api-service/thirdLogout/thirdLogout/index.d.ts +19 -0
  65. package/create-api-service/unauthorized-recovery/index.d.ts +36 -0
  66. package/create-api-service/unauthorized-recovery/index.js +16 -0
  67. package/curring-http/type.d.ts +6 -0
  68. package/esm-map.json +12 -1
  69. package/package.json +4 -4
  70. package/token-tools/index.d.ts +37 -1
  71. package/token-tools/index.js +59 -25
  72. package/token-tools/index.js.gz +0 -0
@@ -0,0 +1,1857 @@
1
+ import { getConfig as Fe } from "@das-fed/utils/config";
2
+ import { clearPlatformAuthStorage as ke, getAccessToken as ut } from "@das-fed/utils/token-tools";
3
+ function Be(e, t) {
4
+ return function() {
5
+ return e.apply(t, arguments);
6
+ };
7
+ }
8
+ const { toString: lt } = Object.prototype, { getPrototypeOf: pe } = Object, { iterator: X, toStringTag: De } = Symbol, Q = /* @__PURE__ */ ((e) => (t) => {
9
+ const n = lt.call(t);
10
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
11
+ })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => Q(t) === e), Y = (e) => (t) => typeof t === e, { isArray: B } = Array, I = Y("undefined");
12
+ function q(e) {
13
+ return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
14
+ }
15
+ const je = x("ArrayBuffer");
16
+ function ft(e) {
17
+ let t;
18
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
19
+ }
20
+ const dt = Y("string"), A = Y("function"), Ie = Y("number"), M = (e) => e !== null && typeof e == "object", pt = (e) => e === !0 || e === !1, J = (e) => {
21
+ if (Q(e) !== "object")
22
+ return !1;
23
+ const t = pe(e);
24
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(De in e) && !(X in e);
25
+ }, ht = (e) => {
26
+ if (!M(e) || q(e))
27
+ return !1;
28
+ try {
29
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
30
+ } catch {
31
+ return !1;
32
+ }
33
+ }, mt = x("Date"), yt = x("File"), wt = x("Blob"), gt = x("FileList"), bt = (e) => M(e) && A(e.pipe), Et = (e) => {
34
+ let t;
35
+ return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = Q(e)) === "formdata" || // detect form-data instance
36
+ t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
37
+ }, Rt = x("URLSearchParams"), [St, Ot, Tt, At] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
38
+ function H(e, t, { allOwnKeys: n = !1 } = {}) {
39
+ if (e === null || typeof e > "u")
40
+ return;
41
+ let r, s;
42
+ if (typeof e != "object" && (e = [e]), B(e))
43
+ for (r = 0, s = e.length; r < s; r++)
44
+ t.call(null, e[r], r, e);
45
+ else {
46
+ if (q(e))
47
+ return;
48
+ const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
49
+ let c;
50
+ for (r = 0; r < o; r++)
51
+ c = i[r], t.call(null, e[c], c, e);
52
+ }
53
+ }
54
+ function qe(e, t) {
55
+ if (q(e))
56
+ return null;
57
+ t = t.toLowerCase();
58
+ const n = Object.keys(e);
59
+ let r = n.length, s;
60
+ for (; r-- > 0; )
61
+ if (s = n[r], t === s.toLowerCase())
62
+ return s;
63
+ return null;
64
+ }
65
+ const N = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Me = (e) => !I(e) && e !== N;
66
+ function ie() {
67
+ const { caseless: e } = Me(this) && this || {}, t = {}, n = (r, s) => {
68
+ const i = e && qe(t, s) || s;
69
+ J(t[i]) && J(r) ? t[i] = ie(t[i], r) : J(r) ? t[i] = ie({}, r) : B(r) ? t[i] = r.slice() : t[i] = r;
70
+ };
71
+ for (let r = 0, s = arguments.length; r < s; r++)
72
+ arguments[r] && H(arguments[r], n);
73
+ return t;
74
+ }
75
+ const xt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, i) => {
76
+ n && A(s) ? e[i] = Be(s, n) : e[i] = s;
77
+ }, { allOwnKeys: r }), e), _t = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ut = (e, t, n, r) => {
78
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
79
+ value: t.prototype
80
+ }), n && Object.assign(e.prototype, n);
81
+ }, Pt = (e, t, n, r) => {
82
+ let s, i, o;
83
+ const c = {};
84
+ if (t = t || {}, e == null) return t;
85
+ do {
86
+ for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
87
+ o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
88
+ e = n !== !1 && pe(e);
89
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
90
+ return t;
91
+ }, Lt = (e, t, n) => {
92
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
93
+ const r = e.indexOf(t, n);
94
+ return r !== -1 && r === n;
95
+ }, Nt = (e) => {
96
+ if (!e) return null;
97
+ if (B(e)) return e;
98
+ let t = e.length;
99
+ if (!Ie(t)) return null;
100
+ const n = new Array(t);
101
+ for (; t-- > 0; )
102
+ n[t] = e[t];
103
+ return n;
104
+ }, Ft = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && pe(Uint8Array)), kt = (e, t) => {
105
+ const r = (e && e[X]).call(e);
106
+ let s;
107
+ for (; (s = r.next()) && !s.done; ) {
108
+ const i = s.value;
109
+ t.call(e, i[0], i[1]);
110
+ }
111
+ }, Bt = (e, t) => {
112
+ let n;
113
+ const r = [];
114
+ for (; (n = e.exec(t)) !== null; )
115
+ r.push(n);
116
+ return r;
117
+ }, Dt = x("HTMLFormElement"), jt = (e) => e.toLowerCase().replace(
118
+ /[-_\s]([a-z\d])(\w*)/g,
119
+ function(n, r, s) {
120
+ return r.toUpperCase() + s;
121
+ }
122
+ ), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), It = x("RegExp"), He = (e, t) => {
123
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
124
+ H(n, (s, i) => {
125
+ let o;
126
+ (o = t(s, i, e)) !== !1 && (r[i] = o || s);
127
+ }), Object.defineProperties(e, r);
128
+ }, qt = (e) => {
129
+ He(e, (t, n) => {
130
+ if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
131
+ return !1;
132
+ const r = e[n];
133
+ if (A(r)) {
134
+ if (t.enumerable = !1, "writable" in t) {
135
+ t.writable = !1;
136
+ return;
137
+ }
138
+ t.set || (t.set = () => {
139
+ throw Error("Can not rewrite read-only method '" + n + "'");
140
+ });
141
+ }
142
+ });
143
+ }, Mt = (e, t) => {
144
+ const n = {}, r = (s) => {
145
+ s.forEach((i) => {
146
+ n[i] = !0;
147
+ });
148
+ };
149
+ return B(e) ? r(e) : r(String(e).split(t)), n;
150
+ }, Ht = () => {
151
+ }, zt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
152
+ function $t(e) {
153
+ return !!(e && A(e.append) && e[De] === "FormData" && e[X]);
154
+ }
155
+ const vt = (e) => {
156
+ const t = new Array(10), n = (r, s) => {
157
+ if (M(r)) {
158
+ if (t.indexOf(r) >= 0)
159
+ return;
160
+ if (q(r))
161
+ return r;
162
+ if (!("toJSON" in r)) {
163
+ t[s] = r;
164
+ const i = B(r) ? [] : {};
165
+ return H(r, (o, c) => {
166
+ const f = n(o, s + 1);
167
+ !I(f) && (i[c] = f);
168
+ }), t[s] = void 0, i;
169
+ }
170
+ }
171
+ return r;
172
+ };
173
+ return n(e, 0);
174
+ }, Jt = x("AsyncFunction"), Vt = (e) => e && (M(e) || A(e)) && A(e.then) && A(e.catch), ze = ((e, t) => e ? setImmediate : t ? ((n, r) => (N.addEventListener("message", ({ source: s, data: i }) => {
175
+ s === N && i === n && r.length && r.shift()();
176
+ }, !1), (s) => {
177
+ r.push(s), N.postMessage(n, "*");
178
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
179
+ typeof setImmediate == "function",
180
+ A(N.postMessage)
181
+ ), Kt = typeof queueMicrotask < "u" ? queueMicrotask.bind(N) : typeof process < "u" && process.nextTick || ze, Wt = (e) => e != null && A(e[X]), a = {
182
+ isArray: B,
183
+ isArrayBuffer: je,
184
+ isBuffer: q,
185
+ isFormData: Et,
186
+ isArrayBufferView: ft,
187
+ isString: dt,
188
+ isNumber: Ie,
189
+ isBoolean: pt,
190
+ isObject: M,
191
+ isPlainObject: J,
192
+ isEmptyObject: ht,
193
+ isReadableStream: St,
194
+ isRequest: Ot,
195
+ isResponse: Tt,
196
+ isHeaders: At,
197
+ isUndefined: I,
198
+ isDate: mt,
199
+ isFile: yt,
200
+ isBlob: wt,
201
+ isRegExp: It,
202
+ isFunction: A,
203
+ isStream: bt,
204
+ isURLSearchParams: Rt,
205
+ isTypedArray: Ft,
206
+ isFileList: gt,
207
+ forEach: H,
208
+ merge: ie,
209
+ extend: xt,
210
+ trim: Ct,
211
+ stripBOM: _t,
212
+ inherits: Ut,
213
+ toFlatObject: Pt,
214
+ kindOf: Q,
215
+ kindOfTest: x,
216
+ endsWith: Lt,
217
+ toArray: Nt,
218
+ forEachEntry: kt,
219
+ matchAll: Bt,
220
+ isHTMLForm: Dt,
221
+ hasOwnProperty: be,
222
+ hasOwnProp: be,
223
+ // an alias to avoid ESLint no-prototype-builtins detection
224
+ reduceDescriptors: He,
225
+ freezeMethods: qt,
226
+ toObjectSet: Mt,
227
+ toCamelCase: jt,
228
+ noop: Ht,
229
+ toFiniteNumber: zt,
230
+ findKey: qe,
231
+ global: N,
232
+ isContextDefined: Me,
233
+ isSpecCompliantForm: $t,
234
+ toJSONObject: vt,
235
+ isAsyncFn: Jt,
236
+ isThenable: Vt,
237
+ setImmediate: ze,
238
+ asap: Kt,
239
+ isIterable: Wt
240
+ };
241
+ function m(e, t, n, r, s) {
242
+ 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), s && (this.response = s, this.status = s.status ? s.status : null);
243
+ }
244
+ a.inherits(m, Error, {
245
+ toJSON: function() {
246
+ return {
247
+ // Standard
248
+ message: this.message,
249
+ name: this.name,
250
+ // Microsoft
251
+ description: this.description,
252
+ number: this.number,
253
+ // Mozilla
254
+ fileName: this.fileName,
255
+ lineNumber: this.lineNumber,
256
+ columnNumber: this.columnNumber,
257
+ stack: this.stack,
258
+ // Axios
259
+ config: a.toJSONObject(this.config),
260
+ code: this.code,
261
+ status: this.status
262
+ };
263
+ }
264
+ });
265
+ const $e = m.prototype, ve = {};
266
+ [
267
+ "ERR_BAD_OPTION_VALUE",
268
+ "ERR_BAD_OPTION",
269
+ "ECONNABORTED",
270
+ "ETIMEDOUT",
271
+ "ERR_NETWORK",
272
+ "ERR_FR_TOO_MANY_REDIRECTS",
273
+ "ERR_DEPRECATED",
274
+ "ERR_BAD_RESPONSE",
275
+ "ERR_BAD_REQUEST",
276
+ "ERR_CANCELED",
277
+ "ERR_NOT_SUPPORT",
278
+ "ERR_INVALID_URL"
279
+ // eslint-disable-next-line func-names
280
+ ].forEach((e) => {
281
+ ve[e] = { value: e };
282
+ });
283
+ Object.defineProperties(m, ve);
284
+ Object.defineProperty($e, "isAxiosError", { value: !0 });
285
+ m.from = (e, t, n, r, s, i) => {
286
+ const o = Object.create($e);
287
+ return a.toFlatObject(e, o, function(f) {
288
+ return f !== Error.prototype;
289
+ }, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
290
+ };
291
+ const Gt = null;
292
+ function ae(e) {
293
+ return a.isPlainObject(e) || a.isArray(e);
294
+ }
295
+ function Je(e) {
296
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
297
+ }
298
+ function Ee(e, t, n) {
299
+ return e ? e.concat(t).map(function(s, i) {
300
+ return s = Je(s), !n && i ? "[" + s + "]" : s;
301
+ }).join(n ? "." : "") : t;
302
+ }
303
+ function Xt(e) {
304
+ return a.isArray(e) && !e.some(ae);
305
+ }
306
+ const Qt = a.toFlatObject(a, {}, null, function(t) {
307
+ return /^is[A-Z]/.test(t);
308
+ });
309
+ function Z(e, t, n) {
310
+ if (!a.isObject(e))
311
+ throw new TypeError("target must be an object");
312
+ t = t || new FormData(), n = a.toFlatObject(n, {
313
+ metaTokens: !0,
314
+ dots: !1,
315
+ indexes: !1
316
+ }, !1, function(y, h) {
317
+ return !a.isUndefined(h[y]);
318
+ });
319
+ const r = n.metaTokens, s = n.visitor || u, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
320
+ if (!a.isFunction(s))
321
+ throw new TypeError("visitor must be a function");
322
+ function l(p) {
323
+ if (p === null) return "";
324
+ if (a.isDate(p))
325
+ return p.toISOString();
326
+ if (a.isBoolean(p))
327
+ return p.toString();
328
+ if (!f && a.isBlob(p))
329
+ throw new m("Blob is not supported. Use a Buffer instead.");
330
+ return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
331
+ }
332
+ function u(p, y, h) {
333
+ let b = p;
334
+ if (p && !h && typeof p == "object") {
335
+ if (a.endsWith(y, "{}"))
336
+ y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
337
+ else if (a.isArray(p) && Xt(p) || (a.isFileList(p) || a.endsWith(y, "[]")) && (b = a.toArray(p)))
338
+ return y = Je(y), b.forEach(function(S, U) {
339
+ !(a.isUndefined(S) || S === null) && t.append(
340
+ // eslint-disable-next-line no-nested-ternary
341
+ o === !0 ? Ee([y], U, i) : o === null ? y : y + "[]",
342
+ l(S)
343
+ );
344
+ }), !1;
345
+ }
346
+ return ae(p) ? !0 : (t.append(Ee(h, y, i), l(p)), !1);
347
+ }
348
+ const d = [], w = Object.assign(Qt, {
349
+ defaultVisitor: u,
350
+ convertValue: l,
351
+ isVisitable: ae
352
+ });
353
+ function E(p, y) {
354
+ if (!a.isUndefined(p)) {
355
+ if (d.indexOf(p) !== -1)
356
+ throw Error("Circular reference detected in " + y.join("."));
357
+ d.push(p), a.forEach(p, function(b, R) {
358
+ (!(a.isUndefined(b) || b === null) && s.call(
359
+ t,
360
+ b,
361
+ a.isString(R) ? R.trim() : R,
362
+ y,
363
+ w
364
+ )) === !0 && E(b, y ? y.concat(R) : [R]);
365
+ }), d.pop();
366
+ }
367
+ }
368
+ if (!a.isObject(e))
369
+ throw new TypeError("data must be an object");
370
+ return E(e), t;
371
+ }
372
+ function Re(e) {
373
+ const t = {
374
+ "!": "%21",
375
+ "'": "%27",
376
+ "(": "%28",
377
+ ")": "%29",
378
+ "~": "%7E",
379
+ "%20": "+",
380
+ "%00": "\0"
381
+ };
382
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
383
+ return t[r];
384
+ });
385
+ }
386
+ function he(e, t) {
387
+ this._pairs = [], e && Z(e, this, t);
388
+ }
389
+ const Ve = he.prototype;
390
+ Ve.append = function(t, n) {
391
+ this._pairs.push([t, n]);
392
+ };
393
+ Ve.toString = function(t) {
394
+ const n = t ? function(r) {
395
+ return t.call(this, r, Re);
396
+ } : Re;
397
+ return this._pairs.map(function(s) {
398
+ return n(s[0]) + "=" + n(s[1]);
399
+ }, "").join("&");
400
+ };
401
+ function Yt(e) {
402
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
403
+ }
404
+ function Ke(e, t, n) {
405
+ if (!t)
406
+ return e;
407
+ const r = n && n.encode || Yt;
408
+ a.isFunction(n) && (n = {
409
+ serialize: n
410
+ });
411
+ const s = n && n.serialize;
412
+ let i;
413
+ if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new he(t, n).toString(r), i) {
414
+ const o = e.indexOf("#");
415
+ o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
416
+ }
417
+ return e;
418
+ }
419
+ class Se {
420
+ constructor() {
421
+ this.handlers = [];
422
+ }
423
+ /**
424
+ * Add a new interceptor to the stack
425
+ *
426
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
427
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
428
+ *
429
+ * @return {Number} An ID used to remove interceptor later
430
+ */
431
+ use(t, n, r) {
432
+ return this.handlers.push({
433
+ fulfilled: t,
434
+ rejected: n,
435
+ synchronous: r ? r.synchronous : !1,
436
+ runWhen: r ? r.runWhen : null
437
+ }), this.handlers.length - 1;
438
+ }
439
+ /**
440
+ * Remove an interceptor from the stack
441
+ *
442
+ * @param {Number} id The ID that was returned by `use`
443
+ *
444
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
445
+ */
446
+ eject(t) {
447
+ this.handlers[t] && (this.handlers[t] = null);
448
+ }
449
+ /**
450
+ * Clear all interceptors from the stack
451
+ *
452
+ * @returns {void}
453
+ */
454
+ clear() {
455
+ this.handlers && (this.handlers = []);
456
+ }
457
+ /**
458
+ * Iterate over all the registered interceptors
459
+ *
460
+ * This method is particularly useful for skipping over any
461
+ * interceptors that may have become `null` calling `eject`.
462
+ *
463
+ * @param {Function} fn The function to call for each interceptor
464
+ *
465
+ * @returns {void}
466
+ */
467
+ forEach(t) {
468
+ a.forEach(this.handlers, function(r) {
469
+ r !== null && t(r);
470
+ });
471
+ }
472
+ }
473
+ const We = {
474
+ silentJSONParsing: !0,
475
+ forcedJSONParsing: !0,
476
+ clarifyTimeoutError: !1
477
+ }, Zt = typeof URLSearchParams < "u" ? URLSearchParams : he, en = typeof FormData < "u" ? FormData : null, tn = typeof Blob < "u" ? Blob : null, nn = {
478
+ isBrowser: !0,
479
+ classes: {
480
+ URLSearchParams: Zt,
481
+ FormData: en,
482
+ Blob: tn
483
+ },
484
+ protocols: ["http", "https", "file", "blob", "url", "data"]
485
+ }, me = typeof window < "u" && typeof document < "u", ce = typeof navigator == "object" && navigator || void 0, rn = me && (!ce || ["ReactNative", "NativeScript", "NS"].indexOf(ce.product) < 0), sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
486
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on = me && window.location.href || "http://localhost", an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
487
+ __proto__: null,
488
+ hasBrowserEnv: me,
489
+ hasStandardBrowserEnv: rn,
490
+ hasStandardBrowserWebWorkerEnv: sn,
491
+ navigator: ce,
492
+ origin: on
493
+ }, Symbol.toStringTag, { value: "Module" })), O = {
494
+ ...an,
495
+ ...nn
496
+ };
497
+ function cn(e, t) {
498
+ return Z(e, new O.classes.URLSearchParams(), {
499
+ visitor: function(n, r, s, i) {
500
+ return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
501
+ },
502
+ ...t
503
+ });
504
+ }
505
+ function un(e) {
506
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
507
+ }
508
+ function ln(e) {
509
+ const t = {}, n = Object.keys(e);
510
+ let r;
511
+ const s = n.length;
512
+ let i;
513
+ for (r = 0; r < s; r++)
514
+ i = n[r], t[i] = e[i];
515
+ return t;
516
+ }
517
+ function Ge(e) {
518
+ function t(n, r, s, i) {
519
+ let o = n[i++];
520
+ if (o === "__proto__") return !0;
521
+ const c = Number.isFinite(+o), f = i >= n.length;
522
+ return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = ln(s[o])), !c);
523
+ }
524
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
525
+ const n = {};
526
+ return a.forEachEntry(e, (r, s) => {
527
+ t(un(r), s, n, 0);
528
+ }), n;
529
+ }
530
+ return null;
531
+ }
532
+ function fn(e, t, n) {
533
+ if (a.isString(e))
534
+ try {
535
+ return (t || JSON.parse)(e), a.trim(e);
536
+ } catch (r) {
537
+ if (r.name !== "SyntaxError")
538
+ throw r;
539
+ }
540
+ return (n || JSON.stringify)(e);
541
+ }
542
+ const z = {
543
+ transitional: We,
544
+ adapter: ["xhr", "http", "fetch"],
545
+ transformRequest: [function(t, n) {
546
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
547
+ if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
548
+ return s ? JSON.stringify(Ge(t)) : t;
549
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
550
+ return t;
551
+ if (a.isArrayBufferView(t))
552
+ return t.buffer;
553
+ if (a.isURLSearchParams(t))
554
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
555
+ let c;
556
+ if (i) {
557
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
558
+ return cn(t, this.formSerializer).toString();
559
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
560
+ const f = this.env && this.env.FormData;
561
+ return Z(
562
+ c ? { "files[]": t } : t,
563
+ f && new f(),
564
+ this.formSerializer
565
+ );
566
+ }
567
+ }
568
+ return i || s ? (n.setContentType("application/json", !1), fn(t)) : t;
569
+ }],
570
+ transformResponse: [function(t) {
571
+ const n = this.transitional || z.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
572
+ if (a.isResponse(t) || a.isReadableStream(t))
573
+ return t;
574
+ if (t && a.isString(t) && (r && !this.responseType || s)) {
575
+ const o = !(n && n.silentJSONParsing) && s;
576
+ try {
577
+ return JSON.parse(t);
578
+ } catch (c) {
579
+ if (o)
580
+ throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
581
+ }
582
+ }
583
+ return t;
584
+ }],
585
+ /**
586
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
587
+ * timeout is not created.
588
+ */
589
+ timeout: 0,
590
+ xsrfCookieName: "XSRF-TOKEN",
591
+ xsrfHeaderName: "X-XSRF-TOKEN",
592
+ maxContentLength: -1,
593
+ maxBodyLength: -1,
594
+ env: {
595
+ FormData: O.classes.FormData,
596
+ Blob: O.classes.Blob
597
+ },
598
+ validateStatus: function(t) {
599
+ return t >= 200 && t < 300;
600
+ },
601
+ headers: {
602
+ common: {
603
+ Accept: "application/json, text/plain, */*",
604
+ "Content-Type": void 0
605
+ }
606
+ }
607
+ };
608
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
609
+ z.headers[e] = {};
610
+ });
611
+ const dn = a.toObjectSet([
612
+ "age",
613
+ "authorization",
614
+ "content-length",
615
+ "content-type",
616
+ "etag",
617
+ "expires",
618
+ "from",
619
+ "host",
620
+ "if-modified-since",
621
+ "if-unmodified-since",
622
+ "last-modified",
623
+ "location",
624
+ "max-forwards",
625
+ "proxy-authorization",
626
+ "referer",
627
+ "retry-after",
628
+ "user-agent"
629
+ ]), pn = (e) => {
630
+ const t = {};
631
+ let n, r, s;
632
+ return e && e.split(`
633
+ `).forEach(function(o) {
634
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && dn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
635
+ }), t;
636
+ }, Oe = Symbol("internals");
637
+ function j(e) {
638
+ return e && String(e).trim().toLowerCase();
639
+ }
640
+ function V(e) {
641
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
642
+ }
643
+ function hn(e) {
644
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
645
+ let r;
646
+ for (; r = n.exec(e); )
647
+ t[r[1]] = r[2];
648
+ return t;
649
+ }
650
+ const mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
651
+ function ne(e, t, n, r, s) {
652
+ if (a.isFunction(r))
653
+ return r.call(this, t, n);
654
+ if (s && (t = n), !!a.isString(t)) {
655
+ if (a.isString(r))
656
+ return t.indexOf(r) !== -1;
657
+ if (a.isRegExp(r))
658
+ return r.test(t);
659
+ }
660
+ }
661
+ function yn(e) {
662
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
663
+ }
664
+ function wn(e, t) {
665
+ const n = a.toCamelCase(" " + t);
666
+ ["get", "set", "has"].forEach((r) => {
667
+ Object.defineProperty(e, r + n, {
668
+ value: function(s, i, o) {
669
+ return this[r].call(this, t, s, i, o);
670
+ },
671
+ configurable: !0
672
+ });
673
+ });
674
+ }
675
+ let C = class {
676
+ constructor(t) {
677
+ t && this.set(t);
678
+ }
679
+ set(t, n, r) {
680
+ const s = this;
681
+ function i(c, f, l) {
682
+ const u = j(f);
683
+ if (!u)
684
+ throw new Error("header name must be a non-empty string");
685
+ const d = a.findKey(s, u);
686
+ (!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = V(c));
687
+ }
688
+ const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
689
+ if (a.isPlainObject(t) || t instanceof this.constructor)
690
+ o(t, n);
691
+ else if (a.isString(t) && (t = t.trim()) && !mn(t))
692
+ o(pn(t), n);
693
+ else if (a.isObject(t) && a.isIterable(t)) {
694
+ let c = {}, f, l;
695
+ for (const u of t) {
696
+ if (!a.isArray(u))
697
+ throw TypeError("Object iterator must return a key-value pair");
698
+ c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
699
+ }
700
+ o(c, n);
701
+ } else
702
+ t != null && i(n, t, r);
703
+ return this;
704
+ }
705
+ get(t, n) {
706
+ if (t = j(t), t) {
707
+ const r = a.findKey(this, t);
708
+ if (r) {
709
+ const s = this[r];
710
+ if (!n)
711
+ return s;
712
+ if (n === !0)
713
+ return hn(s);
714
+ if (a.isFunction(n))
715
+ return n.call(this, s, r);
716
+ if (a.isRegExp(n))
717
+ return n.exec(s);
718
+ throw new TypeError("parser must be boolean|regexp|function");
719
+ }
720
+ }
721
+ }
722
+ has(t, n) {
723
+ if (t = j(t), t) {
724
+ const r = a.findKey(this, t);
725
+ return !!(r && this[r] !== void 0 && (!n || ne(this, this[r], r, n)));
726
+ }
727
+ return !1;
728
+ }
729
+ delete(t, n) {
730
+ const r = this;
731
+ let s = !1;
732
+ function i(o) {
733
+ if (o = j(o), o) {
734
+ const c = a.findKey(r, o);
735
+ c && (!n || ne(r, r[c], c, n)) && (delete r[c], s = !0);
736
+ }
737
+ }
738
+ return a.isArray(t) ? t.forEach(i) : i(t), s;
739
+ }
740
+ clear(t) {
741
+ const n = Object.keys(this);
742
+ let r = n.length, s = !1;
743
+ for (; r--; ) {
744
+ const i = n[r];
745
+ (!t || ne(this, this[i], i, t, !0)) && (delete this[i], s = !0);
746
+ }
747
+ return s;
748
+ }
749
+ normalize(t) {
750
+ const n = this, r = {};
751
+ return a.forEach(this, (s, i) => {
752
+ const o = a.findKey(r, i);
753
+ if (o) {
754
+ n[o] = V(s), delete n[i];
755
+ return;
756
+ }
757
+ const c = t ? yn(i) : String(i).trim();
758
+ c !== i && delete n[i], n[c] = V(s), r[c] = !0;
759
+ }), this;
760
+ }
761
+ concat(...t) {
762
+ return this.constructor.concat(this, ...t);
763
+ }
764
+ toJSON(t) {
765
+ const n = /* @__PURE__ */ Object.create(null);
766
+ return a.forEach(this, (r, s) => {
767
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
768
+ }), n;
769
+ }
770
+ [Symbol.iterator]() {
771
+ return Object.entries(this.toJSON())[Symbol.iterator]();
772
+ }
773
+ toString() {
774
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
775
+ `);
776
+ }
777
+ getSetCookie() {
778
+ return this.get("set-cookie") || [];
779
+ }
780
+ get [Symbol.toStringTag]() {
781
+ return "AxiosHeaders";
782
+ }
783
+ static from(t) {
784
+ return t instanceof this ? t : new this(t);
785
+ }
786
+ static concat(t, ...n) {
787
+ const r = new this(t);
788
+ return n.forEach((s) => r.set(s)), r;
789
+ }
790
+ static accessor(t) {
791
+ const r = (this[Oe] = this[Oe] = {
792
+ accessors: {}
793
+ }).accessors, s = this.prototype;
794
+ function i(o) {
795
+ const c = j(o);
796
+ r[c] || (wn(s, o), r[c] = !0);
797
+ }
798
+ return a.isArray(t) ? t.forEach(i) : i(t), this;
799
+ }
800
+ };
801
+ C.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
802
+ a.reduceDescriptors(C.prototype, ({ value: e }, t) => {
803
+ let n = t[0].toUpperCase() + t.slice(1);
804
+ return {
805
+ get: () => e,
806
+ set(r) {
807
+ this[n] = r;
808
+ }
809
+ };
810
+ });
811
+ a.freezeMethods(C);
812
+ function re(e, t) {
813
+ const n = this || z, r = t || n, s = C.from(r.headers);
814
+ let i = r.data;
815
+ return a.forEach(e, function(c) {
816
+ i = c.call(n, i, s.normalize(), t ? t.status : void 0);
817
+ }), s.normalize(), i;
818
+ }
819
+ function Xe(e) {
820
+ return !!(e && e.__CANCEL__);
821
+ }
822
+ function D(e, t, n) {
823
+ m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
824
+ }
825
+ a.inherits(D, m, {
826
+ __CANCEL__: !0
827
+ });
828
+ function Qe(e, t, n) {
829
+ const r = n.config.validateStatus;
830
+ !n.status || !r || r(n.status) ? e(n) : t(new m(
831
+ "Request failed with status code " + n.status,
832
+ [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
833
+ n.config,
834
+ n.request,
835
+ n
836
+ ));
837
+ }
838
+ function gn(e) {
839
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
840
+ return t && t[1] || "";
841
+ }
842
+ function bn(e, t) {
843
+ e = e || 10;
844
+ const n = new Array(e), r = new Array(e);
845
+ let s = 0, i = 0, o;
846
+ return t = t !== void 0 ? t : 1e3, function(f) {
847
+ const l = Date.now(), u = r[i];
848
+ o || (o = l), n[s] = f, r[s] = l;
849
+ let d = i, w = 0;
850
+ for (; d !== s; )
851
+ w += n[d++], d = d % e;
852
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
853
+ return;
854
+ const E = u && l - u;
855
+ return E ? Math.round(w * 1e3 / E) : void 0;
856
+ };
857
+ }
858
+ function En(e, t) {
859
+ let n = 0, r = 1e3 / t, s, i;
860
+ const o = (l, u = Date.now()) => {
861
+ n = u, s = null, i && (clearTimeout(i), i = null), e(...l);
862
+ };
863
+ return [(...l) => {
864
+ const u = Date.now(), d = u - n;
865
+ d >= r ? o(l, u) : (s = l, i || (i = setTimeout(() => {
866
+ i = null, o(s);
867
+ }, r - d)));
868
+ }, () => s && o(s)];
869
+ }
870
+ const W = (e, t, n = 3) => {
871
+ let r = 0;
872
+ const s = bn(50, 250);
873
+ return En((i) => {
874
+ const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, l = s(f), u = o <= c;
875
+ r = o;
876
+ const d = {
877
+ loaded: o,
878
+ total: c,
879
+ progress: c ? o / c : void 0,
880
+ bytes: f,
881
+ rate: l || void 0,
882
+ estimated: l && c && u ? (c - o) / l : void 0,
883
+ event: i,
884
+ lengthComputable: c != null,
885
+ [t ? "download" : "upload"]: !0
886
+ };
887
+ e(d);
888
+ }, n);
889
+ }, Te = (e, t) => {
890
+ const n = e != null;
891
+ return [(r) => t[0]({
892
+ lengthComputable: n,
893
+ total: e,
894
+ loaded: r
895
+ }), t[1]];
896
+ }, Ae = (e) => (...t) => a.asap(() => e(...t)), Rn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
897
+ new URL(O.origin),
898
+ O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
899
+ ) : () => !0, Sn = O.hasStandardBrowserEnv ? (
900
+ // Standard browser envs support document.cookie
901
+ {
902
+ write(e, t, n, r, s, i) {
903
+ const o = [e + "=" + encodeURIComponent(t)];
904
+ a.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), a.isString(r) && o.push("path=" + r), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
905
+ },
906
+ read(e) {
907
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
908
+ return t ? decodeURIComponent(t[3]) : null;
909
+ },
910
+ remove(e) {
911
+ this.write(e, "", Date.now() - 864e5);
912
+ }
913
+ }
914
+ ) : (
915
+ // Non-standard browser env (web workers, react-native) lack needed support.
916
+ {
917
+ write() {
918
+ },
919
+ read() {
920
+ return null;
921
+ },
922
+ remove() {
923
+ }
924
+ }
925
+ );
926
+ function On(e) {
927
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
928
+ }
929
+ function Tn(e, t) {
930
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
931
+ }
932
+ function Ye(e, t, n) {
933
+ let r = !On(t);
934
+ return e && (r || n == !1) ? Tn(e, t) : t;
935
+ }
936
+ const Ce = (e) => e instanceof C ? { ...e } : e;
937
+ function k(e, t) {
938
+ t = t || {};
939
+ const n = {};
940
+ function r(l, u, d, w) {
941
+ return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
942
+ }
943
+ function s(l, u, d, w) {
944
+ if (a.isUndefined(u)) {
945
+ if (!a.isUndefined(l))
946
+ return r(void 0, l, d, w);
947
+ } else return r(l, u, d, w);
948
+ }
949
+ function i(l, u) {
950
+ if (!a.isUndefined(u))
951
+ return r(void 0, u);
952
+ }
953
+ function o(l, u) {
954
+ if (a.isUndefined(u)) {
955
+ if (!a.isUndefined(l))
956
+ return r(void 0, l);
957
+ } else return r(void 0, u);
958
+ }
959
+ function c(l, u, d) {
960
+ if (d in t)
961
+ return r(l, u);
962
+ if (d in e)
963
+ return r(void 0, l);
964
+ }
965
+ const f = {
966
+ url: i,
967
+ method: i,
968
+ data: i,
969
+ baseURL: o,
970
+ transformRequest: o,
971
+ transformResponse: o,
972
+ paramsSerializer: o,
973
+ timeout: o,
974
+ timeoutMessage: o,
975
+ withCredentials: o,
976
+ withXSRFToken: o,
977
+ adapter: o,
978
+ responseType: o,
979
+ xsrfCookieName: o,
980
+ xsrfHeaderName: o,
981
+ onUploadProgress: o,
982
+ onDownloadProgress: o,
983
+ decompress: o,
984
+ maxContentLength: o,
985
+ maxBodyLength: o,
986
+ beforeRedirect: o,
987
+ transport: o,
988
+ httpAgent: o,
989
+ httpsAgent: o,
990
+ cancelToken: o,
991
+ socketPath: o,
992
+ responseEncoding: o,
993
+ validateStatus: c,
994
+ headers: (l, u, d) => s(Ce(l), Ce(u), d, !0)
995
+ };
996
+ return a.forEach(Object.keys({ ...e, ...t }), function(u) {
997
+ const d = f[u] || s, w = d(e[u], t[u], u);
998
+ a.isUndefined(w) && d !== c || (n[u] = w);
999
+ }), n;
1000
+ }
1001
+ const Ze = (e) => {
1002
+ const t = k({}, e);
1003
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
1004
+ t.headers = o = C.from(o), t.url = Ke(Ye(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
1005
+ "Authorization",
1006
+ "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1007
+ );
1008
+ let f;
1009
+ if (a.isFormData(n)) {
1010
+ if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1011
+ o.setContentType(void 0);
1012
+ else if ((f = o.getContentType()) !== !1) {
1013
+ const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1014
+ o.setContentType([l || "multipart/form-data", ...u].join("; "));
1015
+ }
1016
+ }
1017
+ if (O.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Rn(t.url))) {
1018
+ const l = s && i && Sn.read(i);
1019
+ l && o.set(s, l);
1020
+ }
1021
+ return t;
1022
+ }, An = typeof XMLHttpRequest < "u", Cn = An && function(e) {
1023
+ return new Promise(function(n, r) {
1024
+ const s = Ze(e);
1025
+ let i = s.data;
1026
+ const o = C.from(s.headers).normalize();
1027
+ let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, E, p;
1028
+ function y() {
1029
+ E && E(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1030
+ }
1031
+ let h = new XMLHttpRequest();
1032
+ h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1033
+ function b() {
1034
+ if (!h)
1035
+ return;
1036
+ const S = C.from(
1037
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1038
+ ), T = {
1039
+ data: !c || c === "text" || c === "json" ? h.responseText : h.response,
1040
+ status: h.status,
1041
+ statusText: h.statusText,
1042
+ headers: S,
1043
+ config: e,
1044
+ request: h
1045
+ };
1046
+ Qe(function(L) {
1047
+ n(L), y();
1048
+ }, function(L) {
1049
+ r(L), y();
1050
+ }, T), h = null;
1051
+ }
1052
+ "onloadend" in h ? h.onloadend = b : h.onreadystatechange = function() {
1053
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(b);
1054
+ }, h.onabort = function() {
1055
+ h && (r(new m("Request aborted", m.ECONNABORTED, e, h)), h = null);
1056
+ }, h.onerror = function() {
1057
+ r(new m("Network Error", m.ERR_NETWORK, e, h)), h = null;
1058
+ }, h.ontimeout = function() {
1059
+ let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1060
+ const T = s.transitional || We;
1061
+ s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
1062
+ U,
1063
+ T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
1064
+ e,
1065
+ h
1066
+ )), h = null;
1067
+ }, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(U, T) {
1068
+ h.setRequestHeader(T, U);
1069
+ }), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = W(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, E] = W(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (S) => {
1070
+ h && (r(!S || S.type ? new D(null, e, h) : S), h.abort(), h = null);
1071
+ }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1072
+ const R = gn(s.url);
1073
+ if (R && O.protocols.indexOf(R) === -1) {
1074
+ r(new m("Unsupported protocol " + R + ":", m.ERR_BAD_REQUEST, e));
1075
+ return;
1076
+ }
1077
+ h.send(i || null);
1078
+ });
1079
+ }, xn = (e, t) => {
1080
+ const { length: n } = e = e ? e.filter(Boolean) : [];
1081
+ if (t || n) {
1082
+ let r = new AbortController(), s;
1083
+ const i = function(l) {
1084
+ if (!s) {
1085
+ s = !0, c();
1086
+ const u = l instanceof Error ? l : this.reason;
1087
+ r.abort(u instanceof m ? u : new D(u instanceof Error ? u.message : u));
1088
+ }
1089
+ };
1090
+ let o = t && setTimeout(() => {
1091
+ o = null, i(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
1092
+ }, t);
1093
+ const c = () => {
1094
+ e && (o && clearTimeout(o), o = null, e.forEach((l) => {
1095
+ l.unsubscribe ? l.unsubscribe(i) : l.removeEventListener("abort", i);
1096
+ }), e = null);
1097
+ };
1098
+ e.forEach((l) => l.addEventListener("abort", i));
1099
+ const { signal: f } = r;
1100
+ return f.unsubscribe = () => a.asap(c), f;
1101
+ }
1102
+ }, _n = function* (e, t) {
1103
+ let n = e.byteLength;
1104
+ if (n < t) {
1105
+ yield e;
1106
+ return;
1107
+ }
1108
+ let r = 0, s;
1109
+ for (; r < n; )
1110
+ s = r + t, yield e.slice(r, s), r = s;
1111
+ }, Un = async function* (e, t) {
1112
+ for await (const n of Pn(e))
1113
+ yield* _n(n, t);
1114
+ }, Pn = async function* (e) {
1115
+ if (e[Symbol.asyncIterator]) {
1116
+ yield* e;
1117
+ return;
1118
+ }
1119
+ const t = e.getReader();
1120
+ try {
1121
+ for (; ; ) {
1122
+ const { done: n, value: r } = await t.read();
1123
+ if (n)
1124
+ break;
1125
+ yield r;
1126
+ }
1127
+ } finally {
1128
+ await t.cancel();
1129
+ }
1130
+ }, xe = (e, t, n, r) => {
1131
+ const s = Un(e, t);
1132
+ let i = 0, o, c = (f) => {
1133
+ o || (o = !0, r && r(f));
1134
+ };
1135
+ return new ReadableStream({
1136
+ async pull(f) {
1137
+ try {
1138
+ const { done: l, value: u } = await s.next();
1139
+ if (l) {
1140
+ c(), f.close();
1141
+ return;
1142
+ }
1143
+ let d = u.byteLength;
1144
+ if (n) {
1145
+ let w = i += d;
1146
+ n(w);
1147
+ }
1148
+ f.enqueue(new Uint8Array(u));
1149
+ } catch (l) {
1150
+ throw c(l), l;
1151
+ }
1152
+ },
1153
+ cancel(f) {
1154
+ return c(f), s.return();
1155
+ }
1156
+ }, {
1157
+ highWaterMark: 2
1158
+ });
1159
+ }, ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", et = ee && typeof ReadableStream == "function", Ln = ee && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), tt = (e, ...t) => {
1160
+ try {
1161
+ return !!e(...t);
1162
+ } catch {
1163
+ return !1;
1164
+ }
1165
+ }, Nn = et && tt(() => {
1166
+ let e = !1;
1167
+ const t = new Request(O.origin, {
1168
+ body: new ReadableStream(),
1169
+ method: "POST",
1170
+ get duplex() {
1171
+ return e = !0, "half";
1172
+ }
1173
+ }).headers.has("Content-Type");
1174
+ return e && !t;
1175
+ }), _e = 64 * 1024, ue = et && tt(() => a.isReadableStream(new Response("").body)), G = {
1176
+ stream: ue && ((e) => e.body)
1177
+ };
1178
+ ee && ((e) => {
1179
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1180
+ !G[t] && (G[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1181
+ throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
1182
+ });
1183
+ });
1184
+ })(new Response());
1185
+ const Fn = async (e) => {
1186
+ if (e == null)
1187
+ return 0;
1188
+ if (a.isBlob(e))
1189
+ return e.size;
1190
+ if (a.isSpecCompliantForm(e))
1191
+ return (await new Request(O.origin, {
1192
+ method: "POST",
1193
+ body: e
1194
+ }).arrayBuffer()).byteLength;
1195
+ if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
1196
+ return e.byteLength;
1197
+ if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1198
+ return (await Ln(e)).byteLength;
1199
+ }, kn = async (e, t) => {
1200
+ const n = a.toFiniteNumber(e.getContentLength());
1201
+ return n ?? Fn(t);
1202
+ }, Bn = ee && (async (e) => {
1203
+ let {
1204
+ url: t,
1205
+ method: n,
1206
+ data: r,
1207
+ signal: s,
1208
+ cancelToken: i,
1209
+ timeout: o,
1210
+ onDownloadProgress: c,
1211
+ onUploadProgress: f,
1212
+ responseType: l,
1213
+ headers: u,
1214
+ withCredentials: d = "same-origin",
1215
+ fetchOptions: w
1216
+ } = Ze(e);
1217
+ l = l ? (l + "").toLowerCase() : "text";
1218
+ let E = xn([s, i && i.toAbortSignal()], o), p;
1219
+ const y = E && E.unsubscribe && (() => {
1220
+ E.unsubscribe();
1221
+ });
1222
+ let h;
1223
+ try {
1224
+ if (f && Nn && n !== "get" && n !== "head" && (h = await kn(u, r)) !== 0) {
1225
+ let T = new Request(t, {
1226
+ method: "POST",
1227
+ body: r,
1228
+ duplex: "half"
1229
+ }), P;
1230
+ if (a.isFormData(r) && (P = T.headers.get("content-type")) && u.setContentType(P), T.body) {
1231
+ const [L, $] = Te(
1232
+ h,
1233
+ W(Ae(f))
1234
+ );
1235
+ r = xe(T.body, _e, L, $);
1236
+ }
1237
+ }
1238
+ a.isString(d) || (d = d ? "include" : "omit");
1239
+ const b = "credentials" in Request.prototype;
1240
+ p = new Request(t, {
1241
+ ...w,
1242
+ signal: E,
1243
+ method: n.toUpperCase(),
1244
+ headers: u.normalize().toJSON(),
1245
+ body: r,
1246
+ duplex: "half",
1247
+ credentials: b ? d : void 0
1248
+ });
1249
+ let R = await fetch(p, w);
1250
+ const S = ue && (l === "stream" || l === "response");
1251
+ if (ue && (c || S && y)) {
1252
+ const T = {};
1253
+ ["status", "statusText", "headers"].forEach((ge) => {
1254
+ T[ge] = R[ge];
1255
+ });
1256
+ const P = a.toFiniteNumber(R.headers.get("content-length")), [L, $] = c && Te(
1257
+ P,
1258
+ W(Ae(c), !0)
1259
+ ) || [];
1260
+ R = new Response(
1261
+ xe(R.body, _e, L, () => {
1262
+ $ && $(), y && y();
1263
+ }),
1264
+ T
1265
+ );
1266
+ }
1267
+ l = l || "text";
1268
+ let U = await G[a.findKey(G, l) || "text"](R, e);
1269
+ return !S && y && y(), await new Promise((T, P) => {
1270
+ Qe(T, P, {
1271
+ data: U,
1272
+ headers: C.from(R.headers),
1273
+ status: R.status,
1274
+ statusText: R.statusText,
1275
+ config: e,
1276
+ request: p
1277
+ });
1278
+ });
1279
+ } catch (b) {
1280
+ throw y && y(), b && b.name === "TypeError" && /Load failed|fetch/i.test(b.message) ? Object.assign(
1281
+ new m("Network Error", m.ERR_NETWORK, e, p),
1282
+ {
1283
+ cause: b.cause || b
1284
+ }
1285
+ ) : m.from(b, b && b.code, e, p);
1286
+ }
1287
+ }), le = {
1288
+ http: Gt,
1289
+ xhr: Cn,
1290
+ fetch: Bn
1291
+ };
1292
+ a.forEach(le, (e, t) => {
1293
+ if (e) {
1294
+ try {
1295
+ Object.defineProperty(e, "name", { value: t });
1296
+ } catch {
1297
+ }
1298
+ Object.defineProperty(e, "adapterName", { value: t });
1299
+ }
1300
+ });
1301
+ const Ue = (e) => `- ${e}`, Dn = (e) => a.isFunction(e) || e === null || e === !1, nt = {
1302
+ getAdapter: (e) => {
1303
+ e = a.isArray(e) ? e : [e];
1304
+ const { length: t } = e;
1305
+ let n, r;
1306
+ const s = {};
1307
+ for (let i = 0; i < t; i++) {
1308
+ n = e[i];
1309
+ let o;
1310
+ if (r = n, !Dn(n) && (r = le[(o = String(n)).toLowerCase()], r === void 0))
1311
+ throw new m(`Unknown adapter '${o}'`);
1312
+ if (r)
1313
+ break;
1314
+ s[o || "#" + i] = r;
1315
+ }
1316
+ if (!r) {
1317
+ const i = Object.entries(s).map(
1318
+ ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1319
+ );
1320
+ let o = t ? i.length > 1 ? `since :
1321
+ ` + i.map(Ue).join(`
1322
+ `) : " " + Ue(i[0]) : "as no adapter specified";
1323
+ throw new m(
1324
+ "There is no suitable adapter to dispatch the request " + o,
1325
+ "ERR_NOT_SUPPORT"
1326
+ );
1327
+ }
1328
+ return r;
1329
+ },
1330
+ adapters: le
1331
+ };
1332
+ function se(e) {
1333
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1334
+ throw new D(null, e);
1335
+ }
1336
+ function Pe(e) {
1337
+ return se(e), e.headers = C.from(e.headers), e.data = re.call(
1338
+ e,
1339
+ e.transformRequest
1340
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), nt.getAdapter(e.adapter || z.adapter)(e).then(function(r) {
1341
+ return se(e), r.data = re.call(
1342
+ e,
1343
+ e.transformResponse,
1344
+ r
1345
+ ), r.headers = C.from(r.headers), r;
1346
+ }, function(r) {
1347
+ return Xe(r) || (se(e), r && r.response && (r.response.data = re.call(
1348
+ e,
1349
+ e.transformResponse,
1350
+ r.response
1351
+ ), r.response.headers = C.from(r.response.headers))), Promise.reject(r);
1352
+ });
1353
+ }
1354
+ const rt = "1.11.0", te = {};
1355
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1356
+ te[e] = function(r) {
1357
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1358
+ };
1359
+ });
1360
+ const Le = {};
1361
+ te.transitional = function(t, n, r) {
1362
+ function s(i, o) {
1363
+ return "[Axios v" + rt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1364
+ }
1365
+ return (i, o, c) => {
1366
+ if (t === !1)
1367
+ throw new m(
1368
+ s(o, " has been removed" + (n ? " in " + n : "")),
1369
+ m.ERR_DEPRECATED
1370
+ );
1371
+ return n && !Le[o] && (Le[o] = !0), t ? t(i, o, c) : !0;
1372
+ };
1373
+ };
1374
+ te.spelling = function(t) {
1375
+ return (n, r) => !0;
1376
+ };
1377
+ function jn(e, t, n) {
1378
+ if (typeof e != "object")
1379
+ throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1380
+ const r = Object.keys(e);
1381
+ let s = r.length;
1382
+ for (; s-- > 0; ) {
1383
+ const i = r[s], o = t[i];
1384
+ if (o) {
1385
+ const c = e[i], f = c === void 0 || o(c, i, e);
1386
+ if (f !== !0)
1387
+ throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1388
+ continue;
1389
+ }
1390
+ if (n !== !0)
1391
+ throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1392
+ }
1393
+ }
1394
+ const K = {
1395
+ assertOptions: jn,
1396
+ validators: te
1397
+ }, _ = K.validators;
1398
+ let F = class {
1399
+ constructor(t) {
1400
+ this.defaults = t || {}, this.interceptors = {
1401
+ request: new Se(),
1402
+ response: new Se()
1403
+ };
1404
+ }
1405
+ /**
1406
+ * Dispatch a request
1407
+ *
1408
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1409
+ * @param {?Object} config
1410
+ *
1411
+ * @returns {Promise} The Promise to be fulfilled
1412
+ */
1413
+ async request(t, n) {
1414
+ try {
1415
+ return await this._request(t, n);
1416
+ } catch (r) {
1417
+ if (r instanceof Error) {
1418
+ let s = {};
1419
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1420
+ const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1421
+ try {
1422
+ r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
1423
+ ` + i) : r.stack = i;
1424
+ } catch {
1425
+ }
1426
+ }
1427
+ throw r;
1428
+ }
1429
+ }
1430
+ _request(t, n) {
1431
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = k(this.defaults, n);
1432
+ const { transitional: r, paramsSerializer: s, headers: i } = n;
1433
+ r !== void 0 && K.assertOptions(r, {
1434
+ silentJSONParsing: _.transitional(_.boolean),
1435
+ forcedJSONParsing: _.transitional(_.boolean),
1436
+ clarifyTimeoutError: _.transitional(_.boolean)
1437
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1438
+ serialize: s
1439
+ } : K.assertOptions(s, {
1440
+ encode: _.function,
1441
+ serialize: _.function
1442
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), K.assertOptions(n, {
1443
+ baseUrl: _.spelling("baseURL"),
1444
+ withXsrfToken: _.spelling("withXSRFToken")
1445
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1446
+ let o = i && a.merge(
1447
+ i.common,
1448
+ i[n.method]
1449
+ );
1450
+ i && a.forEach(
1451
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1452
+ (p) => {
1453
+ delete i[p];
1454
+ }
1455
+ ), n.headers = C.concat(o, i);
1456
+ const c = [];
1457
+ let f = !0;
1458
+ this.interceptors.request.forEach(function(y) {
1459
+ typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1460
+ });
1461
+ const l = [];
1462
+ this.interceptors.response.forEach(function(y) {
1463
+ l.push(y.fulfilled, y.rejected);
1464
+ });
1465
+ let u, d = 0, w;
1466
+ if (!f) {
1467
+ const p = [Pe.bind(this), void 0];
1468
+ for (p.unshift(...c), p.push(...l), w = p.length, u = Promise.resolve(n); d < w; )
1469
+ u = u.then(p[d++], p[d++]);
1470
+ return u;
1471
+ }
1472
+ w = c.length;
1473
+ let E = n;
1474
+ for (d = 0; d < w; ) {
1475
+ const p = c[d++], y = c[d++];
1476
+ try {
1477
+ E = p(E);
1478
+ } catch (h) {
1479
+ y.call(this, h);
1480
+ break;
1481
+ }
1482
+ }
1483
+ try {
1484
+ u = Pe.call(this, E);
1485
+ } catch (p) {
1486
+ return Promise.reject(p);
1487
+ }
1488
+ for (d = 0, w = l.length; d < w; )
1489
+ u = u.then(l[d++], l[d++]);
1490
+ return u;
1491
+ }
1492
+ getUri(t) {
1493
+ t = k(this.defaults, t);
1494
+ const n = Ye(t.baseURL, t.url, t.allowAbsoluteUrls);
1495
+ return Ke(n, t.params, t.paramsSerializer);
1496
+ }
1497
+ };
1498
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1499
+ F.prototype[t] = function(n, r) {
1500
+ return this.request(k(r || {}, {
1501
+ method: t,
1502
+ url: n,
1503
+ data: (r || {}).data
1504
+ }));
1505
+ };
1506
+ });
1507
+ a.forEach(["post", "put", "patch"], function(t) {
1508
+ function n(r) {
1509
+ return function(i, o, c) {
1510
+ return this.request(k(c || {}, {
1511
+ method: t,
1512
+ headers: r ? {
1513
+ "Content-Type": "multipart/form-data"
1514
+ } : {},
1515
+ url: i,
1516
+ data: o
1517
+ }));
1518
+ };
1519
+ }
1520
+ F.prototype[t] = n(), F.prototype[t + "Form"] = n(!0);
1521
+ });
1522
+ let In = class st {
1523
+ constructor(t) {
1524
+ if (typeof t != "function")
1525
+ throw new TypeError("executor must be a function.");
1526
+ let n;
1527
+ this.promise = new Promise(function(i) {
1528
+ n = i;
1529
+ });
1530
+ const r = this;
1531
+ this.promise.then((s) => {
1532
+ if (!r._listeners) return;
1533
+ let i = r._listeners.length;
1534
+ for (; i-- > 0; )
1535
+ r._listeners[i](s);
1536
+ r._listeners = null;
1537
+ }), this.promise.then = (s) => {
1538
+ let i;
1539
+ const o = new Promise((c) => {
1540
+ r.subscribe(c), i = c;
1541
+ }).then(s);
1542
+ return o.cancel = function() {
1543
+ r.unsubscribe(i);
1544
+ }, o;
1545
+ }, t(function(i, o, c) {
1546
+ r.reason || (r.reason = new D(i, o, c), n(r.reason));
1547
+ });
1548
+ }
1549
+ /**
1550
+ * Throws a `CanceledError` if cancellation has been requested.
1551
+ */
1552
+ throwIfRequested() {
1553
+ if (this.reason)
1554
+ throw this.reason;
1555
+ }
1556
+ /**
1557
+ * Subscribe to the cancel signal
1558
+ */
1559
+ subscribe(t) {
1560
+ if (this.reason) {
1561
+ t(this.reason);
1562
+ return;
1563
+ }
1564
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1565
+ }
1566
+ /**
1567
+ * Unsubscribe from the cancel signal
1568
+ */
1569
+ unsubscribe(t) {
1570
+ if (!this._listeners)
1571
+ return;
1572
+ const n = this._listeners.indexOf(t);
1573
+ n !== -1 && this._listeners.splice(n, 1);
1574
+ }
1575
+ toAbortSignal() {
1576
+ const t = new AbortController(), n = (r) => {
1577
+ t.abort(r);
1578
+ };
1579
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1580
+ }
1581
+ /**
1582
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1583
+ * cancels the `CancelToken`.
1584
+ */
1585
+ static source() {
1586
+ let t;
1587
+ return {
1588
+ token: new st(function(s) {
1589
+ t = s;
1590
+ }),
1591
+ cancel: t
1592
+ };
1593
+ }
1594
+ };
1595
+ function qn(e) {
1596
+ return function(n) {
1597
+ return e.apply(null, n);
1598
+ };
1599
+ }
1600
+ function Mn(e) {
1601
+ return a.isObject(e) && e.isAxiosError === !0;
1602
+ }
1603
+ const fe = {
1604
+ Continue: 100,
1605
+ SwitchingProtocols: 101,
1606
+ Processing: 102,
1607
+ EarlyHints: 103,
1608
+ Ok: 200,
1609
+ Created: 201,
1610
+ Accepted: 202,
1611
+ NonAuthoritativeInformation: 203,
1612
+ NoContent: 204,
1613
+ ResetContent: 205,
1614
+ PartialContent: 206,
1615
+ MultiStatus: 207,
1616
+ AlreadyReported: 208,
1617
+ ImUsed: 226,
1618
+ MultipleChoices: 300,
1619
+ MovedPermanently: 301,
1620
+ Found: 302,
1621
+ SeeOther: 303,
1622
+ NotModified: 304,
1623
+ UseProxy: 305,
1624
+ Unused: 306,
1625
+ TemporaryRedirect: 307,
1626
+ PermanentRedirect: 308,
1627
+ BadRequest: 400,
1628
+ Unauthorized: 401,
1629
+ PaymentRequired: 402,
1630
+ Forbidden: 403,
1631
+ NotFound: 404,
1632
+ MethodNotAllowed: 405,
1633
+ NotAcceptable: 406,
1634
+ ProxyAuthenticationRequired: 407,
1635
+ RequestTimeout: 408,
1636
+ Conflict: 409,
1637
+ Gone: 410,
1638
+ LengthRequired: 411,
1639
+ PreconditionFailed: 412,
1640
+ PayloadTooLarge: 413,
1641
+ UriTooLong: 414,
1642
+ UnsupportedMediaType: 415,
1643
+ RangeNotSatisfiable: 416,
1644
+ ExpectationFailed: 417,
1645
+ ImATeapot: 418,
1646
+ MisdirectedRequest: 421,
1647
+ UnprocessableEntity: 422,
1648
+ Locked: 423,
1649
+ FailedDependency: 424,
1650
+ TooEarly: 425,
1651
+ UpgradeRequired: 426,
1652
+ PreconditionRequired: 428,
1653
+ TooManyRequests: 429,
1654
+ RequestHeaderFieldsTooLarge: 431,
1655
+ UnavailableForLegalReasons: 451,
1656
+ InternalServerError: 500,
1657
+ NotImplemented: 501,
1658
+ BadGateway: 502,
1659
+ ServiceUnavailable: 503,
1660
+ GatewayTimeout: 504,
1661
+ HttpVersionNotSupported: 505,
1662
+ VariantAlsoNegotiates: 506,
1663
+ InsufficientStorage: 507,
1664
+ LoopDetected: 508,
1665
+ NotExtended: 510,
1666
+ NetworkAuthenticationRequired: 511
1667
+ };
1668
+ Object.entries(fe).forEach(([e, t]) => {
1669
+ fe[t] = e;
1670
+ });
1671
+ function ot(e) {
1672
+ const t = new F(e), n = Be(F.prototype.request, t);
1673
+ return a.extend(n, F.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1674
+ return ot(k(e, s));
1675
+ }, n;
1676
+ }
1677
+ const g = ot(z);
1678
+ g.Axios = F;
1679
+ g.CanceledError = D;
1680
+ g.CancelToken = In;
1681
+ g.isCancel = Xe;
1682
+ g.VERSION = rt;
1683
+ g.toFormData = Z;
1684
+ g.AxiosError = m;
1685
+ g.Cancel = g.CanceledError;
1686
+ g.all = function(t) {
1687
+ return Promise.all(t);
1688
+ };
1689
+ g.spread = qn;
1690
+ g.isAxiosError = Mn;
1691
+ g.mergeConfig = k;
1692
+ g.AxiosHeaders = C;
1693
+ g.formToJSON = (e) => Ge(a.isHTMLForm(e) ? new FormData(e) : e);
1694
+ g.getAdapter = nt.getAdapter;
1695
+ g.HttpStatusCode = fe;
1696
+ g.default = g;
1697
+ const {
1698
+ Axios: tr,
1699
+ AxiosError: nr,
1700
+ CanceledError: rr,
1701
+ isCancel: sr,
1702
+ CancelToken: or,
1703
+ VERSION: ir,
1704
+ all: ar,
1705
+ Cancel: cr,
1706
+ isAxiosError: ur,
1707
+ spread: lr,
1708
+ toFormData: fr,
1709
+ AxiosHeaders: dr,
1710
+ HttpStatusCode: pr,
1711
+ formToJSON: hr,
1712
+ getAdapter: mr,
1713
+ mergeConfig: yr
1714
+ } = g;
1715
+ /*! js-cookie v3.0.5 | MIT */
1716
+ function v(e) {
1717
+ for (var t = 1; t < arguments.length; t++) {
1718
+ var n = arguments[t];
1719
+ for (var r in n)
1720
+ e[r] = n[r];
1721
+ }
1722
+ return e;
1723
+ }
1724
+ var Hn = {
1725
+ read: function(e) {
1726
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
1727
+ },
1728
+ write: function(e) {
1729
+ return encodeURIComponent(e).replace(
1730
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
1731
+ decodeURIComponent
1732
+ );
1733
+ }
1734
+ };
1735
+ function de(e, t) {
1736
+ function n(s, i, o) {
1737
+ if (!(typeof document > "u")) {
1738
+ o = v({}, t, o), typeof o.expires == "number" && (o.expires = new Date(Date.now() + o.expires * 864e5)), o.expires && (o.expires = o.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
1739
+ var c = "";
1740
+ for (var f in o)
1741
+ o[f] && (c += "; " + f, o[f] !== !0 && (c += "=" + o[f].split(";")[0]));
1742
+ return document.cookie = s + "=" + e.write(i, s) + c;
1743
+ }
1744
+ }
1745
+ function r(s) {
1746
+ if (!(typeof document > "u" || arguments.length && !s)) {
1747
+ for (var i = document.cookie ? document.cookie.split("; ") : [], o = {}, c = 0; c < i.length; c++) {
1748
+ var f = i[c].split("="), l = f.slice(1).join("=");
1749
+ try {
1750
+ var u = decodeURIComponent(f[0]);
1751
+ if (o[u] = e.read(l, u), s === u)
1752
+ break;
1753
+ } catch {
1754
+ }
1755
+ }
1756
+ return s ? o[s] : o;
1757
+ }
1758
+ }
1759
+ return Object.create(
1760
+ {
1761
+ set: n,
1762
+ get: r,
1763
+ remove: function(s, i) {
1764
+ n(
1765
+ s,
1766
+ "",
1767
+ v({}, i, {
1768
+ expires: -1
1769
+ })
1770
+ );
1771
+ },
1772
+ withAttributes: function(s) {
1773
+ return de(this.converter, v({}, this.attributes, s));
1774
+ },
1775
+ withConverter: function(s) {
1776
+ return de(v({}, this.converter, s), this.attributes);
1777
+ }
1778
+ },
1779
+ {
1780
+ attributes: { value: Object.freeze(t) },
1781
+ converter: { value: Object.freeze(e) }
1782
+ }
1783
+ );
1784
+ }
1785
+ var Ne = de(Hn, { path: "/" });
1786
+ const oe = "loginType", zn = (e) => new URL(location.href).searchParams.get(e), $n = () => {
1787
+ const e = zn(oe) || "";
1788
+ return e ? (localStorage.setItem(oe, e), e) : localStorage.getItem(oe) || "";
1789
+ }, vn = "/api/justauth/client/v1/visitor/sso-param", Jn = "/api/justauth/client/v1/visitor/jmc/sso/status", it = "thirdLogouSource", Vn = ["zhongshen", "jmc"], Kn = {
1790
+ uat: "https://sso-uat.jmc.com.cn"
1791
+ };
1792
+ let ye = "";
1793
+ const we = () => localStorage.getItem(it) || ye, at = (e) => {
1794
+ const t = $n();
1795
+ return e === "jmc" && t === "das" ? !1 : Vn.includes(e);
1796
+ }, wr = () => at(we()), ct = (e) => {
1797
+ ye = we(), localStorage.removeItem(it), window.__isAutoCloseApp = !1, location.href = e;
1798
+ }, Wn = (e) => {
1799
+ ke();
1800
+ const n = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
1801
+ ct(n);
1802
+ }, Gn = async (e = "") => {
1803
+ try {
1804
+ const { baseURL: t } = Fe();
1805
+ await g.create().post(
1806
+ Jn,
1807
+ {
1808
+ ssoToken: e,
1809
+ // 平台退出前已清理本地 token,这里通过 cookie 兜底读取,便于后端定位并清理 cookie token。
1810
+ platformToken: ut()
1811
+ },
1812
+ { baseURL: t }
1813
+ );
1814
+ } catch {
1815
+ }
1816
+ }, Xn = async () => {
1817
+ let e = "";
1818
+ try {
1819
+ const { baseURL: s } = Fe();
1820
+ e = (await g.create().get(vn, {
1821
+ baseURL: s,
1822
+ params: {
1823
+ source: "jmc",
1824
+ fieldKey: "homeUrl"
1825
+ }
1826
+ })).data || "";
1827
+ } catch {
1828
+ }
1829
+ const t = (() => {
1830
+ if (!e) return "";
1831
+ try {
1832
+ return new URL(e).origin;
1833
+ } catch {
1834
+ return "";
1835
+ }
1836
+ })(), n = t === Kn.uat ? Ne.get("sso_access_token_uat") : Ne.get("sso_access_token"), r = `${t}/oauth2/system/auth/logout?sso_token=${n}`;
1837
+ try {
1838
+ await g.post(r);
1839
+ } catch {
1840
+ }
1841
+ await Gn(n), ke(), ct(e);
1842
+ }, gr = async (e = "") => {
1843
+ const t = we();
1844
+ if (at(t)) {
1845
+ if (ye = t, t === "zhongshen") {
1846
+ Wn(e);
1847
+ return;
1848
+ }
1849
+ t === "jmc" && await Xn();
1850
+ }
1851
+ };
1852
+ export {
1853
+ wr as isThirdLogin,
1854
+ Xn as jmcLogout,
1855
+ gr as thirdLogout,
1856
+ Wn as zhongshenLogout
1857
+ };