@fuul/sdk 7.5.3 → 7.6.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/core.d.ts +16 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +531 -517
- package/dist/index.umd.js +6 -6
- package/dist/release.json.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (e, t, r) =>
|
|
4
|
-
function
|
|
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
|
+
function Ze(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const r =
|
|
9
|
+
const { toString: xt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: et } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
|
|
10
|
+
const r = xt.call(t);
|
|
11
11
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
12
|
+
})(/* @__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
13
|
function W(e) {
|
|
14
14
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
16
|
+
const tt = x("ArrayBuffer");
|
|
17
|
+
function Nt(e) {
|
|
18
18
|
let t;
|
|
19
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
19
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const Ut = oe("string"), P = oe("function"), rt = oe("number"), Q = (e) => e !== null && typeof e == "object", Lt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
22
|
+
if (ie(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = _e(e);
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
26
|
-
},
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(se in e);
|
|
26
|
+
}, Dt = (e) => {
|
|
27
27
|
if (!Q(e) || W(e))
|
|
28
28
|
return !1;
|
|
29
29
|
try {
|
|
@@ -31,11 +31,11 @@ const Nt = ie("string"), P = ie("function"), et = ie("number"), Q = (e) => e !==
|
|
|
31
31
|
} catch {
|
|
32
32
|
return !1;
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, Ft = x("Date"), kt = x("File"), Bt = x("Blob"), qt = x("FileList"), vt = (e) => Q(e) && P(e.pipe), It = (e) => {
|
|
35
35
|
let t;
|
|
36
|
-
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t =
|
|
36
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance
|
|
37
37
|
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
38
|
-
},
|
|
38
|
+
}, jt = x("URLSearchParams"), [$t, Mt, Ht, Kt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Vt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
39
|
function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
40
40
|
if (e === null || typeof e > "u")
|
|
41
41
|
return;
|
|
@@ -46,13 +46,13 @@ function X(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
|
46
46
|
else {
|
|
47
47
|
if (W(e))
|
|
48
48
|
return;
|
|
49
|
-
const
|
|
49
|
+
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
50
50
|
let c;
|
|
51
|
-
for (n = 0; n <
|
|
52
|
-
c =
|
|
51
|
+
for (n = 0; n < o; n++)
|
|
52
|
+
c = i[n], t.call(null, e[c], c, e);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function nt(e, t) {
|
|
56
56
|
if (W(e))
|
|
57
57
|
return null;
|
|
58
58
|
t = t.toLowerCase();
|
|
@@ -63,71 +63,71 @@ function tt(e, t) {
|
|
|
63
63
|
return s;
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
|
-
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
66
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !J(e) && e !== B;
|
|
67
67
|
function ye() {
|
|
68
|
-
const { caseless: e } =
|
|
69
|
-
const
|
|
70
|
-
Z(t[
|
|
68
|
+
const { caseless: e } = st(this) && this || {}, t = {}, r = (n, s) => {
|
|
69
|
+
const i = e && nt(t, s) || s;
|
|
70
|
+
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
71
|
};
|
|
72
72
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
73
73
|
arguments[n] && X(arguments[n], r);
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
r && P(s) ? e[
|
|
78
|
-
}, { allOwnKeys: n }), e),
|
|
76
|
+
const zt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, i) => {
|
|
77
|
+
r && P(s) ? e[i] = Ze(s, r) : e[i] = s;
|
|
78
|
+
}, { allOwnKeys: n }), e), Jt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Wt = (e, t, r, n) => {
|
|
79
79
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
80
80
|
value: t.prototype
|
|
81
81
|
}), r && Object.assign(e.prototype, r);
|
|
82
|
-
},
|
|
83
|
-
let s,
|
|
82
|
+
}, Qt = (e, t, r, n) => {
|
|
83
|
+
let s, i, o;
|
|
84
84
|
const c = {};
|
|
85
85
|
if (t = t || {}, e == null) return t;
|
|
86
86
|
do {
|
|
87
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
88
|
-
|
|
87
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
88
|
+
o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
89
89
|
e = r !== !1 && _e(e);
|
|
90
90
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
91
91
|
return t;
|
|
92
|
-
},
|
|
92
|
+
}, Xt = (e, t, r) => {
|
|
93
93
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
94
94
|
const n = e.indexOf(t, r);
|
|
95
95
|
return n !== -1 && n === r;
|
|
96
|
-
},
|
|
96
|
+
}, Yt = (e) => {
|
|
97
97
|
if (!e) return null;
|
|
98
98
|
if (H(e)) return e;
|
|
99
99
|
let t = e.length;
|
|
100
|
-
if (!
|
|
100
|
+
if (!rt(t)) return null;
|
|
101
101
|
const r = new Array(t);
|
|
102
102
|
for (; t-- > 0; )
|
|
103
103
|
r[t] = e[t];
|
|
104
104
|
return r;
|
|
105
|
-
},
|
|
105
|
+
}, Gt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Zt = (e, t) => {
|
|
106
106
|
const n = (e && e[se]).call(e);
|
|
107
107
|
let s;
|
|
108
108
|
for (; (s = n.next()) && !s.done; ) {
|
|
109
|
-
const
|
|
110
|
-
t.call(e,
|
|
109
|
+
const i = s.value;
|
|
110
|
+
t.call(e, i[0], i[1]);
|
|
111
111
|
}
|
|
112
|
-
},
|
|
112
|
+
}, er = (e, t) => {
|
|
113
113
|
let r;
|
|
114
114
|
const n = [];
|
|
115
115
|
for (; (r = e.exec(t)) !== null; )
|
|
116
116
|
n.push(r);
|
|
117
117
|
return n;
|
|
118
|
-
},
|
|
118
|
+
}, tr = x("HTMLFormElement"), rr = (e) => e.toLowerCase().replace(
|
|
119
119
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
120
120
|
function(r, n, s) {
|
|
121
121
|
return n.toUpperCase() + s;
|
|
122
122
|
}
|
|
123
|
-
),
|
|
123
|
+
), Le = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), nr = x("RegExp"), it = (e, t) => {
|
|
124
124
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
125
|
-
X(r, (s,
|
|
126
|
-
let
|
|
127
|
-
(
|
|
125
|
+
X(r, (s, i) => {
|
|
126
|
+
let o;
|
|
127
|
+
(o = t(s, i, e)) !== !1 && (n[i] = o || s);
|
|
128
128
|
}), Object.defineProperties(e, n);
|
|
129
|
-
},
|
|
130
|
-
|
|
129
|
+
}, sr = (e) => {
|
|
130
|
+
it(e, (t, r) => {
|
|
131
131
|
if (P(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
132
132
|
return !1;
|
|
133
133
|
const n = e[r];
|
|
@@ -141,19 +141,19 @@ const Vt = (e, t, r, { allOwnKeys: n } = {}) => (X(t, (s, o) => {
|
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
},
|
|
144
|
+
}, ir = (e, t) => {
|
|
145
145
|
const r = {}, n = (s) => {
|
|
146
|
-
s.forEach((
|
|
147
|
-
r[
|
|
146
|
+
s.forEach((i) => {
|
|
147
|
+
r[i] = !0;
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
150
|
return H(e) ? n(e) : n(String(e).split(t)), r;
|
|
151
151
|
}, or = () => {
|
|
152
|
-
},
|
|
153
|
-
function
|
|
154
|
-
return !!(e && P(e.append) && e[
|
|
152
|
+
}, ar = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
153
|
+
function cr(e) {
|
|
154
|
+
return !!(e && P(e.append) && e[et] === "FormData" && e[se]);
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const ur = (e) => {
|
|
157
157
|
const t = new Array(10), r = (n, s) => {
|
|
158
158
|
if (Q(n)) {
|
|
159
159
|
if (t.indexOf(n) >= 0)
|
|
@@ -162,82 +162,82 @@ const cr = (e) => {
|
|
|
162
162
|
return n;
|
|
163
163
|
if (!("toJSON" in n)) {
|
|
164
164
|
t[s] = n;
|
|
165
|
-
const
|
|
166
|
-
return X(n, (
|
|
167
|
-
const f = r(
|
|
168
|
-
!J(f) && (
|
|
169
|
-
}), t[s] = void 0,
|
|
165
|
+
const i = H(n) ? [] : {};
|
|
166
|
+
return X(n, (o, c) => {
|
|
167
|
+
const f = r(o, s + 1);
|
|
168
|
+
!J(f) && (i[c] = f);
|
|
169
|
+
}), t[s] = void 0, i;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
return n;
|
|
173
173
|
};
|
|
174
174
|
return r(e, 0);
|
|
175
|
-
},
|
|
176
|
-
s === B &&
|
|
175
|
+
}, lr = x("AsyncFunction"), fr = (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 }) => {
|
|
176
|
+
s === B && i === r && n.length && n.shift()();
|
|
177
177
|
}, !1), (s) => {
|
|
178
178
|
n.push(s), B.postMessage(r, "*");
|
|
179
179
|
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
180
180
|
typeof setImmediate == "function",
|
|
181
181
|
P(B.postMessage)
|
|
182
|
-
),
|
|
182
|
+
), dr = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || ot, hr = (e) => e != null && P(e[se]), a = {
|
|
183
183
|
isArray: H,
|
|
184
|
-
isArrayBuffer:
|
|
184
|
+
isArrayBuffer: tt,
|
|
185
185
|
isBuffer: W,
|
|
186
|
-
isFormData:
|
|
187
|
-
isArrayBufferView:
|
|
188
|
-
isString:
|
|
189
|
-
isNumber:
|
|
190
|
-
isBoolean:
|
|
186
|
+
isFormData: It,
|
|
187
|
+
isArrayBufferView: Nt,
|
|
188
|
+
isString: Ut,
|
|
189
|
+
isNumber: rt,
|
|
190
|
+
isBoolean: Lt,
|
|
191
191
|
isObject: Q,
|
|
192
192
|
isPlainObject: Z,
|
|
193
|
-
isEmptyObject:
|
|
194
|
-
isReadableStream:
|
|
195
|
-
isRequest:
|
|
196
|
-
isResponse:
|
|
197
|
-
isHeaders:
|
|
193
|
+
isEmptyObject: Dt,
|
|
194
|
+
isReadableStream: $t,
|
|
195
|
+
isRequest: Mt,
|
|
196
|
+
isResponse: Ht,
|
|
197
|
+
isHeaders: Kt,
|
|
198
198
|
isUndefined: J,
|
|
199
|
-
isDate:
|
|
200
|
-
isFile:
|
|
201
|
-
isBlob:
|
|
202
|
-
isRegExp:
|
|
199
|
+
isDate: Ft,
|
|
200
|
+
isFile: kt,
|
|
201
|
+
isBlob: Bt,
|
|
202
|
+
isRegExp: nr,
|
|
203
203
|
isFunction: P,
|
|
204
|
-
isStream:
|
|
205
|
-
isURLSearchParams:
|
|
206
|
-
isTypedArray:
|
|
207
|
-
isFileList:
|
|
204
|
+
isStream: vt,
|
|
205
|
+
isURLSearchParams: jt,
|
|
206
|
+
isTypedArray: Gt,
|
|
207
|
+
isFileList: qt,
|
|
208
208
|
forEach: X,
|
|
209
209
|
merge: ye,
|
|
210
|
-
extend:
|
|
211
|
-
trim:
|
|
212
|
-
stripBOM:
|
|
213
|
-
inherits:
|
|
214
|
-
toFlatObject:
|
|
215
|
-
kindOf:
|
|
210
|
+
extend: zt,
|
|
211
|
+
trim: Vt,
|
|
212
|
+
stripBOM: Jt,
|
|
213
|
+
inherits: Wt,
|
|
214
|
+
toFlatObject: Qt,
|
|
215
|
+
kindOf: ie,
|
|
216
216
|
kindOfTest: x,
|
|
217
|
-
endsWith:
|
|
218
|
-
toArray:
|
|
219
|
-
forEachEntry:
|
|
220
|
-
matchAll:
|
|
221
|
-
isHTMLForm:
|
|
222
|
-
hasOwnProperty:
|
|
223
|
-
hasOwnProp:
|
|
217
|
+
endsWith: Xt,
|
|
218
|
+
toArray: Yt,
|
|
219
|
+
forEachEntry: Zt,
|
|
220
|
+
matchAll: er,
|
|
221
|
+
isHTMLForm: tr,
|
|
222
|
+
hasOwnProperty: Le,
|
|
223
|
+
hasOwnProp: Le,
|
|
224
224
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
225
|
-
reduceDescriptors:
|
|
226
|
-
freezeMethods:
|
|
227
|
-
toObjectSet:
|
|
228
|
-
toCamelCase:
|
|
225
|
+
reduceDescriptors: it,
|
|
226
|
+
freezeMethods: sr,
|
|
227
|
+
toObjectSet: ir,
|
|
228
|
+
toCamelCase: rr,
|
|
229
229
|
noop: or,
|
|
230
|
-
toFiniteNumber:
|
|
231
|
-
findKey:
|
|
230
|
+
toFiniteNumber: ar,
|
|
231
|
+
findKey: nt,
|
|
232
232
|
global: B,
|
|
233
|
-
isContextDefined:
|
|
234
|
-
isSpecCompliantForm:
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
238
|
-
setImmediate:
|
|
239
|
-
asap:
|
|
240
|
-
isIterable:
|
|
233
|
+
isContextDefined: st,
|
|
234
|
+
isSpecCompliantForm: cr,
|
|
235
|
+
toJSONObject: ur,
|
|
236
|
+
isAsyncFn: lr,
|
|
237
|
+
isThenable: fr,
|
|
238
|
+
setImmediate: ot,
|
|
239
|
+
asap: dr,
|
|
240
|
+
isIterable: hr
|
|
241
241
|
};
|
|
242
242
|
function m(e, t, r, n, s) {
|
|
243
243
|
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 +263,7 @@ a.inherits(m, Error, {
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
-
const
|
|
266
|
+
const at = m.prototype, ct = {};
|
|
267
267
|
[
|
|
268
268
|
"ERR_BAD_OPTION_VALUE",
|
|
269
269
|
"ERR_BAD_OPTION",
|
|
@@ -279,32 +279,32 @@ const ot = m.prototype, it = {};
|
|
|
279
279
|
"ERR_INVALID_URL"
|
|
280
280
|
// eslint-disable-next-line func-names
|
|
281
281
|
].forEach((e) => {
|
|
282
|
-
|
|
282
|
+
ct[e] = { value: e };
|
|
283
283
|
});
|
|
284
|
-
Object.defineProperties(m,
|
|
285
|
-
Object.defineProperty(
|
|
286
|
-
m.from = (e, t, r, n, s,
|
|
287
|
-
const
|
|
288
|
-
return a.toFlatObject(e,
|
|
284
|
+
Object.defineProperties(m, ct);
|
|
285
|
+
Object.defineProperty(at, "isAxiosError", { value: !0 });
|
|
286
|
+
m.from = (e, t, r, n, s, i) => {
|
|
287
|
+
const o = Object.create(at);
|
|
288
|
+
return a.toFlatObject(e, o, function(f) {
|
|
289
289
|
return f !== Error.prototype;
|
|
290
|
-
}, (c) => c !== "isAxiosError"), m.call(
|
|
290
|
+
}, (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
291
|
};
|
|
292
|
-
const
|
|
292
|
+
const pr = null;
|
|
293
293
|
function ge(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function ut(e) {
|
|
297
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
return e ? e.concat(t).map(function(s,
|
|
301
|
-
return s =
|
|
299
|
+
function De(e, t, r) {
|
|
300
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
301
|
+
return s = ut(s), !r && i ? "[" + s + "]" : s;
|
|
302
302
|
}).join(r ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function mr(e) {
|
|
305
305
|
return a.isArray(e) && !e.some(ge);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const yr = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
310
|
function ae(e, t, r) {
|
|
@@ -317,7 +317,7 @@ function ae(e, t, r) {
|
|
|
317
317
|
}, !1, function(y, p) {
|
|
318
318
|
return !a.isUndefined(p[y]);
|
|
319
319
|
});
|
|
320
|
-
const n = r.metaTokens, s = r.visitor || l,
|
|
320
|
+
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
321
|
if (!a.isFunction(s))
|
|
322
322
|
throw new TypeError("visitor must be a function");
|
|
323
323
|
function u(h) {
|
|
@@ -335,18 +335,18 @@ function ae(e, t, r) {
|
|
|
335
335
|
if (h && !p && typeof h == "object") {
|
|
336
336
|
if (a.endsWith(y, "{}"))
|
|
337
337
|
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
338
|
-
else if (a.isArray(h) &&
|
|
339
|
-
return y =
|
|
338
|
+
else if (a.isArray(h) && mr(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
|
|
339
|
+
return y = ut(y), b.forEach(function(R, L) {
|
|
340
340
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
342
|
+
o === !0 ? De([y], L, i) : o === null ? y : y + "[]",
|
|
343
343
|
u(R)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return ge(h) ? !0 : (t.append(
|
|
347
|
+
return ge(h) ? !0 : (t.append(De(p, y, i), u(h)), !1);
|
|
348
348
|
}
|
|
349
|
-
const d = [], g = Object.assign(
|
|
349
|
+
const d = [], g = Object.assign(yr, {
|
|
350
350
|
defaultVisitor: l,
|
|
351
351
|
convertValue: u,
|
|
352
352
|
isVisitable: ge
|
|
@@ -355,14 +355,14 @@ function ae(e, t, r) {
|
|
|
355
355
|
if (!a.isUndefined(h)) {
|
|
356
356
|
if (d.indexOf(h) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + y.join("."));
|
|
358
|
-
d.push(h), a.forEach(h, function(b,
|
|
358
|
+
d.push(h), a.forEach(h, function(b, _) {
|
|
359
359
|
(!(a.isUndefined(b) || b === null) && s.call(
|
|
360
360
|
t,
|
|
361
361
|
b,
|
|
362
|
-
a.isString(
|
|
362
|
+
a.isString(_) ? _.trim() : _,
|
|
363
363
|
y,
|
|
364
364
|
g
|
|
365
|
-
)) === !0 && w(b, y ? y.concat(
|
|
365
|
+
)) === !0 && w(b, y ? y.concat(_) : [_]);
|
|
366
366
|
}), d.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
@@ -370,7 +370,7 @@ function ae(e, t, r) {
|
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
371
|
return w(e), t;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function Fe(e) {
|
|
374
374
|
const t = {
|
|
375
375
|
"!": "%21",
|
|
376
376
|
"'": "%27",
|
|
@@ -387,37 +387,37 @@ function De(e) {
|
|
|
387
387
|
function Re(e, t) {
|
|
388
388
|
this._pairs = [], e && ae(e, this, t);
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const lt = Re.prototype;
|
|
391
|
+
lt.append = function(t, r) {
|
|
392
392
|
this._pairs.push([t, r]);
|
|
393
393
|
};
|
|
394
|
-
|
|
394
|
+
lt.toString = function(t) {
|
|
395
395
|
const r = t ? function(n) {
|
|
396
|
-
return t.call(this, n,
|
|
397
|
-
} :
|
|
396
|
+
return t.call(this, n, Fe);
|
|
397
|
+
} : Fe;
|
|
398
398
|
return this._pairs.map(function(s) {
|
|
399
399
|
return r(s[0]) + "=" + r(s[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function gr(e) {
|
|
403
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function ft(e, t, r) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
|
-
const n = r && r.encode ||
|
|
408
|
+
const n = r && r.encode || gr;
|
|
409
409
|
a.isFunction(r) && (r = {
|
|
410
410
|
serialize: r
|
|
411
411
|
});
|
|
412
412
|
const s = r && r.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (s ?
|
|
415
|
-
const
|
|
416
|
-
|
|
413
|
+
let i;
|
|
414
|
+
if (s ? i = s(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new Re(t, r).toString(n), i) {
|
|
415
|
+
const o = e.indexOf("#");
|
|
416
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
417
417
|
}
|
|
418
418
|
return e;
|
|
419
419
|
}
|
|
420
|
-
class
|
|
420
|
+
class ke {
|
|
421
421
|
constructor() {
|
|
422
422
|
this.handlers = [];
|
|
423
423
|
}
|
|
@@ -471,66 +471,66 @@ class Fe {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const dt = {
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, wr = typeof URLSearchParams < "u" ? URLSearchParams : Re, br = typeof FormData < "u" ? FormData : null, Er = typeof Blob < "u" ? Blob : null, Sr = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: wr,
|
|
482
|
+
FormData: br,
|
|
483
|
+
Blob: Er
|
|
484
484
|
},
|
|
485
485
|
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",
|
|
486
|
+
}, Ae = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Cr = Ae && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), _r = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Rr = Ae && window.location.href || "http://localhost", Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: Ae,
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
490
|
+
hasStandardBrowserEnv: Cr,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: _r,
|
|
492
492
|
navigator: we,
|
|
493
|
-
origin:
|
|
493
|
+
origin: Rr
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
495
|
+
...Ar,
|
|
496
|
+
...Sr
|
|
497
497
|
};
|
|
498
|
-
function
|
|
498
|
+
function Tr(e, t) {
|
|
499
499
|
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) :
|
|
500
|
+
visitor: function(r, n, s, i) {
|
|
501
|
+
return A.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Pr(e) {
|
|
507
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Or(e) {
|
|
510
510
|
const t = {}, r = Object.keys(e);
|
|
511
511
|
let n;
|
|
512
512
|
const s = r.length;
|
|
513
|
-
let
|
|
513
|
+
let i;
|
|
514
514
|
for (n = 0; n < s; n++)
|
|
515
|
-
|
|
515
|
+
i = r[n], t[i] = e[i];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
function t(r, n, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const c = Number.isFinite(+
|
|
523
|
-
return
|
|
518
|
+
function ht(e) {
|
|
519
|
+
function t(r, n, s, i) {
|
|
520
|
+
let o = r[i++];
|
|
521
|
+
if (o === "__proto__") return !0;
|
|
522
|
+
const c = Number.isFinite(+o), f = i >= r.length;
|
|
523
|
+
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] = Or(s[o])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
526
|
const r = {};
|
|
527
527
|
return a.forEachEntry(e, (n, s) => {
|
|
528
|
-
t(
|
|
528
|
+
t(Pr(n), s, r, 0);
|
|
529
529
|
}), r;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function xr(e, t, r) {
|
|
534
534
|
if (a.isString(e))
|
|
535
535
|
try {
|
|
536
536
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -541,12 +541,12 @@ function Or(e, t, r) {
|
|
|
541
541
|
return (0, JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const Y = {
|
|
544
|
-
transitional:
|
|
544
|
+
transitional: dt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(t, r) {
|
|
547
|
-
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
549
|
-
return s ? JSON.stringify(
|
|
547
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = a.isObject(t);
|
|
548
|
+
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
549
|
+
return s ? JSON.stringify(ht(t)) : t;
|
|
550
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (a.isArrayBufferView(t))
|
|
@@ -554,9 +554,9 @@ const Y = {
|
|
|
554
554
|
if (a.isURLSearchParams(t))
|
|
555
555
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
556
556
|
let c;
|
|
557
|
-
if (
|
|
557
|
+
if (i) {
|
|
558
558
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
559
|
+
return Tr(t, this.formSerializer).toString();
|
|
560
560
|
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const f = this.env && this.env.FormData;
|
|
562
562
|
return ae(
|
|
@@ -566,18 +566,18 @@ const Y = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return i || s ? (r.setContentType("application/json", !1), xr(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
572
|
const r = this.transitional || Y.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
573
573
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
574
574
|
return t;
|
|
575
575
|
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
576
|
-
const
|
|
576
|
+
const o = !(r && r.silentJSONParsing) && s;
|
|
577
577
|
try {
|
|
578
578
|
return JSON.parse(t);
|
|
579
579
|
} catch (c) {
|
|
580
|
-
if (
|
|
580
|
+
if (o)
|
|
581
581
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -609,7 +609,7 @@ const Y = {
|
|
|
609
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
610
|
Y.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const Nr = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,28 +627,28 @@ const xr = a.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), Ur = (e) => {
|
|
631
631
|
const t = {};
|
|
632
632
|
let r, n, s;
|
|
633
633
|
return e && e.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
s =
|
|
634
|
+
`).forEach(function(o) {
|
|
635
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && Nr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
636
636
|
}), t;
|
|
637
|
-
},
|
|
637
|
+
}, Be = Symbol("internals");
|
|
638
638
|
function z(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
641
|
function ee(e) {
|
|
642
642
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Lr(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let n;
|
|
647
647
|
for (; n = r.exec(e); )
|
|
648
648
|
t[n[1]] = n[2];
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const Dr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
652
|
function de(e, t, r, n, s) {
|
|
653
653
|
if (a.isFunction(n))
|
|
654
654
|
return n.call(this, t, r);
|
|
@@ -659,15 +659,15 @@ function de(e, t, r, n, s) {
|
|
|
659
659
|
return n.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Fr(e) {
|
|
663
663
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function kr(e, t) {
|
|
666
666
|
const r = a.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((n) => {
|
|
668
668
|
Object.defineProperty(e, n + r, {
|
|
669
|
-
value: function(s,
|
|
670
|
-
return this[n].call(this, t, s,
|
|
669
|
+
value: function(s, i, o) {
|
|
670
|
+
return this[n].call(this, t, s, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -679,18 +679,18 @@ let O = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(t, r, n) {
|
|
681
681
|
const s = this;
|
|
682
|
-
function
|
|
682
|
+
function i(c, f, u) {
|
|
683
683
|
const l = z(f);
|
|
684
684
|
if (!l)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
686
|
const d = a.findKey(s, l);
|
|
687
687
|
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = ee(c));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const o = (c, f) => a.forEach(c, (u, l) => i(u, l, f));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
|
-
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
693
|
-
|
|
691
|
+
o(t, r);
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !Dr(t))
|
|
693
|
+
o(Ur(t), r);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
695
|
let c = {}, f, u;
|
|
696
696
|
for (const l of t) {
|
|
@@ -698,9 +698,9 @@ let O = class {
|
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
699
|
c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
o(c, r);
|
|
702
702
|
} else
|
|
703
|
-
t != null &&
|
|
703
|
+
t != null && i(r, t, n);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(t, r) {
|
|
@@ -711,7 +711,7 @@ let O = class {
|
|
|
711
711
|
if (!r)
|
|
712
712
|
return s;
|
|
713
713
|
if (r === !0)
|
|
714
|
-
return
|
|
714
|
+
return Lr(s);
|
|
715
715
|
if (a.isFunction(r))
|
|
716
716
|
return r.call(this, s, n);
|
|
717
717
|
if (a.isRegExp(r))
|
|
@@ -730,33 +730,33 @@ let O = class {
|
|
|
730
730
|
delete(t, r) {
|
|
731
731
|
const n = this;
|
|
732
732
|
let s = !1;
|
|
733
|
-
function o
|
|
734
|
-
if (
|
|
735
|
-
const c = a.findKey(n,
|
|
733
|
+
function i(o) {
|
|
734
|
+
if (o = z(o), o) {
|
|
735
|
+
const c = a.findKey(n, o);
|
|
736
736
|
c && (!r || de(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
return a.isArray(t) ? t.forEach(
|
|
739
|
+
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
740
740
|
}
|
|
741
741
|
clear(t) {
|
|
742
742
|
const r = Object.keys(this);
|
|
743
743
|
let n = r.length, s = !1;
|
|
744
744
|
for (; n--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!t || de(this, this[
|
|
745
|
+
const i = r[n];
|
|
746
|
+
(!t || de(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
747
747
|
}
|
|
748
748
|
return s;
|
|
749
749
|
}
|
|
750
750
|
normalize(t) {
|
|
751
751
|
const r = this, n = {};
|
|
752
|
-
return a.forEach(this, (s,
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
r[
|
|
752
|
+
return a.forEach(this, (s, i) => {
|
|
753
|
+
const o = a.findKey(n, i);
|
|
754
|
+
if (o) {
|
|
755
|
+
r[o] = ee(s), delete r[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = t ?
|
|
759
|
-
c !==
|
|
758
|
+
const c = t ? Fr(i) : String(i).trim();
|
|
759
|
+
c !== i && delete r[i], r[c] = ee(s), n[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...t) {
|
|
@@ -789,14 +789,14 @@ let O = class {
|
|
|
789
789
|
return r.forEach((s) => n.set(s)), n;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
|
-
const n = (this[
|
|
792
|
+
const n = (this[Be] = this[Be] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, s = this.prototype;
|
|
795
|
-
function o
|
|
796
|
-
const c = z(
|
|
797
|
-
n[c] || (
|
|
795
|
+
function i(o) {
|
|
796
|
+
const c = z(o);
|
|
797
|
+
n[c] || (kr(s, o), n[c] = !0);
|
|
798
798
|
}
|
|
799
|
-
return a.isArray(t) ? t.forEach(
|
|
799
|
+
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -812,12 +812,12 @@ a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
|
812
812
|
a.freezeMethods(O);
|
|
813
813
|
function he(e, t) {
|
|
814
814
|
const r = this || Y, n = t || r, s = O.from(n.headers);
|
|
815
|
-
let
|
|
815
|
+
let i = n.data;
|
|
816
816
|
return a.forEach(e, function(c) {
|
|
817
|
-
|
|
818
|
-
}), s.normalize(),
|
|
817
|
+
i = c.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
818
|
+
}), s.normalize(), i;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function pt(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
822
822
|
}
|
|
823
823
|
function K(e, t, r) {
|
|
@@ -826,7 +826,7 @@ function K(e, t, r) {
|
|
|
826
826
|
a.inherits(K, m, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function mt(e, t, r) {
|
|
830
830
|
const n = r.config.validateStatus;
|
|
831
831
|
!r.status || !n || n(r.status) ? e(r) : t(new m(
|
|
832
832
|
"Request failed with status code " + r.status,
|
|
@@ -836,73 +836,73 @@ function ht(e, t, r) {
|
|
|
836
836
|
r
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Br(e) {
|
|
840
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
841
|
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function qr(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const r = new Array(e), n = new Array(e);
|
|
846
|
-
let s = 0,
|
|
846
|
+
let s = 0, i = 0, o;
|
|
847
847
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
848
|
-
const u = Date.now(), l = n[
|
|
849
|
-
|
|
850
|
-
let d =
|
|
848
|
+
const u = Date.now(), l = n[i];
|
|
849
|
+
o || (o = u), r[s] = f, n[s] = u;
|
|
850
|
+
let d = i, g = 0;
|
|
851
851
|
for (; d !== s; )
|
|
852
852
|
g += r[d++], d = d % e;
|
|
853
|
-
if (s = (s + 1) % e, s ===
|
|
853
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), u - o < t)
|
|
854
854
|
return;
|
|
855
855
|
const w = l && u - l;
|
|
856
856
|
return w ? Math.round(g * 1e3 / w) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
let r = 0, n = 1e3 / t, s,
|
|
861
|
-
const
|
|
862
|
-
r = l, s = null,
|
|
859
|
+
function vr(e, t) {
|
|
860
|
+
let r = 0, n = 1e3 / t, s, i;
|
|
861
|
+
const o = (u, l = Date.now()) => {
|
|
862
|
+
r = l, s = null, i && (clearTimeout(i), i = null), e(...u);
|
|
863
863
|
};
|
|
864
864
|
return [(...u) => {
|
|
865
865
|
const l = Date.now(), d = l - r;
|
|
866
|
-
d >= n ?
|
|
867
|
-
|
|
866
|
+
d >= n ? o(u, l) : (s = u, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(s);
|
|
868
868
|
}, n - d)));
|
|
869
|
-
}, () => s &&
|
|
869
|
+
}, () => s && o(s)];
|
|
870
870
|
}
|
|
871
871
|
const re = (e, t, r = 3) => {
|
|
872
872
|
let n = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
875
|
-
const
|
|
876
|
-
n =
|
|
873
|
+
const s = qr(50, 250);
|
|
874
|
+
return vr((i) => {
|
|
875
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, u = s(f), l = o <= c;
|
|
876
|
+
n = o;
|
|
877
877
|
const d = {
|
|
878
|
-
loaded:
|
|
878
|
+
loaded: o,
|
|
879
879
|
total: c,
|
|
880
|
-
progress: c ?
|
|
880
|
+
progress: c ? o / c : void 0,
|
|
881
881
|
bytes: f,
|
|
882
882
|
rate: u || void 0,
|
|
883
|
-
estimated: u && c && l ? (c -
|
|
884
|
-
event:
|
|
883
|
+
estimated: u && c && l ? (c - o) / u : void 0,
|
|
884
|
+
event: i,
|
|
885
885
|
lengthComputable: c != null,
|
|
886
886
|
[t ? "download" : "upload"]: !0
|
|
887
887
|
};
|
|
888
888
|
e(d);
|
|
889
889
|
}, r);
|
|
890
|
-
},
|
|
890
|
+
}, qe = (e, t) => {
|
|
891
891
|
const r = e != null;
|
|
892
892
|
return [(n) => t[0]({
|
|
893
893
|
lengthComputable: r,
|
|
894
894
|
total: e,
|
|
895
895
|
loaded: n
|
|
896
896
|
}), t[1]];
|
|
897
|
-
},
|
|
897
|
+
}, ve = (e) => (...t) => a.asap(() => e(...t)), Ir = 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
898
|
new URL(A.origin),
|
|
899
899
|
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, jr = A.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(e, t, r, n, s,
|
|
904
|
-
const
|
|
905
|
-
a.isNumber(r) &&
|
|
903
|
+
write(e, t, r, n, s, i) {
|
|
904
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
905
|
+
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
906
|
},
|
|
907
907
|
read(e) {
|
|
908
908
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -924,17 +924,17 @@ const re = (e, t, r = 3) => {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
);
|
|
927
|
-
function
|
|
927
|
+
function $r(e) {
|
|
928
928
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Mr(e, t) {
|
|
931
931
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
934
|
-
let n =
|
|
935
|
-
return e && (n || r == !1) ?
|
|
933
|
+
function yt(e, t, r) {
|
|
934
|
+
let n = !$r(t);
|
|
935
|
+
return e && (n || r == !1) ? Mr(e, t) : t;
|
|
936
936
|
}
|
|
937
|
-
const
|
|
937
|
+
const Ie = (e) => e instanceof O ? { ...e } : e;
|
|
938
938
|
function v(e, t) {
|
|
939
939
|
t = t || {};
|
|
940
940
|
const r = {};
|
|
@@ -947,11 +947,11 @@ function v(e, t) {
|
|
|
947
947
|
return n(void 0, u, d, g);
|
|
948
948
|
} else return n(u, l, d, g);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function i(u, l) {
|
|
951
951
|
if (!a.isUndefined(l))
|
|
952
952
|
return n(void 0, l);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
954
|
+
function o(u, l) {
|
|
955
955
|
if (a.isUndefined(l)) {
|
|
956
956
|
if (!a.isUndefined(u))
|
|
957
957
|
return n(void 0, u);
|
|
@@ -964,67 +964,67 @@ function v(e, t) {
|
|
|
964
964
|
return n(void 0, u);
|
|
965
965
|
}
|
|
966
966
|
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:
|
|
967
|
+
url: i,
|
|
968
|
+
method: i,
|
|
969
|
+
data: i,
|
|
970
|
+
baseURL: o,
|
|
971
|
+
transformRequest: o,
|
|
972
|
+
transformResponse: o,
|
|
973
|
+
paramsSerializer: o,
|
|
974
|
+
timeout: o,
|
|
975
|
+
timeoutMessage: o,
|
|
976
|
+
withCredentials: o,
|
|
977
|
+
withXSRFToken: o,
|
|
978
|
+
adapter: o,
|
|
979
|
+
responseType: o,
|
|
980
|
+
xsrfCookieName: o,
|
|
981
|
+
xsrfHeaderName: o,
|
|
982
|
+
onUploadProgress: o,
|
|
983
|
+
onDownloadProgress: o,
|
|
984
|
+
decompress: o,
|
|
985
|
+
maxContentLength: o,
|
|
986
|
+
maxBodyLength: o,
|
|
987
|
+
beforeRedirect: o,
|
|
988
|
+
transport: o,
|
|
989
|
+
httpAgent: o,
|
|
990
|
+
httpsAgent: o,
|
|
991
|
+
cancelToken: o,
|
|
992
|
+
socketPath: o,
|
|
993
|
+
responseEncoding: o,
|
|
994
994
|
validateStatus: c,
|
|
995
|
-
headers: (u, l, d) => s(
|
|
995
|
+
headers: (u, l, d) => s(Ie(u), Ie(l), d, !0)
|
|
996
996
|
};
|
|
997
997
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
998
998
|
const d = f[l] || s, g = d(e[l], t[l], l);
|
|
999
999
|
a.isUndefined(g) && d !== c || (r[l] = g);
|
|
1000
1000
|
}), r;
|
|
1001
1001
|
}
|
|
1002
|
-
const
|
|
1002
|
+
const gt = (e) => {
|
|
1003
1003
|
const t = v({}, e);
|
|
1004
|
-
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName:
|
|
1005
|
-
t.headers =
|
|
1004
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1005
|
+
t.headers = o = O.from(o), t.url = ft(yt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1006
1006
|
"Authorization",
|
|
1007
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1008
1008
|
);
|
|
1009
1009
|
let f;
|
|
1010
1010
|
if (a.isFormData(r)) {
|
|
1011
1011
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1012
|
-
|
|
1013
|
-
else if ((f =
|
|
1012
|
+
o.setContentType(void 0);
|
|
1013
|
+
else if ((f = o.getContentType()) !== !1) {
|
|
1014
1014
|
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1015
|
-
|
|
1015
|
+
o.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 &&
|
|
1019
|
-
const u = s &&
|
|
1020
|
-
u &&
|
|
1018
|
+
if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && Ir(t.url))) {
|
|
1019
|
+
const u = s && i && jr.read(i);
|
|
1020
|
+
u && o.set(s, u);
|
|
1021
1021
|
}
|
|
1022
1022
|
return t;
|
|
1023
|
-
},
|
|
1023
|
+
}, Hr = typeof XMLHttpRequest < "u", Kr = Hr && function(e) {
|
|
1024
1024
|
return new Promise(function(r, n) {
|
|
1025
|
-
const s =
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1025
|
+
const s = gt(e);
|
|
1026
|
+
let i = s.data;
|
|
1027
|
+
const o = O.from(s.headers).normalize();
|
|
1028
1028
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, g, w, h;
|
|
1029
1029
|
function y() {
|
|
1030
1030
|
w && w(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
@@ -1044,7 +1044,7 @@ const mt = (e) => {
|
|
|
1044
1044
|
config: e,
|
|
1045
1045
|
request: p
|
|
1046
1046
|
};
|
|
1047
|
-
|
|
1047
|
+
mt(function(k) {
|
|
1048
1048
|
r(k), y();
|
|
1049
1049
|
}, function(k) {
|
|
1050
1050
|
n(k), y();
|
|
@@ -1058,49 +1058,49 @@ const mt = (e) => {
|
|
|
1058
1058
|
n(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1059
1059
|
}, p.ontimeout = function() {
|
|
1060
1060
|
let L = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1061
|
-
const T = s.transitional ||
|
|
1061
|
+
const T = s.transitional || dt;
|
|
1062
1062
|
s.timeoutErrorMessage && (L = s.timeoutErrorMessage), n(new m(
|
|
1063
1063
|
L,
|
|
1064
1064
|
T.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1065
1065
|
e,
|
|
1066
1066
|
p
|
|
1067
1067
|
)), p = null;
|
|
1068
|
-
},
|
|
1068
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in p && a.forEach(o.toJSON(), function(L, T) {
|
|
1069
1069
|
p.setRequestHeader(T, L);
|
|
1070
1070
|
}), 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
1071
|
p && (n(!R || R.type ? new K(null, e, p) : R), p.abort(), p = null);
|
|
1072
1072
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1073
|
-
const
|
|
1074
|
-
if (
|
|
1075
|
-
n(new m("Unsupported protocol " +
|
|
1073
|
+
const _ = Br(s.url);
|
|
1074
|
+
if (_ && A.protocols.indexOf(_) === -1) {
|
|
1075
|
+
n(new m("Unsupported protocol " + _ + ":", m.ERR_BAD_REQUEST, e));
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
1078
|
-
p.send(
|
|
1078
|
+
p.send(i || null);
|
|
1079
1079
|
});
|
|
1080
|
-
},
|
|
1080
|
+
}, Vr = (e, t) => {
|
|
1081
1081
|
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1082
1082
|
if (t || r) {
|
|
1083
1083
|
let n = new AbortController(), s;
|
|
1084
|
-
const
|
|
1084
|
+
const i = function(u) {
|
|
1085
1085
|
if (!s) {
|
|
1086
1086
|
s = !0, c();
|
|
1087
1087
|
const l = u instanceof Error ? u : this.reason;
|
|
1088
1088
|
n.abort(l instanceof m ? l : new K(l instanceof Error ? l.message : l));
|
|
1089
1089
|
}
|
|
1090
1090
|
};
|
|
1091
|
-
let
|
|
1092
|
-
|
|
1091
|
+
let o = t && setTimeout(() => {
|
|
1092
|
+
o = null, i(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1093
1093
|
}, t);
|
|
1094
1094
|
const c = () => {
|
|
1095
|
-
e && (
|
|
1096
|
-
u.unsubscribe ? u.unsubscribe(
|
|
1095
|
+
e && (o && clearTimeout(o), o = null, e.forEach((u) => {
|
|
1096
|
+
u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
|
|
1097
1097
|
}), e = null);
|
|
1098
1098
|
};
|
|
1099
|
-
e.forEach((u) => u.addEventListener("abort",
|
|
1099
|
+
e.forEach((u) => u.addEventListener("abort", i));
|
|
1100
1100
|
const { signal: f } = n;
|
|
1101
1101
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1103
|
+
}, zr = function* (e, t) {
|
|
1104
1104
|
let r = e.byteLength;
|
|
1105
1105
|
if (r < t) {
|
|
1106
1106
|
yield e;
|
|
@@ -1109,10 +1109,10 @@ const mt = (e) => {
|
|
|
1109
1109
|
let n = 0, s;
|
|
1110
1110
|
for (; n < r; )
|
|
1111
1111
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1112
|
-
},
|
|
1113
|
-
for await (const r of
|
|
1114
|
-
yield*
|
|
1115
|
-
},
|
|
1112
|
+
}, Jr = async function* (e, t) {
|
|
1113
|
+
for await (const r of Wr(e))
|
|
1114
|
+
yield* zr(r, t);
|
|
1115
|
+
}, Wr = async function* (e) {
|
|
1116
1116
|
if (e[Symbol.asyncIterator]) {
|
|
1117
1117
|
yield* e;
|
|
1118
1118
|
return;
|
|
@@ -1128,10 +1128,10 @@ const mt = (e) => {
|
|
|
1128
1128
|
} finally {
|
|
1129
1129
|
await t.cancel();
|
|
1130
1130
|
}
|
|
1131
|
-
},
|
|
1132
|
-
const s =
|
|
1133
|
-
let
|
|
1134
|
-
|
|
1131
|
+
}, je = (e, t, r, n) => {
|
|
1132
|
+
const s = Jr(e, t);
|
|
1133
|
+
let i = 0, o, c = (f) => {
|
|
1134
|
+
o || (o = !0, n && n(f));
|
|
1135
1135
|
};
|
|
1136
1136
|
return new ReadableStream({
|
|
1137
1137
|
async pull(f) {
|
|
@@ -1143,7 +1143,7 @@ const mt = (e) => {
|
|
|
1143
1143
|
}
|
|
1144
1144
|
let d = l.byteLength;
|
|
1145
1145
|
if (r) {
|
|
1146
|
-
let g =
|
|
1146
|
+
let g = i += d;
|
|
1147
1147
|
r(g);
|
|
1148
1148
|
}
|
|
1149
1149
|
f.enqueue(new Uint8Array(l));
|
|
@@ -1157,13 +1157,13 @@ const mt = (e) => {
|
|
|
1157
1157
|
}, {
|
|
1158
1158
|
highWaterMark: 2
|
|
1159
1159
|
});
|
|
1160
|
-
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1160
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = ce && typeof ReadableStream == "function", Qr = 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
1161
|
try {
|
|
1162
1162
|
return !!e(...t);
|
|
1163
1163
|
} catch {
|
|
1164
1164
|
return !1;
|
|
1165
1165
|
}
|
|
1166
|
-
},
|
|
1166
|
+
}, Xr = wt && bt(() => {
|
|
1167
1167
|
let e = !1;
|
|
1168
1168
|
const t = new Request(A.origin, {
|
|
1169
1169
|
body: new ReadableStream(),
|
|
@@ -1173,7 +1173,7 @@ const mt = (e) => {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}).headers.has("Content-Type");
|
|
1175
1175
|
return e && !t;
|
|
1176
|
-
}),
|
|
1176
|
+
}), $e = 64 * 1024, be = wt && bt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1177
1177
|
stream: be && ((e) => e.body)
|
|
1178
1178
|
};
|
|
1179
1179
|
ce && ((e) => {
|
|
@@ -1183,7 +1183,7 @@ ce && ((e) => {
|
|
|
1183
1183
|
});
|
|
1184
1184
|
});
|
|
1185
1185
|
})(new Response());
|
|
1186
|
-
const
|
|
1186
|
+
const Yr = async (e) => {
|
|
1187
1187
|
if (e == null)
|
|
1188
1188
|
return 0;
|
|
1189
1189
|
if (a.isBlob(e))
|
|
@@ -1196,44 +1196,44 @@ const Xr = async (e) => {
|
|
|
1196
1196
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1197
1197
|
return e.byteLength;
|
|
1198
1198
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1199
|
-
return (await
|
|
1200
|
-
},
|
|
1199
|
+
return (await Qr(e)).byteLength;
|
|
1200
|
+
}, Gr = async (e, t) => {
|
|
1201
1201
|
const r = a.toFiniteNumber(e.getContentLength());
|
|
1202
|
-
return r ??
|
|
1203
|
-
},
|
|
1202
|
+
return r ?? Yr(t);
|
|
1203
|
+
}, Zr = ce && (async (e) => {
|
|
1204
1204
|
let {
|
|
1205
1205
|
url: t,
|
|
1206
1206
|
method: r,
|
|
1207
1207
|
data: n,
|
|
1208
1208
|
signal: s,
|
|
1209
|
-
cancelToken:
|
|
1210
|
-
timeout:
|
|
1209
|
+
cancelToken: i,
|
|
1210
|
+
timeout: o,
|
|
1211
1211
|
onDownloadProgress: c,
|
|
1212
1212
|
onUploadProgress: f,
|
|
1213
1213
|
responseType: u,
|
|
1214
1214
|
headers: l,
|
|
1215
1215
|
withCredentials: d = "same-origin",
|
|
1216
1216
|
fetchOptions: g
|
|
1217
|
-
} =
|
|
1217
|
+
} = gt(e);
|
|
1218
1218
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1219
|
-
let w =
|
|
1219
|
+
let w = Vr([s, i && i.toAbortSignal()], o), h;
|
|
1220
1220
|
const y = w && w.unsubscribe && (() => {
|
|
1221
1221
|
w.unsubscribe();
|
|
1222
1222
|
});
|
|
1223
1223
|
let p;
|
|
1224
1224
|
try {
|
|
1225
|
-
if (f &&
|
|
1225
|
+
if (f && Xr && r !== "get" && r !== "head" && (p = await Gr(l, n)) !== 0) {
|
|
1226
1226
|
let T = new Request(t, {
|
|
1227
1227
|
method: "POST",
|
|
1228
1228
|
body: n,
|
|
1229
1229
|
duplex: "half"
|
|
1230
1230
|
}), D;
|
|
1231
1231
|
if (a.isFormData(n) && (D = T.headers.get("content-type")) && l.setContentType(D), T.body) {
|
|
1232
|
-
const [k, G] =
|
|
1232
|
+
const [k, G] = qe(
|
|
1233
1233
|
p,
|
|
1234
|
-
re(
|
|
1234
|
+
re(ve(f))
|
|
1235
1235
|
);
|
|
1236
|
-
n =
|
|
1236
|
+
n = je(T.body, $e, k, G);
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
1239
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1247,32 +1247,32 @@ const Xr = async (e) => {
|
|
|
1247
1247
|
duplex: "half",
|
|
1248
1248
|
credentials: b ? d : void 0
|
|
1249
1249
|
});
|
|
1250
|
-
let
|
|
1250
|
+
let _ = await fetch(h, g);
|
|
1251
1251
|
const R = be && (u === "stream" || u === "response");
|
|
1252
1252
|
if (be && (c || R && y)) {
|
|
1253
1253
|
const T = {};
|
|
1254
|
-
["status", "statusText", "headers"].forEach((
|
|
1255
|
-
T[
|
|
1254
|
+
["status", "statusText", "headers"].forEach((Ue) => {
|
|
1255
|
+
T[Ue] = _[Ue];
|
|
1256
1256
|
});
|
|
1257
|
-
const D = a.toFiniteNumber(
|
|
1257
|
+
const D = a.toFiniteNumber(_.headers.get("content-length")), [k, G] = c && qe(
|
|
1258
1258
|
D,
|
|
1259
|
-
re(
|
|
1259
|
+
re(ve(c), !0)
|
|
1260
1260
|
) || [];
|
|
1261
|
-
|
|
1262
|
-
|
|
1261
|
+
_ = new Response(
|
|
1262
|
+
je(_.body, $e, k, () => {
|
|
1263
1263
|
G && G(), y && y();
|
|
1264
1264
|
}),
|
|
1265
1265
|
T
|
|
1266
1266
|
);
|
|
1267
1267
|
}
|
|
1268
1268
|
u = u || "text";
|
|
1269
|
-
let L = await ne[a.findKey(ne, u) || "text"](
|
|
1269
|
+
let L = await ne[a.findKey(ne, u) || "text"](_, e);
|
|
1270
1270
|
return !R && y && y(), await new Promise((T, D) => {
|
|
1271
|
-
|
|
1271
|
+
mt(T, D, {
|
|
1272
1272
|
data: L,
|
|
1273
|
-
headers: O.from(
|
|
1274
|
-
status:
|
|
1275
|
-
statusText:
|
|
1273
|
+
headers: O.from(_.headers),
|
|
1274
|
+
status: _.status,
|
|
1275
|
+
statusText: _.statusText,
|
|
1276
1276
|
config: e,
|
|
1277
1277
|
request: h
|
|
1278
1278
|
});
|
|
@@ -1286,9 +1286,9 @@ const Xr = async (e) => {
|
|
|
1286
1286
|
) : m.from(b, b && b.code, e, h);
|
|
1287
1287
|
}
|
|
1288
1288
|
}), Ee = {
|
|
1289
|
-
http:
|
|
1290
|
-
xhr:
|
|
1291
|
-
fetch:
|
|
1289
|
+
http: pr,
|
|
1290
|
+
xhr: Kr,
|
|
1291
|
+
fetch: Zr
|
|
1292
1292
|
};
|
|
1293
1293
|
a.forEach(Ee, (e, t) => {
|
|
1294
1294
|
if (e) {
|
|
@@ -1299,30 +1299,30 @@ a.forEach(Ee, (e, t) => {
|
|
|
1299
1299
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1300
1300
|
}
|
|
1301
1301
|
});
|
|
1302
|
-
const
|
|
1302
|
+
const Me = (e) => `- ${e}`, en = (e) => a.isFunction(e) || e === null || e === !1, Et = {
|
|
1303
1303
|
getAdapter: (e) => {
|
|
1304
1304
|
e = a.isArray(e) ? e : [e];
|
|
1305
1305
|
const { length: t } = e;
|
|
1306
1306
|
let r, n;
|
|
1307
1307
|
const s = {};
|
|
1308
|
-
for (let
|
|
1309
|
-
r = e[
|
|
1310
|
-
let
|
|
1311
|
-
if (n = r, !
|
|
1312
|
-
throw new m(`Unknown adapter '${
|
|
1308
|
+
for (let i = 0; i < t; i++) {
|
|
1309
|
+
r = e[i];
|
|
1310
|
+
let o;
|
|
1311
|
+
if (n = r, !en(r) && (n = Ee[(o = String(r)).toLowerCase()], n === void 0))
|
|
1312
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
1313
1313
|
if (n)
|
|
1314
1314
|
break;
|
|
1315
|
-
s[
|
|
1315
|
+
s[o || "#" + i] = n;
|
|
1316
1316
|
}
|
|
1317
1317
|
if (!n) {
|
|
1318
|
-
const
|
|
1318
|
+
const i = Object.entries(s).map(
|
|
1319
1319
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1320
1320
|
);
|
|
1321
|
-
let
|
|
1322
|
-
` +
|
|
1323
|
-
`) : " " +
|
|
1321
|
+
let o = t ? i.length > 1 ? `since :
|
|
1322
|
+
` + i.map(Me).join(`
|
|
1323
|
+
`) : " " + Me(i[0]) : "as no adapter specified";
|
|
1324
1324
|
throw new m(
|
|
1325
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1325
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
1326
1326
|
"ERR_NOT_SUPPORT"
|
|
1327
1327
|
);
|
|
1328
1328
|
}
|
|
@@ -1334,78 +1334,78 @@ function pe(e) {
|
|
|
1334
1334
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1335
1335
|
throw new K(null, e);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function He(e) {
|
|
1338
1338
|
return pe(e), e.headers = O.from(e.headers), e.data = he.call(
|
|
1339
1339
|
e,
|
|
1340
1340
|
e.transformRequest
|
|
1341
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1341
|
+
), ["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
1342
|
return pe(e), n.data = he.call(
|
|
1343
1343
|
e,
|
|
1344
1344
|
e.transformResponse,
|
|
1345
1345
|
n
|
|
1346
1346
|
), n.headers = O.from(n.headers), n;
|
|
1347
1347
|
}, function(n) {
|
|
1348
|
-
return
|
|
1348
|
+
return pt(n) || (pe(e), n && n.response && (n.response.data = he.call(
|
|
1349
1349
|
e,
|
|
1350
1350
|
e.transformResponse,
|
|
1351
1351
|
n.response
|
|
1352
1352
|
), n.response.headers = O.from(n.response.headers))), Promise.reject(n);
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
|
-
const
|
|
1355
|
+
const St = "1.11.0", ue = {};
|
|
1356
1356
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1357
1357
|
ue[e] = function(n) {
|
|
1358
1358
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1359
1359
|
};
|
|
1360
1360
|
});
|
|
1361
|
-
const
|
|
1361
|
+
const Ke = {};
|
|
1362
1362
|
ue.transitional = function(t, r, n) {
|
|
1363
|
-
function s(
|
|
1364
|
-
return "[Axios v" +
|
|
1363
|
+
function s(i, o) {
|
|
1364
|
+
return "[Axios v" + St + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1365
1365
|
}
|
|
1366
|
-
return (
|
|
1366
|
+
return (i, o, c) => {
|
|
1367
1367
|
if (t === !1)
|
|
1368
1368
|
throw new m(
|
|
1369
|
-
s(
|
|
1369
|
+
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1370
1370
|
m.ERR_DEPRECATED
|
|
1371
1371
|
);
|
|
1372
|
-
return r && !
|
|
1372
|
+
return r && !Ke[o] && (Ke[o] = !0, console.warn(
|
|
1373
1373
|
s(
|
|
1374
|
-
|
|
1374
|
+
o,
|
|
1375
1375
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1376
1376
|
)
|
|
1377
|
-
)), t ? t(
|
|
1377
|
+
)), t ? t(i, o, c) : !0;
|
|
1378
1378
|
};
|
|
1379
1379
|
};
|
|
1380
1380
|
ue.spelling = function(t) {
|
|
1381
1381
|
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
1382
1382
|
};
|
|
1383
|
-
function
|
|
1383
|
+
function tn(e, t, r) {
|
|
1384
1384
|
if (typeof e != "object")
|
|
1385
1385
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1386
1386
|
const n = Object.keys(e);
|
|
1387
1387
|
let s = n.length;
|
|
1388
1388
|
for (; s-- > 0; ) {
|
|
1389
|
-
const
|
|
1390
|
-
if (
|
|
1391
|
-
const c = e[
|
|
1389
|
+
const i = n[s], o = t[i];
|
|
1390
|
+
if (o) {
|
|
1391
|
+
const c = e[i], f = c === void 0 || o(c, i, e);
|
|
1392
1392
|
if (f !== !0)
|
|
1393
|
-
throw new m("option " +
|
|
1393
|
+
throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1394
1394
|
continue;
|
|
1395
1395
|
}
|
|
1396
1396
|
if (r !== !0)
|
|
1397
|
-
throw new m("Unknown option " +
|
|
1397
|
+
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
const te = {
|
|
1401
|
-
assertOptions:
|
|
1401
|
+
assertOptions: tn,
|
|
1402
1402
|
validators: ue
|
|
1403
1403
|
}, N = te.validators;
|
|
1404
1404
|
let q = class {
|
|
1405
1405
|
constructor(t) {
|
|
1406
1406
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
|
-
request: new
|
|
1408
|
-
response: new
|
|
1407
|
+
request: new ke(),
|
|
1408
|
+
response: new ke()
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
1411
1411
|
/**
|
|
@@ -1423,10 +1423,10 @@ let q = class {
|
|
|
1423
1423
|
if (n instanceof Error) {
|
|
1424
1424
|
let s = {};
|
|
1425
1425
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1426
|
-
const
|
|
1426
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1427
1427
|
try {
|
|
1428
|
-
n.stack ?
|
|
1429
|
-
` +
|
|
1428
|
+
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1429
|
+
` + i) : n.stack = i;
|
|
1430
1430
|
} catch {
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
@@ -1435,7 +1435,7 @@ let q = class {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
_request(t, r) {
|
|
1437
1437
|
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = v(this.defaults, r);
|
|
1438
|
-
const { transitional: n, paramsSerializer: s, headers:
|
|
1438
|
+
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1439
1439
|
n !== void 0 && te.assertOptions(n, {
|
|
1440
1440
|
silentJSONParsing: N.transitional(N.boolean),
|
|
1441
1441
|
forcedJSONParsing: N.transitional(N.boolean),
|
|
@@ -1449,16 +1449,16 @@ let q = class {
|
|
|
1449
1449
|
baseUrl: N.spelling("baseURL"),
|
|
1450
1450
|
withXsrfToken: N.spelling("withXSRFToken")
|
|
1451
1451
|
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1452
|
-
let
|
|
1453
|
-
|
|
1454
|
-
|
|
1452
|
+
let o = i && a.merge(
|
|
1453
|
+
i.common,
|
|
1454
|
+
i[r.method]
|
|
1455
1455
|
);
|
|
1456
|
-
|
|
1456
|
+
i && a.forEach(
|
|
1457
1457
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1458
1458
|
(h) => {
|
|
1459
|
-
delete
|
|
1459
|
+
delete i[h];
|
|
1460
1460
|
}
|
|
1461
|
-
), r.headers = O.concat(
|
|
1461
|
+
), r.headers = O.concat(o, i);
|
|
1462
1462
|
const c = [];
|
|
1463
1463
|
let f = !0;
|
|
1464
1464
|
this.interceptors.request.forEach(function(y) {
|
|
@@ -1470,7 +1470,7 @@ let q = class {
|
|
|
1470
1470
|
});
|
|
1471
1471
|
let l, d = 0, g;
|
|
1472
1472
|
if (!f) {
|
|
1473
|
-
const h = [
|
|
1473
|
+
const h = [He.bind(this), void 0];
|
|
1474
1474
|
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(r); d < g; )
|
|
1475
1475
|
l = l.then(h[d++], h[d++]);
|
|
1476
1476
|
return l;
|
|
@@ -1487,7 +1487,7 @@ let q = class {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
try {
|
|
1490
|
-
l =
|
|
1490
|
+
l = He.call(this, w);
|
|
1491
1491
|
} catch (h) {
|
|
1492
1492
|
return Promise.reject(h);
|
|
1493
1493
|
}
|
|
@@ -1497,8 +1497,8 @@ let q = class {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
getUri(t) {
|
|
1499
1499
|
t = v(this.defaults, t);
|
|
1500
|
-
const r =
|
|
1501
|
-
return
|
|
1500
|
+
const r = yt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1501
|
+
return ft(r, t.params, t.paramsSerializer);
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
1504
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1512,44 +1512,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1512
1512
|
});
|
|
1513
1513
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1514
1514
|
function r(n) {
|
|
1515
|
-
return function(
|
|
1515
|
+
return function(i, o, c) {
|
|
1516
1516
|
return this.request(v(c || {}, {
|
|
1517
1517
|
method: t,
|
|
1518
1518
|
headers: n ? {
|
|
1519
1519
|
"Content-Type": "multipart/form-data"
|
|
1520
1520
|
} : {},
|
|
1521
|
-
url:
|
|
1522
|
-
data:
|
|
1521
|
+
url: i,
|
|
1522
|
+
data: o
|
|
1523
1523
|
}));
|
|
1524
1524
|
};
|
|
1525
1525
|
}
|
|
1526
1526
|
q.prototype[t] = r(), q.prototype[t + "Form"] = r(!0);
|
|
1527
1527
|
});
|
|
1528
|
-
let
|
|
1528
|
+
let rn = class Ct {
|
|
1529
1529
|
constructor(t) {
|
|
1530
1530
|
if (typeof t != "function")
|
|
1531
1531
|
throw new TypeError("executor must be a function.");
|
|
1532
1532
|
let r;
|
|
1533
|
-
this.promise = new Promise(function(
|
|
1534
|
-
r =
|
|
1533
|
+
this.promise = new Promise(function(i) {
|
|
1534
|
+
r = i;
|
|
1535
1535
|
});
|
|
1536
1536
|
const n = this;
|
|
1537
1537
|
this.promise.then((s) => {
|
|
1538
1538
|
if (!n._listeners) return;
|
|
1539
|
-
let
|
|
1540
|
-
for (;
|
|
1541
|
-
n._listeners[
|
|
1539
|
+
let i = n._listeners.length;
|
|
1540
|
+
for (; i-- > 0; )
|
|
1541
|
+
n._listeners[i](s);
|
|
1542
1542
|
n._listeners = null;
|
|
1543
1543
|
}), this.promise.then = (s) => {
|
|
1544
|
-
let
|
|
1545
|
-
const
|
|
1546
|
-
n.subscribe(c),
|
|
1544
|
+
let i;
|
|
1545
|
+
const o = new Promise((c) => {
|
|
1546
|
+
n.subscribe(c), i = c;
|
|
1547
1547
|
}).then(s);
|
|
1548
|
-
return
|
|
1549
|
-
n.unsubscribe(
|
|
1550
|
-
},
|
|
1551
|
-
}, t(function(
|
|
1552
|
-
n.reason || (n.reason = new K(
|
|
1548
|
+
return o.cancel = function() {
|
|
1549
|
+
n.unsubscribe(i);
|
|
1550
|
+
}, o;
|
|
1551
|
+
}, t(function(i, o, c) {
|
|
1552
|
+
n.reason || (n.reason = new K(i, o, c), r(n.reason));
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
/**
|
|
@@ -1591,19 +1591,19 @@ let tn = class Et {
|
|
|
1591
1591
|
static source() {
|
|
1592
1592
|
let t;
|
|
1593
1593
|
return {
|
|
1594
|
-
token: new
|
|
1594
|
+
token: new Ct(function(s) {
|
|
1595
1595
|
t = s;
|
|
1596
1596
|
}),
|
|
1597
1597
|
cancel: t
|
|
1598
1598
|
};
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
|
-
function
|
|
1601
|
+
function nn(e) {
|
|
1602
1602
|
return function(r) {
|
|
1603
1603
|
return e.apply(null, r);
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function sn(e) {
|
|
1607
1607
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1608
1608
|
}
|
|
1609
1609
|
const Se = {
|
|
@@ -1674,83 +1674,83 @@ const Se = {
|
|
|
1674
1674
|
Object.entries(Se).forEach(([e, t]) => {
|
|
1675
1675
|
Se[t] = e;
|
|
1676
1676
|
});
|
|
1677
|
-
function
|
|
1678
|
-
const t = new q(e), r =
|
|
1677
|
+
function _t(e) {
|
|
1678
|
+
const t = new q(e), r = Ze(q.prototype.request, t);
|
|
1679
1679
|
return a.extend(r, q.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1680
|
-
return
|
|
1680
|
+
return _t(v(e, s));
|
|
1681
1681
|
}, r;
|
|
1682
1682
|
}
|
|
1683
|
-
const E =
|
|
1683
|
+
const E = _t(Y);
|
|
1684
1684
|
E.Axios = q;
|
|
1685
1685
|
E.CanceledError = K;
|
|
1686
|
-
E.CancelToken =
|
|
1687
|
-
E.isCancel =
|
|
1688
|
-
E.VERSION =
|
|
1686
|
+
E.CancelToken = rn;
|
|
1687
|
+
E.isCancel = pt;
|
|
1688
|
+
E.VERSION = St;
|
|
1689
1689
|
E.toFormData = ae;
|
|
1690
1690
|
E.AxiosError = m;
|
|
1691
1691
|
E.Cancel = E.CanceledError;
|
|
1692
1692
|
E.all = function(t) {
|
|
1693
1693
|
return Promise.all(t);
|
|
1694
1694
|
};
|
|
1695
|
-
E.spread =
|
|
1696
|
-
E.isAxiosError =
|
|
1695
|
+
E.spread = nn;
|
|
1696
|
+
E.isAxiosError = sn;
|
|
1697
1697
|
E.mergeConfig = v;
|
|
1698
1698
|
E.AxiosHeaders = O;
|
|
1699
|
-
E.formToJSON = (e) =>
|
|
1700
|
-
E.getAdapter =
|
|
1699
|
+
E.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1700
|
+
E.getAdapter = Et.getAdapter;
|
|
1701
1701
|
E.HttpStatusCode = Se;
|
|
1702
1702
|
E.default = E;
|
|
1703
1703
|
const {
|
|
1704
|
-
Axios:
|
|
1704
|
+
Axios: ps,
|
|
1705
1705
|
AxiosError: me,
|
|
1706
|
-
CanceledError:
|
|
1707
|
-
isCancel:
|
|
1708
|
-
CancelToken:
|
|
1709
|
-
VERSION:
|
|
1710
|
-
all:
|
|
1711
|
-
Cancel:
|
|
1712
|
-
isAxiosError:
|
|
1713
|
-
spread:
|
|
1714
|
-
toFormData:
|
|
1715
|
-
AxiosHeaders:
|
|
1716
|
-
HttpStatusCode:
|
|
1717
|
-
formToJSON:
|
|
1718
|
-
getAdapter:
|
|
1719
|
-
mergeConfig:
|
|
1706
|
+
CanceledError: ms,
|
|
1707
|
+
isCancel: ys,
|
|
1708
|
+
CancelToken: gs,
|
|
1709
|
+
VERSION: ws,
|
|
1710
|
+
all: bs,
|
|
1711
|
+
Cancel: Es,
|
|
1712
|
+
isAxiosError: Ss,
|
|
1713
|
+
spread: Cs,
|
|
1714
|
+
toFormData: _s,
|
|
1715
|
+
AxiosHeaders: Rs,
|
|
1716
|
+
HttpStatusCode: As,
|
|
1717
|
+
formToJSON: Ts,
|
|
1718
|
+
getAdapter: Ps,
|
|
1719
|
+
mergeConfig: Os
|
|
1720
1720
|
} = E;
|
|
1721
|
-
class
|
|
1721
|
+
class Ve extends Error {
|
|
1722
1722
|
constructor(r) {
|
|
1723
1723
|
super(r.join(", "));
|
|
1724
1724
|
S(this, "errors");
|
|
1725
1725
|
this.name = "ValidationError", this.errors = r;
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
|
-
class
|
|
1728
|
+
class ze extends Error {
|
|
1729
1729
|
constructor(r) {
|
|
1730
1730
|
super("Address already registered.");
|
|
1731
1731
|
S(this, "address");
|
|
1732
1732
|
this.name = "AddressInUseError", this.address = r;
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
|
-
class
|
|
1735
|
+
class Je extends Error {
|
|
1736
1736
|
constructor(r) {
|
|
1737
1737
|
super("Code already registered.");
|
|
1738
1738
|
S(this, "code");
|
|
1739
1739
|
this.name = "CodeInUseError", this.code = r;
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
-
class
|
|
1742
|
+
class We extends Error {
|
|
1743
1743
|
constructor() {
|
|
1744
1744
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
class
|
|
1747
|
+
class on {
|
|
1748
1748
|
constructor(t) {
|
|
1749
1749
|
S(this, "httpClient");
|
|
1750
1750
|
S(this, "_debug");
|
|
1751
1751
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1752
1752
|
}
|
|
1753
|
-
async create(t, r, n, s,
|
|
1753
|
+
async create(t, r, n, s, i, o, c) {
|
|
1754
1754
|
var f;
|
|
1755
1755
|
try {
|
|
1756
1756
|
await this.httpClient.post({
|
|
@@ -1761,8 +1761,8 @@ class sn {
|
|
|
1761
1761
|
name: n,
|
|
1762
1762
|
code: n,
|
|
1763
1763
|
signature: s,
|
|
1764
|
-
signature_public_key:
|
|
1765
|
-
account_chain_id:
|
|
1764
|
+
signature_public_key: i,
|
|
1765
|
+
account_chain_id: o,
|
|
1766
1766
|
user_split_percentage: c
|
|
1767
1767
|
}
|
|
1768
1768
|
});
|
|
@@ -1771,14 +1771,14 @@ class sn {
|
|
|
1771
1771
|
const l = (f = u.response) == null ? void 0 : f.data;
|
|
1772
1772
|
if (typeof (l == null ? void 0 : l.message) == "string") {
|
|
1773
1773
|
const d = l.message.toLowerCase();
|
|
1774
|
-
throw d == "invalid signature" ? new
|
|
1774
|
+
throw d == "invalid signature" ? new We() : d == "address in use" ? new ze(t) : d == "code in use" ? new Je(n) : new Error(d);
|
|
1775
1775
|
} else if ((l == null ? void 0 : l.message) instanceof Array)
|
|
1776
|
-
throw new
|
|
1776
|
+
throw new Ve(l.message);
|
|
1777
1777
|
}
|
|
1778
1778
|
throw u;
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
async update(t, r, n, s,
|
|
1781
|
+
async update(t, r, n, s, i, o) {
|
|
1782
1782
|
var c;
|
|
1783
1783
|
try {
|
|
1784
1784
|
await this.httpClient.post({
|
|
@@ -1788,8 +1788,8 @@ class sn {
|
|
|
1788
1788
|
user_identifier: t,
|
|
1789
1789
|
identifier_type: r,
|
|
1790
1790
|
signature: s,
|
|
1791
|
-
signature_public_key:
|
|
1792
|
-
account_chain_id:
|
|
1791
|
+
signature_public_key: i,
|
|
1792
|
+
account_chain_id: o
|
|
1793
1793
|
}
|
|
1794
1794
|
});
|
|
1795
1795
|
} catch (f) {
|
|
@@ -1797,9 +1797,9 @@ class sn {
|
|
|
1797
1797
|
const u = (c = f.response) == null ? void 0 : c.data;
|
|
1798
1798
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1799
1799
|
const l = u.message.toLowerCase();
|
|
1800
|
-
throw l == "invalid signature" ? new
|
|
1800
|
+
throw l == "invalid signature" ? new We() : l == "address in use" ? new ze(t) : l == "code in use" ? new Je(n) : new Error(l);
|
|
1801
1801
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1802
|
-
throw new
|
|
1802
|
+
throw new Ve(u.message);
|
|
1803
1803
|
}
|
|
1804
1804
|
throw f;
|
|
1805
1805
|
}
|
|
@@ -1822,7 +1822,7 @@ class sn {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
|
-
const
|
|
1825
|
+
const Qe = "/affiliate-portal";
|
|
1826
1826
|
class an {
|
|
1827
1827
|
constructor(t) {
|
|
1828
1828
|
S(this, "httpClient");
|
|
@@ -1830,12 +1830,22 @@ class an {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
async getAffiliateStats(t) {
|
|
1832
1832
|
return (await this.httpClient.get({
|
|
1833
|
-
path: `${
|
|
1833
|
+
path: `${Qe}/stats`,
|
|
1834
1834
|
queryParams: {
|
|
1835
1835
|
user_identifier: t.user_identifier
|
|
1836
1836
|
}
|
|
1837
1837
|
})).data;
|
|
1838
1838
|
}
|
|
1839
|
+
async getAffiliateNewTraders(t) {
|
|
1840
|
+
return (await this.httpClient.get({
|
|
1841
|
+
path: `${Qe}/new-traders`,
|
|
1842
|
+
queryParams: {
|
|
1843
|
+
user_identifier: t.user_identifier,
|
|
1844
|
+
from: t.from,
|
|
1845
|
+
to: t.to
|
|
1846
|
+
}
|
|
1847
|
+
})).data;
|
|
1848
|
+
}
|
|
1839
1849
|
}
|
|
1840
1850
|
const cn = "/audiences";
|
|
1841
1851
|
class un {
|
|
@@ -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.6.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 Cn = "fuul.tracking_id", Te = () => On(Cn, () => Sn()),
|
|
2131
|
+
const Cn = "fuul.tracking_id", Te = () => On(Cn, () => Sn()), Ge = () => M("af") || M("referrer"), _n = () => 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, Ce = !1, Pe, U,
|
|
2154
|
+
let F = !1, Ce = !1, Pe, U, Rt, At, V, Oe, le, I, Tt, fe, j;
|
|
2145
2155
|
function Dn(e) {
|
|
2146
|
-
F = !!e.debug, !Ce && (Pe = e.apiKey,
|
|
2156
|
+
F = !!e.debug, !Ce && (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 on({ httpClient: U, debug: F }), Oe = new an({ 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 }), Ce = !0, F && console.debug("Fuul SDK: init() complete"));
|
|
2147
2157
|
}
|
|
2148
|
-
function
|
|
2158
|
+
function C() {
|
|
2149
2159
|
if (!Ce)
|
|
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
|
+
C(), 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
|
+
C(), xe(), Ne();
|
|
2165
2175
|
const r = {
|
|
2166
2176
|
name: "pageview",
|
|
2167
2177
|
args: {
|
|
@@ -2172,8 +2182,8 @@ async function kn(e, t) {
|
|
|
2172
2182
|
tracking_id: Te(),
|
|
2173
2183
|
referrer_url: _n(),
|
|
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
|
+
C(), xe(), Ne();
|
|
2186
2196
|
const r = {
|
|
2187
2197
|
name: "connect_wallet",
|
|
2188
2198
|
user: {
|
|
@@ -2200,7 +2210,7 @@ async function Bn(e, t) {
|
|
|
2200
2210
|
e != null && e.signature && (r.signature = e == null ? void 0 : e.signature, r.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (r.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (r.account_chain_id = e.accountChainId), await le.sendEvent(r, t);
|
|
2201
2211
|
}
|
|
2202
2212
|
async function qn(e) {
|
|
2203
|
-
|
|
2213
|
+
C(), await V.create(
|
|
2204
2214
|
e.userIdentifier,
|
|
2205
2215
|
e.identifierType,
|
|
2206
2216
|
e.code,
|
|
@@ -2211,7 +2221,7 @@ async function qn(e) {
|
|
|
2211
2221
|
);
|
|
2212
2222
|
}
|
|
2213
2223
|
async function vn(e) {
|
|
2214
|
-
|
|
2224
|
+
C(), await V.update(
|
|
2215
2225
|
e.userIdentifier,
|
|
2216
2226
|
e.identifierType,
|
|
2217
2227
|
e.code,
|
|
@@ -2221,17 +2231,17 @@ async function vn(e) {
|
|
|
2221
2231
|
);
|
|
2222
2232
|
}
|
|
2223
2233
|
async function In(e, t) {
|
|
2224
|
-
return
|
|
2234
|
+
return C(), await V.getCode(e, t);
|
|
2225
2235
|
}
|
|
2226
2236
|
async function jn(e) {
|
|
2227
|
-
return
|
|
2237
|
+
return C(), await V.isCodeFree(e);
|
|
2228
2238
|
}
|
|
2229
2239
|
async function $n(e, t, r, n) {
|
|
2230
|
-
|
|
2231
|
-
const s = await V.getCode(t, r),
|
|
2240
|
+
C();
|
|
2241
|
+
const s = await V.getCode(t, r), i = new URLSearchParams({
|
|
2232
2242
|
af: s ?? 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);
|
|
@@ -2258,51 +2268,54 @@ function Qn(e) {
|
|
|
2258
2268
|
return I.getUserPointsMovements(e);
|
|
2259
2269
|
}
|
|
2260
2270
|
function Xn(e) {
|
|
2261
|
-
return
|
|
2271
|
+
return C(), I.getPayoutsByReferrer(e);
|
|
2262
2272
|
}
|
|
2263
2273
|
async function Yn(e) {
|
|
2264
|
-
return
|
|
2274
|
+
return C(), Rt.getAll(e);
|
|
2265
2275
|
}
|
|
2266
2276
|
async function Gn(e) {
|
|
2267
|
-
return
|
|
2277
|
+
return C(), At.getUserReferrer(e);
|
|
2268
2278
|
}
|
|
2269
2279
|
async function Zn(e) {
|
|
2270
|
-
return
|
|
2280
|
+
return C(), Tt.getUserAudiences(e);
|
|
2271
2281
|
}
|
|
2272
2282
|
async function es(e) {
|
|
2273
|
-
return
|
|
2283
|
+
return C(), j.listUserReferralCodes(e);
|
|
2274
2284
|
}
|
|
2275
2285
|
async function ts(e) {
|
|
2276
|
-
return
|
|
2286
|
+
return C(), j.generateReferralCodes(e);
|
|
2277
2287
|
}
|
|
2278
2288
|
async function rs(e) {
|
|
2279
|
-
return
|
|
2289
|
+
return C(), j.getReferralStatus(e);
|
|
2280
2290
|
}
|
|
2281
2291
|
async function ns(e) {
|
|
2282
|
-
return
|
|
2292
|
+
return C(), j.getReferralCode(e);
|
|
2283
2293
|
}
|
|
2284
2294
|
async function ss(e) {
|
|
2285
|
-
return
|
|
2295
|
+
return C(), j.useReferralCode(e);
|
|
2296
|
+
}
|
|
2297
|
+
async function is(e) {
|
|
2298
|
+
return C(), j.updateReferralCode(e);
|
|
2286
2299
|
}
|
|
2287
2300
|
async function os(e) {
|
|
2288
|
-
return
|
|
2301
|
+
return C(), Oe.getAffiliateStats(e);
|
|
2289
2302
|
}
|
|
2290
|
-
async function
|
|
2291
|
-
return
|
|
2303
|
+
async function as(e) {
|
|
2304
|
+
return C(), 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
|
+
ze as AddressInUseError,
|
|
2360
|
+
Je as CodeInUseError,
|
|
2361
|
+
xs as Fuul,
|
|
2362
|
+
We as InvalidSignatureError,
|
|
2363
|
+
ls as UserIdentifierType,
|
|
2364
|
+
Ve as ValidationError
|
|
2351
2365
|
};
|