@akad/sdk 1.0.27 → 1.0.29
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/package.json +1 -1
- package/ts-lib.js +528 -527
- package/ts-lib.umd.cjs +5 -5
- package/types/responseTypes.d.ts +1 -0
package/ts-lib.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function me(e) {
|
|
2
|
-
return /^\d+$/.test(e) || /^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e);
|
|
2
|
+
return /^\d+$/.test(e) || /^[0-9a-f]{8}-[0-9a-f]{4}-/i.test(e) ? !0 : /^[a-z0-9]+$/i.test(e) && /[a-z]/i.test(e) && /\d/.test(e);
|
|
3
3
|
}
|
|
4
4
|
function ot(e) {
|
|
5
5
|
if (!e || typeof e != "string")
|
|
6
6
|
return { endpoint: "unknown", endpointIds: [] };
|
|
7
|
-
const t = e.replace(/^https?:\/\/[^/]+/, "").split("?")[0].split("/").filter(Boolean),
|
|
8
|
-
return { endpoint:
|
|
7
|
+
const t = e.replace(/^https?:\/\/[^/]+/, "").split("?")[0].split("/").filter(Boolean), n = t.filter((s) => !me(s)), r = t.filter((s) => me(s));
|
|
8
|
+
return { endpoint: n.map((s) => s.replace(/[^a-z0-9-]/gi, "-").toLowerCase()).join("-") || "unknown", endpointIds: r };
|
|
9
9
|
}
|
|
10
10
|
const it = "pushRequestEvent: url must be a non-empty string (not undefined, null, empty, or whitespace-only)";
|
|
11
11
|
function at(e) {
|
|
@@ -17,13 +17,13 @@ function ct(e) {
|
|
|
17
17
|
const t = e.indexOf("?");
|
|
18
18
|
if (t === -1)
|
|
19
19
|
return {};
|
|
20
|
-
const
|
|
21
|
-
return Object.fromEntries(new URLSearchParams(
|
|
20
|
+
const n = e.slice(t + 1);
|
|
21
|
+
return Object.fromEntries(new URLSearchParams(n));
|
|
22
22
|
}
|
|
23
|
-
function ut(e, t,
|
|
23
|
+
function ut(e, t, n = {}) {
|
|
24
24
|
if (!at(e))
|
|
25
25
|
throw new Error(it);
|
|
26
|
-
const { includeEndpointIds:
|
|
26
|
+
const { includeEndpointIds: r = !1, includeQueryParams: s = [] } = n, { endpoint: o, endpointIds: i } = ot(e), c = `request-${o}`;
|
|
27
27
|
if (typeof window > "u" || !window.dataLayer)
|
|
28
28
|
return;
|
|
29
29
|
const l = {
|
|
@@ -31,7 +31,7 @@ function ut(e, t, r = {}) {
|
|
|
31
31
|
requestLabel: c,
|
|
32
32
|
requestStatus: t
|
|
33
33
|
};
|
|
34
|
-
if (
|
|
34
|
+
if (r && i.length && (l.requestEndpointIds = i), Array.isArray(s) && s.length) {
|
|
35
35
|
const d = ct(e), a = s.reduce(
|
|
36
36
|
(f, h) => (h in d && (f[h] = d[h]), f),
|
|
37
37
|
{}
|
|
@@ -43,11 +43,11 @@ function ut(e, t, r = {}) {
|
|
|
43
43
|
function ye(e, t) {
|
|
44
44
|
if (!(e != null && e.tracking))
|
|
45
45
|
return;
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
46
|
+
const n = e.url;
|
|
47
|
+
if (!n)
|
|
48
48
|
return;
|
|
49
|
-
const { includeEndpointIds:
|
|
50
|
-
ut(
|
|
49
|
+
const { includeEndpointIds: r, includeQueryParams: s } = e.tracking;
|
|
50
|
+
ut(n, t, { includeEndpointIds: r, includeQueryParams: s });
|
|
51
51
|
}
|
|
52
52
|
function Be(e, t) {
|
|
53
53
|
return function() {
|
|
@@ -55,8 +55,8 @@ function Be(e, t) {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
const { toString: lt } = Object.prototype, { getPrototypeOf: le } = Object, v = /* @__PURE__ */ ((e) => (t) => {
|
|
58
|
-
const
|
|
59
|
-
return e[
|
|
58
|
+
const n = lt.call(t);
|
|
59
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
60
60
|
})(/* @__PURE__ */ Object.create(null)), N = (e) => (e = e.toLowerCase(), (t) => v(t) === e), G = (e) => (t) => typeof t === e, { isArray: _ } = Array, D = G("undefined");
|
|
61
61
|
function dt(e) {
|
|
62
62
|
return e !== null && !D(e) && e.constructor !== null && !D(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
@@ -76,60 +76,60 @@ const ht = G("string"), A = G("function"), Fe = G("number"), K = (e) => e !== nu
|
|
|
76
76
|
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = v(e)) === "formdata" || // detect form-data instance
|
|
77
77
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
78
78
|
}, Et = N("URLSearchParams"), [St, Rt, Ot, At] = ["ReadableStream", "Request", "Response", "Headers"].map(N), Pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
79
|
-
function I(e, t, { allOwnKeys:
|
|
79
|
+
function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
80
80
|
if (e === null || typeof e > "u")
|
|
81
81
|
return;
|
|
82
|
-
let
|
|
82
|
+
let r, s;
|
|
83
83
|
if (typeof e != "object" && (e = [e]), _(e))
|
|
84
|
-
for (
|
|
85
|
-
t.call(null, e[
|
|
84
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
85
|
+
t.call(null, e[r], r, e);
|
|
86
86
|
else {
|
|
87
|
-
const o =
|
|
87
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
88
88
|
let c;
|
|
89
|
-
for (
|
|
90
|
-
c = o[
|
|
89
|
+
for (r = 0; r < i; r++)
|
|
90
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function $e(e, t) {
|
|
94
94
|
t = t.toLowerCase();
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
for (;
|
|
98
|
-
if (s = r
|
|
95
|
+
const n = Object.keys(e);
|
|
96
|
+
let r = n.length, s;
|
|
97
|
+
for (; r-- > 0; )
|
|
98
|
+
if (s = n[r], t === s.toLowerCase())
|
|
99
99
|
return s;
|
|
100
100
|
return null;
|
|
101
101
|
}
|
|
102
102
|
const De = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ie = (e) => !D(e) && e !== De;
|
|
103
|
-
function
|
|
104
|
-
const { caseless: e } = Ie(this) && this || {}, t = {},
|
|
103
|
+
function re() {
|
|
104
|
+
const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
|
|
105
105
|
const o = e && $e(t, s) || s;
|
|
106
|
-
z(t[o]) && z(
|
|
106
|
+
z(t[o]) && z(r) ? t[o] = re(t[o], r) : z(r) ? t[o] = re({}, r) : _(r) ? t[o] = r.slice() : t[o] = r;
|
|
107
107
|
};
|
|
108
|
-
for (let
|
|
109
|
-
arguments[
|
|
108
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
109
|
+
arguments[r] && I(arguments[r], n);
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
112
|
-
const kt = (e, t,
|
|
113
|
-
|
|
114
|
-
}, { allOwnKeys:
|
|
115
|
-
e.prototype = Object.create(t.prototype,
|
|
112
|
+
const kt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
113
|
+
n && A(s) ? e[o] = Be(s, n) : e[o] = s;
|
|
114
|
+
}, { allOwnKeys: r }), e), Nt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ct = (e, t, n, r) => {
|
|
115
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
116
116
|
value: t.prototype
|
|
117
|
-
}),
|
|
118
|
-
}, xt = (e, t,
|
|
117
|
+
}), n && Object.assign(e.prototype, n);
|
|
118
|
+
}, xt = (e, t, n, r) => {
|
|
119
119
|
let s, o, i;
|
|
120
120
|
const c = {};
|
|
121
121
|
if (t = t || {}, e == null)
|
|
122
122
|
return t;
|
|
123
123
|
do {
|
|
124
124
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
125
|
-
i = s[o], (!
|
|
126
|
-
e =
|
|
127
|
-
} while (e && (!
|
|
125
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
126
|
+
e = n !== !1 && le(e);
|
|
127
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
128
128
|
return t;
|
|
129
|
-
}, qt = (e, t,
|
|
130
|
-
e = String(e), (
|
|
131
|
-
const
|
|
132
|
-
return
|
|
129
|
+
}, qt = (e, t, n) => {
|
|
130
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
131
|
+
const r = e.indexOf(t, n);
|
|
132
|
+
return r !== -1 && r === n;
|
|
133
133
|
}, Ut = (e) => {
|
|
134
134
|
if (!e)
|
|
135
135
|
return null;
|
|
@@ -138,88 +138,88 @@ const kt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, o) => {
|
|
|
138
138
|
let t = e.length;
|
|
139
139
|
if (!Fe(t))
|
|
140
140
|
return null;
|
|
141
|
-
const
|
|
141
|
+
const n = new Array(t);
|
|
142
142
|
for (; t-- > 0; )
|
|
143
|
-
|
|
144
|
-
return
|
|
143
|
+
n[t] = e[t];
|
|
144
|
+
return n;
|
|
145
145
|
}, Lt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), Bt = (e, t) => {
|
|
146
|
-
const
|
|
146
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
147
147
|
let s;
|
|
148
|
-
for (; (s =
|
|
148
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
149
149
|
const o = s.value;
|
|
150
150
|
t.call(e, o[0], o[1]);
|
|
151
151
|
}
|
|
152
152
|
}, _t = (e, t) => {
|
|
153
|
-
let
|
|
154
|
-
const
|
|
155
|
-
for (; (
|
|
156
|
-
|
|
157
|
-
return
|
|
153
|
+
let n;
|
|
154
|
+
const r = [];
|
|
155
|
+
for (; (n = e.exec(t)) !== null; )
|
|
156
|
+
r.push(n);
|
|
157
|
+
return r;
|
|
158
158
|
}, Ft = N("HTMLFormElement"), $t = (e) => e.toLowerCase().replace(
|
|
159
159
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
160
|
-
function(
|
|
161
|
-
return
|
|
160
|
+
function(n, r, s) {
|
|
161
|
+
return r.toUpperCase() + s;
|
|
162
162
|
}
|
|
163
|
-
), ge = (({ hasOwnProperty: e }) => (t,
|
|
164
|
-
const
|
|
165
|
-
I(
|
|
163
|
+
), ge = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Dt = N("RegExp"), je = (e, t) => {
|
|
164
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
165
|
+
I(n, (s, o) => {
|
|
166
166
|
let i;
|
|
167
|
-
(i = t(s, o, e)) !== !1 && (
|
|
168
|
-
}), Object.defineProperties(e,
|
|
167
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
168
|
+
}), Object.defineProperties(e, r);
|
|
169
169
|
}, It = (e) => {
|
|
170
|
-
je(e, (t,
|
|
171
|
-
if (A(e) && ["arguments", "caller", "callee"].indexOf(
|
|
170
|
+
je(e, (t, n) => {
|
|
171
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
172
172
|
return !1;
|
|
173
|
-
const
|
|
174
|
-
if (A(
|
|
173
|
+
const r = e[n];
|
|
174
|
+
if (A(r)) {
|
|
175
175
|
if (t.enumerable = !1, "writable" in t) {
|
|
176
176
|
t.writable = !1;
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
t.set || (t.set = () => {
|
|
180
|
-
throw Error("Can not rewrite read-only method '" +
|
|
180
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
}, jt = (e, t) => {
|
|
185
|
-
const
|
|
185
|
+
const n = {}, r = (s) => {
|
|
186
186
|
s.forEach((o) => {
|
|
187
|
-
|
|
187
|
+
n[o] = !0;
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
|
-
return _(e) ?
|
|
190
|
+
return _(e) ? r(e) : r(String(e).split(t)), n;
|
|
191
191
|
}, Ht = () => {
|
|
192
192
|
}, zt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", He = {
|
|
193
193
|
DIGIT: we,
|
|
194
194
|
ALPHA: Z,
|
|
195
195
|
ALPHA_DIGIT: Z + Z.toUpperCase() + we
|
|
196
196
|
}, Jt = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
197
|
-
let
|
|
198
|
-
const { length:
|
|
197
|
+
let n = "";
|
|
198
|
+
const { length: r } = t;
|
|
199
199
|
for (; e--; )
|
|
200
|
-
|
|
201
|
-
return
|
|
200
|
+
n += t[Math.random() * r | 0];
|
|
201
|
+
return n;
|
|
202
202
|
};
|
|
203
203
|
function Mt(e) {
|
|
204
204
|
return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
205
205
|
}
|
|
206
206
|
const Vt = (e) => {
|
|
207
|
-
const t = new Array(10),
|
|
208
|
-
if (K(
|
|
209
|
-
if (t.indexOf(
|
|
207
|
+
const t = new Array(10), n = (r, s) => {
|
|
208
|
+
if (K(r)) {
|
|
209
|
+
if (t.indexOf(r) >= 0)
|
|
210
210
|
return;
|
|
211
|
-
if (!("toJSON" in
|
|
212
|
-
t[s] =
|
|
213
|
-
const o = _(
|
|
214
|
-
return I(
|
|
215
|
-
const l =
|
|
211
|
+
if (!("toJSON" in r)) {
|
|
212
|
+
t[s] = r;
|
|
213
|
+
const o = _(r) ? [] : {};
|
|
214
|
+
return I(r, (i, c) => {
|
|
215
|
+
const l = n(i, s + 1);
|
|
216
216
|
!D(l) && (o[c] = l);
|
|
217
217
|
}), t[s] = void 0, o;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
return
|
|
220
|
+
return r;
|
|
221
221
|
};
|
|
222
|
-
return
|
|
222
|
+
return n(e, 0);
|
|
223
223
|
}, vt = N("AsyncFunction"), Gt = (e) => e && (K(e) || A(e)) && A(e.then) && A(e.catch), u = {
|
|
224
224
|
isArray: _,
|
|
225
225
|
isArrayBuffer: _e,
|
|
@@ -246,7 +246,7 @@ const Vt = (e) => {
|
|
|
246
246
|
isTypedArray: Lt,
|
|
247
247
|
isFileList: wt,
|
|
248
248
|
forEach: I,
|
|
249
|
-
merge:
|
|
249
|
+
merge: re,
|
|
250
250
|
extend: kt,
|
|
251
251
|
trim: Pt,
|
|
252
252
|
stripBOM: Nt,
|
|
@@ -278,8 +278,8 @@ const Vt = (e) => {
|
|
|
278
278
|
isAsyncFn: vt,
|
|
279
279
|
isThenable: Gt
|
|
280
280
|
};
|
|
281
|
-
function y(e, t,
|
|
282
|
-
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),
|
|
281
|
+
function y(e, t, n, r, s) {
|
|
282
|
+
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);
|
|
283
283
|
}
|
|
284
284
|
u.inherits(y, Error, {
|
|
285
285
|
toJSON: function() {
|
|
@@ -322,11 +322,11 @@ const ze = y.prototype, Je = {};
|
|
|
322
322
|
});
|
|
323
323
|
Object.defineProperties(y, Je);
|
|
324
324
|
Object.defineProperty(ze, "isAxiosError", { value: !0 });
|
|
325
|
-
y.from = (e, t,
|
|
325
|
+
y.from = (e, t, n, r, s, o) => {
|
|
326
326
|
const i = Object.create(ze);
|
|
327
327
|
return u.toFlatObject(e, i, function(l) {
|
|
328
328
|
return l !== Error.prototype;
|
|
329
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t,
|
|
329
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
330
330
|
};
|
|
331
331
|
const Kt = null;
|
|
332
332
|
function se(e) {
|
|
@@ -335,10 +335,10 @@ function se(e) {
|
|
|
335
335
|
function Me(e) {
|
|
336
336
|
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
337
337
|
}
|
|
338
|
-
function be(e, t,
|
|
338
|
+
function be(e, t, n) {
|
|
339
339
|
return e ? e.concat(t).map(function(s, o) {
|
|
340
|
-
return s = Me(s), !
|
|
341
|
-
}).join(
|
|
340
|
+
return s = Me(s), !n && o ? "[" + s + "]" : s;
|
|
341
|
+
}).join(n ? "." : "") : t;
|
|
342
342
|
}
|
|
343
343
|
function Qt(e) {
|
|
344
344
|
return u.isArray(e) && !e.some(se);
|
|
@@ -346,17 +346,17 @@ function Qt(e) {
|
|
|
346
346
|
const Wt = u.toFlatObject(u, {}, null, function(t) {
|
|
347
347
|
return /^is[A-Z]/.test(t);
|
|
348
348
|
});
|
|
349
|
-
function Q(e, t,
|
|
349
|
+
function Q(e, t, n) {
|
|
350
350
|
if (!u.isObject(e))
|
|
351
351
|
throw new TypeError("target must be an object");
|
|
352
|
-
t = t || new FormData(),
|
|
352
|
+
t = t || new FormData(), n = u.toFlatObject(n, {
|
|
353
353
|
metaTokens: !0,
|
|
354
354
|
dots: !1,
|
|
355
355
|
indexes: !1
|
|
356
356
|
}, !1, function(g, E) {
|
|
357
357
|
return !u.isUndefined(E[g]);
|
|
358
358
|
});
|
|
359
|
-
const
|
|
359
|
+
const r = n.metaTokens, s = n.visitor || a, o = n.dots, i = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
360
360
|
if (!u.isFunction(s))
|
|
361
361
|
throw new TypeError("visitor must be a function");
|
|
362
362
|
function d(p) {
|
|
@@ -372,7 +372,7 @@ function Q(e, t, r) {
|
|
|
372
372
|
let T = p;
|
|
373
373
|
if (p && !E && typeof p == "object") {
|
|
374
374
|
if (u.endsWith(g, "{}"))
|
|
375
|
-
g =
|
|
375
|
+
g = r ? g : g.slice(0, -2), p = JSON.stringify(p);
|
|
376
376
|
else if (u.isArray(p) && Qt(p) || (u.isFileList(p) || u.endsWith(g, "[]")) && (T = u.toArray(p)))
|
|
377
377
|
return g = Me(g), T.forEach(function(w, O) {
|
|
378
378
|
!(u.isUndefined(w) || w === null) && t.append(
|
|
@@ -418,34 +418,34 @@ function Te(e) {
|
|
|
418
418
|
"%20": "+",
|
|
419
419
|
"%00": "\0"
|
|
420
420
|
};
|
|
421
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
422
|
-
return t[
|
|
421
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
422
|
+
return t[r];
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
function de(e, t) {
|
|
426
426
|
this._pairs = [], e && Q(e, this, t);
|
|
427
427
|
}
|
|
428
428
|
const Ve = de.prototype;
|
|
429
|
-
Ve.append = function(t,
|
|
430
|
-
this._pairs.push([t,
|
|
429
|
+
Ve.append = function(t, n) {
|
|
430
|
+
this._pairs.push([t, n]);
|
|
431
431
|
};
|
|
432
432
|
Ve.toString = function(t) {
|
|
433
|
-
const
|
|
434
|
-
return t.call(this,
|
|
433
|
+
const n = t ? function(r) {
|
|
434
|
+
return t.call(this, r, Te);
|
|
435
435
|
} : Te;
|
|
436
436
|
return this._pairs.map(function(s) {
|
|
437
|
-
return
|
|
437
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
438
438
|
}, "").join("&");
|
|
439
439
|
};
|
|
440
440
|
function Xt(e) {
|
|
441
441
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
442
442
|
}
|
|
443
|
-
function ve(e, t,
|
|
443
|
+
function ve(e, t, n) {
|
|
444
444
|
if (!t)
|
|
445
445
|
return e;
|
|
446
|
-
const
|
|
446
|
+
const r = n && n.encode || Xt, s = n && n.serialize;
|
|
447
447
|
let o;
|
|
448
|
-
if (s ? o = s(t,
|
|
448
|
+
if (s ? o = s(t, n) : o = u.isURLSearchParams(t) ? t.toString() : new de(t, n).toString(r), o) {
|
|
449
449
|
const i = e.indexOf("#");
|
|
450
450
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
451
451
|
}
|
|
@@ -463,12 +463,12 @@ class Ee {
|
|
|
463
463
|
*
|
|
464
464
|
* @return {Number} An ID used to remove interceptor later
|
|
465
465
|
*/
|
|
466
|
-
use(t,
|
|
466
|
+
use(t, n, r) {
|
|
467
467
|
return this.handlers.push({
|
|
468
468
|
fulfilled: t,
|
|
469
|
-
rejected:
|
|
470
|
-
synchronous:
|
|
471
|
-
runWhen:
|
|
469
|
+
rejected: n,
|
|
470
|
+
synchronous: r ? r.synchronous : !1,
|
|
471
|
+
runWhen: r ? r.runWhen : null
|
|
472
472
|
}), this.handlers.length - 1;
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
@@ -500,8 +500,8 @@ class Ee {
|
|
|
500
500
|
* @returns {void}
|
|
501
501
|
*/
|
|
502
502
|
forEach(t) {
|
|
503
|
-
u.forEach(this.handlers, function(
|
|
504
|
-
|
|
503
|
+
u.forEach(this.handlers, function(r) {
|
|
504
|
+
r !== null && t(r);
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
507
|
}
|
|
@@ -509,75 +509,75 @@ const Ge = {
|
|
|
509
509
|
silentJSONParsing: !0,
|
|
510
510
|
forcedJSONParsing: !0,
|
|
511
511
|
clarifyTimeoutError: !1
|
|
512
|
-
}, Zt = typeof URLSearchParams < "u" ? URLSearchParams : de, Yt = typeof FormData < "u" ? FormData : null,
|
|
512
|
+
}, Zt = typeof URLSearchParams < "u" ? URLSearchParams : de, Yt = typeof FormData < "u" ? FormData : null, en = typeof Blob < "u" ? Blob : null, tn = {
|
|
513
513
|
isBrowser: !0,
|
|
514
514
|
classes: {
|
|
515
515
|
URLSearchParams: Zt,
|
|
516
516
|
FormData: Yt,
|
|
517
|
-
Blob:
|
|
517
|
+
Blob: en
|
|
518
518
|
},
|
|
519
519
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
520
|
-
}, fe = typeof window < "u" && typeof document < "u",
|
|
521
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
520
|
+
}, fe = typeof window < "u" && typeof document < "u", nn = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), rn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
521
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", sn = fe && window.location.href || "http://localhost", on = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
522
522
|
__proto__: null,
|
|
523
523
|
hasBrowserEnv: fe,
|
|
524
|
-
hasStandardBrowserEnv:
|
|
525
|
-
hasStandardBrowserWebWorkerEnv:
|
|
526
|
-
origin:
|
|
524
|
+
hasStandardBrowserEnv: nn,
|
|
525
|
+
hasStandardBrowserWebWorkerEnv: rn,
|
|
526
|
+
origin: sn
|
|
527
527
|
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
528
|
-
...
|
|
529
|
-
...
|
|
528
|
+
...on,
|
|
529
|
+
...tn
|
|
530
530
|
};
|
|
531
|
-
function
|
|
531
|
+
function an(e, t) {
|
|
532
532
|
return Q(e, new k.classes.URLSearchParams(), Object.assign({
|
|
533
|
-
visitor: function(
|
|
534
|
-
return k.isNode && u.isBuffer(
|
|
533
|
+
visitor: function(n, r, s, o) {
|
|
534
|
+
return k.isNode && u.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
535
535
|
}
|
|
536
536
|
}, t));
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function cn(e) {
|
|
539
539
|
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
const t = {},
|
|
543
|
-
let
|
|
544
|
-
const s =
|
|
541
|
+
function un(e) {
|
|
542
|
+
const t = {}, n = Object.keys(e);
|
|
543
|
+
let r;
|
|
544
|
+
const s = n.length;
|
|
545
545
|
let o;
|
|
546
|
-
for (
|
|
547
|
-
o = r
|
|
546
|
+
for (r = 0; r < s; r++)
|
|
547
|
+
o = n[r], t[o] = e[o];
|
|
548
548
|
return t;
|
|
549
549
|
}
|
|
550
550
|
function Ke(e) {
|
|
551
|
-
function t(
|
|
552
|
-
let i =
|
|
551
|
+
function t(n, r, s, o) {
|
|
552
|
+
let i = n[o++];
|
|
553
553
|
if (i === "__proto__")
|
|
554
554
|
return !0;
|
|
555
|
-
const c = Number.isFinite(+i), l = o >=
|
|
556
|
-
return i = !i && u.isArray(s) ? s.length : i, l ? (u.hasOwnProp(s, i) ? s[i] = [s[i],
|
|
555
|
+
const c = Number.isFinite(+i), l = o >= n.length;
|
|
556
|
+
return i = !i && u.isArray(s) ? s.length : i, l ? (u.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !u.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && u.isArray(s[i]) && (s[i] = un(s[i])), !c);
|
|
557
557
|
}
|
|
558
558
|
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
559
|
-
const
|
|
560
|
-
return u.forEachEntry(e, (
|
|
561
|
-
t(
|
|
562
|
-
}),
|
|
559
|
+
const n = {};
|
|
560
|
+
return u.forEachEntry(e, (r, s) => {
|
|
561
|
+
t(cn(r), s, n, 0);
|
|
562
|
+
}), n;
|
|
563
563
|
}
|
|
564
564
|
return null;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function ln(e, t, n) {
|
|
567
567
|
if (u.isString(e))
|
|
568
568
|
try {
|
|
569
569
|
return (t || JSON.parse)(e), u.trim(e);
|
|
570
|
-
} catch (
|
|
571
|
-
if (
|
|
572
|
-
throw
|
|
570
|
+
} catch (r) {
|
|
571
|
+
if (r.name !== "SyntaxError")
|
|
572
|
+
throw r;
|
|
573
573
|
}
|
|
574
|
-
return (
|
|
574
|
+
return (n || JSON.stringify)(e);
|
|
575
575
|
}
|
|
576
576
|
const j = {
|
|
577
577
|
transitional: Ge,
|
|
578
578
|
adapter: ["xhr", "http", "fetch"],
|
|
579
|
-
transformRequest: [function(t,
|
|
580
|
-
const
|
|
579
|
+
transformRequest: [function(t, n) {
|
|
580
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = u.isObject(t);
|
|
581
581
|
if (o && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
582
582
|
return s ? JSON.stringify(Ke(t)) : t;
|
|
583
583
|
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
@@ -585,12 +585,12 @@ const j = {
|
|
|
585
585
|
if (u.isArrayBufferView(t))
|
|
586
586
|
return t.buffer;
|
|
587
587
|
if (u.isURLSearchParams(t))
|
|
588
|
-
return
|
|
588
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
589
589
|
let c;
|
|
590
590
|
if (o) {
|
|
591
|
-
if (
|
|
592
|
-
return
|
|
593
|
-
if ((c = u.isFileList(t)) ||
|
|
591
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
592
|
+
return an(t, this.formSerializer).toString();
|
|
593
|
+
if ((c = u.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
594
594
|
const l = this.env && this.env.FormData;
|
|
595
595
|
return Q(
|
|
596
596
|
c ? { "files[]": t } : t,
|
|
@@ -599,14 +599,14 @@ const j = {
|
|
|
599
599
|
);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return o || s ? (
|
|
602
|
+
return o || s ? (n.setContentType("application/json", !1), ln(t)) : t;
|
|
603
603
|
}],
|
|
604
604
|
transformResponse: [function(t) {
|
|
605
|
-
const
|
|
605
|
+
const n = this.transitional || j.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
606
606
|
if (u.isResponse(t) || u.isReadableStream(t))
|
|
607
607
|
return t;
|
|
608
|
-
if (t && u.isString(t) && (
|
|
609
|
-
const i = !(
|
|
608
|
+
if (t && u.isString(t) && (r && !this.responseType || s)) {
|
|
609
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
610
610
|
try {
|
|
611
611
|
return JSON.parse(t);
|
|
612
612
|
} catch (c) {
|
|
@@ -642,7 +642,7 @@ const j = {
|
|
|
642
642
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
643
643
|
j.headers[e] = {};
|
|
644
644
|
});
|
|
645
|
-
const
|
|
645
|
+
const dn = u.toObjectSet([
|
|
646
646
|
"age",
|
|
647
647
|
"authorization",
|
|
648
648
|
"content-length",
|
|
@@ -660,12 +660,12 @@ const lr = u.toObjectSet([
|
|
|
660
660
|
"referer",
|
|
661
661
|
"retry-after",
|
|
662
662
|
"user-agent"
|
|
663
|
-
]),
|
|
663
|
+
]), fn = (e) => {
|
|
664
664
|
const t = {};
|
|
665
|
-
let
|
|
665
|
+
let n, r, s;
|
|
666
666
|
return e && e.split(`
|
|
667
667
|
`).forEach(function(i) {
|
|
668
|
-
s = i.indexOf(":"),
|
|
668
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && dn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
669
669
|
}), t;
|
|
670
670
|
}, Se = Symbol("internals");
|
|
671
671
|
function $(e) {
|
|
@@ -674,33 +674,33 @@ function $(e) {
|
|
|
674
674
|
function J(e) {
|
|
675
675
|
return e === !1 || e == null ? e : u.isArray(e) ? e.map(J) : String(e);
|
|
676
676
|
}
|
|
677
|
-
function
|
|
678
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
679
|
-
let
|
|
680
|
-
for (;
|
|
681
|
-
t[
|
|
677
|
+
function hn(e) {
|
|
678
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
679
|
+
let r;
|
|
680
|
+
for (; r = n.exec(e); )
|
|
681
|
+
t[r[1]] = r[2];
|
|
682
682
|
return t;
|
|
683
683
|
}
|
|
684
|
-
const
|
|
685
|
-
function Y(e, t,
|
|
686
|
-
if (u.isFunction(
|
|
687
|
-
return
|
|
688
|
-
if (s && (t =
|
|
689
|
-
if (u.isString(
|
|
690
|
-
return t.indexOf(
|
|
691
|
-
if (u.isRegExp(
|
|
692
|
-
return
|
|
684
|
+
const pn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
685
|
+
function Y(e, t, n, r, s) {
|
|
686
|
+
if (u.isFunction(r))
|
|
687
|
+
return r.call(this, t, n);
|
|
688
|
+
if (s && (t = n), !!u.isString(t)) {
|
|
689
|
+
if (u.isString(r))
|
|
690
|
+
return t.indexOf(r) !== -1;
|
|
691
|
+
if (u.isRegExp(r))
|
|
692
|
+
return r.test(t);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
function
|
|
696
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
695
|
+
function mn(e) {
|
|
696
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
const
|
|
700
|
-
["get", "set", "has"].forEach((
|
|
701
|
-
Object.defineProperty(e,
|
|
698
|
+
function yn(e, t) {
|
|
699
|
+
const n = u.toCamelCase(" " + t);
|
|
700
|
+
["get", "set", "has"].forEach((r) => {
|
|
701
|
+
Object.defineProperty(e, r + n, {
|
|
702
702
|
value: function(s, o, i) {
|
|
703
|
-
return this[
|
|
703
|
+
return this[r].call(this, t, s, o, i);
|
|
704
704
|
},
|
|
705
705
|
configurable: !0
|
|
706
706
|
});
|
|
@@ -710,7 +710,7 @@ let S = class {
|
|
|
710
710
|
constructor(t) {
|
|
711
711
|
t && this.set(t);
|
|
712
712
|
}
|
|
713
|
-
set(t,
|
|
713
|
+
set(t, n, r) {
|
|
714
714
|
const s = this;
|
|
715
715
|
function o(c, l, d) {
|
|
716
716
|
const a = $(l);
|
|
@@ -721,86 +721,86 @@ let S = class {
|
|
|
721
721
|
}
|
|
722
722
|
const i = (c, l) => u.forEach(c, (d, a) => o(d, a, l));
|
|
723
723
|
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
724
|
-
i(t,
|
|
725
|
-
else if (u.isString(t) && (t = t.trim()) && !
|
|
726
|
-
i(
|
|
724
|
+
i(t, n);
|
|
725
|
+
else if (u.isString(t) && (t = t.trim()) && !pn(t))
|
|
726
|
+
i(fn(t), n);
|
|
727
727
|
else if (u.isHeaders(t))
|
|
728
728
|
for (const [c, l] of t.entries())
|
|
729
|
-
o(l, c,
|
|
729
|
+
o(l, c, r);
|
|
730
730
|
else
|
|
731
|
-
t != null && o(
|
|
731
|
+
t != null && o(n, t, r);
|
|
732
732
|
return this;
|
|
733
733
|
}
|
|
734
|
-
get(t,
|
|
734
|
+
get(t, n) {
|
|
735
735
|
if (t = $(t), t) {
|
|
736
|
-
const
|
|
737
|
-
if (
|
|
738
|
-
const s = this[
|
|
739
|
-
if (!
|
|
736
|
+
const r = u.findKey(this, t);
|
|
737
|
+
if (r) {
|
|
738
|
+
const s = this[r];
|
|
739
|
+
if (!n)
|
|
740
740
|
return s;
|
|
741
|
-
if (
|
|
742
|
-
return
|
|
743
|
-
if (u.isFunction(
|
|
744
|
-
return
|
|
745
|
-
if (u.isRegExp(
|
|
746
|
-
return
|
|
741
|
+
if (n === !0)
|
|
742
|
+
return hn(s);
|
|
743
|
+
if (u.isFunction(n))
|
|
744
|
+
return n.call(this, s, r);
|
|
745
|
+
if (u.isRegExp(n))
|
|
746
|
+
return n.exec(s);
|
|
747
747
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
has(t,
|
|
751
|
+
has(t, n) {
|
|
752
752
|
if (t = $(t), t) {
|
|
753
|
-
const
|
|
754
|
-
return !!(
|
|
753
|
+
const r = u.findKey(this, t);
|
|
754
|
+
return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
|
|
755
755
|
}
|
|
756
756
|
return !1;
|
|
757
757
|
}
|
|
758
|
-
delete(t,
|
|
759
|
-
const
|
|
758
|
+
delete(t, n) {
|
|
759
|
+
const r = this;
|
|
760
760
|
let s = !1;
|
|
761
761
|
function o(i) {
|
|
762
762
|
if (i = $(i), i) {
|
|
763
|
-
const c = u.findKey(
|
|
764
|
-
c && (!
|
|
763
|
+
const c = u.findKey(r, i);
|
|
764
|
+
c && (!n || Y(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
return u.isArray(t) ? t.forEach(o) : o(t), s;
|
|
768
768
|
}
|
|
769
769
|
clear(t) {
|
|
770
|
-
const
|
|
771
|
-
let
|
|
772
|
-
for (;
|
|
773
|
-
const o = r
|
|
770
|
+
const n = Object.keys(this);
|
|
771
|
+
let r = n.length, s = !1;
|
|
772
|
+
for (; r--; ) {
|
|
773
|
+
const o = n[r];
|
|
774
774
|
(!t || Y(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
775
775
|
}
|
|
776
776
|
return s;
|
|
777
777
|
}
|
|
778
778
|
normalize(t) {
|
|
779
|
-
const
|
|
779
|
+
const n = this, r = {};
|
|
780
780
|
return u.forEach(this, (s, o) => {
|
|
781
|
-
const i = u.findKey(
|
|
781
|
+
const i = u.findKey(r, o);
|
|
782
782
|
if (i) {
|
|
783
|
-
|
|
783
|
+
n[i] = J(s), delete n[o];
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
const c = t ?
|
|
787
|
-
c !== o && delete
|
|
786
|
+
const c = t ? mn(o) : String(o).trim();
|
|
787
|
+
c !== o && delete n[o], n[c] = J(s), r[c] = !0;
|
|
788
788
|
}), this;
|
|
789
789
|
}
|
|
790
790
|
concat(...t) {
|
|
791
791
|
return this.constructor.concat(this, ...t);
|
|
792
792
|
}
|
|
793
793
|
toJSON(t) {
|
|
794
|
-
const
|
|
795
|
-
return u.forEach(this, (
|
|
796
|
-
|
|
797
|
-
}),
|
|
794
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
795
|
+
return u.forEach(this, (r, s) => {
|
|
796
|
+
r != null && r !== !1 && (n[s] = t && u.isArray(r) ? r.join(", ") : r);
|
|
797
|
+
}), n;
|
|
798
798
|
}
|
|
799
799
|
[Symbol.iterator]() {
|
|
800
800
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
801
801
|
}
|
|
802
802
|
toString() {
|
|
803
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
803
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
804
804
|
`);
|
|
805
805
|
}
|
|
806
806
|
get [Symbol.toStringTag]() {
|
|
@@ -809,95 +809,95 @@ let S = class {
|
|
|
809
809
|
static from(t) {
|
|
810
810
|
return t instanceof this ? t : new this(t);
|
|
811
811
|
}
|
|
812
|
-
static concat(t, ...
|
|
813
|
-
const
|
|
814
|
-
return
|
|
812
|
+
static concat(t, ...n) {
|
|
813
|
+
const r = new this(t);
|
|
814
|
+
return n.forEach((s) => r.set(s)), r;
|
|
815
815
|
}
|
|
816
816
|
static accessor(t) {
|
|
817
|
-
const
|
|
817
|
+
const r = (this[Se] = this[Se] = {
|
|
818
818
|
accessors: {}
|
|
819
819
|
}).accessors, s = this.prototype;
|
|
820
820
|
function o(i) {
|
|
821
821
|
const c = $(i);
|
|
822
|
-
|
|
822
|
+
r[c] || (yn(s, i), r[c] = !0);
|
|
823
823
|
}
|
|
824
824
|
return u.isArray(t) ? t.forEach(o) : o(t), this;
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
827
|
S.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
828
828
|
u.reduceDescriptors(S.prototype, ({ value: e }, t) => {
|
|
829
|
-
let
|
|
829
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
830
830
|
return {
|
|
831
831
|
get: () => e,
|
|
832
|
-
set(
|
|
833
|
-
this[
|
|
832
|
+
set(r) {
|
|
833
|
+
this[n] = r;
|
|
834
834
|
}
|
|
835
835
|
};
|
|
836
836
|
});
|
|
837
837
|
u.freezeMethods(S);
|
|
838
838
|
function ee(e, t) {
|
|
839
|
-
const
|
|
840
|
-
let o =
|
|
839
|
+
const n = this || j, r = t || n, s = S.from(r.headers);
|
|
840
|
+
let o = r.data;
|
|
841
841
|
return u.forEach(e, function(c) {
|
|
842
|
-
o = c.call(
|
|
842
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
843
843
|
}), s.normalize(), o;
|
|
844
844
|
}
|
|
845
845
|
function Qe(e) {
|
|
846
846
|
return !!(e && e.__CANCEL__);
|
|
847
847
|
}
|
|
848
|
-
function F(e, t,
|
|
849
|
-
y.call(this, e ?? "canceled", y.ERR_CANCELED, t,
|
|
848
|
+
function F(e, t, n) {
|
|
849
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
850
850
|
}
|
|
851
851
|
u.inherits(F, y, {
|
|
852
852
|
__CANCEL__: !0
|
|
853
853
|
});
|
|
854
|
-
function We(e, t,
|
|
855
|
-
const
|
|
856
|
-
!
|
|
857
|
-
"Request failed with status code " +
|
|
858
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
854
|
+
function We(e, t, n) {
|
|
855
|
+
const r = n.config.validateStatus;
|
|
856
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
857
|
+
"Request failed with status code " + n.status,
|
|
858
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
859
|
+
n.config,
|
|
860
|
+
n.request,
|
|
861
|
+
n
|
|
862
862
|
));
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function gn(e) {
|
|
865
865
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
866
866
|
return t && t[1] || "";
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function wn(e, t) {
|
|
869
869
|
e = e || 10;
|
|
870
|
-
const
|
|
870
|
+
const n = new Array(e), r = new Array(e);
|
|
871
871
|
let s = 0, o = 0, i;
|
|
872
872
|
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
873
|
-
const d = Date.now(), a =
|
|
874
|
-
i || (i = d),
|
|
873
|
+
const d = Date.now(), a = r[o];
|
|
874
|
+
i || (i = d), n[s] = l, r[s] = d;
|
|
875
875
|
let f = o, h = 0;
|
|
876
876
|
for (; f !== s; )
|
|
877
|
-
h +=
|
|
877
|
+
h += n[f++], f = f % e;
|
|
878
878
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
|
|
879
879
|
return;
|
|
880
880
|
const m = a && d - a;
|
|
881
881
|
return m ? Math.round(h * 1e3 / m) : void 0;
|
|
882
882
|
};
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
let
|
|
886
|
-
const
|
|
884
|
+
function bn(e, t) {
|
|
885
|
+
let n = 0;
|
|
886
|
+
const r = 1e3 / t;
|
|
887
887
|
let s = null;
|
|
888
888
|
return function() {
|
|
889
889
|
const i = this === !0, c = Date.now();
|
|
890
|
-
if (i || c -
|
|
891
|
-
return s && (clearTimeout(s), s = null),
|
|
892
|
-
s || (s = setTimeout(() => (s = null,
|
|
890
|
+
if (i || c - n > r)
|
|
891
|
+
return s && (clearTimeout(s), s = null), n = c, e.apply(null, arguments);
|
|
892
|
+
s || (s = setTimeout(() => (s = null, n = Date.now(), e.apply(null, arguments)), r - (c - n)));
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
const M = (e, t,
|
|
896
|
-
let
|
|
897
|
-
const s =
|
|
898
|
-
return
|
|
899
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, l = i -
|
|
900
|
-
|
|
895
|
+
const M = (e, t, n = 3) => {
|
|
896
|
+
let r = 0;
|
|
897
|
+
const s = wn(50, 250);
|
|
898
|
+
return bn((o) => {
|
|
899
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, l = i - r, d = s(l), a = i <= c;
|
|
900
|
+
r = i;
|
|
901
901
|
const f = {
|
|
902
902
|
loaded: i,
|
|
903
903
|
total: c,
|
|
@@ -909,29 +909,29 @@ const M = (e, t, r = 3) => {
|
|
|
909
909
|
lengthComputable: c != null
|
|
910
910
|
};
|
|
911
911
|
f[t ? "download" : "upload"] = !0, e(f);
|
|
912
|
-
},
|
|
913
|
-
},
|
|
912
|
+
}, n);
|
|
913
|
+
}, Tn = k.hasStandardBrowserEnv ? (
|
|
914
914
|
// Standard browser envs have full support of the APIs needed to test
|
|
915
915
|
// whether the request URL is of the same origin as current location.
|
|
916
916
|
function() {
|
|
917
|
-
const t = /(msie|trident)/i.test(navigator.userAgent),
|
|
918
|
-
let
|
|
917
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
918
|
+
let r;
|
|
919
919
|
function s(o) {
|
|
920
920
|
let i = o;
|
|
921
|
-
return t && (
|
|
922
|
-
href:
|
|
923
|
-
protocol:
|
|
924
|
-
host:
|
|
925
|
-
search:
|
|
926
|
-
hash:
|
|
927
|
-
hostname:
|
|
928
|
-
port:
|
|
929
|
-
pathname:
|
|
921
|
+
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
922
|
+
href: n.href,
|
|
923
|
+
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
924
|
+
host: n.host,
|
|
925
|
+
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
926
|
+
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
927
|
+
hostname: n.hostname,
|
|
928
|
+
port: n.port,
|
|
929
|
+
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
|
-
return
|
|
932
|
+
return r = s(window.location.href), function(i) {
|
|
933
933
|
const c = u.isString(i) ? s(i) : i;
|
|
934
|
-
return c.protocol ===
|
|
934
|
+
return c.protocol === r.protocol && c.host === r.host;
|
|
935
935
|
};
|
|
936
936
|
}()
|
|
937
937
|
) : (
|
|
@@ -941,12 +941,12 @@ const M = (e, t, r = 3) => {
|
|
|
941
941
|
return !0;
|
|
942
942
|
};
|
|
943
943
|
}()
|
|
944
|
-
),
|
|
944
|
+
), En = k.hasStandardBrowserEnv ? (
|
|
945
945
|
// Standard browser envs support document.cookie
|
|
946
946
|
{
|
|
947
|
-
write(e, t,
|
|
947
|
+
write(e, t, n, r, s, o) {
|
|
948
948
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
949
|
-
u.isNumber(
|
|
949
|
+
u.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), u.isString(r) && i.push("path=" + r), u.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
950
950
|
},
|
|
951
951
|
read(e) {
|
|
952
952
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -968,45 +968,45 @@ const M = (e, t, r = 3) => {
|
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
|
-
function
|
|
971
|
+
function Sn(e) {
|
|
972
972
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function Rn(e, t) {
|
|
975
975
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
976
976
|
}
|
|
977
977
|
function Xe(e, t) {
|
|
978
|
-
return e && !
|
|
978
|
+
return e && !Sn(t) ? Rn(e, t) : t;
|
|
979
979
|
}
|
|
980
980
|
const Re = (e) => e instanceof S ? { ...e } : e;
|
|
981
981
|
function L(e, t) {
|
|
982
982
|
t = t || {};
|
|
983
|
-
const
|
|
984
|
-
function
|
|
983
|
+
const n = {};
|
|
984
|
+
function r(d, a, f) {
|
|
985
985
|
return u.isPlainObject(d) && u.isPlainObject(a) ? u.merge.call({ caseless: f }, d, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
|
|
986
986
|
}
|
|
987
987
|
function s(d, a, f) {
|
|
988
988
|
if (u.isUndefined(a)) {
|
|
989
989
|
if (!u.isUndefined(d))
|
|
990
|
-
return
|
|
990
|
+
return r(void 0, d, f);
|
|
991
991
|
} else
|
|
992
|
-
return
|
|
992
|
+
return r(d, a, f);
|
|
993
993
|
}
|
|
994
994
|
function o(d, a) {
|
|
995
995
|
if (!u.isUndefined(a))
|
|
996
|
-
return
|
|
996
|
+
return r(void 0, a);
|
|
997
997
|
}
|
|
998
998
|
function i(d, a) {
|
|
999
999
|
if (u.isUndefined(a)) {
|
|
1000
1000
|
if (!u.isUndefined(d))
|
|
1001
|
-
return
|
|
1001
|
+
return r(void 0, d);
|
|
1002
1002
|
} else
|
|
1003
|
-
return
|
|
1003
|
+
return r(void 0, a);
|
|
1004
1004
|
}
|
|
1005
1005
|
function c(d, a, f) {
|
|
1006
1006
|
if (f in t)
|
|
1007
|
-
return
|
|
1007
|
+
return r(d, a);
|
|
1008
1008
|
if (f in e)
|
|
1009
|
-
return
|
|
1009
|
+
return r(void 0, d);
|
|
1010
1010
|
}
|
|
1011
1011
|
const l = {
|
|
1012
1012
|
url: o,
|
|
@@ -1041,18 +1041,18 @@ function L(e, t) {
|
|
|
1041
1041
|
};
|
|
1042
1042
|
return u.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
|
|
1043
1043
|
const f = l[a] || s, h = f(e[a], t[a], a);
|
|
1044
|
-
u.isUndefined(h) && f !== c || (
|
|
1045
|
-
}),
|
|
1044
|
+
u.isUndefined(h) && f !== c || (n[a] = h);
|
|
1045
|
+
}), n;
|
|
1046
1046
|
}
|
|
1047
1047
|
const Ze = (e) => {
|
|
1048
1048
|
const t = L({}, e);
|
|
1049
|
-
let { data:
|
|
1049
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1050
1050
|
t.headers = i = S.from(i), t.url = ve(Xe(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1051
1051
|
"Authorization",
|
|
1052
1052
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1053
1053
|
);
|
|
1054
1054
|
let l;
|
|
1055
|
-
if (u.isFormData(
|
|
1055
|
+
if (u.isFormData(n)) {
|
|
1056
1056
|
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
1057
1057
|
i.setContentType(void 0);
|
|
1058
1058
|
else if ((l = i.getContentType()) !== !1) {
|
|
@@ -1060,13 +1060,13 @@ const Ze = (e) => {
|
|
|
1060
1060
|
i.setContentType([d || "multipart/form-data", ...a].join("; "));
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
if (k.hasStandardBrowserEnv && (
|
|
1064
|
-
const d = s && o &&
|
|
1063
|
+
if (k.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(t)), r || r !== !1 && Tn(t.url))) {
|
|
1064
|
+
const d = s && o && En.read(o);
|
|
1065
1065
|
d && i.set(s, d);
|
|
1066
1066
|
}
|
|
1067
1067
|
return t;
|
|
1068
|
-
},
|
|
1069
|
-
return new Promise(function(
|
|
1068
|
+
}, On = typeof XMLHttpRequest < "u", An = On && function(e) {
|
|
1069
|
+
return new Promise(function(n, r) {
|
|
1070
1070
|
const s = Ze(e);
|
|
1071
1071
|
let o = s.data;
|
|
1072
1072
|
const i = S.from(s.headers).normalize();
|
|
@@ -1090,21 +1090,21 @@ const Ze = (e) => {
|
|
|
1090
1090
|
request: a
|
|
1091
1091
|
};
|
|
1092
1092
|
We(function(T) {
|
|
1093
|
-
r(T), d();
|
|
1094
|
-
}, function(T) {
|
|
1095
1093
|
n(T), d();
|
|
1094
|
+
}, function(T) {
|
|
1095
|
+
r(T), d();
|
|
1096
1096
|
}, g), a = null;
|
|
1097
1097
|
}
|
|
1098
1098
|
"onloadend" in a ? a.onloadend = f : a.onreadystatechange = function() {
|
|
1099
1099
|
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(f);
|
|
1100
1100
|
}, a.onabort = function() {
|
|
1101
|
-
a && (
|
|
1101
|
+
a && (r(new y("Request aborted", y.ECONNABORTED, s, a)), a = null);
|
|
1102
1102
|
}, a.onerror = function() {
|
|
1103
|
-
|
|
1103
|
+
r(new y("Network Error", y.ERR_NETWORK, s, a)), a = null;
|
|
1104
1104
|
}, a.ontimeout = function() {
|
|
1105
1105
|
let p = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1106
1106
|
const g = s.transitional || Ge;
|
|
1107
|
-
s.timeoutErrorMessage && (p = s.timeoutErrorMessage),
|
|
1107
|
+
s.timeoutErrorMessage && (p = s.timeoutErrorMessage), r(new y(
|
|
1108
1108
|
p,
|
|
1109
1109
|
g.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1110
1110
|
s,
|
|
@@ -1113,22 +1113,22 @@ const Ze = (e) => {
|
|
|
1113
1113
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in a && u.forEach(i.toJSON(), function(p, g) {
|
|
1114
1114
|
a.setRequestHeader(g, p);
|
|
1115
1115
|
}), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", M(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", M(s.onUploadProgress)), (s.cancelToken || s.signal) && (l = (m) => {
|
|
1116
|
-
a && (
|
|
1116
|
+
a && (r(!m || m.type ? new F(null, e, a) : m), a.abort(), a = null);
|
|
1117
1117
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1118
|
-
const h =
|
|
1118
|
+
const h = gn(s.url);
|
|
1119
1119
|
if (h && k.protocols.indexOf(h) === -1) {
|
|
1120
|
-
|
|
1120
|
+
r(new y("Unsupported protocol " + h + ":", y.ERR_BAD_REQUEST, e));
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
1123
|
a.send(o || null);
|
|
1124
1124
|
});
|
|
1125
|
-
},
|
|
1126
|
-
let
|
|
1125
|
+
}, Pn = (e, t) => {
|
|
1126
|
+
let n = new AbortController(), r;
|
|
1127
1127
|
const s = function(l) {
|
|
1128
|
-
if (!
|
|
1129
|
-
|
|
1128
|
+
if (!r) {
|
|
1129
|
+
r = !0, i();
|
|
1130
1130
|
const d = l instanceof Error ? l : this.reason;
|
|
1131
|
-
|
|
1131
|
+
n.abort(d instanceof y ? d : new F(d instanceof Error ? d.message : d));
|
|
1132
1132
|
}
|
|
1133
1133
|
};
|
|
1134
1134
|
let o = t && setTimeout(() => {
|
|
@@ -1140,50 +1140,50 @@ const Ze = (e) => {
|
|
|
1140
1140
|
}), e = null);
|
|
1141
1141
|
};
|
|
1142
1142
|
e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", s));
|
|
1143
|
-
const { signal: c } =
|
|
1143
|
+
const { signal: c } = n;
|
|
1144
1144
|
return c.unsubscribe = i, [c, () => {
|
|
1145
1145
|
o && clearTimeout(o), o = null;
|
|
1146
1146
|
}];
|
|
1147
|
-
},
|
|
1148
|
-
let
|
|
1149
|
-
if (!t ||
|
|
1147
|
+
}, kn = function* (e, t) {
|
|
1148
|
+
let n = e.byteLength;
|
|
1149
|
+
if (!t || n < t) {
|
|
1150
1150
|
yield e;
|
|
1151
1151
|
return;
|
|
1152
1152
|
}
|
|
1153
|
-
let
|
|
1154
|
-
for (;
|
|
1155
|
-
s =
|
|
1156
|
-
},
|
|
1157
|
-
for await (const
|
|
1158
|
-
yield*
|
|
1159
|
-
}, Oe = (e, t,
|
|
1160
|
-
const o =
|
|
1153
|
+
let r = 0, s;
|
|
1154
|
+
for (; r < n; )
|
|
1155
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1156
|
+
}, Nn = async function* (e, t, n) {
|
|
1157
|
+
for await (const r of e)
|
|
1158
|
+
yield* kn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1159
|
+
}, Oe = (e, t, n, r, s) => {
|
|
1160
|
+
const o = Nn(e, t, s);
|
|
1161
1161
|
let i = 0;
|
|
1162
1162
|
return new ReadableStream({
|
|
1163
1163
|
type: "bytes",
|
|
1164
1164
|
async pull(c) {
|
|
1165
1165
|
const { done: l, value: d } = await o.next();
|
|
1166
1166
|
if (l) {
|
|
1167
|
-
c.close(),
|
|
1167
|
+
c.close(), r();
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
let a = d.byteLength;
|
|
1171
|
-
|
|
1171
|
+
n && n(i += a), c.enqueue(new Uint8Array(d));
|
|
1172
1172
|
},
|
|
1173
1173
|
cancel(c) {
|
|
1174
|
-
return
|
|
1174
|
+
return r(c), o.return();
|
|
1175
1175
|
}
|
|
1176
1176
|
}, {
|
|
1177
1177
|
highWaterMark: 2
|
|
1178
1178
|
});
|
|
1179
1179
|
}, Ae = (e, t) => {
|
|
1180
|
-
const
|
|
1181
|
-
return (
|
|
1182
|
-
lengthComputable:
|
|
1180
|
+
const n = e != null;
|
|
1181
|
+
return (r) => setTimeout(() => t({
|
|
1182
|
+
lengthComputable: n,
|
|
1183
1183
|
total: e,
|
|
1184
|
-
loaded:
|
|
1184
|
+
loaded: r
|
|
1185
1185
|
}));
|
|
1186
|
-
}, W = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ye = W && typeof ReadableStream == "function", oe = W && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())),
|
|
1186
|
+
}, W = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ye = W && typeof ReadableStream == "function", oe = W && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Cn = Ye && (() => {
|
|
1187
1187
|
let e = !1;
|
|
1188
1188
|
const t = new Request(k.origin, {
|
|
1189
1189
|
body: new ReadableStream(),
|
|
@@ -1203,12 +1203,12 @@ const Ze = (e) => {
|
|
|
1203
1203
|
};
|
|
1204
1204
|
W && ((e) => {
|
|
1205
1205
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1206
|
-
!V[t] && (V[t] = u.isFunction(e[t]) ? (
|
|
1207
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT,
|
|
1206
|
+
!V[t] && (V[t] = u.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1207
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1208
1208
|
});
|
|
1209
1209
|
});
|
|
1210
1210
|
})(new Response());
|
|
1211
|
-
const
|
|
1211
|
+
const xn = async (e) => {
|
|
1212
1212
|
if (e == null)
|
|
1213
1213
|
return 0;
|
|
1214
1214
|
if (u.isBlob(e))
|
|
@@ -1219,14 +1219,14 @@ const Cr = async (e) => {
|
|
|
1219
1219
|
return e.byteLength;
|
|
1220
1220
|
if (u.isURLSearchParams(e) && (e = e + ""), u.isString(e))
|
|
1221
1221
|
return (await oe(e)).byteLength;
|
|
1222
|
-
},
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
1225
|
-
},
|
|
1222
|
+
}, qn = async (e, t) => {
|
|
1223
|
+
const n = u.toFiniteNumber(e.getContentLength());
|
|
1224
|
+
return n ?? xn(t);
|
|
1225
|
+
}, Un = W && (async (e) => {
|
|
1226
1226
|
let {
|
|
1227
1227
|
url: t,
|
|
1228
|
-
method:
|
|
1229
|
-
data:
|
|
1228
|
+
method: n,
|
|
1229
|
+
data: r,
|
|
1230
1230
|
signal: s,
|
|
1231
1231
|
cancelToken: o,
|
|
1232
1232
|
timeout: i,
|
|
@@ -1238,7 +1238,7 @@ const Cr = async (e) => {
|
|
|
1238
1238
|
fetchOptions: h
|
|
1239
1239
|
} = Ze(e);
|
|
1240
1240
|
d = d ? (d + "").toLowerCase() : "text";
|
|
1241
|
-
let [m, p] = s || o || i ?
|
|
1241
|
+
let [m, p] = s || o || i ? Pn([s, o], i) : [], g, E;
|
|
1242
1242
|
const T = () => {
|
|
1243
1243
|
!g && setTimeout(() => {
|
|
1244
1244
|
m && m.unsubscribe();
|
|
@@ -1246,13 +1246,13 @@ const Cr = async (e) => {
|
|
|
1246
1246
|
};
|
|
1247
1247
|
let R;
|
|
1248
1248
|
try {
|
|
1249
|
-
if (l &&
|
|
1249
|
+
if (l && Cn && n !== "get" && n !== "head" && (R = await qn(a, r)) !== 0) {
|
|
1250
1250
|
let C = new Request(t, {
|
|
1251
1251
|
method: "POST",
|
|
1252
|
-
body:
|
|
1252
|
+
body: r,
|
|
1253
1253
|
duplex: "half"
|
|
1254
1254
|
}), B;
|
|
1255
|
-
u.isFormData(
|
|
1255
|
+
u.isFormData(r) && (B = C.headers.get("content-type")) && a.setContentType(B), C.body && (r = Oe(C.body, Pe, Ae(
|
|
1256
1256
|
R,
|
|
1257
1257
|
M(l)
|
|
1258
1258
|
), null, oe));
|
|
@@ -1260,9 +1260,9 @@ const Cr = async (e) => {
|
|
|
1260
1260
|
u.isString(f) || (f = f ? "cors" : "omit"), E = new Request(t, {
|
|
1261
1261
|
...h,
|
|
1262
1262
|
signal: m,
|
|
1263
|
-
method:
|
|
1263
|
+
method: n.toUpperCase(),
|
|
1264
1264
|
headers: a.normalize().toJSON(),
|
|
1265
|
-
body:
|
|
1265
|
+
body: r,
|
|
1266
1266
|
duplex: "half",
|
|
1267
1267
|
withCredentials: f
|
|
1268
1268
|
});
|
|
@@ -1304,8 +1304,8 @@ const Cr = async (e) => {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
}), ae = {
|
|
1306
1306
|
http: Kt,
|
|
1307
|
-
xhr:
|
|
1308
|
-
fetch:
|
|
1307
|
+
xhr: An,
|
|
1308
|
+
fetch: Un
|
|
1309
1309
|
};
|
|
1310
1310
|
u.forEach(ae, (e, t) => {
|
|
1311
1311
|
if (e) {
|
|
@@ -1316,22 +1316,22 @@ u.forEach(ae, (e, t) => {
|
|
|
1316
1316
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1317
1317
|
}
|
|
1318
1318
|
});
|
|
1319
|
-
const ke = (e) => `- ${e}`,
|
|
1319
|
+
const ke = (e) => `- ${e}`, Ln = (e) => u.isFunction(e) || e === null || e === !1, et = {
|
|
1320
1320
|
getAdapter: (e) => {
|
|
1321
1321
|
e = u.isArray(e) ? e : [e];
|
|
1322
1322
|
const { length: t } = e;
|
|
1323
|
-
let
|
|
1323
|
+
let n, r;
|
|
1324
1324
|
const s = {};
|
|
1325
1325
|
for (let o = 0; o < t; o++) {
|
|
1326
|
-
|
|
1326
|
+
n = e[o];
|
|
1327
1327
|
let i;
|
|
1328
|
-
if (
|
|
1328
|
+
if (r = n, !Ln(n) && (r = ae[(i = String(n)).toLowerCase()], r === void 0))
|
|
1329
1329
|
throw new y(`Unknown adapter '${i}'`);
|
|
1330
|
-
if (
|
|
1330
|
+
if (r)
|
|
1331
1331
|
break;
|
|
1332
|
-
s[i || "#" + o] =
|
|
1332
|
+
s[i || "#" + o] = r;
|
|
1333
1333
|
}
|
|
1334
|
-
if (!
|
|
1334
|
+
if (!r) {
|
|
1335
1335
|
const o = Object.entries(s).map(
|
|
1336
1336
|
([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1337
1337
|
);
|
|
@@ -1343,7 +1343,7 @@ const ke = (e) => `- ${e}`, Ur = (e) => u.isFunction(e) || e === null || e === !
|
|
|
1343
1343
|
"ERR_NOT_SUPPORT"
|
|
1344
1344
|
);
|
|
1345
1345
|
}
|
|
1346
|
-
return
|
|
1346
|
+
return r;
|
|
1347
1347
|
},
|
|
1348
1348
|
adapters: ae
|
|
1349
1349
|
};
|
|
@@ -1355,64 +1355,64 @@ function Ne(e) {
|
|
|
1355
1355
|
return te(e), e.headers = S.from(e.headers), e.data = ee.call(
|
|
1356
1356
|
e,
|
|
1357
1357
|
e.transformRequest
|
|
1358
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || j.adapter)(e).then(function(
|
|
1359
|
-
return te(e),
|
|
1358
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), et.getAdapter(e.adapter || j.adapter)(e).then(function(r) {
|
|
1359
|
+
return te(e), r.data = ee.call(
|
|
1360
1360
|
e,
|
|
1361
1361
|
e.transformResponse,
|
|
1362
|
-
|
|
1363
|
-
),
|
|
1364
|
-
}, function(
|
|
1365
|
-
return Qe(
|
|
1362
|
+
r
|
|
1363
|
+
), r.headers = S.from(r.headers), r;
|
|
1364
|
+
}, function(r) {
|
|
1365
|
+
return Qe(r) || (te(e), r && r.response && (r.response.data = ee.call(
|
|
1366
1366
|
e,
|
|
1367
1367
|
e.transformResponse,
|
|
1368
|
-
|
|
1369
|
-
),
|
|
1368
|
+
r.response
|
|
1369
|
+
), r.response.headers = S.from(r.response.headers))), Promise.reject(r);
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
1372
|
const tt = "1.7.2", he = {};
|
|
1373
1373
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1374
|
-
he[e] = function(
|
|
1375
|
-
return typeof
|
|
1374
|
+
he[e] = function(r) {
|
|
1375
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1376
1376
|
};
|
|
1377
1377
|
});
|
|
1378
1378
|
const Ce = {};
|
|
1379
|
-
he.transitional = function(t,
|
|
1379
|
+
he.transitional = function(t, n, r) {
|
|
1380
1380
|
function s(o, i) {
|
|
1381
|
-
return "[Axios v" + tt + "] Transitional option '" + o + "'" + i + (
|
|
1381
|
+
return "[Axios v" + tt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1382
1382
|
}
|
|
1383
1383
|
return (o, i, c) => {
|
|
1384
1384
|
if (t === !1)
|
|
1385
1385
|
throw new y(
|
|
1386
|
-
s(i, " has been removed" + (
|
|
1386
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1387
1387
|
y.ERR_DEPRECATED
|
|
1388
1388
|
);
|
|
1389
|
-
return
|
|
1389
|
+
return n && !Ce[i] && (Ce[i] = !0, console.warn(
|
|
1390
1390
|
s(
|
|
1391
1391
|
i,
|
|
1392
|
-
" has been deprecated since v" +
|
|
1392
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1393
1393
|
)
|
|
1394
1394
|
)), t ? t(o, i, c) : !0;
|
|
1395
1395
|
};
|
|
1396
1396
|
};
|
|
1397
|
-
function
|
|
1397
|
+
function Bn(e, t, n) {
|
|
1398
1398
|
if (typeof e != "object")
|
|
1399
1399
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1400
|
-
const
|
|
1401
|
-
let s =
|
|
1400
|
+
const r = Object.keys(e);
|
|
1401
|
+
let s = r.length;
|
|
1402
1402
|
for (; s-- > 0; ) {
|
|
1403
|
-
const o =
|
|
1403
|
+
const o = r[s], i = t[o];
|
|
1404
1404
|
if (i) {
|
|
1405
1405
|
const c = e[o], l = c === void 0 || i(c, o, e);
|
|
1406
1406
|
if (l !== !0)
|
|
1407
1407
|
throw new y("option " + o + " must be " + l, y.ERR_BAD_OPTION_VALUE);
|
|
1408
1408
|
continue;
|
|
1409
1409
|
}
|
|
1410
|
-
if (
|
|
1410
|
+
if (n !== !0)
|
|
1411
1411
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
const ce = {
|
|
1415
|
-
assertOptions:
|
|
1415
|
+
assertOptions: Bn,
|
|
1416
1416
|
validators: he
|
|
1417
1417
|
}, x = ce.validators;
|
|
1418
1418
|
let U = class {
|
|
@@ -1430,50 +1430,50 @@ let U = class {
|
|
|
1430
1430
|
*
|
|
1431
1431
|
* @returns {Promise} The Promise to be fulfilled
|
|
1432
1432
|
*/
|
|
1433
|
-
async request(t,
|
|
1433
|
+
async request(t, n) {
|
|
1434
1434
|
try {
|
|
1435
|
-
return await this._request(t,
|
|
1436
|
-
} catch (
|
|
1437
|
-
if (
|
|
1435
|
+
return await this._request(t, n);
|
|
1436
|
+
} catch (r) {
|
|
1437
|
+
if (r instanceof Error) {
|
|
1438
1438
|
let s;
|
|
1439
1439
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1440
1440
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1441
1441
|
try {
|
|
1442
|
-
|
|
1443
|
-
` + o) :
|
|
1442
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1443
|
+
` + o) : r.stack = o;
|
|
1444
1444
|
} catch {
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
|
-
throw
|
|
1447
|
+
throw r;
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
|
-
_request(t,
|
|
1451
|
-
typeof t == "string" ? (
|
|
1452
|
-
const { transitional:
|
|
1453
|
-
|
|
1450
|
+
_request(t, n) {
|
|
1451
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = L(this.defaults, n);
|
|
1452
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1453
|
+
r !== void 0 && ce.assertOptions(r, {
|
|
1454
1454
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1455
1455
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
1456
1456
|
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1457
|
-
}, !1), s != null && (u.isFunction(s) ?
|
|
1457
|
+
}, !1), s != null && (u.isFunction(s) ? n.paramsSerializer = {
|
|
1458
1458
|
serialize: s
|
|
1459
1459
|
} : ce.assertOptions(s, {
|
|
1460
1460
|
encode: x.function,
|
|
1461
1461
|
serialize: x.function
|
|
1462
|
-
}, !0)),
|
|
1462
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1463
1463
|
let i = o && u.merge(
|
|
1464
1464
|
o.common,
|
|
1465
|
-
o[
|
|
1465
|
+
o[n.method]
|
|
1466
1466
|
);
|
|
1467
1467
|
o && u.forEach(
|
|
1468
1468
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1469
1469
|
(p) => {
|
|
1470
1470
|
delete o[p];
|
|
1471
1471
|
}
|
|
1472
|
-
),
|
|
1472
|
+
), n.headers = S.concat(i, o);
|
|
1473
1473
|
const c = [];
|
|
1474
1474
|
let l = !0;
|
|
1475
1475
|
this.interceptors.request.forEach(function(g) {
|
|
1476
|
-
typeof g.runWhen == "function" && g.runWhen(
|
|
1476
|
+
typeof g.runWhen == "function" && g.runWhen(n) === !1 || (l = l && g.synchronous, c.unshift(g.fulfilled, g.rejected));
|
|
1477
1477
|
});
|
|
1478
1478
|
const d = [];
|
|
1479
1479
|
this.interceptors.response.forEach(function(g) {
|
|
@@ -1482,12 +1482,12 @@ let U = class {
|
|
|
1482
1482
|
let a, f = 0, h;
|
|
1483
1483
|
if (!l) {
|
|
1484
1484
|
const p = [Ne.bind(this), void 0];
|
|
1485
|
-
for (p.unshift.apply(p, c), p.push.apply(p, d), h = p.length, a = Promise.resolve(
|
|
1485
|
+
for (p.unshift.apply(p, c), p.push.apply(p, d), h = p.length, a = Promise.resolve(n); f < h; )
|
|
1486
1486
|
a = a.then(p[f++], p[f++]);
|
|
1487
1487
|
return a;
|
|
1488
1488
|
}
|
|
1489
1489
|
h = c.length;
|
|
1490
|
-
let m =
|
|
1490
|
+
let m = n;
|
|
1491
1491
|
for (f = 0; f < h; ) {
|
|
1492
1492
|
const p = c[f++], g = c[f++];
|
|
1493
1493
|
try {
|
|
@@ -1508,25 +1508,25 @@ let U = class {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
getUri(t) {
|
|
1510
1510
|
t = L(this.defaults, t);
|
|
1511
|
-
const
|
|
1512
|
-
return ve(
|
|
1511
|
+
const n = Xe(t.baseURL, t.url);
|
|
1512
|
+
return ve(n, t.params, t.paramsSerializer);
|
|
1513
1513
|
}
|
|
1514
1514
|
};
|
|
1515
1515
|
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1516
|
-
U.prototype[t] = function(
|
|
1517
|
-
return this.request(L(
|
|
1516
|
+
U.prototype[t] = function(n, r) {
|
|
1517
|
+
return this.request(L(r || {}, {
|
|
1518
1518
|
method: t,
|
|
1519
|
-
url:
|
|
1520
|
-
data: (
|
|
1519
|
+
url: n,
|
|
1520
|
+
data: (r || {}).data
|
|
1521
1521
|
}));
|
|
1522
1522
|
};
|
|
1523
1523
|
});
|
|
1524
1524
|
u.forEach(["post", "put", "patch"], function(t) {
|
|
1525
|
-
function r
|
|
1525
|
+
function n(r) {
|
|
1526
1526
|
return function(o, i, c) {
|
|
1527
1527
|
return this.request(L(c || {}, {
|
|
1528
1528
|
method: t,
|
|
1529
|
-
headers:
|
|
1529
|
+
headers: r ? {
|
|
1530
1530
|
"Content-Type": "multipart/form-data"
|
|
1531
1531
|
} : {},
|
|
1532
1532
|
url: o,
|
|
@@ -1534,34 +1534,34 @@ u.forEach(["post", "put", "patch"], function(t) {
|
|
|
1534
1534
|
}));
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
|
-
U.prototype[t] =
|
|
1537
|
+
U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
|
|
1538
1538
|
});
|
|
1539
|
-
let
|
|
1539
|
+
let _n = class nt {
|
|
1540
1540
|
constructor(t) {
|
|
1541
1541
|
if (typeof t != "function")
|
|
1542
1542
|
throw new TypeError("executor must be a function.");
|
|
1543
|
-
let
|
|
1543
|
+
let n;
|
|
1544
1544
|
this.promise = new Promise(function(o) {
|
|
1545
|
-
|
|
1545
|
+
n = o;
|
|
1546
1546
|
});
|
|
1547
|
-
const
|
|
1547
|
+
const r = this;
|
|
1548
1548
|
this.promise.then((s) => {
|
|
1549
|
-
if (!
|
|
1549
|
+
if (!r._listeners)
|
|
1550
1550
|
return;
|
|
1551
|
-
let o =
|
|
1551
|
+
let o = r._listeners.length;
|
|
1552
1552
|
for (; o-- > 0; )
|
|
1553
|
-
|
|
1554
|
-
|
|
1553
|
+
r._listeners[o](s);
|
|
1554
|
+
r._listeners = null;
|
|
1555
1555
|
}), this.promise.then = (s) => {
|
|
1556
1556
|
let o;
|
|
1557
1557
|
const i = new Promise((c) => {
|
|
1558
|
-
|
|
1558
|
+
r.subscribe(c), o = c;
|
|
1559
1559
|
}).then(s);
|
|
1560
1560
|
return i.cancel = function() {
|
|
1561
|
-
|
|
1561
|
+
r.unsubscribe(o);
|
|
1562
1562
|
}, i;
|
|
1563
1563
|
}, t(function(o, i, c) {
|
|
1564
|
-
|
|
1564
|
+
r.reason || (r.reason = new F(o, i, c), n(r.reason));
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
1567
|
/**
|
|
@@ -1587,8 +1587,8 @@ let Br = class rt {
|
|
|
1587
1587
|
unsubscribe(t) {
|
|
1588
1588
|
if (!this._listeners)
|
|
1589
1589
|
return;
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1590
|
+
const n = this._listeners.indexOf(t);
|
|
1591
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1592
1592
|
}
|
|
1593
1593
|
/**
|
|
1594
1594
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1597,19 +1597,19 @@ let Br = class rt {
|
|
|
1597
1597
|
static source() {
|
|
1598
1598
|
let t;
|
|
1599
1599
|
return {
|
|
1600
|
-
token: new
|
|
1600
|
+
token: new nt(function(s) {
|
|
1601
1601
|
t = s;
|
|
1602
1602
|
}),
|
|
1603
1603
|
cancel: t
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
function
|
|
1608
|
-
return function(
|
|
1609
|
-
return e.apply(null,
|
|
1607
|
+
function Fn(e) {
|
|
1608
|
+
return function(n) {
|
|
1609
|
+
return e.apply(null, n);
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function $n(e) {
|
|
1613
1613
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
1614
1614
|
}
|
|
1615
1615
|
const ue = {
|
|
@@ -1680,16 +1680,16 @@ const ue = {
|
|
|
1680
1680
|
Object.entries(ue).forEach(([e, t]) => {
|
|
1681
1681
|
ue[t] = e;
|
|
1682
1682
|
});
|
|
1683
|
-
function
|
|
1684
|
-
const t = new U(e),
|
|
1685
|
-
return u.extend(
|
|
1686
|
-
return
|
|
1687
|
-
},
|
|
1683
|
+
function rt(e) {
|
|
1684
|
+
const t = new U(e), n = Be(U.prototype.request, t);
|
|
1685
|
+
return u.extend(n, U.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1686
|
+
return rt(L(e, s));
|
|
1687
|
+
}, n;
|
|
1688
1688
|
}
|
|
1689
|
-
const b =
|
|
1689
|
+
const b = rt(j);
|
|
1690
1690
|
b.Axios = U;
|
|
1691
1691
|
b.CanceledError = F;
|
|
1692
|
-
b.CancelToken =
|
|
1692
|
+
b.CancelToken = _n;
|
|
1693
1693
|
b.isCancel = Qe;
|
|
1694
1694
|
b.VERSION = tt;
|
|
1695
1695
|
b.toFormData = Q;
|
|
@@ -1698,8 +1698,8 @@ b.Cancel = b.CanceledError;
|
|
|
1698
1698
|
b.all = function(t) {
|
|
1699
1699
|
return Promise.all(t);
|
|
1700
1700
|
};
|
|
1701
|
-
b.spread =
|
|
1702
|
-
b.isAxiosError =
|
|
1701
|
+
b.spread = Fn;
|
|
1702
|
+
b.isAxiosError = $n;
|
|
1703
1703
|
b.mergeConfig = L;
|
|
1704
1704
|
b.AxiosHeaders = S;
|
|
1705
1705
|
b.formToJSON = (e) => Ke(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1707,37 +1707,37 @@ b.getAdapter = et.getAdapter;
|
|
|
1707
1707
|
b.HttpStatusCode = ue;
|
|
1708
1708
|
b.default = b;
|
|
1709
1709
|
const {
|
|
1710
|
-
Axios:
|
|
1711
|
-
AxiosError:
|
|
1712
|
-
CanceledError:
|
|
1713
|
-
isCancel:
|
|
1714
|
-
CancelToken:
|
|
1715
|
-
VERSION:
|
|
1716
|
-
all:
|
|
1717
|
-
Cancel:
|
|
1718
|
-
isAxiosError:
|
|
1719
|
-
spread:
|
|
1720
|
-
toFormData:
|
|
1710
|
+
Axios: lr,
|
|
1711
|
+
AxiosError: Dn,
|
|
1712
|
+
CanceledError: dr,
|
|
1713
|
+
isCancel: fr,
|
|
1714
|
+
CancelToken: hr,
|
|
1715
|
+
VERSION: pr,
|
|
1716
|
+
all: mr,
|
|
1717
|
+
Cancel: yr,
|
|
1718
|
+
isAxiosError: gr,
|
|
1719
|
+
spread: wr,
|
|
1720
|
+
toFormData: br,
|
|
1721
1721
|
AxiosHeaders: xe,
|
|
1722
|
-
HttpStatusCode:
|
|
1723
|
-
formToJSON:
|
|
1724
|
-
getAdapter:
|
|
1725
|
-
mergeConfig:
|
|
1726
|
-
} = b, qe = "auth", st = async (e, t,
|
|
1727
|
-
const
|
|
1722
|
+
HttpStatusCode: Tr,
|
|
1723
|
+
formToJSON: Er,
|
|
1724
|
+
getAdapter: Sr,
|
|
1725
|
+
mergeConfig: Rr
|
|
1726
|
+
} = b, qe = "auth", st = async (e, t, n) => {
|
|
1727
|
+
const r = {
|
|
1728
1728
|
client_id: e.clientId,
|
|
1729
1729
|
client_secret: e.clientSecret
|
|
1730
|
-
}, s = await
|
|
1730
|
+
}, s = await n.post(
|
|
1731
1731
|
`${e.url}/security/connect/token/refresh`,
|
|
1732
|
-
|
|
1732
|
+
r,
|
|
1733
1733
|
{ withCredentials: !0, headers: t || {} }
|
|
1734
1734
|
), o = {
|
|
1735
1735
|
...s.data,
|
|
1736
1736
|
accessToken: s.data.access_token
|
|
1737
1737
|
};
|
|
1738
1738
|
return "access_token" in o && delete o.access_token, s.status === 200 && o.accessToken && localStorage.setItem("accessToken", o.accessToken), o;
|
|
1739
|
-
},
|
|
1740
|
-
const t = P(e),
|
|
1739
|
+
}, In = (e) => {
|
|
1740
|
+
const t = P(e), n = e.digitalRefresh, r = async (c, l) => {
|
|
1741
1741
|
var a;
|
|
1742
1742
|
const d = await t.request(`/${qe}/login`, {
|
|
1743
1743
|
method: "POST",
|
|
@@ -1766,12 +1766,12 @@ const {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
}, i = t.axiosClient;
|
|
1768
1768
|
return {
|
|
1769
|
-
postLogin:
|
|
1769
|
+
postLogin: r,
|
|
1770
1770
|
getToken: s,
|
|
1771
|
-
postToken:
|
|
1771
|
+
postToken: n ? () => st(n, e.headers, i) : void 0,
|
|
1772
1772
|
postLogout: o
|
|
1773
1773
|
};
|
|
1774
|
-
}, Ue = () => new
|
|
1774
|
+
}, Ue = () => new Dn(
|
|
1775
1775
|
"Unauthorized",
|
|
1776
1776
|
"ERR_UNAUTHORIZED",
|
|
1777
1777
|
{ headers: new xe() },
|
|
@@ -1783,21 +1783,21 @@ const {
|
|
|
1783
1783
|
headers: {},
|
|
1784
1784
|
config: { headers: new xe() }
|
|
1785
1785
|
}
|
|
1786
|
-
),
|
|
1786
|
+
), jn = (e) => {
|
|
1787
1787
|
let t = !1;
|
|
1788
|
-
const
|
|
1788
|
+
const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), o = (a) => {
|
|
1789
1789
|
const f = a.accessToken, h = a.refreshToken;
|
|
1790
1790
|
f && localStorage.setItem("accessToken", f), h && localStorage.setItem("refreshToken", h);
|
|
1791
1791
|
}, i = () => {
|
|
1792
1792
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1793
1793
|
}, c = (a, f = null) => {
|
|
1794
1794
|
var h;
|
|
1795
|
-
for (const m of
|
|
1795
|
+
for (const m of n)
|
|
1796
1796
|
a ? m.reject(a) : ((h = m.requestConfig).headers ?? (h.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${f}`, m.resolve(m.requestConfig));
|
|
1797
|
-
|
|
1797
|
+
n.length = 0;
|
|
1798
1798
|
};
|
|
1799
1799
|
return {
|
|
1800
|
-
getAccessToken:
|
|
1800
|
+
getAccessToken: r,
|
|
1801
1801
|
setTokens: o,
|
|
1802
1802
|
clearTokens: i,
|
|
1803
1803
|
handleTokenRefresh: async (a) => {
|
|
@@ -1811,7 +1811,7 @@ const {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
if (t)
|
|
1813
1813
|
return new Promise((h, m) => {
|
|
1814
|
-
|
|
1814
|
+
n.push({
|
|
1815
1815
|
resolve: h,
|
|
1816
1816
|
reject: m,
|
|
1817
1817
|
requestConfig: a
|
|
@@ -1832,20 +1832,20 @@ const {
|
|
|
1832
1832
|
return ((f = a == null ? void 0 : a.response) == null ? void 0 : f.status) === 401;
|
|
1833
1833
|
}
|
|
1834
1834
|
};
|
|
1835
|
-
},
|
|
1836
|
-
const t = (
|
|
1835
|
+
}, Hn = (e) => {
|
|
1836
|
+
const t = (r) => r ? r.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
|
|
1837
1837
|
return [
|
|
1838
1838
|
t(e.baseUrl),
|
|
1839
1839
|
t(e.productCode),
|
|
1840
1840
|
t(e.apiVersion),
|
|
1841
1841
|
t(e.endpoint)
|
|
1842
1842
|
].filter(Boolean).join("/");
|
|
1843
|
-
},
|
|
1843
|
+
}, zn = (e, t, n, r, s) => {
|
|
1844
1844
|
var d;
|
|
1845
1845
|
if (!t)
|
|
1846
1846
|
return null;
|
|
1847
|
-
const o = !!e.digitalRefresh, i = e.refreshTokenApiVersion ?? s, c = e.refreshTokenEndpointPath ?? (o ? "/security/connect/token/refresh" : "/refresh-token"), l = `${
|
|
1848
|
-
return
|
|
1847
|
+
const o = !!e.digitalRefresh, i = e.refreshTokenApiVersion ?? s, c = e.refreshTokenEndpointPath ?? (o ? "/security/connect/token/refresh" : "/refresh-token"), l = `${r}/auth/${i}${c}`;
|
|
1848
|
+
return jn({
|
|
1849
1849
|
baseUrl: e.baseUrl,
|
|
1850
1850
|
refreshTokenEndpointPath: c,
|
|
1851
1851
|
digitalRefreshUrl: (d = e.digitalRefresh) == null ? void 0 : d.url,
|
|
@@ -1853,86 +1853,87 @@ const {
|
|
|
1853
1853
|
onRefreshToken: async (a) => o ? await st(
|
|
1854
1854
|
e.digitalRefresh,
|
|
1855
1855
|
e.headers,
|
|
1856
|
-
|
|
1857
|
-
) : (await
|
|
1856
|
+
n
|
|
1857
|
+
) : (await n.post(l, {
|
|
1858
1858
|
refreshToken: a
|
|
1859
1859
|
})).data
|
|
1860
1860
|
});
|
|
1861
|
-
},
|
|
1861
|
+
}, Jn = (e, t) => {
|
|
1862
1862
|
e.interceptors.response.use(
|
|
1863
|
-
(
|
|
1864
|
-
async (
|
|
1865
|
-
const
|
|
1866
|
-
if (!t.isAuthError(
|
|
1867
|
-
throw
|
|
1868
|
-
|
|
1869
|
-
const s = await t.handleTokenRefresh(
|
|
1863
|
+
(n) => n,
|
|
1864
|
+
async (n) => {
|
|
1865
|
+
const r = n.config;
|
|
1866
|
+
if (!t.isAuthError(n) || r._retry)
|
|
1867
|
+
throw n;
|
|
1868
|
+
r._retry = !0;
|
|
1869
|
+
const s = await t.handleTokenRefresh(r);
|
|
1870
1870
|
return e.request(s);
|
|
1871
1871
|
}
|
|
1872
1872
|
);
|
|
1873
|
-
},
|
|
1873
|
+
}, Mn = (e, t, n, r, s) => {
|
|
1874
1874
|
const o = {
|
|
1875
1875
|
"Content-Type": (e == null ? void 0 : e.contentType) ?? "application/json",
|
|
1876
1876
|
...t && { apiVersion: t },
|
|
1877
1877
|
Authorization: "",
|
|
1878
|
-
...
|
|
1878
|
+
...n,
|
|
1879
1879
|
...e == null ? void 0 : e.headers
|
|
1880
1880
|
};
|
|
1881
|
-
if (s &&
|
|
1882
|
-
const i =
|
|
1881
|
+
if (s && r) {
|
|
1882
|
+
const i = r.getAccessToken();
|
|
1883
1883
|
i && (o.Authorization = `Bearer ${i}`);
|
|
1884
1884
|
}
|
|
1885
1885
|
return o;
|
|
1886
|
-
},
|
|
1887
|
-
const
|
|
1886
|
+
}, Vn = (e, t, n) => {
|
|
1887
|
+
const r = {
|
|
1888
1888
|
method: (e == null ? void 0 : e.method) ?? "GET",
|
|
1889
1889
|
headers: t,
|
|
1890
|
-
url:
|
|
1890
|
+
url: n,
|
|
1891
1891
|
data: (e == null ? void 0 : e.data) ?? {},
|
|
1892
1892
|
responseType: e == null ? void 0 : e.responseType
|
|
1893
1893
|
};
|
|
1894
|
-
return (e == null ? void 0 : e.withCredentials) !== void 0 && (
|
|
1895
|
-
},
|
|
1894
|
+
return (e == null ? void 0 : e.withCredentials) !== void 0 && (r.withCredentials = e.withCredentials), r;
|
|
1895
|
+
}, vn = (e, t) => ({
|
|
1896
1896
|
getAccessToken: e && t ? t.getAccessToken : () => null,
|
|
1897
1897
|
setTokens: e && t ? t.setTokens : () => {
|
|
1898
1898
|
},
|
|
1899
1899
|
clearTokens: e && t ? t.clearTokens : () => {
|
|
1900
1900
|
}
|
|
1901
1901
|
}), P = (e) => {
|
|
1902
|
-
const t = b.create(),
|
|
1902
|
+
const t = b.create(), n = e.apiVersion, r = e.productCode, o = e.baseUrl.replace(/\/$/, ""), i = e.hasTokenManager !== !1, c = zn(
|
|
1903
1903
|
e,
|
|
1904
1904
|
i,
|
|
1905
1905
|
t,
|
|
1906
1906
|
o,
|
|
1907
|
-
|
|
1907
|
+
n
|
|
1908
1908
|
);
|
|
1909
|
-
i && c &&
|
|
1909
|
+
i && c && Jn(t, c);
|
|
1910
1910
|
const l = (h) => ({
|
|
1911
1911
|
data: h.data,
|
|
1912
1912
|
status: h.status,
|
|
1913
1913
|
statusText: h.statusText,
|
|
1914
1914
|
headers: h.headers
|
|
1915
|
-
}), d = (h) => {
|
|
1916
|
-
var
|
|
1915
|
+
}), d = (h, m) => {
|
|
1916
|
+
var p;
|
|
1917
1917
|
return {
|
|
1918
1918
|
message: h.message,
|
|
1919
|
-
status: (
|
|
1919
|
+
status: (p = h.response) == null ? void 0 : p.status,
|
|
1920
|
+
url: m,
|
|
1920
1921
|
response: h.response ? l(h.response) : void 0
|
|
1921
1922
|
};
|
|
1922
1923
|
}, a = async (h, m) => {
|
|
1923
1924
|
var R;
|
|
1924
|
-
const p = h.startsWith("/") ? h.substring(1) : h, g =
|
|
1925
|
+
const p = h.startsWith("/") ? h.substring(1) : h, g = Hn({
|
|
1925
1926
|
baseUrl: o,
|
|
1926
|
-
productCode:
|
|
1927
|
-
apiVersion:
|
|
1927
|
+
productCode: r,
|
|
1928
|
+
apiVersion: n,
|
|
1928
1929
|
endpoint: p
|
|
1929
|
-
}), E =
|
|
1930
|
+
}), E = Mn(
|
|
1930
1931
|
m,
|
|
1931
|
-
|
|
1932
|
+
n,
|
|
1932
1933
|
e.headers,
|
|
1933
1934
|
c,
|
|
1934
1935
|
i
|
|
1935
|
-
), T =
|
|
1936
|
+
), T = Vn(m, E, g);
|
|
1936
1937
|
try {
|
|
1937
1938
|
const w = await t.request(T), O = l(w);
|
|
1938
1939
|
return ye(
|
|
@@ -1947,32 +1948,32 @@ const {
|
|
|
1947
1948
|
{ tracking: m == null ? void 0 : m.tracking, url: T.url },
|
|
1948
1949
|
X
|
|
1949
1950
|
), e.responseInterceptor) {
|
|
1950
|
-
const C = d(O);
|
|
1951
|
+
const C = d(O, T.url);
|
|
1951
1952
|
return e.responseInterceptor.onReject(C);
|
|
1952
1953
|
}
|
|
1953
1954
|
throw w;
|
|
1954
1955
|
}
|
|
1955
|
-
}, f =
|
|
1956
|
+
}, f = vn(i, c);
|
|
1956
1957
|
return {
|
|
1957
1958
|
request: a,
|
|
1958
1959
|
...f,
|
|
1959
1960
|
axiosClient: t
|
|
1960
1961
|
};
|
|
1961
|
-
},
|
|
1962
|
-
function
|
|
1962
|
+
}, Gn = "cep";
|
|
1963
|
+
function Kn(e) {
|
|
1963
1964
|
const t = P(e);
|
|
1964
|
-
function r
|
|
1965
|
-
return t.request(`/${
|
|
1965
|
+
function n(r, s) {
|
|
1966
|
+
return t.request(`/${Gn}`, {
|
|
1966
1967
|
method: "POST",
|
|
1967
|
-
data: JSON.stringify(
|
|
1968
|
+
data: JSON.stringify(r),
|
|
1968
1969
|
...s
|
|
1969
1970
|
});
|
|
1970
1971
|
}
|
|
1971
1972
|
return {
|
|
1972
|
-
getAddress:
|
|
1973
|
+
getAddress: n
|
|
1973
1974
|
};
|
|
1974
1975
|
}
|
|
1975
|
-
const
|
|
1976
|
+
const Qn = (e) => {
|
|
1976
1977
|
const t = P(e);
|
|
1977
1978
|
return {
|
|
1978
1979
|
signUp: async (c, l) => await t.request("/sign-up", {
|
|
@@ -2005,7 +2006,7 @@ const Kr = (e) => {
|
|
|
2005
2006
|
...l
|
|
2006
2007
|
})
|
|
2007
2008
|
};
|
|
2008
|
-
}, Le = "digital",
|
|
2009
|
+
}, Le = "digital", Wn = (e) => {
|
|
2009
2010
|
const t = P(e);
|
|
2010
2011
|
return {
|
|
2011
2012
|
getBroker: (s) => t.request(`/${Le}/getBroker`, {
|
|
@@ -2022,35 +2023,35 @@ const Kr = (e) => {
|
|
|
2022
2023
|
}
|
|
2023
2024
|
)
|
|
2024
2025
|
};
|
|
2025
|
-
},
|
|
2026
|
+
}, Xn = "data", Zn = (e) => {
|
|
2026
2027
|
const t = P(e);
|
|
2027
2028
|
return {
|
|
2028
|
-
postData: async (
|
|
2029
|
+
postData: async (r, s) => await t.request(`/${Xn}`, {
|
|
2029
2030
|
method: "POST",
|
|
2030
|
-
data: JSON.stringify(
|
|
2031
|
+
data: JSON.stringify(r),
|
|
2031
2032
|
...s
|
|
2032
2033
|
})
|
|
2033
2034
|
};
|
|
2034
|
-
},
|
|
2035
|
+
}, Yn = "endorsement", er = (e) => {
|
|
2035
2036
|
const t = P(e);
|
|
2036
2037
|
return {
|
|
2037
|
-
putEndorsement: (
|
|
2038
|
+
putEndorsement: (r, s) => t.request(`/${Yn}`, {
|
|
2038
2039
|
method: "PUT",
|
|
2039
|
-
data:
|
|
2040
|
+
data: r,
|
|
2040
2041
|
contentType: "multipart/form-data",
|
|
2041
2042
|
...s
|
|
2042
2043
|
})
|
|
2043
2044
|
};
|
|
2044
|
-
},
|
|
2045
|
+
}, ne = "payment", tr = (e) => {
|
|
2045
2046
|
const t = P(e);
|
|
2046
2047
|
return {
|
|
2047
|
-
postPayment: (o, i) => t.request(`/${
|
|
2048
|
+
postPayment: (o, i) => t.request(`/${ne}`, {
|
|
2048
2049
|
method: "POST",
|
|
2049
2050
|
data: JSON.stringify(o),
|
|
2050
2051
|
...i
|
|
2051
2052
|
}),
|
|
2052
2053
|
getPaymentStatus: (o, i) => t.request(
|
|
2053
|
-
`/${
|
|
2054
|
+
`/${ne}/status?policyId=${o.policyId}`,
|
|
2054
2055
|
{
|
|
2055
2056
|
method: "GET",
|
|
2056
2057
|
data: "",
|
|
@@ -2058,7 +2059,7 @@ const Kr = (e) => {
|
|
|
2058
2059
|
}
|
|
2059
2060
|
),
|
|
2060
2061
|
getPaymentSummary: (o, i) => t.request(
|
|
2061
|
-
`/${
|
|
2062
|
+
`/${ne}/summary?policyId=${o.policyId}`,
|
|
2062
2063
|
{
|
|
2063
2064
|
method: "GET",
|
|
2064
2065
|
data: "",
|
|
@@ -2066,7 +2067,7 @@ const Kr = (e) => {
|
|
|
2066
2067
|
}
|
|
2067
2068
|
)
|
|
2068
2069
|
};
|
|
2069
|
-
}, H = "product/action",
|
|
2070
|
+
}, H = "product/action", nr = (e) => {
|
|
2070
2071
|
const t = P(e);
|
|
2071
2072
|
return {
|
|
2072
2073
|
getCnpjStatus: (i, c, l, d) => {
|
|
@@ -2105,7 +2106,7 @@ const Kr = (e) => {
|
|
|
2105
2106
|
}
|
|
2106
2107
|
)
|
|
2107
2108
|
};
|
|
2108
|
-
}, q = "quotation",
|
|
2109
|
+
}, q = "quotation", rr = (e) => {
|
|
2109
2110
|
const t = P(e);
|
|
2110
2111
|
return {
|
|
2111
2112
|
getQuotations: (a, f) => {
|
|
@@ -2167,17 +2168,17 @@ const Kr = (e) => {
|
|
|
2167
2168
|
}
|
|
2168
2169
|
)
|
|
2169
2170
|
};
|
|
2170
|
-
},
|
|
2171
|
+
}, sr = "report", or = (e) => {
|
|
2171
2172
|
const t = P(e);
|
|
2172
2173
|
return {
|
|
2173
|
-
getReportStream: (
|
|
2174
|
+
getReportStream: (r, s) => {
|
|
2174
2175
|
const o = new URLSearchParams({
|
|
2175
|
-
policyId:
|
|
2176
|
-
documentType:
|
|
2177
|
-
...
|
|
2176
|
+
policyId: r.policyId,
|
|
2177
|
+
documentType: r.documentType ?? "certificate",
|
|
2178
|
+
...r.additionalParams
|
|
2178
2179
|
});
|
|
2179
2180
|
return t.request(
|
|
2180
|
-
`/${
|
|
2181
|
+
`/${sr}/generate-stream?${o.toString()}`,
|
|
2181
2182
|
{
|
|
2182
2183
|
method: "GET",
|
|
2183
2184
|
data: "",
|
|
@@ -2187,11 +2188,11 @@ const Kr = (e) => {
|
|
|
2187
2188
|
);
|
|
2188
2189
|
}
|
|
2189
2190
|
};
|
|
2190
|
-
},
|
|
2191
|
+
}, ir = "SubscriberData", ar = (e) => {
|
|
2191
2192
|
const t = P(e);
|
|
2192
2193
|
return {
|
|
2193
|
-
getSubscriber: (
|
|
2194
|
-
`/${
|
|
2194
|
+
getSubscriber: (r, s) => t.request(
|
|
2195
|
+
`/${ir}/get-subscriber-data?cnpj=${r}`,
|
|
2195
2196
|
{
|
|
2196
2197
|
method: "GET",
|
|
2197
2198
|
data: "",
|
|
@@ -2200,12 +2201,12 @@ const Kr = (e) => {
|
|
|
2200
2201
|
)
|
|
2201
2202
|
};
|
|
2202
2203
|
};
|
|
2203
|
-
function
|
|
2204
|
-
const t =
|
|
2204
|
+
function Or(e) {
|
|
2205
|
+
const t = In(e), n = Qn(e), r = Zn(e), s = rr(e), o = tr(e), i = Kn(e), c = Wn(e), l = er(e), d = nr(e), a = or(e), f = ar(e), h = P(e);
|
|
2205
2206
|
return {
|
|
2206
2207
|
auth: t,
|
|
2207
|
-
authAkad:
|
|
2208
|
-
data:
|
|
2208
|
+
authAkad: n,
|
|
2209
|
+
data: r,
|
|
2209
2210
|
quotation: s,
|
|
2210
2211
|
payment: o,
|
|
2211
2212
|
address: i,
|
|
@@ -2218,5 +2219,5 @@ function On(e) {
|
|
|
2218
2219
|
};
|
|
2219
2220
|
}
|
|
2220
2221
|
export {
|
|
2221
|
-
|
|
2222
|
+
Or as default
|
|
2222
2223
|
};
|