@fuul/sdk 7.14.0 → 7.16.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.map +1 -1
- package/dist/affiliate-portal/types/index.d.ts +6 -0
- package/dist/affiliate-portal/types/index.d.ts.map +1 -1
- package/dist/index.mjs +994 -915
- package/dist/index.umd.js +6 -6
- package/dist/release.json.d.ts +1 -1
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -1,75 +1,81 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
5
|
-
class
|
|
1
|
+
var Vt = Object.defineProperty;
|
|
2
|
+
var Kt = (t, e, r) => e in t ? Vt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var b = (t, e, r) => Kt(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
const ze = "/affiliate-portal";
|
|
5
|
+
class zt {
|
|
6
6
|
constructor(e) {
|
|
7
|
-
|
|
7
|
+
b(this, "httpClient");
|
|
8
8
|
this.httpClient = e.httpClient;
|
|
9
9
|
}
|
|
10
10
|
async getAffiliateStats(e) {
|
|
11
11
|
return (await this.httpClient.get({
|
|
12
|
-
path: `${
|
|
12
|
+
path: `${ze}/stats`,
|
|
13
13
|
queryParams: {
|
|
14
|
-
user_identifier: e.user_identifier
|
|
14
|
+
user_identifier: e.user_identifier,
|
|
15
|
+
from: e.from,
|
|
16
|
+
to: e.to,
|
|
17
|
+
this_month: e.this_month,
|
|
18
|
+
conversion_id: e.conversion_id,
|
|
19
|
+
conversion_name: e.conversion_name
|
|
15
20
|
}
|
|
16
21
|
})).data;
|
|
17
22
|
}
|
|
18
23
|
async getAffiliateNewTraders(e) {
|
|
19
24
|
return (await this.httpClient.get({
|
|
20
|
-
path: `${
|
|
25
|
+
path: `${ze}/new-traders`,
|
|
21
26
|
queryParams: {
|
|
22
27
|
user_identifier: e.user_identifier,
|
|
23
28
|
from: e.from,
|
|
24
|
-
to: e.to
|
|
29
|
+
to: e.to,
|
|
30
|
+
this_month: e.this_month
|
|
25
31
|
}
|
|
26
32
|
})).data;
|
|
27
33
|
}
|
|
28
34
|
}
|
|
29
|
-
function
|
|
35
|
+
function gt(t, e) {
|
|
30
36
|
return function() {
|
|
31
37
|
return t.apply(e, arguments);
|
|
32
38
|
};
|
|
33
39
|
}
|
|
34
|
-
const { toString:
|
|
35
|
-
const r =
|
|
40
|
+
const { toString: Jt } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator: he, toStringTag: wt } = Symbol, pe = /* @__PURE__ */ ((t) => (e) => {
|
|
41
|
+
const r = Jt.call(e);
|
|
36
42
|
return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
|
|
37
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
38
|
-
function
|
|
39
|
-
return t !== null && !
|
|
43
|
+
})(/* @__PURE__ */ Object.create(null)), D = (t) => (t = t.toLowerCase(), (e) => pe(e) === t), me = (t) => (e) => typeof e === t, { isArray: Q } = Array, J = me("undefined");
|
|
44
|
+
function ee(t) {
|
|
45
|
+
return t !== null && !J(t) && t.constructor !== null && !J(t.constructor) && T(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
40
46
|
}
|
|
41
|
-
const
|
|
42
|
-
function
|
|
47
|
+
const bt = D("ArrayBuffer");
|
|
48
|
+
function Wt(t) {
|
|
43
49
|
let e;
|
|
44
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
50
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && bt(t.buffer), e;
|
|
45
51
|
}
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
52
|
+
const Qt = me("string"), T = me("function"), _t = me("number"), te = (t) => t !== null && typeof t == "object", Xt = (t) => t === !0 || t === !1, ue = (t) => {
|
|
53
|
+
if (pe(t) !== "object")
|
|
48
54
|
return !1;
|
|
49
|
-
const e =
|
|
50
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
51
|
-
},
|
|
52
|
-
if (!
|
|
55
|
+
const e = xe(t);
|
|
56
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(wt in t) && !(he in t);
|
|
57
|
+
}, Yt = (t) => {
|
|
58
|
+
if (!te(t) || ee(t))
|
|
53
59
|
return !1;
|
|
54
60
|
try {
|
|
55
61
|
return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
|
|
56
62
|
} catch {
|
|
57
63
|
return !1;
|
|
58
64
|
}
|
|
59
|
-
},
|
|
65
|
+
}, Gt = D("Date"), Zt = D("File"), er = D("Blob"), tr = D("FileList"), rr = (t) => te(t) && T(t.pipe), nr = (t) => {
|
|
60
66
|
let e;
|
|
61
|
-
return t && (typeof FormData == "function" && t instanceof FormData ||
|
|
62
|
-
e === "object" &&
|
|
63
|
-
},
|
|
64
|
-
function
|
|
67
|
+
return t && (typeof FormData == "function" && t instanceof FormData || T(t.append) && ((e = pe(t)) === "formdata" || // detect form-data instance
|
|
68
|
+
e === "object" && T(t.toString) && t.toString() === "[object FormData]"));
|
|
69
|
+
}, sr = D("URLSearchParams"), [ir, or, ar, cr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), ur = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
70
|
+
function re(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
65
71
|
if (t === null || typeof t > "u")
|
|
66
72
|
return;
|
|
67
73
|
let n, s;
|
|
68
|
-
if (typeof t != "object" && (t = [t]),
|
|
74
|
+
if (typeof t != "object" && (t = [t]), Q(t))
|
|
69
75
|
for (n = 0, s = t.length; n < s; n++)
|
|
70
76
|
e.call(null, t[n], n, t);
|
|
71
77
|
else {
|
|
72
|
-
if (
|
|
78
|
+
if (ee(t))
|
|
73
79
|
return;
|
|
74
80
|
const i = r ? Object.getOwnPropertyNames(t) : Object.keys(t), o = i.length;
|
|
75
81
|
let c;
|
|
@@ -77,8 +83,8 @@ function Y(t, e, { allOwnKeys: r = !1 } = {}) {
|
|
|
77
83
|
c = i[n], e.call(null, t[c], c, t);
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
|
-
function
|
|
81
|
-
if (
|
|
86
|
+
function Et(t, e) {
|
|
87
|
+
if (ee(t))
|
|
82
88
|
return null;
|
|
83
89
|
e = e.toLowerCase();
|
|
84
90
|
const r = Object.keys(t);
|
|
@@ -88,75 +94,90 @@ function it(t, e) {
|
|
|
88
94
|
return s;
|
|
89
95
|
return null;
|
|
90
96
|
}
|
|
91
|
-
const
|
|
92
|
-
function
|
|
93
|
-
const { caseless: t } =
|
|
94
|
-
const
|
|
95
|
-
|
|
97
|
+
const $ = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ct = (t) => !J(t) && t !== $;
|
|
98
|
+
function Ae() {
|
|
99
|
+
const { caseless: t, skipUndefined: e } = Ct(this) && this || {}, r = {}, n = (s, i) => {
|
|
100
|
+
const o = t && Et(r, i) || i;
|
|
101
|
+
ue(r[o]) && ue(s) ? r[o] = Ae(r[o], s) : ue(s) ? r[o] = Ae({}, s) : Q(s) ? r[o] = s.slice() : (!e || !J(s)) && (r[o] = s);
|
|
96
102
|
};
|
|
97
|
-
for (let
|
|
98
|
-
arguments[
|
|
99
|
-
return
|
|
103
|
+
for (let s = 0, i = arguments.length; s < i; s++)
|
|
104
|
+
arguments[s] && re(arguments[s], n);
|
|
105
|
+
return r;
|
|
100
106
|
}
|
|
101
|
-
const
|
|
102
|
-
r &&
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
const lr = (t, e, r, { allOwnKeys: n } = {}) => (re(e, (s, i) => {
|
|
108
|
+
r && T(s) ? Object.defineProperty(t, i, {
|
|
109
|
+
value: gt(s, r),
|
|
110
|
+
writable: !0,
|
|
111
|
+
enumerable: !0,
|
|
112
|
+
configurable: !0
|
|
113
|
+
}) : Object.defineProperty(t, i, {
|
|
114
|
+
value: s,
|
|
115
|
+
writable: !0,
|
|
116
|
+
enumerable: !0,
|
|
117
|
+
configurable: !0
|
|
118
|
+
});
|
|
119
|
+
}, { allOwnKeys: n }), t), dr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), fr = (t, e, r, n) => {
|
|
120
|
+
t.prototype = Object.create(e.prototype, n), Object.defineProperty(t.prototype, "constructor", {
|
|
121
|
+
value: t,
|
|
122
|
+
writable: !0,
|
|
123
|
+
enumerable: !1,
|
|
124
|
+
configurable: !0
|
|
125
|
+
}), Object.defineProperty(t, "super", {
|
|
105
126
|
value: e.prototype
|
|
106
127
|
}), r && Object.assign(t.prototype, r);
|
|
107
|
-
},
|
|
128
|
+
}, hr = (t, e, r, n) => {
|
|
108
129
|
let s, i, o;
|
|
109
130
|
const c = {};
|
|
110
131
|
if (e = e || {}, t == null) return e;
|
|
111
132
|
do {
|
|
112
133
|
for (s = Object.getOwnPropertyNames(t), i = s.length; i-- > 0; )
|
|
113
134
|
o = s[i], (!n || n(o, t, e)) && !c[o] && (e[o] = t[o], c[o] = !0);
|
|
114
|
-
t = r !== !1 &&
|
|
135
|
+
t = r !== !1 && xe(t);
|
|
115
136
|
} while (t && (!r || r(t, e)) && t !== Object.prototype);
|
|
116
137
|
return e;
|
|
117
|
-
},
|
|
138
|
+
}, pr = (t, e, r) => {
|
|
118
139
|
t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
|
|
119
140
|
const n = t.indexOf(e, r);
|
|
120
141
|
return n !== -1 && n === r;
|
|
121
|
-
},
|
|
142
|
+
}, mr = (t) => {
|
|
122
143
|
if (!t) return null;
|
|
123
|
-
if (
|
|
144
|
+
if (Q(t)) return t;
|
|
124
145
|
let e = t.length;
|
|
125
|
-
if (!
|
|
146
|
+
if (!_t(e)) return null;
|
|
126
147
|
const r = new Array(e);
|
|
127
148
|
for (; e-- > 0; )
|
|
128
149
|
r[e] = t[e];
|
|
129
150
|
return r;
|
|
130
|
-
},
|
|
131
|
-
const n = (t && t[
|
|
151
|
+
}, yr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && xe(Uint8Array)), gr = (t, e) => {
|
|
152
|
+
const n = (t && t[he]).call(t);
|
|
132
153
|
let s;
|
|
133
154
|
for (; (s = n.next()) && !s.done; ) {
|
|
134
155
|
const i = s.value;
|
|
135
156
|
e.call(t, i[0], i[1]);
|
|
136
157
|
}
|
|
137
|
-
},
|
|
158
|
+
}, wr = (t, e) => {
|
|
138
159
|
let r;
|
|
139
160
|
const n = [];
|
|
140
161
|
for (; (r = t.exec(e)) !== null; )
|
|
141
162
|
n.push(r);
|
|
142
163
|
return n;
|
|
143
|
-
},
|
|
164
|
+
}, br = D("HTMLFormElement"), _r = (t) => t.toLowerCase().replace(
|
|
144
165
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
145
166
|
function(r, n, s) {
|
|
146
167
|
return n.toUpperCase() + s;
|
|
147
168
|
}
|
|
148
|
-
),
|
|
169
|
+
), Je = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), Er = D("RegExp"), St = (t, e) => {
|
|
149
170
|
const r = Object.getOwnPropertyDescriptors(t), n = {};
|
|
150
|
-
|
|
171
|
+
re(r, (s, i) => {
|
|
151
172
|
let o;
|
|
152
173
|
(o = e(s, i, t)) !== !1 && (n[i] = o || s);
|
|
153
174
|
}), Object.defineProperties(t, n);
|
|
154
|
-
},
|
|
155
|
-
|
|
156
|
-
if (
|
|
175
|
+
}, Cr = (t) => {
|
|
176
|
+
St(t, (e, r) => {
|
|
177
|
+
if (T(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
157
178
|
return !1;
|
|
158
179
|
const n = t[r];
|
|
159
|
-
if (
|
|
180
|
+
if (T(n)) {
|
|
160
181
|
if (e.enumerable = !1, "writable" in e) {
|
|
161
182
|
e.writable = !1;
|
|
162
183
|
return;
|
|
@@ -166,109 +187,124 @@ const Qt = (t, e, r, { allOwnKeys: n } = {}) => (Y(e, (s, i) => {
|
|
|
166
187
|
});
|
|
167
188
|
}
|
|
168
189
|
});
|
|
169
|
-
},
|
|
190
|
+
}, Sr = (t, e) => {
|
|
170
191
|
const r = {}, n = (s) => {
|
|
171
192
|
s.forEach((i) => {
|
|
172
193
|
r[i] = !0;
|
|
173
194
|
});
|
|
174
195
|
};
|
|
175
|
-
return
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
function
|
|
179
|
-
return !!(t &&
|
|
196
|
+
return Q(t) ? n(t) : n(String(t).split(e)), r;
|
|
197
|
+
}, Rr = () => {
|
|
198
|
+
}, Ar = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
199
|
+
function Tr(t) {
|
|
200
|
+
return !!(t && T(t.append) && t[wt] === "FormData" && t[he]);
|
|
180
201
|
}
|
|
181
|
-
const
|
|
202
|
+
const Pr = (t) => {
|
|
182
203
|
const e = new Array(10), r = (n, s) => {
|
|
183
|
-
if (
|
|
204
|
+
if (te(n)) {
|
|
184
205
|
if (e.indexOf(n) >= 0)
|
|
185
206
|
return;
|
|
186
|
-
if (
|
|
207
|
+
if (ee(n))
|
|
187
208
|
return n;
|
|
188
209
|
if (!("toJSON" in n)) {
|
|
189
210
|
e[s] = n;
|
|
190
|
-
const i =
|
|
191
|
-
return
|
|
192
|
-
const
|
|
193
|
-
!
|
|
211
|
+
const i = Q(n) ? [] : {};
|
|
212
|
+
return re(n, (o, c) => {
|
|
213
|
+
const f = r(o, s + 1);
|
|
214
|
+
!J(f) && (i[c] = f);
|
|
194
215
|
}), e[s] = void 0, i;
|
|
195
216
|
}
|
|
196
217
|
}
|
|
197
218
|
return n;
|
|
198
219
|
};
|
|
199
220
|
return r(t, 0);
|
|
200
|
-
},
|
|
201
|
-
s ===
|
|
221
|
+
}, Or = D("AsyncFunction"), Nr = (t) => t && (te(t) || T(t)) && T(t.then) && T(t.catch), Rt = ((t, e) => t ? setImmediate : e ? ((r, n) => ($.addEventListener("message", ({ source: s, data: i }) => {
|
|
222
|
+
s === $ && i === r && n.length && n.shift()();
|
|
202
223
|
}, !1), (s) => {
|
|
203
|
-
n.push(s),
|
|
224
|
+
n.push(s), $.postMessage(r, "*");
|
|
204
225
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
205
226
|
typeof setImmediate == "function",
|
|
206
|
-
|
|
207
|
-
),
|
|
208
|
-
isArray:
|
|
209
|
-
isArrayBuffer:
|
|
210
|
-
isBuffer:
|
|
211
|
-
isFormData:
|
|
212
|
-
isArrayBufferView:
|
|
213
|
-
isString:
|
|
214
|
-
isNumber:
|
|
215
|
-
isBoolean:
|
|
216
|
-
isObject:
|
|
217
|
-
isPlainObject:
|
|
218
|
-
isEmptyObject:
|
|
219
|
-
isReadableStream:
|
|
220
|
-
isRequest:
|
|
221
|
-
isResponse:
|
|
222
|
-
isHeaders:
|
|
223
|
-
isUndefined:
|
|
224
|
-
isDate:
|
|
225
|
-
isFile:
|
|
226
|
-
isBlob:
|
|
227
|
-
isRegExp:
|
|
228
|
-
isFunction:
|
|
229
|
-
isStream:
|
|
230
|
-
isURLSearchParams:
|
|
231
|
-
isTypedArray:
|
|
232
|
-
isFileList:
|
|
233
|
-
forEach:
|
|
234
|
-
merge:
|
|
235
|
-
extend:
|
|
236
|
-
trim:
|
|
237
|
-
stripBOM:
|
|
238
|
-
inherits:
|
|
239
|
-
toFlatObject:
|
|
240
|
-
kindOf:
|
|
241
|
-
kindOfTest:
|
|
242
|
-
endsWith:
|
|
243
|
-
toArray:
|
|
244
|
-
forEachEntry:
|
|
245
|
-
matchAll:
|
|
246
|
-
isHTMLForm:
|
|
247
|
-
hasOwnProperty:
|
|
248
|
-
hasOwnProp:
|
|
227
|
+
T($.postMessage)
|
|
228
|
+
), xr = typeof queueMicrotask < "u" ? queueMicrotask.bind($) : typeof process < "u" && process.nextTick || Rt, Ur = (t) => t != null && T(t[he]), a = {
|
|
229
|
+
isArray: Q,
|
|
230
|
+
isArrayBuffer: bt,
|
|
231
|
+
isBuffer: ee,
|
|
232
|
+
isFormData: nr,
|
|
233
|
+
isArrayBufferView: Wt,
|
|
234
|
+
isString: Qt,
|
|
235
|
+
isNumber: _t,
|
|
236
|
+
isBoolean: Xt,
|
|
237
|
+
isObject: te,
|
|
238
|
+
isPlainObject: ue,
|
|
239
|
+
isEmptyObject: Yt,
|
|
240
|
+
isReadableStream: ir,
|
|
241
|
+
isRequest: or,
|
|
242
|
+
isResponse: ar,
|
|
243
|
+
isHeaders: cr,
|
|
244
|
+
isUndefined: J,
|
|
245
|
+
isDate: Gt,
|
|
246
|
+
isFile: Zt,
|
|
247
|
+
isBlob: er,
|
|
248
|
+
isRegExp: Er,
|
|
249
|
+
isFunction: T,
|
|
250
|
+
isStream: rr,
|
|
251
|
+
isURLSearchParams: sr,
|
|
252
|
+
isTypedArray: yr,
|
|
253
|
+
isFileList: tr,
|
|
254
|
+
forEach: re,
|
|
255
|
+
merge: Ae,
|
|
256
|
+
extend: lr,
|
|
257
|
+
trim: ur,
|
|
258
|
+
stripBOM: dr,
|
|
259
|
+
inherits: fr,
|
|
260
|
+
toFlatObject: hr,
|
|
261
|
+
kindOf: pe,
|
|
262
|
+
kindOfTest: D,
|
|
263
|
+
endsWith: pr,
|
|
264
|
+
toArray: mr,
|
|
265
|
+
forEachEntry: gr,
|
|
266
|
+
matchAll: wr,
|
|
267
|
+
isHTMLForm: br,
|
|
268
|
+
hasOwnProperty: Je,
|
|
269
|
+
hasOwnProp: Je,
|
|
249
270
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
250
|
-
reduceDescriptors:
|
|
251
|
-
freezeMethods:
|
|
252
|
-
toObjectSet:
|
|
253
|
-
toCamelCase:
|
|
254
|
-
noop:
|
|
255
|
-
toFiniteNumber:
|
|
256
|
-
findKey:
|
|
257
|
-
global:
|
|
258
|
-
isContextDefined:
|
|
259
|
-
isSpecCompliantForm:
|
|
260
|
-
toJSONObject:
|
|
261
|
-
isAsyncFn:
|
|
262
|
-
isThenable:
|
|
263
|
-
setImmediate:
|
|
264
|
-
asap:
|
|
265
|
-
isIterable:
|
|
271
|
+
reduceDescriptors: St,
|
|
272
|
+
freezeMethods: Cr,
|
|
273
|
+
toObjectSet: Sr,
|
|
274
|
+
toCamelCase: _r,
|
|
275
|
+
noop: Rr,
|
|
276
|
+
toFiniteNumber: Ar,
|
|
277
|
+
findKey: Et,
|
|
278
|
+
global: $,
|
|
279
|
+
isContextDefined: Ct,
|
|
280
|
+
isSpecCompliantForm: Tr,
|
|
281
|
+
toJSONObject: Pr,
|
|
282
|
+
isAsyncFn: Or,
|
|
283
|
+
isThenable: Nr,
|
|
284
|
+
setImmediate: Rt,
|
|
285
|
+
asap: xr,
|
|
286
|
+
isIterable: Ur
|
|
266
287
|
};
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
288
|
+
let m = class At extends Error {
|
|
289
|
+
static from(e, r, n, s, i, o) {
|
|
290
|
+
const c = new At(e.message, r || e.code, n, s, i);
|
|
291
|
+
return c.cause = e, c.name = e.name, o && Object.assign(c, o), c;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
295
|
+
*
|
|
296
|
+
* @param {string} message The error message.
|
|
297
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
298
|
+
* @param {Object} [config] The config.
|
|
299
|
+
* @param {Object} [request] The request.
|
|
300
|
+
* @param {Object} [response] The response.
|
|
301
|
+
*
|
|
302
|
+
* @returns {Error} The created error.
|
|
303
|
+
*/
|
|
304
|
+
constructor(e, r, n, s, i) {
|
|
305
|
+
super(e), this.name = "AxiosError", this.isAxiosError = !0, r && (this.code = r), n && (this.config = n), s && (this.request = s), i && (this.response = i, this.status = i.status);
|
|
306
|
+
}
|
|
307
|
+
toJSON() {
|
|
272
308
|
return {
|
|
273
309
|
// Standard
|
|
274
310
|
message: this.message,
|
|
@@ -287,52 +323,38 @@ a.inherits(m, Error, {
|
|
|
287
323
|
status: this.status
|
|
288
324
|
};
|
|
289
325
|
}
|
|
290
|
-
});
|
|
291
|
-
const ut = m.prototype, lt = {};
|
|
292
|
-
[
|
|
293
|
-
"ERR_BAD_OPTION_VALUE",
|
|
294
|
-
"ERR_BAD_OPTION",
|
|
295
|
-
"ECONNABORTED",
|
|
296
|
-
"ETIMEDOUT",
|
|
297
|
-
"ERR_NETWORK",
|
|
298
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
299
|
-
"ERR_DEPRECATED",
|
|
300
|
-
"ERR_BAD_RESPONSE",
|
|
301
|
-
"ERR_BAD_REQUEST",
|
|
302
|
-
"ERR_CANCELED",
|
|
303
|
-
"ERR_NOT_SUPPORT",
|
|
304
|
-
"ERR_INVALID_URL"
|
|
305
|
-
// eslint-disable-next-line func-names
|
|
306
|
-
].forEach((t) => {
|
|
307
|
-
lt[t] = { value: t };
|
|
308
|
-
});
|
|
309
|
-
Object.defineProperties(m, lt);
|
|
310
|
-
Object.defineProperty(ut, "isAxiosError", { value: !0 });
|
|
311
|
-
m.from = (t, e, r, n, s, i) => {
|
|
312
|
-
const o = Object.create(ut);
|
|
313
|
-
return a.toFlatObject(t, o, function(d) {
|
|
314
|
-
return d !== Error.prototype;
|
|
315
|
-
}, (c) => c !== "isAxiosError"), m.call(o, t.message, e, r, n, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
316
326
|
};
|
|
317
|
-
|
|
318
|
-
|
|
327
|
+
m.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
328
|
+
m.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
329
|
+
m.ECONNABORTED = "ECONNABORTED";
|
|
330
|
+
m.ETIMEDOUT = "ETIMEDOUT";
|
|
331
|
+
m.ERR_NETWORK = "ERR_NETWORK";
|
|
332
|
+
m.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
333
|
+
m.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
334
|
+
m.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
335
|
+
m.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
336
|
+
m.ERR_CANCELED = "ERR_CANCELED";
|
|
337
|
+
m.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
338
|
+
m.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
339
|
+
const Dr = null;
|
|
340
|
+
function Te(t) {
|
|
319
341
|
return a.isPlainObject(t) || a.isArray(t);
|
|
320
342
|
}
|
|
321
|
-
function
|
|
343
|
+
function Tt(t) {
|
|
322
344
|
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
323
345
|
}
|
|
324
|
-
function
|
|
346
|
+
function We(t, e, r) {
|
|
325
347
|
return t ? t.concat(e).map(function(s, i) {
|
|
326
|
-
return s =
|
|
348
|
+
return s = Tt(s), !r && i ? "[" + s + "]" : s;
|
|
327
349
|
}).join(r ? "." : "") : e;
|
|
328
350
|
}
|
|
329
|
-
function
|
|
330
|
-
return a.isArray(t) && !t.some(
|
|
351
|
+
function Lr(t) {
|
|
352
|
+
return a.isArray(t) && !t.some(Te);
|
|
331
353
|
}
|
|
332
|
-
const
|
|
354
|
+
const Fr = a.toFlatObject(a, {}, null, function(e) {
|
|
333
355
|
return /^is[A-Z]/.test(e);
|
|
334
356
|
});
|
|
335
|
-
function
|
|
357
|
+
function ye(t, e, r) {
|
|
336
358
|
if (!a.isObject(t))
|
|
337
359
|
throw new TypeError("target must be an object");
|
|
338
360
|
e = e || new FormData(), r = a.toFlatObject(r, {
|
|
@@ -342,60 +364,60 @@ function ce(t, e, r) {
|
|
|
342
364
|
}, !1, function(y, p) {
|
|
343
365
|
return !a.isUndefined(p[y]);
|
|
344
366
|
});
|
|
345
|
-
const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes,
|
|
367
|
+
const n = r.metaTokens, s = r.visitor || u, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(e);
|
|
346
368
|
if (!a.isFunction(s))
|
|
347
369
|
throw new TypeError("visitor must be a function");
|
|
348
|
-
function l(
|
|
349
|
-
if (
|
|
350
|
-
if (a.isDate(
|
|
351
|
-
return
|
|
352
|
-
if (a.isBoolean(
|
|
353
|
-
return
|
|
354
|
-
if (!
|
|
370
|
+
function l(d) {
|
|
371
|
+
if (d === null) return "";
|
|
372
|
+
if (a.isDate(d))
|
|
373
|
+
return d.toISOString();
|
|
374
|
+
if (a.isBoolean(d))
|
|
375
|
+
return d.toString();
|
|
376
|
+
if (!f && a.isBlob(d))
|
|
355
377
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
356
|
-
return a.isArrayBuffer(
|
|
378
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
357
379
|
}
|
|
358
|
-
function u(
|
|
359
|
-
let
|
|
360
|
-
if (
|
|
380
|
+
function u(d, y, p) {
|
|
381
|
+
let C = d;
|
|
382
|
+
if (d && !p && typeof d == "object") {
|
|
361
383
|
if (a.endsWith(y, "{}"))
|
|
362
|
-
y = n ? y : y.slice(0, -2),
|
|
363
|
-
else if (a.isArray(
|
|
364
|
-
return y =
|
|
365
|
-
!(a.isUndefined(
|
|
384
|
+
y = n ? y : y.slice(0, -2), d = JSON.stringify(d);
|
|
385
|
+
else if (a.isArray(d) && Lr(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (C = a.toArray(d)))
|
|
386
|
+
return y = Tt(y), C.forEach(function(S, A) {
|
|
387
|
+
!(a.isUndefined(S) || S === null) && e.append(
|
|
366
388
|
// eslint-disable-next-line no-nested-ternary
|
|
367
|
-
o === !0 ?
|
|
368
|
-
l(
|
|
389
|
+
o === !0 ? We([y], A, i) : o === null ? y : y + "[]",
|
|
390
|
+
l(S)
|
|
369
391
|
);
|
|
370
392
|
}), !1;
|
|
371
393
|
}
|
|
372
|
-
return
|
|
394
|
+
return Te(d) ? !0 : (e.append(We(p, y, i), l(d)), !1);
|
|
373
395
|
}
|
|
374
|
-
const
|
|
396
|
+
const h = [], g = Object.assign(Fr, {
|
|
375
397
|
defaultVisitor: u,
|
|
376
398
|
convertValue: l,
|
|
377
|
-
isVisitable:
|
|
399
|
+
isVisitable: Te
|
|
378
400
|
});
|
|
379
|
-
function
|
|
380
|
-
if (!a.isUndefined(
|
|
381
|
-
if (
|
|
401
|
+
function E(d, y) {
|
|
402
|
+
if (!a.isUndefined(d)) {
|
|
403
|
+
if (h.indexOf(d) !== -1)
|
|
382
404
|
throw Error("Circular reference detected in " + y.join("."));
|
|
383
|
-
|
|
384
|
-
(!(a.isUndefined(
|
|
405
|
+
h.push(d), a.forEach(d, function(C, O) {
|
|
406
|
+
(!(a.isUndefined(C) || C === null) && s.call(
|
|
385
407
|
e,
|
|
386
|
-
|
|
387
|
-
a.isString(
|
|
408
|
+
C,
|
|
409
|
+
a.isString(O) ? O.trim() : O,
|
|
388
410
|
y,
|
|
389
411
|
g
|
|
390
|
-
)) === !0 &&
|
|
391
|
-
}),
|
|
412
|
+
)) === !0 && E(C, y ? y.concat(O) : [O]);
|
|
413
|
+
}), h.pop();
|
|
392
414
|
}
|
|
393
415
|
}
|
|
394
416
|
if (!a.isObject(t))
|
|
395
417
|
throw new TypeError("data must be an object");
|
|
396
|
-
return
|
|
418
|
+
return E(t), e;
|
|
397
419
|
}
|
|
398
|
-
function
|
|
420
|
+
function Qe(t) {
|
|
399
421
|
const e = {
|
|
400
422
|
"!": "%21",
|
|
401
423
|
"'": "%27",
|
|
@@ -409,40 +431,38 @@ function Be(t) {
|
|
|
409
431
|
return e[n];
|
|
410
432
|
});
|
|
411
433
|
}
|
|
412
|
-
function
|
|
413
|
-
this._pairs = [], t &&
|
|
434
|
+
function Ue(t, e) {
|
|
435
|
+
this._pairs = [], t && ye(t, this, e);
|
|
414
436
|
}
|
|
415
|
-
const
|
|
416
|
-
|
|
437
|
+
const Pt = Ue.prototype;
|
|
438
|
+
Pt.append = function(e, r) {
|
|
417
439
|
this._pairs.push([e, r]);
|
|
418
440
|
};
|
|
419
|
-
|
|
441
|
+
Pt.toString = function(e) {
|
|
420
442
|
const r = e ? function(n) {
|
|
421
|
-
return e.call(this, n,
|
|
422
|
-
} :
|
|
443
|
+
return e.call(this, n, Qe);
|
|
444
|
+
} : Qe;
|
|
423
445
|
return this._pairs.map(function(s) {
|
|
424
446
|
return r(s[0]) + "=" + r(s[1]);
|
|
425
447
|
}, "").join("&");
|
|
426
448
|
};
|
|
427
|
-
function
|
|
428
|
-
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+")
|
|
449
|
+
function kr(t) {
|
|
450
|
+
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
429
451
|
}
|
|
430
|
-
function
|
|
452
|
+
function Ot(t, e, r) {
|
|
431
453
|
if (!e)
|
|
432
454
|
return t;
|
|
433
|
-
const n = r && r.encode ||
|
|
434
|
-
a.isFunction(r) && (r = {
|
|
455
|
+
const n = r && r.encode || kr, s = a.isFunction(r) ? {
|
|
435
456
|
serialize: r
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
o !== -1 && (t = t.slice(0, o)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
457
|
+
} : r, i = s && s.serialize;
|
|
458
|
+
let o;
|
|
459
|
+
if (i ? o = i(e, s) : o = a.isURLSearchParams(e) ? e.toString() : new Ue(e, s).toString(n), o) {
|
|
460
|
+
const c = t.indexOf("#");
|
|
461
|
+
c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
|
|
442
462
|
}
|
|
443
463
|
return t;
|
|
444
464
|
}
|
|
445
|
-
class
|
|
465
|
+
class Xe {
|
|
446
466
|
constructor() {
|
|
447
467
|
this.handlers = [];
|
|
448
468
|
}
|
|
@@ -451,6 +471,7 @@ class qe {
|
|
|
451
471
|
*
|
|
452
472
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
453
473
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
474
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
454
475
|
*
|
|
455
476
|
* @return {Number} An ID used to remove interceptor later
|
|
456
477
|
*/
|
|
@@ -467,7 +488,7 @@ class qe {
|
|
|
467
488
|
*
|
|
468
489
|
* @param {Number} id The ID that was returned by `use`
|
|
469
490
|
*
|
|
470
|
-
* @returns {
|
|
491
|
+
* @returns {void}
|
|
471
492
|
*/
|
|
472
493
|
eject(e) {
|
|
473
494
|
this.handlers[e] && (this.handlers[e] = null);
|
|
@@ -496,42 +517,42 @@ class qe {
|
|
|
496
517
|
});
|
|
497
518
|
}
|
|
498
519
|
}
|
|
499
|
-
const
|
|
520
|
+
const Nt = {
|
|
500
521
|
silentJSONParsing: !0,
|
|
501
522
|
forcedJSONParsing: !0,
|
|
502
523
|
clarifyTimeoutError: !1
|
|
503
|
-
},
|
|
524
|
+
}, vr = typeof URLSearchParams < "u" ? URLSearchParams : Ue, Br = typeof FormData < "u" ? FormData : null, qr = typeof Blob < "u" ? Blob : null, Ir = {
|
|
504
525
|
isBrowser: !0,
|
|
505
526
|
classes: {
|
|
506
|
-
URLSearchParams:
|
|
507
|
-
FormData:
|
|
508
|
-
Blob:
|
|
527
|
+
URLSearchParams: vr,
|
|
528
|
+
FormData: Br,
|
|
529
|
+
Blob: qr
|
|
509
530
|
},
|
|
510
531
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
511
|
-
},
|
|
512
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
532
|
+
}, De = typeof window < "u" && typeof document < "u", Pe = typeof navigator == "object" && navigator || void 0, jr = De && (!Pe || ["ReactNative", "NativeScript", "NS"].indexOf(Pe.product) < 0), $r = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
533
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Mr = De && window.location.href || "http://localhost", Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
513
534
|
__proto__: null,
|
|
514
|
-
hasBrowserEnv:
|
|
515
|
-
hasStandardBrowserEnv:
|
|
516
|
-
hasStandardBrowserWebWorkerEnv:
|
|
517
|
-
navigator:
|
|
518
|
-
origin:
|
|
519
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
520
|
-
...
|
|
521
|
-
...
|
|
535
|
+
hasBrowserEnv: De,
|
|
536
|
+
hasStandardBrowserEnv: jr,
|
|
537
|
+
hasStandardBrowserWebWorkerEnv: $r,
|
|
538
|
+
navigator: Pe,
|
|
539
|
+
origin: Mr
|
|
540
|
+
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
541
|
+
...Hr,
|
|
542
|
+
...Ir
|
|
522
543
|
};
|
|
523
|
-
function
|
|
524
|
-
return
|
|
544
|
+
function Vr(t, e) {
|
|
545
|
+
return ye(t, new R.classes.URLSearchParams(), {
|
|
525
546
|
visitor: function(r, n, s, i) {
|
|
526
|
-
return
|
|
547
|
+
return R.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
527
548
|
},
|
|
528
549
|
...e
|
|
529
550
|
});
|
|
530
551
|
}
|
|
531
|
-
function
|
|
552
|
+
function Kr(t) {
|
|
532
553
|
return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
533
554
|
}
|
|
534
|
-
function
|
|
555
|
+
function zr(t) {
|
|
535
556
|
const e = {}, r = Object.keys(t);
|
|
536
557
|
let n;
|
|
537
558
|
const s = r.length;
|
|
@@ -540,22 +561,22 @@ function Ur(t) {
|
|
|
540
561
|
i = r[n], e[i] = t[i];
|
|
541
562
|
return e;
|
|
542
563
|
}
|
|
543
|
-
function
|
|
564
|
+
function xt(t) {
|
|
544
565
|
function e(r, n, s, i) {
|
|
545
566
|
let o = r[i++];
|
|
546
567
|
if (o === "__proto__") return !0;
|
|
547
|
-
const c = Number.isFinite(+o),
|
|
548
|
-
return o = !o && a.isArray(s) ? s.length : o,
|
|
568
|
+
const c = Number.isFinite(+o), f = i >= r.length;
|
|
569
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), e(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = zr(s[o])), !c);
|
|
549
570
|
}
|
|
550
571
|
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
551
572
|
const r = {};
|
|
552
573
|
return a.forEachEntry(t, (n, s) => {
|
|
553
|
-
e(
|
|
574
|
+
e(Kr(n), s, r, 0);
|
|
554
575
|
}), r;
|
|
555
576
|
}
|
|
556
577
|
return null;
|
|
557
578
|
}
|
|
558
|
-
function
|
|
579
|
+
function Jr(t, e, r) {
|
|
559
580
|
if (a.isString(t))
|
|
560
581
|
try {
|
|
561
582
|
return (e || JSON.parse)(t), a.trim(t);
|
|
@@ -565,13 +586,13 @@ function Lr(t, e, r) {
|
|
|
565
586
|
}
|
|
566
587
|
return (0, JSON.stringify)(t);
|
|
567
588
|
}
|
|
568
|
-
const
|
|
569
|
-
transitional:
|
|
589
|
+
const ne = {
|
|
590
|
+
transitional: Nt,
|
|
570
591
|
adapter: ["xhr", "http", "fetch"],
|
|
571
592
|
transformRequest: [function(e, r) {
|
|
572
593
|
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(e);
|
|
573
594
|
if (i && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
574
|
-
return s ? JSON.stringify(
|
|
595
|
+
return s ? JSON.stringify(xt(e)) : e;
|
|
575
596
|
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
576
597
|
return e;
|
|
577
598
|
if (a.isArrayBufferView(e))
|
|
@@ -581,26 +602,26 @@ const G = {
|
|
|
581
602
|
let c;
|
|
582
603
|
if (i) {
|
|
583
604
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
584
|
-
return
|
|
605
|
+
return Vr(e, this.formSerializer).toString();
|
|
585
606
|
if ((c = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
586
|
-
const
|
|
587
|
-
return
|
|
607
|
+
const f = this.env && this.env.FormData;
|
|
608
|
+
return ye(
|
|
588
609
|
c ? { "files[]": e } : e,
|
|
589
|
-
|
|
610
|
+
f && new f(),
|
|
590
611
|
this.formSerializer
|
|
591
612
|
);
|
|
592
613
|
}
|
|
593
614
|
}
|
|
594
|
-
return i || s ? (r.setContentType("application/json", !1),
|
|
615
|
+
return i || s ? (r.setContentType("application/json", !1), Jr(e)) : e;
|
|
595
616
|
}],
|
|
596
617
|
transformResponse: [function(e) {
|
|
597
|
-
const r = this.transitional ||
|
|
618
|
+
const r = this.transitional || ne.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
598
619
|
if (a.isResponse(e) || a.isReadableStream(e))
|
|
599
620
|
return e;
|
|
600
621
|
if (e && a.isString(e) && (n && !this.responseType || s)) {
|
|
601
622
|
const o = !(r && r.silentJSONParsing) && s;
|
|
602
623
|
try {
|
|
603
|
-
return JSON.parse(e);
|
|
624
|
+
return JSON.parse(e, this.parseReviver);
|
|
604
625
|
} catch (c) {
|
|
605
626
|
if (o)
|
|
606
627
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
@@ -618,8 +639,8 @@ const G = {
|
|
|
618
639
|
maxContentLength: -1,
|
|
619
640
|
maxBodyLength: -1,
|
|
620
641
|
env: {
|
|
621
|
-
FormData:
|
|
622
|
-
Blob:
|
|
642
|
+
FormData: R.classes.FormData,
|
|
643
|
+
Blob: R.classes.Blob
|
|
623
644
|
},
|
|
624
645
|
validateStatus: function(e) {
|
|
625
646
|
return e >= 200 && e < 300;
|
|
@@ -632,9 +653,9 @@ const G = {
|
|
|
632
653
|
}
|
|
633
654
|
};
|
|
634
655
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
635
|
-
|
|
656
|
+
ne.headers[t] = {};
|
|
636
657
|
});
|
|
637
|
-
const
|
|
658
|
+
const Wr = a.toObjectSet([
|
|
638
659
|
"age",
|
|
639
660
|
"authorization",
|
|
640
661
|
"content-length",
|
|
@@ -652,29 +673,29 @@ const Dr = a.toObjectSet([
|
|
|
652
673
|
"referer",
|
|
653
674
|
"retry-after",
|
|
654
675
|
"user-agent"
|
|
655
|
-
]),
|
|
676
|
+
]), Qr = (t) => {
|
|
656
677
|
const e = {};
|
|
657
678
|
let r, n, s;
|
|
658
679
|
return t && t.split(`
|
|
659
680
|
`).forEach(function(o) {
|
|
660
|
-
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] &&
|
|
681
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || e[r] && Wr[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
|
|
661
682
|
}), e;
|
|
662
|
-
},
|
|
663
|
-
function
|
|
683
|
+
}, Ye = Symbol("internals");
|
|
684
|
+
function G(t) {
|
|
664
685
|
return t && String(t).trim().toLowerCase();
|
|
665
686
|
}
|
|
666
|
-
function
|
|
667
|
-
return t === !1 || t == null ? t : a.isArray(t) ? t.map(
|
|
687
|
+
function le(t) {
|
|
688
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(le) : String(t);
|
|
668
689
|
}
|
|
669
|
-
function
|
|
690
|
+
function Xr(t) {
|
|
670
691
|
const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
671
692
|
let n;
|
|
672
693
|
for (; n = r.exec(t); )
|
|
673
694
|
e[n[1]] = n[2];
|
|
674
695
|
return e;
|
|
675
696
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
697
|
+
const Yr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
698
|
+
function Ee(t, e, r, n, s) {
|
|
678
699
|
if (a.isFunction(n))
|
|
679
700
|
return n.call(this, e, r);
|
|
680
701
|
if (s && (e = r), !!a.isString(e)) {
|
|
@@ -684,10 +705,10 @@ function fe(t, e, r, n, s) {
|
|
|
684
705
|
return n.test(e);
|
|
685
706
|
}
|
|
686
707
|
}
|
|
687
|
-
function
|
|
708
|
+
function Gr(t) {
|
|
688
709
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
|
|
689
710
|
}
|
|
690
|
-
function
|
|
711
|
+
function Zr(t, e) {
|
|
691
712
|
const r = a.toCamelCase(" " + e);
|
|
692
713
|
["get", "set", "has"].forEach((n) => {
|
|
693
714
|
Object.defineProperty(t, n + r, {
|
|
@@ -698,30 +719,30 @@ function vr(t, e) {
|
|
|
698
719
|
});
|
|
699
720
|
});
|
|
700
721
|
}
|
|
701
|
-
let
|
|
722
|
+
let P = class {
|
|
702
723
|
constructor(e) {
|
|
703
724
|
e && this.set(e);
|
|
704
725
|
}
|
|
705
726
|
set(e, r, n) {
|
|
706
727
|
const s = this;
|
|
707
|
-
function i(c,
|
|
708
|
-
const u =
|
|
728
|
+
function i(c, f, l) {
|
|
729
|
+
const u = G(f);
|
|
709
730
|
if (!u)
|
|
710
731
|
throw new Error("header name must be a non-empty string");
|
|
711
|
-
const
|
|
712
|
-
(!
|
|
732
|
+
const h = a.findKey(s, u);
|
|
733
|
+
(!h || s[h] === void 0 || l === !0 || l === void 0 && s[h] !== !1) && (s[h || f] = le(c));
|
|
713
734
|
}
|
|
714
|
-
const o = (c,
|
|
735
|
+
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
715
736
|
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
716
737
|
o(e, r);
|
|
717
|
-
else if (a.isString(e) && (e = e.trim()) && !
|
|
718
|
-
o(
|
|
738
|
+
else if (a.isString(e) && (e = e.trim()) && !Yr(e))
|
|
739
|
+
o(Qr(e), r);
|
|
719
740
|
else if (a.isObject(e) && a.isIterable(e)) {
|
|
720
|
-
let c = {},
|
|
741
|
+
let c = {}, f, l;
|
|
721
742
|
for (const u of e) {
|
|
722
743
|
if (!a.isArray(u))
|
|
723
744
|
throw TypeError("Object iterator must return a key-value pair");
|
|
724
|
-
c[l = u[0]] = (
|
|
745
|
+
c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
725
746
|
}
|
|
726
747
|
o(c, r);
|
|
727
748
|
} else
|
|
@@ -729,14 +750,14 @@ let O = class {
|
|
|
729
750
|
return this;
|
|
730
751
|
}
|
|
731
752
|
get(e, r) {
|
|
732
|
-
if (e =
|
|
753
|
+
if (e = G(e), e) {
|
|
733
754
|
const n = a.findKey(this, e);
|
|
734
755
|
if (n) {
|
|
735
756
|
const s = this[n];
|
|
736
757
|
if (!r)
|
|
737
758
|
return s;
|
|
738
759
|
if (r === !0)
|
|
739
|
-
return
|
|
760
|
+
return Xr(s);
|
|
740
761
|
if (a.isFunction(r))
|
|
741
762
|
return r.call(this, s, n);
|
|
742
763
|
if (a.isRegExp(r))
|
|
@@ -746,9 +767,9 @@ let O = class {
|
|
|
746
767
|
}
|
|
747
768
|
}
|
|
748
769
|
has(e, r) {
|
|
749
|
-
if (e =
|
|
770
|
+
if (e = G(e), e) {
|
|
750
771
|
const n = a.findKey(this, e);
|
|
751
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
772
|
+
return !!(n && this[n] !== void 0 && (!r || Ee(this, this[n], n, r)));
|
|
752
773
|
}
|
|
753
774
|
return !1;
|
|
754
775
|
}
|
|
@@ -756,9 +777,9 @@ let O = class {
|
|
|
756
777
|
const n = this;
|
|
757
778
|
let s = !1;
|
|
758
779
|
function i(o) {
|
|
759
|
-
if (o =
|
|
780
|
+
if (o = G(o), o) {
|
|
760
781
|
const c = a.findKey(n, o);
|
|
761
|
-
c && (!r ||
|
|
782
|
+
c && (!r || Ee(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
762
783
|
}
|
|
763
784
|
}
|
|
764
785
|
return a.isArray(e) ? e.forEach(i) : i(e), s;
|
|
@@ -768,7 +789,7 @@ let O = class {
|
|
|
768
789
|
let n = r.length, s = !1;
|
|
769
790
|
for (; n--; ) {
|
|
770
791
|
const i = r[n];
|
|
771
|
-
(!e ||
|
|
792
|
+
(!e || Ee(this, this[i], i, e, !0)) && (delete this[i], s = !0);
|
|
772
793
|
}
|
|
773
794
|
return s;
|
|
774
795
|
}
|
|
@@ -777,11 +798,11 @@ let O = class {
|
|
|
777
798
|
return a.forEach(this, (s, i) => {
|
|
778
799
|
const o = a.findKey(n, i);
|
|
779
800
|
if (o) {
|
|
780
|
-
r[o] =
|
|
801
|
+
r[o] = le(s), delete r[i];
|
|
781
802
|
return;
|
|
782
803
|
}
|
|
783
|
-
const c = e ?
|
|
784
|
-
c !== i && delete r[i], r[c] =
|
|
804
|
+
const c = e ? Gr(i) : String(i).trim();
|
|
805
|
+
c !== i && delete r[i], r[c] = le(s), n[c] = !0;
|
|
785
806
|
}), this;
|
|
786
807
|
}
|
|
787
808
|
concat(...e) {
|
|
@@ -814,18 +835,18 @@ let O = class {
|
|
|
814
835
|
return r.forEach((s) => n.set(s)), n;
|
|
815
836
|
}
|
|
816
837
|
static accessor(e) {
|
|
817
|
-
const n = (this[
|
|
838
|
+
const n = (this[Ye] = this[Ye] = {
|
|
818
839
|
accessors: {}
|
|
819
840
|
}).accessors, s = this.prototype;
|
|
820
841
|
function i(o) {
|
|
821
|
-
const c =
|
|
822
|
-
n[c] || (
|
|
842
|
+
const c = G(o);
|
|
843
|
+
n[c] || (Zr(s, o), n[c] = !0);
|
|
823
844
|
}
|
|
824
845
|
return a.isArray(e) ? e.forEach(i) : i(e), this;
|
|
825
846
|
}
|
|
826
847
|
};
|
|
827
|
-
|
|
828
|
-
a.reduceDescriptors(
|
|
848
|
+
P.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
849
|
+
a.reduceDescriptors(P.prototype, ({ value: t }, e) => {
|
|
829
850
|
let r = e[0].toUpperCase() + e.slice(1);
|
|
830
851
|
return {
|
|
831
852
|
get: () => t,
|
|
@@ -834,24 +855,32 @@ a.reduceDescriptors(O.prototype, ({ value: t }, e) => {
|
|
|
834
855
|
}
|
|
835
856
|
};
|
|
836
857
|
});
|
|
837
|
-
a.freezeMethods(
|
|
838
|
-
function
|
|
839
|
-
const r = this ||
|
|
858
|
+
a.freezeMethods(P);
|
|
859
|
+
function Ce(t, e) {
|
|
860
|
+
const r = this || ne, n = e || r, s = P.from(n.headers);
|
|
840
861
|
let i = n.data;
|
|
841
862
|
return a.forEach(t, function(c) {
|
|
842
863
|
i = c.call(r, i, s.normalize(), e ? e.status : void 0);
|
|
843
864
|
}), s.normalize(), i;
|
|
844
865
|
}
|
|
845
|
-
function
|
|
866
|
+
function Ut(t) {
|
|
846
867
|
return !!(t && t.__CANCEL__);
|
|
847
868
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}
|
|
854
|
-
|
|
869
|
+
let se = class extends m {
|
|
870
|
+
/**
|
|
871
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
872
|
+
*
|
|
873
|
+
* @param {string=} message The message.
|
|
874
|
+
* @param {Object=} config The config.
|
|
875
|
+
* @param {Object=} request The request.
|
|
876
|
+
*
|
|
877
|
+
* @returns {CanceledError} The created error.
|
|
878
|
+
*/
|
|
879
|
+
constructor(e, r, n) {
|
|
880
|
+
super(e ?? "canceled", m.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
881
|
+
}
|
|
882
|
+
};
|
|
883
|
+
function Dt(t, e, r) {
|
|
855
884
|
const n = r.config.validateStatus;
|
|
856
885
|
!r.status || !n || n(r.status) ? t(r) : e(new m(
|
|
857
886
|
"Request failed with status code " + r.status,
|
|
@@ -861,80 +890,82 @@ function gt(t, e, r) {
|
|
|
861
890
|
r
|
|
862
891
|
));
|
|
863
892
|
}
|
|
864
|
-
function
|
|
893
|
+
function en(t) {
|
|
865
894
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
866
895
|
return e && e[1] || "";
|
|
867
896
|
}
|
|
868
|
-
function
|
|
897
|
+
function tn(t, e) {
|
|
869
898
|
t = t || 10;
|
|
870
899
|
const r = new Array(t), n = new Array(t);
|
|
871
900
|
let s = 0, i = 0, o;
|
|
872
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
901
|
+
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
873
902
|
const l = Date.now(), u = n[i];
|
|
874
|
-
o || (o = l), r[s] =
|
|
875
|
-
let
|
|
876
|
-
for (;
|
|
877
|
-
g += r[
|
|
903
|
+
o || (o = l), r[s] = f, n[s] = l;
|
|
904
|
+
let h = i, g = 0;
|
|
905
|
+
for (; h !== s; )
|
|
906
|
+
g += r[h++], h = h % t;
|
|
878
907
|
if (s = (s + 1) % t, s === i && (i = (i + 1) % t), l - o < e)
|
|
879
908
|
return;
|
|
880
|
-
const
|
|
881
|
-
return
|
|
909
|
+
const E = u && l - u;
|
|
910
|
+
return E ? Math.round(g * 1e3 / E) : void 0;
|
|
882
911
|
};
|
|
883
912
|
}
|
|
884
|
-
function
|
|
913
|
+
function rn(t, e) {
|
|
885
914
|
let r = 0, n = 1e3 / e, s, i;
|
|
886
915
|
const o = (l, u = Date.now()) => {
|
|
887
916
|
r = u, s = null, i && (clearTimeout(i), i = null), t(...l);
|
|
888
917
|
};
|
|
889
918
|
return [(...l) => {
|
|
890
|
-
const u = Date.now(),
|
|
891
|
-
|
|
919
|
+
const u = Date.now(), h = u - r;
|
|
920
|
+
h >= n ? o(l, u) : (s = l, i || (i = setTimeout(() => {
|
|
892
921
|
i = null, o(s);
|
|
893
|
-
}, n -
|
|
922
|
+
}, n - h)));
|
|
894
923
|
}, () => s && o(s)];
|
|
895
924
|
}
|
|
896
|
-
const
|
|
925
|
+
const fe = (t, e, r = 3) => {
|
|
897
926
|
let n = 0;
|
|
898
|
-
const s =
|
|
899
|
-
return
|
|
900
|
-
const o = i.loaded, c = i.lengthComputable ? i.total : void 0,
|
|
927
|
+
const s = tn(50, 250);
|
|
928
|
+
return rn((i) => {
|
|
929
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, l = s(f), u = o <= c;
|
|
901
930
|
n = o;
|
|
902
|
-
const
|
|
931
|
+
const h = {
|
|
903
932
|
loaded: o,
|
|
904
933
|
total: c,
|
|
905
934
|
progress: c ? o / c : void 0,
|
|
906
|
-
bytes:
|
|
935
|
+
bytes: f,
|
|
907
936
|
rate: l || void 0,
|
|
908
937
|
estimated: l && c && u ? (c - o) / l : void 0,
|
|
909
938
|
event: i,
|
|
910
939
|
lengthComputable: c != null,
|
|
911
940
|
[e ? "download" : "upload"]: !0
|
|
912
941
|
};
|
|
913
|
-
t(
|
|
942
|
+
t(h);
|
|
914
943
|
}, r);
|
|
915
|
-
},
|
|
944
|
+
}, Ge = (t, e) => {
|
|
916
945
|
const r = t != null;
|
|
917
946
|
return [(n) => e[0]({
|
|
918
947
|
lengthComputable: r,
|
|
919
948
|
total: t,
|
|
920
949
|
loaded: n
|
|
921
950
|
}), e[1]];
|
|
922
|
-
},
|
|
923
|
-
new URL(
|
|
924
|
-
|
|
925
|
-
) : () => !0,
|
|
951
|
+
}, Ze = (t) => (...e) => a.asap(() => t(...e)), nn = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, R.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
|
|
952
|
+
new URL(R.origin),
|
|
953
|
+
R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
|
|
954
|
+
) : () => !0, sn = R.hasStandardBrowserEnv ? (
|
|
926
955
|
// Standard browser envs support document.cookie
|
|
927
956
|
{
|
|
928
|
-
write(t, e, r, n, s, i) {
|
|
929
|
-
|
|
930
|
-
|
|
957
|
+
write(t, e, r, n, s, i, o) {
|
|
958
|
+
if (typeof document > "u") return;
|
|
959
|
+
const c = [`${t}=${encodeURIComponent(e)}`];
|
|
960
|
+
a.isNumber(r) && c.push(`expires=${new Date(r).toUTCString()}`), a.isString(n) && c.push(`path=${n}`), a.isString(s) && c.push(`domain=${s}`), i === !0 && c.push("secure"), a.isString(o) && c.push(`SameSite=${o}`), document.cookie = c.join("; ");
|
|
931
961
|
},
|
|
932
962
|
read(t) {
|
|
933
|
-
|
|
934
|
-
|
|
963
|
+
if (typeof document > "u") return null;
|
|
964
|
+
const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
|
|
965
|
+
return e ? decodeURIComponent(e[1]) : null;
|
|
935
966
|
},
|
|
936
967
|
remove(t) {
|
|
937
|
-
this.write(t, "", Date.now() - 864e5);
|
|
968
|
+
this.write(t, "", Date.now() - 864e5, "/");
|
|
938
969
|
}
|
|
939
970
|
}
|
|
940
971
|
) : (
|
|
@@ -949,28 +980,28 @@ const ne = (t, e, r = 3) => {
|
|
|
949
980
|
}
|
|
950
981
|
}
|
|
951
982
|
);
|
|
952
|
-
function
|
|
983
|
+
function on(t) {
|
|
953
984
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
954
985
|
}
|
|
955
|
-
function
|
|
986
|
+
function an(t, e) {
|
|
956
987
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
957
988
|
}
|
|
958
|
-
function
|
|
959
|
-
let n = !
|
|
960
|
-
return t && (n || r == !1) ?
|
|
989
|
+
function Lt(t, e, r) {
|
|
990
|
+
let n = !on(e);
|
|
991
|
+
return t && (n || r == !1) ? an(t, e) : e;
|
|
961
992
|
}
|
|
962
|
-
const
|
|
963
|
-
function
|
|
993
|
+
const et = (t) => t instanceof P ? { ...t } : t;
|
|
994
|
+
function H(t, e) {
|
|
964
995
|
e = e || {};
|
|
965
996
|
const r = {};
|
|
966
|
-
function n(l, u,
|
|
997
|
+
function n(l, u, h, g) {
|
|
967
998
|
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: g }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
968
999
|
}
|
|
969
|
-
function s(l, u,
|
|
1000
|
+
function s(l, u, h, g) {
|
|
970
1001
|
if (a.isUndefined(u)) {
|
|
971
1002
|
if (!a.isUndefined(l))
|
|
972
|
-
return n(void 0, l,
|
|
973
|
-
} else return n(l, u,
|
|
1003
|
+
return n(void 0, l, h, g);
|
|
1004
|
+
} else return n(l, u, h, g);
|
|
974
1005
|
}
|
|
975
1006
|
function i(l, u) {
|
|
976
1007
|
if (!a.isUndefined(u))
|
|
@@ -982,13 +1013,13 @@ function I(t, e) {
|
|
|
982
1013
|
return n(void 0, l);
|
|
983
1014
|
} else return n(void 0, u);
|
|
984
1015
|
}
|
|
985
|
-
function c(l, u,
|
|
986
|
-
if (
|
|
1016
|
+
function c(l, u, h) {
|
|
1017
|
+
if (h in e)
|
|
987
1018
|
return n(l, u);
|
|
988
|
-
if (
|
|
1019
|
+
if (h in t)
|
|
989
1020
|
return n(void 0, l);
|
|
990
1021
|
}
|
|
991
|
-
const
|
|
1022
|
+
const f = {
|
|
992
1023
|
url: i,
|
|
993
1024
|
method: i,
|
|
994
1025
|
data: i,
|
|
@@ -1017,92 +1048,93 @@ function I(t, e) {
|
|
|
1017
1048
|
socketPath: o,
|
|
1018
1049
|
responseEncoding: o,
|
|
1019
1050
|
validateStatus: c,
|
|
1020
|
-
headers: (l, u,
|
|
1051
|
+
headers: (l, u, h) => s(et(l), et(u), h, !0)
|
|
1021
1052
|
};
|
|
1022
1053
|
return a.forEach(Object.keys({ ...t, ...e }), function(u) {
|
|
1023
|
-
const
|
|
1024
|
-
a.isUndefined(g) &&
|
|
1054
|
+
const h = f[u] || s, g = h(t[u], e[u], u);
|
|
1055
|
+
a.isUndefined(g) && h !== c || (r[u] = g);
|
|
1025
1056
|
}), r;
|
|
1026
1057
|
}
|
|
1027
|
-
const
|
|
1028
|
-
const e =
|
|
1058
|
+
const Ft = (t) => {
|
|
1059
|
+
const e = H({}, t);
|
|
1029
1060
|
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = e;
|
|
1030
|
-
e.headers = o =
|
|
1061
|
+
if (e.headers = o = P.from(o), e.url = Ot(Lt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), c && o.set(
|
|
1031
1062
|
"Authorization",
|
|
1032
1063
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1033
|
-
)
|
|
1034
|
-
|
|
1035
|
-
if (a.isFormData(r)) {
|
|
1036
|
-
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1064
|
+
), a.isFormData(r)) {
|
|
1065
|
+
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
1037
1066
|
o.setContentType(void 0);
|
|
1038
|
-
else if ((
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1067
|
+
else if (a.isFunction(r.getHeaders)) {
|
|
1068
|
+
const f = r.getHeaders(), l = ["content-type", "content-length"];
|
|
1069
|
+
Object.entries(f).forEach(([u, h]) => {
|
|
1070
|
+
l.includes(u.toLowerCase()) && o.set(u, h);
|
|
1071
|
+
});
|
|
1041
1072
|
}
|
|
1042
1073
|
}
|
|
1043
|
-
if (
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1074
|
+
if (R.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(e)), n || n !== !1 && nn(e.url))) {
|
|
1075
|
+
const f = s && i && sn.read(i);
|
|
1076
|
+
f && o.set(s, f);
|
|
1046
1077
|
}
|
|
1047
1078
|
return e;
|
|
1048
|
-
},
|
|
1079
|
+
}, cn = typeof XMLHttpRequest < "u", un = cn && function(t) {
|
|
1049
1080
|
return new Promise(function(r, n) {
|
|
1050
|
-
const s =
|
|
1081
|
+
const s = Ft(t);
|
|
1051
1082
|
let i = s.data;
|
|
1052
|
-
const o =
|
|
1053
|
-
let { responseType: c, onUploadProgress:
|
|
1083
|
+
const o = P.from(s.headers).normalize();
|
|
1084
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, h, g, E, d;
|
|
1054
1085
|
function y() {
|
|
1055
|
-
|
|
1086
|
+
E && E(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1056
1087
|
}
|
|
1057
1088
|
let p = new XMLHttpRequest();
|
|
1058
1089
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1059
|
-
function
|
|
1090
|
+
function C() {
|
|
1060
1091
|
if (!p)
|
|
1061
1092
|
return;
|
|
1062
|
-
const
|
|
1093
|
+
const S = P.from(
|
|
1063
1094
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1064
|
-
),
|
|
1095
|
+
), x = {
|
|
1065
1096
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1066
1097
|
status: p.status,
|
|
1067
1098
|
statusText: p.statusText,
|
|
1068
|
-
headers:
|
|
1099
|
+
headers: S,
|
|
1069
1100
|
config: t,
|
|
1070
1101
|
request: p
|
|
1071
1102
|
};
|
|
1072
|
-
|
|
1073
|
-
r(
|
|
1074
|
-
}, function(
|
|
1075
|
-
n(
|
|
1076
|
-
},
|
|
1103
|
+
Dt(function(N) {
|
|
1104
|
+
r(N), y();
|
|
1105
|
+
}, function(N) {
|
|
1106
|
+
n(N), y();
|
|
1107
|
+
}, x), p = null;
|
|
1077
1108
|
}
|
|
1078
|
-
"onloadend" in p ? p.onloadend =
|
|
1079
|
-
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1109
|
+
"onloadend" in p ? p.onloadend = C : p.onreadystatechange = function() {
|
|
1110
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(C);
|
|
1080
1111
|
}, p.onabort = function() {
|
|
1081
1112
|
p && (n(new m("Request aborted", m.ECONNABORTED, t, p)), p = null);
|
|
1082
|
-
}, p.onerror = function() {
|
|
1083
|
-
|
|
1113
|
+
}, p.onerror = function(A) {
|
|
1114
|
+
const x = A && A.message ? A.message : "Network Error", I = new m(x, m.ERR_NETWORK, t, p);
|
|
1115
|
+
I.event = A || null, n(I), p = null;
|
|
1084
1116
|
}, p.ontimeout = function() {
|
|
1085
|
-
let
|
|
1086
|
-
const
|
|
1087
|
-
s.timeoutErrorMessage && (
|
|
1088
|
-
|
|
1089
|
-
|
|
1117
|
+
let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1118
|
+
const x = s.transitional || Nt;
|
|
1119
|
+
s.timeoutErrorMessage && (A = s.timeoutErrorMessage), n(new m(
|
|
1120
|
+
A,
|
|
1121
|
+
x.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1090
1122
|
t,
|
|
1091
1123
|
p
|
|
1092
1124
|
)), p = null;
|
|
1093
|
-
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(
|
|
1094
|
-
p.setRequestHeader(
|
|
1095
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g,
|
|
1096
|
-
p && (n(!
|
|
1125
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(A, x) {
|
|
1126
|
+
p.setRequestHeader(x, A);
|
|
1127
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([g, d] = fe(l, !0), p.addEventListener("progress", g)), f && p.upload && ([h, E] = fe(f), p.upload.addEventListener("progress", h), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (S) => {
|
|
1128
|
+
p && (n(!S || S.type ? new se(null, t, p) : S), p.abort(), p = null);
|
|
1097
1129
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1098
|
-
const
|
|
1099
|
-
if (
|
|
1100
|
-
n(new m("Unsupported protocol " +
|
|
1130
|
+
const O = en(s.url);
|
|
1131
|
+
if (O && R.protocols.indexOf(O) === -1) {
|
|
1132
|
+
n(new m("Unsupported protocol " + O + ":", m.ERR_BAD_REQUEST, t));
|
|
1101
1133
|
return;
|
|
1102
1134
|
}
|
|
1103
1135
|
p.send(i || null);
|
|
1104
1136
|
});
|
|
1105
|
-
},
|
|
1137
|
+
}, ln = (t, e) => {
|
|
1106
1138
|
const { length: r } = t = t ? t.filter(Boolean) : [];
|
|
1107
1139
|
if (e || r) {
|
|
1108
1140
|
let n = new AbortController(), s;
|
|
@@ -1110,11 +1142,11 @@ const bt = (t) => {
|
|
|
1110
1142
|
if (!s) {
|
|
1111
1143
|
s = !0, c();
|
|
1112
1144
|
const u = l instanceof Error ? l : this.reason;
|
|
1113
|
-
n.abort(u instanceof m ? u : new
|
|
1145
|
+
n.abort(u instanceof m ? u : new se(u instanceof Error ? u.message : u));
|
|
1114
1146
|
}
|
|
1115
1147
|
};
|
|
1116
1148
|
let o = e && setTimeout(() => {
|
|
1117
|
-
o = null, i(new m(`timeout ${e}
|
|
1149
|
+
o = null, i(new m(`timeout of ${e}ms exceeded`, m.ETIMEDOUT));
|
|
1118
1150
|
}, e);
|
|
1119
1151
|
const c = () => {
|
|
1120
1152
|
t && (o && clearTimeout(o), o = null, t.forEach((l) => {
|
|
@@ -1122,10 +1154,10 @@ const bt = (t) => {
|
|
|
1122
1154
|
}), t = null);
|
|
1123
1155
|
};
|
|
1124
1156
|
t.forEach((l) => l.addEventListener("abort", i));
|
|
1125
|
-
const { signal:
|
|
1126
|
-
return
|
|
1157
|
+
const { signal: f } = n;
|
|
1158
|
+
return f.unsubscribe = () => a.asap(c), f;
|
|
1127
1159
|
}
|
|
1128
|
-
},
|
|
1160
|
+
}, dn = function* (t, e) {
|
|
1129
1161
|
let r = t.byteLength;
|
|
1130
1162
|
if (r < e) {
|
|
1131
1163
|
yield t;
|
|
@@ -1134,10 +1166,10 @@ const bt = (t) => {
|
|
|
1134
1166
|
let n = 0, s;
|
|
1135
1167
|
for (; n < r; )
|
|
1136
1168
|
s = n + e, yield t.slice(n, s), n = s;
|
|
1137
|
-
},
|
|
1138
|
-
for await (const r of
|
|
1139
|
-
yield*
|
|
1140
|
-
},
|
|
1169
|
+
}, fn = async function* (t, e) {
|
|
1170
|
+
for await (const r of hn(t))
|
|
1171
|
+
yield* dn(r, e);
|
|
1172
|
+
}, hn = async function* (t) {
|
|
1141
1173
|
if (t[Symbol.asyncIterator]) {
|
|
1142
1174
|
yield* t;
|
|
1143
1175
|
return;
|
|
@@ -1153,169 +1185,200 @@ const bt = (t) => {
|
|
|
1153
1185
|
} finally {
|
|
1154
1186
|
await e.cancel();
|
|
1155
1187
|
}
|
|
1156
|
-
},
|
|
1157
|
-
const s =
|
|
1158
|
-
let i = 0, o, c = (
|
|
1159
|
-
o || (o = !0, n && n(
|
|
1188
|
+
}, tt = (t, e, r, n) => {
|
|
1189
|
+
const s = fn(t, e);
|
|
1190
|
+
let i = 0, o, c = (f) => {
|
|
1191
|
+
o || (o = !0, n && n(f));
|
|
1160
1192
|
};
|
|
1161
1193
|
return new ReadableStream({
|
|
1162
|
-
async pull(
|
|
1194
|
+
async pull(f) {
|
|
1163
1195
|
try {
|
|
1164
1196
|
const { done: l, value: u } = await s.next();
|
|
1165
1197
|
if (l) {
|
|
1166
|
-
c(),
|
|
1198
|
+
c(), f.close();
|
|
1167
1199
|
return;
|
|
1168
1200
|
}
|
|
1169
|
-
let
|
|
1201
|
+
let h = u.byteLength;
|
|
1170
1202
|
if (r) {
|
|
1171
|
-
let g = i +=
|
|
1203
|
+
let g = i += h;
|
|
1172
1204
|
r(g);
|
|
1173
1205
|
}
|
|
1174
|
-
|
|
1206
|
+
f.enqueue(new Uint8Array(u));
|
|
1175
1207
|
} catch (l) {
|
|
1176
1208
|
throw c(l), l;
|
|
1177
1209
|
}
|
|
1178
1210
|
},
|
|
1179
|
-
cancel(
|
|
1180
|
-
return c(
|
|
1211
|
+
cancel(f) {
|
|
1212
|
+
return c(f), s.return();
|
|
1181
1213
|
}
|
|
1182
1214
|
}, {
|
|
1183
1215
|
highWaterMark: 2
|
|
1184
1216
|
});
|
|
1185
|
-
},
|
|
1217
|
+
}, rt = 64 * 1024, { isFunction: ce } = a, pn = (({ Request: t, Response: e }) => ({
|
|
1218
|
+
Request: t,
|
|
1219
|
+
Response: e
|
|
1220
|
+
}))(a.global), {
|
|
1221
|
+
ReadableStream: nt,
|
|
1222
|
+
TextEncoder: st
|
|
1223
|
+
} = a.global, it = (t, ...e) => {
|
|
1186
1224
|
try {
|
|
1187
1225
|
return !!t(...e);
|
|
1188
1226
|
} catch {
|
|
1189
1227
|
return !1;
|
|
1190
1228
|
}
|
|
1191
|
-
},
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
stream: be && ((t) => t.body)
|
|
1203
|
-
};
|
|
1204
|
-
ue && ((t) => {
|
|
1205
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
1206
|
-
!se[e] && (se[e] = a.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
|
|
1207
|
-
throw new m(`Response type '${e}' is not supported`, m.ERR_NOT_SUPPORT, n);
|
|
1208
|
-
});
|
|
1209
|
-
});
|
|
1210
|
-
})(new Response());
|
|
1211
|
-
const en = async (t) => {
|
|
1212
|
-
if (t == null)
|
|
1213
|
-
return 0;
|
|
1214
|
-
if (a.isBlob(t))
|
|
1215
|
-
return t.size;
|
|
1216
|
-
if (a.isSpecCompliantForm(t))
|
|
1217
|
-
return (await new Request(A.origin, {
|
|
1229
|
+
}, mn = (t) => {
|
|
1230
|
+
t = a.merge.call({
|
|
1231
|
+
skipUndefined: !0
|
|
1232
|
+
}, pn, t);
|
|
1233
|
+
const { fetch: e, Request: r, Response: n } = t, s = e ? ce(e) : typeof fetch == "function", i = ce(r), o = ce(n);
|
|
1234
|
+
if (!s)
|
|
1235
|
+
return !1;
|
|
1236
|
+
const c = s && ce(nt), f = s && (typeof st == "function" ? /* @__PURE__ */ ((d) => (y) => d.encode(y))(new st()) : async (d) => new Uint8Array(await new r(d).arrayBuffer())), l = i && c && it(() => {
|
|
1237
|
+
let d = !1;
|
|
1238
|
+
const y = new r(R.origin, {
|
|
1239
|
+
body: new nt(),
|
|
1218
1240
|
method: "POST",
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
cancelToken: i,
|
|
1235
|
-
timeout: o,
|
|
1236
|
-
onDownloadProgress: c,
|
|
1237
|
-
onUploadProgress: d,
|
|
1238
|
-
responseType: l,
|
|
1239
|
-
headers: u,
|
|
1240
|
-
withCredentials: f = "same-origin",
|
|
1241
|
-
fetchOptions: g
|
|
1242
|
-
} = bt(t);
|
|
1243
|
-
l = l ? (l + "").toLowerCase() : "text";
|
|
1244
|
-
let b = Wr([s, i && i.toAbortSignal()], o), h;
|
|
1245
|
-
const y = b && b.unsubscribe && (() => {
|
|
1246
|
-
b.unsubscribe();
|
|
1241
|
+
get duplex() {
|
|
1242
|
+
return d = !0, "half";
|
|
1243
|
+
}
|
|
1244
|
+
}).headers.has("Content-Type");
|
|
1245
|
+
return d && !y;
|
|
1246
|
+
}), u = o && c && it(() => a.isReadableStream(new n("").body)), h = {
|
|
1247
|
+
stream: u && ((d) => d.body)
|
|
1248
|
+
};
|
|
1249
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1250
|
+
!h[d] && (h[d] = (y, p) => {
|
|
1251
|
+
let C = y && y[d];
|
|
1252
|
+
if (C)
|
|
1253
|
+
return C.call(y);
|
|
1254
|
+
throw new m(`Response type '${d}' is not supported`, m.ERR_NOT_SUPPORT, p);
|
|
1255
|
+
});
|
|
1247
1256
|
});
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1257
|
+
const g = async (d) => {
|
|
1258
|
+
if (d == null)
|
|
1259
|
+
return 0;
|
|
1260
|
+
if (a.isBlob(d))
|
|
1261
|
+
return d.size;
|
|
1262
|
+
if (a.isSpecCompliantForm(d))
|
|
1263
|
+
return (await new r(R.origin, {
|
|
1252
1264
|
method: "POST",
|
|
1253
|
-
body:
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1265
|
+
body: d
|
|
1266
|
+
}).arrayBuffer()).byteLength;
|
|
1267
|
+
if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
|
|
1268
|
+
return d.byteLength;
|
|
1269
|
+
if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
|
|
1270
|
+
return (await f(d)).byteLength;
|
|
1271
|
+
}, E = async (d, y) => {
|
|
1272
|
+
const p = a.toFiniteNumber(d.getContentLength());
|
|
1273
|
+
return p ?? g(y);
|
|
1274
|
+
};
|
|
1275
|
+
return async (d) => {
|
|
1276
|
+
let {
|
|
1277
|
+
url: y,
|
|
1278
|
+
method: p,
|
|
1279
|
+
data: C,
|
|
1280
|
+
signal: O,
|
|
1281
|
+
cancelToken: S,
|
|
1282
|
+
timeout: A,
|
|
1283
|
+
onDownloadProgress: x,
|
|
1284
|
+
onUploadProgress: I,
|
|
1285
|
+
responseType: N,
|
|
1286
|
+
headers: be,
|
|
1287
|
+
withCredentials: ie = "same-origin",
|
|
1288
|
+
fetchOptions: je
|
|
1289
|
+
} = Ft(d), $e = e || fetch;
|
|
1290
|
+
N = N ? (N + "").toLowerCase() : "text";
|
|
1291
|
+
let oe = ln([O, S && S.toAbortSignal()], A), Y = null;
|
|
1292
|
+
const j = oe && oe.unsubscribe && (() => {
|
|
1293
|
+
oe.unsubscribe();
|
|
1294
|
+
});
|
|
1295
|
+
let Me;
|
|
1296
|
+
try {
|
|
1297
|
+
if (I && l && p !== "get" && p !== "head" && (Me = await E(be, C)) !== 0) {
|
|
1298
|
+
let B = new r(y, {
|
|
1299
|
+
method: "POST",
|
|
1300
|
+
body: C,
|
|
1301
|
+
duplex: "half"
|
|
1302
|
+
}), z;
|
|
1303
|
+
if (a.isFormData(C) && (z = B.headers.get("content-type")) && be.setContentType(z), B.body) {
|
|
1304
|
+
const [_e, ae] = Ge(
|
|
1305
|
+
Me,
|
|
1306
|
+
fe(Ze(I))
|
|
1307
|
+
);
|
|
1308
|
+
C = tt(B.body, rt, _e, ae);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
a.isString(ie) || (ie = ie ? "include" : "omit");
|
|
1312
|
+
const L = i && "credentials" in r.prototype, He = {
|
|
1313
|
+
...je,
|
|
1314
|
+
signal: oe,
|
|
1315
|
+
method: p.toUpperCase(),
|
|
1316
|
+
headers: be.normalize().toJSON(),
|
|
1317
|
+
body: C,
|
|
1318
|
+
duplex: "half",
|
|
1319
|
+
credentials: L ? ie : void 0
|
|
1320
|
+
};
|
|
1321
|
+
Y = i && new r(y, He);
|
|
1322
|
+
let v = await (i ? $e(Y, je) : $e(y, He));
|
|
1323
|
+
const Ve = u && (N === "stream" || N === "response");
|
|
1324
|
+
if (u && (x || Ve && j)) {
|
|
1325
|
+
const B = {};
|
|
1326
|
+
["status", "statusText", "headers"].forEach((Ke) => {
|
|
1327
|
+
B[Ke] = v[Ke];
|
|
1328
|
+
});
|
|
1329
|
+
const z = a.toFiniteNumber(v.headers.get("content-length")), [_e, ae] = x && Ge(
|
|
1330
|
+
z,
|
|
1331
|
+
fe(Ze(x), !0)
|
|
1332
|
+
) || [];
|
|
1333
|
+
v = new n(
|
|
1334
|
+
tt(v.body, rt, _e, () => {
|
|
1335
|
+
ae && ae(), j && j();
|
|
1336
|
+
}),
|
|
1337
|
+
B
|
|
1260
1338
|
);
|
|
1261
|
-
n = Me(T.body, He, B, Z);
|
|
1262
1339
|
}
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
});
|
|
1275
|
-
let S = await fetch(h, g);
|
|
1276
|
-
const R = be && (l === "stream" || l === "response");
|
|
1277
|
-
if (be && (c || R && y)) {
|
|
1278
|
-
const T = {};
|
|
1279
|
-
["status", "statusText", "headers"].forEach((Le) => {
|
|
1280
|
-
T[Le] = S[Le];
|
|
1340
|
+
N = N || "text";
|
|
1341
|
+
let Ht = await h[a.findKey(h, N) || "text"](v, d);
|
|
1342
|
+
return !Ve && j && j(), await new Promise((B, z) => {
|
|
1343
|
+
Dt(B, z, {
|
|
1344
|
+
data: Ht,
|
|
1345
|
+
headers: P.from(v.headers),
|
|
1346
|
+
status: v.status,
|
|
1347
|
+
statusText: v.statusText,
|
|
1348
|
+
config: d,
|
|
1349
|
+
request: Y
|
|
1350
|
+
});
|
|
1281
1351
|
});
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
}),
|
|
1290
|
-
T
|
|
1291
|
-
);
|
|
1352
|
+
} catch (L) {
|
|
1353
|
+
throw j && j(), L && L.name === "TypeError" && /Load failed|fetch/i.test(L.message) ? Object.assign(
|
|
1354
|
+
new m("Network Error", m.ERR_NETWORK, d, Y),
|
|
1355
|
+
{
|
|
1356
|
+
cause: L.cause || L
|
|
1357
|
+
}
|
|
1358
|
+
) : m.from(L, L && L.code, d, Y);
|
|
1292
1359
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1360
|
+
};
|
|
1361
|
+
}, yn = /* @__PURE__ */ new Map(), kt = (t) => {
|
|
1362
|
+
let e = t && t.env || {};
|
|
1363
|
+
const { fetch: r, Request: n, Response: s } = e, i = [
|
|
1364
|
+
n,
|
|
1365
|
+
s,
|
|
1366
|
+
r
|
|
1367
|
+
];
|
|
1368
|
+
let o = i.length, c = o, f, l, u = yn;
|
|
1369
|
+
for (; c--; )
|
|
1370
|
+
f = i[c], l = u.get(f), l === void 0 && u.set(f, l = c ? /* @__PURE__ */ new Map() : mn(e)), u = l;
|
|
1371
|
+
return l;
|
|
1372
|
+
};
|
|
1373
|
+
kt();
|
|
1374
|
+
const Le = {
|
|
1375
|
+
http: Dr,
|
|
1376
|
+
xhr: un,
|
|
1377
|
+
fetch: {
|
|
1378
|
+
get: kt
|
|
1312
1379
|
}
|
|
1313
|
-
}), _e = {
|
|
1314
|
-
http: gr,
|
|
1315
|
-
xhr: Jr,
|
|
1316
|
-
fetch: rn
|
|
1317
1380
|
};
|
|
1318
|
-
a.forEach(
|
|
1381
|
+
a.forEach(Le, (t, e) => {
|
|
1319
1382
|
if (t) {
|
|
1320
1383
|
try {
|
|
1321
1384
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1324,69 +1387,79 @@ a.forEach(_e, (t, e) => {
|
|
|
1324
1387
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
1325
1388
|
}
|
|
1326
1389
|
});
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
` +
|
|
1348
|
-
`) : " " +
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1390
|
+
const ot = (t) => `- ${t}`, gn = (t) => a.isFunction(t) || t === null || t === !1;
|
|
1391
|
+
function wn(t, e) {
|
|
1392
|
+
t = a.isArray(t) ? t : [t];
|
|
1393
|
+
const { length: r } = t;
|
|
1394
|
+
let n, s;
|
|
1395
|
+
const i = {};
|
|
1396
|
+
for (let o = 0; o < r; o++) {
|
|
1397
|
+
n = t[o];
|
|
1398
|
+
let c;
|
|
1399
|
+
if (s = n, !gn(n) && (s = Le[(c = String(n)).toLowerCase()], s === void 0))
|
|
1400
|
+
throw new m(`Unknown adapter '${c}'`);
|
|
1401
|
+
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
1402
|
+
break;
|
|
1403
|
+
i[c || "#" + o] = s;
|
|
1404
|
+
}
|
|
1405
|
+
if (!s) {
|
|
1406
|
+
const o = Object.entries(i).map(
|
|
1407
|
+
([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1408
|
+
);
|
|
1409
|
+
let c = r ? o.length > 1 ? `since :
|
|
1410
|
+
` + o.map(ot).join(`
|
|
1411
|
+
`) : " " + ot(o[0]) : "as no adapter specified";
|
|
1412
|
+
throw new m(
|
|
1413
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
1414
|
+
"ERR_NOT_SUPPORT"
|
|
1415
|
+
);
|
|
1416
|
+
}
|
|
1417
|
+
return s;
|
|
1418
|
+
}
|
|
1419
|
+
const vt = {
|
|
1420
|
+
/**
|
|
1421
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
1422
|
+
* @type {Function}
|
|
1423
|
+
*/
|
|
1424
|
+
getAdapter: wn,
|
|
1425
|
+
/**
|
|
1426
|
+
* Exposes all known adapters
|
|
1427
|
+
* @type {Object<string, Function|Object>}
|
|
1428
|
+
*/
|
|
1429
|
+
adapters: Le
|
|
1357
1430
|
};
|
|
1358
|
-
function
|
|
1431
|
+
function Se(t) {
|
|
1359
1432
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1360
|
-
throw new
|
|
1433
|
+
throw new se(null, t);
|
|
1361
1434
|
}
|
|
1362
|
-
function
|
|
1363
|
-
return
|
|
1435
|
+
function at(t) {
|
|
1436
|
+
return Se(t), t.headers = P.from(t.headers), t.data = Ce.call(
|
|
1364
1437
|
t,
|
|
1365
1438
|
t.transformRequest
|
|
1366
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1367
|
-
return
|
|
1439
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), vt.getAdapter(t.adapter || ne.adapter, t)(t).then(function(n) {
|
|
1440
|
+
return Se(t), n.data = Ce.call(
|
|
1368
1441
|
t,
|
|
1369
1442
|
t.transformResponse,
|
|
1370
1443
|
n
|
|
1371
|
-
), n.headers =
|
|
1444
|
+
), n.headers = P.from(n.headers), n;
|
|
1372
1445
|
}, function(n) {
|
|
1373
|
-
return
|
|
1446
|
+
return Ut(n) || (Se(t), n && n.response && (n.response.data = Ce.call(
|
|
1374
1447
|
t,
|
|
1375
1448
|
t.transformResponse,
|
|
1376
1449
|
n.response
|
|
1377
|
-
), n.response.headers =
|
|
1450
|
+
), n.response.headers = P.from(n.response.headers))), Promise.reject(n);
|
|
1378
1451
|
});
|
|
1379
1452
|
}
|
|
1380
|
-
const
|
|
1453
|
+
const Bt = "1.13.4", ge = {};
|
|
1381
1454
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1382
|
-
|
|
1455
|
+
ge[t] = function(n) {
|
|
1383
1456
|
return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1384
1457
|
};
|
|
1385
1458
|
});
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1459
|
+
const ct = {};
|
|
1460
|
+
ge.transitional = function(e, r, n) {
|
|
1388
1461
|
function s(i, o) {
|
|
1389
|
-
return "[Axios v" +
|
|
1462
|
+
return "[Axios v" + Bt + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1390
1463
|
}
|
|
1391
1464
|
return (i, o, c) => {
|
|
1392
1465
|
if (e === !1)
|
|
@@ -1394,7 +1467,7 @@ le.transitional = function(e, r, n) {
|
|
|
1394
1467
|
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1395
1468
|
m.ERR_DEPRECATED
|
|
1396
1469
|
);
|
|
1397
|
-
return r && !
|
|
1470
|
+
return r && !ct[o] && (ct[o] = !0, console.warn(
|
|
1398
1471
|
s(
|
|
1399
1472
|
o,
|
|
1400
1473
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
@@ -1402,10 +1475,10 @@ le.transitional = function(e, r, n) {
|
|
|
1402
1475
|
)), e ? e(i, o, c) : !0;
|
|
1403
1476
|
};
|
|
1404
1477
|
};
|
|
1405
|
-
|
|
1478
|
+
ge.spelling = function(e) {
|
|
1406
1479
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1407
1480
|
};
|
|
1408
|
-
function
|
|
1481
|
+
function bn(t, e, r) {
|
|
1409
1482
|
if (typeof t != "object")
|
|
1410
1483
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1411
1484
|
const n = Object.keys(t);
|
|
@@ -1413,24 +1486,24 @@ function sn(t, e, r) {
|
|
|
1413
1486
|
for (; s-- > 0; ) {
|
|
1414
1487
|
const i = n[s], o = e[i];
|
|
1415
1488
|
if (o) {
|
|
1416
|
-
const c = t[i],
|
|
1417
|
-
if (
|
|
1418
|
-
throw new m("option " + i + " must be " +
|
|
1489
|
+
const c = t[i], f = c === void 0 || o(c, i, t);
|
|
1490
|
+
if (f !== !0)
|
|
1491
|
+
throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1419
1492
|
continue;
|
|
1420
1493
|
}
|
|
1421
1494
|
if (r !== !0)
|
|
1422
1495
|
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1423
1496
|
}
|
|
1424
1497
|
}
|
|
1425
|
-
const
|
|
1426
|
-
assertOptions:
|
|
1427
|
-
validators:
|
|
1428
|
-
},
|
|
1429
|
-
let
|
|
1498
|
+
const de = {
|
|
1499
|
+
assertOptions: bn,
|
|
1500
|
+
validators: ge
|
|
1501
|
+
}, F = de.validators;
|
|
1502
|
+
let M = class {
|
|
1430
1503
|
constructor(e) {
|
|
1431
1504
|
this.defaults = e || {}, this.interceptors = {
|
|
1432
|
-
request: new
|
|
1433
|
-
response: new
|
|
1505
|
+
request: new Xe(),
|
|
1506
|
+
response: new Xe()
|
|
1434
1507
|
};
|
|
1435
1508
|
}
|
|
1436
1509
|
/**
|
|
@@ -1459,20 +1532,20 @@ let v = class {
|
|
|
1459
1532
|
}
|
|
1460
1533
|
}
|
|
1461
1534
|
_request(e, r) {
|
|
1462
|
-
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r =
|
|
1535
|
+
typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = H(this.defaults, r);
|
|
1463
1536
|
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1464
|
-
n !== void 0 &&
|
|
1465
|
-
silentJSONParsing:
|
|
1466
|
-
forcedJSONParsing:
|
|
1467
|
-
clarifyTimeoutError:
|
|
1537
|
+
n !== void 0 && de.assertOptions(n, {
|
|
1538
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1539
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1540
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1468
1541
|
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
1469
1542
|
serialize: s
|
|
1470
|
-
} :
|
|
1471
|
-
encode:
|
|
1472
|
-
serialize:
|
|
1473
|
-
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
|
|
1474
|
-
baseUrl:
|
|
1475
|
-
withXsrfToken:
|
|
1543
|
+
} : de.assertOptions(s, {
|
|
1544
|
+
encode: F.function,
|
|
1545
|
+
serialize: F.function
|
|
1546
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), de.assertOptions(r, {
|
|
1547
|
+
baseUrl: F.spelling("baseURL"),
|
|
1548
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1476
1549
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1477
1550
|
let o = i && a.merge(
|
|
1478
1551
|
i.common,
|
|
@@ -1480,55 +1553,55 @@ let v = class {
|
|
|
1480
1553
|
);
|
|
1481
1554
|
i && a.forEach(
|
|
1482
1555
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1483
|
-
(
|
|
1484
|
-
delete i[
|
|
1556
|
+
(d) => {
|
|
1557
|
+
delete i[d];
|
|
1485
1558
|
}
|
|
1486
|
-
), r.headers =
|
|
1559
|
+
), r.headers = P.concat(o, i);
|
|
1487
1560
|
const c = [];
|
|
1488
|
-
let
|
|
1561
|
+
let f = !0;
|
|
1489
1562
|
this.interceptors.request.forEach(function(y) {
|
|
1490
|
-
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (
|
|
1563
|
+
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1491
1564
|
});
|
|
1492
1565
|
const l = [];
|
|
1493
1566
|
this.interceptors.response.forEach(function(y) {
|
|
1494
1567
|
l.push(y.fulfilled, y.rejected);
|
|
1495
1568
|
});
|
|
1496
|
-
let u,
|
|
1497
|
-
if (!
|
|
1498
|
-
const
|
|
1499
|
-
for (
|
|
1500
|
-
u = u.then(h
|
|
1569
|
+
let u, h = 0, g;
|
|
1570
|
+
if (!f) {
|
|
1571
|
+
const d = [at.bind(this), void 0];
|
|
1572
|
+
for (d.unshift(...c), d.push(...l), g = d.length, u = Promise.resolve(r); h < g; )
|
|
1573
|
+
u = u.then(d[h++], d[h++]);
|
|
1501
1574
|
return u;
|
|
1502
1575
|
}
|
|
1503
1576
|
g = c.length;
|
|
1504
|
-
let
|
|
1505
|
-
for (
|
|
1506
|
-
const
|
|
1577
|
+
let E = r;
|
|
1578
|
+
for (; h < g; ) {
|
|
1579
|
+
const d = c[h++], y = c[h++];
|
|
1507
1580
|
try {
|
|
1508
|
-
|
|
1581
|
+
E = d(E);
|
|
1509
1582
|
} catch (p) {
|
|
1510
1583
|
y.call(this, p);
|
|
1511
1584
|
break;
|
|
1512
1585
|
}
|
|
1513
1586
|
}
|
|
1514
1587
|
try {
|
|
1515
|
-
u =
|
|
1516
|
-
} catch (
|
|
1517
|
-
return Promise.reject(
|
|
1588
|
+
u = at.call(this, E);
|
|
1589
|
+
} catch (d) {
|
|
1590
|
+
return Promise.reject(d);
|
|
1518
1591
|
}
|
|
1519
|
-
for (
|
|
1520
|
-
u = u.then(l[
|
|
1592
|
+
for (h = 0, g = l.length; h < g; )
|
|
1593
|
+
u = u.then(l[h++], l[h++]);
|
|
1521
1594
|
return u;
|
|
1522
1595
|
}
|
|
1523
1596
|
getUri(e) {
|
|
1524
|
-
e =
|
|
1525
|
-
const r =
|
|
1526
|
-
return
|
|
1597
|
+
e = H(this.defaults, e);
|
|
1598
|
+
const r = Lt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1599
|
+
return Ot(r, e.params, e.paramsSerializer);
|
|
1527
1600
|
}
|
|
1528
1601
|
};
|
|
1529
1602
|
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1530
|
-
|
|
1531
|
-
return this.request(
|
|
1603
|
+
M.prototype[e] = function(r, n) {
|
|
1604
|
+
return this.request(H(n || {}, {
|
|
1532
1605
|
method: e,
|
|
1533
1606
|
url: r,
|
|
1534
1607
|
data: (n || {}).data
|
|
@@ -1538,7 +1611,7 @@ a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1538
1611
|
a.forEach(["post", "put", "patch"], function(e) {
|
|
1539
1612
|
function r(n) {
|
|
1540
1613
|
return function(i, o, c) {
|
|
1541
|
-
return this.request(
|
|
1614
|
+
return this.request(H(c || {}, {
|
|
1542
1615
|
method: e,
|
|
1543
1616
|
headers: n ? {
|
|
1544
1617
|
"Content-Type": "multipart/form-data"
|
|
@@ -1548,9 +1621,9 @@ a.forEach(["post", "put", "patch"], function(e) {
|
|
|
1548
1621
|
}));
|
|
1549
1622
|
};
|
|
1550
1623
|
}
|
|
1551
|
-
|
|
1624
|
+
M.prototype[e] = r(), M.prototype[e + "Form"] = r(!0);
|
|
1552
1625
|
});
|
|
1553
|
-
let
|
|
1626
|
+
let _n = class qt {
|
|
1554
1627
|
constructor(e) {
|
|
1555
1628
|
if (typeof e != "function")
|
|
1556
1629
|
throw new TypeError("executor must be a function.");
|
|
@@ -1574,7 +1647,7 @@ let on = class Rt {
|
|
|
1574
1647
|
n.unsubscribe(i);
|
|
1575
1648
|
}, o;
|
|
1576
1649
|
}, e(function(i, o, c) {
|
|
1577
|
-
n.reason || (n.reason = new
|
|
1650
|
+
n.reason || (n.reason = new se(i, o, c), r(n.reason));
|
|
1578
1651
|
});
|
|
1579
1652
|
}
|
|
1580
1653
|
/**
|
|
@@ -1616,22 +1689,22 @@ let on = class Rt {
|
|
|
1616
1689
|
static source() {
|
|
1617
1690
|
let e;
|
|
1618
1691
|
return {
|
|
1619
|
-
token: new
|
|
1692
|
+
token: new qt(function(s) {
|
|
1620
1693
|
e = s;
|
|
1621
1694
|
}),
|
|
1622
1695
|
cancel: e
|
|
1623
1696
|
};
|
|
1624
1697
|
}
|
|
1625
1698
|
};
|
|
1626
|
-
function
|
|
1699
|
+
function En(t) {
|
|
1627
1700
|
return function(r) {
|
|
1628
1701
|
return t.apply(null, r);
|
|
1629
1702
|
};
|
|
1630
1703
|
}
|
|
1631
|
-
function
|
|
1704
|
+
function Cn(t) {
|
|
1632
1705
|
return a.isObject(t) && t.isAxiosError === !0;
|
|
1633
1706
|
}
|
|
1634
|
-
const
|
|
1707
|
+
const Oe = {
|
|
1635
1708
|
Continue: 100,
|
|
1636
1709
|
SwitchingProtocols: 101,
|
|
1637
1710
|
Processing: 102,
|
|
@@ -1694,89 +1767,95 @@ const Ee = {
|
|
|
1694
1767
|
InsufficientStorage: 507,
|
|
1695
1768
|
LoopDetected: 508,
|
|
1696
1769
|
NotExtended: 510,
|
|
1697
|
-
NetworkAuthenticationRequired: 511
|
|
1770
|
+
NetworkAuthenticationRequired: 511,
|
|
1771
|
+
WebServerIsDown: 521,
|
|
1772
|
+
ConnectionTimedOut: 522,
|
|
1773
|
+
OriginIsUnreachable: 523,
|
|
1774
|
+
TimeoutOccurred: 524,
|
|
1775
|
+
SslHandshakeFailed: 525,
|
|
1776
|
+
InvalidSslCertificate: 526
|
|
1698
1777
|
};
|
|
1699
|
-
Object.entries(
|
|
1700
|
-
|
|
1778
|
+
Object.entries(Oe).forEach(([t, e]) => {
|
|
1779
|
+
Oe[e] = t;
|
|
1701
1780
|
});
|
|
1702
|
-
function
|
|
1703
|
-
const e = new
|
|
1704
|
-
return a.extend(r,
|
|
1705
|
-
return
|
|
1781
|
+
function It(t) {
|
|
1782
|
+
const e = new M(t), r = gt(M.prototype.request, e);
|
|
1783
|
+
return a.extend(r, M.prototype, e, { allOwnKeys: !0 }), a.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1784
|
+
return It(H(t, s));
|
|
1706
1785
|
}, r;
|
|
1707
1786
|
}
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1787
|
+
const _ = It(ne);
|
|
1788
|
+
_.Axios = M;
|
|
1789
|
+
_.CanceledError = se;
|
|
1790
|
+
_.CancelToken = _n;
|
|
1791
|
+
_.isCancel = Ut;
|
|
1792
|
+
_.VERSION = Bt;
|
|
1793
|
+
_.toFormData = ye;
|
|
1794
|
+
_.AxiosError = m;
|
|
1795
|
+
_.Cancel = _.CanceledError;
|
|
1796
|
+
_.all = function(e) {
|
|
1718
1797
|
return Promise.all(e);
|
|
1719
1798
|
};
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1799
|
+
_.spread = En;
|
|
1800
|
+
_.isAxiosError = Cn;
|
|
1801
|
+
_.mergeConfig = H;
|
|
1802
|
+
_.AxiosHeaders = P;
|
|
1803
|
+
_.formToJSON = (t) => xt(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
1804
|
+
_.getAdapter = vt.getAdapter;
|
|
1805
|
+
_.HttpStatusCode = Oe;
|
|
1806
|
+
_.default = _;
|
|
1728
1807
|
const {
|
|
1729
|
-
Axios:
|
|
1730
|
-
AxiosError:
|
|
1731
|
-
CanceledError:
|
|
1732
|
-
isCancel:
|
|
1733
|
-
CancelToken:
|
|
1734
|
-
VERSION:
|
|
1735
|
-
all:
|
|
1736
|
-
Cancel:
|
|
1737
|
-
isAxiosError:
|
|
1738
|
-
spread:
|
|
1739
|
-
toFormData:
|
|
1740
|
-
AxiosHeaders:
|
|
1741
|
-
HttpStatusCode:
|
|
1742
|
-
formToJSON:
|
|
1743
|
-
getAdapter:
|
|
1744
|
-
mergeConfig:
|
|
1745
|
-
} =
|
|
1746
|
-
class
|
|
1808
|
+
Axios: qs,
|
|
1809
|
+
AxiosError: Re,
|
|
1810
|
+
CanceledError: Is,
|
|
1811
|
+
isCancel: js,
|
|
1812
|
+
CancelToken: $s,
|
|
1813
|
+
VERSION: Ms,
|
|
1814
|
+
all: Hs,
|
|
1815
|
+
Cancel: Vs,
|
|
1816
|
+
isAxiosError: Ks,
|
|
1817
|
+
spread: zs,
|
|
1818
|
+
toFormData: Js,
|
|
1819
|
+
AxiosHeaders: Ws,
|
|
1820
|
+
HttpStatusCode: Qs,
|
|
1821
|
+
formToJSON: Xs,
|
|
1822
|
+
getAdapter: Ys,
|
|
1823
|
+
mergeConfig: Gs
|
|
1824
|
+
} = _;
|
|
1825
|
+
class ut extends Error {
|
|
1747
1826
|
constructor(r) {
|
|
1748
1827
|
super(r.join(", "));
|
|
1749
|
-
|
|
1828
|
+
b(this, "errors");
|
|
1750
1829
|
this.name = "ValidationError", this.errors = r;
|
|
1751
1830
|
}
|
|
1752
1831
|
}
|
|
1753
|
-
class
|
|
1832
|
+
class lt extends Error {
|
|
1754
1833
|
constructor(r) {
|
|
1755
1834
|
super("Address already registered.");
|
|
1756
|
-
|
|
1835
|
+
b(this, "address");
|
|
1757
1836
|
this.name = "AddressInUseError", this.address = r;
|
|
1758
1837
|
}
|
|
1759
1838
|
}
|
|
1760
|
-
class
|
|
1839
|
+
class dt extends Error {
|
|
1761
1840
|
constructor(r) {
|
|
1762
1841
|
super("Code already registered.");
|
|
1763
|
-
|
|
1842
|
+
b(this, "code");
|
|
1764
1843
|
this.name = "CodeInUseError", this.code = r;
|
|
1765
1844
|
}
|
|
1766
1845
|
}
|
|
1767
|
-
class
|
|
1846
|
+
class ft extends Error {
|
|
1768
1847
|
constructor() {
|
|
1769
1848
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1770
1849
|
}
|
|
1771
1850
|
}
|
|
1772
|
-
class
|
|
1851
|
+
class Sn {
|
|
1773
1852
|
constructor(e) {
|
|
1774
|
-
|
|
1775
|
-
|
|
1853
|
+
b(this, "httpClient");
|
|
1854
|
+
b(this, "_debug");
|
|
1776
1855
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1777
1856
|
}
|
|
1778
1857
|
async create(e, r, n, s, i, o, c) {
|
|
1779
|
-
var
|
|
1858
|
+
var f;
|
|
1780
1859
|
try {
|
|
1781
1860
|
await this.httpClient.post({
|
|
1782
1861
|
path: "/affiliates",
|
|
@@ -1792,19 +1871,19 @@ class un {
|
|
|
1792
1871
|
}
|
|
1793
1872
|
});
|
|
1794
1873
|
} catch (l) {
|
|
1795
|
-
if (l instanceof
|
|
1796
|
-
const u = (
|
|
1874
|
+
if (l instanceof Re) {
|
|
1875
|
+
const u = (f = l.response) == null ? void 0 : f.data;
|
|
1797
1876
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1798
|
-
const
|
|
1799
|
-
throw
|
|
1877
|
+
const h = u.message.toLowerCase();
|
|
1878
|
+
throw h == "invalid signature" ? new ft() : h == "address in use" ? new lt(e) : h == "code in use" ? new dt(n) : new Error(h);
|
|
1800
1879
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1801
|
-
throw new
|
|
1880
|
+
throw new ut(u.message);
|
|
1802
1881
|
}
|
|
1803
1882
|
throw l;
|
|
1804
1883
|
}
|
|
1805
1884
|
}
|
|
1806
1885
|
async update(e, r, n, s, i, o, c) {
|
|
1807
|
-
var
|
|
1886
|
+
var f;
|
|
1808
1887
|
try {
|
|
1809
1888
|
await this.httpClient.post({
|
|
1810
1889
|
path: `/affiliates/${e}`,
|
|
@@ -1819,13 +1898,13 @@ class un {
|
|
|
1819
1898
|
}
|
|
1820
1899
|
});
|
|
1821
1900
|
} catch (l) {
|
|
1822
|
-
if (l instanceof
|
|
1823
|
-
const u = (
|
|
1901
|
+
if (l instanceof Re) {
|
|
1902
|
+
const u = (f = l.response) == null ? void 0 : f.data;
|
|
1824
1903
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1825
|
-
const
|
|
1826
|
-
throw
|
|
1904
|
+
const h = u.message.toLowerCase();
|
|
1905
|
+
throw h == "invalid signature" ? new ft() : h == "address in use" ? new lt(e) : h == "code in use" ? new dt(n) : new Error(h);
|
|
1827
1906
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1828
|
-
throw new
|
|
1907
|
+
throw new ut(u.message);
|
|
1829
1908
|
}
|
|
1830
1909
|
throw l;
|
|
1831
1910
|
}
|
|
@@ -1849,31 +1928,31 @@ class un {
|
|
|
1849
1928
|
try {
|
|
1850
1929
|
return (await this.httpClient.get({ path: `/affiliates/${e}`, queryParams: { identifier_type: r } })).data;
|
|
1851
1930
|
} catch (s) {
|
|
1852
|
-
if (s instanceof
|
|
1931
|
+
if (s instanceof Re && ((n = s.response) == null ? void 0 : n.status) === 404)
|
|
1853
1932
|
return null;
|
|
1854
1933
|
throw console.error("Fuul SDK: Could not get affiliate code", s), s;
|
|
1855
1934
|
}
|
|
1856
1935
|
}
|
|
1857
1936
|
}
|
|
1858
|
-
const
|
|
1859
|
-
class
|
|
1937
|
+
const Rn = "/audiences";
|
|
1938
|
+
class An {
|
|
1860
1939
|
constructor(e) {
|
|
1861
|
-
|
|
1862
|
-
|
|
1940
|
+
b(this, "httpClient");
|
|
1941
|
+
b(this, "_debug");
|
|
1863
1942
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1864
1943
|
}
|
|
1865
1944
|
async getUserAudiences(e) {
|
|
1866
1945
|
return (await this.httpClient.get({
|
|
1867
|
-
path: `${
|
|
1946
|
+
path: `${Rn}/audience-segments/user`,
|
|
1868
1947
|
queryParams: { ...e }
|
|
1869
1948
|
})).data;
|
|
1870
1949
|
}
|
|
1871
1950
|
}
|
|
1872
|
-
const
|
|
1873
|
-
class
|
|
1951
|
+
const ht = "/claim-checks";
|
|
1952
|
+
class Tn {
|
|
1874
1953
|
constructor(e) {
|
|
1875
|
-
|
|
1876
|
-
|
|
1954
|
+
b(this, "httpClient");
|
|
1955
|
+
b(this, "_debug");
|
|
1877
1956
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
1878
1957
|
}
|
|
1879
1958
|
/**
|
|
@@ -1885,7 +1964,7 @@ class fn {
|
|
|
1885
1964
|
*/
|
|
1886
1965
|
async getClaimableChecks(e) {
|
|
1887
1966
|
return (await this.httpClient.post({
|
|
1888
|
-
path: `${
|
|
1967
|
+
path: `${ht}/claim`,
|
|
1889
1968
|
postData: {
|
|
1890
1969
|
userIdentifier: e.user_identifier,
|
|
1891
1970
|
userIdentifierType: e.user_identifier_type
|
|
@@ -1901,7 +1980,7 @@ class fn {
|
|
|
1901
1980
|
*/
|
|
1902
1981
|
async getClaimCheckTotals(e) {
|
|
1903
1982
|
return (await this.httpClient.get({
|
|
1904
|
-
path: `${
|
|
1983
|
+
path: `${ht}/totals`,
|
|
1905
1984
|
queryParams: {
|
|
1906
1985
|
user_identifier: e.user_identifier,
|
|
1907
1986
|
user_identifier_type: e.user_identifier_type
|
|
@@ -1909,9 +1988,9 @@ class fn {
|
|
|
1909
1988
|
})).data;
|
|
1910
1989
|
}
|
|
1911
1990
|
}
|
|
1912
|
-
class
|
|
1991
|
+
class Pn {
|
|
1913
1992
|
constructor(e) {
|
|
1914
|
-
|
|
1993
|
+
b(this, "httpClient");
|
|
1915
1994
|
this.httpClient = e.httpClient;
|
|
1916
1995
|
}
|
|
1917
1996
|
async getAll(e) {
|
|
@@ -1919,11 +1998,11 @@ class hn {
|
|
|
1919
1998
|
return r;
|
|
1920
1999
|
}
|
|
1921
2000
|
}
|
|
1922
|
-
const
|
|
1923
|
-
class
|
|
2001
|
+
const pt = "fuul.sent", On = 60, Nn = "connect_wallet", mt = 10;
|
|
2002
|
+
class xn {
|
|
1924
2003
|
constructor(e) {
|
|
1925
|
-
|
|
1926
|
-
|
|
2004
|
+
b(this, "debug");
|
|
2005
|
+
b(this, "httpClient");
|
|
1927
2006
|
this.httpClient = e.httpClient, this.debug = !!e.debug;
|
|
1928
2007
|
}
|
|
1929
2008
|
async sendEvent(e, r) {
|
|
@@ -1941,52 +2020,52 @@ class yn {
|
|
|
1941
2020
|
this.debug && console.debug(`Fuul SDK: Sent '${e.name}' event`), this.saveSentEvent(e);
|
|
1942
2021
|
}
|
|
1943
2022
|
isDuplicate(e) {
|
|
1944
|
-
var u,
|
|
1945
|
-
const r = `${
|
|
2023
|
+
var u, h, g, E;
|
|
2024
|
+
const r = `${pt}_${e.name}`, n = localStorage.getItem(r);
|
|
1946
2025
|
if (!n)
|
|
1947
2026
|
return !1;
|
|
1948
2027
|
const s = JSON.parse(n);
|
|
1949
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
2028
|
+
if (this.getCurrentTimestamp() - s.timestamp > On)
|
|
1950
2029
|
return !1;
|
|
1951
|
-
let
|
|
1952
|
-
e.metadata && (
|
|
2030
|
+
let f = !1;
|
|
2031
|
+
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);
|
|
1953
2032
|
let l = !1;
|
|
1954
|
-
return e.args && s.args && (l = s.args.page === e.args.page), l &&
|
|
2033
|
+
return e.args && s.args && (l = s.args.page === e.args.page), l && f;
|
|
1955
2034
|
}
|
|
1956
2035
|
getCurrentTimestamp() {
|
|
1957
2036
|
return Date.now() / 1e3;
|
|
1958
2037
|
}
|
|
1959
2038
|
saveSentEvent(e) {
|
|
1960
|
-
var o, c,
|
|
1961
|
-
const r = `${
|
|
1962
|
-
if (localStorage.setItem(r, JSON.stringify(i)), e.name ===
|
|
1963
|
-
const u = JSON.parse(localStorage.getItem(n) || "[]"),
|
|
2039
|
+
var o, c, f, l;
|
|
2040
|
+
const r = `${pt}_${e.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...e, timestamp: s };
|
|
2041
|
+
if (localStorage.setItem(r, JSON.stringify(i)), e.name === Nn) {
|
|
2042
|
+
const u = JSON.parse(localStorage.getItem(n) || "[]"), h = {
|
|
1964
2043
|
name: e.name,
|
|
1965
2044
|
user: {
|
|
1966
2045
|
identifier: (o = e.user) == null ? void 0 : o.identifier,
|
|
1967
2046
|
identifier_type: (c = e.user) == null ? void 0 : c.identifier_type
|
|
1968
2047
|
},
|
|
1969
|
-
tracking_id: (
|
|
2048
|
+
tracking_id: (f = e.metadata) == null ? void 0 : f.tracking_id,
|
|
1970
2049
|
page: (l = e.args) == null ? void 0 : l.page
|
|
1971
2050
|
};
|
|
1972
|
-
"user_address" in e && (
|
|
1973
|
-
const g = [...u,
|
|
1974
|
-
g.length >
|
|
2051
|
+
"user_address" in e && (h.user_address = e.user_address);
|
|
2052
|
+
const g = [...u, h];
|
|
2053
|
+
g.length > mt && g.splice(0, g.length - mt), localStorage.setItem(n, JSON.stringify(g));
|
|
1975
2054
|
}
|
|
1976
2055
|
}
|
|
1977
2056
|
}
|
|
1978
|
-
const
|
|
1979
|
-
version:
|
|
2057
|
+
const Un = "0.0.0", Dn = {
|
|
2058
|
+
version: Un
|
|
1980
2059
|
};
|
|
1981
|
-
class
|
|
2060
|
+
class Ln {
|
|
1982
2061
|
constructor(e) {
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
this.client =
|
|
2062
|
+
b(this, "client");
|
|
2063
|
+
b(this, "defaultQueryParams");
|
|
2064
|
+
this.client = _.create({
|
|
1986
2065
|
...e,
|
|
1987
2066
|
headers: {
|
|
1988
2067
|
Authorization: `Bearer ${e.apiKey}`,
|
|
1989
|
-
"X-Fuul-Sdk-Version":
|
|
2068
|
+
"X-Fuul-Sdk-Version": Dn.version
|
|
1990
2069
|
}
|
|
1991
2070
|
}), this.defaultQueryParams = e.queryParams || {};
|
|
1992
2071
|
}
|
|
@@ -2033,9 +2112,9 @@ class bn {
|
|
|
2033
2112
|
});
|
|
2034
2113
|
}
|
|
2035
2114
|
}
|
|
2036
|
-
class
|
|
2115
|
+
class Fn {
|
|
2037
2116
|
constructor(e) {
|
|
2038
|
-
|
|
2117
|
+
b(this, "httpClient");
|
|
2039
2118
|
this.httpClient = e.httpClient;
|
|
2040
2119
|
}
|
|
2041
2120
|
async getPayoutsLeaderboard(e) {
|
|
@@ -2095,40 +2174,40 @@ class _n {
|
|
|
2095
2174
|
})).data;
|
|
2096
2175
|
}
|
|
2097
2176
|
}
|
|
2098
|
-
const
|
|
2099
|
-
class
|
|
2177
|
+
const Z = "/payouts";
|
|
2178
|
+
class kn {
|
|
2100
2179
|
constructor(e) {
|
|
2101
|
-
|
|
2102
|
-
|
|
2180
|
+
b(this, "httpClient");
|
|
2181
|
+
b(this, "_debug");
|
|
2103
2182
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2104
2183
|
}
|
|
2105
2184
|
async getUserPayoutsByConversion(e) {
|
|
2106
2185
|
return (await this.httpClient.get({
|
|
2107
|
-
path:
|
|
2186
|
+
path: Z,
|
|
2108
2187
|
queryParams: { ...e, type: "onchain-currency" }
|
|
2109
2188
|
})).data;
|
|
2110
2189
|
}
|
|
2111
2190
|
async getUserPointsByConversion(e) {
|
|
2112
2191
|
return (await this.httpClient.get({
|
|
2113
|
-
path:
|
|
2192
|
+
path: Z,
|
|
2114
2193
|
queryParams: { ...e, type: "point" }
|
|
2115
2194
|
})).data;
|
|
2116
2195
|
}
|
|
2117
2196
|
async getUserPayoutMovements(e) {
|
|
2118
2197
|
return (await this.httpClient.get({
|
|
2119
|
-
path: `${
|
|
2198
|
+
path: `${Z}/movements`,
|
|
2120
2199
|
queryParams: { ...e, type: "onchain-currency" }
|
|
2121
2200
|
})).data;
|
|
2122
2201
|
}
|
|
2123
2202
|
async getUserPointsMovements(e) {
|
|
2124
2203
|
return (await this.httpClient.get({
|
|
2125
|
-
path: `${
|
|
2204
|
+
path: `${Z}/movements`,
|
|
2126
2205
|
queryParams: { ...e, type: "point" }
|
|
2127
2206
|
})).data;
|
|
2128
2207
|
}
|
|
2129
2208
|
async getPayoutsByReferrer(e) {
|
|
2130
2209
|
return (await this.httpClient.get({
|
|
2131
|
-
path: `${
|
|
2210
|
+
path: `${Z}/by-referrer`,
|
|
2132
2211
|
queryParams: {
|
|
2133
2212
|
user_identifier: e.user_identifier,
|
|
2134
2213
|
user_identifier_type: e.user_identifier_type
|
|
@@ -2136,10 +2215,10 @@ class En {
|
|
|
2136
2215
|
})).data;
|
|
2137
2216
|
}
|
|
2138
2217
|
}
|
|
2139
|
-
class
|
|
2218
|
+
class vn {
|
|
2140
2219
|
constructor(e) {
|
|
2141
|
-
|
|
2142
|
-
|
|
2220
|
+
b(this, "httpClient");
|
|
2221
|
+
b(this, "_debug");
|
|
2143
2222
|
this.httpClient = e.httpClient, this._debug = e.debug;
|
|
2144
2223
|
}
|
|
2145
2224
|
async listUserReferralCodes(e) {
|
|
@@ -2179,14 +2258,14 @@ class Cn {
|
|
|
2179
2258
|
})).data;
|
|
2180
2259
|
}
|
|
2181
2260
|
async useReferralCode(e) {
|
|
2182
|
-
const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c, account_chain_id:
|
|
2261
|
+
const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c, account_chain_id: f } = e;
|
|
2183
2262
|
await this.httpClient.patch({
|
|
2184
2263
|
path: `/referral_codes/${r}/use`,
|
|
2185
2264
|
queryParams: {
|
|
2186
2265
|
user_identifier: n,
|
|
2187
2266
|
user_identifier_type: s,
|
|
2188
2267
|
chain_id: c,
|
|
2189
|
-
account_chain_id:
|
|
2268
|
+
account_chain_id: f
|
|
2190
2269
|
},
|
|
2191
2270
|
postData: {
|
|
2192
2271
|
signature: i,
|
|
@@ -2210,7 +2289,7 @@ class Cn {
|
|
|
2210
2289
|
referrer_identifier: i,
|
|
2211
2290
|
referrer_identifier_type: o,
|
|
2212
2291
|
signature: c,
|
|
2213
|
-
signature_message:
|
|
2292
|
+
signature_message: f,
|
|
2214
2293
|
chain_id: l
|
|
2215
2294
|
} = e;
|
|
2216
2295
|
await this.httpClient.delete({
|
|
@@ -2223,20 +2302,20 @@ class Cn {
|
|
|
2223
2302
|
},
|
|
2224
2303
|
postData: {
|
|
2225
2304
|
signature: c,
|
|
2226
|
-
signature_message:
|
|
2305
|
+
signature_message: f,
|
|
2227
2306
|
chain_id: l
|
|
2228
2307
|
}
|
|
2229
2308
|
});
|
|
2230
2309
|
}
|
|
2231
2310
|
}
|
|
2232
|
-
const
|
|
2233
|
-
let
|
|
2311
|
+
const Bn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2312
|
+
let qn = (t = 21) => {
|
|
2234
2313
|
let e = "", r = crypto.getRandomValues(new Uint8Array(t |= 0));
|
|
2235
2314
|
for (; t--; )
|
|
2236
|
-
e +=
|
|
2315
|
+
e += Bn[r[t] & 63];
|
|
2237
2316
|
return e;
|
|
2238
2317
|
};
|
|
2239
|
-
const
|
|
2318
|
+
const In = "fuul.tracking_id", Fe = () => Kn(In, () => qn()), yt = () => W("af") || W("referrer"), jn = () => document.referrer, $n = () => zn(), Mn = () => W("category"), Hn = () => W("title"), Vn = () => W("tag"), Kn = (t, e) => {
|
|
2240
2319
|
const r = localStorage.getItem(t);
|
|
2241
2320
|
if (r)
|
|
2242
2321
|
return r;
|
|
@@ -2244,42 +2323,42 @@ const An = "fuul.tracking_id", Te = () => Un(An, () => Rn()), et = () => M("af")
|
|
|
2244
2323
|
const n = e();
|
|
2245
2324
|
return n ? localStorage.setItem(t, n) : localStorage.removeItem(t), n;
|
|
2246
2325
|
}
|
|
2247
|
-
},
|
|
2248
|
-
const t =
|
|
2326
|
+
}, W = (t) => new URLSearchParams(window.location.search).get(t), zn = () => {
|
|
2327
|
+
const t = W("source");
|
|
2249
2328
|
if (t)
|
|
2250
2329
|
return t;
|
|
2251
|
-
},
|
|
2252
|
-
class
|
|
2330
|
+
}, Jn = "/user";
|
|
2331
|
+
class Wn {
|
|
2253
2332
|
constructor(e) {
|
|
2254
|
-
|
|
2333
|
+
b(this, "httpClient");
|
|
2255
2334
|
this.httpClient = e.httpClient;
|
|
2256
2335
|
}
|
|
2257
2336
|
async getUserReferrer(e) {
|
|
2258
|
-
return (await this.httpClient.get({ path: `${
|
|
2337
|
+
return (await this.httpClient.get({ path: `${Jn}/referrer`, queryParams: { ...e } })).data;
|
|
2259
2338
|
}
|
|
2260
2339
|
}
|
|
2261
|
-
const
|
|
2262
|
-
let
|
|
2263
|
-
function
|
|
2264
|
-
|
|
2340
|
+
const Qn = "https://api.fuul.xyz/api/v1/";
|
|
2341
|
+
let k = !1, Ne = !1, ke, U, jt, $t, V, ve, we, X, Mt, K, q, Be;
|
|
2342
|
+
function Xn(t) {
|
|
2343
|
+
k = !!t.debug, !Ne && (ke = t.apiKey, Us(), U = Ds(t.baseApiUrl ?? Qn, t.defaultQueryParams ?? {}), jt = new Pn({ httpClient: U, debug: k }), we = new xn({ httpClient: U, debug: k }), V = new Sn({ httpClient: U, debug: k }), ve = new zt({ httpClient: U }), X = new kn({ httpClient: U, debug: k }), $t = new Wn({ httpClient: U }), Mt = new An({ httpClient: U, debug: k }), K = new Fn({ httpClient: U }), q = new vn({ httpClient: U, debug: k }), Be = new Tn({ httpClient: U, debug: k }), Ne = !0, k && console.debug("Fuul SDK: init() complete"));
|
|
2265
2344
|
}
|
|
2266
2345
|
function w() {
|
|
2267
|
-
if (!
|
|
2346
|
+
if (!Ne)
|
|
2268
2347
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2269
2348
|
}
|
|
2270
|
-
async function
|
|
2271
|
-
w(),
|
|
2349
|
+
async function Yn(t, e) {
|
|
2350
|
+
w(), qe(), Ie();
|
|
2272
2351
|
const r = {
|
|
2273
2352
|
name: t,
|
|
2274
2353
|
args: e ?? {},
|
|
2275
2354
|
metadata: {
|
|
2276
|
-
tracking_id:
|
|
2355
|
+
tracking_id: Fe()
|
|
2277
2356
|
}
|
|
2278
2357
|
};
|
|
2279
|
-
await
|
|
2358
|
+
await we.sendEvent(r);
|
|
2280
2359
|
}
|
|
2281
|
-
async function
|
|
2282
|
-
w(),
|
|
2360
|
+
async function Gn(t, e) {
|
|
2361
|
+
w(), qe(), Ie();
|
|
2283
2362
|
const r = {
|
|
2284
2363
|
name: "pageview",
|
|
2285
2364
|
args: {
|
|
@@ -2287,20 +2366,20 @@ async function vn(t, e) {
|
|
|
2287
2366
|
locationOrigin: document.location.origin
|
|
2288
2367
|
},
|
|
2289
2368
|
metadata: {
|
|
2290
|
-
tracking_id:
|
|
2291
|
-
referrer_url:
|
|
2292
|
-
source:
|
|
2293
|
-
affiliate_id:
|
|
2294
|
-
referrer:
|
|
2295
|
-
category:
|
|
2296
|
-
title:
|
|
2297
|
-
tag:
|
|
2369
|
+
tracking_id: Fe(),
|
|
2370
|
+
referrer_url: jn(),
|
|
2371
|
+
source: $n(),
|
|
2372
|
+
affiliate_id: yt() ?? void 0,
|
|
2373
|
+
referrer: yt() ?? void 0,
|
|
2374
|
+
category: Mn() ?? void 0,
|
|
2375
|
+
title: Hn() ?? void 0,
|
|
2376
|
+
tag: Vn() ?? void 0
|
|
2298
2377
|
}
|
|
2299
2378
|
};
|
|
2300
|
-
await
|
|
2379
|
+
await we.sendEvent(r, e);
|
|
2301
2380
|
}
|
|
2302
|
-
async function
|
|
2303
|
-
w(),
|
|
2381
|
+
async function Zn(t, e) {
|
|
2382
|
+
w(), qe(), Ie();
|
|
2304
2383
|
const r = {
|
|
2305
2384
|
name: "connect_wallet",
|
|
2306
2385
|
user: {
|
|
@@ -2312,13 +2391,13 @@ async function In(t, e) {
|
|
|
2312
2391
|
locationOrigin: document.location.origin
|
|
2313
2392
|
},
|
|
2314
2393
|
metadata: {
|
|
2315
|
-
tracking_id:
|
|
2394
|
+
tracking_id: Fe()
|
|
2316
2395
|
}
|
|
2317
2396
|
};
|
|
2318
|
-
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
|
|
2397
|
+
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 we.sendEvent(r, e);
|
|
2319
2398
|
}
|
|
2320
|
-
async function
|
|
2321
|
-
w(), await
|
|
2399
|
+
async function es(t) {
|
|
2400
|
+
w(), await V.create(
|
|
2322
2401
|
t.userIdentifier,
|
|
2323
2402
|
t.identifierType,
|
|
2324
2403
|
t.code,
|
|
@@ -2328,8 +2407,8 @@ async function jn(t) {
|
|
|
2328
2407
|
t.userRebateRate
|
|
2329
2408
|
);
|
|
2330
2409
|
}
|
|
2331
|
-
async function
|
|
2332
|
-
w(), await
|
|
2410
|
+
async function ts(t) {
|
|
2411
|
+
w(), await V.update(
|
|
2333
2412
|
t.userIdentifier,
|
|
2334
2413
|
t.identifierType,
|
|
2335
2414
|
t.code,
|
|
@@ -2339,160 +2418,160 @@ async function $n(t) {
|
|
|
2339
2418
|
t.userRebateRate
|
|
2340
2419
|
);
|
|
2341
2420
|
}
|
|
2342
|
-
async function
|
|
2343
|
-
return w(), await
|
|
2421
|
+
async function rs(t, e) {
|
|
2422
|
+
return w(), await V.getCode(t, e);
|
|
2344
2423
|
}
|
|
2345
|
-
async function
|
|
2346
|
-
return w(), await
|
|
2424
|
+
async function ns(t) {
|
|
2425
|
+
return w(), await V.isCodeFree(t);
|
|
2347
2426
|
}
|
|
2348
|
-
async function
|
|
2349
|
-
return w(), await
|
|
2427
|
+
async function ss(t) {
|
|
2428
|
+
return w(), await V.isCodeAvailable(t);
|
|
2350
2429
|
}
|
|
2351
|
-
async function
|
|
2430
|
+
async function is(t, e, r, n) {
|
|
2352
2431
|
w();
|
|
2353
|
-
const s = await
|
|
2432
|
+
const s = await V.getCode(e, r), i = new URLSearchParams({
|
|
2354
2433
|
af: (s == null ? void 0 : s.code) ?? e
|
|
2355
2434
|
});
|
|
2356
2435
|
return n != null && n.title && i.append("af_title", n.title), n != null && n.format && i.append("af_format", n.format), n != null && n.place && i.append("af_place", n.place), `${t}?${i.toString()}`;
|
|
2357
2436
|
}
|
|
2358
|
-
function
|
|
2359
|
-
return
|
|
2437
|
+
function os(t) {
|
|
2438
|
+
return K.getPayoutsLeaderboard(t);
|
|
2360
2439
|
}
|
|
2361
|
-
function
|
|
2362
|
-
return
|
|
2440
|
+
function as(t) {
|
|
2441
|
+
return K.getPointsLeaderboard(t);
|
|
2363
2442
|
}
|
|
2364
|
-
function
|
|
2365
|
-
return
|
|
2443
|
+
function cs(t) {
|
|
2444
|
+
return K.getReferredUsersLeaderboard(t);
|
|
2366
2445
|
}
|
|
2367
|
-
function
|
|
2368
|
-
return w(),
|
|
2446
|
+
function us(t) {
|
|
2447
|
+
return w(), K.getReferredVolume(t);
|
|
2369
2448
|
}
|
|
2370
|
-
function
|
|
2371
|
-
return w(),
|
|
2449
|
+
function ls(t) {
|
|
2450
|
+
return w(), K.getVolumeLeaderboard(t);
|
|
2372
2451
|
}
|
|
2373
|
-
function
|
|
2374
|
-
return w(),
|
|
2452
|
+
function ds(t) {
|
|
2453
|
+
return w(), K.getRevenueLeaderboard(t);
|
|
2375
2454
|
}
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2455
|
+
function fs(t) {
|
|
2456
|
+
return X.getUserPayoutsByConversion(t);
|
|
2378
2457
|
}
|
|
2379
|
-
function
|
|
2380
|
-
return
|
|
2458
|
+
function hs(t) {
|
|
2459
|
+
return X.getUserPointsByConversion(t);
|
|
2381
2460
|
}
|
|
2382
|
-
function
|
|
2383
|
-
return
|
|
2461
|
+
function ps(t) {
|
|
2462
|
+
return X.getUserPayoutMovements(t);
|
|
2384
2463
|
}
|
|
2385
|
-
function
|
|
2386
|
-
return
|
|
2464
|
+
function ms(t) {
|
|
2465
|
+
return X.getUserPointsMovements(t);
|
|
2387
2466
|
}
|
|
2388
|
-
function
|
|
2389
|
-
return w(),
|
|
2467
|
+
function ys(t) {
|
|
2468
|
+
return w(), X.getPayoutsByReferrer(t);
|
|
2390
2469
|
}
|
|
2391
|
-
async function
|
|
2392
|
-
return w(),
|
|
2470
|
+
async function gs(t) {
|
|
2471
|
+
return w(), jt.getAll(t);
|
|
2393
2472
|
}
|
|
2394
|
-
async function
|
|
2395
|
-
return w(),
|
|
2473
|
+
async function ws(t) {
|
|
2474
|
+
return w(), $t.getUserReferrer(t);
|
|
2396
2475
|
}
|
|
2397
|
-
async function
|
|
2398
|
-
return w(),
|
|
2476
|
+
async function bs(t) {
|
|
2477
|
+
return w(), Mt.getUserAudiences(t);
|
|
2399
2478
|
}
|
|
2400
|
-
async function
|
|
2401
|
-
return w(),
|
|
2479
|
+
async function _s(t) {
|
|
2480
|
+
return w(), q.listUserReferralCodes(t);
|
|
2402
2481
|
}
|
|
2403
|
-
async function
|
|
2404
|
-
return w(),
|
|
2482
|
+
async function Es(t) {
|
|
2483
|
+
return w(), q.generateReferralCodes(t);
|
|
2405
2484
|
}
|
|
2406
|
-
async function
|
|
2407
|
-
return w(),
|
|
2485
|
+
async function Cs(t) {
|
|
2486
|
+
return w(), q.getReferralStatus(t);
|
|
2408
2487
|
}
|
|
2409
|
-
async function
|
|
2410
|
-
return w(),
|
|
2488
|
+
async function Ss(t) {
|
|
2489
|
+
return w(), q.getReferralCode(t);
|
|
2411
2490
|
}
|
|
2412
|
-
async function
|
|
2413
|
-
return w(),
|
|
2491
|
+
async function Rs(t) {
|
|
2492
|
+
return w(), q.useReferralCode(t);
|
|
2414
2493
|
}
|
|
2415
|
-
async function
|
|
2416
|
-
return w(),
|
|
2494
|
+
async function As(t) {
|
|
2495
|
+
return w(), q.updateReferralCode(t);
|
|
2417
2496
|
}
|
|
2418
|
-
async function
|
|
2419
|
-
return w(),
|
|
2497
|
+
async function Ts(t) {
|
|
2498
|
+
return w(), q.deleteReferral(t);
|
|
2420
2499
|
}
|
|
2421
|
-
async function
|
|
2422
|
-
return w(),
|
|
2500
|
+
async function Ps(t) {
|
|
2501
|
+
return w(), ve.getAffiliateStats(t);
|
|
2423
2502
|
}
|
|
2424
|
-
async function
|
|
2425
|
-
return w(),
|
|
2503
|
+
async function Os(t) {
|
|
2504
|
+
return w(), ve.getAffiliateNewTraders(t);
|
|
2426
2505
|
}
|
|
2427
|
-
async function
|
|
2428
|
-
return w(),
|
|
2506
|
+
async function Ns(t) {
|
|
2507
|
+
return w(), Be.getClaimableChecks(t);
|
|
2429
2508
|
}
|
|
2430
|
-
async function
|
|
2431
|
-
return w(),
|
|
2509
|
+
async function xs(t) {
|
|
2510
|
+
return w(), Be.getClaimCheckTotals(t);
|
|
2432
2511
|
}
|
|
2433
|
-
function
|
|
2512
|
+
function qe() {
|
|
2434
2513
|
if (typeof window > "u" || typeof document > "u")
|
|
2435
2514
|
throw new Error("Fuul SDK: Browser context required");
|
|
2436
2515
|
}
|
|
2437
|
-
function
|
|
2516
|
+
function Ie() {
|
|
2438
2517
|
if (navigator.webdriver)
|
|
2439
2518
|
throw new Error("Fuul SDK: Error");
|
|
2440
2519
|
}
|
|
2441
|
-
function
|
|
2442
|
-
if (!
|
|
2520
|
+
function Us() {
|
|
2521
|
+
if (!ke)
|
|
2443
2522
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2444
2523
|
}
|
|
2445
|
-
function
|
|
2446
|
-
return new
|
|
2524
|
+
function Ds(t, e) {
|
|
2525
|
+
return new Ln({
|
|
2447
2526
|
baseURL: t,
|
|
2448
2527
|
timeout: 3e4,
|
|
2449
|
-
apiKey:
|
|
2528
|
+
apiKey: ke,
|
|
2450
2529
|
queryParams: e
|
|
2451
2530
|
});
|
|
2452
2531
|
}
|
|
2453
|
-
const
|
|
2454
|
-
init:
|
|
2455
|
-
sendEvent:
|
|
2456
|
-
sendPageview:
|
|
2457
|
-
identifyUser:
|
|
2458
|
-
generateTrackingLink:
|
|
2459
|
-
getConversions:
|
|
2460
|
-
createAffiliateCode:
|
|
2461
|
-
updateAffiliateCode:
|
|
2462
|
-
getAffiliateCode:
|
|
2463
|
-
isAffiliateCodeFree:
|
|
2464
|
-
isAffiliateCodeAvailable:
|
|
2465
|
-
getPayoutsLeaderboard:
|
|
2466
|
-
getPointsLeaderboard:
|
|
2467
|
-
getReferredUsersLeaderboard:
|
|
2468
|
-
getReferredVolume:
|
|
2469
|
-
getUserAudiences:
|
|
2470
|
-
getUserPayoutsByConversion:
|
|
2471
|
-
getUserPointsByConversion:
|
|
2472
|
-
getUserPointsMovements:
|
|
2473
|
-
getUserPayoutMovements:
|
|
2474
|
-
getPayoutsByReferrer:
|
|
2475
|
-
getUserReferrer:
|
|
2476
|
-
getVolumeLeaderboard:
|
|
2477
|
-
getRevenueLeaderboard:
|
|
2478
|
-
listUserReferralCodes:
|
|
2479
|
-
generateReferralCodes:
|
|
2480
|
-
getReferralStatus:
|
|
2481
|
-
getReferralCode:
|
|
2482
|
-
useReferralCode:
|
|
2483
|
-
updateReferralCode:
|
|
2484
|
-
deleteReferral:
|
|
2485
|
-
getAffiliateStats:
|
|
2486
|
-
getAffiliateNewTraders:
|
|
2487
|
-
getClaimableChecks:
|
|
2488
|
-
getClaimCheckTotals:
|
|
2532
|
+
const Zs = {
|
|
2533
|
+
init: Xn,
|
|
2534
|
+
sendEvent: Yn,
|
|
2535
|
+
sendPageview: Gn,
|
|
2536
|
+
identifyUser: Zn,
|
|
2537
|
+
generateTrackingLink: is,
|
|
2538
|
+
getConversions: gs,
|
|
2539
|
+
createAffiliateCode: es,
|
|
2540
|
+
updateAffiliateCode: ts,
|
|
2541
|
+
getAffiliateCode: rs,
|
|
2542
|
+
isAffiliateCodeFree: ns,
|
|
2543
|
+
isAffiliateCodeAvailable: ss,
|
|
2544
|
+
getPayoutsLeaderboard: os,
|
|
2545
|
+
getPointsLeaderboard: as,
|
|
2546
|
+
getReferredUsersLeaderboard: cs,
|
|
2547
|
+
getReferredVolume: us,
|
|
2548
|
+
getUserAudiences: bs,
|
|
2549
|
+
getUserPayoutsByConversion: fs,
|
|
2550
|
+
getUserPointsByConversion: hs,
|
|
2551
|
+
getUserPointsMovements: ms,
|
|
2552
|
+
getUserPayoutMovements: ps,
|
|
2553
|
+
getPayoutsByReferrer: ys,
|
|
2554
|
+
getUserReferrer: ws,
|
|
2555
|
+
getVolumeLeaderboard: ls,
|
|
2556
|
+
getRevenueLeaderboard: ds,
|
|
2557
|
+
listUserReferralCodes: _s,
|
|
2558
|
+
generateReferralCodes: Es,
|
|
2559
|
+
getReferralStatus: Cs,
|
|
2560
|
+
getReferralCode: Ss,
|
|
2561
|
+
useReferralCode: Rs,
|
|
2562
|
+
updateReferralCode: As,
|
|
2563
|
+
deleteReferral: Ts,
|
|
2564
|
+
getAffiliateStats: Ps,
|
|
2565
|
+
getAffiliateNewTraders: Os,
|
|
2566
|
+
getClaimableChecks: Ns,
|
|
2567
|
+
getClaimCheckTotals: xs
|
|
2489
2568
|
};
|
|
2490
|
-
var
|
|
2569
|
+
var Ls = /* @__PURE__ */ ((t) => (t.EvmAddress = "evm_address", t.SolanaAddress = "solana_address", t.XRPLAddress = "xrpl_address", t.SuiAddress = "sui_address", t.Email = "email", t))(Ls || {});
|
|
2491
2570
|
export {
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2571
|
+
lt as AddressInUseError,
|
|
2572
|
+
dt as CodeInUseError,
|
|
2573
|
+
Zs as Fuul,
|
|
2574
|
+
ft as InvalidSignatureError,
|
|
2575
|
+
Ls as UserIdentifierType,
|
|
2576
|
+
ut as ValidationError
|
|
2498
2577
|
};
|