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