@fuul/sdk 2.0.3 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +318 -325
- package/dist/index.umd.js +3 -3
- package/dist/tracking.d.ts +3 -1
- package/dist/tracking.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
class
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var ve = (e, t, n) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var C = (e, t, n) => (ve(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
+
class We {
|
|
5
5
|
constructor(t) {
|
|
6
|
-
|
|
6
|
+
C(this, "httpClient");
|
|
7
7
|
this.httpClient = t.httpClient;
|
|
8
8
|
}
|
|
9
9
|
async getAll() {
|
|
@@ -11,11 +11,11 @@ class Ye {
|
|
|
11
11
|
return t;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
class
|
|
14
|
+
const fe = "fuul.sent", Ge = 60;
|
|
15
|
+
class Ye {
|
|
16
16
|
constructor(t) {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
C(this, "debug");
|
|
18
|
+
C(this, "httpClient");
|
|
19
19
|
this.httpClient = t.httpClient, this.debug = !!t.debug;
|
|
20
20
|
}
|
|
21
21
|
async sendEvent(t) {
|
|
@@ -26,7 +26,7 @@ class Qe {
|
|
|
26
26
|
await this.httpClient.post("events", t), this.debug && console.debug(`Fuul SDK: Sent '${t.name}' event`), this.saveSentEvent(t);
|
|
27
27
|
}
|
|
28
28
|
isDuplicate(t) {
|
|
29
|
-
const n = `${
|
|
29
|
+
const n = `${fe}_${t.name}`, r = localStorage.getItem(n);
|
|
30
30
|
if (!r)
|
|
31
31
|
return !1;
|
|
32
32
|
const s = JSON.parse(r);
|
|
@@ -41,36 +41,36 @@ class Qe {
|
|
|
41
41
|
return Date.now() / 1e3;
|
|
42
42
|
}
|
|
43
43
|
saveSentEvent(t) {
|
|
44
|
-
const n = `${
|
|
44
|
+
const n = `${fe}_${t.name}`, r = this.getCurrentTimestamp(), s = { ...t, timestamp: r };
|
|
45
45
|
localStorage.setItem(n, JSON.stringify(s));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Re(e, t) {
|
|
49
49
|
return function() {
|
|
50
50
|
return e.apply(t, arguments);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
const { toString:
|
|
54
|
-
const n =
|
|
53
|
+
const { toString: Oe } = Object.prototype, { getPrototypeOf: ne } = Object, re = ((e) => (t) => {
|
|
54
|
+
const n = Oe.call(t);
|
|
55
55
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
56
|
-
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) =>
|
|
57
|
-
function
|
|
58
|
-
return e !== null && !
|
|
56
|
+
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => re(t) === e), $ = (e) => (t) => typeof t === e, { isArray: x } = Array, F = $("undefined");
|
|
57
|
+
function Qe(e) {
|
|
58
|
+
return e !== null && !F(e) && e.constructor !== null && !F(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
61
|
-
function
|
|
60
|
+
const Ae = O("ArrayBuffer");
|
|
61
|
+
function Xe(e) {
|
|
62
62
|
let t;
|
|
63
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
63
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ae(e.buffer), t;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
65
|
+
const Ze = $("string"), P = $("function"), Te = $("number"), se = (e) => e !== null && typeof e == "object", et = (e) => e === !0 || e === !1, j = (e) => {
|
|
66
|
+
if (re(e) !== "object")
|
|
67
67
|
return !1;
|
|
68
|
-
const t =
|
|
68
|
+
const t = ne(e);
|
|
69
69
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
70
|
-
},
|
|
70
|
+
}, tt = O("Date"), nt = O("File"), rt = O("Blob"), st = O("FileList"), ot = (e) => se(e) && P(e.pipe), it = (e) => {
|
|
71
71
|
const t = "[object FormData]";
|
|
72
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
73
|
-
},
|
|
72
|
+
return e && (typeof FormData == "function" && e instanceof FormData || Oe.call(e) === t || P(e.toString) && e.toString() === t);
|
|
73
|
+
}, at = O("URLSearchParams"), ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
74
74
|
function U(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
75
75
|
if (e === null || typeof e > "u")
|
|
76
76
|
return;
|
|
@@ -85,7 +85,7 @@ function U(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
85
85
|
u = o[r], t.call(null, e[u], u, e);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Pe(e, t) {
|
|
89
89
|
t = t.toLowerCase();
|
|
90
90
|
const n = Object.keys(e);
|
|
91
91
|
let r = n.length, s;
|
|
@@ -94,23 +94,23 @@ function Ce(e, t) {
|
|
|
94
94
|
return s;
|
|
95
95
|
return null;
|
|
96
96
|
}
|
|
97
|
-
const
|
|
98
|
-
function
|
|
99
|
-
const { caseless: e } =
|
|
100
|
-
const o = e &&
|
|
101
|
-
|
|
97
|
+
const Ne = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ce = (e) => !F(e) && e !== Ne;
|
|
98
|
+
function Q() {
|
|
99
|
+
const { caseless: e } = Ce(this) && this || {}, t = {}, n = (r, s) => {
|
|
100
|
+
const o = e && Pe(t, s) || s;
|
|
101
|
+
j(t[o]) && j(r) ? t[o] = Q(t[o], r) : j(r) ? t[o] = Q({}, r) : x(r) ? t[o] = r.slice() : t[o] = r;
|
|
102
102
|
};
|
|
103
103
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
104
104
|
arguments[r] && U(arguments[r], n);
|
|
105
105
|
return t;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
n &&
|
|
109
|
-
}, { allOwnKeys: r }), e),
|
|
107
|
+
const ut = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
|
|
108
|
+
n && P(s) ? e[o] = Re(s, n) : e[o] = s;
|
|
109
|
+
}, { allOwnKeys: r }), e), lt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), ft = (e, t, n, r) => {
|
|
110
110
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
111
111
|
value: t.prototype
|
|
112
112
|
}), n && Object.assign(e.prototype, n);
|
|
113
|
-
},
|
|
113
|
+
}, dt = (e, t, n, r) => {
|
|
114
114
|
let s, o, i;
|
|
115
115
|
const u = {};
|
|
116
116
|
if (t = t || {}, e == null)
|
|
@@ -118,54 +118,54 @@ const lt = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
|
|
|
118
118
|
do {
|
|
119
119
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
120
120
|
i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
|
|
121
|
-
e = n !== !1 &&
|
|
121
|
+
e = n !== !1 && ne(e);
|
|
122
122
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
123
123
|
return t;
|
|
124
|
-
},
|
|
124
|
+
}, pt = (e, t, n) => {
|
|
125
125
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
126
126
|
const r = e.indexOf(t, n);
|
|
127
127
|
return r !== -1 && r === n;
|
|
128
|
-
},
|
|
128
|
+
}, ht = (e) => {
|
|
129
129
|
if (!e)
|
|
130
130
|
return null;
|
|
131
131
|
if (x(e))
|
|
132
132
|
return e;
|
|
133
133
|
let t = e.length;
|
|
134
|
-
if (!
|
|
134
|
+
if (!Te(t))
|
|
135
135
|
return null;
|
|
136
136
|
const n = new Array(t);
|
|
137
137
|
for (; t-- > 0; )
|
|
138
138
|
n[t] = e[t];
|
|
139
139
|
return n;
|
|
140
|
-
},
|
|
140
|
+
}, mt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ne(Uint8Array)), yt = (e, t) => {
|
|
141
141
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
142
142
|
let s;
|
|
143
143
|
for (; (s = r.next()) && !s.done; ) {
|
|
144
144
|
const o = s.value;
|
|
145
145
|
t.call(e, o[0], o[1]);
|
|
146
146
|
}
|
|
147
|
-
},
|
|
147
|
+
}, Et = (e, t) => {
|
|
148
148
|
let n;
|
|
149
149
|
const r = [];
|
|
150
150
|
for (; (n = e.exec(t)) !== null; )
|
|
151
151
|
r.push(n);
|
|
152
152
|
return r;
|
|
153
|
-
},
|
|
153
|
+
}, wt = O("HTMLFormElement"), gt = (e) => e.toLowerCase().replace(
|
|
154
154
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
155
155
|
function(n, r, s) {
|
|
156
156
|
return r.toUpperCase() + s;
|
|
157
157
|
}
|
|
158
|
-
),
|
|
158
|
+
), de = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), St = O("RegExp"), _e = (e, t) => {
|
|
159
159
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
160
160
|
U(n, (s, o) => {
|
|
161
161
|
t(s, o, e) !== !1 && (r[o] = s);
|
|
162
162
|
}), Object.defineProperties(e, r);
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
if (
|
|
163
|
+
}, bt = (e) => {
|
|
164
|
+
_e(e, (t, n) => {
|
|
165
|
+
if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
166
166
|
return !1;
|
|
167
167
|
const r = e[n];
|
|
168
|
-
if (
|
|
168
|
+
if (P(r)) {
|
|
169
169
|
if (t.enumerable = !1, "writable" in t) {
|
|
170
170
|
t.writable = !1;
|
|
171
171
|
return;
|
|
@@ -175,31 +175,31 @@ const lt = (e, t, n, { allOwnKeys: r } = {}) => (U(t, (s, o) => {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
},
|
|
178
|
+
}, Rt = (e, t) => {
|
|
179
179
|
const n = {}, r = (s) => {
|
|
180
180
|
s.forEach((o) => {
|
|
181
181
|
n[o] = !0;
|
|
182
182
|
});
|
|
183
183
|
};
|
|
184
184
|
return x(e) ? r(e) : r(String(e).split(t)), n;
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
DIGIT:
|
|
188
|
-
ALPHA:
|
|
189
|
-
ALPHA_DIGIT:
|
|
190
|
-
},
|
|
185
|
+
}, Ot = () => {
|
|
186
|
+
}, At = (e, t) => (e = +e, Number.isFinite(e) ? e : t), M = "abcdefghijklmnopqrstuvwxyz", pe = "0123456789", xe = {
|
|
187
|
+
DIGIT: pe,
|
|
188
|
+
ALPHA: M,
|
|
189
|
+
ALPHA_DIGIT: M + M.toUpperCase() + pe
|
|
190
|
+
}, Tt = (e = 16, t = xe.ALPHA_DIGIT) => {
|
|
191
191
|
let n = "";
|
|
192
192
|
const { length: r } = t;
|
|
193
193
|
for (; e--; )
|
|
194
194
|
n += t[Math.random() * r | 0];
|
|
195
195
|
return n;
|
|
196
196
|
};
|
|
197
|
-
function
|
|
198
|
-
return !!(e &&
|
|
197
|
+
function Pt(e) {
|
|
198
|
+
return !!(e && P(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const Nt = (e) => {
|
|
201
201
|
const t = new Array(10), n = (r, s) => {
|
|
202
|
-
if (
|
|
202
|
+
if (se(r)) {
|
|
203
203
|
if (t.indexOf(r) >= 0)
|
|
204
204
|
return;
|
|
205
205
|
if (!("toJSON" in r)) {
|
|
@@ -207,7 +207,7 @@ const Pt = (e) => {
|
|
|
207
207
|
const o = x(r) ? [] : {};
|
|
208
208
|
return U(r, (i, u) => {
|
|
209
209
|
const d = n(i, s + 1);
|
|
210
|
-
!
|
|
210
|
+
!F(d) && (o[u] = d);
|
|
211
211
|
}), t[s] = void 0, o;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
@@ -216,55 +216,55 @@ const Pt = (e) => {
|
|
|
216
216
|
return n(e, 0);
|
|
217
217
|
}, a = {
|
|
218
218
|
isArray: x,
|
|
219
|
-
isArrayBuffer:
|
|
220
|
-
isBuffer:
|
|
221
|
-
isFormData:
|
|
222
|
-
isArrayBufferView:
|
|
223
|
-
isString:
|
|
224
|
-
isNumber:
|
|
225
|
-
isBoolean:
|
|
226
|
-
isObject:
|
|
227
|
-
isPlainObject:
|
|
228
|
-
isUndefined:
|
|
229
|
-
isDate:
|
|
230
|
-
isFile:
|
|
231
|
-
isBlob:
|
|
232
|
-
isRegExp:
|
|
233
|
-
isFunction:
|
|
234
|
-
isStream:
|
|
235
|
-
isURLSearchParams:
|
|
236
|
-
isTypedArray:
|
|
237
|
-
isFileList:
|
|
219
|
+
isArrayBuffer: Ae,
|
|
220
|
+
isBuffer: Qe,
|
|
221
|
+
isFormData: it,
|
|
222
|
+
isArrayBufferView: Xe,
|
|
223
|
+
isString: Ze,
|
|
224
|
+
isNumber: Te,
|
|
225
|
+
isBoolean: et,
|
|
226
|
+
isObject: se,
|
|
227
|
+
isPlainObject: j,
|
|
228
|
+
isUndefined: F,
|
|
229
|
+
isDate: tt,
|
|
230
|
+
isFile: nt,
|
|
231
|
+
isBlob: rt,
|
|
232
|
+
isRegExp: St,
|
|
233
|
+
isFunction: P,
|
|
234
|
+
isStream: ot,
|
|
235
|
+
isURLSearchParams: at,
|
|
236
|
+
isTypedArray: mt,
|
|
237
|
+
isFileList: st,
|
|
238
238
|
forEach: U,
|
|
239
|
-
merge:
|
|
240
|
-
extend:
|
|
241
|
-
trim:
|
|
242
|
-
stripBOM:
|
|
243
|
-
inherits:
|
|
244
|
-
toFlatObject:
|
|
245
|
-
kindOf:
|
|
239
|
+
merge: Q,
|
|
240
|
+
extend: ut,
|
|
241
|
+
trim: ct,
|
|
242
|
+
stripBOM: lt,
|
|
243
|
+
inherits: ft,
|
|
244
|
+
toFlatObject: dt,
|
|
245
|
+
kindOf: re,
|
|
246
246
|
kindOfTest: O,
|
|
247
|
-
endsWith:
|
|
248
|
-
toArray:
|
|
249
|
-
forEachEntry:
|
|
250
|
-
matchAll:
|
|
251
|
-
isHTMLForm:
|
|
252
|
-
hasOwnProperty:
|
|
253
|
-
hasOwnProp:
|
|
247
|
+
endsWith: pt,
|
|
248
|
+
toArray: ht,
|
|
249
|
+
forEachEntry: yt,
|
|
250
|
+
matchAll: Et,
|
|
251
|
+
isHTMLForm: wt,
|
|
252
|
+
hasOwnProperty: de,
|
|
253
|
+
hasOwnProp: de,
|
|
254
254
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
255
|
-
reduceDescriptors:
|
|
256
|
-
freezeMethods:
|
|
257
|
-
toObjectSet:
|
|
258
|
-
toCamelCase:
|
|
259
|
-
noop:
|
|
260
|
-
toFiniteNumber:
|
|
261
|
-
findKey:
|
|
262
|
-
global:
|
|
263
|
-
isContextDefined:
|
|
264
|
-
ALPHABET:
|
|
265
|
-
generateString:
|
|
266
|
-
isSpecCompliantForm:
|
|
267
|
-
toJSONObject:
|
|
255
|
+
reduceDescriptors: _e,
|
|
256
|
+
freezeMethods: bt,
|
|
257
|
+
toObjectSet: Rt,
|
|
258
|
+
toCamelCase: gt,
|
|
259
|
+
noop: Ot,
|
|
260
|
+
toFiniteNumber: At,
|
|
261
|
+
findKey: Pe,
|
|
262
|
+
global: Ne,
|
|
263
|
+
isContextDefined: Ce,
|
|
264
|
+
ALPHABET: xe,
|
|
265
|
+
generateString: Tt,
|
|
266
|
+
isSpecCompliantForm: Pt,
|
|
267
|
+
toJSONObject: Nt
|
|
268
268
|
};
|
|
269
269
|
function m(e, t, n, r, s) {
|
|
270
270
|
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);
|
|
@@ -290,7 +290,7 @@ a.inherits(m, Error, {
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
|
-
const De = m.prototype,
|
|
293
|
+
const De = m.prototype, Fe = {};
|
|
294
294
|
[
|
|
295
295
|
"ERR_BAD_OPTION_VALUE",
|
|
296
296
|
"ERR_BAD_OPTION",
|
|
@@ -306,9 +306,9 @@ const De = m.prototype, Ue = {};
|
|
|
306
306
|
"ERR_INVALID_URL"
|
|
307
307
|
// eslint-disable-next-line func-names
|
|
308
308
|
].forEach((e) => {
|
|
309
|
-
|
|
309
|
+
Fe[e] = { value: e };
|
|
310
310
|
});
|
|
311
|
-
Object.defineProperties(m,
|
|
311
|
+
Object.defineProperties(m, Fe);
|
|
312
312
|
Object.defineProperty(De, "isAxiosError", { value: !0 });
|
|
313
313
|
m.from = (e, t, n, r, s, o) => {
|
|
314
314
|
const i = Object.create(De);
|
|
@@ -316,25 +316,25 @@ m.from = (e, t, n, r, s, o) => {
|
|
|
316
316
|
return d !== Error.prototype;
|
|
317
317
|
}, (u) => u !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
318
318
|
};
|
|
319
|
-
const
|
|
320
|
-
function
|
|
319
|
+
const Ct = null;
|
|
320
|
+
function X(e) {
|
|
321
321
|
return a.isPlainObject(e) || a.isArray(e);
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function Ue(e) {
|
|
324
324
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function he(e, t, n) {
|
|
327
327
|
return e ? e.concat(t).map(function(s, o) {
|
|
328
|
-
return s =
|
|
328
|
+
return s = Ue(s), !n && o ? "[" + s + "]" : s;
|
|
329
329
|
}).join(n ? "." : "") : t;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
return a.isArray(e) && !e.some(
|
|
331
|
+
function _t(e) {
|
|
332
|
+
return a.isArray(e) && !e.some(X);
|
|
333
333
|
}
|
|
334
|
-
const
|
|
334
|
+
const xt = a.toFlatObject(a, {}, null, function(t) {
|
|
335
335
|
return /^is[A-Z]/.test(t);
|
|
336
336
|
});
|
|
337
|
-
function
|
|
337
|
+
function K(e, t, n) {
|
|
338
338
|
if (!a.isObject(e))
|
|
339
339
|
throw new TypeError("target must be an object");
|
|
340
340
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -361,34 +361,34 @@ function V(e, t, n) {
|
|
|
361
361
|
if (f && !b && typeof f == "object") {
|
|
362
362
|
if (a.endsWith(h, "{}"))
|
|
363
363
|
h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
|
|
364
|
-
else if (a.isArray(f) &&
|
|
365
|
-
return h =
|
|
366
|
-
!(a.isUndefined(
|
|
364
|
+
else if (a.isArray(f) && _t(f) || (a.isFileList(f) || a.endsWith(h, "[]")) && (g = a.toArray(f)))
|
|
365
|
+
return h = Ue(h), g.forEach(function(B, Ve) {
|
|
366
|
+
!(a.isUndefined(B) || B === null) && t.append(
|
|
367
367
|
// eslint-disable-next-line no-nested-ternary
|
|
368
|
-
i === !0 ?
|
|
369
|
-
c(
|
|
368
|
+
i === !0 ? he([h], Ve, o) : i === null ? h : h + "[]",
|
|
369
|
+
c(B)
|
|
370
370
|
);
|
|
371
371
|
}), !1;
|
|
372
372
|
}
|
|
373
|
-
return
|
|
373
|
+
return X(f) ? !0 : (t.append(he(b, h, o), c(f)), !1);
|
|
374
374
|
}
|
|
375
|
-
const p = [], w = Object.assign(
|
|
375
|
+
const p = [], w = Object.assign(xt, {
|
|
376
376
|
defaultVisitor: l,
|
|
377
377
|
convertValue: c,
|
|
378
|
-
isVisitable:
|
|
378
|
+
isVisitable: X
|
|
379
379
|
});
|
|
380
380
|
function y(f, h) {
|
|
381
381
|
if (!a.isUndefined(f)) {
|
|
382
382
|
if (p.indexOf(f) !== -1)
|
|
383
383
|
throw Error("Circular reference detected in " + h.join("."));
|
|
384
|
-
p.push(f), a.forEach(f, function(g,
|
|
384
|
+
p.push(f), a.forEach(f, function(g, N) {
|
|
385
385
|
(!(a.isUndefined(g) || g === null) && s.call(
|
|
386
386
|
t,
|
|
387
387
|
g,
|
|
388
|
-
a.isString(
|
|
388
|
+
a.isString(N) ? N.trim() : N,
|
|
389
389
|
h,
|
|
390
390
|
w
|
|
391
|
-
)) === !0 && y(g, h ? h.concat(
|
|
391
|
+
)) === !0 && y(g, h ? h.concat(N) : [N]);
|
|
392
392
|
}), p.pop();
|
|
393
393
|
}
|
|
394
394
|
}
|
|
@@ -396,7 +396,7 @@ function V(e, t, n) {
|
|
|
396
396
|
throw new TypeError("data must be an object");
|
|
397
397
|
return y(e), t;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
399
|
+
function me(e) {
|
|
400
400
|
const t = {
|
|
401
401
|
"!": "%21",
|
|
402
402
|
"'": "%27",
|
|
@@ -410,17 +410,17 @@ function ye(e) {
|
|
|
410
410
|
return t[r];
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
this._pairs = [], e &&
|
|
413
|
+
function oe(e, t) {
|
|
414
|
+
this._pairs = [], e && K(e, this, t);
|
|
415
415
|
}
|
|
416
|
-
const
|
|
417
|
-
|
|
416
|
+
const Le = oe.prototype;
|
|
417
|
+
Le.append = function(t, n) {
|
|
418
418
|
this._pairs.push([t, n]);
|
|
419
419
|
};
|
|
420
|
-
|
|
420
|
+
Le.toString = function(t) {
|
|
421
421
|
const n = t ? function(r) {
|
|
422
|
-
return t.call(this, r,
|
|
423
|
-
} :
|
|
422
|
+
return t.call(this, r, me);
|
|
423
|
+
} : me;
|
|
424
424
|
return this._pairs.map(function(s) {
|
|
425
425
|
return n(s[0]) + "=" + n(s[1]);
|
|
426
426
|
}, "").join("&");
|
|
@@ -428,18 +428,18 @@ Be.toString = function(t) {
|
|
|
428
428
|
function Dt(e) {
|
|
429
429
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Be(e, t, n) {
|
|
432
432
|
if (!t)
|
|
433
433
|
return e;
|
|
434
434
|
const r = n && n.encode || Dt, s = n && n.serialize;
|
|
435
435
|
let o;
|
|
436
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
436
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new oe(t, n).toString(r), o) {
|
|
437
437
|
const i = e.indexOf("#");
|
|
438
438
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
439
439
|
}
|
|
440
440
|
return e;
|
|
441
441
|
}
|
|
442
|
-
class
|
|
442
|
+
class Ft {
|
|
443
443
|
constructor() {
|
|
444
444
|
this.handlers = [];
|
|
445
445
|
}
|
|
@@ -493,36 +493,36 @@ class Ut {
|
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
const
|
|
496
|
+
const ye = Ft, Ie = {
|
|
497
497
|
silentJSONParsing: !0,
|
|
498
498
|
forcedJSONParsing: !0,
|
|
499
499
|
clarifyTimeoutError: !1
|
|
500
|
-
},
|
|
500
|
+
}, Ut = typeof URLSearchParams < "u" ? URLSearchParams : oe, Lt = typeof FormData < "u" ? FormData : null, Bt = typeof Blob < "u" ? Blob : null, It = (() => {
|
|
501
501
|
let e;
|
|
502
502
|
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
503
|
-
})(),
|
|
503
|
+
})(), jt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
504
504
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), S = {
|
|
505
505
|
isBrowser: !0,
|
|
506
506
|
classes: {
|
|
507
|
-
URLSearchParams:
|
|
508
|
-
FormData:
|
|
509
|
-
Blob:
|
|
507
|
+
URLSearchParams: Ut,
|
|
508
|
+
FormData: Lt,
|
|
509
|
+
Blob: Bt
|
|
510
510
|
},
|
|
511
|
-
isStandardBrowserEnv:
|
|
512
|
-
isStandardBrowserWebWorkerEnv:
|
|
511
|
+
isStandardBrowserEnv: It,
|
|
512
|
+
isStandardBrowserWebWorkerEnv: jt,
|
|
513
513
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
514
514
|
};
|
|
515
|
-
function
|
|
516
|
-
return
|
|
515
|
+
function kt(e, t) {
|
|
516
|
+
return K(e, new S.classes.URLSearchParams(), Object.assign({
|
|
517
517
|
visitor: function(n, r, s, o) {
|
|
518
518
|
return S.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
519
519
|
}
|
|
520
520
|
}, t));
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function qt(e) {
|
|
523
523
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function Ht(e) {
|
|
526
526
|
const t = {}, n = Object.keys(e);
|
|
527
527
|
let r;
|
|
528
528
|
const s = n.length;
|
|
@@ -531,16 +531,16 @@ function Kt(e) {
|
|
|
531
531
|
o = n[r], t[o] = e[o];
|
|
532
532
|
return t;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function je(e) {
|
|
535
535
|
function t(n, r, s, o) {
|
|
536
536
|
let i = n[o++];
|
|
537
537
|
const u = Number.isFinite(+i), d = o >= n.length;
|
|
538
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
538
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Ht(s[i])), !u);
|
|
539
539
|
}
|
|
540
540
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
541
541
|
const n = {};
|
|
542
542
|
return a.forEachEntry(e, (r, s) => {
|
|
543
|
-
t(
|
|
543
|
+
t(qt(r), s, n, 0);
|
|
544
544
|
}), n;
|
|
545
545
|
}
|
|
546
546
|
return null;
|
|
@@ -559,12 +559,12 @@ function $t(e, t, n) {
|
|
|
559
559
|
return (n || JSON.stringify)(e);
|
|
560
560
|
}
|
|
561
561
|
const J = {
|
|
562
|
-
transitional:
|
|
562
|
+
transitional: Ie,
|
|
563
563
|
adapter: ["xhr", "http"],
|
|
564
564
|
transformRequest: [function(t, n) {
|
|
565
565
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
566
566
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
567
|
-
return s && s ? JSON.stringify(
|
|
567
|
+
return s && s ? JSON.stringify(je(t)) : t;
|
|
568
568
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
569
569
|
return t;
|
|
570
570
|
if (a.isArrayBufferView(t))
|
|
@@ -574,10 +574,10 @@ const J = {
|
|
|
574
574
|
let u;
|
|
575
575
|
if (o) {
|
|
576
576
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
577
|
-
return
|
|
577
|
+
return kt(t, this.formSerializer).toString();
|
|
578
578
|
if ((u = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
579
579
|
const d = this.env && this.env.FormData;
|
|
580
|
-
return
|
|
580
|
+
return K(
|
|
581
581
|
u ? { "files[]": t } : t,
|
|
582
582
|
d && new d(),
|
|
583
583
|
this.formSerializer
|
|
@@ -627,7 +627,7 @@ a.forEach(["delete", "get", "head"], function(t) {
|
|
|
627
627
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
628
628
|
J.headers[t] = a.merge(zt);
|
|
629
629
|
});
|
|
630
|
-
const
|
|
630
|
+
const ie = J, Kt = a.toObjectSet([
|
|
631
631
|
"age",
|
|
632
632
|
"authorization",
|
|
633
633
|
"content-length",
|
|
@@ -650,26 +650,26 @@ const ae = J, Vt = a.toObjectSet([
|
|
|
650
650
|
let n, r, s;
|
|
651
651
|
return e && e.split(`
|
|
652
652
|
`).forEach(function(i) {
|
|
653
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
653
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Kt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
654
654
|
}), t;
|
|
655
|
-
},
|
|
656
|
-
function
|
|
655
|
+
}, Ee = Symbol("internals");
|
|
656
|
+
function D(e) {
|
|
657
657
|
return e && String(e).trim().toLowerCase();
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
659
|
+
function k(e) {
|
|
660
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(k) : String(e);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Vt(e) {
|
|
663
663
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
664
664
|
let r;
|
|
665
665
|
for (; r = n.exec(e); )
|
|
666
666
|
t[r[1]] = r[2];
|
|
667
667
|
return t;
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function Mt(e) {
|
|
670
670
|
return /^[-_a-zA-Z]+$/.test(e.trim());
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function v(e, t, n, r, s) {
|
|
673
673
|
if (a.isFunction(r))
|
|
674
674
|
return r.call(this, t, n);
|
|
675
675
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -679,10 +679,10 @@ function W(e, t, n, r, s) {
|
|
|
679
679
|
return r.test(t);
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function vt(e) {
|
|
683
683
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Wt(e, t) {
|
|
686
686
|
const n = a.toCamelCase(" " + t);
|
|
687
687
|
["get", "set", "has"].forEach((r) => {
|
|
688
688
|
Object.defineProperty(e, r + n, {
|
|
@@ -693,31 +693,31 @@ function Yt(e, t) {
|
|
|
693
693
|
});
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
class
|
|
696
|
+
class V {
|
|
697
697
|
constructor(t) {
|
|
698
698
|
t && this.set(t);
|
|
699
699
|
}
|
|
700
700
|
set(t, n, r) {
|
|
701
701
|
const s = this;
|
|
702
702
|
function o(u, d, c) {
|
|
703
|
-
const l =
|
|
703
|
+
const l = D(d);
|
|
704
704
|
if (!l)
|
|
705
705
|
throw new Error("header name must be a non-empty string");
|
|
706
706
|
const p = a.findKey(s, l);
|
|
707
|
-
(!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || d] =
|
|
707
|
+
(!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || d] = k(u));
|
|
708
708
|
}
|
|
709
709
|
const i = (u, d) => a.forEach(u, (c, l) => o(c, l, d));
|
|
710
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
710
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Mt(t) ? i(Jt(t), n) : t != null && o(n, t, r), this;
|
|
711
711
|
}
|
|
712
712
|
get(t, n) {
|
|
713
|
-
if (t =
|
|
713
|
+
if (t = D(t), t) {
|
|
714
714
|
const r = a.findKey(this, t);
|
|
715
715
|
if (r) {
|
|
716
716
|
const s = this[r];
|
|
717
717
|
if (!n)
|
|
718
718
|
return s;
|
|
719
719
|
if (n === !0)
|
|
720
|
-
return
|
|
720
|
+
return Vt(s);
|
|
721
721
|
if (a.isFunction(n))
|
|
722
722
|
return n.call(this, s, r);
|
|
723
723
|
if (a.isRegExp(n))
|
|
@@ -727,9 +727,9 @@ class M {
|
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
has(t, n) {
|
|
730
|
-
if (t =
|
|
730
|
+
if (t = D(t), t) {
|
|
731
731
|
const r = a.findKey(this, t);
|
|
732
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
732
|
+
return !!(r && this[r] !== void 0 && (!n || v(this, this[r], r, n)));
|
|
733
733
|
}
|
|
734
734
|
return !1;
|
|
735
735
|
}
|
|
@@ -737,9 +737,9 @@ class M {
|
|
|
737
737
|
const r = this;
|
|
738
738
|
let s = !1;
|
|
739
739
|
function o(i) {
|
|
740
|
-
if (i =
|
|
740
|
+
if (i = D(i), i) {
|
|
741
741
|
const u = a.findKey(r, i);
|
|
742
|
-
u && (!n ||
|
|
742
|
+
u && (!n || v(r, r[u], u, n)) && (delete r[u], s = !0);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -749,7 +749,7 @@ class M {
|
|
|
749
749
|
let r = n.length, s = !1;
|
|
750
750
|
for (; r--; ) {
|
|
751
751
|
const o = n[r];
|
|
752
|
-
(!t ||
|
|
752
|
+
(!t || v(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
753
753
|
}
|
|
754
754
|
return s;
|
|
755
755
|
}
|
|
@@ -758,11 +758,11 @@ class M {
|
|
|
758
758
|
return a.forEach(this, (s, o) => {
|
|
759
759
|
const i = a.findKey(r, o);
|
|
760
760
|
if (i) {
|
|
761
|
-
n[i] =
|
|
761
|
+
n[i] = k(s), delete n[o];
|
|
762
762
|
return;
|
|
763
763
|
}
|
|
764
|
-
const u = t ?
|
|
765
|
-
u !== o && delete n[o], n[u] =
|
|
764
|
+
const u = t ? vt(o) : String(o).trim();
|
|
765
|
+
u !== o && delete n[o], n[u] = k(s), r[u] = !0;
|
|
766
766
|
}), this;
|
|
767
767
|
}
|
|
768
768
|
concat(...t) {
|
|
@@ -792,28 +792,28 @@ class M {
|
|
|
792
792
|
return n.forEach((s) => r.set(s)), r;
|
|
793
793
|
}
|
|
794
794
|
static accessor(t) {
|
|
795
|
-
const r = (this[
|
|
795
|
+
const r = (this[Ee] = this[Ee] = {
|
|
796
796
|
accessors: {}
|
|
797
797
|
}).accessors, s = this.prototype;
|
|
798
798
|
function o(i) {
|
|
799
|
-
const u =
|
|
800
|
-
r[u] || (
|
|
799
|
+
const u = D(i);
|
|
800
|
+
r[u] || (Wt(s, i), r[u] = !0);
|
|
801
801
|
}
|
|
802
802
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
|
|
806
|
-
a.freezeMethods(
|
|
807
|
-
a.freezeMethods(
|
|
808
|
-
const R =
|
|
809
|
-
function
|
|
810
|
-
const n = this ||
|
|
805
|
+
V.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
806
|
+
a.freezeMethods(V.prototype);
|
|
807
|
+
a.freezeMethods(V);
|
|
808
|
+
const R = V;
|
|
809
|
+
function W(e, t) {
|
|
810
|
+
const n = this || ie, r = t || n, s = R.from(r.headers);
|
|
811
811
|
let o = r.data;
|
|
812
812
|
return a.forEach(e, function(u) {
|
|
813
813
|
o = u.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
814
814
|
}), s.normalize(), o;
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function ke(e) {
|
|
817
817
|
return !!(e && e.__CANCEL__);
|
|
818
818
|
}
|
|
819
819
|
function L(e, t, n) {
|
|
@@ -832,7 +832,7 @@ function Gt(e, t, n) {
|
|
|
832
832
|
n
|
|
833
833
|
));
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const Yt = S.isStandardBrowserEnv ? (
|
|
836
836
|
// Standard browser envs support document.cookie
|
|
837
837
|
function() {
|
|
838
838
|
return {
|
|
@@ -863,16 +863,16 @@ const Qt = S.isStandardBrowserEnv ? (
|
|
|
863
863
|
};
|
|
864
864
|
}()
|
|
865
865
|
);
|
|
866
|
-
function
|
|
866
|
+
function Qt(e) {
|
|
867
867
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function Xt(e, t) {
|
|
870
870
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
871
871
|
}
|
|
872
|
-
function
|
|
873
|
-
return e && !
|
|
872
|
+
function qe(e, t) {
|
|
873
|
+
return e && !Qt(t) ? Xt(e, t) : t;
|
|
874
874
|
}
|
|
875
|
-
const
|
|
875
|
+
const Zt = S.isStandardBrowserEnv ? (
|
|
876
876
|
// Standard browser envs have full support of the APIs needed to test
|
|
877
877
|
// whether the request URL is of the same origin as current location.
|
|
878
878
|
function() {
|
|
@@ -904,11 +904,11 @@ const en = S.isStandardBrowserEnv ? (
|
|
|
904
904
|
};
|
|
905
905
|
}()
|
|
906
906
|
);
|
|
907
|
-
function
|
|
907
|
+
function en(e) {
|
|
908
908
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
909
909
|
return t && t[1] || "";
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function tn(e, t) {
|
|
912
912
|
e = e || 10;
|
|
913
913
|
const n = new Array(e), r = new Array(e);
|
|
914
914
|
let s = 0, o = 0, i;
|
|
@@ -924,9 +924,9 @@ function nn(e, t) {
|
|
|
924
924
|
return y ? Math.round(w * 1e3 / y) : void 0;
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function we(e, t) {
|
|
928
928
|
let n = 0;
|
|
929
|
-
const r =
|
|
929
|
+
const r = tn(50, 250);
|
|
930
930
|
return (s) => {
|
|
931
931
|
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, u = o - n, d = r(u), c = o <= i;
|
|
932
932
|
n = o;
|
|
@@ -942,7 +942,7 @@ function ge(e, t) {
|
|
|
942
942
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
const
|
|
945
|
+
const nn = typeof XMLHttpRequest < "u", rn = nn && function(e) {
|
|
946
946
|
return new Promise(function(n, r) {
|
|
947
947
|
let s = e.data;
|
|
948
948
|
const o = R.from(e.headers).normalize(), i = e.responseType;
|
|
@@ -956,8 +956,8 @@ const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
|
|
|
956
956
|
const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
957
957
|
o.set("Authorization", "Basic " + btoa(y + ":" + f));
|
|
958
958
|
}
|
|
959
|
-
const l =
|
|
960
|
-
c.open(e.method.toUpperCase(),
|
|
959
|
+
const l = qe(e.baseURL, e.url);
|
|
960
|
+
c.open(e.method.toUpperCase(), Be(l, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
961
961
|
function p() {
|
|
962
962
|
if (!c)
|
|
963
963
|
return;
|
|
@@ -985,7 +985,7 @@ const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
|
|
|
985
985
|
r(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
|
|
986
986
|
}, c.ontimeout = function() {
|
|
987
987
|
let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
988
|
-
const h = e.transitional ||
|
|
988
|
+
const h = e.transitional || Ie;
|
|
989
989
|
e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
|
|
990
990
|
f,
|
|
991
991
|
h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
@@ -993,26 +993,26 @@ const rn = typeof XMLHttpRequest < "u", sn = rn && function(e) {
|
|
|
993
993
|
c
|
|
994
994
|
)), c = null;
|
|
995
995
|
}, S.isStandardBrowserEnv) {
|
|
996
|
-
const y = (e.withCredentials ||
|
|
996
|
+
const y = (e.withCredentials || Zt(l)) && e.xsrfCookieName && Yt.read(e.xsrfCookieName);
|
|
997
997
|
y && o.set(e.xsrfHeaderName, y);
|
|
998
998
|
}
|
|
999
999
|
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(f, h) {
|
|
1000
1000
|
c.setRequestHeader(h, f);
|
|
1001
|
-
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress",
|
|
1001
|
+
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", we(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", we(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (y) => {
|
|
1002
1002
|
c && (r(!y || y.type ? new L(null, e, c) : y), c.abort(), c = null);
|
|
1003
1003
|
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
1004
|
-
const w =
|
|
1004
|
+
const w = en(l);
|
|
1005
1005
|
if (w && S.protocols.indexOf(w) === -1) {
|
|
1006
1006
|
r(new m("Unsupported protocol " + w + ":", m.ERR_BAD_REQUEST, e));
|
|
1007
1007
|
return;
|
|
1008
1008
|
}
|
|
1009
1009
|
c.send(s || null);
|
|
1010
1010
|
});
|
|
1011
|
-
},
|
|
1012
|
-
http:
|
|
1013
|
-
xhr:
|
|
1011
|
+
}, q = {
|
|
1012
|
+
http: Ct,
|
|
1013
|
+
xhr: rn
|
|
1014
1014
|
};
|
|
1015
|
-
a.forEach(
|
|
1015
|
+
a.forEach(q, (e, t) => {
|
|
1016
1016
|
if (e) {
|
|
1017
1017
|
try {
|
|
1018
1018
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1021,50 +1021,50 @@ a.forEach(H, (e, t) => {
|
|
|
1021
1021
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1022
1022
|
}
|
|
1023
1023
|
});
|
|
1024
|
-
const
|
|
1024
|
+
const sn = {
|
|
1025
1025
|
getAdapter: (e) => {
|
|
1026
1026
|
e = a.isArray(e) ? e : [e];
|
|
1027
1027
|
const { length: t } = e;
|
|
1028
1028
|
let n, r;
|
|
1029
|
-
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ?
|
|
1029
|
+
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? q[n.toLowerCase()] : n)); s++)
|
|
1030
1030
|
;
|
|
1031
1031
|
if (!r)
|
|
1032
1032
|
throw r === !1 ? new m(
|
|
1033
1033
|
`Adapter ${n} is not supported by the environment`,
|
|
1034
1034
|
"ERR_NOT_SUPPORT"
|
|
1035
1035
|
) : new Error(
|
|
1036
|
-
a.hasOwnProp(
|
|
1036
|
+
a.hasOwnProp(q, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
1037
1037
|
);
|
|
1038
1038
|
if (!a.isFunction(r))
|
|
1039
1039
|
throw new TypeError("adapter is not a function");
|
|
1040
1040
|
return r;
|
|
1041
1041
|
},
|
|
1042
|
-
adapters:
|
|
1042
|
+
adapters: q
|
|
1043
1043
|
};
|
|
1044
1044
|
function G(e) {
|
|
1045
1045
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1046
1046
|
throw new L(null, e);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return G(e), e.headers = R.from(e.headers), e.data =
|
|
1048
|
+
function ge(e) {
|
|
1049
|
+
return G(e), e.headers = R.from(e.headers), e.data = W.call(
|
|
1050
1050
|
e,
|
|
1051
1051
|
e.transformRequest
|
|
1052
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1053
|
-
return G(e), r.data =
|
|
1052
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), sn.getAdapter(e.adapter || ie.adapter)(e).then(function(r) {
|
|
1053
|
+
return G(e), r.data = W.call(
|
|
1054
1054
|
e,
|
|
1055
1055
|
e.transformResponse,
|
|
1056
1056
|
r
|
|
1057
1057
|
), r.headers = R.from(r.headers), r;
|
|
1058
1058
|
}, function(r) {
|
|
1059
|
-
return
|
|
1059
|
+
return ke(r) || (G(e), r && r.response && (r.response.data = W.call(
|
|
1060
1060
|
e,
|
|
1061
1061
|
e.transformResponse,
|
|
1062
1062
|
r.response
|
|
1063
1063
|
), r.response.headers = R.from(r.response.headers))), Promise.reject(r);
|
|
1064
1064
|
});
|
|
1065
1065
|
}
|
|
1066
|
-
const
|
|
1067
|
-
function
|
|
1066
|
+
const Se = (e) => e instanceof R ? e.toJSON() : e;
|
|
1067
|
+
function _(e, t) {
|
|
1068
1068
|
t = t || {};
|
|
1069
1069
|
const n = {};
|
|
1070
1070
|
function r(c, l, p) {
|
|
@@ -1122,23 +1122,23 @@ function N(e, t) {
|
|
|
1122
1122
|
socketPath: i,
|
|
1123
1123
|
responseEncoding: i,
|
|
1124
1124
|
validateStatus: u,
|
|
1125
|
-
headers: (c, l) => s(
|
|
1125
|
+
headers: (c, l) => s(Se(c), Se(l), !0)
|
|
1126
1126
|
};
|
|
1127
1127
|
return a.forEach(Object.keys(e).concat(Object.keys(t)), function(l) {
|
|
1128
1128
|
const p = d[l] || s, w = p(e[l], t[l], l);
|
|
1129
1129
|
a.isUndefined(w) && p !== u || (n[l] = w);
|
|
1130
1130
|
}), n;
|
|
1131
1131
|
}
|
|
1132
|
-
const
|
|
1132
|
+
const He = "1.3.4", ae = {};
|
|
1133
1133
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1134
|
-
|
|
1134
|
+
ae[e] = function(r) {
|
|
1135
1135
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1136
1136
|
};
|
|
1137
1137
|
});
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1138
|
+
const be = {};
|
|
1139
|
+
ae.transitional = function(t, n, r) {
|
|
1140
1140
|
function s(o, i) {
|
|
1141
|
-
return "[Axios v" +
|
|
1141
|
+
return "[Axios v" + He + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1142
1142
|
}
|
|
1143
1143
|
return (o, i, u) => {
|
|
1144
1144
|
if (t === !1)
|
|
@@ -1146,7 +1146,7 @@ ce.transitional = function(t, n, r) {
|
|
|
1146
1146
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1147
1147
|
m.ERR_DEPRECATED
|
|
1148
1148
|
);
|
|
1149
|
-
return n && !
|
|
1149
|
+
return n && !be[i] && (be[i] = !0, console.warn(
|
|
1150
1150
|
s(
|
|
1151
1151
|
i,
|
|
1152
1152
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1154,7 +1154,7 @@ ce.transitional = function(t, n, r) {
|
|
|
1154
1154
|
)), t ? t(o, i, u) : !0;
|
|
1155
1155
|
};
|
|
1156
1156
|
};
|
|
1157
|
-
function
|
|
1157
|
+
function on(e, t, n) {
|
|
1158
1158
|
if (typeof e != "object")
|
|
1159
1159
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1160
1160
|
const r = Object.keys(e);
|
|
@@ -1171,15 +1171,15 @@ function an(e, t, n) {
|
|
|
1171
1171
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1175
|
-
assertOptions:
|
|
1176
|
-
validators:
|
|
1177
|
-
}, A =
|
|
1174
|
+
const Z = {
|
|
1175
|
+
assertOptions: on,
|
|
1176
|
+
validators: ae
|
|
1177
|
+
}, A = Z.validators;
|
|
1178
1178
|
class z {
|
|
1179
1179
|
constructor(t) {
|
|
1180
1180
|
this.defaults = t, this.interceptors = {
|
|
1181
|
-
request: new
|
|
1182
|
-
response: new
|
|
1181
|
+
request: new ye(),
|
|
1182
|
+
response: new ye()
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
1185
|
/**
|
|
@@ -1191,13 +1191,13 @@ class z {
|
|
|
1191
1191
|
* @returns {Promise} The Promise to be fulfilled
|
|
1192
1192
|
*/
|
|
1193
1193
|
request(t, n) {
|
|
1194
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1194
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = _(this.defaults, n);
|
|
1195
1195
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1196
|
-
r !== void 0 &&
|
|
1196
|
+
r !== void 0 && Z.assertOptions(r, {
|
|
1197
1197
|
silentJSONParsing: A.transitional(A.boolean),
|
|
1198
1198
|
forcedJSONParsing: A.transitional(A.boolean),
|
|
1199
1199
|
clarifyTimeoutError: A.transitional(A.boolean)
|
|
1200
|
-
}, !1), s !== void 0 &&
|
|
1200
|
+
}, !1), s !== void 0 && Z.assertOptions(s, {
|
|
1201
1201
|
encode: A.function,
|
|
1202
1202
|
serialize: A.function
|
|
1203
1203
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1222,7 +1222,7 @@ class z {
|
|
|
1222
1222
|
});
|
|
1223
1223
|
let l, p = 0, w;
|
|
1224
1224
|
if (!d) {
|
|
1225
|
-
const f = [
|
|
1225
|
+
const f = [ge.bind(this), void 0];
|
|
1226
1226
|
for (f.unshift.apply(f, u), f.push.apply(f, c), w = f.length, l = Promise.resolve(n); p < w; )
|
|
1227
1227
|
l = l.then(f[p++], f[p++]);
|
|
1228
1228
|
return l;
|
|
@@ -1239,7 +1239,7 @@ class z {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
1241
|
try {
|
|
1242
|
-
l =
|
|
1242
|
+
l = ge.call(this, y);
|
|
1243
1243
|
} catch (f) {
|
|
1244
1244
|
return Promise.reject(f);
|
|
1245
1245
|
}
|
|
@@ -1248,14 +1248,14 @@ class z {
|
|
|
1248
1248
|
return l;
|
|
1249
1249
|
}
|
|
1250
1250
|
getUri(t) {
|
|
1251
|
-
t =
|
|
1252
|
-
const n =
|
|
1253
|
-
return
|
|
1251
|
+
t = _(this.defaults, t);
|
|
1252
|
+
const n = qe(t.baseURL, t.url);
|
|
1253
|
+
return Be(n, t.params, t.paramsSerializer);
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
1256
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1257
1257
|
z.prototype[t] = function(n, r) {
|
|
1258
|
-
return this.request(
|
|
1258
|
+
return this.request(_(r || {}, {
|
|
1259
1259
|
method: t,
|
|
1260
1260
|
url: n,
|
|
1261
1261
|
data: (r || {}).data
|
|
@@ -1265,7 +1265,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1265
1265
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1266
1266
|
function n(r) {
|
|
1267
1267
|
return function(o, i, u) {
|
|
1268
|
-
return this.request(
|
|
1268
|
+
return this.request(_(u || {}, {
|
|
1269
1269
|
method: t,
|
|
1270
1270
|
headers: r ? {
|
|
1271
1271
|
"Content-Type": "multipart/form-data"
|
|
@@ -1277,8 +1277,8 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
z.prototype[t] = n(), z.prototype[t + "Form"] = n(!0);
|
|
1279
1279
|
});
|
|
1280
|
-
const
|
|
1281
|
-
class
|
|
1280
|
+
const H = z;
|
|
1281
|
+
class ce {
|
|
1282
1282
|
constructor(t) {
|
|
1283
1283
|
if (typeof t != "function")
|
|
1284
1284
|
throw new TypeError("executor must be a function.");
|
|
@@ -1339,23 +1339,23 @@ class ue {
|
|
|
1339
1339
|
static source() {
|
|
1340
1340
|
let t;
|
|
1341
1341
|
return {
|
|
1342
|
-
token: new
|
|
1342
|
+
token: new ce(function(s) {
|
|
1343
1343
|
t = s;
|
|
1344
1344
|
}),
|
|
1345
1345
|
cancel: t
|
|
1346
1346
|
};
|
|
1347
1347
|
}
|
|
1348
1348
|
}
|
|
1349
|
-
const
|
|
1350
|
-
function
|
|
1349
|
+
const an = ce;
|
|
1350
|
+
function cn(e) {
|
|
1351
1351
|
return function(n) {
|
|
1352
1352
|
return e.apply(null, n);
|
|
1353
1353
|
};
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function un(e) {
|
|
1356
1356
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1357
1357
|
}
|
|
1358
|
-
const
|
|
1358
|
+
const ee = {
|
|
1359
1359
|
Continue: 100,
|
|
1360
1360
|
SwitchingProtocols: 101,
|
|
1361
1361
|
Processing: 102,
|
|
@@ -1420,41 +1420,41 @@ const te = {
|
|
|
1420
1420
|
NotExtended: 510,
|
|
1421
1421
|
NetworkAuthenticationRequired: 511
|
|
1422
1422
|
};
|
|
1423
|
-
Object.entries(
|
|
1424
|
-
|
|
1423
|
+
Object.entries(ee).forEach(([e, t]) => {
|
|
1424
|
+
ee[t] = e;
|
|
1425
1425
|
});
|
|
1426
|
-
const
|
|
1426
|
+
const ln = ee;
|
|
1427
1427
|
function ze(e) {
|
|
1428
|
-
const t = new
|
|
1429
|
-
return a.extend(n,
|
|
1430
|
-
return ze(
|
|
1428
|
+
const t = new H(e), n = Re(H.prototype.request, t);
|
|
1429
|
+
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1430
|
+
return ze(_(e, s));
|
|
1431
1431
|
}, n;
|
|
1432
1432
|
}
|
|
1433
|
-
const E = ze(
|
|
1434
|
-
E.Axios =
|
|
1433
|
+
const E = ze(ie);
|
|
1434
|
+
E.Axios = H;
|
|
1435
1435
|
E.CanceledError = L;
|
|
1436
|
-
E.CancelToken =
|
|
1437
|
-
E.isCancel =
|
|
1438
|
-
E.VERSION =
|
|
1439
|
-
E.toFormData =
|
|
1436
|
+
E.CancelToken = an;
|
|
1437
|
+
E.isCancel = ke;
|
|
1438
|
+
E.VERSION = He;
|
|
1439
|
+
E.toFormData = K;
|
|
1440
1440
|
E.AxiosError = m;
|
|
1441
1441
|
E.Cancel = E.CanceledError;
|
|
1442
1442
|
E.all = function(t) {
|
|
1443
1443
|
return Promise.all(t);
|
|
1444
1444
|
};
|
|
1445
|
-
E.spread =
|
|
1446
|
-
E.isAxiosError =
|
|
1447
|
-
E.mergeConfig =
|
|
1445
|
+
E.spread = cn;
|
|
1446
|
+
E.isAxiosError = un;
|
|
1447
|
+
E.mergeConfig = _;
|
|
1448
1448
|
E.AxiosHeaders = R;
|
|
1449
|
-
E.formToJSON = (e) =>
|
|
1450
|
-
E.HttpStatusCode =
|
|
1449
|
+
E.formToJSON = (e) => je(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1450
|
+
E.HttpStatusCode = ln;
|
|
1451
1451
|
E.default = E;
|
|
1452
|
-
const
|
|
1453
|
-
class
|
|
1452
|
+
const fn = E;
|
|
1453
|
+
class dn {
|
|
1454
1454
|
constructor(t) {
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
this.client =
|
|
1455
|
+
C(this, "client");
|
|
1456
|
+
C(this, "queryParams");
|
|
1457
|
+
this.client = fn.create({
|
|
1458
1458
|
...t,
|
|
1459
1459
|
headers: {
|
|
1460
1460
|
Authorization: `Bearer ${t.apiKey}`
|
|
@@ -1480,9 +1480,8 @@ class pn {
|
|
|
1480
1480
|
return this.client.delete(t + this.queryParams);
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
|
-
let
|
|
1484
|
-
const
|
|
1485
|
-
function Nn(e, t) {
|
|
1483
|
+
let pn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
1484
|
+
const hn = "fuul.tracking_id", mn = ["google.com", "bing.com", "yahoo.com"], yn = () => On(hn, () => pn()), En = () => T("af") || T("referrer"), wn = () => document.referrer, gn = () => An(), Sn = () => T("category"), bn = () => T("title"), Rn = () => T("tag"), On = (e, t) => {
|
|
1486
1485
|
const n = localStorage.getItem(e);
|
|
1487
1486
|
if (n)
|
|
1488
1487
|
return n;
|
|
@@ -1490,85 +1489,79 @@ function Nn(e, t) {
|
|
|
1490
1489
|
const r = t();
|
|
1491
1490
|
return r ? localStorage.setItem(e, r) : localStorage.removeItem(e), r;
|
|
1492
1491
|
}
|
|
1493
|
-
}
|
|
1494
|
-
function B(e, t) {
|
|
1495
|
-
const n = e();
|
|
1496
|
-
return n ? (localStorage.setItem(t, n), n) : localStorage.getItem(t);
|
|
1497
|
-
}
|
|
1498
|
-
function T(e) {
|
|
1499
|
-
return new URLSearchParams(window.location.search).get(e);
|
|
1500
|
-
}
|
|
1501
|
-
function xn() {
|
|
1492
|
+
}, T = (e) => new URLSearchParams(window.location.search).get(e), An = () => {
|
|
1502
1493
|
const e = T("source"), t = T("af") || T("referrer");
|
|
1503
1494
|
if (e)
|
|
1504
1495
|
return e;
|
|
1505
1496
|
if (t)
|
|
1506
1497
|
return "affiliate";
|
|
1507
|
-
const n = document.referrer;
|
|
1508
|
-
return
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1498
|
+
const n = Tn(document.referrer);
|
|
1499
|
+
return mn.includes(n) ? "organic" : "direct";
|
|
1500
|
+
}, Tn = (e) => {
|
|
1501
|
+
var r;
|
|
1502
|
+
return (r = new URL(e).hostname) == null ? void 0 : r.split(".").slice(-2).join(".");
|
|
1503
|
+
}, Pn = "https://api.fuul.xyz/api/v1/";
|
|
1504
|
+
let I = !1, te = !1, ue, Y, $e, Ke;
|
|
1505
|
+
function Nn(e) {
|
|
1506
|
+
I = !!e.debug, !te && (ue = e.apiKey, Un(), Y = Ln(
|
|
1507
|
+
e.baseApiUrl ?? Pn,
|
|
1515
1508
|
e.defaultQueryParams ?? {}
|
|
1516
|
-
), $e = new
|
|
1509
|
+
), $e = new We({ httpClient: Y, debug: I }), Ke = new Ye({ httpClient: Y, debug: I }), te = !0, I && console.debug("Fuul SDK: init() complete"));
|
|
1517
1510
|
}
|
|
1518
1511
|
function Je() {
|
|
1519
|
-
if (!
|
|
1512
|
+
if (!te)
|
|
1520
1513
|
throw new Error("Fuul SDK: You need to call init() to initialize the library before using any methods");
|
|
1521
1514
|
}
|
|
1522
|
-
async function
|
|
1523
|
-
Je(),
|
|
1524
|
-
const r =
|
|
1515
|
+
async function le(e, t, n) {
|
|
1516
|
+
Je(), Fn();
|
|
1517
|
+
const r = yn(), s = En(), o = gn(), i = Sn(), u = bn(), d = Rn(), c = wn(), l = {
|
|
1525
1518
|
name: e,
|
|
1526
1519
|
args: t || {},
|
|
1527
1520
|
metadata: {
|
|
1528
1521
|
tracking_id: r ?? ""
|
|
1529
1522
|
}
|
|
1530
1523
|
};
|
|
1531
|
-
n != null && n.address && (l.user_address = n.address), n != null && n.signature && (l.signature = n == null ? void 0 : n.signature, l.signature_message = n == null ? void 0 : n.message), s && (l.metadata.referrer = s, l.metadata.affiliate_id = s), c && (l.metadata.referrer_url = c), o && (l.metadata.source = o), i && (l.metadata.category = i), u && (l.metadata.title = u), d && (l.metadata.tag = d),
|
|
1524
|
+
n != null && n.address && (l.user_address = n.address), n != null && n.signature && (l.signature = n == null ? void 0 : n.signature, l.signature_message = n == null ? void 0 : n.message), s && (l.metadata.referrer = s, l.metadata.affiliate_id = s), c && (l.metadata.referrer_url = c), o && (l.metadata.source = o), i && (l.metadata.category = i), u && (l.metadata.title = u), d && (l.metadata.tag = d), Ke.sendEvent(l);
|
|
1532
1525
|
}
|
|
1533
|
-
async function
|
|
1534
|
-
await
|
|
1526
|
+
async function Cn(e) {
|
|
1527
|
+
await le("pageview", {
|
|
1535
1528
|
page: e ?? document.location.pathname,
|
|
1536
1529
|
locationOrigin: document.location.origin
|
|
1537
1530
|
});
|
|
1538
1531
|
}
|
|
1539
|
-
async function
|
|
1540
|
-
await
|
|
1532
|
+
async function _n(e) {
|
|
1533
|
+
await le("connect_wallet", {}, e);
|
|
1541
1534
|
}
|
|
1542
|
-
function
|
|
1535
|
+
function xn(e, t) {
|
|
1543
1536
|
return `${e}?af=${t}`;
|
|
1544
1537
|
}
|
|
1545
|
-
async function
|
|
1538
|
+
async function Dn() {
|
|
1546
1539
|
return Je(), $e.getAll();
|
|
1547
1540
|
}
|
|
1548
|
-
function
|
|
1541
|
+
function Fn() {
|
|
1549
1542
|
if (typeof window > "u" || typeof document > "u")
|
|
1550
1543
|
throw new Error("Fuul SDK: Browser context required");
|
|
1551
1544
|
}
|
|
1552
|
-
function
|
|
1553
|
-
if (!
|
|
1545
|
+
function Un() {
|
|
1546
|
+
if (!ue)
|
|
1554
1547
|
throw new Error("Fuul SDK: Invalid API key");
|
|
1555
1548
|
}
|
|
1556
|
-
function
|
|
1557
|
-
return new
|
|
1549
|
+
function Ln(e, t) {
|
|
1550
|
+
return new dn({
|
|
1558
1551
|
baseURL: e,
|
|
1559
1552
|
timeout: 1e4,
|
|
1560
|
-
apiKey:
|
|
1553
|
+
apiKey: ue,
|
|
1561
1554
|
queryParams: t
|
|
1562
1555
|
});
|
|
1563
1556
|
}
|
|
1564
|
-
const
|
|
1565
|
-
init:
|
|
1566
|
-
sendEvent:
|
|
1567
|
-
sendPageview:
|
|
1568
|
-
sendConnectWallet:
|
|
1569
|
-
generateTrackingLink:
|
|
1570
|
-
getConversions:
|
|
1557
|
+
const In = {
|
|
1558
|
+
init: Nn,
|
|
1559
|
+
sendEvent: le,
|
|
1560
|
+
sendPageview: Cn,
|
|
1561
|
+
sendConnectWallet: _n,
|
|
1562
|
+
generateTrackingLink: xn,
|
|
1563
|
+
getConversions: Dn
|
|
1571
1564
|
};
|
|
1572
1565
|
export {
|
|
1573
|
-
|
|
1566
|
+
In as Fuul
|
|
1574
1567
|
};
|