@das-fed/utils 6.3.0-beta.3 → 6.3.0-beta.8

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