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