@fuul/sdk 4.10.1 → 4.11.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/affiliates/AffiliateService.d.ts +2 -2
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/core.d.ts +24 -12
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +325 -323
- package/dist/index.umd.js +5 -5
- package/dist/payouts/PayoutService.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +6 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14,11 +14,11 @@ function dt(e) {
|
|
|
14
14
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
16
|
const ke = O("ArrayBuffer");
|
|
17
|
-
function
|
|
17
|
+
function ht(e) {
|
|
18
18
|
let t;
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ke(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const pt = W("string"), C = W("function"), je = W("number"), G = (e) => e !== null && typeof e == "object", mt = (e) => e === !0 || e === !1, z = (e) => {
|
|
22
22
|
if (M(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = le(e);
|
|
@@ -36,10 +36,10 @@ function $(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
36
36
|
for (r = 0, s = e.length; r < s; r++)
|
|
37
37
|
t.call(null, e[r], r, e);
|
|
38
38
|
else {
|
|
39
|
-
const
|
|
39
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
40
40
|
let c;
|
|
41
|
-
for (r = 0; r <
|
|
42
|
-
c =
|
|
41
|
+
for (r = 0; r < i; r++)
|
|
42
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function ve(e, t) {
|
|
@@ -54,27 +54,27 @@ function ve(e, t) {
|
|
|
54
54
|
const $e = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), qe = (e) => !v(e) && e !== $e;
|
|
55
55
|
function se() {
|
|
56
56
|
const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
|
|
57
|
-
const
|
|
58
|
-
z(t[
|
|
57
|
+
const o = e && ve(t, s) || s;
|
|
58
|
+
z(t[o]) && z(r) ? t[o] = se(t[o], r) : z(r) ? t[o] = se({}, r) : D(r) ? t[o] = r.slice() : t[o] = r;
|
|
59
59
|
};
|
|
60
60
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
61
|
arguments[r] && $(arguments[r], n);
|
|
62
62
|
return t;
|
|
63
63
|
}
|
|
64
|
-
const Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s,
|
|
65
|
-
n && C(s) ? e[
|
|
64
|
+
const Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, o) => {
|
|
65
|
+
n && C(s) ? e[o] = Ie(s, n) : e[o] = s;
|
|
66
66
|
}, { allOwnKeys: r }), e), Ot = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tt = (e, t, n, r) => {
|
|
67
67
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
68
68
|
value: t.prototype
|
|
69
69
|
}), n && Object.assign(e.prototype, n);
|
|
70
70
|
}, Pt = (e, t, n, r) => {
|
|
71
|
-
let s,
|
|
71
|
+
let s, o, i;
|
|
72
72
|
const c = {};
|
|
73
73
|
if (t = t || {}, e == null)
|
|
74
74
|
return t;
|
|
75
75
|
do {
|
|
76
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
77
|
-
|
|
76
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
77
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
78
78
|
e = n !== !1 && le(e);
|
|
79
79
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
80
80
|
return t;
|
|
@@ -98,8 +98,8 @@ const Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
98
98
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
99
99
|
let s;
|
|
100
100
|
for (; (s = r.next()) && !s.done; ) {
|
|
101
|
-
const
|
|
102
|
-
t.call(e,
|
|
101
|
+
const o = s.value;
|
|
102
|
+
t.call(e, o[0], o[1]);
|
|
103
103
|
}
|
|
104
104
|
}, Ft = (e, t) => {
|
|
105
105
|
let n;
|
|
@@ -114,9 +114,9 @@ const Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
114
114
|
}
|
|
115
115
|
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Bt = O("RegExp"), He = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
|
-
$(n, (s,
|
|
118
|
-
let
|
|
119
|
-
(
|
|
117
|
+
$(n, (s, o) => {
|
|
118
|
+
let i;
|
|
119
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
120
120
|
}), Object.defineProperties(e, r);
|
|
121
121
|
}, It = (e) => {
|
|
122
122
|
He(e, (t, n) => {
|
|
@@ -135,8 +135,8 @@ const Rt = (e, t, n, { allOwnKeys: r } = {}) => ($(t, (s, i) => {
|
|
|
135
135
|
});
|
|
136
136
|
}, kt = (e, t) => {
|
|
137
137
|
const n = {}, r = (s) => {
|
|
138
|
-
s.forEach((
|
|
139
|
-
n[
|
|
138
|
+
s.forEach((o) => {
|
|
139
|
+
n[o] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
142
|
return D(e) ? r(e) : r(String(e).split(t)), n;
|
|
@@ -162,11 +162,11 @@ const Ht = (e) => {
|
|
|
162
162
|
return;
|
|
163
163
|
if (!("toJSON" in r)) {
|
|
164
164
|
t[s] = r;
|
|
165
|
-
const
|
|
166
|
-
return $(r, (
|
|
167
|
-
const
|
|
168
|
-
!v(
|
|
169
|
-
}), t[s] = void 0,
|
|
165
|
+
const o = D(r) ? [] : {};
|
|
166
|
+
return $(r, (i, c) => {
|
|
167
|
+
const l = n(i, s + 1);
|
|
168
|
+
!v(l) && (o[c] = l);
|
|
169
|
+
}), t[s] = void 0, o;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
return r;
|
|
@@ -177,8 +177,8 @@ const Ht = (e) => {
|
|
|
177
177
|
isArrayBuffer: ke,
|
|
178
178
|
isBuffer: dt,
|
|
179
179
|
isFormData: St,
|
|
180
|
-
isArrayBufferView:
|
|
181
|
-
isString:
|
|
180
|
+
isArrayBufferView: ht,
|
|
181
|
+
isString: pt,
|
|
182
182
|
isNumber: je,
|
|
183
183
|
isBoolean: mt,
|
|
184
184
|
isObject: G,
|
|
@@ -270,11 +270,11 @@ const Ve = m.prototype, Ke = {};
|
|
|
270
270
|
});
|
|
271
271
|
Object.defineProperties(m, Ke);
|
|
272
272
|
Object.defineProperty(Ve, "isAxiosError", { value: !0 });
|
|
273
|
-
m.from = (e, t, n, r, s,
|
|
274
|
-
const
|
|
275
|
-
return a.toFlatObject(e,
|
|
276
|
-
return
|
|
277
|
-
}, (c) => c !== "isAxiosError"), m.call(
|
|
273
|
+
m.from = (e, t, n, r, s, o) => {
|
|
274
|
+
const i = Object.create(Ve);
|
|
275
|
+
return a.toFlatObject(e, i, function(l) {
|
|
276
|
+
return l !== Error.prototype;
|
|
277
|
+
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
278
278
|
};
|
|
279
279
|
const Kt = null;
|
|
280
280
|
function oe(e) {
|
|
@@ -284,8 +284,8 @@ function Je(e) {
|
|
|
284
284
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
285
285
|
}
|
|
286
286
|
function Se(e, t, n) {
|
|
287
|
-
return e ? e.concat(t).map(function(s,
|
|
288
|
-
return s = Je(s), !n &&
|
|
287
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
288
|
+
return s = Je(s), !n && o ? "[" + s + "]" : s;
|
|
289
289
|
}).join(n ? "." : "") : t;
|
|
290
290
|
}
|
|
291
291
|
function Jt(e) {
|
|
@@ -301,54 +301,54 @@ function X(e, t, n) {
|
|
|
301
301
|
metaTokens: !0,
|
|
302
302
|
dots: !1,
|
|
303
303
|
indexes: !1
|
|
304
|
-
}, !1, function(
|
|
305
|
-
return !a.isUndefined(w[
|
|
304
|
+
}, !1, function(h, w) {
|
|
305
|
+
return !a.isUndefined(w[h]);
|
|
306
306
|
});
|
|
307
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
307
|
+
const r = n.metaTokens, s = n.visitor || f, o = n.dots, i = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
308
308
|
if (!a.isFunction(s))
|
|
309
309
|
throw new TypeError("visitor must be a function");
|
|
310
|
-
function
|
|
311
|
-
if (
|
|
310
|
+
function p(d) {
|
|
311
|
+
if (d === null)
|
|
312
312
|
return "";
|
|
313
|
-
if (a.isDate(
|
|
314
|
-
return
|
|
315
|
-
if (!
|
|
313
|
+
if (a.isDate(d))
|
|
314
|
+
return d.toISOString();
|
|
315
|
+
if (!l && a.isBlob(d))
|
|
316
316
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
317
|
-
return a.isArrayBuffer(
|
|
318
|
-
}
|
|
319
|
-
function
|
|
320
|
-
let E =
|
|
321
|
-
if (
|
|
322
|
-
if (a.endsWith(
|
|
323
|
-
|
|
324
|
-
else if (a.isArray(
|
|
325
|
-
return
|
|
317
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? l && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
318
|
+
}
|
|
319
|
+
function f(d, h, w) {
|
|
320
|
+
let E = d;
|
|
321
|
+
if (d && !w && typeof d == "object") {
|
|
322
|
+
if (a.endsWith(h, "{}"))
|
|
323
|
+
h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
324
|
+
else if (a.isArray(d) && Jt(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (E = a.toArray(d)))
|
|
325
|
+
return h = Je(h), E.forEach(function(_, ct) {
|
|
326
326
|
!(a.isUndefined(_) || _ === null) && t.append(
|
|
327
327
|
// eslint-disable-next-line no-nested-ternary
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
i === !0 ? Se([h], ct, o) : i === null ? h : h + "[]",
|
|
329
|
+
p(_)
|
|
330
330
|
);
|
|
331
331
|
}), !1;
|
|
332
332
|
}
|
|
333
|
-
return oe(
|
|
333
|
+
return oe(d) ? !0 : (t.append(Se(w, h, o), p(d)), !1);
|
|
334
334
|
}
|
|
335
335
|
const u = [], g = Object.assign(Mt, {
|
|
336
|
-
defaultVisitor:
|
|
337
|
-
convertValue:
|
|
336
|
+
defaultVisitor: f,
|
|
337
|
+
convertValue: p,
|
|
338
338
|
isVisitable: oe
|
|
339
339
|
});
|
|
340
|
-
function S(
|
|
341
|
-
if (!a.isUndefined(
|
|
342
|
-
if (u.indexOf(
|
|
343
|
-
throw Error("Circular reference detected in " +
|
|
344
|
-
u.push(
|
|
340
|
+
function S(d, h) {
|
|
341
|
+
if (!a.isUndefined(d)) {
|
|
342
|
+
if (u.indexOf(d) !== -1)
|
|
343
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
344
|
+
u.push(d), a.forEach(d, function(E, P) {
|
|
345
345
|
(!(a.isUndefined(E) || E === null) && s.call(
|
|
346
346
|
t,
|
|
347
347
|
E,
|
|
348
348
|
a.isString(P) ? P.trim() : P,
|
|
349
|
-
|
|
349
|
+
h,
|
|
350
350
|
g
|
|
351
|
-
)) === !0 && S(E,
|
|
351
|
+
)) === !0 && S(E, h ? h.concat(P) : [P]);
|
|
352
352
|
}), u.pop();
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -392,10 +392,10 @@ function We(e, t, n) {
|
|
|
392
392
|
if (!t)
|
|
393
393
|
return e;
|
|
394
394
|
const r = n && n.encode || Wt, s = n && n.serialize;
|
|
395
|
-
let
|
|
396
|
-
if (s ?
|
|
397
|
-
const
|
|
398
|
-
|
|
395
|
+
let o;
|
|
396
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), o) {
|
|
397
|
+
const i = e.indexOf("#");
|
|
398
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
399
399
|
}
|
|
400
400
|
return e;
|
|
401
401
|
}
|
|
@@ -477,8 +477,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
|
477
477
|
};
|
|
478
478
|
function rn(e, t) {
|
|
479
479
|
return X(e, new R.classes.URLSearchParams(), Object.assign({
|
|
480
|
-
visitor: function(n, r, s,
|
|
481
|
-
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
480
|
+
visitor: function(n, r, s, o) {
|
|
481
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
482
482
|
}
|
|
483
483
|
}, t));
|
|
484
484
|
}
|
|
@@ -489,16 +489,16 @@ function on(e) {
|
|
|
489
489
|
const t = {}, n = Object.keys(e);
|
|
490
490
|
let r;
|
|
491
491
|
const s = n.length;
|
|
492
|
-
let
|
|
492
|
+
let o;
|
|
493
493
|
for (r = 0; r < s; r++)
|
|
494
|
-
|
|
494
|
+
o = n[r], t[o] = e[o];
|
|
495
495
|
return t;
|
|
496
496
|
}
|
|
497
497
|
function Ye(e) {
|
|
498
|
-
function t(n, r, s,
|
|
499
|
-
let
|
|
500
|
-
const c = Number.isFinite(+
|
|
501
|
-
return
|
|
498
|
+
function t(n, r, s, o) {
|
|
499
|
+
let i = n[o++];
|
|
500
|
+
const c = Number.isFinite(+i), l = o >= n.length;
|
|
501
|
+
return i = !i && a.isArray(s) ? s.length : i, l ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = on(s[i])), !c);
|
|
502
502
|
}
|
|
503
503
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
504
|
const n = {};
|
|
@@ -522,8 +522,8 @@ const de = {
|
|
|
522
522
|
transitional: Ge,
|
|
523
523
|
adapter: ["xhr", "http"],
|
|
524
524
|
transformRequest: [function(t, n) {
|
|
525
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1,
|
|
526
|
-
if (
|
|
525
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
526
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
527
527
|
return s && s ? JSON.stringify(Ye(t)) : t;
|
|
528
528
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
529
529
|
return t;
|
|
@@ -532,28 +532,28 @@ const de = {
|
|
|
532
532
|
if (a.isURLSearchParams(t))
|
|
533
533
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
534
534
|
let c;
|
|
535
|
-
if (
|
|
535
|
+
if (o) {
|
|
536
536
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
537
|
return rn(t, this.formSerializer).toString();
|
|
538
538
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
|
-
const
|
|
539
|
+
const l = this.env && this.env.FormData;
|
|
540
540
|
return X(
|
|
541
541
|
c ? { "files[]": t } : t,
|
|
542
|
-
|
|
542
|
+
l && new l(),
|
|
543
543
|
this.formSerializer
|
|
544
544
|
);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
return
|
|
547
|
+
return o || s ? (n.setContentType("application/json", !1), an(t)) : t;
|
|
548
548
|
}],
|
|
549
549
|
transformResponse: [function(t) {
|
|
550
550
|
const n = this.transitional || de.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
551
551
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
552
|
-
const
|
|
552
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
553
553
|
try {
|
|
554
554
|
return JSON.parse(t);
|
|
555
555
|
} catch (c) {
|
|
556
|
-
if (
|
|
556
|
+
if (i)
|
|
557
557
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
558
558
|
}
|
|
559
559
|
}
|
|
@@ -585,7 +585,7 @@ const de = {
|
|
|
585
585
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
586
|
de.headers[e] = {};
|
|
587
587
|
});
|
|
588
|
-
const
|
|
588
|
+
const he = de, cn = a.toObjectSet([
|
|
589
589
|
"age",
|
|
590
590
|
"authorization",
|
|
591
591
|
"content-length",
|
|
@@ -607,8 +607,8 @@ const pe = de, cn = a.toObjectSet([
|
|
|
607
607
|
const t = {};
|
|
608
608
|
let n, r, s;
|
|
609
609
|
return e && e.split(`
|
|
610
|
-
`).forEach(function(
|
|
611
|
-
s =
|
|
610
|
+
`).forEach(function(i) {
|
|
611
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && cn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
612
|
}), t;
|
|
613
613
|
}, Re = Symbol("internals");
|
|
614
614
|
function k(e) {
|
|
@@ -638,12 +638,12 @@ function te(e, t, n, r, s) {
|
|
|
638
638
|
function dn(e) {
|
|
639
639
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function hn(e, t) {
|
|
642
642
|
const n = a.toCamelCase(" " + t);
|
|
643
643
|
["get", "set", "has"].forEach((r) => {
|
|
644
644
|
Object.defineProperty(e, r + n, {
|
|
645
|
-
value: function(s,
|
|
646
|
-
return this[r].call(this, t, s,
|
|
645
|
+
value: function(s, o, i) {
|
|
646
|
+
return this[r].call(this, t, s, o, i);
|
|
647
647
|
},
|
|
648
648
|
configurable: !0
|
|
649
649
|
});
|
|
@@ -655,15 +655,15 @@ let Y = class {
|
|
|
655
655
|
}
|
|
656
656
|
set(t, n, r) {
|
|
657
657
|
const s = this;
|
|
658
|
-
function
|
|
659
|
-
const
|
|
660
|
-
if (!
|
|
658
|
+
function o(c, l, p) {
|
|
659
|
+
const f = k(l);
|
|
660
|
+
if (!f)
|
|
661
661
|
throw new Error("header name must be a non-empty string");
|
|
662
|
-
const u = a.findKey(s,
|
|
663
|
-
(!u || s[u] === void 0 ||
|
|
662
|
+
const u = a.findKey(s, f);
|
|
663
|
+
(!u || s[u] === void 0 || p === !0 || p === void 0 && s[u] !== !1) && (s[u || l] = V(c));
|
|
664
664
|
}
|
|
665
|
-
const
|
|
666
|
-
return a.isPlainObject(t) || t instanceof this.constructor ?
|
|
665
|
+
const i = (c, l) => a.forEach(c, (p, f) => o(p, f, l));
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !fn(t) ? i(un(t), n) : t != null && o(n, t, r), this;
|
|
667
667
|
}
|
|
668
668
|
get(t, n) {
|
|
669
669
|
if (t = k(t), t) {
|
|
@@ -692,33 +692,33 @@ let Y = class {
|
|
|
692
692
|
delete(t, n) {
|
|
693
693
|
const r = this;
|
|
694
694
|
let s = !1;
|
|
695
|
-
function i
|
|
696
|
-
if (
|
|
697
|
-
const c = a.findKey(r,
|
|
695
|
+
function o(i) {
|
|
696
|
+
if (i = k(i), i) {
|
|
697
|
+
const c = a.findKey(r, i);
|
|
698
698
|
c && (!n || te(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
return a.isArray(t) ? t.forEach(
|
|
701
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
702
702
|
}
|
|
703
703
|
clear(t) {
|
|
704
704
|
const n = Object.keys(this);
|
|
705
705
|
let r = n.length, s = !1;
|
|
706
706
|
for (; r--; ) {
|
|
707
|
-
const
|
|
708
|
-
(!t || te(this, this[
|
|
707
|
+
const o = n[r];
|
|
708
|
+
(!t || te(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
709
709
|
}
|
|
710
710
|
return s;
|
|
711
711
|
}
|
|
712
712
|
normalize(t) {
|
|
713
713
|
const n = this, r = {};
|
|
714
|
-
return a.forEach(this, (s,
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
717
|
-
n[
|
|
714
|
+
return a.forEach(this, (s, o) => {
|
|
715
|
+
const i = a.findKey(r, o);
|
|
716
|
+
if (i) {
|
|
717
|
+
n[i] = V(s), delete n[o];
|
|
718
718
|
return;
|
|
719
719
|
}
|
|
720
|
-
const c = t ? dn(
|
|
721
|
-
c !==
|
|
720
|
+
const c = t ? dn(o) : String(o).trim();
|
|
721
|
+
c !== o && delete n[o], n[c] = V(s), r[c] = !0;
|
|
722
722
|
}), this;
|
|
723
723
|
}
|
|
724
724
|
concat(...t) {
|
|
@@ -751,11 +751,11 @@ let Y = class {
|
|
|
751
751
|
const r = (this[Re] = this[Re] = {
|
|
752
752
|
accessors: {}
|
|
753
753
|
}).accessors, s = this.prototype;
|
|
754
|
-
function i
|
|
755
|
-
const c = k(
|
|
756
|
-
r[c] || (
|
|
754
|
+
function o(i) {
|
|
755
|
+
const c = k(i);
|
|
756
|
+
r[c] || (hn(s, i), r[c] = !0);
|
|
757
757
|
}
|
|
758
|
-
return a.isArray(t) ? t.forEach(
|
|
758
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
759
759
|
}
|
|
760
760
|
};
|
|
761
761
|
Y.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -771,11 +771,11 @@ a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
|
771
771
|
a.freezeMethods(Y);
|
|
772
772
|
const T = Y;
|
|
773
773
|
function ne(e, t) {
|
|
774
|
-
const n = this ||
|
|
775
|
-
let
|
|
774
|
+
const n = this || he, r = t || n, s = T.from(r.headers);
|
|
775
|
+
let o = r.data;
|
|
776
776
|
return a.forEach(e, function(c) {
|
|
777
|
-
|
|
778
|
-
}), s.normalize(),
|
|
777
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
778
|
+
}), s.normalize(), o;
|
|
779
779
|
}
|
|
780
780
|
function Qe(e) {
|
|
781
781
|
return !!(e && e.__CANCEL__);
|
|
@@ -786,7 +786,7 @@ function q(e, t, n) {
|
|
|
786
786
|
a.inherits(q, m, {
|
|
787
787
|
__CANCEL__: !0
|
|
788
788
|
});
|
|
789
|
-
function
|
|
789
|
+
function pn(e, t, n) {
|
|
790
790
|
const r = n.config.validateStatus;
|
|
791
791
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
792
|
"Request failed with status code " + n.status,
|
|
@@ -799,9 +799,9 @@ function hn(e, t, n) {
|
|
|
799
799
|
const mn = R.hasStandardBrowserEnv ? (
|
|
800
800
|
// Standard browser envs support document.cookie
|
|
801
801
|
{
|
|
802
|
-
write(e, t, n, r, s,
|
|
803
|
-
const
|
|
804
|
-
a.isNumber(n) &&
|
|
802
|
+
write(e, t, n, r, s, o) {
|
|
803
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
804
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
805
805
|
},
|
|
806
806
|
read(e) {
|
|
807
807
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -838,9 +838,9 @@ const wn = R.hasStandardBrowserEnv ? (
|
|
|
838
838
|
function() {
|
|
839
839
|
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
840
840
|
let r;
|
|
841
|
-
function s(
|
|
842
|
-
let
|
|
843
|
-
return t && (n.setAttribute("href",
|
|
841
|
+
function s(o) {
|
|
842
|
+
let i = o;
|
|
843
|
+
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
844
844
|
href: n.href,
|
|
845
845
|
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
846
846
|
host: n.host,
|
|
@@ -851,8 +851,8 @@ const wn = R.hasStandardBrowserEnv ? (
|
|
|
851
851
|
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
852
852
|
};
|
|
853
853
|
}
|
|
854
|
-
return r = s(window.location.href), function(
|
|
855
|
-
const c = a.isString(
|
|
854
|
+
return r = s(window.location.href), function(i) {
|
|
855
|
+
const c = a.isString(i) ? s(i) : i;
|
|
856
856
|
return c.protocol === r.protocol && c.host === r.host;
|
|
857
857
|
};
|
|
858
858
|
}()
|
|
@@ -871,16 +871,16 @@ function bn(e) {
|
|
|
871
871
|
function En(e, t) {
|
|
872
872
|
e = e || 10;
|
|
873
873
|
const n = new Array(e), r = new Array(e);
|
|
874
|
-
let s = 0,
|
|
875
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
876
|
-
const
|
|
877
|
-
|
|
878
|
-
let u =
|
|
874
|
+
let s = 0, o = 0, i;
|
|
875
|
+
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
876
|
+
const p = Date.now(), f = r[o];
|
|
877
|
+
i || (i = p), n[s] = l, r[s] = p;
|
|
878
|
+
let u = o, g = 0;
|
|
879
879
|
for (; u !== s; )
|
|
880
880
|
g += n[u++], u = u % e;
|
|
881
|
-
if (s = (s + 1) % e, s ===
|
|
881
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), p - i < t)
|
|
882
882
|
return;
|
|
883
|
-
const S =
|
|
883
|
+
const S = f && p - f;
|
|
884
884
|
return S ? Math.round(g * 1e3 / S) : void 0;
|
|
885
885
|
};
|
|
886
886
|
}
|
|
@@ -888,61 +888,61 @@ function Oe(e, t) {
|
|
|
888
888
|
let n = 0;
|
|
889
889
|
const r = En(50, 250);
|
|
890
890
|
return (s) => {
|
|
891
|
-
const
|
|
892
|
-
n =
|
|
893
|
-
const
|
|
894
|
-
loaded:
|
|
895
|
-
total:
|
|
896
|
-
progress:
|
|
891
|
+
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, l = r(c), p = o <= i;
|
|
892
|
+
n = o;
|
|
893
|
+
const f = {
|
|
894
|
+
loaded: o,
|
|
895
|
+
total: i,
|
|
896
|
+
progress: i ? o / i : void 0,
|
|
897
897
|
bytes: c,
|
|
898
|
-
rate:
|
|
899
|
-
estimated:
|
|
898
|
+
rate: l || void 0,
|
|
899
|
+
estimated: l && i && p ? (i - o) / l : void 0,
|
|
900
900
|
event: s
|
|
901
901
|
};
|
|
902
|
-
|
|
902
|
+
f[t ? "download" : "upload"] = !0, e(f);
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
905
|
const Sn = typeof XMLHttpRequest < "u", Cn = Sn && function(e) {
|
|
906
906
|
return new Promise(function(n, r) {
|
|
907
907
|
let s = e.data;
|
|
908
|
-
const
|
|
909
|
-
let { responseType:
|
|
910
|
-
function
|
|
911
|
-
e.cancelToken && e.cancelToken.unsubscribe(
|
|
908
|
+
const o = T.from(e.headers).normalize();
|
|
909
|
+
let { responseType: i, withXSRFToken: c } = e, l;
|
|
910
|
+
function p() {
|
|
911
|
+
e.cancelToken && e.cancelToken.unsubscribe(l), e.signal && e.signal.removeEventListener("abort", l);
|
|
912
912
|
}
|
|
913
|
-
let
|
|
913
|
+
let f;
|
|
914
914
|
if (a.isFormData(s)) {
|
|
915
915
|
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
916
|
-
|
|
917
|
-
else if ((
|
|
918
|
-
const [
|
|
919
|
-
|
|
916
|
+
o.setContentType(!1);
|
|
917
|
+
else if ((f = o.getContentType()) !== !1) {
|
|
918
|
+
const [h, ...w] = f ? f.split(";").map((E) => E.trim()).filter(Boolean) : [];
|
|
919
|
+
o.setContentType([h || "multipart/form-data", ...w].join("; "));
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
let u = new XMLHttpRequest();
|
|
923
923
|
if (e.auth) {
|
|
924
|
-
const
|
|
925
|
-
|
|
924
|
+
const h = e.auth.username || "", w = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
925
|
+
o.set("Authorization", "Basic " + btoa(h + ":" + w));
|
|
926
926
|
}
|
|
927
927
|
const g = Ze(e.baseURL, e.url);
|
|
928
928
|
u.open(e.method.toUpperCase(), We(g, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
929
929
|
function S() {
|
|
930
930
|
if (!u)
|
|
931
931
|
return;
|
|
932
|
-
const
|
|
932
|
+
const h = T.from(
|
|
933
933
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
934
934
|
), E = {
|
|
935
|
-
data: !
|
|
935
|
+
data: !i || i === "text" || i === "json" ? u.responseText : u.response,
|
|
936
936
|
status: u.status,
|
|
937
937
|
statusText: u.statusText,
|
|
938
|
-
headers:
|
|
938
|
+
headers: h,
|
|
939
939
|
config: e,
|
|
940
940
|
request: u
|
|
941
941
|
};
|
|
942
|
-
|
|
943
|
-
n(_),
|
|
942
|
+
pn(function(_) {
|
|
943
|
+
n(_), p();
|
|
944
944
|
}, function(_) {
|
|
945
|
-
r(_),
|
|
945
|
+
r(_), p();
|
|
946
946
|
}, E), u = null;
|
|
947
947
|
}
|
|
948
948
|
if ("onloadend" in u ? u.onloadend = S : u.onreadystatechange = function() {
|
|
@@ -961,17 +961,17 @@ const Sn = typeof XMLHttpRequest < "u", Cn = Sn && function(e) {
|
|
|
961
961
|
u
|
|
962
962
|
)), u = null;
|
|
963
963
|
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && wn(g))) {
|
|
964
|
-
const
|
|
965
|
-
|
|
964
|
+
const h = e.xsrfHeaderName && e.xsrfCookieName && mn.read(e.xsrfCookieName);
|
|
965
|
+
h && o.set(e.xsrfHeaderName, h);
|
|
966
966
|
}
|
|
967
|
-
s === void 0 &&
|
|
967
|
+
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(w, E) {
|
|
968
968
|
u.setRequestHeader(E, w);
|
|
969
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials),
|
|
970
|
-
u && (r(!
|
|
971
|
-
}, e.cancelToken && e.cancelToken.subscribe(
|
|
972
|
-
const
|
|
973
|
-
if (
|
|
974
|
-
r(new m("Unsupported protocol " +
|
|
969
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Oe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Oe(e.onUploadProgress)), (e.cancelToken || e.signal) && (l = (h) => {
|
|
970
|
+
u && (r(!h || h.type ? new q(null, e, u) : h), u.abort(), u = null);
|
|
971
|
+
}, e.cancelToken && e.cancelToken.subscribe(l), e.signal && (e.signal.aborted ? l() : e.signal.addEventListener("abort", l)));
|
|
972
|
+
const d = bn(g);
|
|
973
|
+
if (d && R.protocols.indexOf(d) === -1) {
|
|
974
|
+
r(new m("Unsupported protocol " + d + ":", m.ERR_BAD_REQUEST, e));
|
|
975
975
|
return;
|
|
976
976
|
}
|
|
977
977
|
u.send(s || null);
|
|
@@ -995,24 +995,24 @@ const Te = (e) => `- ${e}`, An = (e) => a.isFunction(e) || e === null || e === !
|
|
|
995
995
|
const { length: t } = e;
|
|
996
996
|
let n, r;
|
|
997
997
|
const s = {};
|
|
998
|
-
for (let
|
|
999
|
-
n = e[
|
|
1000
|
-
let
|
|
1001
|
-
if (r = n, !An(n) && (r = ie[(
|
|
1002
|
-
throw new m(`Unknown adapter '${
|
|
998
|
+
for (let o = 0; o < t; o++) {
|
|
999
|
+
n = e[o];
|
|
1000
|
+
let i;
|
|
1001
|
+
if (r = n, !An(n) && (r = ie[(i = String(n)).toLowerCase()], r === void 0))
|
|
1002
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1003
1003
|
if (r)
|
|
1004
1004
|
break;
|
|
1005
|
-
s[
|
|
1005
|
+
s[i || "#" + o] = r;
|
|
1006
1006
|
}
|
|
1007
1007
|
if (!r) {
|
|
1008
|
-
const
|
|
1009
|
-
([c,
|
|
1008
|
+
const o = Object.entries(s).map(
|
|
1009
|
+
([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
1010
|
);
|
|
1011
|
-
let
|
|
1012
|
-
` +
|
|
1013
|
-
`) : " " + Te(
|
|
1011
|
+
let i = t ? o.length > 1 ? `since :
|
|
1012
|
+
` + o.map(Te).join(`
|
|
1013
|
+
`) : " " + Te(o[0]) : "as no adapter specified";
|
|
1014
1014
|
throw new m(
|
|
1015
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1015
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1016
1016
|
"ERR_NOT_SUPPORT"
|
|
1017
1017
|
);
|
|
1018
1018
|
}
|
|
@@ -1028,7 +1028,7 @@ function Pe(e) {
|
|
|
1028
1028
|
return re(e), e.headers = T.from(e.headers), e.data = ne.call(
|
|
1029
1029
|
e,
|
|
1030
1030
|
e.transformRequest
|
|
1031
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter ||
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || he.adapter)(e).then(function(r) {
|
|
1032
1032
|
return re(e), r.data = ne.call(
|
|
1033
1033
|
e,
|
|
1034
1034
|
e.transformResponse,
|
|
@@ -1046,92 +1046,92 @@ const _e = (e) => e instanceof T ? e.toJSON() : e;
|
|
|
1046
1046
|
function F(e, t) {
|
|
1047
1047
|
t = t || {};
|
|
1048
1048
|
const n = {};
|
|
1049
|
-
function r(
|
|
1050
|
-
return a.isPlainObject(
|
|
1049
|
+
function r(p, f, u) {
|
|
1050
|
+
return a.isPlainObject(p) && a.isPlainObject(f) ? a.merge.call({ caseless: u }, p, f) : a.isPlainObject(f) ? a.merge({}, f) : a.isArray(f) ? f.slice() : f;
|
|
1051
1051
|
}
|
|
1052
|
-
function s(
|
|
1053
|
-
if (a.isUndefined(
|
|
1054
|
-
if (!a.isUndefined(
|
|
1055
|
-
return r(void 0,
|
|
1052
|
+
function s(p, f, u) {
|
|
1053
|
+
if (a.isUndefined(f)) {
|
|
1054
|
+
if (!a.isUndefined(p))
|
|
1055
|
+
return r(void 0, p, u);
|
|
1056
1056
|
} else
|
|
1057
|
-
return r(
|
|
1057
|
+
return r(p, f, u);
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1060
|
-
if (!a.isUndefined(
|
|
1061
|
-
return r(void 0,
|
|
1059
|
+
function o(p, f) {
|
|
1060
|
+
if (!a.isUndefined(f))
|
|
1061
|
+
return r(void 0, f);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1064
|
-
if (a.isUndefined(
|
|
1065
|
-
if (!a.isUndefined(
|
|
1066
|
-
return r(void 0,
|
|
1063
|
+
function i(p, f) {
|
|
1064
|
+
if (a.isUndefined(f)) {
|
|
1065
|
+
if (!a.isUndefined(p))
|
|
1066
|
+
return r(void 0, p);
|
|
1067
1067
|
} else
|
|
1068
|
-
return r(void 0,
|
|
1068
|
+
return r(void 0, f);
|
|
1069
1069
|
}
|
|
1070
|
-
function c(
|
|
1070
|
+
function c(p, f, u) {
|
|
1071
1071
|
if (u in t)
|
|
1072
|
-
return r(
|
|
1072
|
+
return r(p, f);
|
|
1073
1073
|
if (u in e)
|
|
1074
|
-
return r(void 0,
|
|
1075
|
-
}
|
|
1076
|
-
const
|
|
1077
|
-
url:
|
|
1078
|
-
method:
|
|
1079
|
-
data:
|
|
1080
|
-
baseURL:
|
|
1081
|
-
transformRequest:
|
|
1082
|
-
transformResponse:
|
|
1083
|
-
paramsSerializer:
|
|
1084
|
-
timeout:
|
|
1085
|
-
timeoutMessage:
|
|
1086
|
-
withCredentials:
|
|
1087
|
-
withXSRFToken:
|
|
1088
|
-
adapter:
|
|
1089
|
-
responseType:
|
|
1090
|
-
xsrfCookieName:
|
|
1091
|
-
xsrfHeaderName:
|
|
1092
|
-
onUploadProgress:
|
|
1093
|
-
onDownloadProgress:
|
|
1094
|
-
decompress:
|
|
1095
|
-
maxContentLength:
|
|
1096
|
-
maxBodyLength:
|
|
1097
|
-
beforeRedirect:
|
|
1098
|
-
transport:
|
|
1099
|
-
httpAgent:
|
|
1100
|
-
httpsAgent:
|
|
1101
|
-
cancelToken:
|
|
1102
|
-
socketPath:
|
|
1103
|
-
responseEncoding:
|
|
1074
|
+
return r(void 0, p);
|
|
1075
|
+
}
|
|
1076
|
+
const l = {
|
|
1077
|
+
url: o,
|
|
1078
|
+
method: o,
|
|
1079
|
+
data: o,
|
|
1080
|
+
baseURL: i,
|
|
1081
|
+
transformRequest: i,
|
|
1082
|
+
transformResponse: i,
|
|
1083
|
+
paramsSerializer: i,
|
|
1084
|
+
timeout: i,
|
|
1085
|
+
timeoutMessage: i,
|
|
1086
|
+
withCredentials: i,
|
|
1087
|
+
withXSRFToken: i,
|
|
1088
|
+
adapter: i,
|
|
1089
|
+
responseType: i,
|
|
1090
|
+
xsrfCookieName: i,
|
|
1091
|
+
xsrfHeaderName: i,
|
|
1092
|
+
onUploadProgress: i,
|
|
1093
|
+
onDownloadProgress: i,
|
|
1094
|
+
decompress: i,
|
|
1095
|
+
maxContentLength: i,
|
|
1096
|
+
maxBodyLength: i,
|
|
1097
|
+
beforeRedirect: i,
|
|
1098
|
+
transport: i,
|
|
1099
|
+
httpAgent: i,
|
|
1100
|
+
httpsAgent: i,
|
|
1101
|
+
cancelToken: i,
|
|
1102
|
+
socketPath: i,
|
|
1103
|
+
responseEncoding: i,
|
|
1104
1104
|
validateStatus: c,
|
|
1105
|
-
headers: (
|
|
1105
|
+
headers: (p, f) => s(_e(p), _e(f), !0)
|
|
1106
1106
|
};
|
|
1107
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1108
|
-
const u =
|
|
1109
|
-
a.isUndefined(g) && u !== c || (n[
|
|
1107
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
1108
|
+
const u = l[f] || s, g = u(e[f], t[f], f);
|
|
1109
|
+
a.isUndefined(g) && u !== c || (n[f] = g);
|
|
1110
1110
|
}), n;
|
|
1111
1111
|
}
|
|
1112
|
-
const tt = "1.6.3",
|
|
1112
|
+
const tt = "1.6.3", pe = {};
|
|
1113
1113
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
|
-
|
|
1114
|
+
pe[e] = function(r) {
|
|
1115
1115
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
1116
|
};
|
|
1117
1117
|
});
|
|
1118
1118
|
const xe = {};
|
|
1119
|
-
|
|
1120
|
-
function s(
|
|
1121
|
-
return "[Axios v" + tt + "] Transitional option '" +
|
|
1119
|
+
pe.transitional = function(t, n, r) {
|
|
1120
|
+
function s(o, i) {
|
|
1121
|
+
return "[Axios v" + tt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1122
1122
|
}
|
|
1123
|
-
return (
|
|
1123
|
+
return (o, i, c) => {
|
|
1124
1124
|
if (t === !1)
|
|
1125
1125
|
throw new m(
|
|
1126
|
-
s(
|
|
1126
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1127
1127
|
m.ERR_DEPRECATED
|
|
1128
1128
|
);
|
|
1129
|
-
return n && !xe[
|
|
1129
|
+
return n && !xe[i] && (xe[i] = !0, console.warn(
|
|
1130
1130
|
s(
|
|
1131
|
-
|
|
1131
|
+
i,
|
|
1132
1132
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1133
1133
|
)
|
|
1134
|
-
)), t ? t(
|
|
1134
|
+
)), t ? t(o, i, c) : !0;
|
|
1135
1135
|
};
|
|
1136
1136
|
};
|
|
1137
1137
|
function Rn(e, t, n) {
|
|
@@ -1140,20 +1140,20 @@ function Rn(e, t, n) {
|
|
|
1140
1140
|
const r = Object.keys(e);
|
|
1141
1141
|
let s = r.length;
|
|
1142
1142
|
for (; s-- > 0; ) {
|
|
1143
|
-
const
|
|
1144
|
-
if (
|
|
1145
|
-
const c = e[
|
|
1146
|
-
if (
|
|
1147
|
-
throw new m("option " +
|
|
1143
|
+
const o = r[s], i = t[o];
|
|
1144
|
+
if (i) {
|
|
1145
|
+
const c = e[o], l = c === void 0 || i(c, o, e);
|
|
1146
|
+
if (l !== !0)
|
|
1147
|
+
throw new m("option " + o + " must be " + l, m.ERR_BAD_OPTION_VALUE);
|
|
1148
1148
|
continue;
|
|
1149
1149
|
}
|
|
1150
1150
|
if (n !== !0)
|
|
1151
|
-
throw new m("Unknown option " +
|
|
1151
|
+
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
const ae = {
|
|
1155
1155
|
assertOptions: Rn,
|
|
1156
|
-
validators:
|
|
1156
|
+
validators: pe
|
|
1157
1157
|
}, x = ae.validators;
|
|
1158
1158
|
let J = class {
|
|
1159
1159
|
constructor(t) {
|
|
@@ -1172,7 +1172,7 @@ let J = class {
|
|
|
1172
1172
|
*/
|
|
1173
1173
|
request(t, n) {
|
|
1174
1174
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1175
|
-
const { transitional: r, paramsSerializer: s, headers:
|
|
1175
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1176
1176
|
r !== void 0 && ae.assertOptions(r, {
|
|
1177
1177
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1178
1178
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
@@ -1183,51 +1183,51 @@ let J = class {
|
|
|
1183
1183
|
encode: x.function,
|
|
1184
1184
|
serialize: x.function
|
|
1185
1185
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1186
|
-
let
|
|
1187
|
-
|
|
1188
|
-
|
|
1186
|
+
let i = o && a.merge(
|
|
1187
|
+
o.common,
|
|
1188
|
+
o[n.method]
|
|
1189
1189
|
);
|
|
1190
|
-
|
|
1190
|
+
o && a.forEach(
|
|
1191
1191
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1192
|
-
(
|
|
1193
|
-
delete
|
|
1192
|
+
(d) => {
|
|
1193
|
+
delete o[d];
|
|
1194
1194
|
}
|
|
1195
|
-
), n.headers = T.concat(
|
|
1195
|
+
), n.headers = T.concat(i, o);
|
|
1196
1196
|
const c = [];
|
|
1197
|
-
let
|
|
1198
|
-
this.interceptors.request.forEach(function(
|
|
1199
|
-
typeof
|
|
1197
|
+
let l = !0;
|
|
1198
|
+
this.interceptors.request.forEach(function(h) {
|
|
1199
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (l = l && h.synchronous, c.unshift(h.fulfilled, h.rejected));
|
|
1200
1200
|
});
|
|
1201
|
-
const
|
|
1202
|
-
this.interceptors.response.forEach(function(
|
|
1203
|
-
|
|
1201
|
+
const p = [];
|
|
1202
|
+
this.interceptors.response.forEach(function(h) {
|
|
1203
|
+
p.push(h.fulfilled, h.rejected);
|
|
1204
1204
|
});
|
|
1205
|
-
let
|
|
1206
|
-
if (!
|
|
1207
|
-
const
|
|
1208
|
-
for (
|
|
1209
|
-
|
|
1210
|
-
return
|
|
1205
|
+
let f, u = 0, g;
|
|
1206
|
+
if (!l) {
|
|
1207
|
+
const d = [Pe.bind(this), void 0];
|
|
1208
|
+
for (d.unshift.apply(d, c), d.push.apply(d, p), g = d.length, f = Promise.resolve(n); u < g; )
|
|
1209
|
+
f = f.then(d[u++], d[u++]);
|
|
1210
|
+
return f;
|
|
1211
1211
|
}
|
|
1212
1212
|
g = c.length;
|
|
1213
1213
|
let S = n;
|
|
1214
1214
|
for (u = 0; u < g; ) {
|
|
1215
|
-
const
|
|
1215
|
+
const d = c[u++], h = c[u++];
|
|
1216
1216
|
try {
|
|
1217
|
-
S =
|
|
1217
|
+
S = d(S);
|
|
1218
1218
|
} catch (w) {
|
|
1219
|
-
|
|
1219
|
+
h.call(this, w);
|
|
1220
1220
|
break;
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
try {
|
|
1224
|
-
|
|
1225
|
-
} catch (
|
|
1226
|
-
return Promise.reject(
|
|
1224
|
+
f = Pe.call(this, S);
|
|
1225
|
+
} catch (d) {
|
|
1226
|
+
return Promise.reject(d);
|
|
1227
1227
|
}
|
|
1228
|
-
for (u = 0, g =
|
|
1229
|
-
|
|
1230
|
-
return
|
|
1228
|
+
for (u = 0, g = p.length; u < g; )
|
|
1229
|
+
f = f.then(p[u++], p[u++]);
|
|
1230
|
+
return f;
|
|
1231
1231
|
}
|
|
1232
1232
|
getUri(t) {
|
|
1233
1233
|
t = F(this.defaults, t);
|
|
@@ -1246,14 +1246,14 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1246
1246
|
});
|
|
1247
1247
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1248
1248
|
function n(r) {
|
|
1249
|
-
return function(
|
|
1249
|
+
return function(o, i, c) {
|
|
1250
1250
|
return this.request(F(c || {}, {
|
|
1251
1251
|
method: t,
|
|
1252
1252
|
headers: r ? {
|
|
1253
1253
|
"Content-Type": "multipart/form-data"
|
|
1254
1254
|
} : {},
|
|
1255
|
-
url:
|
|
1256
|
-
data:
|
|
1255
|
+
url: o,
|
|
1256
|
+
data: i
|
|
1257
1257
|
}));
|
|
1258
1258
|
};
|
|
1259
1259
|
}
|
|
@@ -1265,27 +1265,27 @@ let On = class nt {
|
|
|
1265
1265
|
if (typeof t != "function")
|
|
1266
1266
|
throw new TypeError("executor must be a function.");
|
|
1267
1267
|
let n;
|
|
1268
|
-
this.promise = new Promise(function(
|
|
1269
|
-
n =
|
|
1268
|
+
this.promise = new Promise(function(o) {
|
|
1269
|
+
n = o;
|
|
1270
1270
|
});
|
|
1271
1271
|
const r = this;
|
|
1272
1272
|
this.promise.then((s) => {
|
|
1273
1273
|
if (!r._listeners)
|
|
1274
1274
|
return;
|
|
1275
|
-
let
|
|
1276
|
-
for (;
|
|
1277
|
-
r._listeners[
|
|
1275
|
+
let o = r._listeners.length;
|
|
1276
|
+
for (; o-- > 0; )
|
|
1277
|
+
r._listeners[o](s);
|
|
1278
1278
|
r._listeners = null;
|
|
1279
1279
|
}), this.promise.then = (s) => {
|
|
1280
|
-
let
|
|
1281
|
-
const
|
|
1282
|
-
r.subscribe(c),
|
|
1280
|
+
let o;
|
|
1281
|
+
const i = new Promise((c) => {
|
|
1282
|
+
r.subscribe(c), o = c;
|
|
1283
1283
|
}).then(s);
|
|
1284
|
-
return
|
|
1285
|
-
r.unsubscribe(
|
|
1286
|
-
},
|
|
1287
|
-
}, t(function(
|
|
1288
|
-
r.reason || (r.reason = new q(
|
|
1284
|
+
return i.cancel = function() {
|
|
1285
|
+
r.unsubscribe(o);
|
|
1286
|
+
}, i;
|
|
1287
|
+
}, t(function(o, i, c) {
|
|
1288
|
+
r.reason || (r.reason = new q(o, i, c), n(r.reason));
|
|
1289
1289
|
});
|
|
1290
1290
|
}
|
|
1291
1291
|
/**
|
|
@@ -1412,7 +1412,7 @@ function rt(e) {
|
|
|
1412
1412
|
return rt(F(e, s));
|
|
1413
1413
|
}, n;
|
|
1414
1414
|
}
|
|
1415
|
-
const y = rt(
|
|
1415
|
+
const y = rt(he);
|
|
1416
1416
|
y.Axios = K;
|
|
1417
1417
|
y.CanceledError = q;
|
|
1418
1418
|
y.CancelToken = Tn;
|
|
@@ -1482,43 +1482,45 @@ class Nn {
|
|
|
1482
1482
|
b(this, "_debug");
|
|
1483
1483
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1484
1484
|
}
|
|
1485
|
-
async create(t, n, r) {
|
|
1486
|
-
var
|
|
1485
|
+
async create(t, n, r, s) {
|
|
1486
|
+
var o;
|
|
1487
1487
|
try {
|
|
1488
1488
|
await this.httpClient.post("/affiliates", {
|
|
1489
1489
|
address: t,
|
|
1490
1490
|
name: n,
|
|
1491
1491
|
code: n,
|
|
1492
|
-
signature: r
|
|
1492
|
+
signature: r,
|
|
1493
|
+
account_chain_id: s
|
|
1493
1494
|
});
|
|
1494
1495
|
} catch (i) {
|
|
1495
1496
|
if (i instanceof H) {
|
|
1496
|
-
const
|
|
1497
|
-
if (typeof (
|
|
1498
|
-
const
|
|
1499
|
-
throw
|
|
1500
|
-
} else if ((
|
|
1501
|
-
throw new Ne(
|
|
1497
|
+
const c = (o = i.response) == null ? void 0 : o.data;
|
|
1498
|
+
if (typeof (c == null ? void 0 : c.message) == "string") {
|
|
1499
|
+
const l = c.message.toLowerCase();
|
|
1500
|
+
throw l == "invalid signature" ? new Le() : l == "address in use" ? new Ue(t) : l == "code in use" ? new Fe(n) : new Error(l);
|
|
1501
|
+
} else if ((c == null ? void 0 : c.message) instanceof Array)
|
|
1502
|
+
throw new Ne(c.message);
|
|
1502
1503
|
}
|
|
1503
1504
|
throw i;
|
|
1504
1505
|
}
|
|
1505
1506
|
}
|
|
1506
|
-
async update(t, n, r) {
|
|
1507
|
-
var
|
|
1507
|
+
async update(t, n, r, s) {
|
|
1508
|
+
var o;
|
|
1508
1509
|
try {
|
|
1509
1510
|
await this.httpClient.post(`/affiliates/${t}`, {
|
|
1510
1511
|
code: n,
|
|
1511
1512
|
address: t,
|
|
1512
|
-
signature: r
|
|
1513
|
+
signature: r,
|
|
1514
|
+
account_chain_id: s
|
|
1513
1515
|
});
|
|
1514
1516
|
} catch (i) {
|
|
1515
1517
|
if (i instanceof H) {
|
|
1516
|
-
const
|
|
1517
|
-
if (typeof (
|
|
1518
|
-
const
|
|
1519
|
-
throw
|
|
1520
|
-
} else if ((
|
|
1521
|
-
throw new Ne(
|
|
1518
|
+
const c = (o = i.response) == null ? void 0 : o.data;
|
|
1519
|
+
if (typeof (c == null ? void 0 : c.message) == "string") {
|
|
1520
|
+
const l = c.message.toLowerCase();
|
|
1521
|
+
throw l == "invalid signature" ? new Le() : l == "address in use" ? new Ue(t) : l == "code in use" ? new Fe(n) : new Error(l);
|
|
1522
|
+
} else if ((c == null ? void 0 : c.message) instanceof Array)
|
|
1523
|
+
throw new Ne(c.message);
|
|
1522
1524
|
}
|
|
1523
1525
|
throw i;
|
|
1524
1526
|
}
|
|
@@ -1586,10 +1588,10 @@ class Bn {
|
|
|
1586
1588
|
const s = JSON.parse(r);
|
|
1587
1589
|
if (this.getCurrentTimestamp() - s.timestamp > Dn)
|
|
1588
1590
|
return !1;
|
|
1591
|
+
let l = !1;
|
|
1592
|
+
t.metadata && (l = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
1589
1593
|
let p = !1;
|
|
1590
|
-
|
|
1591
|
-
let h = !1;
|
|
1592
|
-
return t.args && s.args && (h = s.args.page === t.args.page), h && p;
|
|
1594
|
+
return t.args && s.args && (p = s.args.page === t.args.page), p && l;
|
|
1593
1595
|
}
|
|
1594
1596
|
getCurrentTimestamp() {
|
|
1595
1597
|
return Date.now() / 1e3;
|
|
@@ -1599,7 +1601,7 @@ class Bn {
|
|
|
1599
1601
|
localStorage.setItem(n, JSON.stringify(s));
|
|
1600
1602
|
}
|
|
1601
1603
|
}
|
|
1602
|
-
const In = "4.
|
|
1604
|
+
const In = "4.11.0", kn = {
|
|
1603
1605
|
version: In
|
|
1604
1606
|
};
|
|
1605
1607
|
class jn {
|
|
@@ -1749,11 +1751,11 @@ async function nr(e) {
|
|
|
1749
1751
|
};
|
|
1750
1752
|
e != null && e.address && (t.user_address = e.address), e != null && e.signature && (t.signature = e == null ? void 0 : e.signature, t.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (t.account_chain_id = e.accountChainId), await Q.sendEvent(t);
|
|
1751
1753
|
}
|
|
1752
|
-
async function rr(e
|
|
1753
|
-
A(), await B.create(e,
|
|
1754
|
+
async function rr(e) {
|
|
1755
|
+
A(), await B.create(e.address, e.code, e.signature, e.accountChainId);
|
|
1754
1756
|
}
|
|
1755
|
-
async function sr(e
|
|
1756
|
-
A(), await B.update(e,
|
|
1757
|
+
async function sr(e) {
|
|
1758
|
+
A(), await B.update(e.address, e.code, e.signature, e.accountChainId);
|
|
1757
1759
|
}
|
|
1758
1760
|
async function or(e) {
|
|
1759
1761
|
return A(), await B.getCode(e);
|
|
@@ -1783,10 +1785,10 @@ function fr(e) {
|
|
|
1783
1785
|
function dr(e) {
|
|
1784
1786
|
return I.getUserPayoutsByConversion(e);
|
|
1785
1787
|
}
|
|
1786
|
-
function
|
|
1788
|
+
function hr(e) {
|
|
1787
1789
|
return I.getUserPointsByConversion(e);
|
|
1788
1790
|
}
|
|
1789
|
-
function
|
|
1791
|
+
function pr(e) {
|
|
1790
1792
|
return I.getUserPayoutMovements(e);
|
|
1791
1793
|
}
|
|
1792
1794
|
function mr(e) {
|
|
@@ -1837,9 +1839,9 @@ const vr = {
|
|
|
1837
1839
|
getReferredUsersLeaderboard: lr,
|
|
1838
1840
|
getUserAudiences: wr,
|
|
1839
1841
|
getUserPayoutsByConversion: dr,
|
|
1840
|
-
getUserPointsByConversion:
|
|
1842
|
+
getUserPointsByConversion: hr,
|
|
1841
1843
|
getUserPointsMovements: mr,
|
|
1842
|
-
getUserPayoutMovements:
|
|
1844
|
+
getUserPayoutMovements: pr,
|
|
1843
1845
|
getUserAffiliates: gr,
|
|
1844
1846
|
getVolumeLeaderboard: fr
|
|
1845
1847
|
};
|