@opencloud-eu/web-client 6.0.0 → 6.1.0

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