@fuul/sdk 3.3.3 → 3.4.1

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.
package/dist/index.mjs CHANGED
@@ -1,37 +1,38 @@
1
- var rt = Object.defineProperty;
2
- var st = (e, t, n) => t in e ? rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var E = (e, t, n) => (st(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- function Ue(e, t) {
1
+ var ot = Object.defineProperty;
2
+ var it = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var S = (e, t, n) => (it(e, typeof t != "symbol" ? t + "" : t, n), n);
4
+ function Le(e, t) {
5
5
  return function() {
6
6
  return e.apply(t, arguments);
7
7
  };
8
8
  }
9
- const { toString: Le } = Object.prototype, { getPrototypeOf: ie } = Object, ae = ((e) => (t) => {
10
- const n = Le.call(t);
9
+ const { toString: at } = Object.prototype, { getPrototypeOf: ae } = Object, V = ((e) => (t) => {
10
+ const n = at.call(t);
11
11
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), K = (e) => (t) => typeof t === e, { isArray: D } = Array, I = K("undefined");
13
- function ot(e) {
14
- return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
12
+ })(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => V(t) === e), K = (e) => (t) => typeof t === e, { isArray: U } = Array, j = K("undefined");
13
+ function ct(e) {
14
+ return e !== null && !j(e) && e.constructor !== null && !j(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
15
  }
16
16
  const Be = C("ArrayBuffer");
17
- function it(e) {
17
+ function ut(e) {
18
18
  let t;
19
19
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Be(e.buffer), t;
20
20
  }
21
- const at = K("string"), _ = K("function"), Ie = K("number"), ce = (e) => e !== null && typeof e == "object", ct = (e) => e === !0 || e === !1, $ = (e) => {
22
- if (ae(e) !== "object")
21
+ const lt = K("string"), A = K("function"), Ie = K("number"), J = (e) => e !== null && typeof e == "object", ft = (e) => e === !0 || e === !1, $ = (e) => {
22
+ if (V(e) !== "object")
23
23
  return !1;
24
- const t = ie(e);
24
+ const t = ae(e);
25
25
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
26
- }, ut = C("Date"), lt = C("File"), ft = C("Blob"), dt = C("FileList"), ht = (e) => ce(e) && _(e.pipe), pt = (e) => {
27
- const t = "[object FormData]";
28
- return e && (typeof FormData == "function" && e instanceof FormData || Le.call(e) === t || _(e.toString) && e.toString() === t);
29
- }, mt = C("URLSearchParams"), yt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
26
+ }, dt = C("Date"), pt = C("File"), ht = C("Blob"), mt = C("FileList"), yt = (e) => J(e) && A(e.pipe), wt = (e) => {
27
+ let t;
28
+ return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = V(e)) === "formdata" || // detect form-data instance
29
+ t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
30
+ }, gt = C("URLSearchParams"), Et = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
30
31
  function k(e, t, { allOwnKeys: n = !1 } = {}) {
31
32
  if (e === null || typeof e > "u")
32
33
  return;
33
34
  let r, s;
34
- if (typeof e != "object" && (e = [e]), D(e))
35
+ if (typeof e != "object" && (e = [e]), U(e))
35
36
  for (r = 0, s = e.length; r < s; r++)
36
37
  t.call(null, e[r], r, e);
37
38
  else {
@@ -41,7 +42,7 @@ function k(e, t, { allOwnKeys: n = !1 } = {}) {
41
42
  c = i[r], t.call(null, e[c], c, e);
42
43
  }
43
44
  }
44
- function ke(e, t) {
45
+ function je(e, t) {
45
46
  t = t.toLowerCase();
46
47
  const n = Object.keys(e);
47
48
  let r = n.length, s;
@@ -50,23 +51,23 @@ function ke(e, t) {
50
51
  return s;
51
52
  return null;
52
53
  }
53
- const je = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !I(e) && e !== je;
54
+ const ke = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !j(e) && e !== ke;
54
55
  function te() {
55
56
  const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
56
- const i = e && ke(t, s) || s;
57
- $(t[i]) && $(r) ? t[i] = te(t[i], r) : $(r) ? t[i] = te({}, r) : D(r) ? t[i] = r.slice() : t[i] = r;
57
+ const i = e && je(t, s) || s;
58
+ $(t[i]) && $(r) ? t[i] = te(t[i], r) : $(r) ? t[i] = te({}, r) : U(r) ? t[i] = r.slice() : t[i] = r;
58
59
  };
59
60
  for (let r = 0, s = arguments.length; r < s; r++)
60
61
  arguments[r] && k(arguments[r], n);
61
62
  return t;
62
63
  }
63
- const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
64
- n && _(s) ? e[i] = Ue(s, n) : e[i] = s;
65
- }, { allOwnKeys: r }), e), gt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Et = (e, t, n, r) => {
64
+ const St = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
65
+ n && A(s) ? e[i] = Le(s, n) : e[i] = s;
66
+ }, { allOwnKeys: r }), e), bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), At = (e, t, n, r) => {
66
67
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
67
68
  value: t.prototype
68
69
  }), n && Object.assign(e.prototype, n);
69
- }, St = (e, t, n, r) => {
70
+ }, Rt = (e, t, n, r) => {
70
71
  let s, i, o;
71
72
  const c = {};
72
73
  if (t = t || {}, e == null)
@@ -74,17 +75,17 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
74
75
  do {
75
76
  for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
76
77
  o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
77
- e = n !== !1 && ie(e);
78
+ e = n !== !1 && ae(e);
78
79
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
79
80
  return t;
80
- }, bt = (e, t, n) => {
81
+ }, Ct = (e, t, n) => {
81
82
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
82
83
  const r = e.indexOf(t, n);
83
84
  return r !== -1 && r === n;
84
- }, At = (e) => {
85
+ }, Ot = (e) => {
85
86
  if (!e)
86
87
  return null;
87
- if (D(e))
88
+ if (U(e))
88
89
  return e;
89
90
  let t = e.length;
90
91
  if (!Ie(t))
@@ -93,35 +94,36 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
93
94
  for (; t-- > 0; )
94
95
  n[t] = e[t];
95
96
  return n;
96
- }, Rt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), Ct = (e, t) => {
97
+ }, Tt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ae(Uint8Array)), Pt = (e, t) => {
97
98
  const r = (e && e[Symbol.iterator]).call(e);
98
99
  let s;
99
100
  for (; (s = r.next()) && !s.done; ) {
100
101
  const i = s.value;
101
102
  t.call(e, i[0], i[1]);
102
103
  }
103
- }, Ot = (e, t) => {
104
+ }, _t = (e, t) => {
104
105
  let n;
105
106
  const r = [];
106
107
  for (; (n = e.exec(t)) !== null; )
107
108
  r.push(n);
108
109
  return r;
109
- }, Tt = C("HTMLFormElement"), Pt = (e) => e.toLowerCase().replace(
110
+ }, xt = C("HTMLFormElement"), Nt = (e) => e.toLowerCase().replace(
110
111
  /[-_\s]([a-z\d])(\w*)/g,
111
112
  function(n, r, s) {
112
113
  return r.toUpperCase() + s;
113
114
  }
114
- ), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), _t = C("RegExp"), $e = (e, t) => {
115
+ ), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ft = C("RegExp"), $e = (e, t) => {
115
116
  const n = Object.getOwnPropertyDescriptors(e), r = {};
116
117
  k(n, (s, i) => {
117
- t(s, i, e) !== !1 && (r[i] = s);
118
+ let o;
119
+ (o = t(s, i, e)) !== !1 && (r[i] = o || s);
118
120
  }), Object.defineProperties(e, r);
119
- }, Nt = (e) => {
121
+ }, Dt = (e) => {
120
122
  $e(e, (t, n) => {
121
- if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
123
+ if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
122
124
  return !1;
123
125
  const r = e[n];
124
- if (_(r)) {
126
+ if (A(r)) {
125
127
  if (t.enumerable = !1, "writable" in t) {
126
128
  t.writable = !1;
127
129
  return;
@@ -131,96 +133,98 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, i) => {
131
133
  });
132
134
  }
133
135
  });
134
- }, xt = (e, t) => {
136
+ }, Ut = (e, t) => {
135
137
  const n = {}, r = (s) => {
136
138
  s.forEach((i) => {
137
139
  n[i] = !0;
138
140
  });
139
141
  };
140
- return D(e) ? r(e) : r(String(e).split(t)), n;
141
- }, Ft = () => {
142
- }, Dt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", He = {
142
+ return U(e) ? r(e) : r(String(e).split(t)), n;
143
+ }, Lt = () => {
144
+ }, Bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", He = {
143
145
  DIGIT: we,
144
146
  ALPHA: X,
145
147
  ALPHA_DIGIT: X + X.toUpperCase() + we
146
- }, Ut = (e = 16, t = He.ALPHA_DIGIT) => {
148
+ }, It = (e = 16, t = He.ALPHA_DIGIT) => {
147
149
  let n = "";
148
150
  const { length: r } = t;
149
151
  for (; e--; )
150
152
  n += t[Math.random() * r | 0];
151
153
  return n;
152
154
  };
153
- function Lt(e) {
154
- return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
155
+ function jt(e) {
156
+ return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
155
157
  }
156
- const Bt = (e) => {
158
+ const kt = (e) => {
157
159
  const t = new Array(10), n = (r, s) => {
158
- if (ce(r)) {
160
+ if (J(r)) {
159
161
  if (t.indexOf(r) >= 0)
160
162
  return;
161
163
  if (!("toJSON" in r)) {
162
164
  t[s] = r;
163
- const i = D(r) ? [] : {};
165
+ const i = U(r) ? [] : {};
164
166
  return k(r, (o, c) => {
165
- const d = n(o, s + 1);
166
- !I(d) && (i[c] = d);
167
+ const p = n(o, s + 1);
168
+ !j(p) && (i[c] = p);
167
169
  }), t[s] = void 0, i;
168
170
  }
169
171
  }
170
172
  return r;
171
173
  };
172
174
  return n(e, 0);
173
- }, a = {
174
- isArray: D,
175
+ }, qt = C("AsyncFunction"), $t = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), a = {
176
+ isArray: U,
175
177
  isArrayBuffer: Be,
176
- isBuffer: ot,
177
- isFormData: pt,
178
- isArrayBufferView: it,
179
- isString: at,
178
+ isBuffer: ct,
179
+ isFormData: wt,
180
+ isArrayBufferView: ut,
181
+ isString: lt,
180
182
  isNumber: Ie,
181
- isBoolean: ct,
182
- isObject: ce,
183
+ isBoolean: ft,
184
+ isObject: J,
183
185
  isPlainObject: $,
184
- isUndefined: I,
185
- isDate: ut,
186
- isFile: lt,
187
- isBlob: ft,
188
- isRegExp: _t,
189
- isFunction: _,
190
- isStream: ht,
191
- isURLSearchParams: mt,
192
- isTypedArray: Rt,
193
- isFileList: dt,
186
+ isUndefined: j,
187
+ isDate: dt,
188
+ isFile: pt,
189
+ isBlob: ht,
190
+ isRegExp: Ft,
191
+ isFunction: A,
192
+ isStream: yt,
193
+ isURLSearchParams: gt,
194
+ isTypedArray: Tt,
195
+ isFileList: mt,
194
196
  forEach: k,
195
197
  merge: te,
196
- extend: wt,
197
- trim: yt,
198
- stripBOM: gt,
199
- inherits: Et,
200
- toFlatObject: St,
201
- kindOf: ae,
198
+ extend: St,
199
+ trim: Et,
200
+ stripBOM: bt,
201
+ inherits: At,
202
+ toFlatObject: Rt,
203
+ kindOf: V,
202
204
  kindOfTest: C,
203
- endsWith: bt,
204
- toArray: At,
205
- forEachEntry: Ct,
206
- matchAll: Ot,
207
- isHTMLForm: Tt,
205
+ endsWith: Ct,
206
+ toArray: Ot,
207
+ forEachEntry: Pt,
208
+ matchAll: _t,
209
+ isHTMLForm: xt,
208
210
  hasOwnProperty: ye,
209
211
  hasOwnProp: ye,
210
212
  // an alias to avoid ESLint no-prototype-builtins detection
211
213
  reduceDescriptors: $e,
212
- freezeMethods: Nt,
213
- toObjectSet: xt,
214
- toCamelCase: Pt,
215
- noop: Ft,
216
- toFiniteNumber: Dt,
217
- findKey: ke,
218
- global: je,
214
+ freezeMethods: Dt,
215
+ toObjectSet: Ut,
216
+ toCamelCase: Nt,
217
+ noop: Lt,
218
+ toFiniteNumber: Bt,
219
+ findKey: je,
220
+ global: ke,
219
221
  isContextDefined: qe,
220
222
  ALPHABET: He,
221
- generateString: Ut,
222
- isSpecCompliantForm: Lt,
223
- toJSONObject: Bt
223
+ generateString: It,
224
+ isSpecCompliantForm: jt,
225
+ toJSONObject: kt,
226
+ isAsyncFn: qt,
227
+ isThenable: $t
224
228
  };
225
229
  function m(e, t, n, r, s) {
226
230
  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);
@@ -268,11 +272,11 @@ Object.defineProperties(m, ze);
268
272
  Object.defineProperty(ve, "isAxiosError", { value: !0 });
269
273
  m.from = (e, t, n, r, s, i) => {
270
274
  const o = Object.create(ve);
271
- return a.toFlatObject(e, o, function(d) {
272
- return d !== Error.prototype;
275
+ return a.toFlatObject(e, o, function(p) {
276
+ return p !== Error.prototype;
273
277
  }, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
274
278
  };
275
- const It = null;
279
+ const Ht = null;
276
280
  function ne(e) {
277
281
  return a.isPlainObject(e) || a.isArray(e);
278
282
  }
@@ -284,73 +288,73 @@ function ge(e, t, n) {
284
288
  return s = Ve(s), !n && i ? "[" + s + "]" : s;
285
289
  }).join(n ? "." : "") : t;
286
290
  }
287
- function kt(e) {
291
+ function vt(e) {
288
292
  return a.isArray(e) && !e.some(ne);
289
293
  }
290
- const jt = a.toFlatObject(a, {}, null, function(t) {
294
+ const zt = a.toFlatObject(a, {}, null, function(t) {
291
295
  return /^is[A-Z]/.test(t);
292
296
  });
293
- function J(e, t, n) {
297
+ function M(e, t, n) {
294
298
  if (!a.isObject(e))
295
299
  throw new TypeError("target must be an object");
296
300
  t = t || new FormData(), n = a.toFlatObject(n, {
297
301
  metaTokens: !0,
298
302
  dots: !1,
299
303
  indexes: !1
300
- }, !1, function(p, A) {
301
- return !a.isUndefined(A[p]);
304
+ }, !1, function(d, g) {
305
+ return !a.isUndefined(g[d]);
302
306
  });
303
- const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
307
+ const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
304
308
  if (!a.isFunction(s))
305
309
  throw new TypeError("visitor must be a function");
306
- function u(f) {
310
+ function h(f) {
307
311
  if (f === null)
308
312
  return "";
309
313
  if (a.isDate(f))
310
314
  return f.toISOString();
311
- if (!d && a.isBlob(f))
315
+ if (!p && a.isBlob(f))
312
316
  throw new m("Blob is not supported. Use a Buffer instead.");
313
- return a.isArrayBuffer(f) || a.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
314
- }
315
- function l(f, p, A) {
316
- let S = f;
317
- if (f && !A && typeof f == "object") {
318
- if (a.endsWith(p, "{}"))
319
- p = r ? p : p.slice(0, -2), f = JSON.stringify(f);
320
- else if (a.isArray(f) && kt(f) || (a.isFileList(f) || a.endsWith(p, "[]")) && (S = a.toArray(f)))
321
- return p = Ve(p), S.forEach(function(q, nt) {
322
- !(a.isUndefined(q) || q === null) && t.append(
317
+ return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
318
+ }
319
+ function l(f, d, g) {
320
+ let E = f;
321
+ if (f && !g && typeof f == "object") {
322
+ if (a.endsWith(d, "{}"))
323
+ d = r ? d : d.slice(0, -2), f = JSON.stringify(f);
324
+ else if (a.isArray(f) && vt(f) || (a.isFileList(f) || a.endsWith(d, "[]")) && (E = a.toArray(f)))
325
+ return d = Ve(d), E.forEach(function(_, st) {
326
+ !(a.isUndefined(_) || _ === null) && t.append(
323
327
  // eslint-disable-next-line no-nested-ternary
324
- o === !0 ? ge([p], nt, i) : o === null ? p : p + "[]",
325
- u(q)
328
+ o === !0 ? ge([d], st, i) : o === null ? d : d + "[]",
329
+ h(_)
326
330
  );
327
331
  }), !1;
328
332
  }
329
- return ne(f) ? !0 : (t.append(ge(A, p, i), u(f)), !1);
333
+ return ne(f) ? !0 : (t.append(ge(g, d, i), h(f)), !1);
330
334
  }
331
- const h = [], g = Object.assign(jt, {
335
+ const u = [], w = Object.assign(zt, {
332
336
  defaultVisitor: l,
333
- convertValue: u,
337
+ convertValue: h,
334
338
  isVisitable: ne
335
339
  });
336
- function y(f, p) {
340
+ function b(f, d) {
337
341
  if (!a.isUndefined(f)) {
338
- if (h.indexOf(f) !== -1)
339
- throw Error("Circular reference detected in " + p.join("."));
340
- h.push(f), a.forEach(f, function(S, N) {
341
- (!(a.isUndefined(S) || S === null) && s.call(
342
+ if (u.indexOf(f) !== -1)
343
+ throw Error("Circular reference detected in " + d.join("."));
344
+ u.push(f), a.forEach(f, function(E, P) {
345
+ (!(a.isUndefined(E) || E === null) && s.call(
342
346
  t,
343
- S,
344
- a.isString(N) ? N.trim() : N,
345
- p,
346
- g
347
- )) === !0 && y(S, p ? p.concat(N) : [N]);
348
- }), h.pop();
347
+ E,
348
+ a.isString(P) ? P.trim() : P,
349
+ d,
350
+ w
351
+ )) === !0 && b(E, d ? d.concat(P) : [P]);
352
+ }), u.pop();
349
353
  }
350
354
  }
351
355
  if (!a.isObject(e))
352
356
  throw new TypeError("data must be an object");
353
- return y(e), t;
357
+ return b(e), t;
354
358
  }
355
359
  function Ee(e) {
356
360
  const t = {
@@ -366,10 +370,10 @@ function Ee(e) {
366
370
  return t[r];
367
371
  });
368
372
  }
369
- function ue(e, t) {
370
- this._pairs = [], e && J(e, this, t);
373
+ function ce(e, t) {
374
+ this._pairs = [], e && M(e, this, t);
371
375
  }
372
- const Ke = ue.prototype;
376
+ const Ke = ce.prototype;
373
377
  Ke.append = function(t, n) {
374
378
  this._pairs.push([t, n]);
375
379
  };
@@ -381,21 +385,21 @@ Ke.toString = function(t) {
381
385
  return n(s[0]) + "=" + n(s[1]);
382
386
  }, "").join("&");
383
387
  };
384
- function qt(e) {
388
+ function Vt(e) {
385
389
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
386
390
  }
387
391
  function Je(e, t, n) {
388
392
  if (!t)
389
393
  return e;
390
- const r = n && n.encode || qt, s = n && n.serialize;
394
+ const r = n && n.encode || Vt, s = n && n.serialize;
391
395
  let i;
392
- if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ue(t, n).toString(r), i) {
396
+ if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new ce(t, n).toString(r), i) {
393
397
  const o = e.indexOf("#");
394
398
  o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
395
399
  }
396
400
  return e;
397
401
  }
398
- class $t {
402
+ class Kt {
399
403
  constructor() {
400
404
  this.handlers = [];
401
405
  }
@@ -449,36 +453,39 @@ class $t {
449
453
  });
450
454
  }
451
455
  }
452
- const Se = $t, Me = {
456
+ const Se = Kt, Me = {
453
457
  silentJSONParsing: !0,
454
458
  forcedJSONParsing: !0,
455
459
  clarifyTimeoutError: !1
456
- }, Ht = typeof URLSearchParams < "u" ? URLSearchParams : ue, vt = typeof FormData < "u" ? FormData : null, zt = typeof Blob < "u" ? Blob : null, Vt = (() => {
457
- let e;
458
- return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
459
- })(), Kt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
460
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), b = {
460
+ }, Jt = typeof URLSearchParams < "u" ? URLSearchParams : ce, Mt = typeof FormData < "u" ? FormData : null, Wt = typeof Blob < "u" ? Blob : null, Gt = {
461
461
  isBrowser: !0,
462
462
  classes: {
463
- URLSearchParams: Ht,
464
- FormData: vt,
465
- Blob: zt
463
+ URLSearchParams: Jt,
464
+ FormData: Mt,
465
+ Blob: Wt
466
466
  },
467
- isStandardBrowserEnv: Vt,
468
- isStandardBrowserWebWorkerEnv: Kt,
469
467
  protocols: ["http", "https", "file", "blob", "url", "data"]
468
+ }, We = typeof window < "u" && typeof document < "u", Xt = ((e) => We && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Qt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
469
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
470
+ __proto__: null,
471
+ hasBrowserEnv: We,
472
+ hasStandardBrowserEnv: Xt,
473
+ hasStandardBrowserWebWorkerEnv: Qt
474
+ }, Symbol.toStringTag, { value: "Module" })), R = {
475
+ ...Yt,
476
+ ...Gt
470
477
  };
471
- function Jt(e, t) {
472
- return J(e, new b.classes.URLSearchParams(), Object.assign({
478
+ function Zt(e, t) {
479
+ return M(e, new R.classes.URLSearchParams(), Object.assign({
473
480
  visitor: function(n, r, s, i) {
474
- return b.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
481
+ return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
475
482
  }
476
483
  }, t));
477
484
  }
478
- function Mt(e) {
485
+ function en(e) {
479
486
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
480
487
  }
481
- function Wt(e) {
488
+ function tn(e) {
482
489
  const t = {}, n = Object.keys(e);
483
490
  let r;
484
491
  const s = n.length;
@@ -487,24 +494,21 @@ function Wt(e) {
487
494
  i = n[r], t[i] = e[i];
488
495
  return t;
489
496
  }
490
- function We(e) {
497
+ function Ge(e) {
491
498
  function t(n, r, s, i) {
492
499
  let o = n[i++];
493
- const c = Number.isFinite(+o), d = i >= n.length;
494
- return o = !o && a.isArray(s) ? s.length : o, d ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Wt(s[o])), !c);
500
+ const c = Number.isFinite(+o), p = i >= n.length;
501
+ return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = tn(s[o])), !c);
495
502
  }
496
503
  if (a.isFormData(e) && a.isFunction(e.entries)) {
497
504
  const n = {};
498
505
  return a.forEachEntry(e, (r, s) => {
499
- t(Mt(r), s, n, 0);
506
+ t(en(r), s, n, 0);
500
507
  }), n;
501
508
  }
502
509
  return null;
503
510
  }
504
- const Gt = {
505
- "Content-Type": void 0
506
- };
507
- function Xt(e, t, n) {
511
+ function nn(e, t, n) {
508
512
  if (a.isString(e))
509
513
  try {
510
514
  return (t || JSON.parse)(e), a.trim(e);
@@ -514,13 +518,13 @@ function Xt(e, t, n) {
514
518
  }
515
519
  return (n || JSON.stringify)(e);
516
520
  }
517
- const M = {
521
+ const ue = {
518
522
  transitional: Me,
519
523
  adapter: ["xhr", "http"],
520
524
  transformRequest: [function(t, n) {
521
525
  const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
522
526
  if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
523
- return s && s ? JSON.stringify(We(t)) : t;
527
+ return s && s ? JSON.stringify(Ge(t)) : t;
524
528
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
525
529
  return t;
526
530
  if (a.isArrayBufferView(t))
@@ -530,20 +534,20 @@ const M = {
530
534
  let c;
531
535
  if (i) {
532
536
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
533
- return Jt(t, this.formSerializer).toString();
537
+ return Zt(t, this.formSerializer).toString();
534
538
  if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
535
- const d = this.env && this.env.FormData;
536
- return J(
539
+ const p = this.env && this.env.FormData;
540
+ return M(
537
541
  c ? { "files[]": t } : t,
538
- d && new d(),
542
+ p && new p(),
539
543
  this.formSerializer
540
544
  );
541
545
  }
542
546
  }
543
- return i || s ? (n.setContentType("application/json", !1), Xt(t)) : t;
547
+ return i || s ? (n.setContentType("application/json", !1), nn(t)) : t;
544
548
  }],
545
549
  transformResponse: [function(t) {
546
- const n = this.transitional || M.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
550
+ const n = this.transitional || ue.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
547
551
  if (t && a.isString(t) && (r && !this.responseType || s)) {
548
552
  const o = !(n && n.silentJSONParsing) && s;
549
553
  try {
@@ -565,25 +569,23 @@ const M = {
565
569
  maxContentLength: -1,
566
570
  maxBodyLength: -1,
567
571
  env: {
568
- FormData: b.classes.FormData,
569
- Blob: b.classes.Blob
572
+ FormData: R.classes.FormData,
573
+ Blob: R.classes.Blob
570
574
  },
571
575
  validateStatus: function(t) {
572
576
  return t >= 200 && t < 300;
573
577
  },
574
578
  headers: {
575
579
  common: {
576
- Accept: "application/json, text/plain, */*"
580
+ Accept: "application/json, text/plain, */*",
581
+ "Content-Type": void 0
577
582
  }
578
583
  }
579
584
  };
580
- a.forEach(["delete", "get", "head"], function(t) {
581
- M.headers[t] = {};
582
- });
583
- a.forEach(["post", "put", "patch"], function(t) {
584
- M.headers[t] = a.merge(Gt);
585
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
586
+ ue.headers[e] = {};
585
587
  });
586
- const le = M, Yt = a.toObjectSet([
588
+ const le = ue, rn = a.toObjectSet([
587
589
  "age",
588
590
  "authorization",
589
591
  "content-length",
@@ -601,31 +603,29 @@ const le = M, Yt = a.toObjectSet([
601
603
  "referer",
602
604
  "retry-after",
603
605
  "user-agent"
604
- ]), Qt = (e) => {
606
+ ]), sn = (e) => {
605
607
  const t = {};
606
608
  let n, r, s;
607
609
  return e && e.split(`
608
610
  `).forEach(function(o) {
609
- s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.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);
611
+ s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.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);
610
612
  }), t;
611
613
  }, be = Symbol("internals");
612
- function L(e) {
614
+ function B(e) {
613
615
  return e && String(e).trim().toLowerCase();
614
616
  }
615
617
  function H(e) {
616
618
  return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
617
619
  }
618
- function Zt(e) {
620
+ function on(e) {
619
621
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
620
622
  let r;
621
623
  for (; r = n.exec(e); )
622
624
  t[r[1]] = r[2];
623
625
  return t;
624
626
  }
625
- function en(e) {
626
- return /^[-_a-zA-Z]+$/.test(e.trim());
627
- }
628
- function Y(e, t, n, r, s) {
627
+ const an = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
628
+ function Q(e, t, n, r, s) {
629
629
  if (a.isFunction(r))
630
630
  return r.call(this, t, n);
631
631
  if (s && (t = n), !!a.isString(t)) {
@@ -635,10 +635,10 @@ function Y(e, t, n, r, s) {
635
635
  return r.test(t);
636
636
  }
637
637
  }
638
- function tn(e) {
638
+ function cn(e) {
639
639
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
640
640
  }
641
- function nn(e, t) {
641
+ function un(e, t) {
642
642
  const n = a.toCamelCase(" " + t);
643
643
  ["get", "set", "has"].forEach((r) => {
644
644
  Object.defineProperty(e, r + n, {
@@ -655,25 +655,25 @@ let W = class {
655
655
  }
656
656
  set(t, n, r) {
657
657
  const s = this;
658
- function i(c, d, u) {
659
- const l = L(d);
658
+ function i(c, p, h) {
659
+ const l = B(p);
660
660
  if (!l)
661
661
  throw new Error("header name must be a non-empty string");
662
- const h = a.findKey(s, l);
663
- (!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || d] = H(c));
662
+ const u = a.findKey(s, l);
663
+ (!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || p] = H(c));
664
664
  }
665
- const o = (c, d) => a.forEach(c, (u, l) => i(u, l, d));
666
- return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !en(t) ? o(Qt(t), n) : t != null && i(n, t, r), this;
665
+ const o = (c, p) => a.forEach(c, (h, l) => i(h, l, p));
666
+ return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !an(t) ? o(sn(t), n) : t != null && i(n, t, r), this;
667
667
  }
668
668
  get(t, n) {
669
- if (t = L(t), t) {
669
+ if (t = B(t), t) {
670
670
  const r = a.findKey(this, t);
671
671
  if (r) {
672
672
  const s = this[r];
673
673
  if (!n)
674
674
  return s;
675
675
  if (n === !0)
676
- return Zt(s);
676
+ return on(s);
677
677
  if (a.isFunction(n))
678
678
  return n.call(this, s, r);
679
679
  if (a.isRegExp(n))
@@ -683,9 +683,9 @@ let W = class {
683
683
  }
684
684
  }
685
685
  has(t, n) {
686
- if (t = L(t), t) {
686
+ if (t = B(t), t) {
687
687
  const r = a.findKey(this, t);
688
- return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
688
+ return !!(r && this[r] !== void 0 && (!n || Q(this, this[r], r, n)));
689
689
  }
690
690
  return !1;
691
691
  }
@@ -693,9 +693,9 @@ let W = class {
693
693
  const r = this;
694
694
  let s = !1;
695
695
  function i(o) {
696
- if (o = L(o), o) {
696
+ if (o = B(o), o) {
697
697
  const c = a.findKey(r, o);
698
- c && (!n || Y(r, r[c], c, n)) && (delete r[c], s = !0);
698
+ c && (!n || Q(r, r[c], c, n)) && (delete r[c], s = !0);
699
699
  }
700
700
  }
701
701
  return a.isArray(t) ? t.forEach(i) : i(t), s;
@@ -705,7 +705,7 @@ let W = class {
705
705
  let r = n.length, s = !1;
706
706
  for (; r--; ) {
707
707
  const i = n[r];
708
- (!t || Y(this, this[i], i, t, !0)) && (delete this[i], s = !0);
708
+ (!t || Q(this, this[i], i, t, !0)) && (delete this[i], s = !0);
709
709
  }
710
710
  return s;
711
711
  }
@@ -717,7 +717,7 @@ let W = class {
717
717
  n[o] = H(s), delete n[i];
718
718
  return;
719
719
  }
720
- const c = t ? tn(i) : String(i).trim();
720
+ const c = t ? cn(i) : String(i).trim();
721
721
  c !== i && delete n[i], n[c] = H(s), r[c] = !0;
722
722
  }), this;
723
723
  }
@@ -752,33 +752,41 @@ let W = class {
752
752
  accessors: {}
753
753
  }).accessors, s = this.prototype;
754
754
  function i(o) {
755
- const c = L(o);
756
- r[c] || (nn(s, o), r[c] = !0);
755
+ const c = B(o);
756
+ r[c] || (un(s, o), r[c] = !0);
757
757
  }
758
758
  return a.isArray(t) ? t.forEach(i) : i(t), this;
759
759
  }
760
760
  };
761
761
  W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
762
- a.freezeMethods(W.prototype);
762
+ a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
763
+ let n = t[0].toUpperCase() + t.slice(1);
764
+ return {
765
+ get: () => e,
766
+ set(r) {
767
+ this[n] = r;
768
+ }
769
+ };
770
+ });
763
771
  a.freezeMethods(W);
764
- const R = W;
765
- function Q(e, t) {
766
- const n = this || le, r = t || n, s = R.from(r.headers);
772
+ const O = W;
773
+ function Y(e, t) {
774
+ const n = this || le, r = t || n, s = O.from(r.headers);
767
775
  let i = r.data;
768
776
  return a.forEach(e, function(c) {
769
777
  i = c.call(n, i, s.normalize(), t ? t.status : void 0);
770
778
  }), s.normalize(), i;
771
779
  }
772
- function Ge(e) {
780
+ function Xe(e) {
773
781
  return !!(e && e.__CANCEL__);
774
782
  }
775
- function j(e, t, n) {
783
+ function q(e, t, n) {
776
784
  m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
777
785
  }
778
- a.inherits(j, m, {
786
+ a.inherits(q, m, {
779
787
  __CANCEL__: !0
780
788
  });
781
- function rn(e, t, n) {
789
+ function ln(e, t, n) {
782
790
  const r = n.config.validateStatus;
783
791
  !n.status || !r || r(n.status) ? e(n) : t(new m(
784
792
  "Request failed with status code " + n.status,
@@ -788,47 +796,43 @@ function rn(e, t, n) {
788
796
  n
789
797
  ));
790
798
  }
791
- const sn = b.isStandardBrowserEnv ? (
799
+ const fn = R.hasStandardBrowserEnv ? (
792
800
  // Standard browser envs support document.cookie
793
- function() {
794
- return {
795
- write: function(n, r, s, i, o, c) {
796
- const d = [];
797
- d.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && d.push("expires=" + new Date(s).toGMTString()), a.isString(i) && d.push("path=" + i), a.isString(o) && d.push("domain=" + o), c === !0 && d.push("secure"), document.cookie = d.join("; ");
798
- },
799
- read: function(n) {
800
- const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
801
- return r ? decodeURIComponent(r[3]) : null;
802
- },
803
- remove: function(n) {
804
- this.write(n, "", Date.now() - 864e5);
805
- }
806
- };
807
- }()
801
+ {
802
+ write(e, t, n, r, s, i) {
803
+ const o = [e + "=" + encodeURIComponent(t)];
804
+ a.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), a.isString(r) && o.push("path=" + r), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
805
+ },
806
+ read(e) {
807
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
808
+ return t ? decodeURIComponent(t[3]) : null;
809
+ },
810
+ remove(e) {
811
+ this.write(e, "", Date.now() - 864e5);
812
+ }
813
+ }
808
814
  ) : (
809
- // Non standard browser env (web workers, react-native) lack needed support.
810
- function() {
811
- return {
812
- write: function() {
813
- },
814
- read: function() {
815
- return null;
816
- },
817
- remove: function() {
818
- }
819
- };
820
- }()
815
+ // Non-standard browser env (web workers, react-native) lack needed support.
816
+ {
817
+ write() {
818
+ },
819
+ read() {
820
+ return null;
821
+ },
822
+ remove() {
823
+ }
824
+ }
821
825
  );
822
- function on(e) {
826
+ function dn(e) {
823
827
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
824
828
  }
825
- function an(e, t) {
826
- return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
829
+ function pn(e, t) {
830
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
827
831
  }
828
- function Xe(e, t) {
829
- return e && !on(t) ? an(e, t) : t;
832
+ function Qe(e, t) {
833
+ return e && !dn(t) ? pn(e, t) : t;
830
834
  }
831
- const cn = b.isStandardBrowserEnv ? (
835
+ const hn = R.hasStandardBrowserEnv ? (
832
836
  // Standard browser envs have full support of the APIs needed to test
833
837
  // whether the request URL is of the same origin as current location.
834
838
  function() {
@@ -860,115 +864,123 @@ const cn = b.isStandardBrowserEnv ? (
860
864
  };
861
865
  }()
862
866
  );
863
- function un(e) {
867
+ function mn(e) {
864
868
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
865
869
  return t && t[1] || "";
866
870
  }
867
- function ln(e, t) {
871
+ function yn(e, t) {
868
872
  e = e || 10;
869
873
  const n = new Array(e), r = new Array(e);
870
874
  let s = 0, i = 0, o;
871
- return t = t !== void 0 ? t : 1e3, function(d) {
872
- const u = Date.now(), l = r[i];
873
- o || (o = u), n[s] = d, r[s] = u;
874
- let h = i, g = 0;
875
- for (; h !== s; )
876
- g += n[h++], h = h % e;
877
- if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
875
+ return t = t !== void 0 ? t : 1e3, function(p) {
876
+ const h = Date.now(), l = r[i];
877
+ o || (o = h), n[s] = p, r[s] = h;
878
+ let u = i, w = 0;
879
+ for (; u !== s; )
880
+ w += n[u++], u = u % e;
881
+ if (s = (s + 1) % e, s === i && (i = (i + 1) % e), h - o < t)
878
882
  return;
879
- const y = l && u - l;
880
- return y ? Math.round(g * 1e3 / y) : void 0;
883
+ const b = l && h - l;
884
+ return b ? Math.round(w * 1e3 / b) : void 0;
881
885
  };
882
886
  }
883
887
  function Ae(e, t) {
884
888
  let n = 0;
885
- const r = ln(50, 250);
889
+ const r = yn(50, 250);
886
890
  return (s) => {
887
- const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, d = r(c), u = i <= o;
891
+ const i = s.loaded, o = s.lengthComputable ? s.total : void 0, c = i - n, p = r(c), h = i <= o;
888
892
  n = i;
889
893
  const l = {
890
894
  loaded: i,
891
895
  total: o,
892
896
  progress: o ? i / o : void 0,
893
897
  bytes: c,
894
- rate: d || void 0,
895
- estimated: d && o && u ? (o - i) / d : void 0,
898
+ rate: p || void 0,
899
+ estimated: p && o && h ? (o - i) / p : void 0,
896
900
  event: s
897
901
  };
898
902
  l[t ? "download" : "upload"] = !0, e(l);
899
903
  };
900
904
  }
901
- const fn = typeof XMLHttpRequest < "u", dn = fn && function(e) {
905
+ const wn = typeof XMLHttpRequest < "u", gn = wn && function(e) {
902
906
  return new Promise(function(n, r) {
903
907
  let s = e.data;
904
- const i = R.from(e.headers).normalize(), o = e.responseType;
905
- let c;
906
- function d() {
907
- e.cancelToken && e.cancelToken.unsubscribe(c), e.signal && e.signal.removeEventListener("abort", c);
908
+ const i = O.from(e.headers).normalize();
909
+ let { responseType: o, withXSRFToken: c } = e, p;
910
+ function h() {
911
+ e.cancelToken && e.cancelToken.unsubscribe(p), e.signal && e.signal.removeEventListener("abort", p);
912
+ }
913
+ let l;
914
+ if (a.isFormData(s)) {
915
+ if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
916
+ i.setContentType(!1);
917
+ else if ((l = i.getContentType()) !== !1) {
918
+ const [d, ...g] = l ? l.split(";").map((E) => E.trim()).filter(Boolean) : [];
919
+ i.setContentType([d || "multipart/form-data", ...g].join("; "));
920
+ }
908
921
  }
909
- a.isFormData(s) && (b.isStandardBrowserEnv || b.isStandardBrowserWebWorkerEnv) && i.setContentType(!1);
910
922
  let u = new XMLHttpRequest();
911
923
  if (e.auth) {
912
- const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
913
- i.set("Authorization", "Basic " + btoa(y + ":" + f));
924
+ const d = e.auth.username || "", g = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
925
+ i.set("Authorization", "Basic " + btoa(d + ":" + g));
914
926
  }
915
- const l = Xe(e.baseURL, e.url);
916
- u.open(e.method.toUpperCase(), Je(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
917
- function h() {
927
+ const w = Qe(e.baseURL, e.url);
928
+ u.open(e.method.toUpperCase(), Je(w, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
929
+ function b() {
918
930
  if (!u)
919
931
  return;
920
- const y = R.from(
932
+ const d = O.from(
921
933
  "getAllResponseHeaders" in u && u.getAllResponseHeaders()
922
- ), p = {
934
+ ), E = {
923
935
  data: !o || o === "text" || o === "json" ? u.responseText : u.response,
924
936
  status: u.status,
925
937
  statusText: u.statusText,
926
- headers: y,
938
+ headers: d,
927
939
  config: e,
928
940
  request: u
929
941
  };
930
- rn(function(S) {
931
- n(S), d();
932
- }, function(S) {
933
- r(S), d();
934
- }, p), u = null;
942
+ ln(function(_) {
943
+ n(_), h();
944
+ }, function(_) {
945
+ r(_), h();
946
+ }, E), u = null;
935
947
  }
936
- if ("onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
937
- !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(h);
948
+ if ("onloadend" in u ? u.onloadend = b : u.onreadystatechange = function() {
949
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(b);
938
950
  }, u.onabort = function() {
939
951
  u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
940
952
  }, u.onerror = function() {
941
953
  r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
942
954
  }, u.ontimeout = function() {
943
- let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
944
- const p = e.transitional || Me;
945
- e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
946
- f,
947
- p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
955
+ let g = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
956
+ const E = e.transitional || Me;
957
+ e.timeoutErrorMessage && (g = e.timeoutErrorMessage), r(new m(
958
+ g,
959
+ E.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
948
960
  e,
949
961
  u
950
962
  )), u = null;
951
- }, b.isStandardBrowserEnv) {
952
- const y = (e.withCredentials || cn(l)) && e.xsrfCookieName && sn.read(e.xsrfCookieName);
953
- y && i.set(e.xsrfHeaderName, y);
963
+ }, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && hn(w))) {
964
+ const d = e.xsrfHeaderName && e.xsrfCookieName && fn.read(e.xsrfCookieName);
965
+ d && i.set(e.xsrfHeaderName, d);
954
966
  }
955
- s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(f, p) {
956
- u.setRequestHeader(p, f);
957
- }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ae(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ae(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
958
- u && (r(!y || y.type ? new j(null, e, u) : y), u.abort(), u = null);
959
- }, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
960
- const g = un(l);
961
- if (g && b.protocols.indexOf(g) === -1) {
962
- r(new m("Unsupported protocol " + g + ":", m.ERR_BAD_REQUEST, e));
967
+ s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(g, E) {
968
+ u.setRequestHeader(E, g);
969
+ }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ae(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ae(e.onUploadProgress)), (e.cancelToken || e.signal) && (p = (d) => {
970
+ u && (r(!d || d.type ? new q(null, e, u) : d), u.abort(), u = null);
971
+ }, e.cancelToken && e.cancelToken.subscribe(p), e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p)));
972
+ const f = mn(w);
973
+ if (f && R.protocols.indexOf(f) === -1) {
974
+ r(new m("Unsupported protocol " + f + ":", m.ERR_BAD_REQUEST, e));
963
975
  return;
964
976
  }
965
977
  u.send(s || null);
966
978
  });
967
- }, v = {
968
- http: It,
969
- xhr: dn
979
+ }, re = {
980
+ http: Ht,
981
+ xhr: gn
970
982
  };
971
- a.forEach(v, (e, t) => {
983
+ a.forEach(re, (e, t) => {
972
984
  if (e) {
973
985
  try {
974
986
  Object.defineProperty(e, "name", { value: t });
@@ -977,80 +989,91 @@ a.forEach(v, (e, t) => {
977
989
  Object.defineProperty(e, "adapterName", { value: t });
978
990
  }
979
991
  });
980
- const hn = {
992
+ const Re = (e) => `- ${e}`, En = (e) => a.isFunction(e) || e === null || e === !1, Ye = {
981
993
  getAdapter: (e) => {
982
994
  e = a.isArray(e) ? e : [e];
983
995
  const { length: t } = e;
984
996
  let n, r;
985
- for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? v[n.toLowerCase()] : n)); s++)
986
- ;
987
- if (!r)
988
- throw r === !1 ? new m(
989
- `Adapter ${n} is not supported by the environment`,
997
+ const s = {};
998
+ for (let i = 0; i < t; i++) {
999
+ n = e[i];
1000
+ let o;
1001
+ if (r = n, !En(n) && (r = re[(o = String(n)).toLowerCase()], r === void 0))
1002
+ throw new m(`Unknown adapter '${o}'`);
1003
+ if (r)
1004
+ break;
1005
+ s[o || "#" + i] = r;
1006
+ }
1007
+ if (!r) {
1008
+ const i = Object.entries(s).map(
1009
+ ([c, p]) => `adapter ${c} ` + (p === !1 ? "is not supported by the environment" : "is not available in the build")
1010
+ );
1011
+ let o = t ? i.length > 1 ? `since :
1012
+ ` + i.map(Re).join(`
1013
+ `) : " " + Re(i[0]) : "as no adapter specified";
1014
+ throw new m(
1015
+ "There is no suitable adapter to dispatch the request " + o,
990
1016
  "ERR_NOT_SUPPORT"
991
- ) : new Error(
992
- a.hasOwnProp(v, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
993
1017
  );
994
- if (!a.isFunction(r))
995
- throw new TypeError("adapter is not a function");
1018
+ }
996
1019
  return r;
997
1020
  },
998
- adapters: v
1021
+ adapters: re
999
1022
  };
1000
1023
  function Z(e) {
1001
1024
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1002
- throw new j(null, e);
1025
+ throw new q(null, e);
1003
1026
  }
1004
- function Re(e) {
1005
- return Z(e), e.headers = R.from(e.headers), e.data = Q.call(
1027
+ function Ce(e) {
1028
+ return Z(e), e.headers = O.from(e.headers), e.data = Y.call(
1006
1029
  e,
1007
1030
  e.transformRequest
1008
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), hn.getAdapter(e.adapter || le.adapter)(e).then(function(r) {
1009
- return Z(e), r.data = Q.call(
1031
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ye.getAdapter(e.adapter || le.adapter)(e).then(function(r) {
1032
+ return Z(e), r.data = Y.call(
1010
1033
  e,
1011
1034
  e.transformResponse,
1012
1035
  r
1013
- ), r.headers = R.from(r.headers), r;
1036
+ ), r.headers = O.from(r.headers), r;
1014
1037
  }, function(r) {
1015
- return Ge(r) || (Z(e), r && r.response && (r.response.data = Q.call(
1038
+ return Xe(r) || (Z(e), r && r.response && (r.response.data = Y.call(
1016
1039
  e,
1017
1040
  e.transformResponse,
1018
1041
  r.response
1019
- ), r.response.headers = R.from(r.response.headers))), Promise.reject(r);
1042
+ ), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
1020
1043
  });
1021
1044
  }
1022
- const Ce = (e) => e instanceof R ? e.toJSON() : e;
1045
+ const Oe = (e) => e instanceof O ? e.toJSON() : e;
1023
1046
  function F(e, t) {
1024
1047
  t = t || {};
1025
1048
  const n = {};
1026
- function r(u, l, h) {
1027
- return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: h }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1049
+ function r(h, l, u) {
1050
+ return a.isPlainObject(h) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, h, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1028
1051
  }
1029
- function s(u, l, h) {
1052
+ function s(h, l, u) {
1030
1053
  if (a.isUndefined(l)) {
1031
- if (!a.isUndefined(u))
1032
- return r(void 0, u, h);
1054
+ if (!a.isUndefined(h))
1055
+ return r(void 0, h, u);
1033
1056
  } else
1034
- return r(u, l, h);
1057
+ return r(h, l, u);
1035
1058
  }
1036
- function i(u, l) {
1059
+ function i(h, l) {
1037
1060
  if (!a.isUndefined(l))
1038
1061
  return r(void 0, l);
1039
1062
  }
1040
- function o(u, l) {
1063
+ function o(h, l) {
1041
1064
  if (a.isUndefined(l)) {
1042
- if (!a.isUndefined(u))
1043
- return r(void 0, u);
1065
+ if (!a.isUndefined(h))
1066
+ return r(void 0, h);
1044
1067
  } else
1045
1068
  return r(void 0, l);
1046
1069
  }
1047
- function c(u, l, h) {
1048
- if (h in t)
1049
- return r(u, l);
1050
- if (h in e)
1051
- return r(void 0, u);
1070
+ function c(h, l, u) {
1071
+ if (u in t)
1072
+ return r(h, l);
1073
+ if (u in e)
1074
+ return r(void 0, h);
1052
1075
  }
1053
- const d = {
1076
+ const p = {
1054
1077
  url: i,
1055
1078
  method: i,
1056
1079
  data: i,
@@ -1061,6 +1084,7 @@ function F(e, t) {
1061
1084
  timeout: o,
1062
1085
  timeoutMessage: o,
1063
1086
  withCredentials: o,
1087
+ withXSRFToken: o,
1064
1088
  adapter: o,
1065
1089
  responseType: o,
1066
1090
  xsrfCookieName: o,
@@ -1078,23 +1102,23 @@ function F(e, t) {
1078
1102
  socketPath: o,
1079
1103
  responseEncoding: o,
1080
1104
  validateStatus: c,
1081
- headers: (u, l) => s(Ce(u), Ce(l), !0)
1105
+ headers: (h, l) => s(Oe(h), Oe(l), !0)
1082
1106
  };
1083
- return a.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
1084
- const h = d[l] || s, g = h(e[l], t[l], l);
1085
- a.isUndefined(g) && h !== c || (n[l] = g);
1107
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1108
+ const u = p[l] || s, w = u(e[l], t[l], l);
1109
+ a.isUndefined(w) && u !== c || (n[l] = w);
1086
1110
  }), n;
1087
1111
  }
1088
- const Ye = "1.3.4", fe = {};
1112
+ const Ze = "1.6.3", fe = {};
1089
1113
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1090
1114
  fe[e] = function(r) {
1091
1115
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1092
1116
  };
1093
1117
  });
1094
- const Oe = {};
1118
+ const Te = {};
1095
1119
  fe.transitional = function(t, n, r) {
1096
1120
  function s(i, o) {
1097
- return "[Axios v" + Ye + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1121
+ return "[Axios v" + Ze + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1098
1122
  }
1099
1123
  return (i, o, c) => {
1100
1124
  if (t === !1)
@@ -1102,7 +1126,7 @@ fe.transitional = function(t, n, r) {
1102
1126
  s(o, " has been removed" + (n ? " in " + n : "")),
1103
1127
  m.ERR_DEPRECATED
1104
1128
  );
1105
- return n && !Oe[o] && (Oe[o] = !0, console.warn(
1129
+ return n && !Te[o] && (Te[o] = !0, console.warn(
1106
1130
  s(
1107
1131
  o,
1108
1132
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1110,7 +1134,7 @@ fe.transitional = function(t, n, r) {
1110
1134
  )), t ? t(i, o, c) : !0;
1111
1135
  };
1112
1136
  };
1113
- function pn(e, t, n) {
1137
+ function Sn(e, t, n) {
1114
1138
  if (typeof e != "object")
1115
1139
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1116
1140
  const r = Object.keys(e);
@@ -1118,20 +1142,20 @@ function pn(e, t, n) {
1118
1142
  for (; s-- > 0; ) {
1119
1143
  const i = r[s], o = t[i];
1120
1144
  if (o) {
1121
- const c = e[i], d = c === void 0 || o(c, i, e);
1122
- if (d !== !0)
1123
- throw new m("option " + i + " must be " + d, m.ERR_BAD_OPTION_VALUE);
1145
+ const c = e[i], p = c === void 0 || o(c, i, e);
1146
+ if (p !== !0)
1147
+ throw new m("option " + i + " must be " + p, m.ERR_BAD_OPTION_VALUE);
1124
1148
  continue;
1125
1149
  }
1126
1150
  if (n !== !0)
1127
1151
  throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
1128
1152
  }
1129
1153
  }
1130
- const re = {
1131
- assertOptions: pn,
1154
+ const se = {
1155
+ assertOptions: Sn,
1132
1156
  validators: fe
1133
- }, T = re.validators;
1134
- let V = class {
1157
+ }, x = se.validators;
1158
+ let z = class {
1135
1159
  constructor(t) {
1136
1160
  this.defaults = t, this.interceptors = {
1137
1161
  request: new Se(),
@@ -1149,68 +1173,70 @@ let V = class {
1149
1173
  request(t, n) {
1150
1174
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
1151
1175
  const { transitional: r, paramsSerializer: s, headers: i } = n;
1152
- r !== void 0 && re.assertOptions(r, {
1153
- silentJSONParsing: T.transitional(T.boolean),
1154
- forcedJSONParsing: T.transitional(T.boolean),
1155
- clarifyTimeoutError: T.transitional(T.boolean)
1156
- }, !1), s !== void 0 && re.assertOptions(s, {
1157
- encode: T.function,
1158
- serialize: T.function
1159
- }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1160
- let o;
1161
- o = i && a.merge(
1176
+ r !== void 0 && se.assertOptions(r, {
1177
+ silentJSONParsing: x.transitional(x.boolean),
1178
+ forcedJSONParsing: x.transitional(x.boolean),
1179
+ clarifyTimeoutError: x.transitional(x.boolean)
1180
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1181
+ serialize: s
1182
+ } : se.assertOptions(s, {
1183
+ encode: x.function,
1184
+ serialize: x.function
1185
+ }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1186
+ let o = i && a.merge(
1162
1187
  i.common,
1163
1188
  i[n.method]
1164
- ), o && a.forEach(
1189
+ );
1190
+ i && a.forEach(
1165
1191
  ["delete", "get", "head", "post", "put", "patch", "common"],
1166
1192
  (f) => {
1167
1193
  delete i[f];
1168
1194
  }
1169
- ), n.headers = R.concat(o, i);
1195
+ ), n.headers = O.concat(o, i);
1170
1196
  const c = [];
1171
- let d = !0;
1172
- this.interceptors.request.forEach(function(p) {
1173
- typeof p.runWhen == "function" && p.runWhen(n) === !1 || (d = d && p.synchronous, c.unshift(p.fulfilled, p.rejected));
1197
+ let p = !0;
1198
+ this.interceptors.request.forEach(function(d) {
1199
+ typeof d.runWhen == "function" && d.runWhen(n) === !1 || (p = p && d.synchronous, c.unshift(d.fulfilled, d.rejected));
1174
1200
  });
1175
- const u = [];
1176
- this.interceptors.response.forEach(function(p) {
1177
- u.push(p.fulfilled, p.rejected);
1201
+ const h = [];
1202
+ this.interceptors.response.forEach(function(d) {
1203
+ h.push(d.fulfilled, d.rejected);
1178
1204
  });
1179
- let l, h = 0, g;
1180
- if (!d) {
1181
- const f = [Re.bind(this), void 0];
1182
- for (f.unshift.apply(f, c), f.push.apply(f, u), g = f.length, l = Promise.resolve(n); h < g; )
1183
- l = l.then(f[h++], f[h++]);
1205
+ let l, u = 0, w;
1206
+ if (!p) {
1207
+ const f = [Ce.bind(this), void 0];
1208
+ for (f.unshift.apply(f, c), f.push.apply(f, h), w = f.length, l = Promise.resolve(n); u < w; )
1209
+ l = l.then(f[u++], f[u++]);
1184
1210
  return l;
1185
1211
  }
1186
- g = c.length;
1187
- let y = n;
1188
- for (h = 0; h < g; ) {
1189
- const f = c[h++], p = c[h++];
1212
+ w = c.length;
1213
+ let b = n;
1214
+ for (u = 0; u < w; ) {
1215
+ const f = c[u++], d = c[u++];
1190
1216
  try {
1191
- y = f(y);
1192
- } catch (A) {
1193
- p.call(this, A);
1217
+ b = f(b);
1218
+ } catch (g) {
1219
+ d.call(this, g);
1194
1220
  break;
1195
1221
  }
1196
1222
  }
1197
1223
  try {
1198
- l = Re.call(this, y);
1224
+ l = Ce.call(this, b);
1199
1225
  } catch (f) {
1200
1226
  return Promise.reject(f);
1201
1227
  }
1202
- for (h = 0, g = u.length; h < g; )
1203
- l = l.then(u[h++], u[h++]);
1228
+ for (u = 0, w = h.length; u < w; )
1229
+ l = l.then(h[u++], h[u++]);
1204
1230
  return l;
1205
1231
  }
1206
1232
  getUri(t) {
1207
1233
  t = F(this.defaults, t);
1208
- const n = Xe(t.baseURL, t.url);
1234
+ const n = Qe(t.baseURL, t.url);
1209
1235
  return Je(n, t.params, t.paramsSerializer);
1210
1236
  }
1211
1237
  };
1212
1238
  a.forEach(["delete", "get", "head", "options"], function(t) {
1213
- V.prototype[t] = function(n, r) {
1239
+ z.prototype[t] = function(n, r) {
1214
1240
  return this.request(F(r || {}, {
1215
1241
  method: t,
1216
1242
  url: n,
@@ -1231,10 +1257,10 @@ a.forEach(["post", "put", "patch"], function(t) {
1231
1257
  }));
1232
1258
  };
1233
1259
  }
1234
- V.prototype[t] = n(), V.prototype[t + "Form"] = n(!0);
1260
+ z.prototype[t] = n(), z.prototype[t + "Form"] = n(!0);
1235
1261
  });
1236
- const z = V;
1237
- let mn = class Qe {
1262
+ const v = z;
1263
+ let bn = class et {
1238
1264
  constructor(t) {
1239
1265
  if (typeof t != "function")
1240
1266
  throw new TypeError("executor must be a function.");
@@ -1259,7 +1285,7 @@ let mn = class Qe {
1259
1285
  r.unsubscribe(i);
1260
1286
  }, o;
1261
1287
  }, t(function(i, o, c) {
1262
- r.reason || (r.reason = new j(i, o, c), n(r.reason));
1288
+ r.reason || (r.reason = new q(i, o, c), n(r.reason));
1263
1289
  });
1264
1290
  }
1265
1291
  /**
@@ -1295,23 +1321,23 @@ let mn = class Qe {
1295
1321
  static source() {
1296
1322
  let t;
1297
1323
  return {
1298
- token: new Qe(function(s) {
1324
+ token: new et(function(s) {
1299
1325
  t = s;
1300
1326
  }),
1301
1327
  cancel: t
1302
1328
  };
1303
1329
  }
1304
1330
  };
1305
- const yn = mn;
1306
- function wn(e) {
1331
+ const An = bn;
1332
+ function Rn(e) {
1307
1333
  return function(n) {
1308
1334
  return e.apply(null, n);
1309
1335
  };
1310
1336
  }
1311
- function gn(e) {
1337
+ function Cn(e) {
1312
1338
  return a.isObject(e) && e.isAxiosError === !0;
1313
1339
  }
1314
- const se = {
1340
+ const oe = {
1315
1341
  Continue: 100,
1316
1342
  SwitchingProtocols: 101,
1317
1343
  Processing: 102,
@@ -1376,70 +1402,72 @@ const se = {
1376
1402
  NotExtended: 510,
1377
1403
  NetworkAuthenticationRequired: 511
1378
1404
  };
1379
- Object.entries(se).forEach(([e, t]) => {
1380
- se[t] = e;
1405
+ Object.entries(oe).forEach(([e, t]) => {
1406
+ oe[t] = e;
1381
1407
  });
1382
- const En = se;
1383
- function Ze(e) {
1384
- const t = new z(e), n = Ue(z.prototype.request, t);
1385
- return a.extend(n, z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1386
- return Ze(F(e, s));
1408
+ const On = oe;
1409
+ function tt(e) {
1410
+ const t = new v(e), n = Le(v.prototype.request, t);
1411
+ return a.extend(n, v.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1412
+ return tt(F(e, s));
1387
1413
  }, n;
1388
1414
  }
1389
- const w = Ze(le);
1390
- w.Axios = z;
1391
- w.CanceledError = j;
1392
- w.CancelToken = yn;
1393
- w.isCancel = Ge;
1394
- w.VERSION = Ye;
1395
- w.toFormData = J;
1396
- w.AxiosError = m;
1397
- w.Cancel = w.CanceledError;
1398
- w.all = function(t) {
1415
+ const y = tt(le);
1416
+ y.Axios = v;
1417
+ y.CanceledError = q;
1418
+ y.CancelToken = An;
1419
+ y.isCancel = Xe;
1420
+ y.VERSION = Ze;
1421
+ y.toFormData = M;
1422
+ y.AxiosError = m;
1423
+ y.Cancel = y.CanceledError;
1424
+ y.all = function(t) {
1399
1425
  return Promise.all(t);
1400
1426
  };
1401
- w.spread = wn;
1402
- w.isAxiosError = gn;
1403
- w.mergeConfig = F;
1404
- w.AxiosHeaders = R;
1405
- w.formToJSON = (e) => We(a.isHTMLForm(e) ? new FormData(e) : e);
1406
- w.HttpStatusCode = En;
1407
- w.default = w;
1408
- const et = w, {
1409
- Axios: rr,
1427
+ y.spread = Rn;
1428
+ y.isAxiosError = Cn;
1429
+ y.mergeConfig = F;
1430
+ y.AxiosHeaders = O;
1431
+ y.formToJSON = (e) => Ge(a.isHTMLForm(e) ? new FormData(e) : e);
1432
+ y.getAdapter = Ye.getAdapter;
1433
+ y.HttpStatusCode = On;
1434
+ y.default = y;
1435
+ const nt = y, {
1436
+ Axios: ar,
1410
1437
  AxiosError: ee,
1411
- CanceledError: sr,
1412
- isCancel: or,
1413
- CancelToken: ir,
1414
- VERSION: ar,
1415
- all: cr,
1416
- Cancel: ur,
1417
- isAxiosError: lr,
1418
- spread: fr,
1419
- toFormData: dr,
1420
- AxiosHeaders: hr,
1421
- HttpStatusCode: pr,
1422
- formToJSON: mr,
1423
- mergeConfig: yr
1424
- } = et;
1425
- class Te extends Error {
1438
+ CanceledError: cr,
1439
+ isCancel: ur,
1440
+ CancelToken: lr,
1441
+ VERSION: fr,
1442
+ all: dr,
1443
+ Cancel: pr,
1444
+ isAxiosError: hr,
1445
+ spread: mr,
1446
+ toFormData: yr,
1447
+ AxiosHeaders: wr,
1448
+ HttpStatusCode: gr,
1449
+ formToJSON: Er,
1450
+ getAdapter: Sr,
1451
+ mergeConfig: br
1452
+ } = nt;
1453
+ class Pe extends Error {
1426
1454
  constructor(n) {
1427
1455
  super(n.join(", "));
1428
- E(this, "errors");
1456
+ S(this, "errors");
1429
1457
  this.name = "ValidationError", this.errors = n;
1430
1458
  }
1431
1459
  }
1432
- class Pe extends Error {
1460
+ class _e extends Error {
1433
1461
  constructor(n) {
1434
1462
  super("Address already registered.");
1435
- E(this, "address");
1463
+ S(this, "address");
1436
1464
  this.name = "AddressInUseError", this.address = n;
1437
1465
  }
1438
1466
  }
1439
- class _e extends Error {
1467
+ class xe extends Error {
1440
1468
  constructor(n) {
1441
1469
  super("Code already registered.");
1442
- E(this, "code");
1470
+ S(this, "code");
1443
1471
  this.name = "CodeInUseError", this.code = n;
1444
1472
  }
1445
1473
  }
@@ -1448,10 +1476,10 @@ class Ne extends Error {
1448
1476
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1449
1477
  }
1450
1478
  }
1451
- class Sn {
1479
+ class Tn {
1452
1480
  constructor(t) {
1453
- E(this, "httpClient");
1454
- E(this, "_debug");
1481
+ S(this, "httpClient");
1482
+ S(this, "_debug");
1455
1483
  this.httpClient = t.httpClient, this._debug = t.debug;
1456
1484
  }
1457
1485
  async create(t, n, r) {
@@ -1468,9 +1496,9 @@ class Sn {
1468
1496
  const o = (s = i.response) == null ? void 0 : s.data;
1469
1497
  if (typeof (o == null ? void 0 : o.message) == "string") {
1470
1498
  const c = o.message.toLowerCase();
1471
- throw c == "invalid signature" ? new Ne() : c == "address in use" ? new Pe(t) : c == "code in use" ? new _e(n) : new Error(c);
1499
+ throw c == "invalid signature" ? new Ne() : c == "address in use" ? new _e(t) : c == "code in use" ? new xe(n) : new Error(c);
1472
1500
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1473
- throw new Te(o.message);
1501
+ throw new Pe(o.message);
1474
1502
  }
1475
1503
  throw i;
1476
1504
  }
@@ -1488,9 +1516,9 @@ class Sn {
1488
1516
  const o = (s = i.response) == null ? void 0 : s.data;
1489
1517
  if (typeof (o == null ? void 0 : o.message) == "string") {
1490
1518
  const c = o.message.toLowerCase();
1491
- throw c == "invalid signature" ? new Ne() : c == "address in use" ? new Pe(t) : c == "code in use" ? new _e(n) : new Error(c);
1519
+ throw c == "invalid signature" ? new Ne() : c == "address in use" ? new _e(t) : c == "code in use" ? new xe(n) : new Error(c);
1492
1520
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1493
- throw new Te(o.message);
1521
+ throw new Pe(o.message);
1494
1522
  }
1495
1523
  throw i;
1496
1524
  }
@@ -1511,9 +1539,9 @@ class Sn {
1511
1539
  }
1512
1540
  }
1513
1541
  }
1514
- class bn {
1542
+ class Pn {
1515
1543
  constructor(t) {
1516
- E(this, "httpClient");
1544
+ S(this, "httpClient");
1517
1545
  this.httpClient = t.httpClient;
1518
1546
  }
1519
1547
  async getAll() {
@@ -1521,11 +1549,11 @@ class bn {
1521
1549
  return t;
1522
1550
  }
1523
1551
  }
1524
- const xe = "fuul.sent", An = 60;
1525
- class Rn {
1552
+ const Fe = "fuul.sent", _n = 60;
1553
+ class xn {
1526
1554
  constructor(t) {
1527
- E(this, "debug");
1528
- E(this, "httpClient");
1555
+ S(this, "debug");
1556
+ S(this, "httpClient");
1529
1557
  this.httpClient = t.httpClient, this.debug = !!t.debug;
1530
1558
  }
1531
1559
  async sendEvent(t) {
@@ -1536,37 +1564,37 @@ class Rn {
1536
1564
  await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
1537
1565
  }
1538
1566
  isDuplicate(t) {
1539
- const n = `${xe}_${t.name}`, r = localStorage.getItem(n);
1567
+ const n = `${Fe}_${t.name}`, r = localStorage.getItem(n);
1540
1568
  if (!r)
1541
1569
  return !1;
1542
1570
  const s = JSON.parse(r);
1543
- if (this.getCurrentTimestamp() - s.timestamp > An)
1571
+ if (this.getCurrentTimestamp() - s.timestamp > _n)
1544
1572
  return !1;
1545
- let d = !1;
1546
- t.metadata && (d = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
1547
- let u = !1;
1548
- return t.args && s.args && (u = s.args.page === t.args.page), u && d;
1573
+ let p = !1;
1574
+ t.metadata && (p = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
1575
+ let h = !1;
1576
+ return t.args && s.args && (h = s.args.page === t.args.page), h && p;
1549
1577
  }
1550
1578
  getCurrentTimestamp() {
1551
1579
  return Date.now() / 1e3;
1552
1580
  }
1553
1581
  saveSentEvent(t) {
1554
- const n = `${xe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
1582
+ const n = `${Fe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
1555
1583
  localStorage.setItem(n, JSON.stringify(s));
1556
1584
  }
1557
1585
  }
1558
- const Cn = "3.3.3", On = {
1559
- version: Cn
1586
+ const Nn = "3.4.1", Fn = {
1587
+ version: Nn
1560
1588
  };
1561
- class Tn {
1589
+ class Dn {
1562
1590
  constructor(t) {
1563
- E(this, "client");
1564
- E(this, "queryParams");
1565
- this.client = et.create({
1591
+ S(this, "client");
1592
+ S(this, "queryParams");
1593
+ this.client = nt.create({
1566
1594
  ...t,
1567
1595
  headers: {
1568
1596
  Authorization: `Bearer ${t.apiKey}`,
1569
- "X-Fuul-Sdk-Version": On.version
1597
+ "X-Fuul-Sdk-Version": Fn.version
1570
1598
  }
1571
1599
  }), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
1572
1600
  }
@@ -1589,22 +1617,22 @@ class Tn {
1589
1617
  return this.client.delete(t + this.queryParams);
1590
1618
  }
1591
1619
  }
1592
- const Fe = "/payouts";
1593
- class Pn {
1620
+ const De = "/payouts";
1621
+ class Un {
1594
1622
  constructor(t) {
1595
- E(this, "httpClient");
1596
- E(this, "_debug");
1623
+ S(this, "httpClient");
1624
+ S(this, "_debug");
1597
1625
  this.httpClient = t.httpClient, this._debug = t.debug;
1598
1626
  }
1599
1627
  async getProjectPayoutsLeaderboard(t) {
1600
- return (await this.httpClient.get(`${Fe}/leaderboard`, t)).data;
1628
+ return (await this.httpClient.get(`${De}/leaderboard`, t)).data;
1601
1629
  }
1602
1630
  async getUserPayouts(t) {
1603
- return (await this.httpClient.get(Fe, t)).data;
1631
+ return (await this.httpClient.get(De, t)).data;
1604
1632
  }
1605
1633
  }
1606
- let _n = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
1607
- const Nn = "fuul.tracking_id", xn = ["google.com", "bing.com", "yahoo.com"], de = () => In(Nn, () => _n()), De = () => P("af") || P("referrer"), Fn = () => document.referrer, Dn = () => kn(), Un = () => P("category"), Ln = () => P("title"), Bn = () => P("tag"), In = (e, t) => {
1634
+ let Ln = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
1635
+ const Bn = "fuul.tracking_id", de = () => Hn(Bn, () => Ln()), Ue = () => D("af") || D("referrer"), In = () => document.referrer, jn = () => vn(), kn = () => D("category"), qn = () => D("title"), $n = () => D("tag"), Hn = (e, t) => {
1608
1636
  const n = localStorage.getItem(e);
1609
1637
  if (n)
1610
1638
  return n;
@@ -1612,35 +1640,24 @@ const Nn = "fuul.tracking_id", xn = ["google.com", "bing.com", "yahoo.com"], de
1612
1640
  const r = t();
1613
1641
  return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
1614
1642
  }
1615
- }, P = (e) => new URLSearchParams(window.location.search).get(e), kn = () => {
1616
- const e = P("source"), t = P("af") || P("referrer");
1643
+ }, D = (e) => new URLSearchParams(window.location.search).get(e), vn = () => {
1644
+ const e = D("source");
1617
1645
  if (e)
1618
1646
  return e;
1619
- if (t)
1620
- return "affiliate";
1621
- const n = jn(document.referrer);
1622
- return n && xn.includes(n) ? "organic" : "direct";
1623
- }, jn = (e) => {
1624
- var t;
1625
- try {
1626
- return (t = new URL(e).hostname) == null ? void 0 : t.split(".").slice(-2).join(".");
1627
- } catch {
1628
- return null;
1629
- }
1630
- }, qn = "https://api.fuul.xyz/api/v1/";
1631
- let x = !1, oe = !1, he, B, tt, U, G, pe;
1632
- function $n(e) {
1633
- x = !!e.debug, !oe && (he = e.apiKey, Qn(), B = Zn(
1634
- e.baseApiUrl ?? qn,
1647
+ }, zn = "https://api.fuul.xyz/api/v1/";
1648
+ let N = !1, ie = !1, pe, I, rt, L, G, he;
1649
+ function Vn(e) {
1650
+ N = !!e.debug, !ie && (pe = e.apiKey, nr(), I = rr(
1651
+ e.baseApiUrl ?? zn,
1635
1652
  e.defaultQueryParams ?? {}
1636
- ), tt = new bn({ httpClient: B, debug: x }), G = new Rn({ httpClient: B, debug: x }), U = new Sn({ httpClient: B, debug: x }), pe = new Pn({ httpClient: B, debug: x }), oe = !0, x && console.debug("Fuul SDK: init() complete"));
1653
+ ), rt = new Pn({ httpClient: I, debug: N }), G = new xn({ httpClient: I, debug: N }), L = new Tn({ httpClient: I, debug: N }), he = new Un({ httpClient: I, debug: N }), ie = !0, N && console.debug("Fuul SDK: init() complete"));
1637
1654
  }
1638
- function O() {
1639
- if (!oe)
1655
+ function T() {
1656
+ if (!ie)
1640
1657
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
1641
1658
  }
1642
- async function Hn(e, t) {
1643
- O(), me();
1659
+ async function Kn(e, t) {
1660
+ T(), me();
1644
1661
  const n = {
1645
1662
  name: e,
1646
1663
  args: t ?? {},
@@ -1650,8 +1667,8 @@ async function Hn(e, t) {
1650
1667
  };
1651
1668
  await G.sendEvent(n);
1652
1669
  }
1653
- async function vn(e) {
1654
- O(), me();
1670
+ async function Jn(e) {
1671
+ T(), me();
1655
1672
  const t = {
1656
1673
  name: "pageview",
1657
1674
  args: {
@@ -1660,19 +1677,19 @@ async function vn(e) {
1660
1677
  },
1661
1678
  metadata: {
1662
1679
  tracking_id: de(),
1663
- referrer_url: Fn(),
1664
- source: Dn(),
1665
- affiliate_id: De() ?? void 0,
1666
- referrer: De() ?? void 0,
1667
- category: Un() ?? void 0,
1668
- title: Ln() ?? void 0,
1669
- tag: Bn() ?? void 0
1680
+ referrer_url: In(),
1681
+ source: jn(),
1682
+ affiliate_id: Ue() ?? void 0,
1683
+ referrer: Ue() ?? void 0,
1684
+ category: kn() ?? void 0,
1685
+ title: qn() ?? void 0,
1686
+ tag: $n() ?? void 0
1670
1687
  }
1671
1688
  };
1672
1689
  await G.sendEvent(t);
1673
1690
  }
1674
- async function zn(e) {
1675
- O(), me();
1691
+ async function Mn(e) {
1692
+ T(), me();
1676
1693
  const t = {
1677
1694
  name: "connect_wallet",
1678
1695
  args: {},
@@ -1682,68 +1699,68 @@ async function zn(e) {
1682
1699
  };
1683
1700
  e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), await G.sendEvent(t);
1684
1701
  }
1685
- async function Vn(e, t, n) {
1686
- O(), await U.create(e, t, n);
1702
+ async function Wn(e, t, n) {
1703
+ T(), await L.create(e, t, n);
1687
1704
  }
1688
- async function Kn(e, t, n) {
1689
- O(), await U.update(e, t, n);
1705
+ async function Gn(e, t, n) {
1706
+ T(), await L.update(e, t, n);
1690
1707
  }
1691
- async function Jn(e) {
1692
- return O(), await U.getCode(e);
1708
+ async function Xn(e) {
1709
+ return T(), await L.getCode(e);
1693
1710
  }
1694
- async function Mn(e) {
1695
- return O(), await U.isCodeFree(e);
1711
+ async function Qn(e) {
1712
+ return T(), await L.isCodeFree(e);
1696
1713
  }
1697
- async function Wn(e, t, n) {
1698
- O();
1699
- const r = await U.getCode(t), s = new URLSearchParams({
1714
+ async function Yn(e, t, n) {
1715
+ T();
1716
+ const r = await L.getCode(t), s = new URLSearchParams({
1700
1717
  af: r ?? t
1701
1718
  });
1702
1719
  return n != null && n.title && s.append("af_title", n.title), n != null && n.format && s.append("af_format", n.format), n != null && n.place && s.append("af_place", n.place), `${e}?${s.toString()}`;
1703
1720
  }
1704
- function Gn(e) {
1705
- return pe.getProjectPayoutsLeaderboard(e);
1721
+ function Zn(e) {
1722
+ return he.getProjectPayoutsLeaderboard(e);
1706
1723
  }
1707
- function Xn(e) {
1708
- return pe.getUserPayouts(e);
1724
+ function er(e) {
1725
+ return he.getUserPayouts(e);
1709
1726
  }
1710
- async function Yn() {
1711
- return O(), tt.getAll();
1727
+ async function tr() {
1728
+ return T(), rt.getAll();
1712
1729
  }
1713
1730
  function me() {
1714
1731
  if (typeof window > "u" || typeof document > "u")
1715
1732
  throw new Error("Fuul SDK: Browser context required");
1716
1733
  }
1717
- function Qn() {
1718
- if (!he)
1734
+ function nr() {
1735
+ if (!pe)
1719
1736
  throw new Error("Fuul SDK: Invalid API key");
1720
1737
  }
1721
- function Zn(e, t) {
1722
- return new Tn({
1738
+ function rr(e, t) {
1739
+ return new Dn({
1723
1740
  baseURL: e,
1724
1741
  timeout: 1e4,
1725
- apiKey: he,
1742
+ apiKey: pe,
1726
1743
  queryParams: t
1727
1744
  });
1728
1745
  }
1729
- const wr = {
1730
- init: $n,
1731
- sendEvent: Hn,
1732
- sendPageview: vn,
1733
- sendConnectWallet: zn,
1734
- generateTrackingLink: Wn,
1735
- getConversions: Yn,
1736
- createAffiliateCode: Vn,
1737
- updateAffiliateCode: Kn,
1738
- getAffiliateCode: Jn,
1739
- isAffiliateCodeFree: Mn,
1740
- getUserPayouts: Xn,
1741
- getProjectPayoutsLeaderboard: Gn
1746
+ const Ar = {
1747
+ init: Vn,
1748
+ sendEvent: Kn,
1749
+ sendPageview: Jn,
1750
+ sendConnectWallet: Mn,
1751
+ generateTrackingLink: Yn,
1752
+ getConversions: tr,
1753
+ createAffiliateCode: Wn,
1754
+ updateAffiliateCode: Gn,
1755
+ getAffiliateCode: Xn,
1756
+ isAffiliateCodeFree: Qn,
1757
+ getUserPayouts: er,
1758
+ getProjectPayoutsLeaderboard: Zn
1742
1759
  };
1743
1760
  export {
1744
- Pe as AddressInUseError,
1745
- _e as CodeInUseError,
1746
- wr as Fuul,
1761
+ _e as AddressInUseError,
1762
+ xe as CodeInUseError,
1763
+ Ar as Fuul,
1747
1764
  Ne as InvalidSignatureError,
1748
- Te as ValidationError
1765
+ Pe as ValidationError
1749
1766
  };