@fuul/sdk 6.0.1 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EventService.d.ts +2 -0
- package/dist/EventService.d.ts.map +1 -1
- package/dist/index.mjs +629 -622
- package/dist/index.umd.js +5 -5
- package/dist/release.json.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,34 +1,42 @@
|
|
|
1
|
-
var
|
|
2
|
-
var At = (e, t, n) => t in e ?
|
|
1
|
+
var Tt = Object.defineProperty;
|
|
2
|
+
var At = (e, t, n) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var R = (e, t, n) => At(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
function
|
|
4
|
+
function Xe(e, t) {
|
|
5
5
|
return function() {
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString:
|
|
10
|
-
const n =
|
|
9
|
+
const { toString: _t } = Object.prototype, { getPrototypeOf: Ce } = Object, { iterator: se, toStringTag: Ye } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
|
|
10
|
+
const n = _t.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
13
|
-
function
|
|
14
|
-
return e !== null && !
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: j } = Array, z = ie("undefined");
|
|
13
|
+
function J(e) {
|
|
14
|
+
return e !== null && !z(e) && e.constructor !== null && !z(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const Ge =
|
|
16
|
+
const Ge = P("ArrayBuffer");
|
|
17
17
|
function Ot(e) {
|
|
18
18
|
let t;
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ge(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const Pt = ie("string"), _ = ie("function"), Ze = ie("number"), W = (e) => e !== null && typeof e == "object", Nt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
22
|
+
if (oe(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
26
|
-
},
|
|
24
|
+
const t = Ce(e);
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ye in e) && !(se in e);
|
|
26
|
+
}, xt = (e) => {
|
|
27
|
+
if (!W(e) || J(e))
|
|
28
|
+
return !1;
|
|
29
|
+
try {
|
|
30
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
31
|
+
} catch {
|
|
32
|
+
return !1;
|
|
33
|
+
}
|
|
34
|
+
}, Ut = P("Date"), Lt = P("File"), Ft = P("Blob"), Dt = P("FileList"), kt = (e) => W(e) && _(e.pipe), Bt = (e) => {
|
|
27
35
|
let t;
|
|
28
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
29
|
-
t === "object" &&
|
|
30
|
-
},
|
|
31
|
-
function
|
|
36
|
+
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
|
|
37
|
+
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
38
|
+
}, qt = P("URLSearchParams"), [It, vt, jt, Mt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), $t = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
|
+
function Q(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
32
40
|
if (e === null || typeof e > "u")
|
|
33
41
|
return;
|
|
34
42
|
let r, s;
|
|
@@ -36,13 +44,17 @@ function J(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
36
44
|
for (r = 0, s = e.length; r < s; r++)
|
|
37
45
|
t.call(null, e[r], r, e);
|
|
38
46
|
else {
|
|
47
|
+
if (J(e))
|
|
48
|
+
return;
|
|
39
49
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
40
50
|
let c;
|
|
41
51
|
for (r = 0; r < i; r++)
|
|
42
52
|
c = o[r], t.call(null, e[c], c, e);
|
|
43
53
|
}
|
|
44
54
|
}
|
|
45
|
-
function
|
|
55
|
+
function et(e, t) {
|
|
56
|
+
if (J(e))
|
|
57
|
+
return null;
|
|
46
58
|
t = t.toLowerCase();
|
|
47
59
|
const n = Object.keys(e);
|
|
48
60
|
let r = n.length, s;
|
|
@@ -51,75 +63,75 @@ function Ye(e, t) {
|
|
|
51
63
|
return s;
|
|
52
64
|
return null;
|
|
53
65
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
const { caseless: e } =
|
|
57
|
-
const o = e &&
|
|
58
|
-
|
|
66
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, tt = (e) => !z(e) && e !== B;
|
|
67
|
+
function me() {
|
|
68
|
+
const { caseless: e } = tt(this) && this || {}, t = {}, n = (r, s) => {
|
|
69
|
+
const o = e && et(t, s) || s;
|
|
70
|
+
Z(t[o]) && Z(r) ? t[o] = me(t[o], r) : Z(r) ? t[o] = me({}, r) : j(r) ? t[o] = r.slice() : t[o] = r;
|
|
59
71
|
};
|
|
60
72
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
61
|
-
arguments[r] &&
|
|
73
|
+
arguments[r] && Q(arguments[r], n);
|
|
62
74
|
return t;
|
|
63
75
|
}
|
|
64
|
-
const
|
|
65
|
-
n &&
|
|
66
|
-
}, { allOwnKeys: r }), e),
|
|
76
|
+
const Ht = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, o) => {
|
|
77
|
+
n && _(s) ? e[o] = Xe(s, n) : e[o] = s;
|
|
78
|
+
}, { allOwnKeys: r }), e), Vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Kt = (e, t, n, r) => {
|
|
67
79
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
68
80
|
value: t.prototype
|
|
69
81
|
}), n && Object.assign(e.prototype, n);
|
|
70
|
-
},
|
|
82
|
+
}, zt = (e, t, n, r) => {
|
|
71
83
|
let s, o, i;
|
|
72
84
|
const c = {};
|
|
73
85
|
if (t = t || {}, e == null) return t;
|
|
74
86
|
do {
|
|
75
87
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
76
88
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
77
|
-
e = n !== !1 &&
|
|
89
|
+
e = n !== !1 && Ce(e);
|
|
78
90
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
79
91
|
return t;
|
|
80
|
-
},
|
|
92
|
+
}, Jt = (e, t, n) => {
|
|
81
93
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
82
94
|
const r = e.indexOf(t, n);
|
|
83
95
|
return r !== -1 && r === n;
|
|
84
|
-
},
|
|
96
|
+
}, Wt = (e) => {
|
|
85
97
|
if (!e) return null;
|
|
86
98
|
if (j(e)) return e;
|
|
87
99
|
let t = e.length;
|
|
88
|
-
if (!
|
|
100
|
+
if (!Ze(t)) return null;
|
|
89
101
|
const n = new Array(t);
|
|
90
102
|
for (; t-- > 0; )
|
|
91
103
|
n[t] = e[t];
|
|
92
104
|
return n;
|
|
93
|
-
},
|
|
94
|
-
const r = (e && e[
|
|
105
|
+
}, Qt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ce(Uint8Array)), Xt = (e, t) => {
|
|
106
|
+
const r = (e && e[se]).call(e);
|
|
95
107
|
let s;
|
|
96
108
|
for (; (s = r.next()) && !s.done; ) {
|
|
97
109
|
const o = s.value;
|
|
98
110
|
t.call(e, o[0], o[1]);
|
|
99
111
|
}
|
|
100
|
-
},
|
|
112
|
+
}, Yt = (e, t) => {
|
|
101
113
|
let n;
|
|
102
114
|
const r = [];
|
|
103
115
|
for (; (n = e.exec(t)) !== null; )
|
|
104
116
|
r.push(n);
|
|
105
117
|
return r;
|
|
106
|
-
},
|
|
118
|
+
}, Gt = P("HTMLFormElement"), Zt = (e) => e.toLowerCase().replace(
|
|
107
119
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
108
120
|
function(n, r, s) {
|
|
109
121
|
return r.toUpperCase() + s;
|
|
110
122
|
}
|
|
111
|
-
), xe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
123
|
+
), xe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), en = P("RegExp"), nt = (e, t) => {
|
|
112
124
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
113
|
-
|
|
125
|
+
Q(n, (s, o) => {
|
|
114
126
|
let i;
|
|
115
127
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
116
128
|
}), Object.defineProperties(e, r);
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
if (
|
|
129
|
+
}, tn = (e) => {
|
|
130
|
+
nt(e, (t, n) => {
|
|
131
|
+
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
120
132
|
return !1;
|
|
121
133
|
const r = e[n];
|
|
122
|
-
if (
|
|
134
|
+
if (_(r)) {
|
|
123
135
|
if (t.enumerable = !1, "writable" in t) {
|
|
124
136
|
t.writable = !1;
|
|
125
137
|
return;
|
|
@@ -129,111 +141,103 @@ const Mt = (e, t, n, { allOwnKeys: r } = {}) => (J(t, (s, o) => {
|
|
|
129
141
|
});
|
|
130
142
|
}
|
|
131
143
|
});
|
|
132
|
-
},
|
|
144
|
+
}, nn = (e, t) => {
|
|
133
145
|
const n = {}, r = (s) => {
|
|
134
146
|
s.forEach((o) => {
|
|
135
147
|
n[o] = !0;
|
|
136
148
|
});
|
|
137
149
|
};
|
|
138
150
|
return j(e) ? r(e) : r(String(e).split(t)), n;
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
DIGIT: Ne,
|
|
142
|
-
ALPHA: ce,
|
|
143
|
-
ALPHA_DIGIT: ce + ce.toUpperCase() + Ne
|
|
144
|
-
}, sn = (e = 16, t = tt.ALPHA_DIGIT) => {
|
|
145
|
-
let n = "";
|
|
146
|
-
const { length: r } = t;
|
|
147
|
-
for (; e--; )
|
|
148
|
-
n += t[Math.random() * r | 0];
|
|
149
|
-
return n;
|
|
150
|
-
};
|
|
151
|
+
}, rn = () => {
|
|
152
|
+
}, sn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
153
|
function on(e) {
|
|
152
|
-
return !!(e &&
|
|
154
|
+
return !!(e && _(e.append) && e[Ye] === "FormData" && e[se]);
|
|
153
155
|
}
|
|
154
156
|
const an = (e) => {
|
|
155
157
|
const t = new Array(10), n = (r, s) => {
|
|
156
|
-
if (
|
|
158
|
+
if (W(r)) {
|
|
157
159
|
if (t.indexOf(r) >= 0)
|
|
158
160
|
return;
|
|
161
|
+
if (J(r))
|
|
162
|
+
return r;
|
|
159
163
|
if (!("toJSON" in r)) {
|
|
160
164
|
t[s] = r;
|
|
161
165
|
const o = j(r) ? [] : {};
|
|
162
|
-
return
|
|
163
|
-
const
|
|
164
|
-
!
|
|
166
|
+
return Q(r, (i, c) => {
|
|
167
|
+
const f = n(i, s + 1);
|
|
168
|
+
!z(f) && (o[c] = f);
|
|
165
169
|
}), t[s] = void 0, o;
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
return r;
|
|
169
173
|
};
|
|
170
174
|
return n(e, 0);
|
|
171
|
-
}, cn =
|
|
172
|
-
s ===
|
|
175
|
+
}, cn = P("AsyncFunction"), un = (e) => e && (W(e) || _(e)) && _(e.then) && _(e.catch), rt = ((e, t) => e ? setImmediate : t ? ((n, r) => (B.addEventListener("message", ({ source: s, data: o }) => {
|
|
176
|
+
s === B && o === n && r.length && r.shift()();
|
|
173
177
|
}, !1), (s) => {
|
|
174
|
-
r.push(s),
|
|
178
|
+
r.push(s), B.postMessage(n, "*");
|
|
175
179
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
176
180
|
typeof setImmediate == "function",
|
|
177
|
-
|
|
178
|
-
), ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
181
|
+
_(B.postMessage)
|
|
182
|
+
), ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || rt, fn = (e) => e != null && _(e[se]), a = {
|
|
179
183
|
isArray: j,
|
|
180
184
|
isArrayBuffer: Ge,
|
|
181
|
-
isBuffer:
|
|
185
|
+
isBuffer: J,
|
|
182
186
|
isFormData: Bt,
|
|
183
187
|
isArrayBufferView: Ot,
|
|
184
|
-
isString:
|
|
185
|
-
isNumber:
|
|
186
|
-
isBoolean:
|
|
187
|
-
isObject:
|
|
188
|
-
isPlainObject:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
188
|
+
isString: Pt,
|
|
189
|
+
isNumber: Ze,
|
|
190
|
+
isBoolean: Nt,
|
|
191
|
+
isObject: W,
|
|
192
|
+
isPlainObject: Z,
|
|
193
|
+
isEmptyObject: xt,
|
|
194
|
+
isReadableStream: It,
|
|
195
|
+
isRequest: vt,
|
|
196
|
+
isResponse: jt,
|
|
197
|
+
isHeaders: Mt,
|
|
198
|
+
isUndefined: z,
|
|
199
|
+
isDate: Ut,
|
|
200
|
+
isFile: Lt,
|
|
201
|
+
isBlob: Ft,
|
|
202
|
+
isRegExp: en,
|
|
203
|
+
isFunction: _,
|
|
204
|
+
isStream: kt,
|
|
205
|
+
isURLSearchParams: qt,
|
|
206
|
+
isTypedArray: Qt,
|
|
202
207
|
isFileList: Dt,
|
|
203
|
-
forEach:
|
|
204
|
-
merge:
|
|
205
|
-
extend:
|
|
206
|
-
trim:
|
|
207
|
-
stripBOM:
|
|
208
|
-
inherits:
|
|
209
|
-
toFlatObject:
|
|
210
|
-
kindOf:
|
|
211
|
-
kindOfTest:
|
|
212
|
-
endsWith:
|
|
213
|
-
toArray:
|
|
214
|
-
forEachEntry:
|
|
215
|
-
matchAll:
|
|
216
|
-
isHTMLForm:
|
|
208
|
+
forEach: Q,
|
|
209
|
+
merge: me,
|
|
210
|
+
extend: Ht,
|
|
211
|
+
trim: $t,
|
|
212
|
+
stripBOM: Vt,
|
|
213
|
+
inherits: Kt,
|
|
214
|
+
toFlatObject: zt,
|
|
215
|
+
kindOf: oe,
|
|
216
|
+
kindOfTest: P,
|
|
217
|
+
endsWith: Jt,
|
|
218
|
+
toArray: Wt,
|
|
219
|
+
forEachEntry: Xt,
|
|
220
|
+
matchAll: Yt,
|
|
221
|
+
isHTMLForm: Gt,
|
|
217
222
|
hasOwnProperty: xe,
|
|
218
223
|
hasOwnProp: xe,
|
|
219
224
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
220
|
-
reduceDescriptors:
|
|
221
|
-
freezeMethods:
|
|
222
|
-
toObjectSet:
|
|
223
|
-
toCamelCase:
|
|
224
|
-
noop:
|
|
225
|
-
toFiniteNumber:
|
|
226
|
-
findKey:
|
|
227
|
-
global:
|
|
228
|
-
isContextDefined:
|
|
229
|
-
ALPHABET: tt,
|
|
230
|
-
generateString: sn,
|
|
225
|
+
reduceDescriptors: nt,
|
|
226
|
+
freezeMethods: tn,
|
|
227
|
+
toObjectSet: nn,
|
|
228
|
+
toCamelCase: Zt,
|
|
229
|
+
noop: rn,
|
|
230
|
+
toFiniteNumber: sn,
|
|
231
|
+
findKey: et,
|
|
232
|
+
global: B,
|
|
233
|
+
isContextDefined: tt,
|
|
231
234
|
isSpecCompliantForm: on,
|
|
232
235
|
toJSONObject: an,
|
|
233
236
|
isAsyncFn: cn,
|
|
234
237
|
isThenable: un,
|
|
235
|
-
setImmediate:
|
|
236
|
-
asap: ln
|
|
238
|
+
setImmediate: rt,
|
|
239
|
+
asap: ln,
|
|
240
|
+
isIterable: fn
|
|
237
241
|
};
|
|
238
242
|
function m(e, t, n, r, s) {
|
|
239
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), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -259,7 +263,7 @@ a.inherits(m, Error, {
|
|
|
259
263
|
};
|
|
260
264
|
}
|
|
261
265
|
});
|
|
262
|
-
const
|
|
266
|
+
const st = m.prototype, ot = {};
|
|
263
267
|
[
|
|
264
268
|
"ERR_BAD_OPTION_VALUE",
|
|
265
269
|
"ERR_BAD_OPTION",
|
|
@@ -275,35 +279,35 @@ const rt = m.prototype, st = {};
|
|
|
275
279
|
"ERR_INVALID_URL"
|
|
276
280
|
// eslint-disable-next-line func-names
|
|
277
281
|
].forEach((e) => {
|
|
278
|
-
|
|
282
|
+
ot[e] = { value: e };
|
|
279
283
|
});
|
|
280
|
-
Object.defineProperties(m,
|
|
281
|
-
Object.defineProperty(
|
|
284
|
+
Object.defineProperties(m, ot);
|
|
285
|
+
Object.defineProperty(st, "isAxiosError", { value: !0 });
|
|
282
286
|
m.from = (e, t, n, r, s, o) => {
|
|
283
|
-
const i = Object.create(
|
|
284
|
-
return a.toFlatObject(e, i, function(
|
|
285
|
-
return
|
|
287
|
+
const i = Object.create(st);
|
|
288
|
+
return a.toFlatObject(e, i, function(f) {
|
|
289
|
+
return f !== Error.prototype;
|
|
286
290
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
287
291
|
};
|
|
288
|
-
const
|
|
289
|
-
function
|
|
292
|
+
const dn = null;
|
|
293
|
+
function ye(e) {
|
|
290
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
291
295
|
}
|
|
292
|
-
function
|
|
296
|
+
function it(e) {
|
|
293
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
294
298
|
}
|
|
295
299
|
function Ue(e, t, n) {
|
|
296
300
|
return e ? e.concat(t).map(function(s, o) {
|
|
297
|
-
return s =
|
|
301
|
+
return s = it(s), !n && o ? "[" + s + "]" : s;
|
|
298
302
|
}).join(n ? "." : "") : t;
|
|
299
303
|
}
|
|
300
|
-
function
|
|
301
|
-
return a.isArray(e) && !e.some(
|
|
304
|
+
function hn(e) {
|
|
305
|
+
return a.isArray(e) && !e.some(ye);
|
|
302
306
|
}
|
|
303
|
-
const
|
|
307
|
+
const pn = a.toFlatObject(a, {}, null, function(t) {
|
|
304
308
|
return /^is[A-Z]/.test(t);
|
|
305
309
|
});
|
|
306
|
-
function
|
|
310
|
+
function ae(e, t, n) {
|
|
307
311
|
if (!a.isObject(e))
|
|
308
312
|
throw new TypeError("target must be an object");
|
|
309
313
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -313,37 +317,39 @@ function se(e, t, n) {
|
|
|
313
317
|
}, !1, function(y, p) {
|
|
314
318
|
return !a.isUndefined(p[y]);
|
|
315
319
|
});
|
|
316
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
320
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
317
321
|
if (!a.isFunction(s))
|
|
318
322
|
throw new TypeError("visitor must be a function");
|
|
319
323
|
function u(h) {
|
|
320
324
|
if (h === null) return "";
|
|
321
325
|
if (a.isDate(h))
|
|
322
326
|
return h.toISOString();
|
|
323
|
-
if (
|
|
327
|
+
if (a.isBoolean(h))
|
|
328
|
+
return h.toString();
|
|
329
|
+
if (!f && a.isBlob(h))
|
|
324
330
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
325
|
-
return a.isArrayBuffer(h) || a.isTypedArray(h) ?
|
|
331
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
326
332
|
}
|
|
327
|
-
function
|
|
333
|
+
function l(h, y, p) {
|
|
328
334
|
let w = h;
|
|
329
335
|
if (h && !p && typeof h == "object") {
|
|
330
336
|
if (a.endsWith(y, "{}"))
|
|
331
337
|
y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
332
|
-
else if (a.isArray(h) &&
|
|
333
|
-
return y =
|
|
338
|
+
else if (a.isArray(h) && hn(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (w = a.toArray(h)))
|
|
339
|
+
return y = it(y), w.forEach(function(C, U) {
|
|
334
340
|
!(a.isUndefined(C) || C === null) && t.append(
|
|
335
341
|
// eslint-disable-next-line no-nested-ternary
|
|
336
|
-
i === !0 ? Ue([y],
|
|
342
|
+
i === !0 ? Ue([y], U, o) : i === null ? y : y + "[]",
|
|
337
343
|
u(C)
|
|
338
344
|
);
|
|
339
345
|
}), !1;
|
|
340
346
|
}
|
|
341
|
-
return
|
|
347
|
+
return ye(h) ? !0 : (t.append(Ue(p, y, o), u(h)), !1);
|
|
342
348
|
}
|
|
343
|
-
const d = [], g = Object.assign(
|
|
344
|
-
defaultVisitor:
|
|
349
|
+
const d = [], g = Object.assign(pn, {
|
|
350
|
+
defaultVisitor: l,
|
|
345
351
|
convertValue: u,
|
|
346
|
-
isVisitable:
|
|
352
|
+
isVisitable: ye
|
|
347
353
|
});
|
|
348
354
|
function E(h, y) {
|
|
349
355
|
if (!a.isUndefined(h)) {
|
|
@@ -378,14 +384,14 @@ function Le(e) {
|
|
|
378
384
|
return t[r];
|
|
379
385
|
});
|
|
380
386
|
}
|
|
381
|
-
function
|
|
382
|
-
this._pairs = [], e &&
|
|
387
|
+
function Re(e, t) {
|
|
388
|
+
this._pairs = [], e && ae(e, this, t);
|
|
383
389
|
}
|
|
384
|
-
const
|
|
385
|
-
|
|
390
|
+
const at = Re.prototype;
|
|
391
|
+
at.append = function(t, n) {
|
|
386
392
|
this._pairs.push([t, n]);
|
|
387
393
|
};
|
|
388
|
-
|
|
394
|
+
at.toString = function(t) {
|
|
389
395
|
const n = t ? function(r) {
|
|
390
396
|
return t.call(this, r, Le);
|
|
391
397
|
} : Le;
|
|
@@ -393,21 +399,25 @@ it.toString = function(t) {
|
|
|
393
399
|
return n(s[0]) + "=" + n(s[1]);
|
|
394
400
|
}, "").join("&");
|
|
395
401
|
};
|
|
396
|
-
function
|
|
402
|
+
function mn(e) {
|
|
397
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
398
404
|
}
|
|
399
|
-
function
|
|
405
|
+
function ct(e, t, n) {
|
|
400
406
|
if (!t)
|
|
401
407
|
return e;
|
|
402
|
-
const r = n && n.encode ||
|
|
408
|
+
const r = n && n.encode || mn;
|
|
409
|
+
a.isFunction(n) && (n = {
|
|
410
|
+
serialize: n
|
|
411
|
+
});
|
|
412
|
+
const s = n && n.serialize;
|
|
403
413
|
let o;
|
|
404
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
414
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Re(t, n).toString(r), o) {
|
|
405
415
|
const i = e.indexOf("#");
|
|
406
416
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
407
417
|
}
|
|
408
418
|
return e;
|
|
409
419
|
}
|
|
410
|
-
class
|
|
420
|
+
class Fe {
|
|
411
421
|
constructor() {
|
|
412
422
|
this.handlers = [];
|
|
413
423
|
}
|
|
@@ -461,41 +471,42 @@ class De {
|
|
|
461
471
|
});
|
|
462
472
|
}
|
|
463
473
|
}
|
|
464
|
-
const
|
|
474
|
+
const ut = {
|
|
465
475
|
silentJSONParsing: !0,
|
|
466
476
|
forcedJSONParsing: !0,
|
|
467
477
|
clarifyTimeoutError: !1
|
|
468
|
-
},
|
|
478
|
+
}, yn = typeof URLSearchParams < "u" ? URLSearchParams : Re, gn = typeof FormData < "u" ? FormData : null, wn = typeof Blob < "u" ? Blob : null, bn = {
|
|
469
479
|
isBrowser: !0,
|
|
470
480
|
classes: {
|
|
471
|
-
URLSearchParams:
|
|
472
|
-
FormData:
|
|
473
|
-
Blob:
|
|
481
|
+
URLSearchParams: yn,
|
|
482
|
+
FormData: gn,
|
|
483
|
+
Blob: wn
|
|
474
484
|
},
|
|
475
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
476
|
-
},
|
|
477
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, Te = typeof window < "u" && typeof document < "u", ge = typeof navigator == "object" && navigator || void 0, En = Te && (!ge || ["ReactNative", "NativeScript", "NS"].indexOf(ge.product) < 0), Sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cn = Te && window.location.href || "http://localhost", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
478
488
|
__proto__: null,
|
|
479
|
-
hasBrowserEnv:
|
|
480
|
-
hasStandardBrowserEnv:
|
|
481
|
-
hasStandardBrowserWebWorkerEnv:
|
|
482
|
-
navigator:
|
|
483
|
-
origin:
|
|
489
|
+
hasBrowserEnv: Te,
|
|
490
|
+
hasStandardBrowserEnv: En,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: Sn,
|
|
492
|
+
navigator: ge,
|
|
493
|
+
origin: Cn
|
|
484
494
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
485
|
-
...
|
|
486
|
-
...
|
|
495
|
+
...Rn,
|
|
496
|
+
...bn
|
|
487
497
|
};
|
|
488
|
-
function
|
|
489
|
-
return
|
|
498
|
+
function Tn(e, t) {
|
|
499
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
490
500
|
visitor: function(n, r, s, o) {
|
|
491
501
|
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
492
|
-
}
|
|
493
|
-
|
|
502
|
+
},
|
|
503
|
+
...t
|
|
504
|
+
});
|
|
494
505
|
}
|
|
495
506
|
function An(e) {
|
|
496
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
497
508
|
}
|
|
498
|
-
function
|
|
509
|
+
function _n(e) {
|
|
499
510
|
const t = {}, n = Object.keys(e);
|
|
500
511
|
let r;
|
|
501
512
|
const s = n.length;
|
|
@@ -504,12 +515,12 @@ function Tn(e) {
|
|
|
504
515
|
o = n[r], t[o] = e[o];
|
|
505
516
|
return t;
|
|
506
517
|
}
|
|
507
|
-
function
|
|
518
|
+
function lt(e) {
|
|
508
519
|
function t(n, r, s, o) {
|
|
509
520
|
let i = n[o++];
|
|
510
521
|
if (i === "__proto__") return !0;
|
|
511
|
-
const c = Number.isFinite(+i),
|
|
512
|
-
return i = !i && a.isArray(s) ? s.length : i,
|
|
522
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
523
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = _n(s[i])), !c);
|
|
513
524
|
}
|
|
514
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
515
526
|
const n = {};
|
|
@@ -519,7 +530,7 @@ function ut(e) {
|
|
|
519
530
|
}
|
|
520
531
|
return null;
|
|
521
532
|
}
|
|
522
|
-
function
|
|
533
|
+
function On(e, t, n) {
|
|
523
534
|
if (a.isString(e))
|
|
524
535
|
try {
|
|
525
536
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -529,13 +540,13 @@ function Pn(e, t, n) {
|
|
|
529
540
|
}
|
|
530
541
|
return (0, JSON.stringify)(e);
|
|
531
542
|
}
|
|
532
|
-
const
|
|
533
|
-
transitional:
|
|
543
|
+
const X = {
|
|
544
|
+
transitional: ut,
|
|
534
545
|
adapter: ["xhr", "http", "fetch"],
|
|
535
546
|
transformRequest: [function(t, n) {
|
|
536
547
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
537
548
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
538
|
-
return s ? JSON.stringify(
|
|
549
|
+
return s ? JSON.stringify(lt(t)) : t;
|
|
539
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
540
551
|
return t;
|
|
541
552
|
if (a.isArrayBufferView(t))
|
|
@@ -545,20 +556,20 @@ const W = {
|
|
|
545
556
|
let c;
|
|
546
557
|
if (o) {
|
|
547
558
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
548
|
-
return
|
|
559
|
+
return Tn(t, this.formSerializer).toString();
|
|
549
560
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
550
|
-
const
|
|
551
|
-
return
|
|
561
|
+
const f = this.env && this.env.FormData;
|
|
562
|
+
return ae(
|
|
552
563
|
c ? { "files[]": t } : t,
|
|
553
|
-
|
|
564
|
+
f && new f(),
|
|
554
565
|
this.formSerializer
|
|
555
566
|
);
|
|
556
567
|
}
|
|
557
568
|
}
|
|
558
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
569
|
+
return o || s ? (n.setContentType("application/json", !1), On(t)) : t;
|
|
559
570
|
}],
|
|
560
571
|
transformResponse: [function(t) {
|
|
561
|
-
const n = this.transitional ||
|
|
572
|
+
const n = this.transitional || X.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
562
573
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
563
574
|
return t;
|
|
564
575
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -596,9 +607,9 @@ const W = {
|
|
|
596
607
|
}
|
|
597
608
|
};
|
|
598
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
599
|
-
|
|
610
|
+
X.headers[e] = {};
|
|
600
611
|
});
|
|
601
|
-
const
|
|
612
|
+
const Pn = a.toObjectSet([
|
|
602
613
|
"age",
|
|
603
614
|
"authorization",
|
|
604
615
|
"content-length",
|
|
@@ -616,19 +627,19 @@ const On = a.toObjectSet([
|
|
|
616
627
|
"referer",
|
|
617
628
|
"retry-after",
|
|
618
629
|
"user-agent"
|
|
619
|
-
]),
|
|
630
|
+
]), Nn = (e) => {
|
|
620
631
|
const t = {};
|
|
621
632
|
let n, r, s;
|
|
622
633
|
return e && e.split(`
|
|
623
634
|
`).forEach(function(i) {
|
|
624
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
635
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Pn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
625
636
|
}), t;
|
|
626
|
-
},
|
|
627
|
-
function
|
|
637
|
+
}, De = Symbol("internals");
|
|
638
|
+
function V(e) {
|
|
628
639
|
return e && String(e).trim().toLowerCase();
|
|
629
640
|
}
|
|
630
|
-
function
|
|
631
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
641
|
+
function ee(e) {
|
|
642
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ee) : String(e);
|
|
632
643
|
}
|
|
633
644
|
function xn(e) {
|
|
634
645
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -637,8 +648,8 @@ function xn(e) {
|
|
|
637
648
|
t[r[1]] = r[2];
|
|
638
649
|
return t;
|
|
639
650
|
}
|
|
640
|
-
const
|
|
641
|
-
function
|
|
651
|
+
const Un = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
+
function de(e, t, n, r, s) {
|
|
642
653
|
if (a.isFunction(r))
|
|
643
654
|
return r.call(this, t, n);
|
|
644
655
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -648,10 +659,10 @@ function ue(e, t, n, r, s) {
|
|
|
648
659
|
return r.test(t);
|
|
649
660
|
}
|
|
650
661
|
}
|
|
651
|
-
function
|
|
662
|
+
function Ln(e) {
|
|
652
663
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
653
664
|
}
|
|
654
|
-
function
|
|
665
|
+
function Fn(e, t) {
|
|
655
666
|
const n = a.toCamelCase(" " + t);
|
|
656
667
|
["get", "set", "has"].forEach((r) => {
|
|
657
668
|
Object.defineProperty(e, r + n, {
|
|
@@ -662,33 +673,38 @@ function Ln(e, t) {
|
|
|
662
673
|
});
|
|
663
674
|
});
|
|
664
675
|
}
|
|
665
|
-
let
|
|
676
|
+
let O = class {
|
|
666
677
|
constructor(t) {
|
|
667
678
|
t && this.set(t);
|
|
668
679
|
}
|
|
669
680
|
set(t, n, r) {
|
|
670
681
|
const s = this;
|
|
671
|
-
function o(c,
|
|
672
|
-
const
|
|
673
|
-
if (!
|
|
682
|
+
function o(c, f, u) {
|
|
683
|
+
const l = V(f);
|
|
684
|
+
if (!l)
|
|
674
685
|
throw new Error("header name must be a non-empty string");
|
|
675
|
-
const d = a.findKey(s,
|
|
676
|
-
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d ||
|
|
686
|
+
const d = a.findKey(s, l);
|
|
687
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = ee(c));
|
|
677
688
|
}
|
|
678
|
-
const i = (c,
|
|
689
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
679
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
680
691
|
i(t, n);
|
|
681
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
682
|
-
i(
|
|
683
|
-
else if (a.
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !Un(t))
|
|
693
|
+
i(Nn(t), n);
|
|
694
|
+
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
|
+
let c = {}, f, u;
|
|
696
|
+
for (const l of t) {
|
|
697
|
+
if (!a.isArray(l))
|
|
698
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
+
c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
700
|
+
}
|
|
701
|
+
i(c, n);
|
|
702
|
+
} else
|
|
687
703
|
t != null && o(n, t, r);
|
|
688
704
|
return this;
|
|
689
705
|
}
|
|
690
706
|
get(t, n) {
|
|
691
|
-
if (t =
|
|
707
|
+
if (t = V(t), t) {
|
|
692
708
|
const r = a.findKey(this, t);
|
|
693
709
|
if (r) {
|
|
694
710
|
const s = this[r];
|
|
@@ -705,9 +721,9 @@ let P = class {
|
|
|
705
721
|
}
|
|
706
722
|
}
|
|
707
723
|
has(t, n) {
|
|
708
|
-
if (t =
|
|
724
|
+
if (t = V(t), t) {
|
|
709
725
|
const r = a.findKey(this, t);
|
|
710
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
726
|
+
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
711
727
|
}
|
|
712
728
|
return !1;
|
|
713
729
|
}
|
|
@@ -715,9 +731,9 @@ let P = class {
|
|
|
715
731
|
const r = this;
|
|
716
732
|
let s = !1;
|
|
717
733
|
function o(i) {
|
|
718
|
-
if (i =
|
|
734
|
+
if (i = V(i), i) {
|
|
719
735
|
const c = a.findKey(r, i);
|
|
720
|
-
c && (!n ||
|
|
736
|
+
c && (!n || de(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
721
737
|
}
|
|
722
738
|
}
|
|
723
739
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -727,7 +743,7 @@ let P = class {
|
|
|
727
743
|
let r = n.length, s = !1;
|
|
728
744
|
for (; r--; ) {
|
|
729
745
|
const o = n[r];
|
|
730
|
-
(!t ||
|
|
746
|
+
(!t || de(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
731
747
|
}
|
|
732
748
|
return s;
|
|
733
749
|
}
|
|
@@ -736,11 +752,11 @@ let P = class {
|
|
|
736
752
|
return a.forEach(this, (s, o) => {
|
|
737
753
|
const i = a.findKey(r, o);
|
|
738
754
|
if (i) {
|
|
739
|
-
n[i] =
|
|
755
|
+
n[i] = ee(s), delete n[o];
|
|
740
756
|
return;
|
|
741
757
|
}
|
|
742
|
-
const c = t ?
|
|
743
|
-
c !== o && delete n[o], n[c] =
|
|
758
|
+
const c = t ? Ln(o) : String(o).trim();
|
|
759
|
+
c !== o && delete n[o], n[c] = ee(s), r[c] = !0;
|
|
744
760
|
}), this;
|
|
745
761
|
}
|
|
746
762
|
concat(...t) {
|
|
@@ -759,6 +775,9 @@ let P = class {
|
|
|
759
775
|
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
760
776
|
`);
|
|
761
777
|
}
|
|
778
|
+
getSetCookie() {
|
|
779
|
+
return this.get("set-cookie") || [];
|
|
780
|
+
}
|
|
762
781
|
get [Symbol.toStringTag]() {
|
|
763
782
|
return "AxiosHeaders";
|
|
764
783
|
}
|
|
@@ -770,18 +789,18 @@ let P = class {
|
|
|
770
789
|
return n.forEach((s) => r.set(s)), r;
|
|
771
790
|
}
|
|
772
791
|
static accessor(t) {
|
|
773
|
-
const r = (this[
|
|
792
|
+
const r = (this[De] = this[De] = {
|
|
774
793
|
accessors: {}
|
|
775
794
|
}).accessors, s = this.prototype;
|
|
776
795
|
function o(i) {
|
|
777
|
-
const c =
|
|
778
|
-
r[c] || (
|
|
796
|
+
const c = V(i);
|
|
797
|
+
r[c] || (Fn(s, i), r[c] = !0);
|
|
779
798
|
}
|
|
780
799
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
781
800
|
}
|
|
782
801
|
};
|
|
783
|
-
|
|
784
|
-
a.reduceDescriptors(
|
|
802
|
+
O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
803
|
+
a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
785
804
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
786
805
|
return {
|
|
787
806
|
get: () => e,
|
|
@@ -790,24 +809,24 @@ a.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
|
|
790
809
|
}
|
|
791
810
|
};
|
|
792
811
|
});
|
|
793
|
-
a.freezeMethods(
|
|
794
|
-
function
|
|
795
|
-
const n = this ||
|
|
812
|
+
a.freezeMethods(O);
|
|
813
|
+
function he(e, t) {
|
|
814
|
+
const n = this || X, r = t || n, s = O.from(r.headers);
|
|
796
815
|
let o = r.data;
|
|
797
816
|
return a.forEach(e, function(c) {
|
|
798
817
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
799
818
|
}), s.normalize(), o;
|
|
800
819
|
}
|
|
801
|
-
function
|
|
820
|
+
function ft(e) {
|
|
802
821
|
return !!(e && e.__CANCEL__);
|
|
803
822
|
}
|
|
804
|
-
function
|
|
823
|
+
function M(e, t, n) {
|
|
805
824
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
806
825
|
}
|
|
807
|
-
a.inherits(
|
|
826
|
+
a.inherits(M, m, {
|
|
808
827
|
__CANCEL__: !0
|
|
809
828
|
});
|
|
810
|
-
function
|
|
829
|
+
function dt(e, t, n) {
|
|
811
830
|
const r = n.config.validateStatus;
|
|
812
831
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
813
832
|
"Request failed with status code " + n.status,
|
|
@@ -821,92 +840,64 @@ function Dn(e) {
|
|
|
821
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
822
841
|
return t && t[1] || "";
|
|
823
842
|
}
|
|
824
|
-
function
|
|
843
|
+
function kn(e, t) {
|
|
825
844
|
e = e || 10;
|
|
826
845
|
const n = new Array(e), r = new Array(e);
|
|
827
846
|
let s = 0, o = 0, i;
|
|
828
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
829
|
-
const u = Date.now(),
|
|
830
|
-
i || (i = u), n[s] =
|
|
847
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
848
|
+
const u = Date.now(), l = r[o];
|
|
849
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
831
850
|
let d = o, g = 0;
|
|
832
851
|
for (; d !== s; )
|
|
833
852
|
g += n[d++], d = d % e;
|
|
834
853
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
835
854
|
return;
|
|
836
|
-
const E =
|
|
855
|
+
const E = l && u - l;
|
|
837
856
|
return E ? Math.round(g * 1e3 / E) : void 0;
|
|
838
857
|
};
|
|
839
858
|
}
|
|
840
859
|
function Bn(e, t) {
|
|
841
860
|
let n = 0, r = 1e3 / t, s, o;
|
|
842
|
-
const i = (u,
|
|
843
|
-
n =
|
|
861
|
+
const i = (u, l = Date.now()) => {
|
|
862
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
844
863
|
};
|
|
845
864
|
return [(...u) => {
|
|
846
|
-
const
|
|
847
|
-
d >= r ? i(u,
|
|
865
|
+
const l = Date.now(), d = l - n;
|
|
866
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
848
867
|
o = null, i(s);
|
|
849
868
|
}, r - d)));
|
|
850
869
|
}, () => s && i(s)];
|
|
851
870
|
}
|
|
852
|
-
const
|
|
871
|
+
const ne = (e, t, n = 3) => {
|
|
853
872
|
let r = 0;
|
|
854
|
-
const s =
|
|
873
|
+
const s = kn(50, 250);
|
|
855
874
|
return Bn((o) => {
|
|
856
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0,
|
|
875
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
857
876
|
r = i;
|
|
858
877
|
const d = {
|
|
859
878
|
loaded: i,
|
|
860
879
|
total: c,
|
|
861
880
|
progress: c ? i / c : void 0,
|
|
862
|
-
bytes:
|
|
881
|
+
bytes: f,
|
|
863
882
|
rate: u || void 0,
|
|
864
|
-
estimated: u && c &&
|
|
883
|
+
estimated: u && c && l ? (c - i) / u : void 0,
|
|
865
884
|
event: o,
|
|
866
885
|
lengthComputable: c != null,
|
|
867
886
|
[t ? "download" : "upload"]: !0
|
|
868
887
|
};
|
|
869
888
|
e(d);
|
|
870
889
|
}, n);
|
|
871
|
-
},
|
|
890
|
+
}, ke = (e, t) => {
|
|
872
891
|
const n = e != null;
|
|
873
892
|
return [(r) => t[0]({
|
|
874
893
|
lengthComputable: n,
|
|
875
894
|
total: e,
|
|
876
895
|
loaded: r
|
|
877
896
|
}), t[1]];
|
|
878
|
-
},
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
const t = T.navigator && /(msie|trident)/i.test(T.navigator.userAgent), n = document.createElement("a");
|
|
883
|
-
let r;
|
|
884
|
-
function s(o) {
|
|
885
|
-
let i = o;
|
|
886
|
-
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
887
|
-
href: n.href,
|
|
888
|
-
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
889
|
-
host: n.host,
|
|
890
|
-
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
891
|
-
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
892
|
-
hostname: n.hostname,
|
|
893
|
-
port: n.port,
|
|
894
|
-
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
return r = s(window.location.href), function(i) {
|
|
898
|
-
const c = a.isString(i) ? s(i) : i;
|
|
899
|
-
return c.protocol === r.protocol && c.host === r.host;
|
|
900
|
-
};
|
|
901
|
-
}()
|
|
902
|
-
) : (
|
|
903
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
904
|
-
/* @__PURE__ */ function() {
|
|
905
|
-
return function() {
|
|
906
|
-
return !0;
|
|
907
|
-
};
|
|
908
|
-
}()
|
|
909
|
-
), vn = T.hasStandardBrowserEnv ? (
|
|
897
|
+
}, Be = (e) => (...t) => a.asap(() => e(...t)), qn = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
898
|
+
new URL(T.origin),
|
|
899
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
900
|
+
) : () => !0, In = T.hasStandardBrowserEnv ? (
|
|
910
901
|
// Standard browser envs support document.cookie
|
|
911
902
|
{
|
|
912
903
|
write(e, t, n, r, s, o) {
|
|
@@ -933,45 +924,46 @@ const Z = (e, t, n = 3) => {
|
|
|
933
924
|
}
|
|
934
925
|
}
|
|
935
926
|
);
|
|
936
|
-
function
|
|
927
|
+
function vn(e) {
|
|
937
928
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
938
929
|
}
|
|
939
|
-
function
|
|
930
|
+
function jn(e, t) {
|
|
940
931
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
941
932
|
}
|
|
942
|
-
function
|
|
943
|
-
|
|
933
|
+
function ht(e, t, n) {
|
|
934
|
+
let r = !vn(t);
|
|
935
|
+
return e && (r || n == !1) ? jn(e, t) : t;
|
|
944
936
|
}
|
|
945
|
-
const
|
|
946
|
-
function
|
|
937
|
+
const qe = (e) => e instanceof O ? { ...e } : e;
|
|
938
|
+
function I(e, t) {
|
|
947
939
|
t = t || {};
|
|
948
940
|
const n = {};
|
|
949
|
-
function r(u,
|
|
950
|
-
return a.isPlainObject(u) && a.isPlainObject(
|
|
941
|
+
function r(u, l, d, g) {
|
|
942
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: g }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
951
943
|
}
|
|
952
|
-
function s(u,
|
|
953
|
-
if (a.isUndefined(
|
|
944
|
+
function s(u, l, d, g) {
|
|
945
|
+
if (a.isUndefined(l)) {
|
|
954
946
|
if (!a.isUndefined(u))
|
|
955
|
-
return r(void 0, u, d);
|
|
956
|
-
} else return r(u,
|
|
947
|
+
return r(void 0, u, d, g);
|
|
948
|
+
} else return r(u, l, d, g);
|
|
957
949
|
}
|
|
958
|
-
function o(u,
|
|
959
|
-
if (!a.isUndefined(
|
|
960
|
-
return r(void 0,
|
|
950
|
+
function o(u, l) {
|
|
951
|
+
if (!a.isUndefined(l))
|
|
952
|
+
return r(void 0, l);
|
|
961
953
|
}
|
|
962
|
-
function i(u,
|
|
963
|
-
if (a.isUndefined(
|
|
954
|
+
function i(u, l) {
|
|
955
|
+
if (a.isUndefined(l)) {
|
|
964
956
|
if (!a.isUndefined(u))
|
|
965
957
|
return r(void 0, u);
|
|
966
|
-
} else return r(void 0,
|
|
958
|
+
} else return r(void 0, l);
|
|
967
959
|
}
|
|
968
|
-
function c(u,
|
|
960
|
+
function c(u, l, d) {
|
|
969
961
|
if (d in t)
|
|
970
|
-
return r(u,
|
|
962
|
+
return r(u, l);
|
|
971
963
|
if (d in e)
|
|
972
964
|
return r(void 0, u);
|
|
973
965
|
}
|
|
974
|
-
const
|
|
966
|
+
const f = {
|
|
975
967
|
url: o,
|
|
976
968
|
method: o,
|
|
977
969
|
data: o,
|
|
@@ -1000,49 +992,49 @@ function q(e, t) {
|
|
|
1000
992
|
socketPath: i,
|
|
1001
993
|
responseEncoding: i,
|
|
1002
994
|
validateStatus: c,
|
|
1003
|
-
headers: (u,
|
|
995
|
+
headers: (u, l, d) => s(qe(u), qe(l), d, !0)
|
|
1004
996
|
};
|
|
1005
|
-
return a.forEach(Object.keys(
|
|
1006
|
-
const d = l
|
|
1007
|
-
a.isUndefined(g) && d !== c || (n[
|
|
997
|
+
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
998
|
+
const d = f[l] || s, g = d(e[l], t[l], l);
|
|
999
|
+
a.isUndefined(g) && d !== c || (n[l] = g);
|
|
1008
1000
|
}), n;
|
|
1009
1001
|
}
|
|
1010
|
-
const
|
|
1011
|
-
const t =
|
|
1002
|
+
const pt = (e) => {
|
|
1003
|
+
const t = I({}, e);
|
|
1012
1004
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1013
|
-
t.headers = i =
|
|
1005
|
+
t.headers = i = O.from(i), t.url = ct(ht(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1014
1006
|
"Authorization",
|
|
1015
1007
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1016
1008
|
);
|
|
1017
|
-
let
|
|
1009
|
+
let f;
|
|
1018
1010
|
if (a.isFormData(n)) {
|
|
1019
1011
|
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1020
1012
|
i.setContentType(void 0);
|
|
1021
|
-
else if ((
|
|
1022
|
-
const [u, ...
|
|
1023
|
-
i.setContentType([u || "multipart/form-data", ...
|
|
1013
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1014
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1015
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1024
1016
|
}
|
|
1025
1017
|
}
|
|
1026
|
-
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1027
|
-
const u = s && o &&
|
|
1018
|
+
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && qn(t.url))) {
|
|
1019
|
+
const u = s && o && In.read(o);
|
|
1028
1020
|
u && i.set(s, u);
|
|
1029
1021
|
}
|
|
1030
1022
|
return t;
|
|
1031
|
-
},
|
|
1023
|
+
}, Mn = typeof XMLHttpRequest < "u", $n = Mn && function(e) {
|
|
1032
1024
|
return new Promise(function(n, r) {
|
|
1033
|
-
const s =
|
|
1025
|
+
const s = pt(e);
|
|
1034
1026
|
let o = s.data;
|
|
1035
|
-
const i =
|
|
1036
|
-
let { responseType: c, onUploadProgress:
|
|
1027
|
+
const i = O.from(s.headers).normalize();
|
|
1028
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, g, E, h;
|
|
1037
1029
|
function y() {
|
|
1038
|
-
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(
|
|
1030
|
+
E && E(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1039
1031
|
}
|
|
1040
1032
|
let p = new XMLHttpRequest();
|
|
1041
1033
|
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1042
1034
|
function w() {
|
|
1043
1035
|
if (!p)
|
|
1044
1036
|
return;
|
|
1045
|
-
const C =
|
|
1037
|
+
const C = O.from(
|
|
1046
1038
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1047
1039
|
), A = {
|
|
1048
1040
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
@@ -1052,10 +1044,10 @@ const ht = (e) => {
|
|
|
1052
1044
|
config: e,
|
|
1053
1045
|
request: p
|
|
1054
1046
|
};
|
|
1055
|
-
|
|
1056
|
-
n(
|
|
1057
|
-
}, function(
|
|
1058
|
-
r(
|
|
1047
|
+
dt(function(D) {
|
|
1048
|
+
n(D), y();
|
|
1049
|
+
}, function(D) {
|
|
1050
|
+
r(D), y();
|
|
1059
1051
|
}, A), p = null;
|
|
1060
1052
|
}
|
|
1061
1053
|
"onloadend" in p ? p.onloadend = w : p.onreadystatechange = function() {
|
|
@@ -1065,19 +1057,19 @@ const ht = (e) => {
|
|
|
1065
1057
|
}, p.onerror = function() {
|
|
1066
1058
|
r(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1067
1059
|
}, p.ontimeout = function() {
|
|
1068
|
-
let
|
|
1069
|
-
const A = s.transitional ||
|
|
1070
|
-
s.timeoutErrorMessage && (
|
|
1071
|
-
|
|
1060
|
+
let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1061
|
+
const A = s.transitional || ut;
|
|
1062
|
+
s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
|
|
1063
|
+
U,
|
|
1072
1064
|
A.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1073
1065
|
e,
|
|
1074
1066
|
p
|
|
1075
1067
|
)), p = null;
|
|
1076
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(
|
|
1077
|
-
p.setRequestHeader(A,
|
|
1078
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] =
|
|
1079
|
-
p && (r(!C || C.type ? new
|
|
1080
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1068
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(U, A) {
|
|
1069
|
+
p.setRequestHeader(A, U);
|
|
1070
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] = ne(u, !0), p.addEventListener("progress", g)), f && p.upload && ([d, E] = ne(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (l = (C) => {
|
|
1071
|
+
p && (r(!C || C.type ? new M(null, e, p) : C), p.abort(), p = null);
|
|
1072
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1081
1073
|
const S = Dn(s.url);
|
|
1082
1074
|
if (S && T.protocols.indexOf(S) === -1) {
|
|
1083
1075
|
r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, e));
|
|
@@ -1085,15 +1077,15 @@ const ht = (e) => {
|
|
|
1085
1077
|
}
|
|
1086
1078
|
p.send(o || null);
|
|
1087
1079
|
});
|
|
1088
|
-
},
|
|
1080
|
+
}, Hn = (e, t) => {
|
|
1089
1081
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1090
1082
|
if (t || n) {
|
|
1091
1083
|
let r = new AbortController(), s;
|
|
1092
1084
|
const o = function(u) {
|
|
1093
1085
|
if (!s) {
|
|
1094
1086
|
s = !0, c();
|
|
1095
|
-
const
|
|
1096
|
-
r.abort(
|
|
1087
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1088
|
+
r.abort(l instanceof m ? l : new M(l instanceof Error ? l.message : l));
|
|
1097
1089
|
}
|
|
1098
1090
|
};
|
|
1099
1091
|
let i = t && setTimeout(() => {
|
|
@@ -1105,10 +1097,10 @@ const ht = (e) => {
|
|
|
1105
1097
|
}), e = null);
|
|
1106
1098
|
};
|
|
1107
1099
|
e.forEach((u) => u.addEventListener("abort", o));
|
|
1108
|
-
const { signal:
|
|
1109
|
-
return
|
|
1100
|
+
const { signal: f } = r;
|
|
1101
|
+
return f.unsubscribe = () => a.asap(c), f;
|
|
1110
1102
|
}
|
|
1111
|
-
},
|
|
1103
|
+
}, Vn = function* (e, t) {
|
|
1112
1104
|
let n = e.byteLength;
|
|
1113
1105
|
if (n < t) {
|
|
1114
1106
|
yield e;
|
|
@@ -1117,10 +1109,10 @@ const ht = (e) => {
|
|
|
1117
1109
|
let r = 0, s;
|
|
1118
1110
|
for (; r < n; )
|
|
1119
1111
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1120
|
-
},
|
|
1121
|
-
for await (const n of
|
|
1122
|
-
yield*
|
|
1123
|
-
},
|
|
1112
|
+
}, Kn = async function* (e, t) {
|
|
1113
|
+
for await (const n of zn(e))
|
|
1114
|
+
yield* Vn(n, t);
|
|
1115
|
+
}, zn = async function* (e) {
|
|
1124
1116
|
if (e[Symbol.asyncIterator]) {
|
|
1125
1117
|
yield* e;
|
|
1126
1118
|
return;
|
|
@@ -1136,42 +1128,42 @@ const ht = (e) => {
|
|
|
1136
1128
|
} finally {
|
|
1137
1129
|
await t.cancel();
|
|
1138
1130
|
}
|
|
1139
|
-
},
|
|
1140
|
-
const s =
|
|
1141
|
-
let o = 0, i, c = (
|
|
1142
|
-
i || (i = !0, r && r(
|
|
1131
|
+
}, Ie = (e, t, n, r) => {
|
|
1132
|
+
const s = Kn(e, t);
|
|
1133
|
+
let o = 0, i, c = (f) => {
|
|
1134
|
+
i || (i = !0, r && r(f));
|
|
1143
1135
|
};
|
|
1144
1136
|
return new ReadableStream({
|
|
1145
|
-
async pull(
|
|
1137
|
+
async pull(f) {
|
|
1146
1138
|
try {
|
|
1147
|
-
const { done: u, value:
|
|
1139
|
+
const { done: u, value: l } = await s.next();
|
|
1148
1140
|
if (u) {
|
|
1149
|
-
c(),
|
|
1141
|
+
c(), f.close();
|
|
1150
1142
|
return;
|
|
1151
1143
|
}
|
|
1152
|
-
let d =
|
|
1144
|
+
let d = l.byteLength;
|
|
1153
1145
|
if (n) {
|
|
1154
1146
|
let g = o += d;
|
|
1155
1147
|
n(g);
|
|
1156
1148
|
}
|
|
1157
|
-
|
|
1149
|
+
f.enqueue(new Uint8Array(l));
|
|
1158
1150
|
} catch (u) {
|
|
1159
1151
|
throw c(u), u;
|
|
1160
1152
|
}
|
|
1161
1153
|
},
|
|
1162
|
-
cancel(
|
|
1163
|
-
return c(
|
|
1154
|
+
cancel(f) {
|
|
1155
|
+
return c(f), s.return();
|
|
1164
1156
|
}
|
|
1165
1157
|
}, {
|
|
1166
1158
|
highWaterMark: 2
|
|
1167
1159
|
});
|
|
1168
|
-
},
|
|
1160
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", mt = ce && typeof ReadableStream == "function", Jn = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), yt = (e, ...t) => {
|
|
1169
1161
|
try {
|
|
1170
1162
|
return !!e(...t);
|
|
1171
1163
|
} catch {
|
|
1172
1164
|
return !1;
|
|
1173
1165
|
}
|
|
1174
|
-
},
|
|
1166
|
+
}, Wn = mt && yt(() => {
|
|
1175
1167
|
let e = !1;
|
|
1176
1168
|
const t = new Request(T.origin, {
|
|
1177
1169
|
body: new ReadableStream(),
|
|
@@ -1181,17 +1173,17 @@ const ht = (e) => {
|
|
|
1181
1173
|
}
|
|
1182
1174
|
}).headers.has("Content-Type");
|
|
1183
1175
|
return e && !t;
|
|
1184
|
-
}),
|
|
1185
|
-
stream:
|
|
1176
|
+
}), ve = 64 * 1024, we = mt && yt(() => a.isReadableStream(new Response("").body)), re = {
|
|
1177
|
+
stream: we && ((e) => e.body)
|
|
1186
1178
|
};
|
|
1187
|
-
|
|
1179
|
+
ce && ((e) => {
|
|
1188
1180
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1189
|
-
!
|
|
1181
|
+
!re[t] && (re[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1190
1182
|
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1191
1183
|
});
|
|
1192
1184
|
});
|
|
1193
1185
|
})(new Response());
|
|
1194
|
-
const
|
|
1186
|
+
const Qn = async (e) => {
|
|
1195
1187
|
if (e == null)
|
|
1196
1188
|
return 0;
|
|
1197
1189
|
if (a.isBlob(e))
|
|
@@ -1204,11 +1196,11 @@ const Wn = async (e) => {
|
|
|
1204
1196
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1205
1197
|
return e.byteLength;
|
|
1206
1198
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1207
|
-
return (await
|
|
1208
|
-
},
|
|
1199
|
+
return (await Jn(e)).byteLength;
|
|
1200
|
+
}, Xn = async (e, t) => {
|
|
1209
1201
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1210
|
-
return n ??
|
|
1211
|
-
},
|
|
1202
|
+
return n ?? Qn(t);
|
|
1203
|
+
}, Yn = ce && (async (e) => {
|
|
1212
1204
|
let {
|
|
1213
1205
|
url: t,
|
|
1214
1206
|
method: n,
|
|
@@ -1217,31 +1209,31 @@ const Wn = async (e) => {
|
|
|
1217
1209
|
cancelToken: o,
|
|
1218
1210
|
timeout: i,
|
|
1219
1211
|
onDownloadProgress: c,
|
|
1220
|
-
onUploadProgress:
|
|
1212
|
+
onUploadProgress: f,
|
|
1221
1213
|
responseType: u,
|
|
1222
|
-
headers:
|
|
1214
|
+
headers: l,
|
|
1223
1215
|
withCredentials: d = "same-origin",
|
|
1224
1216
|
fetchOptions: g
|
|
1225
|
-
} =
|
|
1217
|
+
} = pt(e);
|
|
1226
1218
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1227
|
-
let E =
|
|
1219
|
+
let E = Hn([s, o && o.toAbortSignal()], i), h;
|
|
1228
1220
|
const y = E && E.unsubscribe && (() => {
|
|
1229
1221
|
E.unsubscribe();
|
|
1230
1222
|
});
|
|
1231
1223
|
let p;
|
|
1232
1224
|
try {
|
|
1233
|
-
if (
|
|
1225
|
+
if (f && Wn && n !== "get" && n !== "head" && (p = await Xn(l, r)) !== 0) {
|
|
1234
1226
|
let A = new Request(t, {
|
|
1235
1227
|
method: "POST",
|
|
1236
1228
|
body: r,
|
|
1237
1229
|
duplex: "half"
|
|
1238
|
-
}),
|
|
1239
|
-
if (a.isFormData(r) && (
|
|
1240
|
-
const [
|
|
1230
|
+
}), L;
|
|
1231
|
+
if (a.isFormData(r) && (L = A.headers.get("content-type")) && l.setContentType(L), A.body) {
|
|
1232
|
+
const [D, Y] = ke(
|
|
1241
1233
|
p,
|
|
1242
|
-
|
|
1234
|
+
ne(Be(f))
|
|
1243
1235
|
);
|
|
1244
|
-
r =
|
|
1236
|
+
r = Ie(A.body, ve, D, Y);
|
|
1245
1237
|
}
|
|
1246
1238
|
}
|
|
1247
1239
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1250,35 +1242,35 @@ const Wn = async (e) => {
|
|
|
1250
1242
|
...g,
|
|
1251
1243
|
signal: E,
|
|
1252
1244
|
method: n.toUpperCase(),
|
|
1253
|
-
headers:
|
|
1245
|
+
headers: l.normalize().toJSON(),
|
|
1254
1246
|
body: r,
|
|
1255
1247
|
duplex: "half",
|
|
1256
1248
|
credentials: w ? d : void 0
|
|
1257
1249
|
});
|
|
1258
|
-
let S = await fetch(h);
|
|
1259
|
-
const C =
|
|
1260
|
-
if (
|
|
1250
|
+
let S = await fetch(h, g);
|
|
1251
|
+
const C = we && (u === "stream" || u === "response");
|
|
1252
|
+
if (we && (c || C && y)) {
|
|
1261
1253
|
const A = {};
|
|
1262
|
-
["status", "statusText", "headers"].forEach((
|
|
1263
|
-
A[
|
|
1254
|
+
["status", "statusText", "headers"].forEach((Ne) => {
|
|
1255
|
+
A[Ne] = S[Ne];
|
|
1264
1256
|
});
|
|
1265
|
-
const
|
|
1266
|
-
|
|
1267
|
-
|
|
1257
|
+
const L = a.toFiniteNumber(S.headers.get("content-length")), [D, Y] = c && ke(
|
|
1258
|
+
L,
|
|
1259
|
+
ne(Be(c), !0)
|
|
1268
1260
|
) || [];
|
|
1269
1261
|
S = new Response(
|
|
1270
|
-
|
|
1271
|
-
|
|
1262
|
+
Ie(S.body, ve, D, () => {
|
|
1263
|
+
Y && Y(), y && y();
|
|
1272
1264
|
}),
|
|
1273
1265
|
A
|
|
1274
1266
|
);
|
|
1275
1267
|
}
|
|
1276
1268
|
u = u || "text";
|
|
1277
|
-
let
|
|
1278
|
-
return !C && y && y(), await new Promise((A,
|
|
1279
|
-
|
|
1280
|
-
data:
|
|
1281
|
-
headers:
|
|
1269
|
+
let U = await re[a.findKey(re, u) || "text"](S, e);
|
|
1270
|
+
return !C && y && y(), await new Promise((A, L) => {
|
|
1271
|
+
dt(A, L, {
|
|
1272
|
+
data: U,
|
|
1273
|
+
headers: O.from(S.headers),
|
|
1282
1274
|
status: S.status,
|
|
1283
1275
|
statusText: S.statusText,
|
|
1284
1276
|
config: e,
|
|
@@ -1286,19 +1278,19 @@ const Wn = async (e) => {
|
|
|
1286
1278
|
});
|
|
1287
1279
|
});
|
|
1288
1280
|
} catch (w) {
|
|
1289
|
-
throw y && y(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1281
|
+
throw y && y(), w && w.name === "TypeError" && /Load failed|fetch/i.test(w.message) ? Object.assign(
|
|
1290
1282
|
new m("Network Error", m.ERR_NETWORK, e, h),
|
|
1291
1283
|
{
|
|
1292
1284
|
cause: w.cause || w
|
|
1293
1285
|
}
|
|
1294
1286
|
) : m.from(w, w && w.code, e, h);
|
|
1295
1287
|
}
|
|
1296
|
-
}),
|
|
1297
|
-
http:
|
|
1298
|
-
xhr:
|
|
1299
|
-
fetch:
|
|
1288
|
+
}), be = {
|
|
1289
|
+
http: dn,
|
|
1290
|
+
xhr: $n,
|
|
1291
|
+
fetch: Yn
|
|
1300
1292
|
};
|
|
1301
|
-
a.forEach(
|
|
1293
|
+
a.forEach(be, (e, t) => {
|
|
1302
1294
|
if (e) {
|
|
1303
1295
|
try {
|
|
1304
1296
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1307,7 +1299,7 @@ a.forEach(ye, (e, t) => {
|
|
|
1307
1299
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1308
1300
|
}
|
|
1309
1301
|
});
|
|
1310
|
-
const je = (e) => `- ${e}`,
|
|
1302
|
+
const je = (e) => `- ${e}`, Gn = (e) => a.isFunction(e) || e === null || e === !1, gt = {
|
|
1311
1303
|
getAdapter: (e) => {
|
|
1312
1304
|
e = a.isArray(e) ? e : [e];
|
|
1313
1305
|
const { length: t } = e;
|
|
@@ -1316,7 +1308,7 @@ const je = (e) => `- ${e}`, Xn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1316
1308
|
for (let o = 0; o < t; o++) {
|
|
1317
1309
|
n = e[o];
|
|
1318
1310
|
let i;
|
|
1319
|
-
if (r = n, !
|
|
1311
|
+
if (r = n, !Gn(n) && (r = be[(i = String(n)).toLowerCase()], r === void 0))
|
|
1320
1312
|
throw new m(`Unknown adapter '${i}'`);
|
|
1321
1313
|
if (r)
|
|
1322
1314
|
break;
|
|
@@ -1324,7 +1316,7 @@ const je = (e) => `- ${e}`, Xn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1324
1316
|
}
|
|
1325
1317
|
if (!r) {
|
|
1326
1318
|
const o = Object.entries(s).map(
|
|
1327
|
-
([c,
|
|
1319
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1328
1320
|
);
|
|
1329
1321
|
let i = t ? o.length > 1 ? `since :
|
|
1330
1322
|
` + o.map(je).join(`
|
|
@@ -1336,40 +1328,40 @@ const je = (e) => `- ${e}`, Xn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1336
1328
|
}
|
|
1337
1329
|
return r;
|
|
1338
1330
|
},
|
|
1339
|
-
adapters:
|
|
1331
|
+
adapters: be
|
|
1340
1332
|
};
|
|
1341
|
-
function
|
|
1333
|
+
function pe(e) {
|
|
1342
1334
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1343
|
-
throw new
|
|
1335
|
+
throw new M(null, e);
|
|
1344
1336
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1337
|
+
function Me(e) {
|
|
1338
|
+
return pe(e), e.headers = O.from(e.headers), e.data = he.call(
|
|
1347
1339
|
e,
|
|
1348
1340
|
e.transformRequest
|
|
1349
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1350
|
-
return
|
|
1341
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || X.adapter)(e).then(function(r) {
|
|
1342
|
+
return pe(e), r.data = he.call(
|
|
1351
1343
|
e,
|
|
1352
1344
|
e.transformResponse,
|
|
1353
1345
|
r
|
|
1354
|
-
), r.headers =
|
|
1346
|
+
), r.headers = O.from(r.headers), r;
|
|
1355
1347
|
}, function(r) {
|
|
1356
|
-
return
|
|
1348
|
+
return ft(r) || (pe(e), r && r.response && (r.response.data = he.call(
|
|
1357
1349
|
e,
|
|
1358
1350
|
e.transformResponse,
|
|
1359
1351
|
r.response
|
|
1360
|
-
), r.response.headers =
|
|
1352
|
+
), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
|
|
1361
1353
|
});
|
|
1362
1354
|
}
|
|
1363
|
-
const
|
|
1355
|
+
const wt = "1.11.0", ue = {};
|
|
1364
1356
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1365
|
-
|
|
1357
|
+
ue[e] = function(r) {
|
|
1366
1358
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1367
1359
|
};
|
|
1368
1360
|
});
|
|
1369
|
-
const
|
|
1370
|
-
|
|
1361
|
+
const $e = {};
|
|
1362
|
+
ue.transitional = function(t, n, r) {
|
|
1371
1363
|
function s(o, i) {
|
|
1372
|
-
return "[Axios v" +
|
|
1364
|
+
return "[Axios v" + wt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1373
1365
|
}
|
|
1374
1366
|
return (o, i, c) => {
|
|
1375
1367
|
if (t === !1)
|
|
@@ -1377,7 +1369,7 @@ Re.transitional = function(t, n, r) {
|
|
|
1377
1369
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1378
1370
|
m.ERR_DEPRECATED
|
|
1379
1371
|
);
|
|
1380
|
-
return n &&
|
|
1372
|
+
return n && !$e[i] && ($e[i] = !0, console.warn(
|
|
1381
1373
|
s(
|
|
1382
1374
|
i,
|
|
1383
1375
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1385,7 +1377,10 @@ Re.transitional = function(t, n, r) {
|
|
|
1385
1377
|
)), t ? t(o, i, c) : !0;
|
|
1386
1378
|
};
|
|
1387
1379
|
};
|
|
1388
|
-
function
|
|
1380
|
+
ue.spelling = function(t) {
|
|
1381
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1382
|
+
};
|
|
1383
|
+
function Zn(e, t, n) {
|
|
1389
1384
|
if (typeof e != "object")
|
|
1390
1385
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1391
1386
|
const r = Object.keys(e);
|
|
@@ -1393,24 +1388,24 @@ function Yn(e, t, n) {
|
|
|
1393
1388
|
for (; s-- > 0; ) {
|
|
1394
1389
|
const o = r[s], i = t[o];
|
|
1395
1390
|
if (i) {
|
|
1396
|
-
const c = e[o],
|
|
1397
|
-
if (
|
|
1398
|
-
throw new m("option " + o + " must be " +
|
|
1391
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1392
|
+
if (f !== !0)
|
|
1393
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1399
1394
|
continue;
|
|
1400
1395
|
}
|
|
1401
1396
|
if (n !== !0)
|
|
1402
1397
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1403
1398
|
}
|
|
1404
1399
|
}
|
|
1405
|
-
const
|
|
1406
|
-
assertOptions:
|
|
1407
|
-
validators:
|
|
1408
|
-
},
|
|
1409
|
-
let
|
|
1400
|
+
const te = {
|
|
1401
|
+
assertOptions: Zn,
|
|
1402
|
+
validators: ue
|
|
1403
|
+
}, x = te.validators;
|
|
1404
|
+
let q = class {
|
|
1410
1405
|
constructor(t) {
|
|
1411
|
-
this.defaults = t, this.interceptors = {
|
|
1412
|
-
request: new
|
|
1413
|
-
response: new
|
|
1406
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1407
|
+
request: new Fe(),
|
|
1408
|
+
response: new Fe()
|
|
1414
1409
|
};
|
|
1415
1410
|
}
|
|
1416
1411
|
/**
|
|
@@ -1426,8 +1421,8 @@ let v = class {
|
|
|
1426
1421
|
return await this._request(t, n);
|
|
1427
1422
|
} catch (r) {
|
|
1428
1423
|
if (r instanceof Error) {
|
|
1429
|
-
let s;
|
|
1430
|
-
Error.captureStackTrace ? Error.captureStackTrace(s
|
|
1424
|
+
let s = {};
|
|
1425
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1431
1426
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1432
1427
|
try {
|
|
1433
1428
|
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
@@ -1439,18 +1434,21 @@ let v = class {
|
|
|
1439
1434
|
}
|
|
1440
1435
|
}
|
|
1441
1436
|
_request(t, n) {
|
|
1442
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1437
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = I(this.defaults, n);
|
|
1443
1438
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1444
|
-
r !== void 0 &&
|
|
1445
|
-
silentJSONParsing:
|
|
1446
|
-
forcedJSONParsing:
|
|
1447
|
-
clarifyTimeoutError:
|
|
1439
|
+
r !== void 0 && te.assertOptions(r, {
|
|
1440
|
+
silentJSONParsing: x.transitional(x.boolean),
|
|
1441
|
+
forcedJSONParsing: x.transitional(x.boolean),
|
|
1442
|
+
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1448
1443
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1449
1444
|
serialize: s
|
|
1450
|
-
} :
|
|
1451
|
-
encode:
|
|
1452
|
-
serialize:
|
|
1453
|
-
}, !0)), n.
|
|
1445
|
+
} : te.assertOptions(s, {
|
|
1446
|
+
encode: x.function,
|
|
1447
|
+
serialize: x.function
|
|
1448
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), te.assertOptions(n, {
|
|
1449
|
+
baseUrl: x.spelling("baseURL"),
|
|
1450
|
+
withXsrfToken: x.spelling("withXSRFToken")
|
|
1451
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1454
1452
|
let i = o && a.merge(
|
|
1455
1453
|
o.common,
|
|
1456
1454
|
o[n.method]
|
|
@@ -1460,22 +1458,22 @@ let v = class {
|
|
|
1460
1458
|
(h) => {
|
|
1461
1459
|
delete o[h];
|
|
1462
1460
|
}
|
|
1463
|
-
), n.headers =
|
|
1461
|
+
), n.headers = O.concat(i, o);
|
|
1464
1462
|
const c = [];
|
|
1465
|
-
let
|
|
1463
|
+
let f = !0;
|
|
1466
1464
|
this.interceptors.request.forEach(function(y) {
|
|
1467
|
-
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (
|
|
1465
|
+
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (f = f && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1468
1466
|
});
|
|
1469
1467
|
const u = [];
|
|
1470
1468
|
this.interceptors.response.forEach(function(y) {
|
|
1471
1469
|
u.push(y.fulfilled, y.rejected);
|
|
1472
1470
|
});
|
|
1473
|
-
let
|
|
1474
|
-
if (!
|
|
1475
|
-
const h = [
|
|
1476
|
-
for (h.unshift
|
|
1477
|
-
|
|
1478
|
-
return
|
|
1471
|
+
let l, d = 0, g;
|
|
1472
|
+
if (!f) {
|
|
1473
|
+
const h = [Me.bind(this), void 0];
|
|
1474
|
+
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(n); d < g; )
|
|
1475
|
+
l = l.then(h[d++], h[d++]);
|
|
1476
|
+
return l;
|
|
1479
1477
|
}
|
|
1480
1478
|
g = c.length;
|
|
1481
1479
|
let E = n;
|
|
@@ -1489,23 +1487,23 @@ let v = class {
|
|
|
1489
1487
|
}
|
|
1490
1488
|
}
|
|
1491
1489
|
try {
|
|
1492
|
-
|
|
1490
|
+
l = Me.call(this, E);
|
|
1493
1491
|
} catch (h) {
|
|
1494
1492
|
return Promise.reject(h);
|
|
1495
1493
|
}
|
|
1496
1494
|
for (d = 0, g = u.length; d < g; )
|
|
1497
|
-
|
|
1498
|
-
return
|
|
1495
|
+
l = l.then(u[d++], u[d++]);
|
|
1496
|
+
return l;
|
|
1499
1497
|
}
|
|
1500
1498
|
getUri(t) {
|
|
1501
|
-
t =
|
|
1502
|
-
const n =
|
|
1503
|
-
return
|
|
1499
|
+
t = I(this.defaults, t);
|
|
1500
|
+
const n = ht(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1501
|
+
return ct(n, t.params, t.paramsSerializer);
|
|
1504
1502
|
}
|
|
1505
1503
|
};
|
|
1506
1504
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1507
|
-
|
|
1508
|
-
return this.request(
|
|
1505
|
+
q.prototype[t] = function(n, r) {
|
|
1506
|
+
return this.request(I(r || {}, {
|
|
1509
1507
|
method: t,
|
|
1510
1508
|
url: n,
|
|
1511
1509
|
data: (r || {}).data
|
|
@@ -1515,7 +1513,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1515
1513
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1516
1514
|
function n(r) {
|
|
1517
1515
|
return function(o, i, c) {
|
|
1518
|
-
return this.request(
|
|
1516
|
+
return this.request(I(c || {}, {
|
|
1519
1517
|
method: t,
|
|
1520
1518
|
headers: r ? {
|
|
1521
1519
|
"Content-Type": "multipart/form-data"
|
|
@@ -1525,9 +1523,9 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1525
1523
|
}));
|
|
1526
1524
|
};
|
|
1527
1525
|
}
|
|
1528
|
-
|
|
1526
|
+
q.prototype[t] = n(), q.prototype[t + "Form"] = n(!0);
|
|
1529
1527
|
});
|
|
1530
|
-
let
|
|
1528
|
+
let er = class bt {
|
|
1531
1529
|
constructor(t) {
|
|
1532
1530
|
if (typeof t != "function")
|
|
1533
1531
|
throw new TypeError("executor must be a function.");
|
|
@@ -1551,7 +1549,7 @@ let Zn = class wt {
|
|
|
1551
1549
|
r.unsubscribe(o);
|
|
1552
1550
|
}, i;
|
|
1553
1551
|
}, t(function(o, i, c) {
|
|
1554
|
-
r.reason || (r.reason = new
|
|
1552
|
+
r.reason || (r.reason = new M(o, i, c), n(r.reason));
|
|
1555
1553
|
});
|
|
1556
1554
|
}
|
|
1557
1555
|
/**
|
|
@@ -1593,22 +1591,22 @@ let Zn = class wt {
|
|
|
1593
1591
|
static source() {
|
|
1594
1592
|
let t;
|
|
1595
1593
|
return {
|
|
1596
|
-
token: new
|
|
1594
|
+
token: new bt(function(s) {
|
|
1597
1595
|
t = s;
|
|
1598
1596
|
}),
|
|
1599
1597
|
cancel: t
|
|
1600
1598
|
};
|
|
1601
1599
|
}
|
|
1602
1600
|
};
|
|
1603
|
-
function
|
|
1601
|
+
function tr(e) {
|
|
1604
1602
|
return function(n) {
|
|
1605
1603
|
return e.apply(null, n);
|
|
1606
1604
|
};
|
|
1607
1605
|
}
|
|
1608
|
-
function
|
|
1606
|
+
function nr(e) {
|
|
1609
1607
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1610
1608
|
}
|
|
1611
|
-
const
|
|
1609
|
+
const Ee = {
|
|
1612
1610
|
Continue: 100,
|
|
1613
1611
|
SwitchingProtocols: 101,
|
|
1614
1612
|
Processing: 102,
|
|
@@ -1673,80 +1671,80 @@ const we = {
|
|
|
1673
1671
|
NotExtended: 510,
|
|
1674
1672
|
NetworkAuthenticationRequired: 511
|
|
1675
1673
|
};
|
|
1676
|
-
Object.entries(
|
|
1677
|
-
|
|
1674
|
+
Object.entries(Ee).forEach(([e, t]) => {
|
|
1675
|
+
Ee[t] = e;
|
|
1678
1676
|
});
|
|
1679
|
-
function
|
|
1680
|
-
const t = new
|
|
1681
|
-
return a.extend(n,
|
|
1682
|
-
return
|
|
1677
|
+
function Et(e) {
|
|
1678
|
+
const t = new q(e), n = Xe(q.prototype.request, t);
|
|
1679
|
+
return a.extend(n, q.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1680
|
+
return Et(I(e, s));
|
|
1683
1681
|
}, n;
|
|
1684
1682
|
}
|
|
1685
|
-
const b =
|
|
1686
|
-
b.Axios =
|
|
1687
|
-
b.CanceledError =
|
|
1688
|
-
b.CancelToken =
|
|
1689
|
-
b.isCancel =
|
|
1690
|
-
b.VERSION =
|
|
1691
|
-
b.toFormData =
|
|
1683
|
+
const b = Et(X);
|
|
1684
|
+
b.Axios = q;
|
|
1685
|
+
b.CanceledError = M;
|
|
1686
|
+
b.CancelToken = er;
|
|
1687
|
+
b.isCancel = ft;
|
|
1688
|
+
b.VERSION = wt;
|
|
1689
|
+
b.toFormData = ae;
|
|
1692
1690
|
b.AxiosError = m;
|
|
1693
1691
|
b.Cancel = b.CanceledError;
|
|
1694
1692
|
b.all = function(t) {
|
|
1695
1693
|
return Promise.all(t);
|
|
1696
1694
|
};
|
|
1697
|
-
b.spread =
|
|
1698
|
-
b.isAxiosError =
|
|
1699
|
-
b.mergeConfig =
|
|
1700
|
-
b.AxiosHeaders =
|
|
1701
|
-
b.formToJSON = (e) =>
|
|
1702
|
-
b.getAdapter =
|
|
1703
|
-
b.HttpStatusCode =
|
|
1695
|
+
b.spread = tr;
|
|
1696
|
+
b.isAxiosError = nr;
|
|
1697
|
+
b.mergeConfig = I;
|
|
1698
|
+
b.AxiosHeaders = O;
|
|
1699
|
+
b.formToJSON = (e) => lt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1700
|
+
b.getAdapter = gt.getAdapter;
|
|
1701
|
+
b.HttpStatusCode = Ee;
|
|
1704
1702
|
b.default = b;
|
|
1705
1703
|
const {
|
|
1706
|
-
Axios:
|
|
1704
|
+
Axios: Zr,
|
|
1707
1705
|
AxiosError: G,
|
|
1708
|
-
CanceledError:
|
|
1709
|
-
isCancel:
|
|
1710
|
-
CancelToken:
|
|
1711
|
-
VERSION:
|
|
1712
|
-
all:
|
|
1713
|
-
Cancel:
|
|
1714
|
-
isAxiosError:
|
|
1715
|
-
spread:
|
|
1716
|
-
toFormData:
|
|
1717
|
-
AxiosHeaders:
|
|
1718
|
-
HttpStatusCode:
|
|
1719
|
-
formToJSON:
|
|
1720
|
-
getAdapter:
|
|
1721
|
-
mergeConfig:
|
|
1706
|
+
CanceledError: es,
|
|
1707
|
+
isCancel: ts,
|
|
1708
|
+
CancelToken: ns,
|
|
1709
|
+
VERSION: rs,
|
|
1710
|
+
all: ss,
|
|
1711
|
+
Cancel: os,
|
|
1712
|
+
isAxiosError: is,
|
|
1713
|
+
spread: as,
|
|
1714
|
+
toFormData: cs,
|
|
1715
|
+
AxiosHeaders: us,
|
|
1716
|
+
HttpStatusCode: ls,
|
|
1717
|
+
formToJSON: fs,
|
|
1718
|
+
getAdapter: ds,
|
|
1719
|
+
mergeConfig: hs
|
|
1722
1720
|
} = b;
|
|
1723
|
-
class
|
|
1721
|
+
class He extends Error {
|
|
1724
1722
|
constructor(n) {
|
|
1725
1723
|
super(n.join(", "));
|
|
1726
1724
|
R(this, "errors");
|
|
1727
1725
|
this.name = "ValidationError", this.errors = n;
|
|
1728
1726
|
}
|
|
1729
1727
|
}
|
|
1730
|
-
class
|
|
1728
|
+
class Ve extends Error {
|
|
1731
1729
|
constructor(n) {
|
|
1732
1730
|
super("Address already registered.");
|
|
1733
1731
|
R(this, "address");
|
|
1734
1732
|
this.name = "AddressInUseError", this.address = n;
|
|
1735
1733
|
}
|
|
1736
1734
|
}
|
|
1737
|
-
class
|
|
1735
|
+
class Ke extends Error {
|
|
1738
1736
|
constructor(n) {
|
|
1739
1737
|
super("Code already registered.");
|
|
1740
1738
|
R(this, "code");
|
|
1741
1739
|
this.name = "CodeInUseError", this.code = n;
|
|
1742
1740
|
}
|
|
1743
1741
|
}
|
|
1744
|
-
class
|
|
1742
|
+
class ze extends Error {
|
|
1745
1743
|
constructor() {
|
|
1746
1744
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1747
1745
|
}
|
|
1748
1746
|
}
|
|
1749
|
-
class
|
|
1747
|
+
class rr {
|
|
1750
1748
|
constructor(t) {
|
|
1751
1749
|
R(this, "httpClient");
|
|
1752
1750
|
R(this, "_debug");
|
|
@@ -1768,12 +1766,12 @@ class nr {
|
|
|
1768
1766
|
});
|
|
1769
1767
|
} catch (c) {
|
|
1770
1768
|
if (c instanceof G) {
|
|
1771
|
-
const
|
|
1772
|
-
if (typeof (
|
|
1773
|
-
const u =
|
|
1774
|
-
throw u == "invalid signature" ? new
|
|
1775
|
-
} else if ((
|
|
1776
|
-
throw new
|
|
1769
|
+
const f = (i = c.response) == null ? void 0 : i.data;
|
|
1770
|
+
if (typeof (f == null ? void 0 : f.message) == "string") {
|
|
1771
|
+
const u = f.message.toLowerCase();
|
|
1772
|
+
throw u == "invalid signature" ? new ze() : u == "address in use" ? new Ve(t) : u == "code in use" ? new Ke(r) : new Error(u);
|
|
1773
|
+
} else if ((f == null ? void 0 : f.message) instanceof Array)
|
|
1774
|
+
throw new He(f.message);
|
|
1777
1775
|
}
|
|
1778
1776
|
throw c;
|
|
1779
1777
|
}
|
|
@@ -1793,12 +1791,12 @@ class nr {
|
|
|
1793
1791
|
});
|
|
1794
1792
|
} catch (c) {
|
|
1795
1793
|
if (c instanceof G) {
|
|
1796
|
-
const
|
|
1797
|
-
if (typeof (
|
|
1798
|
-
const u =
|
|
1799
|
-
throw u == "invalid signature" ? new
|
|
1800
|
-
} else if ((
|
|
1801
|
-
throw new
|
|
1794
|
+
const f = (i = c.response) == null ? void 0 : i.data;
|
|
1795
|
+
if (typeof (f == null ? void 0 : f.message) == "string") {
|
|
1796
|
+
const u = f.message.toLowerCase();
|
|
1797
|
+
throw u == "invalid signature" ? new ze() : u == "address in use" ? new Ve(t) : u == "code in use" ? new Ke(r) : new Error(u);
|
|
1798
|
+
} else if ((f == null ? void 0 : f.message) instanceof Array)
|
|
1799
|
+
throw new He(f.message);
|
|
1802
1800
|
}
|
|
1803
1801
|
throw c;
|
|
1804
1802
|
}
|
|
@@ -1824,8 +1822,8 @@ class nr {
|
|
|
1824
1822
|
}
|
|
1825
1823
|
}
|
|
1826
1824
|
}
|
|
1827
|
-
const
|
|
1828
|
-
class
|
|
1825
|
+
const sr = "/audiences";
|
|
1826
|
+
class or {
|
|
1829
1827
|
constructor(t) {
|
|
1830
1828
|
R(this, "httpClient");
|
|
1831
1829
|
R(this, "_debug");
|
|
@@ -1833,12 +1831,12 @@ class sr {
|
|
|
1833
1831
|
}
|
|
1834
1832
|
async getUserAudiences(t) {
|
|
1835
1833
|
return (await this.httpClient.get({
|
|
1836
|
-
path: `${
|
|
1834
|
+
path: `${sr}/user`,
|
|
1837
1835
|
queryParams: { ...t }
|
|
1838
1836
|
})).data;
|
|
1839
1837
|
}
|
|
1840
1838
|
}
|
|
1841
|
-
class
|
|
1839
|
+
class ir {
|
|
1842
1840
|
constructor(t) {
|
|
1843
1841
|
R(this, "httpClient");
|
|
1844
1842
|
this.httpClient = t.httpClient;
|
|
@@ -1848,8 +1846,8 @@ class or {
|
|
|
1848
1846
|
return n;
|
|
1849
1847
|
}
|
|
1850
1848
|
}
|
|
1851
|
-
const Je = "fuul.sent",
|
|
1852
|
-
class
|
|
1849
|
+
const Je = "fuul.sent", ar = 60, cr = "connect_wallet", We = 10;
|
|
1850
|
+
class ur {
|
|
1853
1851
|
constructor(t) {
|
|
1854
1852
|
R(this, "debug");
|
|
1855
1853
|
R(this, "httpClient");
|
|
@@ -1874,25 +1872,34 @@ class ar {
|
|
|
1874
1872
|
if (!r)
|
|
1875
1873
|
return !1;
|
|
1876
1874
|
const s = JSON.parse(r);
|
|
1877
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1875
|
+
if (this.getCurrentTimestamp() - s.timestamp > ar)
|
|
1878
1876
|
return !1;
|
|
1879
|
-
let
|
|
1880
|
-
t.metadata && (
|
|
1877
|
+
let f = !1;
|
|
1878
|
+
t.metadata && (f = s.metadata.tracking_id === t.metadata.tracking_id && s.metadata.project_id === t.metadata.project_id && s.metadata.referrer === t.metadata.referrer && s.metadata.source === t.metadata.source && s.metadata.category === t.metadata.category && s.metadata.title === t.metadata.title && s.metadata.tag === t.metadata.tag && s.user_address === t.user_address && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
1881
1879
|
let u = !1;
|
|
1882
|
-
return t.args && s.args && (u = s.args.page === t.args.page), u &&
|
|
1880
|
+
return t.args && s.args && (u = s.args.page === t.args.page), u && f;
|
|
1883
1881
|
}
|
|
1884
1882
|
getCurrentTimestamp() {
|
|
1885
1883
|
return Date.now() / 1e3;
|
|
1886
1884
|
}
|
|
1887
1885
|
saveSentEvent(t) {
|
|
1888
|
-
|
|
1889
|
-
|
|
1886
|
+
var i, c;
|
|
1887
|
+
const n = `${Je}_${t.name}`, r = `${n}_all`, s = this.getCurrentTimestamp(), o = { ...t, timestamp: s };
|
|
1888
|
+
if (localStorage.setItem(n, JSON.stringify(o)), t.name === cr) {
|
|
1889
|
+
const f = JSON.parse(localStorage.getItem(r) || "[]"), u = {
|
|
1890
|
+
name: t.name,
|
|
1891
|
+
user_address: t.user_address,
|
|
1892
|
+
tracking_id: (i = t.metadata) == null ? void 0 : i.tracking_id,
|
|
1893
|
+
page: (c = t.args) == null ? void 0 : c.page
|
|
1894
|
+
}, l = [...f, u];
|
|
1895
|
+
l.length > We && l.splice(0, l.length - We), localStorage.setItem(r, JSON.stringify(l));
|
|
1896
|
+
}
|
|
1890
1897
|
}
|
|
1891
1898
|
}
|
|
1892
|
-
const
|
|
1893
|
-
version:
|
|
1899
|
+
const lr = "6.1.1", fr = {
|
|
1900
|
+
version: lr
|
|
1894
1901
|
};
|
|
1895
|
-
class
|
|
1902
|
+
class dr {
|
|
1896
1903
|
constructor(t) {
|
|
1897
1904
|
R(this, "client");
|
|
1898
1905
|
R(this, "defaultQueryParams");
|
|
@@ -1900,7 +1907,7 @@ class lr {
|
|
|
1900
1907
|
...t,
|
|
1901
1908
|
headers: {
|
|
1902
1909
|
Authorization: `Bearer ${t.apiKey}`,
|
|
1903
|
-
"X-Fuul-Sdk-Version":
|
|
1910
|
+
"X-Fuul-Sdk-Version": fr.version
|
|
1904
1911
|
}
|
|
1905
1912
|
}), this.defaultQueryParams = t.queryParams || {};
|
|
1906
1913
|
}
|
|
@@ -1938,7 +1945,7 @@ class lr {
|
|
|
1938
1945
|
});
|
|
1939
1946
|
}
|
|
1940
1947
|
}
|
|
1941
|
-
class
|
|
1948
|
+
class hr {
|
|
1942
1949
|
constructor(t) {
|
|
1943
1950
|
R(this, "httpClient");
|
|
1944
1951
|
this.httpClient = t.httpClient;
|
|
@@ -1962,8 +1969,8 @@ class fr {
|
|
|
1962
1969
|
})).data;
|
|
1963
1970
|
}
|
|
1964
1971
|
}
|
|
1965
|
-
const
|
|
1966
|
-
class
|
|
1972
|
+
const K = "/payouts";
|
|
1973
|
+
class pr {
|
|
1967
1974
|
constructor(t) {
|
|
1968
1975
|
R(this, "httpClient");
|
|
1969
1976
|
R(this, "_debug");
|
|
@@ -1971,37 +1978,37 @@ class dr {
|
|
|
1971
1978
|
}
|
|
1972
1979
|
async getUserPayoutsByConversion(t) {
|
|
1973
1980
|
return (await this.httpClient.get({
|
|
1974
|
-
path:
|
|
1981
|
+
path: K,
|
|
1975
1982
|
queryParams: { ...t, type: "onchain-currency" }
|
|
1976
1983
|
})).data;
|
|
1977
1984
|
}
|
|
1978
1985
|
async getUserPointsByConversion(t) {
|
|
1979
1986
|
return (await this.httpClient.get({
|
|
1980
|
-
path:
|
|
1987
|
+
path: K,
|
|
1981
1988
|
queryParams: { ...t, type: "point" }
|
|
1982
1989
|
})).data;
|
|
1983
1990
|
}
|
|
1984
1991
|
async getUserPayoutMovements(t) {
|
|
1985
1992
|
return (await this.httpClient.get({
|
|
1986
|
-
path: `${
|
|
1993
|
+
path: `${K}/movements`,
|
|
1987
1994
|
queryParams: { ...t, type: "onchain-currency" }
|
|
1988
1995
|
})).data;
|
|
1989
1996
|
}
|
|
1990
1997
|
async getUserPointsMovements(t) {
|
|
1991
1998
|
return (await this.httpClient.get({
|
|
1992
|
-
path: `${
|
|
1999
|
+
path: `${K}/movements`,
|
|
1993
2000
|
queryParams: { ...t, type: "point" }
|
|
1994
2001
|
})).data;
|
|
1995
2002
|
}
|
|
1996
2003
|
async getVolumeLeaderboard(t) {
|
|
1997
2004
|
return (await this.httpClient.get({
|
|
1998
|
-
path: `${
|
|
2005
|
+
path: `${K}/leaderboard/volume`,
|
|
1999
2006
|
queryParams: { ...t }
|
|
2000
2007
|
})).data;
|
|
2001
2008
|
}
|
|
2002
2009
|
}
|
|
2003
|
-
let
|
|
2004
|
-
const
|
|
2010
|
+
let mr = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
2011
|
+
const yr = "fuul.tracking_id", Ae = () => Cr(yr, () => mr()), Qe = () => v("af") || v("referrer"), gr = () => document.referrer, wr = () => Rr(), br = () => v("category"), Er = () => v("title"), Sr = () => v("tag"), Cr = (e, t) => {
|
|
2005
2012
|
const n = localStorage.getItem(e);
|
|
2006
2013
|
if (n)
|
|
2007
2014
|
return n;
|
|
@@ -2009,31 +2016,31 @@ const pr = "fuul.tracking_id", Ae = () => Er(pr, () => hr()), We = () => I("af")
|
|
|
2009
2016
|
const r = t();
|
|
2010
2017
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
2011
2018
|
}
|
|
2012
|
-
},
|
|
2013
|
-
const e =
|
|
2019
|
+
}, v = (e) => new URLSearchParams(window.location.search).get(e), Rr = () => {
|
|
2020
|
+
const e = v("source");
|
|
2014
2021
|
if (e)
|
|
2015
2022
|
return e;
|
|
2016
|
-
},
|
|
2017
|
-
class
|
|
2023
|
+
}, Tr = "/user";
|
|
2024
|
+
class Ar {
|
|
2018
2025
|
constructor(t) {
|
|
2019
2026
|
R(this, "httpClient");
|
|
2020
2027
|
this.httpClient = t.httpClient;
|
|
2021
2028
|
}
|
|
2022
2029
|
async getUserAffiliates(t) {
|
|
2023
|
-
return (await this.httpClient.get({ path:
|
|
2030
|
+
return (await this.httpClient.get({ path: Tr, queryParams: { ...t } })).data.affiliates;
|
|
2024
2031
|
}
|
|
2025
2032
|
}
|
|
2026
|
-
const
|
|
2027
|
-
let
|
|
2028
|
-
function
|
|
2029
|
-
|
|
2033
|
+
const _r = "https://api.fuul.xyz/api/v1/";
|
|
2034
|
+
let k = !1, Se = !1, _e, F, St, Ct, $, le, H, Rt, fe;
|
|
2035
|
+
function Or(e) {
|
|
2036
|
+
k = !!e.debug, !Se && (_e = e.apiKey, Jr(), F = Wr(e.baseApiUrl ?? _r, e.defaultQueryParams ?? {}), St = new ir({ httpClient: F, debug: k }), le = new ur({ httpClient: F, debug: k }), $ = new rr({ httpClient: F, debug: k }), H = new pr({ httpClient: F, debug: k }), Ct = new Ar({ httpClient: F }), Rt = new or({ httpClient: F, debug: k }), fe = new hr({ httpClient: F }), Se = !0, k && console.debug("Fuul SDK: init() complete"));
|
|
2030
2037
|
}
|
|
2031
|
-
function
|
|
2032
|
-
if (!
|
|
2038
|
+
function N() {
|
|
2039
|
+
if (!Se)
|
|
2033
2040
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2034
2041
|
}
|
|
2035
2042
|
async function Pr(e, t) {
|
|
2036
|
-
|
|
2043
|
+
N(), Oe(), Pe();
|
|
2037
2044
|
const n = {
|
|
2038
2045
|
name: e,
|
|
2039
2046
|
args: t ?? {},
|
|
@@ -2041,10 +2048,10 @@ async function Pr(e, t) {
|
|
|
2041
2048
|
tracking_id: Ae()
|
|
2042
2049
|
}
|
|
2043
2050
|
};
|
|
2044
|
-
await
|
|
2051
|
+
await le.sendEvent(n);
|
|
2045
2052
|
}
|
|
2046
|
-
async function
|
|
2047
|
-
|
|
2053
|
+
async function Nr(e, t) {
|
|
2054
|
+
N(), Oe(), Pe();
|
|
2048
2055
|
const n = {
|
|
2049
2056
|
name: "pageview",
|
|
2050
2057
|
args: {
|
|
@@ -2053,19 +2060,19 @@ async function Or(e, t) {
|
|
|
2053
2060
|
},
|
|
2054
2061
|
metadata: {
|
|
2055
2062
|
tracking_id: Ae(),
|
|
2056
|
-
referrer_url:
|
|
2057
|
-
source:
|
|
2058
|
-
affiliate_id:
|
|
2059
|
-
referrer:
|
|
2060
|
-
category:
|
|
2061
|
-
title:
|
|
2062
|
-
tag:
|
|
2063
|
+
referrer_url: gr(),
|
|
2064
|
+
source: wr(),
|
|
2065
|
+
affiliate_id: Qe() ?? void 0,
|
|
2066
|
+
referrer: Qe() ?? void 0,
|
|
2067
|
+
category: br() ?? void 0,
|
|
2068
|
+
title: Er() ?? void 0,
|
|
2069
|
+
tag: Sr() ?? void 0
|
|
2063
2070
|
}
|
|
2064
2071
|
};
|
|
2065
|
-
await
|
|
2072
|
+
await le.sendEvent(n, t);
|
|
2066
2073
|
}
|
|
2067
|
-
async function
|
|
2068
|
-
|
|
2074
|
+
async function xr(e, t) {
|
|
2075
|
+
N(), Oe(), Pe();
|
|
2069
2076
|
const n = {
|
|
2070
2077
|
name: "connect_wallet",
|
|
2071
2078
|
user_address: e.address,
|
|
@@ -2078,108 +2085,108 @@ async function _r(e, t) {
|
|
|
2078
2085
|
tracking_id: Ae()
|
|
2079
2086
|
}
|
|
2080
2087
|
};
|
|
2081
|
-
e != null && e.signature && (n.signature = e == null ? void 0 : e.signature, n.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (n.account_chain_id = e.accountChainId), await
|
|
2088
|
+
e != null && e.signature && (n.signature = e == null ? void 0 : e.signature, n.signature_message = e == null ? void 0 : e.message), e != null && e.accountChainId && (n.account_chain_id = e.accountChainId), await le.sendEvent(n, t);
|
|
2082
2089
|
}
|
|
2083
|
-
async function
|
|
2084
|
-
|
|
2090
|
+
async function Ur(e) {
|
|
2091
|
+
N(), await $.create(e.address, e.blockchain, e.code, e.signature, e.accountChainId);
|
|
2085
2092
|
}
|
|
2086
|
-
async function
|
|
2087
|
-
|
|
2093
|
+
async function Lr(e) {
|
|
2094
|
+
N(), await $.update(e.address, e.blockchain, e.code, e.signature, e.accountChainId);
|
|
2088
2095
|
}
|
|
2089
|
-
async function
|
|
2090
|
-
return
|
|
2096
|
+
async function Fr(e, t) {
|
|
2097
|
+
return N(), await $.getCode(e, t);
|
|
2091
2098
|
}
|
|
2092
|
-
async function
|
|
2093
|
-
return
|
|
2099
|
+
async function Dr(e) {
|
|
2100
|
+
return N(), await $.isCodeFree(e);
|
|
2094
2101
|
}
|
|
2095
|
-
async function
|
|
2096
|
-
|
|
2097
|
-
const s = await
|
|
2102
|
+
async function kr(e, t, n, r) {
|
|
2103
|
+
N();
|
|
2104
|
+
const s = await $.getCode(t, n), o = new URLSearchParams({
|
|
2098
2105
|
af: s ?? t
|
|
2099
2106
|
});
|
|
2100
2107
|
return r != null && r.title && o.append("af_title", r.title), r != null && r.format && o.append("af_format", r.format), r != null && r.place && o.append("af_place", r.place), `${e}?${o.toString()}`;
|
|
2101
2108
|
}
|
|
2102
|
-
function Fr(e) {
|
|
2103
|
-
return ae.getPayoutsLeaderboard(e);
|
|
2104
|
-
}
|
|
2105
2109
|
function Br(e) {
|
|
2106
|
-
return
|
|
2107
|
-
}
|
|
2108
|
-
function kr(e) {
|
|
2109
|
-
return ae.getReferredUsersLeaderboard(e);
|
|
2110
|
-
}
|
|
2111
|
-
function vr(e) {
|
|
2112
|
-
return $.getVolumeLeaderboard(e);
|
|
2110
|
+
return fe.getPayoutsLeaderboard(e);
|
|
2113
2111
|
}
|
|
2114
2112
|
function qr(e) {
|
|
2115
|
-
return
|
|
2113
|
+
return fe.getPointsLeaderboard(e);
|
|
2116
2114
|
}
|
|
2117
2115
|
function Ir(e) {
|
|
2118
|
-
return
|
|
2116
|
+
return fe.getReferredUsersLeaderboard(e);
|
|
2117
|
+
}
|
|
2118
|
+
function vr(e) {
|
|
2119
|
+
return H.getVolumeLeaderboard(e);
|
|
2119
2120
|
}
|
|
2120
2121
|
function jr(e) {
|
|
2121
|
-
return
|
|
2122
|
+
return H.getUserPayoutsByConversion(e);
|
|
2123
|
+
}
|
|
2124
|
+
function Mr(e) {
|
|
2125
|
+
return H.getUserPointsByConversion(e);
|
|
2126
|
+
}
|
|
2127
|
+
function $r(e) {
|
|
2128
|
+
return H.getUserPayoutMovements(e);
|
|
2122
2129
|
}
|
|
2123
2130
|
function Hr(e) {
|
|
2124
|
-
return
|
|
2131
|
+
return H.getUserPointsMovements(e);
|
|
2125
2132
|
}
|
|
2126
|
-
async function
|
|
2127
|
-
return
|
|
2133
|
+
async function Vr(e) {
|
|
2134
|
+
return N(), St.getAll(e);
|
|
2128
2135
|
}
|
|
2129
|
-
async function
|
|
2130
|
-
return
|
|
2136
|
+
async function Kr(e) {
|
|
2137
|
+
return N(), Ct.getUserAffiliates(e);
|
|
2131
2138
|
}
|
|
2132
2139
|
async function zr(e) {
|
|
2133
|
-
return
|
|
2140
|
+
return N(), Rt.getUserAudiences(e);
|
|
2134
2141
|
}
|
|
2135
|
-
function
|
|
2142
|
+
function Oe() {
|
|
2136
2143
|
if (typeof window > "u" || typeof document > "u")
|
|
2137
2144
|
throw new Error("Fuul SDK: Browser context required");
|
|
2138
2145
|
}
|
|
2139
|
-
function
|
|
2146
|
+
function Pe() {
|
|
2140
2147
|
if (navigator.webdriver)
|
|
2141
2148
|
throw new Error("Fuul SDK: You are using a browser automation tool");
|
|
2142
2149
|
}
|
|
2143
|
-
function
|
|
2144
|
-
if (!
|
|
2150
|
+
function Jr() {
|
|
2151
|
+
if (!_e)
|
|
2145
2152
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2146
2153
|
}
|
|
2147
|
-
function
|
|
2148
|
-
return new
|
|
2154
|
+
function Wr(e, t) {
|
|
2155
|
+
return new dr({
|
|
2149
2156
|
baseURL: e,
|
|
2150
2157
|
timeout: 3e4,
|
|
2151
|
-
apiKey:
|
|
2158
|
+
apiKey: _e,
|
|
2152
2159
|
queryParams: t
|
|
2153
2160
|
});
|
|
2154
2161
|
}
|
|
2155
|
-
const
|
|
2156
|
-
init:
|
|
2162
|
+
const ps = {
|
|
2163
|
+
init: Or,
|
|
2157
2164
|
sendEvent: Pr,
|
|
2158
|
-
sendPageview:
|
|
2159
|
-
sendConnectWallet:
|
|
2160
|
-
generateTrackingLink:
|
|
2161
|
-
getConversions:
|
|
2162
|
-
createAffiliateCode:
|
|
2163
|
-
updateAffiliateCode:
|
|
2164
|
-
getAffiliateCode:
|
|
2165
|
-
isAffiliateCodeFree:
|
|
2166
|
-
getPayoutsLeaderboard:
|
|
2167
|
-
getPointsLeaderboard:
|
|
2168
|
-
getReferredUsersLeaderboard:
|
|
2165
|
+
sendPageview: Nr,
|
|
2166
|
+
sendConnectWallet: xr,
|
|
2167
|
+
generateTrackingLink: kr,
|
|
2168
|
+
getConversions: Vr,
|
|
2169
|
+
createAffiliateCode: Ur,
|
|
2170
|
+
updateAffiliateCode: Lr,
|
|
2171
|
+
getAffiliateCode: Fr,
|
|
2172
|
+
isAffiliateCodeFree: Dr,
|
|
2173
|
+
getPayoutsLeaderboard: Br,
|
|
2174
|
+
getPointsLeaderboard: qr,
|
|
2175
|
+
getReferredUsersLeaderboard: Ir,
|
|
2169
2176
|
getUserAudiences: zr,
|
|
2170
|
-
getUserPayoutsByConversion:
|
|
2171
|
-
getUserPointsByConversion:
|
|
2177
|
+
getUserPayoutsByConversion: jr,
|
|
2178
|
+
getUserPointsByConversion: Mr,
|
|
2172
2179
|
getUserPointsMovements: Hr,
|
|
2173
|
-
getUserPayoutMovements:
|
|
2174
|
-
getUserAffiliates:
|
|
2180
|
+
getUserPayoutMovements: $r,
|
|
2181
|
+
getUserAffiliates: Kr,
|
|
2175
2182
|
getVolumeLeaderboard: vr
|
|
2176
2183
|
};
|
|
2177
|
-
var
|
|
2184
|
+
var Qr = /* @__PURE__ */ ((e) => (e.Ethereum = "ethereum", e.Solana = "solana", e))(Qr || {});
|
|
2178
2185
|
export {
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2186
|
+
Ve as AddressInUseError,
|
|
2187
|
+
Qr as BlockchainType,
|
|
2188
|
+
Ke as CodeInUseError,
|
|
2189
|
+
ps as Fuul,
|
|
2190
|
+
ze as InvalidSignatureError,
|
|
2191
|
+
He as ValidationError
|
|
2185
2192
|
};
|