@fuul/sdk 7.6.0 → 7.7.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,29 +1,54 @@
1
1
  var Pt = Object.defineProperty;
2
2
  var Ot = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var S = (e, t, r) => Ot(e, typeof t != "symbol" ? t + "" : t, r);
4
+ const Le = "/affiliate-portal";
5
+ class xt {
6
+ constructor(t) {
7
+ S(this, "httpClient");
8
+ this.httpClient = t.httpClient;
9
+ }
10
+ async getAffiliateStats(t) {
11
+ return (await this.httpClient.get({
12
+ path: `${Le}/stats`,
13
+ queryParams: {
14
+ user_identifier: t.user_identifier
15
+ }
16
+ })).data;
17
+ }
18
+ async getAffiliateNewTraders(t) {
19
+ return (await this.httpClient.get({
20
+ path: `${Le}/new-traders`,
21
+ queryParams: {
22
+ user_identifier: t.user_identifier,
23
+ from: t.from,
24
+ to: t.to
25
+ }
26
+ })).data;
27
+ }
28
+ }
4
29
  function Ze(e, t) {
5
30
  return function() {
6
31
  return e.apply(t, arguments);
7
32
  };
8
33
  }
9
- const { toString: xt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: et } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
10
- const r = xt.call(t);
34
+ const { toString: Nt } = Object.prototype, { getPrototypeOf: Ce } = Object, { iterator: se, toStringTag: et } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
35
+ const r = Nt.call(t);
11
36
  return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
12
37
  })(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ie(t) === e), oe = (e) => (t) => typeof t === e, { isArray: H } = Array, J = oe("undefined");
13
38
  function W(e) {
14
39
  return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
40
  }
16
41
  const tt = x("ArrayBuffer");
17
- function Nt(e) {
42
+ function Ut(e) {
18
43
  let t;
19
44
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
20
45
  }
21
- const Ut = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !== null && typeof e == "object", Lt = (e) => e === !0 || e === !1, Z = (e) => {
46
+ const Lt = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !== null && typeof e == "object", Dt = (e) => e === !0 || e === !1, Z = (e) => {
22
47
  if (ie(e) !== "object")
23
48
  return !1;
24
- const t = _e(e);
49
+ const t = Ce(e);
25
50
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(se in e);
26
- }, Dt = (e) => {
51
+ }, Ft = (e) => {
27
52
  if (!Q(e) || W(e))
28
53
  return !1;
29
54
  try {
@@ -31,11 +56,11 @@ const Ut = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !==
31
56
  } catch {
32
57
  return !1;
33
58
  }
34
- }, Ft = x("Date"), kt = x("File"), Bt = x("Blob"), qt = x("FileList"), vt = (e) => Q(e) && P(e.pipe), It = (e) => {
59
+ }, kt = x("Date"), Bt = x("File"), qt = x("Blob"), vt = x("FileList"), It = (e) => Q(e) && P(e.pipe), jt = (e) => {
35
60
  let t;
36
61
  return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance
37
62
  t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
38
- }, jt = x("URLSearchParams"), [$t, Mt, Ht, Kt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Vt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
63
+ }, $t = x("URLSearchParams"), [Mt, Ht, Kt, Vt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
39
64
  function X(e, t, { allOwnKeys: r = !1 } = {}) {
40
65
  if (e === null || typeof e > "u")
41
66
  return;
@@ -73,27 +98,27 @@ function ye() {
73
98
  arguments[n] && X(arguments[n], r);
74
99
  return t;
75
100
  }
76
- const zt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
101
+ const Jt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
77
102
  r && P(s) ? e[i] = Ze(s, r) : e[i] = s;
78
- }, { allOwnKeys: n }), e), Jt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Wt = (e, t, r, n) => {
103
+ }, { allOwnKeys: n }), e), Wt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Qt = (e, t, r, n) => {
79
104
  e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
80
105
  value: t.prototype
81
106
  }), r && Object.assign(e.prototype, r);
82
- }, Qt = (e, t, r, n) => {
107
+ }, Xt = (e, t, r, n) => {
83
108
  let s, i, o;
84
109
  const c = {};
85
110
  if (t = t || {}, e == null) return t;
86
111
  do {
87
112
  for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
88
113
  o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
89
- e = r !== !1 && _e(e);
114
+ e = r !== !1 && Ce(e);
90
115
  } while (e && (!r || r(e, t)) && e !== Object.prototype);
91
116
  return t;
92
- }, Xt = (e, t, r) => {
117
+ }, Yt = (e, t, r) => {
93
118
  e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
94
119
  const n = e.indexOf(t, r);
95
120
  return n !== -1 && n === r;
96
- }, Yt = (e) => {
121
+ }, Gt = (e) => {
97
122
  if (!e) return null;
98
123
  if (H(e)) return e;
99
124
  let t = e.length;
@@ -102,31 +127,31 @@ const zt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
102
127
  for (; t-- > 0; )
103
128
  r[t] = e[t];
104
129
  return r;
105
- }, Gt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Zt = (e, t) => {
130
+ }, Zt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ce(Uint8Array)), er = (e, t) => {
106
131
  const n = (e && e[se]).call(e);
107
132
  let s;
108
133
  for (; (s = n.next()) && !s.done; ) {
109
134
  const i = s.value;
110
135
  t.call(e, i[0], i[1]);
111
136
  }
112
- }, er = (e, t) => {
137
+ }, tr = (e, t) => {
113
138
  let r;
114
139
  const n = [];
115
140
  for (; (r = e.exec(t)) !== null; )
116
141
  n.push(r);
117
142
  return n;
118
- }, tr = x("HTMLFormElement"), rr = (e) => e.toLowerCase().replace(
143
+ }, rr = x("HTMLFormElement"), nr = (e) => e.toLowerCase().replace(
119
144
  /[-_\s]([a-z\d])(\w*)/g,
120
145
  function(r, n, s) {
121
146
  return n.toUpperCase() + s;
122
147
  }
123
- ), Le = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), nr = x("RegExp"), it = (e, t) => {
148
+ ), De = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), sr = x("RegExp"), it = (e, t) => {
124
149
  const r = Object.getOwnPropertyDescriptors(e), n = {};
125
150
  X(r, (s, i) => {
126
151
  let o;
127
152
  (o = t(s, i, e)) !== !1 && (n[i] = o || s);
128
153
  }), Object.defineProperties(e, n);
129
- }, sr = (e) => {
154
+ }, ir = (e) => {
130
155
  it(e, (t, r) => {
131
156
  if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
132
157
  return !1;
@@ -141,19 +166,19 @@ const zt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
141
166
  });
142
167
  }
143
168
  });
144
- }, ir = (e, t) => {
169
+ }, or = (e, t) => {
145
170
  const r = {}, n = (s) => {
146
171
  s.forEach((i) => {
147
172
  r[i] = !0;
148
173
  });
149
174
  };
150
175
  return H(e) ? n(e) : n(String(e).split(t)), r;
151
- }, or = () => {
152
- }, ar = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
153
- function cr(e) {
176
+ }, ar = () => {
177
+ }, cr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
178
+ function ur(e) {
154
179
  return !!(e && P(e.append) && e[et] === "FormData" && e[se]);
155
180
  }
156
- const ur = (e) => {
181
+ const lr = (e) => {
157
182
  const t = new Array(10), r = (n, s) => {
158
183
  if (Q(n)) {
159
184
  if (t.indexOf(n) >= 0)
@@ -172,72 +197,72 @@ const ur = (e) => {
172
197
  return n;
173
198
  };
174
199
  return r(e, 0);
175
- }, lr = x("AsyncFunction"), fr = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), ot = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: i }) => {
200
+ }, fr = x("AsyncFunction"), dr = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), ot = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: i }) => {
176
201
  s === B && i === r && n.length && n.shift()();
177
202
  }, !1), (s) => {
178
203
  n.push(s), B.postMessage(r, "*");
179
204
  }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
180
205
  typeof setImmediate == "function",
181
206
  P(B.postMessage)
182
- ), dr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || ot, hr = (e) => e != null && P(e[se]), a = {
207
+ ), hr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || ot, pr = (e) => e != null && P(e[se]), a = {
183
208
  isArray: H,
184
209
  isArrayBuffer: tt,
185
210
  isBuffer: W,
186
- isFormData: It,
187
- isArrayBufferView: Nt,
188
- isString: Ut,
211
+ isFormData: jt,
212
+ isArrayBufferView: Ut,
213
+ isString: Lt,
189
214
  isNumber: rt,
190
- isBoolean: Lt,
215
+ isBoolean: Dt,
191
216
  isObject: Q,
192
217
  isPlainObject: Z,
193
- isEmptyObject: Dt,
194
- isReadableStream: $t,
195
- isRequest: Mt,
196
- isResponse: Ht,
197
- isHeaders: Kt,
218
+ isEmptyObject: Ft,
219
+ isReadableStream: Mt,
220
+ isRequest: Ht,
221
+ isResponse: Kt,
222
+ isHeaders: Vt,
198
223
  isUndefined: J,
199
- isDate: Ft,
200
- isFile: kt,
201
- isBlob: Bt,
202
- isRegExp: nr,
224
+ isDate: kt,
225
+ isFile: Bt,
226
+ isBlob: qt,
227
+ isRegExp: sr,
203
228
  isFunction: P,
204
- isStream: vt,
205
- isURLSearchParams: jt,
206
- isTypedArray: Gt,
207
- isFileList: qt,
229
+ isStream: It,
230
+ isURLSearchParams: $t,
231
+ isTypedArray: Zt,
232
+ isFileList: vt,
208
233
  forEach: X,
209
234
  merge: ye,
210
- extend: zt,
211
- trim: Vt,
212
- stripBOM: Jt,
213
- inherits: Wt,
214
- toFlatObject: Qt,
235
+ extend: Jt,
236
+ trim: zt,
237
+ stripBOM: Wt,
238
+ inherits: Qt,
239
+ toFlatObject: Xt,
215
240
  kindOf: ie,
216
241
  kindOfTest: x,
217
- endsWith: Xt,
218
- toArray: Yt,
219
- forEachEntry: Zt,
220
- matchAll: er,
221
- isHTMLForm: tr,
222
- hasOwnProperty: Le,
223
- hasOwnProp: Le,
242
+ endsWith: Yt,
243
+ toArray: Gt,
244
+ forEachEntry: er,
245
+ matchAll: tr,
246
+ isHTMLForm: rr,
247
+ hasOwnProperty: De,
248
+ hasOwnProp: De,
224
249
  // an alias to avoid ESLint no-prototype-builtins detection
225
250
  reduceDescriptors: it,
226
- freezeMethods: sr,
227
- toObjectSet: ir,
228
- toCamelCase: rr,
229
- noop: or,
230
- toFiniteNumber: ar,
251
+ freezeMethods: ir,
252
+ toObjectSet: or,
253
+ toCamelCase: nr,
254
+ noop: ar,
255
+ toFiniteNumber: cr,
231
256
  findKey: nt,
232
257
  global: B,
233
258
  isContextDefined: st,
234
- isSpecCompliantForm: cr,
235
- toJSONObject: ur,
236
- isAsyncFn: lr,
237
- isThenable: fr,
259
+ isSpecCompliantForm: ur,
260
+ toJSONObject: lr,
261
+ isAsyncFn: fr,
262
+ isThenable: dr,
238
263
  setImmediate: ot,
239
- asap: dr,
240
- isIterable: hr
264
+ asap: hr,
265
+ isIterable: pr
241
266
  };
242
267
  function m(e, t, r, n, s) {
243
268
  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), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
@@ -289,22 +314,22 @@ m.from = (e, t, r, n, s, i) => {
289
314
  return f !== Error.prototype;
290
315
  }, (c) => c !== "isAxiosError"), m.call(o, e.message, t, r, n, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
291
316
  };
292
- const pr = null;
317
+ const mr = null;
293
318
  function ge(e) {
294
319
  return a.isPlainObject(e) || a.isArray(e);
295
320
  }
296
321
  function ut(e) {
297
322
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
298
323
  }
299
- function De(e, t, r) {
324
+ function Fe(e, t, r) {
300
325
  return e ? e.concat(t).map(function(s, i) {
301
326
  return s = ut(s), !r && i ? "[" + s + "]" : s;
302
327
  }).join(r ? "." : "") : t;
303
328
  }
304
- function mr(e) {
329
+ function yr(e) {
305
330
  return a.isArray(e) && !e.some(ge);
306
331
  }
307
- const yr = a.toFlatObject(a, {}, null, function(t) {
332
+ const gr = a.toFlatObject(a, {}, null, function(t) {
308
333
  return /^is[A-Z]/.test(t);
309
334
  });
310
335
  function ae(e, t, r) {
@@ -335,18 +360,18 @@ function ae(e, t, r) {
335
360
  if (h && !p && typeof h == "object") {
336
361
  if (a.endsWith(y, "{}"))
337
362
  y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
338
- else if (a.isArray(h) && mr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
363
+ else if (a.isArray(h) && yr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
339
364
  return y = ut(y), b.forEach(function(R, L) {
340
365
  !(a.isUndefined(R) || R === null) && t.append(
341
366
  // eslint-disable-next-line no-nested-ternary
342
- o === !0 ? De([y], L, i) : o === null ? y : y + "[]",
367
+ o === !0 ? Fe([y], L, i) : o === null ? y : y + "[]",
343
368
  u(R)
344
369
  );
345
370
  }), !1;
346
371
  }
347
- return ge(h) ? !0 : (t.append(De(p, y, i), u(h)), !1);
372
+ return ge(h) ? !0 : (t.append(Fe(p, y, i), u(h)), !1);
348
373
  }
349
- const d = [], g = Object.assign(yr, {
374
+ const d = [], g = Object.assign(gr, {
350
375
  defaultVisitor: l,
351
376
  convertValue: u,
352
377
  isVisitable: ge
@@ -355,14 +380,14 @@ function ae(e, t, r) {
355
380
  if (!a.isUndefined(h)) {
356
381
  if (d.indexOf(h) !== -1)
357
382
  throw Error("Circular reference detected in " + y.join("."));
358
- d.push(h), a.forEach(h, function(b, _) {
383
+ d.push(h), a.forEach(h, function(b, C) {
359
384
  (!(a.isUndefined(b) || b === null) && s.call(
360
385
  t,
361
386
  b,
362
- a.isString(_) ? _.trim() : _,
387
+ a.isString(C) ? C.trim() : C,
363
388
  y,
364
389
  g
365
- )) === !0 && w(b, y ? y.concat(_) : [_]);
390
+ )) === !0 && w(b, y ? y.concat(C) : [C]);
366
391
  }), d.pop();
367
392
  }
368
393
  }
@@ -370,7 +395,7 @@ function ae(e, t, r) {
370
395
  throw new TypeError("data must be an object");
371
396
  return w(e), t;
372
397
  }
373
- function Fe(e) {
398
+ function ke(e) {
374
399
  const t = {
375
400
  "!": "%21",
376
401
  "'": "%27",
@@ -393,19 +418,19 @@ lt.append = function(t, r) {
393
418
  };
394
419
  lt.toString = function(t) {
395
420
  const r = t ? function(n) {
396
- return t.call(this, n, Fe);
397
- } : Fe;
421
+ return t.call(this, n, ke);
422
+ } : ke;
398
423
  return this._pairs.map(function(s) {
399
424
  return r(s[0]) + "=" + r(s[1]);
400
425
  }, "").join("&");
401
426
  };
402
- function gr(e) {
427
+ function wr(e) {
403
428
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
404
429
  }
405
430
  function ft(e, t, r) {
406
431
  if (!t)
407
432
  return e;
408
- const n = r && r.encode || gr;
433
+ const n = r && r.encode || wr;
409
434
  a.isFunction(r) && (r = {
410
435
  serialize: r
411
436
  });
@@ -417,7 +442,7 @@ function ft(e, t, r) {
417
442
  }
418
443
  return e;
419
444
  }
420
- class ke {
445
+ class Be {
421
446
  constructor() {
422
447
  this.handlers = [];
423
448
  }
@@ -475,27 +500,27 @@ const dt = {
475
500
  silentJSONParsing: !0,
476
501
  forcedJSONParsing: !0,
477
502
  clarifyTimeoutError: !1
478
- }, wr = typeof URLSearchParams < "u" ? URLSearchParams : Re, br = typeof FormData < "u" ? FormData : null, Er = typeof Blob < "u" ? Blob : null, Sr = {
503
+ }, br = typeof URLSearchParams < "u" ? URLSearchParams : Re, Er = typeof FormData < "u" ? FormData : null, Sr = typeof Blob < "u" ? Blob : null, _r = {
479
504
  isBrowser: !0,
480
505
  classes: {
481
- URLSearchParams: wr,
482
- FormData: br,
483
- Blob: Er
506
+ URLSearchParams: br,
507
+ FormData: Er,
508
+ Blob: Sr
484
509
  },
485
510
  protocols: ["http", "https", "file", "blob", "url", "data"]
486
- }, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Cr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), _r = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
487
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Rr = Ae && window.location.href || "http://localhost", Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
511
+ }, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Cr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Rr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
512
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ar = Ae && window.location.href || "http://localhost", Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
513
  __proto__: null,
489
514
  hasBrowserEnv: Ae,
490
515
  hasStandardBrowserEnv: Cr,
491
- hasStandardBrowserWebWorkerEnv: _r,
516
+ hasStandardBrowserWebWorkerEnv: Rr,
492
517
  navigator: we,
493
- origin: Rr
518
+ origin: Ar
494
519
  }, Symbol.toStringTag, { value: "Module" })), A = {
495
- ...Ar,
496
- ...Sr
520
+ ...Tr,
521
+ ..._r
497
522
  };
498
- function Tr(e, t) {
523
+ function Pr(e, t) {
499
524
  return ae(e, new A.classes.URLSearchParams(), {
500
525
  visitor: function(r, n, s, i) {
501
526
  return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
@@ -503,10 +528,10 @@ function Tr(e, t) {
503
528
  ...t
504
529
  });
505
530
  }
506
- function Pr(e) {
531
+ function Or(e) {
507
532
  return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
508
533
  }
509
- function Or(e) {
534
+ function xr(e) {
510
535
  const t = {}, r = Object.keys(e);
511
536
  let n;
512
537
  const s = r.length;
@@ -520,17 +545,17 @@ function ht(e) {
520
545
  let o = r[i++];
521
546
  if (o === "__proto__") return !0;
522
547
  const c = Number.isFinite(+o), f = i >= r.length;
523
- return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = Or(s[o])), !c);
548
+ return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = xr(s[o])), !c);
524
549
  }
525
550
  if (a.isFormData(e) && a.isFunction(e.entries)) {
526
551
  const r = {};
527
552
  return a.forEachEntry(e, (n, s) => {
528
- t(Pr(n), s, r, 0);
553
+ t(Or(n), s, r, 0);
529
554
  }), r;
530
555
  }
531
556
  return null;
532
557
  }
533
- function xr(e, t, r) {
558
+ function Nr(e, t, r) {
534
559
  if (a.isString(e))
535
560
  try {
536
561
  return (t || JSON.parse)(e), a.trim(e);
@@ -556,7 +581,7 @@ const Y = {
556
581
  let c;
557
582
  if (i) {
558
583
  if (n.indexOf("application/x-www-form-urlencoded") > -1)
559
- return Tr(t, this.formSerializer).toString();
584
+ return Pr(t, this.formSerializer).toString();
560
585
  if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
561
586
  const f = this.env && this.env.FormData;
562
587
  return ae(
@@ -566,7 +591,7 @@ const Y = {
566
591
  );
567
592
  }
568
593
  }
569
- return i || s ? (r.setContentType("application/json", !1), xr(t)) : t;
594
+ return i || s ? (r.setContentType("application/json", !1), Nr(t)) : t;
570
595
  }],
571
596
  transformResponse: [function(t) {
572
597
  const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
@@ -609,7 +634,7 @@ const Y = {
609
634
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
610
635
  Y.headers[e] = {};
611
636
  });
612
- const Nr = a.toObjectSet([
637
+ const Ur = a.toObjectSet([
613
638
  "age",
614
639
  "authorization",
615
640
  "content-length",
@@ -627,28 +652,28 @@ const Nr = a.toObjectSet([
627
652
  "referer",
628
653
  "retry-after",
629
654
  "user-agent"
630
- ]), Ur = (e) => {
655
+ ]), Lr = (e) => {
631
656
  const t = {};
632
657
  let r, n, s;
633
658
  return e && e.split(`
634
659
  `).forEach(function(o) {
635
- s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && Nr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
660
+ s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && Ur[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
636
661
  }), t;
637
- }, Be = Symbol("internals");
662
+ }, qe = Symbol("internals");
638
663
  function z(e) {
639
664
  return e && String(e).trim().toLowerCase();
640
665
  }
641
666
  function ee(e) {
642
667
  return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
643
668
  }
644
- function Lr(e) {
669
+ function Dr(e) {
645
670
  const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
646
671
  let n;
647
672
  for (; n = r.exec(e); )
648
673
  t[n[1]] = n[2];
649
674
  return t;
650
675
  }
651
- const Dr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
676
+ const Fr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
652
677
  function de(e, t, r, n, s) {
653
678
  if (a.isFunction(n))
654
679
  return n.call(this, t, r);
@@ -659,10 +684,10 @@ function de(e, t, r, n, s) {
659
684
  return n.test(t);
660
685
  }
661
686
  }
662
- function Fr(e) {
687
+ function kr(e) {
663
688
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
664
689
  }
665
- function kr(e, t) {
690
+ function Br(e, t) {
666
691
  const r = a.toCamelCase(" " + t);
667
692
  ["get", "set", "has"].forEach((n) => {
668
693
  Object.defineProperty(e, n + r, {
@@ -689,8 +714,8 @@ let O = class {
689
714
  const o = (c, f) => a.forEach(c, (u, l) => i(u, l, f));
690
715
  if (a.isPlainObject(t) || t instanceof this.constructor)
691
716
  o(t, r);
692
- else if (a.isString(t) && (t = t.trim()) && !Dr(t))
693
- o(Ur(t), r);
717
+ else if (a.isString(t) && (t = t.trim()) && !Fr(t))
718
+ o(Lr(t), r);
694
719
  else if (a.isObject(t) && a.isIterable(t)) {
695
720
  let c = {}, f, u;
696
721
  for (const l of t) {
@@ -711,7 +736,7 @@ let O = class {
711
736
  if (!r)
712
737
  return s;
713
738
  if (r === !0)
714
- return Lr(s);
739
+ return Dr(s);
715
740
  if (a.isFunction(r))
716
741
  return r.call(this, s, n);
717
742
  if (a.isRegExp(r))
@@ -755,7 +780,7 @@ let O = class {
755
780
  r[o] = ee(s), delete r[i];
756
781
  return;
757
782
  }
758
- const c = t ? Fr(i) : String(i).trim();
783
+ const c = t ? kr(i) : String(i).trim();
759
784
  c !== i && delete r[i], r[c] = ee(s), n[c] = !0;
760
785
  }), this;
761
786
  }
@@ -789,12 +814,12 @@ let O = class {
789
814
  return r.forEach((s) => n.set(s)), n;
790
815
  }
791
816
  static accessor(t) {
792
- const n = (this[Be] = this[Be] = {
817
+ const n = (this[qe] = this[qe] = {
793
818
  accessors: {}
794
819
  }).accessors, s = this.prototype;
795
820
  function i(o) {
796
821
  const c = z(o);
797
- n[c] || (kr(s, o), n[c] = !0);
822
+ n[c] || (Br(s, o), n[c] = !0);
798
823
  }
799
824
  return a.isArray(t) ? t.forEach(i) : i(t), this;
800
825
  }
@@ -836,11 +861,11 @@ function mt(e, t, r) {
836
861
  r
837
862
  ));
838
863
  }
839
- function Br(e) {
864
+ function qr(e) {
840
865
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
841
866
  return t && t[1] || "";
842
867
  }
843
- function qr(e, t) {
868
+ function vr(e, t) {
844
869
  e = e || 10;
845
870
  const r = new Array(e), n = new Array(e);
846
871
  let s = 0, i = 0, o;
@@ -856,7 +881,7 @@ function qr(e, t) {
856
881
  return w ? Math.round(g * 1e3 / w) : void 0;
857
882
  };
858
883
  }
859
- function vr(e, t) {
884
+ function Ir(e, t) {
860
885
  let r = 0, n = 1e3 / t, s, i;
861
886
  const o = (u, l = Date.now()) => {
862
887
  r = l, s = null, i && (clearTimeout(i), i = null), e(...u);
@@ -870,8 +895,8 @@ function vr(e, t) {
870
895
  }
871
896
  const re = (e, t, r = 3) => {
872
897
  let n = 0;
873
- const s = qr(50, 250);
874
- return vr((i) => {
898
+ const s = vr(50, 250);
899
+ return Ir((i) => {
875
900
  const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, u = s(f), l = o <= c;
876
901
  n = o;
877
902
  const d = {
@@ -887,17 +912,17 @@ const re = (e, t, r = 3) => {
887
912
  };
888
913
  e(d);
889
914
  }, r);
890
- }, qe = (e, t) => {
915
+ }, ve = (e, t) => {
891
916
  const r = e != null;
892
917
  return [(n) => t[0]({
893
918
  lengthComputable: r,
894
919
  total: e,
895
920
  loaded: n
896
921
  }), t[1]];
897
- }, ve = (e) => (...t) => a.asap(() => e(...t)), Ir = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, A.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
922
+ }, Ie = (e) => (...t) => a.asap(() => e(...t)), jr = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, A.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
898
923
  new URL(A.origin),
899
924
  A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
900
- ) : () => !0, jr = A.hasStandardBrowserEnv ? (
925
+ ) : () => !0, $r = A.hasStandardBrowserEnv ? (
901
926
  // Standard browser envs support document.cookie
902
927
  {
903
928
  write(e, t, r, n, s, i) {
@@ -924,17 +949,17 @@ const re = (e, t, r = 3) => {
924
949
  }
925
950
  }
926
951
  );
927
- function $r(e) {
952
+ function Mr(e) {
928
953
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
929
954
  }
930
- function Mr(e, t) {
955
+ function Hr(e, t) {
931
956
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
932
957
  }
933
958
  function yt(e, t, r) {
934
- let n = !$r(t);
935
- return e && (n || r == !1) ? Mr(e, t) : t;
959
+ let n = !Mr(t);
960
+ return e && (n || r == !1) ? Hr(e, t) : t;
936
961
  }
937
- const Ie = (e) => e instanceof O ? { ...e } : e;
962
+ const je = (e) => e instanceof O ? { ...e } : e;
938
963
  function v(e, t) {
939
964
  t = t || {};
940
965
  const r = {};
@@ -992,7 +1017,7 @@ function v(e, t) {
992
1017
  socketPath: o,
993
1018
  responseEncoding: o,
994
1019
  validateStatus: c,
995
- headers: (u, l, d) => s(Ie(u), Ie(l), d, !0)
1020
+ headers: (u, l, d) => s(je(u), je(l), d, !0)
996
1021
  };
997
1022
  return a.forEach(Object.keys({ ...e, ...t }), function(l) {
998
1023
  const d = f[l] || s, g = d(e[l], t[l], l);
@@ -1015,12 +1040,12 @@ const gt = (e) => {
1015
1040
  o.setContentType([u || "multipart/form-data", ...l].join("; "));
1016
1041
  }
1017
1042
  }
1018
- if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && Ir(t.url))) {
1019
- const u = s && i && jr.read(i);
1043
+ if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && jr(t.url))) {
1044
+ const u = s && i && $r.read(i);
1020
1045
  u && o.set(s, u);
1021
1046
  }
1022
1047
  return t;
1023
- }, Hr = typeof XMLHttpRequest < "u", Kr = Hr && function(e) {
1048
+ }, Kr = typeof XMLHttpRequest < "u", Vr = Kr && function(e) {
1024
1049
  return new Promise(function(r, n) {
1025
1050
  const s = gt(e);
1026
1051
  let i = s.data;
@@ -1070,14 +1095,14 @@ const gt = (e) => {
1070
1095
  }), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = re(u, !0), p.addEventListener("progress", g)), f && p.upload && ([d, w] = re(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (R) => {
1071
1096
  p && (n(!R || R.type ? new K(null, e, p) : R), p.abort(), p = null);
1072
1097
  }, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
1073
- const _ = Br(s.url);
1074
- if (_ && A.protocols.indexOf(_) === -1) {
1075
- n(new m("Unsupported protocol " + _ + ":", m.ERR_BAD_REQUEST, e));
1098
+ const C = qr(s.url);
1099
+ if (C && A.protocols.indexOf(C) === -1) {
1100
+ n(new m("Unsupported protocol " + C + ":", m.ERR_BAD_REQUEST, e));
1076
1101
  return;
1077
1102
  }
1078
1103
  p.send(i || null);
1079
1104
  });
1080
- }, Vr = (e, t) => {
1105
+ }, zr = (e, t) => {
1081
1106
  const { length: r } = e = e ? e.filter(Boolean) : [];
1082
1107
  if (t || r) {
1083
1108
  let n = new AbortController(), s;
@@ -1100,7 +1125,7 @@ const gt = (e) => {
1100
1125
  const { signal: f } = n;
1101
1126
  return f.unsubscribe = () => a.asap(c), f;
1102
1127
  }
1103
- }, zr = function* (e, t) {
1128
+ }, Jr = function* (e, t) {
1104
1129
  let r = e.byteLength;
1105
1130
  if (r < t) {
1106
1131
  yield e;
@@ -1109,10 +1134,10 @@ const gt = (e) => {
1109
1134
  let n = 0, s;
1110
1135
  for (; n < r; )
1111
1136
  s = n + t, yield e.slice(n, s), n = s;
1112
- }, Jr = async function* (e, t) {
1113
- for await (const r of Wr(e))
1114
- yield* zr(r, t);
1115
- }, Wr = async function* (e) {
1137
+ }, Wr = async function* (e, t) {
1138
+ for await (const r of Qr(e))
1139
+ yield* Jr(r, t);
1140
+ }, Qr = async function* (e) {
1116
1141
  if (e[Symbol.asyncIterator]) {
1117
1142
  yield* e;
1118
1143
  return;
@@ -1128,8 +1153,8 @@ const gt = (e) => {
1128
1153
  } finally {
1129
1154
  await t.cancel();
1130
1155
  }
1131
- }, je = (e, t, r, n) => {
1132
- const s = Jr(e, t);
1156
+ }, $e = (e, t, r, n) => {
1157
+ const s = Wr(e, t);
1133
1158
  let i = 0, o, c = (f) => {
1134
1159
  o || (o = !0, n && n(f));
1135
1160
  };
@@ -1157,13 +1182,13 @@ const gt = (e) => {
1157
1182
  }, {
1158
1183
  highWaterMark: 2
1159
1184
  });
1160
- }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = ce && typeof ReadableStream == "function", Qr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bt = (e, ...t) => {
1185
+ }, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = ce && typeof ReadableStream == "function", Xr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bt = (e, ...t) => {
1161
1186
  try {
1162
1187
  return !!e(...t);
1163
1188
  } catch {
1164
1189
  return !1;
1165
1190
  }
1166
- }, Xr = wt && bt(() => {
1191
+ }, Yr = wt && bt(() => {
1167
1192
  let e = !1;
1168
1193
  const t = new Request(A.origin, {
1169
1194
  body: new ReadableStream(),
@@ -1173,7 +1198,7 @@ const gt = (e) => {
1173
1198
  }
1174
1199
  }).headers.has("Content-Type");
1175
1200
  return e && !t;
1176
- }), $e = 64 * 1024, be = wt && bt(() => a.isReadableStream(new Response("").body)), ne = {
1201
+ }), Me = 64 * 1024, be = wt && bt(() => a.isReadableStream(new Response("").body)), ne = {
1177
1202
  stream: be && ((e) => e.body)
1178
1203
  };
1179
1204
  ce && ((e) => {
@@ -1183,7 +1208,7 @@ ce && ((e) => {
1183
1208
  });
1184
1209
  });
1185
1210
  })(new Response());
1186
- const Yr = async (e) => {
1211
+ const Gr = async (e) => {
1187
1212
  if (e == null)
1188
1213
  return 0;
1189
1214
  if (a.isBlob(e))
@@ -1196,11 +1221,11 @@ const Yr = async (e) => {
1196
1221
  if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
1197
1222
  return e.byteLength;
1198
1223
  if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1199
- return (await Qr(e)).byteLength;
1200
- }, Gr = async (e, t) => {
1224
+ return (await Xr(e)).byteLength;
1225
+ }, Zr = async (e, t) => {
1201
1226
  const r = a.toFiniteNumber(e.getContentLength());
1202
- return r ?? Yr(t);
1203
- }, Zr = ce && (async (e) => {
1227
+ return r ?? Gr(t);
1228
+ }, en = ce && (async (e) => {
1204
1229
  let {
1205
1230
  url: t,
1206
1231
  method: r,
@@ -1216,24 +1241,24 @@ const Yr = async (e) => {
1216
1241
  fetchOptions: g
1217
1242
  } = gt(e);
1218
1243
  u = u ? (u + "").toLowerCase() : "text";
1219
- let w = Vr([s, i && i.toAbortSignal()], o), h;
1244
+ let w = zr([s, i && i.toAbortSignal()], o), h;
1220
1245
  const y = w && w.unsubscribe && (() => {
1221
1246
  w.unsubscribe();
1222
1247
  });
1223
1248
  let p;
1224
1249
  try {
1225
- if (f && Xr && r !== "get" && r !== "head" && (p = await Gr(l, n)) !== 0) {
1250
+ if (f && Yr && r !== "get" && r !== "head" && (p = await Zr(l, n)) !== 0) {
1226
1251
  let T = new Request(t, {
1227
1252
  method: "POST",
1228
1253
  body: n,
1229
1254
  duplex: "half"
1230
1255
  }), D;
1231
1256
  if (a.isFormData(n) && (D = T.headers.get("content-type")) && l.setContentType(D), T.body) {
1232
- const [k, G] = qe(
1257
+ const [k, G] = ve(
1233
1258
  p,
1234
- re(ve(f))
1259
+ re(Ie(f))
1235
1260
  );
1236
- n = je(T.body, $e, k, G);
1261
+ n = $e(T.body, Me, k, G);
1237
1262
  }
1238
1263
  }
1239
1264
  a.isString(d) || (d = d ? "include" : "omit");
@@ -1247,32 +1272,32 @@ const Yr = async (e) => {
1247
1272
  duplex: "half",
1248
1273
  credentials: b ? d : void 0
1249
1274
  });
1250
- let _ = await fetch(h, g);
1275
+ let C = await fetch(h, g);
1251
1276
  const R = be && (u === "stream" || u === "response");
1252
1277
  if (be && (c || R && y)) {
1253
1278
  const T = {};
1254
1279
  ["status", "statusText", "headers"].forEach((Ue) => {
1255
- T[Ue] = _[Ue];
1280
+ T[Ue] = C[Ue];
1256
1281
  });
1257
- const D = a.toFiniteNumber(_.headers.get("content-length")), [k, G] = c && qe(
1282
+ const D = a.toFiniteNumber(C.headers.get("content-length")), [k, G] = c && ve(
1258
1283
  D,
1259
- re(ve(c), !0)
1284
+ re(Ie(c), !0)
1260
1285
  ) || [];
1261
- _ = new Response(
1262
- je(_.body, $e, k, () => {
1286
+ C = new Response(
1287
+ $e(C.body, Me, k, () => {
1263
1288
  G && G(), y && y();
1264
1289
  }),
1265
1290
  T
1266
1291
  );
1267
1292
  }
1268
1293
  u = u || "text";
1269
- let L = await ne[a.findKey(ne, u) || "text"](_, e);
1294
+ let L = await ne[a.findKey(ne, u) || "text"](C, e);
1270
1295
  return !R && y && y(), await new Promise((T, D) => {
1271
1296
  mt(T, D, {
1272
1297
  data: L,
1273
- headers: O.from(_.headers),
1274
- status: _.status,
1275
- statusText: _.statusText,
1298
+ headers: O.from(C.headers),
1299
+ status: C.status,
1300
+ statusText: C.statusText,
1276
1301
  config: e,
1277
1302
  request: h
1278
1303
  });
@@ -1286,9 +1311,9 @@ const Yr = async (e) => {
1286
1311
  ) : m.from(b, b && b.code, e, h);
1287
1312
  }
1288
1313
  }), Ee = {
1289
- http: pr,
1290
- xhr: Kr,
1291
- fetch: Zr
1314
+ http: mr,
1315
+ xhr: Vr,
1316
+ fetch: en
1292
1317
  };
1293
1318
  a.forEach(Ee, (e, t) => {
1294
1319
  if (e) {
@@ -1299,7 +1324,7 @@ a.forEach(Ee, (e, t) => {
1299
1324
  Object.defineProperty(e, "adapterName", { value: t });
1300
1325
  }
1301
1326
  });
1302
- const Me = (e) => `- ${e}`, en = (e) => a.isFunction(e) || e === null || e === !1, Et = {
1327
+ const He = (e) => `- ${e}`, tn = (e) => a.isFunction(e) || e === null || e === !1, Et = {
1303
1328
  getAdapter: (e) => {
1304
1329
  e = a.isArray(e) ? e : [e];
1305
1330
  const { length: t } = e;
@@ -1308,7 +1333,7 @@ const Me = (e) => `- ${e}`, en = (e) => a.isFunction(e) || e === null || e === !
1308
1333
  for (let i = 0; i < t; i++) {
1309
1334
  r = e[i];
1310
1335
  let o;
1311
- if (n = r, !en(r) && (n = Ee[(o = String(r)).toLowerCase()], n === void 0))
1336
+ if (n = r, !tn(r) && (n = Ee[(o = String(r)).toLowerCase()], n === void 0))
1312
1337
  throw new m(`Unknown adapter '${o}'`);
1313
1338
  if (n)
1314
1339
  break;
@@ -1319,8 +1344,8 @@ const Me = (e) => `- ${e}`, en = (e) => a.isFunction(e) || e === null || e === !
1319
1344
  ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1320
1345
  );
1321
1346
  let o = t ? i.length > 1 ? `since :
1322
- ` + i.map(Me).join(`
1323
- `) : " " + Me(i[0]) : "as no adapter specified";
1347
+ ` + i.map(He).join(`
1348
+ `) : " " + He(i[0]) : "as no adapter specified";
1324
1349
  throw new m(
1325
1350
  "There is no suitable adapter to dispatch the request " + o,
1326
1351
  "ERR_NOT_SUPPORT"
@@ -1334,7 +1359,7 @@ function pe(e) {
1334
1359
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1335
1360
  throw new K(null, e);
1336
1361
  }
1337
- function He(e) {
1362
+ function Ke(e) {
1338
1363
  return pe(e), e.headers = O.from(e.headers), e.data = he.call(
1339
1364
  e,
1340
1365
  e.transformRequest
@@ -1358,7 +1383,7 @@ const St = "1.11.0", ue = {};
1358
1383
  return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1359
1384
  };
1360
1385
  });
1361
- const Ke = {};
1386
+ const Ve = {};
1362
1387
  ue.transitional = function(t, r, n) {
1363
1388
  function s(i, o) {
1364
1389
  return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
@@ -1369,7 +1394,7 @@ ue.transitional = function(t, r, n) {
1369
1394
  s(o, " has been removed" + (r ? " in " + r : "")),
1370
1395
  m.ERR_DEPRECATED
1371
1396
  );
1372
- return r && !Ke[o] && (Ke[o] = !0, console.warn(
1397
+ return r && !Ve[o] && (Ve[o] = !0, console.warn(
1373
1398
  s(
1374
1399
  o,
1375
1400
  " has been deprecated since v" + r + " and will be removed in the near future"
@@ -1380,7 +1405,7 @@ ue.transitional = function(t, r, n) {
1380
1405
  ue.spelling = function(t) {
1381
1406
  return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
1382
1407
  };
1383
- function tn(e, t, r) {
1408
+ function rn(e, t, r) {
1384
1409
  if (typeof e != "object")
1385
1410
  throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1386
1411
  const n = Object.keys(e);
@@ -1398,14 +1423,14 @@ function tn(e, t, r) {
1398
1423
  }
1399
1424
  }
1400
1425
  const te = {
1401
- assertOptions: tn,
1426
+ assertOptions: rn,
1402
1427
  validators: ue
1403
1428
  }, N = te.validators;
1404
1429
  let q = class {
1405
1430
  constructor(t) {
1406
1431
  this.defaults = t || {}, this.interceptors = {
1407
- request: new ke(),
1408
- response: new ke()
1432
+ request: new Be(),
1433
+ response: new Be()
1409
1434
  };
1410
1435
  }
1411
1436
  /**
@@ -1470,7 +1495,7 @@ let q = class {
1470
1495
  });
1471
1496
  let l, d = 0, g;
1472
1497
  if (!f) {
1473
- const h = [He.bind(this), void 0];
1498
+ const h = [Ke.bind(this), void 0];
1474
1499
  for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); d < g; )
1475
1500
  l = l.then(h[d++], h[d++]);
1476
1501
  return l;
@@ -1487,7 +1512,7 @@ let q = class {
1487
1512
  }
1488
1513
  }
1489
1514
  try {
1490
- l = He.call(this, w);
1515
+ l = Ke.call(this, w);
1491
1516
  } catch (h) {
1492
1517
  return Promise.reject(h);
1493
1518
  }
@@ -1525,7 +1550,7 @@ a.forEach(["post", "put", "patch"], function(t) {
1525
1550
  }
1526
1551
  q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
1527
1552
  });
1528
- let rn = class Ct {
1553
+ let nn = class _t {
1529
1554
  constructor(t) {
1530
1555
  if (typeof t != "function")
1531
1556
  throw new TypeError("executor must be a function.");
@@ -1591,19 +1616,19 @@ let rn = class Ct {
1591
1616
  static source() {
1592
1617
  let t;
1593
1618
  return {
1594
- token: new Ct(function(s) {
1619
+ token: new _t(function(s) {
1595
1620
  t = s;
1596
1621
  }),
1597
1622
  cancel: t
1598
1623
  };
1599
1624
  }
1600
1625
  };
1601
- function nn(e) {
1626
+ function sn(e) {
1602
1627
  return function(r) {
1603
1628
  return e.apply(null, r);
1604
1629
  };
1605
1630
  }
1606
- function sn(e) {
1631
+ function on(e) {
1607
1632
  return a.isObject(e) && e.isAxiosError === !0;
1608
1633
  }
1609
1634
  const Se = {
@@ -1674,16 +1699,16 @@ const Se = {
1674
1699
  Object.entries(Se).forEach(([e, t]) => {
1675
1700
  Se[t] = e;
1676
1701
  });
1677
- function _t(e) {
1702
+ function Ct(e) {
1678
1703
  const t = new q(e), r = Ze(q.prototype.request, t);
1679
1704
  return a.extend(r, q.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
1680
- return _t(v(e, s));
1705
+ return Ct(v(e, s));
1681
1706
  }, r;
1682
1707
  }
1683
- const E = _t(Y);
1708
+ const E = Ct(Y);
1684
1709
  E.Axios = q;
1685
1710
  E.CanceledError = K;
1686
- E.CancelToken = rn;
1711
+ E.CancelToken = nn;
1687
1712
  E.isCancel = pt;
1688
1713
  E.VERSION = St;
1689
1714
  E.toFormData = ae;
@@ -1692,8 +1717,8 @@ E.Cancel = E.CanceledError;
1692
1717
  E.all = function(t) {
1693
1718
  return Promise.all(t);
1694
1719
  };
1695
- E.spread = nn;
1696
- E.isAxiosError = sn;
1720
+ E.spread = sn;
1721
+ E.isAxiosError = on;
1697
1722
  E.mergeConfig = v;
1698
1723
  E.AxiosHeaders = O;
1699
1724
  E.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
@@ -1710,41 +1735,41 @@ const {
1710
1735
  all: bs,
1711
1736
  Cancel: Es,
1712
1737
  isAxiosError: Ss,
1713
- spread: Cs,
1714
- toFormData: _s,
1738
+ spread: _s,
1739
+ toFormData: Cs,
1715
1740
  AxiosHeaders: Rs,
1716
1741
  HttpStatusCode: As,
1717
1742
  formToJSON: Ts,
1718
1743
  getAdapter: Ps,
1719
1744
  mergeConfig: Os
1720
1745
  } = E;
1721
- class Ve extends Error {
1746
+ class ze extends Error {
1722
1747
  constructor(r) {
1723
1748
  super(r.join(", "));
1724
1749
  S(this, "errors");
1725
1750
  this.name = "ValidationError", this.errors = r;
1726
1751
  }
1727
1752
  }
1728
- class ze extends Error {
1753
+ class Je extends Error {
1729
1754
  constructor(r) {
1730
1755
  super("Address already registered.");
1731
1756
  S(this, "address");
1732
1757
  this.name = "AddressInUseError", this.address = r;
1733
1758
  }
1734
1759
  }
1735
- class Je extends Error {
1760
+ class We extends Error {
1736
1761
  constructor(r) {
1737
1762
  super("Code already registered.");
1738
1763
  S(this, "code");
1739
1764
  this.name = "CodeInUseError", this.code = r;
1740
1765
  }
1741
1766
  }
1742
- class We extends Error {
1767
+ class Qe extends Error {
1743
1768
  constructor() {
1744
1769
  super("Invalid signature provided"), this.name = "InvalidSignatureError";
1745
1770
  }
1746
1771
  }
1747
- class on {
1772
+ class an {
1748
1773
  constructor(t) {
1749
1774
  S(this, "httpClient");
1750
1775
  S(this, "_debug");
@@ -1771,9 +1796,9 @@ class on {
1771
1796
  const l = (f = u.response) == null ? void 0 : f.data;
1772
1797
  if (typeof (l == null ? void 0 : l.message) == "string") {
1773
1798
  const d = l.message.toLowerCase();
1774
- throw d == "invalid signature" ? new We() : d == "address in use" ? new ze(t) : d == "code in use" ? new Je(n) : new Error(d);
1799
+ throw d == "invalid signature" ? new Qe() : d == "address in use" ? new Je(t) : d == "code in use" ? new We(n) : new Error(d);
1775
1800
  } else if ((l == null ? void 0 : l.message) instanceof Array)
1776
- throw new Ve(l.message);
1801
+ throw new ze(l.message);
1777
1802
  }
1778
1803
  throw u;
1779
1804
  }
@@ -1797,9 +1822,9 @@ class on {
1797
1822
  const u = (c = f.response) == null ? void 0 : c.data;
1798
1823
  if (typeof (u == null ? void 0 : u.message) == "string") {
1799
1824
  const l = u.message.toLowerCase();
1800
- throw l == "invalid signature" ? new We() : l == "address in use" ? new ze(t) : l == "code in use" ? new Je(n) : new Error(l);
1825
+ throw l == "invalid signature" ? new Qe() : l == "address in use" ? new Je(t) : l == "code in use" ? new We(n) : new Error(l);
1801
1826
  } else if ((u == null ? void 0 : u.message) instanceof Array)
1802
- throw new Ve(u.message);
1827
+ throw new ze(u.message);
1803
1828
  }
1804
1829
  throw f;
1805
1830
  }
@@ -1814,7 +1839,7 @@ class on {
1814
1839
  async getCode(t, r) {
1815
1840
  var n;
1816
1841
  try {
1817
- return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data.code;
1842
+ return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data;
1818
1843
  } catch (s) {
1819
1844
  if (s instanceof me && ((n = s.response) == null ? void 0 : n.status) === 404)
1820
1845
  return null;
@@ -1822,31 +1847,6 @@ class on {
1822
1847
  }
1823
1848
  }
1824
1849
  }
1825
- const Qe = "/affiliate-portal";
1826
- class an {
1827
- constructor(t) {
1828
- S(this, "httpClient");
1829
- this.httpClient = t.httpClient;
1830
- }
1831
- async getAffiliateStats(t) {
1832
- return (await this.httpClient.get({
1833
- path: `${Qe}/stats`,
1834
- queryParams: {
1835
- user_identifier: t.user_identifier
1836
- }
1837
- })).data;
1838
- }
1839
- async getAffiliateNewTraders(t) {
1840
- return (await this.httpClient.get({
1841
- path: `${Qe}/new-traders`,
1842
- queryParams: {
1843
- user_identifier: t.user_identifier,
1844
- from: t.from,
1845
- to: t.to
1846
- }
1847
- })).data;
1848
- }
1849
- }
1850
1850
  const cn = "/audiences";
1851
1851
  class un {
1852
1852
  constructor(t) {
@@ -1927,7 +1927,7 @@ class hn {
1927
1927
  }
1928
1928
  }
1929
1929
  }
1930
- const pn = "7.6.0", mn = {
1930
+ const pn = "7.7.0", mn = {
1931
1931
  version: pn
1932
1932
  };
1933
1933
  class yn {
@@ -2128,7 +2128,7 @@ let Sn = (e = 21) => {
2128
2128
  t += En[r[e] & 63];
2129
2129
  return t;
2130
2130
  };
2131
- const Cn = "fuul.tracking_id", Te = () => On(Cn, () => Sn()), Ge = () => M("af") || M("referrer"), _n = () => document.referrer, Rn = () => xn(), An = () => M("category"), Tn = () => M("title"), Pn = () => M("tag"), On = (e, t) => {
2131
+ const _n = "fuul.tracking_id", Te = () => On(_n, () => Sn()), Ge = () => M("af") || M("referrer"), Cn = () => document.referrer, Rn = () => xn(), An = () => M("category"), Tn = () => M("title"), Pn = () => M("tag"), On = (e, t) => {
2132
2132
  const r = localStorage.getItem(e);
2133
2133
  if (r)
2134
2134
  return r;
@@ -2151,16 +2151,16 @@ class Un {
2151
2151
  }
2152
2152
  }
2153
2153
  const Ln = "https://api.fuul.xyz/api/v1/";
2154
- let F = !1, Ce = !1, Pe, U, Rt, At, V, Oe, le, I, Tt, fe, j;
2154
+ let F = !1, _e = !1, Pe, U, Rt, At, V, Oe, le, I, Tt, fe, j;
2155
2155
  function Dn(e) {
2156
- F = !!e.debug, !Ce && (Pe = e.apiKey, cs(), U = us(e.baseApiUrl ?? Ln, e.defaultQueryParams ?? {}), Rt = new ln({ httpClient: U, debug: F }), le = new hn({ httpClient: U, debug: F }), V = new on({ httpClient: U, debug: F }), Oe = new an({ httpClient: U }), I = new wn({ httpClient: U, debug: F }), At = new Un({ httpClient: U }), Tt = new un({ httpClient: U, debug: F }), fe = new gn({ httpClient: U }), j = new bn({ httpClient: U, debug: F }), Ce = !0, F && console.debug("Fuul SDK: init() complete"));
2156
+ F = !!e.debug, !_e && (Pe = e.apiKey, cs(), U = us(e.baseApiUrl ?? Ln, e.defaultQueryParams ?? {}), Rt = new ln({ httpClient: U, debug: F }), le = new hn({ httpClient: U, debug: F }), V = new an({ httpClient: U, debug: F }), Oe = new xt({ httpClient: U }), I = new wn({ httpClient: U, debug: F }), At = new Un({ httpClient: U }), Tt = new un({ httpClient: U, debug: F }), fe = new gn({ httpClient: U }), j = new bn({ httpClient: U, debug: F }), _e = !0, F && console.debug("Fuul SDK: init() complete"));
2157
2157
  }
2158
- function C() {
2159
- if (!Ce)
2158
+ function _() {
2159
+ if (!_e)
2160
2160
  throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
2161
2161
  }
2162
2162
  async function Fn(e, t) {
2163
- C(), xe(), Ne();
2163
+ _(), xe(), Ne();
2164
2164
  const r = {
2165
2165
  name: e,
2166
2166
  args: t ?? {},
@@ -2171,7 +2171,7 @@ async function Fn(e, t) {
2171
2171
  await le.sendEvent(r);
2172
2172
  }
2173
2173
  async function kn(e, t) {
2174
- C(), xe(), Ne();
2174
+ _(), xe(), Ne();
2175
2175
  const r = {
2176
2176
  name: "pageview",
2177
2177
  args: {
@@ -2180,7 +2180,7 @@ async function kn(e, t) {
2180
2180
  },
2181
2181
  metadata: {
2182
2182
  tracking_id: Te(),
2183
- referrer_url: _n(),
2183
+ referrer_url: Cn(),
2184
2184
  source: Rn(),
2185
2185
  affiliate_id: Ge() ?? void 0,
2186
2186
  referrer: Ge() ?? void 0,
@@ -2192,7 +2192,7 @@ async function kn(e, t) {
2192
2192
  await le.sendEvent(r, t);
2193
2193
  }
2194
2194
  async function Bn(e, t) {
2195
- C(), xe(), Ne();
2195
+ _(), xe(), Ne();
2196
2196
  const r = {
2197
2197
  name: "connect_wallet",
2198
2198
  user: {
@@ -2210,7 +2210,7 @@ async function Bn(e, t) {
2210
2210
  e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await le.sendEvent(r, t);
2211
2211
  }
2212
2212
  async function qn(e) {
2213
- C(), await V.create(
2213
+ _(), await V.create(
2214
2214
  e.userIdentifier,
2215
2215
  e.identifierType,
2216
2216
  e.code,
@@ -2221,7 +2221,7 @@ async function qn(e) {
2221
2221
  );
2222
2222
  }
2223
2223
  async function vn(e) {
2224
- C(), await V.update(
2224
+ _(), await V.update(
2225
2225
  e.userIdentifier,
2226
2226
  e.identifierType,
2227
2227
  e.code,
@@ -2231,15 +2231,15 @@ async function vn(e) {
2231
2231
  );
2232
2232
  }
2233
2233
  async function In(e, t) {
2234
- return C(), await V.getCode(e, t);
2234
+ return _(), await V.getCode(e, t);
2235
2235
  }
2236
2236
  async function jn(e) {
2237
- return C(), await V.isCodeFree(e);
2237
+ return _(), await V.isCodeFree(e);
2238
2238
  }
2239
2239
  async function $n(e, t, r, n) {
2240
- C();
2240
+ _();
2241
2241
  const s = await V.getCode(t, r), i = new URLSearchParams({
2242
- af: s ?? t
2242
+ af: (s == null ? void 0 : s.code) ?? t
2243
2243
  });
2244
2244
  return n != null && n.title && i.append("af_title", n.title), n != null && n.format && i.append("af_format", n.format), n != null && n.place && i.append("af_place", n.place), `${e}?${i.toString()}`;
2245
2245
  }
@@ -2268,40 +2268,40 @@ function Qn(e) {
2268
2268
  return I.getUserPointsMovements(e);
2269
2269
  }
2270
2270
  function Xn(e) {
2271
- return C(), I.getPayoutsByReferrer(e);
2271
+ return _(), I.getPayoutsByReferrer(e);
2272
2272
  }
2273
2273
  async function Yn(e) {
2274
- return C(), Rt.getAll(e);
2274
+ return _(), Rt.getAll(e);
2275
2275
  }
2276
2276
  async function Gn(e) {
2277
- return C(), At.getUserReferrer(e);
2277
+ return _(), At.getUserReferrer(e);
2278
2278
  }
2279
2279
  async function Zn(e) {
2280
- return C(), Tt.getUserAudiences(e);
2280
+ return _(), Tt.getUserAudiences(e);
2281
2281
  }
2282
2282
  async function es(e) {
2283
- return C(), j.listUserReferralCodes(e);
2283
+ return _(), j.listUserReferralCodes(e);
2284
2284
  }
2285
2285
  async function ts(e) {
2286
- return C(), j.generateReferralCodes(e);
2286
+ return _(), j.generateReferralCodes(e);
2287
2287
  }
2288
2288
  async function rs(e) {
2289
- return C(), j.getReferralStatus(e);
2289
+ return _(), j.getReferralStatus(e);
2290
2290
  }
2291
2291
  async function ns(e) {
2292
- return C(), j.getReferralCode(e);
2292
+ return _(), j.getReferralCode(e);
2293
2293
  }
2294
2294
  async function ss(e) {
2295
- return C(), j.useReferralCode(e);
2295
+ return _(), j.useReferralCode(e);
2296
2296
  }
2297
2297
  async function is(e) {
2298
- return C(), j.updateReferralCode(e);
2298
+ return _(), j.updateReferralCode(e);
2299
2299
  }
2300
2300
  async function os(e) {
2301
- return C(), Oe.getAffiliateStats(e);
2301
+ return _(), Oe.getAffiliateStats(e);
2302
2302
  }
2303
2303
  async function as(e) {
2304
- return C(), Oe.getAffiliateNewTraders(e);
2304
+ return _(), Oe.getAffiliateNewTraders(e);
2305
2305
  }
2306
2306
  function xe() {
2307
2307
  if (typeof window > "u" || typeof document > "u")
@@ -2356,10 +2356,10 @@ const xs = {
2356
2356
  };
2357
2357
  var ls = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.XRPLAddress = "xrpl_address", e.SuiAddress = "sui_address", e.Email = "email", e))(ls || {});
2358
2358
  export {
2359
- ze as AddressInUseError,
2360
- Je as CodeInUseError,
2359
+ Je as AddressInUseError,
2360
+ We as CodeInUseError,
2361
2361
  xs as Fuul,
2362
- We as InvalidSignatureError,
2362
+ Qe as InvalidSignatureError,
2363
2363
  ls as UserIdentifierType,
2364
- Ve as ValidationError
2364
+ ze as ValidationError
2365
2365
  };