@fuul/sdk 7.5.3 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affiliate-portal/AffiliatePortalService.d.ts +2 -1
- package/dist/affiliate-portal/AffiliatePortalService.d.ts.map +1 -1
- package/dist/affiliate-portal/types/index.d.ts +9 -0
- package/dist/affiliate-portal/types/index.d.ts.map +1 -1
- package/dist/affiliates/AffiliateService.d.ts +2 -1
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/core.d.ts +21 -6
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +528 -514
- package/dist/index.umd.js +6 -6
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +11 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (e, t, r) =>
|
|
4
|
-
|
|
1
|
+
var Pt = Object.defineProperty;
|
|
2
|
+
var Ot = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var S = (e, t, r) => Ot(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
const Le = "/affiliate-portal";
|
|
5
|
+
class xt {
|
|
6
|
+
constructor(t) {
|
|
7
|
+
S(this, "httpClient");
|
|
8
|
+
this.httpClient = t.httpClient;
|
|
9
|
+
}
|
|
10
|
+
async getAffiliateStats(t) {
|
|
11
|
+
return (await this.httpClient.get({
|
|
12
|
+
path: `${Le}/stats`,
|
|
13
|
+
queryParams: {
|
|
14
|
+
user_identifier: t.user_identifier
|
|
15
|
+
}
|
|
16
|
+
})).data;
|
|
17
|
+
}
|
|
18
|
+
async getAffiliateNewTraders(t) {
|
|
19
|
+
return (await this.httpClient.get({
|
|
20
|
+
path: `${Le}/new-traders`,
|
|
21
|
+
queryParams: {
|
|
22
|
+
user_identifier: t.user_identifier,
|
|
23
|
+
from: t.from,
|
|
24
|
+
to: t.to
|
|
25
|
+
}
|
|
26
|
+
})).data;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function Ze(e, t) {
|
|
5
30
|
return function() {
|
|
6
31
|
return e.apply(t, arguments);
|
|
7
32
|
};
|
|
8
33
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const r =
|
|
34
|
+
const { toString: Nt } = Object.prototype, { getPrototypeOf: Ce } = Object, { iterator: se, toStringTag: et } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
|
|
35
|
+
const r = Nt.call(t);
|
|
11
36
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
37
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ie(t) === e), oe = (e) => (t) => typeof t === e, { isArray: H } = Array, J = oe("undefined");
|
|
13
38
|
function W(e) {
|
|
14
39
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
40
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
41
|
+
const tt = x("ArrayBuffer");
|
|
42
|
+
function Ut(e) {
|
|
18
43
|
let t;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
44
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
|
|
20
45
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
46
|
+
const Lt = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !== null && typeof e == "object", Dt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
47
|
+
if (ie(e) !== "object")
|
|
23
48
|
return !1;
|
|
24
|
-
const t =
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
26
|
-
},
|
|
49
|
+
const t = Ce(e);
|
|
50
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(se in e);
|
|
51
|
+
}, Ft = (e) => {
|
|
27
52
|
if (!Q(e) || W(e))
|
|
28
53
|
return !1;
|
|
29
54
|
try {
|
|
@@ -31,11 +56,11 @@ const Nt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !==
|
|
|
31
56
|
} catch {
|
|
32
57
|
return !1;
|
|
33
58
|
}
|
|
34
|
-
},
|
|
59
|
+
}, kt = x("Date"), Bt = x("File"), qt = x("Blob"), vt = x("FileList"), It = (e) => Q(e) && P(e.pipe), jt = (e) => {
|
|
35
60
|
let t;
|
|
36
|
-
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t =
|
|
61
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance
|
|
37
62
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
38
|
-
},
|
|
63
|
+
}, $t = x("URLSearchParams"), [Mt, Ht, Kt, Vt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
64
|
function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
40
65
|
if (e === null || typeof e > "u")
|
|
41
66
|
return;
|
|
@@ -46,13 +71,13 @@ function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
|
46
71
|
else {
|
|
47
72
|
if (W(e))
|
|
48
73
|
return;
|
|
49
|
-
const
|
|
74
|
+
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
50
75
|
let c;
|
|
51
|
-
for (n = 0; n <
|
|
52
|
-
c =
|
|
76
|
+
for (n = 0; n < o; n++)
|
|
77
|
+
c = i[n], t.call(null, e[c], c, e);
|
|
53
78
|
}
|
|
54
79
|
}
|
|
55
|
-
function
|
|
80
|
+
function nt(e, t) {
|
|
56
81
|
if (W(e))
|
|
57
82
|
return null;
|
|
58
83
|
t = t.toLowerCase();
|
|
@@ -63,71 +88,71 @@ function tt(e, t) {
|
|
|
63
88
|
return s;
|
|
64
89
|
return null;
|
|
65
90
|
}
|
|
66
|
-
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
91
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !J(e) && e !== B;
|
|
67
92
|
function ye() {
|
|
68
|
-
const { caseless: e } =
|
|
69
|
-
const
|
|
70
|
-
Z(t[
|
|
93
|
+
const { caseless: e } = st(this) && this || {}, t = {}, r = (n, s) => {
|
|
94
|
+
const i = e && nt(t, s) || s;
|
|
95
|
+
Z(t[i]) && Z(n) ? t[i] = ye(t[i], n) : Z(n) ? t[i] = ye({}, n) : H(n) ? t[i] = n.slice() : t[i] = n;
|
|
71
96
|
};
|
|
72
97
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
73
98
|
arguments[n] && X(arguments[n], r);
|
|
74
99
|
return t;
|
|
75
100
|
}
|
|
76
|
-
const
|
|
77
|
-
r && P(s) ? e[
|
|
78
|
-
}, { allOwnKeys: n }), e),
|
|
101
|
+
const Jt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
|
|
102
|
+
r && P(s) ? e[i] = Ze(s, r) : e[i] = s;
|
|
103
|
+
}, { allOwnKeys: n }), e), Wt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Qt = (e, t, r, n) => {
|
|
79
104
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
80
105
|
value: t.prototype
|
|
81
106
|
}), r && Object.assign(e.prototype, r);
|
|
82
|
-
},
|
|
83
|
-
let s,
|
|
107
|
+
}, Xt = (e, t, r, n) => {
|
|
108
|
+
let s, i, o;
|
|
84
109
|
const c = {};
|
|
85
110
|
if (t = t || {}, e == null) return t;
|
|
86
111
|
do {
|
|
87
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
88
|
-
|
|
89
|
-
e = r !== !1 &&
|
|
112
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
113
|
+
o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
114
|
+
e = r !== !1 && Ce(e);
|
|
90
115
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
91
116
|
return t;
|
|
92
|
-
},
|
|
117
|
+
}, Yt = (e, t, r) => {
|
|
93
118
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
94
119
|
const n = e.indexOf(t, r);
|
|
95
120
|
return n !== -1 && n === r;
|
|
96
|
-
},
|
|
121
|
+
}, Gt = (e) => {
|
|
97
122
|
if (!e) return null;
|
|
98
123
|
if (H(e)) return e;
|
|
99
124
|
let t = e.length;
|
|
100
|
-
if (!
|
|
125
|
+
if (!rt(t)) return null;
|
|
101
126
|
const r = new Array(t);
|
|
102
127
|
for (; t-- > 0; )
|
|
103
128
|
r[t] = e[t];
|
|
104
129
|
return r;
|
|
105
|
-
},
|
|
130
|
+
}, Zt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ce(Uint8Array)), er = (e, t) => {
|
|
106
131
|
const n = (e && e[se]).call(e);
|
|
107
132
|
let s;
|
|
108
133
|
for (; (s = n.next()) && !s.done; ) {
|
|
109
|
-
const
|
|
110
|
-
t.call(e,
|
|
134
|
+
const i = s.value;
|
|
135
|
+
t.call(e, i[0], i[1]);
|
|
111
136
|
}
|
|
112
|
-
},
|
|
137
|
+
}, tr = (e, t) => {
|
|
113
138
|
let r;
|
|
114
139
|
const n = [];
|
|
115
140
|
for (; (r = e.exec(t)) !== null; )
|
|
116
141
|
n.push(r);
|
|
117
142
|
return n;
|
|
118
|
-
},
|
|
143
|
+
}, rr = x("HTMLFormElement"), nr = (e) => e.toLowerCase().replace(
|
|
119
144
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
120
145
|
function(r, n, s) {
|
|
121
146
|
return n.toUpperCase() + s;
|
|
122
147
|
}
|
|
123
|
-
),
|
|
148
|
+
), De = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), sr = x("RegExp"), it = (e, t) => {
|
|
124
149
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
125
|
-
X(r, (s,
|
|
126
|
-
let
|
|
127
|
-
(
|
|
150
|
+
X(r, (s, i) => {
|
|
151
|
+
let o;
|
|
152
|
+
(o = t(s, i, e)) !== !1 && (n[i] = o || s);
|
|
128
153
|
}), Object.defineProperties(e, n);
|
|
129
|
-
},
|
|
130
|
-
|
|
154
|
+
}, ir = (e) => {
|
|
155
|
+
it(e, (t, r) => {
|
|
131
156
|
if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
132
157
|
return !1;
|
|
133
158
|
const n = e[r];
|
|
@@ -141,19 +166,19 @@ const Vt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
|
|
|
141
166
|
});
|
|
142
167
|
}
|
|
143
168
|
});
|
|
144
|
-
},
|
|
169
|
+
}, or = (e, t) => {
|
|
145
170
|
const r = {}, n = (s) => {
|
|
146
|
-
s.forEach((
|
|
147
|
-
r[
|
|
171
|
+
s.forEach((i) => {
|
|
172
|
+
r[i] = !0;
|
|
148
173
|
});
|
|
149
174
|
};
|
|
150
175
|
return H(e) ? n(e) : n(String(e).split(t)), r;
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
function
|
|
154
|
-
return !!(e && P(e.append) && e[
|
|
176
|
+
}, ar = () => {
|
|
177
|
+
}, cr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
178
|
+
function ur(e) {
|
|
179
|
+
return !!(e && P(e.append) && e[et] === "FormData" && e[se]);
|
|
155
180
|
}
|
|
156
|
-
const
|
|
181
|
+
const lr = (e) => {
|
|
157
182
|
const t = new Array(10), r = (n, s) => {
|
|
158
183
|
if (Q(n)) {
|
|
159
184
|
if (t.indexOf(n) >= 0)
|
|
@@ -162,82 +187,82 @@ const cr = (e) => {
|
|
|
162
187
|
return n;
|
|
163
188
|
if (!("toJSON" in n)) {
|
|
164
189
|
t[s] = n;
|
|
165
|
-
const
|
|
166
|
-
return X(n, (
|
|
167
|
-
const f = r(
|
|
168
|
-
!J(f) && (
|
|
169
|
-
}), t[s] = void 0,
|
|
190
|
+
const i = H(n) ? [] : {};
|
|
191
|
+
return X(n, (o, c) => {
|
|
192
|
+
const f = r(o, s + 1);
|
|
193
|
+
!J(f) && (i[c] = f);
|
|
194
|
+
}), t[s] = void 0, i;
|
|
170
195
|
}
|
|
171
196
|
}
|
|
172
197
|
return n;
|
|
173
198
|
};
|
|
174
199
|
return r(e, 0);
|
|
175
|
-
},
|
|
176
|
-
s === B &&
|
|
200
|
+
}, fr = x("AsyncFunction"), dr = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), ot = ((e, t) => e ? setImmediate : t ? ((r, n) => (B.addEventListener("message", ({ source: s, data: i }) => {
|
|
201
|
+
s === B && i === r && n.length && n.shift()();
|
|
177
202
|
}, !1), (s) => {
|
|
178
203
|
n.push(s), B.postMessage(r, "*");
|
|
179
204
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
180
205
|
typeof setImmediate == "function",
|
|
181
206
|
P(B.postMessage)
|
|
182
|
-
),
|
|
207
|
+
), hr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || ot, pr = (e) => e != null && P(e[se]), a = {
|
|
183
208
|
isArray: H,
|
|
184
|
-
isArrayBuffer:
|
|
209
|
+
isArrayBuffer: tt,
|
|
185
210
|
isBuffer: W,
|
|
186
|
-
isFormData:
|
|
187
|
-
isArrayBufferView:
|
|
188
|
-
isString:
|
|
189
|
-
isNumber:
|
|
190
|
-
isBoolean:
|
|
211
|
+
isFormData: jt,
|
|
212
|
+
isArrayBufferView: Ut,
|
|
213
|
+
isString: Lt,
|
|
214
|
+
isNumber: rt,
|
|
215
|
+
isBoolean: Dt,
|
|
191
216
|
isObject: Q,
|
|
192
217
|
isPlainObject: Z,
|
|
193
|
-
isEmptyObject:
|
|
194
|
-
isReadableStream:
|
|
195
|
-
isRequest:
|
|
196
|
-
isResponse:
|
|
197
|
-
isHeaders:
|
|
218
|
+
isEmptyObject: Ft,
|
|
219
|
+
isReadableStream: Mt,
|
|
220
|
+
isRequest: Ht,
|
|
221
|
+
isResponse: Kt,
|
|
222
|
+
isHeaders: Vt,
|
|
198
223
|
isUndefined: J,
|
|
199
|
-
isDate:
|
|
200
|
-
isFile:
|
|
201
|
-
isBlob:
|
|
202
|
-
isRegExp:
|
|
224
|
+
isDate: kt,
|
|
225
|
+
isFile: Bt,
|
|
226
|
+
isBlob: qt,
|
|
227
|
+
isRegExp: sr,
|
|
203
228
|
isFunction: P,
|
|
204
|
-
isStream:
|
|
205
|
-
isURLSearchParams:
|
|
206
|
-
isTypedArray:
|
|
207
|
-
isFileList:
|
|
229
|
+
isStream: It,
|
|
230
|
+
isURLSearchParams: $t,
|
|
231
|
+
isTypedArray: Zt,
|
|
232
|
+
isFileList: vt,
|
|
208
233
|
forEach: X,
|
|
209
234
|
merge: ye,
|
|
210
|
-
extend:
|
|
211
|
-
trim:
|
|
212
|
-
stripBOM:
|
|
213
|
-
inherits:
|
|
214
|
-
toFlatObject:
|
|
215
|
-
kindOf:
|
|
235
|
+
extend: Jt,
|
|
236
|
+
trim: zt,
|
|
237
|
+
stripBOM: Wt,
|
|
238
|
+
inherits: Qt,
|
|
239
|
+
toFlatObject: Xt,
|
|
240
|
+
kindOf: ie,
|
|
216
241
|
kindOfTest: x,
|
|
217
|
-
endsWith:
|
|
218
|
-
toArray:
|
|
219
|
-
forEachEntry:
|
|
220
|
-
matchAll:
|
|
221
|
-
isHTMLForm:
|
|
222
|
-
hasOwnProperty:
|
|
223
|
-
hasOwnProp:
|
|
242
|
+
endsWith: Yt,
|
|
243
|
+
toArray: Gt,
|
|
244
|
+
forEachEntry: er,
|
|
245
|
+
matchAll: tr,
|
|
246
|
+
isHTMLForm: rr,
|
|
247
|
+
hasOwnProperty: De,
|
|
248
|
+
hasOwnProp: De,
|
|
224
249
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
225
|
-
reduceDescriptors:
|
|
226
|
-
freezeMethods:
|
|
227
|
-
toObjectSet:
|
|
228
|
-
toCamelCase:
|
|
229
|
-
noop:
|
|
230
|
-
toFiniteNumber:
|
|
231
|
-
findKey:
|
|
250
|
+
reduceDescriptors: it,
|
|
251
|
+
freezeMethods: ir,
|
|
252
|
+
toObjectSet: or,
|
|
253
|
+
toCamelCase: nr,
|
|
254
|
+
noop: ar,
|
|
255
|
+
toFiniteNumber: cr,
|
|
256
|
+
findKey: nt,
|
|
232
257
|
global: B,
|
|
233
|
-
isContextDefined:
|
|
234
|
-
isSpecCompliantForm:
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
238
|
-
setImmediate:
|
|
239
|
-
asap:
|
|
240
|
-
isIterable:
|
|
258
|
+
isContextDefined: st,
|
|
259
|
+
isSpecCompliantForm: ur,
|
|
260
|
+
toJSONObject: lr,
|
|
261
|
+
isAsyncFn: fr,
|
|
262
|
+
isThenable: dr,
|
|
263
|
+
setImmediate: ot,
|
|
264
|
+
asap: hr,
|
|
265
|
+
isIterable: pr
|
|
241
266
|
};
|
|
242
267
|
function m(e, t, r, n, s) {
|
|
243
268
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), r && (this.config = r), n && (this.request = n), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -263,7 +288,7 @@ a.inherits(m, Error, {
|
|
|
263
288
|
};
|
|
264
289
|
}
|
|
265
290
|
});
|
|
266
|
-
const
|
|
291
|
+
const at = m.prototype, ct = {};
|
|
267
292
|
[
|
|
268
293
|
"ERR_BAD_OPTION_VALUE",
|
|
269
294
|
"ERR_BAD_OPTION",
|
|
@@ -279,32 +304,32 @@ const ot = m.prototype, it = {};
|
|
|
279
304
|
"ERR_INVALID_URL"
|
|
280
305
|
// eslint-disable-next-line func-names
|
|
281
306
|
].forEach((e) => {
|
|
282
|
-
|
|
307
|
+
ct[e] = { value: e };
|
|
283
308
|
});
|
|
284
|
-
Object.defineProperties(m,
|
|
285
|
-
Object.defineProperty(
|
|
286
|
-
m.from = (e, t, r, n, s,
|
|
287
|
-
const
|
|
288
|
-
return a.toFlatObject(e,
|
|
309
|
+
Object.defineProperties(m, ct);
|
|
310
|
+
Object.defineProperty(at, "isAxiosError", { value: !0 });
|
|
311
|
+
m.from = (e, t, r, n, s, i) => {
|
|
312
|
+
const o = Object.create(at);
|
|
313
|
+
return a.toFlatObject(e, o, function(f) {
|
|
289
314
|
return f !== Error.prototype;
|
|
290
|
-
}, (c) => c !== "isAxiosError"), m.call(
|
|
315
|
+
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, r, n, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
291
316
|
};
|
|
292
|
-
const
|
|
317
|
+
const mr = null;
|
|
293
318
|
function ge(e) {
|
|
294
319
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
320
|
}
|
|
296
|
-
function
|
|
321
|
+
function ut(e) {
|
|
297
322
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
323
|
}
|
|
299
|
-
function
|
|
300
|
-
return e ? e.concat(t).map(function(s,
|
|
301
|
-
return s =
|
|
324
|
+
function Fe(e, t, r) {
|
|
325
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
326
|
+
return s = ut(s), !r && i ? "[" + s + "]" : s;
|
|
302
327
|
}).join(r ? "." : "") : t;
|
|
303
328
|
}
|
|
304
|
-
function
|
|
329
|
+
function yr(e) {
|
|
305
330
|
return a.isArray(e) && !e.some(ge);
|
|
306
331
|
}
|
|
307
|
-
const
|
|
332
|
+
const gr = a.toFlatObject(a, {}, null, function(t) {
|
|
308
333
|
return /^is[A-Z]/.test(t);
|
|
309
334
|
});
|
|
310
335
|
function ae(e, t, r) {
|
|
@@ -317,7 +342,7 @@ function ae(e, t, r) {
|
|
|
317
342
|
}, !1, function(y, p) {
|
|
318
343
|
return !a.isUndefined(p[y]);
|
|
319
344
|
});
|
|
320
|
-
const n = r.metaTokens, s = r.visitor || l,
|
|
345
|
+
const n = r.metaTokens, s = r.visitor || l, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
321
346
|
if (!a.isFunction(s))
|
|
322
347
|
throw new TypeError("visitor must be a function");
|
|
323
348
|
function u(h) {
|
|
@@ -335,18 +360,18 @@ function ae(e, t, r) {
|
|
|
335
360
|
if (h && !p && typeof h == "object") {
|
|
336
361
|
if (a.endsWith(y, "{}"))
|
|
337
362
|
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
338
|
-
else if (a.isArray(h) &&
|
|
339
|
-
return y =
|
|
363
|
+
else if (a.isArray(h) && yr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
|
|
364
|
+
return y = ut(y), b.forEach(function(R, L) {
|
|
340
365
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
341
366
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
367
|
+
o === !0 ? Fe([y], L, i) : o === null ? y : y + "[]",
|
|
343
368
|
u(R)
|
|
344
369
|
);
|
|
345
370
|
}), !1;
|
|
346
371
|
}
|
|
347
|
-
return ge(h) ? !0 : (t.append(
|
|
372
|
+
return ge(h) ? !0 : (t.append(Fe(p, y, i), u(h)), !1);
|
|
348
373
|
}
|
|
349
|
-
const d = [], g = Object.assign(
|
|
374
|
+
const d = [], g = Object.assign(gr, {
|
|
350
375
|
defaultVisitor: l,
|
|
351
376
|
convertValue: u,
|
|
352
377
|
isVisitable: ge
|
|
@@ -370,7 +395,7 @@ function ae(e, t, r) {
|
|
|
370
395
|
throw new TypeError("data must be an object");
|
|
371
396
|
return w(e), t;
|
|
372
397
|
}
|
|
373
|
-
function
|
|
398
|
+
function ke(e) {
|
|
374
399
|
const t = {
|
|
375
400
|
"!": "%21",
|
|
376
401
|
"'": "%27",
|
|
@@ -387,37 +412,37 @@ function De(e) {
|
|
|
387
412
|
function Re(e, t) {
|
|
388
413
|
this._pairs = [], e && ae(e, this, t);
|
|
389
414
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
415
|
+
const lt = Re.prototype;
|
|
416
|
+
lt.append = function(t, r) {
|
|
392
417
|
this._pairs.push([t, r]);
|
|
393
418
|
};
|
|
394
|
-
|
|
419
|
+
lt.toString = function(t) {
|
|
395
420
|
const r = t ? function(n) {
|
|
396
|
-
return t.call(this, n,
|
|
397
|
-
} :
|
|
421
|
+
return t.call(this, n, ke);
|
|
422
|
+
} : ke;
|
|
398
423
|
return this._pairs.map(function(s) {
|
|
399
424
|
return r(s[0]) + "=" + r(s[1]);
|
|
400
425
|
}, "").join("&");
|
|
401
426
|
};
|
|
402
|
-
function
|
|
427
|
+
function wr(e) {
|
|
403
428
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
404
429
|
}
|
|
405
|
-
function
|
|
430
|
+
function ft(e, t, r) {
|
|
406
431
|
if (!t)
|
|
407
432
|
return e;
|
|
408
|
-
const n = r && r.encode ||
|
|
433
|
+
const n = r && r.encode || wr;
|
|
409
434
|
a.isFunction(r) && (r = {
|
|
410
435
|
serialize: r
|
|
411
436
|
});
|
|
412
437
|
const s = r && r.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (s ?
|
|
415
|
-
const
|
|
416
|
-
|
|
438
|
+
let i;
|
|
439
|
+
if (s ? i = s(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new Re(t, r).toString(n), i) {
|
|
440
|
+
const o = e.indexOf("#");
|
|
441
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
442
|
}
|
|
418
443
|
return e;
|
|
419
444
|
}
|
|
420
|
-
class
|
|
445
|
+
class Be {
|
|
421
446
|
constructor() {
|
|
422
447
|
this.handlers = [];
|
|
423
448
|
}
|
|
@@ -471,66 +496,66 @@ class Fe {
|
|
|
471
496
|
});
|
|
472
497
|
}
|
|
473
498
|
}
|
|
474
|
-
const
|
|
499
|
+
const dt = {
|
|
475
500
|
silentJSONParsing: !0,
|
|
476
501
|
forcedJSONParsing: !0,
|
|
477
502
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
503
|
+
}, br = typeof URLSearchParams < "u" ? URLSearchParams : Re, Er = typeof FormData < "u" ? FormData : null, Sr = typeof Blob < "u" ? Blob : null, _r = {
|
|
479
504
|
isBrowser: !0,
|
|
480
505
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
506
|
+
URLSearchParams: br,
|
|
507
|
+
FormData: Er,
|
|
508
|
+
Blob: Sr
|
|
484
509
|
},
|
|
485
510
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0,
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
511
|
+
}, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Cr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Rr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
512
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ar = Ae && window.location.href || "http://localhost", Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
513
|
__proto__: null,
|
|
489
514
|
hasBrowserEnv: Ae,
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
515
|
+
hasStandardBrowserEnv: Cr,
|
|
516
|
+
hasStandardBrowserWebWorkerEnv: Rr,
|
|
492
517
|
navigator: we,
|
|
493
|
-
origin:
|
|
518
|
+
origin: Ar
|
|
494
519
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
520
|
+
...Tr,
|
|
521
|
+
..._r
|
|
497
522
|
};
|
|
498
|
-
function
|
|
523
|
+
function Pr(e, t) {
|
|
499
524
|
return ae(e, new A.classes.URLSearchParams(), {
|
|
500
|
-
visitor: function(r, n, s,
|
|
501
|
-
return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) :
|
|
525
|
+
visitor: function(r, n, s, i) {
|
|
526
|
+
return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
527
|
},
|
|
503
528
|
...t
|
|
504
529
|
});
|
|
505
530
|
}
|
|
506
|
-
function
|
|
531
|
+
function Or(e) {
|
|
507
532
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
533
|
}
|
|
509
|
-
function
|
|
534
|
+
function xr(e) {
|
|
510
535
|
const t = {}, r = Object.keys(e);
|
|
511
536
|
let n;
|
|
512
537
|
const s = r.length;
|
|
513
|
-
let
|
|
538
|
+
let i;
|
|
514
539
|
for (n = 0; n < s; n++)
|
|
515
|
-
|
|
540
|
+
i = r[n], t[i] = e[i];
|
|
516
541
|
return t;
|
|
517
542
|
}
|
|
518
|
-
function
|
|
519
|
-
function t(r, n, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const c = Number.isFinite(+
|
|
523
|
-
return
|
|
543
|
+
function ht(e) {
|
|
544
|
+
function t(r, n, s, i) {
|
|
545
|
+
let o = r[i++];
|
|
546
|
+
if (o === "__proto__") return !0;
|
|
547
|
+
const c = Number.isFinite(+o), f = i >= r.length;
|
|
548
|
+
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] = []), t(r, n, s[o], i) && a.isArray(s[o]) && (s[o] = xr(s[o])), !c);
|
|
524
549
|
}
|
|
525
550
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
551
|
const r = {};
|
|
527
552
|
return a.forEachEntry(e, (n, s) => {
|
|
528
|
-
t(
|
|
553
|
+
t(Or(n), s, r, 0);
|
|
529
554
|
}), r;
|
|
530
555
|
}
|
|
531
556
|
return null;
|
|
532
557
|
}
|
|
533
|
-
function
|
|
558
|
+
function Nr(e, t, r) {
|
|
534
559
|
if (a.isString(e))
|
|
535
560
|
try {
|
|
536
561
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -541,12 +566,12 @@ function Or(e, t, r) {
|
|
|
541
566
|
return (0, JSON.stringify)(e);
|
|
542
567
|
}
|
|
543
568
|
const Y = {
|
|
544
|
-
transitional:
|
|
569
|
+
transitional: dt,
|
|
545
570
|
adapter: ["xhr", "http", "fetch"],
|
|
546
571
|
transformRequest: [function(t, r) {
|
|
547
|
-
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
549
|
-
return s ? JSON.stringify(
|
|
572
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(t);
|
|
573
|
+
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
574
|
+
return s ? JSON.stringify(ht(t)) : t;
|
|
550
575
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
551
576
|
return t;
|
|
552
577
|
if (a.isArrayBufferView(t))
|
|
@@ -554,9 +579,9 @@ const Y = {
|
|
|
554
579
|
if (a.isURLSearchParams(t))
|
|
555
580
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
556
581
|
let c;
|
|
557
|
-
if (
|
|
582
|
+
if (i) {
|
|
558
583
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
584
|
+
return Pr(t, this.formSerializer).toString();
|
|
560
585
|
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
561
586
|
const f = this.env && this.env.FormData;
|
|
562
587
|
return ae(
|
|
@@ -566,18 +591,18 @@ const Y = {
|
|
|
566
591
|
);
|
|
567
592
|
}
|
|
568
593
|
}
|
|
569
|
-
return
|
|
594
|
+
return i || s ? (r.setContentType("application/json", !1), Nr(t)) : t;
|
|
570
595
|
}],
|
|
571
596
|
transformResponse: [function(t) {
|
|
572
597
|
const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
573
598
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
574
599
|
return t;
|
|
575
600
|
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
576
|
-
const
|
|
601
|
+
const o = !(r && r.silentJSONParsing) && s;
|
|
577
602
|
try {
|
|
578
603
|
return JSON.parse(t);
|
|
579
604
|
} catch (c) {
|
|
580
|
-
if (
|
|
605
|
+
if (o)
|
|
581
606
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
582
607
|
}
|
|
583
608
|
}
|
|
@@ -609,7 +634,7 @@ const Y = {
|
|
|
609
634
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
635
|
Y.headers[e] = {};
|
|
611
636
|
});
|
|
612
|
-
const
|
|
637
|
+
const Ur = a.toObjectSet([
|
|
613
638
|
"age",
|
|
614
639
|
"authorization",
|
|
615
640
|
"content-length",
|
|
@@ -627,28 +652,28 @@ const xr = a.toObjectSet([
|
|
|
627
652
|
"referer",
|
|
628
653
|
"retry-after",
|
|
629
654
|
"user-agent"
|
|
630
|
-
]),
|
|
655
|
+
]), Lr = (e) => {
|
|
631
656
|
const t = {};
|
|
632
657
|
let r, n, s;
|
|
633
658
|
return e && e.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
s =
|
|
659
|
+
`).forEach(function(o) {
|
|
660
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && Ur[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
636
661
|
}), t;
|
|
637
|
-
},
|
|
662
|
+
}, qe = Symbol("internals");
|
|
638
663
|
function z(e) {
|
|
639
664
|
return e && String(e).trim().toLowerCase();
|
|
640
665
|
}
|
|
641
666
|
function ee(e) {
|
|
642
667
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
|
|
643
668
|
}
|
|
644
|
-
function
|
|
669
|
+
function Dr(e) {
|
|
645
670
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
671
|
let n;
|
|
647
672
|
for (; n = r.exec(e); )
|
|
648
673
|
t[n[1]] = n[2];
|
|
649
674
|
return t;
|
|
650
675
|
}
|
|
651
|
-
const
|
|
676
|
+
const Fr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
677
|
function de(e, t, r, n, s) {
|
|
653
678
|
if (a.isFunction(n))
|
|
654
679
|
return n.call(this, t, r);
|
|
@@ -659,15 +684,15 @@ function de(e, t, r, n, s) {
|
|
|
659
684
|
return n.test(t);
|
|
660
685
|
}
|
|
661
686
|
}
|
|
662
|
-
function
|
|
687
|
+
function kr(e) {
|
|
663
688
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
664
689
|
}
|
|
665
|
-
function
|
|
690
|
+
function Br(e, t) {
|
|
666
691
|
const r = a.toCamelCase(" " + t);
|
|
667
692
|
["get", "set", "has"].forEach((n) => {
|
|
668
693
|
Object.defineProperty(e, n + r, {
|
|
669
|
-
value: function(s,
|
|
670
|
-
return this[n].call(this, t, s,
|
|
694
|
+
value: function(s, i, o) {
|
|
695
|
+
return this[n].call(this, t, s, i, o);
|
|
671
696
|
},
|
|
672
697
|
configurable: !0
|
|
673
698
|
});
|
|
@@ -679,18 +704,18 @@ let O = class {
|
|
|
679
704
|
}
|
|
680
705
|
set(t, r, n) {
|
|
681
706
|
const s = this;
|
|
682
|
-
function
|
|
707
|
+
function i(c, f, u) {
|
|
683
708
|
const l = z(f);
|
|
684
709
|
if (!l)
|
|
685
710
|
throw new Error("header name must be a non-empty string");
|
|
686
711
|
const d = a.findKey(s, l);
|
|
687
712
|
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = ee(c));
|
|
688
713
|
}
|
|
689
|
-
const
|
|
714
|
+
const o = (c, f) => a.forEach(c, (u, l) => i(u, l, f));
|
|
690
715
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
|
-
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
693
|
-
|
|
716
|
+
o(t, r);
|
|
717
|
+
else if (a.isString(t) && (t = t.trim()) && !Fr(t))
|
|
718
|
+
o(Lr(t), r);
|
|
694
719
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
720
|
let c = {}, f, u;
|
|
696
721
|
for (const l of t) {
|
|
@@ -698,9 +723,9 @@ let O = class {
|
|
|
698
723
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
724
|
c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
700
725
|
}
|
|
701
|
-
|
|
726
|
+
o(c, r);
|
|
702
727
|
} else
|
|
703
|
-
t != null &&
|
|
728
|
+
t != null && i(r, t, n);
|
|
704
729
|
return this;
|
|
705
730
|
}
|
|
706
731
|
get(t, r) {
|
|
@@ -711,7 +736,7 @@ let O = class {
|
|
|
711
736
|
if (!r)
|
|
712
737
|
return s;
|
|
713
738
|
if (r === !0)
|
|
714
|
-
return
|
|
739
|
+
return Dr(s);
|
|
715
740
|
if (a.isFunction(r))
|
|
716
741
|
return r.call(this, s, n);
|
|
717
742
|
if (a.isRegExp(r))
|
|
@@ -730,33 +755,33 @@ let O = class {
|
|
|
730
755
|
delete(t, r) {
|
|
731
756
|
const n = this;
|
|
732
757
|
let s = !1;
|
|
733
|
-
function o
|
|
734
|
-
if (
|
|
735
|
-
const c = a.findKey(n,
|
|
758
|
+
function i(o) {
|
|
759
|
+
if (o = z(o), o) {
|
|
760
|
+
const c = a.findKey(n, o);
|
|
736
761
|
c && (!r || de(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
737
762
|
}
|
|
738
763
|
}
|
|
739
|
-
return a.isArray(t) ? t.forEach(
|
|
764
|
+
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
740
765
|
}
|
|
741
766
|
clear(t) {
|
|
742
767
|
const r = Object.keys(this);
|
|
743
768
|
let n = r.length, s = !1;
|
|
744
769
|
for (; n--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!t || de(this, this[
|
|
770
|
+
const i = r[n];
|
|
771
|
+
(!t || de(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
747
772
|
}
|
|
748
773
|
return s;
|
|
749
774
|
}
|
|
750
775
|
normalize(t) {
|
|
751
776
|
const r = this, n = {};
|
|
752
|
-
return a.forEach(this, (s,
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
777
|
+
return a.forEach(this, (s, i) => {
|
|
778
|
+
const o = a.findKey(n, i);
|
|
779
|
+
if (o) {
|
|
780
|
+
r[o] = ee(s), delete r[i];
|
|
756
781
|
return;
|
|
757
782
|
}
|
|
758
|
-
const c = t ?
|
|
759
|
-
c !==
|
|
783
|
+
const c = t ? kr(i) : String(i).trim();
|
|
784
|
+
c !== i && delete r[i], r[c] = ee(s), n[c] = !0;
|
|
760
785
|
}), this;
|
|
761
786
|
}
|
|
762
787
|
concat(...t) {
|
|
@@ -789,14 +814,14 @@ let O = class {
|
|
|
789
814
|
return r.forEach((s) => n.set(s)), n;
|
|
790
815
|
}
|
|
791
816
|
static accessor(t) {
|
|
792
|
-
const n = (this[
|
|
817
|
+
const n = (this[qe] = this[qe] = {
|
|
793
818
|
accessors: {}
|
|
794
819
|
}).accessors, s = this.prototype;
|
|
795
|
-
function o
|
|
796
|
-
const c = z(
|
|
797
|
-
n[c] || (
|
|
820
|
+
function i(o) {
|
|
821
|
+
const c = z(o);
|
|
822
|
+
n[c] || (Br(s, o), n[c] = !0);
|
|
798
823
|
}
|
|
799
|
-
return a.isArray(t) ? t.forEach(
|
|
824
|
+
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
825
|
}
|
|
801
826
|
};
|
|
802
827
|
O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -812,12 +837,12 @@ a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
|
812
837
|
a.freezeMethods(O);
|
|
813
838
|
function he(e, t) {
|
|
814
839
|
const r = this || Y, n = t || r, s = O.from(n.headers);
|
|
815
|
-
let
|
|
840
|
+
let i = n.data;
|
|
816
841
|
return a.forEach(e, function(c) {
|
|
817
|
-
|
|
818
|
-
}), s.normalize(),
|
|
842
|
+
i = c.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
843
|
+
}), s.normalize(), i;
|
|
819
844
|
}
|
|
820
|
-
function
|
|
845
|
+
function pt(e) {
|
|
821
846
|
return !!(e && e.__CANCEL__);
|
|
822
847
|
}
|
|
823
848
|
function K(e, t, r) {
|
|
@@ -826,7 +851,7 @@ function K(e, t, r) {
|
|
|
826
851
|
a.inherits(K, m, {
|
|
827
852
|
__CANCEL__: !0
|
|
828
853
|
});
|
|
829
|
-
function
|
|
854
|
+
function mt(e, t, r) {
|
|
830
855
|
const n = r.config.validateStatus;
|
|
831
856
|
!r.status || !n || n(r.status) ? e(r) : t(new m(
|
|
832
857
|
"Request failed with status code " + r.status,
|
|
@@ -836,73 +861,73 @@ function ht(e, t, r) {
|
|
|
836
861
|
r
|
|
837
862
|
));
|
|
838
863
|
}
|
|
839
|
-
function
|
|
864
|
+
function qr(e) {
|
|
840
865
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
866
|
return t && t[1] || "";
|
|
842
867
|
}
|
|
843
|
-
function
|
|
868
|
+
function vr(e, t) {
|
|
844
869
|
e = e || 10;
|
|
845
870
|
const r = new Array(e), n = new Array(e);
|
|
846
|
-
let s = 0,
|
|
871
|
+
let s = 0, i = 0, o;
|
|
847
872
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
848
|
-
const u = Date.now(), l = n[
|
|
849
|
-
|
|
850
|
-
let d =
|
|
873
|
+
const u = Date.now(), l = n[i];
|
|
874
|
+
o || (o = u), r[s] = f, n[s] = u;
|
|
875
|
+
let d = i, g = 0;
|
|
851
876
|
for (; d !== s; )
|
|
852
877
|
g += r[d++], d = d % e;
|
|
853
|
-
if (s = (s + 1) % e, s ===
|
|
878
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
|
|
854
879
|
return;
|
|
855
880
|
const w = l && u - l;
|
|
856
881
|
return w ? Math.round(g * 1e3 / w) : void 0;
|
|
857
882
|
};
|
|
858
883
|
}
|
|
859
|
-
function
|
|
860
|
-
let r = 0, n = 1e3 / t, s,
|
|
861
|
-
const
|
|
862
|
-
r = l, s = null,
|
|
884
|
+
function Ir(e, t) {
|
|
885
|
+
let r = 0, n = 1e3 / t, s, i;
|
|
886
|
+
const o = (u, l = Date.now()) => {
|
|
887
|
+
r = l, s = null, i && (clearTimeout(i), i = null), e(...u);
|
|
863
888
|
};
|
|
864
889
|
return [(...u) => {
|
|
865
890
|
const l = Date.now(), d = l - r;
|
|
866
|
-
d >= n ?
|
|
867
|
-
|
|
891
|
+
d >= n ? o(u, l) : (s = u, i || (i = setTimeout(() => {
|
|
892
|
+
i = null, o(s);
|
|
868
893
|
}, n - d)));
|
|
869
|
-
}, () => s &&
|
|
894
|
+
}, () => s && o(s)];
|
|
870
895
|
}
|
|
871
896
|
const re = (e, t, r = 3) => {
|
|
872
897
|
let n = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
875
|
-
const
|
|
876
|
-
n =
|
|
898
|
+
const s = vr(50, 250);
|
|
899
|
+
return Ir((i) => {
|
|
900
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, u = s(f), l = o <= c;
|
|
901
|
+
n = o;
|
|
877
902
|
const d = {
|
|
878
|
-
loaded:
|
|
903
|
+
loaded: o,
|
|
879
904
|
total: c,
|
|
880
|
-
progress: c ?
|
|
905
|
+
progress: c ? o / c : void 0,
|
|
881
906
|
bytes: f,
|
|
882
907
|
rate: u || void 0,
|
|
883
|
-
estimated: u && c && l ? (c -
|
|
884
|
-
event:
|
|
908
|
+
estimated: u && c && l ? (c - o) / u : void 0,
|
|
909
|
+
event: i,
|
|
885
910
|
lengthComputable: c != null,
|
|
886
911
|
[t ? "download" : "upload"]: !0
|
|
887
912
|
};
|
|
888
913
|
e(d);
|
|
889
914
|
}, r);
|
|
890
|
-
},
|
|
915
|
+
}, ve = (e, t) => {
|
|
891
916
|
const r = e != null;
|
|
892
917
|
return [(n) => t[0]({
|
|
893
918
|
lengthComputable: r,
|
|
894
919
|
total: e,
|
|
895
920
|
loaded: n
|
|
896
921
|
}), t[1]];
|
|
897
|
-
},
|
|
922
|
+
}, Ie = (e) => (...t) => a.asap(() => e(...t)), jr = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, A.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
898
923
|
new URL(A.origin),
|
|
899
924
|
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
925
|
+
) : () => !0, $r = A.hasStandardBrowserEnv ? (
|
|
901
926
|
// Standard browser envs support document.cookie
|
|
902
927
|
{
|
|
903
|
-
write(e, t, r, n, s,
|
|
904
|
-
const
|
|
905
|
-
a.isNumber(r) &&
|
|
928
|
+
write(e, t, r, n, s, i) {
|
|
929
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
930
|
+
a.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), a.isString(n) && o.push("path=" + n), a.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
906
931
|
},
|
|
907
932
|
read(e) {
|
|
908
933
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -924,17 +949,17 @@ const re = (e, t, r = 3) => {
|
|
|
924
949
|
}
|
|
925
950
|
}
|
|
926
951
|
);
|
|
927
|
-
function
|
|
952
|
+
function Mr(e) {
|
|
928
953
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
929
954
|
}
|
|
930
|
-
function
|
|
955
|
+
function Hr(e, t) {
|
|
931
956
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
957
|
}
|
|
933
|
-
function
|
|
934
|
-
let n = !
|
|
935
|
-
return e && (n || r == !1) ?
|
|
958
|
+
function yt(e, t, r) {
|
|
959
|
+
let n = !Mr(t);
|
|
960
|
+
return e && (n || r == !1) ? Hr(e, t) : t;
|
|
936
961
|
}
|
|
937
|
-
const
|
|
962
|
+
const je = (e) => e instanceof O ? { ...e } : e;
|
|
938
963
|
function v(e, t) {
|
|
939
964
|
t = t || {};
|
|
940
965
|
const r = {};
|
|
@@ -947,11 +972,11 @@ function v(e, t) {
|
|
|
947
972
|
return n(void 0, u, d, g);
|
|
948
973
|
} else return n(u, l, d, g);
|
|
949
974
|
}
|
|
950
|
-
function
|
|
975
|
+
function i(u, l) {
|
|
951
976
|
if (!a.isUndefined(l))
|
|
952
977
|
return n(void 0, l);
|
|
953
978
|
}
|
|
954
|
-
function
|
|
979
|
+
function o(u, l) {
|
|
955
980
|
if (a.isUndefined(l)) {
|
|
956
981
|
if (!a.isUndefined(u))
|
|
957
982
|
return n(void 0, u);
|
|
@@ -964,67 +989,67 @@ function v(e, t) {
|
|
|
964
989
|
return n(void 0, u);
|
|
965
990
|
}
|
|
966
991
|
const f = {
|
|
967
|
-
url:
|
|
968
|
-
method:
|
|
969
|
-
data:
|
|
970
|
-
baseURL:
|
|
971
|
-
transformRequest:
|
|
972
|
-
transformResponse:
|
|
973
|
-
paramsSerializer:
|
|
974
|
-
timeout:
|
|
975
|
-
timeoutMessage:
|
|
976
|
-
withCredentials:
|
|
977
|
-
withXSRFToken:
|
|
978
|
-
adapter:
|
|
979
|
-
responseType:
|
|
980
|
-
xsrfCookieName:
|
|
981
|
-
xsrfHeaderName:
|
|
982
|
-
onUploadProgress:
|
|
983
|
-
onDownloadProgress:
|
|
984
|
-
decompress:
|
|
985
|
-
maxContentLength:
|
|
986
|
-
maxBodyLength:
|
|
987
|
-
beforeRedirect:
|
|
988
|
-
transport:
|
|
989
|
-
httpAgent:
|
|
990
|
-
httpsAgent:
|
|
991
|
-
cancelToken:
|
|
992
|
-
socketPath:
|
|
993
|
-
responseEncoding:
|
|
992
|
+
url: i,
|
|
993
|
+
method: i,
|
|
994
|
+
data: i,
|
|
995
|
+
baseURL: o,
|
|
996
|
+
transformRequest: o,
|
|
997
|
+
transformResponse: o,
|
|
998
|
+
paramsSerializer: o,
|
|
999
|
+
timeout: o,
|
|
1000
|
+
timeoutMessage: o,
|
|
1001
|
+
withCredentials: o,
|
|
1002
|
+
withXSRFToken: o,
|
|
1003
|
+
adapter: o,
|
|
1004
|
+
responseType: o,
|
|
1005
|
+
xsrfCookieName: o,
|
|
1006
|
+
xsrfHeaderName: o,
|
|
1007
|
+
onUploadProgress: o,
|
|
1008
|
+
onDownloadProgress: o,
|
|
1009
|
+
decompress: o,
|
|
1010
|
+
maxContentLength: o,
|
|
1011
|
+
maxBodyLength: o,
|
|
1012
|
+
beforeRedirect: o,
|
|
1013
|
+
transport: o,
|
|
1014
|
+
httpAgent: o,
|
|
1015
|
+
httpsAgent: o,
|
|
1016
|
+
cancelToken: o,
|
|
1017
|
+
socketPath: o,
|
|
1018
|
+
responseEncoding: o,
|
|
994
1019
|
validateStatus: c,
|
|
995
|
-
headers: (u, l, d) => s(
|
|
1020
|
+
headers: (u, l, d) => s(je(u), je(l), d, !0)
|
|
996
1021
|
};
|
|
997
1022
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
998
1023
|
const d = f[l] || s, g = d(e[l], t[l], l);
|
|
999
1024
|
a.isUndefined(g) && d !== c || (r[l] = g);
|
|
1000
1025
|
}), r;
|
|
1001
1026
|
}
|
|
1002
|
-
const
|
|
1027
|
+
const gt = (e) => {
|
|
1003
1028
|
const t = v({}, e);
|
|
1004
|
-
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName:
|
|
1005
|
-
t.headers =
|
|
1029
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1030
|
+
t.headers = o = O.from(o), t.url = ft(yt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1006
1031
|
"Authorization",
|
|
1007
1032
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
1033
|
);
|
|
1009
1034
|
let f;
|
|
1010
1035
|
if (a.isFormData(r)) {
|
|
1011
1036
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1012
|
-
|
|
1013
|
-
else if ((f =
|
|
1037
|
+
o.setContentType(void 0);
|
|
1038
|
+
else if ((f = o.getContentType()) !== !1) {
|
|
1014
1039
|
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1015
|
-
|
|
1040
|
+
o.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1016
1041
|
}
|
|
1017
1042
|
}
|
|
1018
|
-
if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 &&
|
|
1019
|
-
const u = s &&
|
|
1020
|
-
u &&
|
|
1043
|
+
if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && jr(t.url))) {
|
|
1044
|
+
const u = s && i && $r.read(i);
|
|
1045
|
+
u && o.set(s, u);
|
|
1021
1046
|
}
|
|
1022
1047
|
return t;
|
|
1023
|
-
},
|
|
1048
|
+
}, Kr = typeof XMLHttpRequest < "u", Vr = Kr && function(e) {
|
|
1024
1049
|
return new Promise(function(r, n) {
|
|
1025
|
-
const s =
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1050
|
+
const s = gt(e);
|
|
1051
|
+
let i = s.data;
|
|
1052
|
+
const o = O.from(s.headers).normalize();
|
|
1028
1053
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, g, w, h;
|
|
1029
1054
|
function y() {
|
|
1030
1055
|
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
@@ -1044,7 +1069,7 @@ const mt = (e) => {
|
|
|
1044
1069
|
config: e,
|
|
1045
1070
|
request: p
|
|
1046
1071
|
};
|
|
1047
|
-
|
|
1072
|
+
mt(function(k) {
|
|
1048
1073
|
r(k), y();
|
|
1049
1074
|
}, function(k) {
|
|
1050
1075
|
n(k), y();
|
|
@@ -1058,49 +1083,49 @@ const mt = (e) => {
|
|
|
1058
1083
|
n(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1059
1084
|
}, p.ontimeout = function() {
|
|
1060
1085
|
let L = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1061
|
-
const T = s.transitional ||
|
|
1086
|
+
const T = s.transitional || dt;
|
|
1062
1087
|
s.timeoutErrorMessage && (L = s.timeoutErrorMessage), n(new m(
|
|
1063
1088
|
L,
|
|
1064
1089
|
T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1065
1090
|
e,
|
|
1066
1091
|
p
|
|
1067
1092
|
)), p = null;
|
|
1068
|
-
},
|
|
1093
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(L, T) {
|
|
1069
1094
|
p.setRequestHeader(T, L);
|
|
1070
1095
|
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = re(u, !0), p.addEventListener("progress", g)), f && p.upload && ([d, w] = re(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (R) => {
|
|
1071
1096
|
p && (n(!R || R.type ? new K(null, e, p) : R), p.abort(), p = null);
|
|
1072
1097
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1073
|
-
const C =
|
|
1098
|
+
const C = qr(s.url);
|
|
1074
1099
|
if (C && A.protocols.indexOf(C) === -1) {
|
|
1075
1100
|
n(new m("Unsupported protocol " + C + ":", m.ERR_BAD_REQUEST, e));
|
|
1076
1101
|
return;
|
|
1077
1102
|
}
|
|
1078
|
-
p.send(
|
|
1103
|
+
p.send(i || null);
|
|
1079
1104
|
});
|
|
1080
|
-
},
|
|
1105
|
+
}, zr = (e, t) => {
|
|
1081
1106
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1082
1107
|
if (t || r) {
|
|
1083
1108
|
let n = new AbortController(), s;
|
|
1084
|
-
const
|
|
1109
|
+
const i = function(u) {
|
|
1085
1110
|
if (!s) {
|
|
1086
1111
|
s = !0, c();
|
|
1087
1112
|
const l = u instanceof Error ? u : this.reason;
|
|
1088
1113
|
n.abort(l instanceof m ? l : new K(l instanceof Error ? l.message : l));
|
|
1089
1114
|
}
|
|
1090
1115
|
};
|
|
1091
|
-
let
|
|
1092
|
-
|
|
1116
|
+
let o = t && setTimeout(() => {
|
|
1117
|
+
o = null, i(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1093
1118
|
}, t);
|
|
1094
1119
|
const c = () => {
|
|
1095
|
-
e && (
|
|
1096
|
-
u.unsubscribe ? u.unsubscribe(
|
|
1120
|
+
e && (o && clearTimeout(o), o = null, e.forEach((u) => {
|
|
1121
|
+
u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
|
|
1097
1122
|
}), e = null);
|
|
1098
1123
|
};
|
|
1099
|
-
e.forEach((u) => u.addEventListener("abort",
|
|
1124
|
+
e.forEach((u) => u.addEventListener("abort", i));
|
|
1100
1125
|
const { signal: f } = n;
|
|
1101
1126
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1102
1127
|
}
|
|
1103
|
-
},
|
|
1128
|
+
}, Jr = function* (e, t) {
|
|
1104
1129
|
let r = e.byteLength;
|
|
1105
1130
|
if (r < t) {
|
|
1106
1131
|
yield e;
|
|
@@ -1109,10 +1134,10 @@ const mt = (e) => {
|
|
|
1109
1134
|
let n = 0, s;
|
|
1110
1135
|
for (; n < r; )
|
|
1111
1136
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1112
|
-
},
|
|
1113
|
-
for await (const r of
|
|
1114
|
-
yield*
|
|
1115
|
-
},
|
|
1137
|
+
}, Wr = async function* (e, t) {
|
|
1138
|
+
for await (const r of Qr(e))
|
|
1139
|
+
yield* Jr(r, t);
|
|
1140
|
+
}, Qr = async function* (e) {
|
|
1116
1141
|
if (e[Symbol.asyncIterator]) {
|
|
1117
1142
|
yield* e;
|
|
1118
1143
|
return;
|
|
@@ -1128,10 +1153,10 @@ const mt = (e) => {
|
|
|
1128
1153
|
} finally {
|
|
1129
1154
|
await t.cancel();
|
|
1130
1155
|
}
|
|
1131
|
-
},
|
|
1132
|
-
const s =
|
|
1133
|
-
let
|
|
1134
|
-
|
|
1156
|
+
}, $e = (e, t, r, n) => {
|
|
1157
|
+
const s = Wr(e, t);
|
|
1158
|
+
let i = 0, o, c = (f) => {
|
|
1159
|
+
o || (o = !0, n && n(f));
|
|
1135
1160
|
};
|
|
1136
1161
|
return new ReadableStream({
|
|
1137
1162
|
async pull(f) {
|
|
@@ -1143,7 +1168,7 @@ const mt = (e) => {
|
|
|
1143
1168
|
}
|
|
1144
1169
|
let d = l.byteLength;
|
|
1145
1170
|
if (r) {
|
|
1146
|
-
let g =
|
|
1171
|
+
let g = i += d;
|
|
1147
1172
|
r(g);
|
|
1148
1173
|
}
|
|
1149
1174
|
f.enqueue(new Uint8Array(l));
|
|
@@ -1157,13 +1182,13 @@ const mt = (e) => {
|
|
|
1157
1182
|
}, {
|
|
1158
1183
|
highWaterMark: 2
|
|
1159
1184
|
});
|
|
1160
|
-
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1185
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = ce && typeof ReadableStream == "function", Xr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bt = (e, ...t) => {
|
|
1161
1186
|
try {
|
|
1162
1187
|
return !!e(...t);
|
|
1163
1188
|
} catch {
|
|
1164
1189
|
return !1;
|
|
1165
1190
|
}
|
|
1166
|
-
},
|
|
1191
|
+
}, Yr = wt && bt(() => {
|
|
1167
1192
|
let e = !1;
|
|
1168
1193
|
const t = new Request(A.origin, {
|
|
1169
1194
|
body: new ReadableStream(),
|
|
@@ -1173,7 +1198,7 @@ const mt = (e) => {
|
|
|
1173
1198
|
}
|
|
1174
1199
|
}).headers.has("Content-Type");
|
|
1175
1200
|
return e && !t;
|
|
1176
|
-
}),
|
|
1201
|
+
}), Me = 64 * 1024, be = wt && bt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1177
1202
|
stream: be && ((e) => e.body)
|
|
1178
1203
|
};
|
|
1179
1204
|
ce && ((e) => {
|
|
@@ -1183,7 +1208,7 @@ ce && ((e) => {
|
|
|
1183
1208
|
});
|
|
1184
1209
|
});
|
|
1185
1210
|
})(new Response());
|
|
1186
|
-
const
|
|
1211
|
+
const Gr = async (e) => {
|
|
1187
1212
|
if (e == null)
|
|
1188
1213
|
return 0;
|
|
1189
1214
|
if (a.isBlob(e))
|
|
@@ -1196,44 +1221,44 @@ const Xr = async (e) => {
|
|
|
1196
1221
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1197
1222
|
return e.byteLength;
|
|
1198
1223
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1199
|
-
return (await
|
|
1200
|
-
},
|
|
1224
|
+
return (await Xr(e)).byteLength;
|
|
1225
|
+
}, Zr = async (e, t) => {
|
|
1201
1226
|
const r = a.toFiniteNumber(e.getContentLength());
|
|
1202
|
-
return r ??
|
|
1203
|
-
},
|
|
1227
|
+
return r ?? Gr(t);
|
|
1228
|
+
}, en = ce && (async (e) => {
|
|
1204
1229
|
let {
|
|
1205
1230
|
url: t,
|
|
1206
1231
|
method: r,
|
|
1207
1232
|
data: n,
|
|
1208
1233
|
signal: s,
|
|
1209
|
-
cancelToken:
|
|
1210
|
-
timeout:
|
|
1234
|
+
cancelToken: i,
|
|
1235
|
+
timeout: o,
|
|
1211
1236
|
onDownloadProgress: c,
|
|
1212
1237
|
onUploadProgress: f,
|
|
1213
1238
|
responseType: u,
|
|
1214
1239
|
headers: l,
|
|
1215
1240
|
withCredentials: d = "same-origin",
|
|
1216
1241
|
fetchOptions: g
|
|
1217
|
-
} =
|
|
1242
|
+
} = gt(e);
|
|
1218
1243
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1219
|
-
let w =
|
|
1244
|
+
let w = zr([s, i && i.toAbortSignal()], o), h;
|
|
1220
1245
|
const y = w && w.unsubscribe && (() => {
|
|
1221
1246
|
w.unsubscribe();
|
|
1222
1247
|
});
|
|
1223
1248
|
let p;
|
|
1224
1249
|
try {
|
|
1225
|
-
if (f &&
|
|
1250
|
+
if (f && Yr && r !== "get" && r !== "head" && (p = await Zr(l, n)) !== 0) {
|
|
1226
1251
|
let T = new Request(t, {
|
|
1227
1252
|
method: "POST",
|
|
1228
1253
|
body: n,
|
|
1229
1254
|
duplex: "half"
|
|
1230
1255
|
}), D;
|
|
1231
1256
|
if (a.isFormData(n) && (D = T.headers.get("content-type")) && l.setContentType(D), T.body) {
|
|
1232
|
-
const [k, G] =
|
|
1257
|
+
const [k, G] = ve(
|
|
1233
1258
|
p,
|
|
1234
|
-
re(
|
|
1259
|
+
re(Ie(f))
|
|
1235
1260
|
);
|
|
1236
|
-
n =
|
|
1261
|
+
n = $e(T.body, Me, k, G);
|
|
1237
1262
|
}
|
|
1238
1263
|
}
|
|
1239
1264
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1251,15 +1276,15 @@ const Xr = async (e) => {
|
|
|
1251
1276
|
const R = be && (u === "stream" || u === "response");
|
|
1252
1277
|
if (be && (c || R && y)) {
|
|
1253
1278
|
const T = {};
|
|
1254
|
-
["status", "statusText", "headers"].forEach((
|
|
1255
|
-
T[
|
|
1279
|
+
["status", "statusText", "headers"].forEach((Ue) => {
|
|
1280
|
+
T[Ue] = C[Ue];
|
|
1256
1281
|
});
|
|
1257
|
-
const D = a.toFiniteNumber(C.headers.get("content-length")), [k, G] = c &&
|
|
1282
|
+
const D = a.toFiniteNumber(C.headers.get("content-length")), [k, G] = c && ve(
|
|
1258
1283
|
D,
|
|
1259
|
-
re(
|
|
1284
|
+
re(Ie(c), !0)
|
|
1260
1285
|
) || [];
|
|
1261
1286
|
C = new Response(
|
|
1262
|
-
|
|
1287
|
+
$e(C.body, Me, k, () => {
|
|
1263
1288
|
G && G(), y && y();
|
|
1264
1289
|
}),
|
|
1265
1290
|
T
|
|
@@ -1268,7 +1293,7 @@ const Xr = async (e) => {
|
|
|
1268
1293
|
u = u || "text";
|
|
1269
1294
|
let L = await ne[a.findKey(ne, u) || "text"](C, e);
|
|
1270
1295
|
return !R && y && y(), await new Promise((T, D) => {
|
|
1271
|
-
|
|
1296
|
+
mt(T, D, {
|
|
1272
1297
|
data: L,
|
|
1273
1298
|
headers: O.from(C.headers),
|
|
1274
1299
|
status: C.status,
|
|
@@ -1286,9 +1311,9 @@ const Xr = async (e) => {
|
|
|
1286
1311
|
) : m.from(b, b && b.code, e, h);
|
|
1287
1312
|
}
|
|
1288
1313
|
}), Ee = {
|
|
1289
|
-
http:
|
|
1290
|
-
xhr:
|
|
1291
|
-
fetch:
|
|
1314
|
+
http: mr,
|
|
1315
|
+
xhr: Vr,
|
|
1316
|
+
fetch: en
|
|
1292
1317
|
};
|
|
1293
1318
|
a.forEach(Ee, (e, t) => {
|
|
1294
1319
|
if (e) {
|
|
@@ -1299,30 +1324,30 @@ a.forEach(Ee, (e, t) => {
|
|
|
1299
1324
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1300
1325
|
}
|
|
1301
1326
|
});
|
|
1302
|
-
const
|
|
1327
|
+
const He = (e) => `- ${e}`, tn = (e) => a.isFunction(e) || e === null || e === !1, Et = {
|
|
1303
1328
|
getAdapter: (e) => {
|
|
1304
1329
|
e = a.isArray(e) ? e : [e];
|
|
1305
1330
|
const { length: t } = e;
|
|
1306
1331
|
let r, n;
|
|
1307
1332
|
const s = {};
|
|
1308
|
-
for (let
|
|
1309
|
-
r = e[
|
|
1310
|
-
let
|
|
1311
|
-
if (n = r, !
|
|
1312
|
-
throw new m(`Unknown adapter '${
|
|
1333
|
+
for (let i = 0; i < t; i++) {
|
|
1334
|
+
r = e[i];
|
|
1335
|
+
let o;
|
|
1336
|
+
if (n = r, !tn(r) && (n = Ee[(o = String(r)).toLowerCase()], n === void 0))
|
|
1337
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
1313
1338
|
if (n)
|
|
1314
1339
|
break;
|
|
1315
|
-
s[
|
|
1340
|
+
s[o || "#" + i] = n;
|
|
1316
1341
|
}
|
|
1317
1342
|
if (!n) {
|
|
1318
|
-
const
|
|
1343
|
+
const i = Object.entries(s).map(
|
|
1319
1344
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1320
1345
|
);
|
|
1321
|
-
let
|
|
1322
|
-
` +
|
|
1323
|
-
`) : " " +
|
|
1346
|
+
let o = t ? i.length > 1 ? `since :
|
|
1347
|
+
` + i.map(He).join(`
|
|
1348
|
+
`) : " " + He(i[0]) : "as no adapter specified";
|
|
1324
1349
|
throw new m(
|
|
1325
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1350
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
1326
1351
|
"ERR_NOT_SUPPORT"
|
|
1327
1352
|
);
|
|
1328
1353
|
}
|
|
@@ -1334,78 +1359,78 @@ function pe(e) {
|
|
|
1334
1359
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1335
1360
|
throw new K(null, e);
|
|
1336
1361
|
}
|
|
1337
|
-
function
|
|
1362
|
+
function Ke(e) {
|
|
1338
1363
|
return pe(e), e.headers = O.from(e.headers), e.data = he.call(
|
|
1339
1364
|
e,
|
|
1340
1365
|
e.transformRequest
|
|
1341
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1366
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || Y.adapter)(e).then(function(n) {
|
|
1342
1367
|
return pe(e), n.data = he.call(
|
|
1343
1368
|
e,
|
|
1344
1369
|
e.transformResponse,
|
|
1345
1370
|
n
|
|
1346
1371
|
), n.headers = O.from(n.headers), n;
|
|
1347
1372
|
}, function(n) {
|
|
1348
|
-
return
|
|
1373
|
+
return pt(n) || (pe(e), n && n.response && (n.response.data = he.call(
|
|
1349
1374
|
e,
|
|
1350
1375
|
e.transformResponse,
|
|
1351
1376
|
n.response
|
|
1352
1377
|
), n.response.headers = O.from(n.response.headers))), Promise.reject(n);
|
|
1353
1378
|
});
|
|
1354
1379
|
}
|
|
1355
|
-
const
|
|
1380
|
+
const St = "1.11.0", ue = {};
|
|
1356
1381
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1357
1382
|
ue[e] = function(n) {
|
|
1358
1383
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1359
1384
|
};
|
|
1360
1385
|
});
|
|
1361
|
-
const
|
|
1386
|
+
const Ve = {};
|
|
1362
1387
|
ue.transitional = function(t, r, n) {
|
|
1363
|
-
function s(
|
|
1364
|
-
return "[Axios v" +
|
|
1388
|
+
function s(i, o) {
|
|
1389
|
+
return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1365
1390
|
}
|
|
1366
|
-
return (
|
|
1391
|
+
return (i, o, c) => {
|
|
1367
1392
|
if (t === !1)
|
|
1368
1393
|
throw new m(
|
|
1369
|
-
s(
|
|
1394
|
+
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1370
1395
|
m.ERR_DEPRECATED
|
|
1371
1396
|
);
|
|
1372
|
-
return r && !
|
|
1397
|
+
return r && !Ve[o] && (Ve[o] = !0, console.warn(
|
|
1373
1398
|
s(
|
|
1374
|
-
|
|
1399
|
+
o,
|
|
1375
1400
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1376
1401
|
)
|
|
1377
|
-
)), t ? t(
|
|
1402
|
+
)), t ? t(i, o, c) : !0;
|
|
1378
1403
|
};
|
|
1379
1404
|
};
|
|
1380
1405
|
ue.spelling = function(t) {
|
|
1381
1406
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1382
1407
|
};
|
|
1383
|
-
function
|
|
1408
|
+
function rn(e, t, r) {
|
|
1384
1409
|
if (typeof e != "object")
|
|
1385
1410
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1386
1411
|
const n = Object.keys(e);
|
|
1387
1412
|
let s = n.length;
|
|
1388
1413
|
for (; s-- > 0; ) {
|
|
1389
|
-
const
|
|
1390
|
-
if (
|
|
1391
|
-
const c = e[
|
|
1414
|
+
const i = n[s], o = t[i];
|
|
1415
|
+
if (o) {
|
|
1416
|
+
const c = e[i], f = c === void 0 || o(c, i, e);
|
|
1392
1417
|
if (f !== !0)
|
|
1393
|
-
throw new m("option " +
|
|
1418
|
+
throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1394
1419
|
continue;
|
|
1395
1420
|
}
|
|
1396
1421
|
if (r !== !0)
|
|
1397
|
-
throw new m("Unknown option " +
|
|
1422
|
+
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1398
1423
|
}
|
|
1399
1424
|
}
|
|
1400
1425
|
const te = {
|
|
1401
|
-
assertOptions:
|
|
1426
|
+
assertOptions: rn,
|
|
1402
1427
|
validators: ue
|
|
1403
1428
|
}, N = te.validators;
|
|
1404
1429
|
let q = class {
|
|
1405
1430
|
constructor(t) {
|
|
1406
1431
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
|
-
request: new
|
|
1408
|
-
response: new
|
|
1432
|
+
request: new Be(),
|
|
1433
|
+
response: new Be()
|
|
1409
1434
|
};
|
|
1410
1435
|
}
|
|
1411
1436
|
/**
|
|
@@ -1423,10 +1448,10 @@ let q = class {
|
|
|
1423
1448
|
if (n instanceof Error) {
|
|
1424
1449
|
let s = {};
|
|
1425
1450
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1426
|
-
const
|
|
1451
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1427
1452
|
try {
|
|
1428
|
-
n.stack ?
|
|
1429
|
-
` +
|
|
1453
|
+
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1454
|
+
` + i) : n.stack = i;
|
|
1430
1455
|
} catch {
|
|
1431
1456
|
}
|
|
1432
1457
|
}
|
|
@@ -1435,7 +1460,7 @@ let q = class {
|
|
|
1435
1460
|
}
|
|
1436
1461
|
_request(t, r) {
|
|
1437
1462
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = v(this.defaults, r);
|
|
1438
|
-
const { transitional: n, paramsSerializer: s, headers:
|
|
1463
|
+
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1439
1464
|
n !== void 0 && te.assertOptions(n, {
|
|
1440
1465
|
silentJSONParsing: N.transitional(N.boolean),
|
|
1441
1466
|
forcedJSONParsing: N.transitional(N.boolean),
|
|
@@ -1449,16 +1474,16 @@ let q = class {
|
|
|
1449
1474
|
baseUrl: N.spelling("baseURL"),
|
|
1450
1475
|
withXsrfToken: N.spelling("withXSRFToken")
|
|
1451
1476
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1452
|
-
let
|
|
1453
|
-
|
|
1454
|
-
|
|
1477
|
+
let o = i && a.merge(
|
|
1478
|
+
i.common,
|
|
1479
|
+
i[r.method]
|
|
1455
1480
|
);
|
|
1456
|
-
|
|
1481
|
+
i && a.forEach(
|
|
1457
1482
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1458
1483
|
(h) => {
|
|
1459
|
-
delete
|
|
1484
|
+
delete i[h];
|
|
1460
1485
|
}
|
|
1461
|
-
), r.headers = O.concat(
|
|
1486
|
+
), r.headers = O.concat(o, i);
|
|
1462
1487
|
const c = [];
|
|
1463
1488
|
let f = !0;
|
|
1464
1489
|
this.interceptors.request.forEach(function(y) {
|
|
@@ -1470,7 +1495,7 @@ let q = class {
|
|
|
1470
1495
|
});
|
|
1471
1496
|
let l, d = 0, g;
|
|
1472
1497
|
if (!f) {
|
|
1473
|
-
const h = [
|
|
1498
|
+
const h = [Ke.bind(this), void 0];
|
|
1474
1499
|
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); d < g; )
|
|
1475
1500
|
l = l.then(h[d++], h[d++]);
|
|
1476
1501
|
return l;
|
|
@@ -1487,7 +1512,7 @@ let q = class {
|
|
|
1487
1512
|
}
|
|
1488
1513
|
}
|
|
1489
1514
|
try {
|
|
1490
|
-
l =
|
|
1515
|
+
l = Ke.call(this, w);
|
|
1491
1516
|
} catch (h) {
|
|
1492
1517
|
return Promise.reject(h);
|
|
1493
1518
|
}
|
|
@@ -1497,8 +1522,8 @@ let q = class {
|
|
|
1497
1522
|
}
|
|
1498
1523
|
getUri(t) {
|
|
1499
1524
|
t = v(this.defaults, t);
|
|
1500
|
-
const r =
|
|
1501
|
-
return
|
|
1525
|
+
const r = yt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1526
|
+
return ft(r, t.params, t.paramsSerializer);
|
|
1502
1527
|
}
|
|
1503
1528
|
};
|
|
1504
1529
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1512,44 +1537,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1512
1537
|
});
|
|
1513
1538
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1514
1539
|
function r(n) {
|
|
1515
|
-
return function(
|
|
1540
|
+
return function(i, o, c) {
|
|
1516
1541
|
return this.request(v(c || {}, {
|
|
1517
1542
|
method: t,
|
|
1518
1543
|
headers: n ? {
|
|
1519
1544
|
"Content-Type": "multipart/form-data"
|
|
1520
1545
|
} : {},
|
|
1521
|
-
url:
|
|
1522
|
-
data:
|
|
1546
|
+
url: i,
|
|
1547
|
+
data: o
|
|
1523
1548
|
}));
|
|
1524
1549
|
};
|
|
1525
1550
|
}
|
|
1526
1551
|
q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
|
|
1527
1552
|
});
|
|
1528
|
-
let
|
|
1553
|
+
let nn = class _t {
|
|
1529
1554
|
constructor(t) {
|
|
1530
1555
|
if (typeof t != "function")
|
|
1531
1556
|
throw new TypeError("executor must be a function.");
|
|
1532
1557
|
let r;
|
|
1533
|
-
this.promise = new Promise(function(
|
|
1534
|
-
r =
|
|
1558
|
+
this.promise = new Promise(function(i) {
|
|
1559
|
+
r = i;
|
|
1535
1560
|
});
|
|
1536
1561
|
const n = this;
|
|
1537
1562
|
this.promise.then((s) => {
|
|
1538
1563
|
if (!n._listeners) return;
|
|
1539
|
-
let
|
|
1540
|
-
for (;
|
|
1541
|
-
n._listeners[
|
|
1564
|
+
let i = n._listeners.length;
|
|
1565
|
+
for (; i-- > 0; )
|
|
1566
|
+
n._listeners[i](s);
|
|
1542
1567
|
n._listeners = null;
|
|
1543
1568
|
}), this.promise.then = (s) => {
|
|
1544
|
-
let
|
|
1545
|
-
const
|
|
1546
|
-
n.subscribe(c),
|
|
1569
|
+
let i;
|
|
1570
|
+
const o = new Promise((c) => {
|
|
1571
|
+
n.subscribe(c), i = c;
|
|
1547
1572
|
}).then(s);
|
|
1548
|
-
return
|
|
1549
|
-
n.unsubscribe(
|
|
1550
|
-
},
|
|
1551
|
-
}, t(function(
|
|
1552
|
-
n.reason || (n.reason = new K(
|
|
1573
|
+
return o.cancel = function() {
|
|
1574
|
+
n.unsubscribe(i);
|
|
1575
|
+
}, o;
|
|
1576
|
+
}, t(function(i, o, c) {
|
|
1577
|
+
n.reason || (n.reason = new K(i, o, c), r(n.reason));
|
|
1553
1578
|
});
|
|
1554
1579
|
}
|
|
1555
1580
|
/**
|
|
@@ -1591,19 +1616,19 @@ let tn = class Et {
|
|
|
1591
1616
|
static source() {
|
|
1592
1617
|
let t;
|
|
1593
1618
|
return {
|
|
1594
|
-
token: new
|
|
1619
|
+
token: new _t(function(s) {
|
|
1595
1620
|
t = s;
|
|
1596
1621
|
}),
|
|
1597
1622
|
cancel: t
|
|
1598
1623
|
};
|
|
1599
1624
|
}
|
|
1600
1625
|
};
|
|
1601
|
-
function
|
|
1626
|
+
function sn(e) {
|
|
1602
1627
|
return function(r) {
|
|
1603
1628
|
return e.apply(null, r);
|
|
1604
1629
|
};
|
|
1605
1630
|
}
|
|
1606
|
-
function
|
|
1631
|
+
function on(e) {
|
|
1607
1632
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1608
1633
|
}
|
|
1609
1634
|
const Se = {
|
|
@@ -1674,83 +1699,83 @@ const Se = {
|
|
|
1674
1699
|
Object.entries(Se).forEach(([e, t]) => {
|
|
1675
1700
|
Se[t] = e;
|
|
1676
1701
|
});
|
|
1677
|
-
function
|
|
1678
|
-
const t = new q(e), r =
|
|
1702
|
+
function Ct(e) {
|
|
1703
|
+
const t = new q(e), r = Ze(q.prototype.request, t);
|
|
1679
1704
|
return a.extend(r, q.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1680
|
-
return
|
|
1705
|
+
return Ct(v(e, s));
|
|
1681
1706
|
}, r;
|
|
1682
1707
|
}
|
|
1683
|
-
const E =
|
|
1708
|
+
const E = Ct(Y);
|
|
1684
1709
|
E.Axios = q;
|
|
1685
1710
|
E.CanceledError = K;
|
|
1686
|
-
E.CancelToken =
|
|
1687
|
-
E.isCancel =
|
|
1688
|
-
E.VERSION =
|
|
1711
|
+
E.CancelToken = nn;
|
|
1712
|
+
E.isCancel = pt;
|
|
1713
|
+
E.VERSION = St;
|
|
1689
1714
|
E.toFormData = ae;
|
|
1690
1715
|
E.AxiosError = m;
|
|
1691
1716
|
E.Cancel = E.CanceledError;
|
|
1692
1717
|
E.all = function(t) {
|
|
1693
1718
|
return Promise.all(t);
|
|
1694
1719
|
};
|
|
1695
|
-
E.spread =
|
|
1696
|
-
E.isAxiosError =
|
|
1720
|
+
E.spread = sn;
|
|
1721
|
+
E.isAxiosError = on;
|
|
1697
1722
|
E.mergeConfig = v;
|
|
1698
1723
|
E.AxiosHeaders = O;
|
|
1699
|
-
E.formToJSON = (e) =>
|
|
1700
|
-
E.getAdapter =
|
|
1724
|
+
E.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1725
|
+
E.getAdapter = Et.getAdapter;
|
|
1701
1726
|
E.HttpStatusCode = Se;
|
|
1702
1727
|
E.default = E;
|
|
1703
1728
|
const {
|
|
1704
|
-
Axios:
|
|
1729
|
+
Axios: ps,
|
|
1705
1730
|
AxiosError: me,
|
|
1706
|
-
CanceledError:
|
|
1707
|
-
isCancel:
|
|
1708
|
-
CancelToken:
|
|
1709
|
-
VERSION:
|
|
1710
|
-
all:
|
|
1711
|
-
Cancel:
|
|
1712
|
-
isAxiosError:
|
|
1713
|
-
spread:
|
|
1731
|
+
CanceledError: ms,
|
|
1732
|
+
isCancel: ys,
|
|
1733
|
+
CancelToken: gs,
|
|
1734
|
+
VERSION: ws,
|
|
1735
|
+
all: bs,
|
|
1736
|
+
Cancel: Es,
|
|
1737
|
+
isAxiosError: Ss,
|
|
1738
|
+
spread: _s,
|
|
1714
1739
|
toFormData: Cs,
|
|
1715
|
-
AxiosHeaders:
|
|
1716
|
-
HttpStatusCode:
|
|
1717
|
-
formToJSON:
|
|
1718
|
-
getAdapter:
|
|
1719
|
-
mergeConfig:
|
|
1740
|
+
AxiosHeaders: Rs,
|
|
1741
|
+
HttpStatusCode: As,
|
|
1742
|
+
formToJSON: Ts,
|
|
1743
|
+
getAdapter: Ps,
|
|
1744
|
+
mergeConfig: Os
|
|
1720
1745
|
} = E;
|
|
1721
|
-
class
|
|
1746
|
+
class ze extends Error {
|
|
1722
1747
|
constructor(r) {
|
|
1723
1748
|
super(r.join(", "));
|
|
1724
1749
|
S(this, "errors");
|
|
1725
1750
|
this.name = "ValidationError", this.errors = r;
|
|
1726
1751
|
}
|
|
1727
1752
|
}
|
|
1728
|
-
class
|
|
1753
|
+
class Je extends Error {
|
|
1729
1754
|
constructor(r) {
|
|
1730
1755
|
super("Address already registered.");
|
|
1731
1756
|
S(this, "address");
|
|
1732
1757
|
this.name = "AddressInUseError", this.address = r;
|
|
1733
1758
|
}
|
|
1734
1759
|
}
|
|
1735
|
-
class
|
|
1760
|
+
class We extends Error {
|
|
1736
1761
|
constructor(r) {
|
|
1737
1762
|
super("Code already registered.");
|
|
1738
1763
|
S(this, "code");
|
|
1739
1764
|
this.name = "CodeInUseError", this.code = r;
|
|
1740
1765
|
}
|
|
1741
1766
|
}
|
|
1742
|
-
class
|
|
1767
|
+
class Qe extends Error {
|
|
1743
1768
|
constructor() {
|
|
1744
1769
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1745
1770
|
}
|
|
1746
1771
|
}
|
|
1747
|
-
class
|
|
1772
|
+
class an {
|
|
1748
1773
|
constructor(t) {
|
|
1749
1774
|
S(this, "httpClient");
|
|
1750
1775
|
S(this, "_debug");
|
|
1751
1776
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1752
1777
|
}
|
|
1753
|
-
async create(t, r, n, s,
|
|
1778
|
+
async create(t, r, n, s, i, o, c) {
|
|
1754
1779
|
var f;
|
|
1755
1780
|
try {
|
|
1756
1781
|
await this.httpClient.post({
|
|
@@ -1761,8 +1786,8 @@ class sn {
|
|
|
1761
1786
|
name: n,
|
|
1762
1787
|
code: n,
|
|
1763
1788
|
signature: s,
|
|
1764
|
-
signature_public_key:
|
|
1765
|
-
account_chain_id:
|
|
1789
|
+
signature_public_key: i,
|
|
1790
|
+
account_chain_id: o,
|
|
1766
1791
|
user_split_percentage: c
|
|
1767
1792
|
}
|
|
1768
1793
|
});
|
|
@@ -1771,14 +1796,14 @@ class sn {
|
|
|
1771
1796
|
const l = (f = u.response) == null ? void 0 : f.data;
|
|
1772
1797
|
if (typeof (l == null ? void 0 : l.message) == "string") {
|
|
1773
1798
|
const d = l.message.toLowerCase();
|
|
1774
|
-
throw d == "invalid signature" ? new
|
|
1799
|
+
throw d == "invalid signature" ? new Qe() : d == "address in use" ? new Je(t) : d == "code in use" ? new We(n) : new Error(d);
|
|
1775
1800
|
} else if ((l == null ? void 0 : l.message) instanceof Array)
|
|
1776
|
-
throw new
|
|
1801
|
+
throw new ze(l.message);
|
|
1777
1802
|
}
|
|
1778
1803
|
throw u;
|
|
1779
1804
|
}
|
|
1780
1805
|
}
|
|
1781
|
-
async update(t, r, n, s,
|
|
1806
|
+
async update(t, r, n, s, i, o) {
|
|
1782
1807
|
var c;
|
|
1783
1808
|
try {
|
|
1784
1809
|
await this.httpClient.post({
|
|
@@ -1788,8 +1813,8 @@ class sn {
|
|
|
1788
1813
|
user_identifier: t,
|
|
1789
1814
|
identifier_type: r,
|
|
1790
1815
|
signature: s,
|
|
1791
|
-
signature_public_key:
|
|
1792
|
-
account_chain_id:
|
|
1816
|
+
signature_public_key: i,
|
|
1817
|
+
account_chain_id: o
|
|
1793
1818
|
}
|
|
1794
1819
|
});
|
|
1795
1820
|
} catch (f) {
|
|
@@ -1797,9 +1822,9 @@ class sn {
|
|
|
1797
1822
|
const u = (c = f.response) == null ? void 0 : c.data;
|
|
1798
1823
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1799
1824
|
const l = u.message.toLowerCase();
|
|
1800
|
-
throw l == "invalid signature" ? new
|
|
1825
|
+
throw l == "invalid signature" ? new Qe() : l == "address in use" ? new Je(t) : l == "code in use" ? new We(n) : new Error(l);
|
|
1801
1826
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1802
|
-
throw new
|
|
1827
|
+
throw new ze(u.message);
|
|
1803
1828
|
}
|
|
1804
1829
|
throw f;
|
|
1805
1830
|
}
|
|
@@ -1814,7 +1839,7 @@ class sn {
|
|
|
1814
1839
|
async getCode(t, r) {
|
|
1815
1840
|
var n;
|
|
1816
1841
|
try {
|
|
1817
|
-
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data
|
|
1842
|
+
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: r } })).data;
|
|
1818
1843
|
} catch (s) {
|
|
1819
1844
|
if (s instanceof me && ((n = s.response) == null ? void 0 : n.status) === 404)
|
|
1820
1845
|
return null;
|
|
@@ -1822,21 +1847,6 @@ class sn {
|
|
|
1822
1847
|
}
|
|
1823
1848
|
}
|
|
1824
1849
|
}
|
|
1825
|
-
const on = "/affiliate-portal";
|
|
1826
|
-
class an {
|
|
1827
|
-
constructor(t) {
|
|
1828
|
-
S(this, "httpClient");
|
|
1829
|
-
this.httpClient = t.httpClient;
|
|
1830
|
-
}
|
|
1831
|
-
async getAffiliateStats(t) {
|
|
1832
|
-
return (await this.httpClient.get({
|
|
1833
|
-
path: `${on}/stats`,
|
|
1834
|
-
queryParams: {
|
|
1835
|
-
user_identifier: t.user_identifier
|
|
1836
|
-
}
|
|
1837
|
-
})).data;
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
1850
|
const cn = "/audiences";
|
|
1841
1851
|
class un {
|
|
1842
1852
|
constructor(t) {
|
|
@@ -1861,7 +1871,7 @@ class ln {
|
|
|
1861
1871
|
return r;
|
|
1862
1872
|
}
|
|
1863
1873
|
}
|
|
1864
|
-
const
|
|
1874
|
+
const Xe = "fuul.sent", fn = 60, dn = "connect_wallet", Ye = 10;
|
|
1865
1875
|
class hn {
|
|
1866
1876
|
constructor(t) {
|
|
1867
1877
|
S(this, "debug");
|
|
@@ -1884,7 +1894,7 @@ class hn {
|
|
|
1884
1894
|
}
|
|
1885
1895
|
isDuplicate(t) {
|
|
1886
1896
|
var l, d, g, w;
|
|
1887
|
-
const r = `${
|
|
1897
|
+
const r = `${Xe}_${t.name}`, n = localStorage.getItem(r);
|
|
1888
1898
|
if (!n)
|
|
1889
1899
|
return !1;
|
|
1890
1900
|
const s = JSON.parse(n);
|
|
@@ -1899,13 +1909,13 @@ class hn {
|
|
|
1899
1909
|
return Date.now() / 1e3;
|
|
1900
1910
|
}
|
|
1901
1911
|
saveSentEvent(t) {
|
|
1902
|
-
var
|
|
1903
|
-
const r = `${
|
|
1904
|
-
if (localStorage.setItem(r, JSON.stringify(
|
|
1912
|
+
var o, c, f, u;
|
|
1913
|
+
const r = `${Xe}_${t.name}`, n = `${r}_all`, s = this.getCurrentTimestamp(), i = { ...t, timestamp: s };
|
|
1914
|
+
if (localStorage.setItem(r, JSON.stringify(i)), t.name === dn) {
|
|
1905
1915
|
const l = JSON.parse(localStorage.getItem(n) || "[]"), d = {
|
|
1906
1916
|
name: t.name,
|
|
1907
1917
|
user: {
|
|
1908
|
-
identifier: (
|
|
1918
|
+
identifier: (o = t.user) == null ? void 0 : o.identifier,
|
|
1909
1919
|
identifier_type: (c = t.user) == null ? void 0 : c.identifier_type
|
|
1910
1920
|
},
|
|
1911
1921
|
tracking_id: (f = t.metadata) == null ? void 0 : f.tracking_id,
|
|
@@ -1913,11 +1923,11 @@ class hn {
|
|
|
1913
1923
|
};
|
|
1914
1924
|
"user_address" in t && (d.user_address = t.user_address);
|
|
1915
1925
|
const g = [...l, d];
|
|
1916
|
-
g.length >
|
|
1926
|
+
g.length > Ye && g.splice(0, g.length - Ye), localStorage.setItem(n, JSON.stringify(g));
|
|
1917
1927
|
}
|
|
1918
1928
|
}
|
|
1919
1929
|
}
|
|
1920
|
-
const pn = "7.
|
|
1930
|
+
const pn = "7.7.0", mn = {
|
|
1921
1931
|
version: pn
|
|
1922
1932
|
};
|
|
1923
1933
|
class yn {
|
|
@@ -2088,7 +2098,7 @@ class bn {
|
|
|
2088
2098
|
})).data;
|
|
2089
2099
|
}
|
|
2090
2100
|
async useReferralCode(t) {
|
|
2091
|
-
const { code: r, user_identifier: n, user_identifier_type: s, signature:
|
|
2101
|
+
const { code: r, user_identifier: n, user_identifier_type: s, signature: i, signature_message: o, chain_id: c } = t;
|
|
2092
2102
|
await this.httpClient.patch({
|
|
2093
2103
|
path: `/referral_codes/${r}/use`,
|
|
2094
2104
|
queryParams: {
|
|
@@ -2097,8 +2107,8 @@ class bn {
|
|
|
2097
2107
|
chain_id: c
|
|
2098
2108
|
},
|
|
2099
2109
|
postData: {
|
|
2100
|
-
signature:
|
|
2101
|
-
signature_message:
|
|
2110
|
+
signature: i,
|
|
2111
|
+
signature_message: o
|
|
2102
2112
|
}
|
|
2103
2113
|
});
|
|
2104
2114
|
}
|
|
@@ -2118,7 +2128,7 @@ let Sn = (e = 21) => {
|
|
|
2118
2128
|
t += En[r[e] & 63];
|
|
2119
2129
|
return t;
|
|
2120
2130
|
};
|
|
2121
|
-
const
|
|
2131
|
+
const _n = "fuul.tracking_id", Te = () => On(_n, () => Sn()), Ge = () => M("af") || M("referrer"), Cn = () => document.referrer, Rn = () => xn(), An = () => M("category"), Tn = () => M("title"), Pn = () => M("tag"), On = (e, t) => {
|
|
2122
2132
|
const r = localStorage.getItem(e);
|
|
2123
2133
|
if (r)
|
|
2124
2134
|
return r;
|
|
@@ -2141,16 +2151,16 @@ class Un {
|
|
|
2141
2151
|
}
|
|
2142
2152
|
}
|
|
2143
2153
|
const Ln = "https://api.fuul.xyz/api/v1/";
|
|
2144
|
-
let F = !1,
|
|
2154
|
+
let F = !1, _e = !1, Pe, U, Rt, At, V, Oe, le, I, Tt, fe, j;
|
|
2145
2155
|
function Dn(e) {
|
|
2146
|
-
F = !!e.debug, !
|
|
2156
|
+
F = !!e.debug, !_e && (Pe = e.apiKey, cs(), U = us(e.baseApiUrl ?? Ln, e.defaultQueryParams ?? {}), Rt = new ln({ httpClient: U, debug: F }), le = new hn({ httpClient: U, debug: F }), V = new an({ httpClient: U, debug: F }), Oe = new xt({ httpClient: U }), I = new wn({ httpClient: U, debug: F }), At = new Un({ httpClient: U }), Tt = new un({ httpClient: U, debug: F }), fe = new gn({ httpClient: U }), j = new bn({ httpClient: U, debug: F }), _e = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
2147
2157
|
}
|
|
2148
2158
|
function _() {
|
|
2149
|
-
if (!
|
|
2159
|
+
if (!_e)
|
|
2150
2160
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2151
2161
|
}
|
|
2152
2162
|
async function Fn(e, t) {
|
|
2153
|
-
_(),
|
|
2163
|
+
_(), xe(), Ne();
|
|
2154
2164
|
const r = {
|
|
2155
2165
|
name: e,
|
|
2156
2166
|
args: t ?? {},
|
|
@@ -2161,7 +2171,7 @@ async function Fn(e, t) {
|
|
|
2161
2171
|
await le.sendEvent(r);
|
|
2162
2172
|
}
|
|
2163
2173
|
async function kn(e, t) {
|
|
2164
|
-
_(),
|
|
2174
|
+
_(), xe(), Ne();
|
|
2165
2175
|
const r = {
|
|
2166
2176
|
name: "pageview",
|
|
2167
2177
|
args: {
|
|
@@ -2170,10 +2180,10 @@ async function kn(e, t) {
|
|
|
2170
2180
|
},
|
|
2171
2181
|
metadata: {
|
|
2172
2182
|
tracking_id: Te(),
|
|
2173
|
-
referrer_url:
|
|
2183
|
+
referrer_url: Cn(),
|
|
2174
2184
|
source: Rn(),
|
|
2175
|
-
affiliate_id:
|
|
2176
|
-
referrer:
|
|
2185
|
+
affiliate_id: Ge() ?? void 0,
|
|
2186
|
+
referrer: Ge() ?? void 0,
|
|
2177
2187
|
category: An() ?? void 0,
|
|
2178
2188
|
title: Tn() ?? void 0,
|
|
2179
2189
|
tag: Pn() ?? void 0
|
|
@@ -2182,7 +2192,7 @@ async function kn(e, t) {
|
|
|
2182
2192
|
await le.sendEvent(r, t);
|
|
2183
2193
|
}
|
|
2184
2194
|
async function Bn(e, t) {
|
|
2185
|
-
_(),
|
|
2195
|
+
_(), xe(), Ne();
|
|
2186
2196
|
const r = {
|
|
2187
2197
|
name: "connect_wallet",
|
|
2188
2198
|
user: {
|
|
@@ -2228,10 +2238,10 @@ async function jn(e) {
|
|
|
2228
2238
|
}
|
|
2229
2239
|
async function $n(e, t, r, n) {
|
|
2230
2240
|
_();
|
|
2231
|
-
const s = await V.getCode(t, r),
|
|
2232
|
-
af: s ?? t
|
|
2241
|
+
const s = await V.getCode(t, r), i = new URLSearchParams({
|
|
2242
|
+
af: (s == null ? void 0 : s.code) ?? t
|
|
2233
2243
|
});
|
|
2234
|
-
return n != null && n.title &&
|
|
2244
|
+
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), `${e}?${i.toString()}`;
|
|
2235
2245
|
}
|
|
2236
2246
|
function Mn(e) {
|
|
2237
2247
|
return fe.getPayoutsLeaderboard(e);
|
|
@@ -2261,13 +2271,13 @@ function Xn(e) {
|
|
|
2261
2271
|
return _(), I.getPayoutsByReferrer(e);
|
|
2262
2272
|
}
|
|
2263
2273
|
async function Yn(e) {
|
|
2264
|
-
return _(),
|
|
2274
|
+
return _(), Rt.getAll(e);
|
|
2265
2275
|
}
|
|
2266
2276
|
async function Gn(e) {
|
|
2267
|
-
return _(),
|
|
2277
|
+
return _(), At.getUserReferrer(e);
|
|
2268
2278
|
}
|
|
2269
2279
|
async function Zn(e) {
|
|
2270
|
-
return _(),
|
|
2280
|
+
return _(), Tt.getUserAudiences(e);
|
|
2271
2281
|
}
|
|
2272
2282
|
async function es(e) {
|
|
2273
2283
|
return _(), j.listUserReferralCodes(e);
|
|
@@ -2284,25 +2294,28 @@ async function ns(e) {
|
|
|
2284
2294
|
async function ss(e) {
|
|
2285
2295
|
return _(), j.useReferralCode(e);
|
|
2286
2296
|
}
|
|
2287
|
-
async function
|
|
2297
|
+
async function is(e) {
|
|
2288
2298
|
return _(), j.updateReferralCode(e);
|
|
2289
2299
|
}
|
|
2290
|
-
async function
|
|
2291
|
-
return _(),
|
|
2300
|
+
async function os(e) {
|
|
2301
|
+
return _(), Oe.getAffiliateStats(e);
|
|
2302
|
+
}
|
|
2303
|
+
async function as(e) {
|
|
2304
|
+
return _(), Oe.getAffiliateNewTraders(e);
|
|
2292
2305
|
}
|
|
2293
|
-
function
|
|
2306
|
+
function xe() {
|
|
2294
2307
|
if (typeof window > "u" || typeof document > "u")
|
|
2295
2308
|
throw new Error("Fuul SDK: Browser context required");
|
|
2296
2309
|
}
|
|
2297
|
-
function
|
|
2310
|
+
function Ne() {
|
|
2298
2311
|
if (navigator.webdriver)
|
|
2299
2312
|
throw new Error("Fuul SDK: Error");
|
|
2300
2313
|
}
|
|
2301
|
-
function
|
|
2314
|
+
function cs() {
|
|
2302
2315
|
if (!Pe)
|
|
2303
2316
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2304
2317
|
}
|
|
2305
|
-
function
|
|
2318
|
+
function us(e, t) {
|
|
2306
2319
|
return new yn({
|
|
2307
2320
|
baseURL: e,
|
|
2308
2321
|
timeout: 3e4,
|
|
@@ -2310,7 +2323,7 @@ function cs(e, t) {
|
|
|
2310
2323
|
queryParams: t
|
|
2311
2324
|
});
|
|
2312
2325
|
}
|
|
2313
|
-
const
|
|
2326
|
+
const xs = {
|
|
2314
2327
|
init: Dn,
|
|
2315
2328
|
sendEvent: Fn,
|
|
2316
2329
|
sendPageview: kn,
|
|
@@ -2337,15 +2350,16 @@ const Os = {
|
|
|
2337
2350
|
getReferralStatus: rs,
|
|
2338
2351
|
getReferralCode: ns,
|
|
2339
2352
|
useReferralCode: ss,
|
|
2340
|
-
updateReferralCode:
|
|
2341
|
-
getAffiliateStats:
|
|
2353
|
+
updateReferralCode: is,
|
|
2354
|
+
getAffiliateStats: os,
|
|
2355
|
+
getAffiliateNewTraders: as
|
|
2342
2356
|
};
|
|
2343
|
-
var
|
|
2357
|
+
var ls = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.XRPLAddress = "xrpl_address", e.SuiAddress = "sui_address", e.Email = "email", e))(ls || {});
|
|
2344
2358
|
export {
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2359
|
+
Je as AddressInUseError,
|
|
2360
|
+
We as CodeInUseError,
|
|
2361
|
+
xs as Fuul,
|
|
2362
|
+
Qe as InvalidSignatureError,
|
|
2363
|
+
ls as UserIdentifierType,
|
|
2364
|
+
ze as ValidationError
|
|
2351
2365
|
};
|