@fuul/sdk 3.3.2 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,37 +1,38 @@
1
- var tt = Object.defineProperty;
2
- var nt = (e, t, n) => t in e ? tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var S = (e, t, n) => (nt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- function Fe(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: De } = Object.prototype, { getPrototypeOf: ie } = Object, ae = ((e) => (t) => {
10
- const n = De.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)), O = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), K = (e) => (t) => typeof t === e, { isArray: F } = Array, B = K("undefined");
13
- function rt(e) {
14
- return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && P(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
- const Ue = O("ArrayBuffer");
17
- function st(e) {
16
+ const Be = C("ArrayBuffer");
17
+ function ut(e) {
18
18
  let t;
19
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ue(e.buffer), t;
19
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Be(e.buffer), t;
20
20
  }
21
- const ot = K("string"), P = K("function"), Le = K("number"), ce = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, H = (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
- }, at = O("Date"), ct = O("File"), ut = O("Blob"), lt = O("FileList"), ft = (e) => ce(e) && P(e.pipe), dt = (e) => {
27
- const t = "[object FormData]";
28
- return e && (typeof FormData == "function" && e instanceof FormData || De.call(e) === t || P(e.toString) && e.toString() === t);
29
- }, ht = O("URLSearchParams"), pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
30
- function I(e, t, { allOwnKeys: n = !1 } = {}) {
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, "");
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]), F(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 I(e, t, { allOwnKeys: n = !1 } = {}) {
41
42
  c = i[r], t.call(null, e[c], c, e);
42
43
  }
43
44
  }
44
- function Be(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 Be(e, t) {
50
51
  return s;
51
52
  return null;
52
53
  }
53
- const Ie = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ke = (e) => !B(e) && e !== Ie;
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
- const { caseless: e } = ke(this) && this || {}, t = {}, n = (r, s) => {
56
- const i = e && Be(t, s) || s;
57
- H(t[i]) && H(r) ? t[i] = te(t[i], r) : H(r) ? t[i] = te({}, r) : F(r) ? t[i] = r.slice() : t[i] = r;
56
+ const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
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
- arguments[r] && I(arguments[r], n);
61
+ arguments[r] && k(arguments[r], n);
61
62
  return t;
62
63
  }
63
- const mt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
64
- n && P(s) ? e[i] = Fe(s, n) : e[i] = s;
65
- }, { allOwnKeys: r }), e), yt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wt = (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
- }, Et = (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,54 +75,55 @@ const mt = (e, t, n, { allOwnKeys: r } = {}) => (I(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
- }, gt = (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
- }, St = (e) => {
85
+ }, Ot = (e) => {
85
86
  if (!e)
86
87
  return null;
87
- if (F(e))
88
+ if (U(e))
88
89
  return e;
89
90
  let t = e.length;
90
- if (!Le(t))
91
+ if (!Ie(t))
91
92
  return null;
92
93
  const n = new Array(t);
93
94
  for (; t-- > 0; )
94
95
  n[t] = e[t];
95
96
  return n;
96
- }, bt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), At = (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
- }, Rt = (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
- }, Ot = O("HTMLFormElement"), Ct = (e) => e.toLowerCase().replace(
110
+ }, Nt = C("HTMLFormElement"), xt = (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
- ), me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tt = O("RegExp"), je = (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
- I(n, (s, i) => {
117
- t(s, i, e) !== !1 && (r[i] = s);
117
+ k(n, (s, i) => {
118
+ let o;
119
+ (o = t(s, i, e)) !== !1 && (r[i] = o || s);
118
120
  }), Object.defineProperties(e, r);
119
- }, _t = (e) => {
120
- je(e, (t, n) => {
121
- if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
121
+ }, Dt = (e) => {
122
+ $e(e, (t, n) => {
123
+ if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
122
124
  return !1;
123
125
  const r = e[n];
124
- if (P(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 mt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
131
133
  });
132
134
  }
133
135
  });
134
- }, Pt = (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 F(e) ? r(e) : r(String(e).split(t)), n;
141
- }, Nt = () => {
142
- }, xt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", ye = "0123456789", qe = {
143
- DIGIT: ye,
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 = {
145
+ DIGIT: we,
144
146
  ALPHA: X,
145
- ALPHA_DIGIT: X + X.toUpperCase() + ye
146
- }, Ft = (e = 16, t = qe.ALPHA_DIGIT) => {
147
+ ALPHA_DIGIT: X + X.toUpperCase() + we
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 Dt(e) {
154
- return !!(e && P(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 Ut = (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 = F(r) ? [] : {};
164
- return I(r, (o, c) => {
165
- const d = n(o, s + 1);
166
- !B(d) && (i[c] = d);
165
+ const i = U(r) ? [] : {};
166
+ return k(r, (o, c) => {
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: F,
175
- isArrayBuffer: Ue,
176
- isBuffer: rt,
177
- isFormData: dt,
178
- isArrayBufferView: st,
179
- isString: ot,
180
- isNumber: Le,
181
- isBoolean: it,
182
- isObject: ce,
183
- isPlainObject: H,
184
- isUndefined: B,
185
- isDate: at,
186
- isFile: ct,
187
- isBlob: ut,
188
- isRegExp: Tt,
189
- isFunction: P,
190
- isStream: ft,
191
- isURLSearchParams: ht,
192
- isTypedArray: bt,
193
- isFileList: lt,
194
- forEach: I,
175
+ }, qt = C("AsyncFunction"), $t = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), a = {
176
+ isArray: U,
177
+ isArrayBuffer: Be,
178
+ isBuffer: ct,
179
+ isFormData: wt,
180
+ isArrayBufferView: ut,
181
+ isString: lt,
182
+ isNumber: Ie,
183
+ isBoolean: ft,
184
+ isObject: J,
185
+ isPlainObject: $,
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,
196
+ forEach: k,
195
197
  merge: te,
196
- extend: mt,
197
- trim: pt,
198
- stripBOM: yt,
199
- inherits: wt,
200
- toFlatObject: Et,
201
- kindOf: ae,
202
- kindOfTest: O,
203
- endsWith: gt,
204
- toArray: St,
205
- forEachEntry: At,
206
- matchAll: Rt,
207
- isHTMLForm: Ot,
208
- hasOwnProperty: me,
209
- hasOwnProp: me,
198
+ extend: St,
199
+ trim: Et,
200
+ stripBOM: bt,
201
+ inherits: At,
202
+ toFlatObject: Rt,
203
+ kindOf: V,
204
+ kindOfTest: C,
205
+ endsWith: Ct,
206
+ toArray: Ot,
207
+ forEachEntry: Pt,
208
+ matchAll: _t,
209
+ isHTMLForm: Nt,
210
+ hasOwnProperty: ye,
211
+ hasOwnProp: ye,
210
212
  // an alias to avoid ESLint no-prototype-builtins detection
211
- reduceDescriptors: je,
212
- freezeMethods: _t,
213
- toObjectSet: Pt,
214
- toCamelCase: Ct,
215
- noop: Nt,
216
- toFiniteNumber: xt,
217
- findKey: Be,
218
- global: Ie,
219
- isContextDefined: ke,
220
- ALPHABET: qe,
221
- generateString: Ft,
222
- isSpecCompliantForm: Dt,
223
- toJSONObject: Ut
213
+ reduceDescriptors: $e,
214
+ freezeMethods: Dt,
215
+ toObjectSet: Ut,
216
+ toCamelCase: xt,
217
+ noop: Lt,
218
+ toFiniteNumber: Bt,
219
+ findKey: je,
220
+ global: ke,
221
+ isContextDefined: qe,
222
+ ALPHABET: He,
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);
@@ -246,7 +250,7 @@ a.inherits(m, Error, {
246
250
  };
247
251
  }
248
252
  });
249
- const He = m.prototype, $e = {};
253
+ const ve = m.prototype, ze = {};
250
254
  [
251
255
  "ERR_BAD_OPTION_VALUE",
252
256
  "ERR_BAD_OPTION",
@@ -262,95 +266,95 @@ const He = m.prototype, $e = {};
262
266
  "ERR_INVALID_URL"
263
267
  // eslint-disable-next-line func-names
264
268
  ].forEach((e) => {
265
- $e[e] = { value: e };
269
+ ze[e] = { value: e };
266
270
  });
267
- Object.defineProperties(m, $e);
268
- Object.defineProperty(He, "isAxiosError", { value: !0 });
271
+ Object.defineProperties(m, ze);
272
+ Object.defineProperty(ve, "isAxiosError", { value: !0 });
269
273
  m.from = (e, t, n, r, s, i) => {
270
- const o = Object.create(He);
271
- return a.toFlatObject(e, o, function(d) {
272
- return d !== Error.prototype;
274
+ const o = Object.create(ve);
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 Lt = null;
279
+ const Ht = null;
276
280
  function ne(e) {
277
281
  return a.isPlainObject(e) || a.isArray(e);
278
282
  }
279
- function ve(e) {
283
+ function Ve(e) {
280
284
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
281
285
  }
282
- function we(e, t, n) {
286
+ function ge(e, t, n) {
283
287
  return e ? e.concat(t).map(function(s, i) {
284
- return s = ve(s), !n && i ? "[" + s + "]" : s;
288
+ return s = Ve(s), !n && i ? "[" + s + "]" : s;
285
289
  }).join(n ? "." : "") : t;
286
290
  }
287
- function Bt(e) {
291
+ function vt(e) {
288
292
  return a.isArray(e) && !e.some(ne);
289
293
  }
290
- const It = 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 g = 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) && Bt(f) || (a.isFileList(f) || a.endsWith(p, "[]")) && (g = a.toArray(f)))
321
- return p = ve(p), g.forEach(function(j, et) {
322
- !(a.isUndefined(j) || j === 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 ? we([p], et, i) : o === null ? p : p + "[]",
325
- u(j)
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(we(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 = [], E = Object.assign(It, {
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(g, N) {
341
- (!(a.isUndefined(g) || g === 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
- g,
344
- a.isString(N) ? N.trim() : N,
345
- p,
346
- E
347
- )) === !0 && y(g, 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,14 +370,14 @@ 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 ze = ue.prototype;
373
- ze.append = function(t, n) {
376
+ const Ke = ce.prototype;
377
+ Ke.append = function(t, n) {
374
378
  this._pairs.push([t, n]);
375
379
  };
376
- ze.toString = function(t) {
380
+ Ke.toString = function(t) {
377
381
  const n = t ? function(r) {
378
382
  return t.call(this, r, Ee);
379
383
  } : Ee;
@@ -381,21 +385,21 @@ ze.toString = function(t) {
381
385
  return n(s[0]) + "=" + n(s[1]);
382
386
  }, "").join("&");
383
387
  };
384
- function kt(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
- function Ve(e, t, n) {
391
+ function Je(e, t, n) {
388
392
  if (!t)
389
393
  return e;
390
- const r = n && n.encode || kt, 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 jt {
402
+ class Kt {
399
403
  constructor() {
400
404
  this.handlers = [];
401
405
  }
@@ -449,36 +453,39 @@ class jt {
449
453
  });
450
454
  }
451
455
  }
452
- const ge = jt, Ke = {
456
+ const Se = Kt, Me = {
453
457
  silentJSONParsing: !0,
454
458
  forcedJSONParsing: !0,
455
459
  clarifyTimeoutError: !1
456
- }, qt = typeof URLSearchParams < "u" ? URLSearchParams : ue, Ht = typeof FormData < "u" ? FormData : null, $t = 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
- })(), zt = (() => 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: qt,
464
- FormData: Ht,
465
- Blob: $t
463
+ URLSearchParams: Jt,
464
+ FormData: Mt,
465
+ Blob: Wt
466
466
  },
467
- isStandardBrowserEnv: vt,
468
- isStandardBrowserWebWorkerEnv: zt,
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 Vt(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 Kt(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 Jt(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 Jt(e) {
487
494
  i = n[r], t[i] = e[i];
488
495
  return t;
489
496
  }
490
- function Je(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] = Jt(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(Kt(r), s, n, 0);
506
+ t(en(r), s, n, 0);
500
507
  }), n;
501
508
  }
502
509
  return null;
503
510
  }
504
- const Mt = {
505
- "Content-Type": void 0
506
- };
507
- function Wt(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 Wt(e, t, n) {
514
518
  }
515
519
  return (n || JSON.stringify)(e);
516
520
  }
517
- const M = {
518
- transitional: Ke,
521
+ const ue = {
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(Je(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 Vt(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), Wt(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(Mt);
585
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
586
+ ue.headers[e] = {};
585
587
  });
586
- const le = M, Gt = 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, Gt = a.toObjectSet([
601
603
  "referer",
602
604
  "retry-after",
603
605
  "user-agent"
604
- ]), Xt = (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] && Gt[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
- }, Se = Symbol("internals");
612
- function U(e) {
613
+ }, be = Symbol("internals");
614
+ function B(e) {
613
615
  return e && String(e).trim().toLowerCase();
614
616
  }
615
- function $(e) {
616
- return e === !1 || e == null ? e : a.isArray(e) ? e.map($) : String(e);
617
+ function H(e) {
618
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
617
619
  }
618
- function Yt(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 Qt(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 Zt(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 en(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 = U(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] = $(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()) && !Qt(t) ? o(Xt(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 = U(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 Yt(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 = U(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 = U(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
  }
@@ -714,11 +714,11 @@ let W = class {
714
714
  return a.forEach(this, (s, i) => {
715
715
  const o = a.findKey(r, i);
716
716
  if (o) {
717
- n[o] = $(s), delete n[i];
717
+ n[o] = H(s), delete n[i];
718
718
  return;
719
719
  }
720
- const c = t ? Zt(i) : String(i).trim();
721
- c !== i && delete n[i], n[c] = $(s), r[c] = !0;
720
+ const c = t ? cn(i) : String(i).trim();
721
+ c !== i && delete n[i], n[c] = H(s), r[c] = !0;
722
722
  }), this;
723
723
  }
724
724
  concat(...t) {
@@ -748,37 +748,45 @@ let W = class {
748
748
  return n.forEach((s) => r.set(s)), r;
749
749
  }
750
750
  static accessor(t) {
751
- const r = (this[Se] = this[Se] = {
751
+ const r = (this[be] = this[be] = {
752
752
  accessors: {}
753
753
  }).accessors, s = this.prototype;
754
754
  function i(o) {
755
- const c = U(o);
756
- r[c] || (en(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 Me(e) {
780
+ function Xe(e) {
773
781
  return !!(e && e.__CANCEL__);
774
782
  }
775
- function k(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(k, m, {
786
+ a.inherits(q, m, {
779
787
  __CANCEL__: !0
780
788
  });
781
- function tn(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 tn(e, t, n) {
788
796
  n
789
797
  ));
790
798
  }
791
- const nn = 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 rn(e) {
826
+ function dn(e) {
823
827
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
824
828
  }
825
- function sn(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 We(e, t) {
829
- return e && !rn(t) ? sn(e, t) : t;
832
+ function Qe(e, t) {
833
+ return e && !dn(t) ? pn(e, t) : t;
830
834
  }
831
- const on = 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 on = b.isStandardBrowserEnv ? (
860
864
  };
861
865
  }()
862
866
  );
863
- function an(e) {
867
+ function mn(e) {
864
868
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
865
869
  return t && t[1] || "";
866
870
  }
867
- function cn(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, E = 0;
875
- for (; h !== s; )
876
- E += 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(E * 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
- function be(e, t) {
887
+ function Ae(e, t) {
884
888
  let n = 0;
885
- const r = cn(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 un = typeof XMLHttpRequest < "u", ln = un && 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 = We(e.baseURL, e.url);
916
- u.open(e.method.toUpperCase(), Ve(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
- tn(function(g) {
931
- n(g), d();
932
- }, function(g) {
933
- r(g), 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 || Ke;
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 || on(l)) && e.xsrfCookieName && nn.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", be(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", be(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
958
- u && (r(!y || y.type ? new k(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 E = an(l);
961
- if (E && b.protocols.indexOf(E) === -1) {
962
- r(new m("Unsupported protocol " + E + ":", 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: Lt,
969
- xhr: ln
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 fn = {
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 k(null, e);
1025
+ throw new q(null, e);
1003
1026
  }
1004
- function Ae(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), fn.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 Me(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 Re = (e) => e instanceof R ? e.toJSON() : e;
1023
- function x(e, t) {
1045
+ const Oe = (e) => e instanceof O ? e.toJSON() : e;
1046
+ function D(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 x(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 x(e, t) {
1078
1102
  socketPath: o,
1079
1103
  responseEncoding: o,
1080
1104
  validateStatus: c,
1081
- headers: (u, l) => s(Re(u), Re(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, E = h(e[l], t[l], l);
1085
- a.isUndefined(E) && h !== c || (n[l] = E);
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 Ge = "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" + Ge + "] 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 dn(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,24 +1142,24 @@ function dn(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: dn,
1154
+ const se = {
1155
+ assertOptions: Sn,
1132
1156
  validators: fe
1133
- }, T = re.validators;
1134
- let V = class {
1157
+ }, N = se.validators;
1158
+ let z = class {
1135
1159
  constructor(t) {
1136
1160
  this.defaults = t, this.interceptors = {
1137
- request: new ge(),
1138
- response: new ge()
1161
+ request: new Se(),
1162
+ response: new Se()
1139
1163
  };
1140
1164
  }
1141
1165
  /**
@@ -1147,71 +1171,73 @@ let V = class {
1147
1171
  * @returns {Promise} The Promise to be fulfilled
1148
1172
  */
1149
1173
  request(t, n) {
1150
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = x(this.defaults, n);
1174
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = D(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: N.transitional(N.boolean),
1178
+ forcedJSONParsing: N.transitional(N.boolean),
1179
+ clarifyTimeoutError: N.transitional(N.boolean)
1180
+ }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1181
+ serialize: s
1182
+ } : se.assertOptions(s, {
1183
+ encode: N.function,
1184
+ serialize: N.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, E;
1180
- if (!d) {
1181
- const f = [Ae.bind(this), void 0];
1182
- for (f.unshift.apply(f, c), f.push.apply(f, u), E = f.length, l = Promise.resolve(n); h < E; )
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
- E = c.length;
1187
- let y = n;
1188
- for (h = 0; h < E; ) {
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 = Ae.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, E = u.length; h < E; )
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
- t = x(this.defaults, t);
1208
- const n = We(t.baseURL, t.url);
1209
- return Ve(n, t.params, t.paramsSerializer);
1233
+ t = D(this.defaults, t);
1234
+ const n = Qe(t.baseURL, t.url);
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) {
1214
- return this.request(x(r || {}, {
1239
+ z.prototype[t] = function(n, r) {
1240
+ return this.request(D(r || {}, {
1215
1241
  method: t,
1216
1242
  url: n,
1217
1243
  data: (r || {}).data
@@ -1221,7 +1247,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
1221
1247
  a.forEach(["post", "put", "patch"], function(t) {
1222
1248
  function n(r) {
1223
1249
  return function(i, o, c) {
1224
- return this.request(x(c || {}, {
1250
+ return this.request(D(c || {}, {
1225
1251
  method: t,
1226
1252
  headers: r ? {
1227
1253
  "Content-Type": "multipart/form-data"
@@ -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 hn = class Xe {
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 hn = class Xe {
1259
1285
  r.unsubscribe(i);
1260
1286
  }, o;
1261
1287
  }, t(function(i, o, c) {
1262
- r.reason || (r.reason = new k(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 hn = class Xe {
1295
1321
  static source() {
1296
1322
  let t;
1297
1323
  return {
1298
- token: new Xe(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 pn = hn;
1306
- function mn(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 yn(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,79 +1402,81 @@ 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 wn = se;
1383
- function Ye(e) {
1384
- const t = new z(e), n = Fe(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 Ye(x(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(D(e, s));
1387
1413
  }, n;
1388
1414
  }
1389
- const w = Ye(le);
1390
- w.Axios = z;
1391
- w.CanceledError = k;
1392
- w.CancelToken = pn;
1393
- w.isCancel = Me;
1394
- w.VERSION = Ge;
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 = mn;
1402
- w.isAxiosError = yn;
1403
- w.mergeConfig = x;
1404
- w.AxiosHeaders = R;
1405
- w.formToJSON = (e) => Je(a.isHTMLForm(e) ? new FormData(e) : e);
1406
- w.HttpStatusCode = wn;
1407
- w.default = w;
1408
- const Qe = w, {
1409
- Axios: Qn,
1427
+ y.spread = Rn;
1428
+ y.isAxiosError = Cn;
1429
+ y.mergeConfig = D;
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: ur,
1410
1437
  AxiosError: ee,
1411
- CanceledError: Zn,
1412
- isCancel: er,
1413
- CancelToken: tr,
1414
- VERSION: nr,
1415
- all: rr,
1416
- Cancel: sr,
1417
- isAxiosError: or,
1418
- spread: ir,
1419
- toFormData: ar,
1420
- AxiosHeaders: cr,
1421
- HttpStatusCode: ur,
1422
- formToJSON: lr,
1423
- mergeConfig: fr
1424
- } = Qe;
1425
- class Ce extends Error {
1438
+ CanceledError: lr,
1439
+ isCancel: fr,
1440
+ CancelToken: dr,
1441
+ VERSION: pr,
1442
+ all: hr,
1443
+ Cancel: mr,
1444
+ isAxiosError: yr,
1445
+ spread: wr,
1446
+ toFormData: gr,
1447
+ AxiosHeaders: Er,
1448
+ HttpStatusCode: Sr,
1449
+ formToJSON: br,
1450
+ getAdapter: Ar,
1451
+ mergeConfig: Rr
1452
+ } = nt;
1453
+ class Pe extends Error {
1426
1454
  constructor(n) {
1427
1455
  super(n.join(", "));
1428
1456
  S(this, "errors");
1429
1457
  this.name = "ValidationError", this.errors = n;
1430
1458
  }
1431
1459
  }
1432
- class Te extends Error {
1460
+ class _e extends Error {
1433
1461
  constructor(n) {
1434
1462
  super("Address already registered.");
1435
1463
  S(this, "address");
1436
1464
  this.name = "AddressInUseError", this.address = n;
1437
1465
  }
1438
1466
  }
1439
- class _e extends Error {
1467
+ class Ne extends Error {
1440
1468
  constructor(n) {
1441
1469
  super("Code already registered.");
1442
1470
  S(this, "code");
1443
1471
  this.name = "CodeInUseError", this.code = n;
1444
1472
  }
1445
1473
  }
1446
- class Pe extends Error {
1474
+ class xe extends Error {
1447
1475
  constructor() {
1448
1476
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1449
1477
  }
1450
1478
  }
1451
- class En {
1479
+ class Tn {
1452
1480
  constructor(t) {
1453
1481
  S(this, "httpClient");
1454
1482
  S(this, "_debug");
@@ -1468,9 +1496,9 @@ class En {
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 Pe() : c == "address in use" ? new Te(t) : c == "code in use" ? new _e(n) : new Error(c);
1499
+ throw c == "invalid signature" ? new xe() : c == "address in use" ? new _e(t) : c == "code in use" ? new Ne(n) : new Error(c);
1472
1500
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1473
- throw new Ce(o.message);
1501
+ throw new Pe(o.message);
1474
1502
  }
1475
1503
  throw i;
1476
1504
  }
@@ -1488,9 +1516,9 @@ class En {
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 Pe() : c == "address in use" ? new Te(t) : c == "code in use" ? new _e(n) : new Error(c);
1519
+ throw c == "invalid signature" ? new xe() : c == "address in use" ? new _e(t) : c == "code in use" ? new Ne(n) : new Error(c);
1492
1520
  } else if ((o == null ? void 0 : o.message) instanceof Array)
1493
- throw new Ce(o.message);
1521
+ throw new Pe(o.message);
1494
1522
  }
1495
1523
  throw i;
1496
1524
  }
@@ -1511,7 +1539,7 @@ class En {
1511
1539
  }
1512
1540
  }
1513
1541
  }
1514
- class gn {
1542
+ class Pn {
1515
1543
  constructor(t) {
1516
1544
  S(this, "httpClient");
1517
1545
  this.httpClient = t.httpClient;
@@ -1521,8 +1549,8 @@ class gn {
1521
1549
  return t;
1522
1550
  }
1523
1551
  }
1524
- const Ne = "fuul.sent", Sn = 60;
1525
- class bn {
1552
+ const Fe = "fuul.sent", _n = 60;
1553
+ class Nn {
1526
1554
  constructor(t) {
1527
1555
  S(this, "debug");
1528
1556
  S(this, "httpClient");
@@ -1536,37 +1564,37 @@ class bn {
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 = `${Ne}_${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 > Sn)
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 = `${Ne}_${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 An = "3.3.2", Rn = {
1559
- version: An
1586
+ const xn = "3.4.0", Fn = {
1587
+ version: xn
1560
1588
  };
1561
- class On {
1589
+ class Dn {
1562
1590
  constructor(t) {
1563
1591
  S(this, "client");
1564
1592
  S(this, "queryParams");
1565
- this.client = Qe.create({
1593
+ this.client = nt.create({
1566
1594
  ...t,
1567
1595
  headers: {
1568
1596
  Authorization: `Bearer ${t.apiKey}`,
1569
- "X-Fuul-Sdk-Version": Rn.version
1597
+ "X-Fuul-Sdk-Version": Fn.version
1570
1598
  }
1571
1599
  }), this.queryParams = t.queryParams ? this.buildQueryParams(t.queryParams) : "";
1572
1600
  }
@@ -1589,8 +1617,22 @@ class On {
1589
1617
  return this.client.delete(t + this.queryParams);
1590
1618
  }
1591
1619
  }
1592
- let Cn = (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), "");
1593
- const Tn = "fuul.tracking_id", _n = ["google.com", "bing.com", "yahoo.com"], de = () => Un(Tn, () => Cn()), xe = () => _("af") || _("referrer"), Pn = () => document.referrer, Nn = () => Ln(), xn = () => _("category"), Fn = () => _("title"), Dn = () => _("tag"), Un = (e, t) => {
1620
+ const De = "/payouts";
1621
+ class Un {
1622
+ constructor(t) {
1623
+ S(this, "httpClient");
1624
+ S(this, "_debug");
1625
+ this.httpClient = t.httpClient, this._debug = t.debug;
1626
+ }
1627
+ async getProjectPayoutsLeaderboard(t) {
1628
+ return (await this.httpClient.get(`${De}/leaderboard`, t)).data;
1629
+ }
1630
+ async getUserPayouts(t) {
1631
+ return (await this.httpClient.get(De, t)).data;
1632
+ }
1633
+ }
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", In = ["google.com", "bing.com", "yahoo.com"], de = () => vn(Bn, () => Ln()), Ue = () => x("af") || x("referrer"), jn = () => document.referrer, kn = () => zn(), qn = () => x("category"), $n = () => x("title"), Hn = () => x("tag"), vn = (e, t) => {
1594
1636
  const n = localStorage.getItem(e);
1595
1637
  if (n)
1596
1638
  return n;
@@ -1598,35 +1640,35 @@ const Tn = "fuul.tracking_id", _n = ["google.com", "bing.com", "yahoo.com"], de
1598
1640
  const r = t();
1599
1641
  return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
1600
1642
  }
1601
- }, _ = (e) => new URLSearchParams(window.location.search).get(e), Ln = () => {
1602
- const e = _("source"), t = _("af") || _("referrer");
1643
+ }, x = (e) => new URLSearchParams(window.location.search).get(e), zn = () => {
1644
+ const e = x("source"), t = x("af") || x("referrer");
1603
1645
  if (e)
1604
1646
  return e;
1605
1647
  if (t)
1606
1648
  return "affiliate";
1607
- const n = Bn(document.referrer);
1608
- return n && _n.includes(n) ? "organic" : "direct";
1609
- }, Bn = (e) => {
1649
+ const n = Vn(document.referrer);
1650
+ return n && In.includes(n) ? "organic" : "direct";
1651
+ }, Vn = (e) => {
1610
1652
  var t;
1611
1653
  try {
1612
1654
  return (t = new URL(e).hostname) == null ? void 0 : t.split(".").slice(-2).join(".");
1613
1655
  } catch {
1614
1656
  return null;
1615
1657
  }
1616
- }, In = "https://api.fuul.xyz/api/v1/";
1617
- let L = !1, oe = !1, he, q, Ze, D, G;
1618
- function kn(e) {
1619
- L = !!e.debug, !oe && (he = e.apiKey, Mn(), q = Wn(
1620
- e.baseApiUrl ?? In,
1658
+ }, Kn = "https://api.fuul.xyz/api/v1/";
1659
+ let F = !1, ie = !1, pe, I, rt, L, G, he;
1660
+ function Jn(e) {
1661
+ F = !!e.debug, !ie && (pe = e.apiKey, sr(), I = or(
1662
+ e.baseApiUrl ?? Kn,
1621
1663
  e.defaultQueryParams ?? {}
1622
- ), Ze = new gn({ httpClient: q, debug: L }), G = new bn({ httpClient: q, debug: L }), D = new En({ httpClient: q, debug: L }), oe = !0, L && console.debug("Fuul SDK: init() complete"));
1664
+ ), rt = new Pn({ httpClient: I, debug: F }), G = new Nn({ httpClient: I, debug: F }), L = new Tn({ httpClient: I, debug: F }), he = new Un({ httpClient: I, debug: F }), ie = !0, F && console.debug("Fuul SDK: init() complete"));
1623
1665
  }
1624
- function C() {
1625
- if (!oe)
1666
+ function T() {
1667
+ if (!ie)
1626
1668
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
1627
1669
  }
1628
- async function jn(e, t) {
1629
- C(), pe();
1670
+ async function Mn(e, t) {
1671
+ T(), me();
1630
1672
  const n = {
1631
1673
  name: e,
1632
1674
  args: t ?? {},
@@ -1636,8 +1678,8 @@ async function jn(e, t) {
1636
1678
  };
1637
1679
  await G.sendEvent(n);
1638
1680
  }
1639
- async function qn(e) {
1640
- C(), pe();
1681
+ async function Wn(e) {
1682
+ T(), me();
1641
1683
  const t = {
1642
1684
  name: "pageview",
1643
1685
  args: {
@@ -1646,19 +1688,19 @@ async function qn(e) {
1646
1688
  },
1647
1689
  metadata: {
1648
1690
  tracking_id: de(),
1649
- referrer_url: Pn(),
1650
- source: Nn(),
1651
- affiliate_id: xe() ?? void 0,
1652
- referrer: xe() ?? void 0,
1653
- category: xn() ?? void 0,
1654
- title: Fn() ?? void 0,
1655
- tag: Dn() ?? void 0
1691
+ referrer_url: jn(),
1692
+ source: kn(),
1693
+ affiliate_id: Ue() ?? void 0,
1694
+ referrer: Ue() ?? void 0,
1695
+ category: qn() ?? void 0,
1696
+ title: $n() ?? void 0,
1697
+ tag: Hn() ?? void 0
1656
1698
  }
1657
1699
  };
1658
1700
  await G.sendEvent(t);
1659
1701
  }
1660
- async function Hn(e) {
1661
- C(), pe();
1702
+ async function Gn(e) {
1703
+ T(), me();
1662
1704
  const t = {
1663
1705
  name: "connect_wallet",
1664
1706
  args: {},
@@ -1668,60 +1710,68 @@ async function Hn(e) {
1668
1710
  };
1669
1711
  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);
1670
1712
  }
1671
- async function $n(e, t, n) {
1672
- C(), await D.create(e, t, n);
1713
+ async function Xn(e, t, n) {
1714
+ T(), await L.create(e, t, n);
1673
1715
  }
1674
- async function vn(e, t, n) {
1675
- C(), await D.update(e, t, n);
1716
+ async function Qn(e, t, n) {
1717
+ T(), await L.update(e, t, n);
1676
1718
  }
1677
- async function zn(e) {
1678
- return C(), await D.getCode(e);
1719
+ async function Yn(e) {
1720
+ return T(), await L.getCode(e);
1679
1721
  }
1680
- async function Vn(e) {
1681
- return C(), await D.isCodeFree(e);
1722
+ async function Zn(e) {
1723
+ return T(), await L.isCodeFree(e);
1682
1724
  }
1683
- async function Kn(e, t, n) {
1684
- C();
1685
- const r = await D.getCode(t), s = new URLSearchParams({
1725
+ async function er(e, t, n) {
1726
+ T();
1727
+ const r = await L.getCode(t), s = new URLSearchParams({
1686
1728
  af: r ?? t
1687
1729
  });
1688
1730
  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()}`;
1689
1731
  }
1690
- async function Jn() {
1691
- return C(), Ze.getAll();
1732
+ function tr(e) {
1733
+ return he.getProjectPayoutsLeaderboard(e);
1734
+ }
1735
+ function nr(e) {
1736
+ return he.getUserPayouts(e);
1737
+ }
1738
+ async function rr() {
1739
+ return T(), rt.getAll();
1692
1740
  }
1693
- function pe() {
1741
+ function me() {
1694
1742
  if (typeof window > "u" || typeof document > "u")
1695
1743
  throw new Error("Fuul SDK: Browser context required");
1696
1744
  }
1697
- function Mn() {
1698
- if (!he)
1745
+ function sr() {
1746
+ if (!pe)
1699
1747
  throw new Error("Fuul SDK: Invalid API key");
1700
1748
  }
1701
- function Wn(e, t) {
1702
- return new On({
1749
+ function or(e, t) {
1750
+ return new Dn({
1703
1751
  baseURL: e,
1704
1752
  timeout: 1e4,
1705
- apiKey: he,
1753
+ apiKey: pe,
1706
1754
  queryParams: t
1707
1755
  });
1708
1756
  }
1709
- const dr = {
1710
- init: kn,
1711
- sendEvent: jn,
1712
- sendPageview: qn,
1713
- sendConnectWallet: Hn,
1714
- generateTrackingLink: Kn,
1715
- getConversions: Jn,
1716
- createAffiliateCode: $n,
1717
- updateAffiliateCode: vn,
1718
- getAffiliateCode: zn,
1719
- isAffiliateCodeFree: Vn
1757
+ const Cr = {
1758
+ init: Jn,
1759
+ sendEvent: Mn,
1760
+ sendPageview: Wn,
1761
+ sendConnectWallet: Gn,
1762
+ generateTrackingLink: er,
1763
+ getConversions: rr,
1764
+ createAffiliateCode: Xn,
1765
+ updateAffiliateCode: Qn,
1766
+ getAffiliateCode: Yn,
1767
+ isAffiliateCodeFree: Zn,
1768
+ getUserPayouts: nr,
1769
+ getProjectPayoutsLeaderboard: tr
1720
1770
  };
1721
1771
  export {
1722
- Te as AddressInUseError,
1723
- _e as CodeInUseError,
1724
- dr as Fuul,
1725
- Pe as InvalidSignatureError,
1726
- Ce as ValidationError
1772
+ _e as AddressInUseError,
1773
+ Ne as CodeInUseError,
1774
+ Cr as Fuul,
1775
+ xe as InvalidSignatureError,
1776
+ Pe as ValidationError
1727
1777
  };