@feedmepos/mf-brand-app-builder 0.5.15 → 0.5.17

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