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