@fuul/sdk 7.0.5 → 7.0.7
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/HttpClient.d.ts +1 -0
- package/dist/HttpClient.d.ts.map +1 -1
- package/dist/core.d.ts +79 -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 +852 -750
- package/dist/index.umd.js +6 -6
- package/dist/invite-codes/InviteCodeService.d.ts +17 -0
- package/dist/invite-codes/InviteCodeService.d.ts.map +1 -0
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +44 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
var Tt = Object.defineProperty;
|
|
2
2
|
var At = (e, t, n) => t in e ? Tt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
4
|
-
function
|
|
3
|
+
var C = (e, t, n) => At(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
function Ye(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: Pt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: ie, toStringTag: Ge } = Symbol, oe = /* @__PURE__ */ ((e) => (t) => {
|
|
10
|
+
const n = Pt.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)), N = (e) => (e = e.toLowerCase(), (t) => oe(t) === e), ae = (e) => (t) => typeof t === e, { isArray: j } = Array, J = ae("undefined");
|
|
13
|
+
function W(e) {
|
|
14
|
+
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const Ze = N("ArrayBuffer");
|
|
17
17
|
function Ot(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 && Ze(e.buffer), t;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const Nt = ae("string"), P = ae("function"), et = ae("number"), Q = (e) => e !== null && typeof e == "object", xt = (e) => e === !0 || e === !1, ee = (e) => {
|
|
22
22
|
if (oe(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
|
-
const t =
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
26
|
-
},
|
|
27
|
-
if (!
|
|
24
|
+
const t = _e(e);
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ge in e) && !(ie in e);
|
|
26
|
+
}, Ut = (e) => {
|
|
27
|
+
if (!Q(e) || W(e))
|
|
28
28
|
return !1;
|
|
29
29
|
try {
|
|
30
30
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
31
31
|
} catch {
|
|
32
32
|
return !1;
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, Lt = N("Date"), Ft = N("File"), Dt = N("Blob"), kt = N("FileList"), vt = (e) => Q(e) && P(e.pipe), It = (e) => {
|
|
35
35
|
let t;
|
|
36
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
37
|
-
t === "object" &&
|
|
38
|
-
},
|
|
39
|
-
function
|
|
36
|
+
return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = oe(e)) === "formdata" || // detect form-data instance
|
|
37
|
+
t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
|
|
38
|
+
}, Bt = N("URLSearchParams"), [qt, jt, Mt, $t] = ["ReadableStream", "Request", "Response", "Headers"].map(N), Ht = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
39
|
+
function X(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
40
40
|
if (e === null || typeof e > "u")
|
|
41
41
|
return;
|
|
42
42
|
let r, s;
|
|
@@ -44,16 +44,16 @@ function Q(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
44
44
|
for (r = 0, s = e.length; r < s; r++)
|
|
45
45
|
t.call(null, e[r], r, e);
|
|
46
46
|
else {
|
|
47
|
-
if (
|
|
47
|
+
if (W(e))
|
|
48
48
|
return;
|
|
49
|
-
const
|
|
49
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
50
50
|
let c;
|
|
51
|
-
for (r = 0; r <
|
|
52
|
-
c =
|
|
51
|
+
for (r = 0; r < o; r++)
|
|
52
|
+
c = i[r], t.call(null, e[c], c, e);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
if (
|
|
55
|
+
function tt(e, t) {
|
|
56
|
+
if (W(e))
|
|
57
57
|
return null;
|
|
58
58
|
t = t.toLowerCase();
|
|
59
59
|
const n = Object.keys(e);
|
|
@@ -63,75 +63,75 @@ function et(e, t) {
|
|
|
63
63
|
return s;
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
function
|
|
68
|
-
const { caseless: e } =
|
|
69
|
-
const
|
|
70
|
-
|
|
66
|
+
const v = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nt = (e) => !J(e) && e !== v;
|
|
67
|
+
function ye() {
|
|
68
|
+
const { caseless: e } = nt(this) && this || {}, t = {}, n = (r, s) => {
|
|
69
|
+
const i = e && tt(t, s) || s;
|
|
70
|
+
ee(t[i]) && ee(r) ? t[i] = ye(t[i], r) : ee(r) ? t[i] = ye({}, r) : j(r) ? t[i] = r.slice() : t[i] = r;
|
|
71
71
|
};
|
|
72
72
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
73
|
-
arguments[r] &&
|
|
73
|
+
arguments[r] && X(arguments[r], n);
|
|
74
74
|
return t;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
77
|
-
n &&
|
|
78
|
-
}, { allOwnKeys: r }), e),
|
|
76
|
+
const Kt = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, i) => {
|
|
77
|
+
n && P(s) ? e[i] = Ye(s, n) : e[i] = s;
|
|
78
|
+
}, { allOwnKeys: r }), e), Vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zt = (e, t, n, r) => {
|
|
79
79
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
80
80
|
value: t.prototype
|
|
81
81
|
}), n && Object.assign(e.prototype, n);
|
|
82
|
-
},
|
|
83
|
-
let s,
|
|
82
|
+
}, Jt = (e, t, n, r) => {
|
|
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
|
-
|
|
89
|
-
e = n !== !1 &&
|
|
87
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
88
|
+
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
89
|
+
e = n !== !1 && _e(e);
|
|
90
90
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
91
91
|
return t;
|
|
92
|
-
},
|
|
92
|
+
}, Wt = (e, t, n) => {
|
|
93
93
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
94
94
|
const r = e.indexOf(t, n);
|
|
95
95
|
return r !== -1 && r === n;
|
|
96
|
-
},
|
|
96
|
+
}, Qt = (e) => {
|
|
97
97
|
if (!e) return null;
|
|
98
98
|
if (j(e)) return e;
|
|
99
99
|
let t = e.length;
|
|
100
|
-
if (!
|
|
100
|
+
if (!et(t)) return null;
|
|
101
101
|
const n = new Array(t);
|
|
102
102
|
for (; t-- > 0; )
|
|
103
103
|
n[t] = e[t];
|
|
104
104
|
return n;
|
|
105
|
-
},
|
|
106
|
-
const r = (e && e[
|
|
105
|
+
}, Xt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), Yt = (e, t) => {
|
|
106
|
+
const r = (e && e[ie]).call(e);
|
|
107
107
|
let s;
|
|
108
108
|
for (; (s = r.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
|
+
}, Gt = (e, t) => {
|
|
113
113
|
let n;
|
|
114
114
|
const r = [];
|
|
115
115
|
for (; (n = e.exec(t)) !== null; )
|
|
116
116
|
r.push(n);
|
|
117
117
|
return r;
|
|
118
|
-
},
|
|
118
|
+
}, Zt = N("HTMLFormElement"), en = (e) => e.toLowerCase().replace(
|
|
119
119
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
120
120
|
function(n, r, s) {
|
|
121
121
|
return r.toUpperCase() + s;
|
|
122
122
|
}
|
|
123
|
-
),
|
|
123
|
+
), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), tn = N("RegExp"), rt = (e, t) => {
|
|
124
124
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
125
|
-
|
|
126
|
-
let
|
|
127
|
-
(
|
|
125
|
+
X(n, (s, i) => {
|
|
126
|
+
let o;
|
|
127
|
+
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
128
128
|
}), Object.defineProperties(e, r);
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
if (
|
|
129
|
+
}, nn = (e) => {
|
|
130
|
+
rt(e, (t, n) => {
|
|
131
|
+
if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
132
132
|
return !1;
|
|
133
133
|
const r = e[n];
|
|
134
|
-
if (
|
|
134
|
+
if (P(r)) {
|
|
135
135
|
if (t.enumerable = !1, "writable" in t) {
|
|
136
136
|
t.writable = !1;
|
|
137
137
|
return;
|
|
@@ -141,102 +141,102 @@ const Ht = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, o) => {
|
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
},
|
|
144
|
+
}, rn = (e, t) => {
|
|
145
145
|
const n = {}, r = (s) => {
|
|
146
|
-
s.forEach((
|
|
147
|
-
n[
|
|
146
|
+
s.forEach((i) => {
|
|
147
|
+
n[i] = !0;
|
|
148
148
|
});
|
|
149
149
|
};
|
|
150
150
|
return j(e) ? r(e) : r(String(e).split(t)), n;
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
function
|
|
154
|
-
return !!(e &&
|
|
151
|
+
}, sn = () => {
|
|
152
|
+
}, on = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
153
|
+
function an(e) {
|
|
154
|
+
return !!(e && P(e.append) && e[Ge] === "FormData" && e[ie]);
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const cn = (e) => {
|
|
157
157
|
const t = new Array(10), n = (r, s) => {
|
|
158
|
-
if (
|
|
158
|
+
if (Q(r)) {
|
|
159
159
|
if (t.indexOf(r) >= 0)
|
|
160
160
|
return;
|
|
161
|
-
if (
|
|
161
|
+
if (W(r))
|
|
162
162
|
return r;
|
|
163
163
|
if (!("toJSON" in r)) {
|
|
164
164
|
t[s] = r;
|
|
165
|
-
const
|
|
166
|
-
return
|
|
167
|
-
const
|
|
168
|
-
!
|
|
169
|
-
}), t[s] = void 0,
|
|
165
|
+
const i = j(r) ? [] : {};
|
|
166
|
+
return X(r, (o, c) => {
|
|
167
|
+
const d = n(o, s + 1);
|
|
168
|
+
!J(d) && (i[c] = d);
|
|
169
|
+
}), t[s] = void 0, i;
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
return r;
|
|
173
173
|
};
|
|
174
174
|
return n(e, 0);
|
|
175
|
-
},
|
|
176
|
-
s ===
|
|
175
|
+
}, un = N("AsyncFunction"), ln = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), st = ((e, t) => e ? setImmediate : t ? ((n, r) => (v.addEventListener("message", ({ source: s, data: i }) => {
|
|
176
|
+
s === v && i === n && r.length && r.shift()();
|
|
177
177
|
}, !1), (s) => {
|
|
178
|
-
r.push(s),
|
|
178
|
+
r.push(s), v.postMessage(n, "*");
|
|
179
179
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
180
180
|
typeof setImmediate == "function",
|
|
181
|
-
|
|
182
|
-
),
|
|
181
|
+
P(v.postMessage)
|
|
182
|
+
), dn = typeof queueMicrotask < "u" ? queueMicrotask.bind(v) : typeof process < "u" && process.nextTick || st, fn = (e) => e != null && P(e[ie]), a = {
|
|
183
183
|
isArray: j,
|
|
184
|
-
isArrayBuffer:
|
|
185
|
-
isBuffer:
|
|
186
|
-
isFormData:
|
|
184
|
+
isArrayBuffer: Ze,
|
|
185
|
+
isBuffer: W,
|
|
186
|
+
isFormData: It,
|
|
187
187
|
isArrayBufferView: Ot,
|
|
188
|
-
isString:
|
|
189
|
-
isNumber:
|
|
190
|
-
isBoolean:
|
|
191
|
-
isObject:
|
|
192
|
-
isPlainObject:
|
|
193
|
-
isEmptyObject:
|
|
194
|
-
isReadableStream:
|
|
195
|
-
isRequest:
|
|
196
|
-
isResponse:
|
|
197
|
-
isHeaders:
|
|
198
|
-
isUndefined:
|
|
199
|
-
isDate:
|
|
200
|
-
isFile:
|
|
201
|
-
isBlob:
|
|
202
|
-
isRegExp:
|
|
203
|
-
isFunction:
|
|
204
|
-
isStream:
|
|
205
|
-
isURLSearchParams:
|
|
206
|
-
isTypedArray:
|
|
207
|
-
isFileList:
|
|
208
|
-
forEach:
|
|
209
|
-
merge:
|
|
210
|
-
extend:
|
|
211
|
-
trim:
|
|
212
|
-
stripBOM:
|
|
213
|
-
inherits:
|
|
214
|
-
toFlatObject:
|
|
188
|
+
isString: Nt,
|
|
189
|
+
isNumber: et,
|
|
190
|
+
isBoolean: xt,
|
|
191
|
+
isObject: Q,
|
|
192
|
+
isPlainObject: ee,
|
|
193
|
+
isEmptyObject: Ut,
|
|
194
|
+
isReadableStream: qt,
|
|
195
|
+
isRequest: jt,
|
|
196
|
+
isResponse: Mt,
|
|
197
|
+
isHeaders: $t,
|
|
198
|
+
isUndefined: J,
|
|
199
|
+
isDate: Lt,
|
|
200
|
+
isFile: Ft,
|
|
201
|
+
isBlob: Dt,
|
|
202
|
+
isRegExp: tn,
|
|
203
|
+
isFunction: P,
|
|
204
|
+
isStream: vt,
|
|
205
|
+
isURLSearchParams: Bt,
|
|
206
|
+
isTypedArray: Xt,
|
|
207
|
+
isFileList: kt,
|
|
208
|
+
forEach: X,
|
|
209
|
+
merge: ye,
|
|
210
|
+
extend: Kt,
|
|
211
|
+
trim: Ht,
|
|
212
|
+
stripBOM: Vt,
|
|
213
|
+
inherits: zt,
|
|
214
|
+
toFlatObject: Jt,
|
|
215
215
|
kindOf: oe,
|
|
216
|
-
kindOfTest:
|
|
217
|
-
endsWith:
|
|
218
|
-
toArray:
|
|
219
|
-
forEachEntry:
|
|
220
|
-
matchAll:
|
|
221
|
-
isHTMLForm:
|
|
222
|
-
hasOwnProperty:
|
|
223
|
-
hasOwnProp:
|
|
216
|
+
kindOfTest: N,
|
|
217
|
+
endsWith: Wt,
|
|
218
|
+
toArray: Qt,
|
|
219
|
+
forEachEntry: Yt,
|
|
220
|
+
matchAll: Gt,
|
|
221
|
+
isHTMLForm: Zt,
|
|
222
|
+
hasOwnProperty: Ue,
|
|
223
|
+
hasOwnProp: Ue,
|
|
224
224
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
225
|
-
reduceDescriptors:
|
|
226
|
-
freezeMethods:
|
|
227
|
-
toObjectSet:
|
|
228
|
-
toCamelCase:
|
|
229
|
-
noop:
|
|
230
|
-
toFiniteNumber:
|
|
231
|
-
findKey:
|
|
232
|
-
global:
|
|
233
|
-
isContextDefined:
|
|
234
|
-
isSpecCompliantForm:
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
238
|
-
setImmediate:
|
|
239
|
-
asap:
|
|
225
|
+
reduceDescriptors: rt,
|
|
226
|
+
freezeMethods: nn,
|
|
227
|
+
toObjectSet: rn,
|
|
228
|
+
toCamelCase: en,
|
|
229
|
+
noop: sn,
|
|
230
|
+
toFiniteNumber: on,
|
|
231
|
+
findKey: tt,
|
|
232
|
+
global: v,
|
|
233
|
+
isContextDefined: nt,
|
|
234
|
+
isSpecCompliantForm: an,
|
|
235
|
+
toJSONObject: cn,
|
|
236
|
+
isAsyncFn: un,
|
|
237
|
+
isThenable: ln,
|
|
238
|
+
setImmediate: st,
|
|
239
|
+
asap: dn,
|
|
240
240
|
isIterable: fn
|
|
241
241
|
};
|
|
242
242
|
function m(e, t, n, r, s) {
|
|
@@ -263,7 +263,7 @@ a.inherits(m, Error, {
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
-
const
|
|
266
|
+
const it = m.prototype, ot = {};
|
|
267
267
|
[
|
|
268
268
|
"ERR_BAD_OPTION_VALUE",
|
|
269
269
|
"ERR_BAD_OPTION",
|
|
@@ -282,32 +282,32 @@ const st = m.prototype, ot = {};
|
|
|
282
282
|
ot[e] = { value: e };
|
|
283
283
|
});
|
|
284
284
|
Object.defineProperties(m, ot);
|
|
285
|
-
Object.defineProperty(
|
|
286
|
-
m.from = (e, t, n, r, s,
|
|
287
|
-
const
|
|
288
|
-
return a.toFlatObject(e,
|
|
289
|
-
return
|
|
290
|
-
}, (c) => c !== "isAxiosError"), m.call(
|
|
285
|
+
Object.defineProperty(it, "isAxiosError", { value: !0 });
|
|
286
|
+
m.from = (e, t, n, r, s, i) => {
|
|
287
|
+
const o = Object.create(it);
|
|
288
|
+
return a.toFlatObject(e, o, function(d) {
|
|
289
|
+
return d !== Error.prototype;
|
|
290
|
+
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
293
|
-
function
|
|
292
|
+
const hn = null;
|
|
293
|
+
function ge(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function at(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 Le(e, t, n) {
|
|
300
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
301
|
+
return s = at(s), !n && i ? "[" + s + "]" : s;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
return a.isArray(e) && !e.some(
|
|
304
|
+
function pn(e) {
|
|
305
|
+
return a.isArray(e) && !e.some(ge);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const mn = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
|
-
function
|
|
310
|
+
function ce(e, t, n) {
|
|
311
311
|
if (!a.isObject(e))
|
|
312
312
|
throw new TypeError("target must be an object");
|
|
313
313
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -317,7 +317,7 @@ function ae(e, t, n) {
|
|
|
317
317
|
}, !1, function(y, p) {
|
|
318
318
|
return !a.isUndefined(p[y]);
|
|
319
319
|
});
|
|
320
|
-
const r = n.metaTokens, s = n.visitor || l,
|
|
320
|
+
const r = n.metaTokens, s = n.visitor || l, i = n.dots, o = n.indexes, d = (n.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) {
|
|
@@ -326,36 +326,36 @@ function ae(e, t, n) {
|
|
|
326
326
|
return h.toISOString();
|
|
327
327
|
if (a.isBoolean(h))
|
|
328
328
|
return h.toString();
|
|
329
|
-
if (!
|
|
329
|
+
if (!d && a.isBlob(h))
|
|
330
330
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
331
|
-
return a.isArrayBuffer(h) || a.isTypedArray(h) ?
|
|
331
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
332
332
|
}
|
|
333
333
|
function l(h, y, p) {
|
|
334
334
|
let b = h;
|
|
335
335
|
if (h && !p && typeof h == "object") {
|
|
336
336
|
if (a.endsWith(y, "{}"))
|
|
337
337
|
y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
338
|
-
else if (a.isArray(h) &&
|
|
339
|
-
return y =
|
|
340
|
-
!(a.isUndefined(
|
|
338
|
+
else if (a.isArray(h) && pn(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (b = a.toArray(h)))
|
|
339
|
+
return y = at(y), b.forEach(function(_, U) {
|
|
340
|
+
!(a.isUndefined(_) || _ === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
|
|
343
|
-
u(
|
|
342
|
+
o === !0 ? Le([y], U, i) : o === null ? y : y + "[]",
|
|
343
|
+
u(_)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return ge(h) ? !0 : (t.append(Le(p, y, i), u(h)), !1);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const f = [], g = Object.assign(mn, {
|
|
350
350
|
defaultVisitor: l,
|
|
351
351
|
convertValue: u,
|
|
352
|
-
isVisitable:
|
|
352
|
+
isVisitable: ge
|
|
353
353
|
});
|
|
354
354
|
function w(h, y) {
|
|
355
355
|
if (!a.isUndefined(h)) {
|
|
356
|
-
if (
|
|
356
|
+
if (f.indexOf(h) !== -1)
|
|
357
357
|
throw Error("Circular reference detected in " + y.join("."));
|
|
358
|
-
|
|
358
|
+
f.push(h), a.forEach(h, function(b, S) {
|
|
359
359
|
(!(a.isUndefined(b) || b === null) && s.call(
|
|
360
360
|
t,
|
|
361
361
|
b,
|
|
@@ -363,14 +363,14 @@ function ae(e, t, n) {
|
|
|
363
363
|
y,
|
|
364
364
|
g
|
|
365
365
|
)) === !0 && w(b, y ? y.concat(S) : [S]);
|
|
366
|
-
}),
|
|
366
|
+
}), f.pop();
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
if (!a.isObject(e))
|
|
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",
|
|
@@ -385,39 +385,39 @@ function Le(e) {
|
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
387
|
function Re(e, t) {
|
|
388
|
-
this._pairs = [], e &&
|
|
388
|
+
this._pairs = [], e && ce(e, this, t);
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const ct = Re.prototype;
|
|
391
|
+
ct.append = function(t, n) {
|
|
392
392
|
this._pairs.push([t, n]);
|
|
393
393
|
};
|
|
394
|
-
|
|
394
|
+
ct.toString = function(t) {
|
|
395
395
|
const n = t ? function(r) {
|
|
396
|
-
return t.call(this, r,
|
|
397
|
-
} :
|
|
396
|
+
return t.call(this, r, Fe);
|
|
397
|
+
} : Fe;
|
|
398
398
|
return this._pairs.map(function(s) {
|
|
399
399
|
return n(s[0]) + "=" + n(s[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function yn(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 ut(e, t, n) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
|
-
const r = n && n.encode ||
|
|
408
|
+
const r = n && n.encode || yn;
|
|
409
409
|
a.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
412
412
|
const s = n && n.serialize;
|
|
413
|
-
let
|
|
414
|
-
if (s ?
|
|
415
|
-
const
|
|
416
|
-
|
|
413
|
+
let i;
|
|
414
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new Re(t, n).toString(r), 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 De {
|
|
421
421
|
constructor() {
|
|
422
422
|
this.handlers = [];
|
|
423
423
|
}
|
|
@@ -471,34 +471,34 @@ class Fe {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const lt = {
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, gn = typeof URLSearchParams < "u" ? URLSearchParams : Re, wn = typeof FormData < "u" ? FormData : null, bn = typeof Blob < "u" ? Blob : null, En = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: gn,
|
|
482
|
+
FormData: wn,
|
|
483
|
+
Blob: bn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
}, Te = typeof window < "u" && typeof document < "u",
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, Te = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Sn = Te && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), Cn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", _n = Te && window.location.href || "http://localhost", Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
489
|
hasBrowserEnv: Te,
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
492
|
-
navigator:
|
|
493
|
-
origin:
|
|
494
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
490
|
+
hasStandardBrowserEnv: Sn,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: Cn,
|
|
492
|
+
navigator: we,
|
|
493
|
+
origin: _n
|
|
494
|
+
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
495
495
|
...Rn,
|
|
496
|
-
...
|
|
496
|
+
...En
|
|
497
497
|
};
|
|
498
498
|
function Tn(e, t) {
|
|
499
|
-
return
|
|
500
|
-
visitor: function(n, r, s,
|
|
501
|
-
return
|
|
499
|
+
return ce(e, new R.classes.URLSearchParams(), {
|
|
500
|
+
visitor: function(n, r, s, i) {
|
|
501
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
502
502
|
},
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
@@ -506,21 +506,21 @@ function Tn(e, t) {
|
|
|
506
506
|
function An(e) {
|
|
507
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Pn(e) {
|
|
510
510
|
const t = {}, n = Object.keys(e);
|
|
511
511
|
let r;
|
|
512
512
|
const s = n.length;
|
|
513
|
-
let
|
|
513
|
+
let i;
|
|
514
514
|
for (r = 0; r < s; r++)
|
|
515
|
-
|
|
515
|
+
i = n[r], t[i] = e[i];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
519
|
-
function t(n, r, s,
|
|
520
|
-
let
|
|
521
|
-
if (
|
|
522
|
-
const c = Number.isFinite(+
|
|
523
|
-
return
|
|
518
|
+
function dt(e) {
|
|
519
|
+
function t(n, r, s, i) {
|
|
520
|
+
let o = n[i++];
|
|
521
|
+
if (o === "__proto__") return !0;
|
|
522
|
+
const c = Number.isFinite(+o), d = i >= n.length;
|
|
523
|
+
return o = !o && a.isArray(s) ? s.length : o, d ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Pn(s[o])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
526
|
const n = {};
|
|
@@ -540,13 +540,13 @@ function On(e, t, n) {
|
|
|
540
540
|
}
|
|
541
541
|
return (0, JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
|
-
const
|
|
544
|
-
transitional:
|
|
543
|
+
const Y = {
|
|
544
|
+
transitional: lt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(t, n) {
|
|
547
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1,
|
|
548
|
-
if (
|
|
549
|
-
return s ? JSON.stringify(
|
|
547
|
+
const r = n.getContentType() || "", s = r.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(dt(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,30 +554,30 @@ const X = {
|
|
|
554
554
|
if (a.isURLSearchParams(t))
|
|
555
555
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
556
556
|
let c;
|
|
557
|
-
if (
|
|
557
|
+
if (i) {
|
|
558
558
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
559
|
return Tn(t, this.formSerializer).toString();
|
|
560
560
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
561
|
-
const
|
|
562
|
-
return
|
|
561
|
+
const d = this.env && this.env.FormData;
|
|
562
|
+
return ce(
|
|
563
563
|
c ? { "files[]": t } : t,
|
|
564
|
-
|
|
564
|
+
d && new d(),
|
|
565
565
|
this.formSerializer
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return
|
|
569
|
+
return i || s ? (n.setContentType("application/json", !1), On(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
|
-
const n = this.transitional ||
|
|
572
|
+
const n = this.transitional || Y.transitional, r = n && n.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) && (r && !this.responseType || s)) {
|
|
576
|
-
const
|
|
576
|
+
const o = !(n && n.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
|
}
|
|
@@ -593,8 +593,8 @@ const X = {
|
|
|
593
593
|
maxContentLength: -1,
|
|
594
594
|
maxBodyLength: -1,
|
|
595
595
|
env: {
|
|
596
|
-
FormData:
|
|
597
|
-
Blob:
|
|
596
|
+
FormData: R.classes.FormData,
|
|
597
|
+
Blob: R.classes.Blob
|
|
598
598
|
},
|
|
599
599
|
validateStatus: function(t) {
|
|
600
600
|
return t >= 200 && t < 300;
|
|
@@ -607,9 +607,9 @@ const X = {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
|
-
|
|
610
|
+
Y.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const Nn = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,29 +627,29 @@ const Pn = a.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), xn = (e) => {
|
|
631
631
|
const t = {};
|
|
632
632
|
let n, r, s;
|
|
633
633
|
return e && e.split(`
|
|
634
|
-
`).forEach(function(
|
|
635
|
-
s =
|
|
634
|
+
`).forEach(function(o) {
|
|
635
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Nn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
636
636
|
}), t;
|
|
637
|
-
},
|
|
638
|
-
function
|
|
637
|
+
}, ke = Symbol("internals");
|
|
638
|
+
function V(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
641
|
+
function te(e) {
|
|
642
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(te) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Un(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let r;
|
|
647
647
|
for (; r = n.exec(e); )
|
|
648
648
|
t[r[1]] = r[2];
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
function
|
|
651
|
+
const Ln = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
|
+
function he(e, t, n, r, s) {
|
|
653
653
|
if (a.isFunction(r))
|
|
654
654
|
return r.call(this, t, n);
|
|
655
655
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -659,15 +659,15 @@ function de(e, t, n, r, s) {
|
|
|
659
659
|
return r.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Fn(e) {
|
|
663
663
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Dn(e, t) {
|
|
666
666
|
const n = a.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((r) => {
|
|
668
668
|
Object.defineProperty(e, r + n, {
|
|
669
|
-
value: function(s,
|
|
670
|
-
return this[r].call(this, t, s,
|
|
669
|
+
value: function(s, i, o) {
|
|
670
|
+
return this[r].call(this, t, s, i, o);
|
|
671
671
|
},
|
|
672
672
|
configurable: !0
|
|
673
673
|
});
|
|
@@ -679,39 +679,39 @@ let O = class {
|
|
|
679
679
|
}
|
|
680
680
|
set(t, n, r) {
|
|
681
681
|
const s = this;
|
|
682
|
-
function
|
|
683
|
-
const l =
|
|
682
|
+
function i(c, d, u) {
|
|
683
|
+
const l = V(d);
|
|
684
684
|
if (!l)
|
|
685
685
|
throw new Error("header name must be a non-empty string");
|
|
686
|
-
const
|
|
687
|
-
(!
|
|
686
|
+
const f = a.findKey(s, l);
|
|
687
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = te(c));
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const o = (c, d) => a.forEach(c, (u, l) => i(u, l, d));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
|
-
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
693
|
-
|
|
691
|
+
o(t, n);
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !Ln(t))
|
|
693
|
+
o(xn(t), n);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
|
-
let c = {},
|
|
695
|
+
let c = {}, d, u;
|
|
696
696
|
for (const l of t) {
|
|
697
697
|
if (!a.isArray(l))
|
|
698
698
|
throw TypeError("Object iterator must return a key-value pair");
|
|
699
|
-
c[u = l[0]] = (
|
|
699
|
+
c[u = l[0]] = (d = c[u]) ? a.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
|
|
700
700
|
}
|
|
701
|
-
|
|
701
|
+
o(c, n);
|
|
702
702
|
} else
|
|
703
|
-
t != null &&
|
|
703
|
+
t != null && i(n, t, r);
|
|
704
704
|
return this;
|
|
705
705
|
}
|
|
706
706
|
get(t, n) {
|
|
707
|
-
if (t =
|
|
707
|
+
if (t = V(t), t) {
|
|
708
708
|
const r = a.findKey(this, t);
|
|
709
709
|
if (r) {
|
|
710
710
|
const s = this[r];
|
|
711
711
|
if (!n)
|
|
712
712
|
return s;
|
|
713
713
|
if (n === !0)
|
|
714
|
-
return
|
|
714
|
+
return Un(s);
|
|
715
715
|
if (a.isFunction(n))
|
|
716
716
|
return n.call(this, s, r);
|
|
717
717
|
if (a.isRegExp(n))
|
|
@@ -721,42 +721,42 @@ let O = class {
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
has(t, n) {
|
|
724
|
-
if (t =
|
|
724
|
+
if (t = V(t), t) {
|
|
725
725
|
const r = a.findKey(this, t);
|
|
726
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
726
|
+
return !!(r && this[r] !== void 0 && (!n || he(this, this[r], r, n)));
|
|
727
727
|
}
|
|
728
728
|
return !1;
|
|
729
729
|
}
|
|
730
730
|
delete(t, n) {
|
|
731
731
|
const r = this;
|
|
732
732
|
let s = !1;
|
|
733
|
-
function o
|
|
734
|
-
if (
|
|
735
|
-
const c = a.findKey(r,
|
|
736
|
-
c && (!n ||
|
|
733
|
+
function i(o) {
|
|
734
|
+
if (o = V(o), o) {
|
|
735
|
+
const c = a.findKey(r, o);
|
|
736
|
+
c && (!n || he(r, r[c], c, n)) && (delete r[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 n = Object.keys(this);
|
|
743
743
|
let r = n.length, s = !1;
|
|
744
744
|
for (; r--; ) {
|
|
745
|
-
const
|
|
746
|
-
(!t ||
|
|
745
|
+
const i = n[r];
|
|
746
|
+
(!t || he(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 n = this, r = {};
|
|
752
|
-
return a.forEach(this, (s,
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
n[
|
|
752
|
+
return a.forEach(this, (s, i) => {
|
|
753
|
+
const o = a.findKey(r, i);
|
|
754
|
+
if (o) {
|
|
755
|
+
n[o] = te(s), delete n[i];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = t ?
|
|
759
|
-
c !==
|
|
758
|
+
const c = t ? Fn(i) : String(i).trim();
|
|
759
|
+
c !== i && delete n[i], n[c] = te(s), r[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
762
762
|
concat(...t) {
|
|
@@ -789,14 +789,14 @@ let O = class {
|
|
|
789
789
|
return n.forEach((s) => r.set(s)), r;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
|
-
const r = (this[
|
|
792
|
+
const r = (this[ke] = this[ke] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, s = this.prototype;
|
|
795
|
-
function o
|
|
796
|
-
const c =
|
|
797
|
-
r[c] || (
|
|
795
|
+
function i(o) {
|
|
796
|
+
const c = V(o);
|
|
797
|
+
r[c] || (Dn(s, o), r[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"]);
|
|
@@ -810,12 +810,12 @@ a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
|
810
810
|
};
|
|
811
811
|
});
|
|
812
812
|
a.freezeMethods(O);
|
|
813
|
-
function
|
|
814
|
-
const n = this ||
|
|
815
|
-
let
|
|
813
|
+
function pe(e, t) {
|
|
814
|
+
const n = this || Y, r = t || n, s = O.from(r.headers);
|
|
815
|
+
let i = r.data;
|
|
816
816
|
return a.forEach(e, function(c) {
|
|
817
|
-
|
|
818
|
-
}), s.normalize(),
|
|
817
|
+
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
818
|
+
}), s.normalize(), i;
|
|
819
819
|
}
|
|
820
820
|
function ft(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
@@ -826,7 +826,7 @@ function M(e, t, n) {
|
|
|
826
826
|
a.inherits(M, m, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function ht(e, t, n) {
|
|
830
830
|
const r = n.config.validateStatus;
|
|
831
831
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
832
832
|
"Request failed with status code " + n.status,
|
|
@@ -836,73 +836,73 @@ function dt(e, t, n) {
|
|
|
836
836
|
n
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function kn(e) {
|
|
840
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
841
|
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function vn(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const n = new Array(e), r = new Array(e);
|
|
846
|
-
let s = 0,
|
|
847
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
848
|
-
const u = Date.now(), l = r[
|
|
849
|
-
|
|
850
|
-
let
|
|
851
|
-
for (;
|
|
852
|
-
g += n[
|
|
853
|
-
if (s = (s + 1) % e, s ===
|
|
846
|
+
let s = 0, i = 0, o;
|
|
847
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
848
|
+
const u = Date.now(), l = r[i];
|
|
849
|
+
o || (o = u), n[s] = d, r[s] = u;
|
|
850
|
+
let f = i, g = 0;
|
|
851
|
+
for (; f !== s; )
|
|
852
|
+
g += n[f++], f = f % e;
|
|
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 n = 0, r = 1e3 / t, s,
|
|
861
|
-
const
|
|
862
|
-
n = l, s = null,
|
|
859
|
+
function In(e, t) {
|
|
860
|
+
let n = 0, r = 1e3 / t, s, i;
|
|
861
|
+
const o = (u, l = Date.now()) => {
|
|
862
|
+
n = l, s = null, i && (clearTimeout(i), i = null), e(...u);
|
|
863
863
|
};
|
|
864
864
|
return [(...u) => {
|
|
865
|
-
const l = Date.now(),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}, r -
|
|
869
|
-
}, () => s &&
|
|
865
|
+
const l = Date.now(), f = l - n;
|
|
866
|
+
f >= r ? o(u, l) : (s = u, i || (i = setTimeout(() => {
|
|
867
|
+
i = null, o(s);
|
|
868
|
+
}, r - f)));
|
|
869
|
+
}, () => s && o(s)];
|
|
870
870
|
}
|
|
871
|
-
const
|
|
871
|
+
const re = (e, t, n = 3) => {
|
|
872
872
|
let r = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
875
|
-
const
|
|
876
|
-
r =
|
|
877
|
-
const
|
|
878
|
-
loaded:
|
|
873
|
+
const s = vn(50, 250);
|
|
874
|
+
return In((i) => {
|
|
875
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, d = o - r, u = s(d), l = o <= c;
|
|
876
|
+
r = o;
|
|
877
|
+
const f = {
|
|
878
|
+
loaded: o,
|
|
879
879
|
total: c,
|
|
880
|
-
progress: c ?
|
|
881
|
-
bytes:
|
|
880
|
+
progress: c ? o / c : void 0,
|
|
881
|
+
bytes: d,
|
|
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
|
-
e(
|
|
888
|
+
e(f);
|
|
889
889
|
}, n);
|
|
890
|
-
},
|
|
890
|
+
}, ve = (e, t) => {
|
|
891
891
|
const n = e != null;
|
|
892
892
|
return [(r) => t[0]({
|
|
893
893
|
lengthComputable: n,
|
|
894
894
|
total: e,
|
|
895
895
|
loaded: r
|
|
896
896
|
}), t[1]];
|
|
897
|
-
},
|
|
898
|
-
new URL(
|
|
899
|
-
|
|
900
|
-
) : () => !0,
|
|
897
|
+
}, Ie = (e) => (...t) => a.asap(() => e(...t)), Bn = R.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, R.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
898
|
+
new URL(R.origin),
|
|
899
|
+
R.navigator && /(msie|trident)/i.test(R.navigator.userAgent)
|
|
900
|
+
) : () => !0, qn = R.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
|
-
write(e, t, n, r, s,
|
|
904
|
-
const
|
|
905
|
-
a.isNumber(n) &&
|
|
903
|
+
write(e, t, n, r, s, i) {
|
|
904
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
905
|
+
a.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), a.isString(r) && o.push("path=" + r), 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,108 +924,108 @@ const ne = (e, t, n = 3) => {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
);
|
|
927
|
-
function
|
|
927
|
+
function jn(e) {
|
|
928
928
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
929
929
|
}
|
|
930
|
-
function
|
|
930
|
+
function Mn(e, t) {
|
|
931
931
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
932
932
|
}
|
|
933
|
-
function
|
|
934
|
-
let r = !
|
|
935
|
-
return e && (r || n == !1) ?
|
|
933
|
+
function pt(e, t, n) {
|
|
934
|
+
let r = !jn(t);
|
|
935
|
+
return e && (r || n == !1) ? Mn(e, t) : t;
|
|
936
936
|
}
|
|
937
|
-
const
|
|
938
|
-
function
|
|
937
|
+
const Be = (e) => e instanceof O ? { ...e } : e;
|
|
938
|
+
function B(e, t) {
|
|
939
939
|
t = t || {};
|
|
940
940
|
const n = {};
|
|
941
|
-
function r(u, l,
|
|
941
|
+
function r(u, l, f, g) {
|
|
942
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;
|
|
943
943
|
}
|
|
944
|
-
function s(u, l,
|
|
944
|
+
function s(u, l, f, g) {
|
|
945
945
|
if (a.isUndefined(l)) {
|
|
946
946
|
if (!a.isUndefined(u))
|
|
947
|
-
return r(void 0, u,
|
|
948
|
-
} else return r(u, l,
|
|
947
|
+
return r(void 0, u, f, g);
|
|
948
|
+
} else return r(u, l, f, g);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function i(u, l) {
|
|
951
951
|
if (!a.isUndefined(l))
|
|
952
952
|
return r(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 r(void 0, u);
|
|
958
958
|
} else return r(void 0, l);
|
|
959
959
|
}
|
|
960
|
-
function c(u, l,
|
|
961
|
-
if (
|
|
960
|
+
function c(u, l, f) {
|
|
961
|
+
if (f in t)
|
|
962
962
|
return r(u, l);
|
|
963
|
-
if (
|
|
963
|
+
if (f in e)
|
|
964
964
|
return r(void 0, u);
|
|
965
965
|
}
|
|
966
|
-
const
|
|
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:
|
|
966
|
+
const d = {
|
|
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,
|
|
995
|
+
headers: (u, l, f) => s(Be(u), Be(l), f, !0)
|
|
996
996
|
};
|
|
997
997
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
998
|
-
const
|
|
999
|
-
a.isUndefined(g) &&
|
|
998
|
+
const f = d[l] || s, g = f(e[l], t[l], l);
|
|
999
|
+
a.isUndefined(g) && f !== c || (n[l] = g);
|
|
1000
1000
|
}), n;
|
|
1001
1001
|
}
|
|
1002
|
-
const
|
|
1003
|
-
const t =
|
|
1004
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName:
|
|
1005
|
-
t.headers =
|
|
1002
|
+
const mt = (e) => {
|
|
1003
|
+
const t = B({}, e);
|
|
1004
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1005
|
+
t.headers = o = O.from(o), t.url = ut(pt(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
|
-
let
|
|
1009
|
+
let d;
|
|
1010
1010
|
if (a.isFormData(n)) {
|
|
1011
|
-
if (
|
|
1012
|
-
|
|
1013
|
-
else if ((
|
|
1014
|
-
const [u, ...l] =
|
|
1015
|
-
|
|
1011
|
+
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
1012
|
+
o.setContentType(void 0);
|
|
1013
|
+
else if ((d = o.getContentType()) !== !1) {
|
|
1014
|
+
const [u, ...l] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1015
|
+
o.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
if (
|
|
1019
|
-
const u = s &&
|
|
1020
|
-
u &&
|
|
1018
|
+
if (R.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Bn(t.url))) {
|
|
1019
|
+
const u = s && i && qn.read(i);
|
|
1020
|
+
u && o.set(s, u);
|
|
1021
1021
|
}
|
|
1022
1022
|
return t;
|
|
1023
|
-
},
|
|
1023
|
+
}, $n = typeof XMLHttpRequest < "u", Hn = $n && function(e) {
|
|
1024
1024
|
return new Promise(function(n, r) {
|
|
1025
|
-
const s =
|
|
1026
|
-
let
|
|
1027
|
-
const
|
|
1028
|
-
let { responseType: c, onUploadProgress:
|
|
1025
|
+
const s = mt(e);
|
|
1026
|
+
let i = s.data;
|
|
1027
|
+
const o = O.from(s.headers).normalize();
|
|
1028
|
+
let { responseType: c, onUploadProgress: d, onDownloadProgress: u } = s, l, f, 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);
|
|
1031
1031
|
}
|
|
@@ -1034,20 +1034,20 @@ const pt = (e) => {
|
|
|
1034
1034
|
function b() {
|
|
1035
1035
|
if (!p)
|
|
1036
1036
|
return;
|
|
1037
|
-
const
|
|
1037
|
+
const _ = O.from(
|
|
1038
1038
|
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1039
1039
|
), A = {
|
|
1040
1040
|
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1041
1041
|
status: p.status,
|
|
1042
1042
|
statusText: p.statusText,
|
|
1043
|
-
headers:
|
|
1043
|
+
headers: _,
|
|
1044
1044
|
config: e,
|
|
1045
1045
|
request: p
|
|
1046
1046
|
};
|
|
1047
|
-
|
|
1048
|
-
n(
|
|
1049
|
-
}, function(
|
|
1050
|
-
r(
|
|
1047
|
+
ht(function(k) {
|
|
1048
|
+
n(k), y();
|
|
1049
|
+
}, function(k) {
|
|
1050
|
+
r(k), y();
|
|
1051
1051
|
}, A), p = null;
|
|
1052
1052
|
}
|
|
1053
1053
|
"onloadend" in p ? p.onloadend = b : p.onreadystatechange = function() {
|
|
@@ -1058,49 +1058,49 @@ const pt = (e) => {
|
|
|
1058
1058
|
r(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1059
1059
|
}, p.ontimeout = function() {
|
|
1060
1060
|
let U = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1061
|
-
const A = s.transitional ||
|
|
1061
|
+
const A = s.transitional || lt;
|
|
1062
1062
|
s.timeoutErrorMessage && (U = s.timeoutErrorMessage), r(new m(
|
|
1063
1063
|
U,
|
|
1064
1064
|
A.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(U, A) {
|
|
1069
1069
|
p.setRequestHeader(A, U);
|
|
1070
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([g, h] =
|
|
1071
|
-
p && (r(!
|
|
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)), d && p.upload && ([f, w] = re(d), p.upload.addEventListener("progress", f), p.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (_) => {
|
|
1071
|
+
p && (r(!_ || _.type ? new M(null, e, p) : _), 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 S =
|
|
1074
|
-
if (S &&
|
|
1073
|
+
const S = kn(s.url);
|
|
1074
|
+
if (S && R.protocols.indexOf(S) === -1) {
|
|
1075
1075
|
r(new m("Unsupported protocol " + S + ":", m.ERR_BAD_REQUEST, e));
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
1078
|
-
p.send(
|
|
1078
|
+
p.send(i || null);
|
|
1079
1079
|
});
|
|
1080
|
-
},
|
|
1080
|
+
}, Kn = (e, t) => {
|
|
1081
1081
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1082
1082
|
if (t || n) {
|
|
1083
1083
|
let r = 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
|
r.abort(l instanceof m ? l : new M(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",
|
|
1100
|
-
const { signal:
|
|
1101
|
-
return
|
|
1099
|
+
e.forEach((u) => u.addEventListener("abort", i));
|
|
1100
|
+
const { signal: d } = r;
|
|
1101
|
+
return d.unsubscribe = () => a.asap(c), d;
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1103
|
+
}, Vn = function* (e, t) {
|
|
1104
1104
|
let n = e.byteLength;
|
|
1105
1105
|
if (n < t) {
|
|
1106
1106
|
yield e;
|
|
@@ -1109,10 +1109,10 @@ const pt = (e) => {
|
|
|
1109
1109
|
let r = 0, s;
|
|
1110
1110
|
for (; r < n; )
|
|
1111
1111
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1112
|
-
},
|
|
1113
|
-
for await (const n of
|
|
1114
|
-
yield*
|
|
1115
|
-
},
|
|
1112
|
+
}, zn = async function* (e, t) {
|
|
1113
|
+
for await (const n of Jn(e))
|
|
1114
|
+
yield* Vn(n, t);
|
|
1115
|
+
}, Jn = async function* (e) {
|
|
1116
1116
|
if (e[Symbol.asyncIterator]) {
|
|
1117
1117
|
yield* e;
|
|
1118
1118
|
return;
|
|
@@ -1128,44 +1128,44 @@ const pt = (e) => {
|
|
|
1128
1128
|
} finally {
|
|
1129
1129
|
await t.cancel();
|
|
1130
1130
|
}
|
|
1131
|
-
},
|
|
1132
|
-
const s =
|
|
1133
|
-
let
|
|
1134
|
-
|
|
1131
|
+
}, qe = (e, t, n, r) => {
|
|
1132
|
+
const s = zn(e, t);
|
|
1133
|
+
let i = 0, o, c = (d) => {
|
|
1134
|
+
o || (o = !0, r && r(d));
|
|
1135
1135
|
};
|
|
1136
1136
|
return new ReadableStream({
|
|
1137
|
-
async pull(
|
|
1137
|
+
async pull(d) {
|
|
1138
1138
|
try {
|
|
1139
1139
|
const { done: u, value: l } = await s.next();
|
|
1140
1140
|
if (u) {
|
|
1141
|
-
c(),
|
|
1141
|
+
c(), d.close();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
|
-
let
|
|
1144
|
+
let f = l.byteLength;
|
|
1145
1145
|
if (n) {
|
|
1146
|
-
let g =
|
|
1146
|
+
let g = i += f;
|
|
1147
1147
|
n(g);
|
|
1148
1148
|
}
|
|
1149
|
-
|
|
1149
|
+
d.enqueue(new Uint8Array(l));
|
|
1150
1150
|
} catch (u) {
|
|
1151
1151
|
throw c(u), u;
|
|
1152
1152
|
}
|
|
1153
1153
|
},
|
|
1154
|
-
cancel(
|
|
1155
|
-
return c(
|
|
1154
|
+
cancel(d) {
|
|
1155
|
+
return c(d), s.return();
|
|
1156
1156
|
}
|
|
1157
1157
|
}, {
|
|
1158
1158
|
highWaterMark: 2
|
|
1159
1159
|
});
|
|
1160
|
-
},
|
|
1160
|
+
}, ue = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", yt = ue && typeof ReadableStream == "function", Wn = ue && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), gt = (e, ...t) => {
|
|
1161
1161
|
try {
|
|
1162
1162
|
return !!e(...t);
|
|
1163
1163
|
} catch {
|
|
1164
1164
|
return !1;
|
|
1165
1165
|
}
|
|
1166
|
-
},
|
|
1166
|
+
}, Qn = yt && gt(() => {
|
|
1167
1167
|
let e = !1;
|
|
1168
|
-
const t = new Request(
|
|
1168
|
+
const t = new Request(R.origin, {
|
|
1169
1169
|
body: new ReadableStream(),
|
|
1170
1170
|
method: "POST",
|
|
1171
1171
|
get duplex() {
|
|
@@ -1173,70 +1173,70 @@ const pt = (e) => {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
}).headers.has("Content-Type");
|
|
1175
1175
|
return e && !t;
|
|
1176
|
-
}),
|
|
1177
|
-
stream:
|
|
1176
|
+
}), je = 64 * 1024, be = yt && gt(() => a.isReadableStream(new Response("").body)), se = {
|
|
1177
|
+
stream: be && ((e) => e.body)
|
|
1178
1178
|
};
|
|
1179
|
-
|
|
1179
|
+
ue && ((e) => {
|
|
1180
1180
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1181
|
-
!
|
|
1181
|
+
!se[t] && (se[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1182
1182
|
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1183
1183
|
});
|
|
1184
1184
|
});
|
|
1185
1185
|
})(new Response());
|
|
1186
|
-
const
|
|
1186
|
+
const Xn = async (e) => {
|
|
1187
1187
|
if (e == null)
|
|
1188
1188
|
return 0;
|
|
1189
1189
|
if (a.isBlob(e))
|
|
1190
1190
|
return e.size;
|
|
1191
1191
|
if (a.isSpecCompliantForm(e))
|
|
1192
|
-
return (await new Request(
|
|
1192
|
+
return (await new Request(R.origin, {
|
|
1193
1193
|
method: "POST",
|
|
1194
1194
|
body: e
|
|
1195
1195
|
}).arrayBuffer()).byteLength;
|
|
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 Wn(e)).byteLength;
|
|
1200
|
+
}, Yn = async (e, t) => {
|
|
1201
1201
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1202
|
-
return n ??
|
|
1203
|
-
},
|
|
1202
|
+
return n ?? Xn(t);
|
|
1203
|
+
}, Gn = ue && (async (e) => {
|
|
1204
1204
|
let {
|
|
1205
1205
|
url: t,
|
|
1206
1206
|
method: n,
|
|
1207
1207
|
data: r,
|
|
1208
1208
|
signal: s,
|
|
1209
|
-
cancelToken:
|
|
1210
|
-
timeout:
|
|
1209
|
+
cancelToken: i,
|
|
1210
|
+
timeout: o,
|
|
1211
1211
|
onDownloadProgress: c,
|
|
1212
|
-
onUploadProgress:
|
|
1212
|
+
onUploadProgress: d,
|
|
1213
1213
|
responseType: u,
|
|
1214
1214
|
headers: l,
|
|
1215
|
-
withCredentials:
|
|
1215
|
+
withCredentials: f = "same-origin",
|
|
1216
1216
|
fetchOptions: g
|
|
1217
|
-
} =
|
|
1217
|
+
} = mt(e);
|
|
1218
1218
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1219
|
-
let w =
|
|
1219
|
+
let w = Kn([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 (
|
|
1225
|
+
if (d && Qn && n !== "get" && n !== "head" && (p = await Yn(l, r)) !== 0) {
|
|
1226
1226
|
let A = new Request(t, {
|
|
1227
1227
|
method: "POST",
|
|
1228
1228
|
body: r,
|
|
1229
1229
|
duplex: "half"
|
|
1230
|
-
}),
|
|
1231
|
-
if (a.isFormData(r) && (
|
|
1232
|
-
const [
|
|
1230
|
+
}), F;
|
|
1231
|
+
if (a.isFormData(r) && (F = A.headers.get("content-type")) && l.setContentType(F), A.body) {
|
|
1232
|
+
const [k, G] = ve(
|
|
1233
1233
|
p,
|
|
1234
|
-
|
|
1234
|
+
re(Ie(d))
|
|
1235
1235
|
);
|
|
1236
|
-
r =
|
|
1236
|
+
r = qe(A.body, je, k, G);
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
a.isString(
|
|
1239
|
+
a.isString(f) || (f = f ? "include" : "omit");
|
|
1240
1240
|
const b = "credentials" in Request.prototype;
|
|
1241
1241
|
h = new Request(t, {
|
|
1242
1242
|
...g,
|
|
@@ -1245,30 +1245,30 @@ const Qn = async (e) => {
|
|
|
1245
1245
|
headers: l.normalize().toJSON(),
|
|
1246
1246
|
body: r,
|
|
1247
1247
|
duplex: "half",
|
|
1248
|
-
credentials: b ?
|
|
1248
|
+
credentials: b ? f : void 0
|
|
1249
1249
|
});
|
|
1250
1250
|
let S = await fetch(h, g);
|
|
1251
|
-
const
|
|
1252
|
-
if (
|
|
1251
|
+
const _ = be && (u === "stream" || u === "response");
|
|
1252
|
+
if (be && (c || _ && y)) {
|
|
1253
1253
|
const A = {};
|
|
1254
|
-
["status", "statusText", "headers"].forEach((
|
|
1255
|
-
A[
|
|
1254
|
+
["status", "statusText", "headers"].forEach((xe) => {
|
|
1255
|
+
A[xe] = S[xe];
|
|
1256
1256
|
});
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1259
|
-
|
|
1257
|
+
const F = a.toFiniteNumber(S.headers.get("content-length")), [k, G] = c && ve(
|
|
1258
|
+
F,
|
|
1259
|
+
re(Ie(c), !0)
|
|
1260
1260
|
) || [];
|
|
1261
1261
|
S = new Response(
|
|
1262
|
-
|
|
1263
|
-
|
|
1262
|
+
qe(S.body, je, k, () => {
|
|
1263
|
+
G && G(), y && y();
|
|
1264
1264
|
}),
|
|
1265
1265
|
A
|
|
1266
1266
|
);
|
|
1267
1267
|
}
|
|
1268
1268
|
u = u || "text";
|
|
1269
|
-
let U = await
|
|
1270
|
-
return !
|
|
1271
|
-
|
|
1269
|
+
let U = await se[a.findKey(se, u) || "text"](S, e);
|
|
1270
|
+
return !_ && y && y(), await new Promise((A, F) => {
|
|
1271
|
+
ht(A, F, {
|
|
1272
1272
|
data: U,
|
|
1273
1273
|
headers: O.from(S.headers),
|
|
1274
1274
|
status: S.status,
|
|
@@ -1285,12 +1285,12 @@ const Qn = async (e) => {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
) : m.from(b, b && b.code, e, h);
|
|
1287
1287
|
}
|
|
1288
|
-
}),
|
|
1289
|
-
http:
|
|
1290
|
-
xhr:
|
|
1291
|
-
fetch:
|
|
1288
|
+
}), Ee = {
|
|
1289
|
+
http: hn,
|
|
1290
|
+
xhr: Hn,
|
|
1291
|
+
fetch: Gn
|
|
1292
1292
|
};
|
|
1293
|
-
a.forEach(
|
|
1293
|
+
a.forEach(Ee, (e, t) => {
|
|
1294
1294
|
if (e) {
|
|
1295
1295
|
try {
|
|
1296
1296
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1299,113 +1299,113 @@ a.forEach(be, (e, t) => {
|
|
|
1299
1299
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1300
1300
|
}
|
|
1301
1301
|
});
|
|
1302
|
-
const
|
|
1302
|
+
const Me = (e) => `- ${e}`, Zn = (e) => a.isFunction(e) || e === null || e === !1, wt = {
|
|
1303
1303
|
getAdapter: (e) => {
|
|
1304
1304
|
e = a.isArray(e) ? e : [e];
|
|
1305
1305
|
const { length: t } = e;
|
|
1306
1306
|
let n, r;
|
|
1307
1307
|
const s = {};
|
|
1308
|
-
for (let
|
|
1309
|
-
n = e[
|
|
1310
|
-
let
|
|
1311
|
-
if (r = n, !
|
|
1312
|
-
throw new m(`Unknown adapter '${
|
|
1308
|
+
for (let i = 0; i < t; i++) {
|
|
1309
|
+
n = e[i];
|
|
1310
|
+
let o;
|
|
1311
|
+
if (r = n, !Zn(n) && (r = Ee[(o = String(n)).toLowerCase()], r === void 0))
|
|
1312
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
1313
1313
|
if (r)
|
|
1314
1314
|
break;
|
|
1315
|
-
s[
|
|
1315
|
+
s[o || "#" + i] = r;
|
|
1316
1316
|
}
|
|
1317
1317
|
if (!r) {
|
|
1318
|
-
const
|
|
1319
|
-
([c,
|
|
1318
|
+
const i = Object.entries(s).map(
|
|
1319
|
+
([c, d]) => `adapter ${c} ` + (d === !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
|
}
|
|
1329
1329
|
return r;
|
|
1330
1330
|
},
|
|
1331
|
-
adapters:
|
|
1331
|
+
adapters: Ee
|
|
1332
1332
|
};
|
|
1333
|
-
function
|
|
1333
|
+
function me(e) {
|
|
1334
1334
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1335
1335
|
throw new M(null, e);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return
|
|
1337
|
+
function $e(e) {
|
|
1338
|
+
return me(e), e.headers = O.from(e.headers), e.data = pe.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),
|
|
1342
|
-
return
|
|
1341
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(e.adapter || Y.adapter)(e).then(function(r) {
|
|
1342
|
+
return me(e), r.data = pe.call(
|
|
1343
1343
|
e,
|
|
1344
1344
|
e.transformResponse,
|
|
1345
1345
|
r
|
|
1346
1346
|
), r.headers = O.from(r.headers), r;
|
|
1347
1347
|
}, function(r) {
|
|
1348
|
-
return ft(r) || (
|
|
1348
|
+
return ft(r) || (me(e), r && r.response && (r.response.data = pe.call(
|
|
1349
1349
|
e,
|
|
1350
1350
|
e.transformResponse,
|
|
1351
1351
|
r.response
|
|
1352
1352
|
), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
|
|
1353
1353
|
});
|
|
1354
1354
|
}
|
|
1355
|
-
const
|
|
1355
|
+
const bt = "1.11.0", le = {};
|
|
1356
1356
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1357
|
-
|
|
1357
|
+
le[e] = function(r) {
|
|
1358
1358
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1359
1359
|
};
|
|
1360
1360
|
});
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1363
|
-
function s(
|
|
1364
|
-
return "[Axios v" +
|
|
1361
|
+
const He = {};
|
|
1362
|
+
le.transitional = function(t, n, r) {
|
|
1363
|
+
function s(i, o) {
|
|
1364
|
+
return "[Axios v" + bt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
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" + (n ? " in " + n : "")),
|
|
1370
1370
|
m.ERR_DEPRECATED
|
|
1371
1371
|
);
|
|
1372
|
-
return n &&
|
|
1372
|
+
return n && !He[o] && (He[o] = !0, console.warn(
|
|
1373
1373
|
s(
|
|
1374
|
-
|
|
1374
|
+
o,
|
|
1375
1375
|
" has been deprecated since v" + n + " 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
|
+
le.spelling = function(t) {
|
|
1381
1381
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1382
1382
|
};
|
|
1383
|
-
function
|
|
1383
|
+
function er(e, t, n) {
|
|
1384
1384
|
if (typeof e != "object")
|
|
1385
1385
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1386
1386
|
const r = Object.keys(e);
|
|
1387
1387
|
let s = r.length;
|
|
1388
1388
|
for (; s-- > 0; ) {
|
|
1389
|
-
const
|
|
1390
|
-
if (
|
|
1391
|
-
const c = e[
|
|
1392
|
-
if (
|
|
1393
|
-
throw new m("option " +
|
|
1389
|
+
const i = r[s], o = t[i];
|
|
1390
|
+
if (o) {
|
|
1391
|
+
const c = e[i], d = c === void 0 || o(c, i, e);
|
|
1392
|
+
if (d !== !0)
|
|
1393
|
+
throw new m("option " + i + " must be " + d, m.ERR_BAD_OPTION_VALUE);
|
|
1394
1394
|
continue;
|
|
1395
1395
|
}
|
|
1396
1396
|
if (n !== !0)
|
|
1397
|
-
throw new m("Unknown option " +
|
|
1397
|
+
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1401
|
-
assertOptions:
|
|
1402
|
-
validators:
|
|
1403
|
-
}, x =
|
|
1404
|
-
let
|
|
1400
|
+
const ne = {
|
|
1401
|
+
assertOptions: er,
|
|
1402
|
+
validators: le
|
|
1403
|
+
}, x = ne.validators;
|
|
1404
|
+
let I = class {
|
|
1405
1405
|
constructor(t) {
|
|
1406
1406
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
|
-
request: new
|
|
1408
|
-
response: new
|
|
1407
|
+
request: new De(),
|
|
1408
|
+
response: new De()
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
1411
1411
|
/**
|
|
@@ -1423,10 +1423,10 @@ let q = class {
|
|
|
1423
1423
|
if (r 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
|
-
r.stack ?
|
|
1429
|
-
` +
|
|
1428
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1429
|
+
` + i) : r.stack = i;
|
|
1430
1430
|
} catch {
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
@@ -1434,51 +1434,51 @@ let q = class {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
_request(t, n) {
|
|
1437
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1438
|
-
const { transitional: r, paramsSerializer: s, headers:
|
|
1439
|
-
r !== void 0 &&
|
|
1437
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = B(this.defaults, n);
|
|
1438
|
+
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1439
|
+
r !== void 0 && ne.assertOptions(r, {
|
|
1440
1440
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1441
1441
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
1442
1442
|
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1443
1443
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1444
1444
|
serialize: s
|
|
1445
|
-
} :
|
|
1445
|
+
} : ne.assertOptions(s, {
|
|
1446
1446
|
encode: x.function,
|
|
1447
1447
|
serialize: x.function
|
|
1448
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1448
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ne.assertOptions(n, {
|
|
1449
1449
|
baseUrl: x.spelling("baseURL"),
|
|
1450
1450
|
withXsrfToken: x.spelling("withXSRFToken")
|
|
1451
1451
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1452
|
-
let
|
|
1453
|
-
|
|
1454
|
-
|
|
1452
|
+
let o = i && a.merge(
|
|
1453
|
+
i.common,
|
|
1454
|
+
i[n.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
|
-
), n.headers = O.concat(
|
|
1461
|
+
), n.headers = O.concat(o, i);
|
|
1462
1462
|
const c = [];
|
|
1463
|
-
let
|
|
1463
|
+
let d = !0;
|
|
1464
1464
|
this.interceptors.request.forEach(function(y) {
|
|
1465
|
-
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (
|
|
1465
|
+
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1466
1466
|
});
|
|
1467
1467
|
const u = [];
|
|
1468
1468
|
this.interceptors.response.forEach(function(y) {
|
|
1469
1469
|
u.push(y.fulfilled, y.rejected);
|
|
1470
1470
|
});
|
|
1471
|
-
let l,
|
|
1472
|
-
if (!
|
|
1473
|
-
const h = [
|
|
1474
|
-
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(n);
|
|
1475
|
-
l = l.then(h[
|
|
1471
|
+
let l, f = 0, g;
|
|
1472
|
+
if (!d) {
|
|
1473
|
+
const h = [$e.bind(this), void 0];
|
|
1474
|
+
for (h.unshift(...c), h.push(...u), g = h.length, l = Promise.resolve(n); f < g; )
|
|
1475
|
+
l = l.then(h[f++], h[f++]);
|
|
1476
1476
|
return l;
|
|
1477
1477
|
}
|
|
1478
1478
|
g = c.length;
|
|
1479
1479
|
let w = n;
|
|
1480
|
-
for (
|
|
1481
|
-
const h = c[
|
|
1480
|
+
for (f = 0; f < g; ) {
|
|
1481
|
+
const h = c[f++], y = c[f++];
|
|
1482
1482
|
try {
|
|
1483
1483
|
w = h(w);
|
|
1484
1484
|
} catch (p) {
|
|
@@ -1487,23 +1487,23 @@ let q = class {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
try {
|
|
1490
|
-
l =
|
|
1490
|
+
l = $e.call(this, w);
|
|
1491
1491
|
} catch (h) {
|
|
1492
1492
|
return Promise.reject(h);
|
|
1493
1493
|
}
|
|
1494
|
-
for (
|
|
1495
|
-
l = l.then(u[
|
|
1494
|
+
for (f = 0, g = u.length; f < g; )
|
|
1495
|
+
l = l.then(u[f++], u[f++]);
|
|
1496
1496
|
return l;
|
|
1497
1497
|
}
|
|
1498
1498
|
getUri(t) {
|
|
1499
|
-
t =
|
|
1500
|
-
const n =
|
|
1501
|
-
return
|
|
1499
|
+
t = B(this.defaults, t);
|
|
1500
|
+
const n = pt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1501
|
+
return ut(n, t.params, t.paramsSerializer);
|
|
1502
1502
|
}
|
|
1503
1503
|
};
|
|
1504
1504
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1505
|
-
|
|
1506
|
-
return this.request(
|
|
1505
|
+
I.prototype[t] = function(n, r) {
|
|
1506
|
+
return this.request(B(r || {}, {
|
|
1507
1507
|
method: t,
|
|
1508
1508
|
url: n,
|
|
1509
1509
|
data: (r || {}).data
|
|
@@ -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 n(r) {
|
|
1515
|
-
return function(
|
|
1516
|
-
return this.request(
|
|
1515
|
+
return function(i, o, c) {
|
|
1516
|
+
return this.request(B(c || {}, {
|
|
1517
1517
|
method: t,
|
|
1518
1518
|
headers: r ? {
|
|
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
|
+
I.prototype[t] = n(), I.prototype[t + "Form"] = n(!0);
|
|
1527
1527
|
});
|
|
1528
|
-
let
|
|
1528
|
+
let tr = class Et {
|
|
1529
1529
|
constructor(t) {
|
|
1530
1530
|
if (typeof t != "function")
|
|
1531
1531
|
throw new TypeError("executor must be a function.");
|
|
1532
1532
|
let n;
|
|
1533
|
-
this.promise = new Promise(function(
|
|
1534
|
-
n =
|
|
1533
|
+
this.promise = new Promise(function(i) {
|
|
1534
|
+
n = i;
|
|
1535
1535
|
});
|
|
1536
1536
|
const r = this;
|
|
1537
1537
|
this.promise.then((s) => {
|
|
1538
1538
|
if (!r._listeners) return;
|
|
1539
|
-
let
|
|
1540
|
-
for (;
|
|
1541
|
-
r._listeners[
|
|
1539
|
+
let i = r._listeners.length;
|
|
1540
|
+
for (; i-- > 0; )
|
|
1541
|
+
r._listeners[i](s);
|
|
1542
1542
|
r._listeners = null;
|
|
1543
1543
|
}), this.promise.then = (s) => {
|
|
1544
|
-
let
|
|
1545
|
-
const
|
|
1546
|
-
r.subscribe(c),
|
|
1544
|
+
let i;
|
|
1545
|
+
const o = new Promise((c) => {
|
|
1546
|
+
r.subscribe(c), i = c;
|
|
1547
1547
|
}).then(s);
|
|
1548
|
-
return
|
|
1549
|
-
r.unsubscribe(
|
|
1550
|
-
},
|
|
1551
|
-
}, t(function(
|
|
1552
|
-
r.reason || (r.reason = new M(
|
|
1548
|
+
return o.cancel = function() {
|
|
1549
|
+
r.unsubscribe(i);
|
|
1550
|
+
}, o;
|
|
1551
|
+
}, t(function(i, o, c) {
|
|
1552
|
+
r.reason || (r.reason = new M(i, o, c), n(r.reason));
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
/**
|
|
@@ -1591,22 +1591,22 @@ let er = class bt {
|
|
|
1591
1591
|
static source() {
|
|
1592
1592
|
let t;
|
|
1593
1593
|
return {
|
|
1594
|
-
token: new
|
|
1594
|
+
token: new Et(function(s) {
|
|
1595
1595
|
t = s;
|
|
1596
1596
|
}),
|
|
1597
1597
|
cancel: t
|
|
1598
1598
|
};
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
|
-
function
|
|
1601
|
+
function nr(e) {
|
|
1602
1602
|
return function(n) {
|
|
1603
1603
|
return e.apply(null, n);
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function rr(e) {
|
|
1607
1607
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1608
1608
|
}
|
|
1609
|
-
const
|
|
1609
|
+
const Se = {
|
|
1610
1610
|
Continue: 100,
|
|
1611
1611
|
SwitchingProtocols: 101,
|
|
1612
1612
|
Processing: 102,
|
|
@@ -1671,86 +1671,86 @@ const Ee = {
|
|
|
1671
1671
|
NotExtended: 510,
|
|
1672
1672
|
NetworkAuthenticationRequired: 511
|
|
1673
1673
|
};
|
|
1674
|
-
Object.entries(
|
|
1675
|
-
|
|
1674
|
+
Object.entries(Se).forEach(([e, t]) => {
|
|
1675
|
+
Se[t] = e;
|
|
1676
1676
|
});
|
|
1677
|
-
function
|
|
1678
|
-
const t = new
|
|
1679
|
-
return a.extend(n,
|
|
1680
|
-
return
|
|
1677
|
+
function St(e) {
|
|
1678
|
+
const t = new I(e), n = Ye(I.prototype.request, t);
|
|
1679
|
+
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1680
|
+
return St(B(e, s));
|
|
1681
1681
|
}, n;
|
|
1682
1682
|
}
|
|
1683
|
-
const E =
|
|
1684
|
-
E.Axios =
|
|
1683
|
+
const E = St(Y);
|
|
1684
|
+
E.Axios = I;
|
|
1685
1685
|
E.CanceledError = M;
|
|
1686
|
-
E.CancelToken =
|
|
1686
|
+
E.CancelToken = tr;
|
|
1687
1687
|
E.isCancel = ft;
|
|
1688
|
-
E.VERSION =
|
|
1689
|
-
E.toFormData =
|
|
1688
|
+
E.VERSION = bt;
|
|
1689
|
+
E.toFormData = ce;
|
|
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 =
|
|
1697
|
-
E.mergeConfig =
|
|
1695
|
+
E.spread = nr;
|
|
1696
|
+
E.isAxiosError = rr;
|
|
1697
|
+
E.mergeConfig = B;
|
|
1698
1698
|
E.AxiosHeaders = O;
|
|
1699
|
-
E.formToJSON = (e) =>
|
|
1700
|
-
E.getAdapter =
|
|
1701
|
-
E.HttpStatusCode =
|
|
1699
|
+
E.formToJSON = (e) => dt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1700
|
+
E.getAdapter = wt.getAdapter;
|
|
1701
|
+
E.HttpStatusCode = Se;
|
|
1702
1702
|
E.default = E;
|
|
1703
1703
|
const {
|
|
1704
|
-
Axios:
|
|
1705
|
-
AxiosError:
|
|
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:
|
|
1704
|
+
Axios: as,
|
|
1705
|
+
AxiosError: Z,
|
|
1706
|
+
CanceledError: cs,
|
|
1707
|
+
isCancel: us,
|
|
1708
|
+
CancelToken: ls,
|
|
1709
|
+
VERSION: ds,
|
|
1710
|
+
all: fs,
|
|
1711
|
+
Cancel: hs,
|
|
1712
|
+
isAxiosError: ps,
|
|
1713
|
+
spread: ms,
|
|
1714
|
+
toFormData: ys,
|
|
1715
|
+
AxiosHeaders: gs,
|
|
1716
|
+
HttpStatusCode: ws,
|
|
1717
|
+
formToJSON: bs,
|
|
1718
|
+
getAdapter: Es,
|
|
1719
|
+
mergeConfig: Ss
|
|
1720
1720
|
} = E;
|
|
1721
|
-
class
|
|
1721
|
+
class Ke extends Error {
|
|
1722
1722
|
constructor(n) {
|
|
1723
1723
|
super(n.join(", "));
|
|
1724
|
-
|
|
1724
|
+
C(this, "errors");
|
|
1725
1725
|
this.name = "ValidationError", this.errors = n;
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
|
-
class
|
|
1728
|
+
class Ve extends Error {
|
|
1729
1729
|
constructor(n) {
|
|
1730
1730
|
super("Address already registered.");
|
|
1731
|
-
|
|
1731
|
+
C(this, "address");
|
|
1732
1732
|
this.name = "AddressInUseError", this.address = n;
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
|
-
class
|
|
1735
|
+
class ze extends Error {
|
|
1736
1736
|
constructor(n) {
|
|
1737
1737
|
super("Code already registered.");
|
|
1738
|
-
|
|
1738
|
+
C(this, "code");
|
|
1739
1739
|
this.name = "CodeInUseError", this.code = n;
|
|
1740
1740
|
}
|
|
1741
1741
|
}
|
|
1742
|
-
class
|
|
1742
|
+
class Je extends Error {
|
|
1743
1743
|
constructor() {
|
|
1744
1744
|
super("Invalid signature provided"), this.name = "InvalidSignatureError";
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
class
|
|
1747
|
+
class sr {
|
|
1748
1748
|
constructor(t) {
|
|
1749
|
-
|
|
1750
|
-
|
|
1749
|
+
C(this, "httpClient");
|
|
1750
|
+
C(this, "_debug");
|
|
1751
1751
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1752
1752
|
}
|
|
1753
|
-
async create(t, n, r, s,
|
|
1753
|
+
async create(t, n, r, s, i, o) {
|
|
1754
1754
|
var c;
|
|
1755
1755
|
try {
|
|
1756
1756
|
await this.httpClient.post({
|
|
@@ -1761,23 +1761,23 @@ class rr {
|
|
|
1761
1761
|
name: r,
|
|
1762
1762
|
code: r,
|
|
1763
1763
|
signature: s,
|
|
1764
|
-
signature_public_key:
|
|
1765
|
-
account_chain_id:
|
|
1764
|
+
signature_public_key: i,
|
|
1765
|
+
account_chain_id: o
|
|
1766
1766
|
}
|
|
1767
1767
|
});
|
|
1768
|
-
} catch (
|
|
1769
|
-
if (
|
|
1770
|
-
const u = (c =
|
|
1768
|
+
} catch (d) {
|
|
1769
|
+
if (d instanceof Z) {
|
|
1770
|
+
const u = (c = d.response) == null ? void 0 : c.data;
|
|
1771
1771
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1772
1772
|
const l = u.message.toLowerCase();
|
|
1773
|
-
throw l == "invalid signature" ? new
|
|
1773
|
+
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(r) : new Error(l);
|
|
1774
1774
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1775
|
-
throw new
|
|
1775
|
+
throw new Ke(u.message);
|
|
1776
1776
|
}
|
|
1777
|
-
throw
|
|
1777
|
+
throw d;
|
|
1778
1778
|
}
|
|
1779
1779
|
}
|
|
1780
|
-
async update(t, n, r, s,
|
|
1780
|
+
async update(t, n, r, s, i, o) {
|
|
1781
1781
|
var c;
|
|
1782
1782
|
try {
|
|
1783
1783
|
await this.httpClient.post({
|
|
@@ -1787,20 +1787,20 @@ class rr {
|
|
|
1787
1787
|
user_identifier: t,
|
|
1788
1788
|
identifier_type: n,
|
|
1789
1789
|
signature: s,
|
|
1790
|
-
signature_public_key:
|
|
1791
|
-
account_chain_id:
|
|
1790
|
+
signature_public_key: i,
|
|
1791
|
+
account_chain_id: o
|
|
1792
1792
|
}
|
|
1793
1793
|
});
|
|
1794
|
-
} catch (
|
|
1795
|
-
if (
|
|
1796
|
-
const u = (c =
|
|
1794
|
+
} catch (d) {
|
|
1795
|
+
if (d instanceof Z) {
|
|
1796
|
+
const u = (c = d.response) == null ? void 0 : c.data;
|
|
1797
1797
|
if (typeof (u == null ? void 0 : u.message) == "string") {
|
|
1798
1798
|
const l = u.message.toLowerCase();
|
|
1799
|
-
throw l == "invalid signature" ? new
|
|
1799
|
+
throw l == "invalid signature" ? new Je() : l == "address in use" ? new Ve(t) : l == "code in use" ? new ze(r) : new Error(l);
|
|
1800
1800
|
} else if ((u == null ? void 0 : u.message) instanceof Array)
|
|
1801
|
-
throw new
|
|
1801
|
+
throw new Ke(u.message);
|
|
1802
1802
|
}
|
|
1803
|
-
throw
|
|
1803
|
+
throw d;
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
async isCodeFree(t) {
|
|
@@ -1808,7 +1808,7 @@ class rr {
|
|
|
1808
1808
|
try {
|
|
1809
1809
|
return await this.httpClient.get({ path: `/affiliates/codes/${t}` }), !1;
|
|
1810
1810
|
} catch (r) {
|
|
1811
|
-
if (r instanceof
|
|
1811
|
+
if (r instanceof Z && ((n = r.response) == null ? void 0 : n.status) === 404)
|
|
1812
1812
|
return !0;
|
|
1813
1813
|
throw console.error("Fuul SDK: Could not check affiliate code", r), r;
|
|
1814
1814
|
}
|
|
@@ -1818,29 +1818,29 @@ class rr {
|
|
|
1818
1818
|
try {
|
|
1819
1819
|
return (await this.httpClient.get({ path: `/affiliates/${t}`, queryParams: { identifier_type: n } })).data.code;
|
|
1820
1820
|
} catch (s) {
|
|
1821
|
-
if (s instanceof
|
|
1821
|
+
if (s instanceof Z && ((r = s.response) == null ? void 0 : r.status) === 404)
|
|
1822
1822
|
return null;
|
|
1823
1823
|
throw console.error("Fuul SDK: Could not get affiliate code", s), s;
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
|
-
const
|
|
1827
|
+
const ir = "/audiences";
|
|
1828
1828
|
class or {
|
|
1829
1829
|
constructor(t) {
|
|
1830
|
-
|
|
1831
|
-
|
|
1830
|
+
C(this, "httpClient");
|
|
1831
|
+
C(this, "_debug");
|
|
1832
1832
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1833
1833
|
}
|
|
1834
1834
|
async getUserAudiences(t) {
|
|
1835
1835
|
return (await this.httpClient.get({
|
|
1836
|
-
path: `${
|
|
1836
|
+
path: `${ir}/user`,
|
|
1837
1837
|
queryParams: { ...t }
|
|
1838
1838
|
})).data;
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
1841
|
-
class
|
|
1841
|
+
class ar {
|
|
1842
1842
|
constructor(t) {
|
|
1843
|
-
|
|
1843
|
+
C(this, "httpClient");
|
|
1844
1844
|
this.httpClient = t.httpClient;
|
|
1845
1845
|
}
|
|
1846
1846
|
async getAll(t) {
|
|
@@ -1848,11 +1848,11 @@ class ir {
|
|
|
1848
1848
|
return n;
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
|
-
const
|
|
1852
|
-
class
|
|
1851
|
+
const We = "fuul.sent", cr = 60, ur = "connect_wallet", Qe = 10;
|
|
1852
|
+
class lr {
|
|
1853
1853
|
constructor(t) {
|
|
1854
|
-
|
|
1855
|
-
|
|
1854
|
+
C(this, "debug");
|
|
1855
|
+
C(this, "httpClient");
|
|
1856
1856
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
1857
1857
|
}
|
|
1858
1858
|
async sendEvent(t, n) {
|
|
@@ -1870,47 +1870,47 @@ class ur {
|
|
|
1870
1870
|
this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
1871
1871
|
}
|
|
1872
1872
|
isDuplicate(t) {
|
|
1873
|
-
var l,
|
|
1874
|
-
const n = `${
|
|
1873
|
+
var l, f, g, w;
|
|
1874
|
+
const n = `${We}_${t.name}`, r = localStorage.getItem(n);
|
|
1875
1875
|
if (!r)
|
|
1876
1876
|
return !1;
|
|
1877
1877
|
const s = JSON.parse(r);
|
|
1878
|
-
if (this.getCurrentTimestamp() - s.timestamp >
|
|
1878
|
+
if (this.getCurrentTimestamp() - s.timestamp > cr)
|
|
1879
1879
|
return !1;
|
|
1880
|
-
let
|
|
1881
|
-
t.metadata && (
|
|
1880
|
+
let d = !1;
|
|
1881
|
+
t.metadata && (d = 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 && ((l = s.user) == null ? void 0 : l.identifier) === ((f = t.user) == null ? void 0 : f.identifier) && ((g = s.user) == null ? void 0 : g.identifier_type) === ((w = t.user) == null ? void 0 : w.identifier_type) && s.signature === t.signature && s.signature_message === t.signature_message);
|
|
1882
1882
|
let u = !1;
|
|
1883
|
-
return t.args && s.args && (u = s.args.page === t.args.page), u &&
|
|
1883
|
+
return t.args && s.args && (u = s.args.page === t.args.page), u && d;
|
|
1884
1884
|
}
|
|
1885
1885
|
getCurrentTimestamp() {
|
|
1886
1886
|
return Date.now() / 1e3;
|
|
1887
1887
|
}
|
|
1888
1888
|
saveSentEvent(t) {
|
|
1889
|
-
var
|
|
1890
|
-
const n = `${
|
|
1891
|
-
if (localStorage.setItem(n, JSON.stringify(
|
|
1892
|
-
const l = JSON.parse(localStorage.getItem(r) || "[]"),
|
|
1889
|
+
var o, c, d, u;
|
|
1890
|
+
const n = `${We}_${t.name}`, r = `${n}_all`, s = this.getCurrentTimestamp(), i = { ...t, timestamp: s };
|
|
1891
|
+
if (localStorage.setItem(n, JSON.stringify(i)), t.name === ur) {
|
|
1892
|
+
const l = JSON.parse(localStorage.getItem(r) || "[]"), f = {
|
|
1893
1893
|
name: t.name,
|
|
1894
1894
|
user: {
|
|
1895
|
-
identifier: (
|
|
1895
|
+
identifier: (o = t.user) == null ? void 0 : o.identifier,
|
|
1896
1896
|
identifier_type: (c = t.user) == null ? void 0 : c.identifier_type
|
|
1897
1897
|
},
|
|
1898
|
-
tracking_id: (
|
|
1898
|
+
tracking_id: (d = t.metadata) == null ? void 0 : d.tracking_id,
|
|
1899
1899
|
page: (u = t.args) == null ? void 0 : u.page
|
|
1900
1900
|
};
|
|
1901
|
-
"user_address" in t && (
|
|
1902
|
-
const g = [...l,
|
|
1903
|
-
g.length >
|
|
1901
|
+
"user_address" in t && (f.user_address = t.user_address);
|
|
1902
|
+
const g = [...l, f];
|
|
1903
|
+
g.length > Qe && g.splice(0, g.length - Qe), localStorage.setItem(r, JSON.stringify(g));
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
1907
|
-
const
|
|
1908
|
-
version:
|
|
1907
|
+
const dr = "7.0.7", fr = {
|
|
1908
|
+
version: dr
|
|
1909
1909
|
};
|
|
1910
|
-
class
|
|
1910
|
+
class hr {
|
|
1911
1911
|
constructor(t) {
|
|
1912
|
-
|
|
1913
|
-
|
|
1912
|
+
C(this, "client");
|
|
1913
|
+
C(this, "defaultQueryParams");
|
|
1914
1914
|
this.client = E.create({
|
|
1915
1915
|
...t,
|
|
1916
1916
|
headers: {
|
|
@@ -1945,6 +1945,14 @@ class dr {
|
|
|
1945
1945
|
method: "PUT"
|
|
1946
1946
|
});
|
|
1947
1947
|
}
|
|
1948
|
+
async patch(t) {
|
|
1949
|
+
return this.client.request({
|
|
1950
|
+
url: t.path,
|
|
1951
|
+
params: this.makeQueryParams(t.queryParams),
|
|
1952
|
+
data: t.postData,
|
|
1953
|
+
method: "PATCH"
|
|
1954
|
+
});
|
|
1955
|
+
}
|
|
1948
1956
|
async delete(t) {
|
|
1949
1957
|
return this.client.request({
|
|
1950
1958
|
url: t.path,
|
|
@@ -1953,9 +1961,69 @@ class dr {
|
|
|
1953
1961
|
});
|
|
1954
1962
|
}
|
|
1955
1963
|
}
|
|
1956
|
-
class
|
|
1964
|
+
class pr {
|
|
1957
1965
|
constructor(t) {
|
|
1958
|
-
|
|
1966
|
+
C(this, "httpClient");
|
|
1967
|
+
C(this, "_debug");
|
|
1968
|
+
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1969
|
+
}
|
|
1970
|
+
async listUserInviteCodes(t) {
|
|
1971
|
+
return (await this.httpClient.get({
|
|
1972
|
+
path: "/invite_codes",
|
|
1973
|
+
queryParams: {
|
|
1974
|
+
user_identifier: t.user_identifier,
|
|
1975
|
+
user_identifier_type: t.user_identifier_type,
|
|
1976
|
+
page: t.page,
|
|
1977
|
+
page_size: t.page_size
|
|
1978
|
+
}
|
|
1979
|
+
})).data;
|
|
1980
|
+
}
|
|
1981
|
+
async generateInviteCodes(t) {
|
|
1982
|
+
return (await this.httpClient.post({
|
|
1983
|
+
path: "/invite_codes",
|
|
1984
|
+
queryParams: {
|
|
1985
|
+
user_identifier: t.user_identifier,
|
|
1986
|
+
user_identifier_type: t.user_identifier_type
|
|
1987
|
+
}
|
|
1988
|
+
})).data;
|
|
1989
|
+
}
|
|
1990
|
+
async getInvitationStatus(t) {
|
|
1991
|
+
return (await this.httpClient.get({
|
|
1992
|
+
path: "/invite_codes/status",
|
|
1993
|
+
queryParams: {
|
|
1994
|
+
user_identifier: t.user_identifier,
|
|
1995
|
+
user_identifier_type: t.user_identifier_type
|
|
1996
|
+
}
|
|
1997
|
+
})).data;
|
|
1998
|
+
}
|
|
1999
|
+
async checkInviteCode(t) {
|
|
2000
|
+
return (await this.httpClient.get({
|
|
2001
|
+
path: "/invite_codes/check",
|
|
2002
|
+
queryParams: {
|
|
2003
|
+
code: t.code
|
|
2004
|
+
}
|
|
2005
|
+
})).data;
|
|
2006
|
+
}
|
|
2007
|
+
async useInviteCode(t) {
|
|
2008
|
+
const { code: n, user_identifier: r, user_identifier_type: s, signature: i, signature_message: o, chain_id: c } = t;
|
|
2009
|
+
await this.httpClient.patch({
|
|
2010
|
+
path: "/invite_codes/use",
|
|
2011
|
+
queryParams: {
|
|
2012
|
+
code: n,
|
|
2013
|
+
user_identifier: r,
|
|
2014
|
+
user_identifier_type: s,
|
|
2015
|
+
chain_id: c
|
|
2016
|
+
},
|
|
2017
|
+
postData: {
|
|
2018
|
+
signature: i,
|
|
2019
|
+
signature_message: o
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
class mr {
|
|
2025
|
+
constructor(t) {
|
|
2026
|
+
C(this, "httpClient");
|
|
1959
2027
|
this.httpClient = t.httpClient;
|
|
1960
2028
|
}
|
|
1961
2029
|
async getPayoutsLeaderboard(t) {
|
|
@@ -1977,52 +2045,52 @@ class hr {
|
|
|
1977
2045
|
})).data;
|
|
1978
2046
|
}
|
|
1979
2047
|
}
|
|
1980
|
-
const
|
|
1981
|
-
class
|
|
2048
|
+
const z = "/payouts";
|
|
2049
|
+
class yr {
|
|
1982
2050
|
constructor(t) {
|
|
1983
|
-
|
|
1984
|
-
|
|
2051
|
+
C(this, "httpClient");
|
|
2052
|
+
C(this, "_debug");
|
|
1985
2053
|
this.httpClient = t.httpClient, this._debug = t.debug;
|
|
1986
2054
|
}
|
|
1987
2055
|
async getUserPayoutsByConversion(t) {
|
|
1988
2056
|
return (await this.httpClient.get({
|
|
1989
|
-
path:
|
|
2057
|
+
path: z,
|
|
1990
2058
|
queryParams: { ...t, type: "onchain-currency" }
|
|
1991
2059
|
})).data;
|
|
1992
2060
|
}
|
|
1993
2061
|
async getUserPointsByConversion(t) {
|
|
1994
2062
|
return (await this.httpClient.get({
|
|
1995
|
-
path:
|
|
2063
|
+
path: z,
|
|
1996
2064
|
queryParams: { ...t, type: "point" }
|
|
1997
2065
|
})).data;
|
|
1998
2066
|
}
|
|
1999
2067
|
async getUserPayoutMovements(t) {
|
|
2000
2068
|
return (await this.httpClient.get({
|
|
2001
|
-
path: `${
|
|
2069
|
+
path: `${z}/movements`,
|
|
2002
2070
|
queryParams: { ...t, type: "onchain-currency" }
|
|
2003
2071
|
})).data;
|
|
2004
2072
|
}
|
|
2005
2073
|
async getUserPointsMovements(t) {
|
|
2006
2074
|
return (await this.httpClient.get({
|
|
2007
|
-
path: `${
|
|
2075
|
+
path: `${z}/movements`,
|
|
2008
2076
|
queryParams: { ...t, type: "point" }
|
|
2009
2077
|
})).data;
|
|
2010
2078
|
}
|
|
2011
2079
|
async getVolumeLeaderboard(t) {
|
|
2012
2080
|
return (await this.httpClient.get({
|
|
2013
|
-
path: `${
|
|
2081
|
+
path: `${z}/leaderboard/volume`,
|
|
2014
2082
|
queryParams: { ...t }
|
|
2015
2083
|
})).data;
|
|
2016
2084
|
}
|
|
2017
2085
|
}
|
|
2018
|
-
const
|
|
2019
|
-
let
|
|
2086
|
+
const gr = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
2087
|
+
let wr = (e = 21) => {
|
|
2020
2088
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
2021
2089
|
for (; e--; )
|
|
2022
|
-
t +=
|
|
2090
|
+
t += gr[n[e] & 63];
|
|
2023
2091
|
return t;
|
|
2024
2092
|
};
|
|
2025
|
-
const
|
|
2093
|
+
const br = "fuul.tracking_id", Ae = () => Tr(br, () => wr()), Xe = () => q("af") || q("referrer"), Er = () => document.referrer, Sr = () => Ar(), Cr = () => q("category"), _r = () => q("title"), Rr = () => q("tag"), Tr = (e, t) => {
|
|
2026
2094
|
const n = localStorage.getItem(e);
|
|
2027
2095
|
if (n)
|
|
2028
2096
|
return n;
|
|
@@ -2030,31 +2098,31 @@ const gr = "fuul.tracking_id", Ae = () => Rr(gr, () => yr()), Qe = () => v("af")
|
|
|
2030
2098
|
const r = t();
|
|
2031
2099
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
2032
2100
|
}
|
|
2033
|
-
},
|
|
2034
|
-
const e =
|
|
2101
|
+
}, q = (e) => new URLSearchParams(window.location.search).get(e), Ar = () => {
|
|
2102
|
+
const e = q("source");
|
|
2035
2103
|
if (e)
|
|
2036
2104
|
return e;
|
|
2037
|
-
},
|
|
2038
|
-
class
|
|
2105
|
+
}, Pr = "/user";
|
|
2106
|
+
class Or {
|
|
2039
2107
|
constructor(t) {
|
|
2040
|
-
|
|
2108
|
+
C(this, "httpClient");
|
|
2041
2109
|
this.httpClient = t.httpClient;
|
|
2042
2110
|
}
|
|
2043
2111
|
async getUserAffiliates(t) {
|
|
2044
|
-
return (await this.httpClient.get({ path:
|
|
2112
|
+
return (await this.httpClient.get({ path: Pr, queryParams: { ...t } })).data.affiliates;
|
|
2045
2113
|
}
|
|
2046
2114
|
}
|
|
2047
|
-
const
|
|
2048
|
-
let
|
|
2049
|
-
function
|
|
2050
|
-
|
|
2115
|
+
const Nr = "https://api.fuul.xyz/api/v1/";
|
|
2116
|
+
let D = !1, Ce = !1, Pe, L, Ct, _t, $, de, H, Rt, fe, K;
|
|
2117
|
+
function xr(e) {
|
|
2118
|
+
D = !!e.debug, !Ce && (Pe = e.apiKey, ts(), L = ns(e.baseApiUrl ?? Nr, e.defaultQueryParams ?? {}), Ct = new ar({ httpClient: L, debug: D }), de = new lr({ httpClient: L, debug: D }), $ = new sr({ httpClient: L, debug: D }), H = new yr({ httpClient: L, debug: D }), _t = new Or({ httpClient: L }), Rt = new or({ httpClient: L, debug: D }), fe = new mr({ httpClient: L }), K = new pr({ httpClient: L, debug: D }), Ce = !0, D && console.debug("Fuul SDK: init() complete"));
|
|
2051
2119
|
}
|
|
2052
|
-
function
|
|
2053
|
-
if (!
|
|
2120
|
+
function T() {
|
|
2121
|
+
if (!Ce)
|
|
2054
2122
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
2055
2123
|
}
|
|
2056
|
-
async function
|
|
2057
|
-
|
|
2124
|
+
async function Ur(e, t) {
|
|
2125
|
+
T(), Oe(), Ne();
|
|
2058
2126
|
const n = {
|
|
2059
2127
|
name: e,
|
|
2060
2128
|
args: t ?? {},
|
|
@@ -2062,10 +2130,10 @@ async function Nr(e, t) {
|
|
|
2062
2130
|
tracking_id: Ae()
|
|
2063
2131
|
}
|
|
2064
2132
|
};
|
|
2065
|
-
await
|
|
2133
|
+
await de.sendEvent(n);
|
|
2066
2134
|
}
|
|
2067
|
-
async function
|
|
2068
|
-
|
|
2135
|
+
async function Lr(e, t) {
|
|
2136
|
+
T(), Oe(), Ne();
|
|
2069
2137
|
const n = {
|
|
2070
2138
|
name: "pageview",
|
|
2071
2139
|
args: {
|
|
@@ -2074,19 +2142,19 @@ async function xr(e, t) {
|
|
|
2074
2142
|
},
|
|
2075
2143
|
metadata: {
|
|
2076
2144
|
tracking_id: Ae(),
|
|
2077
|
-
referrer_url:
|
|
2078
|
-
source:
|
|
2079
|
-
affiliate_id:
|
|
2080
|
-
referrer:
|
|
2081
|
-
category:
|
|
2082
|
-
title:
|
|
2083
|
-
tag:
|
|
2145
|
+
referrer_url: Er(),
|
|
2146
|
+
source: Sr(),
|
|
2147
|
+
affiliate_id: Xe() ?? void 0,
|
|
2148
|
+
referrer: Xe() ?? void 0,
|
|
2149
|
+
category: Cr() ?? void 0,
|
|
2150
|
+
title: _r() ?? void 0,
|
|
2151
|
+
tag: Rr() ?? void 0
|
|
2084
2152
|
}
|
|
2085
2153
|
};
|
|
2086
|
-
await
|
|
2154
|
+
await de.sendEvent(n, t);
|
|
2087
2155
|
}
|
|
2088
|
-
async function
|
|
2089
|
-
|
|
2156
|
+
async function Fr(e, t) {
|
|
2157
|
+
T(), Oe(), Ne();
|
|
2090
2158
|
const n = {
|
|
2091
2159
|
name: "connect_wallet",
|
|
2092
2160
|
user: {
|
|
@@ -2101,108 +2169,142 @@ async function Ur(e, t) {
|
|
|
2101
2169
|
tracking_id: Ae()
|
|
2102
2170
|
}
|
|
2103
2171
|
};
|
|
2104
|
-
e != null && e.signature && (n.signature = e == null ? void 0 : e.signature, n.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (n.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (n.account_chain_id = e.accountChainId), await
|
|
2105
|
-
}
|
|
2106
|
-
async function
|
|
2107
|
-
|
|
2172
|
+
e != null && e.signature && (n.signature = e == null ? void 0 : e.signature, n.signature_message = e == null ? void 0 : e.message), e != null && e.signaturePublicKey && (n.signature_public_key = e.signaturePublicKey), e != null && e.accountChainId && (n.account_chain_id = e.accountChainId), await de.sendEvent(n, t);
|
|
2173
|
+
}
|
|
2174
|
+
async function Dr(e) {
|
|
2175
|
+
T(), await $.create(
|
|
2176
|
+
e.userIdentifier,
|
|
2177
|
+
e.identifierType,
|
|
2178
|
+
e.code,
|
|
2179
|
+
e.signature,
|
|
2180
|
+
e.signaturePublicKey,
|
|
2181
|
+
e.accountChainId
|
|
2182
|
+
);
|
|
2108
2183
|
}
|
|
2109
|
-
async function
|
|
2110
|
-
|
|
2184
|
+
async function kr(e) {
|
|
2185
|
+
T(), await $.update(
|
|
2186
|
+
e.userIdentifier,
|
|
2187
|
+
e.identifierType,
|
|
2188
|
+
e.code,
|
|
2189
|
+
e.signature,
|
|
2190
|
+
e.signaturePublicKey,
|
|
2191
|
+
e.accountChainId
|
|
2192
|
+
);
|
|
2111
2193
|
}
|
|
2112
|
-
async function
|
|
2113
|
-
return
|
|
2194
|
+
async function vr(e, t) {
|
|
2195
|
+
return T(), await $.getCode(e, t);
|
|
2114
2196
|
}
|
|
2115
|
-
async function
|
|
2116
|
-
return
|
|
2197
|
+
async function Ir(e) {
|
|
2198
|
+
return T(), await $.isCodeFree(e);
|
|
2117
2199
|
}
|
|
2118
2200
|
async function Br(e, t, n, r) {
|
|
2119
|
-
|
|
2120
|
-
const s = await $.getCode(t, n),
|
|
2201
|
+
T();
|
|
2202
|
+
const s = await $.getCode(t, n), i = new URLSearchParams({
|
|
2121
2203
|
af: s ?? t
|
|
2122
2204
|
});
|
|
2123
|
-
return r != null && r.title &&
|
|
2205
|
+
return r != null && r.title && i.append("af_title", r.title), r != null && r.format && i.append("af_format", r.format), r != null && r.place && i.append("af_place", r.place), `${e}?${i.toString()}`;
|
|
2124
2206
|
}
|
|
2125
2207
|
function qr(e) {
|
|
2126
2208
|
return fe.getPayoutsLeaderboard(e);
|
|
2127
2209
|
}
|
|
2128
|
-
function
|
|
2210
|
+
function jr(e) {
|
|
2129
2211
|
return fe.getPointsLeaderboard(e);
|
|
2130
2212
|
}
|
|
2131
|
-
function
|
|
2213
|
+
function Mr(e) {
|
|
2132
2214
|
return fe.getReferredUsersLeaderboard(e);
|
|
2133
2215
|
}
|
|
2134
|
-
function
|
|
2216
|
+
function $r(e) {
|
|
2135
2217
|
return H.getVolumeLeaderboard(e);
|
|
2136
2218
|
}
|
|
2137
|
-
function
|
|
2219
|
+
function Hr(e) {
|
|
2138
2220
|
return H.getUserPayoutsByConversion(e);
|
|
2139
2221
|
}
|
|
2140
|
-
function
|
|
2222
|
+
function Kr(e) {
|
|
2141
2223
|
return H.getUserPointsByConversion(e);
|
|
2142
2224
|
}
|
|
2143
|
-
function
|
|
2225
|
+
function Vr(e) {
|
|
2144
2226
|
return H.getUserPayoutMovements(e);
|
|
2145
2227
|
}
|
|
2146
|
-
function
|
|
2228
|
+
function zr(e) {
|
|
2147
2229
|
return H.getUserPointsMovements(e);
|
|
2148
2230
|
}
|
|
2149
|
-
async function
|
|
2150
|
-
return
|
|
2231
|
+
async function Jr(e) {
|
|
2232
|
+
return T(), Ct.getAll(e);
|
|
2151
2233
|
}
|
|
2152
|
-
async function
|
|
2153
|
-
return
|
|
2234
|
+
async function Wr(e) {
|
|
2235
|
+
return T(), _t.getUserAffiliates(e);
|
|
2154
2236
|
}
|
|
2155
|
-
async function
|
|
2156
|
-
return
|
|
2237
|
+
async function Qr(e) {
|
|
2238
|
+
return T(), Rt.getUserAudiences(e);
|
|
2239
|
+
}
|
|
2240
|
+
async function Xr(e) {
|
|
2241
|
+
return T(), K.listUserInviteCodes(e);
|
|
2242
|
+
}
|
|
2243
|
+
async function Yr(e) {
|
|
2244
|
+
return T(), K.generateInviteCodes(e);
|
|
2245
|
+
}
|
|
2246
|
+
async function Gr(e) {
|
|
2247
|
+
return T(), K.getInvitationStatus(e);
|
|
2248
|
+
}
|
|
2249
|
+
async function Zr(e) {
|
|
2250
|
+
return T(), K.checkInviteCode(e);
|
|
2251
|
+
}
|
|
2252
|
+
async function es(e) {
|
|
2253
|
+
return T(), K.useInviteCode(e);
|
|
2157
2254
|
}
|
|
2158
2255
|
function Oe() {
|
|
2159
2256
|
if (typeof window > "u" || typeof document > "u")
|
|
2160
2257
|
throw new Error("Fuul SDK: Browser context required");
|
|
2161
2258
|
}
|
|
2162
|
-
function
|
|
2259
|
+
function Ne() {
|
|
2163
2260
|
if (navigator.webdriver)
|
|
2164
2261
|
throw new Error("Fuul SDK: Error");
|
|
2165
2262
|
}
|
|
2166
|
-
function
|
|
2167
|
-
if (!
|
|
2263
|
+
function ts() {
|
|
2264
|
+
if (!Pe)
|
|
2168
2265
|
throw new Error("Fuul SDK: Invalid API key");
|
|
2169
2266
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return new
|
|
2267
|
+
function ns(e, t) {
|
|
2268
|
+
return new hr({
|
|
2172
2269
|
baseURL: e,
|
|
2173
2270
|
timeout: 3e4,
|
|
2174
|
-
apiKey:
|
|
2271
|
+
apiKey: Pe,
|
|
2175
2272
|
queryParams: t
|
|
2176
2273
|
});
|
|
2177
2274
|
}
|
|
2178
|
-
const
|
|
2179
|
-
init:
|
|
2180
|
-
sendEvent:
|
|
2181
|
-
sendPageview:
|
|
2182
|
-
identifyUser:
|
|
2275
|
+
const Cs = {
|
|
2276
|
+
init: xr,
|
|
2277
|
+
sendEvent: Ur,
|
|
2278
|
+
sendPageview: Lr,
|
|
2279
|
+
identifyUser: Fr,
|
|
2183
2280
|
generateTrackingLink: Br,
|
|
2184
|
-
getConversions:
|
|
2185
|
-
createAffiliateCode:
|
|
2186
|
-
updateAffiliateCode:
|
|
2187
|
-
getAffiliateCode:
|
|
2188
|
-
isAffiliateCodeFree:
|
|
2281
|
+
getConversions: Jr,
|
|
2282
|
+
createAffiliateCode: Dr,
|
|
2283
|
+
updateAffiliateCode: kr,
|
|
2284
|
+
getAffiliateCode: vr,
|
|
2285
|
+
isAffiliateCodeFree: Ir,
|
|
2189
2286
|
getPayoutsLeaderboard: qr,
|
|
2190
|
-
getPointsLeaderboard:
|
|
2191
|
-
getReferredUsersLeaderboard:
|
|
2192
|
-
getUserAudiences:
|
|
2193
|
-
getUserPayoutsByConversion:
|
|
2194
|
-
getUserPointsByConversion:
|
|
2195
|
-
getUserPointsMovements:
|
|
2196
|
-
getUserPayoutMovements:
|
|
2197
|
-
getUserAffiliates:
|
|
2198
|
-
getVolumeLeaderboard:
|
|
2287
|
+
getPointsLeaderboard: jr,
|
|
2288
|
+
getReferredUsersLeaderboard: Mr,
|
|
2289
|
+
getUserAudiences: Qr,
|
|
2290
|
+
getUserPayoutsByConversion: Hr,
|
|
2291
|
+
getUserPointsByConversion: Kr,
|
|
2292
|
+
getUserPointsMovements: zr,
|
|
2293
|
+
getUserPayoutMovements: Vr,
|
|
2294
|
+
getUserAffiliates: Wr,
|
|
2295
|
+
getVolumeLeaderboard: $r,
|
|
2296
|
+
listUserInviteCodes: Xr,
|
|
2297
|
+
generateInviteCodes: Yr,
|
|
2298
|
+
getInvitationStatus: Gr,
|
|
2299
|
+
checkInviteCode: Zr,
|
|
2300
|
+
useInviteCode: es
|
|
2199
2301
|
};
|
|
2200
|
-
var
|
|
2302
|
+
var rs = /* @__PURE__ */ ((e) => (e.EvmAddress = "evm_address", e.SolanaAddress = "solana_address", e.Email = "email", e))(rs || {});
|
|
2201
2303
|
export {
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2304
|
+
Ve as AddressInUseError,
|
|
2305
|
+
ze as CodeInUseError,
|
|
2306
|
+
Cs as Fuul,
|
|
2307
|
+
Je as InvalidSignatureError,
|
|
2308
|
+
rs as UserIdentifierType,
|
|
2309
|
+
Ke as ValidationError
|
|
2208
2310
|
};
|