@fuul/sdk 7.19.0 → 7.21.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/affiliate-portal/AffiliatePortalService.d.ts +2 -1
- package/dist/affiliate-portal/AffiliatePortalService.d.ts.map +1 -1
- package/dist/affiliate-portal/types/index.d.ts +16 -0
- package/dist/affiliate-portal/types/index.d.ts.map +1 -1
- package/dist/claim-checks/ClaimCheckService.d.ts +15 -1
- package/dist/claim-checks/ClaimCheckService.d.ts.map +1 -1
- package/dist/claim-checks/types/index.d.ts +31 -0
- package/dist/claim-checks/types/index.d.ts.map +1 -1
- package/dist/core.d.ts +49 -2
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +312 -257
- package/dist/index.umd.js +6 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var zt = Object.defineProperty;
|
|
2
2
|
var Jt = (t, e, r) => e in t ? zt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var b = (t, e, r) => Jt(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
const
|
|
4
|
+
const Ae = "/affiliate-portal";
|
|
5
5
|
class Wt {
|
|
6
6
|
constructor(e) {
|
|
7
7
|
b(this, "httpClient");
|
|
@@ -9,7 +9,7 @@ class Wt {
|
|
|
9
9
|
}
|
|
10
10
|
async getAffiliateStats(e) {
|
|
11
11
|
return (await this.httpClient.get({
|
|
12
|
-
path: `${
|
|
12
|
+
path: `${Ae}/stats`,
|
|
13
13
|
queryParams: {
|
|
14
14
|
user_identifier: e.user_identifier,
|
|
15
15
|
from: e.from,
|
|
@@ -20,9 +20,19 @@ class Wt {
|
|
|
20
20
|
}
|
|
21
21
|
})).data;
|
|
22
22
|
}
|
|
23
|
+
async getAffiliateTotalStats(e) {
|
|
24
|
+
return (await this.httpClient.get({
|
|
25
|
+
path: `${Ae}/total-stats`,
|
|
26
|
+
queryParams: {
|
|
27
|
+
statuses: e.statuses,
|
|
28
|
+
regions: e.regions,
|
|
29
|
+
audiences: e.audiences
|
|
30
|
+
}
|
|
31
|
+
})).data;
|
|
32
|
+
}
|
|
23
33
|
async getAffiliateNewTraders(e) {
|
|
24
34
|
return (await this.httpClient.get({
|
|
25
|
-
path: `${
|
|
35
|
+
path: `${Ae}/new-traders`,
|
|
26
36
|
queryParams: {
|
|
27
37
|
user_identifier: e.user_identifier,
|
|
28
38
|
from: e.from,
|
|
@@ -37,23 +47,23 @@ function _t(t, e) {
|
|
|
37
47
|
return t.apply(e, arguments);
|
|
38
48
|
};
|
|
39
49
|
}
|
|
40
|
-
const { toString: Qt } = Object.prototype, { getPrototypeOf:
|
|
50
|
+
const { toString: Qt } = Object.prototype, { getPrototypeOf: Be } = Object, { iterator: me, toStringTag: Ct } = Symbol, ge = /* @__PURE__ */ ((t) => (e) => {
|
|
41
51
|
const r = Qt.call(e);
|
|
42
52
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
43
|
-
})(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) =>
|
|
53
|
+
})(/* @__PURE__ */ Object.create(null)), F = (t) => (t = t.toLowerCase(), (e) => ge(e) === t), we = (t) => (e) => typeof e === t, { isArray: Q } = Array, J = we("undefined");
|
|
44
54
|
function ee(t) {
|
|
45
55
|
return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && P(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
46
56
|
}
|
|
47
|
-
const
|
|
57
|
+
const Et = F("ArrayBuffer");
|
|
48
58
|
function Xt(t) {
|
|
49
59
|
let e;
|
|
50
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
60
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Et(t.buffer), e;
|
|
51
61
|
}
|
|
52
|
-
const Yt =
|
|
53
|
-
if (
|
|
62
|
+
const Yt = we("string"), P = we("function"), Rt = we("number"), te = (t) => t !== null && typeof t == "object", Gt = (t) => t === !0 || t === !1, fe = (t) => {
|
|
63
|
+
if (ge(t) !== "object")
|
|
54
64
|
return !1;
|
|
55
|
-
const e =
|
|
56
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
65
|
+
const e = Be(t);
|
|
66
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ct in t) && !(me in t);
|
|
57
67
|
}, Zt = (t) => {
|
|
58
68
|
if (!te(t) || ee(t))
|
|
59
69
|
return !1;
|
|
@@ -66,9 +76,9 @@ const Yt = me("string"), P = me("function"), Ct = me("number"), te = (t) => t !=
|
|
|
66
76
|
function ar() {
|
|
67
77
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
68
78
|
}
|
|
69
|
-
const
|
|
79
|
+
const Ge = ar(), Ze = typeof Ge.FormData < "u" ? Ge.FormData : void 0, cr = (t) => {
|
|
70
80
|
let e;
|
|
71
|
-
return t && (
|
|
81
|
+
return t && (Ze && t instanceof Ze || P(t.append) && ((e = ge(t)) === "formdata" || // detect form-data instance
|
|
72
82
|
e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
|
|
73
83
|
}, ur = F("URLSearchParams"), [lr, dr, fr, hr] = [
|
|
74
84
|
"ReadableStream",
|
|
@@ -104,12 +114,12 @@ function St(t, e) {
|
|
|
104
114
|
return null;
|
|
105
115
|
}
|
|
106
116
|
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, At = (t) => !J(t) && t !== M;
|
|
107
|
-
function
|
|
117
|
+
function De() {
|
|
108
118
|
const { caseless: t, skipUndefined: e } = At(this) && this || {}, r = {}, n = (s, i) => {
|
|
109
119
|
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
110
120
|
return;
|
|
111
121
|
const o = t && St(r, i) || i;
|
|
112
|
-
|
|
122
|
+
fe(r[o]) && fe(s) ? r[o] = De(r[o], s) : fe(s) ? r[o] = De({}, s) : Q(s) ? r[o] = s.slice() : (!e || !J(s)) && (r[o] = s);
|
|
113
123
|
};
|
|
114
124
|
for (let s = 0, i = arguments.length; s < i; s++)
|
|
115
125
|
arguments[s] && re(arguments[s], n);
|
|
@@ -147,7 +157,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
|
|
|
147
157
|
do {
|
|
148
158
|
for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; )
|
|
149
159
|
o = s[i], (!n || n(o, t, e)) && !c[o] && (e[o] = t[o], c[o] = !0);
|
|
150
|
-
t = r !== !1 &&
|
|
160
|
+
t = r !== !1 && Be(t);
|
|
151
161
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
152
162
|
return e;
|
|
153
163
|
}, br = (t, e, r) => {
|
|
@@ -158,19 +168,19 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
|
|
|
158
168
|
if (!t) return null;
|
|
159
169
|
if (Q(t)) return t;
|
|
160
170
|
let e = t.length;
|
|
161
|
-
if (!
|
|
171
|
+
if (!Rt(e)) return null;
|
|
162
172
|
const r = new Array(e);
|
|
163
173
|
for (; e-- > 0; )
|
|
164
174
|
r[e] = t[e];
|
|
165
175
|
return r;
|
|
166
|
-
},
|
|
167
|
-
const n = (t && t[
|
|
176
|
+
}, Cr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Be(Uint8Array)), Er = (t, e) => {
|
|
177
|
+
const n = (t && t[me]).call(t);
|
|
168
178
|
let s;
|
|
169
179
|
for (; (s = n.next()) && !s.done; ) {
|
|
170
180
|
const i = s.value;
|
|
171
181
|
e.call(t, i[0], i[1]);
|
|
172
182
|
}
|
|
173
|
-
},
|
|
183
|
+
}, Rr = (t, e) => {
|
|
174
184
|
let r;
|
|
175
185
|
const n = [];
|
|
176
186
|
for (; (r = t.exec(e)) !== null; )
|
|
@@ -178,7 +188,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
|
|
|
178
188
|
return n;
|
|
179
189
|
}, Sr = F("HTMLFormElement"), Ar = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
|
|
180
190
|
return n.toUpperCase() + s;
|
|
181
|
-
}),
|
|
191
|
+
}), et = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Tr = F("RegExp"), Tt = (t, e) => {
|
|
182
192
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
183
193
|
re(r, (s, i) => {
|
|
184
194
|
let o;
|
|
@@ -209,7 +219,7 @@ const yr = (t, e, r, { allOwnKeys: n } = {}) => (re(
|
|
|
209
219
|
}, Nr = () => {
|
|
210
220
|
}, xr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
211
221
|
function Ur(t) {
|
|
212
|
-
return !!(t && P(t.append) && t[
|
|
222
|
+
return !!(t && P(t.append) && t[Ct] === "FormData" && t[me]);
|
|
213
223
|
}
|
|
214
224
|
const Dr = (t) => {
|
|
215
225
|
const e = new Array(10), r = (n, s) => {
|
|
@@ -238,17 +248,17 @@ const Dr = (t) => {
|
|
|
238
248
|
!1
|
|
239
249
|
), (s) => {
|
|
240
250
|
n.push(s), M.postMessage(r, "*");
|
|
241
|
-
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(M.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || Pt, vr = (t) => t != null && P(t[
|
|
251
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", P(M.postMessage)), kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || Pt, vr = (t) => t != null && P(t[me]), a = {
|
|
242
252
|
isArray: Q,
|
|
243
|
-
isArrayBuffer:
|
|
253
|
+
isArrayBuffer: Et,
|
|
244
254
|
isBuffer: ee,
|
|
245
255
|
isFormData: cr,
|
|
246
256
|
isArrayBufferView: Xt,
|
|
247
257
|
isString: Yt,
|
|
248
|
-
isNumber:
|
|
258
|
+
isNumber: Rt,
|
|
249
259
|
isBoolean: Gt,
|
|
250
260
|
isObject: te,
|
|
251
|
-
isPlainObject:
|
|
261
|
+
isPlainObject: fe,
|
|
252
262
|
isEmptyObject: Zt,
|
|
253
263
|
isReadableStream: lr,
|
|
254
264
|
isRequest: dr,
|
|
@@ -264,24 +274,24 @@ const Dr = (t) => {
|
|
|
264
274
|
isFunction: P,
|
|
265
275
|
isStream: or,
|
|
266
276
|
isURLSearchParams: ur,
|
|
267
|
-
isTypedArray:
|
|
277
|
+
isTypedArray: Cr,
|
|
268
278
|
isFileList: ir,
|
|
269
279
|
forEach: re,
|
|
270
|
-
merge:
|
|
280
|
+
merge: De,
|
|
271
281
|
extend: yr,
|
|
272
282
|
trim: pr,
|
|
273
283
|
stripBOM: mr,
|
|
274
284
|
inherits: gr,
|
|
275
285
|
toFlatObject: wr,
|
|
276
|
-
kindOf:
|
|
286
|
+
kindOf: ge,
|
|
277
287
|
kindOfTest: F,
|
|
278
288
|
endsWith: br,
|
|
279
289
|
toArray: _r,
|
|
280
|
-
forEachEntry:
|
|
281
|
-
matchAll:
|
|
290
|
+
forEachEntry: Er,
|
|
291
|
+
matchAll: Rr,
|
|
282
292
|
isHTMLForm: Sr,
|
|
283
|
-
hasOwnProperty:
|
|
284
|
-
hasOwnProp:
|
|
293
|
+
hasOwnProperty: et,
|
|
294
|
+
hasOwnProp: et,
|
|
285
295
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
286
296
|
reduceDescriptors: Tt,
|
|
287
297
|
freezeMethods: Pr,
|
|
@@ -357,24 +367,24 @@ m.ERR_CANCELED = "ERR_CANCELED";
|
|
|
357
367
|
m.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
358
368
|
m.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
359
369
|
const Br = null;
|
|
360
|
-
function
|
|
370
|
+
function Le(t) {
|
|
361
371
|
return a.isPlainObject(t) || a.isArray(t);
|
|
362
372
|
}
|
|
363
373
|
function Nt(t) {
|
|
364
374
|
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
365
375
|
}
|
|
366
|
-
function
|
|
376
|
+
function Te(t, e, r) {
|
|
367
377
|
return t ? t.concat(e).map(function(s, i) {
|
|
368
378
|
return s = Nt(s), !r && i ? "[" + s + "]" : s;
|
|
369
379
|
}).join(r ? "." : "") : e;
|
|
370
380
|
}
|
|
371
381
|
function Ir(t) {
|
|
372
|
-
return a.isArray(t) && !t.some(
|
|
382
|
+
return a.isArray(t) && !t.some(Le);
|
|
373
383
|
}
|
|
374
384
|
const qr = a.toFlatObject(a, {}, null, function(e) {
|
|
375
385
|
return /^is[A-Z]/.test(e);
|
|
376
386
|
});
|
|
377
|
-
function
|
|
387
|
+
function be(t, e, r) {
|
|
378
388
|
if (!a.isObject(t))
|
|
379
389
|
throw new TypeError("target must be an object");
|
|
380
390
|
e = e || new FormData(), r = a.toFlatObject(
|
|
@@ -403,42 +413,42 @@ function ge(t, e, r) {
|
|
|
403
413
|
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
404
414
|
}
|
|
405
415
|
function u(d, y, p) {
|
|
406
|
-
let
|
|
416
|
+
let C = d;
|
|
407
417
|
if (a.isReactNative(e) && a.isReactNativeBlob(d))
|
|
408
|
-
return e.append(
|
|
418
|
+
return e.append(Te(p, y, i), l(d)), !1;
|
|
409
419
|
if (d && !p && typeof d == "object") {
|
|
410
420
|
if (a.endsWith(y, "{}"))
|
|
411
421
|
y = n ? y : y.slice(0, -2), d = JSON.stringify(d);
|
|
412
|
-
else if (a.isArray(d) && Ir(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (
|
|
413
|
-
return y = Nt(y),
|
|
414
|
-
!(a.isUndefined(
|
|
422
|
+
else if (a.isArray(d) && Ir(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (C = a.toArray(d)))
|
|
423
|
+
return y = Nt(y), C.forEach(function(R, A) {
|
|
424
|
+
!(a.isUndefined(R) || R === null) && e.append(
|
|
415
425
|
// eslint-disable-next-line no-nested-ternary
|
|
416
|
-
o === !0 ?
|
|
417
|
-
l(
|
|
426
|
+
o === !0 ? Te([y], A, i) : o === null ? y : y + "[]",
|
|
427
|
+
l(R)
|
|
418
428
|
);
|
|
419
429
|
}), !1;
|
|
420
430
|
}
|
|
421
|
-
return
|
|
431
|
+
return Le(d) ? !0 : (e.append(Te(p, y, i), l(d)), !1);
|
|
422
432
|
}
|
|
423
433
|
const h = [], g = Object.assign(qr, {
|
|
424
434
|
defaultVisitor: u,
|
|
425
435
|
convertValue: l,
|
|
426
|
-
isVisitable:
|
|
436
|
+
isVisitable: Le
|
|
427
437
|
});
|
|
428
|
-
function
|
|
438
|
+
function E(d, y) {
|
|
429
439
|
if (!a.isUndefined(d)) {
|
|
430
440
|
if (h.indexOf(d) !== -1)
|
|
431
441
|
throw Error("Circular reference detected in " + y.join("."));
|
|
432
|
-
h.push(d), a.forEach(d, function(
|
|
433
|
-
(!(a.isUndefined(
|
|
442
|
+
h.push(d), a.forEach(d, function(C, N) {
|
|
443
|
+
(!(a.isUndefined(C) || C === null) && s.call(e, C, a.isString(N) ? N.trim() : N, y, g)) === !0 && E(C, y ? y.concat(N) : [N]);
|
|
434
444
|
}), h.pop();
|
|
435
445
|
}
|
|
436
446
|
}
|
|
437
447
|
if (!a.isObject(t))
|
|
438
448
|
throw new TypeError("data must be an object");
|
|
439
|
-
return
|
|
449
|
+
return E(t), e;
|
|
440
450
|
}
|
|
441
|
-
function
|
|
451
|
+
function tt(t) {
|
|
442
452
|
const e = {
|
|
443
453
|
"!": "%21",
|
|
444
454
|
"'": "%27",
|
|
@@ -452,17 +462,17 @@ function et(t) {
|
|
|
452
462
|
return e[n];
|
|
453
463
|
});
|
|
454
464
|
}
|
|
455
|
-
function
|
|
456
|
-
this._pairs = [], t &&
|
|
465
|
+
function Ie(t, e) {
|
|
466
|
+
this._pairs = [], t && be(t, this, e);
|
|
457
467
|
}
|
|
458
|
-
const xt =
|
|
468
|
+
const xt = Ie.prototype;
|
|
459
469
|
xt.append = function(e, r) {
|
|
460
470
|
this._pairs.push([e, r]);
|
|
461
471
|
};
|
|
462
472
|
xt.toString = function(e) {
|
|
463
473
|
const r = e ? function(n) {
|
|
464
|
-
return e.call(this, n,
|
|
465
|
-
} :
|
|
474
|
+
return e.call(this, n, tt);
|
|
475
|
+
} : tt;
|
|
466
476
|
return this._pairs.map(function(s) {
|
|
467
477
|
return r(s[0]) + "=" + r(s[1]);
|
|
468
478
|
}, "").join("&");
|
|
@@ -477,13 +487,13 @@ function Ut(t, e, r) {
|
|
|
477
487
|
serialize: r
|
|
478
488
|
} : r, i = s && s.serialize;
|
|
479
489
|
let o;
|
|
480
|
-
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new
|
|
490
|
+
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new Ie(e, s).toString(n), o) {
|
|
481
491
|
const c = t.indexOf("#");
|
|
482
492
|
c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
483
493
|
}
|
|
484
494
|
return t;
|
|
485
495
|
}
|
|
486
|
-
class
|
|
496
|
+
class rt {
|
|
487
497
|
constructor() {
|
|
488
498
|
this.handlers = [];
|
|
489
499
|
}
|
|
@@ -538,12 +548,12 @@ class tt {
|
|
|
538
548
|
});
|
|
539
549
|
}
|
|
540
550
|
}
|
|
541
|
-
const
|
|
551
|
+
const qe = {
|
|
542
552
|
silentJSONParsing: !0,
|
|
543
553
|
forcedJSONParsing: !0,
|
|
544
554
|
clarifyTimeoutError: !1,
|
|
545
555
|
legacyInterceptorReqResOrdering: !0
|
|
546
|
-
}, $r = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
556
|
+
}, $r = typeof URLSearchParams < "u" ? URLSearchParams : Ie, Mr = typeof FormData < "u" ? FormData : null, Hr = typeof Blob < "u" ? Blob : null, Vr = {
|
|
547
557
|
isBrowser: !0,
|
|
548
558
|
classes: {
|
|
549
559
|
URLSearchParams: $r,
|
|
@@ -551,20 +561,20 @@ const ke = {
|
|
|
551
561
|
Blob: Hr
|
|
552
562
|
},
|
|
553
563
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
554
|
-
},
|
|
555
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jr =
|
|
564
|
+
}, je = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Kr = je && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
565
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Jr = je && window.location.href || "http://localhost", Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
556
566
|
__proto__: null,
|
|
557
|
-
hasBrowserEnv:
|
|
567
|
+
hasBrowserEnv: je,
|
|
558
568
|
hasStandardBrowserEnv: Kr,
|
|
559
569
|
hasStandardBrowserWebWorkerEnv: zr,
|
|
560
|
-
navigator:
|
|
570
|
+
navigator: Fe,
|
|
561
571
|
origin: Jr
|
|
562
572
|
}, Symbol.toStringTag, { value: "Module" })), S = {
|
|
563
573
|
...Wr,
|
|
564
574
|
...Vr
|
|
565
575
|
};
|
|
566
576
|
function Qr(t, e) {
|
|
567
|
-
return
|
|
577
|
+
return be(t, new S.classes.URLSearchParams(), {
|
|
568
578
|
visitor: function(r, n, s, i) {
|
|
569
579
|
return S.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
570
580
|
},
|
|
@@ -609,7 +619,7 @@ function Gr(t, e, r) {
|
|
|
609
619
|
return (r || JSON.stringify)(t);
|
|
610
620
|
}
|
|
611
621
|
const ne = {
|
|
612
|
-
transitional:
|
|
622
|
+
transitional: qe,
|
|
613
623
|
adapter: ["xhr", "http", "fetch"],
|
|
614
624
|
transformRequest: [
|
|
615
625
|
function(e, r) {
|
|
@@ -628,7 +638,7 @@ const ne = {
|
|
|
628
638
|
return Qr(e, this.formSerializer).toString();
|
|
629
639
|
if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
630
640
|
const f = this.env && this.env.FormData;
|
|
631
|
-
return
|
|
641
|
+
return be(
|
|
632
642
|
c ? { "files[]": e } : e,
|
|
633
643
|
f && new f(),
|
|
634
644
|
this.formSerializer
|
|
@@ -706,12 +716,12 @@ const Zr = a.toObjectSet([
|
|
|
706
716
|
`).forEach(function(o) {
|
|
707
717
|
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Zr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
708
718
|
}), e;
|
|
709
|
-
},
|
|
719
|
+
}, nt = Symbol("internals");
|
|
710
720
|
function G(t) {
|
|
711
721
|
return t && String(t).trim().toLowerCase();
|
|
712
722
|
}
|
|
713
|
-
function
|
|
714
|
-
return t === !1 || t == null ? t : a.isArray(t) ? t.map(
|
|
723
|
+
function he(t) {
|
|
724
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(he) : String(t);
|
|
715
725
|
}
|
|
716
726
|
function tn(t) {
|
|
717
727
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -721,7 +731,7 @@ function tn(t) {
|
|
|
721
731
|
return e;
|
|
722
732
|
}
|
|
723
733
|
const rn = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
724
|
-
function
|
|
734
|
+
function Pe(t, e, r, n, s) {
|
|
725
735
|
if (a.isFunction(n))
|
|
726
736
|
return n.call(this, e, r);
|
|
727
737
|
if (s && (e = r), !!a.isString(e)) {
|
|
@@ -756,7 +766,7 @@ let O = class {
|
|
|
756
766
|
if (!u)
|
|
757
767
|
throw new Error("header name must be a non-empty string");
|
|
758
768
|
const h = a.findKey(s, u);
|
|
759
|
-
(!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] =
|
|
769
|
+
(!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] = he(c));
|
|
760
770
|
}
|
|
761
771
|
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
762
772
|
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
@@ -795,7 +805,7 @@ let O = class {
|
|
|
795
805
|
has(e, r) {
|
|
796
806
|
if (e = G(e), e) {
|
|
797
807
|
const n = a.findKey(this, e);
|
|
798
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
808
|
+
return !!(n && this[n] !== void 0 && (!r || Pe(this, this[n], n, r)));
|
|
799
809
|
}
|
|
800
810
|
return !1;
|
|
801
811
|
}
|
|
@@ -805,7 +815,7 @@ let O = class {
|
|
|
805
815
|
function i(o) {
|
|
806
816
|
if (o = G(o), o) {
|
|
807
817
|
const c = a.findKey(n, o);
|
|
808
|
-
c && (!r ||
|
|
818
|
+
c && (!r || Pe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
809
819
|
}
|
|
810
820
|
}
|
|
811
821
|
return a.isArray(e) ? e.forEach(i) : i(e), s;
|
|
@@ -815,7 +825,7 @@ let O = class {
|
|
|
815
825
|
let n = r.length, s = !1;
|
|
816
826
|
for (; n--; ) {
|
|
817
827
|
const i = r[n];
|
|
818
|
-
(!e ||
|
|
828
|
+
(!e || Pe(this, this[i], i, e, !0)) && (delete this[i], s = !0);
|
|
819
829
|
}
|
|
820
830
|
return s;
|
|
821
831
|
}
|
|
@@ -824,11 +834,11 @@ let O = class {
|
|
|
824
834
|
return a.forEach(this, (s, i) => {
|
|
825
835
|
const o = a.findKey(n, i);
|
|
826
836
|
if (o) {
|
|
827
|
-
r[o] =
|
|
837
|
+
r[o] = he(s), delete r[i];
|
|
828
838
|
return;
|
|
829
839
|
}
|
|
830
840
|
const c = e ? nn(i) : String(i).trim();
|
|
831
|
-
c !== i && delete r[i], r[c] =
|
|
841
|
+
c !== i && delete r[i], r[c] = he(s), n[c] = !0;
|
|
832
842
|
}), this;
|
|
833
843
|
}
|
|
834
844
|
concat(...e) {
|
|
@@ -861,7 +871,7 @@ let O = class {
|
|
|
861
871
|
return r.forEach((s) => n.set(s)), n;
|
|
862
872
|
}
|
|
863
873
|
static accessor(e) {
|
|
864
|
-
const n = (this[
|
|
874
|
+
const n = (this[nt] = this[nt] = {
|
|
865
875
|
accessors: {}
|
|
866
876
|
}).accessors, s = this.prototype;
|
|
867
877
|
function i(o) {
|
|
@@ -889,7 +899,7 @@ a.reduceDescriptors(O.prototype, ({ value: t }, e) => {
|
|
|
889
899
|
};
|
|
890
900
|
});
|
|
891
901
|
a.freezeMethods(O);
|
|
892
|
-
function
|
|
902
|
+
function Oe(t, e) {
|
|
893
903
|
const r = this || ne, n = e || r, s = O.from(n.headers);
|
|
894
904
|
let i = n.data;
|
|
895
905
|
return a.forEach(t, function(c) {
|
|
@@ -941,8 +951,8 @@ function an(t, e) {
|
|
|
941
951
|
g += r[h++], h = h % t;
|
|
942
952
|
if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - o < e)
|
|
943
953
|
return;
|
|
944
|
-
const
|
|
945
|
-
return
|
|
954
|
+
const E = u && l - u;
|
|
955
|
+
return E ? Math.round(g * 1e3 / E) : void 0;
|
|
946
956
|
};
|
|
947
957
|
}
|
|
948
958
|
function cn(t, e) {
|
|
@@ -957,7 +967,7 @@ function cn(t, e) {
|
|
|
957
967
|
}, n - h)));
|
|
958
968
|
}, () => s && o(s)];
|
|
959
969
|
}
|
|
960
|
-
const
|
|
970
|
+
const ye = (t, e, r = 3) => {
|
|
961
971
|
let n = 0;
|
|
962
972
|
const s = an(50, 250);
|
|
963
973
|
return cn((i) => {
|
|
@@ -976,7 +986,7 @@ const he = (t, e, r = 3) => {
|
|
|
976
986
|
};
|
|
977
987
|
t(h);
|
|
978
988
|
}, r);
|
|
979
|
-
},
|
|
989
|
+
}, st = (t, e) => {
|
|
980
990
|
const r = t != null;
|
|
981
991
|
return [
|
|
982
992
|
(n) => e[0]({
|
|
@@ -986,7 +996,7 @@ const he = (t, e, r = 3) => {
|
|
|
986
996
|
}),
|
|
987
997
|
e[1]
|
|
988
998
|
];
|
|
989
|
-
},
|
|
999
|
+
}, it = (t) => (...e) => a.asap(() => t(...e)), un = S.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, S.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
990
1000
|
new URL(S.origin),
|
|
991
1001
|
S.navigator && /(msie|trident)/i.test(S.navigator.userAgent)
|
|
992
1002
|
) : () => !0, ln = S.hasStandardBrowserEnv ? (
|
|
@@ -1028,7 +1038,7 @@ function kt(t, e, r) {
|
|
|
1028
1038
|
let n = !dn(e);
|
|
1029
1039
|
return t && (n || r == !1) ? fn(t, e) : e;
|
|
1030
1040
|
}
|
|
1031
|
-
const
|
|
1041
|
+
const ot = (t) => t instanceof O ? { ...t } : t;
|
|
1032
1042
|
function V(t, e) {
|
|
1033
1043
|
e = e || {};
|
|
1034
1044
|
const r = {};
|
|
@@ -1086,7 +1096,7 @@ function V(t, e) {
|
|
|
1086
1096
|
socketPath: o,
|
|
1087
1097
|
responseEncoding: o,
|
|
1088
1098
|
validateStatus: c,
|
|
1089
|
-
headers: (l, u, h) => s(
|
|
1099
|
+
headers: (l, u, h) => s(ot(l), ot(u), h, !0)
|
|
1090
1100
|
};
|
|
1091
1101
|
return a.forEach(Object.keys({ ...t, ...e }), function(u) {
|
|
1092
1102
|
if (u === "__proto__" || u === "constructor" || u === "prototype") return;
|
|
@@ -1126,22 +1136,22 @@ const vt = (t) => {
|
|
|
1126
1136
|
const s = vt(t);
|
|
1127
1137
|
let i = s.data;
|
|
1128
1138
|
const o = O.from(s.headers).normalize();
|
|
1129
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, g,
|
|
1139
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, g, E, d;
|
|
1130
1140
|
function y() {
|
|
1131
|
-
|
|
1141
|
+
E && E(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1132
1142
|
}
|
|
1133
1143
|
let p = new XMLHttpRequest();
|
|
1134
1144
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1135
|
-
function
|
|
1145
|
+
function C() {
|
|
1136
1146
|
if (!p)
|
|
1137
1147
|
return;
|
|
1138
|
-
const
|
|
1148
|
+
const R = O.from(
|
|
1139
1149
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1140
1150
|
), D = {
|
|
1141
1151
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1142
1152
|
status: p.status,
|
|
1143
1153
|
statusText: p.statusText,
|
|
1144
|
-
headers:
|
|
1154
|
+
headers: R,
|
|
1145
1155
|
config: t,
|
|
1146
1156
|
request: p
|
|
1147
1157
|
};
|
|
@@ -1155,8 +1165,8 @@ const vt = (t) => {
|
|
|
1155
1165
|
D
|
|
1156
1166
|
), p = null;
|
|
1157
1167
|
}
|
|
1158
|
-
"onloadend" in p ? p.onloadend =
|
|
1159
|
-
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1168
|
+
"onloadend" in p ? p.onloadend = C : p.onreadystatechange = function() {
|
|
1169
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(C);
|
|
1160
1170
|
}, p.onabort = function() {
|
|
1161
1171
|
p && (n(new m("Request aborted", m.ECONNABORTED, t, p)), p = null);
|
|
1162
1172
|
}, p.onerror = function(A) {
|
|
@@ -1164,7 +1174,7 @@ const vt = (t) => {
|
|
|
1164
1174
|
j.event = A || null, n(j), p = null;
|
|
1165
1175
|
}, p.ontimeout = function() {
|
|
1166
1176
|
let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1167
|
-
const D = s.transitional ||
|
|
1177
|
+
const D = s.transitional || qe;
|
|
1168
1178
|
s.timeoutErrorMessage && (A = s.timeoutErrorMessage), n(
|
|
1169
1179
|
new m(
|
|
1170
1180
|
A,
|
|
@@ -1175,8 +1185,8 @@ const vt = (t) => {
|
|
|
1175
1185
|
), p = null;
|
|
1176
1186
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(A, D) {
|
|
1177
1187
|
p.setRequestHeader(D, A);
|
|
1178
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, d] =
|
|
1179
|
-
p && (n(!
|
|
1188
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, d] = ye(l, !0), p.addEventListener("progress", g)), f && p.upload && ([h, E] = ye(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (R) => {
|
|
1189
|
+
p && (n(!R || R.type ? new se(null, t, p) : R), p.abort(), p = null);
|
|
1180
1190
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1181
1191
|
const N = on(s.url);
|
|
1182
1192
|
if (N && S.protocols.indexOf(N) === -1) {
|
|
@@ -1244,7 +1254,7 @@ const vt = (t) => {
|
|
|
1244
1254
|
} finally {
|
|
1245
1255
|
await e.cancel();
|
|
1246
1256
|
}
|
|
1247
|
-
},
|
|
1257
|
+
}, at = (t, e, r, n) => {
|
|
1248
1258
|
const s = gn(t, e);
|
|
1249
1259
|
let i = 0, o, c = (f) => {
|
|
1250
1260
|
o || (o = !0, n && n(f));
|
|
@@ -1276,10 +1286,10 @@ const vt = (t) => {
|
|
|
1276
1286
|
highWaterMark: 2
|
|
1277
1287
|
}
|
|
1278
1288
|
);
|
|
1279
|
-
},
|
|
1289
|
+
}, ct = 64 * 1024, { isFunction: ue } = a, bn = (({ Request: t, Response: e }) => ({
|
|
1280
1290
|
Request: t,
|
|
1281
1291
|
Response: e
|
|
1282
|
-
}))(a.global), { ReadableStream:
|
|
1292
|
+
}))(a.global), { ReadableStream: ut, TextEncoder: lt } = a.global, dt = (t, ...e) => {
|
|
1283
1293
|
try {
|
|
1284
1294
|
return !!t(...e);
|
|
1285
1295
|
} catch {
|
|
@@ -1293,27 +1303,27 @@ const vt = (t) => {
|
|
|
1293
1303
|
bn,
|
|
1294
1304
|
t
|
|
1295
1305
|
);
|
|
1296
|
-
const { fetch: e, Request: r, Response: n } = t, s = e ?
|
|
1306
|
+
const { fetch: e, Request: r, Response: n } = t, s = e ? ue(e) : typeof fetch == "function", i = ue(r), o = ue(n);
|
|
1297
1307
|
if (!s)
|
|
1298
1308
|
return !1;
|
|
1299
|
-
const c = s &&
|
|
1309
|
+
const c = s && ue(ut), f = s && (typeof lt == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new lt()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && c && dt(() => {
|
|
1300
1310
|
let d = !1;
|
|
1301
1311
|
const y = new r(S.origin, {
|
|
1302
|
-
body: new
|
|
1312
|
+
body: new ut(),
|
|
1303
1313
|
method: "POST",
|
|
1304
1314
|
get duplex() {
|
|
1305
1315
|
return d = !0, "half";
|
|
1306
1316
|
}
|
|
1307
1317
|
}).headers.has("Content-Type");
|
|
1308
1318
|
return d && !y;
|
|
1309
|
-
}), u = o && c &&
|
|
1319
|
+
}), u = o && c && dt(() => a.isReadableStream(new n("").body)), h = {
|
|
1310
1320
|
stream: u && ((d) => d.body)
|
|
1311
1321
|
};
|
|
1312
1322
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1313
1323
|
!h[d] && (h[d] = (y, p) => {
|
|
1314
|
-
let
|
|
1315
|
-
if (
|
|
1316
|
-
return
|
|
1324
|
+
let C = y && y[d];
|
|
1325
|
+
if (C)
|
|
1326
|
+
return C.call(y);
|
|
1317
1327
|
throw new m(
|
|
1318
1328
|
`Response type '${d}' is not supported`,
|
|
1319
1329
|
m.ERR_NOT_SUPPORT,
|
|
@@ -1335,7 +1345,7 @@ const vt = (t) => {
|
|
|
1335
1345
|
return d.byteLength;
|
|
1336
1346
|
if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
|
|
1337
1347
|
return (await f(d)).byteLength;
|
|
1338
|
-
},
|
|
1348
|
+
}, E = async (d, y) => {
|
|
1339
1349
|
const p = a.toFiniteNumber(d.getContentLength());
|
|
1340
1350
|
return p ?? g(y);
|
|
1341
1351
|
};
|
|
@@ -1343,66 +1353,66 @@ const vt = (t) => {
|
|
|
1343
1353
|
let {
|
|
1344
1354
|
url: y,
|
|
1345
1355
|
method: p,
|
|
1346
|
-
data:
|
|
1356
|
+
data: C,
|
|
1347
1357
|
signal: N,
|
|
1348
|
-
cancelToken:
|
|
1358
|
+
cancelToken: R,
|
|
1349
1359
|
timeout: A,
|
|
1350
1360
|
onDownloadProgress: D,
|
|
1351
1361
|
onUploadProgress: j,
|
|
1352
1362
|
responseType: x,
|
|
1353
|
-
headers:
|
|
1354
|
-
withCredentials:
|
|
1355
|
-
fetchOptions:
|
|
1356
|
-
} = vt(d),
|
|
1363
|
+
headers: Re,
|
|
1364
|
+
withCredentials: oe = "same-origin",
|
|
1365
|
+
fetchOptions: ze
|
|
1366
|
+
} = vt(d), Je = e || fetch;
|
|
1357
1367
|
x = x ? (x + "").toLowerCase() : "text";
|
|
1358
|
-
let
|
|
1359
|
-
[N,
|
|
1368
|
+
let ae = yn(
|
|
1369
|
+
[N, R && R.toAbortSignal()],
|
|
1360
1370
|
A
|
|
1361
1371
|
), Y = null;
|
|
1362
|
-
const $ =
|
|
1363
|
-
|
|
1372
|
+
const $ = ae && ae.unsubscribe && (() => {
|
|
1373
|
+
ae.unsubscribe();
|
|
1364
1374
|
});
|
|
1365
|
-
let
|
|
1375
|
+
let We;
|
|
1366
1376
|
try {
|
|
1367
|
-
if (j && l && p !== "get" && p !== "head" && (
|
|
1377
|
+
if (j && l && p !== "get" && p !== "head" && (We = await E(Re, C)) !== 0) {
|
|
1368
1378
|
let B = new r(y, {
|
|
1369
1379
|
method: "POST",
|
|
1370
|
-
body:
|
|
1380
|
+
body: C,
|
|
1371
1381
|
duplex: "half"
|
|
1372
1382
|
}), z;
|
|
1373
|
-
if (a.isFormData(
|
|
1374
|
-
const [
|
|
1375
|
-
|
|
1376
|
-
|
|
1383
|
+
if (a.isFormData(C) && (z = B.headers.get("content-type")) && Re.setContentType(z), B.body) {
|
|
1384
|
+
const [Se, ce] = st(
|
|
1385
|
+
We,
|
|
1386
|
+
ye(it(j))
|
|
1377
1387
|
);
|
|
1378
|
-
|
|
1388
|
+
C = at(B.body, ct, Se, ce);
|
|
1379
1389
|
}
|
|
1380
1390
|
}
|
|
1381
|
-
a.isString(
|
|
1382
|
-
const T = i && "credentials" in r.prototype,
|
|
1383
|
-
...
|
|
1384
|
-
signal:
|
|
1391
|
+
a.isString(oe) || (oe = oe ? "include" : "omit");
|
|
1392
|
+
const T = i && "credentials" in r.prototype, Qe = {
|
|
1393
|
+
...ze,
|
|
1394
|
+
signal: ae,
|
|
1385
1395
|
method: p.toUpperCase(),
|
|
1386
|
-
headers:
|
|
1387
|
-
body:
|
|
1396
|
+
headers: Re.normalize().toJSON(),
|
|
1397
|
+
body: C,
|
|
1388
1398
|
duplex: "half",
|
|
1389
|
-
credentials: T ?
|
|
1399
|
+
credentials: T ? oe : void 0
|
|
1390
1400
|
};
|
|
1391
|
-
Y = i && new r(y,
|
|
1392
|
-
let v = await (i ?
|
|
1393
|
-
const
|
|
1394
|
-
if (u && (D ||
|
|
1401
|
+
Y = i && new r(y, Qe);
|
|
1402
|
+
let v = await (i ? Je(Y, ze) : Je(y, Qe));
|
|
1403
|
+
const Xe = u && (x === "stream" || x === "response");
|
|
1404
|
+
if (u && (D || Xe && $)) {
|
|
1395
1405
|
const B = {};
|
|
1396
|
-
["status", "statusText", "headers"].forEach((
|
|
1397
|
-
B[
|
|
1406
|
+
["status", "statusText", "headers"].forEach((Ye) => {
|
|
1407
|
+
B[Ye] = v[Ye];
|
|
1398
1408
|
});
|
|
1399
|
-
const z = a.toFiniteNumber(v.headers.get("content-length")), [
|
|
1409
|
+
const z = a.toFiniteNumber(v.headers.get("content-length")), [Se, ce] = D && st(
|
|
1400
1410
|
z,
|
|
1401
|
-
|
|
1411
|
+
ye(it(D), !0)
|
|
1402
1412
|
) || [];
|
|
1403
1413
|
v = new n(
|
|
1404
|
-
|
|
1405
|
-
|
|
1414
|
+
at(v.body, ct, Se, () => {
|
|
1415
|
+
ce && ce(), $ && $();
|
|
1406
1416
|
}),
|
|
1407
1417
|
B
|
|
1408
1418
|
);
|
|
@@ -1412,7 +1422,7 @@ const vt = (t) => {
|
|
|
1412
1422
|
v,
|
|
1413
1423
|
d
|
|
1414
1424
|
);
|
|
1415
|
-
return !
|
|
1425
|
+
return !Xe && $ && $(), await new Promise((B, z) => {
|
|
1416
1426
|
Ft(B, z, {
|
|
1417
1427
|
data: Kt,
|
|
1418
1428
|
headers: O.from(v.headers),
|
|
@@ -1437,23 +1447,23 @@ const vt = (t) => {
|
|
|
1437
1447
|
) : m.from(T, T && T.code, d, Y, T && T.response);
|
|
1438
1448
|
}
|
|
1439
1449
|
};
|
|
1440
|
-
},
|
|
1450
|
+
}, Cn = /* @__PURE__ */ new Map(), Bt = (t) => {
|
|
1441
1451
|
let e = t && t.env || {};
|
|
1442
1452
|
const { fetch: r, Request: n, Response: s } = e, i = [n, s, r];
|
|
1443
|
-
let o = i.length, c = o, f, l, u =
|
|
1453
|
+
let o = i.length, c = o, f, l, u = Cn;
|
|
1444
1454
|
for (; c--; )
|
|
1445
1455
|
f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() : _n(e)), u = l;
|
|
1446
1456
|
return l;
|
|
1447
1457
|
};
|
|
1448
1458
|
Bt();
|
|
1449
|
-
const
|
|
1459
|
+
const $e = {
|
|
1450
1460
|
http: Br,
|
|
1451
1461
|
xhr: pn,
|
|
1452
1462
|
fetch: {
|
|
1453
1463
|
get: Bt
|
|
1454
1464
|
}
|
|
1455
1465
|
};
|
|
1456
|
-
a.forEach(
|
|
1466
|
+
a.forEach($e, (t, e) => {
|
|
1457
1467
|
if (t) {
|
|
1458
1468
|
try {
|
|
1459
1469
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1462,8 +1472,8 @@ a.forEach(Be, (t, e) => {
|
|
|
1462
1472
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1463
1473
|
}
|
|
1464
1474
|
});
|
|
1465
|
-
const
|
|
1466
|
-
function
|
|
1475
|
+
const ft = (t) => `- ${t}`, En = (t) => a.isFunction(t) || t === null || t === !1;
|
|
1476
|
+
function Rn(t, e) {
|
|
1467
1477
|
t = a.isArray(t) ? t : [t];
|
|
1468
1478
|
const { length: r } = t;
|
|
1469
1479
|
let n, s;
|
|
@@ -1471,7 +1481,7 @@ function Cn(t, e) {
|
|
|
1471
1481
|
for (let o = 0; o < r; o++) {
|
|
1472
1482
|
n = t[o];
|
|
1473
1483
|
let c;
|
|
1474
|
-
if (s = n, !
|
|
1484
|
+
if (s = n, !En(n) && (s = $e[(c = String(n)).toLowerCase()], s === void 0))
|
|
1475
1485
|
throw new m(`Unknown adapter '${c}'`);
|
|
1476
1486
|
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
1477
1487
|
break;
|
|
@@ -1482,8 +1492,8 @@ function Cn(t, e) {
|
|
|
1482
1492
|
([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1483
1493
|
);
|
|
1484
1494
|
let c = r ? o.length > 1 ? `since :
|
|
1485
|
-
` + o.map(
|
|
1486
|
-
`) : " " +
|
|
1495
|
+
` + o.map(ft).join(`
|
|
1496
|
+
`) : " " + ft(o[0]) : "as no adapter specified";
|
|
1487
1497
|
throw new m(
|
|
1488
1498
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1489
1499
|
"ERR_NOT_SUPPORT"
|
|
@@ -1496,24 +1506,24 @@ const It = {
|
|
|
1496
1506
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1497
1507
|
* @type {Function}
|
|
1498
1508
|
*/
|
|
1499
|
-
getAdapter:
|
|
1509
|
+
getAdapter: Rn,
|
|
1500
1510
|
/**
|
|
1501
1511
|
* Exposes all known adapters
|
|
1502
1512
|
* @type {Object<string, Function|Object>}
|
|
1503
1513
|
*/
|
|
1504
|
-
adapters:
|
|
1514
|
+
adapters: $e
|
|
1505
1515
|
};
|
|
1506
|
-
function
|
|
1516
|
+
function Ne(t) {
|
|
1507
1517
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1508
1518
|
throw new se(null, t);
|
|
1509
1519
|
}
|
|
1510
|
-
function
|
|
1511
|
-
return
|
|
1520
|
+
function ht(t) {
|
|
1521
|
+
return Ne(t), t.headers = O.from(t.headers), t.data = Oe.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), It.getAdapter(t.adapter || ne.adapter, t)(t).then(
|
|
1512
1522
|
function(n) {
|
|
1513
|
-
return
|
|
1523
|
+
return Ne(t), n.data = Oe.call(t, t.transformResponse, n), n.headers = O.from(n.headers), n;
|
|
1514
1524
|
},
|
|
1515
1525
|
function(n) {
|
|
1516
|
-
return Lt(n) || (
|
|
1526
|
+
return Lt(n) || (Ne(t), n && n.response && (n.response.data = Oe.call(
|
|
1517
1527
|
t,
|
|
1518
1528
|
t.transformResponse,
|
|
1519
1529
|
n.response
|
|
@@ -1521,14 +1531,14 @@ function ft(t) {
|
|
|
1521
1531
|
}
|
|
1522
1532
|
);
|
|
1523
1533
|
}
|
|
1524
|
-
const qt = "1.13.6",
|
|
1534
|
+
const qt = "1.13.6", _e = {};
|
|
1525
1535
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1526
|
-
|
|
1536
|
+
_e[t] = function(n) {
|
|
1527
1537
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1528
1538
|
};
|
|
1529
1539
|
});
|
|
1530
|
-
const
|
|
1531
|
-
|
|
1540
|
+
const pt = {};
|
|
1541
|
+
_e.transitional = function(e, r, n) {
|
|
1532
1542
|
function s(i, o) {
|
|
1533
1543
|
return "[Axios v" + qt + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1534
1544
|
}
|
|
@@ -1538,7 +1548,7 @@ we.transitional = function(e, r, n) {
|
|
|
1538
1548
|
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1539
1549
|
m.ERR_DEPRECATED
|
|
1540
1550
|
);
|
|
1541
|
-
return r && !
|
|
1551
|
+
return r && !pt[o] && (pt[o] = !0, console.warn(
|
|
1542
1552
|
s(
|
|
1543
1553
|
o,
|
|
1544
1554
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1546,7 +1556,7 @@ we.transitional = function(e, r, n) {
|
|
|
1546
1556
|
)), e ? e(i, o, c) : !0;
|
|
1547
1557
|
};
|
|
1548
1558
|
};
|
|
1549
|
-
|
|
1559
|
+
_e.spelling = function(e) {
|
|
1550
1560
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1551
1561
|
};
|
|
1552
1562
|
function Sn(t, e, r) {
|
|
@@ -1569,15 +1579,15 @@ function Sn(t, e, r) {
|
|
|
1569
1579
|
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1570
1580
|
}
|
|
1571
1581
|
}
|
|
1572
|
-
const
|
|
1582
|
+
const pe = {
|
|
1573
1583
|
assertOptions: Sn,
|
|
1574
|
-
validators:
|
|
1575
|
-
}, U =
|
|
1584
|
+
validators: _e
|
|
1585
|
+
}, U = pe.validators;
|
|
1576
1586
|
let H = class {
|
|
1577
1587
|
constructor(e) {
|
|
1578
1588
|
this.defaults = e || {}, this.interceptors = {
|
|
1579
|
-
request: new
|
|
1580
|
-
response: new
|
|
1589
|
+
request: new rt(),
|
|
1590
|
+
response: new rt()
|
|
1581
1591
|
};
|
|
1582
1592
|
}
|
|
1583
1593
|
/**
|
|
@@ -1608,7 +1618,7 @@ let H = class {
|
|
|
1608
1618
|
_request(e, r) {
|
|
1609
1619
|
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = V(this.defaults, r);
|
|
1610
1620
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1611
|
-
n !== void 0 &&
|
|
1621
|
+
n !== void 0 && pe.assertOptions(
|
|
1612
1622
|
n,
|
|
1613
1623
|
{
|
|
1614
1624
|
silentJSONParsing: U.transitional(U.boolean),
|
|
@@ -1619,14 +1629,14 @@ let H = class {
|
|
|
1619
1629
|
!1
|
|
1620
1630
|
), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1621
1631
|
serialize: s
|
|
1622
|
-
} :
|
|
1632
|
+
} : pe.assertOptions(
|
|
1623
1633
|
s,
|
|
1624
1634
|
{
|
|
1625
1635
|
encode: U.function,
|
|
1626
1636
|
serialize: U.function
|
|
1627
1637
|
},
|
|
1628
1638
|
!0
|
|
1629
|
-
)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
1639
|
+
)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), pe.assertOptions(
|
|
1630
1640
|
r,
|
|
1631
1641
|
{
|
|
1632
1642
|
baseUrl: U.spelling("baseURL"),
|
|
@@ -1644,7 +1654,7 @@ let H = class {
|
|
|
1644
1654
|
if (typeof y.runWhen == "function" && y.runWhen(r) === !1)
|
|
1645
1655
|
return;
|
|
1646
1656
|
f = f && y.synchronous;
|
|
1647
|
-
const p = r.transitional ||
|
|
1657
|
+
const p = r.transitional || qe;
|
|
1648
1658
|
p && p.legacyInterceptorReqResOrdering ? c.unshift(y.fulfilled, y.rejected) : c.push(y.fulfilled, y.rejected);
|
|
1649
1659
|
});
|
|
1650
1660
|
const l = [];
|
|
@@ -1653,24 +1663,24 @@ let H = class {
|
|
|
1653
1663
|
});
|
|
1654
1664
|
let u, h = 0, g;
|
|
1655
1665
|
if (!f) {
|
|
1656
|
-
const d = [
|
|
1666
|
+
const d = [ht.bind(this), void 0];
|
|
1657
1667
|
for (d.unshift(...c), d.push(...l), g = d.length, u = Promise.resolve(r); h < g; )
|
|
1658
1668
|
u = u.then(d[h++], d[h++]);
|
|
1659
1669
|
return u;
|
|
1660
1670
|
}
|
|
1661
1671
|
g = c.length;
|
|
1662
|
-
let
|
|
1672
|
+
let E = r;
|
|
1663
1673
|
for (; h < g; ) {
|
|
1664
1674
|
const d = c[h++], y = c[h++];
|
|
1665
1675
|
try {
|
|
1666
|
-
|
|
1676
|
+
E = d(E);
|
|
1667
1677
|
} catch (p) {
|
|
1668
1678
|
y.call(this, p);
|
|
1669
1679
|
break;
|
|
1670
1680
|
}
|
|
1671
1681
|
}
|
|
1672
1682
|
try {
|
|
1673
|
-
u =
|
|
1683
|
+
u = ht.call(this, E);
|
|
1674
1684
|
} catch (d) {
|
|
1675
1685
|
return Promise.reject(d);
|
|
1676
1686
|
}
|
|
@@ -1793,7 +1803,7 @@ function Tn(t) {
|
|
|
1793
1803
|
function Pn(t) {
|
|
1794
1804
|
return a.isObject(t) && t.isAxiosError === !0;
|
|
1795
1805
|
}
|
|
1796
|
-
const
|
|
1806
|
+
const ke = {
|
|
1797
1807
|
Continue: 100,
|
|
1798
1808
|
SwitchingProtocols: 101,
|
|
1799
1809
|
Processing: 102,
|
|
@@ -1864,8 +1874,8 @@ const Ue = {
|
|
|
1864
1874
|
SslHandshakeFailed: 525,
|
|
1865
1875
|
InvalidSslCertificate: 526
|
|
1866
1876
|
};
|
|
1867
|
-
Object.entries(
|
|
1868
|
-
|
|
1877
|
+
Object.entries(ke).forEach(([t, e]) => {
|
|
1878
|
+
ke[e] = t;
|
|
1869
1879
|
});
|
|
1870
1880
|
function $t(t) {
|
|
1871
1881
|
const e = new H(t), r = _t(H.prototype.request, e);
|
|
@@ -1879,7 +1889,7 @@ _.CanceledError = se;
|
|
|
1879
1889
|
_.CancelToken = An;
|
|
1880
1890
|
_.isCancel = Lt;
|
|
1881
1891
|
_.VERSION = qt;
|
|
1882
|
-
_.toFormData =
|
|
1892
|
+
_.toFormData = be;
|
|
1883
1893
|
_.AxiosError = m;
|
|
1884
1894
|
_.Cancel = _.CanceledError;
|
|
1885
1895
|
_.all = function(e) {
|
|
@@ -1891,48 +1901,48 @@ _.mergeConfig = V;
|
|
|
1891
1901
|
_.AxiosHeaders = O;
|
|
1892
1902
|
_.formToJSON = (t) => Dt(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
1893
1903
|
_.getAdapter = It.getAdapter;
|
|
1894
|
-
_.HttpStatusCode =
|
|
1904
|
+
_.HttpStatusCode = ke;
|
|
1895
1905
|
_.default = _;
|
|
1896
1906
|
const {
|
|
1897
|
-
Axios:
|
|
1898
|
-
AxiosError:
|
|
1899
|
-
CanceledError:
|
|
1900
|
-
isCancel:
|
|
1901
|
-
CancelToken:
|
|
1902
|
-
VERSION:
|
|
1903
|
-
all:
|
|
1904
|
-
Cancel:
|
|
1905
|
-
isAxiosError:
|
|
1906
|
-
spread:
|
|
1907
|
-
toFormData:
|
|
1908
|
-
AxiosHeaders:
|
|
1909
|
-
HttpStatusCode:
|
|
1910
|
-
formToJSON:
|
|
1911
|
-
getAdapter:
|
|
1912
|
-
mergeConfig:
|
|
1907
|
+
Axios: Ws,
|
|
1908
|
+
AxiosError: le,
|
|
1909
|
+
CanceledError: Qs,
|
|
1910
|
+
isCancel: Xs,
|
|
1911
|
+
CancelToken: Ys,
|
|
1912
|
+
VERSION: Gs,
|
|
1913
|
+
all: Zs,
|
|
1914
|
+
Cancel: ei,
|
|
1915
|
+
isAxiosError: ti,
|
|
1916
|
+
spread: ri,
|
|
1917
|
+
toFormData: ni,
|
|
1918
|
+
AxiosHeaders: si,
|
|
1919
|
+
HttpStatusCode: ii,
|
|
1920
|
+
formToJSON: oi,
|
|
1921
|
+
getAdapter: ai,
|
|
1922
|
+
mergeConfig: ci
|
|
1913
1923
|
} = _;
|
|
1914
|
-
class
|
|
1924
|
+
class xe extends Error {
|
|
1915
1925
|
constructor(r) {
|
|
1916
1926
|
super(r.join(", "));
|
|
1917
1927
|
b(this, "errors");
|
|
1918
1928
|
this.name = "ValidationError", this.errors = r;
|
|
1919
1929
|
}
|
|
1920
1930
|
}
|
|
1921
|
-
class
|
|
1931
|
+
class yt extends Error {
|
|
1922
1932
|
constructor(r) {
|
|
1923
1933
|
super("Address already registered.");
|
|
1924
1934
|
b(this, "address");
|
|
1925
1935
|
this.name = "AddressInUseError", this.address = r;
|
|
1926
1936
|
}
|
|
1927
1937
|
}
|
|
1928
|
-
class
|
|
1938
|
+
class mt extends Error {
|
|
1929
1939
|
constructor(r) {
|
|
1930
1940
|
super("Code already registered.");
|
|
1931
1941
|
b(this, "code");
|
|
1932
1942
|
this.name = "CodeInUseError", this.code = r;
|
|
1933
1943
|
}
|
|
1934
1944
|
}
|
|
1935
|
-
class
|
|
1945
|
+
class Ue extends Error {
|
|
1936
1946
|
constructor() {
|
|
1937
1947
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1938
1948
|
}
|
|
@@ -1960,13 +1970,13 @@ class On {
|
|
|
1960
1970
|
}
|
|
1961
1971
|
})).data;
|
|
1962
1972
|
} catch (l) {
|
|
1963
|
-
if (l instanceof
|
|
1973
|
+
if (l instanceof le) {
|
|
1964
1974
|
const u = (f = l.response) == null ? void 0 : f.data;
|
|
1965
1975
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1966
1976
|
const h = u.message.toLowerCase();
|
|
1967
|
-
throw h == "invalid signature" ? new
|
|
1977
|
+
throw h == "invalid signature" ? new Ue() : h == "address in use" ? new yt(e) : h == "code in use" ? new mt(n) : new Error(h);
|
|
1968
1978
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1969
|
-
throw new
|
|
1979
|
+
throw new xe(u.message);
|
|
1970
1980
|
}
|
|
1971
1981
|
throw l;
|
|
1972
1982
|
}
|
|
@@ -1986,13 +1996,13 @@ class On {
|
|
|
1986
1996
|
}
|
|
1987
1997
|
});
|
|
1988
1998
|
} catch (f) {
|
|
1989
|
-
if (f instanceof
|
|
1999
|
+
if (f instanceof le) {
|
|
1990
2000
|
const l = (c = f.response) == null ? void 0 : c.data;
|
|
1991
2001
|
if (typeof (l == null ? void 0 : l.message) == "string") {
|
|
1992
2002
|
const u = l.message.toLowerCase();
|
|
1993
|
-
throw u == "invalid signature" ? new
|
|
2003
|
+
throw u == "invalid signature" ? new Ue() : u == "address in use" ? new yt(e) : u == "code in use" ? new mt(n) : new Error(u);
|
|
1994
2004
|
} else if ((l == null ? void 0 : l.message) instanceof Array)
|
|
1995
|
-
throw new
|
|
2005
|
+
throw new xe(l.message);
|
|
1996
2006
|
}
|
|
1997
2007
|
throw f;
|
|
1998
2008
|
}
|
|
@@ -2013,13 +2023,13 @@ class On {
|
|
|
2013
2023
|
}
|
|
2014
2024
|
});
|
|
2015
2025
|
} catch (u) {
|
|
2016
|
-
if (u instanceof
|
|
2026
|
+
if (u instanceof le) {
|
|
2017
2027
|
const h = (l = u.response) == null ? void 0 : l.data;
|
|
2018
2028
|
if (typeof (h == null ? void 0 : h.message) == "string") {
|
|
2019
2029
|
const g = h.message.toLowerCase();
|
|
2020
|
-
throw g == "invalid signature" ? new
|
|
2030
|
+
throw g == "invalid signature" ? new Ue() : new Error(g);
|
|
2021
2031
|
} else if ((h == null ? void 0 : h.message) instanceof Array)
|
|
2022
|
-
throw new
|
|
2032
|
+
throw new xe(h.message);
|
|
2023
2033
|
}
|
|
2024
2034
|
throw u;
|
|
2025
2035
|
}
|
|
@@ -2043,7 +2053,7 @@ class On {
|
|
|
2043
2053
|
try {
|
|
2044
2054
|
return (await this.httpClient.get({ path: `/affiliates/${e}`, queryParams: { identifier_type: r } })).data;
|
|
2045
2055
|
} catch (s) {
|
|
2046
|
-
if (s instanceof
|
|
2056
|
+
if (s instanceof le && ((n = s.response) == null ? void 0 : n.status) === 404)
|
|
2047
2057
|
return null;
|
|
2048
2058
|
throw console.error("Fuul SDK: Could not get affiliate code", s), s;
|
|
2049
2059
|
}
|
|
@@ -2063,13 +2073,45 @@ class xn {
|
|
|
2063
2073
|
})).data;
|
|
2064
2074
|
}
|
|
2065
2075
|
}
|
|
2066
|
-
const
|
|
2076
|
+
const de = "/claim-checks";
|
|
2067
2077
|
class Un {
|
|
2068
2078
|
constructor(e) {
|
|
2069
2079
|
b(this, "httpClient");
|
|
2070
2080
|
b(this, "_debug");
|
|
2071
2081
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2072
2082
|
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Retrieves claim checks for a user with optional status filtering
|
|
2085
|
+
*
|
|
2086
|
+
* @param {GetClaimChecksParams} params - User identifier and optional status filter
|
|
2087
|
+
* @returns {Promise<GetClaimChecksResponse>} List of claim checks
|
|
2088
|
+
*/
|
|
2089
|
+
async getClaimChecks(e) {
|
|
2090
|
+
const r = {
|
|
2091
|
+
user_identifier: e.user_identifier,
|
|
2092
|
+
user_identifier_type: e.user_identifier_type
|
|
2093
|
+
};
|
|
2094
|
+
return e.status && (r.status = e.status), (await this.httpClient.get({
|
|
2095
|
+
path: de,
|
|
2096
|
+
queryParams: r
|
|
2097
|
+
})).data;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Closes open claim checks, aggregating and signing them for on-chain claiming
|
|
2101
|
+
*
|
|
2102
|
+
* @param {CloseClaimChecksParams} params - User identifier and claim check IDs to close
|
|
2103
|
+
* @returns {Promise<CloseClaimChecksResponse>} Array of signed claim responses ready for on-chain execution
|
|
2104
|
+
*/
|
|
2105
|
+
async closeClaimChecks(e) {
|
|
2106
|
+
return (await this.httpClient.post({
|
|
2107
|
+
path: `${de}/close`,
|
|
2108
|
+
postData: {
|
|
2109
|
+
userIdentifier: e.user_identifier,
|
|
2110
|
+
userIdentifierType: e.user_identifier_type,
|
|
2111
|
+
claim_check_ids: e.claim_check_ids
|
|
2112
|
+
}
|
|
2113
|
+
})).data;
|
|
2114
|
+
}
|
|
2073
2115
|
/**
|
|
2074
2116
|
* Retrieves all claimable claim checks for a user
|
|
2075
2117
|
* Returns only unclaimed checks with valid (non-expired) deadlines
|
|
@@ -2079,7 +2121,7 @@ class Un {
|
|
|
2079
2121
|
*/
|
|
2080
2122
|
async getClaimableChecks(e) {
|
|
2081
2123
|
return (await this.httpClient.post({
|
|
2082
|
-
path: `${
|
|
2124
|
+
path: `${de}/claim`,
|
|
2083
2125
|
postData: {
|
|
2084
2126
|
userIdentifier: e.user_identifier,
|
|
2085
2127
|
userIdentifierType: e.user_identifier_type
|
|
@@ -2095,7 +2137,7 @@ class Un {
|
|
|
2095
2137
|
*/
|
|
2096
2138
|
async getClaimCheckTotals(e) {
|
|
2097
2139
|
return (await this.httpClient.get({
|
|
2098
|
-
path: `${
|
|
2140
|
+
path: `${de}/totals`,
|
|
2099
2141
|
queryParams: {
|
|
2100
2142
|
user_identifier: e.user_identifier,
|
|
2101
2143
|
user_identifier_type: e.user_identifier_type
|
|
@@ -2135,7 +2177,7 @@ class kn {
|
|
|
2135
2177
|
this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
|
|
2136
2178
|
}
|
|
2137
2179
|
isDuplicate(e) {
|
|
2138
|
-
var u, h, g,
|
|
2180
|
+
var u, h, g, E;
|
|
2139
2181
|
const r = `${gt}_${e.name}`, n = localStorage.getItem(r);
|
|
2140
2182
|
if (!n)
|
|
2141
2183
|
return !1;
|
|
@@ -2143,7 +2185,7 @@ class kn {
|
|
|
2143
2185
|
if (this.getCurrentTimestamp() - s.timestamp > Ln)
|
|
2144
2186
|
return !1;
|
|
2145
2187
|
let f = !1;
|
|
2146
|
-
e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((
|
|
2188
|
+
e.metadata && (f = s.metadata.tracking_id === e.metadata.tracking_id && s.metadata.project_id === e.metadata.project_id && s.metadata.referrer === e.metadata.referrer && s.metadata.source === e.metadata.source && s.metadata.category === e.metadata.category && s.metadata.title === e.metadata.title && s.metadata.tag === e.metadata.tag && s.user_address === e.user_address && ((u = s.user) == null ? void 0 : u.identifier) === ((h = e.user) == null ? void 0 : h.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((E = e.user) == null ? void 0 : E.identifier_type) && s.signature === e.signature && s.signature_message === e.signature_message);
|
|
2147
2189
|
let l = !1;
|
|
2148
2190
|
return e.args && s.args && (l = s.args.page === e.args.page), l && f;
|
|
2149
2191
|
}
|
|
@@ -2420,7 +2462,7 @@ let Hn = (t = 21) => {
|
|
|
2420
2462
|
e += Mn[r[t] & 63];
|
|
2421
2463
|
return e;
|
|
2422
2464
|
};
|
|
2423
|
-
const Vn = "fuul.tracking_id",
|
|
2465
|
+
const Vn = "fuul.tracking_id", Me = () => Xn(Vn, () => Hn()), bt = () => W("af") || W("referrer"), Kn = () => document.referrer, zn = () => Yn(), Jn = () => W("category"), Wn = () => W("title"), Qn = () => W("tag"), Xn = (t, e) => {
|
|
2424
2466
|
const r = localStorage.getItem(t);
|
|
2425
2467
|
if (r)
|
|
2426
2468
|
return r;
|
|
@@ -2443,27 +2485,27 @@ class Zn {
|
|
|
2443
2485
|
}
|
|
2444
2486
|
}
|
|
2445
2487
|
const es = "https://api.fuul.xyz/api/v1/";
|
|
2446
|
-
let k = !1,
|
|
2488
|
+
let k = !1, ve = !1, He, L, Mt, Ht, I, Ce, Ee, X, Vt, K, q, ie;
|
|
2447
2489
|
function ts(t) {
|
|
2448
|
-
k = !!t.debug, !
|
|
2490
|
+
k = !!t.debug, !ve && (He = t.apiKey, js(), L = $s(t.baseApiUrl ?? es, t.defaultQueryParams ?? {}), Mt = new Dn({ httpClient: L, debug: k }), Ee = new kn({ httpClient: L, debug: k }), I = new On({ httpClient: L, debug: k }), Ce = new Wt({ httpClient: L }), X = new jn({ httpClient: L, debug: k }), Ht = new Zn({ httpClient: L }), Vt = new xn({ httpClient: L, debug: k }), K = new qn({ httpClient: L }), q = new $n({ httpClient: L, debug: k }), ie = new Un({ httpClient: L, debug: k }), ve = !0, k && console.debug("Fuul SDK: init() complete"));
|
|
2449
2491
|
}
|
|
2450
2492
|
function w() {
|
|
2451
|
-
if (!
|
|
2493
|
+
if (!ve)
|
|
2452
2494
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2453
2495
|
}
|
|
2454
2496
|
async function rs(t, e) {
|
|
2455
|
-
w(),
|
|
2497
|
+
w(), Ve(), Ke();
|
|
2456
2498
|
const r = {
|
|
2457
2499
|
name: t,
|
|
2458
2500
|
args: e ?? {},
|
|
2459
2501
|
metadata: {
|
|
2460
|
-
tracking_id:
|
|
2502
|
+
tracking_id: Me()
|
|
2461
2503
|
}
|
|
2462
2504
|
};
|
|
2463
|
-
await
|
|
2505
|
+
await Ee.sendEvent(r);
|
|
2464
2506
|
}
|
|
2465
2507
|
async function ns(t, e) {
|
|
2466
|
-
w(),
|
|
2508
|
+
w(), Ve(), Ke();
|
|
2467
2509
|
const r = {
|
|
2468
2510
|
name: "pageview",
|
|
2469
2511
|
args: {
|
|
@@ -2471,7 +2513,7 @@ async function ns(t, e) {
|
|
|
2471
2513
|
locationOrigin: document.location.origin
|
|
2472
2514
|
},
|
|
2473
2515
|
metadata: {
|
|
2474
|
-
tracking_id:
|
|
2516
|
+
tracking_id: Me(),
|
|
2475
2517
|
referrer_url: Kn(),
|
|
2476
2518
|
source: zn(),
|
|
2477
2519
|
affiliate_id: bt() ?? void 0,
|
|
@@ -2481,10 +2523,10 @@ async function ns(t, e) {
|
|
|
2481
2523
|
tag: Qn() ?? void 0
|
|
2482
2524
|
}
|
|
2483
2525
|
};
|
|
2484
|
-
await
|
|
2526
|
+
await Ee.sendEvent(r, e);
|
|
2485
2527
|
}
|
|
2486
2528
|
async function ss(t, e) {
|
|
2487
|
-
w(),
|
|
2529
|
+
w(), Ve(), Ke();
|
|
2488
2530
|
const r = {
|
|
2489
2531
|
name: "connect_wallet",
|
|
2490
2532
|
user: {
|
|
@@ -2496,10 +2538,10 @@ async function ss(t, e) {
|
|
|
2496
2538
|
locationOrigin: document.location.origin
|
|
2497
2539
|
},
|
|
2498
2540
|
metadata: {
|
|
2499
|
-
tracking_id:
|
|
2541
|
+
tracking_id: Me()
|
|
2500
2542
|
}
|
|
2501
2543
|
};
|
|
2502
|
-
t != null && t.signature && (r.signature = t == null ? void 0 : t.signature, r.signature_message = t == null ? void 0 : t.message), t != null && t.signaturePublicKey && (r.signature_public_key = t.signaturePublicKey), t != null && t.accountChainId && (r.account_chain_id = t.accountChainId), await
|
|
2544
|
+
t != null && t.signature && (r.signature = t == null ? void 0 : t.signature, r.signature_message = t == null ? void 0 : t.message), t != null && t.signaturePublicKey && (r.signature_public_key = t.signaturePublicKey), t != null && t.accountChainId && (r.account_chain_id = t.accountChainId), await Ee.sendEvent(r, e);
|
|
2503
2545
|
}
|
|
2504
2546
|
async function is(t) {
|
|
2505
2547
|
return w(), I.create(
|
|
@@ -2577,13 +2619,13 @@ function bs(t) {
|
|
|
2577
2619
|
function _s(t) {
|
|
2578
2620
|
return X.getUserPayoutMovements(t);
|
|
2579
2621
|
}
|
|
2580
|
-
function
|
|
2622
|
+
function Cs(t) {
|
|
2581
2623
|
return X.getUserPointsMovements(t);
|
|
2582
2624
|
}
|
|
2583
|
-
function
|
|
2625
|
+
function Es(t) {
|
|
2584
2626
|
return w(), X.getPayoutsByReferrer(t);
|
|
2585
2627
|
}
|
|
2586
|
-
async function
|
|
2628
|
+
async function Rs(t) {
|
|
2587
2629
|
return w(), Mt.getAll(t);
|
|
2588
2630
|
}
|
|
2589
2631
|
async function Ss(t) {
|
|
@@ -2614,44 +2656,53 @@ async function Ds(t) {
|
|
|
2614
2656
|
return w(), q.deleteReferral(t);
|
|
2615
2657
|
}
|
|
2616
2658
|
async function Ls(t) {
|
|
2617
|
-
return w(),
|
|
2659
|
+
return w(), Ce.getAffiliateStats(t);
|
|
2618
2660
|
}
|
|
2619
2661
|
async function Fs(t) {
|
|
2620
|
-
return w(),
|
|
2662
|
+
return w(), Ce.getAffiliateNewTraders(t);
|
|
2621
2663
|
}
|
|
2622
2664
|
async function ks(t) {
|
|
2623
|
-
return w(),
|
|
2665
|
+
return w(), Ce.getAffiliateTotalStats(t);
|
|
2624
2666
|
}
|
|
2625
2667
|
async function vs(t) {
|
|
2626
|
-
return w(),
|
|
2668
|
+
return w(), ie.getClaimChecks(t);
|
|
2669
|
+
}
|
|
2670
|
+
async function Bs(t) {
|
|
2671
|
+
return w(), ie.closeClaimChecks(t);
|
|
2672
|
+
}
|
|
2673
|
+
async function Is(t) {
|
|
2674
|
+
return w(), ie.getClaimableChecks(t);
|
|
2675
|
+
}
|
|
2676
|
+
async function qs(t) {
|
|
2677
|
+
return w(), ie.getClaimCheckTotals(t);
|
|
2627
2678
|
}
|
|
2628
|
-
function
|
|
2679
|
+
function Ve() {
|
|
2629
2680
|
if (typeof window > "u" || typeof document > "u")
|
|
2630
2681
|
throw new Error("Fuul SDK: Browser context required");
|
|
2631
2682
|
}
|
|
2632
|
-
function
|
|
2683
|
+
function Ke() {
|
|
2633
2684
|
if (navigator.webdriver)
|
|
2634
2685
|
throw new Error("Fuul SDK: Error");
|
|
2635
2686
|
}
|
|
2636
|
-
function
|
|
2637
|
-
if (!
|
|
2687
|
+
function js() {
|
|
2688
|
+
if (!He)
|
|
2638
2689
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2639
2690
|
}
|
|
2640
|
-
function
|
|
2691
|
+
function $s(t, e) {
|
|
2641
2692
|
return new In({
|
|
2642
2693
|
baseURL: t,
|
|
2643
2694
|
timeout: 3e4,
|
|
2644
|
-
apiKey:
|
|
2695
|
+
apiKey: He,
|
|
2645
2696
|
queryParams: e
|
|
2646
2697
|
});
|
|
2647
2698
|
}
|
|
2648
|
-
const
|
|
2699
|
+
const ui = {
|
|
2649
2700
|
init: ts,
|
|
2650
2701
|
sendEvent: rs,
|
|
2651
2702
|
sendPageview: ns,
|
|
2652
2703
|
identifyUser: ss,
|
|
2653
2704
|
generateTrackingLink: ds,
|
|
2654
|
-
getConversions:
|
|
2705
|
+
getConversions: Rs,
|
|
2655
2706
|
createAffiliateCode: is,
|
|
2656
2707
|
updateAffiliateCode: os,
|
|
2657
2708
|
updateRebateRate: as,
|
|
@@ -2665,9 +2716,9 @@ const ii = {
|
|
|
2665
2716
|
getUserAudiences: As,
|
|
2666
2717
|
getUserPayoutsByConversion: ws,
|
|
2667
2718
|
getUserPointsByConversion: bs,
|
|
2668
|
-
getUserPointsMovements:
|
|
2719
|
+
getUserPointsMovements: Cs,
|
|
2669
2720
|
getUserPayoutMovements: _s,
|
|
2670
|
-
getPayoutsByReferrer:
|
|
2721
|
+
getPayoutsByReferrer: Es,
|
|
2671
2722
|
getUserReferrer: Ss,
|
|
2672
2723
|
getVolumeLeaderboard: ms,
|
|
2673
2724
|
getRevenueLeaderboard: gs,
|
|
@@ -2680,15 +2731,19 @@ const ii = {
|
|
|
2680
2731
|
deleteReferral: Ds,
|
|
2681
2732
|
getAffiliateStats: Ls,
|
|
2682
2733
|
getAffiliateNewTraders: Fs,
|
|
2683
|
-
|
|
2684
|
-
|
|
2734
|
+
getAffiliateTotalStats: ks,
|
|
2735
|
+
getClaimChecks: vs,
|
|
2736
|
+
closeClaimChecks: Bs,
|
|
2737
|
+
getClaimableChecks: Is,
|
|
2738
|
+
getClaimCheckTotals: qs
|
|
2685
2739
|
};
|
|
2686
|
-
var
|
|
2740
|
+
var Ms = /* @__PURE__ */ ((t) => (t.Open = "open", t.Unclaimed = "unclaimed", t.Claimed = "claimed", t))(Ms || {}), Hs = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Hs || {});
|
|
2687
2741
|
export {
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2742
|
+
yt as AddressInUseError,
|
|
2743
|
+
Ms as ClaimCheckStatus,
|
|
2744
|
+
mt as CodeInUseError,
|
|
2745
|
+
ui as Fuul,
|
|
2746
|
+
Ue as InvalidSignatureError,
|
|
2747
|
+
Hs as UserIdentifierType,
|
|
2748
|
+
xe as ValidationError
|
|
2694
2749
|
};
|