@das-fed/upf-utils 6.4.0-dev.231 → 6.4.0-dev.233

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